From eeebd84418f31ded3b476f6c814ae6c42fd1bf2e Mon Sep 17 00:00:00 2001 From: Nguyen Xuan Hai Date: Tue, 28 Mar 2023 07:56:28 +0000 Subject: [PATCH] RELEASE_v2.0.0 Features: - Support PosgreSQL 15.0 - Support CXX client V1 - Support CXX cilent V2 Bug fixes: - Fix Error parsing query influxdb_fdw with boolean data type - Fix limit-orderby test suite crash on debug mode - Fix cannot insert timestamp value into field column --- LICENSE | 4 +- Makefile | 67 +- README.md | 92 +- connection.cpp | 282 + connection.hpp | 27 + deparse.c | 40 +- deps/date/LICENSE.txt | 31 + deps/date/README.md | 84 + deps/date/include/date/date.h | 8200 ++++++++++++ deps/date/include/date/tz.h | 2792 ++++ deps/date/include/date/tz_private.h | 316 + deps/date/src/tz.cpp | 3944 ++++++ expected/10.18/aggregate.out | 839 -- expected/10.18/extra/aggregates.out | 3272 ----- expected/10.18/extra/influxdb_fdw_post.out | 8913 ------------- expected/10.18/extra/join.out | 7202 ----------- expected/10.18/influxdb_fdw.out | 1607 --- expected/10.18/schemaless/add_fields.out | 1291 -- expected/10.18/schemaless/add_multi_key.out | 2587 ---- expected/10.18/schemaless/aggregate.out | 839 -- .../10.18/schemaless/extra/aggregates.out | 3221 ----- .../schemaless/extra/influxdb_fdw_post.out | 9006 ------------- expected/10.18/schemaless/extra/join.out | 7341 ----------- expected/10.18/schemaless/influxdb_fdw.out | 1611 --- expected/10.18/schemaless/schemaless.out | 921 -- expected/10.18/schemaless/selectfunc.out | 10104 --------------- expected/10.18/selectfunc.out | 10104 --------------- expected/{14.0 => 11.17}/aggregate.out | 4 +- .../{11.13 => 11.17}/extra/aggregates.out | 4 +- .../extra/influxdb_fdw_post.out | 10 +- expected/{12.8 => 11.17}/extra/insert.out | 4 +- expected/{11.13 => 11.17}/extra/join.out | 7 +- expected/{11.13 => 11.17}/extra/limit.out | 4 +- expected/{11.13 => 11.17}/extra/prepare.out | 4 +- expected/{11.13 => 11.17}/extra/select.out | 4 +- .../{10.18 => 11.17}/extra/select_having.out | 4 +- expected/{11.13 => 11.17}/influxdb_fdw.out | 56 +- expected/11.17/option.out | 304 + .../schemaless/add_fields.out | 10 +- .../schemaless/add_multi_key.out | 10 +- .../{10.18 => 11.17}/schemaless/add_tags.out | 10 +- .../{12.8 => 11.17}/schemaless/aggregate.out | 4 +- .../schemaless/extra/aggregates.out | 4 +- .../schemaless/extra/influxdb_fdw_post.out | 34 +- .../schemaless/extra/insert.out | 4 +- .../schemaless/extra/join.out | 15 +- .../schemaless/extra/limit.out | 4 +- .../schemaless/extra/prepare.out | 4 +- .../schemaless/extra/select.out | 4 +- .../schemaless/extra/select_having.out | 4 +- .../schemaless/influxdb_fdw.out | 12 +- .../schemaless/schemaless.out | 4 +- .../schemaless/selectfunc.out | 4 +- expected/{11.13 => 11.17}/selectfunc.out | 4 +- expected/{12.8 => 12.12}/aggregate.out | 4 +- expected/{12.8 => 12.12}/extra/aggregates.out | 4 +- .../extra/influxdb_fdw_post.out | 10 +- expected/{11.13 => 12.12}/extra/insert.out | 4 +- expected/{12.8 => 12.12}/extra/join.out | 4 +- expected/{10.18 => 12.12}/extra/limit.out | 4 +- expected/{10.18 => 12.12}/extra/prepare.out | 4 +- expected/{12.8 => 12.12}/extra/select.out | 4 +- .../{12.8 => 12.12}/extra/select_having.out | 4 +- expected/{13.4 => 12.12}/influxdb_fdw.out | 56 +- expected/12.12/option.out | 304 + .../{13.4 => 12.12}/schemaless/add_fields.out | 10 +- .../schemaless/add_multi_key.out | 10 +- .../{13.4 => 12.12}/schemaless/add_tags.out | 10 +- .../{13.4 => 12.12}/schemaless/aggregate.out | 4 +- .../schemaless/extra/aggregates.out | 4 +- .../schemaless/extra/influxdb_fdw_post.out | 34 +- .../schemaless/extra/insert.out | 4 +- .../{12.8 => 12.12}/schemaless/extra/join.out | 12 +- .../schemaless/extra/limit.out | 4 +- .../schemaless/extra/prepare.out | 4 +- .../schemaless/extra/select.out | 4 +- .../schemaless/extra/select_having.out | 4 +- .../schemaless/influxdb_fdw.out | 12 +- .../{12.8 => 12.12}/schemaless/schemaless.out | 4 +- .../{13.4 => 12.12}/schemaless/selectfunc.out | 4 +- expected/{12.8 => 12.12}/selectfunc.out | 4 +- expected/12.8/extra/limit.out | 783 -- expected/{11.13 => 13.8}/aggregate.out | 4 +- expected/{13.4 => 13.8}/extra/aggregates.out | 4 +- .../extra/influxdb_fdw_post.out | 10 +- expected/{13.4 => 13.8}/extra/insert.out | 4 +- expected/{13.4 => 13.8}/extra/join.out | 4 +- expected/{13.4 => 13.8}/extra/limit.out | 4 +- expected/{14.0 => 13.8}/extra/prepare.out | 72 +- expected/{13.4 => 13.8}/extra/select.out | 4 +- .../{11.13 => 13.8}/extra/select_having.out | 4 +- expected/{12.8 => 13.8}/influxdb_fdw.out | 56 +- expected/13.8/option.out | 304 + .../{12.8 => 13.8}/schemaless/add_fields.out | 10 +- .../schemaless/add_multi_key.out | 10 +- .../{14.0 => 13.8}/schemaless/add_tags.out | 10 +- .../{14.0 => 13.8}/schemaless/aggregate.out | 4 +- .../schemaless/extra/aggregates.out | 4 +- .../schemaless/extra/influxdb_fdw_post.out | 34 +- .../schemaless/extra/insert.out | 4 +- .../{13.4 => 13.8}/schemaless/extra/join.out | 12 +- .../{13.4 => 13.8}/schemaless/extra/limit.out | 4 +- .../schemaless/extra/prepare.out | 72 +- .../schemaless/extra/select.out | 4 +- .../schemaless/extra/select_having.out | 4 +- .../schemaless/influxdb_fdw.out | 12 +- .../{13.4 => 13.8}/schemaless/schemaless.out | 4 +- .../{12.8 => 13.8}/schemaless/selectfunc.out | 4 +- expected/{13.4 => 13.8}/selectfunc.out | 4 +- expected/14.0/extra/insert.out | 720 -- expected/14.0/extra/select_having.out | 131 - expected/14.0/schemaless/extra/insert.out | 722 -- .../14.0/schemaless/extra/select_having.out | 133 - expected/{13.4 => 14.5}/aggregate.out | 4 +- expected/{14.0 => 14.5}/extra/aggregates.out | 4 +- .../extra/influxdb_fdw_post.out | 56 +- expected/{10.18 => 14.5}/extra/insert.out | 4 +- expected/{14.0 => 14.5}/extra/join.out | 4 +- expected/{14.0 => 14.5}/extra/limit.out | 4 +- expected/{13.4 => 14.5}/extra/prepare.out | 72 +- expected/{14.0 => 14.5}/extra/select.out | 4 +- .../{13.4 => 14.5}/extra/select_having.out | 4 +- expected/{14.0 => 14.5}/influxdb_fdw.out | 56 +- expected/14.5/option.out | 304 + .../{14.0 => 14.5}/schemaless/add_fields.out | 10 +- .../schemaless/add_multi_key.out | 10 +- .../{12.8 => 14.5}/schemaless/add_tags.out | 10 +- .../{11.13 => 14.5}/schemaless/aggregate.out | 4 +- .../schemaless/extra/aggregates.out | 4 +- .../schemaless/extra/influxdb_fdw_post.out | 74 +- .../schemaless/extra/insert.out | 4 +- .../{14.0 => 14.5}/schemaless/extra/join.out | 37 +- .../{14.0 => 14.5}/schemaless/extra/limit.out | 4 +- .../schemaless/extra/prepare.out | 72 +- .../schemaless/extra/select.out | 4 +- .../schemaless/extra/select_having.out | 4 +- .../schemaless/influxdb_fdw.out | 12 +- .../{14.0 => 14.5}/schemaless/schemaless.out | 4 +- .../{14.0 => 14.5}/schemaless/selectfunc.out | 4 +- expected/{14.0 => 14.5}/selectfunc.out | 4 +- expected/15.0/aggregate.out | 849 ++ expected/15.0/extra/aggregates.out | 3442 +++++ expected/15.0/extra/influxdb_fdw_post.out | 10619 +++++++++++++++ expected/15.0/extra/insert.out | 695 + expected/15.0/extra/join.out | 7329 +++++++++++ expected/15.0/extra/limit.out | 863 ++ expected/{12.8 => 15.0}/extra/prepare.out | 74 +- expected/{10.18 => 15.0}/extra/select.out | 185 +- expected/15.0/extra/select_having.out | 133 + expected/15.0/influxdb_fdw.out | 1639 +++ expected/15.0/option.out | 304 + expected/15.0/schemaless/add_fields.out | 1295 ++ expected/15.0/schemaless/add_multi_key.out | 2585 ++++ .../{11.13 => 15.0}/schemaless/add_tags.out | 364 +- expected/15.0/schemaless/aggregate.out | 849 ++ expected/15.0/schemaless/extra/aggregates.out | 3418 +++++ .../schemaless/extra/influxdb_fdw_post.out | 10760 ++++++++++++++++ expected/15.0/schemaless/extra/insert.out | 726 ++ expected/15.0/schemaless/extra/join.out | 7528 +++++++++++ .../schemaless/extra/limit.out | 288 +- .../schemaless/extra/prepare.out | 74 +- .../schemaless/extra/select.out | 168 +- .../15.0/schemaless/extra/select_having.out | 137 + expected/15.0/schemaless/influxdb_fdw.out | 1603 +++ expected/15.0/schemaless/schemaless.out | 921 ++ expected/15.0/schemaless/selectfunc.out | 9133 +++++++++++++ expected/15.0/selectfunc.out | 9133 +++++++++++++ expected/performance/influxdb_performance.out | 6222 +++++++++ influxdb_fdw--1.0.sql | 2 +- influxdb_fdw--1.1.sql | 2 +- influxdb_fdw--1.2.sql | 2 +- influxdb_fdw--1.3.sql | 2 +- influxdb_fdw.c | 191 +- influxdb_fdw.h | 74 +- influxdb_query.c | 27 +- init.sh | 149 +- init/init_performance.txt | 6 + init/join.txt | 22 + init/option.txt | 13 + init_performance.sh | 86 + init_v2/agg.txt | 7 + init_v2/emp.txt | 6 + init_v2/fields_add_1.txt | 12 + init_v2/fields_add_20.txt | 12 + init_v2/fields_original.txt | 26 + init_v2/init.txt | 45 + init_v2/init_post.txt | 3 + init_v2/join.txt | 28 + init_v2/multikey_add_1tag_1field.txt | 7 + init_v2/multikey_add_5tag_20field.txt | 8 + init_v2/multikey_original.txt | 22 + init_v2/onek.txt | 1003 ++ init_v2/option.txt | 12 + init_v2/others.txt | 238 + init_v2/person.txt | 53 + init_v2/schemaless.txt | 46 + init_v2/select.txt | 8 + init_v2/selectfunc.txt | 20 + init_v2/streets.txt | 5127 ++++++++ init_v2/stud_emp.txt | 6 + init_v2/student.txt | 5 + init_v2/tag_add_1.txt | 12 + init_v2/tag_add_20.txt | 8 + init_v2/tag_original.txt | 26 + init_v2/tenk.txt | 10003 ++++++++++++++ option.c | 90 +- query.cpp | 515 + query_cxx.h | 91 + sql/11.13/schemaless/extra/join.sql | 2962 ----- sql/{11.13 => 11.17}/aggregate.sql | 4 +- sql/{11.13 => 11.17}/extra/aggregates.sql | 4 +- .../extra/influxdb_fdw_post.sql | 10 +- sql/{10.18 => 11.17}/extra/init.sql | 0 sql/{10.18 => 11.17}/extra/insert.sql | 4 +- sql/{12.8 => 11.17}/extra/join.sql | 7 +- sql/{10.18 => 11.17}/extra/limit.sql | 4 +- sql/{10.18 => 11.17}/extra/prepare.sql | 4 +- sql/{11.13 => 11.17}/extra/select.sql | 4 +- sql/{10.18 => 11.17}/extra/select_having.sql | 4 +- sql/{11.13 => 11.17}/influxdb_fdw.sql | 36 +- sql/{10.18 => 11.17}/init.sql | 0 sql/11.17/option.sql | 214 + .../schemaless/add_fields.sql | 10 +- .../schemaless/add_multi_key.sql | 10 +- sql/{12.8 => 11.17}/schemaless/add_tags.sql | 10 +- sql/{12.8 => 11.17}/schemaless/aggregate.sql | 4 +- .../schemaless/extra/aggregates.sql | 4 +- .../schemaless/extra/influxdb_fdw_post.sql | 21 +- .../schemaless/extra/insert.sql | 4 +- sql/{13.4 => 11.17}/schemaless/extra/join.sql | 13 +- .../schemaless/extra/limit.sql | 4 +- .../schemaless/extra/prepare.sql | 4 +- .../schemaless/extra/select.sql | 4 +- .../schemaless/extra/select_having.sql | 4 +- .../schemaless/influxdb_fdw.sql | 8 +- sql/{10.18 => 11.17}/schemaless/init.sql | 0 sql/{12.8 => 11.17}/schemaless/schemaless.sql | 4 +- .../schemaless/selectfunc.sql | 4 +- sql/{12.8 => 11.17}/selectfunc.sql | 4 +- sql/{12.8 => 12.12}/aggregate.sql | 4 +- sql/{13.4 => 12.12}/extra/aggregates.sql | 4 +- .../extra/influxdb_fdw_post.sql | 10 +- sql/{11.13 => 12.12}/extra/init.sql | 0 sql/{12.8 => 12.12}/extra/insert.sql | 4 +- sql/{10.18 => 12.12}/extra/join.sql | 4 +- sql/{12.8 => 12.12}/extra/limit.sql | 4 +- sql/{12.8 => 12.12}/extra/prepare.sql | 4 +- sql/{10.18 => 12.12}/extra/select.sql | 4 +- sql/{11.13 => 12.12}/extra/select_having.sql | 4 +- sql/{12.8 => 12.12}/influxdb_fdw.sql | 36 +- sql/{11.13 => 12.12}/init.sql | 0 sql/12.12/option.sql | 214 + .../schemaless/add_fields.sql | 10 +- .../schemaless/add_multi_key.sql | 10 +- sql/{10.18 => 12.12}/schemaless/add_tags.sql | 10 +- sql/{10.18 => 12.12}/schemaless/aggregate.sql | 4 +- .../schemaless/extra/aggregates.sql | 4 +- .../schemaless/extra/influxdb_fdw_post.sql | 21 +- .../schemaless/extra/insert.sql | 4 +- sql/{12.8 => 12.12}/schemaless/extra/join.sql | 10 +- .../schemaless/extra/limit.sql | 4 +- .../schemaless/extra/prepare.sql | 4 +- .../schemaless/extra/select.sql | 4 +- .../schemaless/extra/select_having.sql | 4 +- .../schemaless/influxdb_fdw.sql | 8 +- sql/{11.13 => 12.12}/schemaless/init.sql | 0 .../schemaless/schemaless.sql | 4 +- .../schemaless/selectfunc.sql | 4 +- sql/{13.4 => 12.12}/selectfunc.sql | 4 +- sql/{10.18 => 13.8}/aggregate.sql | 4 +- sql/{10.18 => 13.8}/extra/aggregates.sql | 4 +- .../extra/influxdb_fdw_post.sql | 10 +- sql/{12.8 => 13.8}/extra/init.sql | 0 sql/{11.13 => 13.8}/extra/insert.sql | 4 +- sql/{11.13 => 13.8}/extra/join.sql | 4 +- sql/{13.4 => 13.8}/extra/limit.sql | 4 +- sql/{13.4 => 13.8}/extra/prepare.sql | 4 +- sql/{12.8 => 13.8}/extra/select.sql | 4 +- sql/{12.8 => 13.8}/extra/select_having.sql | 4 +- sql/{10.18 => 13.8}/influxdb_fdw.sql | 36 +- sql/{12.8 => 13.8}/init.sql | 0 sql/13.8/option.sql | 214 + sql/{12.8 => 13.8}/schemaless/add_fields.sql | 10 +- .../schemaless/add_multi_key.sql | 10 +- sql/{13.4 => 13.8}/schemaless/add_tags.sql | 10 +- sql/{11.13 => 13.8}/schemaless/aggregate.sql | 4 +- .../schemaless/extra/aggregates.sql | 4 +- .../schemaless/extra/influxdb_fdw_post.sql | 21 +- .../schemaless/extra/insert.sql | 4 +- sql/{10.18 => 13.8}/schemaless/extra/join.sql | 10 +- .../schemaless/extra/limit.sql | 4 +- .../schemaless/extra/prepare.sql | 4 +- .../schemaless/extra/select.sql | 4 +- .../schemaless/extra/select_having.sql | 4 +- .../schemaless/influxdb_fdw.sql | 8 +- sql/{12.8 => 13.8}/schemaless/init.sql | 0 sql/{13.4 => 13.8}/schemaless/schemaless.sql | 4 +- sql/{12.8 => 13.8}/schemaless/selectfunc.sql | 4 +- sql/{10.18 => 13.8}/selectfunc.sql | 4 +- sql/14.0/aggregate.sql | 308 - sql/14.0/extra/insert.sql | 685 - sql/14.0/extra/prepare.sql | 159 - sql/14.0/extra/select_having.sql | 93 - sql/14.0/influxdb_fdw.sql | 595 - sql/14.0/schemaless/add_fields.sql | 285 - sql/14.0/schemaless/add_multi_key.sql | 481 - sql/14.0/schemaless/add_tags.sql | 261 - sql/14.0/schemaless/aggregate.sql | 308 - sql/14.0/schemaless/extra/insert.sql | 686 - sql/14.0/schemaless/extra/prepare.sql | 143 - sql/14.0/schemaless/extra/select_having.sql | 93 - sql/14.0/schemaless/influxdb_fdw.sql | 597 - sql/14.0/schemaless/schemaless.sql | 357 - sql/14.0/schemaless/selectfunc.sql | 4049 ------ sql/14.0/selectfunc.sql | 4049 ------ sql/{13.4 => 14.5}/aggregate.sql | 4 +- sql/{14.0 => 14.5}/extra/aggregates.sql | 4 +- .../extra/influxdb_fdw_post.sql | 28 +- sql/{13.4 => 14.5}/extra/init.sql | 0 sql/{13.4 => 14.5}/extra/insert.sql | 4 +- sql/{14.0 => 14.5}/extra/join.sql | 4 +- sql/{14.0 => 14.5}/extra/limit.sql | 4 +- sql/{11.13 => 14.5}/extra/prepare.sql | 72 +- sql/{14.0 => 14.5}/extra/select.sql | 4 +- sql/{13.4 => 14.5}/extra/select_having.sql | 4 +- sql/{13.4 => 14.5}/influxdb_fdw.sql | 36 +- sql/{13.4 => 14.5}/init.sql | 0 sql/14.5/option.sql | 214 + sql/{13.4 => 14.5}/schemaless/add_fields.sql | 10 +- .../schemaless/add_multi_key.sql | 10 +- sql/{11.13 => 14.5}/schemaless/add_tags.sql | 10 +- sql/{13.4 => 14.5}/schemaless/aggregate.sql | 4 +- .../schemaless/extra/aggregates.sql | 4 +- .../schemaless/extra/influxdb_fdw_post.sql | 39 +- .../schemaless/extra/insert.sql | 4 +- sql/{14.0 => 14.5}/schemaless/extra/join.sql | 26 +- sql/{14.0 => 14.5}/schemaless/extra/limit.sql | 4 +- .../schemaless/extra/prepare.sql | 72 +- .../schemaless/extra/select.sql | 4 +- .../schemaless/extra/select_having.sql | 4 +- .../schemaless/influxdb_fdw.sql | 8 +- sql/{13.4 => 14.5}/schemaless/init.sql | 0 sql/{10.18 => 14.5}/schemaless/schemaless.sql | 4 +- sql/{13.4 => 14.5}/schemaless/selectfunc.sql | 4 +- sql/{11.13 => 14.5}/selectfunc.sql | 4 +- sql/15.0/aggregate.sql | 308 + sql/{12.8 => 15.0}/extra/aggregates.sql | 176 +- .../extra/influxdb_fdw_post.sql | 2516 +++- sql/{14.0 => 15.0}/extra/init.sql | 0 sql/15.0/extra/insert.sql | 660 + sql/{13.4 => 15.0}/extra/join.sql | 1137 +- sql/{11.13 => 15.0}/extra/limit.sql | 145 +- sql/15.0/extra/prepare.sql | 159 + sql/{13.4 => 15.0}/extra/select.sql | 169 +- sql/15.0/extra/select_having.sql | 95 + sql/15.0/influxdb_fdw.sql | 625 + sql/{14.0 => 15.0}/init.sql | 0 sql/15.0/option.sql | 214 + sql/15.0/schemaless/add_fields.sql | 289 + sql/15.0/schemaless/add_multi_key.sql | 492 + sql/15.0/schemaless/add_tags.sql | 265 + sql/15.0/schemaless/aggregate.sql | 308 + .../schemaless/extra/aggregates.sql | 204 +- .../schemaless/extra/influxdb_fdw_post.sql | 2585 +++- sql/15.0/schemaless/extra/insert.sql | 690 + sql/15.0/schemaless/extra/join.sql | 3136 +++++ .../schemaless/extra/limit.sql | 145 +- sql/15.0/schemaless/extra/prepare.sql | 143 + .../schemaless/extra/select.sql | 169 +- sql/15.0/schemaless/extra/select_having.sql | 97 + sql/15.0/schemaless/influxdb_fdw.sql | 601 + sql/{14.0 => 15.0}/schemaless/init.sql | 0 sql/15.0/schemaless/schemaless.sql | 357 + sql/15.0/schemaless/selectfunc.sql | 4049 ++++++ sql/15.0/selectfunc.sql | 4049 ++++++ sql/parameters.conf | 4 - sql/parameters_cxx_v1.conf | 18 + sql/parameters_cxx_v2.conf | 18 + sql/parameters_go.conf | 18 + sql/performance/influxdb_performance.sql | 379 + test.sh | 28 +- test_performance.sh | 65 + 382 files changed, 140260 insertions(+), 91048 deletions(-) create mode 100644 connection.cpp create mode 100644 connection.hpp create mode 100644 deps/date/LICENSE.txt create mode 100644 deps/date/README.md create mode 100644 deps/date/include/date/date.h create mode 100644 deps/date/include/date/tz.h create mode 100644 deps/date/include/date/tz_private.h create mode 100644 deps/date/src/tz.cpp delete mode 100644 expected/10.18/aggregate.out delete mode 100644 expected/10.18/extra/aggregates.out delete mode 100644 expected/10.18/extra/influxdb_fdw_post.out delete mode 100644 expected/10.18/extra/join.out delete mode 100644 expected/10.18/influxdb_fdw.out delete mode 100644 expected/10.18/schemaless/add_fields.out delete mode 100644 expected/10.18/schemaless/add_multi_key.out delete mode 100644 expected/10.18/schemaless/aggregate.out delete mode 100644 expected/10.18/schemaless/extra/aggregates.out delete mode 100644 expected/10.18/schemaless/extra/influxdb_fdw_post.out delete mode 100644 expected/10.18/schemaless/extra/join.out delete mode 100644 expected/10.18/schemaless/influxdb_fdw.out delete mode 100644 expected/10.18/schemaless/schemaless.out delete mode 100644 expected/10.18/schemaless/selectfunc.out delete mode 100644 expected/10.18/selectfunc.out rename expected/{14.0 => 11.17}/aggregate.out (99%) rename expected/{11.13 => 11.17}/extra/aggregates.out (99%) rename expected/{11.13 => 11.17}/extra/influxdb_fdw_post.out (99%) rename expected/{12.8 => 11.17}/extra/insert.out (99%) rename expected/{11.13 => 11.17}/extra/join.out (99%) rename expected/{11.13 => 11.17}/extra/limit.out (99%) rename expected/{11.13 => 11.17}/extra/prepare.out (99%) rename expected/{11.13 => 11.17}/extra/select.out (99%) rename expected/{10.18 => 11.17}/extra/select_having.out (96%) rename expected/{11.13 => 11.17}/influxdb_fdw.out (96%) create mode 100644 expected/11.17/option.out rename expected/{11.13 => 11.17}/schemaless/add_fields.out (99%) rename expected/{11.13 => 11.17}/schemaless/add_multi_key.out (99%) rename expected/{10.18 => 11.17}/schemaless/add_tags.out (99%) rename expected/{12.8 => 11.17}/schemaless/aggregate.out (99%) rename expected/{11.13 => 11.17}/schemaless/extra/aggregates.out (99%) rename expected/{11.13 => 11.17}/schemaless/extra/influxdb_fdw_post.out (99%) rename expected/{10.18 => 11.17}/schemaless/extra/insert.out (99%) rename expected/{11.13 => 11.17}/schemaless/extra/join.out (99%) rename expected/{11.13 => 11.17}/schemaless/extra/limit.out (99%) rename expected/{12.8 => 11.17}/schemaless/extra/prepare.out (99%) rename expected/{13.4 => 11.17}/schemaless/extra/select.out (99%) rename expected/{12.8 => 11.17}/schemaless/extra/select_having.out (97%) rename expected/{11.13 => 11.17}/schemaless/influxdb_fdw.out (99%) rename expected/{11.13 => 11.17}/schemaless/schemaless.out (99%) rename expected/{11.13 => 11.17}/schemaless/selectfunc.out (99%) rename expected/{11.13 => 11.17}/selectfunc.out (99%) rename expected/{12.8 => 12.12}/aggregate.out (99%) rename expected/{12.8 => 12.12}/extra/aggregates.out (99%) rename expected/{12.8 => 12.12}/extra/influxdb_fdw_post.out (99%) rename expected/{11.13 => 12.12}/extra/insert.out (99%) rename expected/{12.8 => 12.12}/extra/join.out (99%) rename expected/{10.18 => 12.12}/extra/limit.out (99%) rename expected/{10.18 => 12.12}/extra/prepare.out (99%) rename expected/{12.8 => 12.12}/extra/select.out (99%) rename expected/{12.8 => 12.12}/extra/select_having.out (96%) rename expected/{13.4 => 12.12}/influxdb_fdw.out (96%) create mode 100644 expected/12.12/option.out rename expected/{13.4 => 12.12}/schemaless/add_fields.out (99%) rename expected/{13.4 => 12.12}/schemaless/add_multi_key.out (99%) rename expected/{13.4 => 12.12}/schemaless/add_tags.out (99%) rename expected/{13.4 => 12.12}/schemaless/aggregate.out (99%) rename expected/{12.8 => 12.12}/schemaless/extra/aggregates.out (99%) rename expected/{12.8 => 12.12}/schemaless/extra/influxdb_fdw_post.out (99%) rename expected/{12.8 => 12.12}/schemaless/extra/insert.out (99%) rename expected/{12.8 => 12.12}/schemaless/extra/join.out (99%) rename expected/{12.8 => 12.12}/schemaless/extra/limit.out (99%) rename expected/{10.18 => 12.12}/schemaless/extra/prepare.out (99%) rename expected/{11.13 => 12.12}/schemaless/extra/select.out (99%) rename expected/{10.18 => 12.12}/schemaless/extra/select_having.out (97%) rename expected/{13.4 => 12.12}/schemaless/influxdb_fdw.out (99%) rename expected/{12.8 => 12.12}/schemaless/schemaless.out (99%) rename expected/{13.4 => 12.12}/schemaless/selectfunc.out (99%) rename expected/{12.8 => 12.12}/selectfunc.out (99%) delete mode 100644 expected/12.8/extra/limit.out rename expected/{11.13 => 13.8}/aggregate.out (99%) rename expected/{13.4 => 13.8}/extra/aggregates.out (99%) rename expected/{13.4 => 13.8}/extra/influxdb_fdw_post.out (99%) rename expected/{13.4 => 13.8}/extra/insert.out (99%) rename expected/{13.4 => 13.8}/extra/join.out (99%) rename expected/{13.4 => 13.8}/extra/limit.out (99%) rename expected/{14.0 => 13.8}/extra/prepare.out (99%) rename expected/{13.4 => 13.8}/extra/select.out (99%) rename expected/{11.13 => 13.8}/extra/select_having.out (96%) rename expected/{12.8 => 13.8}/influxdb_fdw.out (96%) create mode 100644 expected/13.8/option.out rename expected/{12.8 => 13.8}/schemaless/add_fields.out (99%) rename expected/{12.8 => 13.8}/schemaless/add_multi_key.out (99%) rename expected/{14.0 => 13.8}/schemaless/add_tags.out (99%) rename expected/{14.0 => 13.8}/schemaless/aggregate.out (99%) rename expected/{13.4 => 13.8}/schemaless/extra/aggregates.out (99%) rename expected/{13.4 => 13.8}/schemaless/extra/influxdb_fdw_post.out (99%) rename expected/{11.13 => 13.8}/schemaless/extra/insert.out (99%) rename expected/{13.4 => 13.8}/schemaless/extra/join.out (99%) rename expected/{13.4 => 13.8}/schemaless/extra/limit.out (99%) rename expected/{14.0 => 13.8}/schemaless/extra/prepare.out (99%) rename expected/{12.8 => 13.8}/schemaless/extra/select.out (99%) rename expected/{13.4 => 13.8}/schemaless/extra/select_having.out (97%) rename expected/{12.8 => 13.8}/schemaless/influxdb_fdw.out (99%) rename expected/{13.4 => 13.8}/schemaless/schemaless.out (99%) rename expected/{12.8 => 13.8}/schemaless/selectfunc.out (99%) rename expected/{13.4 => 13.8}/selectfunc.out (99%) delete mode 100644 expected/14.0/extra/insert.out delete mode 100644 expected/14.0/extra/select_having.out delete mode 100644 expected/14.0/schemaless/extra/insert.out delete mode 100644 expected/14.0/schemaless/extra/select_having.out rename expected/{13.4 => 14.5}/aggregate.out (99%) rename expected/{14.0 => 14.5}/extra/aggregates.out (99%) rename expected/{14.0 => 14.5}/extra/influxdb_fdw_post.out (99%) rename expected/{10.18 => 14.5}/extra/insert.out (99%) rename expected/{14.0 => 14.5}/extra/join.out (99%) rename expected/{14.0 => 14.5}/extra/limit.out (99%) rename expected/{13.4 => 14.5}/extra/prepare.out (99%) rename expected/{14.0 => 14.5}/extra/select.out (99%) rename expected/{13.4 => 14.5}/extra/select_having.out (96%) rename expected/{14.0 => 14.5}/influxdb_fdw.out (96%) create mode 100644 expected/14.5/option.out rename expected/{14.0 => 14.5}/schemaless/add_fields.out (99%) rename expected/{14.0 => 14.5}/schemaless/add_multi_key.out (99%) rename expected/{12.8 => 14.5}/schemaless/add_tags.out (99%) rename expected/{11.13 => 14.5}/schemaless/aggregate.out (99%) rename expected/{14.0 => 14.5}/schemaless/extra/aggregates.out (99%) rename expected/{14.0 => 14.5}/schemaless/extra/influxdb_fdw_post.out (99%) rename expected/{13.4 => 14.5}/schemaless/extra/insert.out (99%) rename expected/{14.0 => 14.5}/schemaless/extra/join.out (99%) rename expected/{14.0 => 14.5}/schemaless/extra/limit.out (99%) rename expected/{13.4 => 14.5}/schemaless/extra/prepare.out (99%) rename expected/{14.0 => 14.5}/schemaless/extra/select.out (99%) rename expected/{11.13 => 14.5}/schemaless/extra/select_having.out (97%) rename expected/{14.0 => 14.5}/schemaless/influxdb_fdw.out (99%) rename expected/{14.0 => 14.5}/schemaless/schemaless.out (99%) rename expected/{14.0 => 14.5}/schemaless/selectfunc.out (99%) rename expected/{14.0 => 14.5}/selectfunc.out (99%) create mode 100644 expected/15.0/aggregate.out create mode 100644 expected/15.0/extra/aggregates.out create mode 100644 expected/15.0/extra/influxdb_fdw_post.out create mode 100644 expected/15.0/extra/insert.out create mode 100644 expected/15.0/extra/join.out create mode 100644 expected/15.0/extra/limit.out rename expected/{12.8 => 15.0}/extra/prepare.out (98%) rename expected/{10.18 => 15.0}/extra/select.out (96%) create mode 100644 expected/15.0/extra/select_having.out create mode 100644 expected/15.0/influxdb_fdw.out create mode 100644 expected/15.0/option.out create mode 100644 expected/15.0/schemaless/add_fields.out create mode 100644 expected/15.0/schemaless/add_multi_key.out rename expected/{11.13 => 15.0}/schemaless/add_tags.out (91%) create mode 100644 expected/15.0/schemaless/aggregate.out create mode 100644 expected/15.0/schemaless/extra/aggregates.out create mode 100644 expected/15.0/schemaless/extra/influxdb_fdw_post.out create mode 100644 expected/15.0/schemaless/extra/insert.out create mode 100644 expected/15.0/schemaless/extra/join.out rename expected/{10.18 => 15.0}/schemaless/extra/limit.out (89%) rename expected/{11.13 => 15.0}/schemaless/extra/prepare.out (99%) rename expected/{10.18 => 15.0}/schemaless/extra/select.out (98%) create mode 100644 expected/15.0/schemaless/extra/select_having.out create mode 100644 expected/15.0/schemaless/influxdb_fdw.out create mode 100644 expected/15.0/schemaless/schemaless.out create mode 100644 expected/15.0/schemaless/selectfunc.out create mode 100644 expected/15.0/selectfunc.out create mode 100644 expected/performance/influxdb_performance.out create mode 100644 init/init_performance.txt create mode 100644 init/option.txt create mode 100755 init_performance.sh create mode 100644 init_v2/agg.txt create mode 100644 init_v2/emp.txt create mode 100644 init_v2/fields_add_1.txt create mode 100644 init_v2/fields_add_20.txt create mode 100644 init_v2/fields_original.txt create mode 100644 init_v2/init.txt create mode 100644 init_v2/init_post.txt create mode 100644 init_v2/join.txt create mode 100644 init_v2/multikey_add_1tag_1field.txt create mode 100644 init_v2/multikey_add_5tag_20field.txt create mode 100644 init_v2/multikey_original.txt create mode 100644 init_v2/onek.txt create mode 100644 init_v2/option.txt create mode 100644 init_v2/others.txt create mode 100644 init_v2/person.txt create mode 100644 init_v2/schemaless.txt create mode 100644 init_v2/select.txt create mode 100644 init_v2/selectfunc.txt create mode 100644 init_v2/streets.txt create mode 100644 init_v2/stud_emp.txt create mode 100644 init_v2/student.txt create mode 100644 init_v2/tag_add_1.txt create mode 100644 init_v2/tag_add_20.txt create mode 100644 init_v2/tag_original.txt create mode 100644 init_v2/tenk.txt create mode 100644 query.cpp create mode 100644 query_cxx.h delete mode 100644 sql/11.13/schemaless/extra/join.sql rename sql/{11.13 => 11.17}/aggregate.sql (98%) rename sql/{11.13 => 11.17}/extra/aggregates.sql (99%) rename sql/{11.13 => 11.17}/extra/influxdb_fdw_post.sql (99%) rename sql/{10.18 => 11.17}/extra/init.sql (100%) rename sql/{10.18 => 11.17}/extra/insert.sql (99%) rename sql/{12.8 => 11.17}/extra/join.sql (99%) rename sql/{10.18 => 11.17}/extra/limit.sql (98%) rename sql/{10.18 => 11.17}/extra/prepare.sql (96%) rename sql/{11.13 => 11.17}/extra/select.sql (98%) rename sql/{10.18 => 11.17}/extra/select_having.sql (95%) rename sql/{11.13 => 11.17}/influxdb_fdw.sql (92%) rename sql/{10.18 => 11.17}/init.sql (100%) create mode 100644 sql/11.17/option.sql rename sql/{10.18 => 11.17}/schemaless/add_fields.sql (99%) rename sql/{11.13 => 11.17}/schemaless/add_multi_key.sql (99%) rename sql/{12.8 => 11.17}/schemaless/add_tags.sql (99%) rename sql/{12.8 => 11.17}/schemaless/aggregate.sql (98%) rename sql/{13.4 => 11.17}/schemaless/extra/aggregates.sql (99%) rename sql/{11.13 => 11.17}/schemaless/extra/influxdb_fdw_post.sql (99%) rename sql/{12.8 => 11.17}/schemaless/extra/insert.sql (99%) rename sql/{13.4 => 11.17}/schemaless/extra/join.sql (99%) rename sql/{12.8 => 11.17}/schemaless/extra/limit.sql (98%) rename sql/{12.8 => 11.17}/schemaless/extra/prepare.sql (96%) rename sql/{12.8 => 11.17}/schemaless/extra/select.sql (99%) rename sql/{10.18 => 11.17}/schemaless/extra/select_having.sql (96%) rename sql/{11.13 => 11.17}/schemaless/influxdb_fdw.sql (99%) rename sql/{10.18 => 11.17}/schemaless/init.sql (100%) rename sql/{12.8 => 11.17}/schemaless/schemaless.sql (99%) rename sql/{10.18 => 11.17}/schemaless/selectfunc.sql (99%) rename sql/{12.8 => 11.17}/selectfunc.sql (99%) rename sql/{12.8 => 12.12}/aggregate.sql (98%) rename sql/{13.4 => 12.12}/extra/aggregates.sql (99%) rename sql/{12.8 => 12.12}/extra/influxdb_fdw_post.sql (99%) rename sql/{11.13 => 12.12}/extra/init.sql (100%) rename sql/{12.8 => 12.12}/extra/insert.sql (99%) rename sql/{10.18 => 12.12}/extra/join.sql (99%) rename sql/{12.8 => 12.12}/extra/limit.sql (98%) rename sql/{12.8 => 12.12}/extra/prepare.sql (96%) rename sql/{10.18 => 12.12}/extra/select.sql (98%) rename sql/{11.13 => 12.12}/extra/select_having.sql (95%) rename sql/{12.8 => 12.12}/influxdb_fdw.sql (92%) rename sql/{11.13 => 12.12}/init.sql (100%) create mode 100644 sql/12.12/option.sql rename sql/{11.13 => 12.12}/schemaless/add_fields.sql (99%) rename sql/{12.8 => 12.12}/schemaless/add_multi_key.sql (99%) rename sql/{10.18 => 12.12}/schemaless/add_tags.sql (99%) rename sql/{10.18 => 12.12}/schemaless/aggregate.sql (98%) rename sql/{12.8 => 12.12}/schemaless/extra/aggregates.sql (99%) rename sql/{12.8 => 12.12}/schemaless/extra/influxdb_fdw_post.sql (99%) rename sql/{10.18 => 12.12}/schemaless/extra/insert.sql (99%) rename sql/{12.8 => 12.12}/schemaless/extra/join.sql (99%) rename sql/{13.4 => 12.12}/schemaless/extra/limit.sql (98%) rename sql/{13.4 => 12.12}/schemaless/extra/prepare.sql (96%) rename sql/{13.4 => 12.12}/schemaless/extra/select.sql (99%) rename sql/{11.13 => 12.12}/schemaless/extra/select_having.sql (96%) rename sql/{12.8 => 12.12}/schemaless/influxdb_fdw.sql (99%) rename sql/{11.13 => 12.12}/schemaless/init.sql (100%) rename sql/{11.13 => 12.12}/schemaless/schemaless.sql (99%) rename sql/{11.13 => 12.12}/schemaless/selectfunc.sql (99%) rename sql/{13.4 => 12.12}/selectfunc.sql (99%) rename sql/{10.18 => 13.8}/aggregate.sql (98%) rename sql/{10.18 => 13.8}/extra/aggregates.sql (99%) rename sql/{10.18 => 13.8}/extra/influxdb_fdw_post.sql (99%) rename sql/{12.8 => 13.8}/extra/init.sql (100%) rename sql/{11.13 => 13.8}/extra/insert.sql (99%) rename sql/{11.13 => 13.8}/extra/join.sql (99%) rename sql/{13.4 => 13.8}/extra/limit.sql (98%) rename sql/{13.4 => 13.8}/extra/prepare.sql (96%) rename sql/{12.8 => 13.8}/extra/select.sql (98%) rename sql/{12.8 => 13.8}/extra/select_having.sql (95%) rename sql/{10.18 => 13.8}/influxdb_fdw.sql (92%) rename sql/{12.8 => 13.8}/init.sql (100%) create mode 100644 sql/13.8/option.sql rename sql/{12.8 => 13.8}/schemaless/add_fields.sql (99%) rename sql/{10.18 => 13.8}/schemaless/add_multi_key.sql (99%) rename sql/{13.4 => 13.8}/schemaless/add_tags.sql (99%) rename sql/{11.13 => 13.8}/schemaless/aggregate.sql (98%) rename sql/{11.13 => 13.8}/schemaless/extra/aggregates.sql (99%) rename sql/{10.18 => 13.8}/schemaless/extra/influxdb_fdw_post.sql (99%) rename sql/{13.4 => 13.8}/schemaless/extra/insert.sql (99%) rename sql/{10.18 => 13.8}/schemaless/extra/join.sql (99%) rename sql/{10.18 => 13.8}/schemaless/extra/limit.sql (98%) rename sql/{10.18 => 13.8}/schemaless/extra/prepare.sql (96%) rename sql/{11.13 => 13.8}/schemaless/extra/select.sql (99%) rename sql/{12.8 => 13.8}/schemaless/extra/select_having.sql (96%) rename sql/{13.4 => 13.8}/schemaless/influxdb_fdw.sql (99%) rename sql/{12.8 => 13.8}/schemaless/init.sql (100%) rename sql/{13.4 => 13.8}/schemaless/schemaless.sql (99%) rename sql/{12.8 => 13.8}/schemaless/selectfunc.sql (99%) rename sql/{10.18 => 13.8}/selectfunc.sql (99%) delete mode 100644 sql/14.0/aggregate.sql delete mode 100644 sql/14.0/extra/insert.sql delete mode 100644 sql/14.0/extra/prepare.sql delete mode 100644 sql/14.0/extra/select_having.sql delete mode 100644 sql/14.0/influxdb_fdw.sql delete mode 100644 sql/14.0/schemaless/add_fields.sql delete mode 100644 sql/14.0/schemaless/add_multi_key.sql delete mode 100644 sql/14.0/schemaless/add_tags.sql delete mode 100644 sql/14.0/schemaless/aggregate.sql delete mode 100644 sql/14.0/schemaless/extra/insert.sql delete mode 100644 sql/14.0/schemaless/extra/prepare.sql delete mode 100644 sql/14.0/schemaless/extra/select_having.sql delete mode 100644 sql/14.0/schemaless/influxdb_fdw.sql delete mode 100644 sql/14.0/schemaless/schemaless.sql delete mode 100644 sql/14.0/schemaless/selectfunc.sql delete mode 100644 sql/14.0/selectfunc.sql rename sql/{13.4 => 14.5}/aggregate.sql (98%) rename sql/{14.0 => 14.5}/extra/aggregates.sql (99%) rename sql/{14.0 => 14.5}/extra/influxdb_fdw_post.sql (99%) rename sql/{13.4 => 14.5}/extra/init.sql (100%) rename sql/{13.4 => 14.5}/extra/insert.sql (99%) rename sql/{14.0 => 14.5}/extra/join.sql (99%) rename sql/{14.0 => 14.5}/extra/limit.sql (98%) rename sql/{11.13 => 14.5}/extra/prepare.sql (96%) rename sql/{14.0 => 14.5}/extra/select.sql (98%) rename sql/{13.4 => 14.5}/extra/select_having.sql (95%) rename sql/{13.4 => 14.5}/influxdb_fdw.sql (92%) rename sql/{13.4 => 14.5}/init.sql (100%) create mode 100644 sql/14.5/option.sql rename sql/{13.4 => 14.5}/schemaless/add_fields.sql (99%) rename sql/{13.4 => 14.5}/schemaless/add_multi_key.sql (99%) rename sql/{11.13 => 14.5}/schemaless/add_tags.sql (99%) rename sql/{13.4 => 14.5}/schemaless/aggregate.sql (98%) rename sql/{14.0 => 14.5}/schemaless/extra/aggregates.sql (99%) rename sql/{14.0 => 14.5}/schemaless/extra/influxdb_fdw_post.sql (99%) rename sql/{11.13 => 14.5}/schemaless/extra/insert.sql (99%) rename sql/{14.0 => 14.5}/schemaless/extra/join.sql (99%) rename sql/{14.0 => 14.5}/schemaless/extra/limit.sql (98%) rename sql/{11.13 => 14.5}/schemaless/extra/prepare.sql (96%) rename sql/{14.0 => 14.5}/schemaless/extra/select.sql (99%) rename sql/{13.4 => 14.5}/schemaless/extra/select_having.sql (96%) rename sql/{10.18 => 14.5}/schemaless/influxdb_fdw.sql (99%) rename sql/{13.4 => 14.5}/schemaless/init.sql (100%) rename sql/{10.18 => 14.5}/schemaless/schemaless.sql (99%) rename sql/{13.4 => 14.5}/schemaless/selectfunc.sql (99%) rename sql/{11.13 => 14.5}/selectfunc.sql (99%) create mode 100644 sql/15.0/aggregate.sql rename sql/{12.8 => 15.0}/extra/aggregates.sql (97%) rename sql/{13.4 => 15.0}/extra/influxdb_fdw_post.sql (72%) rename sql/{14.0 => 15.0}/extra/init.sql (100%) create mode 100644 sql/15.0/extra/insert.sql rename sql/{13.4 => 15.0}/extra/join.sql (95%) rename sql/{11.13 => 15.0}/extra/limit.sql (97%) create mode 100644 sql/15.0/extra/prepare.sql rename sql/{13.4 => 15.0}/extra/select.sql (94%) create mode 100644 sql/15.0/extra/select_having.sql create mode 100644 sql/15.0/influxdb_fdw.sql rename sql/{14.0 => 15.0}/init.sql (100%) create mode 100644 sql/15.0/option.sql create mode 100644 sql/15.0/schemaless/add_fields.sql create mode 100644 sql/15.0/schemaless/add_multi_key.sql create mode 100644 sql/15.0/schemaless/add_tags.sql create mode 100644 sql/15.0/schemaless/aggregate.sql rename sql/{10.18 => 15.0}/schemaless/extra/aggregates.sql (96%) rename sql/{13.4 => 15.0}/schemaless/extra/influxdb_fdw_post.sql (77%) create mode 100644 sql/15.0/schemaless/extra/insert.sql create mode 100644 sql/15.0/schemaless/extra/join.sql rename sql/{11.13 => 15.0}/schemaless/extra/limit.sql (97%) create mode 100644 sql/15.0/schemaless/extra/prepare.sql rename sql/{10.18 => 15.0}/schemaless/extra/select.sql (95%) create mode 100644 sql/15.0/schemaless/extra/select_having.sql create mode 100644 sql/15.0/schemaless/influxdb_fdw.sql rename sql/{14.0 => 15.0}/schemaless/init.sql (100%) create mode 100644 sql/15.0/schemaless/schemaless.sql create mode 100644 sql/15.0/schemaless/selectfunc.sql create mode 100644 sql/15.0/selectfunc.sql delete mode 100644 sql/parameters.conf create mode 100644 sql/parameters_cxx_v1.conf create mode 100644 sql/parameters_cxx_v2.conf create mode 100644 sql/parameters_go.conf create mode 100644 sql/performance/influxdb_performance.sql create mode 100755 test_performance.sh diff --git a/LICENSE b/LICENSE index fb73319..1be6947 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ InfluxDB Foreign Data Wrapper for PostgreSQL -Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION -Portions Copyright (c) 2011-2016, EnterpriseDB Corporation +Copyright (c) 2018, TOSHIBA CORPORATION +Copyright (c) 2011-2016, EnterpriseDB Corporation Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is diff --git a/Makefile b/Makefile index 4d79b1b..c321771 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # # InfluxDB Foreign Data Wrapper for PostgreSQL # -# Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION +# Portions Copyright (c) 2018-2022, TOSHIBA CORPORATION # # IDENTIFICATION # Makefile @@ -10,7 +10,39 @@ ########################################################################## MODULE_big = influxdb_fdw -OBJS = option.o slvars.o deparse.o influxdb_query.o influxdb_fdw.o query.a +OBJS = option.o slvars.o deparse.o influxdb_query.o influxdb_fdw.o + +ifndef GO_CLIENT +ifndef CXX_CLIENT +GO_CLIENT = 1 +endif +endif + +ifdef CXX_CLIENT +# remove C interface of GO client +$(shell rm -rf ./_obj) +$(shell rm -f ./query.h) + +# HowardHinnant date library source dir +DATE_LIB = -I./deps/date/include + +OBJS += query.o tz.o connection.o +PG_CPPFLAGS += -DCXX_CLIENT $(DATE_LIB) +SHLIB_LINK = -lm -lstdc++ -lInfluxDB + +# query.cpp requires C++ 17. +override PG_CXXFLAGS += -std=c++17 + +# override PG_CXXFLAGS and PG_CFLAGS +ifdef CCFLAGS + override PG_CXXFLAGS += $(CCFLAGS) + override PG_CFLAGS += $(CCFLAGS) +endif #!CCFLAGS + +else +PG_CPPFLAGS += -DGO_CLIENT +OBJS += query.a +endif #!CXX_CLIENT EXTENSION = influxdb_fdw DATA = influxdb_fdw--1.0.sql influxdb_fdw--1.1.sql influxdb_fdw--1.1--1.2.sql influxdb_fdw--1.2.sql influxdb_fdw--1.3.sql @@ -43,8 +75,8 @@ MAJORVERSION := $(basename $(VERSION)) endif endif -ifeq (,$(findstring $(MAJORVERSION), 10 11 12 13 14)) -$(error PostgreSQL 10, 11, 12, 13 or 14 is required to compile this extension) +ifeq (,$(findstring $(MAJORVERSION), 11 12 13 14 15)) +$(error PostgreSQL 11, 12, 13, 14 or 15 is required to compile this extension) endif ifdef REGRESS_PREFIX @@ -58,8 +90,35 @@ $(shell mkdir -p results/$(REGRESS_PREFIX_SUB)/extra) $(shell mkdir -p results/$(REGRESS_PREFIX_SUB)/schemaless) $(shell mkdir -p results/$(REGRESS_PREFIX_SUB)/schemaless/extra) +ifdef GO_CLIENT query.a: query.go go build -buildmode=c-archive query.go $(OBJS): _obj/_cgo_export.h _obj/_cgo_export.h: query.go go tool cgo query.go +endif #!GO_CLIENT + +ifdef CXX_CLIENT +# PostgreSQL uses link time optimization option which may break compilation +# (this happens on travis-ci). Redefine COMPILE.cxx.bc without this option. +COMPILE.cxx.bc = $(CLANG) -xc++ -Wno-ignored-attributes $(BITCODE_CXXFLAGS) $(CPPFLAGS) -emit-llvm -c + +# A hurdle to use common compiler flags when building bytecode from C++ +# files. should be not unnecessary, but src/Makefile.global omits passing those +# flags for an unnknown reason. +%.bc : %.cpp + $(COMPILE.cxx.bc) $(CXXFLAGS) $(CPPFLAGS) -o $@ $< + +# Using OS timezone data base for date library +DATE_DEF = -DUSE_OS_TZDB +CURL_LIB = -lcurl + +tz.o: deps/date/src/tz.cpp + g++ -fPIC $(PG_CXXFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(DATE_LIB) -I. $(CURL_LIB) $(DATE_DEF) -c $< + +.PHONY: clean +clean: deps_clean +# clean deps object +deps_clean: + rm -f ./tz.o +endif #!CXX_CLIENT diff --git a/README.md b/README.md index 64bc63e..f1fccf7 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,60 @@ # InfluxDB Foreign Data Wrapper for PostgreSQL -This PostgreSQL extension is a Foreign Data Wrapper (FDW) for InfluxDB (version 1.x series). +This PostgreSQL extension is a Foreign Data Wrapper (FDW) for InfluxDB. -The current version can work with PostgreSQL 10, 11, 12, 13 and 14. +The current version can work with PostgreSQL 11, 12, 13, 14, 15 and confirmed with: + - InfluxDB 1.8: with either [influxdb1-go](#install-influxdb-go-client-library) client or [influxdb-cxx](#install-influxdb_cxx-client-library) client. + - InfluxDB 2.2: with [influxdb-cxx](#install-influxdb_cxx-client-library) client via InfluxDB v1 compatibility API. -Go version should be 1.10.4 or later. ## Installation -Install InfluxDB Go client library +Influxdb_fdw supports 2 different client: Go client and Influxdb_cxx client. The installation for each kind of client is described as below. +### Install InfluxDB Go client library +Go version should be 1.10.4 or later.
 go get github.com/influxdata/influxdb1-client/v2
 
+To use Go client, use GO_CLIENT=1 flag when compile the source code + +### Install Influxdb_cxx client library +Get source code from [`influxdb-cxx github repository`](https://github.com/pgspider/influxdb-cxx) and install as manual: +``` +git clone https://github.com/pgspider/influxdb-cxx +cd influxdb-cxx +cmake .. -DINFLUXCXX_WITH_BOOST=OFF -DINFLUXCXX_TESTING=OFF +sudo make install +``` + +Update LD_LIBRARY_PATH follow the installation folder of Influxdb_cxx client +To use Influxdb_cxx, use CXX_CLIENT=1 flag when compile the source code. It is required to use gcc version 7 to build influxdb_fdw with influxdb_cxx client. + +### Compile source code and install Add a directory of pg_config to PATH and build and install influxdb_fdw. + +Using Go client +
+make USE_PGXS=1 with_llvm=no GO_CLIENT=1
+make install USE_PGXS=1 with_llvm=no GO_CLIENT=1
+
+ +Using Influxdb_cxx client
-make USE_PGXS=1 with_llvm=no
-make install USE_PGXS=1 with_llvm=no
+make USE_PGXS=1 with_llvm=no CXX_CLIENT=1
+make install USE_PGXS=1 with_llvm=no CXX_CLIENT=1
 
with_llvm=no is necessary to disable llvm bit code generation when PostgreSQL is configured with --with-llvm because influxdb_fdw use go code and cannot be compiled to llvm bit code. If you want to build influxdb_fdw in a source tree of PostgreSQL instead, use + +Using Go client
-make with_llvm=no
-make install  with_llvm=no
+make with_llvm=no GO_CLIENT=1
+make install  with_llvm=no GO_CLIENT=1
+
+ +Using Influxdb_cxx client +
+make with_llvm=no CXX_CLIENT=1
+make install  with_llvm=no CXX_CLIENT=1
 
## Usage @@ -30,15 +64,37 @@ CREATE EXTENSION influxdb_fdw; ### Create server +#### Go Client connect to InfluxDB ver 1.x
 CREATE SERVER influxdb_server FOREIGN DATA WRAPPER influxdb_fdw OPTIONS
 (dbname 'mydb', host 'http://localhost', port '8086') ;
 
+#### Influxdb_cxx Client connect to InfluxDB ver 1.x +
+CREATE SERVER influxdb_server FOREIGN DATA WRAPPER influxdb_fdw OPTIONS
+(dbname 'mydb', host 'http://localhost', port '8086', version '1') ;
+
+#### Influxdb_cxx Client connect to InfluxDB ver 2.x +
+CREATE SERVER influxdb_server FOREIGN DATA WRAPPER influxdb_fdw OPTIONS
+(dbname 'mydb', host 'http://localhost', port '8086', version '2', retention_policy '') ;
+
+ ### Create user mapping +#### Go Client connect to InfluxDB ver 1.x +
+CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_server OPTIONS(user 'user', password 'pass');
+
+#### Influxdb_cxx Client connect to InfluxDB ver 1.x
 CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_server OPTIONS(user 'user', password 'pass');
 
+#### Influxdb_cxx Client connect to InfluxDB ver 2.x +
+CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_server OPTIONS(auth_token 'token');
+
+ ### Create foreign table You need to declare a column named "time" to access InfluxDB time column. @@ -55,6 +111,16 @@ CREATE FOREIGN TABLE t2(tag1 text, field1 integer, tag2 text, field2 integer) SE IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_server INTO public; +Following options are supported: +* **host** - the address used to connect to InfluxDB server. +* **port** - the port used to connect to InfluxDB server. +* **dbname** - target database name +* **retention_policy** - retention policy of target database (default empty ``). +* **user** - username for V1 basic authentication. +* **password** - password for V1 basic authentication. +* **auth_token** - token for V2 Token authentication. +* **version** - InfluxDB server version which to connect to (Only `1` or `2`). If not, InfluxDB FDW will try to connect to InfluxDB V2 first. If unsuccessful, it will try to connect to InfluxDB V1. If it is still unsuccessful, error will be raised. + ### Access foreign table
 SELECT * FROM t1;
@@ -241,6 +307,8 @@ For examples:
 - InfluxDB FDW supports bulk INSERT by using batch_size option from PostgreSQL version 14 or later.
 - WHERE clauses including timestamp, interval and `now()` functions are pushed down.
 - LIMIT...OFFSET clauses are pushed down when there is LIMIT clause only or both LIMIT and OFFSET.
+- Support pushdown DISTINCT argument for only count clause. +- Support pushdown ANY ARRAY. ## Limitations - UPDATE is not supported. @@ -316,12 +384,16 @@ For example: - `fields, sqrt((fields->>'c1')::int)`: function `sqrt()` is not pushed down. - `fields->>'c2', sqrt((fields->>'c1')::int)`: there is no fields jsonb column, so function `sqrt()` is pushed down. +## Notes +- InfluxDB FDW does not return an error even if it is overflow. +- EXP function of InfluxDB may return different precision number in different PC. + ## Contributing Opening issues and pull requests on GitHub are welcome. ## License -Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION -Portions Copyright (c) 2011-2016, EnterpriseDB Corporation +Copyright (c) 2018, TOSHIBA CORPORATION +Copyright (c) 2011-2016, EnterpriseDB Corporation Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. diff --git a/connection.cpp b/connection.cpp new file mode 100644 index 0000000..65b52cd --- /dev/null +++ b/connection.cpp @@ -0,0 +1,282 @@ +/*------------------------------------------------------------------------- + * + * connection.cpp + * Connection management functions for influxdb_fdw cxx-client + * + * Portions Copyright (c) 2023, TOSHIBA CORPORATION + * + * IDENTIFICATION + * contrib/influxdb_fdw/connection.cpp + * + *------------------------------------------------------------------------- + */ +extern "C" +{ +#include "postgres.h" +#include "access/htup_details.h" +#include "catalog/pg_user_mapping.h" +#include "commands/defrem.h" +#include "mb/pg_wchar.h" +#include "miscadmin.h" +#include "storage/fd.h" +#include "storage/latch.h" +#include "utils/hsearch.h" +#include "utils/inval.h" +#include "utils/memutils.h" +#include "utils/syscache.h" +} + +#include "connection.hpp" + +/* + * Connection cache hash table entry + * + * The lookup key in this hash table is the user mapping OID. We use just one + * connection per user mapping ID, which ensures that all the scans use the + * same snapshot during a query. Using the user mapping OID rather than + * the foreign server OID + user OID avoids creating multiple connections when + * the public user mapping applies to all user OIDs. + * + * The "conn" pointer can be NULL if we don't currently have a live connection. + * When we do have a connection, xact_depth tracks the current depth of + * transactions and subtransactions open on the remote side. We need to issue + * commands at the same nesting depth on the remote as we're executing at + * ourselves, so that rolling back a subtransaction will kill the right + * queries and not the wrong ones. + */ +typedef Oid ConnCacheKey; + +typedef struct ConnCacheEntry +{ + ConnCacheKey key; /* hash key (must be first) */ + influxdb::InfluxDB *conn; /* connection to foreign server, or nullptr */ + bool invalidated; /* true if reconnect is pending */ + uint32 server_hashvalue; /* hash value of foreign server OID */ + uint32 mapping_hashvalue; /* hash value of user mapping OID */ +} ConnCacheEntry; + +/* + * Connection cache (initialized on first use) + */ +static HTAB *ConnectionHash = NULL; + +/* prototypes of private functions */ +static void influx_make_new_connection(ConnCacheEntry *entry, UserMapping *user, influxdb_opt *options); +static std::unique_ptr influx_connect_server(influxdb_opt *options); +static void influx_disconnect_server(ConnCacheEntry *entry); +static void influx_inval_callback(Datum arg, int cacheid, uint32 hashvalue); + +/* + * influxdb_get_connection + * + * Get a connection which can be used to execute queries on + * the remote InfluxDB with the user's authorization. A new connection + * is established if we don't already have a suitable one. + */ +influxdb::InfluxDB * +influxdb_get_connection(UserMapping *user, influxdb_opt *options) +{ + bool found; + ConnCacheEntry *entry; + ConnCacheKey key; + + /* First time through, initialize connection cache hashtable */ + if (ConnectionHash == NULL) + { + HASHCTL ctl; + + ctl.keysize = sizeof(ConnCacheKey); + ctl.entrysize = sizeof(ConnCacheEntry); + ConnectionHash = hash_create("influxdb_fdw cxx client connections", 8, + &ctl, + HASH_ELEM | HASH_BLOBS); + + /* + * Register some callback functions that manage connection cleanup. + * This should be done just once in each backend. + */ + CacheRegisterSyscacheCallback(FOREIGNSERVEROID, + influx_inval_callback, (Datum) 0); + CacheRegisterSyscacheCallback(USERMAPPINGOID, + influx_inval_callback, (Datum) 0); + } + + /* Create hash key for the entry. Assume no pad bytes in key struct */ + key = user->umid; + + /* + * Find or create cached entry for requested connection. + */ + entry = (ConnCacheEntry *)hash_search(ConnectionHash, &key, HASH_ENTER, &found); + if (!found) + { + /* + * We need only clear "conn" here; remaining fields will be filled + * later when "conn" is set. + */ + entry->conn = NULL; + } + + /* + * If the connection needs to be remade due to invalidation, disconnect it. + */ + if (entry->conn != NULL && entry->invalidated) + { + elog(DEBUG3, "influxdb_fdw: closing connection %p for option changes to take effect", + entry->conn); + influx_disconnect_server(entry); + } + + /* + * If cache entry doesn't have a connection, we have to establish a new + * connection. (If influx_connect_server throws an error, the cache entry + * will remain in a valid empty state, ie conn == NULL.) + */ + if (entry->conn == NULL) + influx_make_new_connection(entry, user, options); + + return entry->conn; +} + +/* + * Reset all transient state fields in the cached connection entry and + * establish new connection to the remote server. + */ +static void +influx_make_new_connection(ConnCacheEntry *entry, UserMapping *user, influxdb_opt *opts) +{ + ForeignServer *server = GetForeignServer(user->serverid); + + Assert(entry->conn == NULL); + + /* Reset all transient state fields, to be sure all are clean */ + entry->invalidated = false; + entry->server_hashvalue = + GetSysCacheHashValue1(FOREIGNSERVEROID, + ObjectIdGetDatum(server->serverid)); + entry->mapping_hashvalue = + GetSysCacheHashValue1(USERMAPPINGOID, + ObjectIdGetDatum(user->umid)); + + /* Now try to make the connection */ + entry->conn = influx_connect_server(opts).release(); + + elog(DEBUG3, "influxdb_fdw: new InfluxDB connection %p for server \"%s\" (user mapping oid %u, userid %u)", + entry->conn, server->servername, user->umid, user->userid); +} + +/* Provides InfluxDB client which can connect to InfluxDB server */ +std::unique_ptr +create_influxDB_client(char* addr, int port, char* user, char* pass, char* db, int version, char* auth_token, char* retention_policy) +{ + auto influx = [&]() -> std::unique_ptr + { + if (version == INFLUXDB_VERSION_2) + return influxdb::InfluxDBFactory::GetV2(std::string(addr), port, std::string(db), std::string(auth_token), std::string(retention_policy)); + else + return influxdb::InfluxDBFactory::GetV1(std::string(addr), port, std::string(db), std::string(user), std::string(pass)); + }(); + + if (!influx) + elog(ERROR, "influxdb_fdw: fail to create influxDB client"); + + return influx; +} + +/* + * Connect to remote server using specified server and user mapping properties. + */ +static std::unique_ptr +influx_connect_server(influxdb_opt *opts) +{ + return create_influxDB_client(opts->svr_address, opts->svr_port, opts->svr_username, opts->svr_password, + opts->svr_database, opts->svr_version, opts->svr_token, opts->svr_retention_policy); +} + +/* + * Disconnect any open connection for a connection cache entry. + */ +static void +influx_disconnect_server(ConnCacheEntry *entry) +{ + if (entry && entry->conn != NULL) + { + delete entry->conn; + entry->conn = NULL; + } +} + +/* + * Connection invalidation callback function + * + * After a change to a pg_foreign_server or pg_user_mapping catalog entry, + * close connections depending on that entry immediately if current transaction + * has not used those connections yet. Otherwise, mark those connections as + * invalid and then closed connections will be remade at the next opportunity if + * necessary. + * + * Although most cache invalidation callbacks blow away all the related stuff + * regardless of the given hashvalue, connections are expensive enough that + * it's worth trying to avoid that. + * + * NB: We could avoid unnecessary disconnection more strictly by examining + * individual option values, but it seems too much effort for the gain. + */ +static void +influx_inval_callback(Datum arg, int cacheid, uint32 hashvalue) +{ + HASH_SEQ_STATUS scan; + ConnCacheEntry *entry; + + Assert(cacheid == FOREIGNSERVEROID || cacheid == USERMAPPINGOID); + + /* ConnectionHash must exist already, if we're registered */ + hash_seq_init(&scan, ConnectionHash); + while ((entry = (ConnCacheEntry *) hash_seq_search(&scan))) + { + /* Ignore invalid entries */ + if (entry->conn == nullptr) + continue; + + /* hashvalue == 0 means a cache reset, must clear all state */ + if (hashvalue == 0 || + (cacheid == FOREIGNSERVEROID && + entry->server_hashvalue == hashvalue) || + (cacheid == USERMAPPINGOID && + entry->mapping_hashvalue == hashvalue)) + { + /* + * Close the connection immediately if it's not used yet in this + * transaction. Otherwise mark it as invalid so that + * pgfdw_xact_callback() can close it at the end of this + * transaction. + */ + entry->invalidated = true; + elog(DEBUG3, "influxdb_fdw: discarding connection %p", entry->conn); + influx_disconnect_server(entry); + } + } +} + +/* + * influx_cleanup_connection: + * Delete all the cache entries on backend exists. + */ +void +influx_cleanup_connection(void) +{ + HASH_SEQ_STATUS scan; + ConnCacheEntry *entry; + + if (ConnectionHash == NULL) + return; + + hash_seq_init(&scan, ConnectionHash); + while ((entry = (ConnCacheEntry *) hash_seq_search(&scan))) + { + if (entry->conn == NULL) + continue; + + influx_disconnect_server(entry); + } +} diff --git a/connection.hpp b/connection.hpp new file mode 100644 index 0000000..0baef40 --- /dev/null +++ b/connection.hpp @@ -0,0 +1,27 @@ +/*------------------------------------------------------------------------- + * + * InfluxDB Foreign Data Wrapper for PostgreSQL + * + * Portions Copyright (c) 2023, TOSHIBA CORPORATION + * + * IDENTIFICATION + * connection.hpp + * + *------------------------------------------------------------------------- + */ + +#ifndef CONNECTION_HPP +#define CONNECTION_HPP + +extern "C" +{ +#include "influxdb_fdw.h" +} + +#include +#include + +extern influxdb::InfluxDB *influxdb_get_connection(UserMapping *user, influxdb_opt *options); +extern std::unique_ptr create_influxDB_client(char* addr, int port, char* user, char* pass, char* db, int version, char* auth_token, char* retention_policy); +extern void influx_cleanup_connection(void); +#endif /* CONNECTION_HPP */ \ No newline at end of file diff --git a/deparse.c b/deparse.c index 0038cee..1871e96 100644 --- a/deparse.c +++ b/deparse.c @@ -2,7 +2,7 @@ * * InfluxDB Foreign Data Wrapper for PostgreSQL * - * Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION + * Portions Copyright (c) 2018, TOSHIBA CORPORATION * * IDENTIFICATION * deparse.c @@ -544,10 +544,15 @@ influxdb_foreign_expr_walker(Node *node, if (c->consttype == INTERVALOID) { Interval *interval = DatumGetIntervalP(c->constvalue); +#if (PG_VERSION_NUM >= 150000) + struct pg_itm tm; + interval2itm(*interval, &tm); +#else struct pg_tm tm; fsec_t fsec; interval2tm(*interval, &tm, &fsec); +#endif /* * Not pushdown interval with month or year because @@ -2304,15 +2309,11 @@ influxdb_deparse_var(Var *node, deparse_expr_cxt *context) /* if (node->varno == context->foreignrel->relid && */ /* node->varlevelsup == 0) */ { - InfluxDBFdwRelationInfo *fpinfo = (InfluxDBFdwRelationInfo *) context->foreignrel->fdw_private; - bool convert = true; - - /* - * Var with BOOLOID type should be deparsed without conversion in - * target list. - */ - if (context->is_tlist && fpinfo->is_tlist_func_pushdown) - convert = false; + bool convert = context->has_bool_cmp; /* Boolean Var should be + * deparsed with + * conversion only when + * there is boolean + * comparison */ /* Var belongs to foreign table */ influxdb_deparse_column_ref(buf, node->varno, node->varattno, node->vartype, context->root, convert, &context->can_delete_directly); @@ -2444,16 +2445,25 @@ influxdb_deparse_const(Const *node, deparse_expr_cxt *context, int showtype) case INTERVALOID: { Interval *interval = DatumGetIntervalP(node->constvalue); +#if (PG_VERSION_NUM >= 150000) + struct pg_itm tm; + + interval2itm(*interval, &tm); +#else struct pg_tm tm; fsec_t fsec; interval2tm(*interval, &tm, &fsec); +#endif +#if (PG_VERSION_NUM >= 150000) + appendStringInfo(buf, "%dd%ldh%dm%ds%du", tm.tm_mday, tm.tm_hour, + tm.tm_min, tm.tm_sec, tm.tm_usec +#else appendStringInfo(buf, "%dd%dh%dm%ds%du", tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, fsec +#endif ); - - break; } default: @@ -3023,7 +3033,7 @@ influxdb_deparse_scalar_array_op_expr(ScalarArrayOpExpr *node, deparse_expr_cxt /* Remove '\"' and process the next character. */ if (ch == '\"' && !isEscape) { - inString = ~inString; + inString = !inString; continue; } /* Add escape character '\'' for '\'' */ @@ -3252,7 +3262,11 @@ influxdb_print_remote_placeholder(Oid paramtype, int32 paramtypmod, bool influxdb_is_builtin(Oid oid) { +#if (PG_VERSION_NUM >= 120000) + return (oid < FirstGenbkiObjectId); +#else return (oid < FirstBootstrapObjectId); +#endif } bool diff --git a/deps/date/LICENSE.txt b/deps/date/LICENSE.txt new file mode 100644 index 0000000..79ea069 --- /dev/null +++ b/deps/date/LICENSE.txt @@ -0,0 +1,31 @@ +The source code in this project is released using the MIT License. There is no +global license for the project because each file is licensed individually with +different author names and/or dates. + +If you contribute to this project, please add your name to the license of each +file you modify. If you have already contributed to this project and forgot to +add your name to the license, please feel free to submit a new P/R to add your +name to the license in each file you modified. + +For convenience, here is a copy of the MIT license found in each file except +without author names or dates: + +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/deps/date/README.md b/deps/date/README.md new file mode 100644 index 0000000..7ef280f --- /dev/null +++ b/deps/date/README.md @@ -0,0 +1,84 @@ +# Date + +[![Build Status](https://travis-ci.org/HowardHinnant/date.svg?branch=master)](https://travis-ci.org/HowardHinnant/date) +[![Join the chat at https://gitter.im/HowardHinnant/date](https://badges.gitter.im/HowardHinnant/date.svg)](https://gitter.im/HowardHinnant/date?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +--- + +**[Try it out on wandbox!](https://wandbox.org/permlink/oyXjibyF680HHoyS)** + +## Summary + +This is actually several separate C++11/C++14/C++17 libraries: + +1. `"date.h"` is a header-only library which builds upon ``. It adds some new `duration` types, and new `time_point` types. It also adds "field" types such as `year_month_day` which is a struct `{year, month, day}`. And it provides convenient means to convert between the "field" types and the `time_point` types. + + * Documentation: http://howardhinnant.github.io/date/date.html + * Video: https://www.youtube.com/watch?v=tzyGjOm8AKo + * Slides: http://schd.ws/hosted_files/cppcon2015/43/hinnant_dates.pdf + +1. `"tz.h"` / `"tz.cpp"` are a timezone library built on top of the `"date.h"` library. This timezone library is a complete parser of the IANA timezone database. It provides for an easy way to access all of the data in this database, using the types from `"date.h"` and ``. The IANA database also includes data on leap seconds, and this library provides utilities to compute with that information as well. + + * Documentation: http://howardhinnant.github.io/date/tz.html + * Video: https://www.youtube.com/watch?v=Vwd3pduVGKY + * Slides: http://schd.ws/hosted_files/cppcon2016/0f/Welcome%20To%20The%20Time%20Zone%20-%20Howard%20Hinnant%20-%20CppCon%202016.pdf + +1. `"iso_week.h"` is a header-only library built on top of the `"date.h"` library which implements the ISO week date calendar. + + * Documentation: http://howardhinnant.github.io/date/iso_week.html + +1. `"julian.h"` is a header-only library built on top of the `"date.h"` library which implements a proleptic Julian calendar which is fully interoperable with everything above. + + * Documentation: http://howardhinnant.github.io/date/julian.html + +1. `"islamic.h"` is a header-only library built on top of the `"date.h"` library which implements a proleptic Islamic calendar which is fully interoperable with everything above. + + * Documentation: http://howardhinnant.github.io/date/islamic.html + +## Standardization + +Slightly modified versions of `"date.h"` and `"tz.h"` were voted into the C++20 working draft at the Jacksonville FL meeting on 2018-03-17: + +* http://howardhinnant.github.io/date/d0355r7.html + +## Build & Test + +The recommended way to use any of these libraries besides `"tz.h"` is to just include it. These are header-only libraries (except `"tz.h"`). + +To use `"tz.h"`, there is a single source file (`src/tz.cpp`) that needs to be compiled. Here are the recommended directions: https://howardhinnant.github.io/date/tz.html#Installation. + +One can run tests by cd'ing into the `test` subdirectory and running `testit`. There are known failures on all platforms except for macOS. And even on macOS if C++11 is used. If any of these failures present problems for you, there exist workarounds. + +Additionally there is _unsupported_ support for [vcpkg](https://github.com/Microsoft/vcpkg) and [CMake](https://cmake.org/). I don't personally use or maintain these systems as for me they cause more problems than they solve (for this small project). If you would like to contribute to these build systems please feel free to file a PR. + +You can download and install Date using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager: + + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + vcpkg install date + +The Date port in vcpkg is updated by Microsoft team members and community contributors. If the version falls behind, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. + +You can optionally build using [CMake](https://cmake.org/). Here is a guide of how to build and test using the CMake Makefile generator. + +```bash +mkdir build +cd build +cmake -DENABLE_DATE_TESTING=ON -DBUILD_TZ_LIB=ON ../ +cmake --build . --target testit # Consider '-- -j4' for multithreading +``` +## Projects using this library + +* www.safe.com +* www.webtoolkit.eu/wt +* https://github.com/ViewTouch/viewtouch +* https://routinghub.com +* https://github.com/valhalla +* https://github.com/siodb/siodb +* https://github.com/KomodoPlatform/atomicDEX-Pro +* https://github.com/Kotlin/kotlinx-datetime +* https://github.com/royalbee/jewish_date + +If you would like your project (or product) on this list, just let me know. diff --git a/deps/date/include/date/date.h b/deps/date/include/date/date.h new file mode 100644 index 0000000..7b6b4e4 --- /dev/null +++ b/deps/date/include/date/date.h @@ -0,0 +1,8200 @@ +#ifndef DATE_H +#define DATE_H + +// The MIT License (MIT) +// +// Copyright (c) 2015, 2016, 2017 Howard Hinnant +// Copyright (c) 2016 Adrian Colomitchi +// Copyright (c) 2017 Florian Dang +// Copyright (c) 2017 Paul Thompson +// Copyright (c) 2018, 2019 Tomasz Kamiński +// Copyright (c) 2019 Jiangang Zhuang +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// Our apologies. When the previous paragraph was written, lowercase had not yet +// been invented (that would involve another several millennia of evolution). +// We did not mean to shout. + +#ifndef HAS_STRING_VIEW +# if __cplusplus >= 201703 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) +# define HAS_STRING_VIEW 1 +# else +# define HAS_STRING_VIEW 0 +# endif +#endif // HAS_STRING_VIEW + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if HAS_STRING_VIEW +# include +#endif +#include +#include + +#ifdef __GNUC__ +# pragma GCC diagnostic push +# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 7) +# pragma GCC diagnostic ignored "-Wpedantic" +# endif +# if __GNUC__ < 5 + // GCC 4.9 Bug 61489 Wrong warning with -Wmissing-field-initializers +# pragma GCC diagnostic ignored "-Wmissing-field-initializers" +# endif +#endif + +#ifdef _MSC_VER +# pragma warning(push) +// warning C4127: conditional expression is constant +# pragma warning(disable : 4127) +#endif + +namespace date +{ + +//---------------+ +// Configuration | +//---------------+ + +#ifndef ONLY_C_LOCALE +# define ONLY_C_LOCALE 0 +#endif + +#if defined(_MSC_VER) && (!defined(__clang__) || (_MSC_VER < 1910)) +// MSVC +# ifndef _SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING +# define _SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING +# endif +# if _MSC_VER < 1910 +// before VS2017 +# define CONSTDATA const +# define CONSTCD11 +# define CONSTCD14 +# define NOEXCEPT _NOEXCEPT +# else +// VS2017 and later +# define CONSTDATA constexpr const +# define CONSTCD11 constexpr +# define CONSTCD14 constexpr +# define NOEXCEPT noexcept +# endif + +#elif defined(__SUNPRO_CC) && __SUNPRO_CC <= 0x5150 +// Oracle Developer Studio 12.6 and earlier +# define CONSTDATA constexpr const +# define CONSTCD11 constexpr +# define CONSTCD14 +# define NOEXCEPT noexcept + +#elif __cplusplus >= 201402 +// C++14 +# define CONSTDATA constexpr const +# define CONSTCD11 constexpr +# define CONSTCD14 constexpr +# define NOEXCEPT noexcept +#else +// C++11 +# define CONSTDATA constexpr const +# define CONSTCD11 constexpr +# define CONSTCD14 +# define NOEXCEPT noexcept +#endif + +#ifndef HAS_UNCAUGHT_EXCEPTIONS +# if __cplusplus >= 201703 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) +# define HAS_UNCAUGHT_EXCEPTIONS 1 +# else +# define HAS_UNCAUGHT_EXCEPTIONS 0 +# endif +#endif // HAS_UNCAUGHT_EXCEPTIONS + +#ifndef HAS_VOID_T +# if __cplusplus >= 201703 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) +# define HAS_VOID_T 1 +# else +# define HAS_VOID_T 0 +# endif +#endif // HAS_VOID_T + +// Protect from Oracle sun macro +#ifdef sun +# undef sun +#endif + +// Work around for a NVCC compiler bug which causes it to fail +// to compile std::ratio_{multiply,divide} when used directly +// in the std::chrono::duration template instantiations below +namespace detail { +template +using ratio_multiply = decltype(std::ratio_multiply{}); + +template +using ratio_divide = decltype(std::ratio_divide{}); +} // namespace detail + +//-----------+ +// Interface | +//-----------+ + +// durations + +using days = std::chrono::duration + , std::chrono::hours::period>>; + +using weeks = std::chrono::duration + , days::period>>; + +using years = std::chrono::duration + , days::period>>; + +using months = std::chrono::duration + >>; + +// time_point + +template + using sys_time = std::chrono::time_point; + +using sys_days = sys_time; +using sys_seconds = sys_time; + +struct local_t {}; + +template + using local_time = std::chrono::time_point; + +using local_seconds = local_time; +using local_days = local_time; + +// types + +struct last_spec +{ + explicit last_spec() = default; +}; + +class day; +class month; +class year; + +class weekday; +class weekday_indexed; +class weekday_last; + +class month_day; +class month_day_last; +class month_weekday; +class month_weekday_last; + +class year_month; + +class year_month_day; +class year_month_day_last; +class year_month_weekday; +class year_month_weekday_last; + +// date composition operators + +CONSTCD11 year_month operator/(const year& y, const month& m) NOEXCEPT; +CONSTCD11 year_month operator/(const year& y, int m) NOEXCEPT; + +CONSTCD11 month_day operator/(const day& d, const month& m) NOEXCEPT; +CONSTCD11 month_day operator/(const day& d, int m) NOEXCEPT; +CONSTCD11 month_day operator/(const month& m, const day& d) NOEXCEPT; +CONSTCD11 month_day operator/(const month& m, int d) NOEXCEPT; +CONSTCD11 month_day operator/(int m, const day& d) NOEXCEPT; + +CONSTCD11 month_day_last operator/(const month& m, last_spec) NOEXCEPT; +CONSTCD11 month_day_last operator/(int m, last_spec) NOEXCEPT; +CONSTCD11 month_day_last operator/(last_spec, const month& m) NOEXCEPT; +CONSTCD11 month_day_last operator/(last_spec, int m) NOEXCEPT; + +CONSTCD11 month_weekday operator/(const month& m, const weekday_indexed& wdi) NOEXCEPT; +CONSTCD11 month_weekday operator/(int m, const weekday_indexed& wdi) NOEXCEPT; +CONSTCD11 month_weekday operator/(const weekday_indexed& wdi, const month& m) NOEXCEPT; +CONSTCD11 month_weekday operator/(const weekday_indexed& wdi, int m) NOEXCEPT; + +CONSTCD11 month_weekday_last operator/(const month& m, const weekday_last& wdl) NOEXCEPT; +CONSTCD11 month_weekday_last operator/(int m, const weekday_last& wdl) NOEXCEPT; +CONSTCD11 month_weekday_last operator/(const weekday_last& wdl, const month& m) NOEXCEPT; +CONSTCD11 month_weekday_last operator/(const weekday_last& wdl, int m) NOEXCEPT; + +CONSTCD11 year_month_day operator/(const year_month& ym, const day& d) NOEXCEPT; +CONSTCD11 year_month_day operator/(const year_month& ym, int d) NOEXCEPT; +CONSTCD11 year_month_day operator/(const year& y, const month_day& md) NOEXCEPT; +CONSTCD11 year_month_day operator/(int y, const month_day& md) NOEXCEPT; +CONSTCD11 year_month_day operator/(const month_day& md, const year& y) NOEXCEPT; +CONSTCD11 year_month_day operator/(const month_day& md, int y) NOEXCEPT; + +CONSTCD11 + year_month_day_last operator/(const year_month& ym, last_spec) NOEXCEPT; +CONSTCD11 + year_month_day_last operator/(const year& y, const month_day_last& mdl) NOEXCEPT; +CONSTCD11 + year_month_day_last operator/(int y, const month_day_last& mdl) NOEXCEPT; +CONSTCD11 + year_month_day_last operator/(const month_day_last& mdl, const year& y) NOEXCEPT; +CONSTCD11 + year_month_day_last operator/(const month_day_last& mdl, int y) NOEXCEPT; + +CONSTCD11 +year_month_weekday +operator/(const year_month& ym, const weekday_indexed& wdi) NOEXCEPT; + +CONSTCD11 +year_month_weekday +operator/(const year& y, const month_weekday& mwd) NOEXCEPT; + +CONSTCD11 +year_month_weekday +operator/(int y, const month_weekday& mwd) NOEXCEPT; + +CONSTCD11 +year_month_weekday +operator/(const month_weekday& mwd, const year& y) NOEXCEPT; + +CONSTCD11 +year_month_weekday +operator/(const month_weekday& mwd, int y) NOEXCEPT; + +CONSTCD11 +year_month_weekday_last +operator/(const year_month& ym, const weekday_last& wdl) NOEXCEPT; + +CONSTCD11 +year_month_weekday_last +operator/(const year& y, const month_weekday_last& mwdl) NOEXCEPT; + +CONSTCD11 +year_month_weekday_last +operator/(int y, const month_weekday_last& mwdl) NOEXCEPT; + +CONSTCD11 +year_month_weekday_last +operator/(const month_weekday_last& mwdl, const year& y) NOEXCEPT; + +CONSTCD11 +year_month_weekday_last +operator/(const month_weekday_last& mwdl, int y) NOEXCEPT; + +// Detailed interface + +// day + +class day +{ + unsigned char d_; + +public: + day() = default; + explicit CONSTCD11 day(unsigned d) NOEXCEPT; + + CONSTCD14 day& operator++() NOEXCEPT; + CONSTCD14 day operator++(int) NOEXCEPT; + CONSTCD14 day& operator--() NOEXCEPT; + CONSTCD14 day operator--(int) NOEXCEPT; + + CONSTCD14 day& operator+=(const days& d) NOEXCEPT; + CONSTCD14 day& operator-=(const days& d) NOEXCEPT; + + CONSTCD11 explicit operator unsigned() const NOEXCEPT; + CONSTCD11 bool ok() const NOEXCEPT; +}; + +CONSTCD11 bool operator==(const day& x, const day& y) NOEXCEPT; +CONSTCD11 bool operator!=(const day& x, const day& y) NOEXCEPT; +CONSTCD11 bool operator< (const day& x, const day& y) NOEXCEPT; +CONSTCD11 bool operator> (const day& x, const day& y) NOEXCEPT; +CONSTCD11 bool operator<=(const day& x, const day& y) NOEXCEPT; +CONSTCD11 bool operator>=(const day& x, const day& y) NOEXCEPT; + +CONSTCD11 day operator+(const day& x, const days& y) NOEXCEPT; +CONSTCD11 day operator+(const days& x, const day& y) NOEXCEPT; +CONSTCD11 day operator-(const day& x, const days& y) NOEXCEPT; +CONSTCD11 days operator-(const day& x, const day& y) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const day& d); + +// month + +class month +{ + unsigned char m_; + +public: + month() = default; + explicit CONSTCD11 month(unsigned m) NOEXCEPT; + + CONSTCD14 month& operator++() NOEXCEPT; + CONSTCD14 month operator++(int) NOEXCEPT; + CONSTCD14 month& operator--() NOEXCEPT; + CONSTCD14 month operator--(int) NOEXCEPT; + + CONSTCD14 month& operator+=(const months& m) NOEXCEPT; + CONSTCD14 month& operator-=(const months& m) NOEXCEPT; + + CONSTCD11 explicit operator unsigned() const NOEXCEPT; + CONSTCD11 bool ok() const NOEXCEPT; +}; + +CONSTCD11 bool operator==(const month& x, const month& y) NOEXCEPT; +CONSTCD11 bool operator!=(const month& x, const month& y) NOEXCEPT; +CONSTCD11 bool operator< (const month& x, const month& y) NOEXCEPT; +CONSTCD11 bool operator> (const month& x, const month& y) NOEXCEPT; +CONSTCD11 bool operator<=(const month& x, const month& y) NOEXCEPT; +CONSTCD11 bool operator>=(const month& x, const month& y) NOEXCEPT; + +CONSTCD14 month operator+(const month& x, const months& y) NOEXCEPT; +CONSTCD14 month operator+(const months& x, const month& y) NOEXCEPT; +CONSTCD14 month operator-(const month& x, const months& y) NOEXCEPT; +CONSTCD14 months operator-(const month& x, const month& y) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const month& m); + +// year + +class year +{ + short y_; + +public: + year() = default; + explicit CONSTCD11 year(int y) NOEXCEPT; + + CONSTCD14 year& operator++() NOEXCEPT; + CONSTCD14 year operator++(int) NOEXCEPT; + CONSTCD14 year& operator--() NOEXCEPT; + CONSTCD14 year operator--(int) NOEXCEPT; + + CONSTCD14 year& operator+=(const years& y) NOEXCEPT; + CONSTCD14 year& operator-=(const years& y) NOEXCEPT; + + CONSTCD11 year operator-() const NOEXCEPT; + CONSTCD11 year operator+() const NOEXCEPT; + + CONSTCD11 bool is_leap() const NOEXCEPT; + + CONSTCD11 explicit operator int() const NOEXCEPT; + CONSTCD11 bool ok() const NOEXCEPT; + + static CONSTCD11 year min() NOEXCEPT { return year{-32767}; } + static CONSTCD11 year max() NOEXCEPT { return year{32767}; } +}; + +CONSTCD11 bool operator==(const year& x, const year& y) NOEXCEPT; +CONSTCD11 bool operator!=(const year& x, const year& y) NOEXCEPT; +CONSTCD11 bool operator< (const year& x, const year& y) NOEXCEPT; +CONSTCD11 bool operator> (const year& x, const year& y) NOEXCEPT; +CONSTCD11 bool operator<=(const year& x, const year& y) NOEXCEPT; +CONSTCD11 bool operator>=(const year& x, const year& y) NOEXCEPT; + +CONSTCD11 year operator+(const year& x, const years& y) NOEXCEPT; +CONSTCD11 year operator+(const years& x, const year& y) NOEXCEPT; +CONSTCD11 year operator-(const year& x, const years& y) NOEXCEPT; +CONSTCD11 years operator-(const year& x, const year& y) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const year& y); + +// weekday + +class weekday +{ + unsigned char wd_; +public: + weekday() = default; + explicit CONSTCD11 weekday(unsigned wd) NOEXCEPT; + CONSTCD14 weekday(const sys_days& dp) NOEXCEPT; + CONSTCD14 explicit weekday(const local_days& dp) NOEXCEPT; + + CONSTCD14 weekday& operator++() NOEXCEPT; + CONSTCD14 weekday operator++(int) NOEXCEPT; + CONSTCD14 weekday& operator--() NOEXCEPT; + CONSTCD14 weekday operator--(int) NOEXCEPT; + + CONSTCD14 weekday& operator+=(const days& d) NOEXCEPT; + CONSTCD14 weekday& operator-=(const days& d) NOEXCEPT; + + CONSTCD11 bool ok() const NOEXCEPT; + + CONSTCD11 unsigned c_encoding() const NOEXCEPT; + CONSTCD11 unsigned iso_encoding() const NOEXCEPT; + + CONSTCD11 weekday_indexed operator[](unsigned index) const NOEXCEPT; + CONSTCD11 weekday_last operator[](last_spec) const NOEXCEPT; + +private: + static CONSTCD14 unsigned char weekday_from_days(int z) NOEXCEPT; + + friend CONSTCD11 bool operator==(const weekday& x, const weekday& y) NOEXCEPT; + friend CONSTCD14 days operator-(const weekday& x, const weekday& y) NOEXCEPT; + friend CONSTCD14 weekday operator+(const weekday& x, const days& y) NOEXCEPT; + template + friend std::basic_ostream& + operator<<(std::basic_ostream& os, const weekday& wd); + friend class weekday_indexed; +}; + +CONSTCD11 bool operator==(const weekday& x, const weekday& y) NOEXCEPT; +CONSTCD11 bool operator!=(const weekday& x, const weekday& y) NOEXCEPT; + +CONSTCD14 weekday operator+(const weekday& x, const days& y) NOEXCEPT; +CONSTCD14 weekday operator+(const days& x, const weekday& y) NOEXCEPT; +CONSTCD14 weekday operator-(const weekday& x, const days& y) NOEXCEPT; +CONSTCD14 days operator-(const weekday& x, const weekday& y) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const weekday& wd); + +// weekday_indexed + +class weekday_indexed +{ + unsigned char wd_ : 4; + unsigned char index_ : 4; + +public: + weekday_indexed() = default; + CONSTCD11 weekday_indexed(const date::weekday& wd, unsigned index) NOEXCEPT; + + CONSTCD11 date::weekday weekday() const NOEXCEPT; + CONSTCD11 unsigned index() const NOEXCEPT; + CONSTCD11 bool ok() const NOEXCEPT; +}; + +CONSTCD11 bool operator==(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT; +CONSTCD11 bool operator!=(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const weekday_indexed& wdi); + +// weekday_last + +class weekday_last +{ + date::weekday wd_; + +public: + explicit CONSTCD11 weekday_last(const date::weekday& wd) NOEXCEPT; + + CONSTCD11 date::weekday weekday() const NOEXCEPT; + CONSTCD11 bool ok() const NOEXCEPT; +}; + +CONSTCD11 bool operator==(const weekday_last& x, const weekday_last& y) NOEXCEPT; +CONSTCD11 bool operator!=(const weekday_last& x, const weekday_last& y) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const weekday_last& wdl); + +namespace detail +{ + +struct unspecified_month_disambiguator {}; + +} // namespace detail + +// year_month + +class year_month +{ + date::year y_; + date::month m_; + +public: + year_month() = default; + CONSTCD11 year_month(const date::year& y, const date::month& m) NOEXCEPT; + + CONSTCD11 date::year year() const NOEXCEPT; + CONSTCD11 date::month month() const NOEXCEPT; + + template + CONSTCD14 year_month& operator+=(const months& dm) NOEXCEPT; + template + CONSTCD14 year_month& operator-=(const months& dm) NOEXCEPT; + CONSTCD14 year_month& operator+=(const years& dy) NOEXCEPT; + CONSTCD14 year_month& operator-=(const years& dy) NOEXCEPT; + + CONSTCD11 bool ok() const NOEXCEPT; +}; + +CONSTCD11 bool operator==(const year_month& x, const year_month& y) NOEXCEPT; +CONSTCD11 bool operator!=(const year_month& x, const year_month& y) NOEXCEPT; +CONSTCD11 bool operator< (const year_month& x, const year_month& y) NOEXCEPT; +CONSTCD11 bool operator> (const year_month& x, const year_month& y) NOEXCEPT; +CONSTCD11 bool operator<=(const year_month& x, const year_month& y) NOEXCEPT; +CONSTCD11 bool operator>=(const year_month& x, const year_month& y) NOEXCEPT; + +template +CONSTCD14 year_month operator+(const year_month& ym, const months& dm) NOEXCEPT; +template +CONSTCD14 year_month operator+(const months& dm, const year_month& ym) NOEXCEPT; +template +CONSTCD14 year_month operator-(const year_month& ym, const months& dm) NOEXCEPT; + +CONSTCD11 months operator-(const year_month& x, const year_month& y) NOEXCEPT; +CONSTCD11 year_month operator+(const year_month& ym, const years& dy) NOEXCEPT; +CONSTCD11 year_month operator+(const years& dy, const year_month& ym) NOEXCEPT; +CONSTCD11 year_month operator-(const year_month& ym, const years& dy) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const year_month& ym); + +// month_day + +class month_day +{ + date::month m_; + date::day d_; + +public: + month_day() = default; + CONSTCD11 month_day(const date::month& m, const date::day& d) NOEXCEPT; + + CONSTCD11 date::month month() const NOEXCEPT; + CONSTCD11 date::day day() const NOEXCEPT; + + CONSTCD14 bool ok() const NOEXCEPT; +}; + +CONSTCD11 bool operator==(const month_day& x, const month_day& y) NOEXCEPT; +CONSTCD11 bool operator!=(const month_day& x, const month_day& y) NOEXCEPT; +CONSTCD11 bool operator< (const month_day& x, const month_day& y) NOEXCEPT; +CONSTCD11 bool operator> (const month_day& x, const month_day& y) NOEXCEPT; +CONSTCD11 bool operator<=(const month_day& x, const month_day& y) NOEXCEPT; +CONSTCD11 bool operator>=(const month_day& x, const month_day& y) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const month_day& md); + +// month_day_last + +class month_day_last +{ + date::month m_; + +public: + CONSTCD11 explicit month_day_last(const date::month& m) NOEXCEPT; + + CONSTCD11 date::month month() const NOEXCEPT; + CONSTCD11 bool ok() const NOEXCEPT; +}; + +CONSTCD11 bool operator==(const month_day_last& x, const month_day_last& y) NOEXCEPT; +CONSTCD11 bool operator!=(const month_day_last& x, const month_day_last& y) NOEXCEPT; +CONSTCD11 bool operator< (const month_day_last& x, const month_day_last& y) NOEXCEPT; +CONSTCD11 bool operator> (const month_day_last& x, const month_day_last& y) NOEXCEPT; +CONSTCD11 bool operator<=(const month_day_last& x, const month_day_last& y) NOEXCEPT; +CONSTCD11 bool operator>=(const month_day_last& x, const month_day_last& y) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const month_day_last& mdl); + +// month_weekday + +class month_weekday +{ + date::month m_; + date::weekday_indexed wdi_; +public: + CONSTCD11 month_weekday(const date::month& m, + const date::weekday_indexed& wdi) NOEXCEPT; + + CONSTCD11 date::month month() const NOEXCEPT; + CONSTCD11 date::weekday_indexed weekday_indexed() const NOEXCEPT; + + CONSTCD11 bool ok() const NOEXCEPT; +}; + +CONSTCD11 bool operator==(const month_weekday& x, const month_weekday& y) NOEXCEPT; +CONSTCD11 bool operator!=(const month_weekday& x, const month_weekday& y) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const month_weekday& mwd); + +// month_weekday_last + +class month_weekday_last +{ + date::month m_; + date::weekday_last wdl_; + +public: + CONSTCD11 month_weekday_last(const date::month& m, + const date::weekday_last& wd) NOEXCEPT; + + CONSTCD11 date::month month() const NOEXCEPT; + CONSTCD11 date::weekday_last weekday_last() const NOEXCEPT; + + CONSTCD11 bool ok() const NOEXCEPT; +}; + +CONSTCD11 + bool operator==(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT; +CONSTCD11 + bool operator!=(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const month_weekday_last& mwdl); + +// class year_month_day + +class year_month_day +{ + date::year y_; + date::month m_; + date::day d_; + +public: + year_month_day() = default; + CONSTCD11 year_month_day(const date::year& y, const date::month& m, + const date::day& d) NOEXCEPT; + CONSTCD14 year_month_day(const year_month_day_last& ymdl) NOEXCEPT; + + CONSTCD14 year_month_day(sys_days dp) NOEXCEPT; + CONSTCD14 explicit year_month_day(local_days dp) NOEXCEPT; + + template + CONSTCD14 year_month_day& operator+=(const months& m) NOEXCEPT; + template + CONSTCD14 year_month_day& operator-=(const months& m) NOEXCEPT; + CONSTCD14 year_month_day& operator+=(const years& y) NOEXCEPT; + CONSTCD14 year_month_day& operator-=(const years& y) NOEXCEPT; + + CONSTCD11 date::year year() const NOEXCEPT; + CONSTCD11 date::month month() const NOEXCEPT; + CONSTCD11 date::day day() const NOEXCEPT; + + CONSTCD14 operator sys_days() const NOEXCEPT; + CONSTCD14 explicit operator local_days() const NOEXCEPT; + CONSTCD14 bool ok() const NOEXCEPT; + +private: + static CONSTCD14 year_month_day from_days(days dp) NOEXCEPT; + CONSTCD14 days to_days() const NOEXCEPT; +}; + +CONSTCD11 bool operator==(const year_month_day& x, const year_month_day& y) NOEXCEPT; +CONSTCD11 bool operator!=(const year_month_day& x, const year_month_day& y) NOEXCEPT; +CONSTCD11 bool operator< (const year_month_day& x, const year_month_day& y) NOEXCEPT; +CONSTCD11 bool operator> (const year_month_day& x, const year_month_day& y) NOEXCEPT; +CONSTCD11 bool operator<=(const year_month_day& x, const year_month_day& y) NOEXCEPT; +CONSTCD11 bool operator>=(const year_month_day& x, const year_month_day& y) NOEXCEPT; + +template +CONSTCD14 year_month_day operator+(const year_month_day& ymd, const months& dm) NOEXCEPT; +template +CONSTCD14 year_month_day operator+(const months& dm, const year_month_day& ymd) NOEXCEPT; +template +CONSTCD14 year_month_day operator-(const year_month_day& ymd, const months& dm) NOEXCEPT; +CONSTCD11 year_month_day operator+(const year_month_day& ymd, const years& dy) NOEXCEPT; +CONSTCD11 year_month_day operator+(const years& dy, const year_month_day& ymd) NOEXCEPT; +CONSTCD11 year_month_day operator-(const year_month_day& ymd, const years& dy) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const year_month_day& ymd); + +// year_month_day_last + +class year_month_day_last +{ + date::year y_; + date::month_day_last mdl_; + +public: + CONSTCD11 year_month_day_last(const date::year& y, + const date::month_day_last& mdl) NOEXCEPT; + + template + CONSTCD14 year_month_day_last& operator+=(const months& m) NOEXCEPT; + template + CONSTCD14 year_month_day_last& operator-=(const months& m) NOEXCEPT; + CONSTCD14 year_month_day_last& operator+=(const years& y) NOEXCEPT; + CONSTCD14 year_month_day_last& operator-=(const years& y) NOEXCEPT; + + CONSTCD11 date::year year() const NOEXCEPT; + CONSTCD11 date::month month() const NOEXCEPT; + CONSTCD11 date::month_day_last month_day_last() const NOEXCEPT; + CONSTCD14 date::day day() const NOEXCEPT; + + CONSTCD14 operator sys_days() const NOEXCEPT; + CONSTCD14 explicit operator local_days() const NOEXCEPT; + CONSTCD11 bool ok() const NOEXCEPT; +}; + +CONSTCD11 + bool operator==(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT; +CONSTCD11 + bool operator!=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT; +CONSTCD11 + bool operator< (const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT; +CONSTCD11 + bool operator> (const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT; +CONSTCD11 + bool operator<=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT; +CONSTCD11 + bool operator>=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT; + +template +CONSTCD14 +year_month_day_last +operator+(const year_month_day_last& ymdl, const months& dm) NOEXCEPT; + +template +CONSTCD14 +year_month_day_last +operator+(const months& dm, const year_month_day_last& ymdl) NOEXCEPT; + +CONSTCD11 +year_month_day_last +operator+(const year_month_day_last& ymdl, const years& dy) NOEXCEPT; + +CONSTCD11 +year_month_day_last +operator+(const years& dy, const year_month_day_last& ymdl) NOEXCEPT; + +template +CONSTCD14 +year_month_day_last +operator-(const year_month_day_last& ymdl, const months& dm) NOEXCEPT; + +CONSTCD11 +year_month_day_last +operator-(const year_month_day_last& ymdl, const years& dy) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const year_month_day_last& ymdl); + +// year_month_weekday + +class year_month_weekday +{ + date::year y_; + date::month m_; + date::weekday_indexed wdi_; + +public: + year_month_weekday() = default; + CONSTCD11 year_month_weekday(const date::year& y, const date::month& m, + const date::weekday_indexed& wdi) NOEXCEPT; + CONSTCD14 year_month_weekday(const sys_days& dp) NOEXCEPT; + CONSTCD14 explicit year_month_weekday(const local_days& dp) NOEXCEPT; + + template + CONSTCD14 year_month_weekday& operator+=(const months& m) NOEXCEPT; + template + CONSTCD14 year_month_weekday& operator-=(const months& m) NOEXCEPT; + CONSTCD14 year_month_weekday& operator+=(const years& y) NOEXCEPT; + CONSTCD14 year_month_weekday& operator-=(const years& y) NOEXCEPT; + + CONSTCD11 date::year year() const NOEXCEPT; + CONSTCD11 date::month month() const NOEXCEPT; + CONSTCD11 date::weekday weekday() const NOEXCEPT; + CONSTCD11 unsigned index() const NOEXCEPT; + CONSTCD11 date::weekday_indexed weekday_indexed() const NOEXCEPT; + + CONSTCD14 operator sys_days() const NOEXCEPT; + CONSTCD14 explicit operator local_days() const NOEXCEPT; + CONSTCD14 bool ok() const NOEXCEPT; + +private: + static CONSTCD14 year_month_weekday from_days(days dp) NOEXCEPT; + CONSTCD14 days to_days() const NOEXCEPT; +}; + +CONSTCD11 + bool operator==(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT; +CONSTCD11 + bool operator!=(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT; + +template +CONSTCD14 +year_month_weekday +operator+(const year_month_weekday& ymwd, const months& dm) NOEXCEPT; + +template +CONSTCD14 +year_month_weekday +operator+(const months& dm, const year_month_weekday& ymwd) NOEXCEPT; + +CONSTCD11 +year_month_weekday +operator+(const year_month_weekday& ymwd, const years& dy) NOEXCEPT; + +CONSTCD11 +year_month_weekday +operator+(const years& dy, const year_month_weekday& ymwd) NOEXCEPT; + +template +CONSTCD14 +year_month_weekday +operator-(const year_month_weekday& ymwd, const months& dm) NOEXCEPT; + +CONSTCD11 +year_month_weekday +operator-(const year_month_weekday& ymwd, const years& dy) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const year_month_weekday& ymwdi); + +// year_month_weekday_last + +class year_month_weekday_last +{ + date::year y_; + date::month m_; + date::weekday_last wdl_; + +public: + CONSTCD11 year_month_weekday_last(const date::year& y, const date::month& m, + const date::weekday_last& wdl) NOEXCEPT; + + template + CONSTCD14 year_month_weekday_last& operator+=(const months& m) NOEXCEPT; + template + CONSTCD14 year_month_weekday_last& operator-=(const months& m) NOEXCEPT; + CONSTCD14 year_month_weekday_last& operator+=(const years& y) NOEXCEPT; + CONSTCD14 year_month_weekday_last& operator-=(const years& y) NOEXCEPT; + + CONSTCD11 date::year year() const NOEXCEPT; + CONSTCD11 date::month month() const NOEXCEPT; + CONSTCD11 date::weekday weekday() const NOEXCEPT; + CONSTCD11 date::weekday_last weekday_last() const NOEXCEPT; + + CONSTCD14 operator sys_days() const NOEXCEPT; + CONSTCD14 explicit operator local_days() const NOEXCEPT; + CONSTCD11 bool ok() const NOEXCEPT; + +private: + CONSTCD14 days to_days() const NOEXCEPT; +}; + +CONSTCD11 +bool +operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT; + +CONSTCD11 +bool +operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT; + +template +CONSTCD14 +year_month_weekday_last +operator+(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT; + +template +CONSTCD14 +year_month_weekday_last +operator+(const months& dm, const year_month_weekday_last& ymwdl) NOEXCEPT; + +CONSTCD11 +year_month_weekday_last +operator+(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT; + +CONSTCD11 +year_month_weekday_last +operator+(const years& dy, const year_month_weekday_last& ymwdl) NOEXCEPT; + +template +CONSTCD14 +year_month_weekday_last +operator-(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT; + +CONSTCD11 +year_month_weekday_last +operator-(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const year_month_weekday_last& ymwdl); + +#if !defined(_MSC_VER) || (_MSC_VER >= 1900) +inline namespace literals +{ + +CONSTCD11 date::day operator "" _d(unsigned long long d) NOEXCEPT; +CONSTCD11 date::year operator "" _y(unsigned long long y) NOEXCEPT; + +} // inline namespace literals +#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900) + +// CONSTDATA date::month January{1}; +// CONSTDATA date::month February{2}; +// CONSTDATA date::month March{3}; +// CONSTDATA date::month April{4}; +// CONSTDATA date::month May{5}; +// CONSTDATA date::month June{6}; +// CONSTDATA date::month July{7}; +// CONSTDATA date::month August{8}; +// CONSTDATA date::month September{9}; +// CONSTDATA date::month October{10}; +// CONSTDATA date::month November{11}; +// CONSTDATA date::month December{12}; +// +// CONSTDATA date::weekday Sunday{0u}; +// CONSTDATA date::weekday Monday{1u}; +// CONSTDATA date::weekday Tuesday{2u}; +// CONSTDATA date::weekday Wednesday{3u}; +// CONSTDATA date::weekday Thursday{4u}; +// CONSTDATA date::weekday Friday{5u}; +// CONSTDATA date::weekday Saturday{6u}; + +#if HAS_VOID_T + +template > +struct is_clock + : std::false_type +{}; + +template +struct is_clock> + : std::true_type +{}; + +template inline constexpr bool is_clock_v = is_clock::value; + +#endif // HAS_VOID_T + +//----------------+ +// Implementation | +//----------------+ + +// utilities +namespace detail { + +template> +class save_istream +{ +protected: + std::basic_ios& is_; + CharT fill_; + std::ios::fmtflags flags_; + std::streamsize precision_; + std::streamsize width_; + std::basic_ostream* tie_; + std::locale loc_; + +public: + ~save_istream() + { + is_.fill(fill_); + is_.flags(flags_); + is_.precision(precision_); + is_.width(width_); + is_.imbue(loc_); + is_.tie(tie_); + } + + save_istream(const save_istream&) = delete; + save_istream& operator=(const save_istream&) = delete; + + explicit save_istream(std::basic_ios& is) + : is_(is) + , fill_(is.fill()) + , flags_(is.flags()) + , precision_(is.precision()) + , width_(is.width(0)) + , tie_(is.tie(nullptr)) + , loc_(is.getloc()) + { + if (tie_ != nullptr) + tie_->flush(); + } +}; + +template> +class save_ostream + : private save_istream +{ +public: + ~save_ostream() + { + if ((this->flags_ & std::ios::unitbuf) && +#if HAS_UNCAUGHT_EXCEPTIONS + std::uncaught_exceptions() == 0 && +#else + !std::uncaught_exception() && +#endif + this->is_.good()) + this->is_.rdbuf()->pubsync(); + } + + save_ostream(const save_ostream&) = delete; + save_ostream& operator=(const save_ostream&) = delete; + + explicit save_ostream(std::basic_ios& os) + : save_istream(os) + { + } +}; + +template +struct choose_trunc_type +{ + static const int digits = std::numeric_limits::digits; + using type = typename std::conditional + < + digits < 32, + std::int32_t, + typename std::conditional + < + digits < 64, + std::int64_t, +#ifdef __SIZEOF_INT128__ + __int128 +#else + std::int64_t +#endif + >::type + >::type; +}; + +template +CONSTCD11 +inline +typename std::enable_if +< + !std::chrono::treat_as_floating_point::value, + T +>::type +trunc(T t) NOEXCEPT +{ + return t; +} + +template +CONSTCD14 +inline +typename std::enable_if +< + std::chrono::treat_as_floating_point::value, + T +>::type +trunc(T t) NOEXCEPT +{ + using std::numeric_limits; + using I = typename choose_trunc_type::type; + CONSTDATA auto digits = numeric_limits::digits; + static_assert(digits < numeric_limits::digits, ""); + CONSTDATA auto max = I{1} << (digits-1); + CONSTDATA auto min = -max; + const auto negative = t < T{0}; + if (min <= t && t <= max && t != 0 && t == t) + { + t = static_cast(static_cast(t)); + if (t == 0 && negative) + t = -t; + } + return t; +} + +template +struct static_gcd +{ + static const std::intmax_t value = static_gcd::value; +}; + +template +struct static_gcd +{ + static const std::intmax_t value = Xp; +}; + +template <> +struct static_gcd<0, 0> +{ + static const std::intmax_t value = 1; +}; + +template +struct no_overflow +{ +private: + static const std::intmax_t gcd_n1_n2 = static_gcd::value; + static const std::intmax_t gcd_d1_d2 = static_gcd::value; + static const std::intmax_t n1 = R1::num / gcd_n1_n2; + static const std::intmax_t d1 = R1::den / gcd_d1_d2; + static const std::intmax_t n2 = R2::num / gcd_n1_n2; + static const std::intmax_t d2 = R2::den / gcd_d1_d2; +#ifdef __cpp_constexpr + static const std::intmax_t max = std::numeric_limits::max(); +#else + static const std::intmax_t max = LLONG_MAX; +#endif + + template + struct mul // overflow == false + { + static const std::intmax_t value = Xp * Yp; + }; + + template + struct mul + { + static const std::intmax_t value = 1; + }; + +public: + static const bool value = (n1 <= max / d2) && (n2 <= max / d1); + typedef std::ratio::value, + mul::value> type; +}; + +} // detail + +// trunc towards zero +template +CONSTCD11 +inline +typename std::enable_if +< + detail::no_overflow::value, + To +>::type +trunc(const std::chrono::duration& d) +{ + return To{detail::trunc(std::chrono::duration_cast(d).count())}; +} + +template +CONSTCD11 +inline +typename std::enable_if +< + !detail::no_overflow::value, + To +>::type +trunc(const std::chrono::duration& d) +{ + using std::chrono::duration_cast; + using std::chrono::duration; + using rep = typename std::common_type::type; + return To{detail::trunc(duration_cast(duration_cast>(d)).count())}; +} + +#ifndef HAS_CHRONO_ROUNDING +# if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 190023918 || (_MSC_FULL_VER >= 190000000 && defined (__clang__))) +# define HAS_CHRONO_ROUNDING 1 +# elif defined(__cpp_lib_chrono) && __cplusplus > 201402 && __cpp_lib_chrono >= 201510 +# define HAS_CHRONO_ROUNDING 1 +# elif defined(_LIBCPP_VERSION) && __cplusplus > 201402 && _LIBCPP_VERSION >= 3800 +# define HAS_CHRONO_ROUNDING 1 +# else +# define HAS_CHRONO_ROUNDING 0 +# endif +#endif // HAS_CHRONO_ROUNDING + +#if HAS_CHRONO_ROUNDING == 0 + +// round down +template +CONSTCD14 +inline +typename std::enable_if +< + detail::no_overflow::value, + To +>::type +floor(const std::chrono::duration& d) +{ + auto t = trunc(d); + if (t > d) + return t - To{1}; + return t; +} + +template +CONSTCD14 +inline +typename std::enable_if +< + !detail::no_overflow::value, + To +>::type +floor(const std::chrono::duration& d) +{ + using rep = typename std::common_type::type; + return floor(floor>(d)); +} + +// round to nearest, to even on tie +template +CONSTCD14 +inline +To +round(const std::chrono::duration& d) +{ + auto t0 = floor(d); + auto t1 = t0 + To{1}; + if (t1 == To{0} && t0 < To{0}) + t1 = -t1; + auto diff0 = d - t0; + auto diff1 = t1 - d; + if (diff0 == diff1) + { + if (t0 - trunc(t0/2)*2 == To{0}) + return t0; + return t1; + } + if (diff0 < diff1) + return t0; + return t1; +} + +// round up +template +CONSTCD14 +inline +To +ceil(const std::chrono::duration& d) +{ + auto t = trunc(d); + if (t < d) + return t + To{1}; + return t; +} + +template ::is_signed + >::type> +CONSTCD11 +std::chrono::duration +abs(std::chrono::duration d) +{ + return d >= d.zero() ? d : -d; +} + +// round down +template +CONSTCD11 +inline +std::chrono::time_point +floor(const std::chrono::time_point& tp) +{ + using std::chrono::time_point; + return time_point{date::floor(tp.time_since_epoch())}; +} + +// round to nearest, to even on tie +template +CONSTCD11 +inline +std::chrono::time_point +round(const std::chrono::time_point& tp) +{ + using std::chrono::time_point; + return time_point{round(tp.time_since_epoch())}; +} + +// round up +template +CONSTCD11 +inline +std::chrono::time_point +ceil(const std::chrono::time_point& tp) +{ + using std::chrono::time_point; + return time_point{ceil(tp.time_since_epoch())}; +} + +#else // HAS_CHRONO_ROUNDING == 1 + +using std::chrono::floor; +using std::chrono::ceil; +using std::chrono::round; +using std::chrono::abs; + +#endif // HAS_CHRONO_ROUNDING + +namespace detail +{ + +template +CONSTCD14 +inline +typename std::enable_if +< + !std::chrono::treat_as_floating_point::value, + To +>::type +round_i(const std::chrono::duration& d) +{ + return round(d); +} + +template +CONSTCD14 +inline +typename std::enable_if +< + std::chrono::treat_as_floating_point::value, + To +>::type +round_i(const std::chrono::duration& d) +{ + return d; +} + +template +CONSTCD11 +inline +std::chrono::time_point +round_i(const std::chrono::time_point& tp) +{ + using std::chrono::time_point; + return time_point{round_i(tp.time_since_epoch())}; +} + +} // detail + +// trunc towards zero +template +CONSTCD11 +inline +std::chrono::time_point +trunc(const std::chrono::time_point& tp) +{ + using std::chrono::time_point; + return time_point{trunc(tp.time_since_epoch())}; +} + +// day + +CONSTCD11 inline day::day(unsigned d) NOEXCEPT : d_(static_cast(d)) {} +CONSTCD14 inline day& day::operator++() NOEXCEPT {++d_; return *this;} +CONSTCD14 inline day day::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;} +CONSTCD14 inline day& day::operator--() NOEXCEPT {--d_; return *this;} +CONSTCD14 inline day day::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;} +CONSTCD14 inline day& day::operator+=(const days& d) NOEXCEPT {*this = *this + d; return *this;} +CONSTCD14 inline day& day::operator-=(const days& d) NOEXCEPT {*this = *this - d; return *this;} +CONSTCD11 inline day::operator unsigned() const NOEXCEPT {return d_;} +CONSTCD11 inline bool day::ok() const NOEXCEPT {return 1 <= d_ && d_ <= 31;} + +CONSTCD11 +inline +bool +operator==(const day& x, const day& y) NOEXCEPT +{ + return static_cast(x) == static_cast(y); +} + +CONSTCD11 +inline +bool +operator!=(const day& x, const day& y) NOEXCEPT +{ + return !(x == y); +} + +CONSTCD11 +inline +bool +operator<(const day& x, const day& y) NOEXCEPT +{ + return static_cast(x) < static_cast(y); +} + +CONSTCD11 +inline +bool +operator>(const day& x, const day& y) NOEXCEPT +{ + return y < x; +} + +CONSTCD11 +inline +bool +operator<=(const day& x, const day& y) NOEXCEPT +{ + return !(y < x); +} + +CONSTCD11 +inline +bool +operator>=(const day& x, const day& y) NOEXCEPT +{ + return !(x < y); +} + +CONSTCD11 +inline +days +operator-(const day& x, const day& y) NOEXCEPT +{ + return days{static_cast(static_cast(x) + - static_cast(y))}; +} + +CONSTCD11 +inline +day +operator+(const day& x, const days& y) NOEXCEPT +{ + return day{static_cast(x) + static_cast(y.count())}; +} + +CONSTCD11 +inline +day +operator+(const days& x, const day& y) NOEXCEPT +{ + return y + x; +} + +CONSTCD11 +inline +day +operator-(const day& x, const days& y) NOEXCEPT +{ + return x + -y; +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const day& d) +{ + detail::save_ostream _(os); + os.fill('0'); + os.flags(std::ios::dec | std::ios::right); + os.width(2); + os << static_cast(d); + return os; +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const day& d) +{ + detail::low_level_fmt(os, d); + if (!d.ok()) + os << " is not a valid day"; + return os; +} + +// month + +CONSTCD11 inline month::month(unsigned m) NOEXCEPT : m_(static_cast(m)) {} +CONSTCD14 inline month& month::operator++() NOEXCEPT {*this += months{1}; return *this;} +CONSTCD14 inline month month::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;} +CONSTCD14 inline month& month::operator--() NOEXCEPT {*this -= months{1}; return *this;} +CONSTCD14 inline month month::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;} + +CONSTCD14 +inline +month& +month::operator+=(const months& m) NOEXCEPT +{ + *this = *this + m; + return *this; +} + +CONSTCD14 +inline +month& +month::operator-=(const months& m) NOEXCEPT +{ + *this = *this - m; + return *this; +} + +CONSTCD11 inline month::operator unsigned() const NOEXCEPT {return m_;} +CONSTCD11 inline bool month::ok() const NOEXCEPT {return 1 <= m_ && m_ <= 12;} + +CONSTCD11 +inline +bool +operator==(const month& x, const month& y) NOEXCEPT +{ + return static_cast(x) == static_cast(y); +} + +CONSTCD11 +inline +bool +operator!=(const month& x, const month& y) NOEXCEPT +{ + return !(x == y); +} + +CONSTCD11 +inline +bool +operator<(const month& x, const month& y) NOEXCEPT +{ + return static_cast(x) < static_cast(y); +} + +CONSTCD11 +inline +bool +operator>(const month& x, const month& y) NOEXCEPT +{ + return y < x; +} + +CONSTCD11 +inline +bool +operator<=(const month& x, const month& y) NOEXCEPT +{ + return !(y < x); +} + +CONSTCD11 +inline +bool +operator>=(const month& x, const month& y) NOEXCEPT +{ + return !(x < y); +} + +CONSTCD14 +inline +months +operator-(const month& x, const month& y) NOEXCEPT +{ + auto const d = static_cast(x) - static_cast(y); + return months(d <= 11 ? d : d + 12); +} + +CONSTCD14 +inline +month +operator+(const month& x, const months& y) NOEXCEPT +{ + auto const mu = static_cast(static_cast(x)) + y.count() - 1; + auto const yr = (mu >= 0 ? mu : mu-11) / 12; + return month{static_cast(mu - yr * 12 + 1)}; +} + +CONSTCD14 +inline +month +operator+(const months& x, const month& y) NOEXCEPT +{ + return y + x; +} + +CONSTCD14 +inline +month +operator-(const month& x, const months& y) NOEXCEPT +{ + return x + -y; +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const month& m) +{ + if (m.ok()) + { + CharT fmt[] = {'%', 'b', 0}; + os << format(os.getloc(), fmt, m); + } + else + os << static_cast(m); + return os; +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const month& m) +{ + detail::low_level_fmt(os, m); + if (!m.ok()) + os << " is not a valid month"; + return os; +} + +// year + +CONSTCD11 inline year::year(int y) NOEXCEPT : y_(static_cast(y)) {} +CONSTCD14 inline year& year::operator++() NOEXCEPT {++y_; return *this;} +CONSTCD14 inline year year::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;} +CONSTCD14 inline year& year::operator--() NOEXCEPT {--y_; return *this;} +CONSTCD14 inline year year::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;} +CONSTCD14 inline year& year::operator+=(const years& y) NOEXCEPT {*this = *this + y; return *this;} +CONSTCD14 inline year& year::operator-=(const years& y) NOEXCEPT {*this = *this - y; return *this;} +CONSTCD11 inline year year::operator-() const NOEXCEPT {return year{-y_};} +CONSTCD11 inline year year::operator+() const NOEXCEPT {return *this;} + +CONSTCD11 +inline +bool +year::is_leap() const NOEXCEPT +{ + return y_ % 4 == 0 && (y_ % 100 != 0 || y_ % 400 == 0); +} + +CONSTCD11 inline year::operator int() const NOEXCEPT {return y_;} + +CONSTCD11 +inline +bool +year::ok() const NOEXCEPT +{ + return y_ != std::numeric_limits::min(); +} + +CONSTCD11 +inline +bool +operator==(const year& x, const year& y) NOEXCEPT +{ + return static_cast(x) == static_cast(y); +} + +CONSTCD11 +inline +bool +operator!=(const year& x, const year& y) NOEXCEPT +{ + return !(x == y); +} + +CONSTCD11 +inline +bool +operator<(const year& x, const year& y) NOEXCEPT +{ + return static_cast(x) < static_cast(y); +} + +CONSTCD11 +inline +bool +operator>(const year& x, const year& y) NOEXCEPT +{ + return y < x; +} + +CONSTCD11 +inline +bool +operator<=(const year& x, const year& y) NOEXCEPT +{ + return !(y < x); +} + +CONSTCD11 +inline +bool +operator>=(const year& x, const year& y) NOEXCEPT +{ + return !(x < y); +} + +CONSTCD11 +inline +years +operator-(const year& x, const year& y) NOEXCEPT +{ + return years{static_cast(x) - static_cast(y)}; +} + +CONSTCD11 +inline +year +operator+(const year& x, const years& y) NOEXCEPT +{ + return year{static_cast(x) + y.count()}; +} + +CONSTCD11 +inline +year +operator+(const years& x, const year& y) NOEXCEPT +{ + return y + x; +} + +CONSTCD11 +inline +year +operator-(const year& x, const years& y) NOEXCEPT +{ + return year{static_cast(x) - y.count()}; +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const year& y) +{ + detail::save_ostream _(os); + os.fill('0'); + os.flags(std::ios::dec | std::ios::internal); + os.width(4 + (y < year{0})); + os.imbue(std::locale::classic()); + os << static_cast(y); + return os; +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const year& y) +{ + detail::low_level_fmt(os, y); + if (!y.ok()) + os << " is not a valid year"; + return os; +} + +// weekday + +CONSTCD14 +inline +unsigned char +weekday::weekday_from_days(int z) NOEXCEPT +{ + auto u = static_cast(z); + return static_cast(z >= -4 ? (u+4) % 7 : u % 7); +} + +CONSTCD11 +inline +weekday::weekday(unsigned wd) NOEXCEPT + : wd_(static_cast(wd != 7 ? wd : 0)) + {} + +CONSTCD14 +inline +weekday::weekday(const sys_days& dp) NOEXCEPT + : wd_(weekday_from_days(dp.time_since_epoch().count())) + {} + +CONSTCD14 +inline +weekday::weekday(const local_days& dp) NOEXCEPT + : wd_(weekday_from_days(dp.time_since_epoch().count())) + {} + +CONSTCD14 inline weekday& weekday::operator++() NOEXCEPT {*this += days{1}; return *this;} +CONSTCD14 inline weekday weekday::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;} +CONSTCD14 inline weekday& weekday::operator--() NOEXCEPT {*this -= days{1}; return *this;} +CONSTCD14 inline weekday weekday::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;} + +CONSTCD14 +inline +weekday& +weekday::operator+=(const days& d) NOEXCEPT +{ + *this = *this + d; + return *this; +} + +CONSTCD14 +inline +weekday& +weekday::operator-=(const days& d) NOEXCEPT +{ + *this = *this - d; + return *this; +} + +CONSTCD11 inline bool weekday::ok() const NOEXCEPT {return wd_ <= 6;} + +CONSTCD11 +inline +unsigned weekday::c_encoding() const NOEXCEPT +{ + return unsigned{wd_}; +} + +CONSTCD11 +inline +unsigned weekday::iso_encoding() const NOEXCEPT +{ + return unsigned{((wd_ == 0u) ? 7u : wd_)}; +} + +CONSTCD11 +inline +bool +operator==(const weekday& x, const weekday& y) NOEXCEPT +{ + return x.wd_ == y.wd_; +} + +CONSTCD11 +inline +bool +operator!=(const weekday& x, const weekday& y) NOEXCEPT +{ + return !(x == y); +} + +CONSTCD14 +inline +days +operator-(const weekday& x, const weekday& y) NOEXCEPT +{ + auto const wdu = x.wd_ - y.wd_; + auto const wk = (wdu >= 0 ? wdu : wdu-6) / 7; + return days{wdu - wk * 7}; +} + +CONSTCD14 +inline +weekday +operator+(const weekday& x, const days& y) NOEXCEPT +{ + auto const wdu = static_cast(static_cast(x.wd_)) + y.count(); + auto const wk = (wdu >= 0 ? wdu : wdu-6) / 7; + return weekday{static_cast(wdu - wk * 7)}; +} + +CONSTCD14 +inline +weekday +operator+(const days& x, const weekday& y) NOEXCEPT +{ + return y + x; +} + +CONSTCD14 +inline +weekday +operator-(const weekday& x, const days& y) NOEXCEPT +{ + return x + -y; +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const weekday& wd) +{ + if (wd.ok()) + { + CharT fmt[] = {'%', 'a', 0}; + os << format(fmt, wd); + } + else + os << wd.c_encoding(); + return os; +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const weekday& wd) +{ + detail::low_level_fmt(os, wd); + if (!wd.ok()) + os << " is not a valid weekday"; + return os; +} + +#if !defined(_MSC_VER) || (_MSC_VER >= 1900) +inline namespace literals +{ + +CONSTCD11 +inline +date::day +operator "" _d(unsigned long long d) NOEXCEPT +{ + return date::day{static_cast(d)}; +} + +CONSTCD11 +inline +date::year +operator "" _y(unsigned long long y) NOEXCEPT +{ + return date::year(static_cast(y)); +} +#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900) + +CONSTDATA date::last_spec last{}; + +CONSTDATA date::month jan{1}; +CONSTDATA date::month feb{2}; +CONSTDATA date::month mar{3}; +CONSTDATA date::month apr{4}; +CONSTDATA date::month may{5}; +CONSTDATA date::month jun{6}; +CONSTDATA date::month jul{7}; +CONSTDATA date::month aug{8}; +CONSTDATA date::month sep{9}; +CONSTDATA date::month oct{10}; +CONSTDATA date::month nov{11}; +CONSTDATA date::month dec{12}; + +CONSTDATA date::weekday sun{0u}; +CONSTDATA date::weekday mon{1u}; +CONSTDATA date::weekday tue{2u}; +CONSTDATA date::weekday wed{3u}; +CONSTDATA date::weekday thu{4u}; +CONSTDATA date::weekday fri{5u}; +CONSTDATA date::weekday sat{6u}; + +#if !defined(_MSC_VER) || (_MSC_VER >= 1900) +} // inline namespace literals +#endif + +CONSTDATA date::month January{1}; +CONSTDATA date::month February{2}; +CONSTDATA date::month March{3}; +CONSTDATA date::month April{4}; +CONSTDATA date::month May{5}; +CONSTDATA date::month June{6}; +CONSTDATA date::month July{7}; +CONSTDATA date::month August{8}; +CONSTDATA date::month September{9}; +CONSTDATA date::month October{10}; +CONSTDATA date::month November{11}; +CONSTDATA date::month December{12}; + +CONSTDATA date::weekday Monday{1}; +CONSTDATA date::weekday Tuesday{2}; +CONSTDATA date::weekday Wednesday{3}; +CONSTDATA date::weekday Thursday{4}; +CONSTDATA date::weekday Friday{5}; +CONSTDATA date::weekday Saturday{6}; +CONSTDATA date::weekday Sunday{7}; + +// weekday_indexed + +CONSTCD11 +inline +weekday +weekday_indexed::weekday() const NOEXCEPT +{ + return date::weekday{static_cast(wd_)}; +} + +CONSTCD11 inline unsigned weekday_indexed::index() const NOEXCEPT {return index_;} + +CONSTCD11 +inline +bool +weekday_indexed::ok() const NOEXCEPT +{ + return weekday().ok() && 1 <= index_ && index_ <= 5; +} + +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wconversion" +#endif // __GNUC__ + +CONSTCD11 +inline +weekday_indexed::weekday_indexed(const date::weekday& wd, unsigned index) NOEXCEPT + : wd_(static_cast(static_cast(wd.wd_))) + , index_(static_cast(index)) + {} + +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif // __GNUC__ + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const weekday_indexed& wdi) +{ + return low_level_fmt(os, wdi.weekday()) << '[' << wdi.index() << ']'; +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const weekday_indexed& wdi) +{ + detail::low_level_fmt(os, wdi); + if (!wdi.ok()) + os << " is not a valid weekday_indexed"; + return os; +} + +CONSTCD11 +inline +weekday_indexed +weekday::operator[](unsigned index) const NOEXCEPT +{ + return {*this, index}; +} + +CONSTCD11 +inline +bool +operator==(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT +{ + return x.weekday() == y.weekday() && x.index() == y.index(); +} + +CONSTCD11 +inline +bool +operator!=(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT +{ + return !(x == y); +} + +// weekday_last + +CONSTCD11 inline date::weekday weekday_last::weekday() const NOEXCEPT {return wd_;} +CONSTCD11 inline bool weekday_last::ok() const NOEXCEPT {return wd_.ok();} +CONSTCD11 inline weekday_last::weekday_last(const date::weekday& wd) NOEXCEPT : wd_(wd) {} + +CONSTCD11 +inline +bool +operator==(const weekday_last& x, const weekday_last& y) NOEXCEPT +{ + return x.weekday() == y.weekday(); +} + +CONSTCD11 +inline +bool +operator!=(const weekday_last& x, const weekday_last& y) NOEXCEPT +{ + return !(x == y); +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const weekday_last& wdl) +{ + return low_level_fmt(os, wdl.weekday()) << "[last]"; +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const weekday_last& wdl) +{ + detail::low_level_fmt(os, wdl); + if (!wdl.ok()) + os << " is not a valid weekday_last"; + return os; +} + +CONSTCD11 +inline +weekday_last +weekday::operator[](last_spec) const NOEXCEPT +{ + return weekday_last{*this}; +} + +// year_month + +CONSTCD11 +inline +year_month::year_month(const date::year& y, const date::month& m) NOEXCEPT + : y_(y) + , m_(m) + {} + +CONSTCD11 inline year year_month::year() const NOEXCEPT {return y_;} +CONSTCD11 inline month year_month::month() const NOEXCEPT {return m_;} +CONSTCD11 inline bool year_month::ok() const NOEXCEPT {return y_.ok() && m_.ok();} + +template +CONSTCD14 +inline +year_month& +year_month::operator+=(const months& dm) NOEXCEPT +{ + *this = *this + dm; + return *this; +} + +template +CONSTCD14 +inline +year_month& +year_month::operator-=(const months& dm) NOEXCEPT +{ + *this = *this - dm; + return *this; +} + +CONSTCD14 +inline +year_month& +year_month::operator+=(const years& dy) NOEXCEPT +{ + *this = *this + dy; + return *this; +} + +CONSTCD14 +inline +year_month& +year_month::operator-=(const years& dy) NOEXCEPT +{ + *this = *this - dy; + return *this; +} + +CONSTCD11 +inline +bool +operator==(const year_month& x, const year_month& y) NOEXCEPT +{ + return x.year() == y.year() && x.month() == y.month(); +} + +CONSTCD11 +inline +bool +operator!=(const year_month& x, const year_month& y) NOEXCEPT +{ + return !(x == y); +} + +CONSTCD11 +inline +bool +operator<(const year_month& x, const year_month& y) NOEXCEPT +{ + return x.year() < y.year() ? true + : (x.year() > y.year() ? false + : (x.month() < y.month())); +} + +CONSTCD11 +inline +bool +operator>(const year_month& x, const year_month& y) NOEXCEPT +{ + return y < x; +} + +CONSTCD11 +inline +bool +operator<=(const year_month& x, const year_month& y) NOEXCEPT +{ + return !(y < x); +} + +CONSTCD11 +inline +bool +operator>=(const year_month& x, const year_month& y) NOEXCEPT +{ + return !(x < y); +} + +template +CONSTCD14 +inline +year_month +operator+(const year_month& ym, const months& dm) NOEXCEPT +{ + auto dmi = static_cast(static_cast(ym.month())) - 1 + dm.count(); + auto dy = (dmi >= 0 ? dmi : dmi-11) / 12; + dmi = dmi - dy * 12 + 1; + return (ym.year() + years(dy)) / month(static_cast(dmi)); +} + +template +CONSTCD14 +inline +year_month +operator+(const months& dm, const year_month& ym) NOEXCEPT +{ + return ym + dm; +} + +template +CONSTCD14 +inline +year_month +operator-(const year_month& ym, const months& dm) NOEXCEPT +{ + return ym + -dm; +} + +CONSTCD11 +inline +months +operator-(const year_month& x, const year_month& y) NOEXCEPT +{ + return (x.year() - y.year()) + + months(static_cast(x.month()) - static_cast(y.month())); +} + +CONSTCD11 +inline +year_month +operator+(const year_month& ym, const years& dy) NOEXCEPT +{ + return (ym.year() + dy) / ym.month(); +} + +CONSTCD11 +inline +year_month +operator+(const years& dy, const year_month& ym) NOEXCEPT +{ + return ym + dy; +} + +CONSTCD11 +inline +year_month +operator-(const year_month& ym, const years& dy) NOEXCEPT +{ + return ym + -dy; +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const year_month& ym) +{ + low_level_fmt(os, ym.year()) << '/'; + return low_level_fmt(os, ym.month()); +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const year_month& ym) +{ + detail::low_level_fmt(os, ym); + if (!ym.ok()) + os << " is not a valid year_month"; + return os; +} + +// month_day + +CONSTCD11 +inline +month_day::month_day(const date::month& m, const date::day& d) NOEXCEPT + : m_(m) + , d_(d) + {} + +CONSTCD11 inline date::month month_day::month() const NOEXCEPT {return m_;} +CONSTCD11 inline date::day month_day::day() const NOEXCEPT {return d_;} + +CONSTCD14 +inline +bool +month_day::ok() const NOEXCEPT +{ + CONSTDATA date::day d[] = + { + date::day(31), date::day(29), date::day(31), + date::day(30), date::day(31), date::day(30), + date::day(31), date::day(31), date::day(30), + date::day(31), date::day(30), date::day(31) + }; + return m_.ok() && date::day{1} <= d_ && d_ <= d[static_cast(m_)-1]; +} + +CONSTCD11 +inline +bool +operator==(const month_day& x, const month_day& y) NOEXCEPT +{ + return x.month() == y.month() && x.day() == y.day(); +} + +CONSTCD11 +inline +bool +operator!=(const month_day& x, const month_day& y) NOEXCEPT +{ + return !(x == y); +} + +CONSTCD11 +inline +bool +operator<(const month_day& x, const month_day& y) NOEXCEPT +{ + return x.month() < y.month() ? true + : (x.month() > y.month() ? false + : (x.day() < y.day())); +} + +CONSTCD11 +inline +bool +operator>(const month_day& x, const month_day& y) NOEXCEPT +{ + return y < x; +} + +CONSTCD11 +inline +bool +operator<=(const month_day& x, const month_day& y) NOEXCEPT +{ + return !(y < x); +} + +CONSTCD11 +inline +bool +operator>=(const month_day& x, const month_day& y) NOEXCEPT +{ + return !(x < y); +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const month_day& md) +{ + low_level_fmt(os, md.month()) << '/'; + return low_level_fmt(os, md.day()); +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const month_day& md) +{ + detail::low_level_fmt(os, md); + if (!md.ok()) + os << " is not a valid month_day"; + return os; +} + +// month_day_last + +CONSTCD11 inline month month_day_last::month() const NOEXCEPT {return m_;} +CONSTCD11 inline bool month_day_last::ok() const NOEXCEPT {return m_.ok();} +CONSTCD11 inline month_day_last::month_day_last(const date::month& m) NOEXCEPT : m_(m) {} + +CONSTCD11 +inline +bool +operator==(const month_day_last& x, const month_day_last& y) NOEXCEPT +{ + return x.month() == y.month(); +} + +CONSTCD11 +inline +bool +operator!=(const month_day_last& x, const month_day_last& y) NOEXCEPT +{ + return !(x == y); +} + +CONSTCD11 +inline +bool +operator<(const month_day_last& x, const month_day_last& y) NOEXCEPT +{ + return x.month() < y.month(); +} + +CONSTCD11 +inline +bool +operator>(const month_day_last& x, const month_day_last& y) NOEXCEPT +{ + return y < x; +} + +CONSTCD11 +inline +bool +operator<=(const month_day_last& x, const month_day_last& y) NOEXCEPT +{ + return !(y < x); +} + +CONSTCD11 +inline +bool +operator>=(const month_day_last& x, const month_day_last& y) NOEXCEPT +{ + return !(x < y); +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const month_day_last& mdl) +{ + return low_level_fmt(os, mdl.month()) << "/last"; +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const month_day_last& mdl) +{ + detail::low_level_fmt(os, mdl); + if (!mdl.ok()) + os << " is not a valid month_day_last"; + return os; +} + +// month_weekday + +CONSTCD11 +inline +month_weekday::month_weekday(const date::month& m, + const date::weekday_indexed& wdi) NOEXCEPT + : m_(m) + , wdi_(wdi) + {} + +CONSTCD11 inline month month_weekday::month() const NOEXCEPT {return m_;} + +CONSTCD11 +inline +weekday_indexed +month_weekday::weekday_indexed() const NOEXCEPT +{ + return wdi_; +} + +CONSTCD11 +inline +bool +month_weekday::ok() const NOEXCEPT +{ + return m_.ok() && wdi_.ok(); +} + +CONSTCD11 +inline +bool +operator==(const month_weekday& x, const month_weekday& y) NOEXCEPT +{ + return x.month() == y.month() && x.weekday_indexed() == y.weekday_indexed(); +} + +CONSTCD11 +inline +bool +operator!=(const month_weekday& x, const month_weekday& y) NOEXCEPT +{ + return !(x == y); +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const month_weekday& mwd) +{ + low_level_fmt(os, mwd.month()) << '/'; + return low_level_fmt(os, mwd.weekday_indexed()); +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const month_weekday& mwd) +{ + detail::low_level_fmt(os, mwd); + if (!mwd.ok()) + os << " is not a valid month_weekday"; + return os; +} + +// month_weekday_last + +CONSTCD11 +inline +month_weekday_last::month_weekday_last(const date::month& m, + const date::weekday_last& wdl) NOEXCEPT + : m_(m) + , wdl_(wdl) + {} + +CONSTCD11 inline month month_weekday_last::month() const NOEXCEPT {return m_;} + +CONSTCD11 +inline +weekday_last +month_weekday_last::weekday_last() const NOEXCEPT +{ + return wdl_; +} + +CONSTCD11 +inline +bool +month_weekday_last::ok() const NOEXCEPT +{ + return m_.ok() && wdl_.ok(); +} + +CONSTCD11 +inline +bool +operator==(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT +{ + return x.month() == y.month() && x.weekday_last() == y.weekday_last(); +} + +CONSTCD11 +inline +bool +operator!=(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT +{ + return !(x == y); +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const month_weekday_last& mwdl) +{ + low_level_fmt(os, mwdl.month()) << '/'; + return low_level_fmt(os, mwdl.weekday_last()); +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const month_weekday_last& mwdl) +{ + detail::low_level_fmt(os, mwdl); + if (!mwdl.ok()) + os << " is not a valid month_weekday_last"; + return os; +} + +// year_month_day_last + +CONSTCD11 +inline +year_month_day_last::year_month_day_last(const date::year& y, + const date::month_day_last& mdl) NOEXCEPT + : y_(y) + , mdl_(mdl) + {} + +template +CONSTCD14 +inline +year_month_day_last& +year_month_day_last::operator+=(const months& m) NOEXCEPT +{ + *this = *this + m; + return *this; +} + +template +CONSTCD14 +inline +year_month_day_last& +year_month_day_last::operator-=(const months& m) NOEXCEPT +{ + *this = *this - m; + return *this; +} + +CONSTCD14 +inline +year_month_day_last& +year_month_day_last::operator+=(const years& y) NOEXCEPT +{ + *this = *this + y; + return *this; +} + +CONSTCD14 +inline +year_month_day_last& +year_month_day_last::operator-=(const years& y) NOEXCEPT +{ + *this = *this - y; + return *this; +} + +CONSTCD11 inline year year_month_day_last::year() const NOEXCEPT {return y_;} +CONSTCD11 inline month year_month_day_last::month() const NOEXCEPT {return mdl_.month();} + +CONSTCD11 +inline +month_day_last +year_month_day_last::month_day_last() const NOEXCEPT +{ + return mdl_; +} + +CONSTCD14 +inline +day +year_month_day_last::day() const NOEXCEPT +{ + CONSTDATA date::day d[] = + { + date::day(31), date::day(28), date::day(31), + date::day(30), date::day(31), date::day(30), + date::day(31), date::day(31), date::day(30), + date::day(31), date::day(30), date::day(31) + }; + return (month() != February || !y_.is_leap()) && mdl_.ok() ? + d[static_cast(month()) - 1] : date::day{29}; +} + +CONSTCD14 +inline +year_month_day_last::operator sys_days() const NOEXCEPT +{ + return sys_days(year()/month()/day()); +} + +CONSTCD14 +inline +year_month_day_last::operator local_days() const NOEXCEPT +{ + return local_days(year()/month()/day()); +} + +CONSTCD11 +inline +bool +year_month_day_last::ok() const NOEXCEPT +{ + return y_.ok() && mdl_.ok(); +} + +CONSTCD11 +inline +bool +operator==(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT +{ + return x.year() == y.year() && x.month_day_last() == y.month_day_last(); +} + +CONSTCD11 +inline +bool +operator!=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT +{ + return !(x == y); +} + +CONSTCD11 +inline +bool +operator<(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT +{ + return x.year() < y.year() ? true + : (x.year() > y.year() ? false + : (x.month_day_last() < y.month_day_last())); +} + +CONSTCD11 +inline +bool +operator>(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT +{ + return y < x; +} + +CONSTCD11 +inline +bool +operator<=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT +{ + return !(y < x); +} + +CONSTCD11 +inline +bool +operator>=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT +{ + return !(x < y); +} + +namespace detail +{ + +template +std::basic_ostream& +low_level_fmt(std::basic_ostream& os, const year_month_day_last& ymdl) +{ + low_level_fmt(os, ymdl.year()) << '/'; + return low_level_fmt(os, ymdl.month_day_last()); +} + +} // namespace detail + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const year_month_day_last& ymdl) +{ + detail::low_level_fmt(os, ymdl); + if (!ymdl.ok()) + os << " is not a valid year_month_day_last"; + return os; +} + +template +CONSTCD14 +inline +year_month_day_last +operator+(const year_month_day_last& ymdl, const months& dm) NOEXCEPT +{ + return (ymdl.year() / ymdl.month() + dm) / last; +} + +template +CONSTCD14 +inline +year_month_day_last +operator+(const months& dm, const year_month_day_last& ymdl) NOEXCEPT +{ + return ymdl + dm; +} + +template +CONSTCD14 +inline +year_month_day_last +operator-(const year_month_day_last& ymdl, const months& dm) NOEXCEPT +{ + return ymdl + (-dm); +} + +CONSTCD11 +inline +year_month_day_last +operator+(const year_month_day_last& ymdl, const years& dy) NOEXCEPT +{ + return {ymdl.year()+dy, ymdl.month_day_last()}; +} + +CONSTCD11 +inline +year_month_day_last +operator+(const years& dy, const year_month_day_last& ymdl) NOEXCEPT +{ + return ymdl + dy; +} + +CONSTCD11 +inline +year_month_day_last +operator-(const year_month_day_last& ymdl, const years& dy) NOEXCEPT +{ + return ymdl + (-dy); +} + +// year_month_day + +CONSTCD11 +inline +year_month_day::year_month_day(const date::year& y, const date::month& m, + const date::day& d) NOEXCEPT + : y_(y) + , m_(m) + , d_(d) + {} + +CONSTCD14 +inline +year_month_day::year_month_day(const year_month_day_last& ymdl) NOEXCEPT + : y_(ymdl.year()) + , m_(ymdl.month()) + , d_(ymdl.day()) + {} + +CONSTCD14 +inline +year_month_day::year_month_day(sys_days dp) NOEXCEPT + : year_month_day(from_days(dp.time_since_epoch())) + {} + +CONSTCD14 +inline +year_month_day::year_month_day(local_days dp) NOEXCEPT + : year_month_day(from_days(dp.time_since_epoch())) + {} + +CONSTCD11 inline year year_month_day::year() const NOEXCEPT {return y_;} +CONSTCD11 inline month year_month_day::month() const NOEXCEPT {return m_;} +CONSTCD11 inline day year_month_day::day() const NOEXCEPT {return d_;} + +template +CONSTCD14 +inline +year_month_day& +year_month_day::operator+=(const months& m) NOEXCEPT +{ + *this = *this + m; + return *this; +} + +template +CONSTCD14 +inline +year_month_day& +year_month_day::operator-=(const months& m) NOEXCEPT +{ + *this = *this - m; + return *this; +} + +CONSTCD14 +inline +year_month_day& +year_month_day::operator+=(const years& y) NOEXCEPT +{ + *this = *this + y; + return *this; +} + +CONSTCD14 +inline +year_month_day& +year_month_day::operator-=(const years& y) NOEXCEPT +{ + *this = *this - y; + return *this; +} + +CONSTCD14 +inline +days +year_month_day::to_days() const NOEXCEPT +{ + static_assert(std::numeric_limits::digits >= 18, + "This algorithm has not been ported to a 16 bit unsigned integer"); + static_assert(std::numeric_limits::digits >= 20, + "This algorithm has not been ported to a 16 bit signed integer"); + auto const y = static_cast(y_) - (m_ <= February); + auto const m = static_cast(m_); + auto const d = static_cast(d_); + auto const era = (y >= 0 ? y : y-399) / 400; + auto const yoe = static_cast(y - era * 400); // [0, 399] + auto const doy = (153*(m > 2 ? m-3 : m+9) + 2)/5 + d-1; // [0, 365] + auto const doe = yoe * 365 + yoe/4 - yoe/100 + doy; // [0, 146096] + return days{era * 146097 + static_cast(doe) - 719468}; +} + +CONSTCD14 +inline +year_month_day::operator sys_days() const NOEXCEPT +{ + return sys_days{to_days()}; +} + +CONSTCD14 +inline +year_month_day::operator local_days() const NOEXCEPT +{ + return local_days{to_days()}; +} + +CONSTCD14 +inline +bool +year_month_day::ok() const NOEXCEPT +{ + if (!(y_.ok() && m_.ok())) + return false; + return date::day{1} <= d_ && d_ <= (y_ / m_ / last).day(); +} + +CONSTCD11 +inline +bool +operator==(const year_month_day& x, const year_month_day& y) NOEXCEPT +{ + return x.year() == y.year() && x.month() == y.month() && x.day() == y.day(); +} + +CONSTCD11 +inline +bool +operator!=(const year_month_day& x, const year_month_day& y) NOEXCEPT +{ + return !(x == y); +} + +CONSTCD11 +inline +bool +operator<(const year_month_day& x, const year_month_day& y) NOEXCEPT +{ + return x.year() < y.year() ? true + : (x.year() > y.year() ? false + : (x.month() < y.month() ? true + : (x.month() > y.month() ? false + : (x.day() < y.day())))); +} + +CONSTCD11 +inline +bool +operator>(const year_month_day& x, const year_month_day& y) NOEXCEPT +{ + return y < x; +} + +CONSTCD11 +inline +bool +operator<=(const year_month_day& x, const year_month_day& y) NOEXCEPT +{ + return !(y < x); +} + +CONSTCD11 +inline +bool +operator>=(const year_month_day& x, const year_month_day& y) NOEXCEPT +{ + return !(x < y); +} + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const year_month_day& ymd) +{ + detail::save_ostream _(os); + os.fill('0'); + os.flags(std::ios::dec | std::ios::right); + os.imbue(std::locale::classic()); + os << static_cast(ymd.year()) << '-'; + os.width(2); + os << static_cast(ymd.month()) << '-'; + os.width(2); + os << static_cast(ymd.day()); + if (!ymd.ok()) + os << " is not a valid year_month_day"; + return os; +} + +CONSTCD14 +inline +year_month_day +year_month_day::from_days(days dp) NOEXCEPT +{ + static_assert(std::numeric_limits::digits >= 18, + "This algorithm has not been ported to a 16 bit unsigned integer"); + static_assert(std::numeric_limits::digits >= 20, + "This algorithm has not been ported to a 16 bit signed integer"); + auto const z = dp.count() + 719468; + auto const era = (z >= 0 ? z : z - 146096) / 146097; + auto const doe = static_cast(z - era * 146097); // [0, 146096] + auto const yoe = (doe - doe/1460 + doe/36524 - doe/146096) / 365; // [0, 399] + auto const y = static_cast(yoe) + era * 400; + auto const doy = doe - (365*yoe + yoe/4 - yoe/100); // [0, 365] + auto const mp = (5*doy + 2)/153; // [0, 11] + auto const d = doy - (153*mp+2)/5 + 1; // [1, 31] + auto const m = mp < 10 ? mp+3 : mp-9; // [1, 12] + return year_month_day{date::year{y + (m <= 2)}, date::month(m), date::day(d)}; +} + +template +CONSTCD14 +inline +year_month_day +operator+(const year_month_day& ymd, const months& dm) NOEXCEPT +{ + return (ymd.year() / ymd.month() + dm) / ymd.day(); +} + +template +CONSTCD14 +inline +year_month_day +operator+(const months& dm, const year_month_day& ymd) NOEXCEPT +{ + return ymd + dm; +} + +template +CONSTCD14 +inline +year_month_day +operator-(const year_month_day& ymd, const months& dm) NOEXCEPT +{ + return ymd + (-dm); +} + +CONSTCD11 +inline +year_month_day +operator+(const year_month_day& ymd, const years& dy) NOEXCEPT +{ + return (ymd.year() + dy) / ymd.month() / ymd.day(); +} + +CONSTCD11 +inline +year_month_day +operator+(const years& dy, const year_month_day& ymd) NOEXCEPT +{ + return ymd + dy; +} + +CONSTCD11 +inline +year_month_day +operator-(const year_month_day& ymd, const years& dy) NOEXCEPT +{ + return ymd + (-dy); +} + +// year_month_weekday + +CONSTCD11 +inline +year_month_weekday::year_month_weekday(const date::year& y, const date::month& m, + const date::weekday_indexed& wdi) + NOEXCEPT + : y_(y) + , m_(m) + , wdi_(wdi) + {} + +CONSTCD14 +inline +year_month_weekday::year_month_weekday(const sys_days& dp) NOEXCEPT + : year_month_weekday(from_days(dp.time_since_epoch())) + {} + +CONSTCD14 +inline +year_month_weekday::year_month_weekday(const local_days& dp) NOEXCEPT + : year_month_weekday(from_days(dp.time_since_epoch())) + {} + +template +CONSTCD14 +inline +year_month_weekday& +year_month_weekday::operator+=(const months& m) NOEXCEPT +{ + *this = *this + m; + return *this; +} + +template +CONSTCD14 +inline +year_month_weekday& +year_month_weekday::operator-=(const months& m) NOEXCEPT +{ + *this = *this - m; + return *this; +} + +CONSTCD14 +inline +year_month_weekday& +year_month_weekday::operator+=(const years& y) NOEXCEPT +{ + *this = *this + y; + return *this; +} + +CONSTCD14 +inline +year_month_weekday& +year_month_weekday::operator-=(const years& y) NOEXCEPT +{ + *this = *this - y; + return *this; +} + +CONSTCD11 inline year year_month_weekday::year() const NOEXCEPT {return y_;} +CONSTCD11 inline month year_month_weekday::month() const NOEXCEPT {return m_;} + +CONSTCD11 +inline +weekday +year_month_weekday::weekday() const NOEXCEPT +{ + return wdi_.weekday(); +} + +CONSTCD11 +inline +unsigned +year_month_weekday::index() const NOEXCEPT +{ + return wdi_.index(); +} + +CONSTCD11 +inline +weekday_indexed +year_month_weekday::weekday_indexed() const NOEXCEPT +{ + return wdi_; +} + +CONSTCD14 +inline +year_month_weekday::operator sys_days() const NOEXCEPT +{ + return sys_days{to_days()}; +} + +CONSTCD14 +inline +year_month_weekday::operator local_days() const NOEXCEPT +{ + return local_days{to_days()}; +} + +CONSTCD14 +inline +bool +year_month_weekday::ok() const NOEXCEPT +{ + if (!y_.ok() || !m_.ok() || !wdi_.weekday().ok() || wdi_.index() < 1) + return false; + if (wdi_.index() <= 4) + return true; + auto d2 = wdi_.weekday() - date::weekday(static_cast(y_/m_/1)) + + days((wdi_.index()-1)*7 + 1); + return static_cast(d2.count()) <= static_cast((y_/m_/last).day()); +} + +CONSTCD14 +inline +year_month_weekday +year_month_weekday::from_days(days d) NOEXCEPT +{ + sys_days dp{d}; + auto const wd = date::weekday(dp); + auto const ymd = year_month_day(dp); + return {ymd.year(), ymd.month(), wd[(static_cast(ymd.day())-1)/7+1]}; +} + +CONSTCD14 +inline +days +year_month_weekday::to_days() const NOEXCEPT +{ + auto d = sys_days(y_/m_/1); + return (d + (wdi_.weekday() - date::weekday(d) + days{(wdi_.index()-1)*7}) + ).time_since_epoch(); +} + +CONSTCD11 +inline +bool +operator==(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT +{ + return x.year() == y.year() && x.month() == y.month() && + x.weekday_indexed() == y.weekday_indexed(); +} + +CONSTCD11 +inline +bool +operator!=(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT +{ + return !(x == y); +} + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const year_month_weekday& ymwdi) +{ + detail::low_level_fmt(os, ymwdi.year()) << '/'; + detail::low_level_fmt(os, ymwdi.month()) << '/'; + detail::low_level_fmt(os, ymwdi.weekday_indexed()); + if (!ymwdi.ok()) + os << " is not a valid year_month_weekday"; + return os; +} + +template +CONSTCD14 +inline +year_month_weekday +operator+(const year_month_weekday& ymwd, const months& dm) NOEXCEPT +{ + return (ymwd.year() / ymwd.month() + dm) / ymwd.weekday_indexed(); +} + +template +CONSTCD14 +inline +year_month_weekday +operator+(const months& dm, const year_month_weekday& ymwd) NOEXCEPT +{ + return ymwd + dm; +} + +template +CONSTCD14 +inline +year_month_weekday +operator-(const year_month_weekday& ymwd, const months& dm) NOEXCEPT +{ + return ymwd + (-dm); +} + +CONSTCD11 +inline +year_month_weekday +operator+(const year_month_weekday& ymwd, const years& dy) NOEXCEPT +{ + return {ymwd.year()+dy, ymwd.month(), ymwd.weekday_indexed()}; +} + +CONSTCD11 +inline +year_month_weekday +operator+(const years& dy, const year_month_weekday& ymwd) NOEXCEPT +{ + return ymwd + dy; +} + +CONSTCD11 +inline +year_month_weekday +operator-(const year_month_weekday& ymwd, const years& dy) NOEXCEPT +{ + return ymwd + (-dy); +} + +// year_month_weekday_last + +CONSTCD11 +inline +year_month_weekday_last::year_month_weekday_last(const date::year& y, + const date::month& m, + const date::weekday_last& wdl) NOEXCEPT + : y_(y) + , m_(m) + , wdl_(wdl) + {} + +template +CONSTCD14 +inline +year_month_weekday_last& +year_month_weekday_last::operator+=(const months& m) NOEXCEPT +{ + *this = *this + m; + return *this; +} + +template +CONSTCD14 +inline +year_month_weekday_last& +year_month_weekday_last::operator-=(const months& m) NOEXCEPT +{ + *this = *this - m; + return *this; +} + +CONSTCD14 +inline +year_month_weekday_last& +year_month_weekday_last::operator+=(const years& y) NOEXCEPT +{ + *this = *this + y; + return *this; +} + +CONSTCD14 +inline +year_month_weekday_last& +year_month_weekday_last::operator-=(const years& y) NOEXCEPT +{ + *this = *this - y; + return *this; +} + +CONSTCD11 inline year year_month_weekday_last::year() const NOEXCEPT {return y_;} +CONSTCD11 inline month year_month_weekday_last::month() const NOEXCEPT {return m_;} + +CONSTCD11 +inline +weekday +year_month_weekday_last::weekday() const NOEXCEPT +{ + return wdl_.weekday(); +} + +CONSTCD11 +inline +weekday_last +year_month_weekday_last::weekday_last() const NOEXCEPT +{ + return wdl_; +} + +CONSTCD14 +inline +year_month_weekday_last::operator sys_days() const NOEXCEPT +{ + return sys_days{to_days()}; +} + +CONSTCD14 +inline +year_month_weekday_last::operator local_days() const NOEXCEPT +{ + return local_days{to_days()}; +} + +CONSTCD11 +inline +bool +year_month_weekday_last::ok() const NOEXCEPT +{ + return y_.ok() && m_.ok() && wdl_.ok(); +} + +CONSTCD14 +inline +days +year_month_weekday_last::to_days() const NOEXCEPT +{ + auto const d = sys_days(y_/m_/last); + return (d - (date::weekday{d} - wdl_.weekday())).time_since_epoch(); +} + +CONSTCD11 +inline +bool +operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT +{ + return x.year() == y.year() && x.month() == y.month() && + x.weekday_last() == y.weekday_last(); +} + +CONSTCD11 +inline +bool +operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT +{ + return !(x == y); +} + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const year_month_weekday_last& ymwdl) +{ + detail::low_level_fmt(os, ymwdl.year()) << '/'; + detail::low_level_fmt(os, ymwdl.month()) << '/'; + detail::low_level_fmt(os, ymwdl.weekday_last()); + if (!ymwdl.ok()) + os << " is not a valid year_month_weekday_last"; + return os; +} + +template +CONSTCD14 +inline +year_month_weekday_last +operator+(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT +{ + return (ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last(); +} + +template +CONSTCD14 +inline +year_month_weekday_last +operator+(const months& dm, const year_month_weekday_last& ymwdl) NOEXCEPT +{ + return ymwdl + dm; +} + +template +CONSTCD14 +inline +year_month_weekday_last +operator-(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT +{ + return ymwdl + (-dm); +} + +CONSTCD11 +inline +year_month_weekday_last +operator+(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT +{ + return {ymwdl.year()+dy, ymwdl.month(), ymwdl.weekday_last()}; +} + +CONSTCD11 +inline +year_month_weekday_last +operator+(const years& dy, const year_month_weekday_last& ymwdl) NOEXCEPT +{ + return ymwdl + dy; +} + +CONSTCD11 +inline +year_month_weekday_last +operator-(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT +{ + return ymwdl + (-dy); +} + +// year_month from operator/() + +CONSTCD11 +inline +year_month +operator/(const year& y, const month& m) NOEXCEPT +{ + return {y, m}; +} + +CONSTCD11 +inline +year_month +operator/(const year& y, int m) NOEXCEPT +{ + return y / month(static_cast(m)); +} + +// month_day from operator/() + +CONSTCD11 +inline +month_day +operator/(const month& m, const day& d) NOEXCEPT +{ + return {m, d}; +} + +CONSTCD11 +inline +month_day +operator/(const day& d, const month& m) NOEXCEPT +{ + return m / d; +} + +CONSTCD11 +inline +month_day +operator/(const month& m, int d) NOEXCEPT +{ + return m / day(static_cast(d)); +} + +CONSTCD11 +inline +month_day +operator/(int m, const day& d) NOEXCEPT +{ + return month(static_cast(m)) / d; +} + +CONSTCD11 inline month_day operator/(const day& d, int m) NOEXCEPT {return m / d;} + +// month_day_last from operator/() + +CONSTCD11 +inline +month_day_last +operator/(const month& m, last_spec) NOEXCEPT +{ + return month_day_last{m}; +} + +CONSTCD11 +inline +month_day_last +operator/(last_spec, const month& m) NOEXCEPT +{ + return m/last; +} + +CONSTCD11 +inline +month_day_last +operator/(int m, last_spec) NOEXCEPT +{ + return month(static_cast(m))/last; +} + +CONSTCD11 +inline +month_day_last +operator/(last_spec, int m) NOEXCEPT +{ + return m/last; +} + +// month_weekday from operator/() + +CONSTCD11 +inline +month_weekday +operator/(const month& m, const weekday_indexed& wdi) NOEXCEPT +{ + return {m, wdi}; +} + +CONSTCD11 +inline +month_weekday +operator/(const weekday_indexed& wdi, const month& m) NOEXCEPT +{ + return m / wdi; +} + +CONSTCD11 +inline +month_weekday +operator/(int m, const weekday_indexed& wdi) NOEXCEPT +{ + return month(static_cast(m)) / wdi; +} + +CONSTCD11 +inline +month_weekday +operator/(const weekday_indexed& wdi, int m) NOEXCEPT +{ + return m / wdi; +} + +// month_weekday_last from operator/() + +CONSTCD11 +inline +month_weekday_last +operator/(const month& m, const weekday_last& wdl) NOEXCEPT +{ + return {m, wdl}; +} + +CONSTCD11 +inline +month_weekday_last +operator/(const weekday_last& wdl, const month& m) NOEXCEPT +{ + return m / wdl; +} + +CONSTCD11 +inline +month_weekday_last +operator/(int m, const weekday_last& wdl) NOEXCEPT +{ + return month(static_cast(m)) / wdl; +} + +CONSTCD11 +inline +month_weekday_last +operator/(const weekday_last& wdl, int m) NOEXCEPT +{ + return m / wdl; +} + +// year_month_day from operator/() + +CONSTCD11 +inline +year_month_day +operator/(const year_month& ym, const day& d) NOEXCEPT +{ + return {ym.year(), ym.month(), d}; +} + +CONSTCD11 +inline +year_month_day +operator/(const year_month& ym, int d) NOEXCEPT +{ + return ym / day(static_cast(d)); +} + +CONSTCD11 +inline +year_month_day +operator/(const year& y, const month_day& md) NOEXCEPT +{ + return y / md.month() / md.day(); +} + +CONSTCD11 +inline +year_month_day +operator/(int y, const month_day& md) NOEXCEPT +{ + return year(y) / md; +} + +CONSTCD11 +inline +year_month_day +operator/(const month_day& md, const year& y) NOEXCEPT +{ + return y / md; +} + +CONSTCD11 +inline +year_month_day +operator/(const month_day& md, int y) NOEXCEPT +{ + return year(y) / md; +} + +// year_month_day_last from operator/() + +CONSTCD11 +inline +year_month_day_last +operator/(const year_month& ym, last_spec) NOEXCEPT +{ + return {ym.year(), month_day_last{ym.month()}}; +} + +CONSTCD11 +inline +year_month_day_last +operator/(const year& y, const month_day_last& mdl) NOEXCEPT +{ + return {y, mdl}; +} + +CONSTCD11 +inline +year_month_day_last +operator/(int y, const month_day_last& mdl) NOEXCEPT +{ + return year(y) / mdl; +} + +CONSTCD11 +inline +year_month_day_last +operator/(const month_day_last& mdl, const year& y) NOEXCEPT +{ + return y / mdl; +} + +CONSTCD11 +inline +year_month_day_last +operator/(const month_day_last& mdl, int y) NOEXCEPT +{ + return year(y) / mdl; +} + +// year_month_weekday from operator/() + +CONSTCD11 +inline +year_month_weekday +operator/(const year_month& ym, const weekday_indexed& wdi) NOEXCEPT +{ + return {ym.year(), ym.month(), wdi}; +} + +CONSTCD11 +inline +year_month_weekday +operator/(const year& y, const month_weekday& mwd) NOEXCEPT +{ + return {y, mwd.month(), mwd.weekday_indexed()}; +} + +CONSTCD11 +inline +year_month_weekday +operator/(int y, const month_weekday& mwd) NOEXCEPT +{ + return year(y) / mwd; +} + +CONSTCD11 +inline +year_month_weekday +operator/(const month_weekday& mwd, const year& y) NOEXCEPT +{ + return y / mwd; +} + +CONSTCD11 +inline +year_month_weekday +operator/(const month_weekday& mwd, int y) NOEXCEPT +{ + return year(y) / mwd; +} + +// year_month_weekday_last from operator/() + +CONSTCD11 +inline +year_month_weekday_last +operator/(const year_month& ym, const weekday_last& wdl) NOEXCEPT +{ + return {ym.year(), ym.month(), wdl}; +} + +CONSTCD11 +inline +year_month_weekday_last +operator/(const year& y, const month_weekday_last& mwdl) NOEXCEPT +{ + return {y, mwdl.month(), mwdl.weekday_last()}; +} + +CONSTCD11 +inline +year_month_weekday_last +operator/(int y, const month_weekday_last& mwdl) NOEXCEPT +{ + return year(y) / mwdl; +} + +CONSTCD11 +inline +year_month_weekday_last +operator/(const month_weekday_last& mwdl, const year& y) NOEXCEPT +{ + return y / mwdl; +} + +CONSTCD11 +inline +year_month_weekday_last +operator/(const month_weekday_last& mwdl, int y) NOEXCEPT +{ + return year(y) / mwdl; +} + +template +struct fields; + +template +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, + const fields& fds, const std::string* abbrev = nullptr, + const std::chrono::seconds* offset_sec = nullptr); + +template +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, + fields& fds, std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr); + +// hh_mm_ss + +namespace detail +{ + +struct undocumented {explicit undocumented() = default;}; + +// width::value is the number of fractional decimal digits in 1/n +// width<0>::value and width<1>::value are defined to be 0 +// If 1/n takes more than 18 fractional decimal digits, +// the result is truncated to 19. +// Example: width<2>::value == 1 +// Example: width<3>::value == 19 +// Example: width<4>::value == 2 +// Example: width<10>::value == 1 +// Example: width<1000>::value == 3 +template +struct width +{ + static_assert(d > 0, "width called with zero denominator"); + static CONSTDATA unsigned value = 1 + width::value; +}; + +template +struct width +{ + static CONSTDATA unsigned value = 0; +}; + +template +struct static_pow10 +{ +private: + static CONSTDATA std::uint64_t h = static_pow10::value; +public: + static CONSTDATA std::uint64_t value = h * h * (exp % 2 ? 10 : 1); +}; + +template <> +struct static_pow10<0> +{ + static CONSTDATA std::uint64_t value = 1; +}; + +template +class decimal_format_seconds +{ + using CT = typename std::common_type::type; + using rep = typename CT::rep; + static unsigned CONSTDATA trial_width = + detail::width::value; +public: + static unsigned CONSTDATA width = trial_width < 19 ? trial_width : 6u; + using precision = std::chrono::duration::value>>; + +private: + std::chrono::seconds s_; + precision sub_s_; + +public: + CONSTCD11 decimal_format_seconds() + : s_() + , sub_s_() + {} + + CONSTCD11 explicit decimal_format_seconds(const Duration& d) NOEXCEPT + : s_(std::chrono::duration_cast(d)) + , sub_s_(std::chrono::duration_cast(d - s_)) + {} + + CONSTCD14 std::chrono::seconds& seconds() NOEXCEPT {return s_;} + CONSTCD11 std::chrono::seconds seconds() const NOEXCEPT {return s_;} + CONSTCD11 precision subseconds() const NOEXCEPT {return sub_s_;} + + CONSTCD14 precision to_duration() const NOEXCEPT + { + return s_ + sub_s_; + } + + CONSTCD11 bool in_conventional_range() const NOEXCEPT + { + return sub_s_ < std::chrono::seconds{1} && s_ < std::chrono::minutes{1}; + } + + template + friend + std::basic_ostream& + operator<<(std::basic_ostream& os, const decimal_format_seconds& x) + { + return x.print(os, std::chrono::treat_as_floating_point{}); + } + + template + std::basic_ostream& + print(std::basic_ostream& os, std::true_type) const + { + date::detail::save_ostream _(os); + std::chrono::duration d = s_ + sub_s_; + if (d < std::chrono::seconds{10}) + os << '0'; + os.precision(width+6); + os << std::fixed << d.count(); + return os; + } + + template + std::basic_ostream& + print(std::basic_ostream& os, std::false_type) const + { + date::detail::save_ostream _(os); + os.fill('0'); + os.flags(std::ios::dec | std::ios::right); + os.width(2); + os << s_.count(); + if (width > 0) + { +#if !ONLY_C_LOCALE + os << std::use_facet>(os.getloc()).decimal_point(); +#else + os << '.'; +#endif + date::detail::save_ostream _s(os); + os.imbue(std::locale::classic()); + os.width(width); + os << sub_s_.count(); + } + return os; + } +}; + +template +inline +CONSTCD11 +typename std::enable_if + < + std::numeric_limits::is_signed, + std::chrono::duration + >::type +abs(std::chrono::duration d) +{ + return d >= d.zero() ? +d : -d; +} + +template +inline +CONSTCD11 +typename std::enable_if + < + !std::numeric_limits::is_signed, + std::chrono::duration + >::type +abs(std::chrono::duration d) +{ + return d; +} + +} // namespace detail + +template +class hh_mm_ss +{ + using dfs = detail::decimal_format_seconds::type>; + + std::chrono::hours h_; + std::chrono::minutes m_; + dfs s_; + bool neg_; + +public: + static unsigned CONSTDATA fractional_width = dfs::width; + using precision = typename dfs::precision; + + CONSTCD11 hh_mm_ss() NOEXCEPT + : hh_mm_ss(Duration::zero()) + {} + + CONSTCD11 explicit hh_mm_ss(Duration d) NOEXCEPT + : h_(std::chrono::duration_cast(detail::abs(d))) + , m_(std::chrono::duration_cast(detail::abs(d)) - h_) + , s_(detail::abs(d) - h_ - m_) + , neg_(d < Duration::zero()) + {} + + CONSTCD11 std::chrono::hours hours() const NOEXCEPT {return h_;} + CONSTCD11 std::chrono::minutes minutes() const NOEXCEPT {return m_;} + CONSTCD11 std::chrono::seconds seconds() const NOEXCEPT {return s_.seconds();} + CONSTCD14 std::chrono::seconds& + seconds(detail::undocumented) NOEXCEPT {return s_.seconds();} + CONSTCD11 precision subseconds() const NOEXCEPT {return s_.subseconds();} + CONSTCD11 bool is_negative() const NOEXCEPT {return neg_;} + + CONSTCD11 explicit operator precision() const NOEXCEPT {return to_duration();} + CONSTCD11 precision to_duration() const NOEXCEPT + {return (s_.to_duration() + m_ + h_) * (1-2*neg_);} + + CONSTCD11 bool in_conventional_range() const NOEXCEPT + { + return !neg_ && h_ < days{1} && m_ < std::chrono::hours{1} && + s_.in_conventional_range(); + } + +private: + + template + friend + std::basic_ostream& + operator<<(std::basic_ostream& os, hh_mm_ss const& tod) + { + if (tod.is_negative()) + os << '-'; + if (tod.h_ < std::chrono::hours{10}) + os << '0'; + os << tod.h_.count() << ':'; + if (tod.m_ < std::chrono::minutes{10}) + os << '0'; + os << tod.m_.count() << ':' << tod.s_; + return os; + } + + template + friend + std::basic_ostream& + date::to_stream(std::basic_ostream& os, const CharT* fmt, + const fields& fds, const std::string* abbrev, + const std::chrono::seconds* offset_sec); + + template + friend + std::basic_istream& + date::from_stream(std::basic_istream& is, const CharT* fmt, + fields& fds, + std::basic_string* abbrev, std::chrono::minutes* offset); +}; + +inline +CONSTCD14 +bool +is_am(std::chrono::hours const& h) NOEXCEPT +{ + using std::chrono::hours; + return hours{0} <= h && h < hours{12}; +} + +inline +CONSTCD14 +bool +is_pm(std::chrono::hours const& h) NOEXCEPT +{ + using std::chrono::hours; + return hours{12} <= h && h < hours{24}; +} + +inline +CONSTCD14 +std::chrono::hours +make12(std::chrono::hours h) NOEXCEPT +{ + using std::chrono::hours; + if (h < hours{12}) + { + if (h == hours{0}) + h = hours{12}; + } + else + { + if (h != hours{12}) + h = h - hours{12}; + } + return h; +} + +inline +CONSTCD14 +std::chrono::hours +make24(std::chrono::hours h, bool is_pm) NOEXCEPT +{ + using std::chrono::hours; + if (is_pm) + { + if (h != hours{12}) + h = h + hours{12}; + } + else if (h == hours{12}) + h = hours{0}; + return h; +} + +template +using time_of_day = hh_mm_ss; + +template +CONSTCD11 +inline +hh_mm_ss> +make_time(const std::chrono::duration& d) +{ + return hh_mm_ss>(d); +} + +template +inline +typename std::enable_if +< + std::ratio_less::value + , std::basic_ostream& +>::type +operator<<(std::basic_ostream& os, const sys_time& tp) +{ + auto const dp = date::floor(tp); + return os << year_month_day(dp) << ' ' << make_time(tp-dp); +} + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const sys_days& dp) +{ + return os << year_month_day(dp); +} + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const local_time& ut) +{ + return (os << sys_time{ut.time_since_epoch()}); +} + +namespace detail +{ + +template +class string_literal; + +template +inline +CONSTCD14 +string_literal::type, + N1 + N2 - 1> +operator+(const string_literal& x, const string_literal& y) NOEXCEPT; + +template +class string_literal +{ + CharT p_[N]; + + CONSTCD11 string_literal() NOEXCEPT + : p_{} + {} + +public: + using const_iterator = const CharT*; + + string_literal(string_literal const&) = default; + string_literal& operator=(string_literal const&) = delete; + + template ::type> + CONSTCD11 string_literal(CharT c) NOEXCEPT + : p_{c} + { + } + + template ::type> + CONSTCD11 string_literal(CharT c1, CharT c2) NOEXCEPT + : p_{c1, c2} + { + } + + template ::type> + CONSTCD11 string_literal(CharT c1, CharT c2, CharT c3) NOEXCEPT + : p_{c1, c2, c3} + { + } + + CONSTCD14 string_literal(const CharT(&a)[N]) NOEXCEPT + : p_{} + { + for (std::size_t i = 0; i < N; ++i) + p_[i] = a[i]; + } + + template ::type> + CONSTCD14 string_literal(const char(&a)[N]) NOEXCEPT + : p_{} + { + for (std::size_t i = 0; i < N; ++i) + p_[i] = a[i]; + } + + template ::value>::type> + CONSTCD14 string_literal(string_literal const& a) NOEXCEPT + : p_{} + { + for (std::size_t i = 0; i < N; ++i) + p_[i] = a[i]; + } + + CONSTCD11 const CharT* data() const NOEXCEPT {return p_;} + CONSTCD11 std::size_t size() const NOEXCEPT {return N-1;} + + CONSTCD11 const_iterator begin() const NOEXCEPT {return p_;} + CONSTCD11 const_iterator end() const NOEXCEPT {return p_ + N-1;} + + CONSTCD11 CharT const& operator[](std::size_t n) const NOEXCEPT + { + return p_[n]; + } + + template + friend + std::basic_ostream& + operator<<(std::basic_ostream& os, const string_literal& s) + { + return os << s.p_; + } + + template + friend + CONSTCD14 + string_literal::type, + N1 + N2 - 1> + operator+(const string_literal& x, const string_literal& y) NOEXCEPT; +}; + +template +CONSTCD11 +inline +string_literal +operator+(const string_literal& x, const string_literal& y) NOEXCEPT +{ + return string_literal(x[0], y[0]); +} + +template +CONSTCD11 +inline +string_literal +operator+(const string_literal& x, const string_literal& y) NOEXCEPT +{ + return string_literal(x[0], x[1], y[0]); +} + +template +CONSTCD14 +inline +string_literal::type, + N1 + N2 - 1> +operator+(const string_literal& x, const string_literal& y) NOEXCEPT +{ + using CT = typename std::conditional::type; + + string_literal r; + std::size_t i = 0; + for (; i < N1-1; ++i) + r.p_[i] = CT(x.p_[i]); + for (std::size_t j = 0; j < N2; ++j, ++i) + r.p_[i] = CT(y.p_[j]); + + return r; +} + + +template +inline +std::basic_string +operator+(std::basic_string x, const string_literal& y) +{ + x.append(y.data(), y.size()); + return x; +} + +#if __cplusplus >= 201402 && (!defined(__EDG_VERSION__) || __EDG_VERSION__ > 411) \ + && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x5150) + +template ::value || + std::is_same::value || + std::is_same::value || + std::is_same::value>> +CONSTCD14 +inline +string_literal +msl(CharT c) NOEXCEPT +{ + return string_literal{c}; +} + +CONSTCD14 +inline +std::size_t +to_string_len(std::intmax_t i) +{ + std::size_t r = 0; + do + { + i /= 10; + ++r; + } while (i > 0); + return r; +} + +template +CONSTCD14 +inline +std::enable_if_t +< + N < 10, + string_literal +> +msl() NOEXCEPT +{ + return msl(char(N % 10 + '0')); +} + +template +CONSTCD14 +inline +std::enable_if_t +< + 10 <= N, + string_literal +> +msl() NOEXCEPT +{ + return msl() + msl(char(N % 10 + '0')); +} + +template +CONSTCD14 +inline +std::enable_if_t +< + std::ratio::type::den != 1, + string_literal::type::num) + + to_string_len(std::ratio::type::den) + 4> +> +msl(std::ratio) NOEXCEPT +{ + using R = typename std::ratio::type; + return msl(CharT{'['}) + msl() + msl(CharT{'/'}) + + msl() + msl(CharT{']'}); +} + +template +CONSTCD14 +inline +std::enable_if_t +< + std::ratio::type::den == 1, + string_literal::type::num) + 3> +> +msl(std::ratio) NOEXCEPT +{ + using R = typename std::ratio::type; + return msl(CharT{'['}) + msl() + msl(CharT{']'}); +} + + +#else // __cplusplus < 201402 || (defined(__EDG_VERSION__) && __EDG_VERSION__ <= 411) + +inline +std::string +to_string(std::uint64_t x) +{ + return std::to_string(x); +} + +template +inline +std::basic_string +to_string(std::uint64_t x) +{ + auto y = std::to_string(x); + return std::basic_string(y.begin(), y.end()); +} + +template +inline +typename std::enable_if +< + std::ratio::type::den != 1, + std::basic_string +>::type +msl(std::ratio) +{ + using R = typename std::ratio::type; + return std::basic_string(1, '[') + to_string(R::num) + CharT{'/'} + + to_string(R::den) + CharT{']'}; +} + +template +inline +typename std::enable_if +< + std::ratio::type::den == 1, + std::basic_string +>::type +msl(std::ratio) +{ + using R = typename std::ratio::type; + return std::basic_string(1, '[') + to_string(R::num) + CharT{']'}; +} + +#endif // __cplusplus < 201402 || (defined(__EDG_VERSION__) && __EDG_VERSION__ <= 411) + +template +CONSTCD11 +inline +string_literal +msl(std::atto) NOEXCEPT +{ + return string_literal{'a'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::femto) NOEXCEPT +{ + return string_literal{'f'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::pico) NOEXCEPT +{ + return string_literal{'p'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::nano) NOEXCEPT +{ + return string_literal{'n'}; +} + +template +CONSTCD11 +inline +typename std::enable_if +< + std::is_same::value, + string_literal +>::type +msl(std::micro) NOEXCEPT +{ + return string_literal{'\xC2', '\xB5'}; +} + +template +CONSTCD11 +inline +typename std::enable_if +< + !std::is_same::value, + string_literal +>::type +msl(std::micro) NOEXCEPT +{ + return string_literal{CharT{static_cast('\xB5')}}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::milli) NOEXCEPT +{ + return string_literal{'m'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::centi) NOEXCEPT +{ + return string_literal{'c'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::deca) NOEXCEPT +{ + return string_literal{'d', 'a'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::deci) NOEXCEPT +{ + return string_literal{'d'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::hecto) NOEXCEPT +{ + return string_literal{'h'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::kilo) NOEXCEPT +{ + return string_literal{'k'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::mega) NOEXCEPT +{ + return string_literal{'M'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::giga) NOEXCEPT +{ + return string_literal{'G'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::tera) NOEXCEPT +{ + return string_literal{'T'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::peta) NOEXCEPT +{ + return string_literal{'P'}; +} + +template +CONSTCD11 +inline +string_literal +msl(std::exa) NOEXCEPT +{ + return string_literal{'E'}; +} + +template +CONSTCD11 +inline +auto +get_units(Period p) + -> decltype(msl(p) + string_literal{'s'}) +{ + return msl(p) + string_literal{'s'}; +} + +template +CONSTCD11 +inline +string_literal +get_units(std::ratio<1>) +{ + return string_literal{'s'}; +} + +template +CONSTCD11 +inline +string_literal +get_units(std::ratio<3600>) +{ + return string_literal{'h'}; +} + +template +CONSTCD11 +inline +string_literal +get_units(std::ratio<60>) +{ + return string_literal{'m', 'i', 'n'}; +} + +template +CONSTCD11 +inline +string_literal +get_units(std::ratio<86400>) +{ + return string_literal{'d'}; +} + +template > +struct make_string; + +template <> +struct make_string +{ + template + static + std::string + from(Rep n) + { + return std::to_string(n); + } +}; + +template +struct make_string +{ + template + static + std::basic_string + from(Rep n) + { + auto s = std::to_string(n); + return std::basic_string(s.begin(), s.end()); + } +}; + +template <> +struct make_string +{ + template + static + std::wstring + from(Rep n) + { + return std::to_wstring(n); + } +}; + +template +struct make_string +{ + template + static + std::basic_string + from(Rep n) + { + auto s = std::to_wstring(n); + return std::basic_string(s.begin(), s.end()); + } +}; + +} // namespace detail + +// to_stream + +CONSTDATA year nanyear{-32768}; + +template +struct fields +{ + year_month_day ymd{nanyear/0/0}; + weekday wd{8u}; + hh_mm_ss tod{}; + bool has_tod = false; + + fields() = default; + + fields(year_month_day ymd_) : ymd(ymd_) {} + fields(weekday wd_) : wd(wd_) {} + fields(hh_mm_ss tod_) : tod(tod_), has_tod(true) {} + + fields(year_month_day ymd_, weekday wd_) : ymd(ymd_), wd(wd_) {} + fields(year_month_day ymd_, hh_mm_ss tod_) : ymd(ymd_), tod(tod_), + has_tod(true) {} + + fields(weekday wd_, hh_mm_ss tod_) : wd(wd_), tod(tod_), has_tod(true) {} + + fields(year_month_day ymd_, weekday wd_, hh_mm_ss tod_) + : ymd(ymd_) + , wd(wd_) + , tod(tod_) + , has_tod(true) + {} +}; + +namespace detail +{ + +template +unsigned +extract_weekday(std::basic_ostream& os, const fields& fds) +{ + if (!fds.ymd.ok() && !fds.wd.ok()) + { + // fds does not contain a valid weekday + os.setstate(std::ios::failbit); + return 8; + } + weekday wd; + if (fds.ymd.ok()) + { + wd = weekday{sys_days(fds.ymd)}; + if (fds.wd.ok() && wd != fds.wd) + { + // fds.ymd and fds.wd are inconsistent + os.setstate(std::ios::failbit); + return 8; + } + } + else + wd = fds.wd; + return static_cast((wd - Sunday).count()); +} + +template +unsigned +extract_month(std::basic_ostream& os, const fields& fds) +{ + if (!fds.ymd.month().ok()) + { + // fds does not contain a valid month + os.setstate(std::ios::failbit); + return 0; + } + return static_cast(fds.ymd.month()); +} + +} // namespace detail + +#if ONLY_C_LOCALE + +namespace detail +{ + +inline +std::pair +weekday_names() +{ + static const std::string nm[] = + { + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + }; + return std::make_pair(nm, nm+sizeof(nm)/sizeof(nm[0])); +} + +inline +std::pair +month_names() +{ + static const std::string nm[] = + { + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + }; + return std::make_pair(nm, nm+sizeof(nm)/sizeof(nm[0])); +} + +inline +std::pair +ampm_names() +{ + static const std::string nm[] = + { + "AM", + "PM" + }; + return std::make_pair(nm, nm+sizeof(nm)/sizeof(nm[0])); +} + +template +FwdIter +scan_keyword(std::basic_istream& is, FwdIter kb, FwdIter ke) +{ + size_t nkw = static_cast(std::distance(kb, ke)); + const unsigned char doesnt_match = '\0'; + const unsigned char might_match = '\1'; + const unsigned char does_match = '\2'; + unsigned char statbuf[100]; + unsigned char* status = statbuf; + std::unique_ptr stat_hold(0, free); + if (nkw > sizeof(statbuf)) + { + status = (unsigned char*)std::malloc(nkw); + if (status == nullptr) + throw std::bad_alloc(); + stat_hold.reset(status); + } + size_t n_might_match = nkw; // At this point, any keyword might match + size_t n_does_match = 0; // but none of them definitely do + // Initialize all statuses to might_match, except for "" keywords are does_match + unsigned char* st = status; + for (auto ky = kb; ky != ke; ++ky, ++st) + { + if (!ky->empty()) + *st = might_match; + else + { + *st = does_match; + --n_might_match; + ++n_does_match; + } + } + // While there might be a match, test keywords against the next CharT + for (size_t indx = 0; is && n_might_match > 0; ++indx) + { + // Peek at the next CharT but don't consume it + auto ic = is.peek(); + if (ic == EOF) + { + is.setstate(std::ios::eofbit); + break; + } + auto c = static_cast(toupper(static_cast(ic))); + bool consume = false; + // For each keyword which might match, see if the indx character is c + // If a match if found, consume c + // If a match is found, and that is the last character in the keyword, + // then that keyword matches. + // If the keyword doesn't match this character, then change the keyword + // to doesn't match + st = status; + for (auto ky = kb; ky != ke; ++ky, ++st) + { + if (*st == might_match) + { + if (c == static_cast(toupper(static_cast((*ky)[indx])))) + { + consume = true; + if (ky->size() == indx+1) + { + *st = does_match; + --n_might_match; + ++n_does_match; + } + } + else + { + *st = doesnt_match; + --n_might_match; + } + } + } + // consume if we matched a character + if (consume) + { + (void)is.get(); + // If we consumed a character and there might be a matched keyword that + // was marked matched on a previous iteration, then such keywords + // are now marked as not matching. + if (n_might_match + n_does_match > 1) + { + st = status; + for (auto ky = kb; ky != ke; ++ky, ++st) + { + if (*st == does_match && ky->size() != indx+1) + { + *st = doesnt_match; + --n_does_match; + } + } + } + } + } + // We've exited the loop because we hit eof and/or we have no more "might matches". + // Return the first matching result + for (st = status; kb != ke; ++kb, ++st) + if (*st == does_match) + break; + if (kb == ke) + is.setstate(std::ios::failbit); + return kb; +} + +} // namespace detail + +#endif // ONLY_C_LOCALE + +template +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, + const fields& fds, const std::string* abbrev, + const std::chrono::seconds* offset_sec) +{ +#if ONLY_C_LOCALE + using detail::weekday_names; + using detail::month_names; + using detail::ampm_names; +#endif + using detail::save_ostream; + using detail::get_units; + using detail::extract_weekday; + using detail::extract_month; + using std::ios; + using std::chrono::duration_cast; + using std::chrono::seconds; + using std::chrono::minutes; + using std::chrono::hours; + date::detail::save_ostream ss(os); + os.fill(' '); + os.flags(std::ios::skipws | std::ios::dec); + os.width(0); + tm tm{}; + bool insert_negative = fds.has_tod && fds.tod.to_duration() < Duration::zero(); +#if !ONLY_C_LOCALE + auto& facet = std::use_facet>(os.getloc()); +#endif + const CharT* command = nullptr; + CharT modified = CharT{}; + for (; *fmt; ++fmt) + { + switch (*fmt) + { + case 'a': + case 'A': + if (command) + { + if (modified == CharT{}) + { + tm.tm_wday = static_cast(extract_weekday(os, fds)); + if (os.fail()) + return os; +#if !ONLY_C_LOCALE + const CharT f[] = {'%', *fmt}; + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); +#else // ONLY_C_LOCALE + os << weekday_names().first[tm.tm_wday+7*(*fmt == 'a')]; +#endif // ONLY_C_LOCALE + } + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'b': + case 'B': + case 'h': + if (command) + { + if (modified == CharT{}) + { + tm.tm_mon = static_cast(extract_month(os, fds)) - 1; +#if !ONLY_C_LOCALE + const CharT f[] = {'%', *fmt}; + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); +#else // ONLY_C_LOCALE + os << month_names().first[tm.tm_mon+12*(*fmt != 'B')]; +#endif // ONLY_C_LOCALE + } + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'c': + case 'x': + if (command) + { + if (modified == CharT{'O'}) + os << CharT{'%'} << modified << *fmt; + else + { + if (!fds.ymd.ok()) + os.setstate(std::ios::failbit); + if (*fmt == 'c' && !fds.has_tod) + os.setstate(std::ios::failbit); +#if !ONLY_C_LOCALE + tm = std::tm{}; + auto const& ymd = fds.ymd; + auto ld = local_days(ymd); + if (*fmt == 'c') + { + tm.tm_sec = static_cast(fds.tod.seconds().count()); + tm.tm_min = static_cast(fds.tod.minutes().count()); + tm.tm_hour = static_cast(fds.tod.hours().count()); + } + tm.tm_mday = static_cast(static_cast(ymd.day())); + tm.tm_mon = static_cast(extract_month(os, fds) - 1); + tm.tm_year = static_cast(ymd.year()) - 1900; + tm.tm_wday = static_cast(extract_weekday(os, fds)); + if (os.fail()) + return os; + tm.tm_yday = static_cast((ld - local_days(ymd.year()/1/1)).count()); + CharT f[3] = {'%'}; + auto fe = std::begin(f) + 1; + if (modified == CharT{'E'}) + *fe++ = modified; + *fe++ = *fmt; + facet.put(os, os, os.fill(), &tm, std::begin(f), fe); +#else // ONLY_C_LOCALE + if (*fmt == 'c') + { + auto wd = static_cast(extract_weekday(os, fds)); + os << weekday_names().first[static_cast(wd)+7] + << ' '; + os << month_names().first[extract_month(os, fds)-1+12] << ' '; + auto d = static_cast(static_cast(fds.ymd.day())); + if (d < 10) + os << ' '; + os << d << ' ' + << make_time(duration_cast(fds.tod.to_duration())) + << ' ' << fds.ymd.year(); + + } + else // *fmt == 'x' + { + auto const& ymd = fds.ymd; + save_ostream _(os); + os.fill('0'); + os.flags(std::ios::dec | std::ios::right); + os.width(2); + os << static_cast(ymd.month()) << CharT{'/'}; + os.width(2); + os << static_cast(ymd.day()) << CharT{'/'}; + os.width(2); + os << static_cast(ymd.year()) % 100; + } +#endif // ONLY_C_LOCALE + } + command = nullptr; + modified = CharT{}; + } + else + os << *fmt; + break; + case 'C': + if (command) + { + if (modified == CharT{'O'}) + os << CharT{'%'} << modified << *fmt; + else + { + if (!fds.ymd.year().ok()) + os.setstate(std::ios::failbit); + auto y = static_cast(fds.ymd.year()); +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + save_ostream _(os); + os.fill('0'); + os.flags(std::ios::dec | std::ios::right); + if (y >= 0) + { + os.width(2); + os << y/100; + } + else + { + os << CharT{'-'}; + os.width(2); + os << -(y-99)/100; + } + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'E'}) + { + tm.tm_year = y - 1900; + CharT f[3] = {'%', 'E', 'C'}; + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + command = nullptr; + modified = CharT{}; + } + else + os << *fmt; + break; + case 'd': + case 'e': + if (command) + { + if (modified == CharT{'E'}) + os << CharT{'%'} << modified << *fmt; + else + { + if (!fds.ymd.day().ok()) + os.setstate(std::ios::failbit); + auto d = static_cast(static_cast(fds.ymd.day())); +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + save_ostream _(os); + if (*fmt == CharT{'d'}) + os.fill('0'); + else + os.fill(' '); + os.flags(std::ios::dec | std::ios::right); + os.width(2); + os << d; + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + tm.tm_mday = d; + CharT f[3] = {'%', 'O', *fmt}; + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + command = nullptr; + modified = CharT{}; + } + else + os << *fmt; + break; + case 'D': + if (command) + { + if (modified == CharT{}) + { + if (!fds.ymd.ok()) + os.setstate(std::ios::failbit); + auto const& ymd = fds.ymd; + save_ostream _(os); + os.fill('0'); + os.flags(std::ios::dec | std::ios::right); + os.width(2); + os << static_cast(ymd.month()) << CharT{'/'}; + os.width(2); + os << static_cast(ymd.day()) << CharT{'/'}; + os.width(2); + os << static_cast(ymd.year()) % 100; + } + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'F': + if (command) + { + if (modified == CharT{}) + { + if (!fds.ymd.ok()) + os.setstate(std::ios::failbit); + auto const& ymd = fds.ymd; + save_ostream _(os); + os.imbue(std::locale::classic()); + os.fill('0'); + os.flags(std::ios::dec | std::ios::right); + os.width(4); + os << static_cast(ymd.year()) << CharT{'-'}; + os.width(2); + os << static_cast(ymd.month()) << CharT{'-'}; + os.width(2); + os << static_cast(ymd.day()); + } + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'g': + case 'G': + if (command) + { + if (modified == CharT{}) + { + if (!fds.ymd.ok()) + os.setstate(std::ios::failbit); + auto ld = local_days(fds.ymd); + auto y = year_month_day{ld + days{3}}.year(); + auto start = local_days((y-years{1})/December/Thursday[last]) + + (Monday-Thursday); + if (ld < start) + --y; + if (*fmt == CharT{'G'}) + os << y; + else + { + save_ostream _(os); + os.fill('0'); + os.flags(std::ios::dec | std::ios::right); + os.width(2); + os << std::abs(static_cast(y)) % 100; + } + } + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'H': + case 'I': + if (command) + { + if (modified == CharT{'E'}) + os << CharT{'%'} << modified << *fmt; + else + { + if (!fds.has_tod) + os.setstate(std::ios::failbit); + if (insert_negative) + { + os << '-'; + insert_negative = false; + } + auto hms = fds.tod; +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + auto h = *fmt == CharT{'I'} ? date::make12(hms.hours()) : hms.hours(); + if (h < hours{10}) + os << CharT{'0'}; + os << h.count(); + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + const CharT f[] = {'%', modified, *fmt}; + tm.tm_hour = static_cast(hms.hours().count()); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'j': + if (command) + { + if (modified == CharT{}) + { + if (fds.ymd.ok() || fds.has_tod) + { + days doy; + if (fds.ymd.ok()) + { + auto ld = local_days(fds.ymd); + auto y = fds.ymd.year(); + doy = ld - local_days(y/January/1) + days{1}; + } + else + { + doy = duration_cast(fds.tod.to_duration()); + } + save_ostream _(os); + os.fill('0'); + os.flags(std::ios::dec | std::ios::right); + os.width(3); + os << doy.count(); + } + else + { + os.setstate(std::ios::failbit); + } + } + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'm': + if (command) + { + if (modified == CharT{'E'}) + os << CharT{'%'} << modified << *fmt; + else + { + if (!fds.ymd.month().ok()) + os.setstate(std::ios::failbit); + auto m = static_cast(fds.ymd.month()); +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + if (m < 10) + os << CharT{'0'}; + os << m; + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + const CharT f[] = {'%', modified, *fmt}; + tm.tm_mon = static_cast(m-1); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'M': + if (command) + { + if (modified == CharT{'E'}) + os << CharT{'%'} << modified << *fmt; + else + { + if (!fds.has_tod) + os.setstate(std::ios::failbit); + if (insert_negative) + { + os << '-'; + insert_negative = false; + } +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + if (fds.tod.minutes() < minutes{10}) + os << CharT{'0'}; + os << fds.tod.minutes().count(); + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + const CharT f[] = {'%', modified, *fmt}; + tm.tm_min = static_cast(fds.tod.minutes().count()); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'n': + if (command) + { + if (modified == CharT{}) + os << CharT{'\n'}; + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'p': + if (command) + { + if (modified == CharT{}) + { + if (!fds.has_tod) + os.setstate(std::ios::failbit); +#if !ONLY_C_LOCALE + const CharT f[] = {'%', *fmt}; + tm.tm_hour = static_cast(fds.tod.hours().count()); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); +#else + if (date::is_am(fds.tod.hours())) + os << ampm_names().first[0]; + else + os << ampm_names().first[1]; +#endif + } + else + { + os << CharT{'%'} << modified << *fmt; + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'Q': + case 'q': + if (command) + { + if (modified == CharT{}) + { + if (!fds.has_tod) + os.setstate(std::ios::failbit); + auto d = fds.tod.to_duration(); + if (*fmt == 'q') + os << get_units(typename decltype(d)::period::type{}); + else + os << d.count(); + } + else + { + os << CharT{'%'} << modified << *fmt; + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'r': + if (command) + { + if (modified == CharT{}) + { + if (!fds.has_tod) + os.setstate(std::ios::failbit); +#if !ONLY_C_LOCALE + const CharT f[] = {'%', *fmt}; + tm.tm_hour = static_cast(fds.tod.hours().count()); + tm.tm_min = static_cast(fds.tod.minutes().count()); + tm.tm_sec = static_cast(fds.tod.seconds().count()); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); +#else + hh_mm_ss tod(duration_cast(fds.tod.to_duration())); + save_ostream _(os); + os.fill('0'); + os.width(2); + os << date::make12(tod.hours()).count() << CharT{':'}; + os.width(2); + os << tod.minutes().count() << CharT{':'}; + os.width(2); + os << tod.seconds().count() << CharT{' '}; + if (date::is_am(tod.hours())) + os << ampm_names().first[0]; + else + os << ampm_names().first[1]; +#endif + } + else + { + os << CharT{'%'} << modified << *fmt; + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'R': + if (command) + { + if (modified == CharT{}) + { + if (!fds.has_tod) + os.setstate(std::ios::failbit); + if (fds.tod.hours() < hours{10}) + os << CharT{'0'}; + os << fds.tod.hours().count() << CharT{':'}; + if (fds.tod.minutes() < minutes{10}) + os << CharT{'0'}; + os << fds.tod.minutes().count(); + } + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'S': + if (command) + { + if (modified == CharT{'E'}) + os << CharT{'%'} << modified << *fmt; + else + { + if (!fds.has_tod) + os.setstate(std::ios::failbit); + if (insert_negative) + { + os << '-'; + insert_negative = false; + } +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + os << fds.tod.s_; + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + const CharT f[] = {'%', modified, *fmt}; + tm.tm_sec = static_cast(fds.tod.s_.seconds().count()); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 't': + if (command) + { + if (modified == CharT{}) + os << CharT{'\t'}; + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'T': + if (command) + { + if (modified == CharT{}) + { + if (!fds.has_tod) + os.setstate(std::ios::failbit); + os << fds.tod; + } + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'u': + if (command) + { + if (modified == CharT{'E'}) + os << CharT{'%'} << modified << *fmt; + else + { + auto wd = extract_weekday(os, fds); +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + os << (wd != 0 ? wd : 7u); + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + const CharT f[] = {'%', modified, *fmt}; + tm.tm_wday = static_cast(wd); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'U': + if (command) + { + if (modified == CharT{'E'}) + os << CharT{'%'} << modified << *fmt; + else + { + auto const& ymd = fds.ymd; + if (!ymd.ok()) + os.setstate(std::ios::failbit); + auto ld = local_days(ymd); +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + auto st = local_days(Sunday[1]/January/ymd.year()); + if (ld < st) + os << CharT{'0'} << CharT{'0'}; + else + { + auto wn = duration_cast(ld - st).count() + 1; + if (wn < 10) + os << CharT{'0'}; + os << wn; + } + } + #if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + const CharT f[] = {'%', modified, *fmt}; + tm.tm_year = static_cast(ymd.year()) - 1900; + tm.tm_wday = static_cast(extract_weekday(os, fds)); + if (os.fail()) + return os; + tm.tm_yday = static_cast((ld - local_days(ymd.year()/1/1)).count()); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'V': + if (command) + { + if (modified == CharT{'E'}) + os << CharT{'%'} << modified << *fmt; + else + { + if (!fds.ymd.ok()) + os.setstate(std::ios::failbit); + auto ld = local_days(fds.ymd); +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + auto y = year_month_day{ld + days{3}}.year(); + auto st = local_days((y-years{1})/12/Thursday[last]) + + (Monday-Thursday); + if (ld < st) + { + --y; + st = local_days((y - years{1})/12/Thursday[last]) + + (Monday-Thursday); + } + auto wn = duration_cast(ld - st).count() + 1; + if (wn < 10) + os << CharT{'0'}; + os << wn; + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + const CharT f[] = {'%', modified, *fmt}; + auto const& ymd = fds.ymd; + tm.tm_year = static_cast(ymd.year()) - 1900; + tm.tm_wday = static_cast(extract_weekday(os, fds)); + if (os.fail()) + return os; + tm.tm_yday = static_cast((ld - local_days(ymd.year()/1/1)).count()); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'w': + if (command) + { + auto wd = extract_weekday(os, fds); + if (os.fail()) + return os; +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#else + if (modified != CharT{'E'}) +#endif + { + os << wd; + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + const CharT f[] = {'%', modified, *fmt}; + tm.tm_wday = static_cast(wd); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + else + { + os << CharT{'%'} << modified << *fmt; + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'W': + if (command) + { + if (modified == CharT{'E'}) + os << CharT{'%'} << modified << *fmt; + else + { + auto const& ymd = fds.ymd; + if (!ymd.ok()) + os.setstate(std::ios::failbit); + auto ld = local_days(ymd); +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + auto st = local_days(Monday[1]/January/ymd.year()); + if (ld < st) + os << CharT{'0'} << CharT{'0'}; + else + { + auto wn = duration_cast(ld - st).count() + 1; + if (wn < 10) + os << CharT{'0'}; + os << wn; + } + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + const CharT f[] = {'%', modified, *fmt}; + tm.tm_year = static_cast(ymd.year()) - 1900; + tm.tm_wday = static_cast(extract_weekday(os, fds)); + if (os.fail()) + return os; + tm.tm_yday = static_cast((ld - local_days(ymd.year()/1/1)).count()); + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'X': + if (command) + { + if (modified == CharT{'O'}) + os << CharT{'%'} << modified << *fmt; + else + { + if (!fds.has_tod) + os.setstate(std::ios::failbit); +#if !ONLY_C_LOCALE + tm = std::tm{}; + tm.tm_sec = static_cast(fds.tod.seconds().count()); + tm.tm_min = static_cast(fds.tod.minutes().count()); + tm.tm_hour = static_cast(fds.tod.hours().count()); + CharT f[3] = {'%'}; + auto fe = std::begin(f) + 1; + if (modified == CharT{'E'}) + *fe++ = modified; + *fe++ = *fmt; + facet.put(os, os, os.fill(), &tm, std::begin(f), fe); +#else + os << fds.tod; +#endif + } + command = nullptr; + modified = CharT{}; + } + else + os << *fmt; + break; + case 'y': + if (command) + { + if (!fds.ymd.year().ok()) + os.setstate(std::ios::failbit); + auto y = static_cast(fds.ymd.year()); +#if !ONLY_C_LOCALE + if (modified == CharT{}) + { +#endif + y = std::abs(y) % 100; + if (y < 10) + os << CharT{'0'}; + os << y; +#if !ONLY_C_LOCALE + } + else + { + const CharT f[] = {'%', modified, *fmt}; + tm.tm_year = y - 1900; + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'Y': + if (command) + { + if (modified == CharT{'O'}) + os << CharT{'%'} << modified << *fmt; + else + { + if (!fds.ymd.year().ok()) + os.setstate(std::ios::failbit); + auto y = fds.ymd.year(); +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + save_ostream _(os); + os.imbue(std::locale::classic()); + os << y; + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'E'}) + { + const CharT f[] = {'%', modified, *fmt}; + tm.tm_year = static_cast(y) - 1900; + facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f)); + } +#endif + } + modified = CharT{}; + command = nullptr; + } + else + os << *fmt; + break; + case 'z': + if (command) + { + if (offset_sec == nullptr) + { + // Can not format %z with unknown offset + os.setstate(ios::failbit); + return os; + } + auto m = duration_cast(*offset_sec); + auto neg = m < minutes{0}; + m = date::abs(m); + auto h = duration_cast(m); + m -= h; + if (neg) + os << CharT{'-'}; + else + os << CharT{'+'}; + if (h < hours{10}) + os << CharT{'0'}; + os << h.count(); + if (modified != CharT{}) + os << CharT{':'}; + if (m < minutes{10}) + os << CharT{'0'}; + os << m.count(); + command = nullptr; + modified = CharT{}; + } + else + os << *fmt; + break; + case 'Z': + if (command) + { + if (modified == CharT{}) + { + if (abbrev == nullptr) + { + // Can not format %Z with unknown time_zone + os.setstate(ios::failbit); + return os; + } + for (auto c : *abbrev) + os << CharT(c); + } + else + { + os << CharT{'%'} << modified << *fmt; + modified = CharT{}; + } + command = nullptr; + } + else + os << *fmt; + break; + case 'E': + case 'O': + if (command) + { + if (modified == CharT{}) + { + modified = *fmt; + } + else + { + os << CharT{'%'} << modified << *fmt; + command = nullptr; + modified = CharT{}; + } + } + else + os << *fmt; + break; + case '%': + if (command) + { + if (modified == CharT{}) + { + os << CharT{'%'}; + command = nullptr; + } + else + { + os << CharT{'%'} << modified << CharT{'%'}; + command = nullptr; + modified = CharT{}; + } + } + else + command = fmt; + break; + default: + if (command) + { + os << CharT{'%'}; + command = nullptr; + } + if (modified != CharT{}) + { + os << modified; + modified = CharT{}; + } + os << *fmt; + break; + } + } + if (command) + os << CharT{'%'}; + if (modified != CharT{}) + os << modified; + return os; +} + +template +inline +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, const year& y) +{ + using CT = std::chrono::seconds; + fields fds{y/0/0}; + return to_stream(os, fmt, fds); +} + +template +inline +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, const month& m) +{ + using CT = std::chrono::seconds; + fields fds{m/0/nanyear}; + return to_stream(os, fmt, fds); +} + +template +inline +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, const day& d) +{ + using CT = std::chrono::seconds; + fields fds{d/0/nanyear}; + return to_stream(os, fmt, fds); +} + +template +inline +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, const weekday& wd) +{ + using CT = std::chrono::seconds; + fields fds{wd}; + return to_stream(os, fmt, fds); +} + +template +inline +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, const year_month& ym) +{ + using CT = std::chrono::seconds; + fields fds{ym/0}; + return to_stream(os, fmt, fds); +} + +template +inline +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, const month_day& md) +{ + using CT = std::chrono::seconds; + fields fds{md/nanyear}; + return to_stream(os, fmt, fds); +} + +template +inline +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, + const year_month_day& ymd) +{ + using CT = std::chrono::seconds; + fields fds{ymd}; + return to_stream(os, fmt, fds); +} + +template +inline +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, + const std::chrono::duration& d) +{ + using Duration = std::chrono::duration; + using CT = typename std::common_type::type; + fields fds{hh_mm_ss{d}}; + return to_stream(os, fmt, fds); +} + +template +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, + const local_time& tp, const std::string* abbrev = nullptr, + const std::chrono::seconds* offset_sec = nullptr) +{ + using CT = typename std::common_type::type; + auto ld = floor(tp); + fields fds{year_month_day{ld}, hh_mm_ss{tp-local_seconds{ld}}}; + return to_stream(os, fmt, fds, abbrev, offset_sec); +} + +template +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, + const sys_time& tp) +{ + using std::chrono::seconds; + using CT = typename std::common_type::type; + const std::string abbrev("UTC"); + CONSTDATA seconds offset{0}; + auto sd = floor(tp); + fields fds{year_month_day{sd}, hh_mm_ss{tp-sys_seconds{sd}}}; + return to_stream(os, fmt, fds, &abbrev, &offset); +} + +// format + +template +auto +format(const std::locale& loc, const CharT* fmt, const Streamable& tp) + -> decltype(to_stream(std::declval&>(), fmt, tp), + std::basic_string{}) +{ + std::basic_ostringstream os; + os.exceptions(std::ios::failbit | std::ios::badbit); + os.imbue(loc); + to_stream(os, fmt, tp); + return os.str(); +} + +template +auto +format(const CharT* fmt, const Streamable& tp) + -> decltype(to_stream(std::declval&>(), fmt, tp), + std::basic_string{}) +{ + std::basic_ostringstream os; + os.exceptions(std::ios::failbit | std::ios::badbit); + to_stream(os, fmt, tp); + return os.str(); +} + +template +auto +format(const std::locale& loc, const std::basic_string& fmt, + const Streamable& tp) + -> decltype(to_stream(std::declval&>(), fmt.c_str(), tp), + std::basic_string{}) +{ + std::basic_ostringstream os; + os.exceptions(std::ios::failbit | std::ios::badbit); + os.imbue(loc); + to_stream(os, fmt.c_str(), tp); + return os.str(); +} + +template +auto +format(const std::basic_string& fmt, const Streamable& tp) + -> decltype(to_stream(std::declval&>(), fmt.c_str(), tp), + std::basic_string{}) +{ + std::basic_ostringstream os; + os.exceptions(std::ios::failbit | std::ios::badbit); + to_stream(os, fmt.c_str(), tp); + return os.str(); +} + +// parse + +namespace detail +{ + +template +bool +read_char(std::basic_istream& is, CharT fmt, std::ios::iostate& err) +{ + auto ic = is.get(); + if (Traits::eq_int_type(ic, Traits::eof()) || + !Traits::eq(Traits::to_char_type(ic), fmt)) + { + err |= std::ios::failbit; + is.setstate(std::ios::failbit); + return false; + } + return true; +} + +template +unsigned +read_unsigned(std::basic_istream& is, unsigned m = 1, unsigned M = 10) +{ + unsigned x = 0; + unsigned count = 0; + while (true) + { + auto ic = is.peek(); + if (Traits::eq_int_type(ic, Traits::eof())) + break; + auto c = static_cast(Traits::to_char_type(ic)); + if (!('0' <= c && c <= '9')) + break; + (void)is.get(); + ++count; + x = 10*x + static_cast(c - '0'); + if (count == M) + break; + } + if (count < m) + is.setstate(std::ios::failbit); + return x; +} + +template +int +read_signed(std::basic_istream& is, unsigned m = 1, unsigned M = 10) +{ + auto ic = is.peek(); + if (!Traits::eq_int_type(ic, Traits::eof())) + { + auto c = static_cast(Traits::to_char_type(ic)); + if (('0' <= c && c <= '9') || c == '-' || c == '+') + { + if (c == '-' || c == '+') + (void)is.get(); + auto x = static_cast(read_unsigned(is, std::max(m, 1u), M)); + if (!is.fail()) + { + if (c == '-') + x = -x; + return x; + } + } + } + if (m > 0) + is.setstate(std::ios::failbit); + return 0; +} + +template +long double +read_long_double(std::basic_istream& is, unsigned m = 1, unsigned M = 10) +{ + unsigned count = 0; + unsigned fcount = 0; + unsigned long long i = 0; + unsigned long long f = 0; + bool parsing_fraction = false; +#if ONLY_C_LOCALE + typename Traits::int_type decimal_point = '.'; +#else + auto decimal_point = Traits::to_int_type( + std::use_facet>(is.getloc()).decimal_point()); +#endif + while (true) + { + auto ic = is.peek(); + if (Traits::eq_int_type(ic, Traits::eof())) + break; + if (Traits::eq_int_type(ic, decimal_point)) + { + decimal_point = Traits::eof(); + parsing_fraction = true; + } + else + { + auto c = static_cast(Traits::to_char_type(ic)); + if (!('0' <= c && c <= '9')) + break; + if (!parsing_fraction) + { + i = 10*i + static_cast(c - '0'); + } + else + { + f = 10*f + static_cast(c - '0'); + ++fcount; + } + } + (void)is.get(); + if (++count == M) + break; + } + if (count < m) + { + is.setstate(std::ios::failbit); + return 0; + } + return i + f/std::pow(10.L, fcount); +} + +struct rs +{ + int& i; + unsigned m; + unsigned M; +}; + +struct ru +{ + int& i; + unsigned m; + unsigned M; +}; + +struct rld +{ + long double& i; + unsigned m; + unsigned M; +}; + +template +void +read(std::basic_istream&) +{ +} + +template +void +read(std::basic_istream& is, CharT a0, Args&& ...args); + +template +void +read(std::basic_istream& is, rs a0, Args&& ...args); + +template +void +read(std::basic_istream& is, ru a0, Args&& ...args); + +template +void +read(std::basic_istream& is, int a0, Args&& ...args); + +template +void +read(std::basic_istream& is, rld a0, Args&& ...args); + +template +void +read(std::basic_istream& is, CharT a0, Args&& ...args) +{ + // No-op if a0 == CharT{} + if (a0 != CharT{}) + { + auto ic = is.peek(); + if (Traits::eq_int_type(ic, Traits::eof())) + { + is.setstate(std::ios::failbit | std::ios::eofbit); + return; + } + if (!Traits::eq(Traits::to_char_type(ic), a0)) + { + is.setstate(std::ios::failbit); + return; + } + (void)is.get(); + } + read(is, std::forward(args)...); +} + +template +void +read(std::basic_istream& is, rs a0, Args&& ...args) +{ + auto x = read_signed(is, a0.m, a0.M); + if (is.fail()) + return; + a0.i = x; + read(is, std::forward(args)...); +} + +template +void +read(std::basic_istream& is, ru a0, Args&& ...args) +{ + auto x = read_unsigned(is, a0.m, a0.M); + if (is.fail()) + return; + a0.i = static_cast(x); + read(is, std::forward(args)...); +} + +template +void +read(std::basic_istream& is, int a0, Args&& ...args) +{ + if (a0 != -1) + { + auto u = static_cast(a0); + CharT buf[std::numeric_limits::digits10+2u] = {}; + auto e = buf; + do + { + *e++ = static_cast(CharT(u % 10) + CharT{'0'}); + u /= 10; + } while (u > 0); + std::reverse(buf, e); + for (auto p = buf; p != e && is.rdstate() == std::ios::goodbit; ++p) + read(is, *p); + } + if (is.rdstate() == std::ios::goodbit) + read(is, std::forward(args)...); +} + +template +void +read(std::basic_istream& is, rld a0, Args&& ...args) +{ + auto x = read_long_double(is, a0.m, a0.M); + if (is.fail()) + return; + a0.i = x; + read(is, std::forward(args)...); +} + +template +inline +void +checked_set(T& value, T from, T not_a_value, std::basic_ios& is) +{ + if (!is.fail()) + { + if (value == not_a_value) + value = std::move(from); + else if (value != from) + is.setstate(std::ios::failbit); + } +} + +} // namespace detail; + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, + fields& fds, std::basic_string* abbrev, + std::chrono::minutes* offset) +{ + using std::numeric_limits; + using std::ios; + using std::chrono::duration; + using std::chrono::duration_cast; + using std::chrono::seconds; + using std::chrono::minutes; + using std::chrono::hours; + using detail::round_i; + typename std::basic_istream::sentry ok{is, true}; + if (ok) + { + date::detail::save_istream ss(is); + is.fill(' '); + is.flags(std::ios::skipws | std::ios::dec); + is.width(0); +#if !ONLY_C_LOCALE + auto& f = std::use_facet>(is.getloc()); + std::tm tm{}; +#endif + const CharT* command = nullptr; + auto modified = CharT{}; + auto width = -1; + + CONSTDATA int not_a_year = numeric_limits::min(); + CONSTDATA int not_a_2digit_year = 100; + CONSTDATA int not_a_century = not_a_year / 100; + CONSTDATA int not_a_month = 0; + CONSTDATA int not_a_day = 0; + CONSTDATA int not_a_hour = numeric_limits::min(); + CONSTDATA int not_a_hour_12_value = 0; + CONSTDATA int not_a_minute = not_a_hour; + CONSTDATA Duration not_a_second = Duration::min(); + CONSTDATA int not_a_doy = -1; + CONSTDATA int not_a_weekday = 8; + CONSTDATA int not_a_week_num = 100; + CONSTDATA int not_a_ampm = -1; + CONSTDATA minutes not_a_offset = minutes::min(); + + int Y = not_a_year; // c, F, Y * + int y = not_a_2digit_year; // D, x, y * + int g = not_a_2digit_year; // g * + int G = not_a_year; // G * + int C = not_a_century; // C * + int m = not_a_month; // b, B, h, m, c, D, F, x * + int d = not_a_day; // c, d, D, e, F, x * + int j = not_a_doy; // j * + int wd = not_a_weekday; // a, A, u, w * + int H = not_a_hour; // c, H, R, T, X * + int I = not_a_hour_12_value; // I, r * + int p = not_a_ampm; // p, r * + int M = not_a_minute; // c, M, r, R, T, X * + Duration s = not_a_second; // c, r, S, T, X * + int U = not_a_week_num; // U * + int V = not_a_week_num; // V * + int W = not_a_week_num; // W * + std::basic_string temp_abbrev; // Z * + minutes temp_offset = not_a_offset; // z * + + using detail::read; + using detail::rs; + using detail::ru; + using detail::rld; + using detail::checked_set; + for (; *fmt != CharT{} && !is.fail(); ++fmt) + { + switch (*fmt) + { + case 'a': + case 'A': + case 'u': + case 'w': // wd: a, A, u, w + if (command) + { + int trial_wd = not_a_weekday; + if (*fmt == 'a' || *fmt == 'A') + { + if (modified == CharT{}) + { +#if !ONLY_C_LOCALE + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + is.setstate(err); + if (!is.fail()) + trial_wd = tm.tm_wday; +#else + auto nm = detail::weekday_names(); + auto i = detail::scan_keyword(is, nm.first, nm.second) - nm.first; + if (!is.fail()) + trial_wd = i % 7; +#endif + } + else + read(is, CharT{'%'}, width, modified, *fmt); + } + else // *fmt == 'u' || *fmt == 'w' + { +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#else + if (modified != CharT{'E'}) +#endif + { + read(is, ru{trial_wd, 1, width == -1 ? + 1u : static_cast(width)}); + if (!is.fail()) + { + if (*fmt == 'u') + { + if (!(1 <= trial_wd && trial_wd <= 7)) + { + trial_wd = not_a_weekday; + is.setstate(ios::failbit); + } + else if (trial_wd == 7) + trial_wd = 0; + } + else // *fmt == 'w' + { + if (!(0 <= trial_wd && trial_wd <= 6)) + { + trial_wd = not_a_weekday; + is.setstate(ios::failbit); + } + } + } + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + is.setstate(err); + if (!is.fail()) + trial_wd = tm.tm_wday; + } +#endif + else + read(is, CharT{'%'}, width, modified, *fmt); + } + if (trial_wd != not_a_weekday) + checked_set(wd, trial_wd, not_a_weekday, is); + } + else // !command + read(is, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + break; + case 'b': + case 'B': + case 'h': + if (command) + { + if (modified == CharT{}) + { + int ttm = not_a_month; +#if !ONLY_C_LOCALE + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + ttm = tm.tm_mon + 1; + is.setstate(err); +#else + auto nm = detail::month_names(); + auto i = detail::scan_keyword(is, nm.first, nm.second) - nm.first; + if (!is.fail()) + ttm = i % 12 + 1; +#endif + checked_set(m, ttm, not_a_month, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'c': + if (command) + { + if (modified != CharT{'O'}) + { +#if !ONLY_C_LOCALE + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + { + checked_set(Y, tm.tm_year + 1900, not_a_year, is); + checked_set(m, tm.tm_mon + 1, not_a_month, is); + checked_set(d, tm.tm_mday, not_a_day, is); + checked_set(H, tm.tm_hour, not_a_hour, is); + checked_set(M, tm.tm_min, not_a_minute, is); + checked_set(s, duration_cast(seconds{tm.tm_sec}), + not_a_second, is); + } + is.setstate(err); +#else + // "%a %b %e %T %Y" + auto nm = detail::weekday_names(); + auto i = detail::scan_keyword(is, nm.first, nm.second) - nm.first; + checked_set(wd, static_cast(i % 7), not_a_weekday, is); + ws(is); + nm = detail::month_names(); + i = detail::scan_keyword(is, nm.first, nm.second) - nm.first; + checked_set(m, static_cast(i % 12 + 1), not_a_month, is); + ws(is); + int td = not_a_day; + read(is, rs{td, 1, 2}); + checked_set(d, td, not_a_day, is); + ws(is); + using dfs = detail::decimal_format_seconds; + CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; + int tH; + int tM; + long double S; + read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2}, + CharT{':'}, rld{S, 1, w}); + checked_set(H, tH, not_a_hour, is); + checked_set(M, tM, not_a_minute, is); + checked_set(s, round_i(duration{S}), + not_a_second, is); + ws(is); + int tY = not_a_year; + read(is, rs{tY, 1, 4u}); + checked_set(Y, tY, not_a_year, is); +#endif + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'x': + if (command) + { + if (modified != CharT{'O'}) + { +#if !ONLY_C_LOCALE + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + { + checked_set(Y, tm.tm_year + 1900, not_a_year, is); + checked_set(m, tm.tm_mon + 1, not_a_month, is); + checked_set(d, tm.tm_mday, not_a_day, is); + } + is.setstate(err); +#else + // "%m/%d/%y" + int ty = not_a_2digit_year; + int tm = not_a_month; + int td = not_a_day; + read(is, ru{tm, 1, 2}, CharT{'/'}, ru{td, 1, 2}, CharT{'/'}, + rs{ty, 1, 2}); + checked_set(y, ty, not_a_2digit_year, is); + checked_set(m, tm, not_a_month, is); + checked_set(d, td, not_a_day, is); +#endif + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'X': + if (command) + { + if (modified != CharT{'O'}) + { +#if !ONLY_C_LOCALE + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + { + checked_set(H, tm.tm_hour, not_a_hour, is); + checked_set(M, tm.tm_min, not_a_minute, is); + checked_set(s, duration_cast(seconds{tm.tm_sec}), + not_a_second, is); + } + is.setstate(err); +#else + // "%T" + using dfs = detail::decimal_format_seconds; + CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; + int tH = not_a_hour; + int tM = not_a_minute; + long double S; + read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2}, + CharT{':'}, rld{S, 1, w}); + checked_set(H, tH, not_a_hour, is); + checked_set(M, tM, not_a_minute, is); + checked_set(s, round_i(duration{S}), + not_a_second, is); +#endif + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'C': + if (command) + { + int tC = not_a_century; +#if !ONLY_C_LOCALE + if (modified == CharT{}) + { +#endif + read(is, rs{tC, 1, width == -1 ? 2u : static_cast(width)}); +#if !ONLY_C_LOCALE + } + else + { + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + { + auto tY = tm.tm_year + 1900; + tC = (tY >= 0 ? tY : tY-99) / 100; + } + is.setstate(err); + } +#endif + checked_set(C, tC, not_a_century, is); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'D': + if (command) + { + if (modified == CharT{}) + { + int tn = not_a_month; + int td = not_a_day; + int ty = not_a_2digit_year; + read(is, ru{tn, 1, 2}, CharT{'\0'}, CharT{'/'}, CharT{'\0'}, + ru{td, 1, 2}, CharT{'\0'}, CharT{'/'}, CharT{'\0'}, + rs{ty, 1, 2}); + checked_set(y, ty, not_a_2digit_year, is); + checked_set(m, tn, not_a_month, is); + checked_set(d, td, not_a_day, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'F': + if (command) + { + if (modified == CharT{}) + { + int tY = not_a_year; + int tn = not_a_month; + int td = not_a_day; + read(is, rs{tY, 1, width == -1 ? 4u : static_cast(width)}, + CharT{'-'}, ru{tn, 1, 2}, CharT{'-'}, ru{td, 1, 2}); + checked_set(Y, tY, not_a_year, is); + checked_set(m, tn, not_a_month, is); + checked_set(d, td, not_a_day, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'd': + case 'e': + if (command) + { +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#else + if (modified != CharT{'E'}) +#endif + { + int td = not_a_day; + read(is, rs{td, 1, width == -1 ? 2u : static_cast(width)}); + checked_set(d, td, not_a_day, is); + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + command = nullptr; + width = -1; + modified = CharT{}; + if ((err & ios::failbit) == 0) + checked_set(d, tm.tm_mday, not_a_day, is); + is.setstate(err); + } +#endif + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'H': + if (command) + { +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#else + if (modified != CharT{'E'}) +#endif + { + int tH = not_a_hour; + read(is, ru{tH, 1, width == -1 ? 2u : static_cast(width)}); + checked_set(H, tH, not_a_hour, is); + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + checked_set(H, tm.tm_hour, not_a_hour, is); + is.setstate(err); + } +#endif + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'I': + if (command) + { + if (modified == CharT{}) + { + int tI = not_a_hour_12_value; + // reads in an hour into I, but most be in [1, 12] + read(is, rs{tI, 1, width == -1 ? 2u : static_cast(width)}); + if (!(1 <= tI && tI <= 12)) + is.setstate(ios::failbit); + checked_set(I, tI, not_a_hour_12_value, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'j': + if (command) + { + if (modified == CharT{}) + { + int tj = not_a_doy; + read(is, ru{tj, 1, width == -1 ? 3u : static_cast(width)}); + checked_set(j, tj, not_a_doy, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'M': + if (command) + { +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#else + if (modified != CharT{'E'}) +#endif + { + int tM = not_a_minute; + read(is, ru{tM, 1, width == -1 ? 2u : static_cast(width)}); + checked_set(M, tM, not_a_minute, is); + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + checked_set(M, tm.tm_min, not_a_minute, is); + is.setstate(err); + } +#endif + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'm': + if (command) + { +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#else + if (modified != CharT{'E'}) +#endif + { + int tn = not_a_month; + read(is, rs{tn, 1, width == -1 ? 2u : static_cast(width)}); + checked_set(m, tn, not_a_month, is); + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + checked_set(m, tm.tm_mon + 1, not_a_month, is); + is.setstate(err); + } +#endif + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'n': + case 't': + if (command) + { + if (modified == CharT{}) + { + // %n matches a single white space character + // %t matches 0 or 1 white space characters + auto ic = is.peek(); + if (Traits::eq_int_type(ic, Traits::eof())) + { + ios::iostate err = ios::eofbit; + if (*fmt == 'n') + err |= ios::failbit; + is.setstate(err); + break; + } + if (isspace(ic)) + { + (void)is.get(); + } + else if (*fmt == 'n') + is.setstate(ios::failbit); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'p': + if (command) + { + if (modified == CharT{}) + { + int tp = not_a_ampm; +#if !ONLY_C_LOCALE + tm = std::tm{}; + tm.tm_hour = 1; + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + is.setstate(err); + if (tm.tm_hour == 1) + tp = 0; + else if (tm.tm_hour == 13) + tp = 1; + else + is.setstate(err); +#else + auto nm = detail::ampm_names(); + auto i = detail::scan_keyword(is, nm.first, nm.second) - nm.first; + tp = static_cast(i); +#endif + checked_set(p, tp, not_a_ampm, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + + break; + case 'r': + if (command) + { + if (modified == CharT{}) + { +#if !ONLY_C_LOCALE + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + { + checked_set(H, tm.tm_hour, not_a_hour, is); + checked_set(M, tm.tm_min, not_a_hour, is); + checked_set(s, duration_cast(seconds{tm.tm_sec}), + not_a_second, is); + } + is.setstate(err); +#else + // "%I:%M:%S %p" + using dfs = detail::decimal_format_seconds; + CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; + long double S; + int tI = not_a_hour_12_value; + int tM = not_a_minute; + read(is, ru{tI, 1, 2}, CharT{':'}, ru{tM, 1, 2}, + CharT{':'}, rld{S, 1, w}); + checked_set(I, tI, not_a_hour_12_value, is); + checked_set(M, tM, not_a_minute, is); + checked_set(s, round_i(duration{S}), + not_a_second, is); + ws(is); + auto nm = detail::ampm_names(); + auto i = detail::scan_keyword(is, nm.first, nm.second) - nm.first; + checked_set(p, static_cast(i), not_a_ampm, is); +#endif + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'R': + if (command) + { + if (modified == CharT{}) + { + int tH = not_a_hour; + int tM = not_a_minute; + read(is, ru{tH, 1, 2}, CharT{'\0'}, CharT{':'}, CharT{'\0'}, + ru{tM, 1, 2}, CharT{'\0'}); + checked_set(H, tH, not_a_hour, is); + checked_set(M, tM, not_a_minute, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'S': + if (command) + { + #if !ONLY_C_LOCALE + if (modified == CharT{}) +#else + if (modified != CharT{'E'}) +#endif + { + using dfs = detail::decimal_format_seconds; + CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; + long double S; + read(is, rld{S, 1, width == -1 ? w : static_cast(width)}); + checked_set(s, round_i(duration{S}), + not_a_second, is); + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'O'}) + { + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + checked_set(s, duration_cast(seconds{tm.tm_sec}), + not_a_second, is); + is.setstate(err); + } +#endif + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'T': + if (command) + { + if (modified == CharT{}) + { + using dfs = detail::decimal_format_seconds; + CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; + int tH = not_a_hour; + int tM = not_a_minute; + long double S; + read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2}, + CharT{':'}, rld{S, 1, w}); + checked_set(H, tH, not_a_hour, is); + checked_set(M, tM, not_a_minute, is); + checked_set(s, round_i(duration{S}), + not_a_second, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'Y': + if (command) + { +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#else + if (modified != CharT{'O'}) +#endif + { + int tY = not_a_year; + read(is, rs{tY, 1, width == -1 ? 4u : static_cast(width)}); + checked_set(Y, tY, not_a_year, is); + } +#if !ONLY_C_LOCALE + else if (modified == CharT{'E'}) + { + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + checked_set(Y, tm.tm_year + 1900, not_a_year, is); + is.setstate(err); + } +#endif + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'y': + if (command) + { +#if !ONLY_C_LOCALE + if (modified == CharT{}) +#endif + { + int ty = not_a_2digit_year; + read(is, ru{ty, 1, width == -1 ? 2u : static_cast(width)}); + checked_set(y, ty, not_a_2digit_year, is); + } +#if !ONLY_C_LOCALE + else + { + ios::iostate err = ios::goodbit; + f.get(is, nullptr, is, err, &tm, command, fmt+1); + if ((err & ios::failbit) == 0) + checked_set(Y, tm.tm_year + 1900, not_a_year, is); + is.setstate(err); + } +#endif + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'g': + if (command) + { + if (modified == CharT{}) + { + int tg = not_a_2digit_year; + read(is, ru{tg, 1, width == -1 ? 2u : static_cast(width)}); + checked_set(g, tg, not_a_2digit_year, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'G': + if (command) + { + if (modified == CharT{}) + { + int tG = not_a_year; + read(is, rs{tG, 1, width == -1 ? 4u : static_cast(width)}); + checked_set(G, tG, not_a_year, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'U': + if (command) + { + if (modified == CharT{}) + { + int tU = not_a_week_num; + read(is, ru{tU, 1, width == -1 ? 2u : static_cast(width)}); + checked_set(U, tU, not_a_week_num, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'V': + if (command) + { + if (modified == CharT{}) + { + int tV = not_a_week_num; + read(is, ru{tV, 1, width == -1 ? 2u : static_cast(width)}); + checked_set(V, tV, not_a_week_num, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'W': + if (command) + { + if (modified == CharT{}) + { + int tW = not_a_week_num; + read(is, ru{tW, 1, width == -1 ? 2u : static_cast(width)}); + checked_set(W, tW, not_a_week_num, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'E': + case 'O': + if (command) + { + if (modified == CharT{}) + { + modified = *fmt; + } + else + { + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + } + else + read(is, *fmt); + break; + case '%': + if (command) + { + if (modified == CharT{}) + read(is, *fmt); + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + command = fmt; + break; + case 'z': + if (command) + { + int tH, tM; + minutes toff = not_a_offset; + bool neg = false; + auto ic = is.peek(); + if (!Traits::eq_int_type(ic, Traits::eof())) + { + auto c = static_cast(Traits::to_char_type(ic)); + if (c == '-') + neg = true; + } + if (modified == CharT{}) + { + read(is, rs{tH, 2, 2}); + if (!is.fail()) + toff = hours{std::abs(tH)}; + if (is.good()) + { + ic = is.peek(); + if (!Traits::eq_int_type(ic, Traits::eof())) + { + auto c = static_cast(Traits::to_char_type(ic)); + if ('0' <= c && c <= '9') + { + read(is, ru{tM, 2, 2}); + if (!is.fail()) + toff += minutes{tM}; + } + } + } + } + else + { + read(is, rs{tH, 1, 2}); + if (!is.fail()) + toff = hours{std::abs(tH)}; + if (is.good()) + { + ic = is.peek(); + if (!Traits::eq_int_type(ic, Traits::eof())) + { + auto c = static_cast(Traits::to_char_type(ic)); + if (c == ':') + { + (void)is.get(); + read(is, ru{tM, 2, 2}); + if (!is.fail()) + toff += minutes{tM}; + } + } + } + } + if (neg) + toff = -toff; + checked_set(temp_offset, toff, not_a_offset, is); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + case 'Z': + if (command) + { + if (modified == CharT{}) + { + std::basic_string buf; + while (is.rdstate() == std::ios::goodbit) + { + auto i = is.rdbuf()->sgetc(); + if (Traits::eq_int_type(i, Traits::eof())) + { + is.setstate(ios::eofbit); + break; + } + auto wc = Traits::to_char_type(i); + auto c = static_cast(wc); + // is c a valid time zone name or abbreviation character? + if (!(CharT{1} < wc && wc < CharT{127}) || !(isalnum(c) || + c == '_' || c == '/' || c == '-' || c == '+')) + break; + buf.push_back(c); + is.rdbuf()->sbumpc(); + } + if (buf.empty()) + is.setstate(ios::failbit); + checked_set(temp_abbrev, buf, {}, is); + } + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + else + read(is, *fmt); + break; + default: + if (command) + { + if (width == -1 && modified == CharT{} && '0' <= *fmt && *fmt <= '9') + { + width = static_cast(*fmt) - '0'; + while ('0' <= fmt[1] && fmt[1] <= '9') + width = 10*width + static_cast(*++fmt) - '0'; + } + else + { + if (modified == CharT{}) + read(is, CharT{'%'}, width, *fmt); + else + read(is, CharT{'%'}, width, modified, *fmt); + command = nullptr; + width = -1; + modified = CharT{}; + } + } + else // !command + { + if (isspace(static_cast(*fmt))) + { + // space matches 0 or more white space characters + if (is.good()) + ws(is); + } + else + read(is, *fmt); + } + break; + } + } + // is.fail() || *fmt == CharT{} + if (is.rdstate() == ios::goodbit && command) + { + if (modified == CharT{}) + read(is, CharT{'%'}, width); + else + read(is, CharT{'%'}, width, modified); + } + if (!is.fail()) + { + if (y != not_a_2digit_year) + { + // Convert y and an optional C to Y + if (!(0 <= y && y <= 99)) + goto broken; + if (C == not_a_century) + { + if (Y == not_a_year) + { + if (y >= 69) + C = 19; + else + C = 20; + } + else + { + C = (Y >= 0 ? Y : Y-100) / 100; + } + } + int tY; + if (C >= 0) + tY = 100*C + y; + else + tY = 100*(C+1) - (y == 0 ? 100 : y); + if (Y != not_a_year && Y != tY) + goto broken; + Y = tY; + } + if (g != not_a_2digit_year) + { + // Convert g and an optional C to G + if (!(0 <= g && g <= 99)) + goto broken; + if (C == not_a_century) + { + if (G == not_a_year) + { + if (g >= 69) + C = 19; + else + C = 20; + } + else + { + C = (G >= 0 ? G : G-100) / 100; + } + } + int tG; + if (C >= 0) + tG = 100*C + g; + else + tG = 100*(C+1) - (g == 0 ? 100 : g); + if (G != not_a_year && G != tG) + goto broken; + G = tG; + } + if (Y < static_cast(year::min()) || Y > static_cast(year::max())) + Y = not_a_year; + bool computed = false; + if (G != not_a_year && V != not_a_week_num && wd != not_a_weekday) + { + year_month_day ymd_trial = sys_days(year{G-1}/December/Thursday[last]) + + (Monday-Thursday) + weeks{V-1} + + (weekday{static_cast(wd)}-Monday); + if (Y == not_a_year) + Y = static_cast(ymd_trial.year()); + else if (year{Y} != ymd_trial.year()) + goto broken; + if (m == not_a_month) + m = static_cast(static_cast(ymd_trial.month())); + else if (month(static_cast(m)) != ymd_trial.month()) + goto broken; + if (d == not_a_day) + d = static_cast(static_cast(ymd_trial.day())); + else if (day(static_cast(d)) != ymd_trial.day()) + goto broken; + computed = true; + } + if (Y != not_a_year && U != not_a_week_num && wd != not_a_weekday) + { + year_month_day ymd_trial = sys_days(year{Y}/January/Sunday[1]) + + weeks{U-1} + + (weekday{static_cast(wd)} - Sunday); + if (Y == not_a_year) + Y = static_cast(ymd_trial.year()); + else if (year{Y} != ymd_trial.year()) + goto broken; + if (m == not_a_month) + m = static_cast(static_cast(ymd_trial.month())); + else if (month(static_cast(m)) != ymd_trial.month()) + goto broken; + if (d == not_a_day) + d = static_cast(static_cast(ymd_trial.day())); + else if (day(static_cast(d)) != ymd_trial.day()) + goto broken; + computed = true; + } + if (Y != not_a_year && W != not_a_week_num && wd != not_a_weekday) + { + year_month_day ymd_trial = sys_days(year{Y}/January/Monday[1]) + + weeks{W-1} + + (weekday{static_cast(wd)} - Monday); + if (Y == not_a_year) + Y = static_cast(ymd_trial.year()); + else if (year{Y} != ymd_trial.year()) + goto broken; + if (m == not_a_month) + m = static_cast(static_cast(ymd_trial.month())); + else if (month(static_cast(m)) != ymd_trial.month()) + goto broken; + if (d == not_a_day) + d = static_cast(static_cast(ymd_trial.day())); + else if (day(static_cast(d)) != ymd_trial.day()) + goto broken; + computed = true; + } + if (j != not_a_doy && Y != not_a_year) + { + auto ymd_trial = year_month_day{local_days(year{Y}/1/1) + days{j-1}}; + if (m == 0) + m = static_cast(static_cast(ymd_trial.month())); + else if (month(static_cast(m)) != ymd_trial.month()) + goto broken; + if (d == 0) + d = static_cast(static_cast(ymd_trial.day())); + else if (day(static_cast(d)) != ymd_trial.day()) + goto broken; + j = not_a_doy; + } + auto ymd = year{Y}/m/d; + if (ymd.ok()) + { + if (wd == not_a_weekday) + wd = static_cast((weekday(sys_days(ymd)) - Sunday).count()); + else if (wd != static_cast((weekday(sys_days(ymd)) - Sunday).count())) + goto broken; + if (!computed) + { + if (G != not_a_year || V != not_a_week_num) + { + sys_days sd = ymd; + auto G_trial = year_month_day{sd + days{3}}.year(); + auto start = sys_days((G_trial - years{1})/December/Thursday[last]) + + (Monday - Thursday); + if (sd < start) + { + --G_trial; + if (V != not_a_week_num) + start = sys_days((G_trial - years{1})/December/Thursday[last]) + + (Monday - Thursday); + } + if (G != not_a_year && G != static_cast(G_trial)) + goto broken; + if (V != not_a_week_num) + { + auto V_trial = duration_cast(sd - start).count() + 1; + if (V != V_trial) + goto broken; + } + } + if (U != not_a_week_num) + { + auto start = sys_days(Sunday[1]/January/ymd.year()); + auto U_trial = floor(sys_days(ymd) - start).count() + 1; + if (U != U_trial) + goto broken; + } + if (W != not_a_week_num) + { + auto start = sys_days(Monday[1]/January/ymd.year()); + auto W_trial = floor(sys_days(ymd) - start).count() + 1; + if (W != W_trial) + goto broken; + } + } + } + fds.ymd = ymd; + if (I != not_a_hour_12_value) + { + if (!(1 <= I && I <= 12)) + goto broken; + if (p != not_a_ampm) + { + // p is in [0, 1] == [AM, PM] + // Store trial H in I + if (I == 12) + --p; + I += p*12; + // Either set H from I or make sure H and I are consistent + if (H == not_a_hour) + H = I; + else if (I != H) + goto broken; + } + else // p == not_a_ampm + { + // if H, make sure H and I could be consistent + if (H != not_a_hour) + { + if (I == 12) + { + if (H != 0 && H != 12) + goto broken; + } + else if (!(I == H || I == H+12)) + { + goto broken; + } + } + else // I is ambiguous, AM or PM? + goto broken; + } + } + if (H != not_a_hour) + { + fds.has_tod = true; + fds.tod = hh_mm_ss{hours{H}}; + } + if (M != not_a_minute) + { + fds.has_tod = true; + fds.tod.m_ = minutes{M}; + } + if (s != not_a_second) + { + fds.has_tod = true; + fds.tod.s_ = detail::decimal_format_seconds{s}; + } + if (j != not_a_doy) + { + fds.has_tod = true; + fds.tod.h_ += hours{days{j}}; + } + if (wd != not_a_weekday) + fds.wd = weekday{static_cast(wd)}; + if (abbrev != nullptr) + *abbrev = std::move(temp_abbrev); + if (offset != nullptr && temp_offset != not_a_offset) + *offset = temp_offset; + } + return is; + } +broken: + is.setstate(ios::failbit); + return is; +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, year& y, + std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using CT = std::chrono::seconds; + fields fds{}; + from_stream(is, fmt, fds, abbrev, offset); + if (!fds.ymd.year().ok()) + is.setstate(std::ios::failbit); + if (!is.fail()) + y = fds.ymd.year(); + return is; +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, month& m, + std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using CT = std::chrono::seconds; + fields fds{}; + from_stream(is, fmt, fds, abbrev, offset); + if (!fds.ymd.month().ok()) + is.setstate(std::ios::failbit); + if (!is.fail()) + m = fds.ymd.month(); + return is; +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, day& d, + std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using CT = std::chrono::seconds; + fields fds{}; + from_stream(is, fmt, fds, abbrev, offset); + if (!fds.ymd.day().ok()) + is.setstate(std::ios::failbit); + if (!is.fail()) + d = fds.ymd.day(); + return is; +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, weekday& wd, + std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using CT = std::chrono::seconds; + fields fds{}; + from_stream(is, fmt, fds, abbrev, offset); + if (!fds.wd.ok()) + is.setstate(std::ios::failbit); + if (!is.fail()) + wd = fds.wd; + return is; +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, year_month& ym, + std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using CT = std::chrono::seconds; + fields fds{}; + from_stream(is, fmt, fds, abbrev, offset); + if (!fds.ymd.month().ok()) + is.setstate(std::ios::failbit); + if (!is.fail()) + ym = fds.ymd.year()/fds.ymd.month(); + return is; +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, month_day& md, + std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using CT = std::chrono::seconds; + fields fds{}; + from_stream(is, fmt, fds, abbrev, offset); + if (!fds.ymd.month().ok() || !fds.ymd.day().ok()) + is.setstate(std::ios::failbit); + if (!is.fail()) + md = fds.ymd.month()/fds.ymd.day(); + return is; +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, + year_month_day& ymd, std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using CT = std::chrono::seconds; + fields fds{}; + from_stream(is, fmt, fds, abbrev, offset); + if (!fds.ymd.ok()) + is.setstate(std::ios::failbit); + if (!is.fail()) + ymd = fds.ymd; + return is; +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, + sys_time& tp, std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using CT = typename std::common_type::type; + using detail::round_i; + std::chrono::minutes offset_local{}; + auto offptr = offset ? offset : &offset_local; + fields fds{}; + fds.has_tod = true; + from_stream(is, fmt, fds, abbrev, offptr); + if (!fds.ymd.ok() || !fds.tod.in_conventional_range()) + is.setstate(std::ios::failbit); + if (!is.fail()) + tp = round_i(sys_days(fds.ymd) - *offptr + fds.tod.to_duration()); + return is; +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, + local_time& tp, std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using CT = typename std::common_type::type; + using detail::round_i; + fields fds{}; + fds.has_tod = true; + from_stream(is, fmt, fds, abbrev, offset); + if (!fds.ymd.ok() || !fds.tod.in_conventional_range()) + is.setstate(std::ios::failbit); + if (!is.fail()) + tp = round_i(local_seconds{local_days(fds.ymd)} + fds.tod.to_duration()); + return is; +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, + std::chrono::duration& d, + std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using Duration = std::chrono::duration; + using CT = typename std::common_type::type; + fields fds{}; + from_stream(is, fmt, fds, abbrev, offset); + if (!fds.has_tod) + is.setstate(std::ios::failbit); + if (!is.fail()) + d = std::chrono::duration_cast(fds.tod.to_duration()); + return is; +} + +template , + class Alloc = std::allocator> +struct parse_manip +{ + const std::basic_string format_; + Parsable& tp_; + std::basic_string* abbrev_; + std::chrono::minutes* offset_; + +public: + parse_manip(std::basic_string format, Parsable& tp, + std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) + : format_(std::move(format)) + , tp_(tp) + , abbrev_(abbrev) + , offset_(offset) + {} + +}; + +template +std::basic_istream& +operator>>(std::basic_istream& is, + const parse_manip& x) +{ + return from_stream(is, x.format_.c_str(), x.tp_, x.abbrev_, x.offset_); +} + +template +inline +auto +parse(const std::basic_string& format, Parsable& tp) + -> decltype(from_stream(std::declval&>(), + format.c_str(), tp), + parse_manip{format, tp}) +{ + return {format, tp}; +} + +template +inline +auto +parse(const std::basic_string& format, Parsable& tp, + std::basic_string& abbrev) + -> decltype(from_stream(std::declval&>(), + format.c_str(), tp, &abbrev), + parse_manip{format, tp, &abbrev}) +{ + return {format, tp, &abbrev}; +} + +template +inline +auto +parse(const std::basic_string& format, Parsable& tp, + std::chrono::minutes& offset) + -> decltype(from_stream(std::declval&>(), + format.c_str(), tp, + std::declval*>(), + &offset), + parse_manip{format, tp, nullptr, &offset}) +{ + return {format, tp, nullptr, &offset}; +} + +template +inline +auto +parse(const std::basic_string& format, Parsable& tp, + std::basic_string& abbrev, std::chrono::minutes& offset) + -> decltype(from_stream(std::declval&>(), + format.c_str(), tp, &abbrev, &offset), + parse_manip{format, tp, &abbrev, &offset}) +{ + return {format, tp, &abbrev, &offset}; +} + +// const CharT* formats + +template +inline +auto +parse(const CharT* format, Parsable& tp) + -> decltype(from_stream(std::declval&>(), format, tp), + parse_manip{format, tp}) +{ + return {format, tp}; +} + +template +inline +auto +parse(const CharT* format, Parsable& tp, std::basic_string& abbrev) + -> decltype(from_stream(std::declval&>(), format, + tp, &abbrev), + parse_manip{format, tp, &abbrev}) +{ + return {format, tp, &abbrev}; +} + +template +inline +auto +parse(const CharT* format, Parsable& tp, std::chrono::minutes& offset) + -> decltype(from_stream(std::declval&>(), format, + tp, std::declval*>(), &offset), + parse_manip{format, tp, nullptr, &offset}) +{ + return {format, tp, nullptr, &offset}; +} + +template +inline +auto +parse(const CharT* format, Parsable& tp, + std::basic_string& abbrev, std::chrono::minutes& offset) + -> decltype(from_stream(std::declval&>(), format, + tp, &abbrev, &offset), + parse_manip{format, tp, &abbrev, &offset}) +{ + return {format, tp, &abbrev, &offset}; +} + +// duration streaming + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, + const std::chrono::duration& d) +{ + return os << detail::make_string::from(d.count()) + + detail::get_units(typename Period::type{}); +} + +} // namespace date + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + +#endif // DATE_H diff --git a/deps/date/include/date/tz.h b/deps/date/include/date/tz.h new file mode 100644 index 0000000..4921068 --- /dev/null +++ b/deps/date/include/date/tz.h @@ -0,0 +1,2792 @@ +#ifndef TZ_H +#define TZ_H + +// The MIT License (MIT) +// +// Copyright (c) 2015, 2016, 2017 Howard Hinnant +// Copyright (c) 2017 Jiangang Zhuang +// Copyright (c) 2017 Aaron Bishop +// Copyright (c) 2017 Tomasz Kamiński +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// Our apologies. When the previous paragraph was written, lowercase had not yet +// been invented (that would involve another several millennia of evolution). +// We did not mean to shout. + +// Get more recent database at http://www.iana.org/time-zones + +// The notion of "current timezone" is something the operating system is expected to "just +// know". How it knows this is system specific. It's often a value set by the user at OS +// installation time and recorded by the OS somewhere. On Linux and Mac systems the current +// timezone name is obtained by looking at the name or contents of a particular file on +// disk. On Windows the current timezone name comes from the registry. In either method, +// there is no guarantee that the "native" current timezone name obtained will match any +// of the "Standard" names in this library's "database". On Linux, the names usually do +// seem to match so mapping functions to map from native to "Standard" are typically not +// required. On Windows, the names are never "Standard" so mapping is always required. +// Technically any OS may use the mapping process but currently only Windows does use it. + +#ifndef USE_OS_TZDB +# define USE_OS_TZDB 0 +#endif + +#ifndef HAS_REMOTE_API +# if USE_OS_TZDB == 0 +# ifdef _WIN32 +# define HAS_REMOTE_API 0 +# else +# define HAS_REMOTE_API 1 +# endif +# else // HAS_REMOTE_API makes no since when using the OS timezone database +# define HAS_REMOTE_API 0 +# endif +#endif + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wconstant-logical-operand" +#endif + +static_assert(!(USE_OS_TZDB && HAS_REMOTE_API), + "USE_OS_TZDB and HAS_REMOTE_API can not be used together"); + +#ifdef __clang__ +# pragma clang diagnostic pop +#endif + +#ifndef AUTO_DOWNLOAD +# define AUTO_DOWNLOAD HAS_REMOTE_API +#endif + +static_assert(HAS_REMOTE_API == 0 ? AUTO_DOWNLOAD == 0 : true, + "AUTO_DOWNLOAD can not be turned on without HAS_REMOTE_API"); + +#ifndef USE_SHELL_API +# define USE_SHELL_API 1 +#endif + +#if USE_OS_TZDB +# ifdef _WIN32 +# error "USE_OS_TZDB can not be used on Windows" +# endif +#endif + +#ifndef HAS_DEDUCTION_GUIDES +# if __cplusplus >= 201703 +# define HAS_DEDUCTION_GUIDES 1 +# else +# define HAS_DEDUCTION_GUIDES 0 +# endif +#endif // HAS_DEDUCTION_GUIDES + +#include "date.h" + +#if defined(_MSC_VER) && (_MSC_VER < 1900) +#include "tz_private.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 +# ifdef DATE_BUILD_DLL +# define DATE_API __declspec(dllexport) +# elif defined(DATE_USE_DLL) +# define DATE_API __declspec(dllimport) +# else +# define DATE_API +# endif +#else +# ifdef DATE_BUILD_DLL +# define DATE_API __attribute__ ((visibility ("default"))) +# else +# define DATE_API +# endif +#endif + +namespace date +{ + +enum class choose {earliest, latest}; + +namespace detail +{ + struct undocumented; + + template + struct nodeduct + { + using type = T; + }; + + template + using nodeduct_t = typename nodeduct::type; +} + +struct sys_info +{ + sys_seconds begin; + sys_seconds end; + std::chrono::seconds offset; + std::chrono::minutes save; + std::string abbrev; +}; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const sys_info& r) +{ + os << r.begin << '\n'; + os << r.end << '\n'; + os << make_time(r.offset) << "\n"; + os << make_time(r.save) << "\n"; + os << r.abbrev << '\n'; + return os; +} + +struct local_info +{ + enum {unique, nonexistent, ambiguous} result; + sys_info first; + sys_info second; +}; + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const local_info& r) +{ + if (r.result == local_info::nonexistent) + os << "nonexistent between\n"; + else if (r.result == local_info::ambiguous) + os << "ambiguous between\n"; + os << r.first; + if (r.result != local_info::unique) + { + os << "and\n"; + os << r.second; + } + return os; +} + +class nonexistent_local_time + : public std::runtime_error +{ +public: + template + nonexistent_local_time(local_time tp, const local_info& i); + +private: + template + static + std::string + make_msg(local_time tp, const local_info& i); +}; + +template +inline +nonexistent_local_time::nonexistent_local_time(local_time tp, + const local_info& i) + : std::runtime_error(make_msg(tp, i)) +{ +} + +template +std::string +nonexistent_local_time::make_msg(local_time tp, const local_info& i) +{ + assert(i.result == local_info::nonexistent); + std::ostringstream os; + os << tp << " is in a gap between\n" + << local_seconds{i.first.end.time_since_epoch()} + i.first.offset << ' ' + << i.first.abbrev << " and\n" + << local_seconds{i.second.begin.time_since_epoch()} + i.second.offset << ' ' + << i.second.abbrev + << " which are both equivalent to\n" + << i.first.end << " UTC"; + return os.str(); +} + +class ambiguous_local_time + : public std::runtime_error +{ +public: + template + ambiguous_local_time(local_time tp, const local_info& i); + +private: + template + static + std::string + make_msg(local_time tp, const local_info& i); +}; + +template +inline +ambiguous_local_time::ambiguous_local_time(local_time tp, const local_info& i) + : std::runtime_error(make_msg(tp, i)) +{ +} + +template +std::string +ambiguous_local_time::make_msg(local_time tp, const local_info& i) +{ + assert(i.result == local_info::ambiguous); + std::ostringstream os; + os << tp << " is ambiguous. It could be\n" + << tp << ' ' << i.first.abbrev << " == " + << tp - i.first.offset << " UTC or\n" + << tp << ' ' << i.second.abbrev << " == " + << tp - i.second.offset << " UTC"; + return os.str(); +} + +class time_zone; + +#if HAS_STRING_VIEW +DATE_API const time_zone* locate_zone(std::string_view tz_name); +#else +DATE_API const time_zone* locate_zone(const std::string& tz_name); +#endif + +DATE_API const time_zone* current_zone(); + +template +struct zoned_traits +{ +}; + +template <> +struct zoned_traits +{ + static + const time_zone* + default_zone() + { + return date::locate_zone("Etc/UTC"); + } + +#if HAS_STRING_VIEW + + static + const time_zone* + locate_zone(std::string_view name) + { + return date::locate_zone(name); + } + +#else // !HAS_STRING_VIEW + + static + const time_zone* + locate_zone(const std::string& name) + { + return date::locate_zone(name); + } + + static + const time_zone* + locate_zone(const char* name) + { + return date::locate_zone(name); + } + +#endif // !HAS_STRING_VIEW +}; + +template +class zoned_time; + +template +bool +operator==(const zoned_time& x, + const zoned_time& y); + +template +class zoned_time +{ +public: + using duration = typename std::common_type::type; + +private: + TimeZonePtr zone_; + sys_time tp_; + +public: +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ::default_zone())> +#endif + zoned_time(); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ::default_zone())> +#endif + zoned_time(const sys_time& st); + explicit zoned_time(TimeZonePtr z); + +#if HAS_STRING_VIEW + template ::locate_zone(std::string_view())) + >::value + >::type> + explicit zoned_time(std::string_view name); +#else +# if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ::locate_zone(std::string())) + >::value + >::type> +# endif + explicit zoned_time(const std::string& name); +#endif + + template , + sys_time>::value + >::type> + zoned_time(const zoned_time& zt) NOEXCEPT; + + zoned_time(TimeZonePtr z, const sys_time& st); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ()->to_sys(local_time{})), + sys_time + >::value + >::type> +#endif + zoned_time(TimeZonePtr z, const local_time& tp); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ()->to_sys(local_time{}, + choose::earliest)), + sys_time + >::value + >::type> +#endif + zoned_time(TimeZonePtr z, const local_time& tp, choose c); + + template , + sys_time>::value + >::type> + zoned_time(TimeZonePtr z, const zoned_time& zt); + + template , + sys_time>::value + >::type> + zoned_time(TimeZonePtr z, const zoned_time& zt, choose); + +#if HAS_STRING_VIEW + + template ::locate_zone(std::string_view())), + sys_time + >::value + >::type> + zoned_time(std::string_view name, detail::nodeduct_t&> st); + + template ::locate_zone(std::string_view())), + local_time + >::value + >::type> + zoned_time(std::string_view name, detail::nodeduct_t&> tp); + + template ::locate_zone(std::string_view())), + local_time, + choose + >::value + >::type> + zoned_time(std::string_view name, detail::nodeduct_t&> tp, choose c); + + template , + sys_time>::value && + std::is_constructible + < + zoned_time, + decltype(zoned_traits::locate_zone(std::string_view())), + zoned_time + >::value + >::type> + zoned_time(std::string_view name, const zoned_time& zt); + + template , + sys_time>::value && + std::is_constructible + < + zoned_time, + decltype(zoned_traits::locate_zone(std::string_view())), + zoned_time, + choose + >::value + >::type> + zoned_time(std::string_view name, const zoned_time& zt, choose); + +#else // !HAS_STRING_VIEW + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ::locate_zone(std::string())), + sys_time + >::value + >::type> +#endif + zoned_time(const std::string& name, const sys_time& st); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ::locate_zone(std::string())), + sys_time + >::value + >::type> +#endif + zoned_time(const char* name, const sys_time& st); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ::locate_zone(std::string())), + local_time + >::value + >::type> +#endif + zoned_time(const std::string& name, const local_time& tp); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ::locate_zone(std::string())), + local_time + >::value + >::type> +#endif + zoned_time(const char* name, const local_time& tp); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ::locate_zone(std::string())), + local_time, + choose + >::value + >::type> +#endif + zoned_time(const std::string& name, const local_time& tp, choose c); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template ::locate_zone(std::string())), + local_time, + choose + >::value + >::type> +#endif + zoned_time(const char* name, const local_time& tp, choose c); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template , + sys_time>::value && + std::is_constructible + < + zoned_time, + decltype(zoned_traits::locate_zone(std::string())), + zoned_time + >::value + >::type> +#else + template +#endif + zoned_time(const std::string& name, const zoned_time& zt); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template , + sys_time>::value && + std::is_constructible + < + zoned_time, + decltype(zoned_traits::locate_zone(std::string())), + zoned_time + >::value + >::type> +#else + template +#endif + zoned_time(const char* name, const zoned_time& zt); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template , + sys_time>::value && + std::is_constructible + < + zoned_time, + decltype(zoned_traits::locate_zone(std::string())), + zoned_time, + choose + >::value + >::type> +#else + template +#endif + zoned_time(const std::string& name, const zoned_time& zt, + choose); + +#if !defined(_MSC_VER) || (_MSC_VER > 1916) + template , + sys_time>::value && + std::is_constructible + < + zoned_time, + decltype(zoned_traits::locate_zone(std::string())), + zoned_time, + choose + >::value + >::type> +#else + template +#endif + zoned_time(const char* name, const zoned_time& zt, + choose); + +#endif // !HAS_STRING_VIEW + + zoned_time& operator=(const sys_time& st); + zoned_time& operator=(const local_time& ut); + + explicit operator sys_time() const; + explicit operator local_time() const; + + TimeZonePtr get_time_zone() const; + local_time get_local_time() const; + sys_time get_sys_time() const; + sys_info get_info() const; + + template + friend + bool + operator==(const zoned_time& x, + const zoned_time& y); + + template + friend + std::basic_ostream& + operator<<(std::basic_ostream& os, + const zoned_time& t); + +private: + template friend class zoned_time; + + template + static + TimeZonePtr2&& + check(TimeZonePtr2&& p); +}; + +using zoned_seconds = zoned_time; + +#if HAS_DEDUCTION_GUIDES + +namespace detail +{ + template + using time_zone_representation = + std::conditional_t + < + std::is_convertible::value, + time_zone const*, + std::remove_cv_t> + >; +} + +zoned_time() + -> zoned_time; + +template +zoned_time(sys_time) + -> zoned_time>; + +template +zoned_time(TimeZonePtrOrName&&) + -> zoned_time>; + +template +zoned_time(TimeZonePtrOrName&&, sys_time) + -> zoned_time, detail::time_zone_representation>; + +template +zoned_time(TimeZonePtrOrName&&, local_time, choose = choose::earliest) + -> zoned_time, detail::time_zone_representation>; + +template +zoned_time(TimeZonePtrOrName&&, zoned_time, choose = choose::earliest) + -> zoned_time, detail::time_zone_representation>; + +#endif // HAS_DEDUCTION_GUIDES + +template +inline +bool +operator==(const zoned_time& x, + const zoned_time& y) +{ + return x.zone_ == y.zone_ && x.tp_ == y.tp_; +} + +template +inline +bool +operator!=(const zoned_time& x, + const zoned_time& y) +{ + return !(x == y); +} + +#if !defined(_MSC_VER) || (_MSC_VER >= 1900) + +namespace detail +{ +# if USE_OS_TZDB + struct transition; + struct expanded_ttinfo; +# else // !USE_OS_TZDB + struct zonelet; + class Rule; +# endif // !USE_OS_TZDB +} + +#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900) + +class time_zone +{ +private: + std::string name_; +#if USE_OS_TZDB + std::vector transitions_; + std::vector ttinfos_; +#else // !USE_OS_TZDB + std::vector zonelets_; +#endif // !USE_OS_TZDB + std::unique_ptr adjusted_; + +public: +#if !defined(_MSC_VER) || (_MSC_VER >= 1900) + time_zone(time_zone&&) = default; + time_zone& operator=(time_zone&&) = default; +#else // defined(_MSC_VER) && (_MSC_VER < 1900) + time_zone(time_zone&& src); + time_zone& operator=(time_zone&& src); +#endif // defined(_MSC_VER) && (_MSC_VER < 1900) + + DATE_API explicit time_zone(const std::string& s, detail::undocumented); + + const std::string& name() const NOEXCEPT; + + template sys_info get_info(sys_time st) const; + template local_info get_info(local_time tp) const; + + template + sys_time::type> + to_sys(local_time tp) const; + + template + sys_time::type> + to_sys(local_time tp, choose z) const; + + template + local_time::type> + to_local(sys_time tp) const; + + friend bool operator==(const time_zone& x, const time_zone& y) NOEXCEPT; + friend bool operator< (const time_zone& x, const time_zone& y) NOEXCEPT; + friend DATE_API std::ostream& operator<<(std::ostream& os, const time_zone& z); + +#if !USE_OS_TZDB + DATE_API void add(const std::string& s); +#endif // !USE_OS_TZDB + +private: + DATE_API sys_info get_info_impl(sys_seconds tp) const; + DATE_API local_info get_info_impl(local_seconds tp) const; + + template + sys_time::type> + to_sys_impl(local_time tp, choose z, std::false_type) const; + template + sys_time::type> + to_sys_impl(local_time tp, choose, std::true_type) const; + +#if USE_OS_TZDB + DATE_API void init() const; + DATE_API void init_impl(); + DATE_API sys_info + load_sys_info(std::vector::const_iterator i) const; + + template + DATE_API void + load_data(std::istream& inf, std::int32_t tzh_leapcnt, std::int32_t tzh_timecnt, + std::int32_t tzh_typecnt, std::int32_t tzh_charcnt); +#else // !USE_OS_TZDB + DATE_API sys_info get_info_impl(sys_seconds tp, int timezone) const; + DATE_API void adjust_infos(const std::vector& rules); + DATE_API void parse_info(std::istream& in); +#endif // !USE_OS_TZDB +}; + +#if defined(_MSC_VER) && (_MSC_VER < 1900) + +inline +time_zone::time_zone(time_zone&& src) + : name_(std::move(src.name_)) + , zonelets_(std::move(src.zonelets_)) + , adjusted_(std::move(src.adjusted_)) + {} + +inline +time_zone& +time_zone::operator=(time_zone&& src) +{ + name_ = std::move(src.name_); + zonelets_ = std::move(src.zonelets_); + adjusted_ = std::move(src.adjusted_); + return *this; +} + +#endif // defined(_MSC_VER) && (_MSC_VER < 1900) + +inline +const std::string& +time_zone::name() const NOEXCEPT +{ + return name_; +} + +template +inline +sys_info +time_zone::get_info(sys_time st) const +{ + return get_info_impl(date::floor(st)); +} + +template +inline +local_info +time_zone::get_info(local_time tp) const +{ + return get_info_impl(date::floor(tp)); +} + +template +inline +sys_time::type> +time_zone::to_sys(local_time tp) const +{ + return to_sys_impl(tp, choose{}, std::true_type{}); +} + +template +inline +sys_time::type> +time_zone::to_sys(local_time tp, choose z) const +{ + return to_sys_impl(tp, z, std::false_type{}); +} + +template +inline +local_time::type> +time_zone::to_local(sys_time tp) const +{ + using LT = local_time::type>; + auto i = get_info(tp); + return LT{(tp + i.offset).time_since_epoch()}; +} + +inline bool operator==(const time_zone& x, const time_zone& y) NOEXCEPT {return x.name_ == y.name_;} +inline bool operator< (const time_zone& x, const time_zone& y) NOEXCEPT {return x.name_ < y.name_;} + +inline bool operator!=(const time_zone& x, const time_zone& y) NOEXCEPT {return !(x == y);} +inline bool operator> (const time_zone& x, const time_zone& y) NOEXCEPT {return y < x;} +inline bool operator<=(const time_zone& x, const time_zone& y) NOEXCEPT {return !(y < x);} +inline bool operator>=(const time_zone& x, const time_zone& y) NOEXCEPT {return !(x < y);} + +template +sys_time::type> +time_zone::to_sys_impl(local_time tp, choose z, std::false_type) const +{ + auto i = get_info(tp); + if (i.result == local_info::nonexistent) + { + return i.first.end; + } + else if (i.result == local_info::ambiguous) + { + if (z == choose::latest) + return sys_time{tp.time_since_epoch()} - i.second.offset; + } + return sys_time{tp.time_since_epoch()} - i.first.offset; +} + +template +sys_time::type> +time_zone::to_sys_impl(local_time tp, choose, std::true_type) const +{ + auto i = get_info(tp); + if (i.result == local_info::nonexistent) + throw nonexistent_local_time(tp, i); + else if (i.result == local_info::ambiguous) + throw ambiguous_local_time(tp, i); + return sys_time{tp.time_since_epoch()} - i.first.offset; +} + +#if !USE_OS_TZDB + +class time_zone_link +{ +private: + std::string name_; + std::string target_; +public: + DATE_API explicit time_zone_link(const std::string& s); + + const std::string& name() const {return name_;} + const std::string& target() const {return target_;} + + friend bool operator==(const time_zone_link& x, const time_zone_link& y) {return x.name_ == y.name_;} + friend bool operator< (const time_zone_link& x, const time_zone_link& y) {return x.name_ < y.name_;} + + friend DATE_API std::ostream& operator<<(std::ostream& os, const time_zone_link& x); +}; + +using link = time_zone_link; + +inline bool operator!=(const time_zone_link& x, const time_zone_link& y) {return !(x == y);} +inline bool operator> (const time_zone_link& x, const time_zone_link& y) {return y < x;} +inline bool operator<=(const time_zone_link& x, const time_zone_link& y) {return !(y < x);} +inline bool operator>=(const time_zone_link& x, const time_zone_link& y) {return !(x < y);} + +#endif // !USE_OS_TZDB + +class leap_second +{ +private: + sys_seconds date_; + +public: +#if USE_OS_TZDB + DATE_API explicit leap_second(const sys_seconds& s, detail::undocumented); +#else + DATE_API explicit leap_second(const std::string& s, detail::undocumented); +#endif + + sys_seconds date() const {return date_;} + + friend bool operator==(const leap_second& x, const leap_second& y) {return x.date_ == y.date_;} + friend bool operator< (const leap_second& x, const leap_second& y) {return x.date_ < y.date_;} + + template + friend + bool + operator==(const leap_second& x, const sys_time& y) + { + return x.date_ == y; + } + + template + friend + bool + operator< (const leap_second& x, const sys_time& y) + { + return x.date_ < y; + } + + template + friend + bool + operator< (const sys_time& x, const leap_second& y) + { + return x < y.date_; + } + + friend DATE_API std::ostream& operator<<(std::ostream& os, const leap_second& x); +}; + +inline bool operator!=(const leap_second& x, const leap_second& y) {return !(x == y);} +inline bool operator> (const leap_second& x, const leap_second& y) {return y < x;} +inline bool operator<=(const leap_second& x, const leap_second& y) {return !(y < x);} +inline bool operator>=(const leap_second& x, const leap_second& y) {return !(x < y);} + +template +inline +bool +operator==(const sys_time& x, const leap_second& y) +{ + return y == x; +} + +template +inline +bool +operator!=(const leap_second& x, const sys_time& y) +{ + return !(x == y); +} + +template +inline +bool +operator!=(const sys_time& x, const leap_second& y) +{ + return !(x == y); +} + +template +inline +bool +operator> (const leap_second& x, const sys_time& y) +{ + return y < x; +} + +template +inline +bool +operator> (const sys_time& x, const leap_second& y) +{ + return y < x; +} + +template +inline +bool +operator<=(const leap_second& x, const sys_time& y) +{ + return !(y < x); +} + +template +inline +bool +operator<=(const sys_time& x, const leap_second& y) +{ + return !(y < x); +} + +template +inline +bool +operator>=(const leap_second& x, const sys_time& y) +{ + return !(x < y); +} + +template +inline +bool +operator>=(const sys_time& x, const leap_second& y) +{ + return !(x < y); +} + +using leap = leap_second; + +#ifdef _WIN32 + +namespace detail +{ + +// The time zone mapping is modelled after this data file: +// http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml +// and the field names match the element names from the mapZone element +// of windowsZones.xml. +// The website displays this file here: +// http://www.unicode.org/cldr/charts/latest/supplemental/zone_tzid.html +// The html view is sorted before being displayed but is otherwise the same +// There is a mapping between the os centric view (in this case windows) +// the html displays uses and the generic view the xml file. +// That mapping is this: +// display column "windows" -> xml field "other". +// display column "region" -> xml field "territory". +// display column "tzid" -> xml field "type". +// This structure uses the generic terminology because it could be +// used to to support other os/native name conversions, not just windows, +// and using the same generic names helps retain the connection to the +// origin of the data that we are using. +struct timezone_mapping +{ + timezone_mapping(const char* other, const char* territory, const char* type) + : other(other), territory(territory), type(type) + { + } + timezone_mapping() = default; + std::string other; + std::string territory; + std::string type; +}; + +} // detail + +#endif // _WIN32 + +struct tzdb +{ + std::string version = "unknown"; + std::vector zones; +#if !USE_OS_TZDB + std::vector links; +#endif + std::vector leap_seconds; +#if !USE_OS_TZDB + std::vector rules; +#endif +#ifdef _WIN32 + std::vector mappings; +#endif + tzdb* next = nullptr; + + tzdb() = default; +#if !defined(_MSC_VER) || (_MSC_VER >= 1900) + tzdb(tzdb&&) = default; + tzdb& operator=(tzdb&&) = default; +#else // defined(_MSC_VER) && (_MSC_VER < 1900) + tzdb(tzdb&& src) + : version(std::move(src.version)) + , zones(std::move(src.zones)) + , links(std::move(src.links)) + , leap_seconds(std::move(src.leap_seconds)) + , rules(std::move(src.rules)) + , mappings(std::move(src.mappings)) + {} + + tzdb& operator=(tzdb&& src) + { + version = std::move(src.version); + zones = std::move(src.zones); + links = std::move(src.links); + leap_seconds = std::move(src.leap_seconds); + rules = std::move(src.rules); + mappings = std::move(src.mappings); + return *this; + } +#endif // defined(_MSC_VER) && (_MSC_VER < 1900) + +#if HAS_STRING_VIEW + const time_zone* locate_zone(std::string_view tz_name) const; +#else + const time_zone* locate_zone(const std::string& tz_name) const; +#endif + const time_zone* current_zone() const; +}; + +using TZ_DB = tzdb; + +DATE_API std::ostream& +operator<<(std::ostream& os, const tzdb& db); + +DATE_API const tzdb& get_tzdb(); + +class tzdb_list +{ + std::atomic head_{nullptr}; + +public: + ~tzdb_list(); + tzdb_list() = default; + tzdb_list(tzdb_list&& x) NOEXCEPT; + + const tzdb& front() const NOEXCEPT {return *head_;} + tzdb& front() NOEXCEPT {return *head_;} + + class const_iterator; + + const_iterator begin() const NOEXCEPT; + const_iterator end() const NOEXCEPT; + + const_iterator cbegin() const NOEXCEPT; + const_iterator cend() const NOEXCEPT; + + const_iterator erase_after(const_iterator p) NOEXCEPT; + + struct undocumented_helper; +private: + void push_front(tzdb* tzdb) NOEXCEPT; +}; + +class tzdb_list::const_iterator +{ + tzdb* p_ = nullptr; + + explicit const_iterator(tzdb* p) NOEXCEPT : p_{p} {} +public: + const_iterator() = default; + + using iterator_category = std::forward_iterator_tag; + using value_type = tzdb; + using reference = const value_type&; + using pointer = const value_type*; + using difference_type = std::ptrdiff_t; + + reference operator*() const NOEXCEPT {return *p_;} + pointer operator->() const NOEXCEPT {return p_;} + + const_iterator& operator++() NOEXCEPT {p_ = p_->next; return *this;} + const_iterator operator++(int) NOEXCEPT {auto t = *this; ++(*this); return t;} + + friend + bool + operator==(const const_iterator& x, const const_iterator& y) NOEXCEPT + {return x.p_ == y.p_;} + + friend + bool + operator!=(const const_iterator& x, const const_iterator& y) NOEXCEPT + {return !(x == y);} + + friend class tzdb_list; +}; + +inline +tzdb_list::const_iterator +tzdb_list::begin() const NOEXCEPT +{ + return const_iterator{head_}; +} + +inline +tzdb_list::const_iterator +tzdb_list::end() const NOEXCEPT +{ + return const_iterator{nullptr}; +} + +inline +tzdb_list::const_iterator +tzdb_list::cbegin() const NOEXCEPT +{ + return begin(); +} + +inline +tzdb_list::const_iterator +tzdb_list::cend() const NOEXCEPT +{ + return end(); +} + +DATE_API tzdb_list& get_tzdb_list(); + +#if !USE_OS_TZDB + +DATE_API const tzdb& reload_tzdb(); +DATE_API void set_install(const std::string& install); + +#endif // !USE_OS_TZDB + +#if HAS_REMOTE_API + +DATE_API std::string remote_version(); +// if provided error_buffer size should be at least CURL_ERROR_SIZE +DATE_API bool remote_download(const std::string& version, char* error_buffer = nullptr); +DATE_API bool remote_install(const std::string& version); + +#endif + +// zoned_time + +namespace detail +{ + +template +inline +T* +to_raw_pointer(T* p) NOEXCEPT +{ + return p; +} + +template +inline +auto +to_raw_pointer(Pointer p) NOEXCEPT + -> decltype(detail::to_raw_pointer(p.operator->())) +{ + return detail::to_raw_pointer(p.operator->()); +} + +} // namespace detail + +template +template +inline +TimeZonePtr2&& +zoned_time::check(TimeZonePtr2&& p) +{ + if (detail::to_raw_pointer(p) == nullptr) + throw std::runtime_error( + "zoned_time constructed with a time zone pointer == nullptr"); + return std::forward(p); +} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time() + : zone_(check(zoned_traits::default_zone())) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time(const sys_time& st) + : zone_(check(zoned_traits::default_zone())) + , tp_(st) + {} + +template +inline +zoned_time::zoned_time(TimeZonePtr z) + : zone_(check(std::move(z))) + {} + +#if HAS_STRING_VIEW + +template +template +inline +zoned_time::zoned_time(std::string_view name) + : zoned_time(zoned_traits::locate_zone(name)) + {} + +#else // !HAS_STRING_VIEW + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time(const std::string& name) + : zoned_time(zoned_traits::locate_zone(name)) + {} + +#endif // !HAS_STRING_VIEW + +template +template +inline +zoned_time::zoned_time(const zoned_time& zt) NOEXCEPT + : zone_(zt.zone_) + , tp_(zt.tp_) + {} + +template +inline +zoned_time::zoned_time(TimeZonePtr z, const sys_time& st) + : zone_(check(std::move(z))) + , tp_(st) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time(TimeZonePtr z, const local_time& t) + : zone_(check(std::move(z))) + , tp_(zone_->to_sys(t)) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time(TimeZonePtr z, const local_time& t, + choose c) + : zone_(check(std::move(z))) + , tp_(zone_->to_sys(t, c)) + {} + +template +template +inline +zoned_time::zoned_time(TimeZonePtr z, + const zoned_time& zt) + : zone_(check(std::move(z))) + , tp_(zt.tp_) + {} + +template +template +inline +zoned_time::zoned_time(TimeZonePtr z, + const zoned_time& zt, choose) + : zoned_time(std::move(z), zt) + {} + +#if HAS_STRING_VIEW + +template +template +inline +zoned_time::zoned_time(std::string_view name, + detail::nodeduct_t&> st) + : zoned_time(zoned_traits::locate_zone(name), st) + {} + +template +template +inline +zoned_time::zoned_time(std::string_view name, + detail::nodeduct_t&> t) + : zoned_time(zoned_traits::locate_zone(name), t) + {} + +template +template +inline +zoned_time::zoned_time(std::string_view name, + detail::nodeduct_t&> t, choose c) + : zoned_time(zoned_traits::locate_zone(name), t, c) + {} + +template +template +inline +zoned_time::zoned_time(std::string_view name, + const zoned_time& zt) + : zoned_time(zoned_traits::locate_zone(name), zt) + {} + +template +template +inline +zoned_time::zoned_time(std::string_view name, + const zoned_time& zt, + choose c) + : zoned_time(zoned_traits::locate_zone(name), zt, c) + {} + +#else // !HAS_STRING_VIEW + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time(const std::string& name, + const sys_time& st) + : zoned_time(zoned_traits::locate_zone(name), st) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time(const char* name, + const sys_time& st) + : zoned_time(zoned_traits::locate_zone(name), st) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time(const std::string& name, + const local_time& t) + : zoned_time(zoned_traits::locate_zone(name), t) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time(const char* name, + const local_time& t) + : zoned_time(zoned_traits::locate_zone(name), t) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time(const std::string& name, + const local_time& t, choose c) + : zoned_time(zoned_traits::locate_zone(name), t, c) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#endif +inline +zoned_time::zoned_time(const char* name, + const local_time& t, choose c) + : zoned_time(zoned_traits::locate_zone(name), t, c) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#else +template +#endif +inline +zoned_time::zoned_time(const std::string& name, + const zoned_time& zt) + : zoned_time(zoned_traits::locate_zone(name), zt) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#else +template +#endif +inline +zoned_time::zoned_time(const char* name, + const zoned_time& zt) + : zoned_time(zoned_traits::locate_zone(name), zt) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#else +template +#endif +inline +zoned_time::zoned_time(const std::string& name, + const zoned_time& zt, + choose c) + : zoned_time(zoned_traits::locate_zone(name), zt, c) + {} + +template +#if !defined(_MSC_VER) || (_MSC_VER > 1916) +template +#else +template +#endif +inline +zoned_time::zoned_time(const char* name, + const zoned_time& zt, + choose c) + : zoned_time(zoned_traits::locate_zone(name), zt, c) + {} + +#endif // HAS_STRING_VIEW + +template +inline +zoned_time& +zoned_time::operator=(const sys_time& st) +{ + tp_ = st; + return *this; +} + +template +inline +zoned_time& +zoned_time::operator=(const local_time& ut) +{ + tp_ = zone_->to_sys(ut); + return *this; +} + +template +inline +zoned_time::operator local_time::duration>() const +{ + return get_local_time(); +} + +template +inline +zoned_time::operator sys_time::duration>() const +{ + return get_sys_time(); +} + +template +inline +TimeZonePtr +zoned_time::get_time_zone() const +{ + return zone_; +} + +template +inline +local_time::duration> +zoned_time::get_local_time() const +{ + return zone_->to_local(tp_); +} + +template +inline +sys_time::duration> +zoned_time::get_sys_time() const +{ + return tp_; +} + +template +inline +sys_info +zoned_time::get_info() const +{ + return zone_->get_info(tp_); +} + +// make_zoned_time + +inline +zoned_time +make_zoned() +{ + return zoned_time(); +} + +template +inline +zoned_time::type> +make_zoned(const sys_time& tp) +{ + return zoned_time::type>(tp); +} + +template 1916) +#if !defined(__INTEL_COMPILER) || (__INTEL_COMPILER > 1600) + , class = typename std::enable_if + < + std::is_class + < + typename std::decay + < + decltype(*detail::to_raw_pointer(std::declval())) + >::type + >{} + >::type +#endif +#endif + > +inline +zoned_time +make_zoned(TimeZonePtr z) +{ + return zoned_time(std::move(z)); +} + +inline +zoned_seconds +make_zoned(const std::string& name) +{ + return zoned_seconds(name); +} + +template 1916) +#if !defined(__INTEL_COMPILER) || (__INTEL_COMPILER > 1600) + , class = typename std::enable_if + < + std::is_class())>::type>{} + >::type +#endif +#endif + > +inline +zoned_time::type, TimeZonePtr> +make_zoned(TimeZonePtr zone, const local_time& tp) +{ + return zoned_time::type, + TimeZonePtr>(std::move(zone), tp); +} + +template 1916) +#if !defined(__INTEL_COMPILER) || (__INTEL_COMPILER > 1600) + , class = typename std::enable_if + < + std::is_class())>::type>{} + >::type +#endif +#endif + > +inline +zoned_time::type, TimeZonePtr> +make_zoned(TimeZonePtr zone, const local_time& tp, choose c) +{ + return zoned_time::type, + TimeZonePtr>(std::move(zone), tp, c); +} + +template +inline +zoned_time::type> +make_zoned(const std::string& name, const local_time& tp) +{ + return zoned_time::type>(name, tp); +} + +template +inline +zoned_time::type> +make_zoned(const std::string& name, const local_time& tp, choose c) +{ + return zoned_time::type>(name, tp, c); +} + +template +inline +zoned_time +make_zoned(TimeZonePtr zone, const zoned_time& zt) +{ + return zoned_time(std::move(zone), zt); +} + +template +inline +zoned_time +make_zoned(const std::string& name, const zoned_time& zt) +{ + return zoned_time(name, zt); +} + +template +inline +zoned_time +make_zoned(TimeZonePtr zone, const zoned_time& zt, choose c) +{ + return zoned_time(std::move(zone), zt, c); +} + +template +inline +zoned_time +make_zoned(const std::string& name, const zoned_time& zt, choose c) +{ + return zoned_time(name, zt, c); +} + +template 1916) +#if !defined(__INTEL_COMPILER) || (__INTEL_COMPILER > 1600) + , class = typename std::enable_if + < + std::is_class())>::type>{} + >::type +#endif +#endif + > +inline +zoned_time::type, TimeZonePtr> +make_zoned(TimeZonePtr zone, const sys_time& st) +{ + return zoned_time::type, + TimeZonePtr>(std::move(zone), st); +} + +template +inline +zoned_time::type> +make_zoned(const std::string& name, const sys_time& st) +{ + return zoned_time::type>(name, st); +} + +template +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, + const zoned_time& tp) +{ + using duration = typename zoned_time::duration; + using LT = local_time; + auto const st = tp.get_sys_time(); + auto const info = tp.get_time_zone()->get_info(st); + return to_stream(os, fmt, LT{(st+info.offset).time_since_epoch()}, + &info.abbrev, &info.offset); +} + +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& os, const zoned_time& t) +{ + const CharT fmt[] = {'%', 'F', ' ', '%', 'T', ' ', '%', 'Z', CharT{}}; + return to_stream(os, fmt, t); +} + +class utc_clock +{ +public: + using duration = std::chrono::system_clock::duration; + using rep = duration::rep; + using period = duration::period; + using time_point = std::chrono::time_point; + static CONSTDATA bool is_steady = false; + + static time_point now(); + + template + static + std::chrono::time_point::type> + to_sys(const std::chrono::time_point&); + + template + static + std::chrono::time_point::type> + from_sys(const std::chrono::time_point&); + + template + static + std::chrono::time_point::type> + to_local(const std::chrono::time_point&); + + template + static + std::chrono::time_point::type> + from_local(const std::chrono::time_point&); +}; + +template + using utc_time = std::chrono::time_point; + +using utc_seconds = utc_time; + +template +utc_time::type> +utc_clock::from_sys(const sys_time& st) +{ + using std::chrono::seconds; + using CD = typename std::common_type::type; + auto const& leaps = get_tzdb().leap_seconds; + auto const lt = std::upper_bound(leaps.begin(), leaps.end(), st); + return utc_time{st.time_since_epoch() + seconds{lt-leaps.begin()}}; +} + +// Return pair +// first is true if ut is during a leap second insertion, otherwise false. +// If ut is during a leap second insertion, that leap second is included in the count +template +std::pair +is_leap_second(date::utc_time const& ut) +{ + using std::chrono::seconds; + using duration = typename std::common_type::type; + auto const& leaps = get_tzdb().leap_seconds; + auto tp = sys_time{ut.time_since_epoch()}; + auto const lt = std::upper_bound(leaps.begin(), leaps.end(), tp); + auto ds = seconds{lt-leaps.begin()}; + tp -= ds; + auto ls = false; + if (lt > leaps.begin()) + { + if (tp < lt[-1]) + { + if (tp >= lt[-1].date() - seconds{1}) + ls = true; + else + --ds; + } + } + return {ls, ds}; +} + +struct leap_second_info +{ + bool is_leap_second; + std::chrono::seconds elapsed; +}; + +template +leap_second_info +get_leap_second_info(date::utc_time const& ut) +{ + auto p = is_leap_second(ut); + return {p.first, p.second}; +} + +template +sys_time::type> +utc_clock::to_sys(const utc_time& ut) +{ + using std::chrono::seconds; + using CD = typename std::common_type::type; + auto ls = is_leap_second(ut); + auto tp = sys_time{ut.time_since_epoch() - ls.second}; + if (ls.first) + tp = floor(tp) + seconds{1} - CD{1}; + return tp; +} + +inline +utc_clock::time_point +utc_clock::now() +{ + return from_sys(std::chrono::system_clock::now()); +} + +template +utc_time::type> +utc_clock::from_local(const local_time& st) +{ + return from_sys(sys_time{st.time_since_epoch()}); +} + +template +local_time::type> +utc_clock::to_local(const utc_time& ut) +{ + using CD = typename std::common_type::type; + return local_time{to_sys(ut).time_since_epoch()}; +} + +template +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, + const utc_time& t) +{ + using std::chrono::seconds; + using CT = typename std::common_type::type; + const std::string abbrev("UTC"); + CONSTDATA seconds offset{0}; + auto ls = is_leap_second(t); + auto tp = sys_time{t.time_since_epoch() - ls.second}; + auto const sd = floor(tp); + year_month_day ymd = sd; + auto time = make_time(tp - sys_seconds{sd}); + time.seconds(detail::undocumented{}) += seconds{ls.first}; + fields fds{ymd, time}; + return to_stream(os, fmt, fds, &abbrev, &offset); +} + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const utc_time& t) +{ + const CharT fmt[] = {'%', 'F', ' ', '%', 'T', CharT{}}; + return to_stream(os, fmt, t); +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, + utc_time& tp, std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + using std::chrono::seconds; + using std::chrono::minutes; + using CT = typename std::common_type::type; + minutes offset_local{}; + auto offptr = offset ? offset : &offset_local; + fields fds{}; + fds.has_tod = true; + from_stream(is, fmt, fds, abbrev, offptr); + if (!fds.ymd.ok()) + is.setstate(std::ios::failbit); + if (!is.fail()) + { + bool is_60_sec = fds.tod.seconds() == seconds{60}; + if (is_60_sec) + fds.tod.seconds(detail::undocumented{}) -= seconds{1}; + auto tmp = utc_clock::from_sys(sys_days(fds.ymd) - *offptr + fds.tod.to_duration()); + if (is_60_sec) + tmp += seconds{1}; + if (is_60_sec != is_leap_second(tmp).first || !fds.tod.in_conventional_range()) + { + is.setstate(std::ios::failbit); + return is; + } + tp = std::chrono::time_point_cast(tmp); + } + return is; +} + +// tai_clock + +class tai_clock +{ +public: + using duration = std::chrono::system_clock::duration; + using rep = duration::rep; + using period = duration::period; + using time_point = std::chrono::time_point; + static const bool is_steady = false; + + static time_point now(); + + template + static + std::chrono::time_point::type> + to_utc(const std::chrono::time_point&) NOEXCEPT; + + template + static + std::chrono::time_point::type> + from_utc(const std::chrono::time_point&) NOEXCEPT; + + template + static + std::chrono::time_point::type> + to_local(const std::chrono::time_point&) NOEXCEPT; + + template + static + std::chrono::time_point::type> + from_local(const std::chrono::time_point&) NOEXCEPT; +}; + +template + using tai_time = std::chrono::time_point; + +using tai_seconds = tai_time; + +template +inline +utc_time::type> +tai_clock::to_utc(const tai_time& t) NOEXCEPT +{ + using std::chrono::seconds; + using CD = typename std::common_type::type; + return utc_time{t.time_since_epoch()} - + (sys_days(year{1970}/January/1) - sys_days(year{1958}/January/1) + seconds{10}); +} + +template +inline +tai_time::type> +tai_clock::from_utc(const utc_time& t) NOEXCEPT +{ + using std::chrono::seconds; + using CD = typename std::common_type::type; + return tai_time{t.time_since_epoch()} + + (sys_days(year{1970}/January/1) - sys_days(year{1958}/January/1) + seconds{10}); +} + +inline +tai_clock::time_point +tai_clock::now() +{ + return from_utc(utc_clock::now()); +} + +template +inline +local_time::type> +tai_clock::to_local(const tai_time& t) NOEXCEPT +{ + using CD = typename std::common_type::type; + return local_time{t.time_since_epoch()} - + (local_days(year{1970}/January/1) - local_days(year{1958}/January/1)); +} + +template +inline +tai_time::type> +tai_clock::from_local(const local_time& t) NOEXCEPT +{ + using CD = typename std::common_type::type; + return tai_time{t.time_since_epoch()} + + (local_days(year{1970}/January/1) - local_days(year{1958}/January/1)); +} + +template +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, + const tai_time& t) +{ + const std::string abbrev("TAI"); + CONSTDATA std::chrono::seconds offset{0}; + return to_stream(os, fmt, tai_clock::to_local(t), &abbrev, &offset); +} + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const tai_time& t) +{ + const CharT fmt[] = {'%', 'F', ' ', '%', 'T', CharT{}}; + return to_stream(os, fmt, t); +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, + tai_time& tp, + std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + local_time lp; + from_stream(is, fmt, lp, abbrev, offset); + if (!is.fail()) + tp = tai_clock::from_local(lp); + return is; +} + +// gps_clock + +class gps_clock +{ +public: + using duration = std::chrono::system_clock::duration; + using rep = duration::rep; + using period = duration::period; + using time_point = std::chrono::time_point; + static const bool is_steady = false; + + static time_point now(); + + template + static + std::chrono::time_point::type> + to_utc(const std::chrono::time_point&) NOEXCEPT; + + template + static + std::chrono::time_point::type> + from_utc(const std::chrono::time_point&) NOEXCEPT; + + template + static + std::chrono::time_point::type> + to_local(const std::chrono::time_point&) NOEXCEPT; + + template + static + std::chrono::time_point::type> + from_local(const std::chrono::time_point&) NOEXCEPT; +}; + +template + using gps_time = std::chrono::time_point; + +using gps_seconds = gps_time; + +template +inline +utc_time::type> +gps_clock::to_utc(const gps_time& t) NOEXCEPT +{ + using std::chrono::seconds; + using CD = typename std::common_type::type; + return utc_time{t.time_since_epoch()} + + (sys_days(year{1980}/January/Sunday[1]) - sys_days(year{1970}/January/1) + + seconds{9}); +} + +template +inline +gps_time::type> +gps_clock::from_utc(const utc_time& t) NOEXCEPT +{ + using std::chrono::seconds; + using CD = typename std::common_type::type; + return gps_time{t.time_since_epoch()} - + (sys_days(year{1980}/January/Sunday[1]) - sys_days(year{1970}/January/1) + + seconds{9}); +} + +inline +gps_clock::time_point +gps_clock::now() +{ + return from_utc(utc_clock::now()); +} + +template +inline +local_time::type> +gps_clock::to_local(const gps_time& t) NOEXCEPT +{ + using CD = typename std::common_type::type; + return local_time{t.time_since_epoch()} + + (local_days(year{1980}/January/Sunday[1]) - local_days(year{1970}/January/1)); +} + +template +inline +gps_time::type> +gps_clock::from_local(const local_time& t) NOEXCEPT +{ + using CD = typename std::common_type::type; + return gps_time{t.time_since_epoch()} - + (local_days(year{1980}/January/Sunday[1]) - local_days(year{1970}/January/1)); +} + + +template +std::basic_ostream& +to_stream(std::basic_ostream& os, const CharT* fmt, + const gps_time& t) +{ + const std::string abbrev("GPS"); + CONSTDATA std::chrono::seconds offset{0}; + return to_stream(os, fmt, gps_clock::to_local(t), &abbrev, &offset); +} + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, const gps_time& t) +{ + const CharT fmt[] = {'%', 'F', ' ', '%', 'T', CharT{}}; + return to_stream(os, fmt, t); +} + +template > +std::basic_istream& +from_stream(std::basic_istream& is, const CharT* fmt, + gps_time& tp, + std::basic_string* abbrev = nullptr, + std::chrono::minutes* offset = nullptr) +{ + local_time lp; + from_stream(is, fmt, lp, abbrev, offset); + if (!is.fail()) + tp = gps_clock::from_local(lp); + return is; +} + +// clock_time_conversion + +template +struct clock_time_conversion +{}; + +template <> +struct clock_time_conversion +{ + template + CONSTCD14 + sys_time + operator()(const sys_time& st) const + { + return st; + } +}; + +template <> +struct clock_time_conversion +{ + template + CONSTCD14 + utc_time + operator()(const utc_time& ut) const + { + return ut; + } +}; + +template<> +struct clock_time_conversion +{ + template + CONSTCD14 + local_time + operator()(const local_time& lt) const + { + return lt; + } +}; + +template <> +struct clock_time_conversion +{ + template + utc_time::type> + operator()(const sys_time& st) const + { + return utc_clock::from_sys(st); + } +}; + +template <> +struct clock_time_conversion +{ + template + sys_time::type> + operator()(const utc_time& ut) const + { + return utc_clock::to_sys(ut); + } +}; + +template<> +struct clock_time_conversion +{ + template + CONSTCD14 + local_time + operator()(const sys_time& st) const + { + return local_time{st.time_since_epoch()}; + } +}; + +template<> +struct clock_time_conversion +{ + template + CONSTCD14 + sys_time + operator()(const local_time& lt) const + { + return sys_time{lt.time_since_epoch()}; + } +}; + +template<> +struct clock_time_conversion +{ + template + utc_time::type> + operator()(const local_time& lt) const + { + return utc_clock::from_local(lt); + } +}; + +template<> +struct clock_time_conversion +{ + template + local_time::type> + operator()(const utc_time& ut) const + { + return utc_clock::to_local(ut); + } +}; + +template +struct clock_time_conversion +{ + template + CONSTCD14 + std::chrono::time_point + operator()(const std::chrono::time_point& tp) const + { + return tp; + } +}; + +namespace ctc_detail +{ + +template + using time_point = std::chrono::time_point; + +using std::declval; +using std::chrono::system_clock; + +//Check if TimePoint is time for given clock, +//if not emits hard error +template +struct return_clock_time +{ + using clock_time_point = time_point; + using type = TimePoint; + + static_assert(std::is_same::value, + "time point with appropariate clock shall be returned"); +}; + +// Check if Clock has to_sys method accepting TimePoint with given duration const& and +// returning sys_time. If so has nested type member equal to return type to_sys. +template +struct return_to_sys +{}; + +template +struct return_to_sys + < + Clock, Duration, + decltype(Clock::to_sys(declval const&>()), void()) + > + : return_clock_time + < + system_clock, + decltype(Clock::to_sys(declval const&>())) + > +{}; + +// Similiar to above +template +struct return_from_sys +{}; + +template +struct return_from_sys + < + Clock, Duration, + decltype(Clock::from_sys(declval const&>()), + void()) + > + : return_clock_time + < + Clock, + decltype(Clock::from_sys(declval const&>())) + > +{}; + +// Similiar to above +template +struct return_to_utc +{}; + +template +struct return_to_utc + < + Clock, Duration, + decltype(Clock::to_utc(declval const&>()), void()) + > + : return_clock_time + < + utc_clock, + decltype(Clock::to_utc(declval const&>()))> +{}; + +// Similiar to above +template +struct return_from_utc +{}; + +template +struct return_from_utc + < + Clock, Duration, + decltype(Clock::from_utc(declval const&>()), + void()) + > + : return_clock_time + < + Clock, + decltype(Clock::from_utc(declval const&>())) + > +{}; + +// Similiar to above +template +struct return_to_local +{}; + +template +struct return_to_local + < + Clock, Duration, + decltype(Clock::to_local(declval const&>()), + void()) + > + : return_clock_time + < + local_t, + decltype(Clock::to_local(declval const&>())) + > +{}; + +// Similiar to above +template +struct return_from_local +{}; + +template +struct return_from_local + < + Clock, Duration, + decltype(Clock::from_local(declval const&>()), + void()) + > + : return_clock_time + < + Clock, + decltype(Clock::from_local(declval const&>())) + > +{}; + +} // namespace ctc_detail + +template +struct clock_time_conversion +{ + template + CONSTCD14 + typename ctc_detail::return_to_sys::type + operator()(const std::chrono::time_point& tp) const + { + return SrcClock::to_sys(tp); + } +}; + +template +struct clock_time_conversion +{ + template + CONSTCD14 + typename ctc_detail::return_from_sys::type + operator()(const sys_time& st) const + { + return DstClock::from_sys(st); + } +}; + +template +struct clock_time_conversion +{ + template + CONSTCD14 + typename ctc_detail::return_to_utc::type + operator()(const std::chrono::time_point& tp) const + { + return SrcClock::to_utc(tp); + } +}; + +template +struct clock_time_conversion +{ + template + CONSTCD14 + typename ctc_detail::return_from_utc::type + operator()(const utc_time& ut) const + { + return DstClock::from_utc(ut); + } +}; + +template +struct clock_time_conversion +{ + template + CONSTCD14 + typename ctc_detail::return_to_local::type + operator()(const std::chrono::time_point& tp) const + { + return SrcClock::to_local(tp); + } +}; + +template +struct clock_time_conversion +{ + template + CONSTCD14 + typename ctc_detail::return_from_local::type + operator()(const local_time& lt) const + { + return DstClock::from_local(lt); + } +}; + +namespace clock_cast_detail +{ + +template + using time_point = std::chrono::time_point; +using std::chrono::system_clock; + +template +CONSTCD14 +auto +conv_clock(const time_point& t) + -> decltype(std::declval>()(t)) +{ + return clock_time_conversion{}(t); +} + +//direct trait conversion, 1st candidate +template +CONSTCD14 +auto +cc_impl(const time_point& t, const time_point*) + -> decltype(conv_clock(t)) +{ + return conv_clock(t); +} + +//conversion through sys, 2nd candidate +template +CONSTCD14 +auto +cc_impl(const time_point& t, const void*) + -> decltype(conv_clock(conv_clock(t))) +{ + return conv_clock(conv_clock(t)); +} + +//conversion through utc, 2nd candidate +template +CONSTCD14 +auto +cc_impl(const time_point& t, const void*) + -> decltype(0, // MSVC_WORKAROUND + conv_clock(conv_clock(t))) +{ + return conv_clock(conv_clock(t)); +} + +//conversion through sys and utc, 3rd candidate +template +CONSTCD14 +auto +cc_impl(const time_point& t, ...) + -> decltype(conv_clock(conv_clock(conv_clock(t)))) +{ + return conv_clock(conv_clock(conv_clock(t))); +} + +//conversion through utc and sys, 3rd candidate +template +CONSTCD14 +auto +cc_impl(const time_point& t, ...) + -> decltype(0, // MSVC_WORKAROUND + conv_clock(conv_clock(conv_clock(t)))) +{ + return conv_clock(conv_clock(conv_clock(t))); +} + +} // namespace clock_cast_detail + +template +CONSTCD14 +auto +clock_cast(const std::chrono::time_point& tp) + -> decltype(clock_cast_detail::cc_impl(tp, &tp)) +{ + return clock_cast_detail::cc_impl(tp, &tp); +} + +// Deprecated API + +template +inline +sys_time::type> +to_sys_time(const utc_time& t) +{ + return utc_clock::to_sys(t); +} + +template +inline +sys_time::type> +to_sys_time(const tai_time& t) +{ + return utc_clock::to_sys(tai_clock::to_utc(t)); +} + +template +inline +sys_time::type> +to_sys_time(const gps_time& t) +{ + return utc_clock::to_sys(gps_clock::to_utc(t)); +} + + +template +inline +utc_time::type> +to_utc_time(const sys_time& t) +{ + return utc_clock::from_sys(t); +} + +template +inline +utc_time::type> +to_utc_time(const tai_time& t) +{ + return tai_clock::to_utc(t); +} + +template +inline +utc_time::type> +to_utc_time(const gps_time& t) +{ + return gps_clock::to_utc(t); +} + + +template +inline +tai_time::type> +to_tai_time(const sys_time& t) +{ + return tai_clock::from_utc(utc_clock::from_sys(t)); +} + +template +inline +tai_time::type> +to_tai_time(const utc_time& t) +{ + return tai_clock::from_utc(t); +} + +template +inline +tai_time::type> +to_tai_time(const gps_time& t) +{ + return tai_clock::from_utc(gps_clock::to_utc(t)); +} + + +template +inline +gps_time::type> +to_gps_time(const sys_time& t) +{ + return gps_clock::from_utc(utc_clock::from_sys(t)); +} + +template +inline +gps_time::type> +to_gps_time(const utc_time& t) +{ + return gps_clock::from_utc(t); +} + +template +inline +gps_time::type> +to_gps_time(const tai_time& t) +{ + return gps_clock::from_utc(tai_clock::to_utc(t)); +} + +} // namespace date + +#endif // TZ_H diff --git a/deps/date/include/date/tz_private.h b/deps/date/include/date/tz_private.h new file mode 100644 index 0000000..aec01d0 --- /dev/null +++ b/deps/date/include/date/tz_private.h @@ -0,0 +1,316 @@ +#ifndef TZ_PRIVATE_H +#define TZ_PRIVATE_H + +// The MIT License (MIT) +// +// Copyright (c) 2015, 2016 Howard Hinnant +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// Our apologies. When the previous paragraph was written, lowercase had not yet +// been invented (that would involve another several millennia of evolution). +// We did not mean to shout. + +#if !defined(_MSC_VER) || (_MSC_VER >= 1900) +#include "tz.h" +#else +#include "date.h" +#include +#endif + +namespace date +{ + +namespace detail +{ + +#if !USE_OS_TZDB + +enum class tz {utc, local, standard}; + +//forward declare to avoid warnings in gcc 6.2 +class MonthDayTime; +std::istream& operator>>(std::istream& is, MonthDayTime& x); +std::ostream& operator<<(std::ostream& os, const MonthDayTime& x); + + +class MonthDayTime +{ +private: + struct pair + { +#if defined(_MSC_VER) && (_MSC_VER < 1900) + pair() : month_day_(date::jan / 1), weekday_(0U) {} + + pair(const date::month_day& month_day, const date::weekday& weekday) + : month_day_(month_day), weekday_(weekday) {} +#endif + + date::month_day month_day_; + date::weekday weekday_; + }; + + enum Type {month_day, month_last_dow, lteq, gteq}; + + Type type_{month_day}; + +#if !defined(_MSC_VER) || (_MSC_VER >= 1900) + union U +#else + struct U +#endif + { + date::month_day month_day_; + date::month_weekday_last month_weekday_last_; + pair month_day_weekday_; + +#if !defined(_MSC_VER) || (_MSC_VER >= 1900) + U() : month_day_{date::jan/1} {} +#else + U() : + month_day_(date::jan/1), + month_weekday_last_(date::month(0U), date::weekday_last(date::weekday(0U))) + {} + +#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900) + + U& operator=(const date::month_day& x); + U& operator=(const date::month_weekday_last& x); + U& operator=(const pair& x); + } u; + + std::chrono::hours h_{0}; + std::chrono::minutes m_{0}; + std::chrono::seconds s_{0}; + tz zone_{tz::local}; + +public: + MonthDayTime() = default; + MonthDayTime(local_seconds tp, tz timezone); + MonthDayTime(const date::month_day& md, tz timezone); + + date::day day() const; + date::month month() const; + tz zone() const {return zone_;} + + void canonicalize(date::year y); + + sys_seconds + to_sys(date::year y, std::chrono::seconds offset, std::chrono::seconds save) const; + sys_days to_sys_days(date::year y) const; + + sys_seconds to_time_point(date::year y) const; + int compare(date::year y, const MonthDayTime& x, date::year yx, + std::chrono::seconds offset, std::chrono::minutes prev_save) const; + + friend std::istream& operator>>(std::istream& is, MonthDayTime& x); + friend std::ostream& operator<<(std::ostream& os, const MonthDayTime& x); +}; + +// A Rule specifies one or more set of datetimes without using an offset. +// Multiple dates are specified with multiple years. The years in effect +// go from starting_year_ to ending_year_, inclusive. starting_year_ <= +// ending_year_. save_ is in effect for times from the specified time +// onward, including the specified time. When the specified time is +// local, it uses the save_ from the chronologically previous Rule, or if +// there is none, 0. + +//forward declare to avoid warnings in gcc 6.2 +class Rule; +bool operator==(const Rule& x, const Rule& y); +bool operator<(const Rule& x, const Rule& y); +bool operator==(const Rule& x, const date::year& y); +bool operator<(const Rule& x, const date::year& y); +bool operator==(const date::year& x, const Rule& y); +bool operator<(const date::year& x, const Rule& y); +bool operator==(const Rule& x, const std::string& y); +bool operator<(const Rule& x, const std::string& y); +bool operator==(const std::string& x, const Rule& y); +bool operator<(const std::string& x, const Rule& y); +std::ostream& operator<<(std::ostream& os, const Rule& r); + +class Rule +{ +private: + std::string name_; + date::year starting_year_{0}; + date::year ending_year_{0}; + MonthDayTime starting_at_; + std::chrono::minutes save_{0}; + std::string abbrev_; + +public: + Rule() = default; + explicit Rule(const std::string& s); + Rule(const Rule& r, date::year starting_year, date::year ending_year); + + const std::string& name() const {return name_;} + const std::string& abbrev() const {return abbrev_;} + + const MonthDayTime& mdt() const {return starting_at_;} + const date::year& starting_year() const {return starting_year_;} + const date::year& ending_year() const {return ending_year_;} + const std::chrono::minutes& save() const {return save_;} + + static void split_overlaps(std::vector& rules); + + friend bool operator==(const Rule& x, const Rule& y); + friend bool operator<(const Rule& x, const Rule& y); + friend bool operator==(const Rule& x, const date::year& y); + friend bool operator<(const Rule& x, const date::year& y); + friend bool operator==(const date::year& x, const Rule& y); + friend bool operator<(const date::year& x, const Rule& y); + friend bool operator==(const Rule& x, const std::string& y); + friend bool operator<(const Rule& x, const std::string& y); + friend bool operator==(const std::string& x, const Rule& y); + friend bool operator<(const std::string& x, const Rule& y); + + friend std::ostream& operator<<(std::ostream& os, const Rule& r); + +private: + date::day day() const; + date::month month() const; + static void split_overlaps(std::vector& rules, std::size_t i, std::size_t& e); + static bool overlaps(const Rule& x, const Rule& y); + static void split(std::vector& rules, std::size_t i, std::size_t k, + std::size_t& e); +}; + +inline bool operator!=(const Rule& x, const Rule& y) {return !(x == y);} +inline bool operator> (const Rule& x, const Rule& y) {return y < x;} +inline bool operator<=(const Rule& x, const Rule& y) {return !(y < x);} +inline bool operator>=(const Rule& x, const Rule& y) {return !(x < y);} + +inline bool operator!=(const Rule& x, const date::year& y) {return !(x == y);} +inline bool operator> (const Rule& x, const date::year& y) {return y < x;} +inline bool operator<=(const Rule& x, const date::year& y) {return !(y < x);} +inline bool operator>=(const Rule& x, const date::year& y) {return !(x < y);} + +inline bool operator!=(const date::year& x, const Rule& y) {return !(x == y);} +inline bool operator> (const date::year& x, const Rule& y) {return y < x;} +inline bool operator<=(const date::year& x, const Rule& y) {return !(y < x);} +inline bool operator>=(const date::year& x, const Rule& y) {return !(x < y);} + +inline bool operator!=(const Rule& x, const std::string& y) {return !(x == y);} +inline bool operator> (const Rule& x, const std::string& y) {return y < x;} +inline bool operator<=(const Rule& x, const std::string& y) {return !(y < x);} +inline bool operator>=(const Rule& x, const std::string& y) {return !(x < y);} + +inline bool operator!=(const std::string& x, const Rule& y) {return !(x == y);} +inline bool operator> (const std::string& x, const Rule& y) {return y < x;} +inline bool operator<=(const std::string& x, const Rule& y) {return !(y < x);} +inline bool operator>=(const std::string& x, const Rule& y) {return !(x < y);} + +struct zonelet +{ + enum tag {has_rule, has_save, is_empty}; + + std::chrono::seconds gmtoff_; + tag tag_ = has_rule; + +#if !defined(_MSC_VER) || (_MSC_VER >= 1900) + union U +#else + struct U +#endif + { + std::string rule_; + std::chrono::minutes save_; + + ~U() {} + U() {} + U(const U&) {} + U& operator=(const U&) = delete; + } u; + + std::string format_; + date::year until_year_{0}; + MonthDayTime until_date_; + sys_seconds until_utc_; + local_seconds until_std_; + local_seconds until_loc_; + std::chrono::minutes initial_save_{0}; + std::string initial_abbrev_; + std::pair first_rule_{nullptr, date::year::min()}; + std::pair last_rule_{nullptr, date::year::max()}; + + ~zonelet(); + zonelet(); + zonelet(const zonelet& i); + zonelet& operator=(const zonelet&) = delete; +}; + +#else // USE_OS_TZDB + +struct ttinfo +{ + std::int32_t tt_gmtoff; + unsigned char tt_isdst; + unsigned char tt_abbrind; + unsigned char pad[2]; +}; + +static_assert(sizeof(ttinfo) == 8, ""); + +struct expanded_ttinfo +{ + std::chrono::seconds offset; + std::string abbrev; + bool is_dst; +}; + +struct transition +{ + sys_seconds timepoint; + const expanded_ttinfo* info; + + transition(sys_seconds tp, const expanded_ttinfo* i = nullptr) + : timepoint(tp) + , info(i) + {} + + friend + std::ostream& + operator<<(std::ostream& os, const transition& t) + { + using date::operator<<; + os << t.timepoint << "Z "; + if (t.info->offset >= std::chrono::seconds{0}) + os << '+'; + os << make_time(t.info->offset); + if (t.info->is_dst > 0) + os << " daylight "; + else + os << " standard "; + os << t.info->abbrev; + return os; + } +}; + +#endif // USE_OS_TZDB + +} // namespace detail + +} // namespace date + +#if defined(_MSC_VER) && (_MSC_VER < 1900) +#include "tz.h" +#endif + +#endif // TZ_PRIVATE_H diff --git a/deps/date/src/tz.cpp b/deps/date/src/tz.cpp new file mode 100644 index 0000000..26babbd --- /dev/null +++ b/deps/date/src/tz.cpp @@ -0,0 +1,3944 @@ +// The MIT License (MIT) +// +// Copyright (c) 2015, 2016, 2017 Howard Hinnant +// Copyright (c) 2015 Ville Voutilainen +// Copyright (c) 2016 Alexander Kormanovsky +// Copyright (c) 2016, 2017 Jiangang Zhuang +// Copyright (c) 2017 Nicolas Veloz Savino +// Copyright (c) 2017 Florian Dang +// Copyright (c) 2017 Aaron Bishop +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// Our apologies. When the previous paragraph was written, lowercase had not yet +// been invented (that would involve another several millennia of evolution). +// We did not mean to shout. + +#ifdef _WIN32 + // windows.h will be included directly and indirectly (e.g. by curl). + // We need to define these macros to prevent windows.h bringing in + // more than we need and do it early so windows.h doesn't get included + // without these macros having been defined. + // min/max macros interfere with the C++ versions. +# ifndef NOMINMAX +# define NOMINMAX +# endif + // We don't need all that Windows has to offer. +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif + + // for wcstombs +# ifndef _CRT_SECURE_NO_WARNINGS +# define _CRT_SECURE_NO_WARNINGS +# endif + + // None of this happens with the MS SDK (at least VS14 which I tested), but: + // Compiling with mingw, we get "error: 'KF_FLAG_DEFAULT' was not declared in this scope." + // and error: 'SHGetKnownFolderPath' was not declared in this scope.". + // It seems when using mingw NTDDI_VERSION is undefined and that + // causes KNOWN_FOLDER_FLAG and the KF_ flags to not get defined. + // So we must define NTDDI_VERSION to get those flags on mingw. + // The docs say though here: + // https://msdn.microsoft.com/en-nz/library/windows/desktop/aa383745(v=vs.85).aspx + // that "If you define NTDDI_VERSION, you must also define _WIN32_WINNT." + // So we declare we require Vista or greater. +# ifdef __MINGW32__ + +# ifndef NTDDI_VERSION +# define NTDDI_VERSION 0x06000000 +# define _WIN32_WINNT _WIN32_WINNT_VISTA +# elif NTDDI_VERSION < 0x06000000 +# warning "If this fails to compile NTDDI_VERSION may be to low. See comments above." +# endif + // But once we define the values above we then get this linker error: + // "tz.cpp:(.rdata$.refptr.FOLDERID_Downloads[.refptr.FOLDERID_Downloads]+0x0): " + // "undefined reference to `FOLDERID_Downloads'" + // which #include cures see: + // https://support.microsoft.com/en-us/kb/130869 +# include + // But with included, the error moves on to: + // error: 'FOLDERID_Downloads' was not declared in this scope + // Which #include cures. +# include + +# endif // __MINGW32__ + +# include +#endif // _WIN32 + +#include "date/tz_private.h" + +#ifdef __APPLE__ +# include "date/ios.h" +#else +# define TARGET_OS_IPHONE 0 +# define TARGET_OS_SIMULATOR 0 +#endif + +#if USE_OS_TZDB +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if USE_OS_TZDB +# include +#endif +#include +#include +#include +#include +#include + +// unistd.h is used on some platforms as part of the the means to get +// the current time zone. On Win32 windows.h provides a means to do it. +// gcc/mingw supports unistd.h on Win32 but MSVC does not. + +#ifdef _WIN32 +# ifdef WINAPI_FAMILY +# include +# if WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP +# define WINRT +# define INSTALL . +# endif +# endif + +# include // _unlink etc. + +# if defined(__clang__) + struct IUnknown; // fix for issue with static_cast<> in objbase.h + // (see https://github.com/philsquared/Catch/issues/690) +# endif + +# include // CoTaskFree, ShGetKnownFolderPath etc. +# if HAS_REMOTE_API +# include // _mkdir +# include // ShFileOperation etc. +# endif // HAS_REMOTE_API +#else // !_WIN32 +# include +# if !USE_OS_TZDB && !defined(INSTALL) +# include +# endif +# include +# include +# if !USE_SHELL_API +# include +# include +# include +# include +# include +# include +# endif //!USE_SHELL_API +#endif // !_WIN32 + + +#if HAS_REMOTE_API + // Note curl includes windows.h so we must include curl AFTER definitions of things + // that affect windows.h such as NOMINMAX. +#if defined(_MSC_VER) && defined(SHORTENED_CURL_INCLUDE) + // For rmt_curl nuget package +# include +#else +# include +#endif +#endif + +#ifdef _WIN32 +static CONSTDATA char folder_delimiter = '\\'; +#else // !_WIN32 +static CONSTDATA char folder_delimiter = '/'; +#endif // !_WIN32 + +#if defined(__GNUC__) && __GNUC__ < 5 + // GCC 4.9 Bug 61489 Wrong warning with -Wmissing-field-initializers +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif // defined(__GNUC__) && __GNUC__ < 5 + +#if !USE_OS_TZDB + +# ifdef _WIN32 +# ifndef WINRT + +namespace +{ + struct task_mem_deleter + { + void operator()(wchar_t buf[]) + { + if (buf != nullptr) + CoTaskMemFree(buf); + } + }; + using co_task_mem_ptr = std::unique_ptr; +} + +// We might need to know certain locations even if not using the remote API, +// so keep these routines out of that block for now. +static +std::string +get_known_folder(const GUID& folderid) +{ + std::string folder; + PWSTR pfolder = nullptr; + HRESULT hr = SHGetKnownFolderPath(folderid, KF_FLAG_DEFAULT, nullptr, &pfolder); + if (SUCCEEDED(hr)) + { + co_task_mem_ptr folder_ptr(pfolder); + const wchar_t* fptr = folder_ptr.get(); + auto state = std::mbstate_t(); + const auto required = std::wcsrtombs(nullptr, &fptr, 0, &state); + if (required != 0 && required != std::size_t(-1)) + { + folder.resize(required); + std::wcsrtombs(&folder[0], &fptr, folder.size(), &state); + } + } + return folder; +} + +# ifndef INSTALL + +// Usually something like "c:\Users\username\Downloads". +static +std::string +get_download_folder() +{ + return get_known_folder(FOLDERID_Downloads); +} + +# endif // !INSTALL + +# endif // WINRT +# else // !_WIN32 + +# if !defined(INSTALL) + +static +std::string +expand_path(std::string path) +{ +# if TARGET_OS_IPHONE + return date::iOSUtils::get_tzdata_path(); +# else // !TARGET_OS_IPHONE + ::wordexp_t w{}; + std::unique_ptr<::wordexp_t, void(*)(::wordexp_t*)> hold{&w, ::wordfree}; + ::wordexp(path.c_str(), &w, 0); + if (w.we_wordc != 1) + throw std::runtime_error("Cannot expand path: " + path); + path = w.we_wordv[0]; + return path; +# endif // !TARGET_OS_IPHONE +} + +static +std::string +get_download_folder() +{ + return expand_path("~/Downloads"); +} + +# endif // !defined(INSTALL) + +# endif // !_WIN32 + +#endif // !USE_OS_TZDB + +namespace date +{ +// +---------------------+ +// | Begin Configuration | +// +---------------------+ + +using namespace detail; + +#if !USE_OS_TZDB + +static +std::string& +access_install() +{ + static std::string install +#ifndef INSTALL + + = get_download_folder() + folder_delimiter + "tzdata"; + +#else // !INSTALL + +# define STRINGIZEIMP(x) #x +# define STRINGIZE(x) STRINGIZEIMP(x) + + = STRINGIZE(INSTALL) + std::string(1, folder_delimiter) + "tzdata"; + + #undef STRINGIZEIMP + #undef STRINGIZE +#endif // !INSTALL + + return install; +} + +void +set_install(const std::string& s) +{ + access_install() = s; +} + +static +const std::string& +get_install() +{ + static const std::string& ref = access_install(); + return ref; +} + +#if HAS_REMOTE_API +static +std::string +get_download_gz_file(const std::string& version) +{ + auto file = get_install() + version + ".tar.gz"; + return file; +} +#endif // HAS_REMOTE_API + +#endif // !USE_OS_TZDB + +// These can be used to reduce the range of the database to save memory +CONSTDATA auto min_year = date::year::min(); +CONSTDATA auto max_year = date::year::max(); + +CONSTDATA auto min_day = date::January/1; +CONSTDATA auto max_day = date::December/31; + +#if USE_OS_TZDB + +CONSTCD14 const sys_seconds min_seconds = sys_days(min_year/min_day); + +#endif // USE_OS_TZDB + +#ifndef _WIN32 + +static +std::string +discover_tz_dir() +{ + struct stat sb; + using namespace std; +# ifndef __APPLE__ + CONSTDATA auto tz_dir_default = "/usr/share/zoneinfo"; + CONSTDATA auto tz_dir_buildroot = "/usr/share/zoneinfo/uclibc"; + + // Check special path which is valid for buildroot with uclibc builds + if(stat(tz_dir_buildroot, &sb) == 0 && S_ISDIR(sb.st_mode)) + return tz_dir_buildroot; + else if(stat(tz_dir_default, &sb) == 0 && S_ISDIR(sb.st_mode)) + return tz_dir_default; + else + throw runtime_error("discover_tz_dir failed to find zoneinfo\n"); +# else // __APPLE__ +# if TARGET_OS_IPHONE +# if TARGET_OS_SIMULATOR + return "/usr/share/zoneinfo"; +# else + return "/var/db/timezone/zoneinfo"; +# endif +# else + CONSTDATA auto timezone = "/etc/localtime"; + if (!(lstat(timezone, &sb) == 0 && S_ISLNK(sb.st_mode) && sb.st_size > 0)) + throw runtime_error("discover_tz_dir failed\n"); + string result; + char rp[PATH_MAX+1] = {}; + if (readlink(timezone, rp, sizeof(rp)-1) > 0) + result = string(rp); + else + throw system_error(errno, system_category(), "readlink() failed"); + auto i = result.find("zoneinfo"); + if (i == string::npos) + throw runtime_error("discover_tz_dir failed to find zoneinfo\n"); + i = result.find('/', i); + if (i == string::npos) + throw runtime_error("discover_tz_dir failed to find '/'\n"); + return result.substr(0, i); +# endif +# endif // __APPLE__ +} + +static +const std::string& +get_tz_dir() +{ + static const std::string tz_dir = discover_tz_dir(); + return tz_dir; +} + +#endif + +// +-------------------+ +// | End Configuration | +// +-------------------+ + +#ifndef _MSC_VER +static_assert(min_year <= max_year, "Configuration error"); +#endif + +static std::unique_ptr init_tzdb(); + +tzdb_list::~tzdb_list() +{ + const tzdb* ptr = head_; + head_ = nullptr; + while (ptr != nullptr) + { + auto next = ptr->next; + delete ptr; + ptr = next; + } +} + +tzdb_list::tzdb_list(tzdb_list&& x) NOEXCEPT + : head_{x.head_.exchange(nullptr)} +{ +} + +void +tzdb_list::push_front(tzdb* tzdb) NOEXCEPT +{ + tzdb->next = head_; + head_ = tzdb; +} + +tzdb_list::const_iterator +tzdb_list::erase_after(const_iterator p) NOEXCEPT +{ + auto t = p.p_->next; + p.p_->next = p.p_->next->next; + delete t; + return ++p; +} + +struct tzdb_list::undocumented_helper +{ + static void push_front(tzdb_list& db_list, tzdb* tzdb) NOEXCEPT + { + db_list.push_front(tzdb); + } +}; + +static +tzdb_list +create_tzdb() +{ + tzdb_list tz_db; + tzdb_list::undocumented_helper::push_front(tz_db, init_tzdb().release()); + return tz_db; +} + +tzdb_list& +get_tzdb_list() +{ + static tzdb_list tz_db = create_tzdb(); + return tz_db; +} + +static +std::string +parse3(std::istream& in) +{ + std::string r(3, ' '); + ws(in); + r[0] = static_cast(in.get()); + r[1] = static_cast(in.get()); + r[2] = static_cast(in.get()); + return r; +} + +static +unsigned +parse_month(std::istream& in) +{ + CONSTDATA char*const month_names[] = + {"Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + auto s = parse3(in); + auto m = std::find(std::begin(month_names), std::end(month_names), s) - month_names; + if (m >= std::end(month_names) - std::begin(month_names)) + throw std::runtime_error("oops: bad month name: " + s); + return static_cast(++m); +} + +#if !USE_OS_TZDB + +#ifdef _WIN32 + +static +void +sort_zone_mappings(std::vector& mappings) +{ + std::sort(mappings.begin(), mappings.end(), + [](const date::detail::timezone_mapping& lhs, + const date::detail::timezone_mapping& rhs)->bool + { + auto other_result = lhs.other.compare(rhs.other); + if (other_result < 0) + return true; + else if (other_result == 0) + { + auto territory_result = lhs.territory.compare(rhs.territory); + if (territory_result < 0) + return true; + else if (territory_result == 0) + { + if (lhs.type < rhs.type) + return true; + } + } + return false; + }); +} + +static +bool +native_to_standard_timezone_name(const std::string& native_tz_name, + std::string& standard_tz_name) +{ + // TOOD! Need be a case insensitive compare? + if (native_tz_name == "UTC") + { + standard_tz_name = "Etc/UTC"; + return true; + } + standard_tz_name.clear(); + // TODO! we can improve on linear search. + const auto& mappings = date::get_tzdb().mappings; + for (const auto& tzm : mappings) + { + if (tzm.other == native_tz_name) + { + standard_tz_name = tzm.type; + return true; + } + } + return false; +} + +// Parse this XML file: +// https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml +// The parsing method is designed to be simple and quick. It is not overly +// forgiving of change but it should diagnose basic format issues. +// See timezone_mapping structure for more info. +static +std::vector +load_timezone_mappings_from_xml_file(const std::string& input_path) +{ + std::size_t line_num = 0; + std::vector mappings; + std::string line; + + std::ifstream is(input_path); + if (!is.is_open()) + { + // We don't emit file exceptions because that's an implementation detail. + std::string msg = "Error opening time zone mapping file \""; + msg += input_path; + msg += "\"."; + throw std::runtime_error(msg); + } + + auto error = [&input_path, &line_num](const char* info) + { + std::string msg = "Error loading time zone mapping file \""; + msg += input_path; + msg += "\" at line "; + msg += std::to_string(line_num); + msg += ": "; + msg += info; + throw std::runtime_error(msg); + }; + // [optional space]a="b" + auto read_attribute = [&line, &error] + (const char* name, std::string& value, std::size_t startPos) + ->std::size_t + { + value.clear(); + // Skip leading space before attribute name. + std::size_t spos = line.find_first_not_of(' ', startPos); + if (spos == std::string::npos) + spos = startPos; + // Assume everything up to next = is the attribute name + // and that an = will always delimit that. + std::size_t epos = line.find('=', spos); + if (epos == std::string::npos) + error("Expected \'=\' right after attribute name."); + std::size_t name_len = epos - spos; + // Expect the name we find matches the name we expect. + if (line.compare(spos, name_len, name) != 0) + { + std::string msg; + msg = "Expected attribute name \'"; + msg += name; + msg += "\' around position "; + msg += std::to_string(spos); + msg += " but found something else."; + error(msg.c_str()); + } + ++epos; // Skip the '=' that is after the attribute name. + spos = epos; + if (spos < line.length() && line[spos] == '\"') + ++spos; // Skip the quote that is before the attribute value. + else + { + std::string msg = "Expected '\"' to begin value of attribute \'"; + msg += name; + msg += "\'."; + error(msg.c_str()); + } + epos = line.find('\"', spos); + if (epos == std::string::npos) + { + std::string msg = "Expected '\"' to end value of attribute \'"; + msg += name; + msg += "\'."; + error(msg.c_str()); + } + // Extract everything in between the quotes. Note no escaping is done. + std::size_t value_len = epos - spos; + value.assign(line, spos, value_len); + ++epos; // Skip the quote that is after the attribute value; + return epos; + }; + + // Quick but not overly forgiving XML mapping file processing. + bool mapTimezonesOpenTagFound = false; + bool mapTimezonesCloseTagFound = false; + std::size_t mapZonePos = std::string::npos; + std::size_t mapTimezonesPos = std::string::npos; + CONSTDATA char mapTimeZonesOpeningTag[] = { ""); + mapTimezonesCloseTagFound = (mapTimezonesPos != std::string::npos); + if (!mapTimezonesCloseTagFound) + { + std::size_t commentPos = line.find(" " << x.target_; +} + +// leap_second + +leap_second::leap_second(const std::string& s, detail::undocumented) +{ + using namespace date; + std::istringstream in(s); + in.exceptions(std::ios::failbit | std::ios::badbit); + std::string word; + int y; + MonthDayTime date; + in >> word >> y >> date; + date_ = date.to_time_point(year(y)); +} + +static +bool +file_exists(const std::string& filename) +{ +#ifdef _WIN32 + return ::_access(filename.c_str(), 0) == 0; +#else + return ::access(filename.c_str(), F_OK) == 0; +#endif +} + +#if HAS_REMOTE_API + +// CURL tools + +namespace +{ + +struct curl_global_init_and_cleanup +{ + ~curl_global_init_and_cleanup() + { + ::curl_global_cleanup(); + } + curl_global_init_and_cleanup() + { + if (::curl_global_init(CURL_GLOBAL_DEFAULT) != 0) + throw std::runtime_error("CURL global initialization failed"); + } + curl_global_init_and_cleanup(curl_global_init_and_cleanup const&) = delete; + curl_global_init_and_cleanup& operator=(curl_global_init_and_cleanup const&) = delete; +}; + +struct curl_deleter +{ + void operator()(CURL* p) const + { + ::curl_easy_cleanup(p); + } +}; + +} // unnamed namespace + +static +std::unique_ptr +curl_init() +{ + static const curl_global_init_and_cleanup _{}; + return std::unique_ptr{::curl_easy_init()}; +} + +static +bool +download_to_string(const std::string& url, std::string& str) +{ + str.clear(); + auto curl = curl_init(); + if (!curl) + return false; + std::string version; + curl_easy_setopt(curl.get(), CURLOPT_USERAGENT, "curl"); + curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str()); + curl_write_callback write_cb = [](char* contents, std::size_t size, std::size_t nmemb, + void* userp) -> std::size_t + { + auto& userstr = *static_cast(userp); + auto realsize = size * nmemb; + userstr.append(contents, realsize); + return realsize; + }; + curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, write_cb); + curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &str); + curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, false); + auto res = curl_easy_perform(curl.get()); + return (res == CURLE_OK); +} + +namespace +{ + enum class download_file_options { binary, text }; +} + +static +bool +download_to_file(const std::string& url, const std::string& local_filename, + download_file_options opts, char* error_buffer) +{ + auto curl = curl_init(); + if (!curl) + return false; + curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str()); + curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, false); + if (error_buffer) + curl_easy_setopt(curl.get(), CURLOPT_ERRORBUFFER, error_buffer); + curl_write_callback write_cb = [](char* contents, std::size_t size, std::size_t nmemb, + void* userp) -> std::size_t + { + auto& of = *static_cast(userp); + auto realsize = size * nmemb; + of.write(contents, static_cast(realsize)); + return realsize; + }; + curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, write_cb); + decltype(curl_easy_perform(curl.get())) res; + { + std::ofstream of(local_filename, + opts == download_file_options::binary ? + std::ofstream::out | std::ofstream::binary : + std::ofstream::out); + of.exceptions(std::ios::badbit); + curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &of); + res = curl_easy_perform(curl.get()); + } + return res == CURLE_OK; +} + +std::string +remote_version() +{ + std::string version; + std::string str; + if (download_to_string("https://www.iana.org/time-zones", str)) + { + CONSTDATA char db[] = "/time-zones/releases/tzdata"; + CONSTDATA auto db_size = sizeof(db) - 1; + auto p = str.find(db, 0, db_size); + const int ver_str_len = 5; + if (p != std::string::npos && p + (db_size + ver_str_len) <= str.size()) + version = str.substr(p + db_size, ver_str_len); + } + return version; +} + + +// TODO! Using system() create a process and a console window. +// This is useful to see what errors may occur but is slow and distracting. +// Consider implementing this functionality more directly, such as +// using _mkdir and CreateProcess etc. +// But use the current means now as matches Unix implementations and while +// in proof of concept / testing phase. +// TODO! Use eventually. +static +bool +remove_folder_and_subfolders(const std::string& folder) +{ +# ifdef _WIN32 +# if USE_SHELL_API + // Delete the folder contents by deleting the folder. + std::string cmd = "rd /s /q \""; + cmd += folder; + cmd += '\"'; + return std::system(cmd.c_str()) == EXIT_SUCCESS; +# else // !USE_SHELL_API + // Create a buffer containing the path to delete. It must be terminated + // by two nuls. Who designs these API's... + std::vector from; + from.assign(folder.begin(), folder.end()); + from.push_back('\0'); + from.push_back('\0'); + SHFILEOPSTRUCT fo{}; // Zero initialize. + fo.wFunc = FO_DELETE; + fo.pFrom = from.data(); + fo.fFlags = FOF_NO_UI; + int ret = SHFileOperation(&fo); + if (ret == 0 && !fo.fAnyOperationsAborted) + return true; + return false; +# endif // !USE_SHELL_API +# else // !_WIN32 +# if USE_SHELL_API + return std::system(("rm -R " + folder).c_str()) == EXIT_SUCCESS; +# else // !USE_SHELL_API + struct dir_deleter { + dir_deleter() {} + void operator()(DIR* d) const + { + if (d != nullptr) + { + int result = closedir(d); + assert(result == 0); + } + } + }; + using closedir_ptr = std::unique_ptr; + + std::string filename; + struct stat statbuf; + std::size_t folder_len = folder.length(); + struct dirent* p = nullptr; + + closedir_ptr d(opendir(folder.c_str())); + bool r = d.get() != nullptr; + while (r && (p=readdir(d.get())) != nullptr) + { + if (strcmp(p->d_name, ".") == 0 || strcmp(p->d_name, "..") == 0) + continue; + + // + 2 for path delimiter and nul terminator. + std::size_t buf_len = folder_len + strlen(p->d_name) + 2; + filename.resize(buf_len); + std::size_t path_len = static_cast( + snprintf(&filename[0], buf_len, "%s/%s", folder.c_str(), p->d_name)); + assert(path_len == buf_len - 1); + filename.resize(path_len); + + if (stat(filename.c_str(), &statbuf) == 0) + r = S_ISDIR(statbuf.st_mode) + ? remove_folder_and_subfolders(filename) + : unlink(filename.c_str()) == 0; + } + d.reset(); + + if (r) + r = rmdir(folder.c_str()) == 0; + + return r; +# endif // !USE_SHELL_API +# endif // !_WIN32 +} + +static +bool +make_directory(const std::string& folder) +{ +# ifdef _WIN32 +# if USE_SHELL_API + // Re-create the folder. + std::string cmd = "mkdir \""; + cmd += folder; + cmd += '\"'; + return std::system(cmd.c_str()) == EXIT_SUCCESS; +# else // !USE_SHELL_API + return _mkdir(folder.c_str()) == 0; +# endif // !USE_SHELL_API +# else // !_WIN32 +# if USE_SHELL_API + return std::system(("mkdir -p " + folder).c_str()) == EXIT_SUCCESS; +# else // !USE_SHELL_API + return mkdir(folder.c_str(), 0777) == 0; +# endif // !USE_SHELL_API +# endif // !_WIN32 +} + +static +bool +delete_file(const std::string& file) +{ +# ifdef _WIN32 +# if USE_SHELL_API + std::string cmd = "del \""; + cmd += file; + cmd += '\"'; + return std::system(cmd.c_str()) == 0; +# else // !USE_SHELL_API + return _unlink(file.c_str()) == 0; +# endif // !USE_SHELL_API +# else // !_WIN32 +# if USE_SHELL_API + return std::system(("rm " + file).c_str()) == EXIT_SUCCESS; +# else // !USE_SHELL_API + return unlink(file.c_str()) == 0; +# endif // !USE_SHELL_API +# endif // !_WIN32 +} + +# ifdef _WIN32 + +static +bool +move_file(const std::string& from, const std::string& to) +{ +# if USE_SHELL_API + std::string cmd = "move \""; + cmd += from; + cmd += "\" \""; + cmd += to; + cmd += '\"'; + return std::system(cmd.c_str()) == EXIT_SUCCESS; +# else // !USE_SHELL_API + return !!::MoveFile(from.c_str(), to.c_str()); +# endif // !USE_SHELL_API +} + +// Usually something like "c:\Program Files". +static +std::string +get_program_folder() +{ + return get_known_folder(FOLDERID_ProgramFiles); +} + +// Note folder can and usually does contain spaces. +static +std::string +get_unzip_program() +{ + std::string path; + + // 7-Zip appears to note its location in the registry. + // If that doesn't work, fall through and take a guess, but it will likely be wrong. + HKEY hKey = nullptr; + if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\7-Zip", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + char value_buffer[MAX_PATH + 1]; // fyi 260 at time of writing. + // in/out parameter. Documentation say that size is a count of bytes not chars. + DWORD size = sizeof(value_buffer) - sizeof(value_buffer[0]); + DWORD tzi_type = REG_SZ; + // Testing shows Path key value is "C:\Program Files\7-Zip\" i.e. always with trailing \. + bool got_value = (RegQueryValueExA(hKey, "Path", nullptr, &tzi_type, + reinterpret_cast(value_buffer), &size) == ERROR_SUCCESS); + RegCloseKey(hKey); // Close now incase of throw later. + if (got_value) + { + // Function does not guarantee to null terminate. + value_buffer[size / sizeof(value_buffer[0])] = '\0'; + path = value_buffer; + if (!path.empty()) + { + path += "7z.exe"; + return path; + } + } + } + path += get_program_folder(); + path += folder_delimiter; + path += "7-Zip\\7z.exe"; + return path; +} + +# if !USE_SHELL_API +static +int +run_program(const std::string& command) +{ + STARTUPINFO si{}; + si.cb = sizeof(si); + PROCESS_INFORMATION pi{}; + + // Allegedly CreateProcess overwrites the command line. Ugh. + std::string mutable_command(command); + if (CreateProcess(nullptr, &mutable_command[0], + nullptr, nullptr, FALSE, CREATE_NO_WINDOW, nullptr, nullptr, &si, &pi)) + { + WaitForSingleObject(pi.hProcess, INFINITE); + DWORD exit_code; + bool got_exit_code = !!GetExitCodeProcess(pi.hProcess, &exit_code); + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + // Not 100% sure about this still active thing is correct, + // but I'm going with it because I *think* WaitForSingleObject might + // return in some cases without INFINITE-ly waiting. + // But why/wouldn't GetExitCodeProcess return false in that case? + if (got_exit_code && exit_code != STILL_ACTIVE) + return static_cast(exit_code); + } + return EXIT_FAILURE; +} +# endif // !USE_SHELL_API + +static +std::string +get_download_tar_file(const std::string& version) +{ + auto file = get_install(); + file += folder_delimiter; + file += "tzdata"; + file += version; + file += ".tar"; + return file; +} + +static +bool +extract_gz_file(const std::string& version, const std::string& gz_file, + const std::string& dest_folder) +{ + auto unzip_prog = get_unzip_program(); + bool unzip_result = false; + // Use the unzip program to extract the tar file from the archive. + + // Aim to create a string like: + // "C:\Program Files\7-Zip\7z.exe" x "C:\Users\SomeUser\Downloads\tzdata2016d.tar.gz" + // -o"C:\Users\SomeUser\Downloads\tzdata" + std::string cmd; + cmd = '\"'; + cmd += unzip_prog; + cmd += "\" x \""; + cmd += gz_file; + cmd += "\" -o\""; + cmd += dest_folder; + cmd += '\"'; + +# if USE_SHELL_API + // When using shelling out with std::system() extra quotes are required around the + // whole command. It's weird but necessary it seems, see: + // http://stackoverflow.com/q/27975969/576911 + + cmd = "\"" + cmd + "\""; + if (std::system(cmd.c_str()) == EXIT_SUCCESS) + unzip_result = true; +# else // !USE_SHELL_API + if (run_program(cmd) == EXIT_SUCCESS) + unzip_result = true; +# endif // !USE_SHELL_API + if (unzip_result) + delete_file(gz_file); + + // Use the unzip program extract the data from the tar file that was + // just extracted from the archive. + auto tar_file = get_download_tar_file(version); + cmd = '\"'; + cmd += unzip_prog; + cmd += "\" x \""; + cmd += tar_file; + cmd += "\" -o\""; + cmd += get_install(); + cmd += '\"'; +# if USE_SHELL_API + cmd = "\"" + cmd + "\""; + if (std::system(cmd.c_str()) == EXIT_SUCCESS) + unzip_result = true; +# else // !USE_SHELL_API + if (run_program(cmd) == EXIT_SUCCESS) + unzip_result = true; +# endif // !USE_SHELL_API + + if (unzip_result) + delete_file(tar_file); + + return unzip_result; +} + +static +std::string +get_download_mapping_file(const std::string& version) +{ + auto file = get_install() + version + "windowsZones.xml"; + return file; +} + +# else // !_WIN32 + +# if !USE_SHELL_API +static +int +run_program(const char* prog, const char*const args[]) +{ + pid_t pid = fork(); + if (pid == -1) // Child failed to start. + return EXIT_FAILURE; + + if (pid != 0) + { + // We are in the parent. Child started. Wait for it. + pid_t ret; + int status; + while ((ret = waitpid(pid, &status, 0)) == -1) + { + if (errno != EINTR) + break; + } + if (ret != -1) + { + if (WIFEXITED(status)) + return WEXITSTATUS(status); + } + printf("Child issues!\n"); + + return EXIT_FAILURE; // Not sure what status of child is. + } + else // We are in the child process. Start the program the parent wants to run. + { + + if (execv(prog, const_cast(args)) == -1) // Does not return. + { + perror("unreachable 0\n"); + _Exit(127); + } + printf("unreachable 2\n"); + } + printf("unreachable 2\n"); + // Unreachable. + assert(false); + exit(EXIT_FAILURE); + return EXIT_FAILURE; +} +# endif // !USE_SHELL_API + +static +bool +extract_gz_file(const std::string&, const std::string& gz_file, const std::string&) +{ +# if USE_SHELL_API + bool unzipped = std::system(("tar -xzf " + gz_file + " -C " + get_install()).c_str()) == EXIT_SUCCESS; +# else // !USE_SHELL_API + const char prog[] = {"/usr/bin/tar"}; + const char*const args[] = + { + prog, "-xzf", gz_file.c_str(), "-C", get_install().c_str(), nullptr + }; + bool unzipped = (run_program(prog, args) == EXIT_SUCCESS); +# endif // !USE_SHELL_API + if (unzipped) + { + delete_file(gz_file); + return true; + } + return false; +} + +# endif // !_WIN32 + +bool +remote_download(const std::string& version, char* error_buffer) +{ + assert(!version.empty()); + +# ifdef _WIN32 + // Download folder should be always available for Windows +# else // !_WIN32 + // Create download folder if it does not exist on UNIX system + auto download_folder = get_install(); + if (!file_exists(download_folder)) + { + if (!make_directory(download_folder)) + return false; + } +# endif // _WIN32 + + auto url = "https://data.iana.org/time-zones/releases/tzdata" + version + + ".tar.gz"; + bool result = download_to_file(url, get_download_gz_file(version), + download_file_options::binary, error_buffer); +# ifdef _WIN32 + if (result) + { + auto mapping_file = get_download_mapping_file(version); + result = download_to_file( + "https://raw.githubusercontent.com/unicode-org/cldr/master/" + "common/supplemental/windowsZones.xml", + mapping_file, download_file_options::text, error_buffer); + } +# endif // _WIN32 + return result; +} + +bool +remote_install(const std::string& version) +{ + auto success = false; + assert(!version.empty()); + + std::string install = get_install(); + auto gz_file = get_download_gz_file(version); + if (file_exists(gz_file)) + { + if (file_exists(install)) + remove_folder_and_subfolders(install); + if (make_directory(install)) + { + if (extract_gz_file(version, gz_file, install)) + success = true; +# ifdef _WIN32 + auto mapping_file_source = get_download_mapping_file(version); + auto mapping_file_dest = get_install(); + mapping_file_dest += folder_delimiter; + mapping_file_dest += "windowsZones.xml"; + if (!move_file(mapping_file_source, mapping_file_dest)) + success = false; +# endif // _WIN32 + } + } + return success; +} + +#endif // HAS_REMOTE_API + +static +std::string +get_version(const std::string& path) +{ + std::string version; + std::ifstream infile(path + "version"); + if (infile.is_open()) + { + infile >> version; + if (!infile.fail()) + return version; + } + else + { + infile.open(path + "NEWS"); + while (infile) + { + infile >> version; + if (version == "Release") + { + infile >> version; + return version; + } + } + } + throw std::runtime_error("Unable to get Timezone database version from " + path); +} + +static +std::unique_ptr +init_tzdb() +{ + using namespace date; + const std::string install = get_install(); + const std::string path = install + folder_delimiter; + std::string line; + bool continue_zone = false; + std::unique_ptr db(new tzdb); + +#if AUTO_DOWNLOAD + if (!file_exists(install)) + { + auto rv = remote_version(); + if (!rv.empty() && remote_download(rv)) + { + if (!remote_install(rv)) + { + std::string msg = "Timezone database version \""; + msg += rv; + msg += "\" did not install correctly to \""; + msg += install; + msg += "\""; + throw std::runtime_error(msg); + } + } + if (!file_exists(install)) + { + std::string msg = "Timezone database not found at \""; + msg += install; + msg += "\""; + throw std::runtime_error(msg); + } + db->version = get_version(path); + } + else + { + db->version = get_version(path); + auto rv = remote_version(); + if (!rv.empty() && db->version != rv) + { + if (remote_download(rv)) + { + remote_install(rv); + db->version = get_version(path); + } + } + } +#else // !AUTO_DOWNLOAD + if (!file_exists(install)) + { + std::string msg = "Timezone database not found at \""; + msg += install; + msg += "\""; + throw std::runtime_error(msg); + } + db->version = get_version(path); +#endif // !AUTO_DOWNLOAD + + CONSTDATA char*const files[] = + { + "africa", "antarctica", "asia", "australasia", "backward", "etcetera", "europe", + "pacificnew", "northamerica", "southamerica", "systemv", "leapseconds" + }; + + for (const auto& filename : files) + { + std::ifstream infile(path + filename); + while (infile) + { + std::getline(infile, line); + if (!line.empty() && line[0] != '#') + { + std::istringstream in(line); + std::string word; + in >> word; + if (word == "Rule") + { + db->rules.push_back(Rule(line)); + continue_zone = false; + } + else if (word == "Link") + { + db->links.push_back(time_zone_link(line)); + continue_zone = false; + } + else if (word == "Leap") + { + db->leap_seconds.push_back(leap_second(line, detail::undocumented{})); + continue_zone = false; + } + else if (word == "Zone") + { + db->zones.push_back(time_zone(line, detail::undocumented{})); + continue_zone = true; + } + else if (line[0] == '\t' && continue_zone) + { + db->zones.back().add(line); + } + else + { + std::cerr << line << '\n'; + } + } + } + } + std::sort(db->rules.begin(), db->rules.end()); + Rule::split_overlaps(db->rules); + std::sort(db->zones.begin(), db->zones.end()); + db->zones.shrink_to_fit(); + std::sort(db->links.begin(), db->links.end()); + db->links.shrink_to_fit(); + std::sort(db->leap_seconds.begin(), db->leap_seconds.end()); + db->leap_seconds.shrink_to_fit(); + +#ifdef _WIN32 + std::string mapping_file = get_install() + folder_delimiter + "windowsZones.xml"; + db->mappings = load_timezone_mappings_from_xml_file(mapping_file); + sort_zone_mappings(db->mappings); +#endif // _WIN32 + + return db; +} + +const tzdb& +reload_tzdb() +{ +#if AUTO_DOWNLOAD + auto const& v = get_tzdb_list().front().version; + if (!v.empty() && v == remote_version()) + return get_tzdb_list().front(); +#endif // AUTO_DOWNLOAD + tzdb_list::undocumented_helper::push_front(get_tzdb_list(), init_tzdb().release()); + return get_tzdb_list().front(); +} + +#endif // !USE_OS_TZDB + +const tzdb& +get_tzdb() +{ + return get_tzdb_list().front(); +} + +const time_zone* +#if HAS_STRING_VIEW +tzdb::locate_zone(std::string_view tz_name) const +#else +tzdb::locate_zone(const std::string& tz_name) const +#endif +{ + auto zi = std::lower_bound(zones.begin(), zones.end(), tz_name, +#if HAS_STRING_VIEW + [](const time_zone& z, const std::string_view& nm) +#else + [](const time_zone& z, const std::string& nm) +#endif + { + return z.name() < nm; + }); + if (zi == zones.end() || zi->name() != tz_name) + { +#if !USE_OS_TZDB + auto li = std::lower_bound(links.begin(), links.end(), tz_name, +#if HAS_STRING_VIEW + [](const time_zone_link& z, const std::string_view& nm) +#else + [](const time_zone_link& z, const std::string& nm) +#endif + { + return z.name() < nm; + }); + if (li != links.end() && li->name() == tz_name) + { + zi = std::lower_bound(zones.begin(), zones.end(), li->target(), + [](const time_zone& z, const std::string& nm) + { + return z.name() < nm; + }); + if (zi != zones.end() && zi->name() == li->target()) + return &*zi; + } +#endif // !USE_OS_TZDB + throw std::runtime_error(std::string(tz_name) + " not found in timezone database"); + } + return &*zi; +} + +const time_zone* +#if HAS_STRING_VIEW +locate_zone(std::string_view tz_name) +#else +locate_zone(const std::string& tz_name) +#endif +{ + return get_tzdb().locate_zone(tz_name); +} + +#if USE_OS_TZDB + +std::ostream& +operator<<(std::ostream& os, const tzdb& db) +{ + os << "Version: " << db.version << "\n\n"; + for (const auto& x : db.zones) + os << x << '\n'; + os << '\n'; + for (const auto& x : db.leap_seconds) + os << x << '\n'; + return os; +} + +#else // !USE_OS_TZDB + +std::ostream& +operator<<(std::ostream& os, const tzdb& db) +{ + os << "Version: " << db.version << '\n'; + std::string title("--------------------------------------------" + "--------------------------------------------\n" + "Name ""Start Y ""End Y " + "Beginning ""Offset " + "Designator\n" + "--------------------------------------------" + "--------------------------------------------\n"); + int count = 0; + for (const auto& x : db.rules) + { + if (count++ % 50 == 0) + os << title; + os << x << '\n'; + } + os << '\n'; + title = std::string("---------------------------------------------------------" + "--------------------------------------------------------\n" + "Name ""Offset " + "Rule ""Abrev ""Until\n" + "---------------------------------------------------------" + "--------------------------------------------------------\n"); + count = 0; + for (const auto& x : db.zones) + { + if (count++ % 10 == 0) + os << title; + os << x << '\n'; + } + os << '\n'; + title = std::string("---------------------------------------------------------" + "--------------------------------------------------------\n" + "Alias ""To\n" + "---------------------------------------------------------" + "--------------------------------------------------------\n"); + count = 0; + for (const auto& x : db.links) + { + if (count++ % 45 == 0) + os << title; + os << x << '\n'; + } + os << '\n'; + title = std::string("---------------------------------------------------------" + "--------------------------------------------------------\n" + "Leap second on\n" + "---------------------------------------------------------" + "--------------------------------------------------------\n"); + os << title; + for (const auto& x : db.leap_seconds) + os << x << '\n'; + return os; +} + +#endif // !USE_OS_TZDB + +// ----------------------- + +#ifdef _WIN32 + +static +std::string +getTimeZoneKeyName() +{ + DYNAMIC_TIME_ZONE_INFORMATION dtzi{}; + auto result = GetDynamicTimeZoneInformation(&dtzi); + if (result == TIME_ZONE_ID_INVALID) + throw std::runtime_error("current_zone(): GetDynamicTimeZoneInformation()" + " reported TIME_ZONE_ID_INVALID."); + auto wlen = wcslen(dtzi.TimeZoneKeyName); + char buf[128] = {}; + assert(sizeof(buf) >= wlen+1); + wcstombs(buf, dtzi.TimeZoneKeyName, wlen); + if (strcmp(buf, "Coordinated Universal Time") == 0) + return "UTC"; + return buf; +} + +const time_zone* +tzdb::current_zone() const +{ + std::string win_tzid = getTimeZoneKeyName(); + std::string standard_tzid; + if (!native_to_standard_timezone_name(win_tzid, standard_tzid)) + { + std::string msg; + msg = "current_zone() failed: A mapping from the Windows Time Zone id \""; + msg += win_tzid; + msg += "\" was not found in the time zone mapping database."; + throw std::runtime_error(msg); + } + return locate_zone(standard_tzid); +} + +#else // !_WIN32 + +#if HAS_STRING_VIEW + +static +std::string_view +extract_tz_name(char const* rp) +{ + using namespace std; + string_view result = rp; + CONSTDATA string_view zoneinfo = "zoneinfo"; + size_t pos = result.rfind(zoneinfo); + if (pos == result.npos) + throw runtime_error( + "current_zone() failed to find \"zoneinfo\" in " + string(result)); + pos = result.find('/', pos); + result.remove_prefix(pos + 1); + return result; +} + +#else // !HAS_STRING_VIEW + +static +std::string +extract_tz_name(char const* rp) +{ + using namespace std; + string result = rp; + CONSTDATA char zoneinfo[] = "zoneinfo"; + size_t pos = result.rfind(zoneinfo); + if (pos == result.npos) + throw runtime_error( + "current_zone() failed to find \"zoneinfo\" in " + result); + pos = result.find('/', pos); + result.erase(0, pos + 1); + return result; +} + +#endif // HAS_STRING_VIEW + +static +bool +sniff_realpath(const char* timezone) +{ + using namespace std; + char rp[PATH_MAX+1] = {}; + if (realpath(timezone, rp) == nullptr) + throw system_error(errno, system_category(), "realpath() failed"); + auto result = extract_tz_name(rp); + return result != "posixrules"; +} + +const time_zone* +tzdb::current_zone() const +{ + // On some OS's a file called /etc/localtime may + // exist and it may be either a real file + // containing time zone details or a symlink to such a file. + // On MacOS and BSD Unix if this file is a symlink it + // might resolve to a path like this: + // "/usr/share/zoneinfo/America/Los_Angeles" + // If it does, we try to determine the current + // timezone from the remainder of the path by removing the prefix + // and hoping the rest resolves to a valid timezone. + // It may not always work though. If it doesn't then an + // exception will be thrown by local_timezone. + // The path may also take a relative form: + // "../usr/share/zoneinfo/America/Los_Angeles". + { + struct stat sb; + CONSTDATA auto timezone = "/etc/localtime"; + if (lstat(timezone, &sb) == 0 && S_ISLNK(sb.st_mode) && sb.st_size > 0) + { + using namespace std; + static const bool use_realpath = sniff_realpath(timezone); + char rp[PATH_MAX+1] = {}; + if (use_realpath) + { + if (realpath(timezone, rp) == nullptr) + throw system_error(errno, system_category(), "realpath() failed"); + } + else + { + if (readlink(timezone, rp, sizeof(rp)-1) <= 0) + throw system_error(errno, system_category(), "readlink() failed"); + } + return locate_zone(extract_tz_name(rp)); + } + } + // On embedded systems e.g. buildroot with uclibc the timezone is linked + // into /etc/TZ which is a symlink to path like this: + // "/usr/share/zoneinfo/uclibc/America/Los_Angeles" + // If it does, we try to determine the current + // timezone from the remainder of the path by removing the prefix + // and hoping the rest resolves to valid timezone. + // It may not always work though. If it doesn't then an + // exception will be thrown by local_timezone. + // The path may also take a relative form: + // "../usr/share/zoneinfo/uclibc/America/Los_Angeles". + { + struct stat sb; + CONSTDATA auto timezone = "/etc/TZ"; + if (lstat(timezone, &sb) == 0 && S_ISLNK(sb.st_mode) && sb.st_size > 0) { + using namespace std; + string result; + char rp[PATH_MAX+1] = {}; + if (readlink(timezone, rp, sizeof(rp)-1) > 0) + result = string(rp); + else + throw system_error(errno, system_category(), "readlink() failed"); + + const size_t pos = result.find(get_tz_dir()); + if (pos != result.npos) + result.erase(0, get_tz_dir().size() + 1 + pos); + return locate_zone(result); + } + } + { + // On some versions of some linux distro's (e.g. Ubuntu), + // the current timezone might be in the first line of + // the /etc/timezone file. + std::ifstream timezone_file("/etc/timezone"); + if (timezone_file.is_open()) + { + std::string result; + std::getline(timezone_file, result); + if (!result.empty()) + return locate_zone(result); + } + // Fall through to try other means. + } + { + // On some versions of some bsd distro's (e.g. FreeBSD), + // the current timezone might be in the first line of + // the /var/db/zoneinfo file. + std::ifstream timezone_file("/var/db/zoneinfo"); + if (timezone_file.is_open()) + { + std::string result; + std::getline(timezone_file, result); + if (!result.empty()) + return locate_zone(result); + } + // Fall through to try other means. + } + { + // On some versions of some bsd distro's (e.g. iOS), + // it is not possible to use file based approach, + // we switch to system API, calling functions in + // CoreFoundation framework. +#if TARGET_OS_IPHONE + std::string result = date::iOSUtils::get_current_timezone(); + if (!result.empty()) + return locate_zone(result); +#endif + // Fall through to try other means. + } + { + // On some versions of some linux distro's (e.g. Red Hat), + // the current timezone might be in the first line of + // the /etc/sysconfig/clock file as: + // ZONE="US/Eastern" + std::ifstream timezone_file("/etc/sysconfig/clock"); + std::string result; + while (timezone_file) + { + std::getline(timezone_file, result); + auto p = result.find("ZONE=\""); + if (p != std::string::npos) + { + result.erase(p, p+6); + result.erase(result.rfind('"')); + return locate_zone(result); + } + } + // Fall through to try other means. + } + throw std::runtime_error("Could not get current timezone"); +} + +#endif // !_WIN32 + +const time_zone* +current_zone() +{ + return get_tzdb().current_zone(); +} + +} // namespace date + +#if defined(__GNUC__) && __GNUC__ < 5 +# pragma GCC diagnostic pop +#endif diff --git a/expected/10.18/aggregate.out b/expected/10.18/aggregate.out deleted file mode 100644 index 2158960..0000000 --- a/expected/10.18/aggregate.out +++ /dev/null @@ -1,839 +0,0 @@ ---SET log_min_messages=debug1; ---SET client_min_messages=debug1; ---Testcase 1: -SET datestyle=ISO; --- timestamp with time zone differs based on this ---Testcase 2: -SET timezone='UTC'; -\set ECHO none ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- import time column as timestamp and text type -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); ---ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); ---ALTER SERVER server1 OPTIONS (ADD extensions 'influxdb_fdw'); ---Testcase 6: -SELECT * FROM t4; - time | time_text | tag1 | tag2 | value1 | value2 -------------------------+----------------------+------+------+--------+-------- - 1970-01-01 00:00:00+00 | 1970-01-01T00:00:00Z | a | x | 1 | 100 - 1970-01-01 00:00:01+00 | 1970-01-01T00:00:01Z | a | y | 2 | 100 - 1970-01-01 00:00:02+00 | 1970-01-01T00:00:02Z | a | x | 3 | 100 - 1970-01-01 00:00:03+00 | 1970-01-01T00:00:03Z | b | y | 10 | 200 - 1970-01-01 00:00:04+00 | 1970-01-01T00:00:04Z | b | z | 20 | 200 - 1970-01-01 00:00:05+00 | 1970-01-01T00:00:05Z | b | z | 30 | 200 -(6 rows) - ---Testcase 7: -EXPLAIN (verbose) -SELECT sum("value1"),influx_time(time,interval '1s', interval '0.00001s'),tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sum(value1)), (influx_time("time", '@ 1 sec'::interval, '@ 0.00001 secs'::interval)), tag1 - InfluxDB query: SELECT sum("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m1s0u, 0d0h0m0s10u)), "tag1" -(3 rows) - ---Testcase 8: -SELECT sum("value1"),influx_time(time,interval '1s', interval '0.00001s'),tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tag1; - sum | influx_time | tag1 ------+------------------------------+------ - 1 | 1969-12-31 23:59:59.00001+00 | a - 2 | 1970-01-01 00:00:00.00001+00 | a - 3 | 1970-01-01 00:00:01.00001+00 | a - | 1970-01-01 00:00:02.00001+00 | a - | 1970-01-01 00:00:03.00001+00 | a - | 1970-01-01 00:00:04.00001+00 | a - | 1969-12-31 23:59:59.00001+00 | b - | 1970-01-01 00:00:00.00001+00 | b - | 1970-01-01 00:00:01.00001+00 | b - 10 | 1970-01-01 00:00:02.00001+00 | b - 20 | 1970-01-01 00:00:03.00001+00 | b - 30 | 1970-01-01 00:00:04.00001+00 | b -(12 rows) - ---Testcase 9: -EXPLAIN (verbose) -SELECT tag1,sum("value1"),tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY tag2, tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: tag1, (sum(value1)), tag2 - InfluxDB query: SELECT sum("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY "tag2", "tag1" -(3 rows) - ---Testcase 10: -SELECT tag1,sum("value1"),tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY tag2, tag1; - tag1 | sum | tag2 -------+-----+------ - a | 4 | x - a | 2 | y - b | 10 | y - b | 50 | z -(4 rows) - ---Testcase 11: -SELECT tag1,sum("value1"), count(value1), tag2 FROM "t4" group by tag1, tag2; - tag1 | sum | count | tag2 -------+-----+-------+------ - a | 4 | 2 | x - a | 2 | 1 | y - b | 10 | 1 | y - b | 50 | 2 | z -(4 rows) - ---Testcase 12: -EXPLAIN (verbose) SELECT tag1,sum("value1"), count(value1), tag2 FROM "t4" group by tag1, tag2; - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=80) - Output: tag1, (sum(value1)), (count(value1)), tag2 - InfluxDB query: SELECT sum("value1"), count("value1") FROM "t4" GROUP BY "tag1", "tag2" -(3 rows) - ---Testcase 13: -SELECT influx_time(time,interval '5s',interval '0s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY influx_time(time,interval '5s', interval '0s'), tag1; - influx_time | tag1 | last -------------------------+------+------ - 1970-01-01 00:00:00+00 | a | 3 - 1970-01-01 00:00:05+00 | a | - 1970-01-01 00:00:00+00 | b | 20 - 1970-01-01 00:00:05+00 | b | 30 -(4 rows) - ---Testcase 14: -EXPLAIN (VERBOSE) -SELECT influx_time(time,interval '5s',interval '0s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '5s', interval '0s'), tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (influx_time("time", '@ 5 secs'::interval, '@ 0'::interval)), tag1, (last("time", value1)) - InfluxDB query: SELECT last("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m5s0u, 0d0h0m0s0u)), "tag1" -(3 rows) - --- no offset ---Testcase 15: -SELECT influx_time(time,interval '5s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '5s'), tag1; - influx_time | tag1 | last -------------------------+------+------ - 1970-01-01 00:00:00+00 | a | 3 - 1970-01-01 00:00:05+00 | a | - 1970-01-01 00:00:00+00 | b | 20 - 1970-01-01 00:00:05+00 | b | 30 -(4 rows) - ---Testcase 16: -EXPLAIN (verbose) -SELECT last(time, value1),last(time, value2) FROM t4 GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (last("time", value1)), (last("time", value2)), tag1 - InfluxDB query: SELECT last("value1"), last("value2") FROM "t4" GROUP BY "tag1" -(3 rows) - ---Testcase 17: -SELECT last(time, value1),last(time, value2) FROM t4 GROUP BY tag1; - last | last -------+------ - 3 | 100 - 30 | 200 -(2 rows) - --- GROUP BY time intervals and fill() ---Testcase 18: -SELECT * FROM tx; - time | time_text | tag1 | tag2 | value1 | value2 -------------------------+----------------------+------+------+--------+-------- - 1970-01-01 00:00:00+00 | 1970-01-01T00:00:00Z | a | x | 1 | 100 - 1970-01-01 00:00:01+00 | 1970-01-01T00:00:01Z | a | y | 2 | 100 - 1970-01-01 00:00:02+00 | 1970-01-01T00:00:02Z | a | x | 3 | 100 - 1970-01-01 00:00:03+00 | 1970-01-01T00:00:03Z | b | y | 10 | 200 - 1970-01-01 00:00:04+00 | 1970-01-01T00:00:04Z | b | z | 20 | 200 - 1970-01-01 00:00:05+00 | 1970-01-01T00:00:05Z | b | z | 30 | 200 - 1970-01-01 00:00:06+00 | 1970-01-01T00:00:06Z | b | z | | 200 - 1970-01-01 00:00:07+00 | 1970-01-01T00:00:07Z | b | z | | 200 - 1970-01-01 00:00:08+00 | 1970-01-01T00:00:08Z | b | z | 80 | 200 - 1970-01-01 00:00:09+00 | 1970-01-01T00:00:09Z | b | z | 90 | 200 - 1970-01-01 00:00:10+00 | 1970-01-01T00:00:10Z | b | z | | 200 - 1970-01-01 00:00:11+00 | 1970-01-01T00:00:11Z | b | z | | 200 - 1970-01-01 00:00:12+00 | 1970-01-01T00:00:12Z | b | z | | 200 - 1970-01-01 00:00:13+00 | 1970-01-01T00:00:13Z | b | z | | 200 - 1970-01-01 00:00:14+00 | 1970-01-01T00:00:14Z | b | z | 140 | 200 - 1970-01-01 00:00:15+00 | 1970-01-01T00:00:15Z | b | z | 150 | 200 - 1970-01-01 00:00:16+00 | 1970-01-01T00:00:16Z | c | zz | | 2000 - 1970-01-01 00:00:20+00 | 1970-01-01T00:00:20Z | c | zz | | 2000 -(18 rows) - ---Testcase 19: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(100) -(3 rows) - ---Testcase 20: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); - sum | influx_time ------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - 100 | 1970-01-01 00:00:06+00 - 170 | 1970-01-01 00:00:08+00 - 100 | 1970-01-01 00:00:10+00 - 100 | 1970-01-01 00:00:12+00 - 290 | 1970-01-01 00:00:14+00 -(8 rows) - ---Testcase 21: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(100.001) -(3 rows) - ---Testcase 22: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); - sum | influx_time ----------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - 100.001 | 1970-01-01 00:00:06+00 - 170 | 1970-01-01 00:00:08+00 - 100.001 | 1970-01-01 00:00:10+00 - 100.001 | 1970-01-01 00:00:12+00 - 290 | 1970-01-01 00:00:14+00 -(8 rows) - ---Testcase 23: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('none'::influx_fill_enum))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(none) -(3 rows) - ---Testcase 24: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); - sum | influx_time ------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - 170 | 1970-01-01 00:00:08+00 - 290 | 1970-01-01 00:00:14+00 -(5 rows) - ---Testcase 25: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('null'::influx_fill_enum))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(null) -(3 rows) - ---Testcase 26: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); - sum | influx_time ------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - | 1970-01-01 00:00:06+00 - 170 | 1970-01-01 00:00:08+00 - | 1970-01-01 00:00:10+00 - | 1970-01-01 00:00:12+00 - 290 | 1970-01-01 00:00:14+00 -(8 rows) - ---Testcase 27: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('previous'::influx_fill_enum))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(previous) -(3 rows) - ---Testcase 28: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); - sum | influx_time ------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - 50 | 1970-01-01 00:00:06+00 - 170 | 1970-01-01 00:00:08+00 - 170 | 1970-01-01 00:00:10+00 - 170 | 1970-01-01 00:00:12+00 - 290 | 1970-01-01 00:00:14+00 -(8 rows) - ---Testcase 29: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('linear'::influx_fill_enum))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(linear) -(3 rows) - ---Testcase 30: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); - sum | influx_time ------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - 110 | 1970-01-01 00:00:06+00 - 170 | 1970-01-01 00:00:08+00 - 210 | 1970-01-01 00:00:10+00 - 250 | 1970-01-01 00:00:12+00 - 290 | 1970-01-01 00:00:14+00 -(8 rows) - --- with offset interval '0.00001s' ---Testcase 31: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)) fill(100) -(3 rows) - ---Testcase 32: -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); - sum | influx_time ------+------------------------------ - 1 | 1969-12-31 23:59:58.00001+00 - 5 | 1970-01-01 00:00:00.00001+00 - 30 | 1970-01-01 00:00:02.00001+00 - 30 | 1970-01-01 00:00:04.00001+00 - 80 | 1970-01-01 00:00:06.00001+00 - 90 | 1970-01-01 00:00:08.00001+00 - 100 | 1970-01-01 00:00:10.00001+00 - 140 | 1970-01-01 00:00:12.00001+00 - 150 | 1970-01-01 00:00:14.00001+00 -(9 rows) - ---Testcase 33: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))), tag1 - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)), "tag1" fill(100) -(3 rows) - ---Testcase 34: -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1; - sum | influx_time | tag1 ------+------------------------------+------ - 1 | 1969-12-31 23:59:58.00001+00 | a - 5 | 1970-01-01 00:00:00.00001+00 | a - 100 | 1970-01-01 00:00:02.00001+00 | a - 100 | 1970-01-01 00:00:04.00001+00 | a - 100 | 1970-01-01 00:00:06.00001+00 | a - 100 | 1970-01-01 00:00:08.00001+00 | a - 100 | 1970-01-01 00:00:10.00001+00 | a - 100 | 1970-01-01 00:00:12.00001+00 | a - 100 | 1970-01-01 00:00:14.00001+00 | a - 100 | 1969-12-31 23:59:58.00001+00 | b - 100 | 1970-01-01 00:00:00.00001+00 | b - 30 | 1970-01-01 00:00:02.00001+00 | b - 30 | 1970-01-01 00:00:04.00001+00 | b - 80 | 1970-01-01 00:00:06.00001+00 | b - 90 | 1970-01-01 00:00:08.00001+00 | b - 100 | 1970-01-01 00:00:10.00001+00 | b - 140 | 1970-01-01 00:00:12.00001+00 | b - 150 | 1970-01-01 00:00:14.00001+00 | b -(18 rows) - ---Testcase 35: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=80) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))), tag1, tag2 - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)), "tag1", "tag2" fill(100) -(3 rows) - ---Testcase 36: -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2; - sum | influx_time | tag1 | tag2 ------+------------------------------+------+------ - 1 | 1969-12-31 23:59:58.00001+00 | a | x - 3 | 1970-01-01 00:00:00.00001+00 | a | x - 100 | 1970-01-01 00:00:02.00001+00 | a | x - 100 | 1970-01-01 00:00:04.00001+00 | a | x - 100 | 1970-01-01 00:00:06.00001+00 | a | x - 100 | 1970-01-01 00:00:08.00001+00 | a | x - 100 | 1970-01-01 00:00:10.00001+00 | a | x - 100 | 1970-01-01 00:00:12.00001+00 | a | x - 100 | 1970-01-01 00:00:14.00001+00 | a | x - 100 | 1969-12-31 23:59:58.00001+00 | a | y - 2 | 1970-01-01 00:00:00.00001+00 | a | y - 100 | 1970-01-01 00:00:02.00001+00 | a | y - 100 | 1970-01-01 00:00:04.00001+00 | a | y - 100 | 1970-01-01 00:00:06.00001+00 | a | y - 100 | 1970-01-01 00:00:08.00001+00 | a | y - 100 | 1970-01-01 00:00:10.00001+00 | a | y - 100 | 1970-01-01 00:00:12.00001+00 | a | y - 100 | 1970-01-01 00:00:14.00001+00 | a | y - 100 | 1969-12-31 23:59:58.00001+00 | b | y - 100 | 1970-01-01 00:00:00.00001+00 | b | y - 10 | 1970-01-01 00:00:02.00001+00 | b | y - 100 | 1970-01-01 00:00:04.00001+00 | b | y - 100 | 1970-01-01 00:00:06.00001+00 | b | y - 100 | 1970-01-01 00:00:08.00001+00 | b | y - 100 | 1970-01-01 00:00:10.00001+00 | b | y - 100 | 1970-01-01 00:00:12.00001+00 | b | y - 100 | 1970-01-01 00:00:14.00001+00 | b | y - 100 | 1969-12-31 23:59:58.00001+00 | b | z - 100 | 1970-01-01 00:00:00.00001+00 | b | z - 20 | 1970-01-01 00:00:02.00001+00 | b | z - 30 | 1970-01-01 00:00:04.00001+00 | b | z - 80 | 1970-01-01 00:00:06.00001+00 | b | z - 90 | 1970-01-01 00:00:08.00001+00 | b | z - 100 | 1970-01-01 00:00:10.00001+00 | b | z - 140 | 1970-01-01 00:00:12.00001+00 | b | z - 150 | 1970-01-01 00:00:14.00001+00 | b | z -(36 rows) - ---with tag1 ---Testcase 37: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))), tag1 - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(100) -(3 rows) - ---Testcase 38: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1; - sum | influx_time | tag1 ------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - 100 | 1970-01-01 00:00:04+00 | a - 100 | 1970-01-01 00:00:06+00 | a - 100 | 1970-01-01 00:00:08+00 | a - 100 | 1970-01-01 00:00:10+00 | a - 100 | 1970-01-01 00:00:12+00 | a - 100 | 1970-01-01 00:00:14+00 | a - 100 | 1970-01-01 00:00:00+00 | b - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - 100 | 1970-01-01 00:00:06+00 | b - 170 | 1970-01-01 00:00:08+00 | b - 100 | 1970-01-01 00:00:10+00 | b - 100 | 1970-01-01 00:00:12+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(16 rows) - ---Testcase 39: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))), tag1 - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(100.001) -(3 rows) - ---Testcase 40: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1; - sum | influx_time | tag1 ----------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - 100.001 | 1970-01-01 00:00:04+00 | a - 100.001 | 1970-01-01 00:00:06+00 | a - 100.001 | 1970-01-01 00:00:08+00 | a - 100.001 | 1970-01-01 00:00:10+00 | a - 100.001 | 1970-01-01 00:00:12+00 | a - 100.001 | 1970-01-01 00:00:14+00 | a - 100.001 | 1970-01-01 00:00:00+00 | b - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - 100.001 | 1970-01-01 00:00:06+00 | b - 170 | 1970-01-01 00:00:08+00 | b - 100.001 | 1970-01-01 00:00:10+00 | b - 100.001 | 1970-01-01 00:00:12+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(16 rows) - ---Testcase 41: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('null')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('null'::influx_fill_enum))), tag1 - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(null) -(3 rows) - ---Testcase 42: -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('null')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tag1; - sum | influx_time | tag1 ------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - | 1970-01-01 00:00:04+00 | a - | 1970-01-01 00:00:06+00 | a - | 1970-01-01 00:00:08+00 | a - | 1970-01-01 00:00:10+00 | a - | 1970-01-01 00:00:12+00 | a - | 1970-01-01 00:00:14+00 | a - | 1970-01-01 00:00:00+00 | b - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - | 1970-01-01 00:00:06+00 | b - 170 | 1970-01-01 00:00:08+00 | b - | 1970-01-01 00:00:10+00 | b - | 1970-01-01 00:00:12+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(16 rows) - ---Testcase 43: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('none')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('none'::influx_fill_enum))), tag1 - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(none) -(3 rows) - ---Testcase 44: -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('none')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tag1; - sum | influx_time | tag1 ------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - 170 | 1970-01-01 00:00:08+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(6 rows) - ---Testcase 45: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('previous')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('previous'::influx_fill_enum))), tag1 - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(previous) -(3 rows) - ---Testcase 46: -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('previous')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tag1; - sum | influx_time | tag1 ------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - 3 | 1970-01-01 00:00:04+00 | a - 3 | 1970-01-01 00:00:06+00 | a - 3 | 1970-01-01 00:00:08+00 | a - 3 | 1970-01-01 00:00:10+00 | a - 3 | 1970-01-01 00:00:12+00 | a - 3 | 1970-01-01 00:00:14+00 | a - | 1970-01-01 00:00:00+00 | b - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - 50 | 1970-01-01 00:00:06+00 | b - 170 | 1970-01-01 00:00:08+00 | b - 170 | 1970-01-01 00:00:10+00 | b - 170 | 1970-01-01 00:00:12+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(16 rows) - ---Testcase 47: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('linear')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('linear'::influx_fill_enum))), tag1 - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(linear) -(3 rows) - ---Testcase 48: -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('linear')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tag1; - sum | influx_time | tag1 ------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - | 1970-01-01 00:00:04+00 | a - | 1970-01-01 00:00:06+00 | a - | 1970-01-01 00:00:08+00 | a - | 1970-01-01 00:00:10+00 | a - | 1970-01-01 00:00:12+00 | a - | 1970-01-01 00:00:14+00 | a - | 1970-01-01 00:00:00+00 | b - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - 110 | 1970-01-01 00:00:06+00 | b - 170 | 1970-01-01 00:00:08+00 | b - 210 | 1970-01-01 00:00:10+00 | b - 250 | 1970-01-01 00:00:12+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(16 rows) - ---with tag1,tag2 ---Testcase 49: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=80) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))), tag1, tag2 - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1", "tag2" fill(100) -(3 rows) - ---Testcase 50: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2; - sum | influx_time | tag1 | tag2 ------+------------------------+------+------ - 1 | 1970-01-01 00:00:00+00 | a | x - 3 | 1970-01-01 00:00:02+00 | a | x - 100 | 1970-01-01 00:00:04+00 | a | x - 100 | 1970-01-01 00:00:06+00 | a | x - 100 | 1970-01-01 00:00:08+00 | a | x - 100 | 1970-01-01 00:00:10+00 | a | x - 100 | 1970-01-01 00:00:12+00 | a | x - 100 | 1970-01-01 00:00:14+00 | a | x - 2 | 1970-01-01 00:00:00+00 | a | y - 100 | 1970-01-01 00:00:02+00 | a | y - 100 | 1970-01-01 00:00:04+00 | a | y - 100 | 1970-01-01 00:00:06+00 | a | y - 100 | 1970-01-01 00:00:08+00 | a | y - 100 | 1970-01-01 00:00:10+00 | a | y - 100 | 1970-01-01 00:00:12+00 | a | y - 100 | 1970-01-01 00:00:14+00 | a | y - 100 | 1970-01-01 00:00:00+00 | b | y - 10 | 1970-01-01 00:00:02+00 | b | y - 100 | 1970-01-01 00:00:04+00 | b | y - 100 | 1970-01-01 00:00:06+00 | b | y - 100 | 1970-01-01 00:00:08+00 | b | y - 100 | 1970-01-01 00:00:10+00 | b | y - 100 | 1970-01-01 00:00:12+00 | b | y - 100 | 1970-01-01 00:00:14+00 | b | y - 100 | 1970-01-01 00:00:00+00 | b | z - 100 | 1970-01-01 00:00:02+00 | b | z - 50 | 1970-01-01 00:00:04+00 | b | z - 100 | 1970-01-01 00:00:06+00 | b | z - 170 | 1970-01-01 00:00:08+00 | b | z - 100 | 1970-01-01 00:00:10+00 | b | z - 100 | 1970-01-01 00:00:12+00 | b | z - 290 | 1970-01-01 00:00:14+00 | b | z -(32 rows) - ---Testcase 51: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=80) - Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))), tag1, tag2 - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1", "tag2" fill(100.001) -(3 rows) - ---Testcase 52: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2; - sum | influx_time | tag1 | tag2 ----------+------------------------+------+------ - 1 | 1970-01-01 00:00:00+00 | a | x - 3 | 1970-01-01 00:00:02+00 | a | x - 100.001 | 1970-01-01 00:00:04+00 | a | x - 100.001 | 1970-01-01 00:00:06+00 | a | x - 100.001 | 1970-01-01 00:00:08+00 | a | x - 100.001 | 1970-01-01 00:00:10+00 | a | x - 100.001 | 1970-01-01 00:00:12+00 | a | x - 100.001 | 1970-01-01 00:00:14+00 | a | x - 2 | 1970-01-01 00:00:00+00 | a | y - 100.001 | 1970-01-01 00:00:02+00 | a | y - 100.001 | 1970-01-01 00:00:04+00 | a | y - 100.001 | 1970-01-01 00:00:06+00 | a | y - 100.001 | 1970-01-01 00:00:08+00 | a | y - 100.001 | 1970-01-01 00:00:10+00 | a | y - 100.001 | 1970-01-01 00:00:12+00 | a | y - 100.001 | 1970-01-01 00:00:14+00 | a | y - 100.001 | 1970-01-01 00:00:00+00 | b | y - 10 | 1970-01-01 00:00:02+00 | b | y - 100.001 | 1970-01-01 00:00:04+00 | b | y - 100.001 | 1970-01-01 00:00:06+00 | b | y - 100.001 | 1970-01-01 00:00:08+00 | b | y - 100.001 | 1970-01-01 00:00:10+00 | b | y - 100.001 | 1970-01-01 00:00:12+00 | b | y - 100.001 | 1970-01-01 00:00:14+00 | b | y - 100.001 | 1970-01-01 00:00:00+00 | b | z - 100.001 | 1970-01-01 00:00:02+00 | b | z - 50 | 1970-01-01 00:00:04+00 | b | z - 100.001 | 1970-01-01 00:00:06+00 | b | z - 170 | 1970-01-01 00:00:08+00 | b | z - 100.001 | 1970-01-01 00:00:10+00 | b | z - 100.001 | 1970-01-01 00:00:12+00 | b | z - 290 | 1970-01-01 00:00:14+00 | b | z -(32 rows) - --- unsupport syntax ---Testcase 53: -EXPLAIN (verbose) -SELECT influx_fill_numeric(100) FROM "tx"; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - ---Testcase 54: -SELECT influx_fill_numeric(100) FROM "tx"; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - ---Testcase 55: -SELECT * FROM "tx" WHERE influx_fill_numeric(100) > 0; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - ---Testcase 56: -EXPLAIN (verbose) -SELECT influx_fill_option('linear') FROM "tx"; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - ---Testcase 57: -SELECT influx_fill_option('linear') FROM "tx"; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - ---Testcase 58: -SELECT * FROM "tx" WHERE influx_fill_option('linear') > 0; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - --- InfluxDB does not return error for the following query ---SELECT sum(value1) FROM t4 GROUP BY value1; --- not allowed ---Testcase 59: -SELECT sum(value1) FROM t4 GROUP BY time; - sum ------ - 30 - 20 - 10 - 1 - 2 - 3 -(6 rows) - ---last returns NULL for tag ---SELECT last(time, value1),last(time, value2),last(time, tag1) FROM t4 GROUP BY tag1; ---Testcase 60: -DROP FOREIGN TABLE t3; ---Testcase 61: -DROP FOREIGN TABLE t4; ---Testcase 62: -DROP FOREIGN TABLE cpu; ---Testcase 63: -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 64: -DROP SERVER server1 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to foreign table numbers -drop cascades to foreign table tx ---Testcase 65: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/10.18/extra/aggregates.out b/expected/10.18/extra/aggregates.out deleted file mode 100644 index c8eec4b..0000000 --- a/expected/10.18/extra/aggregates.out +++ /dev/null @@ -1,3272 +0,0 @@ -\set ECHO none ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 4: -CREATE FOREIGN TABLE onek ( - unique1 int4, - unique2 int4, - two int4, - four int4, - ten int4, - twenty int4, - hundred int4, - thousand int4, - twothousand int4, - fivethous int4, - tenthous int4, - odd int4, - even int4, - stringu1 name, - stringu2 name, - string4 name -) SERVER influxdb_svr; ---Testcase 5: -CREATE FOREIGN TABLE aggtest ( - a int2, - b float4 -) SERVER influxdb_svr OPTIONS (table 'agg'); ---Testcase 6: -CREATE FOREIGN TABLE student ( - name text, - age int4, - location point, - gpa float8 -) SERVER influxdb_svr; ---Testcase 7: -CREATE FOREIGN TABLE tenk1 ( - unique1 int4, - unique2 int4, - two int4, - four int4, - ten int4, - twenty int4, - hundred int4, - thousand int4, - twothousand int4, - fivethous int4, - tenthous int4, - odd int4, - even int4, - stringu1 name, - stringu2 name, - string4 name -) SERVER influxdb_svr OPTIONS (table 'tenk'); ---Testcase 8: -CREATE FOREIGN TABLE INT8_TBL ( - q1 int8, - q2 int8 -) SERVER influxdb_svr; ---Testcase 9: -CREATE FOREIGN TABLE INT8_TBL2 ( - q1 int8, - q2 int8 -) SERVER influxdb_svr; ---Testcase 10: -CREATE FOREIGN TABLE INT4_TBL (f1 int4) SERVER influxdb_svr; ---Testcase 11: -CREATE FOREIGN TABLE INT4_TBL2 (f1 int4) SERVER influxdb_svr; ---Testcase 12: -CREATE FOREIGN TABLE INT4_TBL3 (f1 int4) SERVER influxdb_svr; ---Testcase 13: -CREATE FOREIGN TABLE INT4_TBL4 (f1 int4) SERVER influxdb_svr; ---Testcase 14: -CREATE FOREIGN TABLE multi_arg_agg (a int, b int, c text) SERVER influxdb_svr; ---Testcase 15: -CREATE FOREIGN TABLE multi_arg_agg2 (a int, b int, c text) SERVER influxdb_svr; ---Testcase 16: -CREATE FOREIGN TABLE multi_arg_agg3 (a int, b int, c text) SERVER influxdb_svr; ---Testcase 17: -CREATE FOREIGN TABLE VARCHAR_TBL (f1 varchar(4)) SERVER influxdb_svr; ---Testcase 18: -CREATE FOREIGN TABLE FLOAT8_TBL (f1 float8) SERVER influxdb_svr; --- --- AGGREGATES --- --- avoid bit-exact output here because operations may not be bit-exact. ---Testcase 19: -SET extra_float_digits = 0; ---Testcase 20: -SELECT avg(four) AS avg_1 FROM onek; - avg_1 --------------------- - 1.5000000000000000 -(1 row) - ---Testcase 21: -SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100; - avg_32 ---------------------- - 32.6666666666666667 -(1 row) - --- In 7.1, avg(float4) is computed using float8 arithmetic. --- Round the result to 3 digits to avoid platform-specific results. ---Testcase 22: -SELECT avg(b)::numeric(10,3) AS avg_107_943 FROM aggtest; - avg_107_943 -------------- - 107.943 -(1 row) - ---Testcase 23: -SELECT avg(gpa) AS avg_3_4 FROM ONLY student; - avg_3_4 ---------- - 3.4 -(1 row) - ---Testcase 24: -SELECT sum(four) AS sum_1500 FROM onek; - sum_1500 ----------- - 1500 -(1 row) - ---Testcase 25: -SELECT sum(a) AS sum_198 FROM aggtest; - sum_198 ---------- - 198 -(1 row) - ---Testcase 26: -SELECT sum(b) AS avg_431_773 FROM aggtest; - avg_431_773 -------------- - 431.773 -(1 row) - ---Testcase 27: -SELECT sum(gpa) AS avg_6_8 FROM ONLY student; - avg_6_8 ---------- - 6.8 -(1 row) - ---Testcase 28: -SELECT max(four) AS max_3 FROM onek; - max_3 -------- - 3 -(1 row) - ---Testcase 29: -SELECT max(a) AS max_100 FROM aggtest; - max_100 ---------- - 100 -(1 row) - ---Testcase 30: -SELECT max(aggtest.b) AS max_324_78 FROM aggtest; - max_324_78 ------------- - 324.78 -(1 row) - ---Testcase 31: -SELECT max(student.gpa) AS max_3_7 FROM student; - max_3_7 ---------- - 3.7 -(1 row) - ---Testcase 32: -SELECT stddev_pop(b) FROM aggtest; - stddev_pop ------------------ - 131.10703231895 -(1 row) - ---Testcase 33: -SELECT stddev_samp(b) FROM aggtest; - stddev_samp ------------------- - 151.389360803998 -(1 row) - ---Testcase 34: -SELECT var_pop(b) FROM aggtest; - var_pop ------------------- - 17189.0539234823 -(1 row) - ---Testcase 35: -SELECT var_samp(b) FROM aggtest; - var_samp ------------------- - 22918.7385646431 -(1 row) - ---Testcase 36: -SELECT stddev_pop(b::numeric) FROM aggtest; - stddev_pop ------------------- - 131.107032862199 -(1 row) - ---Testcase 37: -SELECT stddev_samp(b::numeric) FROM aggtest; - stddev_samp ------------------- - 151.389361431288 -(1 row) - ---Testcase 38: -SELECT var_pop(b::numeric) FROM aggtest; - var_pop --------------------- - 17189.054065929769 -(1 row) - ---Testcase 39: -SELECT var_samp(b::numeric) FROM aggtest; - var_samp --------------------- - 22918.738754573025 -(1 row) - --- population variance is defined for a single tuple, sample variance --- is not ---Testcase 40: -CREATE FOREIGN TABLE agg_t5 (id int, a text, b text) SERVER influxdb_svr; ---Testcase 41: -SELECT var_pop(a::float8), var_samp(b::float8) FROM agg_t5 WHERE id = 1; - var_pop | var_samp ----------+---------- - 0 | -(1 row) - ---Testcase 42: -SELECT stddev_pop(a::float8), stddev_samp(b::float8) FROM agg_t5 WHERE id = 2; - stddev_pop | stddev_samp -------------+------------- - 0 | -(1 row) - ---Testcase 43: -SELECT var_pop(a::float8), var_samp(b::float8) FROM agg_t5 WHERE id = 3; - var_pop | var_samp ----------+---------- - NaN | -(1 row) - ---Testcase 44: -SELECT stddev_pop(a::float8), stddev_samp(b::float8) FROM agg_t5 WHERE id = 3; - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - ---Testcase 45: -SELECT var_pop(a::float8), var_samp(b::float8) FROM agg_t5 WHERE id = 4; - var_pop | var_samp ----------+---------- - NaN | -(1 row) - ---Testcase 46: -SELECT stddev_pop(a::float8), stddev_samp(b::float8) FROM agg_t5 WHERE id = 4; - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - ---Testcase 47: -SELECT var_pop(a::float4), var_samp(b::float4) FROM agg_t5 WHERE id = 1; - var_pop | var_samp ----------+---------- - 0 | -(1 row) - ---Testcase 48: -SELECT stddev_pop(a::float4), stddev_samp(b::float4) FROM agg_t5 WHERE id = 2; - stddev_pop | stddev_samp -------------+------------- - 0 | -(1 row) - ---Testcase 49: -SELECT var_pop(a::float4), var_samp(b::float4) FROM agg_t5 WHERE id = 3; - var_pop | var_samp ----------+---------- - NaN | -(1 row) - ---Testcase 50: -SELECT stddev_pop(a::float4), stddev_samp(b::float4) FROM agg_t5 WHERE id = 3; - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - ---Testcase 51: -SELECT var_pop(a::float4), var_samp(b::float4) FROM agg_t5 WHERE id = 4; - var_pop | var_samp ----------+---------- - NaN | -(1 row) - ---Testcase 52: -SELECT stddev_pop(a::float4), stddev_samp(b::float4) FROM agg_t5 WHERE id = 4; - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - ---Testcase 53: -SELECT var_pop(a::numeric), var_samp(b::numeric) FROM agg_t5 WHERE id = 1; - var_pop | var_samp ----------+---------- - 0 | -(1 row) - ---Testcase 54: -SELECT stddev_pop(a::numeric), stddev_samp(b::numeric) FROM agg_t5 WHERE id = 2; - stddev_pop | stddev_samp -------------+------------- - 0 | -(1 row) - ---Testcase 55: -SELECT var_pop(a::numeric), var_samp(b::numeric) FROM agg_t5 WHERE id = 3; -ERROR: invalid input syntax for type numeric: "inf" ---Testcase 56: -SELECT stddev_pop(a::numeric), stddev_samp(b::numeric) FROM agg_t5 WHERE id = 3; -ERROR: invalid input syntax for type numeric: "inf" ---Testcase 57: -SELECT var_pop(a::numeric), var_samp(b::numeric) FROM agg_t5 WHERE id = 4; - var_pop | var_samp ----------+---------- - NaN | NaN -(1 row) - ---Testcase 58: -SELECT stddev_pop(a::numeric), stddev_samp(b::numeric) FROM agg_t5 WHERE id = 4; - stddev_pop | stddev_samp -------------+------------- - NaN | NaN -(1 row) - --- verify correct results for null and NaN inputs ---Testcase 59: -create foreign table generate_series1(a int) server influxdb_svr; ---Testcase 60: -select sum(null::int4) from generate_series1; - sum ------ - -(1 row) - ---Testcase 61: -select sum(null::int8) from generate_series1; - sum ------ - -(1 row) - ---Testcase 62: -select sum(null::numeric) from generate_series1; - sum ------ - -(1 row) - ---Testcase 63: -select sum(null::float8) from generate_series1; - sum ------ - -(1 row) - ---Testcase 64: -select avg(null::int4) from generate_series1; - avg ------ - -(1 row) - ---Testcase 65: -select avg(null::int8) from generate_series1; - avg ------ - -(1 row) - ---Testcase 66: -select avg(null::numeric) from generate_series1; - avg ------ - -(1 row) - ---Testcase 67: -select avg(null::float8) from generate_series1; - avg ------ - -(1 row) - ---Testcase 68: -select sum('NaN'::numeric) from generate_series1; - sum ------ - NaN -(1 row) - ---Testcase 69: -select avg('NaN'::numeric) from generate_series1; - avg ------ - NaN -(1 row) - --- verify correct results for infinite inputs ---Testcase 70: -create foreign table infinite1(id int, x text) server influxdb_svr; ---Testcase 71: -SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) -FROM infinite1 WHERE id = 1; - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - ---Testcase 72: -SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) -FROM infinite1 WHERE id = 2; - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - ---Testcase 73: -SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) -FROM infinite1 WHERE id = 3; - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - ---Testcase 74: -SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) -FROM infinite1 WHERE id = 4; - sum | avg | var_pop ------+-----+--------- - NaN | NaN | NaN -(1 row) - ---Testcase 75: -SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) -FROM infinite1 WHERE id = 5; - sum | avg | var_pop ------------+-----------+--------- - -Infinity | -Infinity | NaN -(1 row) - ---Testcase 76: -SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) -FROM infinite1 WHERE id = 1; -ERROR: invalid input syntax for type numeric: "infinity" ---Testcase 77: -SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) -FROM infinite1 WHERE id = 2; -ERROR: invalid input syntax for type numeric: "infinity" ---Testcase 78: -SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) -FROM infinite1 WHERE id = 3; -ERROR: invalid input syntax for type numeric: "infinity" ---Testcase 79: -SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) -FROM infinite1 WHERE id = 4; -ERROR: invalid input syntax for type numeric: "-infinity" ---Testcase 80: -SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) -FROM infinite1 WHERE id = 5; -ERROR: invalid input syntax for type numeric: "-infinity" --- test accuracy with a large input offset ---Testcase 81: -create foreign table large_input1(id int, x float8) server influxdb_svr; ---Testcase 82: -SELECT avg(x::float8), var_pop(x::float8) -FROM large_input1 WHERE id=1; - avg | var_pop ------------+--------- - 100000005 | 4 -(1 row) - ---Testcase 83: -SELECT avg(x::float8), var_pop(x::float8) -FROM large_input1 WHERE id=2; - avg | var_pop ----------------+--------- - 7000000000006 | 0 -(1 row) - --- SQL2003 binary aggregates ---Testcase 84: -SELECT regr_count(b, a) FROM aggtest; - regr_count ------------- - 4 -(1 row) - ---Testcase 85: -SELECT regr_sxx(b, a) FROM aggtest; - regr_sxx ----------- - 5099 -(1 row) - ---Testcase 86: -SELECT regr_syy(b, a) FROM aggtest; - regr_syy ------------------- - 68756.2156939293 -(1 row) - ---Testcase 87: -SELECT regr_sxy(b, a) FROM aggtest; - regr_sxy ------------------- - 2614.51582155004 -(1 row) - ---Testcase 88: -SELECT regr_avgx(b, a), regr_avgy(b, a) FROM aggtest; - regr_avgx | regr_avgy ------------+------------------ - 49.5 | 107.943152273074 -(1 row) - ---Testcase 89: -SELECT regr_r2(b, a) FROM aggtest; - regr_r2 --------------------- - 0.0194977982031803 -(1 row) - ---Testcase 90: -SELECT regr_slope(b, a), regr_intercept(b, a) FROM aggtest; - regr_slope | regr_intercept --------------------+------------------ - 0.512750700441271 | 82.5619926012309 -(1 row) - ---Testcase 91: -SELECT covar_pop(b, a), covar_samp(b, a) FROM aggtest; - covar_pop | covar_samp ------------------+------------------ - 653.62895538751 | 871.505273850014 -(1 row) - ---Testcase 92: -SELECT corr(b, a) FROM aggtest; - corr -------------------- - 0.139634516517873 -(1 row) - --- check single-tuple behavior ---Testcase 93: -create foreign table agg_t4(id int, a text, b text, c text, d text) server influxdb_svr; ---Testcase 94: -SELECT covar_pop(a::float8,b::float8), covar_samp(c::float8,d::float8) FROM agg_t4 WHERE id = 1; - covar_pop | covar_samp ------------+------------ - 0 | -(1 row) - ---Testcase 95: -SELECT covar_pop(a::float8,b::float8), covar_samp(c::float8,d::float8) FROM agg_t4 WHERE id = 2; - covar_pop | covar_samp ------------+------------ - NaN | -(1 row) - ---Testcase 96: -SELECT covar_pop(a::float8,b::float8), covar_samp(c::float8,d::float8) FROM agg_t4 WHERE id = 3; - covar_pop | covar_samp ------------+------------ - NaN | -(1 row) - --- test accum and combine functions directly ---Testcase 97: -CREATE FOREIGN TABLE regr_test (x float8, y float8) server influxdb_svr; ---Testcase 98: -SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) -FROM regr_test WHERE x IN (10,20,30,80); - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+------+----------+---------- - 4 | 140 | 2900 | 1290 | 83075 | 15050 -(1 row) - ---Testcase 99: -SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) -FROM regr_test; - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+------+----------+---------- - 5 | 240 | 6280 | 1490 | 95080 | 8680 -(1 row) - ---Testcase 100: -CREATE FOREIGN TABLE float8_arr (id int, x text, y text) server influxdb_svr; ---Testcase 101: -SELECT float8_accum(x::float8[], 100) FROM float8_arr WHERE id=1; - float8_accum ---------------- - {5,240,12900} -(1 row) - ---Testcase 102: -SELECT float8_regr_accum(x::float8[], 200, 100) FROM float8_arr WHERE id=2; - float8_regr_accum ---------------------------------- - {5,240,12900,1490,123075,35050} -(1 row) - ---Testcase 103: -SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) -FROM regr_test WHERE x IN (10,20,30); - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+-----+----------+---------- - 3 | 60 | 200 | 750 | 20000 | 2000 -(1 row) - ---Testcase 104: -SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) -FROM regr_test WHERE x IN (80,100); - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+-----+----------+---------- - 2 | 180 | 200 | 740 | 57800 | -3400 -(1 row) - ---Testcase 105: -SELECT float8_combine(x::float8[], y::float8[]) FROM float8_arr WHERE id=3; -ERROR: aggregate function called in non-aggregate context ---Testcase 106: -SELECT float8_combine(x::float8[], y::float8[]) FROM float8_arr WHERE id=4; -ERROR: aggregate function called in non-aggregate context ---Testcase 107: -SELECT float8_combine(x::float8[], y::float8[]) FROM float8_arr WHERE id=5; -ERROR: aggregate function called in non-aggregate context ---Testcase 108: -SELECT float8_regr_combine(x::float8[],y::float8[]) FROM float8_arr WHERE id=6; -ERROR: aggregate function called in non-aggregate context ---Testcase 109: -SELECT float8_regr_combine(x::float8[],y::float8[]) FROM float8_arr WHERE id=7; -ERROR: aggregate function called in non-aggregate context ---Testcase 110: -SELECT float8_regr_combine(x::float8[],y::float8[]) FROM float8_arr WHERE id=8; -ERROR: aggregate function called in non-aggregate context ---Testcase 111: -DROP FOREIGN TABLE regr_test; --- test count, distinct ---Testcase 112: -SELECT count(four) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - ---Testcase 113: -SELECT count(DISTINCT four) AS cnt_4 FROM onek; - cnt_4 -------- - 4 -(1 row) - ---Testcase 114: -select ten, count(*), sum(four) from onek -group by ten order by ten; - ten | count | sum ------+-------+----- - 0 | 100 | 100 - 1 | 100 | 200 - 2 | 100 | 100 - 3 | 100 | 200 - 4 | 100 | 100 - 5 | 100 | 200 - 6 | 100 | 100 - 7 | 100 | 200 - 8 | 100 | 100 - 9 | 100 | 200 -(10 rows) - ---Testcase 115: -select ten, count(four), sum(DISTINCT four) from onek -group by ten order by ten; - ten | count | sum ------+-------+----- - 0 | 100 | 2 - 1 | 100 | 4 - 2 | 100 | 2 - 3 | 100 | 4 - 4 | 100 | 2 - 5 | 100 | 4 - 6 | 100 | 2 - 7 | 100 | 4 - 8 | 100 | 2 - 9 | 100 | 4 -(10 rows) - --- user-defined aggregates ---Testcase 116: -CREATE AGGREGATE newavg ( - sfunc = int4_avg_accum, basetype = int4, stype = _int8, - finalfunc = int8_avg, - initcond1 = '{0,0}' -); --- without finalfunc; test obsolete spellings 'sfunc1' etc ---Testcase 117: -CREATE AGGREGATE newsum ( - sfunc1 = int4pl, basetype = int4, stype1 = int4, - initcond1 = '0' -); --- zero-argument aggregate ---Testcase 118: -CREATE AGGREGATE newcnt (*) ( - sfunc = int8inc, stype = int8, - initcond = '0', parallel = safe -); --- old-style spelling of same (except without parallel-safe; that's too new) ---Testcase 119: -CREATE AGGREGATE oldcnt ( - sfunc = int8inc, basetype = 'ANY', stype = int8, - initcond = '0' -); --- aggregate that only cares about null/nonnull input ---Testcase 120: -CREATE AGGREGATE newcnt ("any") ( - sfunc = int8inc_any, stype = int8, - initcond = '0' -); --- multi-argument aggregate ---Testcase 121: -create function sum3(int8,int8,int8) returns int8 as -'select $1 + $2 + $3' language sql strict immutable; ---Testcase 122: -create aggregate sum2(int8,int8) ( - sfunc = sum3, stype = int8, - initcond = '0' -); ---Testcase 123: -SELECT newavg(four) AS avg_1 FROM onek; - avg_1 --------------------- - 1.5000000000000000 -(1 row) - ---Testcase 124: -SELECT newsum(four) AS sum_1500 FROM onek; - sum_1500 ----------- - 1500 -(1 row) - ---Testcase 125: -SELECT newcnt(four) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - ---Testcase 126: -SELECT newcnt(*) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - ---Testcase 127: -SELECT oldcnt(*) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - ---Testcase 128: -SELECT sum2(q1,q2) FROM int8_tbl; - sum2 -------------------- - 18271560493827981 -(1 row) - --- test for outer-level aggregates --- this should work ---Testcase 129: -select ten, sum(distinct four) from onek a -group by ten -having exists (select 1 from onek b where sum(distinct a.four) = b.four); - ten | sum ------+----- - 0 | 2 - 2 | 2 - 4 | 2 - 6 | 2 - 8 | 2 -(5 rows) - --- this should fail because subquery has an agg of its own in WHERE ---Testcase 130: -select ten, sum(distinct four) from onek a -group by ten -having exists (select 1 from onek b - where sum(distinct a.four + b.four) = b.four); -ERROR: aggregate functions are not allowed in WHERE -LINE 4: where sum(distinct a.four + b.four) = b.four)... - ^ --- Test handling of sublinks within outer-level aggregates. --- Per bug report from Daniel Grace. ---Testcase 131: -select - (select max((select i.unique2 from tenk1 i where i.unique1 = o.unique1))) -from tenk1 o; - max ------- - 9999 -(1 row) - --- Test handling of Params within aggregate arguments in hashed aggregation. --- Per bug report from Jeevan Chalke. ---Testcase 132: -explain (verbose, costs off) -select s1.a, ss.a, sm -from generate_series1 s1, - lateral (select s2.a, sum(s1.a + s2.a) sm - from generate_series1 s2 group by s2.a) ss -order by 1, 2; - QUERY PLAN ------------------------------------------------------------------------- - Sort - Output: s1.a, s2.a, (sum((s1.a + s2.a))) - Sort Key: s1.a, s2.a - -> Nested Loop - Output: s1.a, s2.a, (sum((s1.a + s2.a))) - -> Foreign Scan on public.generate_series1 s1 - Output: s1.a - InfluxDB query: SELECT "a" FROM "generate_series1" - -> HashAggregate - Output: s2.a, sum((s1.a + s2.a)) - Group Key: s2.a - -> Foreign Scan on public.generate_series1 s2 - Output: s2.a - InfluxDB query: SELECT "a" FROM "generate_series1" -(14 rows) - ---Testcase 133: -select s1.a as s1, ss.a as s2, sm -from generate_series1 s1, - lateral (select s2.a, sum(s1.a + s2.a) sm - from generate_series1 s2 group by s2.a) ss -order by 1, 2; - s1 | s2 | sm -----+----+---- - 1 | 1 | 2 - 1 | 2 | 3 - 1 | 3 | 4 - 2 | 1 | 3 - 2 | 2 | 4 - 2 | 3 | 5 - 3 | 1 | 4 - 3 | 2 | 5 - 3 | 3 | 6 -(9 rows) - ---Testcase 134: -explain (verbose, costs off) -select array(select sum(x.a+y.a) s - from generate_series1 y group by y.a order by s) - from generate_series1 x; - QUERY PLAN --------------------------------------------------------------------------- - Foreign Scan on public.generate_series1 x - Output: (SubPlan 1) - InfluxDB query: SELECT "a" FROM "generate_series1" - SubPlan 1 - -> Sort - Output: (sum((x.a + y.a))), y.a - Sort Key: (sum((x.a + y.a))) - -> HashAggregate - Output: sum((x.a + y.a)), y.a - Group Key: y.a - -> Foreign Scan on public.generate_series1 y - Output: y.a - InfluxDB query: SELECT "a" FROM "generate_series1" -(13 rows) - ---Testcase 135: -select array(select sum(x.a+y.a) s - from generate_series1 y group by y.a order by s) - from generate_series1 x; - array ---------- - {2,3,4} - {3,4,5} - {4,5,6} -(3 rows) - --- --- test for bitwise integer aggregates --- ---Testcase 136: -CREATE FOREIGN TABLE bitwise_test_empty ( - i2 INT2, - i4 INT4, - i8 INT8, - i INTEGER, - x INT2, - y BIT(4) -) SERVER influxdb_svr; --- empty case ---Testcase 137: -SELECT - BIT_AND(i2) AS "?", - BIT_OR(i4) AS "?" -FROM bitwise_test_empty; - ? | ? ----+--- - | -(1 row) - ---Testcase 138: -CREATE FOREIGN TABLE bitwise_test ( - i2 INT2, - i4 INT4, - i8 INT8, - i INTEGER, - x INT2, - y BIT(4) -) SERVER influxdb_svr; ---Testcase 139: -SELECT - BIT_AND(i2) AS "1", - BIT_AND(i4) AS "1", - BIT_AND(i8) AS "1", - BIT_AND(i) AS "?", - BIT_AND(x) AS "0", - BIT_AND(y) AS "0100", - BIT_OR(i2) AS "7", - BIT_OR(i4) AS "7", - BIT_OR(i8) AS "7", - BIT_OR(i) AS "?", - BIT_OR(x) AS "7", - BIT_OR(y) AS "1101" -FROM bitwise_test; - 1 | 1 | 1 | ? | 0 | 0100 | 7 | 7 | 7 | ? | 7 | 1101 ----+---+---+---+---+------+---+---+---+---+---+------ - 1 | 1 | 1 | 1 | 0 | 0100 | 7 | 7 | 7 | 3 | 7 | 1101 -(1 row) - --- --- test boolean aggregates --- --- first test all possible transition and final states ---Testcase 140: -CREATE FOREIGN TABLE boolean1 (x1 BOOL, y1 BOOL , x2 BOOL, y2 BOOL, - x3 BOOL, y3 BOOL, x4 BOOL, y4 BOOL, - x5 BOOL, y5 BOOL, x6 BOOL, y6 BOOL, - x7 BOOL, y7 BOOL, x8 BOOL, y8 BOOL, - x9 BOOL, y9 BOOL) SERVER influxdb_svr; ---Testcase 141: -SELECT - -- boolean and transitions - -- null because strict - booland_statefunc(x1, y1) IS NULL AS "t", - booland_statefunc(x2, y2) IS NULL AS "t", - booland_statefunc(x3, y3) IS NULL AS "t", - booland_statefunc(x4, y4) IS NULL AS "t", - booland_statefunc(x5, y5) IS NULL AS "t", - -- and actual computations - booland_statefunc(x6, y6) AS "t", - NOT booland_statefunc(x7, y7) AS "t", - NOT booland_statefunc(x8, y8) AS "t", - NOT booland_statefunc(x9, y9) AS "t" FROM boolean1; - t | t | t | t | t | t | t | t | t ----+---+---+---+---+---+---+---+--- - t | t | t | t | t | t | t | t | t -(1 row) - ---Testcase 142: -SELECT - -- boolean or transitions - -- null because strict - boolor_statefunc(x1, y1) IS NULL AS "t", - boolor_statefunc(x2, y2) IS NULL AS "t", - boolor_statefunc(x3, y3) IS NULL AS "t", - boolor_statefunc(x4, y4) IS NULL AS "t", - boolor_statefunc(x5, y5) IS NULL AS "t", - -- actual computations - boolor_statefunc(x6, y6) AS "t", - boolor_statefunc(x7, y7) AS "t", - boolor_statefunc(x8, y8) AS "t", - NOT boolor_statefunc(x9, y9) AS "t" FROM boolean1; - t | t | t | t | t | t | t | t | t ----+---+---+---+---+---+---+---+--- - t | t | t | t | t | t | t | t | t -(1 row) - ---Testcase 143: -CREATE FOREIGN TABLE bool_test_empty ( - b1 BOOL, - b2 BOOL, - b3 BOOL, - b4 BOOL -) SERVER influxdb_svr; --- empty case ---Testcase 144: -SELECT - BOOL_AND(b1) AS "n", - BOOL_OR(b3) AS "n" -FROM bool_test_empty; - n | n ----+--- - | -(1 row) - ---Testcase 145: -CREATE FOREIGN TABLE bool_test ( - b1 BOOL, - b2 BOOL, - b3 BOOL, - b4 BOOL -) SERVER influxdb_svr; ---Testcase 146: -SELECT - BOOL_AND(b1) AS "f", - BOOL_AND(b2) AS "t", - BOOL_AND(b3) AS "f", - BOOL_AND(b4) AS "n", - BOOL_AND(NOT b2) AS "f", - BOOL_AND(NOT b3) AS "t" -FROM bool_test; - f | t | f | n | f | t ----+---+---+---+---+--- - f | t | f | | f | t -(1 row) - ---Testcase 147: -SELECT - EVERY(b1) AS "f", - EVERY(b2) AS "t", - EVERY(b3) AS "f", - EVERY(b4) AS "n", - EVERY(NOT b2) AS "f", - EVERY(NOT b3) AS "t" -FROM bool_test; - f | t | f | n | f | t ----+---+---+---+---+--- - f | t | f | | f | t -(1 row) - ---Testcase 148: -SELECT - BOOL_OR(b1) AS "t", - BOOL_OR(b2) AS "t", - BOOL_OR(b3) AS "f", - BOOL_OR(b4) AS "n", - BOOL_OR(NOT b2) AS "f", - BOOL_OR(NOT b3) AS "t" -FROM bool_test; - t | t | f | n | f | t ----+---+---+---+---+--- - t | t | f | | f | t -(1 row) - --- --- Test cases that should be optimized into indexscans instead of --- the generic aggregate implementation. --- --- Basic cases ---Testcase 149: -explain (costs off) - select min(unique1) from tenk1; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 150: -select min(unique1) from tenk1; - min ------ - 0 -(1 row) - ---Testcase 151: -explain (costs off) - select max(unique1) from tenk1; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 152: -select max(unique1) from tenk1; - max ------- - 9999 -(1 row) - ---Testcase 153: -explain (costs off) - select max(unique1) from tenk1 where unique1 < 42; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 154: -select max(unique1) from tenk1 where unique1 < 42; - max ------ - 41 -(1 row) - ---Testcase 155: -explain (costs off) - select max(unique1) from tenk1 where unique1 > 42; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 156: -select max(unique1) from tenk1 where unique1 > 42; - max ------- - 9999 -(1 row) - --- the planner may choose a generic aggregate here if parallel query is --- enabled, since that plan will be parallel safe and the "optimized" --- plan, which has almost identical cost, will not be. we want to test --- the optimized plan, so temporarily disable parallel query. -begin; ---Testcase 157: -set local max_parallel_workers_per_gather = 0; ---Testcase 158: -explain (costs off) - select max(unique1) from tenk1 where unique1 > 42000; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 159: -select max(unique1) from tenk1 where unique1 > 42000; - max ------ -(0 rows) - -rollback; --- multi-column index (uses tenk1_thous_tenthous) ---Testcase 160: -explain (costs off) - select max(tenthous) from tenk1 where thousand = 33; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 161: -select max(tenthous) from tenk1 where thousand = 33; - max ------- - 9033 -(1 row) - ---Testcase 162: -explain (costs off) - select min(tenthous) from tenk1 where thousand = 33; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 163: -select min(tenthous) from tenk1 where thousand = 33; - min ------ - 33 -(1 row) - --- check parameter propagation into an indexscan subquery ---Testcase 164: -explain (costs off) - select f1, (select min(unique1) from tenk1 where unique1 > f1) AS gt - from int4_tbl; - QUERY PLAN --------------------------- - Foreign Scan on int4_tbl - SubPlan 1 - -> Foreign Scan -(3 rows) - ---Testcase 165: -select f1, (select min(unique1) from tenk1 where unique1 > f1) AS gt - from int4_tbl; - f1 | gt --------------+---- - 0 | 1 - 123456 | - -123456 | 0 - 2147483647 | - -2147483647 | 0 -(5 rows) - --- check some cases that were handled incorrectly in 8.3.0 ---Testcase 166: -explain (costs off) - select distinct max(unique2) from tenk1; - QUERY PLAN ----------------------------------- - Unique - -> Sort - Sort Key: (max(unique2)) - -> Foreign Scan -(4 rows) - ---Testcase 167: -select distinct max(unique2) from tenk1; - max ------- - 9999 -(1 row) - ---Testcase 168: -explain (costs off) - select max(unique2) from tenk1 order by 1; - QUERY PLAN ----------------------------- - Sort - Sort Key: (max(unique2)) - -> Foreign Scan -(3 rows) - ---Testcase 169: -select max(unique2) from tenk1 order by 1; - max ------- - 9999 -(1 row) - ---Testcase 170: -explain (costs off) - select max(unique2) from tenk1 order by max(unique2); - QUERY PLAN ----------------------------- - Sort - Sort Key: (max(unique2)) - -> Foreign Scan -(3 rows) - ---Testcase 171: -select max(unique2) from tenk1 order by max(unique2); - max ------- - 9999 -(1 row) - ---Testcase 172: -explain (costs off) - select max(unique2) from tenk1 order by max(unique2)+1; - QUERY PLAN ----------------------------------- - Sort - Sort Key: ((max(unique2) + 1)) - -> Foreign Scan -(3 rows) - ---Testcase 173: -select max(unique2) from tenk1 order by max(unique2)+1; - max ------- - 9999 -(1 row) - ---Testcase 174: -explain (costs off) - select max(unique2), generate_series(1,3) as g from tenk1 order by g desc; - QUERY PLAN ------------------------------------------- - Sort - Sort Key: (generate_series(1, 3)) DESC - -> ProjectSet - -> Foreign Scan -(4 rows) - ---Testcase 175: -select max(unique2), generate_series(1,3) as g from tenk1 order by g desc; - max | g -------+--- - 9999 | 3 - 9999 | 2 - 9999 | 1 -(3 rows) - --- interesting corner case: constant gets optimized into a seqscan ---Testcase 176: -explain (costs off) - select max(100) from tenk1; - QUERY PLAN ----------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Result - One-Time Filter: (100 IS NOT NULL) - -> Foreign Scan on tenk1 -(6 rows) - ---Testcase 177: -select max(100) from tenk1; - max ------ - 100 -(1 row) - --- try it on an inheritance tree ---Testcase 178: -create foreign table minmaxtest(f1 int) server influxdb_svr;; ---Testcase 179: -create table minmaxtest1() inherits (minmaxtest); ---Testcase 180: -create table minmaxtest2() inherits (minmaxtest); ---Testcase 181: -create table minmaxtest3() inherits (minmaxtest); ---create index minmaxtesti on minmaxtest(f1); ---Testcase 182: -create index minmaxtest1i on minmaxtest1(f1); ---Testcase 183: -create index minmaxtest2i on minmaxtest2(f1 desc); ---Testcase 184: -create index minmaxtest3i on minmaxtest3(f1) where f1 is not null; ---Testcase 185: -insert into minmaxtest values(11), (12); ---Testcase 186: -insert into minmaxtest1 values(13), (14); ---Testcase 187: -insert into minmaxtest2 values(15), (16); ---Testcase 188: -insert into minmaxtest3 values(17), (18); ---Testcase 189: -explain (costs off) - select min(f1), max(f1) from minmaxtest; - QUERY PLAN ----------------------------------------- - Aggregate - -> Append - -> Foreign Scan on minmaxtest - -> Seq Scan on minmaxtest1 - -> Seq Scan on minmaxtest2 - -> Seq Scan on minmaxtest3 -(6 rows) - ---Testcase 190: -select min(f1), max(f1) from minmaxtest; - min | max ------+----- - 11 | 18 -(1 row) - --- DISTINCT doesn't do anything useful here, but it shouldn't fail ---Testcase 191: -explain (costs off) - select distinct min(f1), max(f1) from minmaxtest; - QUERY PLAN --------------------------------------------------------------- - Unique - -> Sort - Sort Key: (min(minmaxtest.f1)), (max(minmaxtest.f1)) - -> Aggregate - -> Append - -> Foreign Scan on minmaxtest - -> Seq Scan on minmaxtest1 - -> Seq Scan on minmaxtest2 - -> Seq Scan on minmaxtest3 -(9 rows) - ---Testcase 192: -select distinct min(f1), max(f1) from minmaxtest; - min | max ------+----- - 11 | 18 -(1 row) - ---Testcase 193: -drop foreign table minmaxtest cascade; -NOTICE: drop cascades to 3 other objects -DETAIL: drop cascades to table minmaxtest1 -drop cascades to table minmaxtest2 -drop cascades to table minmaxtest3 --- check for correct detection of nested-aggregate errors ---Testcase 194: -select max(min(unique1)) from tenk1; -ERROR: aggregate function calls cannot be nested -LINE 1: select max(min(unique1)) from tenk1; - ^ ---Testcase 195: -select (select max(min(unique1)) from int8_tbl) from tenk1; -ERROR: aggregate function calls cannot be nested -LINE 1: select (select max(min(unique1)) from int8_tbl) from tenk1; - ^ --- --- Test removal of redundant GROUP BY columns --- ---Testcase 196: -create foreign table agg_t1 (a int, b int, c int, d int) server influxdb_svr; ---Testcase 197: -create foreign table agg_t2 (x int, y int, z int) server influxdb_svr; ---Testcase 198: -create foreign table agg_t3 (a int, b int, c int) server influxdb_svr; --- Non-primary-key columns can be removed from GROUP BY ---Testcase 199: -explain (costs off) select * from agg_t1 group by a,b,c,d; - QUERY PLAN ------------------------------- - HashAggregate - Group Key: a, b, c, d - -> Foreign Scan on agg_t1 -(3 rows) - --- No removal can happen if the complete PK is not present in GROUP BY ---Testcase 200: -explain (costs off) select a,c from agg_t1 group by a,c,d; - QUERY PLAN ------------------------------- - HashAggregate - Group Key: a, c, d - -> Foreign Scan on agg_t1 -(3 rows) - --- Test removal across multiple relations ---Testcase 201: -explain (costs off) select * -from agg_t1 inner join agg_t2 on agg_t1.a = agg_t2.x and agg_t1.b = agg_t2.y -group by agg_t1.a,agg_t1.b,agg_t1.c,agg_t1.d,agg_t2.x,agg_t2.y,agg_t2.z; - QUERY PLAN ------------------------------------------------------------------------------------ - Group - Group Key: agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d, agg_t2.x, agg_t2.y, agg_t2.z - -> Sort - Sort Key: agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d, agg_t2.z - -> Merge Join - Merge Cond: ((agg_t1.a = agg_t2.x) AND (agg_t1.b = agg_t2.y)) - -> Sort - Sort Key: agg_t1.a, agg_t1.b - -> Foreign Scan on agg_t1 - -> Sort - Sort Key: agg_t2.x, agg_t2.y - -> Foreign Scan on agg_t2 -(12 rows) - --- Test case where agg_t1 can be optimized but not agg_t2 ---Testcase 202: -explain (costs off) select agg_t1.*,agg_t2.x,agg_t2.z -from agg_t1 inner join agg_t2 on agg_t1.a = agg_t2.x and agg_t1.b = agg_t2.y -group by agg_t1.a,agg_t1.b,agg_t1.c,agg_t1.d,agg_t2.x,agg_t2.z; - QUERY PLAN ------------------------------------------------------------------------------ - Group - Group Key: agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d, agg_t2.x, agg_t2.z - -> Sort - Sort Key: agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d, agg_t2.z - -> Merge Join - Merge Cond: ((agg_t1.a = agg_t2.x) AND (agg_t1.b = agg_t2.y)) - -> Sort - Sort Key: agg_t1.a, agg_t1.b - -> Foreign Scan on agg_t1 - -> Sort - Sort Key: agg_t2.x, agg_t2.y - -> Foreign Scan on agg_t2 -(12 rows) - --- Cannot optimize when PK is deferrable ---Testcase 203: -explain (costs off) select * from agg_t3 group by a,b,c; - QUERY PLAN ------------------------------- - HashAggregate - Group Key: a, b, c - -> Foreign Scan on agg_t3 -(3 rows) - ---Testcase 204: -create temp table agg_t1c () inherits (agg_t1); --- Ensure we don't remove any columns when agg_t1 has a child table ---Testcase 205: -explain (costs off) select * from agg_t1 group by a,b,c,d; - QUERY PLAN ------------------------------------------------------ - HashAggregate - Group Key: agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d - -> Append - -> Foreign Scan on agg_t1 - -> Seq Scan on agg_t1c -(5 rows) - --- Okay to remove columns if we're only querying the parent. ---Testcase 206: -explain (costs off) select * from only agg_t1 group by a,b,c,d; - QUERY PLAN ------------------------------- - HashAggregate - Group Key: a, b, c, d - -> Foreign Scan on agg_t1 -(3 rows) - ---Testcase 207: -create temp table p_agg_t1 ( - a int, - b int, - c int, - d int, - primary key(a,b) -) partition by list(a); -ERROR: primary key constraints are not supported on partitioned tables -LINE 6: primary key(a,b) - ^ ---Testcase 208: -create temp table p_agg_t1_1 partition of p_agg_t1 for values in(1); -ERROR: relation "p_agg_t1" does not exist ---Testcase 209: -create temp table p_agg_t1_2 partition of p_agg_t1 for values in(2); -ERROR: relation "p_agg_t1" does not exist --- Ensure we can remove non-PK columns for partitioned tables. ---Testcase 210: -explain (costs off) select * from p_agg_t1 group by a,b,c,d; -ERROR: relation "p_agg_t1" does not exist -LINE 1: explain (costs off) select * from p_agg_t1 group by a,b,c,d; - ^ ---Testcase 211: -drop foreign table agg_t1 cascade; -NOTICE: drop cascades to table agg_t1c ---Testcase 212: -drop foreign table agg_t2 cascade; ---Testcase 213: -drop foreign table agg_t3 cascade; ---Testcase 214: -drop table p_agg_t1; -ERROR: table "p_agg_t1" does not exist --- --- Test GROUP BY matching of join columns that are type-coerced due to USING --- ---Testcase 215: -create foreign table agg_t1(f1 int, f2 bigint) server influxdb_svr; ---Testcase 216: -create foreign table agg_t2(f1 bigint, f22 bigint) server influxdb_svr; ---Testcase 217: -select f1 from agg_t1 left join agg_t2 using (f1) group by f1; - f1 ----- -(0 rows) - ---Testcase 218: -select f1 from agg_t1 left join agg_t2 using (f1) group by agg_t1.f1; - f1 ----- -(0 rows) - ---Testcase 219: -select agg_t1.f1 from agg_t1 left join agg_t2 using (f1) group by agg_t1.f1; - f1 ----- -(0 rows) - --- only this one should fail: ---Testcase 220: -select agg_t1.f1 from agg_t1 left join agg_t2 using (f1) group by f1; -ERROR: column "agg_t1.f1" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: select agg_t1.f1 from agg_t1 left join agg_t2 using (f1) gro... - ^ ---Testcase 221: -drop foreign table agg_t1 cascade; ---Testcase 222: -drop foreign table agg_t2 cascade; --- --- Test combinations of DISTINCT and/or ORDER BY --- -begin; ---Testcase 223: -select array_agg(q1 order by q2) - from INT8_TBL2; - array_agg ------------ - {3,4,2,1} -(1 row) - ---Testcase 224: -select array_agg(q1 order by q1) - from INT8_TBL2; - array_agg ------------ - {1,2,3,4} -(1 row) - ---Testcase 225: -select array_agg(q1 order by q1 desc) - from INT8_TBL2; - array_agg ------------ - {4,3,2,1} -(1 row) - ---Testcase 226: -select array_agg(q2 order by q1 desc) - from INT8_TBL2; - array_agg ------------ - {2,1,3,4} -(1 row) - ---Testcase 227: -select array_agg(distinct f1) - from INT4_TBL2; - array_agg ------------ - {1,2,3} -(1 row) - ---Testcase 228: -select array_agg(distinct f1 order by f1) - from INT4_TBL2; - array_agg ------------ - {1,2,3} -(1 row) - ---Testcase 229: -select array_agg(distinct f1 order by f1 desc) - from INT4_TBL2; - array_agg ------------ - {3,2,1} -(1 row) - ---Testcase 230: -select array_agg(distinct f1 order by f1 desc nulls last) - from INT4_TBL2; - array_agg ------------ - {3,2,1} -(1 row) - -rollback; --- multi-arg aggs, strict/nonstrict, distinct/order by ---Testcase 231: -create type aggtype as (a integer, b integer, c text); ---Testcase 232: -create function aggf_trans(aggtype[],integer,integer,text) returns aggtype[] -as 'select array_append($1,ROW($2,$3,$4)::aggtype)' -language sql strict immutable; ---Testcase 233: -create function aggfns_trans(aggtype[],integer,integer,text) returns aggtype[] -as 'select array_append($1,ROW($2,$3,$4)::aggtype)' -language sql immutable; ---Testcase 234: -create aggregate aggfstr(integer,integer,text) ( - sfunc = aggf_trans, stype = aggtype[], - initcond = '{}' -); ---Testcase 235: -create aggregate aggfns(integer,integer,text) ( - sfunc = aggfns_trans, stype = aggtype[], sspace = 10000, - initcond = '{}' -); -begin; ---Testcase 236: -select aggfstr(a,b,c) - from multi_arg_agg; - aggfstr ---------------------------------------- - {"(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 237: -select aggfns(a,b,c) - from multi_arg_agg; - aggfns ------------------------------------------------ - {"(1,3,foo)","(0,,)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 238: -select aggfstr(distinct a,b,c) - from multi_arg_agg, - generate_series(1,3) i; - aggfstr ---------------------------------------- - {"(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 239: -select aggfns(distinct a,b,c) - from multi_arg_agg, - generate_series(1,3) i; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 240: -select aggfstr(distinct a,b,c order by b) - from multi_arg_agg, - generate_series(1,3) i; - aggfstr ---------------------------------------- - {"(3,1,baz)","(2,2,bar)","(1,3,foo)"} -(1 row) - ---Testcase 241: -select aggfns(distinct a,b,c order by b) - from multi_arg_agg, - generate_series(1,3) i; - aggfns ------------------------------------------------ - {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} -(1 row) - --- test specific code paths ---Testcase 242: -select aggfns(distinct a,a,c order by c using ~<~,a) - from multi_arg_agg, - generate_series(1,2) i; - aggfns ------------------------------------------------- - {"(2,2,bar)","(3,3,baz)","(1,1,foo)","(0,0,)"} -(1 row) - ---Testcase 243: -select aggfns(distinct a,a,c order by c using ~<~) - from multi_arg_agg, - generate_series(1,2) i; - aggfns ------------------------------------------------- - {"(2,2,bar)","(3,3,baz)","(1,1,foo)","(0,0,)"} -(1 row) - ---Testcase 244: -select aggfns(distinct a,a,c order by a) - from multi_arg_agg, - generate_series(1,2) i; - aggfns ------------------------------------------------- - {"(0,0,)","(1,1,foo)","(2,2,bar)","(3,3,baz)"} -(1 row) - ---Testcase 245: -select aggfns(distinct a,b,c order by a,c using ~<~,b) - from multi_arg_agg, - generate_series(1,2) i; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - --- check node I/O via view creation and usage, also deparsing logic ---Testcase 246: -create view agg_view1 as - select aggfns(a,b,c) - from multi_arg_agg; ---Testcase 247: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(1,3,foo)","(0,,)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 248: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ------------------------------------------------------------------------------ - SELECT aggfns(multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c) AS aggfns+ - FROM multi_arg_agg; -(1 row) - ---Testcase 249: -create or replace view agg_view1 as - select aggfns(distinct a,b,c) - from multi_arg_agg, - generate_series(1,3) i; ---Testcase 250: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 251: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef --------------------------------------------------------------------------------------- - SELECT aggfns(DISTINCT multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c) AS aggfns+ - FROM multi_arg_agg, + - generate_series(1, 3) i(i); -(1 row) - ---Testcase 252: -create or replace view agg_view1 as - select aggfns(distinct a,b,c order by b) - from multi_arg_agg, - generate_series(1,3) i; ---Testcase 253: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} -(1 row) - ---Testcase 254: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------- - SELECT aggfns(DISTINCT multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c ORDER BY multi_arg_agg.b) AS aggfns+ - FROM multi_arg_agg, + - generate_series(1, 3) i(i); -(1 row) - ---Testcase 255: -create or replace view agg_view1 as - select aggfns(a,b,c order by b+1) - from multi_arg_agg; ---Testcase 256: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} -(1 row) - ---Testcase 257: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ------------------------------------------------------------------------------------------------------------- - SELECT aggfns(multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c ORDER BY (multi_arg_agg.b + 1)) AS aggfns+ - FROM multi_arg_agg; -(1 row) - ---Testcase 258: -create or replace view agg_view1 as - select aggfns(a,a,c order by b) - from multi_arg_agg; ---Testcase 259: -select * from agg_view1; - aggfns ------------------------------------------------- - {"(3,3,baz)","(2,2,bar)","(1,1,foo)","(0,0,)"} -(1 row) - ---Testcase 260: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ------------------------------------------------------------------------------------------------------- - SELECT aggfns(multi_arg_agg.a, multi_arg_agg.a, multi_arg_agg.c ORDER BY multi_arg_agg.b) AS aggfns+ - FROM multi_arg_agg; -(1 row) - ---Testcase 261: -create or replace view agg_view1 as - select aggfns(a,b,c order by c using ~<~) - from multi_arg_agg; ---Testcase 262: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(2,2,bar)","(3,1,baz)","(1,3,foo)","(0,,)"} -(1 row) - ---Testcase 263: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c ORDER BY multi_arg_agg.c USING ~<~ NULLS LAST) AS aggfns+ - FROM multi_arg_agg; -(1 row) - ---Testcase 264: -create or replace view agg_view1 as - select aggfns(distinct a,b,c order by a,c using ~<~,b) - from multi_arg_agg, - generate_series(1,2) i; ---Testcase 265: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 266: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(DISTINCT multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c ORDER BY multi_arg_agg.a, multi_arg_agg.c USING ~<~ NULLS LAST, multi_arg_agg.b) AS aggfns+ - FROM multi_arg_agg, + - generate_series(1, 2) i(i); -(1 row) - ---Testcase 267: -drop view agg_view1; -rollback; --- incorrect DISTINCT usage errors ---Testcase 268: -select aggfns(distinct a,b,c order by i) - from multi_arg_agg2, generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select aggfns(distinct a,b,c order by i) - ^ ---Testcase 269: -select aggfns(distinct a,b,c order by a,b+1) - from multi_arg_agg2, generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select aggfns(distinct a,b,c order by a,b+1) - ^ ---Testcase 270: -select aggfns(distinct a,b,c order by a,b,i,c) - from multi_arg_agg2, generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select aggfns(distinct a,b,c order by a,b,i,c) - ^ ---Testcase 271: -select aggfns(distinct a,a,c order by a,b) - from multi_arg_agg2, generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select aggfns(distinct a,a,c order by a,b) - ^ --- string_agg tests ---Testcase 272: -create foreign table string_agg1(a1 text, a2 text) server influxdb_svr; ---Testcase 273: -create foreign table string_agg2(a1 text, a2 text) server influxdb_svr; ---Testcase 274: -create foreign table string_agg3(a1 text, a2 text) server influxdb_svr; ---Testcase 275: -create foreign table string_agg4(a1 text, a2 text) server influxdb_svr; ---Testcase 276: -select string_agg(a1,',') from string_agg1; - string_agg ----------------- - aaaa,bbbb,cccc -(1 row) - ---Testcase 277: -select string_agg(a1,',') from string_agg2; - string_agg ----------------- - aaaa,bbbb,cccc -(1 row) - ---Testcase 278: -select string_agg(a1,'AB') from string_agg3; - string_agg ------------- - bbbbABcccc -(1 row) - ---Testcase 279: -select string_agg(a1,',') from string_agg4; - string_agg ------------- - -(1 row) - --- check some implicit casting cases, as per bug #5564 ---Testcase 280: -select string_agg(distinct f1, ',' order by f1) from varchar_tbl; -- ok - string_agg ------------- - a,ab,abcd -(1 row) - ---Testcase 281: -select string_agg(distinct f1::text, ',' order by f1) from varchar_tbl; -- not ok -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select string_agg(distinct f1::text, ',' order by f1) from v... - ^ ---Testcase 282: -select string_agg(distinct f1, ',' order by f1::text) from varchar_tbl; -- not ok -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select string_agg(distinct f1, ',' order by f1::text) from v... - ^ ---Testcase 283: -select string_agg(distinct f1::text, ',' order by f1::text) from varchar_tbl; -- ok - string_agg ------------- - a,ab,abcd -(1 row) - --- InfluxDB does not support binary data --- string_agg bytea tests -/* -create table bytea_test_table(v bytea); - -select string_agg(v, '') from bytea_test_table; - -insert into bytea_test_table values(decode('ff','hex')); - -select string_agg(v, '') from bytea_test_table; - -insert into bytea_test_table values(decode('aa','hex')); - -select string_agg(v, '') from bytea_test_table; -select string_agg(v, NULL) from bytea_test_table; -select string_agg(v, decode('ee', 'hex')) from bytea_test_table; - -drop table bytea_test_table; -*/ --- FILTER tests ---Testcase 284: -select min(unique1) filter (where unique1 > 100) from tenk1; - min ------ - 101 -(1 row) - ---Testcase 285: -select sum(1/ten) filter (where ten > 0) from tenk1; - sum ------- - 1000 -(1 row) - ---Testcase 286: -select ten, sum(distinct four) filter (where four::text ~ '123') from onek a -group by ten; - ten | sum ------+----- - 0 | - 1 | - 2 | - 3 | - 4 | - 5 | - 6 | - 7 | - 8 | - 9 | -(10 rows) - ---Testcase 287: -select ten, sum(distinct four) filter (where four > 10) from onek a -group by ten -having exists (select 1 from onek b where sum(distinct a.four) = b.four); - ten | sum ------+----- - 0 | - 2 | - 4 | - 6 | - 8 | -(5 rows) - ---Testcase 288: -select max(foo COLLATE "C") filter (where (bar collate "POSIX") > '0') -from (values ('a', 'b')) AS v(foo,bar); - max ------ - a -(1 row) - --- outer reference in FILTER (PostgreSQL extension) ---Testcase 289: -select (select count(*) - from (values (1)) t0(inner_c)) -from (values (2),(3)) t1(outer_c); -- inner query is aggregation query - count -------- - 1 - 1 -(2 rows) - ---Testcase 290: -select (select count(*) filter (where outer_c <> 0) - from (values (1)) t0(inner_c)) -from (values (2),(3)) t1(outer_c); -- outer query is aggregation query - count -------- - 2 -(1 row) - ---Testcase 291: -select (select count(inner_c) filter (where outer_c <> 0) - from (values (1)) t0(inner_c)) -from (values (2),(3)) t1(outer_c); -- inner query is aggregation query - count -------- - 1 - 1 -(2 rows) - ---Testcase 292: -select - (select max((select i.unique2 from tenk1 i where i.unique1 = o.unique1)) - filter (where o.unique1 < 10)) -from tenk1 o; -- outer query is aggregation query - max ------- - 9998 -(1 row) - --- subquery in FILTER clause (PostgreSQL extension) ---Testcase 293: -select sum(unique1) FILTER (WHERE - unique1 IN (SELECT unique1 FROM onek where unique1 < 100)) FROM tenk1; - sum ------- - 4950 -(1 row) - --- exercise lots of aggregate parts with FILTER -begin; ---Testcase 294: -select aggfns(distinct a,b,c order by a,c using ~<~,b) filter (where a > 1) - from multi_arg_agg3, - generate_series(1,2) i; - aggfns ---------------------------- - {"(2,2,bar)","(3,1,baz)"} -(1 row) - -rollback; --- ordered-set aggregates -begin; ---Testcase 295: -select f1, percentile_cont(f1) within group (order by x::float8) -from generate_series(1,5) x, - FLOAT8_TBL -group by f1 order by f1; - f1 | percentile_cont -------+----------------- - 0 | 1 - 0.1 | 1.4 - 0.25 | 2 - 0.4 | 2.6 - 0.5 | 3 - 0.6 | 3.4 - 0.75 | 4 - 0.9 | 4.6 - 1 | 5 -(9 rows) - -rollback; -begin; ---Testcase 296: -select f1, percentile_cont(f1 order by f1) within group (order by x) -- error -from generate_series(1,5) x, - FLOAT8_TBL -group by f1 order by f1; -ERROR: cannot use multiple ORDER BY clauses with WITHIN GROUP -LINE 1: select f1, percentile_cont(f1 order by f1) within group (ord... - ^ -rollback; -begin; ---Testcase 297: -select f1, sum() within group (order by x::float8) -- error -from generate_series(1,5) x, - FLOAT8_TBL -group by f1 order by f1; -ERROR: sum is not an ordered-set aggregate, so it cannot have WITHIN GROUP -LINE 1: select f1, sum() within group (order by x::float8) - ^ -rollback; -begin; ---Testcase 298: -select f1, percentile_cont(f1,f1) -- error -from generate_series(1,5) x, - FLOAT8_TBL -group by f1 order by f1; -ERROR: WITHIN GROUP is required for ordered-set aggregate percentile_cont -LINE 1: select f1, percentile_cont(f1,f1) - ^ -rollback; ---Testcase 299: -select percentile_cont(0.5) within group (order by b) from aggtest; - percentile_cont ------------------- - 53.4485001564026 -(1 row) - ---Testcase 300: -select percentile_cont(0.5) within group (order by b), sum(b) from aggtest; - percentile_cont | sum -------------------+--------- - 53.4485001564026 | 431.773 -(1 row) - ---Testcase 301: -select percentile_cont(0.5) within group (order by thousand) from tenk1; - percentile_cont ------------------ - 499.5 -(1 row) - ---Testcase 302: -select percentile_disc(0.5) within group (order by thousand) from tenk1; - percentile_disc ------------------ - 499 -(1 row) - -begin; ---Testcase 303: -select rank(3) within group (order by f1) from INT4_TBL3; - rank ------- - 5 -(1 row) - ---Testcase 304: -select cume_dist(3) within group (order by f1) from INT4_TBL3; - cume_dist ------------ - 0.875 -(1 row) - ---Testcase 305: -select percent_rank(3) within group (order by f1) from INT4_TBL4; - percent_rank --------------- - 0.5 -(1 row) - ---Testcase 306: -select dense_rank(3) within group (order by f1) from INT4_TBL3; - dense_rank ------------- - 3 -(1 row) - -rollback; ---Testcase 307: -select percentile_disc(array[0,0.1,0.25,0.5,0.75,0.9,1]) within group (order by thousand) -from tenk1; - percentile_disc ----------------------------- - {0,99,249,499,749,899,999} -(1 row) - ---Testcase 308: -select percentile_cont(array[0,0.25,0.5,0.75,1]) within group (order by thousand) -from tenk1; - percentile_cont ------------------------------ - {0,249.75,499.5,749.25,999} -(1 row) - ---Testcase 309: -select percentile_disc(array[[null,1,0.5],[0.75,0.25,null]]) within group (order by thousand) -from tenk1; - percentile_disc ---------------------------------- - {{NULL,999,499},{749,249,NULL}} -(1 row) - ---Testcase 310: -create foreign table generate_series2 (a int) server influxdb_svr; ---Testcase 311: -select percentile_cont(array[0,1,0.25,0.75,0.5,1,0.3,0.32,0.35,0.38,0.4]) within group (order by a) -from generate_series2; - percentile_cont ------------------------------------------- - {1,6,2.25,4.75,3.5,6,2.5,2.6,2.75,2.9,3} -(1 row) - ---Testcase 312: -select ten, mode() within group (order by string4) from tenk1 group by ten; - ten | mode ------+-------- - 0 | HHHHxx - 1 | OOOOxx - 2 | VVVVxx - 3 | OOOOxx - 4 | HHHHxx - 5 | HHHHxx - 6 | OOOOxx - 7 | AAAAxx - 8 | VVVVxx - 9 | VVVVxx -(10 rows) - ---Testcase 313: -create foreign table percentile_disc1(x text) server influxdb_svr; ---Testcase 314: -select percentile_disc(array[0.25,0.5,0.75]) within group (order by unnest) -from (select unnest(x::text[]) from percentile_disc1) y; - percentile_disc ------------------ - {fred,jill,jim} -(1 row) - --- check collation propagates up in suitable cases: ---Testcase 315: -create foreign table pg_collation1 (x text) server influxdb_svr; ---Testcase 316: -select pg_collation_for(percentile_disc(1) within group (order by x collate "POSIX")) - from pg_collation1; - pg_collation_for ------------------- - "POSIX" -(1 row) - --- test ordered-set aggs using built-in support functions ---Testcase 317: -create aggregate test_percentile_disc(float8 ORDER BY anyelement) ( - stype = internal, - sfunc = ordered_set_transition, - finalfunc = percentile_disc_final, - finalfunc_extra = true, - finalfunc_modify = read_write -); -WARNING: aggregate attribute "finalfunc_modify" not recognized ---Testcase 318: -create aggregate test_rank(VARIADIC "any" ORDER BY VARIADIC "any") ( - stype = internal, - sfunc = ordered_set_transition_multi, - finalfunc = rank_final, - finalfunc_extra = true, - hypothetical -); --- ordered-set aggs created with CREATE AGGREGATE ---Testcase 319: -create foreign table test_rank1 (x int) server influxdb_svr; ---Testcase 320: -select test_rank(3) within group (order by x) from test_rank1; - test_rank ------------ - 5 -(1 row) - ---Testcase 321: -select test_percentile_disc(0.5) within group (order by thousand) from tenk1; - test_percentile_disc ----------------------- - 499 -(1 row) - --- ordered-set aggs can't use ungrouped vars in direct args: ---Testcase 322: -create foreign table generate_series3 (x int) server influxdb_svr; ---Testcase 323: -select rank(x) within group (order by x) from generate_series3 x; -ERROR: column "x.x" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: select rank(x) within group (order by x) from generate_serie... - ^ -DETAIL: Direct arguments of an ordered-set aggregate must use only grouped columns. --- outer-level agg can't use a grouped arg of a lower level, either: ---Testcase 324: -select array(select percentile_disc(a) within group (order by x) - from (values (0.3),(0.7)) v(a) group by a) - from generate_series3; -ERROR: outer-level aggregate cannot contain a lower-level variable in its direct arguments -LINE 1: select array(select percentile_disc(a) within group (order b... - ^ --- agg in the direct args is a grouping violation, too: ---Testcase 325: -select rank(sum(x)) within group (order by x) from generate_series3 x; -ERROR: aggregate function calls cannot be nested -LINE 1: select rank(sum(x)) within group (order by x) from generate_... - ^ --- hypothetical-set type unification and argument-count failures: ---Testcase 326: -select rank(3) within group (order by x) from pg_collation1; -ERROR: WITHIN GROUP types text and integer cannot be matched -LINE 1: select rank(3) within group (order by x) from pg_collation1; - ^ ---Testcase 327: -select rank(3) within group (order by stringu1,stringu2) from tenk1; -ERROR: function rank(integer, name, name) does not exist -LINE 1: select rank(3) within group (order by stringu1,stringu2) fro... - ^ -HINT: To use the hypothetical-set aggregate rank, the number of hypothetical direct arguments (here 1) must match the number of ordering columns (here 2). ---Testcase 328: -select rank('fred') within group (order by x) from generate_series3 x; -ERROR: invalid input syntax for integer: "fred" -LINE 1: select rank('fred') within group (order by x) from generate_... - ^ ---Testcase 329: -select rank('adam'::text collate "C") within group (order by x collate "POSIX") - from pg_collation1; -ERROR: collation mismatch between explicit collations "C" and "POSIX" -LINE 1: ...adam'::text collate "C") within group (order by x collate "P... - ^ --- hypothetical-set type unification successes: ---Testcase 330: -select rank('adam'::varchar) within group (order by x) from pg_collation1; - rank ------- - 1 -(1 row) - ---Testcase 331: -select rank('3') within group (order by x) from generate_series3 x; - rank ------- - 3 -(1 row) - --- divide by zero check ---Testcase 332: -select percent_rank(0) within group (order by x) from generate_series(1,0) x; - percent_rank --------------- - 0 -(1 row) - --- deparse and multiple features: ---Testcase 333: -create view aggordview1 as -select ten, - percentile_disc(0.5) within group (order by thousand) as p50, - percentile_disc(0.5) within group (order by thousand) filter (where hundred=1) as px, - rank(5,'AZZZZ',50) within group (order by hundred, string4 desc, hundred) - from tenk1 - group by ten order by ten; ---Testcase 334: -select pg_get_viewdef('aggordview1'); - pg_get_viewdef -------------------------------------------------------------------------------------------------------------------------------- - SELECT tenk1.ten, + - percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY tenk1.thousand) AS p50, + - percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY tenk1.thousand) FILTER (WHERE (tenk1.hundred = 1)) AS px,+ - rank(5, 'AZZZZ'::name, 50) WITHIN GROUP (ORDER BY tenk1.hundred, tenk1.string4 DESC, tenk1.hundred) AS rank + - FROM tenk1 + - GROUP BY tenk1.ten + - ORDER BY tenk1.ten; -(1 row) - ---Testcase 335: -select * from aggordview1 order by ten; - ten | p50 | px | rank ------+-----+-----+------ - 0 | 490 | | 101 - 1 | 491 | 401 | 101 - 2 | 492 | | 101 - 3 | 493 | | 101 - 4 | 494 | | 101 - 5 | 495 | | 67 - 6 | 496 | | 1 - 7 | 497 | | 1 - 8 | 498 | | 1 - 9 | 499 | | 1 -(10 rows) - ---Testcase 336: -drop view aggordview1; --- User defined function for user defined aggregate, VARIADIC ---Testcase 337: -create function least_accum(anyelement, variadic anyarray) -returns anyelement language sql as - 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; ---Testcase 338: -create aggregate least_agg(variadic items anyarray) ( - stype = anyelement, sfunc = least_accum -); ---Testcase 339: -create function cleast_accum(anycompatible, variadic anycompatiblearray) -returns anycompatible language sql as - 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; -ERROR: type anycompatible does not exist ---Testcase 340: -create aggregate cleast_agg(variadic items anycompatiblearray) ( - stype = anycompatible, sfunc = cleast_accum -); -ERROR: type anycompatiblearray does not exist --- variadic aggregates ---Testcase 341: -select least_agg(q1,q2) from int8_tbl; - least_agg -------------------- - -4567890123456789 -(1 row) - ---Testcase 342: -select least_agg(variadic array[q1,q2]) from int8_tbl; - least_agg -------------------- - -4567890123456789 -(1 row) - ---Testcase 343: -select cleast_agg(q1,q2) from int8_tbl; -ERROR: function cleast_agg(bigint, bigint) does not exist -LINE 1: select cleast_agg(q1,q2) from int8_tbl; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 344: -select cleast_agg(4.5,f1) from int4_tbl; -ERROR: function cleast_agg(numeric, integer) does not exist -LINE 1: select cleast_agg(4.5,f1) from int4_tbl; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 345: -select cleast_agg(variadic array[4.5,f1]) from int4_tbl; -ERROR: function cleast_agg(numeric[]) does not exist -LINE 1: select cleast_agg(variadic array[4.5,f1]) from int4_tbl; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 346: -select pg_typeof(cleast_agg(variadic array[4.5,f1])) from int4_tbl; -ERROR: function cleast_agg(numeric[]) does not exist -LINE 1: select pg_typeof(cleast_agg(variadic array[4.5,f1])) from in... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 347: -drop aggregate least_agg(variadic items anyarray); ---Testcase 348: -drop function least_accum(anyelement, variadic anyarray); --- test aggregates with common transition functions share the same states -begin work; ---Testcase 349: -create type avg_state as (total bigint, count bigint); ---Testcase 350: -create or replace function avg_transfn(state avg_state, n int) returns avg_state as -$$ -declare new_state avg_state; -begin - raise notice 'avg_transfn called with %', n; - if state is null then - if n is not null then - new_state.total := n; - new_state.count := 1; - return new_state; - end if; - return null; - elsif n is not null then - state.total := state.total + n; - state.count := state.count + 1; - return state; - end if; - - return null; -end -$$ language plpgsql; ---Testcase 351: -create function avg_finalfn(state avg_state) returns int4 as -$$ -begin - if state is null then - return NULL; - else - return state.total / state.count; - end if; -end -$$ language plpgsql; ---Testcase 352: -create function sum_finalfn(state avg_state) returns int4 as -$$ -begin - if state is null then - return NULL; - else - return state.total; - end if; -end -$$ language plpgsql; ---Testcase 353: -create aggregate my_avg(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = avg_finalfn -); ---Testcase 354: -create aggregate my_sum(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = sum_finalfn -); --- aggregate state should be shared as aggs are the same. ---Testcase 355: -create foreign table my_avg1 (one int) server influxdb_svr; ---Testcase 356: -select my_avg(one),my_avg(one) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_avg ---------+-------- - 2 | 2 -(1 row) - --- aggregate state should be shared as transfn is the same for both aggs. ---Testcase 357: -select my_avg(one),my_sum(one) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 4 -(1 row) - --- same as previous one, but with DISTINCT, which requires sorting the input. ---Testcase 358: -select my_avg(distinct one),my_sum(distinct one) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 4 -(1 row) - --- shouldn't share states due to the distinctness not matching. ---Testcase 359: -select my_avg(distinct one),my_sum(one) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 4 -(1 row) - --- shouldn't share states due to the filter clause not matching. ---Testcase 360: -select my_avg(one) filter (where one > 1),my_sum(one) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 3 | 4 -(1 row) - --- this should not share the state due to different input columns. ---Testcase 361: -create foreign table my_avg2(one int, two int) server influxdb_svr; ---Testcase 362: -select my_avg(one),my_sum(two) from my_avg2; -NOTICE: avg_transfn called with 2 -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 4 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 6 -(1 row) - --- exercise cases where OSAs share state ---Testcase 363: -create foreign table percentile_cont1( a int) server influxdb_svr; ---Testcase 364: -select - percentile_cont(0.5) within group (order by a), - percentile_disc(0.5) within group (order by a) -from percentile_cont1; - percentile_cont | percentile_disc ------------------+----------------- - 4 | 3 -(1 row) - ---Testcase 365: -select - percentile_cont(0.25) within group (order by a), - percentile_disc(0.5) within group (order by a) -from percentile_cont1; - percentile_cont | percentile_disc ------------------+----------------- - 2.5 | 3 -(1 row) - --- these can't share state currently ---Testcase 366: -select - rank(4) within group (order by a), - dense_rank(4) within group (order by a) -from percentile_cont1; - rank | dense_rank -------+------------ - 3 | 3 -(1 row) - --- test that aggs with the same sfunc and initcond share the same agg state ---Testcase 367: -create aggregate my_sum_init(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = sum_finalfn, - initcond = '(10,0)' -); ---Testcase 368: -create aggregate my_avg_init(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = avg_finalfn, - initcond = '(10,0)' -); ---Testcase 369: -create aggregate my_avg_init2(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = avg_finalfn, - initcond = '(4,0)' -); --- state should be shared if INITCONDs are matching ---Testcase 370: -select my_sum_init(one),my_avg_init(one) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_sum_init | my_avg_init --------------+------------- - 14 | 7 -(1 row) - --- Varying INITCONDs should cause the states not to be shared. ---Testcase 371: -select my_sum_init(one),my_avg_init2(one) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 -NOTICE: avg_transfn called with 3 - my_sum_init | my_avg_init2 --------------+-------------- - 14 | 4 -(1 row) - -rollback; --- test aggregate state sharing to ensure it works if one aggregate has a --- finalfn and the other one has none. -begin work; ---Testcase 372: -create or replace function sum_transfn(state int4, n int4) returns int4 as -$$ -declare new_state int4; -begin - raise notice 'sum_transfn called with %', n; - if state is null then - if n is not null then - new_state := n; - return new_state; - end if; - return null; - elsif n is not null then - state := state + n; - return state; - end if; - - return null; -end -$$ language plpgsql; ---Testcase 373: -create function halfsum_finalfn(state int4) returns int4 as -$$ -begin - if state is null then - return NULL; - else - return state / 2; - end if; -end -$$ language plpgsql; ---Testcase 374: -create aggregate my_sum(int4) -( - stype = int4, - sfunc = sum_transfn -); ---Testcase 375: -create aggregate my_half_sum(int4) -( - stype = int4, - sfunc = sum_transfn, - finalfunc = halfsum_finalfn -); --- Agg state should be shared even though my_sum has no finalfn ---Testcase 376: -create foreign table my_sum1(one int) server influxdb_svr; ---Testcase 377: -select my_sum(one),my_half_sum(one) from my_sum1; -NOTICE: sum_transfn called with 1 -NOTICE: sum_transfn called with 2 -NOTICE: sum_transfn called with 3 -NOTICE: sum_transfn called with 4 - my_sum | my_half_sum ---------+------------- - 10 | 5 -(1 row) - -rollback; --- test that the aggregate transition logic correctly handles --- transition / combine functions returning NULL --- First test the case of a normal transition function returning NULL -BEGIN; ---Testcase 378: -CREATE FUNCTION balkifnull(int8, int4) -RETURNS int8 -STRICT -LANGUAGE plpgsql AS $$ -BEGIN - IF $1 IS NULL THEN - RAISE 'erroneously called with NULL argument'; - END IF; - RETURN NULL; -END$$; ---Testcase 379: -CREATE AGGREGATE balk(int4) -( - SFUNC = balkifnull(int8, int4), - STYPE = int8, - PARALLEL = SAFE, - INITCOND = '0' -); ---Testcase 380: -SELECT balk(hundred) FROM tenk1; - balk ------- - -(1 row) - -ROLLBACK; --- Secondly test the case of a parallel aggregate combiner function --- returning NULL. For that use normal transition function, but a --- combiner function returning NULL. -BEGIN; ---Testcase 381: -CREATE FUNCTION balkifnull(int8, int8) -RETURNS int8 -PARALLEL SAFE -STRICT -LANGUAGE plpgsql AS $$ -BEGIN - IF $1 IS NULL THEN - RAISE 'erroneously called with NULL argument'; - END IF; - RETURN NULL; -END$$; ---Testcase 382: -CREATE AGGREGATE balk(int4) -( - SFUNC = int4_sum(int8, int4), - STYPE = int8, - COMBINEFUNC = balkifnull(int8, int8), - PARALLEL = SAFE, - INITCOND = '0' -); --- force use of parallelism --- ALTER TABLE tenk1 set (parallel_workers = 4); --- SET LOCAL parallel_setup_cost=0; --- SET LOCAL max_parallel_workers_per_gather=4; --- EXPLAIN (COSTS OFF) SELECT balk(hundred) FROM tenk1; --- SELECT balk(hundred) FROM tenk1; -ROLLBACK; --- test coverage for aggregate combine/serial/deserial functions -BEGIN; ---Testcase 383: -SET parallel_setup_cost = 0; ---Testcase 384: -SET parallel_tuple_cost = 0; ---Testcase 385: -SET min_parallel_table_scan_size = 0; ---Testcase 386: -SET max_parallel_workers_per_gather = 4; ---Testcase 387: -SET parallel_leader_participation = off; -ERROR: unrecognized configuration parameter "parallel_leader_participation" ---Testcase 388: -SET enable_indexonlyscan = off; -ERROR: current transaction is aborted, commands ignored until end of transaction block --- variance(int4) covers numeric_poly_combine --- sum(int8) covers int8_avg_combine --- regr_count(float8, float8) covers int8inc_float8_float8 and aggregates with > 1 arg ---Testcase 389: -EXPLAIN (COSTS OFF, VERBOSE) -SELECT variance(unique1::int4), sum(unique1::int8), regr_count(unique1::float8, unique1::float8) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 390: -SELECT variance(unique1::int4), sum(unique1::int8), regr_count(unique1::float8, unique1::float8) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; -ERROR: current transaction is aborted, commands ignored until end of transaction block --- variance(int8) covers numeric_combine --- avg(numeric) covers numeric_avg_combine ---Testcase 391: -EXPLAIN (COSTS OFF, VERBOSE) -SELECT variance(unique1::int8), avg(unique1::numeric) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 392: -SELECT variance(unique1::int8), avg(unique1::numeric) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; -ERROR: current transaction is aborted, commands ignored until end of transaction block -ROLLBACK; --- test coverage for dense_rank ---Testcase 393: -create foreign table dense_rank1 (x int) server influxdb_svr; ---Testcase 394: -SELECT dense_rank(x) WITHIN GROUP (ORDER BY x) FROM dense_rank1 GROUP BY (x) ORDER BY 1; - dense_rank ------------- - 1 - 1 - 1 -(3 rows) - --- Ensure that the STRICT checks for aggregates does not take NULLness --- of ORDER BY columns into account. See bug report around --- 2a505161-2727-2473-7c46-591ed108ac52@email.cz ---Testcase 395: -SELECT min(x ORDER BY y) FROM (VALUES(1, NULL)) AS d(x,y); - min ------ - 1 -(1 row) - ---Testcase 396: -SELECT min(x ORDER BY y) FROM (VALUES(1, 2)) AS d(x,y); - min ------ - 1 -(1 row) - --- check collation-sensitive matching between grouping expressions ---Testcase 397: -select v||'a', case v||'a' when 'aa' then 1 else 0 end, count(*) - from unnest(array['a','b']) u(v) - group by v||'a' order by 1; - ?column? | case | count -----------+------+------- - aa | 1 | 1 - ba | 0 | 1 -(2 rows) - ---Testcase 398: -select v||'a', case when v||'a' = 'aa' then 1 else 0 end, count(*) - from unnest(array['a','b']) u(v) - group by v||'a' order by 1; - ?column? | case | count -----------+------+------- - aa | 1 | 1 - ba | 0 | 1 -(2 rows) - --- Make sure that generation of HashAggregate for uniqification purposes --- does not lead to array overflow due to unexpected duplicate hash keys --- see CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com ---Testcase 399: -explain (costs off) - select 1 from tenk1 - where (hundred, thousand) in (select twothousand, twothousand from onek); - QUERY PLAN -------------------------------------------------------- - Hash Join - Hash Cond: (onek.twothousand = tenk1.hundred) - -> HashAggregate - Group Key: onek.twothousand, onek.twothousand - -> Foreign Scan on onek - -> Hash - -> Foreign Scan on tenk1 -(7 rows) - --- --- Hash Aggregation Spill tests --- ---Testcase 400: -set enable_sort=false; ---Testcase 401: -set work_mem='64kB'; ---Testcase 402: -select unique1, count(*), sum(twothousand) from tenk1 -group by unique1 -having sum(fivethous) > 4975 -order by sum(twothousand); - unique1 | count | sum ----------+-------+------ - 4976 | 1 | 976 - 4977 | 1 | 977 - 4978 | 1 | 978 - 4979 | 1 | 979 - 4980 | 1 | 980 - 4981 | 1 | 981 - 4982 | 1 | 982 - 4983 | 1 | 983 - 4984 | 1 | 984 - 4985 | 1 | 985 - 4986 | 1 | 986 - 4987 | 1 | 987 - 4988 | 1 | 988 - 4989 | 1 | 989 - 4990 | 1 | 990 - 4991 | 1 | 991 - 4992 | 1 | 992 - 4993 | 1 | 993 - 4994 | 1 | 994 - 4995 | 1 | 995 - 4996 | 1 | 996 - 4997 | 1 | 997 - 4998 | 1 | 998 - 4999 | 1 | 999 - 9976 | 1 | 1976 - 9977 | 1 | 1977 - 9978 | 1 | 1978 - 9979 | 1 | 1979 - 9980 | 1 | 1980 - 9981 | 1 | 1981 - 9982 | 1 | 1982 - 9983 | 1 | 1983 - 9984 | 1 | 1984 - 9985 | 1 | 1985 - 9986 | 1 | 1986 - 9987 | 1 | 1987 - 9988 | 1 | 1988 - 9989 | 1 | 1989 - 9990 | 1 | 1990 - 9991 | 1 | 1991 - 9992 | 1 | 1992 - 9993 | 1 | 1993 - 9994 | 1 | 1994 - 9995 | 1 | 1995 - 9996 | 1 | 1996 - 9997 | 1 | 1997 - 9998 | 1 | 1998 - 9999 | 1 | 1999 -(48 rows) - ---Testcase 403: -set work_mem to default; ---Testcase 404: -set enable_sort to default; --- --- Compare results between plans using sorting and plans using hash --- aggregation. Force spilling in both cases by setting work_mem low. --- ---Testcase 405: -set work_mem='64kB'; ---Testcase 406: -create foreign table agg_data_2k(g int) server influxdb_svr; ---Testcase 407: -create foreign table agg_data_20k(g int) server influxdb_svr; ---Testcase 408: -create foreign table agg_group_1(c1 int, c2 numeric, c3 int) server influxdb_svr; ---Testcase 409: -create foreign table agg_group_2(a int, c1 numeric, c2 text, c3 int) server influxdb_svr; ---Testcase 410: -create foreign table agg_group_3(c1 numeric, c2 int4, c3 int) server influxdb_svr; ---Testcase 411: -create foreign table agg_group_4(c1 numeric, c2 text, c3 int) server influxdb_svr; ---Testcase 412: -create foreign table agg_hash_1(c1 int, c2 numeric, c3 int) server influxdb_svr; ---Testcase 413: -create foreign table agg_hash_2(a int, c1 numeric, c2 text, c3 int) server influxdb_svr; ---Testcase 414: -create foreign table agg_hash_3(c1 numeric, c2 int4, c3 int) server influxdb_svr; ---Testcase 415: -create foreign table agg_hash_4(c1 numeric, c2 text, c3 int) server influxdb_svr; ---Testcase 416: -insert into agg_data_2k select g from generate_series(0, 1999) g; ---analyze agg_data_2k; ---Testcase 417: -insert into agg_data_20k select g from generate_series(0, 19999) g; ---analyze agg_data_20k; --- Produce results with sorting. ---Testcase 418: -set enable_hashagg = false; ---Testcase 419: -set jit_above_cost = 0; -ERROR: unrecognized configuration parameter "jit_above_cost" ---Testcase 420: -explain (costs off) -select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 - from agg_data_20k group by g%10000; - QUERY PLAN ------------------------------------------- - GroupAggregate - Group Key: ((g % 10000)) - -> Sort - Sort Key: ((g % 10000)) - -> Foreign Scan on agg_data_20k -(5 rows) - ---Testcase 421: -insert into agg_group_1 -select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 - from agg_data_20k group by g%10000; ---Testcase 422: -insert into agg_group_2 -select * from - (values (100), (300), (500)) as r(a), - lateral ( - select (g/2)::numeric as c1, - array_agg(g::numeric) as c2, - count(*) as c3 - from agg_data_2k - where g < r.a - group by g/2) as s; ---Testcase 423: -set jit_above_cost to default; -ERROR: unrecognized configuration parameter "jit_above_cost" ---Testcase 424: -insert into agg_group_3 -select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 - from agg_data_2k group by g/2; ---Testcase 425: -insert into agg_group_4 -select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 - from agg_data_2k group by g/2; --- Produce results with hash aggregation ---Testcase 426: -set enable_hashagg = true; ---Testcase 427: -set enable_sort = false; ---Testcase 428: -set jit_above_cost = 0; -ERROR: unrecognized configuration parameter "jit_above_cost" ---Testcase 429: -explain (costs off) -select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 - from agg_data_20k group by g%10000; - QUERY PLAN ------------------------------------- - HashAggregate - Group Key: (g % 10000) - -> Foreign Scan on agg_data_20k -(3 rows) - ---Testcase 430: -insert into agg_hash_1 -select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 - from agg_data_20k group by g%10000; ---Testcase 431: -insert into agg_hash_2 -select * from - (values (100), (300), (500)) as r(a), - lateral ( - select (g/2)::numeric as c1, - array_agg(g::numeric) as c2, - count(*) as c3 - from agg_data_2k - where g < r.a - group by g/2) as s; ---Testcase 432: -set jit_above_cost to default; -ERROR: unrecognized configuration parameter "jit_above_cost" ---Testcase 433: -insert into agg_hash_3 -select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 - from agg_data_2k group by g/2; ---Testcase 434: -insert into agg_hash_4 -select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 - from agg_data_2k group by g/2; ---Testcase 435: -set enable_sort = true; ---Testcase 436: -set work_mem to default; --- Compare group aggregation results to hash aggregation results ---Testcase 437: -(select * from agg_hash_1 except select * from agg_group_1) - union all -(select * from agg_group_1 except select * from agg_hash_1); - c1 | c2 | c3 -----+----+---- -(0 rows) - ---Testcase 438: -(select * from agg_hash_2 except select * from agg_group_2) - union all -(select * from agg_group_2 except select * from agg_hash_2); - a | c1 | c2 | c3 ----+----+----+---- -(0 rows) - ---Testcase 439: -(select * from agg_hash_3 except select * from agg_group_3) - union all -(select * from agg_group_3 except select * from agg_hash_3); - c1 | c2 | c3 -----+----+---- -(0 rows) - ---Testcase 440: -(select * from agg_hash_4 except select * from agg_group_4) - union all -(select * from agg_group_4 except select * from agg_hash_4); - c1 | c2 | c3 -----+----+---- -(0 rows) - ---Testcase 441: --- Clean up: -delete from agg_data_2k; -delete from agg_data_20k; -delete from agg_group_1; -delete from agg_group_2; -delete from agg_group_3; -delete from agg_group_4; -delete from agg_hash_1; -delete from agg_hash_2; -delete from agg_hash_3; -delete from agg_hash_4; -drop foreign table agg_data_2k; -drop foreign table agg_data_20k; -drop foreign table agg_group_1; ---Testcase 442: -drop foreign table agg_group_2; ---Testcase 443: -drop foreign table agg_group_3; ---Testcase 444: -drop foreign table agg_group_4; ---Testcase 445: -drop foreign table agg_hash_1; ---Testcase 446: -drop foreign table agg_hash_2; ---Testcase 447: -drop foreign table agg_hash_3; ---Testcase 448: -drop foreign table agg_hash_4; --- Clean up -DO $d$ -declare - l_rec record; -begin - for l_rec in (select foreign_table_schema, foreign_table_name - from information_schema.foreign_tables) loop - execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); - end loop; -end; -$d$; --- Clean up: -DROP AGGREGATE IF EXISTS newavg (int4); -DROP AGGREGATE IF EXISTS newsum (int4); -DROP AGGREGATE IF EXISTS newcnt (*); -DROP AGGREGATE IF EXISTS oldcnt (*); -DROP AGGREGATE IF EXISTS newcnt ("any"); -DROP AGGREGATE IF EXISTS sum2(int8,int8); -DROP FUNCTION IF EXISTS sum3(int8,int8,int8); -DROP AGGREGATE IF EXISTS aggfns(integer,integer,text); -DROP AGGREGATE IF EXISTS aggfstr(integer,integer,text); -DROP FUNCTION IF EXISTS aggfns_trans(aggtype[],integer,integer,text); -DROP FUNCTION IF EXISTS aggf_trans(aggtype[],integer,integer,text); -DROP TYPE IF EXISTS aggtype; -DROP AGGREGATE IF EXISTS test_percentile_disc(float8 ORDER BY anyelement); -DROP AGGREGATE IF EXISTS test_rank(VARIADIC "any" ORDER BY VARIADIC "any"); -DROP AGGREGATE IF EXISTS cleast_agg(variadic items anycompatiblearray); -NOTICE: type "anycompatiblearray" does not exist, skipping -DROP FUNCTION IF EXISTS cleast_accum(anycompatible, variadic anycompatiblearray); -NOTICE: type "anycompatible" does not exist, skipping ---Testcase 449: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 450: -DROP SERVER influxdb_svr CASCADE; ---Testcase 451: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/10.18/extra/influxdb_fdw_post.out b/expected/10.18/extra/influxdb_fdw_post.out deleted file mode 100644 index 78529c6..0000000 --- a/expected/10.18/extra/influxdb_fdw_post.out +++ /dev/null @@ -1,8913 +0,0 @@ --- =================================================================== --- create FDW objects --- =================================================================== -\set ECHO none ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; ---Testcase 3: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 4: -CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); ---Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- =================================================================== --- create objects used through FDW influxdb server --- =================================================================== ---Testcase 8: -CREATE TYPE user_enum AS ENUM ('foo', 'bar', 'buz'); ---Testcase 9: -CREATE SCHEMA "S 1"; ---Testcase 10: -CREATE FOREIGN TABLE "S 1"."T 0" ( - "C 1" int NOT NULL, - c2 int NOT NULL, - c3 text, - time timestamp, - c6 varchar(10), - c7 char(10), - c8 text -) SERVER influxdb_svr OPTIONS (table 'T0', tags 'c3'); ---Testcase 11: -CREATE FOREIGN TABLE "S 1"."T 1" ( - "C 1" int NOT NULL, - c2 int NOT NULL, - c3 text, - time timestamp, - c6 varchar(10), - c7 char(10), - c8 text -) SERVER influxdb_svr OPTIONS (table 'T1', tags 'c3'); ---Testcase 12: -CREATE FOREIGN TABLE "S 1"."T 2" ( - c1 int NOT NULL, - c2 text -) SERVER influxdb_svr OPTIONS (table 'T2', tags 'c2'); ---Testcase 13: -CREATE FOREIGN TABLE "S 1"."T 3" ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text -) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); ---Testcase 14: -CREATE FOREIGN TABLE "S 1"."T 4" ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text -) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3'); --- Disable autovacuum for these tables to avoid unexpected effects of that ---ALTER TABLE "S 1"."T 1" SET (autovacuum_enabled = 'false'); ---ALTER TABLE "S 1"."T 2" SET (autovacuum_enabled = 'false'); ---ALTER TABLE "S 1"."T 3" SET (autovacuum_enabled = 'false'); ---ALTER TABLE "S 1"."T 4" SET (autovacuum_enabled = 'false'); ---Testcase 15: -INSERT INTO "S 1"."T 1" - SELECT id, - id % 10, - to_char(id, 'FM00000'), - '1970-01-01'::timestamp + ((id % 100) || ' days')::interval, - id % 10, - id % 10, - 'foo'::text - FROM generate_series(1, 1000) id; ---Testcase 16: -INSERT INTO "S 1"."T 2" - SELECT id, - 'AAA' || to_char(id, 'FM000') - FROM generate_series(1, 100) id; ---Testcase 17: -INSERT INTO "S 1"."T 3" - SELECT id, - id + 1, - 'AAA' || to_char(id, 'FM000') - FROM generate_series(1, 100) id; ---Testcase 18: -DELETE FROM "S 1"."T 3" WHERE c1 % 2 != 0; -- delete for outer join tests ---Testcase 19: -INSERT INTO "S 1"."T 4" - SELECT id, - id + 1, - 'AAA' || to_char(id, 'FM000') - FROM generate_series(1, 100) id; ---Testcase 20: -DELETE FROM "S 1"."T 4" WHERE c1 % 3 != 0; -- delete for outer join tests ---ANALYZE "S 1"."T 1"; ---ANALYZE "S 1"."T 2"; ---ANALYZE "S 1"."T 3"; ---ANALYZE "S 1"."T 4"; --- =================================================================== --- create foreign tables --- =================================================================== ---Testcase 21: -CREATE FOREIGN TABLE ft1 ( - c0 int, - c1 int NOT NULL, - c2 int NOT NULL, - c3 text, - time timestamp, - c6 varchar(10), - c7 char(10) default 'ft1', - c8 text -) SERVER influxdb_svr; -ALTER FOREIGN TABLE ft1 DROP COLUMN c0; ---Testcase 22: -CREATE FOREIGN TABLE ft2 ( - c1 int NOT NULL, - c2 int NOT NULL, - cx int, - c3 text, - time timestamp, - c6 varchar(10), - c7 char(10) default 'ft2', - c8 text -) SERVER influxdb_svr; -ALTER FOREIGN TABLE ft2 DROP COLUMN cx; ---Testcase 23: -CREATE FOREIGN TABLE ft4 ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text -) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); ---Testcase 24: -CREATE FOREIGN TABLE ft5 ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text -) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3'); ---Testcase 25: -CREATE FOREIGN TABLE ft6 ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text -) SERVER influxdb_svr2 OPTIONS (table 'T4', tags 'c3'); --- =================================================================== --- tests for validator --- =================================================================== --- requiressl and some other parameters are omitted because --- valid values for them depend on configure options -ALTER SERVER testserver1 OPTIONS ( - -- use_remote_estimate 'false', - -- updatable 'true', - -- fdw_startup_cost '123.456', - -- fdw_tuple_cost '0.123', - -- service 'value', - -- connect_timeout 'value', - dbname 'value', - host 'value', - -- hostaddr 'value', - port 'value' - --client_encoding 'value', - -- application_name 'value', - --fallback_application_name 'value', - -- keepalives 'value', - -- keepalives_idle 'value', - -- keepalives_interval 'value', - -- tcp_user_timeout 'value', - -- requiressl 'value', - -- sslcompression 'value', - -- sslmode 'value', - -- sslcert 'value', - -- sslkey 'value', - -- sslrootcert 'value', - -- sslcrl 'value', - --requirepeer 'value', - -- krbsrvname 'value', - -- gsslib 'value', - --replication 'value' -); --- influxdb_fdw does not support option extensions --- Error, invalid list syntax ---ALTER SERVER testserver1 OPTIONS (ADD extensions 'foo; bar'); --- OK but gets a warning ---ALTER SERVER testserver1 OPTIONS (ADD extensions 'foo, bar'); ---ALTER SERVER testserver1 OPTIONS (DROP extensions); -ALTER USER MAPPING FOR public SERVER testserver1 - OPTIONS (DROP user, DROP password); --- Attempt to add a valid option that's not allowed in a user mapping ---ALTER USER MAPPING FOR public SERVER testserver1 --- OPTIONS (ADD sslmode 'require'); --- But we can add valid ones fine ---ALTER USER MAPPING FOR public SERVER testserver1 --- OPTIONS (ADD sslpassword 'dummy'); --- Ensure valid options we haven't used in a user mapping yet are --- permitted to check validation. ---ALTER USER MAPPING FOR public SERVER testserver1 --- OPTIONS (ADD sslkey 'value', ADD sslcert 'value'); -ALTER FOREIGN TABLE ft1 OPTIONS (table 'T1', tags 'c3'); -ALTER FOREIGN TABLE ft2 OPTIONS (table 'T1', tags 'c3'); -ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 OPTIONS (column_name 'C 1'); -ALTER FOREIGN TABLE ft2 ALTER COLUMN c1 OPTIONS (column_name 'C 1'); ---Testcase 26: -\det+ - List of foreign tables - Schema | Table | Server | FDW options | Description ---------+-------+---------------+---------------------------+------------- - public | ft1 | influxdb_svr | ("table" 'T1', tags 'c3') | - public | ft2 | influxdb_svr | ("table" 'T1', tags 'c3') | - public | ft4 | influxdb_svr | ("table" 'T3', tags 'c3') | - public | ft5 | influxdb_svr | ("table" 'T4', tags 'c3') | - public | ft6 | influxdb_svr2 | ("table" 'T4', tags 'c3') | -(5 rows) - --- Test that alteration of server options causes reconnection --- Remote's errors might be non-English, so hide them to ensure stable results -\set VERBOSITY terse ---Testcase 27: -SELECT c3, time FROM ft1 ORDER BY c3, c1 LIMIT 1; -- should work - c3 | time --------+-------------------------- - 00001 | Fri Jan 02 00:00:00 1970 -(1 row) - -ALTER SERVER influxdb_svr OPTIONS (SET dbname 'no such database'); ---Testcase 28: -SELECT c3, time FROM ft1 ORDER BY c3, c1 LIMIT 1; -- should fail -ERROR: influxdb_fdw : database not found: no such database -DO $d$ - BEGIN - EXECUTE $$ALTER SERVER influxdb_svr - OPTIONS (SET dbname 'postdb')$$; - END; -$d$; ---Testcase 29: -SELECT c3, time FROM ft1 ORDER BY c3, c1 LIMIT 1; -- should work again - c3 | time --------+-------------------------- - 00001 | Fri Jan 02 00:00:00 1970 -(1 row) - -\set VERBOSITY default --- =================================================================== --- simple queries --- =================================================================== --- single table without alias ---Testcase 30: -EXPLAIN (COSTS OFF) SELECT * FROM ft1 ORDER BY c3, c1 OFFSET 100 LIMIT 10; - QUERY PLAN ---------------------------------- - Limit - -> Sort - Sort Key: c3, c1 - -> Foreign Scan on ft1 -(4 rows) - ---Testcase 31: -SELECT * FROM ft1 ORDER BY c3, c1 OFFSET 100 LIMIT 10; - c1 | c2 | c3 | time | c6 | c7 | c8 ------+----+-------+--------------------------+----+------------+----- - 101 | 1 | 00101 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo - 102 | 2 | 00102 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo - 103 | 3 | 00103 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo - 104 | 4 | 00104 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo - 105 | 5 | 00105 | Tue Jan 06 00:00:00 1970 | 5 | 5 | foo - 106 | 6 | 00106 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 107 | 7 | 00107 | Thu Jan 08 00:00:00 1970 | 7 | 7 | foo - 108 | 8 | 00108 | Fri Jan 09 00:00:00 1970 | 8 | 8 | foo - 109 | 9 | 00109 | Sat Jan 10 00:00:00 1970 | 9 | 9 | foo - 110 | 0 | 00110 | Sun Jan 11 00:00:00 1970 | 0 | 0 | foo -(10 rows) - --- single table with alias - also test that tableoid sort is not pushed to remote side ---Testcase 32: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 ORDER BY t1.c3, t1.c1, t1.tableoid OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------- - Limit - Output: c1, c2, c3, "time", c6, c7, c8, tableoid - -> Sort - Output: c1, c2, c3, "time", c6, c7, c8, tableoid - Sort Key: t1.c3, t1.c1, t1.tableoid - -> Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8, tableoid - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(8 rows) - ---Testcase 33: -SELECT * FROM ft1 t1 ORDER BY t1.c3, t1.c1, t1.tableoid OFFSET 100 LIMIT 10; - c1 | c2 | c3 | time | c6 | c7 | c8 ------+----+-------+--------------------------+----+------------+----- - 101 | 1 | 00101 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo - 102 | 2 | 00102 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo - 103 | 3 | 00103 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo - 104 | 4 | 00104 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo - 105 | 5 | 00105 | Tue Jan 06 00:00:00 1970 | 5 | 5 | foo - 106 | 6 | 00106 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 107 | 7 | 00107 | Thu Jan 08 00:00:00 1970 | 7 | 7 | foo - 108 | 8 | 00108 | Fri Jan 09 00:00:00 1970 | 8 | 8 | foo - 109 | 9 | 00109 | Sat Jan 10 00:00:00 1970 | 9 | 9 | foo - 110 | 0 | 00110 | Sun Jan 11 00:00:00 1970 | 0 | 0 | foo -(10 rows) - --- whole-row reference ---Testcase 34: -EXPLAIN (VERBOSE, COSTS OFF) SELECT t1 FROM ft1 t1 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------- - Limit - Output: t1.*, c3, c1 - -> Sort - Output: t1.*, c3, c1 - Sort Key: t1.c3, t1.c1 - -> Foreign Scan on public.ft1 t1 - Output: t1.*, c3, c1 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(8 rows) - ---Testcase 35: -SELECT t1 FROM ft1 t1 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; - t1 -------------------------------------------------------------- - (101,1,00101,"Fri Jan 02 00:00:00 1970",1,"1 ",foo) - (102,2,00102,"Sat Jan 03 00:00:00 1970",2,"2 ",foo) - (103,3,00103,"Sun Jan 04 00:00:00 1970",3,"3 ",foo) - (104,4,00104,"Mon Jan 05 00:00:00 1970",4,"4 ",foo) - (105,5,00105,"Tue Jan 06 00:00:00 1970",5,"5 ",foo) - (106,6,00106,"Wed Jan 07 00:00:00 1970",6,"6 ",foo) - (107,7,00107,"Thu Jan 08 00:00:00 1970",7,"7 ",foo) - (108,8,00108,"Fri Jan 09 00:00:00 1970",8,"8 ",foo) - (109,9,00109,"Sat Jan 10 00:00:00 1970",9,"9 ",foo) - (110,0,00110,"Sun Jan 11 00:00:00 1970",0,"0 ",foo) -(10 rows) - --- empty result ---Testcase 36: -SELECT * FROM ft1 WHERE false; - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+----+------+----+----+---- -(0 rows) - --- with WHERE clause ---Testcase 37: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 = 101 AND t1.c6 = '1' AND t1.c7 >= '1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: (t1.c7 >= '1'::bpchar) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 101)) AND (("c6" = '1')) -(4 rows) - ---Testcase 38: -SELECT * FROM ft1 t1 WHERE t1.c1 = 101 AND t1.c6 = '1' AND t1.c7 >= '1'; - c1 | c2 | c3 | time | c6 | c7 | c8 ------+----+-------+--------------------------+----+------------+----- - 101 | 1 | 00101 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo -(1 row) - --- with FOR UPDATE/SHARE ---Testcase 39: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = 101 FOR UPDATE; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - LockRows - Output: c1, c2, c3, "time", c6, c7, c8, t1.* - -> Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8, t1.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 101)) -(5 rows) - ---Testcase 40: -SELECT * FROM ft1 t1 WHERE c1 = 101 FOR UPDATE; - c1 | c2 | c3 | time | c6 | c7 | c8 ------+----+-------+--------------------------+----+------------+----- - 101 | 1 | 00101 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo -(1 row) - ---Testcase 41: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = 102 FOR SHARE; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - LockRows - Output: c1, c2, c3, "time", c6, c7, c8, t1.* - -> Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8, t1.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 102)) -(5 rows) - ---Testcase 42: -SELECT * FROM ft1 t1 WHERE c1 = 102 FOR SHARE; - c1 | c2 | c3 | time | c6 | c7 | c8 ------+----+-------+--------------------------+----+------------+----- - 102 | 2 | 00102 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo -(1 row) - --- aggregate ---Testcase 43: -SELECT COUNT(*) FROM ft1 t1; - count -------- - 1000 -(1 row) - --- subquery ---Testcase 44: -SELECT * FROM ft1 t1 WHERE t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE c1 <= 10) ORDER BY c1; - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+----- - 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo - 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo - 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo - 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo - 5 | 5 | 00005 | Tue Jan 06 00:00:00 1970 | 5 | 5 | foo - 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 7 | 7 | 00007 | Thu Jan 08 00:00:00 1970 | 7 | 7 | foo - 8 | 8 | 00008 | Fri Jan 09 00:00:00 1970 | 8 | 8 | foo - 9 | 9 | 00009 | Sat Jan 10 00:00:00 1970 | 9 | 9 | foo - 10 | 0 | 00010 | Sun Jan 11 00:00:00 1970 | 0 | 0 | foo -(10 rows) - --- subquery+MAX ---Testcase 45: -SELECT * FROM ft1 t1 WHERE t1.c3 = (SELECT MAX(c3) FROM ft2 t2) ORDER BY c1; - c1 | c2 | c3 | time | c6 | c7 | c8 -------+----+-------+--------------------------+----+------------+----- - 1000 | 0 | 01000 | Thu Jan 01 00:00:00 1970 | 0 | 0 | foo -(1 row) - --- used in CTE ---Testcase 46: -WITH t1 AS (SELECT * FROM ft1 WHERE c1 <= 10) SELECT t2.c1, t2.c2, t2.c3, t2.time FROM t1, ft2 t2 WHERE t1.c1 = t2.c1 ORDER BY t1.c1; - c1 | c2 | c3 | time -----+----+-------+-------------------------- - 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 - 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 - 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 - 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 - 5 | 5 | 00005 | Tue Jan 06 00:00:00 1970 - 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 - 7 | 7 | 00007 | Thu Jan 08 00:00:00 1970 - 8 | 8 | 00008 | Fri Jan 09 00:00:00 1970 - 9 | 9 | 00009 | Sat Jan 10 00:00:00 1970 - 10 | 0 | 00010 | Sun Jan 11 00:00:00 1970 -(10 rows) - --- fixed values ---Testcase 47: -SELECT 'fixed', NULL FROM ft1 t1 WHERE c1 = 1; - ?column? | ?column? -----------+---------- - fixed | -(1 row) - --- Test forcing the remote server to produce sorted data for a merge join. -SET enable_hashjoin TO false; -SET enable_nestloop TO false; --- inner join; expressions in the clauses appear in the equivalence class list ---Testcase 48: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT t1.c1, t2."C 1" FROM ft2 t1 JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------- - Limit - Output: t1.c1, t2."C 1" - -> Merge Join - Output: t1.c1, t2."C 1" - Merge Cond: (t1.c1 = t2."C 1") - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Sort - Output: t2."C 1" - Sort Key: t2."C 1" - -> Foreign Scan on "S 1"."T 1" t2 - Output: t2."C 1" - InfluxDB query: SELECT "C 1" FROM "T1" -(17 rows) - ---Testcase 49: -SELECT t1.c1, t2."C 1" FROM ft2 t1 JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; - c1 | C 1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- outer join; expressions in the clauses do not appear in equivalence class --- list but no output change as compared to the previous query ---Testcase 50: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT t1.c1, t2."C 1" FROM ft2 t1 LEFT JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------- - Limit - Output: t1.c1, t2."C 1" - -> Merge Left Join - Output: t1.c1, t2."C 1" - Merge Cond: (t1.c1 = t2."C 1") - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Sort - Output: t2."C 1" - Sort Key: t2."C 1" - -> Foreign Scan on "S 1"."T 1" t2 - Output: t2."C 1" - InfluxDB query: SELECT "C 1" FROM "T1" -(17 rows) - ---Testcase 51: -SELECT t1.c1, t2."C 1" FROM ft2 t1 LEFT JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; - c1 | C 1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- A join between 2 foreign tables. ORDER BY clause is added to the --- foreign join so that the other table can be joined using merge join strategy. ---Testcase 52: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT t1."C 1" FROM "S 1"."T 1" t1 left join ft1 t2 join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1."C 1" - -> Merge Left Join - Output: t1."C 1" - Merge Cond: (t1."C 1" = t3.c1) - -> Sort - Output: t1."C 1" - Sort Key: t1."C 1" - -> Foreign Scan on "S 1"."T 1" t1 - Output: t1."C 1" - InfluxDB query: SELECT "C 1" FROM "T1" - -> Materialize - Output: t3.c1 - -> Merge Join - Output: t3.c1 - Merge Cond: (t2.c1 = t3.c1) - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft1 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Sort - Output: t3.c1 - Sort Key: t3.c1 - -> Foreign Scan on public.ft2 t3 - Output: t3.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(28 rows) - ---Testcase 53: -SELECT t1."C 1" FROM "S 1"."T 1" t1 left join ft1 t2 join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; - C 1 ------ - 101 - 102 - 103 - 104 - 105 - 106 - 107 - 108 - 109 - 110 -(10 rows) - --- Test similar to above, except that the full join prevents any equivalence --- classes from being merged. This produces single relation equivalence classes --- included in join restrictions. ---Testcase 54: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 left join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1."C 1", t2.c1, t3.c1 - -> Merge Left Join - Output: t1."C 1", t2.c1, t3.c1 - Merge Cond: (t1."C 1" = t3.c1) - -> Sort - Output: t1."C 1" - Sort Key: t1."C 1" - -> Foreign Scan on "S 1"."T 1" t1 - Output: t1."C 1" - InfluxDB query: SELECT "C 1" FROM "T1" - -> Materialize - Output: t3.c1, t2.c1 - -> Merge Left Join - Output: t3.c1, t2.c1 - Merge Cond: (t3.c1 = t2.c1) - -> Sort - Output: t3.c1 - Sort Key: t3.c1 - -> Foreign Scan on public.ft2 t3 - Output: t3.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft1 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(28 rows) - ---Testcase 55: -SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 left join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; - C 1 | c1 | c1 ------+-----+----- - 101 | 101 | 101 - 102 | 102 | 102 - 103 | 103 | 103 - 104 | 104 | 104 - 105 | 105 | 105 - 106 | 106 | 106 - 107 | 107 | 107 - 108 | 108 | 108 - 109 | 109 | 109 - 110 | 110 | 110 -(10 rows) - --- Test similar to above with all full outer joins ---Testcase 56: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 full join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1."C 1", t2.c1, t3.c1 - -> Merge Full Join - Output: t1."C 1", t2.c1, t3.c1 - Merge Cond: (t1."C 1" = t3.c1) - -> Sort - Output: t1."C 1" - Sort Key: t1."C 1" - -> Foreign Scan on "S 1"."T 1" t1 - Output: t1."C 1" - InfluxDB query: SELECT "C 1" FROM "T1" - -> Sort - Output: t2.c1, t3.c1 - Sort Key: t3.c1 - -> Merge Full Join - Output: t2.c1, t3.c1 - Merge Cond: (t2.c1 = t3.c1) - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft1 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Sort - Output: t3.c1 - Sort Key: t3.c1 - -> Foreign Scan on public.ft2 t3 - Output: t3.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(29 rows) - ---Testcase 57: -SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 full join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; - C 1 | c1 | c1 ------+-----+----- - 101 | 101 | 101 - 102 | 102 | 102 - 103 | 103 | 103 - 104 | 104 | 104 - 105 | 105 | 105 - 106 | 106 | 106 - 107 | 107 | 107 - 108 | 108 | 108 - 109 | 109 | 109 - 110 | 110 | 110 -(10 rows) - -RESET enable_hashjoin; -RESET enable_nestloop; --- =================================================================== --- WHERE with remotely-executable conditions --- =================================================================== ---Testcase 58: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 = 1; -- Var, OpExpr(b), Const - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - ---Testcase 59: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 = 100 AND t1.c2 = 0; -- BoolExpr - QUERY PLAN ---------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 100)) AND (("c2" = 0)) -(3 rows) - ---Testcase 60: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 IS NULL; -- NullTest - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: (t1.c1 IS NULL) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(4 rows) - ---Testcase 61: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 IS NOT NULL; -- NullTest - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: (t1.c1 IS NOT NULL) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(4 rows) - ---Testcase 62: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE round(abs(c1), 0) = 1; -- FuncExpr - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: (round((abs(t1.c1))::numeric, 0) = '1'::numeric) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(4 rows) - ---Testcase 63: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = -c1; -- OpExpr(l) - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = (- "C 1"))) -(3 rows) - ---Testcase 64: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE 1 = c1!; -- OpExpr(r) - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: ('1'::numeric = ((t1.c1)::bigint !)) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(4 rows) - ---Testcase 65: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (c1 IS NOT NULL) IS DISTINCT FROM (c1 IS NOT NULL); -- DistinctExpr - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: ((t1.c1 IS NOT NULL) IS DISTINCT FROM (t1.c1 IS NOT NULL)) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(4 rows) - ---Testcase 66: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = ANY(ARRAY[c2, 1, c1 + 0]); -- ScalarArrayOpExpr - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = "c2") OR ("C 1" = 1) OR ("C 1" = ("C 1" + 0))) -(3 rows) - ---Testcase 67: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- SubscriptingRef - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: (t1.c1 = (ARRAY[t1.c1, t1.c2, 3])[1]) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(4 rows) - ---Testcase 68: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c6 = E'foo''s\\bar'; -- check special chars - QUERY PLAN -------------------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c6" = 'foo''s\\bar')) -(3 rows) - ---Testcase 69: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c8 = 'foo'; -- can't be sent to remote - QUERY PLAN ------------------------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) -(3 rows) - --- parameterized remote path for foreign table ---Testcase 70: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM "S 1"."T 1" a, ft2 b WHERE a."C 1" = 47 AND b.c1 = a.c2; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Hash Join - Output: a."C 1", a.c2, a.c3, a."time", a.c6, a.c7, a.c8, b.c1, b.c2, b.c3, b."time", b.c6, b.c7, b.c8 - Hash Cond: (b.c1 = a.c2) - -> Foreign Scan on public.ft2 b - Output: b.c1, b.c2, b.c3, b."time", b.c6, b.c7, b.c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" - -> Hash - Output: a."C 1", a.c2, a.c3, a."time", a.c6, a.c7, a.c8 - -> Foreign Scan on "S 1"."T 1" a - Output: a."C 1", a.c2, a.c3, a."time", a.c6, a.c7, a.c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 47)) -(11 rows) - ---Testcase 71: -SELECT * FROM ft2 a, ft2 b WHERE a.c1 = 47 AND b.c1 = a.c2; - c1 | c2 | c3 | time | c6 | c7 | c8 | c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+-----+----+----+-------+--------------------------+----+------------+----- - 47 | 7 | 00047 | Tue Feb 17 00:00:00 1970 | 7 | 7 | foo | 7 | 7 | 00007 | Thu Jan 08 00:00:00 1970 | 7 | 7 | foo -(1 row) - --- check both safe and unsafe join conditions ---Testcase 72: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM ft2 a, ft2 b - WHERE a.c2 = 6 AND b.c1 = a.c1 AND a.c8 = 'foo' AND b.c7 = upper(a.c7); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- - Hash Join - Output: a.c1, a.c2, a.c3, a."time", a.c6, a.c7, a.c8, b.c1, b.c2, b.c3, b."time", b.c6, b.c7, b.c8 - Hash Cond: ((b.c1 = a.c1) AND ((b.c7)::text = upper((a.c7)::text))) - -> Foreign Scan on public.ft2 b - Output: b.c1, b.c2, b.c3, b."time", b.c6, b.c7, b.c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" - -> Hash - Output: a.c1, a.c2, a.c3, a."time", a.c6, a.c7, a.c8 - -> Foreign Scan on public.ft2 a - Output: a.c1, a.c2, a.c3, a."time", a.c6, a.c7, a.c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c2" = 6)) AND (("c8" = 'foo')) -(11 rows) - ---Testcase 73: -SELECT * FROM ft2 a, ft2 b -WHERE a.c2 = 6 AND b.c1 = a.c1 AND a.c8 = 'foo' AND b.c7 = upper(a.c7) ORDER BY a.c1; - c1 | c2 | c3 | time | c6 | c7 | c8 | c1 | c2 | c3 | time | c6 | c7 | c8 ------+----+-------+--------------------------+----+------------+-----+-----+----+-------+--------------------------+----+------------+----- - 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo - 26 | 6 | 00026 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 26 | 6 | 00026 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo - 36 | 6 | 00036 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 36 | 6 | 00036 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo - 46 | 6 | 00046 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 46 | 6 | 00046 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo - 56 | 6 | 00056 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 56 | 6 | 00056 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo - 66 | 6 | 00066 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 66 | 6 | 00066 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo - 76 | 6 | 00076 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 76 | 6 | 00076 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo - 86 | 6 | 00086 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 86 | 6 | 00086 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo - 96 | 6 | 00096 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 96 | 6 | 00096 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo - 106 | 6 | 00106 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 106 | 6 | 00106 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 116 | 6 | 00116 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 116 | 6 | 00116 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo - 126 | 6 | 00126 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 126 | 6 | 00126 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo - 136 | 6 | 00136 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 136 | 6 | 00136 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo - 146 | 6 | 00146 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 146 | 6 | 00146 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo - 156 | 6 | 00156 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 156 | 6 | 00156 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo - 166 | 6 | 00166 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 166 | 6 | 00166 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo - 176 | 6 | 00176 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 176 | 6 | 00176 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo - 186 | 6 | 00186 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 186 | 6 | 00186 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo - 196 | 6 | 00196 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 196 | 6 | 00196 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo - 206 | 6 | 00206 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 206 | 6 | 00206 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 216 | 6 | 00216 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 216 | 6 | 00216 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo - 226 | 6 | 00226 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 226 | 6 | 00226 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo - 236 | 6 | 00236 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 236 | 6 | 00236 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo - 246 | 6 | 00246 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 246 | 6 | 00246 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo - 256 | 6 | 00256 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 256 | 6 | 00256 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo - 266 | 6 | 00266 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 266 | 6 | 00266 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo - 276 | 6 | 00276 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 276 | 6 | 00276 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo - 286 | 6 | 00286 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 286 | 6 | 00286 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo - 296 | 6 | 00296 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 296 | 6 | 00296 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo - 306 | 6 | 00306 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 306 | 6 | 00306 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 316 | 6 | 00316 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 316 | 6 | 00316 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo - 326 | 6 | 00326 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 326 | 6 | 00326 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo - 336 | 6 | 00336 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 336 | 6 | 00336 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo - 346 | 6 | 00346 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 346 | 6 | 00346 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo - 356 | 6 | 00356 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 356 | 6 | 00356 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo - 366 | 6 | 00366 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 366 | 6 | 00366 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo - 376 | 6 | 00376 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 376 | 6 | 00376 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo - 386 | 6 | 00386 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 386 | 6 | 00386 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo - 396 | 6 | 00396 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 396 | 6 | 00396 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo - 406 | 6 | 00406 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 406 | 6 | 00406 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 416 | 6 | 00416 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 416 | 6 | 00416 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo - 426 | 6 | 00426 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 426 | 6 | 00426 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo - 436 | 6 | 00436 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 436 | 6 | 00436 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo - 446 | 6 | 00446 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 446 | 6 | 00446 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo - 456 | 6 | 00456 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 456 | 6 | 00456 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo - 466 | 6 | 00466 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 466 | 6 | 00466 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo - 476 | 6 | 00476 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 476 | 6 | 00476 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo - 486 | 6 | 00486 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 486 | 6 | 00486 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo - 496 | 6 | 00496 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 496 | 6 | 00496 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo - 506 | 6 | 00506 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 506 | 6 | 00506 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 516 | 6 | 00516 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 516 | 6 | 00516 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo - 526 | 6 | 00526 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 526 | 6 | 00526 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo - 536 | 6 | 00536 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 536 | 6 | 00536 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo - 546 | 6 | 00546 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 546 | 6 | 00546 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo - 556 | 6 | 00556 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 556 | 6 | 00556 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo - 566 | 6 | 00566 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 566 | 6 | 00566 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo - 576 | 6 | 00576 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 576 | 6 | 00576 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo - 586 | 6 | 00586 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 586 | 6 | 00586 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo - 596 | 6 | 00596 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 596 | 6 | 00596 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo - 606 | 6 | 00606 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 606 | 6 | 00606 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 616 | 6 | 00616 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 616 | 6 | 00616 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo - 626 | 6 | 00626 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 626 | 6 | 00626 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo - 636 | 6 | 00636 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 636 | 6 | 00636 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo - 646 | 6 | 00646 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 646 | 6 | 00646 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo - 656 | 6 | 00656 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 656 | 6 | 00656 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo - 666 | 6 | 00666 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 666 | 6 | 00666 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo - 676 | 6 | 00676 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 676 | 6 | 00676 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo - 686 | 6 | 00686 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 686 | 6 | 00686 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo - 696 | 6 | 00696 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 696 | 6 | 00696 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo - 706 | 6 | 00706 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 706 | 6 | 00706 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 716 | 6 | 00716 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 716 | 6 | 00716 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo - 726 | 6 | 00726 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 726 | 6 | 00726 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo - 736 | 6 | 00736 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 736 | 6 | 00736 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo - 746 | 6 | 00746 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 746 | 6 | 00746 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo - 756 | 6 | 00756 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 756 | 6 | 00756 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo - 766 | 6 | 00766 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 766 | 6 | 00766 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo - 776 | 6 | 00776 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 776 | 6 | 00776 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo - 786 | 6 | 00786 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 786 | 6 | 00786 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo - 796 | 6 | 00796 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 796 | 6 | 00796 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo - 806 | 6 | 00806 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 806 | 6 | 00806 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 816 | 6 | 00816 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 816 | 6 | 00816 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo - 826 | 6 | 00826 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 826 | 6 | 00826 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo - 836 | 6 | 00836 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 836 | 6 | 00836 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo - 846 | 6 | 00846 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 846 | 6 | 00846 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo - 856 | 6 | 00856 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 856 | 6 | 00856 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo - 866 | 6 | 00866 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 866 | 6 | 00866 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo - 876 | 6 | 00876 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 876 | 6 | 00876 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo - 886 | 6 | 00886 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 886 | 6 | 00886 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo - 896 | 6 | 00896 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 896 | 6 | 00896 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo - 906 | 6 | 00906 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 906 | 6 | 00906 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 916 | 6 | 00916 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 916 | 6 | 00916 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo - 926 | 6 | 00926 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 926 | 6 | 00926 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo - 936 | 6 | 00936 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 936 | 6 | 00936 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo - 946 | 6 | 00946 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 946 | 6 | 00946 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo - 956 | 6 | 00956 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 956 | 6 | 00956 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo - 966 | 6 | 00966 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 966 | 6 | 00966 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo - 976 | 6 | 00976 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 976 | 6 | 00976 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo - 986 | 6 | 00986 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 986 | 6 | 00986 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo - 996 | 6 | 00996 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 996 | 6 | 00996 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo -(100 rows) - --- bug before 9.3.5 due to sloppy handling of remote-estimate parameters ---Testcase 74: -SELECT * FROM ft1 WHERE c1 = ANY (ARRAY(SELECT c1 FROM ft2 WHERE c1 < 5)); - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+----- - 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo - 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo - 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo - 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo -(4 rows) - ---Testcase 75: -SELECT * FROM ft2 WHERE c1 = ANY (ARRAY(SELECT c1 FROM ft1 WHERE c1 < 5)); - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+----- - 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo - 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo - 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo - 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo -(4 rows) - --- we should not push order by clause with volatile expressions or unsafe --- collations ---Testcase 76: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM ft2 ORDER BY ft2.c1, random(); - QUERY PLAN ------------------------------------------------------------------------------- - Sort - Output: c1, c2, c3, "time", c6, c7, c8, (random()) - Sort Key: ft2.c1, (random()) - -> Foreign Scan on public.ft2 - Output: c1, c2, c3, "time", c6, c7, c8, random() - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(6 rows) - ---Testcase 77: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM ft2 ORDER BY ft2.c1, ft2.c3 collate "C"; - QUERY PLAN ------------------------------------------------------------------------------- - Sort - Output: c1, c2, c3, "time", c6, c7, c8, ((c3)::text) - Sort Key: ft2.c1, ft2.c3 COLLATE "C" - -> Foreign Scan on public.ft2 - Output: c1, c2, c3, "time", c6, c7, c8, c3 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(6 rows) - --- user-defined operator/function ---Testcase 78: -CREATE FUNCTION influxdb_fdw_abs(int) RETURNS int AS $$ -BEGIN -RETURN abs($1); -END -$$ LANGUAGE plpgsql IMMUTABLE; ---Testcase 79: -CREATE OPERATOR === ( - LEFTARG = int, - RIGHTARG = int, - PROCEDURE = int4eq, - COMMUTATOR = === -); --- built-in operators and functions can be shipped for remote execution ---Testcase 80: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = abs(t1.c2); - QUERY PLAN ----------------------------------------------------------------------------------- - Aggregate - Output: count(c3) - -> Foreign Scan on public.ft1 t1 - Output: c3 - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = abs("c2"))) -(5 rows) - ---Testcase 81: -SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = abs(t1.c2); - count -------- - 9 -(1 row) - ---Testcase 82: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = t1.c2; - QUERY PLAN ------------------------------------------------------------------------------ - Aggregate - Output: count(c3) - -> Foreign Scan on public.ft1 t1 - Output: c3 - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = "c2")) -(5 rows) - ---Testcase 83: -SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = t1.c2; - count -------- - 9 -(1 row) - --- by default, user-defined ones cannot ---Testcase 84: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); - QUERY PLAN ------------------------------------------------------------- - Aggregate - Output: count(c3) - -> Foreign Scan on public.ft1 t1 - Output: c3 - Filter: (t1.c1 = influxdb_fdw_abs(t1.c2)) - InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" -(6 rows) - ---Testcase 85: -SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); - count -------- - 9 -(1 row) - ---Testcase 86: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; - QUERY PLAN ------------------------------------------------------------- - Aggregate - Output: count(c3) - -> Foreign Scan on public.ft1 t1 - Output: c3 - Filter: (t1.c1 === t1.c2) - InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" -(6 rows) - ---Testcase 87: -SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; - count -------- - 9 -(1 row) - --- ORDER BY can be shipped, though ---Testcase 88: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; - QUERY PLAN ------------------------------------------------------------------------------------- - Limit - Output: c1, c2, c3, "time", c6, c7, c8 - -> Sort - Output: c1, c2, c3, "time", c6, c7, c8 - Sort Key: t1.c2 - -> Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: (t1.c1 === t1.c2) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(9 rows) - ---Testcase 89: -SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+----- - 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo -(1 row) - --- but let's put them in an extension ... -ALTER EXTENSION influxdb_fdw ADD FUNCTION influxdb_fdw_abs(int); -ALTER EXTENSION influxdb_fdw ADD OPERATOR === (int, int); --- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); --- ... now they can be shipped ---Testcase 90: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); - QUERY PLAN ------------------------------------------------------------- - Aggregate - Output: count(c3) - -> Foreign Scan on public.ft1 t1 - Output: c3 - Filter: (t1.c1 = influxdb_fdw_abs(t1.c2)) - InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" -(6 rows) - ---Testcase 91: -SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); - count -------- - 9 -(1 row) - ---Testcase 92: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; - QUERY PLAN ------------------------------------------------------------- - Aggregate - Output: count(c3) - -> Foreign Scan on public.ft1 t1 - Output: c3 - Filter: (t1.c1 === t1.c2) - InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" -(6 rows) - ---Testcase 93: -SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; - count -------- - 9 -(1 row) - --- and both ORDER BY and LIMIT can be shipped ---Testcase 94: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; - QUERY PLAN ------------------------------------------------------------------------------------- - Limit - Output: c1, c2, c3, "time", c6, c7, c8 - -> Sort - Output: c1, c2, c3, "time", c6, c7, c8 - Sort Key: t1.c2 - -> Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: (t1.c1 === t1.c2) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(9 rows) - ---Testcase 95: -SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+----- - 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo -(1 row) - --- =================================================================== --- JOIN queries --- =================================================================== --- join two tables ---Testcase 96: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c1, t1.c3 - -> Sort - Output: t1.c1, t2.c1, t1.c3 - Sort Key: t1.c3, t1.c1 - -> Merge Join - Output: t1.c1, t2.c1, t1.c3 - Merge Cond: (t1.c1 = t2.c1) - -> Sort - Output: t1.c1, t1.c3 - Sort Key: t1.c1 - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c3 - InfluxDB query: SELECT "C 1", "c3" FROM "T1" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(20 rows) - ---Testcase 97: -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- join three tables ---Testcase 98: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) JOIN ft4 t3 ON (t3.c1 = t1.c1) ORDER BY t1.c3, t1.c1 OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c2, t3.c3, t1.c3 - -> Sort - Output: t1.c1, t2.c2, t3.c3, t1.c3 - Sort Key: t1.c3, t1.c1 - -> Merge Join - Output: t1.c1, t2.c2, t3.c3, t1.c3 - Merge Cond: (t2.c1 = t1.c1) - -> Sort - Output: t2.c2, t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Materialize - Output: t1.c1, t1.c3, t3.c3, t3.c1 - -> Merge Join - Output: t1.c1, t1.c3, t3.c3, t3.c1 - Merge Cond: (t1.c1 = t3.c1) - -> Sort - Output: t1.c1, t1.c3 - Sort Key: t1.c1 - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c3 - InfluxDB query: SELECT "C 1", "c3" FROM "T1" - -> Sort - Output: t3.c3, t3.c1 - Sort Key: t3.c1 - -> Foreign Scan on public.ft4 t3 - Output: t3.c3, t3.c1 - InfluxDB query: SELECT "c1", "c3" FROM "T3" -(31 rows) - ---Testcase 99: -SELECT t1.c1, t2.c2, t3.c3 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) JOIN ft4 t3 ON (t3.c1 = t1.c1) ORDER BY t1.c3, t1.c1 OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 22 | 2 | AAA022 - 24 | 4 | AAA024 - 26 | 6 | AAA026 - 28 | 8 | AAA028 - 30 | 0 | AAA030 - 32 | 2 | AAA032 - 34 | 4 | AAA034 - 36 | 6 | AAA036 - 38 | 8 | AAA038 - 40 | 0 | AAA040 -(10 rows) - --- left outer join ---Testcase 100: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------ - Limit - Output: t1.c1, t2.c1 - -> Sort - Output: t1.c1, t2.c1 - Sort Key: t1.c1, t2.c1 - -> Merge Left Join - Output: t1.c1, t2.c1 - Merge Cond: (t1.c1 = t2.c1) - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft4 t1 - Output: t1.c1 - InfluxDB query: SELECT "c1" FROM "T3" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft5 t2 - Output: t2.c1 - InfluxDB query: SELECT "c1" FROM "T4" -(20 rows) - ---Testcase 101: -SELECT t1.c1, t2.c1 FROM ft4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; - c1 | c1 -----+---- - 22 | - 24 | 24 - 26 | - 28 | - 30 | 30 - 32 | - 34 | - 36 | 36 - 38 | - 40 | -(10 rows) - --- left outer join three tables ---Testcase 102: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c2, t3.c3 - -> Nested Loop Left Join - Output: t1.c1, t2.c2, t3.c3 - Join Filter: (t2.c1 = t3.c1) - -> Nested Loop Left Join - Output: t1.c1, t2.c2, t2.c1 - Join Filter: (t1.c1 = t2.c1) - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Materialize - Output: t2.c2, t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Materialize - Output: t3.c3, t3.c1 - -> Foreign Scan on public.ft4 t3 - Output: t3.c3, t3.c1 - InfluxDB query: SELECT "c1", "c3" FROM "T3" -(21 rows) - ---Testcase 103: -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- left outer join + placement of clauses. --- clauses within the nullable side are not pulled up, but top level clause on --- non-nullable side is pushed into non-nullable side ---Testcase 104: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) WHERE t1.c1 < 10; - QUERY PLAN -------------------------------------------------------------------------------- - Hash Left Join - Output: t1.c1, t1.c2, ft5.c1, ft5.c2 - Hash Cond: (t1.c1 = ft5.c1) - -> Foreign Scan on public.ft4 t1 - Output: t1.c1, t1.c2, t1.c3 - InfluxDB query: SELECT "c1", "c2" FROM "T3" WHERE (("c1" < 10)) - -> Hash - Output: ft5.c1, ft5.c2 - -> Foreign Scan on public.ft5 - Output: ft5.c1, ft5.c2 - InfluxDB query: SELECT "c1", "c2" FROM "T4" WHERE (("c1" < 10)) -(11 rows) - ---Testcase 105: -SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) WHERE t1.c1 < 10; - c1 | c2 | c1 | c2 -----+----+----+---- - 2 | 3 | | - 4 | 5 | | - 6 | 7 | 6 | 7 - 8 | 9 | | -(4 rows) - --- clauses within the nullable side are not pulled up, but the top level clause --- on nullable side is not pushed down into nullable side ---Testcase 106: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) - WHERE (t2.c1 < 10 OR t2.c1 IS NULL) AND t1.c1 < 10; - QUERY PLAN -------------------------------------------------------------------------------- - Hash Left Join - Output: t1.c1, t1.c2, ft5.c1, ft5.c2 - Hash Cond: (t1.c1 = ft5.c1) - Filter: ((ft5.c1 < 10) OR (ft5.c1 IS NULL)) - -> Foreign Scan on public.ft4 t1 - Output: t1.c1, t1.c2, t1.c3 - InfluxDB query: SELECT "c1", "c2" FROM "T3" WHERE (("c1" < 10)) - -> Hash - Output: ft5.c1, ft5.c2 - -> Foreign Scan on public.ft5 - Output: ft5.c1, ft5.c2 - InfluxDB query: SELECT "c1", "c2" FROM "T4" WHERE (("c1" < 10)) -(12 rows) - ---Testcase 107: -SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) - WHERE (t2.c1 < 10 OR t2.c1 IS NULL) AND t1.c1 < 10; - c1 | c2 | c1 | c2 -----+----+----+---- - 2 | 3 | | - 4 | 5 | | - 6 | 7 | 6 | 7 - 8 | 9 | | -(4 rows) - --- right outer join ---Testcase 108: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft5 t1 RIGHT JOIN ft4 t2 ON (t1.c1 = t2.c1) ORDER BY t2.c1, t1.c1 OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------ - Limit - Output: t1.c1, t2.c1 - -> Sort - Output: t1.c1, t2.c1 - Sort Key: t2.c1, t1.c1 - -> Merge Left Join - Output: t1.c1, t2.c1 - Merge Cond: (t2.c1 = t1.c1) - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft4 t2 - Output: t2.c1 - InfluxDB query: SELECT "c1" FROM "T3" - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft5 t1 - Output: t1.c1 - InfluxDB query: SELECT "c1" FROM "T4" -(20 rows) - ---Testcase 109: -SELECT t1.c1, t2.c1 FROM ft5 t1 RIGHT JOIN ft4 t2 ON (t1.c1 = t2.c1) ORDER BY t2.c1, t1.c1 OFFSET 10 LIMIT 10; - c1 | c1 -----+---- - | 22 - 24 | 24 - | 26 - | 28 - 30 | 30 - | 32 - | 34 - 36 | 36 - | 38 - | 40 -(10 rows) - --- right outer join three tables ---Testcase 110: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c2, t3.c3 - -> Nested Loop Left Join - Output: t1.c1, t2.c2, t3.c3 - Join Filter: (t1.c1 = t2.c1) - -> Nested Loop Left Join - Output: t3.c3, t2.c2, t2.c1 - Join Filter: (t2.c1 = t3.c1) - -> Foreign Scan on public.ft4 t3 - Output: t3.c1, t3.c2, t3.c3 - InfluxDB query: SELECT "c1", "c3" FROM "T3" - -> Materialize - Output: t2.c2, t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Materialize - Output: t1.c1 - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(21 rows) - ---Testcase 111: -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 22 | 2 | AAA022 - 24 | 4 | AAA024 - 26 | 6 | AAA026 - 28 | 8 | AAA028 - 30 | 0 | AAA030 - 32 | 2 | AAA032 - 34 | 4 | AAA034 - 36 | 6 | AAA036 - 38 | 8 | AAA038 - 40 | 0 | AAA040 -(10 rows) - --- full outer join ---Testcase 112: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 45 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------ - Limit - Output: t1.c1, t2.c1 - -> Sort - Output: t1.c1, t2.c1 - Sort Key: t1.c1, t2.c1 - -> Merge Full Join - Output: t1.c1, t2.c1 - Merge Cond: (t1.c1 = t2.c1) - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft4 t1 - Output: t1.c1 - InfluxDB query: SELECT "c1" FROM "T3" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft5 t2 - Output: t2.c1 - InfluxDB query: SELECT "c1" FROM "T4" -(20 rows) - ---Testcase 113: -SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 45 LIMIT 10; - c1 | c1 ------+---- - 92 | - 94 | - 96 | 96 - 98 | - 100 | - | 3 - | 9 - | 15 - | 21 - | 27 -(10 rows) - --- full outer join with restrictions on the joining relations --- a. the joining relations are both base relations ---Testcase 114: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Sort - Output: ft4.c1, ft5.c1 - Sort Key: ft4.c1, ft5.c1 - -> Hash Full Join - Output: ft4.c1, ft5.c1 - Hash Cond: (ft4.c1 = ft5.c1) - -> Foreign Scan on public.ft4 - Output: ft4.c1, ft4.c2, ft4.c3 - InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: ft5.c1 - -> Foreign Scan on public.ft5 - Output: ft5.c1 - InfluxDB query: SELECT "c1" FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(14 rows) - ---Testcase 115: -SELECT t1.c1, t2.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1; - c1 | c1 -----+---- - 50 | - 52 | - 54 | 54 - 56 | - 58 | - 60 | 60 - | 51 - | 57 -(8 rows) - ---Testcase 116: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT 1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Limit - Output: 1 - -> Merge Full Join - Output: 1 - -> Foreign Scan on public.ft4 - Output: ft4.c1, ft4.c2, ft4.c3 - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Materialize - Output: ft5.c1, ft5.c2, ft5.c3 - -> Foreign Scan on public.ft5 - Output: ft5.c1, ft5.c2, ft5.c3 - InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(12 rows) - ---Testcase 117: -SELECT 1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; - ?column? ----------- - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 -(10 rows) - --- b. one of the joining relations is a base relation and the other is a join --- relation ---Testcase 118: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM ft4 t2 LEFT JOIN ft5 t3 ON (t2.c1 = t3.c1) WHERE (t2.c1 between 50 and 60)) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Sort - Output: ft4.c1, t2.c1, t3.c1 - Sort Key: ft4.c1, t2.c1, t3.c1 - -> Hash Full Join - Output: ft4.c1, t2.c1, t3.c1 - Hash Cond: (t2.c1 = ft4.c1) - -> Hash Right Join - Output: t2.c1, t3.c1 - Hash Cond: (t3.c1 = t2.c1) - -> Foreign Scan on public.ft5 t3 - Output: t3.c1, t3.c2, t3.c3 - InfluxDB query: SELECT "c1" FROM "T4" - -> Hash - Output: t2.c1 - -> Foreign Scan on public.ft4 t2 - Output: t2.c1 - InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: ft4.c1 - -> Foreign Scan on public.ft4 - Output: ft4.c1 - InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(22 rows) - ---Testcase 119: -SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM ft4 t2 LEFT JOIN ft5 t3 ON (t2.c1 = t3.c1) WHERE (t2.c1 between 50 and 60)) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; - c1 | a | b -----+----+---- - 50 | 50 | - 52 | 52 | - 54 | 54 | 54 - 56 | 56 | - 58 | 58 | - 60 | 60 | 60 -(6 rows) - --- c. test deparsing the remote query as nested subqueries ---Testcase 120: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Sort - Output: ft4.c1, ft4_1.c1, ft5.c1 - Sort Key: ft4.c1, ft4_1.c1, ft5.c1 - -> Hash Full Join - Output: ft4.c1, ft4_1.c1, ft5.c1 - Hash Cond: (ft4_1.c1 = ft4.c1) - -> Hash Full Join - Output: ft4_1.c1, ft5.c1 - Hash Cond: (ft4_1.c1 = ft5.c1) - Filter: ((ft4_1.c1 IS NULL) OR (ft4_1.c1 IS NOT NULL)) - -> Foreign Scan on public.ft4 ft4_1 - Output: ft4_1.c1, ft4_1.c2, ft4_1.c3 - InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: ft5.c1 - -> Foreign Scan on public.ft5 - Output: ft5.c1 - InfluxDB query: SELECT "c1" FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: ft4.c1 - -> Foreign Scan on public.ft4 - Output: ft4.c1 - InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(23 rows) - ---Testcase 121: -SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; - c1 | a | b -----+----+---- - 50 | 50 | - 52 | 52 | - 54 | 54 | 54 - 56 | 56 | - 58 | 58 | - 60 | 60 | 60 - | | 51 - | | 57 -(8 rows) - --- d. test deparsing rowmarked relations as subqueries ---Testcase 122: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM "S 1"."T 3" WHERE c1 = 50) t1 INNER JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY t1.c1, ss.a, ss.b FOR UPDATE OF t1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------- - LockRows - Output: "T 3".c1, ft4.c1, ft5.c1, "T 3".*, ft4.*, ft5.* - -> Sort - Output: "T 3".c1, ft4.c1, ft5.c1, "T 3".*, ft4.*, ft5.* - Sort Key: ft4.c1, ft5.c1 - -> Nested Loop - Output: "T 3".c1, ft4.c1, ft5.c1, "T 3".*, ft4.*, ft5.* - -> Foreign Scan on "S 1"."T 3" - Output: "T 3".c1, "T 3".* - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" WHERE (("c1" = 50)) - -> Materialize - Output: ft4.c1, ft4.*, ft5.c1, ft5.* - -> Merge Full Join - Output: ft4.c1, ft4.*, ft5.c1, ft5.* - Merge Cond: (ft4.c1 = ft5.c1) - Filter: ((ft4.c1 IS NULL) OR (ft4.c1 IS NOT NULL)) - -> Sort - Output: ft4.c1, ft4.* - Sort Key: ft4.c1 - -> Foreign Scan on public.ft4 - Output: ft4.c1, ft4.* - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Sort - Output: ft5.c1, ft5.* - Sort Key: ft5.c1 - -> Foreign Scan on public.ft5 - Output: ft5.c1, ft5.* - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(28 rows) - ---Testcase 123: -SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM "S 1"."T 3" WHERE c1 = 50) t1 INNER JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY t1.c1, ss.a, ss.b FOR UPDATE OF t1; - c1 | a | b -----+----+---- - 50 | 50 | - 50 | 52 | - 50 | 54 | 54 - 50 | 56 | - 50 | 58 | - 50 | 60 | 60 - 50 | | 51 - 50 | | 57 -(8 rows) - --- full outer join + inner join ---Testcase 124: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1, t3.c1 FROM ft4 t1 INNER JOIN ft5 t2 ON (t1.c1 = t2.c1 + 1 and t1.c1 between 50 and 60) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1, t2.c1, t3.c1 LIMIT 10; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c1, t3.c1 - -> Sort - Output: t1.c1, t2.c1, t3.c1 - Sort Key: t1.c1, t2.c1, t3.c1 - -> Hash Full Join - Output: t1.c1, t2.c1, t3.c1 - Hash Cond: (t3.c1 = t2.c1) - -> Foreign Scan on public.ft4 t3 - Output: t3.c1, t3.c2, t3.c3 - InfluxDB query: SELECT "c1" FROM "T3" - -> Hash - Output: t1.c1, t2.c1 - -> Hash Join - Output: t1.c1, t2.c1 - Hash Cond: ((t2.c1 + 1) = t1.c1) - -> Foreign Scan on public.ft5 t2 - Output: t2.c1, t2.c2, t2.c3 - InfluxDB query: SELECT "c1" FROM "T4" - -> Hash - Output: t1.c1 - -> Foreign Scan on public.ft4 t1 - Output: t1.c1 - InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(24 rows) - ---Testcase 125: -SELECT t1.c1, t2.c1, t3.c1 FROM ft4 t1 INNER JOIN ft5 t2 ON (t1.c1 = t2.c1 + 1 and t1.c1 between 50 and 60) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1, t2.c1, t3.c1 LIMIT 10; - c1 | c1 | c1 -----+----+---- - 52 | 51 | - 58 | 57 | - | | 2 - | | 4 - | | 6 - | | 8 - | | 10 - | | 12 - | | 14 - | | 16 -(10 rows) - --- full outer join three tables ---Testcase 126: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c2, t3.c3 - -> Hash Full Join - Output: t1.c1, t2.c2, t3.c3 - Hash Cond: (t2.c1 = t3.c1) - -> Hash Full Join - Output: t1.c1, t2.c2, t2.c1 - Hash Cond: (t1.c1 = t2.c1) - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Hash - Output: t2.c2, t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Hash - Output: t3.c3, t3.c1 - -> Foreign Scan on public.ft4 t3 - Output: t3.c3, t3.c1 - InfluxDB query: SELECT "c1", "c3" FROM "T3" -(21 rows) - ---Testcase 127: -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- full outer join + right outer join ---Testcase 128: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c2, t3.c3 - -> Nested Loop Left Join - Output: t1.c1, t2.c2, t3.c3 - Join Filter: (t1.c1 = t2.c1) - -> Nested Loop Left Join - Output: t3.c3, t2.c2, t2.c1 - Join Filter: (t2.c1 = t3.c1) - -> Foreign Scan on public.ft4 t3 - Output: t3.c1, t3.c2, t3.c3 - InfluxDB query: SELECT "c1", "c3" FROM "T3" - -> Materialize - Output: t2.c2, t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Materialize - Output: t1.c1 - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(21 rows) - ---Testcase 129: -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 22 | 2 | AAA022 - 24 | 4 | AAA024 - 26 | 6 | AAA026 - 28 | 8 | AAA028 - 30 | 0 | AAA030 - 32 | 2 | AAA032 - 34 | 4 | AAA034 - 36 | 6 | AAA036 - 38 | 8 | AAA038 - 40 | 0 | AAA040 -(10 rows) - --- right outer join + full outer join ---Testcase 130: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c2, t3.c3 - -> Hash Full Join - Output: t1.c1, t2.c2, t3.c3 - Hash Cond: (t2.c1 = t3.c1) - -> Nested Loop Left Join - Output: t2.c2, t2.c1, t1.c1 - Join Filter: (t1.c1 = t2.c1) - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Materialize - Output: t1.c1 - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Hash - Output: t3.c3, t3.c1 - -> Foreign Scan on public.ft4 t3 - Output: t3.c3, t3.c1 - InfluxDB query: SELECT "c1", "c3" FROM "T3" -(21 rows) - ---Testcase 131: -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- full outer join + left outer join ---Testcase 132: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c2, t3.c3 - -> Nested Loop Left Join - Output: t1.c1, t2.c2, t3.c3 - Join Filter: (t2.c1 = t3.c1) - -> Hash Full Join - Output: t1.c1, t2.c2, t2.c1 - Hash Cond: (t1.c1 = t2.c1) - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Hash - Output: t2.c2, t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Materialize - Output: t3.c3, t3.c1 - -> Foreign Scan on public.ft4 t3 - Output: t3.c3, t3.c1 - InfluxDB query: SELECT "c1", "c3" FROM "T3" -(21 rows) - ---Testcase 133: -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- left outer join + full outer join ---Testcase 134: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c2, t3.c3 - -> Hash Full Join - Output: t1.c1, t2.c2, t3.c3 - Hash Cond: (t2.c1 = t3.c1) - -> Nested Loop Left Join - Output: t1.c1, t2.c2, t2.c1 - Join Filter: (t1.c1 = t2.c1) - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Materialize - Output: t2.c2, t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Hash - Output: t3.c3, t3.c1 - -> Foreign Scan on public.ft4 t3 - Output: t3.c3, t3.c1 - InfluxDB query: SELECT "c1", "c3" FROM "T3" -(21 rows) - ---Testcase 135: -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- right outer join + left outer join ---Testcase 136: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------ - Limit - Output: t1.c1, t2.c2, t3.c3 - -> Nested Loop Left Join - Output: t1.c1, t2.c2, t3.c3 - Join Filter: (t1.c1 = t2.c1) - -> Nested Loop Left Join - Output: t2.c2, t2.c1, t3.c3 - Join Filter: (t2.c1 = t3.c1) - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Materialize - Output: t3.c3, t3.c1 - -> Foreign Scan on public.ft4 t3 - Output: t3.c3, t3.c1 - InfluxDB query: SELECT "c1", "c3" FROM "T3" - -> Materialize - Output: t1.c1 - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(21 rows) - ---Testcase 137: -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- left outer join + right outer join ---Testcase 138: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c2, t3.c3 - -> Hash Right Join - Output: t1.c1, t2.c2, t3.c3 - Hash Cond: (t2.c1 = t3.c1) - -> Nested Loop - Output: t1.c1, t2.c2, t2.c1 - Join Filter: (t1.c1 = t2.c1) - -> Foreign Scan on public.ft2 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Materialize - Output: t2.c2, t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Hash - Output: t3.c3, t3.c1 - -> Foreign Scan on public.ft4 t3 - Output: t3.c3, t3.c1 - InfluxDB query: SELECT "c1", "c3" FROM "T3" -(21 rows) - ---Testcase 139: -SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 22 | 2 | AAA022 - 24 | 4 | AAA024 - 26 | 6 | AAA026 - 28 | 8 | AAA028 - 30 | 0 | AAA030 - 32 | 2 | AAA032 - 34 | 4 | AAA034 - 36 | 6 | AAA036 - 38 | 8 | AAA038 - 40 | 0 | AAA040 -(10 rows) - --- full outer join + WHERE clause, only matched rows ---Testcase 140: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) WHERE (t1.c1 = t2.c1 OR t1.c1 IS NULL) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------ - Limit - Output: t1.c1, t2.c1 - -> Sort - Output: t1.c1, t2.c1 - Sort Key: t1.c1, t2.c1 - -> Merge Full Join - Output: t1.c1, t2.c1 - Merge Cond: (t1.c1 = t2.c1) - Filter: ((t1.c1 = t2.c1) OR (t1.c1 IS NULL)) - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft4 t1 - Output: t1.c1 - InfluxDB query: SELECT "c1" FROM "T3" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft5 t2 - Output: t2.c1 - InfluxDB query: SELECT "c1" FROM "T4" -(21 rows) - ---Testcase 141: -SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) WHERE (t1.c1 = t2.c1 OR t1.c1 IS NULL) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; - c1 | c1 -----+---- - 66 | 66 - 72 | 72 - 78 | 78 - 84 | 84 - 90 | 90 - 96 | 96 - | 3 - | 9 - | 15 - | 21 -(10 rows) - --- full outer join + WHERE clause with shippable extensions set ---Testcase 142: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t1.c3 FROM ft1 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE influxdb_fdw_abs(t1.c1) > 0 OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c2, t1.c3 - -> Hash Full Join - Output: t1.c1, t2.c2, t1.c3 - Hash Cond: (t2.c1 = t1.c1) - Filter: (influxdb_fdw_abs(t1.c1) > 0) - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Hash - Output: t1.c1, t1.c3 - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c3 - InfluxDB query: SELECT "C 1", "c3" FROM "T1" -(14 rows) - --- skip, influxdb does not have option 'extensions' --- ALTER SERVER influxdb_svr OPTIONS (DROP extensions); --- full outer join + WHERE clause with shippable extensions not set --- EXPLAIN (VERBOSE, COSTS OFF) --- SELECT t1.c1, t2.c2, t1.c3 FROM ft1 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE influxdb_fdw_abs(t1.c1) > 0 OFFSET 10 LIMIT 10; --- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); --- join two tables with FOR UPDATE clause --- tests whole-row reference for row marks ---Testcase 143: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE OF t1; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - -> LockRows - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - -> Sort - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - Sort Key: t1.c3, t1.c1 - -> Hash Join - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - Hash Cond: (t2.c1 = t1.c1) - -> Foreign Scan on public.ft2 t2 - Output: t2.c1, t2.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" - -> Hash - Output: t1.c1, t1.c3, t1.* - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c3, t1.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(18 rows) - ---Testcase 144: -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE OF t1; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - ---Testcase 145: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - -> LockRows - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - -> Sort - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - Sort Key: t1.c3, t1.c1 - -> Hash Join - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - Hash Cond: (t2.c1 = t1.c1) - -> Foreign Scan on public.ft2 t2 - Output: t2.c1, t2.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" - -> Hash - Output: t1.c1, t1.c3, t1.* - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c3, t1.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(18 rows) - ---Testcase 146: -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- join two tables with FOR SHARE clause ---Testcase 147: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE OF t1; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - -> LockRows - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - -> Sort - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - Sort Key: t1.c3, t1.c1 - -> Hash Join - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - Hash Cond: (t2.c1 = t1.c1) - -> Foreign Scan on public.ft2 t2 - Output: t2.c1, t2.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" - -> Hash - Output: t1.c1, t1.c3, t1.* - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c3, t1.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(18 rows) - ---Testcase 148: -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE OF t1; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - ---Testcase 149: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - -> LockRows - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - -> Sort - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - Sort Key: t1.c3, t1.c1 - -> Hash Join - Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* - Hash Cond: (t2.c1 = t1.c1) - -> Foreign Scan on public.ft2 t2 - Output: t2.c1, t2.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" - -> Hash - Output: t1.c1, t1.c3, t1.* - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c3, t1.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(18 rows) - ---Testcase 150: -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- join in CTE ---Testcase 151: -EXPLAIN (VERBOSE, COSTS OFF) -WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; -ERROR: syntax error at or near "MATERIALIZED" -LINE 2: WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.... - ^ ---Testcase 152: -WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; -ERROR: syntax error at or near "MATERIALIZED" -LINE 1: WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.... - ^ --- ctid with whole-row reference ---Testcase 153: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.ctid, t1, t2, t1.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Limit - Output: t1.ctid, t1.*, t2.*, t1.c1, t1.c3 - -> Sort - Output: t1.ctid, t1.*, t2.*, t1.c1, t1.c3 - Sort Key: t1.c3, t1.c1 - -> Hash Join - Output: t1.ctid, t1.*, t2.*, t1.c1, t1.c3 - Hash Cond: (t2.c1 = t1.c1) - -> Foreign Scan on public.ft2 t2 - Output: t2.*, t2.c1 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" - -> Hash - Output: t1.ctid, t1.*, t1.c1, t1.c3 - -> Foreign Scan on public.ft1 t1 - Output: t1.ctid, t1.*, t1.c1, t1.c3 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(16 rows) - --- SEMI JOIN, not pushed down ---Testcase 154: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c1) ORDER BY t1.c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1.c1 - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Hash Join - Output: t1.c1 - Inner Unique: true - Hash Cond: (t1.c1 = t2.c1) - -> Foreign Scan on public.ft1 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Hash - Output: t2.c1 - -> HashAggregate - Output: t2.c1 - Group Key: t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(20 rows) - ---Testcase 155: -SELECT t1.c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c1) ORDER BY t1.c1 OFFSET 100 LIMIT 10; - c1 ------ - 101 - 102 - 103 - 104 - 105 - 106 - 107 - 108 - 109 - 110 -(10 rows) - --- ANTI JOIN, not pushed down ---Testcase 156: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c2) ORDER BY t1.c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------ - Limit - Output: t1.c1 - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Hash Anti Join - Output: t1.c1 - Hash Cond: (t1.c1 = t2.c2) - -> Foreign Scan on public.ft1 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Hash - Output: t2.c2 - -> Foreign Scan on public.ft2 t2 - Output: t2.c2 - InfluxDB query: SELECT "c2" FROM "T1" -(16 rows) - ---Testcase 157: -SELECT t1.c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c2) ORDER BY t1.c1 OFFSET 100 LIMIT 10; - c1 ------ - 110 - 111 - 112 - 113 - 114 - 115 - 116 - 117 - 118 - 119 -(10 rows) - --- CROSS JOIN can be pushed down ---Testcase 158: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft1 t1 CROSS JOIN ft2 t2 ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c1 - -> Sort - Output: t1.c1, t2.c1 - Sort Key: t1.c1, t2.c1 - -> Nested Loop - Output: t1.c1, t2.c1 - -> Foreign Scan on public.ft1 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Materialize - Output: t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(15 rows) - ---Testcase 159: -SELECT t1.c1, t2.c1 FROM ft1 t1 CROSS JOIN ft2 t2 ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; - c1 | c1 -----+----- - 1 | 101 - 1 | 102 - 1 | 103 - 1 | 104 - 1 | 105 - 1 | 106 - 1 | 107 - 1 | 108 - 1 | 109 - 1 | 110 -(10 rows) - --- different server, not pushed down. No result expected. ---Testcase 160: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft5 t1 JOIN ft6 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------ - Limit - Output: t1.c1, t2.c1 - -> Merge Join - Output: t1.c1, t2.c1 - Merge Cond: (t1.c1 = t2.c1) - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft5 t1 - Output: t1.c1 - InfluxDB query: SELECT "c1" FROM "T4" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft6 t2 - Output: t2.c1 - InfluxDB query: SELECT "c1" FROM "T4" -(17 rows) - ---Testcase 161: -SELECT t1.c1, t2.c1 FROM ft5 t1 JOIN ft6 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; - c1 | c1 -----+---- -(0 rows) - --- unsafe join conditions (c8 has a UDT), not pushed down. Practically a CROSS --- JOIN since c8 in both tables has same value. ---Testcase 162: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c8 = t2.c8) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c1 - -> Sort - Output: t1.c1, t2.c1 - Sort Key: t1.c1, t2.c1 - -> Merge Left Join - Output: t1.c1, t2.c1 - Merge Cond: (t1.c8 = t2.c8) - -> Sort - Output: t1.c1, t1.c8 - Sort Key: t1.c8 - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c8 - InfluxDB query: SELECT "C 1", "c8" FROM "T1" - -> Sort - Output: t2.c1, t2.c8 - Sort Key: t2.c8 - -> Foreign Scan on public.ft2 t2 - Output: t2.c1, t2.c8 - InfluxDB query: SELECT "C 1", "c8" FROM "T1" -(20 rows) - ---Testcase 163: -SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c8 = t2.c8) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; - c1 | c1 -----+----- - 1 | 101 - 1 | 102 - 1 | 103 - 1 | 104 - 1 | 105 - 1 | 106 - 1 | 107 - 1 | 108 - 1 | 109 - 1 | 110 -(10 rows) - --- unsafe conditions on one side (c8 has a UDT), not pushed down. ---Testcase 164: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = 'foo' ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------ - Limit - Output: t1.c1, t2.c1, t1.c3 - -> Sort - Output: t1.c1, t2.c1, t1.c3 - Sort Key: t1.c3, t1.c1 - -> Hash Right Join - Output: t1.c1, t2.c1, t1.c3 - Hash Cond: (t2.c1 = t1.c1) - -> Foreign Scan on public.ft2 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Hash - Output: t1.c1, t1.c3 - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c3 - InfluxDB query: SELECT "C 1", "c3" FROM "T1" WHERE (("c8" = 'foo')) -(16 rows) - ---Testcase 165: -SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = 'foo' ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- join where unsafe to pushdown condition in WHERE clause has a column not --- in the SELECT clause. In this test unsafe clause needs to have column --- references from both joining sides so that the clause is not pushed down --- into one of the joining sides. ---Testcase 166: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------- - Limit - Output: t1.c1, t2.c1, t1.c3 - -> Sort - Output: t1.c1, t2.c1, t1.c3 - Sort Key: t1.c3, t1.c1 - -> Merge Join - Output: t1.c1, t2.c1, t1.c3 - Merge Cond: ((t1.c1 = t2.c1) AND (t1.c8 = t2.c8)) - -> Sort - Output: t1.c1, t1.c3, t1.c8 - Sort Key: t1.c1, t1.c8 - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c3, t1.c8 - InfluxDB query: SELECT "C 1", "c3", "c8" FROM "T1" - -> Sort - Output: t2.c1, t2.c8 - Sort Key: t2.c1, t2.c8 - -> Foreign Scan on public.ft2 t2 - Output: t2.c1, t2.c8 - InfluxDB query: SELECT "C 1", "c8" FROM "T1" -(20 rows) - ---Testcase 167: -SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- Aggregate after UNION, for testing setrefs ---Testcase 168: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) UNION SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------- - Limit - Output: t1.c1, (avg((t1.c1 + t2.c1))) - -> Sort - Output: t1.c1, (avg((t1.c1 + t2.c1))) - Sort Key: t1.c1 - -> HashAggregate - Output: t1.c1, avg((t1.c1 + t2.c1)) - Group Key: t1.c1 - -> HashAggregate - Output: t1.c1, t2.c1 - Group Key: t1.c1, t2.c1 - -> Append - -> Merge Join - Output: t1.c1, t2.c1 - Merge Cond: (t1.c1 = t2.c1) - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft1 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Merge Join - Output: t1_1.c1, t2_1.c1 - Merge Cond: (t1_1.c1 = t2_1.c1) - -> Sort - Output: t1_1.c1 - Sort Key: t1_1.c1 - -> Foreign Scan on public.ft1 t1_1 - Output: t1_1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Sort - Output: t2_1.c1 - Sort Key: t2_1.c1 - -> Foreign Scan on public.ft2 t2_1 - Output: t2_1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(42 rows) - ---Testcase 169: -SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) UNION SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; - t1c1 | avg -------+---------------------- - 101 | 202.0000000000000000 - 102 | 204.0000000000000000 - 103 | 206.0000000000000000 - 104 | 208.0000000000000000 - 105 | 210.0000000000000000 - 106 | 212.0000000000000000 - 107 | 214.0000000000000000 - 108 | 216.0000000000000000 - 109 | 218.0000000000000000 - 110 | 220.0000000000000000 -(10 rows) - --- join with lateral reference ---Testcase 170: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1."C 1" FROM "S 1"."T 1" t1, LATERAL (SELECT DISTINCT t2.c1, t3.c1 FROM ft1 t2, ft2 t3 WHERE t2.c1 = t3.c1 AND t2.c2 = t1.c2) q ORDER BY t1."C 1" OFFSET 10 LIMIT 10; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Limit - Output: t1."C 1" - -> Sort - Output: t1."C 1" - Sort Key: t1."C 1" - -> Nested Loop - Output: t1."C 1" - -> Foreign Scan on "S 1"."T 1" t1 - Output: t1."C 1", t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" - -> Unique - Output: t2.c1, t3.c1 - -> Sort - Output: t2.c1, t3.c1 - Sort Key: t2.c1 - -> Hash Join - Output: t2.c1, t3.c1 - Hash Cond: (t3.c1 = t2.c1) - -> Foreign Scan on public.ft2 t3 - Output: t3.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Hash - Output: t2.c1 - -> Foreign Scan on public.ft1 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("c2" = $1)) -(26 rows) - ---Testcase 171: -SELECT t1."C 1" FROM "S 1"."T 1" t1, LATERAL (SELECT DISTINCT t2.c1, t3.c1 FROM ft1 t2, ft2 t3 WHERE t2.c1 = t3.c1 AND t2.c2 = t1.c2) q ORDER BY t1."C 1" OFFSET 10 LIMIT 10; - C 1 ------ - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 -(10 rows) - --- non-Var items in targetlist of the nullable rel of a join preventing --- push-down in some cases --- unable to push {ft1, ft2} ---Testcase 172: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT q.a, ft2.c1 FROM (SELECT 13 FROM ft1 WHERE c1 = 13) q(a) RIGHT JOIN ft2 ON (q.a = ft2.c1) WHERE ft2.c1 BETWEEN 10 AND 15; - QUERY PLAN ------------------------------------------------------------------------------------------- - Nested Loop Left Join - Output: (13), ft2.c1 - Join Filter: (13 = ft2.c1) - -> Foreign Scan on public.ft2 - Output: ft2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("C 1" >= 10)) AND (("C 1" <= 15)) - -> Materialize - Output: (13) - -> Foreign Scan on public.ft1 - Output: 13 - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 13)) -(11 rows) - ---Testcase 173: -SELECT q.a, ft2.c1 FROM (SELECT 13 FROM ft1 WHERE c1 = 13) q(a) RIGHT JOIN ft2 ON (q.a = ft2.c1) WHERE ft2.c1 BETWEEN 10 AND 15; - a | c1 -----+---- - | 10 - | 11 - | 12 - 13 | 13 - | 14 - | 15 -(6 rows) - --- ok to push {ft1, ft2} but not {ft1, ft2, ft4} ---Testcase 174: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ft4.c1, q.* FROM ft4 LEFT JOIN (SELECT 13, ft1.c1, ft2.c1 FROM ft1 RIGHT JOIN ft2 ON (ft1.c1 = ft2.c1) WHERE ft1.c1 = 12) q(a, b, c) ON (ft4.c1 = q.b) WHERE ft4.c1 BETWEEN 10 AND 15; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Hash Right Join - Output: ft4.c1, (13), ft1.c1, ft2.c1 - Hash Cond: (ft1.c1 = ft4.c1) - -> Nested Loop - Output: ft1.c1, ft2.c1, 13 - -> Foreign Scan on public.ft1 - Output: ft1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("C 1" = 12)) - -> Materialize - Output: ft2.c1 - -> Foreign Scan on public.ft2 - Output: ft2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("C 1" = 12)) - -> Hash - Output: ft4.c1 - -> Foreign Scan on public.ft4 - Output: ft4.c1 - InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 10)) AND (("c1" <= 15)) -(18 rows) - ---Testcase 175: -SELECT ft4.c1, q.* FROM ft4 LEFT JOIN (SELECT 13, ft1.c1, ft2.c1 FROM ft1 RIGHT JOIN ft2 ON (ft1.c1 = ft2.c1) WHERE ft1.c1 = 12) q(a, b, c) ON (ft4.c1 = q.b) WHERE ft4.c1 BETWEEN 10 AND 15 ORDER BY ft4.c1; - c1 | a | b | c -----+----+----+---- - 10 | | | - 12 | 13 | 12 | 12 - 14 | | | -(3 rows) - --- join with nullable side with some columns with null values --- influxdb_fdw does not support UPDATE --- UPDATE ft5 SET c3 = null where c1 % 9 = 0; ---Testcase 176: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ft5, ft5.c1, ft5.c2, ft5.c3, ft4.c1, ft4.c2 FROM ft5 left join ft4 on ft5.c1 = ft4.c1 WHERE ft4.c1 BETWEEN 10 and 30 ORDER BY ft5.c1, ft4.c1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Sort - Output: ft5.*, ft5.c1, ft5.c2, ft5.c3, ft4.c1, ft4.c2 - Sort Key: ft5.c1 - -> Hash Join - Output: ft5.*, ft5.c1, ft5.c2, ft5.c3, ft4.c1, ft4.c2 - Hash Cond: (ft5.c1 = ft4.c1) - -> Foreign Scan on public.ft5 - Output: ft5.*, ft5.c1, ft5.c2, ft5.c3 - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" - -> Hash - Output: ft4.c1, ft4.c2 - -> Foreign Scan on public.ft4 - Output: ft4.c1, ft4.c2 - InfluxDB query: SELECT "c1", "c2" FROM "T3" WHERE (("c1" >= 10)) AND (("c1" <= 30)) -(14 rows) - ---Testcase 177: -SELECT ft5, ft5.c1, ft5.c2, ft5.c3, ft4.c1, ft4.c2 FROM ft5 left join ft4 on ft5.c1 = ft4.c1 WHERE ft4.c1 BETWEEN 10 and 30 ORDER BY ft5.c1, ft4.c1; - ft5 | c1 | c2 | c3 | c1 | c2 -----------------+----+----+--------+----+---- - (12,13,AAA012) | 12 | 13 | AAA012 | 12 | 13 - (18,19,AAA018) | 18 | 19 | AAA018 | 18 | 19 - (24,25,AAA024) | 24 | 25 | AAA024 | 24 | 25 - (30,31,AAA030) | 30 | 31 | AAA030 | 30 | 31 -(4 rows) - --- multi-way join involving multiple merge joins --- (this case used to have EPQ-related planning problems) ---Testcase 178: -CREATE FOREIGN TABLE local_tbl (c1 int NOT NULL, c2 int NOT NULL, c3 text) SERVER influxdb_svr OPTIONS (table 'local_tbl'); ---Testcase 179: -INSERT INTO local_tbl SELECT id, id % 10, to_char(id, 'FM0000') FROM generate_series(1, 1000) id; ---ANALYZE local_tbl; -SET enable_nestloop TO false; -SET enable_hashjoin TO false; ---Testcase 180: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE ft1.c1 = ft2.c1 AND ft1.c2 = ft4.c1 - AND ft1.c2 = ft5.c1 AND ft1.c2 = local_tbl.c1 AND ft1.c1 < 100 AND ft2.c1 < 100 ORDER BY ft1.c1 FOR UPDATE; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - LockRows - Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft4.c1, ft4.c2, ft4.c3, ft5.c1, ft5.c2, ft5.c3, local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* - -> Sort - Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft4.c1, ft4.c2, ft4.c3, ft5.c1, ft5.c2, ft5.c3, local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* - Sort Key: ft1.c1 - -> Merge Join - Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft4.c1, ft4.c2, ft4.c3, ft5.c1, ft5.c2, ft5.c3, local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* - Merge Cond: (ft1.c2 = local_tbl.c1) - -> Merge Join - Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.*, ft4.c1, ft4.c2, ft4.c3, ft4.*, ft5.c1, ft5.c2, ft5.c3, ft5.* - Merge Cond: (ft1.c2 = ft5.c1) - -> Merge Join - Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.*, ft4.c1, ft4.c2, ft4.c3, ft4.* - Merge Cond: (ft1.c2 = ft4.c1) - -> Sort - Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.* - Sort Key: ft1.c2 - -> Merge Join - Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.* - Merge Cond: (ft1.c1 = ft2.c1) - -> Sort - Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.* - Sort Key: ft1.c1 - -> Foreign Scan on public.ft1 - Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" < 100)) - -> Sort - Output: ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.* - Sort Key: ft2.c1 - -> Foreign Scan on public.ft2 - Output: ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.* - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" < 100)) - -> Sort - Output: ft4.c1, ft4.c2, ft4.c3, ft4.* - Sort Key: ft4.c1 - -> Foreign Scan on public.ft4 - Output: ft4.c1, ft4.c2, ft4.c3, ft4.* - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" - -> Sort - Output: ft5.c1, ft5.c2, ft5.c3, ft5.* - Sort Key: ft5.c1 - -> Foreign Scan on public.ft5 - Output: ft5.c1, ft5.c2, ft5.c3, ft5.* - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" - -> Sort - Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, local_tbl.* - Sort Key: local_tbl.c1 - -> Foreign Scan on public.local_tbl - Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, local_tbl.* - InfluxDB query: SELECT "c1", "c2", "c3" FROM "local_tbl" -(50 rows) - ---Testcase 181: -SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE ft1.c1 = ft2.c1 AND ft1.c2 = ft4.c1 - AND ft1.c2 = ft5.c1 AND ft1.c2 = local_tbl.c1 AND ft1.c1 < 100 AND ft2.c1 < 100 ORDER BY ft1.c1 FOR UPDATE; - c1 | c2 | c3 | time | c6 | c7 | c8 | c1 | c2 | c3 | time | c6 | c7 | c8 | c1 | c2 | c3 | c1 | c2 | c3 | c1 | c2 | c3 -----+----+-------+--------------------------+----+------------+-----+----+----+-------+--------------------------+----+------------+-----+----+----+--------+----+----+--------+----+----+------ - 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 - 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 - 26 | 6 | 00026 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 26 | 6 | 00026 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 - 36 | 6 | 00036 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 36 | 6 | 00036 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 - 46 | 6 | 00046 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 46 | 6 | 00046 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 - 56 | 6 | 00056 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 56 | 6 | 00056 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 - 66 | 6 | 00066 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 66 | 6 | 00066 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 - 76 | 6 | 00076 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 76 | 6 | 00076 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 - 86 | 6 | 00086 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 86 | 6 | 00086 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 - 96 | 6 | 00096 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 96 | 6 | 00096 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 -(10 rows) - -RESET enable_nestloop; -RESET enable_hashjoin; ---Testcase 182: -DELETE FROM local_tbl; -DROP FOREIGN TABLE local_tbl; --- check join pushdown in situations where multiple userids are involved ---Testcase 183: -CREATE ROLE regress_view_owner SUPERUSER; ---Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); -GRANT SELECT ON ft4 TO regress_view_owner; -GRANT SELECT ON ft5 TO regress_view_owner; ---Testcase 185: -CREATE VIEW v4 AS SELECT * FROM ft4; ---Testcase 186: -CREATE VIEW v5 AS SELECT * FROM ft5; -ALTER VIEW v5 OWNER TO regress_view_owner; ---Testcase 187: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can't be pushed down, different view owners - QUERY PLAN ------------------------------------------------------------------------ - Limit - Output: ft4.c1, ft5.c2, ft5.c1 - -> Sort - Output: ft4.c1, ft5.c2, ft5.c1 - Sort Key: ft4.c1, ft5.c1 - -> Merge Right Join - Output: ft4.c1, ft5.c2, ft5.c1 - Merge Cond: (ft5.c1 = ft4.c1) - -> Sort - Output: ft5.c2, ft5.c1 - Sort Key: ft5.c1 - -> Foreign Scan on public.ft5 - Output: ft5.c2, ft5.c1 - InfluxDB query: SELECT "c1", "c2" FROM "T4" - -> Sort - Output: ft4.c1 - Sort Key: ft4.c1 - -> Foreign Scan on public.ft4 - Output: ft4.c1 - InfluxDB query: SELECT "c1" FROM "T3" -(20 rows) - ---Testcase 188: -SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; - c1 | c2 -----+---- - 22 | - 24 | 25 - 26 | - 28 | - 30 | 31 - 32 | - 34 | - 36 | 37 - 38 | - 40 | -(10 rows) - -ALTER VIEW v4 OWNER TO regress_view_owner; ---Testcase 189: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can be pushed down - QUERY PLAN ------------------------------------------------------------------------ - Limit - Output: ft4.c1, ft5.c2, ft5.c1 - -> Sort - Output: ft4.c1, ft5.c2, ft5.c1 - Sort Key: ft4.c1, ft5.c1 - -> Merge Right Join - Output: ft4.c1, ft5.c2, ft5.c1 - Merge Cond: (ft5.c1 = ft4.c1) - -> Sort - Output: ft5.c2, ft5.c1 - Sort Key: ft5.c1 - -> Foreign Scan on public.ft5 - Output: ft5.c2, ft5.c1 - InfluxDB query: SELECT "c1", "c2" FROM "T4" - -> Sort - Output: ft4.c1 - Sort Key: ft4.c1 - -> Foreign Scan on public.ft4 - Output: ft4.c1 - InfluxDB query: SELECT "c1" FROM "T3" -(20 rows) - ---Testcase 190: -SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; - c1 | c2 -----+---- - 22 | - 24 | 25 - 26 | - 28 | - 30 | 31 - 32 | - 34 | - 36 | 37 - 38 | - 40 | -(10 rows) - ---Testcase 191: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can't be pushed down, view owner not current user - QUERY PLAN ------------------------------------------------------------------------ - Limit - Output: ft4.c1, t2.c2, t2.c1 - -> Sort - Output: ft4.c1, t2.c2, t2.c1 - Sort Key: ft4.c1, t2.c1 - -> Merge Right Join - Output: ft4.c1, t2.c2, t2.c1 - Merge Cond: (t2.c1 = ft4.c1) - -> Sort - Output: t2.c2, t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft5 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "c1", "c2" FROM "T4" - -> Sort - Output: ft4.c1 - Sort Key: ft4.c1 - -> Foreign Scan on public.ft4 - Output: ft4.c1 - InfluxDB query: SELECT "c1" FROM "T3" -(20 rows) - ---Testcase 192: -SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; - c1 | c2 -----+---- - 22 | - 24 | 25 - 26 | - 28 | - 30 | 31 - 32 | - 34 | - 36 | 37 - 38 | - 40 | -(10 rows) - -ALTER VIEW v4 OWNER TO CURRENT_USER; ---Testcase 193: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can be pushed down - QUERY PLAN ------------------------------------------------------------------------ - Limit - Output: ft4.c1, t2.c2, t2.c1 - -> Sort - Output: ft4.c1, t2.c2, t2.c1 - Sort Key: ft4.c1, t2.c1 - -> Merge Right Join - Output: ft4.c1, t2.c2, t2.c1 - Merge Cond: (t2.c1 = ft4.c1) - -> Sort - Output: t2.c2, t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft5 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "c1", "c2" FROM "T4" - -> Sort - Output: ft4.c1 - Sort Key: ft4.c1 - -> Foreign Scan on public.ft4 - Output: ft4.c1 - InfluxDB query: SELECT "c1" FROM "T3" -(20 rows) - ---Testcase 194: -SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; - c1 | c2 -----+---- - 22 | - 24 | 25 - 26 | - 28 | - 30 | 31 - 32 | - 34 | - 36 | 37 - 38 | - 40 | -(10 rows) - -ALTER VIEW v4 OWNER TO regress_view_owner; --- cleanup ---Testcase 195: -DROP OWNED BY regress_view_owner; ---Testcase 196: -DROP ROLE regress_view_owner; --- =================================================================== --- Aggregate and grouping queries --- =================================================================== --- Simple aggregates ---Testcase 197: -explain (verbose, costs off) -select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------- - Result - Output: (count(c6)), (sum(c1)), (avg(c1)), (min(c2)), (max(c1)), (stddev(c2)), ((sum(c1)) * ((random() <= '1'::double precision))::integer), c2 - -> Sort - Output: (count(c6)), (sum(c1)), (avg(c1)), (min(c2)), (max(c1)), (stddev(c2)), c2 - Sort Key: (count(ft1.c6)), (sum(ft1.c1)) - -> HashAggregate - Output: count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), c2 - Group Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c6, c1 - InfluxDB query: SELECT "C 1", "c2", "c6" FROM "T1" WHERE (("c2" < 5)) -(11 rows) - ---Testcase 198: -select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2; - count | sum | avg | min | max | stddev | sum2 --------+-------+----------------------+-----+------+--------+------- - 100 | 49600 | 496.0000000000000000 | 1 | 991 | 0 | 49600 - 100 | 49700 | 497.0000000000000000 | 2 | 992 | 0 | 49700 - 100 | 49800 | 498.0000000000000000 | 3 | 993 | 0 | 49800 - 100 | 49900 | 499.0000000000000000 | 4 | 994 | 0 | 49900 - 100 | 50500 | 505.0000000000000000 | 0 | 1000 | 0 | 50500 -(5 rows) - ---Testcase 199: -explain (verbose, costs off) -select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2 limit 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (count(c6)), (sum(c1)), (avg(c1)), (min(c2)), (max(c1)), (stddev(c2)), (((sum(c1)) * ((random() <= '1'::double precision))::integer)), c2 - -> Result - Output: (count(c6)), (sum(c1)), (avg(c1)), (min(c2)), (max(c1)), (stddev(c2)), ((sum(c1)) * ((random() <= '1'::double precision))::integer), c2 - -> Sort - Output: (count(c6)), (sum(c1)), (avg(c1)), (min(c2)), (max(c1)), (stddev(c2)), c2 - Sort Key: (count(ft1.c6)), (sum(ft1.c1)) - -> HashAggregate - Output: count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), c2 - Group Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c6, c1 - InfluxDB query: SELECT "C 1", "c2", "c6" FROM "T1" WHERE (("c2" < 5)) -(13 rows) - ---Testcase 200: -select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2 limit 1; - count | sum | avg | min | max | stddev | sum2 --------+-------+----------------------+-----+-----+--------+------- - 100 | 49600 | 496.0000000000000000 | 1 | 991 | 0 | 49600 -(1 row) - --- Aggregate is not pushed down as aggregation contains random() ---Testcase 201: -explain (verbose, costs off) -select sum(c1 * (random() <= 1)::int) as sum, avg(c1) from ft1; - QUERY PLAN -------------------------------------------------------------------------------- - Aggregate - Output: sum((c1 * ((random() <= '1'::double precision))::integer)), avg(c1) - -> Foreign Scan on public.ft1 - Output: c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(5 rows) - --- Aggregate over join query ---Testcase 202: -explain (verbose, costs off) -select count(*), sum(t1.c1), avg(t2.c1) from ft1 t1 inner join ft1 t2 on (t1.c2 = t2.c2) where t1.c2 = 6; - QUERY PLAN -------------------------------------------------------------------------------------- - Aggregate - Output: count(*), sum(t1.c1), avg(t2.c1) - -> Nested Loop - Output: t1.c1, t2.c1 - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c2 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" = 6)) - -> Materialize - Output: t2.c1, t2.c2 - -> Foreign Scan on public.ft1 t2 - Output: t2.c1, t2.c2 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" = 6)) -(12 rows) - ---Testcase 203: -select count(*), sum(t1.c1), avg(t2.c1) from ft1 t1 inner join ft1 t2 on (t1.c2 = t2.c2) where t1.c2 = 6; - count | sum | avg --------+---------+---------------------- - 10000 | 5010000 | 501.0000000000000000 -(1 row) - --- Not pushed down due to local conditions present in underneath input rel ---Testcase 204: -explain (verbose, costs off) -select sum(t1.c1), count(t2.c1) from ft1 t1 inner join ft2 t2 on (t1.c1 = t2.c1) where ((t1.c1 * t2.c1)/(t1.c1 * t2.c1)) * random() <= 1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: sum(t1.c1), count(t2.c1) - -> Merge Join - Output: t1.c1, t2.c1 - Merge Cond: (t1.c1 = t2.c1) - Join Filter: (((((t1.c1 * t2.c1) / (t1.c1 * t2.c1)))::double precision * random()) <= '1'::double precision) - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft1 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(18 rows) - --- GROUP BY clause having expressions ---Testcase 205: -explain (verbose, costs off) -select c2/2, sum(c2) * (c2/2) from ft1 group by c2/2 order by c2/2; - QUERY PLAN ------------------------------------------------------ - Sort - Output: ((c2 / 2)), ((sum(c2) * ((c2 / 2)))) - Sort Key: ((ft1.c2 / 2)) - -> HashAggregate - Output: ((c2 / 2)), (sum(c2) * ((c2 / 2))) - Group Key: (ft1.c2 / 2) - -> Foreign Scan on public.ft1 - Output: (c2 / 2), c2 - InfluxDB query: SELECT "c2" FROM "T1" -(9 rows) - ---Testcase 206: -select c2/2, sum(c2) * (c2/2) from ft1 group by c2/2 order by c2/2; - ?column? | ?column? -----------+---------- - 0 | 0 - 1 | 500 - 2 | 1800 - 3 | 3900 - 4 | 6800 -(5 rows) - --- Aggregates in subquery are pushed down. ---Testcase 207: -explain (verbose, costs off) -select count(x.a), sum(x.a) from (select c2 a, sum(c1) b from ft1 group by c2, sqrt(c1) order by 1, 2) x; - QUERY PLAN --------------------------------------------------------------------------------- - Aggregate - Output: count(ft1.c2), sum(ft1.c2) - -> Sort - Output: ft1.c2, (sum(ft1.c1)), (sqrt((ft1.c1)::double precision)) - Sort Key: ft1.c2, (sum(ft1.c1)) - -> HashAggregate - Output: ft1.c2, sum(ft1.c1), (sqrt((ft1.c1)::double precision)) - Group Key: ft1.c2, (sqrt((ft1.c1)::double precision)) - -> Foreign Scan - Output: ft1.c2, (sqrt((ft1.c1)::double precision)), ft1.c1 - InfluxDB query: SELECT "c2", sqrt("C 1"), "C 1" FROM "T1" -(11 rows) - ---Testcase 208: -select count(x.a), sum(x.a) from (select c2 a, sum(c1) b from ft1 group by c2, sqrt(c1) order by 1, 2) x; - count | sum --------+------ - 1000 | 4500 -(1 row) - --- Aggregate is still pushed down by taking unshippable expression out ---Testcase 209: -explain (verbose, costs off) -select c2 * (random() <= 1)::int as sum1, sum(c1) * c2 as sum2 from ft1 group by c2 order by 1, 2; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Sort - Output: ((c2 * ((random() <= '1'::double precision))::integer)), ((sum(c1) * c2)), c2 - Sort Key: ((ft1.c2 * ((random() <= '1'::double precision))::integer)), ((sum(ft1.c1) * ft1.c2)) - -> HashAggregate - Output: (c2 * ((random() <= '1'::double precision))::integer), (sum(c1) * c2), c2 - Group Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" -(9 rows) - ---Testcase 210: -select c2 * (random() <= 1)::int as sum1, sum(c1) * c2 as sum2 from ft1 group by c2 order by 1, 2; - sum1 | sum2 -------+-------- - 0 | 0 - 1 | 49600 - 2 | 99400 - 3 | 149400 - 4 | 199600 - 5 | 250000 - 6 | 300600 - 7 | 351400 - 8 | 402400 - 9 | 453600 -(10 rows) - --- Aggregate with unshippable GROUP BY clause are not pushed ---Testcase 211: -explain (verbose, costs off) -select c2 * (random() <= 1)::int as c2 from ft2 group by c2 * (random() <= 1)::int order by 1; - QUERY PLAN ------------------------------------------------------------------------------- - Sort - Output: ((c2 * ((random() <= '1'::double precision))::integer)) - Sort Key: ((ft2.c2 * ((random() <= '1'::double precision))::integer)) - -> HashAggregate - Output: ((c2 * ((random() <= '1'::double precision))::integer)) - Group Key: (ft2.c2 * ((random() <= '1'::double precision))::integer) - -> Foreign Scan on public.ft2 - Output: (c2 * ((random() <= '1'::double precision))::integer) - InfluxDB query: SELECT "c2" FROM "T1" -(9 rows) - --- GROUP BY clause in various forms, cardinal, alias and constant expression ---Testcase 212: -explain (verbose, costs off) -select count(c2) w, c2 x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; - QUERY PLAN ------------------------------------------------------ - Sort - Output: (count(c2)), c2, 5, 7.0, 9 - Sort Key: ft1.c2 - -> HashAggregate - Output: count(c2), c2, (5), 7.0, (9) - Group Key: ft1.c2, 5, 9 - -> Foreign Scan on public.ft1 - Output: c2, 5, 9 - InfluxDB query: SELECT "c2" FROM "T1" -(9 rows) - ---Testcase 213: -select count(c2) w, c2 x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; - w | x | y | z ------+---+---+----- - 100 | 0 | 5 | 7.0 - 100 | 1 | 5 | 7.0 - 100 | 2 | 5 | 7.0 - 100 | 3 | 5 | 7.0 - 100 | 4 | 5 | 7.0 - 100 | 5 | 5 | 7.0 - 100 | 6 | 5 | 7.0 - 100 | 7 | 5 | 7.0 - 100 | 8 | 5 | 7.0 - 100 | 9 | 5 | 7.0 -(10 rows) - --- GROUP BY clause referring to same column multiple times --- Also, ORDER BY contains an aggregate function ---Testcase 214: -explain (verbose, costs off) -select c2, c2 from ft1 where c2 > 6 group by 1, 2 order by sum(c1); - QUERY PLAN -------------------------------------------------------------------------------- - Sort - Output: c2, c2, (sum(c1)) - Sort Key: (sum(ft1.c1)) - -> HashAggregate - Output: c2, c2, sum(c1) - Group Key: ft1.c2, ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" > 6)) -(9 rows) - ---Testcase 215: -select c2, c2 from ft1 where c2 > 6 group by 1, 2 order by sum(c1); - c2 | c2 -----+---- - 7 | 7 - 8 | 8 - 9 | 9 -(3 rows) - --- Testing HAVING clause shippability ---Testcase 216: -explain (verbose, costs off) -select c2, sum(c1) from ft2 group by c2 having avg(c1) < 500 and sum(c1) < 49800 order by c2; - QUERY PLAN ----------------------------------------------------------------------------- - Sort - Output: c2, (sum(c1)) - Sort Key: ft2.c2 - -> HashAggregate - Output: c2, sum(c1) - Group Key: ft2.c2 - Filter: ((avg(ft2.c1) < '500'::numeric) AND (sum(ft2.c1) < 49800)) - -> Foreign Scan on public.ft2 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" -(10 rows) - ---Testcase 217: -select c2, sum(c1) from ft2 group by c2 having avg(c1) < 500 and sum(c1) < 49800 order by c2; - c2 | sum -----+------- - 1 | 49600 - 2 | 49700 -(2 rows) - --- Unshippable HAVING clause will be evaluated locally, and other qual in HAVING clause is pushed down ---Testcase 218: -explain (verbose, costs off) -select count(*) from (select time, count(c1) from ft1 group by time, sqrt(c2) having (avg(c1) / avg(c1)) * random() <= 1 and avg(c1) < 500) x; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: count(*) - -> HashAggregate - Output: ft1."time", NULL::bigint, (sqrt((ft1.c2)::double precision)) - Group Key: ft1."time", (sqrt((ft1.c2)::double precision)) - Filter: ((avg(ft1.c1) < '500'::numeric) AND ((((avg(ft1.c1) / avg(ft1.c1)))::double precision * random()) <= '1'::double precision)) - -> Foreign Scan - Output: ft1."time", (sqrt((ft1.c2)::double precision)), ft1.c1 - InfluxDB query: SELECT time, sqrt("c2"), "C 1" FROM "T1" -(9 rows) - ---Testcase 219: -select count(*) from (select time, count(c1) from ft1 group by time, sqrt(c2) having (avg(c1) / avg(c1)) * random() <= 1 and avg(c1) < 500) x; - count -------- - 49 -(1 row) - --- Aggregate in HAVING clause is not pushable, and thus aggregation is not pushed down ---Testcase 220: -explain (verbose, costs off) -select sum(c1) from ft1 group by c2 having avg(c1 * (random() <= 1)::int) > 100 order by 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Sort - Output: (sum(c1)), c2 - Sort Key: (sum(ft1.c1)) - -> HashAggregate - Output: sum(c1), c2 - Group Key: ft1.c2 - Filter: (avg((ft1.c1 * ((random() <= '1'::double precision))::integer)) > '100'::numeric) - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" -(10 rows) - --- Remote aggregate in combination with a local Param (for the output --- of an initplan) can be trouble, per bug #15781 ---Testcase 221: -explain (verbose, costs off) -select exists(select 1 from pg_enum), sum(c1) from ft1; - QUERY PLAN ------------------------------------------------ - Foreign Scan - Output: $0, (sum(ft1.c1)) - InfluxDB query: SELECT sum("C 1") FROM "T1" - InitPlan 1 (returns $0) - -> Seq Scan on pg_catalog.pg_enum -(5 rows) - ---Testcase 222: -select exists(select 1 from pg_enum), sum(c1) from ft1; - exists | sum ---------+-------- - t | 500500 -(1 row) - ---Testcase 223: -explain (verbose, costs off) -select exists(select 1 from pg_enum), sum(c1) from ft1 group by 1; - QUERY PLAN ------------------------------------------------- - GroupAggregate - Output: ($0), sum(ft1.c1) - Group Key: $0 - InitPlan 1 (returns $0) - -> Seq Scan on pg_catalog.pg_enum - -> Foreign Scan on public.ft1 - Output: $0, ft1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(8 rows) - ---Testcase 224: -select exists(select 1 from pg_enum), sum(c1) from ft1 group by 1; - exists | sum ---------+-------- - t | 500500 -(1 row) - --- Testing ORDER BY, DISTINCT, FILTER, Ordered-sets and VARIADIC within aggregates --- ORDER BY within aggregate, same column used to order ---Testcase 225: -explain (verbose, costs off) -select array_agg(c1 order by c1) from ft1 where c1 < 100 group by c2 order by 1; - QUERY PLAN ----------------------------------------------------------------------------------------- - Sort - Output: (array_agg(c1 ORDER BY c1)), c2 - Sort Key: (array_agg(ft1.c1 ORDER BY ft1.c1)) - -> GroupAggregate - Output: array_agg(c1 ORDER BY c1), c2 - Group Key: ft1.c2 - -> Sort - Output: c2, c1 - Sort Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" < 100)) -(12 rows) - ---Testcase 226: -select array_agg(c1 order by c1) from ft1 where c1 < 100 group by c2 order by 1; - array_agg --------------------------------- - {1,11,21,31,41,51,61,71,81,91} - {2,12,22,32,42,52,62,72,82,92} - {3,13,23,33,43,53,63,73,83,93} - {4,14,24,34,44,54,64,74,84,94} - {5,15,25,35,45,55,65,75,85,95} - {6,16,26,36,46,56,66,76,86,96} - {7,17,27,37,47,57,67,77,87,97} - {8,18,28,38,48,58,68,78,88,98} - {9,19,29,39,49,59,69,79,89,99} - {10,20,30,40,50,60,70,80,90} -(10 rows) - --- ORDER BY within aggregate, different column used to order also using DESC ---Testcase 227: -explain (verbose, costs off) -select array_agg(time order by c1 desc) from ft2 where c2 = 6 and c1 < 50; - QUERY PLAN --------------------------------------------------------------------------------------- - Aggregate - Output: array_agg("time" ORDER BY c1 DESC) - -> Foreign Scan on public.ft2 - Output: "time", c1 - InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("C 1" < 50)) AND (("c2" = 6)) -(5 rows) - ---Testcase 228: -select array_agg(time order by c1 desc) from ft2 where c2 = 6 and c1 < 50; - array_agg ------------------------------------------------------------------------------------------------------------------------------------------- - {"Mon Feb 16 00:00:00 1970","Fri Feb 06 00:00:00 1970","Tue Jan 27 00:00:00 1970","Sat Jan 17 00:00:00 1970","Wed Jan 07 00:00:00 1970"} -(1 row) - --- DISTINCT within aggregate ---Testcase 229: -explain (verbose, costs off) -select array_agg(distinct (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; - QUERY PLAN ---------------------------------------------------------------------------------- - Sort - Output: (array_agg(DISTINCT (t1.c1 % 5))), ((t2.c1 % 3)) - Sort Key: (array_agg(DISTINCT (t1.c1 % 5))) - -> GroupAggregate - Output: array_agg(DISTINCT (t1.c1 % 5)), ((t2.c1 % 3)) - Group Key: ((t2.c1 % 3)) - -> Sort - Output: ((t2.c1 % 3)), t1.c1 - Sort Key: ((t2.c1 % 3)) - -> Merge Full Join - Output: (t2.c1 % 3), t1.c1 - Merge Cond: (t1.c1 = t2.c1) - Filter: ((t1.c1 < 20) OR ((t1.c1 IS NULL) AND (t2.c1 < 5))) - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft4 t1 - Output: t1.c1 - InfluxDB query: SELECT "c1" FROM "T3" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft5 t2 - Output: t2.c1 - InfluxDB query: SELECT "c1" FROM "T4" -(25 rows) - ---Testcase 230: -select array_agg(distinct (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; - array_agg --------------- - {0,1,2,3,4} - {1,2,3,NULL} -(2 rows) - --- DISTINCT combined with ORDER BY within aggregate ---Testcase 231: -explain (verbose, costs off) -select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; - QUERY PLAN -------------------------------------------------------------------------------------- - Sort - Output: (array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5))), ((t2.c1 % 3)) - Sort Key: (array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5))) - -> GroupAggregate - Output: array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5)), ((t2.c1 % 3)) - Group Key: ((t2.c1 % 3)) - -> Sort - Output: ((t2.c1 % 3)), t1.c1 - Sort Key: ((t2.c1 % 3)) - -> Merge Full Join - Output: (t2.c1 % 3), t1.c1 - Merge Cond: (t1.c1 = t2.c1) - Filter: ((t1.c1 < 20) OR ((t1.c1 IS NULL) AND (t2.c1 < 5))) - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft4 t1 - Output: t1.c1 - InfluxDB query: SELECT "c1" FROM "T3" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft5 t2 - Output: t2.c1 - InfluxDB query: SELECT "c1" FROM "T4" -(25 rows) - ---Testcase 232: -select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; - array_agg --------------- - {0,1,2,3,4} - {1,2,3,NULL} -(2 rows) - ---Testcase 233: -explain (verbose, costs off) -select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5 desc nulls last) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; - QUERY PLAN ------------------------------------------------------------------------------------------------------ - Sort - Output: (array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5) DESC NULLS LAST)), ((t2.c1 % 3)) - Sort Key: (array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5) DESC NULLS LAST)) - -> GroupAggregate - Output: array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5) DESC NULLS LAST), ((t2.c1 % 3)) - Group Key: ((t2.c1 % 3)) - -> Sort - Output: ((t2.c1 % 3)), t1.c1 - Sort Key: ((t2.c1 % 3)) - -> Merge Full Join - Output: (t2.c1 % 3), t1.c1 - Merge Cond: (t1.c1 = t2.c1) - Filter: ((t1.c1 < 20) OR ((t1.c1 IS NULL) AND (t2.c1 < 5))) - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft4 t1 - Output: t1.c1 - InfluxDB query: SELECT "c1" FROM "T3" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft5 t2 - Output: t2.c1 - InfluxDB query: SELECT "c1" FROM "T4" -(25 rows) - ---Testcase 234: -select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5 desc nulls last) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; - array_agg --------------- - {3,2,1,NULL} - {4,3,2,1,0} -(2 rows) - --- FILTER within aggregate ---Testcase 235: -explain (verbose, costs off) -select sum(c1) filter (where c1 < 100 and c2 > 5) from ft1 group by c2 order by 1 nulls last; - QUERY PLAN ----------------------------------------------------------------------------- - Sort - Output: (sum(c1) FILTER (WHERE ((c1 < 100) AND (c2 > 5)))), c2 - Sort Key: (sum(ft1.c1) FILTER (WHERE ((ft1.c1 < 100) AND (ft1.c2 > 5)))) - -> HashAggregate - Output: sum(c1) FILTER (WHERE ((c1 < 100) AND (c2 > 5))), c2 - Group Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" -(9 rows) - ---Testcase 236: -select sum(c1) filter (where c1 < 100 and c2 > 5) from ft1 group by c2 order by 1 nulls last; - sum ------ - 510 - 520 - 530 - 540 - - - - - - -(10 rows) - --- DISTINCT, ORDER BY and FILTER within aggregate ---Testcase 237: -explain (verbose, costs off) -select sum(c1%3), sum(distinct c1%3 order by c1%3) filter (where c1%3 < 2), c2 from ft1 where c2 = 6 group by c2; - QUERY PLAN ------------------------------------------------------------------------------------------------------ - GroupAggregate - Output: sum((c1 % 3)), sum(DISTINCT (c1 % 3) ORDER BY (c1 % 3)) FILTER (WHERE ((c1 % 3) < 2)), c2 - Group Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" = 6)) -(6 rows) - ---Testcase 238: -select sum(c1%3), sum(distinct c1%3 order by c1%3) filter (where c1%3 < 2), c2 from ft1 where c2 = 6 group by c2; - sum | sum | c2 ------+-----+---- - 99 | 1 | 6 -(1 row) - --- Outer query is aggregation query ---Testcase 239: -explain (verbose, costs off) -select distinct (select count(*) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; - QUERY PLAN -------------------------------------------------------------------------------------------- - Unique - Output: ((SubPlan 1)) - -> Sort - Output: ((SubPlan 1)) - Sort Key: ((SubPlan 1)) - -> Aggregate - Output: (SubPlan 1) - -> Foreign Scan on public.ft2 t2 - Output: t2.c2, t2.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE ((("c2" % 6) = 0)) - SubPlan 1 - -> Foreign Scan on public.ft1 t1 - Output: count(*) FILTER (WHERE ((t2.c2 = 6) AND (t2.c1 < 10))) - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 6)) -(14 rows) - ---Testcase 240: -select distinct (select count(*) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; - count -------- - 1 -(1 row) - --- Inner query is aggregation query ---Testcase 241: -explain (verbose, costs off) -select distinct (select count(t1.c1) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; - QUERY PLAN ------------------------------------------------------------------------------------------- - Unique - Output: ((SubPlan 1)) - -> Sort - Output: ((SubPlan 1)) - Sort Key: ((SubPlan 1)) - -> Foreign Scan on public.ft2 t2 - Output: (SubPlan 1) - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE ((("c2" % 6) = 0)) - SubPlan 1 - -> Aggregate - Output: count(t1.c1) FILTER (WHERE ((t2.c2 = 6) AND (t2.c1 < 10))) - -> Foreign Scan on public.ft1 t1 - Output: t1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("C 1" = 6)) -(14 rows) - ---Testcase 242: -select distinct (select count(t1.c1) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; - count -------- - 0 - 1 -(2 rows) - --- Aggregate not pushed down as FILTER condition is not pushable ---Testcase 243: -explain (verbose, costs off) -select sum(c1) filter (where (c1 / c1) * random() <= 1) from ft1 group by c2 order by 1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (sum(c1) FILTER (WHERE ((((c1 / c1))::double precision * random()) <= '1'::double precision))), c2 - Sort Key: (sum(ft1.c1) FILTER (WHERE ((((ft1.c1 / ft1.c1))::double precision * random()) <= '1'::double precision))) - -> HashAggregate - Output: sum(c1) FILTER (WHERE ((((c1 / c1))::double precision * random()) <= '1'::double precision)), c2 - Group Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" -(9 rows) - ---Testcase 244: -explain (verbose, costs off) -select sum(c2) filter (where c2 in (select c2 from ft1 where c2 < 5)) from ft1; - QUERY PLAN --------------------------------------------------------------------- - Aggregate - Output: sum(ft1.c2) FILTER (WHERE (hashed SubPlan 1)) - -> Foreign Scan on public.ft1 - Output: ft1.c2 - InfluxDB query: SELECT "c2" FROM "T1" - SubPlan 1 - -> Foreign Scan on public.ft1 ft1_1 - Output: ft1_1.c2 - InfluxDB query: SELECT "c2" FROM "T1" WHERE (("c2" < 5)) -(9 rows) - --- Ordered-sets within aggregate ---Testcase 245: -explain (verbose, costs off) -select c2, rank('10'::varchar) within group (order by c6), percentile_cont(c2/10::numeric) within group (order by c1) from ft1 where c2 < 10 group by c2 having percentile_cont(c2/10::numeric) within group (order by c1) < 500 order by c2; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - GroupAggregate - Output: c2, rank('10'::character varying) WITHIN GROUP (ORDER BY c6), percentile_cont((((c2)::numeric / '10'::numeric))::double precision) WITHIN GROUP (ORDER BY ((c1)::double precision)) - Group Key: ft1.c2 - Filter: (percentile_cont((((ft1.c2)::numeric / '10'::numeric))::double precision) WITHIN GROUP (ORDER BY ((ft1.c1)::double precision)) < '500'::double precision) - -> Sort - Output: c2, c6, c1 - Sort Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c6, c1 - InfluxDB query: SELECT "C 1", "c2", "c6" FROM "T1" WHERE (("c2" < 10)) -(10 rows) - ---Testcase 246: -select c2, rank('10'::varchar) within group (order by c6), percentile_cont(c2/10::numeric) within group (order by c1) from ft1 where c2 < 10 group by c2 having percentile_cont(c2/10::numeric) within group (order by c1) < 500 order by c2; - c2 | rank | percentile_cont -----+------+----------------- - 0 | 101 | 10 - 1 | 101 | 100 - 2 | 1 | 200 - 3 | 1 | 300 - 4 | 1 | 400 -(5 rows) - --- Using multiple arguments within aggregates ---Testcase 247: -explain (verbose, costs off) -select c1, rank(c1, c2) within group (order by c1, c2) from ft1 group by c1, c2 having c1 = 6 order by 1; - QUERY PLAN --------------------------------------------------------------------------------- - GroupAggregate - Output: c1, rank(c1, c2) WITHIN GROUP (ORDER BY c1, c2), c2 - Group Key: ft1.c1, ft1.c2 - -> Sort - Output: c1, c2 - Sort Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c1, c2 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" = 6)) -(9 rows) - ---Testcase 248: -select c1, rank(c1, c2) within group (order by c1, c2) from ft1 group by c1, c2 having c1 = 6 order by 1; - c1 | rank -----+------ - 6 | 1 -(1 row) - --- User defined function for user defined aggregate, VARIADIC ---Testcase 249: -create function least_accum(anyelement, variadic anyarray) -returns anyelement language sql as - 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; ---Testcase 250: -create aggregate least_agg(variadic items anyarray) ( - stype = anyelement, sfunc = least_accum -); --- Disable hash aggregation for plan stability. -set enable_hashagg to false; --- Not pushed down due to user defined aggregate ---Testcase 251: -explain (verbose, costs off) -select c2, least_agg(c1) from ft1 group by c2 order by c2; - QUERY PLAN ------------------------------------------------------------- - GroupAggregate - Output: c2, least_agg(VARIADIC ARRAY[c1]) - Group Key: ft1.c2 - -> Sort - Output: c2, c1 - Sort Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" -(9 rows) - --- Add function and aggregate into extension -alter extension influxdb_fdw add function least_accum(anyelement, variadic anyarray); -alter extension influxdb_fdw add aggregate least_agg(variadic items anyarray); --- Now aggregate will be pushed. Aggregate will display VARIADIC argument. ---Testcase 252: -explain (verbose, costs off) -select c2, least_agg(c1) from ft1 where c2 < 100 group by c2 order by c2; - QUERY PLAN ---------------------------------------------------------------------------------- - GroupAggregate - Output: c2, least_agg(VARIADIC ARRAY[c1]) - Group Key: ft1.c2 - -> Sort - Output: c2, c1 - Sort Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 100)) -(9 rows) - ---Testcase 253: -select c2, least_agg(c1) from ft1 where c2 < 100 group by c2 order by c2; - c2 | least_agg -----+----------- - 0 | 10 - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 5 - 6 | 6 - 7 | 7 - 8 | 8 - 9 | 9 -(10 rows) - --- Remove function and aggregate from extension -alter extension influxdb_fdw drop function least_accum(anyelement, variadic anyarray); -alter extension influxdb_fdw drop aggregate least_agg(variadic items anyarray); --- Not pushed down as we have dropped objects from extension. ---Testcase 254: -explain (verbose, costs off) -select c2, least_agg(c1) from ft1 group by c2 order by c2; - QUERY PLAN ------------------------------------------------------------- - GroupAggregate - Output: c2, least_agg(VARIADIC ARRAY[c1]) - Group Key: ft1.c2 - -> Sort - Output: c2, c1 - Sort Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" -(9 rows) - --- Cleanup -reset enable_hashagg; ---Testcase 255: -drop aggregate least_agg(variadic items anyarray); ---Testcase 256: -drop function least_accum(anyelement, variadic anyarray); --- Testing USING OPERATOR() in ORDER BY within aggregate. --- For this, we need user defined operators along with operator family and --- operator class. Create those and then add them in extension. Note that --- user defined objects are considered unshippable unless they are part of --- the extension. ---Testcase 257: -create operator public.<^ ( - leftarg = int4, - rightarg = int4, - procedure = int4eq -); ---Testcase 258: -create operator public.=^ ( - leftarg = int4, - rightarg = int4, - procedure = int4lt -); ---Testcase 259: -create operator public.>^ ( - leftarg = int4, - rightarg = int4, - procedure = int4gt -); ---Testcase 260: -create operator family my_op_family using btree; ---Testcase 261: -create function my_op_cmp(a int, b int) returns int as - $$begin return btint4cmp(a, b); end $$ language plpgsql; ---Testcase 262: -create operator class my_op_class for type int using btree family my_op_family as - operator 1 public.<^, - operator 3 public.=^, - operator 5 public.>^, - function 1 my_op_cmp(int, int); --- This will not be pushed as user defined sort operator is not part of the --- extension yet. ---Testcase 263: -explain (verbose, costs off) -select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; - QUERY PLAN ---------------------------------------------------------------------------------------------- - GroupAggregate - Output: array_agg(c1 ORDER BY c1 USING <^ NULLS LAST), c2 - Group Key: ft2.c2 - -> Foreign Scan on public.ft2 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) -(6 rows) - --- Update local stats on ft2 ---ANALYZE ft2; --- Add into extension -alter extension influxdb_fdw add operator class my_op_class using btree; -alter extension influxdb_fdw add function my_op_cmp(a int, b int); -alter extension influxdb_fdw add operator family my_op_family using btree; -alter extension influxdb_fdw add operator public.<^(int, int); -alter extension influxdb_fdw add operator public.=^(int, int); -alter extension influxdb_fdw add operator public.>^(int, int); --- Now this will be pushed as sort operator is part of the extension. ---Testcase 264: -explain (verbose, costs off) -select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; - QUERY PLAN ---------------------------------------------------------------------------------------------- - GroupAggregate - Output: array_agg(c1 ORDER BY c1 USING <^ NULLS LAST), c2 - Group Key: ft2.c2 - -> Foreign Scan on public.ft2 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) -(6 rows) - ---Testcase 265: -select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; - array_agg --------------------------------- - {6,16,26,36,46,56,66,76,86,96} -(1 row) - --- Remove from extension -alter extension influxdb_fdw drop operator class my_op_class using btree; -alter extension influxdb_fdw drop function my_op_cmp(a int, b int); -alter extension influxdb_fdw drop operator family my_op_family using btree; -alter extension influxdb_fdw drop operator public.<^(int, int); -alter extension influxdb_fdw drop operator public.=^(int, int); -alter extension influxdb_fdw drop operator public.>^(int, int); --- This will not be pushed as sort operator is now removed from the extension. ---Testcase 266: -explain (verbose, costs off) -select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; - QUERY PLAN ---------------------------------------------------------------------------------------------- - GroupAggregate - Output: array_agg(c1 ORDER BY c1 USING <^ NULLS LAST), c2 - Group Key: ft2.c2 - -> Foreign Scan on public.ft2 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) -(6 rows) - --- Cleanup ---Testcase 267: -drop operator class my_op_class using btree; ---Testcase 268: -drop function my_op_cmp(a int, b int); ---Testcase 269: -drop operator family my_op_family using btree; ---Testcase 270: -drop operator public.>^(int, int); ---Testcase 271: -drop operator public.=^(int, int); ---Testcase 272: -drop operator public.<^(int, int); --- Input relation to aggregate push down hook is not safe to pushdown and thus --- the aggregate cannot be pushed down to foreign server. ---Testcase 273: -explain (verbose, costs off) -select count(t1.c3) from ft2 t1 left join ft2 t2 on (t1.c1 = random() * t2.c2); - QUERY PLAN -------------------------------------------------------------------------------------------- - Aggregate - Output: count(t1.c3) - -> Nested Loop Left Join - Output: t1.c3 - Join Filter: ((t1.c1)::double precision = (random() * (t2.c2)::double precision)) - -> Foreign Scan on public.ft2 t1 - Output: t1.c3, t1.c1 - InfluxDB query: SELECT "C 1", "c3" FROM "T1" - -> Materialize - Output: t2.c2 - -> Foreign Scan on public.ft2 t2 - Output: t2.c2 - InfluxDB query: SELECT "c2" FROM "T1" -(13 rows) - --- Subquery in FROM clause having aggregate ---Testcase 274: -explain (verbose, costs off) -select count(*), x.b from ft1, (select c2 a, sum(c1) b from ft1 group by c2) x where ft1.c2 = x.a group by x.b order by 1, 2; - QUERY PLAN ------------------------------------------------------------------------------------- - Sort - Output: (count(*)), x.b - Sort Key: (count(*)), x.b - -> HashAggregate - Output: count(*), x.b - Group Key: x.b - -> Hash Join - Output: x.b - Inner Unique: true - Hash Cond: (ft1.c2 = x.a) - -> Foreign Scan on public.ft1 - Output: ft1.c2 - InfluxDB query: SELECT "c2" FROM "T1" - -> Hash - Output: x.b, x.a - -> Subquery Scan on x - Output: x.b, x.a - -> HashAggregate - Output: ft1_1.c2, sum(ft1_1.c1) - Group Key: ft1_1.c2 - -> Foreign Scan on public.ft1 ft1_1 - Output: ft1_1.c2, ft1_1.c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" -(23 rows) - ---Testcase 275: -select count(*), x.b from ft1, (select c2 a, sum(c1) b from ft1 group by c2) x where ft1.c2 = x.a group by x.b order by 1, 2; - count | b --------+------- - 100 | 49600 - 100 | 49700 - 100 | 49800 - 100 | 49900 - 100 | 50000 - 100 | 50100 - 100 | 50200 - 100 | 50300 - 100 | 50400 - 100 | 50500 -(10 rows) - --- FULL join with IS NULL check in HAVING ---Testcase 276: -explain (verbose, costs off) -select avg(t1.c1), sum(t2.c1) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) group by t2.c1 having (avg(t1.c1) is null and sum(t2.c1) < 10) or sum(t2.c1) is null order by 1 nulls last, 2; - QUERY PLAN ----------------------------------------------------------------------------------------- - Sort - Output: (avg(t1.c1)), (sum(t2.c1)), t2.c1 - Sort Key: (avg(t1.c1)), (sum(t2.c1)) - -> HashAggregate - Output: avg(t1.c1), sum(t2.c1), t2.c1 - Group Key: t2.c1 - Filter: (((avg(t1.c1) IS NULL) AND (sum(t2.c1) < 10)) OR (sum(t2.c1) IS NULL)) - -> Merge Full Join - Output: t2.c1, t1.c1 - Merge Cond: (t1.c1 = t2.c1) - -> Sort - Output: t1.c1 - Sort Key: t1.c1 - -> Foreign Scan on public.ft4 t1 - Output: t1.c1 - InfluxDB query: SELECT "c1" FROM "T3" - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft5 t2 - Output: t2.c1 - InfluxDB query: SELECT "c1" FROM "T4" -(22 rows) - ---Testcase 277: -select avg(t1.c1), sum(t2.c1) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) group by t2.c1 having (avg(t1.c1) is null and sum(t2.c1) < 10) or sum(t2.c1) is null order by 1 nulls last, 2; - avg | sum ----------------------+----- - 51.0000000000000000 | - | 3 - | 9 -(3 rows) - --- Aggregate over FULL join needing to deparse the joining relations as --- subqueries. ---Testcase 278: -explain (verbose, costs off) -select count(*), sum(t1.c1), avg(t2.c1) from (select c1 from ft4 where c1 between 50 and 60) t1 full join (select c1 from ft5 where c1 between 50 and 60) t2 on (t1.c1 = t2.c1); - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Aggregate - Output: count(*), sum(ft4.c1), avg(ft5.c1) - -> Hash Full Join - Output: ft4.c1, ft5.c1 - Hash Cond: (ft4.c1 = ft5.c1) - -> Foreign Scan on public.ft4 - Output: ft4.c1, ft4.c2, ft4.c3 - InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: ft5.c1 - -> Foreign Scan on public.ft5 - Output: ft5.c1 - InfluxDB query: SELECT "c1" FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(13 rows) - ---Testcase 279: -select count(*), sum(t1.c1), avg(t2.c1) from (select c1 from ft4 where c1 between 50 and 60) t1 full join (select c1 from ft5 where c1 between 50 and 60) t2 on (t1.c1 = t2.c1); - count | sum | avg --------+-----+--------------------- - 8 | 330 | 55.5000000000000000 -(1 row) - --- ORDER BY expression is part of the target list but not pushed down to --- foreign server. ---Testcase 280: -explain (verbose, costs off) -select sum(c2) * (random() <= 1)::int as sum from ft1 order by 1; - QUERY PLAN --------------------------------------------------------------------------------- - Sort - Output: (((sum(c2)) * ((random() <= '1'::double precision))::integer)) - Sort Key: (((sum(ft1.c2)) * ((random() <= '1'::double precision))::integer)) - -> Foreign Scan - Output: ((sum(c2)) * ((random() <= '1'::double precision))::integer) - InfluxDB query: SELECT sum("c2") FROM "T1" -(6 rows) - ---Testcase 281: -select sum(c2) * (random() <= 1)::int as sum from ft1 order by 1; - sum ------- - 4500 -(1 row) - --- LATERAL join, with parameterization -set enable_hashagg to false; ---Testcase 282: -explain (verbose, costs off) -select c2, sum from "S 1"."T 1" t1, lateral (select sum(t2.c1 + t1."C 1") sum from ft2 t2 group by t2.c1) qry where t1.c2 * 2 = qry.sum and t1.c2 < 3 and t1."C 1" < 100 order by 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Sort - Output: t1.c2, qry.sum - Sort Key: t1.c2 - -> Nested Loop - Output: t1.c2, qry.sum - -> Foreign Scan on "S 1"."T 1" t1 - Output: t1."C 1", t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 3)) AND (("C 1" < 100)) - -> Subquery Scan on qry - Output: qry.sum, t2.c1 - Filter: ((t1.c2 * 2) = qry.sum) - -> GroupAggregate - Output: sum((t2.c1 + t1."C 1")), t2.c1 - Group Key: t2.c1 - -> Sort - Output: t2.c1 - Sort Key: t2.c1 - -> Foreign Scan on public.ft2 t2 - Output: t2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(20 rows) - ---Testcase 283: -select c2, sum from "S 1"."T 1" t1, lateral (select sum(t2.c1 + t1."C 1") sum from ft2 t2 group by t2.c1) qry where t1.c2 * 2 = qry.sum and t1.c2 < 3 and t1."C 1" < 100 order by 1; - c2 | sum -----+----- - 1 | 2 - 2 | 4 -(2 rows) - -reset enable_hashagg; --- bug #15613: bad plan for foreign table scan with lateral reference ---Testcase 284: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ref_0.c2, subq_1.* -FROM - "S 1"."T 1" AS ref_0, - LATERAL ( - SELECT ref_0."C 1" c1, subq_0.* - FROM (SELECT ref_0.c2, ref_1.c3 - FROM ft1 AS ref_1) AS subq_0 - RIGHT JOIN ft2 AS ref_3 ON (subq_0.c3 = ref_3.c3) - ) AS subq_1 -WHERE ref_0."C 1" < 10 AND subq_1.c3 = '00001' -ORDER BY ref_0."C 1"; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Sort - Output: ref_0.c2, ref_0."C 1", (ref_0.c2), ref_1.c3, ref_0."C 1" - Sort Key: ref_0."C 1" - -> Nested Loop - Output: ref_0.c2, ref_0."C 1", (ref_0.c2), ref_1.c3, ref_0."C 1" - -> Nested Loop - Output: ref_0.c2, ref_0."C 1", ref_1.c3, (ref_0.c2) - -> Foreign Scan on "S 1"."T 1" ref_0 - Output: ref_0."C 1", ref_0.c2, ref_0.c3, ref_0."time", ref_0.c6, ref_0.c7, ref_0.c8 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" < 10)) - -> Foreign Scan on public.ft1 ref_1 - Output: ref_1.c3, ref_0.c2 - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("c3" = '00001')) - -> Materialize - Output: ref_3.c3 - -> Foreign Scan on public.ft2 ref_3 - Output: ref_3.c3 - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("c3" = '00001')) -(18 rows) - ---Testcase 285: -SELECT ref_0.c2, subq_1.* -FROM - "S 1"."T 1" AS ref_0, - LATERAL ( - SELECT ref_0."C 1" c1, subq_0.* - FROM (SELECT ref_0.c2, ref_1.c3 - FROM ft1 AS ref_1) AS subq_0 - RIGHT JOIN ft2 AS ref_3 ON (subq_0.c3 = ref_3.c3) - ) AS subq_1 -WHERE ref_0."C 1" < 10 AND subq_1.c3 = '00001' -ORDER BY ref_0."C 1"; - c2 | c1 | c2 | c3 -----+----+----+------- - 1 | 1 | 1 | 00001 - 2 | 2 | 2 | 00001 - 3 | 3 | 3 | 00001 - 4 | 4 | 4 | 00001 - 5 | 5 | 5 | 00001 - 6 | 6 | 6 | 00001 - 7 | 7 | 7 | 00001 - 8 | 8 | 8 | 00001 - 9 | 9 | 9 | 00001 -(9 rows) - --- Check with placeHolderVars ---Testcase 286: -explain (verbose, costs off) -select sum(q.a), count(q.b) from ft4 left join (select 13, avg(ft1.c1), sum(ft2.c1) from ft1 right join ft2 on (ft1.c1 = ft2.c1)) q(a, b, c) on (ft4.c1 <= q.b); - QUERY PLAN ------------------------------------------------------------------------------------- - Aggregate - Output: sum(q.a), count(q.b) - -> Nested Loop Left Join - Output: q.a, q.b - Inner Unique: true - Join Filter: ((ft4.c1)::numeric <= q.b) - -> Foreign Scan on public.ft4 - Output: ft4.c1, ft4.c2, ft4.c3 - InfluxDB query: SELECT "c1" FROM "T3" - -> Materialize - Output: q.a, q.b - -> Subquery Scan on q - Output: q.a, q.b - -> Aggregate - Output: 13, avg(ft1.c1), NULL::bigint - -> Merge Left Join - Output: ft1.c1 - Merge Cond: (ft2.c1 = ft1.c1) - -> Sort - Output: ft2.c1 - Sort Key: ft2.c1 - -> Foreign Scan on public.ft2 - Output: ft2.c1 - InfluxDB query: SELECT "C 1" FROM "T1" - -> Sort - Output: ft1.c1 - Sort Key: ft1.c1 - -> Foreign Scan on public.ft1 - Output: ft1.c1 - InfluxDB query: SELECT "C 1" FROM "T1" -(30 rows) - ---Testcase 287: -select sum(q.a), count(q.b) from ft4 left join (select 13, avg(ft1.c1), sum(ft2.c1) from ft1 right join ft2 on (ft1.c1 = ft2.c1)) q(a, b, c) on (ft4.c1 <= q.b); - sum | count ------+------- - 650 | 50 -(1 row) - --- Not supported cases --- Grouping sets ---Testcase 288: -explain (verbose, costs off) -select c2, sum(c1) from ft1 where c2 < 3 group by rollup(c2) order by 1 nulls last; - QUERY PLAN -------------------------------------------------------------------------------- - Sort - Output: c2, (sum(c1)) - Sort Key: ft1.c2 - -> MixedAggregate - Output: c2, sum(c1) - Hash Key: ft1.c2 - Group Key: () - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 3)) -(10 rows) - ---Testcase 289: -select c2, sum(c1) from ft1 where c2 < 3 group by rollup(c2) order by 1 nulls last; - c2 | sum -----+-------- - 0 | 50500 - 1 | 49600 - 2 | 49700 - | 149800 -(4 rows) - ---Testcase 290: -explain (verbose, costs off) -select c2, sum(c1) from ft1 where c2 < 3 group by cube(c2) order by 1 nulls last; - QUERY PLAN -------------------------------------------------------------------------------- - Sort - Output: c2, (sum(c1)) - Sort Key: ft1.c2 - -> MixedAggregate - Output: c2, sum(c1) - Hash Key: ft1.c2 - Group Key: () - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 3)) -(10 rows) - ---Testcase 291: -select c2, sum(c1) from ft1 where c2 < 3 group by cube(c2) order by 1 nulls last; - c2 | sum -----+-------- - 0 | 50500 - 1 | 49600 - 2 | 49700 - | 149800 -(4 rows) - ---Testcase 292: -explain (verbose, costs off) -select c2, c6, sum(c1) from ft1 where c2 < 3 group by grouping sets(c2, c6) order by 1 nulls last, 2 nulls last; - QUERY PLAN -------------------------------------------------------------------------------------- - Sort - Output: c2, c6, (sum(c1)) - Sort Key: ft1.c2, ft1.c6 - -> HashAggregate - Output: c2, c6, sum(c1) - Hash Key: ft1.c2 - Hash Key: ft1.c6 - -> Foreign Scan on public.ft1 - Output: c2, c6, c1 - InfluxDB query: SELECT "C 1", "c2", "c6" FROM "T1" WHERE (("c2" < 3)) -(10 rows) - ---Testcase 293: -select c2, c6, sum(c1) from ft1 where c2 < 3 group by grouping sets(c2, c6) order by 1 nulls last, 2 nulls last; - c2 | c6 | sum -----+----+------- - 0 | | 50500 - 1 | | 49600 - 2 | | 49700 - | 0 | 50500 - | 1 | 49600 - | 2 | 49700 -(6 rows) - ---Testcase 294: -explain (verbose, costs off) -select c2, sum(c1), grouping(c2) from ft1 where c2 < 3 group by c2 order by 1 nulls last; - QUERY PLAN -------------------------------------------------------------------------------- - Sort - Output: c2, (sum(c1)), (GROUPING(c2)) - Sort Key: ft1.c2 - -> HashAggregate - Output: c2, sum(c1), GROUPING(c2) - Group Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 3)) -(9 rows) - ---Testcase 295: -select c2, sum(c1), grouping(c2) from ft1 where c2 < 3 group by c2 order by 1 nulls last; - c2 | sum | grouping -----+-------+---------- - 0 | 50500 | 0 - 1 | 49600 | 0 - 2 | 49700 | 0 -(3 rows) - --- DISTINCT itself is not pushed down, whereas underneath aggregate is pushed ---Testcase 296: -explain (verbose, costs off) -select distinct sum(c1)/1000 s from ft2 where c2 < 6 group by c2 order by 1; - QUERY PLAN -------------------------------------------------------------------------------------- - Unique - Output: ((sum(c1) / 1000)), c2 - -> Sort - Output: ((sum(c1) / 1000)), c2 - Sort Key: ((sum(ft2.c1) / 1000)) - -> HashAggregate - Output: (sum(c1) / 1000), c2 - Group Key: ft2.c2 - -> Foreign Scan on public.ft2 - Output: c2, c1 - InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 6)) -(11 rows) - ---Testcase 297: -select distinct sum(c1)/1000 s from ft2 where c2 < 6 group by c2 order by 1; - s ----- - 49 - 50 -(2 rows) - --- WindowAgg ---Testcase 298: -explain (verbose, costs off) -select c2, sum(c2), count(c2) over (partition by c2%2) from ft2 where c2 < 10 group by c2 order by 1; - QUERY PLAN -------------------------------------------------------------------------------------- - Sort - Output: c2, (sum(c2)), (count(c2) OVER (?)), ((c2 % 2)) - Sort Key: ft2.c2 - -> WindowAgg - Output: c2, (sum(c2)), count(c2) OVER (?), ((c2 % 2)) - -> Sort - Output: c2, ((c2 % 2)), (sum(c2)) - Sort Key: ((ft2.c2 % 2)) - -> HashAggregate - Output: c2, (c2 % 2), sum(c2) - Group Key: ft2.c2 - -> Foreign Scan on public.ft2 - Output: c2 - InfluxDB query: SELECT "c2" FROM "T1" WHERE (("c2" < 10)) -(14 rows) - ---Testcase 299: -select c2, sum(c2), count(c2) over (partition by c2%2) from ft2 where c2 < 10 group by c2 order by 1; - c2 | sum | count -----+-----+------- - 0 | 0 | 5 - 1 | 100 | 5 - 2 | 200 | 5 - 3 | 300 | 5 - 4 | 400 | 5 - 5 | 500 | 5 - 6 | 600 | 5 - 7 | 700 | 5 - 8 | 800 | 5 - 9 | 900 | 5 -(10 rows) - ---Testcase 300: -explain (verbose, costs off) -select c2, array_agg(c2) over (partition by c2%2 order by c2 desc) from ft1 where c2 < 10 group by c2 order by 1; - QUERY PLAN -------------------------------------------------------------------------------------- - Sort - Output: c2, (array_agg(c2) OVER (?)), ((c2 % 2)) - Sort Key: ft1.c2 - -> WindowAgg - Output: c2, array_agg(c2) OVER (?), ((c2 % 2)) - -> Sort - Output: c2, ((c2 % 2)) - Sort Key: ((ft1.c2 % 2)), ft1.c2 DESC - -> HashAggregate - Output: c2, (c2 % 2) - Group Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2 - InfluxDB query: SELECT "c2" FROM "T1" WHERE (("c2" < 10)) -(14 rows) - ---Testcase 301: -select c2, array_agg(c2) over (partition by c2%2 order by c2 desc) from ft1 where c2 < 10 group by c2 order by 1; - c2 | array_agg -----+------------- - 0 | {8,6,4,2,0} - 1 | {9,7,5,3,1} - 2 | {8,6,4,2} - 3 | {9,7,5,3} - 4 | {8,6,4} - 5 | {9,7,5} - 6 | {8,6} - 7 | {9,7} - 8 | {8} - 9 | {9} -(10 rows) - ---Testcase 302: -explain (verbose, costs off) -select c2, array_agg(c2) over (partition by c2%2 order by c2 range between current row and unbounded following) from ft1 where c2 < 10 group by c2 order by 1; - QUERY PLAN -------------------------------------------------------------------------------------- - Sort - Output: c2, (array_agg(c2) OVER (?)), ((c2 % 2)) - Sort Key: ft1.c2 - -> WindowAgg - Output: c2, array_agg(c2) OVER (?), ((c2 % 2)) - -> Sort - Output: c2, ((c2 % 2)) - Sort Key: ((ft1.c2 % 2)), ft1.c2 - -> HashAggregate - Output: c2, (c2 % 2) - Group Key: ft1.c2 - -> Foreign Scan on public.ft1 - Output: c2 - InfluxDB query: SELECT "c2" FROM "T1" WHERE (("c2" < 10)) -(14 rows) - ---Testcase 303: -select c2, array_agg(c2) over (partition by c2%2 order by c2 range between current row and unbounded following) from ft1 where c2 < 10 group by c2 order by 1; - c2 | array_agg -----+------------- - 0 | {0,2,4,6,8} - 1 | {1,3,5,7,9} - 2 | {2,4,6,8} - 3 | {3,5,7,9} - 4 | {4,6,8} - 5 | {5,7,9} - 6 | {6,8} - 7 | {7,9} - 8 | {8} - 9 | {9} -(10 rows) - --- =================================================================== --- parameterized queries --- =================================================================== --- simple join ---Testcase 304: -PREPARE st1(int, int) AS SELECT t1.c3, t2.c3 FROM ft1 t1, ft2 t2 WHERE t1.c1 = $1 AND t2.c1 = $2; ---Testcase 305: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st1(1, 2); - QUERY PLAN --------------------------------------------------------------------------------- - Nested Loop - Output: t1.c3, t2.c3 - -> Foreign Scan on public.ft1 t1 - Output: t1.c3 - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = 1)) - -> Materialize - Output: t2.c3 - -> Foreign Scan on public.ft2 t2 - Output: t2.c3 - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = 2)) -(10 rows) - ---Testcase 306: -EXECUTE st1(1, 1); - c3 | c3 --------+------- - 00001 | 00001 -(1 row) - ---Testcase 307: -EXECUTE st1(101, 101); - c3 | c3 --------+------- - 00101 | 00101 -(1 row) - --- subquery using stable function (can't be sent to remote) ---Testcase 308: -PREPARE st2(int) AS SELECT * FROM ft1 t1 WHERE t1.c1 < $2 AND t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE c1 > $1 AND date(time) = '1970-01-17'::date) ORDER BY c1; ---Testcase 309: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st2(10, 20); - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Sort - Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 - Sort Key: t1.c1 - -> Hash Semi Join - Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 - Hash Cond: (t1.c3 = t2.c3) - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" < 20)) - -> Hash - Output: t2.c3 - -> Foreign Scan on public.ft2 t2 - Output: t2.c3 - Filter: (date(t2."time") = '01-17-1970'::date) - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" > 10)) -(15 rows) - ---Testcase 310: -EXECUTE st2(10, 20); - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+----- - 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo -(1 row) - ---Testcase 311: -EXECUTE st2(101, 121); - c1 | c2 | c3 | time | c6 | c7 | c8 ------+----+-------+--------------------------+----+------------+----- - 116 | 6 | 00116 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo -(1 row) - --- subquery using immutable function (can be sent to remote) ---Testcase 312: -PREPARE st3(int) AS SELECT * FROM ft1 t1 WHERE t1.c1 < $2 AND t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE c1 > $1 AND date(time) = '1970-01-17'::date) ORDER BY c1; ---Testcase 313: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st3(10, 20); - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Sort - Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 - Sort Key: t1.c1 - -> Hash Semi Join - Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 - Hash Cond: (t1.c3 = t2.c3) - -> Foreign Scan on public.ft1 t1 - Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" < 20)) - -> Hash - Output: t2.c3 - -> Foreign Scan on public.ft2 t2 - Output: t2.c3 - Filter: (date(t2."time") = '01-17-1970'::date) - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" > 10)) -(15 rows) - ---Testcase 314: -EXECUTE st3(10, 20); - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+----- - 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo -(1 row) - ---Testcase 315: -EXECUTE st3(20, 30); - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+----+------+----+----+---- -(0 rows) - --- custom plan should be chosen initially ---Testcase 316: -PREPARE st4(int) AS SELECT * FROM ft1 t1 WHERE t1.c1 = $1; ---Testcase 317: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - ---Testcase 318: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - ---Testcase 319: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - ---Testcase 320: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - ---Testcase 321: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - --- once we try it enough times, should switch to generic plan ---Testcase 322: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN ---------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = $1)) -(3 rows) - --- value of $1 should not be sent to remote ---Testcase 323: -PREPARE st5(text,int) AS SELECT * FROM ft1 t1 WHERE c8 = $1 and c1 = $2; ---Testcase 324: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) -(3 rows) - ---Testcase 325: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) -(3 rows) - ---Testcase 326: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) -(3 rows) - ---Testcase 327: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) -(3 rows) - ---Testcase 328: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) -(3 rows) - ---Testcase 329: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = $1)) AND (("C 1" = $2)) -(3 rows) - ---Testcase 330: -EXECUTE st5('foo', 1); - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+----- - 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo -(1 row) - --- altering FDW options requires replanning ---Testcase 331: -PREPARE st6 AS SELECT * FROM ft1 t1 WHERE t1.c1 = t1.c2; ---Testcase 332: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; - QUERY PLAN ------------------------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = "c2")) -(3 rows) - ---Testcase 333: -PREPARE st7 AS INSERT INTO ft1 (c1,c2,c3) VALUES (1001,101,'foo'); ---Testcase 334: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.ft1 - -> Result - Output: NULL::integer, 1001, 101, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft1 '::character(10), NULL::text -(3 rows) - ---Testcase 335: -INSERT INTO "S 1"."T 0" SELECT * FROM "S 1"."T 1"; -ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T0'); ---Testcase 336: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; - QUERY PLAN ------------------------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T0" WHERE (("C 1" = "c2")) -(3 rows) - ---Testcase 337: -EXECUTE st6; - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+----- - 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo - 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo - 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo - 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo - 5 | 5 | 00005 | Tue Jan 06 00:00:00 1970 | 5 | 5 | foo - 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo - 7 | 7 | 00007 | Thu Jan 08 00:00:00 1970 | 7 | 7 | foo - 8 | 8 | 00008 | Fri Jan 09 00:00:00 1970 | 8 | 8 | foo - 9 | 9 | 00009 | Sat Jan 10 00:00:00 1970 | 9 | 9 | foo -(9 rows) - ---Testcase 338: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.ft1 - -> Result - Output: NULL::integer, 1001, 101, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft1 '::character(10), NULL::text -(3 rows) - ---Testcase 339: -DELETE FROM "S 1"."T 0"; -ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T1'); ---Testcase 340: -PREPARE st8 AS SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; ---Testcase 341: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; - QUERY PLAN ------------------------------------------------------------- - Aggregate - Output: count(c3) - -> Foreign Scan on public.ft1 t1 - Output: c3 - Filter: (t1.c1 === t1.c2) - InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" -(6 rows) - --- Skip, influxdb_fdw does not support extensions --- ALTER SERVER loopback OPTIONS (DROP extensions); ---Testcase 342: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; - QUERY PLAN ------------------------------------------------------------- - Aggregate - Output: count(c3) - -> Foreign Scan on public.ft1 t1 - Output: c3 - Filter: (t1.c1 === t1.c2) - InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" -(6 rows) - ---Testcase 343: -EXECUTE st8; - count -------- - 9 -(1 row) - --- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); --- cleanup -DEALLOCATE st1; -DEALLOCATE st2; -DEALLOCATE st3; -DEALLOCATE st4; -DEALLOCATE st5; -DEALLOCATE st6; -DEALLOCATE st7; -DEALLOCATE st8; --- System columns, except ctid and oid, should not be sent to remote ---Testcase 344: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM ft1 t1 WHERE t1.tableoid = 'pg_class'::regclass LIMIT 1; - QUERY PLAN ------------------------------------------------------------------------------- - Limit - Output: c1, c2, c3, "time", c6, c7, c8 - -> Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: (t1.tableoid = '1259'::oid) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(6 rows) - ---Testcase 345: -SELECT * FROM ft1 t1 WHERE t1.tableoid = 'ft1'::regclass ORDER BY c1 LIMIT 1; - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+-------+--------------------------+----+------------+----- - 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo -(1 row) - ---Testcase 346: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT tableoid::regclass, * FROM ft1 t1 LIMIT 1; - QUERY PLAN ------------------------------------------------------------------------------- - Limit - Output: ((tableoid)::regclass), c1, c2, c3, "time", c6, c7, c8 - -> Foreign Scan on public.ft1 t1 - Output: (tableoid)::regclass, c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(5 rows) - ---Testcase 347: -SELECT tableoid::regclass, * FROM ft1 t1 ORDER BY c1 LIMIT 1; - tableoid | c1 | c2 | c3 | time | c6 | c7 | c8 -----------+----+----+-------+--------------------------+----+------------+----- - ft1 | 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo -(1 row) - ---Testcase 348: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: c1, c2, c3, "time", c6, c7, c8 - Filter: (t1.ctid = '(0,2)'::tid) - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(4 rows) - ---Testcase 349: -SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; - c1 | c2 | c3 | time | c6 | c7 | c8 -----+----+----+------+----+----+---- -(0 rows) - ---Testcase 350: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ctid, * FROM ft1 t1 LIMIT 1; - QUERY PLAN ------------------------------------------------------------------------------- - Limit - Output: ctid, c1, c2, c3, "time", c6, c7, c8 - -> Foreign Scan on public.ft1 t1 - Output: ctid, c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(5 rows) - ---Testcase 351: -SELECT ctid, * FROM ft1 t1 ORDER BY c1 LIMIT 1; - ctid | c1 | c2 | c3 | time | c6 | c7 | c8 -----------------+----+----+-------+--------------------------+----+------------+----- - (4294967295,0) | 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo -(1 row) - --- =================================================================== --- used in PL/pgSQL function --- =================================================================== ---Testcase 352: -CREATE OR REPLACE FUNCTION f_test(p_c1 int) RETURNS int AS $$ -DECLARE - v_c1 int; -BEGIN ---Testcase 353: - SELECT c1 INTO v_c1 FROM ft1 WHERE c1 = p_c1 LIMIT 1; - PERFORM c1 FROM ft1 WHERE c1 = p_c1 AND p_c1 = v_c1 LIMIT 1; - RETURN v_c1; -END; -$$ LANGUAGE plpgsql; ---Testcase 354: -SELECT f_test(100); - f_test --------- - 100 -(1 row) - ---Testcase 355: -DROP FUNCTION f_test(int); --- =================================================================== --- conversion error --- =================================================================== -ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE int; ---Testcase 356: -SELECT * FROM ft1 WHERE c1 = 1; -- ERROR -ERROR: invalid input syntax for integer: "foo" ---Testcase 357: -SELECT ft1.c1, ft2.c2, ft1.c8 FROM ft1, ft2 WHERE ft1.c1 = ft2.c1 AND ft1.c1 = 1; -- ERROR -ERROR: invalid input syntax for integer: "foo" ---Testcase 358: -SELECT ft1.c1, ft2.c2, ft1 FROM ft1, ft2 WHERE ft1.c1 = ft2.c1 AND ft1.c1 = 1; -- ERROR -ERROR: invalid input syntax for integer: "foo" ---Testcase 359: -SELECT sum(c2), array_agg(c8) FROM ft1 GROUP BY c8; -- ERROR -ERROR: invalid input syntax for integer: "foo" -ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE text; -/* --- influxdb_fdw does not support transactions --- =================================================================== --- subtransaction --- + local/remote error doesn't break cursor --- =================================================================== -BEGIN; -DECLARE c CURSOR FOR SELECT * FROM ft1 ORDER BY c1; -FETCH c; -SAVEPOINT s; -ERROR OUT; -- ERROR -ROLLBACK TO s; -FETCH c; -SAVEPOINT s; -SELECT * FROM ft1 WHERE 1 / (c1 - 1) > 0; -- ERROR -ROLLBACK TO s; -FETCH c; -SELECT * FROM ft1 ORDER BY c1 LIMIT 1; -COMMIT; -*/ --- =================================================================== --- test handling of collations --- =================================================================== ---Testcase 360: -create foreign table loct3 (f1 text collate "C", f2 text, f3 varchar(10)) server influxdb_svr options (table 'loct3'); ---Testcase 361: -create foreign table ft3 (f1 text collate "C", f2 text, f3 varchar(10)) - server influxdb_svr options (table 'loct3'); --- can be sent to remote ---Testcase 362: -explain (verbose, costs off) select * from ft3 where f1 = 'foo'; - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: f1, f2, f3 - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f1" = 'foo')) -(3 rows) - ---Testcase 363: -explain (verbose, costs off) select * from ft3 where f1 COLLATE "C" = 'foo'; - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: f1, f2, f3 - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f1" = 'foo')) -(3 rows) - ---Testcase 364: -explain (verbose, costs off) select * from ft3 where f2 = 'foo'; - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: f1, f2, f3 - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f2" = 'foo')) -(3 rows) - ---Testcase 365: -explain (verbose, costs off) select * from ft3 where f3 = 'foo'; - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: f1, f2, f3 - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f3" = 'foo')) -(3 rows) - ---Testcase 366: -explain (verbose, costs off) select * from ft3 f, loct3 l - where f.f3 = l.f3 and l.f1 = 'foo'; - QUERY PLAN -------------------------------------------------------------------------------------------- - Hash Join - Output: f.f1, f.f2, f.f3, l.f1, l.f2, l.f3 - Hash Cond: ((f.f3)::text = (l.f3)::text) - -> Foreign Scan on public.ft3 f - Output: f.f1, f.f2, f.f3 - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" - -> Hash - Output: l.f1, l.f2, l.f3 - -> Foreign Scan on public.loct3 l - Output: l.f1, l.f2, l.f3 - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f1" = 'foo')) -(11 rows) - --- can't be sent to remote ---Testcase 367: -explain (verbose, costs off) select * from ft3 where f1 COLLATE "POSIX" = 'foo'; - QUERY PLAN --------------------------------------------------------- - Foreign Scan on public.ft3 - Output: f1, f2, f3 - Filter: ((ft3.f1)::text = 'foo'::text) - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" -(4 rows) - ---Testcase 368: -explain (verbose, costs off) select * from ft3 where f1 = 'foo' COLLATE "C"; - QUERY PLAN --------------------------------------------------------- - Foreign Scan on public.ft3 - Output: f1, f2, f3 - Filter: (ft3.f1 = 'foo'::text COLLATE "C") - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" -(4 rows) - ---Testcase 369: -explain (verbose, costs off) select * from ft3 where f2 COLLATE "C" = 'foo'; - QUERY PLAN --------------------------------------------------------- - Foreign Scan on public.ft3 - Output: f1, f2, f3 - Filter: ((ft3.f2)::text = 'foo'::text) - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" -(4 rows) - ---Testcase 370: -explain (verbose, costs off) select * from ft3 where f2 = 'foo' COLLATE "C"; - QUERY PLAN --------------------------------------------------------- - Foreign Scan on public.ft3 - Output: f1, f2, f3 - Filter: (ft3.f2 = 'foo'::text COLLATE "C") - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" -(4 rows) - ---Testcase 371: -explain (verbose, costs off) select * from ft3 f, loct3 l - where f.f3 = l.f3 COLLATE "POSIX" and l.f1 = 'foo'; - QUERY PLAN -------------------------------------------------------------------------------------------- - Hash Join - Output: f.f1, f.f2, f.f3, l.f1, l.f2, l.f3 - Hash Cond: ((f.f3)::text = (l.f3)::text) - -> Foreign Scan on public.ft3 f - Output: f.f1, f.f2, f.f3 - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" - -> Hash - Output: l.f1, l.f2, l.f3 - -> Foreign Scan on public.loct3 l - Output: l.f1, l.f2, l.f3 - InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f1" = 'foo')) -(11 rows) - --- influxdb_fdw does not support UPDATE --- =================================================================== --- test writable foreign table stuff --- =================================================================== ---Testcase 372: -EXPLAIN (verbose, costs off) -INSERT INTO ft2 (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2 ORDER BY c1 LIMIT 20; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.ft2 - -> Subquery Scan on "*SELECT*" - Output: "*SELECT*"."?column?", "*SELECT*"."?column?_1", NULL::integer, "*SELECT*"."?column?_2", NULL::timestamp without time zone, NULL::character varying, 'ft2 '::character(10), NULL::text - -> Limit - Output: ((ft2_1.c1 + 1000)), ((ft2_1.c2 + 100)), ((ft2_1.c3 || ft2_1.c3)), ft2_1.c1 - -> Sort - Output: ((ft2_1.c1 + 1000)), ((ft2_1.c2 + 100)), ((ft2_1.c3 || ft2_1.c3)), ft2_1.c1 - Sort Key: ft2_1.c1 - -> Foreign Scan on public.ft2 ft2_1 - Output: (ft2_1.c1 + 1000), (ft2_1.c2 + 100), (ft2_1.c3 || ft2_1.c3), ft2_1.c1 - InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" -(11 rows) - ---Testcase 373: -INSERT INTO ft2 (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2 ORDER BY c1 LIMIT 20; ---Testcase 374: -INSERT INTO ft2 (c1,c2,c3) VALUES (1101,201,'aaa'), (1102,202,'bbb'), (1103,203,'ccc'); ---Testcase 375: -SELECT c1, c2, c3, c6, c7, c8 FROM ft2 WHERE c2 > 200; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+-----+----+------------+---- - 1101 | 201 | aaa | | ft2 | - 1102 | 202 | bbb | | ft2 | - 1103 | 203 | ccc | | ft2 | -(3 rows) - ---Testcase 376: -INSERT INTO ft2 (c1,c2,c3) VALUES (1104,204,'ddd'), (1105,205,'eee'); ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c2 = c2 + 300, c3 = c3 || '_update3' WHERE c1 % 10 = 3; -- can be pushed down ---UPDATE ft2 SET c2 = c2 + 300, c3 = c3 || '_update3' WHERE c1 % 10 = 3; ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c2 = c2 + 400, c3 = c3 || '_update7' WHERE c1 % 10 = 7 RETURNING *; -- can be pushed down ---UPDATE ft2 SET c2 = c2 + 400, c3 = c3 || '_update7' WHERE c1 % 10 = 7 RETURNING *; ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c2 = ft2.c2 + 500, c3 = ft2.c3 || '_update9', c7 = DEFAULT --- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; -- can be pushed down ---UPDATE ft2 SET c2 = ft2.c2 + 500, c3 = ft2.c3 || '_update9', c7 = DEFAULT --- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; ---Testcase 377: -EXPLAIN (verbose, costs off) - DELETE FROM ft2 WHERE c1 % 10 = 5; -- can be pushed down - QUERY PLAN ---------------------------------------------------------------------------------- - Delete on public.ft2 - -> Foreign Scan on public.ft2 - Output: c3, "time" - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE ((("C 1" % 10) = 5)) -(4 rows) - ---Testcase 378: -SELECT c1 FROM ft2 WHERE c1 % 10 = 5 ORDER BY c1; - c1 ------- - 5 - 15 - 25 - 35 - 45 - 55 - 65 - 75 - 85 - 95 - 105 - 115 - 125 - 135 - 145 - 155 - 165 - 175 - 185 - 195 - 205 - 215 - 225 - 235 - 245 - 255 - 265 - 275 - 285 - 295 - 305 - 315 - 325 - 335 - 345 - 355 - 365 - 375 - 385 - 395 - 405 - 415 - 425 - 435 - 445 - 455 - 465 - 475 - 485 - 495 - 505 - 515 - 525 - 535 - 545 - 555 - 565 - 575 - 585 - 595 - 605 - 615 - 625 - 635 - 645 - 655 - 665 - 675 - 685 - 695 - 705 - 715 - 725 - 735 - 745 - 755 - 765 - 775 - 785 - 795 - 805 - 815 - 825 - 835 - 845 - 855 - 865 - 875 - 885 - 895 - 905 - 915 - 925 - 935 - 945 - 955 - 965 - 975 - 985 - 995 - 1005 - 1015 - 1105 -(103 rows) - ---Testcase 379: -DELETE FROM ft2 WHERE c1 % 10 = 5; ---Testcase 380: -SELECT c1 FROM ft2 WHERE c1 % 10 = 5; - c1 ----- -(0 rows) - ---Testcase 381: -EXPLAIN (verbose, costs off) -DELETE FROM ft2 USING ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 2; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- - Delete on public.ft2 - -> Hash Join - Output: ft2.c3, ft2."time", ft1.* - Hash Cond: (ft2.c2 = ft1.c1) - -> Foreign Scan on public.ft2 - Output: ft2.c3, ft2."time", ft2.c2 - InfluxDB query: SELECT "c2", "c3" FROM "T1" - -> Hash - Output: ft1.*, ft1.c1 - -> Foreign Scan on public.ft1 - Output: ft1.*, ft1.c1 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE ((("C 1" % 10) = 2)) -(12 rows) - ---Testcase 382: -DELETE FROM ft2 USING ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 2; ---Testcase 383: -SELECT c1,c2,c3 FROM ft2 ORDER BY c1; - c1 | c2 | c3 -------+-----+------------ - 1 | 1 | 00001 - 3 | 3 | 00003 - 4 | 4 | 00004 - 6 | 6 | 00006 - 7 | 7 | 00007 - 8 | 8 | 00008 - 9 | 9 | 00009 - 10 | 0 | 00010 - 11 | 1 | 00011 - 13 | 3 | 00013 - 14 | 4 | 00014 - 16 | 6 | 00016 - 17 | 7 | 00017 - 18 | 8 | 00018 - 19 | 9 | 00019 - 20 | 0 | 00020 - 21 | 1 | 00021 - 23 | 3 | 00023 - 24 | 4 | 00024 - 26 | 6 | 00026 - 27 | 7 | 00027 - 28 | 8 | 00028 - 29 | 9 | 00029 - 30 | 0 | 00030 - 31 | 1 | 00031 - 33 | 3 | 00033 - 34 | 4 | 00034 - 36 | 6 | 00036 - 37 | 7 | 00037 - 38 | 8 | 00038 - 39 | 9 | 00039 - 40 | 0 | 00040 - 41 | 1 | 00041 - 43 | 3 | 00043 - 44 | 4 | 00044 - 46 | 6 | 00046 - 47 | 7 | 00047 - 48 | 8 | 00048 - 49 | 9 | 00049 - 50 | 0 | 00050 - 51 | 1 | 00051 - 53 | 3 | 00053 - 54 | 4 | 00054 - 56 | 6 | 00056 - 57 | 7 | 00057 - 58 | 8 | 00058 - 59 | 9 | 00059 - 60 | 0 | 00060 - 61 | 1 | 00061 - 63 | 3 | 00063 - 64 | 4 | 00064 - 66 | 6 | 00066 - 67 | 7 | 00067 - 68 | 8 | 00068 - 69 | 9 | 00069 - 70 | 0 | 00070 - 71 | 1 | 00071 - 73 | 3 | 00073 - 74 | 4 | 00074 - 76 | 6 | 00076 - 77 | 7 | 00077 - 78 | 8 | 00078 - 79 | 9 | 00079 - 80 | 0 | 00080 - 81 | 1 | 00081 - 83 | 3 | 00083 - 84 | 4 | 00084 - 86 | 6 | 00086 - 87 | 7 | 00087 - 88 | 8 | 00088 - 89 | 9 | 00089 - 90 | 0 | 00090 - 91 | 1 | 00091 - 93 | 3 | 00093 - 94 | 4 | 00094 - 96 | 6 | 00096 - 97 | 7 | 00097 - 98 | 8 | 00098 - 99 | 9 | 00099 - 100 | 0 | 00100 - 101 | 1 | 00101 - 103 | 3 | 00103 - 104 | 4 | 00104 - 106 | 6 | 00106 - 107 | 7 | 00107 - 108 | 8 | 00108 - 109 | 9 | 00109 - 110 | 0 | 00110 - 111 | 1 | 00111 - 113 | 3 | 00113 - 114 | 4 | 00114 - 116 | 6 | 00116 - 117 | 7 | 00117 - 118 | 8 | 00118 - 119 | 9 | 00119 - 120 | 0 | 00120 - 121 | 1 | 00121 - 123 | 3 | 00123 - 124 | 4 | 00124 - 126 | 6 | 00126 - 127 | 7 | 00127 - 128 | 8 | 00128 - 129 | 9 | 00129 - 130 | 0 | 00130 - 131 | 1 | 00131 - 133 | 3 | 00133 - 134 | 4 | 00134 - 136 | 6 | 00136 - 137 | 7 | 00137 - 138 | 8 | 00138 - 139 | 9 | 00139 - 140 | 0 | 00140 - 141 | 1 | 00141 - 143 | 3 | 00143 - 144 | 4 | 00144 - 146 | 6 | 00146 - 147 | 7 | 00147 - 148 | 8 | 00148 - 149 | 9 | 00149 - 150 | 0 | 00150 - 151 | 1 | 00151 - 153 | 3 | 00153 - 154 | 4 | 00154 - 156 | 6 | 00156 - 157 | 7 | 00157 - 158 | 8 | 00158 - 159 | 9 | 00159 - 160 | 0 | 00160 - 161 | 1 | 00161 - 163 | 3 | 00163 - 164 | 4 | 00164 - 166 | 6 | 00166 - 167 | 7 | 00167 - 168 | 8 | 00168 - 169 | 9 | 00169 - 170 | 0 | 00170 - 171 | 1 | 00171 - 173 | 3 | 00173 - 174 | 4 | 00174 - 176 | 6 | 00176 - 177 | 7 | 00177 - 178 | 8 | 00178 - 179 | 9 | 00179 - 180 | 0 | 00180 - 181 | 1 | 00181 - 183 | 3 | 00183 - 184 | 4 | 00184 - 186 | 6 | 00186 - 187 | 7 | 00187 - 188 | 8 | 00188 - 189 | 9 | 00189 - 190 | 0 | 00190 - 191 | 1 | 00191 - 193 | 3 | 00193 - 194 | 4 | 00194 - 196 | 6 | 00196 - 197 | 7 | 00197 - 198 | 8 | 00198 - 199 | 9 | 00199 - 200 | 0 | 00200 - 201 | 1 | 00201 - 203 | 3 | 00203 - 204 | 4 | 00204 - 206 | 6 | 00206 - 207 | 7 | 00207 - 208 | 8 | 00208 - 209 | 9 | 00209 - 210 | 0 | 00210 - 211 | 1 | 00211 - 213 | 3 | 00213 - 214 | 4 | 00214 - 216 | 6 | 00216 - 217 | 7 | 00217 - 218 | 8 | 00218 - 219 | 9 | 00219 - 220 | 0 | 00220 - 221 | 1 | 00221 - 223 | 3 | 00223 - 224 | 4 | 00224 - 226 | 6 | 00226 - 227 | 7 | 00227 - 228 | 8 | 00228 - 229 | 9 | 00229 - 230 | 0 | 00230 - 231 | 1 | 00231 - 233 | 3 | 00233 - 234 | 4 | 00234 - 236 | 6 | 00236 - 237 | 7 | 00237 - 238 | 8 | 00238 - 239 | 9 | 00239 - 240 | 0 | 00240 - 241 | 1 | 00241 - 243 | 3 | 00243 - 244 | 4 | 00244 - 246 | 6 | 00246 - 247 | 7 | 00247 - 248 | 8 | 00248 - 249 | 9 | 00249 - 250 | 0 | 00250 - 251 | 1 | 00251 - 253 | 3 | 00253 - 254 | 4 | 00254 - 256 | 6 | 00256 - 257 | 7 | 00257 - 258 | 8 | 00258 - 259 | 9 | 00259 - 260 | 0 | 00260 - 261 | 1 | 00261 - 263 | 3 | 00263 - 264 | 4 | 00264 - 266 | 6 | 00266 - 267 | 7 | 00267 - 268 | 8 | 00268 - 269 | 9 | 00269 - 270 | 0 | 00270 - 271 | 1 | 00271 - 273 | 3 | 00273 - 274 | 4 | 00274 - 276 | 6 | 00276 - 277 | 7 | 00277 - 278 | 8 | 00278 - 279 | 9 | 00279 - 280 | 0 | 00280 - 281 | 1 | 00281 - 283 | 3 | 00283 - 284 | 4 | 00284 - 286 | 6 | 00286 - 287 | 7 | 00287 - 288 | 8 | 00288 - 289 | 9 | 00289 - 290 | 0 | 00290 - 291 | 1 | 00291 - 293 | 3 | 00293 - 294 | 4 | 00294 - 296 | 6 | 00296 - 297 | 7 | 00297 - 298 | 8 | 00298 - 299 | 9 | 00299 - 300 | 0 | 00300 - 301 | 1 | 00301 - 303 | 3 | 00303 - 304 | 4 | 00304 - 306 | 6 | 00306 - 307 | 7 | 00307 - 308 | 8 | 00308 - 309 | 9 | 00309 - 310 | 0 | 00310 - 311 | 1 | 00311 - 313 | 3 | 00313 - 314 | 4 | 00314 - 316 | 6 | 00316 - 317 | 7 | 00317 - 318 | 8 | 00318 - 319 | 9 | 00319 - 320 | 0 | 00320 - 321 | 1 | 00321 - 323 | 3 | 00323 - 324 | 4 | 00324 - 326 | 6 | 00326 - 327 | 7 | 00327 - 328 | 8 | 00328 - 329 | 9 | 00329 - 330 | 0 | 00330 - 331 | 1 | 00331 - 333 | 3 | 00333 - 334 | 4 | 00334 - 336 | 6 | 00336 - 337 | 7 | 00337 - 338 | 8 | 00338 - 339 | 9 | 00339 - 340 | 0 | 00340 - 341 | 1 | 00341 - 343 | 3 | 00343 - 344 | 4 | 00344 - 346 | 6 | 00346 - 347 | 7 | 00347 - 348 | 8 | 00348 - 349 | 9 | 00349 - 350 | 0 | 00350 - 351 | 1 | 00351 - 353 | 3 | 00353 - 354 | 4 | 00354 - 356 | 6 | 00356 - 357 | 7 | 00357 - 358 | 8 | 00358 - 359 | 9 | 00359 - 360 | 0 | 00360 - 361 | 1 | 00361 - 363 | 3 | 00363 - 364 | 4 | 00364 - 366 | 6 | 00366 - 367 | 7 | 00367 - 368 | 8 | 00368 - 369 | 9 | 00369 - 370 | 0 | 00370 - 371 | 1 | 00371 - 373 | 3 | 00373 - 374 | 4 | 00374 - 376 | 6 | 00376 - 377 | 7 | 00377 - 378 | 8 | 00378 - 379 | 9 | 00379 - 380 | 0 | 00380 - 381 | 1 | 00381 - 383 | 3 | 00383 - 384 | 4 | 00384 - 386 | 6 | 00386 - 387 | 7 | 00387 - 388 | 8 | 00388 - 389 | 9 | 00389 - 390 | 0 | 00390 - 391 | 1 | 00391 - 393 | 3 | 00393 - 394 | 4 | 00394 - 396 | 6 | 00396 - 397 | 7 | 00397 - 398 | 8 | 00398 - 399 | 9 | 00399 - 400 | 0 | 00400 - 401 | 1 | 00401 - 403 | 3 | 00403 - 404 | 4 | 00404 - 406 | 6 | 00406 - 407 | 7 | 00407 - 408 | 8 | 00408 - 409 | 9 | 00409 - 410 | 0 | 00410 - 411 | 1 | 00411 - 413 | 3 | 00413 - 414 | 4 | 00414 - 416 | 6 | 00416 - 417 | 7 | 00417 - 418 | 8 | 00418 - 419 | 9 | 00419 - 420 | 0 | 00420 - 421 | 1 | 00421 - 423 | 3 | 00423 - 424 | 4 | 00424 - 426 | 6 | 00426 - 427 | 7 | 00427 - 428 | 8 | 00428 - 429 | 9 | 00429 - 430 | 0 | 00430 - 431 | 1 | 00431 - 433 | 3 | 00433 - 434 | 4 | 00434 - 436 | 6 | 00436 - 437 | 7 | 00437 - 438 | 8 | 00438 - 439 | 9 | 00439 - 440 | 0 | 00440 - 441 | 1 | 00441 - 443 | 3 | 00443 - 444 | 4 | 00444 - 446 | 6 | 00446 - 447 | 7 | 00447 - 448 | 8 | 00448 - 449 | 9 | 00449 - 450 | 0 | 00450 - 451 | 1 | 00451 - 453 | 3 | 00453 - 454 | 4 | 00454 - 456 | 6 | 00456 - 457 | 7 | 00457 - 458 | 8 | 00458 - 459 | 9 | 00459 - 460 | 0 | 00460 - 461 | 1 | 00461 - 463 | 3 | 00463 - 464 | 4 | 00464 - 466 | 6 | 00466 - 467 | 7 | 00467 - 468 | 8 | 00468 - 469 | 9 | 00469 - 470 | 0 | 00470 - 471 | 1 | 00471 - 473 | 3 | 00473 - 474 | 4 | 00474 - 476 | 6 | 00476 - 477 | 7 | 00477 - 478 | 8 | 00478 - 479 | 9 | 00479 - 480 | 0 | 00480 - 481 | 1 | 00481 - 483 | 3 | 00483 - 484 | 4 | 00484 - 486 | 6 | 00486 - 487 | 7 | 00487 - 488 | 8 | 00488 - 489 | 9 | 00489 - 490 | 0 | 00490 - 491 | 1 | 00491 - 493 | 3 | 00493 - 494 | 4 | 00494 - 496 | 6 | 00496 - 497 | 7 | 00497 - 498 | 8 | 00498 - 499 | 9 | 00499 - 500 | 0 | 00500 - 501 | 1 | 00501 - 503 | 3 | 00503 - 504 | 4 | 00504 - 506 | 6 | 00506 - 507 | 7 | 00507 - 508 | 8 | 00508 - 509 | 9 | 00509 - 510 | 0 | 00510 - 511 | 1 | 00511 - 513 | 3 | 00513 - 514 | 4 | 00514 - 516 | 6 | 00516 - 517 | 7 | 00517 - 518 | 8 | 00518 - 519 | 9 | 00519 - 520 | 0 | 00520 - 521 | 1 | 00521 - 523 | 3 | 00523 - 524 | 4 | 00524 - 526 | 6 | 00526 - 527 | 7 | 00527 - 528 | 8 | 00528 - 529 | 9 | 00529 - 530 | 0 | 00530 - 531 | 1 | 00531 - 533 | 3 | 00533 - 534 | 4 | 00534 - 536 | 6 | 00536 - 537 | 7 | 00537 - 538 | 8 | 00538 - 539 | 9 | 00539 - 540 | 0 | 00540 - 541 | 1 | 00541 - 543 | 3 | 00543 - 544 | 4 | 00544 - 546 | 6 | 00546 - 547 | 7 | 00547 - 548 | 8 | 00548 - 549 | 9 | 00549 - 550 | 0 | 00550 - 551 | 1 | 00551 - 553 | 3 | 00553 - 554 | 4 | 00554 - 556 | 6 | 00556 - 557 | 7 | 00557 - 558 | 8 | 00558 - 559 | 9 | 00559 - 560 | 0 | 00560 - 561 | 1 | 00561 - 563 | 3 | 00563 - 564 | 4 | 00564 - 566 | 6 | 00566 - 567 | 7 | 00567 - 568 | 8 | 00568 - 569 | 9 | 00569 - 570 | 0 | 00570 - 571 | 1 | 00571 - 573 | 3 | 00573 - 574 | 4 | 00574 - 576 | 6 | 00576 - 577 | 7 | 00577 - 578 | 8 | 00578 - 579 | 9 | 00579 - 580 | 0 | 00580 - 581 | 1 | 00581 - 583 | 3 | 00583 - 584 | 4 | 00584 - 586 | 6 | 00586 - 587 | 7 | 00587 - 588 | 8 | 00588 - 589 | 9 | 00589 - 590 | 0 | 00590 - 591 | 1 | 00591 - 593 | 3 | 00593 - 594 | 4 | 00594 - 596 | 6 | 00596 - 597 | 7 | 00597 - 598 | 8 | 00598 - 599 | 9 | 00599 - 600 | 0 | 00600 - 601 | 1 | 00601 - 603 | 3 | 00603 - 604 | 4 | 00604 - 606 | 6 | 00606 - 607 | 7 | 00607 - 608 | 8 | 00608 - 609 | 9 | 00609 - 610 | 0 | 00610 - 611 | 1 | 00611 - 613 | 3 | 00613 - 614 | 4 | 00614 - 616 | 6 | 00616 - 617 | 7 | 00617 - 618 | 8 | 00618 - 619 | 9 | 00619 - 620 | 0 | 00620 - 621 | 1 | 00621 - 623 | 3 | 00623 - 624 | 4 | 00624 - 626 | 6 | 00626 - 627 | 7 | 00627 - 628 | 8 | 00628 - 629 | 9 | 00629 - 630 | 0 | 00630 - 631 | 1 | 00631 - 633 | 3 | 00633 - 634 | 4 | 00634 - 636 | 6 | 00636 - 637 | 7 | 00637 - 638 | 8 | 00638 - 639 | 9 | 00639 - 640 | 0 | 00640 - 641 | 1 | 00641 - 643 | 3 | 00643 - 644 | 4 | 00644 - 646 | 6 | 00646 - 647 | 7 | 00647 - 648 | 8 | 00648 - 649 | 9 | 00649 - 650 | 0 | 00650 - 651 | 1 | 00651 - 653 | 3 | 00653 - 654 | 4 | 00654 - 656 | 6 | 00656 - 657 | 7 | 00657 - 658 | 8 | 00658 - 659 | 9 | 00659 - 660 | 0 | 00660 - 661 | 1 | 00661 - 663 | 3 | 00663 - 664 | 4 | 00664 - 666 | 6 | 00666 - 667 | 7 | 00667 - 668 | 8 | 00668 - 669 | 9 | 00669 - 670 | 0 | 00670 - 671 | 1 | 00671 - 673 | 3 | 00673 - 674 | 4 | 00674 - 676 | 6 | 00676 - 677 | 7 | 00677 - 678 | 8 | 00678 - 679 | 9 | 00679 - 680 | 0 | 00680 - 681 | 1 | 00681 - 683 | 3 | 00683 - 684 | 4 | 00684 - 686 | 6 | 00686 - 687 | 7 | 00687 - 688 | 8 | 00688 - 689 | 9 | 00689 - 690 | 0 | 00690 - 691 | 1 | 00691 - 693 | 3 | 00693 - 694 | 4 | 00694 - 696 | 6 | 00696 - 697 | 7 | 00697 - 698 | 8 | 00698 - 699 | 9 | 00699 - 700 | 0 | 00700 - 701 | 1 | 00701 - 703 | 3 | 00703 - 704 | 4 | 00704 - 706 | 6 | 00706 - 707 | 7 | 00707 - 708 | 8 | 00708 - 709 | 9 | 00709 - 710 | 0 | 00710 - 711 | 1 | 00711 - 713 | 3 | 00713 - 714 | 4 | 00714 - 716 | 6 | 00716 - 717 | 7 | 00717 - 718 | 8 | 00718 - 719 | 9 | 00719 - 720 | 0 | 00720 - 721 | 1 | 00721 - 723 | 3 | 00723 - 724 | 4 | 00724 - 726 | 6 | 00726 - 727 | 7 | 00727 - 728 | 8 | 00728 - 729 | 9 | 00729 - 730 | 0 | 00730 - 731 | 1 | 00731 - 733 | 3 | 00733 - 734 | 4 | 00734 - 736 | 6 | 00736 - 737 | 7 | 00737 - 738 | 8 | 00738 - 739 | 9 | 00739 - 740 | 0 | 00740 - 741 | 1 | 00741 - 743 | 3 | 00743 - 744 | 4 | 00744 - 746 | 6 | 00746 - 747 | 7 | 00747 - 748 | 8 | 00748 - 749 | 9 | 00749 - 750 | 0 | 00750 - 751 | 1 | 00751 - 753 | 3 | 00753 - 754 | 4 | 00754 - 756 | 6 | 00756 - 757 | 7 | 00757 - 758 | 8 | 00758 - 759 | 9 | 00759 - 760 | 0 | 00760 - 761 | 1 | 00761 - 763 | 3 | 00763 - 764 | 4 | 00764 - 766 | 6 | 00766 - 767 | 7 | 00767 - 768 | 8 | 00768 - 769 | 9 | 00769 - 770 | 0 | 00770 - 771 | 1 | 00771 - 773 | 3 | 00773 - 774 | 4 | 00774 - 776 | 6 | 00776 - 777 | 7 | 00777 - 778 | 8 | 00778 - 779 | 9 | 00779 - 780 | 0 | 00780 - 781 | 1 | 00781 - 783 | 3 | 00783 - 784 | 4 | 00784 - 786 | 6 | 00786 - 787 | 7 | 00787 - 788 | 8 | 00788 - 789 | 9 | 00789 - 790 | 0 | 00790 - 791 | 1 | 00791 - 793 | 3 | 00793 - 794 | 4 | 00794 - 796 | 6 | 00796 - 797 | 7 | 00797 - 798 | 8 | 00798 - 799 | 9 | 00799 - 800 | 0 | 00800 - 801 | 1 | 00801 - 803 | 3 | 00803 - 804 | 4 | 00804 - 806 | 6 | 00806 - 807 | 7 | 00807 - 808 | 8 | 00808 - 809 | 9 | 00809 - 810 | 0 | 00810 - 811 | 1 | 00811 - 813 | 3 | 00813 - 814 | 4 | 00814 - 816 | 6 | 00816 - 817 | 7 | 00817 - 818 | 8 | 00818 - 819 | 9 | 00819 - 820 | 0 | 00820 - 821 | 1 | 00821 - 823 | 3 | 00823 - 824 | 4 | 00824 - 826 | 6 | 00826 - 827 | 7 | 00827 - 828 | 8 | 00828 - 829 | 9 | 00829 - 830 | 0 | 00830 - 831 | 1 | 00831 - 833 | 3 | 00833 - 834 | 4 | 00834 - 836 | 6 | 00836 - 837 | 7 | 00837 - 838 | 8 | 00838 - 839 | 9 | 00839 - 840 | 0 | 00840 - 841 | 1 | 00841 - 843 | 3 | 00843 - 844 | 4 | 00844 - 846 | 6 | 00846 - 847 | 7 | 00847 - 848 | 8 | 00848 - 849 | 9 | 00849 - 850 | 0 | 00850 - 851 | 1 | 00851 - 853 | 3 | 00853 - 854 | 4 | 00854 - 856 | 6 | 00856 - 857 | 7 | 00857 - 858 | 8 | 00858 - 859 | 9 | 00859 - 860 | 0 | 00860 - 861 | 1 | 00861 - 863 | 3 | 00863 - 864 | 4 | 00864 - 866 | 6 | 00866 - 867 | 7 | 00867 - 868 | 8 | 00868 - 869 | 9 | 00869 - 870 | 0 | 00870 - 871 | 1 | 00871 - 873 | 3 | 00873 - 874 | 4 | 00874 - 876 | 6 | 00876 - 877 | 7 | 00877 - 878 | 8 | 00878 - 879 | 9 | 00879 - 880 | 0 | 00880 - 881 | 1 | 00881 - 883 | 3 | 00883 - 884 | 4 | 00884 - 886 | 6 | 00886 - 887 | 7 | 00887 - 888 | 8 | 00888 - 889 | 9 | 00889 - 890 | 0 | 00890 - 891 | 1 | 00891 - 893 | 3 | 00893 - 894 | 4 | 00894 - 896 | 6 | 00896 - 897 | 7 | 00897 - 898 | 8 | 00898 - 899 | 9 | 00899 - 900 | 0 | 00900 - 901 | 1 | 00901 - 903 | 3 | 00903 - 904 | 4 | 00904 - 906 | 6 | 00906 - 907 | 7 | 00907 - 908 | 8 | 00908 - 909 | 9 | 00909 - 910 | 0 | 00910 - 911 | 1 | 00911 - 913 | 3 | 00913 - 914 | 4 | 00914 - 916 | 6 | 00916 - 917 | 7 | 00917 - 918 | 8 | 00918 - 919 | 9 | 00919 - 920 | 0 | 00920 - 921 | 1 | 00921 - 923 | 3 | 00923 - 924 | 4 | 00924 - 926 | 6 | 00926 - 927 | 7 | 00927 - 928 | 8 | 00928 - 929 | 9 | 00929 - 930 | 0 | 00930 - 931 | 1 | 00931 - 933 | 3 | 00933 - 934 | 4 | 00934 - 936 | 6 | 00936 - 937 | 7 | 00937 - 938 | 8 | 00938 - 939 | 9 | 00939 - 940 | 0 | 00940 - 941 | 1 | 00941 - 943 | 3 | 00943 - 944 | 4 | 00944 - 946 | 6 | 00946 - 947 | 7 | 00947 - 948 | 8 | 00948 - 949 | 9 | 00949 - 950 | 0 | 00950 - 951 | 1 | 00951 - 953 | 3 | 00953 - 954 | 4 | 00954 - 956 | 6 | 00956 - 957 | 7 | 00957 - 958 | 8 | 00958 - 959 | 9 | 00959 - 960 | 0 | 00960 - 961 | 1 | 00961 - 963 | 3 | 00963 - 964 | 4 | 00964 - 966 | 6 | 00966 - 967 | 7 | 00967 - 968 | 8 | 00968 - 969 | 9 | 00969 - 970 | 0 | 00970 - 971 | 1 | 00971 - 973 | 3 | 00973 - 974 | 4 | 00974 - 976 | 6 | 00976 - 977 | 7 | 00977 - 978 | 8 | 00978 - 979 | 9 | 00979 - 980 | 0 | 00980 - 981 | 1 | 00981 - 983 | 3 | 00983 - 984 | 4 | 00984 - 986 | 6 | 00986 - 987 | 7 | 00987 - 988 | 8 | 00988 - 989 | 9 | 00989 - 990 | 0 | 00990 - 991 | 1 | 00991 - 993 | 3 | 00993 - 994 | 4 | 00994 - 996 | 6 | 00996 - 997 | 7 | 00997 - 998 | 8 | 00998 - 999 | 9 | 00999 - 1000 | 0 | 01000 - 1001 | 101 | 0000100001 - 1003 | 103 | 0000300003 - 1004 | 104 | 0000400004 - 1006 | 106 | 0000600006 - 1007 | 107 | 0000700007 - 1008 | 108 | 0000800008 - 1009 | 109 | 0000900009 - 1010 | 100 | 0001000010 - 1011 | 101 | 0001100011 - 1013 | 103 | 0001300013 - 1014 | 104 | 0001400014 - 1016 | 106 | 0001600016 - 1017 | 107 | 0001700017 - 1018 | 108 | 0001800018 - 1019 | 109 | 0001900019 - 1020 | 100 | 0002000020 - 1101 | 201 | aaa - 1103 | 203 | ccc - 1104 | 204 | ddd -(819 rows) - ---Testcase 384: -EXPLAIN (verbose, costs off) -INSERT INTO ft2 (c1,c2,c3) VALUES (1200,999,'foo'); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.ft2 - -> Result - Output: 1200, 999, NULL::integer, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft2 '::character(10), NULL::text -(3 rows) - ---Testcase 385: -INSERT INTO ft2 (c1,c2,c3) VALUES (1200,999,'foo'); ---Testcase 386: -SELECT c1 FROM ft2 WHERE c1 = 1200 AND c2 = 999; - c1 ------- - 1200 -(1 row) - ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; -- can be pushed down ---UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; ---Testcase 387: -EXPLAIN (verbose, costs off) -DELETE FROM ft2 WHERE c1 = 1200; - QUERY PLAN ------------------------------------------------------------------------------ - Delete on public.ft2 - -> Foreign Scan on public.ft2 - Output: c3, "time" - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = 1200)) -(4 rows) - ---Testcase 388: -SELECT c1 FROM ft2 WHERE c1 = 1200; - c1 ------- - 1200 -(1 row) - ---Testcase 389: -DELETE FROM ft2 WHERE c1 = 1200; ---Testcase 390: -SELECT c1 FROM ft2 WHERE c1 = 1200; - c1 ----- -(0 rows) - --- Test UPDATE/DELETE with RETURNING on a three-table join ---Testcase 391: -INSERT INTO ft2 (c1,c2,c3) - SELECT id, id - 1200, to_char(id, 'FM00000') FROM generate_series(1201, 1300) id; ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c3 = 'foo' --- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) --- WHERE ft2.c1 > 1200 AND ft2.c2 = ft4.c1 --- RETURNING ft2, ft2.*, ft4, ft4.*; -- can be pushed down ---UPDATE ft2 SET c3 = 'foo' --- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) --- WHERE ft2.c1 > 1200 AND ft2.c2 = ft4.c1 --- RETURNING ft2, ft2.*, ft4, ft4.*; ---Testcase 392: -EXPLAIN (verbose, costs off) -DELETE FROM ft2 - USING ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) - WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; -- can be pushed down - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------ - Delete on public.ft2 - -> Hash Right Join - Output: ft2.c3, ft2."time", ft4.*, ft5.* - Hash Cond: (ft5.c1 = ft4.c1) - -> Foreign Scan on public.ft5 - Output: ft5.*, ft5.c1 - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" - -> Hash - Output: ft2.c3, ft2."time", ft4.*, ft4.c1 - -> Hash Join - Output: ft2.c3, ft2."time", ft4.*, ft4.c1 - Hash Cond: (ft4.c1 = ft2.c2) - -> Foreign Scan on public.ft4 - Output: ft4.*, ft4.c1 - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" - -> Hash - Output: ft2.c3, ft2."time", ft2.c2 - -> Foreign Scan on public.ft2 - Output: ft2.c3, ft2."time", ft2.c2 - InfluxDB query: SELECT "c2", "c3" FROM "T1" WHERE (("C 1" > 1200)) AND ((("C 1" % 10) = 0)) -(20 rows) - ---Testcase 393: -SELECT 100 FROM ft2, - ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) - WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; - ?column? ----------- - 100 - 100 - 100 - 100 - 100 - 100 - 100 - 100 - 100 - 100 -(10 rows) - ---Testcase 394: -DELETE FROM ft2 - USING ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) - WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; ---Testcase 395: -SELECT 100 FROM ft2, - ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) - WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; - ?column? ----------- -(0 rows) - ---Testcase 396: -DELETE FROM ft2 WHERE ft2.c1 > 1200; --- Test UPDATE with a MULTIEXPR sub-select --- (maybe someday this'll be remotely executable, but not today) ---EXPLAIN (verbose, costs off) ---UPDATE ft2 AS target SET (c2, c7) = ( --- SELECT c2 * 10, c7 --- FROM ft2 AS src --- WHERE target.c1 = src.c1 ---) WHERE c1 > 1100; ---UPDATE ft2 AS target SET (c2, c7) = ( --- SELECT c2 * 10, c7 --- FROM ft2 AS src --- WHERE targ--et.c1 = src.c1 ---) WHERE c1 > 1100; ---UPDATE ft2 AS target SET (c2) = ( --- SELECT c2 / 10 --- FROM ft2 AS src --- WHERE targ--et.c1 = src.c1 ---) WHERE c1 > 1100; --- Test UPDATE/DELETE with WHERE or JOIN/ON conditions containing --- user-defined operators/functions ---Testcase 397: -INSERT INTO ft2 (c1,c2,c3) - SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id; ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c3 = 'bar' WHERE influxdb_fdw_abs(c1) > 2000 RETURNING *; -- can't be pushed down ---UPDATE ft2 SET c3 = 'bar' WHERE influxdb_fdw_abs(c1) > 2000 RETURNING *; ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c3 = 'baz' --- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) --- WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 --- RETURNING ft2.*, ft4.*, ft5.*; -- can't be pushed down ---UPDATE ft2 SET c3 = 'baz' --- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) --- WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 --- RETURNING ft2.*, ft4.*, ft5.*; ---Testcase 398: -EXPLAIN (verbose, costs off) -DELETE FROM ft2 - USING ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) - WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; -- can't be pushed down - QUERY PLAN ----------------------------------------------------------------------------------------------- - Delete on public.ft2 - -> Nested Loop - Output: ft2.c3, ft2."time", ft4.*, ft5.* - Join Filter: (ft4.c1 === ft5.c1) - -> Hash Join - Output: ft2.c3, ft2."time", ft4.*, ft4.c1 - Hash Cond: (ft4.c1 = ft2.c2) - -> Foreign Scan on public.ft4 - Output: ft4.*, ft4.c1 - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" - -> Hash - Output: ft2.c3, ft2."time", ft2.c2 - -> Foreign Scan on public.ft2 - Output: ft2.c3, ft2."time", ft2.c2 - InfluxDB query: SELECT "c2", "c3" FROM "T1" WHERE (("C 1" > 2000)) - -> Materialize - Output: ft5.*, ft5.c1 - -> Foreign Scan on public.ft5 - Output: ft5.*, ft5.c1 - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" -(20 rows) - ---Testcase 399: -SELECT ft2.c1, ft2.c2, ft2.c3 - FROM ft2, ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) - WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; - c1 | c2 | c3 -------+----+------- - 2006 | 6 | 02006 -(1 row) - ---Testcase 400: -DELETE FROM ft2 - USING ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) - WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; ---Testcase 401: -SELECT ft2.c1, ft2.c2, ft2.c3 - FROM ft2, ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) - WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; - c1 | c2 | c3 -----+----+---- -(0 rows) - ---Testcase 402: -DELETE FROM ft2 WHERE ft2.c1 > 2000; --- Test that trigger on remote table works as expected ---Testcase 403: -CREATE OR REPLACE FUNCTION "S 1".F_BRTRIG() RETURNS trigger AS $$ -BEGIN - NEW.c3 = NEW.c3 || '_trig_update'; - RETURN NEW; -END; -$$ LANGUAGE plpgsql; ---Testcase 404: -CREATE TRIGGER t1_br_insert BEFORE INSERT OR UPDATE - ON "S 1"."T 1" FOR EACH ROW EXECUTE PROCEDURE "S 1".F_BRTRIG(); ---Testcase 405: -INSERT INTO ft2 (c1,c2,c3) VALUES (1208, 818, 'fff'); ---Testcase 406: -SELECT c1, c2, c3, c6, c7, c8 FROM ft2 WHERE c1 = 1208; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+-----+----+------------+---- - 1208 | 818 | fff | | ft2 | -(1 row) - ---Testcase 407: -INSERT INTO ft2 (c1,c2,c3,c6) VALUES (1218, 818, 'ggg', '(--;'); ---Testcase 408: -SELECT c1, c2, c3, c6, c7, c8 FROM ft2 WHERE c1 = 1218; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+-----+------+------------+---- - 1218 | 818 | ggg | (--; | ft2 | -(1 row) - ---UPDATE ft2 SET c2 = c2 + 600 WHERE c1 % 10 = 8 AND c1 < 1200 RETURNING *; --- Test errors thrown on remote side during update -ALTER TABLE "S 1"."T 1" ADD CONSTRAINT c2positive CHECK (c2 >= 0); --- influxdb_fdw does not support key, ON CONFLICT ---INSERT INTO ft1(c1, c2) VALUES(11, 12); -- duplicate key ---Testcase 409: -INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT DO NOTHING; -- works -ERROR: ON CONFLICT is not supported ---Testcase 410: -INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO NOTHING; -- unsupported -ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification ---Testcase 411: -INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO UPDATE SET c3 = 'ffg'; -- unsupported -ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification ---INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive ---UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive -/* --- influxdb_fdw does not support transactions --- Test savepoint/rollback behavior -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; -begin; -update ft2 set c2 = 42 where c2 = 0; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -savepoint s1; -update ft2 set c2 = 44 where c2 = 4; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -release savepoint s1; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -savepoint s2; -update ft2 set c2 = 46 where c2 = 6; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -rollback to savepoint s2; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -release savepoint s2; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -savepoint s3; -update ft2 set c2 = -2 where c2 = 42 and c1 = 10; -- fail on remote side -rollback to savepoint s3; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -release savepoint s3; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; --- none of the above is committed yet remotely -select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; -commit; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; -*/ --- Above DMLs add data with c6 as NULL in ft1, so test ORDER BY NULLS LAST and NULLs --- FIRST behavior here. --- ORDER BY DESC NULLS LAST options ---Testcase 412: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY c6 DESC NULLS LAST, c1 OFFSET 795 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------- - Limit - Output: c1, c2, c3, "time", c6, c7, c8 - -> Sort - Output: c1, c2, c3, "time", c6, c7, c8 - Sort Key: ft1.c6 DESC NULLS LAST, ft1.c1 - -> Foreign Scan on public.ft1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(8 rows) - ---Testcase 413: -SELECT c1, c2, c3, c6, c7, c8 FROM ft1 ORDER BY c6 DESC NULLS LAST, c1 OFFSET 795 LIMIT 10; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+------------+------+------------+----- - 960 | 0 | 00960 | 0 | 0 | foo - 970 | 0 | 00970 | 0 | 0 | foo - 980 | 0 | 00980 | 0 | 0 | foo - 990 | 0 | 00990 | 0 | 0 | foo - 1000 | 0 | 01000 | 0 | 0 | foo - 1218 | 818 | ggg | (--; | ft2 | - 1001 | 101 | 0000100001 | | ft2 | - 1003 | 103 | 0000300003 | | ft2 | - 1004 | 104 | 0000400004 | | ft2 | - 1006 | 106 | 0000600006 | | ft2 | -(10 rows) - --- ORDER BY DESC NULLS FIRST options ---Testcase 414: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY c6 DESC NULLS FIRST, c1 OFFSET 15 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------- - Limit - Output: c1, c2, c3, "time", c6, c7, c8 - -> Sort - Output: c1, c2, c3, "time", c6, c7, c8 - Sort Key: ft1.c6 DESC, ft1.c1 - -> Foreign Scan on public.ft1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(8 rows) - ---Testcase 415: -SELECT c1, c2, c3, c6, c7, c8 FROM ft1 ORDER BY c6 DESC NULLS FIRST, c1 OFFSET 15 LIMIT 10; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+------------+----+------------+----- - 1020 | 100 | 0002000020 | | ft2 | - 1101 | 201 | aaa | | ft2 | - 1103 | 203 | ccc | | ft2 | - 1104 | 204 | ddd | | ft2 | - 1208 | 818 | fff | | ft2 | - 9 | 9 | 00009 | 9 | 9 | foo - 19 | 9 | 00019 | 9 | 9 | foo - 29 | 9 | 00029 | 9 | 9 | foo - 39 | 9 | 00039 | 9 | 9 | foo - 49 | 9 | 00049 | 9 | 9 | foo -(10 rows) - --- ORDER BY ASC NULLS FIRST options ---Testcase 416: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY c6 ASC NULLS FIRST, c1 OFFSET 15 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------- - Limit - Output: c1, c2, c3, "time", c6, c7, c8 - -> Sort - Output: c1, c2, c3, "time", c6, c7, c8 - Sort Key: ft1.c6 NULLS FIRST, ft1.c1 - -> Foreign Scan on public.ft1 - Output: c1, c2, c3, "time", c6, c7, c8 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" -(8 rows) - ---Testcase 417: -SELECT c1, c2, c3, c6, c7, c8 FROM ft1 ORDER BY c6 ASC NULLS FIRST, c1 OFFSET 15 LIMIT 10; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+------------+------+------------+----- - 1020 | 100 | 0002000020 | | ft2 | - 1101 | 201 | aaa | | ft2 | - 1103 | 203 | ccc | | ft2 | - 1104 | 204 | ddd | | ft2 | - 1208 | 818 | fff | | ft2 | - 1218 | 818 | ggg | (--; | ft2 | - 10 | 0 | 00010 | 0 | 0 | foo - 20 | 0 | 00020 | 0 | 0 | foo - 30 | 0 | 00030 | 0 | 0 | foo - 40 | 0 | 00040 | 0 | 0 | foo -(10 rows) - --- =================================================================== --- test check constraints --- =================================================================== --- Consistent check constraints provide consistent results -ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2positive CHECK (c2 >= 0); ---Testcase 418: -EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 < 0; - QUERY PLAN ----------------------------------------------------------------- - Foreign Scan - Output: (count(*)) - InfluxDB query: SELECT count(*) FROM "T1" WHERE (("c2" < 0)) -(3 rows) - --- InfluxDB return null value because it does not have any record. ---Testcase 419: -SELECT count(*) FROM ft1 WHERE c2 < 0; - count -------- -(0 rows) - -SET constraint_exclusion = 'on'; ---Testcase 420: -EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 < 0; - QUERY PLAN --------------------------------- - Aggregate - Output: count(*) - -> Result - One-Time Filter: false -(4 rows) - ---Testcase 421: -SELECT count(*) FROM ft1 WHERE c2 < 0; - count -------- - 0 -(1 row) - -RESET constraint_exclusion; --- check constraint is enforced on the remote side, not locally --- INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive --- UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive -ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2positive; --- But inconsistent check constraints provide inconsistent results -ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2negative CHECK (c2 < 0); ---Testcase 422: -EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 >= 0; - QUERY PLAN ------------------------------------------------------------------ - Foreign Scan - Output: (count(*)) - InfluxDB query: SELECT count(*) FROM "T1" WHERE (("c2" >= 0)) -(3 rows) - ---Testcase 423: -SELECT count(*) FROM ft1 WHERE c2 >= 0; - count -------- - 821 -(1 row) - -SET constraint_exclusion = 'on'; ---Testcase 424: -EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 >= 0; - QUERY PLAN --------------------------------- - Aggregate - Output: count(*) - -> Result - One-Time Filter: false -(4 rows) - ---Testcase 425: -SELECT count(*) FROM ft1 WHERE c2 >= 0; - count -------- - 0 -(1 row) - -RESET constraint_exclusion; --- local check constraint is not actually enforced ---Testcase 426: -INSERT INTO ft1(c1, c2) VALUES(1111, 2); --- UPDATE ft1 SET c2 = c2 + 1 WHERE c1 = 1; -ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2negative; --- influxdb_fdw does not support this feature --- =================================================================== --- test WITH CHECK OPTION constraints --- =================================================================== ---Testcase 427: -CREATE FUNCTION row_before_insupd_trigfunc() RETURNS trigger AS $$BEGIN NEW.a := NEW.a + 10; RETURN NEW; END$$ LANGUAGE plpgsql; ---Testcase 428: -CREATE FOREIGN TABLE base_tbl (a int, b int) SERVER influxdb_svr OPTIONS (table 'base_tbl'); ---ALTER FOREIGN TABLE base_tbl SET (autovacuum_enabled = 'false'); ---Testcase 429: -CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON base_tbl FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); ---Testcase 430: -CREATE FOREIGN TABLE foreign_tbl (a int, b int) - SERVER influxdb_svr OPTIONS (table 'base_tbl'); ---Testcase 431: -CREATE VIEW rw_view AS SELECT * FROM base_tbl - WHERE a < b WITH CHECK OPTION; ---Testcase 432: -\d+ rw_view - View "public.rw_view" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - a | integer | | | | plain | - b | integer | | | | plain | -View definition: - SELECT base_tbl.a, - base_tbl.b - FROM base_tbl - WHERE base_tbl.a < base_tbl.b; -Options: check_option=cascaded - ---Testcase 433: -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO rw_view VALUES (0, 5); - QUERY PLAN ---------------------------- - Insert on public.base_tbl - -> Result - Output: 0, 5 -(3 rows) - ---Testcase 434: -INSERT INTO rw_view VALUES (0, 5); -- should fail -ERROR: new row violates check option for view "rw_view" -DETAIL: Failing row contains (10, 5). ---Testcase 435: -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO rw_view VALUES (0, 15); - QUERY PLAN ---------------------------- - Insert on public.base_tbl - -> Result - Output: 0, 15 -(3 rows) - ---Testcase 436: -INSERT INTO rw_view VALUES (0, 15); -- ok ---Testcase 437: -SELECT * FROM foreign_tbl; - a | b -----+---- - 10 | 5 - 10 | 15 -(2 rows) - ---EXPLAIN (VERBOSE, COSTS OFF) ---UPDATE rw_view SET b = b + 5; ---UPDATE rw_view SET b = b + 5; -- should fail ---EXPLAIN (VERBOSE, COSTS OFF) ---UPDATE rw_view SET b = b + 15; ---UPDATE rw_view SET b = b + 15; -- ok ---SELECT * FROM foreign_tbl; ---Testcase 438: -DELETE FROM foreign_tbl; -DROP FOREIGN TABLE foreign_tbl CASCADE; ---Testcase 439: -DROP TRIGGER row_before_insupd_trigger ON base_tbl; ---Testcase 440: -DROP FOREIGN TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view --- influxdb_fdw does not support partitions --- test WCO for partitions ---Testcase 441: -CREATE FOREIGN TABLE child_tbl (a int, b int) SERVER influxdb_svr OPTIONS (table 'child_tbl'); ---ALTER FOREIGN TABLE child_tbl SET (autovacuum_enabled = 'false'); ---Testcase 442: -CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON child_tbl FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); ---Testcase 443: -CREATE FOREIGN TABLE foreign_tbl (a int, b int) - SERVER influxdb_svr OPTIONS (table 'child_tbl'); ---Testcase 444: -CREATE TABLE parent_tbl (a int, b int) PARTITION BY RANGE(a); -ALTER TABLE parent_tbl ATTACH PARTITION child_tbl FOR VALUES FROM (0) TO (100); ---Testcase 445: -CREATE VIEW rw_view AS SELECT * FROM parent_tbl - WHERE a < b WITH CHECK OPTION; ---Testcase 446: -\d+ rw_view - View "public.rw_view" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - a | integer | | | | plain | - b | integer | | | | plain | -View definition: - SELECT parent_tbl.a, - parent_tbl.b - FROM parent_tbl - WHERE parent_tbl.a < parent_tbl.b; -Options: check_option=cascaded - ---Testcase 447: -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO rw_view VALUES (0, 5); - QUERY PLAN ------------------------------ - Insert on public.parent_tbl - -> Result - Output: 0, 5 -(3 rows) - ---Testcase 448: -INSERT INTO rw_view VALUES (0, 5); -- should fail -ERROR: cannot route inserted tuples to a foreign table ---Testcase 449: -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO rw_view VALUES (0, 15); - QUERY PLAN ------------------------------ - Insert on public.parent_tbl - -> Result - Output: 0, 15 -(3 rows) - ---Testcase 450: -INSERT INTO rw_view VALUES (0, 15); -- ok -ERROR: cannot route inserted tuples to a foreign table ---Testcase 451: -SELECT * FROM foreign_tbl; - a | b ----+--- -(0 rows) - ---EXPLAIN (VERBOSE, COSTS OFF) ---UPDATE rw_view SET b = b + 5; ---UPDATE rw_view SET b = b + 5; -- should fail ---EXPLAIN (VERBOSE, COSTS OFF) ---UPDATE rw_view SET b = b + 15; ---UPDATE rw_view SET b = b + 15; -- ok ---SELECT * FROM foreign_tbl; ---Testcase 452: -DROP FOREIGN TABLE foreign_tbl CASCADE; ---Testcase 453: -DROP TRIGGER row_before_insupd_trigger ON child_tbl; ---Testcase 454: -DROP FOREIGN TABLE child_tbl CASCADE; ---Testcase 455: -DROP TABLE parent_tbl CASCADE; -NOTICE: drop cascades to view rw_view ---Testcase 456: -DROP FUNCTION row_before_insupd_trigfunc; --- =================================================================== --- test serial columns (ie, sequence-based defaults) --- =================================================================== ---Testcase 457: -create foreign table loc1 (f1 serial, f2 text) - server influxdb_svr options(table 'loc1'); ---alter foreign table loc1 set (autovacuum_enabled = 'false'); ---Testcase 458: -create foreign table rem1 (f1 serial, f2 text) - server influxdb_svr options(table 'loc1'); ---Testcase 459: -select pg_catalog.setval('rem1_f1_seq', 10, false); - setval --------- - 10 -(1 row) - ---Testcase 460: -insert into loc1(f2) values('hi'); ---Testcase 461: -insert into rem1(f2) values('hi remote'); ---Testcase 462: -insert into loc1(f2) values('bye'); ---Testcase 463: -insert into rem1(f2) values('bye remote'); ---Testcase 464: -select * from loc1; - f1 | f2 -----+------------ - 1 | hi - 10 | hi remote - 2 | bye - 11 | bye remote -(4 rows) - ---Testcase 465: -select * from rem1; - f1 | f2 -----+------------ - 1 | hi - 10 | hi remote - 2 | bye - 11 | bye remote -(4 rows) - --- =================================================================== --- test generated columns --- =================================================================== ---Testcase 466: -create foreign table gloc1 (a int, b int generated always as (a * 2) stored) - server influxdb_svr options(table 'gloc1'); -ERROR: syntax error at or near "(" -LINE 1: ...ign table gloc1 (a int, b int generated always as (a * 2) st... - ^ ---alter foreign table gloc1 set (autovacuum_enabled = 'false'); ---Testcase 467: -create foreign table grem1 ( - a int, - b int generated always as (a * 2) stored) - server influxdb_svr options(table 'gloc1'); -ERROR: syntax error at or near "(" -LINE 3: b int generated always as (a * 2) stored) - ^ ---Testcase 468: -insert into grem1 (a) values (1), (22); -ERROR: relation "grem1" does not exist -LINE 1: insert into grem1 (a) values (1), (22); - ^ ---update grem1 set a = 22 where a = 2; ---Testcase 469: -select * from gloc1; -ERROR: relation "gloc1" does not exist -LINE 1: select * from gloc1; - ^ ---Testcase 470: -select * from grem1; -ERROR: relation "grem1" does not exist -LINE 1: select * from grem1; - ^ --- Clean up: -delete from grem1; -ERROR: relation "grem1" does not exist -LINE 1: delete from grem1; - ^ --- =================================================================== --- test local triggers --- =================================================================== --- Trigger functions "borrowed" from triggers regress test. ---Testcase 471: -CREATE FUNCTION trigger_func() RETURNS trigger LANGUAGE plpgsql AS $$ -BEGIN - RAISE NOTICE 'trigger_func(%) called: action = %, when = %, level = %', - TG_ARGV[0], TG_OP, TG_WHEN, TG_LEVEL; - RETURN NULL; -END;$$; ---Testcase 472: -CREATE TRIGGER trig_stmt_before BEFORE DELETE OR INSERT OR UPDATE ON rem1 - FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---Testcase 473: -CREATE TRIGGER trig_stmt_after AFTER DELETE OR INSERT OR UPDATE ON rem1 - FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---Testcase 474: -CREATE OR REPLACE FUNCTION trigger_data() RETURNS trigger -LANGUAGE plpgsql AS $$ - -declare - oldnew text[]; - relid text; - argstr text; -begin - - relid := TG_relid::regclass; - argstr := ''; - for i in 0 .. TG_nargs - 1 loop - if i > 0 then - argstr := argstr || ', '; - end if; - argstr := argstr || TG_argv[i]; - end loop; - - RAISE NOTICE '%(%) % % % ON %', - tg_name, argstr, TG_when, TG_level, TG_OP, relid; - oldnew := '{}'::text[]; - if TG_OP != 'INSERT' then - oldnew := array_append(oldnew, format('OLD: %s', OLD)); - end if; - - if TG_OP != 'DELETE' then - oldnew := array_append(oldnew, format('NEW: %s', NEW)); - end if; - - RAISE NOTICE '%', array_to_string(oldnew, ','); - - if TG_OP = 'DELETE' then - return OLD; - else - return NEW; - end if; -end; -$$; --- Test basic functionality ---Testcase 475: -CREATE TRIGGER trig_row_before -BEFORE INSERT OR UPDATE OR DELETE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 476: -CREATE TRIGGER trig_row_after -AFTER INSERT OR UPDATE OR DELETE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 477: -delete from rem1; -NOTICE: trigger_func() called: action = DELETE, when = BEFORE, level = STATEMENT -NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1 -NOTICE: OLD: (1,hi) -NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1 -NOTICE: OLD: (10,"hi remote") -NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1 -NOTICE: OLD: (2,bye) -NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1 -NOTICE: OLD: (11,"bye remote") -NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1 -NOTICE: OLD: (1,hi) -NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1 -NOTICE: OLD: (10,"hi remote") -NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1 -NOTICE: OLD: (2,bye) -NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1 -NOTICE: OLD: (11,"bye remote") -NOTICE: trigger_func() called: action = DELETE, when = AFTER, level = STATEMENT ---Testcase 478: -insert into rem1 values(1,'insert'); -NOTICE: trigger_func() called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1 -NOTICE: NEW: (1,insert) -NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1 -NOTICE: NEW: (1,insert) -NOTICE: trigger_func() called: action = INSERT, when = AFTER, level = STATEMENT ---update rem1 set f2 = 'update' where f1 = 1; ---update rem1 set f2 = f2 || f2; --- cleanup ---Testcase 479: -DROP TRIGGER trig_row_before ON rem1; ---Testcase 480: -DROP TRIGGER trig_row_after ON rem1; ---Testcase 481: -DROP TRIGGER trig_stmt_before ON rem1; ---Testcase 482: -DROP TRIGGER trig_stmt_after ON rem1; ---Testcase 483: -DELETE from rem1; --- Test multiple AFTER ROW triggers on a foreign table ---Testcase 484: -CREATE TRIGGER trig_row_after1 -AFTER INSERT OR UPDATE OR DELETE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 485: -CREATE TRIGGER trig_row_after2 -AFTER INSERT OR UPDATE OR DELETE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 486: -insert into rem1 values(1,'insert'); -NOTICE: trig_row_after1(23, skidoo) AFTER ROW INSERT ON rem1 -NOTICE: NEW: (1,insert) -NOTICE: trig_row_after2(23, skidoo) AFTER ROW INSERT ON rem1 -NOTICE: NEW: (1,insert) ---update rem1 set f2 = 'update' where f1 = 1; ---update rem1 set f2 = f2 || f2; ---Testcase 487: -delete from rem1; -NOTICE: trig_row_after1(23, skidoo) AFTER ROW DELETE ON rem1 -NOTICE: OLD: (1,insert) -NOTICE: trig_row_after2(23, skidoo) AFTER ROW DELETE ON rem1 -NOTICE: OLD: (1,insert) --- cleanup ---Testcase 488: -DROP TRIGGER trig_row_after1 ON rem1; ---Testcase 489: -DROP TRIGGER trig_row_after2 ON rem1; --- Test WHEN conditions ---Testcase 490: -CREATE TRIGGER trig_row_before_insupd -BEFORE INSERT OR UPDATE ON rem1 -FOR EACH ROW -WHEN (NEW.f2 like '%update%') -EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 491: -CREATE TRIGGER trig_row_after_insupd -AFTER INSERT OR UPDATE ON rem1 -FOR EACH ROW -WHEN (NEW.f2 like '%update%') -EXECUTE PROCEDURE trigger_data(23,'skidoo'); --- Insert or update not matching: nothing happens ---Testcase 492: -INSERT INTO rem1 values(1, 'insert'); ---UPDATE rem1 set f2 = 'test'; --- Insert or update matching: triggers are fired ---Testcase 493: -INSERT INTO rem1 values(2, 'update'); -NOTICE: trig_row_before_insupd(23, skidoo) BEFORE ROW INSERT ON rem1 -NOTICE: NEW: (2,update) -NOTICE: trig_row_after_insupd(23, skidoo) AFTER ROW INSERT ON rem1 -NOTICE: NEW: (2,update) ---UPDATE rem1 set f2 = 'update update' where f1 = '2'; ---Testcase 494: -CREATE TRIGGER trig_row_before_delete -BEFORE DELETE ON rem1 -FOR EACH ROW -WHEN (OLD.f2 like '%update%') -EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 495: -CREATE TRIGGER trig_row_after_delete -AFTER DELETE ON rem1 -FOR EACH ROW -WHEN (OLD.f2 like '%update%') -EXECUTE PROCEDURE trigger_data(23,'skidoo'); --- Trigger is fired for f1=2, not for f1=1 ---Testcase 496: -DELETE FROM rem1; -NOTICE: trig_row_before_delete(23, skidoo) BEFORE ROW DELETE ON rem1 -NOTICE: OLD: (2,update) -NOTICE: trig_row_after_delete(23, skidoo) AFTER ROW DELETE ON rem1 -NOTICE: OLD: (2,update) --- cleanup ---Testcase 497: -DROP TRIGGER trig_row_before_insupd ON rem1; ---Testcase 498: -DROP TRIGGER trig_row_after_insupd ON rem1; ---Testcase 499: -DROP TRIGGER trig_row_before_delete ON rem1; ---Testcase 500: -DROP TRIGGER trig_row_after_delete ON rem1; --- Test various RETURN statements in BEFORE triggers. ---Testcase 501: -CREATE FUNCTION trig_row_before_insupdate() RETURNS TRIGGER AS $$ - BEGIN - NEW.f2 := NEW.f2 || ' triggered !'; - RETURN NEW; - END -$$ language plpgsql; ---Testcase 502: -CREATE TRIGGER trig_row_before_insupd -BEFORE INSERT OR UPDATE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); --- The new values should have 'triggered' appended ---Testcase 503: -INSERT INTO rem1 values(1, 'insert'); ---Testcase 504: -SELECT * from loc1; - f1 | f2 -----+-------------------- - 1 | insert triggered ! -(1 row) - ---Testcase 505: -INSERT INTO rem1 values(2, 'insert'); ---Testcase 506: -SELECT f2 FROM rem1 WHERE f1 = 2; - f2 --------------------- - insert triggered ! -(1 row) - ---Testcase 507: -SELECT * from loc1; - f1 | f2 -----+-------------------- - 1 | insert triggered ! - 2 | insert triggered ! -(2 rows) - ---UPDATE rem1 set f2 = ''; ---SELECT * from loc1; ---UPDATE rem1 set f2 = 'skidoo' RETURNING f2; ---SELECT * from loc1; ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f1 = 10; -- all columns should be transmitted ---UPDATE rem1 set f1 = 10; ---SELECT * from loc1; ---Testcase 508: -DELETE FROM rem1; --- Add a second trigger, to check that the changes are propagated correctly --- from trigger to trigger ---Testcase 509: -CREATE TRIGGER trig_row_before_insupd2 -BEFORE INSERT OR UPDATE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); ---Testcase 510: -INSERT INTO rem1 values(1, 'insert'); ---Testcase 511: -SELECT * from loc1; - f1 | f2 -----+-------------------------------- - 1 | insert triggered ! triggered ! -(1 row) - ---Testcase 512: -INSERT INTO rem1 values(2, 'insert'); ---Testcase 513: -SELECT f2 FROM rem1 WHERE f1 = 2; - f2 --------------------------------- - insert triggered ! triggered ! -(1 row) - ---Testcase 514: -SELECT * from loc1; - f1 | f2 -----+-------------------------------- - 1 | insert triggered ! triggered ! - 2 | insert triggered ! triggered ! -(2 rows) - ---UPDATE rem1 set f2 = ''; ---SELECT * from loc1; ---UPDATE rem1 set f2 = 'skidoo' RETURNING f2; ---SELECT * from loc1; ---Testcase 515: -DROP TRIGGER trig_row_before_insupd ON rem1; ---Testcase 516: -DROP TRIGGER trig_row_before_insupd2 ON rem1; ---Testcase 517: -DELETE from rem1; ---Testcase 518: -INSERT INTO rem1 VALUES (1, 'test'); --- Test with a trigger returning NULL ---Testcase 519: -CREATE FUNCTION trig_null() RETURNS TRIGGER AS $$ - BEGIN - RETURN NULL; - END -$$ language plpgsql; ---Testcase 520: -CREATE TRIGGER trig_null -BEFORE INSERT OR UPDATE OR DELETE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trig_null(); --- Nothing should have changed. ---Testcase 521: -INSERT INTO rem1 VALUES (2, 'test2'); ---Testcase 522: -SELECT * from loc1; - f1 | f2 -----+------ - 1 | test -(1 row) - ---UPDATE rem1 SET f2 = 'test2'; ---SELECT * from loc1; ---Testcase 523: -DELETE from rem1; ---Testcase 524: -SELECT * from loc1; - f1 | f2 -----+------ - 1 | test -(1 row) - ---Testcase 525: -DROP TRIGGER trig_null ON rem1; ---Testcase 526: -DELETE from rem1; --- Test a combination of local and remote triggers ---Testcase 527: -CREATE TRIGGER trig_row_before -BEFORE INSERT OR UPDATE OR DELETE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 528: -CREATE TRIGGER trig_row_after -AFTER INSERT OR UPDATE OR DELETE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 529: -CREATE TRIGGER trig_local_before BEFORE INSERT OR UPDATE ON loc1 -FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); ---Testcase 530: -INSERT INTO rem1(f2) VALUES ('test'); -NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1 -NOTICE: NEW: (12,test) -NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1 -NOTICE: NEW: (12,test) ---UPDATE rem1 SET f2 = 'testo'; --- Test returning a system attribute ---Testcase 531: -INSERT INTO rem1(f2) VALUES ('test'); -NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1 -NOTICE: NEW: (13,test) -NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1 -NOTICE: NEW: (13,test) ---Testcase 532: -SELECT * FROM rem1 WHERE f2 = 'test'; - f1 | f2 -----+------ - 12 | test - 13 | test -(2 rows) - --- cleanup ---Testcase 533: -DROP TRIGGER trig_row_before ON rem1; ---Testcase 534: -DROP TRIGGER trig_row_after ON rem1; ---Testcase 535: -DROP TRIGGER trig_local_before ON loc1; --- Test direct foreign table modification functionality --- Test with statement-level triggers ---Testcase 536: -CREATE TRIGGER trig_stmt_before - BEFORE DELETE OR INSERT OR UPDATE ON rem1 - FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 537: -EXPLAIN (verbose, costs off) -DELETE FROM rem1; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1 - -> Foreign Delete on public.rem1 - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 538: -DROP TRIGGER trig_stmt_before ON rem1; ---Testcase 539: -CREATE TRIGGER trig_stmt_after - AFTER DELETE OR INSERT OR UPDATE ON rem1 - FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 540: -EXPLAIN (verbose, costs off) -DELETE FROM rem1; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1 - -> Foreign Delete on public.rem1 - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 541: -DROP TRIGGER trig_stmt_after ON rem1; --- Test with row-level ON INSERT triggers ---Testcase 542: -CREATE TRIGGER trig_row_before_insert -BEFORE INSERT ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 543: -EXPLAIN (verbose, costs off) -DELETE FROM rem1; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1 - -> Foreign Delete on public.rem1 - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 544: -DROP TRIGGER trig_row_before_insert ON rem1; ---Testcase 545: -CREATE TRIGGER trig_row_after_insert -AFTER INSERT ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 546: -EXPLAIN (verbose, costs off) -DELETE FROM rem1; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1 - -> Foreign Delete on public.rem1 - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 547: -DROP TRIGGER trig_row_after_insert ON rem1; --- Test with row-level ON UPDATE triggers ---Testcase 548: -CREATE TRIGGER trig_row_before_update -BEFORE UPDATE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can't be pushed down ---Testcase 549: -EXPLAIN (verbose, costs off) -DELETE FROM rem1; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1 - -> Foreign Delete on public.rem1 - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 550: -DROP TRIGGER trig_row_before_update ON rem1; ---Testcase 551: -CREATE TRIGGER trig_row_after_update -AFTER UPDATE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can't be pushed down ---Testcase 552: -EXPLAIN (verbose, costs off) -DELETE FROM rem1; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1 - -> Foreign Delete on public.rem1 - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 553: -DROP TRIGGER trig_row_after_update ON rem1; --- Test with row-level ON DELETE triggers ---Testcase 554: -CREATE TRIGGER trig_row_before_delete -BEFORE DELETE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 555: -EXPLAIN (verbose, costs off) -DELETE FROM rem1; -- can't be pushed down - QUERY PLAN -------------------------------------------------------- - Delete on public.rem1 - -> Foreign Scan on public.rem1 - Output: rem1.* - InfluxDB query: SELECT "f1", "f2" FROM "loc1" -(4 rows) - ---Testcase 556: -DROP TRIGGER trig_row_before_delete ON rem1; ---Testcase 557: -CREATE TRIGGER trig_row_after_delete -AFTER DELETE ON rem1 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 558: -EXPLAIN (verbose, costs off) -DELETE FROM rem1; -- can't be pushed down - QUERY PLAN -------------------------------------------------------- - Delete on public.rem1 - -> Foreign Scan on public.rem1 - Output: rem1.* - InfluxDB query: SELECT "f1", "f2" FROM "loc1" -(4 rows) - ---Testcase 559: -DROP TRIGGER trig_row_after_delete ON rem1; --- =================================================================== --- test inheritance features --- =================================================================== ---Testcase 560: -CREATE TABLE a (aa TEXT); ---CREATE TABLE loct (aa TEXT, bb TEXT); -ALTER TABLE a SET (autovacuum_enabled = 'false'); ---ALTER TABLE loct SET (autovacuum_enabled = 'false'); --- Because influxdb_fdw does not support UPDATE, to test locally --- we create local table. ---Testcase 561: -CREATE TABLE b (bb TEXT) INHERITS (a); ---Testcase 562: -INSERT INTO a(aa) VALUES('aaa'); ---Testcase 563: -INSERT INTO a(aa) VALUES('aaaa'); ---Testcase 564: -INSERT INTO a(aa) VALUES('aaaaa'); ---Testcase 565: -INSERT INTO b(aa) VALUES('bbb'); ---Testcase 566: -INSERT INTO b(aa) VALUES('bbbb'); ---Testcase 567: -INSERT INTO b(aa) VALUES('bbbbb'); ---Testcase 568: -SELECT tableoid::regclass, * FROM a; - tableoid | aa -----------+------- - a | aaa - a | aaaa - a | aaaaa - b | bbb - b | bbbb - b | bbbbb -(6 rows) - ---Testcase 569: -SELECT tableoid::regclass, * FROM b; - tableoid | aa | bb -----------+-------+---- - b | bbb | - b | bbbb | - b | bbbbb | -(3 rows) - ---Testcase 570: -SELECT tableoid::regclass, * FROM ONLY a; - tableoid | aa -----------+------- - a | aaa - a | aaaa - a | aaaaa -(3 rows) - ---Testcase 571: -UPDATE a SET aa = 'zzzzzz' WHERE aa LIKE 'aaaa%'; ---Testcase 572: -SELECT tableoid::regclass, * FROM a; - tableoid | aa -----------+-------- - a | aaa - a | zzzzzz - a | zzzzzz - b | bbb - b | bbbb - b | bbbbb -(6 rows) - ---Testcase 573: -SELECT tableoid::regclass, * FROM b; - tableoid | aa | bb -----------+-------+---- - b | bbb | - b | bbbb | - b | bbbbb | -(3 rows) - ---Testcase 574: -SELECT tableoid::regclass, * FROM ONLY a; - tableoid | aa -----------+-------- - a | aaa - a | zzzzzz - a | zzzzzz -(3 rows) - ---Testcase 575: -UPDATE b SET aa = 'new'; ---Testcase 576: -SELECT tableoid::regclass, * FROM a; - tableoid | aa -----------+-------- - a | aaa - a | zzzzzz - a | zzzzzz - b | new - b | new - b | new -(6 rows) - ---Testcase 577: -SELECT tableoid::regclass, * FROM b; - tableoid | aa | bb -----------+-----+---- - b | new | - b | new | - b | new | -(3 rows) - ---Testcase 578: -SELECT tableoid::regclass, * FROM ONLY a; - tableoid | aa -----------+-------- - a | aaa - a | zzzzzz - a | zzzzzz -(3 rows) - ---Testcase 579: -UPDATE a SET aa = 'newtoo'; ---Testcase 580: -SELECT tableoid::regclass, * FROM a; - tableoid | aa -----------+-------- - a | newtoo - a | newtoo - a | newtoo - b | newtoo - b | newtoo - b | newtoo -(6 rows) - ---Testcase 581: -SELECT tableoid::regclass, * FROM b; - tableoid | aa | bb -----------+--------+---- - b | newtoo | - b | newtoo | - b | newtoo | -(3 rows) - ---Testcase 582: -SELECT tableoid::regclass, * FROM ONLY a; - tableoid | aa -----------+-------- - a | newtoo - a | newtoo - a | newtoo -(3 rows) - ---Testcase 583: -DELETE FROM a; ---Testcase 584: -SELECT tableoid::regclass, * FROM a; - tableoid | aa -----------+---- -(0 rows) - ---Testcase 585: -SELECT tableoid::regclass, * FROM b; - tableoid | aa | bb -----------+----+---- -(0 rows) - ---Testcase 586: -SELECT tableoid::regclass, * FROM ONLY a; - tableoid | aa -----------+---- -(0 rows) - ---Testcase 587: -DROP TABLE a CASCADE; -NOTICE: drop cascades to table b ---DROP TABLE loct; --- Check SELECT FOR UPDATE/SHARE with an inherited source table ---Testcase 588: -create foreign table loct1 (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct1'); ---Testcase 589: -create foreign table loct2 (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct2'); ---alter table loct1 set (autovacuum_enabled = 'false'); ---alter table loct2 set (autovacuum_enabled = 'false'); ---Testcase 590: -create foreign table foo (f1 int, f2 int) - server influxdb_svr options (table 'foo'); ---Testcase 591: -create foreign table foo2 (f3 int) inherits (foo) - server influxdb_svr options (table 'loct1'); ---Testcase 592: -create foreign table bar (f1 int, f2 int) - server influxdb_svr options (table 'bar'); ---Testcase 593: -create foreign table bar2 (f3 int) inherits (bar) - server influxdb_svr options (table 'loct2'); ---alter table foo set (autovacuum_enabled = 'false'); ---alter table bar set (autovacuum_enabled = 'false'); ---Testcase 594: -insert into foo values(1,1); ---Testcase 595: -insert into foo values(3,3); ---Testcase 596: -insert into foo2 values(2,2,2); ---Testcase 597: -insert into foo2 values(4,4,4); ---Testcase 598: -insert into bar values(1,11); ---Testcase 599: -insert into bar values(2,22); ---Testcase 600: -insert into bar values(6,66); ---Testcase 601: -insert into bar2 values(3,33,33); ---Testcase 602: -insert into bar2 values(4,44,44); ---Testcase 603: -insert into bar2 values(7,77,77); ---Testcase 604: -explain (verbose, costs off) -select * from bar where f1 in (select f1 from foo); - QUERY PLAN --------------------------------------------------------------------- - Hash Join - Output: bar.f1, bar.f2 - Inner Unique: true - Hash Cond: (bar.f1 = foo.f1) - -> Append - -> Foreign Scan on public.bar - Output: bar.f1, bar.f2 - InfluxDB query: SELECT "f1", "f2" FROM "bar" - -> Foreign Scan on public.bar2 - Output: bar2.f1, bar2.f2 - InfluxDB query: SELECT "f1", "f2" FROM "loct2" - -> Hash - Output: foo.f1 - -> HashAggregate - Output: foo.f1 - Group Key: foo.f1 - -> Append - -> Foreign Scan on public.foo - Output: foo.f1 - InfluxDB query: SELECT "f1" FROM "foo" - -> Foreign Scan on public.foo2 - Output: foo2.f1 - InfluxDB query: SELECT "f1" FROM "loct1" -(23 rows) - ---Testcase 605: -select * from bar where f1 in (select f1 from foo); - f1 | f2 -----+---- - 1 | 11 - 2 | 22 - 3 | 33 - 4 | 44 -(4 rows) - ---Testcase 606: -explain (verbose, costs off) -select * from bar where f1 in (select f1 from foo); - QUERY PLAN --------------------------------------------------------------------- - Hash Join - Output: bar.f1, bar.f2 - Inner Unique: true - Hash Cond: (bar.f1 = foo.f1) - -> Append - -> Foreign Scan on public.bar - Output: bar.f1, bar.f2 - InfluxDB query: SELECT "f1", "f2" FROM "bar" - -> Foreign Scan on public.bar2 - Output: bar2.f1, bar2.f2 - InfluxDB query: SELECT "f1", "f2" FROM "loct2" - -> Hash - Output: foo.f1 - -> HashAggregate - Output: foo.f1 - Group Key: foo.f1 - -> Append - -> Foreign Scan on public.foo - Output: foo.f1 - InfluxDB query: SELECT "f1" FROM "foo" - -> Foreign Scan on public.foo2 - Output: foo2.f1 - InfluxDB query: SELECT "f1" FROM "loct1" -(23 rows) - ---Testcase 607: -select * from bar where f1 in (select f1 from foo); - f1 | f2 -----+---- - 1 | 11 - 2 | 22 - 3 | 33 - 4 | 44 -(4 rows) - -/* --- influxdb_fdw does not support UPDATE --- Check UPDATE with inherited target and an inherited source table -explain (verbose, costs off) -update bar set f2 = f2 + 100 where f1 in (select f1 from foo); -update bar set f2 = f2 + 100 where f1 in (select f1 from foo); - -select tableoid::regclass, * from bar order by 1,2; - --- Check UPDATE with inherited target and an appendrel subquery -explain (verbose, costs off) -update bar set f2 = f2 + 100 -from - ( select f1 from foo union all select f1+3 from foo ) ss -where bar.f1 = ss.f1; -update bar set f2 = f2 + 100 -from - ( select f1 from foo union all select f1+3 from foo ) ss -where bar.f1 = ss.f1; - -select tableoid::regclass, * from bar order by 1,2; - --- Test forcing the remote server to produce sorted data for a merge join, --- but the foreign table is an inheritance child. -truncate table loct1; -truncate table only foo; -\set num_rows_foo 2000 -insert into loct1 select generate_series(0, :num_rows_foo, 2), generate_series(0, :num_rows_foo, 2), generate_series(0, :num_rows_foo, 2); -insert into foo select generate_series(1, :num_rows_foo, 2), generate_series(1, :num_rows_foo, 2); -SET enable_hashjoin to false; -SET enable_nestloop to false; -alter foreign table foo2 options (use_remote_estimate 'true'); -create index i_loct1_f1 on loct1(f1); -create index i_foo_f1 on foo(f1); -analyze foo; -analyze loct1; --- inner join; expressions in the clauses appear in the equivalence class list -explain (verbose, costs off) - select foo.f1, loct1.f1 from foo join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; -select foo.f1, loct1.f1 from foo join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; --- outer join; expressions in the clauses do not appear in equivalence class --- list but no output change as compared to the previous query -explain (verbose, costs off) - select foo.f1, loct1.f1 from foo left join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; -select foo.f1, loct1.f1 from foo left join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; -RESET enable_hashjoin; -RESET enable_nestloop; - --- Test that WHERE CURRENT OF is not supported -begin; -declare c cursor for select * from bar where f1 = 7; -fetch from c; -update bar set f2 = null where current of c; -rollback; - -explain (verbose, costs off) -delete from foo where f1 < 5 returning *; -delete from foo where f1 < 5 returning *; -explain (verbose, costs off) -update bar set f2 = f2 + 100 returning *; -update bar set f2 = f2 + 100 returning *; - --- Test that UPDATE/DELETE with inherited target works with row-level triggers -CREATE TRIGGER trig_row_before -BEFORE UPDATE OR DELETE ON bar2 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); - -CREATE TRIGGER trig_row_after -AFTER UPDATE OR DELETE ON bar2 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); - -explain (verbose, costs off) -update bar set f2 = f2 + 100; -update bar set f2 = f2 + 100; - -explain (verbose, costs off) -delete from bar where f2 < 400; -delete from bar where f2 < 400; - --- cleanup -drop table foo cascade; -drop table bar cascade; -drop table loct1; -drop table loct2; - --- Test pushing down UPDATE/DELETE joins to the remote server -create table parent (a int, b text); -create table loct1 (a int, b text); -create table loct2 (a int, b text); -create foreign table remt1 (a int, b text) - server influxdb_svr options (table 'loct1'); -create foreign table remt2 (a int, b text) - server influxdb_svr options (table 'loct2'); -alter foreign table remt1 inherit parent; - -insert into remt1 values (1, 'foo'); -insert into remt1 values (2, 'bar'); -insert into remt2 values (1, 'foo'); -insert into remt2 values (2, 'bar'); - -analyze remt1; -analyze remt2; - -explain (verbose, costs off) -update parent set b = parent.b || remt2.b from remt2 where parent.a = remt2.a returning *; -update parent set b = parent.b || remt2.b from remt2 where parent.a = remt2.a returning *; -explain (verbose, costs off) -delete from parent using remt2 where parent.a = remt2.a returning parent; -delete from parent using remt2 where parent.a = remt2.a returning parent; - --- cleanup -drop foreign table remt1; -drop foreign table remt2; -drop table loct1; -drop table loct2; -drop table parent; -*/ -/* --- Skip test because influxdb does not support partitions table, COPY --- =================================================================== --- test tuple routing for foreign-table partitions --- =================================================================== - --- Test insert tuple routing -create table itrtest (a int, b text) partition by list (a); -create table loct1 (a int check (a in (1)), b text); -create foreign table remp1 (a int check (a in (1)), b text) server loopback options (table_name 'loct1'); -create table loct2 (a int check (a in (2)), b text); -create foreign table remp2 (b text, a int check (a in (2))) server loopback options (table_name 'loct2'); -alter table itrtest attach partition remp1 for values in (1); -alter table itrtest attach partition remp2 for values in (2); - -insert into itrtest values (1, 'foo'); -insert into itrtest values (1, 'bar') returning *; -insert into itrtest values (2, 'baz'); -insert into itrtest values (2, 'qux') returning *; -insert into itrtest values (1, 'test1'), (2, 'test2') returning *; - -select tableoid::regclass, * FROM itrtest; -select tableoid::regclass, * FROM remp1; -select tableoid::regclass, * FROM remp2; - -delete from itrtest; - -create unique index loct1_idx on loct1 (a); - --- DO NOTHING without an inference specification is supported -insert into itrtest values (1, 'foo') on conflict do nothing returning *; -insert into itrtest values (1, 'foo') on conflict do nothing returning *; - --- But other cases are not supported -insert into itrtest values (1, 'bar') on conflict (a) do nothing; -insert into itrtest values (1, 'bar') on conflict (a) do update set b = excluded.b; - -select tableoid::regclass, * FROM itrtest; - -delete from itrtest; - -drop index loct1_idx; - --- Test that remote triggers work with insert tuple routing -create function br_insert_trigfunc() returns trigger as $$ -begin - new.b := new.b || ' triggered !'; - return new; -end -$$ language plpgsql; -create trigger loct1_br_insert_trigger before insert on loct1 - for each row execute procedure br_insert_trigfunc(); -create trigger loct2_br_insert_trigger before insert on loct2 - for each row execute procedure br_insert_trigfunc(); - --- The new values are concatenated with ' triggered !' -insert into itrtest values (1, 'foo') returning *; -insert into itrtest values (2, 'qux') returning *; -insert into itrtest values (1, 'test1'), (2, 'test2') returning *; -with result as (insert into itrtest values (1, 'test1'), (2, 'test2') returning *) select * from result; - -drop trigger loct1_br_insert_trigger on loct1; -drop trigger loct2_br_insert_trigger on loct2; - -drop table itrtest; -drop table loct1; -drop table loct2; - --- Test update tuple routing -create table utrtest (a int, b text) partition by list (a); -create table loct (a int check (a in (1)), b text); -create foreign table remp (a int check (a in (1)), b text) server loopback options (table_name 'loct'); -create table locp (a int check (a in (2)), b text); -alter table utrtest attach partition remp for values in (1); -alter table utrtest attach partition locp for values in (2); - -insert into utrtest values (1, 'foo'); -insert into utrtest values (2, 'qux'); - -select tableoid::regclass, * FROM utrtest; -select tableoid::regclass, * FROM remp; -select tableoid::regclass, * FROM locp; - --- It's not allowed to move a row from a partition that is foreign to another -update utrtest set a = 2 where b = 'foo' returning *; - --- But the reverse is allowed -update utrtest set a = 1 where b = 'qux' returning *; - -select tableoid::regclass, * FROM utrtest; -select tableoid::regclass, * FROM remp; -select tableoid::regclass, * FROM locp; - --- The executor should not let unexercised FDWs shut down -update utrtest set a = 1 where b = 'foo'; - --- Test that remote triggers work with update tuple routing -create trigger loct_br_insert_trigger before insert on loct - for each row execute procedure br_insert_trigfunc(); - -delete from utrtest; -insert into utrtest values (2, 'qux'); - --- Check case where the foreign partition is a subplan target rel -explain (verbose, costs off) -update utrtest set a = 1 where a = 1 or a = 2 returning *; --- The new values are concatenated with ' triggered !' -update utrtest set a = 1 where a = 1 or a = 2 returning *; - -delete from utrtest; -insert into utrtest values (2, 'qux'); - --- Check case where the foreign partition isn't a subplan target rel -explain (verbose, costs off) -update utrtest set a = 1 where a = 2 returning *; --- The new values are concatenated with ' triggered !' -update utrtest set a = 1 where a = 2 returning *; - -drop trigger loct_br_insert_trigger on loct; - --- We can move rows to a foreign partition that has been updated already, --- but can't move rows to a foreign partition that hasn't been updated yet - -delete from utrtest; -insert into utrtest values (1, 'foo'); -insert into utrtest values (2, 'qux'); - --- Test the former case: --- with a direct modification plan -explain (verbose, costs off) -update utrtest set a = 1 returning *; -update utrtest set a = 1 returning *; - -delete from utrtest; -insert into utrtest values (1, 'foo'); -insert into utrtest values (2, 'qux'); - --- with a non-direct modification plan -explain (verbose, costs off) -update utrtest set a = 1 from (values (1), (2)) s(x) where a = s.x returning *; -update utrtest set a = 1 from (values (1), (2)) s(x) where a = s.x returning *; - --- Change the definition of utrtest so that the foreign partition get updated --- after the local partition -delete from utrtest; -alter table utrtest detach partition remp; -drop foreign table remp; -alter table loct drop constraint loct_a_check; -alter table loct add check (a in (3)); -create foreign table remp (a int check (a in (3)), b text) server loopback options (table_name 'loct'); -alter table utrtest attach partition remp for values in (3); -insert into utrtest values (2, 'qux'); -insert into utrtest values (3, 'xyzzy'); - --- Test the latter case: --- with a direct modification plan -explain (verbose, costs off) -update utrtest set a = 3 returning *; -update utrtest set a = 3 returning *; -- ERROR - --- with a non-direct modification plan -explain (verbose, costs off) -update utrtest set a = 3 from (values (2), (3)) s(x) where a = s.x returning *; -update utrtest set a = 3 from (values (2), (3)) s(x) where a = s.x returning *; -- ERROR - -drop table utrtest; -drop table loct; - --- Test copy tuple routing -create table ctrtest (a int, b text) partition by list (a); -create table loct1 (a int check (a in (1)), b text); -create foreign table remp1 (a int check (a in (1)), b text) server loopback options (table_name 'loct1'); -create table loct2 (a int check (a in (2)), b text); -create foreign table remp2 (b text, a int check (a in (2))) server loopback options (table_name 'loct2'); -alter table ctrtest attach partition remp1 for values in (1); -alter table ctrtest attach partition remp2 for values in (2); - -copy ctrtest from stdin; -1 foo -2 qux -\. - -select tableoid::regclass, * FROM ctrtest; -select tableoid::regclass, * FROM remp1; -select tableoid::regclass, * FROM remp2; - --- Copying into foreign partitions directly should work as well -copy remp1 from stdin; -1 bar -\. - -select tableoid::regclass, * FROM remp1; - -drop table ctrtest; -drop table loct1; -drop table loct2; - --- =================================================================== --- test COPY FROM --- =================================================================== - -create table loc2 (f1 int, f2 text); -alter table loc2 set (autovacuum_enabled = 'false'); -create foreign table rem2 (f1 int, f2 text) server loopback options(table_name 'loc2'); - --- Test basic functionality -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -delete from rem2; - --- Test check constraints -alter table loc2 add constraint loc2_f1positive check (f1 >= 0); -alter foreign table rem2 add constraint rem2_f1positive check (f1 >= 0); - --- check constraint is enforced on the remote side, not locally -copy rem2 from stdin; -1 foo -2 bar -\. -copy rem2 from stdin; -- ERROR --1 xyzzy -\. -select * from rem2; - -alter foreign table rem2 drop constraint rem2_f1positive; -alter table loc2 drop constraint loc2_f1positive; - -delete from rem2; - --- Test local triggers -create trigger trig_stmt_before before insert on rem2 - for each statement execute procedure trigger_func(); -create trigger trig_stmt_after after insert on rem2 - for each statement execute procedure trigger_func(); -create trigger trig_row_before before insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); -create trigger trig_row_after after insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); - -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger trig_row_before on rem2; -drop trigger trig_row_after on rem2; -drop trigger trig_stmt_before on rem2; -drop trigger trig_stmt_after on rem2; - -delete from rem2; - -create trigger trig_row_before_insert before insert on rem2 - for each row execute procedure trig_row_before_insupdate(); - --- The new values are concatenated with ' triggered !' -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger trig_row_before_insert on rem2; - -delete from rem2; - -create trigger trig_null before insert on rem2 - for each row execute procedure trig_null(); - --- Nothing happens -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger trig_null on rem2; - -delete from rem2; - --- Test remote triggers -create trigger trig_row_before_insert before insert on loc2 - for each row execute procedure trig_row_before_insupdate(); - --- The new values are concatenated with ' triggered !' -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger trig_row_before_insert on loc2; - -delete from rem2; - -create trigger trig_null before insert on loc2 - for each row execute procedure trig_null(); - --- Nothing happens -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger trig_null on loc2; - -delete from rem2; - --- Test a combination of local and remote triggers -create trigger rem2_trig_row_before before insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); -create trigger rem2_trig_row_after after insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); -create trigger loc2_trig_row_before_insert before insert on loc2 - for each row execute procedure trig_row_before_insupdate(); - -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger rem2_trig_row_before on rem2; -drop trigger rem2_trig_row_after on rem2; -drop trigger loc2_trig_row_before_insert on loc2; - -delete from rem2; - --- test COPY FROM with foreign table created in the same transaction -create table loc3 (f1 int, f2 text); -begin; -create foreign table rem3 (f1 int, f2 text) - server loopback options(table_name 'loc3'); -copy rem3 from stdin; -1 foo -2 bar -\. -commit; -select * from rem3; -drop foreign table rem3; -drop table loc3; -*/ --- =================================================================== --- test IMPORT FOREIGN SCHEMA --- =================================================================== ---Testcase 608: -CREATE SCHEMA import_influx1; -IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx1; ---Testcase 609: -\det+ import_influx1.* - List of foreign tables - Schema | Table | Server | FDW options | Description -----------------+-------+--------------+---------------------------+------------- - import_influx1 | T1 | influxdb_svr | ("table" 'T1', tags 'c3') | - import_influx1 | T2 | influxdb_svr | ("table" 'T2', tags 'c2') | - import_influx1 | T3 | influxdb_svr | ("table" 'T3', tags 'c3') | - import_influx1 | T4 | influxdb_svr | ("table" 'T4', tags 'c3') | - import_influx1 | bar | influxdb_svr | ("table" 'bar') | - import_influx1 | foo | influxdb_svr | ("table" 'foo') | - import_influx1 | loc1 | influxdb_svr | ("table" 'loc1') | - import_influx1 | loct1 | influxdb_svr | ("table" 'loct1') | - import_influx1 | loct2 | influxdb_svr | ("table" 'loct2') | -(9 rows) - ---Testcase 610: -\d import_influx1.* - Foreign table "import_influx1.T1" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - c3 | text | | | | - C 1 | bigint | | | | - c2 | bigint | | | | - c6 | text | | | | - c7 | text | | | | - c8 | text | | | | -Server: influxdb_svr -FDW options: ("table" 'T1', tags 'c3') - - Foreign table "import_influx1.T2" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - c2 | text | | | | - c1 | bigint | | | | -Server: influxdb_svr -FDW options: ("table" 'T2', tags 'c2') - - Foreign table "import_influx1.T3" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - c3 | text | | | | - c1 | bigint | | | | - c2 | bigint | | | | -Server: influxdb_svr -FDW options: ("table" 'T3', tags 'c3') - - Foreign table "import_influx1.T4" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - c3 | text | | | | - c1 | bigint | | | | - c2 | bigint | | | | -Server: influxdb_svr -FDW options: ("table" 'T4', tags 'c3') - - Foreign table "import_influx1.bar" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - f1 | bigint | | | | - f2 | bigint | | | | -Server: influxdb_svr -FDW options: ("table" 'bar') - - Foreign table "import_influx1.foo" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - f1 | bigint | | | | - f2 | bigint | | | | -Server: influxdb_svr -FDW options: ("table" 'foo') - - Foreign table "import_influx1.loc1" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - f1 | bigint | | | | - f2 | text | | | | -Server: influxdb_svr -FDW options: ("table" 'loc1') - - Foreign table "import_influx1.loct1" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - f1 | bigint | | | | - f2 | bigint | | | | - f3 | bigint | | | | -Server: influxdb_svr -FDW options: ("table" 'loct1') - - Foreign table "import_influx1.loct2" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - f1 | bigint | | | | - f2 | bigint | | | | - f3 | bigint | | | | -Server: influxdb_svr -FDW options: ("table" 'loct2') - --- Options ---Testcase 611: -CREATE SCHEMA import_influx2; -IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx2 - OPTIONS (import_default 'true'); -ERROR: invalid option "import_default" ---Testcase 612: -\det+ import_influx2.* - List of foreign tables - Schema | Table | Server | FDW options | Description ---------+-------+--------+-------------+------------- -(0 rows) - ---Testcase 613: -\d import_influx2.* ---Testcase 614: -CREATE SCHEMA import_influx3; -IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx3 - OPTIONS (import_collate 'false', import_not_null 'false'); -ERROR: invalid option "import_collate" ---Testcase 615: -\det+ import_influx3.* - List of foreign tables - Schema | Table | Server | FDW options | Description ---------+-------+--------+-------------+------------- -(0 rows) - ---Testcase 616: -\d import_influx3.* --- Check LIMIT TO and EXCEPT ---Testcase 617: -CREATE SCHEMA import_influx4; -IMPORT FOREIGN SCHEMA public LIMIT TO ("T1", loct, nonesuch) - FROM SERVER influxdb_svr INTO import_influx4; ---Testcase 618: -\det+ import_influx4.* - List of foreign tables - Schema | Table | Server | FDW options | Description -----------------+-------+--------------+---------------------------+------------- - import_influx4 | T1 | influxdb_svr | ("table" 'T1', tags 'c3') | -(1 row) - -IMPORT FOREIGN SCHEMA public EXCEPT ("T1", loct, nonesuch) - FROM SERVER influxdb_svr INTO import_influx4; ---Testcase 619: -\det+ import_influx4.* - List of foreign tables - Schema | Table | Server | FDW options | Description -----------------+-------+--------------+---------------------------+------------- - import_influx4 | T1 | influxdb_svr | ("table" 'T1', tags 'c3') | - import_influx4 | T2 | influxdb_svr | ("table" 'T2', tags 'c2') | - import_influx4 | T3 | influxdb_svr | ("table" 'T3', tags 'c3') | - import_influx4 | T4 | influxdb_svr | ("table" 'T4', tags 'c3') | - import_influx4 | bar | influxdb_svr | ("table" 'bar') | - import_influx4 | foo | influxdb_svr | ("table" 'foo') | - import_influx4 | loc1 | influxdb_svr | ("table" 'loc1') | - import_influx4 | loct1 | influxdb_svr | ("table" 'loct1') | - import_influx4 | loct2 | influxdb_svr | ("table" 'loct2') | -(9 rows) - --- Assorted error cases -IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx4; -ERROR: relation "T1" already exists -CONTEXT: importing foreign table "T1" -IMPORT FOREIGN SCHEMA nonesuch FROM SERVER influxdb_svr INTO import_influx4; -ERROR: relation "T1" already exists -CONTEXT: importing foreign table "T1" -IMPORT FOREIGN SCHEMA nonesuch FROM SERVER influxdb_svr INTO notthere; -ERROR: schema "notthere" does not exist -IMPORT FOREIGN SCHEMA nonesuch FROM SERVER nowhere INTO notthere; -ERROR: server "nowhere" does not exist -/* --- Skip these test, influxdb_fdw does not support fetch_size option, partition table --- Check case of a type present only on the remote server. --- We can fake this by dropping the type locally in our transaction. -CREATE TYPE "Colors" AS ENUM ('red', 'green', 'blue'); -CREATE TABLE import_source.t5 (c1 int, c2 text collate "C", "Col" "Colors"); - -CREATE SCHEMA import_dest5; -BEGIN; -DROP TYPE "Colors" CASCADE; -IMPORT FOREIGN SCHEMA import_source LIMIT TO (t5) - FROM SERVER loopback INTO import_dest5; -- ERROR - -ROLLBACK; - -BEGIN; - - -CREATE SERVER fetch101 FOREIGN DATA WRAPPER postgres_fdw OPTIONS( fetch_size '101' ); - -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'fetch101' -AND srvoptions @> array['fetch_size=101']; - -ALTER SERVER fetch101 OPTIONS( SET fetch_size '202' ); - -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'fetch101' -AND srvoptions @> array['fetch_size=101']; - -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'fetch101' -AND srvoptions @> array['fetch_size=202']; - -CREATE FOREIGN TABLE table30000 ( x int ) SERVER fetch101 OPTIONS ( fetch_size '30000' ); - -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30000'::regclass -AND ftoptions @> array['fetch_size=30000']; - -ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '60000'); - -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30000'::regclass -AND ftoptions @> array['fetch_size=30000']; - -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30000'::regclass -AND ftoptions @> array['fetch_size=60000']; - -ROLLBACK; - --- =================================================================== --- test partitionwise joins --- =================================================================== -SET enable_partitionwise_join=on; - -CREATE TABLE fprt1 (a int, b int, c varchar) PARTITION BY RANGE(a); -CREATE TABLE fprt1_p1 (LIKE fprt1); -CREATE TABLE fprt1_p2 (LIKE fprt1); -ALTER TABLE fprt1_p1 SET (autovacuum_enabled = 'false'); -ALTER TABLE fprt1_p2 SET (autovacuum_enabled = 'false'); -INSERT INTO fprt1_p1 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(0, 249, 2) i; -INSERT INTO fprt1_p2 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(250, 499, 2) i; -CREATE FOREIGN TABLE ftprt1_p1 PARTITION OF fprt1 FOR VALUES FROM (0) TO (250) - SERVER loopback OPTIONS (table_name 'fprt1_p1', use_remote_estimate 'true'); -CREATE FOREIGN TABLE ftprt1_p2 PARTITION OF fprt1 FOR VALUES FROM (250) TO (500) - SERVER loopback OPTIONS (TABLE_NAME 'fprt1_p2'); -ANALYZE fprt1; -ANALYZE fprt1_p1; -ANALYZE fprt1_p2; - -CREATE TABLE fprt2 (a int, b int, c varchar) PARTITION BY RANGE(b); -CREATE TABLE fprt2_p1 (LIKE fprt2); -CREATE TABLE fprt2_p2 (LIKE fprt2); -ALTER TABLE fprt2_p1 SET (autovacuum_enabled = 'false'); -ALTER TABLE fprt2_p2 SET (autovacuum_enabled = 'false'); -INSERT INTO fprt2_p1 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(0, 249, 3) i; -INSERT INTO fprt2_p2 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(250, 499, 3) i; -CREATE FOREIGN TABLE ftprt2_p1 (b int, c varchar, a int) - SERVER loopback OPTIONS (table_name 'fprt2_p1', use_remote_estimate 'true'); -ALTER TABLE fprt2 ATTACH PARTITION ftprt2_p1 FOR VALUES FROM (0) TO (250); -CREATE FOREIGN TABLE ftprt2_p2 PARTITION OF fprt2 FOR VALUES FROM (250) TO (500) - SERVER loopback OPTIONS (table_name 'fprt2_p2', use_remote_estimate 'true'); -ANALYZE fprt2; -ANALYZE fprt2_p1; -ANALYZE fprt2_p2; - --- inner join three tables -EXPLAIN (COSTS OFF) -SELECT t1.a,t2.b,t3.c FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) INNER JOIN fprt1 t3 ON (t2.b = t3.a) WHERE t1.a % 25 =0 ORDER BY 1,2,3; -SELECT t1.a,t2.b,t3.c FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) INNER JOIN fprt1 t3 ON (t2.b = t3.a) WHERE t1.a % 25 =0 ORDER BY 1,2,3; - --- left outer join + nullable clause -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.a,t2.b,t2.c FROM fprt1 t1 LEFT JOIN (SELECT * FROM fprt2 WHERE a < 10) t2 ON (t1.a = t2.b and t1.b = t2.a) WHERE t1.a < 10 ORDER BY 1,2,3; -SELECT t1.a,t2.b,t2.c FROM fprt1 t1 LEFT JOIN (SELECT * FROM fprt2 WHERE a < 10) t2 ON (t1.a = t2.b and t1.b = t2.a) WHERE t1.a < 10 ORDER BY 1,2,3; - --- with whole-row reference; partitionwise join does not apply -EXPLAIN (COSTS OFF) -SELECT t1.wr, t2.wr FROM (SELECT t1 wr, a FROM fprt1 t1 WHERE t1.a % 25 = 0) t1 FULL JOIN (SELECT t2 wr, b FROM fprt2 t2 WHERE t2.b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY 1,2; -SELECT t1.wr, t2.wr FROM (SELECT t1 wr, a FROM fprt1 t1 WHERE t1.a % 25 = 0) t1 FULL JOIN (SELECT t2 wr, b FROM fprt2 t2 WHERE t2.b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY 1,2; - --- join with lateral reference -EXPLAIN (COSTS OFF) -SELECT t1.a,t1.b FROM fprt1 t1, LATERAL (SELECT t2.a, t2.b FROM fprt2 t2 WHERE t1.a = t2.b AND t1.b = t2.a) q WHERE t1.a%25 = 0 ORDER BY 1,2; -SELECT t1.a,t1.b FROM fprt1 t1, LATERAL (SELECT t2.a, t2.b FROM fprt2 t2 WHERE t1.a = t2.b AND t1.b = t2.a) q WHERE t1.a%25 = 0 ORDER BY 1,2; - --- with PHVs, partitionwise join selected but no join pushdown -EXPLAIN (COSTS OFF) -SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE a % 25 = 0) t1 FULL JOIN (SELECT 't2_phv' phv, * FROM fprt2 WHERE b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY t1.a, t2.b; -SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE a % 25 = 0) t1 FULL JOIN (SELECT 't2_phv' phv, * FROM fprt2 WHERE b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY t1.a, t2.b; - --- test FOR UPDATE; partitionwise join does not apply -EXPLAIN (COSTS OFF) -SELECT t1.a, t2.b FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) WHERE t1.a % 25 = 0 ORDER BY 1,2 FOR UPDATE OF t1; -SELECT t1.a, t2.b FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) WHERE t1.a % 25 = 0 ORDER BY 1,2 FOR UPDATE OF t1; - -RESET enable_partitionwise_join; - - --- =================================================================== --- test partitionwise aggregates --- =================================================================== - -CREATE TABLE pagg_tab (a int, b int, c text) PARTITION BY RANGE(a); - -CREATE TABLE pagg_tab_p1 (LIKE pagg_tab); -CREATE TABLE pagg_tab_p2 (LIKE pagg_tab); -CREATE TABLE pagg_tab_p3 (LIKE pagg_tab); - -INSERT INTO pagg_tab_p1 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 10; -INSERT INTO pagg_tab_p2 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 20 and (i % 30) >= 10; -INSERT INTO pagg_tab_p3 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 30 and (i % 30) >= 20; - --- Create foreign partitions -CREATE FOREIGN TABLE fpagg_tab_p1 PARTITION OF pagg_tab FOR VALUES FROM (0) TO (10) SERVER loopback OPTIONS (table_name 'pagg_tab_p1'); -CREATE FOREIGN TABLE fpagg_tab_p2 PARTITION OF pagg_tab FOR VALUES FROM (10) TO (20) SERVER loopback OPTIONS (table_name 'pagg_tab_p2'); -CREATE FOREIGN TABLE fpagg_tab_p3 PARTITION OF pagg_tab FOR VALUES FROM (20) TO (30) SERVER loopback OPTIONS (table_name 'pagg_tab_p3'); - -ANALYZE pagg_tab; -ANALYZE fpagg_tab_p1; -ANALYZE fpagg_tab_p2; -ANALYZE fpagg_tab_p3; - --- When GROUP BY clause matches with PARTITION KEY. --- Plan with partitionwise aggregates is disabled -SET enable_partitionwise_aggregate TO false; -EXPLAIN (COSTS OFF) -SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - --- Plan with partitionwise aggregates is enabled -SET enable_partitionwise_aggregate TO true; -EXPLAIN (COSTS OFF) -SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; -SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - --- Check with whole-row reference --- Should have all the columns in the target list for the given relation -EXPLAIN (VERBOSE, COSTS OFF) -SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1; -SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - --- When GROUP BY clause does not match with PARTITION KEY. -EXPLAIN (COSTS OFF) -SELECT b, avg(a), max(a), count(*) FROM pagg_tab GROUP BY b HAVING sum(a) < 700 ORDER BY 1; -*/ -/* --- Skip test, influxdb_fdw does not support nosuperuser --- =================================================================== --- access rights and superuser --- =================================================================== - --- Non-superuser cannot create a FDW without a password in the connstr -CREATE ROLE regress_nosuper NOSUPERUSER; - -GRANT USAGE ON FOREIGN DATA WRAPPER influxdb_fdw TO regress_nosuper; - -SET ROLE regress_nosuper; - -SHOW is_superuser; - --- This will be OK, we can create the FDW -DO $d$ - BEGIN - EXECUTE $$CREATE SERVER loopback_nopw FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname '$$||current_database()||$$', - port '$$||current_setting('port')||$$' - )$$; - END; -$d$; - --- But creation of user mappings for non-superusers should fail -CREATE USER MAPPING FOR public SERVER loopback_nopw; -CREATE USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; - -CREATE FOREIGN TABLE ft1_nopw ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text, - c4 timestamptz, - c5 timestamp, - c6 varchar(10), - c7 char(10) default 'ft1', - c8 user_enum -) SERVER loopback_nopw OPTIONS (schema_name 'public', table_name 'ft1'); - -SELECT * FROM ft1_nopw LIMIT 1; - --- If we add a password to the connstr it'll fail, because we don't allow passwords --- in connstrs only in user mappings. - -DO $d$ - BEGIN - EXECUTE $$ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw')$$; - END; -$d$; - --- If we add a password for our user mapping instead, we should get a different --- error because the password wasn't actually *used* when we run with trust auth. --- --- This won't work with installcheck, but neither will most of the FDW checks. - -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); - -SELECT * FROM ft1_nopw LIMIT 1; - --- Unpriv user cannot make the mapping passwordless -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password_required 'false'); - - -SELECT * FROM ft1_nopw LIMIT 1; - -RESET ROLE; - --- But the superuser can -ALTER USER MAPPING FOR regress_nosuper SERVER loopback_nopw OPTIONS (ADD password_required 'false'); - -SET ROLE regress_nosuper; - --- Should finally work now -SELECT * FROM ft1_nopw LIMIT 1; - --- unpriv user also cannot set sslcert / sslkey on the user mapping --- first set password_required so we see the right error messages -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (SET password_required 'true'); -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD sslcert 'foo.crt'); -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD sslkey 'foo.key'); - --- We're done with the role named after a specific user and need to check the --- changes to the public mapping. -DROP USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; - --- This will fail again as it'll resolve the user mapping for public, which --- lacks password_required=false -SELECT * FROM ft1_nopw LIMIT 1; - -RESET ROLE; - --- The user mapping for public is passwordless and lacks the password_required=false --- mapping option, but will work because the current user is a superuser. -SELECT * FROM ft1_nopw LIMIT 1; - --- cleanup -DROP USER MAPPING FOR public SERVER loopback_nopw; -DROP OWNED BY regress_nosuper; -DROP ROLE regress_nosuper; -*/ --- influxdb_fdw does not support transactions --- Two-phase transactions are not supported. ---BEGIN; ---Testcase 620: -SELECT count(*) FROM ft1; - count -------- - 822 -(1 row) - --- error here ---PREPARE TRANSACTION 'fdw_tpc'; ---ROLLBACK; --- Clean-up -delete from ft1; -delete from ft2; -delete from ft4; -delete from ft5; -delete from foo; -delete from bar; -delete from loct1; -delete from loct2; -delete from rem1; -drop foreign table foo cascade; -NOTICE: drop cascades to foreign table foo2 -drop foreign table bar cascade; -NOTICE: drop cascades to foreign table bar2 -drop foreign table loct1; -drop foreign table loct2; -drop foreign table ft1; -drop foreign table ft2; -drop foreign table ft4; -drop foreign table ft5; -DROP TYPE IF EXISTS user_enum; -DROP SCHEMA IF EXISTS "S 1" CASCADE; -NOTICE: drop cascades to 6 other objects -DETAIL: drop cascades to foreign table "S 1"."T 0" -drop cascades to foreign table "S 1"."T 1" -drop cascades to foreign table "S 1"."T 2" -drop cascades to foreign table "S 1"."T 3" -drop cascades to foreign table "S 1"."T 4" -drop cascades to function "S 1".f_brtrig() -DROP FUNCTION IF EXISTS trigger_func(); -DROP FUNCTION IF EXISTS trig_row_before_insupdate(); -DROP FUNCTION IF EXISTS trig_null(); -DROP SCHEMA IF EXISTS import_influx1 CASCADE; -NOTICE: drop cascades to 9 other objects -DETAIL: drop cascades to foreign table import_influx1."T1" -drop cascades to foreign table import_influx1."T2" -drop cascades to foreign table import_influx1."T3" -drop cascades to foreign table import_influx1."T4" -drop cascades to foreign table import_influx1.bar -drop cascades to foreign table import_influx1.foo -drop cascades to foreign table import_influx1.loc1 -drop cascades to foreign table import_influx1.loct1 -drop cascades to foreign table import_influx1.loct2 -DROP SCHEMA IF EXISTS import_influx2 CASCADE; -DROP SCHEMA IF EXISTS import_influx3 CASCADE; -DROP SCHEMA IF EXISTS import_influx4 CASCADE; -NOTICE: drop cascades to 9 other objects -DETAIL: drop cascades to foreign table import_influx4."T1" -drop cascades to foreign table import_influx4."T2" -drop cascades to foreign table import_influx4."T3" -drop cascades to foreign table import_influx4."T4" -drop cascades to foreign table import_influx4.bar -drop cascades to foreign table import_influx4.foo -drop cascades to foreign table import_influx4.loc1 -drop cascades to foreign table import_influx4.loct1 -drop cascades to foreign table import_influx4.loct2 ---Testcase 621: -DROP USER MAPPING FOR public SERVER testserver1; ---Testcase 622: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 623: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2; ---Testcase 624: -DROP SERVER testserver1 CASCADE; ---Testcase 625: -DROP SERVER influxdb_svr CASCADE; -NOTICE: drop cascades to 4 other objects -DETAIL: drop cascades to foreign table loct3 -drop cascades to foreign table ft3 -drop cascades to foreign table loc1 -drop cascades to foreign table rem1 ---Testcase 626: -DROP SERVER influxdb_svr2 CASCADE; -NOTICE: drop cascades to foreign table ft6 ---Testcase 627: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/10.18/extra/join.out b/expected/10.18/extra/join.out deleted file mode 100644 index 566b7ea..0000000 --- a/expected/10.18/extra/join.out +++ /dev/null @@ -1,7202 +0,0 @@ -\set ECHO none ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- import time column as timestamp and text type --- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; --- --- JOIN --- Test JOIN clauses --- ---Testcase 4: -CREATE FOREIGN TABLE J1_TBL ( - i integer, - j integer, - t text -) SERVER influxdb_svr; ---Testcase 5: -CREATE FOREIGN TABLE J2_TBL ( - i integer, - k integer -) SERVER influxdb_svr; ---Testcase 6: -INSERT INTO J1_TBL VALUES (1, 4, 'one'); ---Testcase 7: -INSERT INTO J1_TBL VALUES (2, 3, 'two'); ---Testcase 8: -INSERT INTO J1_TBL VALUES (3, 2, 'three'); ---Testcase 9: -INSERT INTO J1_TBL VALUES (4, 1, 'four'); ---Testcase 10: -INSERT INTO J1_TBL VALUES (5, 0, 'five'); ---Testcase 11: -INSERT INTO J1_TBL VALUES (6, 6, 'six'); ---Testcase 12: -INSERT INTO J1_TBL VALUES (7, 7, 'seven'); ---Testcase 13: -INSERT INTO J1_TBL VALUES (8, 8, 'eight'); ---Testcase 14: -INSERT INTO J1_TBL VALUES (0, NULL, 'zero'); ---Testcase 15: -INSERT INTO J1_TBL VALUES (NULL, NULL, 'null'); ---Testcase 16: -INSERT INTO J1_TBL VALUES (NULL, 0, 'zero'); ---Testcase 17: -INSERT INTO J2_TBL VALUES (1, -1); ---Testcase 18: -INSERT INTO J2_TBL VALUES (2, 2); ---Testcase 19: -INSERT INTO J2_TBL VALUES (3, -3); ---Testcase 20: -INSERT INTO J2_TBL VALUES (2, 4); ---Testcase 21: -INSERT INTO J2_TBL VALUES (5, -5); ---Testcase 22: -INSERT INTO J2_TBL VALUES (5, -5); ---Testcase 23: -INSERT INTO J2_TBL VALUES (0, NULL); ---InfluxDB does not accept NULL value ---INSERT INTO J2_TBL VALUES (NULL, NULL); ---Testcase 24: -INSERT INTO J2_TBL VALUES (NULL, 0); ---Testcase 25: -CREATE FOREIGN TABLE tenk1 ( - unique1 int4, - unique2 int4, - two int4, - four int4, - ten int4, - twenty int4, - hundred int4, - thousand int4, - twothousand int4, - fivethous int4, - tenthous int4, - odd int4, - even int4, - stringu1 name, - stringu2 name, - string4 name -) SERVER influxdb_svr OPTIONS (table 'tenk'); ---Does not support on Postgres 12 ---ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 26: -CREATE FOREIGN TABLE tenk2 ( - unique1 int4, - unique2 int4, - two int4, - four int4, - ten int4, - twenty int4, - hundred int4, - thousand int4, - twothousand int4, - fivethous int4, - tenthous int4, - odd int4, - even int4, - stringu1 name, - stringu2 name, - string4 name -) SERVER influxdb_svr OPTIONS (table 'tenk'); ---Testcase 27: -CREATE FOREIGN TABLE INT4_TBL(f1 int4) SERVER influxdb_svr; ---Testcase 28: -CREATE FOREIGN TABLE FLOAT8_TBL(f1 float8) SERVER influxdb_svr; ---Testcase 29: -CREATE FOREIGN TABLE INT8_TBL( - q1 int8, - q2 int8 -) SERVER influxdb_svr; ---Testcase 30: -CREATE FOREIGN TABLE INT2_TBL(f1 int2) SERVER influxdb_svr; --- useful in some tests below ---Testcase 31: -create temp table onerow(); ---Testcase 32: -insert into onerow default values; -analyze onerow; --- --- CORRELATION NAMES --- Make sure that table/column aliases are supported --- before diving into more complex join syntax. --- ---Testcase 33: -SELECT * - FROM J1_TBL AS tx; - i | j | t ----+---+------- - 1 | 4 | one - 2 | 3 | two - 3 | 2 | three - 4 | 1 | four - 5 | 0 | five - 6 | 6 | six - 7 | 7 | seven - 8 | 8 | eight - 0 | | zero - | | null - | 0 | zero -(11 rows) - ---Testcase 34: -SELECT * - FROM J1_TBL tx; - i | j | t ----+---+------- - 1 | 4 | one - 2 | 3 | two - 3 | 2 | three - 4 | 1 | four - 5 | 0 | five - 6 | 6 | six - 7 | 7 | seven - 8 | 8 | eight - 0 | | zero - | | null - | 0 | zero -(11 rows) - ---Testcase 35: -SELECT * - FROM J1_TBL AS t1 (a, b, c); - a | b | c ----+---+------- - 1 | 4 | one - 2 | 3 | two - 3 | 2 | three - 4 | 1 | four - 5 | 0 | five - 6 | 6 | six - 7 | 7 | seven - 8 | 8 | eight - 0 | | zero - | | null - | 0 | zero -(11 rows) - ---Testcase 36: -SELECT * - FROM J1_TBL t1 (a, b, c); - a | b | c ----+---+------- - 1 | 4 | one - 2 | 3 | two - 3 | 2 | three - 4 | 1 | four - 5 | 0 | five - 6 | 6 | six - 7 | 7 | seven - 8 | 8 | eight - 0 | | zero - | | null - | 0 | zero -(11 rows) - ---Testcase 37: -SELECT * - FROM J1_TBL t1 (a, b, c), J2_TBL t2 (d, e); - a | b | c | d | e ----+---+-------+---+---- - 1 | 4 | one | 1 | -1 - 2 | 3 | two | 1 | -1 - 3 | 2 | three | 1 | -1 - 4 | 1 | four | 1 | -1 - 5 | 0 | five | 1 | -1 - 6 | 6 | six | 1 | -1 - 7 | 7 | seven | 1 | -1 - 8 | 8 | eight | 1 | -1 - 0 | | zero | 1 | -1 - | | null | 1 | -1 - | 0 | zero | 1 | -1 - 1 | 4 | one | 2 | 2 - 2 | 3 | two | 2 | 2 - 3 | 2 | three | 2 | 2 - 4 | 1 | four | 2 | 2 - 5 | 0 | five | 2 | 2 - 6 | 6 | six | 2 | 2 - 7 | 7 | seven | 2 | 2 - 8 | 8 | eight | 2 | 2 - 0 | | zero | 2 | 2 - | | null | 2 | 2 - | 0 | zero | 2 | 2 - 1 | 4 | one | 3 | -3 - 2 | 3 | two | 3 | -3 - 3 | 2 | three | 3 | -3 - 4 | 1 | four | 3 | -3 - 5 | 0 | five | 3 | -3 - 6 | 6 | six | 3 | -3 - 7 | 7 | seven | 3 | -3 - 8 | 8 | eight | 3 | -3 - 0 | | zero | 3 | -3 - | | null | 3 | -3 - | 0 | zero | 3 | -3 - 1 | 4 | one | 2 | 4 - 2 | 3 | two | 2 | 4 - 3 | 2 | three | 2 | 4 - 4 | 1 | four | 2 | 4 - 5 | 0 | five | 2 | 4 - 6 | 6 | six | 2 | 4 - 7 | 7 | seven | 2 | 4 - 8 | 8 | eight | 2 | 4 - 0 | | zero | 2 | 4 - | | null | 2 | 4 - | 0 | zero | 2 | 4 - 1 | 4 | one | 5 | -5 - 2 | 3 | two | 5 | -5 - 3 | 2 | three | 5 | -5 - 4 | 1 | four | 5 | -5 - 5 | 0 | five | 5 | -5 - 6 | 6 | six | 5 | -5 - 7 | 7 | seven | 5 | -5 - 8 | 8 | eight | 5 | -5 - 0 | | zero | 5 | -5 - | | null | 5 | -5 - | 0 | zero | 5 | -5 - 1 | 4 | one | 5 | -5 - 2 | 3 | two | 5 | -5 - 3 | 2 | three | 5 | -5 - 4 | 1 | four | 5 | -5 - 5 | 0 | five | 5 | -5 - 6 | 6 | six | 5 | -5 - 7 | 7 | seven | 5 | -5 - 8 | 8 | eight | 5 | -5 - 0 | | zero | 5 | -5 - | | null | 5 | -5 - | 0 | zero | 5 | -5 - 1 | 4 | one | 0 | - 2 | 3 | two | 0 | - 3 | 2 | three | 0 | - 4 | 1 | four | 0 | - 5 | 0 | five | 0 | - 6 | 6 | six | 0 | - 7 | 7 | seven | 0 | - 8 | 8 | eight | 0 | - 0 | | zero | 0 | - | | null | 0 | - | 0 | zero | 0 | - 1 | 4 | one | | 0 - 2 | 3 | two | | 0 - 3 | 2 | three | | 0 - 4 | 1 | four | | 0 - 5 | 0 | five | | 0 - 6 | 6 | six | | 0 - 7 | 7 | seven | | 0 - 8 | 8 | eight | | 0 - 0 | | zero | | 0 - | | null | | 0 - | 0 | zero | | 0 -(88 rows) - ---Testcase 38: -SELECT t1.a, t2.e - FROM J1_TBL t1 (a, b, c), J2_TBL t2 (d, e) - WHERE t1.a = t2.d; - a | e ----+---- - 0 | - 1 | -1 - 2 | 2 - 2 | 4 - 3 | -3 - 5 | -5 - 5 | -5 -(7 rows) - --- --- CROSS JOIN --- Qualifications are not allowed on cross joins, --- which degenerate into a standard unqualified inner join. --- ---Testcase 39: -SELECT * - FROM J1_TBL CROSS JOIN J2_TBL; - i | j | t | i | k ----+---+-------+---+---- - 1 | 4 | one | 1 | -1 - 2 | 3 | two | 1 | -1 - 3 | 2 | three | 1 | -1 - 4 | 1 | four | 1 | -1 - 5 | 0 | five | 1 | -1 - 6 | 6 | six | 1 | -1 - 7 | 7 | seven | 1 | -1 - 8 | 8 | eight | 1 | -1 - 0 | | zero | 1 | -1 - | | null | 1 | -1 - | 0 | zero | 1 | -1 - 1 | 4 | one | 2 | 2 - 2 | 3 | two | 2 | 2 - 3 | 2 | three | 2 | 2 - 4 | 1 | four | 2 | 2 - 5 | 0 | five | 2 | 2 - 6 | 6 | six | 2 | 2 - 7 | 7 | seven | 2 | 2 - 8 | 8 | eight | 2 | 2 - 0 | | zero | 2 | 2 - | | null | 2 | 2 - | 0 | zero | 2 | 2 - 1 | 4 | one | 3 | -3 - 2 | 3 | two | 3 | -3 - 3 | 2 | three | 3 | -3 - 4 | 1 | four | 3 | -3 - 5 | 0 | five | 3 | -3 - 6 | 6 | six | 3 | -3 - 7 | 7 | seven | 3 | -3 - 8 | 8 | eight | 3 | -3 - 0 | | zero | 3 | -3 - | | null | 3 | -3 - | 0 | zero | 3 | -3 - 1 | 4 | one | 2 | 4 - 2 | 3 | two | 2 | 4 - 3 | 2 | three | 2 | 4 - 4 | 1 | four | 2 | 4 - 5 | 0 | five | 2 | 4 - 6 | 6 | six | 2 | 4 - 7 | 7 | seven | 2 | 4 - 8 | 8 | eight | 2 | 4 - 0 | | zero | 2 | 4 - | | null | 2 | 4 - | 0 | zero | 2 | 4 - 1 | 4 | one | 5 | -5 - 2 | 3 | two | 5 | -5 - 3 | 2 | three | 5 | -5 - 4 | 1 | four | 5 | -5 - 5 | 0 | five | 5 | -5 - 6 | 6 | six | 5 | -5 - 7 | 7 | seven | 5 | -5 - 8 | 8 | eight | 5 | -5 - 0 | | zero | 5 | -5 - | | null | 5 | -5 - | 0 | zero | 5 | -5 - 1 | 4 | one | 5 | -5 - 2 | 3 | two | 5 | -5 - 3 | 2 | three | 5 | -5 - 4 | 1 | four | 5 | -5 - 5 | 0 | five | 5 | -5 - 6 | 6 | six | 5 | -5 - 7 | 7 | seven | 5 | -5 - 8 | 8 | eight | 5 | -5 - 0 | | zero | 5 | -5 - | | null | 5 | -5 - | 0 | zero | 5 | -5 - 1 | 4 | one | 0 | - 2 | 3 | two | 0 | - 3 | 2 | three | 0 | - 4 | 1 | four | 0 | - 5 | 0 | five | 0 | - 6 | 6 | six | 0 | - 7 | 7 | seven | 0 | - 8 | 8 | eight | 0 | - 0 | | zero | 0 | - | | null | 0 | - | 0 | zero | 0 | - 1 | 4 | one | | 0 - 2 | 3 | two | | 0 - 3 | 2 | three | | 0 - 4 | 1 | four | | 0 - 5 | 0 | five | | 0 - 6 | 6 | six | | 0 - 7 | 7 | seven | | 0 - 8 | 8 | eight | | 0 - 0 | | zero | | 0 - | | null | | 0 - | 0 | zero | | 0 -(88 rows) - --- ambiguous column ---Testcase 40: -SELECT i, k, t - FROM J1_TBL CROSS JOIN J2_TBL; -ERROR: column reference "i" is ambiguous -LINE 1: SELECT i, k, t - ^ --- resolve previous ambiguity by specifying the table name ---Testcase 41: -SELECT t1.i, k, t - FROM J1_TBL t1 CROSS JOIN J2_TBL t2; - i | k | t ----+----+------- - 1 | -1 | one - 2 | -1 | two - 3 | -1 | three - 4 | -1 | four - 5 | -1 | five - 6 | -1 | six - 7 | -1 | seven - 8 | -1 | eight - 0 | -1 | zero - | -1 | null - | -1 | zero - 1 | 2 | one - 2 | 2 | two - 3 | 2 | three - 4 | 2 | four - 5 | 2 | five - 6 | 2 | six - 7 | 2 | seven - 8 | 2 | eight - 0 | 2 | zero - | 2 | null - | 2 | zero - 1 | -3 | one - 2 | -3 | two - 3 | -3 | three - 4 | -3 | four - 5 | -3 | five - 6 | -3 | six - 7 | -3 | seven - 8 | -3 | eight - 0 | -3 | zero - | -3 | null - | -3 | zero - 1 | 4 | one - 2 | 4 | two - 3 | 4 | three - 4 | 4 | four - 5 | 4 | five - 6 | 4 | six - 7 | 4 | seven - 8 | 4 | eight - 0 | 4 | zero - | 4 | null - | 4 | zero - 1 | -5 | one - 2 | -5 | two - 3 | -5 | three - 4 | -5 | four - 5 | -5 | five - 6 | -5 | six - 7 | -5 | seven - 8 | -5 | eight - 0 | -5 | zero - | -5 | null - | -5 | zero - 1 | -5 | one - 2 | -5 | two - 3 | -5 | three - 4 | -5 | four - 5 | -5 | five - 6 | -5 | six - 7 | -5 | seven - 8 | -5 | eight - 0 | -5 | zero - | -5 | null - | -5 | zero - 1 | 0 | one - 2 | 0 | two - 3 | 0 | three - 4 | 0 | four - 5 | 0 | five - 6 | 0 | six - 7 | 0 | seven - 8 | 0 | eight - 0 | 0 | zero - | 0 | null - | 0 | zero -(77 rows) - ---Testcase 42: -SELECT ii, tt, kk - FROM (J1_TBL CROSS JOIN J2_TBL) - AS tx (ii, jj, tt, ii2, kk); - ii | tt | kk -----+-------+---- - 1 | one | -1 - 2 | two | -1 - 3 | three | -1 - 4 | four | -1 - 5 | five | -1 - 6 | six | -1 - 7 | seven | -1 - 8 | eight | -1 - 0 | zero | -1 - | null | -1 - | zero | -1 - 1 | one | 2 - 2 | two | 2 - 3 | three | 2 - 4 | four | 2 - 5 | five | 2 - 6 | six | 2 - 7 | seven | 2 - 8 | eight | 2 - 0 | zero | 2 - | null | 2 - | zero | 2 - 1 | one | -3 - 2 | two | -3 - 3 | three | -3 - 4 | four | -3 - 5 | five | -3 - 6 | six | -3 - 7 | seven | -3 - 8 | eight | -3 - 0 | zero | -3 - | null | -3 - | zero | -3 - 1 | one | 4 - 2 | two | 4 - 3 | three | 4 - 4 | four | 4 - 5 | five | 4 - 6 | six | 4 - 7 | seven | 4 - 8 | eight | 4 - 0 | zero | 4 - | null | 4 - | zero | 4 - 1 | one | -5 - 2 | two | -5 - 3 | three | -5 - 4 | four | -5 - 5 | five | -5 - 6 | six | -5 - 7 | seven | -5 - 8 | eight | -5 - 0 | zero | -5 - | null | -5 - | zero | -5 - 1 | one | -5 - 2 | two | -5 - 3 | three | -5 - 4 | four | -5 - 5 | five | -5 - 6 | six | -5 - 7 | seven | -5 - 8 | eight | -5 - 0 | zero | -5 - | null | -5 - | zero | -5 - 1 | one | 0 - 2 | two | 0 - 3 | three | 0 - 4 | four | 0 - 5 | five | 0 - 6 | six | 0 - 7 | seven | 0 - 8 | eight | 0 - 0 | zero | 0 - | null | 0 - | zero | 0 -(77 rows) - ---Testcase 43: -SELECT tx.ii, tx.jj, tx.kk - FROM (J1_TBL t1 (a, b, c) CROSS JOIN J2_TBL t2 (d, e)) - AS tx (ii, jj, tt, ii2, kk); - ii | jj | kk -----+----+---- - 1 | 4 | -1 - 2 | 3 | -1 - 3 | 2 | -1 - 4 | 1 | -1 - 5 | 0 | -1 - 6 | 6 | -1 - 7 | 7 | -1 - 8 | 8 | -1 - 0 | | -1 - | 0 | -1 - 1 | 4 | 2 - 2 | 3 | 2 - 3 | 2 | 2 - 4 | 1 | 2 - 5 | 0 | 2 - 6 | 6 | 2 - 7 | 7 | 2 - 8 | 8 | 2 - 0 | | 2 - | 0 | 2 - 1 | 4 | -3 - 2 | 3 | -3 - 3 | 2 | -3 - 4 | 1 | -3 - 5 | 0 | -3 - 6 | 6 | -3 - 7 | 7 | -3 - 8 | 8 | -3 - 0 | | -3 - | 0 | -3 - 1 | 4 | 4 - 2 | 3 | 4 - 3 | 2 | 4 - 4 | 1 | 4 - 5 | 0 | 4 - 6 | 6 | 4 - 7 | 7 | 4 - 8 | 8 | 4 - 0 | | 4 - | 0 | 4 - 1 | 4 | -5 - 2 | 3 | -5 - 3 | 2 | -5 - 4 | 1 | -5 - 5 | 0 | -5 - 6 | 6 | -5 - 7 | 7 | -5 - 8 | 8 | -5 - 0 | | -5 - | 0 | -5 - 1 | 4 | -5 - 2 | 3 | -5 - 3 | 2 | -5 - 4 | 1 | -5 - 5 | 0 | -5 - 6 | 6 | -5 - 7 | 7 | -5 - 8 | 8 | -5 - 0 | | -5 - | 0 | -5 - 1 | 4 | 0 - 2 | 3 | 0 - 3 | 2 | 0 - 4 | 1 | 0 - 5 | 0 | 0 - 6 | 6 | 0 - 7 | 7 | 0 - 8 | 8 | 0 - 0 | | 0 - | 0 | 0 -(70 rows) - ---Testcase 44: -SELECT * - FROM J1_TBL CROSS JOIN J2_TBL a CROSS JOIN J2_TBL b; - i | j | t | i | k | i | k ----+---+-------+---+----+---+---- - 1 | 4 | one | 1 | -1 | 1 | -1 - 1 | 4 | one | 1 | -1 | 2 | 2 - 1 | 4 | one | 1 | -1 | 3 | -3 - 1 | 4 | one | 1 | -1 | 2 | 4 - 1 | 4 | one | 1 | -1 | 5 | -5 - 1 | 4 | one | 1 | -1 | 5 | -5 - 1 | 4 | one | 1 | -1 | 0 | - 1 | 4 | one | 1 | -1 | | 0 - 2 | 3 | two | 1 | -1 | 1 | -1 - 2 | 3 | two | 1 | -1 | 2 | 2 - 2 | 3 | two | 1 | -1 | 3 | -3 - 2 | 3 | two | 1 | -1 | 2 | 4 - 2 | 3 | two | 1 | -1 | 5 | -5 - 2 | 3 | two | 1 | -1 | 5 | -5 - 2 | 3 | two | 1 | -1 | 0 | - 2 | 3 | two | 1 | -1 | | 0 - 3 | 2 | three | 1 | -1 | 1 | -1 - 3 | 2 | three | 1 | -1 | 2 | 2 - 3 | 2 | three | 1 | -1 | 3 | -3 - 3 | 2 | three | 1 | -1 | 2 | 4 - 3 | 2 | three | 1 | -1 | 5 | -5 - 3 | 2 | three | 1 | -1 | 5 | -5 - 3 | 2 | three | 1 | -1 | 0 | - 3 | 2 | three | 1 | -1 | | 0 - 4 | 1 | four | 1 | -1 | 1 | -1 - 4 | 1 | four | 1 | -1 | 2 | 2 - 4 | 1 | four | 1 | -1 | 3 | -3 - 4 | 1 | four | 1 | -1 | 2 | 4 - 4 | 1 | four | 1 | -1 | 5 | -5 - 4 | 1 | four | 1 | -1 | 5 | -5 - 4 | 1 | four | 1 | -1 | 0 | - 4 | 1 | four | 1 | -1 | | 0 - 5 | 0 | five | 1 | -1 | 1 | -1 - 5 | 0 | five | 1 | -1 | 2 | 2 - 5 | 0 | five | 1 | -1 | 3 | -3 - 5 | 0 | five | 1 | -1 | 2 | 4 - 5 | 0 | five | 1 | -1 | 5 | -5 - 5 | 0 | five | 1 | -1 | 5 | -5 - 5 | 0 | five | 1 | -1 | 0 | - 5 | 0 | five | 1 | -1 | | 0 - 6 | 6 | six | 1 | -1 | 1 | -1 - 6 | 6 | six | 1 | -1 | 2 | 2 - 6 | 6 | six | 1 | -1 | 3 | -3 - 6 | 6 | six | 1 | -1 | 2 | 4 - 6 | 6 | six | 1 | -1 | 5 | -5 - 6 | 6 | six | 1 | -1 | 5 | -5 - 6 | 6 | six | 1 | -1 | 0 | - 6 | 6 | six | 1 | -1 | | 0 - 7 | 7 | seven | 1 | -1 | 1 | -1 - 7 | 7 | seven | 1 | -1 | 2 | 2 - 7 | 7 | seven | 1 | -1 | 3 | -3 - 7 | 7 | seven | 1 | -1 | 2 | 4 - 7 | 7 | seven | 1 | -1 | 5 | -5 - 7 | 7 | seven | 1 | -1 | 5 | -5 - 7 | 7 | seven | 1 | -1 | 0 | - 7 | 7 | seven | 1 | -1 | | 0 - 8 | 8 | eight | 1 | -1 | 1 | -1 - 8 | 8 | eight | 1 | -1 | 2 | 2 - 8 | 8 | eight | 1 | -1 | 3 | -3 - 8 | 8 | eight | 1 | -1 | 2 | 4 - 8 | 8 | eight | 1 | -1 | 5 | -5 - 8 | 8 | eight | 1 | -1 | 5 | -5 - 8 | 8 | eight | 1 | -1 | 0 | - 8 | 8 | eight | 1 | -1 | | 0 - 0 | | zero | 1 | -1 | 1 | -1 - 0 | | zero | 1 | -1 | 2 | 2 - 0 | | zero | 1 | -1 | 3 | -3 - 0 | | zero | 1 | -1 | 2 | 4 - 0 | | zero | 1 | -1 | 5 | -5 - 0 | | zero | 1 | -1 | 5 | -5 - 0 | | zero | 1 | -1 | 0 | - 0 | | zero | 1 | -1 | | 0 - | | null | 1 | -1 | 1 | -1 - | | null | 1 | -1 | 2 | 2 - | | null | 1 | -1 | 3 | -3 - | | null | 1 | -1 | 2 | 4 - | | null | 1 | -1 | 5 | -5 - | | null | 1 | -1 | 5 | -5 - | | null | 1 | -1 | 0 | - | | null | 1 | -1 | | 0 - | 0 | zero | 1 | -1 | 1 | -1 - | 0 | zero | 1 | -1 | 2 | 2 - | 0 | zero | 1 | -1 | 3 | -3 - | 0 | zero | 1 | -1 | 2 | 4 - | 0 | zero | 1 | -1 | 5 | -5 - | 0 | zero | 1 | -1 | 5 | -5 - | 0 | zero | 1 | -1 | 0 | - | 0 | zero | 1 | -1 | | 0 - 1 | 4 | one | 2 | 2 | 1 | -1 - 1 | 4 | one | 2 | 2 | 2 | 2 - 1 | 4 | one | 2 | 2 | 3 | -3 - 1 | 4 | one | 2 | 2 | 2 | 4 - 1 | 4 | one | 2 | 2 | 5 | -5 - 1 | 4 | one | 2 | 2 | 5 | -5 - 1 | 4 | one | 2 | 2 | 0 | - 1 | 4 | one | 2 | 2 | | 0 - 2 | 3 | two | 2 | 2 | 1 | -1 - 2 | 3 | two | 2 | 2 | 2 | 2 - 2 | 3 | two | 2 | 2 | 3 | -3 - 2 | 3 | two | 2 | 2 | 2 | 4 - 2 | 3 | two | 2 | 2 | 5 | -5 - 2 | 3 | two | 2 | 2 | 5 | -5 - 2 | 3 | two | 2 | 2 | 0 | - 2 | 3 | two | 2 | 2 | | 0 - 3 | 2 | three | 2 | 2 | 1 | -1 - 3 | 2 | three | 2 | 2 | 2 | 2 - 3 | 2 | three | 2 | 2 | 3 | -3 - 3 | 2 | three | 2 | 2 | 2 | 4 - 3 | 2 | three | 2 | 2 | 5 | -5 - 3 | 2 | three | 2 | 2 | 5 | -5 - 3 | 2 | three | 2 | 2 | 0 | - 3 | 2 | three | 2 | 2 | | 0 - 4 | 1 | four | 2 | 2 | 1 | -1 - 4 | 1 | four | 2 | 2 | 2 | 2 - 4 | 1 | four | 2 | 2 | 3 | -3 - 4 | 1 | four | 2 | 2 | 2 | 4 - 4 | 1 | four | 2 | 2 | 5 | -5 - 4 | 1 | four | 2 | 2 | 5 | -5 - 4 | 1 | four | 2 | 2 | 0 | - 4 | 1 | four | 2 | 2 | | 0 - 5 | 0 | five | 2 | 2 | 1 | -1 - 5 | 0 | five | 2 | 2 | 2 | 2 - 5 | 0 | five | 2 | 2 | 3 | -3 - 5 | 0 | five | 2 | 2 | 2 | 4 - 5 | 0 | five | 2 | 2 | 5 | -5 - 5 | 0 | five | 2 | 2 | 5 | -5 - 5 | 0 | five | 2 | 2 | 0 | - 5 | 0 | five | 2 | 2 | | 0 - 6 | 6 | six | 2 | 2 | 1 | -1 - 6 | 6 | six | 2 | 2 | 2 | 2 - 6 | 6 | six | 2 | 2 | 3 | -3 - 6 | 6 | six | 2 | 2 | 2 | 4 - 6 | 6 | six | 2 | 2 | 5 | -5 - 6 | 6 | six | 2 | 2 | 5 | -5 - 6 | 6 | six | 2 | 2 | 0 | - 6 | 6 | six | 2 | 2 | | 0 - 7 | 7 | seven | 2 | 2 | 1 | -1 - 7 | 7 | seven | 2 | 2 | 2 | 2 - 7 | 7 | seven | 2 | 2 | 3 | -3 - 7 | 7 | seven | 2 | 2 | 2 | 4 - 7 | 7 | seven | 2 | 2 | 5 | -5 - 7 | 7 | seven | 2 | 2 | 5 | -5 - 7 | 7 | seven | 2 | 2 | 0 | - 7 | 7 | seven | 2 | 2 | | 0 - 8 | 8 | eight | 2 | 2 | 1 | -1 - 8 | 8 | eight | 2 | 2 | 2 | 2 - 8 | 8 | eight | 2 | 2 | 3 | -3 - 8 | 8 | eight | 2 | 2 | 2 | 4 - 8 | 8 | eight | 2 | 2 | 5 | -5 - 8 | 8 | eight | 2 | 2 | 5 | -5 - 8 | 8 | eight | 2 | 2 | 0 | - 8 | 8 | eight | 2 | 2 | | 0 - 0 | | zero | 2 | 2 | 1 | -1 - 0 | | zero | 2 | 2 | 2 | 2 - 0 | | zero | 2 | 2 | 3 | -3 - 0 | | zero | 2 | 2 | 2 | 4 - 0 | | zero | 2 | 2 | 5 | -5 - 0 | | zero | 2 | 2 | 5 | -5 - 0 | | zero | 2 | 2 | 0 | - 0 | | zero | 2 | 2 | | 0 - | | null | 2 | 2 | 1 | -1 - | | null | 2 | 2 | 2 | 2 - | | null | 2 | 2 | 3 | -3 - | | null | 2 | 2 | 2 | 4 - | | null | 2 | 2 | 5 | -5 - | | null | 2 | 2 | 5 | -5 - | | null | 2 | 2 | 0 | - | | null | 2 | 2 | | 0 - | 0 | zero | 2 | 2 | 1 | -1 - | 0 | zero | 2 | 2 | 2 | 2 - | 0 | zero | 2 | 2 | 3 | -3 - | 0 | zero | 2 | 2 | 2 | 4 - | 0 | zero | 2 | 2 | 5 | -5 - | 0 | zero | 2 | 2 | 5 | -5 - | 0 | zero | 2 | 2 | 0 | - | 0 | zero | 2 | 2 | | 0 - 1 | 4 | one | 3 | -3 | 1 | -1 - 1 | 4 | one | 3 | -3 | 2 | 2 - 1 | 4 | one | 3 | -3 | 3 | -3 - 1 | 4 | one | 3 | -3 | 2 | 4 - 1 | 4 | one | 3 | -3 | 5 | -5 - 1 | 4 | one | 3 | -3 | 5 | -5 - 1 | 4 | one | 3 | -3 | 0 | - 1 | 4 | one | 3 | -3 | | 0 - 2 | 3 | two | 3 | -3 | 1 | -1 - 2 | 3 | two | 3 | -3 | 2 | 2 - 2 | 3 | two | 3 | -3 | 3 | -3 - 2 | 3 | two | 3 | -3 | 2 | 4 - 2 | 3 | two | 3 | -3 | 5 | -5 - 2 | 3 | two | 3 | -3 | 5 | -5 - 2 | 3 | two | 3 | -3 | 0 | - 2 | 3 | two | 3 | -3 | | 0 - 3 | 2 | three | 3 | -3 | 1 | -1 - 3 | 2 | three | 3 | -3 | 2 | 2 - 3 | 2 | three | 3 | -3 | 3 | -3 - 3 | 2 | three | 3 | -3 | 2 | 4 - 3 | 2 | three | 3 | -3 | 5 | -5 - 3 | 2 | three | 3 | -3 | 5 | -5 - 3 | 2 | three | 3 | -3 | 0 | - 3 | 2 | three | 3 | -3 | | 0 - 4 | 1 | four | 3 | -3 | 1 | -1 - 4 | 1 | four | 3 | -3 | 2 | 2 - 4 | 1 | four | 3 | -3 | 3 | -3 - 4 | 1 | four | 3 | -3 | 2 | 4 - 4 | 1 | four | 3 | -3 | 5 | -5 - 4 | 1 | four | 3 | -3 | 5 | -5 - 4 | 1 | four | 3 | -3 | 0 | - 4 | 1 | four | 3 | -3 | | 0 - 5 | 0 | five | 3 | -3 | 1 | -1 - 5 | 0 | five | 3 | -3 | 2 | 2 - 5 | 0 | five | 3 | -3 | 3 | -3 - 5 | 0 | five | 3 | -3 | 2 | 4 - 5 | 0 | five | 3 | -3 | 5 | -5 - 5 | 0 | five | 3 | -3 | 5 | -5 - 5 | 0 | five | 3 | -3 | 0 | - 5 | 0 | five | 3 | -3 | | 0 - 6 | 6 | six | 3 | -3 | 1 | -1 - 6 | 6 | six | 3 | -3 | 2 | 2 - 6 | 6 | six | 3 | -3 | 3 | -3 - 6 | 6 | six | 3 | -3 | 2 | 4 - 6 | 6 | six | 3 | -3 | 5 | -5 - 6 | 6 | six | 3 | -3 | 5 | -5 - 6 | 6 | six | 3 | -3 | 0 | - 6 | 6 | six | 3 | -3 | | 0 - 7 | 7 | seven | 3 | -3 | 1 | -1 - 7 | 7 | seven | 3 | -3 | 2 | 2 - 7 | 7 | seven | 3 | -3 | 3 | -3 - 7 | 7 | seven | 3 | -3 | 2 | 4 - 7 | 7 | seven | 3 | -3 | 5 | -5 - 7 | 7 | seven | 3 | -3 | 5 | -5 - 7 | 7 | seven | 3 | -3 | 0 | - 7 | 7 | seven | 3 | -3 | | 0 - 8 | 8 | eight | 3 | -3 | 1 | -1 - 8 | 8 | eight | 3 | -3 | 2 | 2 - 8 | 8 | eight | 3 | -3 | 3 | -3 - 8 | 8 | eight | 3 | -3 | 2 | 4 - 8 | 8 | eight | 3 | -3 | 5 | -5 - 8 | 8 | eight | 3 | -3 | 5 | -5 - 8 | 8 | eight | 3 | -3 | 0 | - 8 | 8 | eight | 3 | -3 | | 0 - 0 | | zero | 3 | -3 | 1 | -1 - 0 | | zero | 3 | -3 | 2 | 2 - 0 | | zero | 3 | -3 | 3 | -3 - 0 | | zero | 3 | -3 | 2 | 4 - 0 | | zero | 3 | -3 | 5 | -5 - 0 | | zero | 3 | -3 | 5 | -5 - 0 | | zero | 3 | -3 | 0 | - 0 | | zero | 3 | -3 | | 0 - | | null | 3 | -3 | 1 | -1 - | | null | 3 | -3 | 2 | 2 - | | null | 3 | -3 | 3 | -3 - | | null | 3 | -3 | 2 | 4 - | | null | 3 | -3 | 5 | -5 - | | null | 3 | -3 | 5 | -5 - | | null | 3 | -3 | 0 | - | | null | 3 | -3 | | 0 - | 0 | zero | 3 | -3 | 1 | -1 - | 0 | zero | 3 | -3 | 2 | 2 - | 0 | zero | 3 | -3 | 3 | -3 - | 0 | zero | 3 | -3 | 2 | 4 - | 0 | zero | 3 | -3 | 5 | -5 - | 0 | zero | 3 | -3 | 5 | -5 - | 0 | zero | 3 | -3 | 0 | - | 0 | zero | 3 | -3 | | 0 - 1 | 4 | one | 2 | 4 | 1 | -1 - 1 | 4 | one | 2 | 4 | 2 | 2 - 1 | 4 | one | 2 | 4 | 3 | -3 - 1 | 4 | one | 2 | 4 | 2 | 4 - 1 | 4 | one | 2 | 4 | 5 | -5 - 1 | 4 | one | 2 | 4 | 5 | -5 - 1 | 4 | one | 2 | 4 | 0 | - 1 | 4 | one | 2 | 4 | | 0 - 2 | 3 | two | 2 | 4 | 1 | -1 - 2 | 3 | two | 2 | 4 | 2 | 2 - 2 | 3 | two | 2 | 4 | 3 | -3 - 2 | 3 | two | 2 | 4 | 2 | 4 - 2 | 3 | two | 2 | 4 | 5 | -5 - 2 | 3 | two | 2 | 4 | 5 | -5 - 2 | 3 | two | 2 | 4 | 0 | - 2 | 3 | two | 2 | 4 | | 0 - 3 | 2 | three | 2 | 4 | 1 | -1 - 3 | 2 | three | 2 | 4 | 2 | 2 - 3 | 2 | three | 2 | 4 | 3 | -3 - 3 | 2 | three | 2 | 4 | 2 | 4 - 3 | 2 | three | 2 | 4 | 5 | -5 - 3 | 2 | three | 2 | 4 | 5 | -5 - 3 | 2 | three | 2 | 4 | 0 | - 3 | 2 | three | 2 | 4 | | 0 - 4 | 1 | four | 2 | 4 | 1 | -1 - 4 | 1 | four | 2 | 4 | 2 | 2 - 4 | 1 | four | 2 | 4 | 3 | -3 - 4 | 1 | four | 2 | 4 | 2 | 4 - 4 | 1 | four | 2 | 4 | 5 | -5 - 4 | 1 | four | 2 | 4 | 5 | -5 - 4 | 1 | four | 2 | 4 | 0 | - 4 | 1 | four | 2 | 4 | | 0 - 5 | 0 | five | 2 | 4 | 1 | -1 - 5 | 0 | five | 2 | 4 | 2 | 2 - 5 | 0 | five | 2 | 4 | 3 | -3 - 5 | 0 | five | 2 | 4 | 2 | 4 - 5 | 0 | five | 2 | 4 | 5 | -5 - 5 | 0 | five | 2 | 4 | 5 | -5 - 5 | 0 | five | 2 | 4 | 0 | - 5 | 0 | five | 2 | 4 | | 0 - 6 | 6 | six | 2 | 4 | 1 | -1 - 6 | 6 | six | 2 | 4 | 2 | 2 - 6 | 6 | six | 2 | 4 | 3 | -3 - 6 | 6 | six | 2 | 4 | 2 | 4 - 6 | 6 | six | 2 | 4 | 5 | -5 - 6 | 6 | six | 2 | 4 | 5 | -5 - 6 | 6 | six | 2 | 4 | 0 | - 6 | 6 | six | 2 | 4 | | 0 - 7 | 7 | seven | 2 | 4 | 1 | -1 - 7 | 7 | seven | 2 | 4 | 2 | 2 - 7 | 7 | seven | 2 | 4 | 3 | -3 - 7 | 7 | seven | 2 | 4 | 2 | 4 - 7 | 7 | seven | 2 | 4 | 5 | -5 - 7 | 7 | seven | 2 | 4 | 5 | -5 - 7 | 7 | seven | 2 | 4 | 0 | - 7 | 7 | seven | 2 | 4 | | 0 - 8 | 8 | eight | 2 | 4 | 1 | -1 - 8 | 8 | eight | 2 | 4 | 2 | 2 - 8 | 8 | eight | 2 | 4 | 3 | -3 - 8 | 8 | eight | 2 | 4 | 2 | 4 - 8 | 8 | eight | 2 | 4 | 5 | -5 - 8 | 8 | eight | 2 | 4 | 5 | -5 - 8 | 8 | eight | 2 | 4 | 0 | - 8 | 8 | eight | 2 | 4 | | 0 - 0 | | zero | 2 | 4 | 1 | -1 - 0 | | zero | 2 | 4 | 2 | 2 - 0 | | zero | 2 | 4 | 3 | -3 - 0 | | zero | 2 | 4 | 2 | 4 - 0 | | zero | 2 | 4 | 5 | -5 - 0 | | zero | 2 | 4 | 5 | -5 - 0 | | zero | 2 | 4 | 0 | - 0 | | zero | 2 | 4 | | 0 - | | null | 2 | 4 | 1 | -1 - | | null | 2 | 4 | 2 | 2 - | | null | 2 | 4 | 3 | -3 - | | null | 2 | 4 | 2 | 4 - | | null | 2 | 4 | 5 | -5 - | | null | 2 | 4 | 5 | -5 - | | null | 2 | 4 | 0 | - | | null | 2 | 4 | | 0 - | 0 | zero | 2 | 4 | 1 | -1 - | 0 | zero | 2 | 4 | 2 | 2 - | 0 | zero | 2 | 4 | 3 | -3 - | 0 | zero | 2 | 4 | 2 | 4 - | 0 | zero | 2 | 4 | 5 | -5 - | 0 | zero | 2 | 4 | 5 | -5 - | 0 | zero | 2 | 4 | 0 | - | 0 | zero | 2 | 4 | | 0 - 1 | 4 | one | 5 | -5 | 1 | -1 - 1 | 4 | one | 5 | -5 | 2 | 2 - 1 | 4 | one | 5 | -5 | 3 | -3 - 1 | 4 | one | 5 | -5 | 2 | 4 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 0 | - 1 | 4 | one | 5 | -5 | | 0 - 2 | 3 | two | 5 | -5 | 1 | -1 - 2 | 3 | two | 5 | -5 | 2 | 2 - 2 | 3 | two | 5 | -5 | 3 | -3 - 2 | 3 | two | 5 | -5 | 2 | 4 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 0 | - 2 | 3 | two | 5 | -5 | | 0 - 3 | 2 | three | 5 | -5 | 1 | -1 - 3 | 2 | three | 5 | -5 | 2 | 2 - 3 | 2 | three | 5 | -5 | 3 | -3 - 3 | 2 | three | 5 | -5 | 2 | 4 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 0 | - 3 | 2 | three | 5 | -5 | | 0 - 4 | 1 | four | 5 | -5 | 1 | -1 - 4 | 1 | four | 5 | -5 | 2 | 2 - 4 | 1 | four | 5 | -5 | 3 | -3 - 4 | 1 | four | 5 | -5 | 2 | 4 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 0 | - 4 | 1 | four | 5 | -5 | | 0 - 5 | 0 | five | 5 | -5 | 1 | -1 - 5 | 0 | five | 5 | -5 | 2 | 2 - 5 | 0 | five | 5 | -5 | 3 | -3 - 5 | 0 | five | 5 | -5 | 2 | 4 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 0 | - 5 | 0 | five | 5 | -5 | | 0 - 6 | 6 | six | 5 | -5 | 1 | -1 - 6 | 6 | six | 5 | -5 | 2 | 2 - 6 | 6 | six | 5 | -5 | 3 | -3 - 6 | 6 | six | 5 | -5 | 2 | 4 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 0 | - 6 | 6 | six | 5 | -5 | | 0 - 7 | 7 | seven | 5 | -5 | 1 | -1 - 7 | 7 | seven | 5 | -5 | 2 | 2 - 7 | 7 | seven | 5 | -5 | 3 | -3 - 7 | 7 | seven | 5 | -5 | 2 | 4 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 0 | - 7 | 7 | seven | 5 | -5 | | 0 - 8 | 8 | eight | 5 | -5 | 1 | -1 - 8 | 8 | eight | 5 | -5 | 2 | 2 - 8 | 8 | eight | 5 | -5 | 3 | -3 - 8 | 8 | eight | 5 | -5 | 2 | 4 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 0 | - 8 | 8 | eight | 5 | -5 | | 0 - 0 | | zero | 5 | -5 | 1 | -1 - 0 | | zero | 5 | -5 | 2 | 2 - 0 | | zero | 5 | -5 | 3 | -3 - 0 | | zero | 5 | -5 | 2 | 4 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 0 | - 0 | | zero | 5 | -5 | | 0 - | | null | 5 | -5 | 1 | -1 - | | null | 5 | -5 | 2 | 2 - | | null | 5 | -5 | 3 | -3 - | | null | 5 | -5 | 2 | 4 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 0 | - | | null | 5 | -5 | | 0 - | 0 | zero | 5 | -5 | 1 | -1 - | 0 | zero | 5 | -5 | 2 | 2 - | 0 | zero | 5 | -5 | 3 | -3 - | 0 | zero | 5 | -5 | 2 | 4 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 0 | - | 0 | zero | 5 | -5 | | 0 - 1 | 4 | one | 5 | -5 | 1 | -1 - 1 | 4 | one | 5 | -5 | 2 | 2 - 1 | 4 | one | 5 | -5 | 3 | -3 - 1 | 4 | one | 5 | -5 | 2 | 4 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 0 | - 1 | 4 | one | 5 | -5 | | 0 - 2 | 3 | two | 5 | -5 | 1 | -1 - 2 | 3 | two | 5 | -5 | 2 | 2 - 2 | 3 | two | 5 | -5 | 3 | -3 - 2 | 3 | two | 5 | -5 | 2 | 4 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 0 | - 2 | 3 | two | 5 | -5 | | 0 - 3 | 2 | three | 5 | -5 | 1 | -1 - 3 | 2 | three | 5 | -5 | 2 | 2 - 3 | 2 | three | 5 | -5 | 3 | -3 - 3 | 2 | three | 5 | -5 | 2 | 4 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 0 | - 3 | 2 | three | 5 | -5 | | 0 - 4 | 1 | four | 5 | -5 | 1 | -1 - 4 | 1 | four | 5 | -5 | 2 | 2 - 4 | 1 | four | 5 | -5 | 3 | -3 - 4 | 1 | four | 5 | -5 | 2 | 4 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 0 | - 4 | 1 | four | 5 | -5 | | 0 - 5 | 0 | five | 5 | -5 | 1 | -1 - 5 | 0 | five | 5 | -5 | 2 | 2 - 5 | 0 | five | 5 | -5 | 3 | -3 - 5 | 0 | five | 5 | -5 | 2 | 4 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 0 | - 5 | 0 | five | 5 | -5 | | 0 - 6 | 6 | six | 5 | -5 | 1 | -1 - 6 | 6 | six | 5 | -5 | 2 | 2 - 6 | 6 | six | 5 | -5 | 3 | -3 - 6 | 6 | six | 5 | -5 | 2 | 4 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 0 | - 6 | 6 | six | 5 | -5 | | 0 - 7 | 7 | seven | 5 | -5 | 1 | -1 - 7 | 7 | seven | 5 | -5 | 2 | 2 - 7 | 7 | seven | 5 | -5 | 3 | -3 - 7 | 7 | seven | 5 | -5 | 2 | 4 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 0 | - 7 | 7 | seven | 5 | -5 | | 0 - 8 | 8 | eight | 5 | -5 | 1 | -1 - 8 | 8 | eight | 5 | -5 | 2 | 2 - 8 | 8 | eight | 5 | -5 | 3 | -3 - 8 | 8 | eight | 5 | -5 | 2 | 4 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 0 | - 8 | 8 | eight | 5 | -5 | | 0 - 0 | | zero | 5 | -5 | 1 | -1 - 0 | | zero | 5 | -5 | 2 | 2 - 0 | | zero | 5 | -5 | 3 | -3 - 0 | | zero | 5 | -5 | 2 | 4 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 0 | - 0 | | zero | 5 | -5 | | 0 - | | null | 5 | -5 | 1 | -1 - | | null | 5 | -5 | 2 | 2 - | | null | 5 | -5 | 3 | -3 - | | null | 5 | -5 | 2 | 4 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 0 | - | | null | 5 | -5 | | 0 - | 0 | zero | 5 | -5 | 1 | -1 - | 0 | zero | 5 | -5 | 2 | 2 - | 0 | zero | 5 | -5 | 3 | -3 - | 0 | zero | 5 | -5 | 2 | 4 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 0 | - | 0 | zero | 5 | -5 | | 0 - 1 | 4 | one | 0 | | 1 | -1 - 1 | 4 | one | 0 | | 2 | 2 - 1 | 4 | one | 0 | | 3 | -3 - 1 | 4 | one | 0 | | 2 | 4 - 1 | 4 | one | 0 | | 5 | -5 - 1 | 4 | one | 0 | | 5 | -5 - 1 | 4 | one | 0 | | 0 | - 1 | 4 | one | 0 | | | 0 - 2 | 3 | two | 0 | | 1 | -1 - 2 | 3 | two | 0 | | 2 | 2 - 2 | 3 | two | 0 | | 3 | -3 - 2 | 3 | two | 0 | | 2 | 4 - 2 | 3 | two | 0 | | 5 | -5 - 2 | 3 | two | 0 | | 5 | -5 - 2 | 3 | two | 0 | | 0 | - 2 | 3 | two | 0 | | | 0 - 3 | 2 | three | 0 | | 1 | -1 - 3 | 2 | three | 0 | | 2 | 2 - 3 | 2 | three | 0 | | 3 | -3 - 3 | 2 | three | 0 | | 2 | 4 - 3 | 2 | three | 0 | | 5 | -5 - 3 | 2 | three | 0 | | 5 | -5 - 3 | 2 | three | 0 | | 0 | - 3 | 2 | three | 0 | | | 0 - 4 | 1 | four | 0 | | 1 | -1 - 4 | 1 | four | 0 | | 2 | 2 - 4 | 1 | four | 0 | | 3 | -3 - 4 | 1 | four | 0 | | 2 | 4 - 4 | 1 | four | 0 | | 5 | -5 - 4 | 1 | four | 0 | | 5 | -5 - 4 | 1 | four | 0 | | 0 | - 4 | 1 | four | 0 | | | 0 - 5 | 0 | five | 0 | | 1 | -1 - 5 | 0 | five | 0 | | 2 | 2 - 5 | 0 | five | 0 | | 3 | -3 - 5 | 0 | five | 0 | | 2 | 4 - 5 | 0 | five | 0 | | 5 | -5 - 5 | 0 | five | 0 | | 5 | -5 - 5 | 0 | five | 0 | | 0 | - 5 | 0 | five | 0 | | | 0 - 6 | 6 | six | 0 | | 1 | -1 - 6 | 6 | six | 0 | | 2 | 2 - 6 | 6 | six | 0 | | 3 | -3 - 6 | 6 | six | 0 | | 2 | 4 - 6 | 6 | six | 0 | | 5 | -5 - 6 | 6 | six | 0 | | 5 | -5 - 6 | 6 | six | 0 | | 0 | - 6 | 6 | six | 0 | | | 0 - 7 | 7 | seven | 0 | | 1 | -1 - 7 | 7 | seven | 0 | | 2 | 2 - 7 | 7 | seven | 0 | | 3 | -3 - 7 | 7 | seven | 0 | | 2 | 4 - 7 | 7 | seven | 0 | | 5 | -5 - 7 | 7 | seven | 0 | | 5 | -5 - 7 | 7 | seven | 0 | | 0 | - 7 | 7 | seven | 0 | | | 0 - 8 | 8 | eight | 0 | | 1 | -1 - 8 | 8 | eight | 0 | | 2 | 2 - 8 | 8 | eight | 0 | | 3 | -3 - 8 | 8 | eight | 0 | | 2 | 4 - 8 | 8 | eight | 0 | | 5 | -5 - 8 | 8 | eight | 0 | | 5 | -5 - 8 | 8 | eight | 0 | | 0 | - 8 | 8 | eight | 0 | | | 0 - 0 | | zero | 0 | | 1 | -1 - 0 | | zero | 0 | | 2 | 2 - 0 | | zero | 0 | | 3 | -3 - 0 | | zero | 0 | | 2 | 4 - 0 | | zero | 0 | | 5 | -5 - 0 | | zero | 0 | | 5 | -5 - 0 | | zero | 0 | | 0 | - 0 | | zero | 0 | | | 0 - | | null | 0 | | 1 | -1 - | | null | 0 | | 2 | 2 - | | null | 0 | | 3 | -3 - | | null | 0 | | 2 | 4 - | | null | 0 | | 5 | -5 - | | null | 0 | | 5 | -5 - | | null | 0 | | 0 | - | | null | 0 | | | 0 - | 0 | zero | 0 | | 1 | -1 - | 0 | zero | 0 | | 2 | 2 - | 0 | zero | 0 | | 3 | -3 - | 0 | zero | 0 | | 2 | 4 - | 0 | zero | 0 | | 5 | -5 - | 0 | zero | 0 | | 5 | -5 - | 0 | zero | 0 | | 0 | - | 0 | zero | 0 | | | 0 - 1 | 4 | one | | 0 | 1 | -1 - 1 | 4 | one | | 0 | 2 | 2 - 1 | 4 | one | | 0 | 3 | -3 - 1 | 4 | one | | 0 | 2 | 4 - 1 | 4 | one | | 0 | 5 | -5 - 1 | 4 | one | | 0 | 5 | -5 - 1 | 4 | one | | 0 | 0 | - 1 | 4 | one | | 0 | | 0 - 2 | 3 | two | | 0 | 1 | -1 - 2 | 3 | two | | 0 | 2 | 2 - 2 | 3 | two | | 0 | 3 | -3 - 2 | 3 | two | | 0 | 2 | 4 - 2 | 3 | two | | 0 | 5 | -5 - 2 | 3 | two | | 0 | 5 | -5 - 2 | 3 | two | | 0 | 0 | - 2 | 3 | two | | 0 | | 0 - 3 | 2 | three | | 0 | 1 | -1 - 3 | 2 | three | | 0 | 2 | 2 - 3 | 2 | three | | 0 | 3 | -3 - 3 | 2 | three | | 0 | 2 | 4 - 3 | 2 | three | | 0 | 5 | -5 - 3 | 2 | three | | 0 | 5 | -5 - 3 | 2 | three | | 0 | 0 | - 3 | 2 | three | | 0 | | 0 - 4 | 1 | four | | 0 | 1 | -1 - 4 | 1 | four | | 0 | 2 | 2 - 4 | 1 | four | | 0 | 3 | -3 - 4 | 1 | four | | 0 | 2 | 4 - 4 | 1 | four | | 0 | 5 | -5 - 4 | 1 | four | | 0 | 5 | -5 - 4 | 1 | four | | 0 | 0 | - 4 | 1 | four | | 0 | | 0 - 5 | 0 | five | | 0 | 1 | -1 - 5 | 0 | five | | 0 | 2 | 2 - 5 | 0 | five | | 0 | 3 | -3 - 5 | 0 | five | | 0 | 2 | 4 - 5 | 0 | five | | 0 | 5 | -5 - 5 | 0 | five | | 0 | 5 | -5 - 5 | 0 | five | | 0 | 0 | - 5 | 0 | five | | 0 | | 0 - 6 | 6 | six | | 0 | 1 | -1 - 6 | 6 | six | | 0 | 2 | 2 - 6 | 6 | six | | 0 | 3 | -3 - 6 | 6 | six | | 0 | 2 | 4 - 6 | 6 | six | | 0 | 5 | -5 - 6 | 6 | six | | 0 | 5 | -5 - 6 | 6 | six | | 0 | 0 | - 6 | 6 | six | | 0 | | 0 - 7 | 7 | seven | | 0 | 1 | -1 - 7 | 7 | seven | | 0 | 2 | 2 - 7 | 7 | seven | | 0 | 3 | -3 - 7 | 7 | seven | | 0 | 2 | 4 - 7 | 7 | seven | | 0 | 5 | -5 - 7 | 7 | seven | | 0 | 5 | -5 - 7 | 7 | seven | | 0 | 0 | - 7 | 7 | seven | | 0 | | 0 - 8 | 8 | eight | | 0 | 1 | -1 - 8 | 8 | eight | | 0 | 2 | 2 - 8 | 8 | eight | | 0 | 3 | -3 - 8 | 8 | eight | | 0 | 2 | 4 - 8 | 8 | eight | | 0 | 5 | -5 - 8 | 8 | eight | | 0 | 5 | -5 - 8 | 8 | eight | | 0 | 0 | - 8 | 8 | eight | | 0 | | 0 - 0 | | zero | | 0 | 1 | -1 - 0 | | zero | | 0 | 2 | 2 - 0 | | zero | | 0 | 3 | -3 - 0 | | zero | | 0 | 2 | 4 - 0 | | zero | | 0 | 5 | -5 - 0 | | zero | | 0 | 5 | -5 - 0 | | zero | | 0 | 0 | - 0 | | zero | | 0 | | 0 - | | null | | 0 | 1 | -1 - | | null | | 0 | 2 | 2 - | | null | | 0 | 3 | -3 - | | null | | 0 | 2 | 4 - | | null | | 0 | 5 | -5 - | | null | | 0 | 5 | -5 - | | null | | 0 | 0 | - | | null | | 0 | | 0 - | 0 | zero | | 0 | 1 | -1 - | 0 | zero | | 0 | 2 | 2 - | 0 | zero | | 0 | 3 | -3 - | 0 | zero | | 0 | 2 | 4 - | 0 | zero | | 0 | 5 | -5 - | 0 | zero | | 0 | 5 | -5 - | 0 | zero | | 0 | 0 | - | 0 | zero | | 0 | | 0 -(704 rows) - --- --- --- Inner joins (equi-joins) --- --- --- --- Inner joins (equi-joins) with USING clause --- The USING syntax changes the shape of the resulting table --- by including a column in the USING clause only once in the result. --- --- Inner equi-join on specified column ---Testcase 45: -SELECT * - FROM J1_TBL INNER JOIN J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - --- Same as above, slightly different syntax ---Testcase 46: -SELECT * - FROM J1_TBL JOIN J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - ---Testcase 47: -SELECT * - FROM J1_TBL t1 (a, b, c) JOIN J2_TBL t2 (a, d) USING (a) - ORDER BY a, d; - a | b | c | d ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - ---Testcase 48: -SELECT * - FROM J1_TBL t1 (a, b, c) JOIN J2_TBL t2 (a, b) USING (b) - ORDER BY b, t1.a; - b | a | c | a ----+---+-------+--- - 0 | 5 | five | - 0 | | zero | - 2 | 3 | three | 2 - 4 | 1 | one | 2 -(4 rows) - --- --- NATURAL JOIN --- Inner equi-join on all columns with the same name --- ---Testcase 49: -SELECT * - FROM J1_TBL NATURAL JOIN J2_TBL; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - ---Testcase 50: -SELECT * - FROM J1_TBL t1 (a, b, c) NATURAL JOIN J2_TBL t2 (a, d); - a | b | c | d ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - ---Testcase 51: -SELECT * - FROM J1_TBL t1 (a, b, c) NATURAL JOIN J2_TBL t2 (d, a); - a | b | c | d ----+---+------+--- - 0 | | zero | - 2 | 3 | two | 2 - 4 | 1 | four | 2 -(3 rows) - --- mismatch number of columns --- currently, Postgres will fill in with underlying names ---Testcase 52: -SELECT * - FROM J1_TBL t1 (a, b) NATURAL JOIN J2_TBL t2 (a); - a | b | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - --- --- Inner joins (equi-joins) --- ---Testcase 53: -SELECT * - FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i = J2_TBL.i); - i | j | t | i | k ----+---+-------+---+---- - 0 | | zero | 0 | - 1 | 4 | one | 1 | -1 - 2 | 3 | two | 2 | 2 - 2 | 3 | two | 2 | 4 - 3 | 2 | three | 3 | -3 - 5 | 0 | five | 5 | -5 - 5 | 0 | five | 5 | -5 -(7 rows) - ---Testcase 54: -SELECT * - FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i = J2_TBL.k); - i | j | t | i | k ----+---+------+---+--- - 0 | | zero | | 0 - 2 | 3 | two | 2 | 2 - 4 | 1 | four | 2 | 4 -(3 rows) - --- --- Non-equi-joins --- ---Testcase 55: -SELECT * - FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i <= J2_TBL.k); - i | j | t | i | k ----+---+-------+---+--- - 1 | 4 | one | 2 | 2 - 2 | 3 | two | 2 | 2 - 0 | | zero | 2 | 2 - 1 | 4 | one | 2 | 4 - 2 | 3 | two | 2 | 4 - 3 | 2 | three | 2 | 4 - 4 | 1 | four | 2 | 4 - 0 | | zero | 2 | 4 - 0 | | zero | | 0 -(9 rows) - --- --- Outer joins --- Note that OUTER is a noise word --- ---Testcase 56: -SELECT * - FROM J1_TBL LEFT OUTER JOIN J2_TBL USING (i) - ORDER BY i, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | null | - | 0 | zero | -(13 rows) - ---Testcase 57: -SELECT * - FROM J1_TBL LEFT JOIN J2_TBL USING (i) - ORDER BY i, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | null | - | 0 | zero | -(13 rows) - ---Testcase 58: -SELECT * - FROM J1_TBL RIGHT OUTER JOIN J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 - | | | 0 -(8 rows) - ---Testcase 59: -SELECT * - FROM J1_TBL RIGHT JOIN J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 - | | | 0 -(8 rows) - ---Testcase 60: -SELECT * - FROM J1_TBL FULL OUTER JOIN J2_TBL USING (i) - ORDER BY i, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | | 0 - | | null | - | 0 | zero | -(14 rows) - ---Testcase 61: -SELECT * - FROM J1_TBL FULL JOIN J2_TBL USING (i) - ORDER BY i, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | | 0 - | | null | - | 0 | zero | -(14 rows) - ---Testcase 62: -SELECT * - FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (k = 1); - i | j | t | k ----+---+---+--- -(0 rows) - ---Testcase 63: -SELECT * - FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (i = 1); - i | j | t | k ----+---+-----+---- - 1 | 4 | one | -1 -(1 row) - --- --- semijoin selectivity for <> --- ---Testcase 64: -explain (costs off) -select * from int4_tbl i4, tenk1 a -where exists(select * from tenk1 b - where a.twothousand = b.twothousand and a.fivethous <> b.fivethous) - and i4.f1 = a.tenthous; - QUERY PLAN ----------------------------------------------------------- - Hash Join - Hash Cond: (i4.f1 = a.tenthous) - -> Foreign Scan on int4_tbl i4 - -> Hash - -> Hash Semi Join - Hash Cond: (a.twothousand = b.twothousand) - Join Filter: (a.fivethous <> b.fivethous) - -> Foreign Scan on tenk1 a - -> Hash - -> Foreign Scan on tenk1 b -(10 rows) - --- --- More complicated constructs --- --- --- Multiway full join --- ---Testcase 65: -CREATE FOREIGN TABLE t1 (name TEXT, n INTEGER) SERVER influxdb_svr; ---Testcase 66: -CREATE FOREIGN TABLE t2 (name TEXT, n INTEGER) SERVER influxdb_svr; ---Testcase 67: -CREATE FOREIGN TABLE t3 (name TEXT, n INTEGER) SERVER influxdb_svr; ---Testcase 68: -INSERT INTO t1 VALUES ( 'bb', 11 ); ---Testcase 69: -INSERT INTO t2 VALUES ( 'bb', 12 ); ---Testcase 70: -INSERT INTO t2 VALUES ( 'cc', 22 ); ---Testcase 71: -INSERT INTO t2 VALUES ( 'ee', 42 ); ---Testcase 72: -INSERT INTO t3 VALUES ( 'bb', 13 ); ---Testcase 73: -INSERT INTO t3 VALUES ( 'cc', 23 ); ---Testcase 74: -INSERT INTO t3 VALUES ( 'dd', 33 ); ---Testcase 75: -SELECT * FROM t1 FULL JOIN t2 USING (name) FULL JOIN t3 USING (name); - name | n | n | n -------+----+----+---- - bb | 11 | 12 | 13 - cc | | 22 | 23 - dd | | | 33 - ee | | 42 | -(4 rows) - --- --- Test interactions of join syntax and subqueries --- --- Basic cases (we expect planner to pull up the subquery here) ---Testcase 76: -SELECT * FROM -(SELECT * FROM t2) as s2 -INNER JOIN -(SELECT * FROM t3) s3 -USING (name); - name | n | n -------+----+---- - bb | 12 | 13 - cc | 22 | 23 -(2 rows) - ---Testcase 77: -SELECT * FROM -(SELECT * FROM t2) as s2 -LEFT JOIN -(SELECT * FROM t3) s3 -USING (name); - name | n | n -------+----+---- - bb | 12 | 13 - cc | 22 | 23 - ee | 42 | -(3 rows) - ---Testcase 78: -SELECT * FROM -(SELECT * FROM t2) as s2 -FULL JOIN -(SELECT * FROM t3) s3 -USING (name); - name | n | n -------+----+---- - bb | 12 | 13 - cc | 22 | 23 - dd | | 33 - ee | 42 | -(4 rows) - --- Cases with non-nullable expressions in subquery results; --- make sure these go to null as expected ---Testcase 79: -SELECT * FROM -(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL INNER JOIN -(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; - name | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------ - bb | 12 | 2 | 13 | 3 - cc | 22 | 2 | 23 | 3 -(2 rows) - ---Testcase 80: -SELECT * FROM -(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL LEFT JOIN -(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; - name | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------ - bb | 12 | 2 | 13 | 3 - cc | 22 | 2 | 23 | 3 - ee | 42 | 2 | | -(3 rows) - ---Testcase 81: -SELECT * FROM -(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL FULL JOIN -(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; - name | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------ - bb | 12 | 2 | 13 | 3 - cc | 22 | 2 | 23 | 3 - dd | | | 33 | 3 - ee | 42 | 2 | | -(4 rows) - ---Testcase 82: -SELECT * FROM -(SELECT name, n as s1_n, 1 as s1_1 FROM t1) as s1 -NATURAL INNER JOIN -(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL INNER JOIN -(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; - name | s1_n | s1_1 | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------+------+------ - bb | 11 | 1 | 12 | 2 | 13 | 3 -(1 row) - ---Testcase 83: -SELECT * FROM -(SELECT name, n as s1_n, 1 as s1_1 FROM t1) as s1 -NATURAL FULL JOIN -(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL FULL JOIN -(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; - name | s1_n | s1_1 | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------+------+------ - bb | 11 | 1 | 12 | 2 | 13 | 3 - cc | | | 22 | 2 | 23 | 3 - dd | | | | | 33 | 3 - ee | | | 42 | 2 | | -(4 rows) - ---Testcase 84: -SELECT * FROM -(SELECT name, n as s1_n FROM t1) as s1 -NATURAL FULL JOIN - (SELECT * FROM - (SELECT name, n as s2_n FROM t2) as s2 - NATURAL FULL JOIN - (SELECT name, n as s3_n FROM t3) as s3 - ) ss2; - name | s1_n | s2_n | s3_n -------+------+------+------ - bb | 11 | 12 | 13 - cc | | 22 | 23 - dd | | | 33 - ee | | 42 | -(4 rows) - ---Testcase 85: -SELECT * FROM -(SELECT name, n as s1_n FROM t1) as s1 -NATURAL FULL JOIN - (SELECT * FROM - (SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 - NATURAL FULL JOIN - (SELECT name, n as s3_n FROM t3) as s3 - ) ss2; - name | s1_n | s2_n | s2_2 | s3_n -------+------+------+------+------ - bb | 11 | 12 | 2 | 13 - cc | | 22 | 2 | 23 - dd | | | | 33 - ee | | 42 | 2 | -(4 rows) - --- Constants as join keys can also be problematic ---Testcase 86: -SELECT * FROM - (SELECT name, n as s1_n FROM t1) as s1 -FULL JOIN - (SELECT name, 2 as s2_n FROM t2) as s2 -ON (s1_n = s2_n); -ERROR: FULL JOIN is only supported with merge-joinable or hash-joinable join conditions --- Test for propagation of nullability constraints into sub-joins ---Testcase 87: -create foreign table x (x1 int, x2 int) server influxdb_svr; ---Testcase 88: -insert into x values (1,11); ---Testcase 89: -insert into x values (2,22); ---Testcase 90: -insert into x values (3,null); ---Testcase 91: -insert into x values (4,44); ---Testcase 92: -insert into x values (5,null); ---Testcase 93: -create foreign table y (y1 int, y2 int) server influxdb_svr; ---Testcase 94: -insert into y values (1,111); ---Testcase 95: -insert into y values (2,222); ---Testcase 96: -insert into y values (3,333); ---Testcase 97: -insert into y values (4,null); ---Testcase 98: -select * from x; - x1 | x2 -----+---- - 1 | 11 - 2 | 22 - 3 | - 4 | 44 - 5 | -(5 rows) - ---Testcase 99: -select * from y; - y1 | y2 -----+----- - 1 | 111 - 2 | 222 - 3 | 333 - 4 | -(4 rows) - ---Testcase 100: -select * from x left join y on (x1 = y1 and x2 is not null); - x1 | x2 | y1 | y2 -----+----+----+----- - 1 | 11 | 1 | 111 - 2 | 22 | 2 | 222 - 3 | | | - 4 | 44 | 4 | - 5 | | | -(5 rows) - ---Testcase 101: -select * from x left join y on (x1 = y1 and y2 is not null); - x1 | x2 | y1 | y2 -----+----+----+----- - 1 | 11 | 1 | 111 - 2 | 22 | 2 | 222 - 3 | | 3 | 333 - 4 | 44 | | - 5 | | | -(5 rows) - ---Testcase 102: -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | 3 | - 4 | 44 | 4 | | 4 | 44 - 5 | | | | 5 | -(5 rows) - ---Testcase 103: -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1 and x2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | | - 4 | 44 | 4 | | 4 | 44 - 5 | | | | | -(5 rows) - ---Testcase 104: -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1 and y2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | 3 | - 4 | 44 | 4 | | | - 5 | | | | | -(5 rows) - ---Testcase 105: -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1 and xx2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | | - 4 | 44 | 4 | | 4 | 44 - 5 | | | | | -(5 rows) - --- these should NOT give the same answers as above ---Testcase 106: -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1) where (x2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 4 | 44 | 4 | | 4 | 44 -(3 rows) - ---Testcase 107: -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1) where (y2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | 3 | -(3 rows) - ---Testcase 108: -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1) where (xx2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 4 | 44 | 4 | | 4 | 44 -(3 rows) - --- --- regression test: check for bug with propagation of implied equality --- to outside an IN --- ---Testcase 109: -select count(*) from tenk1 a where unique1 in - (select unique1 from tenk1 b join tenk1 c using (unique1) - where b.unique2 = 42); - count -------- - 1 -(1 row) - --- --- regression test: check for failure to generate a plan with multiple --- degenerate IN clauses --- ---Testcase 110: -select count(*) from tenk1 x where - x.unique1 in (select a.f1 from int4_tbl a,float8_tbl b where a.f1=b.f1) and - x.unique1 = 0 and - x.unique1 in (select aa.f1 from int4_tbl aa,float8_tbl bb where aa.f1=bb.f1); - count -------- - 1 -(1 row) - --- try that with GEQO too -begin; ---Testcase 111: -set geqo = on; ---Testcase 112: -set geqo_threshold = 2; ---Testcase 113: -select count(*) from tenk1 x where - x.unique1 in (select a.f1 from int4_tbl a,float8_tbl b where a.f1=b.f1) and - x.unique1 = 0 and - x.unique1 in (select aa.f1 from int4_tbl aa,float8_tbl bb where aa.f1=bb.f1); - count -------- - 1 -(1 row) - -rollback; --- --- regression test: be sure we cope with proven-dummy append rels --- ---Testcase 114: -create table b (aa int, bb int); ---Testcase 115: -explain (costs off) -select aa, bb, unique1, unique1 - from tenk1 right join b on aa = unique1 - where bb < bb and bb is null; - QUERY PLAN ----------------------------------------------------- - Hash Right Join - Hash Cond: (tenk1.unique1 = b.aa) - -> Foreign Scan on tenk1 - -> Hash - -> Seq Scan on b - Filter: ((bb IS NULL) AND (bb < bb)) -(6 rows) - ---Testcase 116: -select aa, bb, unique1, unique1 - from tenk1 right join b on aa = unique1 - where bb < bb and bb is null; - aa | bb | unique1 | unique1 -----+----+---------+--------- -(0 rows) - ---Testcase 117: -drop table b; --- --- regression test: check handling of empty-FROM subquery underneath outer join --- ---Testcase 118: -explain (costs off) -select * from int8_tbl i1 left join (int8_tbl i2 join - (select 123 as x) ss on i2.q1 = x) on i1.q2 = i2.q2 -order by 1, 2; - QUERY PLAN ------------------------------------------------------ - Sort - Sort Key: i1.q1, i1.q2 - -> Hash Left Join - Hash Cond: (i1.q2 = i2.q2) - -> Foreign Scan on int8_tbl i1 - -> Hash - -> Hash Join - Hash Cond: (i2.q1 = (123)) - -> Foreign Scan on int8_tbl i2 - -> Hash - -> Result -(11 rows) - ---Testcase 119: -select * from int8_tbl i1 left join (int8_tbl i2 join - (select 123 as x) ss on i2.q1 = x) on i1.q2 = i2.q2 -order by 1, 2; - q1 | q2 | q1 | q2 | x -------------------+-------------------+-----+------------------+----- - 123 | 456 | 123 | 456 | 123 - 123 | 4567890123456789 | 123 | 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 | | | - 4567890123456789 | 123 | | | - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 123 -(5 rows) - --- --- regression test: check a case where join_clause_is_movable_into() gives --- an imprecise result, causing an assertion failure --- ---Testcase 120: -select count(*) -from - (select t3.tenthous as x1, coalesce(t1.stringu1, t2.stringu1) as x2 - from tenk1 t1 - left join tenk1 t2 on t1.unique1 = t2.unique1 - join tenk1 t3 on t1.unique2 = t3.unique2) ss, - tenk1 t4, - tenk1 t5 -where t4.thousand = t5.unique1 and ss.x1 = t4.tenthous and ss.x2 = t5.stringu1; - count -------- - 1000 -(1 row) - --- --- regression test: check a case where we formerly missed including an EC --- enforcement clause because it was expected to be handled at scan level --- ---Testcase 121: -explain (costs off) -select a.f1, b.f1, t.thousand, t.tenthous from - tenk1 t, - (select sum(f1)+1 as f1 from int4_tbl i4a) a, - (select sum(f1) as f1 from int4_tbl i4b) b -where b.f1 = t.thousand and a.f1 = b.f1 and (a.f1+b.f1+999) = t.tenthous; - QUERY PLAN -------------------------------------------------------------------------------- - Hash Join - Hash Cond: (t.thousand = (sum(i4b.f1))) - Join Filter: ((((((sum(i4a.f1)) + 1)) + (sum(i4b.f1))) + 999) = t.tenthous) - -> Hash Join - Hash Cond: (t.thousand = (((sum(i4a.f1)) + 1))) - -> Foreign Scan on tenk1 t - -> Hash - -> Foreign Scan - -> Hash - -> Foreign Scan -(10 rows) - ---Testcase 122: -select a.f1, b.f1, t.thousand, t.tenthous from - tenk1 t, - (select sum(f1)+1 as f1 from int4_tbl i4a) a, - (select sum(f1) as f1 from int4_tbl i4b) b -where b.f1 = t.thousand and a.f1 = b.f1 and (a.f1+b.f1+999) = t.tenthous; - f1 | f1 | thousand | tenthous -----+----+----------+---------- -(0 rows) - --- --- check a case where we formerly got confused by conflicting sort orders --- in redundant merge join path keys --- ---Testcase 123: -explain (costs off) -select * from - j1_tbl full join - (select * from j2_tbl order by j2_tbl.i desc, j2_tbl.k asc) j2_tbl - on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; - QUERY PLAN ------------------------------------------------------------------ - Merge Full Join - Merge Cond: ((j2_tbl.i = j1_tbl.i) AND (j2_tbl.k = j1_tbl.i)) - -> Sort - Sort Key: j2_tbl.i DESC, j2_tbl.k - -> Foreign Scan on j2_tbl - -> Sort - Sort Key: j1_tbl.i DESC - -> Foreign Scan on j1_tbl -(8 rows) - ---Testcase 124: -select * from - j1_tbl full join - (select * from j2_tbl order by j2_tbl.i desc, j2_tbl.k asc) j2_tbl - on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; - i | j | t | i | k ----+---+-------+---+---- - | | | | 0 - | 0 | zero | | - | | null | | - 8 | 8 | eight | | - 7 | 7 | seven | | - 6 | 6 | six | | - | | | 5 | -5 - | | | 5 | -5 - 5 | 0 | five | | - 4 | 1 | four | | - | | | 3 | -3 - 3 | 2 | three | | - 2 | 3 | two | 2 | 2 - | | | 2 | 4 - | | | 1 | -1 - | | | 0 | - 1 | 4 | one | | - 0 | | zero | | -(18 rows) - --- --- a different check for handling of redundant sort keys in merge joins --- ---Testcase 125: -explain (costs off) -select count(*) from - (select * from tenk1 x order by x.thousand, x.twothousand, x.fivethous) x - left join - (select * from tenk1 y order by y.unique2) y - on x.thousand = y.unique2 and x.twothousand = y.hundred and x.fivethous = y.unique2; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Aggregate - -> Merge Left Join - Merge Cond: ((x.thousand = y.unique2) AND (x.twothousand = y.hundred) AND (x.fivethous = y.unique2)) - -> Sort - Sort Key: x.thousand, x.twothousand, x.fivethous - -> Foreign Scan on tenk1 x - -> Sort - Sort Key: y.unique2, y.hundred - -> Subquery Scan on y - -> Sort - Sort Key: y_1.unique2 - -> Foreign Scan on tenk1 y_1 -(12 rows) - ---Testcase 126: -select count(*) from - (select * from tenk1 x order by x.thousand, x.twothousand, x.fivethous) x - left join - (select * from tenk1 y order by y.unique2) y - on x.thousand = y.unique2 and x.twothousand = y.hundred and x.fivethous = y.unique2; - count -------- - 10000 -(1 row) - --- --- Clean up --- ---Testcase 127: -DELETE FROM t1; ---Testcase 128: -DELETE FROM t2; ---Testcase 129: -DELETE FROM t3; ---Testcase 130: -DROP FOREIGN TABLE t1; ---Testcase 131: -DROP FOREIGN TABLE t2; ---Testcase 132: -DROP FOREIGN TABLE t3; ---Testcase 133: -DELETE FROM J1_TBL; -DROP FOREIGN TABLE J1_TBL; ---Testcase 134: -DELETE FROM J2_TBL; -DROP FOREIGN TABLE J2_TBL; -DELETE FROM x; -DELETE FROM y; -DROP FOREIGN TABLE x; -DROP FOREIGN TABLE y; --- Both DELETE and UPDATE allow the specification of additional tables --- to "join" against to determine which rows should be modified. ---Testcase 135: -CREATE FOREIGN TABLE t1 (a int, b int) SERVER influxdb_svr; ---Testcase 136: -CREATE FOREIGN TABLE t2 (a int, b int) SERVER influxdb_svr; ---Testcase 137: -CREATE FOREIGN TABLE t3 (x int, y int) SERVER influxdb_svr; ---Testcase 138: -INSERT INTO t1 VALUES (5, 10); ---Testcase 139: -INSERT INTO t1 VALUES (15, 20); ---Testcase 140: -INSERT INTO t1 VALUES (100, 100); ---Testcase 141: -INSERT INTO t1 VALUES (200, 1000); ---Testcase 142: -INSERT INTO t2 VALUES (200, 2000); ---Testcase 143: -INSERT INTO t3 VALUES (5, 20); ---Testcase 144: -INSERT INTO t3 VALUES (6, 7); ---Testcase 145: -INSERT INTO t3 VALUES (7, 8); ---Testcase 146: -INSERT INTO t3 VALUES (500, 100); ---Testcase 147: -ALTER TABLE t3 ADD time timestamp; ---Testcase 148: -SELECT x, y FROM t3; - x | y ------+----- - 5 | 20 - 6 | 7 - 7 | 8 - 500 | 100 -(4 rows) - ---Testcase 149: -DELETE FROM t3 USING t1 table1 WHERE t3.x = table1.a; ---Testcase 150: -SELECT x, y FROM t3; - x | y ------+----- - 6 | 7 - 7 | 8 - 500 | 100 -(3 rows) - ---Testcase 151: -DELETE FROM t3 USING t1 JOIN t2 USING (a) WHERE t3.x > t1.a; ---Testcase 152: -SELECT x, y FROM t3; - x | y ----+--- - 6 | 7 - 7 | 8 -(2 rows) - ---Testcase 153: -DELETE FROM t3 USING t3 t3_other WHERE t3.x = t3_other.x AND t3.y = t3_other.y; ---Testcase 154: -SELECT x, y FROM t3; - x | y ----+--- -(0 rows) - --- Test join against inheritance tree ---Testcase 155: -create temp table t2a () inherits (t2); ---Testcase 156: -insert into t2a values (200, 2001); ---Testcase 157: -select * from t1 left join t2 on (t1.a = t2.a); - a | b | a | b ------+------+-----+------ - 5 | 10 | | - 15 | 20 | | - 100 | 100 | | - 200 | 1000 | 200 | 2000 - 200 | 1000 | 200 | 2001 -(5 rows) - --- Test matching of column name with wrong alias ---Testcase 158: -select t1.x from t1 join t3 on (t1.a = t3.x); -ERROR: column t1.x does not exist -LINE 1: select t1.x from t1 join t3 on (t1.a = t3.x); - ^ -HINT: Perhaps you meant to reference the column "t3.x". --- --- regression test for 8.1 merge right join bug --- ---Testcase 159: -CREATE FOREIGN TABLE tt1 ( tt1_id int4, joincol int4 ) SERVER influxdb_svr; ---Testcase 160: -INSERT INTO tt1 VALUES (1, 11); ---Testcase 161: -INSERT INTO tt1 VALUES (2, NULL); ---Testcase 162: -CREATE FOREIGN TABLE tt2 ( tt2_id int4, joincol int4 ) SERVER influxdb_svr; ---Testcase 163: -INSERT INTO tt2 VALUES (21, 11); ---Testcase 164: -INSERT INTO tt2 VALUES (22, 11); ---Testcase 165: -set enable_hashjoin to off; ---Testcase 166: -set enable_nestloop to off; --- these should give the same results ---Testcase 167: -select tt1.*, tt2.* from tt1 left join tt2 on tt1.joincol = tt2.joincol; - tt1_id | joincol | tt2_id | joincol ---------+---------+--------+--------- - 1 | 11 | 21 | 11 - 1 | 11 | 22 | 11 - 2 | | | -(3 rows) - ---Testcase 168: -select tt1.*, tt2.* from tt2 right join tt1 on tt1.joincol = tt2.joincol; - tt1_id | joincol | tt2_id | joincol ---------+---------+--------+--------- - 1 | 11 | 21 | 11 - 1 | 11 | 22 | 11 - 2 | | | -(3 rows) - ---Testcase 169: -reset enable_hashjoin; ---Testcase 170: -reset enable_nestloop; --- --- regression test for bug #13908 (hash join with skew tuples & nbatch increase) --- ---Testcase 171: -set work_mem to '64kB'; ---Testcase 172: -set enable_mergejoin to off; ---Testcase 173: -explain (costs off) -select count(*) from tenk1 a, tenk1 b - where a.hundred = b.thousand and (b.fivethous % 10) < 10; - QUERY PLAN ---------------------------------------------- - Aggregate - -> Hash Join - Hash Cond: (a.hundred = b.thousand) - -> Foreign Scan on tenk1 a - -> Hash - -> Foreign Scan on tenk1 b -(6 rows) - ---Testcase 174: -select count(*) from tenk1 a, tenk1 b - where a.hundred = b.thousand and (b.fivethous % 10) < 10; - count --------- - 100000 -(1 row) - ---Testcase 175: -reset work_mem; ---Testcase 176: -reset enable_mergejoin; --- --- regression test for 8.2 bug with improper re-ordering of left joins --- ---Testcase 177: -create foreign table tt3(f1 int, f2 text) server influxdb_svr; ---Testcase 178: -insert into tt3 select x, repeat('xyzzy', 100) from generate_series(1,10000) x; ---Testcase 179: -create foreign table tt4(f1 int) server influxdb_svr; ---Testcase 180: -insert into tt4 values (0),(1),(9999); ---Testcase 181: -SELECT a.f1 -FROM tt4 a -LEFT JOIN ( - SELECT b.f1 - FROM tt3 b LEFT JOIN tt3 c ON (b.f1 = c.f1) - WHERE c.f1 IS NULL -) AS d ON (a.f1 = d.f1) -WHERE d.f1 IS NULL; - f1 ------- - 0 - 1 - 9999 -(3 rows) - --- --- regression test for proper handling of outer joins within antijoins --- ---Testcase 182: -create foreign table tt4x(c1 int, c2 int, c3 int) server influxdb_svr; ---Testcase 183: -explain (costs off) -select * from tt4x t1 -where not exists ( - select 1 from tt4x t2 - left join tt4x t3 on t2.c3 = t3.c1 - left join ( select t5.c1 as c1 - from tt4x t4 left join tt4x t5 on t4.c2 = t5.c1 - ) a1 on t3.c2 = a1.c1 - where t1.c1 = t2.c2 -); - QUERY PLAN -------------------------------------------------------------- - Hash Anti Join - Hash Cond: (t1.c1 = t2.c2) - -> Foreign Scan on tt4x t1 - -> Hash - -> Merge Right Join - Merge Cond: (t5.c1 = t3.c2) - -> Merge Join - Merge Cond: (t4.c2 = t5.c1) - -> Sort - Sort Key: t4.c2 - -> Foreign Scan on tt4x t4 - -> Sort - Sort Key: t5.c1 - -> Foreign Scan on tt4x t5 - -> Sort - Sort Key: t3.c2 - -> Merge Left Join - Merge Cond: (t2.c3 = t3.c1) - -> Sort - Sort Key: t2.c3 - -> Foreign Scan on tt4x t2 - -> Sort - Sort Key: t3.c1 - -> Foreign Scan on tt4x t3 -(24 rows) - --- --- regression test for problems of the sort depicted in bug #3494 --- ---Testcase 184: -create foreign table tt5(f1 int, f2 int) server influxdb_svr; ---Testcase 185: -create foreign table tt6(f1 int, f2 int) server influxdb_svr; ---Testcase 186: -insert into tt5 values(1, 10); ---Testcase 187: -insert into tt5 values(1, 11); ---Testcase 188: -insert into tt6 values(1, 9); ---Testcase 189: -insert into tt6 values(1, 2); ---Testcase 190: -insert into tt6 values(2, 9); ---Testcase 191: -select * from tt5,tt6 where tt5.f1 = tt6.f1 and tt5.f1 = tt5.f2 - tt6.f2; - f1 | f2 | f1 | f2 -----+----+----+---- - 1 | 10 | 1 | 9 -(1 row) - --- --- regression test for problems of the sort depicted in bug #3588 --- ---Testcase 192: -create foreign table xx (pkxx int) server influxdb_svr; ---Testcase 193: -create foreign table yy (pkyy int, pkxx int) server influxdb_svr; ---Testcase 194: -insert into xx values (1); ---Testcase 195: -insert into xx values (2); ---Testcase 196: -insert into xx values (3); ---Testcase 197: -insert into yy values (101, 1); ---Testcase 198: -insert into yy values (201, 2); ---Testcase 199: -insert into yy values (301, NULL); ---Testcase 200: -select yy.pkyy as yy_pkyy, yy.pkxx as yy_pkxx, yya.pkyy as yya_pkyy, - xxa.pkxx as xxa_pkxx, xxb.pkxx as xxb_pkxx -from yy - left join (SELECT * FROM yy where pkyy = 101) as yya ON yy.pkyy = yya.pkyy - left join xx xxa on yya.pkxx = xxa.pkxx - left join xx xxb on coalesce (xxa.pkxx, 1) = xxb.pkxx; - yy_pkyy | yy_pkxx | yya_pkyy | xxa_pkxx | xxb_pkxx ----------+---------+----------+----------+---------- - 101 | 1 | 101 | 1 | 1 - 301 | | | | 1 - 201 | 2 | | | 1 -(3 rows) - --- --- regression test for improper pushing of constants across outer-join clauses --- (as seen in early 8.2.x releases) --- ---Testcase 201: -create foreign table zt1 (f1 int) server influxdb_svr; ---Testcase 202: -create foreign table zt2 (f2 int) server influxdb_svr; ---Testcase 203: -create foreign table zt3 (f3 int) server influxdb_svr; ---Testcase 204: -insert into zt1 values(53); ---Testcase 205: -insert into zt2 values(53); ---Testcase 206: -select * from - zt2 left join zt3 on (f2 = f3) - left join zt1 on (f3 = f1) -where f2 = 53; - f2 | f3 | f1 -----+----+---- - 53 | | -(1 row) - ---Testcase 207: -create temp view zv1 as select *,'dummy'::text AS junk from zt1; ---Testcase 208: -select * from - zt2 left join zt3 on (f2 = f3) - left join zv1 on (f3 = f1) -where f2 = 53; - f2 | f3 | f1 | junk -----+----+----+------ - 53 | | | -(1 row) - --- --- regression test for improper extraction of OR indexqual conditions --- (as seen in early 8.3.x releases) --- ---Testcase 209: -select a.unique2, a.ten, b.tenthous, b.unique2, b.hundred -from tenk1 a left join tenk1 b on a.unique2 = b.tenthous -where a.unique1 = 42 and - ((b.unique2 is null and a.ten = 2) or b.hundred = 3); - unique2 | ten | tenthous | unique2 | hundred ----------+-----+----------+---------+--------- -(0 rows) - --- --- test proper positioning of one-time quals in EXISTS (8.4devel bug) --- ---Testcase 210: -prepare foo(bool) as - select count(*) from tenk1 a left join tenk1 b - on (a.unique2 = b.unique1 and exists - (select 1 from tenk1 c where c.thousand = b.unique2 and $1)); ---Testcase 211: -execute foo(true); - count -------- - 10000 -(1 row) - ---Testcase 212: -execute foo(false); - count -------- - 10000 -(1 row) - --- --- test for sane behavior with noncanonical merge clauses, per bug #4926 --- -begin; ---Testcase 213: -set enable_mergejoin = 1; ---Testcase 214: -set enable_hashjoin = 0; ---Testcase 215: -set enable_nestloop = 0; ---Testcase 216: -create foreign table a (i integer) server influxdb_svr; ---Testcase 217: -create foreign table b (x integer, y integer) server influxdb_svr; ---Testcase 218: -select * from a left join b on i = x and i = y and x = i; - i | x | y ----+---+--- -(0 rows) - ---Testcase 219: -DROP FOREIGN TABLE a; ---Testcase 220: -DROP FOREIGN TABLE b; -rollback; --- --- test handling of merge clauses using record_ops --- -begin; ---Testcase 221: -create type mycomptype as (id int, v bigint); ---Testcase 222: -create temp table tidv (idv mycomptype); ---Testcase 223: -create index on tidv (idv); ---Testcase 224: -explain (costs off) -select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; - QUERY PLAN ----------------------------------------------------------- - Merge Join - Merge Cond: (a.idv = b.idv) - -> Index Only Scan using tidv_idv_idx on tidv a - -> Materialize - -> Index Only Scan using tidv_idv_idx on tidv b -(5 rows) - ---Testcase 225: -set enable_mergejoin = 0; ---Testcase 226: -set enable_hashjoin = 0; ---Testcase 227: -explain (costs off) -select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; - QUERY PLAN ----------------------------------------------------- - Nested Loop - -> Seq Scan on tidv a - -> Index Only Scan using tidv_idv_idx on tidv b - Index Cond: (idv = a.idv) -(4 rows) - -rollback; --- --- test NULL behavior of whole-row Vars, per bug #5025 --- ---Testcase 228: -select t1.q2, count(t2.*) -from int8_tbl t1 left join int8_tbl t2 on (t1.q2 = t2.q1) -group by t1.q2 order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - ---Testcase 229: -select t1.q2, count(t2.*) -from int8_tbl t1 left join (select * from int8_tbl) t2 on (t1.q2 = t2.q1) -group by t1.q2 order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - ---Testcase 230: -select t1.q2, count(t2.*) -from int8_tbl t1 left join (select * from int8_tbl offset 0) t2 on (t1.q2 = t2.q1) -group by t1.q2 order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - ---Testcase 231: -select t1.q2, count(t2.*) -from int8_tbl t1 left join - (select q1, case when q2=1 then 1 else q2 end as q2 from int8_tbl) t2 - on (t1.q2 = t2.q1) -group by t1.q2 order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - --- --- test incorrect failure to NULL pulled-up subexpressions --- -begin; ---Testcase 232: -create foreign table a ( - code char -) server influxdb_svr; ---Testcase 233: -create foreign table b ( - a char, - num integer -) server influxdb_svr; ---Testcase 234: -create foreign table c ( - name char, - a char -) server influxdb_svr; ---Testcase 235: -insert into a (code) values ('p'); ---Testcase 236: -insert into a (code) values ('q'); ---Testcase 237: -insert into b (a, num) values ('p', 1); ---Testcase 238: -insert into b (a, num) values ('p', 2); ---Testcase 239: -insert into c (name, a) values ('A', 'p'); ---Testcase 240: -insert into c (name, a) values ('B', 'q'); ---Testcase 241: -insert into c (name, a) values ('C', null); ---Testcase 242: -select c.name, ss.code, ss.b_cnt, ss.const -from c left join - (select a.code, coalesce(b_grp.cnt, 0) as b_cnt, -1 as const - from a left join - (select count(1) as cnt, b.a from b group by b.a) as b_grp - on a.code = b_grp.a - ) as ss - on (c.a = ss.code) -order by c.name; - name | code | b_cnt | const -------+------+-------+------- - A | p | 2 | -1 - B | q | 0 | -1 - C | | | -(3 rows) - ---Testcase 243: -DELETE FROM a; ---Testcase 244: -DELETE FROM b; ---Testcase 245: -DELETE FROM c; ---Testcase 246: -DROP FOREIGN TABLE a; ---Testcase 247: -DROP FOREIGN TABLE b; ---Testcase 248: -DROP FOREIGN TABLE c; -rollback; --- --- test incorrect handling of placeholders that only appear in targetlists, --- per bug #6154 --- ---Testcase 249: -SELECT * FROM -( SELECT 1 as key1 ) sub1 -LEFT JOIN -( SELECT sub3.key3, sub4.value2, COALESCE(sub4.value2, 66) as value3 FROM - ( SELECT 1 as key3 ) sub3 - LEFT JOIN - ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM - ( SELECT 1 as key5 ) sub5 - LEFT JOIN - ( SELECT 2 as key6, 42 as value1 ) sub6 - ON sub5.key5 = sub6.key6 - ) sub4 - ON sub4.key5 = sub3.key3 -) sub2 -ON sub1.key1 = sub2.key3; - key1 | key3 | value2 | value3 -------+------+--------+-------- - 1 | 1 | 1 | 1 -(1 row) - --- test the path using join aliases, too ---Testcase 250: -SELECT * FROM -( SELECT 1 as key1 ) sub1 -LEFT JOIN -( SELECT sub3.key3, value2, COALESCE(value2, 66) as value3 FROM - ( SELECT 1 as key3 ) sub3 - LEFT JOIN - ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM - ( SELECT 1 as key5 ) sub5 - LEFT JOIN - ( SELECT 2 as key6, 42 as value1 ) sub6 - ON sub5.key5 = sub6.key6 - ) sub4 - ON sub4.key5 = sub3.key3 -) sub2 -ON sub1.key1 = sub2.key3; - key1 | key3 | value2 | value3 -------+------+--------+-------- - 1 | 1 | 1 | 1 -(1 row) - --- --- test case where a PlaceHolderVar is used as a nestloop parameter --- ---Testcase 251: -EXPLAIN (COSTS OFF) -SELECT qq, unique1 - FROM - ( SELECT COALESCE(q1, 0) AS qq FROM int8_tbl a ) AS ss1 - FULL OUTER JOIN - ( SELECT COALESCE(q2, -1) AS qq FROM int8_tbl b ) AS ss2 - USING (qq) - INNER JOIN tenk1 c ON qq = unique2; - QUERY PLAN -------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: (c.unique2 = (COALESCE((COALESCE(a.q1, '0'::bigint)), (COALESCE(b.q2, '-1'::bigint))))) - -> Sort - Sort Key: c.unique2 - -> Foreign Scan on tenk1 c - -> Sort - Sort Key: (COALESCE((COALESCE(a.q1, '0'::bigint)), (COALESCE(b.q2, '-1'::bigint)))) - -> Merge Full Join - Merge Cond: ((COALESCE(a.q1, '0'::bigint)) = (COALESCE(b.q2, '-1'::bigint))) - -> Sort - Sort Key: (COALESCE(a.q1, '0'::bigint)) - -> Foreign Scan on int8_tbl a - -> Sort - Sort Key: (COALESCE(b.q2, '-1'::bigint)) - -> Foreign Scan on int8_tbl b -(15 rows) - ---Testcase 252: -SELECT qq, unique1 - FROM - ( SELECT COALESCE(q1, 0) AS qq FROM int8_tbl a ) AS ss1 - FULL OUTER JOIN - ( SELECT COALESCE(q2, -1) AS qq FROM int8_tbl b ) AS ss2 - USING (qq) - INNER JOIN tenk1 c ON qq = unique2; - qq | unique1 ------+--------- - 123 | 4596 - 123 | 4596 - 456 | 7318 -(3 rows) - --- --- nested nestloops can require nested PlaceHolderVars --- ---Testcase 253: -create foreign table nt1 ( - id int, - a1 boolean, - a2 boolean -) server influxdb_svr; ---Testcase 254: -create foreign table nt2 ( - id int, - nt1_id int, - b1 boolean, - b2 boolean -) server influxdb_svr; ---Testcase 255: -create foreign table nt3 ( - id int, - nt2_id int, - c1 boolean -) server influxdb_svr; ---Testcase 256: -insert into nt1 values (1,true,true); ---Testcase 257: -insert into nt1 values (2,true,false); ---Testcase 258: -insert into nt1 values (3,false,false); ---Testcase 259: -insert into nt2 values (1,1,true,true); ---Testcase 260: -insert into nt2 values (2,2,true,false); ---Testcase 261: -insert into nt2 values (3,3,false,false); ---Testcase 262: -insert into nt3 values (1,1,true); ---Testcase 263: -insert into nt3 values (2,2,false); ---Testcase 264: -insert into nt3 values (3,3,true); ---Testcase 265: -explain (costs off) -select nt3.id -from nt3 as nt3 - left join - (select nt2.*, (nt2.b1 and ss1.a3) AS b3 - from nt2 as nt2 - left join - (select nt1.*, (nt1.id is not null) as a3 from nt1) as ss1 - on ss1.id = nt2.nt1_id - ) as ss2 - on ss2.id = nt3.nt2_id -where nt3.id = 1 and ss2.b3; - QUERY PLAN ----------------------------------------------------- - Hash Join - Hash Cond: (nt1.id = nt2.nt1_id) - Join Filter: (nt2.b1 AND ((nt1.id IS NOT NULL))) - -> Foreign Scan on nt1 - -> Hash - -> Hash Join - Hash Cond: (nt2.id = nt3.nt2_id) - -> Foreign Scan on nt2 - -> Hash - -> Foreign Scan on nt3 -(10 rows) - ---Testcase 266: -select nt3.id -from nt3 as nt3 - left join - (select nt2.*, (nt2.b1 and ss1.a3) AS b3 - from nt2 as nt2 - left join - (select nt1.*, (nt1.id is not null) as a3 from nt1) as ss1 - on ss1.id = nt2.nt1_id - ) as ss2 - on ss2.id = nt3.nt2_id -where nt3.id = 1 and ss2.b3; - id ----- - 1 -(1 row) - --- --- test case where a PlaceHolderVar is propagated into a subquery --- ---Testcase 267: -explain (costs off) -select * from - int8_tbl t1 left join - (select q1 as x, 42 as y from int8_tbl t2) ss - on t1.q2 = ss.x -where - 1 = (select 1 from int8_tbl t3 where ss.y is not null limit 1) -order by 1,2; - QUERY PLAN ------------------------------------------------------------ - Sort - Sort Key: t1.q1, t1.q2 - -> Hash Right Join - Hash Cond: (t2.q1 = t1.q2) - Filter: (1 = (SubPlan 1)) - -> Foreign Scan on int8_tbl t2 - -> Hash - -> Foreign Scan on int8_tbl t1 - SubPlan 1 - -> Limit - -> Result - One-Time Filter: ((42) IS NOT NULL) - -> Foreign Scan on int8_tbl t3 -(13 rows) - ---Testcase 268: -select * from - int8_tbl t1 left join - (select q1 as x, 42 as y from int8_tbl t2) ss - on t1.q2 = ss.x -where - 1 = (select 1 from int8_tbl t3 where ss.y is not null limit 1) -order by 1,2; - q1 | q2 | x | y -------------------+------------------+------------------+---- - 123 | 4567890123456789 | 4567890123456789 | 42 - 123 | 4567890123456789 | 4567890123456789 | 42 - 123 | 4567890123456789 | 4567890123456789 | 42 - 4567890123456789 | 123 | 123 | 42 - 4567890123456789 | 123 | 123 | 42 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 -(8 rows) - --- --- variant where a PlaceHolderVar is needed at a join, but not above the join --- ---Testcase 269: -explain (costs off) -select * from - int4_tbl as i41, - lateral - (select 1 as x from - (select i41.f1 as lat, - i42.f1 as loc from - int8_tbl as i81, int4_tbl as i42) as ss1 - right join int4_tbl as i43 on (i43.f1 > 1) - where ss1.loc = ss1.lat) as ss2 -where i41.f1 > 0; - QUERY PLAN ------------------------------------------------------- - Nested Loop - -> Nested Loop - -> Foreign Scan on int4_tbl i41 - -> Nested Loop - Join Filter: (i41.f1 = i42.f1) - -> Foreign Scan on int8_tbl i81 - -> Materialize - -> Foreign Scan on int4_tbl i42 - -> Materialize - -> Foreign Scan on int4_tbl i43 -(10 rows) - ---Testcase 270: -select * from - int4_tbl as i41, - lateral - (select 1 as x from - (select i41.f1 as lat, - i42.f1 as loc from - int8_tbl as i81, int4_tbl as i42) as ss1 - right join int4_tbl as i43 on (i43.f1 > 1) - where ss1.loc = ss1.lat) as ss2 -where i41.f1 > 0; - f1 | x -------------+--- - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 -(20 rows) - --- --- test the corner cases FULL JOIN ON TRUE and FULL JOIN ON FALSE --- ---Testcase 271: -select * from int4_tbl a full join int4_tbl b on true; - f1 | f1 --------------+------------- - 0 | 0 - 0 | 123456 - 0 | -123456 - 0 | 2147483647 - 0 | -2147483647 - 123456 | 0 - 123456 | 123456 - 123456 | -123456 - 123456 | 2147483647 - 123456 | -2147483647 - -123456 | 0 - -123456 | 123456 - -123456 | -123456 - -123456 | 2147483647 - -123456 | -2147483647 - 2147483647 | 0 - 2147483647 | 123456 - 2147483647 | -123456 - 2147483647 | 2147483647 - 2147483647 | -2147483647 - -2147483647 | 0 - -2147483647 | 123456 - -2147483647 | -123456 - -2147483647 | 2147483647 - -2147483647 | -2147483647 -(25 rows) - ---Testcase 272: -select * from int4_tbl a full join int4_tbl b on false; - f1 | f1 --------------+------------- - | 0 - | 123456 - | -123456 - | 2147483647 - | -2147483647 - 0 | - 123456 | - -123456 | - 2147483647 | - -2147483647 | -(10 rows) - --- --- test for ability to use a cartesian join when necessary --- ---Testcase 273: -create foreign table q1 (q1 int) server influxdb_svr; ---Testcase 274: -create foreign table q2 (q2 int) server influxdb_svr; ---Testcase 275: -explain (costs off) -select * from - tenk1 join int4_tbl on f1 = twothousand, - q1, q2 -where q1 = thousand or q2 = thousand; - QUERY PLAN ------------------------------------------------------------------------------ - Hash Join - Hash Cond: (tenk1.twothousand = int4_tbl.f1) - -> Nested Loop - Join Filter: ((q1.q1 = tenk1.thousand) OR (q2.q2 = tenk1.thousand)) - -> Nested Loop - -> Foreign Scan on q1 - -> Materialize - -> Foreign Scan on tenk1 - -> Materialize - -> Foreign Scan on q2 - -> Hash - -> Foreign Scan on int4_tbl -(12 rows) - ---Testcase 276: -explain (costs off) -select * from - tenk1 join int4_tbl on f1 = twothousand, - q1, q2 -where thousand = (q1 + q2); - QUERY PLAN ------------------------------------------------------------- - Merge Join - Merge Cond: (tenk1.thousand = ((q1.q1 + q2.q2))) - -> Sort - Sort Key: tenk1.thousand - -> Hash Join - Hash Cond: (int4_tbl.f1 = tenk1.twothousand) - -> Foreign Scan on int4_tbl - -> Hash - -> Foreign Scan on tenk1 - -> Materialize - -> Sort - Sort Key: ((q1.q1 + q2.q2)) - -> Nested Loop - -> Foreign Scan on q1 - -> Materialize - -> Foreign Scan on q2 -(16 rows) - --- --- test ability to generate a suitable plan for a star-schema query --- ---Testcase 277: -explain (costs off) -select * from - tenk1, int8_tbl a, int8_tbl b -where thousand = a.q1 and tenthous = b.q1 and a.q2 = 1 and b.q2 = 2; - QUERY PLAN ----------------------------------------------- - Hash Join - Hash Cond: (tenk1.tenthous = b.q1) - -> Hash Join - Hash Cond: (tenk1.thousand = a.q1) - -> Foreign Scan on tenk1 - -> Hash - -> Foreign Scan on int8_tbl a - -> Hash - -> Foreign Scan on int8_tbl b -(9 rows) - --- --- test a corner case in which we shouldn't apply the star-schema optimization --- ---Testcase 278: -explain (costs off) -select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (select 1,0 from onerow) v1(x1,x2) - left join (select 3,1 from onerow) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on (i1.f1 = subq1.x2) - on (t1.unique2 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = t2.unique1) -where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; - QUERY PLAN ------------------------------------------------------------------ - Merge Join - Merge Cond: (t2.unique1 = (3)) - Join Filter: (t1.stringu1 > t2.stringu2) - -> Sort - Sort Key: t2.unique1 - -> Foreign Scan on tenk1 t2 - -> Sort - Sort Key: (3) - -> Hash Join - Hash Cond: ((11) = t1.unique2) - -> Nested Loop Left Join - Join Filter: (i1.f1 = 0) - -> Foreign Scan on int4_tbl i1 - -> Materialize - -> Nested Loop Left Join - -> Seq Scan on onerow - -> Seq Scan on onerow onerow_1 - -> Hash - -> Foreign Scan on tenk1 t1 -(19 rows) - ---Testcase 279: -select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (select 1,0 from onerow) v1(x1,x2) - left join (select 3,1 from onerow) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on (i1.f1 = subq1.x2) - on (t1.unique2 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = t2.unique1) -where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; - unique2 | stringu1 | unique1 | stringu2 ----------+----------+---------+---------- - 11 | WFAAAA | 3 | LKIAAA -(1 row) - --- variant that isn't quite a star-schema case ---Testcase 280: -select ss1.d1 from - tenk1 as t1 - inner join tenk1 as t2 - on t1.tenthous = t2.ten - inner join - int8_tbl as i8 - left join int4_tbl as i4 - inner join (select 64::information_schema.cardinal_number as d1 - from tenk1 t3, - lateral (select abs(t3.unique1) + random()) ss0(x) - where t3.fivethous < 0) as ss1 - on i4.f1 = ss1.d1 - on i8.q1 = i4.f1 - on t1.tenthous = ss1.d1 -where t1.unique1 < i4.f1; - d1 ----- -(0 rows) - --- this variant is foldable by the remove-useless-RESULT-RTEs code ---Testcase 281: -explain (costs off) -select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (values(1,0)) v1(x1,x2) - left join (values(3,1)) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on (i1.f1 = subq1.x2) - on (t1.unique2 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = t2.unique1) -where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; - QUERY PLAN ---------------------------------------------------------------------------- - Nested Loop - Join Filter: ((0) = i1.f1) - -> Nested Loop - Join Filter: ((t1.stringu1 > t2.stringu2) AND ((3) = t2.unique1)) - -> Hash Join - Hash Cond: (t1.unique2 = (11)) - -> Foreign Scan on tenk1 t1 - -> Hash - -> Nested Loop - Join Filter: ((1) = (1)) - -> Result - -> Result - -> Foreign Scan on tenk1 t2 - -> Foreign Scan on int4_tbl i1 -(14 rows) - ---Testcase 282: -select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (values(1,0)) v1(x1,x2) - left join (values(3,1)) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on (i1.f1 = subq1.x2) - on (t1.unique2 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = t2.unique1) -where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; - unique2 | stringu1 | unique1 | stringu2 ----------+----------+---------+---------- - 11 | WFAAAA | 3 | LKIAAA -(1 row) - --- Here's a variant that we can't fold too aggressively, though, --- or we end up with noplace to evaluate the lateral PHV ---Testcase 283: -explain (verbose, costs off) -select * from - (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), - lateral (select ss2.y as z limit 1) ss3; - QUERY PLAN ------------------------------ - Nested Loop - Output: (1), (2), ((2)) - -> Nested Loop Left Join - Output: (1), (2) - -> Result - Output: 1 - -> Result - Output: 2 - -> Limit - Output: ((2)) - -> Result - Output: (2) -(12 rows) - ---Testcase 284: -select * from - (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), - lateral (select ss2.y as z limit 1) ss3; - x | y | z ----+---+--- - 1 | 2 | 2 -(1 row) - --- Test proper handling of appendrel PHVs during useless-RTE removal ---Testcase 285: -explain (costs off) -select * from - (select 0 as z) as t1 - left join - (select true as a) as t2 - on true, - lateral (select true as b - union all - select a as b) as t3 -where b; - QUERY PLAN ---------------------------------------- - Nested Loop - -> Nested Loop Left Join - -> Result - -> Result - -> Append - -> Result - -> Result - One-Time Filter: (true) -(8 rows) - ---Testcase 286: -select * from - (select 0 as z) as t1 - left join - (select true as a) as t2 - on true, - lateral (select true as b - union all - select a as b) as t3 -where b; - z | a | b ----+---+--- - 0 | t | t - 0 | t | t -(2 rows) - --- --- test inlining of immutable functions --- ---Testcase 287: -create function f_immutable_int4(i integer) returns integer as -$$ begin return i; end; $$ language plpgsql immutable; --- check optimization of function scan with join ---Testcase 288: -explain (costs off) -select unique1 from tenk1, (select * from f_immutable_int4(1) x) x -where x = unique1; - QUERY PLAN ------------------------------------- - Hash Join - Hash Cond: (tenk1.unique1 = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 289: -explain (verbose, costs off) -select unique1, x.* -from tenk1, (select *, random() from f_immutable_int4(1) x) x -where x = unique1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Hash Join - Output: tenk1.unique1, x.x, (random()) - Hash Cond: (tenk1.unique1 = x.x) - -> Foreign Scan on public.tenk1 - Output: tenk1.unique1, tenk1.unique2, tenk1.two, tenk1.four, tenk1.ten, tenk1.twenty, tenk1.hundred, tenk1.thousand, tenk1.twothousand, tenk1.fivethous, tenk1.tenthous, tenk1.odd, tenk1.even, tenk1.stringu1, tenk1.stringu2, tenk1.string4 - InfluxDB query: SELECT "unique1" FROM "tenk" - -> Hash - Output: x.x, (random()) - -> Function Scan on x - Output: x.x, random() - Function Call: 1 -(11 rows) - ---Testcase 290: -explain (costs off) -select unique1 from tenk1, f_immutable_int4(1) x where x = unique1; - QUERY PLAN ------------------------------------- - Hash Join - Hash Cond: (tenk1.unique1 = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 291: -explain (costs off) -select unique1 from tenk1, lateral f_immutable_int4(1) x where x = unique1; - QUERY PLAN ------------------------------------- - Hash Join - Hash Cond: (tenk1.unique1 = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 292: -explain (costs off) -select unique1, x from tenk1 join f_immutable_int4(1) x on unique1 = x; - QUERY PLAN ------------------------------------- - Hash Join - Hash Cond: (tenk1.unique1 = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 293: -explain (costs off) -select unique1, x from tenk1 left join f_immutable_int4(1) x on unique1 = x; - QUERY PLAN ------------------------------------- - Hash Left Join - Hash Cond: (tenk1.unique1 = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 294: -explain (costs off) -select unique1, x from tenk1 right join f_immutable_int4(1) x on unique1 = x; - QUERY PLAN ------------------------------------- - Hash Right Join - Hash Cond: (tenk1.unique1 = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 295: -explain (costs off) -select unique1, x from tenk1 full join f_immutable_int4(1) x on unique1 = x; - QUERY PLAN ------------------------------------- - Hash Full Join - Hash Cond: (tenk1.unique1 = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - --- check that pullup of a const function allows further const-folding ---Testcase 296: -explain (costs off) -select unique1 from tenk1, f_immutable_int4(1) x where x = 42; - QUERY PLAN ------------------------------ - Nested Loop - -> Function Scan on x - Filter: (x = 42) - -> Foreign Scan on tenk1 -(4 rows) - --- test inlining of immutable functions with PlaceHolderVars ---Testcase 297: -explain (costs off) -select nt3.id -from nt3 as nt3 - left join - (select nt2.*, (nt2.b1 or i4 = 42) AS b3 - from nt2 as nt2 - left join - f_immutable_int4(0) i4 - on i4 = nt2.nt1_id - ) as ss2 - on ss2.id = nt3.nt2_id -where nt3.id = 1 and ss2.b3; - QUERY PLAN ------------------------------------------ - Hash Right Join - Hash Cond: (nt2.id = nt3.nt2_id) - Filter: ((nt2.b1 OR (i4.i4 = 42))) - -> Hash Left Join - Hash Cond: (nt2.nt1_id = i4.i4) - -> Foreign Scan on nt2 - -> Hash - -> Function Scan on i4 - -> Hash - -> Foreign Scan on nt3 -(10 rows) - ---Testcase 298: -drop function f_immutable_int4(int); --- test inlining when function returns composite ---Testcase 299: -create function mki8(bigint, bigint) returns int8_tbl as -$$select row($1,$2)::int8_tbl$$ language sql; ---Testcase 300: -create function mki4(int) returns int4_tbl as -$$select row($1)::int4_tbl$$ language sql; ---Testcase 301: -explain (verbose, costs off) -select * from mki8(1,2); - QUERY PLAN ----------------------------------------------------------- - Function Scan on mki8 - Output: q1, q2 - Function Call: ROW('1'::bigint, '2'::bigint)::int8_tbl -(3 rows) - ---Testcase 302: -select * from mki8(1,2); - q1 | q2 -----+---- - 1 | 2 -(1 row) - ---Testcase 303: -explain (verbose, costs off) -select * from mki4(42); - QUERY PLAN ------------------------------------- - Function Scan on mki4 - Output: f1 - Function Call: ROW(42)::int4_tbl -(3 rows) - ---Testcase 304: -select * from mki4(42); - f1 ----- - 42 -(1 row) - ---Testcase 305: -drop function mki8(bigint, bigint); ---Testcase 306: -drop function mki4(int); --- --- test extraction of restriction OR clauses from join OR clause --- (we used to only do this for indexable clauses) --- ---Testcase 307: -explain (costs off) -select * from tenk1 a join tenk1 b on - (a.unique1 = 1 and b.unique1 = 2) or (a.unique2 = 3 and b.hundred = 4); - QUERY PLAN -------------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR ((a.unique2 = 3) AND (b.hundred = 4))) - -> Foreign Scan on tenk1 a - -> Materialize - -> Foreign Scan on tenk1 b -(5 rows) - ---Testcase 308: -explain (costs off) -select * from tenk1 a join tenk1 b on - (a.unique1 = 1 and b.unique1 = 2) or (a.unique2 = 3 and b.ten = 4); - QUERY PLAN ---------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR ((a.unique2 = 3) AND (b.ten = 4))) - -> Foreign Scan on tenk1 a - -> Materialize - -> Foreign Scan on tenk1 b -(5 rows) - ---Testcase 309: -explain (costs off) -select * from tenk1 a join tenk1 b on - (a.unique1 = 1 and b.unique1 = 2) or - ((a.unique2 = 3 or a.unique2 = 7) and b.hundred = 4); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR (((a.unique2 = 3) OR (a.unique2 = 7)) AND (b.hundred = 4))) - -> Foreign Scan on tenk1 a - -> Materialize - -> Foreign Scan on tenk1 b -(5 rows) - --- --- test placement of movable quals in a parameterized join tree --- ---Testcase 310: -explain (costs off) -select * from tenk1 t1 left join - (tenk1 t2 join tenk1 t3 on t2.thousand = t3.unique2) - on t1.hundred = t2.hundred and t1.ten = t3.ten -where t1.unique1 = 1; - QUERY PLAN ----------------------------------------------------------------- - Hash Right Join - Hash Cond: ((t2.hundred = t1.hundred) AND (t3.ten = t1.ten)) - -> Hash Join - Hash Cond: (t2.thousand = t3.unique2) - -> Foreign Scan on tenk1 t2 - -> Hash - -> Foreign Scan on tenk1 t3 - -> Hash - -> Foreign Scan on tenk1 t1 -(9 rows) - ---Testcase 311: -explain (costs off) -select * from tenk1 t1 left join - (tenk1 t2 join tenk1 t3 on t2.thousand = t3.unique2) - on t1.hundred = t2.hundred and t1.ten + t2.ten = t3.ten -where t1.unique1 = 1; - QUERY PLAN ------------------------------------------------ - Hash Right Join - Hash Cond: (t2.hundred = t1.hundred) - Join Filter: ((t1.ten + t2.ten) = t3.ten) - -> Hash Join - Hash Cond: (t2.thousand = t3.unique2) - -> Foreign Scan on tenk1 t2 - -> Hash - -> Foreign Scan on tenk1 t3 - -> Hash - -> Foreign Scan on tenk1 t1 -(10 rows) - ---Testcase 312: -explain (costs off) -select count(*) from - tenk1 a join tenk1 b on a.unique1 = b.unique2 - left join tenk1 c on a.unique2 = b.unique1 and c.thousand = a.thousand - join int4_tbl on b.thousand = f1; - QUERY PLAN ---------------------------------------------------------------------- - Aggregate - -> Merge Join - Merge Cond: (int4_tbl.f1 = b.thousand) - -> Sort - Sort Key: int4_tbl.f1 - -> Foreign Scan on int4_tbl - -> Sort - Sort Key: b.thousand - -> Merge Left Join - Merge Cond: (a.thousand = c.thousand) - Join Filter: (a.unique2 = b.unique1) - -> Sort - Sort Key: a.thousand - -> Merge Join - Merge Cond: (a.unique1 = b.unique2) - -> Sort - Sort Key: a.unique1 - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: b.unique2 - -> Foreign Scan on tenk1 b - -> Sort - Sort Key: c.thousand - -> Foreign Scan on tenk1 c -(24 rows) - ---Testcase 313: -select count(*) from - tenk1 a join tenk1 b on a.unique1 = b.unique2 - left join tenk1 c on a.unique2 = b.unique1 and c.thousand = a.thousand - join int4_tbl on b.thousand = f1; - count -------- - 10 -(1 row) - ---Testcase 314: -explain (costs off) -select b.unique1 from - tenk1 a join tenk1 b on a.unique1 = b.unique2 - left join tenk1 c on b.unique1 = 42 and c.thousand = a.thousand - join int4_tbl i1 on b.thousand = f1 - right join int4_tbl i2 on i2.f1 = b.tenthous - order by 1; - QUERY PLAN ---------------------------------------------------------------------------------------- - Sort - Sort Key: b.unique1 - -> Merge Left Join - Merge Cond: (i2.f1 = b.tenthous) - -> Sort - Sort Key: i2.f1 - -> Foreign Scan on int4_tbl i2 - -> Materialize - -> Sort - Sort Key: b.tenthous - -> Merge Join - Merge Cond: (i1.f1 = b.thousand) - -> Sort - Sort Key: i1.f1 - -> Foreign Scan on int4_tbl i1 - -> Sort - Sort Key: b.thousand - -> Merge Left Join - Merge Cond: (a.thousand = c.thousand) - Join Filter: (b.unique1 = 42) - -> Sort - Sort Key: a.thousand - -> Merge Join - Merge Cond: (b.unique2 = a.unique1) - -> Sort - Sort Key: b.unique2 - -> Foreign Scan on tenk1 b - -> Sort - Sort Key: a.unique1 - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: c.thousand - -> Foreign Scan on tenk1 c -(33 rows) - ---Testcase 315: -select b.unique1 from - tenk1 a join tenk1 b on a.unique1 = b.unique2 - left join tenk1 c on b.unique1 = 42 and c.thousand = a.thousand - join int4_tbl i1 on b.thousand = f1 - right join int4_tbl i2 on i2.f1 = b.tenthous - order by 1; - unique1 ---------- - 0 - - - - -(5 rows) - ---Testcase 316: -explain (costs off) -select * from -( - select unique1, q1, coalesce(unique1, -1) + q1 as fault - from int8_tbl left join tenk1 on (q2 = unique2) -) ss -where fault = 122 -order by fault; - QUERY PLAN --------------------------------------------------------------------------- - Merge Left Join - Merge Cond: (int8_tbl.q2 = tenk1.unique2) - Filter: ((COALESCE(tenk1.unique1, '-1'::integer) + int8_tbl.q1) = 122) - -> Sort - Sort Key: int8_tbl.q2 - -> Foreign Scan on int8_tbl - -> Sort - Sort Key: tenk1.unique2 - -> Foreign Scan on tenk1 -(9 rows) - ---Testcase 317: -select * from -( - select unique1, q1, coalesce(unique1, -1) + q1 as fault - from int8_tbl left join tenk1 on (q2 = unique2) -) ss -where fault = 122 -order by fault; - unique1 | q1 | fault ----------+-----+------- - | 123 | 122 -(1 row) - ---Testcase 318: -explain (costs off) -select * from -(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) -left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x -left join unnest(v1ys) as u1(u1y) on u1y = v2y; - QUERY PLAN -------------------------------------------------------------- - Nested Loop Left Join - -> Values Scan on "*VALUES*" - -> Hash Right Join - Hash Cond: (u1.u1y = "*VALUES*_1".column2) - Filter: ("*VALUES*_1".column1 = "*VALUES*".column1) - -> Function Scan on unnest u1 - -> Hash - -> Values Scan on "*VALUES*_1" -(8 rows) - ---Testcase 319: -select * from -(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) -left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x -left join unnest(v1ys) as u1(u1y) on u1y = v2y; - v1x | v1ys | v2x | v2y | u1y ------+---------+-----+-----+----- - 1 | {10,20} | 1 | 10 | 10 - 2 | {20,30} | 2 | 20 | 20 -(2 rows) - --- --- test handling of potential equivalence clauses above outer joins --- ---Testcase 320: -explain (costs off) -select q1, unique2, thousand, hundred - from int8_tbl a left join tenk1 b on q1 = unique2 - where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123); - QUERY PLAN --------------------------------------------------------------------------------------- - Merge Right Join - Merge Cond: (b.unique2 = a.q1) - Filter: ((COALESCE(b.thousand, 123) = a.q1) AND (a.q1 = COALESCE(b.hundred, 123))) - -> Sort - Sort Key: b.unique2 - -> Foreign Scan on tenk1 b - -> Sort - Sort Key: a.q1 - -> Foreign Scan on int8_tbl a -(9 rows) - ---Testcase 321: -select q1, unique2, thousand, hundred - from int8_tbl a left join tenk1 b on q1 = unique2 - where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123); - q1 | unique2 | thousand | hundred -----+---------+----------+--------- -(0 rows) - ---Testcase 322: -explain (costs off) -select f1, unique2, case when unique2 is null then f1 else 0 end - from int4_tbl a left join tenk1 b on f1 = unique2 - where (case when unique2 is null then f1 else 0 end) = 0; - QUERY PLAN --------------------------------------------------------------------- - Merge Left Join - Merge Cond: (a.f1 = b.unique2) - Filter: (CASE WHEN (b.unique2 IS NULL) THEN a.f1 ELSE 0 END = 0) - -> Sort - Sort Key: a.f1 - -> Foreign Scan on int4_tbl a - -> Sort - Sort Key: b.unique2 - -> Foreign Scan on tenk1 b -(9 rows) - ---Testcase 323: -select f1, unique2, case when unique2 is null then f1 else 0 end - from int4_tbl a left join tenk1 b on f1 = unique2 - where (case when unique2 is null then f1 else 0 end) = 0; - f1 | unique2 | case -----+---------+------ - 0 | 0 | 0 -(1 row) - --- --- another case with equivalence clauses above outer joins (bug #8591) --- ---Testcase 324: -explain (costs off) -select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand) - from tenk1 a left join tenk1 b on b.thousand = a.unique1 left join tenk1 c on c.unique2 = coalesce(b.twothousand, a.twothousand) - where a.unique2 < 10 and coalesce(b.twothousand, a.twothousand) = 44; - QUERY PLAN -------------------------------------------------------------------- - Hash Left Join - Hash Cond: (COALESCE(b.twothousand, a.twothousand) = c.unique2) - -> Merge Left Join - Merge Cond: (a.unique1 = b.thousand) - Filter: (COALESCE(b.twothousand, a.twothousand) = 44) - -> Sort - Sort Key: a.unique1 - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: b.thousand - -> Foreign Scan on tenk1 b - -> Hash - -> Foreign Scan on tenk1 c -(13 rows) - ---Testcase 325: -select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand) - from tenk1 a left join tenk1 b on b.thousand = a.unique1 left join tenk1 c on c.unique2 = coalesce(b.twothousand, a.twothousand) - where a.unique2 < 10 and coalesce(b.twothousand, a.twothousand) = 44; - unique1 | unique1 | unique1 | coalesce ----------+---------+---------+---------- -(0 rows) - --- --- check handling of join aliases when flattening multiple levels of subquery --- ---Testcase 326: -explain (verbose, costs off) -select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from - (values (0),(1)) foo1(join_key) -left join - (select join_key, bug_field from - (select ss1.join_key, ss1.bug_field from - (select f1 as join_key, 666 as bug_field from int4_tbl i1) ss1 - ) foo2 - left join - (select unique2 as join_key from tenk1 i2) ss2 - using (join_key) - ) foo3 -using (join_key); - QUERY PLAN ------------------------------------------------------------------- - Merge Right Join - Output: "*VALUES*".column1, i1.f1, (666) - Merge Cond: (i1.f1 = "*VALUES*".column1) - -> Merge Left Join - Output: i1.f1, 666 - Merge Cond: (i1.f1 = i2.unique2) - -> Sort - Output: i1.f1 - Sort Key: i1.f1 - -> Foreign Scan on public.int4_tbl i1 - Output: i1.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Sort - Output: i2.unique2 - Sort Key: i2.unique2 - -> Foreign Scan on public.tenk1 i2 - Output: i2.unique2 - InfluxDB query: SELECT "unique2" FROM "tenk" - -> Sort - Output: "*VALUES*".column1 - Sort Key: "*VALUES*".column1 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1 -(23 rows) - ---Testcase 327: -select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from - (values (0),(1)) foo1(join_key) -left join - (select join_key, bug_field from - (select ss1.join_key, ss1.bug_field from - (select f1 as join_key, 666 as bug_field from int4_tbl i1) ss1 - ) foo2 - left join - (select unique2 as join_key from tenk1 i2) ss2 - using (join_key) - ) foo3 -using (join_key); - foo1_id | foo3_id | bug_field ----------+---------+----------- - 0 | 0 | 666 - 1 | | -(2 rows) - --- --- test successful handling of nested outer joins with degenerate join quals --- ---Testcase 328: -create foreign table text_tbl(f1 text) server influxdb_svr; ---Testcase 329: -explain (verbose, costs off) -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - QUERY PLAN ------------------------------------------------------------------------------------------------------------ - Merge Right Join - Output: t1.f1 - Merge Cond: (i4.f1 = i8.q2) - -> Sort - Output: i4.f1 - Sort Key: i4.f1 - -> Foreign Scan on public.int4_tbl i4 - Output: i4.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Materialize - Output: t1.f1, i8.q2 - -> Sort - Output: t1.f1, i8.q2 - Sort Key: i8.q2 - -> Nested Loop Left Join - Output: t1.f1, i8.q2 - Join Filter: (t1.f1 = '***'::text) - -> Foreign Scan on public.text_tbl t1 - Output: t1.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" - -> Materialize - Output: i8.q2 - -> Merge Left Join - Output: i8.q2 - Merge Cond: (i8b1.q2 = (NULL::integer)) - -> Sort - Output: i8b1.q2 - Sort Key: i8b1.q2 - -> Foreign Scan on public.int8_tbl i8b1 - Output: i8b1.q2 - InfluxDB query: SELECT "q2" FROM "int8_tbl" - -> Sort - Output: i8.q2, (NULL::integer) - Sort Key: (NULL::integer) - -> Merge Left Join - Output: i8.q2, (NULL::integer) - Merge Cond: (i8.q1 = i8b2.q1) - -> Sort - Output: i8.q1, i8.q2 - Sort Key: i8.q1 - -> Foreign Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Sort - Output: i8b2.q1, (NULL::integer) - Sort Key: i8b2.q1 - -> Foreign Scan on public.int8_tbl i8b2 - Output: i8b2.q1, NULL::integer - InfluxDB query: SELECT "q1" FROM "int8_tbl" -(49 rows) - ---Testcase 330: -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - f1 -------------------- - doh! - hi de ho neighbor -(2 rows) - ---Testcase 331: -explain (verbose, costs off) -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------ - Hash Left Join - Output: t1.f1 - Hash Cond: (i8.q2 = i4.f1) - -> Nested Loop Left Join - Output: t1.f1, i8.q2 - Join Filter: (t1.f1 = '***'::text) - -> Foreign Scan on public.text_tbl t1 - Output: t1.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" - -> Materialize - Output: i8.q2 - -> Merge Left Join - Output: i8.q2 - Merge Cond: (i8b1.q2 = (NULL::integer)) - -> Sort - Output: i8b1.q2 - Sort Key: i8b1.q2 - -> Foreign Scan on public.int8_tbl i8b1 - Output: i8b1.q2 - InfluxDB query: SELECT "q2" FROM "int8_tbl" - -> Materialize - Output: i8.q2, (NULL::integer) - -> Sort - Output: i8.q2, (NULL::integer) - Sort Key: (NULL::integer) - -> Merge Left Join - Output: i8.q2, (NULL::integer) - Merge Cond: (i8.q1 = i8b2.q1) - -> Sort - Output: i8.q1, i8.q2 - Sort Key: i8.q1 - -> Foreign Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Materialize - Output: i8b2.q1, (NULL::integer) - -> Sort - Output: i8b2.q1, (NULL::integer) - Sort Key: i8b2.q1 - -> Nested Loop - Output: i8b2.q1, NULL::integer - -> Foreign Scan on public.int4_tbl i4b2 - Output: i4b2.f1 - InfluxDB query: SELECT * FROM "int4_tbl" - -> Materialize - Output: i8b2.q1 - -> Foreign Scan on public.int8_tbl i8b2 - Output: i8b2.q1 - InfluxDB query: SELECT "q1" FROM "int8_tbl" - -> Hash - Output: i4.f1 - -> Foreign Scan on public.int4_tbl i4 - Output: i4.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" -(54 rows) - ---Testcase 332: -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - f1 -------------------- - doh! - hi de ho neighbor -(2 rows) - ---Testcase 333: -explain (verbose, costs off) -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2 - where q1 = f1) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ - Merge Right Join - Output: t1.f1 - Merge Cond: (i4.f1 = i8.q2) - -> Sort - Output: i4.f1 - Sort Key: i4.f1 - -> Foreign Scan on public.int4_tbl i4 - Output: i4.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Materialize - Output: t1.f1, i8.q2 - -> Sort - Output: t1.f1, i8.q2 - Sort Key: i8.q2 - -> Nested Loop Left Join - Output: t1.f1, i8.q2 - Join Filter: (t1.f1 = '***'::text) - -> Foreign Scan on public.text_tbl t1 - Output: t1.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" - -> Materialize - Output: i8.q2 - -> Merge Left Join - Output: i8.q2 - Merge Cond: (i8b1.q2 = (NULL::integer)) - -> Sort - Output: i8b1.q2 - Sort Key: i8b1.q2 - -> Foreign Scan on public.int8_tbl i8b1 - Output: i8b1.q2 - InfluxDB query: SELECT "q2" FROM "int8_tbl" - -> Materialize - Output: i8.q2, (NULL::integer) - -> Sort - Output: i8.q2, (NULL::integer) - Sort Key: (NULL::integer) - -> Merge Left Join - Output: i8.q2, (NULL::integer) - Merge Cond: (i8.q1 = i8b2.q1) - -> Sort - Output: i8.q1, i8.q2 - Sort Key: i8.q1 - -> Foreign Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Materialize - Output: i8b2.q1, (NULL::integer) - -> Merge Join - Output: i8b2.q1, NULL::integer - Merge Cond: (i8b2.q1 = i4b2.f1) - -> Sort - Output: i8b2.q1 - Sort Key: i8b2.q1 - -> Foreign Scan on public.int8_tbl i8b2 - Output: i8b2.q1 - InfluxDB query: SELECT "q1" FROM "int8_tbl" - -> Sort - Output: i4b2.f1 - Sort Key: i4b2.f1 - -> Foreign Scan on public.int4_tbl i4b2 - Output: i4b2.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" -(62 rows) - ---Testcase 334: -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2 - where q1 = f1) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - f1 -------------------- - doh! - hi de ho neighbor -(2 rows) - ---Testcase 335: -explain (verbose, costs off) -select * from - text_tbl t1 - inner join int8_tbl i8 - on i8.q2 = 456 - right join text_tbl t2 - on t1.f1 = 'doh!' - left join int4_tbl i4 - on i8.q1 = i4.f1; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Nested Loop Left Join - Output: t1.f1, i8.q1, i8.q2, t2.f1, i4.f1 - -> Foreign Scan on public.text_tbl t2 - Output: t2.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" - -> Materialize - Output: i8.q1, i8.q2, i4.f1, t1.f1 - -> Nested Loop - Output: i8.q1, i8.q2, i4.f1, t1.f1 - -> Hash Right Join - Output: i8.q1, i8.q2, i4.f1 - Hash Cond: (i4.f1 = i8.q1) - -> Foreign Scan on public.int4_tbl i4 - Output: i4.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Hash - Output: i8.q1, i8.q2 - -> Foreign Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (("q2" = 456)) - -> Materialize - Output: t1.f1 - -> Foreign Scan on public.text_tbl t1 - Output: t1.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" WHERE (("f1" = 'doh!')) -(25 rows) - ---Testcase 336: -select * from - text_tbl t1 - inner join int8_tbl i8 - on i8.q2 = 456 - right join text_tbl t2 - on t1.f1 = 'doh!' - left join int4_tbl i4 - on i8.q1 = i4.f1; - f1 | q1 | q2 | f1 | f1 -------+-----+-----+-------------------+---- - doh! | 123 | 456 | doh! | - doh! | 123 | 456 | hi de ho neighbor | -(2 rows) - --- --- test for appropriate join order in the presence of lateral references --- ---Testcase 337: -explain (verbose, costs off) -select * from - text_tbl t1 - left join int8_tbl i8 - on i8.q2 = 123, - lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss -where t1.f1 = ss.f1; - QUERY PLAN --------------------------------------------------------------------------------------------- - Nested Loop - Output: t1.f1, i8.q1, i8.q2, (i8.q1), t2.f1 - Join Filter: (t1.f1 = t2.f1) - -> Nested Loop Left Join - Output: t1.f1, i8.q1, i8.q2 - -> Foreign Scan on public.text_tbl t1 - Output: t1.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" - -> Materialize - Output: i8.q1, i8.q2 - -> Foreign Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (("q2" = 123)) - -> Limit - Output: (i8.q1), t2.f1 - -> Foreign Scan on public.text_tbl t2 - Output: i8.q1, t2.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" -(18 rows) - ---Testcase 338: -select * from - text_tbl t1 - left join int8_tbl i8 - on i8.q2 = 123, - lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss -where t1.f1 = ss.f1; - f1 | q1 | q2 | q1 | f1 -------+------------------+-----+------------------+------ - doh! | 4567890123456789 | 123 | 4567890123456789 | doh! -(1 row) - ---Testcase 339: -explain (verbose, costs off) -select * from - text_tbl t1 - left join int8_tbl i8 - on i8.q2 = 123, - lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss1, - lateral (select ss1.* from text_tbl t3 limit 1) as ss2 -where t1.f1 = ss2.f1; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Nested Loop - Output: t1.f1, i8.q1, i8.q2, (i8.q1), t2.f1, ((i8.q1)), (t2.f1) - Join Filter: (t1.f1 = (t2.f1)) - -> Nested Loop - Output: t1.f1, i8.q1, i8.q2, (i8.q1), t2.f1 - -> Nested Loop Left Join - Output: t1.f1, i8.q1, i8.q2 - -> Foreign Scan on public.text_tbl t1 - Output: t1.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" - -> Materialize - Output: i8.q1, i8.q2 - -> Foreign Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (("q2" = 123)) - -> Limit - Output: (i8.q1), t2.f1 - -> Foreign Scan on public.text_tbl t2 - Output: i8.q1, t2.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" - -> Limit - Output: ((i8.q1)), (t2.f1) - -> Foreign Scan on public.text_tbl t3 - Output: (i8.q1), t2.f1 - InfluxDB query: SELECT * FROM "text_tbl" -(25 rows) - ---Testcase 340: -select * from - text_tbl t1 - left join int8_tbl i8 - on i8.q2 = 123, - lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss1, - lateral (select ss1.* from text_tbl t3 limit 1) as ss2 -where t1.f1 = ss2.f1; - f1 | q1 | q2 | q1 | f1 | q1 | f1 -------+------------------+-----+------------------+------+------------------+------ - doh! | 4567890123456789 | 123 | 4567890123456789 | doh! | 4567890123456789 | doh! -(1 row) - ---Testcase 341: -explain (verbose, costs off) -select 1 from - text_tbl as tt1 - inner join text_tbl as tt2 on (tt1.f1 = 'foo') - left join text_tbl as tt3 on (tt3.f1 = 'foo') - left join text_tbl as tt4 on (tt3.f1 = tt4.f1), - lateral (select tt4.f1 as c0 from text_tbl as tt5 limit 1) as ss1 -where tt1.f1 = ss1.c0; - QUERY PLAN ----------------------------------------------------------------------------------------------- - Nested Loop - Output: 1 - -> Nested Loop Left Join - Output: tt1.f1, tt4.f1 - -> Nested Loop - Output: tt1.f1 - -> Foreign Scan on public.text_tbl tt2 - Output: tt2.f1 - InfluxDB query: SELECT * FROM "text_tbl" - -> Materialize - Output: tt1.f1 - -> Foreign Scan on public.text_tbl tt1 - Output: tt1.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" WHERE (("f1" = 'foo')) - -> Hash Left Join - Output: tt4.f1 - Hash Cond: (tt3.f1 = tt4.f1) - -> Foreign Scan on public.text_tbl tt3 - Output: tt3.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" WHERE (("f1" = 'foo')) - -> Hash - Output: tt4.f1 - -> Foreign Scan on public.text_tbl tt4 - Output: tt4.f1 - InfluxDB query: SELECT "f1" FROM "text_tbl" WHERE (("f1" = 'foo')) - -> Subquery Scan on ss1 - Output: ss1.c0 - Filter: (ss1.c0 = 'foo'::text) - -> Limit - Output: (tt4.f1) - -> Foreign Scan on public.text_tbl tt5 - Output: tt4.f1 - InfluxDB query: SELECT * FROM "text_tbl" -(33 rows) - ---Testcase 342: -select 1 from - text_tbl as tt1 - inner join text_tbl as tt2 on (tt1.f1 = 'foo') - left join text_tbl as tt3 on (tt3.f1 = 'foo') - left join text_tbl as tt4 on (tt3.f1 = tt4.f1), - lateral (select tt4.f1 as c0 from text_tbl as tt5 limit 1) as ss1 -where tt1.f1 = ss1.c0; - ?column? ----------- -(0 rows) - --- --- check a case in which a PlaceHolderVar forces join order --- ---Testcase 343: -explain (verbose, costs off) -select ss2.* from - int4_tbl i41 - left join int8_tbl i8 - join (select i42.f1 as c1, i43.f1 as c2, 42 as c3 - from int4_tbl i42, int4_tbl i43) ss1 - on i8.q1 = ss1.c2 - on i41.f1 = ss1.c1, - lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 -where ss1.c2 = 0; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Nested Loop - Output: (i41.f1), (i8.q1), (i8.q2), (i42.f1), (i43.f1), ((42)) - -> Nested Loop - Output: i41.f1, i42.f1, i8.q1, i8.q2, i43.f1, 42 - -> Nested Loop - Output: i41.f1, i42.f1, i8.q1, i8.q2 - -> Merge Join - Output: i41.f1, i42.f1 - Merge Cond: (i41.f1 = i42.f1) - -> Sort - Output: i41.f1 - Sort Key: i41.f1 - -> Foreign Scan on public.int4_tbl i41 - Output: i41.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Sort - Output: i42.f1 - Sort Key: i42.f1 - -> Foreign Scan on public.int4_tbl i42 - Output: i42.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Materialize - Output: i8.q1, i8.q2 - -> Foreign Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (("q1" = 0)) - -> Materialize - Output: i43.f1 - -> Foreign Scan on public.int4_tbl i43 - Output: i43.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" WHERE (("f1" = 0)) - -> Limit - Output: (i41.f1), (i8.q1), (i8.q2), (i42.f1), (i43.f1), ((42)) - -> Foreign Scan on public.text_tbl - Output: i41.f1, i8.q1, i8.q2, i42.f1, i43.f1, (42) - InfluxDB query: SELECT * FROM "text_tbl" -(36 rows) - ---Testcase 344: -select ss2.* from - int4_tbl i41 - left join int8_tbl i8 - join (select i42.f1 as c1, i43.f1 as c2, 42 as c3 - from int4_tbl i42, int4_tbl i43) ss1 - on i8.q1 = ss1.c2 - on i41.f1 = ss1.c1, - lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 -where ss1.c2 = 0; - f1 | q1 | q2 | c1 | c2 | c3 -----+----+----+----+----+---- -(0 rows) - --- --- test successful handling of full join underneath left join (bug #14105) --- ---Testcase 345: -explain (costs off) -select * from - (select 1 as id) as xx - left join - (tenk1 as a1 full join (select 1 as id) as yy on (a1.unique1 = yy.id)) - on (xx.id = coalesce(yy.id)); - QUERY PLAN ---------------------------------------- - Nested Loop Left Join - Join Filter: ((1) = COALESCE((1))) - -> Result - -> Hash Full Join - Hash Cond: (a1.unique1 = (1)) - -> Foreign Scan on tenk1 a1 - -> Hash - -> Result -(8 rows) - ---Testcase 346: -select * from - (select 1 as id) as xx - left join - (tenk1 as a1 full join (select 1 as id) as yy on (a1.unique1 = yy.id)) - on (xx.id = coalesce(yy.id)); - id | unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 | id -----+---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------+---- - 1 | 1 | 2838 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | EFEAAA | OOOOxx | 1 -(1 row) - --- --- test ability to push constants through outer join clauses --- ---Testcase 347: -explain (costs off) - select * from int4_tbl a left join tenk1 b on f1 = unique2 where f1 = 0; - QUERY PLAN -------------------------------------- - Hash Left Join - Hash Cond: (a.f1 = b.unique2) - -> Foreign Scan on int4_tbl a - -> Hash - -> Foreign Scan on tenk1 b -(5 rows) - ---Testcase 348: -explain (costs off) - select * from tenk1 a full join tenk1 b using(unique2) where unique2 = 42; - QUERY PLAN ---------------------------------------- - Merge Full Join - Merge Cond: (a.unique2 = b.unique2) - -> Sort - Sort Key: a.unique2 - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: b.unique2 - -> Foreign Scan on tenk1 b -(8 rows) - --- --- test that quals attached to an outer join have correct semantics, --- specifically that they don't re-use expressions computed below the join; --- we force a mergejoin so that coalesce(b.q1, 1) appears as a join input --- ---Testcase 349: -set enable_hashjoin to off; ---Testcase 350: -set enable_nestloop to off; ---Testcase 351: -explain (verbose, costs off) - select a.q2, b.q1 - from int8_tbl a left join int8_tbl b on a.q2 = coalesce(b.q1, 1) - where coalesce(b.q1, 1) > 0; - QUERY PLAN ------------------------------------------------------------ - Merge Left Join - Output: a.q2, b.q1 - Merge Cond: (a.q2 = (COALESCE(b.q1, '1'::bigint))) - Filter: (COALESCE(b.q1, '1'::bigint) > 0) - -> Sort - Output: a.q2 - Sort Key: a.q2 - -> Foreign Scan on public.int8_tbl a - Output: a.q2 - InfluxDB query: SELECT "q2" FROM "int8_tbl" - -> Sort - Output: b.q1, (COALESCE(b.q1, '1'::bigint)) - Sort Key: (COALESCE(b.q1, '1'::bigint)) - -> Foreign Scan on public.int8_tbl b - Output: b.q1, COALESCE(b.q1, '1'::bigint) - InfluxDB query: SELECT "q1" FROM "int8_tbl" -(16 rows) - ---Testcase 352: -select a.q2, b.q1 - from int8_tbl a left join int8_tbl b on a.q2 = coalesce(b.q1, 1) - where coalesce(b.q1, 1) > 0; - q2 | q1 --------------------+------------------ - -4567890123456789 | - 123 | 123 - 123 | 123 - 456 | - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(10 rows) - ---Testcase 353: -reset enable_hashjoin; ---Testcase 354: -reset enable_nestloop; --- --- test join removal --- -begin; ---Testcase 355: -CREATE FOREIGN TABLE a (id int, b_id int) SERVER influxdb_svr; ---Testcase 356: -CREATE FOREIGN TABLE b (id int, c_id int) SERVER influxdb_svr; ---Testcase 357: -CREATE FOREIGN TABLE c (id int) SERVER influxdb_svr; ---Testcase 358: -CREATE FOREIGN TABLE d (a int, b int) SERVER influxdb_svr; ---Testcase 359: -INSERT INTO a VALUES (0, 0), (1, NULL); ---Testcase 360: -INSERT INTO b VALUES (0, 0), (1, NULL); ---Testcase 361: -INSERT INTO c VALUES (0), (1); ---Testcase 362: -INSERT INTO d VALUES (1,3), (2,2), (3,1); --- all three cases should be optimizable into a simple seqscan ---Testcase 363: -explain (costs off) SELECT a.* FROM a LEFT JOIN b ON a.b_id = b.id; - QUERY PLAN -------------------------------- - Merge Left Join - Merge Cond: (a.b_id = b.id) - -> Sort - Sort Key: a.b_id - -> Foreign Scan on a - -> Sort - Sort Key: b.id - -> Foreign Scan on b -(8 rows) - ---Testcase 364: -explain (costs off) SELECT b.* FROM b LEFT JOIN c ON b.c_id = c.id; - QUERY PLAN -------------------------------- - Merge Left Join - Merge Cond: (b.c_id = c.id) - -> Sort - Sort Key: b.c_id - -> Foreign Scan on b - -> Sort - Sort Key: c.id - -> Foreign Scan on c -(8 rows) - ---Testcase 365: -explain (costs off) - SELECT a.* FROM a LEFT JOIN (b left join c on b.c_id = c.id) - ON (a.b_id = b.id); - QUERY PLAN -------------------------------------------- - Merge Right Join - Merge Cond: (c.id = b.c_id) - -> Sort - Sort Key: c.id - -> Foreign Scan on c - -> Sort - Sort Key: b.c_id - -> Merge Left Join - Merge Cond: (a.b_id = b.id) - -> Sort - Sort Key: a.b_id - -> Foreign Scan on a - -> Sort - Sort Key: b.id - -> Foreign Scan on b -(15 rows) - --- check optimization of outer join within another special join ---Testcase 366: -explain (costs off) -select id from a where id in ( - select b.id from b left join c on b.id = c.id -); - QUERY PLAN -------------------------------------------------- - Hash Join - Hash Cond: (a.id = b.id) - -> Foreign Scan on a - -> Hash - -> HashAggregate - Group Key: b.id - -> Merge Left Join - Merge Cond: (b.id = c.id) - -> Sort - Sort Key: b.id - -> Foreign Scan on b - -> Sort - Sort Key: c.id - -> Foreign Scan on c -(14 rows) - --- check that join removal works for a left join when joining a subquery --- that is guaranteed to be unique by its GROUP BY clause ---Testcase 367: -explain (costs off) -select d.* from d left join (select * from b group by b.id, b.c_id) s - on d.a = s.id and d.b = s.c_id; - QUERY PLAN -------------------- - Foreign Scan on d -(1 row) - --- similarly, but keying off a DISTINCT clause ---Testcase 368: -explain (costs off) -select d.* from d left join (select distinct * from b) s - on d.a = s.id and d.b = s.c_id; - QUERY PLAN -------------------- - Foreign Scan on d -(1 row) - --- join removal is not possible when the GROUP BY contains a column that is --- not in the join condition. (Note: as of 9.6, we notice that b.id is a --- primary key and so drop b.c_id from the GROUP BY of the resulting plan; --- but this happens too late for join removal in the outer plan level.) ---Testcase 369: -explain (costs off) -select d.* from d left join (select * from b group by b.id, b.c_id) s - on d.a = s.id; - QUERY PLAN ---------------------------------------------- - Hash Left Join - Hash Cond: (d.a = s.id) - -> Foreign Scan on d - -> Hash - -> Subquery Scan on s - -> HashAggregate - Group Key: b.id, b.c_id - -> Foreign Scan on b -(8 rows) - --- similarly, but keying off a DISTINCT clause ---Testcase 370: -explain (costs off) -select d.* from d left join (select distinct * from b) s - on d.a = s.id; - QUERY PLAN ---------------------------------------------- - Hash Left Join - Hash Cond: (d.a = s.id) - -> Foreign Scan on d - -> Hash - -> Subquery Scan on s - -> HashAggregate - Group Key: b.id, b.c_id - -> Foreign Scan on b -(8 rows) - --- check join removal works when uniqueness of the join condition is enforced --- by a UNION ---Testcase 371: -explain (costs off) -select d.* from d left join (select id from a union select id from b) s - on d.a = s.id; - QUERY PLAN -------------------- - Foreign Scan on d -(1 row) - --- check join removal with a cross-type comparison operator ---Testcase 372: -explain (costs off) -select i8.* from int8_tbl i8 left join (select f1 from int4_tbl group by f1) i4 - on i8.q1 = i4.f1; - QUERY PLAN ------------------------------ - Foreign Scan on int8_tbl i8 -(1 row) - --- check join removal with lateral references ---Testcase 373: -explain (costs off) -select 1 from (select a.id FROM a left join b on a.b_id = b.id) q, - lateral generate_series(1, q.id) gs(i) where q.id = gs.i; - QUERY PLAN -------------------------------------------------------- - Merge Right Join - Merge Cond: (b.id = a.b_id) - -> Sort - Sort Key: b.id - -> Foreign Scan on b - -> Sort - Sort Key: a.b_id - -> Nested Loop - -> Foreign Scan on a - -> Function Scan on generate_series gs - Filter: (a.id = i) -(11 rows) - ---Testcase 374: -DELETE FROM a; ---Testcase 375: -DELETE FROM b; ---Testcase 376: -DELETE FROM c; ---Testcase 377: -DELETE FROM d; ---Testcase 378: -DROP FOREIGN TABLE a; ---Testcase 379: -DROP FOREIGN TABLE b; ---Testcase 380: -DROP FOREIGN TABLE c; ---Testcase 381: -DROP FOREIGN TABLE d; -rollback; ---Testcase 382: -create foreign table parent (k int, pd int) server influxdb_svr; ---Testcase 383: -create foreign table child (k int, cd int) server influxdb_svr; ---Testcase 384: -insert into parent values (1, 10), (2, 20), (3, 30); ---Testcase 385: -insert into child values (1, 100), (4, 400); --- this case is optimizable ---Testcase 386: -select p.* from parent p left join child c on (p.k = c.k); - k | pd ----+---- - 1 | 10 - 2 | 20 - 3 | 30 -(3 rows) - ---Testcase 387: -explain (costs off) - select p.* from parent p left join child c on (p.k = c.k); - QUERY PLAN --------------------------------------- - Merge Left Join - Merge Cond: (p.k = c.k) - -> Sort - Sort Key: p.k - -> Foreign Scan on parent p - -> Sort - Sort Key: c.k - -> Foreign Scan on child c -(8 rows) - --- this case is not ---Testcase 388: -select p.*, linked from parent p - left join (select c.*, true as linked from child c) as ss - on (p.k = ss.k); - k | pd | linked ----+----+-------- - 1 | 10 | t - 2 | 20 | - 3 | 30 | -(3 rows) - ---Testcase 389: -explain (costs off) - select p.*, linked from parent p - left join (select c.*, true as linked from child c) as ss - on (p.k = ss.k); - QUERY PLAN --------------------------------------- - Merge Left Join - Merge Cond: (p.k = c.k) - -> Sort - Sort Key: p.k - -> Foreign Scan on parent p - -> Sort - Sort Key: c.k - -> Foreign Scan on child c -(8 rows) - --- check for a 9.0rc1 bug: join removal breaks pseudoconstant qual handling ---Testcase 390: -select p.* from - parent p left join child c on (p.k = c.k) - where p.k = 1 and p.k = 2; - k | pd ----+---- -(0 rows) - ---Testcase 391: -explain (costs off) -select p.* from - parent p left join child c on (p.k = c.k) - where p.k = 1 and p.k = 2; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - ---Testcase 392: -select p.* from - (parent p left join child c on (p.k = c.k)) join parent x on p.k = x.k - where p.k = 1 and p.k = 2; - k | pd ----+---- -(0 rows) - ---Testcase 393: -explain (costs off) -select p.* from - (parent p left join child c on (p.k = c.k)) join parent x on p.k = x.k - where p.k = 1 and p.k = 2; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - --- bug 5255: this is not optimizable by join removal -begin; ---Testcase 394: -CREATE FOREIGN TABLE a (id int) SERVER influxdb_svr; ---Testcase 395: -CREATE FOREIGN TABLE b (id int, a_id int) SERVER influxdb_svr; ---Testcase 396: -INSERT INTO a VALUES (0), (1); ---Testcase 397: -INSERT INTO b VALUES (0, 0), (1, NULL); ---Testcase 398: -SELECT * FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0); - id | a_id | id -----+------+---- - 1 | | -(1 row) - ---Testcase 399: -SELECT b.* FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0); - id | a_id -----+------ - 1 | -(1 row) - ---Testcase 400: -DELETE FROM a; ---Testcase 401: -DELETE FROM b; ---Testcase 402: -DROP FOREIGN TABLE a; ---Testcase 403: -DROP FOREIGN TABLE b; -rollback; --- another join removal bug: this is not optimizable, either -begin; ---Testcase 404: -create foreign table innertab (id int8, dat1 int8) server influxdb_svr; ---Testcase 405: -insert into innertab values(123, 42); ---Testcase 406: -SELECT * FROM - (SELECT 1 AS x) ss1 - LEFT JOIN - (SELECT q1, q2, COALESCE(dat1, q1) AS y - FROM int8_tbl LEFT JOIN innertab ON q2 = id) ss2 - ON true; - x | q1 | q2 | y ----+------------------+-------------------+------------------ - 1 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 1 | 4567890123456789 | 123 | 42 - 1 | 123 | 456 | 123 - 1 | 123 | 4567890123456789 | 123 - 1 | 4567890123456789 | 4567890123456789 | 4567890123456789 -(5 rows) - --- Clean up -DELETE FROM innertab; -DROP FOREIGN TABLE innertab; -rollback; --- another join removal bug: we must clean up correctly when removing a PHV -begin; ---Testcase 407: -create foreign table uniquetbl (f1 text) server influxdb_svr; ---Testcase 408: -explain (costs off) -select t1.* from - uniquetbl as t1 - left join (select *, '***'::text as d1 from uniquetbl) t2 - on t1.f1 = t2.f1 - left join uniquetbl t3 - on t2.d1 = t3.f1; - QUERY PLAN ---------------------------------------------------- - Merge Right Join - Merge Cond: (t3.f1 = ('***'::text)) - -> Sort - Sort Key: t3.f1 - -> Foreign Scan on uniquetbl t3 - -> Sort - Sort Key: ('***'::text) - -> Hash Left Join - Hash Cond: (t1.f1 = uniquetbl.f1) - -> Foreign Scan on uniquetbl t1 - -> Hash - -> Foreign Scan on uniquetbl -(12 rows) - ---Testcase 409: -explain (costs off) -select t0.* -from - text_tbl t0 - left join - (select case t1.ten when 0 then 'doh!'::text else null::text end as case1, - t1.stringu2 - from tenk1 t1 - join int4_tbl i4 ON i4.f1 = t1.unique2 - left join uniquetbl u1 ON u1.f1 = t1.string4) ss - on t0.f1 = ss.case1 -where ss.stringu2 !~* ss.case1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: (i4.f1 = t1.unique2) - -> Sort - Sort Key: i4.f1 - -> Foreign Scan on int4_tbl i4 - -> Sort - Sort Key: t1.unique2 - -> Merge Right Join - Merge Cond: (u1.f1 = ((t1.string4)::text)) - -> Sort - Sort Key: u1.f1 - -> Foreign Scan on uniquetbl u1 - -> Sort - Sort Key: ((t1.string4)::text) - -> Merge Join - Merge Cond: ((CASE t1.ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END) = t0.f1) - -> Sort - Sort Key: (CASE t1.ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END) - -> Foreign Scan on tenk1 t1 - Filter: (stringu2 !~* CASE ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END) - -> Sort - Sort Key: t0.f1 - -> Foreign Scan on text_tbl t0 -(23 rows) - ---Testcase 410: -select t0.* -from - text_tbl t0 - left join - (select case t1.ten when 0 then 'doh!'::text else null::text end as case1, - t1.stringu2 - from tenk1 t1 - join int4_tbl i4 ON i4.f1 = t1.unique2 - left join uniquetbl u1 ON u1.f1 = t1.string4) ss - on t0.f1 = ss.case1 -where ss.stringu2 !~* ss.case1; - f1 ------- - doh! -(1 row) - -rollback; --- test case to expose miscomputation of required relid set for a PHV ---Testcase 411: -explain (verbose, costs off) -select i8.*, ss.v, t.unique2 - from int8_tbl i8 - left join int4_tbl i4 on i4.f1 = 1 - left join lateral (select i4.f1 + 1 as v) as ss on true - left join tenk1 t on t.unique2 = ss.v -where q2 = 456; - QUERY PLAN --------------------------------------------------------------------------------------------- - Hash Left Join - Output: i8.q1, i8.q2, ((i4.f1 + 1)), t.unique2 - Hash Cond: (((i4.f1 + 1)) = t.unique2) - -> Nested Loop Left Join - Output: i8.q1, i8.q2, ((i4.f1 + 1)) - -> Nested Loop Left Join - Output: i8.q1, i8.q2, i4.f1 - -> Foreign Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (("q2" = 456)) - -> Materialize - Output: i4.f1 - -> Foreign Scan on public.int4_tbl i4 - Output: i4.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" WHERE (("f1" = 1)) - -> Result - Output: (i4.f1 + 1) - -> Hash - Output: t.unique2 - -> Foreign Scan on public.tenk1 t - Output: t.unique2 - InfluxDB query: SELECT "unique2" FROM "tenk" -(22 rows) - ---Testcase 412: -select i8.*, ss.v, t.unique2 - from int8_tbl i8 - left join int4_tbl i4 on i4.f1 = 1 - left join lateral (select i4.f1 + 1 as v) as ss on true - left join tenk1 t on t.unique2 = ss.v -where q2 = 456; - q1 | q2 | v | unique2 ------+-----+---+--------- - 123 | 456 | | -(1 row) - --- bug #8444: we've historically allowed duplicate aliases within aliased JOINs ---Testcase 413: -select * from - int8_tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = f1; -- error -ERROR: column reference "f1" is ambiguous -LINE 2: ..._tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = f1; - ^ ---Testcase 414: -select * from - int8_tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = y.f1; -- error -ERROR: invalid reference to FROM-clause entry for table "y" -LINE 2: ...bl x join (int4_tbl x cross join int4_tbl y) j on q1 = y.f1; - ^ -HINT: There is an entry for table "y", but it cannot be referenced from this part of the query. ---Testcase 415: -select * from - int8_tbl x join (int4_tbl x cross join int4_tbl y(ff)) j on q1 = f1; -- ok - q1 | q2 | f1 | ff -----+----+----+---- -(0 rows) - --- --- Test hints given on incorrect column references are useful --- ---Testcase 416: -select t1.uunique1 from - tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, prefer "t1" suggestion -ERROR: column t1.uunique1 does not exist -LINE 1: select t1.uunique1 from - ^ -HINT: Perhaps you meant to reference the column "t1.unique1". ---Testcase 417: -select t2.uunique1 from - tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, prefer "t2" suggestion -ERROR: column t2.uunique1 does not exist -LINE 1: select t2.uunique1 from - ^ -HINT: Perhaps you meant to reference the column "t2.unique1". ---Testcase 418: -select uunique1 from - tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, suggest both at once -ERROR: column "uunique1" does not exist -LINE 1: select uunique1 from - ^ -HINT: Perhaps you meant to reference the column "t1.unique1" or the column "t2.unique1". --- --- Take care to reference the correct RTE --- ---Testcase 556: -select atts.relid::regclass, s.* from pg_stats s join - pg_attribute a on s.attname = a.attname and s.tablename = - a.attrelid::regclass::text join (select unnest(indkey) attnum, - indexrelid from pg_index i) atts on atts.attnum = a.attnum where - schemaname != 'pg_catalog'; -ERROR: column atts.relid does not exist -LINE 1: select atts.relid::regclass, s.* from pg_stats s join - ^ --- --- Test LATERAL --- ---Testcase 419: -select unique2, x.* -from tenk1 a, lateral (select * from int4_tbl b where f1 = a.unique1) x; - unique2 | f1 ----------+---- - 9998 | 0 -(1 row) - ---Testcase 420: -explain (costs off) - select unique2, x.* - from tenk1 a, lateral (select * from int4_tbl b where f1 = a.unique1) x; - QUERY PLAN ----------------------------------------- - Merge Join - Merge Cond: (a.unique1 = b.f1) - -> Sort - Sort Key: a.unique1 - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: b.f1 - -> Foreign Scan on int4_tbl b -(8 rows) - ---Testcase 421: -select unique2, x.* -from int4_tbl x, lateral (select unique2 from tenk1 where f1 = unique1) ss; - unique2 | f1 ----------+---- - 9998 | 0 -(1 row) - ---Testcase 422: -explain (costs off) - select unique2, x.* - from int4_tbl x, lateral (select unique2 from tenk1 where f1 = unique1) ss; - QUERY PLAN ----------------------------------------- - Merge Join - Merge Cond: (tenk1.unique1 = x.f1) - -> Sort - Sort Key: tenk1.unique1 - -> Foreign Scan on tenk1 - -> Sort - Sort Key: x.f1 - -> Foreign Scan on int4_tbl x -(8 rows) - ---Testcase 423: -explain (costs off) - select unique2, x.* - from int4_tbl x cross join lateral (select unique2 from tenk1 where f1 = unique1) ss; - QUERY PLAN ----------------------------------------- - Merge Join - Merge Cond: (tenk1.unique1 = x.f1) - -> Sort - Sort Key: tenk1.unique1 - -> Foreign Scan on tenk1 - -> Sort - Sort Key: x.f1 - -> Foreign Scan on int4_tbl x -(8 rows) - ---Testcase 424: -select unique2, x.* -from int4_tbl x left join lateral (select unique1, unique2 from tenk1 where f1 = unique1) ss on true; - unique2 | f1 ----------+------------- - | -2147483647 - | -123456 - 9998 | 0 - | 123456 - | 2147483647 -(5 rows) - ---Testcase 425: -explain (costs off) - select unique2, x.* - from int4_tbl x left join lateral (select unique1, unique2 from tenk1 where f1 = unique1) ss on true; - QUERY PLAN ----------------------------------------- - Merge Right Join - Merge Cond: (tenk1.unique1 = x.f1) - -> Sort - Sort Key: tenk1.unique1 - -> Foreign Scan on tenk1 - -> Sort - Sort Key: x.f1 - -> Foreign Scan on int4_tbl x -(8 rows) - --- check scoping of lateral versus parent references --- the first of these should return int8_tbl.q2, the second int8_tbl.q1 ---Testcase 426: -select *, (select r from (select q1 as q2) x, (select q2 as r) y) from int8_tbl; - q1 | q2 | r -------------------+-------------------+------------------- - 123 | 456 | 456 - 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | -4567890123456789 -(5 rows) - ---Testcase 427: -select *, (select r from (select q1 as q2) x, lateral (select q2 as r) y) from int8_tbl; - q1 | q2 | r -------------------+-------------------+------------------ - 123 | 456 | 123 - 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 -(5 rows) - --- lateral with function in FROM ---Testcase 428: -select count(*) from tenk1 a, lateral generate_series(1,two) g; - count -------- - 5000 -(1 row) - ---Testcase 429: -explain (costs off) - select count(*) from tenk1 a, lateral generate_series(1,two) g; - QUERY PLAN ------------------------------------------------- - Aggregate - -> Nested Loop - -> Foreign Scan on tenk1 a - -> Function Scan on generate_series g -(4 rows) - ---Testcase 430: -explain (costs off) - select count(*) from tenk1 a cross join lateral generate_series(1,two) g; - QUERY PLAN ------------------------------------------------- - Aggregate - -> Nested Loop - -> Foreign Scan on tenk1 a - -> Function Scan on generate_series g -(4 rows) - --- don't need the explicit LATERAL keyword for functions ---Testcase 431: -explain (costs off) - select count(*) from tenk1 a, generate_series(1,two) g; - QUERY PLAN ------------------------------------------------- - Aggregate - -> Nested Loop - -> Foreign Scan on tenk1 a - -> Function Scan on generate_series g -(4 rows) - --- lateral with UNION ALL subselect ---Testcase 432: -explain (costs off) - select * from generate_series(100,200) g, - lateral (select * from int8_tbl a where g = q1 union all - select * from int8_tbl b where g = q2) ss; - QUERY PLAN ------------------------------------------- - Nested Loop - -> Function Scan on generate_series g - -> Append - -> Foreign Scan on int8_tbl a - -> Foreign Scan on int8_tbl b -(5 rows) - ---Testcase 433: -select * from generate_series(100,200) g, - lateral (select * from int8_tbl a where g = q1 union all - select * from int8_tbl b where g = q2) ss; - g | q1 | q2 ------+------------------+------------------ - 123 | 123 | 456 - 123 | 123 | 4567890123456789 - 123 | 4567890123456789 | 123 -(3 rows) - --- lateral with VALUES ---Testcase 434: -explain (costs off) - select count(*) from tenk1 a, - tenk1 b join lateral (values(a.unique1)) ss(x) on b.unique2 = ss.x; - QUERY PLAN ---------------------------------------------- - Aggregate - -> Merge Join - Merge Cond: (a.unique1 = b.unique2) - -> Sort - Sort Key: a.unique1 - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: b.unique2 - -> Foreign Scan on tenk1 b -(9 rows) - ---Testcase 435: -select count(*) from tenk1 a, - tenk1 b join lateral (values(a.unique1)) ss(x) on b.unique2 = ss.x; - count -------- - 10000 -(1 row) - --- lateral with VALUES, no flattening possible ---Testcase 436: -explain (costs off) - select count(*) from tenk1 a, - tenk1 b join lateral (values(a.unique1),(-1)) ss(x) on b.unique2 = ss.x; - QUERY PLAN ------------------------------------------------------- - Aggregate - -> Merge Join - Merge Cond: (b.unique2 = "*VALUES*".column1) - -> Sort - Sort Key: b.unique2 - -> Foreign Scan on tenk1 b - -> Sort - Sort Key: "*VALUES*".column1 - -> Nested Loop - -> Foreign Scan on tenk1 a - -> Values Scan on "*VALUES*" -(11 rows) - ---Testcase 437: -select count(*) from tenk1 a, - tenk1 b join lateral (values(a.unique1),(-1)) ss(x) on b.unique2 = ss.x; - count -------- - 10000 -(1 row) - --- lateral injecting a strange outer join condition ---Testcase 438: -explain (costs off) - select * from int8_tbl a, - int8_tbl x left join lateral (select a.q1 from int4_tbl y) ss(z) - on x.q2 = ss.z - order by a.q1, a.q2, x.q1, x.q2, ss.z; - QUERY PLAN ----------------------------------------------------- - Sort - Sort Key: a.q1, a.q2, x.q1, x.q2, (a.q1) - -> Nested Loop - -> Foreign Scan on int8_tbl a - -> Merge Left Join - Merge Cond: (x.q2 = (a.q1)) - -> Sort - Sort Key: x.q2 - -> Foreign Scan on int8_tbl x - -> Sort - Sort Key: (a.q1) - -> Foreign Scan on int4_tbl y -(12 rows) - ---Testcase 439: -select * from int8_tbl a, - int8_tbl x left join lateral (select a.q1 from int4_tbl y) ss(z) - on x.q2 = ss.z - order by a.q1, a.q2, x.q1, x.q2, ss.z; - q1 | q2 | q1 | q2 | z -------------------+-------------------+------------------+-------------------+------------------ - 123 | 456 | 123 | 456 | - 123 | 456 | 123 | 4567890123456789 | - 123 | 456 | 4567890123456789 | -4567890123456789 | - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 4567890123456789 | - 123 | 4567890123456789 | 123 | 456 | - 123 | 4567890123456789 | 123 | 4567890123456789 | - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | - 4567890123456789 | -4567890123456789 | 123 | 456 | - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | -4567890123456789 | - 4567890123456789 | -4567890123456789 | 4567890123456789 | 123 | - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | -4567890123456789 | - 4567890123456789 | 123 | 4567890123456789 | 123 | - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 456 | - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 -(57 rows) - --- lateral reference to a join alias variable ---Testcase 440: -select * from (select f1/2 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1, - lateral (select x) ss2(y); - x | f1 | y ----+----+--- - 0 | 0 | 0 -(1 row) - ---Testcase 441: -select * from (select f1 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1, - lateral (values(x)) ss2(y); - x | f1 | y --------------+-------------+------------- - -2147483647 | -2147483647 | -2147483647 - -123456 | -123456 | -123456 - 0 | 0 | 0 - 123456 | 123456 | 123456 - 2147483647 | 2147483647 | 2147483647 -(5 rows) - ---Testcase 442: -select * from ((select f1/2 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1) j, - lateral (select x) ss2(y); - x | f1 | y ----+----+--- - 0 | 0 | 0 -(1 row) - --- lateral references requiring pullup ---Testcase 443: -select * from (values(1)) x(lb), - lateral generate_series(lb,4) x4; - lb | x4 -----+---- - 1 | 1 - 1 | 2 - 1 | 3 - 1 | 4 -(4 rows) - ---Testcase 444: -select * from (select f1/1000000000 from int4_tbl) x(lb), - lateral generate_series(lb,4) x4; - lb | x4 -----+---- - 0 | 0 - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 0 - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 0 - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 2 | 2 - 2 | 3 - 2 | 4 - -2 | -2 - -2 | -1 - -2 | 0 - -2 | 1 - -2 | 2 - -2 | 3 - -2 | 4 -(25 rows) - ---Testcase 445: -select * from (values(1)) x(lb), - lateral (values(lb)) y(lbcopy); - lb | lbcopy -----+-------- - 1 | 1 -(1 row) - ---Testcase 446: -select * from (values(1)) x(lb), - lateral (select lb from int4_tbl) y(lbcopy); - lb | lbcopy -----+-------- - 1 | 1 - 1 | 1 - 1 | 1 - 1 | 1 - 1 | 1 -(5 rows) - ---Testcase 447: -select * from - int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (values(x.q1,y.q1,y.q2)) v(xq1,yq1,yq2); - q1 | q2 | q1 | q2 | xq1 | yq1 | yq2 -------------------+-------------------+------------------+-------------------+------------------+------------------+------------------- - 4567890123456789 | -4567890123456789 | | | 4567890123456789 | | - 4567890123456789 | 123 | 123 | 456 | 4567890123456789 | 123 | 456 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 123 | 456 | | | 123 | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 -(10 rows) - ---Testcase 448: -select * from - int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2); - q1 | q2 | q1 | q2 | xq1 | yq1 | yq2 -------------------+-------------------+------------------+-------------------+------------------+------------------+------------------- - 4567890123456789 | -4567890123456789 | | | 4567890123456789 | | - 4567890123456789 | 123 | 123 | 456 | 4567890123456789 | 123 | 456 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 123 | 456 | | | 123 | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 -(10 rows) - ---Testcase 449: -select x.* from - int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2); - q1 | q2 -------------------+------------------- - 4567890123456789 | -4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 123 - 123 | 456 - 123 | 4567890123456789 - 123 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(10 rows) - ---Testcase 450: -select v.* from - (int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1) - left join int4_tbl z on z.f1 = x.q2, - lateral (select x.q1,y.q1 union all select x.q2,y.q2) v(vx,vy); - vx | vy --------------------+------------------- - 4567890123456789 | - -4567890123456789 | - 4567890123456789 | 123 - 123 | 456 - 4567890123456789 | 123 - 123 | 4567890123456789 - 123 | - 456 | - 123 | 4567890123456789 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(20 rows) - ---Testcase 451: -select v.* from - (int8_tbl x left join (select q1,(select coalesce(q2,0)) q2 from int8_tbl) y on x.q2 = y.q1) - left join int4_tbl z on z.f1 = x.q2, - lateral (select x.q1,y.q1 union all select x.q2,y.q2) v(vx,vy); - vx | vy --------------------+------------------- - 4567890123456789 | - -4567890123456789 | - 4567890123456789 | 123 - 123 | 456 - 4567890123456789 | 123 - 123 | 4567890123456789 - 123 | - 456 | - 123 | 4567890123456789 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(20 rows) - ---Testcase 452: -select v.* from - (int8_tbl x left join (select q1,(select coalesce(q2,0)) q2 from int8_tbl) y on x.q2 = y.q1) - left join int4_tbl z on z.f1 = x.q2, - lateral (select x.q1,y.q1 from onerow union all select x.q2,y.q2 from onerow) v(vx,vy); - vx | vy --------------------+------------------- - 4567890123456789 | - -4567890123456789 | - 4567890123456789 | 123 - 123 | 456 - 4567890123456789 | 123 - 123 | 4567890123456789 - 123 | - 456 | - 123 | 4567890123456789 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(20 rows) - ---Testcase 453: -explain (verbose, costs off) -select * from - int8_tbl a left join - lateral (select *, a.q2 as x from int8_tbl b) ss on a.q2 = ss.q1; - QUERY PLAN -------------------------------------------------------------------------------- - Nested Loop Left Join - Output: a.q1, a.q2, b.q1, b.q2, (a.q2) - -> Foreign Scan on public.int8_tbl a - Output: a.q1, a.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Foreign Scan on public.int8_tbl b - Output: b.q1, b.q2, a.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (($1 = "q1")) -(8 rows) - ---Testcase 454: -select * from - int8_tbl a left join - lateral (select *, a.q2 as x from int8_tbl b) ss on a.q2 = ss.q1; - q1 | q2 | q1 | q2 | x -------------------+-------------------+------------------+-------------------+------------------ - 123 | 456 | | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | -(10 rows) - ---Testcase 455: -explain (verbose, costs off) -select * from - int8_tbl a left join - lateral (select *, coalesce(a.q2, 42) as x from int8_tbl b) ss on a.q2 = ss.q1; - QUERY PLAN -------------------------------------------------------------------------------- - Nested Loop Left Join - Output: a.q1, a.q2, b.q1, b.q2, (COALESCE(a.q2, '42'::bigint)) - -> Foreign Scan on public.int8_tbl a - Output: a.q1, a.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Foreign Scan on public.int8_tbl b - Output: b.q1, b.q2, COALESCE(a.q2, '42'::bigint) - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (($1 = "q1")) -(8 rows) - ---Testcase 456: -select * from - int8_tbl a left join - lateral (select *, coalesce(a.q2, 42) as x from int8_tbl b) ss on a.q2 = ss.q1; - q1 | q2 | q1 | q2 | x -------------------+-------------------+------------------+-------------------+------------------ - 123 | 456 | | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | -(10 rows) - --- lateral can result in join conditions appearing below their --- real semantic level ---Testcase 457: -explain (verbose, costs off) -select * from int4_tbl i left join - lateral (select * from int2_tbl j where i.f1 = j.f1) k on true; - QUERY PLAN ------------------------------------------------------------ - Merge Left Join - Output: i.f1, j.f1 - Merge Cond: (i.f1 = j.f1) - -> Sort - Output: i.f1 - Sort Key: i.f1 - -> Foreign Scan on public.int4_tbl i - Output: i.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Sort - Output: j.f1 - Sort Key: j.f1 - -> Foreign Scan on public.int2_tbl j - Output: j.f1 - InfluxDB query: SELECT "f1" FROM "int2_tbl" -(15 rows) - ---Testcase 458: -select * from int4_tbl i left join - lateral (select * from int2_tbl j where i.f1 = j.f1) k on true; - f1 | f1 --------------+---- - -2147483647 | - -123456 | - 0 | 0 - 123456 | - 2147483647 | -(5 rows) - ---Testcase 459: -explain (verbose, costs off) -select * from int4_tbl i left join - lateral (select coalesce(i) from int2_tbl j where i.f1 = j.f1) k on true; - QUERY PLAN -------------------------------------------------------------------------- - Nested Loop Left Join - Output: i.f1, (COALESCE(i.*)) - -> Foreign Scan on public.int4_tbl i - Output: i.f1, i.* - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Foreign Scan on public.int2_tbl j - Output: j.f1, COALESCE(i.*) - InfluxDB query: SELECT "f1" FROM "int2_tbl" WHERE (($1 = "f1")) -(8 rows) - ---Testcase 460: -select * from int4_tbl i left join - lateral (select coalesce(i) from int2_tbl j where i.f1 = j.f1) k on true; - f1 | coalesce --------------+---------- - 0 | (0) - 123456 | - -123456 | - 2147483647 | - -2147483647 | -(5 rows) - ---Testcase 461: -explain (verbose, costs off) -select * from int4_tbl a, - lateral ( - select * from int4_tbl b left join int8_tbl c on (b.f1 = q1 and a.f1 = q2) - ) ss; - QUERY PLAN -------------------------------------------------------------------------------------------- - Nested Loop - Output: a.f1, b.f1, c.q1, c.q2 - -> Foreign Scan on public.int4_tbl a - Output: a.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Hash Left Join - Output: b.f1, c.q1, c.q2 - Hash Cond: (b.f1 = c.q1) - -> Foreign Scan on public.int4_tbl b - Output: b.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Hash - Output: c.q1, c.q2 - -> Foreign Scan on public.int8_tbl c - Output: c.q1, c.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (($1 = "q2")) -(16 rows) - ---Testcase 462: -select * from int4_tbl a, - lateral ( - select * from int4_tbl b left join int8_tbl c on (b.f1 = q1 and a.f1 = q2) - ) ss; - f1 | f1 | q1 | q2 --------------+-------------+----+---- - 0 | 0 | | - 0 | 123456 | | - 0 | -123456 | | - 0 | 2147483647 | | - 0 | -2147483647 | | - 123456 | 0 | | - 123456 | 123456 | | - 123456 | -123456 | | - 123456 | 2147483647 | | - 123456 | -2147483647 | | - -123456 | 0 | | - -123456 | 123456 | | - -123456 | -123456 | | - -123456 | 2147483647 | | - -123456 | -2147483647 | | - 2147483647 | 0 | | - 2147483647 | 123456 | | - 2147483647 | -123456 | | - 2147483647 | 2147483647 | | - 2147483647 | -2147483647 | | - -2147483647 | 0 | | - -2147483647 | 123456 | | - -2147483647 | -123456 | | - -2147483647 | 2147483647 | | - -2147483647 | -2147483647 | | -(25 rows) - --- lateral reference in a PlaceHolderVar evaluated at join level ---Testcase 463: -explain (verbose, costs off) -select * from - int8_tbl a left join lateral - (select b.q1 as bq1, c.q1 as cq1, least(a.q1,b.q1,c.q1) from - int8_tbl b cross join int8_tbl c) ss - on a.q2 = ss.bq1; - QUERY PLAN -------------------------------------------------------------------------------- - Nested Loop Left Join - Output: a.q1, a.q2, b.q1, c.q1, (LEAST(a.q1, b.q1, c.q1)) - -> Foreign Scan on public.int8_tbl a - Output: a.q1, a.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Nested Loop - Output: b.q1, c.q1, LEAST(a.q1, b.q1, c.q1) - -> Foreign Scan on public.int8_tbl b - Output: b.q1, b.q2 - InfluxDB query: SELECT "q1" FROM "int8_tbl" WHERE (($1 = "q1")) - -> Materialize - Output: c.q1 - -> Foreign Scan on public.int8_tbl c - Output: c.q1 - InfluxDB query: SELECT "q1" FROM "int8_tbl" -(15 rows) - ---Testcase 464: -select * from - int8_tbl a left join lateral - (select b.q1 as bq1, c.q1 as cq1, least(a.q1,b.q1,c.q1) from - int8_tbl b cross join int8_tbl c) ss - on a.q2 = ss.bq1; - q1 | q2 | bq1 | cq1 | least -------------------+-------------------+------------------+------------------+------------------ - 123 | 456 | | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | -(42 rows) - --- case requiring nested PlaceHolderVars ---Testcase 465: -explain (verbose, costs off) -select * from - int8_tbl c left join ( - int8_tbl a left join (select q1, coalesce(q2,42) as x from int8_tbl b) ss1 - on a.q2 = ss1.q1 - cross join - lateral (select q1, coalesce(ss1.x,q2) as y from int8_tbl d) ss2 - ) on c.q2 = ss2.q1, - lateral (select ss2.y offset 0) ss3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: c.q1, c.q2, a.q1, a.q2, b.q1, (COALESCE(b.q2, '42'::bigint)), d.q1, (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)), ((COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2))) - -> Hash Right Join - Output: c.q1, c.q2, a.q1, a.q2, b.q1, d.q1, (COALESCE(b.q2, '42'::bigint)), (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)) - Hash Cond: (d.q1 = c.q2) - -> Nested Loop - Output: a.q1, a.q2, b.q1, d.q1, (COALESCE(b.q2, '42'::bigint)), (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)) - -> Merge Left Join - Output: a.q1, a.q2, b.q1, (COALESCE(b.q2, '42'::bigint)) - Merge Cond: (a.q2 = b.q1) - -> Sort - Output: a.q1, a.q2 - Sort Key: a.q2 - -> Foreign Scan on public.int8_tbl a - Output: a.q1, a.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Sort - Output: b.q1, (COALESCE(b.q2, '42'::bigint)) - Sort Key: b.q1 - -> Foreign Scan on public.int8_tbl b - Output: b.q1, COALESCE(b.q2, '42'::bigint) - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Foreign Scan on public.int8_tbl d - Output: d.q1, COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2) - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Hash - Output: c.q1, c.q2 - -> Foreign Scan on public.int8_tbl c - Output: c.q1, c.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Result - Output: (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)) -(32 rows) - --- case that breaks the old ph_may_need optimization ---Testcase 466: -explain (verbose, costs off) -select c.*,a.*,ss1.q1,ss2.q1,ss3.* from - int8_tbl c left join ( - int8_tbl a left join - (select q1, coalesce(q2,f1) as x from int8_tbl b, int4_tbl b2 - where q1 < f1) ss1 - on a.q2 = ss1.q1 - cross join - lateral (select q1, coalesce(ss1.x,q2) as y from int8_tbl d) ss2 - ) on c.q2 = ss2.q1, - lateral (select * from int4_tbl i where ss2.y > f1) ss3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Nested Loop - Output: c.q1, c.q2, a.q1, a.q2, b.q1, d.q1, i.f1 - Join Filter: ((COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2)) > i.f1) - -> Hash Right Join - Output: c.q1, c.q2, a.q1, a.q2, b.q1, d.q1, (COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2)) - Hash Cond: (d.q1 = c.q2) - -> Nested Loop - Output: a.q1, a.q2, b.q1, d.q1, (COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2)) - -> Merge Left Join - Output: a.q1, a.q2, b.q1, (COALESCE(b.q2, (b2.f1)::bigint)) - Merge Cond: (a.q2 = b.q1) - -> Sort - Output: a.q1, a.q2 - Sort Key: a.q2 - -> Foreign Scan on public.int8_tbl a - Output: a.q1, a.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Materialize - Output: b.q1, (COALESCE(b.q2, (b2.f1)::bigint)) - -> Sort - Output: b.q1, (COALESCE(b.q2, (b2.f1)::bigint)) - Sort Key: b.q1 - -> Nested Loop - Output: b.q1, COALESCE(b.q2, (b2.f1)::bigint) - Join Filter: (b.q1 < b2.f1) - -> Foreign Scan on public.int4_tbl b2 - Output: b2.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Materialize - Output: b.q1, b.q2 - -> Foreign Scan on public.int8_tbl b - Output: b.q1, b.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Foreign Scan on public.int8_tbl d - Output: d.q1, COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2) - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Hash - Output: c.q1, c.q2 - -> Foreign Scan on public.int8_tbl c - Output: c.q1, c.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Materialize - Output: i.f1 - -> Foreign Scan on public.int4_tbl i - Output: i.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" -(46 rows) - --- check processing of postponed quals (bug #9041) ---Testcase 467: -explain (verbose, costs off) -select * from - (select 1 as x offset 0) x cross join (select 2 as y offset 0) y - left join lateral ( - select * from (select 3 as z offset 0) z where z.z = x.x - ) zz on zz.z = y.y; - QUERY PLAN ----------------------------------------------- - Nested Loop Left Join - Output: (1), (2), (3) - Join Filter: (((3) = (1)) AND ((3) = (2))) - -> Nested Loop - Output: (1), (2) - -> Result - Output: 1 - -> Result - Output: 2 - -> Result - Output: 3 -(11 rows) - --- check dummy rels with lateral references (bug #15694) ---Testcase 468: -explain (verbose, costs off) -select * from int8_tbl i8 left join lateral - (select *, i8.q2 from int4_tbl where false) ss on true; - QUERY PLAN ------------------------------------------------------------ - Nested Loop Left Join - Output: i8.q1, i8.q2, f1, (i8.q2) - -> Foreign Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Result - Output: f1, i8.q2 - One-Time Filter: false -(8 rows) - ---Testcase 469: -explain (verbose, costs off) -select * from int8_tbl i8 left join lateral - (select *, i8.q2 from int4_tbl i1, int4_tbl i2 where false) ss on true; - QUERY PLAN ------------------------------------------------------------ - Nested Loop Left Join - Output: i8.q1, i8.q2, f1, f1, (i8.q2) - -> Foreign Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Result - Output: f1, f1, i8.q2 - One-Time Filter: false -(8 rows) - --- check handling of nested appendrels inside LATERAL ---Testcase 470: -select * from - ((select 2 as v) union all (select 3 as v)) as q1 - cross join lateral - ((select * from - ((select 4 as v) union all (select 5 as v)) as q3) - union all - (select q1.v) - ) as q2; - v | v ----+--- - 2 | 4 - 2 | 5 - 2 | 2 - 3 | 4 - 3 | 5 - 3 | 3 -(6 rows) - --- check we don't try to do a unique-ified semijoin with LATERAL ---Testcase 471: -explain (verbose, costs off) -select * from - (values (0,9998), (1,1000)) v(id,x), - lateral (select f1 from int4_tbl - where f1 = any (select unique1 from tenk1 - where unique2 = v.x offset 0)) ss; - QUERY PLAN -------------------------------------------------------------------------------------------- - Nested Loop - Output: "*VALUES*".column1, "*VALUES*".column2, int4_tbl.f1 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1, "*VALUES*".column2 - -> Hash Semi Join - Output: int4_tbl.f1 - Hash Cond: (int4_tbl.f1 = tenk1.unique1) - -> Foreign Scan on public.int4_tbl - Output: int4_tbl.f1 - InfluxDB query: SELECT "f1" FROM "int4_tbl" - -> Hash - Output: tenk1.unique1 - -> Foreign Scan on public.tenk1 - Output: tenk1.unique1 - InfluxDB query: SELECT "unique1" FROM "tenk" WHERE (("unique2" = $1)) -(15 rows) - ---Testcase 472: -select * from - (values (0,9998), (1,1000)) v(id,x), - lateral (select f1 from int4_tbl - where f1 = any (select unique1 from tenk1 - where unique2 = v.x offset 0)) ss; - id | x | f1 -----+------+---- - 0 | 9998 | 0 -(1 row) - --- check proper extParam/allParam handling (this isn't exactly a LATERAL issue, --- but we can make the test case much more compact with LATERAL) ---Testcase 473: -explain (verbose, costs off) -select * from (values (0), (1)) v(id), -lateral (select * from int8_tbl t1, - lateral (select * from - (select * from int8_tbl t2 - where q1 = any (select q2 from int8_tbl t3 - where q2 = (select greatest(t1.q1,t2.q2)) - and (select v.id=0)) offset 0) ss2) ss - where t1.q1 = ss.q2) ss0; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Nested Loop - Output: "*VALUES*".column1, t1.q1, t1.q2, ss2.q1, ss2.q2 - -> Foreign Scan on public.int8_tbl t1 - Output: t1.q1, t1.q2 - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - -> Nested Loop - Output: "*VALUES*".column1, ss2.q1, ss2.q2 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1 - -> Subquery Scan on ss2 - Output: ss2.q1, ss2.q2 - Filter: (t1.q1 = ss2.q2) - -> Foreign Scan on public.int8_tbl t2 - Output: t2.q1, t2.q2 - Filter: (SubPlan 3) - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - SubPlan 3 - -> Result - Output: t3.q2 - One-Time Filter: $4 - InitPlan 1 (returns $2) - -> Result - Output: GREATEST($0, t2.q2) - InitPlan 2 (returns $4) - -> Result - Output: ($3 = 0) - -> Foreign Scan on public.int8_tbl t3 - Output: t3.q1, t3.q2 - InfluxDB query: SELECT "q2" FROM "int8_tbl" WHERE (("q2" = $1)) -(29 rows) - ---Testcase 474: -select * from (values (0), (1)) v(id), -lateral (select * from int8_tbl t1, - lateral (select * from - (select * from int8_tbl t2 - where q1 = any (select q2 from int8_tbl t3 - where q2 = (select greatest(t1.q1,t2.q2)) - and (select v.id=0)) offset 0) ss2) ss - where t1.q1 = ss.q2) ss0; - id | q1 | q2 | q1 | q2 -----+------------------+-------------------+------------------+------------------ - 0 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 0 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 0 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 -(3 rows) - --- test some error cases where LATERAL should have been used but wasn't ---Testcase 475: -select f1,g from int4_tbl a, (select f1 as g) ss; -ERROR: column "f1" does not exist -LINE 1: select f1,g from int4_tbl a, (select f1 as g) ss; - ^ -HINT: There is a column named "f1" in table "a", but it cannot be referenced from this part of the query. ---Testcase 476: -select f1,g from int4_tbl a, (select a.f1 as g) ss; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: select f1,g from int4_tbl a, (select a.f1 as g) ss; - ^ -HINT: There is an entry for table "a", but it cannot be referenced from this part of the query. ---Testcase 477: -select f1,g from int4_tbl a cross join (select f1 as g) ss; -ERROR: column "f1" does not exist -LINE 1: select f1,g from int4_tbl a cross join (select f1 as g) ss; - ^ -HINT: There is a column named "f1" in table "a", but it cannot be referenced from this part of the query. ---Testcase 478: -select f1,g from int4_tbl a cross join (select a.f1 as g) ss; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: select f1,g from int4_tbl a cross join (select a.f1 as g) ss... - ^ -HINT: There is an entry for table "a", but it cannot be referenced from this part of the query. --- SQL:2008 says the left table is in scope but illegal to access here ---Testcase 479: -select f1,g from int4_tbl a right join lateral generate_series(0, a.f1) g on true; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: ... int4_tbl a right join lateral generate_series(0, a.f1) g on... - ^ -DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. ---Testcase 480: -select f1,g from int4_tbl a full join lateral generate_series(0, a.f1) g on true; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: ...m int4_tbl a full join lateral generate_series(0, a.f1) g on... - ^ -DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. --- check we complain about ambiguous table references ---Testcase 481: -select * from - int8_tbl x cross join (int4_tbl x cross join lateral (select x.f1) ss); -ERROR: table reference "x" is ambiguous -LINE 2: ...cross join (int4_tbl x cross join lateral (select x.f1) ss); - ^ --- LATERAL can be used to put an aggregate into the FROM clause of its query ---Testcase 482: -select 1 from tenk1 a, lateral (select max(a.unique1) from int4_tbl b) ss; -ERROR: aggregate functions are not allowed in FROM clause of their own query level -LINE 1: select 1 from tenk1 a, lateral (select max(a.unique1) from i... - ^ --- check behavior of LATERAL in UPDATE/DELETE ---Testcase 483: -create temp table xx1 as select f1 as x1, -f1 as x2 from int4_tbl; --- error, can't do this: ---Testcase 484: -update xx1 set x2 = f1 from (select * from int4_tbl where f1 = x1) ss; -ERROR: column "x1" does not exist -LINE 1: ... set x2 = f1 from (select * from int4_tbl where f1 = x1) ss; - ^ -HINT: There is a column named "x1" in table "xx1", but it cannot be referenced from this part of the query. ---Testcase 485: -update xx1 set x2 = f1 from (select * from int4_tbl where f1 = xx1.x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...t x2 = f1 from (select * from int4_tbl where f1 = xx1.x1) ss... - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. --- can't do it even with LATERAL: ---Testcase 486: -update xx1 set x2 = f1 from lateral (select * from int4_tbl where f1 = x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...= f1 from lateral (select * from int4_tbl where f1 = x1) ss; - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. --- we might in future allow something like this, but for now it's an error: ---Testcase 487: -update xx1 set x2 = f1 from xx1, lateral (select * from int4_tbl where f1 = x1) ss; -ERROR: table name "xx1" specified more than once --- also errors: ---Testcase 488: -delete from xx1 using (select * from int4_tbl where f1 = x1) ss; -ERROR: column "x1" does not exist -LINE 1: ...te from xx1 using (select * from int4_tbl where f1 = x1) ss; - ^ -HINT: There is a column named "x1" in table "xx1", but it cannot be referenced from this part of the query. ---Testcase 489: -delete from xx1 using (select * from int4_tbl where f1 = xx1.x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...from xx1 using (select * from int4_tbl where f1 = xx1.x1) ss... - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. ---Testcase 490: -delete from xx1 using lateral (select * from int4_tbl where f1 = x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...xx1 using lateral (select * from int4_tbl where f1 = x1) ss; - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. -/* --- Influx does not support partition table --- --- test LATERAL reference propagation down a multi-level inheritance hierarchy --- produced for a multi-level partitioned table hierarchy. --- -create table join_pt1 (a int, b int, c varchar) partition by range(a); -create table join_pt1p1 partition of join_pt1 for values from (0) to (100) partition by range(b); -create table join_pt1p2 partition of join_pt1 for values from (100) to (200); -create table join_pt1p1p1 partition of join_pt1p1 for values from (0) to (100); -insert into join_pt1 values (1, 1, 'x'), (101, 101, 'y'); -create table join_ut1 (a int, b int, c varchar); -insert into join_ut1 values (101, 101, 'y'), (2, 2, 'z'); -explain (verbose, costs off) -select t1.b, ss.phv from join_ut1 t1 left join lateral - (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv - from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss - on t1.a = ss.t2a order by t1.a; -select t1.b, ss.phv from join_ut1 t1 left join lateral - (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv - from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss - on t1.a = ss.t2a order by t1.a; - -drop table join_pt1; -drop table join_ut1; - --- --- test estimation behavior with multi-column foreign key and constant qual --- - -begin; - -create table fkest (x integer, x10 integer, x10b integer, x100 integer); -insert into fkest select x, x/10, x/10, x/100 from generate_series(1,1000) x; -create unique index on fkest(x, x10, x100); -analyze fkest; - -explain (costs off) -select * from fkest f1 - join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) - join fkest f3 on f1.x = f3.x - where f1.x100 = 2; - -alter table fkest add constraint fk - foreign key (x, x10b, x100) references fkest (x, x10, x100); - -explain (costs off) -select * from fkest f1 - join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) - join fkest f3 on f1.x = f3.x - where f1.x100 = 2; - -rollback; -*/ --- --- test that foreign key join estimation performs sanely for outer joins --- -begin; ---Testcase 491: -create foreign table fkest (a int, b int, c int) server influxdb_svr; ---Testcase 492: -create foreign table fkest1 (a int, b int) server influxdb_svr; ---Testcase 493: -insert into fkest select x/10, x%10, x from generate_series(1,1000) x; ---Testcase 494: -insert into fkest1 select x/10, x%10 from generate_series(1,1000) x; ---Testcase 495: -explain (costs off) -select * -from fkest f - left join fkest1 f1 on f.a = f1.a and f.b = f1.b - left join fkest1 f2 on f.a = f2.a and f.b = f2.b - left join fkest1 f3 on f.a = f3.a and f.b = f3.b -where f.c = 1; - QUERY PLAN ----------------------------------------------------------------------- - Hash Right Join - Hash Cond: ((f3.a = f.a) AND (f3.b = f.b)) - -> Foreign Scan on fkest1 f3 - -> Hash - -> Hash Right Join - Hash Cond: ((f2.a = f.a) AND (f2.b = f.b)) - -> Foreign Scan on fkest1 f2 - -> Hash - -> Hash Right Join - Hash Cond: ((f1.a = f.a) AND (f1.b = f.b)) - -> Foreign Scan on fkest1 f1 - -> Hash - -> Foreign Scan on fkest f -(13 rows) - -rollback; --- --- test planner's ability to mark joins as unique --- ---Testcase 496: -create foreign table j1 (id int) server influxdb_svr; ---Testcase 497: -create foreign table j2 (id int) server influxdb_svr; ---Testcase 498: -create foreign table j3 (id int) server influxdb_svr; ---Testcase 499: -insert into j1 values(1),(2),(3); ---Testcase 500: -insert into j2 values(1),(2),(3); ---Testcase 501: -insert into j3 values(1),(1); --- ensure join is properly marked as unique ---Testcase 502: -explain (verbose, costs off) -select * from j1 inner join j2 on j1.id = j2.id; - QUERY PLAN ------------------------------------------------------ - Merge Join - Output: j1.id, j2.id - Merge Cond: (j1.id = j2.id) - -> Sort - Output: j1.id - Sort Key: j1.id - -> Foreign Scan on public.j1 - Output: j1.id - InfluxDB query: SELECT "id" FROM "j1" - -> Sort - Output: j2.id - Sort Key: j2.id - -> Foreign Scan on public.j2 - Output: j2.id - InfluxDB query: SELECT "id" FROM "j2" -(15 rows) - --- ensure join is not unique when not an equi-join ---Testcase 503: -explain (verbose, costs off) -select * from j1 inner join j2 on j1.id > j2.id; - QUERY PLAN ------------------------------------------------------ - Nested Loop - Output: j1.id, j2.id - Join Filter: (j1.id > j2.id) - -> Foreign Scan on public.j1 - Output: j1.id - InfluxDB query: SELECT "id" FROM "j1" - -> Materialize - Output: j2.id - -> Foreign Scan on public.j2 - Output: j2.id - InfluxDB query: SELECT "id" FROM "j2" -(11 rows) - --- ensure non-unique rel is not chosen as inner ---Testcase 504: -explain (verbose, costs off) -select * from j1 inner join j3 on j1.id = j3.id; - QUERY PLAN ------------------------------------------------------ - Merge Join - Output: j1.id, j3.id - Merge Cond: (j1.id = j3.id) - -> Sort - Output: j1.id - Sort Key: j1.id - -> Foreign Scan on public.j1 - Output: j1.id - InfluxDB query: SELECT "id" FROM "j1" - -> Sort - Output: j3.id - Sort Key: j3.id - -> Foreign Scan on public.j3 - Output: j3.id - InfluxDB query: SELECT "id" FROM "j3" -(15 rows) - --- ensure left join is marked as unique ---Testcase 505: -explain (verbose, costs off) -select * from j1 left join j2 on j1.id = j2.id; - QUERY PLAN ------------------------------------------------------ - Merge Left Join - Output: j1.id, j2.id - Merge Cond: (j1.id = j2.id) - -> Sort - Output: j1.id - Sort Key: j1.id - -> Foreign Scan on public.j1 - Output: j1.id - InfluxDB query: SELECT "id" FROM "j1" - -> Sort - Output: j2.id - Sort Key: j2.id - -> Foreign Scan on public.j2 - Output: j2.id - InfluxDB query: SELECT "id" FROM "j2" -(15 rows) - --- ensure right join is marked as unique ---Testcase 506: -explain (verbose, costs off) -select * from j1 right join j2 on j1.id = j2.id; - QUERY PLAN ------------------------------------------------------ - Merge Left Join - Output: j1.id, j2.id - Merge Cond: (j2.id = j1.id) - -> Sort - Output: j2.id - Sort Key: j2.id - -> Foreign Scan on public.j2 - Output: j2.id - InfluxDB query: SELECT "id" FROM "j2" - -> Sort - Output: j1.id - Sort Key: j1.id - -> Foreign Scan on public.j1 - Output: j1.id - InfluxDB query: SELECT "id" FROM "j1" -(15 rows) - --- ensure full join is marked as unique ---Testcase 507: -explain (verbose, costs off) -select * from j1 full join j2 on j1.id = j2.id; - QUERY PLAN ------------------------------------------------------ - Merge Full Join - Output: j1.id, j2.id - Merge Cond: (j1.id = j2.id) - -> Sort - Output: j1.id - Sort Key: j1.id - -> Foreign Scan on public.j1 - Output: j1.id - InfluxDB query: SELECT "id" FROM "j1" - -> Sort - Output: j2.id - Sort Key: j2.id - -> Foreign Scan on public.j2 - Output: j2.id - InfluxDB query: SELECT "id" FROM "j2" -(15 rows) - --- a clauseless (cross) join can't be unique ---Testcase 508: -explain (verbose, costs off) -select * from j1 cross join j2; - QUERY PLAN ------------------------------------------------------ - Nested Loop - Output: j1.id, j2.id - -> Foreign Scan on public.j1 - Output: j1.id - InfluxDB query: SELECT "id" FROM "j1" - -> Materialize - Output: j2.id - -> Foreign Scan on public.j2 - Output: j2.id - InfluxDB query: SELECT "id" FROM "j2" -(10 rows) - --- ensure a natural join is marked as unique ---Testcase 509: -explain (verbose, costs off) -select * from j1 natural join j2; - QUERY PLAN ------------------------------------------------------ - Merge Join - Output: j1.id - Merge Cond: (j1.id = j2.id) - -> Sort - Output: j1.id - Sort Key: j1.id - -> Foreign Scan on public.j1 - Output: j1.id - InfluxDB query: SELECT "id" FROM "j1" - -> Sort - Output: j2.id - Sort Key: j2.id - -> Foreign Scan on public.j2 - Output: j2.id - InfluxDB query: SELECT "id" FROM "j2" -(15 rows) - --- ensure a distinct clause allows the inner to become unique ---Testcase 510: -explain (verbose, costs off) -select * from j1 -inner join (select distinct id from j3) j3 on j1.id = j3.id; - QUERY PLAN ------------------------------------------------------------ - Hash Join - Output: j1.id, j3.id - Inner Unique: true - Hash Cond: (j1.id = j3.id) - -> Foreign Scan on public.j1 - Output: j1.id - InfluxDB query: SELECT "id" FROM "j1" - -> Hash - Output: j3.id - -> HashAggregate - Output: j3.id - Group Key: j3.id - -> Foreign Scan on public.j3 - Output: j3.id - InfluxDB query: SELECT "id" FROM "j3" -(15 rows) - --- ensure group by clause allows the inner to become unique ---Testcase 511: -explain (verbose, costs off) -select * from j1 -inner join (select id from j3 group by id) j3 on j1.id = j3.id; - QUERY PLAN ------------------------------------------------------------ - Hash Join - Output: j1.id, j3.id - Inner Unique: true - Hash Cond: (j1.id = j3.id) - -> Foreign Scan on public.j1 - Output: j1.id - InfluxDB query: SELECT "id" FROM "j1" - -> Hash - Output: j3.id - -> HashAggregate - Output: j3.id - Group Key: j3.id - -> Foreign Scan on public.j3 - Output: j3.id - InfluxDB query: SELECT "id" FROM "j3" -(15 rows) - ---Testcase 512: -delete from j1; ---Testcase 513: -delete from j2; ---Testcase 514: -delete from j3; ---Testcase 515: -drop foreign table j1; ---Testcase 516: -drop foreign table j2; ---Testcase 517: -drop foreign table j3; --- test more complex permutations of unique joins ---Testcase 518: -create foreign table j1 (id1 int, id2 int) server influxdb_svr; ---Testcase 519: -create foreign table j2 (id1 int, id2 int) server influxdb_svr; ---Testcase 520: -create foreign table j3 (id1 int, id2 int) server influxdb_svr; ---Testcase 521: -insert into j1 values(1,1),(1,2); ---Testcase 522: -insert into j2 values(1,1); ---Testcase 523: -insert into j3 values(1,1); --- ensure there's no unique join when not all columns which are part of the --- unique index are seen in the join clause ---Testcase 524: -explain (verbose, costs off) -select * from j1 -inner join j2 on j1.id1 = j2.id1; - QUERY PLAN -------------------------------------------------------------- - Merge Join - Output: j1.id1, j1.id2, j2.id1, j2.id2 - Merge Cond: (j1.id1 = j2.id1) - -> Sort - Output: j1.id1, j1.id2 - Sort Key: j1.id1 - -> Foreign Scan on public.j1 - Output: j1.id1, j1.id2 - InfluxDB query: SELECT "id1", "id2" FROM "j1" - -> Sort - Output: j2.id1, j2.id2 - Sort Key: j2.id1 - -> Foreign Scan on public.j2 - Output: j2.id1, j2.id2 - InfluxDB query: SELECT "id1", "id2" FROM "j2" -(15 rows) - --- ensure proper unique detection with multiple join quals ---Testcase 525: -explain (verbose, costs off) -select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2; - QUERY PLAN -------------------------------------------------------------- - Merge Join - Output: j1.id1, j1.id2, j2.id1, j2.id2 - Merge Cond: ((j1.id1 = j2.id1) AND (j1.id2 = j2.id2)) - -> Sort - Output: j1.id1, j1.id2 - Sort Key: j1.id1, j1.id2 - -> Foreign Scan on public.j1 - Output: j1.id1, j1.id2 - InfluxDB query: SELECT "id1", "id2" FROM "j1" - -> Sort - Output: j2.id1, j2.id2 - Sort Key: j2.id1, j2.id2 - -> Foreign Scan on public.j2 - Output: j2.id1, j2.id2 - InfluxDB query: SELECT "id1", "id2" FROM "j2" -(15 rows) - --- ensure we don't detect the join to be unique when quals are not part of the --- join condition ---Testcase 526: -explain (verbose, costs off) -select * from j1 -inner join j2 on j1.id1 = j2.id1 where j1.id2 = 1; - QUERY PLAN ---------------------------------------------------------------------------------- - Hash Join - Output: j1.id1, j1.id2, j2.id1, j2.id2 - Hash Cond: (j2.id1 = j1.id1) - -> Foreign Scan on public.j2 - Output: j2.id1, j2.id2 - InfluxDB query: SELECT "id1", "id2" FROM "j2" - -> Hash - Output: j1.id1, j1.id2 - -> Foreign Scan on public.j1 - Output: j1.id1, j1.id2 - InfluxDB query: SELECT "id1", "id2" FROM "j1" WHERE (("id2" = 1)) -(11 rows) - --- as above, but for left joins. ---Testcase 527: -explain (verbose, costs off) -select * from j1 -left join j2 on j1.id1 = j2.id1 where j1.id2 = 1; - QUERY PLAN ---------------------------------------------------------------------------------- - Hash Right Join - Output: j1.id1, j1.id2, j2.id1, j2.id2 - Hash Cond: (j2.id1 = j1.id1) - -> Foreign Scan on public.j2 - Output: j2.id1, j2.id2 - InfluxDB query: SELECT "id1", "id2" FROM "j2" - -> Hash - Output: j1.id1, j1.id2 - -> Foreign Scan on public.j1 - Output: j1.id1, j1.id2 - InfluxDB query: SELECT "id1", "id2" FROM "j1" WHERE (("id2" = 1)) -(11 rows) - --- validate logic in merge joins which skips mark and restore. --- it should only do this if all quals which were used to detect the unique --- are present as join quals, and not plain quals. ---Testcase 528: -set enable_nestloop to 0; ---Testcase 529: -set enable_hashjoin to 0; ---Testcase 530: -set enable_sort to 0; --- create indexes that will be preferred over the PKs to perform the join ---create index j1_id1_idx on j1 (id1) where id1 % 1000 = 1; ---create index j2_id1_idx on j2 (id1) where id1 % 1000 = 1; --- need an additional row in j2, if we want j2_id1_idx to be preferred ---Testcase 531: -insert into j2 values(1,2); ---analyze j2; ---Testcase 532: -explain (costs off) select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1; - QUERY PLAN ----------------------------------------------------------- - Nested Loop - Join Filter: ((j1.id1 = j2.id1) AND (j1.id2 = j2.id2)) - -> Foreign Scan on j1 - -> Materialize - -> Foreign Scan on j2 -(5 rows) - ---Testcase 533: -select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1; - id1 | id2 | id1 | id2 ------+-----+-----+----- - 1 | 1 | 1 | 1 - 1 | 2 | 1 | 2 -(2 rows) - --- Exercise array keys mark/restore B-Tree code ---Testcase 534: -explain (costs off) select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 = any (array[1]); - QUERY PLAN ----------------------------------------------------------- - Nested Loop - Join Filter: ((j1.id1 = j2.id1) AND (j1.id2 = j2.id2)) - -> Foreign Scan on j1 - -> Materialize - -> Foreign Scan on j2 -(5 rows) - ---Testcase 535: -select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 = any (array[1]); - id1 | id2 | id1 | id2 ------+-----+-----+----- - 1 | 1 | 1 | 1 - 1 | 2 | 1 | 2 -(2 rows) - --- Exercise array keys "find extreme element" B-Tree code ---Testcase 536: -explain (costs off) select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 >= any (array[1,5]); - QUERY PLAN ----------------------------------------------------------- - Nested Loop - Join Filter: ((j1.id1 = j2.id1) AND (j1.id2 = j2.id2)) - -> Foreign Scan on j1 - -> Materialize - -> Foreign Scan on j2 -(5 rows) - ---Testcase 537: -select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 >= any (array[1,5]); - id1 | id2 | id1 | id2 ------+-----+-----+----- - 1 | 1 | 1 | 1 - 1 | 2 | 1 | 2 -(2 rows) - ---Testcase 538: -reset enable_nestloop; ---Testcase 539: -reset enable_hashjoin; ---Testcase 540: -reset enable_sort; ---Testcase 541: -delete from j1; ---Testcase 542: -delete from j2; ---Testcase 543: -delete from j3; ---Testcase 544: -drop foreign table j1; ---Testcase 545: -drop foreign table j2; ---Testcase 546: -drop foreign table j3; --- check that semijoin inner is not seen as unique for a portion of the outerrel ---Testcase 547: -CREATE FOREIGN TABLE onek ( - unique1 int4, - unique2 int4, - two int4, - four int4, - ten int4, - twenty int4, - hundred int4, - thousand int4, - twothousand int4, - fivethous int4, - tenthous int4, - odd int4, - even int4, - stringu1 name, - stringu2 name, - string4 name -) SERVER influxdb_svr; --- check that semijoin inner is not seen as unique for a portion of the outerrel ---Testcase 548: -explain (verbose, costs off) -select t1.unique1, t2.hundred -from onek t1, tenk1 t2 -where exists (select 1 from tenk1 t3 - where t3.thousand = t1.unique1 and t3.tenthous = t2.hundred) - and t1.unique1 < 1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Hash Join - Output: t1.unique1, t2.hundred - Hash Cond: (t2.hundred = t3.tenthous) - -> Foreign Scan on public.tenk1 t2 - Output: t2.unique1, t2.unique2, t2.two, t2.four, t2.ten, t2.twenty, t2.hundred, t2.thousand, t2.twothousand, t2.fivethous, t2.tenthous, t2.odd, t2.even, t2.stringu1, t2.stringu2, t2.string4 - InfluxDB query: SELECT "hundred" FROM "tenk" - -> Hash - Output: t1.unique1, t3.tenthous - -> Hash Join - Output: t1.unique1, t3.tenthous - Hash Cond: (t1.unique1 = t3.thousand) - -> Foreign Scan on public.onek t1 - Output: t1.unique1, t1.unique2, t1.two, t1.four, t1.ten, t1.twenty, t1.hundred, t1.thousand, t1.twothousand, t1.fivethous, t1.tenthous, t1.odd, t1.even, t1.stringu1, t1.stringu2, t1.string4 - InfluxDB query: SELECT "unique1" FROM "onek" WHERE (("unique1" < 1)) - -> Hash - Output: t3.thousand, t3.tenthous - -> HashAggregate - Output: t3.thousand, t3.tenthous - Group Key: t3.thousand, t3.tenthous - -> Foreign Scan on public.tenk1 t3 - Output: t3.thousand, t3.tenthous - InfluxDB query: SELECT "thousand", "tenthous" FROM "tenk" -(22 rows) - --- ... unless it actually is unique ---Testcase 549: -create table j3 as select unique1, tenthous from onek; -vacuum analyze j3; ---Testcase 550: -create unique index on j3(unique1, tenthous); ---Testcase 551: -explain (verbose, costs off) -select t1.unique1, t2.hundred -from onek t1, tenk1 t2 -where exists (select 1 from j3 - where j3.unique1 = t1.unique1 and j3.tenthous = t2.hundred) - and t1.unique1 < 1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Hash Join - Output: t1.unique1, t2.hundred - Hash Cond: (t2.hundred = j3.tenthous) - -> Foreign Scan on public.tenk1 t2 - Output: t2.unique1, t2.unique2, t2.two, t2.four, t2.ten, t2.twenty, t2.hundred, t2.thousand, t2.twothousand, t2.fivethous, t2.tenthous, t2.odd, t2.even, t2.stringu1, t2.stringu2, t2.string4 - InfluxDB query: SELECT "hundred" FROM "tenk" - -> Hash - Output: t1.unique1, j3.tenthous - -> Hash Join - Output: t1.unique1, j3.tenthous - Hash Cond: (t1.unique1 = j3.unique1) - -> Foreign Scan on public.onek t1 - Output: t1.unique1, t1.unique2, t1.two, t1.four, t1.ten, t1.twenty, t1.hundred, t1.thousand, t1.twothousand, t1.fivethous, t1.tenthous, t1.odd, t1.even, t1.stringu1, t1.stringu2, t1.string4 - InfluxDB query: SELECT "unique1" FROM "onek" WHERE (("unique1" < 1)) - -> Hash - Output: j3.unique1, j3.tenthous - -> Seq Scan on public.j3 - Output: j3.unique1, j3.tenthous -(18 rows) - ---Testcase 552: -drop table j3; --- Clean up -DELETE FROM t1; -DELETE FROM t2; -DELETE FROM t3; -DELETE FROM tt1; -DELETE FROM tt2; -DELETE FROM tt3; -DELETE FROM tt4; -DELETE FROM tt5; -DELETE FROM tt6; -DELETE FROM xx; -DELETE FROM yy; -DELETE FROM zt1; -DELETE FROM zt2; -DELETE FROM nt1; -DELETE FROM nt2; -DELETE FROM nt3; -DELETE FROM parent; -DELETE FROM child; -DO $d$ -declare - l_rec record; -begin - for l_rec in (select foreign_table_schema, foreign_table_name - from information_schema.foreign_tables) loop - execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); - end loop; -end; -$d$; -NOTICE: drop cascades to table t2a -NOTICE: drop cascades to view zv1 ---Testcase 553: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 554: -DROP SERVER influxdb_svr CASCADE; ---Testcase 555: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/10.18/influxdb_fdw.out b/expected/10.18/influxdb_fdw.out deleted file mode 100644 index 478c348..0000000 --- a/expected/10.18/influxdb_fdw.out +++ /dev/null @@ -1,1607 +0,0 @@ ---SET log_min_messages=debug1; ---SET client_min_messages=debug1; ---Testcase 1: -SET datestyle=ISO; --- timestamp with time zone differs based on this ---Testcase 2: -SET timezone='Japan'; -\set ECHO none ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- import time column as timestamp and text type -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); ---Testcase 6: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+----------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | | tag2_A | | 2 | | -(3 rows) - ---Testcase 7: -SELECT tag1, value1 FROM cpu; - tag1 | value1 ---------+-------- - tag1_A | 100 - tag1_B | 100 -(2 rows) - ---Testcase 8: -SELECT value1, time, value2 FROM cpu; - value1 | time | value2 ---------+------------------------+-------- - 100 | 2015-08-18 09:00:00+09 | 0.5 - 100 | 2015-08-18 09:00:00+09 | 2 - | 2015-08-18 09:48:08+09 | 2 -(3 rows) - ---Testcase 9: -SELECT value1, time_text, value2 FROM cpu; - value1 | time_text | value2 ---------+----------------------+-------- - 100 | 2015-08-18T00:00:00Z | 0.5 - 100 | 2015-08-18T00:00:00Z | 2 - | 2015-08-18T00:48:08Z | 2 -(3 rows) - ---Testcase 10: -DROP FOREIGN TABLE cpu; ---Testcase 11: -DROP FOREIGN TABLE t3; ---Testcase 12: -DROP FOREIGN TABLE t4; ---Testcase 13: -DROP FOREIGN TABLE tx; ---Testcase 14: -DROP FOREIGN TABLE numbers; --- test EXECPT -IMPORT FOREIGN SCHEMA public EXCEPT (cpu, t3, t4, tx, numbers) FROM SERVER server1 INTO public; ---Testcase 15: -SELECT ftoptions FROM pg_foreign_table; - ftoptions ------------ -(0 rows) - --- test LIMIT TO -IMPORT FOREIGN SCHEMA public LIMIT TO (cpu) FROM SERVER server1 INTO public; ---Testcase 16: -SELECT ftoptions FROM pg_foreign_table; - ftoptions ------------------------------- - {table=cpu,"tags=tag1,tag2"} -(1 row) - ---Testcase 17: -DROP FOREIGN TABLE cpu; -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); ---Testcase 18: -SELECT * FROM cpu; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f - 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | -(3 rows) - ---Testcase 19: -SELECT tag1, value1 FROM cpu; - tag1 | value1 ---------+-------- - tag1_A | 100 - tag1_B | 100 -(2 rows) - ---Testcase 20: -SELECT value1, time, value2 FROM cpu; - value1 | time | value2 ---------+------------------------+-------- - 100 | 2015-08-18 09:00:00+09 | 0.5 - 100 | 2015-08-18 09:00:00+09 | 2 - | 2015-08-18 09:48:08+09 | 2 -(3 rows) - ---Testcase 21: -SELECT tag1 FROM cpu; - tag1 --------- - tag1_A - tag1_B -(2 rows) - ---Testcase 22: -SELECT * FROM numbers; - time | tag1 | a | b -------------------------+------+---+----- - 1970-01-01 09:00:00+09 | a | 1 | One - 1970-01-01 09:00:01+09 | a | 2 | Two -(2 rows) - ---Testcase 23: -\d cpu; - Foreign table "public.cpu" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - tag1 | text | | | | - tag2 | text | | | | - value1 | bigint | | | | - value2 | double precision | | | | - value3 | text | | | | - value4 | boolean | | | | -Server: server1 -FDW options: ("table" 'cpu', tags 'tag1,tag2') - ---Testcase 24: -SELECT * FROM cpu WHERE value1=100; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(2 rows) - ---Testcase 25: -SELECT * FROM cpu WHERE value2=0.5; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t -(1 row) - ---Testcase 26: -SELECT * FROM cpu WHERE value3='str'; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t -(1 row) - ---Testcase 27: -SELECT * FROM cpu WHERE value4=true; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t -(1 row) - ---Testcase 28: -SELECT * FROM cpu WHERE NOT (value4 AND value1=100); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(1 row) - ---Testcase 29: -SELECT * FROM cpu WHERE tag1='tag1_A'; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t -(1 row) - ---Testcase 30: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE value3 IS NULL; - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.cpu - Output: "time", tag1, tag2, value1, value2, value3, value4 - Filter: (cpu.value3 IS NULL) - InfluxDB query: SELECT "tag1", "tag2", "value1", "value2", "value3", "value4" FROM "cpu" -(4 rows) - ---Testcase 31: -SELECT * FROM cpu WHERE value3 IS NULL; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f - 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | -(2 rows) - ---Testcase 32: -SELECT * FROM cpu WHERE tag2 IS NULL; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(1 row) - ---Testcase 33: -SELECT * FROM cpu WHERE value3 IS NOT NULL; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t -(1 row) - ---Testcase 34: -SELECT * FROM cpu WHERE tag2 IS NOT NULL; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | -(2 rows) - --- InfluxDB not support compare timestamp with OR condition ---Testcase 35: -SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR value2 = 0.5; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | -(2 rows) - --- InfluxDB not support compare timestamp with != or <> ---Testcase 36: -SELECT * FROM cpu WHERE time != '2015-08-18 09:48:08+09'; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(2 rows) - ---Testcase 37: -SELECT * FROM cpu WHERE time <> '2015-08-18 09:48:08+09'; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(2 rows) - ---Testcase 38: -SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR value2 = 0.5; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | -(2 rows) - --- There is inconsitency for search of missing values between tag and field ---Testcase 39: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE value3 = ''; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.cpu - Output: "time", tag1, tag2, value1, value2, value3, value4 - InfluxDB query: SELECT "tag1", "tag2", "value1", "value2", "value3", "value4" FROM "cpu" WHERE (("value3" = '')) -(3 rows) - ---Testcase 40: -SELECT * FROM cpu WHERE value3 = ''; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------+------+------+--------+--------+--------+-------- -(0 rows) - ---Testcase 41: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE tag2 = ''; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.cpu - Output: "time", tag1, tag2, value1, value2, value3, value4 - InfluxDB query: SELECT "tag1", "tag2", "value1", "value2", "value3", "value4" FROM "cpu" WHERE (("tag2" = '')) -(3 rows) - ---Testcase 42: -SELECT * FROM cpu WHERE tag2 = ''; - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(1 row) - ---Testcase 43: -SELECT * FROM cpu WHERE tag1 IN ('tag1_A', 'tag1_B'); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(2 rows) - ---Testcase 44: -EXPLAIN VERBOSE -SELECT * FROM cpu WHERE tag1 IN ('tag1_A', 'tag1_B'); - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.cpu (cost=10.00..6.00 rows=6 width=121) - Output: "time", tag1, tag2, value1, value2, value3, value4 - InfluxDB query: SELECT "tag1", "tag2", "value1", "value2", "value3", "value4" FROM "cpu" WHERE ("tag1" = 'tag1_A' OR "tag1" = 'tag1_B') -(3 rows) - --- Rows which have no tag are considered to have empty string ---Testcase 45: -SELECT * FROM cpu WHERE tag1 NOT IN ('tag1_A', 'tag1_B'); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+--------+-------- - 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | -(1 row) - ---Testcase 46: -EXPLAIN VERBOSE -SELECT * FROM cpu WHERE tag1 NOT IN ('tag1_A', 'tag1_B'); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.cpu (cost=10.00..558.00 rows=558 width=121) - Output: "time", tag1, tag2, value1, value2, value3, value4 - InfluxDB query: SELECT "tag1", "tag2", "value1", "value2", "value3", "value4" FROM "cpu" WHERE ("tag1" <> 'tag1_A' AND "tag1" <> 'tag1_B') -(3 rows) - --- test IN/NOT IN ---Testcase 47: -SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+--------+-------- - 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | -(1 row) - ---Testcase 48: -SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(2 rows) - ---Testcase 49: -SELECT * FROM cpu WHERE value1 NOT IN (100, 97); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------+------+------+--------+--------+--------+-------- -(0 rows) - ---Testcase 50: -SELECT * FROM cpu WHERE value1 IN (100, 97); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(2 rows) - ---Testcase 51: -SELECT * FROM cpu WHERE value2 IN (0.5, 10.9); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t -(1 row) - ---Testcase 52: -SELECT * FROM cpu WHERE value2 NOT IN (2, 9.7); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t -(1 row) - ---Testcase 53: -SELECT * FROM cpu WHERE value4 NOT IN ('true', 'true'); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(1 row) - ---Testcase 54: -SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+--------+-------- - 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | -(1 row) - ---Testcase 55: -SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(2 rows) - ---Testcase 56: -SELECT * FROM cpu WHERE value1 NOT IN (100, 97); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------+------+------+--------+--------+--------+-------- -(0 rows) - ---Testcase 57: -SELECT * FROM cpu WHERE value1 IN (100, 97); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(2 rows) - ---Testcase 58: -SELECT * FROM cpu WHERE value2 IN (0.5, 10.9); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t -(1 row) - ---Testcase 59: -SELECT * FROM cpu WHERE value2 NOT IN (2, 9.7); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t -(1 row) - ---Testcase 60: -SELECT * FROM cpu WHERE value4 NOT IN ('true', 'true'); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(1 row) - ---Testcase 61: -SELECT * FROM cpu WHERE value4 IN ('f', 't'); - time | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f -(2 rows) - ---Testcase 62: -CREATE FOREIGN TABLE t1(time timestamp with time zone , tag1 text, value1 integer) SERVER server1 OPTIONS (table 'cpu'); ---Testcase 63: -CREATE FOREIGN TABLE t2(time timestamp , tag1 text, value1 integer) SERVER server1 OPTIONS (table 'cpu'); ---Testcase 64: -SELECT * FROM t1; - time | tag1 | value1 -------------------------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | 100 - 2015-08-18 09:00:00+09 | tag1_B | 100 -(2 rows) - ---Testcase 65: -SELECT * FROM t2; - time | tag1 | value1 ----------------------+--------+-------- - 2015-08-18 00:00:00 | tag1_A | 100 - 2015-08-18 00:00:00 | tag1_B | 100 -(2 rows) - --- In following four queries, timestamp condition is added to InfluxQL as "time = '2015-08-18 00:00:00'" ---Testcase 66: -SELECT * FROM t1 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; - time | tag1 | value1 -------------------------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | 100 - 2015-08-18 09:00:00+09 | tag1_B | 100 -(2 rows) - ---Testcase 67: -SELECT * FROM t1 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; - time | tag1 | value1 -------------------------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | 100 - 2015-08-18 09:00:00+09 | tag1_B | 100 -(2 rows) - ---Testcase 68: -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; - time | tag1 | value1 ----------------------+--------+-------- - 2015-08-18 00:00:00 | tag1_A | 100 - 2015-08-18 00:00:00 | tag1_B | 100 -(2 rows) - ---Testcase 69: -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; - time | tag1 | value1 ----------------------+--------+-------- - 2015-08-18 00:00:00 | tag1_A | 100 - 2015-08-18 00:00:00 | tag1_B | 100 -(2 rows) - --- pushdown now() ---Testcase 70: -SELECT * FROM t2 WHERE now() > time; - time | tag1 | value1 ----------------------+--------+-------- - 2015-08-18 00:00:00 | tag1_A | 100 - 2015-08-18 00:00:00 | tag1_B | 100 -(2 rows) - ---Testcase 71: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE now() > time; - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan on public.t2 (cost=10.00..401.00 rows=401 width=44) - Output: "time", tag1, value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" WHERE ((now() > time)) -(3 rows) - ---Testcase 72: -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; - time | tag1 | value1 ----------------------+--------+-------- - 2015-08-18 00:00:00 | tag1_A | 100 - 2015-08-18 00:00:00 | tag1_B | 100 -(2 rows) - ---Testcase 73: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.t2 (cost=10.00..6.00 rows=6 width=44) - Output: "time", tag1, value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" WHERE ((time = ('2015-08-26 05:43:21.1' - 8d5h43m21s100000u))) -(3 rows) - --- InfluxDB does not seem to support time column + interval, so below query returns empty result --- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; --- EXPLAIN (VERBOSE, COSTS OFF) --- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; --- InfluxDB does not support month or year interval, so not push down ---Testcase 74: -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; - time | tag1 | value1 ----------------------+--------+-------- - 2015-08-18 00:00:00 | tag1_A | 100 - 2015-08-18 00:00:00 | tag1_B | 100 -(2 rows) - ---Testcase 75: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Foreign Scan on public.t2 (cost=10.00..6.00 rows=6 width=44) - Output: "time", tag1, value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" WHERE ((time = '2015-08-18 00:00:00')) -(3 rows) - ---Testcase 76: -SELECT * FROM t2 WHERE value1 = ANY (ARRAY(SELECT value1 FROM t1 WHERE value1 < 1000)); - time | tag1 | value1 ----------------------+--------+-------- - 2015-08-18 00:00:00 | tag1_A | 100 - 2015-08-18 00:00:00 | tag1_B | 100 -(2 rows) - --- ANY with ARRAY expression ---Testcase 77: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, a + 1]); - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..13.00 rows=13 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" = 1) OR ("a" = ("a" + 1))) -(3 rows) - ---Testcase 78: -SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, a + 1]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 79: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, a + 1]); - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1280.00 rows=1280 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <> 1) OR ("a" <> ("a" + 1))) -(3 rows) - ---Testcase 80: -SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, a + 1]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 81: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, a + 1]); - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" >= 1) OR ("a" >= ("a" + 1))) -(3 rows) - ---Testcase 82: -SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, a + 1]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 83: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, a + 1]); - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <= 1) OR ("a" <= ("a" + 1))) -(3 rows) - ---Testcase 84: -SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, a + 1]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 85: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, a + 1]); - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" > 1) OR ("a" > ("a" + 1))) -(3 rows) - ---Testcase 86: -SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, a + 1]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 87: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, a + 1]); - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" < 1) OR ("a" < ("a" + 1))) -(3 rows) - ---Testcase 88: -SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, a + 1]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - --- ANY with ARRAY const ---Testcase 89: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, 2]); - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..13.00 rows=13 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 OR "a" = 2) -(3 rows) - ---Testcase 90: -SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, 2]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 91: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, 2]); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1280.00 rows=1280 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 OR "a" <> 2) -(3 rows) - ---Testcase 92: -SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, 2]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 93: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, 2]); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" >= 1 OR "a" >= 2) -(3 rows) - ---Testcase 94: -SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, 2]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 95: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, 2]); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <= 1 OR "a" <= 2) -(3 rows) - ---Testcase 96: -SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, 2]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 97: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, 2]); - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" > 1 OR "a" > 2) -(3 rows) - ---Testcase 98: -SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, 2]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 99: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, 2]); - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" < 1 OR "a" < 2) -(3 rows) - ---Testcase 100: -SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, 2]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 101: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a = ANY('{1, 2, 3}'); - QUERY PLAN ----------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..19.00 rows=19 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 OR "a" = 2 OR "a" = 3) -(3 rows) - ---Testcase 102: -SELECT a, b FROM numbers WHERE a = ANY('{1, 2, 3}'); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 103: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <> ANY('{1, 2, 3}'); - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1280.00 rows=1280 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 OR "a" <> 2 OR "a" <> 3) -(3 rows) - ---Testcase 104: -SELECT a, b FROM numbers WHERE a <> ANY('{1, 2, 3}'); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - --- ALL with ARRAY expression ---Testcase 105: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, a * 1]); - QUERY PLAN ------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1.00 rows=1 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" = 1) AND ("a" = ("a" * 1))) -(3 rows) - ---Testcase 106: -SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, a * 1]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 107: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, a + 1]); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1267.00 rows=1267 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <> 1) AND ("a" <> ("a" + 1))) -(3 rows) - ---Testcase 108: -SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, a + 1]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 109: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, a / 1]); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" >= 1) AND ("a" >= ("a" / 1))) -(3 rows) - ---Testcase 110: -SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, a / 1]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 111: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, a + 1]); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <= 1) AND ("a" <= ("a" + 1))) -(3 rows) - ---Testcase 112: -SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, a + 1]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 113: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a > ALL(ARRAY[1, a - 1]); - QUERY PLAN ------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" > 1) AND ("a" > ("a" - 1))) -(3 rows) - ---Testcase 114: -SELECT a, b FROM numbers WHERE a > ALL(ARRAY[1, a - 1]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 115: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, a + 1]); - QUERY PLAN ------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" < 2) AND ("a" < ("a" + 1))) -(3 rows) - ---Testcase 116: -SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, a + 1]); - a | b ----+----- - 1 | One -(1 row) - --- ALL with ARRAY const ---Testcase 117: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, 1]); - QUERY PLAN ------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1.00 rows=1 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 AND "a" = 1) -(3 rows) - ---Testcase 118: -SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, 1]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 119: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, 3]); - QUERY PLAN --------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1267.00 rows=1267 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 AND "a" <> 3) -(3 rows) - ---Testcase 120: -SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, 3]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 121: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, 2]); - QUERY PLAN --------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" >= 1 AND "a" >= 2) -(3 rows) - ---Testcase 122: -SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, 2]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 123: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, 2]); - QUERY PLAN --------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <= 1 AND "a" <= 2) -(3 rows) - ---Testcase 124: -SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, 2]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 125: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a > ALL(ARRAY[0, 1]); - QUERY PLAN ------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" > 0 AND "a" > 1) -(3 rows) - ---Testcase 126: -SELECT a, b FROM numbers WHERE a > ALL(ARRAY[0, 1]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 127: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, 3]); - QUERY PLAN ------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" < 2 AND "a" < 3) -(3 rows) - ---Testcase 128: -SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, 3]); - a | b ----+----- - 1 | One -(1 row) - --- ANY/ALL with TEXT ARRAY const ---Testcase 129: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE b = ANY(ARRAY['One', 'Two']); - QUERY PLAN -------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..13.00 rows=13 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("b" = 'One' OR "b" = 'Two') -(3 rows) - ---Testcase 130: -SELECT a, b FROM numbers WHERE b = ANY(ARRAY['One', 'Two']); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 131: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE b <> ALL(ARRAY['One', 'Four']); - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..1267.00 rows=1267 width=40) - Output: a, b - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("b" <> 'One' AND "b" <> 'Four') -(3 rows) - ---Testcase 132: -SELECT a, b FROM numbers WHERE b <> ALL(ARRAY['One', 'Four']); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 133: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE b > ANY(ARRAY['One', 'Two']); - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) - Output: a, b - Filter: (numbers.b > ANY ('{One,Two}'::text[])) - InfluxDB query: SELECT "a", "b" FROM "numbers" -(4 rows) - ---Testcase 134: -SELECT a, b FROM numbers WHERE b > ANY(ARRAY['One', 'Two']); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 135: -EXPLAIN VERBOSE -SELECT * FROM numbers WHERE b > ALL(ARRAY['Four', 'Five']); - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..87.00 rows=87 width=80) - Output: "time", tag1, a, b - Filter: (numbers.b > ALL ('{Four,Five}'::text[])) - InfluxDB query: SELECT "tag1", "a", "b" FROM "numbers" -(4 rows) - ---Testcase 136: -SELECT a, b FROM numbers WHERE b > ALL(ARRAY['Four', 'Five']); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 137: -DROP FOREIGN TABLE numbers; ---Testcase 138: -ALTER SERVER server1 OPTIONS (SET dbname 'no such database'); ---Testcase 139: -SELECT * FROM t1; -ERROR: influxdb_fdw : database not found: no such database ---Testcase 140: -ALTER SERVER server1 OPTIONS (SET dbname 'mydb'); ---Testcase 141: -SELECT * FROM t1; - time | tag1 | value1 -------------------------+--------+-------- - 2015-08-18 09:00:00+09 | tag1_A | 100 - 2015-08-18 09:00:00+09 | tag1_B | 100 -(2 rows) - --- map time column to both timestamp and text ---Testcase 142: -CREATE FOREIGN TABLE t5(t timestamp OPTIONS (column_name 'time'), tag1 text OPTIONS (column_name 'time'), v1 integer OPTIONS (column_name 'value1')) SERVER server1 OPTIONS (table 'cpu'); ---Testcase 143: -SELECT * FROM t5; - t | tag1 | v1 ----------------------+----------------------+----- - 2015-08-18 00:00:00 | 2015-08-18T00:00:00Z | 100 - 2015-08-18 00:00:00 | 2015-08-18T00:00:00Z | 100 -(2 rows) - ---get version ---Testcase 144: -\df influxdb_fdw* - List of functions - Schema | Name | Result data type | Argument data types | Type ---------+------------------------+------------------+---------------------+-------- - public | influxdb_fdw_handler | fdw_handler | | normal - public | influxdb_fdw_validator | void | text[], oid | normal - public | influxdb_fdw_version | integer | | normal -(3 rows) - ---Testcase 145: -SELECT * FROM public.influxdb_fdw_version(); - influxdb_fdw_version ----------------------- - 10200 -(1 row) - ---Testcase 146: -SELECT influxdb_fdw_version(); - influxdb_fdw_version ----------------------- - 10200 -(1 row) - ---Test pushdown LIMIT...OFFSET ---Testcase 147: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; - QUERY PLAN ------------------------------------------------------------- - Limit - Output: ((tableoid)::regclass), "time", tag1, value1 - -> Foreign Scan on public.t1 - Output: (tableoid)::regclass, "time", tag1, value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" -(5 rows) - ---Testcase 148: -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; - tableoid | time | tag1 | value1 -----------+------------------------+--------+-------- - t1 | 2015-08-18 09:00:00+09 | tag1_A | 100 -(1 row) - ---Testcase 149: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; - QUERY PLAN ------------------------------------------------------------- - Limit - Output: ((tableoid)::regclass), "time", tag1, value1 - -> Foreign Scan on public.t1 - Output: (tableoid)::regclass, "time", tag1, value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" -(5 rows) - ---Testcase 150: -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; - tableoid | time | tag1 | value1 -----------+------------------------+--------+-------- - t1 | 2015-08-18 09:00:00+09 | tag1_B | 100 -(1 row) - ---Testcase 151: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; - QUERY PLAN ------------------------------------------------------------- - Limit - Output: ctid, "time", tag1, value1 - -> Foreign Scan on public.t1 - Output: ctid, "time", tag1, value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" -(5 rows) - ---Testcase 152: -SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; - ctid | time | tag1 | value1 -----------------+------------------------+--------+-------- - (4294967295,0) | 2015-08-18 09:00:00+09 | tag1_A | 100 -(1 row) - ---Testcase 153: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; - QUERY PLAN ------------------------------------------------------------- - Limit - Output: ctid, "time", tag1, value1 - -> Foreign Scan on public.t2 - Output: ctid, "time", tag1, value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" -(5 rows) - ---Testcase 154: -SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; - ctid | time | tag1 | value1 -------+------+------+-------- -(0 rows) - ---Testcase 155: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM - t1 - LEFT JOIN t2 - ON t2.value1 = 123, - LATERAL (SELECT t2.value1, t1.tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss -WHERE t1.value1 = ss.value1; - QUERY PLAN -------------------------------------------------------------------------------------------------- - Nested Loop - Output: t1."time", t1.tag1, t1.value1, t2."time", t2.tag1, t2.value1, (t2.value1), t1_1.tag1 - Join Filter: (t1.value1 = (t2.value1)) - -> Nested Loop Left Join - Output: t1."time", t1.tag1, t1.value1, t2."time", t2.tag1, t2.value1 - -> Foreign Scan on public.t1 - Output: t1."time", t1.tag1, t1.value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" - -> Materialize - Output: t2."time", t2.tag1, t2.value1 - -> Foreign Scan on public.t2 - Output: t2."time", t2.tag1, t2.value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" WHERE (("value1" = 123)) - -> Limit - Output: (t2.value1), t1_1.tag1 - -> Foreign Scan on public.t1 t1_1 - Output: t2.value1, t1_1.tag1 - InfluxDB query: SELECT "tag1" FROM "cpu" -(18 rows) - ---Testcase 156: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM - t1 - LEFT JOIN t2 - ON t2.value1 = 123, - LATERAL (SELECT t2.value1, t1.tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss1, - LATERAL (SELECT ss1.* from t3 LIMIT 1 OFFSET 20) AS ss2 -WHERE t1.value1 = ss2.value1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: t1."time", t1.tag1, t1.value1, t2."time", t2.tag1, t2.value1, (t2.value1), t1_1.tag1, ((t2.value1)), (t1_1.tag1) - Join Filter: (t1.value1 = ((t2.value1))) - -> Nested Loop - Output: t1."time", t1.tag1, t1.value1, t2."time", t2.tag1, t2.value1, (t2.value1), t1_1.tag1 - -> Nested Loop Left Join - Output: t1."time", t1.tag1, t1.value1, t2."time", t2.tag1, t2.value1 - -> Foreign Scan on public.t1 - Output: t1."time", t1.tag1, t1.value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" - -> Materialize - Output: t2."time", t2.tag1, t2.value1 - -> Foreign Scan on public.t2 - Output: t2."time", t2.tag1, t2.value1 - InfluxDB query: SELECT "tag1", "value1" FROM "cpu" WHERE (("value1" = 123)) - -> Limit - Output: (t2.value1), t1_1.tag1 - -> Foreign Scan on public.t1 t1_1 - Output: t2.value1, t1_1.tag1 - InfluxDB query: SELECT "tag1" FROM "cpu" - -> Limit - Output: ((t2.value1)), (t1_1.tag1) - -> Foreign Scan on public.t3 - Output: (t2.value1), t1_1.tag1 - InfluxDB query: SELECT * FROM "t3" -(25 rows) - ---Testcase 157: -DROP FOREIGN TABLE cpu; ---Testcase 158: -DROP FOREIGN TABLE t1; ---Testcase 159: -DROP FOREIGN TABLE t2; ---Testcase 160: -DROP FOREIGN TABLE t3; ---Testcase 161: -DROP FOREIGN TABLE t4; ---Testcase 162: -DROP FOREIGN TABLE t5; ---Testcase 163: -DROP FOREIGN TABLE tx; --- test INSERT, DELETE -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); ---Testcase 164: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+----------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | | tag2_A | | 2 | | -(3 rows) - ---Testcase 165: -EXPLAIN VERBOSE -INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test1', true); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Insert on public.cpu (cost=0.00..0.01 rows=1 width=153) - -> Result (cost=0.00..0.01 rows=1 width=153) - Output: '2021-01-01 00:00:01+09'::timestamp with time zone, NULL::text, 'tag1_K'::text, 'tag2_H'::text, '200'::bigint, '5.5'::double precision, 'test1'::text, true -(3 rows) - ---Testcase 166: -INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test', true); ---Testcase 167: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+----------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | | tag2_A | | 2 | | - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t -(4 rows) - ---Testcase 168: -EXPLAIN VERBOSE -INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), - ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.cpu (cost=0.02..0.04 rows=2 width=153) - InitPlan 1 (returns $0) - -> Result (cost=0.00..0.01 rows=1 width=4) - Output: 350 - InitPlan 2 (returns $1) - -> Result (cost=0.00..0.01 rows=1 width=32) - Output: 6.9 - -> Values Scan on "*VALUES*" (cost=0.00..0.03 rows=2 width=153) - Output: "*VALUES*".column1, NULL::text, "*VALUES*".column2, "*VALUES*".column3, "*VALUES*".column4, "*VALUES*".column5, "*VALUES*".column6, "*VALUES*".column7 -(9 rows) - ---Testcase 169: -INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), - ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); ---Testcase 170: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+----------------------+--------+---------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | | tag2_A | | 2 | | - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2021-01-02 04:00:02+09 | 2021-01-01T19:00:02Z | tag1_I | tag2_E | 300 | 15.5 | test2 | f - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(6 rows) - ---Testcase 171: -INSERT INTO cpu(tag2, value1) VALUES('tag2_KH', 400); ---Testcase 172: -SELECT tag1, tag2, value1, value2, value3, value4 FROM cpu; - tag1 | tag2 | value1 | value2 | value3 | value4 ---------+---------+--------+--------+--------+-------- - tag1_A | tag2_A | 100 | 0.5 | str | t - tag1_B | | 100 | 2 | | f - | tag2_A | | 2 | | - tag1_K | tag2_H | 200 | 5.5 | test | t - tag1_I | tag2_E | 300 | 15.5 | test2 | f - | tag2_KH | 400 | | | - tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(7 rows) - ---Testcase 173: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE tag2 = 'tag2_KH'; - QUERY PLAN -------------------------------------------------------------------------- - Delete on public.cpu (cost=10.00..3.00 rows=3 width=104) - -> Foreign Delete on public.cpu (cost=10.00..3.00 rows=3 width=104) - InfluxDB query: DELETE FROM "cpu" WHERE (("tag2" = 'tag2_KH')) -(3 rows) - ---Testcase 174: -DELETE FROM cpu WHERE tag2 = 'tag2_KH'; ---Testcase 175: -SELECT tag1, tag2, value1, value2, value3, value4 FROM cpu; - tag1 | tag2 | value1 | value2 | value3 | value4 ---------+---------+--------+--------+--------+-------- - tag1_A | tag2_A | 100 | 0.5 | str | t - tag1_B | | 100 | 2 | | f - | tag2_A | | 2 | | - tag1_K | tag2_H | 200 | 5.5 | test | t - tag1_I | tag2_E | 300 | 15.5 | test2 | f - tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(6 rows) - ---Testcase 176: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; - QUERY PLAN ----------------------------------------------------------------------------------- - Delete on public.cpu (cost=10.00..3.00 rows=3 width=104) - -> Foreign Delete on public.cpu (cost=10.00..3.00 rows=3 width=104) - InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-01-01 19:00:02')) -(3 rows) - ---Testcase 177: -DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; ---Testcase 178: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+----------------------+--------+---------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_A | tag2_A | 100 | 0.5 | str | t - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | | tag2_A | | 2 | | - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(5 rows) - ---Testcase 179: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Delete on public.cpu (cost=10.00..212.00 rows=212 width=104) - -> Foreign Delete on public.cpu (cost=10.00..212.00 rows=212 width=104) - InfluxDB query: DELETE FROM "cpu" WHERE ((time < '2018-07-06 15:00:00')) AND (("tag1" <> 'tag1_B')) -(3 rows) - ---Testcase 180: -DELETE FROM cpu WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; ---Testcase 181: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+----------------------+--------+---------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(3 rows) - --- Test INSERT, DELETE with time_text column ---Testcase 182: -INSERT INTO cpu(time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02T00:00:00Z', 'tag1_D', 'tag2_E', 600, 20.2, 'test3', true); ---Testcase 183: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 -------------------------+----------------------+--------+---------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(4 rows) - ---Testcase 184: -INSERT INTO cpu(time_text, tag1, value2) VALUES('2021-02-02T00:00:00.123456789Z', 'tag1_P', 25.8); ---Testcase 185: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 --------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t - 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | tag1_P | | | 25.8 | | - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(5 rows) - ---Testcase 186: -INSERT INTO cpu(time_text, tag1, value2) VALUES('2021-02-02 00:00:01', 'tag1_J', 37.1); ---Testcase 187: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 --------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t - 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | tag1_P | | | 25.8 | | - 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | tag1_J | | | 37.1 | | - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(6 rows) - ---Testcase 188: -INSERT INTO cpu(time, time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02 00:00:01+05', '2021-02-02T00:00:02.123456789Z', 'tag1_A', 'tag2_B', 200, 5.5, 'test', true); -WARNING: Inserting value has both 'time_text' and 'time' columns specified. The 'time' will be ignored. ---Testcase 189: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 --------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t - 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | tag1_P | | | 25.8 | | - 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | tag1_J | | | 37.1 | | - 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | tag1_A | tag2_B | 200 | 5.5 | test | t - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(7 rows) - ---Testcase 190: -INSERT INTO cpu(time_text, time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-03T00:00:03.123456789Z', '2021-03-03 00:00:01+07', 'tag1_C', 'tag2_D', 200, 5.5, 'test', true); -WARNING: Inserting value has both 'time_text' and 'time' columns specified. The 'time' will be ignored. ---Testcase 191: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 --------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t - 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | tag1_P | | | 25.8 | | - 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | tag1_J | | | 37.1 | | - 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | tag1_A | tag2_B | 200 | 5.5 | test | t - 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(8 rows) - ---Testcase 192: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:00.123456789Z'; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Delete on public.cpu (cost=10.00..3.00 rows=3 width=104) - -> Foreign Delete on public.cpu (cost=10.00..3.00 rows=3 width=104) - InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-02-02T00:00:00.123456789Z')) -(3 rows) - ---Testcase 193: -DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:00.123456789Z'; ---Testcase 194: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 --------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t - 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | tag1_J | | | 37.1 | | - 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | tag1_A | tag2_B | 200 | 5.5 | test | t - 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(7 rows) - ---Testcase 195: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Delete on public.cpu (cost=10.00..1.00 rows=1 width=104) - -> Foreign Delete on public.cpu (cost=10.00..1.00 rows=1 width=104) - InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-02-02T00:00:01Z')) AND (("tag1" = 'tag1_J')) -(3 rows) - ---Testcase 196: -DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; ---Testcase 197: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 --------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t - 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | tag1_A | tag2_B | 200 | 5.5 | test | t - 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(6 rows) - ---Testcase 198: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- - Delete on public.cpu (cost=10.00..6.00 rows=6 width=104) - -> Foreign Scan on public.cpu (cost=10.00..6.00 rows=6 width=104) - Output: "time", time_text, tag1, tag2 - Filter: ((cpu.time_text = '2021-02-02 00:00:00'::text) OR (cpu."time" = '2029-02-02 05:02:02+09'::timestamp with time zone)) - InfluxDB query: SELECT "tag1", "tag2", "value1" FROM "cpu" -(5 rows) - ---Testcase 199: -DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; ---Testcase 200: -SELECT * FROM cpu; - time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 --------------------------------+--------------------------------+--------+--------+--------+--------+--------+-------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t - 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | tag1_A | tag2_B | 200 | 5.5 | test | t - 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t -(5 rows) - --- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null ---Testcase 201: -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 202: -DROP SERVER server1 CASCADE; -NOTICE: drop cascades to 5 other objects -DETAIL: drop cascades to foreign table cpu -drop cascades to foreign table numbers -drop cascades to foreign table t3 -drop cascades to foreign table t4 -drop cascades to foreign table tx ---Testcase 203: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/10.18/schemaless/add_fields.out b/expected/10.18/schemaless/add_fields.out deleted file mode 100644 index 309c4b2..0000000 --- a/expected/10.18/schemaless/add_fields.out +++ /dev/null @@ -1,1291 +0,0 @@ -SET datestyle=ISO; --- timestamp with time zone differs based on this -SET timezone='UTC'; -\set ECHO none --- Init data -\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null ---Before update data ---Testcase 1: -CREATE EXTENSION influxdb_fdw CASCADE; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 4: -CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); ---Testcase 5: -CREATE FOREIGN TABLE sctbl2 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); ---Before update data ---Testcase 6: -SELECT * FROM sctbl1; - time | tags | fields --------------------------------+----------------------------+----------------------------------------------------------------------------------------------------- - 1677-09-21 00:12:43.145224+00 | {"device_id": "dev1"} | {"sig1": "-664", "sig2": null, "sig3": "0.78", "sig4": "true"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "d ,=ev2"} | {"sig1": "2222", "sig2": "x'a8a9aaabacadaeaf'", "sig3": "-1", "sig4": "false"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false"} - 2019-05-02 16:12:41.098+00 | {"device_id": "\"dev 1\""} | {"sig1": "70220", "sig2": "いろはにほへど ちりぬるをわがよたれぞ", "sig3": "0.37", "sig4": "true"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.79769313486", "sig4": "true"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "-8555", "sig2": "AHWEMAKDF", "sig3": "0.34", "sig4": "false"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "319", "sig2": "P_AEF-wefA", "sig3": "0.32", "sig4": "false"} - 2262-04-11 23:47:16.854776+00 | {"device_id": "'dev3'"} | {"sig1": "34422", "sig2": "散りぬるを我が世誰", "sig3": "0.32", "sig4": "false"} -(9 rows) - ---Testcase 7: -SELECT max(time), max((fields->>'sig1')::bigint), max((fields->>'sig1')::bigint)+10, max((fields->>'sig1')::bigint)-10, max((fields->>'sig3')::float8), max((fields->>'sig3')::float8)/2 FROM sctbl1 GROUP BY time,(fields->>'sig1')::bigint; - max | max | ?column? | ?column? | max | ?column? --------------------------------+-------+----------+----------+----------------+---------------- - 1677-09-21 00:12:43.145224+00 | -664 | -654 | -674 | 0.78 | 0.39 - 2016-06-13 17:43:50.1004+00 | 2222 | 2232 | 2212 | -1 | -0.5 - 2019-05-02 16:12:41.098+00 | -8555 | -8545 | -8565 | 0.34 | 0.17 - 2016-06-13 17:43:50.1004+00 | 35655 | 35665 | 35645 | 0.25 | 0.125 - 2016-06-13 17:43:50.1004+00 | 65535 | 65545 | 65525 | -0.91 | -0.455 - 2019-05-02 16:12:41.098+00 | 319 | 329 | 309 | 0.32 | 0.16 - 2019-05-02 16:12:41.098+00 | 70220 | 70230 | 70210 | 0.37 | 0.185 - 2262-04-11 23:47:16.854776+00 | 34422 | 34432 | 34412 | 0.32 | 0.16 - 2019-05-02 16:12:41.098+00 | 11 | 21 | 1 | -0.79769313486 | -0.39884656743 -(9 rows) - ---Testcase 8: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4 from sctbl1 ORDER BY tags->>'device_id'; - device_id | sig1 | sig2 | sig3 | sig4 ------------+-------+----------------------------------------+----------------+------ - dev1 | -664 | | 0.78 | t - dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t - "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f - dev2 | -8555 | AHWEMAKDF | 0.34 | f - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f - dev3 | 319 | P_AEF-wefA | 0.32 | f - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f -(9 rows) - ---Testcase 9: -SELECT bool_or((fields->>'sig1')::bigint <> 10) AND true, bool_and(fields->>'sig2' != 'aghsjfh'), bool_or((fields->>'sig1')::bigint+(fields->>'sig3')::float8 <=5.5) OR false from sctbl1 GROUP BY (fields->>'sig1')::bigint,fields->>'sig2'; - ?column? | bool_and | ?column? -----------+----------+---------- - t | t | f - t | t | f - t | t | f - t | t | f - t | t | f - t | | t - t | t | f - t | t | f - t | t | t -(9 rows) - ---Testcase 10: -SELECT sqrt(abs((fields->>'sig1')::float8)), sqrt(abs((fields->>'sig3')::float8)) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint > -1000 AND (fields->>'sig3')::float8 < 1000 ) AS sctbl1 ORDER BY 1 ASC,2 DESC; - sqrt | sqrt -------------------+------------------- - 3.3166247903554 | 0.893136683190205 - 17.8605710994918 | 0.565685424949238 - 25.7681974534503 | 0.883176086632785 - 47.1380949975707 | 1 - 185.531668455819 | 0.565685424949238 - 188.825316099299 | 0.5 - 255.998046867549 | 0.953939201416946 - 264.990565869806 | 0.608276253029822 -(8 rows) - ---Testcase 11: -SELECT fields->>'sig2' sig2, mode((fields->>'sig3')::float8) WITHIN GROUP (ORDER BY (fields->>'sig3')::float8) AS m1 from sctbl1 GROUP BY fields->>'sig2'; -ERROR: function mode(double precision, double precision) does not exist -LINE 1: SELECT fields->>'sig2' sig2, mode((fields->>'sig3')::float8)... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 12: -SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), lower(fields->>'sig2') FROM sctbl1 ORDER BY 1 ASC,2 DESC,3 ASC,4; - upper | upper | lower | lower -----------------------------------------+----------------------------------------+----------------------------------------+---------------------------------------- - `~!@#$%^&*()_+= | `~!@#$%^&*()_+= | `~!@#$%^&*()_+= | `~!@#$%^&*()_+= - いろはにほへど ちりぬるをわがよたれぞ | いろはにほへど ちりぬるをわがよたれぞ | いろはにほへど ちりぬるをわがよたれぞ | いろはにほへど ちりぬるをわがよたれぞ - 2E2EAWEKFRJQ2O | 2E2EAWEKFRJQ2O | 2e2eawekfrjq2o | 2e2eawekfrjq2o - ABCDEFGHIJKLMNOPQRSTUVWXYZ | ABCDEFGHIJKLMNOPQRSTUVWXYZ | abcdefghijklmnopqrstuvwxyz | abcdefghijklmnopqrstuvwxyz - AHWEMAKDF | AHWEMAKDF | ahwemakdf | ahwemakdf - P_AEF-WEFA | P_AEF-WEFA | p_aef-wefa | p_aef-wefa - X'A8A9AAABACADAEAF' | X'A8A9AAABACADAEAF' | x'a8a9aaabacadaeaf' | x'a8a9aaabacadaeaf' - 散りぬるを我が世誰 | 散りぬるを我が世誰 | 散りぬるを我が世誰 | 散りぬるを我が世誰 -(8 rows) - --------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ ---Update data -\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null ---Testcase 13: -DROP FOREIGN TABLE sctbl1; ---Testcase 14: -CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); ---Testcase 15: -SELECT * FROM sctbl1; - time | tags | fields --------------------------------+----------------------------+---------------------------------------------------------------------------------------------------------------------- - 1677-09-21 00:12:43.145224+00 | {"device_id": "dev1"} | {"sig1": "-664", "sig2": null, "sig3": "0.78", "sig4": "true", "sig5": "false"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "d ,=ev2"} | {"sig1": "2222", "sig2": "x'a8a9aaabacadaeaf'", "sig3": "-1", "sig4": "false", "sig5": "false"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false", "sig5": "true"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false", "sig5": "true"} - 2019-05-02 16:12:41.098+00 | {"device_id": "\"dev 1\""} | {"sig1": "70220", "sig2": "いろはにほへど ちりぬるをわがよたれぞ", "sig3": "0.37", "sig4": "true", "sig5": "false"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.79769313486", "sig4": "true", "sig5": "true"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "-8555", "sig2": "AHWEMAKDF", "sig3": "0.34", "sig4": "false", "sig5": "false"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "319", "sig2": "P_AEF-wefA", "sig3": "0.32", "sig4": "false", "sig5": "true"} - 2262-04-11 23:47:16.854776+00 | {"device_id": "'dev3'"} | {"sig1": "34422", "sig2": "散りぬるを我が世誰", "sig3": "0.32", "sig4": "false", "sig5": "true"} -(9 rows) - ---Select fields,tags ---Testcase 16: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint < (fields->>'sig3')::float8 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; - device_id | sig1 | sig3 ------------+-------+------- - 'dev3' | 34422 | 0.32 - dev3 | 319 | 0.32 - dev3 | 65535 | -0.91 - d ,=ev2 | 2222 | -1 - dev2 | 35655 | 0.25 -(5 rows) - ---Testcase 17: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE (fields->>'sig3')::float8 < 0 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; - device_id | sig1 | sig3 ------------+-------+---------------- - dev3 | 65535 | -0.91 - d ,=ev2 | 2222 | -1 - dev1 | 11 | -0.79769313486 -(3 rows) - ---Testcase 18: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE NOT time >'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 2; - device_id | sig1 | sig3 ------------+-------+------ - d ,=ev2 | 2222 | -1 - dev2 | -8555 | 0.34 - dev2 | 35655 | 0.25 - "dev 1" | 70220 | 0.37 - dev1 | -664 | 0.78 -(5 rows) - ---Testcase 19: -SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | device_id | sig1 | sig2 | sig3 | sig4 | sig5 --------------------------------+-----------+-------+----------------------------------------+----------------+------+------ - 2262-04-11 23:47:16.854776+00 | 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 2019-05-02 16:12:41.098+00 | dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t - 2019-05-02 16:12:41.098+00 | "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - 2019-05-02 16:12:41.098+00 | dev2 | -8555 | AHWEMAKDF | 0.34 | f | f - 2019-05-02 16:12:41.098+00 | dev3 | 319 | P_AEF-wefA | 0.32 | f | t -(5 rows) - ---Testcase 20: -SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | device_id | sig1 | sig2 | sig3 | sig4 | sig5 -------+-----------+------+------+------+------+------ -(0 rows) - ---Testcase 21: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig1')::bigint BETWEEN 0 AND 10000 ORDER BY (fields->>'sig1')::bigint DESC LIMIT 5 OFFSET 0; - sig1 | sig3 | sig4 | sig5 -------+----------------+------+------ - 2222 | -1 | f | f - 319 | 0.32 | f | t - 11 | -0.79769313486 | t | t -(3 rows) - ---Testcase 22: -SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE fields->>'sig2' LIKE 'x%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | device_id | sig1 | sig2 | sig3 | sig4 | sig5 ------------------------------+-----------+-------+----------------------------+------+------+------ - 2016-06-13 17:43:50.1004+00 | dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f -(2 rows) - ---Testcase 23: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4 FROM sctbl1 WHERE NOT EXISTS (SELECT fields->>'sig2' FROM sctbl1 WHERE fields->>'sig2'='AHW') ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; - device_id | sig1 | sig2 | sig3 | sig4 ------------+-------+---------------------+-------+------ - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f - dev3 | 319 | P_AEF-wefA | 0.32 | f - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f - dev2 | -8555 | AHWEMAKDF | 0.34 | f -(5 rows) - ---Testcase 24: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig3')::float8 < ALL (SELECT (fields->>'sig1')::bigint FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig5 --------+----------------------------------------+-------+------+------ - 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 2222 | x'a8a9aaabacadaeaf' | -1 | f | f -(5 rows) - ---Testcase 25: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig3')::float8 = ANY (ARRAY[0.78,0.32,0.34]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig5 --------+--------------------+------+------+------ - 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 319 | P_AEF-wefA | 0.32 | f | t - -664 | | 0.78 | t | f - -8555 | AHWEMAKDF | 0.34 | f | f -(4 rows) - ---Testcase 26: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig3')::float8=0.25) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig5 --------+----------------------------------------+-------+------+------ - 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 2222 | x'a8a9aaabacadaeaf' | -1 | f | f -(5 rows) - ---Testcase 27: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE fields->>'sig1'=ANY (ARRAY(SELECT fields->>'sig1' FROM sctbl1 WHERE (fields->>'sig1')::bigint%2=0)) ORDER BY 1 DESC LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig5 --------+----------------------------------------+------+------+------ - 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 2222 | x'a8a9aaabacadaeaf' | -1 | f | f - -664 | | 0.78 | t | f -(4 rows) - ---Testcase 28: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig4')::boolean=true) ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig5 --------+----------------------------------------+-------+------+------ - 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 2222 | x'a8a9aaabacadaeaf' | -1 | f | f -(5 rows) - ---Testcase 29: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint+(fields->>'sig3')::float8 as ss FROM sctbl1 WHERE fields->>'sig2' IS NULL ORDER BY (fields->>'sig1')::bigint DESC,fields->>'sig2' ASC LIMIT 5 OFFSET 0; - sig1 | sig3 | sig5 | ss -------+------+------+--------- - -664 | 0.78 | f | -663.22 -(1 row) - ---Testcase 30: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint/(fields->>'sig3')::float8 as dd FROM sctbl1 WHERE fields->>'sig2' IS NOT NULL ORDER BY fields->>'sig2' DESC,(fields->>'sig1')::bigint ASC LIMIT 5 OFFSET 0; - sig1 | sig3 | sig5 | dd --------+------+------+------------------- - 34422 | 0.32 | t | 107568.75 - 2222 | -1 | f | -2222 - 319 | 0.32 | t | 996.875 - -8555 | 0.34 | f | -25161.7647058823 - 35655 | 0.25 | t | 142620 -(5 rows) - ---Testcase 31: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint*(fields->>'sig3')::float8 as mm FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint=5 ORDER BY fields->>'sig2' DESC LIMIT 5 OFFSET 0; - sig1 | sig3 | sig5 | mm --------+------+------+---------- - -664 | 0.78 | f | -517.92 - 34422 | 0.32 | t | 11015.04 - 2222 | -1 | f | -2222 - 319 | 0.32 | t | 102.08 - -8555 | 0.34 | f | -2908.7 -(5 rows) - ---Testcase 32: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig1')::bigint != 0 AND (fields->>'sig3')::float8=0.32 ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig5 --------+--------------------+------+------+------ - 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 319 | P_AEF-wefA | 0.32 | f | t -(2 rows) - ---Testcase 33: -SELECT (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4, (fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 > -1.0 OR fields->>'sig2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig5 --------+----------------------------------------+-------+------+------ - 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 2222 | x'a8a9aaabacadaeaf' | -1 | f | f -(5 rows) - ---Testcase 34: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 < -0.1 AND fields->>'sig2' > 'Mee' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig5 -------+---------------------+------+------+------ - 2222 | x'a8a9aaabacadaeaf' | -1 | f | f -(1 row) - ---Testcase 35: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig5 -------+---------------------+------+------+------ - 2222 | x'a8a9aaabacadaeaf' | -1 | f | f -(1 row) - ---Testcase 36: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE fields->>'sig2' LIKE 'A%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig5 -------+------------+------+------+------ - 319 | P_AEF-wefA | 0.32 | f | t -(1 row) - ---Testcase 37: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE NOT EXISTS (SELECT fields->>'sig2' FROM sctbl1 WHERE fields->>'sig2'='AHW') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 2; - sig1 | sig2 | sig3 | sig4 | sig5 --------+----------------------------+----------------+------+------ - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 2222 | x'a8a9aaabacadaeaf' | -1 | f | f - 319 | P_AEF-wefA | 0.32 | f | t - 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t -(5 rows) - ---Testcase 38: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 NOT IN (0, 1000, -1, -2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 1; - sig1 | sig2 | sig3 | sig4 | sig5 --------+----------------------------+----------------+------+------ - 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 319 | P_AEF-wefA | 0.32 | f | t - 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t -(5 rows) - ---Testcase 39: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE fields->>'sig3'=ANY (ARRAY(SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig1')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 1; - sig1 | sig2 | sig3 | sig4 | sig5 --------+---------------------+------+------+------ - 34422 | 散りぬるを我が世誰 | 0.32 | f | t - 2222 | x'a8a9aaabacadaeaf' | -1 | f | f - 319 | P_AEF-wefA | 0.32 | f | t - -664 | | 0.78 | t | f -(4 rows) - ---Testcase 40: -SELECT time, fields->>'sig2' sig2 FROM sctbl1 WHERE fields->>'sig2' <= 'A' AND (fields->>'sig3')::float8 <>-5 AND (fields->>'sig1')::bigint <> 100 ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 1; - time | sig2 -----------------------------+---------------------------------------- - 2019-05-02 16:12:41.098+00 | 2e2eawekfrjq2o - 2019-05-02 16:12:41.098+00 | いろはにほへど ちりぬるをわがよたれぞ -(2 rows) - ---Select aggregate functions ---Testcase 41: -SELECT max(time), max((fields->>'sig1')::bigint*0.5), max((fields->>'sig3')::float8+10) FROM sctbl1 WHERE (fields->>'sig3')::float8 NOT IN (0, 1000, -1, -2) GROUP BY fields->>'sig3', fields->>'sig1' HAVING min((fields->>'sig3')::float8) < min((fields->>'sig1')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; - max | max | max --------------------------------+---------+--------------- - 2262-04-11 23:47:16.854776+00 | 17211.0 | 10.32 - 2019-05-02 16:12:41.098+00 | 5.5 | 9.20230686514 - 2019-05-02 16:12:41.098+00 | 159.5 | 10.32 - 2019-05-02 16:12:41.098+00 | 35110.0 | 10.37 - 2016-06-13 17:43:50.1004+00 | 17827.5 | 10.25 -(5 rows) - ---Testcase 42: -SELECT tags->>'device_id' device_id,abs((fields->>'sig1')::bigint), ceil((fields->>'sig3')::float8), (fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0 AND (fields->>'sig4')::boolean = true; - device_id | abs | ceil | sig5 ------------+-------+------+------ - "dev 1" | 70220 | 1 | f - dev1 | 11 | -0 | t -(2 rows) - ---Testcase 43: -SELECT count(tags->>'device_id'),sum((fields->>'sig1')::bigint),sum((fields->>'sig1')::bigint+(fields->>'sig3')::float8),stddev((fields->>'sig3')::float8 order by (fields->>'sig3')::float8) from sctbl1 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; - count | sum | sum | stddev --------+--------+------------------+------------------- - 9 | 199165 | 199164.672306865 | 0.669018209414099 -(1 row) - ---Testcase 44: -SELECT mode((fields->>'sig1')::bigint) WITHIN GROUP (order by (fields->>'sig1')::bigint) from sctbl1; -ERROR: function mode(bigint, bigint) does not exist -LINE 1: SELECT mode((fields->>'sig1')::bigint) WITHIN GROUP (order b... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 45: -SELECT (fields->>'sig1')::bigint sig1,spread((fields->>'sig1')::bigint) FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig4')::boolean in (true,false)) GROUP BY tags->>'device_id', fields->>'sig1',fields->>'sig5' HAVING (fields->>'sig5')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 1; -ERROR: ORDER BY position 3 is not in select list -LINE 1: ...ds->>'sig5')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 5 ... - ^ ---Testcase 46: -SELECT (fields->>'sig3')::float8 sig3, acos((fields->>'sig3')::float8), atan((fields->>'sig3')::float8) FROM sctbl1 WHERE fields->>'sig2' IS NULL GROUP BY fields->>'sig3' HAVING min((fields->>'sig1')::bigint) < min((fields->>'sig3')::float8) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; - sig3 | acos | atan -------+-------------------+------------------- - 0.78 | 0.676130509560661 | 0.662426293833151 -(1 row) - ---Testcase 47: -SELECT (fields->>'sig3')::float8 sig3, log((fields->>'sig3')::float8),cos((fields->>'sig3')::float8) FROM sctbl1 WHERE fields->>'sig2' IS NOT NULL AND (fields->>'sig3')::float8 > 0 GROUP BY fields->>'sig3' HAVING min((fields->>'sig3')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND sum((fields->>'sig3')::float8) > -1000 AND avg((fields->>'sig3')::float8) > -1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; - sig3 | log | cos -------+--------------------+------------------- - 0.34 | -0.468521082957745 | 0.942754665528346 -(1 row) - ---Testcase 48: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,ln((fields->>'sig1')::bigint), log10((fields->>'sig3')::float8) FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint=5 GROUP BY fields->>'sig1', fields->>'sig3' HAVING min((fields->>'sig3')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND (fields->>'sig1')::bigint > 0 AND (fields->>'sig3')::float8 > 0 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; -ERROR: stub log10(float8) is called -CONTEXT: PL/pgSQL function log10(double precision) line 3 at RAISE ---Testcase 49: -SELECT max(time), max((fields->>'sig1')::bigint + (fields->>'sig3')::float8), min((fields->>'sig1')::bigint + (fields->>'sig3')::float8) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig4')::boolean != true ) AS tb1 WHERE (fields->>'sig3')::float8 != -1 AND (fields->>'sig5')::boolean != true GROUP BY fields->>'sig1' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; - max | max | min -----------------------------+----------+---------- - 2019-05-02 16:12:41.098+00 | -8554.66 | -8554.66 -(1 row) - ---Testcase 50: -SELECT every((fields->>'sig1')::bigint > 5),every((fields->>'sig3')::float8 != 5) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig5')::boolean = true ) AS tb1 WHERE (fields->>'sig3')::float8 < 0 GROUP BY fields->>'sig1', fields->>'sig4' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 DESC, 2 LIMIT 5 OFFSET 0; - every | every --------+------- - t | t - t | t -(2 rows) - ---Testcase 51: -SELECT (fields->>'sig3')::float8 sig3,exp((fields->>'sig3')::float8),exp((fields->>'sig3')::float8*2) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig5')::boolean = true ) AS tb1 WHERE true GROUP BY fields->>'sig3' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; - sig3 | exp | exp -----------------+-------------------+------------------- - 0.32 | 1.37712776433596 | 1.89648087930495 - 0.25 | 1.28402541668774 | 1.64872127070013 - -0.79769313486 | 0.450366701941337 | 0.202830166217517 - -0.91 | 0.402524224033636 | 0.162025750933881 -(4 rows) - ---Testcase 52: -SELECT min(time)+'10 days'::interval, min((fields->>'sig1')::bigint + (fields->>'sig3')::float8) FROM sctbl1 WHERE NOT time>'2020-01-03 20:30:50' GROUP BY fields->>'sig1', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; - ?column? | min ------------------------------+---------- - 2016-06-23 17:43:50.1004+00 | 65534.09 - 2016-06-23 17:43:50.1004+00 | 35655.25 - 2016-06-23 17:43:50.1004+00 | 2221 - 2019-05-12 16:12:41.098+00 | 70220.37 - 2019-05-12 16:12:41.098+00 | 319.32 -(5 rows) - ---Testcase 53: -SELECT floor((fields->>'sig1')::bigint*(fields->>'sig3')::float8), floor((fields->>'sig1')::bigint/(fields->>'sig3')::float8) FROM sctbl1 WHERE ((fields->>'sig3')::float8 - 1)/3 != 1 GROUP BY fields->>'sig1', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; - floor | floor ---------+-------- - -59637 | -72017 - -2222 | -2222 - -9 | -14 - 102 | 996 - 8913 | 142620 -(5 rows) - ---Testcase 54: -SELECT time, tags->>'device_id' device_id, pow((fields->>'sig1')::bigint,-2) FROM sctbl1 WHERE ((fields->>'sig3')::float8 - 1)/3 != 1 GROUP BY time, tags->>'device_id', fields->>'sig1' ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; - time | device_id | pow --------------------------------+-----------+---------------------- - 1677-09-21 00:12:43.145224+00 | dev1 | 2.26810857889389e-06 - 2016-06-13 17:43:50.1004+00 | dev3 | 2.32837749243861e-10 - 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 2.0254050607581e-07 - 2016-06-13 17:43:50.1004+00 | dev2 | 7.86609375546018e-10 - 2019-05-02 16:12:41.098+00 | dev3 | 9.82694745531196e-06 -(5 rows) - ---Testcase 55: -SELECT min(time)+'10 days'::interval, min((fields->>'sig3')::float8) FROM sctbl1 WHERE false GROUP BY fields->>'sig1',fields->>'sig2', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; - ?column? | min -----------+----- -(0 rows) - ---Testcase 56: -SELECT min(time)+'10 days'::interval, min((fields->>'sig3')::float8) FROM sctbl1 WHERE (fields->>'sig3')::float8 IN (-1,0.32,0.34,0.91,0.78) GROUP BY fields->>'sig3' HAVING min((fields->>'sig1')::bigint) > min((fields->>'sig3')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; - ?column? | min ------------------------------+------ - 2016-06-23 17:43:50.1004+00 | -1 - 2019-05-12 16:12:41.098+00 | 0.32 -(2 rows) - ---Testcase 57: -SELECT max((fields->>'sig3')::float8), count(*), exists(SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > 1), exists (SELECT count(*) FROM sctbl1 WHERE (fields->>'sig4')::boolean in ('t','f')) FROM sctbl1 WHERE (fields->>'sig5')::boolean =true GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 5 OFFSET 0; - max | count | exists | exists -------+-------+--------+-------- - 0.25 | 2 | f | t - 0.32 | 2 | f | t - 0.32 | 1 | f | t -(3 rows) - ---Join table, each table has 5 fields ---Testcase 58: -SELECT * FROM sctbl1 s1 FULL JOIN sctbl2 s2 ON s1.tags->>'device_id'=s2.tags->>'device_id'; - time | tags | fields | time | tags | fields --------------------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 1677-09-21 00:12:43.145224+00 | {"device_id": "dev1"} | {"sig1": "-664", "sig2": null, "sig3": "0.78", "sig4": "true", "sig5": "false"} | 2016-06-13 17:43:50.1004+00 | {"device_id": "dev1"} | {"sig1": "640", "sig2": "敷ヘカウ告政ヨハツヤ", "sig3": "20.4222211221", "sig4": "true", "sig5": "[(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)]"} - 1677-09-21 00:12:43.145224+00 | {"device_id": "dev1"} | {"sig1": "-664", "sig2": null, "sig3": "0.78", "sig4": "true", "sig5": "false"} | 2262-04-11 23:47:16.854776+00 | {"device_id": "dev1"} | {"sig1": "7060", "sig2": null, "sig3": "-3230.17", "sig4": "true", "sig5": "[(-121.9044,37.895),(-121.9044,37.899)]"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.79769313486", "sig4": "true", "sig5": "true"} | 2016-06-13 17:43:50.1004+00 | {"device_id": "dev1"} | {"sig1": "640", "sig2": "敷ヘカウ告政ヨハツヤ", "sig3": "20.4222211221", "sig4": "true", "sig5": "[(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)]"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.79769313486", "sig4": "true", "sig5": "true"} | 2262-04-11 23:47:16.854776+00 | {"device_id": "dev1"} | {"sig1": "7060", "sig2": null, "sig3": "-3230.17", "sig4": "true", "sig5": "[(-121.9044,37.895),(-121.9044,37.899)]"} - 2019-05-02 16:12:41.098+00 | {"device_id": "\"dev 1\""} | {"sig1": "70220", "sig2": "いろはにほへど ちりぬるをわがよたれぞ", "sig3": "0.37", "sig4": "true", "sig5": "false"} | | | - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false", "sig5": "true"} | 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "7950", "sig2": "`~!@#$%^&*()_+=-{}[]|:;<>?/.", "sig3": "220.2215", "sig4": "false", "sig5": "[(-122.2364,37.436),(-122.2364,37.443)]"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false", "sig5": "true"} | 2262-04-11 23:47:16.854776+00 | {"device_id": "dev2"} | {"sig1": "-7880", "sig2": "EFQEF", "sig3": "2330.8", "sig4": "false", "sig5": "[(-121.9026,37.843),(-121.9028,37.843)]"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "-8555", "sig2": "AHWEMAKDF", "sig3": "0.34", "sig4": "false", "sig5": "false"} | 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "7950", "sig2": "`~!@#$%^&*()_+=-{}[]|:;<>?/.", "sig3": "220.2215", "sig4": "false", "sig5": "[(-122.2364,37.436),(-122.2364,37.443)]"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "-8555", "sig2": "AHWEMAKDF", "sig3": "0.34", "sig4": "false", "sig5": "false"} | 2262-04-11 23:47:16.854776+00 | {"device_id": "dev2"} | {"sig1": "-7880", "sig2": "EFQEF", "sig3": "2330.8", "sig4": "false", "sig5": "[(-121.9026,37.843),(-121.9028,37.843)]"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "d ,=ev2"} | {"sig1": "2222", "sig2": "x'a8a9aaabacadaeaf'", "sig3": "-1", "sig4": "false", "sig5": "false"} | | | - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false", "sig5": "true"} | 1677-09-21 00:12:43.145224+00 | {"device_id": "dev3"} | {"sig1": "-30", "sig2": null, "sig3": "102.3827810127", "sig4": "false", "sig5": "[(-122.106469,37.66446),(-122.1067,37.664)]"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false", "sig5": "true"} | 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "6990", "sig2": "wr3wri", "sig3": "5630.9", "sig4": "false", "sig5": "[(-121.900576,37.74452),(-121.900804,37.74889)]"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "319", "sig2": "P_AEF-wefA", "sig3": "0.32", "sig4": "false", "sig5": "true"} | 1677-09-21 00:12:43.145224+00 | {"device_id": "dev3"} | {"sig1": "-30", "sig2": null, "sig3": "102.3827810127", "sig4": "false", "sig5": "[(-122.106469,37.66446),(-122.1067,37.664)]"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "319", "sig2": "P_AEF-wefA", "sig3": "0.32", "sig4": "false", "sig5": "true"} | 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "6990", "sig2": "wr3wri", "sig3": "5630.9", "sig4": "false", "sig5": "[(-121.900576,37.74452),(-121.900804,37.74889)]"} - 2262-04-11 23:47:16.854776+00 | {"device_id": "'dev3'"} | {"sig1": "34422", "sig2": "散りぬるを我が世誰", "sig3": "0.32", "sig4": "false", "sig5": "true"} | | | -(15 rows) - ---Testcase 59: -SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fields->>'sig2' sig2,(s1.fields->>'sig3')::float8 sig3,(s1.fields->>'sig4')::boolean sig4,s2.fields->>'sig5' sig5 FROM sctbl1 s1 LEFT JOIN sctbl2 s2 ON (s1.fields->>'sig4')::boolean=(s2.fields->>'sig4')::boolean; - device_id | sig1 | sig2 | sig3 | sig4 | sig5 ------------+-------+----------------------------------------+----------------+------+--------------------------------------------------------------- - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - dev3 | 319 | P_AEF-wefA | 0.32 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - dev2 | -8555 | AHWEMAKDF | 0.34 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] - "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] - dev1 | -664 | | 0.78 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | [(-122.2364,37.436),(-122.2364,37.443)] - dev3 | 319 | P_AEF-wefA | 0.32 | f | [(-122.2364,37.436),(-122.2364,37.443)] - dev2 | -8555 | AHWEMAKDF | 0.34 | f | [(-122.2364,37.436),(-122.2364,37.443)] - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | [(-122.2364,37.436),(-122.2364,37.443)] - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | [(-122.2364,37.436),(-122.2364,37.443)] - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | [(-122.2364,37.436),(-122.2364,37.443)] - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - dev3 | 319 | P_AEF-wefA | 0.32 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - dev2 | -8555 | AHWEMAKDF | 0.34 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | [(-121.9044,37.895),(-121.9044,37.899)] - "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | [(-121.9044,37.895),(-121.9044,37.899)] - dev1 | -664 | | 0.78 | t | [(-121.9044,37.895),(-121.9044,37.899)] - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | [(-121.9026,37.843),(-121.9028,37.843)] - dev3 | 319 | P_AEF-wefA | 0.32 | f | [(-121.9026,37.843),(-121.9028,37.843)] - dev2 | -8555 | AHWEMAKDF | 0.34 | f | [(-121.9026,37.843),(-121.9028,37.843)] - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | [(-121.9026,37.843),(-121.9028,37.843)] - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | [(-121.9026,37.843),(-121.9028,37.843)] - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | [(-121.9026,37.843),(-121.9028,37.843)] -(30 rows) - ---Testcase 60: -SELECT s2.device_id,s2.sig1,s2.sig2,s2.sig3,s1.sig4,s1.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 RIGHT JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 using(sig2) where (s2.sig1)::bigint > 0 ORDER BY s2.device_id,s2.sig1,s2.sig2,s2.sig3,s1.sig4,s1.sig5; - device_id | sig1 | sig2 | sig3 | sig4 | sig5 ------------+------+------------------------------+---------------+------+------ - dev1 | 640 | 敷ヘカウ告政ヨハツヤ | 20.4222211221 | | - dev1 | 7060 | | -3230.17 | | - dev2 | 7950 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | 220.2215 | | - dev3 | 6990 | wr3wri | 5630.9 | | -(4 rows) - ---Testcase 61: -SELECT * FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 LEFT OUTER JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 using (sig2) ORDER BY s1.sig1,s1.sig2; - sig2 | time | device_id | sig1 | sig3 | sig4 | sig5 | time | device_id | sig1 | sig3 | sig4 | sig5 -----------------------------------------+-------------------------------+-----------+-------+----------------+------+------+------+-----------+------+------+------+------ - AHWEMAKDF | 2019-05-02 16:12:41.098+00 | dev2 | -8555 | 0.34 | f | f | | | | | | - | 1677-09-21 00:12:43.145224+00 | dev1 | -664 | 0.78 | t | f | | | | | | - 2e2eawekfrjq2o | 2019-05-02 16:12:41.098+00 | dev1 | 11 | -0.79769313486 | t | t | | | | | | - P_AEF-wefA | 2019-05-02 16:12:41.098+00 | dev3 | 319 | 0.32 | f | t | | | | | | - x'a8a9aaabacadaeaf' | 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 2222 | -1 | f | f | | | | | | - 散りぬるを我が世誰 | 2262-04-11 23:47:16.854776+00 | 'dev3' | 34422 | 0.32 | f | t | | | | | | - abcdefghijklmnopqrstuvwxyz | 2016-06-13 17:43:50.1004+00 | dev2 | 35655 | 0.25 | f | t | | | | | | - `~!@#$%^&*()_+= | 2016-06-13 17:43:50.1004+00 | dev3 | 65535 | -0.91 | f | t | | | | | | - いろはにほへど ちりぬるをわがよたれぞ | 2019-05-02 16:12:41.098+00 | "dev 1" | 70220 | 0.37 | t | f | | | | | | -(9 rows) - ---Testcase 62: -SELECT s1.device_id,s1.sig1,s1.sig2,s1.sig3,s1.sig4,s1.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 NATURAL JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2; -ERROR: JOIN/USING types boolean and text cannot be matched ---Testcase 63: -SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fields->>'sig2' sig2,(s1.fields->>'sig3')::float8 sig3,(s1.fields->>'sig4')::boolean sig4,(s1.fields->>'sig5')::boolean sig5 FROM sctbl1 s1 JOIN sctbl2 s2 on true; - device_id | sig1 | sig2 | sig3 | sig4 | sig5 ------------+-------+----------------------------------------+----------------+------+------ - dev1 | -664 | | 0.78 | t | f - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t - dev2 | -8555 | AHWEMAKDF | 0.34 | f | f - dev3 | 319 | P_AEF-wefA | 0.32 | f | t - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t - dev1 | -664 | | 0.78 | t | f - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t - dev2 | -8555 | AHWEMAKDF | 0.34 | f | f - dev3 | 319 | P_AEF-wefA | 0.32 | f | t - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t - dev1 | -664 | | 0.78 | t | f - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t - dev2 | -8555 | AHWEMAKDF | 0.34 | f | f - dev3 | 319 | P_AEF-wefA | 0.32 | f | t - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t - dev1 | -664 | | 0.78 | t | f - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t - dev2 | -8555 | AHWEMAKDF | 0.34 | f | f - dev3 | 319 | P_AEF-wefA | 0.32 | f | t - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t - dev1 | -664 | | 0.78 | t | f - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t - dev2 | -8555 | AHWEMAKDF | 0.34 | f | f - dev3 | 319 | P_AEF-wefA | 0.32 | f | t - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t - dev1 | -664 | | 0.78 | t | f - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t - dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t - "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f - dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t - dev2 | -8555 | AHWEMAKDF | 0.34 | f | f - dev3 | 319 | P_AEF-wefA | 0.32 | f | t - 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t -(54 rows) - --------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ ---Update data -\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null ---Testcase 64: -DROP FOREIGN TABLE sctbl1; ---Testcase 65: -CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); ---Testcase 66: -SELECT * FROM sctbl1; - time | tags | fields --------------------------------+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 1677-09-21 00:12:43.145224+00 | {"device_id": "dev1"} | {"sig1": "-664", "sig2": null, "sig3": "0.78", "sig4": "true", "sig5": "false", "sig6": "22", "sig7": "-123445600", "sig8": "4.026", "sig9": "0.24", "sig10": "33", "sig11": ")#O3-kaej", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "false", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "d ,=ev2"} | {"sig1": "2222", "sig2": "x'a8a9aaabacadaeaf'", "sig3": "-1", "sig4": "false", "sig5": "false", "sig6": "33666", "sig7": "-12344560", "sig8": "2.024", "sig9": "-0.22", "sig10": "26", "sig11": "Os", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "false", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0.1"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false", "sig5": "true", "sig6": "33", "sig7": "323445600", "sig8": "5.027", "sig9": "0.425", "sig10": "44", "sig11": "3ae\\aefw\\naf", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false", "sig5": "true", "sig6": "311", "sig7": "-123445600", "sig8": "6.028", "sig9": "0.26", "sig10": "55", "sig11": "wwefs", "sig12": null, "sig13": "false", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": null, "sig19": null, "sig20": "OFF", "sig21": "false", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0.5"} - 2019-05-02 16:12:41.098+00 | {"device_id": "\"dev 1\""} | {"sig1": "70220", "sig2": "いろはにほへど ちりぬるをわがよたれぞ", "sig3": "0.37", "sig4": "true", "sig5": "false", "sig6": "43", "sig7": "223445600", "sig8": "7.029", "sig9": "-0.27", "sig10": "66", "sig11": "3333", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.797693134862", "sig4": "true", "sig5": "true", "sig6": "11", "sig7": "-1.234456e+78", "sig8": "1.023", "sig9": "-0.421", "sig10": "226", "sig11": "ws", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "-8555", "sig2": "AHWEMAKDF", "sig3": "0.34", "sig4": "false", "sig5": "false", "sig6": "5", "sig7": "-123445600", "sig8": "8.03", "sig9": "-0.9", "sig10": "77", "sig11": "333u", "sig12": "this is a string", "sig13": "false", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "false", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0.7"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "319", "sig2": "P_AEF-wefA", "sig3": "0.32", "sig4": "false", "sig5": "true", "sig6": "111545", "sig7": "-223445600", "sig8": "9.031", "sig9": "-0.9", "sig10": "8228", "sig11": "1122e", "sig12": null, "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} - 2262-04-11 23:47:16.854776+00 | {"device_id": "'dev3'"} | {"sig1": "34422", "sig2": "散りぬるを我が世誰", "sig3": "0.32", "sig4": "false", "sig5": "true", "sig6": "232", "sig7": "123445600", "sig8": "3.025", "sig9": "-0.423", "sig10": "22", "sig11": "Zep", "sig12": null, "sig13": "false", "sig14": null, "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": null, "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0.2"} -(9 rows) - ---Testcase 67: -SELECT avg(null::numeric) FROM sctbl1; - avg ------ - -(1 row) - ---Testcase 68: -SELECT sqrt(null::float8) FROM sctbl1; - sqrt ------- - - - - - - - - - -(9 rows) - ---Testcase 69: -SELECT sum('NaN'::numeric) FROM sctbl1; - sum ------ - NaN -(1 row) - ---Select fields,tags ---Testcase 70: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig6')::bigint sig6 FROM sctbl1 WHERE NOT (fields->>'sig6')::bigint < (fields->>'sig1')::bigint ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; - device_id | sig1 | sig3 | sig6 ------------+-------+-----------------+-------- - dev3 | 319 | 0.32 | 111545 - d ,=ev2 | 2222 | -1 | 33666 - dev2 | -8555 | 0.34 | 5 - dev1 | -664 | 0.78 | 22 - dev1 | 11 | -0.797693134862 | 11 -(5 rows) - ---Testcase 71: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig7')::float8 sig7 FROM sctbl1 WHERE (fields->>'sig7')::float8 < 0 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; - device_id | sig1 | sig3 | sig7 ------------+-------+-----------------+--------------- - dev3 | 319 | 0.32 | -223445600 - dev3 | 65535 | -0.91 | -123445600 - d ,=ev2 | 2222 | -1 | -12344560 - dev2 | -8555 | 0.34 | -123445600 - dev1 | -664 | 0.78 | -123445600 - dev1 | 11 | -0.797693134862 | -1.234456e+78 -(6 rows) - ---Testcase 72: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig8')::float8 sig8 FROM sctbl1 WHERE NOT time >'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 2; - device_id | sig1 | sig3 | sig8 ------------+-------+-----------------+------- - d ,=ev2 | 2222 | -1 | 2.024 - dev2 | -8555 | 0.34 | 8.03 - dev2 | 35655 | 0.25 | 5.027 - "dev 1" | 70220 | 0.37 | 7.029 - dev1 | -664 | 0.78 | 4.026 - dev1 | 11 | -0.797693134862 | 1.023 -(6 rows) - ---Testcase 73: -SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6,(fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::int sig10,fields->>'sig11' sig11,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,fields->>'sig18' sig18,fields->>'sig19' sig19,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; - time | device_id | sig1 | sig2 | sig3 | sig4 | sig5 | sig6 | sig7 | sig8 | sig9 | sig10 | sig11 | sig12 | sig13 | sig14 | sig15 | sig16 | sig17 | sig18 | sig19 | sig20 | sig21 | sig22 | sig23 | sig24 | sig25 --------------------------------+-----------+-------+----------------------------------------+-----------------+------+------+--------+---------------+-------+--------+-------+--------------+------------------+-------+----------------+---------------------+----------------------+---------------------+-------+-------+-------+-------+-------+-------+-------+------- - 2262-04-11 23:47:16.854776+00 | 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t | 232 | 123445600 | 3.025 | -0.423 | 22 | Zep | | f | | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | | t | wef | 1112 | 122 | 0.2 - 2019-05-02 16:12:41.098+00 | dev1 | 11 | 2e2eawekfrjq2o | -0.797693134862 | t | t | 11 | -1.234456e+78 | 1.023 | -0.421 | 226 | ws | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 - 2019-05-02 16:12:41.098+00 | "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f | 43 | 223445600 | 7.029 | -0.27 | 66 | 3333 | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 - 2019-05-02 16:12:41.098+00 | dev2 | -8555 | AHWEMAKDF | 0.34 | f | f | 5 | -123445600 | 8.03 | -0.9 | 77 | 333u | this is a string | f | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0.7 - 2019-05-02 16:12:41.098+00 | dev3 | 319 | P_AEF-wefA | 0.32 | f | t | 111545 | -223445600 | 9.031 | -0.9 | 8228 | 1122e | | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 - 2016-06-13 17:43:50.1004+00 | dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t | 33 | 323445600 | 5.027 | 0.425 | 44 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 - 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f | 33666 | -12344560 | 2.024 | -0.22 | 26 | Os | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0.1 - 2016-06-13 17:43:50.1004+00 | dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t | 311 | -123445600 | 6.028 | 0.26 | 55 | wwefs | | f | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | | | OFF | f | wef | 1112 | 122 | 0.5 - 1677-09-21 00:12:43.145224+00 | dev1 | -664 | | 0.78 | t | f | 22 | -123445600 | 4.026 | 0.24 | 33 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0 -(9 rows) - ---Testcase 74: -SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6,(fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::int sig10,fields->>'sig11' sig11,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,fields->>'sig18' sig18,fields->>'sig19' sig19,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; - time | device_id | sig1 | sig2 | sig3 | sig4 | sig5 | sig6 | sig7 | sig8 | sig9 | sig10 | sig11 | sig12 | sig13 | sig14 | sig15 | sig16 | sig17 | sig18 | sig19 | sig20 | sig21 | sig22 | sig23 | sig24 | sig25 -------+-----------+------+------+------+------+------+------+------+------+------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------- -(0 rows) - ---Testcase 75: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig9')::float8 sig9, (fields->>'sig10')::int sig10,fields->>'sig11' sig11 FROM sctbl1 WHERE (fields->>'sig8')::float8 BETWEEN 0.0 AND 10.0 ORDER BY (fields->>'sig1')::bigint DESC LIMIT 15 OFFSET 2; - sig1 | sig9 | sig10 | sig11 --------+--------+-------+-------------- - 35655 | 0.425 | 44 | 3ae\aefw\naf - 34422 | -0.423 | 22 | Zep - 2222 | -0.22 | 26 | Os - 319 | -0.9 | 8228 | 1122e - 11 | -0.421 | 226 | ws - -664 | 0.24 | 33 | )#O3-kaej - -8555 | -0.9 | 77 | 333u -(7 rows) - ---Testcase 76: -SELECT * FROM sctbl1 WHERE fields->>'sig11' LIKE 'w%' ORDER BY fields->>'sig11' DESC LIMIT 15 OFFSET 0; - time | tags | fields ------------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false", "sig5": "true", "sig6": "311", "sig7": "-123445600", "sig8": "6.028", "sig9": "0.26", "sig10": "55", "sig11": "wwefs", "sig12": null, "sig13": "false", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": null, "sig19": null, "sig20": "OFF", "sig21": "false", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0.5"} - 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.797693134862", "sig4": "true", "sig5": "true", "sig6": "11", "sig7": "-1.234456e+78", "sig8": "1.023", "sig9": "-0.421", "sig10": "226", "sig11": "ws", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} - 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false", "sig5": "true", "sig6": "33", "sig7": "323445600", "sig8": "5.027", "sig9": "0.425", "sig10": "44", "sig11": "3ae\\aefw\\naf", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} -(3 rows) - ---Testcase 77: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13 FROM sctbl1 WHERE NOT EXISTS (SELECT fields->>'sig12' FROM sctbl1 WHERE fields->>'sig11'='33') ORDER BY tags->>'device_id' DESC,(fields->>'sig1')::bigint ASC LIMIT 15 OFFSET 0; - device_id | sig1 | sig2 | sig12 | sig13 ------------+-------+----------------------------------------+------------------+------- - 'dev3' | 34422 | 散りぬるを我が世誰 | | f - dev3 | 319 | P_AEF-wefA | | t - dev3 | 65535 | `~!@#$%^&*()_+= | | f - d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | this is a string | t - dev2 | -8555 | AHWEMAKDF | this is a string | f - dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | this is a string | t - "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | this is a string | t - dev1 | -664 | | this is a string | t - dev1 | 11 | 2e2eawekfrjq2o | this is a string | t -(9 rows) - ---Testcase 78: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15 FROM sctbl1 WHERE (fields->>'sig9')::float8 < ALL (SELECT (fields->>'sig8')::float8 FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0 AND fields->>'sig8' IS NOT NULL) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; - sig1 | sig2 | sig3 | sig14 | sig15 --------+----------------------------------------+-----------------+----------------+--------------------- - 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | example string | 9223372036854775807 - 65535 | `~!@#$%^&*()_+= | -0.91 | example string | 9223372036854775807 - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | example string | 9223372036854775807 - 34422 | 散りぬるを我が世誰 | 0.32 | | 9223372036854775807 - 2222 | x'a8a9aaabacadaeaf' | -1 | example string | 9223372036854775807 - 319 | P_AEF-wefA | 0.32 | example string | 9223372036854775807 - 11 | 2e2eawekfrjq2o | -0.797693134862 | example string | 9223372036854775807 - -664 | | 0.78 | example string | 9223372036854775807 - -8555 | AHWEMAKDF | 0.34 | example string | 9223372036854775807 -(9 rows) - ---Testcase 79: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig16')::bigint sig16 FROM sctbl1 WHERE (fields->>'sig9')::float8 = ANY (ARRAY[-0.22,0.425,-0.9]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig16 --------+----------------------------+------+------+---------------------- - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | -9223372036854775808 - 2222 | x'a8a9aaabacadaeaf' | -1 | f | -9223372036854775808 - 319 | P_AEF-wefA | 0.32 | f | -9223372036854775808 - -8555 | AHWEMAKDF | 0.34 | f | -9223372036854775808 -(4 rows) - ---Testcase 80: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig17')::bigint sig17 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig10' FROM sctbl1 WHERE (fields->>'sig10')::bigint!=77) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig17 --------+----------------------------------------+-----------------+------+--------------------- - 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | 9223372036854775807 - 65535 | `~!@#$%^&*()_+= | -0.91 | f | 9223372036854775807 - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | 9223372036854775807 - 34422 | 散りぬるを我が世誰 | 0.32 | f | 9223372036854775807 - 2222 | x'a8a9aaabacadaeaf' | -1 | f | 9223372036854775807 - 319 | P_AEF-wefA | 0.32 | f | 9223372036854775807 - 11 | 2e2eawekfrjq2o | -0.797693134862 | t | 9223372036854775807 - -664 | | 0.78 | t | 9223372036854775807 - -8555 | AHWEMAKDF | 0.34 | f | 9223372036854775807 -(9 rows) - ---Testcase 81: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,fields->>'sig18' sig18 FROM sctbl1 WHERE fields->>'sig6'=ANY (ARRAY(SELECT fields->>'sig10' FROM sctbl1 WHERE (fields->>'sig10')::bigint%2 !=0)) ORDER BY 1 DESC LIMIT 15 OFFSET 0; - sig1 | sig2 | sig3 | sig4 | sig18 --------+----------------------------+------+------+------- - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | west -(1 row) - ---Testcase 82: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,fields->>'sig19' sig19,fields->>'sig20' sig20 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig11' FROM sctbl1 WHERE (fields->>'sig13')::boolean=true) ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; - sig1 | sig2 | sig3 | sig19 | sig20 --------+----------------------------------------+-------+-------+------- - 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | east | OFF - 65535 | `~!@#$%^&*()_+= | -0.91 | | OFF - 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | east | OFF - 34422 | 散りぬるを我が世誰 | 0.32 | east | - 2222 | x'a8a9aaabacadaeaf' | -1 | east | OFF -(5 rows) - ---Testcase 83: -SELECT (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig15')::bigint+(fields->>'sig16')::bigint as ss,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21 FROM sctbl1 WHERE fields->>'sig12' IS NULL ORDER BY (fields->>'sig1')::bigint DESC,fields->>'sig12' ASC LIMIT 15 OFFSET 0; - sig15 | sig16 | ss | sig20 | sig21 ----------------------+----------------------+----+-------+------- - 9223372036854775807 | -9223372036854775808 | -1 | OFF | f - 9223372036854775807 | -9223372036854775808 | -1 | | t - 9223372036854775807 | -9223372036854775808 | -1 | OFF | t -(3 rows) - ---Testcase 84: -SELECT (fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,(fields->>'sig16')::bigint/(fields->>'sig17')::bigint as dd,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23 FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL ORDER BY fields->>'sig12' DESC,(fields->>'sig1')::int ASC LIMIT 15 OFFSET 0; - sig16 | sig17 | dd | sig22 | sig23 -----------------------+---------------------+----+-------+------- - -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 - -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 - -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 - -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 - -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 - -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 -(6 rows) - ---Testcase 85: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig17')::bigint sig17,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25,(fields->>'sig17')::bigint*(fields->>'sig25')::float8 as mm FROM sctbl1 WHERE NOT (fields->>'sig10')::bigint=15 ORDER BY fields->>'sig20' DESC LIMIT 15 OFFSET 0; - sig1 | sig17 | sig24 | sig25 | mm --------+---------------------+-------+-------+---------------------- - 34422 | 9223372036854775807 | 122 | 0.2 | 1.84467440737096e+18 - 2222 | 9223372036854775807 | 122 | 0.1 | 9.22337203685478e+17 - 65535 | 9223372036854775807 | 122 | 0.5 | 4.61168601842739e+18 - 35655 | 9223372036854775807 | 122 | 0 | 0 - -664 | 9223372036854775807 | 122 | 0 | 0 - 319 | 9223372036854775807 | 122 | 0 | 0 - -8555 | 9223372036854775807 | 122 | 0.7 | 6.45636042579834e+18 - 11 | 9223372036854775807 | 122 | 0 | 0 - 70220 | 9223372036854775807 | 122 | 0 | 0 -(9 rows) - ---Testcase 86: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig10')::bigint != 0 AND (fields->>'sig7')::float8=-1.234456e+78 ORDER BY 1 DESC,2 ASC LIMIT 15 OFFSET 0; -ERROR: influxdb_fdw : error parsing query: found e, expected ) at line 1, char 169 ---Testcase 87: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 > -1.0 OR fields->>'sig12' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; - sig21 | sig22 | sig23 | sig24 | sig25 --------+-------+-------+-------+------- - t | wef | 1112 | 122 | 0 - t | wef | 1112 | 122 | 0 - t | wef | 1112 | 122 | 0 - t | wef | 1112 | 122 | 0.2 - f | wef | 1112 | 122 | 0 - f | wef | 1112 | 122 | 0.1 - f | wef | 1112 | 122 | 0.7 -(7 rows) - ---Testcase 88: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 < 0 AND fields->>'sig12' > 'Mee' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; - sig21 | sig22 | sig23 | sig24 | sig25 --------+-------+-------+-------+------- - t | wef | 1112 | 122 | 0 - f | wef | 1112 | 122 | 0 - f | wef | 1112 | 122 | 0.1 - f | wef | 1112 | 122 | 0.7 -(4 rows) - ---Testcase 89: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 IN (1.234456e+8,-1.234456e+8) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; - sig21 | sig22 | sig23 | sig24 | sig25 --------+-------+-------+-------+------- - t | wef | 1112 | 122 | 0.2 - f | wef | 1112 | 122 | 0 - f | wef | 1112 | 122 | 0.5 - f | wef | 1112 | 122 | 0.7 -(4 rows) - ---Testcase 90: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE fields->>'sig12' LIKE 't%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; - sig21 | sig22 | sig23 | sig24 | sig25 --------+-------+-------+-------+------- - t | wef | 1112 | 122 | 0 - t | wef | 1112 | 122 | 0 - t | wef | 1112 | 122 | 0 - f | wef | 1112 | 122 | 0 - f | wef | 1112 | 122 | 0.1 - f | wef | 1112 | 122 | 0.7 -(6 rows) - ---Testcase 91: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE NOT EXISTS (SELECT fields->>'sig22' FROM sctbl1 WHERE fields->>'sig12'='AHWEMAKDF') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 1; - sig21 | sig22 | sig23 | sig24 | sig25 --------+-------+-------+-------+------- - t | wef | 1112 | 122 | 0 - t | wef | 1112 | 122 | 0 - t | wef | 1112 | 122 | 0 - t | wef | 1112 | 122 | 0.2 - f | wef | 1112 | 122 | 0 - f | wef | 1112 | 122 | 0.1 - f | wef | 1112 | 122 | 0.5 - f | wef | 1112 | 122 | 0.7 -(8 rows) - ---Testcase 92: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig8')::float8 NOT IN (0, 1000, -1, -2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 2; - sig21 | sig22 | sig23 | sig24 | sig25 --------+-------+-------+-------+------- - t | wef | 1112 | 122 | 0 - t | wef | 1112 | 122 | 0 - t | wef | 1112 | 122 | 0.2 - f | wef | 1112 | 122 | 0 - f | wef | 1112 | 122 | 0.1 -(5 rows) - ---Testcase 93: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE fields->>'sig6'=ANY (ARRAY(SELECT fields->>'sig6' FROM sctbl1 WHERE (fields->>'sig10')::bigint%2!=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; - sig21 | sig22 | sig23 | sig24 | sig25 --------+-------+-------+-------+------- - f | wef | 1112 | 122 | 0 - f | wef | 1112 | 122 | 0.5 - f | wef | 1112 | 122 | 0.7 -(3 rows) - ---Testcase 94: -SELECT time, (fields->>'sig10')::bigint sig10,fields->>'sig12' sig12 FROM sctbl1 WHERE (fields->>'sig10')::bigint <= 1000 AND (fields->>'sig15')::float8 <> -5 AND (fields->>'sig10')::bigint <> 100 ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 1; - time | sig10 | sig12 ------------------------------+-------+------------------ - 2016-06-13 17:43:50.1004+00 | 55 | - 2016-06-13 17:43:50.1004+00 | 44 | this is a string - 2016-06-13 17:43:50.1004+00 | 26 | this is a string - 2019-05-02 16:12:41.098+00 | 226 | this is a string - 2019-05-02 16:12:41.098+00 | 77 | this is a string -(5 rows) - ---Select aggregate functions ---Testcase 95: -SELECT max(time), max((fields->>'sig15')::bigint*0.5), max((fields->>'sig17')::bigint - 10) FROM sctbl1 WHERE (fields->>'sig8')::float8 NOT IN (0.0, 1000, -1.0, -2.0) GROUP BY fields->>'sig15', fields->>'sig17' HAVING min((fields->>'sig8')::float8) < min((fields->>'sig17')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; - max | max | max --------------------------------+-----------------------+--------------------- - 2262-04-11 23:47:16.854776+00 | 4611686018427387903.5 | 9223372036854775797 -(1 row) - ---Testcase 96: -SELECT tags->>'device_id' device_id,abs((fields->>'sig16')::bigint), ceil((fields->>'sig8')::float8), (fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE (fields->>'sig15')::bigint > 0 AND (fields->>'sig13')::boolean = true; - device_id | abs | ceil | sig25 ------------+----------------------+------+------- - dev1 | -9223372036854775808 | 5 | 0 - d ,=ev2 | -9223372036854775808 | 3 | 0.1 - dev2 | -9223372036854775808 | 6 | 0 - "dev 1" | -9223372036854775808 | 8 | 0 - dev1 | -9223372036854775808 | 2 | 0 - dev3 | -9223372036854775808 | 10 | 0 -(6 rows) - ---Testcase 97: -SELECT count(tags->>'device_id'),sum((fields->>'sig10')::bigint),sum((fields->>'sig7')::float8+(fields->>'sig10')::bigint),stddev((fields->>'sig8')::float8 order by (fields->>'sig8')::float8) from sctbl1 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; - count | sum | sum | stddev --------+------+---------------+------------------ - 9 | 8777 | -1.234456e+78 | 2.74135140031336 -(1 row) - ---Testcase 98: -SELECT mode(fields->>'sig12') WITHIN GROUP (order by fields->>'sig12') from sctbl1; -ERROR: function mode(text, text) does not exist -LINE 1: SELECT mode(fields->>'sig12') WITHIN GROUP (order by fields-... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 99: -SELECT (fields->>'sig10')::int sig10,spread((fields->>'sig10')::bigint) FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig6' FROM sctbl1 WHERE (fields->>'sig13')::boolean in (true,false)) GROUP BY tags->>'device_id', fields->>'sig10',fields->>'sig21' HAVING (fields->>'sig21')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 1; -ERROR: ORDER BY position 3 is not in select list -LINE 1: ...s->>'sig21')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 15... - ^ ---Testcase 100: -SELECT (fields->>'sig9')::float8 sig9, acos((fields->>'sig9')::float8), atan((fields->>'sig9')::float8) FROM sctbl1 WHERE fields->>'sig12' IS NULL GROUP BY fields->>'sig9' HAVING min((fields->>'sig10')::bigint) < min((fields->>'sig6')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; - sig9 | acos | atan ---------+------------------+-------------------- - 0.26 | 1.30777412388643 | 0.254368058553266 - -0.423 | 2.0075498827442 | -0.400175410565532 - -0.9 | 2.69056584179353 | -0.732815101786507 -(3 rows) - ---Testcase 101: -SELECT (fields->>'sig9')::float8 sig9, log((fields->>'sig9')::float8),cos((fields->>'sig9')::float8) FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL AND (fields->>'sig9')::float8 > 0 GROUP BY fields->>'sig9' HAVING min((fields->>'sig9')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND sum((fields->>'sig3')::float8) > -1000 AND avg((fields->>'sig3')::float8) > -1000 ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; - sig9 | log | cos -------+--------------------+------------------ - 0.24 | -0.619788758288394 | 0.97133797485203 -(1 row) - ---Testcase 102: -SELECT (fields->>'sig10')::bigint sig10,(fields->>'sig8')::float8 sig8,ln((fields->>'sig10')::bigint), log10((fields->>'sig8')::float8) FROM sctbl1 WHERE NOT (fields->>'sig10')::bigint=5 GROUP BY fields->>'sig10', fields->>'sig8' HAVING min((fields->>'sig7')::float8) < 100 AND max((fields->>'sig6')::bigint) < 1000 AND (fields->>'sig10')::bigint > 0 AND (fields->>'sig8')::float8 > 0 ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; -ERROR: stub log10(float8) is called -CONTEXT: PL/pgSQL function log10(double precision) line 3 at RAISE ---Testcase 103: -SELECT max(time), max((fields->>'sig6')::bigint + (fields->>'sig7')::float8), min((fields->>'sig6')::bigint + (fields->>'sig7')::float8) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig8')::float8 > -1000 AND (fields->>'sig13')::boolean != true ) AS tb1 WHERE (fields->>'sig7')::float8 != -1 AND (fields->>'sig21')::boolean != true GROUP BY fields->>'sig6' ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; - max | max | min ------------------------------+------------+------------ - 2019-05-02 16:12:41.098+00 | -123445595 | -123445595 - 2016-06-13 17:43:50.1004+00 | -123445289 | -123445289 -(2 rows) - ---Testcase 104: -SELECT avg((fields->>'sig23')::bigint order by (fields->>'sig23')::bigint),avg((fields->>'sig24')::bigint * 0.5) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig8')::float8 > -1000 AND (fields->>'sig21')::boolean = true ) AS tb1 WHERE (fields->>'sig9')::float8 < 0 GROUP BY (fields->>'sig23')::bigint, fields->>'sig24' HAVING sum((fields->>'sig8')::float8) > avg((fields->>'sig9')::float8) ORDER BY 1 DESC, 2 LIMIT 15 OFFSET 0; - avg | avg ------------------------+--------------------- - 1112.0000000000000000 | 61.0000000000000000 -(1 row) - ---Testcase 105: -SELECT (fields->>'sig8')::float8 sig8,exp((fields->>'sig8')::float8),exp((fields->>'sig8')::float8*2) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig9')::float8 > -1000 AND (fields->>'sig21')::boolean = true ) AS tb1 WHERE true GROUP BY fields->>'sig8' ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; - sig8 | exp | exp --------+------------------+------------------ - 9.031 | 8358.21360806988 | 69859734.7181246 - 7.029 | 1128.9011444032 | 1274417.79383485 - 5.027 | 152.474901168402 | 23248.5954863141 - 3.025 | 20.594004711196 | 424.113030044764 - 1.023 | 2.78152684012137 | 7.73689156231557 -(5 rows) - ---Testcase 106: -SELECT min(time)+'10 days'::interval, min((fields->>'sig10')::bigint + (fields->>'sig25')::float8) FROM sctbl1 WHERE NOT time>'2020-01-03 20:30:50' GROUP BY fields->>'sig10', fields->>'sig25' HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; - ?column? | min --------------------------------+------ - 1677-10-01 00:12:43.145224+00 | 33 - 2016-06-23 17:43:50.1004+00 | 55.5 - 2016-06-23 17:43:50.1004+00 | 44 - 2016-06-23 17:43:50.1004+00 | 26.1 - 2019-05-12 16:12:41.098+00 | 8228 - 2019-05-12 16:12:41.098+00 | 226 - 2019-05-12 16:12:41.098+00 | 77.7 - 2019-05-12 16:12:41.098+00 | 66 -(8 rows) - ---Testcase 107: -SELECT floor((fields->>'sig23')::bigint*(fields->>'sig25')::float8), floor((fields->>'sig24')::bigint/(fields->>'sig25')::float8) FROM sctbl1 WHERE ((fields->>'sig25')::float8 - 1)/3 != 1 GROUP BY (fields->>'sig23')::bigint, (fields->>'sig24')::bigint,(fields->>'sig25')::float8 HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; -ERROR: division by zero ---Testcase 108: -SELECT time, tags->>'device_id' device_id, pow((fields->>'sig25')::float8,2) FROM sctbl1 WHERE ((fields->>'sig25')::float8 - 1)/3 != 1 GROUP BY time,tags->>'device_id',fields->>'sig25' ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; - time | device_id | pow --------------------------------+-----------+------ - 1677-09-21 00:12:43.145224+00 | dev1 | 0 - 2016-06-13 17:43:50.1004+00 | dev3 | 0.25 - 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 0.01 - 2016-06-13 17:43:50.1004+00 | dev2 | 0 - 2019-05-02 16:12:41.098+00 | dev3 | 0 - 2019-05-02 16:12:41.098+00 | dev2 | 0.49 - 2019-05-02 16:12:41.098+00 | "dev 1" | 0 - 2019-05-02 16:12:41.098+00 | dev1 | 0 - 2262-04-11 23:47:16.854776+00 | 'dev3' | 0.04 -(9 rows) - ---Testcase 109: -SELECT min(time)+'10 days'::interval, min((fields->>'sig23')::bigint) FROM sctbl1 WHERE false GROUP BY (fields->>'sig23')::bigint HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; - ?column? | min -----------+----- -(0 rows) - ---Testcase 110: -SELECT min(time)+'10 days'::interval, min((fields->>'sig23')::bigint) FROM sctbl1 WHERE (fields->>'sig23')::bigint IN (1112,1000,0) GROUP BY (fields->>'sig23')::bigint HAVING min((fields->>'sig23')::bigint) > min((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; - ?column? | min --------------------------------+------ - 1677-10-01 00:12:43.145224+00 | 1112 -(1 row) - ---Testcase 111: -SELECT max((fields->>'sig23')::bigint), count(*), exists(SELECT * FROM sctbl1 WHERE (fields->>'sig24')::bigint > 1), exists (SELECT count(*) FROM sctbl1 WHERE (fields->>'sig21')::boolean in ('T','F')) FROM sctbl1 WHERE (fields->>'sig13')::boolean =true GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 15 OFFSET 0; - max | count | exists | exists -------+-------+--------+-------- - 1112 | 3 | t | t - 1112 | 2 | t | t - 1112 | 1 | t | t -(3 rows) - ---Testcase 112: -SELECT (fields->>'sig9')::float8 sig9, abs(avg((fields->>'sig16')::bigint)),string_agg(fields->>'sig22',',' order by fields->>'sig22'),round(sin((fields->>'sig9')::float8)*2.3),sqrt(pow((fields->>'sig25')::float8,2)) FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL AND (fields->>'sig9')::float8 > 0 GROUP BY (fields->>'sig9')::float8,(fields->>'sig25')::float8; - sig9 | abs | string_agg | round | sqrt --------+---------------------+------------+-------+------ - 0.24 | 9223372036854775808 | wef | 1 | 0 - 0.425 | 9223372036854775808 | wef | 1 | 0 -(2 rows) - ---Join table ---Testcase 113: -SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig21')::boolean sig21,s1.fields->>'sig22' sig22,(s1.fields->>'sig23')::bigint sig23,(s1.fields->>'sig24')::int sig24,(s1.fields->>'sig25')::float8 sig25 FROM sctbl1 s1 FULL JOIN sctbl2 s2 ON s1.tags->>'device_id'=s2.tags->>'device_id' ORDER BY device_id,sig21,sig22,sig23,sig24,sig25; - device_id | sig21 | sig22 | sig23 | sig24 | sig25 ------------+-------+-------+-------+-------+------- - dev1 | f | wef | 1112 | 122 | 0 - dev1 | f | wef | 1112 | 122 | 0 - dev1 | t | wef | 1112 | 122 | 0 - dev1 | t | wef | 1112 | 122 | 0 - "dev 1" | t | wef | 1112 | 122 | 0 - dev2 | f | wef | 1112 | 122 | 0.7 - dev2 | f | wef | 1112 | 122 | 0.7 - dev2 | t | wef | 1112 | 122 | 0 - dev2 | t | wef | 1112 | 122 | 0 - d ,=ev2 | f | wef | 1112 | 122 | 0.1 - dev3 | f | wef | 1112 | 122 | 0.5 - dev3 | f | wef | 1112 | 122 | 0.5 - dev3 | t | wef | 1112 | 122 | 0 - dev3 | t | wef | 1112 | 122 | 0 - 'dev3' | t | wef | 1112 | 122 | 0.2 -(15 rows) - ---Testcase 114: -SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig21')::boolean sig21,s1.fields->>'sig22' sig22,(s1.fields->>'sig23')::bigint sig23,(s2.fields->>'sig4')::boolean sig4,s2.fields->>'sig5' sig5 FROM sctbl1 s1 LEFT JOIN sctbl2 s2 ON (s1.fields->>'sig21')::boolean=(s2.fields->>'sig4')::boolean; - device_id | sig21 | sig22 | sig23 | sig4 | sig5 ------------+-------+-------+-------+------+--------------------------------------------------------------- - dev2 | f | wef | 1112 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - dev3 | f | wef | 1112 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - d ,=ev2 | f | wef | 1112 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - dev1 | f | wef | 1112 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - 'dev3' | t | wef | 1112 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] - dev3 | t | wef | 1112 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] - dev1 | t | wef | 1112 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] - "dev 1" | t | wef | 1112 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] - dev2 | t | wef | 1112 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] - dev2 | f | wef | 1112 | f | [(-122.2364,37.436),(-122.2364,37.443)] - dev3 | f | wef | 1112 | f | [(-122.2364,37.436),(-122.2364,37.443)] - d ,=ev2 | f | wef | 1112 | f | [(-122.2364,37.436),(-122.2364,37.443)] - dev1 | f | wef | 1112 | f | [(-122.2364,37.436),(-122.2364,37.443)] - dev2 | f | wef | 1112 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - dev3 | f | wef | 1112 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - d ,=ev2 | f | wef | 1112 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - dev1 | f | wef | 1112 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - 'dev3' | t | wef | 1112 | t | [(-121.9044,37.895),(-121.9044,37.899)] - dev3 | t | wef | 1112 | t | [(-121.9044,37.895),(-121.9044,37.899)] - dev1 | t | wef | 1112 | t | [(-121.9044,37.895),(-121.9044,37.899)] - "dev 1" | t | wef | 1112 | t | [(-121.9044,37.895),(-121.9044,37.899)] - dev2 | t | wef | 1112 | t | [(-121.9044,37.895),(-121.9044,37.899)] - dev2 | f | wef | 1112 | f | [(-121.9026,37.843),(-121.9028,37.843)] - dev3 | f | wef | 1112 | f | [(-121.9026,37.843),(-121.9028,37.843)] - d ,=ev2 | f | wef | 1112 | f | [(-121.9026,37.843),(-121.9028,37.843)] - dev1 | f | wef | 1112 | f | [(-121.9026,37.843),(-121.9028,37.843)] -(26 rows) - ---Testcase 115: -SELECT s1.device_id,s1.sig21,s1.sig22,s1.sig23,s1.sig24,s1.sig25 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 RIGHT JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4, (fields->>'sig5')::boolean sig5 FROM sctbl2) s2 using(sig1) where s2.sig3 != 0; - device_id | sig21 | sig22 | sig23 | sig24 | sig25 ------------+-------+-------+-------+-------+------- - | | | | | - | | | | | - | | | | | - | | | | | - | | | | | - | | | | | -(6 rows) - ---Testcase 116: -SELECT * FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 FULL OUTER JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 USING(sig2) ORDER BY s1.sig2, s1.time, s1.device_id, s2.time, s2.device_id; - sig2 | time | device_id | sig1 | sig3 | sig4 | sig5 | sig6 | sig7 | sig8 | sig9 | sig10 | sig11 | sig12 | sig13 | sig14 | sig15 | sig16 | sig17 | sig18 | sig19 | sig20 | sig21 | sig22 | sig23 | sig24 | sig25 | time | device_id | sig1 | sig3 | sig4 | sig5 -----------------------------------------+-------------------------------+-----------+-------+-----------------+------+------+--------+---------------+-------+--------+-------+--------------+------------------+-------+----------------+---------------------+----------------------+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------------------------------+-----------+-------+----------------+------+--------------------------------------------------------------- - `~!@#$%^&*()_+= | 2016-06-13 17:43:50.1004+00 | dev3 | 65535 | -0.91 | f | t | 311 | -123445600 | 6.028 | 0.26 | 55 | wwefs | | f | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | | | OFF | f | wef | 1112 | 122 | 0.5 | | | | | | - いろはにほへど ちりぬるをわがよたれぞ | 2019-05-02 16:12:41.098+00 | "dev 1" | 70220 | 0.37 | t | f | 43 | 223445600 | 7.029 | -0.27 | 66 | 3333 | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 | | | | | | - 2e2eawekfrjq2o | 2019-05-02 16:12:41.098+00 | dev1 | 11 | -0.797693134862 | t | t | 11 | -1.234456e+78 | 1.023 | -0.421 | 226 | ws | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 | | | | | | - abcdefghijklmnopqrstuvwxyz | 2016-06-13 17:43:50.1004+00 | dev2 | 35655 | 0.25 | f | t | 33 | 323445600 | 5.027 | 0.425 | 44 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 | | | | | | - AHWEMAKDF | 2019-05-02 16:12:41.098+00 | dev2 | -8555 | 0.34 | f | f | 5 | -123445600 | 8.03 | -0.9 | 77 | 333u | this is a string | f | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0.7 | | | | | | - P_AEF-wefA | 2019-05-02 16:12:41.098+00 | dev3 | 319 | 0.32 | f | t | 111545 | -223445600 | 9.031 | -0.9 | 8228 | 1122e | | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 | | | | | | - x'a8a9aaabacadaeaf' | 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 2222 | -1 | f | f | 33666 | -12344560 | 2.024 | -0.22 | 26 | Os | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0.1 | | | | | | - 散りぬるを我が世誰 | 2262-04-11 23:47:16.854776+00 | 'dev3' | 34422 | 0.32 | f | t | 232 | 123445600 | 3.025 | -0.423 | 22 | Zep | | f | | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | | t | wef | 1112 | 122 | 0.2 | | | | | | - | 1677-09-21 00:12:43.145224+00 | dev1 | -664 | 0.78 | t | f | 22 | -123445600 | 4.026 | 0.24 | 33 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0 | | | | | | - | | | | | | | | | | | | | | | | | | | | | | | | | | | 1677-09-21 00:12:43.145224+00 | dev3 | -30 | 102.3827810127 | f | [(-122.106469,37.66446),(-122.1067,37.664)] - 敷ヘカウ告政ヨハツヤ | | | | | | | | | | | | | | | | | | | | | | | | | | | 2016-06-13 17:43:50.1004+00 | dev1 | 640 | 20.4222211221 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] - `~!@#$%^&*()_+=-{}[]|:;<>?/. | | | | | | | | | | | | | | | | | | | | | | | | | | | 2019-05-02 16:12:41.098+00 | dev2 | 7950 | 220.2215 | f | [(-122.2364,37.436),(-122.2364,37.443)] - wr3wri | | | | | | | | | | | | | | | | | | | | | | | | | | | 2019-05-02 16:12:41.098+00 | dev3 | 6990 | 5630.9 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] - | | | | | | | | | | | | | | | | | | | | | | | | | | | 2262-04-11 23:47:16.854776+00 | dev1 | 7060 | -3230.17 | t | [(-121.9044,37.895),(-121.9044,37.899)] - EFQEF | | | | | | | | | | | | | | | | | | | | | | | | | | | 2262-04-11 23:47:16.854776+00 | dev2 | -7880 | 2330.8 | f | [(-121.9026,37.843),(-121.9028,37.843)] -(15 rows) - ---Testcase 117: -SELECT s2.device_id,s2.sig1,s2.sig2,s2.sig3,s2.sig4,s2.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 NATURAL JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2; -ERROR: JOIN/USING types boolean and text cannot be matched ---Testcase 118: -SELECT s1.device_id,s1.sig11,s1.sig12,s1.sig13,s1.sig14,s1.sig15 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 on true; - device_id | sig11 | sig12 | sig13 | sig14 | sig15 ------------+--------------+------------------+-------+----------------+--------------------- - dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 - d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 - dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 - dev3 | wwefs | | f | example string | 9223372036854775807 - "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 - dev1 | ws | this is a string | t | example string | 9223372036854775807 - dev2 | 333u | this is a string | f | example string | 9223372036854775807 - dev3 | 1122e | | t | example string | 9223372036854775807 - 'dev3' | Zep | | f | | 9223372036854775807 - dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 - d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 - dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 - dev3 | wwefs | | f | example string | 9223372036854775807 - "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 - dev1 | ws | this is a string | t | example string | 9223372036854775807 - dev2 | 333u | this is a string | f | example string | 9223372036854775807 - dev3 | 1122e | | t | example string | 9223372036854775807 - 'dev3' | Zep | | f | | 9223372036854775807 - dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 - d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 - dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 - dev3 | wwefs | | f | example string | 9223372036854775807 - "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 - dev1 | ws | this is a string | t | example string | 9223372036854775807 - dev2 | 333u | this is a string | f | example string | 9223372036854775807 - dev3 | 1122e | | t | example string | 9223372036854775807 - 'dev3' | Zep | | f | | 9223372036854775807 - dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 - d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 - dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 - dev3 | wwefs | | f | example string | 9223372036854775807 - "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 - dev1 | ws | this is a string | t | example string | 9223372036854775807 - dev2 | 333u | this is a string | f | example string | 9223372036854775807 - dev3 | 1122e | | t | example string | 9223372036854775807 - 'dev3' | Zep | | f | | 9223372036854775807 - dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 - d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 - dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 - dev3 | wwefs | | f | example string | 9223372036854775807 - "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 - dev1 | ws | this is a string | t | example string | 9223372036854775807 - dev2 | 333u | this is a string | f | example string | 9223372036854775807 - dev3 | 1122e | | t | example string | 9223372036854775807 - 'dev3' | Zep | | f | | 9223372036854775807 - dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 - d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 - dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 - dev3 | wwefs | | f | example string | 9223372036854775807 - "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 - dev1 | ws | this is a string | t | example string | 9223372036854775807 - dev2 | 333u | this is a string | f | example string | 9223372036854775807 - dev3 | 1122e | | t | example string | 9223372036854775807 - 'dev3' | Zep | | f | | 9223372036854775807 -(54 rows) - ---Clean ---Testcase 119: -DROP FOREIGN TABLE sctbl1; -DROP FOREIGN TABLE sctbl2; -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; -DROP SERVER influxdb_svr CASCADE; -DROP EXTENSION influxdb_fdw; diff --git a/expected/10.18/schemaless/add_multi_key.out b/expected/10.18/schemaless/add_multi_key.out deleted file mode 100644 index 27dda15..0000000 --- a/expected/10.18/schemaless/add_multi_key.out +++ /dev/null @@ -1,2587 +0,0 @@ -SET datestyle=ISO; --- timestamp with time zone differs based on this -SET timezone='UTC'; -\set ECHO none --- Init data original -\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null --- Before update data ---Testcase 1: -CREATE EXTENSION influxdb_fdw CASCADE; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 4: -CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); --------------------------------------------------TC for before update test data------------------ --- Select all data with condition and combine clause ---Testcase 5: -SELECT * FROM sctbl3 WHERE time='2020-01-09 01:00:00+00' OR (fields->>'c3')::bigint=3 OR (fields->>'c3')::bigint=10.746 ORDER BY fields->>'c2'; - time | fields -------------------------+-------------------------------------------------------------------------------------- - 2020-01-11 01:00:00+00 | {"c2": "Change our locale from $ to ¥ in", "c3": "3", "c4": "30.631", "c5": "false"} - 2020-01-09 01:00:00+00 | {"c2": "Which started out as a kind", "c3": "1", "c4": "10.746", "c5": "true"} -(2 rows) - ---Testcase 6: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | c2 | c3 | c4 | c5 -------------------------+-----------------------------------+----+---------+---- - 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t - 2020-01-09 01:00:00+00 | Which started out as a kind | 1 | 10.746 | t - 2020-01-08 01:00:00+00 | In Bulgarian it is desirable | 0 | 0.774 | f - 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f - 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f -(5 rows) - ---Testcase 7: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; - time | c2 | c3 | c4 | c5 --------------------------------+----------------------------------------------------------------------------------+--------------+-----------+---- - 2262-04-11 23:47:16.854776+00 | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f - 2262-04-11 23:47:16.854776+00 | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f - 2020-01-13 01:00:00+00 | $ | 5 | 50.188 | f - 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 | 4 | 40.772 | f - 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in | 3 | 30.631 | f - 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t - 2020-01-09 01:00:00+00 | Which started out as a kind | 1 | 10.746 | t - 2020-01-08 01:00:00+00 | In Bulgarian it is desirable | 0 | 0.774 | f - 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f - 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f - 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t - 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t - 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t - 1677-09-21 00:12:43.145224+00 | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t - 1677-09-21 00:12:43.145224+00 | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | 1.78e+68 | f -(15 rows) - ---Testcase 8: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; - time | c2 | c3 | c4 | c5 -------+----+----+----+---- -(0 rows) - ---Testcase 9: -SELECT * FROM sctbl3 WHERE (fields->>'c5')::bool= true; - time | fields --------------------------------+--------------------------------------------------------------------------------------------------------------------------------------- - 1677-09-21 00:12:43.145224+00 | {"c2": "^%(@#%^(@#%&@#)%^)!^%)!)%", "c3": "-36854775808", "c4": "1.79e+68", "c5": "true"} - 2020-01-03 01:00:00+00 | {"c2": "いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ", "c3": "-5", "c4": "-50.232", "c5": "true"} - 2020-01-04 01:00:00+00 | {"c2": "色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見", "c3": "-4", "c4": "-40.652", "c5": "true"} - 2020-01-05 01:00:00+00 | {"c2": "กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ", "c3": "-3", "c4": "-30.756", "c5": "true"} - 2020-01-09 01:00:00+00 | {"c2": "Which started out as a kind", "c3": "1", "c4": "10.746", "c5": "true"} - 2020-01-10 01:00:00+00 | {"c2": "Canada Denmark Turkey Yemen Tokyo", "c3": "2", "c4": "20.312", "c5": "true"} -(6 rows) - ---Testcase 10: -SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint BETWEEN 0 AND 1000 ORDER BY fields->>'c2', (fields->>'c3')::bigint; - time | fields -------------------------+-------------------------------------------------------------------------------------- - 2020-01-13 01:00:00+00 | {"c2": "$", "c3": "5", "c4": "50.188", "c5": "false"} - 2020-01-10 01:00:00+00 | {"c2": "Canada Denmark Turkey Yemen Tokyo", "c3": "2", "c4": "20.312", "c5": "true"} - 2020-01-11 01:00:00+00 | {"c2": "Change our locale from $ to ¥ in", "c3": "3", "c4": "30.631", "c5": "false"} - 2020-01-12 01:00:00+00 | {"c2": "Chúc mừng năm mới 2021", "c3": "4", "c4": "40.772", "c5": "false"} - 2020-01-08 01:00:00+00 | {"c2": "In Bulgarian it is desirable", "c3": "0", "c4": "0.774", "c5": "false"} - 2020-01-09 01:00:00+00 | {"c2": "Which started out as a kind", "c3": "1", "c4": "10.746", "c5": "true"} -(6 rows) - ---Testcase 11: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2' LIKE 'C%' AND (fields->>'c5')::bool!= true ORDER BY 1 DESC,2 ASC,3 DESC,4,5; - time | c2 | c3 | c4 | c5 -------------------------+----------------------------------+----+--------+---- - 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 | 4 | 40.772 | f - 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in | 3 | 30.631 | f -(2 rows) - ---Testcase 12: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT EXISTS (SELECT fields->>'c2' FROM sctbl3 WHERE fields->>'c2'='abcd') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | c2 | c3 | c4 | c5 --------------------------------+------------------------------------+-------------+-----------+---- - 2262-04-11 23:47:16.854776+00 | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f - 2262-04-11 23:47:16.854776+00 | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f - 2020-01-13 01:00:00+00 | $ | 5 | 50.188 | f - 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 | 4 | 40.772 | f - 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in | 3 | 30.631 | f -(5 rows) - ---Testcase 13: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint < ALL (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | c2 | c3 | c4 | c5 -------------------------+-----------------------------------------------------------------------+----+---------+---- - 2020-01-08 01:00:00+00 | In Bulgarian it is desirable | 0 | 0.774 | f - 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f - 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f - 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t - 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t -(5 rows) - --- Select aggregate function and specific column from original table ---Testcase 14: -SELECT time, fields->>'c2' c2 FROM sctbl3 WHERE fields->>'c2'<='$' OR (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 ASC,2 DESC LIMIT 25 OFFSET 8; - time | c2 --------------------------------+------------------------------------ - 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo - 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in - 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 - 2020-01-13 01:00:00+00 | $ - 2262-04-11 23:47:16.854776+00 | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ - 2262-04-11 23:47:16.854776+00 | ăâđêôơưdêđêdờenờíìờẹ -(6 rows) - ---Testcase 15: -SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE time>= '2000-1-3 20:30:51' GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25 OFFSET 8; -ERROR: relation "view_sctbl3" does not exist -LINE 1: ...M sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl... - ^ ---Testcase 16: -SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c4')::double precision), max((fields->>'c4')::double precision)/2 FROM sctbl3 GROUP BY fields->>'c2'; - max | max | ?column? | ?column? | max | ?column? --------------------------------+--------------+--------------+--------------+-----------+----------- - 1677-09-21 00:12:43.145224+00 | -36854775808 | -36854775798 | -36854775818 | 1.79e+68 | 8.95e+67 - 2020-01-13 01:00:00+00 | 5 | 15 | -5 | 50.188 | 25.094 - 2020-01-05 01:00:00+00 | -3 | 7 | -13 | -30.756 | -15.378 - 2020-01-08 01:00:00+00 | 0 | 10 | -10 | 0.774 | 0.387 - 2020-01-07 01:00:00+00 | -1 | 9 | -11 | -10.746 | -5.373 - 2020-01-11 01:00:00+00 | 3 | 13 | -7 | 30.631 | 15.3155 - 2262-04-11 23:47:16.854776+00 | 36854775807 | 36854775817 | 36854775797 | -1.79e+68 | -8.95e+67 - 2020-01-12 01:00:00+00 | 4 | 14 | -6 | 40.772 | 20.386 - 2020-01-04 01:00:00+00 | -4 | 6 | -14 | -40.652 | -20.326 - 2020-01-06 01:00:00+00 | -2 | 8 | -12 | -20.56 | -10.28 - 1677-09-21 00:12:43.145224+00 | -36854775807 | -36854775797 | -36854775817 | 1.78e+68 | 8.9e+67 - 2262-04-11 23:47:16.854776+00 | 36854775806 | 36854775816 | 36854775796 | -1.78e+68 | -8.9e+67 - 2020-01-09 01:00:00+00 | 1 | 11 | -9 | 10.746 | 5.373 - 2020-01-03 01:00:00+00 | -5 | 5 | -15 | -50.232 | -25.116 - 2020-01-10 01:00:00+00 | 2 | 12 | -8 | 20.312 | 10.156 -(15 rows) - ---Testcase 17: -SELECT count(fields->>'c2'), (fields->>'c3')::bigint c3, fields->>'c4' c4 from sctbl3 GROUP BY fields->>'c2'; -ERROR: column "sctbl3.fields" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT count(fields->>'c2'), (fields->>'c3')::bigint c3, fie... - ^ ---Testcase 18: -SELECT 32 + (fields->>'c3')::bigint, (fields->>'c3')::bigint + (fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c3', fields->>'c5', fields->>'c2' ORDER BY fields->>'c2'; - ?column? | ?column? ---------------+-------------- - 30 | -4 - -36854775776 | -73709551616 - 37 | 10 - 29 | -6 - 27 | -10 - 31 | -2 - 36854775838 | 73709551612 - 34 | 4 - 35 | 6 - 36 | 8 - 32 | 0 - 33 | 2 - -36854775775 | -73709551614 - 36854775839 | 73709551614 - 28 | -8 -(15 rows) - ---Testcase 19: -SELECT max(fields->>'c2'), min((fields->>'c3')::bigint), max((fields->>'c3')::bigint) from sctbl3 GROUP BY fields->>'c3' ORDER BY (fields->>'c3')::bigint; - max | min | max -----------------------------------------------------------------------------------+--------------+-------------- - ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | -36854775808 - べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | -36854775807 - いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -5 - 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -4 - กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -3 - `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -2 - 0123456789 | -1 | -1 - In Bulgarian it is desirable | 0 | 0 - Which started out as a kind | 1 | 1 - Canada Denmark Turkey Yemen Tokyo | 2 | 2 - Change our locale from $ to ¥ in | 3 | 3 - Chúc mừng năm mới 2021 | 4 | 4 - $ | 5 | 5 - ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | 36854775806 - 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | 36854775807 -(15 rows) - ---Testcase 20: -SELECT sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; - sum | sum ------+----- -(0 rows) - ---Testcase 21: -SELECT count(*), count(time), count (DISTINCT (fields->>'c3')::bigint), count (ALL (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4; - count | count | count | count --------+-------+-------+------- - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 2 | 2 | 2 | 2 - 2 | 2 | 2 | 2 -(13 rows) - ---Testcase 22: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; - stddev | stddev -------------------------+------------------------ - 0.70710678118654752440 | 0.70710678118654752440 - 0.70710678118654752440 | 0.70710678118654752440 - | - | - | - | - | - | - | - | - | - | - | -(13 rows) - ---Testcase 23: -SELECT string_agg(fields->>'c2', ';' ORDER BY fields->>'c2') FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1; - string_agg ----------------------------------------------------------------------------------- - `~!@#$%^&*()_+=-{}[]|:;<>?/. - ^%(@#%^(@#%&@#)%^)!^%)!)% - $ - กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ - いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ - 0123456789 - ăâđêôơưdêđêdờenờíìờẹ - Canada Denmark Turkey Yemen Tokyo - Change our locale from $ to ¥ in - Chúc mừng năm mới 2021 - In Bulgarian it is desirable - Which started out as a kind - べ員葉コ番告7次ノヌ従援かやじり図安ヨ - 敷ヘカウ告政ヨハツヤ消70者32精楽ざ - 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 -(15 rows) - ---Testcase 24: -SELECT every((fields->>'c3')::bigint>0), every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; - every | every --------+------- - f | f - f | f - f | f - f | f - f | f - f | f - f | f - t | f - t | f - t | f - t | f - t | f - t | f -(13 rows) - ---Testcase 25: -SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; - ?column? | bool_and | ?column? -----------+----------+---------- - t | t | f -(1 row) - ---Testcase 26: -SELECT bool_or((fields->>'c4')::double precision <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; - ?column? | bool_or | ?column? -----------+---------+---------- - t | t | t -(1 row) - --- Select combine aggregate via operation ---Testcase 27: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC; - ?column? | min --------------------------------+-------------- - 1677-10-01 00:12:43.145224+00 | -73709551616 - 2020-01-13 01:00:00+00 | -10 - 2020-01-14 01:00:00+00 | -8 - 2020-01-15 01:00:00+00 | -6 - 2020-01-16 01:00:00+00 | -4 - 2020-01-17 01:00:00+00 | -2 - 2020-01-18 01:00:00+00 | 0 - 2020-01-19 01:00:00+00 | 2 - 2020-01-20 01:00:00+00 | 4 - 2020-01-21 01:00:00+00 | 6 - 2020-01-22 01:00:00+00 | 8 - 2020-01-23 01:00:00+00 | 10 - 2262-04-21 23:47:16.854776+00 | 73709551612 -(13 rows) - ---Testcase 28: -SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM sctbl3 GROUP BY fields->>'c2'; - max | max | ?column? | ?column? | max | ?column? --------------------------------+--------------+--------------+--------------+--------------+-------------- - 1677-09-21 00:12:43.145224+00 | -36854775808 | -36854775798 | -36854775818 | -36854775808 | -18427387904 - 2020-01-13 01:00:00+00 | 5 | 15 | -5 | 5 | 2 - 2020-01-05 01:00:00+00 | -3 | 7 | -13 | -3 | -1 - 2020-01-08 01:00:00+00 | 0 | 10 | -10 | 0 | 0 - 2020-01-07 01:00:00+00 | -1 | 9 | -11 | -1 | 0 - 2020-01-11 01:00:00+00 | 3 | 13 | -7 | 3 | 1 - 2262-04-11 23:47:16.854776+00 | 36854775807 | 36854775817 | 36854775797 | 36854775807 | 18427387903 - 2020-01-12 01:00:00+00 | 4 | 14 | -6 | 4 | 2 - 2020-01-04 01:00:00+00 | -4 | 6 | -14 | -4 | -2 - 2020-01-06 01:00:00+00 | -2 | 8 | -12 | -2 | -1 - 1677-09-21 00:12:43.145224+00 | -36854775807 | -36854775797 | -36854775817 | -36854775807 | -18427387903 - 2262-04-11 23:47:16.854776+00 | 36854775806 | 36854775816 | 36854775796 | 36854775806 | 18427387903 - 2020-01-09 01:00:00+00 | 1 | 11 | -9 | 1 | 0 - 2020-01-03 01:00:00+00 | -5 | 5 | -15 | -5 | -2 - 2020-01-10 01:00:00+00 | 2 | 12 | -8 | 2 | 1 -(15 rows) - ---Testcase 29: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; - sum | sum | ?column? ----------------+---------------+-------------- - 147419103226 | 147419103226 | 73709551608 - 10 | 10 | 0 - 8 | 8 | -1 - 6 | 6 | -2 - 4 | 4 | -3 - 2 | 2 | -4 - 0 | 0 | -5 - -2 | -2 | -6 - -4 | -4 | -7 - -6 | -6 | -8 - -8 | -8 | -9 - -10 | -10 | -10 - -147419103230 | -147419103230 | -73709551620 -(13 rows) - ---Testcase 30: -SELECT avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint)-10, avg((fields->>'c3')::bigint)*0.5 FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; - avg | avg | ?column? | ?column? ------+-----+----------+---------- -(0 rows) - ---Testcase 31: -SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time) FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; - array_agg | array_agg | array_agg ------------------------------+------------------------------------------------------------------------------------+------------------------------------------------------------------- - {18427387903,18427387903} | {ăâđêôơưdêđêdờenờíìờẹ,敷ヘカウ告政ヨハツヤ消70者32精楽ざ} | {"2262-04-11 23:47:16.854776+00","2262-04-11 23:47:16.854776+00"} - {2} | {$} | {"2020-01-13 01:00:00+00"} - {2} | {"Chúc mừng năm mới 2021"} | {"2020-01-12 01:00:00+00"} - {1} | {"Canada Denmark Turkey Yemen Tokyo"} | {"2020-01-10 01:00:00+00"} - {1} | {"Change our locale from $ to ¥ in"} | {"2020-01-11 01:00:00+00"} - {0} | {0123456789} | {"2020-01-07 01:00:00+00"} - {0} | {"In Bulgarian it is desirable"} | {"2020-01-08 01:00:00+00"} - {0} | {"Which started out as a kind"} | {"2020-01-09 01:00:00+00"} - {-1} | {"`~!@#$%^&*()_+=-{}[]|:;<>?/."} | {"2020-01-06 01:00:00+00"} - {-1} | {กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ} | {"2020-01-05 01:00:00+00"} - {-2} | {いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ} | {"2020-01-03 01:00:00+00"} - {-2} | {"色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見"} | {"2020-01-04 01:00:00+00"} - {-18427387904,-18427387903} | {^%(@#%^(@#%&@#)%^)!^%)!)%,べ員葉コ番告7次ノヌ従援かやじり図安ヨ} | {"1677-09-21 00:12:43.145224+00","1677-09-21 00:12:43.145224+00"} -(13 rows) - ---Testcase 32: -SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; - bit_and | bit_and ---------------+-------------- - -36854775808 | -36854775808 - -5 | 10 - -4 | 11 - -3 | 12 - -2 | 13 - -1 | 14 - 0 | 15 - 1 | 16 - 2 | 17 - 3 | 18 - 4 | 19 - 5 | 20 - 36854775806 | 36854775820 -(13 rows) - ---Testcase 33: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; - bit_or | bit_or ---------------+-------------- - -36854775807 | -18427387903 - -5 | -2 - -4 | -2 - -3 | -1 - -2 | -1 - -1 | 0 - 0 | 0 - 1 | 0 - 2 | 1 - 3 | 1 - 4 | 2 - 5 | 2 - 36854775807 | 18427387903 -(13 rows) - ---Testcase 34: -SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3; - bool_and | bool_and | bool_and -----------+----------+---------- -(0 rows) - ---Testcase 35: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE (fields->>'c3')::bigint NOT IN (0, 1000, -1, -2) GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; - max | max | max ------+-----+----- -(0 rows) - ---Testcase 36: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE NOT (fields->>'c3')::bigint=5 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; - max | max | max -------------------------+-----+----- - 2020-01-12 01:00:00+00 | 2.0 | 14 - 2020-01-11 01:00:00+00 | 1.5 | 13 - 2020-01-10 01:00:00+00 | 1.0 | 12 - 2020-01-09 01:00:00+00 | 0.5 | 11 - 2020-01-08 01:00:00+00 | 0.0 | 10 -(5 rows) - ---Testcase 37: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE NOT time>'2020-1-3 20:30:50' GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 8; - ?column? | min -----------+----- -(0 rows) - ---Testcase 38: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY time ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; - ?column? | min --------------------------------+-------------- - 1677-10-01 00:12:43.145224+00 | -73709551616 - 2020-01-13 01:00:00+00 | -10 - 2020-01-14 01:00:00+00 | -8 - 2020-01-15 01:00:00+00 | -6 - 2020-01-16 01:00:00+00 | -4 -(5 rows) - ---Testcase 39: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY fields->>'c3', fields->>'c3'HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; - ?column? | min -----------+----- -(0 rows) - --- Select from sub query ---Testcase 40: -SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c4')::double precision<1000 ) AS sctbl3; - time | c2 --------------------------------+---------------------------------------------------------------------------------- - 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ - 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 - 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ - 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. - 2020-01-07 01:00:00+00 | 0123456789 - 2020-01-08 01:00:00+00 | In Bulgarian it is desirable - 2020-01-09 01:00:00+00 | Which started out as a kind - 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo - 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in - 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 - 2020-01-13 01:00:00+00 | $ - 2262-04-11 23:47:16.854776+00 | ăâđêôơưdêđêdờenờíìờẹ - 2262-04-11 23:47:16.854776+00 | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ -(13 rows) - ---Testcase 41: -SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3; - time | c2 -------------------------+---------------------------------------------------------------------------------- - 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ - 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 - 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ - 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. - 2020-01-07 01:00:00+00 | 0123456789 - 2020-01-08 01:00:00+00 | In Bulgarian it is desirable - 2020-01-09 01:00:00+00 | Which started out as a kind - 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo - 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in - 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 - 2020-01-13 01:00:00+00 | $ -(11 rows) - ---Testcase 42: -SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY 1; - max | max | ?column? | ?column? | max | ?column? -------------------------+-----+----------+----------+-----+---------- - 2020-01-03 01:00:00+00 | -5 | 5 | -15 | -5 | -2 - 2020-01-04 01:00:00+00 | -4 | 6 | -14 | -4 | -2 - 2020-01-05 01:00:00+00 | -3 | 7 | -13 | -3 | -1 - 2020-01-06 01:00:00+00 | -2 | 8 | -12 | -2 | -1 - 2020-01-07 01:00:00+00 | -1 | 9 | -11 | -1 | 0 - 2020-01-08 01:00:00+00 | 0 | 10 | -10 | 0 | 0 - 2020-01-09 01:00:00+00 | 1 | 11 | -9 | 1 | 0 - 2020-01-10 01:00:00+00 | 2 | 12 | -8 | 2 | 1 - 2020-01-11 01:00:00+00 | 3 | 13 | -7 | 3 | 1 - 2020-01-12 01:00:00+00 | 4 | 14 | -6 | 4 | 2 - 2020-01-13 01:00:00+00 | 5 | 15 | -5 | 5 | 2 -(11 rows) - ---Testcase 43: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; - stddev | stddev ---------+-------- - | - | - | - | - | - | - | - | - | - | - | -(11 rows) - ---Testcase 44: -SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,2 DESC; - sqrt | sqrt -------------------+------------------ - 0 | 0 - 1 | 1 - 1 | 1 - 1.4142135623731 | 1.4142135623731 - 1.4142135623731 | 1.4142135623731 - 1.73205080756888 | 1.73205080756888 - 1.73205080756888 | 1.73205080756888 - 2 | 2 - 2 | 2 - 2.23606797749979 | 2.23606797749979 - 2.23606797749979 | 2.23606797749979 -(11 rows) - ---Testcase 45: -SELECT * FROM ( SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE time='2020-01-09 01:00:00+00' AND c3=0 AND c3=10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | c2 | c3 | c4 | c5 -------+----+----+----+---- -(0 rows) - ---Testcase 46: -SELECT * FROM ( SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE c3>10.746 OR c2 != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | c2 | c3 | c4 | c5 -------------------------+-----------------------------------+----+--------+---- - 2020-01-13 01:00:00+00 | $ | 5 | 50.188 | f - 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 | 4 | 40.772 | f - 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in | 3 | 30.631 | f - 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t - 2020-01-09 01:00:00+00 | Which started out as a kind | 1 | 10.746 | t -(5 rows) - ---Testcase 47: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE (fields->>'c3')::bigint != -1 AND (fields->>'c5')::bool != true GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 8; - max | max | max ------+-----+----- -(0 rows) - --- Within group ---Testcase 48: ---SELECT (fields->>'c5')::bool (fields->>'c5')::bool, mode((fields->>'c3')::bigint) WITHIN GROUP (ORDER BY (fields->>'c3')::bigint) AS m1 from sctbl3 GROUP BY (fields->>'c5')::bool; --- Select from view ---Testcase 49: -create view view_sctbl3 as select * from sctbl3 where ((fields->>'c3')::bigint != 6789); ---Testcase 50: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; - stddev | stddev -------------------------+------------------------ - 0.70710678118654752440 | 0.70710678118654752440 - 0.70710678118654752440 | 0.70710678118654752440 - | - | - | - | - | - | - | - | - | - | - | -(13 rows) - ---Testcase 51: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; - bit_or | bit_or ---------+-------- - -1 | -1 -(1 row) - ---Testcase 52: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; - max | max | max --------------------------------+----------------+-------------- - 2262-04-11 23:47:16.854776+00 | 18427387903.5 | 36854775817 - 2020-01-13 01:00:00+00 | 2.5 | 15 - 2020-01-12 01:00:00+00 | 2.0 | 14 - 2020-01-11 01:00:00+00 | 1.5 | 13 - 2020-01-10 01:00:00+00 | 1.0 | 12 - 2020-01-09 01:00:00+00 | 0.5 | 11 - 2020-01-08 01:00:00+00 | 0.0 | 10 - 2020-01-07 01:00:00+00 | -0.5 | 9 - 2020-01-06 01:00:00+00 | -1.0 | 8 - 2020-01-05 01:00:00+00 | -1.5 | 7 - 2020-01-04 01:00:00+00 | -2.0 | 6 - 2020-01-03 01:00:00+00 | -2.5 | 5 - 1677-09-21 00:12:43.145224+00 | -18427387903.5 | -36854775797 -(13 rows) - ---Testcase 53: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3; - sum | sum | ?column? ---------------+--------------+-------------- - 73709551614 | 73709551614 | 36854775802 - 73709551612 | 73709551612 | 36854775801 - 10 | 10 | 0 - 8 | 8 | -1 - 6 | 6 | -2 - 4 | 4 | -3 - 2 | 2 | -4 - 0 | 0 | -5 - -2 | -2 | -6 - -4 | -4 | -7 - -6 | -6 | -8 - -8 | -8 | -9 - -10 | -10 | -10 - -73709551614 | -73709551614 | -36854775812 - -73709551616 | -73709551616 | -36854775813 -(15 rows) - ---Testcase 54: -SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50 FROM view_sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; - avg | ?column? -------------------------+---------- - 0.00000000000000000000 | f - 0.00000000000000000000 | f - 0.00000000000000000000 | f - 0.00000000000000000000 | f - 0.00000000000000000000 | f - 0.00000000000000000000 | f - 0.00000000000000000000 | f - 0.00000000000000000000 | f - 0.00000000000000000000 | f - 0.00000000000000000000 | f - 0.00000000000000000000 | f -(11 rows) - ---Testcase 55: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; - bit_or | bit_or ---------+-------- - -5 | -2 - -4 | -2 - -3 | -1 - -2 | -1 - -1 | 0 - 0 | 0 - 1 | 0 - 2 | 1 - 3 | 1 - 4 | 2 - 5 | 2 -(11 rows) - ---Testcase 56: -SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; - bool_and | bool_and | bool_and -----------+----------+---------- - t | f | f - t | f | f - t | f | f - t | f | f - t | f | f - t | f | f - f | f | f - f | t | f - f | t | f - f | t | f - f | t | f - f | t | f - f | t | f -(13 rows) - ---Testcase 57: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 - FROM view_sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 8; - time | c2 | c3 | c4 | c5 -------+----+----+----+---- -(0 rows) - - --Testcase 58: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 - FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; - time | c2 | c3 | c4 | c5 -------------------------+----------------------------------------------------------------------------------+----+---------+---- - 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f - 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f - 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t - 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t - 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t -(5 rows) - ---Testcase 59: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 - FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; - time | c2 | c3 | c4 | c5 -------------------------+----------------------------------------------------------------------------------+----+---------+---- - 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f - 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f - 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t - 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t - 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t -(5 rows) - ---Testcase 60: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 - FROM view_sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; - time | c2 | c3 | c4 | c5 -------------------------+----------------------------------------------------------------------------------+----+---------+---- - 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f - 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f - 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t - 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t - 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t -(5 rows) - ---Testcase 61: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 - FROM view_sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; - time | c2 | c3 | c4 | c5 -------+----+----+----+---- -(0 rows) - --- Select many target aggregate in one query and combine with condition ---Testcase 62: -SELECT upper(fields->>'c2'), upper(fields->>'c2'), lower(fields->>'c2'), lower(fields->>'c2') FROM sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; - upper | upper | lower | lower -----------------------------------------------------------------------------------+----------------------------------------------------------------------------------+----------------------------------------------------------------------------------+---------------------------------------------------------------------------------- - `~!@#$%^&*()_+=-{}[]|:;<>?/. | `~!@#$%^&*()_+=-{}[]|:;<>?/. | `~!@#$%^&*()_+=-{}[]|:;<>?/. | `~!@#$%^&*()_+=-{}[]|:;<>?/. - ^%(@#%^(@#%&@#)%^)!^%)!)% | ^%(@#%^(@#%&@#)%^)!^%)!)% | ^%(@#%^(@#%&@#)%^)!^%)!)% | ^%(@#%^(@#%&@#)%^)!^%)!)% - $ | $ | $ | $ - กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ - いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ - 0123456789 | 0123456789 | 0123456789 | 0123456789 - ĂÂĐÊÔƠƯDÊĐÊDỜENỜÍÌỜẸ | ĂÂĐÊÔƠƯDÊĐÊDỜENỜÍÌỜẸ | ăâđêôơưdêđêdờenờíìờẹ | ăâđêôơưdêđêdờenờíìờẹ - CANADA DENMARK TURKEY YEMEN TOKYO | CANADA DENMARK TURKEY YEMEN TOKYO | canada denmark turkey yemen tokyo | canada denmark turkey yemen tokyo - CHANGE OUR LOCALE FROM $ TO ¥ IN | CHANGE OUR LOCALE FROM $ TO ¥ IN | change our locale from $ to ¥ in | change our locale from $ to ¥ in - CHÚC MỪNG NĂM MỚI 2021 | CHÚC MỪNG NĂM MỚI 2021 | chúc mừng năm mới 2021 | chúc mừng năm mới 2021 - IN BULGARIAN IT IS DESIRABLE | IN BULGARIAN IT IS DESIRABLE | in bulgarian it is desirable | in bulgarian it is desirable - WHICH STARTED OUT AS A KIND | WHICH STARTED OUT AS A KIND | which started out as a kind | which started out as a kind - べ員葉コ番告7次ノヌ従援かやじり図安ヨ | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | べ員葉コ番告7次ノヌ従援かやじり図安ヨ - 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ - 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 -(15 rows) - ---Testcase 63: -SELECT max(time), min((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count(*), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC,2 ASC,3 DESC,4,5; - max | min | sum | count | avg --------------------------------+--------------+--------------+-------+------------------------- - 2262-04-11 23:47:16.854776+00 | 36854775806 | 73709551613 | 2 | 36854775806.50000000 - 2020-01-13 01:00:00+00 | 5 | 5 | 1 | 5.0000000000000000 - 2020-01-12 01:00:00+00 | 4 | 4 | 1 | 4.0000000000000000 - 2020-01-11 01:00:00+00 | 3 | 3 | 1 | 3.0000000000000000 - 2020-01-10 01:00:00+00 | 2 | 2 | 1 | 2.0000000000000000 - 2020-01-09 01:00:00+00 | 1 | 1 | 1 | 1.00000000000000000000 - 2020-01-08 01:00:00+00 | 0 | 0 | 1 | 0.00000000000000000000 - 2020-01-07 01:00:00+00 | -1 | -1 | 1 | -1.00000000000000000000 - 2020-01-06 01:00:00+00 | -2 | -2 | 1 | -2.0000000000000000 - 2020-01-05 01:00:00+00 | -3 | -3 | 1 | -3.0000000000000000 - 2020-01-04 01:00:00+00 | -4 | -4 | 1 | -4.0000000000000000 - 2020-01-03 01:00:00+00 | -5 | -5 | 1 | -5.0000000000000000 - 1677-09-21 00:12:43.145224+00 | -36854775808 | -73709551615 | 2 | -36854775807.50000000 -(13 rows) - ---Testcase 64: -SELECT (fields->>'c3')::bigint*(random()<=1)::int, (random()<=1)::int*(25-10)+10 FROM sctbl3 ORDER BY 1 ASC,2 DESC; - ?column? | ?column? ---------------+---------- - -36854775808 | 25 - -36854775807 | 25 - -5 | 25 - -4 | 25 - -3 | 25 - -2 | 25 - -1 | 25 - 0 | 25 - 1 | 25 - 2 | 25 - 3 | 25 - 4 | 25 - 5 | 25 - 36854775806 | 25 - 36854775807 | 25 -(15 rows) - ---Testcase 65: -SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; - max | count | exists | exists ------+-------+--------+-------- -(0 rows) - ---Testcase 66: -SELECT sum((fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint<100 and (fields->>'c3')::bigint>-100), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint >0 AND (fields->>'c3')::bigint<100) FROM sctbl3 GROUP BY (fields->>'c5')::bool HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; - sum | avg ------+-------------------- - 9 | 4.0000000000000000 -(1 row) - ---Testcase 67: -SELECT 'abcd', 1234, (fields->>'c3')::bigint/2, 10+(fields->>'c3')::bigint * (random()<=1)::int * 0.5 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; - ?column? | ?column? | ?column? | ?column? -----------+----------+----------+---------- - abcd | 1234 | -2 | 7.5 - abcd | 1234 | -2 | 8.0 - abcd | 1234 | -1 | 8.5 - abcd | 1234 | -1 | 9.0 - abcd | 1234 | 0 | 9.5 - abcd | 1234 | 0 | 10.0 - abcd | 1234 | 0 | 10.5 - abcd | 1234 | 1 | 11.0 - abcd | 1234 | 1 | 11.5 - abcd | 1234 | 2 | 12.0 - abcd | 1234 | 2 | 12.5 -(11 rows) - ---Testcase 68: -SELECT count((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint) FROM sctbl3 GROUP BY influx_time(time, interval '2d') ORDER BY 1; - count | bit_and --------+-------------- - 1 | -3 - 1 | 1 - 1 | -5 - 1 | 5 - 1 | -2 - 1 | 0 - 1 | 4 - 1 | 3 - 1 | -4 - 1 | 2 - 1 | -1 - 2 | -36854775808 - 2 | 36854775806 -(13 rows) - ---Testcase 69: -SELECT max((fields->>'c3')::bigint), min((fields->>'c4')::double precision), avg((fields->>'c3')::bigint), count((fields->>'c3')::bigint) FROM sctbl3 WHERE time > '2020-01-10 00:00:00' AND time < '2020-01-15 00:00:00' GROUP BY influx_time(time, interval '1d', interval '10h30m') ORDER BY 1 ASC, 2 DESC, 3 ASC, 4 DESC; - max | min | avg | count ------+--------+--------------------+------- - 2 | 20.312 | 2.0000000000000000 | 1 - 3 | 30.631 | 3.0000000000000000 | 1 - 4 | 40.772 | 4.0000000000000000 | 1 - 5 | 50.188 | 5.0000000000000000 | 1 -(4 rows) - ---Testcase 70: -SELECT min(time), max(time), count(time) FROM sctbl3 GROUP BY (fields->>'c3') ORDER BY 1,2,3; - min | max | count --------------------------------+-------------------------------+------- - 1677-09-21 00:12:43.145224+00 | 1677-09-21 00:12:43.145224+00 | 1 - 1677-09-21 00:12:43.145224+00 | 1677-09-21 00:12:43.145224+00 | 1 - 2020-01-03 01:00:00+00 | 2020-01-03 01:00:00+00 | 1 - 2020-01-04 01:00:00+00 | 2020-01-04 01:00:00+00 | 1 - 2020-01-05 01:00:00+00 | 2020-01-05 01:00:00+00 | 1 - 2020-01-06 01:00:00+00 | 2020-01-06 01:00:00+00 | 1 - 2020-01-07 01:00:00+00 | 2020-01-07 01:00:00+00 | 1 - 2020-01-08 01:00:00+00 | 2020-01-08 01:00:00+00 | 1 - 2020-01-09 01:00:00+00 | 2020-01-09 01:00:00+00 | 1 - 2020-01-10 01:00:00+00 | 2020-01-10 01:00:00+00 | 1 - 2020-01-11 01:00:00+00 | 2020-01-11 01:00:00+00 | 1 - 2020-01-12 01:00:00+00 | 2020-01-12 01:00:00+00 | 1 - 2020-01-13 01:00:00+00 | 2020-01-13 01:00:00+00 | 1 - 2262-04-11 23:47:16.854776+00 | 2262-04-11 23:47:16.854776+00 | 1 - 2262-04-11 23:47:16.854776+00 | 2262-04-11 23:47:16.854776+00 | 1 -(15 rows) - ---Testcase 71: -SELECT count((fields->>'c3')::bigint), max((fields->>'c3')::bigint), sum((fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3' HAVING(max(fields->>'c2')!='HELLO' and count(fields->>'c2')>1) ORDER BY 1,2,3; - count | max | sum --------+-----+----- -(0 rows) - ---Testcase 72: -SELECT count(fields->>'c2'), bit_and((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint), bool_and((fields->>'c5')::bool) FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1,2,3,4; - count | bit_and | bit_or | bool_and --------+--------------+--------------+---------- - 1 | -36854775808 | -36854775808 | t - 1 | -36854775807 | -36854775807 | f - 1 | -5 | -5 | t - 1 | -4 | -4 | t - 1 | -3 | -3 | t - 1 | -2 | -2 | f - 1 | -1 | -1 | f - 1 | 0 | 0 | f - 1 | 1 | 1 | t - 1 | 2 | 2 | t - 1 | 3 | 3 | f - 1 | 4 | 4 | f - 1 | 5 | 5 | f - 1 | 36854775806 | 36854775806 | f - 1 | 36854775807 | 36854775807 | f -(15 rows) - ---Testcase 73: -SELECT array_agg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg((fields->>'c3')::bigint/(fields->>'c3')::bigint*(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint+(fields->>'c3')::bigint/(fields->>'c3')::bigint)*-1000), array_agg((fields->>'c3')::bigint*(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)+9999999999999.998) from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint ORDER BY 1, 2, 3, 4, 5; -ERROR: bigint out of range ---Testcase 74: -SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)-0.567-avg((fields->>'c3')::bigint/3+(fields->>'c3')::bigint)+17.55435, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+45))- -9.5+2*avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint/((fields->>'c3')::bigint-10.2)*(fields->>'c3')::bigint)+0.567+avg((fields->>'c3')::bigint)*4.5+(fields->>'c3')::bigint, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+5.6))+100-(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4 limit 5; - ?column? | ?column? | ?column? | ?column? -----------------------+------------------------+------------------------------------+-------------------------- - 5.9873500000000000 | 24.5000000000000000 | 23.25930769230769230770 | 100.47169811320754716981 - 20.9873500000000000 | 3.5000000000000000 | -10.76086885245901639344 | 99.44444444444444444444 - 85994476901.98735000 | -110564327413.50000000 | -239556042741.23300000280364236800 | 101.00000000015194774295 -(3 rows) - ---Testcase 75: -SELECT bit_and((fields->>'c3')::bigint/3*(fields->>'c3')::bigint)-1 + bit_and((fields->>'c3')::bigint/4/((fields->>'c3')::bigint+6)),2* bit_and((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)*1, 5-bit_and((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-1000000+(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3' ORDER BY 1,2,3; -ERROR: bigint out of range ---Testcase 76: -SELECT bit_or((fields->>'c3')::bigint/3*(fields->>'c3')::bigint)-1 + bit_or((fields->>'c3')::bigint/4/((fields->>'c3')::bigint+6)),2* bit_or((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)*1, 5-bit_or((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-1000000+(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3' ORDER BY 1,2,3; -ERROR: bigint out of range ---Testcase 77: -SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>0.774 OR fields->>'c2' = 'Which started out as a kind' GROUP BY fields->>'c3' ORDER BY 1, 2, 3; - ?column? | ?column? | ?column? -----------+----------+------------------------------- - -4.6 | 2 | -36854775795.8000000000000000 - -4.6 | 2 | -36854775794.8000000000000000 - -4.6 | 2 | 6.2000000000000000 - -4.6 | 2 | 7.2000000000000000 - -4.6 | 2 | 8.2000000000000000 - -4.6 | 2 | 9.2000000000000000 - -4.6 | 2 | 10.2000000000000000 -(7 rows) - ---Testcase 78: -SELECT count(fields->>'c2')-2*count((fields->>'c3')::bigint), count((fields->>'c3')::bigint)/count((fields->>'c5')::bool)-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c5', fields->>'c3' order by 1, 2 limit 1; - ?column? | ?column? -----------+-------------- - -1 | -36854775806 -(1 row) - ---Testcase 79: -SELECT every((fields->>'c3')::bigint != 5.5) AND true, every((fields->>'c3')::bigint <> 10) OR every((fields->>'c3')::bigint > 5.6), every((fields->>'c3')::bigint <= 2) OR (fields->>'c5')::bool from sctbl3 GROUP BY (fields->>'c5')::bool ORDER BY 1,2,3 limit 6; - ?column? | ?column? | ?column? -----------+----------+---------- - t | t | f - t | t | t -(2 rows) - ---Testcase 80: -SELECT stddev((fields->>'c3')::bigint*3-(fields->>'c3')::bigint)*1000000-(fields->>'c3')::bigint, stddev((fields->>'c3')::bigint)-0.567, stddev((fields->>'c3')::bigint/((fields->>'c3')::bigint-1.3))/6, stddev((fields->>'c3')::bigint+4*(fields->>'c3')::bigint)*100, stddev((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint-52.1))+1 from sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY fields->>'c3' ORDER BY 1,2,3,4,5 ; - ?column? | ?column? | ?column? | ?column? | ?column? -----------+----------+----------+----------+---------- - | | | | - | | | | - | | | | - | | | | - | | | | - | | | | - | | | | -(7 rows) - ---Testcase 81: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-6, sum((fields->>'c3')::bigint/((fields->>'c3')::bigint+9999999)-(fields->>'c3')::bigint)*9999999999999.998, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/((fields->>'c3')::bigint+111111))*-9.5, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6 from sctbl3; - ?column? | ?column? | ?column? | ?column? | ?column? -----------+--------------------+----------+------------------------+---------- - -8 | 39999999999999.992 | 38.0 | 0.11393187443568118444 | -36 -(1 row) - ---Testcase 82: -SELECT sum((fields->>'c3')::bigint-(fields->>'c3')::bigint)-6+sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint*1.3-(fields->>'c3')::bigint)*9.998-sum((fields->>'c3')::bigint)*4, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/4)*-9.5-(fields->>'c3')::bigint, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435+(fields->>'c3')::bigint, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6-(fields->>'c3')::bigint-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4,5; - ?column? | ?column? | ?column? | ?column? | ?column? ---------------+-------------------+-----------------+-------------------------+--------------- - -36854775814 | 36876888673.4848 | 299445053440.0 | -34755308963.14388172 | -589676412928 - -36854775813 | 36876888672.4842 | 299445053439.0 | -34755308962.20084765 | -589676412912 - -11 | 5.0030 | 43.0 | -4.71517031391079703891 | -80 - -10 | 4.0024 | 32.5 | -3.77213625112863763113 | -64 - -9 | 3.0018 | 31.5 | -2.82910218834647822335 | -48 - -8 | 2.0012 | 21.0 | -1.88606812556431881556 | -32 - -7 | 1.0006 | 10.5 | -0.94303406278215940778 | -16 - -6 | 0.0000 | 0.0 | 0.00000000000000000000 | 0 - -5 | -1.0006 | -10.5 | 0.94303406278215940778 | 16 - -4 | -2.0012 | -21.0 | 1.88606812556431881556 | 32 - -3 | -3.0018 | -31.5 | 2.82910218834647822335 | 48 - -2 | -4.0024 | -32.5 | 3.77213625112863763113 | 64 - -1 | -5.0030 | -43.0 | 4.71517031391079703891 | 80 - 36854775800 | -36876888671.4836 | -299445053428.5 | 34755308961.25781359 | 589676412896 - 36854775801 | -36876888672.4842 | -299445053439.0 | 34755308962.20084765 | 589676412912 -(15 rows) - ---Testcase 83: -SELECT max((fields->>'c4')::double precision), max((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, max((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, max((fields->>'c3')::bigint)+max((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c4')::double precision>= 0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4; - max | ?column? | ?column? | ?column? -----------+--------------+--------------+-------------- - 0.774 | -1 | -3 | 0 - 10.746 | 1 | -2 | 2 - 20.312 | 3 | -1 | 4 - 30.631 | 5 | 0 | 6 - 40.772 | 7 | 1 | 8 - 50.188 | 9 | 2 | 10 - 1.78e+68 | -73709551615 | -36854775810 | -73709551614 - 1.79e+68 | -73709551617 | -36854775811 | -73709551616 -(8 rows) - ---Testcase 84: -SELECT min(fields->>'c2'), min((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, min((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, min((fields->>'c3')::bigint)+min((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c4')::double precision<0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4; - min | ?column? | ?column? | ?column? -----------------------------------------------------------------------------------+-------------+-------------+------------- - `~!@#$%^&*()_+=-{}[]|:;<>?/. | -5 | -5 | -4 - กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -7 | -6 | -6 - いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -11 | -8 | -10 - 0123456789 | -3 | -4 | -2 - ăâđêôơưdêđêdờenờíìờẹ | 73709551611 | 36854775803 | 73709551612 - 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 73709551613 | 36854775804 | 73709551614 - 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -9 | -7 | -8 -(7 rows) - ---Testcase 85: -SELECT variance((fields->>'c3')::bigint+(fields->>'c3')::bigint)+(fields->>'c3')::bigint, variance((fields->>'c3')::bigint*3)+(fields->>'c3')::bigint+1, variance((fields->>'c3')::bigint-2)+10 from sctbl3 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3; - ?column? | ?column? | ?column? -----------+----------+---------- - | | - | | - | | - | | - | | - | | - | | - | | - | | - | | - | | - | | - | | - | | - | | -(15 rows) - ---Testcase 86: -SELECT sqrt(abs((fields->>'c3')::bigint*5)) + sqrt(abs((fields->>'c3')::bigint+6)), sqrt(abs((fields->>'c3')::bigint)+5)+(fields->>'c3')::bigint, 4*sqrt(abs((fields->>'c3')::bigint-100))-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1, 2, 3; - ?column? | ?column? | ?column? -------------------+-------------------+------------------ - 2.44948974278318 | 2.23606797749979 | 40 - 4.47213595499958 | 1.44948974278318 | 41.1995024844836 - 5.16227766016838 | 0.645751311064591 | 42.3980197534483 - 5.60503415377629 | -0.17157287525381 | 43.5955662603689 - 5.88634951737267 | -1 | 44.7921561087423 - 6 | -1.83772233983162 | 45.9878030638384 - 621247.312124984 | -36854583831.0228 | 36855543710.9097 - 621247.312133412 | -36854583832.0228 | 36855543711.9097 -(8 rows) - ---Testcase 87: -SELECT max((fields->>'c3')::bigint)+min((fields->>'c3')::bigint)+3, min((fields->>'c3')::bigint)-sqrt(abs((fields->>'c3')::bigint-45.21))+(fields->>'c3')::bigint*2, count(*)-count((fields->>'c5')::bool)+2, (fields->>'c5')::bool c5, (fields->>'c3')::bigint c3 from sctbl3 GROUP BY fields->>'c3', fields->>'c3', fields->>'c5' ORDER BY 1,2,3,4; - ?column? | ?column? | ?column? | c5 | c3 ---------------+---------------------------+----------+----+-------------- - -73709551613 | -110564519399.97728155989 | 2 | t | -36854775808 - -73709551611 | -110564519396.97727895540 | 2 | f | -36854775807 - -7 | -22.085901495222750 | 2 | t | -5 - -5 | -19.014983962918233 | 2 | t | -4 - -3 | -15.943342134735980 | 2 | t | -3 - -1 | -12.870953354520754 | 2 | f | -2 - 1 | -9.797793759742936 | 2 | f | -1 - 3 | -6.723838189605696 | 2 | f | 0 - 5 | -3.649060083951716 | 2 | t | 1 - 7 | -0.573431371817918 | 2 | t | 2 - 9 | 2.503077651687685 | 2 | f | 3 - 11 | 5.580498461718387 | 2 | f | 4 - 13 | 8.658864455004924 | 2 | f | 5 - 73709551615 | 110564135442.02295914731 | 2 | f | 36854775806 - 73709551617 | 110564135445.02295654282 | 2 | f | 36854775807 -(15 rows) - ---Testcase 88: -SELECT variance((fields->>'c3')::bigint)-5*min((fields->>'c3')::bigint)-1, every((fields->>'c5')::bool <> true), max((fields->>'c3')::bigint+4.56)*3-min((fields->>'c3')::bigint), count((fields->>'c3')::bigint)-4 from sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1,2,3,4; - ?column? | every | ?column? | ?column? --------------------------+-------+----------+---------- - -5.00000000000000000000 | f | 21.68 | -1 -(1 row) - ---Testcase 89: -SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3')::bigint)/3-(fields->>'c3')::bigint, min((fields->>'c3')::bigint)+(fields->>'c3')::bigint/4, (fields->>'c5')::bool c5 from sctbl3 GROUP BY fields->>'c3', fields->>'c3', fields->>'c5' ORDER BY 1,2,3,4,5; - ?column? | ?column? | ?column? | ?column? | c5 ---------------+--------------+-------------------------+--------------+---- - -36854775838 | -36854775818 | 24569850538.66666667 | -46068469760 | t - -36854775837 | -36854775817 | 24569850538.00000000 | -46068469758 | f - -35 | -15 | 3.3333333333333333 | -6 | t - -34 | -14 | 2.6666666666666667 | -5 | t - -33 | -13 | 2.00000000000000000000 | -3 | t - -32 | -12 | 1.33333333333333333333 | -2 | f - -31 | -11 | 0.66666666666666666667 | -1 | f - -30 | -10 | 0.00000000000000000000 | 0 | f - -29 | -9 | -0.66666666666666666667 | 1 | t - -28 | -8 | -1.33333333333333333333 | 2 | t - -27 | -7 | -2.00000000000000000000 | 3 | f - -26 | -6 | -2.6666666666666667 | 5 | f - -25 | -5 | -3.3333333333333333 | 6 | f - 36854775776 | 36854775796 | -24569850537.33333333 | 46068469757 | f - 36854775777 | 36854775797 | -24569850538.00000000 | 46068469758 | f -(15 rows) - ----------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- --- Update data -\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null -drop view if exists view_sctbl3 ; -drop foreign table if exists sctbl3; -CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1'); --- Select all data with condition and combine clause ---Testcase 90: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5; - time | t1 | c1 | c2 | c3 | c4 | c5 --------------------------------+----------+----+-----------------------------------+----+--------+---- - 2020-01-11 01:00:00+00 | | | Change our locale from $ to ¥ in | 3 | 30.631 | f - 2020-01-10 01:00:00+00 | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t - 2020-01-09 01:00:00+00 | | | Which started out as a kind | 1 | 10.746 | t - 1970-01-01 00:00:04.343314+00 | "3gìvậy" | f | lagi ngopo | 1 | 1.024 | t -(4 rows) - ---Testcase 91: -SELECT * FROM sctbl3 WHERE EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint != 40.772) ORDER BY tags->>'t1'; - time | tags | fields --------------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------- - 1970-01-01 00:00:00+00 | {"t1": "-2323.54454"} | {"c1": "true", "c2": "Tôi không biết", "c3": "32", "c4": "78.14", "c5": "false"} - 1970-01-01 00:00:04.343314+00 | {"t1": "\"3gìvậy\""} | {"c1": "false", "c2": "lagi ngopo", "c3": "1", "c4": "1.024", "c5": "true"} - 1874-12-07 18:40:00+00 | {"t1": "'afefea'"} | {"c1": "false", "c2": "Qué estás haciendo", "c3": "0", "c4": "2000000000000", "c5": "true"} - 1969-12-22 20:42:30+00 | {"t1": "faefek"} | {"c1": "true", "c2": "change for new change", "c3": "34", "c4": "-74", "c5": "false"} - 2020-01-05 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ", "c3": "-3", "c4": "-30.756", "c5": "true"} - 2020-01-06 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "`~!@#$%^&*()_+=-{}[]|:;<>?/.", "c3": "-2", "c4": "-20.56", "c5": "false"} - 2020-01-07 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "0123456789", "c3": "-1", "c4": "-10.746", "c5": "false"} - 2020-01-08 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "In Bulgarian it is desirable", "c3": "0", "c4": "0.774", "c5": "false"} - 2020-01-09 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "Which started out as a kind", "c3": "1", "c4": "10.746", "c5": "true"} - 2020-01-10 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "Canada Denmark Turkey Yemen Tokyo", "c3": "2", "c4": "20.312", "c5": "true"} - 2020-01-11 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "Change our locale from $ to ¥ in", "c3": "3", "c4": "30.631", "c5": "false"} - 2020-01-12 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "Chúc mừng năm mới 2021", "c3": "4", "c4": "40.772", "c5": "false"} - 2020-01-13 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "$", "c3": "5", "c4": "50.188", "c5": "false"} - 2262-04-11 23:47:16.854776+00 | {"t1": null} | {"c1": null, "c2": "ăâđêôơưdêđêdờenờíìờẹ", "c3": "36854775806", "c4": "-1.78e+68", "c5": "false"} - 1677-09-21 00:12:43.145224+00 | {"t1": null} | {"c1": null, "c2": "^%(@#%^(@#%&@#)%^)!^%)!)%", "c3": "-36854775808", "c4": "1.79e+68", "c5": "true"} - 2262-04-11 23:47:16.854776+00 | {"t1": null} | {"c1": null, "c2": "敷ヘカウ告政ヨハツヤ消70者32精楽ざ", "c3": "36854775807", "c4": "-1.79e+68", "c5": "false"} - 1677-09-21 00:12:43.145224+00 | {"t1": null} | {"c1": null, "c2": "べ員葉コ番告7次ノヌ従援かやじり図安ヨ", "c3": "-36854775807", "c4": "1.78e+68", "c5": "false"} - 2020-01-03 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ", "c3": "-5", "c4": "-50.232", "c5": "true"} - 2020-01-04 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見", "c3": "-4", "c4": "-40.652", "c5": "true"} -(19 rows) - ---Testcase 92: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; - time | t1 | c1 | c2 | c3 | c4 | c5 --------------------------------+-------------+----+-----------------------------------------------------------------------+--------------+---------------+---- - 2262-04-11 23:47:16.854776+00 | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f - 2020-01-12 01:00:00+00 | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f - 2020-01-10 01:00:00+00 | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t - 2020-01-08 01:00:00+00 | | | In Bulgarian it is desirable | 0 | 0.774 | f - 2020-01-06 01:00:00+00 | | | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f - 2020-01-04 01:00:00+00 | | | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t - 1970-01-01 00:00:00+00 | -2323.54454 | t | Tôi không biết | 32 | 78.14 | f - 1969-12-22 20:42:30+00 | faefek | t | change for new change | 34 | -74 | f - 1874-12-07 18:40:00+00 | 'afefea' | f | Qué estás haciendo | 0 | 2000000000000 | t - 1677-09-21 00:12:43.145224+00 | | | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t -(10 rows) - ---Testcase 93: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint=40.772) ORDER BY 1 DESC,2 ASC,3 DESC,4; - time | t1 | c1 | c2 | c3 | c4 | c5 --------------------------------+-------------+----+----------------------------------------------------------------------------------+--------------+---------------+---- - 2262-04-11 23:47:16.854776+00 | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f - 2262-04-11 23:47:16.854776+00 | | | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f - 2020-01-13 01:00:00+00 | | | $ | 5 | 50.188 | f - 2020-01-12 01:00:00+00 | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f - 2020-01-11 01:00:00+00 | | | Change our locale from $ to ¥ in | 3 | 30.631 | f - 2020-01-10 01:00:00+00 | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t - 2020-01-09 01:00:00+00 | | | Which started out as a kind | 1 | 10.746 | t - 2020-01-08 01:00:00+00 | | | In Bulgarian it is desirable | 0 | 0.774 | f - 2020-01-07 01:00:00+00 | | | 0123456789 | -1 | -10.746 | f - 2020-01-06 01:00:00+00 | | | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f - 2020-01-05 01:00:00+00 | | | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t - 2020-01-04 01:00:00+00 | | | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t - 2020-01-03 01:00:00+00 | | | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t - 1970-01-01 00:00:04.343314+00 | "3gìvậy" | f | lagi ngopo | 1 | 1.024 | t - 1970-01-01 00:00:00+00 | -2323.54454 | t | Tôi không biết | 32 | 78.14 | f - 1969-12-22 20:42:30+00 | faefek | t | change for new change | 34 | -74 | f - 1874-12-07 18:40:00+00 | 'afefea' | f | Qué estás haciendo | 0 | 2000000000000 | t - 1677-09-21 00:12:43.145224+00 | | | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t - 1677-09-21 00:12:43.145224+00 | | | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | 1.78e+68 | f -(19 rows) - ---Testcase 94: -SELECT * FROM sctbl3 WHERE fields->>'c2' IS NULL OR tags->>'t1' LIKE 'afefea' ORDER BY (fields->>'c1')::bool, fields->>'c2'; - time | tags | fields -------+------+-------- -(0 rows) - ---Testcase 95: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2' IS NOT NULL ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | t1 | c1 | c2 | c3 | c4 | c5 --------------------------------+----+----+------------------------------------+-------------+-----------+---- - 2262-04-11 23:47:16.854776+00 | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f - 2262-04-11 23:47:16.854776+00 | | | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f - 2020-01-13 01:00:00+00 | | | $ | 5 | 50.188 | f - 2020-01-12 01:00:00+00 | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f - 2020-01-11 01:00:00+00 | | | Change our locale from $ to ¥ in | 3 | 30.631 | f -(5 rows) - ---Testcase 96: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT (fields->>'c3')::bigint=5 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | t1 | c1 | c2 | c3 | c4 | c5 --------------------------------+----+----+------------------------------------+-------------+-----------+---- - 2262-04-11 23:47:16.854776+00 | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f - 2262-04-11 23:47:16.854776+00 | | | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f - 2020-01-12 01:00:00+00 | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f - 2020-01-11 01:00:00+00 | | | Change our locale from $ to ¥ in | 3 | 30.631 | f - 2020-01-10 01:00:00+00 | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t -(5 rows) - --- Select aggregate function and specific column from original table ---Testcase 97: -SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, max(tags->>'t1'), sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY tags->>'t1', (fields->>'c1')::bool, (fields->>'c3')::bigint, fields->>'c2' ORDER BY 1; - t1 | c1 | max | sum | sum --------------+----+-------------+--------------+-------------- - -2323.54454 | t | -2323.54454 | 32 | 32 - "3gìvậy" | f | "3gìvậy" | 1 | 1 - 'afefea' | f | 'afefea' | 0 | 0 - faefek | t | faefek | 34 | 34 - | | | -36854775808 | -36854775808 - | | | -36854775807 | -36854775807 - | | | -5 | -5 - | | | -4 | -4 - | | | -3 | -3 - | | | -2 | -2 - | | | -1 | -1 - | | | 0 | 0 - | | | 1 | 1 - | | | 2 | 2 - | | | 3 | 3 - | | | 4 | 4 - | | | 5 | 5 - | | | 36854775806 | 36854775806 - | | | 36854775807 | 36854775807 -(19 rows) - ---Testcase 98: -SELECT sum((fields->>'c3')::bigint), tags->>'t1' t1, sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), fields->>'c1' c1 FROM sctbl3 GROUP BY fields->>'c1', fields->>'c3', fields->>'c3', tags->>'t1' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; - sum | t1 | sum | c1 ------+----+-----+---- -(0 rows) - ---Testcase 99: -SELECT stddev((fields->>'c3')::bigint), (fields->>'c1')::bool c1, stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), tags->>'t1' t1 FROM sctbl3 GROUP BY time, fields->>'c3', tags->>'t1', fields->>'c1' ORDER BY tags->>'t1' ASC,fields->>'c1' DESC; - stddev | c1 | stddev | t1 ---------+----+--------+------------- - | t | | -2323.54454 - | f | | "3gìvậy" - | f | | 'afefea' - | t | | faefek - | | | - | | | - | | | - | | | - | | | - | | | - | | | - | | | - | | | - | | | - | | | - | | | - | | | - | | | - | | | -(19 rows) - ---Testcase 100: -SELECT every((fields->>'c3')::bigint>0), (fields->>'c1')::bool c1, every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time, fields->>'c1', fields->>'c3' ORDER BY (fields->>'c1')::bool ASC, (fields->>'c3')::bigint DESC; - every | c1 | every --------+----+------- - t | f | f - f | f | f - t | t | f - t | t | f - t | | f - t | | f - t | | f - t | | f - t | | f - t | | f - t | | f - f | | f - f | | f - f | | f - f | | f - f | | f - f | | f - f | | f - f | | f -(19 rows) - ---Testcase 101: -SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and((fields->>'c1')::bool), bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; - ?column? | bool_and | bool_and | ?column? -----------+----------+----------+---------- - t | f | t | f -(1 row) - ---Testcase 102: -SELECT bool_or((fields->>'c4')::double precision <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c1')::bool), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, tags->>'t1' t1 from sctbl3 GROUP BY (fields->>'c1')::bool, tags->>'t1', fields->>'c2', (fields->>'c3')::bigint ORDER BY (fields->>'c1')::bool, tags->>'t1'; - ?column? | bool_or | bool_or | ?column? | t1 -----------+---------+---------+----------+------------- - t | t | f | t | "3gìvậy" - t | t | f | t | 'afefea' - t | t | t | f | -2323.54454 - t | t | t | f | faefek - t | t | | f | - t | t | | t | - t | t | | f | - t | t | | t | - t | t | | f | - t | t | | t | - t | t | | t | - t | t | | f | - t | t | | t | - t | t | | t | - t | t | | t | - t | t | | f | - t | t | | t | - t | t | | t | - t | t | | t | -(19 rows) - --- Select combine aggregate via operation ---Testcase 103: -SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2, max(tags->>'t1') FROM sctbl3 GROUP BY fields->>'c2', tags->>'t1'; - max | max | ?column? | ?column? | max | ?column? | max --------------------------------+--------------+--------------+--------------+--------------+--------------+------------- - 1970-01-01 00:00:00+00 | 32 | 42 | 22 | 32 | 16 | -2323.54454 - 1677-09-21 00:12:43.145224+00 | -36854775807 | -36854775797 | -36854775817 | -36854775807 | -18427387903 | - 1970-01-01 00:00:04.343314+00 | 1 | 11 | -9 | 1 | 0 | "3gìvậy" - 2020-01-03 01:00:00+00 | -5 | 5 | -15 | -5 | -2 | - 2020-01-07 01:00:00+00 | -1 | 9 | -11 | -1 | 0 | - 2020-01-11 01:00:00+00 | 3 | 13 | -7 | 3 | 1 | - 1677-09-21 00:12:43.145224+00 | -36854775808 | -36854775798 | -36854775818 | -36854775808 | -18427387904 | - 2020-01-09 01:00:00+00 | 1 | 11 | -9 | 1 | 0 | - 2262-04-11 23:47:16.854776+00 | 36854775807 | 36854775817 | 36854775797 | 36854775807 | 18427387903 | - 2020-01-06 01:00:00+00 | -2 | 8 | -12 | -2 | -1 | - 2020-01-04 01:00:00+00 | -4 | 6 | -14 | -4 | -2 | - 1969-12-22 20:42:30+00 | 34 | 44 | 24 | 34 | 17 | faefek - 2020-01-10 01:00:00+00 | 2 | 12 | -8 | 2 | 1 | - 2020-01-12 01:00:00+00 | 4 | 14 | -6 | 4 | 2 | - 2020-01-13 01:00:00+00 | 5 | 15 | -5 | 5 | 2 | - 2262-04-11 23:47:16.854776+00 | 36854775806 | 36854775816 | 36854775796 | 36854775806 | 18427387903 | - 2020-01-08 01:00:00+00 | 0 | 10 | -10 | 0 | 0 | - 2020-01-05 01:00:00+00 | -3 | 7 | -13 | -3 | -1 | - 1874-12-07 18:40:00+00 | 0 | 10 | -10 | 0 | 0 | 'afefea' -(19 rows) - ---Testcase 104: -SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg((fields->>'c1')::bool), array_agg(tags->>'t1'), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::boolean != true ORDER BY 1 DESC, 2, 3; - array_agg | array_agg | array_agg | array_agg | array_agg -----------------------+-------------------------------------+----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {-1,0,0,1,2,2,16,17} | {t,t,NULL,NULL,NULL,NULL,NULL,NULL} | {faefek,-2323.54454,NULL,NULL,NULL,NULL,NULL,NULL} | {"`~!@#$%^&*()_+=-{}[]|:;<>?/.",$,0123456789,"change for new change","Change our locale from $ to ¥ in","Chúc mừng năm mới 2021","In Bulgarian it is desirable","Tôi không biết"} | {"1969-12-22 20:42:30+00","1970-01-01 00:00:00+00","2020-01-06 01:00:00+00","2020-01-07 01:00:00+00","2020-01-08 01:00:00+00","2020-01-11 01:00:00+00","2020-01-12 01:00:00+00","2020-01-13 01:00:00+00"} -(1 row) - ---Testcase 105: -SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15) FROM sctbl3 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; - bit_and | bit_and ----------+--------- -(0 rows) - ---Testcase 106: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; - bit_or | bit_or ---------+-------- - -5 | -2 - -4 | -2 - -3 | -1 - -2 | -1 - -1 | 0 - 0 | 0 - 0 | 0 - 1 | 0 - 1 | 0 - 2 | 1 - 3 | 1 - 4 | 2 - 5 | 2 - 32 | 16 - 34 | 17 -(15 rows) - ---Testcase 107: -SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c1')::bool), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3; - bool_and | bool_and | bool_and | bool_and -----------+----------+----------+---------- - t | f | f | f - t | t | f | f - t | t | f | f - t | | f | f - t | | f | f - t | | f | f - t | | f | f - f | f | f | f - f | | t | f - f | | t | f - f | | t | f - f | | t | f - f | | t | f -(13 rows) - ---Testcase 108: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint=40.772) GROUP BY tags->>'t1', fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 8; - max | max | max ------+-----+----- -(0 rows) - ---Testcase 109: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE fields->>'c2' IS NOT NULL GROUP BY fields->>'c3', fields->>'c1' HAVING min((fields->>'c3')::bigint)>=min((fields->>'c3')::bigint) ORDER BY (fields->>'c1')::bool DESC, 2, 3; - max | max | max --------------------------------+----------------+-------------- - 1677-09-21 00:12:43.145224+00 | -18427387904.0 | -36854775798 - 1677-09-21 00:12:43.145224+00 | -18427387903.5 | -36854775797 - 2020-01-03 01:00:00+00 | -2.5 | 5 - 2020-01-04 01:00:00+00 | -2.0 | 6 - 2020-01-05 01:00:00+00 | -1.5 | 7 - 2020-01-06 01:00:00+00 | -1.0 | 8 - 2020-01-07 01:00:00+00 | -0.5 | 9 - 2020-01-08 01:00:00+00 | 0.0 | 10 - 2020-01-09 01:00:00+00 | 0.5 | 11 - 2020-01-10 01:00:00+00 | 1.0 | 12 - 2020-01-11 01:00:00+00 | 1.5 | 13 - 2020-01-12 01:00:00+00 | 2.0 | 14 - 2020-01-13 01:00:00+00 | 2.5 | 15 - 2262-04-11 23:47:16.854776+00 | 18427387903.0 | 36854775816 - 2262-04-11 23:47:16.854776+00 | 18427387903.5 | 36854775817 - 1970-01-01 00:00:00+00 | 16.0 | 42 - 1969-12-22 20:42:30+00 | 17.0 | 44 - 1874-12-07 18:40:00+00 | 0.0 | 10 - 1970-01-01 00:00:04.343314+00 | 0.5 | 11 -(19 rows) - ---Testcase 110: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min(tags->>'t1') FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 8; - ?column? | min | min -----------+-----+----- -(0 rows) - ---Testcase 111: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY time ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; - ?column? | min --------------------------------+-------------- - 1677-10-01 00:12:43.145224+00 | -73709551616 - 2020-01-13 01:00:00+00 | -10 - 2020-01-14 01:00:00+00 | -8 - 2020-01-15 01:00:00+00 | -6 - 2020-01-16 01:00:00+00 | -4 -(5 rows) - ---Testcase 112: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, tags->>'t1', (fields->>'c4')::double precision HAVING max((fields->>'c3')::bigint)>min((fields->>'c4')::double precision) ORDER BY tags->>'t1' ASC LIMIT 5 OFFSET 0; - ?column? | min -------------------------+----- - 2020-01-16 01:00:00+00 | -4 - 2020-01-17 01:00:00+00 | -2 -(2 rows) - --- Select from sub query ---Testcase 113: -SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3; - time | c2 --------------------------------+---------------------------------------------------------------------------------- - 1874-12-07 18:40:00+00 | Qué estás haciendo - 1969-12-22 20:42:30+00 | change for new change - 1970-01-01 00:00:00+00 | Tôi không biết - 1970-01-01 00:00:04.343314+00 | lagi ngopo - 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ - 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 - 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ - 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. - 2020-01-07 01:00:00+00 | 0123456789 - 2020-01-08 01:00:00+00 | In Bulgarian it is desirable - 2020-01-09 01:00:00+00 | Which started out as a kind - 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo - 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in - 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 - 2020-01-13 01:00:00+00 | $ -(15 rows) - ---Testcase 114: -SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool = true ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY 1; - max | max | ?column? | ?column? | max | ?column? -------------------------+-----+----------+----------+-----+---------- - 1969-12-22 20:42:30+00 | 34 | 44 | 24 | 34 | 17 - 1970-01-01 00:00:00+00 | 32 | 42 | 22 | 32 | 16 -(2 rows) - ---Testcase 115: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM ( SELECT * FROM sctbl3 WHERE tags->>'t1' LIKE 't1là' ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; - stddev | stddev ---------+-------- -(0 rows) - ---Testcase 116: -SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,tags->>'t1' DESC; - sqrt | sqrt -------------------+------------------ - 0 | 0 - 0 | 0 - 1 | 1 - 1 | 1 - 1 | 1 - 1.4142135623731 | 1.4142135623731 - 1.4142135623731 | 1.4142135623731 - 1.73205080756888 | 1.73205080756888 - 1.73205080756888 | 1.73205080756888 - 2 | 2 - 2 | 2 - 2.23606797749979 | 2.23606797749979 - 2.23606797749979 | 2.23606797749979 - 5.65685424949238 | 5.65685424949238 - 5.8309518948453 | 5.8309518948453 -(15 rows) - ---Testcase 117: -SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, (fields->>'c3')::bigint c3 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE fields->>'c2' LIKE 'C%' ORDER BY tags->>'t1' DESC,fields->>'c2' ASC LIMIT 25 OFFSET 0; - t1 | c1 | c3 -----+----+---- - | | 2 - | | 3 - | | 4 -(3 rows) - ---Testcase 118: -SELECT (fields->>'c1')::bool c1, tags->>'t1' t1, (fields->>'c4')::double precision c4 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c4')::double precision>-1000 OR (fields->>'c3')::bigint<1000 ) AS tb3 WHERE NOT EXISTS (SELECT fields->>'c2' FROM sctbl3 WHERE fields->>'c2'='abcd') ORDER BY 1 DESC,2 ASC; - c1 | t1 | c4 -----+-------------+--------------- - | | 50.188 - | | 1.78e+68 - | | 20.312 - | | 30.631 - | | 40.772 - | | 1.79e+68 - | | -50.232 - | | -40.652 - | | -30.756 - | | -20.56 - | | -10.746 - | | 0.774 - | | 10.746 - t | -2323.54454 | 78.14 - t | faefek | -74 - f | "3gìvậy" | 1.024 - f | 'afefea' | 2000000000000 -(17 rows) - ---Testcase 119: -SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool != TRUE ) AS tb3 WHERE (fields->>'c3')::bigint NOT IN (345245, 1000, -132, -254) ORDER BY 1 DESC,2 ASC,3 LIMIT 5; - t1 | c1 | c2 -----------+----+-------------------- - 'afefea' | f | Qué estás haciendo - "3gìvậy" | f | lagi ngopo -(2 rows) - ---Testcase 120: -SELECT (fields->>'c1')::bool c1, fields->>'c2' c2, (fields->>'c4')::double precision c4 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY tags->>'t1'; - c1 | c2 | c4 -----+-----------------------------------------------------------------------+--------------- - t | Tôi không biết | 78.14 - f | Qué estás haciendo | 2000000000000 - t | change for new change | -74 - | In Bulgarian it is desirable | 0.774 - | Canada Denmark Turkey Yemen Tokyo | 20.312 - | Chúc mừng năm mới 2021 | 40.772 - | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -40.652 - | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -20.56 -(8 rows) - ---Testcase 121: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10), max(tags->>'t1') FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE true GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3 LIMIT 25 OFFSET 8; - max | max | max | max --------------------------------+------+-----+------------- - 2020-01-05 01:00:00+00 | -1.5 | 7 | - 2020-01-04 01:00:00+00 | -2.0 | 6 | - 2020-01-03 01:00:00+00 | -2.5 | 5 | - 1970-01-01 00:00:04.343314+00 | 0.5 | 11 | "3gìvậy" - 1970-01-01 00:00:00+00 | 16.0 | 42 | -2323.54454 - 1969-12-22 20:42:30+00 | 17.0 | 44 | faefek - 1874-12-07 18:40:00+00 | 0.0 | 10 | 'afefea' -(7 rows) - --- Select from view ---Testcase 122: -create view view_sctbl3 as select * from sctbl3 where ((fields->>'c1')::bool != false); ---Testcase 123: -SELECT stddev((fields->>'c3')::bigint), tags->>'t1' t1, stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time, tags->>'t1' ORDER BY 1 ASC,2 DESC; - stddev | t1 | stddev ---------+-------------+-------- - | faefek | - | -2323.54454 | -(2 rows) - ---Testcase 124: -SELECT tags->>'t1' t1 , max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool=false), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE time <= '2000-1-3 20:30:51' GROUP BY fields->>'c2', tags->>'t1' ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25; - t1 | max | count | exists | exists --------------+-----+-------+--------+-------- - -2323.54454 | 32 | 1 | t | t - faefek | 34 | 1 | t | t -(2 rows) - ---Testcase 125: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c5')::bool HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; - bit_or | bit_or ---------+-------- - 34 | 17 -(1 row) - ---Testcase 126: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10), max(tags->>'t1') FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; - max | max | max | max -------------------------+------+-----+------------- - 1970-01-01 00:00:00+00 | 16.0 | 42 | -2323.54454 - 1969-12-22 20:42:30+00 | 17.0 | 44 | faefek -(2 rows) - ---Testcase 127: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c1' ORDER BY 1 DESC, 2, 3; - sum | sum | ?column? ------+-----+---------- - 132 | 132 | 61 -(1 row) - ---Testcase 128: -SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50 FROM view_sctbl3 GROUP BY (fields->>'c1')::bool, (fields->>'c3')::bigint HAVING (fields->>'c1')::bool=true AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; - avg | ?column? -------------------------+---------- - 0.00000000000000000000 | f - 0.00000000000000000000 | f -(2 rows) - ---Testcase 129: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; - bit_or | bit_or ---------+-------- - 32 | 16 - 34 | 17 -(2 rows) - ---Testcase 130: -SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY fields->>'c1' ORDER BY 1 DESC, 2, 3; - bool_and | bool_and | bool_and -----------+----------+---------- - t | f | f -(1 row) - ---Testcase 131: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM view_sctbl3 WHERE fields->>'c2'<='$' OR (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 20; - time | t1 | c1 | c2 | c3 | c4 | c5 -------------------------+-------------+----+-----------------------+----+-------+---- - 1970-01-01 00:00:00+00 | -2323.54454 | t | Tôi không biết | 32 | 78.14 | f - 1969-12-22 20:42:30+00 | faefek | t | change for new change | 34 | -74 | f -(2 rows) - ---Testcase 132: -SELECT * FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3; - time | tags | fields -------------------------+-----------------------+--------------------------------------------------------------------------------------- - 1970-01-01 00:00:00+00 | {"t1": "-2323.54454"} | {"c1": "true", "c2": "Tôi không biết", "c3": "32", "c4": "78.14", "c5": "false"} - 1969-12-22 20:42:30+00 | {"t1": "faefek"} | {"c1": "true", "c2": "change for new change", "c3": "34", "c4": "-74", "c5": "false"} -(2 rows) - ---Testcase 133: -SELECT * FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY (fields->>'c1')::bool ASC LIMIT 5; - time | tags | fields -------------------------+-----------------------+--------------------------------------------------------------------------------------- - 1969-12-22 20:42:30+00 | {"t1": "faefek"} | {"c1": "true", "c2": "change for new change", "c3": "34", "c4": "-74", "c5": "false"} - 1970-01-01 00:00:00+00 | {"t1": "-2323.54454"} | {"c1": "true", "c2": "Tôi không biết", "c3": "32", "c4": "78.14", "c5": "false"} -(2 rows) - ---Testcase 134: -SELECT * FROM view_sctbl3 WHERE true ORDER BY (fields->>'c1')::bool DESC,tags->>'t1' LIMIT 5; - time | tags | fields -------------------------+-----------------------+--------------------------------------------------------------------------------------- - 1970-01-01 00:00:00+00 | {"t1": "-2323.54454"} | {"c1": "true", "c2": "Tôi không biết", "c3": "32", "c4": "78.14", "c5": "false"} - 1969-12-22 20:42:30+00 | {"t1": "faefek"} | {"c1": "true", "c2": "change for new change", "c3": "34", "c4": "-74", "c5": "false"} -(2 rows) - ---Testcase 135: -SELECT * FROM view_sctbl3 WHERE (fields->>'c3')::bigint NOT IN (-1,1,0,2,-2) ORDER BY tags->>'t1' DESC; - time | tags | fields -------------------------+-----------------------+--------------------------------------------------------------------------------------- - 1969-12-22 20:42:30+00 | {"t1": "faefek"} | {"c1": "true", "c2": "change for new change", "c3": "34", "c4": "-74", "c5": "false"} - 1970-01-01 00:00:00+00 | {"t1": "-2323.54454"} | {"c1": "true", "c2": "Tôi không biết", "c3": "32", "c4": "78.14", "c5": "false"} -(2 rows) - --- Select many target aggregate in one query and combine with (fields->>'c1')::bool ---Testcase 136: -SELECT upper(fields->>'c2'), lower(fields->>'c2'), lower(tags->>'t1') FROM sctbl3 ORDER BY 1 ASC,2 DESC,3; - upper | lower | lower -----------------------------------------------------------------------------------+----------------------------------------------------------------------------------+------------- - `~!@#$%^&*()_+=-{}[]|:;<>?/. | `~!@#$%^&*()_+=-{}[]|:;<>?/. | - ^%(@#%^(@#%&@#)%^)!^%)!)% | ^%(@#%^(@#%&@#)%^)!^%)!)% | - $ | $ | - กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | - いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | - 0123456789 | 0123456789 | - ĂÂĐÊÔƠƯDÊĐÊDỜENỜÍÌỜẸ | ăâđêôơưdêđêdờenờíìờẹ | - CANADA DENMARK TURKEY YEMEN TOKYO | canada denmark turkey yemen tokyo | - CHANGE FOR NEW CHANGE | change for new change | faefek - CHANGE OUR LOCALE FROM $ TO ¥ IN | change our locale from $ to ¥ in | - CHÚC MỪNG NĂM MỚI 2021 | chúc mừng năm mới 2021 | - IN BULGARIAN IT IS DESIRABLE | in bulgarian it is desirable | - LAGI NGOPO | lagi ngopo | "3gìvậy" - QUÉ ESTÁS HACIENDO | qué estás haciendo | 'afefea' - TÔI KHÔNG BIẾT | tôi không biết | -2323.54454 - WHICH STARTED OUT AS A KIND | which started out as a kind | - べ員葉コ番告7次ノヌ従援かやじり図安ヨ | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | - 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | - 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -(19 rows) - ---Testcase 137: -SELECT max(time), min((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count(*), count(tags->>'t1'), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC,2 ASC,3 DESC,4,5; - max | min | sum | count | count | avg -------------------------+-----+-----+-------+-------+--------------------- - 1970-01-01 00:00:00+00 | 32 | 32 | 1 | 1 | 32.0000000000000000 - 1969-12-22 20:42:30+00 | 34 | 34 | 1 | 1 | 34.0000000000000000 -(2 rows) - ---Testcase 138: -SELECT (fields->>'c3')::bigint*(random()<=1)::int, (random()<=1)::int*(25-10)+10 FROM sctbl3 ORDER BY tags->>'t1' ASC,fields->>'c1' DESC; - ?column? | ?column? ---------------+---------- - 32 | 25 - 1 | 25 - 0 | 25 - 34 | 25 - -3 | 25 - -2 | 25 - -1 | 25 - 0 | 25 - 1 | 25 - 2 | 25 - 3 | 25 - 4 | 25 - 5 | 25 - 36854775806 | 25 - -36854775808 | 25 - 36854775807 | 25 - -36854775807 | 25 - -5 | 25 - -4 | 25 -(19 rows) - ---Testcase 139: -SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; - max | count | exists | exists ------+-------+--------+-------- -(0 rows) - ---Testcase 140: -SELECT sum((fields->>'c3')::bigint) filter (WHERE (fields->>'c1')::bool = true), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint >0 AND (fields->>'c3')::bigint<100) FROM sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; - sum | avg ------+--------------------- - 66 | 15.6000000000000000 -(1 row) - ---Testcase 141: -SELECT 'abcd', 1234, (fields->>'c3')::bigint/2, 10+(fields->>'c3')::bigint * (random()<=1)::int * 0.5 FROM ( SELECT * FROM sctbl3 WHERE tags->>'t1' LIKE 't1' ) AS sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; - ?column? | ?column? | ?column? | ?column? -----------+----------+----------+---------- -(0 rows) - ---Testcase 142: -SELECT max((fields->>'c3')::bigint), min(tags->>'t1'), avg((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count((fields->>'c3')::bigint) FROM sctbl3 WHERE time > '1970-01-10 00:00:00' AND time < '2020-01-15 00:00:00' GROUP BY influx_time(time, interval '1d', interval '10h30m') ORDER BY 1,2,3,4,5; - max | min | avg | sum | count ------+-----+-------------------------+-----+------- - -5 | | -5.0000000000000000 | -5 | 1 - -4 | | -4.0000000000000000 | -4 | 1 - -3 | | -3.0000000000000000 | -3 | 1 - -2 | | -2.0000000000000000 | -2 | 1 - -1 | | -1.00000000000000000000 | -1 | 1 - 0 | | 0.00000000000000000000 | 0 | 1 - 1 | | 1.00000000000000000000 | 1 | 1 - 2 | | 2.0000000000000000 | 2 | 1 - 3 | | 3.0000000000000000 | 3 | 1 - 4 | | 4.0000000000000000 | 4 | 1 - 5 | | 5.0000000000000000 | 5 | 1 -(11 rows) - ---Testcase 143: -SELECT min(time), max(time), count(time) FROM sctbl3 GROUP BY fields->>'c3' ORDER BY 1,2,3; - min | max | count --------------------------------+-------------------------------+------- - 1677-09-21 00:12:43.145224+00 | 1677-09-21 00:12:43.145224+00 | 1 - 1677-09-21 00:12:43.145224+00 | 1677-09-21 00:12:43.145224+00 | 1 - 1874-12-07 18:40:00+00 | 2020-01-08 01:00:00+00 | 2 - 1969-12-22 20:42:30+00 | 1969-12-22 20:42:30+00 | 1 - 1970-01-01 00:00:00+00 | 1970-01-01 00:00:00+00 | 1 - 1970-01-01 00:00:04.343314+00 | 2020-01-09 01:00:00+00 | 2 - 2020-01-03 01:00:00+00 | 2020-01-03 01:00:00+00 | 1 - 2020-01-04 01:00:00+00 | 2020-01-04 01:00:00+00 | 1 - 2020-01-05 01:00:00+00 | 2020-01-05 01:00:00+00 | 1 - 2020-01-06 01:00:00+00 | 2020-01-06 01:00:00+00 | 1 - 2020-01-07 01:00:00+00 | 2020-01-07 01:00:00+00 | 1 - 2020-01-10 01:00:00+00 | 2020-01-10 01:00:00+00 | 1 - 2020-01-11 01:00:00+00 | 2020-01-11 01:00:00+00 | 1 - 2020-01-12 01:00:00+00 | 2020-01-12 01:00:00+00 | 1 - 2020-01-13 01:00:00+00 | 2020-01-13 01:00:00+00 | 1 - 2262-04-11 23:47:16.854776+00 | 2262-04-11 23:47:16.854776+00 | 1 - 2262-04-11 23:47:16.854776+00 | 2262-04-11 23:47:16.854776+00 | 1 -(17 rows) - ---Testcase 144: -SELECT count((fields->>'c3')::bigint), max((fields->>'c3')::bigint), sum((fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3' HAVING(max(fields->>'c2')!='change for new change' and count(fields->>'c2')>0) ORDER BY 1,2,3; - count | max | sum --------+--------------+-------------- - 1 | -36854775808 | -36854775808 - 1 | -36854775807 | -36854775807 - 1 | -5 | -5 - 1 | -4 | -4 - 1 | -3 | -3 - 1 | -2 | -2 - 1 | -1 | -1 - 1 | 2 | 2 - 1 | 3 | 3 - 1 | 4 | 4 - 1 | 5 | 5 - 1 | 32 | 32 - 1 | 36854775806 | 36854775806 - 1 | 36854775807 | 36854775807 - 2 | 0 | 0 - 2 | 1 | 2 -(16 rows) - ---Testcase 145: -SELECT array_agg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg((fields->>'c3')::bigint/(fields->>'c3')::bigint*(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint+(fields->>'c3')::bigint/(fields->>'c3')::bigint)*-1000), array_agg((fields->>'c3')::bigint*(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)+9999999999999.998) from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint ORDER BY 1, 2, 3, 4, 5; -ERROR: bigint out of range ---Testcase 146: -SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)-0.567-avg((fields->>'c3')::bigint/3+(fields->>'c3')::bigint)+17.55435, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+45))- -9.5+2*avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint/((fields->>'c3')::bigint-10.2)*(fields->>'c3')::bigint)+0.567+avg((fields->>'c3')::bigint)*4.5+(fields->>'c3')::bigint, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+5.6))+100-(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4 limit 5; - ?column? | ?column? | ?column? | ?column? -----------------------+------------------------+------------------------------------+-------------------------- - 5.9873500000000000 | 24.5000000000000000 | 23.25930769230769230770 | 100.47169811320754716981 - 20.9873500000000000 | 3.5000000000000000 | -10.76086885245901639344 | 99.44444444444444444444 - 85994476901.98735000 | -110564327413.50000000 | -239556042741.23300000280364236800 | 101.00000000015194774295 -(3 rows) - ---Testcase 147: -SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>0.774 OR fields->>'c2' = 'Which started out as a kind' GROUP BY fields->>'c3' ORDER BY 1, 2, 3; - ?column? | ?column? | ?column? -----------+----------+------------------------------- - -4.6 | 2 | -36854775795.8000000000000000 - -4.6 | 2 | -36854775794.8000000000000000 - -4.6 | 2 | -22.8000000000000000 - -4.6 | 2 | -20.8000000000000000 - -4.6 | 2 | 6.2000000000000000 - -4.6 | 2 | 7.2000000000000000 - -4.6 | 2 | 8.2000000000000000 - -4.6 | 2 | 9.2000000000000000 - -3.6 | 4 | 6.1000000000000000 -(9 rows) - --- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- --- Update data -\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null -drop view if exists view_sctbl3 ; -drop foreign table if exists sctbl3; -CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1, t2, t3, t4, t5'); -create view view_sctbl3 as select * from sctbl3 where ((fields->>'c20')::int != 6789 OR (fields->>'c19')::double precision != -1); --- Update data: add 5 tags and 20 fields --- Select all data with condition and combine clause ---Testcase 148: -SELECT * FROM sctbl3 WHERE (fields->>'c6')::double precision != -1 AND (fields->>'c5')::bool != true OR (fields->>'c8')::float > 0 ORDER BY tags->>'t1' DESC,(tags->>'t2')::int ASC, (fields->>'c6')::float DESC, fields->>'c9', (fields->>'c20')::int LIMIT 5 OFFSET 0; - time | tags | fields --------------------------------+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 1970-04-24 05:54:24.343435+00 | {"t1": "hhaffe.3fasf", "t2": "5", "t3": "413.1475", "t4": "8798i", "t5": "-86893.223E+1"} | {"c1": "true", "c2": "何してるの", "c3": "3685808", "c4": "8.7e+22", "c5": "true", "c6": "748452587", "c7": "-246455441441", "c8": "93.147895", "c9": "nospace", "c10": " aaa ", "c11": "-676", "c12": "false", "c13": "0", "c14": "19960102", "c15": "hôm nay là ngày rất rét", "c16": "11111", "c17": "false", "c18": "true", "c19": "-789456.123", "c20": "567"} - 1970-01-01 09:59:36.143464+00 | {"t1": "-4.2541", "t2": "4", "t3": "987412", "t4": "54i", "t5": "'7855.14444'"} | {"c1": "true", "c2": "ඔයා කරන්නේ කුමක් ද", "c3": "0", "c4": "-1200", "c5": "true", "c6": "32767", "c7": "7424654", "c8": "1.00007", "c9": " ", "c10": "aa a ", "c11": "-125", "c12": "false", "c13": "0", "c14": "252500", "c15": "tiếng việt có dấu", "c16": "113456", "c17": "true", "c18": "false", "c19": "-0.0000123", "c20": "-74"} -(2 rows) - ---Testcase 149: -SELECT * FROM sctbl3 WHERE NOT (fields->>'c16')::int<(fields->>'c3')::bigint ORDER BY (fields->>'c7')::float DESC, (fields->>'c8')::double precision ASC,fields->>'c9' DESC,fields->>'c10',(fields->>'c11')::bigint LIMIT 5 OFFSET 0; - time | tags | fields --------------------------------+------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 1970-04-12 17:40:00+00 | {"t1": "'tag2'", "t2": "2", "t3": "741.14", "t4": "4i", "t5": "'THisiSString'"} | {"c1": "false", "c2": "wenzani", "c3": "-98", "c4": "-2.58e+80", "c5": "true", "c6": "2147483647", "c7": "92272036855807", "c8": "-4.7854e-11", "c9": "!@#$%^&*", "c10": "a a", "c11": "32", "c12": "false", "c13": "1", "c14": "19654578", "c15": "Đây là tính năng mới của Influx", "c16": "321654", "c17": "false", "c18": "false", "c19": "-1.79e+308", "c20": "87"} - 1970-01-01 04:06:21.646135+00 | {"t1": "23223r", "t2": "3", "t3": "-74.255", "t4": "21i", "t5": "'111111'"} | {"c1": "true", "c2": "Што правиш", "c3": "-368545807", "c4": "850", "c5": "true", "c6": "-32768", "c7": "5563656565554", "c8": "-12.3456789", "c9": "special string", "c10": " a a", "c11": "-78", "c12": "false", "c13": "1", "c14": "19700101", "c15": "đây là tiếng Việt", "c16": "987987987", "c17": "true", "c18": "false", "c19": "-0.1111111", "c20": "-78"} - 1970-01-01 09:59:36.143464+00 | {"t1": "-4.2541", "t2": "4", "t3": "987412", "t4": "54i", "t5": "'7855.14444'"} | {"c1": "true", "c2": "ඔයා කරන්නේ කුමක් ද", "c3": "0", "c4": "-1200", "c5": "true", "c6": "32767", "c7": "7424654", "c8": "1.00007", "c9": " ", "c10": "aa a ", "c11": "-125", "c12": "false", "c13": "0", "c14": "252500", "c15": "tiếng việt có dấu", "c16": "113456", "c17": "true", "c18": "false", "c19": "-0.0000123", "c20": "-74"} - 1970-01-01 00:00:01.2+00 | {"t1": "'thisisatag'", "t2": "1", "t3": "7945.154", "t4": "0i", "t5": "\"thisistring\""} | {"c1": "true", "c2": "что ты делаешь", "c3": "546", "c4": "2.58e+80", "c5": "true", "c6": "-2147483648", "c7": "-32036854775808", "c8": "-78945.145441", "c9": "$$$$$&&&&&", "c10": "signle test", "c11": "8", "c12": "false", "c13": "0", "c14": "20112020", "c15": "ông là nhà văn hiện thực", "c16": "123456", "c17": "true", "c18": "false", "c19": "1.79e+308", "c20": "54"} -(4 rows) - ---Testcase 150: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE (fields->>'c20')::int > 0 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 --------------------------------+--------------+----+----------+-------+----------------+----+----------------+---------+-----------+----+-------------+-----------------+---------------+------------+-------------+------+-----+-----+----------+---------------------------------+--------+-----+-----+-------------+----- - 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 - 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 - 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 -(3 rows) - ---Testcase 151: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE NOT time>'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC,4,5; - time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 --------------------------------+--------------+----+----------+-------+----------------+----+----------------------------------------------------------------------------------+--------------+---------------+----+-------------+-----------------+---------------+----------------+-------------+------+-----+-----+----------+---------------------------------+-----------+-----+-----+-------------+----- - 2020-01-03 01:00:00+00 | | | | | | | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t | | | | | | | | | | | | | | | - 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 - 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 - 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 - 1970-01-01 04:06:21.646135+00 | 23223r | 3 | -74.255 | 21i | '111111' | t | Што правиш | -368545807 | 850 | t | -32768 | 5563656565554 | -12.3456789 | special string | a a | -78 | f | 1 | 19700101 | đây là tiếng Việt | 987987987 | t | f | -0.1111111 | -78 - 1970-01-01 00:00:04.343314+00 | "3gìvậy" | | | | | f | lagi ngopo | 1 | 1.024 | t | | | | | | | | | | | | | | | - 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 - 1970-01-01 00:00:00+00 | -2323.54454 | | | | | t | Tôi không biết | 32 | 78.14 | f | | | | | | | | | | | | | | | - 1969-12-22 20:42:30+00 | faefek | | | | | t | change for new change | 34 | -74 | f | | | | | | | | | | | | | | | - 1874-12-07 18:40:00+00 | 'afefea' | | | | | f | Qué estás haciendo | 0 | 2000000000000 | t | | | | | | | | | | | | | | | - 1677-09-21 00:12:43.145224+00 | | | | | | | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t | | | | | | | | | | | | | | | - 1677-09-21 00:12:43.145224+00 | | | | | | | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | 1.78e+68 | f | | | | | | | | | | | | | | | -(12 rows) - ---Testcase 152: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE EXISTS (SELECT fields->>'c15' FROM sctbl3 WHERE (fields->>'c19')::double precision!=40.772) ORDER BY 1 DESC,2 ASC,3 DESC,4,5; - time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 --------------------------------+--------------+----+----------+-------+----------------+----+----------------------------------------------------------------------------------+--------------+---------------+----+-------------+-----------------+---------------+----------------+-------------+------+-----+-----+----------+---------------------------------+-----------+-----+-----+-------------+----- - 2262-04-11 23:47:16.854776+00 | | | | | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f | | | | | | | | | | | | | | | - 2262-04-11 23:47:16.854776+00 | | | | | | | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f | | | | | | | | | | | | | | | - 2020-01-13 01:00:00+00 | | | | | | | $ | 5 | 50.188 | f | | | | | | | | | | | | | | | - 2020-01-12 01:00:00+00 | | | | | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f | | | | | | | | | | | | | | | - 2020-01-11 01:00:00+00 | | | | | | | Change our locale from $ to ¥ in | 3 | 30.631 | f | | | | | | | | | | | | | | | - 2020-01-10 01:00:00+00 | | | | | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t | | | | | | | | | | | | | | | - 2020-01-09 01:00:00+00 | | | | | | | Which started out as a kind | 1 | 10.746 | t | | | | | | | | | | | | | | | - 2020-01-08 01:00:00+00 | | | | | | | In Bulgarian it is desirable | 0 | 0.774 | f | | | | | | | | | | | | | | | - 2020-01-07 01:00:00+00 | | | | | | | 0123456789 | -1 | -10.746 | f | | | | | | | | | | | | | | | - 2020-01-06 01:00:00+00 | | | | | | | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f | | | | | | | | | | | | | | | - 2020-01-05 01:00:00+00 | | | | | | | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t | | | | | | | | | | | | | | | - 2020-01-04 01:00:00+00 | | | | | | | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t | | | | | | | | | | | | | | | - 2020-01-03 01:00:00+00 | | | | | | | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t | | | | | | | | | | | | | | | - 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 - 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 - 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 - 1970-01-01 04:06:21.646135+00 | 23223r | 3 | -74.255 | 21i | '111111' | t | Што правиш | -368545807 | 850 | t | -32768 | 5563656565554 | -12.3456789 | special string | a a | -78 | f | 1 | 19700101 | đây là tiếng Việt | 987987987 | t | f | -0.1111111 | -78 - 1970-01-01 00:00:04.343314+00 | "3gìvậy" | | | | | f | lagi ngopo | 1 | 1.024 | t | | | | | | | | | | | | | | | - 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 - 1970-01-01 00:00:00+00 | -2323.54454 | | | | | t | Tôi không biết | 32 | 78.14 | f | | | | | | | | | | | | | | | - 1969-12-22 20:42:30+00 | faefek | | | | | t | change for new change | 34 | -74 | f | | | | | | | | | | | | | | | - 1874-12-07 18:40:00+00 | 'afefea' | | | | | f | Qué estás haciendo | 0 | 2000000000000 | t | | | | | | | | | | | | | | | - 1677-09-21 00:12:43.145224+00 | | | | | | | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | 1.78e+68 | f | | | | | | | | | | | | | | | - 1677-09-21 00:12:43.145224+00 | | | | | | | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t | | | | | | | | | | | | | | | -(24 rows) - ---Testcase 153: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; - time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 --------------------------------+--------------+----+----------+-------+----------------+----+-----------------------------------------------------------------------+--------------+---------------+----+-------------+-----------------+---------------+------------+-------------+------+-----+-----+----------+---------------------------------+--------+-----+-----+-------------+----- - 2262-04-11 23:47:16.854776+00 | | | | | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f | | | | | | | | | | | | | | | - 2020-01-12 01:00:00+00 | | | | | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f | | | | | | | | | | | | | | | - 2020-01-10 01:00:00+00 | | | | | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t | | | | | | | | | | | | | | | - 2020-01-08 01:00:00+00 | | | | | | | In Bulgarian it is desirable | 0 | 0.774 | f | | | | | | | | | | | | | | | - 2020-01-06 01:00:00+00 | | | | | | | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f | | | | | | | | | | | | | | | - 2020-01-04 01:00:00+00 | | | | | | | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t | | | | | | | | | | | | | | | - 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 - 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 - 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 - 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 - 1970-01-01 00:00:00+00 | -2323.54454 | | | | | t | Tôi không biết | 32 | 78.14 | f | | | | | | | | | | | | | | | - 1969-12-22 20:42:30+00 | faefek | | | | | t | change for new change | 34 | -74 | f | | | | | | | | | | | | | | | - 1874-12-07 18:40:00+00 | 'afefea' | | | | | f | Qué estás haciendo | 0 | 2000000000000 | t | | | | | | | | | | | | | | | - 1677-09-21 00:12:43.145224+00 | | | | | | | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t | | | | | | | | | | | | | | | -(14 rows) - ---Testcase 154: -SELECT tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 from sctbl3 WHERE (fields->>'c13')::int >=0; - t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 ---------------+----+----------+-------+----------------+----+-----------------+------------+-----------+----+-------------+-----------------+---------------+----------------+-------------+------+-----+-----+----------+---------------------------------+-----------+-----+-----+-------------+----- - 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 - 23223r | 3 | -74.255 | 21i | '111111' | t | Што правиш | -368545807 | 850 | t | -32768 | 5563656565554 | -12.3456789 | special string | a a | -78 | f | 1 | 19700101 | đây là tiếng Việt | 987987987 | t | f | -0.1111111 | -78 - -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 - 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 - hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 -(5 rows) - --- Select aggregate function and specific column from original table ---Testcase 155: -SELECT max(tags->>'t4'), max(tags->>'t5'), max((fields->>'c3')::bigint), count(*),count((fields->>'c11')::bigint), count((fields->>'c13')::int), count((fields->>'c19')::double precision), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25 OFFSET 0; - max | max | max | count | count | count | count | exists | exists ------+----------------+------------+-------+-------+-------+-------+--------+-------- - 21i | '111111' | -368545807 | 1 | 1 | 1 | 1 | t | t - 4i | 'THisiSString' | -98 | 1 | 1 | 1 | 1 | t | t -(2 rows) - ---Testcase 156: -SELECT max(fields->>'c2'), min((fields->>'c3')::bigint), max((fields->>'c3')::bigint), max((fields->>'c11')::bigint), max((fields->>'c6')::double precision), max((fields->>'c7')::double precision), max((fields->>'c8')::float), max (20) from sctbl3 GROUP BY fields->>'c3' ORDER BY (fields->>'c3')::bigint; - max | min | max | max | max | max | max | max -----------------------------------------------------------------------------------+--------------+--------------+------+-------------+-----------------+---------------+----- - ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | -36854775808 | | | | | 20 - べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | -36854775807 | | | | | 20 - Што правиш | -368545807 | -368545807 | -78 | -32768 | 5563656565554 | -12.3456789 | 20 - wenzani | -98 | -98 | 32 | 2147483647 | 92272036855807 | -4.7854e-11 | 20 - いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -5 | | | | | 20 - 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -4 | | | | | 20 - กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -3 | | | | | 20 - `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -2 | | | | | 20 - 0123456789 | -1 | -1 | | | | | 20 - ඔයා කරන්නේ කුමක් ද | 0 | 0 | -125 | 32767 | 7424654 | 1.00007 | 20 - Which started out as a kind | 1 | 1 | | | | | 20 - Canada Denmark Turkey Yemen Tokyo | 2 | 2 | | | | | 20 - Change our locale from $ to ¥ in | 3 | 3 | | | | | 20 - Chúc mừng năm mới 2021 | 4 | 4 | | | | | 20 - $ | 5 | 5 | | | | | 20 - Tôi không biết | 32 | 32 | | | | | 20 - change for new change | 34 | 34 | | | | | 20 - что ты делаешь | 546 | 546 | 8 | -2147483648 | -32036854775808 | -78945.145441 | 20 - 何してるの | 3685808 | 3685808 | -676 | 748452587 | -246455441441 | 93.147895 | 20 - ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | 36854775806 | | | | | 20 - 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | 36854775807 | | | | | 20 -(21 rows) - ---Testcase 157: -SELECT sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), sum((fields->>'c6')::double precision), sum((fields->>'c7')::double precision), sum((fields->>'c8')::float), sum((fields->>'c11')::bigint), sum((fields->>'c13')::int), sum((fields->>'c16')::int) FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1; - sum | sum | sum | sum | sum | sum | sum | sum ---------------+--------------+-------------+-----------------+---------------+------+-----+----------- - -36854775808 | -36854775808 | | | | | | - -36854775807 | -36854775807 | | | | | | - -368545807 | -368545807 | -32768 | 5563656565554 | -12.3456789 | -78 | 1 | 987987987 - -98 | -98 | 2147483647 | 92272036855807 | -4.7854e-11 | 32 | 1 | 321654 - -5 | -5 | | | | | | - -4 | -4 | | | | | | - -3 | -3 | | | | | | - -2 | -2 | | | | | | - -1 | -1 | | | | | | - 0 | 0 | 32767 | 7424654 | 1.00007 | -125 | 0 | 113456 - 0 | 0 | | | | | | - 0 | 0 | | | | | | - 1 | 1 | | | | | | - 1 | 1 | | | | | | - 2 | 2 | | | | | | - 3 | 3 | | | | | | - 4 | 4 | | | | | | - 5 | 5 | | | | | | - 32 | 32 | | | | | | - 34 | 34 | | | | | | - 546 | 546 | -2147483648 | -32036854775808 | -78945.145441 | 8 | 0 | 123456 - 3685808 | 3685808 | 748452587 | -246455441441 | 93.147895 | -676 | 0 | 11111 - 36854775806 | 36854775806 | | | | | | - 36854775807 | 36854775807 | | | | | | -(24 rows) - ---Testcase 158: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), stddev((fields->>'c11')::bigint), stddev((fields->>'c13')::int), stddev((fields->>'c14')::bigint), stddev((fields->>'c16')::int), stddev((fields->>'c19')::double precision), stddev((fields->>'c20')::int) FROM sctbl3 GROUP BY fields->>'c5', fields->>'c12' HAVING (fields->>'c12')::bool = true ORDER BY 1 ASC,2 DESC; - stddev | stddev | stddev | stddev | stddev | stddev | stddev | stddev ---------+--------+--------+--------+--------+--------+--------+-------- -(0 rows) - ---Testcase 159: -SELECT every((fields->>'c3')::bigint>0), every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time, (fields->>'c20')::int, tags->>'t5' ORDER BY (fields->>'c20')::int ASC,tags->>'t5' DESC; - every | every --------+------- - f | f - f | f - t | f - f | f - t | f - f | f - t | f - t | f - t | f - t | f - f | f - t | f - t | f - f | f - f | f - t | f - f | f - t | f - t | f - f | f - f | f - f | f -(22 rows) - ---Testcase 160: -SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, bool_and((fields->>'c12')::bool), bool_and((fields->>'c17')::bool), bool_and((fields->>'c17')::bool) AND TRUE from sctbl3 ORDER BY 1,2,3; - ?column? | bool_and | ?column? | bool_and | bool_and | ?column? -----------+----------+----------+----------+----------+---------- - t | t | f | f | f | f -(1 row) - ---Testcase 161: -SELECT bool_or((fields->>'c3')::bigint <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, bool_or((fields->>'c17')::bool), bool_or((fields->>'c1')::bool), bool_or((fields->>'c5')::bool) OR FALSE from sctbl3 ORDER BY 1,2,3; - ?column? | bool_or | ?column? | bool_or | bool_or | ?column? -----------+---------+----------+---------+---------+---------- - t | t | t | t | t | t -(1 row) - --- Select combine aggregate via operation ---Testcase 162: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5, sum((fields->>'c13')::int + -43.3)-3, sum((fields->>'c16')::int*2) + 1, sum((fields->>'c19')::double precision-7554)+785 FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; - sum | sum | ?column? | ?column? | ?column? | ?column? ----------------+---------------+--------------+----------+------------+--------------- - 147419103226 | 147419103226 | 73709551608 | | | - 7371616 | 7371616 | 3685803 | -46.3 | 22223 | -796225.123 - 1092 | 1092 | 541 | -46.3 | 246913 | 1.79e+308 - 68 | 68 | 29 | | | - 64 | 64 | 27 | | | - 10 | 10 | 0 | | | - 8 | 8 | -1 | | | - 6 | 6 | -2 | | | - 4 | 4 | -3 | | | - 2 | 2 | -4 | | | - 2 | 2 | -4 | | | - 0 | 0 | -5 | -46.3 | 226913 | -6769.0000123 - 0 | 0 | -5 | | | - 0 | 0 | -5 | | | - -2 | -2 | -6 | | | - -4 | -4 | -7 | | | - -6 | -6 | -8 | | | - -8 | -8 | -9 | | | - -10 | -10 | -10 | | | - -196 | -196 | -103 | -45.3 | 643309 | -1.79e+308 - -737091614 | -737091614 | -368545812 | -45.3 | 1975975975 | -6769.1111111 - -147419103230 | -147419103230 | -73709551620 | | | -(22 rows) - ---Testcase 163: -SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time), array_agg((fields->>'c6')::double precision+2), array_agg((fields->>'c7')::double precision/10), array_agg((fields->>'c8')::float-2) FROM sctbl3 GROUP BY (fields->>'c17')::bool, (fields->>'c20')::int, (fields->>'c18')::bool, (fields->>'c19')::double precision HAVING (fields->>'c17')::bool != true ORDER BY (fields->>'c20')::int DESC, (fields->>'c19')::double precision, (fields->>'c18')::bool; - array_agg | array_agg | array_agg | array_agg | array_agg | array_agg ------------+--------------+-----------------------------------+--------------+-------------------+--------------------- - {1842904} | {何してるの} | {"1970-04-24 05:54:24.343435+00"} | {748452589} | {-24645544144.1} | {91.147895} - {-49} | {wenzani} | {"1970-04-12 17:40:00+00"} | {2147483649} | {9227203685580.7} | {-2.00000000004785} -(2 rows) - ---Testcase 164: -SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15), bit_and((fields->>'c13')::int+768) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c16')::int>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c13', fields->>'c14' HAVING min((fields->>'c13')::int)>'c14')::bigint) ORDER BY (fields->>'c13')::int ASC,(fields->>'c14')::bigint DESC; - bit_and | bit_and | bit_and -------------+------------+--------- - 546 | 561 | 768 - 0 | 15 | 768 - -368545807 | -368545792 | 769 - -98 | -83 | 769 -(4 rows) - ---Testcase 165: -SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint), bool_and((fields->>'c19')::double precision <= (fields->>'c20')::int) FROM sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3; - bool_and | bool_and | bool_and | bool_and -----------+----------+----------+---------- - t | f | f | - t | f | f | - t | f | f | - t | f | f | - t | f | f | - t | f | f | - t | f | f | - f | f | f | f - f | t | f | - f | t | f | t - f | t | f | - f | t | f | - f | t | f | - f | t | f | -(14 rows) - ---Testcase 166: -SELECT max(tags->>'t1'), max(tags->>'t2'), max(time), max((fields->>'c3')::bigint*0.5/(fields->>'c11')::bigint), max((fields->>'c3')::bigint+10-(fields->>'c8')::float), max((fields->>'c6')::double precision*2+(fields->>'c13')::int), max((fields->>'c8')::float-32+(fields->>'c16')::int), max((fields->>'c19')::double precision/32) FROM sctbl3 WHERE fields->>'c2' IS NOT NULL GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; - max | max | max | max | max | max | max | max ------+-----+------------------------+-----+-----+-----+-----+----- - | | 2020-01-03 01:00:00+00 | | | | | - | | 2020-01-04 01:00:00+00 | | | | | - | | 2020-01-05 01:00:00+00 | | | | | - | | 2020-01-06 01:00:00+00 | | | | | - | | 2020-01-07 01:00:00+00 | | | | | -(5 rows) - ---Testcase 167: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE fields->>'c2' IS NULL GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; - max | max | max ------+-----+----- -(0 rows) - ---Testcase 168: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min((fields->>'c19')::double precision + (fields->>'c20')::int/2) FROM sctbl3 WHERE true GROUP BY fields->>'c2', fields->>'c3', fields->>'c3', fields->>'c14' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c14')::bigint) ORDER BY 1 ASC,2 DESC; - ?column? | min | min -----------+-----+----- -(0 rows) - ---Testcase 169: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min((fields->>'c11')::bigint-(fields->>'c7')::double precision), min((fields->>'c6')::double precision+(fields->>'c8')::float) FROM sctbl3 WHERE false GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; - ?column? | min | min | min -----------+-----+-----+----- -(0 rows) - ---Testcase 170: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY fields->>'c19', fields->>'c20' HAVING min((fields->>'c19')::double precision)>min((fields->>'c20')::int) ORDER BY 1 ASC,2 DESC; - ?column? | min --------------------------------+----- - 1970-01-11 09:59:36.143464+00 | 0 -(1 row) - --- Select from sub query ---Testcase 171: -SELECT time, fields->>'c2' c2, fields->>'c15' c15, tags->>'t1' t1, (tags->>'t3')::double precision t3, tags->>'t5' t5, (fields->>'c12')::bool c12, (fields->>'c14')::bigint c14 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c13')::int>-1000 OR (fields->>'c19')::double precision<1000 ) AS sctbl3; - time | c2 | c15 | t1 | t3 | t5 | c12 | c14 --------------------------------+-----------------+---------------------------------+--------------+----------+----------------+-----+---------- - 1970-01-01 00:00:01.2+00 | что ты делаешь | ông là nhà văn hiện thực | 'thisisatag' | 7945.154 | "thisistring" | f | 20112020 - 1970-01-01 04:06:21.646135+00 | Што правиш | đây là tiếng Việt | 23223r | -74.255 | '111111' | f | 19700101 - 1970-01-01 09:59:36.143464+00 | ඔයා කරන්නේ කුමක් ද | tiếng việt có dấu | -4.2541 | 987412 | '7855.14444' | f | 252500 - 1970-04-12 17:40:00+00 | wenzani | Đây là tính năng mới của Influx | 'tag2' | 741.14 | 'THisiSString' | f | 19654578 - 1970-04-24 05:54:24.343435+00 | 何してるの | hôm nay là ngày rất rét | hhaffe.3fasf | 413.1475 | -86893.223E+1 | f | 19960102 -(5 rows) - ---Testcase 172: -SELECT max(time), max(7), max((fields->>'c7')::double precision)+17, max((fields->>'c11')::bigint)+10, max((fields->>'c3')::bigint), max((fields->>'c14')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY fields->>'c2'; - max | max | ?column? | ?column? | max | ?column? --------------------------------+-----+-----------------+----------+-----+---------- - 2020-01-06 01:00:00+00 | 7 | | | -2 | - 2020-01-13 01:00:00+00 | 7 | | | 5 | - 2020-01-05 01:00:00+00 | 7 | | | -3 | - 2020-01-03 01:00:00+00 | 7 | | | -5 | - 2020-01-07 01:00:00+00 | 7 | | | -1 | - 2020-01-10 01:00:00+00 | 7 | | | 2 | - 1969-12-22 20:42:30+00 | 7 | | | 34 | - 2020-01-11 01:00:00+00 | 7 | | | 3 | - 2020-01-12 01:00:00+00 | 7 | | | 4 | - 2020-01-08 01:00:00+00 | 7 | | | 0 | - 1970-01-01 00:00:04.343314+00 | 7 | | | 1 | - 1874-12-07 18:40:00+00 | 7 | | | 0 | - 1970-01-01 00:00:00+00 | 7 | | | 32 | - 1970-04-12 17:40:00+00 | 7 | 92272036855824 | 42 | -98 | 9827289 - 2020-01-09 01:00:00+00 | 7 | | | 1 | - 1970-01-01 00:00:01.2+00 | 7 | -32036854775791 | 18 | 546 | 10056010 - 1970-01-01 09:59:36.143464+00 | 7 | 7424671 | -115 | 0 | 126250 - 2020-01-04 01:00:00+00 | 7 | | | -4 | -(18 rows) - ---Testcase 173: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), stddev((fields->>'c11')::bigint), stddev((fields->>'c14')::bigint), stddev((fields->>'c19')::double precision) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; -ERROR: value out of range: overflow ---Testcase 174: -SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c11')::bigint)), sqrt(abs((fields->>'c20')::int)) FROM ( SELECT * FROM sctbl3 WHERE tags->>'t5' LIKE '111111' ) AS sctbl3 ORDER BY 1 ASC,2 DESC; - sqrt | sqrt | sqrt | sqrt -------------------+------------------+------------------+------------------ - 19197.5469005808 | 19197.5469005808 | 8.83176086632785 | 8.83176086632785 -(1 row) - ---Testcase 175: -SELECT * FROM ( SELECT tags->>'t1' t1, (tags->>'t2')::int t2, (tags->>'t3')::double precision t3, tags->>'t4' t4, tags->>'t5' t5, fields->>'c2' c2, (fields->>'c3')::bigint c3 FROM sctbl3 WHERE (fields->>'c13')::int>-1000 OR (fields->>'c14')::bigint<1000 ) AS tb3 WHERE c3 <-1 AND c2 > 'KissMe' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - t1 | t2 | t3 | t4 | t5 | c2 | c3 ---------+----+---------+-----+----------------+------------+------------ - 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | wenzani | -98 - 23223r | 3 | -74.255 | 21i | '111111' | Што правиш | -368545807 -(2 rows) - ---Testcase 176: -SELECT * FROM ( SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE c3 IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; - time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 --------------------------------+----------+----+--------+-----+--------------+----+-----------------------------------+----+---------------+----+-------+---------+---------+----------+------------+------+-----+-----+--------+-------------------+--------+-----+-----+-----------+----- - 2020-01-10 01:00:00+00 | | | | | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t | | | | | | | | | | | | | | | - 2020-01-09 01:00:00+00 | | | | | | | Which started out as a kind | 1 | 10.746 | t | | | | | | | | | | | | | | | - 2020-01-08 01:00:00+00 | | | | | | | In Bulgarian it is desirable | 0 | 0.774 | f | | | | | | | | | | | | | | | - 2020-01-07 01:00:00+00 | | | | | | | 0123456789 | -1 | -10.746 | f | | | | | | | | | | | | | | | - 2020-01-06 01:00:00+00 | | | | | | | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f | | | | | | | | | | | | | | | - 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 - 1970-01-01 00:00:04.343314+00 | "3gìvậy" | | | | | f | lagi ngopo | 1 | 1.024 | t | | | | | | | | | | | | | | | - 1874-12-07 18:40:00+00 | 'afefea' | | | | | f | Qué estás haciendo | 0 | 2000000000000 | t | | | | | | | | | | | | | | | -(8 rows) - ---Testcase 177: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM ( SELECT * FROM sctbl3 WHERE fields->>'c10' LIKE 'a a') AS tb3 WHERE (fields->>'c3')::bigint > 0 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint) < avg((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3; - max | max | max ------+-----+----- -(0 rows) - --- Select from view ---Testcase 179: -SELECT stddev((fields->>'c13')::int), stddev((fields->>'c14')::bigint ORDER BY (fields->>'c14')::bigint) FROM view_sctbl3 GROUP BY time, fields->>'c13', fields->>'c14' ORDER BY (fields->>'c13')::int ASC, (fields->>'c14')::bigint DESC; - stddev | stddev ---------+-------- - | - | - | - | - | -(5 rows) - ---Testcase 180: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; - bit_or | bit_or ---------+-------- -(0 rows) - ---Testcase 181: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; - max | max | max --------------------------------+--------------+------------ - 1970-04-24 05:54:24.343435+00 | 1842904.0 | 3685818 - 1970-04-12 17:40:00+00 | -49.0 | -88 - 1970-01-01 09:59:36.143464+00 | 0.0 | 10 - 1970-01-01 04:06:21.646135+00 | -184272903.5 | -368545797 - 1970-01-01 00:00:01.2+00 | 273.0 | 556 -(5 rows) - ---Testcase 182: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3; - sum | sum | ?column? -------------+------------+------------ - 7371616 | 7371616 | 3685803 - 1092 | 1092 | 541 - 0 | 0 | -5 - -196 | -196 | -103 - -737091614 | -737091614 | -368545812 -(5 rows) - ---Testcase 183: -SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50, tags->>'t4' t4, (fields->>'c12')::bool c12, (fields->>'c19')::double precision+(fields->>'c20')::int FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, tags->>'t4', (fields->>'c12')::bool, (fields->>'c19')::double precision, (fields->>'c20')::int HAVING sum((fields->>'c13')::int)<100 OR sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c11')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; - avg | ?column? | t4 | c12 | ?column? -------------------------+----------+-------+-----+------------- - 0.00000000000000000000 | t | 0i | f | 1.79e+308 - 0.00000000000000000000 | t | 8798i | f | -788889.123 - 0.00000000000000000000 | f | 21i | f | -78.1111111 - 0.00000000000000000000 | f | 4i | f | -1.79e+308 - 0.00000000000000000000 | f | 54i | f | -74.0000123 -(5 rows) - ---Testcase 184: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2), (tags->>'t2')::int t2, (tags->>'t3')::double precision t3 FROM view_sctbl3 GROUP BY tags->>'t2', tags->>'t3', fields->>'c3', fields->>'c3' HAVING min((fields->>'c16')::int)<100 AND max((fields->>'c11')::bigint)<1000 OR sum((fields->>'c7')::double precision)>-7894 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; - bit_or | bit_or | t2 | t3 ---------+--------+----+-------- - -98 | -49 | 2 | 741.14 - 0 | 0 | 4 | 987412 -(2 rows) - ---Testcase 185: -SELECT bool_and((fields->>'c11')::bigint>0), bool_and((fields->>'c13')::int<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint), bool_and((fields->>'c7')::double precision>=(fields->>'c8')::float) FROM view_sctbl3 GROUP BY time, tags->>'t1', tags->>'t2',tags->>'t3' ORDER BY tags->>'t1' DESC,(tags->>'t2')::float, (tags->>'t3')::double precision; - bool_and | bool_and | bool_and | bool_and -----------+----------+----------+---------- - t | f | f | f - t | f | f | t - f | f | f | f - f | f | f | t - f | f | f | t -(5 rows) - ---Testcase 186: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5; - time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 -------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----- -(0 rows) - ---Testcase 187: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5; - time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 --------------------------------+--------------+----+----------+-------+----------------+----+-----------------+------------+-----------+----+-------------+-----------------+---------------+----------------+-------------+------+-----+-----+----------+---------------------------------+-----------+-----+-----+-------------+----- - 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 - 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 - 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 - 1970-01-01 04:06:21.646135+00 | 23223r | 3 | -74.255 | 21i | '111111' | t | Што правиш | -368545807 | 850 | t | -32768 | 5563656565554 | -12.3456789 | special string | a a | -78 | f | 1 | 19700101 | đây là tiếng Việt | 987987987 | t | f | -0.1111111 | -78 - 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 -(5 rows) - ---Testcase 188: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; - time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 -------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----- -(0 rows) - ---Testcase 189: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 DESC; - time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 --------------------------------+--------------+----+----------+-------+----------------+----+-----------------+------------+-----------+----+-------------+-----------------+---------------+----------------+-------------+------+-----+-----+----------+---------------------------------+-----------+-----+-----+-------------+----- - 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 - 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 - 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 - 1970-01-01 04:06:21.646135+00 | 23223r | 3 | -74.255 | 21i | '111111' | t | Што правиш | -368545807 | 850 | t | -32768 | 5563656565554 | -12.3456789 | special string | a a | -78 | f | 1 | 19700101 | đây là tiếng Việt | 987987987 | t | f | -0.1111111 | -78 - 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 -(5 rows) - ---Testcase 190: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE (fields->>'c3')::bigint NOT IN (-42,65,0,78,-891) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; - time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 -------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----- -(0 rows) - --- Select many target aggregate in one query and combine with condition ---Testcase 191: -SELECT count((fields->>'c1')::bool)+count(fields->>'c2')-2*count((fields->>'c3')::bigint), count((fields->>'c3')::bigint)/count((fields->>'c5')::bool)-(fields->>'c3')::bigint, count((fields->>'c11')::bigint-(fields->>'c14')::bigint), 2*count(*) from sctbl3 GROUP BY fields->>'c5', fields->>'c3', fields->>'c1', fields->>'c20', tags->>'t5' order by tags->>'t5', fields->>'c1', (fields->>'c20')::int limit 1; - ?column? | ?column? | count | ?column? -----------+-----------+-------+---------- - 0 | 368545808 | 1 | 2 -(1 row) - ---Testcase 192: -SELECT every((fields->>'c1')::bool != TRUE) AND true, every((fields->>'c3')::bigint <> 10) OR every((fields->>'c3')::bigint > 5.6), every((fields->>'c3')::bigint <= 2) OR (fields->>'c5')::bool from sctbl3 GROUP BY fields->>'c5' ORDER BY 1,2,3 limit 6; - ?column? | ?column? | ?column? -----------+----------+---------- - f | t | f - f | t | t -(2 rows) - ---Testcase 193: -SELECT stddev((fields->>'c3')::bigint*3-(fields->>'c3')::bigint)*1000000-(fields->>'c3')::bigint, stddev((fields->>'c3')::bigint)-0.567, stddev((fields->>'c3')::bigint/((fields->>'c3')::bigint-1.3))/6, stddev((fields->>'c3')::bigint+4*(fields->>'c3')::bigint)*100, stddev((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint-52.1))+1 from sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY fields->>'c3' ORDER BY 1,2,3,4,5 ; - ?column? | ?column? | ?column? | ?column? | ?column? -----------+----------+----------+----------+---------- - | | | | - | | | | - | | | | - | | | | - | | | | - | | | | - | | | | - | | | | - | | | | -(9 rows) - ---Testcase 194: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-6, sum((fields->>'c3')::bigint/((fields->>'c3')::bigint+9999999)-(fields->>'c3')::bigint)*9999999999999.998, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/((fields->>'c3')::bigint+111111))*-9.5, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6 from sctbl3; - ?column? | ?column? | ?column? | ?column? | ?column? -------------+----------------------------+--------------+-----------------------+------------- - -364859492 | 3648594889999999270281.022 | 3466165145.5 | 20784562.572809588507 | -6567470748 -(1 row) - ---Testcase 195: -SELECT sum((fields->>'c14')::bigint+(fields->>'c3')::bigint)-6+sum((fields->>'c11')::bigint), sum((fields->>'c3')::bigint*1.3-(fields->>'c3')::bigint)*9.998-sum((fields->>'c7')::double precision)*4, sum((fields->>'c8')::float-(fields->>'c7')::double precision/4)*-9.5-(fields->>'c3')::bigint, sum((fields->>'c20')::int-(fields->>'c3')::bigint-(fields->>'c16')::int)/17.55435+(fields->>'c3')::bigint, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6-(fields->>'c3')::bigint-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c13', fields->>'c14', fields->>'c16', fields->>'c11', fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4,5; - ?column? | ?column? | ?column? | ?column? | ?column? -------------+-------------------+-------------------+-------------------------+--------------- - -348845790 | -22255731678509.5 | 13214052889115 | -403832915.779305414328 | -5896732912 - 252369 | -29698616 | 17633543.749335 | -6467.3428523414424345 | 0 - 19654506 | -369088147423522 | 219146087532640 | -18410.782871481997 | -1568 - 20112568 | 128147419104870 | -76087529343111.1 | -6514.8139862769057242 | 8736 - 23645228 | 985832820976.515 | -585335360115.28 | 3475241.844032960491 | 58972928 - | | | | -589676412928 - | | | | -589676412912 - | | | | -80 - | | | | -64 - | | | | -48 - | | | | -32 - | | | | -16 - | | | | 0 - | | | | 32 - | | | | 34 - | | | | 48 - | | | | 64 - | | | | 80 - | | | | 512 - | | | | 544 - | | | | 589676412896 - | | | | 589676412912 -(22 rows) - ---Testcase 196: -SELECT max((fields->>'c16')::int), max((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, max((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, max((fields->>'c3')::bigint)+max((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c13')::int>= 0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY (fields->>'c3')::int, (fields->>'c3')::int; - max | ?column? | ?column? | ?column? ------------+------------+------------+------------ - 987987987 | -737091615 | -368545810 | -737091614 - 321654 | -197 | -101 | -196 - 113456 | -1 | -3 | 0 - 123456 | 1091 | 543 | 1092 - 11111 | 7371615 | 3685805 | 7371616 -(5 rows) - ---Testcase 197: -SELECT variance((fields->>'c3')::bigint+(fields->>'c3')::bigint)+(fields->>'c3')::bigint, variance((fields->>'c3')::bigint*3)+(fields->>'c3')::bigint+1, variance((fields->>'c3')::bigint-2)+10 from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, (tags->>'t3')::double precision ORDER BY (tags->>'t3')::double precision; - ?column? | ?column? | ?column? -----------+----------+---------- - | | - | | - | | - | | - | | - | | - | | - | | - | | - | | - | | - 0 | 1 | 10 - | | - | | - | | - | | - | | - | | - | | - | | - 1 | 2 | 10 - | | -(22 rows) - ---Testcase 198: -SELECT sqrt(abs((fields->>'c3')::bigint*5)) + sqrt(abs((fields->>'c3')::bigint+6)), sqrt(abs((fields->>'c3')::bigint)+5)+(fields->>'c3')::bigint, 4*sqrt(abs((fields->>'c3')::bigint-100))-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1, 2, 3; - ?column? | ?column? | ?column? -------------------+-------------------+------------------ - 2.44948974278318 | 2.23606797749979 | 40 - 2.44948974278318 | 2.23606797749979 | 40 - 2.44948974278318 | 2.23606797749979 | 40 - 4.47213595499958 | 1.44948974278318 | 41.1995024844836 - 5.16227766016838 | 0.645751311064591 | 42.3980197534483 - 5.60503415377629 | -0.17157287525381 | 43.5955662603689 - 5.88634951737267 | -1 | 44.7921561087423 - 6 | -1.83772233983162 | 45.9878030638384 - 31.7276066678041 | -87.8511084349078 | 154.284989117881 - 62124.5666152499 | -368526609.452969 | 368622597.19802 - 621247.312124984 | -36854583831.0228 | 36855543710.9097 - 621247.312133412 | -36854583832.0228 | 36855543711.9097 -(12 rows) - ---Testcase 199: -SELECT max((fields->>'c3')::bigint)+min((fields->>'c3')::bigint)+3, min((fields->>'c3')::bigint)-sqrt(abs((fields->>'c3')::bigint-45.21))+(fields->>'c3')::bigint*2, count(*)-count((fields->>'c5')::bool)+2, (fields->>'c5')::bool c5, (fields->>'c3')::bigint c3 from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, (fields->>'c5')::bool ORDER BY 1,2,3,4; - ?column? | ?column? | ?column? | c5 | c3 ---------------+---------------------------+----------+----+-------------- - -73709551613 | -110564519399.97728155989 | 2 | t | -36854775808 - -73709551611 | -110564519396.97727895540 | 2 | f | -36854775807 - -737091611 | -1105656618.54807807497 | 2 | t | -368545807 - -193 | -305.967038062946069 | 2 | t | -98 - -7 | -22.085901495222750 | 2 | t | -5 - -5 | -19.014983962918233 | 2 | t | -4 - -3 | -15.943342134735980 | 2 | t | -3 - -1 | -12.870953354520754 | 2 | f | -2 - 1 | -9.797793759742936 | 2 | f | -1 - 3 | -6.723838189605696 | 2 | f | 0 - 3 | -6.723838189605696 | 2 | t | 0 - 5 | -3.649060083951716 | 2 | t | 1 - 7 | -0.573431371817918 | 2 | t | 2 - 9 | 2.503077651687685 | 2 | f | 3 - 11 | 5.580498461718387 | 2 | f | 4 - 13 | 8.658864455004924 | 2 | f | 5 - 67 | 92.365443630922750 | 2 | f | 32 - 71 | 98.651866191443359 | 2 | f | 34 - 1095 | 1615.621662260123072 | 2 | t | 546 - 7371619 | 11055504.1659472756506 | 2 | t | 3685808 - 73709551615 | 110564135442.02295914731 | 2 | f | 36854775806 - 73709551617 | 110564135445.02295654282 | 2 | f | 36854775807 -(22 rows) - ---Testcase 200: -SELECT variance((fields->>'c3')::bigint)-5*min((fields->>'c3')::bigint)-1, every((fields->>'c5')::bool <> true), max((fields->>'c3')::bigint+4.56)*3-min((fields->>'c3')::bigint), count((fields->>'c3')::bigint)-4 from sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1,2,3,4; - ?column? | every | ?column? | ?column? --------------------------+-------+----------+---------- - -5.08333333333333333333 | f | 21.68 | 0 -(1 row) - ---Testcase 201: -SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3')::bigint)/3-(fields->>'c3')::bigint, min((fields->>'c3')::bigint)+(fields->>'c3')::bigint/4, (fields->>'c5')::bool c5, (fields->>'c20')::int-(fields->>'c19')::double precision-(fields->>'c16')::int from sctbl3 GROUP BY (fields->>'c20')::int, (fields->>'c19')::double precision, (fields->>'c16')::int, (fields->>'c3')::bigint, (fields->>'c3')::bigint, (fields->>'c5')::bool ORDER BY 1,2,3,4,5; - ?column? | ?column? | ?column? | ?column? | c5 | ?column? ---------------+--------------+-------------------------+--------------+----+------------------- - -36854775838 | -36854775818 | 24569850538.66666667 | -46068469760 | t | - -36854775837 | -36854775817 | 24569850538.00000000 | -46068469758 | f | - -368545837 | -368545817 | 245697204.666666666667 | -460682258 | t | -987988064.888889 - -128 | -108 | 65.3333333333333333 | -122 | t | 1.79e+308 - -35 | -15 | 3.3333333333333333 | -6 | t | - -34 | -14 | 2.6666666666666667 | -5 | t | - -33 | -13 | 2.00000000000000000000 | -3 | t | - -32 | -12 | 1.33333333333333333333 | -2 | f | - -31 | -11 | 0.66666666666666666667 | -1 | f | - -30 | -10 | 0.00000000000000000000 | 0 | f | - -30 | -10 | 0.00000000000000000000 | 0 | t | - -30 | -10 | 0.00000000000000000000 | 0 | t | -113529.9999877 - -29 | -9 | -0.33333333333333333333 | 1 | t | - -28 | -8 | -1.33333333333333333333 | 2 | t | - -27 | -7 | -2.00000000000000000000 | 3 | f | - -26 | -6 | -2.6666666666666667 | 5 | f | - -25 | -5 | -3.3333333333333333 | 6 | f | - 2 | 22 | -21.3333333333333333 | 40 | f | - 4 | 24 | -22.6666666666666667 | 42 | f | - 516 | 536 | -364.0000000000000000 | 682 | t | -1.79e+308 - 3685778 | 3685798 | -2457205.333333333333 | 4607260 | t | 778912.123 - 36854775776 | 36854775796 | -24569850537.33333333 | 46068469757 | f | - 36854775777 | 36854775797 | -24569850538.00000000 | 46068469758 | f | -(23 rows) - --- Clean -DROP FOREIGN TABLE sctbl3 CASCADE; -NOTICE: drop cascades to view view_sctbl3 -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; -DROP SERVER influxdb_svr CASCADE; -DROP EXTENSION influxdb_fdw; diff --git a/expected/10.18/schemaless/aggregate.out b/expected/10.18/schemaless/aggregate.out deleted file mode 100644 index 67f4e31..0000000 --- a/expected/10.18/schemaless/aggregate.out +++ /dev/null @@ -1,839 +0,0 @@ ---SET log_min_messages=debug1; ---SET client_min_messages=debug1; ---Testcase 1: -SET datestyle=ISO; --- timestamp with time zone differs based on this ---Testcase 2: -SET timezone='UTC'; -\set ECHO none ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- import time column as timestamp and text type -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); ---ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); ---ALTER SERVER server1 OPTIONS (ADD extensions 'influxdb_fdw'); ---Testcase 6: -SELECT * FROM t4; - time | time_text | tags | fields -------------------------+----------------------+----------------------------+----------------------------------- - 1970-01-01 00:00:00+00 | 1970-01-01T00:00:00Z | {"tag1": "a", "tag2": "x"} | {"value1": "1", "value2": "100"} - 1970-01-01 00:00:01+00 | 1970-01-01T00:00:01Z | {"tag1": "a", "tag2": "y"} | {"value1": "2", "value2": "100"} - 1970-01-01 00:00:02+00 | 1970-01-01T00:00:02Z | {"tag1": "a", "tag2": "x"} | {"value1": "3", "value2": "100"} - 1970-01-01 00:00:03+00 | 1970-01-01T00:00:03Z | {"tag1": "b", "tag2": "y"} | {"value1": "10", "value2": "200"} - 1970-01-01 00:00:04+00 | 1970-01-01T00:00:04Z | {"tag1": "b", "tag2": "z"} | {"value1": "20", "value2": "200"} - 1970-01-01 00:00:05+00 | 1970-01-01T00:00:05Z | {"tag1": "b", "tag2": "z"} | {"value1": "30", "value2": "200"} -(6 rows) - ---Testcase 7: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint),influx_time(time,interval '1s', interval '0.00001s'),tags->>'tag1' tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 1 sec'::interval, '@ 0.00001 secs'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m1s0u, 0d0h0m0s10u)), ("tag1") -(3 rows) - ---Testcase 8: -SELECT sum((fields->>'value1')::bigint),influx_time(time,interval '1s', interval '0.00001s'),tags->>'tag1' tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tags->>'tag1'; - sum | influx_time | tag1 ------+------------------------------+------ - 1 | 1969-12-31 23:59:59.00001+00 | a - 2 | 1970-01-01 00:00:00.00001+00 | a - 3 | 1970-01-01 00:00:01.00001+00 | a - | 1970-01-01 00:00:02.00001+00 | a - | 1970-01-01 00:00:03.00001+00 | a - | 1970-01-01 00:00:04.00001+00 | a - | 1969-12-31 23:59:59.00001+00 | b - | 1970-01-01 00:00:00.00001+00 | b - | 1970-01-01 00:00:01.00001+00 | b - 10 | 1970-01-01 00:00:02.00001+00 | b - 20 | 1970-01-01 00:00:03.00001+00 | b - 30 | 1970-01-01 00:00:04.00001+00 | b -(12 rows) - ---Testcase 9: -EXPLAIN (verbose) -SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint),tags->>'tag2' tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY tags->>'tag2', tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=96) - Output: ((tags ->> 'tag1'::text)), (sum(((fields ->> 'value1'::text))::bigint)), ((tags ->> 'tag2'::text)) - InfluxDB query: SELECT sum("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY ("tag2"), ("tag1") -(3 rows) - ---Testcase 10: -SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint),tags->>'tag2' tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY tags->>'tag2', tags->>'tag1'; - tag1 | sum | tag2 -------+-----+------ - a | 4 | x - a | 2 | y - b | 10 | y - b | 50 | z -(4 rows) - ---Testcase 11: -SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint), count((fields->>'value1')::bigint), tags->>'tag2' tag2 FROM "t4" group by tags->>'tag1', tags->>'tag2'; - tag1 | sum | count | tag2 -------+-----+-------+------ - a | 4 | 2 | x - a | 2 | 1 | y - b | 10 | 1 | y - b | 50 | 2 | z -(4 rows) - ---Testcase 12: -EXPLAIN (verbose) SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint), count((fields->>'value1')::bigint), tags->>'tag2' tag2 FROM "t4" group by tags->>'tag1', tags->>'tag2'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=104) - Output: ((tags ->> 'tag1'::text)), (sum(((fields ->> 'value1'::text))::bigint)), (count(((fields ->> 'value1'::text))::bigint)), ((tags ->> 'tag2'::text)) - InfluxDB query: SELECT sum("value1"), count("value1") FROM "t4" GROUP BY ("tag1"), ("tag2") -(3 rows) - ---Testcase 13: -SELECT influx_time(time,interval '5s',interval '0s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY influx_time(time,interval '5s', interval '0s'), tags->>'tag1'; - influx_time | tag1 | last -------------------------+------+------ - 1970-01-01 00:00:00+00 | a | 3 - 1970-01-01 00:00:05+00 | a | - 1970-01-01 00:00:00+00 | b | 20 - 1970-01-01 00:00:05+00 | b | 30 -(4 rows) - ---Testcase 14: -EXPLAIN (VERBOSE) -SELECT influx_time(time,interval '5s',interval '0s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '5s', interval '0s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (influx_time("time", '@ 5 secs'::interval, '@ 0'::interval)), ((tags ->> 'tag1'::text)), (last("time", ((fields ->> 'value1'::text))::bigint)) - InfluxDB query: SELECT last("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m5s0u, 0d0h0m0s0u)), ("tag1") -(3 rows) - --- no offset ---Testcase 15: -SELECT influx_time(time,interval '5s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '5s'), tags->>'tag1'; - influx_time | tag1 | last -------------------------+------+------ - 1970-01-01 00:00:00+00 | a | 3 - 1970-01-01 00:00:05+00 | a | - 1970-01-01 00:00:00+00 | b | 20 - 1970-01-01 00:00:05+00 | b | 30 -(4 rows) - ---Testcase 16: -EXPLAIN (verbose) -SELECT last(time, (fields->>'value1')::bigint),last(time, (fields->>'value2')::bigint) FROM t4 GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (last("time", ((fields ->> 'value1'::text))::bigint)), (last("time", ((fields ->> 'value2'::text))::bigint)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT last("value1"), last("value2") FROM "t4" GROUP BY ("tag1") -(3 rows) - ---Testcase 17: -SELECT last(time, (fields->>'value1')::bigint),last(time, (fields->>'value2')::bigint) FROM t4 GROUP BY tags->>'tag1'; - last | last -------+------ - 3 | 100 - 30 | 200 -(2 rows) - --- GROUP BY time intervals and fill() ---Testcase 18: -SELECT * FROM tx; - time | time_text | tags | fields -------------------------+----------------------+-----------------------------+------------------------------------ - 1970-01-01 00:00:00+00 | 1970-01-01T00:00:00Z | {"tag1": "a", "tag2": "x"} | {"value1": "1", "value2": "100"} - 1970-01-01 00:00:01+00 | 1970-01-01T00:00:01Z | {"tag1": "a", "tag2": "y"} | {"value1": "2", "value2": "100"} - 1970-01-01 00:00:02+00 | 1970-01-01T00:00:02Z | {"tag1": "a", "tag2": "x"} | {"value1": "3", "value2": "100"} - 1970-01-01 00:00:03+00 | 1970-01-01T00:00:03Z | {"tag1": "b", "tag2": "y"} | {"value1": "10", "value2": "200"} - 1970-01-01 00:00:04+00 | 1970-01-01T00:00:04Z | {"tag1": "b", "tag2": "z"} | {"value1": "20", "value2": "200"} - 1970-01-01 00:00:05+00 | 1970-01-01T00:00:05Z | {"tag1": "b", "tag2": "z"} | {"value1": "30", "value2": "200"} - 1970-01-01 00:00:06+00 | 1970-01-01T00:00:06Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} - 1970-01-01 00:00:07+00 | 1970-01-01T00:00:07Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} - 1970-01-01 00:00:08+00 | 1970-01-01T00:00:08Z | {"tag1": "b", "tag2": "z"} | {"value1": "80", "value2": "200"} - 1970-01-01 00:00:09+00 | 1970-01-01T00:00:09Z | {"tag1": "b", "tag2": "z"} | {"value1": "90", "value2": "200"} - 1970-01-01 00:00:10+00 | 1970-01-01T00:00:10Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} - 1970-01-01 00:00:11+00 | 1970-01-01T00:00:11Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} - 1970-01-01 00:00:12+00 | 1970-01-01T00:00:12Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} - 1970-01-01 00:00:13+00 | 1970-01-01T00:00:13Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} - 1970-01-01 00:00:14+00 | 1970-01-01T00:00:14Z | {"tag1": "b", "tag2": "z"} | {"value1": "140", "value2": "200"} - 1970-01-01 00:00:15+00 | 1970-01-01T00:00:15Z | {"tag1": "b", "tag2": "z"} | {"value1": "150", "value2": "200"} - 1970-01-01 00:00:16+00 | 1970-01-01T00:00:16Z | {"tag1": "c", "tag2": "zz"} | {"value1": null, "value2": "2000"} - 1970-01-01 00:00:20+00 | 1970-01-01T00:00:20Z | {"tag1": "c", "tag2": "zz"} | {"value1": null, "value2": "2000"} -(18 rows) - ---Testcase 19: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(100) -(3 rows) - ---Testcase 20: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); - sum | influx_time ------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - 100 | 1970-01-01 00:00:06+00 - 170 | 1970-01-01 00:00:08+00 - 100 | 1970-01-01 00:00:10+00 - 100 | 1970-01-01 00:00:12+00 - 290 | 1970-01-01 00:00:14+00 -(8 rows) - ---Testcase 21: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(100.001) -(3 rows) - ---Testcase 22: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); - sum | influx_time ----------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - 100.001 | 1970-01-01 00:00:06+00 - 170 | 1970-01-01 00:00:08+00 - 100.001 | 1970-01-01 00:00:10+00 - 100.001 | 1970-01-01 00:00:12+00 - 290 | 1970-01-01 00:00:14+00 -(8 rows) - ---Testcase 23: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('none'::influx_fill_enum))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(none) -(3 rows) - ---Testcase 24: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); - sum | influx_time ------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - 170 | 1970-01-01 00:00:08+00 - 290 | 1970-01-01 00:00:14+00 -(5 rows) - ---Testcase 25: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('null'::influx_fill_enum))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(null) -(3 rows) - ---Testcase 26: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); - sum | influx_time ------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - | 1970-01-01 00:00:06+00 - 170 | 1970-01-01 00:00:08+00 - | 1970-01-01 00:00:10+00 - | 1970-01-01 00:00:12+00 - 290 | 1970-01-01 00:00:14+00 -(8 rows) - ---Testcase 27: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('previous'::influx_fill_enum))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(previous) -(3 rows) - ---Testcase 28: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); - sum | influx_time ------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - 50 | 1970-01-01 00:00:06+00 - 170 | 1970-01-01 00:00:08+00 - 170 | 1970-01-01 00:00:10+00 - 170 | 1970-01-01 00:00:12+00 - 290 | 1970-01-01 00:00:14+00 -(8 rows) - ---Testcase 29: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('linear'::influx_fill_enum))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(linear) -(3 rows) - ---Testcase 30: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); - sum | influx_time ------+------------------------ - 3 | 1970-01-01 00:00:00+00 - 13 | 1970-01-01 00:00:02+00 - 50 | 1970-01-01 00:00:04+00 - 110 | 1970-01-01 00:00:06+00 - 170 | 1970-01-01 00:00:08+00 - 210 | 1970-01-01 00:00:10+00 - 250 | 1970-01-01 00:00:12+00 - 290 | 1970-01-01 00:00:14+00 -(8 rows) - --- with offset interval '0.00001s' ---Testcase 31: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)) fill(100) -(3 rows) - ---Testcase 32: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); - sum | influx_time ------+------------------------------ - 1 | 1969-12-31 23:59:58.00001+00 - 5 | 1970-01-01 00:00:00.00001+00 - 30 | 1970-01-01 00:00:02.00001+00 - 30 | 1970-01-01 00:00:04.00001+00 - 80 | 1970-01-01 00:00:06.00001+00 - 90 | 1970-01-01 00:00:08.00001+00 - 100 | 1970-01-01 00:00:10.00001+00 - 140 | 1970-01-01 00:00:12.00001+00 - 150 | 1970-01-01 00:00:14.00001+00 -(9 rows) - ---Testcase 33: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)), ("tag1") fill(100) -(3 rows) - ---Testcase 34: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1'; - sum | influx_time | tag1 ------+------------------------------+------ - 1 | 1969-12-31 23:59:58.00001+00 | a - 5 | 1970-01-01 00:00:00.00001+00 | a - 100 | 1970-01-01 00:00:02.00001+00 | a - 100 | 1970-01-01 00:00:04.00001+00 | a - 100 | 1970-01-01 00:00:06.00001+00 | a - 100 | 1970-01-01 00:00:08.00001+00 | a - 100 | 1970-01-01 00:00:10.00001+00 | a - 100 | 1970-01-01 00:00:12.00001+00 | a - 100 | 1970-01-01 00:00:14.00001+00 | a - 100 | 1969-12-31 23:59:58.00001+00 | b - 100 | 1970-01-01 00:00:00.00001+00 | b - 30 | 1970-01-01 00:00:02.00001+00 | b - 30 | 1970-01-01 00:00:04.00001+00 | b - 80 | 1970-01-01 00:00:06.00001+00 | b - 90 | 1970-01-01 00:00:08.00001+00 | b - 100 | 1970-01-01 00:00:10.00001+00 | b - 140 | 1970-01-01 00:00:12.00001+00 | b - 150 | 1970-01-01 00:00:14.00001+00 | b -(18 rows) - ---Testcase 35: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=104) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))), ((tags ->> 'tag1'::text)), ((tags ->> 'tag2'::text)) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)), ("tag1"), ("tag2") fill(100) -(3 rows) - ---Testcase 36: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; - sum | influx_time | tag1 | tag2 ------+------------------------------+------+------ - 1 | 1969-12-31 23:59:58.00001+00 | a | x - 3 | 1970-01-01 00:00:00.00001+00 | a | x - 100 | 1970-01-01 00:00:02.00001+00 | a | x - 100 | 1970-01-01 00:00:04.00001+00 | a | x - 100 | 1970-01-01 00:00:06.00001+00 | a | x - 100 | 1970-01-01 00:00:08.00001+00 | a | x - 100 | 1970-01-01 00:00:10.00001+00 | a | x - 100 | 1970-01-01 00:00:12.00001+00 | a | x - 100 | 1970-01-01 00:00:14.00001+00 | a | x - 100 | 1969-12-31 23:59:58.00001+00 | a | y - 2 | 1970-01-01 00:00:00.00001+00 | a | y - 100 | 1970-01-01 00:00:02.00001+00 | a | y - 100 | 1970-01-01 00:00:04.00001+00 | a | y - 100 | 1970-01-01 00:00:06.00001+00 | a | y - 100 | 1970-01-01 00:00:08.00001+00 | a | y - 100 | 1970-01-01 00:00:10.00001+00 | a | y - 100 | 1970-01-01 00:00:12.00001+00 | a | y - 100 | 1970-01-01 00:00:14.00001+00 | a | y - 100 | 1969-12-31 23:59:58.00001+00 | b | y - 100 | 1970-01-01 00:00:00.00001+00 | b | y - 10 | 1970-01-01 00:00:02.00001+00 | b | y - 100 | 1970-01-01 00:00:04.00001+00 | b | y - 100 | 1970-01-01 00:00:06.00001+00 | b | y - 100 | 1970-01-01 00:00:08.00001+00 | b | y - 100 | 1970-01-01 00:00:10.00001+00 | b | y - 100 | 1970-01-01 00:00:12.00001+00 | b | y - 100 | 1970-01-01 00:00:14.00001+00 | b | y - 100 | 1969-12-31 23:59:58.00001+00 | b | z - 100 | 1970-01-01 00:00:00.00001+00 | b | z - 20 | 1970-01-01 00:00:02.00001+00 | b | z - 30 | 1970-01-01 00:00:04.00001+00 | b | z - 80 | 1970-01-01 00:00:06.00001+00 | b | z - 90 | 1970-01-01 00:00:08.00001+00 | b | z - 100 | 1970-01-01 00:00:10.00001+00 | b | z - 140 | 1970-01-01 00:00:12.00001+00 | b | z - 150 | 1970-01-01 00:00:14.00001+00 | b | z -(36 rows) - ---with tag1 ---Testcase 37: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(100) -(3 rows) - ---Testcase 38: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1'; - sum | influx_time | tag1 ------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - 100 | 1970-01-01 00:00:04+00 | a - 100 | 1970-01-01 00:00:06+00 | a - 100 | 1970-01-01 00:00:08+00 | a - 100 | 1970-01-01 00:00:10+00 | a - 100 | 1970-01-01 00:00:12+00 | a - 100 | 1970-01-01 00:00:14+00 | a - 100 | 1970-01-01 00:00:00+00 | b - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - 100 | 1970-01-01 00:00:06+00 | b - 170 | 1970-01-01 00:00:08+00 | b - 100 | 1970-01-01 00:00:10+00 | b - 100 | 1970-01-01 00:00:12+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(16 rows) - ---Testcase 39: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(100.001) -(3 rows) - ---Testcase 40: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1'; - sum | influx_time | tag1 ----------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - 100.001 | 1970-01-01 00:00:04+00 | a - 100.001 | 1970-01-01 00:00:06+00 | a - 100.001 | 1970-01-01 00:00:08+00 | a - 100.001 | 1970-01-01 00:00:10+00 | a - 100.001 | 1970-01-01 00:00:12+00 | a - 100.001 | 1970-01-01 00:00:14+00 | a - 100.001 | 1970-01-01 00:00:00+00 | b - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - 100.001 | 1970-01-01 00:00:06+00 | b - 170 | 1970-01-01 00:00:08+00 | b - 100.001 | 1970-01-01 00:00:10+00 | b - 100.001 | 1970-01-01 00:00:12+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(16 rows) - ---Testcase 41: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('null')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('null'::influx_fill_enum))), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(null) -(3 rows) - ---Testcase 42: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('null')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tags->>'tag1'; - sum | influx_time | tag1 ------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - | 1970-01-01 00:00:04+00 | a - | 1970-01-01 00:00:06+00 | a - | 1970-01-01 00:00:08+00 | a - | 1970-01-01 00:00:10+00 | a - | 1970-01-01 00:00:12+00 | a - | 1970-01-01 00:00:14+00 | a - | 1970-01-01 00:00:00+00 | b - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - | 1970-01-01 00:00:06+00 | b - 170 | 1970-01-01 00:00:08+00 | b - | 1970-01-01 00:00:10+00 | b - | 1970-01-01 00:00:12+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(16 rows) - ---Testcase 43: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('none')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('none'::influx_fill_enum))), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(none) -(3 rows) - ---Testcase 44: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('none')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tags->>'tag1'; - sum | influx_time | tag1 ------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - 170 | 1970-01-01 00:00:08+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(6 rows) - ---Testcase 45: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('previous')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('previous'::influx_fill_enum))), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(previous) -(3 rows) - ---Testcase 46: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('previous')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tags->>'tag1'; - sum | influx_time | tag1 ------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - 3 | 1970-01-01 00:00:04+00 | a - 3 | 1970-01-01 00:00:06+00 | a - 3 | 1970-01-01 00:00:08+00 | a - 3 | 1970-01-01 00:00:10+00 | a - 3 | 1970-01-01 00:00:12+00 | a - 3 | 1970-01-01 00:00:14+00 | a - | 1970-01-01 00:00:00+00 | b - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - 50 | 1970-01-01 00:00:06+00 | b - 170 | 1970-01-01 00:00:08+00 | b - 170 | 1970-01-01 00:00:10+00 | b - 170 | 1970-01-01 00:00:12+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(16 rows) - ---Testcase 47: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('linear')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('linear'::influx_fill_enum))), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(linear) -(3 rows) - ---Testcase 48: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('linear')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tags->>'tag1'; - sum | influx_time | tag1 ------+------------------------+------ - 3 | 1970-01-01 00:00:00+00 | a - 3 | 1970-01-01 00:00:02+00 | a - | 1970-01-01 00:00:04+00 | a - | 1970-01-01 00:00:06+00 | a - | 1970-01-01 00:00:08+00 | a - | 1970-01-01 00:00:10+00 | a - | 1970-01-01 00:00:12+00 | a - | 1970-01-01 00:00:14+00 | a - | 1970-01-01 00:00:00+00 | b - 10 | 1970-01-01 00:00:02+00 | b - 50 | 1970-01-01 00:00:04+00 | b - 110 | 1970-01-01 00:00:06+00 | b - 170 | 1970-01-01 00:00:08+00 | b - 210 | 1970-01-01 00:00:10+00 | b - 250 | 1970-01-01 00:00:12+00 | b - 290 | 1970-01-01 00:00:14+00 | b -(16 rows) - ---with tag1,tag2 ---Testcase 49: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=104) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))), ((tags ->> 'tag1'::text)), ((tags ->> 'tag2'::text)) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1"), ("tag2") fill(100) -(3 rows) - ---Testcase 50: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; - sum | influx_time | tag1 | tag2 ------+------------------------+------+------ - 1 | 1970-01-01 00:00:00+00 | a | x - 3 | 1970-01-01 00:00:02+00 | a | x - 100 | 1970-01-01 00:00:04+00 | a | x - 100 | 1970-01-01 00:00:06+00 | a | x - 100 | 1970-01-01 00:00:08+00 | a | x - 100 | 1970-01-01 00:00:10+00 | a | x - 100 | 1970-01-01 00:00:12+00 | a | x - 100 | 1970-01-01 00:00:14+00 | a | x - 2 | 1970-01-01 00:00:00+00 | a | y - 100 | 1970-01-01 00:00:02+00 | a | y - 100 | 1970-01-01 00:00:04+00 | a | y - 100 | 1970-01-01 00:00:06+00 | a | y - 100 | 1970-01-01 00:00:08+00 | a | y - 100 | 1970-01-01 00:00:10+00 | a | y - 100 | 1970-01-01 00:00:12+00 | a | y - 100 | 1970-01-01 00:00:14+00 | a | y - 100 | 1970-01-01 00:00:00+00 | b | y - 10 | 1970-01-01 00:00:02+00 | b | y - 100 | 1970-01-01 00:00:04+00 | b | y - 100 | 1970-01-01 00:00:06+00 | b | y - 100 | 1970-01-01 00:00:08+00 | b | y - 100 | 1970-01-01 00:00:10+00 | b | y - 100 | 1970-01-01 00:00:12+00 | b | y - 100 | 1970-01-01 00:00:14+00 | b | y - 100 | 1970-01-01 00:00:00+00 | b | z - 100 | 1970-01-01 00:00:02+00 | b | z - 50 | 1970-01-01 00:00:04+00 | b | z - 100 | 1970-01-01 00:00:06+00 | b | z - 170 | 1970-01-01 00:00:08+00 | b | z - 100 | 1970-01-01 00:00:10+00 | b | z - 100 | 1970-01-01 00:00:12+00 | b | z - 290 | 1970-01-01 00:00:14+00 | b | z -(32 rows) - ---Testcase 51: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1', tags->>'tag2'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=104) - Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))), ((tags ->> 'tag1'::text)), ((tags ->> 'tag2'::text)) - InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1"), ("tag2") fill(100.001) -(3 rows) - ---Testcase 52: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1', tags->>'tag2'; - sum | influx_time | tag1 | tag2 ----------+------------------------+------+------ - 1 | 1970-01-01 00:00:00+00 | a | x - 3 | 1970-01-01 00:00:02+00 | a | x - 100.001 | 1970-01-01 00:00:04+00 | a | x - 100.001 | 1970-01-01 00:00:06+00 | a | x - 100.001 | 1970-01-01 00:00:08+00 | a | x - 100.001 | 1970-01-01 00:00:10+00 | a | x - 100.001 | 1970-01-01 00:00:12+00 | a | x - 100.001 | 1970-01-01 00:00:14+00 | a | x - 2 | 1970-01-01 00:00:00+00 | a | y - 100.001 | 1970-01-01 00:00:02+00 | a | y - 100.001 | 1970-01-01 00:00:04+00 | a | y - 100.001 | 1970-01-01 00:00:06+00 | a | y - 100.001 | 1970-01-01 00:00:08+00 | a | y - 100.001 | 1970-01-01 00:00:10+00 | a | y - 100.001 | 1970-01-01 00:00:12+00 | a | y - 100.001 | 1970-01-01 00:00:14+00 | a | y - 100.001 | 1970-01-01 00:00:00+00 | b | y - 10 | 1970-01-01 00:00:02+00 | b | y - 100.001 | 1970-01-01 00:00:04+00 | b | y - 100.001 | 1970-01-01 00:00:06+00 | b | y - 100.001 | 1970-01-01 00:00:08+00 | b | y - 100.001 | 1970-01-01 00:00:10+00 | b | y - 100.001 | 1970-01-01 00:00:12+00 | b | y - 100.001 | 1970-01-01 00:00:14+00 | b | y - 100.001 | 1970-01-01 00:00:00+00 | b | z - 100.001 | 1970-01-01 00:00:02+00 | b | z - 50 | 1970-01-01 00:00:04+00 | b | z - 100.001 | 1970-01-01 00:00:06+00 | b | z - 170 | 1970-01-01 00:00:08+00 | b | z - 100.001 | 1970-01-01 00:00:10+00 | b | z - 100.001 | 1970-01-01 00:00:12+00 | b | z - 290 | 1970-01-01 00:00:14+00 | b | z -(32 rows) - --- unsupport syntax ---Testcase 53: -EXPLAIN (verbose) -SELECT influx_fill_numeric(100) FROM "tx"; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - ---Testcase 54: -SELECT influx_fill_numeric(100) FROM "tx"; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - ---Testcase 55: -SELECT * FROM "tx" WHERE influx_fill_numeric(100) > 0; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - ---Testcase 56: -EXPLAIN (verbose) -SELECT influx_fill_option('linear') FROM "tx"; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - ---Testcase 57: -SELECT influx_fill_option('linear') FROM "tx"; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - ---Testcase 58: -SELECT * FROM "tx" WHERE influx_fill_option('linear') > 0; -ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function - --- InfluxDB does not return error for the following query ---SELECT sum(value1) FROM t4 GROUP BY value1; --- not allowed ---Testcase 59: -SELECT sum((fields->>'value1')::bigint) FROM t4 GROUP BY time; - sum ------ - 30 - 20 - 10 - 1 - 2 - 3 -(6 rows) - ---last returns NULL for tag ---SELECT last(time, value1),last(time, value2),last(time, tag1) FROM t4 GROUP BY tag1; ---Testcase 60: -DROP FOREIGN TABLE t3; ---Testcase 61: -DROP FOREIGN TABLE t4; ---Testcase 62: -DROP FOREIGN TABLE cpu; ---Testcase 63: -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 64: -DROP SERVER server1 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to foreign table numbers -drop cascades to foreign table tx ---Testcase 65: -DROP EXTENSION influxdb_fdw; diff --git a/expected/10.18/schemaless/extra/aggregates.out b/expected/10.18/schemaless/extra/aggregates.out deleted file mode 100644 index 9cc3ffa..0000000 --- a/expected/10.18/schemaless/extra/aggregates.out +++ /dev/null @@ -1,3221 +0,0 @@ -\set ECHO none ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 4: -CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 5: -CREATE FOREIGN TABLE aggtest (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'agg', schemaless 'true'); ---Testcase 6: -CREATE FOREIGN TABLE student (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 7: -CREATE FOREIGN TABLE tenk1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); ---Testcase 8: -CREATE FOREIGN TABLE INT8_TBL (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 9: -CREATE FOREIGN TABLE INT8_TBL2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 10: -CREATE FOREIGN TABLE INT4_TBL (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 11: -CREATE FOREIGN TABLE INT4_TBL2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 12: -CREATE FOREIGN TABLE INT4_TBL3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 13: -CREATE FOREIGN TABLE INT4_TBL4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 14: -CREATE FOREIGN TABLE multi_arg_agg (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 15: -CREATE FOREIGN TABLE multi_arg_agg2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 16: -CREATE FOREIGN TABLE multi_arg_agg3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 17: -CREATE FOREIGN TABLE VARCHAR_TBL (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 18: -CREATE FOREIGN TABLE FLOAT8_TBL (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); --- --- AGGREGATES --- --- avoid bit-exact output here because operations may not be bit-exact. ---Testcase 19: -SET extra_float_digits = 0; ---Testcase 20: -SELECT avg((fields->>'four')::int4) AS avg_1 FROM onek; - avg_1 --------------------- - 1.5000000000000000 -(1 row) - ---Testcase 21: -SELECT avg((fields->>'a')::int2) AS avg_32 FROM aggtest WHERE (fields->>'a')::int2 < 100; - avg_32 ---------------------- - 32.6666666666666667 -(1 row) - --- In 7.1, avg(float4) is computed using float8 arithmetic. --- Round the result to 3 digits to avoid platform-specific results. ---Testcase 22: -SELECT avg((fields->>'b')::float4)::numeric(10,3) AS avg_107_943 FROM aggtest; - avg_107_943 -------------- - 107.943 -(1 row) - ---Testcase 23: -SELECT avg((fields->>'gpa')::float8) AS avg_3_4 FROM ONLY student; - avg_3_4 ---------- - 3.4 -(1 row) - ---Testcase 24: -SELECT sum((fields->>'four')::int4) AS sum_1500 FROM onek; - sum_1500 ----------- - 1500 -(1 row) - ---Testcase 25: -SELECT sum((fields->>'a')::int2) AS sum_198 FROM aggtest; - sum_198 ---------- - 198 -(1 row) - ---Testcase 26: -SELECT sum((fields->>'b')::float4) AS avg_431_773 FROM aggtest; - avg_431_773 -------------- - 431.773 -(1 row) - ---Testcase 27: -SELECT sum((fields->>'gpa')::float8) AS avg_6_8 FROM ONLY student; - avg_6_8 ---------- - 6.8 -(1 row) - ---Testcase 28: -SELECT max((fields->>'four')::int4) AS max_3 FROM onek; - max_3 -------- - 3 -(1 row) - ---Testcase 29: -SELECT max((fields->>'a')::int2) AS max_100 FROM aggtest; - max_100 ---------- - 100 -(1 row) - ---Testcase 30: -SELECT max((aggtest.fields->>'b')::float4) AS max_324_78 FROM aggtest; - max_324_78 ------------- - 324.78 -(1 row) - ---Testcase 31: -SELECT max((student.fields->>'gpa')::float8) AS max_3_7 FROM student; - max_3_7 ---------- - 3.7 -(1 row) - ---Testcase 32: -SELECT stddev_pop((fields->>'b')::float4) FROM aggtest; - stddev_pop ------------------ - 131.10703231895 -(1 row) - ---Testcase 33: -SELECT stddev_samp((fields->>'b')::float4) FROM aggtest; - stddev_samp ------------------- - 151.389360803998 -(1 row) - ---Testcase 34: -SELECT var_pop((fields->>'b')::float4) FROM aggtest; - var_pop ------------------- - 17189.0539234823 -(1 row) - ---Testcase 35: -SELECT var_samp((fields->>'b')::float4) FROM aggtest; - var_samp ------------------- - 22918.7385646431 -(1 row) - ---Testcase 36: -SELECT stddev_pop((fields->>'b')::numeric) FROM aggtest; - stddev_pop ------------------- - 131.107032862199 -(1 row) - ---Testcase 37: -SELECT stddev_samp((fields->>'b')::numeric) FROM aggtest; - stddev_samp ------------------- - 151.389361431288 -(1 row) - ---Testcase 38: -SELECT var_pop((fields->>'b')::numeric) FROM aggtest; - var_pop --------------------- - 17189.054065929769 -(1 row) - ---Testcase 39: -SELECT var_samp((fields->>'b')::numeric) FROM aggtest; - var_samp --------------------- - 22918.738754573025 -(1 row) - --- population variance is defined for a single tuple, sample variance --- is not ---Testcase 40: -CREATE FOREIGN TABLE agg_t5 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 41: -SELECT var_pop((fields->>'a')::float8), var_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 1; - var_pop | var_samp ----------+---------- - 0 | -(1 row) - ---Testcase 42: -SELECT stddev_pop((fields->>'a')::float8), stddev_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 2; - stddev_pop | stddev_samp -------------+------------- - 0 | -(1 row) - ---Testcase 43: -SELECT var_pop((fields->>'a')::float8), var_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 3; - var_pop | var_samp ----------+---------- - NaN | -(1 row) - ---Testcase 44: -SELECT stddev_pop((fields->>'a')::float8), stddev_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 3; - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - ---Testcase 45: -SELECT var_pop((fields->>'a')::float8), var_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 4; - var_pop | var_samp ----------+---------- - NaN | -(1 row) - ---Testcase 46: -SELECT stddev_pop((fields->>'a')::float8), stddev_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 4; - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - ---Testcase 47: -SELECT var_pop((fields->>'a')::float4), var_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 1; - var_pop | var_samp ----------+---------- - 0 | -(1 row) - ---Testcase 48: -SELECT stddev_pop((fields->>'a')::float4), stddev_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 2; - stddev_pop | stddev_samp -------------+------------- - 0 | -(1 row) - ---Testcase 49: -SELECT var_pop((fields->>'a')::float4), var_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 3; - var_pop | var_samp ----------+---------- - NaN | -(1 row) - ---Testcase 50: -SELECT stddev_pop((fields->>'a')::float4), stddev_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 3; - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - ---Testcase 51: -SELECT var_pop((fields->>'a')::float4), var_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 4; - var_pop | var_samp ----------+---------- - NaN | -(1 row) - ---Testcase 52: -SELECT stddev_pop((fields->>'a')::float4), stddev_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 4; - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - ---Testcase 53: -SELECT var_pop((fields->>'a')::numeric), var_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 1; - var_pop | var_samp ----------+---------- - 0 | -(1 row) - ---Testcase 54: -SELECT stddev_pop((fields->>'a')::numeric), stddev_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 2; - stddev_pop | stddev_samp -------------+------------- - 0 | -(1 row) - ---Testcase 55: -SELECT var_pop((fields->>'a')::numeric), var_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 3; -ERROR: invalid input syntax for type numeric: "inf" ---Testcase 56: -SELECT stddev_pop((fields->>'a')::numeric), stddev_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 3; -ERROR: invalid input syntax for type numeric: "inf" ---Testcase 57: -SELECT var_pop((fields->>'a')::numeric), var_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 4; - var_pop | var_samp ----------+---------- - NaN | NaN -(1 row) - ---Testcase 58: -SELECT stddev_pop((fields->>'a')::numeric), stddev_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 4; - stddev_pop | stddev_samp -------------+------------- - NaN | NaN -(1 row) - --- verify correct results for null and NaN inputs ---Testcase 59: -create foreign table generate_series1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 60: -select sum(null::int4) from generate_series1; - sum ------ - -(1 row) - ---Testcase 61: -select sum(null::int8) from generate_series1; - sum ------ - -(1 row) - ---Testcase 62: -select sum(null::numeric) from generate_series1; - sum ------ - -(1 row) - ---Testcase 63: -select sum(null::float8) from generate_series1; - sum ------ - -(1 row) - ---Testcase 64: -select avg(null::int4) from generate_series1; - avg ------ - -(1 row) - ---Testcase 65: -select avg(null::int8) from generate_series1; - avg ------ - -(1 row) - ---Testcase 66: -select avg(null::numeric) from generate_series1; - avg ------ - -(1 row) - ---Testcase 67: -select avg(null::float8) from generate_series1; - avg ------ - -(1 row) - ---Testcase 68: -select sum('NaN'::numeric) from generate_series1; - sum ------ - NaN -(1 row) - ---Testcase 69: -select avg('NaN'::numeric) from generate_series1; - avg ------ - NaN -(1 row) - --- verify correct results for infinite inputs ---Testcase 70: -create foreign table infinite1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 71: -SELECT sum((fields->>'x')::float8), avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) -FROM infinite1 WHERE (fields->>'id')::int = 1; - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - ---Testcase 72: -SELECT sum((fields->>'x')::float8), avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) -FROM infinite1 WHERE (fields->>'id')::int = 2; - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - ---Testcase 73: -SELECT sum((fields->>'x')::float8), avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) -FROM infinite1 WHERE (fields->>'id')::int = 3; - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - ---Testcase 74: -SELECT sum((fields->>'x')::float8), avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) -FROM infinite1 WHERE (fields->>'id')::int = 4; - sum | avg | var_pop ------+-----+--------- - NaN | NaN | NaN -(1 row) - ---Testcase 75: -SELECT sum((fields->>'x')::float8), avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) -FROM infinite1 WHERE (fields->>'id')::int = 5; - sum | avg | var_pop ------------+-----------+--------- - -Infinity | -Infinity | NaN -(1 row) - ---Testcase 76: -SELECT sum((fields->>'x')::numeric), avg((fields->>'x')::numeric), var_pop((fields->>'x')::numeric) -FROM infinite1 WHERE (fields->>'id')::int = 1; -ERROR: invalid input syntax for type numeric: "infinity" ---Testcase 77: -SELECT sum((fields->>'x')::numeric), avg((fields->>'x')::numeric), var_pop((fields->>'x')::numeric) -FROM infinite1 WHERE (fields->>'id')::int = 2; -ERROR: invalid input syntax for type numeric: "infinity" ---Testcase 78: -SELECT sum((fields->>'x')::numeric), avg((fields->>'x')::numeric), var_pop((fields->>'x')::numeric) -FROM infinite1 WHERE (fields->>'id')::int = 3; -ERROR: invalid input syntax for type numeric: "infinity" ---Testcase 79: -SELECT sum((fields->>'x')::numeric), avg((fields->>'x')::numeric), var_pop((fields->>'x')::numeric) -FROM infinite1 WHERE (fields->>'id')::int = 4; -ERROR: invalid input syntax for type numeric: "-infinity" ---Testcase 80: -SELECT sum((fields->>'x')::numeric), avg((fields->>'x')::numeric), var_pop((fields->>'x')::numeric) -FROM infinite1 WHERE (fields->>'id')::int = 5; -ERROR: invalid input syntax for type numeric: "-infinity" --- test accuracy with a large input offset ---Testcase 81: -create foreign table large_input1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 82: -SELECT avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) -FROM large_input1 WHERE (fields->>'id')::int=1; - avg | var_pop ------------+--------- - 100000005 | 4 -(1 row) - ---Testcase 83: -SELECT avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) -FROM large_input1 WHERE (fields->>'id')::int=2; - avg | var_pop ----------------+--------- - 7000000000006 | 0 -(1 row) - --- SQL2003 binary aggregates ---Testcase 84: -SELECT regr_count((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; - regr_count ------------- - 4 -(1 row) - ---Testcase 85: -SELECT regr_sxx((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; - regr_sxx ----------- - 5099 -(1 row) - ---Testcase 86: -SELECT regr_syy((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; - regr_syy ------------------- - 68756.2156939293 -(1 row) - ---Testcase 87: -SELECT regr_sxy((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; - regr_sxy ------------------- - 2614.51582155004 -(1 row) - ---Testcase 88: -SELECT regr_avgx((fields->>'b')::float4, (fields->>'a')::int2), regr_avgy((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; - regr_avgx | regr_avgy ------------+------------------ - 49.5 | 107.943152273074 -(1 row) - ---Testcase 89: -SELECT regr_r2((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; - regr_r2 --------------------- - 0.0194977982031803 -(1 row) - ---Testcase 90: -SELECT regr_slope((fields->>'b')::float4, (fields->>'a')::int2), regr_intercept((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; - regr_slope | regr_intercept --------------------+------------------ - 0.512750700441271 | 82.5619926012309 -(1 row) - ---Testcase 91: -SELECT covar_pop((fields->>'b')::float4, (fields->>'a')::int2), covar_samp((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; - covar_pop | covar_samp ------------------+------------------ - 653.62895538751 | 871.505273850014 -(1 row) - ---Testcase 92: -SELECT corr((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; - corr -------------------- - 0.139634516517873 -(1 row) - --- check single-tuple behavior ---Testcase 93: -create foreign table agg_t4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 94: -SELECT covar_pop((fields->>'a')::float8,(fields->>'b')::float8), covar_samp((fields->>'c')::float8,(fields->>'d')::float8) FROM agg_t4 WHERE (fields->>'id')::int = 1; - covar_pop | covar_samp ------------+------------ - 0 | -(1 row) - ---Testcase 95: -SELECT covar_pop((fields->>'a')::float8,(fields->>'b')::float8), covar_samp((fields->>'c')::float8,(fields->>'d')::float8) FROM agg_t4 WHERE (fields->>'id')::int = 2; - covar_pop | covar_samp ------------+------------ - NaN | -(1 row) - ---Testcase 96: -SELECT covar_pop((fields->>'a')::float8,(fields->>'b')::float8), covar_samp((fields->>'c')::float8,(fields->>'d')::float8) FROM agg_t4 WHERE (fields->>'id')::int = 3; - covar_pop | covar_samp ------------+------------ - NaN | -(1 row) - --- test accum and combine functions directly ---Testcase 97: -CREATE FOREIGN TABLE regr_test (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 98: -SELECT count(*), sum((fields->>'x')::float8), regr_sxx((fields->>'y')::float8,(fields->>'x')::float8), sum((fields->>'y')::float8),regr_syy((fields->>'y')::float8,(fields->>'x')::float8), regr_sxy((fields->>'y')::float8,(fields->>'x')::float8) -FROM regr_test WHERE (fields->>'x')::int IN (10,20,30,80); - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+------+----------+---------- - 4 | 140 | 2900 | 1290 | 83075 | 15050 -(1 row) - ---Testcase 99: -SELECT count(*), sum((fields->>'x')::float8), regr_sxx((fields->>'y')::float8,(fields->>'x')::float8), sum((fields->>'y')::float8),regr_syy((fields->>'y')::float8,(fields->>'x')::float8), regr_sxy((fields->>'y')::float8,(fields->>'x')::float8) -FROM regr_test; - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+------+----------+---------- - 5 | 240 | 6280 | 1490 | 95080 | 8680 -(1 row) - ---Testcase 100: -CREATE FOREIGN TABLE float8_arr (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 101: -SELECT float8_accum((fields->>'x')::float8[], 100) FROM float8_arr WHERE (fields->>'id')::int=1; - float8_accum ---------------- - {5,240,12900} -(1 row) - ---Testcase 102: -SELECT float8_regr_accum((fields->>'x')::float8[], 200, 100) FROM float8_arr WHERE (fields->>'id')::int=2; - float8_regr_accum ---------------------------------- - {5,240,12900,1490,123075,35050} -(1 row) - ---Testcase 103: -SELECT count(*), sum((fields->>'x')::float8), regr_sxx((fields->>'y')::float8,(fields->>'x')::float8), sum((fields->>'y')::float8),regr_syy((fields->>'y')::float8,(fields->>'x')::float8), regr_sxy((fields->>'y')::float8,(fields->>'x')::float8) -FROM regr_test WHERE (fields->>'x')::int IN (10,20,30); - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+-----+----------+---------- - 3 | 60 | 200 | 750 | 20000 | 2000 -(1 row) - ---Testcase 104: -SELECT count(*), sum((fields->>'x')::float8), regr_sxx((fields->>'y')::float8,(fields->>'x')::float8), sum((fields->>'y')::float8),regr_syy((fields->>'y')::float8,(fields->>'x')::float8), regr_sxy((fields->>'y')::float8,(fields->>'x')::float8) -FROM regr_test WHERE (fields->>'x')::int IN (80,100); - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+-----+----------+---------- - 2 | 180 | 200 | 740 | 57800 | -3400 -(1 row) - ---Testcase 105: -SELECT float8_combine((fields->>'x')::float8[], (fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=3; -ERROR: aggregate function called in non-aggregate context ---Testcase 106: -SELECT float8_combine((fields->>'x')::float8[], (fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=4; -ERROR: aggregate function called in non-aggregate context ---Testcase 107: -SELECT float8_combine((fields->>'x')::float8[], (fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=5; -ERROR: aggregate function called in non-aggregate context ---Testcase 108: -SELECT float8_regr_combine((fields->>'x')::float8[],(fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=6; -ERROR: aggregate function called in non-aggregate context ---Testcase 109: -SELECT float8_regr_combine((fields->>'x')::float8[],(fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=7; -ERROR: aggregate function called in non-aggregate context ---Testcase 110: -SELECT float8_regr_combine((fields->>'x')::float8[],(fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=8; -ERROR: aggregate function called in non-aggregate context ---Testcase 111: -DROP FOREIGN TABLE regr_test; --- test count, distinct ---Testcase 112: -SELECT count((fields->>'four')::int4) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - ---Testcase 113: -SELECT count(DISTINCT (fields->>'four')::int4) AS cnt_4 FROM onek; - cnt_4 -------- - 4 -(1 row) - ---Testcase 114: -select (fields->>'ten')::int4 ten, count(*), sum((fields->>'four')::int4) from onek -group by fields->>'ten' order by fields->>'ten'; - ten | count | sum ------+-------+----- - 0 | 100 | 100 - 1 | 100 | 200 - 2 | 100 | 100 - 3 | 100 | 200 - 4 | 100 | 100 - 5 | 100 | 200 - 6 | 100 | 100 - 7 | 100 | 200 - 8 | 100 | 100 - 9 | 100 | 200 -(10 rows) - ---Testcase 115: -select (fields->>'ten')::int4 ten, count((fields->>'four')::int4), sum(DISTINCT (fields->>'four')::int4) from onek -group by fields->>'ten' order by fields->>'ten'; - ten | count | sum ------+-------+----- - 0 | 100 | 2 - 1 | 100 | 4 - 2 | 100 | 2 - 3 | 100 | 4 - 4 | 100 | 2 - 5 | 100 | 4 - 6 | 100 | 2 - 7 | 100 | 4 - 8 | 100 | 2 - 9 | 100 | 4 -(10 rows) - --- user-defined aggregates ---Testcase 116: -CREATE AGGREGATE newavg ( - sfunc = int4_avg_accum, basetype = int4, stype = _int8, - finalfunc = int8_avg, - initcond1 = '{0,0}' -); --- without finalfunc; test obsolete spellings 'sfunc1' etc ---Testcase 117: -CREATE AGGREGATE newsum ( - sfunc1 = int4pl, basetype = int4, stype1 = int4, - initcond1 = '0' -); --- zero-argument aggregate ---Testcase 118: -CREATE AGGREGATE newcnt (*) ( - sfunc = int8inc, stype = int8, - initcond = '0', parallel = safe -); --- old-style spelling of same (except without parallel-safe; that's too new) ---Testcase 119: -CREATE AGGREGATE oldcnt ( - sfunc = int8inc, basetype = 'ANY', stype = int8, - initcond = '0' -); --- aggregate that only cares about null/nonnull input ---Testcase 120: -CREATE AGGREGATE newcnt ("any") ( - sfunc = int8inc_any, stype = int8, - initcond = '0' -); --- multi-argument aggregate ---Testcase 121: -create function sum3(int8,int8,int8) returns int8 as -'select $1 + $2 + $3' language sql strict immutable; ---Testcase 122: -create aggregate sum2(int8,int8) ( - sfunc = sum3, stype = int8, - initcond = '0' -); ---Testcase 123: -SELECT newavg((fields->>'four')::int4) AS avg_1 FROM onek; - avg_1 --------------------- - 1.5000000000000000 -(1 row) - ---Testcase 124: -SELECT newsum((fields->>'four')::int4) AS sum_1500 FROM onek; - sum_1500 ----------- - 1500 -(1 row) - ---Testcase 125: -SELECT newcnt((fields->>'four')::int4) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - ---Testcase 126: -SELECT newcnt(*) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - ---Testcase 127: -SELECT oldcnt(*) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - ---Testcase 128: -SELECT sum2((fields->>'q1')::int8,(fields->>'q2')::int8) FROM int8_tbl; - sum2 -------------------- - 18271560493827981 -(1 row) - --- test for outer-level aggregates --- this should work ---Testcase 129: -select (fields->>'ten')::int4 ten, sum(distinct (fields->>'four')::int4) from onek a -group by fields->>'ten' -having exists (select 1 from onek b where sum(distinct (a.fields->>'four')::int4) = (b.fields->>'four')::int4); - ten | sum ------+----- - 0 | 2 - 2 | 2 - 4 | 2 - 6 | 2 - 8 | 2 -(5 rows) - --- this should fail because subquery has an agg of its own in WHERE ---Testcase 130: -select (fields->>'ten')::int4 ten, sum(distinct (fields->>'four')::int4) from onek a -group by fields->>'ten' -having exists (select 1 from onek b - where sum(distinct (a.fields->>'four')::int4 + (b.fields->>'four')::int4) = (b.fields->>'four')::int4); -ERROR: aggregate functions are not allowed in WHERE -LINE 4: where sum(distinct (a.fields->>'four')::int4 ... - ^ --- Test handling of sublinks within outer-level aggregates. --- Per bug report from Daniel Grace. ---Testcase 131: -select - (select max((select (i.fields->>'unique2')::int4 from tenk1 i where (i.fields->>'unique1')::int = (o.fields->>'unique1')::int))) -from tenk1 o; - max ------- - 9999 -(1 row) - --- Test handling of Params within aggregate arguments in hashed aggregation. --- Per bug report from Jeevan Chalke. ---Testcase 132: -explain (verbose, costs off) -select (s1.fields->>'a')::int a, ss.a, sm -from generate_series1 s1, - lateral (select (s2.fields->>'a')::int a, sum((s1.fields->>'a')::int + (s2.fields->>'a')::int) sm - from generate_series1 s2 group by s2.fields->>'a') ss -order by 1, 2; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (((s1.fields ->> 'a'::text))::integer), ((((s2.fields ->> 'a'::text)))::integer), (sum((((s1.fields ->> 'a'::text))::integer + (((s2.fields ->> 'a'::text)))::integer))) - Sort Key: (((s1.fields ->> 'a'::text))::integer), ((((s2.fields ->> 'a'::text)))::integer) - -> Nested Loop - Output: ((s1.fields ->> 'a'::text))::integer, ((((s2.fields ->> 'a'::text)))::integer), (sum((((s1.fields ->> 'a'::text))::integer + (((s2.fields ->> 'a'::text)))::integer))) - -> Foreign Scan on public.generate_series1 s1 - Output: s1.fields - InfluxDB query: SELECT * FROM "generate_series1" - -> HashAggregate - Output: (((s2.fields ->> 'a'::text)))::integer, sum((((s1.fields ->> 'a'::text))::integer + (((s2.fields ->> 'a'::text)))::integer)), ((s2.fields ->> 'a'::text)) - Group Key: (s2.fields ->> 'a'::text) - -> Foreign Scan on public.generate_series1 s2 - Output: (s2.fields ->> 'a'::text), s2.fields - InfluxDB query: SELECT * FROM "generate_series1" -(14 rows) - ---Testcase 133: -select (s1.fields->>'a')::int as s1, ss.a as s2, sm -from generate_series1 s1, - lateral (select (s2.fields->>'a')::int a, sum((s1.fields->>'a')::int + (s2.fields->>'a')::int) sm - from generate_series1 s2 group by s2.fields->>'a') ss -order by 1, 2; - s1 | s2 | sm -----+----+---- - 1 | 1 | 2 - 1 | 2 | 3 - 1 | 3 | 4 - 2 | 1 | 3 - 2 | 2 | 4 - 2 | 3 | 5 - 3 | 1 | 4 - 3 | 2 | 5 - 3 | 3 | 6 -(9 rows) - ---Testcase 134: -explain (verbose, costs off) -select array(select sum((x.fields->>'a')::int+(y.fields->>'a')::int) s - from generate_series1 y group by y.fields->>'a' order by s) - from generate_series1 x; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.generate_series1 x - Output: (SubPlan 1) - InfluxDB query: SELECT * FROM "generate_series1" - SubPlan 1 - -> Sort - Output: (sum((((x.fields ->> 'a'::text))::integer + (((y.fields ->> 'a'::text)))::integer))), ((y.fields ->> 'a'::text)) - Sort Key: (sum((((x.fields ->> 'a'::text))::integer + (((y.fields ->> 'a'::text)))::integer))) - -> HashAggregate - Output: sum((((x.fields ->> 'a'::text))::integer + (((y.fields ->> 'a'::text)))::integer)), ((y.fields ->> 'a'::text)) - Group Key: (y.fields ->> 'a'::text) - -> Foreign Scan on public.generate_series1 y - Output: (y.fields ->> 'a'::text), y.fields - InfluxDB query: SELECT * FROM "generate_series1" -(13 rows) - ---Testcase 135: -select array(select sum((x.fields->>'a')::int+(y.fields->>'a')::int) s - from generate_series1 y group by y.fields->>'a' order by s) - from generate_series1 x; - array ---------- - {2,3,4} - {3,4,5} - {4,5,6} -(3 rows) - --- --- test for bitwise integer aggregates --- ---Testcase 136: -CREATE FOREIGN TABLE bitwise_test_empty (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); --- empty case ---Testcase 137: -SELECT - BIT_AND((fields->>'i2')::INT2) AS "?", - BIT_OR((fields->>'i4')::INT4) AS "?" -FROM bitwise_test_empty; - ? | ? ----+--- - | -(1 row) - ---Testcase 138: -CREATE FOREIGN TABLE bitwise_test (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 139: -SELECT - BIT_AND((fields->>'i2')::INT2) AS "1", - BIT_AND((fields->>'i4')::INT4) AS "1", - BIT_AND((fields->>'i8')::INT8) AS "1", - BIT_AND((fields->>'i')::INT) AS "?", - BIT_AND((fields->>'x')::INT2) AS "0", - BIT_AND((fields->>'y')::BIT(4)) AS "0100", - BIT_OR((fields->>'i2')::INT2) AS "7", - BIT_OR((fields->>'i4')::INT4) AS "7", - BIT_OR((fields->>'i8')::INT8) AS "7", - BIT_OR((fields->>'i')::INT) AS "?", - BIT_OR((fields->>'x')::INT2) AS "7", - BIT_OR((fields->>'y')::BIT(4)) AS "1101" -FROM bitwise_test; - 1 | 1 | 1 | ? | 0 | 0100 | 7 | 7 | 7 | ? | 7 | 1101 ----+---+---+---+---+------+---+---+---+---+---+------ - 1 | 1 | 1 | 1 | 0 | 0100 | 7 | 7 | 7 | 3 | 7 | 1101 -(1 row) - --- --- test boolean aggregates --- --- first test all possible transition and final states ---Testcase 140: -CREATE FOREIGN TABLE boolean1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 141: -SELECT - -- boolean and transitions - -- null because strict - booland_statefunc((fields->>'x1')::boolean, (fields->>'y1')::boolean) IS NULL AS "t", - booland_statefunc((fields->>'x2')::boolean, (fields->>'y2')::boolean) IS NULL AS "t", - booland_statefunc((fields->>'x3')::boolean, (fields->>'y3')::boolean) IS NULL AS "t", - booland_statefunc((fields->>'x4')::boolean, (fields->>'y4')::boolean) IS NULL AS "t", - booland_statefunc((fields->>'x5')::boolean, (fields->>'y5')::boolean) IS NULL AS "t", - -- and actual computations - booland_statefunc((fields->>'x6')::boolean, (fields->>'y6')::boolean) AS "t", - NOT booland_statefunc((fields->>'x7')::boolean, (fields->>'y7')::boolean) AS "t", - NOT booland_statefunc((fields->>'x8')::boolean, (fields->>'y8')::boolean) AS "t", - NOT booland_statefunc((fields->>'x9')::boolean, (fields->>'y9')::boolean) AS "t" FROM boolean1; - t | t | t | t | t | t | t | t | t ----+---+---+---+---+---+---+---+--- - t | t | t | t | t | t | t | t | t -(1 row) - ---Testcase 142: -SELECT - -- boolean or transitions - -- null because strict - boolor_statefunc((fields->>'x1')::boolean, (fields->>'y1')::boolean) IS NULL AS "t", - boolor_statefunc((fields->>'x2')::boolean, (fields->>'y2')::boolean) IS NULL AS "t", - boolor_statefunc((fields->>'x3')::boolean, (fields->>'y3')::boolean) IS NULL AS "t", - boolor_statefunc((fields->>'x4')::boolean, (fields->>'y4')::boolean) IS NULL AS "t", - boolor_statefunc((fields->>'x5')::boolean, (fields->>'y5')::boolean) IS NULL AS "t", - -- actual computations - boolor_statefunc((fields->>'x6')::boolean, (fields->>'y6')::boolean) AS "t", - boolor_statefunc((fields->>'x7')::boolean, (fields->>'y7')::boolean) AS "t", - boolor_statefunc((fields->>'x8')::boolean, (fields->>'y8')::boolean) AS "t", - NOT boolor_statefunc((fields->>'x9')::boolean, (fields->>'y9')::boolean) AS "t" FROM boolean1; - t | t | t | t | t | t | t | t | t ----+---+---+---+---+---+---+---+--- - t | t | t | t | t | t | t | t | t -(1 row) - ---Testcase 143: -CREATE FOREIGN TABLE bool_test_empty (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); --- empty case ---Testcase 144: -SELECT - BOOL_AND((fields->>'b1')::boolean) AS "n", - BOOL_OR((fields->>'b3')::boolean) AS "n" -FROM bool_test_empty; - n | n ----+--- - | -(1 row) - ---Testcase 145: -CREATE FOREIGN TABLE bool_test (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 146: -SELECT - BOOL_AND((fields->>'b1')::boolean) AS "f", - BOOL_AND((fields->>'b2')::boolean) AS "t", - BOOL_AND((fields->>'b3')::boolean) AS "f", - BOOL_AND((fields->>'b4')::boolean) AS "n", - BOOL_AND(NOT (fields->>'b2')::boolean) AS "f", - BOOL_AND(NOT (fields->>'b3')::boolean) AS "t" -FROM bool_test; - f | t | f | n | f | t ----+---+---+---+---+--- - f | t | f | | f | t -(1 row) - ---Testcase 147: -SELECT - EVERY((fields->>'b1')::boolean) AS "f", - EVERY((fields->>'b2')::boolean) AS "t", - EVERY((fields->>'b3')::boolean) AS "f", - EVERY((fields->>'b4')::boolean) AS "n", - EVERY(NOT (fields->>'b2')::boolean) AS "f", - EVERY(NOT (fields->>'b3')::boolean) AS "t" -FROM bool_test; - f | t | f | n | f | t ----+---+---+---+---+--- - f | t | f | | f | t -(1 row) - ---Testcase 148: -SELECT - BOOL_OR((fields->>'b1')::boolean) AS "t", - BOOL_OR((fields->>'b2')::boolean) AS "t", - BOOL_OR((fields->>'b3')::boolean) AS "f", - BOOL_OR((fields->>'b4')::boolean) AS "n", - BOOL_OR(NOT (fields->>'b2')::boolean) AS "f", - BOOL_OR(NOT (fields->>'b3')::boolean) AS "t" -FROM bool_test; - t | t | f | n | f | t ----+---+---+---+---+--- - t | t | f | | f | t -(1 row) - --- --- Test cases that should be optimized into indexscans instead of --- the generic aggregate implementation. --- --- Basic cases ---Testcase 149: -explain (costs off) - select min((fields->>'unique1')::int4) from tenk1; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 150: -select min((fields->>'unique1')::int4) from tenk1; - min ------ - 0 -(1 row) - ---Testcase 151: -explain (costs off) - select max((fields->>'unique1')::int4) from tenk1; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 152: -select max((fields->>'unique1')::int4) from tenk1; - max ------- - 9999 -(1 row) - ---Testcase 153: -explain (costs off) - select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 < 42; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 154: -select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 < 42; - max ------ - 41 -(1 row) - ---Testcase 155: -explain (costs off) - select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > 42; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 156: -select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > 42; - max ------- - 9999 -(1 row) - --- the planner may choose a generic aggregate here if parallel query is --- enabled, since that plan will be parallel safe and the "optimized" --- plan, which has almost identical cost, will not be. we want to test --- the optimized plan, so temporarily disable parallel query. -begin; ---Testcase 157: -set local max_parallel_workers_per_gather = 0; ---Testcase 158: -explain (costs off) - select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > 42000; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 159: -select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > 42000; - max ------ -(0 rows) - -rollback; --- multi-column index (uses tenk1_thous_tenthous) ---Testcase 160: -explain (costs off) - select max((fields->>'tenthous')::int4) from tenk1 where (fields->>'thousand')::int4 = 33; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 161: -select max((fields->>'tenthous')::int4) from tenk1 where (fields->>'thousand')::int4 = 33; - max ------- - 9033 -(1 row) - ---Testcase 162: -explain (costs off) - select min((fields->>'tenthous')::int4) from tenk1 where (fields->>'thousand')::int4 = 33; - QUERY PLAN --------------- - Foreign Scan -(1 row) - ---Testcase 163: -select min((fields->>'tenthous')::int4) from tenk1 where (fields->>'thousand')::int4 = 33; - min ------ - 33 -(1 row) - --- check parameter propagation into an indexscan subquery ---Testcase 164: -explain (costs off) - select (fields->>'f1')::int4 f1, (select min((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > (int4_tbl.fields->>'f1')::int4) AS gt - from int4_tbl; - QUERY PLAN --------------------------- - Foreign Scan on int4_tbl - SubPlan 1 - -> Foreign Scan -(3 rows) - ---Testcase 165: -select (fields->>'f1')::int4 f1, (select min((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > (int4_tbl.fields->>'f1')::int4) AS gt - from int4_tbl; - f1 | gt --------------+---- - 0 | 1 - 123456 | - -123456 | 0 - 2147483647 | - -2147483647 | 0 -(5 rows) - --- check some cases that were handled incorrectly in 8.3.0 ---Testcase 166: -explain (costs off) - select distinct max((fields->>'unique2')::int4) from tenk1; - QUERY PLAN ------------------------------------------------------------------- - Unique - -> Sort - Sort Key: (max(((fields ->> 'unique2'::text))::integer)) - -> Foreign Scan -(4 rows) - ---Testcase 167: -select distinct max((fields->>'unique2')::int4) from tenk1; - max ------- - 9999 -(1 row) - ---Testcase 168: -explain (costs off) - select max((fields->>'unique2')::int4) from tenk1 order by 1; - QUERY PLAN ------------------------------------------------------------- - Sort - Sort Key: (max(((fields ->> 'unique2'::text))::integer)) - -> Foreign Scan -(3 rows) - ---Testcase 169: -select max((fields->>'unique2')::int4) from tenk1 order by 1; - max ------- - 9999 -(1 row) - ---Testcase 170: -explain (costs off) - select max((fields->>'unique2')::int4) from tenk1 order by max((fields->>'unique2')::int4); - QUERY PLAN ------------------------------------------------------------- - Sort - Sort Key: (max(((fields ->> 'unique2'::text))::integer)) - -> Foreign Scan -(3 rows) - ---Testcase 171: -select max((fields->>'unique2')::int4) from tenk1 order by max((fields->>'unique2')::int4); - max ------- - 9999 -(1 row) - ---Testcase 172: -explain (costs off) - select max((fields->>'unique2')::int4) from tenk1 order by max((fields->>'unique2')::int4)+1; - QUERY PLAN ------------------------------------------------------------------- - Sort - Sort Key: ((max(((fields ->> 'unique2'::text))::integer) + 1)) - -> Foreign Scan -(3 rows) - ---Testcase 173: -select max((fields->>'unique2')::int4) from tenk1 order by max((fields->>'unique2')::int4)+1; - max ------- - 9999 -(1 row) - ---Testcase 174: -explain (costs off) - select max((fields->>'unique2')::int4), generate_series(1,3) as g from tenk1 order by g desc; - QUERY PLAN ------------------------------------------- - Sort - Sort Key: (generate_series(1, 3)) DESC - -> ProjectSet - -> Foreign Scan -(4 rows) - ---Testcase 175: -select max((fields->>'unique2')::int4), generate_series(1,3) as g from tenk1 order by g desc; - max | g -------+--- - 9999 | 3 - 9999 | 2 - 9999 | 1 -(3 rows) - --- interesting corner case: constant gets optimized into a seqscan ---Testcase 176: -explain (costs off) - select max(100) from tenk1; - QUERY PLAN ----------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Result - One-Time Filter: (100 IS NOT NULL) - -> Foreign Scan on tenk1 -(6 rows) - ---Testcase 177: -select max(100) from tenk1; - max ------ - 100 -(1 row) - --- try it on an inheritance tree ---Testcase 178: -create foreign table minmaxtest(fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -create foreign table minmaxtest_nsc(f1 int) server influxdb_svr OPTIONS (table 'minmaxtest'); ---Testcase 179: -create table minmaxtest1() inherits (minmaxtest); ---Testcase 180: -create table minmaxtest2() inherits (minmaxtest); ---Testcase 181: -create table minmaxtest3() inherits (minmaxtest); ---create index minmaxtesti on minmaxtest(f1); ---Testcase 182: -create index minmaxtest1i on minmaxtest1(((fields->>'f1')::int)); ---Testcase 183: -create index minmaxtest2i on minmaxtest2(((fields->>'f1')::int) desc); ---Testcase 184: -create index minmaxtest3i on minmaxtest3(((fields->>'f1')::int)) where (fields->>'f1')::int is not null; ---Insert data to InfluxDB through non-schemaless foreign table ---Testcase 185: -insert into minmaxtest_nsc values(11), (12); ---Insert data to inherits schemaless tables ---Testcase 186: -insert into minmaxtest1 values('{"f1": "13"}'), ('{"f1": "14"}'); ---Testcase 187: -insert into minmaxtest2 values('{"f1": "15"}'), ('{"f1": "16"}'); ---Testcase 188: -insert into minmaxtest3 values('{"f1": "17"}'), ('{"f1": "18"}'); ---Testcase 189: -explain (costs off) - select min((fields->>'f1')::int), max((fields->>'f1')::int) from minmaxtest; - QUERY PLAN ----------------------------------------- - Aggregate - -> Append - -> Foreign Scan on minmaxtest - -> Seq Scan on minmaxtest1 - -> Seq Scan on minmaxtest2 - -> Seq Scan on minmaxtest3 -(6 rows) - ---Testcase 190: -select min((fields->>'f1')::int), max((fields->>'f1')::int) from minmaxtest; - min | max ------+----- - 11 | 18 -(1 row) - --- DISTINCT doesn't do anything useful here, but it shouldn't fail ---Testcase 191: -explain (costs off) - select distinct min((fields->>'f1')::int), max((fields->>'f1')::int) from minmaxtest; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------- - Unique - -> Sort - Sort Key: (min(((minmaxtest.fields ->> 'f1'::text))::integer)), (max(((minmaxtest.fields ->> 'f1'::text))::integer)) - -> Aggregate - -> Append - -> Foreign Scan on minmaxtest - -> Seq Scan on minmaxtest1 - -> Seq Scan on minmaxtest2 - -> Seq Scan on minmaxtest3 -(9 rows) - ---Testcase 192: -select distinct min((fields->>'f1')::int), max((fields->>'f1')::int) from minmaxtest; - min | max ------+----- - 11 | 18 -(1 row) - ---Testcase 193: -drop foreign table minmaxtest cascade; -NOTICE: drop cascades to 3 other objects -DETAIL: drop cascades to table minmaxtest1 -drop cascades to table minmaxtest2 -drop cascades to table minmaxtest3 -drop foreign table minmaxtest_nsc cascade; --- check for correct detection of nested-aggregate errors ---Testcase 194: -select max(min((fields->>'unique1')::int4)) from tenk1; -ERROR: aggregate function calls cannot be nested -LINE 1: select max(min((fields->>'unique1')::int4)) from tenk1; - ^ ---Testcase 195: -select (select max(min((fields->>'unique1')::int4)) from int8_tbl) from tenk1; -ERROR: aggregate function calls cannot be nested -LINE 1: select (select max(min((fields->>'unique1')::int4)) from int... - ^ --- --- Test removal of redundant GROUP BY columns --- ---Testcase 196: -create foreign table agg_t1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 197: -create foreign table agg_t2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 198: -create foreign table agg_t3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); --- Non-primary-key columns can be removed from GROUP BY ---Testcase 199: -explain (costs off) select (fields->>'a')::int a,(fields->>'b')::int b,(fields->>'c')::int c,(fields->>'d')::int d from agg_t1 group by (fields->>'a')::int,(fields->>'b')::int,(fields->>'c')::int,(fields->>'d')::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------- - HashAggregate - Group Key: ((fields ->> 'a'::text))::integer, ((fields ->> 'b'::text))::integer, ((fields ->> 'c'::text))::integer, ((fields ->> 'd'::text))::integer - -> Foreign Scan on agg_t1 -(3 rows) - --- No removal can happen if the complete PK is not present in GROUP BY ---Testcase 200: -explain (costs off) select (fields->>'a')::int a,(fields->>'c')::int c from agg_t1 group by (fields->>'a')::int,(fields->>'c')::int,(fields->>'d')::int; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- - HashAggregate - Group Key: ((fields ->> 'a'::text))::integer, ((fields ->> 'c'::text))::integer, ((fields ->> 'd'::text))::integer - -> Foreign Scan on agg_t1 -(3 rows) - --- Test removal across multiple relations ---Testcase 201: -explain (costs off) select agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d, agg_t2.x, agg_t2.y, agg_t2.z -from (select (agg_t1.fields->>'a')::int a, (agg_t1.fields->>'b')::int b, (agg_t1.fields->>'c')::int c, (agg_t1.fields->>'d')::int d from agg_t1 agg_t1) agg_t1 inner join (select (agg_t2.fields->>'x')::int x, (agg_t2.fields->>'y')::int y, (agg_t2.fields->>'z')::int z from agg_t2 agg_t2) agg_t2 on (agg_t1.a)::int = (agg_t2.x)::int and (agg_t1.b)::int = (agg_t2.y)::int -group by (agg_t1.a)::int,(agg_t1.b)::int,(agg_t1.c)::int,(agg_t1.d)::int,(agg_t2.x)::int,(agg_t2.y)::int,(agg_t2.z)::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Group - Group Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer), (((agg_t1.fields ->> 'c'::text))::integer), (((agg_t1.fields ->> 'd'::text))::integer), (((agg_t2.fields ->> 'x'::text))::integer), (((agg_t2.fields ->> 'y'::text))::integer), (((agg_t2.fields ->> 'z'::text))::integer) - -> Sort - Sort Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer), (((agg_t1.fields ->> 'c'::text))::integer), (((agg_t1.fields ->> 'd'::text))::integer), (((agg_t2.fields ->> 'z'::text))::integer) - -> Merge Join - Merge Cond: (((((agg_t1.fields ->> 'a'::text))::integer) = (((agg_t2.fields ->> 'x'::text))::integer)) AND ((((agg_t1.fields ->> 'b'::text))::integer) = (((agg_t2.fields ->> 'y'::text))::integer))) - -> Sort - Sort Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer) - -> Foreign Scan on agg_t1 - -> Sort - Sort Key: (((agg_t2.fields ->> 'x'::text))::integer), (((agg_t2.fields ->> 'y'::text))::integer) - -> Foreign Scan on agg_t2 -(12 rows) - --- Test case where agg_t1 can be optimized but not agg_t2 ---Testcase 202: -explain (costs off) select agg_t1.*,agg_t2.x, agg_t2.z -from (select (agg_t1.fields->>'a')::int a, (agg_t1.fields->>'b')::int b, (agg_t1.fields->>'c')::int c, (agg_t1.fields->>'d')::int d from agg_t1 agg_t1) agg_t1 inner join (select (agg_t2.fields->>'x')::int x, (agg_t2.fields->>'y')::int y, (agg_t2.fields->>'z')::int z from agg_t2 agg_t2) agg_t2 on (agg_t1.a)::int = (agg_t2.x)::int and (agg_t1.b)::int = (agg_t2.y)::int -group by (agg_t1.a)::int,(agg_t1.b)::int,(agg_t1.c)::int,(agg_t1.d)::int,(agg_t2.x)::int,(agg_t2.z)::int; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Group - Group Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer), (((agg_t1.fields ->> 'c'::text))::integer), (((agg_t1.fields ->> 'd'::text))::integer), (((agg_t2.fields ->> 'x'::text))::integer), (((agg_t2.fields ->> 'z'::text))::integer) - -> Sort - Sort Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer), (((agg_t1.fields ->> 'c'::text))::integer), (((agg_t1.fields ->> 'd'::text))::integer), (((agg_t2.fields ->> 'z'::text))::integer) - -> Merge Join - Merge Cond: (((((agg_t1.fields ->> 'a'::text))::integer) = (((agg_t2.fields ->> 'x'::text))::integer)) AND ((((agg_t1.fields ->> 'b'::text))::integer) = (((agg_t2.fields ->> 'y'::text))::integer))) - -> Sort - Sort Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer) - -> Foreign Scan on agg_t1 - -> Sort - Sort Key: (((agg_t2.fields ->> 'x'::text))::integer), (((agg_t2.fields ->> 'y'::text))::integer) - -> Foreign Scan on agg_t2 -(12 rows) - --- Cannot optimize when PK is deferrable ---Testcase 203: -explain (costs off) select (fields->>'a')::int a,(fields->>'b')::int b,(fields->>'c')::int c from agg_t3 group by (fields->>'a')::int,(fields->>'b')::int,(fields->>'c')::int; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- - HashAggregate - Group Key: ((fields ->> 'a'::text))::integer, ((fields ->> 'b'::text))::integer, ((fields ->> 'c'::text))::integer - -> Foreign Scan on agg_t3 -(3 rows) - ---Testcase 204: -create temp table agg_t1c () inherits (agg_t1); --- Ensure we don't remove any columns when agg_t1 has a child table ---Testcase 205: -explain (costs off) select (fields->>'a')::int a,(fields->>'b')::int b,(fields->>'c')::int c,(fields->>'d')::int d from agg_t1 group by (fields->>'a')::int,(fields->>'b')::int,(fields->>'c')::int,(fields->>'d')::int; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - HashAggregate - Group Key: ((agg_t1.fields ->> 'a'::text))::integer, ((agg_t1.fields ->> 'b'::text))::integer, ((agg_t1.fields ->> 'c'::text))::integer, ((agg_t1.fields ->> 'd'::text))::integer - -> Result - -> Append - -> Foreign Scan on agg_t1 - -> Seq Scan on agg_t1c -(6 rows) - --- Okay to remove columns if we're only querying the parent. ---Testcase 206: -explain (costs off) select (fields->>'a')::int a,(fields->>'b')::int b,(fields->>'c')::int c,(fields->>'d')::int d from only agg_t1 group by (fields->>'a')::int,(fields->>'b')::int,(fields->>'c')::int,(fields->>'d')::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------- - HashAggregate - Group Key: ((fields ->> 'a'::text))::integer, ((fields ->> 'b'::text))::integer, ((fields ->> 'c'::text))::integer, ((fields ->> 'd'::text))::integer - -> Foreign Scan on agg_t1 -(3 rows) - ---Testcase 207: -create temp table p_agg_t1 ( - a int, - b int, - c int, - d int, - primary key(a,b) -) partition by list(a); -ERROR: primary key constraints are not supported on partitioned tables -LINE 6: primary key(a,b) - ^ ---Testcase 208: -create temp table p_agg_t1_1 partition of p_agg_t1 for values in(1); -ERROR: relation "p_agg_t1" does not exist ---Testcase 209: -create temp table p_agg_t1_2 partition of p_agg_t1 for values in(2); -ERROR: relation "p_agg_t1" does not exist --- Ensure we can remove non-PK columns for partitioned tables. ---Testcase 210: -explain (costs off) select * from p_agg_t1 group by a,b,c,d; -ERROR: relation "p_agg_t1" does not exist -LINE 1: explain (costs off) select * from p_agg_t1 group by a,b,c,d; - ^ ---Testcase 211: -drop foreign table agg_t1 cascade; -NOTICE: drop cascades to table agg_t1c ---Testcase 212: -drop foreign table agg_t2 cascade; ---Testcase 213: -drop foreign table agg_t3 cascade; ---Testcase 214: -drop table p_agg_t1; -ERROR: table "p_agg_t1" does not exist --- --- Test GROUP BY matching of join columns that are type-coerced due to USING --- ---Testcase 215: -create foreign table agg_t1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 216: -create foreign table agg_t2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 217: -select f1 from (select (fields->>'f1')::int f1, (fields->>'f2')::bigint f2 from agg_t1) agg_t1 left join (select (fields->>'f1')::bigint f1, (fields->>'f22')::bigint f22 from agg_t2) agg_t2 using (f1) group by f1; - f1 ----- -(0 rows) - ---Testcase 218: -select f1 from (select (fields->>'f1')::int f1, (fields->>'f2')::bigint f2 from agg_t1) agg_t1 left join (select (fields->>'f1')::bigint f1, (fields->>'f22')::bigint f22 from agg_t2) agg_t2 using (f1) group by agg_t1.f1; - f1 ----- -(0 rows) - ---Testcase 219: -select (agg_t1.fields->>'f1')::int f1 from agg_t1 left join (select (fields->>'f1')::bigint f1, (fields->>'f22')::bigint f22 from agg_t2) agg_t2 on (agg_t1.fields->>'f1')::bigint = (agg_t2.f1)::bigint group by (agg_t1.fields->>'f1')::int; - f1 ----- -(0 rows) - --- only this one should fail: ---Testcase 220: -select (agg_t1.fields->>'f1')::int f1 from agg_t1 left join (select (fields->>'f1')::bigint f1, (fields->>'f22')::bigint f22 from agg_t2) agg_t2 on (agg_t1.fields->>'f1')::bigint = (agg_t2.f1)::bigint group by f1; -ERROR: column "agg_t1.fields" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: select (agg_t1.fields->>'f1')::int f1 from agg_t1 left join ... - ^ ---Testcase 221: -drop foreign table agg_t1 cascade; ---Testcase 222: -drop foreign table agg_t2 cascade; --- --- Test combinations of DISTINCT and/or ORDER BY --- -begin; ---Testcase 223: -select array_agg(fields->>'q1' order by (fields->>'q2')::int8) - from INT8_TBL2; - array_agg ------------ - {3,4,2,1} -(1 row) - ---Testcase 224: -select array_agg(fields->>'q1' order by (fields->>'q1')::int8) - from INT8_TBL2; - array_agg ------------ - {1,2,3,4} -(1 row) - ---Testcase 225: -select array_agg(fields->>'q1' order by (fields->>'q1')::int8 desc) - from INT8_TBL2; - array_agg ------------ - {4,3,2,1} -(1 row) - ---Testcase 226: -select array_agg(fields->>'q2' order by (fields->>'q1')::int8 desc) - from INT8_TBL2; - array_agg ------------ - {2,1,3,4} -(1 row) - ---Testcase 227: -select array_agg(distinct (fields->>'f1')::int4) - from INT4_TBL2; - array_agg ------------ - {1,2,3} -(1 row) - ---Testcase 228: -select array_agg(distinct (fields->>'f1')::int4 order by (fields->>'f1')::int4) - from INT4_TBL2; - array_agg ------------ - {1,2,3} -(1 row) - ---Testcase 229: -select array_agg(distinct (fields->>'f1')::int4 order by (fields->>'f1')::int4 desc) - from INT4_TBL2; - array_agg ------------ - {3,2,1} -(1 row) - ---Testcase 230: -select array_agg(distinct (fields->>'f1')::int4 order by (fields->>'f1')::int4 desc nulls last) - from INT4_TBL2; - array_agg ------------ - {3,2,1} -(1 row) - -rollback; --- multi-arg aggs, strict/nonstrict, distinct/order by ---Testcase 231: -create type aggtype as (a integer, b integer, c text); ---Testcase 232: -create function aggf_trans(aggtype[],integer,integer,text) returns aggtype[] -as 'select array_append($1,ROW($2,$3,$4)::aggtype)' -language sql strict immutable; ---Testcase 233: -create function aggfns_trans(aggtype[],integer,integer,text) returns aggtype[] -as 'select array_append($1,ROW($2,$3,$4)::aggtype)' -language sql immutable; ---Testcase 234: -create aggregate aggfstr(integer,integer,text) ( - sfunc = aggf_trans, stype = aggtype[], - initcond = '{}' -); ---Testcase 235: -create aggregate aggfns(integer,integer,text) ( - sfunc = aggfns_trans, stype = aggtype[], sspace = 10000, - initcond = '{}' -); -begin; ---Testcase 236: -select aggfstr((fields->>'a')::int,(fields->>'b')::int,fields->>'c') - from multi_arg_agg; - aggfstr ---------------------------------------- - {"(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 237: -select aggfns((fields->>'a')::int,(fields->>'b')::int,fields->>'c') - from multi_arg_agg; - aggfns ------------------------------------------------ - {"(1,3,foo)","(0,,)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 238: -select aggfstr(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c') - from multi_arg_agg, - generate_series(1,3) i; - aggfstr ---------------------------------------- - {"(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 239: -select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c') - from multi_arg_agg, - generate_series(1,3) i; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 240: -select aggfstr(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'b')::int) - from multi_arg_agg, - generate_series(1,3) i; - aggfstr ---------------------------------------- - {"(3,1,baz)","(2,2,bar)","(1,3,foo)"} -(1 row) - ---Testcase 241: -select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'b')::int) - from multi_arg_agg, - generate_series(1,3) i; - aggfns ------------------------------------------------ - {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} -(1 row) - --- test specific code paths ---Testcase 242: -select aggfns(distinct (fields->>'a')::int,(fields->>'a')::int,fields->>'c' order by fields->>'c' using ~<~,(fields->>'a')::int) - from multi_arg_agg, - generate_series(1,2) i; - aggfns ------------------------------------------------- - {"(2,2,bar)","(3,3,baz)","(1,1,foo)","(0,0,)"} -(1 row) - ---Testcase 243: -select aggfns(distinct (fields->>'a')::int,(fields->>'a')::int,fields->>'c' order by fields->>'c' using ~<~) - from multi_arg_agg, - generate_series(1,2) i; - aggfns ------------------------------------------------- - {"(2,2,bar)","(3,3,baz)","(1,1,foo)","(0,0,)"} -(1 row) - ---Testcase 244: -select aggfns(distinct (fields->>'a')::int,(fields->>'a')::int,fields->>'c' order by (fields->>'a')::int) - from multi_arg_agg, - generate_series(1,2) i; - aggfns ------------------------------------------------- - {"(0,0,)","(1,1,foo)","(2,2,bar)","(3,3,baz)"} -(1 row) - ---Testcase 245: -select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'a')::int,fields->>'c' using ~<~,(fields->>'b')::int) - from multi_arg_agg, - generate_series(1,2) i; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - --- check node I/O via view creation and usage, also deparsing logic ---Testcase 246: -create view agg_view1 as - select aggfns((fields->>'a')::int,(fields->>'b')::int,fields->>'c') - from multi_arg_agg; ---Testcase 247: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(1,3,foo)","(0,,)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 248: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text)) AS aggfns+ - FROM multi_arg_agg; -(1 row) - ---Testcase 249: -create or replace view agg_view1 as - select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c') - from multi_arg_agg, - generate_series(1,3) i; ---Testcase 250: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 251: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(DISTINCT ((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text)) AS aggfns+ - FROM multi_arg_agg, + - generate_series(1, 3) i(i); -(1 row) - ---Testcase 252: -create or replace view agg_view1 as - select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'b')::int) - from multi_arg_agg, - generate_series(1,3) i; ---Testcase 253: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} -(1 row) - ---Testcase 254: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(DISTINCT ((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) ORDER BY ((multi_arg_agg.fields ->> 'b'::text))::integer) AS aggfns+ - FROM multi_arg_agg, + - generate_series(1, 3) i(i); -(1 row) - ---Testcase 255: -create or replace view agg_view1 as - select aggfns((fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'b')::int+1) - from multi_arg_agg; ---Testcase 256: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} -(1 row) - ---Testcase 257: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) ORDER BY (((multi_arg_agg.fields ->> 'b'::text))::integer + 1)) AS aggfns+ - FROM multi_arg_agg; -(1 row) - ---Testcase 258: -create or replace view agg_view1 as - select aggfns((fields->>'a')::int,(fields->>'a')::int,fields->>'c' order by (fields->>'b')::int) - from multi_arg_agg; ---Testcase 259: -select * from agg_view1; - aggfns ------------------------------------------------- - {"(3,3,baz)","(2,2,bar)","(1,1,foo)","(0,0,)"} -(1 row) - ---Testcase 260: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'a'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) ORDER BY ((multi_arg_agg.fields ->> 'b'::text))::integer) AS aggfns+ - FROM multi_arg_agg; -(1 row) - ---Testcase 261: -create or replace view agg_view1 as - select aggfns((fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by fields->>'c' using ~<~) - from multi_arg_agg; ---Testcase 262: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(2,2,bar)","(3,1,baz)","(1,3,foo)","(0,,)"} -(1 row) - ---Testcase 263: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) ORDER BY (multi_arg_agg.fields ->> 'c'::text) USING ~<~ NULLS LAST) AS aggfns+ - FROM multi_arg_agg; -(1 row) - ---Testcase 264: -create or replace view agg_view1 as - select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'a')::int,fields->>'c' using ~<~,(fields->>'b')::int) - from multi_arg_agg, - generate_series(1,2) i; ---Testcase 265: -select * from agg_view1; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - ---Testcase 266: -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(DISTINCT ((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) ORDER BY ((multi_arg_agg.fields ->> 'a'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) USING ~<~ NULLS LAST, ((multi_arg_agg.fields ->> 'b'::text))::integer) AS aggfns+ - FROM multi_arg_agg, + - generate_series(1, 2) i(i); -(1 row) - ---Testcase 267: -drop view agg_view1; -rollback; --- incorrect DISTINCT usage errors ---Testcase 268: -select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by i) - from multi_arg_agg2, generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: ...lds->>'a')::int,(fields->>'b')::int,fields->>'c' order by i) - ^ ---Testcase 269: -select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'a')::int,(fields->>'b')::int+1) - from multi_arg_agg2, generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: ...)::int,fields->>'c' order by (fields->>'a')::int,(fields->>'... - ^ ---Testcase 270: -select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'a')::int,(fields->>'b')::int,i,fields->>'c') - from multi_arg_agg2, generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: ... order by (fields->>'a')::int,(fields->>'b')::int,i,fields->... - ^ ---Testcase 271: -select aggfns(distinct (fields->>'a')::int,(fields->>'a')::int,fields->>'c' order by (fields->>'a')::int,(fields->>'b')::int) - from multi_arg_agg2, generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: ...)::int,fields->>'c' order by (fields->>'a')::int,(fields->>'... - ^ --- string_agg tests ---Testcase 272: -create foreign table string_agg1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 273: -create foreign table string_agg2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 274: -create foreign table string_agg3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 275: -create foreign table string_agg4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 276: -select string_agg(fields->>'a1',',') from string_agg1; - string_agg ----------------- - aaaa,bbbb,cccc -(1 row) - ---Testcase 277: -select string_agg(fields->>'a1',',') from string_agg2; - string_agg ----------------- - aaaa,bbbb,cccc -(1 row) - ---Testcase 278: -select string_agg(fields->>'a1','AB') from string_agg3; - string_agg ------------- - bbbbABcccc -(1 row) - ---Testcase 279: -select string_agg(fields->>'a1',',') from string_agg4; - string_agg ------------- - -(1 row) - --- check some implicit casting cases, as per bug #5564 ---Testcase 280: -select string_agg(distinct (fields->>'f1')::varchar, ',' order by (fields->>'f1')::varchar) from varchar_tbl; -- ok - string_agg ------------- - a,ab,abcd -(1 row) - ---Testcase 281: -select string_agg(distinct (fields->>'f1')::text, ',' order by (fields->>'f1')::varchar) from varchar_tbl; -- not ok -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: ...agg(distinct (fields->>'f1')::text, ',' order by (fields->>'... - ^ ---Testcase 282: -select string_agg(distinct (fields->>'f1')::varchar, ',' order by (fields->>'f1')::text) from varchar_tbl; -- not ok -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: ...(distinct (fields->>'f1')::varchar, ',' order by (fields->>'... - ^ ---Testcase 283: -select string_agg(distinct (fields->>'f1')::text, ',' order by (fields->>'f1')::text) from varchar_tbl; -- ok - string_agg ------------- - a,ab,abcd -(1 row) - --- InfluxDB does not support binary data --- string_agg bytea tests -/* -create table bytea_test_table(v bytea); - -select string_agg(v, '') from bytea_test_table; - -insert into bytea_test_table values(decode('ff','hex')); - -select string_agg(v, '') from bytea_test_table; - -insert into bytea_test_table values(decode('aa','hex')); - -select string_agg(v, '') from bytea_test_table; -select string_agg(v, NULL) from bytea_test_table; -select string_agg(v, decode('ee', 'hex')) from bytea_test_table; - -drop table bytea_test_table; -*/ --- FILTER tests ---Testcase 284: -select min((fields->>'unique1')::int4) filter (where (fields->>'unique1')::int4 > 100) from tenk1; - min ------ - 101 -(1 row) - ---Testcase 285: -select sum(1/(fields->>'ten')::int4) filter (where (fields->>'ten')::int4 > 0) from tenk1; - sum ------- - 1000 -(1 row) - ---Testcase 286: -select (fields->>'ten')::int4 ten, sum(distinct (fields->>'four')::int4) filter (where (fields->>'four')::text ~ '123') from onek a -group by fields->>'ten'; - ten | sum ------+----- - 0 | - 1 | - 2 | - 3 | - 4 | - 5 | - 6 | - 7 | - 8 | - 9 | -(10 rows) - ---Testcase 287: -select (fields->>'ten')::int4 ten, sum(distinct (fields->>'four')::int4) filter (where (fields->>'four')::int4 > 10) from onek a -group by fields->>'ten' -having exists (select 1 from onek b where sum(distinct (a.fields->>'four')::int4) = (b.fields->>'four')::int4); - ten | sum ------+----- - 0 | - 2 | - 4 | - 6 | - 8 | -(5 rows) - ---Testcase 288: -select max(foo COLLATE "C") filter (where (bar collate "POSIX") > '0') -from (values ('a', 'b')) AS v(foo,bar); - max ------ - a -(1 row) - --- outer reference in FILTER (PostgreSQL extension) ---Testcase 289: -select (select count(*) - from (values (1)) t0(inner_c)) -from (values (2),(3)) t1(outer_c); -- inner query is aggregation query - count -------- - 1 - 1 -(2 rows) - ---Testcase 290: -select (select count(*) filter (where outer_c <> 0) - from (values (1)) t0(inner_c)) -from (values (2),(3)) t1(outer_c); -- outer query is aggregation query - count -------- - 2 -(1 row) - ---Testcase 291: -select (select count(inner_c) filter (where outer_c <> 0) - from (values (1)) t0(inner_c)) -from (values (2),(3)) t1(outer_c); -- inner query is aggregation query - count -------- - 1 - 1 -(2 rows) - ---Testcase 292: -select - (select max((select (i.fields->>'unique2')::int from tenk1 i where (i.fields->>'unique1')::int = (o.fields->>'unique1')::int)) - filter (where (o.fields->>'unique1')::int < 10)) -from tenk1 o; -- outer query is aggregation query - max ------- - 9998 -(1 row) - --- subquery in FILTER clause (PostgreSQL extension) ---Testcase 293: -select sum((fields->>'unique1')::int) FILTER (WHERE - (fields->>'unique1')::int IN (SELECT (fields->>'unique1')::int FROM onek where (fields->>'unique1')::int < 100)) FROM tenk1; - sum ------- - 4950 -(1 row) - --- exercise lots of aggregate parts with FILTER -begin; ---Testcase 294: -select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'a')::int,fields->>'c' using ~<~,(fields->>'b')::int) filter (where (fields->>'a')::int > 1) - from multi_arg_agg3, - generate_series(1,2) i; - aggfns ---------------------------- - {"(2,2,bar)","(3,1,baz)"} -(1 row) - -rollback; --- ordered-set aggregates -begin; ---Testcase 295: -select (fields->>'f1')::float8 f1, percentile_cont((fields->>'f1')::float8) within group (order by x::float8) -from generate_series(1,5) x, - FLOAT8_TBL -group by (fields->>'f1')::float8 order by (fields->>'f1')::float8; - f1 | percentile_cont -------+----------------- - 0 | 1 - 0.1 | 1.4 - 0.25 | 2 - 0.4 | 2.6 - 0.5 | 3 - 0.6 | 3.4 - 0.75 | 4 - 0.9 | 4.6 - 1 | 5 -(9 rows) - -rollback; -begin; ---Testcase 296: -select (fields->>'f1')::float8 f1, percentile_cont((fields->>'f1')::float8 order by (fields->>'f1')::float8) within group (order by x) -- error -from generate_series(1,5) x, - FLOAT8_TBL -group by (fields->>'f1')::float8 order by (fields->>'f1')::float8; -ERROR: cannot use multiple ORDER BY clauses with WITHIN GROUP -LINE 1: ...>>'f1')::float8 order by (fields->>'f1')::float8) within gro... - ^ -rollback; -begin; ---Testcase 297: -select (fields->>'f1')::float8 f1, sum() within group (order by x::float8) -- error -from generate_series(1,5) x, - FLOAT8_TBL -group by (fields->>'f1')::float8 order by (fields->>'f1')::float8; -ERROR: sum is not an ordered-set aggregate, so it cannot have WITHIN GROUP -LINE 1: select (fields->>'f1')::float8 f1, sum() within group (order... - ^ -rollback; -begin; ---Testcase 298: -select (fields->>'f1')::float8 f1, percentile_cont((fields->>'f1')::float8,(fields->>'f1')::float8) -- error -from generate_series(1,5) x, - FLOAT8_TBL -group by (fields->>'f1')::float8 order by (fields->>'f1')::float8; -ERROR: WITHIN GROUP is required for ordered-set aggregate percentile_cont -LINE 1: select (fields->>'f1')::float8 f1, percentile_cont((fields->... - ^ -rollback; ---Testcase 299: -select percentile_cont(0.5) within group (order by (fields->>'b')::float4) from aggtest; - percentile_cont ------------------- - 53.4485001564026 -(1 row) - ---Testcase 300: -select percentile_cont(0.5) within group (order by (fields->>'b')::float4), sum((fields->>'b')::float4) from aggtest; - percentile_cont | sum -------------------+--------- - 53.4485001564026 | 431.773 -(1 row) - ---Testcase 301: -select percentile_cont(0.5) within group (order by (fields->>'thousand')::int) from tenk1; - percentile_cont ------------------ - 499.5 -(1 row) - ---Testcase 302: -select percentile_disc(0.5) within group (order by (fields->>'thousand')::int) from tenk1; - percentile_disc ------------------ - 499 -(1 row) - -begin; ---Testcase 303: -select rank(3) within group (order by (fields->>'f1')::int4) from INT4_TBL3; - rank ------- - 5 -(1 row) - ---Testcase 304: -select cume_dist(3) within group (order by (fields->>'f1')::int4) from INT4_TBL3; - cume_dist ------------ - 0.875 -(1 row) - ---Testcase 305: -select percent_rank(3) within group (order by (fields->>'f1')::int4) from INT4_TBL4; - percent_rank --------------- - 0.5 -(1 row) - ---Testcase 306: -select dense_rank(3) within group (order by (fields->>'f1')::int4) from INT4_TBL3; - dense_rank ------------- - 3 -(1 row) - -rollback; ---Testcase 307: -select percentile_disc(array[0,0.1,0.25,0.5,0.75,0.9,1]) within group (order by (fields->>'thousand')::int) -from tenk1; - percentile_disc ----------------------------- - {0,99,249,499,749,899,999} -(1 row) - ---Testcase 308: -select percentile_cont(array[0,0.25,0.5,0.75,1]) within group (order by (fields->>'thousand')::int) -from tenk1; - percentile_cont ------------------------------ - {0,249.75,499.5,749.25,999} -(1 row) - ---Testcase 309: -select percentile_disc(array[[null,1,0.5],[0.75,0.25,null]]) within group (order by (fields->>'thousand')::int) -from tenk1; - percentile_disc ---------------------------------- - {{NULL,999,499},{749,249,NULL}} -(1 row) - ---Testcase 310: -create foreign table generate_series2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 311: -select percentile_cont(array[0,1,0.25,0.75,0.5,1,0.3,0.32,0.35,0.38,0.4]) within group (order by (fields->>'a')::int) -from generate_series2; - percentile_cont ------------------------------------------- - {1,6,2.25,4.75,3.5,6,2.5,2.6,2.75,2.9,3} -(1 row) - ---Testcase 312: -select (fields->>'ten')::int4 ten, mode() within group (order by fields->>'string4') from tenk1 group by fields->>'ten'; - ten | mode ------+-------- - 0 | HHHHxx - 1 | OOOOxx - 2 | VVVVxx - 3 | OOOOxx - 4 | HHHHxx - 5 | HHHHxx - 6 | OOOOxx - 7 | AAAAxx - 8 | VVVVxx - 9 | VVVVxx -(10 rows) - ---Testcase 313: -create foreign table percentile_disc1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 314: -select percentile_disc(array[0.25,0.5,0.75]) within group (order by unnest) -from (select unnest((fields->>'x')::text[]) from percentile_disc1) y; - percentile_disc ------------------ - {fred,jill,jim} -(1 row) - --- check collation propagates up in suitable cases: ---Testcase 315: -create foreign table pg_collation1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 316: -select pg_collation_for(percentile_disc(1) within group (order by fields->>'x' collate "POSIX")) - from pg_collation1; - pg_collation_for ------------------- - "POSIX" -(1 row) - --- test ordered-set aggs using built-in support functions ---Testcase 317: -create aggregate test_percentile_disc(float8 ORDER BY anyelement) ( - stype = internal, - sfunc = ordered_set_transition, - finalfunc = percentile_disc_final, - finalfunc_extra = true, - finalfunc_modify = read_write -); -WARNING: aggregate attribute "finalfunc_modify" not recognized ---Testcase 318: -create aggregate test_rank(VARIADIC "any" ORDER BY VARIADIC "any") ( - stype = internal, - sfunc = ordered_set_transition_multi, - finalfunc = rank_final, - finalfunc_extra = true, - hypothetical -); --- ordered-set aggs created with CREATE AGGREGATE ---Testcase 319: -create foreign table test_rank1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 320: -select test_rank(3) within group (order by (fields->>'x')::int) from test_rank1; - test_rank ------------ - 5 -(1 row) - ---Testcase 321: -select test_percentile_disc(0.5) within group (order by (fields->>'thousand')::int) from tenk1; - test_percentile_disc ----------------------- - 499 -(1 row) - --- ordered-set aggs can't use ungrouped vars in direct args: ---Testcase 322: -create foreign table generate_series3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 323: -select rank((fields->>'x')::int) within group (order by (fields->>'x')::int) from generate_series3 x; -ERROR: column "x.fields" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: select rank((fields->>'x')::int) within group (order by (fie... - ^ -DETAIL: Direct arguments of an ordered-set aggregate must use only grouped columns. --- outer-level agg can't use a grouped arg of a lower level, either: ---Testcase 324: -select array(select percentile_disc(a) within group (order by (fields->>'x')::int) - from (values (0.3),(0.7)) v(a) group by a) - from generate_series3; -ERROR: outer-level aggregate cannot contain a lower-level variable in its direct arguments -LINE 1: select array(select percentile_disc(a) within group (order b... - ^ --- agg in the direct args is a grouping violation, too: ---Testcase 325: -select rank(sum((fields->>'x')::int)) within group (order by (fields->>'x')::int) from generate_series3 x; -ERROR: aggregate function calls cannot be nested -LINE 1: select rank(sum((fields->>'x')::int)) within group (order by... - ^ --- hypothetical-set type unification and argument-count failures: ---Testcase 326: -select rank(3) within group (order by fields->>'x') from pg_collation1; -ERROR: WITHIN GROUP types text and integer cannot be matched -LINE 1: select rank(3) within group (order by fields->>'x') from pg_... - ^ ---Testcase 327: -select rank(3) within group (order by (fields->>'stringu1')::name,(fields->>'stringu2')::name) from tenk1; -ERROR: function rank(integer, name, name) does not exist -LINE 1: select rank(3) within group (order by (fields->>'stringu1'):... - ^ -HINT: To use the hypothetical-set aggregate rank, the number of hypothetical direct arguments (here 1) must match the number of ordering columns (here 2). ---Testcase 328: -select rank('fred') within group (order by (fields->>'x')::int) from generate_series3 x; -ERROR: invalid input syntax for integer: "fred" -LINE 1: select rank('fred') within group (order by (fields->>'x')::i... - ^ ---Testcase 329: -select rank('adam'::text collate "C") within group (order by fields->>'x' collate "POSIX") - from pg_collation1; -ERROR: collation mismatch between explicit collations "C" and "POSIX" -LINE 1: ... collate "C") within group (order by fields->>'x' collate "P... - ^ --- hypothetical-set type unification successes: ---Testcase 330: -select rank('adam'::varchar) within group (order by (fields->>'x')::varchar) from pg_collation1; - rank ------- - 1 -(1 row) - ---Testcase 331: -select rank('3') within group (order by (fields->>'x')::int) from generate_series3 x; - rank ------- - 3 -(1 row) - --- divide by zero check ---Testcase 332: -select percent_rank(0) within group (order by x) from generate_series(1,0) x; - percent_rank --------------- - 0 -(1 row) - --- deparse and multiple features: ---Testcase 333: -create view aggordview1 as -select (fields->>'ten')::int4 ten, - percentile_disc(0.5) within group (order by (fields->>'thousand')::int) as p50, - percentile_disc(0.5) within group (order by (fields->>'thousand')::int) filter (where (fields->>'hundred')::int=1) as px, - rank(5,'AZZZZ',50) within group (order by (fields->>'hundred')::int, (fields->>'string4')::name desc, (fields->>'hundred')::int) - from tenk1 - group by (fields->>'ten')::int order by (fields->>'ten')::int; ---Testcase 334: -select pg_get_viewdef('aggordview1'); - pg_get_viewdef ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - SELECT ((tenk1.fields ->> 'ten'::text))::integer AS ten, + - percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY ((tenk1.fields ->> 'thousand'::text))::integer) AS p50, + - percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY ((tenk1.fields ->> 'thousand'::text))::integer) FILTER (WHERE (((tenk1.fields ->> 'hundred'::text))::integer = 1)) AS px, + - rank(5, 'AZZZZ'::name, 50) WITHIN GROUP (ORDER BY ((tenk1.fields ->> 'hundred'::text))::integer, (((tenk1.fields ->> 'string4'::text))::name) DESC, ((tenk1.fields ->> 'hundred'::text))::integer) AS rank+ - FROM tenk1 + - GROUP BY ((tenk1.fields ->> 'ten'::text))::integer + - ORDER BY ((tenk1.fields ->> 'ten'::text))::integer; -(1 row) - ---Testcase 335: -select * from aggordview1 order by ten; - ten | p50 | px | rank ------+-----+-----+------ - 0 | 490 | | 101 - 1 | 491 | 401 | 101 - 2 | 492 | | 101 - 3 | 493 | | 101 - 4 | 494 | | 101 - 5 | 495 | | 67 - 6 | 496 | | 1 - 7 | 497 | | 1 - 8 | 498 | | 1 - 9 | 499 | | 1 -(10 rows) - ---Testcase 336: -drop view aggordview1; --- User defined function for user defined aggregate, VARIADIC ---Testcase 337: -create function least_accum(anyelement, variadic anyarray) -returns anyelement language sql as - 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; ---Testcase 338: -create aggregate least_agg(variadic items anyarray) ( - stype = anyelement, sfunc = least_accum -); ---Testcase 339: -create function cleast_accum(anycompatible, variadic anycompatiblearray) -returns anycompatible language sql as - 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; -ERROR: type anycompatible does not exist ---Testcase 340: -create aggregate cleast_agg(variadic items anycompatiblearray) ( - stype = anycompatible, sfunc = cleast_accum -); -ERROR: type anycompatiblearray does not exist --- variadic aggregates ---Testcase 341: -select least_agg((fields->>'q1')::int8,(fields->>'q2')::int8) from int8_tbl; - least_agg -------------------- - -4567890123456789 -(1 row) - ---Testcase 342: -select least_agg(variadic array[(fields->>'q1')::int8,(fields->>'q2')::int8]) from int8_tbl; - least_agg -------------------- - -4567890123456789 -(1 row) - ---Testcase 343: -select cleast_agg((fields->>'q1')::int8,(fields->>'q2')::int8) from int8_tbl; -ERROR: function cleast_agg(bigint, bigint) does not exist -LINE 1: select cleast_agg((fields->>'q1')::int8,(fields->>'q2')::int... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 344: -select cleast_agg(4.5,(fields->>'f1')::int4) from int4_tbl; -ERROR: function cleast_agg(numeric, integer) does not exist -LINE 1: select cleast_agg(4.5,(fields->>'f1')::int4) from int4_tbl; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 345: -select cleast_agg(variadic array[4.5,(fields->>'f1')::int4]) from int4_tbl; -ERROR: function cleast_agg(numeric[]) does not exist -LINE 1: select cleast_agg(variadic array[4.5,(fields->>'f1')::int4])... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 346: -select pg_typeof(cleast_agg(variadic array[4.5,(fields->>'f1')::int4])) from int4_tbl; -ERROR: function cleast_agg(numeric[]) does not exist -LINE 1: select pg_typeof(cleast_agg(variadic array[4.5,(fields->>'f1... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. ---Testcase 347: -drop aggregate least_agg(variadic items anyarray); ---Testcase 348: -drop function least_accum(anyelement, variadic anyarray); --- test aggregates with common transition functions share the same states -begin work; ---Testcase 349: -create type avg_state as (total bigint, count bigint); ---Testcase 350: -create or replace function avg_transfn(state avg_state, n int) returns avg_state as -$$ -declare new_state avg_state; -begin - raise notice 'avg_transfn called with %', n; - if state is null then - if n is not null then - new_state.total := n; - new_state.count := 1; - return new_state; - end if; - return null; - elsif n is not null then - state.total := state.total + n; - state.count := state.count + 1; - return state; - end if; - - return null; -end -$$ language plpgsql; ---Testcase 351: -create function avg_finalfn(state avg_state) returns int4 as -$$ -begin - if state is null then - return NULL; - else - return state.total / state.count; - end if; -end -$$ language plpgsql; ---Testcase 352: -create function sum_finalfn(state avg_state) returns int4 as -$$ -begin - if state is null then - return NULL; - else - return state.total; - end if; -end -$$ language plpgsql; ---Testcase 353: -create aggregate my_avg(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = avg_finalfn -); ---Testcase 354: -create aggregate my_sum(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = sum_finalfn -); --- aggregate state should be shared as aggs are the same. ---Testcase 355: -create foreign table my_avg1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 356: -select my_avg((fields->>'one')::int4),my_avg((fields->>'one')::int4) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_avg ---------+-------- - 2 | 2 -(1 row) - --- aggregate state should be shared as transfn is the same for both aggs. ---Testcase 357: -select my_avg((fields->>'one')::int4),my_sum((fields->>'one')::int4) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 4 -(1 row) - --- same as previous one, but with DISTINCT, which requires sorting the input. ---Testcase 358: -select my_avg(distinct (fields->>'one')::int4),my_sum(distinct (fields->>'one')::int4) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 4 -(1 row) - --- shouldn't share states due to the distinctness not matching. ---Testcase 359: -select my_avg(distinct (fields->>'one')::int4),my_sum((fields->>'one')::int4) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 4 -(1 row) - --- shouldn't share states due to the filter clause not matching. ---Testcase 360: -select my_avg((fields->>'one')::int4) filter (where (fields->>'one')::int4 > 1),my_sum((fields->>'one')::int4) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 3 | 4 -(1 row) - --- this should not share the state due to different input columns. ---Testcase 361: -create foreign table my_avg2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 362: -select my_avg((fields->>'one')::int4),my_sum((fields->>'two')::int4) from my_avg2; -NOTICE: avg_transfn called with 2 -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 4 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 6 -(1 row) - --- exercise cases where OSAs share state ---Testcase 363: -create foreign table percentile_cont1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 364: -select - percentile_cont(0.5) within group (order by (fields->>'a')::int), - percentile_disc(0.5) within group (order by (fields->>'a')::int) -from percentile_cont1; - percentile_cont | percentile_disc ------------------+----------------- - 4 | 3 -(1 row) - ---Testcase 365: -select - percentile_cont(0.25) within group (order by (fields->>'a')::int), - percentile_disc(0.5) within group (order by (fields->>'a')::int) -from percentile_cont1; - percentile_cont | percentile_disc ------------------+----------------- - 2.5 | 3 -(1 row) - --- these can't share state currently ---Testcase 366: -select - rank(4) within group (order by (fields->>'a')::int), - dense_rank(4) within group (order by (fields->>'a')::int) -from percentile_cont1; - rank | dense_rank -------+------------ - 3 | 3 -(1 row) - --- test that aggs with the same sfunc and initcond share the same agg state ---Testcase 367: -create aggregate my_sum_init(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = sum_finalfn, - initcond = '(10,0)' -); ---Testcase 368: -create aggregate my_avg_init(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = avg_finalfn, - initcond = '(10,0)' -); ---Testcase 369: -create aggregate my_avg_init2(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = avg_finalfn, - initcond = '(4,0)' -); --- state should be shared if INITCONDs are matching ---Testcase 370: -select my_sum_init((fields->>'one')::int4),my_avg_init((fields->>'one')::int4) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_sum_init | my_avg_init --------------+------------- - 14 | 7 -(1 row) - --- Varying INITCONDs should cause the states not to be shared. ---Testcase 371: -select my_sum_init((fields->>'one')::int4),my_avg_init2((fields->>'one')::int4) from my_avg1; -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 -NOTICE: avg_transfn called with 3 - my_sum_init | my_avg_init2 --------------+-------------- - 14 | 4 -(1 row) - -rollback; --- test aggregate state sharing to ensure it works if one aggregate has a --- finalfn and the other one has none. -begin work; ---Testcase 372: -create or replace function sum_transfn(state int4, n int4) returns int4 as -$$ -declare new_state int4; -begin - raise notice 'sum_transfn called with %', n; - if state is null then - if n is not null then - new_state := n; - return new_state; - end if; - return null; - elsif n is not null then - state := state + n; - return state; - end if; - - return null; -end -$$ language plpgsql; ---Testcase 373: -create function halfsum_finalfn(state int4) returns int4 as -$$ -begin - if state is null then - return NULL; - else - return state / 2; - end if; -end -$$ language plpgsql; ---Testcase 374: -create aggregate my_sum(int4) -( - stype = int4, - sfunc = sum_transfn -); ---Testcase 375: -create aggregate my_half_sum(int4) -( - stype = int4, - sfunc = sum_transfn, - finalfunc = halfsum_finalfn -); --- Agg state should be shared even though my_sum has no finalfn ---Testcase 376: -create foreign table my_sum1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 377: -select my_sum((fields->>'one')::int4),my_half_sum((fields->>'one')::int4) from my_sum1; -NOTICE: sum_transfn called with 1 -NOTICE: sum_transfn called with 2 -NOTICE: sum_transfn called with 3 -NOTICE: sum_transfn called with 4 - my_sum | my_half_sum ---------+------------- - 10 | 5 -(1 row) - -rollback; --- test that the aggregate transition logic correctly handles --- transition / combine functions returning NULL --- First test the case of a normal transition function returning NULL -BEGIN; ---Testcase 378: -CREATE FUNCTION balkifnull(int8, int4) -RETURNS int8 -STRICT -LANGUAGE plpgsql AS $$ -BEGIN - IF $1 IS NULL THEN - RAISE 'erroneously called with NULL argument'; - END IF; - RETURN NULL; -END$$; ---Testcase 379: -CREATE AGGREGATE balk(int4) -( - SFUNC = balkifnull(int8, int4), - STYPE = int8, - PARALLEL = SAFE, - INITCOND = '0' -); ---Testcase 380: -SELECT balk((fields->>'hundred')::int4) FROM tenk1; - balk ------- - -(1 row) - -ROLLBACK; --- Secondly test the case of a parallel aggregate combiner function --- returning NULL. For that use normal transition function, but a --- combiner function returning NULL. -BEGIN; ---Testcase 381: -CREATE FUNCTION balkifnull(int8, int8) -RETURNS int8 -PARALLEL SAFE -STRICT -LANGUAGE plpgsql AS $$ -BEGIN - IF $1 IS NULL THEN - RAISE 'erroneously called with NULL argument'; - END IF; - RETURN NULL; -END$$; ---Testcase 382: -CREATE AGGREGATE balk(int4) -( - SFUNC = int4_sum(int8, int4), - STYPE = int8, - COMBINEFUNC = balkifnull(int8, int8), - PARALLEL = SAFE, - INITCOND = '0' -); --- force use of parallelism --- ALTER TABLE tenk1 set (parallel_workers = 4); --- SET LOCAL parallel_setup_cost=0; --- SET LOCAL max_parallel_workers_per_gather=4; --- EXPLAIN (COSTS OFF) SELECT balk(hundred) FROM tenk1; --- SELECT balk(hundred) FROM tenk1; -ROLLBACK; --- test coverage for aggregate combine/serial/deserial functions -BEGIN; ---Testcase 383: -SET parallel_setup_cost = 0; ---Testcase 384: -SET parallel_tuple_cost = 0; ---Testcase 385: -SET min_parallel_table_scan_size = 0; ---Testcase 386: -SET max_parallel_workers_per_gather = 4; ---Testcase 387: -SET parallel_leader_participation = off; -ERROR: unrecognized configuration parameter "parallel_leader_participation" ---Testcase 388: -SET enable_indexonlyscan = off; -ERROR: current transaction is aborted, commands ignored until end of transaction block --- variance(int4) covers numeric_poly_combine --- sum(int8) covers int8_avg_combine --- regr_count(float8, float8) covers int8inc_float8_float8 and aggregates with > 1 arg ---Testcase 389: -EXPLAIN (COSTS OFF, VERBOSE) -SELECT variance((fields->>'unique1')::int4), sum((fields->>'unique1')::int8), regr_count((fields->>'unique1')::float8, (fields->>'unique1')::float8) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 390: -SELECT variance((fields->>'unique1')::int4), sum((fields->>'unique1')::int8), regr_count((fields->>'unique1')::float8, (fields->>'unique1')::float8) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; -ERROR: current transaction is aborted, commands ignored until end of transaction block --- variance(int8) covers numeric_combine --- avg(numeric) covers numeric_avg_combine ---Testcase 391: -EXPLAIN (COSTS OFF, VERBOSE) -SELECT variance((fields->>'unique1')::int8), avg((fields->>'unique1')::numeric) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 392: -SELECT variance((fields->>'unique1')::int8), avg((fields->>'unique1')::numeric) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; -ERROR: current transaction is aborted, commands ignored until end of transaction block -ROLLBACK; --- test coverage for dense_rank ---Testcase 393: -create foreign table dense_rank1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 394: -SELECT dense_rank((fields->>'x')::int) WITHIN GROUP (ORDER BY (fields->>'x')::int) FROM dense_rank1 GROUP BY (fields->>'x') ORDER BY 1; - dense_rank ------------- - 1 - 1 - 1 -(3 rows) - --- Ensure that the STRICT checks for aggregates does not take NULLness --- of ORDER BY columns into account. See bug report around --- 2a505161-2727-2473-7c46-591ed108ac52@email.cz ---Testcase 395: -SELECT min(x ORDER BY y) FROM (VALUES(1, NULL)) AS d(x,y); - min ------ - 1 -(1 row) - ---Testcase 396: -SELECT min(x ORDER BY y) FROM (VALUES(1, 2)) AS d(x,y); - min ------ - 1 -(1 row) - --- check collation-sensitive matching between grouping expressions ---Testcase 397: -select v||'a', case v||'a' when 'aa' then 1 else 0 end, count(*) - from unnest(array['a','b']) u(v) - group by v||'a' order by 1; - ?column? | case | count -----------+------+------- - aa | 1 | 1 - ba | 0 | 1 -(2 rows) - ---Testcase 398: -select v||'a', case when v||'a' = 'aa' then 1 else 0 end, count(*) - from unnest(array['a','b']) u(v) - group by v||'a' order by 1; - ?column? | case | count -----------+------+------- - aa | 1 | 1 - ba | 0 | 1 -(2 rows) - --- Make sure that generation of HashAggregate for uniqification purposes --- does not lead to array overflow due to unexpected duplicate hash keys --- see CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com ---Testcase 399: -explain (costs off) - select 1 from tenk1 - where ((fields->>'hundred')::int, (fields->>'thousand')::int) in (select (fields->>'twothousand')::int, (fields->>'twothousand')::int from onek); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ - Hash Join - Hash Cond: (((onek.fields ->> 'twothousand'::text))::integer = ((tenk1.fields ->> 'hundred'::text))::integer) - -> HashAggregate - Group Key: ((onek.fields ->> 'twothousand'::text))::integer, ((onek.fields ->> 'twothousand'::text))::integer - -> Foreign Scan on onek - -> Hash - -> Foreign Scan on tenk1 -(7 rows) - --- --- Hash Aggregation Spill tests --- ---Testcase 400: -set enable_sort=false; ---Testcase 401: -set work_mem='64kB'; ---Testcase 404: -select (fields->>'unique1')::int unique1, count(*), sum((fields->>'twothousand')::int) from tenk1 -group by fields->>'unique1' -having sum((fields->>'fivethous')::int) > 4975 -order by sum((fields->>'twothousand')::int); - unique1 | count | sum ----------+-------+------ - 4976 | 1 | 976 - 4977 | 1 | 977 - 4978 | 1 | 978 - 4979 | 1 | 979 - 4980 | 1 | 980 - 4981 | 1 | 981 - 4982 | 1 | 982 - 4983 | 1 | 983 - 4984 | 1 | 984 - 4985 | 1 | 985 - 4986 | 1 | 986 - 4987 | 1 | 987 - 4988 | 1 | 988 - 4989 | 1 | 989 - 4990 | 1 | 990 - 4991 | 1 | 991 - 4992 | 1 | 992 - 4993 | 1 | 993 - 4994 | 1 | 994 - 4995 | 1 | 995 - 4996 | 1 | 996 - 4997 | 1 | 997 - 4998 | 1 | 998 - 4999 | 1 | 999 - 9976 | 1 | 1976 - 9977 | 1 | 1977 - 9978 | 1 | 1978 - 9979 | 1 | 1979 - 9980 | 1 | 1980 - 9981 | 1 | 1981 - 9982 | 1 | 1982 - 9983 | 1 | 1983 - 9984 | 1 | 1984 - 9985 | 1 | 1985 - 9986 | 1 | 1986 - 9987 | 1 | 1987 - 9988 | 1 | 1988 - 9989 | 1 | 1989 - 9990 | 1 | 1990 - 9991 | 1 | 1991 - 9992 | 1 | 1992 - 9993 | 1 | 1993 - 9994 | 1 | 1994 - 9995 | 1 | 1995 - 9996 | 1 | 1996 - 9997 | 1 | 1997 - 9998 | 1 | 1998 - 9999 | 1 | 1999 -(48 rows) - ---Testcase 403: -set work_mem to default; ---Testcase 404: -set enable_sort to default; --- --- Compare results between plans using sorting and plans using hash --- aggregation. Force spilling in both cases by setting work_mem low. --- ---Testcase 405: -set work_mem='64kB'; ---Testcase 406: -create foreign table agg_data_2k(fields jsonb OPTIONS(fields 'true')) server influxdb_svr OPTIONS (schemaless 'true'); -create foreign table agg_data_2k_nsc (g int) server influxdb_svr OPTIONS (table 'agg_data_2k'); ---Testcase 407: -create foreign table agg_data_20k(fields jsonb OPTIONS(fields 'true')) server influxdb_svr OPTIONS (schemaless 'true'); -create foreign table agg_data_20k_nsc (g int) server influxdb_svr OPTIONS (table 'agg_data_20k'); ---Testcase 408: -create foreign table agg_group_1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -create foreign table agg_group_1_nsc (c1 int, c2 numeric, c3 int) server influxdb_svr OPTIONS (table 'agg_group_1'); ---Testcase 409: -create foreign table agg_group_2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -create foreign table agg_group_2_nsc (a int, c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_group_2'); ---Testcase 410: -create foreign table agg_group_3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -create foreign table agg_group_3_nsc (c1 numeric, c2 int4, c3 int) server influxdb_svr OPTIONS (table 'agg_group_3'); ---Testcase 411: -create foreign table agg_group_4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -create foreign table agg_group_4_nsc (c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_group_4'); ---Testcase 412: -create foreign table agg_hash_1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -create foreign table agg_hash_1_nsc (c1 int, c2 numeric, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_1'); ---Testcase 413: -create foreign table agg_hash_2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -create foreign table agg_hash_2_nsc (a int, c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_2'); ---Testcase 414: -create foreign table agg_hash_3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -create foreign table agg_hash_3_nsc (c1 numeric, c2 int4, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_3'); ---Testcase 415: -create foreign table agg_hash_4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -create foreign table agg_hash_4_nsc (c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_4'); ---Testcase 416: -insert into agg_data_2k_nsc select g from generate_series(0, 1999) g; ---analyze agg_data_2k; ---Testcase 417: -insert into agg_data_20k_nsc select g from generate_series(0, 19999) g; ---analyze agg_data_20k; --- Produce results with sorting. ---Testcase 418: -set enable_hashagg = false; ---Testcase 419: -set jit_above_cost = 0; -ERROR: unrecognized configuration parameter "jit_above_cost" ---Testcase 420: -explain (costs off) -select (fields->>'g')::int%10000 as c1, sum((fields->>'g')::numeric) as c2, count(*) as c3 - from agg_data_20k group by (fields->>'g')::int%10000; - QUERY PLAN ------------------------------------------------------------------ - GroupAggregate - Group Key: ((((fields ->> 'g'::text))::integer % 10000)) - -> Sort - Sort Key: ((((fields ->> 'g'::text))::integer % 10000)) - -> Foreign Scan on agg_data_20k -(5 rows) - ---Testcase 421: -insert into agg_group_1_nsc -select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 - from agg_data_20k_nsc group by g%10000; ---Testcase 422: -insert into agg_group_2_nsc -select * from - (values (100), (300), (500)) as r(a), - lateral ( - select (g/2)::numeric as c1, - array_agg(g::numeric) as c2, - count(*) as c3 - from agg_data_2k_nsc - where g < r.a - group by g/2) as s; ---Testcase 423: -set jit_above_cost to default; -ERROR: unrecognized configuration parameter "jit_above_cost" ---Testcase 424: -insert into agg_group_3_nsc -select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 - from agg_data_2k_nsc group by g/2; ---Testcase 425: -insert into agg_group_4_nsc -select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 - from agg_data_2k_nsc group by g/2; --- Produce results with hash aggregation ---Testcase 426: -set enable_hashagg = true; ---Testcase 427: -set enable_sort = false; ---Testcase 428: -set jit_above_cost = 0; -ERROR: unrecognized configuration parameter "jit_above_cost" ---Testcase 429: -explain (costs off) -select (fields->>'g')::int%10000 as c1, sum((fields->>'g')::numeric) as c2, count(*) as c3 - from agg_data_20k group by (fields->>'g')::int%10000; - QUERY PLAN ----------------------------------------------------------- - HashAggregate - Group Key: (((fields ->> 'g'::text))::integer % 10000) - -> Foreign Scan on agg_data_20k -(3 rows) - ---Testcase 430: -insert into agg_hash_1_nsc -select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 - from agg_data_20k_nsc group by g%10000; ---Testcase 431: -insert into agg_hash_2_nsc -select * from - (values (100), (300), (500)) as r(a), - lateral ( - select (g/2)::numeric as c1, - array_agg(g::numeric) as c2, - count(*) as c3 - from agg_data_2k_nsc - where g < r.a - group by g/2) as s; ---Testcase 432: -set jit_above_cost to default; -ERROR: unrecognized configuration parameter "jit_above_cost" ---Testcase 433: -insert into agg_hash_3_nsc -select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 - from agg_data_2k_nsc group by g/2; ---Testcase 434: -insert into agg_hash_4_nsc -select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 - from agg_data_2k_nsc group by g/2; ---Testcase 435: -set enable_sort = true; ---Testcase 436: -set work_mem to default; --- Compare group aggregation results to hash aggregation results ---Testcase 437: -(select * from agg_hash_1 except select * from agg_group_1) - union all -(select * from agg_group_1 except select * from agg_hash_1); - fields --------- -(0 rows) - ---Testcase 438: -(select * from agg_hash_2 except select * from agg_group_2) - union all -(select * from agg_group_2 except select * from agg_hash_2); - fields --------- -(0 rows) - ---Testcase 439: -(select * from agg_hash_3 except select * from agg_group_3) - union all -(select * from agg_group_3 except select * from agg_hash_3); - fields --------- -(0 rows) - ---Testcase 440: -(select * from agg_hash_4 except select * from agg_group_4) - union all -(select * from agg_group_4 except select * from agg_hash_4); - fields --------- -(0 rows) - ---Testcase 441: --- Clean up: -delete from agg_data_2k_nsc; -delete from agg_data_20k_nsc; -delete from agg_group_1_nsc; -delete from agg_group_2_nsc; -delete from agg_group_3_nsc; -delete from agg_group_4_nsc; -delete from agg_hash_1_nsc; -delete from agg_hash_2_nsc; -delete from agg_hash_3_nsc; -delete from agg_hash_4_nsc; -drop foreign table agg_data_2k; -drop foreign table agg_data_2k_nsc; -drop foreign table agg_data_20k; -drop foreign table agg_data_20k_nsc; -drop foreign table agg_group_1; -drop foreign table agg_group_1_nsc; ---Testcase 442: -drop foreign table agg_group_2; -drop foreign table agg_group_2_nsc; ---Testcase 443: -drop foreign table agg_group_3; -drop foreign table agg_group_3_nsc; ---Testcase 444: -drop foreign table agg_group_4; -drop foreign table agg_group_4_nsc; ---Testcase 445: -drop foreign table agg_hash_1; -drop foreign table agg_hash_1_nsc; ---Testcase 446: -drop foreign table agg_hash_2; -drop foreign table agg_hash_2_nsc; ---Testcase 447: -drop foreign table agg_hash_3; -drop foreign table agg_hash_3_nsc; ---Testcase 448: -drop foreign table agg_hash_4; -drop foreign table agg_hash_4_nsc; --- Clean up -DO $d$ -declare - l_rec record; -begin - for l_rec in (select foreign_table_schema, foreign_table_name - from information_schema.foreign_tables) loop - execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); - end loop; -end; -$d$; --- Clean up: -DROP AGGREGATE IF EXISTS newavg (int4); -DROP AGGREGATE IF EXISTS newsum (int4); -DROP AGGREGATE IF EXISTS newcnt (*); -DROP AGGREGATE IF EXISTS oldcnt (*); -DROP AGGREGATE IF EXISTS newcnt ("any"); -DROP AGGREGATE IF EXISTS sum2(int8,int8); -DROP FUNCTION IF EXISTS sum3(int8,int8,int8); -DROP AGGREGATE IF EXISTS aggfns(integer,integer,text); -DROP AGGREGATE IF EXISTS aggfstr(integer,integer,text); -DROP FUNCTION IF EXISTS aggfns_trans(aggtype[],integer,integer,text); -DROP FUNCTION IF EXISTS aggf_trans(aggtype[],integer,integer,text); -DROP TYPE IF EXISTS aggtype; -DROP AGGREGATE IF EXISTS test_percentile_disc(float8 ORDER BY anyelement); -DROP AGGREGATE IF EXISTS test_rank(VARIADIC "any" ORDER BY VARIADIC "any"); -DROP AGGREGATE IF EXISTS cleast_agg(variadic items anycompatiblearray); -NOTICE: type "anycompatiblearray" does not exist, skipping -DROP FUNCTION IF EXISTS cleast_accum(anycompatible, variadic anycompatiblearray); -NOTICE: type "anycompatible" does not exist, skipping ---Testcase 449: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 450: -DROP SERVER influxdb_svr CASCADE; ---Testcase 451: -DROP EXTENSION influxdb_fdw; diff --git a/expected/10.18/schemaless/extra/influxdb_fdw_post.out b/expected/10.18/schemaless/extra/influxdb_fdw_post.out deleted file mode 100644 index 7ea10c0..0000000 --- a/expected/10.18/schemaless/extra/influxdb_fdw_post.out +++ /dev/null @@ -1,9006 +0,0 @@ --- =================================================================== --- create FDW objects --- =================================================================== -\set ECHO none ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; ---Testcase 3: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 4: -CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); ---Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- =================================================================== --- create objects used through FDW influxdb server --- =================================================================== ---Testcase 8: -CREATE TYPE user_enum AS ENUM ('foo', 'bar', 'buz'); ---Testcase 9: -CREATE SCHEMA "S 1"; ---Testcase 10: -CREATE FOREIGN TABLE "S 1"."T 0" (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T0', tags 'c3', schemaless 'true'); -CREATE FOREIGN TABLE "S 1".s1t0 ( - "C 1" int NOT NULL, - c2 int NOT NULL, - c3 text, - time timestamp, - c6 varchar(10), - c7 char(10), - c8 text -) SERVER influxdb_svr OPTIONS (table 'T0', tags 'c3'); ---Testcase 11: -CREATE FOREIGN TABLE "S 1"."T 1" (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T1', tags 'c3', schemaless 'true'); -CREATE FOREIGN TABLE "S 1".s1t1 ( - "C 1" int NOT NULL, - c2 int NOT NULL, - c3 text, - time timestamp, - c6 varchar(10), - c7 char(10), - c8 text -) SERVER influxdb_svr OPTIONS (table 'T1', tags 'c3'); ---Testcase 12: -CREATE FOREIGN TABLE "S 1"."T 2" (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T2', tags 'c2', schemaless 'true'); -CREATE FOREIGN TABLE "S 1".s1t2 ( - c1 int NOT NULL, - c2 text -) SERVER influxdb_svr OPTIONS (table 'T2', tags 'c2'); ---Testcase 13: -CREATE FOREIGN TABLE "S 1"."T 3" (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3', schemaless 'true'); -CREATE FOREIGN TABLE "S 1".s1t3 ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text -) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); ---Testcase 14: -CREATE FOREIGN TABLE "S 1"."T 4" (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3', schemaless 'true'); -CREATE FOREIGN TABLE "S 1".s1t4 ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text -) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3'); --- Disable autovacuum for these tables to avoid unexpected effects of that ---ALTER TABLE "S 1"."T 1" SET (autovacuum_enabled = 'false'); ---ALTER TABLE "S 1"."T 2" SET (autovacuum_enabled = 'false'); ---ALTER TABLE "S 1"."T 3" SET (autovacuum_enabled = 'false'); ---ALTER TABLE "S 1"."T 4" SET (autovacuum_enabled = 'false'); ---Testcase 15: -INSERT INTO "S 1".s1t1 - SELECT id, - id % 10, - to_char(id, 'FM00000'), - '1970-01-01'::timestamp + ((id % 100) || ' days')::interval, - id % 10, - id % 10, - 'foo'::text - FROM generate_series(1, 1000) id; ---Testcase 16: -INSERT INTO "S 1".s1t2 - SELECT id, - 'AAA' || to_char(id, 'FM000') - FROM generate_series(1, 100) id; ---Testcase 17: -INSERT INTO "S 1".s1t3 - SELECT id, - id + 1, - 'AAA' || to_char(id, 'FM000') - FROM generate_series(1, 100) id; ---Testcase 18: -DELETE FROM "S 1".s1t3 WHERE c1 % 2 != 0; -- delete for outer join tests ---Testcase 19: -INSERT INTO "S 1".s1t4 - SELECT id, - id + 1, - 'AAA' || to_char(id, 'FM000') - FROM generate_series(1, 100) id; ---Testcase 20: -DELETE FROM "S 1".s1t4 WHERE c1 % 3 != 0; -- delete for outer join tests ---ANALYZE "S 1"."T 1"; ---ANALYZE "S 1"."T 2"; ---ANALYZE "S 1"."T 3"; ---ANALYZE "S 1"."T 4"; --- =================================================================== --- create foreign tables --- =================================================================== ---Testcase 21: -CREATE FOREIGN TABLE ft1 (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -CREATE FOREIGN TABLE ft1_nsc ( - c0 int, - c1 int NOT NULL, - c2 int NOT NULL, - c3 text, - time timestamp, - c6 varchar(10), - c7 char(10) default 'ft1', - c8 text -) SERVER influxdb_svr; -ALTER FOREIGN TABLE ft1_nsc DROP COLUMN c0; ---Testcase 22: -CREATE FOREIGN TABLE ft2 (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -CREATE FOREIGN TABLE ft2_nsc ( - c1 int NOT NULL, - c2 int NOT NULL, - cx int, - c3 text, - time timestamp, - c6 varchar(10), - c7 char(10) default 'ft2', - c8 text -) SERVER influxdb_svr; -ALTER FOREIGN TABLE ft2_nsc DROP COLUMN cx; ---Testcase 23: -CREATE FOREIGN TABLE ft4 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3', schemaless 'true'); -CREATE FOREIGN TABLE ft4_nsc ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text -) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); ---Testcase 24: -CREATE FOREIGN TABLE ft5 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3', schemaless 'true'); -CREATE FOREIGN TABLE ft5_nsc ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text -) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3'); ---Testcase 25: -CREATE FOREIGN TABLE ft6 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr2 OPTIONS (table 'T4', tags 'c3', schemaless 'true'); --- =================================================================== --- tests for validator --- =================================================================== --- requiressl and some other parameters are omitted because --- valid values for them depend on configure options -ALTER SERVER testserver1 OPTIONS ( - -- use_remote_estimate 'false', - -- updatable 'true', - -- fdw_startup_cost '123.456', - -- fdw_tuple_cost '0.123', - -- service 'value', - -- connect_timeout 'value', - dbname 'value', - host 'value', - -- hostaddr 'value', - port 'value' - --client_encoding 'value', - -- application_name 'value', - --fallback_application_name 'value', - -- keepalives 'value', - -- keepalives_idle 'value', - -- keepalives_interval 'value', - -- tcp_user_timeout 'value', - -- requiressl 'value', - -- sslcompression 'value', - -- sslmode 'value', - -- sslcert 'value', - -- sslkey 'value', - -- sslrootcert 'value', - -- sslcrl 'value', - --requirepeer 'value', - -- krbsrvname 'value', - -- gsslib 'value', - --replication 'value' -); --- influxdb_fdw does not support option extensions --- Error, invalid list syntax ---ALTER SERVER testserver1 OPTIONS (ADD extensions 'foo; bar'); --- OK but gets a warning ---ALTER SERVER testserver1 OPTIONS (ADD extensions 'foo, bar'); ---ALTER SERVER testserver1 OPTIONS (DROP extensions); -ALTER USER MAPPING FOR public SERVER testserver1 - OPTIONS (DROP user, DROP password); --- Attempt to add a valid option that's not allowed in a user mapping ---ALTER USER MAPPING FOR public SERVER testserver1 --- OPTIONS (ADD sslmode 'require'); --- But we can add valid ones fine ---ALTER USER MAPPING FOR public SERVER testserver1 --- OPTIONS (ADD sslpassword 'dummy'); --- Ensure valid options we haven't used in a user mapping yet are --- permitted to check validation. ---ALTER USER MAPPING FOR public SERVER testserver1 --- OPTIONS (ADD sslkey 'value', ADD sslcert 'value'); -ALTER FOREIGN TABLE ft1 OPTIONS (table 'T1', tags 'c3'); -ALTER FOREIGN TABLE ft1_nsc OPTIONS (table 'T1', tags 'c3'); -ALTER FOREIGN TABLE ft2 OPTIONS (table 'T1', tags 'c3'); -ALTER FOREIGN TABLE ft2_nsc OPTIONS (table 'T1', tags 'c3'); -ALTER FOREIGN TABLE ft1_nsc ALTER COLUMN c1 OPTIONS (column_name 'C 1'); -ALTER FOREIGN TABLE ft2_nsc ALTER COLUMN c1 OPTIONS (column_name 'C 1'); ---Testcase 26: -\det+ - List of foreign tables - Schema | Table | Server | FDW options | Description ---------+---------+---------------+----------------------------------------------+------------- - public | ft1 | influxdb_svr | (schemaless 'true', "table" 'T1', tags 'c3') | - public | ft1_nsc | influxdb_svr | ("table" 'T1', tags 'c3') | - public | ft2 | influxdb_svr | (schemaless 'true', "table" 'T1', tags 'c3') | - public | ft2_nsc | influxdb_svr | ("table" 'T1', tags 'c3') | - public | ft4 | influxdb_svr | ("table" 'T3', tags 'c3', schemaless 'true') | - public | ft4_nsc | influxdb_svr | ("table" 'T3', tags 'c3') | - public | ft5 | influxdb_svr | ("table" 'T4', tags 'c3', schemaless 'true') | - public | ft5_nsc | influxdb_svr | ("table" 'T4', tags 'c3') | - public | ft6 | influxdb_svr2 | ("table" 'T4', tags 'c3', schemaless 'true') | -(9 rows) - --- Test that alteration of server options causes reconnection --- Remote's errors might be non-English, so hide them to ensure stable results -\set VERBOSITY terse ---Testcase 27: -SELECT tags->>'c3' c3, time FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int LIMIT 1; -- should work - c3 | time --------+-------------------------- - 00001 | Fri Jan 02 00:00:00 1970 -(1 row) - -ALTER SERVER influxdb_svr OPTIONS (SET dbname 'no such database'); ---Testcase 28: -SELECT tags->>'c3' c3, time FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int LIMIT 1; -- should fail -ERROR: influxdb_fdw : database not found: no such database -DO $d$ - BEGIN - EXECUTE $$ALTER SERVER influxdb_svr - OPTIONS (SET dbname 'postdb')$$; - END; -$d$; ---Testcase 29: -SELECT tags->>'c3' c3, time FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int LIMIT 1; -- should work again - c3 | time --------+-------------------------- - 00001 | Fri Jan 02 00:00:00 1970 -(1 row) - -\set VERBOSITY default --- =================================================================== --- simple queries --- =================================================================== --- single table without alias ---Testcase 30: -EXPLAIN (COSTS OFF) SELECT * FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int OFFSET 100 LIMIT 10; - QUERY PLAN ----------------------------------------------------------------------------------- - Limit - -> Sort - Sort Key: ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer) - -> Foreign Scan on ft1 -(4 rows) - ---Testcase 31: -SELECT * FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int OFFSET 100 LIMIT 10; - time | tags | fields ---------------------------+-----------------+----------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00101"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "101"} - Sat Jan 03 00:00:00 1970 | {"c3": "00102"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "102"} - Sun Jan 04 00:00:00 1970 | {"c3": "00103"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "103"} - Mon Jan 05 00:00:00 1970 | {"c3": "00104"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "104"} - Tue Jan 06 00:00:00 1970 | {"c3": "00105"} | {"c2": "5", "c6": "5", "c7": "5 ", "c8": "foo", "C 1": "105"} - Wed Jan 07 00:00:00 1970 | {"c3": "00106"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "106"} - Thu Jan 08 00:00:00 1970 | {"c3": "00107"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "107"} - Fri Jan 09 00:00:00 1970 | {"c3": "00108"} | {"c2": "8", "c6": "8", "c7": "8 ", "c8": "foo", "C 1": "108"} - Sat Jan 10 00:00:00 1970 | {"c3": "00109"} | {"c2": "9", "c6": "9", "c7": "9 ", "c8": "foo", "C 1": "109"} - Sun Jan 11 00:00:00 1970 | {"c3": "00110"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "110"} -(10 rows) - --- single table with alias - also test that tableoid sort is not pushed to remote side ---Testcase 32: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int, t1.tableoid OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------- - Limit - Output: "time", tags, fields, ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer), tableoid - -> Sort - Output: "time", tags, fields, ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer), tableoid - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer), t1.tableoid - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields, (tags ->> 'c3'::text), ((fields ->> 'C 1'::text))::integer, tableoid - InfluxDB query: SELECT * FROM "T1" -(8 rows) - ---Testcase 33: -SELECT * FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int, t1.tableoid OFFSET 100 LIMIT 10; - time | tags | fields ---------------------------+-----------------+----------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00101"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "101"} - Sat Jan 03 00:00:00 1970 | {"c3": "00102"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "102"} - Sun Jan 04 00:00:00 1970 | {"c3": "00103"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "103"} - Mon Jan 05 00:00:00 1970 | {"c3": "00104"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "104"} - Tue Jan 06 00:00:00 1970 | {"c3": "00105"} | {"c2": "5", "c6": "5", "c7": "5 ", "c8": "foo", "C 1": "105"} - Wed Jan 07 00:00:00 1970 | {"c3": "00106"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "106"} - Thu Jan 08 00:00:00 1970 | {"c3": "00107"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "107"} - Fri Jan 09 00:00:00 1970 | {"c3": "00108"} | {"c2": "8", "c6": "8", "c7": "8 ", "c8": "foo", "C 1": "108"} - Sat Jan 10 00:00:00 1970 | {"c3": "00109"} | {"c2": "9", "c6": "9", "c7": "9 ", "c8": "foo", "C 1": "109"} - Sun Jan 11 00:00:00 1970 | {"c3": "00110"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "110"} -(10 rows) - --- whole-row reference ---Testcase 34: -EXPLAIN (VERBOSE, COSTS OFF) SELECT t1 FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; - QUERY PLAN ----------------------------------------------------------------------------------------- - Limit - Output: t1.*, ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer) - -> Sort - Output: t1.*, ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer) - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.*, (tags ->> 'c3'::text), ((fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(8 rows) - ---Testcase 35: -SELECT t1 FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; - t1 ------------------------------------------------------------------------------------------------------------------------------------------------- - ("Fri Jan 02 00:00:00 1970","{""c3"": ""00101""}","{""c2"": ""1"", ""c6"": ""1"", ""c7"": ""1 "", ""c8"": ""foo"", ""C 1"": ""101""}") - ("Sat Jan 03 00:00:00 1970","{""c3"": ""00102""}","{""c2"": ""2"", ""c6"": ""2"", ""c7"": ""2 "", ""c8"": ""foo"", ""C 1"": ""102""}") - ("Sun Jan 04 00:00:00 1970","{""c3"": ""00103""}","{""c2"": ""3"", ""c6"": ""3"", ""c7"": ""3 "", ""c8"": ""foo"", ""C 1"": ""103""}") - ("Mon Jan 05 00:00:00 1970","{""c3"": ""00104""}","{""c2"": ""4"", ""c6"": ""4"", ""c7"": ""4 "", ""c8"": ""foo"", ""C 1"": ""104""}") - ("Tue Jan 06 00:00:00 1970","{""c3"": ""00105""}","{""c2"": ""5"", ""c6"": ""5"", ""c7"": ""5 "", ""c8"": ""foo"", ""C 1"": ""105""}") - ("Wed Jan 07 00:00:00 1970","{""c3"": ""00106""}","{""c2"": ""6"", ""c6"": ""6"", ""c7"": ""6 "", ""c8"": ""foo"", ""C 1"": ""106""}") - ("Thu Jan 08 00:00:00 1970","{""c3"": ""00107""}","{""c2"": ""7"", ""c6"": ""7"", ""c7"": ""7 "", ""c8"": ""foo"", ""C 1"": ""107""}") - ("Fri Jan 09 00:00:00 1970","{""c3"": ""00108""}","{""c2"": ""8"", ""c6"": ""8"", ""c7"": ""8 "", ""c8"": ""foo"", ""C 1"": ""108""}") - ("Sat Jan 10 00:00:00 1970","{""c3"": ""00109""}","{""c2"": ""9"", ""c6"": ""9"", ""c7"": ""9 "", ""c8"": ""foo"", ""C 1"": ""109""}") - ("Sun Jan 11 00:00:00 1970","{""c3"": ""00110""}","{""c2"": ""0"", ""c6"": ""0"", ""c7"": ""0 "", ""c8"": ""foo"", ""C 1"": ""110""}") -(10 rows) - --- empty result ---Testcase 36: -SELECT * FROM ft1 WHERE false; - time | tags | fields -------+------+-------- -(0 rows) - --- with WHERE clause ---Testcase 37: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 101 AND t1.fields->>'c6' = '1' AND t1.fields->>'c7' >= '1'; - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: ((t1.fields ->> 'c7'::text) >= '1'::text) - InfluxDB query: SELECT * FROM "T1" WHERE (("c6" = '1')) AND (("C 1" = 101)) -(4 rows) - ---Testcase 38: -SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 101 AND t1.fields->>'c6' = '1' AND t1.fields->>'c7' >= '1'; - time | tags | fields ---------------------------+-----------------+----------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00101"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "101"} -(1 row) - --- with FOR UPDATE/SHARE ---Testcase 39: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 101 FOR UPDATE; - QUERY PLAN ------------------------------------------------------------------- - LockRows - Output: "time", tags, fields, t1.* - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields, t1.* - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 101)) -(5 rows) - ---Testcase 40: -SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 101 FOR UPDATE; - time | tags | fields ---------------------------+-----------------+----------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00101"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "101"} -(1 row) - ---Testcase 41: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 102 FOR SHARE; - QUERY PLAN ------------------------------------------------------------------- - LockRows - Output: "time", tags, fields, t1.* - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields, t1.* - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 102)) -(5 rows) - ---Testcase 42: -SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 102 FOR SHARE; - time | tags | fields ---------------------------+-----------------+----------------------------------------------------------------------- - Sat Jan 03 00:00:00 1970 | {"c3": "00102"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "102"} -(1 row) - --- aggregate ---Testcase 43: -SELECT COUNT(*) FROM ft1 t1; - count -------- - 1000 -(1 row) - --- subquery ---Testcase 44: -SELECT * FROM ft1 t1 WHERE t1.tags->>'c3' IN (SELECT tags->>'c3' FROM ft2 t2 WHERE (fields->>'C 1')::int <= 10) ORDER BY (fields->>'C 1')::int; - time | tags | fields ---------------------------+-----------------+---------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} - Sat Jan 03 00:00:00 1970 | {"c3": "00002"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "2"} - Sun Jan 04 00:00:00 1970 | {"c3": "00003"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "3"} - Mon Jan 05 00:00:00 1970 | {"c3": "00004"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "4"} - Tue Jan 06 00:00:00 1970 | {"c3": "00005"} | {"c2": "5", "c6": "5", "c7": "5 ", "c8": "foo", "C 1": "5"} - Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} - Thu Jan 08 00:00:00 1970 | {"c3": "00007"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "7"} - Fri Jan 09 00:00:00 1970 | {"c3": "00008"} | {"c2": "8", "c6": "8", "c7": "8 ", "c8": "foo", "C 1": "8"} - Sat Jan 10 00:00:00 1970 | {"c3": "00009"} | {"c2": "9", "c6": "9", "c7": "9 ", "c8": "foo", "C 1": "9"} - Sun Jan 11 00:00:00 1970 | {"c3": "00010"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "10"} -(10 rows) - --- subquery+MAX ---Testcase 45: -SELECT * FROM ft1 t1 WHERE t1.tags->>'c3' = (SELECT MAX(tags->>'c3') FROM ft2 t2) ORDER BY (fields->>'C 1')::int; - time | tags | fields ---------------------------+-----------------+------------------------------------------------------------------------ - Thu Jan 01 00:00:00 1970 | {"c3": "01000"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "1000"} -(1 row) - --- used in CTE ---Testcase 46: -WITH t1 AS (SELECT * FROM ft1 WHERE (fields->>'C 1')::int <= 10) SELECT (t2.fields->>'C 1')::int c1, (t2.fields->>'c2')::int c2, t2.tags->>'c3' c3, t2.time FROM t1, ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'C 1')::int ORDER BY (t1.fields->>'C 1')::int; - c1 | c2 | c3 | time -----+----+-------+-------------------------- - 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 - 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 - 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 - 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 - 5 | 5 | 00005 | Tue Jan 06 00:00:00 1970 - 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 - 7 | 7 | 00007 | Thu Jan 08 00:00:00 1970 - 8 | 8 | 00008 | Fri Jan 09 00:00:00 1970 - 9 | 9 | 00009 | Sat Jan 10 00:00:00 1970 - 10 | 0 | 00010 | Sun Jan 11 00:00:00 1970 -(10 rows) - --- fixed values ---Testcase 47: -SELECT 'fixed', NULL FROM ft1 t1 WHERE (fields->>'C 1')::int = 1; - ?column? | ?column? -----------+---------- - fixed | -(1 row) - --- Test forcing the remote server to produce sorted data for a merge join. -SET enable_hashjoin TO false; -SET enable_nestloop TO false; --- inner join; expressions in the clauses appear in the equivalence class list ---Testcase 48: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------ - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t1 - Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on "S 1"."T 1" t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(17 rows) - ---Testcase 49: -SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; - c1 | C 1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- outer join; expressions in the clauses do not appear in equivalence class --- list but no output change as compared to the previous query ---Testcase 50: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------ - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - -> Merge Left Join - Output: (((t1.fields ->> 'C 1'::text))::integer), ((t2.fields ->> 'C 1'::text))::integer - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t1 - Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on "S 1"."T 1" t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(17 rows) - ---Testcase 51: -SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; - c1 | C 1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- A join between 2 foreign tables. ORDER BY clause is added to the --- foreign join so that the other table can be joined using merge join strategy. ---Testcase 52: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer) - -> Merge Left Join - Output: (((t1.fields ->> 'C 1'::text))::integer) - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = ((t3.fields ->> 'C 1'::text))::integer) - -> Sort - Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on "S 1"."T 1" t1 - Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t3.fields - -> Merge Join - Output: t3.fields - Merge Cond: ((((t2.fields ->> 'C 1'::text))::integer) = (((t3.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t3.fields, (((t3.fields ->> 'C 1'::text))::integer) - Sort Key: (((t3.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t3 - Output: t3.fields, ((t3.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(28 rows) - ---Testcase 53: -SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; - C 1 ------ - 101 - 102 - 103 - 104 - 105 - 106 - 107 - 108 - 109 - 110 -(10 rows) - --- Test similar to above, except that the full join prevents any equivalence --- classes from being merged. This produces single relation equivalence classes --- included in join restrictions. ---Testcase 54: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (((t3.fields ->> 'C 1'::text))::integer) - -> Merge Left Join - Output: (((t1.fields ->> 'C 1'::text))::integer), ((t2.fields ->> 'C 1'::text))::integer, ((t3.fields ->> 'C 1'::text))::integer - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = ((t3.fields ->> 'C 1'::text))::integer) - -> Sort - Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on "S 1"."T 1" t1 - Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t3.fields, t2.fields - -> Merge Left Join - Output: t3.fields, t2.fields - Merge Cond: ((((t3.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t3.fields, (((t3.fields ->> 'C 1'::text))::integer) - Sort Key: (((t3.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t3 - Output: t3.fields, ((t3.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(28 rows) - ---Testcase 55: -SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; - C 1 | c1 | c1 ------+-----+----- - 101 | 101 | 101 - 102 | 102 | 102 - 103 | 103 | 103 - 104 | 104 | 104 - 105 | 105 | 105 - 106 | 106 | 106 - 107 | 107 | 107 - 108 | 108 | 108 - 109 | 109 | 109 - 110 | 110 | 110 -(10 rows) - --- Test similar to above with all full outer joins ---Testcase 56: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (((t3.fields ->> 'C 1'::text))::integer) - -> Merge Full Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'C 1'::text))::integer, ((t3.fields ->> 'C 1'::text))::integer - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t3.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on "S 1"."T 1" t1 - Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, t3.fields, (((t3.fields ->> 'C 1'::text))::integer) - Sort Key: (((t3.fields ->> 'C 1'::text))::integer) - -> Merge Full Join - Output: t2.fields, t3.fields, ((t3.fields ->> 'C 1'::text))::integer - Merge Cond: ((((t2.fields ->> 'C 1'::text))::integer) = (((t3.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t3.fields, (((t3.fields ->> 'C 1'::text))::integer) - Sort Key: (((t3.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t3 - Output: t3.fields, ((t3.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(29 rows) - ---Testcase 57: -SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; - C 1 | c1 | c1 ------+-----+----- - 101 | 101 | 101 - 102 | 102 | 102 - 103 | 103 | 103 - 104 | 104 | 104 - 105 | 105 | 105 - 106 | 106 | 106 - 107 | 107 | 107 - 108 | 108 | 108 - 109 | 109 | 109 - 110 | 110 | 110 -(10 rows) - -RESET enable_hashjoin; -RESET enable_nestloop; --- =================================================================== --- WHERE with remotely-executable conditions --- =================================================================== ---Testcase 58: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 1; -- Var, OpExpr(b), Const - QUERY PLAN ----------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - ---Testcase 59: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 100 AND (t1.fields->>'c2')::int = 0; -- BoolExpr - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 100)) AND (("c2" = 0)) -(3 rows) - ---Testcase 60: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int IS NULL; -- NullTest - QUERY PLAN ------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (((t1.fields ->> 'C 1'::text))::integer IS NULL) - InfluxDB query: SELECT * FROM "T1" -(4 rows) - ---Testcase 61: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int IS NOT NULL; -- NullTest - QUERY PLAN ----------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (((t1.fields ->> 'C 1'::text))::integer IS NOT NULL) - InfluxDB query: SELECT * FROM "T1" -(4 rows) - ---Testcase 62: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE round(abs((t1.fields->>'C 1')::int), 0) = 1; -- FuncExpr - QUERY PLAN ---------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (round((abs(((t1.fields ->> 'C 1'::text))::integer))::numeric, 0) = '1'::numeric) - InfluxDB query: SELECT * FROM "T1" -(4 rows) - ---Testcase 63: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = -(t1.fields->>'C 1')::int; -- OpExpr(l) - QUERY PLAN ------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = (- "C 1"))) -(3 rows) - ---Testcase 64: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE 1 = (t1.fields->>'C 1')::int!; -- OpExpr(r) - QUERY PLAN ---------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: ('1'::numeric = ((((t1.fields ->> 'C 1'::text))::integer)::bigint !)) - InfluxDB query: SELECT * FROM "T1" -(4 rows) - ---Testcase 65: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE ((t1.fields->>'C 1')::int IS NOT NULL) IS DISTINCT FROM ((t1.fields->>'C 1')::int IS NOT NULL); -- DistinctExpr - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: ((((t1.fields ->> 'C 1'::text))::integer IS NOT NULL) IS DISTINCT FROM (((t1.fields ->> 'C 1'::text))::integer IS NOT NULL)) - InfluxDB query: SELECT * FROM "T1" -(4 rows) - ---Testcase 66: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = ANY(ARRAY[(fields->>'c2')::int, 1, (t1.fields->>'C 1')::int + 0]); -- ScalarArrayOpExpr - QUERY PLAN ------------------------------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = "c2") OR ("C 1" = 1) OR ("C 1" = ("C 1" + 0))) -(3 rows) - ---Testcase 67: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (ARRAY[(t1.fields->>'C 1')::int,(fields->>'c2')::int,3])[1]; -- SubscriptingRef - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (((t1.fields ->> 'C 1'::text))::integer = (ARRAY[((t1.fields ->> 'C 1'::text))::integer, ((t1.fields ->> 'c2'::text))::integer, 3])[1]) - InfluxDB query: SELECT * FROM "T1" -(4 rows) - ---Testcase 68: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE fields->>'c6' = E'foo''s\\bar'; -- check special chars - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c6" = 'foo''s\\bar')) -(3 rows) - ---Testcase 69: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE fields->>'c8' = 'foo'; -- can't be sent to remote - QUERY PLAN -------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) -(3 rows) - --- parameterized remote path for foreign table ---Testcase 70: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM "S 1"."T 1" a, ft2 b WHERE (a.fields->>'C 1')::int = 47 AND (b.fields->>'C 1')::int = (a.fields->>'c2')::int; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Hash Join - Output: a."time", a.tags, a.fields, b."time", b.tags, b.fields - Hash Cond: (((b.fields ->> 'C 1'::text))::integer = ((a.fields ->> 'c2'::text))::integer) - -> Foreign Scan on public.ft2 b - Output: b."time", b.tags, b.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: a."time", a.tags, a.fields - -> Foreign Scan on "S 1"."T 1" a - Output: a."time", a.tags, a.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 47)) -(11 rows) - ---Testcase 71: -SELECT * FROM ft2 a, ft2 b WHERE (a.fields->>'C 1')::int = 47 AND (b.fields->>'C 1')::int = (a.fields->>'c2')::int; - time | tags | fields | time | tags | fields ---------------------------+-----------------+----------------------------------------------------------------------+--------------------------+-----------------+--------------------------------------------------------------------- - Tue Feb 17 00:00:00 1970 | {"c3": "00047"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "47"} | Thu Jan 08 00:00:00 1970 | {"c3": "00007"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "7"} -(1 row) - --- check both safe and unsafe join conditions ---Testcase 72: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM ft2 a, ft2 b - WHERE (a.fields->>'c2')::int = 6 AND (b.fields->>'C 1')::int = (a.fields->>'C 1')::int AND a.fields->>'c8' = 'foo' AND b.fields->>'c7' = upper(a.fields->>'c7'); - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Hash Join - Output: a."time", a.tags, a.fields, b."time", b.tags, b.fields - Hash Cond: ((((b.fields ->> 'C 1'::text))::integer = ((a.fields ->> 'C 1'::text))::integer) AND ((b.fields ->> 'c7'::text) = upper((a.fields ->> 'c7'::text)))) - -> Foreign Scan on public.ft2 b - Output: b."time", b.tags, b.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: a."time", a.tags, a.fields - -> Foreign Scan on public.ft2 a - Output: a."time", a.tags, a.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("c2" = 6)) -(11 rows) - ---Testcase 73: -SELECT * FROM ft2 a, ft2 b -WHERE (a.fields->>'c2')::int = 6 AND (b.fields->>'C 1')::int = (a.fields->>'C 1')::int AND a.fields->>'c8' = 'foo' AND b.fields->>'c7' = upper(a.fields->>'c7') ORDER BY (a.fields->>'C 1')::int; - time | tags | fields | time | tags | fields ---------------------------+-----------------+-----------------------------------------------------------------------+--------------------------+-----------------+----------------------------------------------------------------------- - Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} | Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} - Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} | Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} - Tue Jan 27 00:00:00 1970 | {"c3": "00026"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "26"} | Tue Jan 27 00:00:00 1970 | {"c3": "00026"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "26"} - Fri Feb 06 00:00:00 1970 | {"c3": "00036"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "36"} | Fri Feb 06 00:00:00 1970 | {"c3": "00036"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "36"} - Mon Feb 16 00:00:00 1970 | {"c3": "00046"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "46"} | Mon Feb 16 00:00:00 1970 | {"c3": "00046"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "46"} - Thu Feb 26 00:00:00 1970 | {"c3": "00056"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "56"} | Thu Feb 26 00:00:00 1970 | {"c3": "00056"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "56"} - Sun Mar 08 00:00:00 1970 | {"c3": "00066"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "66"} | Sun Mar 08 00:00:00 1970 | {"c3": "00066"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "66"} - Wed Mar 18 00:00:00 1970 | {"c3": "00076"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "76"} | Wed Mar 18 00:00:00 1970 | {"c3": "00076"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "76"} - Sat Mar 28 00:00:00 1970 | {"c3": "00086"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "86"} | Sat Mar 28 00:00:00 1970 | {"c3": "00086"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "86"} - Tue Apr 07 00:00:00 1970 | {"c3": "00096"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "96"} | Tue Apr 07 00:00:00 1970 | {"c3": "00096"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "96"} - Wed Jan 07 00:00:00 1970 | {"c3": "00106"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "106"} | Wed Jan 07 00:00:00 1970 | {"c3": "00106"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "106"} - Sat Jan 17 00:00:00 1970 | {"c3": "00116"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "116"} | Sat Jan 17 00:00:00 1970 | {"c3": "00116"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "116"} - Tue Jan 27 00:00:00 1970 | {"c3": "00126"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "126"} | Tue Jan 27 00:00:00 1970 | {"c3": "00126"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "126"} - Fri Feb 06 00:00:00 1970 | {"c3": "00136"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "136"} | Fri Feb 06 00:00:00 1970 | {"c3": "00136"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "136"} - Mon Feb 16 00:00:00 1970 | {"c3": "00146"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "146"} | Mon Feb 16 00:00:00 1970 | {"c3": "00146"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "146"} - Thu Feb 26 00:00:00 1970 | {"c3": "00156"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "156"} | Thu Feb 26 00:00:00 1970 | {"c3": "00156"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "156"} - Sun Mar 08 00:00:00 1970 | {"c3": "00166"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "166"} | Sun Mar 08 00:00:00 1970 | {"c3": "00166"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "166"} - Wed Mar 18 00:00:00 1970 | {"c3": "00176"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "176"} | Wed Mar 18 00:00:00 1970 | {"c3": "00176"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "176"} - Sat Mar 28 00:00:00 1970 | {"c3": "00186"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "186"} | Sat Mar 28 00:00:00 1970 | {"c3": "00186"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "186"} - Tue Apr 07 00:00:00 1970 | {"c3": "00196"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "196"} | Tue Apr 07 00:00:00 1970 | {"c3": "00196"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "196"} - Wed Jan 07 00:00:00 1970 | {"c3": "00206"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "206"} | Wed Jan 07 00:00:00 1970 | {"c3": "00206"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "206"} - Sat Jan 17 00:00:00 1970 | {"c3": "00216"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "216"} | Sat Jan 17 00:00:00 1970 | {"c3": "00216"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "216"} - Tue Jan 27 00:00:00 1970 | {"c3": "00226"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "226"} | Tue Jan 27 00:00:00 1970 | {"c3": "00226"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "226"} - Fri Feb 06 00:00:00 1970 | {"c3": "00236"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "236"} | Fri Feb 06 00:00:00 1970 | {"c3": "00236"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "236"} - Mon Feb 16 00:00:00 1970 | {"c3": "00246"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "246"} | Mon Feb 16 00:00:00 1970 | {"c3": "00246"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "246"} - Thu Feb 26 00:00:00 1970 | {"c3": "00256"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "256"} | Thu Feb 26 00:00:00 1970 | {"c3": "00256"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "256"} - Sun Mar 08 00:00:00 1970 | {"c3": "00266"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "266"} | Sun Mar 08 00:00:00 1970 | {"c3": "00266"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "266"} - Wed Mar 18 00:00:00 1970 | {"c3": "00276"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "276"} | Wed Mar 18 00:00:00 1970 | {"c3": "00276"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "276"} - Sat Mar 28 00:00:00 1970 | {"c3": "00286"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "286"} | Sat Mar 28 00:00:00 1970 | {"c3": "00286"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "286"} - Tue Apr 07 00:00:00 1970 | {"c3": "00296"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "296"} | Tue Apr 07 00:00:00 1970 | {"c3": "00296"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "296"} - Wed Jan 07 00:00:00 1970 | {"c3": "00306"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "306"} | Wed Jan 07 00:00:00 1970 | {"c3": "00306"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "306"} - Sat Jan 17 00:00:00 1970 | {"c3": "00316"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "316"} | Sat Jan 17 00:00:00 1970 | {"c3": "00316"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "316"} - Tue Jan 27 00:00:00 1970 | {"c3": "00326"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "326"} | Tue Jan 27 00:00:00 1970 | {"c3": "00326"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "326"} - Fri Feb 06 00:00:00 1970 | {"c3": "00336"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "336"} | Fri Feb 06 00:00:00 1970 | {"c3": "00336"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "336"} - Mon Feb 16 00:00:00 1970 | {"c3": "00346"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "346"} | Mon Feb 16 00:00:00 1970 | {"c3": "00346"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "346"} - Thu Feb 26 00:00:00 1970 | {"c3": "00356"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "356"} | Thu Feb 26 00:00:00 1970 | {"c3": "00356"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "356"} - Sun Mar 08 00:00:00 1970 | {"c3": "00366"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "366"} | Sun Mar 08 00:00:00 1970 | {"c3": "00366"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "366"} - Wed Mar 18 00:00:00 1970 | {"c3": "00376"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "376"} | Wed Mar 18 00:00:00 1970 | {"c3": "00376"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "376"} - Sat Mar 28 00:00:00 1970 | {"c3": "00386"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "386"} | Sat Mar 28 00:00:00 1970 | {"c3": "00386"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "386"} - Tue Apr 07 00:00:00 1970 | {"c3": "00396"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "396"} | Tue Apr 07 00:00:00 1970 | {"c3": "00396"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "396"} - Wed Jan 07 00:00:00 1970 | {"c3": "00406"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "406"} | Wed Jan 07 00:00:00 1970 | {"c3": "00406"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "406"} - Sat Jan 17 00:00:00 1970 | {"c3": "00416"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "416"} | Sat Jan 17 00:00:00 1970 | {"c3": "00416"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "416"} - Tue Jan 27 00:00:00 1970 | {"c3": "00426"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "426"} | Tue Jan 27 00:00:00 1970 | {"c3": "00426"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "426"} - Fri Feb 06 00:00:00 1970 | {"c3": "00436"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "436"} | Fri Feb 06 00:00:00 1970 | {"c3": "00436"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "436"} - Mon Feb 16 00:00:00 1970 | {"c3": "00446"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "446"} | Mon Feb 16 00:00:00 1970 | {"c3": "00446"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "446"} - Thu Feb 26 00:00:00 1970 | {"c3": "00456"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "456"} | Thu Feb 26 00:00:00 1970 | {"c3": "00456"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "456"} - Sun Mar 08 00:00:00 1970 | {"c3": "00466"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "466"} | Sun Mar 08 00:00:00 1970 | {"c3": "00466"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "466"} - Wed Mar 18 00:00:00 1970 | {"c3": "00476"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "476"} | Wed Mar 18 00:00:00 1970 | {"c3": "00476"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "476"} - Sat Mar 28 00:00:00 1970 | {"c3": "00486"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "486"} | Sat Mar 28 00:00:00 1970 | {"c3": "00486"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "486"} - Tue Apr 07 00:00:00 1970 | {"c3": "00496"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "496"} | Tue Apr 07 00:00:00 1970 | {"c3": "00496"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "496"} - Wed Jan 07 00:00:00 1970 | {"c3": "00506"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "506"} | Wed Jan 07 00:00:00 1970 | {"c3": "00506"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "506"} - Sat Jan 17 00:00:00 1970 | {"c3": "00516"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "516"} | Sat Jan 17 00:00:00 1970 | {"c3": "00516"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "516"} - Tue Jan 27 00:00:00 1970 | {"c3": "00526"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "526"} | Tue Jan 27 00:00:00 1970 | {"c3": "00526"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "526"} - Fri Feb 06 00:00:00 1970 | {"c3": "00536"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "536"} | Fri Feb 06 00:00:00 1970 | {"c3": "00536"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "536"} - Mon Feb 16 00:00:00 1970 | {"c3": "00546"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "546"} | Mon Feb 16 00:00:00 1970 | {"c3": "00546"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "546"} - Thu Feb 26 00:00:00 1970 | {"c3": "00556"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "556"} | Thu Feb 26 00:00:00 1970 | {"c3": "00556"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "556"} - Sun Mar 08 00:00:00 1970 | {"c3": "00566"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "566"} | Sun Mar 08 00:00:00 1970 | {"c3": "00566"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "566"} - Wed Mar 18 00:00:00 1970 | {"c3": "00576"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "576"} | Wed Mar 18 00:00:00 1970 | {"c3": "00576"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "576"} - Sat Mar 28 00:00:00 1970 | {"c3": "00586"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "586"} | Sat Mar 28 00:00:00 1970 | {"c3": "00586"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "586"} - Tue Apr 07 00:00:00 1970 | {"c3": "00596"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "596"} | Tue Apr 07 00:00:00 1970 | {"c3": "00596"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "596"} - Wed Jan 07 00:00:00 1970 | {"c3": "00606"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "606"} | Wed Jan 07 00:00:00 1970 | {"c3": "00606"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "606"} - Sat Jan 17 00:00:00 1970 | {"c3": "00616"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "616"} | Sat Jan 17 00:00:00 1970 | {"c3": "00616"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "616"} - Tue Jan 27 00:00:00 1970 | {"c3": "00626"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "626"} | Tue Jan 27 00:00:00 1970 | {"c3": "00626"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "626"} - Fri Feb 06 00:00:00 1970 | {"c3": "00636"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "636"} | Fri Feb 06 00:00:00 1970 | {"c3": "00636"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "636"} - Mon Feb 16 00:00:00 1970 | {"c3": "00646"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "646"} | Mon Feb 16 00:00:00 1970 | {"c3": "00646"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "646"} - Thu Feb 26 00:00:00 1970 | {"c3": "00656"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "656"} | Thu Feb 26 00:00:00 1970 | {"c3": "00656"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "656"} - Sun Mar 08 00:00:00 1970 | {"c3": "00666"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "666"} | Sun Mar 08 00:00:00 1970 | {"c3": "00666"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "666"} - Wed Mar 18 00:00:00 1970 | {"c3": "00676"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "676"} | Wed Mar 18 00:00:00 1970 | {"c3": "00676"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "676"} - Sat Mar 28 00:00:00 1970 | {"c3": "00686"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "686"} | Sat Mar 28 00:00:00 1970 | {"c3": "00686"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "686"} - Tue Apr 07 00:00:00 1970 | {"c3": "00696"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "696"} | Tue Apr 07 00:00:00 1970 | {"c3": "00696"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "696"} - Wed Jan 07 00:00:00 1970 | {"c3": "00706"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "706"} | Wed Jan 07 00:00:00 1970 | {"c3": "00706"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "706"} - Sat Jan 17 00:00:00 1970 | {"c3": "00716"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "716"} | Sat Jan 17 00:00:00 1970 | {"c3": "00716"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "716"} - Tue Jan 27 00:00:00 1970 | {"c3": "00726"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "726"} | Tue Jan 27 00:00:00 1970 | {"c3": "00726"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "726"} - Fri Feb 06 00:00:00 1970 | {"c3": "00736"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "736"} | Fri Feb 06 00:00:00 1970 | {"c3": "00736"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "736"} - Mon Feb 16 00:00:00 1970 | {"c3": "00746"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "746"} | Mon Feb 16 00:00:00 1970 | {"c3": "00746"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "746"} - Thu Feb 26 00:00:00 1970 | {"c3": "00756"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "756"} | Thu Feb 26 00:00:00 1970 | {"c3": "00756"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "756"} - Sun Mar 08 00:00:00 1970 | {"c3": "00766"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "766"} | Sun Mar 08 00:00:00 1970 | {"c3": "00766"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "766"} - Wed Mar 18 00:00:00 1970 | {"c3": "00776"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "776"} | Wed Mar 18 00:00:00 1970 | {"c3": "00776"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "776"} - Sat Mar 28 00:00:00 1970 | {"c3": "00786"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "786"} | Sat Mar 28 00:00:00 1970 | {"c3": "00786"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "786"} - Tue Apr 07 00:00:00 1970 | {"c3": "00796"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "796"} | Tue Apr 07 00:00:00 1970 | {"c3": "00796"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "796"} - Wed Jan 07 00:00:00 1970 | {"c3": "00806"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "806"} | Wed Jan 07 00:00:00 1970 | {"c3": "00806"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "806"} - Sat Jan 17 00:00:00 1970 | {"c3": "00816"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "816"} | Sat Jan 17 00:00:00 1970 | {"c3": "00816"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "816"} - Tue Jan 27 00:00:00 1970 | {"c3": "00826"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "826"} | Tue Jan 27 00:00:00 1970 | {"c3": "00826"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "826"} - Fri Feb 06 00:00:00 1970 | {"c3": "00836"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "836"} | Fri Feb 06 00:00:00 1970 | {"c3": "00836"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "836"} - Mon Feb 16 00:00:00 1970 | {"c3": "00846"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "846"} | Mon Feb 16 00:00:00 1970 | {"c3": "00846"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "846"} - Thu Feb 26 00:00:00 1970 | {"c3": "00856"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "856"} | Thu Feb 26 00:00:00 1970 | {"c3": "00856"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "856"} - Sun Mar 08 00:00:00 1970 | {"c3": "00866"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "866"} | Sun Mar 08 00:00:00 1970 | {"c3": "00866"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "866"} - Wed Mar 18 00:00:00 1970 | {"c3": "00876"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "876"} | Wed Mar 18 00:00:00 1970 | {"c3": "00876"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "876"} - Sat Mar 28 00:00:00 1970 | {"c3": "00886"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "886"} | Sat Mar 28 00:00:00 1970 | {"c3": "00886"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "886"} - Tue Apr 07 00:00:00 1970 | {"c3": "00896"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "896"} | Tue Apr 07 00:00:00 1970 | {"c3": "00896"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "896"} - Wed Jan 07 00:00:00 1970 | {"c3": "00906"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "906"} | Wed Jan 07 00:00:00 1970 | {"c3": "00906"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "906"} - Sat Jan 17 00:00:00 1970 | {"c3": "00916"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "916"} | Sat Jan 17 00:00:00 1970 | {"c3": "00916"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "916"} - Tue Jan 27 00:00:00 1970 | {"c3": "00926"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "926"} | Tue Jan 27 00:00:00 1970 | {"c3": "00926"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "926"} - Fri Feb 06 00:00:00 1970 | {"c3": "00936"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "936"} | Fri Feb 06 00:00:00 1970 | {"c3": "00936"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "936"} - Mon Feb 16 00:00:00 1970 | {"c3": "00946"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "946"} | Mon Feb 16 00:00:00 1970 | {"c3": "00946"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "946"} - Thu Feb 26 00:00:00 1970 | {"c3": "00956"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "956"} | Thu Feb 26 00:00:00 1970 | {"c3": "00956"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "956"} - Sun Mar 08 00:00:00 1970 | {"c3": "00966"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "966"} | Sun Mar 08 00:00:00 1970 | {"c3": "00966"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "966"} - Wed Mar 18 00:00:00 1970 | {"c3": "00976"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "976"} | Wed Mar 18 00:00:00 1970 | {"c3": "00976"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "976"} - Sat Mar 28 00:00:00 1970 | {"c3": "00986"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "986"} | Sat Mar 28 00:00:00 1970 | {"c3": "00986"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "986"} - Tue Apr 07 00:00:00 1970 | {"c3": "00996"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "996"} | Tue Apr 07 00:00:00 1970 | {"c3": "00996"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "996"} -(100 rows) - --- bug before 9.3.5 due to sloppy handling of remote-estimate parameters ---Testcase 74: -SELECT * FROM ft1 WHERE (fields->>'C 1')::int = ANY (ARRAY(SELECT (fields->>'C 1')::int FROM ft2 WHERE (fields->>'C 1')::int < 5)); - time | tags | fields ---------------------------+-----------------+--------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} - Sat Jan 03 00:00:00 1970 | {"c3": "00002"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "2"} - Sun Jan 04 00:00:00 1970 | {"c3": "00003"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "3"} - Mon Jan 05 00:00:00 1970 | {"c3": "00004"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "4"} -(4 rows) - ---Testcase 75: -SELECT * FROM ft2 WHERE (fields->>'C 1')::int = ANY (ARRAY(SELECT (fields->>'C 1')::int FROM ft1 WHERE (fields->>'C 1')::int < 5)); - time | tags | fields ---------------------------+-----------------+--------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} - Sat Jan 03 00:00:00 1970 | {"c3": "00002"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "2"} - Sun Jan 04 00:00:00 1970 | {"c3": "00003"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "3"} - Mon Jan 05 00:00:00 1970 | {"c3": "00004"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "4"} -(4 rows) - --- we should not push order by clause with volatile expressions or unsafe --- collations ---Testcase 76: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM ft2 ORDER BY (ft2.fields->>'C 1')::int, random(); - QUERY PLAN -------------------------------------------------------------------------------------- - Sort - Output: "time", tags, fields, (((fields ->> 'C 1'::text))::integer), (random()) - Sort Key: (((ft2.fields ->> 'C 1'::text))::integer), (random()) - -> Foreign Scan on public.ft2 - Output: "time", tags, fields, ((fields ->> 'C 1'::text))::integer, random() - InfluxDB query: SELECT * FROM "T1" -(6 rows) - ---Testcase 77: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM ft2 ORDER BY (ft2.fields->>'C 1')::int, ft2.tags->>'c3' collate "C"; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Sort - Output: "time", tags, fields, (((fields ->> 'C 1'::text))::integer), ((tags ->> 'c3'::text COLLATE "C")) - Sort Key: (((ft2.fields ->> 'C 1'::text))::integer), ((ft2.tags ->> 'c3'::text COLLATE "C")) COLLATE "C" - -> Foreign Scan on public.ft2 - Output: "time", tags, fields, ((fields ->> 'C 1'::text))::integer, (tags ->> 'c3'::text COLLATE "C") - InfluxDB query: SELECT * FROM "T1" -(6 rows) - --- user-defined operator/function ---Testcase 78: -CREATE FUNCTION influxdb_fdw_abs(int) RETURNS int AS $$ -BEGIN -RETURN abs($1); -END -$$ LANGUAGE plpgsql IMMUTABLE; ---Testcase 79: -CREATE OPERATOR === ( - LEFTARG = int, - RIGHTARG = int, - PROCEDURE = int4eq, - COMMUTATOR = === -); --- built-in operators and functions can be shipped for remote execution ---Testcase 80: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = abs((t1.fields->>'c2')::int); - QUERY PLAN ------------------------------------------------------------------------- - Aggregate - Output: count((tags ->> 'c3'::text)) - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = abs("c2"))) -(5 rows) - ---Testcase 81: -SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = abs((t1.fields->>'c2')::int); - count -------- - 9 -(1 row) - ---Testcase 82: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (t1.fields->>'c2')::int; - QUERY PLAN -------------------------------------------------------------------- - Aggregate - Output: count((tags ->> 'c3'::text)) - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = "c2")) -(5 rows) - ---Testcase 83: -SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (t1.fields->>'c2')::int; - count -------- - 9 -(1 row) - --- by default, user-defined ones cannot ---Testcase 84: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); - QUERY PLAN --------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: count((tags ->> 'c3'::text)) - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (((t1.fields ->> 'C 1'::text))::integer = influxdb_fdw_abs(((t1.fields ->> 'c2'::text))::integer)) - InfluxDB query: SELECT * FROM "T1" -(6 rows) - ---Testcase 85: -SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); - count -------- - 9 -(1 row) - ---Testcase 86: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Aggregate - Output: count((tags ->> 'c3'::text)) - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) - InfluxDB query: SELECT * FROM "T1" -(6 rows) - ---Testcase 87: -SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; - count -------- - 9 -(1 row) - --- ORDER BY can be shipped, though ---Testcase 88: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Limit - Output: "time", tags, fields, (((fields ->> 'c2'::text))::integer) - -> Sort - Output: "time", tags, fields, (((fields ->> 'c2'::text))::integer) - Sort Key: (((t1.fields ->> 'c2'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields, ((fields ->> 'c2'::text))::integer - Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) - InfluxDB query: SELECT * FROM "T1" -(9 rows) - ---Testcase 89: -SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; - time | tags | fields ---------------------------+-----------------+--------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} -(1 row) - --- but let's put them in an extension ... -ALTER EXTENSION influxdb_fdw ADD FUNCTION influxdb_fdw_abs(int); -ALTER EXTENSION influxdb_fdw ADD OPERATOR === (int, int); --- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); --- ... now they can be shipped ---Testcase 90: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); - QUERY PLAN --------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: count((tags ->> 'c3'::text)) - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (((t1.fields ->> 'C 1'::text))::integer = influxdb_fdw_abs(((t1.fields ->> 'c2'::text))::integer)) - InfluxDB query: SELECT * FROM "T1" -(6 rows) - ---Testcase 91: -SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); - count -------- - 9 -(1 row) - ---Testcase 92: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Aggregate - Output: count((tags ->> 'c3'::text)) - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) - InfluxDB query: SELECT * FROM "T1" -(6 rows) - ---Testcase 93: -SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; - count -------- - 9 -(1 row) - --- and both ORDER BY and LIMIT can be shipped ---Testcase 94: -EXPLAIN (VERBOSE, COSTS OFF) - SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Limit - Output: "time", tags, fields, (((fields ->> 'c2'::text))::integer) - -> Sort - Output: "time", tags, fields, (((fields ->> 'c2'::text))::integer) - Sort Key: (((t1.fields ->> 'c2'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields, ((fields ->> 'c2'::text))::integer - Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) - InfluxDB query: SELECT * FROM "T1" -(9 rows) - ---Testcase 95: -SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; - time | tags | fields ---------------------------+-----------------+--------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} -(1 row) - --- =================================================================== --- JOIN queries --- =================================================================== --- join two tables ---Testcase 96: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text) - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1.fields, t1.tags, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, t1.tags, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(20 rows) - ---Testcase 97: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- join three tables ---Testcase 98: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t3.c1)::int = (t1.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------ - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)), ((t1.tags ->> 'c3'::text)) - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)), ((t1.tags ->> 'c3'::text)) - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text), (t1.tags ->> 'c3'::text) - Merge Cond: ((((t2.fields ->> 'C 1'::text))::integer) = ((t1.fields ->> 'C 1'::text))::integer) - -> Sort - Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t1.fields, t1.tags, t3.tags, t3.fields - -> Merge Join - Output: t1.fields, t1.tags, t3.tags, t3.fields - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t3.fields ->> 'c1'::text))::integer)) - -> Sort - Output: t1.fields, t1.tags, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, t1.tags, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t3.tags, t3.fields, (((t3.fields ->> 'c1'::text))::integer) - Sort Key: (((t3.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t3 - Output: t3.tags, t3.fields, ((t3.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" -(31 rows) - ---Testcase 99: -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t3.c1)::int = (t1.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 22 | 2 | AAA022 - 24 | 4 | AAA024 - 26 | 6 | AAA026 - 28 | 8 | AAA028 - 30 | 0 | AAA030 - 32 | 2 | AAA032 - 34 | 4 | AAA034 - 36 | 6 | AAA036 - 38 | 8 | AAA038 - 40 | 0 | AAA040 -(10 rows) - --- left outer join ---Testcase 100: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Sort - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Merge Left Join - Output: (((t1.fields ->> 'c1'::text))::integer), ((t2.fields ->> 'c1'::text))::integer - Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(20 rows) - ---Testcase 101: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; - c1 | c1 -----+---- - 22 | - 24 | 24 - 26 | - 28 | - 30 | 30 - 32 | - 34 | - 36 | 36 - 38 | - 40 | -(10 rows) - --- left outer join three tables ---Testcase 102: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) - -> Nested Loop Left Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) - Join Filter: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - -> Nested Loop Left Join - Output: t1.fields, t2.fields - Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t2.fields - -> Foreign Scan on public.ft2 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t3.tags, t3.fields - -> Foreign Scan on public.ft4 t3 - Output: t3.tags, t3.fields - InfluxDB query: SELECT * FROM "T3" -(21 rows) - ---Testcase 103: -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- left outer join + placement of clauses. --- clauses within the nullable side are not pulled up, but top level clause on --- non-nullable side is pushed into non-nullable side ---Testcase 104: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) WHERE (t1.c1)::int < 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Left Join - Output: (((t1.fields ->> 'c1'::text))::integer), ((t1.fields ->> 'c2'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer - Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" < 10)) - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" WHERE (("c1" < 10)) -(15 rows) - ---Testcase 105: -SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) WHERE (t1.c1)::int < 10; - c1 | c2 | c1 | c2 -----+----+----+---- - 2 | 3 | | - 4 | 5 | | - 6 | 7 | 6 | 7 - 8 | 9 | | -(4 rows) - --- clauses within the nullable side are not pulled up, but the top level clause --- on nullable side is not pushed down into nullable side ---Testcase 106: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) - WHERE ((t2.fields->>'c1')::int < 10 OR (t2.fields->>'c1')::int IS NULL) AND (t1.c1)::int < 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Left Join - Output: (((t1.fields ->> 'c1'::text))::integer), ((t1.fields ->> 'c2'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer - Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - Filter: ((((t2.fields ->> 'c1'::text))::integer < 10) OR (((t2.fields ->> 'c1'::text))::integer IS NULL)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" < 10)) - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" WHERE (("c1" < 10)) -(16 rows) - ---Testcase 107: -SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) - WHERE ((t2.fields->>'c1')::int < 10 OR (t2.fields->>'c1')::int IS NULL) AND (t1.c1)::int < 10; - c1 | c2 | c1 | c2 -----+----+----+---- - 2 | 3 | | - 4 | 5 | | - 6 | 7 | 6 | 7 - 8 | 9 | | -(4 rows) - --- right outer join ---Testcase 108: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t2.c1)::int, (t1.c1)::int OFFSET 10 LIMIT 10; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Sort - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer), (((t1.fields ->> 'c1'::text))::integer) - -> Merge Left Join - Output: ((t1.fields ->> 'c1'::text))::integer, (((t2.fields ->> 'c1'::text))::integer) - Merge Cond: ((((t2.fields ->> 'c1'::text))::integer) = (((t1.fields ->> 'c1'::text))::integer)) - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(20 rows) - ---Testcase 109: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t2.c1)::int, (t1.c1)::int OFFSET 10 LIMIT 10; - c1 | c1 -----+---- - | 22 - 24 | 24 - | 26 - | 28 - 30 | 30 - | 32 - | 34 - 36 | 36 - | 38 - | 40 -(10 rows) - --- right outer join three tables ---Testcase 110: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) - -> Nested Loop Left Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) - Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Nested Loop Left Join - Output: t3.tags, t2.fields - Join Filter: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t3 - Output: t3.tags, t3.fields - InfluxDB query: SELECT * FROM "T3" - -> Materialize - Output: t2.fields - -> Foreign Scan on public.ft2 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t1.fields - -> Foreign Scan on public.ft2 t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "T1" -(21 rows) - ---Testcase 111: -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 22 | 2 | AAA022 - 24 | 4 | AAA024 - 26 | 6 | AAA026 - 28 | 8 | AAA028 - 30 | 0 | AAA030 - 32 | 2 | AAA032 - 34 | 4 | AAA034 - 36 | 6 | AAA036 - 38 | 8 | AAA038 - 40 | 0 | AAA040 -(10 rows) - --- full outer join ---Testcase 112: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 45 LIMIT 10; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Sort - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Merge Full Join - Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer - Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(20 rows) - ---Testcase 113: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 45 LIMIT 10; - c1 | c1 ------+---- - 92 | - 94 | - 96 | 96 - 98 | - 100 | - | 3 - | 9 - | 15 - | 21 - | 27 -(10 rows) - --- full outer join with restrictions on the joining relations --- a. the joining relations are both base relations ---Testcase 114: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Sort - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Hash Full Join - Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer - Hash Cond: (((t1.fields ->> 'c1'::text))::integer = ((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: t2.fields - -> Foreign Scan on public.ft5 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(14 rows) - ---Testcase 115: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int; - c1 | c1 -----+---- - 50 | - 52 | - 54 | 54 - 56 | - 58 | - 60 | 60 - | 51 - | 57 -(8 rows) - ---Testcase 116: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT 1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Limit - Output: 1 - -> Merge Full Join - Output: 1 - -> Foreign Scan on public.ft4 t1 - Output: t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Materialize - Output: t2.tags, t2.fields - -> Foreign Scan on public.ft5 t2 - Output: t2.tags, t2.fields - InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(12 rows) - ---Testcase 117: -SELECT 1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; - ?column? ----------- - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 -(10 rows) - --- b. one of the joining relations is a base relation and the other is a join --- relation ---Testcase 118: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 LEFT JOIN (SELECT fields->>'c1' c1, fields->>'c2' c2, tags->>'c3' c3 FROM ft5) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE ((t2.c1)::int between 50 and 60)) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) - -> Hash Full Join - Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((ft5.fields ->> 'c1'::text))::integer - Hash Cond: (((t2.fields ->> 'c1'::text))::integer = ((t1.fields ->> 'c1'::text))::integer) - -> Hash Right Join - Output: t2.fields, ft5.fields - Hash Cond: (((ft5.fields ->> 'c1'::text))::integer = ((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 - Output: ft5.tags, ft5.fields - InfluxDB query: SELECT * FROM "T4" - -> Hash - Output: t2.fields - -> Foreign Scan on public.ft4 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: t1.fields - -> Foreign Scan on public.ft4 t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(22 rows) - ---Testcase 119: -SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 LEFT JOIN (SELECT fields->>'c1' c1, fields->>'c2' c2, tags->>'c3' c3 FROM ft5) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE ((t2.c1)::int between 50 and 60)) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; - c1 | a | b -----+----+---- - 50 | 50 | - 52 | 52 | - 54 | 54 | 54 - 56 | 56 | - 58 | 58 | - 60 | 60 | 60 -(6 rows) - --- c. test deparsing the remote query as nested subqueries ---Testcase 120: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) - -> Hash Full Join - Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t3.fields ->> 'c1'::text))::integer - Hash Cond: (((t2.fields ->> 'c1'::text))::integer = ((t1.fields ->> 'c1'::text))::integer) - -> Hash Full Join - Output: t2.fields, t3.fields - Hash Cond: (((t2.fields ->> 'c1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - Filter: ((((t2.fields ->> 'c1'::text))::integer IS NULL) OR (((t2.fields ->> 'c1'::text))::integer IS NOT NULL)) - -> Foreign Scan on public.ft4 t2 - Output: t2.tags, t2.fields - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: t3.fields - -> Foreign Scan on public.ft5 t3 - Output: t3.fields - InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: t1.fields - -> Foreign Scan on public.ft4 t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(23 rows) - ---Testcase 121: -SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; - c1 | a | b -----+----+---- - 50 | 50 | - 52 | 52 | - 54 | 54 | 54 - 56 | 56 | - 58 | 58 | - 60 | 60 | 60 - | | 51 - | | 57 -(8 rows) - --- d. test deparsing rowmarked relations as subqueries ---Testcase 122: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM "S 1"."T 3" t1 WHERE (fields->>'c1')::int = 50) t1 INNER JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY (t1.c1)::int, ss.a, ss.b FOR UPDATE OF t1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------- - LockRows - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer), t1.*, t2.*, t3.* - -> Sort - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer), t1.*, t2.*, t3.* - Sort Key: (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) - -> Nested Loop - Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t3.fields ->> 'c1'::text))::integer, t1.*, t2.*, t3.* - -> Foreign Scan on "S 1"."T 3" t1 - Output: t1.fields, t1.* - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" = 50)) - -> Hash Full Join - Output: t2.fields, t2.*, t3.fields, t3.* - Hash Cond: (((t2.fields ->> 'c1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - Filter: ((((t2.fields ->> 'c1'::text))::integer IS NULL) OR (((t2.fields ->> 'c1'::text))::integer IS NOT NULL)) - -> Foreign Scan on public.ft4 t2 - Output: t2.fields, t2.* - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: t3.fields, t3.* - -> Foreign Scan on public.ft5 t3 - Output: t3.fields, t3.* - InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(22 rows) - ---Testcase 123: -SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM "S 1"."T 3" t1 WHERE (fields->>'c1')::int = 50) t1 INNER JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY (t1.c1)::int, ss.a, ss.b FOR UPDATE OF t1; - c1 | a | b -----+----+---- - 50 | 50 | - 50 | 52 | - 50 | 54 | 54 - 50 | 56 | - 50 | 58 | - 50 | 60 | 60 - 50 | | 51 - 50 | | 57 -(8 rows) - --- full outer join + inner join ---Testcase 124: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1, t3.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 INNER JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int + 1 and (t1.c1)::int between 50 and 60) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int, (t3.c1)::int LIMIT 10; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) - -> Sort - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) - -> Hash Full Join - Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t3.fields ->> 'c1'::text))::integer - Hash Cond: (((t2.fields ->> 'c1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - -> Hash Join - Output: t1.fields, t2.fields - Hash Cond: ((((t2.fields ->> 'c1'::text))::integer + 1) = ((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.tags, t2.fields - InfluxDB query: SELECT * FROM "T4" - -> Hash - Output: t1.fields - -> Foreign Scan on public.ft4 t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: t3.fields - -> Foreign Scan on public.ft4 t3 - Output: t3.fields - InfluxDB query: SELECT * FROM "T3" -(24 rows) - ---Testcase 125: -SELECT t1.c1, t2.c1, t3.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 INNER JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int + 1 and (t1.c1)::int between 50 and 60) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int, (t3.c1)::int LIMIT 10; - c1 | c1 | c1 -----+----+---- - 52 | 51 | - 58 | 57 | - | | 2 - | | 4 - | | 6 - | | 8 - | | 10 - | | 12 - | | 14 - | | 16 -(10 rows) - --- full outer join three tables ---Testcase 126: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) - -> Hash Full Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) - Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - -> Hash Full Join - Output: t1.fields, t2.fields - Hash Cond: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: t2.fields - -> Foreign Scan on public.ft2 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: t3.tags, t3.fields - -> Foreign Scan on public.ft4 t3 - Output: t3.tags, t3.fields - InfluxDB query: SELECT * FROM "T3" -(21 rows) - ---Testcase 127: -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- full outer join + right outer join ---Testcase 128: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) - -> Nested Loop Left Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) - Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Nested Loop Left Join - Output: t3.tags, t2.fields - Join Filter: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t3 - Output: t3.tags, t3.fields - InfluxDB query: SELECT * FROM "T3" - -> Materialize - Output: t2.fields - -> Foreign Scan on public.ft2 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t1.fields - -> Foreign Scan on public.ft2 t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "T1" -(21 rows) - ---Testcase 129: -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 22 | 2 | AAA022 - 24 | 4 | AAA024 - 26 | 6 | AAA026 - 28 | 8 | AAA028 - 30 | 0 | AAA030 - 32 | 2 | AAA032 - 34 | 4 | AAA034 - 36 | 6 | AAA036 - 38 | 8 | AAA038 - 40 | 0 | AAA040 -(10 rows) - --- right outer join + full outer join ---Testcase 130: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) - -> Hash Full Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) - Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - -> Nested Loop Left Join - Output: t2.fields, t1.fields - Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2."time", t2.tags, t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t1.fields - -> Foreign Scan on public.ft2 t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: t3.tags, t3.fields - -> Foreign Scan on public.ft4 t3 - Output: t3.tags, t3.fields - InfluxDB query: SELECT * FROM "T3" -(21 rows) - ---Testcase 131: -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- full outer join + left outer join ---Testcase 132: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) - -> Nested Loop Left Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) - Join Filter: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - -> Hash Full Join - Output: t1.fields, t2.fields - Hash Cond: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: t2.fields - -> Foreign Scan on public.ft2 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t3.tags, t3.fields - -> Foreign Scan on public.ft4 t3 - Output: t3.tags, t3.fields - InfluxDB query: SELECT * FROM "T3" -(21 rows) - ---Testcase 133: -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- left outer join + full outer join ---Testcase 134: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) - -> Hash Full Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) - Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - -> Nested Loop Left Join - Output: t1.fields, t2.fields - Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t2.fields - -> Foreign Scan on public.ft2 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: t3.tags, t3.fields - -> Foreign Scan on public.ft4 t3 - Output: t3.tags, t3.fields - InfluxDB query: SELECT * FROM "T3" -(21 rows) - ---Testcase 135: -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- right outer join + left outer join ---Testcase 136: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) - -> Nested Loop Left Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) - Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Nested Loop Left Join - Output: t2.fields, t3.tags - Join Filter: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2."time", t2.tags, t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t3.tags, t3.fields - -> Foreign Scan on public.ft4 t3 - Output: t3.tags, t3.fields - InfluxDB query: SELECT * FROM "T3" - -> Materialize - Output: t1.fields - -> Foreign Scan on public.ft2 t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "T1" -(21 rows) - ---Testcase 137: -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 11 | 1 | - 12 | 2 | AAA012 - 13 | 3 | - 14 | 4 | AAA014 - 15 | 5 | - 16 | 6 | AAA016 - 17 | 7 | - 18 | 8 | AAA018 - 19 | 9 | - 20 | 0 | AAA020 -(10 rows) - --- left outer join + right outer join ---Testcase 138: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) - -> Hash Right Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) - Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) - -> Nested Loop - Output: t1.fields, t2.fields - Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t2.fields - -> Foreign Scan on public.ft2 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: t3.tags, t3.fields - -> Foreign Scan on public.ft4 t3 - Output: t3.tags, t3.fields - InfluxDB query: SELECT * FROM "T3" -(21 rows) - ---Testcase 139: -SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 | c3 -----+----+-------- - 22 | 2 | AAA022 - 24 | 4 | AAA024 - 26 | 6 | AAA026 - 28 | 8 | AAA028 - 30 | 0 | AAA030 - 32 | 2 | AAA032 - 34 | 4 | AAA034 - 36 | 6 | AAA036 - 38 | 8 | AAA038 - 40 | 0 | AAA040 -(10 rows) - --- full outer join + WHERE clause, only matched rows ---Testcase 140: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE ((t1.c1)::int = (t2.c1)::int OR (t1.c1)::int IS NULL) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Sort - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Merge Full Join - Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer - Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - Filter: ((((t1.fields ->> 'c1'::text))::integer = ((t2.fields ->> 'c1'::text))::integer) OR (((t1.fields ->> 'c1'::text))::integer IS NULL)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(21 rows) - ---Testcase 141: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE ((t1.c1)::int = (t2.c1)::int OR (t1.c1)::int IS NULL) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; - c1 | c1 -----+---- - 66 | 66 - 72 | 72 - 78 | 78 - 84 | 84 - 90 | 90 - 96 | 96 - | 3 - | 9 - | 15 - | 21 -(10 rows) - --- full outer join + WHERE clause with shippable extensions set ---Testcase 142: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2, t1.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE influxdb_fdw_abs((t1.c1)::int) > 0 OFFSET 10 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t1.tags ->> 'c3'::text)) - -> Hash Full Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t1.tags ->> 'c3'::text) - Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t1.fields ->> 'C 1'::text))::integer) - Filter: (influxdb_fdw_abs(((t1.fields ->> 'C 1'::text))::integer) > 0) - -> Foreign Scan on public.ft2 t2 - Output: t2."time", t2.tags, t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: t1.fields, t1.tags - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, t1.tags - InfluxDB query: SELECT * FROM "T1" -(14 rows) - --- skip, influxdb does not have option 'extensions' --- ALTER SERVER influxdb_svr OPTIONS (DROP extensions); --- full outer join + WHERE clause with shippable extensions not set --- EXPLAIN (VERBOSE, COSTS OFF) --- SELECT t1.c1, t2.c2, t1.c3 FROM ft1 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE influxdb_fdw_abs(t1.c1) > 0 OFFSET 10 LIMIT 10; --- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); --- join two tables with FOR UPDATE clause --- tests whole-row reference for row marks ---Testcase 143: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE OF t1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - -> LockRows - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text), t1.*, t2.* - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1.fields, t1.tags, t1.*, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, t1.tags, t1.*, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, t2.*, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, t2.*, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(22 rows) - ---Testcase 144: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE OF t1; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - ---Testcase 145: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - -> LockRows - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text), t1.*, t2.* - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1.fields, t1.tags, t1.*, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, t1.tags, t1.*, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, t2.*, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, t2.*, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(22 rows) - ---Testcase 146: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- join two tables with FOR SHARE clause ---Testcase 147: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE OF t1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - -> LockRows - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text), t1.*, t2.* - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1.fields, t1.tags, t1.*, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, t1.tags, t1.*, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, t2.*, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, t2.*, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(22 rows) - ---Testcase 148: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE OF t1; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - ---Testcase 149: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - -> LockRows - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text), t1.*, t2.* - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1.fields, t1.tags, t1.*, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, t1.tags, t1.*, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, t2.*, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, t2.*, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(22 rows) - ---Testcase 150: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- join in CTE ---Testcase 151: -EXPLAIN (VERBOSE, COSTS OFF) -WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; -ERROR: syntax error at or near "MATERIALIZED" -LINE 2: WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.... - ^ ---Testcase 152: -WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; -ERROR: syntax error at or near "MATERIALIZED" -LINE 1: WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.... - ^ --- ctid with whole-row reference ---Testcase 153: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.ctid, t1, t2, t1.c1 FROM (SELECT ctid, fields->>'C 1' c1, fields->>'c2' c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: t1.ctid, (ROW(t1.ctid, (t1.fields ->> 'C 1'::text), (t1.fields ->> 'c2'::text), (t1.tags ->> 'c3'::text), (t1.fields ->> 'c4'::text), (t1.fields ->> 'c5'::text), (t1.fields ->> 'c6'::text), (t1.fields ->> 'c7'::text), (t1.fields ->> 'c8'::text))), (ROW(((t2.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t2.tags ->> 'c3'::text), (t2.fields ->> 'c4'::text), (t2.fields ->> 'c5'::text), (t2.fields ->> 'c6'::text), (t2.fields ->> 'c7'::text), (t2.fields ->> 'c8'::text))), ((t1.fields ->> 'C 1'::text)), ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Result - Output: t1.ctid, (ROW(t1.ctid, (t1.fields ->> 'C 1'::text), (t1.fields ->> 'c2'::text), (t1.tags ->> 'c3'::text), (t1.fields ->> 'c4'::text), (t1.fields ->> 'c5'::text), (t1.fields ->> 'c6'::text), (t1.fields ->> 'c7'::text), (t1.fields ->> 'c8'::text))), ROW(((t2.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t2.tags ->> 'c3'::text), (t2.fields ->> 'c4'::text), (t2.fields ->> 'c5'::text), (t2.fields ->> 'c6'::text), (t2.fields ->> 'c7'::text), (t2.fields ->> 'c8'::text)), ((t1.fields ->> 'C 1'::text)), ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Sort - Output: t1.ctid, (ROW(t1.ctid, (t1.fields ->> 'C 1'::text), (t1.fields ->> 'c2'::text), (t1.tags ->> 'c3'::text), (t1.fields ->> 'c4'::text), (t1.fields ->> 'c5'::text), (t1.fields ->> 'c6'::text), (t1.fields ->> 'c7'::text), (t1.fields ->> 'c8'::text))), ((t1.fields ->> 'C 1'::text)), ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer), t2.fields, t2.tags - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: t1.ctid, ROW(t1.ctid, (t1.fields ->> 'C 1'::text), (t1.fields ->> 'c2'::text), (t1.tags ->> 'c3'::text), (t1.fields ->> 'c4'::text), (t1.fields ->> 'c5'::text), (t1.fields ->> 'c6'::text), (t1.fields ->> 'c7'::text), (t1.fields ->> 'c8'::text)), (t1.fields ->> 'C 1'::text), (t1.tags ->> 'c3'::text), (((t1.fields ->> 'C 1'::text))::integer), t2.fields, t2.tags - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1.ctid, t1.fields, t1.tags, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.ctid, t1.fields, t1.tags, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, t2.tags, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, t2.tags, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(22 rows) - --- SEMI JOIN, not pushed down ---Testcase 154: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'C 1')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer) - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Hash Join - Output: ((t1.fields ->> 'C 1'::text))::integer - Inner Unique: true - Hash Cond: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: t2.fields - -> HashAggregate - Output: t2.fields - Group Key: ((t2.fields ->> 'C 1'::text))::integer - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(20 rows) - ---Testcase 155: -SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'C 1')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; - c1 ------ - 101 - 102 - 103 - 104 - 105 - 106 - 107 - 108 - 109 - 110 -(10 rows) - --- ANTI JOIN, not pushed down ---Testcase 156: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'c2')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer) - -> Merge Anti Join - Output: (((t1.fields ->> 'C 1'::text))::integer) - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'c2'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c2'::text))::integer) - Sort Key: (((t2.fields ->> 'c2'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, ((t2.fields ->> 'c2'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(17 rows) - ---Testcase 157: -SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'c2')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; - c1 ------ - 110 - 111 - 112 - 113 - 114 - 115 - 116 - 117 - 118 - 119 -(10 rows) - --- CROSS JOIN can be pushed down ---Testcase 158: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 CROSS JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - -> Nested Loop - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'C 1'::text))::integer - -> Foreign Scan on public.ft1 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: t2.fields - -> Foreign Scan on public.ft2 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T1" -(15 rows) - ---Testcase 159: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 CROSS JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; - c1 | c1 -----+----- - 1 | 101 - 1 | 102 - 1 | 103 - 1 | 104 - 1 | 105 - 1 | 106 - 1 | 107 - 1 | 108 - 1 | 109 - 1 | 110 -(10 rows) - --- different server, not pushed down. No result expected. ---Testcase 160: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft6 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Merge Join - Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft6 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(17 rows) - ---Testcase 161: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft6 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; - c1 | c1 -----+---- -(0 rows) - --- unsafe join conditions (c8 has a UDT), not pushed down. Practically a CROSS --- JOIN since c8 in both tables has same value. ---Testcase 162: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON (t1.c8 = t2.c8) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - -> Merge Left Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'C 1'::text))::integer - Merge Cond: (((t1.fields ->> 'c8'::text)) = ((t2.fields ->> 'c8'::text))) - -> Sort - Output: t1.fields, ((t1.fields ->> 'c8'::text)) - Sort Key: ((t1.fields ->> 'c8'::text)) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, (t1.fields ->> 'c8'::text) - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, ((t2.fields ->> 'c8'::text)) - Sort Key: ((t2.fields ->> 'c8'::text)) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, (t2.fields ->> 'c8'::text) - InfluxDB query: SELECT * FROM "T1" -(20 rows) - ---Testcase 163: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON (t1.c8 = t2.c8) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; - c1 | c1 -----+----- - 1 | 101 - 1 | 102 - 1 | 103 - 1 | 104 - 1 | 105 - 1 | 106 - 1 | 107 - 1 | 108 - 1 | 109 - 1 | 110 -(10 rows) - --- unsafe conditions on one side (c8 has a UDT), not pushed down. ---Testcase 164: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = 'foo' ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Hash Right Join - Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'C 1'::text))::integer, (t1.tags ->> 'c3'::text) - Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2."time", t2.tags, t2.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: t1.fields, t1.tags - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, t1.tags - InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) -(16 rows) - ---Testcase 165: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = 'foo' ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- join where unsafe to pushdown condition in WHERE clause has a column not --- in the SELECT clause. In this test unsafe clause needs to have column --- references from both joining sides so that the clause is not pushed down --- into one of the joining sides. ---Testcase 166: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) - Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text) - Merge Cond: (((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) AND (((t1.fields ->> 'c8'::text)) = ((t2.fields ->> 'c8'::text)))) - -> Sort - Output: t1.fields, t1.tags, (((t1.fields ->> 'C 1'::text))::integer), ((t1.fields ->> 'c8'::text)) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer), ((t1.fields ->> 'c8'::text)) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, t1.tags, ((t1.fields ->> 'C 1'::text))::integer, (t1.fields ->> 'c8'::text) - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer), ((t2.fields ->> 'c8'::text)) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer), ((t2.fields ->> 'c8'::text)) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer, (t2.fields ->> 'c8'::text) - InfluxDB query: SELECT * FROM "T1" -(20 rows) - ---Testcase 167: -SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; - c1 | c1 ------+----- - 101 | 101 - 102 | 102 - 103 | 103 - 104 | 104 - 105 | 105 - 106 | 106 - 107 | 107 - 108 | 108 - 109 | 109 - 110 | 110 -(10 rows) - --- Aggregate after UNION, for testing setrefs ---Testcase 168: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) UNION SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer), (avg(((((t1.fields ->> 'C 1'::text))::integer) + (((t2.fields ->> 'C 1'::text))::integer)))) - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer), (avg(((((t1.fields ->> 'C 1'::text))::integer) + (((t2.fields ->> 'C 1'::text))::integer)))) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> HashAggregate - Output: (((t1.fields ->> 'C 1'::text))::integer), avg(((((t1.fields ->> 'C 1'::text))::integer) + (((t2.fields ->> 'C 1'::text))::integer))) - Group Key: (((t1.fields ->> 'C 1'::text))::integer) - -> HashAggregate - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - Group Key: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - -> Append - -> Merge Join - Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Merge Join - Output: (((t1_1.fields ->> 'C 1'::text))::integer), (((t2_1.fields ->> 'C 1'::text))::integer) - Merge Cond: ((((t1_1.fields ->> 'C 1'::text))::integer) = (((t2_1.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: t1_1.fields, (((t1_1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1_1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1_1 - Output: t1_1.fields, ((t1_1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2_1.fields, (((t2_1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2_1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2_1 - Output: t2_1.fields, ((t2_1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(42 rows) - ---Testcase 169: -SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) UNION SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; - t1c1 | avg -------+---------------------- - 101 | 202.0000000000000000 - 102 | 204.0000000000000000 - 103 | 206.0000000000000000 - 104 | 208.0000000000000000 - 105 | 210.0000000000000000 - 106 | 212.0000000000000000 - 107 | 214.0000000000000000 - 108 | 216.0000000000000000 - 109 | 218.0000000000000000 - 110 | 220.0000000000000000 -(10 rows) - --- join with lateral reference ---Testcase 170: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1, LATERAL (SELECT DISTINCT t2.fields->>'C 1', t3.fields->>'C 1' FROM ft1 t2, ft2 t3 WHERE (t2.fields->>'C 1')::int = (t3.fields->>'C 1')::int AND (t2.fields->>'c2')::int = (t1.c2)::int) q ORDER BY (t1."C 1")::int OFFSET 10 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((t1.fields ->> 'C 1'::text))::integer) - -> Sort - Output: (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Nested Loop - Output: ((t1.fields ->> 'C 1'::text))::integer - -> Foreign Scan on "S 1"."T 1" t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" - -> Unique - Output: ((t2.fields ->> 'C 1'::text)), ((t3.fields ->> 'C 1'::text)) - -> Sort - Output: ((t2.fields ->> 'C 1'::text)), ((t3.fields ->> 'C 1'::text)) - Sort Key: ((t2.fields ->> 'C 1'::text)), ((t3.fields ->> 'C 1'::text)) - -> Hash Join - Output: (t2.fields ->> 'C 1'::text), (t3.fields ->> 'C 1'::text) - Hash Cond: (((t3.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t3 - Output: t3."time", t3.tags, t3.fields - InfluxDB query: SELECT * FROM "T1" - -> Hash - Output: t2.fields - -> Foreign Scan on public.ft1 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" = $1)) -(26 rows) - ---Testcase 171: -SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1, LATERAL (SELECT DISTINCT t2.fields->>'C 1', t3.fields->>'C 1' FROM ft1 t2, ft2 t3 WHERE (t2.fields->>'C 1')::int = (t3.fields->>'C 1')::int AND (t2.fields->>'c2')::int = (t1.c2)::int) q ORDER BY (t1."C 1")::int OFFSET 10 LIMIT 10; - C 1 ------ - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 -(10 rows) - --- non-Var items in targetlist of the nullable rel of a join preventing --- push-down in some cases --- unable to push {ft1, ft2} ---Testcase 172: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT q.a, (ft2.fields->>'C 1')::int c1 FROM (SELECT 13 FROM ft1 WHERE (fields->>'C 1')::int = 13) q(a) RIGHT JOIN ft2 ON (q.a = (ft2.fields->>'C 1')::int) WHERE (ft2.fields->>'C 1')::int BETWEEN 10 AND 15; - QUERY PLAN --------------------------------------------------------------------------------------- - Nested Loop Left Join - Output: (13), ((ft2.fields ->> 'C 1'::text))::integer - Join Filter: (13 = ((ft2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 - Output: ft2."time", ft2.tags, ft2.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" >= 10)) AND (("C 1" <= 15)) - -> Materialize - Output: (13) - -> Foreign Scan on public.ft1 - Output: 13 - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 13)) -(11 rows) - ---Testcase 173: -SELECT q.a, (ft2.fields->>'C 1')::int c1 FROM (SELECT 13 FROM ft1 WHERE (fields->>'C 1')::int = 13) q(a) RIGHT JOIN ft2 ON (q.a = (ft2.fields->>'C 1')::int) WHERE (ft2.fields->>'C 1')::int BETWEEN 10 AND 15; - a | c1 -----+---- - | 10 - | 11 - | 12 - 13 | 13 - | 14 - | 15 -(6 rows) - --- ok to push {ft1, ft2} but not {ft1, ft2, ft4} ---Testcase 174: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT (ft4.fields->>'c1')::int c1, q.* FROM ft4 LEFT JOIN (SELECT 13, (ft1.fields->>'C 1')::int, (ft2.fields->>'C 1')::int FROM ft1 RIGHT JOIN ft2 ON ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int) WHERE (ft1.fields->>'C 1')::int = 12) q(a, b, c) ON ((ft4.fields->>'c1')::int = q.b) WHERE (ft4.fields->>'c1')::int BETWEEN 10 AND 15; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Hash Right Join - Output: ((ft4.fields ->> 'c1'::text))::integer, (13), ((ft1.fields ->> 'C 1'::text))::integer, ((ft2.fields ->> 'C 1'::text))::integer - Hash Cond: (((ft1.fields ->> 'C 1'::text))::integer = ((ft4.fields ->> 'c1'::text))::integer) - -> Nested Loop - Output: ft1.fields, ft2.fields, 13 - -> Foreign Scan on public.ft1 - Output: ft1."time", ft1.tags, ft1.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 12)) - -> Materialize - Output: ft2.fields - -> Foreign Scan on public.ft2 - Output: ft2.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 12)) - -> Hash - Output: ft4.fields - -> Foreign Scan on public.ft4 - Output: ft4.fields - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 10)) AND (("c1" <= 15)) -(18 rows) - ---Testcase 175: -SELECT (ft4.fields->>'c1')::int c1, q.* FROM ft4 LEFT JOIN (SELECT 13, (ft1.fields->>'C 1')::int, (ft2.fields->>'C 1')::int FROM ft1 RIGHT JOIN ft2 ON ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int) WHERE (ft1.fields->>'C 1')::int = 12) q(a, b, c) ON ((ft4.fields->>'c1')::int = q.b) WHERE (ft4.fields->>'c1')::int BETWEEN 10 AND 15 ORDER BY (ft4.fields->>'c1')::int; - c1 | a | b | c -----+----+----+---- - 10 | | | - 12 | 13 | 12 | 12 - 14 | | | -(3 rows) - --- join with nullable side with some columns with null values --- influxdb_fdw does not support UPDATE --- UPDATE ft5 SET c3 = null where c1 % 9 = 0; ---Testcase 176: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ft5, (ft5.fields->>'c1')::int c1, (ft5.fields->>'c2')::int c2, ft5.tags->>'c3' c3, (ft4.fields->>'c1')::int c1, (ft4.fields->>'c2')::int c2 FROM ft5 left join ft4 on (ft5.fields->>'c1')::int = (ft4.fields->>'c1')::int WHERE (ft4.fields->>'c1')::int BETWEEN 10 and 30 ORDER BY (ft5.fields->>'c1')::int, (ft4.fields->>'c1')::int; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ft5.*, (((ft5.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c2'::text))::integer), ((ft5.tags ->> 'c3'::text)), (((ft4.fields ->> 'c1'::text))::integer), (((ft4.fields ->> 'c2'::text))::integer) - Sort Key: (((ft5.fields ->> 'c1'::text))::integer) - -> Hash Join - Output: ft5.*, ((ft5.fields ->> 'c1'::text))::integer, ((ft5.fields ->> 'c2'::text))::integer, (ft5.tags ->> 'c3'::text), ((ft4.fields ->> 'c1'::text))::integer, ((ft4.fields ->> 'c2'::text))::integer - Hash Cond: (((ft5.fields ->> 'c1'::text))::integer = ((ft4.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 - Output: ft5.*, ft5.fields, ft5.tags - InfluxDB query: SELECT * FROM "T4" - -> Hash - Output: ft4.fields - -> Foreign Scan on public.ft4 - Output: ft4.fields - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 10)) AND (("c1" <= 30)) -(14 rows) - ---Testcase 177: -SELECT ft5, (ft5.fields->>'c1')::int c1, (ft5.fields->>'c2')::int c2, ft5.tags->>'c3' c3, (ft4.fields->>'c1')::int c1, (ft4.fields->>'c2')::int c2 FROM ft5 left join ft4 on (ft5.fields->>'c1')::int = (ft4.fields->>'c1')::int WHERE (ft4.fields->>'c1')::int BETWEEN 10 and 30 ORDER BY (ft5.fields->>'c1')::int, (ft4.fields->>'c1')::int; - ft5 | c1 | c2 | c3 | c1 | c2 --------------------------------------------------------------+----+----+--------+----+---- - ("{""c3"": ""AAA012""}","{""c1"": ""12"", ""c2"": ""13""}") | 12 | 13 | AAA012 | 12 | 13 - ("{""c3"": ""AAA018""}","{""c1"": ""18"", ""c2"": ""19""}") | 18 | 19 | AAA018 | 18 | 19 - ("{""c3"": ""AAA024""}","{""c1"": ""24"", ""c2"": ""25""}") | 24 | 25 | AAA024 | 24 | 25 - ("{""c3"": ""AAA030""}","{""c1"": ""30"", ""c2"": ""31""}") | 30 | 31 | AAA030 | 30 | 31 -(4 rows) - --- multi-way join involving multiple merge joins --- (this case used to have EPQ-related planning problems) ---Testcase 178: -CREATE FOREIGN TABLE local_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'local_tbl', schemaless 'true'); -CREATE FOREIGN TABLE local_tbl_nsc (c1 int NOT NULL, c2 int NOT NULL, c3 text) SERVER influxdb_svr OPTIONS (table 'local_tbl'); ---Testcase 179: -INSERT INTO local_tbl_nsc SELECT id, id % 10, to_char(id, 'FM0000') FROM generate_series(1, 1000) id; ---ANALYZE local_tbl; -SET enable_nestloop TO false; -SET enable_hashjoin TO false; ---Testcase 180: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE (ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int AND (ft1.fields->>'c2')::int = (ft4.fields->>'c1')::int - AND (ft1.fields->>'c2')::int = (ft5.fields->>'c1')::int AND (ft1.fields->>'c2')::int = (local_tbl.fields->>'c1')::int AND (ft1.fields->>'C 1')::int < 100 AND (ft2.fields->>'C 1')::int < 100 ORDER BY (ft1.fields->>'C 1')::int FOR UPDATE; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - LockRows - Output: ft1."time", ft1.tags, ft1.fields, ft2."time", ft2.tags, ft2.fields, ft4.tags, ft4.fields, ft5.tags, ft5.fields, local_tbl.fields, (((ft1.fields ->> 'C 1'::text))::integer), ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* - -> Sort - Output: ft1."time", ft1.tags, ft1.fields, ft2."time", ft2.tags, ft2.fields, ft4.tags, ft4.fields, ft5.tags, ft5.fields, local_tbl.fields, (((ft1.fields ->> 'C 1'::text))::integer), ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* - Sort Key: (((ft1.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: ft1."time", ft1.tags, ft1.fields, ft2."time", ft2.tags, ft2.fields, ft4.tags, ft4.fields, ft5.tags, ft5.fields, local_tbl.fields, ((ft1.fields ->> 'C 1'::text))::integer, ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* - Merge Cond: (((ft1.fields ->> 'c2'::text))::integer = (((local_tbl.fields ->> 'c1'::text))::integer)) - -> Merge Join - Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2."time", ft2.tags, ft2.fields, ft2.*, ft4.tags, ft4.fields, ft4.*, ft5.tags, ft5.fields, ft5.* - Merge Cond: (((ft1.fields ->> 'c2'::text))::integer = (((ft5.fields ->> 'c1'::text))::integer)) - -> Merge Join - Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2."time", ft2.tags, ft2.fields, ft2.*, ft4.tags, ft4.fields, ft4.* - Merge Cond: ((((ft1.fields ->> 'c2'::text))::integer) = (((ft4.fields ->> 'c1'::text))::integer)) - -> Sort - Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2."time", ft2.tags, ft2.fields, ft2.*, (((ft1.fields ->> 'c2'::text))::integer) - Sort Key: (((ft1.fields ->> 'c2'::text))::integer) - -> Merge Join - Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2."time", ft2.tags, ft2.fields, ft2.*, ((ft1.fields ->> 'c2'::text))::integer - Merge Cond: ((((ft1.fields ->> 'C 1'::text))::integer) = (((ft2.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: ft1."time", ft1.tags, ft1.fields, ft1.*, (((ft1.fields ->> 'C 1'::text))::integer) - Sort Key: (((ft1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 - Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ((ft1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) - -> Sort - Output: ft2."time", ft2.tags, ft2.fields, ft2.*, (((ft2.fields ->> 'C 1'::text))::integer) - Sort Key: (((ft2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 - Output: ft2."time", ft2.tags, ft2.fields, ft2.*, ((ft2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) - -> Sort - Output: ft4.tags, ft4.fields, ft4.*, (((ft4.fields ->> 'c1'::text))::integer) - Sort Key: (((ft4.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 - Output: ft4.tags, ft4.fields, ft4.*, ((ft4.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: ft5.tags, ft5.fields, ft5.*, (((ft5.fields ->> 'c1'::text))::integer) - Sort Key: (((ft5.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 - Output: ft5.tags, ft5.fields, ft5.*, ((ft5.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" - -> Sort - Output: local_tbl.fields, local_tbl.*, (((local_tbl.fields ->> 'c1'::text))::integer) - Sort Key: (((local_tbl.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.local_tbl - Output: local_tbl.fields, local_tbl.*, ((local_tbl.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "local_tbl" -(50 rows) - ---Testcase 181: -SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE (ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int AND (ft1.fields->>'c2')::int = (ft4.fields->>'c1')::int - AND (ft1.fields->>'c2')::int = (ft5.fields->>'c1')::int AND (ft1.fields->>'c2')::int = (local_tbl.fields->>'c1')::int AND (ft1.fields->>'C 1')::int < 100 AND (ft2.fields->>'C 1')::int < 100 ORDER BY (ft1.fields->>'C 1')::int FOR UPDATE; - time | tags | fields | time | tags | fields | tags | fields | tags | fields | fields ---------------------------+-----------------+----------------------------------------------------------------------+--------------------------+-----------------+----------------------------------------------------------------------+------------------+------------------------+------------------+------------------------+-------------------------------------- - Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} | Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} - Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} | Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} - Tue Jan 27 00:00:00 1970 | {"c3": "00026"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "26"} | Tue Jan 27 00:00:00 1970 | {"c3": "00026"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "26"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} - Fri Feb 06 00:00:00 1970 | {"c3": "00036"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "36"} | Fri Feb 06 00:00:00 1970 | {"c3": "00036"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "36"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} - Mon Feb 16 00:00:00 1970 | {"c3": "00046"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "46"} | Mon Feb 16 00:00:00 1970 | {"c3": "00046"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "46"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} - Thu Feb 26 00:00:00 1970 | {"c3": "00056"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "56"} | Thu Feb 26 00:00:00 1970 | {"c3": "00056"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "56"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} - Sun Mar 08 00:00:00 1970 | {"c3": "00066"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "66"} | Sun Mar 08 00:00:00 1970 | {"c3": "00066"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "66"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} - Wed Mar 18 00:00:00 1970 | {"c3": "00076"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "76"} | Wed Mar 18 00:00:00 1970 | {"c3": "00076"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "76"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} - Sat Mar 28 00:00:00 1970 | {"c3": "00086"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "86"} | Sat Mar 28 00:00:00 1970 | {"c3": "00086"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "86"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} - Tue Apr 07 00:00:00 1970 | {"c3": "00096"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "96"} | Tue Apr 07 00:00:00 1970 | {"c3": "00096"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "96"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} -(10 rows) - -RESET enable_nestloop; -RESET enable_hashjoin; ---Testcase 182: -DELETE FROM local_tbl_nsc; -DROP FOREIGN TABLE local_tbl; -DROP FOREIGN TABLE local_tbl_nsc; --- check join pushdown in situations where multiple userids are involved ---Testcase 183: -CREATE ROLE regress_view_owner SUPERUSER; ---Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); -GRANT SELECT ON ft4 TO regress_view_owner; -GRANT SELECT ON ft5 TO regress_view_owner; ---Testcase 185: -CREATE VIEW v4 AS SELECT * FROM ft4; ---Testcase 186: -CREATE VIEW v5 AS SELECT * FROM ft5; -ALTER VIEW v5 OWNER TO regress_view_owner; ---Testcase 187: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can't be pushed down, different view owners - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c2'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) - -> Sort - Output: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c2'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) - Sort Key: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) - -> Merge Left Join - Output: (((ft4.fields ->> 'c1'::text))::integer), ((ft5.fields ->> 'c2'::text))::integer, ((ft5.fields ->> 'c1'::text))::integer - Merge Cond: ((((ft4.fields ->> 'c1'::text))::integer) = (((ft5.fields ->> 'c1'::text))::integer)) - -> Sort - Output: ft4.fields, (((ft4.fields ->> 'c1'::text))::integer) - Sort Key: (((ft4.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 - Output: ft4.fields, ((ft4.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: ft5.fields, (((ft5.fields ->> 'c1'::text))::integer) - Sort Key: (((ft5.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 - Output: ft5.fields, ((ft5.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(20 rows) - ---Testcase 188: -SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 -----+---- - 22 | - 24 | 25 - 26 | - 28 | - 30 | 31 - 32 | - 34 | - 36 | 37 - 38 | - 40 | -(10 rows) - -ALTER VIEW v4 OWNER TO regress_view_owner; ---Testcase 189: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can be pushed down - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c2'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) - -> Sort - Output: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c2'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) - Sort Key: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) - -> Merge Left Join - Output: (((ft4.fields ->> 'c1'::text))::integer), ((ft5.fields ->> 'c2'::text))::integer, ((ft5.fields ->> 'c1'::text))::integer - Merge Cond: ((((ft4.fields ->> 'c1'::text))::integer) = (((ft5.fields ->> 'c1'::text))::integer)) - -> Sort - Output: ft4.fields, (((ft4.fields ->> 'c1'::text))::integer) - Sort Key: (((ft4.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 - Output: ft4.fields, ((ft4.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: ft5.fields, (((ft5.fields ->> 'c1'::text))::integer) - Sort Key: (((ft5.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 - Output: ft5.fields, ((ft5.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(20 rows) - ---Testcase 190: -SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 -----+---- - 22 | - 24 | 25 - 26 | - 28 | - 30 | 31 - 32 | - 34 | - 36 | 37 - 38 | - 40 | -(10 rows) - ---Testcase 191: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can't be pushed down, view owner not current user - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Sort - Output: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Merge Left Join - Output: (((ft4.fields ->> 'c1'::text))::integer), ((t2.fields ->> 'c2'::text))::integer, ((t2.fields ->> 'c1'::text))::integer - Merge Cond: ((((ft4.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - -> Sort - Output: ft4.fields, (((ft4.fields ->> 'c1'::text))::integer) - Sort Key: (((ft4.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 - Output: ft4.fields, ((ft4.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(20 rows) - ---Testcase 192: -SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 -----+---- - 22 | - 24 | 25 - 26 | - 28 | - 30 | 31 - 32 | - 34 | - 36 | 37 - 38 | - 40 | -(10 rows) - -ALTER VIEW v4 OWNER TO CURRENT_USER; ---Testcase 193: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can be pushed down - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Sort - Output: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) - -> Merge Left Join - Output: (((ft4.fields ->> 'c1'::text))::integer), ((t2.fields ->> 'c2'::text))::integer, ((t2.fields ->> 'c1'::text))::integer - Merge Cond: ((((ft4.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - -> Sort - Output: ft4.fields, (((ft4.fields ->> 'c1'::text))::integer) - Sort Key: (((ft4.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 - Output: ft4.fields, ((ft4.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(20 rows) - ---Testcase 194: -SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; - c1 | c2 -----+---- - 22 | - 24 | 25 - 26 | - 28 | - 30 | 31 - 32 | - 34 | - 36 | 37 - 38 | - 40 | -(10 rows) - -ALTER VIEW v4 OWNER TO regress_view_owner; --- cleanup ---Testcase 195: -DROP OWNED BY regress_view_owner; ---Testcase 196: -DROP ROLE regress_view_owner; --- =================================================================== --- Aggregate and grouping queries --- =================================================================== --- Simple aggregates ---Testcase 197: -explain (verbose, costs off) -select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Result - Output: (count((fields ->> 'c6'::text))), (sum(((fields ->> 'C 1'::text))::integer)), (avg(((fields ->> 'C 1'::text))::integer)), (min((((fields ->> 'c2'::text)))::integer)), (max(((fields ->> 'C 1'::text))::integer)), (stddev((((fields ->> 'c2'::text)))::integer)), ((sum(((fields ->> 'C 1'::text))::integer)) * ((random() <= '1'::double precision))::integer), ((fields ->> 'c2'::text)) - -> Sort - Output: (count((fields ->> 'c6'::text))), (sum(((fields ->> 'C 1'::text))::integer)), (avg(((fields ->> 'C 1'::text))::integer)), (min((((fields ->> 'c2'::text)))::integer)), (max(((fields ->> 'C 1'::text))::integer)), (stddev((((fields ->> 'c2'::text)))::integer)), ((fields ->> 'c2'::text)) - Sort Key: (count((ft1.fields ->> 'c6'::text))), (sum(((ft1.fields ->> 'C 1'::text))::integer)) - -> HashAggregate - Output: count((fields ->> 'c6'::text)), sum(((fields ->> 'C 1'::text))::integer), avg(((fields ->> 'C 1'::text))::integer), min((((fields ->> 'c2'::text)))::integer), max(((fields ->> 'C 1'::text))::integer), stddev((((fields ->> 'c2'::text)))::integer), ((fields ->> 'c2'::text)) - Group Key: (ft1.fields ->> 'c2'::text) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 5)) -(11 rows) - ---Testcase 198: -select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2; - count | sum | avg | min | max | stddev | sum2 --------+-------+----------------------+-----+------+--------+------- - 100 | 49600 | 496.0000000000000000 | 1 | 991 | 0 | 49600 - 100 | 49700 | 497.0000000000000000 | 2 | 992 | 0 | 49700 - 100 | 49800 | 498.0000000000000000 | 3 | 993 | 0 | 49800 - 100 | 49900 | 499.0000000000000000 | 4 | 994 | 0 | 49900 - 100 | 50500 | 505.0000000000000000 | 0 | 1000 | 0 | 50500 -(5 rows) - ---Testcase 199: -explain (verbose, costs off) -select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2 limit 1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (count((fields ->> 'c6'::text))), (sum(((fields ->> 'C 1'::text))::integer)), (avg(((fields ->> 'C 1'::text))::integer)), (min((((fields ->> 'c2'::text)))::integer)), (max(((fields ->> 'C 1'::text))::integer)), (stddev((((fields ->> 'c2'::text)))::integer)), (((sum(((fields ->> 'C 1'::text))::integer)) * ((random() <= '1'::double precision))::integer)), ((fields ->> 'c2'::text)) - -> Result - Output: (count((fields ->> 'c6'::text))), (sum(((fields ->> 'C 1'::text))::integer)), (avg(((fields ->> 'C 1'::text))::integer)), (min((((fields ->> 'c2'::text)))::integer)), (max(((fields ->> 'C 1'::text))::integer)), (stddev((((fields ->> 'c2'::text)))::integer)), ((sum(((fields ->> 'C 1'::text))::integer)) * ((random() <= '1'::double precision))::integer), ((fields ->> 'c2'::text)) - -> Sort - Output: (count((fields ->> 'c6'::text))), (sum(((fields ->> 'C 1'::text))::integer)), (avg(((fields ->> 'C 1'::text))::integer)), (min((((fields ->> 'c2'::text)))::integer)), (max(((fields ->> 'C 1'::text))::integer)), (stddev((((fields ->> 'c2'::text)))::integer)), ((fields ->> 'c2'::text)) - Sort Key: (count((ft1.fields ->> 'c6'::text))), (sum(((ft1.fields ->> 'C 1'::text))::integer)) - -> HashAggregate - Output: count((fields ->> 'c6'::text)), sum(((fields ->> 'C 1'::text))::integer), avg(((fields ->> 'C 1'::text))::integer), min((((fields ->> 'c2'::text)))::integer), max(((fields ->> 'C 1'::text))::integer), stddev((((fields ->> 'c2'::text)))::integer), ((fields ->> 'c2'::text)) - Group Key: (ft1.fields ->> 'c2'::text) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 5)) -(13 rows) - ---Testcase 200: -select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2 limit 1; - count | sum | avg | min | max | stddev | sum2 --------+-------+----------------------+-----+-----+--------+------- - 100 | 49600 | 496.0000000000000000 | 1 | 991 | 0 | 49600 -(1 row) - --- Aggregate is not pushed down as aggregation contains random() ---Testcase 201: -explain (verbose, costs off) -select sum((fields->>'C 1')::int * (random() <= 1)::int) as sum, avg((fields->>'C 1')::int) from ft1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: sum((((fields ->> 'C 1'::text))::integer * ((random() <= '1'::double precision))::integer)), avg(((fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" -(5 rows) - --- Aggregate over join query ---Testcase 202: -explain (verbose, costs off) -select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 inner join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 on ((t1.c2)::int = (t2.c2)::int) where (t1.c2)::int = 6; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Aggregate - Output: count(*), sum(((t1.fields ->> 'C 1'::text))::integer), avg(((t2.fields ->> 'C 1'::text))::integer) - -> Nested Loop - Output: t1.fields, t2.fields - -> Foreign Scan on public.ft1 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" = 6)) - -> Materialize - Output: t2.fields - -> Foreign Scan on public.ft1 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" = 6)) -(12 rows) - ---Testcase 203: -select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 inner join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 on ((t1.c2)::int = (t2.c2)::int) where (t1.c2)::int = 6; - count | sum | avg --------+---------+---------------------- - 10000 | 5010000 | 501.0000000000000000 -(1 row) - --- Not pushed down due to local conditions present in underneath input rel ---Testcase 204: -explain (verbose, costs off) -select sum((t1.c1)::int), count((t2.c1)::int) from (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 inner join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (((t1.c1)::int * (t2.c1)::int)/((t1.c1)::int * (t2.c1)::int)) * random() <= 1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: sum(((t1.fields ->> 'C 1'::text))::integer), count(((t2.fields ->> 'C 1'::text))::integer) - -> Merge Join - Output: t1.fields, t2.fields - Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) - Join Filter: ((((((((t1.fields ->> 'C 1'::text))::integer) * (((t2.fields ->> 'C 1'::text))::integer)) / ((((t1.fields ->> 'C 1'::text))::integer) * (((t2.fields ->> 'C 1'::text))::integer))))::double precision * random()) <= '1'::double precision) - -> Sort - Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 t1 - Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) - Sort Key: (((t2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 t2 - Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(18 rows) - --- GROUP BY clause having expressions ---Testcase 205: -explain (verbose, costs off) -select (fields->>'c2')::int/2, sum((fields->>'c2')::int) * ((fields->>'c2')::int/2) from ft1 group by (fields->>'c2')::int/2 order by (fields->>'c2')::int/2; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text))::integer / 2)), ((sum(((fields ->> 'c2'::text))::integer) * ((((fields ->> 'c2'::text))::integer / 2)))) - Sort Key: ((((ft1.fields ->> 'c2'::text))::integer / 2)) - -> HashAggregate - Output: ((((fields ->> 'c2'::text))::integer / 2)), (sum(((fields ->> 'c2'::text))::integer) * ((((fields ->> 'c2'::text))::integer / 2))) - Group Key: (((ft1.fields ->> 'c2'::text))::integer / 2) - -> Foreign Scan on public.ft1 - Output: (((fields ->> 'c2'::text))::integer / 2), fields - InfluxDB query: SELECT * FROM "T1" -(9 rows) - ---Testcase 206: -select (fields->>'c2')::int/2, sum((fields->>'c2')::int) * ((fields->>'c2')::int/2) from ft1 group by (fields->>'c2')::int/2 order by (fields->>'c2')::int/2; - ?column? | ?column? -----------+---------- - 0 | 0 - 1 | 500 - 2 | 1800 - 3 | 3900 - 4 | 6800 -(5 rows) - --- Aggregates in subquery are pushed down. ---Testcase 207: -explain (verbose, costs off) -select count(x.a), sum(x.a) from (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2', sqrt((fields->>'C 1')::int) order by 1, 2) x; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: count(((((ft1.fields ->> 'c2'::text)))::integer)), sum(((((ft1.fields ->> 'c2'::text)))::integer)) - -> Sort - Output: ((((ft1.fields ->> 'c2'::text)))::integer), (sum(((ft1.fields ->> 'C 1'::text))::integer)), ((ft1.fields ->> 'c2'::text)), (sqrt((((ft1.fields ->> 'C 1'::text))::integer)::double precision)) - Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer), (sum(((ft1.fields ->> 'C 1'::text))::integer)) - -> HashAggregate - Output: (((ft1.fields ->> 'c2'::text)))::integer, sum(((ft1.fields ->> 'C 1'::text))::integer), ((ft1.fields ->> 'c2'::text)), (sqrt((((ft1.fields ->> 'C 1'::text))::integer)::double precision)) - Group Key: (ft1.fields ->> 'c2'::text), sqrt((((ft1.fields ->> 'C 1'::text))::integer)::double precision) - -> Foreign Scan on public.ft1 - Output: (ft1.fields ->> 'c2'::text), sqrt((((ft1.fields ->> 'C 1'::text))::integer)::double precision), ft1.fields - InfluxDB query: SELECT * FROM "T1" -(11 rows) - ---Testcase 208: -select count(x.a), sum(x.a) from (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2', sqrt((fields->>'C 1')::int) order by 1, 2) x; - count | sum --------+------ - 1000 | 4500 -(1 row) - --- Aggregate is still pushed down by taking unshippable expression out ---Testcase 209: -explain (verbose, costs off) -select (fields->>'c2')::int * (random() <= 1)::int as sum1, sum((fields->>'C 1')::int) * (fields->>'c2')::int as sum2 from ft1 group by fields->>'c2' order by 1, 2; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Sort - Output: (((((fields ->> 'c2'::text)))::integer * ((random() <= '1'::double precision))::integer)), ((sum(((fields ->> 'C 1'::text))::integer) * (((fields ->> 'c2'::text)))::integer)), ((fields ->> 'c2'::text)) - Sort Key: (((((ft1.fields ->> 'c2'::text)))::integer * ((random() <= '1'::double precision))::integer)), ((sum(((ft1.fields ->> 'C 1'::text))::integer) * (((ft1.fields ->> 'c2'::text)))::integer)) - -> HashAggregate - Output: ((((fields ->> 'c2'::text)))::integer * ((random() <= '1'::double precision))::integer), (sum(((fields ->> 'C 1'::text))::integer) * (((fields ->> 'c2'::text)))::integer), ((fields ->> 'c2'::text)) - Group Key: (ft1.fields ->> 'c2'::text) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" -(9 rows) - ---Testcase 210: -select (fields->>'c2')::int * (random() <= 1)::int as sum1, sum((fields->>'C 1')::int) * (fields->>'c2')::int as sum2 from ft1 group by fields->>'c2' order by 1, 2; - sum1 | sum2 -------+-------- - 0 | 0 - 1 | 49600 - 2 | 99400 - 3 | 149400 - 4 | 199600 - 5 | 250000 - 6 | 300600 - 7 | 351400 - 8 | 402400 - 9 | 453600 -(10 rows) - --- Aggregate with unshippable GROUP BY clause are not pushed ---Testcase 211: -explain (verbose, costs off) -select (fields->>'c2')::int * (random() <= 1)::int as c2 from ft2 group by (fields->>'c2')::int * (random() <= 1)::int order by 1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text))::integer * ((random() <= '1'::double precision))::integer)) - Sort Key: ((((ft2.fields ->> 'c2'::text))::integer * ((random() <= '1'::double precision))::integer)) - -> HashAggregate - Output: ((((fields ->> 'c2'::text))::integer * ((random() <= '1'::double precision))::integer)) - Group Key: (((ft2.fields ->> 'c2'::text))::integer * ((random() <= '1'::double precision))::integer) - -> Foreign Scan on public.ft2 - Output: (((fields ->> 'c2'::text))::integer * ((random() <= '1'::double precision))::integer) - InfluxDB query: SELECT "c2" FROM "T1" -(9 rows) - --- GROUP BY clause in various forms, cardinal, alias and constant expression ---Testcase 212: -explain (verbose, costs off) -select count(fields->>'c2') w, fields->>'c2' x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; - QUERY PLAN --------------------------------------------------------------------------------------------- - Sort - Output: (count(((fields ->> 'c2'::text)))), ((fields ->> 'c2'::text)), 5, 7.0, 9 - Sort Key: ((ft1.fields ->> 'c2'::text)) - -> HashAggregate - Output: count(((fields ->> 'c2'::text))), ((fields ->> 'c2'::text)), (5), 7.0, (9) - Group Key: (ft1.fields ->> 'c2'::text), 5, 9 - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), 5, 9, fields - InfluxDB query: SELECT * FROM "T1" -(9 rows) - ---Testcase 213: -select count(fields->>'c2') w, fields->>'c2' x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; - w | x | y | z ------+---+---+----- - 100 | 0 | 5 | 7.0 - 100 | 1 | 5 | 7.0 - 100 | 2 | 5 | 7.0 - 100 | 3 | 5 | 7.0 - 100 | 4 | 5 | 7.0 - 100 | 5 | 5 | 7.0 - 100 | 6 | 5 | 7.0 - 100 | 7 | 5 | 7.0 - 100 | 8 | 5 | 7.0 - 100 | 9 | 5 | 7.0 -(10 rows) - --- GROUP BY clause referring to same column multiple times --- Also, ORDER BY contains an aggregate function ---Testcase 214: -explain (verbose, costs off) -select (fields->>'c2')::int c2, (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int > 6 group by 1, 2 order by sum((fields->>'C 1')::int); - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (((fields ->> 'c2'::text))::integer), (((fields ->> 'c2'::text))::integer), (sum(((fields ->> 'C 1'::text))::integer)) - Sort Key: (sum(((ft1.fields ->> 'C 1'::text))::integer)) - -> HashAggregate - Output: (((fields ->> 'c2'::text))::integer), (((fields ->> 'c2'::text))::integer), sum(((fields ->> 'C 1'::text))::integer) - Group Key: ((ft1.fields ->> 'c2'::text))::integer, ((ft1.fields ->> 'c2'::text))::integer - -> Foreign Scan on public.ft1 - Output: ((fields ->> 'c2'::text))::integer, ((fields ->> 'c2'::text))::integer, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" > 6)) -(9 rows) - ---Testcase 215: -select (fields->>'c2')::int c2, (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int > 6 group by 1, 2 order by sum((fields->>'C 1')::int); - c2 | c2 -----+---- - 7 | 7 - 8 | 8 - 9 | 9 -(3 rows) - --- Testing HAVING clause shippability ---Testcase 216: -explain (verbose, costs off) -select(fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft2 group by fields->>'c2' having avg((fields->>'C 1')::int) < 500 and sum((fields->>'C 1')::int) < 49800 order by (fields->>'c2')::int; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text)))::integer), (sum(((fields ->> 'C 1'::text))::integer)), ((fields ->> 'c2'::text)) - Sort Key: ((((ft2.fields ->> 'c2'::text)))::integer) - -> HashAggregate - Output: (((fields ->> 'c2'::text)))::integer, sum(((fields ->> 'C 1'::text))::integer), ((fields ->> 'c2'::text)) - Group Key: (ft2.fields ->> 'c2'::text) - Filter: ((avg(((ft2.fields ->> 'C 1'::text))::integer) < '500'::numeric) AND (sum(((ft2.fields ->> 'C 1'::text))::integer) < 49800)) - -> Foreign Scan on public.ft2 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" -(10 rows) - ---Testcase 217: -select(fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft2 group by fields->>'c2' having avg((fields->>'C 1')::int) < 500 and sum((fields->>'C 1')::int) < 49800 order by (fields->>'c2')::int; - c2 | sum -----+------- - 1 | 49600 - 2 | 49700 -(2 rows) - --- Unshippable HAVING clause will be evaluated locally, and other qual in HAVING clause is pushed down ---Testcase 218: -explain (verbose, costs off) -select count(*) from (select time, count((fields->>'C 1')::int) from ft1 group by time, sqrt((fields->>'c2')::int) having (avg((fields->>'C 1')::int) / avg((fields->>'C 1')::int)) * random() <= 1 and avg((fields->>'C 1')::int) < 500) x; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: count(*) - -> HashAggregate - Output: ft1."time", NULL::bigint, (sqrt((((ft1.fields ->> 'c2'::text))::integer)::double precision)) - Group Key: ft1."time", sqrt((((ft1.fields ->> 'c2'::text))::integer)::double precision) - Filter: ((avg(((ft1.fields ->> 'C 1'::text))::integer) < '500'::numeric) AND ((((avg(((ft1.fields ->> 'C 1'::text))::integer) / avg(((ft1.fields ->> 'C 1'::text))::integer)))::double precision * random()) <= '1'::double precision)) - -> Foreign Scan on public.ft1 - Output: ft1."time", sqrt((((ft1.fields ->> 'c2'::text))::integer)::double precision), ft1.fields - InfluxDB query: SELECT * FROM "T1" -(9 rows) - ---Testcase 219: -select count(*) from (select time, count((fields->>'C 1')::int) from ft1 group by time, sqrt((fields->>'c2')::int) having (avg((fields->>'C 1')::int) / avg((fields->>'C 1')::int)) * random() <= 1 and avg((fields->>'C 1')::int) < 500) x; - count -------- - 49 -(1 row) - --- Aggregate in HAVING clause is not pushable, and thus aggregation is not pushed down ---Testcase 220: -explain (verbose, costs off) -select sum((fields->>'C 1')::int) from ft1 group by fields->>'c2' having avg((fields->>'C 1')::int * (random() <= 1)::int) > 100 order by 1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (sum(((fields ->> 'C 1'::text))::integer)), ((fields ->> 'c2'::text)) - Sort Key: (sum(((ft1.fields ->> 'C 1'::text))::integer)) - -> HashAggregate - Output: sum(((fields ->> 'C 1'::text))::integer), ((fields ->> 'c2'::text)) - Group Key: (ft1.fields ->> 'c2'::text) - Filter: (avg((((ft1.fields ->> 'C 1'::text))::integer * ((random() <= '1'::double precision))::integer)) > '100'::numeric) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" -(10 rows) - --- Remote aggregate in combination with a local Param (for the output --- of an initplan) can be trouble, per bug #15781 ---Testcase 221: -explain (verbose, costs off) -select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1; - QUERY PLAN --------------------------------------------------------------- - Foreign Scan - Output: $0, (sum(((ft1.fields ->> 'C 1'::text))::integer)) - InfluxDB query: SELECT sum("C 1") FROM "T1" - InitPlan 1 (returns $0) - -> Seq Scan on pg_catalog.pg_enum -(5 rows) - ---Testcase 222: -select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1; - exists | sum ---------+-------- - t | 500500 -(1 row) - ---Testcase 223: -explain (verbose, costs off) -select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1 group by 1; - QUERY PLAN --------------------------------------------------------------- - GroupAggregate - Output: ($0), sum(((ft1.fields ->> 'C 1'::text))::integer) - Group Key: $0 - InitPlan 1 (returns $0) - -> Seq Scan on pg_catalog.pg_enum - -> Foreign Scan on public.ft1 - Output: $0, ft1.fields - InfluxDB query: SELECT * FROM "T1" -(8 rows) - ---Testcase 224: -select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1 group by 1; - exists | sum ---------+-------- - t | 500500 -(1 row) - --- Testing ORDER BY, DISTINCT, FILTER, Ordered-sets and VARIADIC within aggregates --- ORDER BY within aggregate, same column used to order ---Testcase 225: -explain (verbose, costs off) -select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int) from ft1 where (fields->>'C 1')::int < 100 group by fields->>'c2' order by 1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (array_agg(((fields ->> 'C 1'::text))::integer ORDER BY ((fields ->> 'C 1'::text))::integer)), ((fields ->> 'c2'::text)) - Sort Key: (array_agg(((ft1.fields ->> 'C 1'::text))::integer ORDER BY ((ft1.fields ->> 'C 1'::text))::integer)) - -> GroupAggregate - Output: array_agg(((fields ->> 'C 1'::text))::integer ORDER BY ((fields ->> 'C 1'::text))::integer), ((fields ->> 'c2'::text)) - Group Key: ((ft1.fields ->> 'c2'::text)) - -> Sort - Output: ((fields ->> 'c2'::text)), fields - Sort Key: ((ft1.fields ->> 'c2'::text)) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) -(12 rows) - ---Testcase 226: -select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int) from ft1 where (fields->>'C 1')::int < 100 group by fields->>'c2' order by 1; - array_agg --------------------------------- - {1,11,21,31,41,51,61,71,81,91} - {2,12,22,32,42,52,62,72,82,92} - {3,13,23,33,43,53,63,73,83,93} - {4,14,24,34,44,54,64,74,84,94} - {5,15,25,35,45,55,65,75,85,95} - {6,16,26,36,46,56,66,76,86,96} - {7,17,27,37,47,57,67,77,87,97} - {8,18,28,38,48,58,68,78,88,98} - {9,19,29,39,49,59,69,79,89,99} - {10,20,30,40,50,60,70,80,90} -(10 rows) - --- ORDER BY within aggregate, different column used to order also using DESC ---Testcase 227: -explain (verbose, costs off) -select array_agg(time order by (fields->>'C 1')::int desc) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 50; - QUERY PLAN ----------------------------------------------------------------------------------- - Aggregate - Output: array_agg("time" ORDER BY ((fields ->> 'C 1'::text))::integer DESC) - -> Foreign Scan on public.ft2 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 50)) AND (("c2" = 6)) -(5 rows) - ---Testcase 228: -select array_agg(time order by (fields->>'C 1')::int desc) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 50; - array_agg ------------------------------------------------------------------------------------------------------------------------------------------- - {"Mon Feb 16 00:00:00 1970","Fri Feb 06 00:00:00 1970","Tue Jan 27 00:00:00 1970","Sat Jan 17 00:00:00 1970","Wed Jan 07 00:00:00 1970"} -(1 row) - --- DISTINCT within aggregate ---Testcase 229: -explain (verbose, costs off) -select array_agg(distinct ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5))), ((((t2.fields ->> 'c1'::text))::integer % 3)) - Sort Key: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5))) - -> GroupAggregate - Output: array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5)), ((((t2.fields ->> 'c1'::text))::integer % 3)) - Group Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) - -> Sort - Output: ((((t2.fields ->> 'c1'::text))::integer % 3)), t1.fields - Sort Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) - -> Merge Full Join - Output: (((t2.fields ->> 'c1'::text))::integer % 3), t1.fields - Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - Filter: ((((t1.fields ->> 'c1'::text))::integer < 20) OR ((((t1.fields ->> 'c1'::text))::integer IS NULL) AND (((t2.fields ->> 'c1'::text))::integer < 5))) - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(25 rows) - ---Testcase 230: -select array_agg(distinct ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; - array_agg --------------- - {0,1,2,3,4} - {1,2,3,NULL} -(2 rows) - --- DISTINCT combined with ORDER BY within aggregate ---Testcase 231: -explain (verbose, costs off) -select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5))), ((((t2.fields ->> 'c1'::text))::integer % 3)) - Sort Key: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5))) - -> GroupAggregate - Output: array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5)), ((((t2.fields ->> 'c1'::text))::integer % 3)) - Group Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) - -> Sort - Output: ((((t2.fields ->> 'c1'::text))::integer % 3)), t1.fields - Sort Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) - -> Merge Full Join - Output: (((t2.fields ->> 'c1'::text))::integer % 3), t1.fields - Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - Filter: ((((t1.fields ->> 'c1'::text))::integer < 20) OR ((((t1.fields ->> 'c1'::text))::integer IS NULL) AND (((t2.fields ->> 'c1'::text))::integer < 5))) - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(25 rows) - ---Testcase 232: -select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; - array_agg --------------- - {0,1,2,3,4} - {1,2,3,NULL} -(2 rows) - ---Testcase 233: -explain (verbose, costs off) -select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5 desc nulls last) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Sort - Output: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5) DESC NULLS LAST)), ((((t2.fields ->> 'c1'::text))::integer % 3)) - Sort Key: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5) DESC NULLS LAST)) - -> GroupAggregate - Output: array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5) DESC NULLS LAST), ((((t2.fields ->> 'c1'::text))::integer % 3)) - Group Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) - -> Sort - Output: ((((t2.fields ->> 'c1'::text))::integer % 3)), t1.fields - Sort Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) - -> Merge Full Join - Output: (((t2.fields ->> 'c1'::text))::integer % 3), t1.fields - Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - Filter: ((((t1.fields ->> 'c1'::text))::integer < 20) OR ((((t1.fields ->> 'c1'::text))::integer IS NULL) AND (((t2.fields ->> 'c1'::text))::integer < 5))) - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(25 rows) - ---Testcase 234: -select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5 desc nulls last) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; - array_agg --------------- - {3,2,1,NULL} - {4,3,2,1,0} -(2 rows) - --- FILTER within aggregate ---Testcase 235: -explain (verbose, costs off) -select sum((fields->>'C 1')::int) filter (where (fields->>'C 1')::int < 100 and (fields->>'c2')::int > 5) from ft1 group by fields->>'c2' order by 1 nulls last; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (sum(((fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((fields ->> 'C 1'::text))::integer < 100) AND ((((fields ->> 'c2'::text)))::integer > 5)))), ((fields ->> 'c2'::text)) - Sort Key: (sum(((ft1.fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((ft1.fields ->> 'C 1'::text))::integer < 100) AND ((((ft1.fields ->> 'c2'::text)))::integer > 5)))) - -> HashAggregate - Output: sum(((fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((fields ->> 'C 1'::text))::integer < 100) AND ((((fields ->> 'c2'::text)))::integer > 5))), ((fields ->> 'c2'::text)) - Group Key: (ft1.fields ->> 'c2'::text) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" -(9 rows) - ---Testcase 236: -select sum((fields->>'C 1')::int) filter (where (fields->>'C 1')::int < 100 and (fields->>'c2')::int > 5) from ft1 group by fields->>'c2' order by 1 nulls last; - sum ------ - 510 - 520 - 530 - 540 - - - - - - -(10 rows) - --- DISTINCT, ORDER BY and FILTER within aggregate ---Testcase 237: -explain (verbose, costs off) -select sum((fields->>'C 1')::int%3), sum(distinct (fields->>'C 1')::int%3 order by (fields->>'C 1')::int%3) filter (where (fields->>'C 1')::int%3 < 2), (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int = 6 group by fields->>'c2'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - GroupAggregate - Output: sum((((fields ->> 'C 1'::text))::integer % 3)), sum(DISTINCT (((fields ->> 'C 1'::text))::integer % 3) ORDER BY (((fields ->> 'C 1'::text))::integer % 3)) FILTER (WHERE ((((fields ->> 'C 1'::text))::integer % 3) < 2)), (((fields ->> 'c2'::text)))::integer, ((fields ->> 'c2'::text)) - Group Key: ((ft1.fields ->> 'c2'::text)) - -> Sort - Output: ((fields ->> 'c2'::text)), fields - Sort Key: ((ft1.fields ->> 'c2'::text)) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" = 6)) -(9 rows) - ---Testcase 238: -select sum((fields->>'C 1')::int%3), sum(distinct (fields->>'C 1')::int%3 order by (fields->>'C 1')::int%3) filter (where (fields->>'C 1')::int%3 < 2), (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int = 6 group by fields->>'c2'; - sum | sum | c2 ------+-----+---- - 99 | 1 | 6 -(1 row) - --- Outer query is aggregation query ---Testcase 239: -explain (verbose, costs off) -select distinct (select count(*) filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Unique - Output: ((SubPlan 1)) - -> Sort - Output: ((SubPlan 1)) - Sort Key: ((SubPlan 1)) - -> Aggregate - Output: (SubPlan 1) - -> Foreign Scan on public.ft2 t2 - Output: t2."time", t2.tags, t2.fields - InfluxDB query: SELECT * FROM "T1" WHERE ((("c2" % 6) = 0)) - SubPlan 1 - -> Foreign Scan on public.ft1 t1 - Output: count(*) FILTER (WHERE ((((t2.fields ->> 'c2'::text))::integer = 6) AND (((t2.fields ->> 'C 1'::text))::integer < 10))) - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 6)) -(14 rows) - ---Testcase 240: -select distinct (select count(*) filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; - count -------- - 1 -(1 row) - --- Inner query is aggregation query ---Testcase 241: -explain (verbose, costs off) -select distinct (select count(t1.fields->>'C 1') filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Unique - Output: ((SubPlan 1)) - -> Sort - Output: ((SubPlan 1)) - Sort Key: ((SubPlan 1)) - -> Foreign Scan on public.ft2 t2 - Output: (SubPlan 1) - InfluxDB query: SELECT * FROM "T1" WHERE ((("c2" % 6) = 0)) - SubPlan 1 - -> Aggregate - Output: count((t1.fields ->> 'C 1'::text)) FILTER (WHERE ((((t2.fields ->> 'c2'::text))::integer = 6) AND (((t2.fields ->> 'C 1'::text))::integer < 10))) - -> Foreign Scan on public.ft1 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 6)) -(14 rows) - ---Testcase 242: -select distinct (select count(t1.fields->>'C 1') filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; - count -------- - 0 - 1 -(2 rows) - --- Aggregate not pushed down as FILTER condition is not pushable ---Testcase 243: -explain (verbose, costs off) -select sum((fields->>'C 1')::int) filter (where ((fields->>'C 1')::int / (fields->>'C 1')::int) * random() <= 1) from ft1 group by fields->>'c2' order by 1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (sum(((fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((((fields ->> 'C 1'::text))::integer / ((fields ->> 'C 1'::text))::integer))::double precision * random()) <= '1'::double precision))), ((fields ->> 'c2'::text)) - Sort Key: (sum(((ft1.fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((((ft1.fields ->> 'C 1'::text))::integer / ((ft1.fields ->> 'C 1'::text))::integer))::double precision * random()) <= '1'::double precision))) - -> HashAggregate - Output: sum(((fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((((fields ->> 'C 1'::text))::integer / ((fields ->> 'C 1'::text))::integer))::double precision * random()) <= '1'::double precision)), ((fields ->> 'c2'::text)) - Group Key: (ft1.fields ->> 'c2'::text) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" -(9 rows) - ---Testcase 244: -explain (verbose, costs off) -select sum((fields->>'c2')::int) filter (where (fields->>'c2')::int in (select (fields->>'c2')::int from ft1 where (fields->>'c2')::int < 5)) from ft1; - QUERY PLAN ------------------------------------------------------------------------------------------ - Aggregate - Output: sum(((ft1.fields ->> 'c2'::text))::integer) FILTER (WHERE (hashed SubPlan 1)) - -> Foreign Scan on public.ft1 - Output: ft1."time", ft1.tags, ft1.fields - InfluxDB query: SELECT * FROM "T1" - SubPlan 1 - -> Foreign Scan on public.ft1 ft1_1 - Output: ((ft1_1.fields ->> 'c2'::text))::integer - InfluxDB query: SELECT "c2" FROM "T1" WHERE (("c2" < 5)) -(9 rows) - --- Ordered-sets within aggregate ---Testcase 245: -explain (verbose, costs off) -select (fields->>'c2')::int c2, rank('10'::varchar) within group (order by fields->>'c6'), percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' having percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) < 500 order by (fields->>'c2')::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text)))::integer), (rank('10'::text) WITHIN GROUP (ORDER BY (fields ->> 'c6'::text))), (percentile_cont(((((((fields ->> 'c2'::text)))::integer)::numeric / '10'::numeric))::double precision) WITHIN GROUP (ORDER BY ((((fields ->> 'C 1'::text))::integer)::double precision))), ((fields ->> 'c2'::text)) - Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) - -> GroupAggregate - Output: (((fields ->> 'c2'::text)))::integer, rank('10'::text) WITHIN GROUP (ORDER BY (fields ->> 'c6'::text)), percentile_cont(((((((fields ->> 'c2'::text)))::integer)::numeric / '10'::numeric))::double precision) WITHIN GROUP (ORDER BY ((((fields ->> 'C 1'::text))::integer)::double precision)), ((fields ->> 'c2'::text)) - Group Key: ((ft1.fields ->> 'c2'::text)) - Filter: (percentile_cont(((((((ft1.fields ->> 'c2'::text)))::integer)::numeric / '10'::numeric))::double precision) WITHIN GROUP (ORDER BY ((((ft1.fields ->> 'C 1'::text))::integer)::double precision)) < '500'::double precision) - -> Sort - Output: ((fields ->> 'c2'::text)), fields - Sort Key: ((ft1.fields ->> 'c2'::text)) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 10)) -(13 rows) - ---Testcase 246: -select (fields->>'c2')::int c2, rank('10'::varchar) within group (order by fields->>'c6'), percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' having percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) < 500 order by (fields->>'c2')::int; - c2 | rank | percentile_cont -----+------+----------------- - 0 | 101 | 10 - 1 | 101 | 100 - 2 | 1 | 200 - 3 | 1 | 300 - 4 | 1 | 400 -(5 rows) - --- Using multiple arguments within aggregates ---Testcase 247: -explain (verbose, costs off) -select (fields->>'C 1')::int c1, rank(fields->>'C 1', fields->>'c2') within group (order by fields->>'C 1', fields->>'c2') from ft1 group by fields->>'C 1', fields->>'c2' having (fields->>'C 1')::int = 6 order by 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - GroupAggregate - Output: (((fields ->> 'C 1'::text)))::integer, rank(((fields ->> 'C 1'::text)), ((fields ->> 'c2'::text))) WITHIN GROUP (ORDER BY ((fields ->> 'C 1'::text)), ((fields ->> 'c2'::text))), ((fields ->> 'C 1'::text)), ((fields ->> 'c2'::text)) - Group Key: ((ft1.fields ->> 'C 1'::text)), ((ft1.fields ->> 'c2'::text)) - -> Sort - Output: ((fields ->> 'C 1'::text)), ((fields ->> 'c2'::text)), fields - Sort Key: ((ft1.fields ->> 'C 1'::text)), ((ft1.fields ->> 'c2'::text)) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'C 1'::text), (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 6)) -(9 rows) - ---Testcase 248: -select (fields->>'C 1')::int c1, rank(fields->>'C 1', fields->>'c2') within group (order by fields->>'C 1', fields->>'c2') from ft1 group by fields->>'C 1', fields->>'c2' having (fields->>'C 1')::int = 6 order by 1; - c1 | rank -----+------ - 6 | 1 -(1 row) - --- User defined function for user defined aggregate, VARIADIC ---Testcase 249: -create function least_accum(anyelement, variadic anyarray) -returns anyelement language sql as - 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; ---Testcase 250: -create aggregate least_agg(variadic items anyarray) ( - stype = anyelement, sfunc = least_accum -); --- Disable hash aggregation for plan stability. -set enable_hashagg to false; --- Not pushed down due to user defined aggregate ---Testcase 251: -explain (verbose, costs off) -select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 group by fields->>'c2' order by (fields->>'c2')::int; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text)))::integer), (least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer])), ((fields ->> 'c2'::text)) - Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) - -> GroupAggregate - Output: (((fields ->> 'c2'::text)))::integer, least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer]), ((fields ->> 'c2'::text)) - Group Key: ((ft1.fields ->> 'c2'::text)) - -> Sort - Output: ((fields ->> 'c2'::text)), fields - Sort Key: ((ft1.fields ->> 'c2'::text)) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" -(12 rows) - --- Add function and aggregate into extension -alter extension influxdb_fdw add function least_accum(anyelement, variadic anyarray); -alter extension influxdb_fdw add aggregate least_agg(variadic items anyarray); --- Now aggregate will be pushed. Aggregate will display VARIADIC argument. ---Testcase 252: -explain (verbose, costs off) -select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 100 group by fields->>'c2' order by (fields->>'c2')::int; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text)))::integer), (least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer])), ((fields ->> 'c2'::text)) - Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) - -> GroupAggregate - Output: (((fields ->> 'c2'::text)))::integer, least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer]), ((fields ->> 'c2'::text)) - Group Key: ((ft1.fields ->> 'c2'::text)) - -> Sort - Output: ((fields ->> 'c2'::text)), fields - Sort Key: ((ft1.fields ->> 'c2'::text)) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 100)) -(12 rows) - ---Testcase 253: -select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 100 group by fields->>'c2' order by (fields->>'c2')::int; - c2 | least_agg -----+----------- - 0 | 10 - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 5 - 6 | 6 - 7 | 7 - 8 | 8 - 9 | 9 -(10 rows) - --- Remove function and aggregate from extension -alter extension influxdb_fdw drop function least_accum(anyelement, variadic anyarray); -alter extension influxdb_fdw drop aggregate least_agg(variadic items anyarray); --- Not pushed down as we have dropped objects from extension. ---Testcase 254: -explain (verbose, costs off) -select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 group by fields->>'c2' order by (fields->>'c2')::int; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text)))::integer), (least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer])), ((fields ->> 'c2'::text)) - Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) - -> GroupAggregate - Output: (((fields ->> 'c2'::text)))::integer, least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer]), ((fields ->> 'c2'::text)) - Group Key: ((ft1.fields ->> 'c2'::text)) - -> Sort - Output: ((fields ->> 'c2'::text)), fields - Sort Key: ((ft1.fields ->> 'c2'::text)) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" -(12 rows) - --- Cleanup -reset enable_hashagg; ---Testcase 255: -drop aggregate least_agg(variadic items anyarray); ---Testcase 256: -drop function least_accum(anyelement, variadic anyarray); --- Testing USING OPERATOR() in ORDER BY within aggregate. --- For this, we need user defined operators along with operator family and --- operator class. Create those and then add them in extension. Note that --- user defined objects are considered unshippable unless they are part of --- the extension. ---Testcase 257: -create operator public.<^ ( - leftarg = int4, - rightarg = int4, - procedure = int4eq -); ---Testcase 258: -create operator public.=^ ( - leftarg = int4, - rightarg = int4, - procedure = int4lt -); ---Testcase 259: -create operator public.>^ ( - leftarg = int4, - rightarg = int4, - procedure = int4gt -); ---Testcase 260: -create operator family my_op_family using btree; ---Testcase 261: -create function my_op_cmp(a int, b int) returns int as - $$begin return btint4cmp(a, b); end $$ language plpgsql; ---Testcase 262: -create operator class my_op_class for type int using btree family my_op_family as - operator 1 public.<^, - operator 3 public.=^, - operator 5 public.>^, - function 1 my_op_cmp(int, int); --- This will not be pushed as user defined sort operator is not part of the --- extension yet. ---Testcase 263: -explain (verbose, costs off) -select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - GroupAggregate - Output: array_agg(((fields ->> 'C 1'::text))::integer ORDER BY ((fields ->> 'C 1'::text))::integer USING <^ NULLS LAST), ((fields ->> 'c2'::text)) - Group Key: ((ft2.fields ->> 'c2'::text)) - -> Sort - Output: ((fields ->> 'c2'::text)), fields - Sort Key: ((ft2.fields ->> 'c2'::text)) - -> Foreign Scan on public.ft2 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) -(9 rows) - --- Update local stats on ft2 ---ANALYZE ft2; --- Add into extension -alter extension influxdb_fdw add operator class my_op_class using btree; -alter extension influxdb_fdw add function my_op_cmp(a int, b int); -alter extension influxdb_fdw add operator family my_op_family using btree; -alter extension influxdb_fdw add operator public.<^(int, int); -alter extension influxdb_fdw add operator public.=^(int, int); -alter extension influxdb_fdw add operator public.>^(int, int); --- Now this will be pushed as sort operator is part of the extension. ---Testcase 264: -explain (verbose, costs off) -select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - GroupAggregate - Output: array_agg(((fields ->> 'C 1'::text))::integer ORDER BY ((fields ->> 'C 1'::text))::integer USING <^ NULLS LAST), ((fields ->> 'c2'::text)) - Group Key: ((ft2.fields ->> 'c2'::text)) - -> Sort - Output: ((fields ->> 'c2'::text)), fields - Sort Key: ((ft2.fields ->> 'c2'::text)) - -> Foreign Scan on public.ft2 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) -(9 rows) - ---Testcase 265: -select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; - array_agg --------------------------------- - {6,16,26,36,46,56,66,76,86,96} -(1 row) - --- Remove from extension -alter extension influxdb_fdw drop operator class my_op_class using btree; -alter extension influxdb_fdw drop function my_op_cmp(a int, b int); -alter extension influxdb_fdw drop operator family my_op_family using btree; -alter extension influxdb_fdw drop operator public.<^(int, int); -alter extension influxdb_fdw drop operator public.=^(int, int); -alter extension influxdb_fdw drop operator public.>^(int, int); --- This will not be pushed as sort operator is now removed from the extension. ---Testcase 266: -explain (verbose, costs off) -select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - GroupAggregate - Output: array_agg(((fields ->> 'C 1'::text))::integer ORDER BY ((fields ->> 'C 1'::text))::integer USING <^ NULLS LAST), ((fields ->> 'c2'::text)) - Group Key: ((ft2.fields ->> 'c2'::text)) - -> Sort - Output: ((fields ->> 'c2'::text)), fields - Sort Key: ((ft2.fields ->> 'c2'::text)) - -> Foreign Scan on public.ft2 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) -(9 rows) - --- Cleanup ---Testcase 267: -drop operator class my_op_class using btree; ---Testcase 268: -drop function my_op_cmp(a int, b int); ---Testcase 269: -drop operator family my_op_family using btree; ---Testcase 270: -drop operator public.>^(int, int); ---Testcase 271: -drop operator public.=^(int, int); ---Testcase 272: -drop operator public.<^(int, int); --- Input relation to aggregate push down hook is not safe to pushdown and thus --- the aggregate cannot be pushed down to foreign server. ---Testcase 273: -explain (verbose, costs off) -select count(t1.c3) from ((SELECT fields->>'C 1' c1, fields->>'c2' c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2)) t1 left join ((SELECT fields->>'C 1' c1, fields->>'c2' c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2)) t2 on ((t1.c1)::int = random() * (t2.c2)::int); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: count((ft2.tags ->> 'c3'::text)) - -> Nested Loop Left Join - Output: ft2.tags - Join Filter: ((((ft2.fields ->> 'C 1'::text))::integer)::double precision = (random() * (((ft2_1.fields ->> 'c2'::text))::integer)::double precision)) - -> Foreign Scan on public.ft2 - Output: ft2."time", ft2.tags, ft2.fields - InfluxDB query: SELECT * FROM "T1" - -> Materialize - Output: ft2_1.fields - -> Foreign Scan on public.ft2 ft2_1 - Output: ft2_1.fields - InfluxDB query: SELECT * FROM "T1" -(13 rows) - --- Subquery in FROM clause having aggregate ---Testcase 274: -explain (verbose, costs off) -select count(*), x.b from ft1, (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2') x where (ft1.fields->>'c2')::int = x.a group by x.b order by 1, 2; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (count(*)), x.b - Sort Key: (count(*)), x.b - -> HashAggregate - Output: count(*), x.b - Group Key: x.b - -> Merge Join - Output: x.b - Merge Cond: (x.a = (((ft1.fields ->> 'c2'::text))::integer)) - -> Sort - Output: x.b, x.a - Sort Key: x.a - -> Subquery Scan on x - Output: x.b, x.a - -> HashAggregate - Output: (((ft1_1.fields ->> 'c2'::text)))::integer, sum(((ft1_1.fields ->> 'C 1'::text))::integer), ((ft1_1.fields ->> 'c2'::text)) - Group Key: (ft1_1.fields ->> 'c2'::text) - -> Foreign Scan on public.ft1 ft1_1 - Output: (ft1_1.fields ->> 'c2'::text), ft1_1.fields - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: ft1.fields, (((ft1.fields ->> 'c2'::text))::integer) - Sort Key: (((ft1.fields ->> 'c2'::text))::integer) - -> Foreign Scan on public.ft1 - Output: ft1.fields, ((ft1.fields ->> 'c2'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(26 rows) - ---Testcase 275: -select count(*), x.b from ft1, (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2') x where (ft1.fields->>'c2')::int = x.a group by x.b order by 1, 2; - count | b --------+------- - 100 | 49600 - 100 | 49700 - 100 | 49800 - 100 | 49900 - 100 | 50000 - 100 | 50100 - 100 | 50200 - 100 | 50300 - 100 | 50400 - 100 | 50500 -(10 rows) - --- FULL join with IS NULL check in HAVING ---Testcase 276: -explain (verbose, costs off) -select avg((t1.c1)::int), sum((t2.c1)::int) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) group by t2.c1 having (avg((t1.c1)::int) is null and sum((t2.c1)::int) < 10) or sum((t2.c1)::int) is null order by 1 nulls last, 2; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (avg(((t1.fields ->> 'c1'::text))::integer)), (sum((((t2.fields ->> 'c1'::text))::integer))), (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (avg(((t1.fields ->> 'c1'::text))::integer)), (sum((((t2.fields ->> 'c1'::text))::integer))) - -> HashAggregate - Output: avg(((t1.fields ->> 'c1'::text))::integer), sum((((t2.fields ->> 'c1'::text))::integer)), (((t2.fields ->> 'c1'::text))::integer) - Group Key: ((t2.fields ->> 'c1'::text))::integer - Filter: (((avg(((t1.fields ->> 'c1'::text))::integer) IS NULL) AND (sum((((t2.fields ->> 'c1'::text))::integer)) < 10)) OR (sum((((t2.fields ->> 'c1'::text))::integer)) IS NULL)) - -> Merge Full Join - Output: ((t2.fields ->> 'c1'::text))::integer, t1.fields, t2.fields - Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) - Sort Key: (((t1.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T3" - -> Sort - Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) - Sort Key: (((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft5 t2 - Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer - InfluxDB query: SELECT * FROM "T4" -(22 rows) - ---Testcase 277: -select avg((t1.c1)::int), sum((t2.c1)::int) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) group by t2.c1 having (avg((t1.c1)::int) is null and sum((t2.c1)::int) < 10) or sum((t2.c1)::int) is null order by 1 nulls last, 2; - avg | sum ----------------------+----- - 51.0000000000000000 | - | 3 - | 9 -(3 rows) - --- Aggregate over FULL join needing to deparse the joining relations as --- subqueries. ---Testcase 278: -explain (verbose, costs off) -select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 full join (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 on ((t1.c1)::int = (t2.c1)::int); - QUERY PLAN ------------------------------------------------------------------------------------------------------------- - Aggregate - Output: count(*), sum(((t1.fields ->> 'c1'::text))::integer), avg(((t2.fields ->> 'c1'::text))::integer) - -> Hash Full Join - Output: t1.fields, t2.fields - Hash Cond: (((t1.fields ->> 'c1'::text))::integer = ((t2.fields ->> 'c1'::text))::integer) - -> Foreign Scan on public.ft4 t1 - Output: t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) - -> Hash - Output: t2.fields - -> Foreign Scan on public.ft5 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) -(13 rows) - ---Testcase 279: -select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 full join (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 on ((t1.c1)::int = (t2.c1)::int); - count | sum | avg --------+-----+--------------------- - 8 | 330 | 55.5000000000000000 -(1 row) - --- ORDER BY expression is part of the target list but not pushed down to --- foreign server. ---Testcase 280: -explain (verbose, costs off) -select sum((fields->>'c2')::int) * (random() <= 1)::int as sum from ft1 order by 1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------- - Sort - Output: (((sum(((fields ->> 'c2'::text))::integer)) * ((random() <= '1'::double precision))::integer)) - Sort Key: (((sum(((ft1.fields ->> 'c2'::text))::integer)) * ((random() <= '1'::double precision))::integer)) - -> Foreign Scan - Output: ((sum(((fields ->> 'c2'::text))::integer)) * ((random() <= '1'::double precision))::integer) - InfluxDB query: SELECT sum("c2") FROM "T1" -(6 rows) - ---Testcase 281: -select sum((fields->>'c2')::int) * (random() <= 1)::int as sum from ft1 order by 1; - sum ------- - 4500 -(1 row) - --- LATERAL join, with parameterization -set enable_hashagg to false; ---Testcase 282: -explain (verbose, costs off) -select (fields->>'c2')::int c2, sum from "S 1"."T 1" t1, lateral (select sum((t2.fields->>'C 1')::int + (t1.fields->>'C 1')::int) sum from ft2 t2 group by t2.fields->>'C 1') qry where (t1.fields->>'c2')::int * 2 = qry.sum and (t1.fields->>'c2')::int < 3 and (t1.fields->>'C 1')::int < 100 order by 1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Sort - Output: (((t1.fields ->> 'c2'::text))::integer), qry.sum - Sort Key: (((t1.fields ->> 'c2'::text))::integer) - -> Nested Loop - Output: ((t1.fields ->> 'c2'::text))::integer, qry.sum - -> Foreign Scan on "S 1"."T 1" t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 3)) AND (("C 1" < 100)) - -> Subquery Scan on qry - Output: qry.sum, ((t2.fields ->> 'C 1'::text)) - Filter: ((((t1.fields ->> 'c2'::text))::integer * 2) = qry.sum) - -> GroupAggregate - Output: sum(((((t2.fields ->> 'C 1'::text)))::integer + ((t1.fields ->> 'C 1'::text))::integer)), ((t2.fields ->> 'C 1'::text)) - Group Key: ((t2.fields ->> 'C 1'::text)) - -> Sort - Output: ((t2.fields ->> 'C 1'::text)), t2.fields - Sort Key: ((t2.fields ->> 'C 1'::text)) - -> Foreign Scan on public.ft2 t2 - Output: (t2.fields ->> 'C 1'::text), t2.fields - InfluxDB query: SELECT * FROM "T1" -(20 rows) - ---Testcase 283: -select (fields->>'c2')::int c2, sum from "S 1"."T 1" t1, lateral (select sum((t2.fields->>'C 1')::int + (t1.fields->>'C 1')::int) sum from ft2 t2 group by t2.fields->>'C 1') qry where (t1.fields->>'c2')::int * 2 = qry.sum and (t1.fields->>'c2')::int < 3 and (t1.fields->>'C 1')::int < 100 order by 1; - c2 | sum -----+----- - 1 | 2 - 2 | 4 -(2 rows) - -reset enable_hashagg; --- bug #15613: bad plan for foreign table scan with lateral reference ---Testcase 284: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT (ref_0.fields->>'c2')::int c2, subq_1.* -FROM - "S 1"."T 1" AS ref_0, - LATERAL ( - SELECT (ref_0.fields->>'C 1')::int c1, subq_0.* - FROM (SELECT (ref_0.fields->>'c2')::int c2, ref_1.tags->>'c3' c3 - FROM ft1 AS ref_1) AS subq_0 - RIGHT JOIN ft2 AS ref_3 ON (subq_0.c3 = ref_3.tags->>'c3') - ) AS subq_1 -WHERE (ref_0.fields->>'C 1')::int < 10 AND subq_1.c3 = '00001' -ORDER BY (ref_0.fields->>'C 1')::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: (((ref_0.fields ->> 'c2'::text))::integer), (((ref_0.fields ->> 'C 1'::text))::integer), (((ref_0.fields ->> 'c2'::text))::integer), ((ref_1.tags ->> 'c3'::text)), (((ref_0.fields ->> 'C 1'::text))::integer) - Sort Key: (((ref_0.fields ->> 'C 1'::text))::integer) - -> Nested Loop - Output: ((ref_0.fields ->> 'c2'::text))::integer, ((ref_0.fields ->> 'C 1'::text))::integer, (((ref_0.fields ->> 'c2'::text))::integer), (ref_1.tags ->> 'c3'::text), ((ref_0.fields ->> 'C 1'::text))::integer - -> Nested Loop - Output: ref_0.fields, ref_1.tags, (((ref_0.fields ->> 'c2'::text))::integer) - -> Foreign Scan on "S 1"."T 1" ref_0 - Output: ref_0."time", ref_0.tags, ref_0.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 10)) - -> Foreign Scan on public.ft1 ref_1 - Output: ref_1.tags, ((ref_0.fields ->> 'c2'::text))::integer - InfluxDB query: SELECT * FROM "T1" WHERE (("c3" = '00001')) - -> Materialize - Output: ref_3.tags - -> Foreign Scan on public.ft2 ref_3 - Output: ref_3.tags - InfluxDB query: SELECT * FROM "T1" WHERE (("c3" = '00001')) -(18 rows) - ---Testcase 285: -SELECT (ref_0.fields->>'c2')::int c2, subq_1.* -FROM - "S 1"."T 1" AS ref_0, - LATERAL ( - SELECT (ref_0.fields->>'C 1')::int c1, subq_0.* - FROM (SELECT (ref_0.fields->>'c2')::int c2, ref_1.tags->>'c3' c3 - FROM ft1 AS ref_1) AS subq_0 - RIGHT JOIN ft2 AS ref_3 ON (subq_0.c3 = ref_3.tags->>'c3') - ) AS subq_1 -WHERE (ref_0.fields->>'C 1')::int < 10 AND subq_1.c3 = '00001' -ORDER BY (ref_0.fields->>'C 1')::int; - c2 | c1 | c2 | c3 -----+----+----+------- - 1 | 1 | 1 | 00001 - 2 | 2 | 2 | 00001 - 3 | 3 | 3 | 00001 - 4 | 4 | 4 | 00001 - 5 | 5 | 5 | 00001 - 6 | 6 | 6 | 00001 - 7 | 7 | 7 | 00001 - 8 | 8 | 8 | 00001 - 9 | 9 | 9 | 00001 -(9 rows) - --- Check with placeHolderVars ---Testcase 286: -explain (verbose, costs off) -select sum(q.a), count(q.b) from ft4 left join (select 13, avg((ft1.fields->>'C 1')::int), sum((ft2.fields->>'C 1')::int) from ft1 right join ft2 on ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int)) q(a, b, c) on ((ft4.fields->>'c1')::int <= q.b); - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: sum(q.a), count(q.b) - -> Nested Loop Left Join - Output: q.a, q.b - Inner Unique: true - Join Filter: ((((ft4.fields ->> 'c1'::text))::integer)::numeric <= q.b) - -> Foreign Scan on public.ft4 - Output: ft4.tags, ft4.fields - InfluxDB query: SELECT * FROM "T3" - -> Materialize - Output: q.a, q.b - -> Subquery Scan on q - Output: q.a, q.b - -> Aggregate - Output: 13, avg(((ft1.fields ->> 'C 1'::text))::integer), NULL::bigint - -> Merge Left Join - Output: ft1.fields - Merge Cond: ((((ft2.fields ->> 'C 1'::text))::integer) = (((ft1.fields ->> 'C 1'::text))::integer)) - -> Sort - Output: ft2.fields, (((ft2.fields ->> 'C 1'::text))::integer) - Sort Key: (((ft2.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft2 - Output: ft2.fields, ((ft2.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" - -> Sort - Output: ft1.fields, (((ft1.fields ->> 'C 1'::text))::integer) - Sort Key: (((ft1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 - Output: ft1.fields, ((ft1.fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(30 rows) - ---Testcase 287: -select sum(q.a), count(q.b) from ft4 left join (select 13, avg((ft1.fields->>'C 1')::int), sum((ft2.fields->>'C 1')::int) from ft1 right join ft2 on ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int)) q(a, b, c) on ((ft4.fields->>'c1')::int <= q.b); - sum | count ------+------- - 650 | 50 -(1 row) - --- Not supported cases --- Grouping sets ---Testcase 288: -explain (verbose, costs off) -select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by rollup((fields->>'c2')::int) order by 1 nulls last; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Sort - Output: (((fields ->> 'c2'::text))::integer), (sum(((fields ->> 'C 1'::text))::integer)) - Sort Key: (((ft1.fields ->> 'c2'::text))::integer) - -> MixedAggregate - Output: (((fields ->> 'c2'::text))::integer), sum(((fields ->> 'C 1'::text))::integer) - Hash Key: ((ft1.fields ->> 'c2'::text))::integer - Group Key: () - -> Foreign Scan on public.ft1 - Output: ((fields ->> 'c2'::text))::integer, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 3)) -(10 rows) - ---Testcase 289: -select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by rollup((fields->>'c2')::int) order by 1 nulls last; - c2 | sum -----+-------- - 0 | 50500 - 1 | 49600 - 2 | 49700 - | 149800 -(4 rows) - ---Testcase 290: -explain (verbose, costs off) -select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by cube((fields->>'c2')::int) order by 1 nulls last; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Sort - Output: (((fields ->> 'c2'::text))::integer), (sum(((fields ->> 'C 1'::text))::integer)) - Sort Key: (((ft1.fields ->> 'c2'::text))::integer) - -> MixedAggregate - Output: (((fields ->> 'c2'::text))::integer), sum(((fields ->> 'C 1'::text))::integer) - Hash Key: ((ft1.fields ->> 'c2'::text))::integer - Group Key: () - -> Foreign Scan on public.ft1 - Output: ((fields ->> 'c2'::text))::integer, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 3)) -(10 rows) - ---Testcase 291: -select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by cube((fields->>'c2')::int) order by 1 nulls last; - c2 | sum -----+-------- - 0 | 50500 - 1 | 49600 - 2 | 49700 - | 149800 -(4 rows) - ---Testcase 292: -explain (verbose, costs off) -select (fields->>'c2')::int c2, fields->>'c6' c6, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by grouping sets(fields->>'c2', fields->>'c6') order by 1 nulls last, 2 nulls last; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text)))::integer), ((fields ->> 'c6'::text)), (sum(((fields ->> 'C 1'::text))::integer)), ((fields ->> 'c2'::text)) - Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer), ((ft1.fields ->> 'c6'::text)) - -> HashAggregate - Output: (((fields ->> 'c2'::text)))::integer, ((fields ->> 'c6'::text)), sum(((fields ->> 'C 1'::text))::integer), ((fields ->> 'c2'::text)) - Hash Key: (ft1.fields ->> 'c2'::text) - Hash Key: (ft1.fields ->> 'c6'::text) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c6'::text), (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 3)) -(10 rows) - ---Testcase 293: -select (fields->>'c2')::int c2, fields->>'c6' c6, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by grouping sets(fields->>'c2', fields->>'c6') order by 1 nulls last, 2 nulls last; - c2 | c6 | sum -----+----+------- - 0 | | 50500 - 1 | | 49600 - 2 | | 49700 - | 0 | 50500 - | 1 | 49600 - | 2 | 49700 -(6 rows) - ---Testcase 294: -explain (verbose, costs off) -select (fields->>'c2')::int c2, sum((fields->>'C 1')::int), grouping(fields->>'c2') from ft1 where (fields->>'c2')::int < 3 group by fields->>'c2' order by 1 nulls last; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text)))::integer), (sum(((fields ->> 'C 1'::text))::integer)), (GROUPING(((fields ->> 'c2'::text)))), ((fields ->> 'c2'::text)) - Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) - -> HashAggregate - Output: (((fields ->> 'c2'::text)))::integer, sum(((fields ->> 'C 1'::text))::integer), GROUPING(((fields ->> 'c2'::text))), ((fields ->> 'c2'::text)) - Group Key: (ft1.fields ->> 'c2'::text) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 3)) -(9 rows) - ---Testcase 295: -select (fields->>'c2')::int c2, sum((fields->>'C 1')::int), grouping(fields->>'c2') from ft1 where (fields->>'c2')::int < 3 group by fields->>'c2' order by 1 nulls last; - c2 | sum | grouping -----+-------+---------- - 0 | 50500 | 0 - 1 | 49600 | 0 - 2 | 49700 | 0 -(3 rows) - --- DISTINCT itself is not pushed down, whereas underneath aggregate is pushed ---Testcase 296: -explain (verbose, costs off) -select distinct sum((fields->>'C 1')::int)/1000 s from ft2 where (fields->>'c2')::int < 6 group by fields->>'c2' order by 1; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Unique - Output: ((sum(((fields ->> 'C 1'::text))::integer) / 1000)), ((fields ->> 'c2'::text)) - -> Sort - Output: ((sum(((fields ->> 'C 1'::text))::integer) / 1000)), ((fields ->> 'c2'::text)) - Sort Key: ((sum(((ft2.fields ->> 'C 1'::text))::integer) / 1000)) - -> HashAggregate - Output: (sum(((fields ->> 'C 1'::text))::integer) / 1000), ((fields ->> 'c2'::text)) - Group Key: (ft2.fields ->> 'c2'::text) - -> Foreign Scan on public.ft2 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 6)) -(11 rows) - ---Testcase 297: -select distinct sum((fields->>'C 1')::int)/1000 s from ft2 where (fields->>'c2')::int < 6 group by fields->>'c2' order by 1; - s ----- - 49 - 50 -(2 rows) - --- WindowAgg ---Testcase 298: -explain (verbose, costs off) -select (fields->>'c2')::int c2, sum((fields->>'c2')::int), count((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2) from ft2 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text)))::integer), (sum((((fields ->> 'c2'::text)))::integer)), (count((((fields ->> 'c2'::text)))::integer) OVER (?)), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) - Sort Key: ((((ft2.fields ->> 'c2'::text)))::integer) - -> WindowAgg - Output: (((fields ->> 'c2'::text)))::integer, (sum((((fields ->> 'c2'::text)))::integer)), count((((fields ->> 'c2'::text)))::integer) OVER (?), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) - -> Sort - Output: ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)), fields, (sum((((fields ->> 'c2'::text)))::integer)) - Sort Key: (((((ft2.fields ->> 'c2'::text)))::integer % 2)) - -> HashAggregate - Output: ((fields ->> 'c2'::text)), ((((fields ->> 'c2'::text)))::integer % 2), fields, sum((((fields ->> 'c2'::text)))::integer) - Group Key: (ft2.fields ->> 'c2'::text) - -> Foreign Scan on public.ft2 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 10)) -(14 rows) - ---Testcase 299: -select (fields->>'c2')::int c2, sum((fields->>'c2')::int), count((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2) from ft2 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; - c2 | sum | count -----+-----+------- - 0 | 0 | 5 - 1 | 100 | 5 - 2 | 200 | 5 - 3 | 300 | 5 - 4 | 400 | 5 - 5 | 500 | 5 - 6 | 600 | 5 - 7 | 700 | 5 - 8 | 800 | 5 - 9 | 900 | 5 -(10 rows) - ---Testcase 300: -explain (verbose, costs off) -select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int desc) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text)))::integer), (array_agg(((((fields ->> 'c2'::text)))::integer)) OVER (?)), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) - Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) - -> WindowAgg - Output: ((((fields ->> 'c2'::text)))::integer), array_agg(((((fields ->> 'c2'::text)))::integer)) OVER (?), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) - -> Sort - Output: ((((fields ->> 'c2'::text)))::integer), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)), fields - Sort Key: (((((ft1.fields ->> 'c2'::text)))::integer % 2)), ((((ft1.fields ->> 'c2'::text)))::integer) DESC - -> HashAggregate - Output: (((fields ->> 'c2'::text)))::integer, ((fields ->> 'c2'::text)), ((((fields ->> 'c2'::text)))::integer % 2), fields - Group Key: (ft1.fields ->> 'c2'::text) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 10)) -(14 rows) - ---Testcase 301: -select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int desc) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; - c2 | array_agg -----+------------- - 0 | {8,6,4,2,0} - 1 | {9,7,5,3,1} - 2 | {8,6,4,2} - 3 | {9,7,5,3} - 4 | {8,6,4} - 5 | {9,7,5} - 6 | {8,6} - 7 | {9,7} - 8 | {8} - 9 | {9} -(10 rows) - ---Testcase 302: -explain (verbose, costs off) -select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int range between current row and unbounded following) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: ((((fields ->> 'c2'::text)))::integer), (array_agg(((((fields ->> 'c2'::text)))::integer)) OVER (?)), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) - Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) - -> WindowAgg - Output: ((((fields ->> 'c2'::text)))::integer), array_agg(((((fields ->> 'c2'::text)))::integer)) OVER (?), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) - -> Sort - Output: ((((fields ->> 'c2'::text)))::integer), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)), fields - Sort Key: (((((ft1.fields ->> 'c2'::text)))::integer % 2)), ((((ft1.fields ->> 'c2'::text)))::integer) - -> HashAggregate - Output: (((fields ->> 'c2'::text)))::integer, ((fields ->> 'c2'::text)), ((((fields ->> 'c2'::text)))::integer % 2), fields - Group Key: (ft1.fields ->> 'c2'::text) - -> Foreign Scan on public.ft1 - Output: (fields ->> 'c2'::text), fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 10)) -(14 rows) - ---Testcase 303: -select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int range between current row and unbounded following) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; - c2 | array_agg -----+------------- - 0 | {0,2,4,6,8} - 1 | {1,3,5,7,9} - 2 | {2,4,6,8} - 3 | {3,5,7,9} - 4 | {4,6,8} - 5 | {5,7,9} - 6 | {6,8} - 7 | {7,9} - 8 | {8} - 9 | {9} -(10 rows) - --- =================================================================== --- parameterized queries --- =================================================================== --- simple join ---Testcase 304: -PREPARE st1(int, int) AS SELECT t1.tags->>'c3' c3, t2.tags->>'c3' c3 FROM ft1 t1, ft2 t2 WHERE (t1.fields->>'C 1')::int = $1 AND (t2.fields->>'C 1')::int = $2; ---Testcase 305: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st1(1, 2); - QUERY PLAN ----------------------------------------------------------------------- - Nested Loop - Output: (t1.tags ->> 'c3'::text), (t2.tags ->> 'c3'::text) - -> Foreign Scan on public.ft1 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) - -> Materialize - Output: t2.tags - -> Foreign Scan on public.ft2 t2 - Output: t2.tags - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 2)) -(10 rows) - ---Testcase 306: -EXECUTE st1(1, 1); - c3 | c3 --------+------- - 00001 | 00001 -(1 row) - ---Testcase 307: -EXECUTE st1(101, 101); - c3 | c3 --------+------- - 00101 | 00101 -(1 row) - --- subquery using stable function (can't be sent to remote) ---Testcase 308: -PREPARE st2(int) AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int < $2 AND t1.tags->>'c3' IN (SELECT tags->>'c3' FROM ft2 t2 WHERE (fields->>'C 1')::int > $1 AND date(time) = '1970-01-17'::date) ORDER BY (fields->>'C 1')::int; ---Testcase 309: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st2(10, 20); - QUERY PLAN ---------------------------------------------------------------------------------------- - Sort - Output: t1."time", t1.tags, t1.fields, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Hash Semi Join - Output: t1."time", t1.tags, t1.fields, ((t1.fields ->> 'C 1'::text))::integer - Hash Cond: ((t1.tags ->> 'c3'::text) = (t2.tags ->> 'c3'::text)) - -> Foreign Scan on public.ft1 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 20)) - -> Hash - Output: t2.tags - -> Foreign Scan on public.ft2 t2 - Output: t2.tags - Filter: (date(t2."time") = '01-17-1970'::date) - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" > 10)) -(15 rows) - ---Testcase 310: -EXECUTE st2(10, 20); - time | tags | fields ---------------------------+-----------------+---------------------------------------------------------------------- - Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} -(1 row) - ---Testcase 311: -EXECUTE st2(101, 121); - time | tags | fields ---------------------------+-----------------+----------------------------------------------------------------------- - Sat Jan 17 00:00:00 1970 | {"c3": "00116"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "116"} -(1 row) - --- subquery using immutable function (can be sent to remote) ---Testcase 312: -PREPARE st3(int) AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int < $2 AND t1.tags->>'c3' IN (SELECT tags->>'c3' FROM ft2 t2 WHERE (fields->>'C 1')::int > $1 AND date(time) = '1970-01-17'::date) ORDER BY (fields->>'C 1')::int; ---Testcase 313: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st3(10, 20); - QUERY PLAN ---------------------------------------------------------------------------------------- - Sort - Output: t1."time", t1.tags, t1.fields, (((t1.fields ->> 'C 1'::text))::integer) - Sort Key: (((t1.fields ->> 'C 1'::text))::integer) - -> Hash Semi Join - Output: t1."time", t1.tags, t1.fields, ((t1.fields ->> 'C 1'::text))::integer - Hash Cond: ((t1.tags ->> 'c3'::text) = (t2.tags ->> 'c3'::text)) - -> Foreign Scan on public.ft1 t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 20)) - -> Hash - Output: t2.tags - -> Foreign Scan on public.ft2 t2 - Output: t2.tags - Filter: (date(t2."time") = '01-17-1970'::date) - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" > 10)) -(15 rows) - ---Testcase 314: -EXECUTE st3(10, 20); - time | tags | fields ---------------------------+-----------------+---------------------------------------------------------------------- - Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} -(1 row) - ---Testcase 315: -EXECUTE st3(20, 30); - time | tags | fields -------+------+-------- -(0 rows) - --- custom plan should be chosen initially ---Testcase 316: -PREPARE st4(int) AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = $1; ---Testcase 317: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN ----------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - ---Testcase 318: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN ----------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - ---Testcase 319: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN ----------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - ---Testcase 320: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN ----------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - ---Testcase 321: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN ----------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) -(3 rows) - --- once we try it enough times, should switch to generic plan ---Testcase 322: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); - QUERY PLAN ------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = $1)) -(3 rows) - --- value of $1 should not be sent to remote ---Testcase 323: -PREPARE st5(text,int) AS SELECT * FROM ft1 t1 WHERE fields->>'c8' = $1 and (fields->>'C 1')::int = $2; ---Testcase 324: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) -(3 rows) - ---Testcase 325: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) -(3 rows) - ---Testcase 326: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) -(3 rows) - ---Testcase 327: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) -(3 rows) - ---Testcase 328: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) -(3 rows) - ---Testcase 329: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = $1)) AND (("C 1" = $2)) -(3 rows) - ---Testcase 330: -EXECUTE st5('foo', 1); - time | tags | fields ---------------------------+-----------------+--------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} -(1 row) - --- altering FDW options requires replanning ---Testcase 331: -PREPARE st6 AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (t1.fields->>'c2')::int; ---Testcase 332: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; - QUERY PLAN -------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = "c2")) -(3 rows) - ---Testcase 333: -PREPARE st7 AS INSERT INTO ft1_nsc (c1,c2,c3) VALUES (1001,101,'foo'); ---Testcase 334: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.ft1_nsc - -> Result - Output: NULL::integer, 1001, 101, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft1 '::character(10), NULL::text -(3 rows) - ---Testcase 335: -INSERT INTO "S 1".s1t0 SELECT * FROM "S 1".s1t1; -ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T0'); ---Testcase 336: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; - QUERY PLAN -------------------------------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "T0" WHERE (("C 1" = "c2")) -(3 rows) - ---Testcase 337: -EXECUTE st6; - time | tags | fields ---------------------------+-----------------+--------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} - Sat Jan 03 00:00:00 1970 | {"c3": "00002"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "2"} - Sun Jan 04 00:00:00 1970 | {"c3": "00003"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "3"} - Mon Jan 05 00:00:00 1970 | {"c3": "00004"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "4"} - Tue Jan 06 00:00:00 1970 | {"c3": "00005"} | {"c2": "5", "c6": "5", "c7": "5 ", "c8": "foo", "C 1": "5"} - Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} - Thu Jan 08 00:00:00 1970 | {"c3": "00007"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "7"} - Fri Jan 09 00:00:00 1970 | {"c3": "00008"} | {"c2": "8", "c6": "8", "c7": "8 ", "c8": "foo", "C 1": "8"} - Sat Jan 10 00:00:00 1970 | {"c3": "00009"} | {"c2": "9", "c6": "9", "c7": "9 ", "c8": "foo", "C 1": "9"} -(9 rows) - ---Testcase 338: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.ft1_nsc - -> Result - Output: NULL::integer, 1001, 101, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft1 '::character(10), NULL::text -(3 rows) - ---Testcase 339: -DELETE FROM "S 1".s1t0; -ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T1'); ---Testcase 340: -PREPARE st8 AS SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; ---Testcase 341: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Aggregate - Output: count((tags ->> 'c3'::text)) - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) - InfluxDB query: SELECT * FROM "T1" -(6 rows) - --- Skip, influxdb_fdw does not support extensions --- ALTER SERVER loopback OPTIONS (DROP extensions); ---Testcase 342: -EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Aggregate - Output: count((tags ->> 'c3'::text)) - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) - InfluxDB query: SELECT * FROM "T1" -(6 rows) - ---Testcase 343: -EXECUTE st8; - count -------- - 9 -(1 row) - --- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); --- cleanup -DEALLOCATE st1; -DEALLOCATE st2; -DEALLOCATE st3; -DEALLOCATE st4; -DEALLOCATE st5; -DEALLOCATE st6; -DEALLOCATE st7; -DEALLOCATE st8; --- System columns, except ctid and oid, should not be sent to remote ---Testcase 344: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM ft1 t1 WHERE t1.tableoid = 'pg_class'::regclass LIMIT 1; - QUERY PLAN ---------------------------------------------- - Limit - Output: "time", tags, fields - -> Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (t1.tableoid = '1259'::oid) - InfluxDB query: SELECT * FROM "T1" -(6 rows) - ---Testcase 345: -SELECT * FROM ft1 t1 WHERE t1.tableoid = 'ft1'::regclass ORDER BY (fields->>'C 1')::int LIMIT 1; - time | tags | fields ---------------------------+-----------------+--------------------------------------------------------------------- - Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} -(1 row) - ---Testcase 346: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT tableoid::regclass, * FROM ft1 t1 LIMIT 1; - QUERY PLAN ------------------------------------------------------------- - Limit - Output: ((tableoid)::regclass), "time", tags, fields - -> Foreign Scan on public.ft1 t1 - Output: (tableoid)::regclass, "time", tags, fields - InfluxDB query: SELECT * FROM "T1" -(5 rows) - ---Testcase 347: -SELECT tableoid::regclass, * FROM ft1 t1 ORDER BY (fields->>'C 1')::int LIMIT 1; - tableoid | time | tags | fields -----------+--------------------------+-----------------+--------------------------------------------------------------------- - ft1 | Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} -(1 row) - ---Testcase 348: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; - QUERY PLAN --------------------------------------- - Foreign Scan on public.ft1 t1 - Output: "time", tags, fields - Filter: (t1.ctid = '(0,2)'::tid) - InfluxDB query: SELECT * FROM "T1" -(4 rows) - ---Testcase 349: -SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; - time | tags | fields -------+------+-------- -(0 rows) - ---Testcase 350: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ctid, * FROM ft1 t1 LIMIT 1; - QUERY PLAN --------------------------------------------- - Limit - Output: ctid, "time", tags, fields - -> Foreign Scan on public.ft1 t1 - Output: ctid, "time", tags, fields - InfluxDB query: SELECT * FROM "T1" -(5 rows) - ---Testcase 351: -SELECT ctid, * FROM ft1 t1 ORDER BY (fields->>'C 1')::int LIMIT 1; - ctid | time | tags | fields -----------------+--------------------------+-----------------+--------------------------------------------------------------------- - (4294967295,0) | Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} -(1 row) - --- =================================================================== --- used in PL/pgSQL function --- =================================================================== ---Testcase 352: -CREATE OR REPLACE FUNCTION f_test(p_c1 int) RETURNS int AS $$ -DECLARE - v_c1 int; -BEGIN ---Testcase 353: - SELECT fields->>'C 1' INTO v_c1 FROM ft1 WHERE (fields->>'C 1')::int = p_c1 LIMIT 1; - PERFORM fields->>'C 1' FROM ft1 WHERE (fields->>'C 1')::int = p_c1 AND p_c1 = v_c1 LIMIT 1; - RETURN v_c1; -END; -$$ LANGUAGE plpgsql; ---Testcase 354: -SELECT f_test(100); - f_test --------- - 100 -(1 row) - ---Testcase 355: -DROP FUNCTION f_test(int); --- =================================================================== --- conversion error --- =================================================================== ---ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE int; ---Testcase 356: ---SELECT * FROM ft1 WHERE c1 = 1; -- ERROR ---Testcase 357: ---SELECT ft1.c1, ft2.c2, ft1.c8 FROM ft1, ft2 WHERE ft1.c1 = ft2.c1 AND ft1.c1 = 1; -- ERROR ---Testcase 358: ---SELECT ft1.c1, ft2.c2, ft1 FROM ft1, ft2 WHERE ft1.c1 = ft2.c1 AND ft1.c1 = 1; -- ERROR ---Testcase 359: ---SELECT sum(c2), array_agg(c8) FROM ft1 GROUP BY c8; -- ERROR ---ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE text; -/* --- influxdb_fdw does not support transactions --- =================================================================== --- subtransaction --- + local/remote error doesn't break cursor --- =================================================================== -BEGIN; -DECLARE c CURSOR FOR SELECT * FROM ft1 ORDER BY c1; -FETCH c; -SAVEPOINT s; -ERROR OUT; -- ERROR -ROLLBACK TO s; -FETCH c; -SAVEPOINT s; -SELECT * FROM ft1 WHERE 1 / (c1 - 1) > 0; -- ERROR -ROLLBACK TO s; -FETCH c; -SELECT * FROM ft1 ORDER BY c1 LIMIT 1; -COMMIT; -*/ --- =================================================================== --- test handling of collations --- =================================================================== ---Testcase 360: -create foreign table loct3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct3', schemaless 'true'); ---Testcase 361: -create foreign table ft3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct3', schemaless 'true'); --- can be sent to remote ---Testcase 362: -explain (verbose, costs off) select * from ft3 where fields->>'f1' = 'foo'; - QUERY PLAN ----------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: fields - InfluxDB query: SELECT * FROM "loct3" WHERE (("f1" = 'foo')) -(3 rows) - ---Testcase 363: -explain (verbose, costs off) select * from ft3 where fields->>'f1' COLLATE "C" = 'foo'; - QUERY PLAN ----------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: fields - InfluxDB query: SELECT * FROM "loct3" WHERE (("f1" = 'foo')) -(3 rows) - ---Testcase 364: -explain (verbose, costs off) select * from ft3 where fields->>'f2' = 'foo'; - QUERY PLAN ----------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: fields - InfluxDB query: SELECT * FROM "loct3" WHERE (("f2" = 'foo')) -(3 rows) - ---Testcase 365: -explain (verbose, costs off) select * from ft3 where fields->>'f3' = 'foo'; - QUERY PLAN ----------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: fields - InfluxDB query: SELECT * FROM "loct3" WHERE (("f3" = 'foo')) -(3 rows) - ---Testcase 366: -explain (verbose, costs off) select * from ft3 f, loct3 l - where f.fields->>'f3' = l.fields->>'f3' and l.fields->>'f1' = 'foo'; - QUERY PLAN ----------------------------------------------------------------------------- - Hash Join - Output: f.fields, l.fields - Hash Cond: ((f.fields ->> 'f3'::text) = (l.fields ->> 'f3'::text)) - -> Foreign Scan on public.ft3 f - Output: f.fields - InfluxDB query: SELECT * FROM "loct3" - -> Hash - Output: l.fields - -> Foreign Scan on public.loct3 l - Output: l.fields - InfluxDB query: SELECT * FROM "loct3" WHERE (("f1" = 'foo')) -(11 rows) - --- can't be sent to remote ---Testcase 367: -explain (verbose, costs off) select * from ft3 where fields->>'f1' COLLATE "POSIX" = 'foo'; - QUERY PLAN ----------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: fields - InfluxDB query: SELECT * FROM "loct3" WHERE (("f1" = 'foo')) -(3 rows) - ---Testcase 368: -explain (verbose, costs off) select * from ft3 where fields->>'f1' = 'foo' COLLATE "C"; - QUERY PLAN -------------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: fields - Filter: ((ft3.fields ->> 'f1'::text) = 'foo'::text COLLATE "C") - InfluxDB query: SELECT * FROM "loct3" -(4 rows) - ---Testcase 369: -explain (verbose, costs off) select * from ft3 where fields->>'f2' COLLATE "C" = 'foo'; - QUERY PLAN ----------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: fields - InfluxDB query: SELECT * FROM "loct3" WHERE (("f2" = 'foo')) -(3 rows) - ---Testcase 370: -explain (verbose, costs off) select * from ft3 where fields->>'f2' = 'foo' COLLATE "C"; - QUERY PLAN -------------------------------------------------------------------- - Foreign Scan on public.ft3 - Output: fields - Filter: ((ft3.fields ->> 'f2'::text) = 'foo'::text COLLATE "C") - InfluxDB query: SELECT * FROM "loct3" -(4 rows) - ---Testcase 371: -explain (verbose, costs off) select * from ft3 f, loct3 l - where f.fields->>'f3' = l.fields->>'f3' COLLATE "POSIX" and l.fields->>'f1' = 'foo'; - QUERY PLAN ----------------------------------------------------------------------------------------------- - Hash Join - Output: f.fields, l.fields - Hash Cond: (((f.fields ->> 'f3'::text))::text = (l.fields ->> 'f3'::text COLLATE "POSIX")) - -> Foreign Scan on public.ft3 f - Output: f.fields - InfluxDB query: SELECT * FROM "loct3" - -> Hash - Output: l.fields - -> Foreign Scan on public.loct3 l - Output: l.fields - InfluxDB query: SELECT * FROM "loct3" WHERE (("f1" = 'foo')) -(11 rows) - --- influxdb_fdw does not support UPDATE --- =================================================================== --- test writable foreign table stuff --- =================================================================== ---Testcase 372: -EXPLAIN (verbose, costs off) -INSERT INTO ft2_nsc (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2_nsc ORDER BY c1 LIMIT 20; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.ft2_nsc - -> Subquery Scan on "*SELECT*" - Output: "*SELECT*"."?column?", "*SELECT*"."?column?_1", NULL::integer, "*SELECT*"."?column?_2", NULL::timestamp without time zone, NULL::character varying, 'ft2 '::character(10), NULL::text - -> Limit - Output: ((ft2_nsc_1.c1 + 1000)), ((ft2_nsc_1.c2 + 100)), ((ft2_nsc_1.c3 || ft2_nsc_1.c3)), ft2_nsc_1.c1 - -> Sort - Output: ((ft2_nsc_1.c1 + 1000)), ((ft2_nsc_1.c2 + 100)), ((ft2_nsc_1.c3 || ft2_nsc_1.c3)), ft2_nsc_1.c1 - Sort Key: ft2_nsc_1.c1 - -> Foreign Scan on public.ft2_nsc ft2_nsc_1 - Output: (ft2_nsc_1.c1 + 1000), (ft2_nsc_1.c2 + 100), (ft2_nsc_1.c3 || ft2_nsc_1.c3), ft2_nsc_1.c1 - InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" -(11 rows) - ---Testcase 373: -INSERT INTO ft2_nsc (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2_nsc ORDER BY c1 LIMIT 20; ---Testcase 374: -INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1101,201,'aaa'), (1102,202,'bbb'), (1103,203,'ccc'); ---Testcase 375: -SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 WHERE (fields->>'c2')::int > 200; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+-----+----+------------+---- - 1101 | 201 | aaa | | ft2 | - 1102 | 202 | bbb | | ft2 | - 1103 | 203 | ccc | | ft2 | -(3 rows) - ---Testcase 376: -INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1104,204,'ddd'), (1105,205,'eee'); ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c2 = c2 + 300, c3 = c3 || '_update3' WHERE c1 % 10 = 3; -- can be pushed down ---UPDATE ft2 SET c2 = c2 + 300, c3 = c3 || '_update3' WHERE c1 % 10 = 3; ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c2 = c2 + 400, c3 = c3 || '_update7' WHERE c1 % 10 = 7 RETURNING *; -- can be pushed down ---UPDATE ft2 SET c2 = c2 + 400, c3 = c3 || '_update7' WHERE c1 % 10 = 7 RETURNING *; ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c2 = ft2.c2 + 500, c3 = ft2.c3 || '_update9', c7 = DEFAULT --- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; -- can be pushed down ---UPDATE ft2 SET c2 = ft2.c2 + 500, c3 = ft2.c3 || '_update9', c7 = DEFAULT --- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; ---Testcase 377: -EXPLAIN (verbose, costs off) - DELETE FROM ft2_nsc WHERE c1 % 10 = 5; -- can be pushed down - QUERY PLAN ---------------------------------------------------------------------------------- - Delete on public.ft2_nsc - -> Foreign Scan on public.ft2_nsc - Output: c3, "time" - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE ((("C 1" % 10) = 5)) -(4 rows) - ---Testcase 378: -SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int % 10 = 5 ORDER BY (fields->>'C 1')::int; - c1 ------- - 5 - 15 - 25 - 35 - 45 - 55 - 65 - 75 - 85 - 95 - 105 - 115 - 125 - 135 - 145 - 155 - 165 - 175 - 185 - 195 - 205 - 215 - 225 - 235 - 245 - 255 - 265 - 275 - 285 - 295 - 305 - 315 - 325 - 335 - 345 - 355 - 365 - 375 - 385 - 395 - 405 - 415 - 425 - 435 - 445 - 455 - 465 - 475 - 485 - 495 - 505 - 515 - 525 - 535 - 545 - 555 - 565 - 575 - 585 - 595 - 605 - 615 - 625 - 635 - 645 - 655 - 665 - 675 - 685 - 695 - 705 - 715 - 725 - 735 - 745 - 755 - 765 - 775 - 785 - 795 - 805 - 815 - 825 - 835 - 845 - 855 - 865 - 875 - 885 - 895 - 905 - 915 - 925 - 935 - 945 - 955 - 965 - 975 - 985 - 995 - 1005 - 1015 - 1105 -(103 rows) - ---Testcase 379: -DELETE FROM ft2_nsc WHERE c1 % 10 = 5; ---Testcase 380: -SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int % 10 = 5; - c1 ----- -(0 rows) - ---Testcase 381: -EXPLAIN (verbose, costs off) -DELETE FROM ft2_nsc USING ft1_nsc WHERE ft1_nsc.c1 = ft2_nsc.c2 AND ft1_nsc.c1 % 10 = 2; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- - Delete on public.ft2_nsc - -> Hash Join - Output: ft2_nsc.c3, ft2_nsc."time", ft1_nsc.* - Hash Cond: (ft2_nsc.c2 = ft1_nsc.c1) - -> Foreign Scan on public.ft2_nsc - Output: ft2_nsc.c3, ft2_nsc."time", ft2_nsc.c2 - InfluxDB query: SELECT "c2", "c3" FROM "T1" - -> Hash - Output: ft1_nsc.*, ft1_nsc.c1 - -> Foreign Scan on public.ft1_nsc - Output: ft1_nsc.*, ft1_nsc.c1 - InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE ((("C 1" % 10) = 2)) -(12 rows) - ---Testcase 382: -DELETE FROM ft2_nsc USING ft1_nsc WHERE ft1_nsc.c1 = ft2_nsc.c2 AND ft1_nsc.c1 % 10 = 2; ---Testcase 383: -SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft2 ORDER BY (fields->>'C 1')::int; - c1 | c2 | c3 -------+-----+------------ - 1 | 1 | 00001 - 3 | 3 | 00003 - 4 | 4 | 00004 - 6 | 6 | 00006 - 7 | 7 | 00007 - 8 | 8 | 00008 - 9 | 9 | 00009 - 10 | 0 | 00010 - 11 | 1 | 00011 - 13 | 3 | 00013 - 14 | 4 | 00014 - 16 | 6 | 00016 - 17 | 7 | 00017 - 18 | 8 | 00018 - 19 | 9 | 00019 - 20 | 0 | 00020 - 21 | 1 | 00021 - 23 | 3 | 00023 - 24 | 4 | 00024 - 26 | 6 | 00026 - 27 | 7 | 00027 - 28 | 8 | 00028 - 29 | 9 | 00029 - 30 | 0 | 00030 - 31 | 1 | 00031 - 33 | 3 | 00033 - 34 | 4 | 00034 - 36 | 6 | 00036 - 37 | 7 | 00037 - 38 | 8 | 00038 - 39 | 9 | 00039 - 40 | 0 | 00040 - 41 | 1 | 00041 - 43 | 3 | 00043 - 44 | 4 | 00044 - 46 | 6 | 00046 - 47 | 7 | 00047 - 48 | 8 | 00048 - 49 | 9 | 00049 - 50 | 0 | 00050 - 51 | 1 | 00051 - 53 | 3 | 00053 - 54 | 4 | 00054 - 56 | 6 | 00056 - 57 | 7 | 00057 - 58 | 8 | 00058 - 59 | 9 | 00059 - 60 | 0 | 00060 - 61 | 1 | 00061 - 63 | 3 | 00063 - 64 | 4 | 00064 - 66 | 6 | 00066 - 67 | 7 | 00067 - 68 | 8 | 00068 - 69 | 9 | 00069 - 70 | 0 | 00070 - 71 | 1 | 00071 - 73 | 3 | 00073 - 74 | 4 | 00074 - 76 | 6 | 00076 - 77 | 7 | 00077 - 78 | 8 | 00078 - 79 | 9 | 00079 - 80 | 0 | 00080 - 81 | 1 | 00081 - 83 | 3 | 00083 - 84 | 4 | 00084 - 86 | 6 | 00086 - 87 | 7 | 00087 - 88 | 8 | 00088 - 89 | 9 | 00089 - 90 | 0 | 00090 - 91 | 1 | 00091 - 93 | 3 | 00093 - 94 | 4 | 00094 - 96 | 6 | 00096 - 97 | 7 | 00097 - 98 | 8 | 00098 - 99 | 9 | 00099 - 100 | 0 | 00100 - 101 | 1 | 00101 - 103 | 3 | 00103 - 104 | 4 | 00104 - 106 | 6 | 00106 - 107 | 7 | 00107 - 108 | 8 | 00108 - 109 | 9 | 00109 - 110 | 0 | 00110 - 111 | 1 | 00111 - 113 | 3 | 00113 - 114 | 4 | 00114 - 116 | 6 | 00116 - 117 | 7 | 00117 - 118 | 8 | 00118 - 119 | 9 | 00119 - 120 | 0 | 00120 - 121 | 1 | 00121 - 123 | 3 | 00123 - 124 | 4 | 00124 - 126 | 6 | 00126 - 127 | 7 | 00127 - 128 | 8 | 00128 - 129 | 9 | 00129 - 130 | 0 | 00130 - 131 | 1 | 00131 - 133 | 3 | 00133 - 134 | 4 | 00134 - 136 | 6 | 00136 - 137 | 7 | 00137 - 138 | 8 | 00138 - 139 | 9 | 00139 - 140 | 0 | 00140 - 141 | 1 | 00141 - 143 | 3 | 00143 - 144 | 4 | 00144 - 146 | 6 | 00146 - 147 | 7 | 00147 - 148 | 8 | 00148 - 149 | 9 | 00149 - 150 | 0 | 00150 - 151 | 1 | 00151 - 153 | 3 | 00153 - 154 | 4 | 00154 - 156 | 6 | 00156 - 157 | 7 | 00157 - 158 | 8 | 00158 - 159 | 9 | 00159 - 160 | 0 | 00160 - 161 | 1 | 00161 - 163 | 3 | 00163 - 164 | 4 | 00164 - 166 | 6 | 00166 - 167 | 7 | 00167 - 168 | 8 | 00168 - 169 | 9 | 00169 - 170 | 0 | 00170 - 171 | 1 | 00171 - 173 | 3 | 00173 - 174 | 4 | 00174 - 176 | 6 | 00176 - 177 | 7 | 00177 - 178 | 8 | 00178 - 179 | 9 | 00179 - 180 | 0 | 00180 - 181 | 1 | 00181 - 183 | 3 | 00183 - 184 | 4 | 00184 - 186 | 6 | 00186 - 187 | 7 | 00187 - 188 | 8 | 00188 - 189 | 9 | 00189 - 190 | 0 | 00190 - 191 | 1 | 00191 - 193 | 3 | 00193 - 194 | 4 | 00194 - 196 | 6 | 00196 - 197 | 7 | 00197 - 198 | 8 | 00198 - 199 | 9 | 00199 - 200 | 0 | 00200 - 201 | 1 | 00201 - 203 | 3 | 00203 - 204 | 4 | 00204 - 206 | 6 | 00206 - 207 | 7 | 00207 - 208 | 8 | 00208 - 209 | 9 | 00209 - 210 | 0 | 00210 - 211 | 1 | 00211 - 213 | 3 | 00213 - 214 | 4 | 00214 - 216 | 6 | 00216 - 217 | 7 | 00217 - 218 | 8 | 00218 - 219 | 9 | 00219 - 220 | 0 | 00220 - 221 | 1 | 00221 - 223 | 3 | 00223 - 224 | 4 | 00224 - 226 | 6 | 00226 - 227 | 7 | 00227 - 228 | 8 | 00228 - 229 | 9 | 00229 - 230 | 0 | 00230 - 231 | 1 | 00231 - 233 | 3 | 00233 - 234 | 4 | 00234 - 236 | 6 | 00236 - 237 | 7 | 00237 - 238 | 8 | 00238 - 239 | 9 | 00239 - 240 | 0 | 00240 - 241 | 1 | 00241 - 243 | 3 | 00243 - 244 | 4 | 00244 - 246 | 6 | 00246 - 247 | 7 | 00247 - 248 | 8 | 00248 - 249 | 9 | 00249 - 250 | 0 | 00250 - 251 | 1 | 00251 - 253 | 3 | 00253 - 254 | 4 | 00254 - 256 | 6 | 00256 - 257 | 7 | 00257 - 258 | 8 | 00258 - 259 | 9 | 00259 - 260 | 0 | 00260 - 261 | 1 | 00261 - 263 | 3 | 00263 - 264 | 4 | 00264 - 266 | 6 | 00266 - 267 | 7 | 00267 - 268 | 8 | 00268 - 269 | 9 | 00269 - 270 | 0 | 00270 - 271 | 1 | 00271 - 273 | 3 | 00273 - 274 | 4 | 00274 - 276 | 6 | 00276 - 277 | 7 | 00277 - 278 | 8 | 00278 - 279 | 9 | 00279 - 280 | 0 | 00280 - 281 | 1 | 00281 - 283 | 3 | 00283 - 284 | 4 | 00284 - 286 | 6 | 00286 - 287 | 7 | 00287 - 288 | 8 | 00288 - 289 | 9 | 00289 - 290 | 0 | 00290 - 291 | 1 | 00291 - 293 | 3 | 00293 - 294 | 4 | 00294 - 296 | 6 | 00296 - 297 | 7 | 00297 - 298 | 8 | 00298 - 299 | 9 | 00299 - 300 | 0 | 00300 - 301 | 1 | 00301 - 303 | 3 | 00303 - 304 | 4 | 00304 - 306 | 6 | 00306 - 307 | 7 | 00307 - 308 | 8 | 00308 - 309 | 9 | 00309 - 310 | 0 | 00310 - 311 | 1 | 00311 - 313 | 3 | 00313 - 314 | 4 | 00314 - 316 | 6 | 00316 - 317 | 7 | 00317 - 318 | 8 | 00318 - 319 | 9 | 00319 - 320 | 0 | 00320 - 321 | 1 | 00321 - 323 | 3 | 00323 - 324 | 4 | 00324 - 326 | 6 | 00326 - 327 | 7 | 00327 - 328 | 8 | 00328 - 329 | 9 | 00329 - 330 | 0 | 00330 - 331 | 1 | 00331 - 333 | 3 | 00333 - 334 | 4 | 00334 - 336 | 6 | 00336 - 337 | 7 | 00337 - 338 | 8 | 00338 - 339 | 9 | 00339 - 340 | 0 | 00340 - 341 | 1 | 00341 - 343 | 3 | 00343 - 344 | 4 | 00344 - 346 | 6 | 00346 - 347 | 7 | 00347 - 348 | 8 | 00348 - 349 | 9 | 00349 - 350 | 0 | 00350 - 351 | 1 | 00351 - 353 | 3 | 00353 - 354 | 4 | 00354 - 356 | 6 | 00356 - 357 | 7 | 00357 - 358 | 8 | 00358 - 359 | 9 | 00359 - 360 | 0 | 00360 - 361 | 1 | 00361 - 363 | 3 | 00363 - 364 | 4 | 00364 - 366 | 6 | 00366 - 367 | 7 | 00367 - 368 | 8 | 00368 - 369 | 9 | 00369 - 370 | 0 | 00370 - 371 | 1 | 00371 - 373 | 3 | 00373 - 374 | 4 | 00374 - 376 | 6 | 00376 - 377 | 7 | 00377 - 378 | 8 | 00378 - 379 | 9 | 00379 - 380 | 0 | 00380 - 381 | 1 | 00381 - 383 | 3 | 00383 - 384 | 4 | 00384 - 386 | 6 | 00386 - 387 | 7 | 00387 - 388 | 8 | 00388 - 389 | 9 | 00389 - 390 | 0 | 00390 - 391 | 1 | 00391 - 393 | 3 | 00393 - 394 | 4 | 00394 - 396 | 6 | 00396 - 397 | 7 | 00397 - 398 | 8 | 00398 - 399 | 9 | 00399 - 400 | 0 | 00400 - 401 | 1 | 00401 - 403 | 3 | 00403 - 404 | 4 | 00404 - 406 | 6 | 00406 - 407 | 7 | 00407 - 408 | 8 | 00408 - 409 | 9 | 00409 - 410 | 0 | 00410 - 411 | 1 | 00411 - 413 | 3 | 00413 - 414 | 4 | 00414 - 416 | 6 | 00416 - 417 | 7 | 00417 - 418 | 8 | 00418 - 419 | 9 | 00419 - 420 | 0 | 00420 - 421 | 1 | 00421 - 423 | 3 | 00423 - 424 | 4 | 00424 - 426 | 6 | 00426 - 427 | 7 | 00427 - 428 | 8 | 00428 - 429 | 9 | 00429 - 430 | 0 | 00430 - 431 | 1 | 00431 - 433 | 3 | 00433 - 434 | 4 | 00434 - 436 | 6 | 00436 - 437 | 7 | 00437 - 438 | 8 | 00438 - 439 | 9 | 00439 - 440 | 0 | 00440 - 441 | 1 | 00441 - 443 | 3 | 00443 - 444 | 4 | 00444 - 446 | 6 | 00446 - 447 | 7 | 00447 - 448 | 8 | 00448 - 449 | 9 | 00449 - 450 | 0 | 00450 - 451 | 1 | 00451 - 453 | 3 | 00453 - 454 | 4 | 00454 - 456 | 6 | 00456 - 457 | 7 | 00457 - 458 | 8 | 00458 - 459 | 9 | 00459 - 460 | 0 | 00460 - 461 | 1 | 00461 - 463 | 3 | 00463 - 464 | 4 | 00464 - 466 | 6 | 00466 - 467 | 7 | 00467 - 468 | 8 | 00468 - 469 | 9 | 00469 - 470 | 0 | 00470 - 471 | 1 | 00471 - 473 | 3 | 00473 - 474 | 4 | 00474 - 476 | 6 | 00476 - 477 | 7 | 00477 - 478 | 8 | 00478 - 479 | 9 | 00479 - 480 | 0 | 00480 - 481 | 1 | 00481 - 483 | 3 | 00483 - 484 | 4 | 00484 - 486 | 6 | 00486 - 487 | 7 | 00487 - 488 | 8 | 00488 - 489 | 9 | 00489 - 490 | 0 | 00490 - 491 | 1 | 00491 - 493 | 3 | 00493 - 494 | 4 | 00494 - 496 | 6 | 00496 - 497 | 7 | 00497 - 498 | 8 | 00498 - 499 | 9 | 00499 - 500 | 0 | 00500 - 501 | 1 | 00501 - 503 | 3 | 00503 - 504 | 4 | 00504 - 506 | 6 | 00506 - 507 | 7 | 00507 - 508 | 8 | 00508 - 509 | 9 | 00509 - 510 | 0 | 00510 - 511 | 1 | 00511 - 513 | 3 | 00513 - 514 | 4 | 00514 - 516 | 6 | 00516 - 517 | 7 | 00517 - 518 | 8 | 00518 - 519 | 9 | 00519 - 520 | 0 | 00520 - 521 | 1 | 00521 - 523 | 3 | 00523 - 524 | 4 | 00524 - 526 | 6 | 00526 - 527 | 7 | 00527 - 528 | 8 | 00528 - 529 | 9 | 00529 - 530 | 0 | 00530 - 531 | 1 | 00531 - 533 | 3 | 00533 - 534 | 4 | 00534 - 536 | 6 | 00536 - 537 | 7 | 00537 - 538 | 8 | 00538 - 539 | 9 | 00539 - 540 | 0 | 00540 - 541 | 1 | 00541 - 543 | 3 | 00543 - 544 | 4 | 00544 - 546 | 6 | 00546 - 547 | 7 | 00547 - 548 | 8 | 00548 - 549 | 9 | 00549 - 550 | 0 | 00550 - 551 | 1 | 00551 - 553 | 3 | 00553 - 554 | 4 | 00554 - 556 | 6 | 00556 - 557 | 7 | 00557 - 558 | 8 | 00558 - 559 | 9 | 00559 - 560 | 0 | 00560 - 561 | 1 | 00561 - 563 | 3 | 00563 - 564 | 4 | 00564 - 566 | 6 | 00566 - 567 | 7 | 00567 - 568 | 8 | 00568 - 569 | 9 | 00569 - 570 | 0 | 00570 - 571 | 1 | 00571 - 573 | 3 | 00573 - 574 | 4 | 00574 - 576 | 6 | 00576 - 577 | 7 | 00577 - 578 | 8 | 00578 - 579 | 9 | 00579 - 580 | 0 | 00580 - 581 | 1 | 00581 - 583 | 3 | 00583 - 584 | 4 | 00584 - 586 | 6 | 00586 - 587 | 7 | 00587 - 588 | 8 | 00588 - 589 | 9 | 00589 - 590 | 0 | 00590 - 591 | 1 | 00591 - 593 | 3 | 00593 - 594 | 4 | 00594 - 596 | 6 | 00596 - 597 | 7 | 00597 - 598 | 8 | 00598 - 599 | 9 | 00599 - 600 | 0 | 00600 - 601 | 1 | 00601 - 603 | 3 | 00603 - 604 | 4 | 00604 - 606 | 6 | 00606 - 607 | 7 | 00607 - 608 | 8 | 00608 - 609 | 9 | 00609 - 610 | 0 | 00610 - 611 | 1 | 00611 - 613 | 3 | 00613 - 614 | 4 | 00614 - 616 | 6 | 00616 - 617 | 7 | 00617 - 618 | 8 | 00618 - 619 | 9 | 00619 - 620 | 0 | 00620 - 621 | 1 | 00621 - 623 | 3 | 00623 - 624 | 4 | 00624 - 626 | 6 | 00626 - 627 | 7 | 00627 - 628 | 8 | 00628 - 629 | 9 | 00629 - 630 | 0 | 00630 - 631 | 1 | 00631 - 633 | 3 | 00633 - 634 | 4 | 00634 - 636 | 6 | 00636 - 637 | 7 | 00637 - 638 | 8 | 00638 - 639 | 9 | 00639 - 640 | 0 | 00640 - 641 | 1 | 00641 - 643 | 3 | 00643 - 644 | 4 | 00644 - 646 | 6 | 00646 - 647 | 7 | 00647 - 648 | 8 | 00648 - 649 | 9 | 00649 - 650 | 0 | 00650 - 651 | 1 | 00651 - 653 | 3 | 00653 - 654 | 4 | 00654 - 656 | 6 | 00656 - 657 | 7 | 00657 - 658 | 8 | 00658 - 659 | 9 | 00659 - 660 | 0 | 00660 - 661 | 1 | 00661 - 663 | 3 | 00663 - 664 | 4 | 00664 - 666 | 6 | 00666 - 667 | 7 | 00667 - 668 | 8 | 00668 - 669 | 9 | 00669 - 670 | 0 | 00670 - 671 | 1 | 00671 - 673 | 3 | 00673 - 674 | 4 | 00674 - 676 | 6 | 00676 - 677 | 7 | 00677 - 678 | 8 | 00678 - 679 | 9 | 00679 - 680 | 0 | 00680 - 681 | 1 | 00681 - 683 | 3 | 00683 - 684 | 4 | 00684 - 686 | 6 | 00686 - 687 | 7 | 00687 - 688 | 8 | 00688 - 689 | 9 | 00689 - 690 | 0 | 00690 - 691 | 1 | 00691 - 693 | 3 | 00693 - 694 | 4 | 00694 - 696 | 6 | 00696 - 697 | 7 | 00697 - 698 | 8 | 00698 - 699 | 9 | 00699 - 700 | 0 | 00700 - 701 | 1 | 00701 - 703 | 3 | 00703 - 704 | 4 | 00704 - 706 | 6 | 00706 - 707 | 7 | 00707 - 708 | 8 | 00708 - 709 | 9 | 00709 - 710 | 0 | 00710 - 711 | 1 | 00711 - 713 | 3 | 00713 - 714 | 4 | 00714 - 716 | 6 | 00716 - 717 | 7 | 00717 - 718 | 8 | 00718 - 719 | 9 | 00719 - 720 | 0 | 00720 - 721 | 1 | 00721 - 723 | 3 | 00723 - 724 | 4 | 00724 - 726 | 6 | 00726 - 727 | 7 | 00727 - 728 | 8 | 00728 - 729 | 9 | 00729 - 730 | 0 | 00730 - 731 | 1 | 00731 - 733 | 3 | 00733 - 734 | 4 | 00734 - 736 | 6 | 00736 - 737 | 7 | 00737 - 738 | 8 | 00738 - 739 | 9 | 00739 - 740 | 0 | 00740 - 741 | 1 | 00741 - 743 | 3 | 00743 - 744 | 4 | 00744 - 746 | 6 | 00746 - 747 | 7 | 00747 - 748 | 8 | 00748 - 749 | 9 | 00749 - 750 | 0 | 00750 - 751 | 1 | 00751 - 753 | 3 | 00753 - 754 | 4 | 00754 - 756 | 6 | 00756 - 757 | 7 | 00757 - 758 | 8 | 00758 - 759 | 9 | 00759 - 760 | 0 | 00760 - 761 | 1 | 00761 - 763 | 3 | 00763 - 764 | 4 | 00764 - 766 | 6 | 00766 - 767 | 7 | 00767 - 768 | 8 | 00768 - 769 | 9 | 00769 - 770 | 0 | 00770 - 771 | 1 | 00771 - 773 | 3 | 00773 - 774 | 4 | 00774 - 776 | 6 | 00776 - 777 | 7 | 00777 - 778 | 8 | 00778 - 779 | 9 | 00779 - 780 | 0 | 00780 - 781 | 1 | 00781 - 783 | 3 | 00783 - 784 | 4 | 00784 - 786 | 6 | 00786 - 787 | 7 | 00787 - 788 | 8 | 00788 - 789 | 9 | 00789 - 790 | 0 | 00790 - 791 | 1 | 00791 - 793 | 3 | 00793 - 794 | 4 | 00794 - 796 | 6 | 00796 - 797 | 7 | 00797 - 798 | 8 | 00798 - 799 | 9 | 00799 - 800 | 0 | 00800 - 801 | 1 | 00801 - 803 | 3 | 00803 - 804 | 4 | 00804 - 806 | 6 | 00806 - 807 | 7 | 00807 - 808 | 8 | 00808 - 809 | 9 | 00809 - 810 | 0 | 00810 - 811 | 1 | 00811 - 813 | 3 | 00813 - 814 | 4 | 00814 - 816 | 6 | 00816 - 817 | 7 | 00817 - 818 | 8 | 00818 - 819 | 9 | 00819 - 820 | 0 | 00820 - 821 | 1 | 00821 - 823 | 3 | 00823 - 824 | 4 | 00824 - 826 | 6 | 00826 - 827 | 7 | 00827 - 828 | 8 | 00828 - 829 | 9 | 00829 - 830 | 0 | 00830 - 831 | 1 | 00831 - 833 | 3 | 00833 - 834 | 4 | 00834 - 836 | 6 | 00836 - 837 | 7 | 00837 - 838 | 8 | 00838 - 839 | 9 | 00839 - 840 | 0 | 00840 - 841 | 1 | 00841 - 843 | 3 | 00843 - 844 | 4 | 00844 - 846 | 6 | 00846 - 847 | 7 | 00847 - 848 | 8 | 00848 - 849 | 9 | 00849 - 850 | 0 | 00850 - 851 | 1 | 00851 - 853 | 3 | 00853 - 854 | 4 | 00854 - 856 | 6 | 00856 - 857 | 7 | 00857 - 858 | 8 | 00858 - 859 | 9 | 00859 - 860 | 0 | 00860 - 861 | 1 | 00861 - 863 | 3 | 00863 - 864 | 4 | 00864 - 866 | 6 | 00866 - 867 | 7 | 00867 - 868 | 8 | 00868 - 869 | 9 | 00869 - 870 | 0 | 00870 - 871 | 1 | 00871 - 873 | 3 | 00873 - 874 | 4 | 00874 - 876 | 6 | 00876 - 877 | 7 | 00877 - 878 | 8 | 00878 - 879 | 9 | 00879 - 880 | 0 | 00880 - 881 | 1 | 00881 - 883 | 3 | 00883 - 884 | 4 | 00884 - 886 | 6 | 00886 - 887 | 7 | 00887 - 888 | 8 | 00888 - 889 | 9 | 00889 - 890 | 0 | 00890 - 891 | 1 | 00891 - 893 | 3 | 00893 - 894 | 4 | 00894 - 896 | 6 | 00896 - 897 | 7 | 00897 - 898 | 8 | 00898 - 899 | 9 | 00899 - 900 | 0 | 00900 - 901 | 1 | 00901 - 903 | 3 | 00903 - 904 | 4 | 00904 - 906 | 6 | 00906 - 907 | 7 | 00907 - 908 | 8 | 00908 - 909 | 9 | 00909 - 910 | 0 | 00910 - 911 | 1 | 00911 - 913 | 3 | 00913 - 914 | 4 | 00914 - 916 | 6 | 00916 - 917 | 7 | 00917 - 918 | 8 | 00918 - 919 | 9 | 00919 - 920 | 0 | 00920 - 921 | 1 | 00921 - 923 | 3 | 00923 - 924 | 4 | 00924 - 926 | 6 | 00926 - 927 | 7 | 00927 - 928 | 8 | 00928 - 929 | 9 | 00929 - 930 | 0 | 00930 - 931 | 1 | 00931 - 933 | 3 | 00933 - 934 | 4 | 00934 - 936 | 6 | 00936 - 937 | 7 | 00937 - 938 | 8 | 00938 - 939 | 9 | 00939 - 940 | 0 | 00940 - 941 | 1 | 00941 - 943 | 3 | 00943 - 944 | 4 | 00944 - 946 | 6 | 00946 - 947 | 7 | 00947 - 948 | 8 | 00948 - 949 | 9 | 00949 - 950 | 0 | 00950 - 951 | 1 | 00951 - 953 | 3 | 00953 - 954 | 4 | 00954 - 956 | 6 | 00956 - 957 | 7 | 00957 - 958 | 8 | 00958 - 959 | 9 | 00959 - 960 | 0 | 00960 - 961 | 1 | 00961 - 963 | 3 | 00963 - 964 | 4 | 00964 - 966 | 6 | 00966 - 967 | 7 | 00967 - 968 | 8 | 00968 - 969 | 9 | 00969 - 970 | 0 | 00970 - 971 | 1 | 00971 - 973 | 3 | 00973 - 974 | 4 | 00974 - 976 | 6 | 00976 - 977 | 7 | 00977 - 978 | 8 | 00978 - 979 | 9 | 00979 - 980 | 0 | 00980 - 981 | 1 | 00981 - 983 | 3 | 00983 - 984 | 4 | 00984 - 986 | 6 | 00986 - 987 | 7 | 00987 - 988 | 8 | 00988 - 989 | 9 | 00989 - 990 | 0 | 00990 - 991 | 1 | 00991 - 993 | 3 | 00993 - 994 | 4 | 00994 - 996 | 6 | 00996 - 997 | 7 | 00997 - 998 | 8 | 00998 - 999 | 9 | 00999 - 1000 | 0 | 01000 - 1001 | 101 | 0000100001 - 1003 | 103 | 0000300003 - 1004 | 104 | 0000400004 - 1006 | 106 | 0000600006 - 1007 | 107 | 0000700007 - 1008 | 108 | 0000800008 - 1009 | 109 | 0000900009 - 1010 | 100 | 0001000010 - 1011 | 101 | 0001100011 - 1013 | 103 | 0001300013 - 1014 | 104 | 0001400014 - 1016 | 106 | 0001600016 - 1017 | 107 | 0001700017 - 1018 | 108 | 0001800018 - 1019 | 109 | 0001900019 - 1020 | 100 | 0002000020 - 1101 | 201 | aaa - 1103 | 203 | ccc - 1104 | 204 | ddd -(819 rows) - ---Testcase 384: -EXPLAIN (verbose, costs off) -INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1200,999,'foo'); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.ft2_nsc - -> Result - Output: 1200, 999, NULL::integer, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft2 '::character(10), NULL::text -(3 rows) - ---Testcase 385: -INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1200,999,'foo'); ---Testcase 386: -SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int = 1200 AND (fields->>'c2')::int = 999; - c1 ------- - 1200 -(1 row) - ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; -- can be pushed down ---UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; ---Testcase 387: -EXPLAIN (verbose, costs off) -DELETE FROM ft2_nsc WHERE c1 = 1200; - QUERY PLAN ------------------------------------------------------------------------------ - Delete on public.ft2_nsc - -> Foreign Scan on public.ft2_nsc - Output: c3, "time" - InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = 1200)) -(4 rows) - ---Testcase 388: -SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int = 1200; - c1 ------- - 1200 -(1 row) - ---Testcase 389: -DELETE FROM ft2_nsc WHERE c1 = 1200; ---Testcase 390: -SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int = 1200; - c1 ----- -(0 rows) - --- Test UPDATE/DELETE with RETURNING on a three-table join ---Testcase 391: -INSERT INTO ft2_nsc (c1,c2,c3) - SELECT id, id - 1200, to_char(id, 'FM00000') FROM generate_series(1201, 1300) id; ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c3 = 'foo' --- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) --- WHERE ft2.c1 > 1200 AND ft2.c2 = ft4.c1 --- RETURNING ft2, ft2.*, ft4, ft4.*; -- can be pushed down ---UPDATE ft2 SET c3 = 'foo' --- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) --- WHERE ft2.c1 > 1200 AND ft2.c2 = ft4.c1 --- RETURNING ft2, ft2.*, ft4, ft4.*; ---Testcase 392: -EXPLAIN (verbose, costs off) -DELETE FROM ft2_nsc - USING ft4_nsc LEFT JOIN ft5_nsc ON (ft4_nsc.c1 = ft5_nsc.c1) - WHERE ft2_nsc.c1 > 1200 AND ft2_nsc.c1 % 10 = 0 AND ft2_nsc.c2 = ft4_nsc.c1; -- can be pushed down - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------ - Delete on public.ft2_nsc - -> Hash Right Join - Output: ft2_nsc.c3, ft2_nsc."time", ft4_nsc.*, ft5_nsc.* - Hash Cond: (ft5_nsc.c1 = ft4_nsc.c1) - -> Foreign Scan on public.ft5_nsc - Output: ft5_nsc.*, ft5_nsc.c1 - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" - -> Hash - Output: ft2_nsc.c3, ft2_nsc."time", ft4_nsc.*, ft4_nsc.c1 - -> Hash Join - Output: ft2_nsc.c3, ft2_nsc."time", ft4_nsc.*, ft4_nsc.c1 - Hash Cond: (ft4_nsc.c1 = ft2_nsc.c2) - -> Foreign Scan on public.ft4_nsc - Output: ft4_nsc.*, ft4_nsc.c1 - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" - -> Hash - Output: ft2_nsc.c3, ft2_nsc."time", ft2_nsc.c2 - -> Foreign Scan on public.ft2_nsc - Output: ft2_nsc.c3, ft2_nsc."time", ft2_nsc.c2 - InfluxDB query: SELECT "c2", "c3" FROM "T1" WHERE (("C 1" > 1200)) AND ((("C 1" % 10) = 0)) -(20 rows) - ---Testcase 393: -SELECT 100 FROM ft2, - ft4 LEFT JOIN ft5 ON ((ft4.fields->>'c1')::int = (ft5.fields->>'c1')::int) - WHERE (ft2.fields->>'C 1')::int > 1200 AND (ft2.fields->>'C 1')::int % 10 = 0 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; - ?column? ----------- - 100 - 100 - 100 - 100 - 100 - 100 - 100 - 100 - 100 - 100 -(10 rows) - ---Testcase 394: -DELETE FROM ft2_nsc - USING ft4_nsc LEFT JOIN ft5_nsc ON (ft4_nsc.c1 = ft5_nsc.c1) - WHERE ft2_nsc.c1 > 1200 AND ft2_nsc.c1 % 10 = 0 AND ft2_nsc.c2 = ft4_nsc.c1; ---Testcase 395: -SELECT 100 FROM ft2, - ft4 LEFT JOIN ft5 ON ((ft4.fields->>'c1')::int = (ft5.fields->>'c1')::int) - WHERE (ft2.fields->>'C 1')::int > 1200 AND (ft2.fields->>'C 1')::int % 10 = 0 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; - ?column? ----------- -(0 rows) - ---Testcase 396: -DELETE FROM ft2_nsc WHERE ft2_nsc.c1 > 1200; --- Test UPDATE with a MULTIEXPR sub-select --- (maybe someday this'll be remotely executable, but not today) ---EXPLAIN (verbose, costs off) ---UPDATE ft2 AS target SET (c2, c7) = ( --- SELECT c2 * 10, c7 --- FROM ft2 AS src --- WHERE target.c1 = src.c1 ---) WHERE c1 > 1100; ---UPDATE ft2 AS target SET (c2, c7) = ( --- SELECT c2 * 10, c7 --- FROM ft2 AS src --- WHERE targ--et.c1 = src.c1 ---) WHERE c1 > 1100; ---UPDATE ft2 AS target SET (c2) = ( --- SELECT c2 / 10 --- FROM ft2 AS src --- WHERE targ--et.c1 = src.c1 ---) WHERE c1 > 1100; --- Test UPDATE/DELETE with WHERE or JOIN/ON conditions containing --- user-defined operators/functions ---Testcase 397: -INSERT INTO ft2_nsc (c1,c2,c3) - SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id; ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c3 = 'bar' WHERE influxdb_fdw_abs(c1) > 2000 RETURNING *; -- can't be pushed down ---UPDATE ft2 SET c3 = 'bar' WHERE influxdb_fdw_abs(c1) > 2000 RETURNING *; ---EXPLAIN (verbose, costs off) ---UPDATE ft2 SET c3 = 'baz' --- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) --- WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 --- RETURNING ft2.*, ft4.*, ft5.*; -- can't be pushed down ---UPDATE ft2 SET c3 = 'baz' --- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) --- WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 --- RETURNING ft2.*, ft4.*, ft5.*; ---Testcase 398: -EXPLAIN (verbose, costs off) -DELETE FROM ft2_nsc - USING ft4_nsc INNER JOIN ft5_nsc ON (ft4_nsc.c1 === ft5_nsc.c1) - WHERE ft2_nsc.c1 > 2000 AND ft2_nsc.c2 = ft4_nsc.c1; -- can't be pushed down - QUERY PLAN ----------------------------------------------------------------------------------------------- - Delete on public.ft2_nsc - -> Nested Loop - Output: ft2_nsc.c3, ft2_nsc."time", ft4_nsc.*, ft5_nsc.* - Join Filter: (ft4_nsc.c1 === ft5_nsc.c1) - -> Hash Join - Output: ft2_nsc.c3, ft2_nsc."time", ft4_nsc.*, ft4_nsc.c1 - Hash Cond: (ft4_nsc.c1 = ft2_nsc.c2) - -> Foreign Scan on public.ft4_nsc - Output: ft4_nsc.*, ft4_nsc.c1 - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" - -> Hash - Output: ft2_nsc.c3, ft2_nsc."time", ft2_nsc.c2 - -> Foreign Scan on public.ft2_nsc - Output: ft2_nsc.c3, ft2_nsc."time", ft2_nsc.c2 - InfluxDB query: SELECT "c2", "c3" FROM "T1" WHERE (("C 1" > 2000)) - -> Materialize - Output: ft5_nsc.*, ft5_nsc.c1 - -> Foreign Scan on public.ft5_nsc - Output: ft5_nsc.*, ft5_nsc.c1 - InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" -(20 rows) - ---Testcase 399: -SELECT (ft2.fields->>'C 1')::int c1, (ft2.fields->>'c2')::int c2, ft2.tags->>'c3' c3 - FROM ft2, ft4 INNER JOIN ft5 ON ((ft4.fields->>'c1')::int === (ft5.fields->>'c1')::int) - WHERE (ft2.fields->>'C 1')::int > 2000 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; - c1 | c2 | c3 -------+----+------- - 2006 | 6 | 02006 -(1 row) - ---Testcase 400: -DELETE FROM ft2_nsc - USING ft4_nsc INNER JOIN ft5_nsc ON (ft4_nsc.c1 === ft5_nsc.c1) - WHERE ft2_nsc.c1 > 2000 AND ft2_nsc.c2 = ft4_nsc.c1; ---Testcase 401: -SELECT (ft2.fields->>'C 1')::int c1, (ft2.fields->>'c2')::int c2, ft2.tags->>'c3' c3 - FROM ft2, ft4 INNER JOIN ft5 ON ((ft4.fields->>'c1')::int === (ft5.fields->>'c1')::int) - WHERE (ft2.fields->>'C 1')::int > 2000 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; - c1 | c2 | c3 -----+----+---- -(0 rows) - ---Testcase 402: -DELETE FROM ft2_nsc WHERE ft2_nsc.c1 > 2000; --- Test that trigger on remote table works as expected ---Testcase 403: -CREATE OR REPLACE FUNCTION "S 1".F_BRTRIG() RETURNS trigger AS $$ -BEGIN - NEW.c3 = NEW.c3 || '_trig_update'; - RETURN NEW; -END; -$$ LANGUAGE plpgsql; ---Testcase 404: -CREATE TRIGGER t1_br_insert BEFORE INSERT OR UPDATE - ON "S 1".s1t1 FOR EACH ROW EXECUTE PROCEDURE "S 1".F_BRTRIG(); ---Testcase 405: -INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1208, 818, 'fff'); ---Testcase 406: -SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 WHERE (fields->>'C 1')::int = 1208; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+-----+----+------------+---- - 1208 | 818 | fff | | ft2 | -(1 row) - ---Testcase 407: -INSERT INTO ft2_nsc (c1,c2,c3,c6) VALUES (1218, 818, 'ggg', '(--;'); ---Testcase 408: -SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 WHERE (fields->>'C 1')::int = 1218; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+-----+------+------------+---- - 1218 | 818 | ggg | (--; | ft2 | -(1 row) - ---UPDATE ft2 SET c2 = c2 + 600 WHERE c1 % 10 = 8 AND c1 < 1200 RETURNING *; --- Test errors thrown on remote side during update -ALTER TABLE "S 1"."T 1" ADD CONSTRAINT c2positive CHECK ((fields->>'c2')::int >= 0); --- influxdb_fdw does not support key, ON CONFLICT ---INSERT INTO ft1(c1, c2) VALUES(11, 12); -- duplicate key ---Testcase 409: -INSERT INTO ft1_nsc(c1, c2) VALUES(11, 12) ON CONFLICT DO NOTHING; -- works -ERROR: ON CONFLICT is not supported ---Testcase 410: -INSERT INTO ft1_nsc(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO NOTHING; -- unsupported -ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification ---Testcase 411: -INSERT INTO ft1_nsc(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO UPDATE SET c3 = 'ffg'; -- unsupported -ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification ---INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive ---UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive -/* --- influxdb_fdw does not support transactions --- Test savepoint/rollback behavior -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; -begin; -update ft2 set c2 = 42 where c2 = 0; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -savepoint s1; -update ft2 set c2 = 44 where c2 = 4; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -release savepoint s1; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -savepoint s2; -update ft2 set c2 = 46 where c2 = 6; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -rollback to savepoint s2; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -release savepoint s2; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -savepoint s3; -update ft2 set c2 = -2 where c2 = 42 and c1 = 10; -- fail on remote side -rollback to savepoint s3; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -release savepoint s3; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; --- none of the above is committed yet remotely -select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; -commit; -select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; -select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; -*/ --- Above DMLs add data with c6 as NULL in ft1, so test ORDER BY NULLS LAST and NULLs --- FIRST behavior here. --- ORDER BY DESC NULLS LAST options ---Testcase 412: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY fields->>'c6' DESC NULLS LAST, (fields->>'C 1')::int OFFSET 795 LIMIT 10; - QUERY PLAN ------------------------------------------------------------------------------------------------------------- - Limit - Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) - -> Sort - Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) - Sort Key: ((ft1.fields ->> 'c6'::text)) DESC NULLS LAST, (((ft1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 - Output: "time", tags, fields, (fields ->> 'c6'::text), ((fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(8 rows) - ---Testcase 413: -SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 ORDER BY fields->>'c6' DESC NULLS LAST, (fields->>'C 1')::int OFFSET 795 LIMIT 10; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+------------+------+------------+----- - 960 | 0 | 00960 | 0 | 0 | foo - 970 | 0 | 00970 | 0 | 0 | foo - 980 | 0 | 00980 | 0 | 0 | foo - 990 | 0 | 00990 | 0 | 0 | foo - 1000 | 0 | 01000 | 0 | 0 | foo - 1218 | 818 | ggg | (--; | ft2 | - 1001 | 101 | 0000100001 | | ft2 | - 1003 | 103 | 0000300003 | | ft2 | - 1004 | 104 | 0000400004 | | ft2 | - 1006 | 106 | 0000600006 | | ft2 | -(10 rows) - --- ORDER BY DESC NULLS FIRST options ---Testcase 414: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY fields->>'c6' DESC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Limit - Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) - -> Sort - Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) - Sort Key: ((ft1.fields ->> 'c6'::text)) DESC, (((ft1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 - Output: "time", tags, fields, (fields ->> 'c6'::text), ((fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(8 rows) - ---Testcase 415: -SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 ORDER BY fields->>'c6' DESC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+------------+----+------------+----- - 1020 | 100 | 0002000020 | | ft2 | - 1101 | 201 | aaa | | ft2 | - 1103 | 203 | ccc | | ft2 | - 1104 | 204 | ddd | | ft2 | - 1208 | 818 | fff | | ft2 | - 9 | 9 | 00009 | 9 | 9 | foo - 19 | 9 | 00019 | 9 | 9 | foo - 29 | 9 | 00029 | 9 | 9 | foo - 39 | 9 | 00039 | 9 | 9 | foo - 49 | 9 | 00049 | 9 | 9 | foo -(10 rows) - --- ORDER BY ASC NULLS FIRST options ---Testcase 416: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY fields->>'c6' ASC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Limit - Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) - -> Sort - Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) - Sort Key: ((ft1.fields ->> 'c6'::text)) NULLS FIRST, (((ft1.fields ->> 'C 1'::text))::integer) - -> Foreign Scan on public.ft1 - Output: "time", tags, fields, (fields ->> 'c6'::text), ((fields ->> 'C 1'::text))::integer - InfluxDB query: SELECT * FROM "T1" -(8 rows) - ---Testcase 417: -SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 ORDER BY fields->>'c6' ASC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; - c1 | c2 | c3 | c6 | c7 | c8 -------+-----+------------+------+------------+----- - 1020 | 100 | 0002000020 | | ft2 | - 1101 | 201 | aaa | | ft2 | - 1103 | 203 | ccc | | ft2 | - 1104 | 204 | ddd | | ft2 | - 1208 | 818 | fff | | ft2 | - 1218 | 818 | ggg | (--; | ft2 | - 10 | 0 | 00010 | 0 | 0 | foo - 20 | 0 | 00020 | 0 | 0 | foo - 30 | 0 | 00030 | 0 | 0 | foo - 40 | 0 | 00040 | 0 | 0 | foo -(10 rows) - --- =================================================================== --- test check constraints --- =================================================================== --- Consistent check constraints provide consistent results -ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2positive CHECK ((fields->>'c2')::int >= 0); ---Testcase 418: -EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; - QUERY PLAN ----------------------------------------------------------------- - Foreign Scan - Output: (count(*)) - InfluxDB query: SELECT count(*) FROM "T1" WHERE (("c2" < 0)) -(3 rows) - --- InfluxDB return null value because it does not have any record. ---Testcase 419: -SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; - count -------- -(0 rows) - -SET constraint_exclusion = 'on'; ---Testcase 420: -EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; - QUERY PLAN --------------------------------- - Aggregate - Output: count(*) - -> Result - One-Time Filter: false -(4 rows) - ---Testcase 421: -SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; - count -------- - 0 -(1 row) - -RESET constraint_exclusion; --- check constraint is enforced on the remote side, not locally --- INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive --- UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive -ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2positive; --- But inconsistent check constraints provide inconsistent results -ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2negative CHECK ((fields->>'c2')::int < 0); ---Testcase 422: -EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; - QUERY PLAN ------------------------------------------------------------------ - Foreign Scan - Output: (count(*)) - InfluxDB query: SELECT count(*) FROM "T1" WHERE (("c2" >= 0)) -(3 rows) - ---Testcase 423: -SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; - count -------- - 821 -(1 row) - -SET constraint_exclusion = 'on'; ---Testcase 424: -EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; - QUERY PLAN --------------------------------- - Aggregate - Output: count(*) - -> Result - One-Time Filter: false -(4 rows) - ---Testcase 425: -SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; - count -------- - 0 -(1 row) - -RESET constraint_exclusion; --- local check constraint is not actually enforced ---Testcase 426: -INSERT INTO ft1_nsc(c1, c2) VALUES(1111, 2); --- UPDATE ft1 SET c2 = c2 + 1 WHERE c1 = 1; -ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2negative; --- influxdb_fdw does not support this feature --- =================================================================== --- test WITH CHECK OPTION constraints --- =================================================================== ---Testcase 427: -CREATE FUNCTION row_before_insupd_trigfunc() RETURNS trigger AS $$BEGIN NEW.a := NEW.a + 10; RETURN NEW; END$$ LANGUAGE plpgsql; ---Testcase 428: -CREATE FOREIGN TABLE base_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'base_tbl', schemaless 'true'); ---ALTER FOREIGN TABLE base_tbl SET (autovacuum_enabled = 'false'); -CREATE FOREIGN TABLE base_tbl_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 'base_tbl'); ---Testcase 429: -CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON base_tbl_nsc FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); ---Testcase 430: -CREATE FOREIGN TABLE foreign_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'base_tbl', schemaless 'true'); ---Testcase 431: -CREATE VIEW rw_view AS SELECT * FROM base_tbl - WHERE (fields->>'a')::int < (fields->>'b')::int WITH CHECK OPTION; -CREATE VIEW rw_view_nsc AS SELECT * FROM base_tbl_nsc - WHERE a < b WITH CHECK OPTION; ---Testcase 432: -\d+ rw_view - View "public.rw_view" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+-------+-----------+----------+---------+----------+------------- - fields | jsonb | | | | extended | -View definition: - SELECT base_tbl.fields - FROM base_tbl - WHERE ((base_tbl.fields ->> 'a'::text)::integer) < ((base_tbl.fields ->> 'b'::text)::integer); -Options: check_option=cascaded - ---Testcase 433: -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO rw_view_nsc VALUES (0, 5); - QUERY PLAN -------------------------------- - Insert on public.base_tbl_nsc - -> Result - Output: 0, 5 -(3 rows) - ---Testcase 434: -INSERT INTO rw_view_nsc VALUES (0, 5); -- should fail -ERROR: new row violates check option for view "rw_view_nsc" -DETAIL: Failing row contains (10, 5). ---Testcase 435: -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO rw_view_nsc VALUES (0, 15); - QUERY PLAN -------------------------------- - Insert on public.base_tbl_nsc - -> Result - Output: 0, 15 -(3 rows) - ---Testcase 436: -INSERT INTO rw_view_nsc VALUES (0, 15); -- ok ---Testcase 437: -SELECT * FROM foreign_tbl; - fields ------------------------- - {"a": "10", "b": "5"} - {"a": "10", "b": "15"} -(2 rows) - ---EXPLAIN (VERBOSE, COSTS OFF) ---UPDATE rw_view SET b = b + 5; ---UPDATE rw_view SET b = b + 5; -- should fail ---EXPLAIN (VERBOSE, COSTS OFF) ---UPDATE rw_view SET b = b + 15; ---UPDATE rw_view SET b = b + 15; -- ok ---SELECT * FROM foreign_tbl; ---Testcase 438: -DELETE FROM foreign_tbl; -DROP FOREIGN TABLE foreign_tbl CASCADE; ---Testcase 439: -DROP TRIGGER row_before_insupd_trigger ON base_tbl_nsc; ---Testcase 440: -DROP FOREIGN TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view -DROP FOREIGN TABLE base_tbl_nsc CASCADE; -NOTICE: drop cascades to view rw_view_nsc --- influxdb_fdw does not support partitions --- test WCO for partitions ---Testcase 441: -CREATE FOREIGN TABLE child_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'child_tbl', schemaless 'true'); ---ALTER FOREIGN TABLE child_tbl SET (autovacuum_enabled = 'false'); -CREATE FOREIGN TABLE child_tbl_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 'child_tbl'); ---Testcase 442: -CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON child_tbl_nsc FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); ---Testcase 443: -CREATE FOREIGN TABLE foreign_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'child_tbl', schemaless 'true'); ---Testcase 444: -CREATE TABLE parent_tbl (a int, b int) PARTITION BY RANGE(a); -ALTER TABLE parent_tbl ATTACH PARTITION child_tbl_nsc FOR VALUES FROM (0) TO (100); ---Testcase 445: -CREATE VIEW rw_view AS SELECT * FROM parent_tbl - WHERE a < b WITH CHECK OPTION; ---Testcase 446: -\d+ rw_view - View "public.rw_view" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - a | integer | | | | plain | - b | integer | | | | plain | -View definition: - SELECT parent_tbl.a, - parent_tbl.b - FROM parent_tbl - WHERE parent_tbl.a < parent_tbl.b; -Options: check_option=cascaded - ---Testcase 447: -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO rw_view VALUES (0, 5); - QUERY PLAN ------------------------------ - Insert on public.parent_tbl - -> Result - Output: 0, 5 -(3 rows) - ---Testcase 448: -INSERT INTO rw_view VALUES (0, 5); -- should fail -ERROR: cannot route inserted tuples to a foreign table ---Testcase 449: -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO rw_view VALUES (0, 15); - QUERY PLAN ------------------------------ - Insert on public.parent_tbl - -> Result - Output: 0, 15 -(3 rows) - ---Testcase 450: -INSERT INTO rw_view VALUES (0, 15); -- ok -ERROR: cannot route inserted tuples to a foreign table ---Testcase 451: -SELECT * FROM foreign_tbl; - fields --------- -(0 rows) - ---EXPLAIN (VERBOSE, COSTS OFF) ---UPDATE rw_view SET b = b + 5; ---UPDATE rw_view SET b = b + 5; -- should fail ---EXPLAIN (VERBOSE, COSTS OFF) ---UPDATE rw_view SET b = b + 15; ---UPDATE rw_view SET b = b + 15; -- ok ---SELECT * FROM foreign_tbl; ---Testcase 452: -DROP FOREIGN TABLE foreign_tbl CASCADE; ---Testcase 453: -DROP TRIGGER row_before_insupd_trigger ON child_tbl_nsc; ---Testcase 454: -DROP FOREIGN TABLE child_tbl CASCADE; -DROP FOREIGN TABLE child_tbl_nsc CASCADE; ---Testcase 455: -DROP TABLE parent_tbl CASCADE; -NOTICE: drop cascades to view rw_view ---Testcase 456: -DROP FUNCTION row_before_insupd_trigfunc; --- =================================================================== --- test serial columns (ie, sequence-based defaults) --- =================================================================== ---Testcase 457: -create foreign table loc1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loc1', schemaless 'true'); ---alter foreign table loc1 set (autovacuum_enabled = 'false'); -create foreign table loc1_nsc (f1 serial, f2 text) - server influxdb_svr options(table 'loc1'); ---Testcase 458: -create foreign table rem1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loc1', schemaless 'true'); -create foreign table rem1_nsc (f1 serial, f2 text) - server influxdb_svr options(table 'loc1'); ---Testcase 459: -select pg_catalog.setval('rem1_nsc_f1_seq', 10, false); - setval --------- - 10 -(1 row) - ---Testcase 460: -insert into loc1_nsc(f2) values('hi'); ---Testcase 461: -insert into rem1_nsc(f2) values('hi remote'); ---Testcase 462: -insert into loc1_nsc(f2) values('bye'); ---Testcase 463: -insert into rem1_nsc(f2) values('bye remote'); ---Testcase 464: -select * from loc1; - fields ----------------------------------- - {"f1": "1", "f2": "hi"} - {"f1": "10", "f2": "hi remote"} - {"f1": "2", "f2": "bye"} - {"f1": "11", "f2": "bye remote"} -(4 rows) - ---Testcase 465: -select * from rem1; - fields ----------------------------------- - {"f1": "1", "f2": "hi"} - {"f1": "10", "f2": "hi remote"} - {"f1": "2", "f2": "bye"} - {"f1": "11", "f2": "bye remote"} -(4 rows) - --- =================================================================== --- test generated columns --- =================================================================== ---Testcase 466: -create foreign table gloc1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'gloc1', schemaless 'true'); ---alter foreign table gloc1 set (autovacuum_enabled = 'false'); -create foreign table gloc1_nsc (a int, b int generated always as (a * 2) stored) - server influxdb_svr options(table 'gloc1'); -ERROR: syntax error at or near "(" -LINE 1: ...table gloc1_nsc (a int, b int generated always as (a * 2) st... - ^ ---Testcase 467: -create foreign table grem1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'gloc1', schemaless 'true'); -create foreign table grem1_nsc ( - a int, - b int generated always as (a * 2) stored) - server influxdb_svr options(table 'gloc1'); -ERROR: syntax error at or near "(" -LINE 3: b int generated always as (a * 2) stored) - ^ ---Testcase 468: -insert into grem1_nsc (a) values (1), (22); -ERROR: relation "grem1_nsc" does not exist -LINE 1: insert into grem1_nsc (a) values (1), (22); - ^ ---update grem1 set a = 22 where a = 2; ---Testcase 469: -select * from gloc1; - fields --------- -(0 rows) - ---Testcase 470: -select * from grem1; - fields --------- -(0 rows) - --- Clean up: -delete from grem1_nsc; -ERROR: relation "grem1_nsc" does not exist -LINE 1: delete from grem1_nsc; - ^ --- =================================================================== --- test local triggers --- =================================================================== --- Trigger functions "borrowed" from triggers regress test. ---Testcase 471: -CREATE FUNCTION trigger_func() RETURNS trigger LANGUAGE plpgsql AS $$ -BEGIN - RAISE NOTICE 'trigger_func(%) called: action = %, when = %, level = %', - TG_ARGV[0], TG_OP, TG_WHEN, TG_LEVEL; - RETURN NULL; -END;$$; ---Testcase 472: -CREATE TRIGGER trig_stmt_before BEFORE DELETE OR INSERT OR UPDATE ON rem1_nsc - FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---Testcase 473: -CREATE TRIGGER trig_stmt_after AFTER DELETE OR INSERT OR UPDATE ON rem1_nsc - FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---Testcase 474: -CREATE OR REPLACE FUNCTION trigger_data() RETURNS trigger -LANGUAGE plpgsql AS $$ - -declare - oldnew text[]; - relid text; - argstr text; -begin - - relid := TG_relid::regclass; - argstr := ''; - for i in 0 .. TG_nargs - 1 loop - if i > 0 then - argstr := argstr || ', '; - end if; - argstr := argstr || TG_argv[i]; - end loop; - - RAISE NOTICE '%(%) % % % ON %', - tg_name, argstr, TG_when, TG_level, TG_OP, relid; - oldnew := '{}'::text[]; - if TG_OP != 'INSERT' then - oldnew := array_append(oldnew, format('OLD: %s', OLD)); - end if; - - if TG_OP != 'DELETE' then - oldnew := array_append(oldnew, format('NEW: %s', NEW)); - end if; - - RAISE NOTICE '%', array_to_string(oldnew, ','); - - if TG_OP = 'DELETE' then - return OLD; - else - return NEW; - end if; -end; -$$; --- Test basic functionality ---Testcase 475: -CREATE TRIGGER trig_row_before -BEFORE INSERT OR UPDATE OR DELETE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 476: -CREATE TRIGGER trig_row_after -AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 477: -delete from rem1_nsc; -NOTICE: trigger_func() called: action = DELETE, when = BEFORE, level = STATEMENT -NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1_nsc -NOTICE: OLD: (1,hi) -NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1_nsc -NOTICE: OLD: (10,"hi remote") -NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1_nsc -NOTICE: OLD: (2,bye) -NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1_nsc -NOTICE: OLD: (11,"bye remote") -NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1_nsc -NOTICE: OLD: (1,hi) -NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1_nsc -NOTICE: OLD: (10,"hi remote") -NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1_nsc -NOTICE: OLD: (2,bye) -NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1_nsc -NOTICE: OLD: (11,"bye remote") -NOTICE: trigger_func() called: action = DELETE, when = AFTER, level = STATEMENT ---Testcase 478: -insert into rem1_nsc values(1,'insert'); -NOTICE: trigger_func() called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1_nsc -NOTICE: NEW: (1,insert) -NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1_nsc -NOTICE: NEW: (1,insert) -NOTICE: trigger_func() called: action = INSERT, when = AFTER, level = STATEMENT ---update rem1 set f2 = 'update' where f1 = 1; ---update rem1 set f2 = f2 || f2; --- cleanup ---Testcase 479: -DROP TRIGGER trig_row_before ON rem1_nsc; ---Testcase 480: -DROP TRIGGER trig_row_after ON rem1_nsc; ---Testcase 481: -DROP TRIGGER trig_stmt_before ON rem1_nsc; ---Testcase 482: -DROP TRIGGER trig_stmt_after ON rem1_nsc; ---Testcase 483: -DELETE from rem1_nsc; --- Test multiple AFTER ROW triggers on a foreign table ---Testcase 484: -CREATE TRIGGER trig_row_after1 -AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 485: -CREATE TRIGGER trig_row_after2 -AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 486: -insert into rem1_nsc values(1,'insert'); -NOTICE: trig_row_after1(23, skidoo) AFTER ROW INSERT ON rem1_nsc -NOTICE: NEW: (1,insert) -NOTICE: trig_row_after2(23, skidoo) AFTER ROW INSERT ON rem1_nsc -NOTICE: NEW: (1,insert) ---update rem1 set f2 = 'update' where f1 = 1; ---update rem1 set f2 = f2 || f2; ---Testcase 487: -delete from rem1_nsc; -NOTICE: trig_row_after1(23, skidoo) AFTER ROW DELETE ON rem1_nsc -NOTICE: OLD: (1,insert) -NOTICE: trig_row_after2(23, skidoo) AFTER ROW DELETE ON rem1_nsc -NOTICE: OLD: (1,insert) --- cleanup ---Testcase 488: -DROP TRIGGER trig_row_after1 ON rem1_nsc; ---Testcase 489: -DROP TRIGGER trig_row_after2 ON rem1_nsc; --- Test WHEN conditions ---Testcase 490: -CREATE TRIGGER trig_row_before_insupd -BEFORE INSERT OR UPDATE ON rem1_nsc -FOR EACH ROW -WHEN (NEW.f2 like '%update%') -EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 491: -CREATE TRIGGER trig_row_after_insupd -AFTER INSERT OR UPDATE ON rem1_nsc -FOR EACH ROW -WHEN (NEW.f2 like '%update%') -EXECUTE PROCEDURE trigger_data(23,'skidoo'); --- Insert or update not matching: nothing happens ---Testcase 492: -INSERT INTO rem1_nsc values(1, 'insert'); ---UPDATE rem1 set f2 = 'test'; --- Insert or update matching: triggers are fired ---Testcase 493: -INSERT INTO rem1_nsc values(2, 'update'); -NOTICE: trig_row_before_insupd(23, skidoo) BEFORE ROW INSERT ON rem1_nsc -NOTICE: NEW: (2,update) -NOTICE: trig_row_after_insupd(23, skidoo) AFTER ROW INSERT ON rem1_nsc -NOTICE: NEW: (2,update) ---UPDATE rem1 set f2 = 'update update' where f1 = '2'; ---Testcase 494: -CREATE TRIGGER trig_row_before_delete -BEFORE DELETE ON rem1_nsc -FOR EACH ROW -WHEN (OLD.f2 like '%update%') -EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 495: -CREATE TRIGGER trig_row_after_delete -AFTER DELETE ON rem1_nsc -FOR EACH ROW -WHEN (OLD.f2 like '%update%') -EXECUTE PROCEDURE trigger_data(23,'skidoo'); --- Trigger is fired for f1=2, not for f1=1 ---Testcase 496: -DELETE FROM rem1_nsc; -NOTICE: trig_row_before_delete(23, skidoo) BEFORE ROW DELETE ON rem1_nsc -NOTICE: OLD: (2,update) -NOTICE: trig_row_after_delete(23, skidoo) AFTER ROW DELETE ON rem1_nsc -NOTICE: OLD: (2,update) --- cleanup ---Testcase 497: -DROP TRIGGER trig_row_before_insupd ON rem1_nsc; ---Testcase 498: -DROP TRIGGER trig_row_after_insupd ON rem1_nsc; ---Testcase 499: -DROP TRIGGER trig_row_before_delete ON rem1_nsc; ---Testcase 500: -DROP TRIGGER trig_row_after_delete ON rem1_nsc; --- Test various RETURN statements in BEFORE triggers. ---Testcase 501: -CREATE FUNCTION trig_row_before_insupdate() RETURNS TRIGGER AS $$ - BEGIN - NEW.f2 := NEW.f2 || ' triggered !'; - RETURN NEW; - END -$$ language plpgsql; ---Testcase 502: -CREATE TRIGGER trig_row_before_insupd -BEFORE INSERT OR UPDATE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); --- The new values should have 'triggered' appended ---Testcase 503: -INSERT INTO rem1_nsc values(1, 'insert'); ---Testcase 504: -SELECT * from loc1; - fields ------------------------------------------ - {"f1": "1", "f2": "insert triggered !"} -(1 row) - ---Testcase 505: -INSERT INTO rem1_nsc values(2, 'insert'); ---Testcase 506: -SELECT fields->>'f2' f2 FROM rem1 WHERE (fields->>'f1')::int = 2; - f2 --------------------- - insert triggered ! -(1 row) - ---Testcase 507: -SELECT * from loc1; - fields ------------------------------------------ - {"f1": "1", "f2": "insert triggered !"} - {"f1": "2", "f2": "insert triggered !"} -(2 rows) - ---UPDATE rem1 set f2 = ''; ---SELECT * from loc1; ---UPDATE rem1 set f2 = 'skidoo' RETURNING f2; ---SELECT * from loc1; ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f1 = 10; -- all columns should be transmitted ---UPDATE rem1 set f1 = 10; ---SELECT * from loc1; ---Testcase 508: -DELETE FROM rem1_nsc; --- Add a second trigger, to check that the changes are propagated correctly --- from trigger to trigger ---Testcase 509: -CREATE TRIGGER trig_row_before_insupd2 -BEFORE INSERT OR UPDATE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); ---Testcase 510: -INSERT INTO rem1_nsc values(1, 'insert'); ---Testcase 511: -SELECT * from loc1; - fields ------------------------------------------------------ - {"f1": "1", "f2": "insert triggered ! triggered !"} -(1 row) - ---Testcase 512: -INSERT INTO rem1_nsc values(2, 'insert'); ---Testcase 513: -SELECT fields->>'f2' f2 FROM rem1 WHERE (fields->>'f1')::int = 2; - f2 --------------------------------- - insert triggered ! triggered ! -(1 row) - ---Testcase 514: -SELECT * from loc1; - fields ------------------------------------------------------ - {"f1": "1", "f2": "insert triggered ! triggered !"} - {"f1": "2", "f2": "insert triggered ! triggered !"} -(2 rows) - ---UPDATE rem1 set f2 = ''; ---SELECT * from loc1; ---UPDATE rem1 set f2 = 'skidoo' RETURNING f2; ---SELECT * from loc1; ---Testcase 515: -DROP TRIGGER trig_row_before_insupd ON rem1_nsc; ---Testcase 516: -DROP TRIGGER trig_row_before_insupd2 ON rem1_nsc; ---Testcase 517: -DELETE from rem1_nsc; ---Testcase 518: -INSERT INTO rem1_nsc VALUES (1, 'test'); --- Test with a trigger returning NULL ---Testcase 519: -CREATE FUNCTION trig_null() RETURNS TRIGGER AS $$ - BEGIN - RETURN NULL; - END -$$ language plpgsql; ---Testcase 520: -CREATE TRIGGER trig_null -BEFORE INSERT OR UPDATE OR DELETE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trig_null(); --- Nothing should have changed. ---Testcase 521: -INSERT INTO rem1_nsc VALUES (2, 'test2'); ---Testcase 522: -SELECT * from loc1; - fields ---------------------------- - {"f1": "1", "f2": "test"} -(1 row) - ---UPDATE rem1 SET f2 = 'test2'; ---SELECT * from loc1; ---Testcase 523: -DELETE from rem1_nsc; ---Testcase 524: -SELECT * from loc1; - fields ---------------------------- - {"f1": "1", "f2": "test"} -(1 row) - ---Testcase 525: -DROP TRIGGER trig_null ON rem1_nsc; ---Testcase 526: -DELETE from rem1_nsc; --- Test a combination of local and remote triggers ---Testcase 527: -CREATE TRIGGER trig_row_before -BEFORE INSERT OR UPDATE OR DELETE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 528: -CREATE TRIGGER trig_row_after -AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 529: -CREATE TRIGGER trig_local_before BEFORE INSERT OR UPDATE ON loc1_nsc -FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); ---Testcase 530: -INSERT INTO rem1_nsc(f2) VALUES ('test'); -NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1_nsc -NOTICE: NEW: (12,test) -NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1_nsc -NOTICE: NEW: (12,test) ---UPDATE rem1 SET f2 = 'testo'; --- Test returning a system attribute ---Testcase 531: -INSERT INTO rem1_nsc(f2) VALUES ('test'); -NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1_nsc -NOTICE: NEW: (13,test) -NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1_nsc -NOTICE: NEW: (13,test) ---Testcase 532: -SELECT * FROM rem1 WHERE fields->>'f2' = 'test'; - fields ----------------------------- - {"f1": "12", "f2": "test"} - {"f1": "13", "f2": "test"} -(2 rows) - --- cleanup ---Testcase 533: -DROP TRIGGER trig_row_before ON rem1_nsc; ---Testcase 534: -DROP TRIGGER trig_row_after ON rem1_nsc; ---Testcase 535: -DROP TRIGGER trig_local_before ON loc1_nsc; --- Test direct foreign table modification functionality --- Test with statement-level triggers ---Testcase 536: -CREATE TRIGGER trig_stmt_before - BEFORE DELETE OR INSERT OR UPDATE ON rem1_nsc - FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 537: -EXPLAIN (verbose, costs off) -DELETE FROM rem1_nsc; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1_nsc - -> Foreign Delete on public.rem1_nsc - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 538: -DROP TRIGGER trig_stmt_before ON rem1_nsc; ---Testcase 539: -CREATE TRIGGER trig_stmt_after - AFTER DELETE OR INSERT OR UPDATE ON rem1_nsc - FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 540: -EXPLAIN (verbose, costs off) -DELETE FROM rem1_nsc; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1_nsc - -> Foreign Delete on public.rem1_nsc - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 541: -DROP TRIGGER trig_stmt_after ON rem1_nsc; --- Test with row-level ON INSERT triggers ---Testcase 542: -CREATE TRIGGER trig_row_before_insert -BEFORE INSERT ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 543: -EXPLAIN (verbose, costs off) -DELETE FROM rem1_nsc; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1_nsc - -> Foreign Delete on public.rem1_nsc - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 544: -DROP TRIGGER trig_row_before_insert ON rem1_nsc; ---Testcase 545: -CREATE TRIGGER trig_row_after_insert -AFTER INSERT ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 546: -EXPLAIN (verbose, costs off) -DELETE FROM rem1_nsc; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1_nsc - -> Foreign Delete on public.rem1_nsc - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 547: -DROP TRIGGER trig_row_after_insert ON rem1_nsc; --- Test with row-level ON UPDATE triggers ---Testcase 548: -CREATE TRIGGER trig_row_before_update -BEFORE UPDATE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can't be pushed down ---Testcase 549: -EXPLAIN (verbose, costs off) -DELETE FROM rem1_nsc; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1_nsc - -> Foreign Delete on public.rem1_nsc - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 550: -DROP TRIGGER trig_row_before_update ON rem1_nsc; ---Testcase 551: -CREATE TRIGGER trig_row_after_update -AFTER UPDATE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can't be pushed down ---Testcase 552: -EXPLAIN (verbose, costs off) -DELETE FROM rem1_nsc; -- can be pushed down - QUERY PLAN --------------------------------------------- - Delete on public.rem1_nsc - -> Foreign Delete on public.rem1_nsc - InfluxDB query: DELETE FROM "loc1" -(3 rows) - ---Testcase 553: -DROP TRIGGER trig_row_after_update ON rem1_nsc; --- Test with row-level ON DELETE triggers ---Testcase 554: -CREATE TRIGGER trig_row_before_delete -BEFORE DELETE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 555: -EXPLAIN (verbose, costs off) -DELETE FROM rem1_nsc; -- can't be pushed down - QUERY PLAN -------------------------------------------------------- - Delete on public.rem1_nsc - -> Foreign Scan on public.rem1_nsc - Output: rem1_nsc.* - InfluxDB query: SELECT "f1", "f2" FROM "loc1" -(4 rows) - ---Testcase 556: -DROP TRIGGER trig_row_before_delete ON rem1_nsc; ---Testcase 557: -CREATE TRIGGER trig_row_after_delete -AFTER DELETE ON rem1_nsc -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---EXPLAIN (verbose, costs off) ---UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 558: -EXPLAIN (verbose, costs off) -DELETE FROM rem1_nsc; -- can't be pushed down - QUERY PLAN -------------------------------------------------------- - Delete on public.rem1_nsc - -> Foreign Scan on public.rem1_nsc - Output: rem1_nsc.* - InfluxDB query: SELECT "f1", "f2" FROM "loc1" -(4 rows) - ---Testcase 559: -DROP TRIGGER trig_row_after_delete ON rem1_nsc; --- =================================================================== --- test inheritance features --- =================================================================== ---Testcase 560: -CREATE TABLE a (aa TEXT); ---CREATE TABLE loct (aa TEXT, bb TEXT); -ALTER TABLE a SET (autovacuum_enabled = 'false'); ---ALTER TABLE loct SET (autovacuum_enabled = 'false'); --- Because influxdb_fdw does not support UPDATE, to test locally --- we create local table. ---Testcase 561: -CREATE TABLE b (bb TEXT) INHERITS (a); ---Testcase 562: -INSERT INTO a(aa) VALUES('aaa'); ---Testcase 563: -INSERT INTO a(aa) VALUES('aaaa'); ---Testcase 564: -INSERT INTO a(aa) VALUES('aaaaa'); ---Testcase 565: -INSERT INTO b(aa) VALUES('bbb'); ---Testcase 566: -INSERT INTO b(aa) VALUES('bbbb'); ---Testcase 567: -INSERT INTO b(aa) VALUES('bbbbb'); ---Testcase 568: -SELECT tableoid::regclass, * FROM a; - tableoid | aa -----------+------- - a | aaa - a | aaaa - a | aaaaa - b | bbb - b | bbbb - b | bbbbb -(6 rows) - ---Testcase 569: -SELECT tableoid::regclass, * FROM b; - tableoid | aa | bb -----------+-------+---- - b | bbb | - b | bbbb | - b | bbbbb | -(3 rows) - ---Testcase 570: -SELECT tableoid::regclass, * FROM ONLY a; - tableoid | aa -----------+------- - a | aaa - a | aaaa - a | aaaaa -(3 rows) - ---Testcase 571: -UPDATE a SET aa = 'zzzzzz' WHERE aa LIKE 'aaaa%'; ---Testcase 572: -SELECT tableoid::regclass, * FROM a; - tableoid | aa -----------+-------- - a | aaa - a | zzzzzz - a | zzzzzz - b | bbb - b | bbbb - b | bbbbb -(6 rows) - ---Testcase 573: -SELECT tableoid::regclass, * FROM b; - tableoid | aa | bb -----------+-------+---- - b | bbb | - b | bbbb | - b | bbbbb | -(3 rows) - ---Testcase 574: -SELECT tableoid::regclass, * FROM ONLY a; - tableoid | aa -----------+-------- - a | aaa - a | zzzzzz - a | zzzzzz -(3 rows) - ---Testcase 575: -UPDATE b SET aa = 'new'; ---Testcase 576: -SELECT tableoid::regclass, * FROM a; - tableoid | aa -----------+-------- - a | aaa - a | zzzzzz - a | zzzzzz - b | new - b | new - b | new -(6 rows) - ---Testcase 577: -SELECT tableoid::regclass, * FROM b; - tableoid | aa | bb -----------+-----+---- - b | new | - b | new | - b | new | -(3 rows) - ---Testcase 578: -SELECT tableoid::regclass, * FROM ONLY a; - tableoid | aa -----------+-------- - a | aaa - a | zzzzzz - a | zzzzzz -(3 rows) - ---Testcase 579: -UPDATE a SET aa = 'newtoo'; ---Testcase 580: -SELECT tableoid::regclass, * FROM a; - tableoid | aa -----------+-------- - a | newtoo - a | newtoo - a | newtoo - b | newtoo - b | newtoo - b | newtoo -(6 rows) - ---Testcase 581: -SELECT tableoid::regclass, * FROM b; - tableoid | aa | bb -----------+--------+---- - b | newtoo | - b | newtoo | - b | newtoo | -(3 rows) - ---Testcase 582: -SELECT tableoid::regclass, * FROM ONLY a; - tableoid | aa -----------+-------- - a | newtoo - a | newtoo - a | newtoo -(3 rows) - ---Testcase 583: -DELETE FROM a; ---Testcase 584: -SELECT tableoid::regclass, * FROM a; - tableoid | aa -----------+---- -(0 rows) - ---Testcase 585: -SELECT tableoid::regclass, * FROM b; - tableoid | aa | bb -----------+----+---- -(0 rows) - ---Testcase 586: -SELECT tableoid::regclass, * FROM ONLY a; - tableoid | aa -----------+---- -(0 rows) - ---Testcase 587: -DROP TABLE a CASCADE; -NOTICE: drop cascades to table b ---DROP TABLE loct; --- Check SELECT FOR UPDATE/SHARE with an inherited source table ---Testcase 588: -create foreign table loct1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct1', schemaless 'true'); -create foreign table loct1_nsc (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct1'); ---Testcase 589: -create foreign table loct2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct2', schemaless 'true'); -create foreign table loct2_nsc (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct2'); ---alter table loct1 set (autovacuum_enabled = 'false'); ---alter table loct2 set (autovacuum_enabled = 'false'); ---Testcase 590: -create foreign table foo (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'foo', schemaless 'true'); -create foreign table foo_nsc (f1 int, f2 int) - server influxdb_svr options (table 'foo'); ---Testcase 591: -create foreign table foo2 (fields jsonb OPTIONS(fields 'true')) inherits (foo) - server influxdb_svr options (table 'loct1', schemaless 'true'); -NOTICE: merging column "fields" with inherited definition -create foreign table foo2_nsc (f3 int) inherits (foo_nsc) - server influxdb_svr options (table 'loct1'); ---Testcase 592: -create foreign table bar (fields jsonb OPTIONS(fields 'true')) - server influxdb_svr options (table 'bar', schemaless 'true'); -create foreign table bar_nsc (f1 int, f2 int) - server influxdb_svr options (table 'bar'); ---Testcase 593: -create foreign table bar2 (fields jsonb OPTIONS(fields 'true')) inherits (bar) - server influxdb_svr options (table 'loct2', schemaless 'true'); -NOTICE: merging column "fields" with inherited definition -create foreign table bar2_nsc (f3 int) inherits (bar_nsc) - server influxdb_svr options (table 'loct2'); ---alter table foo set (autovacuum_enabled = 'false'); ---alter table bar set (autovacuum_enabled = 'false'); ---Testcase 594: -insert into foo_nsc values(1,1); ---Testcase 595: -insert into foo_nsc values(3,3); ---Testcase 596: -insert into foo2_nsc values(2,2,2); ---Testcase 597: -insert into foo2_nsc values(4,4,4); ---Testcase 598: -insert into bar_nsc values(1,11); ---Testcase 599: -insert into bar_nsc values(2,22); ---Testcase 600: -insert into bar_nsc values(6,66); ---Testcase 601: -insert into bar2_nsc values(3,33,33); ---Testcase 602: -insert into bar2_nsc values(4,44,44); ---Testcase 603: -insert into bar2_nsc values(7,77,77); ---Testcase 604: -explain (verbose, costs off) -select * from bar where fields->>'f1' in (select fields->>'f1' from foo); - QUERY PLAN --------------------------------------------------------------------------- - Hash Join - Output: bar.fields - Inner Unique: true - Hash Cond: ((bar.fields ->> 'f1'::text) = (foo.fields ->> 'f1'::text)) - -> Append - -> Foreign Scan on public.bar - Output: bar.fields - InfluxDB query: SELECT * FROM "bar" - -> Foreign Scan on public.bar2 - Output: bar2.fields - InfluxDB query: SELECT * FROM "loct2" - -> Hash - Output: foo.fields - -> HashAggregate - Output: foo.fields - Group Key: (foo.fields ->> 'f1'::text) - -> Result - Output: foo.fields, (foo.fields ->> 'f1'::text) - -> Append - -> Foreign Scan on public.foo - Output: foo.fields - InfluxDB query: SELECT * FROM "foo" - -> Foreign Scan on public.foo2 - Output: foo2.fields - InfluxDB query: SELECT * FROM "loct1" -(25 rows) - ---Testcase 605: -select * from bar where fields->>'f1' in (select fields->>'f1' from foo); - fields -------------------------------------- - {"f1": "1", "f2": "11"} - {"f1": "2", "f2": "22"} - {"f1": "3", "f2": "33", "f3": "33"} - {"f1": "4", "f2": "44", "f3": "44"} -(4 rows) - ---Testcase 606: -explain (verbose, costs off) -select * from bar where fields->>'f1' in (select fields->>'f1' from foo); - QUERY PLAN --------------------------------------------------------------------------- - Hash Join - Output: bar.fields - Inner Unique: true - Hash Cond: ((bar.fields ->> 'f1'::text) = (foo.fields ->> 'f1'::text)) - -> Append - -> Foreign Scan on public.bar - Output: bar.fields - InfluxDB query: SELECT * FROM "bar" - -> Foreign Scan on public.bar2 - Output: bar2.fields - InfluxDB query: SELECT * FROM "loct2" - -> Hash - Output: foo.fields - -> HashAggregate - Output: foo.fields - Group Key: (foo.fields ->> 'f1'::text) - -> Result - Output: foo.fields, (foo.fields ->> 'f1'::text) - -> Append - -> Foreign Scan on public.foo - Output: foo.fields - InfluxDB query: SELECT * FROM "foo" - -> Foreign Scan on public.foo2 - Output: foo2.fields - InfluxDB query: SELECT * FROM "loct1" -(25 rows) - ---Testcase 607: -select * from bar where fields->>'f1' in (select fields->>'f1' from foo); - fields -------------------------------------- - {"f1": "1", "f2": "11"} - {"f1": "2", "f2": "22"} - {"f1": "3", "f2": "33", "f3": "33"} - {"f1": "4", "f2": "44", "f3": "44"} -(4 rows) - -/* --- influxdb_fdw does not support UPDATE --- Check UPDATE with inherited target and an inherited source table -explain (verbose, costs off) -update bar set f2 = f2 + 100 where f1 in (select f1 from foo); -update bar set f2 = f2 + 100 where f1 in (select f1 from foo); - -select tableoid::regclass, * from bar order by 1,2; - --- Check UPDATE with inherited target and an appendrel subquery -explain (verbose, costs off) -update bar set f2 = f2 + 100 -from - ( select f1 from foo union all select f1+3 from foo ) ss -where bar.f1 = ss.f1; -update bar set f2 = f2 + 100 -from - ( select f1 from foo union all select f1+3 from foo ) ss -where bar.f1 = ss.f1; - -select tableoid::regclass, * from bar order by 1,2; - --- Test forcing the remote server to produce sorted data for a merge join, --- but the foreign table is an inheritance child. -truncate table loct1; -truncate table only foo; -\set num_rows_foo 2000 -insert into loct1 select generate_series(0, :num_rows_foo, 2), generate_series(0, :num_rows_foo, 2), generate_series(0, :num_rows_foo, 2); -insert into foo select generate_series(1, :num_rows_foo, 2), generate_series(1, :num_rows_foo, 2); -SET enable_hashjoin to false; -SET enable_nestloop to false; -alter foreign table foo2 options (use_remote_estimate 'true'); -create index i_loct1_f1 on loct1(f1); -create index i_foo_f1 on foo(f1); -analyze foo; -analyze loct1; --- inner join; expressions in the clauses appear in the equivalence class list -explain (verbose, costs off) - select foo.f1, loct1.f1 from foo join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; -select foo.f1, loct1.f1 from foo join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; --- outer join; expressions in the clauses do not appear in equivalence class --- list but no output change as compared to the previous query -explain (verbose, costs off) - select foo.f1, loct1.f1 from foo left join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; -select foo.f1, loct1.f1 from foo left join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; -RESET enable_hashjoin; -RESET enable_nestloop; - --- Test that WHERE CURRENT OF is not supported -begin; -declare c cursor for select * from bar where f1 = 7; -fetch from c; -update bar set f2 = null where current of c; -rollback; - -explain (verbose, costs off) -delete from foo where f1 < 5 returning *; -delete from foo where f1 < 5 returning *; -explain (verbose, costs off) -update bar set f2 = f2 + 100 returning *; -update bar set f2 = f2 + 100 returning *; - --- Test that UPDATE/DELETE with inherited target works with row-level triggers -CREATE TRIGGER trig_row_before -BEFORE UPDATE OR DELETE ON bar2 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); - -CREATE TRIGGER trig_row_after -AFTER UPDATE OR DELETE ON bar2 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); - -explain (verbose, costs off) -update bar set f2 = f2 + 100; -update bar set f2 = f2 + 100; - -explain (verbose, costs off) -delete from bar where f2 < 400; -delete from bar where f2 < 400; - --- cleanup -drop table foo cascade; -drop table bar cascade; -drop table loct1; -drop table loct2; - --- Test pushing down UPDATE/DELETE joins to the remote server -create table parent (a int, b text); -create table loct1 (a int, b text); -create table loct2 (a int, b text); -create foreign table remt1 (a int, b text) - server influxdb_svr options (table 'loct1'); -create foreign table remt2 (a int, b text) - server influxdb_svr options (table 'loct2'); -alter foreign table remt1 inherit parent; - -insert into remt1 values (1, 'foo'); -insert into remt1 values (2, 'bar'); -insert into remt2 values (1, 'foo'); -insert into remt2 values (2, 'bar'); - -analyze remt1; -analyze remt2; - -explain (verbose, costs off) -update parent set b = parent.b || remt2.b from remt2 where parent.a = remt2.a returning *; -update parent set b = parent.b || remt2.b from remt2 where parent.a = remt2.a returning *; -explain (verbose, costs off) -delete from parent using remt2 where parent.a = remt2.a returning parent; -delete from parent using remt2 where parent.a = remt2.a returning parent; - --- cleanup -drop foreign table remt1; -drop foreign table remt2; -drop table loct1; -drop table loct2; -drop table parent; -*/ -/* --- Skip test because influxdb does not support partitions table, COPY --- =================================================================== --- test tuple routing for foreign-table partitions --- =================================================================== - --- Test insert tuple routing -create table itrtest (a int, b text) partition by list (a); -create table loct1 (a int check (a in (1)), b text); -create foreign table remp1 (a int check (a in (1)), b text) server loopback options (table_name 'loct1'); -create table loct2 (a int check (a in (2)), b text); -create foreign table remp2 (b text, a int check (a in (2))) server loopback options (table_name 'loct2'); -alter table itrtest attach partition remp1 for values in (1); -alter table itrtest attach partition remp2 for values in (2); - -insert into itrtest values (1, 'foo'); -insert into itrtest values (1, 'bar') returning *; -insert into itrtest values (2, 'baz'); -insert into itrtest values (2, 'qux') returning *; -insert into itrtest values (1, 'test1'), (2, 'test2') returning *; - -select tableoid::regclass, * FROM itrtest; -select tableoid::regclass, * FROM remp1; -select tableoid::regclass, * FROM remp2; - -delete from itrtest; - -create unique index loct1_idx on loct1 (a); - --- DO NOTHING without an inference specification is supported -insert into itrtest values (1, 'foo') on conflict do nothing returning *; -insert into itrtest values (1, 'foo') on conflict do nothing returning *; - --- But other cases are not supported -insert into itrtest values (1, 'bar') on conflict (a) do nothing; -insert into itrtest values (1, 'bar') on conflict (a) do update set b = excluded.b; - -select tableoid::regclass, * FROM itrtest; - -delete from itrtest; - -drop index loct1_idx; - --- Test that remote triggers work with insert tuple routing -create function br_insert_trigfunc() returns trigger as $$ -begin - new.b := new.b || ' triggered !'; - return new; -end -$$ language plpgsql; -create trigger loct1_br_insert_trigger before insert on loct1 - for each row execute procedure br_insert_trigfunc(); -create trigger loct2_br_insert_trigger before insert on loct2 - for each row execute procedure br_insert_trigfunc(); - --- The new values are concatenated with ' triggered !' -insert into itrtest values (1, 'foo') returning *; -insert into itrtest values (2, 'qux') returning *; -insert into itrtest values (1, 'test1'), (2, 'test2') returning *; -with result as (insert into itrtest values (1, 'test1'), (2, 'test2') returning *) select * from result; - -drop trigger loct1_br_insert_trigger on loct1; -drop trigger loct2_br_insert_trigger on loct2; - -drop table itrtest; -drop table loct1; -drop table loct2; - --- Test update tuple routing -create table utrtest (a int, b text) partition by list (a); -create table loct (a int check (a in (1)), b text); -create foreign table remp (a int check (a in (1)), b text) server loopback options (table_name 'loct'); -create table locp (a int check (a in (2)), b text); -alter table utrtest attach partition remp for values in (1); -alter table utrtest attach partition locp for values in (2); - -insert into utrtest values (1, 'foo'); -insert into utrtest values (2, 'qux'); - -select tableoid::regclass, * FROM utrtest; -select tableoid::regclass, * FROM remp; -select tableoid::regclass, * FROM locp; - --- It's not allowed to move a row from a partition that is foreign to another -update utrtest set a = 2 where b = 'foo' returning *; - --- But the reverse is allowed -update utrtest set a = 1 where b = 'qux' returning *; - -select tableoid::regclass, * FROM utrtest; -select tableoid::regclass, * FROM remp; -select tableoid::regclass, * FROM locp; - --- The executor should not let unexercised FDWs shut down -update utrtest set a = 1 where b = 'foo'; - --- Test that remote triggers work with update tuple routing -create trigger loct_br_insert_trigger before insert on loct - for each row execute procedure br_insert_trigfunc(); - -delete from utrtest; -insert into utrtest values (2, 'qux'); - --- Check case where the foreign partition is a subplan target rel -explain (verbose, costs off) -update utrtest set a = 1 where a = 1 or a = 2 returning *; --- The new values are concatenated with ' triggered !' -update utrtest set a = 1 where a = 1 or a = 2 returning *; - -delete from utrtest; -insert into utrtest values (2, 'qux'); - --- Check case where the foreign partition isn't a subplan target rel -explain (verbose, costs off) -update utrtest set a = 1 where a = 2 returning *; --- The new values are concatenated with ' triggered !' -update utrtest set a = 1 where a = 2 returning *; - -drop trigger loct_br_insert_trigger on loct; - --- We can move rows to a foreign partition that has been updated already, --- but can't move rows to a foreign partition that hasn't been updated yet - -delete from utrtest; -insert into utrtest values (1, 'foo'); -insert into utrtest values (2, 'qux'); - --- Test the former case: --- with a direct modification plan -explain (verbose, costs off) -update utrtest set a = 1 returning *; -update utrtest set a = 1 returning *; - -delete from utrtest; -insert into utrtest values (1, 'foo'); -insert into utrtest values (2, 'qux'); - --- with a non-direct modification plan -explain (verbose, costs off) -update utrtest set a = 1 from (values (1), (2)) s(x) where a = s.x returning *; -update utrtest set a = 1 from (values (1), (2)) s(x) where a = s.x returning *; - --- Change the definition of utrtest so that the foreign partition get updated --- after the local partition -delete from utrtest; -alter table utrtest detach partition remp; -drop foreign table remp; -alter table loct drop constraint loct_a_check; -alter table loct add check (a in (3)); -create foreign table remp (a int check (a in (3)), b text) server loopback options (table_name 'loct'); -alter table utrtest attach partition remp for values in (3); -insert into utrtest values (2, 'qux'); -insert into utrtest values (3, 'xyzzy'); - --- Test the latter case: --- with a direct modification plan -explain (verbose, costs off) -update utrtest set a = 3 returning *; -update utrtest set a = 3 returning *; -- ERROR - --- with a non-direct modification plan -explain (verbose, costs off) -update utrtest set a = 3 from (values (2), (3)) s(x) where a = s.x returning *; -update utrtest set a = 3 from (values (2), (3)) s(x) where a = s.x returning *; -- ERROR - -drop table utrtest; -drop table loct; - --- Test copy tuple routing -create table ctrtest (a int, b text) partition by list (a); -create table loct1 (a int check (a in (1)), b text); -create foreign table remp1 (a int check (a in (1)), b text) server loopback options (table_name 'loct1'); -create table loct2 (a int check (a in (2)), b text); -create foreign table remp2 (b text, a int check (a in (2))) server loopback options (table_name 'loct2'); -alter table ctrtest attach partition remp1 for values in (1); -alter table ctrtest attach partition remp2 for values in (2); - -copy ctrtest from stdin; -1 foo -2 qux -\. - -select tableoid::regclass, * FROM ctrtest; -select tableoid::regclass, * FROM remp1; -select tableoid::regclass, * FROM remp2; - --- Copying into foreign partitions directly should work as well -copy remp1 from stdin; -1 bar -\. - -select tableoid::regclass, * FROM remp1; - -drop table ctrtest; -drop table loct1; -drop table loct2; - --- =================================================================== --- test COPY FROM --- =================================================================== - -create table loc2 (f1 int, f2 text); -alter table loc2 set (autovacuum_enabled = 'false'); -create foreign table rem2 (f1 int, f2 text) server loopback options(table_name 'loc2'); - --- Test basic functionality -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -delete from rem2; - --- Test check constraints -alter table loc2 add constraint loc2_f1positive check (f1 >= 0); -alter foreign table rem2 add constraint rem2_f1positive check (f1 >= 0); - --- check constraint is enforced on the remote side, not locally -copy rem2 from stdin; -1 foo -2 bar -\. -copy rem2 from stdin; -- ERROR --1 xyzzy -\. -select * from rem2; - -alter foreign table rem2 drop constraint rem2_f1positive; -alter table loc2 drop constraint loc2_f1positive; - -delete from rem2; - --- Test local triggers -create trigger trig_stmt_before before insert on rem2 - for each statement execute procedure trigger_func(); -create trigger trig_stmt_after after insert on rem2 - for each statement execute procedure trigger_func(); -create trigger trig_row_before before insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); -create trigger trig_row_after after insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); - -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger trig_row_before on rem2; -drop trigger trig_row_after on rem2; -drop trigger trig_stmt_before on rem2; -drop trigger trig_stmt_after on rem2; - -delete from rem2; - -create trigger trig_row_before_insert before insert on rem2 - for each row execute procedure trig_row_before_insupdate(); - --- The new values are concatenated with ' triggered !' -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger trig_row_before_insert on rem2; - -delete from rem2; - -create trigger trig_null before insert on rem2 - for each row execute procedure trig_null(); - --- Nothing happens -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger trig_null on rem2; - -delete from rem2; - --- Test remote triggers -create trigger trig_row_before_insert before insert on loc2 - for each row execute procedure trig_row_before_insupdate(); - --- The new values are concatenated with ' triggered !' -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger trig_row_before_insert on loc2; - -delete from rem2; - -create trigger trig_null before insert on loc2 - for each row execute procedure trig_null(); - --- Nothing happens -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger trig_null on loc2; - -delete from rem2; - --- Test a combination of local and remote triggers -create trigger rem2_trig_row_before before insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); -create trigger rem2_trig_row_after after insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); -create trigger loc2_trig_row_before_insert before insert on loc2 - for each row execute procedure trig_row_before_insupdate(); - -copy rem2 from stdin; -1 foo -2 bar -\. -select * from rem2; - -drop trigger rem2_trig_row_before on rem2; -drop trigger rem2_trig_row_after on rem2; -drop trigger loc2_trig_row_before_insert on loc2; - -delete from rem2; - --- test COPY FROM with foreign table created in the same transaction -create table loc3 (f1 int, f2 text); -begin; -create foreign table rem3 (f1 int, f2 text) - server loopback options(table_name 'loc3'); -copy rem3 from stdin; -1 foo -2 bar -\. -commit; -select * from rem3; -drop foreign table rem3; -drop table loc3; -*/ --- =================================================================== --- test IMPORT FOREIGN SCHEMA --- =================================================================== ---Testcase 608: -CREATE SCHEMA import_influx1; -IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx1 OPTIONS (schemaless 'true'); ---Testcase 609: -\det+ import_influx1.* - List of foreign tables - Schema | Table | Server | FDW options | Description -----------------+-------+--------------+----------------------------------------------+------------- - import_influx1 | T1 | influxdb_svr | ("table" 'T1', schemaless 'true', tags 'c3') | - import_influx1 | T2 | influxdb_svr | ("table" 'T2', schemaless 'true', tags 'c2') | - import_influx1 | T3 | influxdb_svr | ("table" 'T3', schemaless 'true', tags 'c3') | - import_influx1 | T4 | influxdb_svr | ("table" 'T4', schemaless 'true', tags 'c3') | - import_influx1 | bar | influxdb_svr | ("table" 'bar', schemaless 'true') | - import_influx1 | foo | influxdb_svr | ("table" 'foo', schemaless 'true') | - import_influx1 | loc1 | influxdb_svr | ("table" 'loc1', schemaless 'true') | - import_influx1 | loct1 | influxdb_svr | ("table" 'loct1', schemaless 'true') | - import_influx1 | loct2 | influxdb_svr | ("table" 'loct2', schemaless 'true') | -(9 rows) - ---Testcase 610: -\d import_influx1.* - Foreign table "import_influx1.T1" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: influxdb_svr -FDW options: ("table" 'T1', schemaless 'true', tags 'c3') - - Foreign table "import_influx1.T2" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: influxdb_svr -FDW options: ("table" 'T2', schemaless 'true', tags 'c2') - - Foreign table "import_influx1.T3" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: influxdb_svr -FDW options: ("table" 'T3', schemaless 'true', tags 'c3') - - Foreign table "import_influx1.T4" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: influxdb_svr -FDW options: ("table" 'T4', schemaless 'true', tags 'c3') - - Foreign table "import_influx1.bar" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: influxdb_svr -FDW options: ("table" 'bar', schemaless 'true') - - Foreign table "import_influx1.foo" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: influxdb_svr -FDW options: ("table" 'foo', schemaless 'true') - - Foreign table "import_influx1.loc1" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: influxdb_svr -FDW options: ("table" 'loc1', schemaless 'true') - - Foreign table "import_influx1.loct1" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: influxdb_svr -FDW options: ("table" 'loct1', schemaless 'true') - - Foreign table "import_influx1.loct2" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: influxdb_svr -FDW options: ("table" 'loct2', schemaless 'true') - --- Options ---Testcase 611: -CREATE SCHEMA import_influx2; -IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx2 - OPTIONS (import_default 'true', schemaless 'true'); -ERROR: invalid option "import_default" ---Testcase 612: -\det+ import_influx2.* - List of foreign tables - Schema | Table | Server | FDW options | Description ---------+-------+--------+-------------+------------- -(0 rows) - ---Testcase 613: -\d import_influx2.* ---Testcase 614: -CREATE SCHEMA import_influx3; -IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx3 - OPTIONS (import_collate 'false', import_not_null 'false', schemaless 'true'); -ERROR: invalid option "import_collate" ---Testcase 615: -\det+ import_influx3.* - List of foreign tables - Schema | Table | Server | FDW options | Description ---------+-------+--------+-------------+------------- -(0 rows) - ---Testcase 616: -\d import_influx3.* --- Check LIMIT TO and EXCEPT ---Testcase 617: -CREATE SCHEMA import_influx4; -IMPORT FOREIGN SCHEMA public LIMIT TO ("T1", loct, nonesuch) - FROM SERVER influxdb_svr INTO import_influx4 OPTIONS (schemaless 'true'); ---Testcase 618: -\det+ import_influx4.* - List of foreign tables - Schema | Table | Server | FDW options | Description -----------------+-------+--------------+----------------------------------------------+------------- - import_influx4 | T1 | influxdb_svr | ("table" 'T1', schemaless 'true', tags 'c3') | -(1 row) - -IMPORT FOREIGN SCHEMA public EXCEPT ("T1", loct, nonesuch) - FROM SERVER influxdb_svr INTO import_influx4 OPTIONS (schemaless 'true'); ---Testcase 619: -\det+ import_influx4.* - List of foreign tables - Schema | Table | Server | FDW options | Description -----------------+-------+--------------+----------------------------------------------+------------- - import_influx4 | T1 | influxdb_svr | ("table" 'T1', schemaless 'true', tags 'c3') | - import_influx4 | T2 | influxdb_svr | ("table" 'T2', schemaless 'true', tags 'c2') | - import_influx4 | T3 | influxdb_svr | ("table" 'T3', schemaless 'true', tags 'c3') | - import_influx4 | T4 | influxdb_svr | ("table" 'T4', schemaless 'true', tags 'c3') | - import_influx4 | bar | influxdb_svr | ("table" 'bar', schemaless 'true') | - import_influx4 | foo | influxdb_svr | ("table" 'foo', schemaless 'true') | - import_influx4 | loc1 | influxdb_svr | ("table" 'loc1', schemaless 'true') | - import_influx4 | loct1 | influxdb_svr | ("table" 'loct1', schemaless 'true') | - import_influx4 | loct2 | influxdb_svr | ("table" 'loct2', schemaless 'true') | -(9 rows) - --- Assorted error cases -IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx4 OPTIONS (schemaless 'true'); -ERROR: relation "T1" already exists -CONTEXT: importing foreign table "T1" -IMPORT FOREIGN SCHEMA nonesuch FROM SERVER influxdb_svr INTO import_influx4 OPTIONS (schemaless 'true'); -ERROR: relation "T1" already exists -CONTEXT: importing foreign table "T1" -IMPORT FOREIGN SCHEMA nonesuch FROM SERVER influxdb_svr INTO notthere OPTIONS (schemaless 'true'); -ERROR: schema "notthere" does not exist -IMPORT FOREIGN SCHEMA nonesuch FROM SERVER nowhere INTO notthere OPTIONS (schemaless 'true'); -ERROR: server "nowhere" does not exist -/* --- Skip these test, influxdb_fdw does not support fetch_size option, partition table --- Check case of a type present only on the remote server. --- We can fake this by dropping the type locally in our transaction. -CREATE TYPE "Colors" AS ENUM ('red', 'green', 'blue'); -CREATE TABLE import_source.t5 (c1 int, c2 text collate "C", "Col" "Colors"); - -CREATE SCHEMA import_dest5; -BEGIN; -DROP TYPE "Colors" CASCADE; -IMPORT FOREIGN SCHEMA import_source LIMIT TO (t5) - FROM SERVER loopback INTO import_dest5; -- ERROR - -ROLLBACK; - -BEGIN; - - -CREATE SERVER fetch101 FOREIGN DATA WRAPPER postgres_fdw OPTIONS( fetch_size '101' ); - -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'fetch101' -AND srvoptions @> array['fetch_size=101']; - -ALTER SERVER fetch101 OPTIONS( SET fetch_size '202' ); - -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'fetch101' -AND srvoptions @> array['fetch_size=101']; - -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'fetch101' -AND srvoptions @> array['fetch_size=202']; - -CREATE FOREIGN TABLE table30000 ( x int ) SERVER fetch101 OPTIONS ( fetch_size '30000' ); - -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30000'::regclass -AND ftoptions @> array['fetch_size=30000']; - -ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '60000'); - -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30000'::regclass -AND ftoptions @> array['fetch_size=30000']; - -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30000'::regclass -AND ftoptions @> array['fetch_size=60000']; - -ROLLBACK; - --- =================================================================== --- test partitionwise joins --- =================================================================== -SET enable_partitionwise_join=on; - -CREATE TABLE fprt1 (a int, b int, c varchar) PARTITION BY RANGE(a); -CREATE TABLE fprt1_p1 (LIKE fprt1); -CREATE TABLE fprt1_p2 (LIKE fprt1); -ALTER TABLE fprt1_p1 SET (autovacuum_enabled = 'false'); -ALTER TABLE fprt1_p2 SET (autovacuum_enabled = 'false'); -INSERT INTO fprt1_p1 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(0, 249, 2) i; -INSERT INTO fprt1_p2 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(250, 499, 2) i; -CREATE FOREIGN TABLE ftprt1_p1 PARTITION OF fprt1 FOR VALUES FROM (0) TO (250) - SERVER loopback OPTIONS (table_name 'fprt1_p1', use_remote_estimate 'true'); -CREATE FOREIGN TABLE ftprt1_p2 PARTITION OF fprt1 FOR VALUES FROM (250) TO (500) - SERVER loopback OPTIONS (TABLE_NAME 'fprt1_p2'); -ANALYZE fprt1; -ANALYZE fprt1_p1; -ANALYZE fprt1_p2; - -CREATE TABLE fprt2 (a int, b int, c varchar) PARTITION BY RANGE(b); -CREATE TABLE fprt2_p1 (LIKE fprt2); -CREATE TABLE fprt2_p2 (LIKE fprt2); -ALTER TABLE fprt2_p1 SET (autovacuum_enabled = 'false'); -ALTER TABLE fprt2_p2 SET (autovacuum_enabled = 'false'); -INSERT INTO fprt2_p1 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(0, 249, 3) i; -INSERT INTO fprt2_p2 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(250, 499, 3) i; -CREATE FOREIGN TABLE ftprt2_p1 (b int, c varchar, a int) - SERVER loopback OPTIONS (table_name 'fprt2_p1', use_remote_estimate 'true'); -ALTER TABLE fprt2 ATTACH PARTITION ftprt2_p1 FOR VALUES FROM (0) TO (250); -CREATE FOREIGN TABLE ftprt2_p2 PARTITION OF fprt2 FOR VALUES FROM (250) TO (500) - SERVER loopback OPTIONS (table_name 'fprt2_p2', use_remote_estimate 'true'); -ANALYZE fprt2; -ANALYZE fprt2_p1; -ANALYZE fprt2_p2; - --- inner join three tables -EXPLAIN (COSTS OFF) -SELECT t1.a,t2.b,t3.c FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) INNER JOIN fprt1 t3 ON (t2.b = t3.a) WHERE t1.a % 25 =0 ORDER BY 1,2,3; -SELECT t1.a,t2.b,t3.c FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) INNER JOIN fprt1 t3 ON (t2.b = t3.a) WHERE t1.a % 25 =0 ORDER BY 1,2,3; - --- left outer join + nullable clause -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.a,t2.b,t2.c FROM fprt1 t1 LEFT JOIN (SELECT * FROM fprt2 WHERE a < 10) t2 ON (t1.a = t2.b and t1.b = t2.a) WHERE t1.a < 10 ORDER BY 1,2,3; -SELECT t1.a,t2.b,t2.c FROM fprt1 t1 LEFT JOIN (SELECT * FROM fprt2 WHERE a < 10) t2 ON (t1.a = t2.b and t1.b = t2.a) WHERE t1.a < 10 ORDER BY 1,2,3; - --- with whole-row reference; partitionwise join does not apply -EXPLAIN (COSTS OFF) -SELECT t1.wr, t2.wr FROM (SELECT t1 wr, a FROM fprt1 t1 WHERE t1.a % 25 = 0) t1 FULL JOIN (SELECT t2 wr, b FROM fprt2 t2 WHERE t2.b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY 1,2; -SELECT t1.wr, t2.wr FROM (SELECT t1 wr, a FROM fprt1 t1 WHERE t1.a % 25 = 0) t1 FULL JOIN (SELECT t2 wr, b FROM fprt2 t2 WHERE t2.b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY 1,2; - --- join with lateral reference -EXPLAIN (COSTS OFF) -SELECT t1.a,t1.b FROM fprt1 t1, LATERAL (SELECT t2.a, t2.b FROM fprt2 t2 WHERE t1.a = t2.b AND t1.b = t2.a) q WHERE t1.a%25 = 0 ORDER BY 1,2; -SELECT t1.a,t1.b FROM fprt1 t1, LATERAL (SELECT t2.a, t2.b FROM fprt2 t2 WHERE t1.a = t2.b AND t1.b = t2.a) q WHERE t1.a%25 = 0 ORDER BY 1,2; - --- with PHVs, partitionwise join selected but no join pushdown -EXPLAIN (COSTS OFF) -SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE a % 25 = 0) t1 FULL JOIN (SELECT 't2_phv' phv, * FROM fprt2 WHERE b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY t1.a, t2.b; -SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE a % 25 = 0) t1 FULL JOIN (SELECT 't2_phv' phv, * FROM fprt2 WHERE b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY t1.a, t2.b; - --- test FOR UPDATE; partitionwise join does not apply -EXPLAIN (COSTS OFF) -SELECT t1.a, t2.b FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) WHERE t1.a % 25 = 0 ORDER BY 1,2 FOR UPDATE OF t1; -SELECT t1.a, t2.b FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) WHERE t1.a % 25 = 0 ORDER BY 1,2 FOR UPDATE OF t1; - -RESET enable_partitionwise_join; - - --- =================================================================== --- test partitionwise aggregates --- =================================================================== - -CREATE TABLE pagg_tab (a int, b int, c text) PARTITION BY RANGE(a); - -CREATE TABLE pagg_tab_p1 (LIKE pagg_tab); -CREATE TABLE pagg_tab_p2 (LIKE pagg_tab); -CREATE TABLE pagg_tab_p3 (LIKE pagg_tab); - -INSERT INTO pagg_tab_p1 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 10; -INSERT INTO pagg_tab_p2 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 20 and (i % 30) >= 10; -INSERT INTO pagg_tab_p3 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 30 and (i % 30) >= 20; - --- Create foreign partitions -CREATE FOREIGN TABLE fpagg_tab_p1 PARTITION OF pagg_tab FOR VALUES FROM (0) TO (10) SERVER loopback OPTIONS (table_name 'pagg_tab_p1'); -CREATE FOREIGN TABLE fpagg_tab_p2 PARTITION OF pagg_tab FOR VALUES FROM (10) TO (20) SERVER loopback OPTIONS (table_name 'pagg_tab_p2'); -CREATE FOREIGN TABLE fpagg_tab_p3 PARTITION OF pagg_tab FOR VALUES FROM (20) TO (30) SERVER loopback OPTIONS (table_name 'pagg_tab_p3'); - -ANALYZE pagg_tab; -ANALYZE fpagg_tab_p1; -ANALYZE fpagg_tab_p2; -ANALYZE fpagg_tab_p3; - --- When GROUP BY clause matches with PARTITION KEY. --- Plan with partitionwise aggregates is disabled -SET enable_partitionwise_aggregate TO false; -EXPLAIN (COSTS OFF) -SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - --- Plan with partitionwise aggregates is enabled -SET enable_partitionwise_aggregate TO true; -EXPLAIN (COSTS OFF) -SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; -SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - --- Check with whole-row reference --- Should have all the columns in the target list for the given relation -EXPLAIN (VERBOSE, COSTS OFF) -SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1; -SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - --- When GROUP BY clause does not match with PARTITION KEY. -EXPLAIN (COSTS OFF) -SELECT b, avg(a), max(a), count(*) FROM pagg_tab GROUP BY b HAVING sum(a) < 700 ORDER BY 1; -*/ -/* --- Skip test, influxdb_fdw does not support nosuperuser --- =================================================================== --- access rights and superuser --- =================================================================== - --- Non-superuser cannot create a FDW without a password in the connstr -CREATE ROLE regress_nosuper NOSUPERUSER; - -GRANT USAGE ON FOREIGN DATA WRAPPER influxdb_fdw TO regress_nosuper; - -SET ROLE regress_nosuper; - -SHOW is_superuser; - --- This will be OK, we can create the FDW -DO $d$ - BEGIN - EXECUTE $$CREATE SERVER loopback_nopw FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname '$$||current_database()||$$', - port '$$||current_setting('port')||$$' - )$$; - END; -$d$; - --- But creation of user mappings for non-superusers should fail -CREATE USER MAPPING FOR public SERVER loopback_nopw; -CREATE USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; - -CREATE FOREIGN TABLE ft1_nopw ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text, - c4 timestamptz, - c5 timestamp, - c6 varchar(10), - c7 char(10) default 'ft1', - c8 user_enum -) SERVER loopback_nopw OPTIONS (schema_name 'public', table_name 'ft1'); - -SELECT * FROM ft1_nopw LIMIT 1; - --- If we add a password to the connstr it'll fail, because we don't allow passwords --- in connstrs only in user mappings. - -DO $d$ - BEGIN - EXECUTE $$ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw')$$; - END; -$d$; - --- If we add a password for our user mapping instead, we should get a different --- error because the password wasn't actually *used* when we run with trust auth. --- --- This won't work with installcheck, but neither will most of the FDW checks. - -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); - -SELECT * FROM ft1_nopw LIMIT 1; - --- Unpriv user cannot make the mapping passwordless -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password_required 'false'); - - -SELECT * FROM ft1_nopw LIMIT 1; - -RESET ROLE; - --- But the superuser can -ALTER USER MAPPING FOR regress_nosuper SERVER loopback_nopw OPTIONS (ADD password_required 'false'); - -SET ROLE regress_nosuper; - --- Should finally work now -SELECT * FROM ft1_nopw LIMIT 1; - --- unpriv user also cannot set sslcert / sslkey on the user mapping --- first set password_required so we see the right error messages -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (SET password_required 'true'); -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD sslcert 'foo.crt'); -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD sslkey 'foo.key'); - --- We're done with the role named after a specific user and need to check the --- changes to the public mapping. -DROP USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; - --- This will fail again as it'll resolve the user mapping for public, which --- lacks password_required=false -SELECT * FROM ft1_nopw LIMIT 1; - -RESET ROLE; - --- The user mapping for public is passwordless and lacks the password_required=false --- mapping option, but will work because the current user is a superuser. -SELECT * FROM ft1_nopw LIMIT 1; - --- cleanup -DROP USER MAPPING FOR public SERVER loopback_nopw; -DROP OWNED BY regress_nosuper; -DROP ROLE regress_nosuper; -*/ --- influxdb_fdw does not support transactions --- Two-phase transactions are not supported. ---BEGIN; ---Testcase 620: -SELECT count(*) FROM ft1; - count -------- - 822 -(1 row) - --- error here ---PREPARE TRANSACTION 'fdw_tpc'; ---ROLLBACK; --- Clean-up -DELETE FROM ft1_nsc; -DELETE FROM ft2_nsc; -DELETE FROM ft4_nsc; -DELETE FROM ft5_nsc; -DELETE FROM foo_nsc; -DELETE FROM bar_nsc; -DELETE FROM loct1_nsc; -DELETE FROM loct2_nsc; -DELETE FROM rem1_nsc; -DROP FOREIGN TABLE foo_nsc cascade; -NOTICE: drop cascades to foreign table foo2_nsc -DROP FOREIGN TABLE bar_nsc cascade; -NOTICE: drop cascades to foreign table bar2_nsc -DROP FOREIGN TABLE loct1_nsc; -DROP FOREIGN TABLE loct2_nsc; -DROP FOREIGN TABLE "S 1".s1t0; -DROP FOREIGN TABLE "S 1".s1t1; -DROP FOREIGN TABLE "S 1".s1t2; -DROP FOREIGN TABLE "S 1".s1t3; -DROP FOREIGN TABLE "S 1".s1t4; -DROP FOREIGN TABLE ft1_nsc; -DROP FOREIGN TABLE ft2_nsc; -DROP FOREIGN TABLE ft4_nsc; -DROP FOREIGN TABLE ft5_nsc; -DROP TYPE IF EXISTS user_enum; -DROP SCHEMA IF EXISTS "S 1" CASCADE; -NOTICE: drop cascades to 6 other objects -DETAIL: drop cascades to foreign table "S 1"."T 0" -drop cascades to foreign table "S 1"."T 1" -drop cascades to foreign table "S 1"."T 2" -drop cascades to foreign table "S 1"."T 3" -drop cascades to foreign table "S 1"."T 4" -drop cascades to function "S 1".f_brtrig() -DROP FUNCTION IF EXISTS trigger_func(); -DROP FUNCTION IF EXISTS trig_row_before_insupdate(); -DROP FUNCTION IF EXISTS trig_null(); -DROP SCHEMA IF EXISTS import_influx1 CASCADE; -NOTICE: drop cascades to 9 other objects -DETAIL: drop cascades to foreign table import_influx1."T1" -drop cascades to foreign table import_influx1."T2" -drop cascades to foreign table import_influx1."T3" -drop cascades to foreign table import_influx1."T4" -drop cascades to foreign table import_influx1.bar -drop cascades to foreign table import_influx1.foo -drop cascades to foreign table import_influx1.loc1 -drop cascades to foreign table import_influx1.loct1 -drop cascades to foreign table import_influx1.loct2 -DROP SCHEMA IF EXISTS import_influx2 CASCADE; -DROP SCHEMA IF EXISTS import_influx3 CASCADE; -DROP SCHEMA IF EXISTS import_influx4 CASCADE; -NOTICE: drop cascades to 9 other objects -DETAIL: drop cascades to foreign table import_influx4."T1" -drop cascades to foreign table import_influx4."T2" -drop cascades to foreign table import_influx4."T3" -drop cascades to foreign table import_influx4."T4" -drop cascades to foreign table import_influx4.bar -drop cascades to foreign table import_influx4.foo -drop cascades to foreign table import_influx4.loc1 -drop cascades to foreign table import_influx4.loct1 -drop cascades to foreign table import_influx4.loct2 ---Testcase 621: -DROP USER MAPPING FOR public SERVER testserver1; ---Testcase 622: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 623: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2; ---Testcase 624: -DROP SERVER testserver1 CASCADE; ---Testcase 625: -DROP SERVER influxdb_svr CASCADE; -NOTICE: drop cascades to 18 other objects -DETAIL: drop cascades to foreign table ft1 -drop cascades to foreign table ft2 -drop cascades to foreign table ft4 -drop cascades to foreign table ft5 -drop cascades to foreign table loct3 -drop cascades to foreign table ft3 -drop cascades to foreign table loc1 -drop cascades to foreign table loc1_nsc -drop cascades to foreign table rem1 -drop cascades to foreign table rem1_nsc -drop cascades to foreign table gloc1 -drop cascades to foreign table grem1 -drop cascades to foreign table loct1 -drop cascades to foreign table loct2 -drop cascades to foreign table foo -drop cascades to foreign table foo2 -drop cascades to foreign table bar -drop cascades to foreign table bar2 ---Testcase 626: -DROP SERVER influxdb_svr2 CASCADE; -NOTICE: drop cascades to foreign table ft6 ---Testcase 627: -DROP EXTENSION influxdb_fdw; diff --git a/expected/10.18/schemaless/extra/join.out b/expected/10.18/schemaless/extra/join.out deleted file mode 100644 index 4127da1..0000000 --- a/expected/10.18/schemaless/extra/join.out +++ /dev/null @@ -1,7341 +0,0 @@ -\set ECHO none ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- import time column as timestamp and text type --- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; --- --- JOIN --- Test JOIN clauses --- ---Testcase 4: -CREATE FOREIGN TABLE J1_TBL ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE j1_tbl_nsc ( - i integer, - j integer, - t text -) SERVER influxdb_svr OPTIONS (table 'j1_tbl'); ---Testcase 5: -CREATE FOREIGN TABLE J2_TBL ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE j2_tbl_nsc ( - i integer, - k integer -) SERVER influxdb_svr OPTIONS (table 'j2_tbl'); ---Testcase 6: -INSERT INTO j1_tbl_nsc VALUES (1, 4, 'one'); ---Testcase 7: -INSERT INTO j1_tbl_nsc VALUES (2, 3, 'two'); ---Testcase 8: -INSERT INTO j1_tbl_nsc VALUES (3, 2, 'three'); ---Testcase 9: -INSERT INTO j1_tbl_nsc VALUES (4, 1, 'four'); ---Testcase 10: -INSERT INTO j1_tbl_nsc VALUES (5, 0, 'five'); ---Testcase 11: -INSERT INTO j1_tbl_nsc VALUES (6, 6, 'six'); ---Testcase 12: -INSERT INTO j1_tbl_nsc VALUES (7, 7, 'seven'); ---Testcase 13: -INSERT INTO j1_tbl_nsc VALUES (8, 8, 'eight'); ---Testcase 14: -INSERT INTO j1_tbl_nsc VALUES (0, NULL, 'zero'); ---Testcase 15: -INSERT INTO j1_tbl_nsc VALUES (NULL, NULL, 'null'); ---Testcase 16: -INSERT INTO j1_tbl_nsc VALUES (NULL, 0, 'zero'); ---Testcase 17: -INSERT INTO j2_tbl_nsc VALUES (1, -1); ---Testcase 18: -INSERT INTO j2_tbl_nsc VALUES (2, 2); ---Testcase 19: -INSERT INTO j2_tbl_nsc VALUES (3, -3); ---Testcase 20: -INSERT INTO j2_tbl_nsc VALUES (2, 4); ---Testcase 21: -INSERT INTO j2_tbl_nsc VALUES (5, -5); ---Testcase 22: -INSERT INTO j2_tbl_nsc VALUES (5, -5); ---Testcase 23: -INSERT INTO j2_tbl_nsc VALUES (0, NULL); ---InfluxDB does not accept NULL value ---INSERT INTO J2_TBL VALUES (NULL, NULL); ---Testcase 24: -INSERT INTO j2_tbl_nsc VALUES (NULL, 0); ---Testcase 25: -CREATE FOREIGN TABLE tenk1 ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); ---Does not support on Postgres 12 ---ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 26: -CREATE FOREIGN TABLE tenk2 ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); ---Testcase 27: -CREATE FOREIGN TABLE INT4_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 28: -CREATE FOREIGN TABLE FLOAT8_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 29: -CREATE FOREIGN TABLE INT8_TBL( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 30: -CREATE FOREIGN TABLE INT2_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); --- useful in some tests below ---Testcase 31: -create temp table onerow(); ---Testcase 32: -insert into onerow default values; -analyze onerow; --- --- CORRELATION NAMES --- Make sure that table/column aliases are supported --- before diving into more complex join syntax. --- ---Testcase 33: -SELECT * - FROM J1_TBL AS tx; - fields -------------------------------------- - {"i": "1", "j": "4", "t": "one"} - {"i": "2", "j": "3", "t": "two"} - {"i": "3", "j": "2", "t": "three"} - {"i": "4", "j": "1", "t": "four"} - {"i": "5", "j": "0", "t": "five"} - {"i": "6", "j": "6", "t": "six"} - {"i": "7", "j": "7", "t": "seven"} - {"i": "8", "j": "8", "t": "eight"} - {"i": "0", "j": null, "t": "zero"} - {"i": null, "j": null, "t": "null"} - {"i": null, "j": "0", "t": "zero"} -(11 rows) - ---Testcase 34: -SELECT * - FROM J1_TBL tx; - fields -------------------------------------- - {"i": "1", "j": "4", "t": "one"} - {"i": "2", "j": "3", "t": "two"} - {"i": "3", "j": "2", "t": "three"} - {"i": "4", "j": "1", "t": "four"} - {"i": "5", "j": "0", "t": "five"} - {"i": "6", "j": "6", "t": "six"} - {"i": "7", "j": "7", "t": "seven"} - {"i": "8", "j": "8", "t": "eight"} - {"i": "0", "j": null, "t": "zero"} - {"i": null, "j": null, "t": "null"} - {"i": null, "j": "0", "t": "zero"} -(11 rows) - ---Testcase 35: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) AS t1 (a, b, c); - a | b | c ----+---+------- - 1 | 4 | one - 2 | 3 | two - 3 | 2 | three - 4 | 1 | four - 5 | 0 | five - 6 | 6 | six - 7 | 7 | seven - 8 | 8 | eight - 0 | | zero - | | null - | 0 | zero -(11 rows) - ---Testcase 36: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c); - a | b | c ----+---+------- - 1 | 4 | one - 2 | 3 | two - 3 | 2 | three - 4 | 1 | four - 5 | 0 | five - 6 | 6 | six - 7 | 7 | seven - 8 | 8 | eight - 0 | | zero - | | null - | 0 | zero -(11 rows) - ---Testcase 37: -SELECT * - FROM (SELECT (fields->>'i')::int, (fields->>'j')::int,fields->>'t' FROM J1_TBL) t1 (a, b, c), (SELECT (fields->>'i')::int ,(fields->>'k')::int FROM J2_TBL) t2 (d, e) ORDER BY t1.a, t1.b, t1.c, t2.d, t2.e; - a | b | c | d | e ----+---+-------+---+---- - 0 | | zero | 0 | - 0 | | zero | 1 | -1 - 0 | | zero | 2 | 2 - 0 | | zero | 2 | 4 - 0 | | zero | 3 | -3 - 0 | | zero | 5 | -5 - 0 | | zero | 5 | -5 - 0 | | zero | | 0 - 1 | 4 | one | 0 | - 1 | 4 | one | 1 | -1 - 1 | 4 | one | 2 | 2 - 1 | 4 | one | 2 | 4 - 1 | 4 | one | 3 | -3 - 1 | 4 | one | 5 | -5 - 1 | 4 | one | 5 | -5 - 1 | 4 | one | | 0 - 2 | 3 | two | 0 | - 2 | 3 | two | 1 | -1 - 2 | 3 | two | 2 | 2 - 2 | 3 | two | 2 | 4 - 2 | 3 | two | 3 | -3 - 2 | 3 | two | 5 | -5 - 2 | 3 | two | 5 | -5 - 2 | 3 | two | | 0 - 3 | 2 | three | 0 | - 3 | 2 | three | 1 | -1 - 3 | 2 | three | 2 | 2 - 3 | 2 | three | 2 | 4 - 3 | 2 | three | 3 | -3 - 3 | 2 | three | 5 | -5 - 3 | 2 | three | 5 | -5 - 3 | 2 | three | | 0 - 4 | 1 | four | 0 | - 4 | 1 | four | 1 | -1 - 4 | 1 | four | 2 | 2 - 4 | 1 | four | 2 | 4 - 4 | 1 | four | 3 | -3 - 4 | 1 | four | 5 | -5 - 4 | 1 | four | 5 | -5 - 4 | 1 | four | | 0 - 5 | 0 | five | 0 | - 5 | 0 | five | 1 | -1 - 5 | 0 | five | 2 | 2 - 5 | 0 | five | 2 | 4 - 5 | 0 | five | 3 | -3 - 5 | 0 | five | 5 | -5 - 5 | 0 | five | 5 | -5 - 5 | 0 | five | | 0 - 6 | 6 | six | 0 | - 6 | 6 | six | 1 | -1 - 6 | 6 | six | 2 | 2 - 6 | 6 | six | 2 | 4 - 6 | 6 | six | 3 | -3 - 6 | 6 | six | 5 | -5 - 6 | 6 | six | 5 | -5 - 6 | 6 | six | | 0 - 7 | 7 | seven | 0 | - 7 | 7 | seven | 1 | -1 - 7 | 7 | seven | 2 | 2 - 7 | 7 | seven | 2 | 4 - 7 | 7 | seven | 3 | -3 - 7 | 7 | seven | 5 | -5 - 7 | 7 | seven | 5 | -5 - 7 | 7 | seven | | 0 - 8 | 8 | eight | 0 | - 8 | 8 | eight | 1 | -1 - 8 | 8 | eight | 2 | 2 - 8 | 8 | eight | 2 | 4 - 8 | 8 | eight | 3 | -3 - 8 | 8 | eight | 5 | -5 - 8 | 8 | eight | 5 | -5 - 8 | 8 | eight | | 0 - | 0 | zero | 0 | - | 0 | zero | 1 | -1 - | 0 | zero | 2 | 2 - | 0 | zero | 2 | 4 - | 0 | zero | 3 | -3 - | 0 | zero | 5 | -5 - | 0 | zero | 5 | -5 - | 0 | zero | | 0 - | | null | 0 | - | | null | 1 | -1 - | | null | 2 | 2 - | | null | 2 | 4 - | | null | 3 | -3 - | | null | 5 | -5 - | | null | 5 | -5 - | | null | | 0 -(88 rows) - ---Testcase 38: -SELECT t1.a, t2.e - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c), (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, e) - WHERE t1.a = t2.d; - a | e ----+---- - 0 | - 1 | -1 - 2 | 2 - 2 | 4 - 3 | -3 - 5 | -5 - 5 | -5 -(7 rows) - --- --- CROSS JOIN --- Qualifications are not allowed on cross joins, --- which degenerate into a standard unqualified inner join. --- ---Testcase 39: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; - i | j | t | i | k ----+---+-------+---+---- - 0 | | zero | 0 | - 0 | | zero | 1 | -1 - 0 | | zero | 2 | 2 - 0 | | zero | 2 | 4 - 0 | | zero | 3 | -3 - 0 | | zero | 5 | -5 - 0 | | zero | 5 | -5 - 0 | | zero | | 0 - 1 | 4 | one | 0 | - 1 | 4 | one | 1 | -1 - 1 | 4 | one | 2 | 2 - 1 | 4 | one | 2 | 4 - 1 | 4 | one | 3 | -3 - 1 | 4 | one | 5 | -5 - 1 | 4 | one | 5 | -5 - 1 | 4 | one | | 0 - 2 | 3 | two | 0 | - 2 | 3 | two | 1 | -1 - 2 | 3 | two | 2 | 2 - 2 | 3 | two | 2 | 4 - 2 | 3 | two | 3 | -3 - 2 | 3 | two | 5 | -5 - 2 | 3 | two | 5 | -5 - 2 | 3 | two | | 0 - 3 | 2 | three | 0 | - 3 | 2 | three | 1 | -1 - 3 | 2 | three | 2 | 2 - 3 | 2 | three | 2 | 4 - 3 | 2 | three | 3 | -3 - 3 | 2 | three | 5 | -5 - 3 | 2 | three | 5 | -5 - 3 | 2 | three | | 0 - 4 | 1 | four | 0 | - 4 | 1 | four | 1 | -1 - 4 | 1 | four | 2 | 2 - 4 | 1 | four | 2 | 4 - 4 | 1 | four | 3 | -3 - 4 | 1 | four | 5 | -5 - 4 | 1 | four | 5 | -5 - 4 | 1 | four | | 0 - 5 | 0 | five | 0 | - 5 | 0 | five | 1 | -1 - 5 | 0 | five | 2 | 2 - 5 | 0 | five | 2 | 4 - 5 | 0 | five | 3 | -3 - 5 | 0 | five | 5 | -5 - 5 | 0 | five | 5 | -5 - 5 | 0 | five | | 0 - 6 | 6 | six | 0 | - 6 | 6 | six | 1 | -1 - 6 | 6 | six | 2 | 2 - 6 | 6 | six | 2 | 4 - 6 | 6 | six | 3 | -3 - 6 | 6 | six | 5 | -5 - 6 | 6 | six | 5 | -5 - 6 | 6 | six | | 0 - 7 | 7 | seven | 0 | - 7 | 7 | seven | 1 | -1 - 7 | 7 | seven | 2 | 2 - 7 | 7 | seven | 2 | 4 - 7 | 7 | seven | 3 | -3 - 7 | 7 | seven | 5 | -5 - 7 | 7 | seven | 5 | -5 - 7 | 7 | seven | | 0 - 8 | 8 | eight | 0 | - 8 | 8 | eight | 1 | -1 - 8 | 8 | eight | 2 | 2 - 8 | 8 | eight | 2 | 4 - 8 | 8 | eight | 3 | -3 - 8 | 8 | eight | 5 | -5 - 8 | 8 | eight | 5 | -5 - 8 | 8 | eight | | 0 - | 0 | zero | 0 | - | 0 | zero | 1 | -1 - | 0 | zero | 2 | 2 - | 0 | zero | 2 | 4 - | 0 | zero | 3 | -3 - | 0 | zero | 5 | -5 - | 0 | zero | 5 | -5 - | 0 | zero | | 0 - | | null | 0 | - | | null | 1 | -1 - | | null | 2 | 2 - | | null | 2 | 4 - | | null | 3 | -3 - | | null | 5 | -5 - | | null | 5 | -5 - | | null | | 0 -(88 rows) - --- ambiguous column ---Testcase 40: -SELECT i, k, t - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; -ERROR: column reference "i" is ambiguous -LINE 1: SELECT i, k, t - ^ --- resolve previous ambiguity by specifying the table name ---Testcase 41: -SELECT t1.i, k, t - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 ORDER BY t1.i, t1.j, t1.t, t2.i, t2.k; - i | k | t ----+----+------- - 0 | | zero - 0 | -1 | zero - 0 | 2 | zero - 0 | 4 | zero - 0 | -3 | zero - 0 | -5 | zero - 0 | -5 | zero - 0 | 0 | zero - 1 | | one - 1 | -1 | one - 1 | 2 | one - 1 | 4 | one - 1 | -3 | one - 1 | -5 | one - 1 | -5 | one - 1 | 0 | one - 2 | | two - 2 | -1 | two - 2 | 2 | two - 2 | 4 | two - 2 | -3 | two - 2 | -5 | two - 2 | -5 | two - 2 | 0 | two - 3 | | three - 3 | -1 | three - 3 | 2 | three - 3 | 4 | three - 3 | -3 | three - 3 | -5 | three - 3 | -5 | three - 3 | 0 | three - 4 | | four - 4 | -1 | four - 4 | 2 | four - 4 | 4 | four - 4 | -3 | four - 4 | -5 | four - 4 | -5 | four - 4 | 0 | four - 5 | | five - 5 | -1 | five - 5 | 2 | five - 5 | 4 | five - 5 | -3 | five - 5 | -5 | five - 5 | -5 | five - 5 | 0 | five - 6 | | six - 6 | -1 | six - 6 | 2 | six - 6 | 4 | six - 6 | -3 | six - 6 | -5 | six - 6 | -5 | six - 6 | 0 | six - 7 | | seven - 7 | -1 | seven - 7 | 2 | seven - 7 | 4 | seven - 7 | -3 | seven - 7 | -5 | seven - 7 | -5 | seven - 7 | 0 | seven - 8 | | eight - 8 | -1 | eight - 8 | 2 | eight - 8 | 4 | eight - 8 | -3 | eight - 8 | -5 | eight - 8 | -5 | eight - 8 | 0 | eight - | | zero - | -1 | zero - | 2 | zero - | 4 | zero - | -3 | zero - | -5 | zero - | -5 | zero - | 0 | zero - | | null - | -1 | null - | 2 | null - | 4 | null - | -3 | null - | -5 | null - | -5 | null - | 0 | null -(88 rows) - ---Testcase 42: -SELECT ii, tt, kk - FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL) - AS tx (ii, jj, tt, ii2, kk) ORDER BY ii, tt, kk; - ii | tt | kk -----+-------+---- - 0 | zero | -5 - 0 | zero | -5 - 0 | zero | -3 - 0 | zero | -1 - 0 | zero | 0 - 0 | zero | 2 - 0 | zero | 4 - 0 | zero | - 1 | one | -5 - 1 | one | -5 - 1 | one | -3 - 1 | one | -1 - 1 | one | 0 - 1 | one | 2 - 1 | one | 4 - 1 | one | - 2 | two | -5 - 2 | two | -5 - 2 | two | -3 - 2 | two | -1 - 2 | two | 0 - 2 | two | 2 - 2 | two | 4 - 2 | two | - 3 | three | -5 - 3 | three | -5 - 3 | three | -3 - 3 | three | -1 - 3 | three | 0 - 3 | three | 2 - 3 | three | 4 - 3 | three | - 4 | four | -5 - 4 | four | -5 - 4 | four | -3 - 4 | four | -1 - 4 | four | 0 - 4 | four | 2 - 4 | four | 4 - 4 | four | - 5 | five | -5 - 5 | five | -5 - 5 | five | -3 - 5 | five | -1 - 5 | five | 0 - 5 | five | 2 - 5 | five | 4 - 5 | five | - 6 | six | -5 - 6 | six | -5 - 6 | six | -3 - 6 | six | -1 - 6 | six | 0 - 6 | six | 2 - 6 | six | 4 - 6 | six | - 7 | seven | -5 - 7 | seven | -5 - 7 | seven | -3 - 7 | seven | -1 - 7 | seven | 0 - 7 | seven | 2 - 7 | seven | 4 - 7 | seven | - 8 | eight | -5 - 8 | eight | -5 - 8 | eight | -3 - 8 | eight | -1 - 8 | eight | 0 - 8 | eight | 2 - 8 | eight | 4 - 8 | eight | - | null | -5 - | null | -5 - | null | -3 - | null | -1 - | null | 0 - | null | 2 - | null | 4 - | null | - | zero | -5 - | zero | -5 - | zero | -3 - | zero | -1 - | zero | 0 - | zero | 2 - | zero | 4 - | zero | -(88 rows) - ---Testcase 43: -SELECT tx.ii, tx.jj, tx.kk - FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, e)) - AS tx (ii, jj, tt, ii2, kk) ORDER BY tx.ii, tx.jj, tx.kk; - ii | jj | kk -----+----+---- - 0 | | -5 - 0 | | -5 - 0 | | -3 - 0 | | -1 - 0 | | 0 - 0 | | 2 - 0 | | 4 - 0 | | - 1 | 4 | -5 - 1 | 4 | -5 - 1 | 4 | -3 - 1 | 4 | -1 - 1 | 4 | 0 - 1 | 4 | 2 - 1 | 4 | 4 - 1 | 4 | - 2 | 3 | -5 - 2 | 3 | -5 - 2 | 3 | -3 - 2 | 3 | -1 - 2 | 3 | 0 - 2 | 3 | 2 - 2 | 3 | 4 - 2 | 3 | - 3 | 2 | -5 - 3 | 2 | -5 - 3 | 2 | -3 - 3 | 2 | -1 - 3 | 2 | 0 - 3 | 2 | 2 - 3 | 2 | 4 - 3 | 2 | - 4 | 1 | -5 - 4 | 1 | -5 - 4 | 1 | -3 - 4 | 1 | -1 - 4 | 1 | 0 - 4 | 1 | 2 - 4 | 1 | 4 - 4 | 1 | - 5 | 0 | -5 - 5 | 0 | -5 - 5 | 0 | -3 - 5 | 0 | -1 - 5 | 0 | 0 - 5 | 0 | 2 - 5 | 0 | 4 - 5 | 0 | - 6 | 6 | -5 - 6 | 6 | -5 - 6 | 6 | -3 - 6 | 6 | -1 - 6 | 6 | 0 - 6 | 6 | 2 - 6 | 6 | 4 - 6 | 6 | - 7 | 7 | -5 - 7 | 7 | -5 - 7 | 7 | -3 - 7 | 7 | -1 - 7 | 7 | 0 - 7 | 7 | 2 - 7 | 7 | 4 - 7 | 7 | - 8 | 8 | -5 - 8 | 8 | -5 - 8 | 8 | -3 - 8 | 8 | -1 - 8 | 8 | 0 - 8 | 8 | 2 - 8 | 8 | 4 - 8 | 8 | - | 0 | -5 - | 0 | -5 - | 0 | -3 - | 0 | -1 - | 0 | 0 - | 0 | 2 - | 0 | 4 - | 0 | - | | -5 - | | -5 - | | -3 - | | -1 - | | 0 - | | 2 - | | 4 - | | -(88 rows) - ---Testcase 44: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) a CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) b ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, a.i, a.k, b.i, b.k; - i | j | t | i | k | i | k ----+---+-------+---+----+---+---- - 0 | | zero | 0 | | 0 | - 0 | | zero | 0 | | 1 | -1 - 0 | | zero | 0 | | 2 | 2 - 0 | | zero | 0 | | 2 | 4 - 0 | | zero | 0 | | 3 | -3 - 0 | | zero | 0 | | 5 | -5 - 0 | | zero | 0 | | 5 | -5 - 0 | | zero | 0 | | | 0 - 0 | | zero | 1 | -1 | 0 | - 0 | | zero | 1 | -1 | 1 | -1 - 0 | | zero | 1 | -1 | 2 | 2 - 0 | | zero | 1 | -1 | 2 | 4 - 0 | | zero | 1 | -1 | 3 | -3 - 0 | | zero | 1 | -1 | 5 | -5 - 0 | | zero | 1 | -1 | 5 | -5 - 0 | | zero | 1 | -1 | | 0 - 0 | | zero | 2 | 2 | 0 | - 0 | | zero | 2 | 2 | 1 | -1 - 0 | | zero | 2 | 2 | 2 | 2 - 0 | | zero | 2 | 2 | 2 | 4 - 0 | | zero | 2 | 2 | 3 | -3 - 0 | | zero | 2 | 2 | 5 | -5 - 0 | | zero | 2 | 2 | 5 | -5 - 0 | | zero | 2 | 2 | | 0 - 0 | | zero | 2 | 4 | 0 | - 0 | | zero | 2 | 4 | 1 | -1 - 0 | | zero | 2 | 4 | 2 | 2 - 0 | | zero | 2 | 4 | 2 | 4 - 0 | | zero | 2 | 4 | 3 | -3 - 0 | | zero | 2 | 4 | 5 | -5 - 0 | | zero | 2 | 4 | 5 | -5 - 0 | | zero | 2 | 4 | | 0 - 0 | | zero | 3 | -3 | 0 | - 0 | | zero | 3 | -3 | 1 | -1 - 0 | | zero | 3 | -3 | 2 | 2 - 0 | | zero | 3 | -3 | 2 | 4 - 0 | | zero | 3 | -3 | 3 | -3 - 0 | | zero | 3 | -3 | 5 | -5 - 0 | | zero | 3 | -3 | 5 | -5 - 0 | | zero | 3 | -3 | | 0 - 0 | | zero | 5 | -5 | 0 | - 0 | | zero | 5 | -5 | 0 | - 0 | | zero | 5 | -5 | 1 | -1 - 0 | | zero | 5 | -5 | 1 | -1 - 0 | | zero | 5 | -5 | 2 | 2 - 0 | | zero | 5 | -5 | 2 | 2 - 0 | | zero | 5 | -5 | 2 | 4 - 0 | | zero | 5 | -5 | 2 | 4 - 0 | | zero | 5 | -5 | 3 | -3 - 0 | | zero | 5 | -5 | 3 | -3 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | | 0 - 0 | | zero | 5 | -5 | | 0 - 0 | | zero | | 0 | 0 | - 0 | | zero | | 0 | 1 | -1 - 0 | | zero | | 0 | 2 | 2 - 0 | | zero | | 0 | 2 | 4 - 0 | | zero | | 0 | 3 | -3 - 0 | | zero | | 0 | 5 | -5 - 0 | | zero | | 0 | 5 | -5 - 0 | | zero | | 0 | | 0 - 1 | 4 | one | 0 | | 0 | - 1 | 4 | one | 0 | | 1 | -1 - 1 | 4 | one | 0 | | 2 | 2 - 1 | 4 | one | 0 | | 2 | 4 - 1 | 4 | one | 0 | | 3 | -3 - 1 | 4 | one | 0 | | 5 | -5 - 1 | 4 | one | 0 | | 5 | -5 - 1 | 4 | one | 0 | | | 0 - 1 | 4 | one | 1 | -1 | 0 | - 1 | 4 | one | 1 | -1 | 1 | -1 - 1 | 4 | one | 1 | -1 | 2 | 2 - 1 | 4 | one | 1 | -1 | 2 | 4 - 1 | 4 | one | 1 | -1 | 3 | -3 - 1 | 4 | one | 1 | -1 | 5 | -5 - 1 | 4 | one | 1 | -1 | 5 | -5 - 1 | 4 | one | 1 | -1 | | 0 - 1 | 4 | one | 2 | 2 | 0 | - 1 | 4 | one | 2 | 2 | 1 | -1 - 1 | 4 | one | 2 | 2 | 2 | 2 - 1 | 4 | one | 2 | 2 | 2 | 4 - 1 | 4 | one | 2 | 2 | 3 | -3 - 1 | 4 | one | 2 | 2 | 5 | -5 - 1 | 4 | one | 2 | 2 | 5 | -5 - 1 | 4 | one | 2 | 2 | | 0 - 1 | 4 | one | 2 | 4 | 0 | - 1 | 4 | one | 2 | 4 | 1 | -1 - 1 | 4 | one | 2 | 4 | 2 | 2 - 1 | 4 | one | 2 | 4 | 2 | 4 - 1 | 4 | one | 2 | 4 | 3 | -3 - 1 | 4 | one | 2 | 4 | 5 | -5 - 1 | 4 | one | 2 | 4 | 5 | -5 - 1 | 4 | one | 2 | 4 | | 0 - 1 | 4 | one | 3 | -3 | 0 | - 1 | 4 | one | 3 | -3 | 1 | -1 - 1 | 4 | one | 3 | -3 | 2 | 2 - 1 | 4 | one | 3 | -3 | 2 | 4 - 1 | 4 | one | 3 | -3 | 3 | -3 - 1 | 4 | one | 3 | -3 | 5 | -5 - 1 | 4 | one | 3 | -3 | 5 | -5 - 1 | 4 | one | 3 | -3 | | 0 - 1 | 4 | one | 5 | -5 | 0 | - 1 | 4 | one | 5 | -5 | 0 | - 1 | 4 | one | 5 | -5 | 1 | -1 - 1 | 4 | one | 5 | -5 | 1 | -1 - 1 | 4 | one | 5 | -5 | 2 | 2 - 1 | 4 | one | 5 | -5 | 2 | 2 - 1 | 4 | one | 5 | -5 | 2 | 4 - 1 | 4 | one | 5 | -5 | 2 | 4 - 1 | 4 | one | 5 | -5 | 3 | -3 - 1 | 4 | one | 5 | -5 | 3 | -3 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | | 0 - 1 | 4 | one | 5 | -5 | | 0 - 1 | 4 | one | | 0 | 0 | - 1 | 4 | one | | 0 | 1 | -1 - 1 | 4 | one | | 0 | 2 | 2 - 1 | 4 | one | | 0 | 2 | 4 - 1 | 4 | one | | 0 | 3 | -3 - 1 | 4 | one | | 0 | 5 | -5 - 1 | 4 | one | | 0 | 5 | -5 - 1 | 4 | one | | 0 | | 0 - 2 | 3 | two | 0 | | 0 | - 2 | 3 | two | 0 | | 1 | -1 - 2 | 3 | two | 0 | | 2 | 2 - 2 | 3 | two | 0 | | 2 | 4 - 2 | 3 | two | 0 | | 3 | -3 - 2 | 3 | two | 0 | | 5 | -5 - 2 | 3 | two | 0 | | 5 | -5 - 2 | 3 | two | 0 | | | 0 - 2 | 3 | two | 1 | -1 | 0 | - 2 | 3 | two | 1 | -1 | 1 | -1 - 2 | 3 | two | 1 | -1 | 2 | 2 - 2 | 3 | two | 1 | -1 | 2 | 4 - 2 | 3 | two | 1 | -1 | 3 | -3 - 2 | 3 | two | 1 | -1 | 5 | -5 - 2 | 3 | two | 1 | -1 | 5 | -5 - 2 | 3 | two | 1 | -1 | | 0 - 2 | 3 | two | 2 | 2 | 0 | - 2 | 3 | two | 2 | 2 | 1 | -1 - 2 | 3 | two | 2 | 2 | 2 | 2 - 2 | 3 | two | 2 | 2 | 2 | 4 - 2 | 3 | two | 2 | 2 | 3 | -3 - 2 | 3 | two | 2 | 2 | 5 | -5 - 2 | 3 | two | 2 | 2 | 5 | -5 - 2 | 3 | two | 2 | 2 | | 0 - 2 | 3 | two | 2 | 4 | 0 | - 2 | 3 | two | 2 | 4 | 1 | -1 - 2 | 3 | two | 2 | 4 | 2 | 2 - 2 | 3 | two | 2 | 4 | 2 | 4 - 2 | 3 | two | 2 | 4 | 3 | -3 - 2 | 3 | two | 2 | 4 | 5 | -5 - 2 | 3 | two | 2 | 4 | 5 | -5 - 2 | 3 | two | 2 | 4 | | 0 - 2 | 3 | two | 3 | -3 | 0 | - 2 | 3 | two | 3 | -3 | 1 | -1 - 2 | 3 | two | 3 | -3 | 2 | 2 - 2 | 3 | two | 3 | -3 | 2 | 4 - 2 | 3 | two | 3 | -3 | 3 | -3 - 2 | 3 | two | 3 | -3 | 5 | -5 - 2 | 3 | two | 3 | -3 | 5 | -5 - 2 | 3 | two | 3 | -3 | | 0 - 2 | 3 | two | 5 | -5 | 0 | - 2 | 3 | two | 5 | -5 | 0 | - 2 | 3 | two | 5 | -5 | 1 | -1 - 2 | 3 | two | 5 | -5 | 1 | -1 - 2 | 3 | two | 5 | -5 | 2 | 2 - 2 | 3 | two | 5 | -5 | 2 | 2 - 2 | 3 | two | 5 | -5 | 2 | 4 - 2 | 3 | two | 5 | -5 | 2 | 4 - 2 | 3 | two | 5 | -5 | 3 | -3 - 2 | 3 | two | 5 | -5 | 3 | -3 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | | 0 - 2 | 3 | two | 5 | -5 | | 0 - 2 | 3 | two | | 0 | 0 | - 2 | 3 | two | | 0 | 1 | -1 - 2 | 3 | two | | 0 | 2 | 2 - 2 | 3 | two | | 0 | 2 | 4 - 2 | 3 | two | | 0 | 3 | -3 - 2 | 3 | two | | 0 | 5 | -5 - 2 | 3 | two | | 0 | 5 | -5 - 2 | 3 | two | | 0 | | 0 - 3 | 2 | three | 0 | | 0 | - 3 | 2 | three | 0 | | 1 | -1 - 3 | 2 | three | 0 | | 2 | 2 - 3 | 2 | three | 0 | | 2 | 4 - 3 | 2 | three | 0 | | 3 | -3 - 3 | 2 | three | 0 | | 5 | -5 - 3 | 2 | three | 0 | | 5 | -5 - 3 | 2 | three | 0 | | | 0 - 3 | 2 | three | 1 | -1 | 0 | - 3 | 2 | three | 1 | -1 | 1 | -1 - 3 | 2 | three | 1 | -1 | 2 | 2 - 3 | 2 | three | 1 | -1 | 2 | 4 - 3 | 2 | three | 1 | -1 | 3 | -3 - 3 | 2 | three | 1 | -1 | 5 | -5 - 3 | 2 | three | 1 | -1 | 5 | -5 - 3 | 2 | three | 1 | -1 | | 0 - 3 | 2 | three | 2 | 2 | 0 | - 3 | 2 | three | 2 | 2 | 1 | -1 - 3 | 2 | three | 2 | 2 | 2 | 2 - 3 | 2 | three | 2 | 2 | 2 | 4 - 3 | 2 | three | 2 | 2 | 3 | -3 - 3 | 2 | three | 2 | 2 | 5 | -5 - 3 | 2 | three | 2 | 2 | 5 | -5 - 3 | 2 | three | 2 | 2 | | 0 - 3 | 2 | three | 2 | 4 | 0 | - 3 | 2 | three | 2 | 4 | 1 | -1 - 3 | 2 | three | 2 | 4 | 2 | 2 - 3 | 2 | three | 2 | 4 | 2 | 4 - 3 | 2 | three | 2 | 4 | 3 | -3 - 3 | 2 | three | 2 | 4 | 5 | -5 - 3 | 2 | three | 2 | 4 | 5 | -5 - 3 | 2 | three | 2 | 4 | | 0 - 3 | 2 | three | 3 | -3 | 0 | - 3 | 2 | three | 3 | -3 | 1 | -1 - 3 | 2 | three | 3 | -3 | 2 | 2 - 3 | 2 | three | 3 | -3 | 2 | 4 - 3 | 2 | three | 3 | -3 | 3 | -3 - 3 | 2 | three | 3 | -3 | 5 | -5 - 3 | 2 | three | 3 | -3 | 5 | -5 - 3 | 2 | three | 3 | -3 | | 0 - 3 | 2 | three | 5 | -5 | 0 | - 3 | 2 | three | 5 | -5 | 0 | - 3 | 2 | three | 5 | -5 | 1 | -1 - 3 | 2 | three | 5 | -5 | 1 | -1 - 3 | 2 | three | 5 | -5 | 2 | 2 - 3 | 2 | three | 5 | -5 | 2 | 2 - 3 | 2 | three | 5 | -5 | 2 | 4 - 3 | 2 | three | 5 | -5 | 2 | 4 - 3 | 2 | three | 5 | -5 | 3 | -3 - 3 | 2 | three | 5 | -5 | 3 | -3 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | | 0 - 3 | 2 | three | 5 | -5 | | 0 - 3 | 2 | three | | 0 | 0 | - 3 | 2 | three | | 0 | 1 | -1 - 3 | 2 | three | | 0 | 2 | 2 - 3 | 2 | three | | 0 | 2 | 4 - 3 | 2 | three | | 0 | 3 | -3 - 3 | 2 | three | | 0 | 5 | -5 - 3 | 2 | three | | 0 | 5 | -5 - 3 | 2 | three | | 0 | | 0 - 4 | 1 | four | 0 | | 0 | - 4 | 1 | four | 0 | | 1 | -1 - 4 | 1 | four | 0 | | 2 | 2 - 4 | 1 | four | 0 | | 2 | 4 - 4 | 1 | four | 0 | | 3 | -3 - 4 | 1 | four | 0 | | 5 | -5 - 4 | 1 | four | 0 | | 5 | -5 - 4 | 1 | four | 0 | | | 0 - 4 | 1 | four | 1 | -1 | 0 | - 4 | 1 | four | 1 | -1 | 1 | -1 - 4 | 1 | four | 1 | -1 | 2 | 2 - 4 | 1 | four | 1 | -1 | 2 | 4 - 4 | 1 | four | 1 | -1 | 3 | -3 - 4 | 1 | four | 1 | -1 | 5 | -5 - 4 | 1 | four | 1 | -1 | 5 | -5 - 4 | 1 | four | 1 | -1 | | 0 - 4 | 1 | four | 2 | 2 | 0 | - 4 | 1 | four | 2 | 2 | 1 | -1 - 4 | 1 | four | 2 | 2 | 2 | 2 - 4 | 1 | four | 2 | 2 | 2 | 4 - 4 | 1 | four | 2 | 2 | 3 | -3 - 4 | 1 | four | 2 | 2 | 5 | -5 - 4 | 1 | four | 2 | 2 | 5 | -5 - 4 | 1 | four | 2 | 2 | | 0 - 4 | 1 | four | 2 | 4 | 0 | - 4 | 1 | four | 2 | 4 | 1 | -1 - 4 | 1 | four | 2 | 4 | 2 | 2 - 4 | 1 | four | 2 | 4 | 2 | 4 - 4 | 1 | four | 2 | 4 | 3 | -3 - 4 | 1 | four | 2 | 4 | 5 | -5 - 4 | 1 | four | 2 | 4 | 5 | -5 - 4 | 1 | four | 2 | 4 | | 0 - 4 | 1 | four | 3 | -3 | 0 | - 4 | 1 | four | 3 | -3 | 1 | -1 - 4 | 1 | four | 3 | -3 | 2 | 2 - 4 | 1 | four | 3 | -3 | 2 | 4 - 4 | 1 | four | 3 | -3 | 3 | -3 - 4 | 1 | four | 3 | -3 | 5 | -5 - 4 | 1 | four | 3 | -3 | 5 | -5 - 4 | 1 | four | 3 | -3 | | 0 - 4 | 1 | four | 5 | -5 | 0 | - 4 | 1 | four | 5 | -5 | 0 | - 4 | 1 | four | 5 | -5 | 1 | -1 - 4 | 1 | four | 5 | -5 | 1 | -1 - 4 | 1 | four | 5 | -5 | 2 | 2 - 4 | 1 | four | 5 | -5 | 2 | 2 - 4 | 1 | four | 5 | -5 | 2 | 4 - 4 | 1 | four | 5 | -5 | 2 | 4 - 4 | 1 | four | 5 | -5 | 3 | -3 - 4 | 1 | four | 5 | -5 | 3 | -3 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | | 0 - 4 | 1 | four | 5 | -5 | | 0 - 4 | 1 | four | | 0 | 0 | - 4 | 1 | four | | 0 | 1 | -1 - 4 | 1 | four | | 0 | 2 | 2 - 4 | 1 | four | | 0 | 2 | 4 - 4 | 1 | four | | 0 | 3 | -3 - 4 | 1 | four | | 0 | 5 | -5 - 4 | 1 | four | | 0 | 5 | -5 - 4 | 1 | four | | 0 | | 0 - 5 | 0 | five | 0 | | 0 | - 5 | 0 | five | 0 | | 1 | -1 - 5 | 0 | five | 0 | | 2 | 2 - 5 | 0 | five | 0 | | 2 | 4 - 5 | 0 | five | 0 | | 3 | -3 - 5 | 0 | five | 0 | | 5 | -5 - 5 | 0 | five | 0 | | 5 | -5 - 5 | 0 | five | 0 | | | 0 - 5 | 0 | five | 1 | -1 | 0 | - 5 | 0 | five | 1 | -1 | 1 | -1 - 5 | 0 | five | 1 | -1 | 2 | 2 - 5 | 0 | five | 1 | -1 | 2 | 4 - 5 | 0 | five | 1 | -1 | 3 | -3 - 5 | 0 | five | 1 | -1 | 5 | -5 - 5 | 0 | five | 1 | -1 | 5 | -5 - 5 | 0 | five | 1 | -1 | | 0 - 5 | 0 | five | 2 | 2 | 0 | - 5 | 0 | five | 2 | 2 | 1 | -1 - 5 | 0 | five | 2 | 2 | 2 | 2 - 5 | 0 | five | 2 | 2 | 2 | 4 - 5 | 0 | five | 2 | 2 | 3 | -3 - 5 | 0 | five | 2 | 2 | 5 | -5 - 5 | 0 | five | 2 | 2 | 5 | -5 - 5 | 0 | five | 2 | 2 | | 0 - 5 | 0 | five | 2 | 4 | 0 | - 5 | 0 | five | 2 | 4 | 1 | -1 - 5 | 0 | five | 2 | 4 | 2 | 2 - 5 | 0 | five | 2 | 4 | 2 | 4 - 5 | 0 | five | 2 | 4 | 3 | -3 - 5 | 0 | five | 2 | 4 | 5 | -5 - 5 | 0 | five | 2 | 4 | 5 | -5 - 5 | 0 | five | 2 | 4 | | 0 - 5 | 0 | five | 3 | -3 | 0 | - 5 | 0 | five | 3 | -3 | 1 | -1 - 5 | 0 | five | 3 | -3 | 2 | 2 - 5 | 0 | five | 3 | -3 | 2 | 4 - 5 | 0 | five | 3 | -3 | 3 | -3 - 5 | 0 | five | 3 | -3 | 5 | -5 - 5 | 0 | five | 3 | -3 | 5 | -5 - 5 | 0 | five | 3 | -3 | | 0 - 5 | 0 | five | 5 | -5 | 0 | - 5 | 0 | five | 5 | -5 | 0 | - 5 | 0 | five | 5 | -5 | 1 | -1 - 5 | 0 | five | 5 | -5 | 1 | -1 - 5 | 0 | five | 5 | -5 | 2 | 2 - 5 | 0 | five | 5 | -5 | 2 | 2 - 5 | 0 | five | 5 | -5 | 2 | 4 - 5 | 0 | five | 5 | -5 | 2 | 4 - 5 | 0 | five | 5 | -5 | 3 | -3 - 5 | 0 | five | 5 | -5 | 3 | -3 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | | 0 - 5 | 0 | five | 5 | -5 | | 0 - 5 | 0 | five | | 0 | 0 | - 5 | 0 | five | | 0 | 1 | -1 - 5 | 0 | five | | 0 | 2 | 2 - 5 | 0 | five | | 0 | 2 | 4 - 5 | 0 | five | | 0 | 3 | -3 - 5 | 0 | five | | 0 | 5 | -5 - 5 | 0 | five | | 0 | 5 | -5 - 5 | 0 | five | | 0 | | 0 - 6 | 6 | six | 0 | | 0 | - 6 | 6 | six | 0 | | 1 | -1 - 6 | 6 | six | 0 | | 2 | 2 - 6 | 6 | six | 0 | | 2 | 4 - 6 | 6 | six | 0 | | 3 | -3 - 6 | 6 | six | 0 | | 5 | -5 - 6 | 6 | six | 0 | | 5 | -5 - 6 | 6 | six | 0 | | | 0 - 6 | 6 | six | 1 | -1 | 0 | - 6 | 6 | six | 1 | -1 | 1 | -1 - 6 | 6 | six | 1 | -1 | 2 | 2 - 6 | 6 | six | 1 | -1 | 2 | 4 - 6 | 6 | six | 1 | -1 | 3 | -3 - 6 | 6 | six | 1 | -1 | 5 | -5 - 6 | 6 | six | 1 | -1 | 5 | -5 - 6 | 6 | six | 1 | -1 | | 0 - 6 | 6 | six | 2 | 2 | 0 | - 6 | 6 | six | 2 | 2 | 1 | -1 - 6 | 6 | six | 2 | 2 | 2 | 2 - 6 | 6 | six | 2 | 2 | 2 | 4 - 6 | 6 | six | 2 | 2 | 3 | -3 - 6 | 6 | six | 2 | 2 | 5 | -5 - 6 | 6 | six | 2 | 2 | 5 | -5 - 6 | 6 | six | 2 | 2 | | 0 - 6 | 6 | six | 2 | 4 | 0 | - 6 | 6 | six | 2 | 4 | 1 | -1 - 6 | 6 | six | 2 | 4 | 2 | 2 - 6 | 6 | six | 2 | 4 | 2 | 4 - 6 | 6 | six | 2 | 4 | 3 | -3 - 6 | 6 | six | 2 | 4 | 5 | -5 - 6 | 6 | six | 2 | 4 | 5 | -5 - 6 | 6 | six | 2 | 4 | | 0 - 6 | 6 | six | 3 | -3 | 0 | - 6 | 6 | six | 3 | -3 | 1 | -1 - 6 | 6 | six | 3 | -3 | 2 | 2 - 6 | 6 | six | 3 | -3 | 2 | 4 - 6 | 6 | six | 3 | -3 | 3 | -3 - 6 | 6 | six | 3 | -3 | 5 | -5 - 6 | 6 | six | 3 | -3 | 5 | -5 - 6 | 6 | six | 3 | -3 | | 0 - 6 | 6 | six | 5 | -5 | 0 | - 6 | 6 | six | 5 | -5 | 0 | - 6 | 6 | six | 5 | -5 | 1 | -1 - 6 | 6 | six | 5 | -5 | 1 | -1 - 6 | 6 | six | 5 | -5 | 2 | 2 - 6 | 6 | six | 5 | -5 | 2 | 2 - 6 | 6 | six | 5 | -5 | 2 | 4 - 6 | 6 | six | 5 | -5 | 2 | 4 - 6 | 6 | six | 5 | -5 | 3 | -3 - 6 | 6 | six | 5 | -5 | 3 | -3 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | | 0 - 6 | 6 | six | 5 | -5 | | 0 - 6 | 6 | six | | 0 | 0 | - 6 | 6 | six | | 0 | 1 | -1 - 6 | 6 | six | | 0 | 2 | 2 - 6 | 6 | six | | 0 | 2 | 4 - 6 | 6 | six | | 0 | 3 | -3 - 6 | 6 | six | | 0 | 5 | -5 - 6 | 6 | six | | 0 | 5 | -5 - 6 | 6 | six | | 0 | | 0 - 7 | 7 | seven | 0 | | 0 | - 7 | 7 | seven | 0 | | 1 | -1 - 7 | 7 | seven | 0 | | 2 | 2 - 7 | 7 | seven | 0 | | 2 | 4 - 7 | 7 | seven | 0 | | 3 | -3 - 7 | 7 | seven | 0 | | 5 | -5 - 7 | 7 | seven | 0 | | 5 | -5 - 7 | 7 | seven | 0 | | | 0 - 7 | 7 | seven | 1 | -1 | 0 | - 7 | 7 | seven | 1 | -1 | 1 | -1 - 7 | 7 | seven | 1 | -1 | 2 | 2 - 7 | 7 | seven | 1 | -1 | 2 | 4 - 7 | 7 | seven | 1 | -1 | 3 | -3 - 7 | 7 | seven | 1 | -1 | 5 | -5 - 7 | 7 | seven | 1 | -1 | 5 | -5 - 7 | 7 | seven | 1 | -1 | | 0 - 7 | 7 | seven | 2 | 2 | 0 | - 7 | 7 | seven | 2 | 2 | 1 | -1 - 7 | 7 | seven | 2 | 2 | 2 | 2 - 7 | 7 | seven | 2 | 2 | 2 | 4 - 7 | 7 | seven | 2 | 2 | 3 | -3 - 7 | 7 | seven | 2 | 2 | 5 | -5 - 7 | 7 | seven | 2 | 2 | 5 | -5 - 7 | 7 | seven | 2 | 2 | | 0 - 7 | 7 | seven | 2 | 4 | 0 | - 7 | 7 | seven | 2 | 4 | 1 | -1 - 7 | 7 | seven | 2 | 4 | 2 | 2 - 7 | 7 | seven | 2 | 4 | 2 | 4 - 7 | 7 | seven | 2 | 4 | 3 | -3 - 7 | 7 | seven | 2 | 4 | 5 | -5 - 7 | 7 | seven | 2 | 4 | 5 | -5 - 7 | 7 | seven | 2 | 4 | | 0 - 7 | 7 | seven | 3 | -3 | 0 | - 7 | 7 | seven | 3 | -3 | 1 | -1 - 7 | 7 | seven | 3 | -3 | 2 | 2 - 7 | 7 | seven | 3 | -3 | 2 | 4 - 7 | 7 | seven | 3 | -3 | 3 | -3 - 7 | 7 | seven | 3 | -3 | 5 | -5 - 7 | 7 | seven | 3 | -3 | 5 | -5 - 7 | 7 | seven | 3 | -3 | | 0 - 7 | 7 | seven | 5 | -5 | 0 | - 7 | 7 | seven | 5 | -5 | 0 | - 7 | 7 | seven | 5 | -5 | 1 | -1 - 7 | 7 | seven | 5 | -5 | 1 | -1 - 7 | 7 | seven | 5 | -5 | 2 | 2 - 7 | 7 | seven | 5 | -5 | 2 | 2 - 7 | 7 | seven | 5 | -5 | 2 | 4 - 7 | 7 | seven | 5 | -5 | 2 | 4 - 7 | 7 | seven | 5 | -5 | 3 | -3 - 7 | 7 | seven | 5 | -5 | 3 | -3 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | | 0 - 7 | 7 | seven | 5 | -5 | | 0 - 7 | 7 | seven | | 0 | 0 | - 7 | 7 | seven | | 0 | 1 | -1 - 7 | 7 | seven | | 0 | 2 | 2 - 7 | 7 | seven | | 0 | 2 | 4 - 7 | 7 | seven | | 0 | 3 | -3 - 7 | 7 | seven | | 0 | 5 | -5 - 7 | 7 | seven | | 0 | 5 | -5 - 7 | 7 | seven | | 0 | | 0 - 8 | 8 | eight | 0 | | 0 | - 8 | 8 | eight | 0 | | 1 | -1 - 8 | 8 | eight | 0 | | 2 | 2 - 8 | 8 | eight | 0 | | 2 | 4 - 8 | 8 | eight | 0 | | 3 | -3 - 8 | 8 | eight | 0 | | 5 | -5 - 8 | 8 | eight | 0 | | 5 | -5 - 8 | 8 | eight | 0 | | | 0 - 8 | 8 | eight | 1 | -1 | 0 | - 8 | 8 | eight | 1 | -1 | 1 | -1 - 8 | 8 | eight | 1 | -1 | 2 | 2 - 8 | 8 | eight | 1 | -1 | 2 | 4 - 8 | 8 | eight | 1 | -1 | 3 | -3 - 8 | 8 | eight | 1 | -1 | 5 | -5 - 8 | 8 | eight | 1 | -1 | 5 | -5 - 8 | 8 | eight | 1 | -1 | | 0 - 8 | 8 | eight | 2 | 2 | 0 | - 8 | 8 | eight | 2 | 2 | 1 | -1 - 8 | 8 | eight | 2 | 2 | 2 | 2 - 8 | 8 | eight | 2 | 2 | 2 | 4 - 8 | 8 | eight | 2 | 2 | 3 | -3 - 8 | 8 | eight | 2 | 2 | 5 | -5 - 8 | 8 | eight | 2 | 2 | 5 | -5 - 8 | 8 | eight | 2 | 2 | | 0 - 8 | 8 | eight | 2 | 4 | 0 | - 8 | 8 | eight | 2 | 4 | 1 | -1 - 8 | 8 | eight | 2 | 4 | 2 | 2 - 8 | 8 | eight | 2 | 4 | 2 | 4 - 8 | 8 | eight | 2 | 4 | 3 | -3 - 8 | 8 | eight | 2 | 4 | 5 | -5 - 8 | 8 | eight | 2 | 4 | 5 | -5 - 8 | 8 | eight | 2 | 4 | | 0 - 8 | 8 | eight | 3 | -3 | 0 | - 8 | 8 | eight | 3 | -3 | 1 | -1 - 8 | 8 | eight | 3 | -3 | 2 | 2 - 8 | 8 | eight | 3 | -3 | 2 | 4 - 8 | 8 | eight | 3 | -3 | 3 | -3 - 8 | 8 | eight | 3 | -3 | 5 | -5 - 8 | 8 | eight | 3 | -3 | 5 | -5 - 8 | 8 | eight | 3 | -3 | | 0 - 8 | 8 | eight | 5 | -5 | 0 | - 8 | 8 | eight | 5 | -5 | 0 | - 8 | 8 | eight | 5 | -5 | 1 | -1 - 8 | 8 | eight | 5 | -5 | 1 | -1 - 8 | 8 | eight | 5 | -5 | 2 | 2 - 8 | 8 | eight | 5 | -5 | 2 | 2 - 8 | 8 | eight | 5 | -5 | 2 | 4 - 8 | 8 | eight | 5 | -5 | 2 | 4 - 8 | 8 | eight | 5 | -5 | 3 | -3 - 8 | 8 | eight | 5 | -5 | 3 | -3 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | | 0 - 8 | 8 | eight | 5 | -5 | | 0 - 8 | 8 | eight | | 0 | 0 | - 8 | 8 | eight | | 0 | 1 | -1 - 8 | 8 | eight | | 0 | 2 | 2 - 8 | 8 | eight | | 0 | 2 | 4 - 8 | 8 | eight | | 0 | 3 | -3 - 8 | 8 | eight | | 0 | 5 | -5 - 8 | 8 | eight | | 0 | 5 | -5 - 8 | 8 | eight | | 0 | | 0 - | 0 | zero | 0 | | 0 | - | 0 | zero | 0 | | 1 | -1 - | 0 | zero | 0 | | 2 | 2 - | 0 | zero | 0 | | 2 | 4 - | 0 | zero | 0 | | 3 | -3 - | 0 | zero | 0 | | 5 | -5 - | 0 | zero | 0 | | 5 | -5 - | 0 | zero | 0 | | | 0 - | 0 | zero | 1 | -1 | 0 | - | 0 | zero | 1 | -1 | 1 | -1 - | 0 | zero | 1 | -1 | 2 | 2 - | 0 | zero | 1 | -1 | 2 | 4 - | 0 | zero | 1 | -1 | 3 | -3 - | 0 | zero | 1 | -1 | 5 | -5 - | 0 | zero | 1 | -1 | 5 | -5 - | 0 | zero | 1 | -1 | | 0 - | 0 | zero | 2 | 2 | 0 | - | 0 | zero | 2 | 2 | 1 | -1 - | 0 | zero | 2 | 2 | 2 | 2 - | 0 | zero | 2 | 2 | 2 | 4 - | 0 | zero | 2 | 2 | 3 | -3 - | 0 | zero | 2 | 2 | 5 | -5 - | 0 | zero | 2 | 2 | 5 | -5 - | 0 | zero | 2 | 2 | | 0 - | 0 | zero | 2 | 4 | 0 | - | 0 | zero | 2 | 4 | 1 | -1 - | 0 | zero | 2 | 4 | 2 | 2 - | 0 | zero | 2 | 4 | 2 | 4 - | 0 | zero | 2 | 4 | 3 | -3 - | 0 | zero | 2 | 4 | 5 | -5 - | 0 | zero | 2 | 4 | 5 | -5 - | 0 | zero | 2 | 4 | | 0 - | 0 | zero | 3 | -3 | 0 | - | 0 | zero | 3 | -3 | 1 | -1 - | 0 | zero | 3 | -3 | 2 | 2 - | 0 | zero | 3 | -3 | 2 | 4 - | 0 | zero | 3 | -3 | 3 | -3 - | 0 | zero | 3 | -3 | 5 | -5 - | 0 | zero | 3 | -3 | 5 | -5 - | 0 | zero | 3 | -3 | | 0 - | 0 | zero | 5 | -5 | 0 | - | 0 | zero | 5 | -5 | 0 | - | 0 | zero | 5 | -5 | 1 | -1 - | 0 | zero | 5 | -5 | 1 | -1 - | 0 | zero | 5 | -5 | 2 | 2 - | 0 | zero | 5 | -5 | 2 | 2 - | 0 | zero | 5 | -5 | 2 | 4 - | 0 | zero | 5 | -5 | 2 | 4 - | 0 | zero | 5 | -5 | 3 | -3 - | 0 | zero | 5 | -5 | 3 | -3 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | | 0 - | 0 | zero | 5 | -5 | | 0 - | 0 | zero | | 0 | 0 | - | 0 | zero | | 0 | 1 | -1 - | 0 | zero | | 0 | 2 | 2 - | 0 | zero | | 0 | 2 | 4 - | 0 | zero | | 0 | 3 | -3 - | 0 | zero | | 0 | 5 | -5 - | 0 | zero | | 0 | 5 | -5 - | 0 | zero | | 0 | | 0 - | | null | 0 | | 0 | - | | null | 0 | | 1 | -1 - | | null | 0 | | 2 | 2 - | | null | 0 | | 2 | 4 - | | null | 0 | | 3 | -3 - | | null | 0 | | 5 | -5 - | | null | 0 | | 5 | -5 - | | null | 0 | | | 0 - | | null | 1 | -1 | 0 | - | | null | 1 | -1 | 1 | -1 - | | null | 1 | -1 | 2 | 2 - | | null | 1 | -1 | 2 | 4 - | | null | 1 | -1 | 3 | -3 - | | null | 1 | -1 | 5 | -5 - | | null | 1 | -1 | 5 | -5 - | | null | 1 | -1 | | 0 - | | null | 2 | 2 | 0 | - | | null | 2 | 2 | 1 | -1 - | | null | 2 | 2 | 2 | 2 - | | null | 2 | 2 | 2 | 4 - | | null | 2 | 2 | 3 | -3 - | | null | 2 | 2 | 5 | -5 - | | null | 2 | 2 | 5 | -5 - | | null | 2 | 2 | | 0 - | | null | 2 | 4 | 0 | - | | null | 2 | 4 | 1 | -1 - | | null | 2 | 4 | 2 | 2 - | | null | 2 | 4 | 2 | 4 - | | null | 2 | 4 | 3 | -3 - | | null | 2 | 4 | 5 | -5 - | | null | 2 | 4 | 5 | -5 - | | null | 2 | 4 | | 0 - | | null | 3 | -3 | 0 | - | | null | 3 | -3 | 1 | -1 - | | null | 3 | -3 | 2 | 2 - | | null | 3 | -3 | 2 | 4 - | | null | 3 | -3 | 3 | -3 - | | null | 3 | -3 | 5 | -5 - | | null | 3 | -3 | 5 | -5 - | | null | 3 | -3 | | 0 - | | null | 5 | -5 | 0 | - | | null | 5 | -5 | 0 | - | | null | 5 | -5 | 1 | -1 - | | null | 5 | -5 | 1 | -1 - | | null | 5 | -5 | 2 | 2 - | | null | 5 | -5 | 2 | 2 - | | null | 5 | -5 | 2 | 4 - | | null | 5 | -5 | 2 | 4 - | | null | 5 | -5 | 3 | -3 - | | null | 5 | -5 | 3 | -3 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | | 0 - | | null | 5 | -5 | | 0 - | | null | | 0 | 0 | - | | null | | 0 | 1 | -1 - | | null | | 0 | 2 | 2 - | | null | | 0 | 2 | 4 - | | null | | 0 | 3 | -3 - | | null | | 0 | 5 | -5 - | | null | | 0 | 5 | -5 - | | null | | 0 | | 0 -(704 rows) - --- --- --- Inner joins (equi-joins) --- --- --- --- Inner joins (equi-joins) with USING clause --- The USING syntax changes the shape of the resulting table --- by including a column in the USING clause only once in the result. --- --- Inner equi-join on specified column ---Testcase 45: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL INNER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - --- Same as above, slightly different syntax ---Testcase 46: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - ---Testcase 47: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, d) USING (a) - ORDER BY a, d; - a | b | c | d ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - ---Testcase 48: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, b) USING (b) - ORDER BY b, t1.a; - b | a | c | a ----+---+-------+--- - 0 | 5 | five | - 0 | | zero | - 2 | 3 | three | 2 - 4 | 1 | one | 2 -(4 rows) - --- --- NATURAL JOIN --- Inner equi-join on all columns with the same name --- ---Testcase 49: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL NATURAL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - ---Testcase 50: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) NATURAL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, d); - a | b | c | d ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - ---Testcase 51: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) NATURAL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, a); - a | b | c | d ----+---+------+--- - 0 | | zero | - 2 | 3 | two | 2 - 4 | 1 | four | 2 -(3 rows) - --- mismatch number of columns --- currently, Postgres will fill in with underlying names ---Testcase 52: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) t1 (a, b) NATURAL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) t2 (a); - a | b | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - --- --- Inner joins (equi-joins) --- ---Testcase 53: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint = (J2_TBL.i)::bigint); - i | j | t | i | k ----+---+-------+---+---- - 0 | | zero | 0 | - 1 | 4 | one | 1 | -1 - 2 | 3 | two | 2 | 2 - 2 | 3 | two | 2 | 4 - 3 | 2 | three | 3 | -3 - 5 | 0 | five | 5 | -5 - 5 | 0 | five | 5 | -5 -(7 rows) - ---Testcase 54: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint = (J2_TBL.k)::bigint); - i | j | t | i | k ----+---+------+---+--- - 0 | | zero | | 0 - 2 | 3 | two | 2 | 2 - 4 | 1 | four | 2 | 4 -(3 rows) - --- --- Non-equi-joins --- ---Testcase 55: -SELECT * - FROM (select (fields->>'i')::int i, (fields->>'j')::int j,fields->>'t' t from J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint <= (J2_TBL.k)::bigint) ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; - i | j | t | i | k ----+---+-------+---+--- - 0 | | zero | 2 | 2 - 0 | | zero | 2 | 4 - 0 | | zero | | 0 - 1 | 4 | one | 2 | 2 - 1 | 4 | one | 2 | 4 - 2 | 3 | two | 2 | 2 - 2 | 3 | two | 2 | 4 - 3 | 2 | three | 2 | 4 - 4 | 1 | four | 2 | 4 -(9 rows) - --- --- Outer joins --- Note that OUTER is a noise word --- ---Testcase 56: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j ,fields->>'t' t FROM J1_TBL) J1_TBL LEFT OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) - ORDER BY i, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | null | - | 0 | zero | -(13 rows) - ---Testcase 57: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) - ORDER BY i::int, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | null | - | 0 | zero | -(13 rows) - ---Testcase 58: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL RIGHT OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 - | | | 0 -(8 rows) - ---Testcase 59: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL RIGHT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 - | | | 0 -(8 rows) - ---Testcase 60: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL FULL OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) - ORDER BY i::int, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | | 0 - | | null | - | 0 | zero | -(14 rows) - ---Testcase 61: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL FULL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) - ORDER BY i::int, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | | 0 - | | null | - | 0 | zero | -(14 rows) - ---Testcase 62: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) WHERE (k)::int = 1; - i | j | t | k ----+---+---+--- -(0 rows) - ---Testcase 63: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) WHERE (i)::int = 1; - i | j | t | k ----+---+-----+---- - 1 | 4 | one | -1 -(1 row) - --- --- semijoin selectivity for <> --- ---Testcase 64: -explain (costs off) -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4, (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a -where exists(select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b - where (a.twothousand)::int4 = (b.twothousand)::int4 and (a.fivethous)::int4 <> (b.fivethous)::int4) - and (i4.f1)::int4 = (a.tenthous)::int4; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: ((((a.fields ->> 'tenthous'::text))::integer) = (((i4.fields ->> 'f1'::text))::integer)) - -> Sort - Sort Key: (((a.fields ->> 'tenthous'::text))::integer) - -> Hash Semi Join - Hash Cond: (((a.fields ->> 'twothousand'::text))::integer = ((b.fields ->> 'twothousand'::text))::integer) - Join Filter: (((a.fields ->> 'fivethous'::text))::integer <> ((b.fields ->> 'fivethous'::text))::integer) - -> Foreign Scan on tenk1 a - -> Hash - -> Foreign Scan on tenk1 b - -> Sort - Sort Key: (((i4.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl i4 -(13 rows) - --- --- More complicated constructs --- --- --- Multiway full join --- ---Testcase 65: -CREATE FOREIGN TABLE t1 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t1_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't1'); ---Testcase 66: -CREATE FOREIGN TABLE t2 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t2_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't2'); ---Testcase 67: -CREATE FOREIGN TABLE t3 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t3_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't3'); ---Testcase 68: -INSERT INTO t1_nsc VALUES ( 'bb', 11 ); ---Testcase 69: -INSERT INTO t2_nsc VALUES ( 'bb', 12 ); ---Testcase 70: -INSERT INTO t2_nsc VALUES ( 'cc', 22 ); ---Testcase 71: -INSERT INTO t2_nsc VALUES ( 'ee', 42 ); ---Testcase 72: -INSERT INTO t3_nsc VALUES ( 'bb', 13 ); ---Testcase 73: -INSERT INTO t3_nsc VALUES ( 'cc', 23 ); ---Testcase 74: -INSERT INTO t3_nsc VALUES ( 'dd', 33 ); ---Testcase 75: -SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t1) t1 FULL JOIN (select fields->>'name' "name", (fields->>'n')::int n from t2) t2 USING (name) FULL JOIN (select fields->>'name' "name", (fields->>'n')::int n from t3) t3 USING (name); - name | n | n | n -------+----+----+---- - bb | 11 | 12 | 13 - cc | | 22 | 23 - dd | | | 33 - ee | | 42 | -(4 rows) - --- --- Test interactions of join syntax and subqueries --- --- Basic cases (we expect planner to pull up the subquery here) ---Testcase 76: -SELECT * FROM -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 -INNER JOIN -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 -USING (name); - name | n | n -------+----+---- - bb | 12 | 13 - cc | 22 | 23 -(2 rows) - ---Testcase 77: -SELECT * FROM -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 -LEFT JOIN -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 -USING (name); - name | n | n -------+----+---- - bb | 12 | 13 - cc | 22 | 23 - ee | 42 | -(3 rows) - ---Testcase 78: -SELECT * FROM -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 -FULL JOIN -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 -USING (name); - name | n | n -------+----+---- - bb | 12 | 13 - cc | 22 | 23 - dd | | 33 - ee | 42 | -(4 rows) - --- Cases with non-nullable expressions in subquery results; --- make sure these go to null as expected ---Testcase 79: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL INNER JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; - name | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------ - bb | 12 | 2 | 13 | 3 - cc | 22 | 2 | 23 | 3 -(2 rows) - ---Testcase 80: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL LEFT JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; - name | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------ - bb | 12 | 2 | 13 | 3 - cc | 22 | 2 | 23 | 3 - ee | 42 | 2 | | -(3 rows) - ---Testcase 81: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL FULL JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; - name | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------ - bb | 12 | 2 | 13 | 3 - cc | 22 | 2 | 23 | 3 - dd | | | 33 | 3 - ee | 42 | 2 | | -(4 rows) - ---Testcase 82: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n, 1 as s1_1 FROM t1) as s1 -NATURAL INNER JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL INNER JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; - name | s1_n | s1_1 | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------+------+------ - bb | 11 | 1 | 12 | 2 | 13 | 3 -(1 row) - ---Testcase 83: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n, 1 as s1_1 FROM t1) as s1 -NATURAL FULL JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL FULL JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; - name | s1_n | s1_1 | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------+------+------ - bb | 11 | 1 | 12 | 2 | 13 | 3 - cc | | | 22 | 2 | 23 | 3 - dd | | | | | 33 | 3 - ee | | | 42 | 2 | | -(4 rows) - ---Testcase 84: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 -NATURAL FULL JOIN - (SELECT * FROM - (SELECT fields->>'name' "name", (fields->>'n')::int as s2_n FROM t2) as s2 - NATURAL FULL JOIN - (SELECT fields->>'name' "name", (fields->>'n')::int as s3_n FROM t3) as s3 - ) ss2; - name | s1_n | s2_n | s3_n -------+------+------+------ - bb | 11 | 12 | 13 - cc | | 22 | 23 - dd | | | 33 - ee | | 42 | -(4 rows) - ---Testcase 85: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 -NATURAL FULL JOIN - (SELECT * FROM - (SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 - NATURAL FULL JOIN - (SELECT fields->>'name' "name", (fields->>'n')::int as s3_n FROM t3) as s3 - ) ss2; - name | s1_n | s2_n | s2_2 | s3_n -------+------+------+------+------ - bb | 11 | 12 | 2 | 13 - cc | | 22 | 2 | 23 - dd | | | | 33 - ee | | 42 | 2 | -(4 rows) - --- Constants as join keys can also be problematic ---Testcase 86: -SELECT * FROM - (SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 -FULL JOIN - (SELECT fields->>'name' "name", 2 as s2_n FROM t2) as s2 -ON ((s1_n)::int = (s2_n)::int); -ERROR: FULL JOIN is only supported with merge-joinable or hash-joinable join conditions --- Test for propagation of nullability constraints into sub-joins ---Testcase 87: -create foreign table x (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table x_nsc (x1 int, x2 int) server influxdb_svr OPTIONS (table 'x'); ---Testcase 88: -insert into x_nsc values (1,11); ---Testcase 89: -insert into x_nsc values (2,22); ---Testcase 90: -insert into x_nsc values (3,null); ---Testcase 91: -insert into x_nsc values (4,44); ---Testcase 92: -insert into x_nsc values (5,null); ---Testcase 93: -create foreign table y (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table y_nsc (y1 int, y2 int) server influxdb_svr OPTIONS (table 'y'); ---Testcase 94: -insert into y_nsc values (1,111); ---Testcase 95: -insert into y_nsc values (2,222); ---Testcase 96: -insert into y_nsc values (3,333); ---Testcase 97: -insert into y_nsc values (4,null); ---Testcase 98: -select * from x; - fields -------------------------- - {"x1": "1", "x2": "11"} - {"x1": "2", "x2": "22"} - {"x1": "3", "x2": null} - {"x1": "4", "x2": "44"} - {"x1": "5", "x2": null} -(5 rows) - ---Testcase 99: -select * from y; - fields --------------------------- - {"y1": "1", "y2": "111"} - {"y1": "2", "y2": "222"} - {"y1": "3", "y2": "333"} - {"y1": "4", "y2": null} -(4 rows) - ---Testcase 100: -select * from (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int and x2 is not null); - x1 | x2 | y1 | y2 -----+----+----+----- - 1 | 11 | 1 | 111 - 2 | 22 | 2 | 222 - 3 | | | - 4 | 44 | 4 | - 5 | | | -(5 rows) - ---Testcase 101: -select * from (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int and y2 is not null); - x1 | x2 | y1 | y2 -----+----+----+----- - 1 | 11 | 1 | 111 - 2 | 22 | 2 | 222 - 3 | | 3 | 333 - 4 | 44 | | - 5 | | | -(5 rows) - ---Testcase 102: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | 3 | - 4 | 44 | 4 | | 4 | 44 - 5 | | | | 5 | -(5 rows) - ---Testcase 103: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int and x2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | | - 4 | 44 | 4 | | 4 | 44 - 5 | | | | | -(5 rows) - ---Testcase 104: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int and y2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | 3 | - 4 | 44 | 4 | | | - 5 | | | | | -(5 rows) - ---Testcase 105: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int and xx2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | | - 4 | 44 | 4 | | 4 | 44 - 5 | | | | | -(5 rows) - --- these should NOT give the same answers as above ---Testcase 106: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int) where (x2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 4 | 44 | 4 | | 4 | 44 -(3 rows) - ---Testcase 107: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int) where (y2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | 3 | -(3 rows) - ---Testcase 108: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int) where (xx2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 4 | 44 | 4 | | 4 | 44 -(3 rows) - --- --- regression test: check for bug with propagation of implied equality --- to outside an IN --- ---Testcase 109: -select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a where unique1 in - (select unique1 from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) c using (unique1) - where b.unique2::int4 = 42); - count -------- - 1 -(1 row) - --- --- regression test: check for failure to generate a plan with multiple --- degenerate IN clauses --- ---Testcase 110: -select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) x where - (x.unique1)::int4 in (select (a.fields->>'f1')::int4 from int4_tbl a,float8_tbl b where (a.fields->>'f1')::int4=(b.fields->>'f1')::float8) and - (x.unique1)::int4 = 0 and - (x.unique1)::int4 in (select (aa.fields->>'f1')::int4 from int4_tbl aa,float8_tbl bb where (aa.fields->>'f1')::int4=(bb.fields->>'f1')::float8); - count -------- - 1 -(1 row) - --- try that with GEQO too -begin; ---Testcase 111: -set geqo = on; ---Testcase 112: -set geqo_threshold = 2; ---Testcase 113: -select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) x where - (x.unique1)::int4 in (select a.f1 from (select (fields->>'f1')::int4 f1 from INT4_TBL) a,(select (fields->>'f1')::float8 f1 from FLOAT8_TBL) b where a.f1::int4=b.f1::float8) and - (x.unique1)::int4 = 0 and - (x.unique1)::int4 in (select aa.f1 from (select (fields->>'f1')::int4 f1 from INT4_TBL) aa,(select (fields->>'f1')::float8 f1 from FLOAT8_TBL) bb where aa.f1::int4=bb.f1::float8); - count -------- - 1 -(1 row) - -rollback; --- --- regression test: be sure we cope with proven-dummy append rels --- ---Testcase 114: -create table b (aa int, bb int); ---Testcase 115: -explain (costs off) -select aa, bb, tenk1.unique1::int, tenk1.unique1::int - from (select (fields->>'unique1')::int unique1, fields->>'unique2' unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1) tenk1 right join b on aa = tenk1.unique1::int - where bb < bb and bb is null; - QUERY PLAN ---------------------------------------------------------------------- - Hash Right Join - Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = b.aa) - -> Foreign Scan on tenk1 - -> Hash - -> Seq Scan on b - Filter: ((bb IS NULL) AND (bb < bb)) -(6 rows) - ---Testcase 116: -select aa, bb, tenk1.unique1::int, tenk1.unique1::int - from (select (fields->>'unique1')::int unique1, fields->>'unique2' unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1) tenk1 right join b on aa = tenk1.unique1::int - where bb < bb and bb is null; - aa | bb | unique1 | unique1 -----+----+---------+--------- -(0 rows) - ---Testcase 117: -drop table b; --- --- regression test: check handling of empty-FROM subquery underneath outer join --- ---Testcase 118: -explain (costs off) -select (i1.fields->>'q1')::int8 q1, (i1.fields->>'q2')::int8 q2, (i2.fields->>'q1')::int8 q1, (i2.fields->>'q2')::int8 q2, x from int8_tbl i1 left join (int8_tbl i2 join - (select 123 as x) ss on (i2.fields->>'q1')::int8 = x) on (i1.fields->>'q2')::int8 = (i2.fields->>'q2')::int8 -order by 1, 2; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Sort - Sort Key: (((i1.fields ->> 'q1'::text))::bigint), (((i1.fields ->> 'q2'::text))::bigint) - -> Hash Left Join - Hash Cond: (((i1.fields ->> 'q2'::text))::bigint = ((i2.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on int8_tbl i1 - -> Hash - -> Hash Join - Hash Cond: (((i2.fields ->> 'q1'::text))::bigint = (123)) - -> Foreign Scan on int8_tbl i2 - -> Hash - -> Result -(11 rows) - ---Testcase 119: -select (i1.fields->>'q1')::int8 q1, (i1.fields->>'q2')::int8 q2, (i2.fields->>'q1')::int8 q1, (i2.fields->>'q2')::int8 q2, x from int8_tbl i1 left join (int8_tbl i2 join - (select 123 as x) ss on (i2.fields->>'q1')::int8 = x) on (i1.fields->>'q2')::int8= (i2.fields->>'q2')::int8 -order by 1, 2; - q1 | q2 | q1 | q2 | x -------------------+-------------------+-----+------------------+----- - 123 | 456 | 123 | 456 | 123 - 123 | 4567890123456789 | 123 | 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 | | | - 4567890123456789 | 123 | | | - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 123 -(5 rows) - --- --- regression test: check a case where join_clause_is_movable_into() gives --- an imprecise result, causing an assertion failure --- ---Testcase 120: -select count(*) -from - (select (t3.fields->>'tenthous')::int4 as x1, coalesce((t1.fields->>'stringu1')::name, (t2.fields->>'stringu1')::name) as x2 - from tenk1 t1 - left join tenk1 t2 on (t1.fields->>'unique1')::int4 = (t2.fields->>'unique1')::int4 - join tenk1 t3 on (t1.fields->>'unique2')::int4 = (t3.fields->>'unique2')::int4) ss, - tenk1 t4, - tenk1 t5 -where (t4.fields->>'thousand')::int4 = (t5.fields->>'unique1')::int4 and ss.x1 = (t4.fields->>'tenthous')::int4 and ss.x2 = (t5.fields->>'stringu1')::name; - count -------- - 1000 -(1 row) - --- --- regression test: check a case where we formerly missed including an EC --- enforcement clause because it was expected to be handled at scan level --- ---Testcase 121: -explain (costs off) -select a.f1, b.f1, (t.fields->>'thousand')::int4 thousand, (t.fields->>'tenhous')::int4 tenthous from - tenk1 t, - (select sum((fields->>'f1')::int4)+1 as f1 from int4_tbl i4a) a, - (select sum((fields->>'f1')::int4) as f1 from int4_tbl i4b) b -where b.f1 = (t.fields->>'thousand')::int4 and a.f1 = b.f1 and (a.f1+b.f1+999) = (t.fields->>'tenthous')::int4; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Hash Join - Hash Cond: (((sum(((i4a.fields ->> 'f1'::text))::integer) + 1)) = (sum(((i4b.fields ->> 'f1'::text))::integer))) - Join Filter: (((((sum(((i4a.fields ->> 'f1'::text))::integer) + 1)) + (sum(((i4b.fields ->> 'f1'::text))::integer))) + 999) = ((t.fields ->> 'tenthous'::text))::integer) - -> Hash Join - Hash Cond: (((t.fields ->> 'thousand'::text))::integer = ((sum(((i4a.fields ->> 'f1'::text))::integer) + 1))) - -> Foreign Scan on tenk1 t - -> Hash - -> Foreign Scan - -> Hash - -> Foreign Scan -(10 rows) - ---Testcase 122: -select a.f1, b.f1, (t.fields->>'thousand')::int4 thousand, (t.fields->>'tenhous')::int4 tenthous from - tenk1 t, - (select sum((fields->>'f1')::int4)+1 as f1 from int4_tbl i4a) a, - (select sum((fields->>'f1')::int4) as f1 from int4_tbl i4b) b -where b.f1 = (t.fields->>'thousand')::int4 and a.f1 = b.f1 and (a.f1+b.f1+999) = (t.fields->>'tenthous')::int4; - f1 | f1 | thousand | tenthous -----+----+----------+---------- -(0 rows) - --- --- check a case where we formerly got confused by conflicting sort orders --- in redundant merge join path keys --- ---Testcase 123: -explain (costs off) -select * from - (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL j1_tbl) j1_tbl full join - (select * from (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL j2_tbl) j2_tbl order by (j2_tbl.i)::int desc, (j2_tbl.k)::int asc) j2_tbl - on (j1_tbl.i)::int = (j2_tbl.i)::int and (j1_tbl.i)::int = (j2_tbl.k)::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Full Join - Merge Cond: (((((j2_tbl.fields ->> 'i'::text))::integer) = (((j1_tbl.fields ->> 'i'::text))::integer)) AND ((((j2_tbl.fields ->> 'k'::text))::integer) = (((j1_tbl.fields ->> 'i'::text))::integer))) - -> Sort - Sort Key: (((j2_tbl.fields ->> 'i'::text))::integer) DESC, (((j2_tbl.fields ->> 'k'::text))::integer) - -> Foreign Scan on j2_tbl - -> Sort - Sort Key: (((j1_tbl.fields ->> 'i'::text))::integer) DESC - -> Foreign Scan on j1_tbl -(8 rows) - ---Testcase 124: -select * from - (select (fields->>'i')::int i, (fields->>'j')::int j,fields->>'t' t from J1_TBL j1_tbl) j1_tbl full join - (select * from (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL j2_tbl) j2_tbl order by (j2_tbl.i)::int desc, (j2_tbl.k)::int asc) j2_tbl - on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; - i | j | t | i | k ----+---+-------+---+---- - | | | | 0 - | 0 | zero | | - | | null | | - 8 | 8 | eight | | - 7 | 7 | seven | | - 6 | 6 | six | | - | | | 5 | -5 - | | | 5 | -5 - 5 | 0 | five | | - 4 | 1 | four | | - | | | 3 | -3 - 3 | 2 | three | | - 2 | 3 | two | 2 | 2 - | | | 2 | 4 - | | | 1 | -1 - | | | 0 | - 1 | 4 | one | | - 0 | | zero | | -(18 rows) - --- --- a different check for handling of redundant sort keys in merge joins --- ---Testcase 125: -explain (costs off) -select count(*) from - (select * from tenk1 x order by (x.fields->>'thousand')::int4, (x.fields->>'twothousand')::int4, (x.fields->>'fivethous')::int4) x - left join - (select * from tenk1 y order by (y.fields->>'unique2')::int4) y - on (x.fields->>'thousand')::int4 = (y.fields->>'unique2')::int4 and (x.fields->>'twothousand')::int4 = (y.fields->>'hundred')::int4 and (x.fields->>'fivethous')::int4 = (y.fields->>'unique2')::int4; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate - -> Merge Left Join - Merge Cond: (((((x.fields ->> 'thousand'::text))::integer) = (((y.fields ->> 'unique2'::text))::integer)) AND ((((x.fields ->> 'twothousand'::text))::integer) = (((y.fields ->> 'hundred'::text))::integer)) AND ((((x.fields ->> 'fivethous'::text))::integer) = (((y.fields ->> 'unique2'::text))::integer))) - -> Sort - Sort Key: (((x.fields ->> 'thousand'::text))::integer), (((x.fields ->> 'twothousand'::text))::integer), (((x.fields ->> 'fivethous'::text))::integer) - -> Subquery Scan on x - -> Sort - Sort Key: (((x_1.fields ->> 'thousand'::text))::integer), (((x_1.fields ->> 'twothousand'::text))::integer), (((x_1.fields ->> 'fivethous'::text))::integer) - -> Foreign Scan on tenk1 x_1 - -> Sort - Sort Key: (((y.fields ->> 'unique2'::text))::integer), (((y.fields ->> 'hundred'::text))::integer) - -> Subquery Scan on y - -> Sort - Sort Key: (((y_1.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 y_1 -(15 rows) - ---Testcase 126: -select count(*) from - (select * from tenk1 x order by (x.fields->>'thousand')::int4, (x.fields->>'twothousand')::int4, (x.fields->>'fivethous')::int4) x - left join - (select * from tenk1 y order by (y.fields->>'unique2')::int4) y - on (x.fields->>'thousand')::int4 = (y.fields->>'unique2')::int4 and (x.fields->>'twothousand')::int4 = (y.fields->>'hundred')::int4 and (x.fields->>'fivethous')::int4 = (y.fields->>'unique2')::int4; - count -------- - 10000 -(1 row) - --- --- Clean up --- ---Testcase 127: -DELETE FROM t1_nsc; ---Testcase 128: -DELETE FROM t2_nsc; ---Testcase 129: -DELETE FROM t3_nsc; ---Testcase 130: -DROP FOREIGN TABLE t1; -DROP FOREIGN TABLE t1_nsc; ---Testcase 131: -DROP FOREIGN TABLE t2; -DROP FOREIGN TABLE t2_nsc; ---Testcase 132: -DROP FOREIGN TABLE t3; -DROP FOREIGN TABLE t3_nsc; ---Testcase 133: -DELETE FROM j1_tbl_nsc; -DROP FOREIGN TABLE J1_TBL; -DROP FOREIGN TABLE j1_tbl_nsc; ---Testcase 134: -DELETE FROM j2_tbl_nsc; -DROP FOREIGN TABLE J2_TBL; -DROP FOREIGN TABLE j2_tbl_nsc; -DELETE FROM x_nsc; -DELETE FROM y_nsc; -DROP FOREIGN TABLE x_nsc; -DROP FOREIGN TABLE y_nsc; --- Both DELETE and UPDATE allow the specification of additional tables --- to "join" against to determine which rows should be modified. ---Testcase 135: -CREATE FOREIGN TABLE t1 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t1_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 't1'); ---Testcase 136: -CREATE FOREIGN TABLE t2 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t2_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 't2'); ---Testcase 137: -CREATE FOREIGN TABLE t3 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t3_nsc (x int, y int) SERVER influxdb_svr OPTIONS (table 't3'); ---Testcase 138: -INSERT INTO t1_nsc VALUES (5, 10); ---Testcase 139: -INSERT INTO t1_nsc VALUES (15, 20); ---Testcase 140: -INSERT INTO t1_nsc VALUES (100, 100); ---Testcase 141: -INSERT INTO t1_nsc VALUES (200, 1000); ---Testcase 142: -INSERT INTO t2_nsc VALUES (200, 2000); ---Testcase 143: -INSERT INTO t3_nsc VALUES (5, 20); ---Testcase 144: -INSERT INTO t3_nsc VALUES (6, 7); ---Testcase 145: -INSERT INTO t3_nsc VALUES (7, 8); ---Testcase 146: -INSERT INTO t3_nsc VALUES (500, 100); ---Testcase 147: -ALTER TABLE t3 ADD time timestamp; -ALTER TABLE t3_nsc ADD time timestamp; ---Testcase 148: -SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; - x | y ------+----- - 5 | 20 - 6 | 7 - 7 | 8 - 500 | 100 -(4 rows) - ---Testcase 149: -DELETE FROM t3_nsc USING t1_nsc table1 WHERE t3_nsc.x = table1.a; ---Testcase 150: -SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; - x | y ------+----- - 6 | 7 - 7 | 8 - 500 | 100 -(3 rows) - ---Testcase 151: -DELETE FROM t3_nsc USING t1_nsc JOIN t2_nsc USING (a) WHERE t3_nsc.x > t1_nsc.a; ---Testcase 152: -SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; - x | y ----+--- - 6 | 7 - 7 | 8 -(2 rows) - ---Testcase 153: -DELETE FROM t3_nsc USING t3_nsc t3_other WHERE t3_nsc.x = t3_other.x AND t3_nsc.y = t3_other.y; ---Testcase 154: -SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; - x | y ----+--- -(0 rows) - --- Test join against inheritance tree ---Testcase 155: -create temp table t2a () inherits (t2); ---Testcase 156: -insert into t2a values ('{"a": "200", "b": "2001"}'); ---Testcase 157: -select * from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 left join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int); - a | b | a | b ------+------+-----+------ - 5 | 10 | | - 15 | 20 | | - 100 | 100 | | - 200 | 1000 | 200 | 2000 - 200 | 1000 | 200 | 2001 -(5 rows) - --- Test matching of column name with wrong alias ---Testcase 158: -select t1.x from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'x')::int x, (fields->>'y')::int y from t3) t3 on (t1.a::int = t3.x::int); -ERROR: column t1.x does not exist -LINE 1: select t1.x from (select (fields->>'a')::int a, (fields->>'b... - ^ -HINT: Perhaps you meant to reference the column "t3.x". --- --- regression test for 8.1 merge right join bug --- ---Testcase 159: -CREATE FOREIGN TABLE tt1 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE tt1_nsc ( tt1_id int4, joincol int4 ) SERVER influxdb_svr OPTIONS (table 'tt1'); ---Testcase 160: -INSERT INTO tt1_nsc VALUES (1, 11); ---Testcase 161: -INSERT INTO tt1_nsc VALUES (2, NULL); ---Testcase 162: -CREATE FOREIGN TABLE tt2 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE tt2_nsc ( tt2_id int4, joincol int4 ) SERVER influxdb_svr OPTIONS (table 'tt2'); ---Testcase 163: -INSERT INTO tt2_nsc VALUES (21, 11); ---Testcase 164: -INSERT INTO tt2_nsc VALUES (22, 11); ---Testcase 165: -set enable_hashjoin to off; ---Testcase 166: -set enable_nestloop to off; --- these should give the same results ---Testcase 167: -select tt1.*, tt2.* from (select (fields->>'tt1_id')::int4 tt1_id, (fields->>'joincol')::int4 joincol from tt1) tt1 left join (select (fields->>'tt2_id')::int4 tt2_id, (fields->>'joincol')::int4 joincol from tt2) tt2 on tt1.joincol::int4 = tt2.joincol::int4; - tt1_id | joincol | tt2_id | joincol ---------+---------+--------+--------- - 1 | 11 | 21 | 11 - 1 | 11 | 22 | 11 - 2 | | | -(3 rows) - ---Testcase 168: -select tt1.*, tt2.* from (select (fields->>'tt2_id')::int4 tt2_id, (fields->>'joincol')::int4 joincol from tt2) tt2 right join (select (fields->>'tt1_id')::int4 tt1_id, (fields->>'joincol')::int4 joincol from tt1) tt1 on tt1.joincol::int4 = tt2.joincol::int4; - tt1_id | joincol | tt2_id | joincol ---------+---------+--------+--------- - 1 | 11 | 21 | 11 - 1 | 11 | 22 | 11 - 2 | | | -(3 rows) - ---Testcase 169: -reset enable_hashjoin; ---Testcase 170: -reset enable_nestloop; --- --- regression test for bug #13908 (hash join with skew tuples & nbatch increase) --- ---Testcase 171: -set work_mem to '64kB'; ---Testcase 172: -set enable_mergejoin to off; ---Testcase 173: -explain (costs off) -select count(*) from tenk1 a, tenk1 b - where ((a.fields->>'hundred')::int4 = (b.fields->>'thousand')::int4) and ((b.fields->>'fivethous')::int4 % 10) < 10; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Aggregate - -> Hash Join - Hash Cond: (((a.fields ->> 'hundred'::text))::integer = ((b.fields ->> 'thousand'::text))::integer) - -> Foreign Scan on tenk1 a - -> Hash - -> Foreign Scan on tenk1 b -(6 rows) - ---Testcase 174: -select count(*) from tenk1 a, tenk1 b - where ((a.fields->>'hundred')::int4 = (b.fields->>'thousand')::int4) and ((b.fields->>'fivethous')::int4 % 10) < 10; - count --------- - 100000 -(1 row) - ---Testcase 175: -reset work_mem; ---Testcase 176: -reset enable_mergejoin; --- --- regression test for 8.2 bug with improper re-ordering of left joins --- ---Testcase 177: -create foreign table tt3(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table tt3_nsc(f1 int, f2 text) server influxdb_svr OPTIONS (table 'tt3'); ---Testcase 178: -insert into tt3_nsc select x, repeat('xyzzy', 100) from generate_series(1,10000) x; ---Testcase 179: -create foreign table tt4(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table tt4_nsc(f1 int) server influxdb_svr OPTIONS (table 'tt4'); ---Testcase 180: -insert into tt4_nsc values (0),(1),(9999); ---Testcase 181: -SELECT (a.fields->>'f1')::int f1 -FROM tt4 a -LEFT JOIN ( - SELECT (b.fields->>'f1')::int f1 - FROM tt3 b LEFT JOIN tt3 c ON ((b.fields->>'f1')::int = (c.fields->>'f1')::int) - WHERE c.fields->>'f1' IS NULL -) AS d ON ((a.fields->>'f1')::int = (d.f1)::int) -WHERE d.f1 IS NULL; - f1 ------- - 0 - 1 - 9999 -(3 rows) - --- --- regression test for proper handling of outer joins within antijoins --- ---Testcase 182: -create foreign table tt4x(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 183: -explain (costs off) -select * from tt4x t1 -where not exists ( - select 1 from tt4x t2 - left join tt4x t3 on (t2.fields->>'c3')::int = (t3.fields->>'c1')::int - left join ( select (t5.fields->>'c1')::int as c1 - from tt4x t4 left join tt4x t5 on (t4.fields->>'c2')::int = (t5.fields->>'c1')::int - ) a1 on (t3.fields->>'c2')::int = a1.c1 - where (t1.fields->>'c1')::int = (t2.fields->>'c2')::int -); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------- - Hash Anti Join - Hash Cond: (((t1.fields ->> 'c1'::text))::integer = ((t2.fields ->> 'c2'::text))::integer) - -> Foreign Scan on tt4x t1 - -> Hash - -> Merge Right Join - Merge Cond: (((t5.fields ->> 'c1'::text))::integer = (((t3.fields ->> 'c2'::text))::integer)) - -> Merge Join - Merge Cond: ((((t4.fields ->> 'c2'::text))::integer) = (((t5.fields ->> 'c1'::text))::integer)) - -> Sort - Sort Key: (((t4.fields ->> 'c2'::text))::integer) - -> Foreign Scan on tt4x t4 - -> Sort - Sort Key: (((t5.fields ->> 'c1'::text))::integer) - -> Foreign Scan on tt4x t5 - -> Sort - Sort Key: (((t3.fields ->> 'c2'::text))::integer) - -> Merge Left Join - Merge Cond: ((((t2.fields ->> 'c3'::text))::integer) = (((t3.fields ->> 'c1'::text))::integer)) - -> Sort - Sort Key: (((t2.fields ->> 'c3'::text))::integer) - -> Foreign Scan on tt4x t2 - -> Sort - Sort Key: (((t3.fields ->> 'c1'::text))::integer) - -> Foreign Scan on tt4x t3 -(24 rows) - --- --- regression test for problems of the sort depicted in bug #3494 --- ---Testcase 184: -create foreign table tt5(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table tt5_nsc(f1 int, f2 int) server influxdb_svr OPTIONS (table 'tt5'); ---Testcase 185: -create foreign table tt6(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table tt6_nsc(f1 int, f2 int) server influxdb_svr OPTIONS (table 'tt6'); ---Testcase 186: -insert into tt5_nsc values(1, 10); ---Testcase 187: -insert into tt5_nsc values(1, 11); ---Testcase 188: -insert into tt6_nsc values(1, 9); ---Testcase 189: -insert into tt6_nsc values(1, 2); ---Testcase 190: -insert into tt6_nsc values(2, 9); ---Testcase 191: -select * from (select (fields->>'f1')::int f1, (fields->>'f2')::int f2 from tt5) tt5,(select (fields->>'f1')::int f1, (fields->>'f2')::int f2 from tt6) tt6 where (tt5.f1)::int = (tt6.f1)::int and (tt5.f1)::int = (tt5.f2)::int - (tt6.f2)::int; - f1 | f2 | f1 | f2 -----+----+----+---- - 1 | 10 | 1 | 9 -(1 row) - --- --- regression test for problems of the sort depicted in bug #3588 --- ---Testcase 192: -create foreign table xx (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table xx_nsc (pkxx int) server influxdb_svr OPTIONS (table 'xx'); ---Testcase 193: -create foreign table yy (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table yy_nsc (pkyy int, pkxx int) server influxdb_svr OPTIONS (table 'yy'); ---Testcase 194: -insert into xx_nsc values (1); ---Testcase 195: -insert into xx_nsc values (2); ---Testcase 196: -insert into xx_nsc values (3); ---Testcase 197: -insert into yy_nsc values (101, 1); ---Testcase 198: -insert into yy_nsc values (201, 2); ---Testcase 199: -insert into yy_nsc values (301, NULL); ---Testcase 200: -select (yy.fields->>'pkyy')::int as yy_pkyy, (yy.fields->>'pkxx')::int as yy_pkxx, (yya.fields->>'pkyy')::int as yya_pkyy, - (xxa.fields->>'pkxx')::int as xxa_pkxx, (xxb.fields->>'pkxx')::int as xxb_pkxx -from yy - left join (SELECT * FROM yy where (fields->>'pkyy')::int = 101) as yya ON (yy.fields->>'pkyy')::int = (yya.fields->>'pkyy')::int - left join xx xxa on (yya.fields->>'pkxx')::int = (xxa.fields->>'pkxx')::int - left join xx xxb on coalesce ((xxa.fields->>'pkxx')::int, 1) = (xxb.fields->>'pkxx')::int ORDER BY yy_pkyy, yy_pkxx, yya_pkyy, xxa_pkxx, xxb_pkxx; - yy_pkyy | yy_pkxx | yya_pkyy | xxa_pkxx | xxb_pkxx ----------+---------+----------+----------+---------- - 101 | 1 | 101 | 1 | 1 - 201 | 2 | | | 1 - 301 | | | | 1 -(3 rows) - --- --- regression test for improper pushing of constants across outer-join clauses --- (as seen in early 8.2.x releases) --- ---Testcase 201: -create foreign table zt1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table zt1_nsc (f1 int) server influxdb_svr OPTIONS (table 'zt1'); ---Testcase 202: -create foreign table zt2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table zt2_nsc (f2 int) server influxdb_svr OPTIONS (table 'zt2'); ---Testcase 203: -create foreign table zt3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 204: -insert into zt1_nsc values(53); ---Testcase 205: -insert into zt2_nsc values(53); ---Testcase 206: -select * from - (select (fields->>'f2')::int f2 from zt2) zt2 left join (select (fields->>'f3')::int f3 from zt3) zt3 on (f2::int = f3::int) - left join (select (fields->>'f1')::int f1 from zt1) zt1 on (f3::int = f1::int) -where (f2)::int = 53; - f2 | f3 | f1 -----+----+---- - 53 | | -(1 row) - ---Testcase 207: -create temp view zv1 as select *,'dummy'::text AS junk from zt1; ---Testcase 208: -select * from - (select (fields->>'f2')::int f2 from zt2) zt2 left join (select (fields->>'f3')::int f3 from zt3) zt3 on (f2::int = f3::int) - left join zv1 on (f3::int = (zv1.fields->>'f1')::int) -where (f2)::int = 53; - f2 | f3 | fields | junk -----+----+--------+------ - 53 | | | -(1 row) - --- --- regression test for improper extraction of OR indexqual conditions --- (as seen in early 8.3.x releases) --- ---Testcase 209: -select a.unique2, a.ten, b.tenthous, b.unique2, b.hundred -from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b on a.unique2 = b.tenthous -where (a.unique1)::int4 = 42 and - ((b.unique2 is null and (a.ten)::int4 = 2) or (b.hundred)::int4 = 3); - unique2 | ten | tenthous | unique2 | hundred ----------+-----+----------+---------+--------- -(0 rows) - --- --- test proper positioning of one-time quals in EXISTS (8.4devel bug) --- ---Testcase 210: -prepare foo(bool) as - select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b - on ((a.unique2)::int4 = (b.unique1)::int4 and exists - (select 1 from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) c where (c.thousand)::int4 = (b.unique2)::int4 and $1)); ---Testcase 211: -execute foo(true); - count -------- - 10000 -(1 row) - ---Testcase 212: -execute foo(false); - count -------- - 10000 -(1 row) - --- --- test for sane behavior with noncanonical merge clauses, per bug #4926 --- -begin; ---Testcase 213: -set enable_mergejoin = 1; ---Testcase 214: -set enable_hashjoin = 0; ---Testcase 215: -set enable_nestloop = 0; ---Testcase 216: -create foreign table a (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 217: -create foreign table b (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 218: -select * from (select (fields->>'i')::int i from a) a left join (select (fields->>'x')::int x, (fields->>'y')::int y from b) b on i::int = x::int and i::int = y::int and x::int = i::int; - i | x | y ----+---+--- -(0 rows) - ---Testcase 219: -DROP FOREIGN TABLE a; ---Testcase 220: -DROP FOREIGN TABLE b; -rollback; --- --- test handling of merge clauses using record_ops --- -begin; ---Testcase 221: -create type mycomptype as (id int, v bigint); ---Testcase 222: -create temp table tidv (idv mycomptype); ---Testcase 223: -create index on tidv (idv); ---Testcase 224: -explain (costs off) -select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; - QUERY PLAN ----------------------------------------------------------- - Merge Join - Merge Cond: (a.idv = b.idv) - -> Index Only Scan using tidv_idv_idx on tidv a - -> Materialize - -> Index Only Scan using tidv_idv_idx on tidv b -(5 rows) - ---Testcase 225: -set enable_mergejoin = 0; ---Testcase 226: -set enable_hashjoin = 0; ---Testcase 227: -explain (costs off) -select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; - QUERY PLAN ----------------------------------------------------- - Nested Loop - -> Seq Scan on tidv a - -> Index Only Scan using tidv_idv_idx on tidv b - Index Cond: (idv = a.idv) -(4 rows) - -rollback; --- --- test NULL behavior of whole-row Vars, per bug #5025 --- ---Testcase 228: -select t1.q2, count(t2.*) -from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1 left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 on (t1.q2 = t2.q1) -group by t1.q2 order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - ---Testcase 229: -select (t1.fields->>'q2')::int8 q2, count(t2.*) -from int8_tbl t1 left join (select * from int8_tbl) t2 on ((t1.fields->>'q2')::int8 = (t2.fields->>'q1')::int8) -group by t1.fields->>'q2' order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - ---Testcase 230: -select (t1.fields->>'q2')::int8 q2, count(t2.*) -from int8_tbl t1 left join (select * from int8_tbl offset 0) t2 on ((t1.fields->>'q2')::int8 = (t2.fields->>'q1')::int8) -group by t1.fields->>'q2' order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - ---Testcase 231: -select (t1.fields->>'q2')::int8 q2, count(t2.*) -from int8_tbl t1 left join - (select (fields->>'q1')::int8 q1, case when (fields->>'q2')::int8=1 then 1 else (fields->>'q2')::int8 end as q2 from int8_tbl) t2 - on ((t1.fields->>'q2')::int8 = t2.q1) -group by t1.fields->>'q2' order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - --- --- test incorrect failure to NULL pulled-up subexpressions --- -begin; ---Testcase 232: -create foreign table a ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table a_nsc ( - code char -) server influxdb_svr OPTIONS (table 'a'); ---Testcase 233: -create foreign table b ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table b_nsc ( - a char, - num integer -) server influxdb_svr OPTIONS (table 'b'); ---Testcase 234: -create foreign table c ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table c_nsc ( - name char, - a char -) server influxdb_svr OPTIONS (table 'c'); ---Testcase 235: -insert into a_nsc (code) values ('p'); ---Testcase 236: -insert into a_nsc (code) values ('q'); ---Testcase 237: -insert into b_nsc (a, num) values ('p', 1); ---Testcase 238: -insert into b_nsc (a, num) values ('p', 2); ---Testcase 239: -insert into c_nsc (name, a) values ('A', 'p'); ---Testcase 240: -insert into c_nsc (name, a) values ('B', 'q'); ---Testcase 241: -insert into c_nsc (name, a) values ('C', null); ---Testcase 242: -select c.name, ss.code, ss.b_cnt, ss.const -from (select fields->>'name' "name", fields->>'a' a from c) c left join - (select a.code, coalesce(b_grp.cnt, 0) as b_cnt, -1 as const - from (select fields->>'code' code from a) a left join - (select count(1) as cnt, b.fields->>'a' a from b group by b.fields->>'a') as b_grp - on a.code = b_grp.a - ) as ss - on (c.a = ss.code) -order by c.name; - name | code | b_cnt | const -------+------+-------+------- - A | p | 2 | -1 - B | q | 0 | -1 - C | | | -(3 rows) - ---Testcase 243: -DELETE FROM a_nsc; ---Testcase 244: -DELETE FROM b_nsc; ---Testcase 245: -DELETE FROM c_nsc; ---Testcase 246: -DROP FOREIGN TABLE a; -DROP FOREIGN TABLE a_nsc; ---Testcase 247: -DROP FOREIGN TABLE b; -DROP FOREIGN TABLE b_nsc; ---Testcase 248: -DROP FOREIGN TABLE c; -DROP FOREIGN TABLE c_nsc; -rollback; --- --- test incorrect handling of placeholders that only appear in targetlists, --- per bug #6154 --- ---Testcase 249: -SELECT * FROM -( SELECT 1 as key1 ) sub1 -LEFT JOIN -( SELECT sub3.key3, sub4.value2, COALESCE(sub4.value2, 66) as value3 FROM - ( SELECT 1 as key3 ) sub3 - LEFT JOIN - ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM - ( SELECT 1 as key5 ) sub5 - LEFT JOIN - ( SELECT 2 as key6, 42 as value1 ) sub6 - ON sub5.key5 = sub6.key6 - ) sub4 - ON sub4.key5 = sub3.key3 -) sub2 -ON sub1.key1 = sub2.key3; - key1 | key3 | value2 | value3 -------+------+--------+-------- - 1 | 1 | 1 | 1 -(1 row) - --- test the path using join aliases, too ---Testcase 250: -SELECT * FROM -( SELECT 1 as key1 ) sub1 -LEFT JOIN -( SELECT sub3.key3, value2, COALESCE(value2, 66) as value3 FROM - ( SELECT 1 as key3 ) sub3 - LEFT JOIN - ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM - ( SELECT 1 as key5 ) sub5 - LEFT JOIN - ( SELECT 2 as key6, 42 as value1 ) sub6 - ON sub5.key5 = sub6.key6 - ) sub4 - ON sub4.key5 = sub3.key3 -) sub2 -ON sub1.key1 = sub2.key3; - key1 | key3 | value2 | value3 -------+------+--------+-------- - 1 | 1 | 1 | 1 -(1 row) - --- --- test case where a PlaceHolderVar is used as a nestloop parameter --- ---Testcase 251: -EXPLAIN (COSTS OFF) -SELECT qq, (fields->>'unique1')::int4 unique1 - FROM - ( SELECT COALESCE((fields->>'q1')::int8, 0) AS qq FROM int8_tbl a ) AS ss1 - FULL OUTER JOIN - ( SELECT COALESCE((fields->>'q2')::int8, -1) AS qq FROM int8_tbl b ) AS ss2 - USING (qq) - INNER JOIN tenk1 c ON qq = (fields->>'unique2')::int4; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: ((((c.fields ->> 'unique2'::text))::integer) = (COALESCE((COALESCE(((a.fields ->> 'q1'::text))::bigint, '0'::bigint)), (COALESCE(((b.fields ->> 'q2'::text))::bigint, '-1'::bigint))))) - -> Sort - Sort Key: (((c.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 c - -> Sort - Sort Key: (COALESCE((COALESCE(((a.fields ->> 'q1'::text))::bigint, '0'::bigint)), (COALESCE(((b.fields ->> 'q2'::text))::bigint, '-1'::bigint)))) - -> Merge Full Join - Merge Cond: ((COALESCE(((a.fields ->> 'q1'::text))::bigint, '0'::bigint)) = (COALESCE(((b.fields ->> 'q2'::text))::bigint, '-1'::bigint))) - -> Sort - Sort Key: (COALESCE(((a.fields ->> 'q1'::text))::bigint, '0'::bigint)) - -> Foreign Scan on int8_tbl a - -> Sort - Sort Key: (COALESCE(((b.fields ->> 'q2'::text))::bigint, '-1'::bigint)) - -> Foreign Scan on int8_tbl b -(15 rows) - ---Testcase 252: -SELECT qq, (fields->>'unique1')::int4 unique1 - FROM - ( SELECT COALESCE((fields->>'q1')::int8, 0) AS qq FROM int8_tbl a ) AS ss1 - FULL OUTER JOIN - ( SELECT COALESCE((fields->>'q2')::int8, -1) AS qq FROM int8_tbl b ) AS ss2 - USING (qq) - INNER JOIN tenk1 c ON qq = (fields->>'unique2')::int4; - qq | unique1 ------+--------- - 123 | 4596 - 123 | 4596 - 456 | 7318 -(3 rows) - --- --- nested nestloops can require nested PlaceHolderVars --- ---Testcase 253: -create foreign table nt1 ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table nt1_nsc ( - id int, - a1 boolean, - a2 boolean -) server influxdb_svr OPTIONS (table 'nt1'); ---Testcase 254: -create foreign table nt2 ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table nt2_nsc ( - id int, - nt1_id int, - b1 boolean, - b2 boolean -) server influxdb_svr OPTIONS (table 'nt2'); ---Testcase 255: -create foreign table nt3 ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table nt3_nsc ( - id int, - nt2_id int, - c1 boolean -) server influxdb_svr OPTIONS (table 'nt3'); ---Testcase 256: -insert into nt1_nsc values (1,true,true); ---Testcase 257: -insert into nt1_nsc values (2,true,false); ---Testcase 258: -insert into nt1_nsc values (3,false,false); ---Testcase 259: -insert into nt2_nsc values (1,1,true,true); ---Testcase 260: -insert into nt2_nsc values (2,2,true,false); ---Testcase 261: -insert into nt2_nsc values (3,3,false,false); ---Testcase 262: -insert into nt3_nsc values (1,1,true); ---Testcase 263: -insert into nt3_nsc values (2,2,false); ---Testcase 264: -insert into nt3_nsc values (3,3,true); ---Testcase 265: -explain (costs off) -select (nt3.fields->>'id')::int id -from nt3 as nt3 - left join - (select (nt2.fields->>'id')::int id, (nt2.fields->>'nt1_id')::int nt1_id, (nt2.fields->>'b1')::boolean b1, (nt2.fields->>'b2')::boolean b2, ((nt2.fields->>'b1')::boolean and ss1.a3) AS b3 - from nt2 as nt2 - left join - (select (nt1.fields->>'id')::int id, (nt1.fields->>'a1')::boolean a1, (nt1.fields->>'a2')::boolean a2, ((nt1.fields->>'id')::int is not null) as a3 from nt1) as ss1 - on ss1.id = (nt2.fields->>'nt1_id')::int - ) as ss2 - on ss2.id = (nt3.fields->>'nt2_id')::int -where (nt3.fields->>'id')::int = 1 and ss2.b3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------- - Hash Join - Hash Cond: (((nt2.fields ->> 'nt1_id'::text))::integer = ((nt1.fields ->> 'id'::text))::integer) - Join Filter: (((nt2.fields ->> 'b1'::text))::boolean AND ((((nt1.fields ->> 'id'::text))::integer IS NOT NULL))) - -> Hash Join - Hash Cond: (((nt2.fields ->> 'id'::text))::integer = ((nt3.fields ->> 'nt2_id'::text))::integer) - -> Foreign Scan on nt2 - -> Hash - -> Foreign Scan on nt3 - -> Hash - -> Foreign Scan on nt1 -(10 rows) - ---Testcase 266: -select (nt3.fields->>'id')::int id -from nt3 as nt3 - left join - (select (nt2.fields->>'id')::int id, (nt2.fields->>'nt1_id')::int nt1_id, (nt2.fields->>'b1')::boolean b1, (nt2.fields->>'b2')::boolean b2, ((nt2.fields->>'b1')::boolean and ss1.a3) AS b3 - from nt2 as nt2 - left join - (select (nt1.fields->>'id')::int id, (nt1.fields->>'a1')::boolean a1, (nt1.fields->>'a2')::boolean a2, ((nt1.fields->>'id')::int is not null) as a3 from nt1) as ss1 - on ss1.id = (nt2.fields->>'nt1_id')::int - ) as ss2 - on ss2.id = (nt3.fields->>'nt2_id')::int -where (nt3.fields->>'id')::int = 1 and ss2.b3; - id ----- - 1 -(1 row) - --- --- test case where a PlaceHolderVar is propagated into a subquery --- ---Testcase 267: -explain (costs off) -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t1) t1 left join - (select q1 as x, 42 as y from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t2) t2) ss - on (t1.q2)::int8 = (ss.x)::int8 -where - 1 = (select 1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t3) t3 where ss.y is not null limit 1) -order by 1,2; - QUERY PLAN -------------------------------------------------------------------------------------------------------- - Sort - Sort Key: (((t1.fields ->> 'q1'::text))::bigint), (((t1.fields ->> 'q2'::text))::bigint) - -> Merge Right Join - Merge Cond: ((((t2.fields ->> 'q1'::text))::bigint) = (((t1.fields ->> 'q2'::text))::bigint)) - Filter: (1 = (SubPlan 1)) - -> Sort - Sort Key: (((t2.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on int8_tbl t2 - -> Sort - Sort Key: (((t1.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on int8_tbl t1 - SubPlan 1 - -> Limit - -> Result - One-Time Filter: ((42) IS NOT NULL) - -> Foreign Scan on int8_tbl t3 -(16 rows) - ---Testcase 268: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t1) t1 left join - (select q1 as x, 42 as y from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t2) t2) ss - on (t1.q2)::int8 = (ss.x)::int8 -where - 1 = (select 1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t3) t3 where ss.y is not null limit 1) -order by 1,2; - q1 | q2 | x | y -------------------+------------------+------------------+---- - 123 | 4567890123456789 | 4567890123456789 | 42 - 123 | 4567890123456789 | 4567890123456789 | 42 - 123 | 4567890123456789 | 4567890123456789 | 42 - 4567890123456789 | 123 | 123 | 42 - 4567890123456789 | 123 | 123 | 42 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 -(8 rows) - --- --- variant where a PlaceHolderVar is needed at a join, but not above the join --- ---Testcase 269: -explain (costs off) -select * from - (select (fields->>'f1')::int4 f1 from INT4_TBL i41) as i41, - lateral - (select 1 as x from - (select i41.f1 as lat, - i42.f1 as loc from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i81) as i81, (select (fields->>'f1')::int4 f1 from INT4_TBL i42) as i42) as ss1 - right join (select (fields->>'f1')::int4 f1 from INT4_TBL i43) as i43 on (i43.f1 > 1) - where ss1.loc = ss1.lat) as ss2 -where i41.f1 > 0; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Nested Loop - -> Nested Loop - -> Foreign Scan on int4_tbl i41 - -> Nested Loop - Join Filter: (((i41.fields ->> 'f1'::text))::integer = ((i42.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int8_tbl i81 - -> Materialize - -> Foreign Scan on int4_tbl i42 - -> Materialize - -> Foreign Scan on int4_tbl i43 -(10 rows) - ---Testcase 270: -select * from - (select (fields->>'f1')::int4 f1 from INT4_TBL i41) as i41, - lateral - (select 1 as x from - (select i41.f1 as lat, - i42.f1 as loc from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i81) as i81, (select (fields->>'f1')::int4 f1 from INT4_TBL i42) as i42) as ss1 - right join (select (fields->>'f1')::int4 f1 from INT4_TBL i43) as i43 on (i43.f1 > 1) - where ss1.loc = ss1.lat) as ss2 -where i41.f1 > 0; - f1 | x -------------+--- - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 -(20 rows) - --- --- test the corner cases FULL JOIN ON TRUE and FULL JOIN ON FALSE --- ---Testcase 271: -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) a full join (select (fields->>'f1')::int4 f1 from INT4_TBL) b on true; - f1 | f1 --------------+------------- - 0 | 0 - 0 | 123456 - 0 | -123456 - 0 | 2147483647 - 0 | -2147483647 - 123456 | 0 - 123456 | 123456 - 123456 | -123456 - 123456 | 2147483647 - 123456 | -2147483647 - -123456 | 0 - -123456 | 123456 - -123456 | -123456 - -123456 | 2147483647 - -123456 | -2147483647 - 2147483647 | 0 - 2147483647 | 123456 - 2147483647 | -123456 - 2147483647 | 2147483647 - 2147483647 | -2147483647 - -2147483647 | 0 - -2147483647 | 123456 - -2147483647 | -123456 - -2147483647 | 2147483647 - -2147483647 | -2147483647 -(25 rows) - ---Testcase 272: -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) a full join (select (fields->>'f1')::int4 f1 from INT4_TBL) b on false; - f1 | f1 --------------+------------- - | 0 - | 123456 - | -123456 - | 2147483647 - | -2147483647 - 0 | - 123456 | - -123456 | - 2147483647 | - -2147483647 | -(10 rows) - --- --- test for ability to use a cartesian join when necessary --- ---Testcase 273: -create foreign table q1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 274: -create foreign table q2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 275: -explain (costs off) -select * from - (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (f1)::int = (twothousand)::int, - (select (fields->>'q1')::int q1 from q1) q1, (select (fields->>'q2')::int q2 from q2) q2 -where (q1)::int = thousand::int or (q2)::int = thousand::int; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: ((((int4_tbl.fields ->> 'f1'::text))::integer) = (((tenk1.fields ->> 'twothousand'::text))::integer)) - -> Sort - Sort Key: (((int4_tbl.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl - -> Materialize - -> Sort - Sort Key: (((tenk1.fields ->> 'twothousand'::text))::integer) - -> Nested Loop - Join Filter: ((((q1.fields ->> 'q1'::text))::integer = ((tenk1.fields ->> 'thousand'::text))::integer) OR (((q2.fields ->> 'q2'::text))::integer = ((tenk1.fields ->> 'thousand'::text))::integer)) - -> Nested Loop - -> Foreign Scan on tenk1 - -> Materialize - -> Foreign Scan on q1 - -> Materialize - -> Foreign Scan on q2 -(16 rows) - ---Testcase 276: -explain (costs off) -select * from - (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (f1)::int = (twothousand)::int, - (select (fields->>'q1')::int q1 from q1) q1, (select (fields->>'q2')::int q2 from q2) q2 -where (thousand)::int = ((q1)::int + (q2)::int); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: ((((tenk1.fields ->> 'thousand'::text))::integer) = ((((q1.fields ->> 'q1'::text))::integer + ((q2.fields ->> 'q2'::text))::integer))) - -> Sort - Sort Key: (((tenk1.fields ->> 'thousand'::text))::integer) - -> Merge Join - Merge Cond: ((((tenk1.fields ->> 'twothousand'::text))::integer) = (((int4_tbl.fields ->> 'f1'::text))::integer)) - -> Sort - Sort Key: (((tenk1.fields ->> 'twothousand'::text))::integer) - -> Foreign Scan on tenk1 - -> Sort - Sort Key: (((int4_tbl.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl - -> Materialize - -> Sort - Sort Key: ((((q1.fields ->> 'q1'::text))::integer + ((q2.fields ->> 'q2'::text))::integer)) - -> Nested Loop - -> Foreign Scan on q1 - -> Materialize - -> Foreign Scan on q2 -(19 rows) - --- --- test ability to generate a suitable plan for a star-schema query --- ---Testcase 277: -explain (costs off) -select * from - (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 tenk1) tenk1, (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b -where thousand::int4 = a.q1::int8 and tenthous::int4 = b.q1::int8 and a.q2::int8 = 1 and b.q2::int8 = 2; - QUERY PLAN ------------------------------------------------------------------------------------------------------------ - Hash Join - Hash Cond: (((tenk1.fields ->> 'tenthous'::text))::integer = ((b.fields ->> 'q1'::text))::bigint) - -> Hash Join - Hash Cond: (((tenk1.fields ->> 'thousand'::text))::integer = ((a.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on tenk1 - -> Hash - -> Foreign Scan on int8_tbl a - -> Hash - -> Foreign Scan on int8_tbl b -(9 rows) - --- --- test a corner case in which we shouldn't apply the star-schema optimization --- ---Testcase 278: -explain (costs off) -select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (select 1,0 from onerow) v1(x1,x2) - left join (select 3,1 from onerow) v2(y1,y2) - on (v1.x1)::int4 = (v2.y2)::int4) subq1 - on ((i1.fields->>'f1')::int4 = (subq1.x2)::int4) - on ((t1.fields->>'unique2')::int4 = (subq1.d1)::int4) - left join tenk1 t2 - on ((subq1.y1)::int4 = (t2.fields->>'unique1')::int4) -where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > t2.fields->>'stringu2'; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: ((((t2.fields ->> 'unique1'::text))::integer) = (3)) - Join Filter: ((((t1.fields ->> 'stringu1'::text))::name)::text > (t2.fields ->> 'stringu2'::text)) - -> Sort - Sort Key: (((t2.fields ->> 'unique1'::text))::integer) - -> Foreign Scan on tenk1 t2 - -> Sort - Sort Key: (3) - -> Merge Join - Merge Cond: ((((t1.fields ->> 'unique2'::text))::integer) = (11)) - -> Sort - Sort Key: (((t1.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 t1 - -> Sort - Sort Key: (11) - -> Nested Loop Left Join - Join Filter: (((i1.fields ->> 'f1'::text))::integer = 0) - -> Foreign Scan on int4_tbl i1 - -> Materialize - -> Nested Loop Left Join - -> Seq Scan on onerow - -> Seq Scan on onerow onerow_1 -(22 rows) - ---Testcase 279: -select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (select 1,0 from onerow) v1(x1,x2) - left join (select 3,1 from onerow) v2(y1,y2) - on (v1.x1)::int4 = (v2.y2)::int4) subq1 - on ((i1.fields->>'f1')::int4 = (subq1.x2)::int4) - on ((t1.fields->>'unique2')::int4 = (subq1.d1)::int4) - left join tenk1 t2 - on ((subq1.y1)::int4 = (t2.fields->>'unique1')::int4) -where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > t2.fields->>'stringu2'; - unique2 | stringu1 | unique1 | stringu2 ----------+----------+---------+---------- - 11 | WFAAAA | 3 | LKIAAA -(1 row) - --- variant that isn't quite a star-schema case ---Testcase 280: -select ss1.d1 from - tenk1 as t1 - inner join tenk1 as t2 - on (t1.fields->>'tenthous')::int4 = (t2.fields->>'ten')::int4 - inner join - int8_tbl as i8 - left join int4_tbl as i4 - inner join (select 64::information_schema.cardinal_number as d1 - from tenk1 t3, - lateral (select abs((t3.fields->>'unique1')::int4) + random()) ss0(x) - where (t3.fields->>'fivethous')::int4 < 0) as ss1 - on (i4.fields->>'f1')::int4 = ss1.d1 - on (i8.fields->>'q1')::int8 = (i4.fields->>'f1')::int4 - on (t1.fields->>'tenthous')::int4 = ss1.d1 -where (t1.fields->>'unique1')::int4 < (i4.fields->>'f1')::int4; - d1 ----- -(0 rows) - --- this variant is foldable by the remove-useless-RESULT-RTEs code ---Testcase 281: -explain (costs off) -select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (values(1,0)) v1(x1,x2) - left join (values(3,1)) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on ((i1.fields->>'f1')::int4 = subq1.x2) - on ((t1.fields->>'unique2')::int4 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = (t2.fields->>'unique1')::int4) -where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > (t2.fields->>'stringu2')::name; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Hash Join - Hash Cond: ((11) = ((t1.fields ->> 'unique2'::text))::integer) - Join Filter: (((t1.fields ->> 'stringu1'::text))::name > ((t2.fields ->> 'stringu2'::text))::name) - -> Nested Loop - Join Filter: ((1) = v2.y2) - -> Hash Join - Hash Cond: (((i1.fields ->> 'f1'::text))::integer = (0)) - -> Foreign Scan on int4_tbl i1 - -> Hash - -> Result - -> Materialize - -> Hash Join - Hash Cond: (((t2.fields ->> 'unique1'::text))::integer = v2.y1) - -> Foreign Scan on tenk1 t2 - -> Hash - -> Subquery Scan on v2 - -> Result - -> Hash - -> Foreign Scan on tenk1 t1 -(19 rows) - ---Testcase 282: -select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (values(1,0)) v1(x1,x2) - left join (values(3,1)) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on ((i1.fields->>'f1')::int4 = subq1.x2) - on ((t1.fields->>'unique2')::int4 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = (t2.fields->>'unique1')::int4) -where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > (t2.fields->>'stringu2')::name; - unique2 | stringu1 | unique1 | stringu2 ----------+----------+---------+---------- - 11 | WFAAAA | 3 | LKIAAA -(1 row) - --- Here's a variant that we can't fold too aggressively, though, --- or we end up with noplace to evaluate the lateral PHV ---Testcase 283: -explain (verbose, costs off) -select * from - (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), - lateral (select ss2.y as z limit 1) ss3; - QUERY PLAN ------------------------------ - Nested Loop - Output: (1), (2), ((2)) - -> Nested Loop Left Join - Output: (1), (2) - -> Result - Output: 1 - -> Result - Output: 2 - -> Limit - Output: ((2)) - -> Result - Output: (2) -(12 rows) - ---Testcase 284: -select * from - (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), - lateral (select ss2.y as z limit 1) ss3; - x | y | z ----+---+--- - 1 | 2 | 2 -(1 row) - --- Test proper handling of appendrel PHVs during useless-RTE removal ---Testcase 285: -explain (costs off) -select * from - (select 0 as z) as t1 - left join - (select true as a) as t2 - on true, - lateral (select true as b - union all - select a as b) as t3 -where b; - QUERY PLAN ---------------------------------------- - Nested Loop - -> Nested Loop Left Join - -> Result - -> Result - -> Append - -> Result - -> Result - One-Time Filter: (true) -(8 rows) - ---Testcase 286: -select * from - (select 0 as z) as t1 - left join - (select true as a) as t2 - on true, - lateral (select true as b - union all - select a as b) as t3 -where b; - z | a | b ----+---+--- - 0 | t | t - 0 | t | t -(2 rows) - --- --- test inlining of immutable functions --- ---Testcase 287: -create function f_immutable_int4(i integer) returns integer as -$$ begin return i; end; $$ language plpgsql immutable; --- check optimization of function scan with join ---Testcase 288: -explain (costs off) -select (fields->>'unique1')::int4 unique1 from tenk1, (select * from f_immutable_int4(1) x) x -where x = (fields->>'unique1')::int4; - QUERY PLAN --------------------------------------------------------------------- - Hash Join - Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 289: -explain (verbose, costs off) -select (fields->>'unique1')::int4 unique1, x.* -from tenk1, (select *, random() from f_immutable_int4(1) x) x -where x = (fields->>'unique1')::int4; - QUERY PLAN --------------------------------------------------------------------------- - Hash Join - Output: ((tenk1.fields ->> 'unique1'::text))::integer, x.x, (random()) - Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = x.x) - -> Foreign Scan on public.tenk1 - Output: tenk1.fields - InfluxDB query: SELECT * FROM "tenk" - -> Hash - Output: x.x, (random()) - -> Function Scan on x - Output: x.x, random() - Function Call: 1 -(11 rows) - ---Testcase 290: -explain (costs off) -select (fields->>'unique1')::int4 unique1 from tenk1, f_immutable_int4(1) x where x = (fields->>'unique1')::int4; - QUERY PLAN --------------------------------------------------------------------- - Hash Join - Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 291: -explain (costs off) -select (fields->>'unique1')::int4 unique1 from tenk1, lateral f_immutable_int4(1) x where x = (fields->>'unique1')::int4; - QUERY PLAN --------------------------------------------------------------------- - Hash Join - Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 292: -explain (costs off) -select (fields->>'unique1')::int4 unique1, x from tenk1 join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; - QUERY PLAN --------------------------------------------------------------------- - Hash Join - Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 293: -explain (costs off) -select (fields->>'unique1')::int4 unique1, x from tenk1 left join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; - QUERY PLAN --------------------------------------------------------------------- - Hash Left Join - Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 294: -explain (costs off) -select (fields->>'unique1')::int4 unique1, x from tenk1 right join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; - QUERY PLAN --------------------------------------------------------------------- - Hash Right Join - Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - ---Testcase 295: -explain (costs off) -select (fields->>'unique1')::int4 unique1, x from tenk1 full join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; - QUERY PLAN --------------------------------------------------------------------- - Hash Full Join - Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = x.x) - -> Foreign Scan on tenk1 - -> Hash - -> Function Scan on x -(5 rows) - --- check that pullup of a const function allows further const-folding ---Testcase 296: -explain (costs off) -select (fields->>'unique1')::int4 unique1 from tenk1, f_immutable_int4(1) x where x = 42; - QUERY PLAN ------------------------------ - Nested Loop - -> Function Scan on x - Filter: (x = 42) - -> Foreign Scan on tenk1 -(4 rows) - --- test inlining of immutable functions with PlaceHolderVars ---Testcase 297: -explain (costs off) -select (nt3.fields->>'id')::int id -from nt3 as nt3 - left join - (select nt2.*, ((nt2.fields->>'b1')::boolean or i4 = 42) AS b3 - from nt2 as nt2 - left join - f_immutable_int4(0) i4 - on i4 = (nt2.fields->>'nt1_id')::int - ) as ss2 - on (ss2.fields->>'id')::int = (nt3.fields->>'nt2_id')::int -where (nt3.fields->>'id')::int = 1 and (ss2.b3)::boolean; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Hash Right Join - Hash Cond: (((nt2.fields ->> 'id'::text))::integer = ((nt3.fields ->> 'nt2_id'::text))::integer) - Filter: ((((nt2.fields ->> 'b1'::text))::boolean OR (i4.i4 = 42))) - -> Hash Left Join - Hash Cond: (((nt2.fields ->> 'nt1_id'::text))::integer = i4.i4) - -> Foreign Scan on nt2 - -> Hash - -> Function Scan on i4 - -> Hash - -> Foreign Scan on nt3 -(10 rows) - ---Testcase 298: -drop function f_immutable_int4(int); --- test inlining when function returns composite ---Testcase 299: -create function mki8(bigint, bigint) returns int8_tbl as -$$select row('{"q1" : ' || cast($1 as text) || ', "q2" : ' || cast($2 as text) || '}')::int8_tbl$$ language sql; ---Testcase 300: -create function mki4(int) returns int4_tbl as -$$select row('{"f1" : ' || cast($1 as text) || '}')::int4_tbl$$ language sql; ---Testcase 301: -explain (verbose, costs off) -select * from mki8(1, 2); - QUERY PLAN -------------------------------------------------------------- - Function Scan on mki8 - Output: fields - Function Call: ROW('{"q1": 1, "q2": 2}'::jsonb)::int8_tbl -(3 rows) - ---Testcase 302: -select * from mki8(1, 2); - fields --------------------- - {"q1": 1, "q2": 2} -(1 row) - ---Testcase 303: -explain (verbose, costs off) -select * from mki4(42); - QUERY PLAN ------------------------------------------------------ - Function Scan on mki4 - Output: fields - Function Call: ROW('{"f1": 42}'::jsonb)::int4_tbl -(3 rows) - ---Testcase 304: -select * from mki4(42); - fields ------------- - {"f1": 42} -(1 row) - ---Testcase 305: -drop function mki8(bigint, bigint); ---Testcase 306: -drop function mki4(int); --- --- test extraction of restriction OR clauses from join OR clause --- (we used to only do this for indexable clauses) --- ---Testcase 307: -explain (costs off) -select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on - ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or ((a.unique2)::int4 = 3 and (b.hundred)::int4 = 4); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: (((((a.fields ->> 'unique1'::text))::integer = 1) AND (((b.fields ->> 'unique1'::text))::integer = 2)) OR ((((a.fields ->> 'unique2'::text))::integer = 3) AND (((b.fields ->> 'hundred'::text))::integer = 4))) - -> Foreign Scan on tenk1 a - -> Materialize - -> Foreign Scan on tenk1 b -(5 rows) - ---Testcase 308: -explain (costs off) -select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on - ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or ((a.unique2)::int4 = 3 and (b.ten)::int4 = 4); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Nested Loop - Join Filter: (((((a.fields ->> 'unique1'::text))::integer = 1) AND (((b.fields ->> 'unique1'::text))::integer = 2)) OR ((((a.fields ->> 'unique2'::text))::integer = 3) AND (((b.fields ->> 'ten'::text))::integer = 4))) - -> Foreign Scan on tenk1 a - -> Materialize - -> Foreign Scan on tenk1 b -(5 rows) - ---Testcase 309: -explain (costs off) -select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on - ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or - (((a.unique2)::int4 = 3 or (a.unique2)::int4 = 7) and (b.hundred)::int4 = 4); - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: (((((a.fields ->> 'unique1'::text))::integer = 1) AND (((b.fields ->> 'unique1'::text))::integer = 2)) OR (((((a.fields ->> 'unique2'::text))::integer = 3) OR (((a.fields ->> 'unique2'::text))::integer = 7)) AND (((b.fields ->> 'hundred'::text))::integer = 4))) - -> Foreign Scan on tenk1 a - -> Materialize - -> Foreign Scan on tenk1 b -(5 rows) - --- --- test placement of movable quals in a parameterized join tree --- ---Testcase 310: -explain (costs off) -select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t1) t1 left join - ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t2) t2 join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t3) t3 on (t2.thousand)::int4 = (t3.unique2)::int4) - on (t1.hundred)::int4 = (t2.hundred)::int4 and (t1.ten)::int4 = (t3.ten)::int4 -where (t1.unique1)::int4 = 1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Hash Right Join - Hash Cond: ((((t2.fields ->> 'hundred'::text))::integer = ((t1.fields ->> 'hundred'::text))::integer) AND (((t3.fields ->> 'ten'::text))::integer = ((t1.fields ->> 'ten'::text))::integer)) - -> Merge Join - Merge Cond: ((((t2.fields ->> 'thousand'::text))::integer) = (((t3.fields ->> 'unique2'::text))::integer)) - -> Sort - Sort Key: (((t2.fields ->> 'thousand'::text))::integer) - -> Foreign Scan on tenk1 t2 - -> Sort - Sort Key: (((t3.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 t3 - -> Hash - -> Foreign Scan on tenk1 t1 -(12 rows) - ---Testcase 311: -explain (costs off) -select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t1) t1 left join - ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t2) t2 join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t3) t3 on (t2.thousand)::int4 = (t3.unique2)::int4) - on (t1.hundred)::int4 = (t2.hundred)::int4 and (t1.ten)::int4 + (t2.ten)::int4 = (t3.ten)::int4 -where (t1.unique1)::int4 = 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Hash Right Join - Hash Cond: (((t2.fields ->> 'hundred'::text))::integer = ((t1.fields ->> 'hundred'::text))::integer) - Join Filter: ((((t1.fields ->> 'ten'::text))::integer + ((t2.fields ->> 'ten'::text))::integer) = ((t3.fields ->> 'ten'::text))::integer) - -> Merge Join - Merge Cond: ((((t2.fields ->> 'thousand'::text))::integer) = (((t3.fields ->> 'unique2'::text))::integer)) - -> Sort - Sort Key: (((t2.fields ->> 'thousand'::text))::integer) - -> Foreign Scan on tenk1 t2 - -> Sort - Sort Key: (((t3.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 t3 - -> Hash - -> Foreign Scan on tenk1 t1 -(13 rows) - ---Testcase 312: -explain (costs off) -select count(*) from - (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (a.unique1)::int4 = (b.unique2)::int4 - left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 c) c on (a.unique2)::int4 = (b.unique1)::int4 and (c.thousand)::int4 = (a.thousand)::int4 - join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (b.thousand)::int4 = (f1)::int4; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Aggregate - -> Merge Join - Merge Cond: ((((int4_tbl.fields ->> 'f1'::text))::integer) = (((b.fields ->> 'thousand'::text))::integer)) - -> Sort - Sort Key: (((int4_tbl.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl - -> Sort - Sort Key: (((b.fields ->> 'thousand'::text))::integer) - -> Merge Left Join - Merge Cond: ((((a.fields ->> 'thousand'::text))::integer) = (((c.fields ->> 'thousand'::text))::integer)) - Join Filter: (((a.fields ->> 'unique2'::text))::integer = ((b.fields ->> 'unique1'::text))::integer) - -> Sort - Sort Key: (((a.fields ->> 'thousand'::text))::integer) - -> Merge Join - Merge Cond: ((((a.fields ->> 'unique1'::text))::integer) = (((b.fields ->> 'unique2'::text))::integer)) - -> Sort - Sort Key: (((a.fields ->> 'unique1'::text))::integer) - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: (((b.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 b - -> Sort - Sort Key: (((c.fields ->> 'thousand'::text))::integer) - -> Foreign Scan on tenk1 c -(24 rows) - ---Testcase 313: -select count(*) from - (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (a.unique1)::int4 = (b.unique2)::int4 - left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 c) c on (a.unique2)::int4 = (b.unique1)::int4 and (c.thousand)::int4 = (a.thousand)::int4 - join int4_tbl on (b.thousand)::int4 = (fields->>'f1')::int4; - count -------- - 10 -(1 row) - ---Testcase 314: -explain (costs off) -select (b.fields->>'unique1')::int4 unique1 from - tenk1 a join tenk1 b on (a.fields->>'unique1')::int4 = (b.fields->>'unique2')::int4 - left join tenk1 c on (b.fields->>'unique1')::int4 = 42 and (c.fields->>'thousand')::int4 = (a.fields->>'thousand')::int4 - join (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1 on (b.fields->>'thousand')::int4 = (f1)::int4 - right join int4_tbl i2 on (i2.fields->>'f1')::int4 = (b.fields->>'tenthous')::int4 - order by 1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------ - Sort - Sort Key: (((b.fields ->> 'unique1'::text))::integer) - -> Merge Left Join - Merge Cond: ((((i2.fields ->> 'f1'::text))::integer) = (((b.fields ->> 'tenthous'::text))::integer)) - -> Sort - Sort Key: (((i2.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl i2 - -> Materialize - -> Sort - Sort Key: (((b.fields ->> 'tenthous'::text))::integer) - -> Merge Join - Merge Cond: ((((i1.fields ->> 'f1'::text))::integer) = (((b.fields ->> 'thousand'::text))::integer)) - -> Sort - Sort Key: (((i1.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl i1 - -> Sort - Sort Key: (((b.fields ->> 'thousand'::text))::integer) - -> Merge Left Join - Merge Cond: ((((a.fields ->> 'thousand'::text))::integer) = (((c.fields ->> 'thousand'::text))::integer)) - Join Filter: (((b.fields ->> 'unique1'::text))::integer = 42) - -> Sort - Sort Key: (((a.fields ->> 'thousand'::text))::integer) - -> Merge Join - Merge Cond: ((((a.fields ->> 'unique1'::text))::integer) = (((b.fields ->> 'unique2'::text))::integer)) - -> Sort - Sort Key: (((a.fields ->> 'unique1'::text))::integer) - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: (((b.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 b - -> Sort - Sort Key: (((c.fields ->> 'thousand'::text))::integer) - -> Foreign Scan on tenk1 c -(33 rows) - ---Testcase 315: -select (b.fields->>'unique1')::int4 unique1 from - tenk1 a join tenk1 b on (a.fields->>'unique1')::int4 = (b.fields->>'unique2')::int4 - left join tenk1 c on (b.fields->>'unique1')::int4 = 42 and (c.fields->>'thousand')::int4 = (a.fields->>'thousand')::int4 - join (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1 on (b.fields->>'thousand')::int4 = (f1)::int4 - right join int4_tbl i2 on (i2.fields->>'f1')::int4 = (b.fields->>'tenthous')::int4 - order by 1; - unique1 ---------- - 0 - - - - -(5 rows) - ---Testcase 316: -explain (costs off) -select * from -( - select unique1, q1, coalesce((unique1)::int4, -1) + (q1)::int8 as fault - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 on ((q2)::int8 = (unique2)::int4) -) ss -where fault = 122 -order by fault; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Merge Left Join - Merge Cond: ((((int8_tbl.fields ->> 'q2'::text))::bigint) = (((tenk1.fields ->> 'unique2'::text))::integer)) - Filter: ((COALESCE(((tenk1.fields ->> 'unique1'::text))::integer, '-1'::integer) + ((int8_tbl.fields ->> 'q1'::text))::bigint) = 122) - -> Sort - Sort Key: (((int8_tbl.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on int8_tbl - -> Sort - Sort Key: (((tenk1.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 -(9 rows) - ---Testcase 317: -select * from -( - select unique1, q1, coalesce((unique1)::int4, -1) + (q1)::int8 as fault - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 on ((q2)::int8 = (unique2)::int4) -) ss -where fault = 122 -order by fault; - unique1 | q1 | fault ----------+-----+------- - | 123 | 122 -(1 row) - ---Testcase 318: -explain (costs off) -select * from -(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) -left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x -left join unnest(v1ys) as u1(u1y) on u1y = v2y; - QUERY PLAN -------------------------------------------------------------- - Nested Loop Left Join - -> Values Scan on "*VALUES*" - -> Hash Right Join - Hash Cond: (u1.u1y = "*VALUES*_1".column2) - Filter: ("*VALUES*_1".column1 = "*VALUES*".column1) - -> Function Scan on unnest u1 - -> Hash - -> Values Scan on "*VALUES*_1" -(8 rows) - ---Testcase 319: -select * from -(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) -left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x -left join unnest(v1ys) as u1(u1y) on u1y = v2y; - v1x | v1ys | v2x | v2y | u1y ------+---------+-----+-----+----- - 1 | {10,20} | 1 | 10 | 10 - 2 | {20,30} | 2 | 20 | 20 -(2 rows) - --- --- test handling of potential equivalence clauses above outer joins --- ---Testcase 320: -explain (costs off) -select q1, unique2, thousand, hundred - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (q1)::int8 = (unique2)::int4 - where coalesce((thousand)::int4,123) = (q1)::int8 and (q1)::int8 = coalesce((hundred)::int4,123); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Left Join - Merge Cond: ((((a.fields ->> 'q1'::text))::bigint) = (((b.fields ->> 'unique2'::text))::integer)) - Filter: ((COALESCE(((b.fields ->> 'thousand'::text))::integer, 123) = (((a.fields ->> 'q1'::text))::bigint)) AND ((((a.fields ->> 'q1'::text))::bigint) = COALESCE(((b.fields ->> 'hundred'::text))::integer, 123))) - -> Sort - Sort Key: (((a.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on int8_tbl a - -> Sort - Sort Key: (((b.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 b -(9 rows) - ---Testcase 321: -select q1, unique2, thousand, hundred - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (q1)::int8 = (unique2)::int4 - where coalesce((thousand)::int4,123) = (q1)::int8 and (q1)::int8 = coalesce((hundred)::int4,123); - q1 | unique2 | thousand | hundred -----+---------+----------+--------- -(0 rows) - ---Testcase 322: -explain (costs off) -select f1, unique2, case when (unique2)::int4 is null then (f1)::int4 else 0 end - from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 - where (case when (unique2)::int4 is null then (f1)::int4 else 0 end) = 0; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- - Merge Left Join - Merge Cond: ((((a.fields ->> 'f1'::text))::integer) = (((b.fields ->> 'unique2'::text))::integer)) - Filter: (CASE WHEN (((b.fields ->> 'unique2'::text))::integer IS NULL) THEN (((a.fields ->> 'f1'::text))::integer) ELSE 0 END = 0) - -> Sort - Sort Key: (((a.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl a - -> Sort - Sort Key: (((b.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 b -(9 rows) - ---Testcase 323: -select f1, unique2, case when (unique2)::int4 is null then (f1)::int4 else 0 end - from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 - where (case when (unique2)::int4 is null then (f1)::int4 else 0 end) = 0; - f1 | unique2 | case -----+---------+------ - 0 | 0 | 0 -(1 row) - --- --- another case with equivalence clauses above outer joins (bug #8591) --- ---Testcase 324: -explain (costs off) -select (a.fields->>'unique1')::int4 unique1, (b.fields->>'unique1')::int4 unique1, (c.fields->>'unique1')::int4 unique1, coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) - from tenk1 a left join tenk1 b on (b.fields->>'thousand')::int4 = (a.fields->>'unique1')::int4 left join tenk1 c on (c.fields->>'unique2')::int4 = coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) - where (a.fields->>'unique2')::int4 < 10 and coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) = 44; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Hash Left Join - Hash Cond: (COALESCE(((b.fields ->> 'twothousand'::text))::integer, ((a.fields ->> 'twothousand'::text))::integer) = ((c.fields ->> 'unique2'::text))::integer) - -> Merge Left Join - Merge Cond: ((((a.fields ->> 'unique1'::text))::integer) = (((b.fields ->> 'thousand'::text))::integer)) - Filter: (COALESCE(((b.fields ->> 'twothousand'::text))::integer, ((a.fields ->> 'twothousand'::text))::integer) = 44) - -> Sort - Sort Key: (((a.fields ->> 'unique1'::text))::integer) - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: (((b.fields ->> 'thousand'::text))::integer) - -> Foreign Scan on tenk1 b - -> Hash - -> Foreign Scan on tenk1 c -(13 rows) - ---Testcase 325: -select (a.fields->>'unique1')::int4 unique1, (b.fields->>'unique1')::int4 unique1, (c.fields->>'unique1')::int4 unique1, coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) - from tenk1 a left join tenk1 b on (b.fields->>'thousand')::int4 = (a.fields->>'unique1')::int4 left join tenk1 c on (c.fields->>'unique2')::int4 = coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) - where (a.fields->>'unique2')::int4 < 10 and coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) = 44; - unique1 | unique1 | unique1 | coalesce ----------+---------+---------+---------- -(0 rows) - --- --- check handling of join aliases when flattening multiple levels of subquery --- ---Testcase 326: -explain (verbose, costs off) -select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from - (values (0),(1)) foo1(join_key) -left join - (select join_key, bug_field from - (select ss1.join_key, ss1.bug_field from - (select (fields->>'f1')::int4 as join_key, 666 as bug_field from int4_tbl i1) ss1 - ) foo2 - left join - (select (fields->>'unique2')::int4 as join_key from tenk1 i2) ss2 - using (join_key) - ) foo3 -using (join_key); - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Hash Right Join - Output: "*VALUES*".column1, ((i1.fields ->> 'f1'::text))::integer, (666) - Hash Cond: (((i1.fields ->> 'f1'::text))::integer = "*VALUES*".column1) - -> Merge Left Join - Output: i1.fields, 666 - Merge Cond: ((((i1.fields ->> 'f1'::text))::integer) = (((i2.fields ->> 'unique2'::text))::integer)) - -> Sort - Output: i1.fields, (((i1.fields ->> 'f1'::text))::integer) - Sort Key: (((i1.fields ->> 'f1'::text))::integer) - -> Foreign Scan on public.int4_tbl i1 - Output: i1.fields, ((i1.fields ->> 'f1'::text))::integer - InfluxDB query: SELECT * FROM "int4_tbl" - -> Sort - Output: i2.fields, (((i2.fields ->> 'unique2'::text))::integer) - Sort Key: (((i2.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on public.tenk1 i2 - Output: i2.fields, ((i2.fields ->> 'unique2'::text))::integer - InfluxDB query: SELECT * FROM "tenk" - -> Hash - Output: "*VALUES*".column1 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1 -(22 rows) - ---Testcase 327: -select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from - (values (0),(1)) foo1(join_key) -left join - (select join_key, bug_field from - (select ss1.join_key, ss1.bug_field from - (select (fields->>'f1')::int4 as join_key, 666 as bug_field from int4_tbl i1) ss1 - ) foo2 - left join - (select (fields->>'unique2')::int4 as join_key from tenk1 i2) ss2 - using (join_key) - ) foo3 -using (join_key); - foo1_id | foo3_id | bug_field ----------+---------+----------- - 0 | 0 | 666 - 1 | | -(2 rows) - --- --- test successful handling of nested outer joins with degenerate join quals --- ---Testcase 328: -create foreign table text_tbl(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 329: -explain (verbose, costs off) -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2) b2 - on ((i8.fields->>'q1')::int8 = (b2.fields->>'q1')::int8) - on ((b2.d2)::int8 = (b1.fields->>'q2')::int8) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on ((i8.fields->>'q2')::int8 = (i4.fields->>'f1')::int4); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Merge Right Join - Output: (t1.fields ->> 'f1'::text) - Merge Cond: ((((i4.fields ->> 'f1'::text))::integer) = (((i8.fields ->> 'q2'::text))::bigint)) - -> Sort - Output: i4.fields, (((i4.fields ->> 'f1'::text))::integer) - Sort Key: (((i4.fields ->> 'f1'::text))::integer) - -> Foreign Scan on public.int4_tbl i4 - Output: i4.fields, ((i4.fields ->> 'f1'::text))::integer - InfluxDB query: SELECT * FROM "int4_tbl" - -> Materialize - Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) - -> Sort - Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) - Sort Key: (((i8.fields ->> 'q2'::text))::bigint) - -> Nested Loop Left Join - Output: t1.fields, i8.fields, ((i8.fields ->> 'q2'::text))::bigint - Join Filter: ((t1.fields ->> 'f1'::text) = '***'::text) - -> Foreign Scan on public.text_tbl t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "text_tbl" - -> Materialize - Output: i8.fields - -> Merge Left Join - Output: i8.fields - Merge Cond: ((((i8b1.fields ->> 'q2'::text))::bigint) = (((NULL::integer))::bigint)) - -> Sort - Output: i8b1.fields, (((i8b1.fields ->> 'q2'::text))::bigint) - Sort Key: (((i8b1.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl i8b1 - Output: i8b1.fields, ((i8b1.fields ->> 'q2'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Sort - Output: i8.fields, (NULL::integer), (((NULL::integer))::bigint) - Sort Key: (((NULL::integer))::bigint) - -> Merge Right Join - Output: i8.fields, (NULL::integer), ((NULL::integer))::bigint - Merge Cond: ((((i8b2.fields ->> 'q1'::text))::bigint) = (((i8.fields ->> 'q1'::text))::bigint)) - -> Sort - Output: i8b2.fields, (NULL::integer), (((i8b2.fields ->> 'q1'::text))::bigint) - Sort Key: (((i8b2.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on public.int8_tbl i8b2 - Output: i8b2.fields, NULL::integer, ((i8b2.fields ->> 'q1'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Sort - Output: i8.fields, (((i8.fields ->> 'q1'::text))::bigint) - Sort Key: (((i8.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on public.int8_tbl i8 - Output: i8.fields, ((i8.fields ->> 'q1'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" -(49 rows) - ---Testcase 330: -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2) b2 - on ((i8.fields->>'q1')::int8 = (b2.fields->>'q1')::int8) - on ((b2.d2)::int8 = (b1.fields->>'q2')::int8) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on ((i8.fields->>'q2')::int8 = (i4.fields->>'f1')::int4); - f1 -------------------- - doh! - hi de ho neighbor -(2 rows) - ---Testcase 331: -explain (verbose, costs off) -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2) b2 - on ((i8.q1)::int8 = (b2.q1)::int8) - on ((b2.d2)::int8 = (b1.q2)::int8) - on (t1.f1 = b1.d1) - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on ((i8.q2)::int8 = (i4.f1)::int4); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Right Join - Output: (t1.fields ->> 'f1'::text) - Merge Cond: ((((i4.fields ->> 'f1'::text))::integer) = (((i8.fields ->> 'q2'::text))::bigint)) - -> Sort - Output: i4.fields, (((i4.fields ->> 'f1'::text))::integer) - Sort Key: (((i4.fields ->> 'f1'::text))::integer) - -> Foreign Scan on public.int4_tbl i4 - Output: i4.fields, ((i4.fields ->> 'f1'::text))::integer - InfluxDB query: SELECT * FROM "int4_tbl" - -> Materialize - Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) - -> Sort - Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) - Sort Key: (((i8.fields ->> 'q2'::text))::bigint) - -> Nested Loop Left Join - Output: t1.fields, i8.fields, ((i8.fields ->> 'q2'::text))::bigint - Join Filter: ((t1.fields ->> 'f1'::text) = '***'::text) - -> Foreign Scan on public.text_tbl t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "text_tbl" - -> Materialize - Output: i8.fields - -> Merge Left Join - Output: i8.fields - Merge Cond: ((((i8b1.fields ->> 'q2'::text))::bigint) = (((NULL::integer))::bigint)) - -> Sort - Output: i8b1.fields, (((i8b1.fields ->> 'q2'::text))::bigint) - Sort Key: (((i8b1.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl i8b1 - Output: i8b1.fields, ((i8b1.fields ->> 'q2'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Materialize - Output: i8.fields, (NULL::integer), (((NULL::integer))::bigint) - -> Sort - Output: i8.fields, (NULL::integer), (((NULL::integer))::bigint) - Sort Key: (((NULL::integer))::bigint) - -> Merge Left Join - Output: i8.fields, (NULL::integer), ((NULL::integer))::bigint - Merge Cond: ((((i8.fields ->> 'q1'::text))::bigint) = (((i8b2.fields ->> 'q1'::text))::bigint)) - -> Sort - Output: i8.fields, (((i8.fields ->> 'q1'::text))::bigint) - Sort Key: (((i8.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on public.int8_tbl i8 - Output: i8.fields, ((i8.fields ->> 'q1'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Materialize - Output: i8b2.fields, (NULL::integer), (((i8b2.fields ->> 'q1'::text))::bigint) - -> Sort - Output: i8b2.fields, (NULL::integer), (((i8b2.fields ->> 'q1'::text))::bigint) - Sort Key: (((i8b2.fields ->> 'q1'::text))::bigint) - -> Nested Loop - Output: i8b2.fields, NULL::integer, ((i8b2.fields ->> 'q1'::text))::bigint - -> Foreign Scan on public.int4_tbl i4b2 - Output: i4b2.fields - InfluxDB query: SELECT * FROM "int4_tbl" - -> Materialize - Output: i8b2.fields - -> Foreign Scan on public.int8_tbl i8b2 - Output: i8b2.fields - InfluxDB query: SELECT * FROM "int8_tbl" -(60 rows) - ---Testcase 332: -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2) b2 - on ((i8.q1)::int8 = (b2.q1)::int8) - on ((b2.d2)::int8 = (b1.q2)::int8) - on (t1.f1 = b1.d1) - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on ((i8.q2)::int8 = (i4.f1)::int4); - f1 -------------------- - doh! - hi de ho neighbor -(2 rows) - ---Testcase 333: -explain (verbose, costs off) -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2 - where (q1)::int8 = (f1)::int8) b2 - on ((i8.q1)::int8 = (b2.q1)::int8) - on ((b2.d2)::int8 = (b1.q2)::int8) - on (t1.f1 = b1.d1) - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on ((i8.q2)::int8 = (i4.f1)::int4); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Right Join - Output: (t1.fields ->> 'f1'::text) - Merge Cond: ((((i4.fields ->> 'f1'::text))::integer) = (((i8.fields ->> 'q2'::text))::bigint)) - -> Sort - Output: i4.fields, (((i4.fields ->> 'f1'::text))::integer) - Sort Key: (((i4.fields ->> 'f1'::text))::integer) - -> Foreign Scan on public.int4_tbl i4 - Output: i4.fields, ((i4.fields ->> 'f1'::text))::integer - InfluxDB query: SELECT * FROM "int4_tbl" - -> Materialize - Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) - -> Sort - Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) - Sort Key: (((i8.fields ->> 'q2'::text))::bigint) - -> Nested Loop Left Join - Output: t1.fields, i8.fields, ((i8.fields ->> 'q2'::text))::bigint - Join Filter: ((t1.fields ->> 'f1'::text) = '***'::text) - -> Foreign Scan on public.text_tbl t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "text_tbl" - -> Materialize - Output: i8.fields - -> Merge Left Join - Output: i8.fields - Merge Cond: ((((i8b1.fields ->> 'q2'::text))::bigint) = (((NULL::integer))::bigint)) - -> Sort - Output: i8b1.fields, (((i8b1.fields ->> 'q2'::text))::bigint) - Sort Key: (((i8b1.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl i8b1 - Output: i8b1.fields, ((i8b1.fields ->> 'q2'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Materialize - Output: i8.fields, (NULL::integer), (((NULL::integer))::bigint) - -> Sort - Output: i8.fields, (NULL::integer), (((NULL::integer))::bigint) - Sort Key: (((NULL::integer))::bigint) - -> Merge Left Join - Output: i8.fields, (NULL::integer), ((NULL::integer))::bigint - Merge Cond: ((((i8.fields ->> 'q1'::text))::bigint) = ((i8b2.fields ->> 'q1'::text))::bigint) - -> Sort - Output: i8.fields, (((i8.fields ->> 'q1'::text))::bigint) - Sort Key: (((i8.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on public.int8_tbl i8 - Output: i8.fields, ((i8.fields ->> 'q1'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Materialize - Output: i8b2.fields, (NULL::integer) - -> Merge Join - Output: i8b2.fields, NULL::integer - Merge Cond: ((((i8b2.fields ->> 'q1'::text))::bigint) = ((((i4b2.fields ->> 'f1'::text))::integer)::bigint)) - -> Sort - Output: i8b2.fields, (((i8b2.fields ->> 'q1'::text))::bigint) - Sort Key: (((i8b2.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on public.int8_tbl i8b2 - Output: i8b2.fields, ((i8b2.fields ->> 'q1'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Sort - Output: i4b2.fields, ((((i4b2.fields ->> 'f1'::text))::integer)::bigint) - Sort Key: ((((i4b2.fields ->> 'f1'::text))::integer)::bigint) - -> Foreign Scan on public.int4_tbl i4b2 - Output: i4b2.fields, (((i4b2.fields ->> 'f1'::text))::integer)::bigint - InfluxDB query: SELECT * FROM "int4_tbl" -(62 rows) - ---Testcase 334: -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2 - where (q1)::int8 = (f1)::int8) b2 - on ((i8.q1)::int8 = (b2.q1)::int8) - on ((b2.d2)::int8 = (b1.q2)::int8) - on (t1.f1 = b1.d1) - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on ((i8.q2)::int8 = (i4.f1)::int4); - f1 -------------------- - doh! - hi de ho neighbor -(2 rows) - ---Testcase 335: -explain (verbose, costs off) -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - inner join (select (fields->>'q1')::int8 q1, fields->>'q2' q2 from INT8_TBL i8) i8 - on (i8.q2)::bigint = 456 - right join (select fields->>'f1' f1 from text_tbl t2) t2 - on t1.f1 = 'doh!' - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on i8.q1 = i4.f1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop Left Join - Output: (t1.fields ->> 'f1'::text), ((i8.fields ->> 'q1'::text))::bigint, (i8.fields ->> 'q2'::text), (t2.fields ->> 'f1'::text), ((i4.fields ->> 'f1'::text))::integer - -> Foreign Scan on public.text_tbl t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "text_tbl" - -> Materialize - Output: i8.fields, i4.fields, t1.fields - -> Nested Loop - Output: i8.fields, i4.fields, t1.fields - -> Hash Right Join - Output: i8.fields, i4.fields - Hash Cond: (((i4.fields ->> 'f1'::text))::integer = ((i8.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on public.int4_tbl i4 - Output: i4.fields - InfluxDB query: SELECT * FROM "int4_tbl" - -> Hash - Output: i8.fields - -> Foreign Scan on public.int8_tbl i8 - Output: i8.fields - InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q2" = 456)) - -> Materialize - Output: t1.fields - -> Foreign Scan on public.text_tbl t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "text_tbl" WHERE (("f1" = 'doh!')) -(25 rows) - ---Testcase 336: -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - inner join (select (fields->>'q1')::int8 q1, fields->>'q2' q2 from INT8_TBL i8) i8 - on (i8.q2)::bigint = 456 - right join (select fields->>'f1' f1 from text_tbl t2) t2 - on t1.f1 = 'doh!' - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on i8.q1 = i4.f1; - f1 | q1 | q2 | f1 | f1 -------+-----+-----+-------------------+---- - doh! | 123 | 456 | doh! | - doh! | 123 | 456 | hi de ho neighbor | -(2 rows) - --- --- test for appropriate join order in the presence of lateral references --- ---Testcase 337: -explain (verbose, costs off) -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - on (i8.q2)::int8 = 123, - lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss -where t1.f1 = ss.f1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: (t1.fields ->> 'f1'::text), ((i8.fields ->> 'q1'::text))::bigint, ((i8.fields ->> 'q2'::text))::bigint, (((i8.fields ->> 'q1'::text))::bigint), ((t2.fields ->> 'f1'::text)) - Join Filter: ((t1.fields ->> 'f1'::text) = ((t2.fields ->> 'f1'::text))) - -> Nested Loop Left Join - Output: t1.fields, i8.fields - -> Foreign Scan on public.text_tbl t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "text_tbl" - -> Materialize - Output: i8.fields - -> Foreign Scan on public.int8_tbl i8 - Output: i8.fields - InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q2" = 123)) - -> Limit - Output: (((i8.fields ->> 'q1'::text))::bigint), ((t2.fields ->> 'f1'::text)) - -> Foreign Scan on public.text_tbl t2 - Output: ((i8.fields ->> 'q1'::text))::bigint, (t2.fields ->> 'f1'::text) - InfluxDB query: SELECT "f1" FROM "text_tbl" -(18 rows) - ---Testcase 338: -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - on (i8.q2)::int8 = 123, - lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss -where t1.f1 = ss.f1; - f1 | q1 | q2 | q1 | f1 -------+------------------+-----+------------------+------ - doh! | 4567890123456789 | 123 | 4567890123456789 | doh! -(1 row) - ---Testcase 339: -explain (verbose, costs off) -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - on (i8.q2)::bigint = 123, - lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss1, - lateral (select ss1.* from text_tbl t3 limit 1) as ss2 -where t1.f1 = ss2.f1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: (t1.fields ->> 'f1'::text), ((i8.fields ->> 'q1'::text))::bigint, ((i8.fields ->> 'q2'::text))::bigint, (((i8.fields ->> 'q1'::text))::bigint), ((t2.fields ->> 'f1'::text)), ((((i8.fields ->> 'q1'::text))::bigint)), (((t2.fields ->> 'f1'::text))) - Join Filter: ((t1.fields ->> 'f1'::text) = (((t2.fields ->> 'f1'::text)))) - -> Nested Loop - Output: t1.fields, i8.fields, (((i8.fields ->> 'q1'::text))::bigint), ((t2.fields ->> 'f1'::text)) - -> Nested Loop Left Join - Output: t1.fields, i8.fields - -> Foreign Scan on public.text_tbl t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "text_tbl" - -> Materialize - Output: i8.fields - -> Foreign Scan on public.int8_tbl i8 - Output: i8.fields - InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q2" = 123)) - -> Limit - Output: (((i8.fields ->> 'q1'::text))::bigint), ((t2.fields ->> 'f1'::text)) - -> Foreign Scan on public.text_tbl t2 - Output: ((i8.fields ->> 'q1'::text))::bigint, (t2.fields ->> 'f1'::text) - InfluxDB query: SELECT "f1" FROM "text_tbl" - -> Limit - Output: ((((i8.fields ->> 'q1'::text))::bigint)), (((t2.fields ->> 'f1'::text))) - -> Foreign Scan on public.text_tbl t3 - Output: (((i8.fields ->> 'q1'::text))::bigint), ((t2.fields ->> 'f1'::text)) - InfluxDB query: SELECT * FROM "text_tbl" -(25 rows) - ---Testcase 340: -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - on (i8.q2)::bigint = 123, - lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss1, - lateral (select ss1.* from text_tbl t3 limit 1) as ss2 -where t1.f1 = ss2.f1; - f1 | q1 | q2 | q1 | f1 | q1 | f1 -------+------------------+-----+------------------+------+------------------+------ - doh! | 4567890123456789 | 123 | 4567890123456789 | doh! | 4567890123456789 | doh! -(1 row) - ---Testcase 341: -explain (verbose, costs off) -select 1 from - text_tbl as tt1 - inner join text_tbl as tt2 on (tt1.fields->>'f1' = 'foo') - left join text_tbl as tt3 on (tt3.fields->>'f1' = 'foo') - left join text_tbl as tt4 on (tt3.fields->>'f1' = tt4.fields->>'f1'), - lateral (select tt4.fields->>'f1' as c0 from text_tbl as tt5 limit 1) as ss1 -where tt1.fields->>'f1' = ss1.c0; - QUERY PLAN -------------------------------------------------------------------------------------------- - Nested Loop - Output: 1 - -> Nested Loop Left Join - Output: tt1.fields, tt4.fields - -> Nested Loop - Output: tt1.fields - -> Foreign Scan on public.text_tbl tt2 - Output: tt2.fields - InfluxDB query: SELECT * FROM "text_tbl" - -> Materialize - Output: tt1.fields - -> Foreign Scan on public.text_tbl tt1 - Output: tt1.fields - InfluxDB query: SELECT * FROM "text_tbl" WHERE (("f1" = 'foo')) - -> Hash Left Join - Output: tt4.fields - Hash Cond: ((tt3.fields ->> 'f1'::text) = (tt4.fields ->> 'f1'::text)) - -> Foreign Scan on public.text_tbl tt3 - Output: tt3.fields - InfluxDB query: SELECT * FROM "text_tbl" WHERE (("f1" = 'foo')) - -> Hash - Output: tt4.fields - -> Foreign Scan on public.text_tbl tt4 - Output: tt4.fields - InfluxDB query: SELECT * FROM "text_tbl" WHERE (("f1" = 'foo')) - -> Subquery Scan on ss1 - Output: ss1.c0 - Filter: (ss1.c0 = 'foo'::text) - -> Limit - Output: ((tt4.fields ->> 'f1'::text)) - -> Foreign Scan on public.text_tbl tt5 - Output: (tt4.fields ->> 'f1'::text) - InfluxDB query: SELECT * FROM "text_tbl" -(33 rows) - ---Testcase 342: -select 1 from - text_tbl as tt1 - inner join text_tbl as tt2 on (tt1.fields->>'f1' = 'foo') - left join text_tbl as tt3 on (tt3.fields->>'f1' = 'foo') - left join text_tbl as tt4 on (tt3.fields->>'f1' = tt4.fields->>'f1'), - lateral (select tt4.fields->>'f1' as c0 from text_tbl as tt5 limit 1) as ss1 -where tt1.fields->>'f1' = ss1.c0; - ?column? ----------- -(0 rows) - --- --- check a case in which a PlaceHolderVar forces join order --- ---Testcase 343: -explain (verbose, costs off) -select ss2.* from - (select (fields->>'f1')::int4 f1 from INT4_TBL) i41 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) i8 - join (select i42.fields->>'f1' as c1, i43.fields->>'f1' as c2, 42 as c3 - from int4_tbl i42, int4_tbl i43) ss1 - on (i8.q1)::int8 = (ss1.c2)::int8 - on (i41.f1)::int4 = (ss1.c1)::int4, - lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 -where (ss1.c2)::int8 = 0; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: (((int4_tbl.fields ->> 'f1'::text))::integer), (((int8_tbl.fields ->> 'q1'::text))::bigint), (((int8_tbl.fields ->> 'q2'::text))::bigint), ((i42.fields ->> 'f1'::text)), ((i43.fields ->> 'f1'::text)), ((42)) - -> Nested Loop - Output: int4_tbl.fields, i42.fields, int8_tbl.fields, i43.fields, 42 - -> Nested Loop - Output: int4_tbl.fields, i42.fields, int8_tbl.fields - -> Merge Join - Output: int4_tbl.fields, i42.fields - Merge Cond: ((((int4_tbl.fields ->> 'f1'::text))::integer) = (((i42.fields ->> 'f1'::text))::integer)) - -> Sort - Output: int4_tbl.fields, (((int4_tbl.fields ->> 'f1'::text))::integer) - Sort Key: (((int4_tbl.fields ->> 'f1'::text))::integer) - -> Foreign Scan on public.int4_tbl - Output: int4_tbl.fields, ((int4_tbl.fields ->> 'f1'::text))::integer - InfluxDB query: SELECT * FROM "int4_tbl" - -> Sort - Output: i42.fields, (((i42.fields ->> 'f1'::text))::integer) - Sort Key: (((i42.fields ->> 'f1'::text))::integer) - -> Foreign Scan on public.int4_tbl i42 - Output: i42.fields, ((i42.fields ->> 'f1'::text))::integer - InfluxDB query: SELECT * FROM "int4_tbl" - -> Materialize - Output: int8_tbl.fields - -> Foreign Scan on public.int8_tbl - Output: int8_tbl.fields - InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q1" = 0)) - -> Materialize - Output: i43.fields - -> Foreign Scan on public.int4_tbl i43 - Output: i43.fields - InfluxDB query: SELECT * FROM "int4_tbl" WHERE (("f1" = 0)) - -> Limit - Output: (((int4_tbl.fields ->> 'f1'::text))::integer), (((int8_tbl.fields ->> 'q1'::text))::bigint), (((int8_tbl.fields ->> 'q2'::text))::bigint), ((i42.fields ->> 'f1'::text)), ((i43.fields ->> 'f1'::text)), ((42)) - -> Foreign Scan on public.text_tbl - Output: ((int4_tbl.fields ->> 'f1'::text))::integer, ((int8_tbl.fields ->> 'q1'::text))::bigint, ((int8_tbl.fields ->> 'q2'::text))::bigint, (i42.fields ->> 'f1'::text), (i43.fields ->> 'f1'::text), (42) - InfluxDB query: SELECT * FROM "text_tbl" -(36 rows) - ---Testcase 344: -select ss2.* from - (select (fields->>'f1')::int4 f1 from INT4_TBL) i41 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) i8 - join (select i42.fields->>'f1' as c1, i43.fields->>'f1' as c2, 42 as c3 - from int4_tbl i42, int4_tbl i43) ss1 - on (i8.q1)::int8 = (ss1.c2)::int8 - on (i41.f1)::int4 = (ss1.c1)::int4, - lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 -where (ss1.c2)::int8 = 0; - f1 | q1 | q2 | c1 | c2 | c3 -----+----+----+----+----+---- -(0 rows) - --- --- test successful handling of full join underneath left join (bug #14105) --- ---Testcase 345: -explain (costs off) -select * from - (select 1 as id) as xx - left join - ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a1) as a1 full join (select 1 as id) as yy on ((a1.unique1)::int4 = yy.id)) - on (xx.id = coalesce(yy.id)); - QUERY PLAN ------------------------------------------------------------------------ - Nested Loop Left Join - Join Filter: ((1) = COALESCE((1))) - -> Result - -> Hash Full Join - Hash Cond: (((a1.fields ->> 'unique1'::text))::integer = (1)) - -> Foreign Scan on tenk1 a1 - -> Hash - -> Result -(8 rows) - ---Testcase 346: -select * from - (select 1 as id) as xx - left join - ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) as a1 full join (select 1 as id) as yy on ((a1.unique1)::int4 = yy.id)) - on (xx.id = coalesce(yy.id)); - id | unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 | id -----+---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------+---- - 1 | 1 | 2838 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | EFEAAA | OOOOxx | 1 -(1 row) - --- --- test ability to push constants through outer join clauses --- ---Testcase 347: -explain (costs off) - select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 where (f1)::int4 = 0; - QUERY PLAN -------------------------------------------------------------------------------------------------- - Hash Left Join - Hash Cond: (((a.fields ->> 'f1'::text))::integer = ((b.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on int4_tbl a - -> Hash - -> Foreign Scan on tenk1 b -(5 rows) - ---Testcase 348: -explain (costs off) - select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a full join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b using(unique2) where (unique2)::int4 = 42; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Hash Full Join - Hash Cond: (((a.fields ->> 'unique2'::text))::integer = ((b.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 a - -> Hash - -> Foreign Scan on tenk1 b -(5 rows) - --- --- test that quals attached to an outer join have correct semantics, --- specifically that they don't re-use expressions computed below the join; --- we force a mergejoin so that coalesce(b.q1, 1) appears as a join input --- ---Testcase 349: -set enable_hashjoin to off; ---Testcase 350: -set enable_nestloop to off; ---Testcase 351: -explain (verbose, costs off) - select (a.fields->>'q2')::int8 q2, (b.fields->>'q1')::int8 q1 - from int8_tbl a left join int8_tbl b on (a.fields->>'q2')::int8 = coalesce((b.fields->>'q1')::int8, 1) - where coalesce((b.fields->>'q1')::int8, 1) > 0; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- - Merge Left Join - Output: (((a.fields ->> 'q2'::text))::bigint), ((b.fields ->> 'q1'::text))::bigint - Merge Cond: ((((a.fields ->> 'q2'::text))::bigint) = (COALESCE(((b.fields ->> 'q1'::text))::bigint, '1'::bigint))) - Filter: (COALESCE(((b.fields ->> 'q1'::text))::bigint, '1'::bigint) > 0) - -> Sort - Output: a.fields, (((a.fields ->> 'q2'::text))::bigint) - Sort Key: (((a.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl a - Output: a.fields, ((a.fields ->> 'q2'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Sort - Output: b.fields, (COALESCE(((b.fields ->> 'q1'::text))::bigint, '1'::bigint)) - Sort Key: (COALESCE(((b.fields ->> 'q1'::text))::bigint, '1'::bigint)) - -> Foreign Scan on public.int8_tbl b - Output: b.fields, COALESCE(((b.fields ->> 'q1'::text))::bigint, '1'::bigint) - InfluxDB query: SELECT * FROM "int8_tbl" -(16 rows) - ---Testcase 352: -select (a.fields->>'q2')::int8 q2, (b.fields->>'q1')::int8 q1 - from int8_tbl a left join int8_tbl b on (a.fields->>'q2')::int8 = coalesce((b.fields->>'q1')::int8, 1) - where coalesce((b.fields->>'q1')::int8, 1) > 0; - q2 | q1 --------------------+------------------ - -4567890123456789 | - 123 | 123 - 123 | 123 - 456 | - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(10 rows) - ---Testcase 353: -reset enable_hashjoin; ---Testcase 354: -reset enable_nestloop; --- --- test join removal --- -begin; ---Testcase 355: -CREATE FOREIGN TABLE a (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE a_nsc (id int, b_id int) SERVER influxdb_svr OPTIONS (table 'a'); ---Testcase 356: -CREATE FOREIGN TABLE b (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE b_nsc (id int, c_id int) SERVER influxdb_svr OPTIONS (table 'b'); ---Testcase 357: -CREATE FOREIGN TABLE c (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE c_nsc (id int) SERVER influxdb_svr OPTIONS (table 'c'); ---Testcase 358: -CREATE FOREIGN TABLE d (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE d_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 'd'); ---Testcase 359: -INSERT INTO a_nsc VALUES (0, 0), (1, NULL); ---Testcase 360: -INSERT INTO b_nsc VALUES (0, 0), (1, NULL); ---Testcase 361: -INSERT INTO c_nsc VALUES (0), (1); ---Testcase 362: -INSERT INTO d_nsc VALUES (1,3), (2,2), (3,1); --- all three cases should be optimizable into a simple seqscan ---Testcase 363: -explain (costs off) SELECT a.* FROM (select (fields->>'id')::int id, (fields->>'b_id')::int b_id from a) a LEFT JOIN (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b ON a.b_id = b.id; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Merge Left Join - Merge Cond: ((((a.fields ->> 'b_id'::text))::integer) = (((b.fields ->> 'id'::text))::integer)) - -> Sort - Sort Key: (((a.fields ->> 'b_id'::text))::integer) - -> Foreign Scan on a - -> Sort - Sort Key: (((b.fields ->> 'id'::text))::integer) - -> Foreign Scan on b -(8 rows) - ---Testcase 364: -explain (costs off) SELECT b.* FROM (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b LEFT JOIN (select (fields->>'id')::int id from c) c ON b.c_id = c.id; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Merge Left Join - Merge Cond: ((((b.fields ->> 'c_id'::text))::integer) = (((c.fields ->> 'id'::text))::integer)) - -> Sort - Sort Key: (((b.fields ->> 'c_id'::text))::integer) - -> Foreign Scan on b - -> Sort - Sort Key: (((c.fields ->> 'id'::text))::integer) - -> Foreign Scan on c -(8 rows) - ---Testcase 365: -explain (costs off) - SELECT a.* FROM (select (fields->>'id')::int id, (fields->>'b_id')::int b_id from a) a LEFT JOIN ((select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b left join (select (fields->>'id')::int id from c) c on b.c_id = c.id) - ON (a.b_id = b.id); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------- - Merge Right Join - Merge Cond: ((((c.fields ->> 'id'::text))::integer) = (((b.fields ->> 'c_id'::text))::integer)) - -> Sort - Sort Key: (((c.fields ->> 'id'::text))::integer) - -> Foreign Scan on c - -> Sort - Sort Key: (((b.fields ->> 'c_id'::text))::integer) - -> Merge Left Join - Merge Cond: ((((a.fields ->> 'b_id'::text))::integer) = (((b.fields ->> 'id'::text))::integer)) - -> Sort - Sort Key: (((a.fields ->> 'b_id'::text))::integer) - -> Foreign Scan on a - -> Sort - Sort Key: (((b.fields ->> 'id'::text))::integer) - -> Foreign Scan on b -(15 rows) - --- check optimization of outer join within another special join ---Testcase 366: -explain (costs off) -select (fields->>'id')::int id from a where (fields->>'id')::int in ( - select (b.fields->>'id')::int from b left join c on (b.fields->>'id')::int = (c.fields->>'id')::int -); - QUERY PLAN -------------------------------------------------------------------------------------------------------------------- - Hash Join - Hash Cond: (((a.fields ->> 'id'::text))::integer = ((b.fields ->> 'id'::text))::integer) - -> Foreign Scan on a - -> Hash - -> HashAggregate - Group Key: (((b.fields ->> 'id'::text))::integer) - -> Merge Left Join - Merge Cond: ((((b.fields ->> 'id'::text))::integer) = (((c.fields ->> 'id'::text))::integer)) - -> Sort - Sort Key: (((b.fields ->> 'id'::text))::integer) - -> Foreign Scan on b - -> Sort - Sort Key: (((c.fields ->> 'id'::text))::integer) - -> Foreign Scan on c -(14 rows) - --- check that join removal works for a left join when joining a subquery --- that is guaranteed to be unique by its GROUP BY clause ---Testcase 367: -explain (costs off) -select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b group by b.id, b.c_id) s - on (d.a)::int = (s.id)::int and (d.b)::int = (s.c_id)::int; - QUERY PLAN -------------------- - Foreign Scan on d -(1 row) - --- similarly, but keying off a DISTINCT clause ---Testcase 368: -explain (costs off) -select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select distinct * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b) s - on (d.a)::int = (s.id)::int and (d.b)::int = (s.c_id)::int; - QUERY PLAN -------------------- - Foreign Scan on d -(1 row) - --- join removal is not possible when the GROUP BY contains a column that is --- not in the join condition. (Note: as of 9.6, we notice that b.id is a --- primary key and so drop b.c_id from the GROUP BY of the resulting plan; --- but this happens too late for join removal in the outer plan level.) ---Testcase 369: -explain (costs off) -select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b group by b.id, b.c_id) s - on (d.a)::int = (s.id)::int; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Merge Right Join - Merge Cond: (s.id = (((d.fields ->> 'a'::text))::integer)) - -> Sort - Sort Key: s.id - -> Subquery Scan on s - -> HashAggregate - Group Key: ((b.fields ->> 'id'::text))::integer, ((b.fields ->> 'c_id'::text))::integer - -> Foreign Scan on b - -> Sort - Sort Key: (((d.fields ->> 'a'::text))::integer) - -> Foreign Scan on d -(11 rows) - --- similarly, but keying off a DISTINCT clause ---Testcase 370: -explain (costs off) -select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select distinct * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b) s - on (d.a)::int = (s.id)::int; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Merge Right Join - Merge Cond: (s.id = (((d.fields ->> 'a'::text))::integer)) - -> Sort - Sort Key: s.id - -> Subquery Scan on s - -> HashAggregate - Group Key: ((b.fields ->> 'id'::text))::integer, ((b.fields ->> 'c_id'::text))::integer - -> Foreign Scan on b - -> Sort - Sort Key: (((d.fields ->> 'a'::text))::integer) - -> Foreign Scan on d -(11 rows) - --- check join removal works when uniqueness of the join condition is enforced --- by a UNION ---Testcase 371: -explain (costs off) -select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select (fields->>'id')::int id from a union select (fields->>'id')::int id from b) s - on (d.a)::int = (s.id)::int; - QUERY PLAN -------------------- - Foreign Scan on d -(1 row) - --- check join removal with a cross-type comparison operator ---Testcase 372: -explain (costs off) -select i8.* from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join (select (fields->>'f1')::int f1 from int4_tbl group by (fields->>'f1')::int) i4 - on (i8.q1)::int8 = (i4.f1)::int4; - QUERY PLAN ------------------------------ - Foreign Scan on int8_tbl i8 -(1 row) - --- check join removal with lateral references ---Testcase 373: -explain (costs off) -select 1 from (select (a.fields->>'id')::int id FROM a left join b on (a.fields->>'b_id')::int = (b.fields->>'id')::int) q, - lateral generate_series(1, (q.id)::int) gs(i) where (q.id)::int = (gs.i)::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Merge Right Join - Merge Cond: ((((b.fields ->> 'id'::text))::integer) = (((a.fields ->> 'b_id'::text))::integer)) - -> Sort - Sort Key: (((b.fields ->> 'id'::text))::integer) - -> Foreign Scan on b - -> Sort - Sort Key: (((a.fields ->> 'b_id'::text))::integer) - -> Nested Loop - -> Foreign Scan on a - -> Function Scan on generate_series gs - Filter: (((a.fields ->> 'id'::text))::integer = i) -(11 rows) - ---Testcase 374: -DELETE FROM a_nsc; ---Testcase 375: -DELETE FROM b_nsc; ---Testcase 376: -DELETE FROM c_nsc; ---Testcase 377: -DELETE FROM d_nsc; ---Testcase 378: -DROP FOREIGN TABLE a; -DROP FOREIGN TABLE a_nsc; ---Testcase 379: -DROP FOREIGN TABLE b; -DROP FOREIGN TABLE b_nsc; ---Testcase 380: -DROP FOREIGN TABLE c; -DROP FOREIGN TABLE c_nsc; ---Testcase 381: -DROP FOREIGN TABLE d; -DROP FOREIGN TABLE d_nsc; -rollback; ---Testcase 382: -create foreign table parent (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table parent_nsc (k int, pd int) server influxdb_svr OPTIONS (table 'parent'); ---Testcase 383: -create foreign table child (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table child_nsc (k int, cd int) server influxdb_svr OPTIONS (table 'child'); ---Testcase 384: -insert into parent_nsc values (1, 10), (2, 20), (3, 30); ---Testcase 385: -insert into child_nsc values (1, 100), (4, 400); --- this case is optimizable ---Testcase 386: -select p.* from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c on ((p.k)::int = (c.k)::int); - k | pd ----+---- - 1 | 10 - 2 | 20 - 3 | 30 -(3 rows) - ---Testcase 387: -explain (costs off) - select p.* from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c on ((p.k)::int = (c.k)::int); - QUERY PLAN ------------------------------------------------------------------------------------------------ - Merge Left Join - Merge Cond: ((((p.fields ->> 'k'::text))::integer) = (((c.fields ->> 'k'::text))::integer)) - -> Sort - Sort Key: (((p.fields ->> 'k'::text))::integer) - -> Foreign Scan on parent p - -> Sort - Sort Key: (((c.fields ->> 'k'::text))::integer) - -> Foreign Scan on child c -(8 rows) - --- this case is not ---Testcase 388: -select p.*, linked from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p - left join (select c.*, true as linked from (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c) as ss - on (p.k = ss.k); - k | pd | linked ----+----+-------- - 1 | 10 | t - 2 | 20 | - 3 | 30 | -(3 rows) - ---Testcase 389: -explain (costs off) - select p.*, linked from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p - left join (select c.*, true as linked from (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c) as ss - on (p.k = ss.k); - QUERY PLAN ------------------------------------------------------------------------------------------------ - Merge Right Join - Merge Cond: ((((c.fields ->> 'k'::text))::integer) = (((p.fields ->> 'k'::text))::integer)) - -> Sort - Sort Key: (((c.fields ->> 'k'::text))::integer) - -> Foreign Scan on child c - -> Sort - Sort Key: (((p.fields ->> 'k'::text))::integer) - -> Foreign Scan on parent p -(8 rows) - --- check for a 9.0rc1 bug: join removal breaks pseudoconstant qual handling ---Testcase 390: -select p.* from - (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int) - where (p.k)::int = 1 and (p.k)::int = 2; - k | pd ----+---- -(0 rows) - ---Testcase 391: -explain (costs off) -select p.* from - (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int) - where (p.k)::int = 1 and (p.k)::int = 2; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - ---Testcase 392: -select p.* from - ((select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int)) join (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) x on (p.k)::int = (x.k)::int - where (p.k)::int = 1 and (p.k)::int = 2; - k | pd ----+---- -(0 rows) - ---Testcase 393: -explain (costs off) -select p.* from - ((select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int)) join (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) x on (p.k)::int = (x.k)::int - where (p.k)::int = 1 and (p.k)::int = 2; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - --- bug 5255: this is not optimizable by join removal -begin; ---Testcase 394: -CREATE FOREIGN TABLE a (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE a_nsc (id int) SERVER influxdb_svr OPTIONS (table 'a'); ---Testcase 395: -CREATE FOREIGN TABLE b (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE b_nsc (id int, a_id int) SERVER influxdb_svr OPTIONS (table 'b'); ---Testcase 396: -INSERT INTO a_nsc VALUES (0), (1); ---Testcase 397: -INSERT INTO b_nsc VALUES (0, 0), (1, NULL); ---Testcase 398: -SELECT * FROM (select (fields->>'id')::int id, (fields->>'a_id')::int a_id from b) b LEFT JOIN (select (fields->>'id')::int id from a) a ON ((b.a_id)::int = (a.id)::int) WHERE ((a.id)::int IS NULL OR (a.id)::int > 0); - id | a_id | id -----+------+---- - 1 | | -(1 row) - ---Testcase 399: -SELECT b.* FROM (select (fields->>'id')::int id, (fields->>'a_id')::int a_id from b) b LEFT JOIN (select (fields->>'id')::int id from a) a ON ((b.a_id)::int = (a.id)::int) WHERE ((a.id)::int IS NULL OR (a.id)::int > 0); - id | a_id -----+------ - 1 | -(1 row) - ---Testcase 400: -DELETE FROM a_nsc; ---Testcase 401: -DELETE FROM b_nsc; ---Testcase 402: -DROP FOREIGN TABLE a; -DROP FOREIGN TABLE a_nsc; ---Testcase 403: -DROP FOREIGN TABLE b; -DROP FOREIGN TABLE b_nsc; -rollback; --- another join removal bug: this is not optimizable, either -begin; ---Testcase 404: -create foreign table innertab (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table innertab_nsc (id int8, dat1 int8) server influxdb_svr OPTIONS (table 'innertab'); ---Testcase 405: -insert into innertab_nsc values(123, 42); ---Testcase 406: -SELECT * FROM - (SELECT 1 AS x) ss1 - LEFT JOIN - (SELECT q1, q2, COALESCE(dat1, q1) AS y - FROM (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl LEFT JOIN (select (fields->>'id')::int id, (fields->>'dat1')::int dat1 from innertab) innertab ON (q2)::int8 = (id)::int) ss2 - ON true; - x | q1 | q2 | y ----+------------------+-------------------+------------------ - 1 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 1 | 4567890123456789 | 123 | 42 - 1 | 123 | 456 | 123 - 1 | 123 | 4567890123456789 | 123 - 1 | 4567890123456789 | 4567890123456789 | 4567890123456789 -(5 rows) - --- Clean up -DELETE FROM innertab_nsc; -DROP FOREIGN TABLE innertab; -DROP FOREIGN TABLE innertab_nsc; -rollback; --- another join removal bug: we must clean up correctly when removing a PHV -begin; ---Testcase 407: -create foreign table uniquetbl (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 408: -explain (costs off) -select t1.* from - (select fields->>'f1' f1 from uniquetbl t1) as t1 - left join (select *, '***'::text as d1 from (select fields->>'f1' f1 from uniquetbl uniquetbl) uniquetbl) t2 - on t1.f1 = t2.f1 - left join (select fields->>'f1' f1 from uniquetbl t3) t3 - on t2.d1 = t3.f1; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Merge Right Join - Merge Cond: (((t3.fields ->> 'f1'::text)) = ('***'::text)) - -> Sort - Sort Key: ((t3.fields ->> 'f1'::text)) - -> Foreign Scan on uniquetbl t3 - -> Sort - Sort Key: ('***'::text) - -> Merge Right Join - Merge Cond: (((uniquetbl.fields ->> 'f1'::text)) = ((t1.fields ->> 'f1'::text))) - -> Sort - Sort Key: ((uniquetbl.fields ->> 'f1'::text)) - -> Foreign Scan on uniquetbl - -> Sort - Sort Key: ((t1.fields ->> 'f1'::text)) - -> Foreign Scan on uniquetbl t1 -(15 rows) - ---Testcase 409: -explain (costs off) -select t0.* -from - (select fields->>'f1' f1 from text_tbl t0) t0 - left join - (select case (t1.fields->>'ten')::int4 when 0 then 'doh!'::text else null::text end as case1, - t1.fields->>'stringu2' stringu2 - from tenk1 t1 - join int4_tbl i4 ON (i4.fields->>'f1')::int4 = (t1.fields->>'unique2')::int4 - left join uniquetbl u1 ON u1.fields->>'f1' = (t1.fields->>'string4')::name) ss - on t0.f1 = ss.case1 -where ss.stringu2 !~* ss.case1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: (((t0.fields ->> 'f1'::text)) = (CASE ((t1.fields ->> 'ten'::text))::integer WHEN 0 THEN 'doh!'::text ELSE NULL::text END)) - -> Sort - Sort Key: ((t0.fields ->> 'f1'::text)) - -> Foreign Scan on text_tbl t0 - -> Materialize - -> Sort - Sort Key: (CASE ((t1.fields ->> 'ten'::text))::integer WHEN 0 THEN 'doh!'::text ELSE NULL::text END) - -> Merge Right Join - Merge Cond: (((u1.fields ->> 'f1'::text)) = ((((t1.fields ->> 'string4'::text))::name)::text)) - -> Sort - Sort Key: ((u1.fields ->> 'f1'::text)) - -> Foreign Scan on uniquetbl u1 - -> Sort - Sort Key: ((((t1.fields ->> 'string4'::text))::name)::text) - -> Merge Join - Merge Cond: ((((t1.fields ->> 'unique2'::text))::integer) = (((i4.fields ->> 'f1'::text))::integer)) - -> Sort - Sort Key: (((t1.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 t1 - Filter: ((fields ->> 'stringu2'::text) !~* CASE ((fields ->> 'ten'::text))::integer WHEN 0 THEN 'doh!'::text ELSE NULL::text END) - -> Sort - Sort Key: (((i4.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl i4 -(24 rows) - ---Testcase 410: -select t0.* -from - (select fields->>'f1' f1 from text_tbl t0) t0 - left join - (select case (t1.fields->>'ten')::int4 when 0 then 'doh!'::text else null::text end as case1, - t1.fields->>'stringu2' stringu2 - from tenk1 t1 - join int4_tbl i4 ON (i4.fields->>'f1')::int4 = (t1.fields->>'unique2')::int4 - left join uniquetbl u1 ON u1.fields->>'f1' = (t1.fields->>'string4')::name) ss - on t0.f1 = ss.case1 -where ss.stringu2 !~* ss.case1; - f1 ------- - doh! -(1 row) - -rollback; --- test case to expose miscomputation of required relid set for a PHV ---Testcase 411: -explain (verbose, costs off) -select i8.*, ss.v, (t.fields->>'unique2')::int4 unique2 - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join int4_tbl i4 on (i4.fields->>'f1')::int4 = 1 - left join lateral (select (i4.fields->>'f1')::int4 + 1 as v) as ss on true - left join tenk1 t on (t.fields->>'unique2')::int4 = (ss.v)::int4 -where q2::int8 = 456; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Hash Left Join - Output: ((i8.fields ->> 'q1'::text))::bigint, ((i8.fields ->> 'q2'::text))::bigint, ((((i4.fields ->> 'f1'::text))::integer + 1)), ((t.fields ->> 'unique2'::text))::integer - Hash Cond: (((((i4.fields ->> 'f1'::text))::integer + 1)) = ((t.fields ->> 'unique2'::text))::integer) - -> Nested Loop Left Join - Output: i8.fields, ((((i4.fields ->> 'f1'::text))::integer + 1)) - -> Nested Loop Left Join - Output: i8.fields, i4.fields - -> Foreign Scan on public.int8_tbl i8 - Output: i8.fields - InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q2" = 456)) - -> Materialize - Output: i4.fields - -> Foreign Scan on public.int4_tbl i4 - Output: i4.fields - InfluxDB query: SELECT * FROM "int4_tbl" WHERE (("f1" = 1)) - -> Result - Output: (((i4.fields ->> 'f1'::text))::integer + 1) - -> Hash - Output: t.fields - -> Foreign Scan on public.tenk1 t - Output: t.fields - InfluxDB query: SELECT * FROM "tenk" -(22 rows) - ---Testcase 412: -select i8.*, ss.v, (t.fields->>'unique2')::int4 unique2 - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join int4_tbl i4 on (i4.fields->>'f1')::int4 = 1 - left join lateral (select (i4.fields->>'f1')::int4 + 1 as v) as ss on true - left join tenk1 t on (t.fields->>'unique2')::int4 = (ss.v)::int4 -where q2::int8 = 456; - q1 | q2 | v | unique2 ------+-----+---+--------- - 123 | 456 | | -(1 row) - --- bug #8444: we've historically allowed duplicate aliases within aliased JOINs ---Testcase 413: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = f1; -- error -ERROR: column reference "f1" is ambiguous -LINE 2: ...ct (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = f1; - ^ ---Testcase 414: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = y.f1; -- error -ERROR: invalid reference to FROM-clause entry for table "y" -LINE 2: ...t (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = y.f1; - ^ -HINT: There is an entry for table "y", but it cannot be referenced from this part of the query. ---Testcase 415: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y(ff)) j on q1 = f1; -- ok - q1 | q2 | f1 | ff -----+----+----+---- -(0 rows) - --- --- Test hints given on incorrect column references are useful --- ---Testcase 416: -select( t1.ffields->>'unique1')::int4 unique1 from - tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, prefer "t1" suggestion -ERROR: column t1.ffields does not exist -LINE 1: select( t1.ffields->>'unique1')::int4 unique1 from - ^ -HINT: Perhaps you meant to reference the column "t1.fields". ---Testcase 417: -select (t2.ffields->>'unique1')::int4 unique1 from - tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, prefer "t2" suggestion -ERROR: column t2.ffields does not exist -LINE 1: select (t2.ffields->>'unique1')::int4 unique1 from - ^ -HINT: Perhaps you meant to reference the column "t2.fields". ---Testcase 418: -select (ffields->>'unique1')::int4 unique1 from - tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, suggest both at once -ERROR: column "ffields" does not exist -LINE 1: select (ffields->>'unique1')::int4 unique1 from - ^ -HINT: Perhaps you meant to reference the column "t1.fields" or the column "t2.fields". --- --- Take care to reference the correct RTE --- ---Testcase 556: -select atts.relid::regclass, s.* from pg_stats s join - pg_attribute a on s.attname = a.attname and s.tablename = - a.attrelid::regclass::text join (select unnest(indkey) attnum, - indexrelid from pg_index i) atts on atts.attnum = a.attnum where - schemaname != 'pg_catalog'; -ERROR: column atts.relid does not exist -LINE 1: select atts.relid::regclass, s.* from pg_stats s join - ^ --- --- Test LATERAL --- ---Testcase 419: -select unique2, x.* -from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1 a) a, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b where f1 = a.unique1) x; - unique2 | f1 ----------+---- - 9998 | 0 -(1 row) - ---Testcase 420: -explain (costs off) - select unique2, x.* - from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1 a) a, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b where f1 = a.unique1) x; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: ((((a.fields ->> 'unique1'::text))::integer) = (((b.fields ->> 'f1'::text))::integer)) - -> Sort - Sort Key: (((a.fields ->> 'unique1'::text))::integer) - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: (((b.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl b -(8 rows) - ---Testcase 421: -select unique2, x.* -from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x, lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; - unique2 | f1 ----------+---- - 9998 | 0 -(1 row) - ---Testcase 422: -explain (costs off) - select unique2, x.* - from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x, lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: ((((x.fields ->> 'f1'::text))::integer) = (((tenk1.fields ->> 'unique1'::text))::integer)) - -> Sort - Sort Key: (((x.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl x - -> Sort - Sort Key: (((tenk1.fields ->> 'unique1'::text))::integer) - -> Foreign Scan on tenk1 -(8 rows) - ---Testcase 423: -explain (costs off) - select unique2, x.* - from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x cross join lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Merge Join - Merge Cond: ((((x.fields ->> 'f1'::text))::integer) = (((tenk1.fields ->> 'unique1'::text))::integer)) - -> Sort - Sort Key: (((x.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl x - -> Sort - Sort Key: (((tenk1.fields ->> 'unique1'::text))::integer) - -> Foreign Scan on tenk1 -(8 rows) - ---Testcase 424: -select unique2, x.* -from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x left join lateral (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss on true; - unique2 | f1 ----------+------------- - | -2147483647 - | -123456 - 9998 | 0 - | 123456 - | 2147483647 -(5 rows) - ---Testcase 425: -explain (costs off) - select unique2, x.* - from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x left join lateral (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss on true; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Merge Left Join - Merge Cond: ((((x.fields ->> 'f1'::text))::integer) = (((tenk1.fields ->> 'unique1'::text))::integer)) - -> Sort - Sort Key: (((x.fields ->> 'f1'::text))::integer) - -> Foreign Scan on int4_tbl x - -> Sort - Sort Key: (((tenk1.fields ->> 'unique1'::text))::integer) - -> Foreign Scan on tenk1 -(8 rows) - --- check scoping of lateral versus parent references --- the first of these should return int8_tbl.q2, the second int8_tbl.q1 ---Testcase 426: -select *, (select r from (select q1 as q2) x, (select q2 as r) y) from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl; - q1 | q2 | r -------------------+-------------------+------------------- - 123 | 456 | 456 - 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | -4567890123456789 -(5 rows) - ---Testcase 427: -select *, (select r from (select q1 as q2) x, lateral (select q2 as r) y) from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl; - q1 | q2 | r -------------------+-------------------+------------------ - 123 | 456 | 123 - 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 -(5 rows) - --- lateral with function in FROM ---Testcase 428: -select count(*) from tenk1 a, lateral generate_series(1, (fields->>'two')::int4) g; - count -------- - 5000 -(1 row) - ---Testcase 429: -explain (costs off) - select count(*) from tenk1 a, lateral generate_series(1, (fields->>'two')::int4) g; - QUERY PLAN ------------------------------------------------- - Aggregate - -> Nested Loop - -> Foreign Scan on tenk1 a - -> Function Scan on generate_series g -(4 rows) - ---Testcase 430: -explain (costs off) - select count(*) from tenk1 a cross join lateral generate_series(1,(fields->>'two')::int4) g; - QUERY PLAN ------------------------------------------------- - Aggregate - -> Nested Loop - -> Foreign Scan on tenk1 a - -> Function Scan on generate_series g -(4 rows) - --- don't need the explicit LATERAL keyword for functions ---Testcase 431: -explain (costs off) - select count(*) from tenk1 a, generate_series(1,(fields->>'two')::int4) g; - QUERY PLAN ------------------------------------------------- - Aggregate - -> Nested Loop - -> Foreign Scan on tenk1 a - -> Function Scan on generate_series g -(4 rows) - --- lateral with UNION ALL subselect ---Testcase 432: -explain (costs off) - select * from generate_series(100,200) g, - lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a where g = (q1)::int8 union all - select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b where g = (q2)::int8) ss; - QUERY PLAN ------------------------------------------- - Nested Loop - -> Function Scan on generate_series g - -> Append - -> Foreign Scan on int8_tbl a - -> Foreign Scan on int8_tbl b -(5 rows) - ---Testcase 433: -select * from generate_series(100,200) g, - lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a where g = (q1)::int8 union all - select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b where g = (q2)::int8) ss; - g | q1 | q2 ------+------------------+------------------ - 123 | 123 | 456 - 123 | 123 | 4567890123456789 - 123 | 4567890123456789 | 123 -(3 rows) - --- lateral with VALUES ---Testcase 434: -explain (costs off) - select count(*) from tenk1 a, - tenk1 b join lateral (values(a.fields->>'unique1')) ss(x) on b.fields->>'unique2' = ss.x; - QUERY PLAN -------------------------------------------------------------------------------------------- - Aggregate - -> Merge Join - Merge Cond: (((a.fields ->> 'unique1'::text)) = ((b.fields ->> 'unique2'::text))) - -> Sort - Sort Key: ((a.fields ->> 'unique1'::text)) - -> Foreign Scan on tenk1 a - -> Sort - Sort Key: ((b.fields ->> 'unique2'::text)) - -> Foreign Scan on tenk1 b -(9 rows) - ---Testcase 435: -select count(*) from tenk1 a, - tenk1 b join lateral (values(a.fields->>'unique1')) ss(x) on b.fields->>'unique2' = ss.x; - count -------- - 10000 -(1 row) - --- lateral with VALUES, no flattening possible ---Testcase 436: -explain (costs off) - select count(*) from tenk1 a, - tenk1 b join lateral (values((a.fields->>'unique1')::int4),(-1)) ss(x) on (b.fields->>'unique2')::int4 = (ss.x)::int; - QUERY PLAN ----------------------------------------------------------------------------------------- - Aggregate - -> Merge Join - Merge Cond: ((((b.fields ->> 'unique2'::text))::integer) = "*VALUES*".column1) - -> Sort - Sort Key: (((b.fields ->> 'unique2'::text))::integer) - -> Foreign Scan on tenk1 b - -> Sort - Sort Key: "*VALUES*".column1 - -> Nested Loop - -> Foreign Scan on tenk1 a - -> Values Scan on "*VALUES*" -(11 rows) - ---Testcase 437: -select count(*) from tenk1 a, - tenk1 b join lateral (values((a.fields->>'unique1')::int4),(-1)) ss(x) on (b.fields->>'unique2')::int4 = (ss.x)::int; - count -------- - 10000 -(1 row) - --- lateral injecting a strange outer join condition ---Testcase 438: -explain (costs off) - select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL x) x left join lateral (select a.q1 from (select (fields->>'f1')::int4 f1 from INT4_TBL y) y) ss(z) - on x.q2 = ss.z - order by (a.q1)::int8, (a.q2)::int8, (x.q1)::int8, (x.q2)::int8, (ss.z)::int8; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Sort Key: (((a.fields ->> 'q1'::text))::bigint), (((a.fields ->> 'q2'::text))::bigint), (((x.fields ->> 'q1'::text))::bigint), (((x.fields ->> 'q2'::text))::bigint), (((a.fields ->> 'q1'::text))::bigint) - -> Nested Loop - -> Foreign Scan on int8_tbl a - -> Merge Left Join - Merge Cond: ((((x.fields ->> 'q2'::text))::bigint) = (((a.fields ->> 'q1'::text))::bigint)) - -> Sort - Sort Key: (((x.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on int8_tbl x - -> Sort - Sort Key: (((a.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on int4_tbl y -(12 rows) - ---Testcase 439: -select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL x) x left join lateral (select a.q1 from (select (fields->>'f1')::int4 f1 from INT4_TBL y) y) ss(z) - on x.q2 = ss.z - order by (a.q1)::int8, (a.q2)::int8, (x.q1)::int8, (x.q2)::int8, (ss.z)::int8; - q1 | q2 | q1 | q2 | z -------------------+-------------------+------------------+-------------------+------------------ - 123 | 456 | 123 | 456 | - 123 | 456 | 123 | 4567890123456789 | - 123 | 456 | 4567890123456789 | -4567890123456789 | - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 4567890123456789 | - 123 | 4567890123456789 | 123 | 456 | - 123 | 4567890123456789 | 123 | 4567890123456789 | - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | - 4567890123456789 | -4567890123456789 | 123 | 456 | - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | -4567890123456789 | - 4567890123456789 | -4567890123456789 | 4567890123456789 | 123 | - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | -4567890123456789 | - 4567890123456789 | 123 | 4567890123456789 | 123 | - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 456 | - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 -(57 rows) - --- lateral reference to a join alias variable ---Testcase 440: -select * from (select (fields->>'f1')::int4/2 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4, - lateral (select x) ss2(y); - x | f1 | y ----+----+--- - 0 | 0 | 0 -(1 row) - ---Testcase 441: -select * from (select (fields->>'f1')::int4 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4, - lateral (values(x)) ss2(y); - x | f1 | y --------------+-------------+------------- - -2147483647 | -2147483647 | -2147483647 - -123456 | -123456 | -123456 - 0 | 0 | 0 - 123456 | 123456 | 123456 - 2147483647 | 2147483647 | 2147483647 -(5 rows) - ---Testcase 442: -select * from ((select (fields->>'f1')::int4/2 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4) j, - lateral (select x) ss2(y); - x | f1 | y ----+----+--- - 0 | 0 | 0 -(1 row) - --- lateral references requiring pullup ---Testcase 443: -select * from (values(1)) x(lb), - lateral generate_series(lb,4) x4; - lb | x4 -----+---- - 1 | 1 - 1 | 2 - 1 | 3 - 1 | 4 -(4 rows) - ---Testcase 444: -select * from (select (fields->>'f1')::int4/1000000000 from int4_tbl) x(lb), - lateral generate_series(lb,4) x4; - lb | x4 -----+---- - 0 | 0 - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 0 - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 0 - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 2 | 2 - 2 | 3 - 2 | 4 - -2 | -2 - -2 | -1 - -2 | 0 - -2 | 1 - -2 | 2 - -2 | 3 - -2 | 4 -(25 rows) - ---Testcase 445: -select * from (values(1)) x(lb), - lateral (values(lb)) y(lbcopy); - lb | lbcopy -----+-------- - 1 | 1 -(1 row) - ---Testcase 446: -select * from (values(1)) x(lb), - lateral (select lb from int4_tbl) y(lbcopy); - lb | lbcopy -----+-------- - 1 | 1 - 1 | 1 - 1 | 1 - 1 | 1 - 1 | 1 -(5 rows) - ---Testcase 447: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (values(x.q1,y.q1,y.q2)) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; - q1 | q2 | q1 | q2 | xq1 | yq1 | yq2 -------------------+-------------------+------------------+-------------------+------------------+------------------+------------------- - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | -4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 123 | 456 | | | 123 | | - 4567890123456789 | 123 | 123 | 456 | 4567890123456789 | 123 | 456 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | 4567890123456789 | | -(10 rows) - ---Testcase 448: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; - q1 | q2 | q1 | q2 | xq1 | yq1 | yq2 -------------------+-------------------+------------------+-------------------+------------------+------------------+------------------- - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | -4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 123 | 456 | | | 123 | | - 4567890123456789 | 123 | 123 | 456 | 4567890123456789 | 123 | 456 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | 4567890123456789 | | -(10 rows) - ---Testcase 449: -select x.* from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; - q1 | q2 -------------------+------------------- - 123 | 4567890123456789 - 123 | 4567890123456789 - 123 | 4567890123456789 - 123 | 456 - 4567890123456789 | 123 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(10 rows) - ---Testcase 450: -select v.* from - (int8_tbl x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) - left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, - lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 union all select (x.fields->>'q2')::int8,(y.q2)::int8) v(vx,vy); - vx | vy --------------------+------------------- - 4567890123456789 | - -4567890123456789 | - 4567890123456789 | 123 - 123 | 456 - 4567890123456789 | 123 - 123 | 4567890123456789 - 123 | - 456 | - 123 | 4567890123456789 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(20 rows) - ---Testcase 451: -select v.* from - (int8_tbl x left join (select (fields->>'q1')::int8 q1,(select coalesce((fields->>'q2')::int8,0)) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) - left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, - lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 union all select (x.fields->>'q2')::int8,(y.q2)::int8) v(vx,vy); - vx | vy --------------------+------------------- - 4567890123456789 | - -4567890123456789 | - 4567890123456789 | 123 - 123 | 456 - 4567890123456789 | 123 - 123 | 4567890123456789 - 123 | - 456 | - 123 | 4567890123456789 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(20 rows) - ---Testcase 452: -select v.* from - (int8_tbl x left join (select (fields->>'q1')::int8 q1,(select coalesce((fields->>'q2')::int8,0)) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) - left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, - lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 from onerow union all select (x.fields->>'q2')::int8,(y.q2)::int8 from onerow) v(vx,vy); - vx | vy --------------------+------------------- - 4567890123456789 | - -4567890123456789 | - 4567890123456789 | 123 - 123 | 456 - 4567890123456789 | 123 - 123 | 4567890123456789 - 123 | - 456 | - 123 | 4567890123456789 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(20 rows) - ---Testcase 453: -explain (verbose, costs off) -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join - lateral (select *, a.q2 as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Nested Loop Left Join - Output: ((a.fields ->> 'q1'::text))::bigint, ((a.fields ->> 'q2'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((b.fields ->> 'q2'::text))::bigint, (((a.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl a - Output: a.fields - InfluxDB query: SELECT * FROM "int8_tbl" - -> Foreign Scan on public.int8_tbl b - Output: b.fields, ((a.fields ->> 'q2'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" WHERE (($1 = "q1")) -(8 rows) - ---Testcase 454: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join - lateral (select *, a.q2 as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; - q1 | q2 | q1 | q2 | x -------------------+-------------------+------------------+-------------------+------------------ - 123 | 456 | | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | -(10 rows) - ---Testcase 455: -explain (verbose, costs off) -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join - lateral (select *, coalesce((a.q2)::int8, 42) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Nested Loop Left Join - Output: ((a.fields ->> 'q1'::text))::bigint, ((a.fields ->> 'q2'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((b.fields ->> 'q2'::text))::bigint, (COALESCE(((a.fields ->> 'q2'::text))::bigint, '42'::bigint)) - -> Foreign Scan on public.int8_tbl a - Output: a.fields - InfluxDB query: SELECT * FROM "int8_tbl" - -> Foreign Scan on public.int8_tbl b - Output: b.fields, COALESCE(((a.fields ->> 'q2'::text))::bigint, '42'::bigint) - InfluxDB query: SELECT * FROM "int8_tbl" WHERE (($1 = "q1")) -(8 rows) - ---Testcase 456: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join - lateral (select *, coalesce((a.q2)::int8, 42) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; - q1 | q2 | q1 | q2 | x -------------------+-------------------+------------------+-------------------+------------------ - 123 | 456 | | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | -(10 rows) - --- lateral can result in join conditions appearing below their --- real semantic level ---Testcase 457: -explain (verbose, costs off) -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join - lateral (select * from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Merge Left Join - Output: (((i.fields ->> 'f1'::text))::integer), ((j.fields ->> 'f1'::text))::smallint - Merge Cond: ((((i.fields ->> 'f1'::text))::integer) = (((j.fields ->> 'f1'::text))::smallint)) - -> Sort - Output: i.fields, (((i.fields ->> 'f1'::text))::integer) - Sort Key: (((i.fields ->> 'f1'::text))::integer) - -> Foreign Scan on public.int4_tbl i - Output: i.fields, ((i.fields ->> 'f1'::text))::integer - InfluxDB query: SELECT * FROM "int4_tbl" - -> Sort - Output: j.fields, (((j.fields ->> 'f1'::text))::smallint) - Sort Key: (((j.fields ->> 'f1'::text))::smallint) - -> Foreign Scan on public.int2_tbl j - Output: j.fields, ((j.fields ->> 'f1'::text))::smallint - InfluxDB query: SELECT * FROM "int2_tbl" -(15 rows) - ---Testcase 458: -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join - lateral (select * from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; - f1 | f1 --------------+---- - -2147483647 | - -123456 | - 0 | 0 - 123456 | - 2147483647 | -(5 rows) - ---Testcase 459: -explain (verbose, costs off) -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join - lateral (select coalesce(i) from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; - QUERY PLAN -------------------------------------------------------------------------------------------------------- - Nested Loop Left Join - Output: ((i.fields ->> 'f1'::text))::integer, (COALESCE(ROW(((i.fields ->> 'f1'::text))::integer))) - -> Foreign Scan on public.int4_tbl i - Output: i.fields - InfluxDB query: SELECT * FROM "int4_tbl" - -> Foreign Scan on public.int2_tbl j - Output: j.fields, COALESCE(ROW(((i.fields ->> 'f1'::text))::integer)) - InfluxDB query: SELECT * FROM "int2_tbl" WHERE (($1 = "f1")) -(8 rows) - ---Testcase 460: -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join - lateral (select coalesce(i) from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; - f1 | coalesce --------------+---------- - 0 | (0) - 123456 | - -123456 | - 2147483647 | - -2147483647 | -(5 rows) - ---Testcase 461: -explain (verbose, costs off) -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a, - lateral ( - select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c on (b.f1 = q1 and a.f1 = q2) - ) ss; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: ((a.fields ->> 'f1'::text))::integer, (((b.fields ->> 'f1'::text))::integer), (((c.fields ->> 'q1'::text))::bigint), (((c.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int4_tbl a - Output: a.fields - InfluxDB query: SELECT * FROM "int4_tbl" - -> Hash Left Join - Output: ((b.fields ->> 'f1'::text))::integer, ((c.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q2'::text))::bigint - Hash Cond: (((b.fields ->> 'f1'::text))::integer = ((c.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on public.int4_tbl b - Output: b.fields - InfluxDB query: SELECT * FROM "int4_tbl" - -> Hash - Output: c.fields - -> Foreign Scan on public.int8_tbl c - Output: c.fields - InfluxDB query: SELECT * FROM "int8_tbl" WHERE (($1 = "q2")) -(16 rows) - ---Testcase 462: -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a, - lateral ( - select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c on (b.f1 = q1 and a.f1 = q2) - ) ss; - f1 | f1 | q1 | q2 --------------+-------------+----+---- - 0 | 0 | | - 0 | 123456 | | - 0 | -123456 | | - 0 | 2147483647 | | - 0 | -2147483647 | | - 123456 | 0 | | - 123456 | 123456 | | - 123456 | -123456 | | - 123456 | 2147483647 | | - 123456 | -2147483647 | | - -123456 | 0 | | - -123456 | 123456 | | - -123456 | -123456 | | - -123456 | 2147483647 | | - -123456 | -2147483647 | | - 2147483647 | 0 | | - 2147483647 | 123456 | | - 2147483647 | -123456 | | - 2147483647 | 2147483647 | | - 2147483647 | -2147483647 | | - -2147483647 | 0 | | - -2147483647 | 123456 | | - -2147483647 | -123456 | | - -2147483647 | 2147483647 | | - -2147483647 | -2147483647 | | -(25 rows) - --- lateral reference in a PlaceHolderVar evaluated at join level ---Testcase 463: -explain (verbose, costs off) -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join lateral - (select (b.fields->>'q1')::int8 as bq1, (c.fields->>'q1')::int8 as cq1, least(a.q1,(b.fields->>'q1')::int8,(c.fields->>'q1')::int8) from - int8_tbl b cross join int8_tbl c) ss - on a.q2 = ss.bq1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop Left Join - Output: ((a.fields ->> 'q1'::text))::bigint, ((a.fields ->> 'q2'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q1'::text))::bigint, (LEAST(((a.fields ->> 'q1'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q1'::text))::bigint)) - -> Foreign Scan on public.int8_tbl a - Output: a.fields - InfluxDB query: SELECT * FROM "int8_tbl" - -> Nested Loop - Output: b.fields, c.fields, LEAST(((a.fields ->> 'q1'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on public.int8_tbl b - Output: b.fields - InfluxDB query: SELECT * FROM "int8_tbl" WHERE (($1 = "q1")) - -> Materialize - Output: c.fields - -> Foreign Scan on public.int8_tbl c - Output: c.fields - InfluxDB query: SELECT * FROM "int8_tbl" -(15 rows) - ---Testcase 464: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join lateral - (select (b.fields->>'q1')::int8 as bq1, (c.fields->>'q1')::int8 as cq1, least(a.q1,(b.fields->>'q1')::int8,(c.fields->>'q1')::int8) from - int8_tbl b cross join int8_tbl c) ss - on a.q2 = ss.bq1; - q1 | q2 | bq1 | cq1 | least -------------------+-------------------+------------------+------------------+------------------ - 123 | 456 | | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | -(42 rows) - --- case requiring nested PlaceHolderVars ---Testcase 465: -explain (verbose, costs off) -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c left join ( - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'q1')::int8 q1, coalesce((fields->>'q2')::int8,42) as x from int8_tbl b) ss1 - on a.q2 = ss1.q1 - cross join - lateral (select (fields->>'q1')::int8 q1, coalesce(ss1.x,(fields->>'q2')::int8) as y from int8_tbl d) ss2 - ) on c.q2 = ss2.q1, - lateral (select ss2.y offset 0) ss3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Nested Loop - Output: ((c.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q2'::text))::bigint, ((a.fields ->> 'q1'::text))::bigint, ((a.fields ->> 'q2'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q1'::text))::bigint, (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)), ((COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint))) - -> Merge Left Join - Output: c.fields, a.fields, b.fields, d.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)) - Merge Cond: ((((c.fields ->> 'q2'::text))::bigint) = (((d.fields ->> 'q1'::text))::bigint)) - -> Sort - Output: c.fields, (((c.fields ->> 'q2'::text))::bigint) - Sort Key: (((c.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl c - Output: c.fields, ((c.fields ->> 'q2'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Materialize - Output: a.fields, b.fields, d.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)), (((d.fields ->> 'q1'::text))::bigint) - -> Sort - Output: a.fields, b.fields, d.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)), (((d.fields ->> 'q1'::text))::bigint) - Sort Key: (((d.fields ->> 'q1'::text))::bigint) - -> Nested Loop - Output: a.fields, b.fields, d.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)), ((d.fields ->> 'q1'::text))::bigint - -> Merge Right Join - Output: a.fields, b.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)) - Merge Cond: ((((b.fields ->> 'q1'::text))::bigint) = (((a.fields ->> 'q2'::text))::bigint)) - -> Sort - Output: b.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), (((b.fields ->> 'q1'::text))::bigint) - Sort Key: (((b.fields ->> 'q1'::text))::bigint) - -> Foreign Scan on public.int8_tbl b - Output: b.fields, COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint), ((b.fields ->> 'q1'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Sort - Output: a.fields, (((a.fields ->> 'q2'::text))::bigint) - Sort Key: (((a.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl a - Output: a.fields, ((a.fields ->> 'q2'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Foreign Scan on public.int8_tbl d - Output: d.fields, COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint) - InfluxDB query: SELECT * FROM "int8_tbl" - -> Result - Output: (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)) -(38 rows) - --- case that breaks the old ph_may_need optimization ---Testcase 466: -explain (verbose, costs off) -select c.*,a.*,ss1.q1,ss2.q1,ss3.* from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c left join ( - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join - (select q1, coalesce(q2,f1) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b, (select (fields->>'f1')::int4 f1 from INT4_TBL b2) b2 - where (q1)::int8 < (f1)::int4) ss1 - on a.q2 = ss1.q1 - cross join - lateral (select (fields->>'q1')::int8 q1, coalesce(ss1.x,(fields->>'q2')::int8) as y from int8_tbl d) ss2 - ) on c.q2 = ss2.q1, - lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i where (ss2.y)::int8 > (f1)::int4) ss3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: ((c.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q2'::text))::bigint, ((a.fields ->> 'q1'::text))::bigint, ((a.fields ->> 'q2'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((d.fields ->> 'q1'::text))::bigint, ((i.fields ->> 'f1'::text))::integer - Join Filter: ((COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint)) > ((i.fields ->> 'f1'::text))::integer) - -> Merge Left Join - Output: c.fields, a.fields, b.fields, d.fields, (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint)) - Merge Cond: ((((c.fields ->> 'q2'::text))::bigint) = (((d.fields ->> 'q1'::text))::bigint)) - -> Sort - Output: c.fields, (((c.fields ->> 'q2'::text))::bigint) - Sort Key: (((c.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl c - Output: c.fields, ((c.fields ->> 'q2'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Materialize - Output: a.fields, b.fields, d.fields, (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint)), (((d.fields ->> 'q1'::text))::bigint) - -> Sort - Output: a.fields, b.fields, d.fields, (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint)), (((d.fields ->> 'q1'::text))::bigint) - Sort Key: (((d.fields ->> 'q1'::text))::bigint) - -> Nested Loop - Output: a.fields, b.fields, d.fields, (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint)), ((d.fields ->> 'q1'::text))::bigint - -> Merge Left Join - Output: a.fields, b.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)) - Merge Cond: ((((a.fields ->> 'q2'::text))::bigint) = (((b.fields ->> 'q1'::text))::bigint)) - -> Sort - Output: a.fields, (((a.fields ->> 'q2'::text))::bigint) - Sort Key: (((a.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl a - Output: a.fields, ((a.fields ->> 'q2'::text))::bigint - InfluxDB query: SELECT * FROM "int8_tbl" - -> Materialize - Output: b.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), (((b.fields ->> 'q1'::text))::bigint) - -> Sort - Output: b.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), (((b.fields ->> 'q1'::text))::bigint) - Sort Key: (((b.fields ->> 'q1'::text))::bigint) - -> Nested Loop - Output: b.fields, COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint), ((b.fields ->> 'q1'::text))::bigint - Join Filter: (((b.fields ->> 'q1'::text))::bigint < ((b2.fields ->> 'f1'::text))::integer) - -> Foreign Scan on public.int8_tbl b - Output: b.fields - InfluxDB query: SELECT * FROM "int8_tbl" - -> Materialize - Output: b2.fields - -> Foreign Scan on public.int4_tbl b2 - Output: b2.fields - InfluxDB query: SELECT * FROM "int4_tbl" - -> Foreign Scan on public.int8_tbl d - Output: d.fields, COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint) - InfluxDB query: SELECT * FROM "int8_tbl" - -> Materialize - Output: i.fields - -> Foreign Scan on public.int4_tbl i - Output: i.fields - InfluxDB query: SELECT * FROM "int4_tbl" -(52 rows) - --- check processing of postponed quals (bug #9041) ---Testcase 467: -explain (verbose, costs off) -select * from - (select 1 as x offset 0) x cross join (select 2 as y offset 0) y - left join lateral ( - select * from (select 3 as z offset 0) z where z.z = x.x - ) zz on zz.z = y.y; - QUERY PLAN ----------------------------------------------- - Nested Loop Left Join - Output: (1), (2), (3) - Join Filter: (((3) = (1)) AND ((3) = (2))) - -> Nested Loop - Output: (1), (2) - -> Result - Output: 1 - -> Result - Output: 2 - -> Result - Output: 3 -(11 rows) - --- check dummy rels with lateral references (bug #15694) ---Testcase 468: -explain (verbose, costs off) -select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join lateral - (select *, i8.q2 from (select (fields->>'f1')::int4 f1 from INT4_TBL int4_tbl) int4_tbl where false) ss on true; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop Left Join - Output: ((i8.fields ->> 'q1'::text))::bigint, ((i8.fields ->> 'q2'::text))::bigint, ((fields ->> 'f1'::text))::integer, (((i8.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl i8 - Output: i8.fields - InfluxDB query: SELECT * FROM "int8_tbl" - -> Result - Output: fields, ((i8.fields ->> 'q2'::text))::bigint - One-Time Filter: false -(8 rows) - ---Testcase 469: -explain (verbose, costs off) -select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join lateral - (select *, i8.q2 from (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1, (select (fields->>'f1')::int4 f1 from INT4_TBL i2) i2 where false) ss on true; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop Left Join - Output: ((i8.fields ->> 'q1'::text))::bigint, ((i8.fields ->> 'q2'::text))::bigint, ((fields ->> 'f1'::text))::integer, ((fields ->> 'f1'::text))::integer, (((i8.fields ->> 'q2'::text))::bigint) - -> Foreign Scan on public.int8_tbl i8 - Output: i8.fields - InfluxDB query: SELECT * FROM "int8_tbl" - -> Result - Output: fields, fields, ((i8.fields ->> 'q2'::text))::bigint - One-Time Filter: false -(8 rows) - --- check handling of nested appendrels inside LATERAL ---Testcase 470: -select * from - ((select 2 as v) union all (select 3 as v)) as q1 - cross join lateral - ((select * from - ((select 4 as v) union all (select 5 as v)) as q3) - union all - (select q1.v) - ) as q2; - v | v ----+--- - 2 | 4 - 2 | 5 - 2 | 2 - 3 | 4 - 3 | 5 - 3 | 3 -(6 rows) - --- check we don't try to do a unique-ified semijoin with LATERAL ---Testcase 471: -explain (verbose, costs off) -select * from - (values (0,9998), (1,1000)) v(id,x), - lateral (select (fields->>'f1')::int4 f1 from INT4_TBL - where (fields->>'f1')::int4 = any (select (fields->>'unique1')::int4 from tenk1 - where (fields->>'unique2')::int4 = v.x offset 0)) ss; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: "*VALUES*".column1, "*VALUES*".column2, ((int4_tbl.fields ->> 'f1'::text))::integer - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1, "*VALUES*".column2 - -> Hash Semi Join - Output: int4_tbl.fields - Hash Cond: (((int4_tbl.fields ->> 'f1'::text))::integer = (((tenk1.fields ->> 'unique1'::text))::integer)) - -> Foreign Scan on public.int4_tbl - Output: int4_tbl.fields - InfluxDB query: SELECT * FROM "int4_tbl" - -> Hash - Output: (((tenk1.fields ->> 'unique1'::text))::integer) - -> Foreign Scan on public.tenk1 - Output: ((tenk1.fields ->> 'unique1'::text))::integer - InfluxDB query: SELECT "unique1" FROM "tenk" WHERE (("unique2" = $1)) -(15 rows) - ---Testcase 472: -select * from - (values (0,9998), (1,1000)) v(id,x), - lateral (select (fields->>'f1')::int4 f1 from INT4_TBL - where (fields->>'f1')::int4 = any (select (fields->>'unique1')::int4 from tenk1 - where (fields->>'unique2')::int4 = v.x offset 0)) ss; - id | x | f1 -----+------+---- - 0 | 9998 | 0 -(1 row) - --- check proper extParam/allParam handling (this isn't exactly a LATERAL issue, --- but we can make the test case much more compact with LATERAL) ---Testcase 473: -explain (verbose, costs off) -select * from (values (0), (1)) v(id), -lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1, - lateral (select * from - (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 - where q1 = any (select (fields->>'q2')::int8 from int8_tbl t3 - where (fields->>'q2')::int8 = (select greatest(t1.q1,t2.q2)) - and (select v.id=0)) offset 0) ss2) ss - where (t1.q1)::int8 = (ss.q2)::int8) ss0; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: "*VALUES*".column1, ((int8_tbl.fields ->> 'q1'::text))::bigint, ((int8_tbl.fields ->> 'q2'::text))::bigint, ss2.q1, ss2.q2 - -> Foreign Scan on public.int8_tbl - Output: int8_tbl.fields - InfluxDB query: SELECT * FROM "int8_tbl" - -> Nested Loop - Output: "*VALUES*".column1, ss2.q1, ss2.q2 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1 - -> Subquery Scan on ss2 - Output: ss2.q1, ss2.q2 - Filter: (((int8_tbl.fields ->> 'q1'::text))::bigint = ss2.q2) - -> Foreign Scan on public.int8_tbl int8_tbl_1 - Output: ((int8_tbl_1.fields ->> 'q1'::text))::bigint, ((int8_tbl_1.fields ->> 'q2'::text))::bigint - Filter: (SubPlan 3) - InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" - SubPlan 3 - -> Result - Output: ((t3.fields ->> 'q2'::text))::bigint - One-Time Filter: $4 - InitPlan 1 (returns $2) - -> Result - Output: GREATEST((($0 ->> 'q1'::text))::bigint, ((int8_tbl_1.fields ->> 'q2'::text))::bigint) - InitPlan 2 (returns $4) - -> Result - Output: ($3 = 0) - -> Foreign Scan on public.int8_tbl t3 - Output: t3.fields - InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q2" = $1)) -(29 rows) - ---Testcase 474: -select * from (values (0), (1)) v(id), -lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1, - lateral (select * from - (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 - where q1 = any (select (fields->>'q2')::int8 from int8_tbl t3 - where (fields->>'q2')::int8 = (select greatest(t1.q1,t2.q2)) - and (select v.id=0)) offset 0) ss2) ss - where t1.q1 = ss.q2) ss0; - id | q1 | q2 | q1 | q2 -----+------------------+-------------------+------------------+------------------ - 0 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 0 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 0 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 -(3 rows) - --- test some error cases where LATERAL should have been used but wasn't ---Testcase 475: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a, (select fields->>'f1' as g) ss; -ERROR: column "fields" does not exist -LINE 1: ...1,(fields->>'g')::int4 g from int4_tbl a, (select fields->>'... - ^ -HINT: There is a column named "fields" in table "a", but it cannot be referenced from this part of the query. ---Testcase 476: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a, (select a.fields->>'f1' as g) ss; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: ...1,(fields->>'g')::int4 g from int4_tbl a, (select a.fields->... - ^ -HINT: There is an entry for table "a", but it cannot be referenced from this part of the query. ---Testcase 477: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a cross join (select fields->>'f1' as g) ss; -ERROR: column "fields" does not exist -LINE 1: ...>>'g')::int4 g from int4_tbl a cross join (select fields->>'... - ^ -HINT: There is a column named "fields" in table "a", but it cannot be referenced from this part of the query. ---Testcase 478: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a cross join (select a.fields->>'f1' as g) ss; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: ...>>'g')::int4 g from int4_tbl a cross join (select a.fields->... - ^ -HINT: There is an entry for table "a", but it cannot be referenced from this part of the query. --- SQL:2008 says the left table is in scope but illegal to access here ---Testcase 479: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a right join lateral generate_series(0, (a.fields->>'f1')::int4) g on true; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: ...int4_tbl a right join lateral generate_series(0, (a.fields->... - ^ -DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. ---Testcase 480: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a full join lateral generate_series(0, (a.fields->>'f1')::int4) g on true; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: ... int4_tbl a full join lateral generate_series(0, (a.fields->... - ^ -DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. --- check we complain about ambiguous table references ---Testcase 481: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x cross join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join lateral (select x.f1) ss); -ERROR: table reference "x" is ambiguous -LINE 2: ...t4 f1 from INT4_TBL) x cross join lateral (select x.f1) ss); - ^ --- LATERAL can be used to put an aggregate into the FROM clause of its query ---Testcase 482: -select 1 from tenk1 a, lateral (select max((a.fields->>'unique1')::int4) from int4_tbl b) ss; -ERROR: aggregate functions are not allowed in FROM clause of their own query level -LINE 1: select 1 from tenk1 a, lateral (select max((a.fields->>'uniq... - ^ --- check behavior of LATERAL in UPDATE/DELETE ---Testcase 483: -create temp table xx1 as select fields->>'f1' as x1, -(fields->>'f1')::int4 as x2 from int4_tbl; --- error, can't do this: ---Testcase 484: -update xx1 set x2 = f1 from (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; -ERROR: column "x1" does not exist -LINE 1: ...->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; - ^ -HINT: There is a column named "x1" in table "xx1", but it cannot be referenced from this part of the query. ---Testcase 485: -update xx1 set x2 = f1 from (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss... - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. --- can't do it even with LATERAL: ---Testcase 486: -update xx1 set x2 = f1 from lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. --- we might in future allow something like this, but for now it's an error: ---Testcase 487: -update xx1 set x2 = f1 from xx1, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; -ERROR: table name "xx1" specified more than once --- also errors: ---Testcase 488: -delete from xx1 using (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; -ERROR: column "x1" does not exist -LINE 1: ...->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; - ^ -HINT: There is a column named "x1" in table "xx1", but it cannot be referenced from this part of the query. ---Testcase 489: -delete from xx1 using (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss... - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. ---Testcase 490: -delete from xx1 using lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. -/* --- Influx does not support partition table --- --- test LATERAL reference propagation down a multi-level inheritance hierarchy --- produced for a multi-level partitioned table hierarchy. --- -create table join_pt1 (a int, b int, c varchar) partition by range(a); -create table join_pt1p1 partition of join_pt1 for values from (0) to (100) partition by range(b); -create table join_pt1p2 partition of join_pt1 for values from (100) to (200); -create table join_pt1p1p1 partition of join_pt1p1 for values from (0) to (100); -insert into join_pt1 values (1, 1, 'x'), (101, 101, 'y'); -create table join_ut1 (a int, b int, c varchar); -insert into join_ut1 values (101, 101, 'y'), (2, 2, 'z'); -explain (verbose, costs off) -select t1.b, ss.phv from join_ut1 t1 left join lateral - (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv - from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss - on t1.a = ss.t2a order by t1.a; -select t1.b, ss.phv from join_ut1 t1 left join lateral - (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv - from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss - on t1.a = ss.t2a order by t1.a; - -drop table join_pt1; -drop table join_ut1; - --- --- test estimation behavior with multi-column foreign key and constant qual --- - -begin; - -create table fkest (x integer, x10 integer, x10b integer, x100 integer); -insert into fkest select x, x/10, x/10, x/100 from generate_series(1,1000) x; -create unique index on fkest(x, x10, x100); -analyze fkest; - -explain (costs off) -select * from fkest f1 - join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) - join fkest f3 on f1.x = f3.x - where f1.x100 = 2; - -alter table fkest add constraint fk - foreign key (x, x10b, x100) references fkest (x, x10, x100); - -explain (costs off) -select * from fkest f1 - join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) - join fkest f3 on f1.x = f3.x - where f1.x100 = 2; - -rollback; -*/ --- --- test that foreign key join estimation performs sanely for outer joins --- -begin; ---Testcase 491: -create foreign table fkest (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table fkest_nsc (a int, b int, c int) server influxdb_svr OPTIONS (table 'fkest'); ---Testcase 492: -create foreign table fkest1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table fkest1_nsc (a int, b int) server influxdb_svr OPTIONS (table 'fkest1'); ---Testcase 493: -insert into fkest_nsc select x/10, x%10, x from generate_series(1,1000) x; ---Testcase 494: -insert into fkest1_nsc select x/10, x%10 from generate_series(1,1000) x; ---Testcase 495: -explain (costs off) -select * -from (select (fields->>'a')::int a, (fields->>'b')::int b, (fields->>'c')::int c from fkest f) f - left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f1) f1 on (f.a)::int = (f1.a)::int and (f.b)::int = (f1.b)::int - left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f2) f2 on (f.a)::int = (f2.a)::int and (f.b)::int = (f2.b)::int - left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f3) f3 on (f.a)::int = (f3.a)::int and (f.b)::int = (f3.b)::int -where (f.c)::bigint = 1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Hash Right Join - Hash Cond: ((((f3.fields ->> 'a'::text))::integer = ((f.fields ->> 'a'::text))::integer) AND (((f3.fields ->> 'b'::text))::integer = ((f.fields ->> 'b'::text))::integer)) - -> Foreign Scan on fkest1 f3 - -> Hash - -> Hash Right Join - Hash Cond: ((((f2.fields ->> 'a'::text))::integer = ((f.fields ->> 'a'::text))::integer) AND (((f2.fields ->> 'b'::text))::integer = ((f.fields ->> 'b'::text))::integer)) - -> Foreign Scan on fkest1 f2 - -> Hash - -> Hash Right Join - Hash Cond: ((((f1.fields ->> 'a'::text))::integer = ((f.fields ->> 'a'::text))::integer) AND (((f1.fields ->> 'b'::text))::integer = ((f.fields ->> 'b'::text))::integer)) - -> Foreign Scan on fkest1 f1 - -> Hash - -> Foreign Scan on fkest f - Filter: ((((fields ->> 'c'::text))::integer)::bigint = 1) -(14 rows) - -rollback; --- --- test planner's ability to mark joins as unique --- ---Testcase 496: -create foreign table j1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j1_nsc (id int) server influxdb_svr OPTIONS (table 'j1'); ---Testcase 497: -create foreign table j2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j2_nsc (id int) server influxdb_svr OPTIONS (table 'j2'); ---Testcase 498: -create foreign table j3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j3_nsc (id int) server influxdb_svr OPTIONS (table 'j3'); ---Testcase 499: -insert into j1_nsc values(1),(2),(3); ---Testcase 500: -insert into j2_nsc values(1),(2),(3); ---Testcase 501: -insert into j3_nsc values(1),(1); --- ensure join is properly marked as unique ---Testcase 502: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Merge Join - Output: (((j1.fields ->> 'id'::text))::integer), (((j2.fields ->> 'id'::text))::integer) - Merge Cond: ((((j1.fields ->> 'id'::text))::integer) = (((j2.fields ->> 'id'::text))::integer)) - -> Sort - Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) - Sort Key: (((j1.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j1 - Output: j1.fields, ((j1.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j1" - -> Sort - Output: j2.fields, (((j2.fields ->> 'id'::text))::integer) - Sort Key: (((j2.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j2 - Output: j2.fields, ((j2.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j2" -(15 rows) - --- ensure join is not unique when not an equi-join ---Testcase 503: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int > (j2.id)::int; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Nested Loop - Output: ((j1.fields ->> 'id'::text))::integer, ((j2.fields ->> 'id'::text))::integer - Join Filter: (((j1.fields ->> 'id'::text))::integer > ((j2.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j1 - Output: j1.fields - InfluxDB query: SELECT * FROM "j1" - -> Materialize - Output: j2.fields - -> Foreign Scan on public.j2 - Output: j2.fields - InfluxDB query: SELECT * FROM "j2" -(11 rows) - --- ensure non-unique rel is not chosen as inner ---Testcase 504: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j3) j3 on (j1.id)::int = (j3.id)::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Merge Join - Output: (((j1.fields ->> 'id'::text))::integer), (((j3.fields ->> 'id'::text))::integer) - Merge Cond: ((((j1.fields ->> 'id'::text))::integer) = (((j3.fields ->> 'id'::text))::integer)) - -> Sort - Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) - Sort Key: (((j1.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j1 - Output: j1.fields, ((j1.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j1" - -> Sort - Output: j3.fields, (((j3.fields ->> 'id'::text))::integer) - Sort Key: (((j3.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j3 - Output: j3.fields, ((j3.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j3" -(15 rows) - --- ensure left join is marked as unique ---Testcase 505: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 left join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Merge Left Join - Output: (((j1.fields ->> 'id'::text))::integer), ((j2.fields ->> 'id'::text))::integer - Merge Cond: ((((j1.fields ->> 'id'::text))::integer) = (((j2.fields ->> 'id'::text))::integer)) - -> Sort - Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) - Sort Key: (((j1.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j1 - Output: j1.fields, ((j1.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j1" - -> Sort - Output: j2.fields, (((j2.fields ->> 'id'::text))::integer) - Sort Key: (((j2.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j2 - Output: j2.fields, ((j2.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j2" -(15 rows) - --- ensure right join is marked as unique ---Testcase 506: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 right join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Merge Left Join - Output: ((j1.fields ->> 'id'::text))::integer, (((j2.fields ->> 'id'::text))::integer) - Merge Cond: ((((j2.fields ->> 'id'::text))::integer) = (((j1.fields ->> 'id'::text))::integer)) - -> Sort - Output: j2.fields, (((j2.fields ->> 'id'::text))::integer) - Sort Key: (((j2.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j2 - Output: j2.fields, ((j2.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j2" - -> Sort - Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) - Sort Key: (((j1.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j1 - Output: j1.fields, ((j1.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j1" -(15 rows) - --- ensure full join is marked as unique ---Testcase 507: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 full join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Merge Full Join - Output: ((j1.fields ->> 'id'::text))::integer, ((j2.fields ->> 'id'::text))::integer - Merge Cond: ((((j1.fields ->> 'id'::text))::integer) = (((j2.fields ->> 'id'::text))::integer)) - -> Sort - Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) - Sort Key: (((j1.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j1 - Output: j1.fields, ((j1.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j1" - -> Sort - Output: j2.fields, (((j2.fields ->> 'id'::text))::integer) - Sort Key: (((j2.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j2 - Output: j2.fields, ((j2.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j2" -(15 rows) - --- a clauseless (cross) join can't be unique ---Testcase 508: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 cross join (select (fields->>'id')::int id from j2) j2; - QUERY PLAN ----------------------------------------------------------------------------------------- - Nested Loop - Output: ((j1.fields ->> 'id'::text))::integer, ((j2.fields ->> 'id'::text))::integer - -> Foreign Scan on public.j1 - Output: j1.fields - InfluxDB query: SELECT * FROM "j1" - -> Materialize - Output: j2.fields - -> Foreign Scan on public.j2 - Output: j2.fields - InfluxDB query: SELECT * FROM "j2" -(10 rows) - --- ensure a natural join is marked as unique ---Testcase 509: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 natural join (select (fields->>'id')::int id from j2) j2; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Merge Join - Output: (((j1.fields ->> 'id'::text))::integer) - Merge Cond: ((((j1.fields ->> 'id'::text))::integer) = (((j2.fields ->> 'id'::text))::integer)) - -> Sort - Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) - Sort Key: (((j1.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j1 - Output: j1.fields, ((j1.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j1" - -> Sort - Output: j2.fields, (((j2.fields ->> 'id'::text))::integer) - Sort Key: (((j2.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j2 - Output: j2.fields, ((j2.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j2" -(15 rows) - --- ensure a distinct clause allows the inner to become unique ---Testcase 510: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1 j1) j1 -inner join (select distinct (fields->>'id')::int id from j3 j3) j3 on (j1.id)::int = (j3.id)::int; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Hash Join - Output: ((j1.fields ->> 'id'::text))::integer, (((j3.fields ->> 'id'::text))::integer) - Inner Unique: true - Hash Cond: (((j1.fields ->> 'id'::text))::integer = (((j3.fields ->> 'id'::text))::integer)) - -> Foreign Scan on public.j1 - Output: j1.fields - InfluxDB query: SELECT * FROM "j1" - -> Hash - Output: (((j3.fields ->> 'id'::text))::integer) - -> HashAggregate - Output: (((j3.fields ->> 'id'::text))::integer) - Group Key: ((j3.fields ->> 'id'::text))::integer - -> Foreign Scan on public.j3 - Output: ((j3.fields ->> 'id'::text))::integer - InfluxDB query: SELECT "id" FROM "j3" -(15 rows) - --- ensure group by clause allows the inner to become unique ---Testcase 511: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1 j1) j1 -inner join (select (fields->>'id')::int id from j3 j3 group by fields->>'id') j3 on (j1.id)::int = (j3.id)::int; - QUERY PLAN -------------------------------------------------------------------------------------------------------- - Merge Join - Output: (((j1.fields ->> 'id'::text))::integer), j3.id - Merge Cond: (j3.id = (((j1.fields ->> 'id'::text))::integer)) - -> Sort - Output: j3.id - Sort Key: j3.id - -> Subquery Scan on j3 - Output: j3.id - -> HashAggregate - Output: (((j3_1.fields ->> 'id'::text)))::integer, ((j3_1.fields ->> 'id'::text)) - Group Key: (j3_1.fields ->> 'id'::text) - -> Foreign Scan on public.j3 j3_1 - Output: (j3_1.fields ->> 'id'::text), j3_1.fields - InfluxDB query: SELECT * FROM "j3" - -> Sort - Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) - Sort Key: (((j1.fields ->> 'id'::text))::integer) - -> Foreign Scan on public.j1 - Output: j1.fields, ((j1.fields ->> 'id'::text))::integer - InfluxDB query: SELECT * FROM "j1" -(20 rows) - ---Testcase 512: -delete from j1_nsc; ---Testcase 513: -delete from j2_nsc; ---Testcase 514: -delete from j3_nsc; ---Testcase 515: -drop foreign table j1; -drop foreign table j1_nsc; ---Testcase 516: -drop foreign table j2; -drop foreign table j2_nsc; ---Testcase 517: -drop foreign table j3; -drop foreign table j3_nsc; --- test more complex permutations of unique joins ---Testcase 518: -create foreign table j1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j1_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j1'); ---Testcase 519: -create foreign table j2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j2_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j2'); ---Testcase 520: -create foreign table j3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j3_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j3'); ---Testcase 521: -insert into j1_nsc values(1,1),(1,2); ---Testcase 522: -insert into j2_nsc values(1,1); ---Testcase 523: -insert into j3_nsc values(1,1); --- ensure there's no unique join when not all columns which are part of the --- unique index are seen in the join clause ---Testcase 524: -explain (verbose, costs off) -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Join - Output: (((j1.fields ->> 'id1'::text))::integer), ((j1.fields ->> 'id2'::text))::integer, (((j2.fields ->> 'id1'::text))::integer), ((j2.fields ->> 'id2'::text))::integer - Merge Cond: ((((j1.fields ->> 'id1'::text))::integer) = (((j2.fields ->> 'id1'::text))::integer)) - -> Sort - Output: j1.fields, (((j1.fields ->> 'id1'::text))::integer) - Sort Key: (((j1.fields ->> 'id1'::text))::integer) - -> Foreign Scan on public.j1 - Output: j1.fields, ((j1.fields ->> 'id1'::text))::integer - InfluxDB query: SELECT * FROM "j1" - -> Sort - Output: j2.fields, (((j2.fields ->> 'id1'::text))::integer) - Sort Key: (((j2.fields ->> 'id1'::text))::integer) - -> Foreign Scan on public.j2 - Output: j2.fields, ((j2.fields ->> 'id1'::text))::integer - InfluxDB query: SELECT * FROM "j2" -(15 rows) - --- ensure proper unique detection with multiple join quals ---Testcase 525: -explain (verbose, costs off) -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int and (j1.id2)::int = (j2.id2)::int; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Merge Join - Output: (((j1.fields ->> 'id1'::text))::integer), (((j1.fields ->> 'id2'::text))::integer), (((j2.fields ->> 'id1'::text))::integer), (((j2.fields ->> 'id2'::text))::integer) - Merge Cond: (((((j1.fields ->> 'id1'::text))::integer) = (((j2.fields ->> 'id1'::text))::integer)) AND ((((j1.fields ->> 'id2'::text))::integer) = (((j2.fields ->> 'id2'::text))::integer))) - -> Sort - Output: j1.fields, (((j1.fields ->> 'id1'::text))::integer), (((j1.fields ->> 'id2'::text))::integer) - Sort Key: (((j1.fields ->> 'id1'::text))::integer), (((j1.fields ->> 'id2'::text))::integer) - -> Foreign Scan on public.j1 - Output: j1.fields, ((j1.fields ->> 'id1'::text))::integer, ((j1.fields ->> 'id2'::text))::integer - InfluxDB query: SELECT * FROM "j1" - -> Sort - Output: j2.fields, (((j2.fields ->> 'id1'::text))::integer), (((j2.fields ->> 'id2'::text))::integer) - Sort Key: (((j2.fields ->> 'id1'::text))::integer), (((j2.fields ->> 'id2'::text))::integer) - -> Foreign Scan on public.j2 - Output: j2.fields, ((j2.fields ->> 'id1'::text))::integer, ((j2.fields ->> 'id2'::text))::integer - InfluxDB query: SELECT * FROM "j2" -(15 rows) - --- ensure we don't detect the join to be unique when quals are not part of the --- join condition ---Testcase 526: -explain (verbose, costs off) -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int where (j1.id2)::int = 1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Hash Join - Output: ((j1.fields ->> 'id1'::text))::integer, ((j1.fields ->> 'id2'::text))::integer, ((j2.fields ->> 'id1'::text))::integer, ((j2.fields ->> 'id2'::text))::integer - Hash Cond: (((j2.fields ->> 'id1'::text))::integer = ((j1.fields ->> 'id1'::text))::integer) - -> Foreign Scan on public.j2 - Output: j2.fields - InfluxDB query: SELECT * FROM "j2" - -> Hash - Output: j1.fields - -> Foreign Scan on public.j1 - Output: j1.fields - InfluxDB query: SELECT * FROM "j1" WHERE (("id2" = 1)) -(11 rows) - --- as above, but for left joins. ---Testcase 527: -explain (verbose, costs off) -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -left join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int where (j1.id2)::int = 1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Hash Right Join - Output: ((j1.fields ->> 'id1'::text))::integer, ((j1.fields ->> 'id2'::text))::integer, ((j2.fields ->> 'id1'::text))::integer, ((j2.fields ->> 'id2'::text))::integer - Hash Cond: (((j2.fields ->> 'id1'::text))::integer = ((j1.fields ->> 'id1'::text))::integer) - -> Foreign Scan on public.j2 - Output: j2.fields - InfluxDB query: SELECT * FROM "j2" - -> Hash - Output: j1.fields - -> Foreign Scan on public.j1 - Output: j1.fields - InfluxDB query: SELECT * FROM "j1" WHERE (("id2" = 1)) -(11 rows) - --- validate logic in merge joins which skips mark and restore. --- it should only do this if all quals which were used to detect the unique --- are present as join quals, and not plain quals. ---Testcase 528: -set enable_nestloop to 0; ---Testcase 529: -set enable_hashjoin to 0; ---Testcase 530: -set enable_sort to 0; --- create indexes that will be preferred over the PKs to perform the join ---create index j1_id1_idx on j1 (id1) where id1 % 1000 = 1; ---create index j2_id1_idx on j2 (id1) where id1 % 1000 = 1; --- need an additional row in j2, if we want j2_id1_idx to be preferred ---Testcase 531: -insert into j2_nsc values(1,2); ---analyze j2; ---Testcase 532: -explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: ((((j1.fields ->> 'id1'::text))::integer = ((j2.fields ->> 'id1'::text))::integer) AND (((j1.fields ->> 'id2'::text))::integer = ((j2.fields ->> 'id2'::text))::integer)) - -> Foreign Scan on j1 - -> Materialize - -> Foreign Scan on j2 -(5 rows) - ---Testcase 533: -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1; - id1 | id2 | id1 | id2 ------+-----+-----+----- - 1 | 1 | 1 | 1 - 1 | 2 | 1 | 2 -(2 rows) - --- Exercise array keys mark/restore B-Tree code ---Testcase 534: -explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int = any (array[1]); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: ((((j1.fields ->> 'id1'::text))::integer = ((j2.fields ->> 'id1'::text))::integer) AND (((j1.fields ->> 'id2'::text))::integer = ((j2.fields ->> 'id2'::text))::integer)) - -> Foreign Scan on j1 - -> Materialize - -> Foreign Scan on j2 -(5 rows) - ---Testcase 535: -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int = any (array[1]); - id1 | id2 | id1 | id2 ------+-----+-----+----- - 1 | 1 | 1 | 1 - 1 | 2 | 1 | 2 -(2 rows) - --- Exercise array keys "find extreme element" B-Tree code ---Testcase 536: -explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int >= any (array[1,5]); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: ((((j1.fields ->> 'id1'::text))::integer = ((j2.fields ->> 'id1'::text))::integer) AND (((j1.fields ->> 'id2'::text))::integer = ((j2.fields ->> 'id2'::text))::integer)) - -> Foreign Scan on j1 - -> Materialize - -> Foreign Scan on j2 -(5 rows) - ---Testcase 537: -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int >= any (array[1,5]); - id1 | id2 | id1 | id2 ------+-----+-----+----- - 1 | 1 | 1 | 1 - 1 | 2 | 1 | 2 -(2 rows) - ---Testcase 538: -reset enable_nestloop; ---Testcase 539: -reset enable_hashjoin; ---Testcase 540: -reset enable_sort; ---Testcase 541: -delete from j1_nsc; ---Testcase 542: -delete from j2_nsc; ---Testcase 543: -delete from j3_nsc; ---Testcase 544: -drop foreign table j1; -drop foreign table j1_nsc; ---Testcase 545: -drop foreign table j2; -drop foreign table j2_nsc; ---Testcase 546: -drop foreign table j3; -drop foreign table j3_nsc; --- check that semijoin inner is not seen as unique for a portion of the outerrel ---Testcase 547: -CREATE FOREIGN TABLE onek ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS(schemaless 'true'); --- check that semijoin inner is not seen as unique for a portion of the outerrel ---Testcase 548: -explain (verbose, costs off) -select (t1.fields->>'unique1')::int4 unique1, (t2.fields->>'hundred')::int4 hundred -from onek t1, tenk1 t2 -where exists (select 1 from tenk1 t3 - where (t3.fields->>'thousand')::int4 = (t1.fields->>'unique1')::int4 and (t3.fields->>'tenthous')::int4 = (t2.fields->>'hundred')::int4) - and (t1.fields->>'unique1')::int4 < 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Merge Join - Output: (((t1.fields ->> 'unique1'::text))::integer), ((t2.fields ->> 'hundred'::text))::integer - Merge Cond: ((((t1.fields ->> 'unique1'::text))::integer) = (((t3.fields ->> 'thousand'::text))::integer)) - -> Sort - Output: t1.fields, (((t1.fields ->> 'unique1'::text))::integer) - Sort Key: (((t1.fields ->> 'unique1'::text))::integer) - -> Foreign Scan on public.onek t1 - Output: t1.fields, ((t1.fields ->> 'unique1'::text))::integer - InfluxDB query: SELECT * FROM "onek" WHERE (("unique1" < 1)) - -> Sort - Output: t2.fields, t3.fields, (((t3.fields ->> 'thousand'::text))::integer) - Sort Key: (((t3.fields ->> 'thousand'::text))::integer) - -> Hash Join - Output: t2.fields, t3.fields, ((t3.fields ->> 'thousand'::text))::integer - Hash Cond: (((t2.fields ->> 'hundred'::text))::integer = ((t3.fields ->> 'tenthous'::text))::integer) - -> Foreign Scan on public.tenk1 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "tenk" - -> Hash - Output: t3.fields - -> HashAggregate - Output: t3.fields - Group Key: ((t3.fields ->> 'thousand'::text))::integer, ((t3.fields ->> 'tenthous'::text))::integer - -> Foreign Scan on public.tenk1 t3 - Output: t3.fields, ((t3.fields ->> 'thousand'::text))::integer, ((t3.fields ->> 'tenthous'::text))::integer - InfluxDB query: SELECT * FROM "tenk" -(26 rows) - --- ... unless it actually is unique ---Testcase 549: -create table j3 as select (fields->>'unique1')::int4 unique1, (fields->>'tenthous')::int4 tenthous from onek; -vacuum analyze j3; ---Testcase 550: -create unique index on j3(unique1, tenthous); ---Testcase 551: -explain (verbose, costs off) -select (t1.fields->>'unique1')::int4 unique1, (t2.fields->>'hundred')::int4 hundred -from onek t1, tenk1 t2 -where exists (select 1 from j3 - where j3.unique1 = (t1.fields->>'unique1')::int4 and j3.tenthous = (t2.fields->>'hundred')::int4) - and (t1.fields->>'unique1')::int4 < 1; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Hash Join - Output: ((t1.fields ->> 'unique1'::text))::integer, ((t2.fields ->> 'hundred'::text))::integer - Hash Cond: (((t2.fields ->> 'hundred'::text))::integer = j3.tenthous) - -> Foreign Scan on public.tenk1 t2 - Output: t2.fields - InfluxDB query: SELECT * FROM "tenk" - -> Hash - Output: t1.fields, j3.tenthous - -> Hash Join - Output: t1.fields, j3.tenthous - Hash Cond: (((t1.fields ->> 'unique1'::text))::integer = j3.unique1) - -> Foreign Scan on public.onek t1 - Output: t1.fields - InfluxDB query: SELECT * FROM "onek" WHERE (("unique1" < 1)) - -> Hash - Output: j3.unique1, j3.tenthous - -> Seq Scan on public.j3 - Output: j3.unique1, j3.tenthous -(18 rows) - ---Testcase 552: -drop table j3; --- Clean up -DELETE FROM t1_nsc; -DELETE FROM t2_nsc; -DELETE FROM t3_nsc; -DELETE FROM tt1_nsc; -DELETE FROM tt2_nsc; -DELETE FROM tt3_nsc; -DELETE FROM tt4_nsc; -DELETE FROM tt5_nsc; -DELETE FROM tt6_nsc; -DELETE FROM xx_nsc; -DELETE FROM yy_nsc; -DELETE FROM zt1_nsc; -DELETE FROM zt2_nsc; -DELETE FROM nt1_nsc; -DELETE FROM nt2_nsc; -DELETE FROM nt3_nsc; -DELETE FROM parent_nsc; -DELETE FROM child_nsc; -DO $d$ -declare - l_rec record; -begin - for l_rec in (select foreign_table_schema, foreign_table_name - from information_schema.foreign_tables) loop - execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); - end loop; -end; -$d$; -NOTICE: drop cascades to table t2a -NOTICE: drop cascades to view zv1 ---Testcase 553: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 554: -DROP SERVER influxdb_svr CASCADE; ---Testcase 555: -DROP EXTENSION influxdb_fdw; diff --git a/expected/10.18/schemaless/influxdb_fdw.out b/expected/10.18/schemaless/influxdb_fdw.out deleted file mode 100644 index 7146404..0000000 --- a/expected/10.18/schemaless/influxdb_fdw.out +++ /dev/null @@ -1,1611 +0,0 @@ ---SET log_min_messages=debug1; ---SET client_min_messages=debug1; ---Testcase 1: -SET datestyle=ISO; --- timestamp with time zone differs based on this ---Testcase 2: -SET timezone='Japan'; -\set ECHO none ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- import time column as timestamp and text type -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); ---Testcase 6: -SELECT * FROM cpu; - time | time_text | tags | fields -------------------------+----------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} -(3 rows) - ---Testcase 7: -SELECT tags->>'tag1' tag1, (fields->>'value1')::bigint value1 FROM cpu; - tag1 | value1 ---------+-------- - tag1_A | 100 - tag1_B | 100 -(2 rows) - ---Testcase 8: -SELECT (fields->>'value1')::bigint value1, time, (fields->>'value2')::double precision value2 FROM cpu; - value1 | time | value2 ---------+------------------------+-------- - 100 | 2015-08-18 09:00:00+09 | 0.5 - 100 | 2015-08-18 09:00:00+09 | 2 - | 2015-08-18 09:48:08+09 | 2 -(3 rows) - ---Testcase 9: -SELECT (fields->>'value1')::bigint value1, time_text, (fields->>'value2')::double precision value2 FROM cpu; - value1 | time_text | value2 ---------+----------------------+-------- - 100 | 2015-08-18T00:00:00Z | 0.5 - 100 | 2015-08-18T00:00:00Z | 2 - | 2015-08-18T00:48:08Z | 2 -(3 rows) - ---Testcase 10: -DROP FOREIGN TABLE cpu; ---Testcase 11: -DROP FOREIGN TABLE t3; ---Testcase 12: -DROP FOREIGN TABLE t4; ---Testcase 13: -DROP FOREIGN TABLE tx; ---Testcase 14: -DROP FOREIGN TABLE numbers; --- test EXECPT -IMPORT FOREIGN SCHEMA public EXCEPT (cpu, t3, t4, tx, numbers) FROM SERVER server1 INTO public OPTIONS(schemaless 'true'); ---Testcase 15: -SELECT ftoptions FROM pg_foreign_table; - ftoptions ------------ -(0 rows) - --- test LIMIT TO -IMPORT FOREIGN SCHEMA public LIMIT TO (cpu) FROM SERVER server1 INTO public OPTIONS(schemaless 'true'); ---Testcase 16: -SELECT ftoptions FROM pg_foreign_table; - ftoptions ----------------------------------------------- - {table=cpu,schemaless=true,"tags=tag1,tag2"} -(1 row) - ---Testcase 17: -DROP FOREIGN TABLE cpu; -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false', schemaless 'true'); ---Testcase 18: -SELECT * FROM cpu; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} -(3 rows) - ---Testcase 19: -SELECT tags->>'tag1' tag1, (fields->>'value1')::int value1 FROM cpu; - tag1 | value1 ---------+-------- - tag1_A | 100 - tag1_B | 100 -(2 rows) - ---Testcase 20: -SELECT (fields->>'value1')::int value1, time, (fields->>'value2')::double precision value2 FROM cpu; - value1 | time | value2 ---------+------------------------+-------- - 100 | 2015-08-18 09:00:00+09 | 0.5 - 100 | 2015-08-18 09:00:00+09 | 2 - | 2015-08-18 09:48:08+09 | 2 -(3 rows) - ---Testcase 21: -SELECT tags->>'tag1' tag1 FROM cpu; - tag1 --------- - tag1_A - tag1_B - -(3 rows) - ---Testcase 22: -SELECT * FROM numbers; - time | tags | fields -------------------------+---------------+------------------------ - 1970-01-01 09:00:00+09 | {"tag1": "a"} | {"a": "1", "b": "One"} - 1970-01-01 09:00:01+09 | {"tag1": "a"} | {"a": "2", "b": "Two"} -(2 rows) - ---Testcase 23: -\d cpu; - Foreign table "public.cpu" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: server1 -FDW options: ("table" 'cpu', schemaless 'true', tags 'tag1,tag2') - ---Testcase 24: -SELECT * FROM cpu WHERE (fields->>'value1')::int=100; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 25: -SELECT * FROM cpu WHERE (fields->>'value2')::double precision=0.5; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 26: -SELECT * FROM cpu WHERE fields->>'value3'='str'; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 27: -SELECT * FROM cpu WHERE (fields->>'value4')::boolean=true; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 28: -SELECT * FROM cpu WHERE NOT ((fields->>'value4')::boolean AND (fields->>'value1')::int=100); - time | tags | fields -------------------------+----------------------------------+--------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(1 row) - ---Testcase 29: -SELECT * FROM cpu WHERE tags->>'tag1'='tag1_A'; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 30: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE fields->>'value3' IS NULL; - QUERY PLAN ------------------------------------------------------ - Foreign Scan on public.cpu - Output: "time", tags, fields - Filter: ((cpu.fields ->> 'value3'::text) IS NULL) - InfluxDB query: SELECT * FROM "cpu" -(4 rows) - ---Testcase 31: -SELECT * FROM cpu WHERE fields->>'value3' IS NULL; - time | tags | fields -------------------------+----------------------------------+--------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} -(2 rows) - ---Testcase 32: -SELECT * FROM cpu WHERE tags->>'tag2' IS NULL; - time | tags | fields -------------------------+----------------------------------+--------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(1 row) - ---Testcase 33: -SELECT * FROM cpu WHERE fields->>'value3' IS NOT NULL; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 34: -SELECT * FROM cpu WHERE tags->>'tag2' IS NOT NULL; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} -(2 rows) - --- InfluxDB not support compare timestamp with OR condition ---Testcase 35: -SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR (fields->>'value2')::double precision = 0.5; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} -(2 rows) - --- InfluxDB not support compare timestamp with != or <> ---Testcase 36: -SELECT * FROM cpu WHERE time != '2015-08-18 09:48:08+09'; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 37: -SELECT * FROM cpu WHERE time <> '2015-08-18 09:48:08+09'; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 38: -SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR (fields->>'value2')::double precision = 0.5; - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} -(2 rows) - --- There is inconsitency for search of missing values between tag and field ---Testcase 39: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE fields->>'value3' = ''; - QUERY PLAN ---------------------------------------------------------------- - Foreign Scan on public.cpu - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" WHERE (("value3" = '')) -(3 rows) - ---Testcase 40: -SELECT * FROM cpu WHERE fields->>'value3' = ''; - time | tags | fields -------+------+-------- -(0 rows) - ---Testcase 41: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE tags->>'tag2' = ''; - QUERY PLAN -------------------------------------------------------------- - Foreign Scan on public.cpu - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" WHERE (("tag2" = '')) -(3 rows) - ---Testcase 42: -SELECT * FROM cpu WHERE tags->>'tag2' = ''; - time | tags | fields -------------------------+----------------------------------+--------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(1 row) - ---Testcase 43: -SELECT * FROM cpu WHERE tags->>'tag1' IN ('tag1_A', 'tag1_B'); - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 44: -EXPLAIN VERBOSE -SELECT * FROM cpu WHERE tags->>'tag1' IN ('tag1_A', 'tag1_B'); - QUERY PLAN --------------------------------------------------------------------------------------- - Foreign Scan on public.cpu (cost=10.00..9.00 rows=9 width=72) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" WHERE ("tag1" = 'tag1_A' OR "tag1" = 'tag1_B') -(3 rows) - --- Rows which have no tag are considered to have empty string ---Testcase 45: -SELECT * FROM cpu WHERE tags->>'tag1' NOT IN ('tag1_A', 'tag1_B'); - time | tags | fields -------------------------+----------------------------------+----------------------------------------------------------------- - 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} -(1 row) - ---Testcase 46: -EXPLAIN VERBOSE -SELECT * FROM cpu WHERE tags->>'tag1' NOT IN ('tag1_A', 'tag1_B'); - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan on public.cpu (cost=10.00..844.00 rows=844 width=72) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" WHERE ("tag1" <> 'tag1_A' AND "tag1" <> 'tag1_B') -(3 rows) - --- test IN/NOT IN ---Testcase 47: -SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); - time | tags | fields -------------------------+----------------------------------+----------------------------------------------------------------- - 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} -(1 row) - ---Testcase 48: -SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 49: -SELECT * FROM cpu WHERE (fields->>'value1')::int NOT IN (100, 97); - time | tags | fields -------+------+-------- -(0 rows) - ---Testcase 50: -SELECT * FROM cpu WHERE (fields->>'value1')::int IN (100, 97); - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 51: -SELECT * FROM cpu WHERE (fields->>'value2')::double precision IN (0.5, 10.9); - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 52: -SELECT * FROM cpu WHERE (fields->>'value2')::double precision NOT IN (2, 9.7); - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 53: -SELECT * FROM cpu WHERE (fields->>'value4')::boolean NOT IN ('true', 'true'); - time | tags | fields -------------------------+----------------------------------+--------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(1 row) - ---Testcase 54: -SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); - time | tags | fields -------------------------+----------------------------------+----------------------------------------------------------------- - 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} -(1 row) - ---Testcase 55: -SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 56: -SELECT * FROM cpu WHERE (fields->>'value1')::int NOT IN (100, 97); - time | tags | fields -------+------+-------- -(0 rows) - ---Testcase 57: -SELECT * FROM cpu WHERE (fields->>'value1')::int IN (100, 97); - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 58: -SELECT * FROM cpu WHERE (fields->>'value2')::double precision IN (0.5, 10.9); - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 59: -SELECT * FROM cpu WHERE (fields->>'value2')::double precision NOT IN (2, 9.7); - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 60: -SELECT * FROM cpu WHERE (fields->>'value4')::boolean NOT IN ('true', 'true'); - time | tags | fields -------------------------+----------------------------------+--------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(1 row) - ---Testcase 61: -SELECT * FROM cpu WHERE (fields->>'value4')::boolean IN ('f', 't'); - time | tags | fields -------------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 62: -CREATE FOREIGN TABLE t1(time timestamp with time zone ,tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true', tags 'tag1'); ---Testcase 63: -CREATE FOREIGN TABLE t2(time timestamp ,tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true', tags 'tag1'); ---Testcase 64: -SELECT * FROM t1; - time | tags | fields -------------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 09:48:08+09 | {"tag1": null} | {"tag2": "tag2_A", "value1": null, "value2": "2", "value3": null, "value4": null} -(3 rows) - ---Testcase 65: -SELECT * FROM t2; - time | tags | fields ----------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 00:48:08 | {"tag1": null} | {"tag2": "tag2_A", "value1": null, "value2": "2", "value3": null, "value4": null} -(3 rows) - --- In following four queries, timestamp condition is added to InfluxQL as "time = '2015-08-18 00:00:00'" ---Testcase 66: -SELECT * FROM t1 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; - time | tags | fields -------------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 67: -SELECT * FROM t1 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; - time | tags | fields -------------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 68: -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; - time | tags | fields ----------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 69: -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; - time | tags | fields ----------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - --- pushdown now() ---Testcase 70: -SELECT * FROM t2 WHERE now() > time; - time | tags | fields ----------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 00:48:08 | {"tag1": null} | {"tag2": "tag2_A", "value1": null, "value2": "2", "value3": null, "value4": null} -(3 rows) - ---Testcase 71: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE now() > time; - QUERY PLAN -------------------------------------------------------------------- - Foreign Scan on public.t2 (cost=10.00..284.00 rows=284 width=72) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" WHERE ((now() > time)) -(3 rows) - ---Testcase 72: -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; - time | tags | fields ----------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 73: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Foreign Scan on public.t2 (cost=10.00..4.00 rows=4 width=72) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" WHERE ((time = ('2015-08-26 05:43:21.1' - 8d5h43m21s100000u))) -(3 rows) - --- InfluxDB does not seem to support time column + interval, so below query returns empty result --- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; --- EXPLAIN (VERBOSE, COSTS OFF) --- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; --- InfluxDB does not support month or year interval, so not push down ---Testcase 74: -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; - time | tags | fields ----------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - ---Testcase 75: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; - QUERY PLAN ------------------------------------------------------------------------------- - Foreign Scan on public.t2 (cost=10.00..4.00 rows=4 width=72) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" WHERE ((time = '2015-08-18 00:00:00')) -(3 rows) - ---Testcase 76: -SELECT * FROM t2 WHERE (fields->>'value1')::int = ANY (ARRAY(SELECT (fields->>'value1')::int FROM t1 WHERE (fields->>'value1')::int < 1000)); - time | tags | fields ----------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} -(2 rows) - --- ANY with ARRAY expression ---Testcase 77: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, (fields->>'a')::int + 1]); - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..15.15 rows=15 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" = 1) OR ("a" = ("a" + 1))) -(3 rows) - ---Testcase 78: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, (fields->>'a')::int + 1]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 79: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, (fields->>'a')::int + 1]); - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1476.62 rows=1462 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <> 1) OR ("a" <> ("a" + 1))) -(3 rows) - ---Testcase 80: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, (fields->>'a')::int + 1]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 81: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, (fields->>'a')::int + 1]); - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" >= 1) OR ("a" >= ("a" + 1))) -(3 rows) - ---Testcase 82: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, (fields->>'a')::int + 1]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 83: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, (fields->>'a')::int + 1]); - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <= 1) OR ("a" <= ("a" + 1))) -(3 rows) - ---Testcase 84: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, (fields->>'a')::int + 1]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 85: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, (fields->>'a')::int + 1]); - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" > 1) OR ("a" > ("a" + 1))) -(3 rows) - ---Testcase 86: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, (fields->>'a')::int + 1]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 87: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, (fields->>'a')::int + 1]); - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" < 1) OR ("a" < ("a" + 1))) -(3 rows) - ---Testcase 88: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, (fields->>'a')::int + 1]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - --- ANY with ARRAY const ---Testcase 89: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, 2]); - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..15.15 rows=15 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 OR "a" = 2) -(3 rows) - ---Testcase 90: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, 2]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 91: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, 2]); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1476.62 rows=1462 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 OR "a" <> 2) -(3 rows) - ---Testcase 92: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, 2]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 93: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, 2]); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" >= 1 OR "a" >= 2) -(3 rows) - ---Testcase 94: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, 2]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 95: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, 2]); - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <= 1 OR "a" <= 2) -(3 rows) - ---Testcase 96: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, 2]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 97: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, 2]); - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" > 1 OR "a" > 2) -(3 rows) - ---Testcase 98: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, 2]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 99: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, 2]); - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" < 1 OR "a" < 2) -(3 rows) - ---Testcase 100: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, 2]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 101: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY('{1, 2, 3}'); - QUERY PLAN ----------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..22.22 rows=22 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 OR "a" = 2 OR "a" = 3) -(3 rows) - ---Testcase 102: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY('{1, 2, 3}'); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 103: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY('{1, 2, 3}'); - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1476.62 rows=1462 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 OR "a" <> 2 OR "a" <> 3) -(3 rows) - ---Testcase 104: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY('{1, 2, 3}'); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - --- ALL with ARRAY expression ---Testcase 105: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, (fields->>'a')::int * 1]); - QUERY PLAN ------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1.01 rows=1 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" = 1) AND ("a" = ("a" * 1))) -(3 rows) - ---Testcase 106: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, (fields->>'a')::int * 1]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 107: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, (fields->>'a')::int + 1]); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1461.47 rows=1447 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <> 1) AND ("a" <> ("a" + 1))) -(3 rows) - ---Testcase 108: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, (fields->>'a')::int + 1]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 109: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, (fields->>'a')::int / 1]); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" >= 1) AND ("a" >= ("a" / 1))) -(3 rows) - ---Testcase 110: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, (fields->>'a')::int / 1]); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 111: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, (fields->>'a')::int + 1]); - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <= 1) AND ("a" <= ("a" + 1))) -(3 rows) - ---Testcase 112: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, (fields->>'a')::int + 1]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 113: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[1, (fields->>'a')::int - 1]); - QUERY PLAN ------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" > 1) AND ("a" > ("a" - 1))) -(3 rows) - ---Testcase 114: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[1, (fields->>'a')::int - 1]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 115: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, (fields->>'a')::int + 1]); - QUERY PLAN ------------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" < 2) AND ("a" < ("a" + 1))) -(3 rows) - ---Testcase 116: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, (fields->>'a')::int + 1]); - a | b ----+----- - 1 | One -(1 row) - --- ALL with ARRAY const ---Testcase 117: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, 1]); - QUERY PLAN ------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1.01 rows=1 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 AND "a" = 1) -(3 rows) - ---Testcase 118: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, 1]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 119: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, 3]); - QUERY PLAN --------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..1461.47 rows=1447 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 AND "a" <> 3) -(3 rows) - ---Testcase 120: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, 3]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 121: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, 2]); - QUERY PLAN --------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" >= 1 AND "a" >= 2) -(3 rows) - ---Testcase 122: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, 2]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 123: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, 2]); - QUERY PLAN --------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <= 1 AND "a" <= 2) -(3 rows) - ---Testcase 124: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, 2]); - a | b ----+----- - 1 | One -(1 row) - ---Testcase 125: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[0, 1]); - QUERY PLAN ------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" > 0 AND "a" > 1) -(3 rows) - ---Testcase 126: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[0, 1]); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 127: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, 3]); - QUERY PLAN ------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" < 2 AND "a" < 3) -(3 rows) - ---Testcase 128: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, 3]); - a | b ----+----- - 1 | One -(1 row) - --- ANY/ALL with TEXT ARRAY const ---Testcase 129: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' = ANY(ARRAY['One', 'Two']); - QUERY PLAN -------------------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..15.15 rows=15 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("b" = 'One' OR "b" = 'Two') -(3 rows) - ---Testcase 130: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' = ANY(ARRAY['One', 'Two']); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 131: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' <> ALL(ARRAY['One', 'Four']); - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan on public.numbers (cost=10.00..1461.47 rows=1447 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("b" <> 'One' AND "b" <> 'Four') -(3 rows) - ---Testcase 132: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' <> ALL(ARRAY['One', 'Four']); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 133: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ANY(ARRAY['One', 'Two']); - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) - Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) - Filter: ((numbers.fields ->> 'b'::text) > ANY ('{One,Two}'::text[])) - InfluxDB query: SELECT "a", "b" FROM "numbers" -(4 rows) - ---Testcase 134: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ANY(ARRAY['One', 'Two']); - a | b ----+----- - 2 | Two -(1 row) - ---Testcase 135: -EXPLAIN VERBOSE -SELECT * FROM numbers WHERE fields->>'b' > ALL(ARRAY['Four', 'Five']); - QUERY PLAN --------------------------------------------------------------------------- - Foreign Scan on public.numbers (cost=10.00..95.00 rows=95 width=72) - Output: "time", tags, fields - Filter: ((numbers.fields ->> 'b'::text) > ALL ('{Four,Five}'::text[])) - InfluxDB query: SELECT * FROM "numbers" -(4 rows) - ---Testcase 136: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ALL(ARRAY['Four', 'Five']); - a | b ----+----- - 1 | One - 2 | Two -(2 rows) - ---Testcase 137: -DROP FOREIGN TABLE numbers; ---Testcase 138: -ALTER SERVER server1 OPTIONS (SET dbname 'no such database'); ---Testcase 139: -SELECT * FROM t1; -ERROR: influxdb_fdw : database not found: no such database ---Testcase 140: -ALTER SERVER server1 OPTIONS (SET dbname 'mydb'); ---Testcase 141: -SELECT * FROM t1; - time | tags | fields -------------------------+--------------------+----------------------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 09:48:08+09 | {"tag1": null} | {"tag2": "tag2_A", "value1": null, "value2": "2", "value3": null, "value4": null} -(3 rows) - --- map time column to both timestamp and text ---Testcase 142: -CREATE FOREIGN TABLE t5(t timestamp OPTIONS (column_name 'time'), tag1 text OPTIONS (column_name 'time'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true'); ---Testcase 143: -SELECT * FROM t5; - t | tag1 | fields ----------------------+----------------------+----------------------------------------------------------------------------------------------------------- - 2015-08-18 00:00:00 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 00:00:00 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 00:48:08 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A", "value1": null, "value2": "2", "value3": null, "value4": null} -(3 rows) - ---get version ---Testcase 144: -\df influxdb_fdw* - List of functions - Schema | Name | Result data type | Argument data types | Type ---------+------------------------+------------------+---------------------+-------- - public | influxdb_fdw_handler | fdw_handler | | normal - public | influxdb_fdw_validator | void | text[], oid | normal - public | influxdb_fdw_version | integer | | normal -(3 rows) - ---Testcase 145: -SELECT * FROM public.influxdb_fdw_version(); - influxdb_fdw_version ----------------------- - 10200 -(1 row) - ---Testcase 146: -SELECT influxdb_fdw_version(); - influxdb_fdw_version ----------------------- - 10200 -(1 row) - ---Test pushdown LIMIT...OFFSET ---Testcase 147: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; - QUERY PLAN ------------------------------------------------------------- - Limit - Output: ((tableoid)::regclass), "time", tags, fields - -> Foreign Scan on public.t1 - Output: (tableoid)::regclass, "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" -(5 rows) - ---Testcase 148: -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; - tableoid | time | tags | fields -----------+------------------------+--------------------+----------------------------------------------------------------------------------------- - t1 | 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 149: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; - QUERY PLAN ------------------------------------------------------------- - Limit - Output: ((tableoid)::regclass), "time", tags, fields - -> Foreign Scan on public.t1 - Output: (tableoid)::regclass, "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" -(5 rows) - ---Testcase 150: -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; - tableoid | time | tags | fields -----------+------------------------+--------------------+----------------------------------------------------------------------------------- - t1 | 2015-08-18 09:00:00+09 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} -(1 row) - ---Testcase 151: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; - QUERY PLAN ---------------------------------------------- - Limit - Output: ctid, "time", tags, fields - -> Foreign Scan on public.t1 - Output: ctid, "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" -(5 rows) - ---Testcase 152: -SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; - ctid | time | tags | fields -----------------+------------------------+--------------------+----------------------------------------------------------------------------------------- - (4294967295,0) | 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} -(1 row) - ---Testcase 153: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; - QUERY PLAN ---------------------------------------------- - Limit - Output: ctid, "time", tags, fields - -> Foreign Scan on public.t2 - Output: ctid, "time", tags, fields - InfluxDB query: SELECT * FROM "cpu" -(5 rows) - ---Testcase 154: -SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; - ctid | time | tags | fields -------+------+------+-------- -(0 rows) - ---Testcase 155: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM - t1 - LEFT JOIN t2 - ON (t2.fields->>'value1')::int = 123, - LATERAL (SELECT (t2.fields->>'value1')::int value1, t1.tags->>'tag1' tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss -WHERE (t1.fields->>'value1')::int = ss.value1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Nested Loop - Output: t1."time", t1.tags, t1.fields, t2."time", t2.tags, t2.fields, (((t2.fields ->> 'value1'::text))::integer), ((t1_1.tags ->> 'tag1'::text)) - Join Filter: (((t1.fields ->> 'value1'::text))::integer = (((t2.fields ->> 'value1'::text))::integer)) - -> Nested Loop Left Join - Output: t1."time", t1.tags, t1.fields, t2."time", t2.tags, t2.fields - -> Foreign Scan on public.t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "cpu" - -> Materialize - Output: t2."time", t2.tags, t2.fields - -> Foreign Scan on public.t2 - Output: t2."time", t2.tags, t2.fields - InfluxDB query: SELECT * FROM "cpu" WHERE (("value1" = 123)) - -> Limit - Output: (((t2.fields ->> 'value1'::text))::integer), ((t1_1.tags ->> 'tag1'::text)) - -> Foreign Scan on public.t1 t1_1 - Output: ((t2.fields ->> 'value1'::text))::integer, (t1_1.tags ->> 'tag1'::text) - InfluxDB query: SELECT * FROM "cpu" -(18 rows) - ---Testcase 156: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM - t1 - LEFT JOIN t2 - ON (t2.fields->>'value1')::int = 123, - LATERAL (SELECT (t2.fields->>'value1')::int value1, t1.tags->>'tag1' tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss1, - LATERAL (SELECT ss1.* from t3 LIMIT 1 OFFSET 20) AS ss2 -WHERE (t1.fields->>'value1')::int = ss2.value1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: t1."time", t1.tags, t1.fields, t2."time", t2.tags, t2.fields, (((t2.fields ->> 'value1'::text))::integer), ((t1_1.tags ->> 'tag1'::text)), ((((t2.fields ->> 'value1'::text))::integer)), (((t1_1.tags ->> 'tag1'::text))) - Join Filter: (((t1.fields ->> 'value1'::text))::integer = ((((t2.fields ->> 'value1'::text))::integer))) - -> Nested Loop - Output: t1."time", t1.tags, t1.fields, t2."time", t2.tags, t2.fields, (((t2.fields ->> 'value1'::text))::integer), ((t1_1.tags ->> 'tag1'::text)) - -> Nested Loop Left Join - Output: t1."time", t1.tags, t1.fields, t2."time", t2.tags, t2.fields - -> Foreign Scan on public.t1 - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "cpu" - -> Materialize - Output: t2."time", t2.tags, t2.fields - -> Foreign Scan on public.t2 - Output: t2."time", t2.tags, t2.fields - InfluxDB query: SELECT * FROM "cpu" WHERE (("value1" = 123)) - -> Limit - Output: (((t2.fields ->> 'value1'::text))::integer), ((t1_1.tags ->> 'tag1'::text)) - -> Foreign Scan on public.t1 t1_1 - Output: ((t2.fields ->> 'value1'::text))::integer, (t1_1.tags ->> 'tag1'::text) - InfluxDB query: SELECT * FROM "cpu" - -> Limit - Output: ((((t2.fields ->> 'value1'::text))::integer)), (((t1_1.tags ->> 'tag1'::text))) - -> Foreign Scan on public.t3 - Output: (((t2.fields ->> 'value1'::text))::integer), ((t1_1.tags ->> 'tag1'::text)) - InfluxDB query: SELECT * FROM "t3" -(25 rows) - ---Testcase 157: -DROP FOREIGN TABLE cpu; ---Testcase 158: -DROP FOREIGN TABLE t1; ---Testcase 159: -DROP FOREIGN TABLE t2; ---Testcase 160: -DROP FOREIGN TABLE t3; ---Testcase 161: -DROP FOREIGN TABLE t4; ---Testcase 162: -DROP FOREIGN TABLE t5; ---Testcase 163: -DROP FOREIGN TABLE tx; --- test INSERT, DELETE -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); -CREATE FOREIGN TABLE cpu_nsc (time timestamp with time zone, time_text text, tag1 text, tag2 text, value1 int, value2 float, value3 text, value4 boolean) SERVER server1 OPTIONS (table 'cpu', tags 'tag1, tag2'); ---Testcase 164: -SELECT * FROM cpu; - time | time_text | tags | fields -------------------------+----------------------+--------------------------------------+----------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} -(3 rows) - ---Testcase 165: -EXPLAIN VERBOSE -INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test1', true); - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.cpu_nsc (cost=0.00..0.01 rows=1 width=149) - -> Result (cost=0.00..0.01 rows=1 width=149) - Output: '2021-01-01 00:00:01+09'::timestamp with time zone, NULL::text, 'tag1_K'::text, 'tag2_H'::text, 200, '5.5'::double precision, 'test1'::text, true -(3 rows) - ---Testcase 166: -INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test', true); ---Testcase 167: -SELECT * FROM cpu; - time | time_text | tags | fields -------------------------+----------------------+--------------------------------------+------------------------------------------------------------------------ - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} -(4 rows) - ---Testcase 168: -EXPLAIN VERBOSE -INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), - ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.cpu_nsc (cost=0.02..0.04 rows=2 width=149) - InitPlan 1 (returns $0) - -> Result (cost=0.00..0.01 rows=1 width=4) - Output: 350 - InitPlan 2 (returns $1) - -> Result (cost=0.00..0.01 rows=1 width=32) - Output: 6.9 - -> Values Scan on "*VALUES*" (cost=0.00..0.03 rows=2 width=149) - Output: "*VALUES*".column1, NULL::text, "*VALUES*".column2, "*VALUES*".column3, "*VALUES*".column4, "*VALUES*".column5, "*VALUES*".column6, "*VALUES*".column7 -(9 rows) - ---Testcase 169: -INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), - ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); ---Testcase 170: -SELECT * FROM cpu; - time | time_text | tags | fields -------------------------+----------------------+---------------------------------------+--------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-01-02 04:00:02+09 | 2021-01-01T19:00:02Z | {"tag1": "tag1_I", "tag2": "tag2_E"} | {"value1": "300", "value2": "15.5", "value3": "test2", "value4": "false"} - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} -(6 rows) - ---Testcase 171: -INSERT INTO cpu_nsc(tag2, value1) VALUES('tag2_KH', 400); ---Testcase 172: -SELECT tags->>'tag1' tag1, tags->>'tag2' tag2, (fields->>'value1')::bigint value1, (fields->>'value2')::double precision value2, fields->>'value3' value3, (fields->>'value4')::boolean value4 FROM cpu; - tag1 | tag2 | value1 | value2 | value3 | value4 ---------+---------+--------+--------+--------+-------- - tag1_A | tag2_A | 100 | 0.5 | str | t - tag1_B | | 100 | 2 | | f - | tag2_A | | 2 | | - tag1_K | tag2_H | 200 | 5.5 | test | t - tag1_I | tag2_E | 300 | 15.5 | test2 | f - | tag2_KH | 400 | | | - tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(7 rows) - ---Testcase 173: -EXPLAIN VERBOSE -DELETE FROM cpu_nsc WHERE tag2 = 'tag2_KH'; - QUERY PLAN ------------------------------------------------------------------------------ - Delete on public.cpu_nsc (cost=10.00..3.00 rows=3 width=104) - -> Foreign Delete on public.cpu_nsc (cost=10.00..3.00 rows=3 width=104) - InfluxDB query: DELETE FROM "cpu" WHERE (("tag2" = 'tag2_KH')) -(3 rows) - ---Testcase 174: -DELETE FROM cpu_nsc WHERE tag2 = 'tag2_KH'; ---Testcase 175: -SELECT tags->>'tag1' tag1, tags->>'tag2' tag2, (fields->>'value1')::bigint value1, (fields->>'value2')::double precision value2, fields->>'value3' value3, (fields->>'value4')::boolean value4 FROM cpu; - tag1 | tag2 | value1 | value2 | value3 | value4 ---------+---------+--------+--------+--------+-------- - tag1_A | tag2_A | 100 | 0.5 | str | t - tag1_B | | 100 | 2 | | f - | tag2_A | | 2 | | - tag1_K | tag2_H | 200 | 5.5 | test | t - tag1_I | tag2_E | 300 | 15.5 | test2 | f - tag1_U | tag2_DZ | 350 | 6.9 | funny | t -(6 rows) - ---Testcase 176: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; - QUERY PLAN ----------------------------------------------------------------------------------- - Delete on public.cpu (cost=10.00..6.00 rows=6 width=40) - -> Foreign Delete on public.cpu (cost=10.00..6.00 rows=6 width=40) - InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-01-01 19:00:02')) -(3 rows) - ---Testcase 177: -DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; ---Testcase 178: -SELECT * FROM cpu; - time | time_text | tags | fields -------------------------+----------------------+---------------------------------------+------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} -(5 rows) - ---Testcase 179: -EXPLAIN VERBOSE -DELETE FROM cpu_nsc WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Delete on public.cpu_nsc (cost=10.00..212.00 rows=212 width=104) - -> Foreign Delete on public.cpu_nsc (cost=10.00..212.00 rows=212 width=104) - InfluxDB query: DELETE FROM "cpu" WHERE ((time < '2018-07-06 15:00:00')) AND (("tag1" <> 'tag1_B')) -(3 rows) - ---Testcase 180: -DELETE FROM cpu_nsc WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; ---Testcase 181: -SELECT * FROM cpu; - time | time_text | tags | fields -------------------------+----------------------+---------------------------------------+------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} -(3 rows) - --- Test INSERT, DELETE with time_text column ---Testcase 182: -INSERT INTO cpu_nsc(time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02T00:00:00Z', 'tag1_D', 'tag2_E', 600, 20.2, 'test3', true); ---Testcase 183: -SELECT * FROM cpu; - time | time_text | tags | fields -------------------------+----------------------+---------------------------------------+-------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} -(4 rows) - ---Testcase 184: -INSERT INTO cpu_nsc(time_text, tag1, value2) VALUES('2021-02-02T00:00:00.123456789Z', 'tag1_P', 25.8); ---Testcase 185: -SELECT * FROM cpu; - time | time_text | tags | fields --------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} - 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | {"tag1": "tag1_P", "tag2": null} | {"value1": null, "value2": "25.8", "value3": null, "value4": null} - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} -(5 rows) - ---Testcase 186: -INSERT INTO cpu_nsc(time_text, tag1, value2) VALUES('2021-02-02 00:00:01', 'tag1_J', 37.1); ---Testcase 187: -SELECT * FROM cpu; - time | time_text | tags | fields --------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} - 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | {"tag1": "tag1_P", "tag2": null} | {"value1": null, "value2": "25.8", "value3": null, "value4": null} - 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | {"tag1": "tag1_J", "tag2": null} | {"value1": null, "value2": "37.1", "value3": null, "value4": null} - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} -(6 rows) - ---Testcase 188: -INSERT INTO cpu_nsc(time, time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02 00:00:01+05', '2021-02-02T00:00:02.123456789Z', 'tag1_A', 'tag2_B', 200, 5.5, 'test', true); -WARNING: Inserting value has both 'time_text' and 'time' columns specified. The 'time' will be ignored. ---Testcase 189: -SELECT * FROM cpu; - time | time_text | tags | fields --------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} - 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | {"tag1": "tag1_P", "tag2": null} | {"value1": null, "value2": "25.8", "value3": null, "value4": null} - 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | {"tag1": "tag1_J", "tag2": null} | {"value1": null, "value2": "37.1", "value3": null, "value4": null} - 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | {"tag1": "tag1_A", "tag2": "tag2_B"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} -(7 rows) - ---Testcase 190: -INSERT INTO cpu_nsc(time_text, time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-03T00:00:03.123456789Z', '2021-03-03 00:00:01+07', 'tag1_C', 'tag2_D', 200, 5.5, 'test', true); -WARNING: Inserting value has both 'time_text' and 'time' columns specified. The 'time' will be ignored. ---Testcase 191: -SELECT * FROM cpu; - time | time_text | tags | fields --------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} - 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | {"tag1": "tag1_P", "tag2": null} | {"value1": null, "value2": "25.8", "value3": null, "value4": null} - 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | {"tag1": "tag1_J", "tag2": null} | {"value1": null, "value2": "37.1", "value3": null, "value4": null} - 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | {"tag1": "tag1_A", "tag2": "tag2_B"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | {"tag1": "tag1_C", "tag2": "tag2_D"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} -(8 rows) - ---Testcase 192: -EXPLAIN VERBOSE -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:00.123456789Z'; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Delete on public.cpu_nsc (cost=10.00..3.00 rows=3 width=104) - -> Foreign Delete on public.cpu_nsc (cost=10.00..3.00 rows=3 width=104) - InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-02-02T00:00:00.123456789Z')) -(3 rows) - ---Testcase 193: -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:00.123456789Z'; ---Testcase 194: -SELECT * FROM cpu; - time | time_text | tags | fields --------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} - 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | {"tag1": "tag1_J", "tag2": null} | {"value1": null, "value2": "37.1", "value3": null, "value4": null} - 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | {"tag1": "tag1_A", "tag2": "tag2_B"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | {"tag1": "tag1_C", "tag2": "tag2_D"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} -(7 rows) - ---Testcase 195: -EXPLAIN VERBOSE -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Delete on public.cpu_nsc (cost=10.00..1.00 rows=1 width=104) - -> Foreign Delete on public.cpu_nsc (cost=10.00..1.00 rows=1 width=104) - InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-02-02T00:00:01Z')) AND (("tag1" = 'tag1_J')) -(3 rows) - ---Testcase 196: -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; ---Testcase 197: -SELECT * FROM cpu; - time | time_text | tags | fields --------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} - 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | {"tag1": "tag1_A", "tag2": "tag2_B"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | {"tag1": "tag1_C", "tag2": "tag2_D"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} -(6 rows) - ---Testcase 198: -EXPLAIN VERBOSE -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Delete on public.cpu_nsc (cost=10.00..6.00 rows=6 width=104) - -> Foreign Scan on public.cpu_nsc (cost=10.00..6.00 rows=6 width=104) - Output: "time", time_text, tag1, tag2 - Filter: ((cpu_nsc.time_text = '2021-02-02 00:00:00'::text) OR (cpu_nsc."time" = '2029-02-02 05:02:02+09'::timestamp with time zone)) - InfluxDB query: SELECT "tag1", "tag2", "value1" FROM "cpu" -(5 rows) - ---Testcase 199: -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; ---Testcase 200: -SELECT * FROM cpu; - time | time_text | tags | fields --------------------------------+--------------------------------+--------------------------------------+-------------------------------------------------------------------------- - 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} - 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} - 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | {"tag1": "tag1_A", "tag2": "tag2_B"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} - 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | {"tag1": "tag1_C", "tag2": "tag2_D"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} -(5 rows) - --- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null ---Testcase 201: -DROP FOREIGN TABLE cpu_nsc; -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 202: -DROP SERVER server1 CASCADE; -NOTICE: drop cascades to 5 other objects -DETAIL: drop cascades to foreign table cpu -drop cascades to foreign table numbers -drop cascades to foreign table t3 -drop cascades to foreign table t4 -drop cascades to foreign table tx ---Testcase 203: -DROP EXTENSION influxdb_fdw; diff --git a/expected/10.18/schemaless/schemaless.out b/expected/10.18/schemaless/schemaless.out deleted file mode 100644 index 773b867..0000000 --- a/expected/10.18/schemaless/schemaless.out +++ /dev/null @@ -1,921 +0,0 @@ ---Testcase 1: -SET datestyle=ISO; --- timestamp with time zone differs based on this ---Testcase 2: -SET timezone='Japan'; -\set ECHO none ---Testcase 3: -DROP EXTENSION IF EXISTS influxdb_fdw CASCADE; -NOTICE: extension "influxdb_fdw" does not exist, skipping ---Testcase 4: -CREATE EXTENSION influxdb_fdw CASCADE; ---Testcase 5: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- create foreign table ---Testcase 7: -CREATE FOREIGN TABLE sc1(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc1', tags 'device_id', schemaless 'true'); ---Testcase 8: -CREATE FOREIGN TABLE sc2(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc2', tags 'device_id', schemaless 'true'); ---Testcase 9: -DROP FOREIGN TABLE sc1; ---Testcase 10: -DROP FOREIGN TABLE sc2; --- import foreign table -IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO public OPTIONS (schemaless 'true'); ---Testcase 11: -ALTER FOREIGN TABLE sc2 RENAME COLUMN fields TO fields2; ---Testcase 12: -ALTER FOREIGN TABLE sc2 RENAME COLUMN tags TO tags2; --- baserel * ---Testcase 13: -EXPLAIN VERBOSE -SELECT * FROM sc1; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..853.00 rows=853 width=72) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "sc1" -(3 rows) - ---Testcase 14: -SELECT * FROM sc1; - time | tags | fields -------------------------+-----------------------+------------------------------------------------------------ - 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "1", "sig2": "a", "sig3": "1.1", "sig4": "true"} - 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "2", "sig2": "b", "sig3": "1.2", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "3", "sig2": "c", "sig3": "1.3", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "4", "sig2": "d", "sig3": "2.4", "sig4": "true"} - 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "5", "sig2": "e", "sig3": "2.5", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "6", "sig2": "f", "sig3": "2.6", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "7", "sig2": "g", "sig3": "3.7", "sig4": "true"} - 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "8", "sig2": "h", "sig3": "3.8", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "9", "sig2": "i", "sig3": "3.9", "sig4": "false"} -(9 rows) - --- baserel all column names ---Testcase 15: -EXPLAIN VERBOSE -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.sc1 (cost=10.00..876.46 rows=853 width=89) - Output: "time", (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" -(3 rows) - ---Testcase 16: -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - time | device_id | sig1 | sig2 | sig3 | sig4 -------------------------+-----------+------+------+------+------ - 1970-01-01 09:00:00+09 | dev1 | 1 | a | 1.1 | t - 1970-01-01 09:00:00+09 | dev2 | 2 | b | 1.2 | f - 1970-01-01 09:00:00+09 | dev3 | 3 | c | 1.3 | f - 1970-01-01 09:00:00+09 | dev1 | 4 | d | 2.4 | t - 1970-01-01 09:00:00+09 | dev2 | 5 | e | 2.5 | f - 1970-01-01 09:00:00+09 | dev3 | 6 | f | 2.6 | f - 1970-01-01 09:00:00+09 | dev1 | 7 | g | 3.7 | t - 1970-01-01 09:00:00+09 | dev2 | 8 | h | 3.8 | f - 1970-01-01 09:00:00+09 | dev3 | 9 | i | 3.9 | f -(9 rows) - --- baserel time only ---Testcase 17: -EXPLAIN VERBOSE -SELECT time FROM sc1; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..2560.00 rows=2560 width=8) - Output: "time" - InfluxDB query: SELECT * FROM "sc1" -(3 rows) - ---Testcase 18: -SELECT time FROM sc1; - time ------------------------- - 1970-01-01 09:00:00+09 - 1970-01-01 09:00:00+09 - 1970-01-01 09:00:00+09 - 1970-01-01 09:00:00+09 - 1970-01-01 09:00:00+09 - 1970-01-01 09:00:00+09 - 1970-01-01 09:00:00+09 - 1970-01-01 09:00:00+09 - 1970-01-01 09:00:00+09 -(9 rows) - --- baserel tag only ---Testcase 19: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id FROM sc1; - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..1465.65 rows=1462 width=32) - Output: (tags ->> 'device_id'::text) - InfluxDB query: SELECT * FROM "sc1" -(3 rows) - ---Testcase 20: -SELECT tags->>'device_id' device_id FROM sc1; - device_id ------------ - dev1 - dev2 - dev3 - dev1 - dev2 - dev3 - dev1 - dev2 - dev3 -(9 rows) - --- baserel field only ---Testcase 21: -EXPLAIN VERBOSE -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..1498.55 rows=1462 width=49) - Output: ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - InfluxDB query: SELECT "sig1", "sig2", "sig3", "sig4" FROM "sc1" -(3 rows) - ---Testcase 22: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - sig1 | sig2 | sig3 | sig4 -------+------+------+------ - 1 | a | 1.1 | t - 3 | c | 1.3 | f - 2 | b | 1.2 | f - 6 | f | 2.6 | f - 5 | e | 2.5 | f - 4 | d | 2.4 | t - 8 | h | 3.8 | f - 7 | g | 3.7 | t - 9 | i | 3.9 | f -(9 rows) - --- baserel tag+field ---Testcase 23: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..955.58 rows=930 width=81) - Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" -(3 rows) - ---Testcase 24: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - device_id | sig1 | sig2 | sig3 | sig4 ------------+------+------+------+------ - dev1 | 1 | a | 1.1 | t - dev2 | 2 | b | 1.2 | f - dev3 | 3 | c | 1.3 | f - dev1 | 4 | d | 2.4 | t - dev2 | 5 | e | 2.5 | f - dev3 | 6 | f | 2.6 | f - dev1 | 7 | g | 3.7 | t - dev2 | 8 | h | 3.8 | f - dev3 | 9 | i | 3.9 | f -(9 rows) - --- baserel * (remote restrict only) ---Testcase 25: -EXPLAIN VERBOSE -SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..284.00 rows=284 width=72) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "sc1" WHERE (("sig3" > 2)) -(3 rows) - ---Testcase 26: -SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - time | tags | fields -------------------------+-----------------------+------------------------------------------------------------ - 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "4", "sig2": "d", "sig3": "2.4", "sig4": "true"} - 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "5", "sig2": "e", "sig3": "2.5", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "6", "sig2": "f", "sig3": "2.6", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "7", "sig2": "g", "sig3": "3.7", "sig4": "true"} - 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "8", "sig2": "h", "sig3": "3.8", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "9", "sig2": "i", "sig3": "3.9", "sig4": "false"} -(6 rows) - --- baserel all (remote restrict only) ---Testcase 27: -EXPLAIN VERBOSE -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.sc1 (cost=10.00..291.81 rows=284 width=89) - Output: "time", (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) -(3 rows) - ---Testcase 28: -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - time | device_id | sig1 | sig2 | sig3 | sig4 -------------------------+-----------+------+------+------+------ - 1970-01-01 09:00:00+09 | dev1 | 4 | d | 2.4 | t - 1970-01-01 09:00:00+09 | dev2 | 5 | e | 2.5 | f - 1970-01-01 09:00:00+09 | dev3 | 6 | f | 2.6 | f - 1970-01-01 09:00:00+09 | dev1 | 7 | g | 3.7 | t - 1970-01-01 09:00:00+09 | dev2 | 8 | h | 3.8 | f - 1970-01-01 09:00:00+09 | dev3 | 9 | i | 3.9 | f -(6 rows) - --- baserel field only (remote restrict only) ---Testcase 29: -EXPLAIN VERBOSE -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..499.18 rows=487 width=49) - Output: ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - InfluxDB query: SELECT "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) -(3 rows) - ---Testcase 30: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - sig1 | sig2 | sig3 | sig4 -------+------+------+------ - 4 | d | 2.4 | t - 6 | f | 2.6 | f - 5 | e | 2.5 | f - 9 | i | 3.9 | f - 8 | h | 3.8 | f - 7 | g | 3.7 | t -(6 rows) - --- baserel tag+field (remote restrict only) ---Testcase 31: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..318.52 rows=310 width=81) - Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) -(3 rows) - ---Testcase 32: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - device_id | sig1 | sig2 | sig3 | sig4 ------------+------+------+------+------ - dev1 | 4 | d | 2.4 | t - dev2 | 5 | e | 2.5 | f - dev3 | 6 | f | 2.6 | f - dev1 | 7 | g | 3.7 | t - dev2 | 8 | h | 3.8 | f - dev3 | 9 | i | 3.9 | f -(6 rows) - --- baserel tag+field(except restrict var) (remote restrict only) ---Testcase 33: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..316.20 rows=310 width=73) - Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig4'::text))::boolean - InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig4" FROM "sc1" WHERE (("sig3" > 2)) -(3 rows) - ---Testcase 34: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - device_id | sig1 | sig2 | sig4 ------------+------+------+------ - dev1 | 4 | d | t - dev2 | 5 | e | f - dev3 | 6 | f | f - dev1 | 7 | g | t - dev2 | 8 | h | f - dev3 | 9 | i | f -(6 rows) - --- baserel * (local restrict only) ---Testcase 35: -EXPLAIN VERBOSE -SELECT * FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..849.00 rows=849 width=72) - Output: "time", tags, fields - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT * FROM "sc1" -(4 rows) - ---Testcase 36: -SELECT * FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - time | tags | fields -------------------------+-----------------------+------------------------------------------------------------ - 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "1", "sig2": "a", "sig3": "1.1", "sig4": "true"} - 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "2", "sig2": "b", "sig3": "1.2", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "3", "sig2": "c", "sig3": "1.3", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "4", "sig2": "d", "sig3": "2.4", "sig4": "true"} - 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "5", "sig2": "e", "sig3": "2.5", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "6", "sig2": "f", "sig3": "2.6", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "7", "sig2": "g", "sig3": "3.7", "sig4": "true"} - 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "8", "sig2": "h", "sig3": "3.8", "sig4": "false"} -(8 rows) - --- baserel all (local restrict only) ---Testcase 37: -EXPLAIN VERBOSE -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.sc1 (cost=10.00..872.35 rows=849 width=89) - Output: "time", (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" -(4 rows) - ---Testcase 38: -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - time | device_id | sig1 | sig2 | sig3 | sig4 -------------------------+-----------+------+------+------+------ - 1970-01-01 09:00:00+09 | dev1 | 1 | a | 1.1 | t - 1970-01-01 09:00:00+09 | dev2 | 2 | b | 1.2 | f - 1970-01-01 09:00:00+09 | dev3 | 3 | c | 1.3 | f - 1970-01-01 09:00:00+09 | dev1 | 4 | d | 2.4 | t - 1970-01-01 09:00:00+09 | dev2 | 5 | e | 2.5 | f - 1970-01-01 09:00:00+09 | dev3 | 6 | f | 2.6 | f - 1970-01-01 09:00:00+09 | dev1 | 7 | g | 3.7 | t - 1970-01-01 09:00:00+09 | dev2 | 8 | h | 3.8 | f -(8 rows) - --- baserel field only (local restrict only) ---Testcase 39: -EXPLAIN VERBOSE -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..1491.38 rows=1455 width=49) - Output: ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT "sig1", "sig2", "sig3", "sig4" FROM "sc1" -(4 rows) - ---Testcase 40: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - sig1 | sig2 | sig3 | sig4 -------+------+------+------ - 1 | a | 1.1 | t - 3 | c | 1.3 | f - 2 | b | 1.2 | f - 6 | f | 2.6 | f - 5 | e | 2.5 | f - 4 | d | 2.4 | t - 8 | h | 3.8 | f - 7 | g | 3.7 | t -(8 rows) - --- baserel tag+field (local restrict only) ---Testcase 41: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..950.44 rows=925 width=81) - Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" -(4 rows) - ---Testcase 42: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - device_id | sig1 | sig2 | sig3 | sig4 ------------+------+------+------+------ - dev1 | 1 | a | 1.1 | t - dev2 | 2 | b | 1.2 | f - dev3 | 3 | c | 1.3 | f - dev1 | 4 | d | 2.4 | t - dev2 | 5 | e | 2.5 | f - dev3 | 6 | f | 2.6 | f - dev1 | 7 | g | 3.7 | t - dev2 | 8 | h | 3.8 | f -(8 rows) - --- baserel tag+field(except local restrict var) (local restrict only) ---Testcase 43: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..948.12 rows=925 width=49) - Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT "device_id", "sig1", "sig3", "sig4", "sig2" FROM "sc1" -(4 rows) - ---Testcase 44: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - device_id | sig1 | sig3 | sig4 ------------+------+------+------ - dev1 | 1 | 1.1 | t - dev2 | 2 | 1.2 | f - dev3 | 3 | 1.3 | f - dev1 | 4 | 2.4 | t - dev2 | 5 | 2.5 | f - dev3 | 6 | 2.6 | f - dev1 | 7 | 3.7 | t - dev2 | 8 | 3.8 | f -(8 rows) - --- baserel * (both restricts) ---Testcase 45: -EXPLAIN VERBOSE -SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..283.00 rows=283 width=72) - Output: "time", tags, fields - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT * FROM "sc1" WHERE (("sig3" > 2)) -(4 rows) - ---Testcase 46: -SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - time | tags | fields -------------------------+-----------------------+------------------------------------------------------------ - 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "4", "sig2": "d", "sig3": "2.4", "sig4": "true"} - 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "5", "sig2": "e", "sig3": "2.5", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "6", "sig2": "f", "sig3": "2.6", "sig4": "false"} - 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "7", "sig2": "g", "sig3": "3.7", "sig4": "true"} - 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "8", "sig2": "h", "sig3": "3.8", "sig4": "false"} -(5 rows) - --- baserel all (both restricts) ---Testcase 47: -EXPLAIN VERBOSE -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.sc1 (cost=10.00..290.78 rows=283 width=89) - Output: "time", (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) -(4 rows) - ---Testcase 48: -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - time | device_id | sig1 | sig2 | sig3 | sig4 -------------------------+-----------+------+------+------+------ - 1970-01-01 09:00:00+09 | dev1 | 4 | d | 2.4 | t - 1970-01-01 09:00:00+09 | dev2 | 5 | e | 2.5 | f - 1970-01-01 09:00:00+09 | dev3 | 6 | f | 2.6 | f - 1970-01-01 09:00:00+09 | dev1 | 7 | g | 3.7 | t - 1970-01-01 09:00:00+09 | dev2 | 8 | h | 3.8 | f -(5 rows) - --- baserel field only (both restricts) ---Testcase 49: -EXPLAIN VERBOSE -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..497.12 rows=485 width=49) - Output: ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) -(4 rows) - ---Testcase 50: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - sig1 | sig2 | sig3 | sig4 -------+------+------+------ - 4 | d | 2.4 | t - 6 | f | 2.6 | f - 5 | e | 2.5 | f - 8 | h | 3.8 | f - 7 | g | 3.7 | t -(5 rows) - --- baserel tag+field (both restricts) ---Testcase 51: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..316.47 rows=308 width=81) - Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) -(4 rows) - ---Testcase 52: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - device_id | sig1 | sig2 | sig3 | sig4 ------------+------+------+------+------ - dev1 | 4 | d | 2.4 | t - dev2 | 5 | e | 2.5 | f - dev3 | 6 | f | 2.6 | f - dev1 | 7 | g | 3.7 | t - dev2 | 8 | h | 3.8 | f -(5 rows) - --- baserel tag+field(except local restrict var) (both restricts) ---Testcase 53: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..315.70 rows=308 width=49) - Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT "device_id", "sig1", "sig3", "sig4", "sig2" FROM "sc1" WHERE (("sig3" > 2)) -(4 rows) - ---Testcase 54: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - device_id | sig1 | sig3 | sig4 ------------+------+------+------ - dev1 | 4 | 2.4 | t - dev2 | 5 | 2.5 | f - dev3 | 6 | 2.6 | f - dev1 | 7 | 3.7 | t - dev2 | 8 | 3.8 | f -(5 rows) - --- baserel tag+field(except remote restrict var) (both restricts) ---Testcase 55: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..314.16 rows=308 width=73) - Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig4'::text))::boolean - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig4" FROM "sc1" WHERE (("sig3" > 2)) -(4 rows) - ---Testcase 56: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - device_id | sig1 | sig2 | sig4 ------------+------+------+------ - dev1 | 4 | d | t - dev2 | 5 | e | f - dev3 | 6 | f | f - dev1 | 7 | g | t - dev2 | 8 | h | f -(5 rows) - --- baserel tag+field(except local and remote restrict var) (both restricts) ---Testcase 57: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc1 (cost=10.00..313.39 rows=308 width=41) - Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, ((fields ->> 'sig4'::text))::boolean - Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) - InfluxDB query: SELECT "device_id", "sig1", "sig4", "sig2" FROM "sc1" WHERE (("sig3" > 2)) -(4 rows) - ---Testcase 58: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - device_id | sig1 | sig4 ------------+------+------ - dev1 | 4 | t - dev2 | 5 | f - dev3 | 6 | f - dev1 | 7 | t - dev2 | 8 | f -(5 rows) - --- aggregate sum (remote) ---Testcase 59: -EXPLAIN VERBOSE -SELECT sum((fields->>'sig1')::bigint),sum((fields->>'sig3')::double precision) FROM sc1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (sum(((fields ->> 'sig1'::text))::bigint)), (sum(((fields ->> 'sig3'::text))::double precision)) - InfluxDB query: SELECT sum("sig1"), sum("sig3") FROM "sc1" -(3 rows) - ---Testcase 60: -SELECT sum((fields->>'sig1')::bigint),sum((fields->>'sig3')::double precision) FROM sc1; - sum | sum ------+------ - 45 | 22.5 -(1 row) - --- aggregate count (remote) ---Testcase 61: -EXPLAIN VERBOSE -SELECT count(fields->>'sig1'),count(fields->>'sig2'),count(fields->>'sig3'),count(fields->>'sig4') FROM sc1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (count((fields ->> 'sig1'::text))), (count((fields ->> 'sig2'::text))), (count((fields ->> 'sig3'::text))), (count((fields ->> 'sig4'::text))) - InfluxDB query: SELECT count("sig1"), count("sig2"), count("sig3"), count("sig4") FROM "sc1" -(3 rows) - ---Testcase 62: -SELECT count(fields->>'sig1'),count(fields->>'sig2'),count(fields->>'sig3'),count(fields->>'sig4') FROM sc1; - count | count | count | count --------+-------+-------+------- - 9 | 9 | 9 | 9 -(1 row) - --- aggregate avg (local) ---Testcase 63: -EXPLAIN VERBOSE -SELECT avg((fields->>'sig1')::bigint),avg((fields->>'sig3')::double precision) FROM sc1; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Aggregate (cost=1491.25..1491.26 rows=1 width=40) - Output: avg(((fields ->> 'sig1'::text))::bigint), avg(((fields ->> 'sig3'::text))::double precision) - -> Foreign Scan on public.sc1 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "sc1" -(5 rows) - ---Testcase 64: -SELECT avg((fields->>'sig1')::bigint),avg((fields->>'sig3')::double precision) FROM sc1; - avg | avg ---------------------+----- - 5.0000000000000000 | 2.5 -(1 row) - --- aggregate sum (remote) + tag + group by ---Testcase 65: -EXPLAIN VERBOSE -SELECT sum((fields->>'sig1')::bigint),tags->>'device_id' device_id FROM sc1 GROUP BY tags->>'device_id'; - QUERY PLAN --------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (sum(((fields ->> 'sig1'::text))::bigint)), ((tags ->> 'device_id'::text)) - InfluxDB query: SELECT sum("sig1") FROM "sc1" GROUP BY ("device_id") -(3 rows) - ---Testcase 66: -SELECT sum((fields->>'sig1')::bigint),tags->>'device_id' device_id FROM sc1 GROUP BY tags->>'device_id'; - sum | device_id ------+----------- - 12 | dev1 - 15 | dev2 - 18 | dev3 -(3 rows) - --- aggregate sum (remote) + tag + group by time ---Testcase 67: -EXPLAIN VERBOSE -SELECT sum((fields->>'sig1')::bigint) FROM sc1 WHERE time >= to_timestamp(0) AND time <= to_timestamp(2) GROUP BY influx_time(time, interval '1s'); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (sum(((fields ->> 'sig1'::text))::bigint)), (influx_time("time", '@ 1 sec'::interval)) - InfluxDB query: SELECT sum("sig1") FROM "sc1" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:02')) GROUP BY (time(0d0h0m1s0u)) -(3 rows) - ---Testcase 68: -SELECT sum((fields->>'sig1')::bigint) FROM sc1 WHERE time >= to_timestamp(0) AND time <= to_timestamp(2) GROUP BY influx_time(time, interval '1s'); - sum ------ - 45 - - -(3 rows) - --- aggreagte sum (remote) + tag + group by time ---Testcase 69: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,sum((fields->>'sig1')::bigint),fields->>'sid' sid FROM sc3 GROUP BY fields->>'sid', tags->>'device_id'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=96) - Output: ((tags ->> 'device_id'::text)), (sum(((fields ->> 'sig1'::text))::bigint)), ((fields ->> 'sid'::text)) - InfluxDB query: SELECT sum("sig1") FROM "sc3" GROUP BY ("sid"), ("device_id") -(3 rows) - ---Testcase 70: -SELECT tags->>'device_id' device_id,sum((fields->>'sig1')::bigint),fields->>'sid' sid FROM sc3 GROUP BY fields->>'sid', tags->>'device_id'; - device_id | sum | sid ------------+-----+----- - dev1 | 10 | id1 - dev1 | 40 | id2 - dev1 | 70 | id3 - dev2 | 20 | id1 - dev2 | 50 | id2 - dev2 | 80 | id3 - dev3 | 30 | id1 - dev3 | 60 | id2 - dev3 | 90 | id3 -(9 rows) - --- fucntion (remote) ---Testcase 71: -EXPLAIN VERBOSE -SELECT sqrt((fields->>'sig1')::bigint) FROM sc1; - QUERY PLAN ---------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1480.28 rows=1462 width=8) - Output: (sqrt((((fields ->> 'sig1'::text))::bigint)::double precision)) - InfluxDB query: SELECT sqrt("sig1") FROM "sc1" -(3 rows) - ---Testcase 72: -SELECT sqrt((fields->>'sig1')::bigint) FROM sc1; - sqrt ------------------- - 1 - 1.73205080756888 - 1.4142135623731 - 2.44948974278318 - 2.23606797749979 - 2 - 2.82842712474619 - 2.64575131106459 - 3 -(9 rows) - --- sparse data - baserel field only ---Testcase 73: -EXPLAIN VERBOSE -SELECT (fields->>'sig')::double precision sig FROM sc4; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan on public.sc4 (cost=10.00..1472.96 rows=1462 width=8) - Output: ((fields ->> 'sig'::text))::double precision - InfluxDB query: SELECT "sig" FROM "sc4" -(3 rows) - ---Testcase 74: -SELECT (fields->>'sig')::double precision sig FROM sc4; - sig ------ - 1 - 3 - 2 -(3 rows) - --- sparse data - baserel filed + remote restrict - no result by filter ---Testcase 75: -EXPLAIN VERBOSE -SELECT (fields->>'sig')::double precision sig FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.sc4 (cost=10.00..7.05 rows=7 width=8) - Output: ((fields ->> 'sig'::text))::double precision - InfluxDB query: SELECT "sig" FROM "sc4" WHERE ((time >= '1970-01-01 00:00:01')) AND ((time <= '1970-01-01 00:00:02')) -(3 rows) - ---Testcase 76: -SELECT (fields->>'sig')::double precision sig FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); - sig ------ -(0 rows) - --- sparse data - aggreate avg (local) + remote restrict - ? ---Testcase 77: -EXPLAIN VERBOSE -SELECT avg((fields->>'sig')::double precision) FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------- - Aggregate (cost=7.07..7.08 rows=1 width=8) - Output: avg(((fields ->> 'sig'::text))::double precision) - -> Foreign Scan on public.sc4 (cost=10.00..7.00 rows=7 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "sc4" WHERE ((time >= '1970-01-01 00:00:01')) AND ((time <= '1970-01-01 00:00:02')) -(5 rows) - ---Testcase 78: -SELECT avg((fields->>'sig')::double precision) FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); - avg ------ - -(1 row) - --- aggregate sum (remote) and avg (local) ---Testcase 79: -EXPLAIN VERBOSE -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig1')::bigint) FROM sc1; - QUERY PLAN ----------------------------------------------------------------------------------------------- - Aggregate (cost=1491.25..1491.26 rows=1 width=64) - Output: avg(((fields ->> 'sig1'::text))::bigint), sum(((fields ->> 'sig1'::text))::bigint) - -> Foreign Scan on public.sc1 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "sc1" -(5 rows) - ---Testcase 80: -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig1')::bigint) FROM sc1; - avg | sum ---------------------+----- - 5.0000000000000000 | 45 -(1 row) - --- aggregate sum (remote) and avg (local) different remote column ---Testcase 81: -EXPLAIN VERBOSE -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) FROM sc1; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Aggregate (cost=1491.24..1491.25 rows=1 width=40) - Output: avg(((fields ->> 'sig1'::text))::bigint), sum(((fields ->> 'sig3'::text))::double precision) - -> Foreign Scan on public.sc1 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "sc1" -(5 rows) - ---Testcase 82: -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) FROM sc1; - avg | sum ---------------------+------ - 5.0000000000000000 | 22.5 -(1 row) - --- aggregate sum (remote) and avg (local) having non existed remote column ---Testcase 83: -EXPLAIN VERBOSE -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig')::double precision) FROM sc1; - QUERY PLAN -------------------------------------------------------------------------------------------------------- - Aggregate (cost=1491.24..1491.25 rows=1 width=40) - Output: avg(((fields ->> 'sig1'::text))::bigint), sum(((fields ->> 'sig'::text))::double precision) - -> Foreign Scan on public.sc1 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "sc1" -(5 rows) - ---Testcase 84: -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig')::double precision) FROM sc1; - avg | sum ---------------------+----- - 5.0000000000000000 | -(1 row) - --- aggregate sum (remote) + field + group by(field) + order by(field) - no pushdown for aggregation ---Testcase 85: -EXPLAIN VERBOSE -SELECT sum((fields->>'sig1')::bigint),(fields->>'sig1')::bigint sig1 FROM sc1 GROUP BY (fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Sort (cost=1502.88..1503.38 rows=200 width=40) - Output: (sum((((fields ->> 'sig1'::text))::bigint))), (((fields ->> 'sig1'::text))::bigint) - Sort Key: (((sc1.fields ->> 'sig1'::text))::bigint) - -> HashAggregate (cost=1491.24..1495.24 rows=200 width=40) - Output: sum((((fields ->> 'sig1'::text))::bigint)), (((fields ->> 'sig1'::text))::bigint) - Group Key: ((sc1.fields ->> 'sig1'::text))::bigint - -> Foreign Scan on public.sc1 (cost=10.00..1472.96 rows=1462 width=40) - Output: ((fields ->> 'sig1'::text))::bigint, fields - InfluxDB query: SELECT * FROM "sc1" -(9 rows) - ---Testcase 86: -SELECT sum((fields->>'sig1')::bigint),(fields->>'sig1')::bigint sig1 FROM sc1 GROUP BY (fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; - sum | sig1 ------+------ - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 5 - 6 | 6 - 7 | 7 - 8 | 8 - 9 | 9 -(9 rows) - ---Testcase 87: -EXPLAIN VERBOSE -SELECT count(*) FROM (SELECT (fields->>'sig1')::bigint sig1 FROM sc1) sc; - QUERY PLAN ------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=8) - Output: (count(*)) - InfluxDB query: SELECT count(*) FROM "sc1" -(3 rows) - ---Testcase 88: -SELECT count(*) FROM (SELECT (fields->>'sig1')::bigint sig1 FROM sc1) sc; - count -------- - 9 -(1 row) - --- drop extension ---Testcase 89: -DROP FOREIGN TABLE sc1; ---Testcase 90: -DROP FOREIGN TABLE sc2; ---Testcase 91: -DROP FOREIGN TABLE sc3; ---Testcase 92: -DROP FOREIGN TABLE sc4; ---Testcase 93: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 94: -DROP SERVER influxdb_svr; ---Testcase 95: -DROP EXTENSION influxdb_fdw; diff --git a/expected/10.18/schemaless/selectfunc.out b/expected/10.18/schemaless/selectfunc.out deleted file mode 100644 index 5ae4c52..0000000 --- a/expected/10.18/schemaless/selectfunc.out +++ /dev/null @@ -1,10104 +0,0 @@ ---Testcase 1: -SET datestyle=ISO; ---Testcase 2: -SET timezone='Japan'; -\set ECHO none ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); ---Testcase 6: -CREATE FOREIGN TABLE s3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 's3', tags 'tag1', schemaless 'true'); --- s3 (value1 as float8, value2 as bigint) ---Testcase 7: -\d s3; - Foreign table "public.s3" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+----------------- - time | timestamp with time zone | | | | - tags | jsonb | | | | (tags 'true') - fields | jsonb | | | | (fields 'true') -Server: server1 -FDW options: ("table" 's3', tags 'tag1', schemaless 'true') - ---Testcase 8: -SELECT * FROM s3; - time | tags | fields -------------------------+---------------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | {"tag1": "a"} | {"value1": "0.1", "value2": "100", "value3": "-0.1", "value4": "-100"} - 1970-01-01 09:00:01+09 | {"tag1": "a"} | {"value1": "0.2", "value2": "100", "value3": "-0.2", "value4": "-100"} - 1970-01-01 09:00:02+09 | {"tag1": "a"} | {"value1": "0.3", "value2": "100", "value3": "-0.3", "value4": "-100"} - 1970-01-01 09:00:03+09 | {"tag1": "b"} | {"value1": "1.1", "value2": "200", "value3": "-1.1", "value4": "-200"} - 1970-01-01 09:00:04+09 | {"tag1": "b"} | {"value1": "2.2", "value2": "200", "value3": "-2.2", "value4": "-200"} - 1970-01-01 09:00:05+09 | {"tag1": "b"} | {"value1": "3.3", "value2": "200", "value3": "-3.3", "value4": "-200"} -(6 rows) - --- select float8() (not pushdown, remove float8, explain) ---Testcase 9: -EXPLAIN VERBOSE -SELECT float8(fields->>'value1'), float8(fields->>'value2'), float8(fields->>'value3'), float8(fields->>'value4') FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan on public.s3 (cost=10.00..1505.86 rows=1462 width=32) - Output: ((fields ->> 'value1'::text))::double precision, ((fields ->> 'value2'::text))::double precision, ((fields ->> 'value3'::text))::double precision, ((fields ->> 'value4'::text))::double precision - InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" -(3 rows) - --- select float8() (not pushdown, remove float8, result) ---Testcase 10: -SELECT float8(fields->>'value1'), float8(fields->>'value2'), float8(fields->>'value3'), float8(fields->>'value4') FROM s3; - float8 | float8 | float8 | float8 ---------+--------+--------+-------- - 0.1 | 100 | -0.1 | -100 - 0.2 | 100 | -0.2 | -100 - 0.3 | 100 | -0.3 | -100 - 1.1 | 200 | -1.1 | -200 - 2.2 | 200 | -2.2 | -200 - 3.3 | 200 | -3.3 | -200 -(6 rows) - --- select sqrt (builtin function, explain) ---Testcase 11: -EXPLAIN VERBOSE -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1494.89 rows=1462 width=16) - Output: (sqrt(((fields ->> 'value1'::text))::double precision)), (sqrt((((fields ->> 'value2'::text))::bigint)::double precision)) - InfluxDB query: SELECT sqrt("value1"), sqrt("value2") FROM "s3" -(3 rows) - --- select sqrt (builtin function, result) ---Testcase 12: -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3; - sqrt | sqrt --------------------+----------------- - 0.316227766016838 | 10 - 0.447213595499958 | 10 - 0.547722557505166 | 10 - 1.04880884817015 | 14.142135623731 - 1.48323969741913 | 14.142135623731 - 1.81659021245849 | 14.142135623731 -(6 rows) - --- select sqrt (builtin function, not pushdown constraints, explain) ---Testcase 13: -EXPLAIN VERBOSE -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1487.74 rows=1455 width=16) - Output: (sqrt(((fields ->> 'value1'::text))::double precision)), (sqrt((((fields ->> 'value2'::text))::bigint)::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT sqrt("value1"), sqrt("value2"), "value2" FROM "s3" -(4 rows) - --- select sqrt (builtin function, not pushdown constraints, result) ---Testcase 14: -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - sqrt | sqrt -------------------+----------------- - 1.04880884817015 | 14.142135623731 - 1.48323969741913 | 14.142135623731 - 1.81659021245849 | 14.142135623731 -(3 rows) - --- select sqrt (builtin function, pushdown constraints, explain) ---Testcase 15: -EXPLAIN VERBOSE -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1487.74 rows=1455 width=16) - Output: (sqrt(((fields ->> 'value1'::text))::double precision)), (sqrt((((fields ->> 'value2'::text))::bigint)::double precision)) - InfluxDB query: SELECT sqrt("value1"), sqrt("value2") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select sqrt (builtin function, pushdown constraints, result) ---Testcase 16: -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - sqrt | sqrt --------------------+------ - 0.316227766016838 | 10 - 0.447213595499958 | 10 - 0.547722557505166 | 10 -(3 rows) - --- select sqrt(*) (stub agg function, explain) ---Testcase 17: -EXPLAIN VERBOSE -SELECT sqrt_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (sqrt_all()) - InfluxDB query: SELECT sqrt(*) FROM "s3" -(3 rows) - --- select sqrt(*) (stub agg function, result) ---Testcase 18: -SELECT sqrt_all() from s3; - sqrt_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.31622776601683794\",\"value2\" : \"10\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.4472135954999579\",\"value2\" : \"10\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.5477225575051661\",\"value2\" : \"10\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.0488088481701516\",\"value2\" : \"14.142135623730951\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.4832396974191326\",\"value2\" : \"14.142135623730951\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.816590212458495\",\"value2\" : \"14.142135623730951\",\"value3\" : null,\"value4\" : null }") -(6 rows) - --- select sqrt(*) (stub agg function and group by tag only) (explain) ---Testcase 19: -EXPLAIN VERBOSE -SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (sqrt_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sqrt(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select sqrt(*) (stub agg function and group by tag only) (result) ---Testcase 20: -SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - sqrt_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.31622776601683794\",\"value2\" : \"10\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.4472135954999579\",\"value2\" : \"10\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.5477225575051661\",\"value2\" : \"10\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.0488088481701516\",\"value2\" : \"14.142135623730951\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.4832396974191326\",\"value2\" : \"14.142135623730951\",\"value3\" : null,\"value4\" : null }") -(5 rows) - --- select abs (builtin function, explain) ---Testcase 21: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.48 rows=1462 width=32) - Output: (abs(((fields ->> 'value1'::text))::double precision)), (abs(((fields ->> 'value2'::text))::bigint)), (abs(((fields ->> 'value3'::text))::double precision)), (abs(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT abs("value1"), abs("value2"), abs("value3"), abs("value4") FROM "s3" -(3 rows) - --- ABS() returns negative values if integer (https://github.com/influxdata/influxdb/issues/10261) --- select abs (builtin function, result) ---Testcase 22: -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3; - abs | abs | abs | abs ------+-----+-----+----- - 0.1 | 100 | 0.1 | 100 - 0.2 | 100 | 0.2 | 100 - 0.3 | 100 | 0.3 | 100 - 1.1 | 200 | 1.1 | 200 - 2.2 | 200 | 2.2 | 200 - 3.3 | 200 | 3.3 | 200 -(6 rows) - --- select abs (builtin function, not pushdown constraints, explain) ---Testcase 23: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1513.20 rows=1455 width=32) - Output: (abs(((fields ->> 'value1'::text))::double precision)), (abs(((fields ->> 'value2'::text))::bigint)), (abs(((fields ->> 'value3'::text))::double precision)), (abs(((fields ->> 'value4'::text))::bigint)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT abs("value1"), abs("value2"), abs("value3"), abs("value4"), "value2" FROM "s3" -(4 rows) - --- select abs (builtin function, not pushdown constraints, result) ---Testcase 24: -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - abs | abs | abs | abs ------+-----+-----+----- - 1.1 | 200 | 1.1 | 200 - 2.2 | 200 | 2.2 | 200 - 3.3 | 200 | 3.3 | 200 -(3 rows) - --- select abs (builtin function, pushdown constraints, explain) ---Testcase 25: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1513.20 rows=1455 width=32) - Output: (abs(((fields ->> 'value1'::text))::double precision)), (abs(((fields ->> 'value2'::text))::bigint)), (abs(((fields ->> 'value3'::text))::double precision)), (abs(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT abs("value1"), abs("value2"), abs("value3"), abs("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select abs (builtin function, pushdown constraints, result) ---Testcase 26: -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - abs | abs | abs | abs ------+-----+-----+----- - 0.1 | 100 | 0.1 | 100 - 0.2 | 100 | 0.2 | 100 - 0.3 | 100 | 0.3 | 100 -(3 rows) - --- select log (builtin function, need to swap arguments, numeric cast, explain) --- log_(v) : postgresql (base, v), influxdb (v, base) ---Testcase 27: -EXPLAIN VERBOSE -SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - QUERY PLAN -------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1480.46 rows=1455 width=32) - Output: (log(((fields ->> 'value1'::text))::numeric, ((fields ->> 'value2'::text))::numeric)) - InfluxDB query: SELECT log("value2", "value1") FROM "s3" WHERE (("value1" <> 1)) -(3 rows) - --- select log (builtin function, need to swap arguments, numeric cast, result) ---Testcase 28: -SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - log ---------------------- - -2.0000000000000004 - -2.8613531161467867 - -3.824978578786397 - 55.590256753535286 - 6.719852756654074 - 4.43773989221174 -(6 rows) - --- select log (builtin function, need to swap arguments, float8, explain) ---Testcase 29: -EXPLAIN VERBOSE -SELECT log((fields->>'value1')::numeric, 0.1) FROM s3 WHERE (fields->>'value1')::float != 1; - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1469.55 rows=1455 width=32) - Output: (log(((fields ->> 'value1'::text))::numeric, 0.1)) - InfluxDB query: SELECT log(0.1, "value1") FROM "s3" WHERE (("value1" <> 1)) -(3 rows) - --- select log (builtin function, need to swap arguments, float8, result) ---Testcase 30: -SELECT log((fields->>'value1')::numeric, 0.1) FROM s3 WHERE (fields->>'value1')::float != 1; - log ---------------------- - 1 - 1.430676558073393 - 1.912489289393198 - -24.158857928096783 - -2.92036730043365 - -1.9285884584617043 -(6 rows) - --- select log (builtin function, need to swap arguments, bigint, explain) ---Testcase 31: -EXPLAIN VERBOSE -SELECT log((fields->>'value2')::numeric, 3::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..1469.55 rows=1455 width=32) - Output: (log(((fields ->> 'value2'::text))::numeric, '3'::numeric)) - InfluxDB query: SELECT log(3, "value2") FROM "s3" WHERE (("value1" <> 1)) -(3 rows) - --- select log (builtin function, need to swap arguments, bigint, result) ---Testcase 32: -SELECT log((fields->>'value2')::numeric, 3::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - log ---------------------- - 0.23856062735983116 - 0.23856062735983116 - 0.23856062735983116 - 0.2073511669203535 - 0.2073511669203535 - 0.2073511669203535 -(6 rows) - --- select log (builtin function, need to swap arguments, mix type, explain) ---Testcase 33: -EXPLAIN VERBOSE -SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - QUERY PLAN -------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1480.46 rows=1455 width=32) - Output: (log(((fields ->> 'value1'::text))::numeric, ((fields ->> 'value2'::text))::numeric)) - InfluxDB query: SELECT log("value2", "value1") FROM "s3" WHERE (("value1" <> 1)) -(3 rows) - --- select log (builtin function, need to swap arguments, mix type, result) ---Testcase 34: -SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - log ---------------------- - -2.0000000000000004 - -2.8613531161467867 - -3.824978578786397 - 55.590256753535286 - 6.719852756654074 - 4.43773989221174 -(6 rows) - --- select log(*) (stub agg function, explain) ---Testcase 35: -EXPLAIN VERBOSE -SELECT log_all(50) FROM s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (log_all('50'::double precision)) - InfluxDB query: SELECT log(*, 50) FROM "s3" -(3 rows) - --- select log(*) (stub agg function, result) ---Testcase 36: -SELECT log_all(50) FROM s3; - log_all --------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"-0.5885919100677789\",\"value2\" : \"1.177183820135558\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"-0.41140808993222105\",\"value2\" : \"1.177183820135558\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"-0.3077621994183976\",\"value2\" : \"1.177183820135558\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.024363399620113902\",\"value2\" : \"1.3543676402711158\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.20154721975567183\",\"value2\" : \"1.3543676402711158\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"0.3051931102694953\",\"value2\" : \"1.3543676402711158\",\"value3\" : null,\"value4\" : null }") -(6 rows) - --- select log(*) (stub agg function, explain) ---Testcase 37: -EXPLAIN VERBOSE -SELECT log_all(70.5) FROM s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (log_all('70.5'::double precision)) - InfluxDB query: SELECT log(*, 70.5) FROM "s3" -(3 rows) - --- select log(*) (stub agg function, result) ---Testcase 38: -SELECT log_all(70.5) FROM s3; - log_all --------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"-0.5410701701500463\",\"value2\" : \"1.0821403403000929\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"-0.3781918191758683\",\"value2\" : \"1.0821403403000929\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"-0.28291409167667503\",\"value2\" : \"1.0821403403000929\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.02239634720152814\",\"value2\" : \"1.2450186912742707\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.18527469817570616\",\"value2\" : \"1.2450186912742707\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"0.28055242567489946\",\"value2\" : \"1.2450186912742707\",\"value3\" : null,\"value4\" : null }") -(6 rows) - --- select log(*) (stub agg function and group by tag only) (explain) ---Testcase 39: -EXPLAIN VERBOSE -SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (log_all('50'::double precision)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT log(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select log(*) (stub agg function and group by tag only) (result) ---Testcase 40: -SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - log_all --------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"-0.5885919100677789\",\"value2\" : \"1.177183820135558\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"-0.41140808993222105\",\"value2\" : \"1.177183820135558\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"-0.3077621994183976\",\"value2\" : \"1.177183820135558\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.024363399620113902\",\"value2\" : \"1.3543676402711158\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.20154721975567183\",\"value2\" : \"1.3543676402711158\",\"value3\" : null,\"value4\" : null }") -(5 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 41: -SELECT ln_all(),log10_all(),log_all(50) FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub ln_all() is called -CONTEXT: PL/pgSQL function ln_all() line 3 at RAISE --- select log2 (stub function, explain) ---Testcase 42: -EXPLAIN VERBOSE -SELECT log2((fields->>'value1')::float),log2((fields->>'value2')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2218.59 rows=1462 width=16) - Output: (log2(((fields ->> 'value1'::text))::double precision)), (log2((((fields ->> 'value2'::text))::bigint)::double precision)) - InfluxDB query: SELECT log2("value1"), log2("value2") FROM "s3" -(3 rows) - --- select log2 (stub function, result) ---Testcase 43: -SELECT log2((fields->>'value1')::float),log2((fields->>'value2')::bigint) FROM s3; - log2 | log2 --------------------+------------------ - -3.32192809488736 | 6.64385618977472 - -2.32192809488736 | 6.64385618977472 - -1.73696559416621 | 6.64385618977472 - 0.137503523749935 | 7.64385618977472 - 1.13750352374994 | 7.64385618977472 - 1.72246602447109 | 7.64385618977472 -(6 rows) - --- select log2(*) (stub agg function, explain) ---Testcase 44: -EXPLAIN VERBOSE -SELECT log2_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (log2_all()) - InfluxDB query: SELECT log2(*) FROM "s3" -(3 rows) - --- select log2(*) (stub agg function, result) ---Testcase 45: -SELECT log2_all() from s3; - log2_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"-3.321928094887362\",\"value2\" : \"6.643856189774724\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"-2.321928094887362\",\"value2\" : \"6.643856189774724\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"-1.736965594166206\",\"value2\" : \"6.643856189774724\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.13750352374993502\",\"value2\" : \"7.643856189774724\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1375035237499351\",\"value2\" : \"7.643856189774724\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.722466024471091\",\"value2\" : \"7.643856189774724\",\"value3\" : null,\"value4\" : null }") -(6 rows) - --- select log2(*) (stub agg function and group by tag only) (explain) ---Testcase 46: -EXPLAIN VERBOSE -SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (log2_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT log2(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select log2(*) (stub agg function and group by tag only) (result) ---Testcase 47: -SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - log2_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"-3.321928094887362\",\"value2\" : \"6.643856189774724\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"-2.321928094887362\",\"value2\" : \"6.643856189774724\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"-1.736965594166206\",\"value2\" : \"6.643856189774724\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.13750352374993502\",\"value2\" : \"7.643856189774724\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1375035237499351\",\"value2\" : \"7.643856189774724\",\"value3\" : null,\"value4\" : null }") -(5 rows) - --- select log10 (stub function, explain) ---Testcase 48: -EXPLAIN VERBOSE -SELECT log10((fields->>'value1')::float),log10((fields->>'value2')::bigint) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2218.59 rows=1462 width=16) - Output: (log10(((fields ->> 'value1'::text))::double precision)), (log10((((fields ->> 'value2'::text))::bigint)::double precision)) - InfluxDB query: SELECT log10("value1"), log10("value2") FROM "s3" -(3 rows) - --- select log10 (stub function, result) ---Testcase 49: -SELECT log10((fields->>'value1')::float),log10((fields->>'value2')::bigint) FROM s3; - log10 | log10 ---------------------+------------------ - -1 | 2 - -0.698970004336019 | 2 - -0.522878745280338 | 2 - 0.0413926851582251 | 2.30102999566398 - 0.342422680822206 | 2.30102999566398 - 0.518513939877888 | 2.30102999566398 -(6 rows) - --- select log10(*) (stub agg function, explain) ---Testcase 50: -EXPLAIN VERBOSE -SELECT log10_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (log10_all()) - InfluxDB query: SELECT log10(*) FROM "s3" -(3 rows) - --- select log10(*) (stub agg function, result) ---Testcase 51: -SELECT log10_all() from s3; - log10_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"-0.9999999999999999\",\"value2\" : \"2\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"-0.6989700043360187\",\"value2\" : \"2\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"-0.5228787452803376\",\"value2\" : \"2\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.04139268515822507\",\"value2\" : \"2.301029995663981\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.3424226808222063\",\"value2\" : \"2.301029995663981\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"0.5185139398778875\",\"value2\" : \"2.301029995663981\",\"value3\" : null,\"value4\" : null }") -(6 rows) - --- select log10(*) (stub agg function and group by tag only) (explain) ---Testcase 52: -EXPLAIN VERBOSE -SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (log10_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT log10(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select log10(*) (stub agg function and group by tag only) (result) ---Testcase 53: -SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - log10_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"-0.9999999999999999\",\"value2\" : \"2\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"-0.6989700043360187\",\"value2\" : \"2\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"-0.5228787452803376\",\"value2\" : \"2\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.04139268515822507\",\"value2\" : \"2.301029995663981\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.3424226808222063\",\"value2\" : \"2.301029995663981\",\"value3\" : null,\"value4\" : null }") -(5 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 54: -SELECT log2_all(), log10_all() FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub log2_all() is called -CONTEXT: PL/pgSQL function log2_all() line 3 at RAISE --- select spread (stub agg function, explain) ---Testcase 55: -EXPLAIN VERBOSE -SELECT spread((fields->>'value1')::float),spread((fields->>'value2')::bigint),spread((fields->>'value3')::float),spread((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (spread(((fields ->> 'value1'::text))::double precision)), (spread(((fields ->> 'value2'::text))::bigint)), (spread(((fields ->> 'value3'::text))::double precision)), (spread(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT spread("value1"), spread("value2"), spread("value3"), spread("value4") FROM "s3" -(3 rows) - --- select spread (stub agg function, result) ---Testcase 56: -SELECT spread((fields->>'value1')::float),spread((fields->>'value2')::bigint),spread((fields->>'value3')::float),spread((fields->>'value4')::bigint) FROM s3; - spread | spread | spread | spread ---------+--------+--------+-------- - 3.2 | 100 | 3.2 | 100 -(1 row) - --- select spread (stub agg function, raise exception if not expected type) ---Testcase 57: -SELECT spread((fields->>'value1')::numeric),spread((fields->>'value2')::numeric),spread((fields->>'value3')::numeric),spread((fields->>'value4')::numeric) FROM s3; -ERROR: stub spread_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE --- select abs as nest function with agg (pushdown, explain) ---Testcase 58: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),abs(sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (abs(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), abs(sum("value3")) FROM "s3" -(3 rows) - --- select abs as nest function with agg (pushdown, result) ---Testcase 59: -SELECT sum((fields->>'value3')::float),abs(sum((fields->>'value3')::float)) FROM s3; - sum | abs -------+----- - -7.2 | 7.2 -(1 row) - --- select abs as nest with log2 (pushdown, explain) ---Testcase 60: -EXPLAIN VERBOSE -SELECT abs(log2((fields->>'value1')::float)),abs(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (abs(log2(((fields ->> 'value1'::text))::double precision))), (abs(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT abs(log2("value1")), abs(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select abs as nest with log2 (pushdown, result) ---Testcase 61: -SELECT abs(log2((fields->>'value1')::float)),abs(log2(1/(fields->>'value1')::float)) FROM s3; - abs | abs --------------------+------------------- - 3.32192809488736 | 3.32192809488736 - 2.32192809488736 | 2.32192809488736 - 1.73696559416621 | 1.73696559416621 - 0.137503523749935 | 0.137503523749935 - 1.13750352374994 | 1.13750352374993 - 1.72246602447109 | 1.72246602447109 -(6 rows) - --- select abs with non pushdown func and explicit constant (explain) ---Testcase 62: -EXPLAIN VERBOSE -SELECT abs((fields->>'value3')::float), pi(), 4.1 FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (abs(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT abs("value3") FROM "s3" -(3 rows) - --- select abs with non pushdown func and explicit constant (result) ---Testcase 63: -SELECT abs((fields->>'value3')::float), pi(), 4.1 FROM s3; - abs | pi | ?column? ------+------------------+---------- - 0.1 | 3.14159265358979 | 4.1 - 0.2 | 3.14159265358979 | 4.1 - 0.3 | 3.14159265358979 | 4.1 - 1.1 | 3.14159265358979 | 4.1 - 2.2 | 3.14159265358979 | 4.1 - 3.3 | 3.14159265358979 | 4.1 -(6 rows) - --- select sqrt as nest function with agg and explicit constant (pushdown, explain) ---Testcase 64: -EXPLAIN VERBOSE -SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1 FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sqrt((count(((fields ->> 'value1'::text))::double precision))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT sqrt(count("value1")) FROM "s3" -(3 rows) - --- select sqrt as nest function with agg and explicit constant (pushdown, result) ---Testcase 65: -SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1 FROM s3; - sqrt | pi | ?column? -------------------+------------------+---------- - 2.44948974278318 | 3.14159265358979 | 4.1 -(1 row) - --- select sqrt as nest function with agg and explicit constant and tag (error, explain) ---Testcase 66: -EXPLAIN VERBOSE -SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1, tags->>'tag1' tag1 FROM s3; -ERROR: column "s3.tags" must appear in the GROUP BY clause or be used in an aggregate function -LINE 2: ...rt(count((fields->>'value1')::float)), pi(), 4.1, tags->>'ta... - ^ --- select spread (stub agg function and group by influx_time() and tag) (explain) ---Testcase 67: -EXPLAIN VERBOSE -SELECT spread((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (spread(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT spread("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select spread (stub agg function and group by influx_time() and tag) (result) ---Testcase 68: -SELECT spread((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - spread | influx_time | tag1 ---------+------------------------+------ - 0 | 1970-01-01 09:00:00+09 | a - 0 | 1970-01-01 09:00:01+09 | a - 0 | 1970-01-01 09:00:02+09 | a - | 1970-01-01 09:00:03+09 | a - | 1970-01-01 09:00:04+09 | a - | 1970-01-01 09:00:00+09 | b - | 1970-01-01 09:00:01+09 | b - | 1970-01-01 09:00:02+09 | b - 0 | 1970-01-01 09:00:03+09 | b - 0 | 1970-01-01 09:00:04+09 | b -(10 rows) - --- select spread (stub agg function and group by tag only) (result) ---Testcase 69: -SELECT tags->>'tag1' tag1,spread((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - tag1 | spread -------+-------- - a | 0.2 - b | 1.1 -(2 rows) - --- select spread (stub agg function and other aggs) (result) ---Testcase 70: -SELECT sum((fields->>'value1')::float),spread((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; - sum | spread | count ------+--------+------- - 7.2 | 3.2 | 6 -(1 row) - --- select abs with order by (explain) ---Testcase 71: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by abs(1-(fields->>'value1')::float); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (abs(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (abs(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (abs(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", abs((1 - "value1")) FROM "s3" -(6 rows) - --- select abs with order by (result) ---Testcase 72: -SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by abs(1-(fields->>'value1')::float); - value1 | abs ---------+----- - 1.1 | 0.1 - 0.3 | 0.7 - 0.2 | 0.8 - 0.1 | 0.9 - 2.2 | 1.2 - 3.3 | 2.3 -(6 rows) - --- select abs with order by index (result) ---Testcase 73: -SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by 2,1; - value1 | abs ---------+----- - 1.1 | 0.1 - 0.3 | 0.7 - 0.2 | 0.8 - 0.1 | 0.9 - 2.2 | 1.2 - 3.3 | 2.3 -(6 rows) - --- select abs with order by index (result) ---Testcase 74: -SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by 1,2; - value1 | abs ---------+----- - 0.1 | 0.9 - 0.2 | 0.8 - 0.3 | 0.7 - 1.1 | 0.1 - 2.2 | 1.2 - 3.3 | 2.3 -(6 rows) - --- select abs and as ---Testcase 75: -SELECT abs((fields->>'value3')::float) as abs1 FROM s3; - abs1 ------- - 0.1 - 0.2 - 0.3 - 1.1 - 2.2 - 3.3 -(6 rows) - --- select abs(*) (stub agg function, explain) ---Testcase 76: -EXPLAIN VERBOSE -SELECT abs_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (abs_all()) - InfluxDB query: SELECT abs(*) FROM "s3" -(3 rows) - --- select abs(*) (stub agg function, result) ---Testcase 77: -SELECT abs_all() from s3; - abs_all ------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"0.1\",\"value4\" : \"100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"0.2\",\"value4\" : \"100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"0.3\",\"value4\" : \"100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"1.1\",\"value4\" : \"200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"2.2\",\"value4\" : \"200\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"3.3\",\"value2\" : \"200\",\"value3\" : \"3.3\",\"value4\" : \"200\" }") -(6 rows) - --- select abs(*) (stub agg function and group by tag only) (explain) ---Testcase 78: -EXPLAIN VERBOSE -SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (abs_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT abs(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select abs(*) (stub agg function and group by tag only) (result) ---Testcase 79: -SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - abs_all ------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"0.1\",\"value4\" : \"100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"0.2\",\"value4\" : \"100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"0.3\",\"value4\" : \"100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"1.1\",\"value4\" : \"200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"2.2\",\"value4\" : \"200\" }") -(5 rows) - --- select abs(*) (stub agg function, expose data, explain) ---Testcase 80: -EXPLAIN VERBOSE -SELECT (abs_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((abs_all()))::s3)."time", (((abs_all()))::s3).tags, (((abs_all()))::s3).fields - InfluxDB query: SELECT abs(*) FROM "s3" -(3 rows) - --- select abs(*) (stub agg function, expose data, result) ---Testcase 81: -SELECT (abs_all()::s3).* from s3; - time | tags | fields -------------------------+------+---------------------------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value2": "100", "value3": "0.1", "value4": "100"} - 1970-01-01 09:00:01+09 | | {"value1": "0.2", "value2": "100", "value3": "0.2", "value4": "100"} - 1970-01-01 09:00:02+09 | | {"value1": "0.3", "value2": "100", "value3": "0.3", "value4": "100"} - 1970-01-01 09:00:03+09 | | {"value1": "1.1", "value2": "200", "value3": "1.1", "value4": "200"} - 1970-01-01 09:00:04+09 | | {"value1": "2.2", "value2": "200", "value3": "2.2", "value4": "200"} - 1970-01-01 09:00:05+09 | | {"value1": "3.3", "value2": "200", "value3": "3.3", "value4": "200"} -(6 rows) - --- select spread over join query (explain) ---Testcase 82: -EXPLAIN VERBOSE -SELECT spread((t1.fields->>'value1')::float), spread((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------- - Aggregate (cost=39.87..39.88 rows=1 width=16) - Output: spread(((t1.fields ->> 'value1'::text))::double precision), spread(((t2.fields ->> 'value1'::text))::double precision) - -> Nested Loop (cost=20.00..14.63 rows=49 width=64) - Output: t1.fields, t2.fields - -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..7.04 rows=7 width=32) - Output: t2.fields - -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) - Output: t2.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select spread over join query (result, stub call error) ---Testcase 83: -SELECT spread((t1.fields->>'value1')::float), spread((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; -ERROR: stub spread_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE --- select spread with having (explain) ---Testcase 84: -EXPLAIN VERBOSE -SELECT spread((fields->>'value1')::float) FROM s3 HAVING spread((fields->>'value1')::float) > 100; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Aggregate (cost=2214.93..2214.94 rows=1 width=8) - Output: spread(((fields ->> 'value1'::text))::double precision) - Filter: (spread(((s3.fields ->> 'value1'::text))::double precision) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "s3" -(6 rows) - --- select spread with having (result, not pushdown, stub call error) ---Testcase 85: -SELECT spread((fields->>'value1')::float) FROM s3 HAVING spread((fields->>'value1')::float) > 100; -ERROR: stub spread_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE --- select spread(*) (stub agg function, explain) ---Testcase 86: -EXPLAIN VERBOSE -SELECT spread_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (spread_all(*)) - InfluxDB query: SELECT spread(*) FROM "s3" -(3 rows) - --- select spread(*) (stub agg function, result) ---Testcase 87: -SELECT spread_all(*) from s3; - spread_all ------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.1999999999999997\",\"value2\" : \"100\",\"value3\" : \"3.1999999999999997\",\"value4\" : \"100\" }") -(1 row) - --- select spread(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 88: -EXPLAIN VERBOSE -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (spread_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT spread(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select spread(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 89: -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - spread_all ----------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") -(10 rows) - --- select spread(*) (stub agg function and group by tag only) (explain) ---Testcase 90: -EXPLAIN VERBOSE -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (spread_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT spread(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select spread(*) (stub agg function and group by tag only) (result) ---Testcase 91: -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - spread_all ----------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.19999999999999998\",\"value2\" : \"0\",\"value3\" : \"0.19999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : \"1.1\",\"value4\" : \"0\" }") -(2 rows) - --- select spread(*) (stub agg function, expose data, explain) ---Testcase 92: -EXPLAIN VERBOSE -SELECT (spread_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((spread_all(*)))::s3)."time", (((spread_all(*)))::s3).tags, (((spread_all(*)))::s3).fields - InfluxDB query: SELECT spread(*) FROM "s3" -(3 rows) - --- select spread(*) (stub agg function, expose data, result) ---Testcase 93: -SELECT (spread_all(*)::s3).* from s3; - time | tags | fields -------------------------+------+---------------------------------------------------------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "3.1999999999999997", "value2": "100", "value3": "3.1999999999999997", "value4": "100"} -(1 row) - --- select spread(regex) (stub agg function, explain) ---Testcase 94: -EXPLAIN VERBOSE -SELECT spread('/value[1,4]/') from s3; - QUERY PLAN ---------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (spread('/value[1,4]/'::text)) - InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" -(3 rows) - --- select spread(regex) (stub agg function, result) ---Testcase 95: -SELECT spread('/value[1,4]/') from s3; - spread ---------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.1999999999999997\",\"value4\" : \"100\" }") -(1 row) - --- select spread(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 96: -EXPLAIN VERBOSE -SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (spread('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT spread(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select spread(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 97: -SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - spread ----------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") -(10 rows) - --- select spread(regex) (stub agg function and group by tag only) (explain) ---Testcase 98: -EXPLAIN VERBOSE -SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (spread('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select spread(regex) (stub agg function and group by tag only) (result) ---Testcase 99: -SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - spread --------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.19999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") -(2 rows) - --- select spread(regex) (stub agg function, expose data, explain) ---Testcase 100: -EXPLAIN VERBOSE -SELECT (spread('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((spread('/value[1,4]/'::text)))::s3)."time", (((spread('/value[1,4]/'::text)))::s3).tags, (((spread('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" -(3 rows) - --- select spread(regex) (stub agg function, expose data, result) ---Testcase 101: -SELECT (spread('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+--------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "3.1999999999999997", "value4": "100"} -(1 row) - --- select abs with arithmetic and tag in the middle (explain) ---Testcase 102: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float) + 1, (fields->>'value2')::bigint value2, tags->>'tag1' tag1, sqrt((fields->>'value2')::bigint) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..962.55 rows=930 width=56) - Output: ((abs(((fields ->> 'value1'::text))::double precision) + '1'::double precision)), (((fields ->> 'value2'::text))::bigint), ((tags ->> 'tag1'::text)), (sqrt((((fields ->> 'value2'::text))::bigint)::double precision)) - InfluxDB query: SELECT (abs("value1") + 1), "value2", "tag1", sqrt("value2") FROM "s3" -(3 rows) - --- select abs with arithmetic and tag in the middle (result) ---Testcase 103: -SELECT abs((fields->>'value1')::float) + 1, (fields->>'value2')::bigint value2, tags->>'tag1' tag1, sqrt((fields->>'value2')::bigint) FROM s3; - ?column? | value2 | tag1 | sqrt -----------+--------+------+----------------- - 1.1 | 100 | a | 10 - 1.2 | 100 | a | 10 - 1.3 | 100 | a | 10 - 2.1 | 200 | b | 14.142135623731 - 3.2 | 200 | b | 14.142135623731 - 4.3 | 200 | b | 14.142135623731 -(6 rows) - --- select with order by limit (explain) ---Testcase 104: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float), abs((fields->>'value3')::float), sqrt((fields->>'value2')::bigint) FROM s3 ORDER BY abs((fields->>'value3')::float) LIMIT 1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit (cost=1516.83..1516.83 rows=1 width=24) - Output: (abs(((fields ->> 'value1'::text))::double precision)), (abs(((fields ->> 'value3'::text))::double precision)), (sqrt((((fields ->> 'value2'::text))::bigint)::double precision)) - -> Sort (cost=1516.83..1520.48 rows=1462 width=24) - Output: (abs(((fields ->> 'value1'::text))::double precision)), (abs(((fields ->> 'value3'::text))::double precision)), (sqrt((((fields ->> 'value2'::text))::bigint)::double precision)) - Sort Key: (abs(((s3.fields ->> 'value3'::text))::double precision)) - -> Foreign Scan (cost=10.00..1509.52 rows=1462 width=24) - Output: (abs(((fields ->> 'value1'::text))::double precision)), (abs(((fields ->> 'value3'::text))::double precision)), (sqrt((((fields ->> 'value2'::text))::bigint)::double precision)) - InfluxDB query: SELECT abs("value1"), abs("value3"), sqrt("value2") FROM "s3" -(8 rows) - --- select with order by limit (result) ---Testcase 105: -SELECT abs((fields->>'value1')::float), abs((fields->>'value3')::float), sqrt((fields->>'value2')::bigint) FROM s3 ORDER BY abs((fields->>'value3')::float) LIMIT 1; - abs | abs | sqrt ------+-----+------ - 0.1 | 0.1 | 10 -(1 row) - --- select mixing with non pushdown func (all not pushdown, explain) ---Testcase 106: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float), sqrt((fields->>'value2')::bigint), upper(tags->>'tag1') FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan on public.s3 (cost=10.00..955.58 rows=930 width=48) - Output: abs(((fields ->> 'value1'::text))::double precision), sqrt((((fields ->> 'value2'::text))::bigint)::double precision), upper((tags ->> 'tag1'::text)) - InfluxDB query: SELECT "value1", "value2", "tag1" FROM "s3" -(3 rows) - --- select mixing with non pushdown func (result) ---Testcase 107: -SELECT abs((fields->>'value1')::float), sqrt((fields->>'value2')::bigint), upper(tags->>'tag1') FROM s3; - abs | sqrt | upper ------+-----------------+------- - 0.1 | 10 | A - 0.2 | 10 | A - 0.3 | 10 | A - 1.1 | 14.142135623731 | B - 2.2 | 14.142135623731 | B - 3.3 | 14.142135623731 | B -(6 rows) - --- nested function in where clause (explain) ---Testcase 108: -EXPLAIN VERBOSE -SELECT sqrt(abs((fields->>'value3')::float)),min((fields->>'value1')::float) FROM s3 GROUP BY fields->>'value3' HAVING sqrt(abs((fields->>'value3')::float)) > 0 ORDER BY 1,2; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort (cost=506.25..506.72 rows=190 width=48) - Output: (sqrt(abs((((fields ->> 'value3'::text)))::double precision))), (min(((fields ->> 'value1'::text))::double precision)), ((fields ->> 'value3'::text)) - Sort Key: (sqrt(abs((((s3.fields ->> 'value3'::text)))::double precision))), (min(((s3.fields ->> 'value1'::text))::double precision)) - -> HashAggregate (cost=494.30..499.05 rows=190 width=48) - Output: sqrt(abs((((fields ->> 'value3'::text)))::double precision)), min(((fields ->> 'value1'::text))::double precision), ((fields ->> 'value3'::text)) - Group Key: (s3.fields ->> 'value3'::text) - -> Foreign Scan on public.s3 (cost=10.00..488.22 rows=487 width=64) - Output: (fields ->> 'value3'::text), fields - Filter: (sqrt(abs(((s3.fields ->> 'value3'::text))::double precision)) > '0'::double precision) - InfluxDB query: SELECT * FROM "s3" -(10 rows) - --- nested function in where clause (result) ---Testcase 109: -SELECT sqrt(abs((fields->>'value3')::float)),min((fields->>'value1')::float) FROM s3 GROUP BY fields->>'value3' HAVING sqrt(abs((fields->>'value3')::float)) > 0 ORDER BY 1,2; - sqrt | min --------------------+----- - 0.316227766016838 | 0.1 - 0.447213595499958 | 0.2 - 0.547722557505166 | 0.3 - 1.04880884817015 | 1.1 - 1.48323969741913 | 2.2 - 1.81659021245849 | 3.3 -(6 rows) - ---Testcase 110: -EXPLAIN VERBOSE -SELECT first(time, (fields->>'value1')::float), first(time, (fields->>'value2')::bigint), first(time, (fields->>'value3')::float), first(time, (fields->>'value4')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (first("time", ((fields ->> 'value1'::text))::double precision)), (first("time", ((fields ->> 'value2'::text))::bigint)), (first("time", ((fields ->> 'value3'::text))::double precision)), (first("time", ((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT first("value1"), first("value2"), first("value3"), first("value4") FROM "s3" -(3 rows) - ---Testcase 111: -SELECT first(time, (fields->>'value1')::float), first(time, (fields->>'value2')::bigint), first(time, (fields->>'value3')::float), first(time, (fields->>'value4')::bigint) FROM s3; - first | first | first | first --------+-------+-------+------- - 0.1 | 100 | -0.1 | -100 -(1 row) - --- select first(*) (stub agg function, explain) ---Testcase 112: -EXPLAIN VERBOSE -SELECT first_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (first_all(*)) - InfluxDB query: SELECT first(*) FROM "s3" -(3 rows) - --- select first(*) (stub agg function, result) ---Testcase 113: -SELECT first_all(*) from s3; - first_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") -(1 row) - --- select first(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 114: -EXPLAIN VERBOSE -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (first_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT first(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select first(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 115: -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - first_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select first(*) (stub agg function and group by tag only) (explain) ---Testcase 116: -EXPLAIN VERBOSE -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (first_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT first(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select first(*) (stub agg function and group by tag only) (result) ---Testcase 117: -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - first_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") -(2 rows) - --- select first(*) (stub agg function, expose data, explain) ---Testcase 118: -EXPLAIN VERBOSE -SELECT (first_all(*)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((first_all(*)))::s3)."time", (((first_all(*)))::s3).tags, (((first_all(*)))::s3).fields - InfluxDB query: SELECT first(*) FROM "s3" -(3 rows) - --- select first(*) (stub agg function, expose data, result) ---Testcase 119: -SELECT (first_all(*)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value2": "100", "value3": "-0.1", "value4": "-100"} -(1 row) - --- select first(regex) (stub function, explain) ---Testcase 120: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/') from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (first('/value[1,4]/'::text)) - InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" -(3 rows) - --- select first(regex) (stub function, explain) ---Testcase 121: -SELECT first('/value[1,4]/') from s3; - first -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") -(1 row) - --- select multiple regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 122: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; -WARNING: Selecting multiple functions with regular expression or star is not supported. - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (cost=5119.50..5119.51 rows=1 width=64) - Output: first('/value[1,4]/'::text), first('/^v.*/'::text) - -> Foreign Scan on public.s3 (cost=10.00..3413.00 rows=3413 width=0) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "s3" -(5 rows) - --- select multiple regex functions (do not push down, raise warning and stub error) (result) ---Testcase 123: -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; -WARNING: Selecting multiple functions with regular expression or star is not supported. -ERROR: stub first_sfunc(text, text) is called -CONTEXT: PL/pgSQL function first_sfunc(text,text) line 3 at RAISE --- select first(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 124: -EXPLAIN VERBOSE -SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (first('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT first(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select first(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 125: -SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - first --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select first(regex) (stub agg function and group by tag only) (explain) ---Testcase 126: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (first('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select first(regex) (stub agg function and group by tag only) (result) ---Testcase 127: -SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - first -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") -(2 rows) - --- select first(regex) (stub agg function, expose data, explain) ---Testcase 128: -EXPLAIN VERBOSE -SELECT (first('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((first('/value[1,4]/'::text)))::s3)."time", (((first('/value[1,4]/'::text)))::s3).tags, (((first('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" -(3 rows) - --- select first(regex) (stub agg function, expose data, result) ---Testcase 129: -SELECT (first('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value4": "-100"} -(1 row) - ---Testcase 130: -EXPLAIN VERBOSE -SELECT last(time, (fields->>'value1')::float), last(time, (fields->>'value2')::bigint), last(time, (fields->>'value3')::float), last(time, (fields->>'value4')::bigint) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (last("time", ((fields ->> 'value1'::text))::double precision)), (last("time", ((fields ->> 'value2'::text))::bigint)), (last("time", ((fields ->> 'value3'::text))::double precision)), (last("time", ((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT last("value1"), last("value2"), last("value3"), last("value4") FROM "s3" -(3 rows) - ---Testcase 131: -SELECT last(time, (fields->>'value1')::float), last(time, (fields->>'value2')::bigint), last(time, (fields->>'value3')::float), last(time, (fields->>'value4')::bigint) FROM s3; - last | last | last | last -------+------+------+------ - 3.3 | 200 | -3.3 | -200 -(1 row) - --- select last(*) (stub agg function, explain) ---Testcase 132: -EXPLAIN VERBOSE -SELECT last_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (last_all(*)) - InfluxDB query: SELECT last(*) FROM "s3" -(3 rows) - --- select last(*) (stub agg function, result) ---Testcase 133: -SELECT last_all(*) from s3; - last_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3\",\"value2\" : \"200\",\"value3\" : \"-3.3\",\"value4\" : \"-200\" }") -(1 row) - --- select last(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 134: -EXPLAIN VERBOSE -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (last_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT last(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select last(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 135: -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - last_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select last(*) (stub agg function and group by tag only) (explain) ---Testcase 136: -EXPLAIN VERBOSE -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (last_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT last(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select last(*) (stub agg function and group by tag only) (result) ---Testcase 137: -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - last_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(2 rows) - --- select last(*) (stub agg function, expose data, explain) ---Testcase 138: -EXPLAIN VERBOSE -SELECT (last_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((last_all(*)))::s3)."time", (((last_all(*)))::s3).tags, (((last_all(*)))::s3).fields - InfluxDB query: SELECT last(*) FROM "s3" -(3 rows) - --- select last(*) (stub agg function, expose data, result) ---Testcase 139: -SELECT (last_all(*)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "3.3", "value2": "200", "value3": "-3.3", "value4": "-200"} -(1 row) - --- select last(regex) (stub function, explain) ---Testcase 140: -EXPLAIN VERBOSE -SELECT last('/value[1,4]/') from s3; - QUERY PLAN -------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (last('/value[1,4]/'::text)) - InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" -(3 rows) - --- select last(regex) (stub function, result) ---Testcase 141: -SELECT last('/value[1,4]/') from s3; - last -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3\",\"value4\" : \"-200\" }") -(1 row) - --- select multiple regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 142: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; -WARNING: Selecting multiple functions with regular expression or star is not supported. - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (cost=5119.50..5119.51 rows=1 width=64) - Output: first('/value[1,4]/'::text), first('/^v.*/'::text) - -> Foreign Scan on public.s3 (cost=10.00..3413.00 rows=3413 width=0) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "s3" -(5 rows) - --- select multiple regex functions (do not push down, raise warning and stub error) (result) ---Testcase 143: -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; -WARNING: Selecting multiple functions with regular expression or star is not supported. -ERROR: stub first_sfunc(text, text) is called -CONTEXT: PL/pgSQL function first_sfunc(text,text) line 3 at RAISE --- select last(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 144: -EXPLAIN VERBOSE -SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (last('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT last(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select last(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 145: -SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - last --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select last(regex) (stub agg function and group by tag only) (explain) ---Testcase 146: -EXPLAIN VERBOSE -SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (last('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select last(regex) (stub agg function and group by tag only) (result) ---Testcase 147: -SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - last -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"2.2\",\"value4\" : \"-200\" }") -(2 rows) - --- select last(regex) (stub agg function, expose data, explain) ---Testcase 148: -EXPLAIN VERBOSE -SELECT (last('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((last('/value[1,4]/'::text)))::s3)."time", (((last('/value[1,4]/'::text)))::s3).tags, (((last('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" -(3 rows) - --- select last(regex) (stub agg function, expose data, result) ---Testcase 149: -SELECT (last('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "3.3", "value4": "-200"} -(1 row) - ---Testcase 150: -EXPLAIN VERBOSE -SELECT sample((fields->>'value2')::bigint, 3) FROM s3 WHERE (fields->>'value2')::bigint < 200; - QUERY PLAN ---------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=8) - Output: (sample(((fields ->> 'value2'::text))::bigint, 3)) - InfluxDB query: SELECT sample("value2", 3) FROM "s3" WHERE (("value2" < 200)) -(3 rows) - ---Testcase 151: -SELECT sample((fields->>'value2')::bigint, 3) FROM s3 WHERE (fields->>'value2')::bigint < 200; - sample --------- - 100 - 100 - 100 -(3 rows) - ---Testcase 152: -EXPLAIN VERBOSE -SELECT sample((fields->>'value2')::bigint, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sample(((fields ->> 'value2'::text))::bigint, 1)), (influx_time("time", '@ 3 secs'::interval)) - InfluxDB query: SELECT sample("value2", 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m3s0u)) -(3 rows) - ---Testcase 153: -SELECT sample((fields->>'value2')::bigint, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); - sample --------- - 100 - 200 -(2 rows) - --- select sample(*, int) (stub agg function, explain) ---Testcase 154: -EXPLAIN VERBOSE -SELECT sample_all(50) from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (sample_all(50)) - InfluxDB query: SELECT sample(*, 50) FROM "s3" -(3 rows) - --- select sample(*, int) (stub agg function, result) ---Testcase 155: -SELECT sample_all(50) from s3; - sample_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"3.3\",\"value2\" : \"200\",\"value3\" : \"-3.3\",\"value4\" : \"-200\" }") -(6 rows) - --- select sample(*, int) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 156: -EXPLAIN VERBOSE -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sample_all(50)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sample(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select sample(*, int) (stub agg function and group by influx_time() and tag) (result) ---Testcase 157: -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - sample_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(5 rows) - --- select sample(*, int) (stub agg function and group by tag only) (explain) ---Testcase 158: -EXPLAIN VERBOSE -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (sample_all(50)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sample(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select sample(*, int) (stub agg function and group by tag only) (result) ---Testcase 159: -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - sample_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(5 rows) - --- select sample(*, int) (stub agg function, expose data, explain) ---Testcase 160: -EXPLAIN VERBOSE -SELECT (sample_all(50)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((sample_all(50)))::s3)."time", (((sample_all(50)))::s3).tags, (((sample_all(50)))::s3).fields - InfluxDB query: SELECT sample(*, 50) FROM "s3" -(3 rows) - --- select sample(*, int) (stub agg function, expose data, result) ---Testcase 161: -SELECT (sample_all(50)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value2": "100", "value3": "-0.1", "value4": "-100"} - 1970-01-01 09:00:01+09 | | {"value1": "0.2", "value2": "100", "value3": "-0.2", "value4": "-100"} - 1970-01-01 09:00:02+09 | | {"value1": "0.3", "value2": "100", "value3": "-0.3", "value4": "-100"} - 1970-01-01 09:00:03+09 | | {"value1": "1.1", "value2": "200", "value3": "-1.1", "value4": "-200"} - 1970-01-01 09:00:04+09 | | {"value1": "2.2", "value2": "200", "value3": "-2.2", "value4": "-200"} - 1970-01-01 09:00:05+09 | | {"value1": "3.3", "value2": "200", "value3": "-3.3", "value4": "-200"} -(6 rows) - --- select sample(regex) (stub agg function, explain) ---Testcase 162: -EXPLAIN VERBOSE -SELECT sample('/value[1,4]/', 50) from s3; - QUERY PLAN -------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (sample('/value[1,4]/'::text, 50)) - InfluxDB query: SELECT sample(/value[1,4]/, 50) FROM "s3" -(3 rows) - --- select sample(regex) (stub agg function, result) ---Testcase 163: -SELECT sample('/value[1,4]/', 50) from s3; - sample -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"3.3\",\"value4\" : \"-200\" }") -(6 rows) - --- select sample(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 164: -EXPLAIN VERBOSE -SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sample('/^v.*/'::text, 50)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sample(/^v.*/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select sample(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 165: -SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - sample --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(5 rows) - --- select sample(regex) (stub agg function and group by tag only) (explain) ---Testcase 166: -EXPLAIN VERBOSE -SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (sample('/value[1,4]/'::text, 50)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sample(/value[1,4]/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select sample(regex) (stub agg function and group by tag only) (result) ---Testcase 167: -SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - sample -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value4\" : \"-200\" }") -(5 rows) - --- select sample(regex) (stub agg function, expose data, explain) ---Testcase 168: -EXPLAIN VERBOSE -SELECT (sample('/value[1,4]/', 50)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((sample('/value[1,4]/'::text, 50)))::s3)."time", (((sample('/value[1,4]/'::text, 50)))::s3).tags, (((sample('/value[1,4]/'::text, 50)))::s3).fields - InfluxDB query: SELECT sample(/value[1,4]/, 50) FROM "s3" -(3 rows) - --- select sample(regex) (stub agg function, expose data, result) ---Testcase 169: -SELECT (sample('/value[1,4]/', 50)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value4": "-100"} - 1970-01-01 09:00:01+09 | | {"value1": "0.2", "value4": "-100"} - 1970-01-01 09:00:02+09 | | {"value1": "0.3", "value4": "-100"} - 1970-01-01 09:00:03+09 | | {"value1": "1.1", "value4": "-200"} - 1970-01-01 09:00:04+09 | | {"value1": "2.2", "value4": "-200"} - 1970-01-01 09:00:05+09 | | {"value1": "3.3", "value4": "-200"} -(6 rows) - ---Testcase 170: -EXPLAIN VERBOSE -SELECT cumulative_sum((fields->>'value1')::float),cumulative_sum((fields->>'value2')::bigint),cumulative_sum((fields->>'value3')::float),cumulative_sum((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (cumulative_sum(((fields ->> 'value1'::text))::double precision)), (cumulative_sum(((fields ->> 'value2'::text))::bigint)), (cumulative_sum(((fields ->> 'value3'::text))::double precision)), (cumulative_sum(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT cumulative_sum("value1"), cumulative_sum("value2"), cumulative_sum("value3"), cumulative_sum("value4") FROM "s3" -(3 rows) - ---Testcase 171: -SELECT cumulative_sum((fields->>'value1')::float),cumulative_sum((fields->>'value2')::bigint),cumulative_sum((fields->>'value3')::float),cumulative_sum((fields->>'value4')::bigint) FROM s3; - cumulative_sum | cumulative_sum | cumulative_sum | cumulative_sum -----------------+----------------+----------------+---------------- - 0.1 | 100 | -0.1 | -100 - 0.3 | 200 | -0.3 | -200 - 0.6 | 300 | -0.6 | -300 - 1.7 | 500 | -1.7 | -500 - 3.9 | 700 | -3.9 | -700 - 7.2 | 900 | -7.2 | -900 -(6 rows) - --- select cumulative_sum(*) (stub function, explain) ---Testcase 172: -EXPLAIN VERBOSE -SELECT cumulative_sum_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (cumulative_sum_all()) - InfluxDB query: SELECT cumulative_sum(*) FROM "s3" -(3 rows) - --- select cumulative_sum(*) (stub function, result) ---Testcase 173: -SELECT cumulative_sum_all() from s3; - cumulative_sum_all ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.30000000000000004\",\"value2\" : \"200\",\"value3\" : \"-0.30000000000000004\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.6000000000000001\",\"value2\" : \"300\",\"value3\" : \"-0.6000000000000001\",\"value4\" : \"-300\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.7000000000000002\",\"value2\" : \"500\",\"value3\" : \"-1.7000000000000002\",\"value4\" : \"-500\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"3.9000000000000004\",\"value2\" : \"700\",\"value3\" : \"-3.9000000000000004\",\"value4\" : \"-700\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"7.2\",\"value2\" : \"900\",\"value3\" : \"-7.2\",\"value4\" : \"-900\" }") -(6 rows) - --- select cumulative_sum(regex) (stub function, result) ---Testcase 174: -SELECT cumulative_sum('/value[1,4]/') from s3; - cumulative_sum ------------------------------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.30000000000000004\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.6000000000000001\",\"value4\" : \"-300\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.7000000000000002\",\"value4\" : \"-500\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"3.9000000000000004\",\"value4\" : \"-700\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"7.2\",\"value4\" : \"-900\" }") -(6 rows) - --- select cumulative_sum(regex) (stub function, result) ---Testcase 175: -SELECT cumulative_sum('/value[1,4]/') from s3; - cumulative_sum ------------------------------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.30000000000000004\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.6000000000000001\",\"value4\" : \"-300\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.7000000000000002\",\"value4\" : \"-500\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"3.9000000000000004\",\"value4\" : \"-700\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"7.2\",\"value4\" : \"-900\" }") -(6 rows) - --- select multiple star and regex functions (do not push down, raise warning and stub error) (result) ---Testcase 176: -EXPLAIN VERBOSE -SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan on public.s3 (cost=10.00..5119.50 rows=3413 width=64) - Output: cumulative_sum_all(), cumulative_sum('/value[1,4]/'::text) - InfluxDB query: SELECT * FROM "s3" -(3 rows) - --- select multiple star and regex functions (do not push down, raise warning and stub error) (result) ---Testcase 177: -SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub cumulative_sum_all() is called -CONTEXT: PL/pgSQL function cumulative_sum_all() line 3 at RAISE --- select cumulative_sum(*) (stub function and group by tag only) (explain) ---Testcase 178: -EXPLAIN VERBOSE -SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (cumulative_sum_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT cumulative_sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select cumulative_sum(*) (stub function and group by tag only) (result) ---Testcase 179: -SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - cumulative_sum_all ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.30000000000000004\",\"value2\" : \"200\",\"value3\" : \"-0.30000000000000004\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.6000000000000001\",\"value2\" : \"300\",\"value3\" : \"-0.6000000000000001\",\"value4\" : \"-300\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"3.3000000000000003\",\"value2\" : \"400\",\"value3\" : \"-3.3000000000000003\",\"value4\" : \"-400\" }") -(5 rows) - --- select cumulative_sum(regex) (stub function and group by tag only) (explain) ---Testcase 180: -EXPLAIN VERBOSE -SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (cumulative_sum('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT cumulative_sum(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select cumulative_sum(regex) (stub function and group by tag only) (result) ---Testcase 181: -SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - cumulative_sum ------------------------------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.30000000000000004\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.6000000000000001\",\"value4\" : \"-300\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"3.3000000000000003\",\"value4\" : \"-400\" }") -(5 rows) - --- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, explain) ---Testcase 182: -EXPLAIN VERBOSE -SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=144) - Output: (((cumulative_sum_all()))::s3)."time", (((cumulative_sum_all()))::s3).tags, (((cumulative_sum_all()))::s3).fields, (((cumulative_sum('/value[1,4]/'::text)))::s3)."time", (((cumulative_sum('/value[1,4]/'::text)))::s3).tags, (((cumulative_sum('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT cumulative_sum(*), cumulative_sum(/value[1,4]/) FROM "s3" -(3 rows) - --- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, result) ---Testcase 183: -SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; - time | tags | fields | time | tags | fields -------------------------+------+--------------------------------------------------------------------------------------------------------+------------------------+------+--------------------------------------------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value2": "100", "value3": "-0.1", "value4": "-100"} | 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value3": "-0.1", "value4": "-100"} - 1970-01-01 09:00:01+09 | | {"value1": "0.30000000000000004", "value2": "200", "value3": "-0.30000000000000004", "value4": "-200"} | 1970-01-01 09:00:01+09 | | {"value1": "0.30000000000000004", "value3": "-0.30000000000000004", "value4": "-200"} - 1970-01-01 09:00:02+09 | | {"value1": "0.6000000000000001", "value2": "300", "value3": "-0.6000000000000001", "value4": "-300"} | 1970-01-01 09:00:02+09 | | {"value1": "0.6000000000000001", "value3": "-0.6000000000000001", "value4": "-300"} - 1970-01-01 09:00:03+09 | | {"value1": "1.7000000000000002", "value2": "500", "value3": "-1.7000000000000002", "value4": "-500"} | 1970-01-01 09:00:03+09 | | {"value1": "1.7000000000000002", "value3": "-1.7000000000000002", "value4": "-500"} - 1970-01-01 09:00:04+09 | | {"value1": "3.9000000000000004", "value2": "700", "value3": "-3.9000000000000004", "value4": "-700"} | 1970-01-01 09:00:04+09 | | {"value1": "3.9000000000000004", "value3": "-3.9000000000000004", "value4": "-700"} - 1970-01-01 09:00:05+09 | | {"value1": "7.2", "value2": "900", "value3": "-7.2", "value4": "-900"} | 1970-01-01 09:00:05+09 | | {"value1": "7.2", "value3": "-7.2", "value4": "-900"} -(6 rows) - ---Testcase 184: -EXPLAIN VERBOSE -SELECT derivative((fields->>'value1')::float),derivative((fields->>'value2')::bigint),derivative((fields->>'value3')::float),derivative((fields->>'value4')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (derivative(((fields ->> 'value1'::text))::double precision)), (derivative(((fields ->> 'value2'::text))::bigint)), (derivative(((fields ->> 'value3'::text))::double precision)), (derivative(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT derivative("value1"), derivative("value2"), derivative("value3"), derivative("value4") FROM "s3" -(3 rows) - ---Testcase 185: -SELECT derivative((fields->>'value1')::float),derivative((fields->>'value2')::bigint),derivative((fields->>'value3')::float),derivative((fields->>'value4')::bigint) FROM s3; - derivative | derivative | derivative | derivative -------------+------------+------------+------------ - 0.1 | 0 | -0.1 | 0 - 0.1 | 0 | -0.1 | 0 - 0.8 | 100 | -0.8 | -100 - 1.1 | 0 | -1.1 | 0 - 1.1 | 0 | -1.1 | 0 -(5 rows) - ---Testcase 186: -EXPLAIN VERBOSE -SELECT derivative((fields->>'value1')::float, interval '0.5s'),derivative((fields->>'value2')::bigint, interval '0.2s'),derivative((fields->>'value3')::float, interval '0.1s'),derivative((fields->>'value4')::bigint, interval '2s') FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (derivative(((fields ->> 'value1'::text))::double precision, '@ 0.5 secs'::interval)), (derivative(((fields ->> 'value2'::text))::bigint, '@ 0.2 secs'::interval)), (derivative(((fields ->> 'value3'::text))::double precision, '@ 0.1 secs'::interval)), (derivative(((fields ->> 'value4'::text))::bigint, '@ 2 secs'::interval)) - InfluxDB query: SELECT derivative("value1", 0d0h0m0s500000u), derivative("value2", 0d0h0m0s200000u), derivative("value3", 0d0h0m0s100000u), derivative("value4", 0d0h0m2s0u) FROM "s3" -(3 rows) - ---Testcase 187: -SELECT derivative((fields->>'value1')::float, interval '0.5s'),derivative((fields->>'value2')::bigint, interval '0.2s'),derivative((fields->>'value3')::float, interval '0.1s'),derivative((fields->>'value4')::bigint, interval '2s') FROM s3; - derivative | derivative | derivative | derivative -------------+------------+------------+------------ - 0.05 | 0 | -0.01 | 0 - 0.05 | 0 | -0.01 | 0 - 0.4 | 20 | -0.08 | -200 - 0.55 | 0 | -0.11 | 0 - 0.55 | 0 | -0.11 | 0 -(5 rows) - --- select derivative(*) (stub function, explain) ---Testcase 188: -EXPLAIN VERBOSE -SELECT derivative_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (derivative_all()) - InfluxDB query: SELECT derivative(*) FROM "s3" -(3 rows) - --- select derivative(*) (stub function, result) ---Testcase 189: -SELECT derivative_all() from s3; - derivative_all ------------------------------------------------------------------------------------------------------------------------------------------------ - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : \"-0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : \"-0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8\",\"value2\" : \"100\",\"value3\" : \"-0.8\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : \"-1.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.0999999999999996\",\"value2\" : \"0\",\"value3\" : \"-1.0999999999999996\",\"value4\" : \"0\" }") -(5 rows) - --- select derivative(regex) (stub function, explain) ---Testcase 190: -EXPLAIN VERBOSE -SELECT derivative('/value[1,4]/') from s3; - QUERY PLAN -------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (derivative('/value[1,4]/'::text)) - InfluxDB query: SELECT derivative(/value[1,4]/) FROM "s3" -(3 rows) - --- select derivative(regex) (stub function, result) ---Testcase 191: -SELECT derivative('/value[1,4]/') from s3; - derivative --------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.0999999999999996\",\"value4\" : \"0\" }") -(5 rows) - --- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 192: -EXPLAIN VERBOSE -SELECT derivative_all(), derivative('/value[1,4]/') from s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan on public.s3 (cost=10.00..5119.50 rows=3413 width=64) - Output: derivative_all(), derivative('/value[1,4]/'::text) - InfluxDB query: SELECT * FROM "s3" -(3 rows) - --- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 193: -SELECT derivative_all(), derivative('/value[1,4]/') from s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub derivative_all() is called -CONTEXT: PL/pgSQL function derivative_all() line 3 at RAISE --- select derivative(*) (stub function and group by tag only) (explain) ---Testcase 194: -EXPLAIN VERBOSE -SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (derivative_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT derivative(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select derivative(*) (stub function and group by tag only) (result) ---Testcase 195: -SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - derivative_all ------------------------------------------------------------------------------------------------------------------------------------------------ - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : \"-0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : \"-0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : \"-1.1\",\"value4\" : \"0\" }") -(3 rows) - --- select derivative(regex) (stub function and group by tag only) (explain) ---Testcase 196: -EXPLAIN VERBOSE -SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (derivative('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT derivative(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select derivative(regex) (stub function and group by tag only) (result) ---Testcase 197: -SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - derivative --------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") -(3 rows) - --- select derivative(*) (stub agg function, expose data, explain) ---Testcase 198: -EXPLAIN VERBOSE -SELECT (derivative_all()::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((derivative_all()))::s3)."time", (((derivative_all()))::s3).tags, (((derivative_all()))::s3).fields - InfluxDB query: SELECT derivative(*) FROM "s3" -(3 rows) - --- select derivative(*) (stub agg function, expose data, result) ---Testcase 199: -SELECT (derivative_all()::s3).* from s3; - time | tags | fields -------------------------+------+--------------------------------------------------------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "0.1", "value2": "0", "value3": "-0.1", "value4": "0"} - 1970-01-01 09:00:02+09 | | {"value1": "0.09999999999999998", "value2": "0", "value3": "-0.09999999999999998", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "0.8", "value2": "100", "value3": "-0.8", "value4": "-100"} - 1970-01-01 09:00:04+09 | | {"value1": "1.1", "value2": "0", "value3": "-1.1", "value4": "0"} - 1970-01-01 09:00:05+09 | | {"value1": "1.0999999999999996", "value2": "0", "value3": "-1.0999999999999996", "value4": "0"} -(5 rows) - --- select derivative(regex) (stub agg function, expose data, explain) ---Testcase 200: -EXPLAIN VERBOSE -SELECT (derivative('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((derivative('/value[1,4]/'::text)))::s3)."time", (((derivative('/value[1,4]/'::text)))::s3).tags, (((derivative('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT derivative(/value[1,4]/) FROM "s3" -(3 rows) - --- select derivative(regex) (stub agg function, expose data, result) ---Testcase 201: -SELECT (derivative('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "0.1", "value4": "0"} - 1970-01-01 09:00:02+09 | | {"value1": "0.09999999999999998", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "0.8", "value4": "-100"} - 1970-01-01 09:00:04+09 | | {"value1": "1.1", "value4": "0"} - 1970-01-01 09:00:05+09 | | {"value1": "1.0999999999999996", "value4": "0"} -(5 rows) - ---Testcase 202: -EXPLAIN VERBOSE -SELECT non_negative_derivative((fields->>'value1')::float),non_negative_derivative((fields->>'value2')::bigint),non_negative_derivative((fields->>'value3')::float),non_negative_derivative((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (non_negative_derivative(((fields ->> 'value1'::text))::double precision)), (non_negative_derivative(((fields ->> 'value2'::text))::bigint)), (non_negative_derivative(((fields ->> 'value3'::text))::double precision)), (non_negative_derivative(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT non_negative_derivative("value1"), non_negative_derivative("value2"), non_negative_derivative("value3"), non_negative_derivative("value4") FROM "s3" -(3 rows) - ---Testcase 203: -SELECT non_negative_derivative((fields->>'value1')::float),non_negative_derivative((fields->>'value2')::bigint),non_negative_derivative((fields->>'value3')::float),non_negative_derivative((fields->>'value4')::bigint) FROM s3; - non_negative_derivative | non_negative_derivative | non_negative_derivative | non_negative_derivative --------------------------+-------------------------+-------------------------+------------------------- - 0.1 | 0 | | 0 - 0.1 | 0 | | 0 - 0.8 | 100 | | - 1.1 | 0 | | 0 - 1.1 | 0 | | 0 -(5 rows) - ---Testcase 204: -EXPLAIN VERBOSE -SELECT non_negative_derivative((fields->>'value1')::float, interval '0.5s'),non_negative_derivative((fields->>'value2')::bigint, interval '0.2s'),non_negative_derivative((fields->>'value3')::float, interval '0.1s'),non_negative_derivative((fields->>'value4')::bigint, interval '2s') FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (non_negative_derivative(((fields ->> 'value1'::text))::double precision, '@ 0.5 secs'::interval)), (non_negative_derivative(((fields ->> 'value2'::text))::bigint, '@ 0.2 secs'::interval)), (non_negative_derivative(((fields ->> 'value3'::text))::double precision, '@ 0.1 secs'::interval)), (non_negative_derivative(((fields ->> 'value4'::text))::bigint, '@ 2 secs'::interval)) - InfluxDB query: SELECT non_negative_derivative("value1", 0d0h0m0s500000u), non_negative_derivative("value2", 0d0h0m0s200000u), non_negative_derivative("value3", 0d0h0m0s100000u), non_negative_derivative("value4", 0d0h0m2s0u) FROM "s3" -(3 rows) - ---Testcase 205: -SELECT non_negative_derivative((fields->>'value1')::float, interval '0.5s'),non_negative_derivative((fields->>'value2')::bigint, interval '0.2s'),non_negative_derivative((fields->>'value3')::float, interval '0.1s'),non_negative_derivative((fields->>'value4')::bigint, interval '2s') FROM s3; - non_negative_derivative | non_negative_derivative | non_negative_derivative | non_negative_derivative --------------------------+-------------------------+-------------------------+------------------------- - 0.05 | 0 | | 0 - 0.05 | 0 | | 0 - 0.4 | 20 | | - 0.55 | 0 | | 0 - 0.55 | 0 | | 0 -(5 rows) - --- select non_negative_derivative(*) (stub function, explain) ---Testcase 206: -EXPLAIN VERBOSE -SELECT non_negative_derivative_all() from s3; - QUERY PLAN ---------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (non_negative_derivative_all()) - InfluxDB query: SELECT non_negative_derivative(*) FROM "s3" -(3 rows) - --- select non_negative_derivative(*) (stub function, result) ---Testcase 207: -SELECT non_negative_derivative_all() from s3; - non_negative_derivative_all ---------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8\",\"value2\" : \"100\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.0999999999999996\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") -(5 rows) - --- select non_negative_derivative(regex) (stub function, explain) ---Testcase 208: -EXPLAIN VERBOSE -SELECT non_negative_derivative('/value[1,4]/') from s3; - QUERY PLAN --------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (non_negative_derivative('/value[1,4]/'::text)) - InfluxDB query: SELECT non_negative_derivative(/value[1,4]/) FROM "s3" -(3 rows) - --- select non_negative_derivative(regex) (stub function, result) ---Testcase 209: -SELECT non_negative_derivative('/value[1,4]/') from s3; - non_negative_derivative --------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8\",\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.0999999999999996\",\"value4\" : \"0\" }") -(5 rows) - --- select non_negative_derivative(*) (stub function and group by tag only) (explain) ---Testcase 210: -EXPLAIN VERBOSE -SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (non_negative_derivative_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT non_negative_derivative(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select non_negative_derivative(*) (stub function and group by tag only) (result) ---Testcase 211: -SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - non_negative_derivative_all ---------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") -(3 rows) - --- select non_negative_derivative(regex) (stub function and group by tag only) (explain) ---Testcase 212: -EXPLAIN VERBOSE -SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (non_negative_derivative('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT non_negative_derivative(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select non_negative_derivative(regex) (stub agg function and group by tag only) (result) ---Testcase 213: -SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - non_negative_derivative --------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") -(3 rows) - --- select non_negative_derivative(*) (stub function, expose data, explain) ---Testcase 214: -EXPLAIN VERBOSE -SELECT (non_negative_derivative_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((non_negative_derivative_all()))::s3)."time", (((non_negative_derivative_all()))::s3).tags, (((non_negative_derivative_all()))::s3).fields - InfluxDB query: SELECT non_negative_derivative(*) FROM "s3" -(3 rows) - --- select non_negative_derivative(*) (stub agg function, expose data, result) ---Testcase 215: -SELECT (non_negative_derivative_all()::s3).* from s3; - time | tags | fields -------------------------+------+--------------------------------------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "0.1", "value2": "0", "value3": null, "value4": "0"} - 1970-01-01 09:00:02+09 | | {"value1": "0.09999999999999998", "value2": "0", "value3": null, "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "0.8", "value2": "100", "value3": null, "value4": null} - 1970-01-01 09:00:04+09 | | {"value1": "1.1", "value2": "0", "value3": null, "value4": "0"} - 1970-01-01 09:00:05+09 | | {"value1": "1.0999999999999996", "value2": "0", "value3": null, "value4": "0"} -(5 rows) - --- select non_negative_derivative(regex) (stub function, expose data, explain) ---Testcase 216: -EXPLAIN VERBOSE -SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((non_negative_derivative('/value[1,4]/'::text)))::s3)."time", (((non_negative_derivative('/value[1,4]/'::text)))::s3).tags, (((non_negative_derivative('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT non_negative_derivative(/value[1,4]/) FROM "s3" -(3 rows) - --- select non_negative_derivative(regex) (stub agg function, expose data, result) ---Testcase 217: -SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "0.1", "value4": "0"} - 1970-01-01 09:00:02+09 | | {"value1": "0.09999999999999998", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "0.8", "value4": null} - 1970-01-01 09:00:04+09 | | {"value1": "1.1", "value4": "0"} - 1970-01-01 09:00:05+09 | | {"value1": "1.0999999999999996", "value4": "0"} -(5 rows) - ---Testcase 218: -EXPLAIN VERBOSE -SELECT difference((fields->>'value1')::float),difference((fields->>'value2')::bigint),difference((fields->>'value3')::float),difference((fields->>'value4')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (difference(((fields ->> 'value1'::text))::double precision)), (difference(((fields ->> 'value2'::text))::bigint)), (difference(((fields ->> 'value3'::text))::double precision)), (difference(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT difference("value1"), difference("value2"), difference("value3"), difference("value4") FROM "s3" -(3 rows) - ---Testcase 219: -SELECT difference((fields->>'value1')::float),difference((fields->>'value2')::bigint),difference((fields->>'value3')::float),difference((fields->>'value4')::bigint) FROM s3; - difference | difference | difference | difference -------------+------------+------------+------------ - 0.1 | 0 | -0.1 | 0 - 0.1 | 0 | -0.1 | 0 - 0.8 | 100 | -0.8 | -100 - 1.1 | 0 | -1.1 | 0 - 1.1 | 0 | -1.1 | 0 -(5 rows) - --- select difference(*) (stub function, explain) ---Testcase 220: -EXPLAIN VERBOSE -SELECT difference_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (difference_all()) - InfluxDB query: SELECT difference(*) FROM "s3" -(3 rows) - --- select difference(*) (stub function, result) ---Testcase 221: -SELECT difference_all() from s3; - difference_all ------------------------------------------------------------------------------------------------------------------------------------------------ - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : \"-0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : \"-0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8\",\"value2\" : \"100\",\"value3\" : \"-0.8\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : \"-1.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.0999999999999996\",\"value2\" : \"0\",\"value3\" : \"-1.0999999999999996\",\"value4\" : \"0\" }") -(5 rows) - --- select difference(regex) (stub function, explain) ---Testcase 222: -EXPLAIN VERBOSE -SELECT difference('/value[1,4]/') from s3; - QUERY PLAN -------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (difference('/value[1,4]/'::text)) - InfluxDB query: SELECT difference(/value[1,4]/) FROM "s3" -(3 rows) - --- select difference(regex) (stub function, result) ---Testcase 223: -SELECT difference('/value[1,4]/') from s3; - difference --------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.0999999999999996\",\"value4\" : \"0\" }") -(5 rows) - --- select difference(*) (stub agg function and group by tag only) (explain) ---Testcase 224: -EXPLAIN VERBOSE -SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (difference_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT difference(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select difference(*) (stub agg function and group by tag only) (result) ---Testcase 225: -SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - difference_all ------------------------------------------------------------------------------------------------------------------------------------------------ - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : \"-0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : \"-0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : \"-1.1\",\"value4\" : \"0\" }") -(3 rows) - --- select difference(regex) (stub agg function and group by tag only) (explain) ---Testcase 226: -EXPLAIN VERBOSE -SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (difference('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT difference(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select difference(regex) (stub agg function and group by tag only) (result) ---Testcase 227: -SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - difference --------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") -(3 rows) - --- select difference(*) (stub function, expose data, explain) ---Testcase 228: -EXPLAIN VERBOSE -SELECT (difference_all()::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((difference_all()))::s3)."time", (((difference_all()))::s3).tags, (((difference_all()))::s3).fields - InfluxDB query: SELECT difference(*) FROM "s3" -(3 rows) - --- select difference(*) (stub function, expose data, result) ---Testcase 229: -SELECT (difference_all()::s3).* from s3; - time | tags | fields -------------------------+------+--------------------------------------------------------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "0.1", "value2": "0", "value3": "-0.1", "value4": "0"} - 1970-01-01 09:00:02+09 | | {"value1": "0.09999999999999998", "value2": "0", "value3": "-0.09999999999999998", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "0.8", "value2": "100", "value3": "-0.8", "value4": "-100"} - 1970-01-01 09:00:04+09 | | {"value1": "1.1", "value2": "0", "value3": "-1.1", "value4": "0"} - 1970-01-01 09:00:05+09 | | {"value1": "1.0999999999999996", "value2": "0", "value3": "-1.0999999999999996", "value4": "0"} -(5 rows) - --- select difference(regex) (stub function, expose data, explain) ---Testcase 230: -EXPLAIN VERBOSE -SELECT (difference('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((difference('/value[1,4]/'::text)))::s3)."time", (((difference('/value[1,4]/'::text)))::s3).tags, (((difference('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT difference(/value[1,4]/) FROM "s3" -(3 rows) - --- select difference(regex) (stub function, expose data, result) ---Testcase 231: -SELECT (difference('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "0.1", "value4": "0"} - 1970-01-01 09:00:02+09 | | {"value1": "0.09999999999999998", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "0.8", "value4": "-100"} - 1970-01-01 09:00:04+09 | | {"value1": "1.1", "value4": "0"} - 1970-01-01 09:00:05+09 | | {"value1": "1.0999999999999996", "value4": "0"} -(5 rows) - ---Testcase 232: -EXPLAIN VERBOSE -SELECT non_negative_difference((fields->>'value1')::float),non_negative_difference((fields->>'value2')::bigint),non_negative_difference((fields->>'value3')::float),non_negative_difference((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (non_negative_difference(((fields ->> 'value1'::text))::double precision)), (non_negative_difference(((fields ->> 'value2'::text))::bigint)), (non_negative_difference(((fields ->> 'value3'::text))::double precision)), (non_negative_difference(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT non_negative_difference("value1"), non_negative_difference("value2"), non_negative_difference("value3"), non_negative_difference("value4") FROM "s3" -(3 rows) - ---Testcase 233: -SELECT non_negative_difference((fields->>'value1')::float),non_negative_difference((fields->>'value2')::bigint),non_negative_difference((fields->>'value3')::float),non_negative_difference((fields->>'value4')::bigint) FROM s3; - non_negative_difference | non_negative_difference | non_negative_difference | non_negative_difference --------------------------+-------------------------+-------------------------+------------------------- - 0.1 | 0 | | 0 - 0.1 | 0 | | 0 - 0.8 | 100 | | - 1.1 | 0 | | 0 - 1.1 | 0 | | 0 -(5 rows) - --- select non_negative_difference(*) (stub function, explain) ---Testcase 234: -EXPLAIN VERBOSE -SELECT non_negative_difference_all() from s3; - QUERY PLAN ---------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (non_negative_difference_all()) - InfluxDB query: SELECT non_negative_difference(*) FROM "s3" -(3 rows) - --- select non_negative_difference(*) (stub function, result) ---Testcase 235: -SELECT non_negative_difference_all() from s3; - non_negative_difference_all ---------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8\",\"value2\" : \"100\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.0999999999999996\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") -(5 rows) - --- select non_negative_difference(regex) (stub agg function, explain) ---Testcase 236: -EXPLAIN VERBOSE -SELECT non_negative_difference('/value[1,4]/') from s3; - QUERY PLAN --------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (non_negative_difference('/value[1,4]/'::text)) - InfluxDB query: SELECT non_negative_difference(/value[1,4]/) FROM "s3" -(3 rows) - --- select non_negative_difference(*), non_negative_difference(regex) (stub function, result) ---Testcase 237: -SELECT non_negative_difference('/value[1,4]/') from s3; - non_negative_difference --------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8\",\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.0999999999999996\",\"value4\" : \"0\" }") -(5 rows) - --- select non_negative_difference(*) (stub function and group by tag only) (explain) ---Testcase 238: -EXPLAIN VERBOSE -SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (non_negative_difference_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT non_negative_difference(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select non_negative_difference(*) (stub function and group by tag only) (result) ---Testcase 239: -SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - non_negative_difference_all ---------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") -(3 rows) - --- select non_negative_difference(regex) (stub function and group by tag only) (explain) ---Testcase 240: -EXPLAIN VERBOSE -SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (non_negative_difference('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT non_negative_difference(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select non_negative_difference(regex) (stub function and group by tag only) (result) ---Testcase 241: -SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - non_negative_difference --------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") -(3 rows) - --- select non_negative_difference(*) (stub function, expose data, explain) ---Testcase 242: -EXPLAIN VERBOSE -SELECT (non_negative_difference_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((non_negative_difference_all()))::s3)."time", (((non_negative_difference_all()))::s3).tags, (((non_negative_difference_all()))::s3).fields - InfluxDB query: SELECT non_negative_difference(*) FROM "s3" -(3 rows) - --- select non_negative_difference(*) (stub function, expose data, result) ---Testcase 243: -SELECT (non_negative_difference_all()::s3).* from s3; - time | tags | fields -------------------------+------+--------------------------------------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "0.1", "value2": "0", "value3": null, "value4": "0"} - 1970-01-01 09:00:02+09 | | {"value1": "0.09999999999999998", "value2": "0", "value3": null, "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "0.8", "value2": "100", "value3": null, "value4": null} - 1970-01-01 09:00:04+09 | | {"value1": "1.1", "value2": "0", "value3": null, "value4": "0"} - 1970-01-01 09:00:05+09 | | {"value1": "1.0999999999999996", "value2": "0", "value3": null, "value4": "0"} -(5 rows) - --- select non_negative_difference(regex) (stub function, expose data, explain) ---Testcase 244: -EXPLAIN VERBOSE -SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((non_negative_difference('/value[1,4]/'::text)))::s3)."time", (((non_negative_difference('/value[1,4]/'::text)))::s3).tags, (((non_negative_difference('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT non_negative_difference(/value[1,4]/) FROM "s3" -(3 rows) - --- select non_negative_difference(regex) (stub function, expose data, result) ---Testcase 245: -SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "0.1", "value4": "0"} - 1970-01-01 09:00:02+09 | | {"value1": "0.09999999999999998", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "0.8", "value4": null} - 1970-01-01 09:00:04+09 | | {"value1": "1.1", "value4": "0"} - 1970-01-01 09:00:05+09 | | {"value1": "1.0999999999999996", "value4": "0"} -(5 rows) - ---Testcase 246: -EXPLAIN VERBOSE -SELECT elapsed((fields->>'value1')::float),elapsed((fields->>'value2')::bigint),elapsed((fields->>'value3')::float),elapsed((fields->>'value4')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (elapsed(((fields ->> 'value1'::text))::double precision)), (elapsed(((fields ->> 'value2'::text))::bigint)), (elapsed(((fields ->> 'value3'::text))::double precision)), (elapsed(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT elapsed("value1"), elapsed("value2"), elapsed("value3"), elapsed("value4") FROM "s3" -(3 rows) - ---Testcase 247: -SELECT elapsed((fields->>'value1')::float),elapsed((fields->>'value2')::bigint),elapsed((fields->>'value3')::float),elapsed((fields->>'value4')::bigint) FROM s3; - elapsed | elapsed | elapsed | elapsed -------------+------------+------------+------------ - 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1000000000 | 1000000000 | 1000000000 | 1000000000 -(5 rows) - ---Testcase 248: -EXPLAIN VERBOSE -SELECT elapsed((fields->>'value1')::float, interval '0.5s'),elapsed((fields->>'value2')::bigint, interval '0.2s'),elapsed((fields->>'value3')::float, interval '0.1s'),elapsed((fields->>'value4')::bigint, interval '2s') FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (elapsed(((fields ->> 'value1'::text))::double precision, '@ 0.5 secs'::interval)), (elapsed(((fields ->> 'value2'::text))::bigint, '@ 0.2 secs'::interval)), (elapsed(((fields ->> 'value3'::text))::double precision, '@ 0.1 secs'::interval)), (elapsed(((fields ->> 'value4'::text))::bigint, '@ 2 secs'::interval)) - InfluxDB query: SELECT elapsed("value1", 0d0h0m0s500000u), elapsed("value2", 0d0h0m0s200000u), elapsed("value3", 0d0h0m0s100000u), elapsed("value4", 0d0h0m2s0u) FROM "s3" -(3 rows) - ---Testcase 249: -SELECT elapsed((fields->>'value1')::float, interval '0.5s'),elapsed((fields->>'value2')::bigint, interval '0.2s'),elapsed((fields->>'value3')::float, interval '0.1s'),elapsed((fields->>'value4')::bigint, interval '2s') FROM s3; - elapsed | elapsed | elapsed | elapsed ----------+---------+---------+--------- - 2 | 5 | 10 | 0 - 2 | 5 | 10 | 0 - 2 | 5 | 10 | 0 - 2 | 5 | 10 | 0 - 2 | 5 | 10 | 0 -(5 rows) - --- select elapsed(*) (stub function, explain) ---Testcase 250: -EXPLAIN VERBOSE -SELECT elapsed_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (elapsed_all()) - InfluxDB query: SELECT elapsed(*) FROM "s3" -(3 rows) - --- select elapsed(*) (stub function, result) ---Testcase 251: -SELECT elapsed_all() from s3; - elapsed_all ----------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") -(5 rows) - --- select elapsed(regex) (stub function, explain) ---Testcase 252: -EXPLAIN VERBOSE -SELECT elapsed('/value[1,4]/') from s3; - QUERY PLAN ----------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (elapsed('/value[1,4]/'::text)) - InfluxDB query: SELECT elapsed(/value[1,4]/) FROM "s3" -(3 rows) - --- select elapsed(regex) (stub agg function, result) ---Testcase 253: -SELECT elapsed('/value[1,4]/') from s3; - elapsed --------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") -(5 rows) - --- select elapsed(*) (stub function and group by tag only) (explain) ---Testcase 254: -EXPLAIN VERBOSE -SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (elapsed_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT elapsed(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select elapsed(*) (stub function and group by tag only) (result) ---Testcase 255: -SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - elapsed_all ----------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") -(3 rows) - --- select elapsed(regex) (stub function and group by tag only) (explain) ---Testcase 256: -EXPLAIN VERBOSE -SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (elapsed('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT elapsed(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select elapsed(regex) (stub function and group by tag only) (result) ---Testcase 257: -SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - elapsed --------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") -(3 rows) - --- select elapsed(*) (stub function, expose data, explain) ---Testcase 258: -EXPLAIN VERBOSE -SELECT (elapsed_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((elapsed_all()))::s3)."time", (((elapsed_all()))::s3).tags, (((elapsed_all()))::s3).fields - InfluxDB query: SELECT elapsed(*) FROM "s3" -(3 rows) - --- select elapsed(*) (stub function, expose data, result) ---Testcase 259: -SELECT (elapsed_all()::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "1000000000", "value2": "1000000000", "value3": "1000000000", "value4": "1000000000"} - 1970-01-01 09:00:02+09 | | {"value1": "1000000000", "value2": "1000000000", "value3": "1000000000", "value4": "1000000000"} - 1970-01-01 09:00:03+09 | | {"value1": "1000000000", "value2": "1000000000", "value3": "1000000000", "value4": "1000000000"} - 1970-01-01 09:00:04+09 | | {"value1": "1000000000", "value2": "1000000000", "value3": "1000000000", "value4": "1000000000"} - 1970-01-01 09:00:05+09 | | {"value1": "1000000000", "value2": "1000000000", "value3": "1000000000", "value4": "1000000000"} -(5 rows) - --- select elapsed(regex) (stub function, expose data, explain) ---Testcase 260: -EXPLAIN VERBOSE -SELECT (elapsed('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((elapsed('/value[1,4]/'::text)))::s3)."time", (((elapsed('/value[1,4]/'::text)))::s3).tags, (((elapsed('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT elapsed(/value[1,4]/) FROM "s3" -(3 rows) - --- select elapsed(regex) (stub agg function, expose data, result) ---Testcase 261: -SELECT (elapsed('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "1000000000", "value4": "1000000000"} - 1970-01-01 09:00:02+09 | | {"value1": "1000000000", "value4": "1000000000"} - 1970-01-01 09:00:03+09 | | {"value1": "1000000000", "value4": "1000000000"} - 1970-01-01 09:00:04+09 | | {"value1": "1000000000", "value4": "1000000000"} - 1970-01-01 09:00:05+09 | | {"value1": "1000000000", "value4": "1000000000"} -(5 rows) - ---Testcase 262: -EXPLAIN VERBOSE -SELECT moving_average((fields->>'value1')::float, 2),moving_average((fields->>'value2')::bigint, 2),moving_average((fields->>'value3')::float, 2),moving_average((fields->>'value4')::bigint, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (moving_average(((fields ->> 'value1'::text))::double precision, 2)), (moving_average(((fields ->> 'value2'::text))::bigint, 2)), (moving_average(((fields ->> 'value3'::text))::double precision, 2)), (moving_average(((fields ->> 'value4'::text))::bigint, 2)) - InfluxDB query: SELECT moving_average("value1", 2), moving_average("value2", 2), moving_average("value3", 2), moving_average("value4", 2) FROM "s3" -(3 rows) - ---Testcase 263: -SELECT moving_average((fields->>'value1')::float, 2),moving_average((fields->>'value2')::bigint, 2),moving_average((fields->>'value3')::float, 2),moving_average((fields->>'value4')::bigint, 2) FROM s3; - moving_average | moving_average | moving_average | moving_average -----------------+----------------+----------------+---------------- - 0.15 | 100 | -0.15 | -100 - 0.25 | 100 | -0.25 | -100 - 0.7 | 150 | -0.7 | -150 - 1.65 | 200 | -1.65 | -200 - 2.75 | 200 | -2.75 | -200 -(5 rows) - --- select moving_average(*) (stub function, explain) ---Testcase 264: -EXPLAIN VERBOSE -SELECT moving_average_all(2) from s3; - QUERY PLAN ---------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (moving_average_all(2)) - InfluxDB query: SELECT moving_average(*, 2) FROM "s3" -(3 rows) - --- select moving_average(*) (stub function, result) ---Testcase 265: -SELECT moving_average_all(2) from s3; - moving_average_all ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.15000000000000002\",\"value2\" : \"100\",\"value3\" : \"-0.15000000000000002\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25\",\"value2\" : \"100\",\"value3\" : \"-0.25\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.7000000000000001\",\"value2\" : \"150\",\"value3\" : \"-0.7000000000000001\",\"value4\" : \"-150\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"2.75\",\"value2\" : \"200\",\"value3\" : \"-2.75\",\"value4\" : \"-200\" }") -(5 rows) - --- select moving_average(regex) (stub function, explain) ---Testcase 266: -EXPLAIN VERBOSE -SELECT moving_average('/value[1,4]/', 2) from s3; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (moving_average('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select moving_average(regex) (stub function, result) ---Testcase 267: -SELECT moving_average('/value[1,4]/', 2) from s3; - moving_average ------------------------------------------------------------------------------------------ - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.15000000000000002\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.7000000000000001\",\"value4\" : \"-150\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.6500000000000001\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"2.75\",\"value4\" : \"-200\" }") -(5 rows) - --- select moving_average(*) (stub function and group by tag only) (explain) ---Testcase 268: -EXPLAIN VERBOSE -SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (moving_average_all(2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select moving_average(*) (stub function and group by tag only) (result) ---Testcase 269: -SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - moving_average_all ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.15000000000000002\",\"value2\" : \"100\",\"value3\" : \"-0.15000000000000002\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25\",\"value2\" : \"100\",\"value3\" : \"-0.25\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") -(3 rows) - --- select moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 270: -EXPLAIN VERBOSE -SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (moving_average('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select moving_average(regex) (stub function and group by tag only) (result) ---Testcase 271: -SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - moving_average ------------------------------------------------------------------------------------------ - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.15000000000000002\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.6500000000000001\",\"value4\" : \"-200\" }") -(3 rows) - --- select moving_average(*) (stub function, expose data, explain) ---Testcase 272: -EXPLAIN VERBOSE -SELECT (moving_average_all(2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((moving_average_all(2)))::s3)."time", (((moving_average_all(2)))::s3).tags, (((moving_average_all(2)))::s3).fields - InfluxDB query: SELECT moving_average(*, 2) FROM "s3" -(3 rows) - --- select moving_average(*) (stub function, expose data, result) ---Testcase 273: -SELECT (moving_average_all(2)::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------------------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "0.15000000000000002", "value2": "100", "value3": "-0.15000000000000002", "value4": "-100"} - 1970-01-01 09:00:02+09 | | {"value1": "0.25", "value2": "100", "value3": "-0.25", "value4": "-100"} - 1970-01-01 09:00:03+09 | | {"value1": "0.7000000000000001", "value2": "150", "value3": "-0.7000000000000001", "value4": "-150"} - 1970-01-01 09:00:04+09 | | {"value1": "1.6500000000000001", "value2": "200", "value3": "-1.6500000000000001", "value4": "-200"} - 1970-01-01 09:00:05+09 | | {"value1": "2.75", "value2": "200", "value3": "-2.75", "value4": "-200"} -(5 rows) - --- select moving_average(regex) (stub function, expose data, explain) ---Testcase 274: -EXPLAIN VERBOSE -SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((moving_average('/value[1,4]/'::text, 2)))::s3)."time", (((moving_average('/value[1,4]/'::text, 2)))::s3).tags, (((moving_average('/value[1,4]/'::text, 2)))::s3).fields - InfluxDB query: SELECT moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select moving_average(regex) (stub function, expose data, result) ---Testcase 275: -SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; - time | tags | fields -------------------------+------+----------------------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "0.15000000000000002", "value4": "-100"} - 1970-01-01 09:00:02+09 | | {"value1": "0.25", "value4": "-100"} - 1970-01-01 09:00:03+09 | | {"value1": "0.7000000000000001", "value4": "-150"} - 1970-01-01 09:00:04+09 | | {"value1": "1.6500000000000001", "value4": "-200"} - 1970-01-01 09:00:05+09 | | {"value1": "2.75", "value4": "-200"} -(5 rows) - ---Testcase 276: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator((fields->>'value1')::float, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2),chande_momentum_oscillator((fields->>'value3')::float, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (chande_momentum_oscillator(((fields ->> 'value1'::text))::double precision, 2)), (chande_momentum_oscillator(((fields ->> 'value2'::text))::bigint, 2)), (chande_momentum_oscillator(((fields ->> 'value3'::text))::double precision, 2)), (chande_momentum_oscillator(((fields ->> 'value4'::text))::bigint, 2)) - InfluxDB query: SELECT chande_momentum_oscillator("value1", 2), chande_momentum_oscillator("value2", 2), chande_momentum_oscillator("value3", 2), chande_momentum_oscillator("value4", 2) FROM "s3" -(3 rows) - ---Testcase 277: -SELECT chande_momentum_oscillator((fields->>'value1')::float, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2),chande_momentum_oscillator((fields->>'value3')::float, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2) FROM s3; - chande_momentum_oscillator | chande_momentum_oscillator | chande_momentum_oscillator | chande_momentum_oscillator -----------------------------+----------------------------+----------------------------+---------------------------- - 100 | 0 | -100 | 0 - 100 | 0 | -100 | 0 - 100 | 100 | -100 | -100 - 100 | 100 | -100 | -100 - 100 | 0 | -100 | 0 -(5 rows) - ---Testcase 278: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator((fields->>'value1')::float, 2, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2, 2),chande_momentum_oscillator((fields->>'value3')::float, 2, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (chande_momentum_oscillator(((fields ->> 'value1'::text))::double precision, 2, 2)), (chande_momentum_oscillator(((fields ->> 'value2'::text))::bigint, 2, 2)), (chande_momentum_oscillator(((fields ->> 'value3'::text))::double precision, 2, 2)), (chande_momentum_oscillator(((fields ->> 'value4'::text))::bigint, 2, 2)) - InfluxDB query: SELECT chande_momentum_oscillator("value1", 2, 2), chande_momentum_oscillator("value2", 2, 2), chande_momentum_oscillator("value3", 2, 2), chande_momentum_oscillator("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 279: -SELECT chande_momentum_oscillator((fields->>'value1')::float, 2, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2, 2),chande_momentum_oscillator((fields->>'value3')::float, 2, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2, 2) FROM s3; - chande_momentum_oscillator | chande_momentum_oscillator | chande_momentum_oscillator | chande_momentum_oscillator -----------------------------+----------------------------+----------------------------+---------------------------- - 100 | 0 | -100 | 0 - 100 | 100 | -100 | -100 - 100 | 100 | -100 | -100 - 100 | 0 | -100 | 0 -(4 rows) - --- select chande_momentum_oscillator(*) (stub function, explain) ---Testcase 280: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator_all(2) from s3; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (chande_momentum_oscillator_all(2)) - InfluxDB query: SELECT chande_momentum_oscillator(*, 2) FROM "s3" -(3 rows) - --- select chande_momentum_oscillator(*) (stub function, result) ---Testcase 281: -SELECT chande_momentum_oscillator_all(2) from s3; - chande_momentum_oscillator_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"100\",\"value2\" : \"0\",\"value3\" : \"-100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value2\" : \"0\",\"value3\" : \"-100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"100\",\"value2\" : \"100\",\"value3\" : \"-100\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"100\",\"value2\" : \"100\",\"value3\" : \"-100\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"100\",\"value2\" : \"0\",\"value3\" : \"-100\",\"value4\" : \"0\" }") -(5 rows) - --- select chande_momentum_oscillator(regex) (stub function, explain) ---Testcase 282: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; - QUERY PLAN --------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (chande_momentum_oscillator('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT chande_momentum_oscillator(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select chande_momentum_oscillator(regex) (stub agg function, result) ---Testcase 283: -SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; - chande_momentum_oscillator -------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"100\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"100\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") -(5 rows) - --- select chande_momentum_oscillator(*) (stub function and group by tag only) (explain) ---Testcase 284: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (chande_momentum_oscillator_all(2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT chande_momentum_oscillator(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select chande_momentum_oscillator(*) (stub agg function and group by tag only) (result) ---Testcase 285: -SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - chande_momentum_oscillator_all ---------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"100\",\"value2\" : \"0\",\"value3\" : \"-100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value2\" : \"0\",\"value3\" : \"-100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"100\",\"value2\" : \"0\",\"value3\" : \"-100\",\"value4\" : \"0\" }") -(3 rows) - --- select chande_momentum_oscillator(regex) (stub agg function and group by tag only) (explain) ---Testcase 286: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (chande_momentum_oscillator('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT chande_momentum_oscillator(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select chande_momentum_oscillator(regex) (stub function and group by tag only) (result) ---Testcase 287: -SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - chande_momentum_oscillator ----------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") -(3 rows) - --- select chande_momentum_oscillator(*) (stub agg function, expose data, explain) ---Testcase 288: -EXPLAIN VERBOSE -SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((chande_momentum_oscillator_all(2)))::s3)."time", (((chande_momentum_oscillator_all(2)))::s3).tags, (((chande_momentum_oscillator_all(2)))::s3).fields - InfluxDB query: SELECT chande_momentum_oscillator(*, 2) FROM "s3" -(3 rows) - --- select chande_momentum_oscillator(*) (stub function, expose data, result) ---Testcase 289: -SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:01+09 | | {"value1": "100", "value2": "0", "value3": "-100", "value4": "0"} - 1970-01-01 09:00:02+09 | | {"value1": "100", "value2": "0", "value3": "-100", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "100", "value2": "100", "value3": "-100", "value4": "-100"} - 1970-01-01 09:00:04+09 | | {"value1": "100", "value2": "100", "value3": "-100", "value4": "-100"} - 1970-01-01 09:00:05+09 | | {"value1": "100", "value2": "0", "value3": "-100", "value4": "0"} -(5 rows) - --- select chande_momentum_oscillator(regex) (stub function, expose data, explain) ---Testcase 290: -EXPLAIN VERBOSE -SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((chande_momentum_oscillator('/value[1,4]/'::text, 2)))::s3)."time", (((chande_momentum_oscillator('/value[1,4]/'::text, 2)))::s3).tags, (((chande_momentum_oscillator('/value[1,4]/'::text, 2)))::s3).fields - InfluxDB query: SELECT chande_momentum_oscillator(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select chande_momentum_oscillator(regex) (stub function, expose data, result) ---Testcase 291: -SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:01+09 | | {"value1": "100", "value4": "0"} - 1970-01-01 09:00:02+09 | | {"value1": "100", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "100", "value4": "-100"} - 1970-01-01 09:00:04+09 | | {"value1": "100", "value4": "-100"} - 1970-01-01 09:00:05+09 | | {"value1": "100", "value4": "0"} -(5 rows) - ---Testcase 292: -EXPLAIN VERBOSE -SELECT exponential_moving_average((fields->>'value1')::float, 2),exponential_moving_average((fields->>'value2')::bigint, 2),exponential_moving_average((fields->>'value3')::float, 2),exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2)), (exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2)), (exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2)), (exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2)) - InfluxDB query: SELECT exponential_moving_average("value1", 2), exponential_moving_average("value2", 2), exponential_moving_average("value3", 2), exponential_moving_average("value4", 2) FROM "s3" -(3 rows) - ---Testcase 293: -SELECT exponential_moving_average((fields->>'value1')::float, 2),exponential_moving_average((fields->>'value2')::bigint, 2),exponential_moving_average((fields->>'value3')::float, 2),exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - exponential_moving_average | exponential_moving_average | exponential_moving_average | exponential_moving_average -----------------------------+----------------------------+----------------------------+---------------------------- - 0.166666666666667 | 100 | -0.166666666666667 | -100 - 0.255555555555556 | 100 | -0.255555555555556 | -100 - 0.818518518518519 | 166.666666666667 | -0.818518518518519 | -166.666666666667 - 1.73950617283951 | 188.888888888889 | -1.73950617283951 | -188.888888888889 - 2.7798353909465 | 196.296296296296 | -2.7798353909465 | -196.296296296296 -(5 rows) - ---Testcase 294: -EXPLAIN VERBOSE -SELECT exponential_moving_average((fields->>'value1')::float, 2, 2),exponential_moving_average((fields->>'value2')::bigint, 2, 2),exponential_moving_average((fields->>'value3')::float, 2, 2),exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2, 2)), (exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2, 2)), (exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2, 2)), (exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2, 2)) - InfluxDB query: SELECT exponential_moving_average("value1", 2, 2), exponential_moving_average("value2", 2, 2), exponential_moving_average("value3", 2, 2), exponential_moving_average("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 295: -SELECT exponential_moving_average((fields->>'value1')::float, 2, 2),exponential_moving_average((fields->>'value2')::bigint, 2, 2),exponential_moving_average((fields->>'value3')::float, 2, 2),exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - exponential_moving_average | exponential_moving_average | exponential_moving_average | exponential_moving_average -----------------------------+----------------------------+----------------------------+---------------------------- - 0.255555555555556 | 100 | -0.255555555555556 | -100 - 0.818518518518519 | 166.666666666667 | -0.818518518518519 | -166.666666666667 - 1.73950617283951 | 188.888888888889 | -1.73950617283951 | -188.888888888889 - 2.7798353909465 | 196.296296296296 | -2.7798353909465 | -196.296296296296 -(4 rows) - --- select exponential_moving_average(*) (stub function, explain) ---Testcase 296: -EXPLAIN VERBOSE -SELECT exponential_moving_average_all(2) from s3; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (exponential_moving_average_all(2)) - InfluxDB query: SELECT exponential_moving_average(*, 2) FROM "s3" -(3 rows) - --- select exponential_moving_average(*) (stub function, result) ---Testcase 297: -SELECT exponential_moving_average_all(2) from s3; - exponential_moving_average_all --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.16666666666666669\",\"value2\" : \"100\",\"value3\" : \"-0.16666666666666669\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25555555555555554\",\"value2\" : \"100\",\"value3\" : \"-0.25555555555555554\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8185185185185185\",\"value2\" : \"166.66666666666666\",\"value3\" : \"-0.8185185185185185\",\"value4\" : \"-166.66666666666666\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.7395061728395063\",\"value2\" : \"188.88888888888889\",\"value3\" : \"-1.7395061728395063\",\"value4\" : \"-188.88888888888889\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"2.779835390946502\",\"value2\" : \"196.2962962962963\",\"value3\" : \"-2.779835390946502\",\"value4\" : \"-196.2962962962963\" }") -(5 rows) - --- select exponential_moving_average(regex) (stub function, explain) ---Testcase 298: -EXPLAIN VERBOSE -SELECT exponential_moving_average('/value[1,4]/',2) from s3; - QUERY PLAN --------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (exponential_moving_average('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT exponential_moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select exponential_moving_average(regex) (stub function, result) ---Testcase 299: -SELECT exponential_moving_average('/value[1,4]/',2) from s3; - exponential_moving_average -------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.16666666666666669\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25555555555555554\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8185185185185185\",\"value4\" : \"-166.66666666666666\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.7395061728395063\",\"value4\" : \"-188.88888888888889\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"2.779835390946502\",\"value4\" : \"-196.2962962962963\" }") -(5 rows) - --- select exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 300: -EXPLAIN VERBOSE -SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (exponential_moving_average_all(2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 301: -SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - exponential_moving_average_all ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.16666666666666669\",\"value2\" : \"100\",\"value3\" : \"-0.16666666666666669\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25555555555555554\",\"value2\" : \"100\",\"value3\" : \"-0.25555555555555554\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.8333333333333335\",\"value2\" : \"200\",\"value3\" : \"-1.8333333333333335\",\"value4\" : \"-200\" }") -(3 rows) - --- select exponential_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 302: -EXPLAIN VERBOSE -SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (exponential_moving_average('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select exponential_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 303: -SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - exponential_moving_average ------------------------------------------------------------------------------------------ - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.16666666666666669\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25555555555555554\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.8333333333333335\",\"value4\" : \"-200\" }") -(3 rows) - ---Testcase 304: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average((fields->>'value1')::float, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2),double_exponential_moving_average((fields->>'value3')::float, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (double_exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2)), (double_exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2)), (double_exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2)), (double_exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2)) - InfluxDB query: SELECT double_exponential_moving_average("value1", 2), double_exponential_moving_average("value2", 2), double_exponential_moving_average("value3", 2), double_exponential_moving_average("value4", 2) FROM "s3" -(3 rows) - ---Testcase 305: -SELECT double_exponential_moving_average((fields->>'value1')::float, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2),double_exponential_moving_average((fields->>'value3')::float, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - double_exponential_moving_average | double_exponential_moving_average | double_exponential_moving_average | double_exponential_moving_average ------------------------------------+-----------------------------------+-----------------------------------+----------------------------------- - 0.188888888888889 | 100 | -0.188888888888889 | -100 - 0.292592592592593 | 100 | -0.292592592592593 | -100 - 1.01851851851852 | 188.888888888889 | -1.01851851851852 | -188.888888888889 - 2.11316872427984 | 203.703703703704 | -2.11316872427984 | -203.703703703704 - 3.25116598079561 | 203.703703703704 | -3.25116598079561 | -203.703703703704 -(5 rows) - ---Testcase 306: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average((fields->>'value1')::float, 2, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2, 2),double_exponential_moving_average((fields->>'value3')::float, 2, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (double_exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2, 2)), (double_exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2, 2)), (double_exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2, 2)), (double_exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2, 2)) - InfluxDB query: SELECT double_exponential_moving_average("value1", 2, 2), double_exponential_moving_average("value2", 2, 2), double_exponential_moving_average("value3", 2, 2), double_exponential_moving_average("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 307: -SELECT double_exponential_moving_average((fields->>'value1')::float, 2, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2, 2),double_exponential_moving_average((fields->>'value3')::float, 2, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - double_exponential_moving_average | double_exponential_moving_average | double_exponential_moving_average | double_exponential_moving_average ------------------------------------+-----------------------------------+-----------------------------------+----------------------------------- - 0.292592592592593 | 100 | -0.292592592592593 | -100 - 1.01851851851852 | 188.888888888889 | -1.01851851851852 | -188.888888888889 - 2.11316872427984 | 203.703703703704 | -2.11316872427984 | -203.703703703704 - 3.25116598079561 | 203.703703703704 | -3.25116598079561 | -203.703703703704 -(4 rows) - --- select double_exponential_moving_average(*) (stub function, explain) ---Testcase 308: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average_all(2) from s3; - QUERY PLAN ----------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (double_exponential_moving_average_all(2)) - InfluxDB query: SELECT double_exponential_moving_average(*, 2) FROM "s3" -(3 rows) - --- select double_exponential_moving_average(*) (stub function, result) ---Testcase 309: -SELECT double_exponential_moving_average_all(2) from s3; - double_exponential_moving_average_all --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1888888888888889\",\"value2\" : \"100\",\"value3\" : \"-0.1888888888888889\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.29259259259259257\",\"value2\" : \"100\",\"value3\" : \"-0.29259259259259257\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.0185185185185186\",\"value2\" : \"188.88888888888889\",\"value3\" : \"-1.0185185185185186\",\"value4\" : \"-188.88888888888889\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.1131687242798356\",\"value2\" : \"203.7037037037037\",\"value3\" : \"-2.1131687242798356\",\"value4\" : \"-203.7037037037037\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"3.2511659807956104\",\"value2\" : \"203.70370370370372\",\"value3\" : \"-3.2511659807956104\",\"value4\" : \"-203.70370370370372\" }") -(5 rows) - --- select double_exponential_moving_average(regex) (stub function, explain) ---Testcase 310: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; - QUERY PLAN ---------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (double_exponential_moving_average('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT double_exponential_moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select double_exponential_moving_average(regex) (stub function, result) ---Testcase 311: -SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; - double_exponential_moving_average -------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1888888888888889\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.29259259259259257\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.0185185185185186\",\"value4\" : \"-188.88888888888889\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.1131687242798356\",\"value4\" : \"-203.7037037037037\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"3.2511659807956104\",\"value4\" : \"-203.70370370370372\" }") -(5 rows) - --- select double_exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 312: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (double_exponential_moving_average_all(2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT double_exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select double_exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 313: -SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - double_exponential_moving_average_all ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1888888888888889\",\"value2\" : \"100\",\"value3\" : \"-0.1888888888888889\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.29259259259259257\",\"value2\" : \"100\",\"value3\" : \"-0.29259259259259257\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.077777777777778\",\"value2\" : \"200\",\"value3\" : \"-2.077777777777778\",\"value4\" : \"-200\" }") -(3 rows) - --- select double_exponential_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 314: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (double_exponential_moving_average('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT double_exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select double_exponential_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 315: -SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - double_exponential_moving_average ------------------------------------------------------------------------------------------ - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1888888888888889\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.29259259259259257\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.077777777777778\",\"value4\" : \"-200\" }") -(3 rows) - ---Testcase 316: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (kaufmans_efficiency_ratio(((fields ->> 'value1'::text))::double precision, 2)), (kaufmans_efficiency_ratio(((fields ->> 'value2'::text))::bigint, 2)), (kaufmans_efficiency_ratio(((fields ->> 'value3'::text))::double precision, 2)), (kaufmans_efficiency_ratio(((fields ->> 'value4'::text))::bigint, 2)) - InfluxDB query: SELECT kaufmans_efficiency_ratio("value1", 2), kaufmans_efficiency_ratio("value2", 2), kaufmans_efficiency_ratio("value3", 2), kaufmans_efficiency_ratio("value4", 2) FROM "s3" -(3 rows) - ---Testcase 317: -SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2) FROM s3; - kaufmans_efficiency_ratio | kaufmans_efficiency_ratio | kaufmans_efficiency_ratio | kaufmans_efficiency_ratio ----------------------------+---------------------------+---------------------------+--------------------------- - 1 | 0 | 1 | 0 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 0 | 1 | 0 -(4 rows) - ---Testcase 318: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2, 2) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (kaufmans_efficiency_ratio(((fields ->> 'value1'::text))::double precision, 2, 2)), (kaufmans_efficiency_ratio(((fields ->> 'value2'::text))::bigint, 2, 2)), (kaufmans_efficiency_ratio(((fields ->> 'value3'::text))::double precision, 2, 2)), (kaufmans_efficiency_ratio(((fields ->> 'value4'::text))::bigint, 2, 2)) - InfluxDB query: SELECT kaufmans_efficiency_ratio("value1", 2, 2), kaufmans_efficiency_ratio("value2", 2, 2), kaufmans_efficiency_ratio("value3", 2, 2), kaufmans_efficiency_ratio("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 319: -SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2, 2) FROM s3; - kaufmans_efficiency_ratio | kaufmans_efficiency_ratio | kaufmans_efficiency_ratio | kaufmans_efficiency_ratio ----------------------------+---------------------------+---------------------------+--------------------------- - 1 | 0 | 1 | 0 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 0 | 1 | 0 -(4 rows) - --- select kaufmans_efficiency_ratio(*) (stub function, explain) ---Testcase 320: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio_all(2) from s3; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (kaufmans_efficiency_ratio_all(2)) - InfluxDB query: SELECT kaufmans_efficiency_ratio(*, 2) FROM "s3" -(3 rows) - --- select kaufmans_efficiency_ratio(*) (stub function, result) ---Testcase 321: -SELECT kaufmans_efficiency_ratio_all(2) from s3; - kaufmans_efficiency_ratio_all --------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value2\" : \"0\",\"value3\" : \"1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.0000000000000002\",\"value2\" : \"1\",\"value3\" : \"1.0000000000000002\",\"value4\" : \"1\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1\",\"value2\" : \"0\",\"value3\" : \"1\",\"value4\" : \"0\" }") -(4 rows) - --- select kaufmans_efficiency_ratio(regex) (stub function, explain) ---Testcase 322: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT kaufmans_efficiency_ratio(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select kaufmans_efficiency_ratio(regex) (stub function, result) ---Testcase 323: -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; - kaufmans_efficiency_ratio -------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.0000000000000002\",\"value4\" : \"1\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1\",\"value4\" : \"1\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1\",\"value4\" : \"0\" }") -(4 rows) - --- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (explain) ---Testcase 324: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (kaufmans_efficiency_ratio_all(2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT kaufmans_efficiency_ratio(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (result) ---Testcase 325: -SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - kaufmans_efficiency_ratio_all ----------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value2\" : \"0\",\"value3\" : \"1\",\"value4\" : \"0\" }") -(1 row) - --- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (explain) ---Testcase 326: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT kaufmans_efficiency_ratio(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (result) ---Testcase 327: -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - kaufmans_efficiency_ratio --------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value4\" : \"0\" }") -(1 row) - --- select kaufmans_efficiency_ratio(*) (stub function, expose data, explain) ---Testcase 328: -EXPLAIN VERBOSE -SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((kaufmans_efficiency_ratio_all(2)))::s3)."time", (((kaufmans_efficiency_ratio_all(2)))::s3).tags, (((kaufmans_efficiency_ratio_all(2)))::s3).fields - InfluxDB query: SELECT kaufmans_efficiency_ratio(*, 2) FROM "s3" -(3 rows) - --- select kaufmans_efficiency_ratio(*) (stub function, expose data, result) ---Testcase 329: -SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------------------------------ - 1970-01-01 09:00:02+09 | | {"value1": "1", "value2": "0", "value3": "1", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "1.0000000000000002", "value2": "1", "value3": "1.0000000000000002", "value4": "1"} - 1970-01-01 09:00:04+09 | | {"value1": "1", "value2": "1", "value3": "1", "value4": "1"} - 1970-01-01 09:00:05+09 | | {"value1": "1", "value2": "0", "value3": "1", "value4": "0"} -(4 rows) - --- select kaufmans_efficiency_ratio(regex) (stub function, expose data, explain) ---Testcase 330: -EXPLAIN VERBOSE -SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)))::s3)."time", (((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)))::s3).tags, (((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)))::s3).fields - InfluxDB query: SELECT kaufmans_efficiency_ratio(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select kaufmans_efficiency_ratio(regex) (stub function, expose data, result) ---Testcase 331: -SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------- - 1970-01-01 09:00:02+09 | | {"value1": "1", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "1.0000000000000002", "value4": "1"} - 1970-01-01 09:00:04+09 | | {"value1": "1", "value4": "1"} - 1970-01-01 09:00:05+09 | | {"value1": "1", "value4": "0"} -(4 rows) - ---Testcase 332: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (kaufmans_adaptive_moving_average(((fields ->> 'value1'::text))::double precision, 2)), (kaufmans_adaptive_moving_average(((fields ->> 'value2'::text))::bigint, 2)), (kaufmans_adaptive_moving_average(((fields ->> 'value3'::text))::double precision, 2)), (kaufmans_adaptive_moving_average(((fields ->> 'value4'::text))::bigint, 2)) - InfluxDB query: SELECT kaufmans_adaptive_moving_average("value1", 2), kaufmans_adaptive_moving_average("value2", 2), kaufmans_adaptive_moving_average("value3", 2), kaufmans_adaptive_moving_average("value4", 2) FROM "s3" -(3 rows) - ---Testcase 333: -SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2) FROM s3; - kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average -----------------------------------+----------------------------------+----------------------------------+---------------------------------- - 0.244444444444444 | 100 | -0.244444444444444 | -100 - 0.624691358024692 | 144.444444444444 | -0.624691358024692 | -144.444444444444 - 1.32482853223594 | 169.135802469136 | -1.32482853223594 | -169.135802469136 - 2.20268251790886 | 169.264269472386 | -2.20268251790886 | -169.264269472386 -(4 rows) - ---Testcase 334: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (kaufmans_adaptive_moving_average(((fields ->> 'value1'::text))::double precision, 2, 2)), (kaufmans_adaptive_moving_average(((fields ->> 'value2'::text))::bigint, 2, 2)), (kaufmans_adaptive_moving_average(((fields ->> 'value3'::text))::double precision, 2, 2)), (kaufmans_adaptive_moving_average(((fields ->> 'value4'::text))::bigint, 2, 2)) - InfluxDB query: SELECT kaufmans_adaptive_moving_average("value1", 2, 2), kaufmans_adaptive_moving_average("value2", 2, 2), kaufmans_adaptive_moving_average("value3", 2, 2), kaufmans_adaptive_moving_average("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 335: -SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average -----------------------------------+----------------------------------+----------------------------------+---------------------------------- - 0.244444444444444 | 100 | -0.244444444444444 | -100 - 0.624691358024692 | 144.444444444444 | -0.624691358024692 | -144.444444444444 - 1.32482853223594 | 169.135802469136 | -1.32482853223594 | -169.135802469136 - 2.20268251790886 | 169.264269472386 | -2.20268251790886 | -169.264269472386 -(4 rows) - --- select kaufmans_adaptive_moving_average(*) (stub function, explain) ---Testcase 336: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average_all(2) from s3; - QUERY PLAN ---------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (kaufmans_adaptive_moving_average_all(2)) - InfluxDB query: SELECT kaufmans_adaptive_moving_average(*, 2) FROM "s3" -(3 rows) - --- select kaufmans_adaptive_moving_average(*) (stub function, result) ---Testcase 337: -SELECT kaufmans_adaptive_moving_average_all(2) from s3; - kaufmans_adaptive_moving_average_all --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.24444444444444446\",\"value2\" : \"100\",\"value3\" : \"-0.24444444444444446\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.6246913580246916\",\"value2\" : \"144.44444444444446\",\"value3\" : \"-0.6246913580246916\",\"value4\" : \"-144.44444444444446\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.3248285322359399\",\"value2\" : \"169.13580246913583\",\"value3\" : \"-1.3248285322359399\",\"value4\" : \"-169.13580246913583\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"2.2026825179088556\",\"value2\" : \"169.26426947238605\",\"value3\" : \"-2.2026825179088556\",\"value4\" : \"-169.26426947238605\" }") -(4 rows) - --- select kaufmans_adaptive_moving_average(regex) (stub function, explain) ---Testcase 338: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; - QUERY PLAN --------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (kaufmans_adaptive_moving_average('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT kaufmans_adaptive_moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select kaufmans_adaptive_moving_average(regex) (stub agg function, result) ---Testcase 339: -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; - kaufmans_adaptive_moving_average -------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.24444444444444446\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.6246913580246916\",\"value4\" : \"-144.44444444444446\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.3248285322359399\",\"value4\" : \"-169.13580246913583\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"2.2026825179088556\",\"value4\" : \"-169.26426947238605\" }") -(4 rows) - --- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 340: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (kaufmans_adaptive_moving_average_all(2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT kaufmans_adaptive_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (result) ---Testcase 341: -SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - kaufmans_adaptive_moving_average_all ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.24444444444444446\",\"value2\" : \"100\",\"value3\" : \"-0.24444444444444446\",\"value4\" : \"-100\" }") -(1 row) - --- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 342: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (kaufmans_adaptive_moving_average('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT kaufmans_adaptive_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 343: -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - kaufmans_adaptive_moving_average ------------------------------------------------------------------------------------------ - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.24444444444444446\",\"value4\" : \"-100\" }") -(1 row) - ---Testcase 344: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average((fields->>'value1')::float, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2),triple_exponential_moving_average((fields->>'value3')::float, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (triple_exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2)), (triple_exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2)), (triple_exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2)), (triple_exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2)) - InfluxDB query: SELECT triple_exponential_moving_average("value1", 2), triple_exponential_moving_average("value2", 2), triple_exponential_moving_average("value3", 2), triple_exponential_moving_average("value4", 2) FROM "s3" -(3 rows) - ---Testcase 345: -SELECT triple_exponential_moving_average((fields->>'value1')::float, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2),triple_exponential_moving_average((fields->>'value3')::float, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - triple_exponential_moving_average | triple_exponential_moving_average | triple_exponential_moving_average | triple_exponential_moving_average ------------------------------------+-----------------------------------+-----------------------------------+----------------------------------- - 0.196296296296296 | 100 | -0.196296296296296 | -100 - 0.3 | 100 | -0.3 | -100 - 1.07530864197531 | 196.296296296296 | -1.07530864197531 | -196.296296296296 - 2.18998628257888 | 203.703703703704 | -2.18998628257888 | -203.703703703704 - 3.30932784636488 | 201.234567901235 | -3.30932784636488 | -201.234567901235 -(5 rows) - ---Testcase 346: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average((fields->>'value1')::float, 2, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2, 2),triple_exponential_moving_average((fields->>'value3')::float, 2, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (triple_exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2, 2)), (triple_exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2, 2)), (triple_exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2, 2)), (triple_exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2, 2)) - InfluxDB query: SELECT triple_exponential_moving_average("value1", 2, 2), triple_exponential_moving_average("value2", 2, 2), triple_exponential_moving_average("value3", 2, 2), triple_exponential_moving_average("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 347: -SELECT triple_exponential_moving_average((fields->>'value1')::float, 2, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2, 2),triple_exponential_moving_average((fields->>'value3')::float, 2, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - triple_exponential_moving_average | triple_exponential_moving_average | triple_exponential_moving_average | triple_exponential_moving_average ------------------------------------+-----------------------------------+-----------------------------------+----------------------------------- - 0.3 | 100 | -0.3 | -100 - 1.07530864197531 | 196.296296296296 | -1.07530864197531 | -196.296296296296 - 2.18998628257888 | 203.703703703704 | -2.18998628257888 | -203.703703703704 - 3.30932784636488 | 201.234567901235 | -3.30932784636488 | -201.234567901235 -(4 rows) - --- select triple_exponential_moving_average(*) (stub function, explain) ---Testcase 348: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average_all(2) from s3; - QUERY PLAN ----------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (triple_exponential_moving_average_all(2)) - InfluxDB query: SELECT triple_exponential_moving_average(*, 2) FROM "s3" -(3 rows) - --- select triple_exponential_moving_average(*) (stub function, result) ---Testcase 349: -SELECT triple_exponential_moving_average_all(2) from s3; - triple_exponential_moving_average_all --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1962962962962963\",\"value2\" : \"100\",\"value3\" : \"-0.1962962962962963\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.30000000000000004\",\"value2\" : \"100\",\"value3\" : \"-0.30000000000000004\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.0753086419753088\",\"value2\" : \"196.29629629629636\",\"value3\" : \"-1.0753086419753088\",\"value4\" : \"-196.29629629629636\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.189986282578875\",\"value2\" : \"203.70370370370372\",\"value3\" : \"-2.189986282578875\",\"value4\" : \"-203.70370370370372\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"3.309327846364883\",\"value2\" : \"201.23456790123464\",\"value3\" : \"-3.309327846364883\",\"value4\" : \"-201.23456790123464\" }") -(5 rows) - --- select triple_exponential_moving_average(regex) (stub function, explain) ---Testcase 350: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; - QUERY PLAN ---------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (triple_exponential_moving_average('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT triple_exponential_moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select triple_exponential_moving_average(regex) (stub function, result) ---Testcase 351: -SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; - triple_exponential_moving_average -------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1962962962962963\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.30000000000000004\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.0753086419753088\",\"value4\" : \"-196.29629629629636\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.189986282578875\",\"value4\" : \"-203.70370370370372\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"3.309327846364883\",\"value4\" : \"-201.23456790123464\" }") -(5 rows) - --- select triple_exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 352: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (triple_exponential_moving_average_all(2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT triple_exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select triple_exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 353: -SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - triple_exponential_moving_average_all ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1962962962962963\",\"value2\" : \"100\",\"value3\" : \"-0.1962962962962963\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.30000000000000004\",\"value2\" : \"100\",\"value3\" : \"-0.30000000000000004\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.1592592592592585\",\"value2\" : \"200\",\"value3\" : \"-2.1592592592592585\",\"value4\" : \"-200\" }") -(3 rows) - --- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (explain) ---Testcase 354: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (triple_exponential_moving_average('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT triple_exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (result) ---Testcase 355: -SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - triple_exponential_moving_average ------------------------------------------------------------------------------------------ - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1962962962962963\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.30000000000000004\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.1592592592592585\",\"value4\" : \"-200\" }") -(3 rows) - ---Testcase 356: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative((fields->>'value1')::float, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2),triple_exponential_derivative((fields->>'value3')::float, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (triple_exponential_derivative(((fields ->> 'value1'::text))::double precision, 2)), (triple_exponential_derivative(((fields ->> 'value2'::text))::bigint, 2)), (triple_exponential_derivative(((fields ->> 'value3'::text))::double precision, 2)), (triple_exponential_derivative(((fields ->> 'value4'::text))::bigint, 2)) - InfluxDB query: SELECT triple_exponential_derivative("value1", 2), triple_exponential_derivative("value2", 2), triple_exponential_derivative("value3", 2), triple_exponential_derivative("value4", 2) FROM "s3" -(3 rows) - ---Testcase 357: -SELECT triple_exponential_derivative((fields->>'value1')::float, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2),triple_exponential_derivative((fields->>'value3')::float, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2) FROM s3; - triple_exponential_derivative | triple_exponential_derivative | triple_exponential_derivative | triple_exponential_derivative --------------------------------+-------------------------------+-------------------------------+------------------------------- - 45.7142857142857 | 0 | 45.7142857142857 | 0 - 151.633986928105 | 29.6296296296296 | 151.633986928105 | 29.6296296296296 - 124.906204906205 | 22.8571428571429 | 124.906204906205 | 22.8571428571429 - 77.3001411523162 | 12.4031007751938 | 77.3001411523162 | 12.4031007751938 -(4 rows) - ---Testcase 358: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative((fields->>'value1')::float, 2, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2, 2),triple_exponential_derivative((fields->>'value3')::float, 2, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (triple_exponential_derivative(((fields ->> 'value1'::text))::double precision, 2, 2)), (triple_exponential_derivative(((fields ->> 'value2'::text))::bigint, 2, 2)), (triple_exponential_derivative(((fields ->> 'value3'::text))::double precision, 2, 2)), (triple_exponential_derivative(((fields ->> 'value4'::text))::bigint, 2, 2)) - InfluxDB query: SELECT triple_exponential_derivative("value1", 2, 2), triple_exponential_derivative("value2", 2, 2), triple_exponential_derivative("value3", 2, 2), triple_exponential_derivative("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 359: -SELECT triple_exponential_derivative((fields->>'value1')::float, 2, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2, 2),triple_exponential_derivative((fields->>'value3')::float, 2, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2, 2) FROM s3; - triple_exponential_derivative | triple_exponential_derivative | triple_exponential_derivative | triple_exponential_derivative --------------------------------+-------------------------------+-------------------------------+------------------------------- - 45.7142857142857 | 0 | 45.7142857142857 | 0 - 151.633986928105 | 29.6296296296296 | 151.633986928105 | 29.6296296296296 - 124.906204906205 | 22.8571428571429 | 124.906204906205 | 22.8571428571429 - 77.3001411523162 | 12.4031007751938 | 77.3001411523162 | 12.4031007751938 -(4 rows) - --- select triple_exponential_derivative(*) (stub function, explain) ---Testcase 360: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative_all(2) from s3; - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (triple_exponential_derivative_all(2)) - InfluxDB query: SELECT triple_exponential_derivative(*, 2) FROM "s3" -(3 rows) - --- select triple_exponential_derivative(*) (stub function, result) ---Testcase 361: -SELECT triple_exponential_derivative_all(2) from s3; - triple_exponential_derivative_all ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"45.71428571428569\",\"value2\" : \"0\",\"value3\" : \"45.71428571428569\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"151.63398692810458\",\"value2\" : \"29.629629629629626\",\"value3\" : \"151.63398692810458\",\"value4\" : \"29.629629629629626\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"124.90620490620489\",\"value2\" : \"22.857142857142865\",\"value3\" : \"124.90620490620489\",\"value4\" : \"22.857142857142865\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"77.30014115231623\",\"value2\" : \"12.4031007751938\",\"value3\" : \"77.30014115231623\",\"value4\" : \"12.4031007751938\" }") -(4 rows) - --- select triple_exponential_derivative(regex) (stub function, explain) ---Testcase 362: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; - QUERY PLAN ------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (triple_exponential_derivative('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT triple_exponential_derivative(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select triple_exponential_derivative(regex) (stub function, result) ---Testcase 363: -SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; - triple_exponential_derivative ------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"45.71428571428569\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"151.63398692810458\",\"value4\" : \"29.629629629629626\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"124.90620490620489\",\"value4\" : \"22.857142857142865\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"77.30014115231623\",\"value4\" : \"12.4031007751938\" }") -(4 rows) - --- select triple_exponential_derivative(*) (stub function and group by tag only) (explain) ---Testcase 364: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (triple_exponential_derivative_all(2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT triple_exponential_derivative(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select triple_exponential_derivative(*) (stub function and group by tag only) (result) ---Testcase 365: -SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - triple_exponential_derivative_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"45.71428571428569\",\"value2\" : \"0\",\"value3\" : \"45.71428571428569\",\"value4\" : \"0\" }") -(1 row) - --- select triple_exponential_derivative(regex) (stub function and group by tag only) (explain) ---Testcase 366: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (triple_exponential_derivative('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT triple_exponential_derivative(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select triple_exponential_derivative(regex) (stub function and group by tag only) (result) ---Testcase 367: -SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - triple_exponential_derivative ------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"45.71428571428569\",\"value4\" : \"0\" }") -(1 row) - ---Testcase 368: -EXPLAIN VERBOSE -SELECT relative_strength_index((fields->>'value1')::float, 2),relative_strength_index((fields->>'value2')::bigint, 2),relative_strength_index((fields->>'value3')::float, 2),relative_strength_index((fields->>'value4')::bigint, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (relative_strength_index(((fields ->> 'value1'::text))::double precision, 2)), (relative_strength_index(((fields ->> 'value2'::text))::bigint, 2)), (relative_strength_index(((fields ->> 'value3'::text))::double precision, 2)), (relative_strength_index(((fields ->> 'value4'::text))::bigint, 2)) - InfluxDB query: SELECT relative_strength_index("value1", 2), relative_strength_index("value2", 2), relative_strength_index("value3", 2), relative_strength_index("value4", 2) FROM "s3" -(3 rows) - ---Testcase 369: -SELECT relative_strength_index((fields->>'value1')::float, 2),relative_strength_index((fields->>'value2')::bigint, 2),relative_strength_index((fields->>'value3')::float, 2),relative_strength_index((fields->>'value4')::bigint, 2) FROM s3; - relative_strength_index | relative_strength_index | relative_strength_index | relative_strength_index --------------------------+-------------------------+-------------------------+------------------------- - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 -(4 rows) - ---Testcase 370: -EXPLAIN VERBOSE -SELECT relative_strength_index((fields->>'value1')::float, 2, 2),relative_strength_index((fields->>'value2')::bigint, 2, 2),relative_strength_index((fields->>'value3')::float, 2, 2),relative_strength_index((fields->>'value4')::bigint, 2, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (relative_strength_index(((fields ->> 'value1'::text))::double precision, 2, 2)), (relative_strength_index(((fields ->> 'value2'::text))::bigint, 2, 2)), (relative_strength_index(((fields ->> 'value3'::text))::double precision, 2, 2)), (relative_strength_index(((fields ->> 'value4'::text))::bigint, 2, 2)) - InfluxDB query: SELECT relative_strength_index("value1", 2, 2), relative_strength_index("value2", 2, 2), relative_strength_index("value3", 2, 2), relative_strength_index("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 371: -SELECT relative_strength_index((fields->>'value1')::float, 2, 2),relative_strength_index((fields->>'value2')::bigint, 2, 2),relative_strength_index((fields->>'value3')::float, 2, 2),relative_strength_index((fields->>'value4')::bigint, 2, 2) FROM s3; - relative_strength_index | relative_strength_index | relative_strength_index | relative_strength_index --------------------------+-------------------------+-------------------------+------------------------- - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 -(4 rows) - --- select relative_strength_index(*) (stub function, explain) ---Testcase 372: -EXPLAIN VERBOSE -SELECT relative_strength_index_all(2) from s3; - QUERY PLAN ------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (relative_strength_index_all(2)) - InfluxDB query: SELECT relative_strength_index(*, 2) FROM "s3" -(3 rows) - --- select relative_strength_index(*) (stub function, result) ---Testcase 373: -SELECT relative_strength_index_all(2) from s3; - relative_strength_index_all --------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value2\" : \"100\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"100\",\"value2\" : \"100\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"100\",\"value2\" : \"100\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"100\",\"value2\" : \"100\",\"value3\" : \"0\",\"value4\" : \"0\" }") -(4 rows) - --- select relative_strength_index(regex) (stub agg function, explain) ---Testcase 374: -EXPLAIN VERBOSE -SELECT relative_strength_index('/value[1,4]/',2) from s3; - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (relative_strength_index('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT relative_strength_index(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select relative_strength_index(regex) (stub agg function, result) ---Testcase 375: -SELECT relative_strength_index('/value[1,4]/',2) from s3; - relative_strength_index ----------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") -(4 rows) - --- select relative_strength_index(*) (stub function and group by tag only) (explain) ---Testcase 376: -EXPLAIN VERBOSE -SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (relative_strength_index_all(2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT relative_strength_index(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select relative_strength_index(*) (stub function and group by tag only) (result) ---Testcase 377: -SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - relative_strength_index_all --------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value2\" : \"100\",\"value3\" : \"0\",\"value4\" : \"0\" }") -(1 row) - --- select relative_strength_index(regex) (stub function and group by tag only) (explain) ---Testcase 378: -EXPLAIN VERBOSE -SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (relative_strength_index('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT relative_strength_index(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select relative_strength_index(regex) (stub function and group by tag only) (result) ---Testcase 379: -SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - relative_strength_index ----------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") -(1 row) - --- select relative_strength_index(*) (stub function, expose data, explain) ---Testcase 380: -EXPLAIN VERBOSE -SELECT (relative_strength_index_all(2)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((relative_strength_index_all(2)))::s3)."time", (((relative_strength_index_all(2)))::s3).tags, (((relative_strength_index_all(2)))::s3).fields - InfluxDB query: SELECT relative_strength_index(*, 2) FROM "s3" -(3 rows) - --- select relative_strength_index(*) (stub function, expose data, result) ---Testcase 381: -SELECT (relative_strength_index_all(2)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------ - 1970-01-01 09:00:02+09 | | {"value1": "100", "value2": "100", "value3": "0", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "100", "value2": "100", "value3": "0", "value4": "0"} - 1970-01-01 09:00:04+09 | | {"value1": "100", "value2": "100", "value3": "0", "value4": "0"} - 1970-01-01 09:00:05+09 | | {"value1": "100", "value2": "100", "value3": "0", "value4": "0"} -(4 rows) - --- select relative_strength_index(regex) (stub function, expose data, explain) ---Testcase 382: -EXPLAIN VERBOSE -SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((relative_strength_index('/value[1,4]/'::text, 2)))::s3)."time", (((relative_strength_index('/value[1,4]/'::text, 2)))::s3).tags, (((relative_strength_index('/value[1,4]/'::text, 2)))::s3).fields - InfluxDB query: SELECT relative_strength_index(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select relative_strength_index(regex) (stub function, expose data, result) ---Testcase 383: -SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; - time | tags | fields -------------------------+------+---------------------------------- - 1970-01-01 09:00:02+09 | | {"value1": "100", "value4": "0"} - 1970-01-01 09:00:03+09 | | {"value1": "100", "value4": "0"} - 1970-01-01 09:00:04+09 | | {"value1": "100", "value4": "0"} - 1970-01-01 09:00:05+09 | | {"value1": "100", "value4": "0"} -(4 rows) - --- select integral (stub agg function, explain) ---Testcase 384: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float),integral((fields->>'value2')::bigint),integral((fields->>'value3')::float),integral((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (integral(((fields ->> 'value1'::text))::double precision)), (integral(((fields ->> 'value2'::text))::bigint)), (integral(((fields ->> 'value3'::text))::double precision)), (integral(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT integral("value1"), integral("value2"), integral("value3"), integral("value4") FROM "s3" -(3 rows) - --- select integral (stub agg function, result) ---Testcase 385: -SELECT integral((fields->>'value1')::float),integral((fields->>'value2')::bigint),integral((fields->>'value3')::float),integral((fields->>'value4')::bigint) FROM s3; - integral | integral | integral | integral -----------+----------+----------+---------- - 5.5 | 750 | -5.5 | -750 -(1 row) - ---Testcase 386: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float, interval '1s'),integral((fields->>'value2')::bigint, interval '1s'),integral((fields->>'value3')::float, interval '1s'),integral((fields->>'value4')::bigint, interval '1s') FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (integral(((fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval)), (integral(((fields ->> 'value2'::text))::bigint, '@ 1 sec'::interval)), (integral(((fields ->> 'value3'::text))::double precision, '@ 1 sec'::interval)), (integral(((fields ->> 'value4'::text))::bigint, '@ 1 sec'::interval)) - InfluxDB query: SELECT integral("value1", 0d0h0m1s0u), integral("value2", 0d0h0m1s0u), integral("value3", 0d0h0m1s0u), integral("value4", 0d0h0m1s0u) FROM "s3" -(3 rows) - --- select integral (stub agg function, result) ---Testcase 387: -SELECT integral((fields->>'value1')::float, interval '1s'),integral((fields->>'value2')::bigint, interval '1s'),integral((fields->>'value3')::float, interval '1s'),integral((fields->>'value4')::bigint, interval '1s') FROM s3; - integral | integral | integral | integral -----------+----------+----------+---------- - 5.5 | 750 | -5.5 | -750 -(1 row) - --- select integral (stub agg function, raise exception if not expected type) ---Testcase 388: -SELECT integral((fields->>'value1')::numeric),integral((fields->>'value2')::numeric),integral((fields->>'value3')::numeric),integral((fields->>'value4')::numeric) FROM s3; -ERROR: stub integral_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE --- select integral (stub agg function and group by influx_time() and tag) (explain) ---Testcase 389: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (integral(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT integral("value1") FROM "s3" GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select integral (stub agg function and group by influx_time() and tag) (result) ---Testcase 390: -SELECT integral((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - integral | influx_time | tag1 -----------+------------------------+------ - 0.15 | 1970-01-01 09:00:00+09 | a - 0.25 | 1970-01-01 09:00:01+09 | a - 1.65 | 1970-01-01 09:00:03+09 | b - 2.75 | 1970-01-01 09:00:04+09 | b -(4 rows) - --- select integral (stub agg function and group by influx_time() and tag) (explain) ---Testcase 391: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float, interval '1s'),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (integral(((fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT integral("value1", 0d0h0m1s0u) FROM "s3" GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select integral (stub agg function and group by influx_time() and tag) (result) ---Testcase 392: -SELECT integral((fields->>'value1')::float, interval '1s'),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - integral | influx_time | tag1 -----------+------------------------+------ - 0.15 | 1970-01-01 09:00:00+09 | a - 0.25 | 1970-01-01 09:00:01+09 | a - 1.65 | 1970-01-01 09:00:03+09 | b - 2.75 | 1970-01-01 09:00:04+09 | b -(4 rows) - --- select integral (stub agg function and group by tag only) (result) ---Testcase 393: -SELECT tags->>'tag1' tag1,integral((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1' ORDER BY 1; - tag1 | integral -------+---------- - a | 0.4 - b | 1.65 -(2 rows) - --- select integral (stub agg function and other aggs) (result) ---Testcase 394: -SELECT sum((fields->>'value1')::float),integral((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; - sum | integral | count ------+----------+------- - 7.2 | 5.5 | 6 -(1 row) - --- select integral (stub agg function and group by tag only) (result) ---Testcase 395: -SELECT tags->>'tag1' tag1,integral((fields->>'value1')::float, interval '1s') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1' ORDER BY 1; - tag1 | integral -------+---------- - a | 0.4 - b | 1.65 -(2 rows) - --- select integral (stub agg function and other aggs) (result) ---Testcase 396: -SELECT sum((fields->>'value1')::float),integral((fields->>'value1')::float, interval '1s'),count((fields->>'value1')::float) FROM s3; - sum | integral | count ------+----------+------- - 7.2 | 5.5 | 6 -(1 row) - --- select integral over join query (explain) ---Testcase 397: -EXPLAIN VERBOSE -SELECT integral((t1.fields->>'value1')::float), integral((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- - Aggregate (cost=39.87..39.88 rows=1 width=16) - Output: integral(((t1.fields ->> 'value1'::text))::double precision), integral(((t2.fields ->> 'value1'::text))::double precision) - -> Nested Loop (cost=20.00..14.63 rows=49 width=64) - Output: t1.fields, t2.fields - -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..7.04 rows=7 width=32) - Output: t2.fields - -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) - Output: t2.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select integral over join query (result, stub call error) ---Testcase 398: -SELECT integral((t1.fields->>'value1')::float), integral((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; -ERROR: stub integral_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE --- select integral over join query (explain) ---Testcase 399: -EXPLAIN VERBOSE -SELECT integral((t1.fields->>'value1')::float, interval '1s'), integral((t2.fields->>'value1')::float, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate (cost=39.87..39.88 rows=1 width=16) - Output: integral(((t1.fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval), integral(((t2.fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval) - -> Nested Loop (cost=20.00..14.63 rows=49 width=64) - Output: t1.fields, t2.fields - -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..7.04 rows=7 width=32) - Output: t2.fields - -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) - Output: t2.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select integral over join query (result, stub call error) ---Testcase 400: -SELECT integral((t1.fields->>'value1')::float, interval '1s'), integral((t2.fields->>'value1')::float, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; -ERROR: stub integral_sfunc(double precision, float8, interval) is called -CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision,interval) line 3 at RAISE --- select integral with having (explain) ---Testcase 401: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float) FROM s3 HAVING integral((fields->>'value1')::float) > 100; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Aggregate (cost=2214.93..2214.94 rows=1 width=8) - Output: integral(((fields ->> 'value1'::text))::double precision) - Filter: (integral(((s3.fields ->> 'value1'::text))::double precision) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "s3" -(6 rows) - --- select integral with having (explain, not pushdown, stub call error) ---Testcase 402: -SELECT integral((fields->>'value1')::float) FROM s3 HAVING integral((fields->>'value1')::float) > 100; -ERROR: stub integral_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE --- select integral with having (explain) ---Testcase 403: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float, interval '1s') FROM s3 HAVING integral((fields->>'value1')::float, interval '1s') > 100; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Aggregate (cost=2214.93..2214.94 rows=1 width=8) - Output: integral(((fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval) - Filter: (integral(((s3.fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "s3" -(6 rows) - --- select integral with having (explain, not pushdown, stub call error) ---Testcase 404: -SELECT integral((fields->>'value1')::float, interval '1s') FROM s3 HAVING integral((fields->>'value1')::float, interval '1s') > 100; -ERROR: stub integral_sfunc(double precision, float8, interval) is called -CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision,interval) line 3 at RAISE --- select integral(*) (stub agg function, explain) ---Testcase 405: -EXPLAIN VERBOSE -SELECT integral_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (integral_all(*)) - InfluxDB query: SELECT integral(*) FROM "s3" -(3 rows) - --- select integral(*) (stub agg function, result) ---Testcase 406: -SELECT integral_all(*) from s3; - integral_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"5.5\",\"value2\" : \"750\",\"value3\" : \"-5.5\",\"value4\" : \"-750\" }") -(1 row) - --- select integral(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 407: -EXPLAIN VERBOSE -SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (integral_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT integral(*) FROM "s3" GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select integral(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 408: -SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - integral_all ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.15000000000000002\",\"value2\" : \"100\",\"value3\" : \"-0.15000000000000002\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.25\",\"value2\" : \"100\",\"value3\" : \"-0.25\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.75\",\"value2\" : \"200\",\"value3\" : \"-2.75\",\"value4\" : \"-200\" }") -(4 rows) - --- select integral(*) (stub agg function and group by tag only) (explain) ---Testcase 409: -EXPLAIN VERBOSE -SELECT integral_all(*) FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (integral_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT integral(*) FROM "s3" WHERE (("value1" > 0.299999999999999989)) GROUP BY ("tag1") -(3 rows) - --- select integral(*) (stub agg function and group by tag only) (result) ---Testcase 410: -SELECT integral_all(*) FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; - integral_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"4.4\",\"value2\" : \"400\",\"value3\" : \"-4.4\",\"value4\" : \"-400\" }") -(1 row) - --- select integral(*) (stub agg function, expose data, explain) ---Testcase 411: -EXPLAIN VERBOSE -SELECT (integral_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((integral_all(*)))::s3)."time", (((integral_all(*)))::s3).tags, (((integral_all(*)))::s3).fields - InfluxDB query: SELECT integral(*) FROM "s3" -(3 rows) - --- select integral(*) (stub agg function, expose data, result) ---Testcase 412: -SELECT (integral_all(*)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "5.5", "value2": "750", "value3": "-5.5", "value4": "-750"} -(1 row) - --- select integral(regex) (stub agg function, explain) ---Testcase 413: -EXPLAIN VERBOSE -SELECT integral('/value[1,4]/') from s3; - QUERY PLAN ------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (integral('/value[1,4]/'::text)) - InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" -(3 rows) - --- select integral(regex) (stub agg function, result) ---Testcase 414: -SELECT integral('/value[1,4]/') from s3; - integral -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"5.5\",\"value4\" : \"-750\" }") -(1 row) - --- select integral(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 415: -EXPLAIN VERBOSE -SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (integral('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT integral(/^v.*/) FROM "s3" GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select integral(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 416: -SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - integral ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.15000000000000002\",\"value2\" : \"100\",\"value3\" : \"-0.15000000000000002\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.25\",\"value2\" : \"100\",\"value3\" : \"-0.25\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.75\",\"value2\" : \"200\",\"value3\" : \"-2.75\",\"value4\" : \"-200\" }") -(4 rows) - --- select integral(regex) (stub agg function and group by tag only) (explain) ---Testcase 417: -EXPLAIN VERBOSE -SELECT integral('/value[1,4]/') FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (integral('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" WHERE (("value1" > 0.299999999999999989)) GROUP BY ("tag1") -(3 rows) - --- select integral(regex) (stub agg function and group by tag only) (result) ---Testcase 418: -SELECT integral('/value[1,4]/') FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; - integral -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"4.4\",\"value4\" : \"-400\" }") -(1 row) - --- select integral(regex) (stub agg function, expose data, explain) ---Testcase 419: -EXPLAIN VERBOSE -SELECT (integral('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((integral('/value[1,4]/'::text)))::s3)."time", (((integral('/value[1,4]/'::text)))::s3).tags, (((integral('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" -(3 rows) - --- select integral(regex) (stub agg function, expose data, result) ---Testcase 420: -SELECT (integral('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "5.5", "value4": "-750"} -(1 row) - --- select mean (stub agg function, explain) ---Testcase 421: -EXPLAIN VERBOSE -SELECT mean((fields->>'value1')::float),mean((fields->>'value2')::bigint),mean((fields->>'value3')::float),mean((fields->>'value4')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (mean(((fields ->> 'value1'::text))::double precision)), (mean(((fields ->> 'value2'::text))::bigint)), (mean(((fields ->> 'value3'::text))::double precision)), (mean(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT mean("value1"), mean("value2"), mean("value3"), mean("value4") FROM "s3" -(3 rows) - --- select mean (stub agg function, result) ---Testcase 422: -SELECT mean((fields->>'value1')::float),mean((fields->>'value2')::bigint),mean((fields->>'value3')::float),mean((fields->>'value4')::bigint) FROM s3; - mean | mean | mean | mean -------+------+------+------ - 1.2 | 150 | -1.2 | -150 -(1 row) - --- select mean (stub agg function, raise exception if not expected type) ---Testcase 423: -SELECT mean((fields->>'value1')::numeric),mean((fields->>'value2')::numeric),mean((fields->>'value3')::numeric),mean((fields->>'value4')::numeric) FROM s3; -ERROR: stub mean_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE --- select mean (stub agg function and group by influx_time() and tag) (explain) ---Testcase 424: -EXPLAIN VERBOSE -SELECT mean((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (mean(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT mean("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select mean (stub agg function and group by influx_time() and tag) (result) ---Testcase 425: -SELECT mean((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - mean | influx_time | tag1 -------+------------------------+------ - 0.1 | 1970-01-01 09:00:00+09 | a - 0.2 | 1970-01-01 09:00:01+09 | a - 0.3 | 1970-01-01 09:00:02+09 | a - | 1970-01-01 09:00:03+09 | a - | 1970-01-01 09:00:04+09 | a - | 1970-01-01 09:00:00+09 | b - | 1970-01-01 09:00:01+09 | b - | 1970-01-01 09:00:02+09 | b - 1.1 | 1970-01-01 09:00:03+09 | b - 2.2 | 1970-01-01 09:00:04+09 | b -(10 rows) - --- select mean (stub agg function and group by tag only) (result) ---Testcase 426: -SELECT tags->>'tag1' tag1,mean((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - tag1 | mean -------+------ - a | 0.2 - b | 1.65 -(2 rows) - --- select mean (stub agg function and other aggs) (result) ---Testcase 427: -SELECT sum((fields->>'value1')::float),mean((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; - sum | mean | count ------+------+------- - 7.2 | 1.2 | 6 -(1 row) - --- select mean over join query (explain) ---Testcase 428: -EXPLAIN VERBOSE -SELECT mean((t1.fields->>'value1')::float), mean((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------- - Aggregate (cost=39.87..39.88 rows=1 width=16) - Output: mean(((t1.fields ->> 'value1'::text))::double precision), mean(((t2.fields ->> 'value1'::text))::double precision) - -> Nested Loop (cost=20.00..14.63 rows=49 width=64) - Output: t1.fields, t2.fields - -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..7.04 rows=7 width=32) - Output: t2.fields - -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) - Output: t2.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select mean over join query (result, stub call error) ---Testcase 429: -SELECT mean((t1.fields->>'value1')::float), mean((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; -ERROR: stub mean_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE --- select mean with having (explain) ---Testcase 430: -EXPLAIN VERBOSE -SELECT mean((fields->>'value1')::float) FROM s3 HAVING mean((fields->>'value1')::float) > 100; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Aggregate (cost=2214.93..2214.94 rows=1 width=8) - Output: mean(((fields ->> 'value1'::text))::double precision) - Filter: (mean(((s3.fields ->> 'value1'::text))::double precision) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "s3" -(6 rows) - --- select mean with having (explain, not pushdown, stub call error) ---Testcase 431: -SELECT mean((fields->>'value1')::float) FROM s3 HAVING mean((fields->>'value1')::float) > 100; -ERROR: stub mean_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE --- select mean(*) (stub agg function, explain) ---Testcase 432: -EXPLAIN VERBOSE -SELECT mean_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (mean_all(*)) - InfluxDB query: SELECT mean(*) FROM "s3" -(3 rows) - --- select mean(*) (stub agg function, result) ---Testcase 433: -SELECT mean_all(*) from s3; - mean_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.2\",\"value2\" : \"150\",\"value3\" : \"-1.2\",\"value4\" : \"-150\" }") -(1 row) - --- select mean(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 434: -EXPLAIN VERBOSE -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (mean_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT mean(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select mean(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 435: -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - mean_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select mean(*) (stub agg function and group by tag only) (explain) ---Testcase 436: -EXPLAIN VERBOSE -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (mean_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT mean(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select mean(*) (stub agg function and group by tag only) (result) ---Testcase 437: -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - mean_all ----------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.20000000000000004\",\"value2\" : \"100\",\"value3\" : \"-0.20000000000000004\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") -(2 rows) - --- select mean(*) (stub agg function, expose data, explain) ---Testcase 438: -EXPLAIN VERBOSE -SELECT (mean_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((mean_all(*)))::s3)."time", (((mean_all(*)))::s3).tags, (((mean_all(*)))::s3).fields - InfluxDB query: SELECT mean(*) FROM "s3" -(3 rows) - --- select mean(*) (stub agg function, expose data, result) ---Testcase 439: -SELECT (mean_all(*)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "1.2", "value2": "150", "value3": "-1.2", "value4": "-150"} -(1 row) - --- select mean(regex) (stub agg function, explain) ---Testcase 440: -EXPLAIN VERBOSE -SELECT mean('/value[1,4]/') from s3; - QUERY PLAN -------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (mean('/value[1,4]/'::text)) - InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" -(3 rows) - --- select mean(regex) (stub agg function, result) ---Testcase 441: -SELECT mean('/value[1,4]/') from s3; - mean -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.2\",\"value4\" : \"-150\" }") -(1 row) - --- select mean(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 442: -EXPLAIN VERBOSE -SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (mean('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT mean(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select mean(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 443: -SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - mean --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select mean(regex) (stub agg function and group by tag only) (explain) ---Testcase 444: -EXPLAIN VERBOSE -SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (mean('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select mean(regex) (stub agg function and group by tag only) (result) ---Testcase 445: -SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - mean ------------------------------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.20000000000000004\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.6500000000000001\",\"value4\" : \"-200\" }") -(2 rows) - --- select mean(regex) (stub agg function, expose data, explain) ---Testcase 446: -EXPLAIN VERBOSE -SELECT (mean('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((mean('/value[1,4]/'::text)))::s3)."time", (((mean('/value[1,4]/'::text)))::s3).tags, (((mean('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" -(3 rows) - --- select mean(regex) (stub agg function, expose data, result) ---Testcase 447: -SELECT (mean('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "1.2", "value4": "-150"} -(1 row) - --- select median (stub agg function, explain) ---Testcase 448: -EXPLAIN VERBOSE -SELECT median((fields->>'value1')::float),median((fields->>'value2')::bigint),median((fields->>'value3')::float),median((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (median(((fields ->> 'value1'::text))::double precision)), (median(((fields ->> 'value2'::text))::bigint)), (median(((fields ->> 'value3'::text))::double precision)), (median(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT median("value1"), median("value2"), median("value3"), median("value4") FROM "s3" -(3 rows) - --- select median (stub agg function, result) ---Testcase 449: -SELECT median((fields->>'value1')::float),median((fields->>'value2')::bigint),median((fields->>'value3')::float),median((fields->>'value4')::bigint) FROM s3; - median | median | median | median ---------+--------+--------+-------- - 0.7 | 150 | -0.7 | -150 -(1 row) - --- select median (stub agg function, raise exception if not expected type) ---Testcase 450: -SELECT median((fields->>'value1')::numeric),median((fields->>'value2')::numeric),median((fields->>'value3')::numeric),median((fields->>'value4')::numeric) FROM s3; -ERROR: stub median_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE --- select median (stub agg function and group by influx_time() and tag) (explain) ---Testcase 451: -EXPLAIN VERBOSE -SELECT median((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (median(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT median("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select median (stub agg function and group by influx_time() and tag) (result) ---Testcase 452: -SELECT median((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - median | influx_time | tag1 ---------+------------------------+------ - 0.1 | 1970-01-01 09:00:00+09 | a - 0.2 | 1970-01-01 09:00:01+09 | a - 0.3 | 1970-01-01 09:00:02+09 | a - | 1970-01-01 09:00:03+09 | a - | 1970-01-01 09:00:04+09 | a - | 1970-01-01 09:00:00+09 | b - | 1970-01-01 09:00:01+09 | b - | 1970-01-01 09:00:02+09 | b - 1.1 | 1970-01-01 09:00:03+09 | b - 2.2 | 1970-01-01 09:00:04+09 | b -(10 rows) - --- select median (stub agg function and group by tag only) (result) ---Testcase 453: -SELECT tags->>'tag1' tag1,median((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - tag1 | median -------+-------- - a | 0.2 - b | 1.65 -(2 rows) - --- select median (stub agg function and other aggs) (result) ---Testcase 454: -SELECT sum((fields->>'value1')::float),median((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; - sum | median | count ------+--------+------- - 7.2 | 0.7 | 6 -(1 row) - --- select median over join query (explain) ---Testcase 455: -EXPLAIN VERBOSE -SELECT median((t1.fields->>'value1')::float), median((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------- - Aggregate (cost=39.87..39.88 rows=1 width=16) - Output: median(((t1.fields ->> 'value1'::text))::double precision), median(((t2.fields ->> 'value1'::text))::double precision) - -> Nested Loop (cost=20.00..14.63 rows=49 width=64) - Output: t1.fields, t2.fields - -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..7.04 rows=7 width=32) - Output: t2.fields - -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) - Output: t2.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select median over join query (result, stub call error) ---Testcase 456: -SELECT median((t1.fields->>'value1')::float), median((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; -ERROR: stub median_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE --- select median with having (explain) ---Testcase 457: -EXPLAIN VERBOSE -SELECT median((fields->>'value1')::float) FROM s3 HAVING median((fields->>'value1')::float) > 100; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Aggregate (cost=2214.93..2214.94 rows=1 width=8) - Output: median(((fields ->> 'value1'::text))::double precision) - Filter: (median(((s3.fields ->> 'value1'::text))::double precision) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "s3" -(6 rows) - --- select median with having (explain, not pushdown, stub call error) ---Testcase 458: -SELECT median((fields->>'value1')::float) FROM s3 HAVING median((fields->>'value1')::float) > 100; -ERROR: stub median_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE --- select median(*) (stub agg function, explain) ---Testcase 459: -EXPLAIN VERBOSE -SELECT median_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (median_all(*)) - InfluxDB query: SELECT median(*) FROM "s3" -(3 rows) - --- select median(*) (stub agg function, result) ---Testcase 460: -SELECT median_all(*) from s3; - median_all ------------------------------------------------------------------------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.7\",\"value2\" : \"150\",\"value3\" : \"-0.7000000000000001\",\"value4\" : \"-150\" }") -(1 row) - --- select median(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 461: -EXPLAIN VERBOSE -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (median_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT median(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select median(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 462: -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - median_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select median(*) (stub agg function and group by tag only) (explain) ---Testcase 463: -EXPLAIN VERBOSE -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (median_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT median(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select median(*) (stub agg function and group by tag only) (result) ---Testcase 464: -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - median_all --------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") -(2 rows) - --- select median(*) (stub agg function, expose data, explain) ---Testcase 465: -EXPLAIN VERBOSE -SELECT (median_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((median_all(*)))::s3)."time", (((median_all(*)))::s3).tags, (((median_all(*)))::s3).fields - InfluxDB query: SELECT median(*) FROM "s3" -(3 rows) - --- select median(*) (stub agg function, expose data, result) ---Testcase 466: -SELECT (median_all(*)::s3).* from s3; - time | tags | fields -------------------------+------+--------------------------------------------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0.7", "value2": "150", "value3": "-0.7000000000000001", "value4": "-150"} -(1 row) - --- select median(regex) (stub agg function, explain) ---Testcase 467: -EXPLAIN VERBOSE -SELECT median('/^v.*/') from s3; - QUERY PLAN ---------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (median('/^v.*/'::text)) - InfluxDB query: SELECT median(/^v.*/) FROM "s3" -(3 rows) - --- select median(regex) (stub agg function, result) ---Testcase 468: -SELECT median('/^v.*/') from s3; - median ------------------------------------------------------------------------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.7\",\"value2\" : \"150\",\"value3\" : \"-0.7000000000000001\",\"value4\" : \"-150\" }") -(1 row) - --- select median(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 469: -EXPLAIN VERBOSE -SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (median('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT median(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select median(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 470: -SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - median --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select median(regex) (stub agg function and group by tag only) (explain) ---Testcase 471: -EXPLAIN VERBOSE -SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (median('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT median(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select median(regex) (stub agg function and group by tag only) (result) ---Testcase 472: -SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - median ----------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.6500000000000001\",\"value4\" : \"-200\" }") -(2 rows) - --- select median(regex) (stub agg function, expose data, explain) ---Testcase 473: -EXPLAIN VERBOSE -SELECT (median('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((median('/value[1,4]/'::text)))::s3)."time", (((median('/value[1,4]/'::text)))::s3).tags, (((median('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT median(/value[1,4]/) FROM "s3" -(3 rows) - --- select median(regex) (stub agg function, expose data, result) ---Testcase 474: -SELECT (median('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0.7", "value4": "-150"} -(1 row) - --- select influx_mode (stub agg function, explain) ---Testcase 475: -EXPLAIN VERBOSE -SELECT influx_mode((fields->>'value1')::float),influx_mode((fields->>'value2')::bigint),influx_mode((fields->>'value3')::float),influx_mode((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_mode(((fields ->> 'value1'::text))::double precision)), (influx_mode(((fields ->> 'value2'::text))::bigint)), (influx_mode(((fields ->> 'value3'::text))::double precision)), (influx_mode(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT mode("value1"), mode("value2"), mode("value3"), mode("value4") FROM "s3" -(3 rows) - --- select influx_mode (stub agg function, result) ---Testcase 476: -SELECT influx_mode((fields->>'value1')::float),influx_mode((fields->>'value2')::bigint),influx_mode((fields->>'value3')::float),influx_mode((fields->>'value4')::bigint) FROM s3; - influx_mode | influx_mode | influx_mode | influx_mode --------------+-------------+-------------+------------- - 0.1 | 100 | -3.3 | -100 -(1 row) - --- select influx_mode (stub agg function, raise exception if not expected type) ---Testcase 477: -SELECT influx_mode((fields->>'value1')::numeric),influx_mode((fields->>'value2')::numeric),influx_mode((fields->>'value3')::numeric),influx_mode((fields->>'value4')::numeric) FROM s3; - influx_mode | influx_mode | influx_mode | influx_mode --------------+-------------+-------------+------------- - 0.1 | 100 | -3.3 | -100 -(1 row) - --- select influx_mode (stub agg function and group by influx_time() and tag) (explain) ---Testcase 478: -EXPLAIN VERBOSE -SELECT influx_mode((fields->>'value1')::numeric),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_mode(((fields ->> 'value1'::text))::numeric)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT mode("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select influx_mode (stub agg function and group by influx_time() and tag) (result) ---Testcase 479: -SELECT influx_mode((fields->>'value1')::numeric),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_mode | influx_time | tag1 --------------+------------------------+------ - 0.1 | 1970-01-01 09:00:00+09 | a - 0.2 | 1970-01-01 09:00:01+09 | a - 0.3 | 1970-01-01 09:00:02+09 | a - | 1970-01-01 09:00:03+09 | a - | 1970-01-01 09:00:04+09 | a - | 1970-01-01 09:00:00+09 | b - | 1970-01-01 09:00:01+09 | b - | 1970-01-01 09:00:02+09 | b - 1.1 | 1970-01-01 09:00:03+09 | b - 2.2 | 1970-01-01 09:00:04+09 | b -(10 rows) - --- select influx_mode (stub agg function and group by tag only) (result) ---Testcase 480: -SELECT tags->>'tag1' tag1,influx_mode((fields->>'value1')::numeric) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - tag1 | influx_mode -------+------------- - a | 0.1 - b | 1.1 -(2 rows) - --- select influx_mode (stub agg function and other aggs) (result) ---Testcase 481: -SELECT sum((fields->>'value1')::float),influx_mode((fields->>'value1')::numeric),count((fields->>'value1')::float) FROM s3; - sum | influx_mode | count ------+-------------+------- - 7.2 | 0.1 | 6 -(1 row) - --- select influx_mode over join query (explain) ---Testcase 482: -EXPLAIN VERBOSE -SELECT influx_mode((t1.fields->>'value1')::float), influx_mode((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate (cost=39.87..39.88 rows=1 width=16) - Output: influx_mode(((t1.fields ->> 'value1'::text))::double precision), influx_mode(((t2.fields ->> 'value1'::text))::double precision) - -> Nested Loop (cost=20.00..14.63 rows=49 width=64) - Output: t1.fields, t2.fields - -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..7.04 rows=7 width=32) - Output: t2.fields - -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) - Output: t2.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select influx_mode over join query (result, stub call error) ---Testcase 483: -SELECT influx_mode((t1.fields->>'value1')::float), influx_mode((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; -ERROR: stub influx_mode_sfunc(anyelement, anyelement) is called -CONTEXT: PL/pgSQL function influx_mode_sfunc(anyelement,anyelement) line 3 at RAISE --- select influx_mode with having (explain) ---Testcase 484: -EXPLAIN VERBOSE -SELECT influx_mode((fields->>'value1')::float) FROM s3 HAVING influx_mode((fields->>'value1')::float) > 100; - QUERY PLAN -------------------------------------------------------------------------------------------------------- - Aggregate (cost=2214.93..2214.94 rows=1 width=8) - Output: influx_mode(((fields ->> 'value1'::text))::double precision) - Filter: (influx_mode(((s3.fields ->> 'value1'::text))::double precision) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "s3" -(6 rows) - --- select influx_mode with having (explain, not pushdown, stub call error) ---Testcase 485: -SELECT influx_mode((fields->>'value1')::float) FROM s3 HAVING influx_mode((fields->>'value1')::float) > 100; -ERROR: stub influx_mode_sfunc(anyelement, anyelement) is called -CONTEXT: PL/pgSQL function influx_mode_sfunc(anyelement,anyelement) line 3 at RAISE --- select influx_mode(*) (stub agg function, explain) ---Testcase 486: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_mode_all(*)) - InfluxDB query: SELECT mode(*) FROM "s3" -(3 rows) - --- select influx_mode(*) (stub agg function, result) ---Testcase 487: -SELECT influx_mode_all(*) from s3; - influx_mode_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-3.3\",\"value4\" : \"-100\" }") -(1 row) - --- select influx_mode(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 488: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_mode_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT mode(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select influx_mode(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 489: -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_mode_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select influx_mode(*) (stub agg function and group by tag only) (explain) ---Testcase 490: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_mode_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT mode(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select influx_mode(*) (stub agg function and group by tag only) (result) ---Testcase 491: -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - influx_mode_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(2 rows) - --- select influx_mode(*) (stub agg function, expose data, explain) ---Testcase 492: -EXPLAIN VERBOSE -SELECT (influx_mode_all(*)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_mode_all(*)))::s3)."time", (((influx_mode_all(*)))::s3).tags, (((influx_mode_all(*)))::s3).fields - InfluxDB query: SELECT mode(*) FROM "s3" -(3 rows) - --- select influx_mode(*) (stub agg function, expose data, result) ---Testcase 493: -SELECT (influx_mode_all(*)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value2": "100", "value3": "-3.3", "value4": "-100"} -(1 row) - --- select influx_mode(regex) (stub function, explain) ---Testcase 494: -EXPLAIN VERBOSE -SELECT influx_mode('/value[1,4]/') from s3; - QUERY PLAN -------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_mode('/value[1,4]/'::text)) - InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_mode(regex) (stub function, result) ---Testcase 495: -SELECT influx_mode('/value[1,4]/') from s3; - influx_mode -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") -(1 row) - --- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 496: -EXPLAIN VERBOSE -SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_mode('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT mode(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 497: -SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_mode --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select influx_mode(regex) (stub agg function and group by tag only) (explain) ---Testcase 498: -EXPLAIN VERBOSE -SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_mode('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select influx_mode(regex) (stub agg function and group by tag only) (result) ---Testcase 499: -SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - influx_mode -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") -(2 rows) - --- select influx_mode(regex) (stub agg function, expose data, explain) ---Testcase 500: -EXPLAIN VERBOSE -SELECT (influx_mode('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_mode('/value[1,4]/'::text)))::s3)."time", (((influx_mode('/value[1,4]/'::text)))::s3).tags, (((influx_mode('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_mode(regex) (stub agg function, expose data, result) ---Testcase 501: -SELECT (influx_mode('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value4": "-100"} -(1 row) - --- select stddev (agg function, explain) ---Testcase 502: -EXPLAIN VERBOSE -SELECT stddev((fields->>'value1')::float),stddev((fields->>'value2')::bigint),stddev((fields->>'value3')::float),stddev((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=80) - Output: (stddev(((fields ->> 'value1'::text))::double precision)), (stddev(((fields ->> 'value2'::text))::bigint)), (stddev(((fields ->> 'value3'::text))::double precision)), (stddev(((fields ->> 'value4'::text))::bigint)) - InfluxDB query: SELECT stddev("value1"), stddev("value2"), stddev("value3"), stddev("value4") FROM "s3" -(3 rows) - --- select stddev (agg function, result) ---Testcase 503: -SELECT stddev((fields->>'value1')::float),stddev((fields->>'value2')::bigint),stddev((fields->>'value3')::float),stddev((fields->>'value4')::bigint) FROM s3; - stddev | stddev | stddev | stddev -------------------+--------------------+------------------+-------------------- - 1.29923054151294 | 54.772255750516614 | 1.29923054151294 | 54.772255750516614 -(1 row) - --- select stddev (agg function and group by influx_time() and tag) (explain) ---Testcase 504: -EXPLAIN VERBOSE -SELECT stddev((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (stddev(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT stddev("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select stddev (agg function and group by influx_time() and tag) (result) ---Testcase 505: -SELECT stddev((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - stddev | influx_time | tag1 ---------+------------------------+------ - | 1970-01-01 09:00:00+09 | a - | 1970-01-01 09:00:01+09 | a - | 1970-01-01 09:00:02+09 | a - | 1970-01-01 09:00:03+09 | a - | 1970-01-01 09:00:04+09 | a - | 1970-01-01 09:00:00+09 | b - | 1970-01-01 09:00:01+09 | b - | 1970-01-01 09:00:02+09 | b - | 1970-01-01 09:00:03+09 | b - | 1970-01-01 09:00:04+09 | b -(10 rows) - --- select stddev (agg function and group by tag only) (result) ---Testcase 506: -SELECT tags->>'tag1' tag1,stddev((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - tag1 | stddev -------+------------------- - a | 0.1 - b | 0.777817459305202 -(2 rows) - --- select stddev (agg function and other aggs) (result) ---Testcase 507: -SELECT sum((fields->>'value1')::float),stddev((fields->>'value1')::float),count(fields->>'value1') FROM s3; - sum | stddev | count ------+------------------+------- - 7.2 | 1.29923054151294 | 6 -(1 row) - --- select stddev(*) (stub agg function, explain) ---Testcase 508: -EXPLAIN VERBOSE -SELECT stddev_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (stddev_all(*)) - InfluxDB query: SELECT stddev(*) FROM "s3" -(3 rows) - --- select stddev(*) (stub agg function, result) ---Testcase 509: -SELECT stddev_all(*) from s3; - stddev_all ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.299230541512937\",\"value2\" : \"54.772255750516614\",\"value3\" : \"1.299230541512937\",\"value4\" : \"54.772255750516614\" }") -(1 row) - --- select stddev(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 510: -EXPLAIN VERBOSE -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (stddev_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT stddev(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select stddev(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 511: -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - stddev_all ------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") -(10 rows) - --- select stddev(*) (stub agg function and group by tag only) (explain) ---Testcase 512: -EXPLAIN VERBOSE -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (stddev_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT stddev(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select stddev(*) (stub agg function and group by tag only) (result) ---Testcase 513: -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - stddev_all ----------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.09999999999999999\",\"value2\" : \"0\",\"value3\" : \"0.09999999999999999\",\"value4\" : \"0\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.7778174593052023\",\"value2\" : \"0\",\"value3\" : \"0.7778174593052023\",\"value4\" : \"0\" }") -(2 rows) - --- select stddev(regex) (stub function, explain) ---Testcase 514: -EXPLAIN VERBOSE -SELECT stddev('/value[1,4]/') from s3; - QUERY PLAN ---------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (stddev('/value[1,4]/'::text)) - InfluxDB query: SELECT stddev(/value[1,4]/) FROM "s3" -(3 rows) - --- select stddev(regex) (stub function, result) ---Testcase 515: -SELECT stddev('/value[1,4]/') from s3; - stddev ------------------------------------------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.299230541512937\",\"value4\" : \"54.772255750516614\" }") -(1 row) - --- select stddev(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 516: -EXPLAIN VERBOSE -SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (stddev('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT stddev(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select stddev(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 517: -SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - stddev ------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") -(10 rows) - --- select stddev(regex) (stub agg function and group by tag only) (explain) ---Testcase 518: -EXPLAIN VERBOSE -SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (stddev('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT stddev(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select stddev(regex) (stub agg function and group by tag only) (result) ---Testcase 519: -SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - stddev --------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.09999999999999999\",\"value4\" : \"0\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.7778174593052023\",\"value4\" : \"0\" }") -(2 rows) - --- select influx_sum(*) (stub agg function, explain) ---Testcase 520: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_sum_all(*)) - InfluxDB query: SELECT sum(*) FROM "s3" -(3 rows) - --- select influx_sum(*) (stub agg function, result) ---Testcase 521: -SELECT influx_sum_all(*) from s3; - influx_sum_all ------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"7.199999999999999\",\"value2\" : \"900\",\"value3\" : \"-7.199999999999999\",\"value4\" : \"-900\" }") -(1 row) - --- select influx_sum(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 522: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_sum_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select influx_sum(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 523: -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_sum_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select influx_sum(*) (stub agg function and group by tag only) (explain) ---Testcase 524: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_sum_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select influx_sum(*) (stub agg function and group by tag only) (result) ---Testcase 525: -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - influx_sum_all --------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.6000000000000001\",\"value2\" : \"300\",\"value3\" : \"-0.6000000000000001\",\"value4\" : \"-300\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3000000000000003\",\"value2\" : \"400\",\"value3\" : \"-3.3000000000000003\",\"value4\" : \"-400\" }") -(2 rows) - --- select influx_sum(*) (stub agg function, expose data, explain) ---Testcase 526: -EXPLAIN VERBOSE -SELECT (influx_sum_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_sum_all(*)))::s3)."time", (((influx_sum_all(*)))::s3).tags, (((influx_sum_all(*)))::s3).fields - InfluxDB query: SELECT sum(*) FROM "s3" -(3 rows) - --- select influx_sum(*) (stub agg function, expose data, result) ---Testcase 527: -SELECT (influx_sum_all(*)::s3).* from s3; - time | tags | fields -------------------------+------+---------------------------------------------------------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "7.199999999999999", "value2": "900", "value3": "-7.199999999999999", "value4": "-900"} -(1 row) - --- select influx_sum(regex) (stub function, explain) ---Testcase 528: -EXPLAIN VERBOSE -SELECT influx_sum('/value[1,4]/') from s3; - QUERY PLAN ------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_sum('/value[1,4]/'::text)) - InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_sum(regex) (stub function, result) ---Testcase 529: -SELECT influx_sum('/value[1,4]/') from s3; - influx_sum ---------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"7.199999999999999\",\"value4\" : \"-900\" }") -(1 row) - --- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 530: -EXPLAIN VERBOSE -SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_sum('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 531: -SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_sum --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select influx_sum(regex) (stub agg function and group by tag only) (explain) ---Testcase 532: -EXPLAIN VERBOSE -SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_sum('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select influx_sum(regex) (stub agg function and group by tag only) (result) ---Testcase 533: -SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - influx_sum ----------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.6000000000000001\",\"value4\" : \"-300\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3000000000000003\",\"value4\" : \"-400\" }") -(2 rows) - --- select influx_sum(regex) (stub agg function, expose data, explain) ---Testcase 534: -EXPLAIN VERBOSE -SELECT (influx_sum('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_sum('/value[1,4]/'::text)))::s3)."time", (((influx_sum('/value[1,4]/'::text)))::s3).tags, (((influx_sum('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_sum(regex) (stub agg function, expose data, result) ---Testcase 535: -SELECT (influx_sum('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+--------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "7.199999999999999", "value4": "-900"} -(1 row) - --- selector function bottom() (explain) ---Testcase 536: -EXPLAIN VERBOSE -SELECT bottom((fields->>'value1')::float, 1) FROM s3; - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1838.47 rows=1462 width=8) - Output: (bottom(((fields ->> 'value1'::text))::double precision, 1)) - InfluxDB query: SELECT bottom("value1", 1) FROM "s3" -(3 rows) - --- selector function bottom() (result) ---Testcase 537: -SELECT bottom((fields->>'value1')::float, 1) FROM s3; - bottom --------- - 0.1 -(1 row) - --- selector function bottom() cannot be combined with other functions(explain) ---Testcase 538: -EXPLAIN VERBOSE -SELECT bottom((fields->>'value1')::float, 1), bottom((fields->>'value2')::bigint, 1), bottom((fields->>'value3')::float, 1), bottom((fields->>'value4')::bigint, 1) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (bottom(((fields ->> 'value1'::text))::double precision, 1)), (bottom(((fields ->> 'value2'::text))::bigint, 1)), (bottom(((fields ->> 'value3'::text))::double precision, 1)), (bottom(((fields ->> 'value4'::text))::bigint, 1)) - InfluxDB query: SELECT bottom("value1", 1), bottom("value2", 1), bottom("value3", 1), bottom("value4", 1) FROM "s3" -(3 rows) - --- selector function bottom() cannot be combined with other functions(result) ---Testcase 539: -SELECT bottom((fields->>'value1')::float, 1), bottom((fields->>'value2')::bigint, 1), bottom((fields->>'value3')::float, 1), bottom((fields->>'value4')::bigint, 1) FROM s3; -ERROR: influxdb_fdw : selector function bottom() cannot be combined with other functions --- select influx_max(*) (stub agg function, explain) ---Testcase 540: -EXPLAIN VERBOSE -SELECT influx_max_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_max_all(*)) - InfluxDB query: SELECT max(*) FROM "s3" -(3 rows) - --- select influx_max(*) (stub agg function, result) ---Testcase 541: -SELECT influx_max_all(*) from s3; - influx_max_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3\",\"value2\" : \"200\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") -(1 row) - --- select influx_max(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 542: -EXPLAIN VERBOSE -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_max_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT max(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select influx_max(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 543: -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_max_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select influx_max(*) (stub agg function and group by tag only) (explain) ---Testcase 544: -EXPLAIN VERBOSE -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_max_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT max(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select influx_max(*) (stub agg function and group by tag only) (result) ---Testcase 545: -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - influx_max_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") -(2 rows) - --- select influx_max(*) (stub agg function, expose data, explain) ---Testcase 546: -EXPLAIN VERBOSE -SELECT (influx_max_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_max_all(*)))::s3)."time", (((influx_max_all(*)))::s3).tags, (((influx_max_all(*)))::s3).fields - InfluxDB query: SELECT max(*) FROM "s3" -(3 rows) - --- select influx_max(*) (stub agg function, expose data, result) ---Testcase 547: -SELECT (influx_max_all(*)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "3.3", "value2": "200", "value3": "-0.1", "value4": "-100"} -(1 row) - --- select influx_max(regex) (stub function, explain) ---Testcase 548: -EXPLAIN VERBOSE -SELECT influx_max('/value[1,4]/') from s3; - QUERY PLAN ------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_max('/value[1,4]/'::text)) - InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_max(regex) (stub function, result) ---Testcase 549: -SELECT influx_max('/value[1,4]/') from s3; - influx_max -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3\",\"value4\" : \"-100\" }") -(1 row) - --- select influx_max(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 550: -EXPLAIN VERBOSE -SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_max('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT max(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select influx_max(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 551: -SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_max --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select influx_max(regex) (stub agg function and group by tag only) (explain) ---Testcase 552: -EXPLAIN VERBOSE -SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_max('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select influx_max(regex) (stub agg function and group by tag only) (result) ---Testcase 553: -SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - influx_max -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"2.2\",\"value4\" : \"-200\" }") -(2 rows) - --- select influx_max(regex) (stub agg function, expose data, explain) ---Testcase 554: -EXPLAIN VERBOSE -SELECT (influx_max('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_max('/value[1,4]/'::text)))::s3)."time", (((influx_max('/value[1,4]/'::text)))::s3).tags, (((influx_max('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_max(regex) (stub agg function, expose data, result) ---Testcase 555: -SELECT (influx_max('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "3.3", "value4": "-100"} -(1 row) - --- select influx_min(*) (stub agg function, explain) ---Testcase 556: -EXPLAIN VERBOSE -SELECT influx_min_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_min_all(*)) - InfluxDB query: SELECT min(*) FROM "s3" -(3 rows) - --- select influx_min(*) (stub agg function, result) ---Testcase 557: -SELECT influx_min_all(*) from s3; - influx_min_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-3.3\",\"value4\" : \"-200\" }") -(1 row) - --- select influx_min(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 558: -EXPLAIN VERBOSE -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_min_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT min(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select influx_min(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 559: -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_min_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select influx_min(*) (stub agg function and group by tag only) (explain) ---Testcase 560: -EXPLAIN VERBOSE -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_min_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT min(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select influx_min(*) (stub agg function and group by tag only) (result) ---Testcase 561: -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - influx_min_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(2 rows) - --- select influx_min(*) (stub agg function, expose data, explain) ---Testcase 562: -EXPLAIN VERBOSE -SELECT (influx_min_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_min_all(*)))::s3)."time", (((influx_min_all(*)))::s3).tags, (((influx_min_all(*)))::s3).fields - InfluxDB query: SELECT min(*) FROM "s3" -(3 rows) - --- select influx_min(*) (stub agg function, expose data, result) ---Testcase 563: -SELECT (influx_min_all(*)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value2": "100", "value3": "-3.3", "value4": "-200"} -(1 row) - --- select influx_min(regex) (stub function, explain) ---Testcase 564: -EXPLAIN VERBOSE -SELECT influx_min('/value[1,4]/') from s3; - QUERY PLAN ------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_min('/value[1,4]/'::text)) - InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_min(regex) (stub function, result) ---Testcase 565: -SELECT influx_min('/value[1,4]/') from s3; - influx_min -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-200\" }") -(1 row) - --- select influx_min(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 566: -EXPLAIN VERBOSE -SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_min('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT min(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select influx_min(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 567: -SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_min --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select influx_min(regex) (stub agg function and group by tag only) (explain) ---Testcase 568: -EXPLAIN VERBOSE -SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_min('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select influx_min(regex) (stub agg function and group by tag only) (result) ---Testcase 569: -SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - influx_min -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") -(2 rows) - --- select influx_min(regex) (stub agg function, expose data, explain) ---Testcase 570: -EXPLAIN VERBOSE -SELECT (influx_min('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_min('/value[1,4]/'::text)))::s3)."time", (((influx_min('/value[1,4]/'::text)))::s3).tags, (((influx_min('/value[1,4]/'::text)))::s3).fields - InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_min(regex) (stub agg function, expose data, result) ---Testcase 571: -SELECT (influx_min('/value[1,4]/')::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value4": "-200"} -(1 row) - --- selector function percentile() (explain) ---Testcase 572: -EXPLAIN VERBOSE -SELECT percentile((fields->>'value1')::float, 50), percentile((fields->>'value2')::bigint, 60), percentile((fields->>'value3')::float, 25), percentile((fields->>'value4')::bigint, 33) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (percentile(((fields ->> 'value1'::text))::double precision, 50)), (percentile(((fields ->> 'value2'::text))::bigint, 60)), (percentile(((fields ->> 'value3'::text))::double precision, 25)), (percentile(((fields ->> 'value4'::text))::bigint, 33)) - InfluxDB query: SELECT percentile("value1", 50), percentile("value2", 60), percentile("value3", 25), percentile("value4", 33) FROM "s3" -(3 rows) - --- selector function percentile() (result) ---Testcase 573: -SELECT percentile((fields->>'value1')::float, 50), percentile((fields->>'value2')::bigint, 60), percentile((fields->>'value3')::float, 25), percentile((fields->>'value4')::bigint, 33) FROM s3; - percentile | percentile | percentile | percentile -------------+------------+------------+------------ - 0.3 | 200 | -2.2 | -200 -(1 row) - --- selector function percentile() (explain) ---Testcase 574: -EXPLAIN VERBOSE -SELECT percentile((fields->>'value1')::float, 1.5), percentile((fields->>'value2')::bigint, 6.7), percentile((fields->>'value3')::float, 20.5), percentile((fields->>'value4')::bigint, 75.2) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (percentile(((fields ->> 'value1'::text))::double precision, '1.5'::double precision)), (percentile(((fields ->> 'value2'::text))::bigint, '6.7'::double precision)), (percentile(((fields ->> 'value3'::text))::double precision, '20.5'::double precision)), (percentile(((fields ->> 'value4'::text))::bigint, '75.2'::double precision)) - InfluxDB query: SELECT percentile("value1", 1.5), percentile("value2", 6.7), percentile("value3", 20.5), percentile("value4", 75.2) FROM "s3" -(3 rows) - --- selector function percentile() (result) ---Testcase 575: -SELECT percentile((fields->>'value1')::float, 1.5), percentile((fields->>'value2')::bigint, 6.7), percentile((fields->>'value3')::float, 20.5), percentile((fields->>'value4')::bigint, 75.2) FROM s3; - percentile | percentile | percentile | percentile -------------+------------+------------+------------ - | | -3.3 | -100 -(1 row) - --- select percentile(*, int) (stub agg function, explain) ---Testcase 576: -EXPLAIN VERBOSE -SELECT percentile_all(50) from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (percentile_all(50)) - InfluxDB query: SELECT percentile(*, 50) FROM "s3" -(3 rows) - --- select percentile(*, int) (stub agg function, result) ---Testcase 577: -SELECT percentile_all(50) from s3; - percentile_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") -(1 row) - --- select percentile(*, float8) (stub agg function, explain) ---Testcase 578: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (percentile_all('70.5'::double precision)) - InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" -(3 rows) - --- select percentile(*, float8) (stub agg function, result) ---Testcase 579: -SELECT percentile_all(70.5) from s3; - percentile_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") -(1 row) - --- select percentile(*, int) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 580: -EXPLAIN VERBOSE -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (percentile_all(50)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT percentile(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select percentile(*, int) (stub agg function and group by influx_time() and tag) (result) ---Testcase 581: -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - percentile_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 582: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (percentile_all('70.5'::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (result) ---Testcase 583: -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - percentile_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select percentile(*, int) (stub agg function and group by tag only) (explain) ---Testcase 584: -EXPLAIN VERBOSE -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (percentile_all(50)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT percentile(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select percentile(*, int) (stub agg function and group by tag only) (result) ---Testcase 585: -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - percentile_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(2 rows) - --- select percentile(*, float8) (stub agg function and group by tag only) (explain) ---Testcase 586: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (percentile_all('70.5'::double precision)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select percentile(*, float8) (stub agg function and group by tag only) (result) ---Testcase 587: -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - percentile_all --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(2 rows) - --- select percentile(*, int) (stub agg function, expose data, explain) ---Testcase 588: -EXPLAIN VERBOSE -SELECT (percentile_all(50)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((percentile_all(50)))::s3)."time", (((percentile_all(50)))::s3).tags, (((percentile_all(50)))::s3).fields - InfluxDB query: SELECT percentile(*, 50) FROM "s3" -(3 rows) - --- select percentile(*, int) (stub agg function, expose data, result) ---Testcase 589: -SELECT (percentile_all(50)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "0.3", "value2": "100", "value3": "-1.1", "value4": "-200"} -(1 row) - --- select percentile(*, int) (stub agg function, expose data, explain) ---Testcase 590: -EXPLAIN VERBOSE -SELECT (percentile_all(70.5)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((percentile_all('70.5'::double precision)))::s3)."time", (((percentile_all('70.5'::double precision)))::s3).tags, (((percentile_all('70.5'::double precision)))::s3).fields - InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" -(3 rows) - --- select percentile(*, int) (stub agg function, expose data, result) ---Testcase 591: -SELECT (percentile_all(70.5)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "1.1", "value2": "200", "value3": "-0.3", "value4": "-100"} -(1 row) - --- select percentile(regex) (stub function, explain) ---Testcase 592: -EXPLAIN VERBOSE -SELECT percentile('/value[1,4]/', 50) from s3; - QUERY PLAN ------------------------------------------------------------------ - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (percentile('/value[1,4]/'::text, 50)) - InfluxDB query: SELECT percentile(/value[1,4]/, 50) FROM "s3" -(3 rows) - --- select percentile(regex) (stub function, result) ---Testcase 593: -SELECT percentile('/value[1,4]/', 50) from s3; - percentile -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.3\",\"value4\" : \"-200\" }") -(1 row) - --- select percentile(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 594: -EXPLAIN VERBOSE -SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (percentile('/^v.*/'::text, 50)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT percentile(/^v.*/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select percentile(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 595: -SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - percentile --------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") -(10 rows) - --- select percentile(regex) (stub agg function and group by tag only) (explain) ---Testcase 596: -EXPLAIN VERBOSE -SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (percentile('/value[1,4]/'::text, '70.5'::double precision)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT percentile(/value[1,4]/, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select percentile(regex) (stub agg function and group by tag only) (result) ---Testcase 597: -SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - percentile -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.2\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") -(2 rows) - --- select percentile(regex) (stub agg function, expose data, explain) ---Testcase 598: -EXPLAIN VERBOSE -SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((percentile('/value[1,4]/'::text, 50)))::s3)."time", (((percentile('/value[1,4]/'::text, 50)))::s3).tags, (((percentile('/value[1,4]/'::text, 50)))::s3).fields - InfluxDB query: SELECT percentile(/value[1,4]/, 50) FROM "s3" -(3 rows) - --- select percentile(regex) (stub agg function, expose data, result) ---Testcase 599: -SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0.3", "value4": "-200"} -(1 row) - --- select percentile(regex) (stub agg function, expose data, explain) ---Testcase 600: -EXPLAIN VERBOSE -SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((percentile('/value[1,4]/'::text, '70.5'::double precision)))::s3)."time", (((percentile('/value[1,4]/'::text, '70.5'::double precision)))::s3).tags, (((percentile('/value[1,4]/'::text, '70.5'::double precision)))::s3).fields - InfluxDB query: SELECT percentile(/value[1,4]/, 70.5) FROM "s3" -(3 rows) - --- select percentile(regex) (stub agg function, expose data, result) ---Testcase 601: -SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "1.1", "value4": "-100"} -(1 row) - --- selector function top(field_key,N) (explain) ---Testcase 602: -EXPLAIN VERBOSE -SELECT top((fields->>'value1')::float, 1) FROM s3; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan (cost=10.00..1838.47 rows=1462 width=8) - Output: (top(((fields ->> 'value1'::text))::double precision, 1)) - InfluxDB query: SELECT top("value1", 1) FROM "s3" -(3 rows) - --- selector function top(field_key,N) (result) ---Testcase 603: -SELECT top((fields->>'value1')::float, 1) FROM s3; - top ------ - 3.3 -(1 row) - --- selector function top(field_key,tag_key(s),N) (explain) ---Testcase 604: -EXPLAIN VERBOSE -SELECT top((fields->>'value1')::float, tags->>'tag1', 1) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1171.80 rows=930 width=8) - Output: (top(((fields ->> 'value1'::text))::double precision, (tags ->> 'tag1'::text), 1)) - InfluxDB query: SELECT top("value1", "tag1", 1) FROM "s3" -(3 rows) - --- selector function top(field_key,tag_key(s),N) (result) ---Testcase 605: -SELECT top((fields->>'value1')::float, tags->>'tag1', 1) FROM s3; - top ------ - 3.3 -(1 row) - --- selector function top() cannot be combined with other functions(explain) ---Testcase 606: -EXPLAIN VERBOSE -SELECT top((fields->>'value1')::float, 1), top((fields->>'value2')::bigint, 1), top((fields->>'value3')::float, 1), top((fields->>'value4')::bigint, 1) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2967.86 rows=1462 width=32) - Output: (top(((fields ->> 'value1'::text))::double precision, 1)), (top(((fields ->> 'value2'::text))::bigint, 1)), (top(((fields ->> 'value3'::text))::double precision, 1)), (top(((fields ->> 'value4'::text))::bigint, 1)) - InfluxDB query: SELECT top("value1", 1), top("value2", 1), top("value3", 1), top("value4", 1) FROM "s3" -(3 rows) - --- selector function top() cannot be combined with other functions(result) ---Testcase 607: -SELECT top((fields->>'value1')::float, 1), top((fields->>'value2')::bigint, 1), top((fields->>'value3')::float, 1), top((fields->>'value4')::bigint, 1) FROM s3; -ERROR: influxdb_fdw : selector function top() cannot be combined with other functions --- select acos (builtin function, explain) ---Testcase 608: -EXPLAIN VERBOSE -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (acos(((fields ->> 'value1'::text))::double precision)), (acos(((fields ->> 'value3'::text))::double precision)) - InfluxDB query: SELECT acos("value1"), acos("value3") FROM "s3" -(3 rows) - --- select acos (builtin function, result) ---Testcase 609: -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3; - acos | acos -------------------+------------------ - 1.47062890563334 | 1.67096374795646 - 1.36943840600457 | 1.77215424758523 - 1.2661036727795 | 1.87548898081029 - | - | - | -(6 rows) - --- select acos (builtin function, not pushdown constraints, explain) ---Testcase 610: -EXPLAIN VERBOSE -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..7.14 rows=7 width=16) - Output: (acos(((fields ->> 'value1'::text))::double precision)), (acos(((fields ->> 'value3'::text))::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) = '64'::text) - InfluxDB query: SELECT acos("value1"), acos("value3"), "value2" FROM "s3" -(4 rows) - --- select acos (builtin function, not pushdown constraints, result) ---Testcase 611: -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; - acos | acos -------------------+------------------ - 1.47062890563334 | 1.67096374795646 - 1.36943840600457 | 1.77215424758523 - 1.2661036727795 | 1.87548898081029 -(3 rows) - --- select acos (builtin function, pushdown constraints, explain) ---Testcase 612: -EXPLAIN VERBOSE -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1484.10 rows=1455 width=16) - Output: (acos(((fields ->> 'value1'::text))::double precision)), (acos(((fields ->> 'value3'::text))::double precision)) - InfluxDB query: SELECT acos("value1"), acos("value3") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select acos (builtin function, pushdown constraints, result) ---Testcase 613: -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - acos | acos -------------------+------------------ - 1.47062890563334 | 1.67096374795646 - 1.36943840600457 | 1.77215424758523 - 1.2661036727795 | 1.87548898081029 -(3 rows) - --- select acos as nest function with agg (pushdown, explain) ---Testcase 614: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float), acos(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (acos(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), acos(sum("value3")) FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select acos as nest function with agg (pushdown, result) ---Testcase 615: -SELECT sum((fields->>'value3')::float), acos(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; - sum | acos -------+------------------ - -0.6 | 2.21429743558818 -(1 row) - --- select acos as nest with log2 (pushdown, explain) ---Testcase 616: -EXPLAIN VERBOSE -SELECT acos(log2((fields->>'value1')::float)),acos(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (acos(log2(((fields ->> 'value1'::text))::double precision))), (acos(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT acos(log2("value1")), acos(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select acos as nest with log2 (pushdown, result) ---Testcase 617: -SELECT acos(log2((fields->>'value1')::float)),acos(log2(1/(fields->>'value1')::float)) FROM s3; - acos | acos -------------------+------------------ - | - | - | - 1.43285577283535 | 1.70873688075444 - | - | -(6 rows) - --- select acos with non pushdown func and explicit constant (explain) ---Testcase 618: -EXPLAIN VERBOSE -SELECT acos((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1469.55 rows=1455 width=48) - Output: (acos(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT acos("value3") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select acos with non pushdown func and explicit constant (result) ---Testcase 619: -SELECT acos((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - acos | pi | ?column? -------------------+------------------+---------- - 1.67096374795646 | 3.14159265358979 | 4.1 - 1.77215424758523 | 3.14159265358979 | 4.1 - 1.87548898081029 | 3.14159265358979 | 4.1 -(3 rows) - --- select acos with order by (explain) ---Testcase 620: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY acos(1-(fields->>'value1')::float); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort (cost=1560.54..1564.17 rows=1455 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (acos(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (acos(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1484.10 rows=1455 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (acos(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", acos((1 - "value1")) FROM "s3" WHERE (("value2" <> 200)) -(6 rows) - --- select acos with order by (result) ---Testcase 621: -SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY acos(1-(fields->>'value1')::float); - value1 | acos ---------+------------------- - 0.1 | 0.451026811796262 - 0.2 | 0.643501108793284 - 0.3 | 0.795398830184144 -(3 rows) - --- select acos with order by index (result) ---Testcase 622: -SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 2,1; - value1 | acos ---------+------------------- - 0.1 | 0.451026811796262 - 0.2 | 0.643501108793284 - 0.3 | 0.795398830184144 -(3 rows) - --- select acos with order by index (result) ---Testcase 623: -SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 1,2; - value1 | acos ---------+------------------- - 0.1 | 0.451026811796262 - 0.2 | 0.643501108793284 - 0.3 | 0.795398830184144 -(3 rows) - --- select acos and as ---Testcase 624: -SELECT acos((fields->>'value3')::float) as acos1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - acos1 ------------------- - 1.67096374795646 - 1.77215424758523 - 1.87548898081029 -(3 rows) - --- select acos(*) (stub agg function, explain) ---Testcase 625: -EXPLAIN VERBOSE -SELECT acos_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (acos_all()) - InfluxDB query: SELECT acos(*) FROM "s3" -(3 rows) - --- select acos(*) (stub agg function, result) ---Testcase 626: -SELECT acos_all() from s3; - acos_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.4706289056333368\",\"value2\" : null,\"value3\" : \"1.6709637479564563\",\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1.3694384060045657\",\"value2\" : null,\"value3\" : \"1.7721542475852274\",\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1.266103672779499\",\"value2\" : null,\"value3\" : \"1.8754889808102941\",\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:05Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") -(6 rows) - --- select acos(*) (stub agg function and group by tag only) (explain) ---Testcase 627: -EXPLAIN VERBOSE -SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (acos_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT acos(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select acos(*) (stub agg function and group by tag only) (result) ---Testcase 628: -SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - acos_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.4706289056333368\",\"value2\" : null,\"value3\" : \"1.6709637479564563\",\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1.3694384060045657\",\"value2\" : null,\"value3\" : \"1.7721542475852274\",\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1.266103672779499\",\"value2\" : null,\"value3\" : \"1.8754889808102941\",\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") -(5 rows) - --- select acos(*) (stub agg function, expose data, explain) ---Testcase 629: -EXPLAIN VERBOSE -SELECT (acos_all()::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((acos_all()))::s3)."time", (((acos_all()))::s3).tags, (((acos_all()))::s3).fields - InfluxDB query: SELECT acos(*) FROM "s3" -(3 rows) - --- select acos(*) (stub agg function, expose data, result) ---Testcase 630: -SELECT (acos_all()::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "1.4706289056333368", "value2": null, "value3": "1.6709637479564563", "value4": null} - 1970-01-01 09:00:01+09 | | {"value1": "1.3694384060045657", "value2": null, "value3": "1.7721542475852274", "value4": null} - 1970-01-01 09:00:02+09 | | {"value1": "1.266103672779499", "value2": null, "value3": "1.8754889808102941", "value4": null} - 1970-01-01 09:00:03+09 | | {"value1": null, "value2": null, "value3": null, "value4": null} - 1970-01-01 09:00:04+09 | | {"value1": null, "value2": null, "value3": null, "value4": null} - 1970-01-01 09:00:05+09 | | {"value1": null, "value2": null, "value3": null, "value4": null} -(6 rows) - --- select asin (builtin function, explain) ---Testcase 631: -EXPLAIN VERBOSE -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (asin(((fields ->> 'value1'::text))::double precision)), (asin(((fields ->> 'value3'::text))::double precision)) - InfluxDB query: SELECT asin("value1"), asin("value3") FROM "s3" -(3 rows) - --- select asin (builtin function, result) ---Testcase 632: -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3; - asin | asin --------------------+-------------------- - 0.10016742116156 | -0.10016742116156 - 0.201357920790331 | -0.201357920790331 - 0.304692654015398 | -0.304692654015398 - | - | - | -(6 rows) - --- select asin (builtin function, not pushdown constraints, explain) ---Testcase 633: -EXPLAIN VERBOSE -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..7.14 rows=7 width=16) - Output: (asin(((fields ->> 'value1'::text))::double precision)), (asin(((fields ->> 'value3'::text))::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) = '64'::text) - InfluxDB query: SELECT asin("value1"), asin("value3"), "value2" FROM "s3" -(4 rows) - --- select asin (builtin function, not pushdown constraints, result) ---Testcase 634: -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; - asin | asin --------------------+-------------------- - 0.10016742116156 | -0.10016742116156 - 0.201357920790331 | -0.201357920790331 - 0.304692654015398 | -0.304692654015398 -(3 rows) - --- select asin (builtin function, pushdown constraints, explain) ---Testcase 635: -EXPLAIN VERBOSE -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1484.10 rows=1455 width=16) - Output: (asin(((fields ->> 'value1'::text))::double precision)), (asin(((fields ->> 'value3'::text))::double precision)) - InfluxDB query: SELECT asin("value1"), asin("value3") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select asin (builtin function, pushdown constraints, result) ---Testcase 636: -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - asin | asin --------------------+-------------------- - 0.10016742116156 | -0.10016742116156 - 0.201357920790331 | -0.201357920790331 - 0.304692654015398 | -0.304692654015398 -(3 rows) - --- select asin as nest function with agg (pushdown, explain) ---Testcase 637: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float), asin(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (asin(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), asin(sum("value3")) FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select asin as nest function with agg (pushdown, result) ---Testcase 638: -SELECT sum((fields->>'value3')::float), asin(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; - sum | asin -------+-------------------- - -0.6 | -0.643501108793284 -(1 row) - --- select asin as nest with log2 (pushdown, explain) ---Testcase 639: -EXPLAIN VERBOSE -SELECT asin(log2((fields->>'value1')::float)),asin(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (asin(log2(((fields ->> 'value1'::text))::double precision))), (asin(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT asin(log2("value1")), asin(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select asin as nest with log2 (pushdown, result) ---Testcase 640: -SELECT asin(log2((fields->>'value1')::float)),asin(log2(1/(fields->>'value1')::float)) FROM s3; - asin | asin --------------------+-------------------- - | - | - | - 0.137940553959545 | -0.137940553959545 - | - | -(6 rows) - --- select asin with non pushdown func and explicit constant (explain) ---Testcase 641: -EXPLAIN VERBOSE -SELECT asin((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1469.55 rows=1455 width=48) - Output: (asin(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT asin("value3") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select asin with non pushdown func and explicit constant (result) ---Testcase 642: -SELECT asin((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - asin | pi | ?column? ---------------------+------------------+---------- - -0.10016742116156 | 3.14159265358979 | 4.1 - -0.201357920790331 | 3.14159265358979 | 4.1 - -0.304692654015398 | 3.14159265358979 | 4.1 -(3 rows) - --- select asin with order by (explain) ---Testcase 643: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY asin(1-(fields->>'value1')::float); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort (cost=1560.54..1564.17 rows=1455 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (asin(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (asin(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1484.10 rows=1455 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (asin(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", asin((1 - "value1")) FROM "s3" WHERE (("value2" <> 200)) -(6 rows) - --- select asin with order by (result) ---Testcase 644: -SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY asin(1-(fields->>'value1')::float); - value1 | asin ---------+------------------- - 0.3 | 0.775397496610753 - 0.2 | 0.927295218001612 - 0.1 | 1.11976951499863 -(3 rows) - --- select asin with order by index (result) ---Testcase 645: -SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 2,1; - value1 | asin ---------+------------------- - 0.3 | 0.775397496610753 - 0.2 | 0.927295218001612 - 0.1 | 1.11976951499863 -(3 rows) - --- select asin with order by index (result) ---Testcase 646: -SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 1,2; - value1 | asin ---------+------------------- - 0.1 | 1.11976951499863 - 0.2 | 0.927295218001612 - 0.3 | 0.775397496610753 -(3 rows) - --- select asin and as ---Testcase 647: -SELECT asin((fields->>'value3')::float) as asin1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - asin1 --------------------- - -0.10016742116156 - -0.201357920790331 - -0.304692654015398 -(3 rows) - --- select asin(*) (stub agg function, explain) ---Testcase 648: -EXPLAIN VERBOSE -SELECT asin_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (asin_all()) - InfluxDB query: SELECT asin(*) FROM "s3" -(3 rows) - --- select asin(*) (stub agg function, result) ---Testcase 649: -SELECT asin_all() from s3; - asin_all ---------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1001674211615598\",\"value2\" : null,\"value3\" : \"-0.1001674211615598\",\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.20135792079033082\",\"value2\" : null,\"value3\" : \"-0.20135792079033082\",\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3046926540153975\",\"value2\" : null,\"value3\" : \"-0.3046926540153975\",\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:05Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") -(6 rows) - --- select asin(*) (stub agg function and group by tag only) (explain) ---Testcase 650: -EXPLAIN VERBOSE -SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (asin_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT asin(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select asin(*) (stub agg function and group by tag only) (result) ---Testcase 651: -SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - asin_all ---------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1001674211615598\",\"value2\" : null,\"value3\" : \"-0.1001674211615598\",\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.20135792079033082\",\"value2\" : null,\"value3\" : \"-0.20135792079033082\",\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3046926540153975\",\"value2\" : null,\"value3\" : \"-0.3046926540153975\",\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") -(5 rows) - --- select asin(*) (stub agg function, expose data, explain) ---Testcase 652: -EXPLAIN VERBOSE -SELECT (asin_all()::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((asin_all()))::s3)."time", (((asin_all()))::s3).tags, (((asin_all()))::s3).fields - InfluxDB query: SELECT asin(*) FROM "s3" -(3 rows) - --- select asin(*) (stub agg function, expose data, result) ---Testcase 653: -SELECT (asin_all()::s3).* from s3; - time | tags | fields -------------------------+------+----------------------------------------------------------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0.1001674211615598", "value2": null, "value3": "-0.1001674211615598", "value4": null} - 1970-01-01 09:00:01+09 | | {"value1": "0.20135792079033082", "value2": null, "value3": "-0.20135792079033082", "value4": null} - 1970-01-01 09:00:02+09 | | {"value1": "0.3046926540153975", "value2": null, "value3": "-0.3046926540153975", "value4": null} - 1970-01-01 09:00:03+09 | | {"value1": null, "value2": null, "value3": null, "value4": null} - 1970-01-01 09:00:04+09 | | {"value1": null, "value2": null, "value3": null, "value4": null} - 1970-01-01 09:00:05+09 | | {"value1": null, "value2": null, "value3": null, "value4": null} -(6 rows) - --- select atan (builtin function, explain) ---Testcase 654: -EXPLAIN VERBOSE -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1527.79 rows=1462 width=32) - Output: (atan(((fields ->> 'value1'::text))::double precision)), (atan((((fields ->> 'value2'::text))::bigint)::double precision)), (atan(((fields ->> 'value3'::text))::double precision)), (atan((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT atan("value1"), atan("value2"), atan("value3"), atan("value4") FROM "s3" -(3 rows) - --- select atan (builtin function, result) ---Testcase 655: -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3; - atan | atan | atan | atan --------------------+------------------+--------------------+------------------- - 0.099668652491162 | 1.56079666010823 | -0.099668652491162 | -1.56079666010823 - 0.197395559849881 | 1.56079666010823 | -0.197395559849881 | -1.56079666010823 - 0.291456794477867 | 1.56079666010823 | -0.291456794477867 | -1.56079666010823 - 0.832981266674432 | 1.56579636846094 | -0.832981266674432 | -1.56579636846094 - 1.14416883366802 | 1.56579636846094 | -1.14416883366802 | -1.56579636846094 - 1.27656176168371 | 1.56579636846094 | -1.27656176168371 | -1.56579636846094 -(6 rows) - --- select atan (builtin function, not pushdown constraints, explain) ---Testcase 656: -EXPLAIN VERBOSE -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (atan(((fields ->> 'value1'::text))::double precision)), (atan((((fields ->> 'value2'::text))::bigint)::double precision)), (atan(((fields ->> 'value3'::text))::double precision)), (atan((((fields ->> 'value4'::text))::bigint)::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT atan("value1"), atan("value2"), atan("value3"), atan("value4"), "value2" FROM "s3" -(4 rows) - --- select atan (builtin function, not pushdown constraints, result) ---Testcase 657: -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - atan | atan | atan | atan --------------------+------------------+--------------------+------------------- - 0.832981266674432 | 1.56579636846094 | -0.832981266674432 | -1.56579636846094 - 1.14416883366802 | 1.56579636846094 | -1.14416883366802 | -1.56579636846094 - 1.27656176168371 | 1.56579636846094 | -1.27656176168371 | -1.56579636846094 -(3 rows) - --- select atan (builtin function, pushdown constraints, explain) ---Testcase 658: -EXPLAIN VERBOSE -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (atan(((fields ->> 'value1'::text))::double precision)), (atan((((fields ->> 'value2'::text))::bigint)::double precision)), (atan(((fields ->> 'value3'::text))::double precision)), (atan((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT atan("value1"), atan("value2"), atan("value3"), atan("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select atan (builtin function, pushdown constraints, result) ---Testcase 659: -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - atan | atan | atan | atan --------------------+------------------+--------------------+------------------- - 0.099668652491162 | 1.56079666010823 | -0.099668652491162 | -1.56079666010823 - 0.197395559849881 | 1.56079666010823 | -0.197395559849881 | -1.56079666010823 - 0.291456794477867 | 1.56079666010823 | -0.291456794477867 | -1.56079666010823 -(3 rows) - --- select atan as nest function with agg (pushdown, explain) ---Testcase 660: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),atan(sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (atan(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), atan(sum("value3")) FROM "s3" -(3 rows) - --- select atan as nest function with agg (pushdown, result) ---Testcase 661: -SELECT sum((fields->>'value3')::float),atan(sum((fields->>'value3')::float)) FROM s3; - sum | atan -------+------------------- - -7.2 | -1.43279030313738 -(1 row) - --- select atan as nest with log2 (pushdown, explain) ---Testcase 662: -EXPLAIN VERBOSE -SELECT atan(log2((fields->>'value1')::float)),atan(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (atan(log2(((fields ->> 'value1'::text))::double precision))), (atan(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT atan(log2("value1")), atan(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select atan as nest with log2 (pushdown, result) ---Testcase 663: -SELECT atan(log2((fields->>'value1')::float)),atan(log2(1/(fields->>'value1')::float)) FROM s3; - atan | atan --------------------+-------------------- - -1.27839485025093 | 1.27839485025093 - -1.16412742542701 | 1.16412742542701 - -1.04842363791536 | 1.04842363791536 - 0.13664662085466 | -0.13664662085466 - 0.849638674971166 | -0.849638674971166 - 1.04479137360874 | -1.04479137360874 -(6 rows) - --- select atan with non pushdown func and explicit constant (explain) ---Testcase 664: -EXPLAIN VERBOSE -SELECT atan((fields->>'value3')::float), pi(), 4.1 FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (atan(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT atan("value3") FROM "s3" -(3 rows) - --- select atan with non pushdown func and explicit constant (result) ---Testcase 665: -SELECT atan((fields->>'value3')::float), pi(), 4.1 FROM s3; - atan | pi | ?column? ---------------------+------------------+---------- - -0.099668652491162 | 3.14159265358979 | 4.1 - -0.197395559849881 | 3.14159265358979 | 4.1 - -0.291456794477867 | 3.14159265358979 | 4.1 - -0.832981266674432 | 3.14159265358979 | 4.1 - -1.14416883366802 | 3.14159265358979 | 4.1 - -1.27656176168371 | 3.14159265358979 | 4.1 -(6 rows) - --- select atan with order by (explain) ---Testcase 666: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by atan(1-(fields->>'value1')::float); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (atan(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (atan(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (atan(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", atan((1 - "value1")) FROM "s3" -(6 rows) - --- select atan with order by (result) ---Testcase 667: -SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by atan(1-(fields->>'value1')::float); - value1 | atan ---------+--------------------- - 3.3 | -1.16066898625341 - 2.2 | -0.876058050598193 - 1.1 | -0.0996686524911621 - 0.3 | 0.610725964389209 - 0.2 | 0.674740942223553 - 0.1 | 0.732815101786507 -(6 rows) - --- select atan with order by index (result) ---Testcase 668: -SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by 2,1; - value1 | atan ---------+--------------------- - 3.3 | -1.16066898625341 - 2.2 | -0.876058050598193 - 1.1 | -0.0996686524911621 - 0.3 | 0.610725964389209 - 0.2 | 0.674740942223553 - 0.1 | 0.732815101786507 -(6 rows) - --- select atan with order by index (result) ---Testcase 669: -SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by 1,2; - value1 | atan ---------+--------------------- - 0.1 | 0.732815101786507 - 0.2 | 0.674740942223553 - 0.3 | 0.610725964389209 - 1.1 | -0.0996686524911621 - 2.2 | -0.876058050598193 - 3.3 | -1.16066898625341 -(6 rows) - --- select atan and as ---Testcase 670: -SELECT atan((fields->>'value3')::float) as atan1 FROM s3; - atan1 --------------------- - -0.099668652491162 - -0.197395559849881 - -0.291456794477867 - -0.832981266674432 - -1.14416883366802 - -1.27656176168371 -(6 rows) - --- select atan(*) (stub agg function, explain) ---Testcase 671: -EXPLAIN VERBOSE -SELECT atan_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (atan_all()) - InfluxDB query: SELECT atan(*) FROM "s3" -(3 rows) - --- select atan(*) (stub agg function, result) ---Testcase 672: -SELECT atan_all() from s3; - atan_all ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.09966865249116204\",\"value2\" : \"1.5607966601082313\",\"value3\" : \"-0.09966865249116204\",\"value4\" : \"-1.5607966601082313\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.19739555984988078\",\"value2\" : \"1.5607966601082313\",\"value3\" : \"-0.19739555984988078\",\"value4\" : \"-1.5607966601082313\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.2914567944778671\",\"value2\" : \"1.5607966601082313\",\"value3\" : \"-0.2914567944778671\",\"value4\" : \"-1.5607966601082313\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8329812666744317\",\"value2\" : \"1.5657963684609382\",\"value3\" : \"-0.8329812666744317\",\"value4\" : \"-1.5657963684609382\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1441688336680205\",\"value2\" : \"1.5657963684609382\",\"value3\" : \"-1.1441688336680205\",\"value4\" : \"-1.5657963684609382\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.2765617616837088\",\"value2\" : \"1.5657963684609382\",\"value3\" : \"-1.2765617616837088\",\"value4\" : \"-1.5657963684609382\" }") -(6 rows) - --- select atan(*) (stub agg function and group by tag only) (explain) ---Testcase 673: -EXPLAIN VERBOSE -SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (atan_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT atan(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select atan(*) (stub agg function and group by tag only) (result) ---Testcase 674: -SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - atan_all ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.09966865249116204\",\"value2\" : \"1.5607966601082313\",\"value3\" : \"-0.09966865249116204\",\"value4\" : \"-1.5607966601082313\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.19739555984988078\",\"value2\" : \"1.5607966601082313\",\"value3\" : \"-0.19739555984988078\",\"value4\" : \"-1.5607966601082313\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.2914567944778671\",\"value2\" : \"1.5607966601082313\",\"value3\" : \"-0.2914567944778671\",\"value4\" : \"-1.5607966601082313\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8329812666744317\",\"value2\" : \"1.5657963684609382\",\"value3\" : \"-0.8329812666744317\",\"value4\" : \"-1.5657963684609382\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1441688336680205\",\"value2\" : \"1.5657963684609382\",\"value3\" : \"-1.1441688336680205\",\"value4\" : \"-1.5657963684609382\" }") -(5 rows) - --- select atan(*) (stub agg function, expose data, explain) ---Testcase 675: -EXPLAIN VERBOSE -SELECT (atan_all()::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((atan_all()))::s3)."time", (((atan_all()))::s3).tags, (((atan_all()))::s3).fields - InfluxDB query: SELECT atan(*) FROM "s3" -(3 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 676: -SELECT asin_all(), acos_all(), atan_all() FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub asin_all() is called -CONTEXT: PL/pgSQL function asin_all() line 3 at RAISE --- select atan2 (builtin function, explain) ---Testcase 677: -EXPLAIN VERBOSE -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1578.96 rows=1462 width=32) - Output: (atan2(((fields ->> 'value1'::text))::double precision, (((fields ->> 'value2'::text))::bigint)::double precision)), (atan2((((fields ->> 'value2'::text))::bigint)::double precision, ((fields ->> 'value3'::text))::double precision)), (atan2(((fields ->> 'value3'::text))::double precision, (((fields ->> 'value4'::text))::bigint)::double precision)), (atan2((((fields ->> 'value4'::text))::bigint)::double precision, ((fields ->> 'value1'::text))::double precision)) - InfluxDB query: SELECT atan2("value1", "value2"), atan2("value2", "value3"), atan2("value3", "value4"), atan2("value4", "value1") FROM "s3" -(3 rows) - --- select atan2 (builtin function, result) ---Testcase 678: -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3; - atan2 | atan2 | atan2 | atan2 -----------------------+------------------+-------------------+------------------- - 0.000999999666666867 | 1.57179632646156 | -3.14059265392313 | -1.56979632712823 - 0.00199999733333973 | 1.57279632412824 | -3.13959265625645 | -1.56879632946156 - 0.0029999910000486 | 1.57379631779495 | -3.13859266258974 | -1.56779633579485 - 0.00549994454267321 | 1.57629627133757 | -3.13609270904712 | -1.56529638225222 - 0.0109995563655408 | 1.58179588316044 | -3.13059309722425 | -1.55979677042936 - 0.0164985028695487 | 1.58729482966445 | -3.12509415072024 | -1.55429782392535 -(6 rows) - --- select atan2 (builtin function, not pushdown constraints, explain) ---Testcase 679: -EXPLAIN VERBOSE -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1571.40 rows=1455 width=32) - Output: (atan2(((fields ->> 'value1'::text))::double precision, (((fields ->> 'value2'::text))::bigint)::double precision)), (atan2((((fields ->> 'value2'::text))::bigint)::double precision, ((fields ->> 'value3'::text))::double precision)), (atan2(((fields ->> 'value3'::text))::double precision, (((fields ->> 'value4'::text))::bigint)::double precision)), (atan2((((fields ->> 'value4'::text))::bigint)::double precision, ((fields ->> 'value1'::text))::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT atan2("value1", "value2"), atan2("value2", "value3"), atan2("value3", "value4"), atan2("value4", "value1"), "value2" FROM "s3" -(4 rows) - --- select atan2 (builtin function, not pushdown constraints, result) ---Testcase 680: -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - atan2 | atan2 | atan2 | atan2 ----------------------+------------------+-------------------+------------------- - 0.00549994454267321 | 1.57629627133757 | -3.13609270904712 | -1.56529638225222 - 0.0109995563655408 | 1.58179588316044 | -3.13059309722425 | -1.55979677042936 - 0.0164985028695487 | 1.58729482966445 | -3.12509415072024 | -1.55429782392535 -(3 rows) - --- select atan2 (builtin function, pushdown constraints, explain) ---Testcase 681: -EXPLAIN VERBOSE -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1571.40 rows=1455 width=32) - Output: (atan2(((fields ->> 'value1'::text))::double precision, (((fields ->> 'value2'::text))::bigint)::double precision)), (atan2((((fields ->> 'value2'::text))::bigint)::double precision, ((fields ->> 'value3'::text))::double precision)), (atan2(((fields ->> 'value3'::text))::double precision, (((fields ->> 'value4'::text))::bigint)::double precision)), (atan2((((fields ->> 'value4'::text))::bigint)::double precision, ((fields ->> 'value1'::text))::double precision)) - InfluxDB query: SELECT atan2("value1", "value2"), atan2("value2", "value3"), atan2("value3", "value4"), atan2("value4", "value1") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select atan2 (builtin function, pushdown constraints, result) ---Testcase 682: -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - atan2 | atan2 | atan2 | atan2 -----------------------+------------------+-------------------+------------------- - 0.000999999666666867 | 1.57179632646156 | -3.14059265392313 | -1.56979632712823 - 0.00199999733333973 | 1.57279632412824 | -3.13959265625645 | -1.56879632946156 - 0.0029999910000486 | 1.57379631779495 | -3.13859266258974 | -1.56779633579485 -(3 rows) - --- select atan2 as nest function with agg (pushdown, explain) ---Testcase 683: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float), sum((fields->>'value4')::bigint),atan2(sum((fields->>'value3')::float), sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (sum(((fields ->> 'value4'::text))::bigint)), (atan2(sum(((fields ->> 'value3'::text))::double precision), sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), sum("value4"), atan2(sum("value3"), sum("value3")) FROM "s3" -(3 rows) - --- select atan2 as nest function with agg (pushdown, result) ---Testcase 684: -SELECT sum((fields->>'value3')::float), sum((fields->>'value4')::bigint),atan2(sum((fields->>'value3')::float), sum((fields->>'value3')::float)) FROM s3; - sum | sum | atan2 -------+------+------------------- - -7.2 | -900 | -2.35619449019234 -(1 row) - --- select atan2 as nest with log2 (pushdown, explain) ---Testcase 685: -EXPLAIN VERBOSE -SELECT atan2(log2((fields->>'value1')::float), log2((fields->>'value1')::float)),atan2(log2(1/(fields->>'value1')::float), log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2982.48 rows=1462 width=16) - Output: (atan2(log2(((fields ->> 'value1'::text))::double precision), log2(((fields ->> 'value1'::text))::double precision))), (atan2(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)), log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT atan2(log2("value1"), log2("value1")), atan2(log2((1 / "value1")), log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select atan2 as nest with log2 (pushdown, result) ---Testcase 686: -SELECT atan2(log2((fields->>'value1')::float), log2((fields->>'value1')::float)),atan2(log2(1/(fields->>'value1')::float), log2(1/(fields->>'value1')::float)) FROM s3; - atan2 | atan2 --------------------+------------------- - -2.35619449019234 | 0.785398163397448 - -2.35619449019234 | 0.785398163397448 - -2.35619449019234 | 0.785398163397448 - 0.785398163397448 | -2.35619449019234 - 0.785398163397448 | -2.35619449019234 - 0.785398163397448 | -2.35619449019234 -(6 rows) - --- select atan2 with non pushdown func and explicit constant (explain) ---Testcase 687: -EXPLAIN VERBOSE -SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint), pi(), 4.1 FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1491.24 rows=1462 width=48) - Output: (atan2(((fields ->> 'value3'::text))::double precision, (((fields ->> 'value4'::text))::bigint)::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT atan2("value3", "value4") FROM "s3" -(3 rows) - --- select atan2 with non pushdown func and explicit constant (result) ---Testcase 688: -SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint), pi(), 4.1 FROM s3; - atan2 | pi | ?column? --------------------+------------------+---------- - -3.14059265392313 | 3.14159265358979 | 4.1 - -3.13959265625645 | 3.14159265358979 | 4.1 - -3.13859266258974 | 3.14159265358979 | 4.1 - -3.13609270904712 | 3.14159265358979 | 4.1 - -3.13059309722425 | 3.14159265358979 | 4.1 - -3.12509415072024 | 3.14159265358979 | 4.1 -(6 rows) - --- select atan2 with order by (explain) ---Testcase 689: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort (cost=1586.37..1590.03 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (atan2(('1'::double precision - ((fields ->> 'value1'::text))::double precision), ((1 - ((fields ->> 'value2'::text))::bigint))::double precision)) - Sort Key: (atan2(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision), ((1 - ((s3.fields ->> 'value2'::text))::bigint))::double precision)) - -> Foreign Scan (cost=10.00..1509.52 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (atan2(('1'::double precision - ((fields ->> 'value1'::text))::double precision), ((1 - ((fields ->> 'value2'::text))::bigint))::double precision)) - InfluxDB query: SELECT "value1", atan2((1 - "value1"), (1 - "value2")) FROM "s3" -(6 rows) - --- select atan2 with order by (result) ---Testcase 690: -SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint); - value1 | atan2 ---------+------------------- - 1.1 | -3.14109014106928 - 2.2 | -3.13556257592532 - 3.3 | -3.13003537924322 - 0.1 | 3.13250199492473 - 0.2 | 3.13351202139289 - 0.3 | 3.13452206434865 -(6 rows) - --- select atan2 with order by index (result) ---Testcase 691: -SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by 2,1; - value1 | atan2 ---------+------------------- - 1.1 | -3.14109014106928 - 2.2 | -3.13556257592532 - 3.3 | -3.13003537924322 - 0.1 | 3.13250199492473 - 0.2 | 3.13351202139289 - 0.3 | 3.13452206434865 -(6 rows) - --- select atan2 with order by index (result) ---Testcase 692: -SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by 1,2; - value1 | atan2 ---------+------------------- - 0.1 | 3.13250199492473 - 0.2 | 3.13351202139289 - 0.3 | 3.13452206434865 - 1.1 | -3.14109014106928 - 2.2 | -3.13556257592532 - 3.3 | -3.13003537924322 -(6 rows) - --- select atan2 and as ---Testcase 693: -SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint) as atan21 FROM s3; - atan21 -------------------- - -3.14059265392313 - -3.13959265625645 - -3.13859266258974 - -3.13609270904712 - -3.13059309722425 - -3.12509415072024 -(6 rows) - --- select atan2(*) (stub function, explain) ---Testcase 694: -EXPLAIN VERBOSE -SELECT atan2_all((fields->>'value1')::float) from s3; - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1838.47 rows=1462 width=32) - Output: (atan2_all(((fields ->> 'value1'::text))::double precision)) - InfluxDB query: SELECT atan2(*, "value1") FROM "s3" -(3 rows) - --- select atan2(*) (stub function, result) ---Testcase 695: -SELECT atan2_all((fields->>'value1')::float) from s3; - atan2_all --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.7853981633974483\",\"value2\" : \"1.5697963271282296\",\"value3\" : \"-0.7853981633974483\",\"value4\" : \"-1.5697963271282296\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.7853981633974483\",\"value2\" : \"1.5687963294615568\",\"value3\" : \"-0.7853981633974483\",\"value4\" : \"-1.5687963294615568\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.7853981633974483\",\"value2\" : \"1.567796335794848\",\"value3\" : \"-0.7853981633974483\",\"value4\" : \"-1.567796335794848\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.7853981633974483\",\"value2\" : \"1.5652963822522235\",\"value3\" : \"-0.7853981633974483\",\"value4\" : \"-1.5652963822522235\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.7853981633974483\",\"value2\" : \"1.5597967704293558\",\"value3\" : \"-0.7853981633974483\",\"value4\" : \"-1.5597967704293558\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"0.7853981633974483\",\"value2\" : \"1.554297823925348\",\"value3\" : \"-0.7853981633974483\",\"value4\" : \"-1.554297823925348\" }") -(6 rows) - --- select ceil (builtin function, explain) ---Testcase 696: -EXPLAIN VERBOSE -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1527.79 rows=1462 width=32) - Output: (ceil(((fields ->> 'value1'::text))::double precision)), (ceil((((fields ->> 'value2'::text))::bigint)::double precision)), (ceil(((fields ->> 'value3'::text))::double precision)), (ceil((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT ceil("value1"), ceil("value2"), ceil("value3"), ceil("value4") FROM "s3" -(3 rows) - --- select ceil (builtin function, result) ---Testcase 697: -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3; - ceil | ceil | ceil | ceil -------+------+------+------ - 1 | 100 | -0 | -100 - 1 | 100 | -0 | -100 - 1 | 100 | -0 | -100 - 2 | 200 | -1 | -200 - 3 | 200 | -2 | -200 - 4 | 200 | -3 | -200 -(6 rows) - --- select ceil (builtin function, not pushdown constraints, explain) ---Testcase 698: -EXPLAIN VERBOSE -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (ceil(((fields ->> 'value1'::text))::double precision)), (ceil((((fields ->> 'value2'::text))::bigint)::double precision)), (ceil(((fields ->> 'value3'::text))::double precision)), (ceil((((fields ->> 'value4'::text))::bigint)::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT ceil("value1"), ceil("value2"), ceil("value3"), ceil("value4"), "value2" FROM "s3" -(4 rows) - --- select ceil (builtin function, not pushdown constraints, result) ---Testcase 699: -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - ceil | ceil | ceil | ceil -------+------+------+------ - 2 | 200 | -1 | -200 - 3 | 200 | -2 | -200 - 4 | 200 | -3 | -200 -(3 rows) - --- select ceil (builtin function, pushdown constraints, explain) ---Testcase 700: -EXPLAIN VERBOSE -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (ceil(((fields ->> 'value1'::text))::double precision)), (ceil((((fields ->> 'value2'::text))::bigint)::double precision)), (ceil(((fields ->> 'value3'::text))::double precision)), (ceil((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT ceil("value1"), ceil("value2"), ceil("value3"), ceil("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select ceil (builtin function, pushdown constraints, result) ---Testcase 701: -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - ceil | ceil | ceil | ceil -------+------+------+------ - 1 | 100 | -0 | -100 - 1 | 100 | -0 | -100 - 1 | 100 | -0 | -100 -(3 rows) - --- select ceil as nest function with agg (pushdown, explain) ---Testcase 702: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),ceil(sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (ceil(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), ceil(sum("value3")) FROM "s3" -(3 rows) - --- select ceil as nest function with agg (pushdown, result) ---Testcase 703: -SELECT sum((fields->>'value3')::float),ceil(sum((fields->>'value3')::float)) FROM s3; - sum | ceil -------+------ - -7.2 | -7 -(1 row) - --- select ceil as nest with log2 (pushdown, explain) ---Testcase 704: -EXPLAIN VERBOSE -SELECT ceil(log2((fields->>'value1')::float)),ceil(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (ceil(log2(((fields ->> 'value1'::text))::double precision))), (ceil(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT ceil(log2("value1")), ceil(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select ceil as nest with log2 (pushdown, result) ---Testcase 705: -SELECT ceil(log2((fields->>'value1')::float)),ceil(log2(1/(fields->>'value1')::float)) FROM s3; - ceil | ceil -------+------ - -3 | 4 - -2 | 3 - -1 | 2 - 1 | -0 - 2 | -1 - 2 | -1 -(6 rows) - --- select ceil with non pushdown func and explicit constant (explain) ---Testcase 706: -EXPLAIN VERBOSE -SELECT ceil((fields->>'value3')::float), pi(), 4.1 FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (ceil(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT ceil("value3") FROM "s3" -(3 rows) - --- select ceil with non pushdown func and explicit constant (result) ---Testcase 707: -SELECT ceil((fields->>'value3')::float), pi(), 4.1 FROM s3; - ceil | pi | ?column? -------+------------------+---------- - -0 | 3.14159265358979 | 4.1 - -0 | 3.14159265358979 | 4.1 - -0 | 3.14159265358979 | 4.1 - -1 | 3.14159265358979 | 4.1 - -2 | 3.14159265358979 | 4.1 - -3 | 3.14159265358979 | 4.1 -(6 rows) - --- select ceil with order by (explain) ---Testcase 708: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by ceil(1-(fields->>'value1')::float); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (ceil(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (ceil(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (ceil(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", ceil((1 - "value1")) FROM "s3" -(6 rows) - --- select ceil with order by (result) ---Testcase 709: -SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by ceil(1-(fields->>'value1')::float); - value1 | ceil ---------+------ - 3.3 | -2 - 2.2 | -1 - 1.1 | -0 - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 -(6 rows) - --- select ceil with order by index (result) ---Testcase 710: -SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by 2,1; - value1 | ceil ---------+------ - 3.3 | -2 - 2.2 | -1 - 1.1 | -0 - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 -(6 rows) - --- select ceil with order by index (result) ---Testcase 711: -SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by 1,2; - value1 | ceil ---------+------ - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 - 1.1 | -0 - 2.2 | -1 - 3.3 | -2 -(6 rows) - --- select ceil and as ---Testcase 712: -SELECT ceil((fields->>'value3')::float) as ceil1 FROM s3; - ceil1 -------- - -0 - -0 - -0 - -1 - -2 - -3 -(6 rows) - --- select ceil(*) (stub agg function, explain) ---Testcase 713: -EXPLAIN VERBOSE -SELECT ceil_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (ceil_all()) - InfluxDB query: SELECT ceil(*) FROM "s3" -(3 rows) - --- select ceil(*) (stub agg function, result) ---Testcase 714: -SELECT ceil_all() from s3; - ceil_all ----------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"2\",\"value2\" : \"200\",\"value3\" : \"-1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"3\",\"value2\" : \"200\",\"value3\" : \"-2\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"4\",\"value2\" : \"200\",\"value3\" : \"-3\",\"value4\" : \"-200\" }") -(6 rows) - --- select ceil(*) (stub agg function and group by tag only) (explain) ---Testcase 715: -EXPLAIN VERBOSE -SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (ceil_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT ceil(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select ceil(*) (stub agg function and group by tag only) (result) ---Testcase 716: -SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - ceil_all ----------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"2\",\"value2\" : \"200\",\"value3\" : \"-1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"3\",\"value2\" : \"200\",\"value3\" : \"-2\",\"value4\" : \"-200\" }") -(5 rows) - --- select ceil(*) (stub agg function, expose data, explain) ---Testcase 717: -EXPLAIN VERBOSE -SELECT (ceil_all()::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((ceil_all()))::s3)."time", (((ceil_all()))::s3).tags, (((ceil_all()))::s3).fields - InfluxDB query: SELECT ceil(*) FROM "s3" -(3 rows) - --- select ceil(*) (stub agg function, expose data, result) ---Testcase 718: -SELECT (ceil_all()::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "1", "value2": "100", "value3": "-0", "value4": "-100"} - 1970-01-01 09:00:01+09 | | {"value1": "1", "value2": "100", "value3": "-0", "value4": "-100"} - 1970-01-01 09:00:02+09 | | {"value1": "1", "value2": "100", "value3": "-0", "value4": "-100"} - 1970-01-01 09:00:03+09 | | {"value1": "2", "value2": "200", "value3": "-1", "value4": "-200"} - 1970-01-01 09:00:04+09 | | {"value1": "3", "value2": "200", "value3": "-2", "value4": "-200"} - 1970-01-01 09:00:05+09 | | {"value1": "4", "value2": "200", "value3": "-3", "value4": "-200"} -(6 rows) - --- select cos (builtin function, explain) ---Testcase 719: -EXPLAIN VERBOSE -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1527.79 rows=1462 width=32) - Output: (cos(((fields ->> 'value1'::text))::double precision)), (cos((((fields ->> 'value2'::text))::bigint)::double precision)), (cos(((fields ->> 'value3'::text))::double precision)), (cos((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT cos("value1"), cos("value2"), cos("value3"), cos("value4") FROM "s3" -(3 rows) - --- select cos (builtin function, result) ---Testcase 720: -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3; - cos | cos | cos | cos ---------------------+-------------------+--------------------+------------------- - 0.995004165278026 | 0.862318872287684 | 0.995004165278026 | 0.862318872287684 - 0.980066577841242 | 0.862318872287684 | 0.980066577841242 | 0.862318872287684 - 0.955336489125606 | 0.862318872287684 | 0.955336489125606 | 0.862318872287684 - 0.453596121425577 | 0.487187675007006 | 0.453596121425577 | 0.487187675007006 - -0.588501117255346 | 0.487187675007006 | -0.588501117255346 | 0.487187675007006 - -0.987479769908865 | 0.487187675007006 | -0.987479769908865 | 0.487187675007006 -(6 rows) - --- select cos (builtin function, not pushdown constraints, explain) ---Testcase 721: -EXPLAIN VERBOSE -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (cos(((fields ->> 'value1'::text))::double precision)), (cos((((fields ->> 'value2'::text))::bigint)::double precision)), (cos(((fields ->> 'value3'::text))::double precision)), (cos((((fields ->> 'value4'::text))::bigint)::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT cos("value1"), cos("value2"), cos("value3"), cos("value4"), "value2" FROM "s3" -(4 rows) - --- select cos (builtin function, not pushdown constraints, result) ---Testcase 722: -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - cos | cos | cos | cos ---------------------+-------------------+--------------------+------------------- - 0.453596121425577 | 0.487187675007006 | 0.453596121425577 | 0.487187675007006 - -0.588501117255346 | 0.487187675007006 | -0.588501117255346 | 0.487187675007006 - -0.987479769908865 | 0.487187675007006 | -0.987479769908865 | 0.487187675007006 -(3 rows) - --- select cos (builtin function, pushdown constraints, explain) ---Testcase 723: -EXPLAIN VERBOSE -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (cos(((fields ->> 'value1'::text))::double precision)), (cos((((fields ->> 'value2'::text))::bigint)::double precision)), (cos(((fields ->> 'value3'::text))::double precision)), (cos((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT cos("value1"), cos("value2"), cos("value3"), cos("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select cos (builtin function, pushdown constraints, result) ---Testcase 724: -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - cos | cos | cos | cos --------------------+-------------------+-------------------+------------------- - 0.995004165278026 | 0.862318872287684 | 0.995004165278026 | 0.862318872287684 - 0.980066577841242 | 0.862318872287684 | 0.980066577841242 | 0.862318872287684 - 0.955336489125606 | 0.862318872287684 | 0.955336489125606 | 0.862318872287684 -(3 rows) - --- select cos as nest function with agg (pushdown, explain) ---Testcase 725: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),cos(sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (cos(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), cos(sum("value3")) FROM "s3" -(3 rows) - --- select cos as nest function with agg (pushdown, result) ---Testcase 726: -SELECT sum((fields->>'value3')::float),cos(sum((fields->>'value3')::float)) FROM s3; - sum | cos -------+------------------- - -7.2 | 0.608351314532255 -(1 row) - --- select cos as nest with log2 (pushdown, explain) ---Testcase 727: -EXPLAIN VERBOSE -SELECT cos(log2((fields->>'value1')::float)),cos(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (cos(log2(((fields ->> 'value1'::text))::double precision))), (cos(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT cos(log2("value1")), cos(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select cos as nest with log2 (pushdown, result) ---Testcase 728: -SELECT cos(log2((fields->>'value1')::float)),cos(log2(1/(fields->>'value1')::float)) FROM s3; - cos | cos ---------------------+-------------------- - -0.983783583525364 | -0.983783583525364 - -0.68246642540679 | -0.68246642540679 - -0.165405605243286 | -0.165405605243286 - 0.990561276215998 | 0.990561276215998 - 0.419861582239189 | 0.419861582239189 - -0.151088872169093 | -0.151088872169093 -(6 rows) - --- select cos with non pushdown func and explicit constant (explain) ---Testcase 729: -EXPLAIN VERBOSE -SELECT cos((fields->>'value3')::float), pi(), 4.1 FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (cos(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT cos("value3") FROM "s3" -(3 rows) - --- select cos with non pushdown func and explicit constant (result) ---Testcase 730: -SELECT cos((fields->>'value3')::float), pi(), 4.1 FROM s3; - cos | pi | ?column? ---------------------+------------------+---------- - 0.995004165278026 | 3.14159265358979 | 4.1 - 0.980066577841242 | 3.14159265358979 | 4.1 - 0.955336489125606 | 3.14159265358979 | 4.1 - 0.453596121425577 | 3.14159265358979 | 4.1 - -0.588501117255346 | 3.14159265358979 | 4.1 - -0.987479769908865 | 3.14159265358979 | 4.1 -(6 rows) - --- select cos with order by (explain) ---Testcase 731: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by cos(1-(fields->>'value1')::float); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (cos(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (cos(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (cos(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", cos((1 - "value1")) FROM "s3" -(6 rows) - --- select cos with order by (result) ---Testcase 732: -SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by cos(1-(fields->>'value1')::float); - value1 | cos ---------+-------------------- - 3.3 | -0.666276021279824 - 2.2 | 0.362357754476673 - 0.1 | 0.621609968270665 - 0.2 | 0.696706709347165 - 0.3 | 0.764842187284488 - 1.1 | 0.995004165278026 -(6 rows) - --- select cos with order by index (result) ---Testcase 733: -SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by 2,1; - value1 | cos ---------+-------------------- - 3.3 | -0.666276021279824 - 2.2 | 0.362357754476673 - 0.1 | 0.621609968270665 - 0.2 | 0.696706709347165 - 0.3 | 0.764842187284488 - 1.1 | 0.995004165278026 -(6 rows) - --- select cos with order by index (result) ---Testcase 734: -SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by 1,2; - value1 | cos ---------+-------------------- - 0.1 | 0.621609968270665 - 0.2 | 0.696706709347165 - 0.3 | 0.764842187284488 - 1.1 | 0.995004165278026 - 2.2 | 0.362357754476673 - 3.3 | -0.666276021279824 -(6 rows) - --- select cos and as ---Testcase 735: -SELECT cos((fields->>'value3')::float) as cos1 FROM s3; - cos1 --------------------- - 0.995004165278026 - 0.980066577841242 - 0.955336489125606 - 0.453596121425577 - -0.588501117255346 - -0.987479769908865 -(6 rows) - --- select cos(*) (stub agg function, explain) ---Testcase 736: -EXPLAIN VERBOSE -SELECT cos_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (cos_all()) - InfluxDB query: SELECT cos(*) FROM "s3" -(3 rows) - --- select cos(*) (stub agg function, result) ---Testcase 737: -SELECT cos_all() from s3; - cos_all ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.9950041652780257\",\"value2\" : \"0.8623188722876839\",\"value3\" : \"0.9950041652780257\",\"value4\" : \"0.8623188722876839\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.9800665778412416\",\"value2\" : \"0.8623188722876839\",\"value3\" : \"0.9800665778412416\",\"value4\" : \"0.8623188722876839\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.955336489125606\",\"value2\" : \"0.8623188722876839\",\"value3\" : \"0.955336489125606\",\"value4\" : \"0.8623188722876839\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.4535961214255773\",\"value2\" : \"0.48718767500700594\",\"value3\" : \"0.4535961214255773\",\"value4\" : \"0.48718767500700594\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"-0.5885011172553458\",\"value2\" : \"0.48718767500700594\",\"value3\" : \"-0.5885011172553458\",\"value4\" : \"0.48718767500700594\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"-0.987479769908865\",\"value2\" : \"0.48718767500700594\",\"value3\" : \"-0.987479769908865\",\"value4\" : \"0.48718767500700594\" }") -(6 rows) - --- select cos(*) (stub agg function and group by tag only) (explain) ---Testcase 738: -EXPLAIN VERBOSE -SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (cos_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT cos(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select cos(*) (stub agg function and group by tag only) (result) ---Testcase 739: -SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - cos_all ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.9950041652780257\",\"value2\" : \"0.8623188722876839\",\"value3\" : \"0.9950041652780257\",\"value4\" : \"0.8623188722876839\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.9800665778412416\",\"value2\" : \"0.8623188722876839\",\"value3\" : \"0.9800665778412416\",\"value4\" : \"0.8623188722876839\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.955336489125606\",\"value2\" : \"0.8623188722876839\",\"value3\" : \"0.955336489125606\",\"value4\" : \"0.8623188722876839\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.4535961214255773\",\"value2\" : \"0.48718767500700594\",\"value3\" : \"0.4535961214255773\",\"value4\" : \"0.48718767500700594\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"-0.5885011172553458\",\"value2\" : \"0.48718767500700594\",\"value3\" : \"-0.5885011172553458\",\"value4\" : \"0.48718767500700594\" }") -(5 rows) - --- select exp (builtin function, explain) ---Testcase 740: -EXPLAIN VERBOSE -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1527.79 rows=1462 width=32) - Output: (exp(((fields ->> 'value1'::text))::double precision)), (exp((((fields ->> 'value2'::text))::bigint)::double precision)), (exp(((fields ->> 'value3'::text))::double precision)), (exp((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT exp("value1"), exp("value2"), exp("value3"), exp("value4") FROM "s3" -(3 rows) - --- select exp (builtin function, result) ---Testcase 741: -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3; - exp | exp | exp | exp -------------------+----------------------+-------------------+---------------------- - 1.10517091807565 | 2.68811714181614e+43 | 0.90483741803596 | 3.72007597602084e-44 - 1.22140275816017 | 2.68811714181614e+43 | 0.818730753077982 | 3.72007597602084e-44 - 1.349858807576 | 2.68811714181614e+43 | 0.740818220681718 | 3.72007597602084e-44 - 3.00416602394643 | 7.22597376812575e+86 | 0.332871083698079 | 1.38389652673674e-87 - 9.02501349943412 | 7.22597376812575e+86 | 0.110803158362334 | 1.38389652673674e-87 - 27.1126389206579 | 7.22597376812575e+86 | 0.03688316740124 | 1.38389652673674e-87 -(6 rows) - --- select exp (builtin function, not pushdown constraints, explain) ---Testcase 742: -EXPLAIN VERBOSE -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (exp(((fields ->> 'value1'::text))::double precision)), (exp((((fields ->> 'value2'::text))::bigint)::double precision)), (exp(((fields ->> 'value3'::text))::double precision)), (exp((((fields ->> 'value4'::text))::bigint)::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT exp("value1"), exp("value2"), exp("value3"), exp("value4"), "value2" FROM "s3" -(4 rows) - --- select exp (builtin function, not pushdown constraints, result) ---Testcase 743: -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - exp | exp | exp | exp -------------------+----------------------+-------------------+---------------------- - 3.00416602394643 | 7.22597376812575e+86 | 0.332871083698079 | 1.38389652673674e-87 - 9.02501349943412 | 7.22597376812575e+86 | 0.110803158362334 | 1.38389652673674e-87 - 27.1126389206579 | 7.22597376812575e+86 | 0.03688316740124 | 1.38389652673674e-87 -(3 rows) - --- select exp (builtin function, pushdown constraints, explain) ---Testcase 744: -EXPLAIN VERBOSE -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (exp(((fields ->> 'value1'::text))::double precision)), (exp((((fields ->> 'value2'::text))::bigint)::double precision)), (exp(((fields ->> 'value3'::text))::double precision)), (exp((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT exp("value1"), exp("value2"), exp("value3"), exp("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select exp (builtin function, pushdown constraints, result) ---Testcase 745: -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - exp | exp | exp | exp -------------------+----------------------+-------------------+---------------------- - 1.10517091807565 | 2.68811714181614e+43 | 0.90483741803596 | 3.72007597602084e-44 - 1.22140275816017 | 2.68811714181614e+43 | 0.818730753077982 | 3.72007597602084e-44 - 1.349858807576 | 2.68811714181614e+43 | 0.740818220681718 | 3.72007597602084e-44 -(3 rows) - --- select exp as nest function with agg (pushdown, explain) ---Testcase 746: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),exp(sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (exp(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), exp(sum("value3")) FROM "s3" -(3 rows) - --- select exp as nest function with agg (pushdown, result) ---Testcase 747: -SELECT sum((fields->>'value3')::float),exp(sum((fields->>'value3')::float)) FROM s3; - sum | exp -------+--------------------- - -7.2 | 0.00074658580837668 -(1 row) - --- select exp as nest with log2 (pushdown, explain) ---Testcase 748: -EXPLAIN VERBOSE -SELECT exp(log2((fields->>'value1')::float)),exp(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (exp(log2(((fields ->> 'value1'::text))::double precision))), (exp(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT exp(log2("value1")), exp(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select exp as nest with log2 (pushdown, result) ---Testcase 749: -SELECT exp(log2((fields->>'value1')::float)),exp(log2(1/(fields->>'value1')::float)) FROM s3; - exp | exp ---------------------+------------------- - 0.0360831928207872 | 27.7137337864378 - 0.0980842873575298 | 10.1953128981289 - 0.176053809624996 | 5.68008157352602 - 1.14740574913588 | 0.87153127893346 - 3.11897219774551 | 0.320618439857474 - 5.5983170426266 | 0.178625110436908 -(6 rows) - --- select exp with non pushdown func and explicit constant (explain) ---Testcase 750: -EXPLAIN VERBOSE -SELECT exp((fields->>'value3')::float), pi(), 4.1 FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (exp(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT exp("value3") FROM "s3" -(3 rows) - --- select exp with non pushdown func and explicit constant (result) ---Testcase 751: -SELECT exp((fields->>'value3')::float), pi(), 4.1 FROM s3; - exp | pi | ?column? --------------------+------------------+---------- - 0.90483741803596 | 3.14159265358979 | 4.1 - 0.818730753077982 | 3.14159265358979 | 4.1 - 0.740818220681718 | 3.14159265358979 | 4.1 - 0.332871083698079 | 3.14159265358979 | 4.1 - 0.110803158362334 | 3.14159265358979 | 4.1 - 0.03688316740124 | 3.14159265358979 | 4.1 -(6 rows) - --- select exp with order by (explain) ---Testcase 752: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by exp(1-(fields->>'value1')::float); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (exp(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (exp(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (exp(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", exp((1 - "value1")) FROM "s3" -(6 rows) - --- select exp with order by (result) ---Testcase 753: -SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by exp(1-(fields->>'value1')::float); - value1 | exp ---------+------------------- - 3.3 | 0.100258843722804 - 2.2 | 0.301194211912202 - 1.1 | 0.90483741803596 - 0.3 | 2.01375270747048 - 0.2 | 2.22554092849247 - 0.1 | 2.45960311115695 -(6 rows) - --- select exp with order by index (result) ---Testcase 754: -SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by 2,1; - value1 | exp ---------+------------------- - 3.3 | 0.100258843722804 - 2.2 | 0.301194211912202 - 1.1 | 0.90483741803596 - 0.3 | 2.01375270747048 - 0.2 | 2.22554092849247 - 0.1 | 2.45960311115695 -(6 rows) - --- select exp with order by index (result) ---Testcase 755: -SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by 1,2; - value1 | exp ---------+------------------- - 0.1 | 2.45960311115695 - 0.2 | 2.22554092849247 - 0.3 | 2.01375270747048 - 1.1 | 0.90483741803596 - 2.2 | 0.301194211912202 - 3.3 | 0.100258843722804 -(6 rows) - --- select exp and as ---Testcase 756: -SELECT exp((fields->>'value3')::float) as exp1 FROM s3; - exp1 -------------------- - 0.90483741803596 - 0.818730753077982 - 0.740818220681718 - 0.332871083698079 - 0.110803158362334 - 0.03688316740124 -(6 rows) - --- select exp(*) (stub agg function, explain) ---Testcase 757: -EXPLAIN VERBOSE -SELECT exp_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (exp_all()) - InfluxDB query: SELECT exp(*) FROM "s3" -(3 rows) - --- select exp(*) (stub agg function, result) ---Testcase 758: -SELECT exp_all() from s3; - exp_all --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1051709180756477\",\"value2\" : \"2.6881171418161356e+43\",\"value3\" : \"0.9048374180359595\",\"value4\" : \"3.720075976020836e-44\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1.2214027581601699\",\"value2\" : \"2.6881171418161356e+43\",\"value3\" : \"0.8187307530779819\",\"value4\" : \"3.720075976020836e-44\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1.3498588075760032\",\"value2\" : \"2.6881171418161356e+43\",\"value3\" : \"0.7408182206817179\",\"value4\" : \"3.720075976020836e-44\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"3.0041660239464334\",\"value2\" : \"7.22597376812575e+86\",\"value3\" : \"0.3328710836980795\",\"value4\" : \"1.3838965267367376e-87\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"9.025013499434122\",\"value2\" : \"7.22597376812575e+86\",\"value3\" : \"0.11080315836233386\",\"value4\" : \"1.3838965267367376e-87\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"27.112638920657883\",\"value2\" : \"7.22597376812575e+86\",\"value3\" : \"0.036883167401240015\",\"value4\" : \"1.3838965267367376e-87\" }") -(6 rows) - --- select exp(*) (stub agg function and group by tag only) (explain) ---Testcase 759: -EXPLAIN VERBOSE -SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (exp_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT exp(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select exp(*) (stub agg function and group by tag only) (result) ---Testcase 760: -SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - exp_all -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1051709180756477\",\"value2\" : \"2.6881171418161356e+43\",\"value3\" : \"0.9048374180359595\",\"value4\" : \"3.720075976020836e-44\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1.2214027581601699\",\"value2\" : \"2.6881171418161356e+43\",\"value3\" : \"0.8187307530779819\",\"value4\" : \"3.720075976020836e-44\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1.3498588075760032\",\"value2\" : \"2.6881171418161356e+43\",\"value3\" : \"0.7408182206817179\",\"value4\" : \"3.720075976020836e-44\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"3.0041660239464334\",\"value2\" : \"7.22597376812575e+86\",\"value3\" : \"0.3328710836980795\",\"value4\" : \"1.3838965267367376e-87\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"9.025013499434122\",\"value2\" : \"7.22597376812575e+86\",\"value3\" : \"0.11080315836233386\",\"value4\" : \"1.3838965267367376e-87\" }") -(5 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 761: -SELECT ceil_all(), cos_all(), exp_all() FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub ceil_all() is called -CONTEXT: PL/pgSQL function ceil_all() line 3 at RAISE --- select floor (builtin function, explain) ---Testcase 762: -EXPLAIN VERBOSE -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1527.79 rows=1462 width=32) - Output: (floor(((fields ->> 'value1'::text))::double precision)), (floor((((fields ->> 'value2'::text))::bigint)::double precision)), (floor(((fields ->> 'value3'::text))::double precision)), (floor((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT floor("value1"), floor("value2"), floor("value3"), floor("value4") FROM "s3" -(3 rows) - --- select floor (builtin function, result) ---Testcase 763: -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3; - floor | floor | floor | floor --------+-------+-------+------- - 0 | 100 | -1 | -100 - 0 | 100 | -1 | -100 - 0 | 100 | -1 | -100 - 1 | 200 | -2 | -200 - 2 | 200 | -3 | -200 - 3 | 200 | -4 | -200 -(6 rows) - --- select floor (builtin function, not pushdown constraints, explain) ---Testcase 764: -EXPLAIN VERBOSE -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (floor(((fields ->> 'value1'::text))::double precision)), (floor((((fields ->> 'value2'::text))::bigint)::double precision)), (floor(((fields ->> 'value3'::text))::double precision)), (floor((((fields ->> 'value4'::text))::bigint)::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT floor("value1"), floor("value2"), floor("value3"), floor("value4"), "value2" FROM "s3" -(4 rows) - --- select floor (builtin function, not pushdown constraints, result) ---Testcase 765: -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - floor | floor | floor | floor --------+-------+-------+------- - 1 | 200 | -2 | -200 - 2 | 200 | -3 | -200 - 3 | 200 | -4 | -200 -(3 rows) - --- select floor (builtin function, pushdown constraints, explain) ---Testcase 766: -EXPLAIN VERBOSE -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (floor(((fields ->> 'value1'::text))::double precision)), (floor((((fields ->> 'value2'::text))::bigint)::double precision)), (floor(((fields ->> 'value3'::text))::double precision)), (floor((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT floor("value1"), floor("value2"), floor("value3"), floor("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select floor (builtin function, pushdown constraints, result) ---Testcase 767: -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - floor | floor | floor | floor --------+-------+-------+------- - 0 | 100 | -1 | -100 - 0 | 100 | -1 | -100 - 0 | 100 | -1 | -100 -(3 rows) - --- select floor as nest function with agg (pushdown, explain) ---Testcase 768: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),floor(sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (floor(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), floor(sum("value3")) FROM "s3" -(3 rows) - --- select floor as nest function with agg (pushdown, result) ---Testcase 769: -SELECT sum((fields->>'value3')::float),floor(sum((fields->>'value3')::float)) FROM s3; - sum | floor -------+------- - -7.2 | -8 -(1 row) - --- select floor as nest with log2 (pushdown, explain) ---Testcase 770: -EXPLAIN VERBOSE -SELECT floor(log2((fields->>'value1')::float)),floor(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (floor(log2(((fields ->> 'value1'::text))::double precision))), (floor(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT floor(log2("value1")), floor(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select floor as nest with log2 (pushdown, result) ---Testcase 771: -SELECT floor(log2((fields->>'value1')::float)),floor(log2(1/(fields->>'value1')::float)) FROM s3; - floor | floor --------+------- - -4 | 3 - -3 | 2 - -2 | 1 - 0 | -1 - 1 | -2 - 1 | -2 -(6 rows) - --- select floor with non pushdown func and explicit constant (explain) ---Testcase 772: -EXPLAIN VERBOSE -SELECT floor((fields->>'value3')::float), pi(), 4.1 FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (floor(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT floor("value3") FROM "s3" -(3 rows) - --- select floor with non pushdown func and explicit constant (result) ---Testcase 773: -SELECT floor((fields->>'value3')::float), pi(), 4.1 FROM s3; - floor | pi | ?column? --------+------------------+---------- - -1 | 3.14159265358979 | 4.1 - -1 | 3.14159265358979 | 4.1 - -1 | 3.14159265358979 | 4.1 - -2 | 3.14159265358979 | 4.1 - -3 | 3.14159265358979 | 4.1 - -4 | 3.14159265358979 | 4.1 -(6 rows) - --- select floor with order by (explain) ---Testcase 774: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by floor(1-(fields->>'value1')::float); - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (floor(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (floor(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (floor(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", floor((1 - "value1")) FROM "s3" -(6 rows) - --- select floor with order by (result) ---Testcase 775: -SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by floor(1-(fields->>'value1')::float); - value1 | floor ---------+------- - 3.3 | -3 - 2.2 | -2 - 1.1 | -1 - 0.1 | 0 - 0.2 | 0 - 0.3 | 0 -(6 rows) - --- select floor with order by index (result) ---Testcase 776: -SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by 2,1; - value1 | floor ---------+------- - 3.3 | -3 - 2.2 | -2 - 1.1 | -1 - 0.1 | 0 - 0.2 | 0 - 0.3 | 0 -(6 rows) - --- select floor with order by index (result) ---Testcase 777: -SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by 1,2; - value1 | floor ---------+------- - 0.1 | 0 - 0.2 | 0 - 0.3 | 0 - 1.1 | -1 - 2.2 | -2 - 3.3 | -3 -(6 rows) - --- select floor and as ---Testcase 778: -SELECT floor((fields->>'value3')::float) as floor1 FROM s3; - floor1 --------- - -1 - -1 - -1 - -2 - -3 - -4 -(6 rows) - --- select floor(*) (stub agg function, explain) ---Testcase 779: -EXPLAIN VERBOSE -SELECT floor_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (floor_all()) - InfluxDB query: SELECT floor(*) FROM "s3" -(3 rows) - --- select floor(*) (stub agg function, result) ---Testcase 780: -SELECT floor_all() from s3; - floor_all ----------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1\",\"value2\" : \"200\",\"value3\" : \"-2\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2\",\"value2\" : \"200\",\"value3\" : \"-3\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"3\",\"value2\" : \"200\",\"value3\" : \"-4\",\"value4\" : \"-200\" }") -(6 rows) - --- select floor(*) (stub agg function and group by tag only) (explain) ---Testcase 781: -EXPLAIN VERBOSE -SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (floor_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT floor(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select floor(*) (stub agg function and group by tag only) (result) ---Testcase 782: -SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - floor_all ----------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-1\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1\",\"value2\" : \"200\",\"value3\" : \"-2\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2\",\"value2\" : \"200\",\"value3\" : \"-3\",\"value4\" : \"-200\" }") -(5 rows) - --- select floor(*) (stub agg function, expose data, explain) ---Testcase 783: -EXPLAIN VERBOSE -SELECT (floor_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((floor_all()))::s3)."time", (((floor_all()))::s3).tags, (((floor_all()))::s3).fields - InfluxDB query: SELECT floor(*) FROM "s3" -(3 rows) - --- select floor(*) (stub agg function, expose data, result) ---Testcase 784: -SELECT (floor_all()::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0", "value2": "100", "value3": "-1", "value4": "-100"} - 1970-01-01 09:00:01+09 | | {"value1": "0", "value2": "100", "value3": "-1", "value4": "-100"} - 1970-01-01 09:00:02+09 | | {"value1": "0", "value2": "100", "value3": "-1", "value4": "-100"} - 1970-01-01 09:00:03+09 | | {"value1": "1", "value2": "200", "value3": "-2", "value4": "-200"} - 1970-01-01 09:00:04+09 | | {"value1": "2", "value2": "200", "value3": "-3", "value4": "-200"} - 1970-01-01 09:00:05+09 | | {"value1": "3", "value2": "200", "value3": "-4", "value4": "-200"} -(6 rows) - --- select ln (builtin function, explain) ---Testcase 785: -EXPLAIN VERBOSE -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1494.89 rows=1462 width=16) - Output: (ln(((fields ->> 'value1'::text))::double precision)), (ln((((fields ->> 'value2'::text))::bigint)::double precision)) - InfluxDB query: SELECT ln("value1"), ln("value2") FROM "s3" -(3 rows) - --- select ln (builtin function, result) ---Testcase 786: -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3; - ln | ln ---------------------+------------------ - -2.30258509299405 | 4.60517018598809 - -1.6094379124341 | 4.60517018598809 - -1.20397280432594 | 4.60517018598809 - 0.0953101798043249 | 5.29831736654804 - 0.78845736036427 | 5.29831736654804 - 1.19392246847243 | 5.29831736654804 -(6 rows) - --- select ln (builtin function, not pushdown constraints, explain) ---Testcase 787: -EXPLAIN VERBOSE -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1487.74 rows=1455 width=16) - Output: (ln(((fields ->> 'value1'::text))::double precision)), (ln((((fields ->> 'value2'::text))::bigint)::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT ln("value1"), ln("value2"), "value2" FROM "s3" -(4 rows) - --- select ln (builtin function, not pushdown constraints, result) ---Testcase 788: -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - ln | ln ---------------------+------------------ - 0.0953101798043249 | 5.29831736654804 - 0.78845736036427 | 5.29831736654804 - 1.19392246847243 | 5.29831736654804 -(3 rows) - --- select ln (builtin function, pushdown constraints, explain) ---Testcase 789: -EXPLAIN VERBOSE -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1487.74 rows=1455 width=16) - Output: (ln(((fields ->> 'value1'::text))::double precision)), (ln((((fields ->> 'value2'::text))::bigint)::double precision)) - InfluxDB query: SELECT ln("value1"), ln("value2") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select ln (builtin function, pushdown constraints, result) ---Testcase 790: -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - ln | ln --------------------+------------------ - -2.30258509299405 | 4.60517018598809 - -1.6094379124341 | 4.60517018598809 - -1.20397280432594 | 4.60517018598809 -(3 rows) - --- select ln as nest function with agg (pushdown, explain) ---Testcase 791: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),ln(sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (ln(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), ln(sum("value3")) FROM "s3" -(3 rows) - --- select ln as nest function with agg (pushdown, result) ---Testcase 792: -SELECT sum((fields->>'value3')::float),ln(sum((fields->>'value3')::float)) FROM s3; - sum | ln -------+---- - -7.2 | -(1 row) - --- select ln as nest with log2 (pushdown, explain) ---Testcase 793: -EXPLAIN VERBOSE -SELECT ln(log2((fields->>'value1')::float)),ln(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (ln(log2(((fields ->> 'value1'::text))::double precision))), (ln(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT ln(log2("value1")), ln(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select ln as nest with log2 (pushdown, result) ---Testcase 794: -SELECT ln(log2((fields->>'value1')::float)),ln(log2(1/(fields->>'value1')::float)) FROM s3; - ln | ln --------------------+------------------- - | 1.20054536582962 - | 0.842397915908775 - | 0.55213967944403 - -1.98410573493163 | - 0.128835969640311 | - 0.54375699916606 | -(6 rows) - --- select ln with non pushdown func and explicit constant (explain) ---Testcase 795: -EXPLAIN VERBOSE -SELECT ln((fields->>'value3')::float), pi(), 4.1 FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (ln(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT ln("value3") FROM "s3" -(3 rows) - --- select ln with non pushdown func and explicit constant (result) ---Testcase 796: -SELECT ln((fields->>'value3')::float), pi(), 4.1 FROM s3; - ln | pi | ?column? -----+------------------+---------- - | 3.14159265358979 | 4.1 - | 3.14159265358979 | 4.1 - | 3.14159265358979 | 4.1 - | 3.14159265358979 | 4.1 - | 3.14159265358979 | 4.1 - | 3.14159265358979 | 4.1 -(6 rows) - --- select ln with order by (explain) ---Testcase 797: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by ln(1-(fields->>'value1')::float); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------- - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (ln(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (ln(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (ln(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", ln((1 - "value1")) FROM "s3" -(6 rows) - --- select ln with order by (result) ---Testcase 798: -SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by ln(1-(fields->>'value1')::float); - value1 | ln ---------+-------------------- - 0.3 | -0.356674943938732 - 0.2 | -0.22314355131421 - 0.1 | -0.105360515657826 - 1.1 | - 2.2 | - 3.3 | -(6 rows) - --- select ln with order by index (result) ---Testcase 799: -SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by 2,1; - value1 | ln ---------+-------------------- - 0.3 | -0.356674943938732 - 0.2 | -0.22314355131421 - 0.1 | -0.105360515657826 - 1.1 | - 2.2 | - 3.3 | -(6 rows) - --- select ln with order by index (result) ---Testcase 800: -SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by 1,2; - value1 | ln ---------+-------------------- - 0.1 | -0.105360515657826 - 0.2 | -0.22314355131421 - 0.3 | -0.356674943938732 - 1.1 | - 2.2 | - 3.3 | -(6 rows) - --- select ln and as ---Testcase 801: -SELECT ln((fields->>'value1')::float) as ln1 FROM s3; - ln1 --------------------- - -2.30258509299405 - -1.6094379124341 - -1.20397280432594 - 0.0953101798043249 - 0.78845736036427 - 1.19392246847243 -(6 rows) - --- select ln(*) (stub agg function, explain) ---Testcase 802: -EXPLAIN VERBOSE -SELECT ln_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (ln_all()) - InfluxDB query: SELECT ln(*) FROM "s3" -(3 rows) - --- select ln(*) (stub agg function, result) ---Testcase 803: -SELECT ln_all() from s3; - ln_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"-2.3025850929940455\",\"value2\" : \"4.605170185988092\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"-1.6094379124341003\",\"value2\" : \"4.605170185988092\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"-1.2039728043259361\",\"value2\" : \"4.605170185988092\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.09531017980432493\",\"value2\" : \"5.298317366548036\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.7884573603642703\",\"value2\" : \"5.298317366548036\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"1.1939224684724346\",\"value2\" : \"5.298317366548036\",\"value3\" : null,\"value4\" : null }") -(6 rows) - --- select ln(*) (stub agg function and group by tag only) (explain) ---Testcase 804: -EXPLAIN VERBOSE -SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (ln_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT ln(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select ln(*) (stub agg function and group by tag only) (result) ---Testcase 805: -SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - ln_all ------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"-2.3025850929940455\",\"value2\" : \"4.605170185988092\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"-1.6094379124341003\",\"value2\" : \"4.605170185988092\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"-1.2039728043259361\",\"value2\" : \"4.605170185988092\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.09531017980432493\",\"value2\" : \"5.298317366548036\",\"value3\" : null,\"value4\" : null }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.7884573603642703\",\"value2\" : \"5.298317366548036\",\"value3\" : null,\"value4\" : null }") -(5 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 806: -SELECT ln_all(), floor_all() FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub ln_all() is called -CONTEXT: PL/pgSQL function ln_all() line 3 at RAISE --- select pow (builtin function, explain) ---Testcase 807: -EXPLAIN VERBOSE -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1527.79 rows=1462 width=32) - Output: (pow(((fields ->> 'value1'::text))::double precision, '2'::double precision)), (pow((((fields ->> 'value2'::text))::bigint)::double precision, '2'::double precision)), (pow(((fields ->> 'value3'::text))::double precision, '2'::double precision)), (pow((((fields ->> 'value4'::text))::bigint)::double precision, '2'::double precision)) - InfluxDB query: SELECT pow("value1", 2), pow("value2", 2), pow("value3", 2), pow("value4", 2) FROM "s3" -(3 rows) - --- select pow (builtin function, result) ---Testcase 808: -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3; - pow | pow | pow | pow --------+-------+-------+------- - 0.01 | 10000 | 0.01 | 10000 - 0.04 | 10000 | 0.04 | 10000 - 0.09 | 10000 | 0.09 | 10000 - 1.21 | 40000 | 1.21 | 40000 - 4.84 | 40000 | 4.84 | 40000 - 10.89 | 40000 | 10.89 | 40000 -(6 rows) - --- select pow (builtin function, not pushdown constraints, explain) ---Testcase 809: -EXPLAIN VERBOSE -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (pow(((fields ->> 'value1'::text))::double precision, '2'::double precision)), (pow((((fields ->> 'value2'::text))::bigint)::double precision, '2'::double precision)), (pow(((fields ->> 'value3'::text))::double precision, '2'::double precision)), (pow((((fields ->> 'value4'::text))::bigint)::double precision, '2'::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT pow("value1", 2), pow("value2", 2), pow("value3", 2), pow("value4", 2), "value2" FROM "s3" -(4 rows) - --- select pow (builtin function, not pushdown constraints, result) ---Testcase 810: -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - pow | pow | pow | pow --------+-------+-------+------- - 1.21 | 40000 | 1.21 | 40000 - 4.84 | 40000 | 4.84 | 40000 - 10.89 | 40000 | 10.89 | 40000 -(3 rows) - --- select pow (builtin function, pushdown constraints, explain) ---Testcase 811: -EXPLAIN VERBOSE -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (pow(((fields ->> 'value1'::text))::double precision, '2'::double precision)), (pow((((fields ->> 'value2'::text))::bigint)::double precision, '2'::double precision)), (pow(((fields ->> 'value3'::text))::double precision, '2'::double precision)), (pow((((fields ->> 'value4'::text))::bigint)::double precision, '2'::double precision)) - InfluxDB query: SELECT pow("value1", 2), pow("value2", 2), pow("value3", 2), pow("value4", 2) FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select pow (builtin function, pushdown constraints, result) ---Testcase 812: -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE (fields->>'value2')::bigint != 200; - pow | pow | pow | pow -------+-------+------+------- - 0.01 | 10000 | 0.01 | 10000 - 0.04 | 10000 | 0.04 | 10000 - 0.09 | 10000 | 0.09 | 10000 -(3 rows) - --- select pow as nest function with agg (pushdown, explain) ---Testcase 813: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),pow(sum((fields->>'value3')::float), 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (pow(sum(((fields ->> 'value3'::text))::double precision), '2'::double precision)) - InfluxDB query: SELECT sum("value3"), pow(sum("value3"), 2) FROM "s3" -(3 rows) - --- select pow as nest function with agg (pushdown, result) ---Testcase 814: -SELECT sum((fields->>'value3')::float),pow(sum((fields->>'value3')::float), 2) FROM s3; - sum | pow -------+------- - -7.2 | 51.84 -(1 row) - --- select pow as nest with log2 (pushdown, explain) ---Testcase 815: -EXPLAIN VERBOSE -SELECT pow(log2((fields->>'value1')::float), 2),pow(log2(1/(fields->>'value1')::float), 2) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (pow(log2(((fields ->> 'value1'::text))::double precision), '2'::double precision)), (pow(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)), '2'::double precision)) - InfluxDB query: SELECT pow(log2("value1"), 2), pow(log2((1 / "value1")), 2) FROM "s3" -(3 rows) - --- select pow as nest with log2 (pushdown, result) ---Testcase 816: -SELECT pow(log2((fields->>'value1')::float), 2),pow(log2(1/(fields->>'value1')::float), 2) FROM s3; - pow | pow ---------------------+-------------------- - 11.035206267602 | 11.035206267602 - 5.39135007782725 | 5.39135007782725 - 3.01704947531716 | 3.01704947531716 - 0.0189072190436489 | 0.0189072190436489 - 1.29391426654352 | 1.29391426654352 - 2.96688920545725 | 2.96688920545725 -(6 rows) - --- select pow with non pushdown func and explicit constant (explain) ---Testcase 817: -EXPLAIN VERBOSE -SELECT pow((fields->>'value3')::float, 2), pi(), 4.1 FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (pow(((fields ->> 'value3'::text))::double precision, '2'::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT pow("value3", 2) FROM "s3" -(3 rows) - --- select pow with non pushdown func and explicit constant (result) ---Testcase 818: -SELECT pow((fields->>'value3')::float, 2), pi(), 4.1 FROM s3; - pow | pi | ?column? --------+------------------+---------- - 0.01 | 3.14159265358979 | 4.1 - 0.04 | 3.14159265358979 | 4.1 - 0.09 | 3.14159265358979 | 4.1 - 1.21 | 3.14159265358979 | 4.1 - 4.84 | 3.14159265358979 | 4.1 - 10.89 | 3.14159265358979 | 4.1 -(6 rows) - --- select pow with order by (explain) ---Testcase 819: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by pow(1-(fields->>'value1')::float, 2); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (pow(('1'::double precision - ((fields ->> 'value1'::text))::double precision), '2'::double precision)) - Sort Key: (pow(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision), '2'::double precision)) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (pow(('1'::double precision - ((fields ->> 'value1'::text))::double precision), '2'::double precision)) - InfluxDB query: SELECT "value1", pow((1 - "value1"), 2) FROM "s3" -(6 rows) - --- select pow with order by (result) ---Testcase 820: -SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by pow(1-(fields->>'value1')::float, 2); - value1 | pow ---------+------ - 1.1 | 0.01 - 0.3 | 0.49 - 0.2 | 0.64 - 0.1 | 0.81 - 2.2 | 1.44 - 3.3 | 5.29 -(6 rows) - --- select pow with order by index (result) ---Testcase 821: -SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by 2,1; - value1 | pow ---------+------ - 1.1 | 0.01 - 0.3 | 0.49 - 0.2 | 0.64 - 0.1 | 0.81 - 2.2 | 1.44 - 3.3 | 5.29 -(6 rows) - --- select pow with order by index (result) ---Testcase 822: -SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by 1,2; - value1 | pow ---------+------ - 0.1 | 0.81 - 0.2 | 0.64 - 0.3 | 0.49 - 1.1 | 0.01 - 2.2 | 1.44 - 3.3 | 5.29 -(6 rows) - --- select pow and as ---Testcase 823: -SELECT pow((fields->>'value3')::float, 2) as pow1 FROM s3; - pow1 -------- - 0.01 - 0.04 - 0.09 - 1.21 - 4.84 - 10.89 -(6 rows) - --- select pow_all(2) (stub agg function, explain) ---Testcase 824: -EXPLAIN VERBOSE -SELECT pow_all(2) from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (pow_all(2)) - InfluxDB query: SELECT pow(*, 2) FROM "s3" -(3 rows) - --- select pow_all(2) (stub agg function, result) ---Testcase 825: -SELECT pow_all(2) from s3; - pow_all --------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.010000000000000002\",\"value2\" : \"10000\",\"value3\" : \"0.010000000000000002\",\"value4\" : \"10000\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.04000000000000001\",\"value2\" : \"10000\",\"value3\" : \"0.04000000000000001\",\"value4\" : \"10000\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09\",\"value2\" : \"10000\",\"value3\" : \"0.09\",\"value4\" : \"10000\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.2100000000000002\",\"value2\" : \"40000\",\"value3\" : \"1.2100000000000002\",\"value4\" : \"40000\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"4.840000000000001\",\"value2\" : \"40000\",\"value3\" : \"4.840000000000001\",\"value4\" : \"40000\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"10.889999999999999\",\"value2\" : \"40000\",\"value3\" : \"10.889999999999999\",\"value4\" : \"40000\" }") -(6 rows) - --- select pow_all(2) (stub agg function and group by tag only) (explain) ---Testcase 826: -EXPLAIN VERBOSE -SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (pow_all(2)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT pow(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select pow_all(2) (stub agg function and group by tag only) (result) ---Testcase 827: -SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - pow_all --------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.010000000000000002\",\"value2\" : \"10000\",\"value3\" : \"0.010000000000000002\",\"value4\" : \"10000\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.04000000000000001\",\"value2\" : \"10000\",\"value3\" : \"0.04000000000000001\",\"value4\" : \"10000\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09\",\"value2\" : \"10000\",\"value3\" : \"0.09\",\"value4\" : \"10000\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.2100000000000002\",\"value2\" : \"40000\",\"value3\" : \"1.2100000000000002\",\"value4\" : \"40000\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"4.840000000000001\",\"value2\" : \"40000\",\"value3\" : \"4.840000000000001\",\"value4\" : \"40000\" }") -(5 rows) - --- select pow_all(2) (stub agg function, expose data, explain) ---Testcase 828: -EXPLAIN VERBOSE -SELECT (pow_all(2)::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((pow_all(2)))::s3)."time", (((pow_all(2)))::s3).tags, (((pow_all(2)))::s3).fields - InfluxDB query: SELECT pow(*, 2) FROM "s3" -(3 rows) - --- select pow_all(2) (stub agg function, expose data, result) ---Testcase 829: -SELECT (pow_all(2)::s3).* from s3; - time | tags | fields -------------------------+------+------------------------------------------------------------------------------------------------------------ - 1970-01-01 09:00:00+09 | | {"value1": "0.010000000000000002", "value2": "10000", "value3": "0.010000000000000002", "value4": "10000"} - 1970-01-01 09:00:01+09 | | {"value1": "0.04000000000000001", "value2": "10000", "value3": "0.04000000000000001", "value4": "10000"} - 1970-01-01 09:00:02+09 | | {"value1": "0.09", "value2": "10000", "value3": "0.09", "value4": "10000"} - 1970-01-01 09:00:03+09 | | {"value1": "1.2100000000000002", "value2": "40000", "value3": "1.2100000000000002", "value4": "40000"} - 1970-01-01 09:00:04+09 | | {"value1": "4.840000000000001", "value2": "40000", "value3": "4.840000000000001", "value4": "40000"} - 1970-01-01 09:00:05+09 | | {"value1": "10.889999999999999", "value2": "40000", "value3": "10.889999999999999", "value4": "40000"} -(6 rows) - --- select round (builtin function, explain) ---Testcase 830: -EXPLAIN VERBOSE -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1527.79 rows=1462 width=32) - Output: (round(((fields ->> 'value1'::text))::double precision)), (round((((fields ->> 'value2'::text))::bigint)::double precision)), (round(((fields ->> 'value3'::text))::double precision)), (round((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT round("value1"), round("value2"), round("value3"), round("value4") FROM "s3" -(3 rows) - --- select round (builtin function, result) ---Testcase 831: -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3; - round | round | round | round --------+-------+-------+------- - 0 | 100 | -0 | -100 - 0 | 100 | -0 | -100 - 0 | 100 | -0 | -100 - 1 | 200 | -1 | -200 - 2 | 200 | -2 | -200 - 3 | 200 | -3 | -200 -(6 rows) - --- select round (builtin function, not pushdown constraints, explain) ---Testcase 832: -EXPLAIN VERBOSE -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (round(((fields ->> 'value1'::text))::double precision)), (round((((fields ->> 'value2'::text))::bigint)::double precision)), (round(((fields ->> 'value3'::text))::double precision)), (round((((fields ->> 'value4'::text))::bigint)::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT round("value1"), round("value2"), round("value3"), round("value4"), "value2" FROM "s3" -(4 rows) - --- select round (builtin function, not pushdown constraints, result) ---Testcase 833: -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - round | round | round | round --------+-------+-------+------- - 1 | 200 | -1 | -200 - 2 | 200 | -2 | -200 - 3 | 200 | -3 | -200 -(3 rows) - --- select round (builtin function, pushdown constraints, explain) ---Testcase 834: -EXPLAIN VERBOSE -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (round(((fields ->> 'value1'::text))::double precision)), (round((((fields ->> 'value2'::text))::bigint)::double precision)), (round(((fields ->> 'value3'::text))::double precision)), (round((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT round("value1"), round("value2"), round("value3"), round("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select round (builtin function, pushdown constraints, result) ---Testcase 835: -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - round | round | round | round --------+-------+-------+------- - 0 | 100 | -0 | -100 - 0 | 100 | -0 | -100 - 0 | 100 | -0 | -100 -(3 rows) - --- select round as nest function with agg (pushdown, explain) ---Testcase 836: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),round(sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (round(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), round(sum("value3")) FROM "s3" -(3 rows) - --- select round as nest function with agg (pushdown, result) ---Testcase 837: -SELECT sum((fields->>'value3')::float),round(sum((fields->>'value3')::float)) FROM s3; - sum | round -------+------- - -7.2 | -7 -(1 row) - --- select round as nest with log2 (pushdown, explain) ---Testcase 838: -EXPLAIN VERBOSE -SELECT round(log2((fields->>'value1')::float)),round(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (round(log2(((fields ->> 'value1'::text))::double precision))), (round(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT round(log2("value1")), round(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select round as nest with log2 (pushdown, result) ---Testcase 839: -SELECT round(log2((fields->>'value1')::float)),round(log2(1/(fields->>'value1')::float)) FROM s3; - round | round --------+------- - -3 | 3 - -2 | 2 - -2 | 2 - 0 | -0 - 1 | -1 - 2 | -2 -(6 rows) - --- select round with non pushdown func and roundlicit constant (explain) ---Testcase 840: -EXPLAIN VERBOSE -SELECT round((fields->>'value3')::float), pi(), 4.1 FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (round(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT round("value3") FROM "s3" -(3 rows) - --- select round with non pushdown func and roundlicit constant (result) ---Testcase 841: -SELECT round((fields->>'value3')::float), pi(), 4.1 FROM s3; - round | pi | ?column? --------+------------------+---------- - -0 | 3.14159265358979 | 4.1 - -0 | 3.14159265358979 | 4.1 - -0 | 3.14159265358979 | 4.1 - -1 | 3.14159265358979 | 4.1 - -2 | 3.14159265358979 | 4.1 - -3 | 3.14159265358979 | 4.1 -(6 rows) - --- select round with order by (explain) ---Testcase 842: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by round(1-(fields->>'value1')::float); - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (round(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (round(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (round(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", round((1 - "value1")) FROM "s3" -(6 rows) - --- select round with order by (result) ---Testcase 843: -SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by round(1-(fields->>'value1')::float); - value1 | round ---------+------- - 3.3 | -2 - 2.2 | -1 - 1.1 | -0 - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 -(6 rows) - --- select round with order by index (result) ---Testcase 844: -SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by 2,1; - value1 | round ---------+------- - 3.3 | -2 - 2.2 | -1 - 1.1 | -0 - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 -(6 rows) - --- select round with order by index (result) ---Testcase 845: -SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by 1,2; - value1 | round ---------+------- - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 - 1.1 | -0 - 2.2 | -1 - 3.3 | -2 -(6 rows) - --- select round and as ---Testcase 846: -SELECT round((fields->>'value3')::float) as round1 FROM s3; - round1 --------- - -0 - -0 - -0 - -1 - -2 - -3 -(6 rows) - --- select round(*) (stub agg function, explain) ---Testcase 847: -EXPLAIN VERBOSE -SELECT round_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (round_all()) - InfluxDB query: SELECT round(*) FROM "s3" -(3 rows) - --- select round(*) (stub agg function, result) ---Testcase 848: -SELECT round_all() from s3; - round_all ----------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1\",\"value2\" : \"200\",\"value3\" : \"-1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2\",\"value2\" : \"200\",\"value3\" : \"-2\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"3\",\"value2\" : \"200\",\"value3\" : \"-3\",\"value4\" : \"-200\" }") -(6 rows) - --- select round(*) (stub agg function and group by tag only) (explain) ---Testcase 849: -EXPLAIN VERBOSE -SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (round_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT round(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select round(*) (stub agg function and group by tag only) (result) ---Testcase 850: -SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - round_all ----------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1\",\"value2\" : \"200\",\"value3\" : \"-1\",\"value4\" : \"-200\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"2\",\"value2\" : \"200\",\"value3\" : \"-2\",\"value4\" : \"-200\" }") -(5 rows) - --- select round(*) (stub agg function, expose data, explain) ---Testcase 851: -EXPLAIN VERBOSE -SELECT (round_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..6023.94 rows=3413 width=72) - Output: (((round_all()))::s3)."time", (((round_all()))::s3).tags, (((round_all()))::s3).fields - InfluxDB query: SELECT round(*) FROM "s3" -(3 rows) - --- select round(*) (stub agg function, expose data, result) ---Testcase 852: -SELECT (round_all()::s3).* from s3; - time | tags | fields -------------------------+------+-------------------------------------------------------------------- - 1970-01-01 09:00:00+09 | | {"value1": "0", "value2": "100", "value3": "-0", "value4": "-100"} - 1970-01-01 09:00:01+09 | | {"value1": "0", "value2": "100", "value3": "-0", "value4": "-100"} - 1970-01-01 09:00:02+09 | | {"value1": "0", "value2": "100", "value3": "-0", "value4": "-100"} - 1970-01-01 09:00:03+09 | | {"value1": "1", "value2": "200", "value3": "-1", "value4": "-200"} - 1970-01-01 09:00:04+09 | | {"value1": "2", "value2": "200", "value3": "-2", "value4": "-200"} - 1970-01-01 09:00:05+09 | | {"value1": "3", "value2": "200", "value3": "-3", "value4": "-200"} -(6 rows) - --- select sin (builtin function, explain) ---Testcase 853: -EXPLAIN VERBOSE -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1527.79 rows=1462 width=32) - Output: (sin(((fields ->> 'value1'::text))::double precision)), (sin((((fields ->> 'value2'::text))::bigint)::double precision)), (sin(((fields ->> 'value3'::text))::double precision)), (sin((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT sin("value1"), sin("value2"), sin("value3"), sin("value4") FROM "s3" -(3 rows) - --- select sin (builtin function, result) ---Testcase 854: -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3; - sin | sin | sin | sin ---------------------+--------------------+---------------------+------------------- - 0.0998334166468282 | -0.506365641109759 | -0.0998334166468282 | 0.506365641109759 - 0.198669330795061 | -0.506365641109759 | -0.198669330795061 | 0.506365641109759 - 0.29552020666134 | -0.506365641109759 | -0.29552020666134 | 0.506365641109759 - 0.891207360061435 | -0.873297297213995 | -0.891207360061435 | 0.873297297213995 - 0.80849640381959 | -0.873297297213995 | -0.80849640381959 | 0.873297297213995 - -0.157745694143248 | -0.873297297213995 | 0.157745694143248 | 0.873297297213995 -(6 rows) - --- select sin (builtin function, not pushdown constraints, explain) ---Testcase 855: -EXPLAIN VERBOSE -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (sin(((fields ->> 'value1'::text))::double precision)), (sin((((fields ->> 'value2'::text))::bigint)::double precision)), (sin(((fields ->> 'value3'::text))::double precision)), (sin((((fields ->> 'value4'::text))::bigint)::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT sin("value1"), sin("value2"), sin("value3"), sin("value4"), "value2" FROM "s3" -(4 rows) - --- select sin (builtin function, not pushdown constraints, result) ---Testcase 856: -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - sin | sin | sin | sin ---------------------+--------------------+--------------------+------------------- - 0.891207360061435 | -0.873297297213995 | -0.891207360061435 | 0.873297297213995 - 0.80849640381959 | -0.873297297213995 | -0.80849640381959 | 0.873297297213995 - -0.157745694143248 | -0.873297297213995 | 0.157745694143248 | 0.873297297213995 -(3 rows) - --- select sin (builtin function, pushdown constraints, explain) ---Testcase 857: -EXPLAIN VERBOSE -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (sin(((fields ->> 'value1'::text))::double precision)), (sin((((fields ->> 'value2'::text))::bigint)::double precision)), (sin(((fields ->> 'value3'::text))::double precision)), (sin((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT sin("value1"), sin("value2"), sin("value3"), sin("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select sin (builtin function, pushdown constraints, result) ---Testcase 858: -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - sin | sin | sin | sin ---------------------+--------------------+---------------------+------------------- - 0.0998334166468282 | -0.506365641109759 | -0.0998334166468282 | 0.506365641109759 - 0.198669330795061 | -0.506365641109759 | -0.198669330795061 | 0.506365641109759 - 0.29552020666134 | -0.506365641109759 | -0.29552020666134 | 0.506365641109759 -(3 rows) - --- select sin as nest function with agg (pushdown, explain) ---Testcase 859: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),sin(sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (sin(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), sin(sum("value3")) FROM "s3" -(3 rows) - --- select sin as nest function with agg (pushdown, result) ---Testcase 860: -SELECT sum((fields->>'value3')::float),sin(sum((fields->>'value3')::float)) FROM s3; - sum | sin -------+-------------------- - -7.2 | -0.793667863849153 -(1 row) - --- select sin as nest with log2 (pushdown, explain) ---Testcase 861: -EXPLAIN VERBOSE -SELECT sin(log2((fields->>'value1')::float)),sin(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (sin(log2(((fields ->> 'value1'::text))::double precision))), (sin(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT sin(log2("value1")), sin(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select sin as nest with log2 (pushdown, result) ---Testcase 862: -SELECT sin(log2((fields->>'value1')::float)),sin(log2(1/(fields->>'value1')::float)) FROM s3; - sin | sin ---------------------+-------------------- - 0.179359585152268 | -0.179359585152268 - -0.730916943429606 | 0.730916943429606 - -0.986225626190124 | 0.986225626190124 - 0.137070631651469 | -0.137070631651469 - 0.907588150958134 | -0.907588150958134 - 0.988520183257111 | -0.988520183257111 -(6 rows) - --- select sin with non pushdown func and explicit constant (explain) ---Testcase 863: -EXPLAIN VERBOSE -SELECT sin((fields->>'value3')::float), pi(), 4.1 FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (sin(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT sin("value3") FROM "s3" -(3 rows) - --- select sin with non pushdown func and explicit constant (result) ---Testcase 864: -SELECT sin((fields->>'value3')::float), pi(), 4.1 FROM s3; - sin | pi | ?column? ----------------------+------------------+---------- - -0.0998334166468282 | 3.14159265358979 | 4.1 - -0.198669330795061 | 3.14159265358979 | 4.1 - -0.29552020666134 | 3.14159265358979 | 4.1 - -0.891207360061435 | 3.14159265358979 | 4.1 - -0.80849640381959 | 3.14159265358979 | 4.1 - 0.157745694143248 | 3.14159265358979 | 4.1 -(6 rows) - --- select sin with order by (explain) ---Testcase 865: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by sin(1-(fields->>'value1')::float); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (sin(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (sin(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (sin(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", sin((1 - "value1")) FROM "s3" -(6 rows) - --- select sin with order by (result) ---Testcase 866: -SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by sin(1-(fields->>'value1')::float); - value1 | sin ---------+--------------------- - 2.2 | -0.932039085967226 - 3.3 | -0.74570521217672 - 1.1 | -0.0998334166468282 - 0.3 | 0.644217687237691 - 0.2 | 0.717356090899523 - 0.1 | 0.783326909627483 -(6 rows) - --- select sin with order by index (result) ---Testcase 867: -SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by 2,1; - value1 | sin ---------+--------------------- - 2.2 | -0.932039085967226 - 3.3 | -0.74570521217672 - 1.1 | -0.0998334166468282 - 0.3 | 0.644217687237691 - 0.2 | 0.717356090899523 - 0.1 | 0.783326909627483 -(6 rows) - --- select sin with order by index (result) ---Testcase 868: -SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by 1,2; - value1 | sin ---------+--------------------- - 0.1 | 0.783326909627483 - 0.2 | 0.717356090899523 - 0.3 | 0.644217687237691 - 1.1 | -0.0998334166468282 - 2.2 | -0.932039085967226 - 3.3 | -0.74570521217672 -(6 rows) - --- select sin and as ---Testcase 869: -SELECT sin((fields->>'value3')::float) as sin1 FROM s3; - sin1 ---------------------- - -0.0998334166468282 - -0.198669330795061 - -0.29552020666134 - -0.891207360061435 - -0.80849640381959 - 0.157745694143248 -(6 rows) - --- select sin(*) (stub agg function, explain) ---Testcase 870: -EXPLAIN VERBOSE -SELECT sin_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (sin_all()) - InfluxDB query: SELECT sin(*) FROM "s3" -(3 rows) - --- select sin(*) (stub agg function, result) ---Testcase 871: -SELECT sin_all() from s3; - sin_all ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.09983341664682815\",\"value2\" : \"-0.5063656411097588\",\"value3\" : \"-0.09983341664682815\",\"value4\" : \"0.5063656411097588\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.19866933079506122\",\"value2\" : \"-0.5063656411097588\",\"value3\" : \"-0.19866933079506122\",\"value4\" : \"0.5063656411097588\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.29552020666133955\",\"value2\" : \"-0.5063656411097588\",\"value3\" : \"-0.29552020666133955\",\"value4\" : \"0.5063656411097588\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8912073600614354\",\"value2\" : \"-0.8732972972139945\",\"value3\" : \"-0.8912073600614354\",\"value4\" : \"0.8732972972139945\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.8084964038195901\",\"value2\" : \"-0.8732972972139945\",\"value3\" : \"-0.8084964038195901\",\"value4\" : \"0.8732972972139945\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"-0.1577456941432482\",\"value2\" : \"-0.8732972972139945\",\"value3\" : \"0.1577456941432482\",\"value4\" : \"0.8732972972139945\" }") -(6 rows) - --- select sin(*) (stub agg function and group by tag only) (explain) ---Testcase 872: -EXPLAIN VERBOSE -SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (sin_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT sin(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select sin(*) (stub agg function and group by tag only) (result) ---Testcase 873: -SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - sin_all ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.09983341664682815\",\"value2\" : \"-0.5063656411097588\",\"value3\" : \"-0.09983341664682815\",\"value4\" : \"0.5063656411097588\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.19866933079506122\",\"value2\" : \"-0.5063656411097588\",\"value3\" : \"-0.19866933079506122\",\"value4\" : \"0.5063656411097588\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.29552020666133955\",\"value2\" : \"-0.5063656411097588\",\"value3\" : \"-0.29552020666133955\",\"value4\" : \"0.5063656411097588\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8912073600614354\",\"value2\" : \"-0.8732972972139945\",\"value3\" : \"-0.8912073600614354\",\"value4\" : \"0.8732972972139945\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.8084964038195901\",\"value2\" : \"-0.8732972972139945\",\"value3\" : \"-0.8084964038195901\",\"value4\" : \"0.8732972972139945\" }") -(5 rows) - --- select tan (builtin function, explain) ---Testcase 874: -EXPLAIN VERBOSE -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1527.79 rows=1462 width=32) - Output: (tan(((fields ->> 'value1'::text))::double precision)), (tan((((fields ->> 'value2'::text))::bigint)::double precision)), (tan(((fields ->> 'value3'::text))::double precision)), (tan((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT tan("value1"), tan("value2"), tan("value3"), tan("value4") FROM "s3" -(3 rows) - --- select tan (builtin function, result) ---Testcase 875: -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3; - tan | tan | tan | tan --------------------+--------------------+--------------------+------------------- - 0.100334672085451 | -0.587213915156929 | -0.100334672085451 | 0.587213915156929 - 0.202710035508673 | -0.587213915156929 | -0.202710035508673 | 0.587213915156929 - 0.309336249609623 | -0.587213915156929 | -0.309336249609623 | 0.587213915156929 - 1.96475965724865 | -1.79252748379038 | -1.96475965724865 | 1.79252748379038 - -1.37382305676879 | -1.79252748379038 | 1.37382305676879 | 1.79252748379038 - 0.159745747660032 | -1.79252748379038 | -0.159745747660032 | 1.79252748379038 -(6 rows) - --- select tan (builtin function, not pushdown constraints, explain) ---Testcase 876: -EXPLAIN VERBOSE -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (tan(((fields ->> 'value1'::text))::double precision)), (tan((((fields ->> 'value2'::text))::bigint)::double precision)), (tan(((fields ->> 'value3'::text))::double precision)), (tan((((fields ->> 'value4'::text))::bigint)::double precision)) - Filter: (to_hex((((s3.fields ->> 'value2'::text)))::bigint) <> '64'::text) - InfluxDB query: SELECT tan("value1"), tan("value2"), tan("value3"), tan("value4"), "value2" FROM "s3" -(4 rows) - --- select tan (builtin function, not pushdown constraints, result) ---Testcase 877: -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - tan | tan | tan | tan --------------------+-------------------+--------------------+------------------ - 1.96475965724865 | -1.79252748379038 | -1.96475965724865 | 1.79252748379038 - -1.37382305676879 | -1.79252748379038 | 1.37382305676879 | 1.79252748379038 - 0.159745747660032 | -1.79252748379038 | -0.159745747660032 | 1.79252748379038 -(3 rows) - --- select tan (builtin function, pushdown constraints, explain) ---Testcase 878: -EXPLAIN VERBOSE -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1520.47 rows=1455 width=32) - Output: (tan(((fields ->> 'value1'::text))::double precision)), (tan((((fields ->> 'value2'::text))::bigint)::double precision)), (tan(((fields ->> 'value3'::text))::double precision)), (tan((((fields ->> 'value4'::text))::bigint)::double precision)) - InfluxDB query: SELECT tan("value1"), tan("value2"), tan("value3"), tan("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select tan (builtin function, pushdown constraints, result) ---Testcase 879: -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - tan | tan | tan | tan --------------------+--------------------+--------------------+------------------- - 0.100334672085451 | -0.587213915156929 | -0.100334672085451 | 0.587213915156929 - 0.202710035508673 | -0.587213915156929 | -0.202710035508673 | 0.587213915156929 - 0.309336249609623 | -0.587213915156929 | -0.309336249609623 | 0.587213915156929 -(3 rows) - --- select tan as nest function with agg (pushdown, explain) ---Testcase 880: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),tan(sum((fields->>'value3')::float)) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(((fields ->> 'value3'::text))::double precision)), (tan(sum(((fields ->> 'value3'::text))::double precision))) - InfluxDB query: SELECT sum("value3"), tan(sum("value3")) FROM "s3" -(3 rows) - --- select tan as nest function with agg (pushdown, result) ---Testcase 881: -SELECT sum((fields->>'value3')::float),tan(sum((fields->>'value3')::float)) FROM s3; - sum | tan -------+------------------- - -7.2 | -1.30462094005564 -(1 row) - --- select tan as nest with log2 (pushdown, explain) ---Testcase 882: -EXPLAIN VERBOSE -SELECT tan(log2((fields->>'value1')::float)),tan(log2(1/(fields->>'value1')::float)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2225.89 rows=1462 width=16) - Output: (tan(log2(((fields ->> 'value1'::text))::double precision))), (tan(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)))) - InfluxDB query: SELECT tan(log2("value1")), tan(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select tan as nest with log2 (pushdown, result) ---Testcase 883: -SELECT tan(log2((fields->>'value1')::float)),tan(log2(1/(fields->>'value1')::float)) FROM s3; - tan | tan ---------------------+-------------------- - -0.182316098942755 | 0.182316098942755 - 1.07099326240692 | -1.07099326240692 - 5.96246798734261 | -5.96246798734261 - 0.138376731397261 | -0.138376731397261 - 2.16163657107617 | -2.16163657107617 - -6.54264056025779 | 6.54264056025779 -(6 rows) - --- select tan with non pushdown func and tanlicit constant (explain) ---Testcase 884: -EXPLAIN VERBOSE -SELECT tan((fields->>'value3')::float), pi(), 4.1 FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.62 rows=1462 width=48) - Output: (tan(((fields ->> 'value3'::text))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT tan("value3") FROM "s3" -(3 rows) - --- select tan with non pushdown func and tanlicit constant (result) ---Testcase 885: -SELECT tan((fields->>'value3')::float), pi(), 4.1 FROM s3; - tan | pi | ?column? ---------------------+------------------+---------- - -0.100334672085451 | 3.14159265358979 | 4.1 - -0.202710035508673 | 3.14159265358979 | 4.1 - -0.309336249609623 | 3.14159265358979 | 4.1 - -1.96475965724865 | 3.14159265358979 | 4.1 - 1.37382305676879 | 3.14159265358979 | 4.1 - -0.159745747660032 | 3.14159265358979 | 4.1 -(6 rows) - --- select tan with order by (explain) ---Testcase 886: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by tan(1-(fields->>'value1')::float); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Sort (cost=1568.10..1571.75 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (tan(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - Sort Key: (tan(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..1491.24 rows=1462 width=16) - Output: (((fields ->> 'value1'::text))::double precision), (tan(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) - InfluxDB query: SELECT "value1", tan((1 - "value1")) FROM "s3" -(6 rows) - --- select tan with order by (result) ---Testcase 887: -SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by tan(1-(fields->>'value1')::float); - value1 | tan ---------+-------------------- - 2.2 | -2.57215162212632 - 1.1 | -0.100334672085451 - 0.3 | 0.842288380463079 - 0.2 | 1.02963855705036 - 3.3 | 1.11921364173413 - 0.1 | 1.26015821755034 -(6 rows) - --- select tan with order by index (result) ---Testcase 888: -SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by 2,1; - value1 | tan ---------+-------------------- - 2.2 | -2.57215162212632 - 1.1 | -0.100334672085451 - 0.3 | 0.842288380463079 - 0.2 | 1.02963855705036 - 3.3 | 1.11921364173413 - 0.1 | 1.26015821755034 -(6 rows) - --- select tan with order by index (result) ---Testcase 889: -SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by 1,2; - value1 | tan ---------+-------------------- - 0.1 | 1.26015821755034 - 0.2 | 1.02963855705036 - 0.3 | 0.842288380463079 - 1.1 | -0.100334672085451 - 2.2 | -2.57215162212632 - 3.3 | 1.11921364173413 -(6 rows) - --- select tan and as ---Testcase 890: -SELECT tan((fields->>'value3')::float) as tan1 FROM s3; - tan1 --------------------- - -0.100334672085451 - -0.202710035508673 - -0.309336249609623 - -1.96475965724865 - 1.37382305676879 - -0.159745747660032 -(6 rows) - --- select tan(*) (stub agg function, explain) ---Testcase 891: -EXPLAIN VERBOSE -SELECT tan_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (tan_all()) - InfluxDB query: SELECT tan(*) FROM "s3" -(3 rows) - --- select tan(*) (stub agg function, result) ---Testcase 892: -SELECT tan_all() from s3; - tan_all ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.10033467208545055\",\"value2\" : \"-0.587213915156929\",\"value3\" : \"-0.10033467208545055\",\"value4\" : \"0.587213915156929\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2027100355086725\",\"value2\" : \"-0.587213915156929\",\"value3\" : \"-0.2027100355086725\",\"value4\" : \"0.587213915156929\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.30933624960962325\",\"value2\" : \"-0.587213915156929\",\"value3\" : \"-0.30933624960962325\",\"value4\" : \"0.587213915156929\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.9647596572486523\",\"value2\" : \"-1.7925274837903817\",\"value3\" : \"-1.9647596572486523\",\"value4\" : \"1.7925274837903817\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"-1.3738230567687948\",\"value2\" : \"-1.7925274837903817\",\"value3\" : \"1.3738230567687948\",\"value4\" : \"1.7925274837903817\" }") - (1970-01-01T00:00:05Z,,"{\"value1\" : \"0.15974574766003222\",\"value2\" : \"-1.7925274837903817\",\"value3\" : \"-0.15974574766003222\",\"value4\" : \"1.7925274837903817\" }") -(6 rows) - --- select tan(*) (stub agg function and group by tag only) (explain) ---Testcase 893: -EXPLAIN VERBOSE -SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (tan_all()), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT tan(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select tan(*) (stub agg function and group by tag only) (result) ---Testcase 894: -SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - tan_all --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.10033467208545055\",\"value2\" : \"-0.587213915156929\",\"value3\" : \"-0.10033467208545055\",\"value4\" : \"0.587213915156929\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2027100355086725\",\"value2\" : \"-0.587213915156929\",\"value3\" : \"-0.2027100355086725\",\"value4\" : \"0.587213915156929\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.30933624960962325\",\"value2\" : \"-0.587213915156929\",\"value3\" : \"-0.30933624960962325\",\"value4\" : \"0.587213915156929\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.9647596572486523\",\"value2\" : \"-1.7925274837903817\",\"value3\" : \"-1.9647596572486523\",\"value4\" : \"1.7925274837903817\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"-1.3738230567687948\",\"value2\" : \"-1.7925274837903817\",\"value3\" : \"1.3738230567687948\",\"value4\" : \"1.7925274837903817\" }") -(5 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 895: -SELECT sin_all(), round_all(), tan_all() FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub sin_all() is called -CONTEXT: PL/pgSQL function sin_all() line 3 at RAISE --- select predictors function holt_winters() (explain) ---Testcase 896: -EXPLAIN VERBOSE -SELECT holt_winters(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (holt_winters(min(((fields ->> 'value1'::text))::double precision), 5, 1)), (influx_time("time", '@ 1 sec'::interval)) - InfluxDB query: SELECT holt_winters(min("value1"), 5, 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)) -(3 rows) - --- select predictors function holt_winters() (result) ---Testcase 897: -SELECT holt_winters(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - holt_winters ------------------- - 5.18746006560853 - 13.2933307845701 - 37.5847742625017 - 116.557520596579 - 392.431171307496 -(5 rows) - --- select predictors function holt_winters_with_fit() (explain) ---Testcase 898: -EXPLAIN VERBOSE -SELECT holt_winters_with_fit(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (holt_winters_with_fit(min(((fields ->> 'value1'::text))::double precision), 5, 1)), (influx_time("time", '@ 1 sec'::interval)) - InfluxDB query: SELECT holt_winters_with_fit(min("value1"), 5, 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)) -(3 rows) - --- select predictors function holt_winters_with_fit() (result) ---Testcase 899: -SELECT holt_winters_with_fit(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - holt_winters_with_fit ------------------------ - 0.1 - 0.146569361982582 - 0.449297189927864 - 1.00876071385362 - 2.21894136309638 - 5.18746006560853 - 13.2933307845701 - 37.5847742625017 - 116.557520596579 - 392.431171307496 -(10 rows) - --- select count(*) function of InfluxDB (stub agg function, explain) ---Testcase 900: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_count_all(*)) - InfluxDB query: SELECT count(*) FROM "s3" -(3 rows) - --- select count(*) function of InfluxDB (stub agg function, result) ---Testcase 901: -SELECT influx_count_all(*) FROM s3; - influx_count_all ----------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"6\",\"value2\" : \"6\",\"value3\" : \"6\",\"value4\" : \"6\" }") -(1 row) - --- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (explain) ---Testcase 902: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_count_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT count(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (result) ---Testcase 903: -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_count_all ----------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") - (1970-01-01T00:00:03Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") - (1970-01-01T00:00:04Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") -(10 rows) - --- select count(*) function of InfluxDB (stub agg function and group by tag only) (explain) ---Testcase 904: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_count_all(*)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT count(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select count(*) function of InfluxDB (stub agg function and group by tag only) (result) ---Testcase 905: -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - influx_count_all ----------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,"{\"value1\" : \"3\",\"value2\" : \"3\",\"value3\" : \"3\",\"value4\" : \"3\" }") - (1970-01-01T00:00:00Z,,"{\"value1\" : \"2\",\"value2\" : \"2\",\"value3\" : \"2\",\"value4\" : \"2\" }") -(2 rows) - --- select count(*) function of InfluxDB over join query (explain) ---Testcase 906: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Aggregate (cost=26.88..26.89 rows=1 width=32) - Output: influx_count_all(*) - -> Nested Loop (cost=20.00..14.63 rows=49 width=0) - -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..7.04 rows=7 width=32) - Output: t2.fields - -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) - Output: t2.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(11 rows) - --- select count(*) function of InfluxDB over join query (result, stub call error) ---Testcase 907: -SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; -ERROR: stub influx_count_all_sfunc(text) is called -CONTEXT: PL/pgSQL function influx_count_all_sfunc(text) line 3 at RAISE --- select distinct (stub agg function, explain) ---Testcase 908: -EXPLAIN VERBOSE -SELECT influx_distinct((fields->>'value1')::float) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=8) - Output: (influx_distinct(((fields ->> 'value1'::text))::double precision)) - InfluxDB query: SELECT distinct("value1") FROM "s3" -(3 rows) - --- select distinct (stub agg function, result) ---Testcase 909: -SELECT influx_distinct((fields->>'value1')::float) FROM s3; - influx_distinct ------------------ - 0.1 - 0.2 - 0.3 - 1.1 - 2.2 - 3.3 -(6 rows) - --- select distinct (stub agg function and group by influx_time() and tag) (explain) ---Testcase 910: -EXPLAIN VERBOSE -SELECT influx_distinct((fields->>'value1')::float), influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (influx_distinct(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT distinct("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") -(3 rows) - --- select distinct (stub agg function and group by influx_time() and tag) (result) ---Testcase 911: -SELECT influx_distinct((fields->>'value1')::float), influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - influx_distinct | influx_time | tag1 ------------------+------------------------+------ - 0.1 | 1970-01-01 09:00:00+09 | a - 0.2 | 1970-01-01 09:00:01+09 | a - 0.3 | 1970-01-01 09:00:02+09 | a - 1.1 | 1970-01-01 09:00:03+09 | b - 2.2 | 1970-01-01 09:00:04+09 | b -(5 rows) - --- select distinct (stub agg function and group by tag only) (explain) ---Testcase 912: -EXPLAIN VERBOSE -SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (influx_distinct(((fields ->> 'value2'::text))::bigint)), ((tags ->> 'tag1'::text)) - InfluxDB query: SELECT distinct("value2") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") -(3 rows) - --- select distinct (stub agg function and group by tag only) (result) ---Testcase 913: -SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - influx_distinct ------------------ - 100 - 200 -(2 rows) - --- select distinct over join query (explain) ---Testcase 914: -EXPLAIN VERBOSE -SELECT influx_distinct((t1.fields->>'value2')::bigint) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Aggregate (cost=27.25..27.26 rows=1 width=8) - Output: influx_distinct(((t1.fields ->> 'value2'::text))::bigint) - -> Nested Loop (cost=20.00..14.63 rows=49 width=32) - Output: t1.fields - -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) - Output: t1."time", t1.tags, t1.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..7.04 rows=7 width=32) - Output: t2.fields - -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) - Output: t2.fields - InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select distinct over join query (result, stub call error) ---Testcase 915: -SELECT influx_distinct((t1.fields->>'value2')::bigint) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; -ERROR: stub influx_distinct_sfunc(anyelement, anyelement) is called -CONTEXT: PL/pgSQL function influx_distinct_sfunc(anyelement,anyelement) line 3 at RAISE --- select distinct with having (explain) ---Testcase 916: -EXPLAIN VERBOSE -SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 HAVING influx_distinct((fields->>'value2')::bigint) > 100; - QUERY PLAN ------------------------------------------------------------------------------ - Aggregate (cost=2214.93..2214.94 rows=1 width=8) - Output: influx_distinct(((fields ->> 'value2'::text))::bigint) - Filter: (influx_distinct(((s3.fields ->> 'value2'::text))::bigint) > 100) - -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) - Output: "time", tags, fields - InfluxDB query: SELECT * FROM "s3" -(6 rows) - --- select distinct with having (result, not pushdown, stub call error) ---Testcase 917: -SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 HAVING influx_distinct((fields->>'value2')::bigint) > 100; -ERROR: stub influx_distinct_sfunc(anyelement, anyelement) is called -CONTEXT: PL/pgSQL function influx_distinct_sfunc(anyelement,anyelement) line 3 at RAISE ---Testcase 918: -DROP FOREIGN TABLE s3; ---Testcase 919: -CREATE FOREIGN TABLE b3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 'b3', tags 'tag1', schemaless 'true'); --- bool type var in where clause (result) ---Testcase 920: -EXPLAIN VERBOSE -SELECT sqrt(abs((fields->>'value1')::float)) FROM b3 WHERE (fields->>'value3')::boolean != true ORDER BY 1; - QUERY PLAN ------------------------------------------------------------------------------- - Sort (cost=774.91..776.74 rows=731 width=8) - Output: (sqrt(abs(((fields ->> 'value1'::text))::double precision))) - Sort Key: (sqrt(abs(((b3.fields ->> 'value1'::text))::double precision))) - -> Foreign Scan (cost=10.00..740.14 rows=731 width=8) - Output: (sqrt(abs(((fields ->> 'value1'::text))::double precision))) - Filter: (NOT (((b3.fields ->> 'value3'::text)))::boolean) - InfluxDB query: SELECT sqrt(abs("value1")), "value3" FROM "b3" -(7 rows) - --- bool type var in where clause (result) ---Testcase 921: -SELECT sqrt(abs((fields->>'value1')::float)) FROM b3 WHERE (fields->>'value3')::boolean != true ORDER BY 1; - sqrt -------------------- - 0.447213595499958 - 1.04880884817015 - 1.81659021245849 -(3 rows) - ---Testcase 922: -DROP FOREIGN TABLE b3; ---Testcase 923: -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 924: -DROP SERVER server1; ---Testcase 925: -DROP EXTENSION influxdb_fdw; diff --git a/expected/10.18/selectfunc.out b/expected/10.18/selectfunc.out deleted file mode 100644 index 4f62dc9..0000000 --- a/expected/10.18/selectfunc.out +++ /dev/null @@ -1,10104 +0,0 @@ ---Testcase 1: -SET datestyle=ISO; ---Testcase 2: -SET timezone='Japan'; -\set ECHO none ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); ---Testcase 6: -CREATE FOREIGN TABLE s3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 float8, value4 bigint) SERVER server1 OPTIONS(table 's3', tags 'tag1'); --- s3 (value1 as float8, value2 as bigint) ---Testcase 7: -\d s3; - Foreign table "public.s3" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+------------- - time | timestamp with time zone | | | | - tag1 | text | | | | - value1 | double precision | | | | - value2 | bigint | | | | - value3 | double precision | | | | - value4 | bigint | | | | -Server: server1 -FDW options: ("table" 's3', tags 'tag1') - ---Testcase 8: -SELECT * FROM s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | a | 0.1 | 100 | -0.1 | -100 - 1970-01-01 09:00:01+09 | a | 0.2 | 100 | -0.2 | -100 - 1970-01-01 09:00:02+09 | a | 0.3 | 100 | -0.3 | -100 - 1970-01-01 09:00:03+09 | b | 1.1 | 200 | -1.1 | -200 - 1970-01-01 09:00:04+09 | b | 2.2 | 200 | -2.2 | -200 - 1970-01-01 09:00:05+09 | b | 3.3 | 200 | -3.3 | -200 -(6 rows) - --- select float8() (not pushdown, remove float8, explain) ---Testcase 9: -EXPLAIN VERBOSE -SELECT float8(value1), float8(value2), float8(value3), float8(value4) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------- - Foreign Scan on public.s3 (cost=10.00..1469.31 rows=1462 width=32) - Output: value1, float8(value2), value3, float8(value4) - InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" -(3 rows) - --- select float8() (not pushdown, remove float8, result) ---Testcase 10: -SELECT float8(value1), float8(value2), float8(value3), float8(value4) FROM s3; - float8 | float8 | float8 | float8 ---------+--------+--------+-------- - 0.1 | 100 | -0.1 | -100 - 0.2 | 100 | -0.2 | -100 - 0.3 | 100 | -0.3 | -100 - 1.1 | 200 | -1.1 | -200 - 2.2 | 200 | -2.2 | -200 - 3.3 | 200 | -3.3 | -200 -(6 rows) - --- select sqrt (builtin function, explain) ---Testcase 11: -EXPLAIN VERBOSE -SELECT sqrt(value1), sqrt(value2) FROM s3; - QUERY PLAN -------------------------------------------------------------------- - Foreign Scan (cost=10.00..2063.36 rows=2048 width=16) - Output: (sqrt(value1)), (sqrt((value2)::double precision)) - InfluxDB query: SELECT sqrt("value1"), sqrt("value2") FROM "s3" -(3 rows) - --- select sqrt (builtin function, result) ---Testcase 12: -SELECT sqrt(value1), sqrt(value2) FROM s3; - sqrt | sqrt --------------------+----------------- - 0.316227766016838 | 10 - 0.447213595499958 | 10 - 0.547722557505166 | 10 - 1.04880884817015 | 14.142135623731 - 1.48323969741913 | 14.142135623731 - 1.81659021245849 | 14.142135623731 -(6 rows) - --- select sqrt (builtin function, not pushdown constraints, explain) ---Testcase 13: -EXPLAIN VERBOSE -SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2053.28 rows=2038 width=16) - Output: (sqrt(value1)), (sqrt((value2)::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT sqrt("value1"), sqrt("value2"), "value2" FROM "s3" -(4 rows) - --- select sqrt (builtin function, not pushdown constraints, result) ---Testcase 14: -SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE to_hex(value2) != '64'; - sqrt | sqrt -------------------+----------------- - 1.04880884817015 | 14.142135623731 - 1.48323969741913 | 14.142135623731 - 1.81659021245849 | 14.142135623731 -(3 rows) - --- select sqrt (builtin function, pushdown constraints, explain) ---Testcase 15: -EXPLAIN VERBOSE -SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE value2 != 200; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2053.28 rows=2038 width=16) - Output: (sqrt(value1)), (sqrt((value2)::double precision)) - InfluxDB query: SELECT sqrt("value1"), sqrt("value2") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select sqrt (builtin function, pushdown constraints, result) ---Testcase 16: -SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE value2 != 200; - sqrt | sqrt --------------------+------ - 0.316227766016838 | 10 - 0.447213595499958 | 10 - 0.547722557505166 | 10 -(3 rows) - --- select sqrt(*) (stub agg function, explain) ---Testcase 17: -EXPLAIN VERBOSE -SELECT sqrt_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (sqrt_all()) - InfluxDB query: SELECT sqrt(*) FROM "s3" -(3 rows) - --- select sqrt(*) (stub agg function, result) ---Testcase 18: -SELECT sqrt_all() from s3; - sqrt_all ------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,0.31622776601683794,10,,) - (1970-01-01T00:00:01Z,,0.4472135954999579,10,,) - (1970-01-01T00:00:02Z,,0.5477225575051661,10,,) - (1970-01-01T00:00:03Z,,1.0488088481701516,14.142135623730951,,) - (1970-01-01T00:00:04Z,,1.4832396974191326,14.142135623730951,,) - (1970-01-01T00:00:05Z,,1.816590212458495,14.142135623730951,,) -(6 rows) - --- select sqrt(*) (stub agg function and group by tag only) (explain) ---Testcase 19: -EXPLAIN VERBOSE -SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (sqrt_all()), tag1 - InfluxDB query: SELECT sqrt(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select sqrt(*) (stub agg function and group by tag only) (result) ---Testcase 20: -SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - sqrt_all ------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,0.31622776601683794,10,,) - (1970-01-01T00:00:01Z,,0.4472135954999579,10,,) - (1970-01-01T00:00:02Z,,0.5477225575051661,10,,) - (1970-01-01T00:00:03Z,,1.0488088481701516,14.142135623730951,,) - (1970-01-01T00:00:04Z,,1.4832396974191326,14.142135623730951,,) -(5 rows) - --- select abs (builtin function, explain) ---Testcase 21: -EXPLAIN VERBOSE -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..1476.62 rows=1462 width=32) - Output: (abs(value1)), (abs(value2)), (abs(value3)), (abs(value4)) - InfluxDB query: SELECT abs("value1"), abs("value2"), abs("value3"), abs("value4") FROM "s3" -(3 rows) - --- ABS() returns negative values if integer (https://github.com/influxdata/influxdb/issues/10261) --- select abs (builtin function, result) ---Testcase 22: -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3; - abs | abs | abs | abs ------+-----+-----+----- - 0.1 | 100 | 0.1 | 100 - 0.2 | 100 | 0.2 | 100 - 0.3 | 100 | 0.3 | 100 - 1.1 | 200 | 1.1 | 200 - 2.2 | 200 | 2.2 | 200 - 3.3 | 200 | 3.3 | 200 -(6 rows) - --- select abs (builtin function, not pushdown constraints, explain) ---Testcase 23: -EXPLAIN VERBOSE -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1469.55 rows=1455 width=32) - Output: (abs(value1)), (abs(value2)), (abs(value3)), (abs(value4)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT abs("value1"), abs("value2"), abs("value3"), abs("value4"), "value2" FROM "s3" -(4 rows) - --- select abs (builtin function, not pushdown constraints, result) ---Testcase 24: -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE to_hex(value2) != '64'; - abs | abs | abs | abs ------+-----+-----+----- - 1.1 | 200 | 1.1 | 200 - 2.2 | 200 | 2.2 | 200 - 3.3 | 200 | 3.3 | 200 -(3 rows) - --- select abs (builtin function, pushdown constraints, explain) ---Testcase 25: -EXPLAIN VERBOSE -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE value2 != 200; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1469.55 rows=1455 width=32) - Output: (abs(value1)), (abs(value2)), (abs(value3)), (abs(value4)) - InfluxDB query: SELECT abs("value1"), abs("value2"), abs("value3"), abs("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select abs (builtin function, pushdown constraints, result) ---Testcase 26: -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE value2 != 200; - abs | abs | abs | abs ------+-----+-----+----- - 0.1 | 100 | 0.1 | 100 - 0.2 | 100 | 0.2 | 100 - 0.3 | 100 | 0.3 | 100 -(3 rows) - --- select log (builtin function, need to swap arguments, numeric cast, explain) --- log_(v) : postgresql (base, v), influxdb (v, base) ---Testcase 27: -EXPLAIN VERBOSE -SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; - QUERY PLAN ------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2053.28 rows=2038 width=32) - Output: (log((value1)::numeric, (value2)::numeric)) - InfluxDB query: SELECT log("value2", "value1") FROM "s3" WHERE (("value1" <> 1)) -(3 rows) - --- select log (builtin function, need to swap arguments, numeric cast, result) ---Testcase 28: -SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; - log ---------------------- - -2.0000000000000004 - -2.8613531161467867 - -3.824978578786397 - 55.590256753535286 - 6.719852756654074 - 4.43773989221174 -(6 rows) - --- select log (builtin function, need to swap arguments, float8, explain) ---Testcase 29: -EXPLAIN VERBOSE -SELECT log(value1::numeric, 0.1) FROM s3 WHERE value1 != 1; - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2559.74 rows=2547 width=32) - Output: (log((value1)::numeric, 0.1)) - InfluxDB query: SELECT log(0.1, "value1") FROM "s3" WHERE (("value1" <> 1)) -(3 rows) - --- select log (builtin function, need to swap arguments, float8, result) ---Testcase 30: -SELECT log(value1::numeric, 0.1) FROM s3 WHERE value1 != 1; - log ---------------------- - 1 - 1.430676558073393 - 1.912489289393198 - -24.158857928096783 - -2.92036730043365 - -1.9285884584617043 -(6 rows) - --- select log (builtin function, need to swap arguments, bigint, explain) ---Testcase 31: -EXPLAIN VERBOSE -SELECT log(value2::numeric, 3::numeric) FROM s3 WHERE value1 != 1; - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2559.74 rows=2547 width=32) - Output: (log((value2)::numeric, '3'::numeric)) - InfluxDB query: SELECT log(3, "value2") FROM "s3" WHERE (("value1" <> 1)) -(3 rows) - --- select log (builtin function, need to swap arguments, bigint, result) ---Testcase 32: -SELECT log(value2::numeric, 3::numeric) FROM s3 WHERE value1 != 1; - log ---------------------- - 0.23856062735983116 - 0.23856062735983116 - 0.23856062735983116 - 0.2073511669203535 - 0.2073511669203535 - 0.2073511669203535 -(6 rows) - --- select log (builtin function, need to swap arguments, mix type, explain) ---Testcase 33: -EXPLAIN VERBOSE -SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; - QUERY PLAN ------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2053.28 rows=2038 width=32) - Output: (log((value1)::numeric, (value2)::numeric)) - InfluxDB query: SELECT log("value2", "value1") FROM "s3" WHERE (("value1" <> 1)) -(3 rows) - --- select log (builtin function, need to swap arguments, mix type, result) ---Testcase 34: -SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; - log ---------------------- - -2.0000000000000004 - -2.8613531161467867 - -3.824978578786397 - 55.590256753535286 - 6.719852756654074 - 4.43773989221174 -(6 rows) - --- select log(*) (stub agg function, explain) ---Testcase 35: -EXPLAIN VERBOSE -SELECT log_all(50) FROM s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (log_all('50'::double precision)) - InfluxDB query: SELECT log(*, 50) FROM "s3" -(3 rows) - --- select log(*) (stub agg function, result) ---Testcase 36: -SELECT log_all(50) FROM s3; - log_all -------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,-0.5885919100677789,1.177183820135558,,) - (1970-01-01T00:00:01Z,,-0.41140808993222105,1.177183820135558,,) - (1970-01-01T00:00:02Z,,-0.3077621994183976,1.177183820135558,,) - (1970-01-01T00:00:03Z,,0.024363399620113902,1.3543676402711158,,) - (1970-01-01T00:00:04Z,,0.20154721975567183,1.3543676402711158,,) - (1970-01-01T00:00:05Z,,0.3051931102694953,1.3543676402711158,,) -(6 rows) - --- select log(*) (stub agg function, explain) ---Testcase 37: -EXPLAIN VERBOSE -SELECT log_all(70.5) FROM s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (log_all('70.5'::double precision)) - InfluxDB query: SELECT log(*, 70.5) FROM "s3" -(3 rows) - --- select log(*) (stub agg function, result) ---Testcase 38: -SELECT log_all(70.5) FROM s3; - log_all -------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,-0.5410701701500463,1.0821403403000929,,) - (1970-01-01T00:00:01Z,,-0.3781918191758683,1.0821403403000929,,) - (1970-01-01T00:00:02Z,,-0.28291409167667503,1.0821403403000929,,) - (1970-01-01T00:00:03Z,,0.02239634720152814,1.2450186912742707,,) - (1970-01-01T00:00:04Z,,0.18527469817570616,1.2450186912742707,,) - (1970-01-01T00:00:05Z,,0.28055242567489946,1.2450186912742707,,) -(6 rows) - --- select log(*) (stub agg function and group by tag only) (explain) ---Testcase 39: -EXPLAIN VERBOSE -SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (log_all('50'::double precision)), tag1 - InfluxDB query: SELECT log(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select log(*) (stub agg function and group by tag only) (result) ---Testcase 40: -SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - log_all -------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,-0.5885919100677789,1.177183820135558,,) - (1970-01-01T00:00:01Z,,-0.41140808993222105,1.177183820135558,,) - (1970-01-01T00:00:02Z,,-0.3077621994183976,1.177183820135558,,) - (1970-01-01T00:00:03Z,,0.024363399620113902,1.3543676402711158,,) - (1970-01-01T00:00:04Z,,0.20154721975567183,1.3543676402711158,,) -(5 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 41: -SELECT ln_all(),log10_all(),log_all(50) FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub ln_all() is called -CONTEXT: PL/pgSQL function ln_all() line 3 at RAISE --- select log2 (stub function, explain) ---Testcase 42: -EXPLAIN VERBOSE -SELECT log2(value1),log2(value2) FROM s3; - QUERY PLAN -------------------------------------------------------------------- - Foreign Scan (cost=10.00..3077.12 rows=2048 width=16) - Output: (log2(value1)), (log2((value2)::double precision)) - InfluxDB query: SELECT log2("value1"), log2("value2") FROM "s3" -(3 rows) - --- select log2 (stub function, result) ---Testcase 43: -SELECT log2(value1),log2(value2) FROM s3; - log2 | log2 --------------------+------------------ - -3.32192809488736 | 6.64385618977472 - -2.32192809488736 | 6.64385618977472 - -1.73696559416621 | 6.64385618977472 - 0.137503523749935 | 7.64385618977472 - 1.13750352374994 | 7.64385618977472 - 1.72246602447109 | 7.64385618977472 -(6 rows) - --- select log2(*) (stub agg function, explain) ---Testcase 44: -EXPLAIN VERBOSE -SELECT log2_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (log2_all()) - InfluxDB query: SELECT log2(*) FROM "s3" -(3 rows) - --- select log2(*) (stub agg function, result) ---Testcase 45: -SELECT log2_all() from s3; - log2_all ------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,-3.321928094887362,6.643856189774724,,) - (1970-01-01T00:00:01Z,,-2.321928094887362,6.643856189774724,,) - (1970-01-01T00:00:02Z,,-1.736965594166206,6.643856189774724,,) - (1970-01-01T00:00:03Z,,0.13750352374993502,7.643856189774724,,) - (1970-01-01T00:00:04Z,,1.1375035237499351,7.643856189774724,,) - (1970-01-01T00:00:05Z,,1.722466024471091,7.643856189774724,,) -(6 rows) - --- select log2(*) (stub agg function and group by tag only) (explain) ---Testcase 46: -EXPLAIN VERBOSE -SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (log2_all()), tag1 - InfluxDB query: SELECT log2(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select log2(*) (stub agg function and group by tag only) (result) ---Testcase 47: -SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - log2_all ------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,-3.321928094887362,6.643856189774724,,) - (1970-01-01T00:00:01Z,,-2.321928094887362,6.643856189774724,,) - (1970-01-01T00:00:02Z,,-1.736965594166206,6.643856189774724,,) - (1970-01-01T00:00:03Z,,0.13750352374993502,7.643856189774724,,) - (1970-01-01T00:00:04Z,,1.1375035237499351,7.643856189774724,,) -(5 rows) - --- select log10 (stub function, explain) ---Testcase 48: -EXPLAIN VERBOSE -SELECT log10(value1),log10(value2) FROM s3; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan (cost=10.00..3077.12 rows=2048 width=16) - Output: (log10(value1)), (log10((value2)::double precision)) - InfluxDB query: SELECT log10("value1"), log10("value2") FROM "s3" -(3 rows) - --- select log10 (stub function, result) ---Testcase 49: -SELECT log10(value1),log10(value2) FROM s3; - log10 | log10 ---------------------+------------------ - -1 | 2 - -0.698970004336019 | 2 - -0.522878745280338 | 2 - 0.0413926851582251 | 2.30102999566398 - 0.342422680822206 | 2.30102999566398 - 0.518513939877888 | 2.30102999566398 -(6 rows) - --- select log10(*) (stub agg function, explain) ---Testcase 50: -EXPLAIN VERBOSE -SELECT log10_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (log10_all()) - InfluxDB query: SELECT log10(*) FROM "s3" -(3 rows) - --- select log10(*) (stub agg function, result) ---Testcase 51: -SELECT log10_all() from s3; - log10_all ------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,-0.9999999999999999,2,,) - (1970-01-01T00:00:01Z,,-0.6989700043360187,2,,) - (1970-01-01T00:00:02Z,,-0.5228787452803376,2,,) - (1970-01-01T00:00:03Z,,0.04139268515822507,2.301029995663981,,) - (1970-01-01T00:00:04Z,,0.3424226808222063,2.301029995663981,,) - (1970-01-01T00:00:05Z,,0.5185139398778875,2.301029995663981,,) -(6 rows) - --- select log10(*) (stub agg function and group by tag only) (explain) ---Testcase 52: -EXPLAIN VERBOSE -SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (log10_all()), tag1 - InfluxDB query: SELECT log10(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select log10(*) (stub agg function and group by tag only) (result) ---Testcase 53: -SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - log10_all ------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,-0.9999999999999999,2,,) - (1970-01-01T00:00:01Z,,-0.6989700043360187,2,,) - (1970-01-01T00:00:02Z,,-0.5228787452803376,2,,) - (1970-01-01T00:00:03Z,,0.04139268515822507,2.301029995663981,,) - (1970-01-01T00:00:04Z,,0.3424226808222063,2.301029995663981,,) -(5 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 54: -SELECT log2_all(), log10_all() FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub log2_all() is called -CONTEXT: PL/pgSQL function log2_all() line 3 at RAISE --- select spread (stub agg function, explain) ---Testcase 55: -EXPLAIN VERBOSE -SELECT spread(value1),spread(value2),spread(value3),spread(value4) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (spread(value1)), (spread(value2)), (spread(value3)), (spread(value4)) - InfluxDB query: SELECT spread("value1"), spread("value2"), spread("value3"), spread("value4") FROM "s3" -(3 rows) - --- select spread (stub agg function, result) ---Testcase 56: -SELECT spread(value1),spread(value2),spread(value3),spread(value4) FROM s3; - spread | spread | spread | spread ---------+--------+--------+-------- - 3.2 | 100 | 3.2 | 100 -(1 row) - --- select spread (stub agg function, raise exception if not expected type) ---Testcase 57: -SELECT spread(value1::numeric),spread(value2::numeric),spread(value3::numeric),spread(value4::numeric) FROM s3; -ERROR: stub spread_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE --- select abs as nest function with agg (pushdown, explain) ---Testcase 58: -EXPLAIN VERBOSE -SELECT sum(value3),abs(sum(value3)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (abs(sum(value3))) - InfluxDB query: SELECT sum("value3"), abs(sum("value3")) FROM "s3" -(3 rows) - --- select abs as nest function with agg (pushdown, result) ---Testcase 59: -SELECT sum(value3),abs(sum(value3)) FROM s3; - sum | abs -------+----- - -7.2 | 7.2 -(1 row) - --- select abs as nest with log2 (pushdown, explain) ---Testcase 60: -EXPLAIN VERBOSE -SELECT abs(log2(value1)),abs(log2(1/value1)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (abs(log2(value1))), (abs(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT abs(log2("value1")), abs(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select abs as nest with log2 (pushdown, result) ---Testcase 61: -SELECT abs(log2(value1)),abs(log2(1/value1)) FROM s3; - abs | abs --------------------+------------------- - 3.32192809488736 | 3.32192809488736 - 2.32192809488736 | 2.32192809488736 - 1.73696559416621 | 1.73696559416621 - 0.137503523749935 | 0.137503523749935 - 1.13750352374994 | 1.13750352374993 - 1.72246602447109 | 1.72246602447109 -(6 rows) - --- select abs with non pushdown func and explicit constant (explain) ---Testcase 62: -EXPLAIN VERBOSE -SELECT abs(value3), pi(), 4.1 FROM s3; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (abs(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT abs("value3") FROM "s3" -(3 rows) - --- select abs with non pushdown func and explicit constant (result) ---Testcase 63: -SELECT abs(value3), pi(), 4.1 FROM s3; - abs | pi | ?column? ------+------------------+---------- - 0.1 | 3.14159265358979 | 4.1 - 0.2 | 3.14159265358979 | 4.1 - 0.3 | 3.14159265358979 | 4.1 - 1.1 | 3.14159265358979 | 4.1 - 2.2 | 3.14159265358979 | 4.1 - 3.3 | 3.14159265358979 | 4.1 -(6 rows) - --- select sqrt as nest function with agg and explicit constant (pushdown, explain) ---Testcase 64: -EXPLAIN VERBOSE -SELECT sqrt(count(value1)), pi(), 4.1 FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sqrt((count(value1))::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT sqrt(count("value1")) FROM "s3" -(3 rows) - --- select sqrt as nest function with agg and explicit constant (pushdown, result) ---Testcase 65: -SELECT sqrt(count(value1)), pi(), 4.1 FROM s3; - sqrt | pi | ?column? -------------------+------------------+---------- - 2.44948974278318 | 3.14159265358979 | 4.1 -(1 row) - --- select sqrt as nest function with agg and explicit constant and tag (error, explain) ---Testcase 66: -EXPLAIN VERBOSE -SELECT sqrt(count(value1)), pi(), 4.1, tag1 FROM s3; -ERROR: column "s3.tag1" must appear in the GROUP BY clause or be used in an aggregate function -LINE 2: SELECT sqrt(count(value1)), pi(), 4.1, tag1 FROM s3; - ^ --- select spread (stub agg function and group by influx_time() and tag) (explain) ---Testcase 67: -EXPLAIN VERBOSE -SELECT spread("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (spread(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT spread("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select spread (stub agg function and group by influx_time() and tag) (result) ---Testcase 68: -SELECT spread("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - spread | influx_time | tag1 ---------+------------------------+------ - 0 | 1970-01-01 09:00:00+09 | a - 0 | 1970-01-01 09:00:01+09 | a - 0 | 1970-01-01 09:00:02+09 | a - | 1970-01-01 09:00:03+09 | a - | 1970-01-01 09:00:04+09 | a - | 1970-01-01 09:00:00+09 | b - | 1970-01-01 09:00:01+09 | b - | 1970-01-01 09:00:02+09 | b - 0 | 1970-01-01 09:00:03+09 | b - 0 | 1970-01-01 09:00:04+09 | b -(10 rows) - --- select spread (stub agg function and group by tag only) (result) ---Testcase 69: -SELECT tag1,spread("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - tag1 | spread -------+-------- - a | 0.2 - b | 1.1 -(2 rows) - --- select spread (stub agg function and other aggs) (result) ---Testcase 70: -SELECT sum("value1"),spread("value1"),count("value1") FROM s3; - sum | spread | count ------+--------+------- - 7.2 | 3.2 | 6 -(1 row) - --- select abs with order by (explain) ---Testcase 71: -EXPLAIN VERBOSE -SELECT value1, abs(1-value1) FROM s3 order by abs(1-value1); - QUERY PLAN ------------------------------------------------------------------------- - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (abs(('1'::double precision - value1))) - Sort Key: (abs(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (abs(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", abs((1 - "value1")) FROM "s3" -(6 rows) - --- select abs with order by (result) ---Testcase 72: -SELECT value1, abs(1-value1) FROM s3 order by abs(1-value1); - value1 | abs ---------+----- - 1.1 | 0.1 - 0.3 | 0.7 - 0.2 | 0.8 - 0.1 | 0.9 - 2.2 | 1.2 - 3.3 | 2.3 -(6 rows) - --- select abs with order by index (result) ---Testcase 73: -SELECT value1, abs(1-value1) FROM s3 order by 2,1; - value1 | abs ---------+----- - 1.1 | 0.1 - 0.3 | 0.7 - 0.2 | 0.8 - 0.1 | 0.9 - 2.2 | 1.2 - 3.3 | 2.3 -(6 rows) - --- select abs with order by index (result) ---Testcase 74: -SELECT value1, abs(1-value1) FROM s3 order by 1,2; - value1 | abs ---------+----- - 0.1 | 0.9 - 0.2 | 0.8 - 0.3 | 0.7 - 1.1 | 0.1 - 2.2 | 1.2 - 3.3 | 2.3 -(6 rows) - --- select abs and as ---Testcase 75: -SELECT abs(value3) as abs1 FROM s3; - abs1 ------- - 0.1 - 0.2 - 0.3 - 1.1 - 2.2 - 3.3 -(6 rows) - --- select abs(*) (stub agg function, explain) ---Testcase 76: -EXPLAIN VERBOSE -SELECT abs_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (abs_all()) - InfluxDB query: SELECT abs(*) FROM "s3" -(3 rows) - --- select abs(*) (stub agg function, result) ---Testcase 77: -SELECT abs_all() from s3; - abs_all ------------------------------------------ - (1970-01-01T00:00:00Z,,0.1,100,0.1,100) - (1970-01-01T00:00:01Z,,0.2,100,0.2,100) - (1970-01-01T00:00:02Z,,0.3,100,0.3,100) - (1970-01-01T00:00:03Z,,1.1,200,1.1,200) - (1970-01-01T00:00:04Z,,2.2,200,2.2,200) - (1970-01-01T00:00:05Z,,3.3,200,3.3,200) -(6 rows) - --- select abs(*) (stub agg function and group by tag only) (explain) ---Testcase 78: -EXPLAIN VERBOSE -SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (abs_all()), tag1 - InfluxDB query: SELECT abs(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select abs(*) (stub agg function and group by tag only) (result) ---Testcase 79: -SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - abs_all ------------------------------------------ - (1970-01-01T00:00:00Z,,0.1,100,0.1,100) - (1970-01-01T00:00:01Z,,0.2,100,0.2,100) - (1970-01-01T00:00:02Z,,0.3,100,0.3,100) - (1970-01-01T00:00:03Z,,1.1,200,1.1,200) - (1970-01-01T00:00:04Z,,2.2,200,2.2,200) -(5 rows) - --- select abs(*) (stub agg function, expose data, explain) ---Testcase 80: -EXPLAIN VERBOSE -SELECT (abs_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((abs_all()))::s3)."time", (((abs_all()))::s3).tag1, (((abs_all()))::s3).value1, (((abs_all()))::s3).value2, (((abs_all()))::s3).value3, (((abs_all()))::s3).value4 - InfluxDB query: SELECT abs(*) FROM "s3" -(3 rows) - --- select abs(*) (stub agg function, expose data, result) ---Testcase 81: -SELECT (abs_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.1 | 100 | 0.1 | 100 - 1970-01-01 09:00:01+09 | | 0.2 | 100 | 0.2 | 100 - 1970-01-01 09:00:02+09 | | 0.3 | 100 | 0.3 | 100 - 1970-01-01 09:00:03+09 | | 1.1 | 200 | 1.1 | 200 - 1970-01-01 09:00:04+09 | | 2.2 | 200 | 2.2 | 200 - 1970-01-01 09:00:05+09 | | 3.3 | 200 | 3.3 | 200 -(6 rows) - --- select spread over join query (explain) ---Testcase 82: -EXPLAIN VERBOSE -SELECT spread(t1.value1), spread(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Aggregate (cost=112.64..112.66 rows=1 width=16) - Output: spread(t1.value1), spread(t2.value1) - -> Nested Loop (cost=20.00..28.14 rows=169 width=16) - Output: t1.value1, t2.value1 - -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) - Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..13.06 rows=13 width=8) - Output: t2.value1 - -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) - Output: t2.value1 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select spread over join query (result, stub call error) ---Testcase 83: -SELECT spread(t1.value1), spread(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; -ERROR: stub spread_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE --- select spread with having (explain) ---Testcase 84: -EXPLAIN VERBOSE -SELECT spread(value1) FROM s3 HAVING spread(value1) > 100; - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (cost=3840.00..3840.01 rows=1 width=8) - Output: spread(value1) - Filter: (spread(s3.value1) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) - Output: "time", tag1, value1, value2, value3, value4 - InfluxDB query: SELECT "value1" FROM "s3" -(6 rows) - --- select spread with having (result, not pushdown, stub call error) ---Testcase 85: -SELECT spread(value1) FROM s3 HAVING spread(value1) > 100; -ERROR: stub spread_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE --- select spread(*) (stub agg function, explain) ---Testcase 86: -EXPLAIN VERBOSE -SELECT spread_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (spread_all(*)) - InfluxDB query: SELECT spread(*) FROM "s3" -(3 rows) - --- select spread(*) (stub agg function, result) ---Testcase 87: -SELECT spread_all(*) from s3; - spread_all ------------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,3.1999999999999997,100,3.1999999999999997,100) -(1 row) - --- select spread(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 88: -EXPLAIN VERBOSE -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (spread_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT spread(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select spread(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 89: -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - spread_all ---------------------------------- - (1970-01-01T00:00:00Z,,0,0,0,0) - (1970-01-01T00:00:01Z,,0,0,0,0) - (1970-01-01T00:00:02Z,,0,0,0,0) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,0,0,0,0) - (1970-01-01T00:00:04Z,,0,0,0,0) -(10 rows) - --- select spread(*) (stub agg function and group by tag only) (explain) ---Testcase 90: -EXPLAIN VERBOSE -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (spread_all(*)), tag1 - InfluxDB query: SELECT spread(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select spread(*) (stub agg function and group by tag only) (result) ---Testcase 91: -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - spread_all ---------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.19999999999999998,0,0.19999999999999998,0) - (1970-01-01T00:00:00Z,,1.1,0,1.1,0) -(2 rows) - --- select spread(*) (stub agg function, expose data, explain) ---Testcase 92: -EXPLAIN VERBOSE -SELECT (spread_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((spread_all(*)))::s3)."time", (((spread_all(*)))::s3).tag1, (((spread_all(*)))::s3).value1, (((spread_all(*)))::s3).value2, (((spread_all(*)))::s3).value3, (((spread_all(*)))::s3).value4 - InfluxDB query: SELECT spread(*) FROM "s3" -(3 rows) - --- select spread(*) (stub agg function, expose data, result) ---Testcase 93: -SELECT (spread_all(*)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 3.2 | 100 | 3.2 | 100 -(1 row) - --- select spread(regex) (stub agg function, explain) ---Testcase 94: -EXPLAIN VERBOSE -SELECT spread('/value[1,4]/') from s3; - QUERY PLAN ---------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (spread('/value[1,4]/'::text)) - InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" -(3 rows) - --- select spread(regex) (stub agg function, result) ---Testcase 95: -SELECT spread('/value[1,4]/') from s3; - spread --------------------------------------------------- - (1970-01-01T00:00:00Z,,3.1999999999999997,,,100) -(1 row) - --- select spread(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 96: -EXPLAIN VERBOSE -SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (spread('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT spread(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select spread(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 97: -SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - spread ---------------------------------- - (1970-01-01T00:00:00Z,,0,0,0,0) - (1970-01-01T00:00:01Z,,0,0,0,0) - (1970-01-01T00:00:02Z,,0,0,0,0) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,0,0,0,0) - (1970-01-01T00:00:04Z,,0,0,0,0) -(10 rows) - --- select spread(regex) (stub agg function and group by tag only) (explain) ---Testcase 98: -EXPLAIN VERBOSE -SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (spread('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select spread(regex) (stub agg function and group by tag only) (result) ---Testcase 99: -SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - spread -------------------------------------------------- - (1970-01-01T00:00:00Z,,0.19999999999999998,,,0) - (1970-01-01T00:00:00Z,,1.1,,,0) -(2 rows) - --- select spread(regex) (stub agg function, expose data, explain) ---Testcase 100: -EXPLAIN VERBOSE -SELECT (spread('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((spread('/value[1,4]/'::text)))::s3)."time", (((spread('/value[1,4]/'::text)))::s3).tag1, (((spread('/value[1,4]/'::text)))::s3).value1, (((spread('/value[1,4]/'::text)))::s3).value2, (((spread('/value[1,4]/'::text)))::s3).value3, (((spread('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" -(3 rows) - --- select spread(regex) (stub agg function, expose data, result) ---Testcase 101: -SELECT (spread('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 3.2 | | | 100 -(1 row) - --- select abs with arithmetic and tag in the middle (explain) ---Testcase 102: -EXPLAIN VERBOSE -SELECT abs(value1) + 1, value2, tag1, sqrt(value2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..1148.37 rows=1137 width=56) - Output: ((abs(value1) + '1'::double precision)), value2, tag1, (sqrt((value2)::double precision)) - InfluxDB query: SELECT (abs("value1") + 1), "value2", "tag1", sqrt("value2") FROM "s3" -(3 rows) - --- select abs with arithmetic and tag in the middle (result) ---Testcase 103: -SELECT abs(value1) + 1, value2, tag1, sqrt(value2) FROM s3; - ?column? | value2 | tag1 | sqrt -----------+--------+------+----------------- - 1.1 | 100 | a | 10 - 1.2 | 100 | a | 10 - 1.3 | 100 | a | 10 - 2.1 | 200 | b | 14.142135623731 - 3.2 | 200 | b | 14.142135623731 - 4.3 | 200 | b | 14.142135623731 -(6 rows) - --- select with order by limit (explain) ---Testcase 104: -EXPLAIN VERBOSE -SELECT abs(value1), abs(value3), sqrt(value2) FROM s3 ORDER BY abs(value3) LIMIT 1; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Limit (cost=1731.59..1731.59 rows=1 width=24) - Output: (abs(value1)), (abs(value3)), (sqrt((value2)::double precision)) - -> Sort (cost=1731.59..1735.86 rows=1706 width=24) - Output: (abs(value1)), (abs(value3)), (sqrt((value2)::double precision)) - Sort Key: (abs(s3.value3)) - -> Foreign Scan (cost=10.00..1723.06 rows=1706 width=24) - Output: (abs(value1)), (abs(value3)), (sqrt((value2)::double precision)) - InfluxDB query: SELECT abs("value1"), abs("value3"), sqrt("value2") FROM "s3" -(8 rows) - --- select with order by limit (result) ---Testcase 105: -SELECT abs(value1), abs(value3), sqrt(value2) FROM s3 ORDER BY abs(value3) LIMIT 1; - abs | abs | sqrt ------+-----+------ - 0.1 | 0.1 | 10 -(1 row) - --- select mixing with non pushdown func (all not pushdown, explain) ---Testcase 106: -EXPLAIN VERBOSE -SELECT abs(value1), sqrt(value2), upper(tag1) FROM s3; - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan on public.s3 (cost=10.00..1148.37 rows=1137 width=48) - Output: abs(value1), sqrt((value2)::double precision), upper(tag1) - InfluxDB query: SELECT "tag1", "value1", "value2" FROM "s3" -(3 rows) - --- select mixing with non pushdown func (result) ---Testcase 107: -SELECT abs(value1), sqrt(value2), upper(tag1) FROM s3; - abs | sqrt | upper ------+-----------------+------- - 0.1 | 10 | A - 0.2 | 10 | A - 0.3 | 10 | A - 1.1 | 14.142135623731 | B - 2.2 | 14.142135623731 | B - 3.3 | 14.142135623731 | B -(6 rows) - --- nested function in where clause (explain) ---Testcase 108: -EXPLAIN VERBOSE -SELECT sqrt(abs(value3)),min(value1) FROM s3 GROUP BY value3 HAVING sqrt(abs(value3)) > 0 ORDER BY 1,2; - QUERY PLAN -------------------------------------------------------------------------------- - Sort (cost=696.88..697.37 rows=197 width=24) - Output: (sqrt(abs(value3))), (min(value1)), value3 - Sort Key: (sqrt(abs(s3.value3))), (min(s3.value1)) - -> HashAggregate (cost=686.41..689.37 rows=197 width=24) - Output: sqrt(abs(value3)), min(value1), value3 - Group Key: s3.value3 - -> Foreign Scan on public.s3 (cost=10.00..683.00 rows=683 width=16) - Output: "time", tag1, value1, value2, value3, value4 - Filter: (sqrt(abs(s3.value3)) > '0'::double precision) - InfluxDB query: SELECT "value1", "value3" FROM "s3" -(10 rows) - --- nested function in where clause (result) ---Testcase 109: -SELECT sqrt(abs(value3)),min(value1) FROM s3 GROUP BY value3 HAVING sqrt(abs(value3)) > 0 ORDER BY 1,2; - sqrt | min --------------------+----- - 0.316227766016838 | 0.1 - 0.447213595499958 | 0.2 - 0.547722557505166 | 0.3 - 1.04880884817015 | 1.1 - 1.48323969741913 | 2.2 - 1.81659021245849 | 3.3 -(6 rows) - ---Testcase 110: -EXPLAIN VERBOSE -SELECT first(time, value1), first(time, value2), first(time, value3), first(time, value4) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (first("time", value1)), (first("time", value2)), (first("time", value3)), (first("time", value4)) - InfluxDB query: SELECT first("value1"), first("value2"), first("value3"), first("value4") FROM "s3" -(3 rows) - ---Testcase 111: -SELECT first(time, value1), first(time, value2), first(time, value3), first(time, value4) FROM s3; - first | first | first | first --------+-------+-------+------- - 0.1 | 100 | -0.1 | -100 -(1 row) - --- select first(*) (stub agg function, explain) ---Testcase 112: -EXPLAIN VERBOSE -SELECT first_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (first_all(*)) - InfluxDB query: SELECT first(*) FROM "s3" -(3 rows) - --- select first(*) (stub agg function, result) ---Testcase 113: -SELECT first_all(*) from s3; - first_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) -(1 row) - --- select first(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 114: -EXPLAIN VERBOSE -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (first_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT first(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select first(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 115: -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - first_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select first(*) (stub agg function and group by tag only) (explain) ---Testcase 116: -EXPLAIN VERBOSE -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (first_all(*)), tag1 - InfluxDB query: SELECT first(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select first(*) (stub agg function and group by tag only) (result) ---Testcase 117: -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - first_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:00Z,,1.1,200,-1.1,-200) -(2 rows) - --- select first(*) (stub agg function, expose data, explain) ---Testcase 118: -EXPLAIN VERBOSE -SELECT (first_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((first_all(*)))::s3)."time", (((first_all(*)))::s3).tag1, (((first_all(*)))::s3).value1, (((first_all(*)))::s3).value2, (((first_all(*)))::s3).value3, (((first_all(*)))::s3).value4 - InfluxDB query: SELECT first(*) FROM "s3" -(3 rows) - --- select first(*) (stub agg function, expose data, result) ---Testcase 119: -SELECT (first_all(*)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.1 | 100 | -0.1 | -100 -(1 row) - --- select first(regex) (stub function, explain) ---Testcase 120: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/') from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (first('/value[1,4]/'::text)) - InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" -(3 rows) - --- select first(regex) (stub function, explain) ---Testcase 121: -SELECT first('/value[1,4]/') from s3; - first ------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-100) -(1 row) - --- select multiple regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 122: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; -WARNING: Selecting multiple functions with regular expression or star is not supported. - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (cost=5119.50..5119.51 rows=1 width=64) - Output: first('/value[1,4]/'::text), first('/^v.*/'::text) - -> Foreign Scan on public.s3 (cost=10.00..3413.00 rows=3413 width=0) - Output: "time", tag1, value1, value2, value3, value4 - InfluxDB query: SELECT * FROM "s3" -(5 rows) - --- select multiple regex functions (do not push down, raise warning and stub error) (result) ---Testcase 123: -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; -WARNING: Selecting multiple functions with regular expression or star is not supported. -ERROR: stub first_sfunc(text, text) is called -CONTEXT: PL/pgSQL function first_sfunc(text,text) line 3 at RAISE --- select first(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 124: -EXPLAIN VERBOSE -SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (first('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT first(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select first(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 125: -SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - first -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select first(regex) (stub agg function and group by tag only) (explain) ---Testcase 126: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (first('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select first(regex) (stub agg function and group by tag only) (result) ---Testcase 127: -SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - first ------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-100) - (1970-01-01T00:00:00Z,,1.1,,,-200) -(2 rows) - --- select first(regex) (stub agg function, expose data, explain) ---Testcase 128: -EXPLAIN VERBOSE -SELECT (first('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((first('/value[1,4]/'::text)))::s3)."time", (((first('/value[1,4]/'::text)))::s3).tag1, (((first('/value[1,4]/'::text)))::s3).value1, (((first('/value[1,4]/'::text)))::s3).value2, (((first('/value[1,4]/'::text)))::s3).value3, (((first('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" -(3 rows) - --- select first(regex) (stub agg function, expose data, result) ---Testcase 129: -SELECT (first('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.1 | | | -100 -(1 row) - ---Testcase 130: -EXPLAIN VERBOSE -SELECT last(time, value1), last(time, value2), last(time, value3), last(time, value4) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (last("time", value1)), (last("time", value2)), (last("time", value3)), (last("time", value4)) - InfluxDB query: SELECT last("value1"), last("value2"), last("value3"), last("value4") FROM "s3" -(3 rows) - ---Testcase 131: -SELECT last(time, value1), last(time, value2), last(time, value3), last(time, value4) FROM s3; - last | last | last | last -------+------+------+------ - 3.3 | 200 | -3.3 | -200 -(1 row) - --- select last(*) (stub agg function, explain) ---Testcase 132: -EXPLAIN VERBOSE -SELECT last_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (last_all(*)) - InfluxDB query: SELECT last(*) FROM "s3" -(3 rows) - --- select last(*) (stub agg function, result) ---Testcase 133: -SELECT last_all(*) from s3; - last_all -------------------------------------------- - (1970-01-01T00:00:00Z,,3.3,200,-3.3,-200) -(1 row) - --- select last(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 134: -EXPLAIN VERBOSE -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (last_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT last(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select last(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 135: -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - last_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select last(*) (stub agg function and group by tag only) (explain) ---Testcase 136: -EXPLAIN VERBOSE -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (last_all(*)), tag1 - InfluxDB query: SELECT last(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select last(*) (stub agg function and group by tag only) (result) ---Testcase 137: -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - last_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:00Z,,2.2,200,-2.2,-200) -(2 rows) - --- select last(*) (stub agg function, expose data, explain) ---Testcase 138: -EXPLAIN VERBOSE -SELECT (last_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((last_all(*)))::s3)."time", (((last_all(*)))::s3).tag1, (((last_all(*)))::s3).value1, (((last_all(*)))::s3).value2, (((last_all(*)))::s3).value3, (((last_all(*)))::s3).value4 - InfluxDB query: SELECT last(*) FROM "s3" -(3 rows) - --- select last(*) (stub agg function, expose data, result) ---Testcase 139: -SELECT (last_all(*)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 3.3 | 200 | -3.3 | -200 -(1 row) - --- select last(regex) (stub function, explain) ---Testcase 140: -EXPLAIN VERBOSE -SELECT last('/value[1,4]/') from s3; - QUERY PLAN -------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (last('/value[1,4]/'::text)) - InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" -(3 rows) - --- select last(regex) (stub function, result) ---Testcase 141: -SELECT last('/value[1,4]/') from s3; - last ------------------------------------- - (1970-01-01T00:00:00Z,,3.3,,,-200) -(1 row) - --- select multiple regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 142: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; -WARNING: Selecting multiple functions with regular expression or star is not supported. - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (cost=5119.50..5119.51 rows=1 width=64) - Output: first('/value[1,4]/'::text), first('/^v.*/'::text) - -> Foreign Scan on public.s3 (cost=10.00..3413.00 rows=3413 width=0) - Output: "time", tag1, value1, value2, value3, value4 - InfluxDB query: SELECT * FROM "s3" -(5 rows) - --- select multiple regex functions (do not push down, raise warning and stub error) (result) ---Testcase 143: -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; -WARNING: Selecting multiple functions with regular expression or star is not supported. -ERROR: stub first_sfunc(text, text) is called -CONTEXT: PL/pgSQL function first_sfunc(text,text) line 3 at RAISE --- select last(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 144: -EXPLAIN VERBOSE -SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (last('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT last(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select last(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 145: -SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - last -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select last(regex) (stub agg function and group by tag only) (explain) ---Testcase 146: -EXPLAIN VERBOSE -SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (last('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select last(regex) (stub agg function and group by tag only) (result) ---Testcase 147: -SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - last ------------------------------------- - (1970-01-01T00:00:00Z,,0.3,,,-100) - (1970-01-01T00:00:00Z,,2.2,,,-200) -(2 rows) - --- select last(regex) (stub agg function, expose data, explain) ---Testcase 148: -EXPLAIN VERBOSE -SELECT (last('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((last('/value[1,4]/'::text)))::s3)."time", (((last('/value[1,4]/'::text)))::s3).tag1, (((last('/value[1,4]/'::text)))::s3).value1, (((last('/value[1,4]/'::text)))::s3).value2, (((last('/value[1,4]/'::text)))::s3).value3, (((last('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" -(3 rows) - --- select last(regex) (stub agg function, expose data, result) ---Testcase 149: -SELECT (last('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 3.3 | | | -200 -(1 row) - ---Testcase 150: -EXPLAIN VERBOSE -SELECT sample(value2, 3) FROM s3 WHERE value2 < 200; - QUERY PLAN ---------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=8) - Output: (sample(value2, 3)) - InfluxDB query: SELECT sample("value2", 3) FROM "s3" WHERE (("value2" < 200)) -(3 rows) - ---Testcase 151: -SELECT sample(value2, 3) FROM s3 WHERE value2 < 200; - sample --------- - 100 - 100 - 100 -(3 rows) - ---Testcase 152: -EXPLAIN VERBOSE -SELECT sample(value2, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sample(value2, 1)), (influx_time("time", '@ 3 secs'::interval)) - InfluxDB query: SELECT sample("value2", 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m3s0u)) -(3 rows) - ---Testcase 153: -SELECT sample(value2, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); - sample --------- - 100 - 200 -(2 rows) - --- select sample(*, int) (stub agg function, explain) ---Testcase 154: -EXPLAIN VERBOSE -SELECT sample_all(50) from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (sample_all(50)) - InfluxDB query: SELECT sample(*, 50) FROM "s3" -(3 rows) - --- select sample(*, int) (stub agg function, result) ---Testcase 155: -SELECT sample_all(50) from s3; - sample_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) - (1970-01-01T00:00:05Z,,3.3,200,-3.3,-200) -(6 rows) - --- select sample(*, int) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 156: -EXPLAIN VERBOSE -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sample_all(50)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT sample(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select sample(*, int) (stub agg function and group by influx_time() and tag) (result) ---Testcase 157: -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - sample_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(5 rows) - --- select sample(*, int) (stub agg function and group by tag only) (explain) ---Testcase 158: -EXPLAIN VERBOSE -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (sample_all(50)), tag1 - InfluxDB query: SELECT sample(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select sample(*, int) (stub agg function and group by tag only) (result) ---Testcase 159: -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - sample_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(5 rows) - --- select sample(*, int) (stub agg function, expose data, explain) ---Testcase 160: -EXPLAIN VERBOSE -SELECT (sample_all(50)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((sample_all(50)))::s3)."time", (((sample_all(50)))::s3).tag1, (((sample_all(50)))::s3).value1, (((sample_all(50)))::s3).value2, (((sample_all(50)))::s3).value3, (((sample_all(50)))::s3).value4 - InfluxDB query: SELECT sample(*, 50) FROM "s3" -(3 rows) - --- select sample(*, int) (stub agg function, expose data, result) ---Testcase 161: -SELECT (sample_all(50)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.1 | 100 | -0.1 | -100 - 1970-01-01 09:00:01+09 | | 0.2 | 100 | -0.2 | -100 - 1970-01-01 09:00:02+09 | | 0.3 | 100 | -0.3 | -100 - 1970-01-01 09:00:03+09 | | 1.1 | 200 | -1.1 | -200 - 1970-01-01 09:00:04+09 | | 2.2 | 200 | -2.2 | -200 - 1970-01-01 09:00:05+09 | | 3.3 | 200 | -3.3 | -200 -(6 rows) - --- select sample(regex) (stub agg function, explain) ---Testcase 162: -EXPLAIN VERBOSE -SELECT sample('/value[1,4]/', 50) from s3; - QUERY PLAN -------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (sample('/value[1,4]/'::text, 50)) - InfluxDB query: SELECT sample(/value[1,4]/, 50) FROM "s3" -(3 rows) - --- select sample(regex) (stub agg function, result) ---Testcase 163: -SELECT sample('/value[1,4]/', 50) from s3; - sample ------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-100) - (1970-01-01T00:00:01Z,,0.2,,,-100) - (1970-01-01T00:00:02Z,,0.3,,,-100) - (1970-01-01T00:00:03Z,,1.1,,,-200) - (1970-01-01T00:00:04Z,,2.2,,,-200) - (1970-01-01T00:00:05Z,,3.3,,,-200) -(6 rows) - --- select sample(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 164: -EXPLAIN VERBOSE -SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (sample('/^v.*/'::text, 50)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT sample(/^v.*/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select sample(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 165: -SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - sample -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(5 rows) - --- select sample(regex) (stub agg function and group by tag only) (explain) ---Testcase 166: -EXPLAIN VERBOSE -SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (sample('/value[1,4]/'::text, 50)), tag1 - InfluxDB query: SELECT sample(/value[1,4]/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select sample(regex) (stub agg function and group by tag only) (result) ---Testcase 167: -SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - sample ------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-100) - (1970-01-01T00:00:01Z,,0.2,,,-100) - (1970-01-01T00:00:02Z,,0.3,,,-100) - (1970-01-01T00:00:03Z,,1.1,,,-200) - (1970-01-01T00:00:04Z,,2.2,,,-200) -(5 rows) - --- select sample(regex) (stub agg function, expose data, explain) ---Testcase 168: -EXPLAIN VERBOSE -SELECT (sample('/value[1,4]/', 50)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((sample('/value[1,4]/'::text, 50)))::s3)."time", (((sample('/value[1,4]/'::text, 50)))::s3).tag1, (((sample('/value[1,4]/'::text, 50)))::s3).value1, (((sample('/value[1,4]/'::text, 50)))::s3).value2, (((sample('/value[1,4]/'::text, 50)))::s3).value3, (((sample('/value[1,4]/'::text, 50)))::s3).value4 - InfluxDB query: SELECT sample(/value[1,4]/, 50) FROM "s3" -(3 rows) - --- select sample(regex) (stub agg function, expose data, result) ---Testcase 169: -SELECT (sample('/value[1,4]/', 50)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.1 | | | -100 - 1970-01-01 09:00:01+09 | | 0.2 | | | -100 - 1970-01-01 09:00:02+09 | | 0.3 | | | -100 - 1970-01-01 09:00:03+09 | | 1.1 | | | -200 - 1970-01-01 09:00:04+09 | | 2.2 | | | -200 - 1970-01-01 09:00:05+09 | | 3.3 | | | -200 -(6 rows) - ---Testcase 170: -EXPLAIN VERBOSE -SELECT cumulative_sum(value1),cumulative_sum(value2),cumulative_sum(value3),cumulative_sum(value4) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (cumulative_sum(value1)), (cumulative_sum(value2)), (cumulative_sum(value3)), (cumulative_sum(value4)) - InfluxDB query: SELECT cumulative_sum("value1"), cumulative_sum("value2"), cumulative_sum("value3"), cumulative_sum("value4") FROM "s3" -(3 rows) - ---Testcase 171: -SELECT cumulative_sum(value1),cumulative_sum(value2),cumulative_sum(value3),cumulative_sum(value4) FROM s3; - cumulative_sum | cumulative_sum | cumulative_sum | cumulative_sum -----------------+----------------+----------------+---------------- - 0.1 | 100 | -0.1 | -100 - 0.3 | 200 | -0.3 | -200 - 0.6 | 300 | -0.6 | -300 - 1.7 | 500 | -1.7 | -500 - 3.9 | 700 | -3.9 | -700 - 7.2 | 900 | -7.2 | -900 -(6 rows) - --- select cumulative_sum(*) (stub function, explain) ---Testcase 172: -EXPLAIN VERBOSE -SELECT cumulative_sum_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (cumulative_sum_all()) - InfluxDB query: SELECT cumulative_sum(*) FROM "s3" -(3 rows) - --- select cumulative_sum(*) (stub function, result) ---Testcase 173: -SELECT cumulative_sum_all() from s3; - cumulative_sum_all ---------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.30000000000000004,200,-0.30000000000000004,-200) - (1970-01-01T00:00:02Z,,0.6000000000000001,300,-0.6000000000000001,-300) - (1970-01-01T00:00:03Z,,1.7000000000000002,500,-1.7000000000000002,-500) - (1970-01-01T00:00:04Z,,3.9000000000000004,700,-3.9000000000000004,-700) - (1970-01-01T00:00:05Z,,7.2,900,-7.2,-900) -(6 rows) - --- select cumulative_sum(regex) (stub function, result) ---Testcase 174: -SELECT cumulative_sum('/value[1,4]/') from s3; - cumulative_sum ----------------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-100) - (1970-01-01T00:00:01Z,,0.30000000000000004,,,-200) - (1970-01-01T00:00:02Z,,0.6000000000000001,,,-300) - (1970-01-01T00:00:03Z,,1.7000000000000002,,,-500) - (1970-01-01T00:00:04Z,,3.9000000000000004,,,-700) - (1970-01-01T00:00:05Z,,7.2,,,-900) -(6 rows) - --- select cumulative_sum(regex) (stub function, result) ---Testcase 175: -SELECT cumulative_sum('/value[1,4]/') from s3; - cumulative_sum ----------------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-100) - (1970-01-01T00:00:01Z,,0.30000000000000004,,,-200) - (1970-01-01T00:00:02Z,,0.6000000000000001,,,-300) - (1970-01-01T00:00:03Z,,1.7000000000000002,,,-500) - (1970-01-01T00:00:04Z,,3.9000000000000004,,,-700) - (1970-01-01T00:00:05Z,,7.2,,,-900) -(6 rows) - --- select multiple star and regex functions (do not push down, raise warning and stub error) (result) ---Testcase 176: -EXPLAIN VERBOSE -SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan on public.s3 (cost=10.00..5119.50 rows=3413 width=64) - Output: cumulative_sum_all(), cumulative_sum('/value[1,4]/'::text) - InfluxDB query: SELECT * FROM "s3" -(3 rows) - --- select multiple star and regex functions (do not push down, raise warning and stub error) (result) ---Testcase 177: -SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub cumulative_sum_all() is called -CONTEXT: PL/pgSQL function cumulative_sum_all() line 3 at RAISE --- select cumulative_sum(*) (stub function and group by tag only) (explain) ---Testcase 178: -EXPLAIN VERBOSE -SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (cumulative_sum_all()), tag1 - InfluxDB query: SELECT cumulative_sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select cumulative_sum(*) (stub function and group by tag only) (result) ---Testcase 179: -SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - cumulative_sum_all ---------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.30000000000000004,200,-0.30000000000000004,-200) - (1970-01-01T00:00:02Z,,0.6000000000000001,300,-0.6000000000000001,-300) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,3.3000000000000003,400,-3.3000000000000003,-400) -(5 rows) - --- select cumulative_sum(regex) (stub function and group by tag only) (explain) ---Testcase 180: -EXPLAIN VERBOSE -SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (cumulative_sum('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT cumulative_sum(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select cumulative_sum(regex) (stub function and group by tag only) (result) ---Testcase 181: -SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - cumulative_sum ----------------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-100) - (1970-01-01T00:00:01Z,,0.30000000000000004,,,-200) - (1970-01-01T00:00:02Z,,0.6000000000000001,,,-300) - (1970-01-01T00:00:03Z,,1.1,,,-200) - (1970-01-01T00:00:04Z,,3.3000000000000003,,,-400) -(5 rows) - --- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, explain) ---Testcase 182: -EXPLAIN VERBOSE -SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..13856.78 rows=3413 width=144) - Output: (((cumulative_sum_all()))::s3)."time", (((cumulative_sum_all()))::s3).tag1, (((cumulative_sum_all()))::s3).value1, (((cumulative_sum_all()))::s3).value2, (((cumulative_sum_all()))::s3).value3, (((cumulative_sum_all()))::s3).value4, (((cumulative_sum('/value[1,4]/'::text)))::s3)."time", (((cumulative_sum('/value[1,4]/'::text)))::s3).tag1, (((cumulative_sum('/value[1,4]/'::text)))::s3).value1, (((cumulative_sum('/value[1,4]/'::text)))::s3).value2, (((cumulative_sum('/value[1,4]/'::text)))::s3).value3, (((cumulative_sum('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT cumulative_sum(*), cumulative_sum(/value[1,4]/) FROM "s3" -(3 rows) - --- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, result) ---Testcase 183: -SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 | time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+--------+------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.1 | 100 | -0.1 | -100 | 1970-01-01 09:00:00+09 | | 0.1 | | | -100 - 1970-01-01 09:00:01+09 | | 0.3 | 200 | -0.3 | -200 | 1970-01-01 09:00:01+09 | | 0.3 | | | -200 - 1970-01-01 09:00:02+09 | | 0.6 | 300 | -0.6 | -300 | 1970-01-01 09:00:02+09 | | 0.6 | | | -300 - 1970-01-01 09:00:03+09 | | 1.7 | 500 | -1.7 | -500 | 1970-01-01 09:00:03+09 | | 1.7 | | | -500 - 1970-01-01 09:00:04+09 | | 3.9 | 700 | -3.9 | -700 | 1970-01-01 09:00:04+09 | | 3.9 | | | -700 - 1970-01-01 09:00:05+09 | | 7.2 | 900 | -7.2 | -900 | 1970-01-01 09:00:05+09 | | 7.2 | | | -900 -(6 rows) - ---Testcase 184: -EXPLAIN VERBOSE -SELECT derivative(value1),derivative(value2),derivative(value3),derivative(value4) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (derivative(value1)), (derivative(value2)), (derivative(value3)), (derivative(value4)) - InfluxDB query: SELECT derivative("value1"), derivative("value2"), derivative("value3"), derivative("value4") FROM "s3" -(3 rows) - ---Testcase 185: -SELECT derivative(value1),derivative(value2),derivative(value3),derivative(value4) FROM s3; - derivative | derivative | derivative | derivative -------------+------------+------------+------------ - 0.1 | 0 | -0.1 | 0 - 0.1 | 0 | -0.1 | 0 - 0.8 | 100 | -0.8 | -100 - 1.1 | 0 | -1.1 | 0 - 1.1 | 0 | -1.1 | 0 -(5 rows) - ---Testcase 186: -EXPLAIN VERBOSE -SELECT derivative(value1, interval '0.5s'),derivative(value2, interval '0.2s'),derivative(value3, interval '0.1s'),derivative(value4, interval '2s') FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (derivative(value1, '@ 0.5 secs'::interval)), (derivative(value2, '@ 0.2 secs'::interval)), (derivative(value3, '@ 0.1 secs'::interval)), (derivative(value4, '@ 2 secs'::interval)) - InfluxDB query: SELECT derivative("value1", 0d0h0m0s500000u), derivative("value2", 0d0h0m0s200000u), derivative("value3", 0d0h0m0s100000u), derivative("value4", 0d0h0m2s0u) FROM "s3" -(3 rows) - ---Testcase 187: -SELECT derivative(value1, interval '0.5s'),derivative(value2, interval '0.2s'),derivative(value3, interval '0.1s'),derivative(value4, interval '2s') FROM s3; - derivative | derivative | derivative | derivative -------------+------------+------------+------------ - 0.05 | 0 | -0.01 | 0 - 0.05 | 0 | -0.01 | 0 - 0.4 | 20 | -0.08 | -200 - 0.55 | 0 | -0.11 | 0 - 0.55 | 0 | -0.11 | 0 -(5 rows) - --- select derivative(*) (stub function, explain) ---Testcase 188: -EXPLAIN VERBOSE -SELECT derivative_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (derivative_all()) - InfluxDB query: SELECT derivative(*) FROM "s3" -(3 rows) - --- select derivative(*) (stub function, result) ---Testcase 189: -SELECT derivative_all() from s3; - derivative_all ----------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,0,-0.1,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,0,-0.09999999999999998,0) - (1970-01-01T00:00:03Z,,0.8,100,-0.8,-100) - (1970-01-01T00:00:04Z,,1.1,0,-1.1,0) - (1970-01-01T00:00:05Z,,1.0999999999999996,0,-1.0999999999999996,0) -(5 rows) - --- select derivative(regex) (stub function, explain) ---Testcase 190: -EXPLAIN VERBOSE -SELECT derivative('/value[1,4]/') from s3; - QUERY PLAN -------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (derivative('/value[1,4]/'::text)) - InfluxDB query: SELECT derivative(/value[1,4]/) FROM "s3" -(3 rows) - --- select derivative(regex) (stub function, result) ---Testcase 191: -SELECT derivative('/value[1,4]/') from s3; - derivative -------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) - (1970-01-01T00:00:03Z,,0.8,,,-100) - (1970-01-01T00:00:04Z,,1.1,,,0) - (1970-01-01T00:00:05Z,,1.0999999999999996,,,0) -(5 rows) - --- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 192: -EXPLAIN VERBOSE -SELECT derivative_all(), derivative('/value[1,4]/') from s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan on public.s3 (cost=10.00..5119.50 rows=3413 width=64) - Output: derivative_all(), derivative('/value[1,4]/'::text) - InfluxDB query: SELECT * FROM "s3" -(3 rows) - --- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 193: -SELECT derivative_all(), derivative('/value[1,4]/') from s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub derivative_all() is called -CONTEXT: PL/pgSQL function derivative_all() line 3 at RAISE --- select derivative(*) (stub function and group by tag only) (explain) ---Testcase 194: -EXPLAIN VERBOSE -SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (derivative_all()), tag1 - InfluxDB query: SELECT derivative(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select derivative(*) (stub function and group by tag only) (result) ---Testcase 195: -SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - derivative_all ----------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,0,-0.1,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,0,-0.09999999999999998,0) - (1970-01-01T00:00:04Z,,1.1,0,-1.1,0) -(3 rows) - --- select derivative(regex) (stub function and group by tag only) (explain) ---Testcase 196: -EXPLAIN VERBOSE -SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (derivative('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT derivative(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select derivative(regex) (stub function and group by tag only) (result) ---Testcase 197: -SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - derivative -------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) - (1970-01-01T00:00:04Z,,1.1,,,0) -(3 rows) - --- select derivative(*) (stub agg function, expose data, explain) ---Testcase 198: -EXPLAIN VERBOSE -SELECT (derivative_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((derivative_all()))::s3)."time", (((derivative_all()))::s3).tag1, (((derivative_all()))::s3).value1, (((derivative_all()))::s3).value2, (((derivative_all()))::s3).value3, (((derivative_all()))::s3).value4 - InfluxDB query: SELECT derivative(*) FROM "s3" -(3 rows) - --- select derivative(*) (stub agg function, expose data, result) ---Testcase 199: -SELECT (derivative_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 0.1 | 0 | -0.1 | 0 - 1970-01-01 09:00:02+09 | | 0.1 | 0 | -0.1 | 0 - 1970-01-01 09:00:03+09 | | 0.8 | 100 | -0.8 | -100 - 1970-01-01 09:00:04+09 | | 1.1 | 0 | -1.1 | 0 - 1970-01-01 09:00:05+09 | | 1.1 | 0 | -1.1 | 0 -(5 rows) - --- select derivative(regex) (stub agg function, expose data, explain) ---Testcase 200: -EXPLAIN VERBOSE -SELECT (derivative('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((derivative('/value[1,4]/'::text)))::s3)."time", (((derivative('/value[1,4]/'::text)))::s3).tag1, (((derivative('/value[1,4]/'::text)))::s3).value1, (((derivative('/value[1,4]/'::text)))::s3).value2, (((derivative('/value[1,4]/'::text)))::s3).value3, (((derivative('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT derivative(/value[1,4]/) FROM "s3" -(3 rows) - --- select derivative(regex) (stub agg function, expose data, result) ---Testcase 201: -SELECT (derivative('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 0.1 | | | 0 - 1970-01-01 09:00:02+09 | | 0.1 | | | 0 - 1970-01-01 09:00:03+09 | | 0.8 | | | -100 - 1970-01-01 09:00:04+09 | | 1.1 | | | 0 - 1970-01-01 09:00:05+09 | | 1.1 | | | 0 -(5 rows) - ---Testcase 202: -EXPLAIN VERBOSE -SELECT non_negative_derivative(value1),non_negative_derivative(value2),non_negative_derivative(value3),non_negative_derivative(value4) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (non_negative_derivative(value1)), (non_negative_derivative(value2)), (non_negative_derivative(value3)), (non_negative_derivative(value4)) - InfluxDB query: SELECT non_negative_derivative("value1"), non_negative_derivative("value2"), non_negative_derivative("value3"), non_negative_derivative("value4") FROM "s3" -(3 rows) - ---Testcase 203: -SELECT non_negative_derivative(value1),non_negative_derivative(value2),non_negative_derivative(value3),non_negative_derivative(value4) FROM s3; - non_negative_derivative | non_negative_derivative | non_negative_derivative | non_negative_derivative --------------------------+-------------------------+-------------------------+------------------------- - 0.1 | 0 | | 0 - 0.1 | 0 | | 0 - 0.8 | 100 | | - 1.1 | 0 | | 0 - 1.1 | 0 | | 0 -(5 rows) - ---Testcase 204: -EXPLAIN VERBOSE -SELECT non_negative_derivative(value1, interval '0.5s'),non_negative_derivative(value2, interval '0.2s'),non_negative_derivative(value3, interval '0.1s'),non_negative_derivative(value4, interval '2s') FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (non_negative_derivative(value1, '@ 0.5 secs'::interval)), (non_negative_derivative(value2, '@ 0.2 secs'::interval)), (non_negative_derivative(value3, '@ 0.1 secs'::interval)), (non_negative_derivative(value4, '@ 2 secs'::interval)) - InfluxDB query: SELECT non_negative_derivative("value1", 0d0h0m0s500000u), non_negative_derivative("value2", 0d0h0m0s200000u), non_negative_derivative("value3", 0d0h0m0s100000u), non_negative_derivative("value4", 0d0h0m2s0u) FROM "s3" -(3 rows) - ---Testcase 205: -SELECT non_negative_derivative(value1, interval '0.5s'),non_negative_derivative(value2, interval '0.2s'),non_negative_derivative(value3, interval '0.1s'),non_negative_derivative(value4, interval '2s') FROM s3; - non_negative_derivative | non_negative_derivative | non_negative_derivative | non_negative_derivative --------------------------+-------------------------+-------------------------+------------------------- - 0.05 | 0 | | 0 - 0.05 | 0 | | 0 - 0.4 | 20 | | - 0.55 | 0 | | 0 - 0.55 | 0 | | 0 -(5 rows) - --- select non_negative_derivative(*) (stub function, explain) ---Testcase 206: -EXPLAIN VERBOSE -SELECT non_negative_derivative_all() from s3; - QUERY PLAN ---------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (non_negative_derivative_all()) - InfluxDB query: SELECT non_negative_derivative(*) FROM "s3" -(3 rows) - --- select non_negative_derivative(*) (stub function, result) ---Testcase 207: -SELECT non_negative_derivative_all() from s3; - non_negative_derivative_all --------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,0,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,0,,0) - (1970-01-01T00:00:03Z,,0.8,100,,) - (1970-01-01T00:00:04Z,,1.1,0,,0) - (1970-01-01T00:00:05Z,,1.0999999999999996,0,,0) -(5 rows) - --- select non_negative_derivative(regex) (stub function, explain) ---Testcase 208: -EXPLAIN VERBOSE -SELECT non_negative_derivative('/value[1,4]/') from s3; - QUERY PLAN --------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (non_negative_derivative('/value[1,4]/'::text)) - InfluxDB query: SELECT non_negative_derivative(/value[1,4]/) FROM "s3" -(3 rows) - --- select non_negative_derivative(regex) (stub function, result) ---Testcase 209: -SELECT non_negative_derivative('/value[1,4]/') from s3; - non_negative_derivative -------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) - (1970-01-01T00:00:03Z,,0.8,,,) - (1970-01-01T00:00:04Z,,1.1,,,0) - (1970-01-01T00:00:05Z,,1.0999999999999996,,,0) -(5 rows) - --- select non_negative_derivative(*) (stub function and group by tag only) (explain) ---Testcase 210: -EXPLAIN VERBOSE -SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (non_negative_derivative_all()), tag1 - InfluxDB query: SELECT non_negative_derivative(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select non_negative_derivative(*) (stub function and group by tag only) (result) ---Testcase 211: -SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - non_negative_derivative_all --------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,0,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,0,,0) - (1970-01-01T00:00:04Z,,1.1,0,,0) -(3 rows) - --- select non_negative_derivative(regex) (stub function and group by tag only) (explain) ---Testcase 212: -EXPLAIN VERBOSE -SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (non_negative_derivative('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT non_negative_derivative(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select non_negative_derivative(regex) (stub agg function and group by tag only) (result) ---Testcase 213: -SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - non_negative_derivative -------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) - (1970-01-01T00:00:04Z,,1.1,,,0) -(3 rows) - --- select non_negative_derivative(*) (stub function, expose data, explain) ---Testcase 214: -EXPLAIN VERBOSE -SELECT (non_negative_derivative_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((non_negative_derivative_all()))::s3)."time", (((non_negative_derivative_all()))::s3).tag1, (((non_negative_derivative_all()))::s3).value1, (((non_negative_derivative_all()))::s3).value2, (((non_negative_derivative_all()))::s3).value3, (((non_negative_derivative_all()))::s3).value4 - InfluxDB query: SELECT non_negative_derivative(*) FROM "s3" -(3 rows) - --- select non_negative_derivative(*) (stub agg function, expose data, result) ---Testcase 215: -SELECT (non_negative_derivative_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 0.1 | 0 | | 0 - 1970-01-01 09:00:02+09 | | 0.1 | 0 | | 0 - 1970-01-01 09:00:03+09 | | 0.8 | 100 | | - 1970-01-01 09:00:04+09 | | 1.1 | 0 | | 0 - 1970-01-01 09:00:05+09 | | 1.1 | 0 | | 0 -(5 rows) - --- select non_negative_derivative(regex) (stub function, expose data, explain) ---Testcase 216: -EXPLAIN VERBOSE -SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((non_negative_derivative('/value[1,4]/'::text)))::s3)."time", (((non_negative_derivative('/value[1,4]/'::text)))::s3).tag1, (((non_negative_derivative('/value[1,4]/'::text)))::s3).value1, (((non_negative_derivative('/value[1,4]/'::text)))::s3).value2, (((non_negative_derivative('/value[1,4]/'::text)))::s3).value3, (((non_negative_derivative('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT non_negative_derivative(/value[1,4]/) FROM "s3" -(3 rows) - --- select non_negative_derivative(regex) (stub agg function, expose data, result) ---Testcase 217: -SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 0.1 | | | 0 - 1970-01-01 09:00:02+09 | | 0.1 | | | 0 - 1970-01-01 09:00:03+09 | | 0.8 | | | - 1970-01-01 09:00:04+09 | | 1.1 | | | 0 - 1970-01-01 09:00:05+09 | | 1.1 | | | 0 -(5 rows) - ---Testcase 218: -EXPLAIN VERBOSE -SELECT difference(value1),difference(value2),difference(value3),difference(value4) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (difference(value1)), (difference(value2)), (difference(value3)), (difference(value4)) - InfluxDB query: SELECT difference("value1"), difference("value2"), difference("value3"), difference("value4") FROM "s3" -(3 rows) - ---Testcase 219: -SELECT difference(value1),difference(value2),difference(value3),difference(value4) FROM s3; - difference | difference | difference | difference -------------+------------+------------+------------ - 0.1 | 0 | -0.1 | 0 - 0.1 | 0 | -0.1 | 0 - 0.8 | 100 | -0.8 | -100 - 1.1 | 0 | -1.1 | 0 - 1.1 | 0 | -1.1 | 0 -(5 rows) - --- select difference(*) (stub function, explain) ---Testcase 220: -EXPLAIN VERBOSE -SELECT difference_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (difference_all()) - InfluxDB query: SELECT difference(*) FROM "s3" -(3 rows) - --- select difference(*) (stub function, result) ---Testcase 221: -SELECT difference_all() from s3; - difference_all ----------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,0,-0.1,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,0,-0.09999999999999998,0) - (1970-01-01T00:00:03Z,,0.8,100,-0.8,-100) - (1970-01-01T00:00:04Z,,1.1,0,-1.1,0) - (1970-01-01T00:00:05Z,,1.0999999999999996,0,-1.0999999999999996,0) -(5 rows) - --- select difference(regex) (stub function, explain) ---Testcase 222: -EXPLAIN VERBOSE -SELECT difference('/value[1,4]/') from s3; - QUERY PLAN -------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (difference('/value[1,4]/'::text)) - InfluxDB query: SELECT difference(/value[1,4]/) FROM "s3" -(3 rows) - --- select difference(regex) (stub function, result) ---Testcase 223: -SELECT difference('/value[1,4]/') from s3; - difference -------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) - (1970-01-01T00:00:03Z,,0.8,,,-100) - (1970-01-01T00:00:04Z,,1.1,,,0) - (1970-01-01T00:00:05Z,,1.0999999999999996,,,0) -(5 rows) - --- select difference(*) (stub agg function and group by tag only) (explain) ---Testcase 224: -EXPLAIN VERBOSE -SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (difference_all()), tag1 - InfluxDB query: SELECT difference(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select difference(*) (stub agg function and group by tag only) (result) ---Testcase 225: -SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - difference_all ----------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,0,-0.1,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,0,-0.09999999999999998,0) - (1970-01-01T00:00:04Z,,1.1,0,-1.1,0) -(3 rows) - --- select difference(regex) (stub agg function and group by tag only) (explain) ---Testcase 226: -EXPLAIN VERBOSE -SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (difference('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT difference(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select difference(regex) (stub agg function and group by tag only) (result) ---Testcase 227: -SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - difference -------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) - (1970-01-01T00:00:04Z,,1.1,,,0) -(3 rows) - --- select difference(*) (stub function, expose data, explain) ---Testcase 228: -EXPLAIN VERBOSE -SELECT (difference_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((difference_all()))::s3)."time", (((difference_all()))::s3).tag1, (((difference_all()))::s3).value1, (((difference_all()))::s3).value2, (((difference_all()))::s3).value3, (((difference_all()))::s3).value4 - InfluxDB query: SELECT difference(*) FROM "s3" -(3 rows) - --- select difference(*) (stub function, expose data, result) ---Testcase 229: -SELECT (difference_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 0.1 | 0 | -0.1 | 0 - 1970-01-01 09:00:02+09 | | 0.1 | 0 | -0.1 | 0 - 1970-01-01 09:00:03+09 | | 0.8 | 100 | -0.8 | -100 - 1970-01-01 09:00:04+09 | | 1.1 | 0 | -1.1 | 0 - 1970-01-01 09:00:05+09 | | 1.1 | 0 | -1.1 | 0 -(5 rows) - --- select difference(regex) (stub function, expose data, explain) ---Testcase 230: -EXPLAIN VERBOSE -SELECT (difference('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((difference('/value[1,4]/'::text)))::s3)."time", (((difference('/value[1,4]/'::text)))::s3).tag1, (((difference('/value[1,4]/'::text)))::s3).value1, (((difference('/value[1,4]/'::text)))::s3).value2, (((difference('/value[1,4]/'::text)))::s3).value3, (((difference('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT difference(/value[1,4]/) FROM "s3" -(3 rows) - --- select difference(regex) (stub function, expose data, result) ---Testcase 231: -SELECT (difference('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 0.1 | | | 0 - 1970-01-01 09:00:02+09 | | 0.1 | | | 0 - 1970-01-01 09:00:03+09 | | 0.8 | | | -100 - 1970-01-01 09:00:04+09 | | 1.1 | | | 0 - 1970-01-01 09:00:05+09 | | 1.1 | | | 0 -(5 rows) - ---Testcase 232: -EXPLAIN VERBOSE -SELECT non_negative_difference(value1),non_negative_difference(value2),non_negative_difference(value3),non_negative_difference(value4) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (non_negative_difference(value1)), (non_negative_difference(value2)), (non_negative_difference(value3)), (non_negative_difference(value4)) - InfluxDB query: SELECT non_negative_difference("value1"), non_negative_difference("value2"), non_negative_difference("value3"), non_negative_difference("value4") FROM "s3" -(3 rows) - ---Testcase 233: -SELECT non_negative_difference(value1),non_negative_difference(value2),non_negative_difference(value3),non_negative_difference(value4) FROM s3; - non_negative_difference | non_negative_difference | non_negative_difference | non_negative_difference --------------------------+-------------------------+-------------------------+------------------------- - 0.1 | 0 | | 0 - 0.1 | 0 | | 0 - 0.8 | 100 | | - 1.1 | 0 | | 0 - 1.1 | 0 | | 0 -(5 rows) - --- select non_negative_difference(*) (stub function, explain) ---Testcase 234: -EXPLAIN VERBOSE -SELECT non_negative_difference_all() from s3; - QUERY PLAN ---------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (non_negative_difference_all()) - InfluxDB query: SELECT non_negative_difference(*) FROM "s3" -(3 rows) - --- select non_negative_difference(*) (stub function, result) ---Testcase 235: -SELECT non_negative_difference_all() from s3; - non_negative_difference_all --------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,0,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,0,,0) - (1970-01-01T00:00:03Z,,0.8,100,,) - (1970-01-01T00:00:04Z,,1.1,0,,0) - (1970-01-01T00:00:05Z,,1.0999999999999996,0,,0) -(5 rows) - --- select non_negative_difference(regex) (stub agg function, explain) ---Testcase 236: -EXPLAIN VERBOSE -SELECT non_negative_difference('/value[1,4]/') from s3; - QUERY PLAN --------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (non_negative_difference('/value[1,4]/'::text)) - InfluxDB query: SELECT non_negative_difference(/value[1,4]/) FROM "s3" -(3 rows) - --- select non_negative_difference(*), non_negative_difference(regex) (stub function, result) ---Testcase 237: -SELECT non_negative_difference('/value[1,4]/') from s3; - non_negative_difference -------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) - (1970-01-01T00:00:03Z,,0.8,,,) - (1970-01-01T00:00:04Z,,1.1,,,0) - (1970-01-01T00:00:05Z,,1.0999999999999996,,,0) -(5 rows) - --- select non_negative_difference(*) (stub function and group by tag only) (explain) ---Testcase 238: -EXPLAIN VERBOSE -SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (non_negative_difference_all()), tag1 - InfluxDB query: SELECT non_negative_difference(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select non_negative_difference(*) (stub function and group by tag only) (result) ---Testcase 239: -SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - non_negative_difference_all --------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,0,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,0,,0) - (1970-01-01T00:00:04Z,,1.1,0,,0) -(3 rows) - --- select non_negative_difference(regex) (stub function and group by tag only) (explain) ---Testcase 240: -EXPLAIN VERBOSE -SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (non_negative_difference('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT non_negative_difference(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select non_negative_difference(regex) (stub function and group by tag only) (result) ---Testcase 241: -SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - non_negative_difference -------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1,,,0) - (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) - (1970-01-01T00:00:04Z,,1.1,,,0) -(3 rows) - --- select non_negative_difference(*) (stub function, expose data, explain) ---Testcase 242: -EXPLAIN VERBOSE -SELECT (non_negative_difference_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((non_negative_difference_all()))::s3)."time", (((non_negative_difference_all()))::s3).tag1, (((non_negative_difference_all()))::s3).value1, (((non_negative_difference_all()))::s3).value2, (((non_negative_difference_all()))::s3).value3, (((non_negative_difference_all()))::s3).value4 - InfluxDB query: SELECT non_negative_difference(*) FROM "s3" -(3 rows) - --- select non_negative_difference(*) (stub function, expose data, result) ---Testcase 243: -SELECT (non_negative_difference_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 0.1 | 0 | | 0 - 1970-01-01 09:00:02+09 | | 0.1 | 0 | | 0 - 1970-01-01 09:00:03+09 | | 0.8 | 100 | | - 1970-01-01 09:00:04+09 | | 1.1 | 0 | | 0 - 1970-01-01 09:00:05+09 | | 1.1 | 0 | | 0 -(5 rows) - --- select non_negative_difference(regex) (stub function, expose data, explain) ---Testcase 244: -EXPLAIN VERBOSE -SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((non_negative_difference('/value[1,4]/'::text)))::s3)."time", (((non_negative_difference('/value[1,4]/'::text)))::s3).tag1, (((non_negative_difference('/value[1,4]/'::text)))::s3).value1, (((non_negative_difference('/value[1,4]/'::text)))::s3).value2, (((non_negative_difference('/value[1,4]/'::text)))::s3).value3, (((non_negative_difference('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT non_negative_difference(/value[1,4]/) FROM "s3" -(3 rows) - --- select non_negative_difference(regex) (stub function, expose data, result) ---Testcase 245: -SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 0.1 | | | 0 - 1970-01-01 09:00:02+09 | | 0.1 | | | 0 - 1970-01-01 09:00:03+09 | | 0.8 | | | - 1970-01-01 09:00:04+09 | | 1.1 | | | 0 - 1970-01-01 09:00:05+09 | | 1.1 | | | 0 -(5 rows) - ---Testcase 246: -EXPLAIN VERBOSE -SELECT elapsed(value1),elapsed(value2),elapsed(value3),elapsed(value4) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (elapsed(value1)), (elapsed(value2)), (elapsed(value3)), (elapsed(value4)) - InfluxDB query: SELECT elapsed("value1"), elapsed("value2"), elapsed("value3"), elapsed("value4") FROM "s3" -(3 rows) - ---Testcase 247: -SELECT elapsed(value1),elapsed(value2),elapsed(value3),elapsed(value4) FROM s3; - elapsed | elapsed | elapsed | elapsed -------------+------------+------------+------------ - 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1000000000 | 1000000000 | 1000000000 | 1000000000 -(5 rows) - ---Testcase 248: -EXPLAIN VERBOSE -SELECT elapsed(value1, interval '0.5s'),elapsed(value2, interval '0.2s'),elapsed(value3, interval '0.1s'),elapsed(value4, interval '2s') FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (elapsed(value1, '@ 0.5 secs'::interval)), (elapsed(value2, '@ 0.2 secs'::interval)), (elapsed(value3, '@ 0.1 secs'::interval)), (elapsed(value4, '@ 2 secs'::interval)) - InfluxDB query: SELECT elapsed("value1", 0d0h0m0s500000u), elapsed("value2", 0d0h0m0s200000u), elapsed("value3", 0d0h0m0s100000u), elapsed("value4", 0d0h0m2s0u) FROM "s3" -(3 rows) - ---Testcase 249: -SELECT elapsed(value1, interval '0.5s'),elapsed(value2, interval '0.2s'),elapsed(value3, interval '0.1s'),elapsed(value4, interval '2s') FROM s3; - elapsed | elapsed | elapsed | elapsed ----------+---------+---------+--------- - 2 | 5 | 10 | 0 - 2 | 5 | 10 | 0 - 2 | 5 | 10 | 0 - 2 | 5 | 10 | 0 - 2 | 5 | 10 | 0 -(5 rows) - --- select elapsed(*) (stub function, explain) ---Testcase 250: -EXPLAIN VERBOSE -SELECT elapsed_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (elapsed_all()) - InfluxDB query: SELECT elapsed(*) FROM "s3" -(3 rows) - --- select elapsed(*) (stub function, result) ---Testcase 251: -SELECT elapsed_all() from s3; - elapsed_all ---------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,1000000000,1000000000,1000000000,1000000000) - (1970-01-01T00:00:02Z,,1000000000,1000000000,1000000000,1000000000) - (1970-01-01T00:00:03Z,,1000000000,1000000000,1000000000,1000000000) - (1970-01-01T00:00:04Z,,1000000000,1000000000,1000000000,1000000000) - (1970-01-01T00:00:05Z,,1000000000,1000000000,1000000000,1000000000) -(5 rows) - --- select elapsed(regex) (stub function, explain) ---Testcase 252: -EXPLAIN VERBOSE -SELECT elapsed('/value[1,4]/') from s3; - QUERY PLAN ----------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (elapsed('/value[1,4]/'::text)) - InfluxDB query: SELECT elapsed(/value[1,4]/) FROM "s3" -(3 rows) - --- select elapsed(regex) (stub agg function, result) ---Testcase 253: -SELECT elapsed('/value[1,4]/') from s3; - elapsed -------------------------------------------------- - (1970-01-01T00:00:01Z,,1000000000,,,1000000000) - (1970-01-01T00:00:02Z,,1000000000,,,1000000000) - (1970-01-01T00:00:03Z,,1000000000,,,1000000000) - (1970-01-01T00:00:04Z,,1000000000,,,1000000000) - (1970-01-01T00:00:05Z,,1000000000,,,1000000000) -(5 rows) - --- select elapsed(*) (stub function and group by tag only) (explain) ---Testcase 254: -EXPLAIN VERBOSE -SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (elapsed_all()), tag1 - InfluxDB query: SELECT elapsed(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select elapsed(*) (stub function and group by tag only) (result) ---Testcase 255: -SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - elapsed_all ---------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,1000000000,1000000000,1000000000,1000000000) - (1970-01-01T00:00:02Z,,1000000000,1000000000,1000000000,1000000000) - (1970-01-01T00:00:04Z,,1000000000,1000000000,1000000000,1000000000) -(3 rows) - --- select elapsed(regex) (stub function and group by tag only) (explain) ---Testcase 256: -EXPLAIN VERBOSE -SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (elapsed('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT elapsed(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select elapsed(regex) (stub function and group by tag only) (result) ---Testcase 257: -SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - elapsed -------------------------------------------------- - (1970-01-01T00:00:01Z,,1000000000,,,1000000000) - (1970-01-01T00:00:02Z,,1000000000,,,1000000000) - (1970-01-01T00:00:04Z,,1000000000,,,1000000000) -(3 rows) - --- select elapsed(*) (stub function, expose data, explain) ---Testcase 258: -EXPLAIN VERBOSE -SELECT (elapsed_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((elapsed_all()))::s3)."time", (((elapsed_all()))::s3).tag1, (((elapsed_all()))::s3).value1, (((elapsed_all()))::s3).value2, (((elapsed_all()))::s3).value3, (((elapsed_all()))::s3).value4 - InfluxDB query: SELECT elapsed(*) FROM "s3" -(3 rows) - --- select elapsed(*) (stub function, expose data, result) ---Testcase 259: -SELECT (elapsed_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+------------+------------+------------+------------ - 1970-01-01 09:00:01+09 | | 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1970-01-01 09:00:02+09 | | 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1970-01-01 09:00:03+09 | | 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1970-01-01 09:00:04+09 | | 1000000000 | 1000000000 | 1000000000 | 1000000000 - 1970-01-01 09:00:05+09 | | 1000000000 | 1000000000 | 1000000000 | 1000000000 -(5 rows) - --- select elapsed(regex) (stub function, expose data, explain) ---Testcase 260: -EXPLAIN VERBOSE -SELECT (elapsed('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((elapsed('/value[1,4]/'::text)))::s3)."time", (((elapsed('/value[1,4]/'::text)))::s3).tag1, (((elapsed('/value[1,4]/'::text)))::s3).value1, (((elapsed('/value[1,4]/'::text)))::s3).value2, (((elapsed('/value[1,4]/'::text)))::s3).value3, (((elapsed('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT elapsed(/value[1,4]/) FROM "s3" -(3 rows) - --- select elapsed(regex) (stub agg function, expose data, result) ---Testcase 261: -SELECT (elapsed('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+------------+--------+--------+------------ - 1970-01-01 09:00:01+09 | | 1000000000 | | | 1000000000 - 1970-01-01 09:00:02+09 | | 1000000000 | | | 1000000000 - 1970-01-01 09:00:03+09 | | 1000000000 | | | 1000000000 - 1970-01-01 09:00:04+09 | | 1000000000 | | | 1000000000 - 1970-01-01 09:00:05+09 | | 1000000000 | | | 1000000000 -(5 rows) - ---Testcase 262: -EXPLAIN VERBOSE -SELECT moving_average(value1, 2),moving_average(value2, 2),moving_average(value3, 2),moving_average(value4, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (moving_average(value1, 2)), (moving_average(value2, 2)), (moving_average(value3, 2)), (moving_average(value4, 2)) - InfluxDB query: SELECT moving_average("value1", 2), moving_average("value2", 2), moving_average("value3", 2), moving_average("value4", 2) FROM "s3" -(3 rows) - ---Testcase 263: -SELECT moving_average(value1, 2),moving_average(value2, 2),moving_average(value3, 2),moving_average(value4, 2) FROM s3; - moving_average | moving_average | moving_average | moving_average -----------------+----------------+----------------+---------------- - 0.15 | 100 | -0.15 | -100 - 0.25 | 100 | -0.25 | -100 - 0.7 | 150 | -0.7 | -150 - 1.65 | 200 | -1.65 | -200 - 2.75 | 200 | -2.75 | -200 -(5 rows) - --- select moving_average(*) (stub function, explain) ---Testcase 264: -EXPLAIN VERBOSE -SELECT moving_average_all(2) from s3; - QUERY PLAN ---------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (moving_average_all(2)) - InfluxDB query: SELECT moving_average(*, 2) FROM "s3" -(3 rows) - --- select moving_average(*) (stub function, result) ---Testcase 265: -SELECT moving_average_all(2) from s3; - moving_average_all ---------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.15000000000000002,100,-0.15000000000000002,-100) - (1970-01-01T00:00:02Z,,0.25,100,-0.25,-100) - (1970-01-01T00:00:03Z,,0.7000000000000001,150,-0.7000000000000001,-150) - (1970-01-01T00:00:04Z,,1.6500000000000001,200,-1.6500000000000001,-200) - (1970-01-01T00:00:05Z,,2.75,200,-2.75,-200) -(5 rows) - --- select moving_average(regex) (stub function, explain) ---Testcase 266: -EXPLAIN VERBOSE -SELECT moving_average('/value[1,4]/', 2) from s3; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (moving_average('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select moving_average(regex) (stub function, result) ---Testcase 267: -SELECT moving_average('/value[1,4]/', 2) from s3; - moving_average ----------------------------------------------------- - (1970-01-01T00:00:01Z,,0.15000000000000002,,,-100) - (1970-01-01T00:00:02Z,,0.25,,,-100) - (1970-01-01T00:00:03Z,,0.7000000000000001,,,-150) - (1970-01-01T00:00:04Z,,1.6500000000000001,,,-200) - (1970-01-01T00:00:05Z,,2.75,,,-200) -(5 rows) - --- select moving_average(*) (stub function and group by tag only) (explain) ---Testcase 268: -EXPLAIN VERBOSE -SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (moving_average_all(2)), tag1 - InfluxDB query: SELECT moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select moving_average(*) (stub function and group by tag only) (result) ---Testcase 269: -SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - moving_average_all ---------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.15000000000000002,100,-0.15000000000000002,-100) - (1970-01-01T00:00:02Z,,0.25,100,-0.25,-100) - (1970-01-01T00:00:04Z,,1.6500000000000001,200,-1.6500000000000001,-200) -(3 rows) - --- select moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 270: -EXPLAIN VERBOSE -SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (moving_average('/value[1,4]/'::text, 2)), tag1 - InfluxDB query: SELECT moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select moving_average(regex) (stub function and group by tag only) (result) ---Testcase 271: -SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - moving_average ----------------------------------------------------- - (1970-01-01T00:00:01Z,,0.15000000000000002,,,-100) - (1970-01-01T00:00:02Z,,0.25,,,-100) - (1970-01-01T00:00:04Z,,1.6500000000000001,,,-200) -(3 rows) - --- select moving_average(*) (stub function, expose data, explain) ---Testcase 272: -EXPLAIN VERBOSE -SELECT (moving_average_all(2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((moving_average_all(2)))::s3)."time", (((moving_average_all(2)))::s3).tag1, (((moving_average_all(2)))::s3).value1, (((moving_average_all(2)))::s3).value2, (((moving_average_all(2)))::s3).value3, (((moving_average_all(2)))::s3).value4 - InfluxDB query: SELECT moving_average(*, 2) FROM "s3" -(3 rows) - --- select moving_average(*) (stub function, expose data, result) ---Testcase 273: -SELECT (moving_average_all(2)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 0.15 | 100 | -0.15 | -100 - 1970-01-01 09:00:02+09 | | 0.25 | 100 | -0.25 | -100 - 1970-01-01 09:00:03+09 | | 0.7 | 150 | -0.7 | -150 - 1970-01-01 09:00:04+09 | | 1.65 | 200 | -1.65 | -200 - 1970-01-01 09:00:05+09 | | 2.75 | 200 | -2.75 | -200 -(5 rows) - --- select moving_average(regex) (stub function, expose data, explain) ---Testcase 274: -EXPLAIN VERBOSE -SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((moving_average('/value[1,4]/'::text, 2)))::s3)."time", (((moving_average('/value[1,4]/'::text, 2)))::s3).tag1, (((moving_average('/value[1,4]/'::text, 2)))::s3).value1, (((moving_average('/value[1,4]/'::text, 2)))::s3).value2, (((moving_average('/value[1,4]/'::text, 2)))::s3).value3, (((moving_average('/value[1,4]/'::text, 2)))::s3).value4 - InfluxDB query: SELECT moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select moving_average(regex) (stub function, expose data, result) ---Testcase 275: -SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 0.15 | | | -100 - 1970-01-01 09:00:02+09 | | 0.25 | | | -100 - 1970-01-01 09:00:03+09 | | 0.7 | | | -150 - 1970-01-01 09:00:04+09 | | 1.65 | | | -200 - 1970-01-01 09:00:05+09 | | 2.75 | | | -200 -(5 rows) - ---Testcase 276: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator(value1, 2),chande_momentum_oscillator(value2, 2),chande_momentum_oscillator(value3, 2),chande_momentum_oscillator(value4, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (chande_momentum_oscillator(value1, 2)), (chande_momentum_oscillator(value2, 2)), (chande_momentum_oscillator(value3, 2)), (chande_momentum_oscillator(value4, 2)) - InfluxDB query: SELECT chande_momentum_oscillator("value1", 2), chande_momentum_oscillator("value2", 2), chande_momentum_oscillator("value3", 2), chande_momentum_oscillator("value4", 2) FROM "s3" -(3 rows) - ---Testcase 277: -SELECT chande_momentum_oscillator(value1, 2),chande_momentum_oscillator(value2, 2),chande_momentum_oscillator(value3, 2),chande_momentum_oscillator(value4, 2) FROM s3; - chande_momentum_oscillator | chande_momentum_oscillator | chande_momentum_oscillator | chande_momentum_oscillator -----------------------------+----------------------------+----------------------------+---------------------------- - 100 | 0 | -100 | 0 - 100 | 0 | -100 | 0 - 100 | 100 | -100 | -100 - 100 | 100 | -100 | -100 - 100 | 0 | -100 | 0 -(5 rows) - ---Testcase 278: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator(value1, 2, 2),chande_momentum_oscillator(value2, 2, 2),chande_momentum_oscillator(value3, 2, 2),chande_momentum_oscillator(value4, 2, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (chande_momentum_oscillator(value1, 2, 2)), (chande_momentum_oscillator(value2, 2, 2)), (chande_momentum_oscillator(value3, 2, 2)), (chande_momentum_oscillator(value4, 2, 2)) - InfluxDB query: SELECT chande_momentum_oscillator("value1", 2, 2), chande_momentum_oscillator("value2", 2, 2), chande_momentum_oscillator("value3", 2, 2), chande_momentum_oscillator("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 279: -SELECT chande_momentum_oscillator(value1, 2, 2),chande_momentum_oscillator(value2, 2, 2),chande_momentum_oscillator(value3, 2, 2),chande_momentum_oscillator(value4, 2, 2) FROM s3; - chande_momentum_oscillator | chande_momentum_oscillator | chande_momentum_oscillator | chande_momentum_oscillator -----------------------------+----------------------------+----------------------------+---------------------------- - 100 | 0 | -100 | 0 - 100 | 100 | -100 | -100 - 100 | 100 | -100 | -100 - 100 | 0 | -100 | 0 -(4 rows) - --- select chande_momentum_oscillator(*) (stub function, explain) ---Testcase 280: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator_all(2) from s3; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (chande_momentum_oscillator_all(2)) - InfluxDB query: SELECT chande_momentum_oscillator(*, 2) FROM "s3" -(3 rows) - --- select chande_momentum_oscillator(*) (stub function, result) ---Testcase 281: -SELECT chande_momentum_oscillator_all(2) from s3; - chande_momentum_oscillator_all -------------------------------------------- - (1970-01-01T00:00:01Z,,100,0,-100,0) - (1970-01-01T00:00:02Z,,100,0,-100,0) - (1970-01-01T00:00:03Z,,100,100,-100,-100) - (1970-01-01T00:00:04Z,,100,100,-100,-100) - (1970-01-01T00:00:05Z,,100,0,-100,0) -(5 rows) - --- select chande_momentum_oscillator(regex) (stub function, explain) ---Testcase 282: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; - QUERY PLAN --------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (chande_momentum_oscillator('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT chande_momentum_oscillator(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select chande_momentum_oscillator(regex) (stub agg function, result) ---Testcase 283: -SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; - chande_momentum_oscillator ------------------------------------- - (1970-01-01T00:00:01Z,,100,,,0) - (1970-01-01T00:00:02Z,,100,,,0) - (1970-01-01T00:00:03Z,,100,,,-100) - (1970-01-01T00:00:04Z,,100,,,-100) - (1970-01-01T00:00:05Z,,100,,,0) -(5 rows) - --- select chande_momentum_oscillator(*) (stub function and group by tag only) (explain) ---Testcase 284: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (chande_momentum_oscillator_all(2)), tag1 - InfluxDB query: SELECT chande_momentum_oscillator(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select chande_momentum_oscillator(*) (stub agg function and group by tag only) (result) ---Testcase 285: -SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - chande_momentum_oscillator_all --------------------------------------- - (1970-01-01T00:00:01Z,,100,0,-100,0) - (1970-01-01T00:00:02Z,,100,0,-100,0) - (1970-01-01T00:00:04Z,,100,0,-100,0) -(3 rows) - --- select chande_momentum_oscillator(regex) (stub agg function and group by tag only) (explain) ---Testcase 286: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (chande_momentum_oscillator('/value[1,4]/'::text, 2)), tag1 - InfluxDB query: SELECT chande_momentum_oscillator(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select chande_momentum_oscillator(regex) (stub function and group by tag only) (result) ---Testcase 287: -SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - chande_momentum_oscillator ---------------------------------- - (1970-01-01T00:00:01Z,,100,,,0) - (1970-01-01T00:00:02Z,,100,,,0) - (1970-01-01T00:00:04Z,,100,,,0) -(3 rows) - --- select chande_momentum_oscillator(*) (stub agg function, expose data, explain) ---Testcase 288: -EXPLAIN VERBOSE -SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((chande_momentum_oscillator_all(2)))::s3)."time", (((chande_momentum_oscillator_all(2)))::s3).tag1, (((chande_momentum_oscillator_all(2)))::s3).value1, (((chande_momentum_oscillator_all(2)))::s3).value2, (((chande_momentum_oscillator_all(2)))::s3).value3, (((chande_momentum_oscillator_all(2)))::s3).value4 - InfluxDB query: SELECT chande_momentum_oscillator(*, 2) FROM "s3" -(3 rows) - --- select chande_momentum_oscillator(*) (stub function, expose data, result) ---Testcase 289: -SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 100 | 0 | -100 | 0 - 1970-01-01 09:00:02+09 | | 100 | 0 | -100 | 0 - 1970-01-01 09:00:03+09 | | 100 | 100 | -100 | -100 - 1970-01-01 09:00:04+09 | | 100 | 100 | -100 | -100 - 1970-01-01 09:00:05+09 | | 100 | 0 | -100 | 0 -(5 rows) - --- select chande_momentum_oscillator(regex) (stub function, expose data, explain) ---Testcase 290: -EXPLAIN VERBOSE -SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((chande_momentum_oscillator('/value[1,4]/'::text, 2)))::s3)."time", (((chande_momentum_oscillator('/value[1,4]/'::text, 2)))::s3).tag1, (((chande_momentum_oscillator('/value[1,4]/'::text, 2)))::s3).value1, (((chande_momentum_oscillator('/value[1,4]/'::text, 2)))::s3).value2, (((chande_momentum_oscillator('/value[1,4]/'::text, 2)))::s3).value3, (((chande_momentum_oscillator('/value[1,4]/'::text, 2)))::s3).value4 - InfluxDB query: SELECT chande_momentum_oscillator(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select chande_momentum_oscillator(regex) (stub function, expose data, result) ---Testcase 291: -SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:01+09 | | 100 | | | 0 - 1970-01-01 09:00:02+09 | | 100 | | | 0 - 1970-01-01 09:00:03+09 | | 100 | | | -100 - 1970-01-01 09:00:04+09 | | 100 | | | -100 - 1970-01-01 09:00:05+09 | | 100 | | | 0 -(5 rows) - ---Testcase 292: -EXPLAIN VERBOSE -SELECT exponential_moving_average(value1, 2),exponential_moving_average(value2, 2),exponential_moving_average(value3, 2),exponential_moving_average(value4, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (exponential_moving_average(value1, 2)), (exponential_moving_average(value2, 2)), (exponential_moving_average(value3, 2)), (exponential_moving_average(value4, 2)) - InfluxDB query: SELECT exponential_moving_average("value1", 2), exponential_moving_average("value2", 2), exponential_moving_average("value3", 2), exponential_moving_average("value4", 2) FROM "s3" -(3 rows) - ---Testcase 293: -SELECT exponential_moving_average(value1, 2),exponential_moving_average(value2, 2),exponential_moving_average(value3, 2),exponential_moving_average(value4, 2) FROM s3; - exponential_moving_average | exponential_moving_average | exponential_moving_average | exponential_moving_average -----------------------------+----------------------------+----------------------------+---------------------------- - 0.166666666666667 | 100 | -0.166666666666667 | -100 - 0.255555555555556 | 100 | -0.255555555555556 | -100 - 0.818518518518519 | 166.666666666667 | -0.818518518518519 | -166.666666666667 - 1.73950617283951 | 188.888888888889 | -1.73950617283951 | -188.888888888889 - 2.7798353909465 | 196.296296296296 | -2.7798353909465 | -196.296296296296 -(5 rows) - ---Testcase 294: -EXPLAIN VERBOSE -SELECT exponential_moving_average(value1, 2, 2),exponential_moving_average(value2, 2, 2),exponential_moving_average(value3, 2, 2),exponential_moving_average(value4, 2, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (exponential_moving_average(value1, 2, 2)), (exponential_moving_average(value2, 2, 2)), (exponential_moving_average(value3, 2, 2)), (exponential_moving_average(value4, 2, 2)) - InfluxDB query: SELECT exponential_moving_average("value1", 2, 2), exponential_moving_average("value2", 2, 2), exponential_moving_average("value3", 2, 2), exponential_moving_average("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 295: -SELECT exponential_moving_average(value1, 2, 2),exponential_moving_average(value2, 2, 2),exponential_moving_average(value3, 2, 2),exponential_moving_average(value4, 2, 2) FROM s3; - exponential_moving_average | exponential_moving_average | exponential_moving_average | exponential_moving_average -----------------------------+----------------------------+----------------------------+---------------------------- - 0.255555555555556 | 100 | -0.255555555555556 | -100 - 0.818518518518519 | 166.666666666667 | -0.818518518518519 | -166.666666666667 - 1.73950617283951 | 188.888888888889 | -1.73950617283951 | -188.888888888889 - 2.7798353909465 | 196.296296296296 | -2.7798353909465 | -196.296296296296 -(4 rows) - --- select exponential_moving_average(*) (stub function, explain) ---Testcase 296: -EXPLAIN VERBOSE -SELECT exponential_moving_average_all(2) from s3; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (exponential_moving_average_all(2)) - InfluxDB query: SELECT exponential_moving_average(*, 2) FROM "s3" -(3 rows) - --- select exponential_moving_average(*) (stub function, result) ---Testcase 297: -SELECT exponential_moving_average_all(2) from s3; - exponential_moving_average_all -------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.16666666666666669,100,-0.16666666666666669,-100) - (1970-01-01T00:00:02Z,,0.25555555555555554,100,-0.25555555555555554,-100) - (1970-01-01T00:00:03Z,,0.8185185185185185,166.66666666666666,-0.8185185185185185,-166.66666666666666) - (1970-01-01T00:00:04Z,,1.7395061728395063,188.88888888888889,-1.7395061728395063,-188.88888888888889) - (1970-01-01T00:00:05Z,,2.779835390946502,196.2962962962963,-2.779835390946502,-196.2962962962963) -(5 rows) - --- select exponential_moving_average(regex) (stub function, explain) ---Testcase 298: -EXPLAIN VERBOSE -SELECT exponential_moving_average('/value[1,4]/',2) from s3; - QUERY PLAN --------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (exponential_moving_average('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT exponential_moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select exponential_moving_average(regex) (stub function, result) ---Testcase 299: -SELECT exponential_moving_average('/value[1,4]/',2) from s3; - exponential_moving_average ------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.16666666666666669,,,-100) - (1970-01-01T00:00:02Z,,0.25555555555555554,,,-100) - (1970-01-01T00:00:03Z,,0.8185185185185185,,,-166.66666666666666) - (1970-01-01T00:00:04Z,,1.7395061728395063,,,-188.88888888888889) - (1970-01-01T00:00:05Z,,2.779835390946502,,,-196.2962962962963) -(5 rows) - --- select exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 300: -EXPLAIN VERBOSE -SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (exponential_moving_average_all(2)), tag1 - InfluxDB query: SELECT exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 301: -SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - exponential_moving_average_all ---------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.16666666666666669,100,-0.16666666666666669,-100) - (1970-01-01T00:00:02Z,,0.25555555555555554,100,-0.25555555555555554,-100) - (1970-01-01T00:00:04Z,,1.8333333333333335,200,-1.8333333333333335,-200) -(3 rows) - --- select exponential_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 302: -EXPLAIN VERBOSE -SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (exponential_moving_average('/value[1,4]/'::text, 2)), tag1 - InfluxDB query: SELECT exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select exponential_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 303: -SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - exponential_moving_average ----------------------------------------------------- - (1970-01-01T00:00:01Z,,0.16666666666666669,,,-100) - (1970-01-01T00:00:02Z,,0.25555555555555554,,,-100) - (1970-01-01T00:00:04Z,,1.8333333333333335,,,-200) -(3 rows) - ---Testcase 304: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average(value1, 2),double_exponential_moving_average(value2, 2),double_exponential_moving_average(value3, 2),double_exponential_moving_average(value4, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (double_exponential_moving_average(value1, 2)), (double_exponential_moving_average(value2, 2)), (double_exponential_moving_average(value3, 2)), (double_exponential_moving_average(value4, 2)) - InfluxDB query: SELECT double_exponential_moving_average("value1", 2), double_exponential_moving_average("value2", 2), double_exponential_moving_average("value3", 2), double_exponential_moving_average("value4", 2) FROM "s3" -(3 rows) - ---Testcase 305: -SELECT double_exponential_moving_average(value1, 2),double_exponential_moving_average(value2, 2),double_exponential_moving_average(value3, 2),double_exponential_moving_average(value4, 2) FROM s3; - double_exponential_moving_average | double_exponential_moving_average | double_exponential_moving_average | double_exponential_moving_average ------------------------------------+-----------------------------------+-----------------------------------+----------------------------------- - 0.188888888888889 | 100 | -0.188888888888889 | -100 - 0.292592592592593 | 100 | -0.292592592592593 | -100 - 1.01851851851852 | 188.888888888889 | -1.01851851851852 | -188.888888888889 - 2.11316872427984 | 203.703703703704 | -2.11316872427984 | -203.703703703704 - 3.25116598079561 | 203.703703703704 | -3.25116598079561 | -203.703703703704 -(5 rows) - ---Testcase 306: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average(value1, 2, 2),double_exponential_moving_average(value2, 2, 2),double_exponential_moving_average(value3, 2, 2),double_exponential_moving_average(value4, 2, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (double_exponential_moving_average(value1, 2, 2)), (double_exponential_moving_average(value2, 2, 2)), (double_exponential_moving_average(value3, 2, 2)), (double_exponential_moving_average(value4, 2, 2)) - InfluxDB query: SELECT double_exponential_moving_average("value1", 2, 2), double_exponential_moving_average("value2", 2, 2), double_exponential_moving_average("value3", 2, 2), double_exponential_moving_average("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 307: -SELECT double_exponential_moving_average(value1, 2, 2),double_exponential_moving_average(value2, 2, 2),double_exponential_moving_average(value3, 2, 2),double_exponential_moving_average(value4, 2, 2) FROM s3; - double_exponential_moving_average | double_exponential_moving_average | double_exponential_moving_average | double_exponential_moving_average ------------------------------------+-----------------------------------+-----------------------------------+----------------------------------- - 0.292592592592593 | 100 | -0.292592592592593 | -100 - 1.01851851851852 | 188.888888888889 | -1.01851851851852 | -188.888888888889 - 2.11316872427984 | 203.703703703704 | -2.11316872427984 | -203.703703703704 - 3.25116598079561 | 203.703703703704 | -3.25116598079561 | -203.703703703704 -(4 rows) - --- select double_exponential_moving_average(*) (stub function, explain) ---Testcase 308: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average_all(2) from s3; - QUERY PLAN ----------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (double_exponential_moving_average_all(2)) - InfluxDB query: SELECT double_exponential_moving_average(*, 2) FROM "s3" -(3 rows) - --- select double_exponential_moving_average(*) (stub function, result) ---Testcase 309: -SELECT double_exponential_moving_average_all(2) from s3; - double_exponential_moving_average_all -------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1888888888888889,100,-0.1888888888888889,-100) - (1970-01-01T00:00:02Z,,0.29259259259259257,100,-0.29259259259259257,-100) - (1970-01-01T00:00:03Z,,1.0185185185185186,188.88888888888889,-1.0185185185185186,-188.88888888888889) - (1970-01-01T00:00:04Z,,2.1131687242798356,203.7037037037037,-2.1131687242798356,-203.7037037037037) - (1970-01-01T00:00:05Z,,3.2511659807956104,203.70370370370372,-3.2511659807956104,-203.70370370370372) -(5 rows) - --- select double_exponential_moving_average(regex) (stub function, explain) ---Testcase 310: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; - QUERY PLAN ---------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (double_exponential_moving_average('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT double_exponential_moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select double_exponential_moving_average(regex) (stub function, result) ---Testcase 311: -SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; - double_exponential_moving_average ------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1888888888888889,,,-100) - (1970-01-01T00:00:02Z,,0.29259259259259257,,,-100) - (1970-01-01T00:00:03Z,,1.0185185185185186,,,-188.88888888888889) - (1970-01-01T00:00:04Z,,2.1131687242798356,,,-203.7037037037037) - (1970-01-01T00:00:05Z,,3.2511659807956104,,,-203.70370370370372) -(5 rows) - --- select double_exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 312: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (double_exponential_moving_average_all(2)), tag1 - InfluxDB query: SELECT double_exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select double_exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 313: -SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - double_exponential_moving_average_all ---------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1888888888888889,100,-0.1888888888888889,-100) - (1970-01-01T00:00:02Z,,0.29259259259259257,100,-0.29259259259259257,-100) - (1970-01-01T00:00:04Z,,2.077777777777778,200,-2.077777777777778,-200) -(3 rows) - --- select double_exponential_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 314: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (double_exponential_moving_average('/value[1,4]/'::text, 2)), tag1 - InfluxDB query: SELECT double_exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select double_exponential_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 315: -SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - double_exponential_moving_average ----------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1888888888888889,,,-100) - (1970-01-01T00:00:02Z,,0.29259259259259257,,,-100) - (1970-01-01T00:00:04Z,,2.077777777777778,,,-200) -(3 rows) - ---Testcase 316: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio(value1, 2),kaufmans_efficiency_ratio(value2, 2),kaufmans_efficiency_ratio(value3, 2),kaufmans_efficiency_ratio(value4, 2) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (kaufmans_efficiency_ratio(value1, 2)), (kaufmans_efficiency_ratio(value2, 2)), (kaufmans_efficiency_ratio(value3, 2)), (kaufmans_efficiency_ratio(value4, 2)) - InfluxDB query: SELECT kaufmans_efficiency_ratio("value1", 2), kaufmans_efficiency_ratio("value2", 2), kaufmans_efficiency_ratio("value3", 2), kaufmans_efficiency_ratio("value4", 2) FROM "s3" -(3 rows) - ---Testcase 317: -SELECT kaufmans_efficiency_ratio(value1, 2),kaufmans_efficiency_ratio(value2, 2),kaufmans_efficiency_ratio(value3, 2),kaufmans_efficiency_ratio(value4, 2) FROM s3; - kaufmans_efficiency_ratio | kaufmans_efficiency_ratio | kaufmans_efficiency_ratio | kaufmans_efficiency_ratio ----------------------------+---------------------------+---------------------------+--------------------------- - 1 | 0 | 1 | 0 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 0 | 1 | 0 -(4 rows) - ---Testcase 318: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio(value1, 2, 2),kaufmans_efficiency_ratio(value2, 2, 2),kaufmans_efficiency_ratio(value3, 2, 2),kaufmans_efficiency_ratio(value4, 2, 2) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (kaufmans_efficiency_ratio(value1, 2, 2)), (kaufmans_efficiency_ratio(value2, 2, 2)), (kaufmans_efficiency_ratio(value3, 2, 2)), (kaufmans_efficiency_ratio(value4, 2, 2)) - InfluxDB query: SELECT kaufmans_efficiency_ratio("value1", 2, 2), kaufmans_efficiency_ratio("value2", 2, 2), kaufmans_efficiency_ratio("value3", 2, 2), kaufmans_efficiency_ratio("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 319: -SELECT kaufmans_efficiency_ratio(value1, 2, 2),kaufmans_efficiency_ratio(value2, 2, 2),kaufmans_efficiency_ratio(value3, 2, 2),kaufmans_efficiency_ratio(value4, 2, 2) FROM s3; - kaufmans_efficiency_ratio | kaufmans_efficiency_ratio | kaufmans_efficiency_ratio | kaufmans_efficiency_ratio ----------------------------+---------------------------+---------------------------+--------------------------- - 1 | 0 | 1 | 0 - 1 | 1 | 1 | 1 - 1 | 1 | 1 | 1 - 1 | 0 | 1 | 0 -(4 rows) - --- select kaufmans_efficiency_ratio(*) (stub function, explain) ---Testcase 320: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio_all(2) from s3; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (kaufmans_efficiency_ratio_all(2)) - InfluxDB query: SELECT kaufmans_efficiency_ratio(*, 2) FROM "s3" -(3 rows) - --- select kaufmans_efficiency_ratio(*) (stub function, result) ---Testcase 321: -SELECT kaufmans_efficiency_ratio_all(2) from s3; - kaufmans_efficiency_ratio_all -------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,1,0,1,0) - (1970-01-01T00:00:03Z,,1.0000000000000002,1,1.0000000000000002,1) - (1970-01-01T00:00:04Z,,1,1,1,1) - (1970-01-01T00:00:05Z,,1,0,1,0) -(4 rows) - --- select kaufmans_efficiency_ratio(regex) (stub function, explain) ---Testcase 322: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; - QUERY PLAN -------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT kaufmans_efficiency_ratio(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select kaufmans_efficiency_ratio(regex) (stub function, result) ---Testcase 323: -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; - kaufmans_efficiency_ratio ------------------------------------------------- - (1970-01-01T00:00:02Z,,1,,,0) - (1970-01-01T00:00:03Z,,1.0000000000000002,,,1) - (1970-01-01T00:00:04Z,,1,,,1) - (1970-01-01T00:00:05Z,,1,,,0) -(4 rows) - --- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (explain) ---Testcase 324: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (kaufmans_efficiency_ratio_all(2)), tag1 - InfluxDB query: SELECT kaufmans_efficiency_ratio(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (result) ---Testcase 325: -SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - kaufmans_efficiency_ratio_all ---------------------------------- - (1970-01-01T00:00:02Z,,1,0,1,0) -(1 row) - --- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (explain) ---Testcase 326: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)), tag1 - InfluxDB query: SELECT kaufmans_efficiency_ratio(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (result) ---Testcase 327: -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - kaufmans_efficiency_ratio -------------------------------- - (1970-01-01T00:00:02Z,,1,,,0) -(1 row) - --- select kaufmans_efficiency_ratio(*) (stub function, expose data, explain) ---Testcase 328: -EXPLAIN VERBOSE -SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((kaufmans_efficiency_ratio_all(2)))::s3)."time", (((kaufmans_efficiency_ratio_all(2)))::s3).tag1, (((kaufmans_efficiency_ratio_all(2)))::s3).value1, (((kaufmans_efficiency_ratio_all(2)))::s3).value2, (((kaufmans_efficiency_ratio_all(2)))::s3).value3, (((kaufmans_efficiency_ratio_all(2)))::s3).value4 - InfluxDB query: SELECT kaufmans_efficiency_ratio(*, 2) FROM "s3" -(3 rows) - --- select kaufmans_efficiency_ratio(*) (stub function, expose data, result) ---Testcase 329: -SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:02+09 | | 1 | 0 | 1 | 0 - 1970-01-01 09:00:03+09 | | 1 | 1 | 1 | 1 - 1970-01-01 09:00:04+09 | | 1 | 1 | 1 | 1 - 1970-01-01 09:00:05+09 | | 1 | 0 | 1 | 0 -(4 rows) - --- select kaufmans_efficiency_ratio(regex) (stub function, expose data, explain) ---Testcase 330: -EXPLAIN VERBOSE -SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)))::s3)."time", (((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)))::s3).tag1, (((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)))::s3).value1, (((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)))::s3).value2, (((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)))::s3).value3, (((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)))::s3).value4 - InfluxDB query: SELECT kaufmans_efficiency_ratio(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select kaufmans_efficiency_ratio(regex) (stub function, expose data, result) ---Testcase 331: -SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:02+09 | | 1 | | | 0 - 1970-01-01 09:00:03+09 | | 1 | | | 1 - 1970-01-01 09:00:04+09 | | 1 | | | 1 - 1970-01-01 09:00:05+09 | | 1 | | | 0 -(4 rows) - ---Testcase 332: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average(value1, 2),kaufmans_adaptive_moving_average(value2, 2),kaufmans_adaptive_moving_average(value3, 2),kaufmans_adaptive_moving_average(value4, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (kaufmans_adaptive_moving_average(value1, 2)), (kaufmans_adaptive_moving_average(value2, 2)), (kaufmans_adaptive_moving_average(value3, 2)), (kaufmans_adaptive_moving_average(value4, 2)) - InfluxDB query: SELECT kaufmans_adaptive_moving_average("value1", 2), kaufmans_adaptive_moving_average("value2", 2), kaufmans_adaptive_moving_average("value3", 2), kaufmans_adaptive_moving_average("value4", 2) FROM "s3" -(3 rows) - ---Testcase 333: -SELECT kaufmans_adaptive_moving_average(value1, 2),kaufmans_adaptive_moving_average(value2, 2),kaufmans_adaptive_moving_average(value3, 2),kaufmans_adaptive_moving_average(value4, 2) FROM s3; - kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average -----------------------------------+----------------------------------+----------------------------------+---------------------------------- - 0.244444444444444 | 100 | -0.244444444444444 | -100 - 0.624691358024692 | 144.444444444444 | -0.624691358024692 | -144.444444444444 - 1.32482853223594 | 169.135802469136 | -1.32482853223594 | -169.135802469136 - 2.20268251790886 | 169.264269472386 | -2.20268251790886 | -169.264269472386 -(4 rows) - ---Testcase 334: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average(value1, 2, 2),kaufmans_adaptive_moving_average(value2, 2, 2),kaufmans_adaptive_moving_average(value3, 2, 2),kaufmans_adaptive_moving_average(value4, 2, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (kaufmans_adaptive_moving_average(value1, 2, 2)), (kaufmans_adaptive_moving_average(value2, 2, 2)), (kaufmans_adaptive_moving_average(value3, 2, 2)), (kaufmans_adaptive_moving_average(value4, 2, 2)) - InfluxDB query: SELECT kaufmans_adaptive_moving_average("value1", 2, 2), kaufmans_adaptive_moving_average("value2", 2, 2), kaufmans_adaptive_moving_average("value3", 2, 2), kaufmans_adaptive_moving_average("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 335: -SELECT kaufmans_adaptive_moving_average(value1, 2, 2),kaufmans_adaptive_moving_average(value2, 2, 2),kaufmans_adaptive_moving_average(value3, 2, 2),kaufmans_adaptive_moving_average(value4, 2, 2) FROM s3; - kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average | kaufmans_adaptive_moving_average -----------------------------------+----------------------------------+----------------------------------+---------------------------------- - 0.244444444444444 | 100 | -0.244444444444444 | -100 - 0.624691358024692 | 144.444444444444 | -0.624691358024692 | -144.444444444444 - 1.32482853223594 | 169.135802469136 | -1.32482853223594 | -169.135802469136 - 2.20268251790886 | 169.264269472386 | -2.20268251790886 | -169.264269472386 -(4 rows) - --- select kaufmans_adaptive_moving_average(*) (stub function, explain) ---Testcase 336: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average_all(2) from s3; - QUERY PLAN ---------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (kaufmans_adaptive_moving_average_all(2)) - InfluxDB query: SELECT kaufmans_adaptive_moving_average(*, 2) FROM "s3" -(3 rows) - --- select kaufmans_adaptive_moving_average(*) (stub function, result) ---Testcase 337: -SELECT kaufmans_adaptive_moving_average_all(2) from s3; - kaufmans_adaptive_moving_average_all -------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,0.24444444444444446,100,-0.24444444444444446,-100) - (1970-01-01T00:00:03Z,,0.6246913580246916,144.44444444444446,-0.6246913580246916,-144.44444444444446) - (1970-01-01T00:00:04Z,,1.3248285322359399,169.13580246913583,-1.3248285322359399,-169.13580246913583) - (1970-01-01T00:00:05Z,,2.2026825179088556,169.26426947238605,-2.2026825179088556,-169.26426947238605) -(4 rows) - --- select kaufmans_adaptive_moving_average(regex) (stub function, explain) ---Testcase 338: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; - QUERY PLAN --------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (kaufmans_adaptive_moving_average('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT kaufmans_adaptive_moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select kaufmans_adaptive_moving_average(regex) (stub agg function, result) ---Testcase 339: -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; - kaufmans_adaptive_moving_average ------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,0.24444444444444446,,,-100) - (1970-01-01T00:00:03Z,,0.6246913580246916,,,-144.44444444444446) - (1970-01-01T00:00:04Z,,1.3248285322359399,,,-169.13580246913583) - (1970-01-01T00:00:05Z,,2.2026825179088556,,,-169.26426947238605) -(4 rows) - --- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 340: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (kaufmans_adaptive_moving_average_all(2)), tag1 - InfluxDB query: SELECT kaufmans_adaptive_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (result) ---Testcase 341: -SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - kaufmans_adaptive_moving_average_all ---------------------------------------------------------------------------- - (1970-01-01T00:00:02Z,,0.24444444444444446,100,-0.24444444444444446,-100) -(1 row) - --- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 342: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (kaufmans_adaptive_moving_average('/value[1,4]/'::text, 2)), tag1 - InfluxDB query: SELECT kaufmans_adaptive_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 343: -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - kaufmans_adaptive_moving_average ----------------------------------------------------- - (1970-01-01T00:00:02Z,,0.24444444444444446,,,-100) -(1 row) - ---Testcase 344: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average(value1, 2),triple_exponential_moving_average(value2, 2),triple_exponential_moving_average(value3, 2),triple_exponential_moving_average(value4, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (triple_exponential_moving_average(value1, 2)), (triple_exponential_moving_average(value2, 2)), (triple_exponential_moving_average(value3, 2)), (triple_exponential_moving_average(value4, 2)) - InfluxDB query: SELECT triple_exponential_moving_average("value1", 2), triple_exponential_moving_average("value2", 2), triple_exponential_moving_average("value3", 2), triple_exponential_moving_average("value4", 2) FROM "s3" -(3 rows) - ---Testcase 345: -SELECT triple_exponential_moving_average(value1, 2),triple_exponential_moving_average(value2, 2),triple_exponential_moving_average(value3, 2),triple_exponential_moving_average(value4, 2) FROM s3; - triple_exponential_moving_average | triple_exponential_moving_average | triple_exponential_moving_average | triple_exponential_moving_average ------------------------------------+-----------------------------------+-----------------------------------+----------------------------------- - 0.196296296296296 | 100 | -0.196296296296296 | -100 - 0.3 | 100 | -0.3 | -100 - 1.07530864197531 | 196.296296296296 | -1.07530864197531 | -196.296296296296 - 2.18998628257888 | 203.703703703704 | -2.18998628257888 | -203.703703703704 - 3.30932784636488 | 201.234567901235 | -3.30932784636488 | -201.234567901235 -(5 rows) - ---Testcase 346: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average(value1, 2, 2),triple_exponential_moving_average(value2, 2, 2),triple_exponential_moving_average(value3, 2, 2),triple_exponential_moving_average(value4, 2, 2) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (triple_exponential_moving_average(value1, 2, 2)), (triple_exponential_moving_average(value2, 2, 2)), (triple_exponential_moving_average(value3, 2, 2)), (triple_exponential_moving_average(value4, 2, 2)) - InfluxDB query: SELECT triple_exponential_moving_average("value1", 2, 2), triple_exponential_moving_average("value2", 2, 2), triple_exponential_moving_average("value3", 2, 2), triple_exponential_moving_average("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 347: -SELECT triple_exponential_moving_average(value1, 2, 2),triple_exponential_moving_average(value2, 2, 2),triple_exponential_moving_average(value3, 2, 2),triple_exponential_moving_average(value4, 2, 2) FROM s3; - triple_exponential_moving_average | triple_exponential_moving_average | triple_exponential_moving_average | triple_exponential_moving_average ------------------------------------+-----------------------------------+-----------------------------------+----------------------------------- - 0.3 | 100 | -0.3 | -100 - 1.07530864197531 | 196.296296296296 | -1.07530864197531 | -196.296296296296 - 2.18998628257888 | 203.703703703704 | -2.18998628257888 | -203.703703703704 - 3.30932784636488 | 201.234567901235 | -3.30932784636488 | -201.234567901235 -(4 rows) - --- select triple_exponential_moving_average(*) (stub function, explain) ---Testcase 348: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average_all(2) from s3; - QUERY PLAN ----------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (triple_exponential_moving_average_all(2)) - InfluxDB query: SELECT triple_exponential_moving_average(*, 2) FROM "s3" -(3 rows) - --- select triple_exponential_moving_average(*) (stub function, result) ---Testcase 349: -SELECT triple_exponential_moving_average_all(2) from s3; - triple_exponential_moving_average_all -------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1962962962962963,100,-0.1962962962962963,-100) - (1970-01-01T00:00:02Z,,0.30000000000000004,100,-0.30000000000000004,-100) - (1970-01-01T00:00:03Z,,1.0753086419753088,196.29629629629636,-1.0753086419753088,-196.29629629629636) - (1970-01-01T00:00:04Z,,2.189986282578875,203.70370370370372,-2.189986282578875,-203.70370370370372) - (1970-01-01T00:00:05Z,,3.309327846364883,201.23456790123464,-3.309327846364883,-201.23456790123464) -(5 rows) - --- select triple_exponential_moving_average(regex) (stub function, explain) ---Testcase 350: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; - QUERY PLAN ---------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (triple_exponential_moving_average('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT triple_exponential_moving_average(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select triple_exponential_moving_average(regex) (stub function, result) ---Testcase 351: -SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; - triple_exponential_moving_average ------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1962962962962963,,,-100) - (1970-01-01T00:00:02Z,,0.30000000000000004,,,-100) - (1970-01-01T00:00:03Z,,1.0753086419753088,,,-196.29629629629636) - (1970-01-01T00:00:04Z,,2.189986282578875,,,-203.70370370370372) - (1970-01-01T00:00:05Z,,3.309327846364883,,,-201.23456790123464) -(5 rows) - --- select triple_exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 352: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (triple_exponential_moving_average_all(2)), tag1 - InfluxDB query: SELECT triple_exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select triple_exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 353: -SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - triple_exponential_moving_average_all ---------------------------------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1962962962962963,100,-0.1962962962962963,-100) - (1970-01-01T00:00:02Z,,0.30000000000000004,100,-0.30000000000000004,-100) - (1970-01-01T00:00:04Z,,2.1592592592592585,200,-2.1592592592592585,-200) -(3 rows) - --- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (explain) ---Testcase 354: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (triple_exponential_moving_average('/value[1,4]/'::text, 2)), tag1 - InfluxDB query: SELECT triple_exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (result) ---Testcase 355: -SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - triple_exponential_moving_average ----------------------------------------------------- - (1970-01-01T00:00:01Z,,0.1962962962962963,,,-100) - (1970-01-01T00:00:02Z,,0.30000000000000004,,,-100) - (1970-01-01T00:00:04Z,,2.1592592592592585,,,-200) -(3 rows) - ---Testcase 356: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative(value1, 2),triple_exponential_derivative(value2, 2),triple_exponential_derivative(value3, 2),triple_exponential_derivative(value4, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (triple_exponential_derivative(value1, 2)), (triple_exponential_derivative(value2, 2)), (triple_exponential_derivative(value3, 2)), (triple_exponential_derivative(value4, 2)) - InfluxDB query: SELECT triple_exponential_derivative("value1", 2), triple_exponential_derivative("value2", 2), triple_exponential_derivative("value3", 2), triple_exponential_derivative("value4", 2) FROM "s3" -(3 rows) - ---Testcase 357: -SELECT triple_exponential_derivative(value1, 2),triple_exponential_derivative(value2, 2),triple_exponential_derivative(value3, 2),triple_exponential_derivative(value4, 2) FROM s3; - triple_exponential_derivative | triple_exponential_derivative | triple_exponential_derivative | triple_exponential_derivative --------------------------------+-------------------------------+-------------------------------+------------------------------- - 45.7142857142857 | 0 | 45.7142857142857 | 0 - 151.633986928105 | 29.6296296296296 | 151.633986928105 | 29.6296296296296 - 124.906204906205 | 22.8571428571429 | 124.906204906205 | 22.8571428571429 - 77.3001411523162 | 12.4031007751938 | 77.3001411523162 | 12.4031007751938 -(4 rows) - ---Testcase 358: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative(value1, 2, 2),triple_exponential_derivative(value2, 2, 2),triple_exponential_derivative(value3, 2, 2),triple_exponential_derivative(value4, 2, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (triple_exponential_derivative(value1, 2, 2)), (triple_exponential_derivative(value2, 2, 2)), (triple_exponential_derivative(value3, 2, 2)), (triple_exponential_derivative(value4, 2, 2)) - InfluxDB query: SELECT triple_exponential_derivative("value1", 2, 2), triple_exponential_derivative("value2", 2, 2), triple_exponential_derivative("value3", 2, 2), triple_exponential_derivative("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 359: -SELECT triple_exponential_derivative(value1, 2, 2),triple_exponential_derivative(value2, 2, 2),triple_exponential_derivative(value3, 2, 2),triple_exponential_derivative(value4, 2, 2) FROM s3; - triple_exponential_derivative | triple_exponential_derivative | triple_exponential_derivative | triple_exponential_derivative --------------------------------+-------------------------------+-------------------------------+------------------------------- - 45.7142857142857 | 0 | 45.7142857142857 | 0 - 151.633986928105 | 29.6296296296296 | 151.633986928105 | 29.6296296296296 - 124.906204906205 | 22.8571428571429 | 124.906204906205 | 22.8571428571429 - 77.3001411523162 | 12.4031007751938 | 77.3001411523162 | 12.4031007751938 -(4 rows) - --- select triple_exponential_derivative(*) (stub function, explain) ---Testcase 360: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative_all(2) from s3; - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (triple_exponential_derivative_all(2)) - InfluxDB query: SELECT triple_exponential_derivative(*, 2) FROM "s3" -(3 rows) - --- select triple_exponential_derivative(*) (stub function, result) ---Testcase 361: -SELECT triple_exponential_derivative_all(2) from s3; - triple_exponential_derivative_all ------------------------------------------------------------------------------------------------------ - (1970-01-01T00:00:02Z,,45.71428571428569,0,45.71428571428569,0) - (1970-01-01T00:00:03Z,,151.63398692810458,29.629629629629626,151.63398692810458,29.629629629629626) - (1970-01-01T00:00:04Z,,124.90620490620489,22.857142857142865,124.90620490620489,22.857142857142865) - (1970-01-01T00:00:05Z,,77.30014115231623,12.4031007751938,77.30014115231623,12.4031007751938) -(4 rows) - --- select triple_exponential_derivative(regex) (stub function, explain) ---Testcase 362: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; - QUERY PLAN ------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (triple_exponential_derivative('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT triple_exponential_derivative(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select triple_exponential_derivative(regex) (stub function, result) ---Testcase 363: -SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; - triple_exponential_derivative ------------------------------------------------------------------ - (1970-01-01T00:00:02Z,,45.71428571428569,,,0) - (1970-01-01T00:00:03Z,,151.63398692810458,,,29.629629629629626) - (1970-01-01T00:00:04Z,,124.90620490620489,,,22.857142857142865) - (1970-01-01T00:00:05Z,,77.30014115231623,,,12.4031007751938) -(4 rows) - --- select triple_exponential_derivative(*) (stub function and group by tag only) (explain) ---Testcase 364: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (triple_exponential_derivative_all(2)), tag1 - InfluxDB query: SELECT triple_exponential_derivative(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select triple_exponential_derivative(*) (stub function and group by tag only) (result) ---Testcase 365: -SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - triple_exponential_derivative_all ------------------------------------------------------------------ - (1970-01-01T00:00:02Z,,45.71428571428569,0,45.71428571428569,0) -(1 row) - --- select triple_exponential_derivative(regex) (stub function and group by tag only) (explain) ---Testcase 366: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (triple_exponential_derivative('/value[1,4]/'::text, 2)), tag1 - InfluxDB query: SELECT triple_exponential_derivative(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select triple_exponential_derivative(regex) (stub function and group by tag only) (result) ---Testcase 367: -SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - triple_exponential_derivative ------------------------------------------------ - (1970-01-01T00:00:02Z,,45.71428571428569,,,0) -(1 row) - ---Testcase 368: -EXPLAIN VERBOSE -SELECT relative_strength_index(value1, 2),relative_strength_index(value2, 2),relative_strength_index(value3, 2),relative_strength_index(value4, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (relative_strength_index(value1, 2)), (relative_strength_index(value2, 2)), (relative_strength_index(value3, 2)), (relative_strength_index(value4, 2)) - InfluxDB query: SELECT relative_strength_index("value1", 2), relative_strength_index("value2", 2), relative_strength_index("value3", 2), relative_strength_index("value4", 2) FROM "s3" -(3 rows) - ---Testcase 369: -SELECT relative_strength_index(value1, 2),relative_strength_index(value2, 2),relative_strength_index(value3, 2),relative_strength_index(value4, 2) FROM s3; - relative_strength_index | relative_strength_index | relative_strength_index | relative_strength_index --------------------------+-------------------------+-------------------------+------------------------- - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 -(4 rows) - ---Testcase 370: -EXPLAIN VERBOSE -SELECT relative_strength_index(value1, 2, 2),relative_strength_index(value2, 2, 2),relative_strength_index(value3, 2, 2),relative_strength_index(value4, 2, 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (relative_strength_index(value1, 2, 2)), (relative_strength_index(value2, 2, 2)), (relative_strength_index(value3, 2, 2)), (relative_strength_index(value4, 2, 2)) - InfluxDB query: SELECT relative_strength_index("value1", 2, 2), relative_strength_index("value2", 2, 2), relative_strength_index("value3", 2, 2), relative_strength_index("value4", 2, 2) FROM "s3" -(3 rows) - ---Testcase 371: -SELECT relative_strength_index(value1, 2, 2),relative_strength_index(value2, 2, 2),relative_strength_index(value3, 2, 2),relative_strength_index(value4, 2, 2) FROM s3; - relative_strength_index | relative_strength_index | relative_strength_index | relative_strength_index --------------------------+-------------------------+-------------------------+------------------------- - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 - 100 | 100 | 0 | 0 -(4 rows) - --- select relative_strength_index(*) (stub function, explain) ---Testcase 372: -EXPLAIN VERBOSE -SELECT relative_strength_index_all(2) from s3; - QUERY PLAN ------------------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (relative_strength_index_all(2)) - InfluxDB query: SELECT relative_strength_index(*, 2) FROM "s3" -(3 rows) - --- select relative_strength_index(*) (stub function, result) ---Testcase 373: -SELECT relative_strength_index_all(2) from s3; - relative_strength_index_all -------------------------------------- - (1970-01-01T00:00:02Z,,100,100,0,0) - (1970-01-01T00:00:03Z,,100,100,0,0) - (1970-01-01T00:00:04Z,,100,100,0,0) - (1970-01-01T00:00:05Z,,100,100,0,0) -(4 rows) - --- select relative_strength_index(regex) (stub agg function, explain) ---Testcase 374: -EXPLAIN VERBOSE -SELECT relative_strength_index('/value[1,4]/',2) from s3; - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (relative_strength_index('/value[1,4]/'::text, 2)) - InfluxDB query: SELECT relative_strength_index(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select relative_strength_index(regex) (stub agg function, result) ---Testcase 375: -SELECT relative_strength_index('/value[1,4]/',2) from s3; - relative_strength_index ---------------------------------- - (1970-01-01T00:00:02Z,,100,,,0) - (1970-01-01T00:00:03Z,,100,,,0) - (1970-01-01T00:00:04Z,,100,,,0) - (1970-01-01T00:00:05Z,,100,,,0) -(4 rows) - --- select relative_strength_index(*) (stub function and group by tag only) (explain) ---Testcase 376: -EXPLAIN VERBOSE -SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (relative_strength_index_all(2)), tag1 - InfluxDB query: SELECT relative_strength_index(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select relative_strength_index(*) (stub function and group by tag only) (result) ---Testcase 377: -SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - relative_strength_index_all -------------------------------------- - (1970-01-01T00:00:02Z,,100,100,0,0) -(1 row) - --- select relative_strength_index(regex) (stub function and group by tag only) (explain) ---Testcase 378: -EXPLAIN VERBOSE -SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (relative_strength_index('/value[1,4]/'::text, 2)), tag1 - InfluxDB query: SELECT relative_strength_index(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select relative_strength_index(regex) (stub function and group by tag only) (result) ---Testcase 379: -SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - relative_strength_index ---------------------------------- - (1970-01-01T00:00:02Z,,100,,,0) -(1 row) - --- select relative_strength_index(*) (stub function, expose data, explain) ---Testcase 380: -EXPLAIN VERBOSE -SELECT (relative_strength_index_all(2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((relative_strength_index_all(2)))::s3)."time", (((relative_strength_index_all(2)))::s3).tag1, (((relative_strength_index_all(2)))::s3).value1, (((relative_strength_index_all(2)))::s3).value2, (((relative_strength_index_all(2)))::s3).value3, (((relative_strength_index_all(2)))::s3).value4 - InfluxDB query: SELECT relative_strength_index(*, 2) FROM "s3" -(3 rows) - --- select relative_strength_index(*) (stub function, expose data, result) ---Testcase 381: -SELECT (relative_strength_index_all(2)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:02+09 | | 100 | 100 | 0 | 0 - 1970-01-01 09:00:03+09 | | 100 | 100 | 0 | 0 - 1970-01-01 09:00:04+09 | | 100 | 100 | 0 | 0 - 1970-01-01 09:00:05+09 | | 100 | 100 | 0 | 0 -(4 rows) - --- select relative_strength_index(regex) (stub function, expose data, explain) ---Testcase 382: -EXPLAIN VERBOSE -SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((relative_strength_index('/value[1,4]/'::text, 2)))::s3)."time", (((relative_strength_index('/value[1,4]/'::text, 2)))::s3).tag1, (((relative_strength_index('/value[1,4]/'::text, 2)))::s3).value1, (((relative_strength_index('/value[1,4]/'::text, 2)))::s3).value2, (((relative_strength_index('/value[1,4]/'::text, 2)))::s3).value3, (((relative_strength_index('/value[1,4]/'::text, 2)))::s3).value4 - InfluxDB query: SELECT relative_strength_index(/value[1,4]/, 2) FROM "s3" -(3 rows) - --- select relative_strength_index(regex) (stub function, expose data, result) ---Testcase 383: -SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:02+09 | | 100 | | | 0 - 1970-01-01 09:00:03+09 | | 100 | | | 0 - 1970-01-01 09:00:04+09 | | 100 | | | 0 - 1970-01-01 09:00:05+09 | | 100 | | | 0 -(4 rows) - --- select integral (stub agg function, explain) ---Testcase 384: -EXPLAIN VERBOSE -SELECT integral(value1),integral(value2),integral(value3),integral(value4) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (integral(value1)), (integral(value2)), (integral(value3)), (integral(value4)) - InfluxDB query: SELECT integral("value1"), integral("value2"), integral("value3"), integral("value4") FROM "s3" -(3 rows) - --- select integral (stub agg function, result) ---Testcase 385: -SELECT integral(value1),integral(value2),integral(value3),integral(value4) FROM s3; - integral | integral | integral | integral -----------+----------+----------+---------- - 5.5 | 750 | -5.5 | -750 -(1 row) - ---Testcase 386: -EXPLAIN VERBOSE -SELECT integral(value1, interval '1s'),integral(value2, interval '1s'),integral(value3, interval '1s'),integral(value4, interval '1s') FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (integral(value1, '@ 1 sec'::interval)), (integral(value2, '@ 1 sec'::interval)), (integral(value3, '@ 1 sec'::interval)), (integral(value4, '@ 1 sec'::interval)) - InfluxDB query: SELECT integral("value1", 0d0h0m1s0u), integral("value2", 0d0h0m1s0u), integral("value3", 0d0h0m1s0u), integral("value4", 0d0h0m1s0u) FROM "s3" -(3 rows) - --- select integral (stub agg function, result) ---Testcase 387: -SELECT integral(value1, interval '1s'),integral(value2, interval '1s'),integral(value3, interval '1s'),integral(value4, interval '1s') FROM s3; - integral | integral | integral | integral -----------+----------+----------+---------- - 5.5 | 750 | -5.5 | -750 -(1 row) - --- select integral (stub agg function, raise exception if not expected type) ---Testcase 388: -SELECT integral(value1::numeric),integral(value2::numeric),integral(value3::numeric),integral(value4::numeric) FROM s3; -ERROR: stub integral_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE --- select integral (stub agg function and group by influx_time() and tag) (explain) ---Testcase 389: -EXPLAIN VERBOSE -SELECT integral("value1"),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (integral(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT integral("value1") FROM "s3" GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select integral (stub agg function and group by influx_time() and tag) (result) ---Testcase 390: -SELECT integral("value1"),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - integral | influx_time | tag1 -----------+------------------------+------ - 0.15 | 1970-01-01 09:00:00+09 | a - 0.25 | 1970-01-01 09:00:01+09 | a - 1.65 | 1970-01-01 09:00:03+09 | b - 2.75 | 1970-01-01 09:00:04+09 | b -(4 rows) - --- select integral (stub agg function and group by influx_time() and tag) (explain) ---Testcase 391: -EXPLAIN VERBOSE -SELECT integral("value1", interval '1s'),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (integral(value1, '@ 1 sec'::interval)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT integral("value1", 0d0h0m1s0u) FROM "s3" GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select integral (stub agg function and group by influx_time() and tag) (result) ---Testcase 392: -SELECT integral("value1", interval '1s'),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - integral | influx_time | tag1 -----------+------------------------+------ - 0.15 | 1970-01-01 09:00:00+09 | a - 0.25 | 1970-01-01 09:00:01+09 | a - 1.65 | 1970-01-01 09:00:03+09 | b - 2.75 | 1970-01-01 09:00:04+09 | b -(4 rows) - --- select integral (stub agg function and group by tag only) (result) ---Testcase 393: -SELECT tag1,integral("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1 ORDER BY 1; - tag1 | integral -------+---------- - a | 0.4 - b | 1.65 -(2 rows) - --- select integral (stub agg function and other aggs) (result) ---Testcase 394: -SELECT sum("value1"),integral("value1"),count("value1") FROM s3; - sum | integral | count ------+----------+------- - 7.2 | 5.5 | 6 -(1 row) - --- select integral (stub agg function and group by tag only) (result) ---Testcase 395: -SELECT tag1,integral("value1", interval '1s') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1 ORDER BY 1; - tag1 | integral -------+---------- - a | 0.4 - b | 1.65 -(2 rows) - --- select integral (stub agg function and other aggs) (result) ---Testcase 396: -SELECT sum("value1"),integral("value1", interval '1s'),count("value1") FROM s3; - sum | integral | count ------+----------+------- - 7.2 | 5.5 | 6 -(1 row) - --- select integral over join query (explain) ---Testcase 397: -EXPLAIN VERBOSE -SELECT integral(t1.value1), integral(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Aggregate (cost=112.64..112.66 rows=1 width=16) - Output: integral(t1.value1), integral(t2.value1) - -> Nested Loop (cost=20.00..28.14 rows=169 width=16) - Output: t1.value1, t2.value1 - -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) - Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..13.06 rows=13 width=8) - Output: t2.value1 - -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) - Output: t2.value1 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select integral over join query (result, stub call error) ---Testcase 398: -SELECT integral(t1.value1), integral(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; -ERROR: stub integral_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE --- select integral over join query (explain) ---Testcase 399: -EXPLAIN VERBOSE -SELECT integral(t1.value1, interval '1s'), integral(t2.value1, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Aggregate (cost=112.64..112.66 rows=1 width=16) - Output: integral(t1.value1, '@ 1 sec'::interval), integral(t2.value1, '@ 1 sec'::interval) - -> Nested Loop (cost=20.00..28.14 rows=169 width=16) - Output: t1.value1, t2.value1 - -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) - Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..13.06 rows=13 width=8) - Output: t2.value1 - -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) - Output: t2.value1 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select integral over join query (result, stub call error) ---Testcase 400: -SELECT integral(t1.value1, interval '1s'), integral(t2.value1, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; -ERROR: stub integral_sfunc(double precision, float8, interval) is called -CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision,interval) line 3 at RAISE --- select integral with having (explain) ---Testcase 401: -EXPLAIN VERBOSE -SELECT integral(value1) FROM s3 HAVING integral(value1) > 100; - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (cost=3840.00..3840.01 rows=1 width=8) - Output: integral(value1) - Filter: (integral(s3.value1) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) - Output: "time", tag1, value1, value2, value3, value4 - InfluxDB query: SELECT "value1" FROM "s3" -(6 rows) - --- select integral with having (explain, not pushdown, stub call error) ---Testcase 402: -SELECT integral(value1) FROM s3 HAVING integral(value1) > 100; -ERROR: stub integral_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE --- select integral with having (explain) ---Testcase 403: -EXPLAIN VERBOSE -SELECT integral(value1, interval '1s') FROM s3 HAVING integral(value1, interval '1s') > 100; - QUERY PLAN --------------------------------------------------------------------------------- - Aggregate (cost=3840.00..3840.01 rows=1 width=8) - Output: integral(value1, '@ 1 sec'::interval) - Filter: (integral(s3.value1, '@ 1 sec'::interval) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) - Output: "time", tag1, value1, value2, value3, value4 - InfluxDB query: SELECT "value1" FROM "s3" -(6 rows) - --- select integral with having (explain, not pushdown, stub call error) ---Testcase 404: -SELECT integral(value1, interval '1s') FROM s3 HAVING integral(value1, interval '1s') > 100; -ERROR: stub integral_sfunc(double precision, float8, interval) is called -CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision,interval) line 3 at RAISE --- select integral(*) (stub agg function, explain) ---Testcase 405: -EXPLAIN VERBOSE -SELECT integral_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (integral_all(*)) - InfluxDB query: SELECT integral(*) FROM "s3" -(3 rows) - --- select integral(*) (stub agg function, result) ---Testcase 406: -SELECT integral_all(*) from s3; - integral_all -------------------------------------------- - (1970-01-01T00:00:00Z,,5.5,750,-5.5,-750) -(1 row) - --- select integral(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 407: -EXPLAIN VERBOSE -SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (integral_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT integral(*) FROM "s3" GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select integral(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 408: -SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - integral_all ---------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.15000000000000002,100,-0.15000000000000002,-100) - (1970-01-01T00:00:01Z,,0.25,100,-0.25,-100) - (1970-01-01T00:00:03Z,,1.6500000000000001,200,-1.6500000000000001,-200) - (1970-01-01T00:00:04Z,,2.75,200,-2.75,-200) -(4 rows) - --- select integral(*) (stub agg function and group by tag only) (explain) ---Testcase 409: -EXPLAIN VERBOSE -SELECT integral_all(*) FROM s3 WHERE value1 > 0.3 GROUP BY tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (integral_all(*)), tag1 - InfluxDB query: SELECT integral(*) FROM "s3" WHERE (("value1" > 0.299999999999999989)) GROUP BY "tag1" -(3 rows) - --- select integral(*) (stub agg function and group by tag only) (result) ---Testcase 410: -SELECT integral_all(*) FROM s3 WHERE value1 > 0.3 GROUP BY tag1; - integral_all -------------------------------------------- - (1970-01-01T00:00:00Z,,4.4,400,-4.4,-400) -(1 row) - --- select integral(*) (stub agg function, expose data, explain) ---Testcase 411: -EXPLAIN VERBOSE -SELECT (integral_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((integral_all(*)))::s3)."time", (((integral_all(*)))::s3).tag1, (((integral_all(*)))::s3).value1, (((integral_all(*)))::s3).value2, (((integral_all(*)))::s3).value3, (((integral_all(*)))::s3).value4 - InfluxDB query: SELECT integral(*) FROM "s3" -(3 rows) - --- select integral(*) (stub agg function, expose data, result) ---Testcase 412: -SELECT (integral_all(*)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 5.5 | 750 | -5.5 | -750 -(1 row) - --- select integral(regex) (stub agg function, explain) ---Testcase 413: -EXPLAIN VERBOSE -SELECT integral('/value[1,4]/') from s3; - QUERY PLAN ------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (integral('/value[1,4]/'::text)) - InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" -(3 rows) - --- select integral(regex) (stub agg function, result) ---Testcase 414: -SELECT integral('/value[1,4]/') from s3; - integral ------------------------------------- - (1970-01-01T00:00:00Z,,5.5,,,-750) -(1 row) - --- select integral(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 415: -EXPLAIN VERBOSE -SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (integral('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT integral(/^v.*/) FROM "s3" GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select integral(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 416: -SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - integral ---------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.15000000000000002,100,-0.15000000000000002,-100) - (1970-01-01T00:00:01Z,,0.25,100,-0.25,-100) - (1970-01-01T00:00:03Z,,1.6500000000000001,200,-1.6500000000000001,-200) - (1970-01-01T00:00:04Z,,2.75,200,-2.75,-200) -(4 rows) - --- select integral(regex) (stub agg function and group by tag only) (explain) ---Testcase 417: -EXPLAIN VERBOSE -SELECT integral('/value[1,4]/') FROM s3 WHERE value1 > 0.3 GROUP BY tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (integral('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" WHERE (("value1" > 0.299999999999999989)) GROUP BY "tag1" -(3 rows) - --- select integral(regex) (stub agg function and group by tag only) (result) ---Testcase 418: -SELECT integral('/value[1,4]/') FROM s3 WHERE value1 > 0.3 GROUP BY tag1; - integral ------------------------------------- - (1970-01-01T00:00:00Z,,4.4,,,-400) -(1 row) - --- select integral(regex) (stub agg function, expose data, explain) ---Testcase 419: -EXPLAIN VERBOSE -SELECT (integral('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((integral('/value[1,4]/'::text)))::s3)."time", (((integral('/value[1,4]/'::text)))::s3).tag1, (((integral('/value[1,4]/'::text)))::s3).value1, (((integral('/value[1,4]/'::text)))::s3).value2, (((integral('/value[1,4]/'::text)))::s3).value3, (((integral('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" -(3 rows) - --- select integral(regex) (stub agg function, expose data, result) ---Testcase 420: -SELECT (integral('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 5.5 | | | -750 -(1 row) - --- select mean (stub agg function, explain) ---Testcase 421: -EXPLAIN VERBOSE -SELECT mean(value1),mean(value2),mean(value3),mean(value4) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (mean(value1)), (mean(value2)), (mean(value3)), (mean(value4)) - InfluxDB query: SELECT mean("value1"), mean("value2"), mean("value3"), mean("value4") FROM "s3" -(3 rows) - --- select mean (stub agg function, result) ---Testcase 422: -SELECT mean(value1),mean(value2),mean(value3),mean(value4) FROM s3; - mean | mean | mean | mean -------+------+------+------ - 1.2 | 150 | -1.2 | -150 -(1 row) - --- select mean (stub agg function, raise exception if not expected type) ---Testcase 423: -SELECT mean(value1::numeric),mean(value2::numeric),mean(value3::numeric),mean(value4::numeric) FROM s3; -ERROR: stub mean_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE --- select mean (stub agg function and group by influx_time() and tag) (explain) ---Testcase 424: -EXPLAIN VERBOSE -SELECT mean("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (mean(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT mean("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select mean (stub agg function and group by influx_time() and tag) (result) ---Testcase 425: -SELECT mean("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - mean | influx_time | tag1 -------+------------------------+------ - 0.1 | 1970-01-01 09:00:00+09 | a - 0.2 | 1970-01-01 09:00:01+09 | a - 0.3 | 1970-01-01 09:00:02+09 | a - | 1970-01-01 09:00:03+09 | a - | 1970-01-01 09:00:04+09 | a - | 1970-01-01 09:00:00+09 | b - | 1970-01-01 09:00:01+09 | b - | 1970-01-01 09:00:02+09 | b - 1.1 | 1970-01-01 09:00:03+09 | b - 2.2 | 1970-01-01 09:00:04+09 | b -(10 rows) - --- select mean (stub agg function and group by tag only) (result) ---Testcase 426: -SELECT tag1,mean("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - tag1 | mean -------+------ - a | 0.2 - b | 1.65 -(2 rows) - --- select mean (stub agg function and other aggs) (result) ---Testcase 427: -SELECT sum("value1"),mean("value1"),count("value1") FROM s3; - sum | mean | count ------+------+------- - 7.2 | 1.2 | 6 -(1 row) - --- select mean over join query (explain) ---Testcase 428: -EXPLAIN VERBOSE -SELECT mean(t1.value1), mean(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Aggregate (cost=112.64..112.66 rows=1 width=16) - Output: mean(t1.value1), mean(t2.value1) - -> Nested Loop (cost=20.00..28.14 rows=169 width=16) - Output: t1.value1, t2.value1 - -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) - Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..13.06 rows=13 width=8) - Output: t2.value1 - -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) - Output: t2.value1 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select mean over join query (result, stub call error) ---Testcase 429: -SELECT mean(t1.value1), mean(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; -ERROR: stub mean_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE --- select mean with having (explain) ---Testcase 430: -EXPLAIN VERBOSE -SELECT mean(value1) FROM s3 HAVING mean(value1) > 100; - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (cost=3840.00..3840.01 rows=1 width=8) - Output: mean(value1) - Filter: (mean(s3.value1) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) - Output: "time", tag1, value1, value2, value3, value4 - InfluxDB query: SELECT "value1" FROM "s3" -(6 rows) - --- select mean with having (explain, not pushdown, stub call error) ---Testcase 431: -SELECT mean(value1) FROM s3 HAVING mean(value1) > 100; -ERROR: stub mean_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE --- select mean(*) (stub agg function, explain) ---Testcase 432: -EXPLAIN VERBOSE -SELECT mean_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (mean_all(*)) - InfluxDB query: SELECT mean(*) FROM "s3" -(3 rows) - --- select mean(*) (stub agg function, result) ---Testcase 433: -SELECT mean_all(*) from s3; - mean_all -------------------------------------------- - (1970-01-01T00:00:00Z,,1.2,150,-1.2,-150) -(1 row) - --- select mean(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 434: -EXPLAIN VERBOSE -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (mean_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT mean(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select mean(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 435: -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - mean_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select mean(*) (stub agg function and group by tag only) (explain) ---Testcase 436: -EXPLAIN VERBOSE -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (mean_all(*)), tag1 - InfluxDB query: SELECT mean(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select mean(*) (stub agg function and group by tag only) (result) ---Testcase 437: -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - mean_all ---------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.20000000000000004,100,-0.20000000000000004,-100) - (1970-01-01T00:00:00Z,,1.6500000000000001,200,-1.6500000000000001,-200) -(2 rows) - --- select mean(*) (stub agg function, expose data, explain) ---Testcase 438: -EXPLAIN VERBOSE -SELECT (mean_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((mean_all(*)))::s3)."time", (((mean_all(*)))::s3).tag1, (((mean_all(*)))::s3).value1, (((mean_all(*)))::s3).value2, (((mean_all(*)))::s3).value3, (((mean_all(*)))::s3).value4 - InfluxDB query: SELECT mean(*) FROM "s3" -(3 rows) - --- select mean(*) (stub agg function, expose data, result) ---Testcase 439: -SELECT (mean_all(*)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 1.2 | 150 | -1.2 | -150 -(1 row) - --- select mean(regex) (stub agg function, explain) ---Testcase 440: -EXPLAIN VERBOSE -SELECT mean('/value[1,4]/') from s3; - QUERY PLAN -------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (mean('/value[1,4]/'::text)) - InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" -(3 rows) - --- select mean(regex) (stub agg function, result) ---Testcase 441: -SELECT mean('/value[1,4]/') from s3; - mean ------------------------------------- - (1970-01-01T00:00:00Z,,1.2,,,-150) -(1 row) - --- select mean(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 442: -EXPLAIN VERBOSE -SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (mean('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT mean(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select mean(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 443: -SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - mean -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select mean(regex) (stub agg function and group by tag only) (explain) ---Testcase 444: -EXPLAIN VERBOSE -SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (mean('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select mean(regex) (stub agg function and group by tag only) (result) ---Testcase 445: -SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - mean ----------------------------------------------------- - (1970-01-01T00:00:00Z,,0.20000000000000004,,,-100) - (1970-01-01T00:00:00Z,,1.6500000000000001,,,-200) -(2 rows) - --- select mean(regex) (stub agg function, expose data, explain) ---Testcase 446: -EXPLAIN VERBOSE -SELECT (mean('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((mean('/value[1,4]/'::text)))::s3)."time", (((mean('/value[1,4]/'::text)))::s3).tag1, (((mean('/value[1,4]/'::text)))::s3).value1, (((mean('/value[1,4]/'::text)))::s3).value2, (((mean('/value[1,4]/'::text)))::s3).value3, (((mean('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" -(3 rows) - --- select mean(regex) (stub agg function, expose data, result) ---Testcase 447: -SELECT (mean('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 1.2 | | | -150 -(1 row) - --- select median (stub agg function, explain) ---Testcase 448: -EXPLAIN VERBOSE -SELECT median(value1),median(value2),median(value3),median(value4) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (median(value1)), (median(value2)), (median(value3)), (median(value4)) - InfluxDB query: SELECT median("value1"), median("value2"), median("value3"), median("value4") FROM "s3" -(3 rows) - --- select median (stub agg function, result) ---Testcase 449: -SELECT median(value1),median(value2),median(value3),median(value4) FROM s3; - median | median | median | median ---------+--------+--------+-------- - 0.7 | 150 | -0.7 | -150 -(1 row) - --- select median (stub agg function, raise exception if not expected type) ---Testcase 450: -SELECT median(value1::numeric),median(value2::numeric),median(value3::numeric),median(value4::numeric) FROM s3; -ERROR: stub median_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE --- select median (stub agg function and group by influx_time() and tag) (explain) ---Testcase 451: -EXPLAIN VERBOSE -SELECT median("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (median(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT median("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select median (stub agg function and group by influx_time() and tag) (result) ---Testcase 452: -SELECT median("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - median | influx_time | tag1 ---------+------------------------+------ - 0.1 | 1970-01-01 09:00:00+09 | a - 0.2 | 1970-01-01 09:00:01+09 | a - 0.3 | 1970-01-01 09:00:02+09 | a - | 1970-01-01 09:00:03+09 | a - | 1970-01-01 09:00:04+09 | a - | 1970-01-01 09:00:00+09 | b - | 1970-01-01 09:00:01+09 | b - | 1970-01-01 09:00:02+09 | b - 1.1 | 1970-01-01 09:00:03+09 | b - 2.2 | 1970-01-01 09:00:04+09 | b -(10 rows) - --- select median (stub agg function and group by tag only) (result) ---Testcase 453: -SELECT tag1,median("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - tag1 | median -------+-------- - a | 0.2 - b | 1.65 -(2 rows) - --- select median (stub agg function and other aggs) (result) ---Testcase 454: -SELECT sum("value1"),median("value1"),count("value1") FROM s3; - sum | median | count ------+--------+------- - 7.2 | 0.7 | 6 -(1 row) - --- select median over join query (explain) ---Testcase 455: -EXPLAIN VERBOSE -SELECT median(t1.value1), median(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Aggregate (cost=112.64..112.66 rows=1 width=16) - Output: median(t1.value1), median(t2.value1) - -> Nested Loop (cost=20.00..28.14 rows=169 width=16) - Output: t1.value1, t2.value1 - -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) - Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..13.06 rows=13 width=8) - Output: t2.value1 - -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) - Output: t2.value1 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select median over join query (result, stub call error) ---Testcase 456: -SELECT median(t1.value1), median(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; -ERROR: stub median_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE --- select median with having (explain) ---Testcase 457: -EXPLAIN VERBOSE -SELECT median(value1) FROM s3 HAVING median(value1) > 100; - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (cost=3840.00..3840.01 rows=1 width=8) - Output: median(value1) - Filter: (median(s3.value1) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) - Output: "time", tag1, value1, value2, value3, value4 - InfluxDB query: SELECT "value1" FROM "s3" -(6 rows) - --- select median with having (explain, not pushdown, stub call error) ---Testcase 458: -SELECT median(value1) FROM s3 HAVING median(value1) > 100; -ERROR: stub median_sfunc(double precision, float8) is called -CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE --- select median(*) (stub agg function, explain) ---Testcase 459: -EXPLAIN VERBOSE -SELECT median_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (median_all(*)) - InfluxDB query: SELECT median(*) FROM "s3" -(3 rows) - --- select median(*) (stub agg function, result) ---Testcase 460: -SELECT median_all(*) from s3; - median_all ----------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.7,150,-0.7000000000000001,-150) -(1 row) - --- select median(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 461: -EXPLAIN VERBOSE -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (median_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT median(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select median(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 462: -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - median_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select median(*) (stub agg function and group by tag only) (explain) ---Testcase 463: -EXPLAIN VERBOSE -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (median_all(*)), tag1 - InfluxDB query: SELECT median(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select median(*) (stub agg function and group by tag only) (result) ---Testcase 464: -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - median_all -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:00Z,,1.6500000000000001,200,-1.6500000000000001,-200) -(2 rows) - --- select median(*) (stub agg function, expose data, explain) ---Testcase 465: -EXPLAIN VERBOSE -SELECT (median_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((median_all(*)))::s3)."time", (((median_all(*)))::s3).tag1, (((median_all(*)))::s3).value1, (((median_all(*)))::s3).value2, (((median_all(*)))::s3).value3, (((median_all(*)))::s3).value4 - InfluxDB query: SELECT median(*) FROM "s3" -(3 rows) - --- select median(*) (stub agg function, expose data, result) ---Testcase 466: -SELECT (median_all(*)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.7 | 150 | -0.7 | -150 -(1 row) - --- select median(regex) (stub agg function, explain) ---Testcase 467: -EXPLAIN VERBOSE -SELECT median('/^v.*/') from s3; - QUERY PLAN ---------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (median('/^v.*/'::text)) - InfluxDB query: SELECT median(/^v.*/) FROM "s3" -(3 rows) - --- select median(regex) (stub agg function, result) ---Testcase 468: -SELECT median('/^v.*/') from s3; - median ----------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.7,150,-0.7000000000000001,-150) -(1 row) - --- select median(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 469: -EXPLAIN VERBOSE -SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (median('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT median(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select median(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 470: -SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - median -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select median(regex) (stub agg function and group by tag only) (explain) ---Testcase 471: -EXPLAIN VERBOSE -SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (median('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT median(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select median(regex) (stub agg function and group by tag only) (result) ---Testcase 472: -SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - median ---------------------------------------------------- - (1970-01-01T00:00:00Z,,0.2,,,-100) - (1970-01-01T00:00:00Z,,1.6500000000000001,,,-200) -(2 rows) - --- select median(regex) (stub agg function, expose data, explain) ---Testcase 473: -EXPLAIN VERBOSE -SELECT (median('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((median('/value[1,4]/'::text)))::s3)."time", (((median('/value[1,4]/'::text)))::s3).tag1, (((median('/value[1,4]/'::text)))::s3).value1, (((median('/value[1,4]/'::text)))::s3).value2, (((median('/value[1,4]/'::text)))::s3).value3, (((median('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT median(/value[1,4]/) FROM "s3" -(3 rows) - --- select median(regex) (stub agg function, expose data, result) ---Testcase 474: -SELECT (median('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.7 | | | -150 -(1 row) - --- select influx_mode (stub agg function, explain) ---Testcase 475: -EXPLAIN VERBOSE -SELECT influx_mode(value1),influx_mode(value2),influx_mode(value3),influx_mode(value4) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_mode(value1)), (influx_mode(value2)), (influx_mode(value3)), (influx_mode(value4)) - InfluxDB query: SELECT mode("value1"), mode("value2"), mode("value3"), mode("value4") FROM "s3" -(3 rows) - --- select influx_mode (stub agg function, result) ---Testcase 476: -SELECT influx_mode(value1),influx_mode(value2),influx_mode(value3),influx_mode(value4) FROM s3; - influx_mode | influx_mode | influx_mode | influx_mode --------------+-------------+-------------+------------- - 0.1 | 100 | -3.3 | -100 -(1 row) - --- select influx_mode (stub agg function, raise exception if not expected type) ---Testcase 477: -SELECT influx_mode(value1::numeric),influx_mode(value2::numeric),influx_mode(value3::numeric),influx_mode(value4::numeric) FROM s3; -ERROR: stub influx_mode_sfunc(anyelement, anyelement) is called -CONTEXT: PL/pgSQL function influx_mode_sfunc(anyelement,anyelement) line 3 at RAISE --- select influx_mode (stub agg function and group by influx_time() and tag) (explain) ---Testcase 478: -EXPLAIN VERBOSE -SELECT influx_mode("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (influx_mode(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT mode("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select influx_mode (stub agg function and group by influx_time() and tag) (result) ---Testcase 479: -SELECT influx_mode("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_mode | influx_time | tag1 --------------+------------------------+------ - 0.1 | 1970-01-01 09:00:00+09 | a - 0.2 | 1970-01-01 09:00:01+09 | a - 0.3 | 1970-01-01 09:00:02+09 | a - | 1970-01-01 09:00:03+09 | a - | 1970-01-01 09:00:04+09 | a - | 1970-01-01 09:00:00+09 | b - | 1970-01-01 09:00:01+09 | b - | 1970-01-01 09:00:02+09 | b - 1.1 | 1970-01-01 09:00:03+09 | b - 2.2 | 1970-01-01 09:00:04+09 | b -(10 rows) - --- select influx_mode (stub agg function and group by tag only) (result) ---Testcase 480: -SELECT tag1,influx_mode("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - tag1 | influx_mode -------+------------- - a | 0.1 - b | 1.1 -(2 rows) - --- select influx_mode (stub agg function and other aggs) (result) ---Testcase 481: -SELECT sum("value1"),influx_mode("value1"),count("value1") FROM s3; - sum | influx_mode | count ------+-------------+------- - 7.2 | 0.1 | 6 -(1 row) - --- select influx_mode over join query (explain) ---Testcase 482: -EXPLAIN VERBOSE -SELECT influx_mode(t1.value1), influx_mode(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Aggregate (cost=112.64..112.66 rows=1 width=16) - Output: influx_mode(t1.value1), influx_mode(t2.value1) - -> Nested Loop (cost=20.00..28.14 rows=169 width=16) - Output: t1.value1, t2.value1 - -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) - Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..13.06 rows=13 width=8) - Output: t2.value1 - -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) - Output: t2.value1 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select influx_mode over join query (result, stub call error) ---Testcase 483: -SELECT influx_mode(t1.value1), influx_mode(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; -ERROR: stub influx_mode_sfunc(anyelement, anyelement) is called -CONTEXT: PL/pgSQL function influx_mode_sfunc(anyelement,anyelement) line 3 at RAISE --- select influx_mode with having (explain) ---Testcase 484: -EXPLAIN VERBOSE -SELECT influx_mode(value1) FROM s3 HAVING influx_mode(value1) > 100; - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (cost=3840.00..3840.01 rows=1 width=8) - Output: influx_mode(value1) - Filter: (influx_mode(s3.value1) > '100'::double precision) - -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) - Output: "time", tag1, value1, value2, value3, value4 - InfluxDB query: SELECT "value1" FROM "s3" -(6 rows) - --- select influx_mode with having (explain, not pushdown, stub call error) ---Testcase 485: -SELECT influx_mode(value1) FROM s3 HAVING influx_mode(value1) > 100; -ERROR: stub influx_mode_sfunc(anyelement, anyelement) is called -CONTEXT: PL/pgSQL function influx_mode_sfunc(anyelement,anyelement) line 3 at RAISE --- select influx_mode(*) (stub agg function, explain) ---Testcase 486: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_mode_all(*)) - InfluxDB query: SELECT mode(*) FROM "s3" -(3 rows) - --- select influx_mode(*) (stub agg function, result) ---Testcase 487: -SELECT influx_mode_all(*) from s3; - influx_mode_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-3.3,-100) -(1 row) - --- select influx_mode(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 488: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_mode_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT mode(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select influx_mode(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 489: -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_mode_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select influx_mode(*) (stub agg function and group by tag only) (explain) ---Testcase 490: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_mode_all(*)), tag1 - InfluxDB query: SELECT mode(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select influx_mode(*) (stub agg function and group by tag only) (result) ---Testcase 491: -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - influx_mode_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.3,-100) - (1970-01-01T00:00:00Z,,1.1,200,-2.2,-200) -(2 rows) - --- select influx_mode(*) (stub agg function, expose data, explain) ---Testcase 492: -EXPLAIN VERBOSE -SELECT (influx_mode_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_mode_all(*)))::s3)."time", (((influx_mode_all(*)))::s3).tag1, (((influx_mode_all(*)))::s3).value1, (((influx_mode_all(*)))::s3).value2, (((influx_mode_all(*)))::s3).value3, (((influx_mode_all(*)))::s3).value4 - InfluxDB query: SELECT mode(*) FROM "s3" -(3 rows) - --- select influx_mode(*) (stub agg function, expose data, result) ---Testcase 493: -SELECT (influx_mode_all(*)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.1 | 100 | -3.3 | -100 -(1 row) - --- select influx_mode(regex) (stub function, explain) ---Testcase 494: -EXPLAIN VERBOSE -SELECT influx_mode('/value[1,4]/') from s3; - QUERY PLAN -------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_mode('/value[1,4]/'::text)) - InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_mode(regex) (stub function, result) ---Testcase 495: -SELECT influx_mode('/value[1,4]/') from s3; - influx_mode ------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-100) -(1 row) - --- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 496: -EXPLAIN VERBOSE -SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_mode('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT mode(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 497: -SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_mode -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select influx_mode(regex) (stub agg function and group by tag only) (explain) ---Testcase 498: -EXPLAIN VERBOSE -SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_mode('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select influx_mode(regex) (stub agg function and group by tag only) (result) ---Testcase 499: -SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - influx_mode ------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-100) - (1970-01-01T00:00:00Z,,1.1,,,-200) -(2 rows) - --- select influx_mode(regex) (stub agg function, expose data, explain) ---Testcase 500: -EXPLAIN VERBOSE -SELECT (influx_mode('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_mode('/value[1,4]/'::text)))::s3)."time", (((influx_mode('/value[1,4]/'::text)))::s3).tag1, (((influx_mode('/value[1,4]/'::text)))::s3).value1, (((influx_mode('/value[1,4]/'::text)))::s3).value2, (((influx_mode('/value[1,4]/'::text)))::s3).value3, (((influx_mode('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_mode(regex) (stub agg function, expose data, result) ---Testcase 501: -SELECT (influx_mode('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.1 | | | -100 -(1 row) - --- select stddev (agg function, explain) ---Testcase 502: -EXPLAIN VERBOSE -SELECT stddev(value1),stddev(value2),stddev(value3),stddev(value4) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=80) - Output: (stddev(value1)), (stddev(value2)), (stddev(value3)), (stddev(value4)) - InfluxDB query: SELECT stddev("value1"), stddev("value2"), stddev("value3"), stddev("value4") FROM "s3" -(3 rows) - --- select stddev (agg function, result) ---Testcase 503: -SELECT stddev(value1),stddev(value2),stddev(value3),stddev(value4) FROM s3; - stddev | stddev | stddev | stddev -------------------+--------------------+------------------+-------------------- - 1.29923054151294 | 54.772255750516614 | 1.29923054151294 | 54.772255750516614 -(1 row) - --- select stddev (agg function and group by influx_time() and tag) (explain) ---Testcase 504: -EXPLAIN VERBOSE -SELECT stddev("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (stddev(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT stddev("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select stddev (agg function and group by influx_time() and tag) (result) ---Testcase 505: -SELECT stddev("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - stddev | influx_time | tag1 ---------+------------------------+------ - | 1970-01-01 09:00:00+09 | a - | 1970-01-01 09:00:01+09 | a - | 1970-01-01 09:00:02+09 | a - | 1970-01-01 09:00:03+09 | a - | 1970-01-01 09:00:04+09 | a - | 1970-01-01 09:00:00+09 | b - | 1970-01-01 09:00:01+09 | b - | 1970-01-01 09:00:02+09 | b - | 1970-01-01 09:00:03+09 | b - | 1970-01-01 09:00:04+09 | b -(10 rows) - --- select stddev (agg function and group by tag only) (result) ---Testcase 506: -SELECT tag1,stddev("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - tag1 | stddev -------+------------------- - a | 0.1 - b | 0.777817459305202 -(2 rows) - --- select stddev (agg function and other aggs) (result) ---Testcase 507: -SELECT sum("value1"),stddev("value1"),count("value1") FROM s3; - sum | stddev | count ------+------------------+------- - 7.2 | 1.29923054151294 | 6 -(1 row) - --- select stddev(*) (stub agg function, explain) ---Testcase 508: -EXPLAIN VERBOSE -SELECT stddev_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (stddev_all(*)) - InfluxDB query: SELECT stddev(*) FROM "s3" -(3 rows) - --- select stddev(*) (stub agg function, result) ---Testcase 509: -SELECT stddev_all(*) from s3; - stddev_all ---------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,1.299230541512937,54.772255750516614,1.299230541512937,54.772255750516614) -(1 row) - --- select stddev(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 510: -EXPLAIN VERBOSE -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (stddev_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT stddev(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select stddev(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 511: -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - stddev_all ------------------------------ - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) -(10 rows) - --- select stddev(*) (stub agg function and group by tag only) (explain) ---Testcase 512: -EXPLAIN VERBOSE -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (stddev_all(*)), tag1 - InfluxDB query: SELECT stddev(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select stddev(*) (stub agg function and group by tag only) (result) ---Testcase 513: -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - stddev_all ---------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.09999999999999999,0,0.09999999999999999,0) - (1970-01-01T00:00:00Z,,0.7778174593052023,0,0.7778174593052023,0) -(2 rows) - --- select stddev(regex) (stub function, explain) ---Testcase 514: -EXPLAIN VERBOSE -SELECT stddev('/value[1,4]/') from s3; - QUERY PLAN ---------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (stddev('/value[1,4]/'::text)) - InfluxDB query: SELECT stddev(/value[1,4]/) FROM "s3" -(3 rows) - --- select stddev(regex) (stub function, result) ---Testcase 515: -SELECT stddev('/value[1,4]/') from s3; - stddev ----------------------------------------------------------------- - (1970-01-01T00:00:00Z,,1.299230541512937,,,54.772255750516614) -(1 row) - --- select stddev(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 516: -EXPLAIN VERBOSE -SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (stddev('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT stddev(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select stddev(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 517: -SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - stddev ------------------------------ - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) -(10 rows) - --- select stddev(regex) (stub agg function and group by tag only) (explain) ---Testcase 518: -EXPLAIN VERBOSE -SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (stddev('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT stddev(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select stddev(regex) (stub agg function and group by tag only) (result) ---Testcase 519: -SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - stddev -------------------------------------------------- - (1970-01-01T00:00:00Z,,0.09999999999999999,,,0) - (1970-01-01T00:00:00Z,,0.7778174593052023,,,0) -(2 rows) - --- select influx_sum(*) (stub agg function, explain) ---Testcase 520: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_sum_all(*)) - InfluxDB query: SELECT sum(*) FROM "s3" -(3 rows) - --- select influx_sum(*) (stub agg function, result) ---Testcase 521: -SELECT influx_sum_all(*) from s3; - influx_sum_all ------------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,7.199999999999999,900,-7.199999999999999,-900) -(1 row) - --- select influx_sum(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 522: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_sum_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select influx_sum(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 523: -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_sum_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select influx_sum(*) (stub agg function and group by tag only) (explain) ---Testcase 524: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_sum_all(*)), tag1 - InfluxDB query: SELECT sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select influx_sum(*) (stub agg function and group by tag only) (result) ---Testcase 525: -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - influx_sum_all -------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.6000000000000001,300,-0.6000000000000001,-300) - (1970-01-01T00:00:00Z,,3.3000000000000003,400,-3.3000000000000003,-400) -(2 rows) - --- select influx_sum(*) (stub agg function, expose data, explain) ---Testcase 526: -EXPLAIN VERBOSE -SELECT (influx_sum_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_sum_all(*)))::s3)."time", (((influx_sum_all(*)))::s3).tag1, (((influx_sum_all(*)))::s3).value1, (((influx_sum_all(*)))::s3).value2, (((influx_sum_all(*)))::s3).value3, (((influx_sum_all(*)))::s3).value4 - InfluxDB query: SELECT sum(*) FROM "s3" -(3 rows) - --- select influx_sum(*) (stub agg function, expose data, result) ---Testcase 527: -SELECT (influx_sum_all(*)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 7.2 | 900 | -7.2 | -900 -(1 row) - --- select influx_sum(regex) (stub function, explain) ---Testcase 528: -EXPLAIN VERBOSE -SELECT influx_sum('/value[1,4]/') from s3; - QUERY PLAN ------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_sum('/value[1,4]/'::text)) - InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_sum(regex) (stub function, result) ---Testcase 529: -SELECT influx_sum('/value[1,4]/') from s3; - influx_sum --------------------------------------------------- - (1970-01-01T00:00:00Z,,7.199999999999999,,,-900) -(1 row) - --- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 530: -EXPLAIN VERBOSE -SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_sum('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT sum(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 531: -SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_sum -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select influx_sum(regex) (stub agg function and group by tag only) (explain) ---Testcase 532: -EXPLAIN VERBOSE -SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_sum('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select influx_sum(regex) (stub agg function and group by tag only) (result) ---Testcase 533: -SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - influx_sum ---------------------------------------------------- - (1970-01-01T00:00:00Z,,0.6000000000000001,,,-300) - (1970-01-01T00:00:00Z,,3.3000000000000003,,,-400) -(2 rows) - --- select influx_sum(regex) (stub agg function, expose data, explain) ---Testcase 534: -EXPLAIN VERBOSE -SELECT (influx_sum('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_sum('/value[1,4]/'::text)))::s3)."time", (((influx_sum('/value[1,4]/'::text)))::s3).tag1, (((influx_sum('/value[1,4]/'::text)))::s3).value1, (((influx_sum('/value[1,4]/'::text)))::s3).value2, (((influx_sum('/value[1,4]/'::text)))::s3).value3, (((influx_sum('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_sum(regex) (stub agg function, expose data, result) ---Testcase 535: -SELECT (influx_sum('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 7.2 | | | -900 -(1 row) - --- selector function bottom() (explain) ---Testcase 536: -EXPLAIN VERBOSE -SELECT bottom(value1, 1) FROM s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..3200.00 rows=2560 width=8) - Output: (bottom(value1, 1)) - InfluxDB query: SELECT bottom("value1", 1) FROM "s3" -(3 rows) - --- selector function bottom() (result) ---Testcase 537: -SELECT bottom(value1, 1) FROM s3; - bottom --------- - 0.1 -(1 row) - --- selector function bottom() cannot be combined with other functions(explain) ---Testcase 538: -EXPLAIN VERBOSE -SELECT bottom(value1, 1), bottom(value2, 1), bottom(value3, 1), bottom(value4, 1) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (bottom(value1, 1)), (bottom(value2, 1)), (bottom(value3, 1)), (bottom(value4, 1)) - InfluxDB query: SELECT bottom("value1", 1), bottom("value2", 1), bottom("value3", 1), bottom("value4", 1) FROM "s3" -(3 rows) - --- selector function bottom() cannot be combined with other functions(result) ---Testcase 539: -SELECT bottom(value1, 1), bottom(value2, 1), bottom(value3, 1), bottom(value4, 1) FROM s3; -ERROR: influxdb_fdw : selector function bottom() cannot be combined with other functions --- select influx_max(*) (stub agg function, explain) ---Testcase 540: -EXPLAIN VERBOSE -SELECT influx_max_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_max_all(*)) - InfluxDB query: SELECT max(*) FROM "s3" -(3 rows) - --- select influx_max(*) (stub agg function, result) ---Testcase 541: -SELECT influx_max_all(*) from s3; - influx_max_all -------------------------------------------- - (1970-01-01T00:00:00Z,,3.3,200,-0.1,-100) -(1 row) - --- select influx_max(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 542: -EXPLAIN VERBOSE -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_max_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT max(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select influx_max(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 543: -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_max_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select influx_max(*) (stub agg function and group by tag only) (explain) ---Testcase 544: -EXPLAIN VERBOSE -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_max_all(*)), tag1 - InfluxDB query: SELECT max(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select influx_max(*) (stub agg function and group by tag only) (result) ---Testcase 545: -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - influx_max_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.3,100,-0.1,-100) - (1970-01-01T00:00:00Z,,2.2,200,-1.1,-200) -(2 rows) - --- select influx_max(*) (stub agg function, expose data, explain) ---Testcase 546: -EXPLAIN VERBOSE -SELECT (influx_max_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_max_all(*)))::s3)."time", (((influx_max_all(*)))::s3).tag1, (((influx_max_all(*)))::s3).value1, (((influx_max_all(*)))::s3).value2, (((influx_max_all(*)))::s3).value3, (((influx_max_all(*)))::s3).value4 - InfluxDB query: SELECT max(*) FROM "s3" -(3 rows) - --- select influx_max(*) (stub agg function, expose data, result) ---Testcase 547: -SELECT (influx_max_all(*)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 3.3 | 200 | -0.1 | -100 -(1 row) - --- select influx_max(regex) (stub function, explain) ---Testcase 548: -EXPLAIN VERBOSE -SELECT influx_max('/value[1,4]/') from s3; - QUERY PLAN ------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_max('/value[1,4]/'::text)) - InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_max(regex) (stub function, result) ---Testcase 549: -SELECT influx_max('/value[1,4]/') from s3; - influx_max ------------------------------------- - (1970-01-01T00:00:00Z,,3.3,,,-100) -(1 row) - --- select influx_max(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 550: -EXPLAIN VERBOSE -SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_max('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT max(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select influx_max(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 551: -SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_max -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select influx_max(regex) (stub agg function and group by tag only) (explain) ---Testcase 552: -EXPLAIN VERBOSE -SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_max('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select influx_max(regex) (stub agg function and group by tag only) (result) ---Testcase 553: -SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - influx_max ------------------------------------- - (1970-01-01T00:00:00Z,,0.3,,,-100) - (1970-01-01T00:00:00Z,,2.2,,,-200) -(2 rows) - --- select influx_max(regex) (stub agg function, expose data, explain) ---Testcase 554: -EXPLAIN VERBOSE -SELECT (influx_max('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_max('/value[1,4]/'::text)))::s3)."time", (((influx_max('/value[1,4]/'::text)))::s3).tag1, (((influx_max('/value[1,4]/'::text)))::s3).value1, (((influx_max('/value[1,4]/'::text)))::s3).value2, (((influx_max('/value[1,4]/'::text)))::s3).value3, (((influx_max('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_max(regex) (stub agg function, expose data, result) ---Testcase 555: -SELECT (influx_max('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 3.3 | | | -100 -(1 row) - --- select influx_min(*) (stub agg function, explain) ---Testcase 556: -EXPLAIN VERBOSE -SELECT influx_min_all(*) from s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_min_all(*)) - InfluxDB query: SELECT min(*) FROM "s3" -(3 rows) - --- select influx_min(*) (stub agg function, result) ---Testcase 557: -SELECT influx_min_all(*) from s3; - influx_min_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-3.3,-200) -(1 row) - --- select influx_min(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 558: -EXPLAIN VERBOSE -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_min_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT min(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select influx_min(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 559: -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_min_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select influx_min(*) (stub agg function and group by tag only) (explain) ---Testcase 560: -EXPLAIN VERBOSE -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_min_all(*)), tag1 - InfluxDB query: SELECT min(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select influx_min(*) (stub agg function and group by tag only) (result) ---Testcase 561: -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - influx_min_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.3,-100) - (1970-01-01T00:00:00Z,,1.1,200,-2.2,-200) -(2 rows) - --- select influx_min(*) (stub agg function, expose data, explain) ---Testcase 562: -EXPLAIN VERBOSE -SELECT (influx_min_all(*)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_min_all(*)))::s3)."time", (((influx_min_all(*)))::s3).tag1, (((influx_min_all(*)))::s3).value1, (((influx_min_all(*)))::s3).value2, (((influx_min_all(*)))::s3).value3, (((influx_min_all(*)))::s3).value4 - InfluxDB query: SELECT min(*) FROM "s3" -(3 rows) - --- select influx_min(*) (stub agg function, expose data, result) ---Testcase 563: -SELECT (influx_min_all(*)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.1 | 100 | -3.3 | -200 -(1 row) - --- select influx_min(regex) (stub function, explain) ---Testcase 564: -EXPLAIN VERBOSE -SELECT influx_min('/value[1,4]/') from s3; - QUERY PLAN ------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_min('/value[1,4]/'::text)) - InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_min(regex) (stub function, result) ---Testcase 565: -SELECT influx_min('/value[1,4]/') from s3; - influx_min ------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-200) -(1 row) - --- select influx_min(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 566: -EXPLAIN VERBOSE -SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_min('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT min(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select influx_min(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 567: -SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_min -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select influx_min(regex) (stub agg function and group by tag only) (explain) ---Testcase 568: -EXPLAIN VERBOSE -SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_min('/value[1,4]/'::text)), tag1 - InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select influx_min(regex) (stub agg function and group by tag only) (result) ---Testcase 569: -SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - influx_min ------------------------------------- - (1970-01-01T00:00:00Z,,0.1,,,-100) - (1970-01-01T00:00:00Z,,1.1,,,-200) -(2 rows) - --- select influx_min(regex) (stub agg function, expose data, explain) ---Testcase 570: -EXPLAIN VERBOSE -SELECT (influx_min('/value[1,4]/')::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (((influx_min('/value[1,4]/'::text)))::s3)."time", (((influx_min('/value[1,4]/'::text)))::s3).tag1, (((influx_min('/value[1,4]/'::text)))::s3).value1, (((influx_min('/value[1,4]/'::text)))::s3).value2, (((influx_min('/value[1,4]/'::text)))::s3).value3, (((influx_min('/value[1,4]/'::text)))::s3).value4 - InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" -(3 rows) - --- select influx_min(regex) (stub agg function, expose data, result) ---Testcase 571: -SELECT (influx_min('/value[1,4]/')::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.1 | | | -200 -(1 row) - --- selector function percentile() (explain) ---Testcase 572: -EXPLAIN VERBOSE -SELECT percentile(value1, 50), percentile(value2, 60), percentile(value3, 25), percentile(value4, 33) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (percentile(value1, 50)), (percentile(value2, 60)), (percentile(value3, 25)), (percentile(value4, 33)) - InfluxDB query: SELECT percentile("value1", 50), percentile("value2", 60), percentile("value3", 25), percentile("value4", 33) FROM "s3" -(3 rows) - --- selector function percentile() (result) ---Testcase 573: -SELECT percentile(value1, 50), percentile(value2, 60), percentile(value3, 25), percentile(value4, 33) FROM s3; - percentile | percentile | percentile | percentile -------------+------------+------------+------------ - 0.3 | 200 | -2.2 | -200 -(1 row) - --- selector function percentile() (explain) ---Testcase 574: -EXPLAIN VERBOSE -SELECT percentile(value1, 1.5), percentile(value2, 6.7), percentile(value3, 20.5), percentile(value4, 75.2) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (percentile(value1, '1.5'::double precision)), (percentile(value2, '6.7'::double precision)), (percentile(value3, '20.5'::double precision)), (percentile(value4, '75.2'::double precision)) - InfluxDB query: SELECT percentile("value1", 1.5), percentile("value2", 6.7), percentile("value3", 20.5), percentile("value4", 75.2) FROM "s3" -(3 rows) - --- selector function percentile() (result) ---Testcase 575: -SELECT percentile(value1, 1.5), percentile(value2, 6.7), percentile(value3, 20.5), percentile(value4, 75.2) FROM s3; - percentile | percentile | percentile | percentile -------------+------------+------------+------------ - | | -3.3 | -100 -(1 row) - --- select percentile(*, int) (stub agg function, explain) ---Testcase 576: -EXPLAIN VERBOSE -SELECT percentile_all(50) from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (percentile_all(50)) - InfluxDB query: SELECT percentile(*, 50) FROM "s3" -(3 rows) - --- select percentile(*, int) (stub agg function, result) ---Testcase 577: -SELECT percentile_all(50) from s3; - percentile_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.3,100,-1.1,-200) -(1 row) - --- select percentile(*, float8) (stub agg function, explain) ---Testcase 578: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (percentile_all('70.5'::double precision)) - InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" -(3 rows) - --- select percentile(*, float8) (stub agg function, result) ---Testcase 579: -SELECT percentile_all(70.5) from s3; - percentile_all -------------------------------------------- - (1970-01-01T00:00:00Z,,1.1,200,-0.3,-100) -(1 row) - --- select percentile(*, int) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 580: -EXPLAIN VERBOSE -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (percentile_all(50)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT percentile(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select percentile(*, int) (stub agg function and group by influx_time() and tag) (result) ---Testcase 581: -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - percentile_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 582: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (percentile_all('70.5'::double precision)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (result) ---Testcase 583: -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - percentile_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select percentile(*, int) (stub agg function and group by tag only) (explain) ---Testcase 584: -EXPLAIN VERBOSE -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (percentile_all(50)), tag1 - InfluxDB query: SELECT percentile(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select percentile(*, int) (stub agg function and group by tag only) (result) ---Testcase 585: -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - percentile_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:00Z,,1.1,200,-2.2,-200) -(2 rows) - --- select percentile(*, float8) (stub agg function and group by tag only) (explain) ---Testcase 586: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (percentile_all('70.5'::double precision)), tag1 - InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select percentile(*, float8) (stub agg function and group by tag only) (result) ---Testcase 587: -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - percentile_all -------------------------------------------- - (1970-01-01T00:00:00Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:00Z,,1.1,200,-2.2,-200) -(2 rows) - --- select percentile(*, int) (stub agg function, expose data, explain) ---Testcase 588: -EXPLAIN VERBOSE -SELECT (percentile_all(50)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((percentile_all(50)))::s3)."time", (((percentile_all(50)))::s3).tag1, (((percentile_all(50)))::s3).value1, (((percentile_all(50)))::s3).value2, (((percentile_all(50)))::s3).value3, (((percentile_all(50)))::s3).value4 - InfluxDB query: SELECT percentile(*, 50) FROM "s3" -(3 rows) - --- select percentile(*, int) (stub agg function, expose data, result) ---Testcase 589: -SELECT (percentile_all(50)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.3 | 100 | -1.1 | -200 -(1 row) - --- select percentile(*, int) (stub agg function, expose data, explain) ---Testcase 590: -EXPLAIN VERBOSE -SELECT (percentile_all(70.5)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((percentile_all('70.5'::double precision)))::s3)."time", (((percentile_all('70.5'::double precision)))::s3).tag1, (((percentile_all('70.5'::double precision)))::s3).value1, (((percentile_all('70.5'::double precision)))::s3).value2, (((percentile_all('70.5'::double precision)))::s3).value3, (((percentile_all('70.5'::double precision)))::s3).value4 - InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" -(3 rows) - --- select percentile(*, int) (stub agg function, expose data, result) ---Testcase 591: -SELECT (percentile_all(70.5)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 1.1 | 200 | -0.3 | -100 -(1 row) - --- select percentile(regex) (stub function, explain) ---Testcase 592: -EXPLAIN VERBOSE -SELECT percentile('/value[1,4]/', 50) from s3; - QUERY PLAN ------------------------------------------------------------------ - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (percentile('/value[1,4]/'::text, 50)) - InfluxDB query: SELECT percentile(/value[1,4]/, 50) FROM "s3" -(3 rows) - --- select percentile(regex) (stub function, result) ---Testcase 593: -SELECT percentile('/value[1,4]/', 50) from s3; - percentile ------------------------------------- - (1970-01-01T00:00:00Z,,0.3,,,-200) -(1 row) - --- select percentile(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 594: -EXPLAIN VERBOSE -SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (percentile('/^v.*/'::text, 50)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT percentile(/^v.*/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select percentile(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 595: -SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - percentile -------------------------------------------- - (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) - (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) - (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:00Z,,,,,) - (1970-01-01T00:00:01Z,,,,,) - (1970-01-01T00:00:02Z,,,,,) - (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) - (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) -(10 rows) - --- select percentile(regex) (stub agg function and group by tag only) (explain) ---Testcase 596: -EXPLAIN VERBOSE -SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (percentile('/value[1,4]/'::text, '70.5'::double precision)), tag1 - InfluxDB query: SELECT percentile(/value[1,4]/, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select percentile(regex) (stub agg function and group by tag only) (result) ---Testcase 597: -SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - percentile ------------------------------------- - (1970-01-01T00:00:00Z,,0.2,,,-100) - (1970-01-01T00:00:00Z,,1.1,,,-200) -(2 rows) - --- select percentile(regex) (stub agg function, expose data, explain) ---Testcase 598: -EXPLAIN VERBOSE -SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((percentile('/value[1,4]/'::text, 50)))::s3)."time", (((percentile('/value[1,4]/'::text, 50)))::s3).tag1, (((percentile('/value[1,4]/'::text, 50)))::s3).value1, (((percentile('/value[1,4]/'::text, 50)))::s3).value2, (((percentile('/value[1,4]/'::text, 50)))::s3).value3, (((percentile('/value[1,4]/'::text, 50)))::s3).value4 - InfluxDB query: SELECT percentile(/value[1,4]/, 50) FROM "s3" -(3 rows) - --- select percentile(regex) (stub agg function, expose data, result) ---Testcase 599: -SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.3 | | | -200 -(1 row) - --- select percentile(regex) (stub agg function, expose data, explain) ---Testcase 600: -EXPLAIN VERBOSE -SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((percentile('/value[1,4]/'::text, '70.5'::double precision)))::s3)."time", (((percentile('/value[1,4]/'::text, '70.5'::double precision)))::s3).tag1, (((percentile('/value[1,4]/'::text, '70.5'::double precision)))::s3).value1, (((percentile('/value[1,4]/'::text, '70.5'::double precision)))::s3).value2, (((percentile('/value[1,4]/'::text, '70.5'::double precision)))::s3).value3, (((percentile('/value[1,4]/'::text, '70.5'::double precision)))::s3).value4 - InfluxDB query: SELECT percentile(/value[1,4]/, 70.5) FROM "s3" -(3 rows) - --- select percentile(regex) (stub agg function, expose data, result) ---Testcase 601: -SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 1.1 | | | -100 -(1 row) - --- selector function top(field_key,N) (explain) ---Testcase 602: -EXPLAIN VERBOSE -SELECT top(value1, 1) FROM s3; - QUERY PLAN -------------------------------------------------------- - Foreign Scan (cost=10.00..3200.00 rows=2560 width=8) - Output: (top(value1, 1)) - InfluxDB query: SELECT top("value1", 1) FROM "s3" -(3 rows) - --- selector function top(field_key,N) (result) ---Testcase 603: -SELECT top(value1, 1) FROM s3; - top ------ - 3.3 -(1 row) - --- selector function top(field_key,tag_key(s),N) (explain) ---Testcase 604: -EXPLAIN VERBOSE -SELECT top(value1, tag1, 1) FROM s3; - QUERY PLAN -------------------------------------------------------------- - Foreign Scan (cost=10.00..1600.00 rows=1280 width=8) - Output: (top(value1, tag1, 1)) - InfluxDB query: SELECT top("value1", "tag1", 1) FROM "s3" -(3 rows) - --- selector function top(field_key,tag_key(s),N) (result) ---Testcase 605: -SELECT top(value1, tag1, 1) FROM s3; - top ------ - 3.3 -(1 row) - --- selector function top() cannot be combined with other functions(explain) ---Testcase 606: -EXPLAIN VERBOSE -SELECT top(value1, 1), top(value2, 1), top(value3, 1), top(value4, 1) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2924.00 rows=1462 width=32) - Output: (top(value1, 1)), (top(value2, 1)), (top(value3, 1)), (top(value4, 1)) - InfluxDB query: SELECT top("value1", 1), top("value2", 1), top("value3", 1), top("value4", 1) FROM "s3" -(3 rows) - --- selector function top() cannot be combined with other functions(result) ---Testcase 607: -SELECT top(value1, 1), top(value2, 1), top(value3, 1), top(value4, 1) FROM s3; -ERROR: influxdb_fdw : selector function top() cannot be combined with other functions --- select acos (builtin function, explain) ---Testcase 608: -EXPLAIN VERBOSE -SELECT acos(value1), acos(value3) FROM s3; - QUERY PLAN -------------------------------------------------------------------- - Foreign Scan (cost=10.00..2058.24 rows=2048 width=16) - Output: (acos(value1)), (acos(value3)) - InfluxDB query: SELECT acos("value1"), acos("value3") FROM "s3" -(3 rows) - --- select acos (builtin function, result) ---Testcase 609: -SELECT acos(value1), acos(value3) FROM s3; - acos | acos -------------------+------------------ - 1.47062890563334 | 1.67096374795646 - 1.36943840600457 | 1.77215424758523 - 1.2661036727795 | 1.87548898081029 - | - | - | -(6 rows) - --- select acos (builtin function, not pushdown constraints, explain) ---Testcase 610: -EXPLAIN VERBOSE -SELECT acos(value1), acos(value3) FROM s3 WHERE to_hex(value2) = '64'; - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..10.05 rows=10 width=16) - Output: (acos(value1)), (acos(value3)) - Filter: (to_hex(s3.value2) = '64'::text) - InfluxDB query: SELECT acos("value1"), acos("value3"), "value2" FROM "s3" -(4 rows) - --- select acos (builtin function, not pushdown constraints, result) ---Testcase 611: -SELECT acos(value1), acos(value3) FROM s3 WHERE to_hex(value2) = '64'; - acos | acos -------------------+------------------ - 1.47062890563334 | 1.67096374795646 - 1.36943840600457 | 1.77215424758523 - 1.2661036727795 | 1.87548898081029 -(3 rows) - --- select acos (builtin function, pushdown constraints, explain) ---Testcase 612: -EXPLAIN VERBOSE -SELECT acos(value1), acos(value3) FROM s3 WHERE value2 != 200; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2048.19 rows=2038 width=16) - Output: (acos(value1)), (acos(value3)) - InfluxDB query: SELECT acos("value1"), acos("value3") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select acos (builtin function, pushdown constraints, result) ---Testcase 613: -SELECT acos(value1), acos(value3) FROM s3 WHERE value2 != 200; - acos | acos -------------------+------------------ - 1.47062890563334 | 1.67096374795646 - 1.36943840600457 | 1.77215424758523 - 1.2661036727795 | 1.87548898081029 -(3 rows) - --- select acos as nest function with agg (pushdown, explain) ---Testcase 614: -EXPLAIN VERBOSE -SELECT sum(value3), acos(sum(value3)) FROM s3 WHERE value2 != 200; - QUERY PLAN -------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (acos(sum(value3))) - InfluxDB query: SELECT sum("value3"), acos(sum("value3")) FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select acos as nest function with agg (pushdown, result) ---Testcase 615: -SELECT sum(value3), acos(sum(value3)) FROM s3 WHERE value2 != 200; - sum | acos -------+------------------ - -0.6 | 2.21429743558818 -(1 row) - --- select acos as nest with log2 (pushdown, explain) ---Testcase 616: -EXPLAIN VERBOSE -SELECT acos(log2(value1)),acos(log2(1/value1)) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (acos(log2(value1))), (acos(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT acos(log2("value1")), acos(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select acos as nest with log2 (pushdown, result) ---Testcase 617: -SELECT acos(log2(value1)),acos(log2(1/value1)) FROM s3; - acos | acos -------------------+------------------ - | - | - | - 1.43285577283535 | 1.70873688075444 - | - | -(6 rows) - --- select acos with non pushdown func and explicit constant (explain) ---Testcase 618: -EXPLAIN VERBOSE -SELECT acos(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2553.37 rows=2547 width=48) - Output: (acos(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT acos("value3") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select acos with non pushdown func and explicit constant (result) ---Testcase 619: -SELECT acos(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; - acos | pi | ?column? -------------------+------------------+---------- - 1.67096374795646 | 3.14159265358979 | 4.1 - 1.77215424758523 | 3.14159265358979 | 4.1 - 1.87548898081029 | 3.14159265358979 | 4.1 -(3 rows) - --- select acos with order by (explain) ---Testcase 620: -EXPLAIN VERBOSE -SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY acos(1-value1); - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Sort (cost=2703.83..2710.19 rows=2547 width=16) - Output: value1, (acos(('1'::double precision - value1))) - Sort Key: (acos(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2559.74 rows=2547 width=16) - Output: value1, (acos(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", acos((1 - "value1")) FROM "s3" WHERE (("value2" <> 200)) -(6 rows) - --- select acos with order by (result) ---Testcase 621: -SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY acos(1-value1); - value1 | acos ---------+------------------- - 0.1 | 0.451026811796262 - 0.2 | 0.643501108793284 - 0.3 | 0.795398830184144 -(3 rows) - --- select acos with order by index (result) ---Testcase 622: -SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 2,1; - value1 | acos ---------+------------------- - 0.1 | 0.451026811796262 - 0.2 | 0.643501108793284 - 0.3 | 0.795398830184144 -(3 rows) - --- select acos with order by index (result) ---Testcase 623: -SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 1,2; - value1 | acos ---------+------------------- - 0.1 | 0.451026811796262 - 0.2 | 0.643501108793284 - 0.3 | 0.795398830184144 -(3 rows) - --- select acos and as ---Testcase 624: -SELECT acos(value3) as acos1 FROM s3 WHERE value2 != 200; - acos1 ------------------- - 1.67096374795646 - 1.77215424758523 - 1.87548898081029 -(3 rows) - --- select acos(*) (stub agg function, explain) ---Testcase 625: -EXPLAIN VERBOSE -SELECT acos_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (acos_all()) - InfluxDB query: SELECT acos(*) FROM "s3" -(3 rows) - --- select acos(*) (stub agg function, result) ---Testcase 626: -SELECT acos_all() from s3; - acos_all ------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,1.4706289056333368,,1.6709637479564563,) - (1970-01-01T00:00:01Z,,1.3694384060045657,,1.7721542475852274,) - (1970-01-01T00:00:02Z,,1.266103672779499,,1.8754889808102941,) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:05Z,,,,,) -(6 rows) - --- select acos(*) (stub agg function and group by tag only) (explain) ---Testcase 627: -EXPLAIN VERBOSE -SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (acos_all()), tag1 - InfluxDB query: SELECT acos(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select acos(*) (stub agg function and group by tag only) (result) ---Testcase 628: -SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - acos_all ------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,1.4706289056333368,,1.6709637479564563,) - (1970-01-01T00:00:01Z,,1.3694384060045657,,1.7721542475852274,) - (1970-01-01T00:00:02Z,,1.266103672779499,,1.8754889808102941,) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) -(5 rows) - --- select acos(*) (stub agg function, expose data, explain) ---Testcase 629: -EXPLAIN VERBOSE -SELECT (acos_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((acos_all()))::s3)."time", (((acos_all()))::s3).tag1, (((acos_all()))::s3).value1, (((acos_all()))::s3).value2, (((acos_all()))::s3).value3, (((acos_all()))::s3).value4 - InfluxDB query: SELECT acos(*) FROM "s3" -(3 rows) - --- select acos(*) (stub agg function, expose data, result) ---Testcase 630: -SELECT (acos_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+------------------+--------+------------------+-------- - 1970-01-01 09:00:00+09 | | 1.47062890563334 | | 1.67096374795646 | - 1970-01-01 09:00:01+09 | | 1.36943840600457 | | 1.77215424758523 | - 1970-01-01 09:00:02+09 | | 1.2661036727795 | | 1.87548898081029 | - 1970-01-01 09:00:03+09 | | | | | - 1970-01-01 09:00:04+09 | | | | | - 1970-01-01 09:00:05+09 | | | | | -(6 rows) - --- select asin (builtin function, explain) ---Testcase 631: -EXPLAIN VERBOSE -SELECT asin(value1), asin(value3) FROM s3; - QUERY PLAN -------------------------------------------------------------------- - Foreign Scan (cost=10.00..2058.24 rows=2048 width=16) - Output: (asin(value1)), (asin(value3)) - InfluxDB query: SELECT asin("value1"), asin("value3") FROM "s3" -(3 rows) - --- select asin (builtin function, result) ---Testcase 632: -SELECT asin(value1), asin(value3) FROM s3; - asin | asin --------------------+-------------------- - 0.10016742116156 | -0.10016742116156 - 0.201357920790331 | -0.201357920790331 - 0.304692654015398 | -0.304692654015398 - | - | - | -(6 rows) - --- select asin (builtin function, not pushdown constraints, explain) ---Testcase 633: -EXPLAIN VERBOSE -SELECT asin(value1), asin(value3) FROM s3 WHERE to_hex(value2) = '64'; - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..10.05 rows=10 width=16) - Output: (asin(value1)), (asin(value3)) - Filter: (to_hex(s3.value2) = '64'::text) - InfluxDB query: SELECT asin("value1"), asin("value3"), "value2" FROM "s3" -(4 rows) - --- select asin (builtin function, not pushdown constraints, result) ---Testcase 634: -SELECT asin(value1), asin(value3) FROM s3 WHERE to_hex(value2) = '64'; - asin | asin --------------------+-------------------- - 0.10016742116156 | -0.10016742116156 - 0.201357920790331 | -0.201357920790331 - 0.304692654015398 | -0.304692654015398 -(3 rows) - --- select asin (builtin function, pushdown constraints, explain) ---Testcase 635: -EXPLAIN VERBOSE -SELECT asin(value1), asin(value3) FROM s3 WHERE value2 != 200; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2048.19 rows=2038 width=16) - Output: (asin(value1)), (asin(value3)) - InfluxDB query: SELECT asin("value1"), asin("value3") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select asin (builtin function, pushdown constraints, result) ---Testcase 636: -SELECT asin(value1), asin(value3) FROM s3 WHERE value2 != 200; - asin | asin --------------------+-------------------- - 0.10016742116156 | -0.10016742116156 - 0.201357920790331 | -0.201357920790331 - 0.304692654015398 | -0.304692654015398 -(3 rows) - --- select asin as nest function with agg (pushdown, explain) ---Testcase 637: -EXPLAIN VERBOSE -SELECT sum(value3), asin(sum(value3)) FROM s3 WHERE value2 != 200; - QUERY PLAN -------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (asin(sum(value3))) - InfluxDB query: SELECT sum("value3"), asin(sum("value3")) FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select asin as nest function with agg (pushdown, result) ---Testcase 638: -SELECT sum(value3), asin(sum(value3)) FROM s3 WHERE value2 != 200; - sum | asin -------+-------------------- - -0.6 | -0.643501108793284 -(1 row) - --- select asin as nest with log2 (pushdown, explain) ---Testcase 639: -EXPLAIN VERBOSE -SELECT asin(log2(value1)),asin(log2(1/value1)) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (asin(log2(value1))), (asin(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT asin(log2("value1")), asin(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select asin as nest with log2 (pushdown, result) ---Testcase 640: -SELECT asin(log2(value1)),asin(log2(1/value1)) FROM s3; - asin | asin --------------------+-------------------- - | - | - | - 0.137940553959545 | -0.137940553959545 - | - | -(6 rows) - --- select asin with non pushdown func and explicit constant (explain) ---Testcase 641: -EXPLAIN VERBOSE -SELECT asin(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; - QUERY PLAN ------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2553.37 rows=2547 width=48) - Output: (asin(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT asin("value3") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select asin with non pushdown func and explicit constant (result) ---Testcase 642: -SELECT asin(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; - asin | pi | ?column? ---------------------+------------------+---------- - -0.10016742116156 | 3.14159265358979 | 4.1 - -0.201357920790331 | 3.14159265358979 | 4.1 - -0.304692654015398 | 3.14159265358979 | 4.1 -(3 rows) - --- select asin with order by (explain) ---Testcase 643: -EXPLAIN VERBOSE -SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY asin(1-value1); - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Sort (cost=2703.83..2710.19 rows=2547 width=16) - Output: value1, (asin(('1'::double precision - value1))) - Sort Key: (asin(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2559.74 rows=2547 width=16) - Output: value1, (asin(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", asin((1 - "value1")) FROM "s3" WHERE (("value2" <> 200)) -(6 rows) - --- select asin with order by (result) ---Testcase 644: -SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY asin(1-value1); - value1 | asin ---------+------------------- - 0.3 | 0.775397496610753 - 0.2 | 0.927295218001612 - 0.1 | 1.11976951499863 -(3 rows) - --- select asin with order by index (result) ---Testcase 645: -SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 2,1; - value1 | asin ---------+------------------- - 0.3 | 0.775397496610753 - 0.2 | 0.927295218001612 - 0.1 | 1.11976951499863 -(3 rows) - --- select asin with order by index (result) ---Testcase 646: -SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 1,2; - value1 | asin ---------+------------------- - 0.1 | 1.11976951499863 - 0.2 | 0.927295218001612 - 0.3 | 0.775397496610753 -(3 rows) - --- select asin and as ---Testcase 647: -SELECT asin(value3) as asin1 FROM s3 WHERE value2 != 200; - asin1 --------------------- - -0.10016742116156 - -0.201357920790331 - -0.304692654015398 -(3 rows) - --- select asin(*) (stub agg function, explain) ---Testcase 648: -EXPLAIN VERBOSE -SELECT asin_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (asin_all()) - InfluxDB query: SELECT asin(*) FROM "s3" -(3 rows) - --- select asin(*) (stub agg function, result) ---Testcase 649: -SELECT asin_all() from s3; - asin_all --------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.1001674211615598,,-0.1001674211615598,) - (1970-01-01T00:00:01Z,,0.20135792079033082,,-0.20135792079033082,) - (1970-01-01T00:00:02Z,,0.3046926540153975,,-0.3046926540153975,) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) - (1970-01-01T00:00:05Z,,,,,) -(6 rows) - --- select asin(*) (stub agg function and group by tag only) (explain) ---Testcase 650: -EXPLAIN VERBOSE -SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (asin_all()), tag1 - InfluxDB query: SELECT asin(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select asin(*) (stub agg function and group by tag only) (result) ---Testcase 651: -SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - asin_all --------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.1001674211615598,,-0.1001674211615598,) - (1970-01-01T00:00:01Z,,0.20135792079033082,,-0.20135792079033082,) - (1970-01-01T00:00:02Z,,0.3046926540153975,,-0.3046926540153975,) - (1970-01-01T00:00:03Z,,,,,) - (1970-01-01T00:00:04Z,,,,,) -(5 rows) - --- select asin(*) (stub agg function, expose data, explain) ---Testcase 652: -EXPLAIN VERBOSE -SELECT (asin_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((asin_all()))::s3)."time", (((asin_all()))::s3).tag1, (((asin_all()))::s3).value1, (((asin_all()))::s3).value2, (((asin_all()))::s3).value3, (((asin_all()))::s3).value4 - InfluxDB query: SELECT asin(*) FROM "s3" -(3 rows) - --- select asin(*) (stub agg function, expose data, result) ---Testcase 653: -SELECT (asin_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+-------------------+--------+--------------------+-------- - 1970-01-01 09:00:00+09 | | 0.10016742116156 | | -0.10016742116156 | - 1970-01-01 09:00:01+09 | | 0.201357920790331 | | -0.201357920790331 | - 1970-01-01 09:00:02+09 | | 0.304692654015398 | | -0.304692654015398 | - 1970-01-01 09:00:03+09 | | | | | - 1970-01-01 09:00:04+09 | | | | | - 1970-01-01 09:00:05+09 | | | | | -(6 rows) - --- select atan (builtin function, explain) ---Testcase 654: -EXPLAIN VERBOSE -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1483.93 rows=1462 width=32) - Output: (atan(value1)), (atan((value2)::double precision)), (atan(value3)), (atan((value4)::double precision)) - InfluxDB query: SELECT atan("value1"), atan("value2"), atan("value3"), atan("value4") FROM "s3" -(3 rows) - --- select atan (builtin function, result) ---Testcase 655: -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3; - atan | atan | atan | atan --------------------+------------------+--------------------+------------------- - 0.099668652491162 | 1.56079666010823 | -0.099668652491162 | -1.56079666010823 - 0.197395559849881 | 1.56079666010823 | -0.197395559849881 | -1.56079666010823 - 0.291456794477867 | 1.56079666010823 | -0.291456794477867 | -1.56079666010823 - 0.832981266674432 | 1.56579636846094 | -0.832981266674432 | -1.56579636846094 - 1.14416883366802 | 1.56579636846094 | -1.14416883366802 | -1.56579636846094 - 1.27656176168371 | 1.56579636846094 | -1.27656176168371 | -1.56579636846094 -(6 rows) - --- select atan (builtin function, not pushdown constraints, explain) ---Testcase 656: -EXPLAIN VERBOSE -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (atan(value1)), (atan((value2)::double precision)), (atan(value3)), (atan((value4)::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT atan("value1"), atan("value2"), atan("value3"), atan("value4"), "value2" FROM "s3" -(4 rows) - --- select atan (builtin function, not pushdown constraints, result) ---Testcase 657: -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE to_hex(value2) != '64'; - atan | atan | atan | atan --------------------+------------------+--------------------+------------------- - 0.832981266674432 | 1.56579636846094 | -0.832981266674432 | -1.56579636846094 - 1.14416883366802 | 1.56579636846094 | -1.14416883366802 | -1.56579636846094 - 1.27656176168371 | 1.56579636846094 | -1.27656176168371 | -1.56579636846094 -(3 rows) - --- select atan (builtin function, pushdown constraints, explain) ---Testcase 658: -EXPLAIN VERBOSE -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE value2 != 200; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (atan(value1)), (atan((value2)::double precision)), (atan(value3)), (atan((value4)::double precision)) - InfluxDB query: SELECT atan("value1"), atan("value2"), atan("value3"), atan("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select atan (builtin function, pushdown constraints, result) ---Testcase 659: -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE value2 != 200; - atan | atan | atan | atan --------------------+------------------+--------------------+------------------- - 0.099668652491162 | 1.56079666010823 | -0.099668652491162 | -1.56079666010823 - 0.197395559849881 | 1.56079666010823 | -0.197395559849881 | -1.56079666010823 - 0.291456794477867 | 1.56079666010823 | -0.291456794477867 | -1.56079666010823 -(3 rows) - --- select atan as nest function with agg (pushdown, explain) ---Testcase 660: -EXPLAIN VERBOSE -SELECT sum(value3),atan(sum(value3)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (atan(sum(value3))) - InfluxDB query: SELECT sum("value3"), atan(sum("value3")) FROM "s3" -(3 rows) - --- select atan as nest function with agg (pushdown, result) ---Testcase 661: -SELECT sum(value3),atan(sum(value3)) FROM s3; - sum | atan -------+------------------- - -7.2 | -1.43279030313738 -(1 row) - --- select atan as nest with log2 (pushdown, explain) ---Testcase 662: -EXPLAIN VERBOSE -SELECT atan(log2(value1)),atan(log2(1/value1)) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (atan(log2(value1))), (atan(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT atan(log2("value1")), atan(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select atan as nest with log2 (pushdown, result) ---Testcase 663: -SELECT atan(log2(value1)),atan(log2(1/value1)) FROM s3; - atan | atan --------------------+-------------------- - -1.27839485025093 | 1.27839485025093 - -1.16412742542701 | 1.16412742542701 - -1.04842363791536 | 1.04842363791536 - 0.13664662085466 | -0.13664662085466 - 0.849638674971166 | -0.849638674971166 - 1.04479137360874 | -1.04479137360874 -(6 rows) - --- select atan with non pushdown func and explicit constant (explain) ---Testcase 664: -EXPLAIN VERBOSE -SELECT atan(value3), pi(), 4.1 FROM s3; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (atan(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT atan("value3") FROM "s3" -(3 rows) - --- select atan with non pushdown func and explicit constant (result) ---Testcase 665: -SELECT atan(value3), pi(), 4.1 FROM s3; - atan | pi | ?column? ---------------------+------------------+---------- - -0.099668652491162 | 3.14159265358979 | 4.1 - -0.197395559849881 | 3.14159265358979 | 4.1 - -0.291456794477867 | 3.14159265358979 | 4.1 - -0.832981266674432 | 3.14159265358979 | 4.1 - -1.14416883366802 | 3.14159265358979 | 4.1 - -1.27656176168371 | 3.14159265358979 | 4.1 -(6 rows) - --- select atan with order by (explain) ---Testcase 666: -EXPLAIN VERBOSE -SELECT value1, atan(1-value1) FROM s3 order by atan(1-value1); - QUERY PLAN -------------------------------------------------------------------------- - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (atan(('1'::double precision - value1))) - Sort Key: (atan(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (atan(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", atan((1 - "value1")) FROM "s3" -(6 rows) - --- select atan with order by (result) ---Testcase 667: -SELECT value1, atan(1-value1) FROM s3 order by atan(1-value1); - value1 | atan ---------+--------------------- - 3.3 | -1.16066898625341 - 2.2 | -0.876058050598193 - 1.1 | -0.0996686524911621 - 0.3 | 0.610725964389209 - 0.2 | 0.674740942223553 - 0.1 | 0.732815101786507 -(6 rows) - --- select atan with order by index (result) ---Testcase 668: -SELECT value1, atan(1-value1) FROM s3 order by 2,1; - value1 | atan ---------+--------------------- - 3.3 | -1.16066898625341 - 2.2 | -0.876058050598193 - 1.1 | -0.0996686524911621 - 0.3 | 0.610725964389209 - 0.2 | 0.674740942223553 - 0.1 | 0.732815101786507 -(6 rows) - --- select atan with order by index (result) ---Testcase 669: -SELECT value1, atan(1-value1) FROM s3 order by 1,2; - value1 | atan ---------+--------------------- - 0.1 | 0.732815101786507 - 0.2 | 0.674740942223553 - 0.3 | 0.610725964389209 - 1.1 | -0.0996686524911621 - 2.2 | -0.876058050598193 - 3.3 | -1.16066898625341 -(6 rows) - --- select atan and as ---Testcase 670: -SELECT atan(value3) as atan1 FROM s3; - atan1 --------------------- - -0.099668652491162 - -0.197395559849881 - -0.291456794477867 - -0.832981266674432 - -1.14416883366802 - -1.27656176168371 -(6 rows) - --- select atan(*) (stub agg function, explain) ---Testcase 671: -EXPLAIN VERBOSE -SELECT atan_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (atan_all()) - InfluxDB query: SELECT atan(*) FROM "s3" -(3 rows) - --- select atan(*) (stub agg function, result) ---Testcase 672: -SELECT atan_all() from s3; - atan_all ---------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.09966865249116204,1.5607966601082313,-0.09966865249116204,-1.5607966601082313) - (1970-01-01T00:00:01Z,,0.19739555984988078,1.5607966601082313,-0.19739555984988078,-1.5607966601082313) - (1970-01-01T00:00:02Z,,0.2914567944778671,1.5607966601082313,-0.2914567944778671,-1.5607966601082313) - (1970-01-01T00:00:03Z,,0.8329812666744317,1.5657963684609382,-0.8329812666744317,-1.5657963684609382) - (1970-01-01T00:00:04Z,,1.1441688336680205,1.5657963684609382,-1.1441688336680205,-1.5657963684609382) - (1970-01-01T00:00:05Z,,1.2765617616837088,1.5657963684609382,-1.2765617616837088,-1.5657963684609382) -(6 rows) - --- select atan(*) (stub agg function and group by tag only) (explain) ---Testcase 673: -EXPLAIN VERBOSE -SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (atan_all()), tag1 - InfluxDB query: SELECT atan(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select atan(*) (stub agg function and group by tag only) (result) ---Testcase 674: -SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - atan_all ---------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.09966865249116204,1.5607966601082313,-0.09966865249116204,-1.5607966601082313) - (1970-01-01T00:00:01Z,,0.19739555984988078,1.5607966601082313,-0.19739555984988078,-1.5607966601082313) - (1970-01-01T00:00:02Z,,0.2914567944778671,1.5607966601082313,-0.2914567944778671,-1.5607966601082313) - (1970-01-01T00:00:03Z,,0.8329812666744317,1.5657963684609382,-0.8329812666744317,-1.5657963684609382) - (1970-01-01T00:00:04Z,,1.1441688336680205,1.5657963684609382,-1.1441688336680205,-1.5657963684609382) -(5 rows) - --- select atan(*) (stub agg function, expose data, explain) ---Testcase 675: -EXPLAIN VERBOSE -SELECT (atan_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((atan_all()))::s3)."time", (((atan_all()))::s3).tag1, (((atan_all()))::s3).value1, (((atan_all()))::s3).value2, (((atan_all()))::s3).value3, (((atan_all()))::s3).value4 - InfluxDB query: SELECT atan(*) FROM "s3" -(3 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 676: -SELECT asin_all(), acos_all(), atan_all() FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub asin_all() is called -CONTEXT: PL/pgSQL function asin_all() line 3 at RAISE --- select atan2 (builtin function, explain) ---Testcase 677: -EXPLAIN VERBOSE -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1491.24 rows=1462 width=32) - Output: (atan2(value1, (value2)::double precision)), (atan2((value2)::double precision, value3)), (atan2(value3, (value4)::double precision)), (atan2((value4)::double precision, value1)) - InfluxDB query: SELECT atan2("value1", "value2"), atan2("value2", "value3"), atan2("value3", "value4"), atan2("value4", "value1") FROM "s3" -(3 rows) - --- select atan2 (builtin function, result) ---Testcase 678: -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3; - atan2 | atan2 | atan2 | atan2 -----------------------+------------------+-------------------+------------------- - 0.000999999666666867 | 1.57179632646156 | -3.14059265392313 | -1.56979632712823 - 0.00199999733333973 | 1.57279632412824 | -3.13959265625645 | -1.56879632946156 - 0.0029999910000486 | 1.57379631779495 | -3.13859266258974 | -1.56779633579485 - 0.00549994454267321 | 1.57629627133757 | -3.13609270904712 | -1.56529638225222 - 0.0109995563655408 | 1.58179588316044 | -3.13059309722425 | -1.55979677042936 - 0.0164985028695487 | 1.58729482966445 | -3.12509415072024 | -1.55429782392535 -(6 rows) - --- select atan2 (builtin function, not pushdown constraints, explain) ---Testcase 679: -EXPLAIN VERBOSE -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1484.10 rows=1455 width=32) - Output: (atan2(value1, (value2)::double precision)), (atan2((value2)::double precision, value3)), (atan2(value3, (value4)::double precision)), (atan2((value4)::double precision, value1)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT atan2("value1", "value2"), atan2("value2", "value3"), atan2("value3", "value4"), atan2("value4", "value1"), "value2" FROM "s3" -(4 rows) - --- select atan2 (builtin function, not pushdown constraints, result) ---Testcase 680: -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE to_hex(value2) != '64'; - atan2 | atan2 | atan2 | atan2 ----------------------+------------------+-------------------+------------------- - 0.00549994454267321 | 1.57629627133757 | -3.13609270904712 | -1.56529638225222 - 0.0109995563655408 | 1.58179588316044 | -3.13059309722425 | -1.55979677042936 - 0.0164985028695487 | 1.58729482966445 | -3.12509415072024 | -1.55429782392535 -(3 rows) - --- select atan2 (builtin function, pushdown constraints, explain) ---Testcase 681: -EXPLAIN VERBOSE -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE value2 != 200; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1484.10 rows=1455 width=32) - Output: (atan2(value1, (value2)::double precision)), (atan2((value2)::double precision, value3)), (atan2(value3, (value4)::double precision)), (atan2((value4)::double precision, value1)) - InfluxDB query: SELECT atan2("value1", "value2"), atan2("value2", "value3"), atan2("value3", "value4"), atan2("value4", "value1") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select atan2 (builtin function, pushdown constraints, result) ---Testcase 682: -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE value2 != 200; - atan2 | atan2 | atan2 | atan2 -----------------------+------------------+-------------------+------------------- - 0.000999999666666867 | 1.57179632646156 | -3.14059265392313 | -1.56979632712823 - 0.00199999733333973 | 1.57279632412824 | -3.13959265625645 | -1.56879632946156 - 0.0029999910000486 | 1.57379631779495 | -3.13859266258974 | -1.56779633579485 -(3 rows) - --- select atan2 as nest function with agg (pushdown, explain) ---Testcase 683: -EXPLAIN VERBOSE -SELECT sum(value3), sum(value4),atan2(sum(value3), sum(value3)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (sum(value3)), (sum(value4)), (atan2(sum(value3), sum(value3))) - InfluxDB query: SELECT sum("value3"), sum("value4"), atan2(sum("value3"), sum("value3")) FROM "s3" -(3 rows) - --- select atan2 as nest function with agg (pushdown, result) ---Testcase 684: -SELECT sum(value3), sum(value4),atan2(sum(value3), sum(value3)) FROM s3; - sum | sum | atan2 -------+------+------------------- - -7.2 | -900 | -2.35619449019234 -(1 row) - --- select atan2 as nest with log2 (pushdown, explain) ---Testcase 685: -EXPLAIN VERBOSE -SELECT atan2(log2(value1), log2(value1)),atan2(log2(1/value1), log2(1/value1)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..5145.60 rows=2560 width=16) - Output: (atan2(log2(value1), log2(value1))), (atan2(log2(('1'::double precision / value1)), log2(('1'::double precision / value1)))) - InfluxDB query: SELECT atan2(log2("value1"), log2("value1")), atan2(log2((1 / "value1")), log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select atan2 as nest with log2 (pushdown, result) ---Testcase 686: -SELECT atan2(log2(value1), log2(value1)),atan2(log2(1/value1), log2(1/value1)) FROM s3; - atan2 | atan2 --------------------+------------------- - -2.35619449019234 | 0.785398163397448 - -2.35619449019234 | 0.785398163397448 - -2.35619449019234 | 0.785398163397448 - 0.785398163397448 | -2.35619449019234 - 0.785398163397448 | -2.35619449019234 - 0.785398163397448 | -2.35619449019234 -(6 rows) - --- select atan2 with non pushdown func and explicit constant (explain) ---Testcase 687: -EXPLAIN VERBOSE -SELECT atan2(value3, value4), pi(), 4.1 FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2058.24 rows=2048 width=48) - Output: (atan2(value3, (value4)::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT atan2("value3", "value4") FROM "s3" -(3 rows) - --- select atan2 with non pushdown func and explicit constant (result) ---Testcase 688: -SELECT atan2(value3, value4), pi(), 4.1 FROM s3; - atan2 | pi | ?column? --------------------+------------------+---------- - -3.14059265392313 | 3.14159265358979 | 4.1 - -3.13959265625645 | 3.14159265358979 | 4.1 - -3.13859266258974 | 3.14159265358979 | 4.1 - -3.13609270904712 | 3.14159265358979 | 4.1 - -3.13059309722425 | 3.14159265358979 | 4.1 - -3.12509415072024 | 3.14159265358979 | 4.1 -(6 rows) - --- select atan2 with order by (explain) ---Testcase 689: -EXPLAIN VERBOSE -SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by atan2(1-value1, 1-value2); - QUERY PLAN ------------------------------------------------------------------------------------------------------ - Sort (cost=2181.12..2186.24 rows=2048 width=16) - Output: value1, (atan2(('1'::double precision - value1), ((1 - value2))::double precision)) - Sort Key: (atan2(('1'::double precision - s3.value1), ((1 - s3.value2))::double precision)) - -> Foreign Scan (cost=10.00..2068.48 rows=2048 width=16) - Output: value1, (atan2(('1'::double precision - value1), ((1 - value2))::double precision)) - InfluxDB query: SELECT "value1", atan2((1 - "value1"), (1 - "value2")) FROM "s3" -(6 rows) - --- select atan2 with order by (result) ---Testcase 690: -SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by atan2(1-value1, 1-value2); - value1 | atan2 ---------+------------------- - 1.1 | -3.14109014106928 - 2.2 | -3.13556257592532 - 3.3 | -3.13003537924322 - 0.1 | 3.13250199492473 - 0.2 | 3.13351202139289 - 0.3 | 3.13452206434865 -(6 rows) - --- select atan2 with order by index (result) ---Testcase 691: -SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by 2,1; - value1 | atan2 ---------+------------------- - 1.1 | -3.14109014106928 - 2.2 | -3.13556257592532 - 3.3 | -3.13003537924322 - 0.1 | 3.13250199492473 - 0.2 | 3.13351202139289 - 0.3 | 3.13452206434865 -(6 rows) - --- select atan2 with order by index (result) ---Testcase 692: -SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by 1,2; - value1 | atan2 ---------+------------------- - 0.1 | 3.13250199492473 - 0.2 | 3.13351202139289 - 0.3 | 3.13452206434865 - 1.1 | -3.14109014106928 - 2.2 | -3.13556257592532 - 3.3 | -3.13003537924322 -(6 rows) - --- select atan2 and as ---Testcase 693: -SELECT atan2(value3, value4) as atan21 FROM s3; - atan21 -------------------- - -3.14059265392313 - -3.13959265625645 - -3.13859266258974 - -3.13609270904712 - -3.13059309722425 - -3.12509415072024 -(6 rows) - --- select atan2(*) (stub function, explain) ---Testcase 694: -EXPLAIN VERBOSE -SELECT atan2_all(value1) from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..3200.00 rows=2560 width=32) - Output: (atan2_all(value1)) - InfluxDB query: SELECT atan2(*, "value1") FROM "s3" -(3 rows) - --- select atan2(*) (stub function, result) ---Testcase 695: -SELECT atan2_all(value1) from s3; - atan2_all -------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.7853981633974483,1.5697963271282296,-0.7853981633974483,-1.5697963271282296) - (1970-01-01T00:00:01Z,,0.7853981633974483,1.5687963294615568,-0.7853981633974483,-1.5687963294615568) - (1970-01-01T00:00:02Z,,0.7853981633974483,1.567796335794848,-0.7853981633974483,-1.567796335794848) - (1970-01-01T00:00:03Z,,0.7853981633974483,1.5652963822522235,-0.7853981633974483,-1.5652963822522235) - (1970-01-01T00:00:04Z,,0.7853981633974483,1.5597967704293558,-0.7853981633974483,-1.5597967704293558) - (1970-01-01T00:00:05Z,,0.7853981633974483,1.554297823925348,-0.7853981633974483,-1.554297823925348) -(6 rows) - --- select ceil (builtin function, explain) ---Testcase 696: -EXPLAIN VERBOSE -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1483.93 rows=1462 width=32) - Output: (ceil(value1)), (ceil((value2)::double precision)), (ceil(value3)), (ceil((value4)::double precision)) - InfluxDB query: SELECT ceil("value1"), ceil("value2"), ceil("value3"), ceil("value4") FROM "s3" -(3 rows) - --- select ceil (builtin function, result) ---Testcase 697: -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3; - ceil | ceil | ceil | ceil -------+------+------+------ - 1 | 100 | -0 | -100 - 1 | 100 | -0 | -100 - 1 | 100 | -0 | -100 - 2 | 200 | -1 | -200 - 3 | 200 | -2 | -200 - 4 | 200 | -3 | -200 -(6 rows) - --- select ceil (builtin function, not pushdown constraints, explain) ---Testcase 698: -EXPLAIN VERBOSE -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (ceil(value1)), (ceil((value2)::double precision)), (ceil(value3)), (ceil((value4)::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT ceil("value1"), ceil("value2"), ceil("value3"), ceil("value4"), "value2" FROM "s3" -(4 rows) - --- select ceil (builtin function, not pushdown constraints, result) ---Testcase 699: -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE to_hex(value2) != '64'; - ceil | ceil | ceil | ceil -------+------+------+------ - 2 | 200 | -1 | -200 - 3 | 200 | -2 | -200 - 4 | 200 | -3 | -200 -(3 rows) - --- select ceil (builtin function, pushdown constraints, explain) ---Testcase 700: -EXPLAIN VERBOSE -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE value2 != 200; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (ceil(value1)), (ceil((value2)::double precision)), (ceil(value3)), (ceil((value4)::double precision)) - InfluxDB query: SELECT ceil("value1"), ceil("value2"), ceil("value3"), ceil("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select ceil (builtin function, pushdown constraints, result) ---Testcase 701: -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE value2 != 200; - ceil | ceil | ceil | ceil -------+------+------+------ - 1 | 100 | -0 | -100 - 1 | 100 | -0 | -100 - 1 | 100 | -0 | -100 -(3 rows) - --- select ceil as nest function with agg (pushdown, explain) ---Testcase 702: -EXPLAIN VERBOSE -SELECT sum(value3),ceil(sum(value3)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (ceil(sum(value3))) - InfluxDB query: SELECT sum("value3"), ceil(sum("value3")) FROM "s3" -(3 rows) - --- select ceil as nest function with agg (pushdown, result) ---Testcase 703: -SELECT sum(value3),ceil(sum(value3)) FROM s3; - sum | ceil -------+------ - -7.2 | -7 -(1 row) - --- select ceil as nest with log2 (pushdown, explain) ---Testcase 704: -EXPLAIN VERBOSE -SELECT ceil(log2(value1)),ceil(log2(1/value1)) FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (ceil(log2(value1))), (ceil(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT ceil(log2("value1")), ceil(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select ceil as nest with log2 (pushdown, result) ---Testcase 705: -SELECT ceil(log2(value1)),ceil(log2(1/value1)) FROM s3; - ceil | ceil -------+------ - -3 | 4 - -2 | 3 - -1 | 2 - 1 | -0 - 2 | -1 - 2 | -1 -(6 rows) - --- select ceil with non pushdown func and explicit constant (explain) ---Testcase 706: -EXPLAIN VERBOSE -SELECT ceil(value3), pi(), 4.1 FROM s3; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (ceil(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT ceil("value3") FROM "s3" -(3 rows) - --- select ceil with non pushdown func and explicit constant (result) ---Testcase 707: -SELECT ceil(value3), pi(), 4.1 FROM s3; - ceil | pi | ?column? -------+------------------+---------- - -0 | 3.14159265358979 | 4.1 - -0 | 3.14159265358979 | 4.1 - -0 | 3.14159265358979 | 4.1 - -1 | 3.14159265358979 | 4.1 - -2 | 3.14159265358979 | 4.1 - -3 | 3.14159265358979 | 4.1 -(6 rows) - --- select ceil with order by (explain) ---Testcase 708: -EXPLAIN VERBOSE -SELECT value1, ceil(1-value1) FROM s3 order by ceil(1-value1); - QUERY PLAN -------------------------------------------------------------------------- - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (ceil(('1'::double precision - value1))) - Sort Key: (ceil(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (ceil(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", ceil((1 - "value1")) FROM "s3" -(6 rows) - --- select ceil with order by (result) ---Testcase 709: -SELECT value1, ceil(1-value1) FROM s3 order by ceil(1-value1); - value1 | ceil ---------+------ - 3.3 | -2 - 2.2 | -1 - 1.1 | -0 - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 -(6 rows) - --- select ceil with order by index (result) ---Testcase 710: -SELECT value1, ceil(1-value1) FROM s3 order by 2,1; - value1 | ceil ---------+------ - 3.3 | -2 - 2.2 | -1 - 1.1 | -0 - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 -(6 rows) - --- select ceil with order by index (result) ---Testcase 711: -SELECT value1, ceil(1-value1) FROM s3 order by 1,2; - value1 | ceil ---------+------ - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 - 1.1 | -0 - 2.2 | -1 - 3.3 | -2 -(6 rows) - --- select ceil and as ---Testcase 712: -SELECT ceil(value3) as ceil1 FROM s3; - ceil1 -------- - -0 - -0 - -0 - -1 - -2 - -3 -(6 rows) - --- select ceil(*) (stub agg function, explain) ---Testcase 713: -EXPLAIN VERBOSE -SELECT ceil_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (ceil_all()) - InfluxDB query: SELECT ceil(*) FROM "s3" -(3 rows) - --- select ceil(*) (stub agg function, result) ---Testcase 714: -SELECT ceil_all() from s3; - ceil_all ---------------------------------------- - (1970-01-01T00:00:00Z,,1,100,-0,-100) - (1970-01-01T00:00:01Z,,1,100,-0,-100) - (1970-01-01T00:00:02Z,,1,100,-0,-100) - (1970-01-01T00:00:03Z,,2,200,-1,-200) - (1970-01-01T00:00:04Z,,3,200,-2,-200) - (1970-01-01T00:00:05Z,,4,200,-3,-200) -(6 rows) - --- select ceil(*) (stub agg function and group by tag only) (explain) ---Testcase 715: -EXPLAIN VERBOSE -SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (ceil_all()), tag1 - InfluxDB query: SELECT ceil(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select ceil(*) (stub agg function and group by tag only) (result) ---Testcase 716: -SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - ceil_all ---------------------------------------- - (1970-01-01T00:00:00Z,,1,100,-0,-100) - (1970-01-01T00:00:01Z,,1,100,-0,-100) - (1970-01-01T00:00:02Z,,1,100,-0,-100) - (1970-01-01T00:00:03Z,,2,200,-1,-200) - (1970-01-01T00:00:04Z,,3,200,-2,-200) -(5 rows) - --- select ceil(*) (stub agg function, expose data, explain) ---Testcase 717: -EXPLAIN VERBOSE -SELECT (ceil_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((ceil_all()))::s3)."time", (((ceil_all()))::s3).tag1, (((ceil_all()))::s3).value1, (((ceil_all()))::s3).value2, (((ceil_all()))::s3).value3, (((ceil_all()))::s3).value4 - InfluxDB query: SELECT ceil(*) FROM "s3" -(3 rows) - --- select ceil(*) (stub agg function, expose data, result) ---Testcase 718: -SELECT (ceil_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 1 | 100 | -0 | -100 - 1970-01-01 09:00:01+09 | | 1 | 100 | -0 | -100 - 1970-01-01 09:00:02+09 | | 1 | 100 | -0 | -100 - 1970-01-01 09:00:03+09 | | 2 | 200 | -1 | -200 - 1970-01-01 09:00:04+09 | | 3 | 200 | -2 | -200 - 1970-01-01 09:00:05+09 | | 4 | 200 | -3 | -200 -(6 rows) - --- select cos (builtin function, explain) ---Testcase 719: -EXPLAIN VERBOSE -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1483.93 rows=1462 width=32) - Output: (cos(value1)), (cos((value2)::double precision)), (cos(value3)), (cos((value4)::double precision)) - InfluxDB query: SELECT cos("value1"), cos("value2"), cos("value3"), cos("value4") FROM "s3" -(3 rows) - --- select cos (builtin function, result) ---Testcase 720: -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3; - cos | cos | cos | cos ---------------------+-------------------+--------------------+------------------- - 0.995004165278026 | 0.862318872287684 | 0.995004165278026 | 0.862318872287684 - 0.980066577841242 | 0.862318872287684 | 0.980066577841242 | 0.862318872287684 - 0.955336489125606 | 0.862318872287684 | 0.955336489125606 | 0.862318872287684 - 0.453596121425577 | 0.487187675007006 | 0.453596121425577 | 0.487187675007006 - -0.588501117255346 | 0.487187675007006 | -0.588501117255346 | 0.487187675007006 - -0.987479769908865 | 0.487187675007006 | -0.987479769908865 | 0.487187675007006 -(6 rows) - --- select cos (builtin function, not pushdown constraints, explain) ---Testcase 721: -EXPLAIN VERBOSE -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (cos(value1)), (cos((value2)::double precision)), (cos(value3)), (cos((value4)::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT cos("value1"), cos("value2"), cos("value3"), cos("value4"), "value2" FROM "s3" -(4 rows) - --- select cos (builtin function, not pushdown constraints, result) ---Testcase 722: -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE to_hex(value2) != '64'; - cos | cos | cos | cos ---------------------+-------------------+--------------------+------------------- - 0.453596121425577 | 0.487187675007006 | 0.453596121425577 | 0.487187675007006 - -0.588501117255346 | 0.487187675007006 | -0.588501117255346 | 0.487187675007006 - -0.987479769908865 | 0.487187675007006 | -0.987479769908865 | 0.487187675007006 -(3 rows) - --- select cos (builtin function, pushdown constraints, explain) ---Testcase 723: -EXPLAIN VERBOSE -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE value2 != 200; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (cos(value1)), (cos((value2)::double precision)), (cos(value3)), (cos((value4)::double precision)) - InfluxDB query: SELECT cos("value1"), cos("value2"), cos("value3"), cos("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select cos (builtin function, pushdown constraints, result) ---Testcase 724: -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE value2 != 200; - cos | cos | cos | cos --------------------+-------------------+-------------------+------------------- - 0.995004165278026 | 0.862318872287684 | 0.995004165278026 | 0.862318872287684 - 0.980066577841242 | 0.862318872287684 | 0.980066577841242 | 0.862318872287684 - 0.955336489125606 | 0.862318872287684 | 0.955336489125606 | 0.862318872287684 -(3 rows) - --- select cos as nest function with agg (pushdown, explain) ---Testcase 725: -EXPLAIN VERBOSE -SELECT sum(value3),cos(sum(value3)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (cos(sum(value3))) - InfluxDB query: SELECT sum("value3"), cos(sum("value3")) FROM "s3" -(3 rows) - --- select cos as nest function with agg (pushdown, result) ---Testcase 726: -SELECT sum(value3),cos(sum(value3)) FROM s3; - sum | cos -------+------------------- - -7.2 | 0.608351314532255 -(1 row) - --- select cos as nest with log2 (pushdown, explain) ---Testcase 727: -EXPLAIN VERBOSE -SELECT cos(log2(value1)),cos(log2(1/value1)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (cos(log2(value1))), (cos(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT cos(log2("value1")), cos(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select cos as nest with log2 (pushdown, result) ---Testcase 728: -SELECT cos(log2(value1)),cos(log2(1/value1)) FROM s3; - cos | cos ---------------------+-------------------- - -0.983783583525364 | -0.983783583525364 - -0.68246642540679 | -0.68246642540679 - -0.165405605243286 | -0.165405605243286 - 0.990561276215998 | 0.990561276215998 - 0.419861582239189 | 0.419861582239189 - -0.151088872169093 | -0.151088872169093 -(6 rows) - --- select cos with non pushdown func and explicit constant (explain) ---Testcase 729: -EXPLAIN VERBOSE -SELECT cos(value3), pi(), 4.1 FROM s3; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (cos(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT cos("value3") FROM "s3" -(3 rows) - --- select cos with non pushdown func and explicit constant (result) ---Testcase 730: -SELECT cos(value3), pi(), 4.1 FROM s3; - cos | pi | ?column? ---------------------+------------------+---------- - 0.995004165278026 | 3.14159265358979 | 4.1 - 0.980066577841242 | 3.14159265358979 | 4.1 - 0.955336489125606 | 3.14159265358979 | 4.1 - 0.453596121425577 | 3.14159265358979 | 4.1 - -0.588501117255346 | 3.14159265358979 | 4.1 - -0.987479769908865 | 3.14159265358979 | 4.1 -(6 rows) - --- select cos with order by (explain) ---Testcase 731: -EXPLAIN VERBOSE -SELECT value1, cos(1-value1) FROM s3 order by cos(1-value1); - QUERY PLAN ------------------------------------------------------------------------- - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (cos(('1'::double precision - value1))) - Sort Key: (cos(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (cos(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", cos((1 - "value1")) FROM "s3" -(6 rows) - --- select cos with order by (result) ---Testcase 732: -SELECT value1, cos(1-value1) FROM s3 order by cos(1-value1); - value1 | cos ---------+-------------------- - 3.3 | -0.666276021279824 - 2.2 | 0.362357754476673 - 0.1 | 0.621609968270665 - 0.2 | 0.696706709347165 - 0.3 | 0.764842187284488 - 1.1 | 0.995004165278026 -(6 rows) - --- select cos with order by index (result) ---Testcase 733: -SELECT value1, cos(1-value1) FROM s3 order by 2,1; - value1 | cos ---------+-------------------- - 3.3 | -0.666276021279824 - 2.2 | 0.362357754476673 - 0.1 | 0.621609968270665 - 0.2 | 0.696706709347165 - 0.3 | 0.764842187284488 - 1.1 | 0.995004165278026 -(6 rows) - --- select cos with order by index (result) ---Testcase 734: -SELECT value1, cos(1-value1) FROM s3 order by 1,2; - value1 | cos ---------+-------------------- - 0.1 | 0.621609968270665 - 0.2 | 0.696706709347165 - 0.3 | 0.764842187284488 - 1.1 | 0.995004165278026 - 2.2 | 0.362357754476673 - 3.3 | -0.666276021279824 -(6 rows) - --- select cos and as ---Testcase 735: -SELECT cos(value3) as cos1 FROM s3; - cos1 --------------------- - 0.995004165278026 - 0.980066577841242 - 0.955336489125606 - 0.453596121425577 - -0.588501117255346 - -0.987479769908865 -(6 rows) - --- select cos(*) (stub agg function, explain) ---Testcase 736: -EXPLAIN VERBOSE -SELECT cos_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (cos_all()) - InfluxDB query: SELECT cos(*) FROM "s3" -(3 rows) - --- select cos(*) (stub agg function, result) ---Testcase 737: -SELECT cos_all() from s3; - cos_all ---------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.9950041652780257,0.8623188722876839,0.9950041652780257,0.8623188722876839) - (1970-01-01T00:00:01Z,,0.9800665778412416,0.8623188722876839,0.9800665778412416,0.8623188722876839) - (1970-01-01T00:00:02Z,,0.955336489125606,0.8623188722876839,0.955336489125606,0.8623188722876839) - (1970-01-01T00:00:03Z,,0.4535961214255773,0.48718767500700594,0.4535961214255773,0.48718767500700594) - (1970-01-01T00:00:04Z,,-0.5885011172553458,0.48718767500700594,-0.5885011172553458,0.48718767500700594) - (1970-01-01T00:00:05Z,,-0.987479769908865,0.48718767500700594,-0.987479769908865,0.48718767500700594) -(6 rows) - --- select cos(*) (stub agg function and group by tag only) (explain) ---Testcase 738: -EXPLAIN VERBOSE -SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (cos_all()), tag1 - InfluxDB query: SELECT cos(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select cos(*) (stub agg function and group by tag only) (result) ---Testcase 739: -SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - cos_all ---------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.9950041652780257,0.8623188722876839,0.9950041652780257,0.8623188722876839) - (1970-01-01T00:00:01Z,,0.9800665778412416,0.8623188722876839,0.9800665778412416,0.8623188722876839) - (1970-01-01T00:00:02Z,,0.955336489125606,0.8623188722876839,0.955336489125606,0.8623188722876839) - (1970-01-01T00:00:03Z,,0.4535961214255773,0.48718767500700594,0.4535961214255773,0.48718767500700594) - (1970-01-01T00:00:04Z,,-0.5885011172553458,0.48718767500700594,-0.5885011172553458,0.48718767500700594) -(5 rows) - --- select exp (builtin function, explain) ---Testcase 740: -EXPLAIN VERBOSE -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1483.93 rows=1462 width=32) - Output: (exp(value1)), (exp((value2)::double precision)), (exp(value3)), (exp((value4)::double precision)) - InfluxDB query: SELECT exp("value1"), exp("value2"), exp("value3"), exp("value4") FROM "s3" -(3 rows) - --- select exp (builtin function, result) ---Testcase 741: -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3; - exp | exp | exp | exp -------------------+----------------------+-------------------+---------------------- - 1.10517091807565 | 2.68811714181614e+43 | 0.90483741803596 | 3.72007597602084e-44 - 1.22140275816017 | 2.68811714181614e+43 | 0.818730753077982 | 3.72007597602084e-44 - 1.349858807576 | 2.68811714181614e+43 | 0.740818220681718 | 3.72007597602084e-44 - 3.00416602394643 | 7.22597376812575e+86 | 0.332871083698079 | 1.38389652673674e-87 - 9.02501349943412 | 7.22597376812575e+86 | 0.110803158362334 | 1.38389652673674e-87 - 27.1126389206579 | 7.22597376812575e+86 | 0.03688316740124 | 1.38389652673674e-87 -(6 rows) - --- select exp (builtin function, not pushdown constraints, explain) ---Testcase 742: -EXPLAIN VERBOSE -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (exp(value1)), (exp((value2)::double precision)), (exp(value3)), (exp((value4)::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT exp("value1"), exp("value2"), exp("value3"), exp("value4"), "value2" FROM "s3" -(4 rows) - --- select exp (builtin function, not pushdown constraints, result) ---Testcase 743: -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE to_hex(value2) != '64'; - exp | exp | exp | exp -------------------+----------------------+-------------------+---------------------- - 3.00416602394643 | 7.22597376812575e+86 | 0.332871083698079 | 1.38389652673674e-87 - 9.02501349943412 | 7.22597376812575e+86 | 0.110803158362334 | 1.38389652673674e-87 - 27.1126389206579 | 7.22597376812575e+86 | 0.03688316740124 | 1.38389652673674e-87 -(3 rows) - --- select exp (builtin function, pushdown constraints, explain) ---Testcase 744: -EXPLAIN VERBOSE -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE value2 != 200; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (exp(value1)), (exp((value2)::double precision)), (exp(value3)), (exp((value4)::double precision)) - InfluxDB query: SELECT exp("value1"), exp("value2"), exp("value3"), exp("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select exp (builtin function, pushdown constraints, result) ---Testcase 745: -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE value2 != 200; - exp | exp | exp | exp -------------------+----------------------+-------------------+---------------------- - 1.10517091807565 | 2.68811714181614e+43 | 0.90483741803596 | 3.72007597602084e-44 - 1.22140275816017 | 2.68811714181614e+43 | 0.818730753077982 | 3.72007597602084e-44 - 1.349858807576 | 2.68811714181614e+43 | 0.740818220681718 | 3.72007597602084e-44 -(3 rows) - --- select exp as nest function with agg (pushdown, explain) ---Testcase 746: -EXPLAIN VERBOSE -SELECT sum(value3),exp(sum(value3)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (exp(sum(value3))) - InfluxDB query: SELECT sum("value3"), exp(sum("value3")) FROM "s3" -(3 rows) - --- select exp as nest function with agg (pushdown, result) ---Testcase 747: -SELECT sum(value3),exp(sum(value3)) FROM s3; - sum | exp -------+--------------------- - -7.2 | 0.00074658580837668 -(1 row) - --- select exp as nest with log2 (pushdown, explain) ---Testcase 748: -EXPLAIN VERBOSE -SELECT exp(log2(value1)),exp(log2(1/value1)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (exp(log2(value1))), (exp(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT exp(log2("value1")), exp(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select exp as nest with log2 (pushdown, result) ---Testcase 749: -SELECT exp(log2(value1)),exp(log2(1/value1)) FROM s3; - exp | exp ---------------------+------------------- - 0.0360831928207872 | 27.7137337864378 - 0.0980842873575298 | 10.1953128981289 - 0.176053809624996 | 5.68008157352602 - 1.14740574913588 | 0.87153127893346 - 3.11897219774551 | 0.320618439857474 - 5.5983170426266 | 0.178625110436908 -(6 rows) - --- select exp with non pushdown func and explicit constant (explain) ---Testcase 750: -EXPLAIN VERBOSE -SELECT exp(value3), pi(), 4.1 FROM s3; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (exp(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT exp("value3") FROM "s3" -(3 rows) - --- select exp with non pushdown func and explicit constant (result) ---Testcase 751: -SELECT exp(value3), pi(), 4.1 FROM s3; - exp | pi | ?column? --------------------+------------------+---------- - 0.90483741803596 | 3.14159265358979 | 4.1 - 0.818730753077982 | 3.14159265358979 | 4.1 - 0.740818220681718 | 3.14159265358979 | 4.1 - 0.332871083698079 | 3.14159265358979 | 4.1 - 0.110803158362334 | 3.14159265358979 | 4.1 - 0.03688316740124 | 3.14159265358979 | 4.1 -(6 rows) - --- select exp with order by (explain) ---Testcase 752: -EXPLAIN VERBOSE -SELECT value1, exp(1-value1) FROM s3 order by exp(1-value1); - QUERY PLAN ------------------------------------------------------------------------- - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (exp(('1'::double precision - value1))) - Sort Key: (exp(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (exp(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", exp((1 - "value1")) FROM "s3" -(6 rows) - --- select exp with order by (result) ---Testcase 753: -SELECT value1, exp(1-value1) FROM s3 order by exp(1-value1); - value1 | exp ---------+------------------- - 3.3 | 0.100258843722804 - 2.2 | 0.301194211912202 - 1.1 | 0.90483741803596 - 0.3 | 2.01375270747048 - 0.2 | 2.22554092849247 - 0.1 | 2.45960311115695 -(6 rows) - --- select exp with order by index (result) ---Testcase 754: -SELECT value1, exp(1-value1) FROM s3 order by 2,1; - value1 | exp ---------+------------------- - 3.3 | 0.100258843722804 - 2.2 | 0.301194211912202 - 1.1 | 0.90483741803596 - 0.3 | 2.01375270747048 - 0.2 | 2.22554092849247 - 0.1 | 2.45960311115695 -(6 rows) - --- select exp with order by index (result) ---Testcase 755: -SELECT value1, exp(1-value1) FROM s3 order by 1,2; - value1 | exp ---------+------------------- - 0.1 | 2.45960311115695 - 0.2 | 2.22554092849247 - 0.3 | 2.01375270747048 - 1.1 | 0.90483741803596 - 2.2 | 0.301194211912202 - 3.3 | 0.100258843722804 -(6 rows) - --- select exp and as ---Testcase 756: -SELECT exp(value3) as exp1 FROM s3; - exp1 -------------------- - 0.90483741803596 - 0.818730753077982 - 0.740818220681718 - 0.332871083698079 - 0.110803158362334 - 0.03688316740124 -(6 rows) - --- select exp(*) (stub agg function, explain) ---Testcase 757: -EXPLAIN VERBOSE -SELECT exp_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (exp_all()) - InfluxDB query: SELECT exp(*) FROM "s3" -(3 rows) - --- select exp(*) (stub agg function, result) ---Testcase 758: -SELECT exp_all() from s3; - exp_all -------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,1.1051709180756477,2.6881171418161356e+43,0.9048374180359595,3.720075976020836e-44) - (1970-01-01T00:00:01Z,,1.2214027581601699,2.6881171418161356e+43,0.8187307530779819,3.720075976020836e-44) - (1970-01-01T00:00:02Z,,1.3498588075760032,2.6881171418161356e+43,0.7408182206817179,3.720075976020836e-44) - (1970-01-01T00:00:03Z,,3.0041660239464334,7.22597376812575e+86,0.3328710836980795,1.3838965267367376e-87) - (1970-01-01T00:00:04Z,,9.025013499434122,7.22597376812575e+86,0.11080315836233386,1.3838965267367376e-87) - (1970-01-01T00:00:05Z,,27.112638920657883,7.22597376812575e+86,0.036883167401240015,1.3838965267367376e-87) -(6 rows) - --- select exp(*) (stub agg function and group by tag only) (explain) ---Testcase 759: -EXPLAIN VERBOSE -SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (exp_all()), tag1 - InfluxDB query: SELECT exp(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select exp(*) (stub agg function and group by tag only) (result) ---Testcase 760: -SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - exp_all ------------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,1.1051709180756477,2.6881171418161356e+43,0.9048374180359595,3.720075976020836e-44) - (1970-01-01T00:00:01Z,,1.2214027581601699,2.6881171418161356e+43,0.8187307530779819,3.720075976020836e-44) - (1970-01-01T00:00:02Z,,1.3498588075760032,2.6881171418161356e+43,0.7408182206817179,3.720075976020836e-44) - (1970-01-01T00:00:03Z,,3.0041660239464334,7.22597376812575e+86,0.3328710836980795,1.3838965267367376e-87) - (1970-01-01T00:00:04Z,,9.025013499434122,7.22597376812575e+86,0.11080315836233386,1.3838965267367376e-87) -(5 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 761: -SELECT ceil_all(), cos_all(), exp_all() FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub ceil_all() is called -CONTEXT: PL/pgSQL function ceil_all() line 3 at RAISE --- select floor (builtin function, explain) ---Testcase 762: -EXPLAIN VERBOSE -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1483.93 rows=1462 width=32) - Output: (floor(value1)), (floor((value2)::double precision)), (floor(value3)), (floor((value4)::double precision)) - InfluxDB query: SELECT floor("value1"), floor("value2"), floor("value3"), floor("value4") FROM "s3" -(3 rows) - --- select floor (builtin function, result) ---Testcase 763: -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3; - floor | floor | floor | floor --------+-------+-------+------- - 0 | 100 | -1 | -100 - 0 | 100 | -1 | -100 - 0 | 100 | -1 | -100 - 1 | 200 | -2 | -200 - 2 | 200 | -3 | -200 - 3 | 200 | -4 | -200 -(6 rows) - --- select floor (builtin function, not pushdown constraints, explain) ---Testcase 764: -EXPLAIN VERBOSE -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (floor(value1)), (floor((value2)::double precision)), (floor(value3)), (floor((value4)::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT floor("value1"), floor("value2"), floor("value3"), floor("value4"), "value2" FROM "s3" -(4 rows) - --- select floor (builtin function, not pushdown constraints, result) ---Testcase 765: -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE to_hex(value2) != '64'; - floor | floor | floor | floor --------+-------+-------+------- - 1 | 200 | -2 | -200 - 2 | 200 | -3 | -200 - 3 | 200 | -4 | -200 -(3 rows) - --- select floor (builtin function, pushdown constraints, explain) ---Testcase 766: -EXPLAIN VERBOSE -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE value2 != 200; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (floor(value1)), (floor((value2)::double precision)), (floor(value3)), (floor((value4)::double precision)) - InfluxDB query: SELECT floor("value1"), floor("value2"), floor("value3"), floor("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select floor (builtin function, pushdown constraints, result) ---Testcase 767: -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE value2 != 200; - floor | floor | floor | floor --------+-------+-------+------- - 0 | 100 | -1 | -100 - 0 | 100 | -1 | -100 - 0 | 100 | -1 | -100 -(3 rows) - --- select floor as nest function with agg (pushdown, explain) ---Testcase 768: -EXPLAIN VERBOSE -SELECT sum(value3),floor(sum(value3)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (floor(sum(value3))) - InfluxDB query: SELECT sum("value3"), floor(sum("value3")) FROM "s3" -(3 rows) - --- select floor as nest function with agg (pushdown, result) ---Testcase 769: -SELECT sum(value3),floor(sum(value3)) FROM s3; - sum | floor -------+------- - -7.2 | -8 -(1 row) - --- select floor as nest with log2 (pushdown, explain) ---Testcase 770: -EXPLAIN VERBOSE -SELECT floor(log2(value1)),floor(log2(1/value1)) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (floor(log2(value1))), (floor(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT floor(log2("value1")), floor(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select floor as nest with log2 (pushdown, result) ---Testcase 771: -SELECT floor(log2(value1)),floor(log2(1/value1)) FROM s3; - floor | floor --------+------- - -4 | 3 - -3 | 2 - -2 | 1 - 0 | -1 - 1 | -2 - 1 | -2 -(6 rows) - --- select floor with non pushdown func and explicit constant (explain) ---Testcase 772: -EXPLAIN VERBOSE -SELECT floor(value3), pi(), 4.1 FROM s3; - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (floor(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT floor("value3") FROM "s3" -(3 rows) - --- select floor with non pushdown func and explicit constant (result) ---Testcase 773: -SELECT floor(value3), pi(), 4.1 FROM s3; - floor | pi | ?column? --------+------------------+---------- - -1 | 3.14159265358979 | 4.1 - -1 | 3.14159265358979 | 4.1 - -1 | 3.14159265358979 | 4.1 - -2 | 3.14159265358979 | 4.1 - -3 | 3.14159265358979 | 4.1 - -4 | 3.14159265358979 | 4.1 -(6 rows) - --- select floor with order by (explain) ---Testcase 774: -EXPLAIN VERBOSE -SELECT value1, floor(1-value1) FROM s3 order by floor(1-value1); - QUERY PLAN --------------------------------------------------------------------------- - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (floor(('1'::double precision - value1))) - Sort Key: (floor(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (floor(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", floor((1 - "value1")) FROM "s3" -(6 rows) - --- select floor with order by (result) ---Testcase 775: -SELECT value1, floor(1-value1) FROM s3 order by floor(1-value1); - value1 | floor ---------+------- - 3.3 | -3 - 2.2 | -2 - 1.1 | -1 - 0.1 | 0 - 0.2 | 0 - 0.3 | 0 -(6 rows) - --- select floor with order by index (result) ---Testcase 776: -SELECT value1, floor(1-value1) FROM s3 order by 2,1; - value1 | floor ---------+------- - 3.3 | -3 - 2.2 | -2 - 1.1 | -1 - 0.1 | 0 - 0.2 | 0 - 0.3 | 0 -(6 rows) - --- select floor with order by index (result) ---Testcase 777: -SELECT value1, floor(1-value1) FROM s3 order by 1,2; - value1 | floor ---------+------- - 0.1 | 0 - 0.2 | 0 - 0.3 | 0 - 1.1 | -1 - 2.2 | -2 - 3.3 | -3 -(6 rows) - --- select floor and as ---Testcase 778: -SELECT floor(value3) as floor1 FROM s3; - floor1 --------- - -1 - -1 - -1 - -2 - -3 - -4 -(6 rows) - --- select floor(*) (stub agg function, explain) ---Testcase 779: -EXPLAIN VERBOSE -SELECT floor_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (floor_all()) - InfluxDB query: SELECT floor(*) FROM "s3" -(3 rows) - --- select floor(*) (stub agg function, result) ---Testcase 780: -SELECT floor_all() from s3; - floor_all ---------------------------------------- - (1970-01-01T00:00:00Z,,0,100,-1,-100) - (1970-01-01T00:00:01Z,,0,100,-1,-100) - (1970-01-01T00:00:02Z,,0,100,-1,-100) - (1970-01-01T00:00:03Z,,1,200,-2,-200) - (1970-01-01T00:00:04Z,,2,200,-3,-200) - (1970-01-01T00:00:05Z,,3,200,-4,-200) -(6 rows) - --- select floor(*) (stub agg function and group by tag only) (explain) ---Testcase 781: -EXPLAIN VERBOSE -SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (floor_all()), tag1 - InfluxDB query: SELECT floor(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select floor(*) (stub agg function and group by tag only) (result) ---Testcase 782: -SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - floor_all ---------------------------------------- - (1970-01-01T00:00:00Z,,0,100,-1,-100) - (1970-01-01T00:00:01Z,,0,100,-1,-100) - (1970-01-01T00:00:02Z,,0,100,-1,-100) - (1970-01-01T00:00:03Z,,1,200,-2,-200) - (1970-01-01T00:00:04Z,,2,200,-3,-200) -(5 rows) - --- select floor(*) (stub agg function, expose data, explain) ---Testcase 783: -EXPLAIN VERBOSE -SELECT (floor_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((floor_all()))::s3)."time", (((floor_all()))::s3).tag1, (((floor_all()))::s3).value1, (((floor_all()))::s3).value2, (((floor_all()))::s3).value3, (((floor_all()))::s3).value4 - InfluxDB query: SELECT floor(*) FROM "s3" -(3 rows) - --- select floor(*) (stub agg function, expose data, result) ---Testcase 784: -SELECT (floor_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0 | 100 | -1 | -100 - 1970-01-01 09:00:01+09 | | 0 | 100 | -1 | -100 - 1970-01-01 09:00:02+09 | | 0 | 100 | -1 | -100 - 1970-01-01 09:00:03+09 | | 1 | 200 | -2 | -200 - 1970-01-01 09:00:04+09 | | 2 | 200 | -3 | -200 - 1970-01-01 09:00:05+09 | | 3 | 200 | -4 | -200 -(6 rows) - --- select ln (builtin function, explain) ---Testcase 785: -EXPLAIN VERBOSE -SELECT ln(value1), ln(value2) FROM s3; - QUERY PLAN ---------------------------------------------------------------- - Foreign Scan (cost=10.00..2063.36 rows=2048 width=16) - Output: (ln(value1)), (ln((value2)::double precision)) - InfluxDB query: SELECT ln("value1"), ln("value2") FROM "s3" -(3 rows) - --- select ln (builtin function, result) ---Testcase 786: -SELECT ln(value1), ln(value2) FROM s3; - ln | ln ---------------------+------------------ - -2.30258509299405 | 4.60517018598809 - -1.6094379124341 | 4.60517018598809 - -1.20397280432594 | 4.60517018598809 - 0.0953101798043249 | 5.29831736654804 - 0.78845736036427 | 5.29831736654804 - 1.19392246847243 | 5.29831736654804 -(6 rows) - --- select ln (builtin function, not pushdown constraints, explain) ---Testcase 787: -EXPLAIN VERBOSE -SELECT ln(value1), ln(value2) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN -------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2053.28 rows=2038 width=16) - Output: (ln(value1)), (ln((value2)::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT ln("value1"), ln("value2"), "value2" FROM "s3" -(4 rows) - --- select ln (builtin function, not pushdown constraints, result) ---Testcase 788: -SELECT ln(value1), ln(value2) FROM s3 WHERE to_hex(value2) != '64'; - ln | ln ---------------------+------------------ - 0.0953101798043249 | 5.29831736654804 - 0.78845736036427 | 5.29831736654804 - 1.19392246847243 | 5.29831736654804 -(3 rows) - --- select ln (builtin function, pushdown constraints, explain) ---Testcase 789: -EXPLAIN VERBOSE -SELECT ln(value1), ln(value2) FROM s3 WHERE value2 != 200; - QUERY PLAN ------------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..2053.28 rows=2038 width=16) - Output: (ln(value1)), (ln((value2)::double precision)) - InfluxDB query: SELECT ln("value1"), ln("value2") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select ln (builtin function, pushdown constraints, result) ---Testcase 790: -SELECT ln(value1), ln(value2) FROM s3 WHERE value2 != 200; - ln | ln --------------------+------------------ - -2.30258509299405 | 4.60517018598809 - -1.6094379124341 | 4.60517018598809 - -1.20397280432594 | 4.60517018598809 -(3 rows) - --- select ln as nest function with agg (pushdown, explain) ---Testcase 791: -EXPLAIN VERBOSE -SELECT sum(value3),ln(sum(value3)) FROM s3; - QUERY PLAN ---------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (ln(sum(value3))) - InfluxDB query: SELECT sum("value3"), ln(sum("value3")) FROM "s3" -(3 rows) - --- select ln as nest function with agg (pushdown, result) ---Testcase 792: -SELECT sum(value3),ln(sum(value3)) FROM s3; - sum | ln -------+---- - -7.2 | -(1 row) - --- select ln as nest with log2 (pushdown, explain) ---Testcase 793: -EXPLAIN VERBOSE -SELECT ln(log2(value1)),ln(log2(1/value1)) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (ln(log2(value1))), (ln(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT ln(log2("value1")), ln(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select ln as nest with log2 (pushdown, result) ---Testcase 794: -SELECT ln(log2(value1)),ln(log2(1/value1)) FROM s3; - ln | ln --------------------+------------------- - | 1.20054536582962 - | 0.842397915908775 - | 0.55213967944403 - -1.98410573493163 | - 0.128835969640311 | - 0.54375699916606 | -(6 rows) - --- select ln with non pushdown func and explicit constant (explain) ---Testcase 795: -EXPLAIN VERBOSE -SELECT ln(value3), pi(), 4.1 FROM s3; - QUERY PLAN -------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (ln(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT ln("value3") FROM "s3" -(3 rows) - --- select ln with non pushdown func and explicit constant (result) ---Testcase 796: -SELECT ln(value3), pi(), 4.1 FROM s3; - ln | pi | ?column? -----+------------------+---------- - | 3.14159265358979 | 4.1 - | 3.14159265358979 | 4.1 - | 3.14159265358979 | 4.1 - | 3.14159265358979 | 4.1 - | 3.14159265358979 | 4.1 - | 3.14159265358979 | 4.1 -(6 rows) - --- select ln with order by (explain) ---Testcase 797: -EXPLAIN VERBOSE -SELECT value1, ln(1-value1) FROM s3 order by ln(1-value1); - QUERY PLAN ------------------------------------------------------------------------ - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (ln(('1'::double precision - value1))) - Sort Key: (ln(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (ln(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", ln((1 - "value1")) FROM "s3" -(6 rows) - --- select ln with order by (result) ---Testcase 798: -SELECT value1, ln(1-value1) FROM s3 order by ln(1-value1); - value1 | ln ---------+-------------------- - 0.3 | -0.356674943938732 - 0.2 | -0.22314355131421 - 0.1 | -0.105360515657826 - 1.1 | - 2.2 | - 3.3 | -(6 rows) - --- select ln with order by index (result) ---Testcase 799: -SELECT value1, ln(1-value1) FROM s3 order by 2,1; - value1 | ln ---------+-------------------- - 0.3 | -0.356674943938732 - 0.2 | -0.22314355131421 - 0.1 | -0.105360515657826 - 1.1 | - 2.2 | - 3.3 | -(6 rows) - --- select ln with order by index (result) ---Testcase 800: -SELECT value1, ln(1-value1) FROM s3 order by 1,2; - value1 | ln ---------+-------------------- - 0.1 | -0.105360515657826 - 0.2 | -0.22314355131421 - 0.3 | -0.356674943938732 - 1.1 | - 2.2 | - 3.3 | -(6 rows) - --- select ln and as ---Testcase 801: -SELECT ln(value1) as ln1 FROM s3; - ln1 --------------------- - -2.30258509299405 - -1.6094379124341 - -1.20397280432594 - 0.0953101798043249 - 0.78845736036427 - 1.19392246847243 -(6 rows) - --- select ln(*) (stub agg function, explain) ---Testcase 802: -EXPLAIN VERBOSE -SELECT ln_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (ln_all()) - InfluxDB query: SELECT ln(*) FROM "s3" -(3 rows) - --- select ln(*) (stub agg function, result) ---Testcase 803: -SELECT ln_all() from s3; - ln_all ------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,-2.3025850929940455,4.605170185988092,,) - (1970-01-01T00:00:01Z,,-1.6094379124341003,4.605170185988092,,) - (1970-01-01T00:00:02Z,,-1.2039728043259361,4.605170185988092,,) - (1970-01-01T00:00:03Z,,0.09531017980432493,5.298317366548036,,) - (1970-01-01T00:00:04Z,,0.7884573603642703,5.298317366548036,,) - (1970-01-01T00:00:05Z,,1.1939224684724346,5.298317366548036,,) -(6 rows) - --- select ln(*) (stub agg function and group by tag only) (explain) ---Testcase 804: -EXPLAIN VERBOSE -SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (ln_all()), tag1 - InfluxDB query: SELECT ln(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select ln(*) (stub agg function and group by tag only) (result) ---Testcase 805: -SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - ln_all ------------------------------------------------------------------ - (1970-01-01T00:00:00Z,,-2.3025850929940455,4.605170185988092,,) - (1970-01-01T00:00:01Z,,-1.6094379124341003,4.605170185988092,,) - (1970-01-01T00:00:02Z,,-1.2039728043259361,4.605170185988092,,) - (1970-01-01T00:00:03Z,,0.09531017980432493,5.298317366548036,,) - (1970-01-01T00:00:04Z,,0.7884573603642703,5.298317366548036,,) -(5 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 806: -SELECT ln_all(), floor_all() FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub ln_all() is called -CONTEXT: PL/pgSQL function ln_all() line 3 at RAISE --- select pow (builtin function, explain) ---Testcase 807: -EXPLAIN VERBOSE -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1483.93 rows=1462 width=32) - Output: (pow(value1, '2'::double precision)), (pow((value2)::double precision, '2'::double precision)), (pow(value3, '2'::double precision)), (pow((value4)::double precision, '2'::double precision)) - InfluxDB query: SELECT pow("value1", 2), pow("value2", 2), pow("value3", 2), pow("value4", 2) FROM "s3" -(3 rows) - --- select pow (builtin function, result) ---Testcase 808: -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3; - pow | pow | pow | pow --------+-------+-------+------- - 0.01 | 10000 | 0.01 | 10000 - 0.04 | 10000 | 0.04 | 10000 - 0.09 | 10000 | 0.09 | 10000 - 1.21 | 40000 | 1.21 | 40000 - 4.84 | 40000 | 4.84 | 40000 - 10.89 | 40000 | 10.89 | 40000 -(6 rows) - --- select pow (builtin function, not pushdown constraints, explain) ---Testcase 809: -EXPLAIN VERBOSE -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (pow(value1, '2'::double precision)), (pow((value2)::double precision, '2'::double precision)), (pow(value3, '2'::double precision)), (pow((value4)::double precision, '2'::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT pow("value1", 2), pow("value2", 2), pow("value3", 2), pow("value4", 2), "value2" FROM "s3" -(4 rows) - --- select pow (builtin function, not pushdown constraints, result) ---Testcase 810: -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE to_hex(value2) != '64'; - pow | pow | pow | pow --------+-------+-------+------- - 1.21 | 40000 | 1.21 | 40000 - 4.84 | 40000 | 4.84 | 40000 - 10.89 | 40000 | 10.89 | 40000 -(3 rows) - --- select pow (builtin function, pushdown constraints, explain) ---Testcase 811: -EXPLAIN VERBOSE -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE value2 != 200; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (pow(value1, '2'::double precision)), (pow((value2)::double precision, '2'::double precision)), (pow(value3, '2'::double precision)), (pow((value4)::double precision, '2'::double precision)) - InfluxDB query: SELECT pow("value1", 2), pow("value2", 2), pow("value3", 2), pow("value4", 2) FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select pow (builtin function, pushdown constraints, result) ---Testcase 812: -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE value2 != 200; - pow | pow | pow | pow -------+-------+------+------- - 0.01 | 10000 | 0.01 | 10000 - 0.04 | 10000 | 0.04 | 10000 - 0.09 | 10000 | 0.09 | 10000 -(3 rows) - --- select pow as nest function with agg (pushdown, explain) ---Testcase 813: -EXPLAIN VERBOSE -SELECT sum(value3),pow(sum(value3), 2) FROM s3; - QUERY PLAN -------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (pow(sum(value3), '2'::double precision)) - InfluxDB query: SELECT sum("value3"), pow(sum("value3"), 2) FROM "s3" -(3 rows) - --- select pow as nest function with agg (pushdown, result) ---Testcase 814: -SELECT sum(value3),pow(sum(value3), 2) FROM s3; - sum | pow -------+------- - -7.2 | 51.84 -(1 row) - --- select pow as nest with log2 (pushdown, explain) ---Testcase 815: -EXPLAIN VERBOSE -SELECT pow(log2(value1), 2),pow(log2(1/value1), 2) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (pow(log2(value1), '2'::double precision)), (pow(log2(('1'::double precision / value1)), '2'::double precision)) - InfluxDB query: SELECT pow(log2("value1"), 2), pow(log2((1 / "value1")), 2) FROM "s3" -(3 rows) - --- select pow as nest with log2 (pushdown, result) ---Testcase 816: -SELECT pow(log2(value1), 2),pow(log2(1/value1), 2) FROM s3; - pow | pow ---------------------+-------------------- - 11.035206267602 | 11.035206267602 - 5.39135007782725 | 5.39135007782725 - 3.01704947531716 | 3.01704947531716 - 0.0189072190436489 | 0.0189072190436489 - 1.29391426654352 | 1.29391426654352 - 2.96688920545725 | 2.96688920545725 -(6 rows) - --- select pow with non pushdown func and explicit constant (explain) ---Testcase 817: -EXPLAIN VERBOSE -SELECT pow(value3, 2), pi(), 4.1 FROM s3; - QUERY PLAN -------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (pow(value3, '2'::double precision)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT pow("value3", 2) FROM "s3" -(3 rows) - --- select pow with non pushdown func and explicit constant (result) ---Testcase 818: -SELECT pow(value3, 2), pi(), 4.1 FROM s3; - pow | pi | ?column? --------+------------------+---------- - 0.01 | 3.14159265358979 | 4.1 - 0.04 | 3.14159265358979 | 4.1 - 0.09 | 3.14159265358979 | 4.1 - 1.21 | 3.14159265358979 | 4.1 - 4.84 | 3.14159265358979 | 4.1 - 10.89 | 3.14159265358979 | 4.1 -(6 rows) - --- select pow with order by (explain) ---Testcase 819: -EXPLAIN VERBOSE -SELECT value1, pow(1-value1, 2) FROM s3 order by pow(1-value1, 2); - QUERY PLAN ----------------------------------------------------------------------------------------- - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (pow(('1'::double precision - value1), '2'::double precision)) - Sort Key: (pow(('1'::double precision - s3.value1), '2'::double precision)) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (pow(('1'::double precision - value1), '2'::double precision)) - InfluxDB query: SELECT "value1", pow((1 - "value1"), 2) FROM "s3" -(6 rows) - --- select pow with order by (result) ---Testcase 820: -SELECT value1, pow(1-value1, 2) FROM s3 order by pow(1-value1, 2); - value1 | pow ---------+------ - 1.1 | 0.01 - 0.3 | 0.49 - 0.2 | 0.64 - 0.1 | 0.81 - 2.2 | 1.44 - 3.3 | 5.29 -(6 rows) - --- select pow with order by index (result) ---Testcase 821: -SELECT value1, pow(1-value1, 2) FROM s3 order by 2,1; - value1 | pow ---------+------ - 1.1 | 0.01 - 0.3 | 0.49 - 0.2 | 0.64 - 0.1 | 0.81 - 2.2 | 1.44 - 3.3 | 5.29 -(6 rows) - --- select pow with order by index (result) ---Testcase 822: -SELECT value1, pow(1-value1, 2) FROM s3 order by 1,2; - value1 | pow ---------+------ - 0.1 | 0.81 - 0.2 | 0.64 - 0.3 | 0.49 - 1.1 | 0.01 - 2.2 | 1.44 - 3.3 | 5.29 -(6 rows) - --- select pow and as ---Testcase 823: -SELECT pow(value3, 2) as pow1 FROM s3; - pow1 -------- - 0.01 - 0.04 - 0.09 - 1.21 - 4.84 - 10.89 -(6 rows) - --- select pow_all(2) (stub agg function, explain) ---Testcase 824: -EXPLAIN VERBOSE -SELECT pow_all(2) from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (pow_all(2)) - InfluxDB query: SELECT pow(*, 2) FROM "s3" -(3 rows) - --- select pow_all(2) (stub agg function, result) ---Testcase 825: -SELECT pow_all(2) from s3; - pow_all -------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.010000000000000002,10000,0.010000000000000002,10000) - (1970-01-01T00:00:01Z,,0.04000000000000001,10000,0.04000000000000001,10000) - (1970-01-01T00:00:02Z,,0.09,10000,0.09,10000) - (1970-01-01T00:00:03Z,,1.2100000000000002,40000,1.2100000000000002,40000) - (1970-01-01T00:00:04Z,,4.840000000000001,40000,4.840000000000001,40000) - (1970-01-01T00:00:05Z,,10.889999999999999,40000,10.889999999999999,40000) -(6 rows) - --- select pow_all(2) (stub agg function and group by tag only) (explain) ---Testcase 826: -EXPLAIN VERBOSE -SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (pow_all(2)), tag1 - InfluxDB query: SELECT pow(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select pow_all(2) (stub agg function and group by tag only) (result) ---Testcase 827: -SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - pow_all -------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.010000000000000002,10000,0.010000000000000002,10000) - (1970-01-01T00:00:01Z,,0.04000000000000001,10000,0.04000000000000001,10000) - (1970-01-01T00:00:02Z,,0.09,10000,0.09,10000) - (1970-01-01T00:00:03Z,,1.2100000000000002,40000,1.2100000000000002,40000) - (1970-01-01T00:00:04Z,,4.840000000000001,40000,4.840000000000001,40000) -(5 rows) - --- select pow_all(2) (stub agg function, expose data, explain) ---Testcase 828: -EXPLAIN VERBOSE -SELECT (pow_all(2)::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((pow_all(2)))::s3)."time", (((pow_all(2)))::s3).tag1, (((pow_all(2)))::s3).value1, (((pow_all(2)))::s3).value2, (((pow_all(2)))::s3).value3, (((pow_all(2)))::s3).value4 - InfluxDB query: SELECT pow(*, 2) FROM "s3" -(3 rows) - --- select pow_all(2) (stub agg function, expose data, result) ---Testcase 829: -SELECT (pow_all(2)::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0.01 | 10000 | 0.01 | 10000 - 1970-01-01 09:00:01+09 | | 0.04 | 10000 | 0.04 | 10000 - 1970-01-01 09:00:02+09 | | 0.09 | 10000 | 0.09 | 10000 - 1970-01-01 09:00:03+09 | | 1.21 | 40000 | 1.21 | 40000 - 1970-01-01 09:00:04+09 | | 4.84 | 40000 | 4.84 | 40000 - 1970-01-01 09:00:05+09 | | 10.89 | 40000 | 10.89 | 40000 -(6 rows) - --- select round (builtin function, explain) ---Testcase 830: -EXPLAIN VERBOSE -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1483.93 rows=1462 width=32) - Output: (round(value1)), (round((value2)::double precision)), (round(value3)), (round((value4)::double precision)) - InfluxDB query: SELECT round("value1"), round("value2"), round("value3"), round("value4") FROM "s3" -(3 rows) - --- select round (builtin function, result) ---Testcase 831: -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3; - round | round | round | round --------+-------+-------+------- - 0 | 100 | -0 | -100 - 0 | 100 | -0 | -100 - 0 | 100 | -0 | -100 - 1 | 200 | -1 | -200 - 2 | 200 | -2 | -200 - 3 | 200 | -3 | -200 -(6 rows) - --- select round (builtin function, not pushdown constraints, explain) ---Testcase 832: -EXPLAIN VERBOSE -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (round(value1)), (round((value2)::double precision)), (round(value3)), (round((value4)::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT round("value1"), round("value2"), round("value3"), round("value4"), "value2" FROM "s3" -(4 rows) - --- select round (builtin function, not pushdown constraints, result) ---Testcase 833: -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE to_hex(value2) != '64'; - round | round | round | round --------+-------+-------+------- - 1 | 200 | -1 | -200 - 2 | 200 | -2 | -200 - 3 | 200 | -3 | -200 -(3 rows) - --- select round (builtin function, pushdown constraints, explain) ---Testcase 834: -EXPLAIN VERBOSE -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE value2 != 200; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (round(value1)), (round((value2)::double precision)), (round(value3)), (round((value4)::double precision)) - InfluxDB query: SELECT round("value1"), round("value2"), round("value3"), round("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select round (builtin function, pushdown constraints, result) ---Testcase 835: -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE value2 != 200; - round | round | round | round --------+-------+-------+------- - 0 | 100 | -0 | -100 - 0 | 100 | -0 | -100 - 0 | 100 | -0 | -100 -(3 rows) - --- select round as nest function with agg (pushdown, explain) ---Testcase 836: -EXPLAIN VERBOSE -SELECT sum(value3),round(sum(value3)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (round(sum(value3))) - InfluxDB query: SELECT sum("value3"), round(sum("value3")) FROM "s3" -(3 rows) - --- select round as nest function with agg (pushdown, result) ---Testcase 837: -SELECT sum(value3),round(sum(value3)) FROM s3; - sum | round -------+------- - -7.2 | -7 -(1 row) - --- select round as nest with log2 (pushdown, explain) ---Testcase 838: -EXPLAIN VERBOSE -SELECT round(log2(value1)),round(log2(1/value1)) FROM s3; - QUERY PLAN ---------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (round(log2(value1))), (round(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT round(log2("value1")), round(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select round as nest with log2 (pushdown, result) ---Testcase 839: -SELECT round(log2(value1)),round(log2(1/value1)) FROM s3; - round | round --------+------- - -3 | 3 - -2 | 2 - -2 | 2 - 0 | -0 - 1 | -1 - 2 | -2 -(6 rows) - --- select round with non pushdown func and roundlicit constant (explain) ---Testcase 840: -EXPLAIN VERBOSE -SELECT round(value3), pi(), 4.1 FROM s3; - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (round(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT round("value3") FROM "s3" -(3 rows) - --- select round with non pushdown func and roundlicit constant (result) ---Testcase 841: -SELECT round(value3), pi(), 4.1 FROM s3; - round | pi | ?column? --------+------------------+---------- - -0 | 3.14159265358979 | 4.1 - -0 | 3.14159265358979 | 4.1 - -0 | 3.14159265358979 | 4.1 - -1 | 3.14159265358979 | 4.1 - -2 | 3.14159265358979 | 4.1 - -3 | 3.14159265358979 | 4.1 -(6 rows) - --- select round with order by (explain) ---Testcase 842: -EXPLAIN VERBOSE -SELECT value1, round(1-value1) FROM s3 order by round(1-value1); - QUERY PLAN --------------------------------------------------------------------------- - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (round(('1'::double precision - value1))) - Sort Key: (round(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (round(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", round((1 - "value1")) FROM "s3" -(6 rows) - --- select round with order by (result) ---Testcase 843: -SELECT value1, round(1-value1) FROM s3 order by round(1-value1); - value1 | round ---------+------- - 3.3 | -2 - 2.2 | -1 - 1.1 | -0 - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 -(6 rows) - --- select round with order by index (result) ---Testcase 844: -SELECT value1, round(1-value1) FROM s3 order by 2,1; - value1 | round ---------+------- - 3.3 | -2 - 2.2 | -1 - 1.1 | -0 - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 -(6 rows) - --- select round with order by index (result) ---Testcase 845: -SELECT value1, round(1-value1) FROM s3 order by 1,2; - value1 | round ---------+------- - 0.1 | 1 - 0.2 | 1 - 0.3 | 1 - 1.1 | -0 - 2.2 | -1 - 3.3 | -2 -(6 rows) - --- select round and as ---Testcase 846: -SELECT round(value3) as round1 FROM s3; - round1 --------- - -0 - -0 - -0 - -1 - -2 - -3 -(6 rows) - --- select round(*) (stub agg function, explain) ---Testcase 847: -EXPLAIN VERBOSE -SELECT round_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (round_all()) - InfluxDB query: SELECT round(*) FROM "s3" -(3 rows) - --- select round(*) (stub agg function, result) ---Testcase 848: -SELECT round_all() from s3; - round_all ---------------------------------------- - (1970-01-01T00:00:00Z,,0,100,-0,-100) - (1970-01-01T00:00:01Z,,0,100,-0,-100) - (1970-01-01T00:00:02Z,,0,100,-0,-100) - (1970-01-01T00:00:03Z,,1,200,-1,-200) - (1970-01-01T00:00:04Z,,2,200,-2,-200) - (1970-01-01T00:00:05Z,,3,200,-3,-200) -(6 rows) - --- select round(*) (stub agg function and group by tag only) (explain) ---Testcase 849: -EXPLAIN VERBOSE -SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (round_all()), tag1 - InfluxDB query: SELECT round(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select round(*) (stub agg function and group by tag only) (result) ---Testcase 850: -SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - round_all ---------------------------------------- - (1970-01-01T00:00:00Z,,0,100,-0,-100) - (1970-01-01T00:00:01Z,,0,100,-0,-100) - (1970-01-01T00:00:02Z,,0,100,-0,-100) - (1970-01-01T00:00:03Z,,1,200,-1,-200) - (1970-01-01T00:00:04Z,,2,200,-2,-200) -(5 rows) - --- select round(*) (stub agg function, expose data, explain) ---Testcase 851: -EXPLAIN VERBOSE -SELECT (round_all()::s3).* from s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..8634.89 rows=3413 width=72) - Output: (((round_all()))::s3)."time", (((round_all()))::s3).tag1, (((round_all()))::s3).value1, (((round_all()))::s3).value2, (((round_all()))::s3).value3, (((round_all()))::s3).value4 - InfluxDB query: SELECT round(*) FROM "s3" -(3 rows) - --- select round(*) (stub agg function, expose data, result) ---Testcase 852: -SELECT (round_all()::s3).* from s3; - time | tag1 | value1 | value2 | value3 | value4 -------------------------+------+--------+--------+--------+-------- - 1970-01-01 09:00:00+09 | | 0 | 100 | -0 | -100 - 1970-01-01 09:00:01+09 | | 0 | 100 | -0 | -100 - 1970-01-01 09:00:02+09 | | 0 | 100 | -0 | -100 - 1970-01-01 09:00:03+09 | | 1 | 200 | -1 | -200 - 1970-01-01 09:00:04+09 | | 2 | 200 | -2 | -200 - 1970-01-01 09:00:05+09 | | 3 | 200 | -3 | -200 -(6 rows) - --- select sin (builtin function, explain) ---Testcase 853: -EXPLAIN VERBOSE -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1483.93 rows=1462 width=32) - Output: (sin(value1)), (sin((value2)::double precision)), (sin(value3)), (sin((value4)::double precision)) - InfluxDB query: SELECT sin("value1"), sin("value2"), sin("value3"), sin("value4") FROM "s3" -(3 rows) - --- select sin (builtin function, result) ---Testcase 854: -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3; - sin | sin | sin | sin ---------------------+--------------------+---------------------+------------------- - 0.0998334166468282 | -0.506365641109759 | -0.0998334166468282 | 0.506365641109759 - 0.198669330795061 | -0.506365641109759 | -0.198669330795061 | 0.506365641109759 - 0.29552020666134 | -0.506365641109759 | -0.29552020666134 | 0.506365641109759 - 0.891207360061435 | -0.873297297213995 | -0.891207360061435 | 0.873297297213995 - 0.80849640381959 | -0.873297297213995 | -0.80849640381959 | 0.873297297213995 - -0.157745694143248 | -0.873297297213995 | 0.157745694143248 | 0.873297297213995 -(6 rows) - --- select sin (builtin function, not pushdown constraints, explain) ---Testcase 855: -EXPLAIN VERBOSE -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (sin(value1)), (sin((value2)::double precision)), (sin(value3)), (sin((value4)::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT sin("value1"), sin("value2"), sin("value3"), sin("value4"), "value2" FROM "s3" -(4 rows) - --- select sin (builtin function, not pushdown constraints, result) ---Testcase 856: -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE to_hex(value2) != '64'; - sin | sin | sin | sin ---------------------+--------------------+--------------------+------------------- - 0.891207360061435 | -0.873297297213995 | -0.891207360061435 | 0.873297297213995 - 0.80849640381959 | -0.873297297213995 | -0.80849640381959 | 0.873297297213995 - -0.157745694143248 | -0.873297297213995 | 0.157745694143248 | 0.873297297213995 -(3 rows) - --- select sin (builtin function, pushdown constraints, explain) ---Testcase 857: -EXPLAIN VERBOSE -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE value2 != 200; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (sin(value1)), (sin((value2)::double precision)), (sin(value3)), (sin((value4)::double precision)) - InfluxDB query: SELECT sin("value1"), sin("value2"), sin("value3"), sin("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select sin (builtin function, pushdown constraints, result) ---Testcase 858: -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE value2 != 200; - sin | sin | sin | sin ---------------------+--------------------+---------------------+------------------- - 0.0998334166468282 | -0.506365641109759 | -0.0998334166468282 | 0.506365641109759 - 0.198669330795061 | -0.506365641109759 | -0.198669330795061 | 0.506365641109759 - 0.29552020666134 | -0.506365641109759 | -0.29552020666134 | 0.506365641109759 -(3 rows) - --- select sin as nest function with agg (pushdown, explain) ---Testcase 859: -EXPLAIN VERBOSE -SELECT sum(value3),sin(sum(value3)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (sin(sum(value3))) - InfluxDB query: SELECT sum("value3"), sin(sum("value3")) FROM "s3" -(3 rows) - --- select sin as nest function with agg (pushdown, result) ---Testcase 860: -SELECT sum(value3),sin(sum(value3)) FROM s3; - sum | sin -------+-------------------- - -7.2 | -0.793667863849153 -(1 row) - --- select sin as nest with log2 (pushdown, explain) ---Testcase 861: -EXPLAIN VERBOSE -SELECT sin(log2(value1)),sin(log2(1/value1)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (sin(log2(value1))), (sin(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT sin(log2("value1")), sin(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select sin as nest with log2 (pushdown, result) ---Testcase 862: -SELECT sin(log2(value1)),sin(log2(1/value1)) FROM s3; - sin | sin ---------------------+-------------------- - 0.179359585152268 | -0.179359585152268 - -0.730916943429606 | 0.730916943429606 - -0.986225626190124 | 0.986225626190124 - 0.137070631651469 | -0.137070631651469 - 0.907588150958134 | -0.907588150958134 - 0.988520183257111 | -0.988520183257111 -(6 rows) - --- select sin with non pushdown func and explicit constant (explain) ---Testcase 863: -EXPLAIN VERBOSE -SELECT sin(value3), pi(), 4.1 FROM s3; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (sin(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT sin("value3") FROM "s3" -(3 rows) - --- select sin with non pushdown func and explicit constant (result) ---Testcase 864: -SELECT sin(value3), pi(), 4.1 FROM s3; - sin | pi | ?column? ----------------------+------------------+---------- - -0.0998334166468282 | 3.14159265358979 | 4.1 - -0.198669330795061 | 3.14159265358979 | 4.1 - -0.29552020666134 | 3.14159265358979 | 4.1 - -0.891207360061435 | 3.14159265358979 | 4.1 - -0.80849640381959 | 3.14159265358979 | 4.1 - 0.157745694143248 | 3.14159265358979 | 4.1 -(6 rows) - --- select sin with order by (explain) ---Testcase 865: -EXPLAIN VERBOSE -SELECT value1, sin(1-value1) FROM s3 order by sin(1-value1); - QUERY PLAN ------------------------------------------------------------------------- - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (sin(('1'::double precision - value1))) - Sort Key: (sin(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (sin(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", sin((1 - "value1")) FROM "s3" -(6 rows) - --- select sin with order by (result) ---Testcase 866: -SELECT value1, sin(1-value1) FROM s3 order by sin(1-value1); - value1 | sin ---------+--------------------- - 2.2 | -0.932039085967226 - 3.3 | -0.74570521217672 - 1.1 | -0.0998334166468282 - 0.3 | 0.644217687237691 - 0.2 | 0.717356090899523 - 0.1 | 0.783326909627483 -(6 rows) - --- select sin with order by index (result) ---Testcase 867: -SELECT value1, sin(1-value1) FROM s3 order by 2,1; - value1 | sin ---------+--------------------- - 2.2 | -0.932039085967226 - 3.3 | -0.74570521217672 - 1.1 | -0.0998334166468282 - 0.3 | 0.644217687237691 - 0.2 | 0.717356090899523 - 0.1 | 0.783326909627483 -(6 rows) - --- select sin with order by index (result) ---Testcase 868: -SELECT value1, sin(1-value1) FROM s3 order by 1,2; - value1 | sin ---------+--------------------- - 0.1 | 0.783326909627483 - 0.2 | 0.717356090899523 - 0.3 | 0.644217687237691 - 1.1 | -0.0998334166468282 - 2.2 | -0.932039085967226 - 3.3 | -0.74570521217672 -(6 rows) - --- select sin and as ---Testcase 869: -SELECT sin(value3) as sin1 FROM s3; - sin1 ---------------------- - -0.0998334166468282 - -0.198669330795061 - -0.29552020666134 - -0.891207360061435 - -0.80849640381959 - 0.157745694143248 -(6 rows) - --- select sin(*) (stub agg function, explain) ---Testcase 870: -EXPLAIN VERBOSE -SELECT sin_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (sin_all()) - InfluxDB query: SELECT sin(*) FROM "s3" -(3 rows) - --- select sin(*) (stub agg function, result) ---Testcase 871: -SELECT sin_all() from s3; - sin_all ---------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.09983341664682815,-0.5063656411097588,-0.09983341664682815,0.5063656411097588) - (1970-01-01T00:00:01Z,,0.19866933079506122,-0.5063656411097588,-0.19866933079506122,0.5063656411097588) - (1970-01-01T00:00:02Z,,0.29552020666133955,-0.5063656411097588,-0.29552020666133955,0.5063656411097588) - (1970-01-01T00:00:03Z,,0.8912073600614354,-0.8732972972139945,-0.8912073600614354,0.8732972972139945) - (1970-01-01T00:00:04Z,,0.8084964038195901,-0.8732972972139945,-0.8084964038195901,0.8732972972139945) - (1970-01-01T00:00:05Z,,-0.1577456941432482,-0.8732972972139945,0.1577456941432482,0.8732972972139945) -(6 rows) - --- select sin(*) (stub agg function and group by tag only) (explain) ---Testcase 872: -EXPLAIN VERBOSE -SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (sin_all()), tag1 - InfluxDB query: SELECT sin(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select sin(*) (stub agg function and group by tag only) (result) ---Testcase 873: -SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - sin_all ---------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.09983341664682815,-0.5063656411097588,-0.09983341664682815,0.5063656411097588) - (1970-01-01T00:00:01Z,,0.19866933079506122,-0.5063656411097588,-0.19866933079506122,0.5063656411097588) - (1970-01-01T00:00:02Z,,0.29552020666133955,-0.5063656411097588,-0.29552020666133955,0.5063656411097588) - (1970-01-01T00:00:03Z,,0.8912073600614354,-0.8732972972139945,-0.8912073600614354,0.8732972972139945) - (1970-01-01T00:00:04Z,,0.8084964038195901,-0.8732972972139945,-0.8084964038195901,0.8732972972139945) -(5 rows) - --- select tan (builtin function, explain) ---Testcase 874: -EXPLAIN VERBOSE -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1483.93 rows=1462 width=32) - Output: (tan(value1)), (tan((value2)::double precision)), (tan(value3)), (tan((value4)::double precision)) - InfluxDB query: SELECT tan("value1"), tan("value2"), tan("value3"), tan("value4") FROM "s3" -(3 rows) - --- select tan (builtin function, result) ---Testcase 875: -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3; - tan | tan | tan | tan --------------------+--------------------+--------------------+------------------- - 0.100334672085451 | -0.587213915156929 | -0.100334672085451 | 0.587213915156929 - 0.202710035508673 | -0.587213915156929 | -0.202710035508673 | 0.587213915156929 - 0.309336249609623 | -0.587213915156929 | -0.309336249609623 | 0.587213915156929 - 1.96475965724865 | -1.79252748379038 | -1.96475965724865 | 1.79252748379038 - -1.37382305676879 | -1.79252748379038 | 1.37382305676879 | 1.79252748379038 - 0.159745747660032 | -1.79252748379038 | -0.159745747660032 | 1.79252748379038 -(6 rows) - --- select tan (builtin function, not pushdown constraints, explain) ---Testcase 876: -EXPLAIN VERBOSE -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE to_hex(value2) != '64'; - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (tan(value1)), (tan((value2)::double precision)), (tan(value3)), (tan((value4)::double precision)) - Filter: (to_hex(s3.value2) <> '64'::text) - InfluxDB query: SELECT tan("value1"), tan("value2"), tan("value3"), tan("value4"), "value2" FROM "s3" -(4 rows) - --- select tan (builtin function, not pushdown constraints, result) ---Testcase 877: -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE to_hex(value2) != '64'; - tan | tan | tan | tan --------------------+-------------------+--------------------+------------------ - 1.96475965724865 | -1.79252748379038 | -1.96475965724865 | 1.79252748379038 - -1.37382305676879 | -1.79252748379038 | 1.37382305676879 | 1.79252748379038 - 0.159745747660032 | -1.79252748379038 | -0.159745747660032 | 1.79252748379038 -(3 rows) - --- select tan (builtin function, pushdown constraints, explain) ---Testcase 878: -EXPLAIN VERBOSE -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE value2 != 200; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=10.00..1476.83 rows=1455 width=32) - Output: (tan(value1)), (tan((value2)::double precision)), (tan(value3)), (tan((value4)::double precision)) - InfluxDB query: SELECT tan("value1"), tan("value2"), tan("value3"), tan("value4") FROM "s3" WHERE (("value2" <> 200)) -(3 rows) - --- select tan (builtin function, pushdown constraints, result) ---Testcase 879: -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE value2 != 200; - tan | tan | tan | tan --------------------+--------------------+--------------------+------------------- - 0.100334672085451 | -0.587213915156929 | -0.100334672085451 | 0.587213915156929 - 0.202710035508673 | -0.587213915156929 | -0.202710035508673 | 0.587213915156929 - 0.309336249609623 | -0.587213915156929 | -0.309336249609623 | 0.587213915156929 -(3 rows) - --- select tan as nest function with agg (pushdown, explain) ---Testcase 880: -EXPLAIN VERBOSE -SELECT sum(value3),tan(sum(value3)) FROM s3; - QUERY PLAN ----------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (sum(value3)), (tan(sum(value3))) - InfluxDB query: SELECT sum("value3"), tan(sum("value3")) FROM "s3" -(3 rows) - --- select tan as nest function with agg (pushdown, result) ---Testcase 881: -SELECT sum(value3),tan(sum(value3)) FROM s3; - sum | tan -------+------------------- - -7.2 | -1.30462094005564 -(1 row) - --- select tan as nest with log2 (pushdown, explain) ---Testcase 882: -EXPLAIN VERBOSE -SELECT tan(log2(value1)),tan(log2(1/value1)) FROM s3; - QUERY PLAN ------------------------------------------------------------------------------------ - Foreign Scan (cost=10.00..3859.20 rows=2560 width=16) - Output: (tan(log2(value1))), (tan(log2(('1'::double precision / value1)))) - InfluxDB query: SELECT tan(log2("value1")), tan(log2((1 / "value1"))) FROM "s3" -(3 rows) - --- select tan as nest with log2 (pushdown, result) ---Testcase 883: -SELECT tan(log2(value1)),tan(log2(1/value1)) FROM s3; - tan | tan ---------------------+-------------------- - -0.182316098942755 | 0.182316098942755 - 1.07099326240692 | -1.07099326240692 - 5.96246798734261 | -5.96246798734261 - 0.138376731397261 | -0.138376731397261 - 2.16163657107617 | -2.16163657107617 - -6.54264056025779 | 6.54264056025779 -(6 rows) - --- select tan with non pushdown func and tanlicit constant (explain) ---Testcase 884: -EXPLAIN VERBOSE -SELECT tan(value3), pi(), 4.1 FROM s3; - QUERY PLAN --------------------------------------------------------------------- - Foreign Scan (cost=10.00..2566.40 rows=2560 width=48) - Output: (tan(value3)), '3.14159265358979'::double precision, 4.1 - InfluxDB query: SELECT tan("value3") FROM "s3" -(3 rows) - --- select tan with non pushdown func and tanlicit constant (result) ---Testcase 885: -SELECT tan(value3), pi(), 4.1 FROM s3; - tan | pi | ?column? ---------------------+------------------+---------- - -0.100334672085451 | 3.14159265358979 | 4.1 - -0.202710035508673 | 3.14159265358979 | 4.1 - -0.309336249609623 | 3.14159265358979 | 4.1 - -1.96475965724865 | 3.14159265358979 | 4.1 - 1.37382305676879 | 3.14159265358979 | 4.1 - -0.159745747660032 | 3.14159265358979 | 4.1 -(6 rows) - --- select tan with order by (explain) ---Testcase 886: -EXPLAIN VERBOSE -SELECT value1, tan(1-value1) FROM s3 order by tan(1-value1); - QUERY PLAN ------------------------------------------------------------------------- - Sort (cost=2717.72..2724.12 rows=2560 width=16) - Output: value1, (tan(('1'::double precision - value1))) - Sort Key: (tan(('1'::double precision - s3.value1))) - -> Foreign Scan (cost=10.00..2572.80 rows=2560 width=16) - Output: value1, (tan(('1'::double precision - value1))) - InfluxDB query: SELECT "value1", tan((1 - "value1")) FROM "s3" -(6 rows) - --- select tan with order by (result) ---Testcase 887: -SELECT value1, tan(1-value1) FROM s3 order by tan(1-value1); - value1 | tan ---------+-------------------- - 2.2 | -2.57215162212632 - 1.1 | -0.100334672085451 - 0.3 | 0.842288380463079 - 0.2 | 1.02963855705036 - 3.3 | 1.11921364173413 - 0.1 | 1.26015821755034 -(6 rows) - --- select tan with order by index (result) ---Testcase 888: -SELECT value1, tan(1-value1) FROM s3 order by 2,1; - value1 | tan ---------+-------------------- - 2.2 | -2.57215162212632 - 1.1 | -0.100334672085451 - 0.3 | 0.842288380463079 - 0.2 | 1.02963855705036 - 3.3 | 1.11921364173413 - 0.1 | 1.26015821755034 -(6 rows) - --- select tan with order by index (result) ---Testcase 889: -SELECT value1, tan(1-value1) FROM s3 order by 1,2; - value1 | tan ---------+-------------------- - 0.1 | 1.26015821755034 - 0.2 | 1.02963855705036 - 0.3 | 0.842288380463079 - 1.1 | -0.100334672085451 - 2.2 | -2.57215162212632 - 3.3 | 1.11921364173413 -(6 rows) - --- select tan and as ---Testcase 890: -SELECT tan(value3) as tan1 FROM s3; - tan1 --------------------- - -0.100334672085451 - -0.202710035508673 - -0.309336249609623 - -1.96475965724865 - 1.37382305676879 - -0.159745747660032 -(6 rows) - --- select tan(*) (stub agg function, explain) ---Testcase 891: -EXPLAIN VERBOSE -SELECT tan_all() from s3; - QUERY PLAN --------------------------------------------------------- - Foreign Scan (cost=10.00..4266.25 rows=3413 width=32) - Output: (tan_all()) - InfluxDB query: SELECT tan(*) FROM "s3" -(3 rows) - --- select tan(*) (stub agg function, result) ---Testcase 892: -SELECT tan_all() from s3; - tan_all ---------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.10033467208545055,-0.587213915156929,-0.10033467208545055,0.587213915156929) - (1970-01-01T00:00:01Z,,0.2027100355086725,-0.587213915156929,-0.2027100355086725,0.587213915156929) - (1970-01-01T00:00:02Z,,0.30933624960962325,-0.587213915156929,-0.30933624960962325,0.587213915156929) - (1970-01-01T00:00:03Z,,1.9647596572486523,-1.7925274837903817,-1.9647596572486523,1.7925274837903817) - (1970-01-01T00:00:04Z,,-1.3738230567687948,-1.7925274837903817,1.3738230567687948,1.7925274837903817) - (1970-01-01T00:00:05Z,,0.15974574766003222,-1.7925274837903817,-0.15974574766003222,1.7925274837903817) -(6 rows) - --- select tan(*) (stub agg function and group by tag only) (explain) ---Testcase 893: -EXPLAIN VERBOSE -SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (tan_all()), tag1 - InfluxDB query: SELECT tan(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select tan(*) (stub agg function and group by tag only) (result) ---Testcase 894: -SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - tan_all -------------------------------------------------------------------------------------------------------- - (1970-01-01T00:00:00Z,,0.10033467208545055,-0.587213915156929,-0.10033467208545055,0.587213915156929) - (1970-01-01T00:00:01Z,,0.2027100355086725,-0.587213915156929,-0.2027100355086725,0.587213915156929) - (1970-01-01T00:00:02Z,,0.30933624960962325,-0.587213915156929,-0.30933624960962325,0.587213915156929) - (1970-01-01T00:00:03Z,,1.9647596572486523,-1.7925274837903817,-1.9647596572486523,1.7925274837903817) - (1970-01-01T00:00:04Z,,-1.3738230567687948,-1.7925274837903817,1.3738230567687948,1.7925274837903817) -(5 rows) - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 895: -SELECT sin_all(), round_all(), tan_all() FROM s3; -WARNING: Selecting multiple functions with regular expression or star. The query are not pushed down. -ERROR: stub sin_all() is called -CONTEXT: PL/pgSQL function sin_all() line 3 at RAISE --- select predictors function holt_winters() (explain) ---Testcase 896: -EXPLAIN VERBOSE -SELECT holt_winters(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (holt_winters(min(value1), 5, 1)), (influx_time("time", '@ 1 sec'::interval)) - InfluxDB query: SELECT holt_winters(min("value1"), 5, 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)) -(3 rows) - --- select predictors function holt_winters() (result) ---Testcase 897: -SELECT holt_winters(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - holt_winters ------------------- - 5.18746006560853 - 13.2933307845701 - 37.5847742625017 - 116.557520596579 - 392.431171307496 -(5 rows) - --- select predictors function holt_winters_with_fit() (explain) ---Testcase 898: -EXPLAIN VERBOSE -SELECT holt_winters_with_fit(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=16) - Output: (holt_winters_with_fit(min(value1), 5, 1)), (influx_time("time", '@ 1 sec'::interval)) - InfluxDB query: SELECT holt_winters_with_fit(min("value1"), 5, 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)) -(3 rows) - --- select predictors function holt_winters_with_fit() (result) ---Testcase 899: -SELECT holt_winters_with_fit(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - holt_winters_with_fit ------------------------ - 0.1 - 0.146569361982582 - 0.449297189927864 - 1.00876071385362 - 2.21894136309638 - 5.18746006560853 - 13.2933307845701 - 37.5847742625017 - 116.557520596579 - 392.431171307496 -(10 rows) - --- select count(*) function of InfluxDB (stub agg function, explain) ---Testcase 900: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3; - QUERY PLAN -------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=32) - Output: (influx_count_all(*)) - InfluxDB query: SELECT count(*) FROM "s3" -(3 rows) - --- select count(*) function of InfluxDB (stub agg function, result) ---Testcase 901: -SELECT influx_count_all(*) FROM s3; - influx_count_all ---------------------------------- - (1970-01-01T00:00:00Z,,6,6,6,6) -(1 row) - --- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (explain) ---Testcase 902: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=72) - Output: (influx_count_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT count(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (result) ---Testcase 903: -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_count_all ---------------------------------- - (1970-01-01T00:00:00Z,,1,1,1,1) - (1970-01-01T00:00:01Z,,1,1,1,1) - (1970-01-01T00:00:02Z,,1,1,1,1) - (1970-01-01T00:00:03Z,,0,0,0,0) - (1970-01-01T00:00:04Z,,0,0,0,0) - (1970-01-01T00:00:00Z,,0,0,0,0) - (1970-01-01T00:00:01Z,,0,0,0,0) - (1970-01-01T00:00:02Z,,0,0,0,0) - (1970-01-01T00:00:03Z,,1,1,1,1) - (1970-01-01T00:00:04Z,,1,1,1,1) -(10 rows) - --- select count(*) function of InfluxDB (stub agg function and group by tag only) (explain) ---Testcase 904: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=64) - Output: (influx_count_all(*)), tag1 - InfluxDB query: SELECT count(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select count(*) function of InfluxDB (stub agg function and group by tag only) (result) ---Testcase 905: -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - influx_count_all ---------------------------------- - (1970-01-01T00:00:00Z,,3,3,3,3) - (1970-01-01T00:00:00Z,,2,2,2,2) -(2 rows) - --- select count(*) function of InfluxDB over join query (explain) ---Testcase 906: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Aggregate (cost=70.39..70.41 rows=1 width=32) - Output: influx_count_all(*) - -> Nested Loop (cost=20.00..28.14 rows=169 width=0) - -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) - Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..13.06 rows=13 width=8) - Output: t2.value1 - -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) - Output: t2.value1 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(11 rows) - --- select count(*) function of InfluxDB over join query (result, stub call error) ---Testcase 907: -SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; -ERROR: stub influx_count_all_sfunc(text) is called -CONTEXT: PL/pgSQL function influx_count_all_sfunc(text) line 3 at RAISE --- select distinct (stub agg function, explain) ---Testcase 908: -EXPLAIN VERBOSE -SELECT influx_distinct(value1) FROM s3; - QUERY PLAN -------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=8) - Output: (influx_distinct(value1)) - InfluxDB query: SELECT distinct("value1") FROM "s3" -(3 rows) - --- select distinct (stub agg function, result) ---Testcase 909: -SELECT influx_distinct(value1) FROM s3; - influx_distinct ------------------ - 0.1 - 0.2 - 0.3 - 1.1 - 2.2 - 3.3 -(6 rows) - --- select distinct (stub agg function and group by influx_time() and tag) (explain) ---Testcase 910: -EXPLAIN VERBOSE -SELECT influx_distinct(value1), influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan (cost=1.00..1.00 rows=1 width=48) - Output: (influx_distinct(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 - InfluxDB query: SELECT distinct("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" -(3 rows) - --- select distinct (stub agg function and group by influx_time() and tag) (result) ---Testcase 911: -SELECT influx_distinct(value1), influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - influx_distinct | influx_time | tag1 ------------------+------------------------+------ - 0.1 | 1970-01-01 09:00:00+09 | a - 0.2 | 1970-01-01 09:00:01+09 | a - 0.3 | 1970-01-01 09:00:02+09 | a - 1.1 | 1970-01-01 09:00:03+09 | b - 2.2 | 1970-01-01 09:00:04+09 | b -(5 rows) - --- select distinct (stub agg function and group by tag only) (explain) ---Testcase 912: -EXPLAIN VERBOSE -SELECT influx_distinct(value2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------ - Foreign Scan (cost=1.00..1.00 rows=1 width=40) - Output: (influx_distinct(value2)), tag1 - InfluxDB query: SELECT distinct("value2") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" -(3 rows) - --- select distinct (stub agg function and group by tag only) (result) ---Testcase 913: -SELECT influx_distinct(value2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - influx_distinct ------------------ - 100 - 200 -(2 rows) - --- select distinct over join query (explain) ---Testcase 914: -EXPLAIN VERBOSE -SELECT influx_distinct(t1.value2) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------- - Aggregate (cost=57.15..57.16 rows=1 width=8) - Output: influx_distinct(t1.value2) - -> Nested Loop (cost=20.00..24.65 rows=130 width=8) - Output: t1.value2 - -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) - Output: t2."time", t2.tag1, t2.value1, t2.value2, t2.value3, t2.value4 - InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.100000000000000006)) - -> Materialize (cost=10.00..10.05 rows=10 width=16) - Output: t1.value2, t1.value1 - -> Foreign Scan on public.s3 t1 (cost=10.00..10.00 rows=10 width=16) - Output: t1.value2, t1.value1 - InfluxDB query: SELECT "value1", "value2" FROM "s3" WHERE (("value1" = 0.100000000000000006)) -(12 rows) - --- select distinct over join query (result, stub call error) ---Testcase 915: -SELECT influx_distinct(t1.value2) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; -ERROR: stub influx_distinct_sfunc(anyelement, anyelement) is called -CONTEXT: PL/pgSQL function influx_distinct_sfunc(anyelement,anyelement) line 3 at RAISE --- select distinct with having (explain) ---Testcase 916: -EXPLAIN VERBOSE -SELECT influx_distinct(value2) FROM s3 HAVING influx_distinct(value2) > 100; - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (cost=3840.00..3840.01 rows=1 width=8) - Output: influx_distinct(value2) - Filter: (influx_distinct(s3.value2) > 100) - -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) - Output: "time", tag1, value1, value2, value3, value4 - InfluxDB query: SELECT "value2" FROM "s3" -(6 rows) - --- select distinct with having (result, not pushdown, stub call error) ---Testcase 917: -SELECT influx_distinct(value2) FROM s3 HAVING influx_distinct(value2) > 100; -ERROR: stub influx_distinct_sfunc(anyelement, anyelement) is called -CONTEXT: PL/pgSQL function influx_distinct_sfunc(anyelement,anyelement) line 3 at RAISE ---Testcase 918: -DROP FOREIGN TABLE s3; ---Testcase 919: -CREATE FOREIGN TABLE b3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 bool) SERVER server1 OPTIONS(table 'b3', tags 'tag1'); --- bool type var in where clause (result) ---Testcase 920: -EXPLAIN VERBOSE -SELECT sqrt(abs(value1)) FROM b3 WHERE value3 != true ORDER BY 1; - QUERY PLAN ------------------------------------------------------------------------- - Sort (cost=1352.46..1355.66 rows=1280 width=8) - Output: (sqrt(abs(value1))) - Sort Key: (sqrt(abs(b3.value1))) - -> Foreign Scan (cost=10.00..1286.40 rows=1280 width=8) - Output: (sqrt(abs(value1))) - Filter: (NOT b3.value3) - InfluxDB query: SELECT sqrt(abs("value1")), "value3" FROM "b3" -(7 rows) - --- bool type var in where clause (result) ---Testcase 921: -SELECT sqrt(abs(value1)) FROM b3 WHERE value3 != true ORDER BY 1; - sqrt -------------------- - 0.447213595499958 - 1.04880884817015 - 1.81659021245849 -(3 rows) - ---Testcase 922: -DROP FOREIGN TABLE b3; ---Testcase 923: -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 924: -DROP SERVER server1; ---Testcase 925: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/14.0/aggregate.out b/expected/11.17/aggregate.out similarity index 99% rename from expected/14.0/aggregate.out rename to expected/11.17/aggregate.out index 5639a88..36b0eca 100644 --- a/expected/14.0/aggregate.out +++ b/expected/11.17/aggregate.out @@ -10,9 +10,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); diff --git a/expected/11.13/extra/aggregates.out b/expected/11.17/extra/aggregates.out similarity index 99% rename from expected/11.13/extra/aggregates.out rename to expected/11.17/extra/aggregates.out index a7db4cf..1468d84 100644 --- a/expected/11.13/extra/aggregates.out +++ b/expected/11.17/extra/aggregates.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( unique1 int4, diff --git a/expected/11.13/extra/influxdb_fdw_post.out b/expected/11.17/extra/influxdb_fdw_post.out similarity index 99% rename from expected/11.13/extra/influxdb_fdw_post.out rename to expected/11.17/extra/influxdb_fdw_post.out index 6cbf1ba..04784c9 100644 --- a/expected/11.13/extra/influxdb_fdw_post.out +++ b/expected/11.17/extra/influxdb_fdw_post.out @@ -8,16 +8,16 @@ CREATE EXTENSION influxdb_fdw; CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server -- =================================================================== @@ -3044,7 +3044,7 @@ DROP FOREIGN TABLE local_tbl; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; --Testcase 185: diff --git a/expected/12.8/extra/insert.out b/expected/11.17/extra/insert.out similarity index 99% rename from expected/12.8/extra/insert.out rename to expected/11.17/extra/insert.out index d3e4053..72490a2 100644 --- a/expected/12.8/extra/insert.out +++ b/expected/11.17/extra/insert.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list -- diff --git a/expected/11.13/extra/join.out b/expected/11.17/extra/join.out similarity index 99% rename from expected/11.13/extra/join.out rename to expected/11.17/extra/join.out index 73c6391..c7e1b2e 100644 --- a/expected/11.13/extra/join.out +++ b/expected/11.17/extra/join.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- @@ -6326,6 +6326,9 @@ select * from 3 | 3 (6 rows) +-- check the number of columns specified +SELECT * FROM (int8_tbl i cross join int4_tbl j) ss(a,b,c,d); +ERROR: join expression "ss" has 3 columns available but 4 columns specified -- check we don't try to do a unique-ified semijoin with LATERAL --Testcase 471: explain (verbose, costs off) diff --git a/expected/11.13/extra/limit.out b/expected/11.17/extra/limit.out similarity index 99% rename from expected/11.13/extra/limit.out rename to expected/11.17/extra/limit.out index 7c8ac1f..86353e2 100644 --- a/expected/11.13/extra/limit.out +++ b/expected/11.17/extra/limit.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- diff --git a/expected/11.13/extra/prepare.out b/expected/11.17/extra/prepare.out similarity index 99% rename from expected/11.13/extra/prepare.out rename to expected/11.17/extra/prepare.out index ceb03bb..c16a927 100644 --- a/expected/11.13/extra/prepare.out +++ b/expected/11.17/extra/prepare.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 30: CREATE FOREIGN TABLE tenk1 ( unique1 int4, diff --git a/expected/11.13/extra/select.out b/expected/11.17/extra/select.out similarity index 99% rename from expected/11.13/extra/select.out rename to expected/11.17/extra/select.out index b1c4c96..21bd156 100644 --- a/expected/11.13/extra/select.out +++ b/expected/11.17/extra/select.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( unique1 int4, diff --git a/expected/10.18/extra/select_having.out b/expected/11.17/extra/select_having.out similarity index 96% rename from expected/10.18/extra/select_having.out rename to expected/11.17/extra/select_having.out index dc232a0..036a7d3 100644 --- a/expected/10.18/extra/select_having.out +++ b/expected/11.17/extra/select_having.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; --Testcase 5: diff --git a/expected/11.13/influxdb_fdw.out b/expected/11.17/influxdb_fdw.out similarity index 96% rename from expected/11.13/influxdb_fdw.out rename to expected/11.17/influxdb_fdw.out index 2633167..9a352df 100644 --- a/expected/11.13/influxdb_fdw.out +++ b/expected/11.17/influxdb_fdw.out @@ -10,9 +10,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --Testcase 6: @@ -1128,14 +1128,14 @@ SELECT * FROM t5; SELECT * FROM public.influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Testcase 146: SELECT influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Test pushdown LIMIT...OFFSET @@ -1591,17 +1591,61 @@ SELECT * FROM cpu; 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t (5 rows) +-- InfluxDB_FDW will store time data for Field values as a strings +--Testcase 204: +CREATE FOREIGN TABLE tmp_time ( +time timestamp, +c1 time, +c2 timestamp, +c3 timestamp with time zone +) SERVER server1 OPTIONS (table 'tmp_time'); +--Testcase 205: +SELECT * FROM tmp_time; + time | c1 | c2 | c3 +------+----+----+---- +(0 rows) + +--Testcase 206: +INSERT INTO tmp_time (time, c1) VALUES ('1900-01-01 01:01:01', '01:02:03'); +--Testcase 207: +INSERT INTO tmp_time (time, c1) VALUES ('2100-01-01 01:01:01', '04:05:06'); +--Testcase 208: +INSERT INTO tmp_time (time, c1) VALUES ('1990-01-01 01:01:01', '07:08:09'); +--Testcase 209: +INSERT INTO tmp_time (time, c2) VALUES ('2020-12-27 03:02:56.634467', '1950-02-02 02:02:02'); +--Testcase 210: +INSERT INTO tmp_time (time, c3) VALUES ('2021-12-27 03:02:56.668301', '1800-02-02 02:02:02+9'); +--Testcase 210: +INSERT INTO tmp_time (time, c1, c2, c3) VALUES ('2022-05-06 07:08:09', '07:08:09', '2022-05-06 07:08:09', '2022-05-06 07:08:09+9'); +--Testcase 211: +-- 1800-02-02 02:02:02+9 is Daylight Saving Time (DST) changes in Japan. +-- Timezone setting Japan so it will plus 18s:59 +-- https://www.timeanddate.com/time/zone/japan/tokyo?syear=1850 +SELECT * FROM tmp_time; + time | c1 | c2 | c3 +----------------------------+----------+---------------------+------------------------------ + 1900-01-01 01:01:01 | 01:02:03 | | + 1990-01-01 01:01:01 | 07:08:09 | | + 2020-12-27 03:02:56.634467 | | 1950-02-02 02:02:02 | + 2021-12-27 03:02:56.668301 | | | 1800-02-02 02:21:01+09:18:59 + 2022-05-06 07:08:09 | 07:08:09 | 2022-05-06 07:08:09 | 2022-05-06 07:08:09+09 + 2100-01-01 01:01:01 | 04:05:06 | | +(6 rows) + -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP USER MAPPING FOR CURRENT_USER SERVER server1; --Testcase 202: DROP SERVER server1 CASCADE; -NOTICE: drop cascades to 5 other objects +NOTICE: drop cascades to 6 other objects DETAIL: drop cascades to foreign table cpu drop cascades to foreign table numbers drop cascades to foreign table t3 drop cascades to foreign table t4 drop cascades to foreign table tx +drop cascades to foreign table tmp_time --Testcase 203: DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/11.17/option.out b/expected/11.17/option.out new file mode 100644 index 0000000..59b83f6 --- /dev/null +++ b/expected/11.17/option.out @@ -0,0 +1,304 @@ +--Testcase 1: +SET datestyle=ISO; +--Testcase 2: +CREATE EXTENSION influxdb_fdw; +-- version not valid +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '9999', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +--Testcase 4: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version 'dummy', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '-1', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +-- host must be not NULL or not empty +--Testcase 6: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', port '38086', version '2', retention_policy ''); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 8: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 9: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Server Host not specified +--Testcase 10: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 11: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host '', port '38086', version '2', retention_policy ''); +--Testcase 12: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 13: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 14: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Server Host not specified +--Testcase 15: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- dbname must be not NULL or not empty +--Testcase 16: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 17: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 18: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 19: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Database not specified +--Testcase 20: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 21: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname '', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 22: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 23: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 24: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Database not specified +--Testcase 25: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- retention_policy can be NULL +--Testcase 26: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2'); +--Testcase 27: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 28: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 29: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 30: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 31: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 32: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 33: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 34: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 35: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- auth_token can be NULL +--Testcase 36: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 37: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 38: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 39: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: unauthorized access +--Testcase 40: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- auth_token invalid +--Testcase 41: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 42: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'wrong_token'); +--Testcase 43: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 44: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: Unauthorized +--Testcase 45: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 46: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 47: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token ''); +--Testcase 48: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 49: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: unauthorized access +--Testcase 50: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- user must can be NULL +--Testcase 51: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 52: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (password 'pass'); +--Testcase 53: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 54: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 55: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 56: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 57: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password 'pass'); +--Testcase 58: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 59: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 60: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- password can be NULL +--Testcase 61: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 62: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user'); +--Testcase 63: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 65: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: authorization failed +--Testcase 65: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 66: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 67: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password ''); +--Testcase 68: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 69: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: authorization failed +--Testcase 70: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 71: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 72: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password ''); +--Testcase 73: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 74: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 75: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 76: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 77: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 78: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 79: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 1 | 100 + a | version 1 | 200 + a | version 1 | 300 + b | version 1 | 400 + b | version 1 | 500 +(5 rows) + +--Testcase 80: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- Test if version option is not set +-- Connect to InfluxDB version 1 +--Testcase 81: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086'); +--Testcase 82: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 83: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 84: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 1 | 100 + a | version 1 | 200 + a | version 1 | 300 + b | version 1 | 400 + b | version 1 | 500 +(5 rows) + +--Testcase 85: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- Connect to InfluxDB version 2 +--Testcase 86: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', retention_policy ''); +--Testcase 87: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 88: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 89: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 90: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 91: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/11.13/schemaless/add_fields.out b/expected/11.17/schemaless/add_fields.out similarity index 99% rename from expected/11.13/schemaless/add_fields.out rename to expected/11.17/schemaless/add_fields.out index 7db1321..e0edb34 100644 --- a/expected/11.13/schemaless/add_fields.out +++ b/expected/11.17/schemaless/add_fields.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data -\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null +:INIT_FIELDS_ORIGINAL; --Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); --Testcase 5: @@ -112,7 +112,7 @@ SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), l -------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_1; --Testcase 13: DROP FOREIGN TABLE sctbl1; --Testcase 14: @@ -656,7 +656,7 @@ SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fiel -------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_20; --Testcase 64: DROP FOREIGN TABLE sctbl1; --Testcase 65: diff --git a/expected/11.13/schemaless/add_multi_key.out b/expected/11.17/schemaless/add_multi_key.out similarity index 99% rename from expected/11.13/schemaless/add_multi_key.out rename to expected/11.17/schemaless/add_multi_key.out index a8ed10c..e93572b 100644 --- a/expected/11.13/schemaless/add_multi_key.out +++ b/expected/11.17/schemaless/add_multi_key.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data original -\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null +:INIT_MULTILEY_ORIGINAL; -- Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -------------------------------------------------TC for before update test data------------------ @@ -1102,7 +1102,7 @@ SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3 ---------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1'); @@ -1844,7 +1844,7 @@ SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint -- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1, t2, t3, t4, t5'); diff --git a/expected/10.18/schemaless/add_tags.out b/expected/11.17/schemaless/add_tags.out similarity index 99% rename from expected/10.18/schemaless/add_tags.out rename to expected/11.17/schemaless/add_tags.out index 235b70d..501783e 100644 --- a/expected/10.18/schemaless/add_tags.out +++ b/expected/11.17/schemaless/add_tags.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data original -\! influx -import -path=init/tag_original.txt -precision=s > /dev/null +:INIT_TAG_ORIGINAL; -- Before update data -- Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); --Testcase 5: @@ -76,7 +76,7 @@ select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::big --------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_1; --Testcase 12: DROP FOREIGN TABLE sctbl4; --Testcase 13: @@ -368,7 +368,7 @@ select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (se --------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_20; --Testcase 41: DROP FOREIGN TABLE sctbl4; --Testcase 42: diff --git a/expected/12.8/schemaless/aggregate.out b/expected/11.17/schemaless/aggregate.out similarity index 99% rename from expected/12.8/schemaless/aggregate.out rename to expected/11.17/schemaless/aggregate.out index c6c4dbc..54d94a5 100644 --- a/expected/12.8/schemaless/aggregate.out +++ b/expected/11.17/schemaless/aggregate.out @@ -10,9 +10,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); diff --git a/expected/11.13/schemaless/extra/aggregates.out b/expected/11.17/schemaless/extra/aggregates.out similarity index 99% rename from expected/11.13/schemaless/extra/aggregates.out rename to expected/11.17/schemaless/extra/aggregates.out index 9e31135..89c0b81 100644 --- a/expected/11.13/schemaless/extra/aggregates.out +++ b/expected/11.17/schemaless/extra/aggregates.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); --Testcase 5: diff --git a/expected/11.13/schemaless/extra/influxdb_fdw_post.out b/expected/11.17/schemaless/extra/influxdb_fdw_post.out similarity index 99% rename from expected/11.13/schemaless/extra/influxdb_fdw_post.out rename to expected/11.17/schemaless/extra/influxdb_fdw_post.out index 51c1951..f3bc226 100644 --- a/expected/11.13/schemaless/extra/influxdb_fdw_post.out +++ b/expected/11.17/schemaless/extra/influxdb_fdw_post.out @@ -8,16 +8,16 @@ CREATE EXTENSION influxdb_fdw; CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server -- =================================================================== @@ -1221,6 +1221,30 @@ SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} (1 row) +-- This test case drop configuration when execute non-schemaless before +DROP TEXT SEARCH CONFIGURATION IF EXISTS public.custom_search; +NOTICE: text search configuration "public.custom_search" does not exist, skipping +-- check schema-qualification of regconfig constant +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: ((fields ->> 'C 1'::text))::integer, to_tsvector('custom_search'::regconfig, (tags ->> 'c3'::text)) + Filter: (length(to_tsvector('custom_search'::regconfig, (ft1.tags ->> 'c3'::text))) > 0) + InfluxDB query: SELECT "C 1", "c3" FROM "T1" WHERE (("C 1" = 642)) +(4 rows) + +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + c1 | to_tsvector +-----+------------- + 642 | '00642':1 +(1 row) + -- =================================================================== -- JOIN queries -- =================================================================== @@ -3082,7 +3106,7 @@ DROP FOREIGN TABLE local_tbl_nsc; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; --Testcase 185: diff --git a/expected/10.18/schemaless/extra/insert.out b/expected/11.17/schemaless/extra/insert.out similarity index 99% rename from expected/10.18/schemaless/extra/insert.out rename to expected/11.17/schemaless/extra/insert.out index 1cf50ac..4465358 100644 --- a/expected/10.18/schemaless/extra/insert.out +++ b/expected/11.17/schemaless/extra/insert.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list -- diff --git a/expected/11.13/schemaless/extra/join.out b/expected/11.17/schemaless/extra/join.out similarity index 99% rename from expected/11.13/schemaless/extra/join.out rename to expected/11.17/schemaless/extra/join.out index 20386de..27d655b 100644 --- a/expected/11.13/schemaless/extra/join.out +++ b/expected/11.17/schemaless/extra/join.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- @@ -2433,6 +2433,14 @@ ERROR: column t1.x does not exist LINE 1: select t1.x from (select (fields->>'a')::int a, (fields->>'b... ^ HINT: Perhaps you meant to reference the column "t3.x". +-- Test matching of locking clause with wrong alias +select t1.*, t2.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int), t3 as unnamed_join + for update of unnamed_join; + a | b | a | b | fields | time +---+---+---+---+--------+------ +(0 rows) + -- -- regression test for 8.1 merge right join bug -- @@ -6456,6 +6464,9 @@ select * from 3 | 3 (6 rows) +-- check the number of columns specified +SELECT * FROM ((SELECT fields->>'q1', fields->>'q2' FROM int8_tbl) i cross join (SELECT fields->>'f1' FROM int4_tbl) j) ss(a,b,c,d); +ERROR: join expression "ss" has 3 columns available but 4 columns specified -- check we don't try to do a unique-ified semijoin with LATERAL --Testcase 471: explain (verbose, costs off) diff --git a/expected/11.13/schemaless/extra/limit.out b/expected/11.17/schemaless/extra/limit.out similarity index 99% rename from expected/11.13/schemaless/extra/limit.out rename to expected/11.17/schemaless/extra/limit.out index 4cb9ad0..0fe9859 100644 --- a/expected/11.13/schemaless/extra/limit.out +++ b/expected/11.17/schemaless/extra/limit.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- diff --git a/expected/12.8/schemaless/extra/prepare.out b/expected/11.17/schemaless/extra/prepare.out similarity index 99% rename from expected/12.8/schemaless/extra/prepare.out rename to expected/11.17/schemaless/extra/prepare.out index e2ab018..13104ac 100644 --- a/expected/12.8/schemaless/extra/prepare.out +++ b/expected/11.17/schemaless/extra/prepare.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 30: CREATE FOREIGN TABLE tenk1 ( fields jsonb OPTIONS (fields 'true') diff --git a/expected/13.4/schemaless/extra/select.out b/expected/11.17/schemaless/extra/select.out similarity index 99% rename from expected/13.4/schemaless/extra/select.out rename to expected/11.17/schemaless/extra/select.out index 522c26f..84f52d3 100644 --- a/expected/13.4/schemaless/extra/select.out +++ b/expected/11.17/schemaless/extra/select.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( fields jsonb OPTIONS (fields 'true') diff --git a/expected/12.8/schemaless/extra/select_having.out b/expected/11.17/schemaless/extra/select_having.out similarity index 97% rename from expected/12.8/schemaless/extra/select_having.out rename to expected/11.17/schemaless/extra/select_having.out index 93cefbd..b88def8 100644 --- a/expected/12.8/schemaless/extra/select_having.out +++ b/expected/11.17/schemaless/extra/select_having.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); CREATE FOREIGN TABLE test_having_nsc (a int, b int, c char(8), d char) SERVER influxdb_svr OPTIONS (table 'test_having'); diff --git a/expected/11.13/schemaless/influxdb_fdw.out b/expected/11.17/schemaless/influxdb_fdw.out similarity index 99% rename from expected/11.13/schemaless/influxdb_fdw.out rename to expected/11.17/schemaless/influxdb_fdw.out index 8398ea3..f4d4140 100644 --- a/expected/11.13/schemaless/influxdb_fdw.out +++ b/expected/11.17/schemaless/influxdb_fdw.out @@ -10,9 +10,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --Testcase 6: @@ -1130,14 +1130,14 @@ SELECT * FROM t5; SELECT * FROM public.influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Testcase 146: SELECT influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Test pushdown LIMIT...OFFSET @@ -1595,7 +1595,9 @@ SELECT * FROM cpu; (5 rows) -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP FOREIGN TABLE cpu_nsc; DROP USER MAPPING FOR CURRENT_USER SERVER server1; diff --git a/expected/11.13/schemaless/schemaless.out b/expected/11.17/schemaless/schemaless.out similarity index 99% rename from expected/11.13/schemaless/schemaless.out rename to expected/11.17/schemaless/schemaless.out index c57de18..88cd4f7 100644 --- a/expected/11.13/schemaless/schemaless.out +++ b/expected/11.17/schemaless/schemaless.out @@ -10,9 +10,9 @@ NOTICE: extension "influxdb_fdw" does not exist, skipping --Testcase 4: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 5: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- create foreign table --Testcase 7: CREATE FOREIGN TABLE sc1(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc1', tags 'device_id', schemaless 'true'); diff --git a/expected/11.13/schemaless/selectfunc.out b/expected/11.17/schemaless/selectfunc.out similarity index 99% rename from expected/11.13/schemaless/selectfunc.out rename to expected/11.17/schemaless/selectfunc.out index ade33ad..68d0dcc 100644 --- a/expected/11.13/schemaless/selectfunc.out +++ b/expected/11.17/schemaless/selectfunc.out @@ -7,9 +7,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: CREATE FOREIGN TABLE s3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 's3', tags 'tag1', schemaless 'true'); diff --git a/expected/11.13/selectfunc.out b/expected/11.17/selectfunc.out similarity index 99% rename from expected/11.13/selectfunc.out rename to expected/11.17/selectfunc.out index 6357836..d0147ad 100644 --- a/expected/11.13/selectfunc.out +++ b/expected/11.17/selectfunc.out @@ -7,9 +7,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: CREATE FOREIGN TABLE s3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 float8, value4 bigint) SERVER server1 OPTIONS(table 's3', tags 'tag1'); diff --git a/expected/12.8/aggregate.out b/expected/12.12/aggregate.out similarity index 99% rename from expected/12.8/aggregate.out rename to expected/12.12/aggregate.out index 5639a88..36b0eca 100644 --- a/expected/12.8/aggregate.out +++ b/expected/12.12/aggregate.out @@ -10,9 +10,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); diff --git a/expected/12.8/extra/aggregates.out b/expected/12.12/extra/aggregates.out similarity index 99% rename from expected/12.8/extra/aggregates.out rename to expected/12.12/extra/aggregates.out index 785162d..dec3f37 100644 --- a/expected/12.8/extra/aggregates.out +++ b/expected/12.12/extra/aggregates.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( unique1 int4, diff --git a/expected/12.8/extra/influxdb_fdw_post.out b/expected/12.12/extra/influxdb_fdw_post.out similarity index 99% rename from expected/12.8/extra/influxdb_fdw_post.out rename to expected/12.12/extra/influxdb_fdw_post.out index 1ba109b..d8909a5 100644 --- a/expected/12.8/extra/influxdb_fdw_post.out +++ b/expected/12.12/extra/influxdb_fdw_post.out @@ -8,16 +8,16 @@ CREATE EXTENSION influxdb_fdw; CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server -- =================================================================== @@ -3079,7 +3079,7 @@ DROP FOREIGN TABLE local_tbl; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; --Testcase 185: diff --git a/expected/11.13/extra/insert.out b/expected/12.12/extra/insert.out similarity index 99% rename from expected/11.13/extra/insert.out rename to expected/12.12/extra/insert.out index d3e4053..72490a2 100644 --- a/expected/11.13/extra/insert.out +++ b/expected/12.12/extra/insert.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list -- diff --git a/expected/12.8/extra/join.out b/expected/12.12/extra/join.out similarity index 99% rename from expected/12.8/extra/join.out rename to expected/12.12/extra/join.out index 3372e71..7b22563 100644 --- a/expected/12.8/extra/join.out +++ b/expected/12.12/extra/join.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- diff --git a/expected/10.18/extra/limit.out b/expected/12.12/extra/limit.out similarity index 99% rename from expected/10.18/extra/limit.out rename to expected/12.12/extra/limit.out index 7c8ac1f..86353e2 100644 --- a/expected/10.18/extra/limit.out +++ b/expected/12.12/extra/limit.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- diff --git a/expected/10.18/extra/prepare.out b/expected/12.12/extra/prepare.out similarity index 99% rename from expected/10.18/extra/prepare.out rename to expected/12.12/extra/prepare.out index ceb03bb..c16a927 100644 --- a/expected/10.18/extra/prepare.out +++ b/expected/12.12/extra/prepare.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 30: CREATE FOREIGN TABLE tenk1 ( unique1 int4, diff --git a/expected/12.8/extra/select.out b/expected/12.12/extra/select.out similarity index 99% rename from expected/12.8/extra/select.out rename to expected/12.12/extra/select.out index eb1cd1e..63f9f7c 100644 --- a/expected/12.8/extra/select.out +++ b/expected/12.12/extra/select.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( unique1 int4, diff --git a/expected/12.8/extra/select_having.out b/expected/12.12/extra/select_having.out similarity index 96% rename from expected/12.8/extra/select_having.out rename to expected/12.12/extra/select_having.out index dc232a0..036a7d3 100644 --- a/expected/12.8/extra/select_having.out +++ b/expected/12.12/extra/select_having.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; --Testcase 5: diff --git a/expected/13.4/influxdb_fdw.out b/expected/12.12/influxdb_fdw.out similarity index 96% rename from expected/13.4/influxdb_fdw.out rename to expected/12.12/influxdb_fdw.out index ef57bad..de81a38 100644 --- a/expected/13.4/influxdb_fdw.out +++ b/expected/12.12/influxdb_fdw.out @@ -10,9 +10,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --Testcase 6: @@ -1128,14 +1128,14 @@ SELECT * FROM t5; SELECT * FROM public.influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Testcase 146: SELECT influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Test pushdown LIMIT...OFFSET @@ -1577,17 +1577,61 @@ SELECT * FROM cpu; 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t (5 rows) +-- InfluxDB_FDW will store time data for Field values as a strings +--Testcase 204: +CREATE FOREIGN TABLE tmp_time ( +time timestamp, +c1 time, +c2 timestamp, +c3 timestamp with time zone +) SERVER server1 OPTIONS (table 'tmp_time'); +--Testcase 205: +SELECT * FROM tmp_time; + time | c1 | c2 | c3 +------+----+----+---- +(0 rows) + +--Testcase 206: +INSERT INTO tmp_time (time, c1) VALUES ('1900-01-01 01:01:01', '01:02:03'); +--Testcase 207: +INSERT INTO tmp_time (time, c1) VALUES ('2100-01-01 01:01:01', '04:05:06'); +--Testcase 208: +INSERT INTO tmp_time (time, c1) VALUES ('1990-01-01 01:01:01', '07:08:09'); +--Testcase 209: +INSERT INTO tmp_time (time, c2) VALUES ('2020-12-27 03:02:56.634467', '1950-02-02 02:02:02'); +--Testcase 210: +INSERT INTO tmp_time (time, c3) VALUES ('2021-12-27 03:02:56.668301', '1800-02-02 02:02:02+9'); +--Testcase 210: +INSERT INTO tmp_time (time, c1, c2, c3) VALUES ('2022-05-06 07:08:09', '07:08:09', '2022-05-06 07:08:09', '2022-05-06 07:08:09+9'); +--Testcase 211: +-- 1800-02-02 02:02:02+9 is Daylight Saving Time (DST) changes in Japan. +-- Timezone setting Japan so it will plus 18s:59 +-- https://www.timeanddate.com/time/zone/japan/tokyo?syear=1850 +SELECT * FROM tmp_time; + time | c1 | c2 | c3 +----------------------------+----------+---------------------+------------------------------ + 1900-01-01 01:01:01 | 01:02:03 | | + 1990-01-01 01:01:01 | 07:08:09 | | + 2020-12-27 03:02:56.634467 | | 1950-02-02 02:02:02 | + 2021-12-27 03:02:56.668301 | | | 1800-02-02 02:21:01+09:18:59 + 2022-05-06 07:08:09 | 07:08:09 | 2022-05-06 07:08:09 | 2022-05-06 07:08:09+09 + 2100-01-01 01:01:01 | 04:05:06 | | +(6 rows) + -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP USER MAPPING FOR CURRENT_USER SERVER server1; --Testcase 202: DROP SERVER server1 CASCADE; -NOTICE: drop cascades to 5 other objects +NOTICE: drop cascades to 6 other objects DETAIL: drop cascades to foreign table cpu drop cascades to foreign table numbers drop cascades to foreign table t3 drop cascades to foreign table t4 drop cascades to foreign table tx +drop cascades to foreign table tmp_time --Testcase 203: DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/12.12/option.out b/expected/12.12/option.out new file mode 100644 index 0000000..59b83f6 --- /dev/null +++ b/expected/12.12/option.out @@ -0,0 +1,304 @@ +--Testcase 1: +SET datestyle=ISO; +--Testcase 2: +CREATE EXTENSION influxdb_fdw; +-- version not valid +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '9999', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +--Testcase 4: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version 'dummy', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '-1', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +-- host must be not NULL or not empty +--Testcase 6: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', port '38086', version '2', retention_policy ''); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 8: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 9: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Server Host not specified +--Testcase 10: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 11: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host '', port '38086', version '2', retention_policy ''); +--Testcase 12: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 13: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 14: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Server Host not specified +--Testcase 15: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- dbname must be not NULL or not empty +--Testcase 16: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 17: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 18: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 19: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Database not specified +--Testcase 20: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 21: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname '', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 22: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 23: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 24: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Database not specified +--Testcase 25: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- retention_policy can be NULL +--Testcase 26: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2'); +--Testcase 27: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 28: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 29: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 30: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 31: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 32: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 33: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 34: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 35: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- auth_token can be NULL +--Testcase 36: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 37: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 38: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 39: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: unauthorized access +--Testcase 40: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- auth_token invalid +--Testcase 41: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 42: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'wrong_token'); +--Testcase 43: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 44: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: Unauthorized +--Testcase 45: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 46: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 47: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token ''); +--Testcase 48: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 49: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: unauthorized access +--Testcase 50: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- user must can be NULL +--Testcase 51: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 52: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (password 'pass'); +--Testcase 53: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 54: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 55: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 56: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 57: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password 'pass'); +--Testcase 58: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 59: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 60: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- password can be NULL +--Testcase 61: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 62: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user'); +--Testcase 63: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 65: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: authorization failed +--Testcase 65: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 66: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 67: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password ''); +--Testcase 68: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 69: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: authorization failed +--Testcase 70: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 71: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 72: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password ''); +--Testcase 73: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 74: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 75: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 76: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 77: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 78: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 79: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 1 | 100 + a | version 1 | 200 + a | version 1 | 300 + b | version 1 | 400 + b | version 1 | 500 +(5 rows) + +--Testcase 80: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- Test if version option is not set +-- Connect to InfluxDB version 1 +--Testcase 81: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086'); +--Testcase 82: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 83: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 84: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 1 | 100 + a | version 1 | 200 + a | version 1 | 300 + b | version 1 | 400 + b | version 1 | 500 +(5 rows) + +--Testcase 85: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- Connect to InfluxDB version 2 +--Testcase 86: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', retention_policy ''); +--Testcase 87: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 88: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 89: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 90: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 91: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/13.4/schemaless/add_fields.out b/expected/12.12/schemaless/add_fields.out similarity index 99% rename from expected/13.4/schemaless/add_fields.out rename to expected/12.12/schemaless/add_fields.out index ea2577e..8f9d86b 100644 --- a/expected/13.4/schemaless/add_fields.out +++ b/expected/12.12/schemaless/add_fields.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data -\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null +:INIT_FIELDS_ORIGINAL; --Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); --Testcase 5: @@ -112,7 +112,7 @@ SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), l -------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_1; --Testcase 13: DROP FOREIGN TABLE sctbl1; --Testcase 14: @@ -659,7 +659,7 @@ SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fiel -------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_20; --Testcase 64: DROP FOREIGN TABLE sctbl1; --Testcase 65: diff --git a/expected/13.4/schemaless/add_multi_key.out b/expected/12.12/schemaless/add_multi_key.out similarity index 99% rename from expected/13.4/schemaless/add_multi_key.out rename to expected/12.12/schemaless/add_multi_key.out index 87ac8da..39e6506 100644 --- a/expected/13.4/schemaless/add_multi_key.out +++ b/expected/12.12/schemaless/add_multi_key.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data original -\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null +:INIT_MULTILEY_ORIGINAL; -- Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -------------------------------------------------TC for before update test data------------------ @@ -1102,7 +1102,7 @@ SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3 ---------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1'); @@ -1844,7 +1844,7 @@ SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint -- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1, t2, t3, t4, t5'); diff --git a/expected/13.4/schemaless/add_tags.out b/expected/12.12/schemaless/add_tags.out similarity index 99% rename from expected/13.4/schemaless/add_tags.out rename to expected/12.12/schemaless/add_tags.out index 5549a77..623f02b 100644 --- a/expected/13.4/schemaless/add_tags.out +++ b/expected/12.12/schemaless/add_tags.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data original -\! influx -import -path=init/tag_original.txt -precision=s > /dev/null +:INIT_TAG_ORIGINAL; -- Before update data -- Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); --Testcase 5: @@ -76,7 +76,7 @@ select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::big --------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_1; --Testcase 12: DROP FOREIGN TABLE sctbl4; --Testcase 13: @@ -368,7 +368,7 @@ select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (se --------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_20; --Testcase 41: DROP FOREIGN TABLE sctbl4; --Testcase 42: diff --git a/expected/13.4/schemaless/aggregate.out b/expected/12.12/schemaless/aggregate.out similarity index 99% rename from expected/13.4/schemaless/aggregate.out rename to expected/12.12/schemaless/aggregate.out index c6c4dbc..54d94a5 100644 --- a/expected/13.4/schemaless/aggregate.out +++ b/expected/12.12/schemaless/aggregate.out @@ -10,9 +10,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); diff --git a/expected/12.8/schemaless/extra/aggregates.out b/expected/12.12/schemaless/extra/aggregates.out similarity index 99% rename from expected/12.8/schemaless/extra/aggregates.out rename to expected/12.12/schemaless/extra/aggregates.out index c2e477f..79c1ca6 100644 --- a/expected/12.8/schemaless/extra/aggregates.out +++ b/expected/12.12/schemaless/extra/aggregates.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); --Testcase 5: diff --git a/expected/12.8/schemaless/extra/influxdb_fdw_post.out b/expected/12.12/schemaless/extra/influxdb_fdw_post.out similarity index 99% rename from expected/12.8/schemaless/extra/influxdb_fdw_post.out rename to expected/12.12/schemaless/extra/influxdb_fdw_post.out index d134da8..5efb812 100644 --- a/expected/12.8/schemaless/extra/influxdb_fdw_post.out +++ b/expected/12.12/schemaless/extra/influxdb_fdw_post.out @@ -8,16 +8,16 @@ CREATE EXTENSION influxdb_fdw; CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server -- =================================================================== @@ -1221,6 +1221,30 @@ SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} (1 row) +-- This test case drop configuration when execute non-schemaless before +DROP TEXT SEARCH CONFIGURATION IF EXISTS public.custom_search; +NOTICE: text search configuration "public.custom_search" does not exist, skipping +-- check schema-qualification of regconfig constant +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: ((fields ->> 'C 1'::text))::integer, to_tsvector('custom_search'::regconfig, (tags ->> 'c3'::text)) + Filter: (length(to_tsvector('custom_search'::regconfig, (ft1.tags ->> 'c3'::text))) > 0) + InfluxDB query: SELECT "C 1", "c3" FROM "T1" WHERE (("C 1" = 642)) +(4 rows) + +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + c1 | to_tsvector +-----+------------- + 642 | '00642':1 +(1 row) + -- =================================================================== -- JOIN queries -- =================================================================== @@ -3117,7 +3141,7 @@ DROP FOREIGN TABLE local_tbl_nsc; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; --Testcase 185: diff --git a/expected/12.8/schemaless/extra/insert.out b/expected/12.12/schemaless/extra/insert.out similarity index 99% rename from expected/12.8/schemaless/extra/insert.out rename to expected/12.12/schemaless/extra/insert.out index 1cf50ac..4465358 100644 --- a/expected/12.8/schemaless/extra/insert.out +++ b/expected/12.12/schemaless/extra/insert.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list -- diff --git a/expected/12.8/schemaless/extra/join.out b/expected/12.12/schemaless/extra/join.out similarity index 99% rename from expected/12.8/schemaless/extra/join.out rename to expected/12.12/schemaless/extra/join.out index c5c0c7c..2a2e353 100644 --- a/expected/12.8/schemaless/extra/join.out +++ b/expected/12.12/schemaless/extra/join.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- @@ -2436,6 +2436,14 @@ ERROR: column t1.x does not exist LINE 1: select t1.x from (select (fields->>'a')::int a, (fields->>'b... ^ HINT: Perhaps you meant to reference the column "t3.x". +-- Test matching of locking clause with wrong alias +select t1.*, t2.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int), t3 as unnamed_join + for update of unnamed_join; + a | b | a | b | fields | time +---+---+---+---+--------+------ +(0 rows) + -- -- regression test for 8.1 merge right join bug -- diff --git a/expected/12.8/schemaless/extra/limit.out b/expected/12.12/schemaless/extra/limit.out similarity index 99% rename from expected/12.8/schemaless/extra/limit.out rename to expected/12.12/schemaless/extra/limit.out index 4cb9ad0..0fe9859 100644 --- a/expected/12.8/schemaless/extra/limit.out +++ b/expected/12.12/schemaless/extra/limit.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- diff --git a/expected/10.18/schemaless/extra/prepare.out b/expected/12.12/schemaless/extra/prepare.out similarity index 99% rename from expected/10.18/schemaless/extra/prepare.out rename to expected/12.12/schemaless/extra/prepare.out index e2ab018..13104ac 100644 --- a/expected/10.18/schemaless/extra/prepare.out +++ b/expected/12.12/schemaless/extra/prepare.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 30: CREATE FOREIGN TABLE tenk1 ( fields jsonb OPTIONS (fields 'true') diff --git a/expected/11.13/schemaless/extra/select.out b/expected/12.12/schemaless/extra/select.out similarity index 99% rename from expected/11.13/schemaless/extra/select.out rename to expected/12.12/schemaless/extra/select.out index 522c26f..84f52d3 100644 --- a/expected/11.13/schemaless/extra/select.out +++ b/expected/12.12/schemaless/extra/select.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( fields jsonb OPTIONS (fields 'true') diff --git a/expected/10.18/schemaless/extra/select_having.out b/expected/12.12/schemaless/extra/select_having.out similarity index 97% rename from expected/10.18/schemaless/extra/select_having.out rename to expected/12.12/schemaless/extra/select_having.out index 93cefbd..b88def8 100644 --- a/expected/10.18/schemaless/extra/select_having.out +++ b/expected/12.12/schemaless/extra/select_having.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); CREATE FOREIGN TABLE test_having_nsc (a int, b int, c char(8), d char) SERVER influxdb_svr OPTIONS (table 'test_having'); diff --git a/expected/13.4/schemaless/influxdb_fdw.out b/expected/12.12/schemaless/influxdb_fdw.out similarity index 99% rename from expected/13.4/schemaless/influxdb_fdw.out rename to expected/12.12/schemaless/influxdb_fdw.out index 1eb1c18..9776ad4 100644 --- a/expected/13.4/schemaless/influxdb_fdw.out +++ b/expected/12.12/schemaless/influxdb_fdw.out @@ -10,9 +10,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --Testcase 6: @@ -1130,14 +1130,14 @@ SELECT * FROM t5; SELECT * FROM public.influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Testcase 146: SELECT influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Test pushdown LIMIT...OFFSET @@ -1581,7 +1581,9 @@ SELECT * FROM cpu; (5 rows) -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP FOREIGN TABLE cpu_nsc; DROP USER MAPPING FOR CURRENT_USER SERVER server1; diff --git a/expected/12.8/schemaless/schemaless.out b/expected/12.12/schemaless/schemaless.out similarity index 99% rename from expected/12.8/schemaless/schemaless.out rename to expected/12.12/schemaless/schemaless.out index b2a8b2c..c84f12b 100644 --- a/expected/12.8/schemaless/schemaless.out +++ b/expected/12.12/schemaless/schemaless.out @@ -10,9 +10,9 @@ NOTICE: extension "influxdb_fdw" does not exist, skipping --Testcase 4: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 5: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- create foreign table --Testcase 7: CREATE FOREIGN TABLE sc1(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc1', tags 'device_id', schemaless 'true'); diff --git a/expected/13.4/schemaless/selectfunc.out b/expected/12.12/schemaless/selectfunc.out similarity index 99% rename from expected/13.4/schemaless/selectfunc.out rename to expected/12.12/schemaless/selectfunc.out index dbae5cb..045e7ee 100644 --- a/expected/13.4/schemaless/selectfunc.out +++ b/expected/12.12/schemaless/selectfunc.out @@ -7,9 +7,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: CREATE FOREIGN TABLE s3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 's3', tags 'tag1', schemaless 'true'); diff --git a/expected/12.8/selectfunc.out b/expected/12.12/selectfunc.out similarity index 99% rename from expected/12.8/selectfunc.out rename to expected/12.12/selectfunc.out index 290f20b..d4fa1a2 100644 --- a/expected/12.8/selectfunc.out +++ b/expected/12.12/selectfunc.out @@ -7,9 +7,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: CREATE FOREIGN TABLE s3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 float8, value4 bigint) SERVER server1 OPTIONS(table 's3', tags 'tag1'); diff --git a/expected/12.8/extra/limit.out b/expected/12.8/extra/limit.out deleted file mode 100644 index 7c8ac1f..0000000 --- a/expected/12.8/extra/limit.out +++ /dev/null @@ -1,783 +0,0 @@ -\set ECHO none ---Testcase 51: -CREATE EXTENSION influxdb_fdw; ---Testcase 52: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- import time column as timestamp and text type --- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; --- --- LIMIT --- Check the LIMIT/OFFSET feature of SELECT --- ---Testcase 54: -CREATE FOREIGN TABLE onek ( - unique1 int4, - unique2 int4, - two int4, - four int4, - ten int4, - twenty int4, - hundred int4, - thousand int4, - twothousand int4, - fivethous int4, - tenthous int4, - odd int4, - even int4, - stringu1 name, - stringu2 name, - string4 name -) SERVER influxdb_svr; ---Testcase 55: -CREATE FOREIGN TABLE int8_tbl(q1 int8, q2 int8) SERVER influxdb_svr; ---Testcase 56: -CREATE FOREIGN TABLE tenk1 ( - unique1 int4, - unique2 int4, - two int4, - four int4, - ten int4, - twenty int4, - hundred int4, - thousand int4, - twothousand int4, - fivethous int4, - tenthous int4, - odd int4, - even int4, - stringu1 name, - stringu2 name, - string4 name -) SERVER influxdb_svr OPTIONS (table 'tenk'); ---Testcase 1: -SELECT ''::text AS two, unique1, unique2, stringu1 - FROM onek WHERE unique1 > 50 - ORDER BY unique1 LIMIT 2; - two | unique1 | unique2 | stringu1 ------+---------+---------+---------- - | 51 | 76 | ZBAAAA - | 52 | 985 | ACAAAA -(2 rows) - ---Testcase 2: -SELECT ''::text AS five, unique1, unique2, stringu1 - FROM onek WHERE unique1 > 60 - ORDER BY unique1 LIMIT 5; - five | unique1 | unique2 | stringu1 -------+---------+---------+---------- - | 61 | 560 | JCAAAA - | 62 | 633 | KCAAAA - | 63 | 296 | LCAAAA - | 64 | 479 | MCAAAA - | 65 | 64 | NCAAAA -(5 rows) - ---Testcase 3: -SELECT ''::text AS two, unique1, unique2, stringu1 - FROM onek WHERE unique1 > 60 AND unique1 < 63 - ORDER BY unique1 LIMIT 5; - two | unique1 | unique2 | stringu1 ------+---------+---------+---------- - | 61 | 560 | JCAAAA - | 62 | 633 | KCAAAA -(2 rows) - ---Testcase 4: -SELECT ''::text AS three, unique1, unique2, stringu1 - FROM onek WHERE unique1 > 100 - ORDER BY unique1 LIMIT 3 OFFSET 20; - three | unique1 | unique2 | stringu1 --------+---------+---------+---------- - | 121 | 700 | REAAAA - | 122 | 519 | SEAAAA - | 123 | 777 | TEAAAA -(3 rows) - ---Testcase 5: -SELECT ''::text AS zero, unique1, unique2, stringu1 - FROM onek WHERE unique1 < 50 - ORDER BY unique1 DESC LIMIT 8 OFFSET 99; - zero | unique1 | unique2 | stringu1 -------+---------+---------+---------- -(0 rows) - ---Testcase 6: -SELECT ''::text AS eleven, unique1, unique2, stringu1 - FROM onek WHERE unique1 < 50 - ORDER BY unique1 DESC LIMIT 20 OFFSET 39; - eleven | unique1 | unique2 | stringu1 ---------+---------+---------+---------- - | 10 | 520 | KAAAAA - | 9 | 49 | JAAAAA - | 8 | 653 | IAAAAA - | 7 | 647 | HAAAAA - | 6 | 978 | GAAAAA - | 5 | 541 | FAAAAA - | 4 | 833 | EAAAAA - | 3 | 431 | DAAAAA - | 2 | 326 | CAAAAA - | 1 | 214 | BAAAAA - | 0 | 998 | AAAAAA -(11 rows) - ---Testcase 7: -SELECT ''::text AS ten, unique1, unique2, stringu1 - FROM onek - ORDER BY unique1 OFFSET 990; - ten | unique1 | unique2 | stringu1 ------+---------+---------+---------- - | 990 | 369 | CMAAAA - | 991 | 426 | DMAAAA - | 992 | 363 | EMAAAA - | 993 | 661 | FMAAAA - | 994 | 695 | GMAAAA - | 995 | 144 | HMAAAA - | 996 | 258 | IMAAAA - | 997 | 21 | JMAAAA - | 998 | 549 | KMAAAA - | 999 | 152 | LMAAAA -(10 rows) - ---Testcase 8: -SELECT ''::text AS five, unique1, unique2, stringu1 - FROM onek - ORDER BY unique1 OFFSET 990 LIMIT 5; - five | unique1 | unique2 | stringu1 -------+---------+---------+---------- - | 990 | 369 | CMAAAA - | 991 | 426 | DMAAAA - | 992 | 363 | EMAAAA - | 993 | 661 | FMAAAA - | 994 | 695 | GMAAAA -(5 rows) - ---Testcase 9: -SELECT ''::text AS five, unique1, unique2, stringu1 - FROM onek - ORDER BY unique1 LIMIT 5 OFFSET 900; - five | unique1 | unique2 | stringu1 -------+---------+---------+---------- - | 900 | 913 | QIAAAA - | 901 | 931 | RIAAAA - | 902 | 702 | SIAAAA - | 903 | 641 | TIAAAA - | 904 | 793 | UIAAAA -(5 rows) - --- Test null limit and offset. The planner would discard a simple null --- constant, so to ensure executor is exercised, do this: ---Testcase 10: -select * from int8_tbl limit (case when random() < 0.5 then null::bigint end); - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - ---Testcase 11: -select * from int8_tbl offset (case when random() < 0.5 then null::bigint end); - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - --- Test assorted cases involving backwards fetch from a LIMIT plan node -begin; -declare c1 scroll cursor for select * from int8_tbl limit 10; ---Testcase 12: -fetch all in c1; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - ---Testcase 13: -fetch 1 in c1; - q1 | q2 -----+---- -(0 rows) - ---Testcase 14: -fetch backward 1 in c1; - q1 | q2 -------------------+------------------- - 4567890123456789 | -4567890123456789 -(1 row) - ---Testcase 15: -fetch backward all in c1; - q1 | q2 -------------------+------------------ - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 123 | 4567890123456789 - 123 | 456 -(4 rows) - ---Testcase 16: -fetch backward 1 in c1; - q1 | q2 -----+---- -(0 rows) - ---Testcase 17: -fetch all in c1; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - -declare c2 scroll cursor for select * from int8_tbl limit 3; ---Testcase 18: -fetch all in c2; - q1 | q2 -------------------+------------------ - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 -(3 rows) - ---Testcase 19: -fetch 1 in c2; - q1 | q2 -----+---- -(0 rows) - ---Testcase 20: -fetch backward 1 in c2; - q1 | q2 -------------------+----- - 4567890123456789 | 123 -(1 row) - ---Testcase 21: -fetch backward all in c2; - q1 | q2 ------+------------------ - 123 | 4567890123456789 - 123 | 456 -(2 rows) - ---Testcase 22: -fetch backward 1 in c2; - q1 | q2 -----+---- -(0 rows) - ---Testcase 23: -fetch all in c2; - q1 | q2 -------------------+------------------ - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 -(3 rows) - -declare c3 scroll cursor for select * from int8_tbl offset 3; ---Testcase 24: -fetch all in c3; - q1 | q2 -------------------+------------------- - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(2 rows) - ---Testcase 25: -fetch 1 in c3; - q1 | q2 -----+---- -(0 rows) - ---Testcase 26: -fetch backward 1 in c3; - q1 | q2 -------------------+------------------- - 4567890123456789 | -4567890123456789 -(1 row) - ---Testcase 27: -fetch backward all in c3; - q1 | q2 -------------------+------------------ - 4567890123456789 | 4567890123456789 -(1 row) - ---Testcase 28: -fetch backward 1 in c3; - q1 | q2 -----+---- -(0 rows) - ---Testcase 29: -fetch all in c3; - q1 | q2 -------------------+------------------- - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(2 rows) - -declare c4 scroll cursor for select * from int8_tbl offset 10; ---Testcase 30: -fetch all in c4; - q1 | q2 -----+---- -(0 rows) - ---Testcase 31: -fetch 1 in c4; - q1 | q2 -----+---- -(0 rows) - ---Testcase 32: -fetch backward 1 in c4; - q1 | q2 -----+---- -(0 rows) - ---Testcase 33: -fetch backward all in c4; - q1 | q2 -----+---- -(0 rows) - ---Testcase 34: -fetch backward 1 in c4; - q1 | q2 -----+---- -(0 rows) - ---Testcase 35: -fetch all in c4; - q1 | q2 -----+---- -(0 rows) - -declare c5 scroll cursor for select * from int8_tbl order by q1 fetch first 2 rows with ties; -ERROR: syntax error at or near "with" -LINE 1: ...ct * from int8_tbl order by q1 fetch first 2 rows with ties; - ^ ---Testcase 57: -fetch all in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 58: -fetch 1 in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 59: -fetch backward 1 in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 60: -fetch backward 1 in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 61: -fetch all in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 62: -fetch backward all in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 63: -fetch all in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 64: -fetch backward all in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block -rollback; --- Stress test for variable LIMIT in conjunction with bounded-heap sorting ---Testcase 65: -CREATE FOREIGN TABLE generate_series4(a int) SERVER influxdb_svr; ---Testcase 36: -SELECT - (SELECT a - FROM (VALUES (1)) AS x, - (SELECT a FROM generate_series4 AS n - ORDER BY a LIMIT 1 OFFSET s.a-1) AS y) AS z - FROM generate_series4 AS s; - z ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 -(10 rows) - --- --- Test behavior of volatile and set-returning functions in conjunction --- with ORDER BY and LIMIT. --- ---Testcase 66: -create temp sequence testseq; ---Testcase 37: -explain (verbose, costs off) -select unique1, unique2, nextval('testseq') - from tenk1 order by unique2 limit 10; - QUERY PLAN ------------------------------------------------------------------------------ - Limit - Output: unique1, unique2, (nextval('testseq'::regclass)) - -> Result - Output: unique1, unique2, nextval('testseq'::regclass) - -> Sort - Output: unique1, unique2 - Sort Key: tenk1.unique2 - -> Foreign Scan on public.tenk1 - Output: unique1, unique2 - InfluxDB query: SELECT "unique1", "unique2" FROM "tenk" -(10 rows) - ---Testcase 38: -select unique1, unique2, nextval('testseq') - from tenk1 order by unique2 limit 10; - unique1 | unique2 | nextval ----------+---------+--------- - 8800 | 0 | 1 - 1891 | 1 | 2 - 3420 | 2 | 3 - 9850 | 3 | 4 - 7164 | 4 | 5 - 8009 | 5 | 6 - 5057 | 6 | 7 - 6701 | 7 | 8 - 4321 | 8 | 9 - 3043 | 9 | 10 -(10 rows) - ---Testcase 39: -select currval('testseq'); - currval ---------- - 10 -(1 row) - ---Testcase 40: -explain (verbose, costs off) -select unique1, unique2, nextval('testseq') - from tenk1 order by tenthous limit 10; - QUERY PLAN ------------------------------------------------------------------------------------------ - Limit - Output: unique1, unique2, (nextval('testseq'::regclass)), tenthous - -> Result - Output: unique1, unique2, nextval('testseq'::regclass), tenthous - -> Sort - Output: unique1, unique2, tenthous - Sort Key: tenk1.tenthous - -> Foreign Scan on public.tenk1 - Output: unique1, unique2, tenthous - InfluxDB query: SELECT "unique1", "unique2", "tenthous" FROM "tenk" -(10 rows) - ---Testcase 41: -select unique1, unique2, nextval('testseq') - from tenk1 order by tenthous limit 10; - unique1 | unique2 | nextval ----------+---------+--------- - 0 | 9998 | 11 - 1 | 2838 | 12 - 2 | 2716 | 13 - 3 | 5679 | 14 - 4 | 1621 | 15 - 5 | 5557 | 16 - 6 | 2855 | 17 - 7 | 8518 | 18 - 8 | 5435 | 19 - 9 | 4463 | 20 -(10 rows) - ---Testcase 42: -select currval('testseq'); - currval ---------- - 20 -(1 row) - ---Testcase 43: -explain (verbose, costs off) -select unique1, unique2, generate_series(1,10) - from tenk1 order by unique2 limit 7; - QUERY PLAN ------------------------------------------------------------------------------ - Limit - Output: unique1, unique2, (generate_series(1, 10)) - -> ProjectSet - Output: unique1, unique2, generate_series(1, 10) - -> Sort - Output: unique1, unique2 - Sort Key: tenk1.unique2 - -> Foreign Scan on public.tenk1 - Output: unique1, unique2 - InfluxDB query: SELECT "unique1", "unique2" FROM "tenk" -(10 rows) - ---Testcase 44: -select unique1, unique2, generate_series(1,10) - from tenk1 order by unique2 limit 7; - unique1 | unique2 | generate_series ----------+---------+----------------- - 8800 | 0 | 1 - 8800 | 0 | 2 - 8800 | 0 | 3 - 8800 | 0 | 4 - 8800 | 0 | 5 - 8800 | 0 | 6 - 8800 | 0 | 7 -(7 rows) - ---Testcase 45: -explain (verbose, costs off) -select unique1, unique2, generate_series(1,10) - from tenk1 order by tenthous limit 7; - QUERY PLAN ------------------------------------------------------------------------------------------ - Limit - Output: unique1, unique2, (generate_series(1, 10)), tenthous - -> ProjectSet - Output: unique1, unique2, generate_series(1, 10), tenthous - -> Sort - Output: unique1, unique2, tenthous - Sort Key: tenk1.tenthous - -> Foreign Scan on public.tenk1 - Output: unique1, unique2, tenthous - InfluxDB query: SELECT "unique1", "unique2", "tenthous" FROM "tenk" -(10 rows) - ---Testcase 46: -select unique1, unique2, generate_series(1,10) - from tenk1 order by tenthous limit 7; - unique1 | unique2 | generate_series ----------+---------+----------------- - 0 | 9998 | 1 - 0 | 9998 | 2 - 0 | 9998 | 3 - 0 | 9998 | 4 - 0 | 9998 | 5 - 0 | 9998 | 6 - 0 | 9998 | 7 -(7 rows) - --- use of random() is to keep planner from folding the expressions together ---Testcase 47: -explain (verbose, costs off) -select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - ProjectSet - Output: generate_series(0, 2), generate_series(((random() * '0.1'::double precision))::integer, 2) - -> Result -(3 rows) - ---Testcase 48: -select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; - s1 | s2 -----+---- - 0 | 0 - 1 | 1 - 2 | 2 -(3 rows) - ---Testcase 49: -explain (verbose, costs off) -select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2 -order by s2 desc; - QUERY PLAN ------------------------------------------------------------------------------------------------------------- - Sort - Output: (generate_series(0, 2)), (generate_series(((random() * '0.1'::double precision))::integer, 2)) - Sort Key: (generate_series(((random() * '0.1'::double precision))::integer, 2)) DESC - -> ProjectSet - Output: generate_series(0, 2), generate_series(((random() * '0.1'::double precision))::integer, 2) - -> Result -(6 rows) - ---Testcase 50: -select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2 -order by s2 desc; - s1 | s2 -----+---- - 2 | 2 - 1 | 1 - 0 | 0 -(3 rows) - --- test for failure to set all aggregates' aggtranstype ---Testcase 67: -explain (verbose, costs off) -select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2 - from tenk1 group by thousand order by thousand limit 3; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Limit - Output: (sum(tenthous)), ((((sum(tenthous)))::double precision + (random() * '0'::double precision))), thousand - -> Result - Output: (sum(tenthous)), (((sum(tenthous)))::double precision + (random() * '0'::double precision)), thousand - -> Sort - Output: (sum(tenthous)), thousand - Sort Key: tenk1.thousand - -> HashAggregate - Output: sum(tenthous), thousand - Group Key: tenk1.thousand - -> Foreign Scan on public.tenk1 - Output: unique1, unique2, two, four, ten, twenty, hundred, thousand, twothousand, fivethous, tenthous, odd, even, stringu1, stringu2, string4 - InfluxDB query: SELECT "thousand", "tenthous" FROM "tenk" -(13 rows) - ---Testcase 68: -select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2 - from tenk1 group by thousand order by thousand limit 3; - s1 | s2 --------+------- - 45000 | 45000 - 45010 | 45010 - 45020 | 45020 -(3 rows) - --- --- FETCH FIRST --- Check the WITH TIES clause --- ---Testcase 69: -SELECT thousand - FROM onek WHERE thousand < 5 - ORDER BY thousand FETCH FIRST 2 ROW WITH TIES; -ERROR: syntax error at or near "WITH" -LINE 3: ORDER BY thousand FETCH FIRST 2 ROW WITH TIES; - ^ ---Testcase 70: -SELECT thousand - FROM onek WHERE thousand < 5 - ORDER BY thousand FETCH FIRST ROWS WITH TIES; -ERROR: syntax error at or near "WITH" -LINE 3: ORDER BY thousand FETCH FIRST ROWS WITH TIES; - ^ ---Testcase 71: -SELECT thousand - FROM onek WHERE thousand < 5 - ORDER BY thousand FETCH FIRST 1 ROW WITH TIES; -ERROR: syntax error at or near "WITH" -LINE 3: ORDER BY thousand FETCH FIRST 1 ROW WITH TIES; - ^ ---Testcase 72: -SELECT thousand - FROM onek WHERE thousand < 5 - ORDER BY thousand FETCH FIRST 2 ROW ONLY; - thousand ----------- - 0 - 0 -(2 rows) - --- should fail ---Testcase 73: -SELECT ''::text AS two, unique1, unique2, stringu1 - FROM onek WHERE unique1 > 50 - FETCH FIRST 2 ROW WITH TIES; -ERROR: syntax error at or near "WITH" -LINE 3: FETCH FIRST 2 ROW WITH TIES; - ^ --- test ruleutils ---Testcase 74: -CREATE VIEW limit_thousand_v_1 AS SELECT thousand FROM onek WHERE thousand < 995 - ORDER BY thousand FETCH FIRST 5 ROWS WITH TIES OFFSET 10; -ERROR: syntax error at or near "WITH" -LINE 2: ORDER BY thousand FETCH FIRST 5 ROWS WITH TIES OFFSET 10; - ^ ---Testcase 75: -\d+ limit_thousand_v_1 ---Testcase 76: -CREATE VIEW limit_thousand_v_2 AS SELECT thousand FROM onek WHERE thousand < 995 - ORDER BY thousand OFFSET 10 FETCH FIRST 5 ROWS ONLY; ---Testcase 77: -\d+ limit_thousand_v_2 - View "public.limit_thousand_v_2" - Column | Type | Collation | Nullable | Default | Storage | Description -----------+---------+-----------+----------+---------+---------+------------- - thousand | integer | | | | plain | -View definition: - SELECT onek.thousand - FROM onek - WHERE onek.thousand < 995 - ORDER BY onek.thousand - OFFSET 10 - LIMIT 5; - ---Testcase 78: -CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995 - ORDER BY thousand FETCH FIRST NULL ROWS WITH TIES; -- fails -ERROR: syntax error at or near "WITH" -LINE 2: ORDER BY thousand FETCH FIRST NULL ROWS WITH TIES; - ^ ---Testcase 79: -CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995 - ORDER BY thousand FETCH FIRST (NULL+1) ROWS WITH TIES; -ERROR: syntax error at or near "WITH" -LINE 2: ORDER BY thousand FETCH FIRST (NULL+1) ROWS WITH TIES; - ^ ---Testcase 80: -\d+ limit_thousand_v_3 ---Testcase 81: -CREATE VIEW limit_thousand_v_4 AS SELECT thousand FROM onek WHERE thousand < 995 - ORDER BY thousand FETCH FIRST NULL ROWS ONLY; ---Testcase 82: -\d+ limit_thousand_v_4 - View "public.limit_thousand_v_4" - Column | Type | Collation | Nullable | Default | Storage | Description -----------+---------+-----------+----------+---------+---------+------------- - thousand | integer | | | | plain | -View definition: - SELECT onek.thousand - FROM onek - WHERE onek.thousand < 995 - ORDER BY onek.thousand - LIMIT ALL; - --- leave these views ---Testcase 83: -DROP VIEW limit_thousand_v_1; -ERROR: view "limit_thousand_v_1" does not exist ---Testcase 84: -DROP VIEW limit_thousand_v_2; ---Testcase 85: -DROP VIEW limit_thousand_v_3; -ERROR: view "limit_thousand_v_3" does not exist ---Testcase 86: -DROP VIEW limit_thousand_v_4; --- Clean up -DO $d$ -declare - l_rec record; -begin - for l_rec in (select foreign_table_schema, foreign_table_name - from information_schema.foreign_tables) loop - execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); - end loop; -end; -$d$; ---Testcase 87: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 88: -DROP SERVER influxdb_svr CASCADE; ---Testcase 89: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/11.13/aggregate.out b/expected/13.8/aggregate.out similarity index 99% rename from expected/11.13/aggregate.out rename to expected/13.8/aggregate.out index 5639a88..36b0eca 100644 --- a/expected/11.13/aggregate.out +++ b/expected/13.8/aggregate.out @@ -10,9 +10,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); diff --git a/expected/13.4/extra/aggregates.out b/expected/13.8/extra/aggregates.out similarity index 99% rename from expected/13.4/extra/aggregates.out rename to expected/13.8/extra/aggregates.out index 7106240..4c012f3 100644 --- a/expected/13.4/extra/aggregates.out +++ b/expected/13.8/extra/aggregates.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( unique1 int4, diff --git a/expected/13.4/extra/influxdb_fdw_post.out b/expected/13.8/extra/influxdb_fdw_post.out similarity index 99% rename from expected/13.4/extra/influxdb_fdw_post.out rename to expected/13.8/extra/influxdb_fdw_post.out index 4314d89..885769b 100644 --- a/expected/13.4/extra/influxdb_fdw_post.out +++ b/expected/13.8/extra/influxdb_fdw_post.out @@ -8,16 +8,16 @@ CREATE EXTENSION influxdb_fdw; CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server -- =================================================================== @@ -3081,7 +3081,7 @@ DROP FOREIGN TABLE local_tbl; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; --Testcase 185: diff --git a/expected/13.4/extra/insert.out b/expected/13.8/extra/insert.out similarity index 99% rename from expected/13.4/extra/insert.out rename to expected/13.8/extra/insert.out index d3e4053..72490a2 100644 --- a/expected/13.4/extra/insert.out +++ b/expected/13.8/extra/insert.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list -- diff --git a/expected/13.4/extra/join.out b/expected/13.8/extra/join.out similarity index 99% rename from expected/13.4/extra/join.out rename to expected/13.8/extra/join.out index 253cf6e..9259d13 100644 --- a/expected/13.4/extra/join.out +++ b/expected/13.8/extra/join.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- diff --git a/expected/13.4/extra/limit.out b/expected/13.8/extra/limit.out similarity index 99% rename from expected/13.4/extra/limit.out rename to expected/13.8/extra/limit.out index ad4c7dc..ad9a78a 100644 --- a/expected/13.4/extra/limit.out +++ b/expected/13.8/extra/limit.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- diff --git a/expected/14.0/extra/prepare.out b/expected/13.8/extra/prepare.out similarity index 99% rename from expected/14.0/extra/prepare.out rename to expected/13.8/extra/prepare.out index 75ef1bb..652b5ba 100644 --- a/expected/14.0/extra/prepare.out +++ b/expected/13.8/extra/prepare.out @@ -2,14 +2,14 @@ -- of the pg_prepared_statements view as prepared statements are -- created and removed. \set ECHO none ---Testcase 1: +--Testcase 27: CREATE EXTENSION influxdb_fdw; ---Testcase 2: +--Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 4: + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 29: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 30: CREATE FOREIGN TABLE tenk1 ( unique1 int4, unique2 int4, @@ -30,29 +30,29 @@ CREATE FOREIGN TABLE tenk1 ( ) SERVER influxdb_svr OPTIONS (table 'tenk'); -- Does not support this command -- ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 5: +--Testcase 31: CREATE FOREIGN TABLE road ( name text, thepath path ) SERVER influxdb_svr; ---Testcase 6: +--Testcase 32: CREATE FOREIGN TABLE road_tmp (a int, b int) SERVER influxdb_svr; ---Testcase 7: +--Testcase 1: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) ---Testcase 8: +--Testcase 2: PREPARE q1 AS SELECT a AS a FROM road_tmp; ---Testcase 9: +--Testcase 3: EXECUTE q1; a --- 1 (1 row) ---Testcase 10: +--Testcase 4: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------+----------------- @@ -60,23 +60,23 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; (1 row) -- should fail ---Testcase 11: +--Testcase 5: PREPARE q1 AS SELECT b FROM road_tmp; ERROR: prepared statement "q1" already exists -- should succeed DEALLOCATE q1; ---Testcase 12: +--Testcase 6: PREPARE q1 AS SELECT b FROM road_tmp; ---Testcase 13: +--Testcase 7: EXECUTE q1; b --- 2 (1 row) ---Testcase 14: +--Testcase 8: PREPARE q2 AS SELECT b AS b FROM road_tmp; ---Testcase 15: +--Testcase 9: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------+----------------- @@ -86,7 +86,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; -- sql92 syntax DEALLOCATE PREPARE q1; ---Testcase 16: +--Testcase 10: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------+----------------- @@ -95,30 +95,30 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; DEALLOCATE PREPARE q2; -- the view should return the empty set again ---Testcase 17: +--Testcase 11: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) -- parameterized queries ---Testcase 18: +--Testcase 12: PREPARE q2(text) AS SELECT datname, datistemplate, datallowconn FROM pg_database WHERE datname = $1; ---Testcase 19: +--Testcase 13: EXECUTE q2('postgres'); datname | datistemplate | datallowconn ----------+---------------+-------------- postgres | f | t (1 row) ---Testcase 20: +--Testcase 14: PREPARE q3(text, int, float, boolean, smallint) AS SELECT * FROM tenk1 WHERE string4 = $1 AND (four = $2 OR ten = $3::bigint OR true = $4 OR odd = $5::int) ORDER BY unique1; ---Testcase 21: +--Testcase 15: EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- @@ -154,36 +154,36 @@ EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); (29 rows) -- too few params ---Testcase 22: +--Testcase 16: EXECUTE q3('bool'); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 1. -- too many params ---Testcase 23: +--Testcase 17: EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 6. -- wrong param types ---Testcase 24: +--Testcase 18: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); ERROR: parameter $3 of type boolean cannot be coerced to the expected type double precision LINE 1: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'byte... ^ HINT: You will need to rewrite or cast the expression. -- invalid type ---Testcase 25: +--Testcase 19: PREPARE q4(nonexistenttype) AS SELECT $1; ERROR: type "nonexistenttype" does not exist LINE 1: PREPARE q4(nonexistenttype) AS SELECT $1; ^ -- create table as execute ---Testcase 26: +--Testcase 20: PREPARE q5(int, text) AS SELECT * FROM tenk1 WHERE unique1 = $1 OR stringu1 = $2 ORDER BY unique1; ---Testcase 27: +--Testcase 33: CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); ---Testcase 28: +--Testcase 21: SELECT * FROM q5_prep_results; unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- @@ -205,23 +205,23 @@ SELECT * FROM q5_prep_results; 9961 | 2058 | 1 | 1 | 1 | 1 | 61 | 961 | 1961 | 4961 | 9961 | 122 | 123 | DTAAAA | EBDAAA | OOOOxx (16 rows) ---Testcase 29: +--Testcase 34: CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') WITH NO DATA; ---Testcase 30: +--Testcase 22: SELECT * FROM q5_prep_nodata; unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- (0 rows) -- unknown or unspecified parameter types: should succeed ---Testcase 31: +--Testcase 23: PREPARE q6 AS SELECT * FROM tenk1 WHERE unique1 = $1 AND stringu1 = $2; ---Testcase 32: +--Testcase 24: PREPARE q7(unknown) AS SELECT * FROM road WHERE thepath = $1; ---Testcase 33: +--Testcase 25: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types @@ -244,7 +244,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements -- test DEALLOCATE ALL; DEALLOCATE ALL; ---Testcase 34: +--Testcase 26: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types diff --git a/expected/13.4/extra/select.out b/expected/13.8/extra/select.out similarity index 99% rename from expected/13.4/extra/select.out rename to expected/13.8/extra/select.out index eb1cd1e..63f9f7c 100644 --- a/expected/13.4/extra/select.out +++ b/expected/13.8/extra/select.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( unique1 int4, diff --git a/expected/11.13/extra/select_having.out b/expected/13.8/extra/select_having.out similarity index 96% rename from expected/11.13/extra/select_having.out rename to expected/13.8/extra/select_having.out index dc232a0..036a7d3 100644 --- a/expected/11.13/extra/select_having.out +++ b/expected/13.8/extra/select_having.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; --Testcase 5: diff --git a/expected/12.8/influxdb_fdw.out b/expected/13.8/influxdb_fdw.out similarity index 96% rename from expected/12.8/influxdb_fdw.out rename to expected/13.8/influxdb_fdw.out index ef57bad..de81a38 100644 --- a/expected/12.8/influxdb_fdw.out +++ b/expected/13.8/influxdb_fdw.out @@ -10,9 +10,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --Testcase 6: @@ -1128,14 +1128,14 @@ SELECT * FROM t5; SELECT * FROM public.influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Testcase 146: SELECT influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Test pushdown LIMIT...OFFSET @@ -1577,17 +1577,61 @@ SELECT * FROM cpu; 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t (5 rows) +-- InfluxDB_FDW will store time data for Field values as a strings +--Testcase 204: +CREATE FOREIGN TABLE tmp_time ( +time timestamp, +c1 time, +c2 timestamp, +c3 timestamp with time zone +) SERVER server1 OPTIONS (table 'tmp_time'); +--Testcase 205: +SELECT * FROM tmp_time; + time | c1 | c2 | c3 +------+----+----+---- +(0 rows) + +--Testcase 206: +INSERT INTO tmp_time (time, c1) VALUES ('1900-01-01 01:01:01', '01:02:03'); +--Testcase 207: +INSERT INTO tmp_time (time, c1) VALUES ('2100-01-01 01:01:01', '04:05:06'); +--Testcase 208: +INSERT INTO tmp_time (time, c1) VALUES ('1990-01-01 01:01:01', '07:08:09'); +--Testcase 209: +INSERT INTO tmp_time (time, c2) VALUES ('2020-12-27 03:02:56.634467', '1950-02-02 02:02:02'); +--Testcase 210: +INSERT INTO tmp_time (time, c3) VALUES ('2021-12-27 03:02:56.668301', '1800-02-02 02:02:02+9'); +--Testcase 210: +INSERT INTO tmp_time (time, c1, c2, c3) VALUES ('2022-05-06 07:08:09', '07:08:09', '2022-05-06 07:08:09', '2022-05-06 07:08:09+9'); +--Testcase 211: +-- 1800-02-02 02:02:02+9 is Daylight Saving Time (DST) changes in Japan. +-- Timezone setting Japan so it will plus 18s:59 +-- https://www.timeanddate.com/time/zone/japan/tokyo?syear=1850 +SELECT * FROM tmp_time; + time | c1 | c2 | c3 +----------------------------+----------+---------------------+------------------------------ + 1900-01-01 01:01:01 | 01:02:03 | | + 1990-01-01 01:01:01 | 07:08:09 | | + 2020-12-27 03:02:56.634467 | | 1950-02-02 02:02:02 | + 2021-12-27 03:02:56.668301 | | | 1800-02-02 02:21:01+09:18:59 + 2022-05-06 07:08:09 | 07:08:09 | 2022-05-06 07:08:09 | 2022-05-06 07:08:09+09 + 2100-01-01 01:01:01 | 04:05:06 | | +(6 rows) + -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP USER MAPPING FOR CURRENT_USER SERVER server1; --Testcase 202: DROP SERVER server1 CASCADE; -NOTICE: drop cascades to 5 other objects +NOTICE: drop cascades to 6 other objects DETAIL: drop cascades to foreign table cpu drop cascades to foreign table numbers drop cascades to foreign table t3 drop cascades to foreign table t4 drop cascades to foreign table tx +drop cascades to foreign table tmp_time --Testcase 203: DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/13.8/option.out b/expected/13.8/option.out new file mode 100644 index 0000000..59b83f6 --- /dev/null +++ b/expected/13.8/option.out @@ -0,0 +1,304 @@ +--Testcase 1: +SET datestyle=ISO; +--Testcase 2: +CREATE EXTENSION influxdb_fdw; +-- version not valid +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '9999', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +--Testcase 4: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version 'dummy', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '-1', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +-- host must be not NULL or not empty +--Testcase 6: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', port '38086', version '2', retention_policy ''); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 8: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 9: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Server Host not specified +--Testcase 10: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 11: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host '', port '38086', version '2', retention_policy ''); +--Testcase 12: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 13: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 14: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Server Host not specified +--Testcase 15: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- dbname must be not NULL or not empty +--Testcase 16: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 17: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 18: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 19: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Database not specified +--Testcase 20: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 21: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname '', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 22: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 23: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 24: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Database not specified +--Testcase 25: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- retention_policy can be NULL +--Testcase 26: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2'); +--Testcase 27: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 28: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 29: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 30: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 31: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 32: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 33: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 34: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 35: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- auth_token can be NULL +--Testcase 36: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 37: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 38: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 39: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: unauthorized access +--Testcase 40: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- auth_token invalid +--Testcase 41: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 42: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'wrong_token'); +--Testcase 43: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 44: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: Unauthorized +--Testcase 45: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 46: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 47: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token ''); +--Testcase 48: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 49: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: unauthorized access +--Testcase 50: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- user must can be NULL +--Testcase 51: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 52: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (password 'pass'); +--Testcase 53: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 54: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 55: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 56: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 57: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password 'pass'); +--Testcase 58: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 59: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 60: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- password can be NULL +--Testcase 61: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 62: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user'); +--Testcase 63: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 65: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: authorization failed +--Testcase 65: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 66: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 67: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password ''); +--Testcase 68: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 69: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: authorization failed +--Testcase 70: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 71: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 72: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password ''); +--Testcase 73: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 74: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 75: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 76: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 77: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 78: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 79: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 1 | 100 + a | version 1 | 200 + a | version 1 | 300 + b | version 1 | 400 + b | version 1 | 500 +(5 rows) + +--Testcase 80: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- Test if version option is not set +-- Connect to InfluxDB version 1 +--Testcase 81: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086'); +--Testcase 82: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 83: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 84: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 1 | 100 + a | version 1 | 200 + a | version 1 | 300 + b | version 1 | 400 + b | version 1 | 500 +(5 rows) + +--Testcase 85: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- Connect to InfluxDB version 2 +--Testcase 86: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', retention_policy ''); +--Testcase 87: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 88: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 89: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 90: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 91: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/12.8/schemaless/add_fields.out b/expected/13.8/schemaless/add_fields.out similarity index 99% rename from expected/12.8/schemaless/add_fields.out rename to expected/13.8/schemaless/add_fields.out index ea2577e..8f9d86b 100644 --- a/expected/12.8/schemaless/add_fields.out +++ b/expected/13.8/schemaless/add_fields.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data -\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null +:INIT_FIELDS_ORIGINAL; --Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); --Testcase 5: @@ -112,7 +112,7 @@ SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), l -------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_1; --Testcase 13: DROP FOREIGN TABLE sctbl1; --Testcase 14: @@ -659,7 +659,7 @@ SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fiel -------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_20; --Testcase 64: DROP FOREIGN TABLE sctbl1; --Testcase 65: diff --git a/expected/12.8/schemaless/add_multi_key.out b/expected/13.8/schemaless/add_multi_key.out similarity index 99% rename from expected/12.8/schemaless/add_multi_key.out rename to expected/13.8/schemaless/add_multi_key.out index 87ac8da..39e6506 100644 --- a/expected/12.8/schemaless/add_multi_key.out +++ b/expected/13.8/schemaless/add_multi_key.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data original -\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null +:INIT_MULTILEY_ORIGINAL; -- Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -------------------------------------------------TC for before update test data------------------ @@ -1102,7 +1102,7 @@ SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3 ---------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1'); @@ -1844,7 +1844,7 @@ SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint -- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1, t2, t3, t4, t5'); diff --git a/expected/14.0/schemaless/add_tags.out b/expected/13.8/schemaless/add_tags.out similarity index 99% rename from expected/14.0/schemaless/add_tags.out rename to expected/13.8/schemaless/add_tags.out index 5549a77..623f02b 100644 --- a/expected/14.0/schemaless/add_tags.out +++ b/expected/13.8/schemaless/add_tags.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data original -\! influx -import -path=init/tag_original.txt -precision=s > /dev/null +:INIT_TAG_ORIGINAL; -- Before update data -- Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); --Testcase 5: @@ -76,7 +76,7 @@ select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::big --------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_1; --Testcase 12: DROP FOREIGN TABLE sctbl4; --Testcase 13: @@ -368,7 +368,7 @@ select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (se --------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_20; --Testcase 41: DROP FOREIGN TABLE sctbl4; --Testcase 42: diff --git a/expected/14.0/schemaless/aggregate.out b/expected/13.8/schemaless/aggregate.out similarity index 99% rename from expected/14.0/schemaless/aggregate.out rename to expected/13.8/schemaless/aggregate.out index c6c4dbc..54d94a5 100644 --- a/expected/14.0/schemaless/aggregate.out +++ b/expected/13.8/schemaless/aggregate.out @@ -10,9 +10,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); diff --git a/expected/13.4/schemaless/extra/aggregates.out b/expected/13.8/schemaless/extra/aggregates.out similarity index 99% rename from expected/13.4/schemaless/extra/aggregates.out rename to expected/13.8/schemaless/extra/aggregates.out index f2de683..5a301ac 100644 --- a/expected/13.4/schemaless/extra/aggregates.out +++ b/expected/13.8/schemaless/extra/aggregates.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); --Testcase 5: diff --git a/expected/13.4/schemaless/extra/influxdb_fdw_post.out b/expected/13.8/schemaless/extra/influxdb_fdw_post.out similarity index 99% rename from expected/13.4/schemaless/extra/influxdb_fdw_post.out rename to expected/13.8/schemaless/extra/influxdb_fdw_post.out index cb62bd0..b042d63 100644 --- a/expected/13.4/schemaless/extra/influxdb_fdw_post.out +++ b/expected/13.8/schemaless/extra/influxdb_fdw_post.out @@ -8,16 +8,16 @@ CREATE EXTENSION influxdb_fdw; CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server -- =================================================================== @@ -1221,6 +1221,30 @@ SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} (1 row) +-- This test case drop configuration when execute non-schemaless before +DROP TEXT SEARCH CONFIGURATION IF EXISTS public.custom_search; +NOTICE: text search configuration "public.custom_search" does not exist, skipping +-- check schema-qualification of regconfig constant +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: ((fields ->> 'C 1'::text))::integer, to_tsvector('custom_search'::regconfig, (tags ->> 'c3'::text)) + Filter: (length(to_tsvector('custom_search'::regconfig, (ft1.tags ->> 'c3'::text))) > 0) + InfluxDB query: SELECT "C 1", "c3" FROM "T1" WHERE (("C 1" = 642)) +(4 rows) + +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + c1 | to_tsvector +-----+------------- + 642 | '00642':1 +(1 row) + -- =================================================================== -- JOIN queries -- =================================================================== @@ -3119,7 +3143,7 @@ DROP FOREIGN TABLE local_tbl_nsc; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; --Testcase 185: diff --git a/expected/11.13/schemaless/extra/insert.out b/expected/13.8/schemaless/extra/insert.out similarity index 99% rename from expected/11.13/schemaless/extra/insert.out rename to expected/13.8/schemaless/extra/insert.out index 1cf50ac..4465358 100644 --- a/expected/11.13/schemaless/extra/insert.out +++ b/expected/13.8/schemaless/extra/insert.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list -- diff --git a/expected/13.4/schemaless/extra/join.out b/expected/13.8/schemaless/extra/join.out similarity index 99% rename from expected/13.4/schemaless/extra/join.out rename to expected/13.8/schemaless/extra/join.out index 89b06f9..8f7260d 100644 --- a/expected/13.4/schemaless/extra/join.out +++ b/expected/13.8/schemaless/extra/join.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- @@ -2436,6 +2436,14 @@ ERROR: column t1.x does not exist LINE 1: select t1.x from (select (fields->>'a')::int a, (fields->>'b... ^ HINT: Perhaps you meant to reference the column "t3.x". +-- Test matching of locking clause with wrong alias +select t1.*, t2.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int), t3 as unnamed_join + for update of unnamed_join; + a | b | a | b | fields | time +---+---+---+---+--------+------ +(0 rows) + -- -- regression test for 8.1 merge right join bug -- diff --git a/expected/13.4/schemaless/extra/limit.out b/expected/13.8/schemaless/extra/limit.out similarity index 99% rename from expected/13.4/schemaless/extra/limit.out rename to expected/13.8/schemaless/extra/limit.out index 9b2cccd..b624e9b 100644 --- a/expected/13.4/schemaless/extra/limit.out +++ b/expected/13.8/schemaless/extra/limit.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- diff --git a/expected/14.0/schemaless/extra/prepare.out b/expected/13.8/schemaless/extra/prepare.out similarity index 99% rename from expected/14.0/schemaless/extra/prepare.out rename to expected/13.8/schemaless/extra/prepare.out index a9a4760..8738db2 100644 --- a/expected/14.0/schemaless/extra/prepare.out +++ b/expected/13.8/schemaless/extra/prepare.out @@ -2,41 +2,41 @@ -- of the pg_prepared_statements view as prepared statements are -- created and removed. \set ECHO none ---Testcase 1: +--Testcase 27: CREATE EXTENSION influxdb_fdw; ---Testcase 2: +--Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 4: + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 29: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 30: CREATE FOREIGN TABLE tenk1 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); -- Does not support this command -- ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 5: +--Testcase 31: CREATE FOREIGN TABLE road ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 6: +--Testcase 32: CREATE FOREIGN TABLE road_tmp (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 7: +--Testcase 1: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) ---Testcase 8: +--Testcase 2: PREPARE q1 AS SELECT (fields->>'a')::int AS a FROM road_tmp; ---Testcase 9: +--Testcase 3: EXECUTE q1; a --- 1 (1 row) ---Testcase 10: +--Testcase 4: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------------------------+----------------- @@ -44,23 +44,23 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; (1 row) -- should fail ---Testcase 11: +--Testcase 5: PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; ERROR: prepared statement "q1" already exists -- should succeed DEALLOCATE q1; ---Testcase 12: +--Testcase 6: PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; ---Testcase 13: +--Testcase 7: EXECUTE q1; b --- 2 (1 row) ---Testcase 14: +--Testcase 8: PREPARE q2 AS SELECT (fields->>'b')::int AS b FROM road_tmp; ---Testcase 15: +--Testcase 9: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------------------------+----------------- @@ -70,7 +70,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; -- sql92 syntax DEALLOCATE PREPARE q1; ---Testcase 16: +--Testcase 10: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------------------------+----------------- @@ -79,30 +79,30 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; DEALLOCATE PREPARE q2; -- the view should return the empty set again ---Testcase 17: +--Testcase 11: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) -- parameterized queries ---Testcase 18: +--Testcase 12: PREPARE q2(text) AS SELECT datname, datistemplate, datallowconn FROM pg_database WHERE datname = $1; ---Testcase 19: +--Testcase 13: EXECUTE q2('postgres'); datname | datistemplate | datallowconn ----------+---------------+-------------- postgres | f | t (1 row) ---Testcase 20: +--Testcase 14: PREPARE q3(text, int, float, boolean, smallint) AS SELECT * FROM tenk1 WHERE fields->>'string4' = $1 AND ((fields->>'four')::int = $2 OR (fields->>'ten')::int = $3::bigint OR true = $4 OR (fields->>'odd')::int = $5::int) ORDER BY (fields->>'unique1')::int; ---Testcase 21: +--Testcase 15: EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); fields ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -138,36 +138,36 @@ EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); (29 rows) -- too few params ---Testcase 22: +--Testcase 16: EXECUTE q3('bool'); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 1. -- too many params ---Testcase 23: +--Testcase 17: EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 6. -- wrong param types ---Testcase 24: +--Testcase 18: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); ERROR: parameter $3 of type boolean cannot be coerced to the expected type double precision LINE 1: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'byte... ^ HINT: You will need to rewrite or cast the expression. -- invalid type ---Testcase 25: +--Testcase 19: PREPARE q4(nonexistenttype) AS SELECT $1; ERROR: type "nonexistenttype" does not exist LINE 1: PREPARE q4(nonexistenttype) AS SELECT $1; ^ -- create table as execute ---Testcase 26: +--Testcase 20: PREPARE q5(int, text) AS SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 OR fields->>'stringu1' = $2 ORDER BY (fields->>'unique1')::int; ---Testcase 27: +--Testcase 33: CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); ---Testcase 28: +--Testcase 21: SELECT * FROM q5_prep_results; fields ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -189,23 +189,23 @@ SELECT * FROM q5_prep_results; {"odd": "122", "ten": "1", "two": "1", "even": "123", "four": "1", "twenty": "1", "hundred": "61", "string4": "OOOOxx", "unique1": "9961", "unique2": "2058", "stringu1": "DTAAAA", "stringu2": "EBDAAA", "tenthous": "9961", "thousand": "961", "fivethous": "4961", "twothousand": "1961"} (16 rows) ---Testcase 29: +--Testcase 34: CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') WITH NO DATA; ---Testcase 30: +--Testcase 22: SELECT * FROM q5_prep_nodata; fields -------- (0 rows) -- unknown or unspecified parameter types: should succeed ---Testcase 31: +--Testcase 23: PREPARE q6 AS SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 AND fields->>'stringu1' = $2; ---Testcase 32: +--Testcase 24: PREPARE q7(unknown) AS SELECT * FROM road WHERE fields->>'thepath' = $1; ---Testcase 33: +--Testcase 25: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types @@ -228,7 +228,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements -- test DEALLOCATE ALL; DEALLOCATE ALL; ---Testcase 34: +--Testcase 26: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types diff --git a/expected/12.8/schemaless/extra/select.out b/expected/13.8/schemaless/extra/select.out similarity index 99% rename from expected/12.8/schemaless/extra/select.out rename to expected/13.8/schemaless/extra/select.out index 522c26f..84f52d3 100644 --- a/expected/12.8/schemaless/extra/select.out +++ b/expected/13.8/schemaless/extra/select.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( fields jsonb OPTIONS (fields 'true') diff --git a/expected/13.4/schemaless/extra/select_having.out b/expected/13.8/schemaless/extra/select_having.out similarity index 97% rename from expected/13.4/schemaless/extra/select_having.out rename to expected/13.8/schemaless/extra/select_having.out index 93cefbd..b88def8 100644 --- a/expected/13.4/schemaless/extra/select_having.out +++ b/expected/13.8/schemaless/extra/select_having.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); CREATE FOREIGN TABLE test_having_nsc (a int, b int, c char(8), d char) SERVER influxdb_svr OPTIONS (table 'test_having'); diff --git a/expected/12.8/schemaless/influxdb_fdw.out b/expected/13.8/schemaless/influxdb_fdw.out similarity index 99% rename from expected/12.8/schemaless/influxdb_fdw.out rename to expected/13.8/schemaless/influxdb_fdw.out index 1eb1c18..9776ad4 100644 --- a/expected/12.8/schemaless/influxdb_fdw.out +++ b/expected/13.8/schemaless/influxdb_fdw.out @@ -10,9 +10,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --Testcase 6: @@ -1130,14 +1130,14 @@ SELECT * FROM t5; SELECT * FROM public.influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Testcase 146: SELECT influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Test pushdown LIMIT...OFFSET @@ -1581,7 +1581,9 @@ SELECT * FROM cpu; (5 rows) -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP FOREIGN TABLE cpu_nsc; DROP USER MAPPING FOR CURRENT_USER SERVER server1; diff --git a/expected/13.4/schemaless/schemaless.out b/expected/13.8/schemaless/schemaless.out similarity index 99% rename from expected/13.4/schemaless/schemaless.out rename to expected/13.8/schemaless/schemaless.out index b2a8b2c..c84f12b 100644 --- a/expected/13.4/schemaless/schemaless.out +++ b/expected/13.8/schemaless/schemaless.out @@ -10,9 +10,9 @@ NOTICE: extension "influxdb_fdw" does not exist, skipping --Testcase 4: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 5: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- create foreign table --Testcase 7: CREATE FOREIGN TABLE sc1(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc1', tags 'device_id', schemaless 'true'); diff --git a/expected/12.8/schemaless/selectfunc.out b/expected/13.8/schemaless/selectfunc.out similarity index 99% rename from expected/12.8/schemaless/selectfunc.out rename to expected/13.8/schemaless/selectfunc.out index dbae5cb..045e7ee 100644 --- a/expected/12.8/schemaless/selectfunc.out +++ b/expected/13.8/schemaless/selectfunc.out @@ -7,9 +7,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: CREATE FOREIGN TABLE s3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 's3', tags 'tag1', schemaless 'true'); diff --git a/expected/13.4/selectfunc.out b/expected/13.8/selectfunc.out similarity index 99% rename from expected/13.4/selectfunc.out rename to expected/13.8/selectfunc.out index 290f20b..d4fa1a2 100644 --- a/expected/13.4/selectfunc.out +++ b/expected/13.8/selectfunc.out @@ -7,9 +7,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: CREATE FOREIGN TABLE s3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 float8, value4 bigint) SERVER server1 OPTIONS(table 's3', tags 'tag1'); diff --git a/expected/14.0/extra/insert.out b/expected/14.0/extra/insert.out deleted file mode 100644 index d3e4053..0000000 --- a/expected/14.0/extra/insert.out +++ /dev/null @@ -1,720 +0,0 @@ -\set ECHO none ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- --- insert with DEFAULT in the target_list --- ---Testcase 4: -CREATE FOREIGN TABLE inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 'testing') SERVER influxdb_svr OPTIONS(table 'inserttest'); ---Testcase 5: -insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT); -ERROR: influxdb_fdw : null value in column "col2" of relation "inserttest" violates not-null constraint ---Testcase 6: -insert into inserttest (col2, col3) values (3, DEFAULT); ---Testcase 7: -insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT); ---Testcase 8: -insert into inserttest values (DEFAULT, 5, 'test'); ---Testcase 9: -insert into inserttest values (DEFAULT, 7); ---Testcase 10: -select * from inserttest; - col1 | col2 | col3 -------+------+--------- - | 3 | testing - | 5 | testing - | 5 | test - | 7 | testing -(4 rows) - --- --- insert with similar expression / target_list values (all fail) --- ---Testcase 11: -insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT); -ERROR: INSERT has more target columns than expressions -LINE 1: insert into inserttest (col1, col2, col3) values (DEFAULT, D... - ^ ---Testcase 12: -insert into inserttest (col1, col2, col3) values (1, 2); -ERROR: INSERT has more target columns than expressions -LINE 1: insert into inserttest (col1, col2, col3) values (1, 2); - ^ ---Testcase 13: -insert into inserttest (col1) values (1, 2); -ERROR: INSERT has more expressions than target columns -LINE 1: insert into inserttest (col1) values (1, 2); - ^ ---Testcase 14: -insert into inserttest (col1) values (DEFAULT, DEFAULT); -ERROR: INSERT has more expressions than target columns -LINE 1: insert into inserttest (col1) values (DEFAULT, DEFAULT); - ^ ---Testcase 15: -select * from inserttest; - col1 | col2 | col3 -------+------+--------- - | 3 | testing - | 5 | testing - | 5 | test - | 7 | testing -(4 rows) - --- --- VALUES test --- ---Testcase 16: -insert into inserttest values(10, 20, '40'), (-1, 2, DEFAULT), - ((select 2), (select i from (values(3)) as foo (i)), 'values are fun!'); ---Testcase 17: -select * from inserttest; - col1 | col2 | col3 -------+------+----------------- - | 3 | testing - | 5 | testing - | 5 | test - | 7 | testing - 10 | 20 | 40 - -1 | 2 | testing - 2 | 3 | values are fun! -(7 rows) - --- --- TOASTed value test --- ---Testcase 18: -insert into inserttest values(30, 50, repeat('x', 10000)); ---Testcase 19: -select col1, col2, char_length(col3) from inserttest; - col1 | col2 | char_length -------+------+------------- - | 3 | 7 - | 5 | 7 - | 5 | 4 - | 7 | 7 - 10 | 20 | 2 - -1 | 2 | 7 - 2 | 3 | 15 - 30 | 50 | 10000 -(8 rows) - ---Testcase 20: --- Clean up: -delete from inserttest; -drop foreign table inserttest; -/* --- skip, influxdb does not support create table with WITH option --- --- tuple larger than fillfactor --- -CREATE TABLE large_tuple_test (a int, b text) WITH (fillfactor = 10); -ALTER TABLE large_tuple_test ALTER COLUMN b SET STORAGE plain; - --- create page w/ free space in range [nearlyEmptyFreeSpace, MaxHeapTupleSize) -INSERT INTO large_tuple_test (select 1, NULL); - --- should still fit on the page -INSERT INTO large_tuple_test (select 2, repeat('a', 1000)); -SELECT pg_size_pretty(pg_relation_size('large_tuple_test'::regclass, 'main')); - --- add small record to the second page -INSERT INTO large_tuple_test (select 3, NULL); - --- now this tuple won't fit on the second page, but the insert should --- still succeed by extending the relation -INSERT INTO large_tuple_test (select 4, repeat('a', 8126)); - -DROP TABLE large_tuple_test; -*/ -/* --- skip, influxdb does not support create type --- --- check indirection (field/array assignment), cf bug #14265 --- --- these tests are aware that transformInsertStmt has 3 separate code paths --- - -create type insert_test_type as (if1 int, if2 text[]); - -create table inserttest (f1 int, f2 int[], - f3 insert_test_type, f4 insert_test_type[]); - -insert into inserttest (f2[1], f2[2]) values (1,2); -insert into inserttest (f2[1], f2[2]) values (3,4), (5,6); -insert into inserttest (f2[1], f2[2]) select 7,8; -insert into inserttest (f2[1], f2[2]) values (1,default); -- not supported - -insert into inserttest (f3.if1, f3.if2) values (1,array['foo']); -insert into inserttest (f3.if1, f3.if2) values (1,'{foo}'), (2,'{bar}'); -insert into inserttest (f3.if1, f3.if2) select 3, '{baz,quux}'; -insert into inserttest (f3.if1, f3.if2) values (1,default); -- not supported - -insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'); -insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'), ('baz', 'quux'); -insert into inserttest (f3.if2[1], f3.if2[2]) select 'bear', 'beer'; - -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'); -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'), ('baz', 'quux'); -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) select 'bear', 'beer'; - -select * from inserttest; - --- also check reverse-listing -create table inserttest2 (f1 bigint, f2 text); -create rule irule1 as on insert to inserttest2 do also - insert into inserttest (f3.if2[1], f3.if2[2]) - values (new.f1,new.f2); -create rule irule2 as on insert to inserttest2 do also - insert into inserttest (f4[1].if1, f4[1].if2[2]) - values (1,'fool'),(new.f1,new.f2); -create rule irule3 as on insert to inserttest2 do also - insert into inserttest (f4[1].if1, f4[1].if2[2]) - select new.f1, new.f2; -\d+ inserttest2 - -drop table inserttest2; -drop table inserttest; -drop type insert_test_type; -*/ -/* --- skip, influxdb does not support partition table --- direct partition inserts should check partition bound constraint -create table range_parted ( - a text, - b int -) partition by range (a, (b+0)); - --- no partitions, so fail -insert into range_parted values ('a', 11); - -create table part1 partition of range_parted for values from ('a', 1) to ('a', 10); -create table part2 partition of range_parted for values from ('a', 10) to ('a', 20); -create table part3 partition of range_parted for values from ('b', 1) to ('b', 10); -create table part4 partition of range_parted for values from ('b', 10) to ('b', 20); - --- fail -insert into part1 values ('a', 11); -insert into part1 values ('b', 1); --- ok -insert into part1 values ('a', 1); --- fail -insert into part4 values ('b', 21); -insert into part4 values ('a', 10); --- ok -insert into part4 values ('b', 10); - --- fail (partition key a has a NOT NULL constraint) -insert into part1 values (null); --- fail (expression key (b+0) cannot be null either) -insert into part1 values (1); - -create table list_parted ( - a text, - b int -) partition by list (lower(a)); -create table part_aa_bb partition of list_parted FOR VALUES IN ('aa', 'bb'); -create table part_cc_dd partition of list_parted FOR VALUES IN ('cc', 'dd'); -create table part_null partition of list_parted FOR VALUES IN (null); - --- fail -insert into part_aa_bb values ('cc', 1); -insert into part_aa_bb values ('AAa', 1); -insert into part_aa_bb values (null); --- ok -insert into part_cc_dd values ('cC', 1); -insert into part_null values (null, 0); - --- check in case of multi-level partitioned table -create table part_ee_ff partition of list_parted for values in ('ee', 'ff') partition by range (b); -create table part_ee_ff1 partition of part_ee_ff for values from (1) to (10); -create table part_ee_ff2 partition of part_ee_ff for values from (10) to (20); - --- test default partition -create table part_default partition of list_parted default; --- Negative test: a row, which would fit in other partition, does not fit --- default partition, even when inserted directly -insert into part_default values ('aa', 2); -insert into part_default values (null, 2); --- ok -insert into part_default values ('Zz', 2); --- test if default partition works as expected for multi-level partitioned --- table as well as when default partition itself is further partitioned -drop table part_default; -create table part_xx_yy partition of list_parted for values in ('xx', 'yy') partition by list (a); -create table part_xx_yy_p1 partition of part_xx_yy for values in ('xx'); -create table part_xx_yy_defpart partition of part_xx_yy default; -create table part_default partition of list_parted default partition by range(b); -create table part_default_p1 partition of part_default for values from (20) to (30); -create table part_default_p2 partition of part_default for values from (30) to (40); - --- fail -insert into part_ee_ff1 values ('EE', 11); -insert into part_default_p2 values ('gg', 43); --- fail (even the parent's, ie, part_ee_ff's partition constraint applies) -insert into part_ee_ff1 values ('cc', 1); -insert into part_default values ('gg', 43); --- ok -insert into part_ee_ff1 values ('ff', 1); -insert into part_ee_ff2 values ('ff', 11); -insert into part_default_p1 values ('cd', 25); -insert into part_default_p2 values ('de', 35); -insert into list_parted values ('ab', 21); -insert into list_parted values ('xx', 1); -insert into list_parted values ('yy', 2); -select tableoid::regclass, * from list_parted; - --- Check tuple routing for partitioned tables - --- fail -insert into range_parted values ('a', 0); --- ok -insert into range_parted values ('a', 1); -insert into range_parted values ('a', 10); --- fail -insert into range_parted values ('a', 20); --- ok -insert into range_parted values ('b', 1); -insert into range_parted values ('b', 10); --- fail (partition key (b+0) is null) -insert into range_parted values ('a'); - --- Check default partition -create table part_def partition of range_parted default; --- fail -insert into part_def values ('b', 10); --- ok -insert into part_def values ('c', 10); -insert into range_parted values (null, null); -insert into range_parted values ('a', null); -insert into range_parted values (null, 19); -insert into range_parted values ('b', 20); - -select tableoid::regclass, * from range_parted; --- ok -insert into list_parted values (null, 1); -insert into list_parted (a) values ('aA'); --- fail (partition of part_ee_ff not found in both cases) -insert into list_parted values ('EE', 0); -insert into part_ee_ff values ('EE', 0); --- ok -insert into list_parted values ('EE', 1); -insert into part_ee_ff values ('EE', 10); -select tableoid::regclass, * from list_parted; - --- some more tests to exercise tuple-routing with multi-level partitioning -create table part_gg partition of list_parted for values in ('gg') partition by range (b); -create table part_gg1 partition of part_gg for values from (minvalue) to (1); -create table part_gg2 partition of part_gg for values from (1) to (10) partition by range (b); -create table part_gg2_1 partition of part_gg2 for values from (1) to (5); -create table part_gg2_2 partition of part_gg2 for values from (5) to (10); - -create table part_ee_ff3 partition of part_ee_ff for values from (20) to (30) partition by range (b); -create table part_ee_ff3_1 partition of part_ee_ff3 for values from (20) to (25); -create table part_ee_ff3_2 partition of part_ee_ff3 for values from (25) to (30); - -truncate list_parted; -insert into list_parted values ('aa'), ('cc'); -insert into list_parted select 'Ff', s.a from generate_series(1, 29) s(a); -insert into list_parted select 'gg', s.a from generate_series(1, 9) s(a); -insert into list_parted (b) values (1); -select tableoid::regclass::text, a, min(b) as min_b, max(b) as max_b from list_parted group by 1, 2 order by 1; - --- direct partition inserts should check hash partition bound constraint - --- Use hand-rolled hash functions and operator classes to get predictable --- result on different machines. The hash function for int4 simply returns --- the sum of the values passed to it and the one for text returns the length --- of the non-empty string value passed to it or 0. - -create or replace function part_hashint4_noop(value int4, seed int8) -returns int8 as $$ -select value + seed; -$$ language sql immutable; - -create operator class part_test_int4_ops -for type int4 -using hash as -operator 1 =, -function 2 part_hashint4_noop(int4, int8); - -create or replace function part_hashtext_length(value text, seed int8) -RETURNS int8 AS $$ -select length(coalesce(value, ''))::int8 -$$ language sql immutable; - -create operator class part_test_text_ops -for type text -using hash as -operator 1 =, -function 2 part_hashtext_length(text, int8); - -create table hash_parted ( - a int -) partition by hash (a part_test_int4_ops); -create table hpart0 partition of hash_parted for values with (modulus 4, remainder 0); -create table hpart1 partition of hash_parted for values with (modulus 4, remainder 1); -create table hpart2 partition of hash_parted for values with (modulus 4, remainder 2); -create table hpart3 partition of hash_parted for values with (modulus 4, remainder 3); - -insert into hash_parted values(generate_series(1,10)); - --- direct insert of values divisible by 4 - ok; -insert into hpart0 values(12),(16); --- fail; -insert into hpart0 values(11); --- 11 % 4 -> 3 remainder i.e. valid data for hpart3 partition -insert into hpart3 values(11); - --- view data -select tableoid::regclass as part, a, a%4 as "remainder = a % 4" -from hash_parted order by part; - --- test \d+ output on a table which has both partitioned and unpartitioned --- partitions -\d+ list_parted - --- cleanup -drop table range_parted, list_parted; -drop table hash_parted; - --- test that a default partition added as the first partition accepts any value --- including null -create table list_parted (a int) partition by list (a); -create table part_default partition of list_parted default; -\d+ part_default -insert into part_default values (null); -insert into part_default values (1); -insert into part_default values (-1); -select tableoid::regclass, a from list_parted; --- cleanup -drop table list_parted; - --- more tests for certain multi-level partitioning scenarios -create table mlparted (a int, b int) partition by range (a, b); -create table mlparted1 (b int not null, a int not null) partition by range ((b+0)); -create table mlparted11 (like mlparted1); -alter table mlparted11 drop a; -alter table mlparted11 add a int; -alter table mlparted11 drop a; -alter table mlparted11 add a int not null; --- attnum for key attribute 'a' is different in mlparted, mlparted1, and mlparted11 -select attrelid::regclass, attname, attnum -from pg_attribute -where attname = 'a' - and (attrelid = 'mlparted'::regclass - or attrelid = 'mlparted1'::regclass - or attrelid = 'mlparted11'::regclass) -order by attrelid::regclass::text; - -alter table mlparted1 attach partition mlparted11 for values from (2) to (5); -alter table mlparted attach partition mlparted1 for values from (1, 2) to (1, 10); - --- check that "(1, 2)" is correctly routed to mlparted11. -insert into mlparted values (1, 2); -select tableoid::regclass, * from mlparted; - --- check that proper message is shown after failure to route through mlparted1 -insert into mlparted (a, b) values (1, 5); - -truncate mlparted; -alter table mlparted add constraint check_b check (b = 3); - --- have a BR trigger modify the row such that the check_b is violated -create function mlparted11_trig_fn() -returns trigger AS -$$ -begin - NEW.b := 4; - return NEW; -end; -$$ -language plpgsql; -create trigger mlparted11_trig before insert ON mlparted11 - for each row execute procedure mlparted11_trig_fn(); - --- check that the correct row is shown when constraint check_b fails after --- "(1, 2)" is routed to mlparted11 (actually "(1, 4)" would be shown due --- to the BR trigger mlparted11_trig_fn) -insert into mlparted values (1, 2); -drop trigger mlparted11_trig on mlparted11; -drop function mlparted11_trig_fn(); - --- check that inserting into an internal partition successfully results in --- checking its partition constraint before inserting into the leaf partition --- selected by tuple-routing -insert into mlparted1 (a, b) values (2, 3); - --- check routing error through a list partitioned table when the key is null -create table lparted_nonullpart (a int, b char) partition by list (b); -create table lparted_nonullpart_a partition of lparted_nonullpart for values in ('a'); -insert into lparted_nonullpart values (1); -drop table lparted_nonullpart; - --- check that RETURNING works correctly with tuple-routing -alter table mlparted drop constraint check_b; -create table mlparted12 partition of mlparted1 for values from (5) to (10); -create table mlparted2 (b int not null, a int not null); -alter table mlparted attach partition mlparted2 for values from (1, 10) to (1, 20); -create table mlparted3 partition of mlparted for values from (1, 20) to (1, 30); -create table mlparted4 (like mlparted); -alter table mlparted4 drop a; -alter table mlparted4 add a int not null; -alter table mlparted attach partition mlparted4 for values from (1, 30) to (1, 40); -with ins (a, b, c) as - (insert into mlparted (b, a) select s.a, 1 from generate_series(2, 39) s(a) returning tableoid::regclass, *) - select a, b, min(c), max(c) from ins group by a, b order by 1; - -alter table mlparted add c text; -create table mlparted5 (c text, a int not null, b int not null) partition by list (c); -create table mlparted5a (a int not null, c text, b int not null); -alter table mlparted5 attach partition mlparted5a for values in ('a'); -alter table mlparted attach partition mlparted5 for values from (1, 40) to (1, 50); -alter table mlparted add constraint check_b check (a = 1 and b < 45); -insert into mlparted values (1, 45, 'a'); -create function mlparted5abrtrig_func() returns trigger as $$ begin new.c = 'b'; return new; end; $$ language plpgsql; -create trigger mlparted5abrtrig before insert on mlparted5a for each row execute procedure mlparted5abrtrig_func(); -insert into mlparted5 (a, b, c) values (1, 40, 'a'); -drop table mlparted5; -alter table mlparted drop constraint check_b; - --- Check multi-level default partition -create table mlparted_def partition of mlparted default partition by range(a); -create table mlparted_def1 partition of mlparted_def for values from (40) to (50); -create table mlparted_def2 partition of mlparted_def for values from (50) to (60); -insert into mlparted values (40, 100); -insert into mlparted_def1 values (42, 100); -insert into mlparted_def2 values (54, 50); --- fail -insert into mlparted values (70, 100); -insert into mlparted_def1 values (52, 50); -insert into mlparted_def2 values (34, 50); --- ok -create table mlparted_defd partition of mlparted_def default; -insert into mlparted values (70, 100); - -select tableoid::regclass, * from mlparted_def; - --- Check multi-level tuple routing with attributes dropped from the --- top-most parent. First remove the last attribute. -alter table mlparted add d int, add e int; -alter table mlparted drop e; -create table mlparted5 partition of mlparted - for values from (1, 40) to (1, 50) partition by range (c); -create table mlparted5_ab partition of mlparted5 - for values from ('a') to ('c') partition by list (c); --- This partitioned table should remain with no partitions. -create table mlparted5_cd partition of mlparted5 - for values from ('c') to ('e') partition by list (c); -create table mlparted5_a partition of mlparted5_ab for values in ('a'); -create table mlparted5_b (d int, b int, c text, a int); -alter table mlparted5_ab attach partition mlparted5_b for values in ('b'); -truncate mlparted; -insert into mlparted values (1, 2, 'a', 1); -insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a -insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b -insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails -insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails -select tableoid::regclass, * from mlparted order by a, b, c, d; -alter table mlparted drop d; -truncate mlparted; --- Remove the before last attribute. -alter table mlparted add e int, add d int; -alter table mlparted drop e; -insert into mlparted values (1, 2, 'a', 1); -insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a -insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b -insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails -insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails -select tableoid::regclass, * from mlparted order by a, b, c, d; -alter table mlparted drop d; -drop table mlparted5; - --- check that message shown after failure to find a partition shows the --- appropriate key description (or none) in various situations -create table key_desc (a int, b int) partition by list ((a+0)); -create table key_desc_1 partition of key_desc for values in (1) partition by range (b); - -create user regress_insert_other_user; -grant select (a) on key_desc_1 to regress_insert_other_user; -grant insert on key_desc to regress_insert_other_user; - -set role regress_insert_other_user; --- no key description is shown -insert into key_desc values (1, 1); - -reset role; -grant select (b) on key_desc_1 to regress_insert_other_user; -set role regress_insert_other_user; --- key description (b)=(1) is now shown -insert into key_desc values (1, 1); - --- key description is not shown if key contains expression -insert into key_desc values (2, 1); -reset role; -revoke all on key_desc from regress_insert_other_user; -revoke all on key_desc_1 from regress_insert_other_user; -drop role regress_insert_other_user; -drop table key_desc, key_desc_1; - --- test minvalue/maxvalue restrictions -create table mcrparted (a int, b int, c int) partition by range (a, abs(b), c); -create table mcrparted0 partition of mcrparted for values from (minvalue, 0, 0) to (1, maxvalue, maxvalue); -create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, minvalue); -create table mcrparted4 partition of mcrparted for values from (21, minvalue, 0) to (30, 20, minvalue); - --- check multi-column range partitioning expression enforces the same --- constraint as what tuple-routing would determine it to be -create table mcrparted0 partition of mcrparted for values from (minvalue, minvalue, minvalue) to (1, maxvalue, maxvalue); -create table mcrparted1 partition of mcrparted for values from (2, 1, minvalue) to (10, 5, 10); -create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, maxvalue); -create table mcrparted3 partition of mcrparted for values from (11, 1, 1) to (20, 10, 10); -create table mcrparted4 partition of mcrparted for values from (21, minvalue, minvalue) to (30, 20, maxvalue); -create table mcrparted5 partition of mcrparted for values from (30, 21, 20) to (maxvalue, maxvalue, maxvalue); - --- null not allowed in range partition -insert into mcrparted values (null, null, null); - --- routed to mcrparted0 -insert into mcrparted values (0, 1, 1); -insert into mcrparted0 values (0, 1, 1); - --- routed to mcparted1 -insert into mcrparted values (9, 1000, 1); -insert into mcrparted1 values (9, 1000, 1); -insert into mcrparted values (10, 5, -1); -insert into mcrparted1 values (10, 5, -1); -insert into mcrparted values (2, 1, 0); -insert into mcrparted1 values (2, 1, 0); - --- routed to mcparted2 -insert into mcrparted values (10, 6, 1000); -insert into mcrparted2 values (10, 6, 1000); -insert into mcrparted values (10, 1000, 1000); -insert into mcrparted2 values (10, 1000, 1000); - --- no partition exists, nor does mcrparted3 accept it -insert into mcrparted values (11, 1, -1); -insert into mcrparted3 values (11, 1, -1); - --- routed to mcrparted5 -insert into mcrparted values (30, 21, 20); -insert into mcrparted5 values (30, 21, 20); -insert into mcrparted4 values (30, 21, 20); -- error - --- check rows -select tableoid::regclass::text, * from mcrparted order by 1; - --- cleanup -drop table mcrparted; - --- check that a BR constraint can't make partition contain violating rows -create table brtrigpartcon (a int, b text) partition by list (a); -create table brtrigpartcon1 partition of brtrigpartcon for values in (1); -create or replace function brtrigpartcon1trigf() returns trigger as $$begin new.a := 2; return new; end$$ language plpgsql; -create trigger brtrigpartcon1trig before insert on brtrigpartcon1 for each row execute procedure brtrigpartcon1trigf(); -insert into brtrigpartcon values (1, 'hi there'); -insert into brtrigpartcon1 values (1, 'hi there'); - --- check that the message shows the appropriate column description in a --- situation where the partitioned table is not the primary ModifyTable node -create table inserttest3 (f1 text default 'foo', f2 text default 'bar', f3 int); -create role regress_coldesc_role; -grant insert on inserttest3 to regress_coldesc_role; -grant insert on brtrigpartcon to regress_coldesc_role; -revoke select on brtrigpartcon from regress_coldesc_role; -set role regress_coldesc_role; -with result as (insert into brtrigpartcon values (1, 'hi there') returning 1) - insert into inserttest3 (f3) select * from result; -reset role; - --- cleanup -revoke all on inserttest3 from regress_coldesc_role; -revoke all on brtrigpartcon from regress_coldesc_role; -drop role regress_coldesc_role; -drop table inserttest3; -drop table brtrigpartcon; -drop function brtrigpartcon1trigf(); - --- check that "do nothing" BR triggers work with tuple-routing -create table donothingbrtrig_test (a int, b text) partition by list (a); -create table donothingbrtrig_test1 (b text, a int); -create table donothingbrtrig_test2 (c text, b text, a int); -alter table donothingbrtrig_test2 drop column c; -create or replace function donothingbrtrig_func() returns trigger as $$begin raise notice 'b: %', new.b; return NULL; end$$ language plpgsql; -create trigger donothingbrtrig1 before insert on donothingbrtrig_test1 for each row execute procedure donothingbrtrig_func(); -create trigger donothingbrtrig2 before insert on donothingbrtrig_test2 for each row execute procedure donothingbrtrig_func(); -alter table donothingbrtrig_test attach partition donothingbrtrig_test1 for values in (1); -alter table donothingbrtrig_test attach partition donothingbrtrig_test2 for values in (2); -insert into donothingbrtrig_test values (1, 'foo'), (2, 'bar'); -copy donothingbrtrig_test from stdout; -1 baz -2 qux -\. -select tableoid::regclass, * from donothingbrtrig_test; - --- cleanup -drop table donothingbrtrig_test; -drop function donothingbrtrig_func(); - --- check multi-column range partitioning with minvalue/maxvalue constraints -create table mcrparted (a text, b int) partition by range(a, b); -create table mcrparted1_lt_b partition of mcrparted for values from (minvalue, minvalue) to ('b', minvalue); -create table mcrparted2_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue); -create table mcrparted3_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue); -create table mcrparted4_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0); -create table mcrparted5_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10); -create table mcrparted6_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue); -create table mcrparted7_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue); -create table mcrparted8_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, maxvalue); - -\d+ mcrparted -\d+ mcrparted1_lt_b -\d+ mcrparted2_b -\d+ mcrparted3_c_to_common -\d+ mcrparted4_common_lt_0 -\d+ mcrparted5_common_0_to_10 -\d+ mcrparted6_common_ge_10 -\d+ mcrparted7_gt_common_lt_d -\d+ mcrparted8_ge_d - -insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10), - ('comm', -10), ('common', -10), ('common', 0), ('common', 10), - ('commons', 0), ('d', -10), ('e', 0); -select tableoid::regclass, * from mcrparted order by a, b; -drop table mcrparted; - --- check that wholerow vars in the RETURNING list work with partitioned tables -create table returningwrtest (a int) partition by list (a); -create table returningwrtest1 partition of returningwrtest for values in (1); -insert into returningwrtest values (1) returning returningwrtest; - --- check also that the wholerow vars in RETURNING list are converted as needed -alter table returningwrtest add b text; -create table returningwrtest2 (b text, c int, a int); -alter table returningwrtest2 drop c; -alter table returningwrtest attach partition returningwrtest2 for values in (2); -insert into returningwrtest values (2, 'foo') returning returningwrtest; -drop table returningwrtest; -*/ --- Clean up -DO $d$ -declare - l_rec record; -begin - for l_rec in (select foreign_table_schema, foreign_table_name - from information_schema.foreign_tables) loop - execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); - end loop; -end; -$d$; ---Testcase 21: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 22: -DROP SERVER influxdb_svr CASCADE; ---Testcase 23: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/14.0/extra/select_having.out b/expected/14.0/extra/select_having.out deleted file mode 100644 index dc232a0..0000000 --- a/expected/14.0/extra/select_having.out +++ /dev/null @@ -1,131 +0,0 @@ --- --- SELECT_HAVING --- -\set ECHO none ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 4: -CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; ---Testcase 5: -INSERT INTO test_having VALUES (0, 1, 'XXXX', 'A'); ---Testcase 6: -INSERT INTO test_having VALUES (1, 2, 'AAAA', 'b'); ---Testcase 7: -INSERT INTO test_having VALUES (2, 2, 'AAAA', 'c'); ---Testcase 8: -INSERT INTO test_having VALUES (3, 3, 'BBBB', 'D'); ---Testcase 9: -INSERT INTO test_having VALUES (4, 3, 'BBBB', 'e'); ---Testcase 10: -INSERT INTO test_having VALUES (5, 3, 'bbbb', 'F'); ---Testcase 11: -INSERT INTO test_having VALUES (6, 4, 'cccc', 'g'); ---Testcase 12: -INSERT INTO test_having VALUES (7, 4, 'cccc', 'h'); ---Testcase 13: -INSERT INTO test_having VALUES (8, 4, 'CCCC', 'I'); ---Testcase 14: -INSERT INTO test_having VALUES (9, 4, 'CCCC', 'j'); ---Testcase 15: -SELECT b, c FROM test_having - GROUP BY b, c HAVING count(*) = 1 ORDER BY b, c; - b | c ----+---------- - 1 | XXXX - 3 | bbbb -(2 rows) - --- HAVING is effectively equivalent to WHERE in this case ---Testcase 16: -SELECT b, c FROM test_having - GROUP BY b, c HAVING b = 3 ORDER BY b, c; - b | c ----+---------- - 3 | bbbb - 3 | BBBB -(2 rows) - ---Testcase 17: -SELECT lower(c), count(c) FROM test_having - GROUP BY lower(c) HAVING count(*) > 2 OR min(a) = max(a) - ORDER BY lower(c); - lower | count --------+------- - bbbb | 3 - cccc | 4 - xxxx | 1 -(3 rows) - ---Testcase 18: -SELECT c, max(a) FROM test_having - GROUP BY c HAVING count(*) > 2 OR min(a) = max(a) - ORDER BY c; - c | max -----------+----- - bbbb | 5 - XXXX | 0 -(2 rows) - --- test degenerate cases involving HAVING without GROUP BY --- Per SQL spec, these should generate 0 or 1 row, even without aggregates ---Testcase 19: -SELECT min(a), max(a) FROM test_having HAVING min(a) = max(a); - min | max ------+----- -(0 rows) - ---Testcase 20: -SELECT min(a), max(a) FROM test_having HAVING min(a) < max(a); - min | max ------+----- - 0 | 9 -(1 row) - --- errors: ungrouped column references ---Testcase 21: -SELECT a FROM test_having HAVING min(a) < max(a); -ERROR: column "test_having.a" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT a FROM test_having HAVING min(a) < max(a); - ^ ---Testcase 22: -SELECT 1 AS one FROM test_having HAVING a > 1; -ERROR: column "test_having.a" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT 1 AS one FROM test_having HAVING a > 1; - ^ --- the really degenerate case: need not scan table at all ---Testcase 23: -SELECT 1 AS one FROM test_having HAVING 1 > 2; - one ------ -(0 rows) - ---Testcase 24: -SELECT 1 AS one FROM test_having HAVING 1 < 2; - one ------ - 1 -(1 row) - --- and just to prove that we aren't scanning the table: ---Testcase 25: -SELECT 1 AS one FROM test_having WHERE 1/a = 1 HAVING 1 < 2; - one ------ - 1 -(1 row) - ---Testcase 26: --- Clean up: -DELETE FROM test_having; -DROP FOREIGN TABLE test_having; ---Testcase 27: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 28: -DROP SERVER influxdb_svr CASCADE; ---Testcase 29: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/14.0/schemaless/extra/insert.out b/expected/14.0/schemaless/extra/insert.out deleted file mode 100644 index 1cf50ac..0000000 --- a/expected/14.0/schemaless/extra/insert.out +++ /dev/null @@ -1,722 +0,0 @@ -\set ECHO none ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- --- insert with DEFAULT in the target_list --- ---Testcase 4: -CREATE FOREIGN TABLE inserttest (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -CREATE FOREIGN TABLE inserttest_nsc (col1 int4, col2 int4 NOT NULL, col3 text default 'testing') SERVER influxdb_svr OPTIONS(table 'inserttest'); ---Testcase 5: -insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT); -ERROR: influxdb_fdw : null value in column "col2" of relation "inserttest" violates not-null constraint ---Testcase 6: -insert into inserttest_nsc (col2, col3) values (3, DEFAULT); ---Testcase 7: -insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, 5, DEFAULT); ---Testcase 8: -insert into inserttest_nsc values (DEFAULT, 5, 'test'); ---Testcase 9: -insert into inserttest_nsc values (DEFAULT, 7); ---Testcase 10: -select * from inserttest; - fields ----------------------------------- - {"col2": "3", "col3": "testing"} - {"col2": "5", "col3": "testing"} - {"col2": "5", "col3": "test"} - {"col2": "7", "col3": "testing"} -(4 rows) - --- --- insert with similar expression / target_list values (all fail) --- ---Testcase 11: -insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, DEFAULT); -ERROR: INSERT has more target columns than expressions -LINE 1: insert into inserttest_nsc (col1, col2, col3) values (DEFAUL... - ^ ---Testcase 12: -insert into inserttest_nsc (col1, col2, col3) values (1, 2); -ERROR: INSERT has more target columns than expressions -LINE 1: insert into inserttest_nsc (col1, col2, col3) values (1, 2); - ^ ---Testcase 13: -insert into inserttest_nsc (col1) values (1, 2); -ERROR: INSERT has more expressions than target columns -LINE 1: insert into inserttest_nsc (col1) values (1, 2); - ^ ---Testcase 14: -insert into inserttest_nsc (col1) values (DEFAULT, DEFAULT); -ERROR: INSERT has more expressions than target columns -LINE 1: insert into inserttest_nsc (col1) values (DEFAULT, DEFAULT); - ^ ---Testcase 15: -select * from inserttest; - fields ----------------------------------- - {"col2": "3", "col3": "testing"} - {"col2": "5", "col3": "testing"} - {"col2": "5", "col3": "test"} - {"col2": "7", "col3": "testing"} -(4 rows) - --- --- VALUES test --- ---Testcase 16: -insert into inserttest_nsc values(10, 20, '40'), (-1, 2, DEFAULT), - ((select 2), (select i from (values(3)) as foo (i)), 'values are fun!'); ---Testcase 17: -select * from inserttest; - fields -------------------------------------------------------- - {"col1": null, "col2": "3", "col3": "testing"} - {"col1": null, "col2": "5", "col3": "testing"} - {"col1": null, "col2": "5", "col3": "test"} - {"col1": null, "col2": "7", "col3": "testing"} - {"col1": "10", "col2": "20", "col3": "40"} - {"col1": "-1", "col2": "2", "col3": "testing"} - {"col1": "2", "col2": "3", "col3": "values are fun!"} -(7 rows) - --- --- TOASTed value test --- ---Testcase 18: -insert into inserttest_nsc values(30, 50, repeat('x', 10000)); ---Testcase 19: -select (fields->>'col1')::int4 col1, (fields->>'col2')::int4 col2, char_length(fields->>'col3') from inserttest; - col1 | col2 | char_length -------+------+------------- - | 3 | 7 - | 5 | 7 - | 5 | 4 - | 7 | 7 - 10 | 20 | 2 - -1 | 2 | 7 - 2 | 3 | 15 - 30 | 50 | 10000 -(8 rows) - ---Testcase 20: --- Clean up: -delete from inserttest_nsc; -drop foreign table inserttest; -drop foreign table inserttest_nsc; -/* --- skip, influxdb does not support create table with WITH option --- --- tuple larger than fillfactor --- -CREATE TABLE large_tuple_test (a int, b text) WITH (fillfactor = 10); -ALTER TABLE large_tuple_test ALTER COLUMN b SET STORAGE plain; - --- create page w/ free space in range [nearlyEmptyFreeSpace, MaxHeapTupleSize) -INSERT INTO large_tuple_test (select 1, NULL); - --- should still fit on the page -INSERT INTO large_tuple_test (select 2, repeat('a', 1000)); -SELECT pg_size_pretty(pg_relation_size('large_tuple_test'::regclass, 'main')); - --- add small record to the second page -INSERT INTO large_tuple_test (select 3, NULL); - --- now this tuple won't fit on the second page, but the insert should --- still succeed by extending the relation -INSERT INTO large_tuple_test (select 4, repeat('a', 8126)); - -DROP TABLE large_tuple_test; -*/ -/* --- skip, influxdb does not support create type --- --- check indirection (field/array assignment), cf bug #14265 --- --- these tests are aware that transformInsertStmt has 3 separate code paths --- - -create type insert_test_type as (if1 int, if2 text[]); - -create table inserttest (f1 int, f2 int[], - f3 insert_test_type, f4 insert_test_type[]); - -insert into inserttest (f2[1], f2[2]) values (1,2); -insert into inserttest (f2[1], f2[2]) values (3,4), (5,6); -insert into inserttest (f2[1], f2[2]) select 7,8; -insert into inserttest (f2[1], f2[2]) values (1,default); -- not supported - -insert into inserttest (f3.if1, f3.if2) values (1,array['foo']); -insert into inserttest (f3.if1, f3.if2) values (1,'{foo}'), (2,'{bar}'); -insert into inserttest (f3.if1, f3.if2) select 3, '{baz,quux}'; -insert into inserttest (f3.if1, f3.if2) values (1,default); -- not supported - -insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'); -insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'), ('baz', 'quux'); -insert into inserttest (f3.if2[1], f3.if2[2]) select 'bear', 'beer'; - -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'); -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'), ('baz', 'quux'); -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) select 'bear', 'beer'; - -select * from inserttest; - --- also check reverse-listing -create table inserttest2 (f1 bigint, f2 text); -create rule irule1 as on insert to inserttest2 do also - insert into inserttest (f3.if2[1], f3.if2[2]) - values (new.f1,new.f2); -create rule irule2 as on insert to inserttest2 do also - insert into inserttest (f4[1].if1, f4[1].if2[2]) - values (1,'fool'),(new.f1,new.f2); -create rule irule3 as on insert to inserttest2 do also - insert into inserttest (f4[1].if1, f4[1].if2[2]) - select new.f1, new.f2; -\d+ inserttest2 - -drop table inserttest2; -drop table inserttest; -drop type insert_test_type; -*/ -/* --- skip, influxdb does not support partition table --- direct partition inserts should check partition bound constraint -create table range_parted ( - a text, - b int -) partition by range (a, (b+0)); - --- no partitions, so fail -insert into range_parted values ('a', 11); - -create table part1 partition of range_parted for values from ('a', 1) to ('a', 10); -create table part2 partition of range_parted for values from ('a', 10) to ('a', 20); -create table part3 partition of range_parted for values from ('b', 1) to ('b', 10); -create table part4 partition of range_parted for values from ('b', 10) to ('b', 20); - --- fail -insert into part1 values ('a', 11); -insert into part1 values ('b', 1); --- ok -insert into part1 values ('a', 1); --- fail -insert into part4 values ('b', 21); -insert into part4 values ('a', 10); --- ok -insert into part4 values ('b', 10); - --- fail (partition key a has a NOT NULL constraint) -insert into part1 values (null); --- fail (expression key (b+0) cannot be null either) -insert into part1 values (1); - -create table list_parted ( - a text, - b int -) partition by list (lower(a)); -create table part_aa_bb partition of list_parted FOR VALUES IN ('aa', 'bb'); -create table part_cc_dd partition of list_parted FOR VALUES IN ('cc', 'dd'); -create table part_null partition of list_parted FOR VALUES IN (null); - --- fail -insert into part_aa_bb values ('cc', 1); -insert into part_aa_bb values ('AAa', 1); -insert into part_aa_bb values (null); --- ok -insert into part_cc_dd values ('cC', 1); -insert into part_null values (null, 0); - --- check in case of multi-level partitioned table -create table part_ee_ff partition of list_parted for values in ('ee', 'ff') partition by range (b); -create table part_ee_ff1 partition of part_ee_ff for values from (1) to (10); -create table part_ee_ff2 partition of part_ee_ff for values from (10) to (20); - --- test default partition -create table part_default partition of list_parted default; --- Negative test: a row, which would fit in other partition, does not fit --- default partition, even when inserted directly -insert into part_default values ('aa', 2); -insert into part_default values (null, 2); --- ok -insert into part_default values ('Zz', 2); --- test if default partition works as expected for multi-level partitioned --- table as well as when default partition itself is further partitioned -drop table part_default; -create table part_xx_yy partition of list_parted for values in ('xx', 'yy') partition by list (a); -create table part_xx_yy_p1 partition of part_xx_yy for values in ('xx'); -create table part_xx_yy_defpart partition of part_xx_yy default; -create table part_default partition of list_parted default partition by range(b); -create table part_default_p1 partition of part_default for values from (20) to (30); -create table part_default_p2 partition of part_default for values from (30) to (40); - --- fail -insert into part_ee_ff1 values ('EE', 11); -insert into part_default_p2 values ('gg', 43); --- fail (even the parent's, ie, part_ee_ff's partition constraint applies) -insert into part_ee_ff1 values ('cc', 1); -insert into part_default values ('gg', 43); --- ok -insert into part_ee_ff1 values ('ff', 1); -insert into part_ee_ff2 values ('ff', 11); -insert into part_default_p1 values ('cd', 25); -insert into part_default_p2 values ('de', 35); -insert into list_parted values ('ab', 21); -insert into list_parted values ('xx', 1); -insert into list_parted values ('yy', 2); -select tableoid::regclass, * from list_parted; - --- Check tuple routing for partitioned tables - --- fail -insert into range_parted values ('a', 0); --- ok -insert into range_parted values ('a', 1); -insert into range_parted values ('a', 10); --- fail -insert into range_parted values ('a', 20); --- ok -insert into range_parted values ('b', 1); -insert into range_parted values ('b', 10); --- fail (partition key (b+0) is null) -insert into range_parted values ('a'); - --- Check default partition -create table part_def partition of range_parted default; --- fail -insert into part_def values ('b', 10); --- ok -insert into part_def values ('c', 10); -insert into range_parted values (null, null); -insert into range_parted values ('a', null); -insert into range_parted values (null, 19); -insert into range_parted values ('b', 20); - -select tableoid::regclass, * from range_parted; --- ok -insert into list_parted values (null, 1); -insert into list_parted (a) values ('aA'); --- fail (partition of part_ee_ff not found in both cases) -insert into list_parted values ('EE', 0); -insert into part_ee_ff values ('EE', 0); --- ok -insert into list_parted values ('EE', 1); -insert into part_ee_ff values ('EE', 10); -select tableoid::regclass, * from list_parted; - --- some more tests to exercise tuple-routing with multi-level partitioning -create table part_gg partition of list_parted for values in ('gg') partition by range (b); -create table part_gg1 partition of part_gg for values from (minvalue) to (1); -create table part_gg2 partition of part_gg for values from (1) to (10) partition by range (b); -create table part_gg2_1 partition of part_gg2 for values from (1) to (5); -create table part_gg2_2 partition of part_gg2 for values from (5) to (10); - -create table part_ee_ff3 partition of part_ee_ff for values from (20) to (30) partition by range (b); -create table part_ee_ff3_1 partition of part_ee_ff3 for values from (20) to (25); -create table part_ee_ff3_2 partition of part_ee_ff3 for values from (25) to (30); - -truncate list_parted; -insert into list_parted values ('aa'), ('cc'); -insert into list_parted select 'Ff', s.a from generate_series(1, 29) s(a); -insert into list_parted select 'gg', s.a from generate_series(1, 9) s(a); -insert into list_parted (b) values (1); -select tableoid::regclass::text, a, min(b) as min_b, max(b) as max_b from list_parted group by 1, 2 order by 1; - --- direct partition inserts should check hash partition bound constraint - --- Use hand-rolled hash functions and operator classes to get predictable --- result on different machines. The hash function for int4 simply returns --- the sum of the values passed to it and the one for text returns the length --- of the non-empty string value passed to it or 0. - -create or replace function part_hashint4_noop(value int4, seed int8) -returns int8 as $$ -select value + seed; -$$ language sql immutable; - -create operator class part_test_int4_ops -for type int4 -using hash as -operator 1 =, -function 2 part_hashint4_noop(int4, int8); - -create or replace function part_hashtext_length(value text, seed int8) -RETURNS int8 AS $$ -select length(coalesce(value, ''))::int8 -$$ language sql immutable; - -create operator class part_test_text_ops -for type text -using hash as -operator 1 =, -function 2 part_hashtext_length(text, int8); - -create table hash_parted ( - a int -) partition by hash (a part_test_int4_ops); -create table hpart0 partition of hash_parted for values with (modulus 4, remainder 0); -create table hpart1 partition of hash_parted for values with (modulus 4, remainder 1); -create table hpart2 partition of hash_parted for values with (modulus 4, remainder 2); -create table hpart3 partition of hash_parted for values with (modulus 4, remainder 3); - -insert into hash_parted values(generate_series(1,10)); - --- direct insert of values divisible by 4 - ok; -insert into hpart0 values(12),(16); --- fail; -insert into hpart0 values(11); --- 11 % 4 -> 3 remainder i.e. valid data for hpart3 partition -insert into hpart3 values(11); - --- view data -select tableoid::regclass as part, a, a%4 as "remainder = a % 4" -from hash_parted order by part; - --- test \d+ output on a table which has both partitioned and unpartitioned --- partitions -\d+ list_parted - --- cleanup -drop table range_parted, list_parted; -drop table hash_parted; - --- test that a default partition added as the first partition accepts any value --- including null -create table list_parted (a int) partition by list (a); -create table part_default partition of list_parted default; -\d+ part_default -insert into part_default values (null); -insert into part_default values (1); -insert into part_default values (-1); -select tableoid::regclass, a from list_parted; --- cleanup -drop table list_parted; - --- more tests for certain multi-level partitioning scenarios -create table mlparted (a int, b int) partition by range (a, b); -create table mlparted1 (b int not null, a int not null) partition by range ((b+0)); -create table mlparted11 (like mlparted1); -alter table mlparted11 drop a; -alter table mlparted11 add a int; -alter table mlparted11 drop a; -alter table mlparted11 add a int not null; --- attnum for key attribute 'a' is different in mlparted, mlparted1, and mlparted11 -select attrelid::regclass, attname, attnum -from pg_attribute -where attname = 'a' - and (attrelid = 'mlparted'::regclass - or attrelid = 'mlparted1'::regclass - or attrelid = 'mlparted11'::regclass) -order by attrelid::regclass::text; - -alter table mlparted1 attach partition mlparted11 for values from (2) to (5); -alter table mlparted attach partition mlparted1 for values from (1, 2) to (1, 10); - --- check that "(1, 2)" is correctly routed to mlparted11. -insert into mlparted values (1, 2); -select tableoid::regclass, * from mlparted; - --- check that proper message is shown after failure to route through mlparted1 -insert into mlparted (a, b) values (1, 5); - -truncate mlparted; -alter table mlparted add constraint check_b check (b = 3); - --- have a BR trigger modify the row such that the check_b is violated -create function mlparted11_trig_fn() -returns trigger AS -$$ -begin - NEW.b := 4; - return NEW; -end; -$$ -language plpgsql; -create trigger mlparted11_trig before insert ON mlparted11 - for each row execute procedure mlparted11_trig_fn(); - --- check that the correct row is shown when constraint check_b fails after --- "(1, 2)" is routed to mlparted11 (actually "(1, 4)" would be shown due --- to the BR trigger mlparted11_trig_fn) -insert into mlparted values (1, 2); -drop trigger mlparted11_trig on mlparted11; -drop function mlparted11_trig_fn(); - --- check that inserting into an internal partition successfully results in --- checking its partition constraint before inserting into the leaf partition --- selected by tuple-routing -insert into mlparted1 (a, b) values (2, 3); - --- check routing error through a list partitioned table when the key is null -create table lparted_nonullpart (a int, b char) partition by list (b); -create table lparted_nonullpart_a partition of lparted_nonullpart for values in ('a'); -insert into lparted_nonullpart values (1); -drop table lparted_nonullpart; - --- check that RETURNING works correctly with tuple-routing -alter table mlparted drop constraint check_b; -create table mlparted12 partition of mlparted1 for values from (5) to (10); -create table mlparted2 (b int not null, a int not null); -alter table mlparted attach partition mlparted2 for values from (1, 10) to (1, 20); -create table mlparted3 partition of mlparted for values from (1, 20) to (1, 30); -create table mlparted4 (like mlparted); -alter table mlparted4 drop a; -alter table mlparted4 add a int not null; -alter table mlparted attach partition mlparted4 for values from (1, 30) to (1, 40); -with ins (a, b, c) as - (insert into mlparted (b, a) select s.a, 1 from generate_series(2, 39) s(a) returning tableoid::regclass, *) - select a, b, min(c), max(c) from ins group by a, b order by 1; - -alter table mlparted add c text; -create table mlparted5 (c text, a int not null, b int not null) partition by list (c); -create table mlparted5a (a int not null, c text, b int not null); -alter table mlparted5 attach partition mlparted5a for values in ('a'); -alter table mlparted attach partition mlparted5 for values from (1, 40) to (1, 50); -alter table mlparted add constraint check_b check (a = 1 and b < 45); -insert into mlparted values (1, 45, 'a'); -create function mlparted5abrtrig_func() returns trigger as $$ begin new.c = 'b'; return new; end; $$ language plpgsql; -create trigger mlparted5abrtrig before insert on mlparted5a for each row execute procedure mlparted5abrtrig_func(); -insert into mlparted5 (a, b, c) values (1, 40, 'a'); -drop table mlparted5; -alter table mlparted drop constraint check_b; - --- Check multi-level default partition -create table mlparted_def partition of mlparted default partition by range(a); -create table mlparted_def1 partition of mlparted_def for values from (40) to (50); -create table mlparted_def2 partition of mlparted_def for values from (50) to (60); -insert into mlparted values (40, 100); -insert into mlparted_def1 values (42, 100); -insert into mlparted_def2 values (54, 50); --- fail -insert into mlparted values (70, 100); -insert into mlparted_def1 values (52, 50); -insert into mlparted_def2 values (34, 50); --- ok -create table mlparted_defd partition of mlparted_def default; -insert into mlparted values (70, 100); - -select tableoid::regclass, * from mlparted_def; - --- Check multi-level tuple routing with attributes dropped from the --- top-most parent. First remove the last attribute. -alter table mlparted add d int, add e int; -alter table mlparted drop e; -create table mlparted5 partition of mlparted - for values from (1, 40) to (1, 50) partition by range (c); -create table mlparted5_ab partition of mlparted5 - for values from ('a') to ('c') partition by list (c); --- This partitioned table should remain with no partitions. -create table mlparted5_cd partition of mlparted5 - for values from ('c') to ('e') partition by list (c); -create table mlparted5_a partition of mlparted5_ab for values in ('a'); -create table mlparted5_b (d int, b int, c text, a int); -alter table mlparted5_ab attach partition mlparted5_b for values in ('b'); -truncate mlparted; -insert into mlparted values (1, 2, 'a', 1); -insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a -insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b -insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails -insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails -select tableoid::regclass, * from mlparted order by a, b, c, d; -alter table mlparted drop d; -truncate mlparted; --- Remove the before last attribute. -alter table mlparted add e int, add d int; -alter table mlparted drop e; -insert into mlparted values (1, 2, 'a', 1); -insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a -insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b -insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails -insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails -select tableoid::regclass, * from mlparted order by a, b, c, d; -alter table mlparted drop d; -drop table mlparted5; - --- check that message shown after failure to find a partition shows the --- appropriate key description (or none) in various situations -create table key_desc (a int, b int) partition by list ((a+0)); -create table key_desc_1 partition of key_desc for values in (1) partition by range (b); - -create user regress_insert_other_user; -grant select (a) on key_desc_1 to regress_insert_other_user; -grant insert on key_desc to regress_insert_other_user; - -set role regress_insert_other_user; --- no key description is shown -insert into key_desc values (1, 1); - -reset role; -grant select (b) on key_desc_1 to regress_insert_other_user; -set role regress_insert_other_user; --- key description (b)=(1) is now shown -insert into key_desc values (1, 1); - --- key description is not shown if key contains expression -insert into key_desc values (2, 1); -reset role; -revoke all on key_desc from regress_insert_other_user; -revoke all on key_desc_1 from regress_insert_other_user; -drop role regress_insert_other_user; -drop table key_desc, key_desc_1; - --- test minvalue/maxvalue restrictions -create table mcrparted (a int, b int, c int) partition by range (a, abs(b), c); -create table mcrparted0 partition of mcrparted for values from (minvalue, 0, 0) to (1, maxvalue, maxvalue); -create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, minvalue); -create table mcrparted4 partition of mcrparted for values from (21, minvalue, 0) to (30, 20, minvalue); - --- check multi-column range partitioning expression enforces the same --- constraint as what tuple-routing would determine it to be -create table mcrparted0 partition of mcrparted for values from (minvalue, minvalue, minvalue) to (1, maxvalue, maxvalue); -create table mcrparted1 partition of mcrparted for values from (2, 1, minvalue) to (10, 5, 10); -create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, maxvalue); -create table mcrparted3 partition of mcrparted for values from (11, 1, 1) to (20, 10, 10); -create table mcrparted4 partition of mcrparted for values from (21, minvalue, minvalue) to (30, 20, maxvalue); -create table mcrparted5 partition of mcrparted for values from (30, 21, 20) to (maxvalue, maxvalue, maxvalue); - --- null not allowed in range partition -insert into mcrparted values (null, null, null); - --- routed to mcrparted0 -insert into mcrparted values (0, 1, 1); -insert into mcrparted0 values (0, 1, 1); - --- routed to mcparted1 -insert into mcrparted values (9, 1000, 1); -insert into mcrparted1 values (9, 1000, 1); -insert into mcrparted values (10, 5, -1); -insert into mcrparted1 values (10, 5, -1); -insert into mcrparted values (2, 1, 0); -insert into mcrparted1 values (2, 1, 0); - --- routed to mcparted2 -insert into mcrparted values (10, 6, 1000); -insert into mcrparted2 values (10, 6, 1000); -insert into mcrparted values (10, 1000, 1000); -insert into mcrparted2 values (10, 1000, 1000); - --- no partition exists, nor does mcrparted3 accept it -insert into mcrparted values (11, 1, -1); -insert into mcrparted3 values (11, 1, -1); - --- routed to mcrparted5 -insert into mcrparted values (30, 21, 20); -insert into mcrparted5 values (30, 21, 20); -insert into mcrparted4 values (30, 21, 20); -- error - --- check rows -select tableoid::regclass::text, * from mcrparted order by 1; - --- cleanup -drop table mcrparted; - --- check that a BR constraint can't make partition contain violating rows -create table brtrigpartcon (a int, b text) partition by list (a); -create table brtrigpartcon1 partition of brtrigpartcon for values in (1); -create or replace function brtrigpartcon1trigf() returns trigger as $$begin new.a := 2; return new; end$$ language plpgsql; -create trigger brtrigpartcon1trig before insert on brtrigpartcon1 for each row execute procedure brtrigpartcon1trigf(); -insert into brtrigpartcon values (1, 'hi there'); -insert into brtrigpartcon1 values (1, 'hi there'); - --- check that the message shows the appropriate column description in a --- situation where the partitioned table is not the primary ModifyTable node -create table inserttest3 (f1 text default 'foo', f2 text default 'bar', f3 int); -create role regress_coldesc_role; -grant insert on inserttest3 to regress_coldesc_role; -grant insert on brtrigpartcon to regress_coldesc_role; -revoke select on brtrigpartcon from regress_coldesc_role; -set role regress_coldesc_role; -with result as (insert into brtrigpartcon values (1, 'hi there') returning 1) - insert into inserttest3 (f3) select * from result; -reset role; - --- cleanup -revoke all on inserttest3 from regress_coldesc_role; -revoke all on brtrigpartcon from regress_coldesc_role; -drop role regress_coldesc_role; -drop table inserttest3; -drop table brtrigpartcon; -drop function brtrigpartcon1trigf(); - --- check that "do nothing" BR triggers work with tuple-routing -create table donothingbrtrig_test (a int, b text) partition by list (a); -create table donothingbrtrig_test1 (b text, a int); -create table donothingbrtrig_test2 (c text, b text, a int); -alter table donothingbrtrig_test2 drop column c; -create or replace function donothingbrtrig_func() returns trigger as $$begin raise notice 'b: %', new.b; return NULL; end$$ language plpgsql; -create trigger donothingbrtrig1 before insert on donothingbrtrig_test1 for each row execute procedure donothingbrtrig_func(); -create trigger donothingbrtrig2 before insert on donothingbrtrig_test2 for each row execute procedure donothingbrtrig_func(); -alter table donothingbrtrig_test attach partition donothingbrtrig_test1 for values in (1); -alter table donothingbrtrig_test attach partition donothingbrtrig_test2 for values in (2); -insert into donothingbrtrig_test values (1, 'foo'), (2, 'bar'); -copy donothingbrtrig_test from stdout; -1 baz -2 qux -\. -select tableoid::regclass, * from donothingbrtrig_test; - --- cleanup -drop table donothingbrtrig_test; -drop function donothingbrtrig_func(); - --- check multi-column range partitioning with minvalue/maxvalue constraints -create table mcrparted (a text, b int) partition by range(a, b); -create table mcrparted1_lt_b partition of mcrparted for values from (minvalue, minvalue) to ('b', minvalue); -create table mcrparted2_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue); -create table mcrparted3_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue); -create table mcrparted4_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0); -create table mcrparted5_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10); -create table mcrparted6_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue); -create table mcrparted7_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue); -create table mcrparted8_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, maxvalue); - -\d+ mcrparted -\d+ mcrparted1_lt_b -\d+ mcrparted2_b -\d+ mcrparted3_c_to_common -\d+ mcrparted4_common_lt_0 -\d+ mcrparted5_common_0_to_10 -\d+ mcrparted6_common_ge_10 -\d+ mcrparted7_gt_common_lt_d -\d+ mcrparted8_ge_d - -insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10), - ('comm', -10), ('common', -10), ('common', 0), ('common', 10), - ('commons', 0), ('d', -10), ('e', 0); -select tableoid::regclass, * from mcrparted order by a, b; -drop table mcrparted; - --- check that wholerow vars in the RETURNING list work with partitioned tables -create table returningwrtest (a int) partition by list (a); -create table returningwrtest1 partition of returningwrtest for values in (1); -insert into returningwrtest values (1) returning returningwrtest; - --- check also that the wholerow vars in RETURNING list are converted as needed -alter table returningwrtest add b text; -create table returningwrtest2 (b text, c int, a int); -alter table returningwrtest2 drop c; -alter table returningwrtest attach partition returningwrtest2 for values in (2); -insert into returningwrtest values (2, 'foo') returning returningwrtest; -drop table returningwrtest; -*/ --- Clean up -DO $d$ -declare - l_rec record; -begin - for l_rec in (select foreign_table_schema, foreign_table_name - from information_schema.foreign_tables) loop - execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); - end loop; -end; -$d$; ---Testcase 21: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 22: -DROP SERVER influxdb_svr CASCADE; ---Testcase 23: -DROP EXTENSION influxdb_fdw; diff --git a/expected/14.0/schemaless/extra/select_having.out b/expected/14.0/schemaless/extra/select_having.out deleted file mode 100644 index 93cefbd..0000000 --- a/expected/14.0/schemaless/extra/select_having.out +++ /dev/null @@ -1,133 +0,0 @@ --- --- SELECT_HAVING --- -\set ECHO none ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 4: -CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -CREATE FOREIGN TABLE test_having_nsc (a int, b int, c char(8), d char) SERVER influxdb_svr OPTIONS (table 'test_having'); ---Testcase 5: -INSERT INTO test_having_nsc VALUES (0, 1, 'XXXX', 'A'); ---Testcase 6: -INSERT INTO test_having_nsc VALUES (1, 2, 'AAAA', 'b'); ---Testcase 7: -INSERT INTO test_having_nsc VALUES (2, 2, 'AAAA', 'c'); ---Testcase 8: -INSERT INTO test_having_nsc VALUES (3, 3, 'BBBB', 'D'); ---Testcase 9: -INSERT INTO test_having_nsc VALUES (4, 3, 'BBBB', 'e'); ---Testcase 10: -INSERT INTO test_having_nsc VALUES (5, 3, 'bbbb', 'F'); ---Testcase 11: -INSERT INTO test_having_nsc VALUES (6, 4, 'cccc', 'g'); ---Testcase 12: -INSERT INTO test_having_nsc VALUES (7, 4, 'cccc', 'h'); ---Testcase 13: -INSERT INTO test_having_nsc VALUES (8, 4, 'CCCC', 'I'); ---Testcase 14: -INSERT INTO test_having_nsc VALUES (9, 4, 'CCCC', 'j'); ---Testcase 15: -SELECT (fields->>'b')::int b, fields->>'c' c FROM test_having - GROUP BY fields->>'b', fields->>'c' HAVING count(*) = 1 ORDER BY (fields->>'b')::int, fields->>'c'; - b | c ----+---------- - 1 | XXXX - 3 | bbbb -(2 rows) - --- HAVING is effectively equivalent to WHERE in this case ---Testcase 16: -SELECT (fields->>'b')::int b, fields->>'c' c FROM test_having - GROUP BY fields->>'b', fields->>'c' HAVING (fields->>'b')::int = 3 ORDER BY (fields->>'b')::int, fields->>'c'; - b | c ----+---------- - 3 | bbbb - 3 | BBBB -(2 rows) - ---Testcase 17: -SELECT lower((fields->>'c')::char(8)), count(fields->>'c') FROM test_having - GROUP BY lower((fields->>'c')::char(8)) HAVING count(*) > 2 OR min((fields->>'a')::int) = max((fields->>'a')::int) - ORDER BY lower((fields->>'c')::char(8)); - lower | count --------+------- - bbbb | 3 - cccc | 4 - xxxx | 1 -(3 rows) - ---Testcase 18: -SELECT fields->>'c' c, max((fields->>'a')::int) FROM test_having - GROUP BY fields->>'c' HAVING count(*) > 2 OR min((fields->>'a')::int) = max((fields->>'a')::int) - ORDER BY fields->>'c'; - c | max -----------+----- - bbbb | 5 - XXXX | 0 -(2 rows) - --- test degenerate cases involving HAVING without GROUP BY --- Per SQL spec, these should generate 0 or 1 row, even without aggregates ---Testcase 19: -SELECT min((fields->>'a')::int), max((fields->>'a')::int) FROM test_having HAVING min((fields->>'a')::int) = max((fields->>'a')::int); - min | max ------+----- -(0 rows) - ---Testcase 20: -SELECT min((fields->>'a')::int), max((fields->>'a')::int) FROM test_having HAVING min((fields->>'a')::int) < max((fields->>'a')::int); - min | max ------+----- - 0 | 9 -(1 row) - --- errors: ungrouped column references ---Testcase 21: -SELECT (fields->>'a')::int a FROM test_having HAVING min((fields->>'a')::int) < max((fields->>'a')::int); -ERROR: column "test_having.fields" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT (fields->>'a')::int a FROM test_having HAVING min((fi... - ^ ---Testcase 22: -SELECT 1 AS one FROM test_having HAVING (fields->>'a')::int > 1; -ERROR: column "test_having.fields" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT 1 AS one FROM test_having HAVING (fields->>'a')::int ... - ^ --- the really degenerate case: need not scan table at all ---Testcase 23: -SELECT 1 AS one FROM test_having HAVING 1 > 2; - one ------ -(0 rows) - ---Testcase 24: -SELECT 1 AS one FROM test_having HAVING 1 < 2; - one ------ - 1 -(1 row) - --- and just to prove that we aren't scanning the table: ---Testcase 25: -SELECT 1 AS one FROM test_having WHERE 1/(fields->>'a')::int = 1 HAVING 1 < 2; - one ------ - 1 -(1 row) - ---Testcase 26: --- Clean up: -DELETE FROM test_having_nsc; -DROP FOREIGN TABLE test_having; -DROP FOREIGN TABLE test_having_nsc; ---Testcase 27: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 28: -DROP SERVER influxdb_svr CASCADE; ---Testcase 29: -DROP EXTENSION influxdb_fdw; diff --git a/expected/13.4/aggregate.out b/expected/14.5/aggregate.out similarity index 99% rename from expected/13.4/aggregate.out rename to expected/14.5/aggregate.out index 5639a88..36b0eca 100644 --- a/expected/13.4/aggregate.out +++ b/expected/14.5/aggregate.out @@ -10,9 +10,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); diff --git a/expected/14.0/extra/aggregates.out b/expected/14.5/extra/aggregates.out similarity index 99% rename from expected/14.0/extra/aggregates.out rename to expected/14.5/extra/aggregates.out index a452461..78b3805 100644 --- a/expected/14.0/extra/aggregates.out +++ b/expected/14.5/extra/aggregates.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( unique1 int4, diff --git a/expected/14.0/extra/influxdb_fdw_post.out b/expected/14.5/extra/influxdb_fdw_post.out similarity index 99% rename from expected/14.0/extra/influxdb_fdw_post.out rename to expected/14.5/extra/influxdb_fdw_post.out index 97b0156..2c5cc8d 100644 --- a/expected/14.0/extra/influxdb_fdw_post.out +++ b/expected/14.5/extra/influxdb_fdw_post.out @@ -8,16 +8,16 @@ CREATE EXTENSION influxdb_fdw; CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server -- =================================================================== @@ -3120,7 +3120,7 @@ DROP FOREIGN TABLE local_tbl; --Testcase 208: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 209: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; --Testcase 210: @@ -7073,6 +7073,31 @@ SELECT * FROM foreign_tbl; 10 | 15 (2 rows) +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); + QUERY PLAN +-------------------------------------------------------- + Insert on public.base_tbl + Batch Size: 1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, "*VALUES*".column2 +(4 rows) + +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +ERROR: new row violates check option for view "rw_view" +DETAIL: Failing row contains (10, 5). +SELECT * FROM foreign_tbl; + a | b +----+---- + 10 | 5 + 10 | 15 + 10 | 15 + 10 | 5 +(4 rows) + +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); --EXPLAIN (VERBOSE, COSTS OFF) --UPDATE rw_view SET b = b + 5; --UPDATE rw_view SET b = b + 5; -- should fail @@ -7158,6 +7183,25 @@ SELECT * FROM foreign_tbl; --UPDATE rw_view SET b = b + 15; --UPDATE rw_view SET b = b + 15; -- ok --SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); + QUERY PLAN +-------------------------------------------------------- + Insert on public.parent_tbl + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, "*VALUES*".column2 +(3 rows) + +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +ERROR: Not support partition insert +SELECT * FROM foreign_tbl; + a | b +---+--- +(0 rows) + +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); --Testcase 521: DROP FOREIGN TABLE foreign_tbl CASCADE; --Testcase 522: @@ -9433,7 +9477,7 @@ ALTER SERVER loopback OPTIONS (SET keep_connections 'on'); BEGIN; --Testcase 699: CREATE SERVER batch10 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS(dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT, batch_size '10' ); + OPTIONS(dbname 'postdb', :SERVER, batch_size '10' ); --Testcase 700: SELECT count(*) FROM pg_foreign_server diff --git a/expected/10.18/extra/insert.out b/expected/14.5/extra/insert.out similarity index 99% rename from expected/10.18/extra/insert.out rename to expected/14.5/extra/insert.out index d3e4053..72490a2 100644 --- a/expected/10.18/extra/insert.out +++ b/expected/14.5/extra/insert.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list -- diff --git a/expected/14.0/extra/join.out b/expected/14.5/extra/join.out similarity index 99% rename from expected/14.0/extra/join.out rename to expected/14.5/extra/join.out index fe8b496..8e89483 100644 --- a/expected/14.0/extra/join.out +++ b/expected/14.5/extra/join.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- diff --git a/expected/14.0/extra/limit.out b/expected/14.5/extra/limit.out similarity index 99% rename from expected/14.0/extra/limit.out rename to expected/14.5/extra/limit.out index bfa7229..3794c87 100644 --- a/expected/14.0/extra/limit.out +++ b/expected/14.5/extra/limit.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- LIMIT -- Check the LIMIT/OFFSET feature of SELECT diff --git a/expected/13.4/extra/prepare.out b/expected/14.5/extra/prepare.out similarity index 99% rename from expected/13.4/extra/prepare.out rename to expected/14.5/extra/prepare.out index 793da9d..fe4d5a0 100644 --- a/expected/13.4/extra/prepare.out +++ b/expected/14.5/extra/prepare.out @@ -2,14 +2,14 @@ -- of the pg_prepared_statements view as prepared statements are -- created and removed. \set ECHO none ---Testcase 27: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 28: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 30: + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: CREATE FOREIGN TABLE tenk1 ( unique1 int4, unique2 int4, @@ -30,29 +30,29 @@ CREATE FOREIGN TABLE tenk1 ( ) SERVER influxdb_svr OPTIONS (table 'tenk'); -- Does not support this command -- ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 31: +--Testcase 5: CREATE FOREIGN TABLE road ( name text, thepath path ) SERVER influxdb_svr; ---Testcase 32: +--Testcase 6: CREATE FOREIGN TABLE road_tmp (a int, b int) SERVER influxdb_svr; ---Testcase 1: +--Testcase 7: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) ---Testcase 2: +--Testcase 8: PREPARE q1 AS SELECT a AS a FROM road_tmp; ---Testcase 3: +--Testcase 9: EXECUTE q1; a --- 1 (1 row) ---Testcase 4: +--Testcase 10: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------+----------------- @@ -60,23 +60,23 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; (1 row) -- should fail ---Testcase 5: +--Testcase 11: PREPARE q1 AS SELECT b FROM road_tmp; ERROR: prepared statement "q1" already exists -- should succeed DEALLOCATE q1; ---Testcase 6: +--Testcase 12: PREPARE q1 AS SELECT b FROM road_tmp; ---Testcase 7: +--Testcase 13: EXECUTE q1; b --- 2 (1 row) ---Testcase 8: +--Testcase 14: PREPARE q2 AS SELECT b AS b FROM road_tmp; ---Testcase 9: +--Testcase 15: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------+----------------- @@ -86,7 +86,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; -- sql92 syntax DEALLOCATE PREPARE q1; ---Testcase 10: +--Testcase 16: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------+----------------- @@ -95,30 +95,30 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; DEALLOCATE PREPARE q2; -- the view should return the empty set again ---Testcase 11: +--Testcase 17: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) -- parameterized queries ---Testcase 12: +--Testcase 18: PREPARE q2(text) AS SELECT datname, datistemplate, datallowconn FROM pg_database WHERE datname = $1; ---Testcase 13: +--Testcase 19: EXECUTE q2('postgres'); datname | datistemplate | datallowconn ----------+---------------+-------------- postgres | f | t (1 row) ---Testcase 14: +--Testcase 20: PREPARE q3(text, int, float, boolean, smallint) AS SELECT * FROM tenk1 WHERE string4 = $1 AND (four = $2 OR ten = $3::bigint OR true = $4 OR odd = $5::int) ORDER BY unique1; ---Testcase 15: +--Testcase 21: EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- @@ -154,36 +154,36 @@ EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); (29 rows) -- too few params ---Testcase 16: +--Testcase 22: EXECUTE q3('bool'); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 1. -- too many params ---Testcase 17: +--Testcase 23: EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 6. -- wrong param types ---Testcase 18: +--Testcase 24: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); ERROR: parameter $3 of type boolean cannot be coerced to the expected type double precision LINE 1: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'byte... ^ HINT: You will need to rewrite or cast the expression. -- invalid type ---Testcase 19: +--Testcase 25: PREPARE q4(nonexistenttype) AS SELECT $1; ERROR: type "nonexistenttype" does not exist LINE 1: PREPARE q4(nonexistenttype) AS SELECT $1; ^ -- create table as execute ---Testcase 20: +--Testcase 26: PREPARE q5(int, text) AS SELECT * FROM tenk1 WHERE unique1 = $1 OR stringu1 = $2 ORDER BY unique1; ---Testcase 33: +--Testcase 27: CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); ---Testcase 21: +--Testcase 28: SELECT * FROM q5_prep_results; unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- @@ -205,23 +205,23 @@ SELECT * FROM q5_prep_results; 9961 | 2058 | 1 | 1 | 1 | 1 | 61 | 961 | 1961 | 4961 | 9961 | 122 | 123 | DTAAAA | EBDAAA | OOOOxx (16 rows) ---Testcase 34: +--Testcase 29: CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') WITH NO DATA; ---Testcase 22: +--Testcase 30: SELECT * FROM q5_prep_nodata; unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- (0 rows) -- unknown or unspecified parameter types: should succeed ---Testcase 23: +--Testcase 31: PREPARE q6 AS SELECT * FROM tenk1 WHERE unique1 = $1 AND stringu1 = $2; ---Testcase 24: +--Testcase 32: PREPARE q7(unknown) AS SELECT * FROM road WHERE thepath = $1; ---Testcase 25: +--Testcase 33: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types @@ -244,7 +244,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements -- test DEALLOCATE ALL; DEALLOCATE ALL; ---Testcase 26: +--Testcase 34: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types diff --git a/expected/14.0/extra/select.out b/expected/14.5/extra/select.out similarity index 99% rename from expected/14.0/extra/select.out rename to expected/14.5/extra/select.out index e74398d..7be1bdf 100644 --- a/expected/14.0/extra/select.out +++ b/expected/14.5/extra/select.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( unique1 int4, diff --git a/expected/13.4/extra/select_having.out b/expected/14.5/extra/select_having.out similarity index 96% rename from expected/13.4/extra/select_having.out rename to expected/14.5/extra/select_having.out index dc232a0..036a7d3 100644 --- a/expected/13.4/extra/select_having.out +++ b/expected/14.5/extra/select_having.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; --Testcase 5: diff --git a/expected/14.0/influxdb_fdw.out b/expected/14.5/influxdb_fdw.out similarity index 96% rename from expected/14.0/influxdb_fdw.out rename to expected/14.5/influxdb_fdw.out index dfe3436..506d3da 100644 --- a/expected/14.0/influxdb_fdw.out +++ b/expected/14.5/influxdb_fdw.out @@ -10,9 +10,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --Testcase 6: @@ -1128,14 +1128,14 @@ SELECT * FROM t5; SELECT * FROM public.influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Testcase 146: SELECT influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Test pushdown LIMIT...OFFSET @@ -1579,17 +1579,61 @@ SELECT * FROM cpu; 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t (5 rows) +-- InfluxDB_FDW will store time data for Field values as a strings +--Testcase 204: +CREATE FOREIGN TABLE tmp_time ( +time timestamp, +c1 time, +c2 timestamp, +c3 timestamp with time zone +) SERVER server1 OPTIONS (table 'tmp_time'); +--Testcase 205: +SELECT * FROM tmp_time; + time | c1 | c2 | c3 +------+----+----+---- +(0 rows) + +--Testcase 206: +INSERT INTO tmp_time (time, c1) VALUES ('1900-01-01 01:01:01', '01:02:03'); +--Testcase 207: +INSERT INTO tmp_time (time, c1) VALUES ('2100-01-01 01:01:01', '04:05:06'); +--Testcase 208: +INSERT INTO tmp_time (time, c1) VALUES ('1990-01-01 01:01:01', '07:08:09'); +--Testcase 209: +INSERT INTO tmp_time (time, c2) VALUES ('2020-12-27 03:02:56.634467', '1950-02-02 02:02:02'); +--Testcase 210: +INSERT INTO tmp_time (time, c3) VALUES ('2021-12-27 03:02:56.668301', '1800-02-02 02:02:02+9'); +--Testcase 210: +INSERT INTO tmp_time (time, c1, c2, c3) VALUES ('2022-05-06 07:08:09', '07:08:09', '2022-05-06 07:08:09', '2022-05-06 07:08:09+9'); +--Testcase 211: +-- 1800-02-02 02:02:02+9 is Daylight Saving Time (DST) changes in Japan. +-- Timezone setting Japan so it will plus 18s:59 +-- https://www.timeanddate.com/time/zone/japan/tokyo?syear=1850 +SELECT * FROM tmp_time; + time | c1 | c2 | c3 +----------------------------+----------+---------------------+------------------------------ + 1900-01-01 01:01:01 | 01:02:03 | | + 1990-01-01 01:01:01 | 07:08:09 | | + 2020-12-27 03:02:56.634467 | | 1950-02-02 02:02:02 | + 2021-12-27 03:02:56.668301 | | | 1800-02-02 02:21:01+09:18:59 + 2022-05-06 07:08:09 | 07:08:09 | 2022-05-06 07:08:09 | 2022-05-06 07:08:09+09 + 2100-01-01 01:01:01 | 04:05:06 | | +(6 rows) + -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP USER MAPPING FOR CURRENT_USER SERVER server1; --Testcase 202: DROP SERVER server1 CASCADE; -NOTICE: drop cascades to 5 other objects +NOTICE: drop cascades to 6 other objects DETAIL: drop cascades to foreign table cpu drop cascades to foreign table numbers drop cascades to foreign table t3 drop cascades to foreign table t4 drop cascades to foreign table tx +drop cascades to foreign table tmp_time --Testcase 203: DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/14.5/option.out b/expected/14.5/option.out new file mode 100644 index 0000000..59b83f6 --- /dev/null +++ b/expected/14.5/option.out @@ -0,0 +1,304 @@ +--Testcase 1: +SET datestyle=ISO; +--Testcase 2: +CREATE EXTENSION influxdb_fdw; +-- version not valid +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '9999', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +--Testcase 4: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version 'dummy', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '-1', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +-- host must be not NULL or not empty +--Testcase 6: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', port '38086', version '2', retention_policy ''); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 8: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 9: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Server Host not specified +--Testcase 10: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 11: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host '', port '38086', version '2', retention_policy ''); +--Testcase 12: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 13: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 14: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Server Host not specified +--Testcase 15: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- dbname must be not NULL or not empty +--Testcase 16: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 17: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 18: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 19: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Database not specified +--Testcase 20: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 21: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname '', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 22: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 23: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 24: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Database not specified +--Testcase 25: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- retention_policy can be NULL +--Testcase 26: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2'); +--Testcase 27: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 28: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 29: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 30: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 31: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 32: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 33: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 34: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 35: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- auth_token can be NULL +--Testcase 36: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 37: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 38: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 39: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: unauthorized access +--Testcase 40: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- auth_token invalid +--Testcase 41: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 42: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'wrong_token'); +--Testcase 43: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 44: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: Unauthorized +--Testcase 45: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 46: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 47: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token ''); +--Testcase 48: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 49: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: unauthorized access +--Testcase 50: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- user must can be NULL +--Testcase 51: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 52: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (password 'pass'); +--Testcase 53: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 54: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 55: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 56: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 57: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password 'pass'); +--Testcase 58: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 59: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 60: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- password can be NULL +--Testcase 61: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 62: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user'); +--Testcase 63: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 65: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: authorization failed +--Testcase 65: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 66: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 67: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password ''); +--Testcase 68: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 69: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: authorization failed +--Testcase 70: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 71: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 72: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password ''); +--Testcase 73: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 74: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 75: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 76: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 77: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 78: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 79: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 1 | 100 + a | version 1 | 200 + a | version 1 | 300 + b | version 1 | 400 + b | version 1 | 500 +(5 rows) + +--Testcase 80: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- Test if version option is not set +-- Connect to InfluxDB version 1 +--Testcase 81: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086'); +--Testcase 82: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 83: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 84: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 1 | 100 + a | version 1 | 200 + a | version 1 | 300 + b | version 1 | 400 + b | version 1 | 500 +(5 rows) + +--Testcase 85: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- Connect to InfluxDB version 2 +--Testcase 86: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', retention_policy ''); +--Testcase 87: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 88: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 89: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 90: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 91: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/14.0/schemaless/add_fields.out b/expected/14.5/schemaless/add_fields.out similarity index 99% rename from expected/14.0/schemaless/add_fields.out rename to expected/14.5/schemaless/add_fields.out index ea2577e..8f9d86b 100644 --- a/expected/14.0/schemaless/add_fields.out +++ b/expected/14.5/schemaless/add_fields.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data -\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null +:INIT_FIELDS_ORIGINAL; --Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); --Testcase 5: @@ -112,7 +112,7 @@ SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), l -------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_1; --Testcase 13: DROP FOREIGN TABLE sctbl1; --Testcase 14: @@ -659,7 +659,7 @@ SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fiel -------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_20; --Testcase 64: DROP FOREIGN TABLE sctbl1; --Testcase 65: diff --git a/expected/14.0/schemaless/add_multi_key.out b/expected/14.5/schemaless/add_multi_key.out similarity index 99% rename from expected/14.0/schemaless/add_multi_key.out rename to expected/14.5/schemaless/add_multi_key.out index 87ac8da..39e6506 100644 --- a/expected/14.0/schemaless/add_multi_key.out +++ b/expected/14.5/schemaless/add_multi_key.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data original -\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null +:INIT_MULTILEY_ORIGINAL; -- Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -------------------------------------------------TC for before update test data------------------ @@ -1102,7 +1102,7 @@ SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3 ---------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1'); @@ -1844,7 +1844,7 @@ SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint -- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1, t2, t3, t4, t5'); diff --git a/expected/12.8/schemaless/add_tags.out b/expected/14.5/schemaless/add_tags.out similarity index 99% rename from expected/12.8/schemaless/add_tags.out rename to expected/14.5/schemaless/add_tags.out index 5549a77..623f02b 100644 --- a/expected/12.8/schemaless/add_tags.out +++ b/expected/14.5/schemaless/add_tags.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data original -\! influx -import -path=init/tag_original.txt -precision=s > /dev/null +:INIT_TAG_ORIGINAL; -- Before update data -- Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); --Testcase 5: @@ -76,7 +76,7 @@ select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::big --------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_1; --Testcase 12: DROP FOREIGN TABLE sctbl4; --Testcase 13: @@ -368,7 +368,7 @@ select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (se --------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_20; --Testcase 41: DROP FOREIGN TABLE sctbl4; --Testcase 42: diff --git a/expected/11.13/schemaless/aggregate.out b/expected/14.5/schemaless/aggregate.out similarity index 99% rename from expected/11.13/schemaless/aggregate.out rename to expected/14.5/schemaless/aggregate.out index c6c4dbc..54d94a5 100644 --- a/expected/11.13/schemaless/aggregate.out +++ b/expected/14.5/schemaless/aggregate.out @@ -10,9 +10,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); diff --git a/expected/14.0/schemaless/extra/aggregates.out b/expected/14.5/schemaless/extra/aggregates.out similarity index 99% rename from expected/14.0/schemaless/extra/aggregates.out rename to expected/14.5/schemaless/extra/aggregates.out index ddccb2c..08ff2c1 100644 --- a/expected/14.0/schemaless/extra/aggregates.out +++ b/expected/14.5/schemaless/extra/aggregates.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); --Testcase 5: diff --git a/expected/14.0/schemaless/extra/influxdb_fdw_post.out b/expected/14.5/schemaless/extra/influxdb_fdw_post.out similarity index 99% rename from expected/14.0/schemaless/extra/influxdb_fdw_post.out rename to expected/14.5/schemaless/extra/influxdb_fdw_post.out index d23c3d7..6d2abb9 100644 --- a/expected/14.0/schemaless/extra/influxdb_fdw_post.out +++ b/expected/14.5/schemaless/extra/influxdb_fdw_post.out @@ -8,16 +8,16 @@ CREATE EXTENSION influxdb_fdw; CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server -- =================================================================== @@ -1253,6 +1253,30 @@ SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} (1 row) +-- This test case drop configuration when execute non-schemaless before +DROP TEXT SEARCH CONFIGURATION IF EXISTS public.custom_search; +NOTICE: text search configuration "public.custom_search" does not exist, skipping +-- check schema-qualification of regconfig constant +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: ((fields ->> 'C 1'::text))::integer, to_tsvector('custom_search'::regconfig, (tags ->> 'c3'::text)) + Filter: (length(to_tsvector('custom_search'::regconfig, (ft1.tags ->> 'c3'::text))) > 0) + InfluxDB query: SELECT "C 1", "c3" FROM "T1" WHERE (("C 1" = 642)) +(4 rows) + +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + c1 | to_tsvector +-----+------------- + 642 | '00642':1 +(1 row) + -- =================================================================== -- JOIN queries -- =================================================================== @@ -3159,7 +3183,7 @@ DROP FOREIGN TABLE local_tbl_nsc; --Testcase 208: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 209: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; --Testcase 210: @@ -7138,6 +7162,25 @@ SELECT * FROM foreign_tbl; --UPDATE rw_view SET b = b + 15; --UPDATE rw_view SET b = b + 15; -- ok --SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); +ERROR: INSERT has more expressions than target columns +LINE 2: INSERT INTO rw_view VALUES (0, 15), (0, 5); + ^ +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +ERROR: INSERT has more expressions than target columns +LINE 1: INSERT INTO rw_view VALUES (0, 15), (0, 5); + ^ +SELECT * FROM foreign_tbl; + fields +------------------------ + {"a": "10", "b": "5"} + {"a": "10", "b": "15"} +(2 rows) + +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); --Testcase 506: DELETE FROM foreign_tbl; DROP FOREIGN TABLE foreign_tbl CASCADE; @@ -7218,6 +7261,25 @@ SELECT * FROM foreign_tbl; --UPDATE rw_view SET b = b + 15; --UPDATE rw_view SET b = b + 15; -- ok --SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); + QUERY PLAN +-------------------------------------------------------- + Insert on public.parent_tbl + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, "*VALUES*".column2 +(3 rows) + +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +ERROR: Not support partition insert +SELECT * FROM foreign_tbl; + fields +-------- +(0 rows) + +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); --Testcase 521: DROP FOREIGN TABLE foreign_tbl CASCADE; --Testcase 522: @@ -9507,7 +9569,7 @@ ALTER SERVER loopback OPTIONS (SET keep_connections 'on'); BEGIN; --Testcase 699: CREATE SERVER batch10 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS(dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT, batch_size '10' ); + OPTIONS(dbname 'postdb', :SERVER, batch_size '10' ); --Testcase 700: SELECT count(*) FROM pg_foreign_server diff --git a/expected/13.4/schemaless/extra/insert.out b/expected/14.5/schemaless/extra/insert.out similarity index 99% rename from expected/13.4/schemaless/extra/insert.out rename to expected/14.5/schemaless/extra/insert.out index 1cf50ac..4465358 100644 --- a/expected/13.4/schemaless/extra/insert.out +++ b/expected/14.5/schemaless/extra/insert.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list -- diff --git a/expected/14.0/schemaless/extra/join.out b/expected/14.5/schemaless/extra/join.out similarity index 99% rename from expected/14.0/schemaless/extra/join.out rename to expected/14.5/schemaless/extra/join.out index 5c94676..c2b6c61 100644 --- a/expected/14.0/schemaless/extra/join.out +++ b/expected/14.5/schemaless/extra/join.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; -- @@ -2498,6 +2498,39 @@ ERROR: column t1.x does not exist LINE 1: select t1.x from (select (fields->>'a')::int a, (fields->>'b... ^ HINT: Perhaps you meant to reference the column "t3.x". +-- Test matching of locking clause with wrong alias +select t1.*, t2.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int), t3 as unnamed_join + for update of unnamed_join; + a | b | a | b | fields | time +---+---+---+---+--------+------ +(0 rows) + +select foo.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo, t3 as unnamed_join + for update of unnamed_join; + a | fields | time +---+--------+------ +(0 rows) + +select foo.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo, t3 as unnamed_join + for update of foo; +ERROR: FOR UPDATE cannot be applied to a join +LINE 3: for update of foo; + ^ +select bar.*, unnamed_join.* from + ((select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo) as bar, t3 as unnamed_join + for update of foo; +ERROR: relation "foo" in FOR UPDATE clause not found in FROM clause +LINE 3: for update of foo; + ^ +select bar.*, unnamed_join.* from + ((select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo) as bar, t3 as unnamed_join + for update of bar; +ERROR: FOR UPDATE cannot be applied to a join +LINE 3: for update of bar; + ^ -- -- regression test for 8.1 merge right join bug -- diff --git a/expected/14.0/schemaless/extra/limit.out b/expected/14.5/schemaless/extra/limit.out similarity index 99% rename from expected/14.0/schemaless/extra/limit.out rename to expected/14.5/schemaless/extra/limit.out index d57f33f..ab43802 100644 --- a/expected/14.0/schemaless/extra/limit.out +++ b/expected/14.5/schemaless/extra/limit.out @@ -3,9 +3,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- LIMIT -- Check the LIMIT/OFFSET feature of SELECT diff --git a/expected/13.4/schemaless/extra/prepare.out b/expected/14.5/schemaless/extra/prepare.out similarity index 99% rename from expected/13.4/schemaless/extra/prepare.out rename to expected/14.5/schemaless/extra/prepare.out index e717c03..8f7029a 100644 --- a/expected/13.4/schemaless/extra/prepare.out +++ b/expected/14.5/schemaless/extra/prepare.out @@ -2,41 +2,41 @@ -- of the pg_prepared_statements view as prepared statements are -- created and removed. \set ECHO none ---Testcase 27: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 28: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 30: + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: CREATE FOREIGN TABLE tenk1 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); -- Does not support this command -- ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 31: +--Testcase 5: CREATE FOREIGN TABLE road ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 32: +--Testcase 6: CREATE FOREIGN TABLE road_tmp (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 1: +--Testcase 7: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) ---Testcase 2: +--Testcase 8: PREPARE q1 AS SELECT (fields->>'a')::int AS a FROM road_tmp; ---Testcase 3: +--Testcase 9: EXECUTE q1; a --- 1 (1 row) ---Testcase 4: +--Testcase 10: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------------------------+----------------- @@ -44,23 +44,23 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; (1 row) -- should fail ---Testcase 5: +--Testcase 11: PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; ERROR: prepared statement "q1" already exists -- should succeed DEALLOCATE q1; ---Testcase 6: +--Testcase 12: PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; ---Testcase 7: +--Testcase 13: EXECUTE q1; b --- 2 (1 row) ---Testcase 8: +--Testcase 14: PREPARE q2 AS SELECT (fields->>'b')::int AS b FROM road_tmp; ---Testcase 9: +--Testcase 15: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------------------------+----------------- @@ -70,7 +70,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; -- sql92 syntax DEALLOCATE PREPARE q1; ---Testcase 10: +--Testcase 16: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------------------------+----------------- @@ -79,30 +79,30 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; DEALLOCATE PREPARE q2; -- the view should return the empty set again ---Testcase 11: +--Testcase 17: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) -- parameterized queries ---Testcase 12: +--Testcase 18: PREPARE q2(text) AS SELECT datname, datistemplate, datallowconn FROM pg_database WHERE datname = $1; ---Testcase 13: +--Testcase 19: EXECUTE q2('postgres'); datname | datistemplate | datallowconn ----------+---------------+-------------- postgres | f | t (1 row) ---Testcase 14: +--Testcase 20: PREPARE q3(text, int, float, boolean, smallint) AS SELECT * FROM tenk1 WHERE fields->>'string4' = $1 AND ((fields->>'four')::int = $2 OR (fields->>'ten')::int = $3::bigint OR true = $4 OR (fields->>'odd')::int = $5::int) ORDER BY (fields->>'unique1')::int; ---Testcase 15: +--Testcase 21: EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); fields ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -138,36 +138,36 @@ EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); (29 rows) -- too few params ---Testcase 16: +--Testcase 22: EXECUTE q3('bool'); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 1. -- too many params ---Testcase 17: +--Testcase 23: EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 6. -- wrong param types ---Testcase 18: +--Testcase 24: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); ERROR: parameter $3 of type boolean cannot be coerced to the expected type double precision LINE 1: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'byte... ^ HINT: You will need to rewrite or cast the expression. -- invalid type ---Testcase 19: +--Testcase 25: PREPARE q4(nonexistenttype) AS SELECT $1; ERROR: type "nonexistenttype" does not exist LINE 1: PREPARE q4(nonexistenttype) AS SELECT $1; ^ -- create table as execute ---Testcase 20: +--Testcase 26: PREPARE q5(int, text) AS SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 OR fields->>'stringu1' = $2 ORDER BY (fields->>'unique1')::int; ---Testcase 33: +--Testcase 27: CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); ---Testcase 21: +--Testcase 28: SELECT * FROM q5_prep_results; fields ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -189,23 +189,23 @@ SELECT * FROM q5_prep_results; {"odd": "122", "ten": "1", "two": "1", "even": "123", "four": "1", "twenty": "1", "hundred": "61", "string4": "OOOOxx", "unique1": "9961", "unique2": "2058", "stringu1": "DTAAAA", "stringu2": "EBDAAA", "tenthous": "9961", "thousand": "961", "fivethous": "4961", "twothousand": "1961"} (16 rows) ---Testcase 34: +--Testcase 29: CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') WITH NO DATA; ---Testcase 22: +--Testcase 30: SELECT * FROM q5_prep_nodata; fields -------- (0 rows) -- unknown or unspecified parameter types: should succeed ---Testcase 23: +--Testcase 31: PREPARE q6 AS SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 AND fields->>'stringu1' = $2; ---Testcase 24: +--Testcase 32: PREPARE q7(unknown) AS SELECT * FROM road WHERE fields->>'thepath' = $1; ---Testcase 25: +--Testcase 33: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types @@ -228,7 +228,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements -- test DEALLOCATE ALL; DEALLOCATE ALL; ---Testcase 26: +--Testcase 34: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types diff --git a/expected/14.0/schemaless/extra/select.out b/expected/14.5/schemaless/extra/select.out similarity index 99% rename from expected/14.0/schemaless/extra/select.out rename to expected/14.5/schemaless/extra/select.out index 5ac6e0a..bb000af 100644 --- a/expected/14.0/schemaless/extra/select.out +++ b/expected/14.5/schemaless/extra/select.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( fields jsonb OPTIONS (fields 'true') diff --git a/expected/11.13/schemaless/extra/select_having.out b/expected/14.5/schemaless/extra/select_having.out similarity index 97% rename from expected/11.13/schemaless/extra/select_having.out rename to expected/14.5/schemaless/extra/select_having.out index 93cefbd..b88def8 100644 --- a/expected/11.13/schemaless/extra/select_having.out +++ b/expected/14.5/schemaless/extra/select_having.out @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); CREATE FOREIGN TABLE test_having_nsc (a int, b int, c char(8), d char) SERVER influxdb_svr OPTIONS (table 'test_having'); diff --git a/expected/14.0/schemaless/influxdb_fdw.out b/expected/14.5/schemaless/influxdb_fdw.out similarity index 99% rename from expected/14.0/schemaless/influxdb_fdw.out rename to expected/14.5/schemaless/influxdb_fdw.out index 0e858a5..959f1e1 100644 --- a/expected/14.0/schemaless/influxdb_fdw.out +++ b/expected/14.5/schemaless/influxdb_fdw.out @@ -10,9 +10,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --Testcase 6: @@ -1130,14 +1130,14 @@ SELECT * FROM t5; SELECT * FROM public.influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Testcase 146: SELECT influxdb_fdw_version(); influxdb_fdw_version ---------------------- - 10200 + 20000 (1 row) --Test pushdown LIMIT...OFFSET @@ -1583,7 +1583,9 @@ SELECT * FROM cpu; (5 rows) -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP FOREIGN TABLE cpu_nsc; DROP USER MAPPING FOR CURRENT_USER SERVER server1; diff --git a/expected/14.0/schemaless/schemaless.out b/expected/14.5/schemaless/schemaless.out similarity index 99% rename from expected/14.0/schemaless/schemaless.out rename to expected/14.5/schemaless/schemaless.out index 5f3a7f2..4a3e213 100644 --- a/expected/14.0/schemaless/schemaless.out +++ b/expected/14.5/schemaless/schemaless.out @@ -10,9 +10,9 @@ NOTICE: extension "influxdb_fdw" does not exist, skipping --Testcase 4: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 5: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- create foreign table --Testcase 7: CREATE FOREIGN TABLE sc1(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc1', tags 'device_id', schemaless 'true'); diff --git a/expected/14.0/schemaless/selectfunc.out b/expected/14.5/schemaless/selectfunc.out similarity index 99% rename from expected/14.0/schemaless/selectfunc.out rename to expected/14.5/schemaless/selectfunc.out index 8a37a81..f8ca280 100644 --- a/expected/14.0/schemaless/selectfunc.out +++ b/expected/14.5/schemaless/selectfunc.out @@ -7,9 +7,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: CREATE FOREIGN TABLE s3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 's3', tags 'tag1', schemaless 'true'); diff --git a/expected/14.0/selectfunc.out b/expected/14.5/selectfunc.out similarity index 99% rename from expected/14.0/selectfunc.out rename to expected/14.5/selectfunc.out index aaa0bf9..26e182d 100644 --- a/expected/14.0/selectfunc.out +++ b/expected/14.5/selectfunc.out @@ -7,9 +7,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: CREATE FOREIGN TABLE s3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 float8, value4 bigint) SERVER server1 OPTIONS(table 's3', tags 'tag1'); diff --git a/expected/15.0/aggregate.out b/expected/15.0/aggregate.out new file mode 100644 index 0000000..36b0eca --- /dev/null +++ b/expected/15.0/aggregate.out @@ -0,0 +1,849 @@ +--SET log_min_messages=debug1; +--SET client_min_messages=debug1; +--Testcase 1: +SET datestyle=ISO; +-- timestamp with time zone differs based on this +--Testcase 2: +SET timezone='UTC'; +\set ECHO none +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); +-- import time column as timestamp and text type +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); +--ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); +--ALTER SERVER server1 OPTIONS (ADD extensions 'influxdb_fdw'); +--Testcase 6: +SELECT * FROM t4; + time | time_text | tag1 | tag2 | value1 | value2 +------------------------+----------------------+------+------+--------+-------- + 1970-01-01 00:00:00+00 | 1970-01-01T00:00:00Z | a | x | 1 | 100 + 1970-01-01 00:00:01+00 | 1970-01-01T00:00:01Z | a | y | 2 | 100 + 1970-01-01 00:00:02+00 | 1970-01-01T00:00:02Z | a | x | 3 | 100 + 1970-01-01 00:00:03+00 | 1970-01-01T00:00:03Z | b | y | 10 | 200 + 1970-01-01 00:00:04+00 | 1970-01-01T00:00:04Z | b | z | 20 | 200 + 1970-01-01 00:00:05+00 | 1970-01-01T00:00:05Z | b | z | 30 | 200 +(6 rows) + +--Testcase 7: +EXPLAIN (verbose) +SELECT sum("value1"),influx_time(time,interval '1s', interval '0.00001s'),tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sum(value1)), (influx_time("time", '@ 1 sec'::interval, '@ 0.00001 secs'::interval)), tag1 + InfluxDB query: SELECT sum("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m1s0u, 0d0h0m0s10u)), "tag1" +(3 rows) + +--Testcase 8: +SELECT sum("value1"),influx_time(time,interval '1s', interval '0.00001s'),tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tag1; + sum | influx_time | tag1 +-----+------------------------------+------ + 1 | 1969-12-31 23:59:59.00001+00 | a + 2 | 1970-01-01 00:00:00.00001+00 | a + 3 | 1970-01-01 00:00:01.00001+00 | a + | 1970-01-01 00:00:02.00001+00 | a + | 1970-01-01 00:00:03.00001+00 | a + | 1970-01-01 00:00:04.00001+00 | a + | 1969-12-31 23:59:59.00001+00 | b + | 1970-01-01 00:00:00.00001+00 | b + | 1970-01-01 00:00:01.00001+00 | b + 10 | 1970-01-01 00:00:02.00001+00 | b + 20 | 1970-01-01 00:00:03.00001+00 | b + 30 | 1970-01-01 00:00:04.00001+00 | b +(12 rows) + +--Testcase 9: +EXPLAIN (verbose) +SELECT tag1,sum("value1"),tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY tag2, tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: tag1, (sum(value1)), tag2 + InfluxDB query: SELECT sum("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY "tag2", "tag1" +(3 rows) + +--Testcase 10: +SELECT tag1,sum("value1"),tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY tag2, tag1; + tag1 | sum | tag2 +------+-----+------ + a | 4 | x + a | 2 | y + b | 10 | y + b | 50 | z +(4 rows) + +--Testcase 11: +SELECT tag1,sum("value1"), count(value1), tag2 FROM "t4" group by tag1, tag2; + tag1 | sum | count | tag2 +------+-----+-------+------ + a | 4 | 2 | x + a | 2 | 1 | y + b | 10 | 1 | y + b | 50 | 2 | z +(4 rows) + +--Testcase 12: +EXPLAIN (verbose) SELECT tag1,sum("value1"), count(value1), tag2 FROM "t4" group by tag1, tag2; + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=80) + Output: tag1, (sum(value1)), (count(value1)), tag2 + InfluxDB query: SELECT sum("value1"), count("value1") FROM "t4" GROUP BY "tag1", "tag2" +(3 rows) + +--Testcase 13: +SELECT influx_time(time,interval '5s',interval '0s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY influx_time(time,interval '5s', interval '0s'), tag1; + influx_time | tag1 | last +------------------------+------+------ + 1970-01-01 00:00:00+00 | a | 3 + 1970-01-01 00:00:05+00 | a | + 1970-01-01 00:00:00+00 | b | 20 + 1970-01-01 00:00:05+00 | b | 30 +(4 rows) + +--Testcase 14: +EXPLAIN (VERBOSE) +SELECT influx_time(time,interval '5s',interval '0s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '5s', interval '0s'), tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (influx_time("time", '@ 5 secs'::interval, '@ 0'::interval)), tag1, (last("time", value1)) + InfluxDB query: SELECT last("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m5s0u, 0d0h0m0s0u)), "tag1" +(3 rows) + +-- no offset +--Testcase 15: +SELECT influx_time(time,interval '5s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '5s'), tag1; + influx_time | tag1 | last +------------------------+------+------ + 1970-01-01 00:00:00+00 | a | 3 + 1970-01-01 00:00:05+00 | a | + 1970-01-01 00:00:00+00 | b | 20 + 1970-01-01 00:00:05+00 | b | 30 +(4 rows) + +--Testcase 16: +EXPLAIN (verbose) +SELECT last(time, value1),last(time, value2) FROM t4 GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (last("time", value1)), (last("time", value2)), tag1 + InfluxDB query: SELECT last("value1"), last("value2") FROM "t4" GROUP BY "tag1" +(3 rows) + +--Testcase 17: +SELECT last(time, value1),last(time, value2) FROM t4 GROUP BY tag1; + last | last +------+------ + 3 | 100 + 30 | 200 +(2 rows) + +-- GROUP BY time intervals and fill() +--Testcase 18: +SELECT * FROM tx; + time | time_text | tag1 | tag2 | value1 | value2 +------------------------+----------------------+------+------+--------+-------- + 1970-01-01 00:00:00+00 | 1970-01-01T00:00:00Z | a | x | 1 | 100 + 1970-01-01 00:00:01+00 | 1970-01-01T00:00:01Z | a | y | 2 | 100 + 1970-01-01 00:00:02+00 | 1970-01-01T00:00:02Z | a | x | 3 | 100 + 1970-01-01 00:00:03+00 | 1970-01-01T00:00:03Z | b | y | 10 | 200 + 1970-01-01 00:00:04+00 | 1970-01-01T00:00:04Z | b | z | 20 | 200 + 1970-01-01 00:00:05+00 | 1970-01-01T00:00:05Z | b | z | 30 | 200 + 1970-01-01 00:00:06+00 | 1970-01-01T00:00:06Z | b | z | | 200 + 1970-01-01 00:00:07+00 | 1970-01-01T00:00:07Z | b | z | | 200 + 1970-01-01 00:00:08+00 | 1970-01-01T00:00:08Z | b | z | 80 | 200 + 1970-01-01 00:00:09+00 | 1970-01-01T00:00:09Z | b | z | 90 | 200 + 1970-01-01 00:00:10+00 | 1970-01-01T00:00:10Z | b | z | | 200 + 1970-01-01 00:00:11+00 | 1970-01-01T00:00:11Z | b | z | | 200 + 1970-01-01 00:00:12+00 | 1970-01-01T00:00:12Z | b | z | | 200 + 1970-01-01 00:00:13+00 | 1970-01-01T00:00:13Z | b | z | | 200 + 1970-01-01 00:00:14+00 | 1970-01-01T00:00:14Z | b | z | 140 | 200 + 1970-01-01 00:00:15+00 | 1970-01-01T00:00:15Z | b | z | 150 | 200 + 1970-01-01 00:00:16+00 | 1970-01-01T00:00:16Z | c | zz | | 2000 + 1970-01-01 00:00:20+00 | 1970-01-01T00:00:20Z | c | zz | | 2000 +(18 rows) + +--Testcase 19: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(100) +(3 rows) + +--Testcase 20: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); + sum | influx_time +-----+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + 100 | 1970-01-01 00:00:06+00 + 170 | 1970-01-01 00:00:08+00 + 100 | 1970-01-01 00:00:10+00 + 100 | 1970-01-01 00:00:12+00 + 290 | 1970-01-01 00:00:14+00 +(8 rows) + +--Testcase 21: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(100.001) +(3 rows) + +--Testcase 22: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); + sum | influx_time +---------+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + 100.001 | 1970-01-01 00:00:06+00 + 170 | 1970-01-01 00:00:08+00 + 100.001 | 1970-01-01 00:00:10+00 + 100.001 | 1970-01-01 00:00:12+00 + 290 | 1970-01-01 00:00:14+00 +(8 rows) + +--Testcase 23: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('none'::influx_fill_enum))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(none) +(3 rows) + +--Testcase 24: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); + sum | influx_time +-----+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + 170 | 1970-01-01 00:00:08+00 + 290 | 1970-01-01 00:00:14+00 +(5 rows) + +--Testcase 25: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('null'::influx_fill_enum))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(null) +(3 rows) + +--Testcase 26: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); + sum | influx_time +-----+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + | 1970-01-01 00:00:06+00 + 170 | 1970-01-01 00:00:08+00 + | 1970-01-01 00:00:10+00 + | 1970-01-01 00:00:12+00 + 290 | 1970-01-01 00:00:14+00 +(8 rows) + +--Testcase 27: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('previous'::influx_fill_enum))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(previous) +(3 rows) + +--Testcase 28: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); + sum | influx_time +-----+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + 50 | 1970-01-01 00:00:06+00 + 170 | 1970-01-01 00:00:08+00 + 170 | 1970-01-01 00:00:10+00 + 170 | 1970-01-01 00:00:12+00 + 290 | 1970-01-01 00:00:14+00 +(8 rows) + +--Testcase 29: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('linear'::influx_fill_enum))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(linear) +(3 rows) + +--Testcase 30: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); + sum | influx_time +-----+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + 110 | 1970-01-01 00:00:06+00 + 170 | 1970-01-01 00:00:08+00 + 210 | 1970-01-01 00:00:10+00 + 250 | 1970-01-01 00:00:12+00 + 290 | 1970-01-01 00:00:14+00 +(8 rows) + +-- with offset interval '0.00001s' +--Testcase 31: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)) fill(100) +(3 rows) + +--Testcase 32: +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); + sum | influx_time +-----+------------------------------ + 1 | 1969-12-31 23:59:58.00001+00 + 5 | 1970-01-01 00:00:00.00001+00 + 30 | 1970-01-01 00:00:02.00001+00 + 30 | 1970-01-01 00:00:04.00001+00 + 80 | 1970-01-01 00:00:06.00001+00 + 90 | 1970-01-01 00:00:08.00001+00 + 100 | 1970-01-01 00:00:10.00001+00 + 140 | 1970-01-01 00:00:12.00001+00 + 150 | 1970-01-01 00:00:14.00001+00 +(9 rows) + +--Testcase 33: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))), tag1 + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)), "tag1" fill(100) +(3 rows) + +--Testcase 34: +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1; + sum | influx_time | tag1 +-----+------------------------------+------ + 1 | 1969-12-31 23:59:58.00001+00 | a + 5 | 1970-01-01 00:00:00.00001+00 | a + 100 | 1970-01-01 00:00:02.00001+00 | a + 100 | 1970-01-01 00:00:04.00001+00 | a + 100 | 1970-01-01 00:00:06.00001+00 | a + 100 | 1970-01-01 00:00:08.00001+00 | a + 100 | 1970-01-01 00:00:10.00001+00 | a + 100 | 1970-01-01 00:00:12.00001+00 | a + 100 | 1970-01-01 00:00:14.00001+00 | a + 100 | 1969-12-31 23:59:58.00001+00 | b + 100 | 1970-01-01 00:00:00.00001+00 | b + 30 | 1970-01-01 00:00:02.00001+00 | b + 30 | 1970-01-01 00:00:04.00001+00 | b + 80 | 1970-01-01 00:00:06.00001+00 | b + 90 | 1970-01-01 00:00:08.00001+00 | b + 100 | 1970-01-01 00:00:10.00001+00 | b + 140 | 1970-01-01 00:00:12.00001+00 | b + 150 | 1970-01-01 00:00:14.00001+00 | b +(18 rows) + +--Testcase 35: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=80) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))), tag1, tag2 + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)), "tag1", "tag2" fill(100) +(3 rows) + +--Testcase 36: +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2; + sum | influx_time | tag1 | tag2 +-----+------------------------------+------+------ + 1 | 1969-12-31 23:59:58.00001+00 | a | x + 3 | 1970-01-01 00:00:00.00001+00 | a | x + 100 | 1970-01-01 00:00:02.00001+00 | a | x + 100 | 1970-01-01 00:00:04.00001+00 | a | x + 100 | 1970-01-01 00:00:06.00001+00 | a | x + 100 | 1970-01-01 00:00:08.00001+00 | a | x + 100 | 1970-01-01 00:00:10.00001+00 | a | x + 100 | 1970-01-01 00:00:12.00001+00 | a | x + 100 | 1970-01-01 00:00:14.00001+00 | a | x + 100 | 1969-12-31 23:59:58.00001+00 | a | y + 2 | 1970-01-01 00:00:00.00001+00 | a | y + 100 | 1970-01-01 00:00:02.00001+00 | a | y + 100 | 1970-01-01 00:00:04.00001+00 | a | y + 100 | 1970-01-01 00:00:06.00001+00 | a | y + 100 | 1970-01-01 00:00:08.00001+00 | a | y + 100 | 1970-01-01 00:00:10.00001+00 | a | y + 100 | 1970-01-01 00:00:12.00001+00 | a | y + 100 | 1970-01-01 00:00:14.00001+00 | a | y + 100 | 1969-12-31 23:59:58.00001+00 | b | y + 100 | 1970-01-01 00:00:00.00001+00 | b | y + 10 | 1970-01-01 00:00:02.00001+00 | b | y + 100 | 1970-01-01 00:00:04.00001+00 | b | y + 100 | 1970-01-01 00:00:06.00001+00 | b | y + 100 | 1970-01-01 00:00:08.00001+00 | b | y + 100 | 1970-01-01 00:00:10.00001+00 | b | y + 100 | 1970-01-01 00:00:12.00001+00 | b | y + 100 | 1970-01-01 00:00:14.00001+00 | b | y + 100 | 1969-12-31 23:59:58.00001+00 | b | z + 100 | 1970-01-01 00:00:00.00001+00 | b | z + 20 | 1970-01-01 00:00:02.00001+00 | b | z + 30 | 1970-01-01 00:00:04.00001+00 | b | z + 80 | 1970-01-01 00:00:06.00001+00 | b | z + 90 | 1970-01-01 00:00:08.00001+00 | b | z + 100 | 1970-01-01 00:00:10.00001+00 | b | z + 140 | 1970-01-01 00:00:12.00001+00 | b | z + 150 | 1970-01-01 00:00:14.00001+00 | b | z +(36 rows) + +--with tag1 +--Testcase 37: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))), tag1 + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(100) +(3 rows) + +--Testcase 38: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1; + sum | influx_time | tag1 +-----+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + 100 | 1970-01-01 00:00:04+00 | a + 100 | 1970-01-01 00:00:06+00 | a + 100 | 1970-01-01 00:00:08+00 | a + 100 | 1970-01-01 00:00:10+00 | a + 100 | 1970-01-01 00:00:12+00 | a + 100 | 1970-01-01 00:00:14+00 | a + 100 | 1970-01-01 00:00:00+00 | b + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + 100 | 1970-01-01 00:00:06+00 | b + 170 | 1970-01-01 00:00:08+00 | b + 100 | 1970-01-01 00:00:10+00 | b + 100 | 1970-01-01 00:00:12+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(16 rows) + +--Testcase 39: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))), tag1 + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(100.001) +(3 rows) + +--Testcase 40: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1; + sum | influx_time | tag1 +---------+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + 100.001 | 1970-01-01 00:00:04+00 | a + 100.001 | 1970-01-01 00:00:06+00 | a + 100.001 | 1970-01-01 00:00:08+00 | a + 100.001 | 1970-01-01 00:00:10+00 | a + 100.001 | 1970-01-01 00:00:12+00 | a + 100.001 | 1970-01-01 00:00:14+00 | a + 100.001 | 1970-01-01 00:00:00+00 | b + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + 100.001 | 1970-01-01 00:00:06+00 | b + 170 | 1970-01-01 00:00:08+00 | b + 100.001 | 1970-01-01 00:00:10+00 | b + 100.001 | 1970-01-01 00:00:12+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(16 rows) + +--Testcase 41: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('null')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('null'::influx_fill_enum))), tag1 + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(null) +(3 rows) + +--Testcase 42: +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('null')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tag1; + sum | influx_time | tag1 +-----+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + | 1970-01-01 00:00:04+00 | a + | 1970-01-01 00:00:06+00 | a + | 1970-01-01 00:00:08+00 | a + | 1970-01-01 00:00:10+00 | a + | 1970-01-01 00:00:12+00 | a + | 1970-01-01 00:00:14+00 | a + | 1970-01-01 00:00:00+00 | b + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + | 1970-01-01 00:00:06+00 | b + 170 | 1970-01-01 00:00:08+00 | b + | 1970-01-01 00:00:10+00 | b + | 1970-01-01 00:00:12+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(16 rows) + +--Testcase 43: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('none')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('none'::influx_fill_enum))), tag1 + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(none) +(3 rows) + +--Testcase 44: +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('none')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tag1; + sum | influx_time | tag1 +-----+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + 170 | 1970-01-01 00:00:08+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(6 rows) + +--Testcase 45: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('previous')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('previous'::influx_fill_enum))), tag1 + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(previous) +(3 rows) + +--Testcase 46: +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('previous')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tag1; + sum | influx_time | tag1 +-----+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + 3 | 1970-01-01 00:00:04+00 | a + 3 | 1970-01-01 00:00:06+00 | a + 3 | 1970-01-01 00:00:08+00 | a + 3 | 1970-01-01 00:00:10+00 | a + 3 | 1970-01-01 00:00:12+00 | a + 3 | 1970-01-01 00:00:14+00 | a + | 1970-01-01 00:00:00+00 | b + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + 50 | 1970-01-01 00:00:06+00 | b + 170 | 1970-01-01 00:00:08+00 | b + 170 | 1970-01-01 00:00:10+00 | b + 170 | 1970-01-01 00:00:12+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(16 rows) + +--Testcase 47: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('linear')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('linear'::influx_fill_enum))), tag1 + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1" fill(linear) +(3 rows) + +--Testcase 48: +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('linear')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tag1; + sum | influx_time | tag1 +-----+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + | 1970-01-01 00:00:04+00 | a + | 1970-01-01 00:00:06+00 | a + | 1970-01-01 00:00:08+00 | a + | 1970-01-01 00:00:10+00 | a + | 1970-01-01 00:00:12+00 | a + | 1970-01-01 00:00:14+00 | a + | 1970-01-01 00:00:00+00 | b + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + 110 | 1970-01-01 00:00:06+00 | b + 170 | 1970-01-01 00:00:08+00 | b + 210 | 1970-01-01 00:00:10+00 | b + 250 | 1970-01-01 00:00:12+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(16 rows) + +--with tag1,tag2 +--Testcase 49: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=80) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))), tag1, tag2 + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1", "tag2" fill(100) +(3 rows) + +--Testcase 50: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2; + sum | influx_time | tag1 | tag2 +-----+------------------------+------+------ + 1 | 1970-01-01 00:00:00+00 | a | x + 3 | 1970-01-01 00:00:02+00 | a | x + 100 | 1970-01-01 00:00:04+00 | a | x + 100 | 1970-01-01 00:00:06+00 | a | x + 100 | 1970-01-01 00:00:08+00 | a | x + 100 | 1970-01-01 00:00:10+00 | a | x + 100 | 1970-01-01 00:00:12+00 | a | x + 100 | 1970-01-01 00:00:14+00 | a | x + 2 | 1970-01-01 00:00:00+00 | a | y + 100 | 1970-01-01 00:00:02+00 | a | y + 100 | 1970-01-01 00:00:04+00 | a | y + 100 | 1970-01-01 00:00:06+00 | a | y + 100 | 1970-01-01 00:00:08+00 | a | y + 100 | 1970-01-01 00:00:10+00 | a | y + 100 | 1970-01-01 00:00:12+00 | a | y + 100 | 1970-01-01 00:00:14+00 | a | y + 100 | 1970-01-01 00:00:00+00 | b | y + 10 | 1970-01-01 00:00:02+00 | b | y + 100 | 1970-01-01 00:00:04+00 | b | y + 100 | 1970-01-01 00:00:06+00 | b | y + 100 | 1970-01-01 00:00:08+00 | b | y + 100 | 1970-01-01 00:00:10+00 | b | y + 100 | 1970-01-01 00:00:12+00 | b | y + 100 | 1970-01-01 00:00:14+00 | b | y + 100 | 1970-01-01 00:00:00+00 | b | z + 100 | 1970-01-01 00:00:02+00 | b | z + 50 | 1970-01-01 00:00:04+00 | b | z + 100 | 1970-01-01 00:00:06+00 | b | z + 170 | 1970-01-01 00:00:08+00 | b | z + 100 | 1970-01-01 00:00:10+00 | b | z + 100 | 1970-01-01 00:00:12+00 | b | z + 290 | 1970-01-01 00:00:14+00 | b | z +(32 rows) + +--Testcase 51: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=80) + Output: (sum(value1)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))), tag1, tag2 + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), "tag1", "tag2" fill(100.001) +(3 rows) + +--Testcase 52: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2; + sum | influx_time | tag1 | tag2 +---------+------------------------+------+------ + 1 | 1970-01-01 00:00:00+00 | a | x + 3 | 1970-01-01 00:00:02+00 | a | x + 100.001 | 1970-01-01 00:00:04+00 | a | x + 100.001 | 1970-01-01 00:00:06+00 | a | x + 100.001 | 1970-01-01 00:00:08+00 | a | x + 100.001 | 1970-01-01 00:00:10+00 | a | x + 100.001 | 1970-01-01 00:00:12+00 | a | x + 100.001 | 1970-01-01 00:00:14+00 | a | x + 2 | 1970-01-01 00:00:00+00 | a | y + 100.001 | 1970-01-01 00:00:02+00 | a | y + 100.001 | 1970-01-01 00:00:04+00 | a | y + 100.001 | 1970-01-01 00:00:06+00 | a | y + 100.001 | 1970-01-01 00:00:08+00 | a | y + 100.001 | 1970-01-01 00:00:10+00 | a | y + 100.001 | 1970-01-01 00:00:12+00 | a | y + 100.001 | 1970-01-01 00:00:14+00 | a | y + 100.001 | 1970-01-01 00:00:00+00 | b | y + 10 | 1970-01-01 00:00:02+00 | b | y + 100.001 | 1970-01-01 00:00:04+00 | b | y + 100.001 | 1970-01-01 00:00:06+00 | b | y + 100.001 | 1970-01-01 00:00:08+00 | b | y + 100.001 | 1970-01-01 00:00:10+00 | b | y + 100.001 | 1970-01-01 00:00:12+00 | b | y + 100.001 | 1970-01-01 00:00:14+00 | b | y + 100.001 | 1970-01-01 00:00:00+00 | b | z + 100.001 | 1970-01-01 00:00:02+00 | b | z + 50 | 1970-01-01 00:00:04+00 | b | z + 100.001 | 1970-01-01 00:00:06+00 | b | z + 170 | 1970-01-01 00:00:08+00 | b | z + 100.001 | 1970-01-01 00:00:10+00 | b | z + 100.001 | 1970-01-01 00:00:12+00 | b | z + 290 | 1970-01-01 00:00:14+00 | b | z +(32 rows) + +-- unsupport syntax +--Testcase 53: +EXPLAIN (verbose) +SELECT influx_fill_numeric(100) FROM "tx"; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.tx (cost=10.00..4266.25 rows=3413 width=4) + Output: influx_fill_numeric(100) + InfluxDB query: SELECT * FROM "tx" +(3 rows) + +--Testcase 54: +SELECT influx_fill_numeric(100) FROM "tx"; +ERROR: stub influx_fill_numeric(int) is called +CONTEXT: PL/pgSQL function influx_fill_numeric(integer) line 3 at RAISE +--Testcase 55: +SELECT * FROM "tx" WHERE influx_fill_numeric(100) > 0; +ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function + +--Testcase 56: +EXPLAIN (verbose) +SELECT influx_fill_option('linear') FROM "tx"; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.tx (cost=10.00..4266.25 rows=3413 width=4) + Output: influx_fill_option('linear'::influx_fill_enum) + InfluxDB query: SELECT * FROM "tx" +(3 rows) + +--Testcase 57: +SELECT influx_fill_option('linear') FROM "tx"; +ERROR: stub influx_fill_option(influx_fill_enum) is called +CONTEXT: PL/pgSQL function influx_fill_option(influx_fill_enum) line 3 at RAISE +--Testcase 58: +SELECT * FROM "tx" WHERE influx_fill_option('linear') > 0; +ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function + +-- InfluxDB does not return error for the following query +--SELECT sum(value1) FROM t4 GROUP BY value1; +-- not allowed +--Testcase 59: +SELECT sum(value1) FROM t4 GROUP BY time; + sum +----- + 30 + 20 + 10 + 1 + 2 + 3 +(6 rows) + +--last returns NULL for tag +--SELECT last(time, value1),last(time, value2),last(time, tag1) FROM t4 GROUP BY tag1; +--Testcase 60: +DROP FOREIGN TABLE t3; +--Testcase 61: +DROP FOREIGN TABLE t4; +--Testcase 62: +DROP FOREIGN TABLE cpu; +--Testcase 63: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 64: +DROP SERVER server1 CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to foreign table numbers +drop cascades to foreign table tx +--Testcase 65: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/15.0/extra/aggregates.out b/expected/15.0/extra/aggregates.out new file mode 100644 index 0000000..500baff --- /dev/null +++ b/expected/15.0/extra/aggregates.out @@ -0,0 +1,3442 @@ +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: +CREATE FOREIGN TABLE onek ( + unique1 int4, + unique2 int4, + two int4, + four int4, + ten int4, + twenty int4, + hundred int4, + thousand int4, + twothousand int4, + fivethous int4, + tenthous int4, + odd int4, + even int4, + stringu1 name, + stringu2 name, + string4 name +) SERVER influxdb_svr; +--Testcase 5: +CREATE FOREIGN TABLE aggtest ( + a int2, + b float4 +) SERVER influxdb_svr OPTIONS (table 'agg'); +--Testcase 6: +CREATE FOREIGN TABLE student ( + name text, + age int4, + location point, + gpa float8 +) SERVER influxdb_svr; +--Testcase 7: +CREATE FOREIGN TABLE tenk1 ( + unique1 int4, + unique2 int4, + two int4, + four int4, + ten int4, + twenty int4, + hundred int4, + thousand int4, + twothousand int4, + fivethous int4, + tenthous int4, + odd int4, + even int4, + stringu1 name, + stringu2 name, + string4 name +) SERVER influxdb_svr OPTIONS (table 'tenk'); +--Testcase 8: +CREATE FOREIGN TABLE INT8_TBL ( + q1 int8, + q2 int8 +) SERVER influxdb_svr; +--Testcase 9: +CREATE FOREIGN TABLE INT8_TBL2 ( + q1 int8, + q2 int8 +) SERVER influxdb_svr; +--Testcase 10: +CREATE FOREIGN TABLE INT4_TBL (f1 int4) SERVER influxdb_svr; +--Testcase 11: +CREATE FOREIGN TABLE INT4_TBL2 (f1 int4) SERVER influxdb_svr; +--Testcase 12: +CREATE FOREIGN TABLE INT4_TBL3 (f1 int4) SERVER influxdb_svr; +--Testcase 13: +CREATE FOREIGN TABLE INT4_TBL4 (f1 int4) SERVER influxdb_svr; +--Testcase 14: +CREATE FOREIGN TABLE multi_arg_agg (a int, b int, c text) SERVER influxdb_svr; +--Testcase 15: +CREATE FOREIGN TABLE multi_arg_agg2 (a int, b int, c text) SERVER influxdb_svr; +--Testcase 16: +CREATE FOREIGN TABLE multi_arg_agg3 (a int, b int, c text) SERVER influxdb_svr; +--Testcase 17: +CREATE FOREIGN TABLE VARCHAR_TBL (f1 varchar(4)) SERVER influxdb_svr; +--Testcase 18: +CREATE FOREIGN TABLE FLOAT8_TBL (f1 float8) SERVER influxdb_svr; +-- +-- AGGREGATES +-- +-- directory paths are passed to us in environment variables +--\getenv abs_srcdir PG_ABS_SRCDIR +-- avoid bit-exact output here because operations may not be bit-exact. +--Testcase 19: +SET extra_float_digits = 0; +--\set filename :abs_srcdir '/init/agg.txt' +--COPY aggtest FROM :'filename'; +--ANALYZE aggtest; +--Testcase 20: +SELECT avg(four) AS avg_1 FROM onek; + avg_1 +-------------------- + 1.5000000000000000 +(1 row) + +--Testcase 21: +SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100; + avg_32 +--------------------- + 32.6666666666666667 +(1 row) + +-- In 7.1, avg(float4) is computed using float8 arithmetic. +-- Round the result to 3 digits to avoid platform-specific results. +--Testcase 22: +SELECT avg(b)::numeric(10,3) AS avg_107_943 FROM aggtest; + avg_107_943 +------------- + 107.943 +(1 row) + +--Testcase 23: +SELECT avg(gpa) AS avg_3_4 FROM ONLY student; + avg_3_4 +--------- + 3.4 +(1 row) + +--Testcase 24: +SELECT sum(four) AS sum_1500 FROM onek; + sum_1500 +---------- + 1500 +(1 row) + +--Testcase 25: +SELECT sum(a) AS sum_198 FROM aggtest; + sum_198 +--------- + 198 +(1 row) + +--Testcase 26: +SELECT sum(b) AS avg_431_773 FROM aggtest; + avg_431_773 +------------- + 431.773 +(1 row) + +--Testcase 27: +SELECT sum(gpa) AS avg_6_8 FROM ONLY student; + avg_6_8 +--------- + 6.8 +(1 row) + +--Testcase 28: +SELECT max(four) AS max_3 FROM onek; + max_3 +------- + 3 +(1 row) + +--Testcase 29: +SELECT max(a) AS max_100 FROM aggtest; + max_100 +--------- + 100 +(1 row) + +--Testcase 30: +SELECT max(aggtest.b) AS max_324_78 FROM aggtest; + max_324_78 +------------ + 324.78 +(1 row) + +--Testcase 31: +SELECT max(student.gpa) AS max_3_7 FROM student; + max_3_7 +--------- + 3.7 +(1 row) + +--Testcase 32: +SELECT stddev_pop(b) FROM aggtest; + stddev_pop +----------------- + 131.10703231895 +(1 row) + +--Testcase 33: +SELECT stddev_samp(b) FROM aggtest; + stddev_samp +------------------ + 151.389360803998 +(1 row) + +--Testcase 34: +SELECT var_pop(b) FROM aggtest; + var_pop +------------------ + 17189.0539234823 +(1 row) + +--Testcase 35: +SELECT var_samp(b) FROM aggtest; + var_samp +------------------ + 22918.7385646431 +(1 row) + +--Testcase 36: +SELECT stddev_pop(b::numeric) FROM aggtest; + stddev_pop +------------------ + 131.107032862199 +(1 row) + +--Testcase 37: +SELECT stddev_samp(b::numeric) FROM aggtest; + stddev_samp +------------------ + 151.389361431288 +(1 row) + +--Testcase 38: +SELECT var_pop(b::numeric) FROM aggtest; + var_pop +-------------------- + 17189.054065929769 +(1 row) + +--Testcase 39: +SELECT var_samp(b::numeric) FROM aggtest; + var_samp +-------------------- + 22918.738754573025 +(1 row) + +-- population variance is defined for a single tuple, sample variance +-- is not +--Testcase 40: +CREATE FOREIGN TABLE agg_t5 (id int, a text, b text) SERVER influxdb_svr; +--Testcase 41: +SELECT var_pop(a::float8), var_samp(b::float8) FROM agg_t5 WHERE id = 1; + var_pop | var_samp +---------+---------- + 0 | +(1 row) + +--Testcase 42: +SELECT stddev_pop(a::float8), stddev_samp(b::float8) FROM agg_t5 WHERE id = 2; + stddev_pop | stddev_samp +------------+------------- + 0 | +(1 row) + +--Testcase 43: +SELECT var_pop(a::float8), var_samp(b::float8) FROM agg_t5 WHERE id = 3; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 44: +SELECT stddev_pop(a::float8), stddev_samp(b::float8) FROM agg_t5 WHERE id = 3; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +--Testcase 45: +SELECT var_pop(a::float8), var_samp(b::float8) FROM agg_t5 WHERE id = 4; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 46: +SELECT stddev_pop(a::float8), stddev_samp(b::float8) FROM agg_t5 WHERE id = 4; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +--Testcase 47: +SELECT var_pop(a::float4), var_samp(b::float4) FROM agg_t5 WHERE id = 1; + var_pop | var_samp +---------+---------- + 0 | +(1 row) + +--Testcase 48: +SELECT stddev_pop(a::float4), stddev_samp(b::float4) FROM agg_t5 WHERE id = 2; + stddev_pop | stddev_samp +------------+------------- + 0 | +(1 row) + +--Testcase 49: +SELECT var_pop(a::float4), var_samp(b::float4) FROM agg_t5 WHERE id = 3; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 50: +SELECT stddev_pop(a::float4), stddev_samp(b::float4) FROM agg_t5 WHERE id = 3; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +--Testcase 51: +SELECT var_pop(a::float4), var_samp(b::float4) FROM agg_t5 WHERE id = 4; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 52: +SELECT stddev_pop(a::float4), stddev_samp(b::float4) FROM agg_t5 WHERE id = 4; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +--Testcase 53: +SELECT var_pop(a::numeric), var_samp(b::numeric) FROM agg_t5 WHERE id = 1; + var_pop | var_samp +---------+---------- + 0 | +(1 row) + +--Testcase 54: +SELECT stddev_pop(a::numeric), stddev_samp(b::numeric) FROM agg_t5 WHERE id = 2; + stddev_pop | stddev_samp +------------+------------- + 0 | +(1 row) + +--Testcase 55: +SELECT var_pop(a::numeric), var_samp(b::numeric) FROM agg_t5 WHERE id = 3; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 56: +SELECT stddev_pop(a::numeric), stddev_samp(b::numeric) FROM agg_t5 WHERE id = 3; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +--Testcase 57: +SELECT var_pop(a::numeric), var_samp(b::numeric) FROM agg_t5 WHERE id = 4; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 58: +SELECT stddev_pop(a::numeric), stddev_samp(b::numeric) FROM agg_t5 WHERE id = 4; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +-- verify correct results for null and NaN inputs +--Testcase 59: +create foreign table generate_series1(a int) server influxdb_svr; +--Testcase 60: +select sum(null::int4) from generate_series1; + sum +----- + +(1 row) + +--Testcase 61: +select sum(null::int8) from generate_series1; + sum +----- + +(1 row) + +--Testcase 62: +select sum(null::numeric) from generate_series1; + sum +----- + +(1 row) + +--Testcase 63: +select sum(null::float8) from generate_series1; + sum +----- + +(1 row) + +--Testcase 64: +select avg(null::int4) from generate_series1; + avg +----- + +(1 row) + +--Testcase 65: +select avg(null::int8) from generate_series1; + avg +----- + +(1 row) + +--Testcase 66: +select avg(null::numeric) from generate_series1; + avg +----- + +(1 row) + +--Testcase 67: +select avg(null::float8) from generate_series1; + avg +----- + +(1 row) + +--Testcase 68: +select sum('NaN'::numeric) from generate_series1; + sum +----- + NaN +(1 row) + +--Testcase 69: +select avg('NaN'::numeric) from generate_series1; + avg +----- + NaN +(1 row) + +-- verify correct results for infinite inputs +--Testcase 70: +create foreign table infinite1(id int, x text) server influxdb_svr; +--Testcase 71: +SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) +FROM infinite1 WHERE id = 1; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 72: +SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) +FROM infinite1 WHERE id = 2; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 73: +SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) +FROM infinite1 WHERE id = 3; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 74: +SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) +FROM infinite1 WHERE id = 4; + sum | avg | var_pop +-----+-----+--------- + NaN | NaN | NaN +(1 row) + +--Testcase 75: +SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) +FROM infinite1 WHERE id = 5; + sum | avg | var_pop +-----------+-----------+--------- + -Infinity | -Infinity | NaN +(1 row) + +--Testcase 76: +SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) +FROM infinite1 WHERE id = 1; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 77: +SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) +FROM infinite1 WHERE id = 2; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 78: +SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) +FROM infinite1 WHERE id = 3; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 79: +SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) +FROM infinite1 WHERE id = 4; + sum | avg | var_pop +-----+-----+--------- + NaN | NaN | NaN +(1 row) + +--Testcase 80: +SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) +FROM infinite1 WHERE id = 5; + sum | avg | var_pop +-----------+-----------+--------- + -Infinity | -Infinity | NaN +(1 row) + +-- test accuracy with a large input offset +--Testcase 81: +create foreign table large_input1(id int, x float8) server influxdb_svr; +--Testcase 82: +SELECT avg(x::float8), var_pop(x::float8) +FROM large_input1 WHERE id=1; + avg | var_pop +-----------+--------- + 100000005 | 2.5 +(1 row) + +--Testcase 83: +SELECT avg(x::float8), var_pop(x::float8) +FROM large_input1 WHERE id=2; + avg | var_pop +---------------+--------- + 7000000000006 | 1 +(1 row) + +-- SQL2003 binary aggregates +--Testcase 84: +SELECT regr_count(b, a) FROM aggtest; + regr_count +------------ + 4 +(1 row) + +--Testcase 85: +SELECT regr_sxx(b, a) FROM aggtest; + regr_sxx +---------- + 5099 +(1 row) + +--Testcase 86: +SELECT regr_syy(b, a) FROM aggtest; + regr_syy +------------------ + 68756.2156939293 +(1 row) + +--Testcase 87: +SELECT regr_sxy(b, a) FROM aggtest; + regr_sxy +------------------ + 2614.51582155004 +(1 row) + +--Testcase 88: +SELECT regr_avgx(b, a), regr_avgy(b, a) FROM aggtest; + regr_avgx | regr_avgy +-----------+------------------ + 49.5 | 107.943152273074 +(1 row) + +--Testcase 89: +SELECT regr_r2(b, a) FROM aggtest; + regr_r2 +-------------------- + 0.0194977982031803 +(1 row) + +--Testcase 90: +SELECT regr_slope(b, a), regr_intercept(b, a) FROM aggtest; + regr_slope | regr_intercept +-------------------+------------------ + 0.512750700441271 | 82.5619926012309 +(1 row) + +--Testcase 91: +SELECT covar_pop(b, a), covar_samp(b, a) FROM aggtest; + covar_pop | covar_samp +-----------------+------------------ + 653.62895538751 | 871.505273850014 +(1 row) + +--Testcase 92: +SELECT corr(b, a) FROM aggtest; + corr +------------------- + 0.139634516517873 +(1 row) + +-- check single-tuple behavior +--Testcase 93: +create foreign table agg_t4(id int, a text, b text, c text, d text) server influxdb_svr; +--Testcase 94: +SELECT covar_pop(a::float8,b::float8), covar_samp(c::float8,d::float8) FROM agg_t4 WHERE id = 1; + covar_pop | covar_samp +-----------+------------ + 0 | +(1 row) + +--Testcase 95: +SELECT covar_pop(a::float8,b::float8), covar_samp(c::float8,d::float8) FROM agg_t4 WHERE id = 2; + covar_pop | covar_samp +-----------+------------ + NaN | +(1 row) + +--Testcase 96: +SELECT covar_pop(a::float8,b::float8), covar_samp(c::float8,d::float8) FROM agg_t4 WHERE id = 3; + covar_pop | covar_samp +-----------+------------ + NaN | +(1 row) + +-- test accum and combine functions directly +--Testcase 97: +CREATE FOREIGN TABLE regr_test (x float8, y float8) server influxdb_svr; +--Testcase 98: +SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) +FROM regr_test WHERE x IN (10,20,30,80); + count | sum | regr_sxx | sum | regr_syy | regr_sxy +-------+-----+----------+------+----------+---------- + 4 | 140 | 2900 | 1290 | 83075 | 15050 +(1 row) + +--Testcase 99: +SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) +FROM regr_test; + count | sum | regr_sxx | sum | regr_syy | regr_sxy +-------+-----+----------+------+----------+---------- + 5 | 240 | 6280 | 1490 | 95080 | 8680 +(1 row) + +--Testcase 100: +CREATE FOREIGN TABLE float8_arr (id int, x text, y text) server influxdb_svr; +--Testcase 101: +SELECT float8_accum(x::float8[], 100) FROM float8_arr WHERE id=1; + float8_accum +-------------- + {5,240,6280} +(1 row) + +--Testcase 102: +SELECT float8_regr_accum(x::float8[], 200, 100) FROM float8_arr WHERE id=2; + float8_regr_accum +------------------------------ + {5,240,6280,1490,95080,8680} +(1 row) + +--Testcase 103: +SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) +FROM regr_test WHERE x IN (10,20,30); + count | sum | regr_sxx | sum | regr_syy | regr_sxy +-------+-----+----------+-----+----------+---------- + 3 | 60 | 200 | 750 | 20000 | 2000 +(1 row) + +--Testcase 104: +SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) +FROM regr_test WHERE x IN (80,100); + count | sum | regr_sxx | sum | regr_syy | regr_sxy +-------+-----+----------+-----+----------+---------- + 2 | 180 | 200 | 740 | 57800 | -3400 +(1 row) + +--Testcase 105: +SELECT float8_combine(x::float8[], y::float8[]) FROM float8_arr WHERE id=3; + float8_combine +---------------- + {3,60,200} +(1 row) + +--Testcase 106: +SELECT float8_combine(x::float8[], y::float8[]) FROM float8_arr WHERE id=4; + float8_combine +---------------- + {2,180,200} +(1 row) + +--Testcase 107: +SELECT float8_combine(x::float8[], y::float8[]) FROM float8_arr WHERE id=5; + float8_combine +---------------- + {5,240,6280} +(1 row) + +--Testcase 108: +SELECT float8_regr_combine(x::float8[],y::float8[]) FROM float8_arr WHERE id=6; + float8_regr_combine +--------------------------- + {3,60,200,750,20000,2000} +(1 row) + +--Testcase 109: +SELECT float8_regr_combine(x::float8[],y::float8[]) FROM float8_arr WHERE id=7; + float8_regr_combine +----------------------------- + {2,180,200,740,57800,-3400} +(1 row) + +--Testcase 110: +SELECT float8_regr_combine(x::float8[],y::float8[]) FROM float8_arr WHERE id=8; + float8_regr_combine +------------------------------ + {5,240,6280,1490,95080,8680} +(1 row) + +--Testcase 111: +DROP FOREIGN TABLE regr_test; +-- test count, distinct +--Testcase 112: +SELECT count(four) AS cnt_1000 FROM onek; + cnt_1000 +---------- + 1000 +(1 row) + +--Testcase 113: +SELECT count(DISTINCT four) AS cnt_4 FROM onek; + cnt_4 +------- + 4 +(1 row) + +--Testcase 114: +select ten, count(*), sum(four) from onek +group by ten order by ten; + ten | count | sum +-----+-------+----- + 0 | 100 | 100 + 1 | 100 | 200 + 2 | 100 | 100 + 3 | 100 | 200 + 4 | 100 | 100 + 5 | 100 | 200 + 6 | 100 | 100 + 7 | 100 | 200 + 8 | 100 | 100 + 9 | 100 | 200 +(10 rows) + +--Testcase 115: +select ten, count(four), sum(DISTINCT four) from onek +group by ten order by ten; + ten | count | sum +-----+-------+----- + 0 | 100 | 2 + 1 | 100 | 4 + 2 | 100 | 2 + 3 | 100 | 4 + 4 | 100 | 2 + 5 | 100 | 4 + 6 | 100 | 2 + 7 | 100 | 4 + 8 | 100 | 2 + 9 | 100 | 4 +(10 rows) + +-- user-defined aggregates +--Testcase 116: +CREATE AGGREGATE newavg ( + sfunc = int4_avg_accum, basetype = int4, stype = _int8, + finalfunc = int8_avg, + initcond1 = '{0,0}' +); +-- without finalfunc; test obsolete spellings 'sfunc1' etc +--Testcase 117: +CREATE AGGREGATE newsum ( + sfunc1 = int4pl, basetype = int4, stype1 = int4, + initcond1 = '0' +); +-- zero-argument aggregate +--Testcase 118: +CREATE AGGREGATE newcnt (*) ( + sfunc = int8inc, stype = int8, + initcond = '0', parallel = safe +); +-- old-style spelling of same (except without parallel-safe; that's too new) +--Testcase 119: +CREATE AGGREGATE oldcnt ( + sfunc = int8inc, basetype = 'ANY', stype = int8, + initcond = '0' +); +-- aggregate that only cares about null/nonnull input +--Testcase 120: +CREATE AGGREGATE newcnt ("any") ( + sfunc = int8inc_any, stype = int8, + initcond = '0' +); +-- multi-argument aggregate +--Testcase 121: +create function sum3(int8,int8,int8) returns int8 as +'select $1 + $2 + $3' language sql strict immutable; +--Testcase 122: +create aggregate sum2(int8,int8) ( + sfunc = sum3, stype = int8, + initcond = '0' +); +--Testcase 123: +SELECT newavg(four) AS avg_1 FROM onek; + avg_1 +-------------------- + 1.5000000000000000 +(1 row) + +--Testcase 124: +SELECT newsum(four) AS sum_1500 FROM onek; + sum_1500 +---------- + 1500 +(1 row) + +--Testcase 125: +SELECT newcnt(four) AS cnt_1000 FROM onek; + cnt_1000 +---------- + 1000 +(1 row) + +--Testcase 126: +SELECT newcnt(*) AS cnt_1000 FROM onek; + cnt_1000 +---------- + 1000 +(1 row) + +--Testcase 127: +SELECT oldcnt(*) AS cnt_1000 FROM onek; + cnt_1000 +---------- + 1000 +(1 row) + +--Testcase 128: +SELECT sum2(q1,q2) FROM int8_tbl; + sum2 +------------------- + 18271560493827981 +(1 row) + +-- test for outer-level aggregates +-- this should work +--Testcase 129: +select ten, sum(distinct four) from onek a +group by ten +having exists (select 1 from onek b where sum(distinct a.four) = b.four); + ten | sum +-----+----- + 0 | 2 + 2 | 2 + 4 | 2 + 6 | 2 + 8 | 2 +(5 rows) + +-- this should fail because subquery has an agg of its own in WHERE +--Testcase 130: +select ten, sum(distinct four) from onek a +group by ten +having exists (select 1 from onek b + where sum(distinct a.four + b.four) = b.four); +ERROR: aggregate functions are not allowed in WHERE +LINE 4: where sum(distinct a.four + b.four) = b.four)... + ^ +-- Test handling of sublinks within outer-level aggregates. +-- Per bug report from Daniel Grace. +--Testcase 131: +select + (select max((select i.unique2 from tenk1 i where i.unique1 = o.unique1))) +from tenk1 o; + max +------ + 9999 +(1 row) + +-- Test handling of Params within aggregate arguments in hashed aggregation. +-- Per bug report from Jeevan Chalke. +--Testcase 132: +explain (verbose, costs off) +select s1.a, ss.a, sm +from generate_series1 s1, + lateral (select s2.a, sum(s1.a + s2.a) sm + from generate_series1 s2 group by s2.a) ss +order by 1, 2; + QUERY PLAN +------------------------------------------------------------------------ + Sort + Output: s1.a, s2.a, (sum((s1.a + s2.a))) + Sort Key: s1.a, s2.a + -> Nested Loop + Output: s1.a, s2.a, (sum((s1.a + s2.a))) + -> Foreign Scan on public.generate_series1 s1 + Output: s1.a + InfluxDB query: SELECT "a" FROM "generate_series1" + -> HashAggregate + Output: s2.a, sum((s1.a + s2.a)) + Group Key: s2.a + -> Foreign Scan on public.generate_series1 s2 + Output: s2.a + InfluxDB query: SELECT "a" FROM "generate_series1" +(14 rows) + +--Testcase 133: +select s1.a as s1, ss.a as s2, sm +from generate_series1 s1, + lateral (select s2.a, sum(s1.a + s2.a) sm + from generate_series1 s2 group by s2.a) ss +order by 1, 2; + s1 | s2 | sm +----+----+---- + 1 | 1 | 2 + 1 | 2 | 3 + 1 | 3 | 4 + 2 | 1 | 3 + 2 | 2 | 4 + 2 | 3 | 5 + 3 | 1 | 4 + 3 | 2 | 5 + 3 | 3 | 6 +(9 rows) + +--Testcase 134: +explain (verbose, costs off) +select array(select sum(x.a+y.a) s + from generate_series1 y group by y.a order by s) + from generate_series1 x; + QUERY PLAN +-------------------------------------------------------------------------- + Foreign Scan on public.generate_series1 x + Output: (SubPlan 1) + InfluxDB query: SELECT "a" FROM "generate_series1" + SubPlan 1 + -> Sort + Output: (sum((x.a + y.a))), y.a + Sort Key: (sum((x.a + y.a))) + -> HashAggregate + Output: sum((x.a + y.a)), y.a + Group Key: y.a + -> Foreign Scan on public.generate_series1 y + Output: y.a + InfluxDB query: SELECT "a" FROM "generate_series1" +(13 rows) + +--Testcase 135: +select array(select sum(x.a+y.a) s + from generate_series1 y group by y.a order by s) + from generate_series1 x; + array +--------- + {2,3,4} + {3,4,5} + {4,5,6} +(3 rows) + +-- +-- test for bitwise integer aggregates +-- +--Testcase 136: +CREATE FOREIGN TABLE bitwise_test_empty ( + i2 INT2, + i4 INT4, + i8 INT8, + i INTEGER, + x INT2, + y BIT(4) +) SERVER influxdb_svr; +-- empty case +--Testcase 137: +SELECT + BIT_AND(i2) AS "?", + BIT_OR(i4) AS "?", + BIT_XOR(i8) AS "?" +FROM bitwise_test_empty; + ? | ? | ? +---+---+--- + | | +(1 row) + +--Testcase 138: +CREATE FOREIGN TABLE bitwise_test ( + i2 INT2, + i4 INT4, + i8 INT8, + i INTEGER, + x INT2, + y BIT(4) +) SERVER influxdb_svr; +--Testcase 139: +SELECT + BIT_AND(i2) AS "1", + BIT_AND(i4) AS "1", + BIT_AND(i8) AS "1", + BIT_AND(i) AS "?", + BIT_AND(x) AS "0", + BIT_AND(y) AS "0100", + BIT_OR(i2) AS "7", + BIT_OR(i4) AS "7", + BIT_OR(i8) AS "7", + BIT_OR(i) AS "?", + BIT_OR(x) AS "7", + BIT_OR(y) AS "1101", + BIT_XOR(i2) AS "5", + BIT_XOR(i4) AS "5", + BIT_XOR(i8) AS "5", + BIT_XOR(i) AS "?", + BIT_XOR(x) AS "7", + BIT_XOR(y) AS "1101" +FROM bitwise_test; + 1 | 1 | 1 | ? | 0 | 0100 | 7 | 7 | 7 | ? | 7 | 1101 | 5 | 5 | 5 | ? | 7 | 1101 +---+---+---+---+---+------+---+---+---+---+---+------+---+---+---+---+---+------ + 1 | 1 | 1 | 1 | 0 | 0100 | 7 | 7 | 7 | 3 | 7 | 1101 | 5 | 5 | 5 | 2 | 7 | 1101 +(1 row) + +-- +-- test boolean aggregates +-- +-- first test all possible transition and final states +--Testcase 140: +CREATE FOREIGN TABLE boolean1 (x1 BOOL, y1 BOOL , x2 BOOL, y2 BOOL, + x3 BOOL, y3 BOOL, x4 BOOL, y4 BOOL, + x5 BOOL, y5 BOOL, x6 BOOL, y6 BOOL, + x7 BOOL, y7 BOOL, x8 BOOL, y8 BOOL, + x9 BOOL, y9 BOOL) SERVER influxdb_svr; +--Testcase 141: +SELECT + -- boolean and transitions + -- null because strict + booland_statefunc(x1, y1) IS NULL AS "t", + booland_statefunc(x2, y2) IS NULL AS "t", + booland_statefunc(x3, y3) IS NULL AS "t", + booland_statefunc(x4, y4) IS NULL AS "t", + booland_statefunc(x5, y5) IS NULL AS "t", + -- and actual computations + booland_statefunc(x6, y6) AS "t", + NOT booland_statefunc(x7, y7) AS "t", + NOT booland_statefunc(x8, y8) AS "t", + NOT booland_statefunc(x9, y9) AS "t" FROM boolean1; + t | t | t | t | t | t | t | t | t +---+---+---+---+---+---+---+---+--- + t | t | t | t | t | t | t | t | t +(1 row) + +--Testcase 142: +SELECT + -- boolean or transitions + -- null because strict + boolor_statefunc(x1, y1) IS NULL AS "t", + boolor_statefunc(x2, y2) IS NULL AS "t", + boolor_statefunc(x3, y3) IS NULL AS "t", + boolor_statefunc(x4, y4) IS NULL AS "t", + boolor_statefunc(x5, y5) IS NULL AS "t", + -- actual computations + boolor_statefunc(x6, y6) AS "t", + boolor_statefunc(x7, y7) AS "t", + boolor_statefunc(x8, y8) AS "t", + NOT boolor_statefunc(x9, y9) AS "t" FROM boolean1; + t | t | t | t | t | t | t | t | t +---+---+---+---+---+---+---+---+--- + t | t | t | t | t | t | t | t | t +(1 row) + +--Testcase 143: +CREATE FOREIGN TABLE bool_test_empty ( + b1 BOOL, + b2 BOOL, + b3 BOOL, + b4 BOOL +) SERVER influxdb_svr; +-- empty case +--Testcase 144: +SELECT + BOOL_AND(b1) AS "n", + BOOL_OR(b3) AS "n" +FROM bool_test_empty; + n | n +---+--- + | +(1 row) + +--Testcase 145: +CREATE FOREIGN TABLE bool_test ( + b1 BOOL, + b2 BOOL, + b3 BOOL, + b4 BOOL +) SERVER influxdb_svr; +--Testcase 146: +SELECT + BOOL_AND(b1) AS "f", + BOOL_AND(b2) AS "t", + BOOL_AND(b3) AS "f", + BOOL_AND(b4) AS "n", + BOOL_AND(NOT b2) AS "f", + BOOL_AND(NOT b3) AS "t" +FROM bool_test; + f | t | f | n | f | t +---+---+---+---+---+--- + f | t | f | | f | t +(1 row) + +--Testcase 147: +SELECT + EVERY(b1) AS "f", + EVERY(b2) AS "t", + EVERY(b3) AS "f", + EVERY(b4) AS "n", + EVERY(NOT b2) AS "f", + EVERY(NOT b3) AS "t" +FROM bool_test; + f | t | f | n | f | t +---+---+---+---+---+--- + f | t | f | | f | t +(1 row) + +--Testcase 148: +SELECT + BOOL_OR(b1) AS "t", + BOOL_OR(b2) AS "t", + BOOL_OR(b3) AS "f", + BOOL_OR(b4) AS "n", + BOOL_OR(NOT b2) AS "f", + BOOL_OR(NOT b3) AS "t" +FROM bool_test; + t | t | f | n | f | t +---+---+---+---+---+--- + t | t | f | | f | t +(1 row) + +-- +-- Test cases that should be optimized into indexscans instead of +-- the generic aggregate implementation. +-- +-- Basic cases +--Testcase 149: +explain (costs off) + select min(unique1) from tenk1; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 150: +select min(unique1) from tenk1; + min +----- + 0 +(1 row) + +--Testcase 151: +explain (costs off) + select max(unique1) from tenk1; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 152: +select max(unique1) from tenk1; + max +------ + 9999 +(1 row) + +--Testcase 153: +explain (costs off) + select max(unique1) from tenk1 where unique1 < 42; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 154: +select max(unique1) from tenk1 where unique1 < 42; + max +----- + 41 +(1 row) + +--Testcase 155: +explain (costs off) + select max(unique1) from tenk1 where unique1 > 42; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 156: +select max(unique1) from tenk1 where unique1 > 42; + max +------ + 9999 +(1 row) + +-- the planner may choose a generic aggregate here if parallel query is +-- enabled, since that plan will be parallel safe and the "optimized" +-- plan, which has almost identical cost, will not be. we want to test +-- the optimized plan, so temporarily disable parallel query. +begin; +--Testcase 157: +set local max_parallel_workers_per_gather = 0; +--Testcase 158: +explain (costs off) + select max(unique1) from tenk1 where unique1 > 42000; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 159: +select max(unique1) from tenk1 where unique1 > 42000; + max +----- +(0 rows) + +rollback; +-- multi-column index (uses tenk1_thous_tenthous) +--Testcase 160: +explain (costs off) + select max(tenthous) from tenk1 where thousand = 33; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 161: +select max(tenthous) from tenk1 where thousand = 33; + max +------ + 9033 +(1 row) + +--Testcase 162: +explain (costs off) + select min(tenthous) from tenk1 where thousand = 33; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 163: +select min(tenthous) from tenk1 where thousand = 33; + min +----- + 33 +(1 row) + +-- check parameter propagation into an indexscan subquery +--Testcase 164: +explain (costs off) + select f1, (select min(unique1) from tenk1 where unique1 > f1) AS gt + from int4_tbl; + QUERY PLAN +-------------------------- + Foreign Scan on int4_tbl + SubPlan 1 + -> Foreign Scan +(3 rows) + +--Testcase 165: +select f1, (select min(unique1) from tenk1 where unique1 > f1) AS gt + from int4_tbl; + f1 | gt +-------------+---- + 0 | 1 + 123456 | + -123456 | 0 + 2147483647 | + -2147483647 | 0 +(5 rows) + +-- check some cases that were handled incorrectly in 8.3.0 +--Testcase 166: +explain (costs off) + select distinct max(unique2) from tenk1; + QUERY PLAN +---------------------------------- + Unique + -> Sort + Sort Key: (max(unique2)) + -> Foreign Scan +(4 rows) + +--Testcase 167: +select distinct max(unique2) from tenk1; + max +------ + 9999 +(1 row) + +--Testcase 168: +explain (costs off) + select max(unique2) from tenk1 order by 1; + QUERY PLAN +---------------------------- + Sort + Sort Key: (max(unique2)) + -> Foreign Scan +(3 rows) + +--Testcase 169: +select max(unique2) from tenk1 order by 1; + max +------ + 9999 +(1 row) + +--Testcase 170: +explain (costs off) + select max(unique2) from tenk1 order by max(unique2); + QUERY PLAN +---------------------------- + Sort + Sort Key: (max(unique2)) + -> Foreign Scan +(3 rows) + +--Testcase 171: +select max(unique2) from tenk1 order by max(unique2); + max +------ + 9999 +(1 row) + +--Testcase 172: +explain (costs off) + select max(unique2) from tenk1 order by max(unique2)+1; + QUERY PLAN +---------------------------------- + Sort + Sort Key: ((max(unique2) + 1)) + -> Foreign Scan +(3 rows) + +--Testcase 173: +select max(unique2) from tenk1 order by max(unique2)+1; + max +------ + 9999 +(1 row) + +--Testcase 174: +explain (costs off) + select max(unique2), generate_series(1,3) as g from tenk1 order by g desc; + QUERY PLAN +------------------------------------------ + Sort + Sort Key: (generate_series(1, 3)) DESC + -> ProjectSet + -> Foreign Scan +(4 rows) + +--Testcase 175: +select max(unique2), generate_series(1,3) as g from tenk1 order by g desc; + max | g +------+--- + 9999 | 3 + 9999 | 2 + 9999 | 1 +(3 rows) + +-- interesting corner case: constant gets optimized into a seqscan +--Testcase 176: +explain (costs off) + select max(100) from tenk1; + QUERY PLAN +---------------------------------------------------- + Result + InitPlan 1 (returns $0) + -> Limit + -> Result + One-Time Filter: (100 IS NOT NULL) + -> Foreign Scan on tenk1 +(6 rows) + +--Testcase 177: +select max(100) from tenk1; + max +----- + 100 +(1 row) + +-- try it on an inheritance tree +--Testcase 178: +create foreign table minmaxtest(f1 int) server influxdb_svr;; +--Testcase 179: +create table minmaxtest1() inherits (minmaxtest); +--Testcase 180: +create table minmaxtest2() inherits (minmaxtest); +--Testcase 181: +create table minmaxtest3() inherits (minmaxtest); +--create index minmaxtesti on minmaxtest(f1); +--Testcase 182: +create index minmaxtest1i on minmaxtest1(f1); +--Testcase 183: +create index minmaxtest2i on minmaxtest2(f1 desc); +--Testcase 184: +create index minmaxtest3i on minmaxtest3(f1) where f1 is not null; +--Testcase 185: +insert into minmaxtest values(11), (12); +--Testcase 186: +insert into minmaxtest1 values(13), (14); +--Testcase 187: +insert into minmaxtest2 values(15), (16); +--Testcase 188: +insert into minmaxtest3 values(17), (18); +--Testcase 189: +explain (costs off) + select min(f1), max(f1) from minmaxtest; + QUERY PLAN +----------------------------------------------------- + Aggregate + -> Append + -> Foreign Scan on minmaxtest minmaxtest_1 + -> Seq Scan on minmaxtest1 minmaxtest_2 + -> Seq Scan on minmaxtest2 minmaxtest_3 + -> Seq Scan on minmaxtest3 minmaxtest_4 +(6 rows) + +--Testcase 190: +select min(f1), max(f1) from minmaxtest; + min | max +-----+----- + 11 | 18 +(1 row) + +-- DISTINCT doesn't do anything useful here, but it shouldn't fail +--Testcase 191: +explain (costs off) + select distinct min(f1), max(f1) from minmaxtest; + QUERY PLAN +----------------------------------------------------------------- + Unique + -> Sort + Sort Key: (min(minmaxtest.f1)), (max(minmaxtest.f1)) + -> Aggregate + -> Append + -> Foreign Scan on minmaxtest minmaxtest_1 + -> Seq Scan on minmaxtest1 minmaxtest_2 + -> Seq Scan on minmaxtest2 minmaxtest_3 + -> Seq Scan on minmaxtest3 minmaxtest_4 +(9 rows) + +--Testcase 192: +select distinct min(f1), max(f1) from minmaxtest; + min | max +-----+----- + 11 | 18 +(1 row) + +--Testcase 193: +drop foreign table minmaxtest cascade; +NOTICE: drop cascades to 3 other objects +DETAIL: drop cascades to table minmaxtest1 +drop cascades to table minmaxtest2 +drop cascades to table minmaxtest3 +-- check for correct detection of nested-aggregate errors +--Testcase 194: +select max(min(unique1)) from tenk1; +ERROR: aggregate function calls cannot be nested +LINE 1: select max(min(unique1)) from tenk1; + ^ +--Testcase 195: +select (select max(min(unique1)) from int8_tbl) from tenk1; +ERROR: aggregate function calls cannot be nested +LINE 1: select (select max(min(unique1)) from int8_tbl) from tenk1; + ^ +-- +-- Test removal of redundant GROUP BY columns +-- +--Testcase 196: +create foreign table agg_t1 (a int, b int, c int, d int) server influxdb_svr; +--Testcase 197: +create foreign table agg_t2 (x int, y int, z int) server influxdb_svr; +--Testcase 198: +create foreign table agg_t3 (a int, b int, c int) server influxdb_svr; +-- Non-primary-key columns can be removed from GROUP BY +--Testcase 199: +explain (costs off) select * from agg_t1 group by a,b,c,d; + QUERY PLAN +------------------------------ + HashAggregate + Group Key: a, b, c, d + -> Foreign Scan on agg_t1 +(3 rows) + +-- No removal can happen if the complete PK is not present in GROUP BY +--Testcase 200: +explain (costs off) select a,c from agg_t1 group by a,c,d; + QUERY PLAN +------------------------------ + HashAggregate + Group Key: a, c, d + -> Foreign Scan on agg_t1 +(3 rows) + +-- Test removal across multiple relations +--Testcase 201: +explain (costs off) select * +from agg_t1 inner join agg_t2 on agg_t1.a = agg_t2.x and agg_t1.b = agg_t2.y +group by agg_t1.a,agg_t1.b,agg_t1.c,agg_t1.d,agg_t2.x,agg_t2.y,agg_t2.z; + QUERY PLAN +----------------------------------------------------------------------------------- + Group + Group Key: agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d, agg_t2.x, agg_t2.y, agg_t2.z + -> Sort + Sort Key: agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d, agg_t2.z + -> Merge Join + Merge Cond: ((agg_t1.a = agg_t2.x) AND (agg_t1.b = agg_t2.y)) + -> Sort + Sort Key: agg_t1.a, agg_t1.b + -> Foreign Scan on agg_t1 + -> Sort + Sort Key: agg_t2.x, agg_t2.y + -> Foreign Scan on agg_t2 +(12 rows) + +-- Test case where agg_t1 can be optimized but not agg_t2 +--Testcase 202: +explain (costs off) select agg_t1.*,agg_t2.x,agg_t2.z +from agg_t1 inner join agg_t2 on agg_t1.a = agg_t2.x and agg_t1.b = agg_t2.y +group by agg_t1.a,agg_t1.b,agg_t1.c,agg_t1.d,agg_t2.x,agg_t2.z; + QUERY PLAN +----------------------------------------------------------------------------- + Group + Group Key: agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d, agg_t2.x, agg_t2.z + -> Sort + Sort Key: agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d, agg_t2.z + -> Merge Join + Merge Cond: ((agg_t1.a = agg_t2.x) AND (agg_t1.b = agg_t2.y)) + -> Sort + Sort Key: agg_t1.a, agg_t1.b + -> Foreign Scan on agg_t1 + -> Sort + Sort Key: agg_t2.x, agg_t2.y + -> Foreign Scan on agg_t2 +(12 rows) + +-- Cannot optimize when PK is deferrable +--Testcase 203: +explain (costs off) select * from agg_t3 group by a,b,c; + QUERY PLAN +------------------------------ + HashAggregate + Group Key: a, b, c + -> Foreign Scan on agg_t3 +(3 rows) + +--Testcase 204: +create temp table agg_t1c () inherits (agg_t1); +-- Ensure we don't remove any columns when agg_t1 has a child table +--Testcase 205: +explain (costs off) select * from agg_t1 group by a,b,c,d; + QUERY PLAN +----------------------------------------------------- + HashAggregate + Group Key: agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d + -> Append + -> Foreign Scan on agg_t1 agg_t1_1 + -> Seq Scan on agg_t1c agg_t1_2 +(5 rows) + +-- Okay to remove columns if we're only querying the parent. +--Testcase 206: +explain (costs off) select * from only agg_t1 group by a,b,c,d; + QUERY PLAN +------------------------------ + HashAggregate + Group Key: a, b, c, d + -> Foreign Scan on agg_t1 +(3 rows) + +--Testcase 207: +create temp table p_agg_t1 ( + a int, + b int, + c int, + d int, + primary key(a,b) +) partition by list(a); +--Testcase 208: +create temp table p_agg_t1_1 partition of p_agg_t1 for values in(1); +--Testcase 209: +create temp table p_agg_t1_2 partition of p_agg_t1 for values in(2); +-- Ensure we can remove non-PK columns for partitioned tables. +--Testcase 210: +explain (costs off) select * from p_agg_t1 group by a,b,c,d; + QUERY PLAN +------------------------------------- + HashAggregate + Group Key: p_agg_t1.a, p_agg_t1.b + -> Append + -> Seq Scan on p_agg_t1_1 + -> Seq Scan on p_agg_t1_2 +(5 rows) + +--Testcase 211: +drop foreign table agg_t1 cascade; +NOTICE: drop cascades to table agg_t1c +--Testcase 212: +drop foreign table agg_t2 cascade; +--Testcase 213: +drop foreign table agg_t3 cascade; +--Testcase 214: +drop table p_agg_t1; +-- +-- Test GROUP BY matching of join columns that are type-coerced due to USING +-- +--Testcase 215: +create foreign table agg_t1(f1 int, f2 bigint) server influxdb_svr; +--Testcase 216: +create foreign table agg_t2(f1 bigint, f22 bigint) server influxdb_svr; +--Testcase 217: +select f1 from agg_t1 left join agg_t2 using (f1) group by f1; + f1 +---- +(0 rows) + +--Testcase 218: +select f1 from agg_t1 left join agg_t2 using (f1) group by agg_t1.f1; + f1 +---- +(0 rows) + +--Testcase 219: +select agg_t1.f1 from agg_t1 left join agg_t2 using (f1) group by agg_t1.f1; + f1 +---- +(0 rows) + +-- only this one should fail: +--Testcase 220: +select agg_t1.f1 from agg_t1 left join agg_t2 using (f1) group by f1; +ERROR: column "agg_t1.f1" must appear in the GROUP BY clause or be used in an aggregate function +LINE 1: select agg_t1.f1 from agg_t1 left join agg_t2 using (f1) gro... + ^ +--Testcase 221: +drop foreign table agg_t1 cascade; +--Testcase 222: +drop foreign table agg_t2 cascade; +-- +-- Test combinations of DISTINCT and/or ORDER BY +-- +begin; +--Testcase 223: +select array_agg(q1 order by q2) + from INT8_TBL2; + array_agg +----------- + {3,4,2,1} +(1 row) + +--Testcase 224: +select array_agg(q1 order by q1) + from INT8_TBL2; + array_agg +----------- + {1,2,3,4} +(1 row) + +--Testcase 225: +select array_agg(q1 order by q1 desc) + from INT8_TBL2; + array_agg +----------- + {4,3,2,1} +(1 row) + +--Testcase 226: +select array_agg(q2 order by q1 desc) + from INT8_TBL2; + array_agg +----------- + {2,1,3,4} +(1 row) + +--Testcase 227: +select array_agg(distinct f1) + from INT4_TBL2; + array_agg +----------- + {1,2,3} +(1 row) + +--Testcase 228: +select array_agg(distinct f1 order by f1) + from INT4_TBL2; + array_agg +----------- + {1,2,3} +(1 row) + +--Testcase 229: +select array_agg(distinct f1 order by f1 desc) + from INT4_TBL2; + array_agg +----------- + {3,2,1} +(1 row) + +--Testcase 230: +select array_agg(distinct f1 order by f1 desc nulls last) + from INT4_TBL2; + array_agg +----------- + {3,2,1} +(1 row) + +rollback; +-- multi-arg aggs, strict/nonstrict, distinct/order by +--Testcase 231: +create type aggtype as (a integer, b integer, c text); +--Testcase 232: +create function aggf_trans(aggtype[],integer,integer,text) returns aggtype[] +as 'select array_append($1,ROW($2,$3,$4)::aggtype)' +language sql strict immutable; +--Testcase 233: +create function aggfns_trans(aggtype[],integer,integer,text) returns aggtype[] +as 'select array_append($1,ROW($2,$3,$4)::aggtype)' +language sql immutable; +--Testcase 234: +create aggregate aggfstr(integer,integer,text) ( + sfunc = aggf_trans, stype = aggtype[], + initcond = '{}' +); +--Testcase 235: +create aggregate aggfns(integer,integer,text) ( + sfunc = aggfns_trans, stype = aggtype[], sspace = 10000, + initcond = '{}' +); +begin; +--Testcase 236: +select aggfstr(a,b,c) + from multi_arg_agg; + aggfstr +--------------------------------------- + {"(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 237: +select aggfns(a,b,c) + from multi_arg_agg; + aggfns +----------------------------------------------- + {"(1,3,foo)","(0,,)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 238: +select aggfstr(distinct a,b,c) + from multi_arg_agg, + generate_series(1,3) i; + aggfstr +--------------------------------------- + {"(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 239: +select aggfns(distinct a,b,c) + from multi_arg_agg, + generate_series(1,3) i; + aggfns +----------------------------------------------- + {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 240: +select aggfstr(distinct a,b,c order by b) + from multi_arg_agg, + generate_series(1,3) i; + aggfstr +--------------------------------------- + {"(3,1,baz)","(2,2,bar)","(1,3,foo)"} +(1 row) + +--Testcase 241: +select aggfns(distinct a,b,c order by b) + from multi_arg_agg, + generate_series(1,3) i; + aggfns +----------------------------------------------- + {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} +(1 row) + +-- test specific code paths +--Testcase 242: +select aggfns(distinct a,a,c order by c using ~<~,a) + from multi_arg_agg, + generate_series(1,2) i; + aggfns +------------------------------------------------ + {"(2,2,bar)","(3,3,baz)","(1,1,foo)","(0,0,)"} +(1 row) + +--Testcase 243: +select aggfns(distinct a,a,c order by c using ~<~) + from multi_arg_agg, + generate_series(1,2) i; + aggfns +------------------------------------------------ + {"(2,2,bar)","(3,3,baz)","(1,1,foo)","(0,0,)"} +(1 row) + +--Testcase 244: +select aggfns(distinct a,a,c order by a) + from multi_arg_agg, + generate_series(1,2) i; + aggfns +------------------------------------------------ + {"(0,0,)","(1,1,foo)","(2,2,bar)","(3,3,baz)"} +(1 row) + +--Testcase 245: +select aggfns(distinct a,b,c order by a,c using ~<~,b) + from multi_arg_agg, + generate_series(1,2) i; + aggfns +----------------------------------------------- + {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +-- check node I/O via view creation and usage, also deparsing logic +--Testcase 246: +create view agg_view1 as + select aggfns(a,b,c) + from multi_arg_agg; +--Testcase 247: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(1,3,foo)","(0,,)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 248: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +----------------------------------------------------------------------------- + SELECT aggfns(multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c) AS aggfns+ + FROM multi_arg_agg; +(1 row) + +--Testcase 249: +create or replace view agg_view1 as + select aggfns(distinct a,b,c) + from multi_arg_agg, + generate_series(1,3) i; +--Testcase 250: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 251: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +-------------------------------------------------------------------------------------- + SELECT aggfns(DISTINCT multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c) AS aggfns+ + FROM multi_arg_agg, + + generate_series(1, 3) i(i); +(1 row) + +--Testcase 252: +create or replace view agg_view1 as + select aggfns(distinct a,b,c order by b) + from multi_arg_agg, + generate_series(1,3) i; +--Testcase 253: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} +(1 row) + +--Testcase 254: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +--------------------------------------------------------------------------------------------------------------- + SELECT aggfns(DISTINCT multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c ORDER BY multi_arg_agg.b) AS aggfns+ + FROM multi_arg_agg, + + generate_series(1, 3) i(i); +(1 row) + +--Testcase 255: +create or replace view agg_view1 as + select aggfns(a,b,c order by b+1) + from multi_arg_agg; +--Testcase 256: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} +(1 row) + +--Testcase 257: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +------------------------------------------------------------------------------------------------------------ + SELECT aggfns(multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c ORDER BY (multi_arg_agg.b + 1)) AS aggfns+ + FROM multi_arg_agg; +(1 row) + +--Testcase 258: +create or replace view agg_view1 as + select aggfns(a,a,c order by b) + from multi_arg_agg; +--Testcase 259: +select * from agg_view1; + aggfns +------------------------------------------------ + {"(3,3,baz)","(2,2,bar)","(1,1,foo)","(0,0,)"} +(1 row) + +--Testcase 260: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +------------------------------------------------------------------------------------------------------ + SELECT aggfns(multi_arg_agg.a, multi_arg_agg.a, multi_arg_agg.c ORDER BY multi_arg_agg.b) AS aggfns+ + FROM multi_arg_agg; +(1 row) + +--Testcase 261: +create or replace view agg_view1 as + select aggfns(a,b,c order by c using ~<~) + from multi_arg_agg; +--Testcase 262: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(2,2,bar)","(3,1,baz)","(1,3,foo)","(0,,)"} +(1 row) + +--Testcase 263: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +--------------------------------------------------------------------------------------------------------------------------- + SELECT aggfns(multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c ORDER BY multi_arg_agg.c USING ~<~ NULLS LAST) AS aggfns+ + FROM multi_arg_agg; +(1 row) + +--Testcase 264: +create or replace view agg_view1 as + select aggfns(distinct a,b,c order by a,c using ~<~,b) + from multi_arg_agg, + generate_series(1,2) i; +--Testcase 265: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 266: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +---------------------------------------------------------------------------------------------------------------------------------------------------------------------- + SELECT aggfns(DISTINCT multi_arg_agg.a, multi_arg_agg.b, multi_arg_agg.c ORDER BY multi_arg_agg.a, multi_arg_agg.c USING ~<~ NULLS LAST, multi_arg_agg.b) AS aggfns+ + FROM multi_arg_agg, + + generate_series(1, 2) i(i); +(1 row) + +--Testcase 267: +drop view agg_view1; +rollback; +-- incorrect DISTINCT usage errors +--Testcase 268: +select aggfns(distinct a,b,c order by i) + from multi_arg_agg2, generate_series(1,2) i; +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: select aggfns(distinct a,b,c order by i) + ^ +--Testcase 269: +select aggfns(distinct a,b,c order by a,b+1) + from multi_arg_agg2, generate_series(1,2) i; +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: select aggfns(distinct a,b,c order by a,b+1) + ^ +--Testcase 270: +select aggfns(distinct a,b,c order by a,b,i,c) + from multi_arg_agg2, generate_series(1,2) i; +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: select aggfns(distinct a,b,c order by a,b,i,c) + ^ +--Testcase 271: +select aggfns(distinct a,a,c order by a,b) + from multi_arg_agg2, generate_series(1,2) i; +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: select aggfns(distinct a,a,c order by a,b) + ^ +-- string_agg tests +--Testcase 272: +create foreign table string_agg1(a1 text, a2 text) server influxdb_svr; +--Testcase 273: +create foreign table string_agg2(a1 text, a2 text) server influxdb_svr; +--Testcase 274: +create foreign table string_agg3(a1 text, a2 text) server influxdb_svr; +--Testcase 275: +create foreign table string_agg4(a1 text, a2 text) server influxdb_svr; +--Testcase 276: +select string_agg(a1,',') from string_agg1; + string_agg +---------------- + aaaa,bbbb,cccc +(1 row) + +--Testcase 277: +select string_agg(a1,',') from string_agg2; + string_agg +---------------- + aaaa,bbbb,cccc +(1 row) + +--Testcase 278: +select string_agg(a1,'AB') from string_agg3; + string_agg +------------ + bbbbABcccc +(1 row) + +--Testcase 279: +select string_agg(a1,',') from string_agg4; + string_agg +------------ + +(1 row) + +-- check some implicit casting cases, as per bug #5564 +--Testcase 280: +select string_agg(distinct f1, ',' order by f1) from varchar_tbl; -- ok + string_agg +------------ + a,ab,abcd +(1 row) + +--Testcase 281: +select string_agg(distinct f1::text, ',' order by f1) from varchar_tbl; -- not ok +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: select string_agg(distinct f1::text, ',' order by f1) from v... + ^ +--Testcase 282: +select string_agg(distinct f1, ',' order by f1::text) from varchar_tbl; -- not ok +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: select string_agg(distinct f1, ',' order by f1::text) from v... + ^ +--Testcase 283: +select string_agg(distinct f1::text, ',' order by f1::text) from varchar_tbl; -- ok + string_agg +------------ + a,ab,abcd +(1 row) + +-- InfluxDB does not support binary data +-- string_agg bytea tests +/* +create table bytea_test_table(v bytea); + +select string_agg(v, '') from bytea_test_table; + +insert into bytea_test_table values(decode('ff','hex')); + +select string_agg(v, '') from bytea_test_table; + +insert into bytea_test_table values(decode('aa','hex')); + +select string_agg(v, '') from bytea_test_table; +select string_agg(v, NULL) from bytea_test_table; +select string_agg(v, decode('ee', 'hex')) from bytea_test_table; + +drop table bytea_test_table; +*/ +-- FILTER tests +--Testcase 284: +select min(unique1) filter (where unique1 > 100) from tenk1; + min +----- + 101 +(1 row) + +--Testcase 285: +select sum(1/ten) filter (where ten > 0) from tenk1; + sum +------ + 1000 +(1 row) + +--Testcase 286: +select ten, sum(distinct four) filter (where four::text ~ '123') from onek a +group by ten; + ten | sum +-----+----- + 0 | + 1 | + 2 | + 3 | + 4 | + 5 | + 6 | + 7 | + 8 | + 9 | +(10 rows) + +--Testcase 287: +select ten, sum(distinct four) filter (where four > 10) from onek a +group by ten +having exists (select 1 from onek b where sum(distinct a.four) = b.four); + ten | sum +-----+----- + 0 | + 2 | + 4 | + 6 | + 8 | +(5 rows) + +--Testcase 288: +select max(foo COLLATE "C") filter (where (bar collate "POSIX") > '0') +from (values ('a', 'b')) AS v(foo,bar); + max +----- + a +(1 row) + +-- outer reference in FILTER (PostgreSQL extension) +--Testcase 289: +select (select count(*) + from (values (1)) t0(inner_c)) +from (values (2),(3)) t1(outer_c); -- inner query is aggregation query + count +------- + 1 + 1 +(2 rows) + +--Testcase 290: +select (select count(*) filter (where outer_c <> 0) + from (values (1)) t0(inner_c)) +from (values (2),(3)) t1(outer_c); -- outer query is aggregation query + count +------- + 2 +(1 row) + +--Testcase 291: +select (select count(inner_c) filter (where outer_c <> 0) + from (values (1)) t0(inner_c)) +from (values (2),(3)) t1(outer_c); -- inner query is aggregation query + count +------- + 1 + 1 +(2 rows) + +--Testcase 292: +select + (select max((select i.unique2 from tenk1 i where i.unique1 = o.unique1)) + filter (where o.unique1 < 10)) +from tenk1 o; -- outer query is aggregation query + max +------ + 9998 +(1 row) + +-- subquery in FILTER clause (PostgreSQL extension) +--Testcase 293: +select sum(unique1) FILTER (WHERE + unique1 IN (SELECT unique1 FROM onek where unique1 < 100)) FROM tenk1; + sum +------ + 4950 +(1 row) + +-- exercise lots of aggregate parts with FILTER +begin; +--Testcase 294: +select aggfns(distinct a,b,c order by a,c using ~<~,b) filter (where a > 1) + from multi_arg_agg3, + generate_series(1,2) i; + aggfns +--------------------------- + {"(2,2,bar)","(3,1,baz)"} +(1 row) + +rollback; +-- check handling of bare boolean Var in FILTER +--Testcase 454: +select max(0) filter (where b1) from bool_test; + max +----- + 0 +(1 row) + +--Testcase 455: +select (select max(0) filter (where b1)) from bool_test; + max +----- + 0 +(1 row) + +-- check for correct detection of nested-aggregate errors in FILTER +--Testcase 456: +select max(unique1) filter (where sum(ten) > 0) from tenk1; +ERROR: aggregate functions are not allowed in FILTER +LINE 1: select max(unique1) filter (where sum(ten) > 0) from tenk1; + ^ +--Testcase 457: +select (select max(unique1) filter (where sum(ten) > 0) from int8_tbl) from tenk1; +ERROR: aggregate function calls cannot be nested +LINE 1: select (select max(unique1) filter (where sum(ten) > 0) from... + ^ +--Testcase 458: +select max(unique1) filter (where bool_or(ten > 0)) from tenk1; +ERROR: aggregate functions are not allowed in FILTER +LINE 1: select max(unique1) filter (where bool_or(ten > 0)) from ten... + ^ +--Testcase 459: +select (select max(unique1) filter (where bool_or(ten > 0)) from int8_tbl) from tenk1; +ERROR: aggregate function calls cannot be nested +LINE 1: select (select max(unique1) filter (where bool_or(ten > 0)) ... + ^ +-- ordered-set aggregates +begin; +--Testcase 295: +select f1, percentile_cont(f1) within group (order by x::float8) +from generate_series(1,5) x, + FLOAT8_TBL +group by f1 order by f1; + f1 | percentile_cont +------+----------------- + 0 | 1 + 0.1 | 1.4 + 0.25 | 2 + 0.4 | 2.6 + 0.5 | 3 + 0.6 | 3.4 + 0.75 | 4 + 0.9 | 4.6 + 1 | 5 +(9 rows) + +rollback; +begin; +--Testcase 296: +select f1, percentile_cont(f1 order by f1) within group (order by x) -- error +from generate_series(1,5) x, + FLOAT8_TBL +group by f1 order by f1; +ERROR: cannot use multiple ORDER BY clauses with WITHIN GROUP +LINE 1: select f1, percentile_cont(f1 order by f1) within group (ord... + ^ +rollback; +begin; +--Testcase 297: +select f1, sum() within group (order by x::float8) -- error +from generate_series(1,5) x, + FLOAT8_TBL +group by f1 order by f1; +ERROR: sum is not an ordered-set aggregate, so it cannot have WITHIN GROUP +LINE 1: select f1, sum() within group (order by x::float8) -- error + ^ +rollback; +begin; +--Testcase 298: +select f1, percentile_cont(f1,f1) -- error +from generate_series(1,5) x, + FLOAT8_TBL +group by f1 order by f1; +ERROR: WITHIN GROUP is required for ordered-set aggregate percentile_cont +LINE 1: select f1, percentile_cont(f1,f1) -- error + ^ +rollback; +--Testcase 299: +select percentile_cont(0.5) within group (order by b) from aggtest; + percentile_cont +------------------ + 53.4485001564026 +(1 row) + +--Testcase 300: +select percentile_cont(0.5) within group (order by b), sum(b) from aggtest; + percentile_cont | sum +------------------+--------- + 53.4485001564026 | 431.773 +(1 row) + +--Testcase 301: +select percentile_cont(0.5) within group (order by thousand) from tenk1; + percentile_cont +----------------- + 499.5 +(1 row) + +--Testcase 302: +select percentile_disc(0.5) within group (order by thousand) from tenk1; + percentile_disc +----------------- + 499 +(1 row) + +begin; +--Testcase 303: +select rank(3) within group (order by f1) from INT4_TBL3; + rank +------ + 5 +(1 row) + +--Testcase 304: +select cume_dist(3) within group (order by f1) from INT4_TBL3; + cume_dist +----------- + 0.875 +(1 row) + +--Testcase 305: +select percent_rank(3) within group (order by f1) from INT4_TBL4; + percent_rank +-------------- + 0.5 +(1 row) + +--Testcase 306: +select dense_rank(3) within group (order by f1) from INT4_TBL3; + dense_rank +------------ + 3 +(1 row) + +rollback; +--Testcase 307: +select percentile_disc(array[0,0.1,0.25,0.5,0.75,0.9,1]) within group (order by thousand) +from tenk1; + percentile_disc +---------------------------- + {0,99,249,499,749,899,999} +(1 row) + +--Testcase 308: +select percentile_cont(array[0,0.25,0.5,0.75,1]) within group (order by thousand) +from tenk1; + percentile_cont +----------------------------- + {0,249.75,499.5,749.25,999} +(1 row) + +--Testcase 309: +select percentile_disc(array[[null,1,0.5],[0.75,0.25,null]]) within group (order by thousand) +from tenk1; + percentile_disc +--------------------------------- + {{NULL,999,499},{749,249,NULL}} +(1 row) + +--Testcase 310: +create foreign table generate_series2 (a int) server influxdb_svr; +--Testcase 311: +select percentile_cont(array[0,1,0.25,0.75,0.5,1,0.3,0.32,0.35,0.38,0.4]) within group (order by a) +from generate_series2; + percentile_cont +------------------------------------------ + {1,6,2.25,4.75,3.5,6,2.5,2.6,2.75,2.9,3} +(1 row) + +--Testcase 312: +select ten, mode() within group (order by string4) from tenk1 group by ten; + ten | mode +-----+-------- + 0 | HHHHxx + 1 | OOOOxx + 2 | VVVVxx + 3 | OOOOxx + 4 | HHHHxx + 5 | HHHHxx + 6 | OOOOxx + 7 | AAAAxx + 8 | VVVVxx + 9 | VVVVxx +(10 rows) + +--Testcase 313: +create foreign table percentile_disc1(x text) server influxdb_svr; +--Testcase 314: +select percentile_disc(array[0.25,0.5,0.75]) within group (order by unnest) +from (select unnest(x::text[]) from percentile_disc1) y; + percentile_disc +----------------- + {fred,jill,jim} +(1 row) + +-- check collation propagates up in suitable cases: +--Testcase 315: +create foreign table pg_collation1 (x text) server influxdb_svr; +--Testcase 316: +select pg_collation_for(percentile_disc(1) within group (order by x collate "POSIX")) + from pg_collation1; + pg_collation_for +------------------ + "POSIX" +(1 row) + +-- test ordered-set aggs using built-in support functions +--Testcase 317: +create aggregate test_percentile_disc(float8 ORDER BY anyelement) ( + stype = internal, + sfunc = ordered_set_transition, + finalfunc = percentile_disc_final, + finalfunc_extra = true, + finalfunc_modify = read_write +); +--Testcase 318: +create aggregate test_rank(VARIADIC "any" ORDER BY VARIADIC "any") ( + stype = internal, + sfunc = ordered_set_transition_multi, + finalfunc = rank_final, + finalfunc_extra = true, + hypothetical +); +-- ordered-set aggs created with CREATE AGGREGATE +--Testcase 319: +create foreign table test_rank1 (x int) server influxdb_svr; +--Testcase 320: +select test_rank(3) within group (order by x) from test_rank1; + test_rank +----------- + 5 +(1 row) + +--Testcase 321: +select test_percentile_disc(0.5) within group (order by thousand) from tenk1; + test_percentile_disc +---------------------- + 499 +(1 row) + +-- ordered-set aggs can't use ungrouped vars in direct args: +--Testcase 322: +create foreign table generate_series3 (x int) server influxdb_svr; +--Testcase 323: +select rank(x) within group (order by x) from generate_series3 x; +ERROR: column "x.x" must appear in the GROUP BY clause or be used in an aggregate function +LINE 1: select rank(x) within group (order by x) from generate_serie... + ^ +DETAIL: Direct arguments of an ordered-set aggregate must use only grouped columns. +-- outer-level agg can't use a grouped arg of a lower level, either: +--Testcase 324: +select array(select percentile_disc(a) within group (order by x) + from (values (0.3),(0.7)) v(a) group by a) + from generate_series3; +ERROR: outer-level aggregate cannot contain a lower-level variable in its direct arguments +LINE 1: select array(select percentile_disc(a) within group (order b... + ^ +-- agg in the direct args is a grouping violation, too: +--Testcase 325: +select rank(sum(x)) within group (order by x) from generate_series3 x; +ERROR: aggregate function calls cannot be nested +LINE 1: select rank(sum(x)) within group (order by x) from generate_... + ^ +-- hypothetical-set type unification and argument-count failures: +--Testcase 326: +select rank(3) within group (order by x) from pg_collation1; +ERROR: WITHIN GROUP types text and integer cannot be matched +LINE 1: select rank(3) within group (order by x) from pg_collation1; + ^ +--Testcase 327: +select rank(3) within group (order by stringu1,stringu2) from tenk1; +ERROR: function rank(integer, name, name) does not exist +LINE 1: select rank(3) within group (order by stringu1,stringu2) fro... + ^ +HINT: To use the hypothetical-set aggregate rank, the number of hypothetical direct arguments (here 1) must match the number of ordering columns (here 2). +--Testcase 328: +select rank('fred') within group (order by x) from generate_series3 x; +ERROR: invalid input syntax for type integer: "fred" +LINE 1: select rank('fred') within group (order by x) from generate_... + ^ +--Testcase 329: +select rank('adam'::text collate "C") within group (order by x collate "POSIX") + from pg_collation1; +ERROR: collation mismatch between explicit collations "C" and "POSIX" +LINE 1: ...adam'::text collate "C") within group (order by x collate "P... + ^ +-- hypothetical-set type unification successes: +--Testcase 330: +select rank('adam'::varchar) within group (order by x) from pg_collation1; + rank +------ + 1 +(1 row) + +--Testcase 331: +select rank('3') within group (order by x) from generate_series3 x; + rank +------ + 3 +(1 row) + +-- divide by zero check +--Testcase 332: +select percent_rank(0) within group (order by x) from generate_series(1,0) x; + percent_rank +-------------- + 0 +(1 row) + +-- deparse and multiple features: +--Testcase 333: +create view aggordview1 as +select ten, + percentile_disc(0.5) within group (order by thousand) as p50, + percentile_disc(0.5) within group (order by thousand) filter (where hundred=1) as px, + rank(5,'AZZZZ',50) within group (order by hundred, string4 desc, hundred) + from tenk1 + group by ten order by ten; +--Testcase 334: +select pg_get_viewdef('aggordview1'); + pg_get_viewdef +------------------------------------------------------------------------------------------------------------------------------- + SELECT tenk1.ten, + + percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY tenk1.thousand) AS p50, + + percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY tenk1.thousand) FILTER (WHERE (tenk1.hundred = 1)) AS px,+ + rank(5, 'AZZZZ'::name, 50) WITHIN GROUP (ORDER BY tenk1.hundred, tenk1.string4 DESC, tenk1.hundred) AS rank + + FROM tenk1 + + GROUP BY tenk1.ten + + ORDER BY tenk1.ten; +(1 row) + +--Testcase 335: +select * from aggordview1 order by ten; + ten | p50 | px | rank +-----+-----+-----+------ + 0 | 490 | | 101 + 1 | 491 | 401 | 101 + 2 | 492 | | 101 + 3 | 493 | | 101 + 4 | 494 | | 101 + 5 | 495 | | 67 + 6 | 496 | | 1 + 7 | 497 | | 1 + 8 | 498 | | 1 + 9 | 499 | | 1 +(10 rows) + +--Testcase 336: +drop view aggordview1; +-- User defined function for user defined aggregate, VARIADIC +--Testcase 337: +create function least_accum(anyelement, variadic anyarray) +returns anyelement language sql as + 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; +--Testcase 338: +create aggregate least_agg(variadic items anyarray) ( + stype = anyelement, sfunc = least_accum +); +--Testcase 339: +create function cleast_accum(anycompatible, variadic anycompatiblearray) +returns anycompatible language sql as + 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; +--Testcase 340: +create aggregate cleast_agg(variadic items anycompatiblearray) ( + stype = anycompatible, sfunc = cleast_accum +); +-- variadic aggregates +--Testcase 341: +select least_agg(q1,q2) from int8_tbl; + least_agg +------------------- + -4567890123456789 +(1 row) + +--Testcase 342: +select least_agg(variadic array[q1,q2]) from int8_tbl; + least_agg +------------------- + -4567890123456789 +(1 row) + +--Testcase 343: +select cleast_agg(q1,q2) from int8_tbl; + cleast_agg +------------------- + -4567890123456789 +(1 row) + +--Testcase 344: +select cleast_agg(4.5,f1) from int4_tbl; + cleast_agg +------------- + -2147483647 +(1 row) + +--Testcase 345: +select cleast_agg(variadic array[4.5,f1]) from int4_tbl; + cleast_agg +------------- + -2147483647 +(1 row) + +--Testcase 346: +select pg_typeof(cleast_agg(variadic array[4.5,f1])) from int4_tbl; + pg_typeof +----------- + numeric +(1 row) + +--Testcase 347: +drop aggregate least_agg(variadic items anyarray); +--Testcase 348: +drop function least_accum(anyelement, variadic anyarray); +-- test aggregates with common transition functions share the same states +begin work; +--Testcase 349: +create type avg_state as (total bigint, count bigint); +--Testcase 350: +create or replace function avg_transfn(state avg_state, n int) returns avg_state as +$$ +declare new_state avg_state; +begin + raise notice 'avg_transfn called with %', n; + if state is null then + if n is not null then + new_state.total := n; + new_state.count := 1; + return new_state; + end if; + return null; + elsif n is not null then + state.total := state.total + n; + state.count := state.count + 1; + return state; + end if; + + return null; +end +$$ language plpgsql; +--Testcase 351: +create function avg_finalfn(state avg_state) returns int4 as +$$ +begin + if state is null then + return NULL; + else + return state.total / state.count; + end if; +end +$$ language plpgsql; +--Testcase 352: +create function sum_finalfn(state avg_state) returns int4 as +$$ +begin + if state is null then + return NULL; + else + return state.total; + end if; +end +$$ language plpgsql; +--Testcase 353: +create aggregate my_avg(int4) +( + stype = avg_state, + sfunc = avg_transfn, + finalfunc = avg_finalfn +); +--Testcase 354: +create aggregate my_sum(int4) +( + stype = avg_state, + sfunc = avg_transfn, + finalfunc = sum_finalfn +); +-- aggregate state should be shared as aggs are the same. +--Testcase 355: +create foreign table my_avg1 (one int) server influxdb_svr; +--Testcase 356: +select my_avg(one),my_avg(one) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 + my_avg | my_avg +--------+-------- + 2 | 2 +(1 row) + +-- aggregate state should be shared as transfn is the same for both aggs. +--Testcase 357: +select my_avg(one),my_sum(one) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 + my_avg | my_sum +--------+-------- + 2 | 4 +(1 row) + +-- same as previous one, but with DISTINCT, which requires sorting the input. +--Testcase 358: +select my_avg(distinct one),my_sum(distinct one) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 + my_avg | my_sum +--------+-------- + 2 | 4 +(1 row) + +-- shouldn't share states due to the distinctness not matching. +--Testcase 359: +select my_avg(distinct one),my_sum(one) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 + my_avg | my_sum +--------+-------- + 2 | 4 +(1 row) + +-- shouldn't share states due to the filter clause not matching. +--Testcase 360: +select my_avg(one) filter (where one > 1),my_sum(one) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 +NOTICE: avg_transfn called with 3 + my_avg | my_sum +--------+-------- + 3 | 4 +(1 row) + +-- this should not share the state due to different input columns. +--Testcase 361: +create foreign table my_avg2(one int, two int) server influxdb_svr; +--Testcase 362: +select my_avg(one),my_sum(two) from my_avg2; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 2 +NOTICE: avg_transfn called with 3 +NOTICE: avg_transfn called with 4 + my_avg | my_sum +--------+-------- + 2 | 6 +(1 row) + +-- exercise cases where OSAs share state +--Testcase 363: +create foreign table percentile_cont1( a int) server influxdb_svr; +--Testcase 364: +select + percentile_cont(0.5) within group (order by a), + percentile_disc(0.5) within group (order by a) +from percentile_cont1; + percentile_cont | percentile_disc +-----------------+----------------- + 4 | 3 +(1 row) + +--Testcase 365: +select + percentile_cont(0.25) within group (order by a), + percentile_disc(0.5) within group (order by a) +from percentile_cont1; + percentile_cont | percentile_disc +-----------------+----------------- + 2.5 | 3 +(1 row) + +-- these can't share state currently +--Testcase 366: +select + rank(4) within group (order by a), + dense_rank(4) within group (order by a) +from percentile_cont1; + rank | dense_rank +------+------------ + 3 | 3 +(1 row) + +-- test that aggs with the same sfunc and initcond share the same agg state +--Testcase 367: +create aggregate my_sum_init(int4) +( + stype = avg_state, + sfunc = avg_transfn, + finalfunc = sum_finalfn, + initcond = '(10,0)' +); +--Testcase 368: +create aggregate my_avg_init(int4) +( + stype = avg_state, + sfunc = avg_transfn, + finalfunc = avg_finalfn, + initcond = '(10,0)' +); +--Testcase 369: +create aggregate my_avg_init2(int4) +( + stype = avg_state, + sfunc = avg_transfn, + finalfunc = avg_finalfn, + initcond = '(4,0)' +); +-- state should be shared if INITCONDs are matching +--Testcase 370: +select my_sum_init(one),my_avg_init(one) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 + my_sum_init | my_avg_init +-------------+------------- + 14 | 7 +(1 row) + +-- Varying INITCONDs should cause the states not to be shared. +--Testcase 371: +select my_sum_init(one),my_avg_init2(one) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 +NOTICE: avg_transfn called with 3 + my_sum_init | my_avg_init2 +-------------+-------------- + 14 | 4 +(1 row) + +rollback; +-- test aggregate state sharing to ensure it works if one aggregate has a +-- finalfn and the other one has none. +begin work; +--Testcase 372: +create or replace function sum_transfn(state int4, n int4) returns int4 as +$$ +declare new_state int4; +begin + raise notice 'sum_transfn called with %', n; + if state is null then + if n is not null then + new_state := n; + return new_state; + end if; + return null; + elsif n is not null then + state := state + n; + return state; + end if; + + return null; +end +$$ language plpgsql; +--Testcase 373: +create function halfsum_finalfn(state int4) returns int4 as +$$ +begin + if state is null then + return NULL; + else + return state / 2; + end if; +end +$$ language plpgsql; +--Testcase 374: +create aggregate my_sum(int4) +( + stype = int4, + sfunc = sum_transfn +); +--Testcase 375: +create aggregate my_half_sum(int4) +( + stype = int4, + sfunc = sum_transfn, + finalfunc = halfsum_finalfn +); +-- Agg state should be shared even though my_sum has no finalfn +--Testcase 376: +create foreign table my_sum1(one int) server influxdb_svr; +--Testcase 377: +select my_sum(one),my_half_sum(one) from my_sum1; +NOTICE: sum_transfn called with 1 +NOTICE: sum_transfn called with 2 +NOTICE: sum_transfn called with 3 +NOTICE: sum_transfn called with 4 + my_sum | my_half_sum +--------+------------- + 10 | 5 +(1 row) + +rollback; +-- test that the aggregate transition logic correctly handles +-- transition / combine functions returning NULL +-- First test the case of a normal transition function returning NULL +BEGIN; +--Testcase 378: +CREATE FUNCTION balkifnull(int8, int4) +RETURNS int8 +STRICT +LANGUAGE plpgsql AS $$ +BEGIN + IF $1 IS NULL THEN + RAISE 'erroneously called with NULL argument'; + END IF; + RETURN NULL; +END$$; +--Testcase 379: +CREATE AGGREGATE balk(int4) +( + SFUNC = balkifnull(int8, int4), + STYPE = int8, + PARALLEL = SAFE, + INITCOND = '0' +); +--Testcase 380: +SELECT balk(hundred) FROM tenk1; + balk +------ + +(1 row) + +ROLLBACK; +-- Secondly test the case of a parallel aggregate combiner function +-- returning NULL. For that use normal transition function, but a +-- combiner function returning NULL. +BEGIN; +--Testcase 381: +CREATE FUNCTION balkifnull(int8, int8) +RETURNS int8 +PARALLEL SAFE +STRICT +LANGUAGE plpgsql AS $$ +BEGIN + IF $1 IS NULL THEN + RAISE 'erroneously called with NULL argument'; + END IF; + RETURN NULL; +END$$; +--Testcase 382: +CREATE AGGREGATE balk(int4) +( + SFUNC = int4_sum(int8, int4), + STYPE = int8, + COMBINEFUNC = balkifnull(int8, int8), + PARALLEL = SAFE, + INITCOND = '0' +); +-- force use of parallelism +-- ALTER TABLE tenk1 set (parallel_workers = 4); +-- SET LOCAL parallel_setup_cost=0; +-- SET LOCAL max_parallel_workers_per_gather=4; +-- EXPLAIN (COSTS OFF) SELECT balk(hundred) FROM tenk1; +-- SELECT balk(hundred) FROM tenk1; +ROLLBACK; +-- test coverage for aggregate combine/serial/deserial functions +BEGIN; +--Testcase 383: +SET parallel_setup_cost = 0; +--Testcase 384: +SET parallel_tuple_cost = 0; +--Testcase 385: +SET min_parallel_table_scan_size = 0; +--Testcase 386: +SET max_parallel_workers_per_gather = 4; +--Testcase 387: +SET parallel_leader_participation = off; +--Testcase 388: +SET enable_indexonlyscan = off; +-- variance(int4) covers numeric_poly_combine +-- sum(int8) covers int8_avg_combine +-- regr_count(float8, float8) covers int8inc_float8_float8 and aggregates with > 1 arg +--Testcase 389: +EXPLAIN (COSTS OFF, VERBOSE) +SELECT variance(unique1::int4), sum(unique1::int8), regr_count(unique1::float8, unique1::float8) +FROM (SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1) u; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: variance(tenk1.unique1), sum((tenk1.unique1)::bigint), regr_count((tenk1.unique1)::double precision, (tenk1.unique1)::double precision) + -> Append + -> Foreign Scan on public.tenk1 + Output: tenk1.unique1 + InfluxDB query: SELECT "unique1" FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_1 + Output: tenk1_1.unique1 + InfluxDB query: SELECT "unique1" FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_2 + Output: tenk1_2.unique1 + InfluxDB query: SELECT "unique1" FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_3 + Output: tenk1_3.unique1 + InfluxDB query: SELECT "unique1" FROM "tenk" +(15 rows) + +--Testcase 390: +SELECT variance(unique1::int4), sum(unique1::int8), regr_count(unique1::float8, unique1::float8) +FROM (SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1) u; + variance | sum | regr_count +----------------------+-----------+------------ + 8333541.588539713493 | 199980000 | 40000 +(1 row) + +-- variance(int8) covers numeric_combine +-- avg(numeric) covers numeric_avg_combine +--Testcase 391: +EXPLAIN (COSTS OFF, VERBOSE) +SELECT variance(unique1::int8), avg(unique1::numeric) +FROM (SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1) u; + QUERY PLAN +---------------------------------------------------------------------------- + Aggregate + Output: variance((tenk1.unique1)::bigint), avg((tenk1.unique1)::numeric) + -> Append + -> Foreign Scan on public.tenk1 + Output: tenk1.unique1 + InfluxDB query: SELECT "unique1" FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_1 + Output: tenk1_1.unique1 + InfluxDB query: SELECT "unique1" FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_2 + Output: tenk1_2.unique1 + InfluxDB query: SELECT "unique1" FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_3 + Output: tenk1_3.unique1 + InfluxDB query: SELECT "unique1" FROM "tenk" +(15 rows) + +--Testcase 392: +SELECT variance(unique1::int8), avg(unique1::numeric) +FROM (SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1) u; + variance | avg +----------------------+----------------------- + 8333541.588539713493 | 4999.5000000000000000 +(1 row) + +ROLLBACK; +-- test coverage for dense_rank +--Testcase 393: +create foreign table dense_rank1 (x int) server influxdb_svr; +--Testcase 394: +SELECT dense_rank(x) WITHIN GROUP (ORDER BY x) FROM dense_rank1 GROUP BY (x) ORDER BY 1; + dense_rank +------------ + 1 + 1 + 1 +(3 rows) + +-- Ensure that the STRICT checks for aggregates does not take NULLness +-- of ORDER BY columns into account. See bug report around +-- 2a505161-2727-2473-7c46-591ed108ac52@email.cz +--Testcase 395: +SELECT min(x ORDER BY y) FROM (VALUES(1, NULL)) AS d(x,y); + min +----- + 1 +(1 row) + +--Testcase 396: +SELECT min(x ORDER BY y) FROM (VALUES(1, 2)) AS d(x,y); + min +----- + 1 +(1 row) + +-- check collation-sensitive matching between grouping expressions +--Testcase 397: +select v||'a', case v||'a' when 'aa' then 1 else 0 end, count(*) + from unnest(array['a','b']) u(v) + group by v||'a' order by 1; + ?column? | case | count +----------+------+------- + aa | 1 | 1 + ba | 0 | 1 +(2 rows) + +--Testcase 398: +select v||'a', case when v||'a' = 'aa' then 1 else 0 end, count(*) + from unnest(array['a','b']) u(v) + group by v||'a' order by 1; + ?column? | case | count +----------+------+------- + aa | 1 | 1 + ba | 0 | 1 +(2 rows) + +-- Make sure that generation of HashAggregate for uniqification purposes +-- does not lead to array overflow due to unexpected duplicate hash keys +-- see CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com +--Testcase 399: +set enable_memoize to off; +--Testcase 400: +explain (costs off) + select 1 from tenk1 + where (hundred, thousand) in (select twothousand, twothousand from onek); + QUERY PLAN +------------------------------------------------------- + Hash Join + Hash Cond: (onek.twothousand = tenk1.hundred) + -> HashAggregate + Group Key: onek.twothousand, onek.twothousand + -> Foreign Scan on onek + -> Hash + -> Foreign Scan on tenk1 +(7 rows) + +--Testcase 401: +reset enable_memoize; +-- +-- Hash Aggregation Spill tests +-- +--Testcase 402: +set enable_sort=false; +--Testcase 403: +set work_mem='64kB'; +--Testcase 404: +select unique1, count(*), sum(twothousand) from tenk1 +group by unique1 +having sum(fivethous) > 4975 +order by sum(twothousand); + unique1 | count | sum +---------+-------+------ + 4976 | 1 | 976 + 4977 | 1 | 977 + 4978 | 1 | 978 + 4979 | 1 | 979 + 4980 | 1 | 980 + 4981 | 1 | 981 + 4982 | 1 | 982 + 4983 | 1 | 983 + 4984 | 1 | 984 + 4985 | 1 | 985 + 4986 | 1 | 986 + 4987 | 1 | 987 + 4988 | 1 | 988 + 4989 | 1 | 989 + 4990 | 1 | 990 + 4991 | 1 | 991 + 4992 | 1 | 992 + 4993 | 1 | 993 + 4994 | 1 | 994 + 4995 | 1 | 995 + 4996 | 1 | 996 + 4997 | 1 | 997 + 4998 | 1 | 998 + 4999 | 1 | 999 + 9976 | 1 | 1976 + 9977 | 1 | 1977 + 9978 | 1 | 1978 + 9979 | 1 | 1979 + 9980 | 1 | 1980 + 9981 | 1 | 1981 + 9982 | 1 | 1982 + 9983 | 1 | 1983 + 9984 | 1 | 1984 + 9985 | 1 | 1985 + 9986 | 1 | 1986 + 9987 | 1 | 1987 + 9988 | 1 | 1988 + 9989 | 1 | 1989 + 9990 | 1 | 1990 + 9991 | 1 | 1991 + 9992 | 1 | 1992 + 9993 | 1 | 1993 + 9994 | 1 | 1994 + 9995 | 1 | 1995 + 9996 | 1 | 1996 + 9997 | 1 | 1997 + 9998 | 1 | 1998 + 9999 | 1 | 1999 +(48 rows) + +--Testcase 405: +set work_mem to default; +--Testcase 406: +set enable_sort to default; +-- +-- Compare results between plans using sorting and plans using hash +-- aggregation. Force spilling in both cases by setting work_mem low. +-- +--Testcase 407: +set work_mem='64kB'; +--Testcase 408: +create foreign table agg_data_2k(g int) server influxdb_svr; +--Testcase 409: +create foreign table agg_data_20k(g int) server influxdb_svr; +--Testcase 410: +create foreign table agg_group_1(c1 int, c2 numeric, c3 int) server influxdb_svr; +--Testcase 411: +create foreign table agg_group_2(a int, c1 numeric, c2 text, c3 int) server influxdb_svr; +--Testcase 412: +create foreign table agg_group_3(c1 numeric, c2 int4, c3 int) server influxdb_svr; +--Testcase 413: +create foreign table agg_group_4(c1 numeric, c2 text, c3 int) server influxdb_svr; +--Testcase 414: +create foreign table agg_hash_1(c1 int, c2 numeric, c3 int) server influxdb_svr; +--Testcase 415: +create foreign table agg_hash_2(a int, c1 numeric, c2 text, c3 int) server influxdb_svr; +--Testcase 416: +create foreign table agg_hash_3(c1 numeric, c2 int4, c3 int) server influxdb_svr; +--Testcase 417: +create foreign table agg_hash_4(c1 numeric, c2 text, c3 int) server influxdb_svr; +--Testcase 418: +insert into agg_data_2k select g from generate_series(0, 1999) g; +--analyze agg_data_2k; +--Testcase 419: +insert into agg_data_20k select g from generate_series(0, 19999) g; +--analyze agg_data_20k; +-- Produce results with sorting. +--Testcase 420: +set enable_hashagg = false; +--Testcase 421: +set jit_above_cost = 0; +--Testcase 422: +explain (costs off) +select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 + from agg_data_20k group by g%10000; + QUERY PLAN +------------------------------------------ + GroupAggregate + Group Key: ((g % 10000)) + -> Sort + Sort Key: ((g % 10000)) + -> Foreign Scan on agg_data_20k +(5 rows) + +--Testcase 423: +insert into agg_group_1 +select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 + from agg_data_20k group by g%10000; +--Testcase 424: +insert into agg_group_2 +select * from + (values (100), (300), (500)) as r(a), + lateral ( + select (g/2)::numeric as c1, + array_agg(g::numeric) as c2, + count(*) as c3 + from agg_data_2k + where g < r.a + group by g/2) as s; +--Testcase 425: +set jit_above_cost to default; +--Testcase 426: +insert into agg_group_3 +select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 + from agg_data_2k group by g/2; +--Testcase 427: +insert into agg_group_4 +select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 + from agg_data_2k group by g/2; +-- Produce results with hash aggregation +--Testcase 428: +set enable_hashagg = true; +--Testcase 429: +set enable_sort = false; +--Testcase 430: +set jit_above_cost = 0; +--Testcase 431: +explain (costs off) +select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 + from agg_data_20k group by g%10000; + QUERY PLAN +------------------------------------ + HashAggregate + Group Key: (g % 10000) + -> Foreign Scan on agg_data_20k +(3 rows) + +--Testcase 432: +insert into agg_hash_1 +select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 + from agg_data_20k group by g%10000; +--Testcase 433: +insert into agg_hash_2 +select * from + (values (100), (300), (500)) as r(a), + lateral ( + select (g/2)::numeric as c1, + array_agg(g::numeric) as c2, + count(*) as c3 + from agg_data_2k + where g < r.a + group by g/2) as s; +--Testcase 434: +set jit_above_cost to default; +--Testcase 435: +insert into agg_hash_3 +select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 + from agg_data_2k group by g/2; +--Testcase 436: +insert into agg_hash_4 +select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 + from agg_data_2k group by g/2; +--Testcase 437: +set enable_sort = true; +--Testcase 438: +set work_mem to default; +-- Compare group aggregation results to hash aggregation results +--Testcase 439: +(select * from agg_hash_1 except select * from agg_group_1) + union all +(select * from agg_group_1 except select * from agg_hash_1); + c1 | c2 | c3 +----+----+---- +(0 rows) + +--Testcase 440: +(select * from agg_hash_2 except select * from agg_group_2) + union all +(select * from agg_group_2 except select * from agg_hash_2); + a | c1 | c2 | c3 +---+----+----+---- +(0 rows) + +--Testcase 441: +(select * from agg_hash_3 except select * from agg_group_3) + union all +(select * from agg_group_3 except select * from agg_hash_3); + c1 | c2 | c3 +----+----+---- +(0 rows) + +--Testcase 442: +(select * from agg_hash_4 except select * from agg_group_4) + union all +(select * from agg_group_4 except select * from agg_hash_4); + c1 | c2 | c3 +----+----+---- +(0 rows) + +--Testcase 443: +-- Clean up: +--Testcase 485: +delete from agg_data_2k; +--Testcase 486: +delete from agg_data_20k; +--Testcase 487: +delete from agg_group_1; +--Testcase 488: +delete from agg_group_2; +--Testcase 489: +delete from agg_group_3; +--Testcase 490: +delete from agg_group_4; +--Testcase 491: +delete from agg_hash_1; +--Testcase 492: +delete from agg_hash_2; +--Testcase 493: +delete from agg_hash_3; +--Testcase 494: +delete from agg_hash_4; +--Testcase 495: +drop foreign table agg_data_2k; +--Testcase 496: +drop foreign table agg_data_20k; +--Testcase 497: +drop foreign table agg_group_1; +--Testcase 444: +drop foreign table agg_group_2; +--Testcase 445: +drop foreign table agg_group_3; +--Testcase 446: +drop foreign table agg_group_4; +--Testcase 447: +drop foreign table agg_hash_1; +--Testcase 448: +drop foreign table agg_hash_2; +--Testcase 449: +drop foreign table agg_hash_3; +--Testcase 450: +drop foreign table agg_hash_4; +-- Clean up +DO $d$ +declare + l_rec record; +begin + for l_rec in (select foreign_table_schema, foreign_table_name + from information_schema.foreign_tables) loop + execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); + end loop; +end; +$d$; +-- Clean up: +--Testcase 498: +DROP AGGREGATE IF EXISTS newavg (int4); +--Testcase 499: +DROP AGGREGATE IF EXISTS newsum (int4); +--Testcase 500: +DROP AGGREGATE IF EXISTS newcnt (*); +--Testcase 501: +DROP AGGREGATE IF EXISTS oldcnt (*); +--Testcase 502: +DROP AGGREGATE IF EXISTS newcnt ("any"); +--Testcase 503: +DROP AGGREGATE IF EXISTS sum2(int8,int8); +--Testcase 504: +DROP FUNCTION IF EXISTS sum3(int8,int8,int8); +--Testcase 505: +DROP AGGREGATE IF EXISTS aggfns(integer,integer,text); +--Testcase 506: +DROP AGGREGATE IF EXISTS aggfstr(integer,integer,text); +--Testcase 507: +DROP FUNCTION IF EXISTS aggfns_trans(aggtype[],integer,integer,text); +--Testcase 508: +DROP FUNCTION IF EXISTS aggf_trans(aggtype[],integer,integer,text); +--Testcase 509: +DROP TYPE IF EXISTS aggtype; +--Testcase 510: +DROP AGGREGATE IF EXISTS test_percentile_disc(float8 ORDER BY anyelement); +--Testcase 511: +DROP AGGREGATE IF EXISTS test_rank(VARIADIC "any" ORDER BY VARIADIC "any"); +--Testcase 512: +DROP AGGREGATE IF EXISTS cleast_agg(variadic items anycompatiblearray); +--Testcase 513: +DROP FUNCTION IF EXISTS cleast_accum(anycompatible, variadic anycompatiblearray); +--Testcase 451: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 452: +DROP SERVER influxdb_svr CASCADE; +--Testcase 453: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/15.0/extra/influxdb_fdw_post.out b/expected/15.0/extra/influxdb_fdw_post.out new file mode 100644 index 0000000..0c0047a --- /dev/null +++ b/expected/15.0/extra/influxdb_fdw_post.out @@ -0,0 +1,10619 @@ +-- =================================================================== +-- create FDW objects +-- =================================================================== +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'postdb', :SERVER); +--Testcase 4: +CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'postdb', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); +--Testcase 6: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); +-- =================================================================== +-- create objects used through FDW influxdb server +-- =================================================================== +--Testcase 8: +CREATE TYPE user_enum AS ENUM ('foo', 'bar', 'buz'); +--Testcase 9: +CREATE SCHEMA "S 1"; +--Testcase 10: +CREATE FOREIGN TABLE "S 1"."T 0" ( + "C 1" int NOT NULL, + c2 int NOT NULL, + c3 text, + time timestamp, + c6 varchar(10), + c7 char(10), + c8 text +) SERVER influxdb_svr OPTIONS (table 'T0', tags 'c3'); +--Testcase 11: +CREATE FOREIGN TABLE "S 1"."T 1" ( + "C 1" int NOT NULL, + c2 int NOT NULL, + c3 text, + time timestamp, + c6 varchar(10), + c7 char(10), + c8 text +) SERVER influxdb_svr OPTIONS (table 'T1', tags 'c3'); +--Testcase 12: +CREATE FOREIGN TABLE "S 1"."T 2" ( + c1 int NOT NULL, + c2 text +) SERVER influxdb_svr OPTIONS (table 'T2', tags 'c2'); +--Testcase 13: +CREATE FOREIGN TABLE "S 1"."T 3" ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text +) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); +--Testcase 14: +CREATE FOREIGN TABLE "S 1"."T 4" ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text +) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3'); +-- Disable autovacuum for these tables to avoid unexpected effects of that +--ALTER TABLE "S 1"."T 1" SET (autovacuum_enabled = 'false'); +--ALTER TABLE "S 1"."T 2" SET (autovacuum_enabled = 'false'); +--ALTER TABLE "S 1"."T 3" SET (autovacuum_enabled = 'false'); +--ALTER TABLE "S 1"."T 4" SET (autovacuum_enabled = 'false'); +--Testcase 15: +INSERT INTO "S 1"."T 1" + SELECT id, + id % 10, + to_char(id, 'FM00000'), + '1970-01-01'::timestamp + ((id % 100) || ' days')::interval, + id % 10, + id % 10, + 'foo'::text + FROM generate_series(1, 1000) id; +--Testcase 16: +INSERT INTO "S 1"."T 2" + SELECT id, + 'AAA' || to_char(id, 'FM000') + FROM generate_series(1, 100) id; +--Testcase 17: +INSERT INTO "S 1"."T 3" + SELECT id, + id + 1, + 'AAA' || to_char(id, 'FM000') + FROM generate_series(1, 100) id; +--Testcase 18: +DELETE FROM "S 1"."T 3" WHERE c1 % 2 != 0; -- delete for outer join tests +--Testcase 19: +INSERT INTO "S 1"."T 4" + SELECT id, + id + 1, + 'AAA' || to_char(id, 'FM000') + FROM generate_series(1, 100) id; +--Testcase 20: +DELETE FROM "S 1"."T 4" WHERE c1 % 3 != 0; -- delete for outer join tests +--ANALYZE "S 1"."T 1"; +--ANALYZE "S 1"."T 2"; +--ANALYZE "S 1"."T 3"; +--ANALYZE "S 1"."T 4"; +-- =================================================================== +-- create foreign tables +-- =================================================================== +--Testcase 21: +CREATE FOREIGN TABLE ft1 ( + c0 int, + c1 int NOT NULL, + c2 int NOT NULL, + c3 text, + time timestamp, + c6 varchar(10), + c7 char(10) default 'ft1', + c8 text +) SERVER influxdb_svr; +--Testcase 22: +ALTER FOREIGN TABLE ft1 DROP COLUMN c0; +--Testcase 23: +CREATE FOREIGN TABLE ft2 ( + c1 int NOT NULL, + c2 int NOT NULL, + cx int, + c3 text, + time timestamp, + c6 varchar(10), + c7 char(10) default 'ft2', + c8 text +) SERVER influxdb_svr; +--Testcase 24: +ALTER FOREIGN TABLE ft2 DROP COLUMN cx; +--Testcase 25: +CREATE FOREIGN TABLE ft4 ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text +) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); +--Testcase 26: +CREATE FOREIGN TABLE ft5 ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text +) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3'); +--Testcase 27: +CREATE FOREIGN TABLE ft6 ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text +) SERVER influxdb_svr2 OPTIONS (table 'T4', tags 'c3'); +-- =================================================================== +-- tests for validator +-- =================================================================== +-- requiressl and some other parameters are omitted because +-- valid values for them depend on configure options +--Testcase 28: +ALTER SERVER testserver1 OPTIONS ( + -- use_remote_estimate 'false', + -- updatable 'true', + -- fdw_startup_cost '123.456', + -- fdw_tuple_cost '0.123', + -- service 'value', + -- connect_timeout 'value', + dbname 'value', + host 'value', + -- hostaddr 'value', + port 'value' + --client_encoding 'value', + -- application_name 'value', + --fallback_application_name 'value', + -- keepalives 'value', + -- keepalives_idle 'value', + -- keepalives_interval 'value', + -- tcp_user_timeout 'value', + -- requiressl 'value', + -- sslcompression 'value', + -- sslmode 'value', + -- sslcert 'value', + -- sslkey 'value', + -- sslrootcert 'value', + -- sslcrl 'value', + --requirepeer 'value', + -- krbsrvname 'value', + -- gsslib 'value', + --replication 'value' +); +-- influxdb_fdw does not support option extensions +-- Error, invalid list syntax +--ALTER SERVER testserver1 OPTIONS (ADD extensions 'foo; bar'); +-- OK but gets a warning +--ALTER SERVER testserver1 OPTIONS (ADD extensions 'foo, bar'); +--ALTER SERVER testserver1 OPTIONS (DROP extensions); +--Testcase 29: +ALTER USER MAPPING FOR public SERVER testserver1 + OPTIONS (DROP user, DROP password); +-- Attempt to add a valid option that's not allowed in a user mapping +--ALTER USER MAPPING FOR public SERVER testserver1 +-- OPTIONS (ADD sslmode 'require'); +-- But we can add valid ones fine +--ALTER USER MAPPING FOR public SERVER testserver1 +-- OPTIONS (ADD sslpassword 'dummy'); +-- Ensure valid options we haven't used in a user mapping yet are +-- permitted to check validation. +--ALTER USER MAPPING FOR public SERVER testserver1 +-- OPTIONS (ADD sslkey 'value', ADD sslcert 'value'); +--Testcase 30: +ALTER FOREIGN TABLE ft1 OPTIONS (table 'T1', tags 'c3'); +--Testcase 31: +ALTER FOREIGN TABLE ft2 OPTIONS (table 'T1', tags 'c3'); +--Testcase 32: +ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 OPTIONS (column_name 'C 1'); +--Testcase 33: +ALTER FOREIGN TABLE ft2 ALTER COLUMN c1 OPTIONS (column_name 'C 1'); +--Testcase 34: +\det+ + List of foreign tables + Schema | Table | Server | FDW options | Description +--------+-------+---------------+---------------------------+------------- + public | ft1 | influxdb_svr | ("table" 'T1', tags 'c3') | + public | ft2 | influxdb_svr | ("table" 'T1', tags 'c3') | + public | ft4 | influxdb_svr | ("table" 'T3', tags 'c3') | + public | ft5 | influxdb_svr | ("table" 'T4', tags 'c3') | + public | ft6 | influxdb_svr2 | ("table" 'T4', tags 'c3') | +(5 rows) + +-- Test that alteration of server options causes reconnection +-- Remote's errors might be non-English, so hide them to ensure stable results +\set VERBOSITY terse +--Testcase 35: +SELECT c3, time FROM ft1 ORDER BY c3, c1 LIMIT 1; -- should work + c3 | time +-------+-------------------------- + 00001 | Fri Jan 02 00:00:00 1970 +(1 row) + +--Testcase 36: +ALTER SERVER influxdb_svr OPTIONS (SET dbname 'no such database'); +--Testcase 37: +SELECT c3, time FROM ft1 ORDER BY c3, c1 LIMIT 1; -- should fail +ERROR: influxdb_fdw : database not found: no such database +DO $d$ + BEGIN + EXECUTE $$ALTER SERVER influxdb_svr + OPTIONS (SET dbname 'postdb')$$; + END; +$d$; +--Testcase 38: +SELECT c3, time FROM ft1 ORDER BY c3, c1 LIMIT 1; -- should work again + c3 | time +-------+-------------------------- + 00001 | Fri Jan 02 00:00:00 1970 +(1 row) + +\set VERBOSITY default +-- =================================================================== +-- test error case for create publication on foreign table +-- =================================================================== +--Testcase 765: +CREATE PUBLICATION testpub_ftbl FOR TABLE ft1; -- should fail +ERROR: cannot add relation "ft1" to publication +DETAIL: This operation is not supported for foreign tables. +-- =================================================================== +-- simple queries +-- =================================================================== +-- single table without alias +--Testcase 39: +EXPLAIN (COSTS OFF) SELECT * FROM ft1 ORDER BY c3, c1 OFFSET 100 LIMIT 10; + QUERY PLAN +--------------------------------- + Limit + -> Sort + Sort Key: c3, c1 + -> Foreign Scan on ft1 +(4 rows) + +--Testcase 40: +SELECT * FROM ft1 ORDER BY c3, c1 OFFSET 100 LIMIT 10; + c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+----- + 101 | 1 | 00101 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo + 102 | 2 | 00102 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo + 103 | 3 | 00103 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo + 104 | 4 | 00104 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo + 105 | 5 | 00105 | Tue Jan 06 00:00:00 1970 | 5 | 5 | foo + 106 | 6 | 00106 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 107 | 7 | 00107 | Thu Jan 08 00:00:00 1970 | 7 | 7 | foo + 108 | 8 | 00108 | Fri Jan 09 00:00:00 1970 | 8 | 8 | foo + 109 | 9 | 00109 | Sat Jan 10 00:00:00 1970 | 9 | 9 | foo + 110 | 0 | 00110 | Sun Jan 11 00:00:00 1970 | 0 | 0 | foo +(10 rows) + +-- single table with alias - also test that tableoid sort is not pushed to remote side +--Testcase 41: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 ORDER BY t1.c3, t1.c1, t1.tableoid OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------ + Limit + Output: c1, c2, c3, "time", c6, c7, c8, tableoid + -> Sort + Output: c1, c2, c3, "time", c6, c7, c8, tableoid + Sort Key: t1.c3, t1.c1, t1.tableoid + -> Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8, tableoid + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(8 rows) + +--Testcase 42: +SELECT * FROM ft1 t1 ORDER BY t1.c3, t1.c1, t1.tableoid OFFSET 100 LIMIT 10; + c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+----- + 101 | 1 | 00101 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo + 102 | 2 | 00102 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo + 103 | 3 | 00103 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo + 104 | 4 | 00104 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo + 105 | 5 | 00105 | Tue Jan 06 00:00:00 1970 | 5 | 5 | foo + 106 | 6 | 00106 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 107 | 7 | 00107 | Thu Jan 08 00:00:00 1970 | 7 | 7 | foo + 108 | 8 | 00108 | Fri Jan 09 00:00:00 1970 | 8 | 8 | foo + 109 | 9 | 00109 | Sat Jan 10 00:00:00 1970 | 9 | 9 | foo + 110 | 0 | 00110 | Sun Jan 11 00:00:00 1970 | 0 | 0 | foo +(10 rows) + +-- whole-row reference +--Testcase 43: +EXPLAIN (VERBOSE, COSTS OFF) SELECT t1 FROM ft1 t1 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------ + Limit + Output: t1.*, c3, c1 + -> Sort + Output: t1.*, c3, c1 + Sort Key: t1.c3, t1.c1 + -> Foreign Scan on public.ft1 t1 + Output: t1.*, c3, c1 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(8 rows) + +--Testcase 44: +SELECT t1 FROM ft1 t1 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; + t1 +------------------------------------------------------------- + (101,1,00101,"Fri Jan 02 00:00:00 1970",1,"1 ",foo) + (102,2,00102,"Sat Jan 03 00:00:00 1970",2,"2 ",foo) + (103,3,00103,"Sun Jan 04 00:00:00 1970",3,"3 ",foo) + (104,4,00104,"Mon Jan 05 00:00:00 1970",4,"4 ",foo) + (105,5,00105,"Tue Jan 06 00:00:00 1970",5,"5 ",foo) + (106,6,00106,"Wed Jan 07 00:00:00 1970",6,"6 ",foo) + (107,7,00107,"Thu Jan 08 00:00:00 1970",7,"7 ",foo) + (108,8,00108,"Fri Jan 09 00:00:00 1970",8,"8 ",foo) + (109,9,00109,"Sat Jan 10 00:00:00 1970",9,"9 ",foo) + (110,0,00110,"Sun Jan 11 00:00:00 1970",0,"0 ",foo) +(10 rows) + +-- empty result +--Testcase 45: +SELECT * FROM ft1 WHERE false; + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+----+------+----+----+---- +(0 rows) + +-- with WHERE clause +--Testcase 46: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 = 101 AND t1.c6 = '1' AND t1.c7 >= '1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (t1.c7 >= '1'::bpchar) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 101)) AND (("c6" = '1')) +(4 rows) + +--Testcase 47: +SELECT * FROM ft1 t1 WHERE t1.c1 = 101 AND t1.c6 = '1' AND t1.c7 >= '1'; + c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+----- + 101 | 1 | 00101 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo +(1 row) + +-- with FOR UPDATE/SHARE +--Testcase 48: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = 101 FOR UPDATE; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + LockRows + Output: c1, c2, c3, "time", c6, c7, c8, t1.* + -> Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8, t1.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 101)) +(5 rows) + +--Testcase 49: +SELECT * FROM ft1 t1 WHERE c1 = 101 FOR UPDATE; + c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+----- + 101 | 1 | 00101 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo +(1 row) + +--Testcase 50: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = 102 FOR SHARE; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + LockRows + Output: c1, c2, c3, "time", c6, c7, c8, t1.* + -> Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8, t1.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 102)) +(5 rows) + +--Testcase 51: +SELECT * FROM ft1 t1 WHERE c1 = 102 FOR SHARE; + c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+----- + 102 | 2 | 00102 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo +(1 row) + +-- aggregate +--Testcase 52: +SELECT COUNT(*) FROM ft1 t1; + count +------- + 1000 +(1 row) + +-- subquery +--Testcase 53: +SELECT * FROM ft1 t1 WHERE t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE c1 <= 10) ORDER BY c1; + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+----- + 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo + 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo + 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo + 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo + 5 | 5 | 00005 | Tue Jan 06 00:00:00 1970 | 5 | 5 | foo + 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 7 | 7 | 00007 | Thu Jan 08 00:00:00 1970 | 7 | 7 | foo + 8 | 8 | 00008 | Fri Jan 09 00:00:00 1970 | 8 | 8 | foo + 9 | 9 | 00009 | Sat Jan 10 00:00:00 1970 | 9 | 9 | foo + 10 | 0 | 00010 | Sun Jan 11 00:00:00 1970 | 0 | 0 | foo +(10 rows) + +-- subquery+MAX +--Testcase 54: +SELECT * FROM ft1 t1 WHERE t1.c3 = (SELECT MAX(c3) FROM ft2 t2) ORDER BY c1; + c1 | c2 | c3 | time | c6 | c7 | c8 +------+----+-------+--------------------------+----+------------+----- + 1000 | 0 | 01000 | Thu Jan 01 00:00:00 1970 | 0 | 0 | foo +(1 row) + +-- used in CTE +--Testcase 55: +WITH t1 AS (SELECT * FROM ft1 WHERE c1 <= 10) SELECT t2.c1, t2.c2, t2.c3, t2.time FROM t1, ft2 t2 WHERE t1.c1 = t2.c1 ORDER BY t1.c1; + c1 | c2 | c3 | time +----+----+-------+-------------------------- + 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 + 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 + 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 + 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 + 5 | 5 | 00005 | Tue Jan 06 00:00:00 1970 + 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 + 7 | 7 | 00007 | Thu Jan 08 00:00:00 1970 + 8 | 8 | 00008 | Fri Jan 09 00:00:00 1970 + 9 | 9 | 00009 | Sat Jan 10 00:00:00 1970 + 10 | 0 | 00010 | Sun Jan 11 00:00:00 1970 +(10 rows) + +-- fixed values +--Testcase 56: +SELECT 'fixed', NULL FROM ft1 t1 WHERE c1 = 1; + ?column? | ?column? +----------+---------- + fixed | +(1 row) + +-- Test forcing the remote server to produce sorted data for a merge join. +--Testcase 57: +SET enable_hashjoin TO false; +--Testcase 58: +SET enable_nestloop TO false; +-- inner join; expressions in the clauses appear in the equivalence class list +--Testcase 59: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT t1.c1, t2."C 1" FROM ft2 t1 JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------ + Limit + Output: t1.c1, t2."C 1" + -> Merge Join + Output: t1.c1, t2."C 1" + Merge Cond: (t1.c1 = t2."C 1") + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: t2."C 1" + Sort Key: t2."C 1" + -> Foreign Scan on "S 1"."T 1" t2 + Output: t2."C 1" + InfluxDB query: SELECT "C 1" FROM "T1" +(17 rows) + +--Testcase 60: +SELECT t1.c1, t2."C 1" FROM ft2 t1 JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; + c1 | C 1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- outer join; expressions in the clauses do not appear in equivalence class +-- list but no output change as compared to the previous query +--Testcase 61: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT t1.c1, t2."C 1" FROM ft2 t1 LEFT JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------ + Limit + Output: t1.c1, t2."C 1" + -> Merge Left Join + Output: t1.c1, t2."C 1" + Merge Cond: (t1.c1 = t2."C 1") + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: t2."C 1" + Sort Key: t2."C 1" + -> Foreign Scan on "S 1"."T 1" t2 + Output: t2."C 1" + InfluxDB query: SELECT "C 1" FROM "T1" +(17 rows) + +--Testcase 62: +SELECT t1.c1, t2."C 1" FROM ft2 t1 LEFT JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; + c1 | C 1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- A join between 2 foreign tables. ORDER BY clause is added to the +-- foreign join so that the other table can be joined using merge join strategy. +--Testcase 63: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT t1."C 1" FROM "S 1"."T 1" t1 left join ft1 t2 join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1."C 1" + -> Merge Left Join + Output: t1."C 1" + Merge Cond: (t1."C 1" = t3.c1) + -> Sort + Output: t1."C 1" + Sort Key: t1."C 1" + -> Foreign Scan on "S 1"."T 1" t1 + Output: t1."C 1" + InfluxDB query: SELECT "C 1" FROM "T1" + -> Materialize + Output: t3.c1 + -> Merge Join + Output: t3.c1 + Merge Cond: (t2.c1 = t3.c1) + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft1 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: t3.c1 + Sort Key: t3.c1 + -> Foreign Scan on public.ft2 t3 + Output: t3.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(28 rows) + +--Testcase 64: +SELECT t1."C 1" FROM "S 1"."T 1" t1 left join ft1 t2 join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; + C 1 +----- + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 +(10 rows) + +-- Test similar to above, except that the full join prevents any equivalence +-- classes from being merged. This produces single relation equivalence classes +-- included in join restrictions. +--Testcase 65: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 left join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1."C 1", t2.c1, t3.c1 + -> Merge Left Join + Output: t1."C 1", t2.c1, t3.c1 + Merge Cond: (t1."C 1" = t3.c1) + -> Sort + Output: t1."C 1" + Sort Key: t1."C 1" + -> Foreign Scan on "S 1"."T 1" t1 + Output: t1."C 1" + InfluxDB query: SELECT "C 1" FROM "T1" + -> Materialize + Output: t3.c1, t2.c1 + -> Merge Left Join + Output: t3.c1, t2.c1 + Merge Cond: (t3.c1 = t2.c1) + -> Sort + Output: t3.c1 + Sort Key: t3.c1 + -> Foreign Scan on public.ft2 t3 + Output: t3.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft1 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(28 rows) + +--Testcase 66: +SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 left join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; + C 1 | c1 | c1 +-----+-----+----- + 101 | 101 | 101 + 102 | 102 | 102 + 103 | 103 | 103 + 104 | 104 | 104 + 105 | 105 | 105 + 106 | 106 | 106 + 107 | 107 | 107 + 108 | 108 | 108 + 109 | 109 | 109 + 110 | 110 | 110 +(10 rows) + +-- Test similar to above with all full outer joins +--Testcase 67: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 full join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1."C 1", t2.c1, t3.c1 + -> Merge Full Join + Output: t1."C 1", t2.c1, t3.c1 + Merge Cond: (t1."C 1" = t3.c1) + -> Sort + Output: t1."C 1" + Sort Key: t1."C 1" + -> Foreign Scan on "S 1"."T 1" t1 + Output: t1."C 1" + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: t2.c1, t3.c1 + Sort Key: t3.c1 + -> Merge Full Join + Output: t2.c1, t3.c1 + Merge Cond: (t2.c1 = t3.c1) + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft1 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: t3.c1 + Sort Key: t3.c1 + -> Foreign Scan on public.ft2 t3 + Output: t3.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(29 rows) + +--Testcase 68: +SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 full join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; + C 1 | c1 | c1 +-----+-----+----- + 101 | 101 | 101 + 102 | 102 | 102 + 103 | 103 | 103 + 104 | 104 | 104 + 105 | 105 | 105 + 106 | 106 | 106 + 107 | 107 | 107 + 108 | 108 | 108 + 109 | 109 | 109 + 110 | 110 | 110 +(10 rows) + +--Testcase 69: +RESET enable_hashjoin; +--Testcase 70: +RESET enable_nestloop; +-- Test executing assertion in estimate_path_cost_size() that makes sure that +-- retrieved_rows for foreign rel re-used to cost pre-sorted foreign paths is +-- a sensible value even when the rel has tuples=0 +--Testcase 71: +CREATE FOREIGN TABLE loct_empty (c1 int NOT NULL, c2 text) SERVER influxdb_svr; +--Testcase 72: +CREATE FOREIGN TABLE ft_empty (c1 int NOT NULL, c2 text) + SERVER influxdb_svr OPTIONS (table 'loct_empty'); +--Testcase 73: +INSERT INTO loct_empty + SELECT id, 'AAA' || to_char(id, 'FM000') FROM generate_series(1, 100) id; +--Testcase 74: +DELETE FROM loct_empty; +--ANALYZE ft_empty; +--Testcase 75: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft_empty ORDER BY c1; + QUERY PLAN +------------------------------------------------------------- + Sort + Output: c1, c2 + Sort Key: ft_empty.c1 + -> Foreign Scan on public.ft_empty + Output: c1, c2 + InfluxDB query: SELECT "c1", "c2" FROM "loct_empty" +(6 rows) + +-- =================================================================== +-- WHERE with remotely-executable conditions +-- =================================================================== +--Testcase 76: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 = 1; -- Var, OpExpr(b), Const + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +--Testcase 77: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 = 100 AND t1.c2 = 0; -- BoolExpr + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 100)) AND (("c2" = 0)) +(3 rows) + +--Testcase 78: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 IS NULL; -- NullTest + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (t1.c1 IS NULL) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +--Testcase 79: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 IS NOT NULL; -- NullTest + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (t1.c1 IS NOT NULL) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +--Testcase 80: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE round(abs(c1), 0) = 1; -- FuncExpr + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (round((abs(t1.c1))::numeric, 0) = '1'::numeric) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +--Testcase 81: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = -c1; -- OpExpr(l) + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = (- "C 1"))) +(3 rows) + +--Testcase 82: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (c1 IS NOT NULL) IS DISTINCT FROM (c1 IS NOT NULL); -- DistinctExpr + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: ((t1.c1 IS NOT NULL) IS DISTINCT FROM (t1.c1 IS NOT NULL)) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +--Testcase 83: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = ANY(ARRAY[c2, 1, c1 + 0]); -- ScalarArrayOpExpr + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = "c2") OR ("C 1" = 1) OR ("C 1" = ("C 1" + 0))) +(3 rows) + +--Testcase 84: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- SubscriptingRef + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (t1.c1 = (ARRAY[t1.c1, t1.c2, 3])[1]) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +--Testcase 85: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c6 = E'foo''s\\bar'; -- check special chars + QUERY PLAN +------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c6" = 'foo''s\\bar')) +(3 rows) + +--Testcase 86: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c8 = 'foo'; -- can't be sent to remote + QUERY PLAN +----------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) +(3 rows) + +-- parameterized remote path for foreign table +--Testcase 87: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM "S 1"."T 1" a, ft2 b WHERE a."C 1" = 47 AND b.c1 = a.c2; + QUERY PLAN +--------------------------------------------------------------------------------------------------------- + Hash Join + Output: a."C 1", a.c2, a.c3, a."time", a.c6, a.c7, a.c8, b.c1, b.c2, b.c3, b."time", b.c6, b.c7, b.c8 + Hash Cond: (b.c1 = a.c2) + -> Foreign Scan on public.ft2 b + Output: b.c1, b.c2, b.c3, b."time", b.c6, b.c7, b.c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" + -> Hash + Output: a."C 1", a.c2, a.c3, a."time", a.c6, a.c7, a.c8 + -> Foreign Scan on "S 1"."T 1" a + Output: a."C 1", a.c2, a.c3, a."time", a.c6, a.c7, a.c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 47)) +(11 rows) + +--Testcase 88: +SELECT * FROM ft2 a, ft2 b WHERE a.c1 = 47 AND b.c1 = a.c2; + c1 | c2 | c3 | time | c6 | c7 | c8 | c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+-----+----+----+-------+--------------------------+----+------------+----- + 47 | 7 | 00047 | Tue Feb 17 00:00:00 1970 | 7 | 7 | foo | 7 | 7 | 00007 | Thu Jan 08 00:00:00 1970 | 7 | 7 | foo +(1 row) + +-- check both safe and unsafe join conditions +--Testcase 89: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM ft2 a, ft2 b + WHERE a.c2 = 6 AND b.c1 = a.c1 AND a.c8 = 'foo' AND b.c7 = upper(a.c7); + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------- + Hash Join + Output: a.c1, a.c2, a.c3, a."time", a.c6, a.c7, a.c8, b.c1, b.c2, b.c3, b."time", b.c6, b.c7, b.c8 + Hash Cond: ((b.c1 = a.c1) AND ((b.c7)::text = upper((a.c7)::text))) + -> Foreign Scan on public.ft2 b + Output: b.c1, b.c2, b.c3, b."time", b.c6, b.c7, b.c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" + -> Hash + Output: a.c1, a.c2, a.c3, a."time", a.c6, a.c7, a.c8 + -> Foreign Scan on public.ft2 a + Output: a.c1, a.c2, a.c3, a."time", a.c6, a.c7, a.c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c2" = 6)) AND (("c8" = 'foo')) +(11 rows) + +--Testcase 90: +SELECT * FROM ft2 a, ft2 b +WHERE a.c2 = 6 AND b.c1 = a.c1 AND a.c8 = 'foo' AND b.c7 = upper(a.c7) ORDER BY a.c1; + c1 | c2 | c3 | time | c6 | c7 | c8 | c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+-----+-----+----+-------+--------------------------+----+------------+----- + 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo + 26 | 6 | 00026 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 26 | 6 | 00026 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo + 36 | 6 | 00036 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 36 | 6 | 00036 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo + 46 | 6 | 00046 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 46 | 6 | 00046 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo + 56 | 6 | 00056 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 56 | 6 | 00056 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo + 66 | 6 | 00066 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 66 | 6 | 00066 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo + 76 | 6 | 00076 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 76 | 6 | 00076 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo + 86 | 6 | 00086 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 86 | 6 | 00086 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo + 96 | 6 | 00096 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 96 | 6 | 00096 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo + 106 | 6 | 00106 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 106 | 6 | 00106 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 116 | 6 | 00116 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 116 | 6 | 00116 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo + 126 | 6 | 00126 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 126 | 6 | 00126 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo + 136 | 6 | 00136 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 136 | 6 | 00136 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo + 146 | 6 | 00146 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 146 | 6 | 00146 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo + 156 | 6 | 00156 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 156 | 6 | 00156 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo + 166 | 6 | 00166 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 166 | 6 | 00166 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo + 176 | 6 | 00176 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 176 | 6 | 00176 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo + 186 | 6 | 00186 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 186 | 6 | 00186 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo + 196 | 6 | 00196 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 196 | 6 | 00196 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo + 206 | 6 | 00206 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 206 | 6 | 00206 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 216 | 6 | 00216 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 216 | 6 | 00216 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo + 226 | 6 | 00226 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 226 | 6 | 00226 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo + 236 | 6 | 00236 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 236 | 6 | 00236 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo + 246 | 6 | 00246 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 246 | 6 | 00246 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo + 256 | 6 | 00256 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 256 | 6 | 00256 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo + 266 | 6 | 00266 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 266 | 6 | 00266 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo + 276 | 6 | 00276 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 276 | 6 | 00276 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo + 286 | 6 | 00286 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 286 | 6 | 00286 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo + 296 | 6 | 00296 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 296 | 6 | 00296 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo + 306 | 6 | 00306 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 306 | 6 | 00306 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 316 | 6 | 00316 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 316 | 6 | 00316 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo + 326 | 6 | 00326 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 326 | 6 | 00326 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo + 336 | 6 | 00336 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 336 | 6 | 00336 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo + 346 | 6 | 00346 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 346 | 6 | 00346 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo + 356 | 6 | 00356 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 356 | 6 | 00356 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo + 366 | 6 | 00366 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 366 | 6 | 00366 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo + 376 | 6 | 00376 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 376 | 6 | 00376 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo + 386 | 6 | 00386 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 386 | 6 | 00386 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo + 396 | 6 | 00396 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 396 | 6 | 00396 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo + 406 | 6 | 00406 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 406 | 6 | 00406 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 416 | 6 | 00416 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 416 | 6 | 00416 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo + 426 | 6 | 00426 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 426 | 6 | 00426 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo + 436 | 6 | 00436 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 436 | 6 | 00436 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo + 446 | 6 | 00446 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 446 | 6 | 00446 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo + 456 | 6 | 00456 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 456 | 6 | 00456 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo + 466 | 6 | 00466 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 466 | 6 | 00466 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo + 476 | 6 | 00476 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 476 | 6 | 00476 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo + 486 | 6 | 00486 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 486 | 6 | 00486 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo + 496 | 6 | 00496 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 496 | 6 | 00496 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo + 506 | 6 | 00506 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 506 | 6 | 00506 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 516 | 6 | 00516 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 516 | 6 | 00516 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo + 526 | 6 | 00526 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 526 | 6 | 00526 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo + 536 | 6 | 00536 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 536 | 6 | 00536 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo + 546 | 6 | 00546 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 546 | 6 | 00546 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo + 556 | 6 | 00556 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 556 | 6 | 00556 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo + 566 | 6 | 00566 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 566 | 6 | 00566 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo + 576 | 6 | 00576 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 576 | 6 | 00576 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo + 586 | 6 | 00586 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 586 | 6 | 00586 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo + 596 | 6 | 00596 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 596 | 6 | 00596 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo + 606 | 6 | 00606 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 606 | 6 | 00606 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 616 | 6 | 00616 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 616 | 6 | 00616 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo + 626 | 6 | 00626 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 626 | 6 | 00626 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo + 636 | 6 | 00636 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 636 | 6 | 00636 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo + 646 | 6 | 00646 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 646 | 6 | 00646 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo + 656 | 6 | 00656 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 656 | 6 | 00656 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo + 666 | 6 | 00666 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 666 | 6 | 00666 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo + 676 | 6 | 00676 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 676 | 6 | 00676 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo + 686 | 6 | 00686 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 686 | 6 | 00686 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo + 696 | 6 | 00696 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 696 | 6 | 00696 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo + 706 | 6 | 00706 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 706 | 6 | 00706 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 716 | 6 | 00716 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 716 | 6 | 00716 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo + 726 | 6 | 00726 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 726 | 6 | 00726 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo + 736 | 6 | 00736 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 736 | 6 | 00736 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo + 746 | 6 | 00746 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 746 | 6 | 00746 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo + 756 | 6 | 00756 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 756 | 6 | 00756 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo + 766 | 6 | 00766 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 766 | 6 | 00766 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo + 776 | 6 | 00776 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 776 | 6 | 00776 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo + 786 | 6 | 00786 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 786 | 6 | 00786 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo + 796 | 6 | 00796 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 796 | 6 | 00796 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo + 806 | 6 | 00806 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 806 | 6 | 00806 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 816 | 6 | 00816 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 816 | 6 | 00816 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo + 826 | 6 | 00826 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 826 | 6 | 00826 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo + 836 | 6 | 00836 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 836 | 6 | 00836 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo + 846 | 6 | 00846 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 846 | 6 | 00846 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo + 856 | 6 | 00856 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 856 | 6 | 00856 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo + 866 | 6 | 00866 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 866 | 6 | 00866 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo + 876 | 6 | 00876 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 876 | 6 | 00876 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo + 886 | 6 | 00886 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 886 | 6 | 00886 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo + 896 | 6 | 00896 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 896 | 6 | 00896 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo + 906 | 6 | 00906 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 906 | 6 | 00906 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 916 | 6 | 00916 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 916 | 6 | 00916 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo + 926 | 6 | 00926 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 926 | 6 | 00926 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo + 936 | 6 | 00936 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 936 | 6 | 00936 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo + 946 | 6 | 00946 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 946 | 6 | 00946 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo + 956 | 6 | 00956 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 956 | 6 | 00956 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo + 966 | 6 | 00966 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 966 | 6 | 00966 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo + 976 | 6 | 00976 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 976 | 6 | 00976 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo + 986 | 6 | 00986 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 986 | 6 | 00986 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo + 996 | 6 | 00996 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 996 | 6 | 00996 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo +(100 rows) + +-- bug before 9.3.5 due to sloppy handling of remote-estimate parameters +--Testcase 91: +SELECT * FROM ft1 WHERE c1 = ANY (ARRAY(SELECT c1 FROM ft2 WHERE c1 < 5)); + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+----- + 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo + 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo + 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo + 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo +(4 rows) + +--Testcase 92: +SELECT * FROM ft2 WHERE c1 = ANY (ARRAY(SELECT c1 FROM ft1 WHERE c1 < 5)); + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+----- + 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo + 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo + 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo + 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo +(4 rows) + +-- we should not push order by clause with volatile expressions or unsafe +-- collations +--Testcase 93: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM ft2 ORDER BY ft2.c1, random(); + QUERY PLAN +------------------------------------------------------------------------------ + Sort + Output: c1, c2, c3, "time", c6, c7, c8, (random()) + Sort Key: ft2.c1, (random()) + -> Foreign Scan on public.ft2 + Output: c1, c2, c3, "time", c6, c7, c8, random() + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(6 rows) + +--Testcase 94: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM ft2 ORDER BY ft2.c1, ft2.c3 collate "C"; + QUERY PLAN +------------------------------------------------------------------------------ + Sort + Output: c1, c2, c3, "time", c6, c7, c8, ((c3)::text) + Sort Key: ft2.c1, ft2.c3 COLLATE "C" + -> Foreign Scan on public.ft2 + Output: c1, c2, c3, "time", c6, c7, c8, c3 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(6 rows) + +-- user-defined operator/function +--Testcase 95: +CREATE FUNCTION influxdb_fdw_abs(int) RETURNS int AS $$ +BEGIN +RETURN abs($1); +END +$$ LANGUAGE plpgsql IMMUTABLE; +--Testcase 96: +CREATE OPERATOR === ( + LEFTARG = int, + RIGHTARG = int, + PROCEDURE = int4eq, + COMMUTATOR = === +); +-- built-in operators and functions can be shipped for remote execution +--Testcase 97: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = abs(t1.c2); + QUERY PLAN +---------------------------------------------------------------------------------- + Aggregate + Output: count(c3) + -> Foreign Scan on public.ft1 t1 + Output: c3 + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = abs("c2"))) +(5 rows) + +--Testcase 98: +SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = abs(t1.c2); + count +------- + 9 +(1 row) + +--Testcase 99: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = t1.c2; + QUERY PLAN +----------------------------------------------------------------------------- + Aggregate + Output: count(c3) + -> Foreign Scan on public.ft1 t1 + Output: c3 + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = "c2")) +(5 rows) + +--Testcase 100: +SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = t1.c2; + count +------- + 9 +(1 row) + +-- by default, user-defined ones cannot +--Testcase 101: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); + QUERY PLAN +------------------------------------------------------------ + Aggregate + Output: count(c3) + -> Foreign Scan on public.ft1 t1 + Output: c3 + Filter: (t1.c1 = influxdb_fdw_abs(t1.c2)) + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(6 rows) + +--Testcase 102: +SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); + count +------- + 9 +(1 row) + +--Testcase 103: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; + QUERY PLAN +------------------------------------------------------------ + Aggregate + Output: count(c3) + -> Foreign Scan on public.ft1 t1 + Output: c3 + Filter: (t1.c1 === t1.c2) + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(6 rows) + +--Testcase 104: +SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; + count +------- + 9 +(1 row) + +-- ORDER BY can be shipped, though +--Testcase 105: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; + QUERY PLAN +------------------------------------------------------------------------------------ + Limit + Output: c1, c2, c3, "time", c6, c7, c8 + -> Sort + Output: c1, c2, c3, "time", c6, c7, c8 + Sort Key: t1.c2 + -> Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (t1.c1 === t1.c2) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(9 rows) + +--Testcase 106: +SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+----- + 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo +(1 row) + +-- but let's put them in an extension ... +--Testcase 107: +ALTER EXTENSION influxdb_fdw ADD FUNCTION influxdb_fdw_abs(int); +--Testcase 108: +ALTER EXTENSION influxdb_fdw ADD OPERATOR === (int, int); +-- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); +-- ... now they can be shipped +--Testcase 109: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); + QUERY PLAN +------------------------------------------------------------ + Aggregate + Output: count(c3) + -> Foreign Scan on public.ft1 t1 + Output: c3 + Filter: (t1.c1 = influxdb_fdw_abs(t1.c2)) + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(6 rows) + +--Testcase 110: +SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); + count +------- + 9 +(1 row) + +--Testcase 111: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; + QUERY PLAN +------------------------------------------------------------ + Aggregate + Output: count(c3) + -> Foreign Scan on public.ft1 t1 + Output: c3 + Filter: (t1.c1 === t1.c2) + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(6 rows) + +--Testcase 112: +SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; + count +------- + 9 +(1 row) + +-- and both ORDER BY and LIMIT can be shipped +--Testcase 113: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; + QUERY PLAN +------------------------------------------------------------------------------------ + Limit + Output: c1, c2, c3, "time", c6, c7, c8 + -> Sort + Output: c1, c2, c3, "time", c6, c7, c8 + Sort Key: t1.c2 + -> Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (t1.c1 === t1.c2) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(9 rows) + +--Testcase 114: +SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+----- + 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo +(1 row) + +-- Test CASE pushdown +-- InfluxDB not support CASE expressions. +--Testcase 813: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT c1,c2,c3 FROM ft2 WHERE CASE WHEN c1 > 990 THEN c1 END < 1000 ORDER BY c1; + QUERY PLAN +-------------------------------------------------------------------------------------- + Sort + Output: c1, c2, c3 + Sort Key: ft2.c1 + -> Foreign Scan on public.ft2 + Output: c1, c2, c3 + Filter: (CASE WHEN (ft2.c1 > 990) THEN ft2.c1 ELSE NULL::integer END < 1000) + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(7 rows) + +--Testcase 814: +SELECT c1,c2,c3 FROM ft2 WHERE CASE WHEN c1 > 990 THEN c1 END < 1000 ORDER BY c1; + c1 | c2 | c3 +-----+----+------- + 991 | 1 | 00991 + 992 | 2 | 00992 + 993 | 3 | 00993 + 994 | 4 | 00994 + 995 | 5 | 00995 + 996 | 6 | 00996 + 997 | 7 | 00997 + 998 | 8 | 00998 + 999 | 9 | 00999 +(9 rows) + +-- Nested CASE +--Testcase 815: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT c1,c2,c3 FROM ft2 WHERE CASE CASE WHEN c2 > 0 THEN c2 END WHEN 100 THEN 601 WHEN c2 THEN c2 ELSE 0 END > 600 ORDER BY c1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: c1, c2, c3 + Sort Key: ft2.c1 + -> Foreign Scan on public.ft2 + Output: c1, c2, c3 + Filter: (CASE CASE WHEN (ft2.c2 > 0) THEN ft2.c2 ELSE NULL::integer END WHEN 100 THEN 601 WHEN ft2.c2 THEN ft2.c2 ELSE 0 END > 600) + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(7 rows) + +--Testcase 816: +SELECT c1,c2,c3 FROM ft2 WHERE CASE CASE WHEN c2 > 0 THEN c2 END WHEN 100 THEN 601 WHEN c2 THEN c2 ELSE 0 END > 600 ORDER BY c1; + c1 | c2 | c3 +----+----+---- +(0 rows) + +-- CASE arg WHEN +--Testcase 817: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE c1 > (CASE mod(c1, 4) WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END); + QUERY PLAN +------------------------------------------------------------------------------------ + Foreign Scan on public.ft1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (ft1.c1 > CASE mod(ft1.c1, 4) WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +-- CASE cannot be pushed down because of unshippable arg clause +--Testcase 818: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE c1 > (CASE random()::integer WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END); + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (ft1.c1 > CASE (random())::integer WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +-- these are shippable +--Testcase 819: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE c6 WHEN 'foo' THEN true ELSE c3 < 'bar' END; + QUERY PLAN +---------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: CASE ft1.c6 WHEN 'foo'::text THEN true ELSE (ft1.c3 < 'bar'::text) END + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +--Testcase 820: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE c3 WHEN c6 THEN true ELSE c3 < 'bar' END; + QUERY PLAN +----------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: CASE ft1.c3 WHEN ft1.c6 THEN true ELSE (ft1.c3 < 'bar'::text) END + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +-- but this is not because of collation +--Testcase 821: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE c3 COLLATE "C" WHEN c6 THEN true ELSE c3 < 'bar' END; + QUERY PLAN +------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: CASE (ft1.c3)::text WHEN ft1.c6 THEN true ELSE (ft1.c3 < 'bar'::text) END + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +-- check schema-qualification of regconfig constant +--Testcase 822: +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +--Testcase 823: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT c1, to_tsvector('custom_search'::regconfig, c3) FROM ft1 +WHERE c1 = 642 AND length(to_tsvector('custom_search'::regconfig, c3)) > 0; + QUERY PLAN +------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: c1, to_tsvector('custom_search'::regconfig, c3) + Filter: (length(to_tsvector('custom_search'::regconfig, ft1.c3)) > 0) + InfluxDB query: SELECT "C 1", "c3" FROM "T1" WHERE (("C 1" = 642)) +(4 rows) + +--Testcase 824: +SELECT c1, to_tsvector('custom_search'::regconfig, c3) FROM ft1 +WHERE c1 = 642 AND length(to_tsvector('custom_search'::regconfig, c3)) > 0; + c1 | to_tsvector +-----+------------- + 642 | '00642':1 +(1 row) + +-- =================================================================== +-- JOIN queries +-- =================================================================== +-- join two tables +--Testcase 115: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c1, t1.c3 + -> Sort + Output: t1.c1, t2.c1, t1.c3 + Sort Key: t1.c3, t1.c1 + -> Merge Join + Output: t1.c1, t2.c1, t1.c3 + Merge Cond: (t1.c1 = t2.c1) + -> Sort + Output: t1.c1, t1.c3 + Sort Key: t1.c1 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c3 + InfluxDB query: SELECT "C 1", "c3" FROM "T1" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(20 rows) + +--Testcase 116: +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- join three tables +--Testcase 117: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) JOIN ft4 t3 ON (t3.c1 = t1.c1) ORDER BY t1.c3, t1.c1 OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c2, t3.c3, t1.c3 + -> Sort + Output: t1.c1, t2.c2, t3.c3, t1.c3 + Sort Key: t1.c3, t1.c1 + -> Merge Join + Output: t1.c1, t2.c2, t3.c3, t1.c3 + Merge Cond: (t2.c1 = t1.c1) + -> Sort + Output: t2.c2, t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Materialize + Output: t1.c1, t1.c3, t3.c3, t3.c1 + -> Merge Join + Output: t1.c1, t1.c3, t3.c3, t3.c1 + Merge Cond: (t1.c1 = t3.c1) + -> Sort + Output: t1.c1, t1.c3 + Sort Key: t1.c1 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c3 + InfluxDB query: SELECT "C 1", "c3" FROM "T1" + -> Sort + Output: t3.c3, t3.c1 + Sort Key: t3.c1 + -> Foreign Scan on public.ft4 t3 + Output: t3.c3, t3.c1 + InfluxDB query: SELECT "c1", "c3" FROM "T3" +(31 rows) + +--Testcase 118: +SELECT t1.c1, t2.c2, t3.c3 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) JOIN ft4 t3 ON (t3.c1 = t1.c1) ORDER BY t1.c3, t1.c1 OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 22 | 2 | AAA022 + 24 | 4 | AAA024 + 26 | 6 | AAA026 + 28 | 8 | AAA028 + 30 | 0 | AAA030 + 32 | 2 | AAA032 + 34 | 4 | AAA034 + 36 | 6 | AAA036 + 38 | 8 | AAA038 + 40 | 0 | AAA040 +(10 rows) + +-- left outer join +--Testcase 119: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------- + Limit + Output: t1.c1, t2.c1 + -> Incremental Sort + Output: t1.c1, t2.c1 + Sort Key: t1.c1, t2.c1 + Presorted Key: t1.c1 + -> Merge Left Join + Output: t1.c1, t2.c1 + Merge Cond: (t1.c1 = t2.c1) + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft4 t1 + Output: t1.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft5 t2 + Output: t2.c1 + InfluxDB query: SELECT "c1" FROM "T4" +(21 rows) + +--Testcase 120: +SELECT t1.c1, t2.c1 FROM ft4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; + c1 | c1 +----+---- + 22 | + 24 | 24 + 26 | + 28 | + 30 | 30 + 32 | + 34 | + 36 | 36 + 38 | + 40 | +(10 rows) + +-- left outer join three tables +--Testcase 121: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c2, t3.c3 + -> Nested Loop Left Join + Output: t1.c1, t2.c2, t3.c3 + Join Filter: (t2.c1 = t3.c1) + -> Nested Loop Left Join + Output: t1.c1, t2.c2, t2.c1 + Join Filter: (t1.c1 = t2.c1) + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Materialize + Output: t2.c2, t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Materialize + Output: t3.c3, t3.c1 + -> Foreign Scan on public.ft4 t3 + Output: t3.c3, t3.c1 + InfluxDB query: SELECT "c1", "c3" FROM "T3" +(21 rows) + +--Testcase 122: +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +-- left outer join + placement of clauses. +-- clauses within the nullable side are not pulled up, but top level clause on +-- non-nullable side is pushed into non-nullable side +--Testcase 123: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) WHERE t1.c1 < 10; + QUERY PLAN +------------------------------------------------------------------------------- + Hash Left Join + Output: t1.c1, t1.c2, ft5.c1, ft5.c2 + Hash Cond: (t1.c1 = ft5.c1) + -> Foreign Scan on public.ft4 t1 + Output: t1.c1, t1.c2, t1.c3 + InfluxDB query: SELECT "c1", "c2" FROM "T3" WHERE (("c1" < 10)) + -> Hash + Output: ft5.c1, ft5.c2 + -> Foreign Scan on public.ft5 + Output: ft5.c1, ft5.c2 + InfluxDB query: SELECT "c1", "c2" FROM "T4" WHERE (("c1" < 10)) +(11 rows) + +--Testcase 124: +SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) WHERE t1.c1 < 10; + c1 | c2 | c1 | c2 +----+----+----+---- + 2 | 3 | | + 4 | 5 | | + 6 | 7 | 6 | 7 + 8 | 9 | | +(4 rows) + +-- clauses within the nullable side are not pulled up, but the top level clause +-- on nullable side is not pushed down into nullable side +--Testcase 125: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) + WHERE (t2.c1 < 10 OR t2.c1 IS NULL) AND t1.c1 < 10; + QUERY PLAN +------------------------------------------------------------------------------- + Hash Left Join + Output: t1.c1, t1.c2, ft5.c1, ft5.c2 + Hash Cond: (t1.c1 = ft5.c1) + Filter: ((ft5.c1 < 10) OR (ft5.c1 IS NULL)) + -> Foreign Scan on public.ft4 t1 + Output: t1.c1, t1.c2, t1.c3 + InfluxDB query: SELECT "c1", "c2" FROM "T3" WHERE (("c1" < 10)) + -> Hash + Output: ft5.c1, ft5.c2 + -> Foreign Scan on public.ft5 + Output: ft5.c1, ft5.c2 + InfluxDB query: SELECT "c1", "c2" FROM "T4" WHERE (("c1" < 10)) +(12 rows) + +--Testcase 126: +SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) + WHERE (t2.c1 < 10 OR t2.c1 IS NULL) AND t1.c1 < 10; + c1 | c2 | c1 | c2 +----+----+----+---- + 2 | 3 | | + 4 | 5 | | + 6 | 7 | 6 | 7 + 8 | 9 | | +(4 rows) + +-- right outer join +--Testcase 127: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft5 t1 RIGHT JOIN ft4 t2 ON (t1.c1 = t2.c1) ORDER BY t2.c1, t1.c1 OFFSET 10 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------- + Limit + Output: t1.c1, t2.c1 + -> Incremental Sort + Output: t1.c1, t2.c1 + Sort Key: t2.c1, t1.c1 + Presorted Key: t2.c1 + -> Merge Left Join + Output: t1.c1, t2.c1 + Merge Cond: (t2.c1 = t1.c1) + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft4 t2 + Output: t2.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft5 t1 + Output: t1.c1 + InfluxDB query: SELECT "c1" FROM "T4" +(21 rows) + +--Testcase 128: +SELECT t1.c1, t2.c1 FROM ft5 t1 RIGHT JOIN ft4 t2 ON (t1.c1 = t2.c1) ORDER BY t2.c1, t1.c1 OFFSET 10 LIMIT 10; + c1 | c1 +----+---- + | 22 + 24 | 24 + | 26 + | 28 + 30 | 30 + | 32 + | 34 + 36 | 36 + | 38 + | 40 +(10 rows) + +-- right outer join three tables +--Testcase 129: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c2, t3.c3 + -> Nested Loop Left Join + Output: t1.c1, t2.c2, t3.c3 + Join Filter: (t1.c1 = t2.c1) + -> Nested Loop Left Join + Output: t3.c3, t2.c2, t2.c1 + Join Filter: (t2.c1 = t3.c1) + -> Foreign Scan on public.ft4 t3 + Output: t3.c1, t3.c2, t3.c3 + InfluxDB query: SELECT "c1", "c3" FROM "T3" + -> Materialize + Output: t2.c2, t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Materialize + Output: t1.c1 + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(21 rows) + +--Testcase 130: +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 22 | 2 | AAA022 + 24 | 4 | AAA024 + 26 | 6 | AAA026 + 28 | 8 | AAA028 + 30 | 0 | AAA030 + 32 | 2 | AAA032 + 34 | 4 | AAA034 + 36 | 6 | AAA036 + 38 | 8 | AAA038 + 40 | 0 | AAA040 +(10 rows) + +-- full outer join +--Testcase 131: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 45 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------- + Limit + Output: t1.c1, t2.c1 + -> Sort + Output: t1.c1, t2.c1 + Sort Key: t1.c1, t2.c1 + -> Merge Full Join + Output: t1.c1, t2.c1 + Merge Cond: (t1.c1 = t2.c1) + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft4 t1 + Output: t1.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft5 t2 + Output: t2.c1 + InfluxDB query: SELECT "c1" FROM "T4" +(20 rows) + +--Testcase 132: +SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 45 LIMIT 10; + c1 | c1 +-----+---- + 92 | + 94 | + 96 | 96 + 98 | + 100 | + | 3 + | 9 + | 15 + | 21 + | 27 +(10 rows) + +-- full outer join with restrictions on the joining relations +-- a. the joining relations are both base relations +--Testcase 133: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Sort + Output: ft4.c1, ft5.c1 + Sort Key: ft4.c1, ft5.c1 + -> Hash Full Join + Output: ft4.c1, ft5.c1 + Hash Cond: (ft4.c1 = ft5.c1) + -> Foreign Scan on public.ft4 + Output: ft4.c1, ft4.c2, ft4.c3 + InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: ft5.c1 + -> Foreign Scan on public.ft5 + Output: ft5.c1 + InfluxDB query: SELECT "c1" FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(14 rows) + +--Testcase 134: +SELECT t1.c1, t2.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1; + c1 | c1 +----+---- + 50 | + 52 | + 54 | 54 + 56 | + 58 | + 60 | 60 + | 51 + | 57 +(8 rows) + +--Testcase 135: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT 1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------ + Limit + Output: 1 + -> Merge Full Join + Output: 1 + -> Foreign Scan on public.ft4 + Output: ft4.c1, ft4.c2, ft4.c3 + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Materialize + Output: ft5.c1, ft5.c2, ft5.c3 + -> Foreign Scan on public.ft5 + Output: ft5.c1, ft5.c2, ft5.c3 + InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(12 rows) + +--Testcase 136: +SELECT 1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; + ?column? +---------- + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +(10 rows) + +-- b. one of the joining relations is a base relation and the other is a join +-- relation +--Testcase 137: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM ft4 t2 LEFT JOIN ft5 t3 ON (t2.c1 = t3.c1) WHERE (t2.c1 between 50 and 60)) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; + QUERY PLAN +--------------------------------------------------------------------------------------------------------- + Sort + Output: ft4.c1, t2.c1, t3.c1 + Sort Key: ft4.c1, t2.c1, t3.c1 + -> Hash Full Join + Output: ft4.c1, t2.c1, t3.c1 + Hash Cond: (t2.c1 = ft4.c1) + -> Hash Right Join + Output: t2.c1, t3.c1 + Hash Cond: (t3.c1 = t2.c1) + -> Foreign Scan on public.ft5 t3 + Output: t3.c1, t3.c2, t3.c3 + InfluxDB query: SELECT "c1" FROM "T4" + -> Hash + Output: t2.c1 + -> Foreign Scan on public.ft4 t2 + Output: t2.c1 + InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: ft4.c1 + -> Foreign Scan on public.ft4 + Output: ft4.c1 + InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(22 rows) + +--Testcase 138: +SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM ft4 t2 LEFT JOIN ft5 t3 ON (t2.c1 = t3.c1) WHERE (t2.c1 between 50 and 60)) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; + c1 | a | b +----+----+---- + 50 | 50 | + 52 | 52 | + 54 | 54 | 54 + 56 | 56 | + 58 | 58 | + 60 | 60 | 60 +(6 rows) + +-- c. test deparsing the remote query as nested subqueries +--Testcase 139: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; + QUERY PLAN +--------------------------------------------------------------------------------------------------------- + Sort + Output: ft4.c1, ft4_1.c1, ft5.c1 + Sort Key: ft4.c1, ft4_1.c1, ft5.c1 + -> Hash Full Join + Output: ft4.c1, ft4_1.c1, ft5.c1 + Hash Cond: (ft4_1.c1 = ft4.c1) + -> Hash Full Join + Output: ft4_1.c1, ft5.c1 + Hash Cond: (ft4_1.c1 = ft5.c1) + Filter: ((ft4_1.c1 IS NULL) OR (ft4_1.c1 IS NOT NULL)) + -> Foreign Scan on public.ft4 ft4_1 + Output: ft4_1.c1, ft4_1.c2, ft4_1.c3 + InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: ft5.c1 + -> Foreign Scan on public.ft5 + Output: ft5.c1 + InfluxDB query: SELECT "c1" FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: ft4.c1 + -> Foreign Scan on public.ft4 + Output: ft4.c1 + InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(23 rows) + +--Testcase 140: +SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; + c1 | a | b +----+----+---- + 50 | 50 | + 52 | 52 | + 54 | 54 | 54 + 56 | 56 | + 58 | 58 | + 60 | 60 | 60 + | | 51 + | | 57 +(8 rows) + +-- d. test deparsing rowmarked relations as subqueries +--Testcase 141: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM "S 1"."T 3" WHERE c1 = 50) t1 INNER JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY t1.c1, ss.a, ss.b FOR UPDATE OF t1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------- + LockRows + Output: "T 3".c1, ft4.c1, ft5.c1, "T 3".*, ft4.*, ft5.* + -> Sort + Output: "T 3".c1, ft4.c1, ft5.c1, "T 3".*, ft4.*, ft5.* + Sort Key: ft4.c1, ft5.c1 + -> Nested Loop + Output: "T 3".c1, ft4.c1, ft5.c1, "T 3".*, ft4.*, ft5.* + -> Foreign Scan on "S 1"."T 3" + Output: "T 3".c1, "T 3".* + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" WHERE (("c1" = 50)) + -> Materialize + Output: ft4.c1, ft4.*, ft5.c1, ft5.* + -> Merge Full Join + Output: ft4.c1, ft4.*, ft5.c1, ft5.* + Merge Cond: (ft4.c1 = ft5.c1) + Filter: ((ft4.c1 IS NULL) OR (ft4.c1 IS NOT NULL)) + -> Sort + Output: ft4.c1, ft4.* + Sort Key: ft4.c1 + -> Foreign Scan on public.ft4 + Output: ft4.c1, ft4.* + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Sort + Output: ft5.c1, ft5.* + Sort Key: ft5.c1 + -> Foreign Scan on public.ft5 + Output: ft5.c1, ft5.* + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(28 rows) + +--Testcase 142: +SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM "S 1"."T 3" WHERE c1 = 50) t1 INNER JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY t1.c1, ss.a, ss.b FOR UPDATE OF t1; + c1 | a | b +----+----+---- + 50 | 50 | + 50 | 52 | + 50 | 54 | 54 + 50 | 56 | + 50 | 58 | + 50 | 60 | 60 + 50 | | 51 + 50 | | 57 +(8 rows) + +-- full outer join + inner join +--Testcase 143: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1, t3.c1 FROM ft4 t1 INNER JOIN ft5 t2 ON (t1.c1 = t2.c1 + 1 and t1.c1 between 50 and 60) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1, t2.c1, t3.c1 LIMIT 10; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------- + Limit + Output: t1.c1, t2.c1, t3.c1 + -> Sort + Output: t1.c1, t2.c1, t3.c1 + Sort Key: t1.c1, t2.c1, t3.c1 + -> Hash Full Join + Output: t1.c1, t2.c1, t3.c1 + Hash Cond: (t3.c1 = t2.c1) + -> Foreign Scan on public.ft4 t3 + Output: t3.c1, t3.c2, t3.c3 + InfluxDB query: SELECT "c1" FROM "T3" + -> Hash + Output: t1.c1, t2.c1 + -> Hash Join + Output: t1.c1, t2.c1 + Hash Cond: ((t2.c1 + 1) = t1.c1) + -> Foreign Scan on public.ft5 t2 + Output: t2.c1, t2.c2, t2.c3 + InfluxDB query: SELECT "c1" FROM "T4" + -> Hash + Output: t1.c1 + -> Foreign Scan on public.ft4 t1 + Output: t1.c1 + InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(24 rows) + +--Testcase 144: +SELECT t1.c1, t2.c1, t3.c1 FROM ft4 t1 INNER JOIN ft5 t2 ON (t1.c1 = t2.c1 + 1 and t1.c1 between 50 and 60) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1, t2.c1, t3.c1 LIMIT 10; + c1 | c1 | c1 +----+----+---- + 52 | 51 | + 58 | 57 | + | | 2 + | | 4 + | | 6 + | | 8 + | | 10 + | | 12 + | | 14 + | | 16 +(10 rows) + +-- full outer join three tables +--Testcase 145: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c2, t3.c3 + -> Hash Full Join + Output: t1.c1, t2.c2, t3.c3 + Hash Cond: (t2.c1 = t3.c1) + -> Hash Full Join + Output: t1.c1, t2.c2, t2.c1 + Hash Cond: (t1.c1 = t2.c1) + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Hash + Output: t2.c2, t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Hash + Output: t3.c3, t3.c1 + -> Foreign Scan on public.ft4 t3 + Output: t3.c3, t3.c1 + InfluxDB query: SELECT "c1", "c3" FROM "T3" +(21 rows) + +--Testcase 146: +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +-- full outer join + right outer join +--Testcase 147: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c2, t3.c3 + -> Nested Loop Left Join + Output: t1.c1, t2.c2, t3.c3 + Join Filter: (t1.c1 = t2.c1) + -> Nested Loop Left Join + Output: t3.c3, t2.c2, t2.c1 + Join Filter: (t2.c1 = t3.c1) + -> Foreign Scan on public.ft4 t3 + Output: t3.c1, t3.c2, t3.c3 + InfluxDB query: SELECT "c1", "c3" FROM "T3" + -> Materialize + Output: t2.c2, t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Materialize + Output: t1.c1 + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(21 rows) + +--Testcase 148: +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 22 | 2 | AAA022 + 24 | 4 | AAA024 + 26 | 6 | AAA026 + 28 | 8 | AAA028 + 30 | 0 | AAA030 + 32 | 2 | AAA032 + 34 | 4 | AAA034 + 36 | 6 | AAA036 + 38 | 8 | AAA038 + 40 | 0 | AAA040 +(10 rows) + +-- right outer join + full outer join +--Testcase 149: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c2, t3.c3 + -> Hash Full Join + Output: t1.c1, t2.c2, t3.c3 + Hash Cond: (t2.c1 = t3.c1) + -> Nested Loop Left Join + Output: t2.c2, t2.c1, t1.c1 + Join Filter: (t1.c1 = t2.c1) + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Materialize + Output: t1.c1 + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Hash + Output: t3.c3, t3.c1 + -> Foreign Scan on public.ft4 t3 + Output: t3.c3, t3.c1 + InfluxDB query: SELECT "c1", "c3" FROM "T3" +(21 rows) + +--Testcase 150: +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +-- full outer join + left outer join +--Testcase 151: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c2, t3.c3 + -> Nested Loop Left Join + Output: t1.c1, t2.c2, t3.c3 + Join Filter: (t2.c1 = t3.c1) + -> Hash Full Join + Output: t1.c1, t2.c2, t2.c1 + Hash Cond: (t1.c1 = t2.c1) + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Hash + Output: t2.c2, t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Materialize + Output: t3.c3, t3.c1 + -> Foreign Scan on public.ft4 t3 + Output: t3.c3, t3.c1 + InfluxDB query: SELECT "c1", "c3" FROM "T3" +(21 rows) + +--Testcase 152: +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +-- left outer join + full outer join +--Testcase 153: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c2, t3.c3 + -> Hash Full Join + Output: t1.c1, t2.c2, t3.c3 + Hash Cond: (t2.c1 = t3.c1) + -> Nested Loop Left Join + Output: t1.c1, t2.c2, t2.c1 + Join Filter: (t1.c1 = t2.c1) + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Materialize + Output: t2.c2, t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Hash + Output: t3.c3, t3.c1 + -> Foreign Scan on public.ft4 t3 + Output: t3.c3, t3.c1 + InfluxDB query: SELECT "c1", "c3" FROM "T3" +(21 rows) + +--Testcase 154: +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +--Testcase 155: +SET enable_memoize TO off; +-- right outer join + left outer join +--Testcase 156: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------------- + Limit + Output: t1.c1, t2.c2, t3.c3 + -> Nested Loop Left Join + Output: t1.c1, t2.c2, t3.c3 + Join Filter: (t1.c1 = t2.c1) + -> Nested Loop Left Join + Output: t2.c2, t2.c1, t3.c3 + Join Filter: (t2.c1 = t3.c1) + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Materialize + Output: t3.c3, t3.c1 + -> Foreign Scan on public.ft4 t3 + Output: t3.c3, t3.c1 + InfluxDB query: SELECT "c1", "c3" FROM "T3" + -> Materialize + Output: t1.c1 + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(21 rows) + +--Testcase 157: +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +--Testcase 158: +RESET enable_memoize; +-- left outer join + right outer join +--Testcase 159: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c2, t3.c3 + -> Hash Right Join + Output: t1.c1, t2.c2, t3.c3 + Hash Cond: (t2.c1 = t3.c1) + -> Nested Loop + Output: t1.c1, t2.c2, t2.c1 + Join Filter: (t1.c1 = t2.c1) + -> Foreign Scan on public.ft2 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Materialize + Output: t2.c2, t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Hash + Output: t3.c3, t3.c1 + -> Foreign Scan on public.ft4 t3 + Output: t3.c3, t3.c1 + InfluxDB query: SELECT "c1", "c3" FROM "T3" +(21 rows) + +--Testcase 160: +SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 22 | 2 | AAA022 + 24 | 4 | AAA024 + 26 | 6 | AAA026 + 28 | 8 | AAA028 + 30 | 0 | AAA030 + 32 | 2 | AAA032 + 34 | 4 | AAA034 + 36 | 6 | AAA036 + 38 | 8 | AAA038 + 40 | 0 | AAA040 +(10 rows) + +-- full outer join + WHERE clause, only matched rows +--Testcase 161: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) WHERE (t1.c1 = t2.c1 OR t1.c1 IS NULL) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------- + Limit + Output: t1.c1, t2.c1 + -> Sort + Output: t1.c1, t2.c1 + Sort Key: t1.c1, t2.c1 + -> Merge Full Join + Output: t1.c1, t2.c1 + Merge Cond: (t1.c1 = t2.c1) + Filter: ((t1.c1 = t2.c1) OR (t1.c1 IS NULL)) + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft4 t1 + Output: t1.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft5 t2 + Output: t2.c1 + InfluxDB query: SELECT "c1" FROM "T4" +(21 rows) + +--Testcase 162: +SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) WHERE (t1.c1 = t2.c1 OR t1.c1 IS NULL) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; + c1 | c1 +----+---- + 66 | 66 + 72 | 72 + 78 | 78 + 84 | 84 + 90 | 90 + 96 | 96 + | 3 + | 9 + | 15 + | 21 +(10 rows) + +-- full outer join + WHERE clause with shippable extensions set +--Testcase 163: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t1.c3 FROM ft1 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE influxdb_fdw_abs(t1.c1) > 0 OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c2, t1.c3 + -> Hash Full Join + Output: t1.c1, t2.c2, t1.c3 + Hash Cond: (t2.c1 = t1.c1) + Filter: (influxdb_fdw_abs(t1.c1) > 0) + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Hash + Output: t1.c1, t1.c3 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c3 + InfluxDB query: SELECT "C 1", "c3" FROM "T1" +(14 rows) + +-- skip, influxdb does not have option 'extensions' +-- ALTER SERVER influxdb_svr OPTIONS (DROP extensions); +-- full outer join + WHERE clause with shippable extensions not set +-- EXPLAIN (VERBOSE, COSTS OFF) +-- SELECT t1.c1, t2.c2, t1.c3 FROM ft1 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE influxdb_fdw_abs(t1.c1) > 0 OFFSET 10 LIMIT 10; +-- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); +-- join two tables with FOR UPDATE clause +-- tests whole-row reference for row marks +--Testcase 164: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE OF t1; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + -> LockRows + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + -> Sort + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + Sort Key: t1.c3, t1.c1 + -> Hash Join + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + Hash Cond: (t2.c1 = t1.c1) + -> Foreign Scan on public.ft2 t2 + Output: t2.c1, t2.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" + -> Hash + Output: t1.c1, t1.c3, t1.* + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c3, t1.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(18 rows) + +--Testcase 165: +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE OF t1; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +--Testcase 166: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + -> LockRows + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + -> Sort + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + Sort Key: t1.c3, t1.c1 + -> Hash Join + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + Hash Cond: (t2.c1 = t1.c1) + -> Foreign Scan on public.ft2 t2 + Output: t2.c1, t2.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" + -> Hash + Output: t1.c1, t1.c3, t1.* + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c3, t1.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(18 rows) + +--Testcase 167: +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- join two tables with FOR SHARE clause +--Testcase 168: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE OF t1; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + -> LockRows + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + -> Sort + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + Sort Key: t1.c3, t1.c1 + -> Hash Join + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + Hash Cond: (t2.c1 = t1.c1) + -> Foreign Scan on public.ft2 t2 + Output: t2.c1, t2.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" + -> Hash + Output: t1.c1, t1.c3, t1.* + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c3, t1.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(18 rows) + +--Testcase 169: +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE OF t1; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +--Testcase 170: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + -> LockRows + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + -> Sort + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + Sort Key: t1.c3, t1.c1 + -> Hash Join + Output: t1.c1, t2.c1, t1.c3, t1.*, t2.* + Hash Cond: (t2.c1 = t1.c1) + -> Foreign Scan on public.ft2 t2 + Output: t2.c1, t2.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" + -> Hash + Output: t1.c1, t1.c3, t1.* + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c3, t1.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(18 rows) + +--Testcase 171: +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- join in CTE +--Testcase 172: +EXPLAIN (VERBOSE, COSTS OFF) +WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; + QUERY PLAN +-------------------------------------------------------------------- + Limit + Output: t.c1_1, t.c2_1, t.c1_3 + CTE t + -> Merge Join + Output: t1.c1, t1.c3, t2.c1 + Merge Cond: (t1.c1 = t2.c1) + -> Sort + Output: t1.c1, t1.c3 + Sort Key: t1.c1 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c3 + InfluxDB query: SELECT "C 1", "c3" FROM "T1" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: t.c1_1, t.c2_1, t.c1_3 + Sort Key: t.c1_3, t.c1_1 + -> CTE Scan on t + Output: t.c1_1, t.c2_1, t.c1_3 +(23 rows) + +--Testcase 173: +WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; + c1_1 | c2_1 +------+------ + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- ctid with whole-row reference +--Testcase 174: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.ctid, t1, t2, t1.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------ + Limit + Output: t1.ctid, t1.*, t2.*, t1.c1, t1.c3 + -> Sort + Output: t1.ctid, t1.*, t2.*, t1.c1, t1.c3 + Sort Key: t1.c3, t1.c1 + -> Hash Join + Output: t1.ctid, t1.*, t2.*, t1.c1, t1.c3 + Hash Cond: (t2.c1 = t1.c1) + -> Foreign Scan on public.ft2 t2 + Output: t2.*, t2.c1 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" + -> Hash + Output: t1.ctid, t1.*, t1.c1, t1.c3 + -> Foreign Scan on public.ft1 t1 + Output: t1.ctid, t1.*, t1.c1, t1.c3 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(16 rows) + +-- SEMI JOIN, not pushed down +--Testcase 175: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c1) ORDER BY t1.c1 OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1.c1 + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Hash Join + Output: t1.c1 + Inner Unique: true + Hash Cond: (t1.c1 = t2.c1) + -> Foreign Scan on public.ft1 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Hash + Output: t2.c1 + -> HashAggregate + Output: t2.c1 + Group Key: t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(20 rows) + +--Testcase 176: +SELECT t1.c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c1) ORDER BY t1.c1 OFFSET 100 LIMIT 10; + c1 +----- + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 +(10 rows) + +-- ANTI JOIN, not pushed down +--Testcase 177: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c2) ORDER BY t1.c1 OFFSET 100 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------- + Limit + Output: t1.c1 + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Hash Anti Join + Output: t1.c1 + Hash Cond: (t1.c1 = t2.c2) + -> Foreign Scan on public.ft1 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Hash + Output: t2.c2 + -> Foreign Scan on public.ft2 t2 + Output: t2.c2 + InfluxDB query: SELECT "c2" FROM "T1" +(16 rows) + +--Testcase 178: +SELECT t1.c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c2) ORDER BY t1.c1 OFFSET 100 LIMIT 10; + c1 +----- + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 +(10 rows) + +-- CROSS JOIN can be pushed down +--Testcase 179: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft1 t1 CROSS JOIN ft2 t2 ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c1 + -> Sort + Output: t1.c1, t2.c1 + Sort Key: t1.c1, t2.c1 + -> Nested Loop + Output: t1.c1, t2.c1 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Materialize + Output: t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(15 rows) + +--Testcase 180: +SELECT t1.c1, t2.c1 FROM ft1 t1 CROSS JOIN ft2 t2 ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; + c1 | c1 +----+----- + 1 | 101 + 1 | 102 + 1 | 103 + 1 | 104 + 1 | 105 + 1 | 106 + 1 | 107 + 1 | 108 + 1 | 109 + 1 | 110 +(10 rows) + +-- different server, not pushed down. No result expected. +--Testcase 181: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft5 t1 JOIN ft6 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; + QUERY PLAN +----------------------------------------------------------- + Limit + Output: t1.c1, t2.c1 + -> Merge Join + Output: t1.c1, t2.c1 + Merge Cond: (t1.c1 = t2.c1) + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft5 t1 + Output: t1.c1 + InfluxDB query: SELECT "c1" FROM "T4" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft6 t2 + Output: t2.c1 + InfluxDB query: SELECT "c1" FROM "T4" +(17 rows) + +--Testcase 182: +SELECT t1.c1, t2.c1 FROM ft5 t1 JOIN ft6 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; + c1 | c1 +----+---- +(0 rows) + +-- unsafe join conditions (c8 has a UDT), not pushed down. Practically a CROSS +-- JOIN since c8 in both tables has same value. +--Testcase 183: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c8 = t2.c8) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c1 + -> Sort + Output: t1.c1, t2.c1 + Sort Key: t1.c1, t2.c1 + -> Merge Left Join + Output: t1.c1, t2.c1 + Merge Cond: (t1.c8 = t2.c8) + -> Sort + Output: t1.c1, t1.c8 + Sort Key: t1.c8 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c8 + InfluxDB query: SELECT "C 1", "c8" FROM "T1" + -> Sort + Output: t2.c1, t2.c8 + Sort Key: t2.c8 + -> Foreign Scan on public.ft2 t2 + Output: t2.c1, t2.c8 + InfluxDB query: SELECT "C 1", "c8" FROM "T1" +(20 rows) + +--Testcase 184: +SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c8 = t2.c8) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; + c1 | c1 +----+----- + 1 | 101 + 1 | 102 + 1 | 103 + 1 | 104 + 1 | 105 + 1 | 106 + 1 | 107 + 1 | 108 + 1 | 109 + 1 | 110 +(10 rows) + +-- unsafe conditions on one side (c8 has a UDT), not pushed down. +--Testcase 185: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = 'foo' ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------------------------------------- + Limit + Output: t1.c1, t2.c1, t1.c3 + -> Sort + Output: t1.c1, t2.c1, t1.c3 + Sort Key: t1.c3, t1.c1 + -> Hash Right Join + Output: t1.c1, t2.c1, t1.c3 + Hash Cond: (t2.c1 = t1.c1) + -> Foreign Scan on public.ft2 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Hash + Output: t1.c1, t1.c3 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c3 + InfluxDB query: SELECT "C 1", "c3" FROM "T1" WHERE (("c8" = 'foo')) +(16 rows) + +--Testcase 186: +SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = 'foo' ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- join where unsafe to pushdown condition in WHERE clause has a column not +-- in the SELECT clause. In this test unsafe clause needs to have column +-- references from both joining sides so that the clause is not pushed down +-- into one of the joining sides. +--Testcase 187: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------ + Limit + Output: t1.c1, t2.c1, t1.c3 + -> Sort + Output: t1.c1, t2.c1, t1.c3 + Sort Key: t1.c3, t1.c1 + -> Merge Join + Output: t1.c1, t2.c1, t1.c3 + Merge Cond: ((t1.c1 = t2.c1) AND (t1.c8 = t2.c8)) + -> Sort + Output: t1.c1, t1.c3, t1.c8 + Sort Key: t1.c1, t1.c8 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c3, t1.c8 + InfluxDB query: SELECT "C 1", "c3", "c8" FROM "T1" + -> Sort + Output: t2.c1, t2.c8 + Sort Key: t2.c1, t2.c8 + -> Foreign Scan on public.ft2 t2 + Output: t2.c1, t2.c8 + InfluxDB query: SELECT "C 1", "c8" FROM "T1" +(20 rows) + +--Testcase 188: +SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- Aggregate after UNION, for testing setrefs +--Testcase 189: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) UNION SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------ + Limit + Output: t1.c1, (avg((t1.c1 + t2.c1))) + -> Sort + Output: t1.c1, (avg((t1.c1 + t2.c1))) + Sort Key: t1.c1 + -> HashAggregate + Output: t1.c1, avg((t1.c1 + t2.c1)) + Group Key: t1.c1 + -> HashAggregate + Output: t1.c1, t2.c1 + Group Key: t1.c1, t2.c1 + -> Append + -> Merge Join + Output: t1.c1, t2.c1 + Merge Cond: (t1.c1 = t2.c1) + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Merge Join + Output: t1_1.c1, t2_1.c1 + Merge Cond: (t1_1.c1 = t2_1.c1) + -> Sort + Output: t1_1.c1 + Sort Key: t1_1.c1 + -> Foreign Scan on public.ft1 t1_1 + Output: t1_1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: t2_1.c1 + Sort Key: t2_1.c1 + -> Foreign Scan on public.ft2 t2_1 + Output: t2_1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(42 rows) + +--Testcase 190: +SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) UNION SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; + t1c1 | avg +------+---------------------- + 101 | 202.0000000000000000 + 102 | 204.0000000000000000 + 103 | 206.0000000000000000 + 104 | 208.0000000000000000 + 105 | 210.0000000000000000 + 106 | 212.0000000000000000 + 107 | 214.0000000000000000 + 108 | 216.0000000000000000 + 109 | 218.0000000000000000 + 110 | 220.0000000000000000 +(10 rows) + +-- join with lateral reference +--Testcase 191: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1."C 1" FROM "S 1"."T 1" t1, LATERAL (SELECT DISTINCT t2.c1, t3.c1 FROM ft1 t2, ft2 t3 WHERE t2.c1 = t3.c1 AND t2.c2 = t1.c2) q ORDER BY t1."C 1" OFFSET 10 LIMIT 10; + QUERY PLAN +-------------------------------------------------------------------------------------------------------- + Limit + Output: t1."C 1" + -> Sort + Output: t1."C 1" + Sort Key: t1."C 1" + -> Nested Loop + Output: t1."C 1" + -> Foreign Scan on "S 1"."T 1" t1 + Output: t1."C 1", t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" + -> Unique + Output: t2.c1, t3.c1 + -> Sort + Output: t2.c1, t3.c1 + Sort Key: t2.c1 + -> Hash Join + Output: t2.c1, t3.c1 + Hash Cond: (t3.c1 = t2.c1) + -> Foreign Scan on public.ft2 t3 + Output: t3.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Hash + Output: t2.c1 + -> Foreign Scan on public.ft1 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("c2" = $1)) +(26 rows) + +--Testcase 192: +SELECT t1."C 1" FROM "S 1"."T 1" t1, LATERAL (SELECT DISTINCT t2.c1, t3.c1 FROM ft1 t2, ft2 t3 WHERE t2.c1 = t3.c1 AND t2.c2 = t1.c2) q ORDER BY t1."C 1" OFFSET 10 LIMIT 10; + C 1 +----- + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +(10 rows) + +-- non-Var items in targetlist of the nullable rel of a join preventing +-- push-down in some cases +-- unable to push {ft1, ft2} +--Testcase 193: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT q.a, ft2.c1 FROM (SELECT 13 FROM ft1 WHERE c1 = 13) q(a) RIGHT JOIN ft2 ON (q.a = ft2.c1) WHERE ft2.c1 BETWEEN 10 AND 15; + QUERY PLAN +------------------------------------------------------------------------------------------ + Nested Loop Left Join + Output: (13), ft2.c1 + Join Filter: (13 = ft2.c1) + -> Foreign Scan on public.ft2 + Output: ft2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("C 1" >= 10)) AND (("C 1" <= 15)) + -> Materialize + Output: (13) + -> Foreign Scan on public.ft1 + Output: 13 + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 13)) +(11 rows) + +--Testcase 194: +SELECT q.a, ft2.c1 FROM (SELECT 13 FROM ft1 WHERE c1 = 13) q(a) RIGHT JOIN ft2 ON (q.a = ft2.c1) WHERE ft2.c1 BETWEEN 10 AND 15; + a | c1 +----+---- + | 10 + | 11 + | 12 + 13 | 13 + | 14 + | 15 +(6 rows) + +-- ok to push {ft1, ft2} but not {ft1, ft2, ft4} +--Testcase 195: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ft4.c1, q.* FROM ft4 LEFT JOIN (SELECT 13, ft1.c1, ft2.c1 FROM ft1 RIGHT JOIN ft2 ON (ft1.c1 = ft2.c1) WHERE ft1.c1 = 12) q(a, b, c) ON (ft4.c1 = q.b) WHERE ft4.c1 BETWEEN 10 AND 15; + QUERY PLAN +--------------------------------------------------------------------------------------------- + Hash Right Join + Output: ft4.c1, (13), ft1.c1, ft2.c1 + Hash Cond: (ft1.c1 = ft4.c1) + -> Nested Loop + Output: ft1.c1, ft2.c1, 13 + -> Foreign Scan on public.ft1 + Output: ft1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("C 1" = 12)) + -> Materialize + Output: ft2.c1 + -> Foreign Scan on public.ft2 + Output: ft2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("C 1" = 12)) + -> Hash + Output: ft4.c1 + -> Foreign Scan on public.ft4 + Output: ft4.c1 + InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 10)) AND (("c1" <= 15)) +(18 rows) + +--Testcase 196: +SELECT ft4.c1, q.* FROM ft4 LEFT JOIN (SELECT 13, ft1.c1, ft2.c1 FROM ft1 RIGHT JOIN ft2 ON (ft1.c1 = ft2.c1) WHERE ft1.c1 = 12) q(a, b, c) ON (ft4.c1 = q.b) WHERE ft4.c1 BETWEEN 10 AND 15 ORDER BY ft4.c1; + c1 | a | b | c +----+----+----+---- + 10 | | | + 12 | 13 | 12 | 12 + 14 | | | +(3 rows) + +-- join with nullable side with some columns with null values +-- influxdb_fdw does not support UPDATE +-- UPDATE ft5 SET c3 = null where c1 % 9 = 0; +--Testcase 197: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ft5, ft5.c1, ft5.c2, ft5.c3, ft4.c1, ft4.c2 FROM ft5 left join ft4 on ft5.c1 = ft4.c1 WHERE ft4.c1 BETWEEN 10 and 30 ORDER BY ft5.c1, ft4.c1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------- + Sort + Output: ft5.*, ft5.c1, ft5.c2, ft5.c3, ft4.c1, ft4.c2 + Sort Key: ft5.c1 + -> Hash Join + Output: ft5.*, ft5.c1, ft5.c2, ft5.c3, ft4.c1, ft4.c2 + Hash Cond: (ft5.c1 = ft4.c1) + -> Foreign Scan on public.ft5 + Output: ft5.*, ft5.c1, ft5.c2, ft5.c3 + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" + -> Hash + Output: ft4.c1, ft4.c2 + -> Foreign Scan on public.ft4 + Output: ft4.c1, ft4.c2 + InfluxDB query: SELECT "c1", "c2" FROM "T3" WHERE (("c1" >= 10)) AND (("c1" <= 30)) +(14 rows) + +--Testcase 198: +SELECT ft5, ft5.c1, ft5.c2, ft5.c3, ft4.c1, ft4.c2 FROM ft5 left join ft4 on ft5.c1 = ft4.c1 WHERE ft4.c1 BETWEEN 10 and 30 ORDER BY ft5.c1, ft4.c1; + ft5 | c1 | c2 | c3 | c1 | c2 +----------------+----+----+--------+----+---- + (12,13,AAA012) | 12 | 13 | AAA012 | 12 | 13 + (18,19,AAA018) | 18 | 19 | AAA018 | 18 | 19 + (24,25,AAA024) | 24 | 25 | AAA024 | 24 | 25 + (30,31,AAA030) | 30 | 31 | AAA030 | 30 | 31 +(4 rows) + +-- multi-way join involving multiple merge joins +-- (this case used to have EPQ-related planning problems) +--Testcase 199: +CREATE FOREIGN TABLE local_tbl (c1 int NOT NULL, c2 int NOT NULL, c3 text) SERVER influxdb_svr OPTIONS (table 'local_tbl'); +--Testcase 200: +INSERT INTO local_tbl SELECT id, id % 10, to_char(id, 'FM0000') FROM generate_series(1, 1000) id; +--ANALYZE local_tbl; +--Testcase 201: +SET enable_nestloop TO false; +--Testcase 202: +SET enable_hashjoin TO false; +--Testcase 203: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE ft1.c1 = ft2.c1 AND ft1.c2 = ft4.c1 + AND ft1.c2 = ft5.c1 AND ft1.c2 = local_tbl.c1 AND ft1.c1 < 100 AND ft2.c1 < 100 ORDER BY ft1.c1 FOR UPDATE; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + LockRows + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft4.c1, ft4.c2, ft4.c3, ft5.c1, ft5.c2, ft5.c3, local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* + -> Sort + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft4.c1, ft4.c2, ft4.c3, ft5.c1, ft5.c2, ft5.c3, local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* + Sort Key: ft1.c1 + -> Merge Join + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft4.c1, ft4.c2, ft4.c3, ft5.c1, ft5.c2, ft5.c3, local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* + Merge Cond: (ft1.c2 = local_tbl.c1) + -> Merge Join + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.*, ft4.c1, ft4.c2, ft4.c3, ft4.*, ft5.c1, ft5.c2, ft5.c3, ft5.* + Merge Cond: (ft1.c2 = ft5.c1) + -> Merge Join + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.*, ft4.c1, ft4.c2, ft4.c3, ft4.* + Merge Cond: (ft1.c2 = ft4.c1) + -> Sort + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.* + Sort Key: ft1.c2 + -> Merge Join + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.* + Merge Cond: (ft1.c1 = ft2.c1) + -> Sort + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.* + Sort Key: ft1.c1 + -> Foreign Scan on public.ft1 + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" < 100)) + -> Sort + Output: ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.* + Sort Key: ft2.c1 + -> Foreign Scan on public.ft2 + Output: ft2.c1, ft2.c2, ft2.c3, ft2."time", ft2.c6, ft2.c7, ft2.c8, ft2.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" < 100)) + -> Sort + Output: ft4.c1, ft4.c2, ft4.c3, ft4.* + Sort Key: ft4.c1 + -> Foreign Scan on public.ft4 + Output: ft4.c1, ft4.c2, ft4.c3, ft4.* + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" + -> Sort + Output: ft5.c1, ft5.c2, ft5.c3, ft5.* + Sort Key: ft5.c1 + -> Foreign Scan on public.ft5 + Output: ft5.c1, ft5.c2, ft5.c3, ft5.* + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" + -> Sort + Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, local_tbl.* + Sort Key: local_tbl.c1 + -> Foreign Scan on public.local_tbl + Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, local_tbl.* + InfluxDB query: SELECT "c1", "c2", "c3" FROM "local_tbl" +(50 rows) + +--Testcase 204: +SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE ft1.c1 = ft2.c1 AND ft1.c2 = ft4.c1 + AND ft1.c2 = ft5.c1 AND ft1.c2 = local_tbl.c1 AND ft1.c1 < 100 AND ft2.c1 < 100 ORDER BY ft1.c1 FOR UPDATE; + c1 | c2 | c3 | time | c6 | c7 | c8 | c1 | c2 | c3 | time | c6 | c7 | c8 | c1 | c2 | c3 | c1 | c2 | c3 | c1 | c2 | c3 +----+----+-------+--------------------------+----+------------+-----+----+----+-------+--------------------------+----+------------+-----+----+----+--------+----+----+--------+----+----+------ + 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 + 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 + 26 | 6 | 00026 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 26 | 6 | 00026 | Tue Jan 27 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 + 36 | 6 | 00036 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 36 | 6 | 00036 | Fri Feb 06 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 + 46 | 6 | 00046 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 46 | 6 | 00046 | Mon Feb 16 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 + 56 | 6 | 00056 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 56 | 6 | 00056 | Thu Feb 26 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 + 66 | 6 | 00066 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 66 | 6 | 00066 | Sun Mar 08 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 + 76 | 6 | 00076 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 76 | 6 | 00076 | Wed Mar 18 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 + 86 | 6 | 00086 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 86 | 6 | 00086 | Sat Mar 28 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 + 96 | 6 | 00096 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 96 | 6 | 00096 | Tue Apr 07 00:00:00 1970 | 6 | 6 | foo | 6 | 7 | AAA006 | 6 | 7 | AAA006 | 6 | 6 | 0006 +(10 rows) + +--Testcase 205: +RESET enable_nestloop; +--Testcase 206: +RESET enable_hashjoin; +-- test that add_paths_with_pathkeys_for_rel() arranges for the epq_path to +-- return columns needed by the parent ForeignScan node +--Testcase 825: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl LEFT JOIN (SELECT ft1.*, COALESCE(ft1.c3 || ft2.c3, 'foobar') FROM ft1 INNER JOIN ft2 ON (ft1.c1 = ft2.c1 AND ft1.c1 < 100)) ss ON (local_tbl.c1 = ss.c1) ORDER BY local_tbl.c1 FOR UPDATE OF local_tbl; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + LockRows + Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, (COALESCE((ft1.c3 || ft2.c3), 'foobar'::text)), local_tbl.*, ft1.*, ft2.* + -> Merge Left Join + Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, (COALESCE((ft1.c3 || ft2.c3), 'foobar'::text)), local_tbl.*, ft1.*, ft2.* + Merge Cond: (local_tbl.c1 = ft1.c1) + -> Sort + Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, local_tbl.* + Sort Key: local_tbl.c1 + -> Foreign Scan on public.local_tbl + Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, local_tbl.* + InfluxDB query: SELECT "c1", "c2", "c3" FROM "local_tbl" + -> Sort + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.*, (COALESCE((ft1.c3 || ft2.c3), 'foobar'::text)) + Sort Key: ft1.c1 + -> Hash Join + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.*, COALESCE((ft1.c3 || ft2.c3), 'foobar'::text) + Hash Cond: (ft2.c1 = ft1.c1) + -> Foreign Scan on public.ft2 + Output: ft2.*, ft2.c1, ft2.c3 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" + -> Hash + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.* + -> Foreign Scan on public.ft1 + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" < 100)) +(25 rows) + +-- ALTER SERVER loopback OPTIONS (DROP extensions); +-- ALTER SERVER loopback OPTIONS (ADD fdw_startup_cost '10000.0'); +--Testcase 826: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl LEFT JOIN (SELECT ft1.* FROM ft1 INNER JOIN ft2 ON (ft1.c1 = ft2.c1 AND ft1.c1 < 100 AND ft1.c1 = influxdb_fdw_abs(ft2.c2))) ss ON (local_tbl.c3 = ss.c3) ORDER BY local_tbl.c1 FOR UPDATE OF local_tbl; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------- + LockRows + Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, local_tbl.*, ft1.*, ft2.* + -> Sort + Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, local_tbl.*, ft1.*, ft2.* + Sort Key: local_tbl.c1 + -> Nested Loop Left Join + Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, local_tbl.*, ft1.*, ft2.* + Join Filter: (local_tbl.c3 = ft1.c3) + -> Foreign Scan on public.local_tbl + Output: local_tbl.c1, local_tbl.c2, local_tbl.c3, local_tbl.* + InfluxDB query: SELECT "c1", "c2", "c3" FROM "local_tbl" + -> Materialize + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.* + -> Merge Join + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.*, ft2.* + Merge Cond: ((ft1.c1 = (influxdb_fdw_abs(ft2.c2))) AND (ft1.c1 = ft2.c1)) + -> Sort + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.* + Sort Key: ft1.c1 + -> Foreign Scan on public.ft1 + Output: ft1.c1, ft1.c2, ft1.c3, ft1."time", ft1.c6, ft1.c7, ft1.c8, ft1.* + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" < 100)) + -> Sort + Output: ft2.*, ft2.c1, ft2.c2, (influxdb_fdw_abs(ft2.c2)) + Sort Key: (influxdb_fdw_abs(ft2.c2)), ft2.c1 + -> Foreign Scan on public.ft2 + Output: ft2.*, ft2.c1, ft2.c2, influxdb_fdw_abs(ft2.c2) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(28 rows) + +-- ALTER SERVER loopback OPTIONS (DROP fdw_startup_cost); +-- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); +--Testcase 207: +DELETE FROM local_tbl; +--Testcase 783: +DROP FOREIGN TABLE local_tbl; +-- check join pushdown in situations where multiple userids are involved +--Testcase 208: +CREATE ROLE regress_view_owner SUPERUSER; +--Testcase 209: +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +GRANT SELECT ON ft4 TO regress_view_owner; +GRANT SELECT ON ft5 TO regress_view_owner; +--Testcase 210: +CREATE VIEW v4 AS SELECT * FROM ft4; +--Testcase 211: +CREATE VIEW v5 AS SELECT * FROM ft5; +--Testcase 212: +ALTER VIEW v5 OWNER TO regress_view_owner; +--Testcase 213: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can't be pushed down, different view owners + QUERY PLAN +----------------------------------------------------------------------- + Limit + Output: ft4.c1, ft5.c2, ft5.c1 + -> Incremental Sort + Output: ft4.c1, ft5.c2, ft5.c1 + Sort Key: ft4.c1, ft5.c1 + Presorted Key: ft4.c1 + -> Merge Left Join + Output: ft4.c1, ft5.c2, ft5.c1 + Merge Cond: (ft4.c1 = ft5.c1) + -> Sort + Output: ft4.c1 + Sort Key: ft4.c1 + -> Foreign Scan on public.ft4 + Output: ft4.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: ft5.c2, ft5.c1 + Sort Key: ft5.c1 + -> Foreign Scan on public.ft5 + Output: ft5.c2, ft5.c1 + InfluxDB query: SELECT "c1", "c2" FROM "T4" +(21 rows) + +--Testcase 214: +SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; + c1 | c2 +----+---- + 22 | + 24 | 25 + 26 | + 28 | + 30 | 31 + 32 | + 34 | + 36 | 37 + 38 | + 40 | +(10 rows) + +--Testcase 215: +ALTER VIEW v4 OWNER TO regress_view_owner; +--Testcase 216: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can be pushed down + QUERY PLAN +----------------------------------------------------------------------- + Limit + Output: ft4.c1, ft5.c2, ft5.c1 + -> Incremental Sort + Output: ft4.c1, ft5.c2, ft5.c1 + Sort Key: ft4.c1, ft5.c1 + Presorted Key: ft4.c1 + -> Merge Left Join + Output: ft4.c1, ft5.c2, ft5.c1 + Merge Cond: (ft4.c1 = ft5.c1) + -> Sort + Output: ft4.c1 + Sort Key: ft4.c1 + -> Foreign Scan on public.ft4 + Output: ft4.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: ft5.c2, ft5.c1 + Sort Key: ft5.c1 + -> Foreign Scan on public.ft5 + Output: ft5.c2, ft5.c1 + InfluxDB query: SELECT "c1", "c2" FROM "T4" +(21 rows) + +--Testcase 217: +SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; + c1 | c2 +----+---- + 22 | + 24 | 25 + 26 | + 28 | + 30 | 31 + 32 | + 34 | + 36 | 37 + 38 | + 40 | +(10 rows) + +--Testcase 218: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can't be pushed down, view owner not current user + QUERY PLAN +----------------------------------------------------------------------- + Limit + Output: ft4.c1, t2.c2, t2.c1 + -> Incremental Sort + Output: ft4.c1, t2.c2, t2.c1 + Sort Key: ft4.c1, t2.c1 + Presorted Key: ft4.c1 + -> Merge Left Join + Output: ft4.c1, t2.c2, t2.c1 + Merge Cond: (ft4.c1 = t2.c1) + -> Sort + Output: ft4.c1 + Sort Key: ft4.c1 + -> Foreign Scan on public.ft4 + Output: ft4.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: t2.c2, t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft5 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "c1", "c2" FROM "T4" +(21 rows) + +--Testcase 219: +SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; + c1 | c2 +----+---- + 22 | + 24 | 25 + 26 | + 28 | + 30 | 31 + 32 | + 34 | + 36 | 37 + 38 | + 40 | +(10 rows) + +--Testcase 220: +ALTER VIEW v4 OWNER TO CURRENT_USER; +--Testcase 221: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can be pushed down + QUERY PLAN +----------------------------------------------------------------------- + Limit + Output: ft4.c1, t2.c2, t2.c1 + -> Incremental Sort + Output: ft4.c1, t2.c2, t2.c1 + Sort Key: ft4.c1, t2.c1 + Presorted Key: ft4.c1 + -> Merge Left Join + Output: ft4.c1, t2.c2, t2.c1 + Merge Cond: (ft4.c1 = t2.c1) + -> Sort + Output: ft4.c1 + Sort Key: ft4.c1 + -> Foreign Scan on public.ft4 + Output: ft4.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: t2.c2, t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft5 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "c1", "c2" FROM "T4" +(21 rows) + +--Testcase 222: +SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; + c1 | c2 +----+---- + 22 | + 24 | 25 + 26 | + 28 | + 30 | 31 + 32 | + 34 | + 36 | 37 + 38 | + 40 | +(10 rows) + +--Testcase 223: +ALTER VIEW v4 OWNER TO regress_view_owner; +-- cleanup +--Testcase 224: +DROP OWNED BY regress_view_owner; +--Testcase 225: +DROP ROLE regress_view_owner; +-- =================================================================== +-- Aggregate and grouping queries +-- =================================================================== +-- Simple aggregates +--Testcase 226: +explain (verbose, costs off) +select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------- + Result + Output: (count(c6)), (sum(c1)), (avg(c1)), (min(c2)), (max(c1)), (stddev(c2)), ((sum(c1)) * ((random() <= '1'::double precision))::integer), c2 + -> Sort + Output: (count(c6)), (sum(c1)), (avg(c1)), (min(c2)), (max(c1)), (stddev(c2)), c2 + Sort Key: (count(ft1.c6)), (sum(ft1.c1)) + -> HashAggregate + Output: count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), c2 + Group Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c6, c1, c2 + InfluxDB query: SELECT "C 1", "c2", "c6" FROM "T1" WHERE (("c2" < 5)) +(11 rows) + +--Testcase 227: +select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2; + count | sum | avg | min | max | stddev | sum2 +-------+-------+----------------------+-----+------+--------+------- + 100 | 49600 | 496.0000000000000000 | 1 | 991 | 0 | 49600 + 100 | 49700 | 497.0000000000000000 | 2 | 992 | 0 | 49700 + 100 | 49800 | 498.0000000000000000 | 3 | 993 | 0 | 49800 + 100 | 49900 | 499.0000000000000000 | 4 | 994 | 0 | 49900 + 100 | 50500 | 505.0000000000000000 | 0 | 1000 | 0 | 50500 +(5 rows) + +--Testcase 228: +explain (verbose, costs off) +select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2 limit 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (count(c6)), (sum(c1)), (avg(c1)), (min(c2)), (max(c1)), (stddev(c2)), (((sum(c1)) * ((random() <= '1'::double precision))::integer)), c2 + -> Result + Output: (count(c6)), (sum(c1)), (avg(c1)), (min(c2)), (max(c1)), (stddev(c2)), ((sum(c1)) * ((random() <= '1'::double precision))::integer), c2 + -> Sort + Output: (count(c6)), (sum(c1)), (avg(c1)), (min(c2)), (max(c1)), (stddev(c2)), c2 + Sort Key: (count(ft1.c6)), (sum(ft1.c1)) + -> HashAggregate + Output: count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), c2 + Group Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c6, c1, c2 + InfluxDB query: SELECT "C 1", "c2", "c6" FROM "T1" WHERE (("c2" < 5)) +(13 rows) + +--Testcase 229: +select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2 limit 1; + count | sum | avg | min | max | stddev | sum2 +-------+-------+----------------------+-----+-----+--------+------- + 100 | 49600 | 496.0000000000000000 | 1 | 991 | 0 | 49600 +(1 row) + +-- Aggregate is not pushed down as aggregation contains random() +--Testcase 230: +explain (verbose, costs off) +select sum(c1 * (random() <= 1)::int) as sum, avg(c1) from ft1; + QUERY PLAN +------------------------------------------------------------------------------- + Aggregate + Output: sum((c1 * ((random() <= '1'::double precision))::integer)), avg(c1) + -> Foreign Scan on public.ft1 + Output: c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(5 rows) + +-- Aggregate over join query +--Testcase 231: +explain (verbose, costs off) +select count(*), sum(t1.c1), avg(t2.c1) from ft1 t1 inner join ft1 t2 on (t1.c2 = t2.c2) where t1.c2 = 6; + QUERY PLAN +------------------------------------------------------------------------------------- + Aggregate + Output: count(*), sum(t1.c1), avg(t2.c1) + -> Nested Loop + Output: t1.c1, t2.c1 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" = 6)) + -> Materialize + Output: t2.c1, t2.c2 + -> Foreign Scan on public.ft1 t2 + Output: t2.c1, t2.c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" = 6)) +(12 rows) + +--Testcase 232: +select count(*), sum(t1.c1), avg(t2.c1) from ft1 t1 inner join ft1 t2 on (t1.c2 = t2.c2) where t1.c2 = 6; + count | sum | avg +-------+---------+---------------------- + 10000 | 5010000 | 501.0000000000000000 +(1 row) + +-- Not pushed down due to local conditions present in underneath input rel +--Testcase 233: +explain (verbose, costs off) +select sum(t1.c1), count(t2.c1) from ft1 t1 inner join ft2 t2 on (t1.c1 = t2.c1) where ((t1.c1 * t2.c1)/(t1.c1 * t2.c1)) * random() <= 1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: sum(t1.c1), count(t2.c1) + -> Merge Join + Output: t1.c1, t2.c1 + Merge Cond: (t1.c1 = t2.c1) + Join Filter: (((((t1.c1 * t2.c1) / (t1.c1 * t2.c1)))::double precision * random()) <= '1'::double precision) + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft1 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(18 rows) + +-- GROUP BY clause having expressions +--Testcase 234: +explain (verbose, costs off) +select c2/2, sum(c2) * (c2/2) from ft1 group by c2/2 order by c2/2; + QUERY PLAN +----------------------------------------------------- + Sort + Output: ((c2 / 2)), ((sum(c2) * ((c2 / 2)))) + Sort Key: ((ft1.c2 / 2)) + -> HashAggregate + Output: ((c2 / 2)), (sum(c2) * ((c2 / 2))) + Group Key: (ft1.c2 / 2) + -> Foreign Scan on public.ft1 + Output: (c2 / 2), c2 + InfluxDB query: SELECT "c2" FROM "T1" +(9 rows) + +--Testcase 235: +select c2/2, sum(c2) * (c2/2) from ft1 group by c2/2 order by c2/2; + ?column? | ?column? +----------+---------- + 0 | 0 + 1 | 500 + 2 | 1800 + 3 | 3900 + 4 | 6800 +(5 rows) + +-- Aggregates in subquery are pushed down. +--Testcase 236: +explain (verbose, costs off) +select count(x.a), sum(x.a) from (select c2 a, sum(c1) b from ft1 group by c2, sqrt(c1) order by 1, 2) x; + QUERY PLAN +------------------------------------------------------------------------------- + Aggregate + Output: count(ft1.c2), sum(ft1.c2) + -> Sort + Output: ft1.c2, (sum(ft1.c1)), (sqrt((ft1.c1)::double precision)) + Sort Key: ft1.c2, (sum(ft1.c1)) + -> HashAggregate + Output: ft1.c2, sum(ft1.c1), (sqrt((ft1.c1)::double precision)) + Group Key: ft1.c2, sqrt((ft1.c1)::double precision) + -> Foreign Scan on public.ft1 + Output: ft1.c2, sqrt((ft1.c1)::double precision), ft1.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" +(11 rows) + +--Testcase 237: +select count(x.a), sum(x.a) from (select c2 a, sum(c1) b from ft1 group by c2, sqrt(c1) order by 1, 2) x; + count | sum +-------+------ + 1000 | 4500 +(1 row) + +-- Aggregate is still pushed down by taking unshippable expression out +--Testcase 238: +explain (verbose, costs off) +select c2 * (random() <= 1)::int as sum1, sum(c1) * c2 as sum2 from ft1 group by c2 order by 1, 2; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Sort + Output: ((c2 * ((random() <= '1'::double precision))::integer)), ((sum(c1) * c2)), c2 + Sort Key: ((ft1.c2 * ((random() <= '1'::double precision))::integer)), ((sum(ft1.c1) * ft1.c2)) + -> HashAggregate + Output: (c2 * ((random() <= '1'::double precision))::integer), (sum(c1) * c2), c2 + Group Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c2, c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" +(9 rows) + +--Testcase 239: +select c2 * (random() <= 1)::int as sum1, sum(c1) * c2 as sum2 from ft1 group by c2 order by 1, 2; + sum1 | sum2 +------+-------- + 0 | 0 + 1 | 49600 + 2 | 99400 + 3 | 149400 + 4 | 199600 + 5 | 250000 + 6 | 300600 + 7 | 351400 + 8 | 402400 + 9 | 453600 +(10 rows) + +-- Aggregate with unshippable GROUP BY clause are not pushed +--Testcase 240: +explain (verbose, costs off) +select c2 * (random() <= 1)::int as c2 from ft2 group by c2 * (random() <= 1)::int order by 1; + QUERY PLAN +------------------------------------------------------------------------------ + Sort + Output: ((c2 * ((random() <= '1'::double precision))::integer)) + Sort Key: ((ft2.c2 * ((random() <= '1'::double precision))::integer)) + -> HashAggregate + Output: ((c2 * ((random() <= '1'::double precision))::integer)) + Group Key: (ft2.c2 * ((random() <= '1'::double precision))::integer) + -> Foreign Scan on public.ft2 + Output: (c2 * ((random() <= '1'::double precision))::integer) + InfluxDB query: SELECT "c2" FROM "T1" +(9 rows) + +-- GROUP BY clause in various forms, cardinal, alias and constant expression +--Testcase 241: +explain (verbose, costs off) +select count(c2) w, c2 x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; + QUERY PLAN +----------------------------------------------------- + Sort + Output: (count(c2)), c2, 5, 7.0, 9 + Sort Key: ft1.c2 + -> HashAggregate + Output: count(c2), c2, (5), 7.0, (9) + Group Key: ft1.c2, 5, 9 + -> Foreign Scan on public.ft1 + Output: c2, 5, 9 + InfluxDB query: SELECT "c2" FROM "T1" +(9 rows) + +--Testcase 242: +select count(c2) w, c2 x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; + w | x | y | z +-----+---+---+----- + 100 | 0 | 5 | 7.0 + 100 | 1 | 5 | 7.0 + 100 | 2 | 5 | 7.0 + 100 | 3 | 5 | 7.0 + 100 | 4 | 5 | 7.0 + 100 | 5 | 5 | 7.0 + 100 | 6 | 5 | 7.0 + 100 | 7 | 5 | 7.0 + 100 | 8 | 5 | 7.0 + 100 | 9 | 5 | 7.0 +(10 rows) + +-- GROUP BY clause referring to same column multiple times +-- Also, ORDER BY contains an aggregate function +--Testcase 243: +explain (verbose, costs off) +select c2, c2 from ft1 where c2 > 6 group by 1, 2 order by sum(c1); + QUERY PLAN +------------------------------------------------------------------------------- + Sort + Output: c2, c2, (sum(c1)) + Sort Key: (sum(ft1.c1)) + -> HashAggregate + Output: c2, c2, sum(c1) + Group Key: ft1.c2, ft1.c2 + -> Foreign Scan on public.ft1 + Output: c2, c2, c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" > 6)) +(9 rows) + +--Testcase 244: +select c2, c2 from ft1 where c2 > 6 group by 1, 2 order by sum(c1); + c2 | c2 +----+---- + 7 | 7 + 8 | 8 + 9 | 9 +(3 rows) + +-- Testing HAVING clause shippability +--Testcase 245: +explain (verbose, costs off) +select c2, sum(c1) from ft2 group by c2 having avg(c1) < 500 and sum(c1) < 49800 order by c2; + QUERY PLAN +---------------------------------------------------------------------------- + Sort + Output: c2, (sum(c1)) + Sort Key: ft2.c2 + -> HashAggregate + Output: c2, sum(c1) + Group Key: ft2.c2 + Filter: ((avg(ft2.c1) < '500'::numeric) AND (sum(ft2.c1) < 49800)) + -> Foreign Scan on public.ft2 + Output: c2, c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" +(10 rows) + +--Testcase 246: +select c2, sum(c1) from ft2 group by c2 having avg(c1) < 500 and sum(c1) < 49800 order by c2; + c2 | sum +----+------- + 1 | 49600 + 2 | 49700 +(2 rows) + +-- Unshippable HAVING clause will be evaluated locally, and other qual in HAVING clause is pushed down +--Testcase 247: +explain (verbose, costs off) +select count(*) from (select time, count(c1) from ft1 group by time, sqrt(c2) having (avg(c1) / avg(c1)) * random() <= 1 and avg(c1) < 500) x; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: count(*) + -> HashAggregate + Output: ft1."time", NULL::bigint, (sqrt((ft1.c2)::double precision)) + Group Key: ft1."time", sqrt((ft1.c2)::double precision) + Filter: ((avg(ft1.c1) < '500'::numeric) AND ((((avg(ft1.c1) / avg(ft1.c1)))::double precision * random()) <= '1'::double precision)) + -> Foreign Scan on public.ft1 + Output: ft1."time", sqrt((ft1.c2)::double precision), ft1.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" +(9 rows) + +--Testcase 248: +select count(*) from (select time, count(c1) from ft1 group by time, sqrt(c2) having (avg(c1) / avg(c1)) * random() <= 1 and avg(c1) < 500) x; + count +------- + 49 +(1 row) + +-- Aggregate in HAVING clause is not pushable, and thus aggregation is not pushed down +--Testcase 249: +explain (verbose, costs off) +select sum(c1) from ft1 group by c2 having avg(c1 * (random() <= 1)::int) > 100 order by 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Sort + Output: (sum(c1)), c2 + Sort Key: (sum(ft1.c1)) + -> HashAggregate + Output: sum(c1), c2 + Group Key: ft1.c2 + Filter: (avg((ft1.c1 * ((random() <= '1'::double precision))::integer)) > '100'::numeric) + -> Foreign Scan on public.ft1 + Output: c1, c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" +(10 rows) + +-- Remote aggregate in combination with a local Param (for the output +-- of an initplan) can be trouble, per bug #15781 +--Testcase 250: +explain (verbose, costs off) +select exists(select 1 from pg_enum), sum(c1) from ft1; + QUERY PLAN +----------------------------------------------- + Foreign Scan + Output: $0, (sum(ft1.c1)) + InfluxDB query: SELECT sum("C 1") FROM "T1" + InitPlan 1 (returns $0) + -> Seq Scan on pg_catalog.pg_enum +(5 rows) + +--Testcase 251: +select exists(select 1 from pg_enum), sum(c1) from ft1; + exists | sum +--------+-------- + t | 500500 +(1 row) + +--Testcase 252: +explain (verbose, costs off) +select exists(select 1 from pg_enum), sum(c1) from ft1 group by 1; + QUERY PLAN +------------------------------------------------ + GroupAggregate + Output: ($0), sum(ft1.c1) + Group Key: $0 + InitPlan 1 (returns $0) + -> Seq Scan on pg_catalog.pg_enum + -> Foreign Scan on public.ft1 + Output: $0, ft1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(8 rows) + +--Testcase 253: +select exists(select 1 from pg_enum), sum(c1) from ft1 group by 1; + exists | sum +--------+-------- + t | 500500 +(1 row) + +-- Testing ORDER BY, DISTINCT, FILTER, Ordered-sets and VARIADIC within aggregates +-- ORDER BY within aggregate, same column used to order +--Testcase 254: +explain (verbose, costs off) +select array_agg(c1 order by c1) from ft1 where c1 < 100 group by c2 order by 1; + QUERY PLAN +---------------------------------------------------------------------------------------- + Sort + Output: (array_agg(c1 ORDER BY c1)), c2 + Sort Key: (array_agg(ft1.c1 ORDER BY ft1.c1)) + -> GroupAggregate + Output: array_agg(c1 ORDER BY c1), c2 + Group Key: ft1.c2 + -> Sort + Output: c2, c1 + Sort Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c2, c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" < 100)) +(12 rows) + +--Testcase 255: +select array_agg(c1 order by c1) from ft1 where c1 < 100 group by c2 order by 1; + array_agg +-------------------------------- + {1,11,21,31,41,51,61,71,81,91} + {2,12,22,32,42,52,62,72,82,92} + {3,13,23,33,43,53,63,73,83,93} + {4,14,24,34,44,54,64,74,84,94} + {5,15,25,35,45,55,65,75,85,95} + {6,16,26,36,46,56,66,76,86,96} + {7,17,27,37,47,57,67,77,87,97} + {8,18,28,38,48,58,68,78,88,98} + {9,19,29,39,49,59,69,79,89,99} + {10,20,30,40,50,60,70,80,90} +(10 rows) + +-- ORDER BY within aggregate, different column used to order also using DESC +--Testcase 256: +explain (verbose, costs off) +select array_agg(time order by c1 desc) from ft2 where c2 = 6 and c1 < 50; + QUERY PLAN +-------------------------------------------------------------------------------------- + Aggregate + Output: array_agg("time" ORDER BY c1 DESC) + -> Foreign Scan on public.ft2 + Output: "time", c1 + InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("C 1" < 50)) AND (("c2" = 6)) +(5 rows) + +--Testcase 257: +select array_agg(time order by c1 desc) from ft2 where c2 = 6 and c1 < 50; + array_agg +------------------------------------------------------------------------------------------------------------------------------------------ + {"Mon Feb 16 00:00:00 1970","Fri Feb 06 00:00:00 1970","Tue Jan 27 00:00:00 1970","Sat Jan 17 00:00:00 1970","Wed Jan 07 00:00:00 1970"} +(1 row) + +-- DISTINCT within aggregate +--Testcase 258: +explain (verbose, costs off) +select array_agg(distinct (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; + QUERY PLAN +--------------------------------------------------------------------------------- + Sort + Output: (array_agg(DISTINCT (t1.c1 % 5))), ((t2.c1 % 3)) + Sort Key: (array_agg(DISTINCT (t1.c1 % 5))) + -> GroupAggregate + Output: array_agg(DISTINCT (t1.c1 % 5)), ((t2.c1 % 3)) + Group Key: ((t2.c1 % 3)) + -> Sort + Output: ((t2.c1 % 3)), t1.c1 + Sort Key: ((t2.c1 % 3)) + -> Merge Full Join + Output: (t2.c1 % 3), t1.c1 + Merge Cond: (t1.c1 = t2.c1) + Filter: ((t1.c1 < 20) OR ((t1.c1 IS NULL) AND (t2.c1 < 5))) + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft4 t1 + Output: t1.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft5 t2 + Output: t2.c1 + InfluxDB query: SELECT "c1" FROM "T4" +(25 rows) + +--Testcase 259: +select array_agg(distinct (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; + array_agg +-------------- + {0,1,2,3,4} + {1,2,3,NULL} +(2 rows) + +-- DISTINCT combined with ORDER BY within aggregate +--Testcase 260: +explain (verbose, costs off) +select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------- + Sort + Output: (array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5))), ((t2.c1 % 3)) + Sort Key: (array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5))) + -> GroupAggregate + Output: array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5)), ((t2.c1 % 3)) + Group Key: ((t2.c1 % 3)) + -> Sort + Output: ((t2.c1 % 3)), t1.c1 + Sort Key: ((t2.c1 % 3)) + -> Merge Full Join + Output: (t2.c1 % 3), t1.c1 + Merge Cond: (t1.c1 = t2.c1) + Filter: ((t1.c1 < 20) OR ((t1.c1 IS NULL) AND (t2.c1 < 5))) + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft4 t1 + Output: t1.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft5 t2 + Output: t2.c1 + InfluxDB query: SELECT "c1" FROM "T4" +(25 rows) + +--Testcase 261: +select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; + array_agg +-------------- + {0,1,2,3,4} + {1,2,3,NULL} +(2 rows) + +--Testcase 262: +explain (verbose, costs off) +select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5 desc nulls last) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; + QUERY PLAN +----------------------------------------------------------------------------------------------------- + Sort + Output: (array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5) DESC NULLS LAST)), ((t2.c1 % 3)) + Sort Key: (array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5) DESC NULLS LAST)) + -> GroupAggregate + Output: array_agg(DISTINCT (t1.c1 % 5) ORDER BY (t1.c1 % 5) DESC NULLS LAST), ((t2.c1 % 3)) + Group Key: ((t2.c1 % 3)) + -> Sort + Output: ((t2.c1 % 3)), t1.c1 + Sort Key: ((t2.c1 % 3)) + -> Merge Full Join + Output: (t2.c1 % 3), t1.c1 + Merge Cond: (t1.c1 = t2.c1) + Filter: ((t1.c1 < 20) OR ((t1.c1 IS NULL) AND (t2.c1 < 5))) + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft4 t1 + Output: t1.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft5 t2 + Output: t2.c1 + InfluxDB query: SELECT "c1" FROM "T4" +(25 rows) + +--Testcase 263: +select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5 desc nulls last) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; + array_agg +-------------- + {3,2,1,NULL} + {4,3,2,1,0} +(2 rows) + +-- FILTER within aggregate +--Testcase 264: +explain (verbose, costs off) +select sum(c1) filter (where c1 < 100 and c2 > 5) from ft1 group by c2 order by 1 nulls last; + QUERY PLAN +---------------------------------------------------------------------------- + Sort + Output: (sum(c1) FILTER (WHERE ((c1 < 100) AND (c2 > 5)))), c2 + Sort Key: (sum(ft1.c1) FILTER (WHERE ((ft1.c1 < 100) AND (ft1.c2 > 5)))) + -> HashAggregate + Output: sum(c1) FILTER (WHERE ((c1 < 100) AND (c2 > 5))), c2 + Group Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c1, c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" +(9 rows) + +--Testcase 265: +select sum(c1) filter (where c1 < 100 and c2 > 5) from ft1 group by c2 order by 1 nulls last; + sum +----- + 510 + 520 + 530 + 540 + + + + + + +(10 rows) + +-- DISTINCT, ORDER BY and FILTER within aggregate +--Testcase 266: +explain (verbose, costs off) +select sum(c1%3), sum(distinct c1%3 order by c1%3) filter (where c1%3 < 2), c2 from ft1 where c2 = 6 group by c2; + QUERY PLAN +----------------------------------------------------------------------------------------------------- + GroupAggregate + Output: sum((c1 % 3)), sum(DISTINCT (c1 % 3) ORDER BY (c1 % 3)) FILTER (WHERE ((c1 % 3) < 2)), c2 + Group Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c1, c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" = 6)) +(6 rows) + +--Testcase 267: +select sum(c1%3), sum(distinct c1%3 order by c1%3) filter (where c1%3 < 2), c2 from ft1 where c2 = 6 group by c2; + sum | sum | c2 +-----+-----+---- + 99 | 1 | 6 +(1 row) + +-- Outer query is aggregation query +--Testcase 268: +explain (verbose, costs off) +select distinct (select count(*) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------------- + Unique + Output: ((SubPlan 1)) + -> Sort + Output: ((SubPlan 1)) + Sort Key: ((SubPlan 1)) + -> Aggregate + Output: (SubPlan 1) + -> Foreign Scan on public.ft2 t2 + Output: t2.c2, t2.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE ((("c2" % 6) = 0)) + SubPlan 1 + -> Foreign Scan on public.ft1 t1 + Output: count(*) FILTER (WHERE ((t2.c2 = 6) AND (t2.c1 < 10))) + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 6)) +(14 rows) + +--Testcase 269: +select distinct (select count(*) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; + count +------- + 1 +(1 row) + +-- Inner query is aggregation query +--Testcase 270: +explain (verbose, costs off) +select distinct (select count(t1.c1) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------------ + Unique + Output: ((SubPlan 1)) + -> Sort + Output: ((SubPlan 1)) + Sort Key: ((SubPlan 1)) + -> Foreign Scan on public.ft2 t2 + Output: (SubPlan 1) + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE ((("c2" % 6) = 0)) + SubPlan 1 + -> Aggregate + Output: count(t1.c1) FILTER (WHERE ((t2.c2 = 6) AND (t2.c1 < 10))) + -> Foreign Scan on public.ft1 t1 + Output: t1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" WHERE (("C 1" = 6)) +(14 rows) + +--Testcase 271: +select distinct (select count(t1.c1) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; + count +------- + 0 + 1 +(2 rows) + +-- Aggregate not pushed down as FILTER condition is not pushable +--Testcase 272: +explain (verbose, costs off) +select sum(c1) filter (where (c1 / c1) * random() <= 1) from ft1 group by c2 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------ + Sort + Output: (sum(c1) FILTER (WHERE ((((c1 / c1))::double precision * random()) <= '1'::double precision))), c2 + Sort Key: (sum(ft1.c1) FILTER (WHERE ((((ft1.c1 / ft1.c1))::double precision * random()) <= '1'::double precision))) + -> HashAggregate + Output: sum(c1) FILTER (WHERE ((((c1 / c1))::double precision * random()) <= '1'::double precision)), c2 + Group Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c1, c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" +(9 rows) + +--Testcase 273: +explain (verbose, costs off) +select sum(c2) filter (where c2 in (select c2 from ft1 where c2 < 5)) from ft1; + QUERY PLAN +-------------------------------------------------------------------- + Aggregate + Output: sum(ft1.c2) FILTER (WHERE (hashed SubPlan 1)) + -> Foreign Scan on public.ft1 + Output: ft1.c2 + InfluxDB query: SELECT "c2" FROM "T1" + SubPlan 1 + -> Foreign Scan on public.ft1 ft1_1 + Output: ft1_1.c2 + InfluxDB query: SELECT "c2" FROM "T1" WHERE (("c2" < 5)) +(9 rows) + +-- Ordered-sets within aggregate +--Testcase 274: +explain (verbose, costs off) +select c2, rank('10'::varchar) within group (order by c6), percentile_cont(c2/10::numeric) within group (order by c1) from ft1 where c2 < 10 group by c2 having percentile_cont(c2/10::numeric) within group (order by c1) < 500 order by c2; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + GroupAggregate + Output: c2, rank('10'::character varying) WITHIN GROUP (ORDER BY c6), percentile_cont((((c2)::numeric / '10'::numeric))::double precision) WITHIN GROUP (ORDER BY ((c1)::double precision)) + Group Key: ft1.c2 + Filter: (percentile_cont((((ft1.c2)::numeric / '10'::numeric))::double precision) WITHIN GROUP (ORDER BY ((ft1.c1)::double precision)) < '500'::double precision) + -> Sort + Output: c2, c6, c1 + Sort Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c2, c6, c1 + InfluxDB query: SELECT "C 1", "c2", "c6" FROM "T1" WHERE (("c2" < 10)) +(10 rows) + +--Testcase 275: +select c2, rank('10'::varchar) within group (order by c6), percentile_cont(c2/10::numeric) within group (order by c1) from ft1 where c2 < 10 group by c2 having percentile_cont(c2/10::numeric) within group (order by c1) < 500 order by c2; + c2 | rank | percentile_cont +----+------+----------------- + 0 | 101 | 10 + 1 | 101 | 100 + 2 | 1 | 200 + 3 | 1 | 300 + 4 | 1 | 400 +(5 rows) + +-- Using multiple arguments within aggregates +--Testcase 276: +explain (verbose, costs off) +select c1, rank(c1, c2) within group (order by c1, c2) from ft1 group by c1, c2 having c1 = 6 order by 1; + QUERY PLAN +-------------------------------------------------------------------------------- + GroupAggregate + Output: c1, rank(c1, c2) WITHIN GROUP (ORDER BY c1, c2), c2 + Group Key: ft1.c1, ft1.c2 + -> Sort + Output: c1, c2 + Sort Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c1, c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" = 6)) +(9 rows) + +--Testcase 277: +select c1, rank(c1, c2) within group (order by c1, c2) from ft1 group by c1, c2 having c1 = 6 order by 1; + c1 | rank +----+------ + 6 | 1 +(1 row) + +-- User defined function for user defined aggregate, VARIADIC +--Testcase 278: +create function least_accum(anyelement, variadic anyarray) +returns anyelement language sql as + 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; +--Testcase 279: +create aggregate least_agg(variadic items anyarray) ( + stype = anyelement, sfunc = least_accum +); +-- Disable hash aggregation for plan stability. +--Testcase 280: +set enable_hashagg to false; +-- Not pushed down due to user defined aggregate +--Testcase 281: +explain (verbose, costs off) +select c2, least_agg(c1) from ft1 group by c2 order by c2; + QUERY PLAN +------------------------------------------------------------ + GroupAggregate + Output: c2, least_agg(VARIADIC ARRAY[c1]) + Group Key: ft1.c2 + -> Sort + Output: c2, c1 + Sort Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c2, c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" +(9 rows) + +-- Add function and aggregate into extension +--Testcase 282: +alter extension influxdb_fdw add function least_accum(anyelement, variadic anyarray); +--Testcase 283: +alter extension influxdb_fdw add aggregate least_agg(variadic items anyarray); +-- Now aggregate will be pushed. Aggregate will display VARIADIC argument. +--Testcase 284: +explain (verbose, costs off) +select c2, least_agg(c1) from ft1 where c2 < 100 group by c2 order by c2; + QUERY PLAN +--------------------------------------------------------------------------------- + GroupAggregate + Output: c2, least_agg(VARIADIC ARRAY[c1]) + Group Key: ft1.c2 + -> Sort + Output: c2, c1 + Sort Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c2, c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 100)) +(9 rows) + +--Testcase 285: +select c2, least_agg(c1) from ft1 where c2 < 100 group by c2 order by c2; + c2 | least_agg +----+----------- + 0 | 10 + 1 | 1 + 2 | 2 + 3 | 3 + 4 | 4 + 5 | 5 + 6 | 6 + 7 | 7 + 8 | 8 + 9 | 9 +(10 rows) + +-- Remove function and aggregate from extension +--Testcase 286: +alter extension influxdb_fdw drop function least_accum(anyelement, variadic anyarray); +--Testcase 287: +alter extension influxdb_fdw drop aggregate least_agg(variadic items anyarray); +-- Not pushed down as we have dropped objects from extension. +--Testcase 288: +explain (verbose, costs off) +select c2, least_agg(c1) from ft1 group by c2 order by c2; + QUERY PLAN +------------------------------------------------------------ + GroupAggregate + Output: c2, least_agg(VARIADIC ARRAY[c1]) + Group Key: ft1.c2 + -> Sort + Output: c2, c1 + Sort Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c2, c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" +(9 rows) + +-- Cleanup +--Testcase 289: +reset enable_hashagg; +--Testcase 290: +drop aggregate least_agg(variadic items anyarray); +--Testcase 291: +drop function least_accum(anyelement, variadic anyarray); +-- Testing USING OPERATOR() in ORDER BY within aggregate. +-- For this, we need user defined operators along with operator family and +-- operator class. Create those and then add them in extension. Note that +-- user defined objects are considered unshippable unless they are part of +-- the extension. +--Testcase 292: +create operator public.<^ ( + leftarg = int4, + rightarg = int4, + procedure = int4eq +); +--Testcase 293: +create operator public.=^ ( + leftarg = int4, + rightarg = int4, + procedure = int4lt +); +--Testcase 294: +create operator public.>^ ( + leftarg = int4, + rightarg = int4, + procedure = int4gt +); +--Testcase 295: +create operator family my_op_family using btree; +--Testcase 296: +create function my_op_cmp(a int, b int) returns int as + $$begin return btint4cmp(a, b); end $$ language plpgsql; +--Testcase 297: +create operator class my_op_class for type int using btree family my_op_family as + operator 1 public.<^, + operator 3 public.=^, + operator 5 public.>^, + function 1 my_op_cmp(int, int); +-- This will not be pushed as user defined sort operator is not part of the +-- extension yet. +--Testcase 298: +explain (verbose, costs off) +select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; + QUERY PLAN +--------------------------------------------------------------------------------------------- + GroupAggregate + Output: array_agg(c1 ORDER BY c1 USING <^ NULLS LAST), c2 + Group Key: ft2.c2 + -> Foreign Scan on public.ft2 + Output: c1, c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) +(6 rows) + +-- This should not be pushed either. +--Testcase 766: +explain (verbose, costs off) +select * from ft2 order by c1 using operator(public.<^); + QUERY PLAN +------------------------------------------------------------------------------ + Sort + Output: c1, c2, c3, "time", c6, c7, c8 + Sort Key: ft2.c1 USING <^ + -> Foreign Scan on public.ft2 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(6 rows) + +-- Update local stats on ft2 +--ANALYZE ft2; +-- Add into extension +--Testcase 299: +alter extension influxdb_fdw add operator class my_op_class using btree; +--Testcase 300: +alter extension influxdb_fdw add function my_op_cmp(a int, b int); +--Testcase 301: +alter extension influxdb_fdw add operator family my_op_family using btree; +--Testcase 302: +alter extension influxdb_fdw add operator public.<^(int, int); +--Testcase 303: +alter extension influxdb_fdw add operator public.=^(int, int); +--Testcase 304: +alter extension influxdb_fdw add operator public.>^(int, int); +-- Now this will be pushed as sort operator is part of the extension. +--Testcase 305: +explain (verbose, costs off) +select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; + QUERY PLAN +--------------------------------------------------------------------------------------------- + GroupAggregate + Output: array_agg(c1 ORDER BY c1 USING <^ NULLS LAST), c2 + Group Key: ft2.c2 + -> Foreign Scan on public.ft2 + Output: c1, c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) +(6 rows) + +--Testcase 306: +select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; + array_agg +-------------------------------- + {6,16,26,36,46,56,66,76,86,96} +(1 row) + +-- This should be pushed too. +-- Influx not support user-defined operator +--Testcase 767: +explain (verbose, costs off) +select * from ft2 order by c1 using operator(public.<^); + QUERY PLAN +------------------------------------------------------------------------------ + Sort + Output: c1, c2, c3, "time", c6, c7, c8 + Sort Key: ft2.c1 USING <^ + -> Foreign Scan on public.ft2 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(6 rows) + +-- Remove from extension +--Testcase 307: +alter extension influxdb_fdw drop operator class my_op_class using btree; +--Testcase 308: +alter extension influxdb_fdw drop function my_op_cmp(a int, b int); +--Testcase 309: +alter extension influxdb_fdw drop operator family my_op_family using btree; +--Testcase 310: +alter extension influxdb_fdw drop operator public.<^(int, int); +--Testcase 311: +alter extension influxdb_fdw drop operator public.=^(int, int); +--Testcase 312: +alter extension influxdb_fdw drop operator public.>^(int, int); +-- This will not be pushed as sort operator is now removed from the extension. +--Testcase 313: +explain (verbose, costs off) +select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; + QUERY PLAN +--------------------------------------------------------------------------------------------- + GroupAggregate + Output: array_agg(c1 ORDER BY c1 USING <^ NULLS LAST), c2 + Group Key: ft2.c2 + -> Foreign Scan on public.ft2 + Output: c1, c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) +(6 rows) + +-- Cleanup +--Testcase 314: +drop operator class my_op_class using btree; +--Testcase 315: +drop function my_op_cmp(a int, b int); +--Testcase 316: +drop operator family my_op_family using btree; +--Testcase 317: +drop operator public.>^(int, int); +--Testcase 318: +drop operator public.=^(int, int); +--Testcase 319: +drop operator public.<^(int, int); +-- Input relation to aggregate push down hook is not safe to pushdown and thus +-- the aggregate cannot be pushed down to foreign server. +--Testcase 320: +explain (verbose, costs off) +select count(t1.c3) from ft2 t1 left join ft2 t2 on (t1.c1 = random() * t2.c2); + QUERY PLAN +------------------------------------------------------------------------------------------- + Aggregate + Output: count(t1.c3) + -> Nested Loop Left Join + Output: t1.c3 + Join Filter: ((t1.c1)::double precision = (random() * (t2.c2)::double precision)) + -> Foreign Scan on public.ft2 t1 + Output: t1.c3, t1.c1 + InfluxDB query: SELECT "C 1", "c3" FROM "T1" + -> Materialize + Output: t2.c2 + -> Foreign Scan on public.ft2 t2 + Output: t2.c2 + InfluxDB query: SELECT "c2" FROM "T1" +(13 rows) + +-- Subquery in FROM clause having aggregate +--Testcase 321: +explain (verbose, costs off) +select count(*), x.b from ft1, (select c2 a, sum(c1) b from ft1 group by c2) x where ft1.c2 = x.a group by x.b order by 1, 2; + QUERY PLAN +------------------------------------------------------------------------------------ + Sort + Output: (count(*)), x.b + Sort Key: (count(*)), x.b + -> HashAggregate + Output: count(*), x.b + Group Key: x.b + -> Hash Join + Output: x.b + Inner Unique: true + Hash Cond: (ft1.c2 = x.a) + -> Foreign Scan on public.ft1 + Output: ft1.c2 + InfluxDB query: SELECT "c2" FROM "T1" + -> Hash + Output: x.b, x.a + -> Subquery Scan on x + Output: x.b, x.a + -> HashAggregate + Output: ft1_1.c2, sum(ft1_1.c1) + Group Key: ft1_1.c2 + -> Foreign Scan on public.ft1 ft1_1 + Output: ft1_1.c2, ft1_1.c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" +(23 rows) + +--Testcase 322: +select count(*), x.b from ft1, (select c2 a, sum(c1) b from ft1 group by c2) x where ft1.c2 = x.a group by x.b order by 1, 2; + count | b +-------+------- + 100 | 49600 + 100 | 49700 + 100 | 49800 + 100 | 49900 + 100 | 50000 + 100 | 50100 + 100 | 50200 + 100 | 50300 + 100 | 50400 + 100 | 50500 +(10 rows) + +-- FULL join with IS NULL check in HAVING +--Testcase 323: +explain (verbose, costs off) +select avg(t1.c1), sum(t2.c1) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) group by t2.c1 having (avg(t1.c1) is null and sum(t2.c1) < 10) or sum(t2.c1) is null order by 1 nulls last, 2; + QUERY PLAN +---------------------------------------------------------------------------------------- + Sort + Output: (avg(t1.c1)), (sum(t2.c1)), t2.c1 + Sort Key: (avg(t1.c1)), (sum(t2.c1)) + -> HashAggregate + Output: avg(t1.c1), sum(t2.c1), t2.c1 + Group Key: t2.c1 + Filter: (((avg(t1.c1) IS NULL) AND (sum(t2.c1) < 10)) OR (sum(t2.c1) IS NULL)) + -> Merge Full Join + Output: t2.c1, t1.c1 + Merge Cond: (t1.c1 = t2.c1) + -> Sort + Output: t1.c1 + Sort Key: t1.c1 + -> Foreign Scan on public.ft4 t1 + Output: t1.c1 + InfluxDB query: SELECT "c1" FROM "T3" + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft5 t2 + Output: t2.c1 + InfluxDB query: SELECT "c1" FROM "T4" +(22 rows) + +--Testcase 324: +select avg(t1.c1), sum(t2.c1) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) group by t2.c1 having (avg(t1.c1) is null and sum(t2.c1) < 10) or sum(t2.c1) is null order by 1 nulls last, 2; + avg | sum +---------------------+----- + 51.0000000000000000 | + | 3 + | 9 +(3 rows) + +-- Aggregate over FULL join needing to deparse the joining relations as +-- subqueries. +--Testcase 325: +explain (verbose, costs off) +select count(*), sum(t1.c1), avg(t2.c1) from (select c1 from ft4 where c1 between 50 and 60) t1 full join (select c1 from ft5 where c1 between 50 and 60) t2 on (t1.c1 = t2.c1); + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Aggregate + Output: count(*), sum(ft4.c1), avg(ft5.c1) + -> Hash Full Join + Output: ft4.c1, ft5.c1 + Hash Cond: (ft4.c1 = ft5.c1) + -> Foreign Scan on public.ft4 + Output: ft4.c1, ft4.c2, ft4.c3 + InfluxDB query: SELECT "c1" FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: ft5.c1 + -> Foreign Scan on public.ft5 + Output: ft5.c1 + InfluxDB query: SELECT "c1" FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(13 rows) + +--Testcase 326: +select count(*), sum(t1.c1), avg(t2.c1) from (select c1 from ft4 where c1 between 50 and 60) t1 full join (select c1 from ft5 where c1 between 50 and 60) t2 on (t1.c1 = t2.c1); + count | sum | avg +-------+-----+--------------------- + 8 | 330 | 55.5000000000000000 +(1 row) + +-- ORDER BY expression is part of the target list but not pushed down to +-- foreign server. +--Testcase 327: +explain (verbose, costs off) +select sum(c2) * (random() <= 1)::int as sum from ft1 order by 1; + QUERY PLAN +-------------------------------------------------------------------------------- + Sort + Output: (((sum(c2)) * ((random() <= '1'::double precision))::integer)) + Sort Key: (((sum(ft1.c2)) * ((random() <= '1'::double precision))::integer)) + -> Foreign Scan + Output: ((sum(c2)) * ((random() <= '1'::double precision))::integer) + InfluxDB query: SELECT sum("c2") FROM "T1" +(6 rows) + +--Testcase 328: +select sum(c2) * (random() <= 1)::int as sum from ft1 order by 1; + sum +------ + 4500 +(1 row) + +-- LATERAL join, with parameterization +--Testcase 329: +set enable_hashagg to false; +--Testcase 330: +explain (verbose, costs off) +select c2, sum from "S 1"."T 1" t1, lateral (select sum(t2.c1 + t1."C 1") sum from ft2 t2 group by t2.c1) qry where t1.c2 * 2 = qry.sum and t1.c2 < 3 and t1."C 1" < 100 order by 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Sort + Output: t1.c2, qry.sum + Sort Key: t1.c2 + -> Nested Loop + Output: t1.c2, qry.sum + -> Foreign Scan on "S 1"."T 1" t1 + Output: t1."C 1", t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 3)) AND (("C 1" < 100)) + -> Subquery Scan on qry + Output: qry.sum, t2.c1 + Filter: ((t1.c2 * 2) = qry.sum) + -> GroupAggregate + Output: sum((t2.c1 + t1."C 1")), t2.c1 + Group Key: t2.c1 + -> Sort + Output: t2.c1 + Sort Key: t2.c1 + -> Foreign Scan on public.ft2 t2 + Output: t2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(20 rows) + +--Testcase 331: +select c2, sum from "S 1"."T 1" t1, lateral (select sum(t2.c1 + t1."C 1") sum from ft2 t2 group by t2.c1) qry where t1.c2 * 2 = qry.sum and t1.c2 < 3 and t1."C 1" < 100 order by 1; + c2 | sum +----+----- + 1 | 2 + 2 | 4 +(2 rows) + +--Testcase 332: +reset enable_hashagg; +-- bug #15613: bad plan for foreign table scan with lateral reference +--Testcase 333: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ref_0.c2, subq_1.* +FROM + "S 1"."T 1" AS ref_0, + LATERAL ( + SELECT ref_0."C 1" c1, subq_0.* + FROM (SELECT ref_0.c2, ref_1.c3 + FROM ft1 AS ref_1) AS subq_0 + RIGHT JOIN ft2 AS ref_3 ON (subq_0.c3 = ref_3.c3) + ) AS subq_1 +WHERE ref_0."C 1" < 10 AND subq_1.c3 = '00001' +ORDER BY ref_0."C 1"; + QUERY PLAN +--------------------------------------------------------------------------------------------------------- + Sort + Output: ref_0.c2, ref_0."C 1", (ref_0.c2), ref_1.c3, ref_0."C 1" + Sort Key: ref_0."C 1" + -> Nested Loop + Output: ref_0.c2, ref_0."C 1", (ref_0.c2), ref_1.c3, ref_0."C 1" + -> Nested Loop + Output: ref_0.c2, ref_0."C 1", ref_1.c3, (ref_0.c2) + -> Foreign Scan on "S 1"."T 1" ref_0 + Output: ref_0."C 1", ref_0.c2, ref_0.c3, ref_0."time", ref_0.c6, ref_0.c7, ref_0.c8 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("C 1" < 10)) + -> Foreign Scan on public.ft1 ref_1 + Output: ref_1.c3, ref_0.c2 + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("c3" = '00001')) + -> Materialize + Output: ref_3.c3 + -> Foreign Scan on public.ft2 ref_3 + Output: ref_3.c3 + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("c3" = '00001')) +(18 rows) + +--Testcase 334: +SELECT ref_0.c2, subq_1.* +FROM + "S 1"."T 1" AS ref_0, + LATERAL ( + SELECT ref_0."C 1" c1, subq_0.* + FROM (SELECT ref_0.c2, ref_1.c3 + FROM ft1 AS ref_1) AS subq_0 + RIGHT JOIN ft2 AS ref_3 ON (subq_0.c3 = ref_3.c3) + ) AS subq_1 +WHERE ref_0."C 1" < 10 AND subq_1.c3 = '00001' +ORDER BY ref_0."C 1"; + c2 | c1 | c2 | c3 +----+----+----+------- + 1 | 1 | 1 | 00001 + 2 | 2 | 2 | 00001 + 3 | 3 | 3 | 00001 + 4 | 4 | 4 | 00001 + 5 | 5 | 5 | 00001 + 6 | 6 | 6 | 00001 + 7 | 7 | 7 | 00001 + 8 | 8 | 8 | 00001 + 9 | 9 | 9 | 00001 +(9 rows) + +-- Check with placeHolderVars +--Testcase 335: +explain (verbose, costs off) +select sum(q.a), count(q.b) from ft4 left join (select 13, avg(ft1.c1), sum(ft2.c1) from ft1 right join ft2 on (ft1.c1 = ft2.c1)) q(a, b, c) on (ft4.c1 <= q.b); + QUERY PLAN +------------------------------------------------------------------------------------ + Aggregate + Output: sum(q.a), count(q.b) + -> Nested Loop Left Join + Output: q.a, q.b + Inner Unique: true + Join Filter: ((ft4.c1)::numeric <= q.b) + -> Foreign Scan on public.ft4 + Output: ft4.c1, ft4.c2, ft4.c3 + InfluxDB query: SELECT "c1" FROM "T3" + -> Materialize + Output: q.a, q.b + -> Subquery Scan on q + Output: q.a, q.b + -> Aggregate + Output: 13, avg(ft1.c1), NULL::bigint + -> Merge Left Join + Output: ft1.c1 + Merge Cond: (ft2.c1 = ft1.c1) + -> Sort + Output: ft2.c1 + Sort Key: ft2.c1 + -> Foreign Scan on public.ft2 + Output: ft2.c1 + InfluxDB query: SELECT "C 1" FROM "T1" + -> Sort + Output: ft1.c1 + Sort Key: ft1.c1 + -> Foreign Scan on public.ft1 + Output: ft1.c1 + InfluxDB query: SELECT "C 1" FROM "T1" +(30 rows) + +--Testcase 336: +select sum(q.a), count(q.b) from ft4 left join (select 13, avg(ft1.c1), sum(ft2.c1) from ft1 right join ft2 on (ft1.c1 = ft2.c1)) q(a, b, c) on (ft4.c1 <= q.b); + sum | count +-----+------- + 650 | 50 +(1 row) + +-- Not supported cases +-- Grouping sets +--Testcase 337: +explain (verbose, costs off) +select c2, sum(c1) from ft1 where c2 < 3 group by rollup(c2) order by 1 nulls last; + QUERY PLAN +------------------------------------------------------------------------------- + Sort + Output: c2, (sum(c1)) + Sort Key: ft1.c2 + -> MixedAggregate + Output: c2, sum(c1) + Hash Key: ft1.c2 + Group Key: () + -> Foreign Scan on public.ft1 + Output: c2, c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 3)) +(10 rows) + +--Testcase 338: +select c2, sum(c1) from ft1 where c2 < 3 group by rollup(c2) order by 1 nulls last; + c2 | sum +----+-------- + 0 | 50500 + 1 | 49600 + 2 | 49700 + | 149800 +(4 rows) + +--Testcase 339: +explain (verbose, costs off) +select c2, sum(c1) from ft1 where c2 < 3 group by cube(c2) order by 1 nulls last; + QUERY PLAN +------------------------------------------------------------------------------- + Sort + Output: c2, (sum(c1)) + Sort Key: ft1.c2 + -> MixedAggregate + Output: c2, sum(c1) + Hash Key: ft1.c2 + Group Key: () + -> Foreign Scan on public.ft1 + Output: c2, c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 3)) +(10 rows) + +--Testcase 340: +select c2, sum(c1) from ft1 where c2 < 3 group by cube(c2) order by 1 nulls last; + c2 | sum +----+-------- + 0 | 50500 + 1 | 49600 + 2 | 49700 + | 149800 +(4 rows) + +--Testcase 341: +explain (verbose, costs off) +select c2, c6, sum(c1) from ft1 where c2 < 3 group by grouping sets(c2, c6) order by 1 nulls last, 2 nulls last; + QUERY PLAN +------------------------------------------------------------------------------------- + Sort + Output: c2, c6, (sum(c1)) + Sort Key: ft1.c2, ft1.c6 + -> HashAggregate + Output: c2, c6, sum(c1) + Hash Key: ft1.c2 + Hash Key: ft1.c6 + -> Foreign Scan on public.ft1 + Output: c2, c6, c1 + InfluxDB query: SELECT "C 1", "c2", "c6" FROM "T1" WHERE (("c2" < 3)) +(10 rows) + +--Testcase 342: +select c2, c6, sum(c1) from ft1 where c2 < 3 group by grouping sets(c2, c6) order by 1 nulls last, 2 nulls last; + c2 | c6 | sum +----+----+------- + 0 | | 50500 + 1 | | 49600 + 2 | | 49700 + | 0 | 50500 + | 1 | 49600 + | 2 | 49700 +(6 rows) + +--Testcase 343: +explain (verbose, costs off) +select c2, sum(c1), grouping(c2) from ft1 where c2 < 3 group by c2 order by 1 nulls last; + QUERY PLAN +------------------------------------------------------------------------------- + Sort + Output: c2, (sum(c1)), (GROUPING(c2)) + Sort Key: ft1.c2 + -> HashAggregate + Output: c2, sum(c1), GROUPING(c2) + Group Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c2, c1 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 3)) +(9 rows) + +--Testcase 344: +select c2, sum(c1), grouping(c2) from ft1 where c2 < 3 group by c2 order by 1 nulls last; + c2 | sum | grouping +----+-------+---------- + 0 | 50500 | 0 + 1 | 49600 | 0 + 2 | 49700 | 0 +(3 rows) + +-- DISTINCT itself is not pushed down, whereas underneath aggregate is pushed +--Testcase 345: +explain (verbose, costs off) +select distinct sum(c1)/1000 s from ft2 where c2 < 6 group by c2 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------- + Unique + Output: ((sum(c1) / 1000)), c2 + -> Sort + Output: ((sum(c1) / 1000)), c2 + Sort Key: ((sum(ft2.c1) / 1000)) + -> HashAggregate + Output: (sum(c1) / 1000), c2 + Group Key: ft2.c2 + -> Foreign Scan on public.ft2 + Output: c1, c2 + InfluxDB query: SELECT "C 1", "c2" FROM "T1" WHERE (("c2" < 6)) +(11 rows) + +--Testcase 346: +select distinct sum(c1)/1000 s from ft2 where c2 < 6 group by c2 order by 1; + s +---- + 49 + 50 +(2 rows) + +-- WindowAgg +--Testcase 347: +explain (verbose, costs off) +select c2, sum(c2), count(c2) over (partition by c2%2) from ft2 where c2 < 10 group by c2 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------- + Sort + Output: c2, (sum(c2)), (count(c2) OVER (?)), ((c2 % 2)) + Sort Key: ft2.c2 + -> WindowAgg + Output: c2, (sum(c2)), count(c2) OVER (?), ((c2 % 2)) + -> Sort + Output: c2, ((c2 % 2)), (sum(c2)) + Sort Key: ((ft2.c2 % 2)) + -> HashAggregate + Output: c2, (c2 % 2), sum(c2) + Group Key: ft2.c2 + -> Foreign Scan on public.ft2 + Output: c2 + InfluxDB query: SELECT "c2" FROM "T1" WHERE (("c2" < 10)) +(14 rows) + +--Testcase 348: +select c2, sum(c2), count(c2) over (partition by c2%2) from ft2 where c2 < 10 group by c2 order by 1; + c2 | sum | count +----+-----+------- + 0 | 0 | 5 + 1 | 100 | 5 + 2 | 200 | 5 + 3 | 300 | 5 + 4 | 400 | 5 + 5 | 500 | 5 + 6 | 600 | 5 + 7 | 700 | 5 + 8 | 800 | 5 + 9 | 900 | 5 +(10 rows) + +--Testcase 349: +explain (verbose, costs off) +select c2, array_agg(c2) over (partition by c2%2 order by c2 desc) from ft1 where c2 < 10 group by c2 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------- + Sort + Output: c2, (array_agg(c2) OVER (?)), ((c2 % 2)) + Sort Key: ft1.c2 + -> WindowAgg + Output: c2, array_agg(c2) OVER (?), ((c2 % 2)) + -> Sort + Output: c2, ((c2 % 2)) + Sort Key: ((ft1.c2 % 2)), ft1.c2 DESC + -> HashAggregate + Output: c2, (c2 % 2) + Group Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c2 + InfluxDB query: SELECT "c2" FROM "T1" WHERE (("c2" < 10)) +(14 rows) + +--Testcase 350: +select c2, array_agg(c2) over (partition by c2%2 order by c2 desc) from ft1 where c2 < 10 group by c2 order by 1; + c2 | array_agg +----+------------- + 0 | {8,6,4,2,0} + 1 | {9,7,5,3,1} + 2 | {8,6,4,2} + 3 | {9,7,5,3} + 4 | {8,6,4} + 5 | {9,7,5} + 6 | {8,6} + 7 | {9,7} + 8 | {8} + 9 | {9} +(10 rows) + +--Testcase 351: +explain (verbose, costs off) +select c2, array_agg(c2) over (partition by c2%2 order by c2 range between current row and unbounded following) from ft1 where c2 < 10 group by c2 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------- + Sort + Output: c2, (array_agg(c2) OVER (?)), ((c2 % 2)) + Sort Key: ft1.c2 + -> WindowAgg + Output: c2, array_agg(c2) OVER (?), ((c2 % 2)) + -> Sort + Output: c2, ((c2 % 2)) + Sort Key: ((ft1.c2 % 2)), ft1.c2 + -> HashAggregate + Output: c2, (c2 % 2) + Group Key: ft1.c2 + -> Foreign Scan on public.ft1 + Output: c2 + InfluxDB query: SELECT "c2" FROM "T1" WHERE (("c2" < 10)) +(14 rows) + +--Testcase 352: +select c2, array_agg(c2) over (partition by c2%2 order by c2 range between current row and unbounded following) from ft1 where c2 < 10 group by c2 order by 1; + c2 | array_agg +----+------------- + 0 | {0,2,4,6,8} + 1 | {1,3,5,7,9} + 2 | {2,4,6,8} + 3 | {3,5,7,9} + 4 | {4,6,8} + 5 | {5,7,9} + 6 | {6,8} + 7 | {7,9} + 8 | {8} + 9 | {9} +(10 rows) + +-- =================================================================== +-- parameterized queries +-- =================================================================== +-- simple join +--Testcase 353: +PREPARE st1(int, int) AS SELECT t1.c3, t2.c3 FROM ft1 t1, ft2 t2 WHERE t1.c1 = $1 AND t2.c1 = $2; +--Testcase 354: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st1(1, 2); + QUERY PLAN +-------------------------------------------------------------------------------- + Nested Loop + Output: t1.c3, t2.c3 + -> Foreign Scan on public.ft1 t1 + Output: t1.c3 + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = 1)) + -> Materialize + Output: t2.c3 + -> Foreign Scan on public.ft2 t2 + Output: t2.c3 + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = 2)) +(10 rows) + +--Testcase 355: +EXECUTE st1(1, 1); + c3 | c3 +-------+------- + 00001 | 00001 +(1 row) + +--Testcase 356: +EXECUTE st1(101, 101); + c3 | c3 +-------+------- + 00101 | 00101 +(1 row) + +-- subquery using stable function (can't be sent to remote) +--Testcase 357: +PREPARE st2(int) AS SELECT * FROM ft1 t1 WHERE t1.c1 < $2 AND t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE c1 > $1 AND date(time) = '1970-01-17'::date) ORDER BY c1; +--Testcase 358: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st2(10, 20); + QUERY PLAN +--------------------------------------------------------------------------------------------------------- + Sort + Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 + Sort Key: t1.c1 + -> Hash Semi Join + Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 + Hash Cond: (t1.c3 = t2.c3) + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" < 20)) + -> Hash + Output: t2.c3 + -> Foreign Scan on public.ft2 t2 + Output: t2.c3 + Filter: (date(t2."time") = '01-17-1970'::date) + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" > 10)) +(15 rows) + +--Testcase 359: +EXECUTE st2(10, 20); + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+----- + 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo +(1 row) + +--Testcase 360: +EXECUTE st2(101, 121); + c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+----- + 116 | 6 | 00116 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo +(1 row) + +-- subquery using immutable function (can be sent to remote) +--Testcase 361: +PREPARE st3(int) AS SELECT * FROM ft1 t1 WHERE t1.c1 < $2 AND t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE c1 > $1 AND date(time) = '1970-01-17'::date) ORDER BY c1; +--Testcase 362: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st3(10, 20); + QUERY PLAN +--------------------------------------------------------------------------------------------------------- + Sort + Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 + Sort Key: t1.c1 + -> Hash Semi Join + Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 + Hash Cond: (t1.c3 = t2.c3) + -> Foreign Scan on public.ft1 t1 + Output: t1.c1, t1.c2, t1.c3, t1."time", t1.c6, t1.c7, t1.c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" < 20)) + -> Hash + Output: t2.c3 + -> Foreign Scan on public.ft2 t2 + Output: t2.c3 + Filter: (date(t2."time") = '01-17-1970'::date) + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" > 10)) +(15 rows) + +--Testcase 363: +EXECUTE st3(10, 20); + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+----- + 16 | 6 | 00016 | Sat Jan 17 00:00:00 1970 | 6 | 6 | foo +(1 row) + +--Testcase 364: +EXECUTE st3(20, 30); + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+----+------+----+----+---- +(0 rows) + +-- custom plan should be chosen initially +--Testcase 365: +PREPARE st4(int) AS SELECT * FROM ft1 t1 WHERE t1.c1 = $1; +--Testcase 366: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +--Testcase 367: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +--Testcase 368: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +--Testcase 369: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +--Testcase 370: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +-- once we try it enough times, should switch to generic plan +--Testcase 371: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +--------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = $1)) +(3 rows) + +-- value of $1 should not be sent to remote +--Testcase 372: +PREPARE st5(text,int) AS SELECT * FROM ft1 t1 WHERE c8 = $1 and c1 = $2; +--Testcase 373: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) +(3 rows) + +--Testcase 374: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) +(3 rows) + +--Testcase 375: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) +(3 rows) + +--Testcase 376: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) +(3 rows) + +--Testcase 377: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) +(3 rows) + +--Testcase 378: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = $1)) AND (("C 1" = $2)) +(3 rows) + +--Testcase 379: +EXECUTE st5('foo', 1); + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+----- + 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo +(1 row) + +-- altering FDW options requires replanning +--Testcase 380: +PREPARE st6 AS SELECT * FROM ft1 t1 WHERE t1.c1 = t1.c2; +--Testcase 381: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; + QUERY PLAN +----------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("C 1" = "c2")) +(3 rows) + +--Testcase 382: +PREPARE st7 AS INSERT INTO ft1 (c1,c2,c3) VALUES (1001,101,'foo'); +--Testcase 383: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Insert on public.ft1 + Batch Size: 1 + -> Result + Output: NULL::integer, 1001, 101, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft1 '::character(10), NULL::text +(4 rows) + +--Testcase 384: +INSERT INTO "S 1"."T 0" SELECT * FROM "S 1"."T 1"; +--Testcase 385: +ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T0'); +--Testcase 386: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; + QUERY PLAN +----------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T0" WHERE (("C 1" = "c2")) +(3 rows) + +--Testcase 387: +EXECUTE st6; + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+----- + 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo + 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 | 2 | 2 | foo + 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 | 3 | 3 | foo + 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 | 4 | 4 | foo + 5 | 5 | 00005 | Tue Jan 06 00:00:00 1970 | 5 | 5 | foo + 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 | 6 | 6 | foo + 7 | 7 | 00007 | Thu Jan 08 00:00:00 1970 | 7 | 7 | foo + 8 | 8 | 00008 | Fri Jan 09 00:00:00 1970 | 8 | 8 | foo + 9 | 9 | 00009 | Sat Jan 10 00:00:00 1970 | 9 | 9 | foo +(9 rows) + +--Testcase 388: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Insert on public.ft1 + Batch Size: 1 + -> Result + Output: NULL::integer, 1001, 101, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft1 '::character(10), NULL::text +(4 rows) + +--Testcase 389: +DELETE FROM "S 1"."T 0"; +--Testcase 390: +ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T1'); +--Testcase 391: +PREPARE st8 AS SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; +--Testcase 392: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; + QUERY PLAN +------------------------------------------------------------ + Aggregate + Output: count(c3) + -> Foreign Scan on public.ft1 t1 + Output: c3 + Filter: (t1.c1 === t1.c2) + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(6 rows) + +-- Skip, influxdb_fdw does not support extensions +-- ALTER SERVER loopback OPTIONS (DROP extensions); +--Testcase 393: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; + QUERY PLAN +------------------------------------------------------------ + Aggregate + Output: count(c3) + -> Foreign Scan on public.ft1 t1 + Output: c3 + Filter: (t1.c1 === t1.c2) + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(6 rows) + +--Testcase 394: +EXECUTE st8; + count +------- + 9 +(1 row) + +-- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); +-- cleanup +DEALLOCATE st1; +DEALLOCATE st2; +DEALLOCATE st3; +DEALLOCATE st4; +DEALLOCATE st5; +DEALLOCATE st6; +DEALLOCATE st7; +DEALLOCATE st8; +-- System columns, except ctid and oid, should not be sent to remote +--Testcase 395: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 t1 WHERE t1.tableoid = 'pg_class'::regclass LIMIT 1; + QUERY PLAN +------------------------------------------------------------------------------ + Limit + Output: c1, c2, c3, "time", c6, c7, c8 + -> Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (t1.tableoid = '1259'::oid) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(6 rows) + +--Testcase 396: +SELECT * FROM ft1 t1 WHERE t1.tableoid = 'ft1'::regclass ORDER BY c1 LIMIT 1; + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+-------+--------------------------+----+------------+----- + 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo +(1 row) + +--Testcase 397: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT tableoid::regclass, * FROM ft1 t1 LIMIT 1; + QUERY PLAN +-------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: (tableoid)::regclass, c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" LIMIT 1 +(3 rows) + +--Testcase 398: +SELECT tableoid::regclass, * FROM ft1 t1 ORDER BY c1 LIMIT 1; + tableoid | c1 | c2 | c3 | time | c6 | c7 | c8 +----------+----+----+-------+--------------------------+----+------------+----- + ft1 | 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo +(1 row) + +--Testcase 399: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan on public.ft1 t1 + Output: c1, c2, c3, "time", c6, c7, c8 + Filter: (t1.ctid = '(0,2)'::tid) + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(4 rows) + +--Testcase 400: +SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; + c1 | c2 | c3 | time | c6 | c7 | c8 +----+----+----+------+----+----+---- +(0 rows) + +--Testcase 401: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ctid, * FROM ft1 t1 LIMIT 1; + QUERY PLAN +-------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: ctid, c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" LIMIT 1 +(3 rows) + +--Testcase 402: +SELECT ctid, * FROM ft1 t1 ORDER BY c1 LIMIT 1; + ctid | c1 | c2 | c3 | time | c6 | c7 | c8 +----------------+----+----+-------+--------------------------+----+------------+----- + (4294967295,0) | 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 | 1 | 1 | foo +(1 row) + +-- =================================================================== +-- used in PL/pgSQL function +-- =================================================================== +--Testcase 403: +CREATE OR REPLACE FUNCTION f_test(p_c1 int) RETURNS int AS $$ +DECLARE + v_c1 int; +BEGIN +--Testcase 404: + SELECT c1 INTO v_c1 FROM ft1 WHERE c1 = p_c1 LIMIT 1; + PERFORM c1 FROM ft1 WHERE c1 = p_c1 AND p_c1 = v_c1 LIMIT 1; + RETURN v_c1; +END; +$$ LANGUAGE plpgsql; +--Testcase 405: +SELECT f_test(100); + f_test +-------- + 100 +(1 row) + +--Testcase 406: +DROP FUNCTION f_test(int); +-- =================================================================== +-- REINDEX +-- =================================================================== +-- remote table is not created here +--Testcase 407: +CREATE FOREIGN TABLE reindex_foreign (c1 int, c2 int) + SERVER influxdb_svr2 OPTIONS (table 'reindex_local'); +REINDEX TABLE reindex_foreign; -- error +ERROR: "reindex_foreign" is not a table or materialized view +REINDEX TABLE CONCURRENTLY reindex_foreign; -- error +ERROR: "reindex_foreign" is not a table or materialized view +--Testcase 408: +DROP FOREIGN TABLE reindex_foreign; +-- partitions and foreign tables +--Testcase 409: +CREATE TABLE reind_fdw_parent (c1 int) PARTITION BY RANGE (c1); +--Testcase 410: +CREATE TABLE reind_fdw_0_10 PARTITION OF reind_fdw_parent + FOR VALUES FROM (0) TO (10); +--Testcase 411: +CREATE FOREIGN TABLE reind_fdw_10_20 PARTITION OF reind_fdw_parent + FOR VALUES FROM (10) TO (20) + SERVER influxdb_svr OPTIONS (table 'reind_local_10_20'); +REINDEX TABLE reind_fdw_parent; -- ok +REINDEX TABLE CONCURRENTLY reind_fdw_parent; -- ok +--Testcase 412: +DROP TABLE reind_fdw_parent; +-- =================================================================== +-- conversion error +-- =================================================================== +--Testcase 413: +ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE int; +--Testcase 414: +SELECT * FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8) WHERE x1 = 1; -- ERROR +ERROR: invalid input syntax for type integer: "foo" +--Testcase 415: +SELECT ftx.x1, ft2.c2, ftx.x8 FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8), ft2 + WHERE ftx.x1 = ft2.c1 AND ftx.x1 = 1; -- ERROR +ERROR: invalid input syntax for type integer: "foo" +--Testcase 416: +SELECT ftx.x1, ft2.c2, ftx FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8), ft2 + WHERE ftx.x1 = ft2.c1 AND ftx.x1 = 1; -- ERROR +ERROR: invalid input syntax for type integer: "foo" +--Testcase 417: +SELECT sum(c2), array_agg(c8) FROM ft1 GROUP BY c8; -- ERROR +ERROR: invalid input syntax for type integer: "foo" +-- ANALYZE ft1; -- ERROR +ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE user_enum; +-- =================================================================== +-- local type can be different from remote type in some cases, +-- in particular if similarly-named operators do equivalent things +-- =================================================================== +-- Testcase 418: +ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE text; +-- Testcase 768: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE c8 = 'foo' LIMIT 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (("c8" = 'foo')) LIMIT 1 +(3 rows) + +-- Testcase 769: +SELECT * FROM ft1 WHERE c8 = 'foo' LIMIT 1; + c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+----- + 100 | 0 | 00100 | Thu Jan 01 00:00:00 1970 | 0 | 0 | foo +(1 row) + +-- Testcase 770: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE 'foo' = c8 LIMIT 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE (('foo' = "c8")) LIMIT 1 +(3 rows) + +-- Testcase 771: +SELECT * FROM ft1 WHERE 'foo' = c8 LIMIT 1; + c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+----- + 100 | 0 | 00100 | Thu Jan 01 00:00:00 1970 | 0 | 0 | foo +(1 row) + +-- we declared c8 to be text locally, but it's still the same type on +-- the remote which will balk if we try to do anything incompatible +-- with that remote type +-- Can not create user define type in InfluxDB. +-- Type c8 of foreign table ft1 and remote table T1 are +-- match. These case below not error with influxdb_fdw. +-- Testcase 772: +SELECT * FROM ft1 WHERE c8 LIKE 'foo' LIMIT 1; -- ERROR + c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+----- + 100 | 0 | 00100 | Thu Jan 01 00:00:00 1970 | 0 | 0 | foo +(1 row) + +-- Testcase 773: +SELECT * FROM ft1 WHERE c8::text LIKE 'foo' LIMIT 1; -- ERROR; cast not pushed down + c1 | c2 | c3 | time | c6 | c7 | c8 +-----+----+-------+--------------------------+----+------------+----- + 100 | 0 | 00100 | Thu Jan 01 00:00:00 1970 | 0 | 0 | foo +(1 row) + +/* +-- influxdb_fdw does not support transactions +-- =================================================================== +-- subtransaction +-- + local/remote error doesn't break cursor +-- =================================================================== +BEGIN; +DECLARE c CURSOR FOR SELECT * FROM ft1 ORDER BY c1; +FETCH c; +SAVEPOINT s; +ERROR OUT; -- ERROR +ROLLBACK TO s; +FETCH c; +SAVEPOINT s; +SELECT * FROM ft1 WHERE 1 / (c1 - 1) > 0; -- ERROR +ROLLBACK TO s; +FETCH c; +SELECT * FROM ft1 ORDER BY c1 LIMIT 1; +COMMIT; +*/ +-- =================================================================== +-- test handling of collations +-- =================================================================== +--Testcase 419: +create foreign table loct3 (f1 text collate "C", f2 text, f3 varchar(10)) server influxdb_svr options (table 'loct3'); +--Testcase 420: +create foreign table ft3 (f1 text collate "C", f2 text, f3 varchar(10)) + server influxdb_svr options (table 'loct3'); +-- can be sent to remote +--Testcase 421: +explain (verbose, costs off) select * from ft3 where f1 = 'foo'; + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: f1, f2, f3 + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f1" = 'foo')) +(3 rows) + +--Testcase 422: +explain (verbose, costs off) select * from ft3 where f1 COLLATE "C" = 'foo'; + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: f1, f2, f3 + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f1" = 'foo')) +(3 rows) + +--Testcase 423: +explain (verbose, costs off) select * from ft3 where f2 = 'foo'; + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: f1, f2, f3 + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f2" = 'foo')) +(3 rows) + +--Testcase 424: +explain (verbose, costs off) select * from ft3 where f3 = 'foo'; + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: f1, f2, f3 + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f3" = 'foo')) +(3 rows) + +--Testcase 425: +explain (verbose, costs off) select * from ft3 f, loct3 l + where f.f3 = l.f3 and l.f1 = 'foo'; + QUERY PLAN +------------------------------------------------------------------------------------------- + Hash Join + Output: f.f1, f.f2, f.f3, l.f1, l.f2, l.f3 + Hash Cond: ((f.f3)::text = (l.f3)::text) + -> Foreign Scan on public.ft3 f + Output: f.f1, f.f2, f.f3 + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" + -> Hash + Output: l.f1, l.f2, l.f3 + -> Foreign Scan on public.loct3 l + Output: l.f1, l.f2, l.f3 + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f1" = 'foo')) +(11 rows) + +-- can't be sent to remote +--Testcase 426: +explain (verbose, costs off) select * from ft3 where f1 COLLATE "POSIX" = 'foo'; + QUERY PLAN +-------------------------------------------------------- + Foreign Scan on public.ft3 + Output: f1, f2, f3 + Filter: ((ft3.f1)::text = 'foo'::text) + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" +(4 rows) + +--Testcase 427: +explain (verbose, costs off) select * from ft3 where f1 = 'foo' COLLATE "C"; + QUERY PLAN +-------------------------------------------------------- + Foreign Scan on public.ft3 + Output: f1, f2, f3 + Filter: (ft3.f1 = 'foo'::text COLLATE "C") + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" +(4 rows) + +--Testcase 428: +explain (verbose, costs off) select * from ft3 where f2 COLLATE "C" = 'foo'; + QUERY PLAN +-------------------------------------------------------- + Foreign Scan on public.ft3 + Output: f1, f2, f3 + Filter: ((ft3.f2)::text = 'foo'::text) + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" +(4 rows) + +--Testcase 429: +explain (verbose, costs off) select * from ft3 where f2 = 'foo' COLLATE "C"; + QUERY PLAN +-------------------------------------------------------- + Foreign Scan on public.ft3 + Output: f1, f2, f3 + Filter: (ft3.f2 = 'foo'::text COLLATE "C") + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" +(4 rows) + +--Testcase 430: +explain (verbose, costs off) select * from ft3 f, loct3 l + where f.f3 = l.f3 COLLATE "POSIX" and l.f1 = 'foo'; + QUERY PLAN +------------------------------------------------------------------------------------------- + Hash Join + Output: f.f1, f.f2, f.f3, l.f1, l.f2, l.f3 + Hash Cond: ((f.f3)::text = (l.f3)::text) + -> Foreign Scan on public.ft3 f + Output: f.f1, f.f2, f.f3 + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" + -> Hash + Output: l.f1, l.f2, l.f3 + -> Foreign Scan on public.loct3 l + Output: l.f1, l.f2, l.f3 + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct3" WHERE (("f1" = 'foo')) +(11 rows) + +-- influxdb_fdw does not support UPDATE +-- =================================================================== +-- test writable foreign table stuff +-- =================================================================== +--Testcase 431: +EXPLAIN (verbose, costs off) +INSERT INTO ft2 (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2 ORDER BY c1 LIMIT 20; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Insert on public.ft2 + Batch Size: 1 + -> Subquery Scan on "*SELECT*" + Output: "*SELECT*"."?column?", "*SELECT*"."?column?_1", NULL::integer, "*SELECT*"."?column?_2", NULL::timestamp without time zone, NULL::character varying, 'ft2 '::character(10), NULL::text + -> Limit + Output: ((ft2_1.c1 + 1000)), ((ft2_1.c2 + 100)), ((ft2_1.c3 || ft2_1.c3)), ft2_1.c1 + -> Sort + Output: ((ft2_1.c1 + 1000)), ((ft2_1.c2 + 100)), ((ft2_1.c3 || ft2_1.c3)), ft2_1.c1 + Sort Key: ft2_1.c1 + -> Foreign Scan on public.ft2 ft2_1 + Output: (ft2_1.c1 + 1000), (ft2_1.c2 + 100), (ft2_1.c3 || ft2_1.c3), ft2_1.c1 + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(12 rows) + +--Testcase 432: +INSERT INTO ft2 (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2 ORDER BY c1 LIMIT 20; +--Testcase 433: +INSERT INTO ft2 (c1,c2,c3) VALUES (1101,201,'aaa'), (1102,202,'bbb'), (1103,203,'ccc'); +--Testcase 434: +SELECT c1, c2, c3, c6, c7, c8 FROM ft2 WHERE c2 > 200; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+-----+----+------------+---- + 1101 | 201 | aaa | | ft2 | + 1102 | 202 | bbb | | ft2 | + 1103 | 203 | ccc | | ft2 | +(3 rows) + +--Testcase 435: +INSERT INTO ft2 (c1,c2,c3) VALUES (1104,204,'ddd'), (1105,205,'eee'); +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c2 = c2 + 300, c3 = c3 || '_update3' WHERE c1 % 10 = 3; -- can be pushed down +--UPDATE ft2 SET c2 = c2 + 300, c3 = c3 || '_update3' WHERE c1 % 10 = 3; +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c2 = c2 + 400, c3 = c3 || '_update7' WHERE c1 % 10 = 7 RETURNING *; -- can be pushed down +--UPDATE ft2 SET c2 = c2 + 400, c3 = c3 || '_update7' WHERE c1 % 10 = 7 RETURNING *; +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c2 = ft2.c2 + 500, c3 = ft2.c3 || '_update9', c7 = DEFAULT +-- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; -- can be pushed down +--UPDATE ft2 SET c2 = ft2.c2 + 500, c3 = ft2.c3 || '_update9', c7 = DEFAULT +-- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; +--Testcase 436: +EXPLAIN (verbose, costs off) + DELETE FROM ft2 WHERE c1 % 10 = 5; -- can be pushed down + QUERY PLAN +--------------------------------------------------------------------------------- + Delete on public.ft2 + -> Foreign Scan on public.ft2 + Output: c3, "time" + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE ((("C 1" % 10) = 5)) +(4 rows) + +--Testcase 437: +SELECT c1 FROM ft2 WHERE c1 % 10 = 5 ORDER BY c1; + c1 +------ + 5 + 15 + 25 + 35 + 45 + 55 + 65 + 75 + 85 + 95 + 105 + 115 + 125 + 135 + 145 + 155 + 165 + 175 + 185 + 195 + 205 + 215 + 225 + 235 + 245 + 255 + 265 + 275 + 285 + 295 + 305 + 315 + 325 + 335 + 345 + 355 + 365 + 375 + 385 + 395 + 405 + 415 + 425 + 435 + 445 + 455 + 465 + 475 + 485 + 495 + 505 + 515 + 525 + 535 + 545 + 555 + 565 + 575 + 585 + 595 + 605 + 615 + 625 + 635 + 645 + 655 + 665 + 675 + 685 + 695 + 705 + 715 + 725 + 735 + 745 + 755 + 765 + 775 + 785 + 795 + 805 + 815 + 825 + 835 + 845 + 855 + 865 + 875 + 885 + 895 + 905 + 915 + 925 + 935 + 945 + 955 + 965 + 975 + 985 + 995 + 1005 + 1015 + 1105 +(103 rows) + +--Testcase 438: +DELETE FROM ft2 WHERE c1 % 10 = 5; +--Testcase 439: +SELECT c1 FROM ft2 WHERE c1 % 10 = 5; + c1 +---- +(0 rows) + +--Testcase 440: +EXPLAIN (verbose, costs off) +DELETE FROM ft2 USING ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 2; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------- + Delete on public.ft2 + -> Hash Join + Output: ft2.c3, ft2."time", ft1.* + Hash Cond: (ft2.c2 = ft1.c1) + -> Foreign Scan on public.ft2 + Output: ft2.c3, ft2."time", ft2.c2 + InfluxDB query: SELECT "c2", "c3" FROM "T1" + -> Hash + Output: ft1.*, ft1.c1 + -> Foreign Scan on public.ft1 + Output: ft1.*, ft1.c1 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE ((("C 1" % 10) = 2)) +(12 rows) + +--Testcase 441: +DELETE FROM ft2 USING ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 2; +--Testcase 442: +SELECT c1,c2,c3 FROM ft2 ORDER BY c1; + c1 | c2 | c3 +------+-----+------------ + 1 | 1 | 00001 + 3 | 3 | 00003 + 4 | 4 | 00004 + 6 | 6 | 00006 + 7 | 7 | 00007 + 8 | 8 | 00008 + 9 | 9 | 00009 + 10 | 0 | 00010 + 11 | 1 | 00011 + 13 | 3 | 00013 + 14 | 4 | 00014 + 16 | 6 | 00016 + 17 | 7 | 00017 + 18 | 8 | 00018 + 19 | 9 | 00019 + 20 | 0 | 00020 + 21 | 1 | 00021 + 23 | 3 | 00023 + 24 | 4 | 00024 + 26 | 6 | 00026 + 27 | 7 | 00027 + 28 | 8 | 00028 + 29 | 9 | 00029 + 30 | 0 | 00030 + 31 | 1 | 00031 + 33 | 3 | 00033 + 34 | 4 | 00034 + 36 | 6 | 00036 + 37 | 7 | 00037 + 38 | 8 | 00038 + 39 | 9 | 00039 + 40 | 0 | 00040 + 41 | 1 | 00041 + 43 | 3 | 00043 + 44 | 4 | 00044 + 46 | 6 | 00046 + 47 | 7 | 00047 + 48 | 8 | 00048 + 49 | 9 | 00049 + 50 | 0 | 00050 + 51 | 1 | 00051 + 53 | 3 | 00053 + 54 | 4 | 00054 + 56 | 6 | 00056 + 57 | 7 | 00057 + 58 | 8 | 00058 + 59 | 9 | 00059 + 60 | 0 | 00060 + 61 | 1 | 00061 + 63 | 3 | 00063 + 64 | 4 | 00064 + 66 | 6 | 00066 + 67 | 7 | 00067 + 68 | 8 | 00068 + 69 | 9 | 00069 + 70 | 0 | 00070 + 71 | 1 | 00071 + 73 | 3 | 00073 + 74 | 4 | 00074 + 76 | 6 | 00076 + 77 | 7 | 00077 + 78 | 8 | 00078 + 79 | 9 | 00079 + 80 | 0 | 00080 + 81 | 1 | 00081 + 83 | 3 | 00083 + 84 | 4 | 00084 + 86 | 6 | 00086 + 87 | 7 | 00087 + 88 | 8 | 00088 + 89 | 9 | 00089 + 90 | 0 | 00090 + 91 | 1 | 00091 + 93 | 3 | 00093 + 94 | 4 | 00094 + 96 | 6 | 00096 + 97 | 7 | 00097 + 98 | 8 | 00098 + 99 | 9 | 00099 + 100 | 0 | 00100 + 101 | 1 | 00101 + 103 | 3 | 00103 + 104 | 4 | 00104 + 106 | 6 | 00106 + 107 | 7 | 00107 + 108 | 8 | 00108 + 109 | 9 | 00109 + 110 | 0 | 00110 + 111 | 1 | 00111 + 113 | 3 | 00113 + 114 | 4 | 00114 + 116 | 6 | 00116 + 117 | 7 | 00117 + 118 | 8 | 00118 + 119 | 9 | 00119 + 120 | 0 | 00120 + 121 | 1 | 00121 + 123 | 3 | 00123 + 124 | 4 | 00124 + 126 | 6 | 00126 + 127 | 7 | 00127 + 128 | 8 | 00128 + 129 | 9 | 00129 + 130 | 0 | 00130 + 131 | 1 | 00131 + 133 | 3 | 00133 + 134 | 4 | 00134 + 136 | 6 | 00136 + 137 | 7 | 00137 + 138 | 8 | 00138 + 139 | 9 | 00139 + 140 | 0 | 00140 + 141 | 1 | 00141 + 143 | 3 | 00143 + 144 | 4 | 00144 + 146 | 6 | 00146 + 147 | 7 | 00147 + 148 | 8 | 00148 + 149 | 9 | 00149 + 150 | 0 | 00150 + 151 | 1 | 00151 + 153 | 3 | 00153 + 154 | 4 | 00154 + 156 | 6 | 00156 + 157 | 7 | 00157 + 158 | 8 | 00158 + 159 | 9 | 00159 + 160 | 0 | 00160 + 161 | 1 | 00161 + 163 | 3 | 00163 + 164 | 4 | 00164 + 166 | 6 | 00166 + 167 | 7 | 00167 + 168 | 8 | 00168 + 169 | 9 | 00169 + 170 | 0 | 00170 + 171 | 1 | 00171 + 173 | 3 | 00173 + 174 | 4 | 00174 + 176 | 6 | 00176 + 177 | 7 | 00177 + 178 | 8 | 00178 + 179 | 9 | 00179 + 180 | 0 | 00180 + 181 | 1 | 00181 + 183 | 3 | 00183 + 184 | 4 | 00184 + 186 | 6 | 00186 + 187 | 7 | 00187 + 188 | 8 | 00188 + 189 | 9 | 00189 + 190 | 0 | 00190 + 191 | 1 | 00191 + 193 | 3 | 00193 + 194 | 4 | 00194 + 196 | 6 | 00196 + 197 | 7 | 00197 + 198 | 8 | 00198 + 199 | 9 | 00199 + 200 | 0 | 00200 + 201 | 1 | 00201 + 203 | 3 | 00203 + 204 | 4 | 00204 + 206 | 6 | 00206 + 207 | 7 | 00207 + 208 | 8 | 00208 + 209 | 9 | 00209 + 210 | 0 | 00210 + 211 | 1 | 00211 + 213 | 3 | 00213 + 214 | 4 | 00214 + 216 | 6 | 00216 + 217 | 7 | 00217 + 218 | 8 | 00218 + 219 | 9 | 00219 + 220 | 0 | 00220 + 221 | 1 | 00221 + 223 | 3 | 00223 + 224 | 4 | 00224 + 226 | 6 | 00226 + 227 | 7 | 00227 + 228 | 8 | 00228 + 229 | 9 | 00229 + 230 | 0 | 00230 + 231 | 1 | 00231 + 233 | 3 | 00233 + 234 | 4 | 00234 + 236 | 6 | 00236 + 237 | 7 | 00237 + 238 | 8 | 00238 + 239 | 9 | 00239 + 240 | 0 | 00240 + 241 | 1 | 00241 + 243 | 3 | 00243 + 244 | 4 | 00244 + 246 | 6 | 00246 + 247 | 7 | 00247 + 248 | 8 | 00248 + 249 | 9 | 00249 + 250 | 0 | 00250 + 251 | 1 | 00251 + 253 | 3 | 00253 + 254 | 4 | 00254 + 256 | 6 | 00256 + 257 | 7 | 00257 + 258 | 8 | 00258 + 259 | 9 | 00259 + 260 | 0 | 00260 + 261 | 1 | 00261 + 263 | 3 | 00263 + 264 | 4 | 00264 + 266 | 6 | 00266 + 267 | 7 | 00267 + 268 | 8 | 00268 + 269 | 9 | 00269 + 270 | 0 | 00270 + 271 | 1 | 00271 + 273 | 3 | 00273 + 274 | 4 | 00274 + 276 | 6 | 00276 + 277 | 7 | 00277 + 278 | 8 | 00278 + 279 | 9 | 00279 + 280 | 0 | 00280 + 281 | 1 | 00281 + 283 | 3 | 00283 + 284 | 4 | 00284 + 286 | 6 | 00286 + 287 | 7 | 00287 + 288 | 8 | 00288 + 289 | 9 | 00289 + 290 | 0 | 00290 + 291 | 1 | 00291 + 293 | 3 | 00293 + 294 | 4 | 00294 + 296 | 6 | 00296 + 297 | 7 | 00297 + 298 | 8 | 00298 + 299 | 9 | 00299 + 300 | 0 | 00300 + 301 | 1 | 00301 + 303 | 3 | 00303 + 304 | 4 | 00304 + 306 | 6 | 00306 + 307 | 7 | 00307 + 308 | 8 | 00308 + 309 | 9 | 00309 + 310 | 0 | 00310 + 311 | 1 | 00311 + 313 | 3 | 00313 + 314 | 4 | 00314 + 316 | 6 | 00316 + 317 | 7 | 00317 + 318 | 8 | 00318 + 319 | 9 | 00319 + 320 | 0 | 00320 + 321 | 1 | 00321 + 323 | 3 | 00323 + 324 | 4 | 00324 + 326 | 6 | 00326 + 327 | 7 | 00327 + 328 | 8 | 00328 + 329 | 9 | 00329 + 330 | 0 | 00330 + 331 | 1 | 00331 + 333 | 3 | 00333 + 334 | 4 | 00334 + 336 | 6 | 00336 + 337 | 7 | 00337 + 338 | 8 | 00338 + 339 | 9 | 00339 + 340 | 0 | 00340 + 341 | 1 | 00341 + 343 | 3 | 00343 + 344 | 4 | 00344 + 346 | 6 | 00346 + 347 | 7 | 00347 + 348 | 8 | 00348 + 349 | 9 | 00349 + 350 | 0 | 00350 + 351 | 1 | 00351 + 353 | 3 | 00353 + 354 | 4 | 00354 + 356 | 6 | 00356 + 357 | 7 | 00357 + 358 | 8 | 00358 + 359 | 9 | 00359 + 360 | 0 | 00360 + 361 | 1 | 00361 + 363 | 3 | 00363 + 364 | 4 | 00364 + 366 | 6 | 00366 + 367 | 7 | 00367 + 368 | 8 | 00368 + 369 | 9 | 00369 + 370 | 0 | 00370 + 371 | 1 | 00371 + 373 | 3 | 00373 + 374 | 4 | 00374 + 376 | 6 | 00376 + 377 | 7 | 00377 + 378 | 8 | 00378 + 379 | 9 | 00379 + 380 | 0 | 00380 + 381 | 1 | 00381 + 383 | 3 | 00383 + 384 | 4 | 00384 + 386 | 6 | 00386 + 387 | 7 | 00387 + 388 | 8 | 00388 + 389 | 9 | 00389 + 390 | 0 | 00390 + 391 | 1 | 00391 + 393 | 3 | 00393 + 394 | 4 | 00394 + 396 | 6 | 00396 + 397 | 7 | 00397 + 398 | 8 | 00398 + 399 | 9 | 00399 + 400 | 0 | 00400 + 401 | 1 | 00401 + 403 | 3 | 00403 + 404 | 4 | 00404 + 406 | 6 | 00406 + 407 | 7 | 00407 + 408 | 8 | 00408 + 409 | 9 | 00409 + 410 | 0 | 00410 + 411 | 1 | 00411 + 413 | 3 | 00413 + 414 | 4 | 00414 + 416 | 6 | 00416 + 417 | 7 | 00417 + 418 | 8 | 00418 + 419 | 9 | 00419 + 420 | 0 | 00420 + 421 | 1 | 00421 + 423 | 3 | 00423 + 424 | 4 | 00424 + 426 | 6 | 00426 + 427 | 7 | 00427 + 428 | 8 | 00428 + 429 | 9 | 00429 + 430 | 0 | 00430 + 431 | 1 | 00431 + 433 | 3 | 00433 + 434 | 4 | 00434 + 436 | 6 | 00436 + 437 | 7 | 00437 + 438 | 8 | 00438 + 439 | 9 | 00439 + 440 | 0 | 00440 + 441 | 1 | 00441 + 443 | 3 | 00443 + 444 | 4 | 00444 + 446 | 6 | 00446 + 447 | 7 | 00447 + 448 | 8 | 00448 + 449 | 9 | 00449 + 450 | 0 | 00450 + 451 | 1 | 00451 + 453 | 3 | 00453 + 454 | 4 | 00454 + 456 | 6 | 00456 + 457 | 7 | 00457 + 458 | 8 | 00458 + 459 | 9 | 00459 + 460 | 0 | 00460 + 461 | 1 | 00461 + 463 | 3 | 00463 + 464 | 4 | 00464 + 466 | 6 | 00466 + 467 | 7 | 00467 + 468 | 8 | 00468 + 469 | 9 | 00469 + 470 | 0 | 00470 + 471 | 1 | 00471 + 473 | 3 | 00473 + 474 | 4 | 00474 + 476 | 6 | 00476 + 477 | 7 | 00477 + 478 | 8 | 00478 + 479 | 9 | 00479 + 480 | 0 | 00480 + 481 | 1 | 00481 + 483 | 3 | 00483 + 484 | 4 | 00484 + 486 | 6 | 00486 + 487 | 7 | 00487 + 488 | 8 | 00488 + 489 | 9 | 00489 + 490 | 0 | 00490 + 491 | 1 | 00491 + 493 | 3 | 00493 + 494 | 4 | 00494 + 496 | 6 | 00496 + 497 | 7 | 00497 + 498 | 8 | 00498 + 499 | 9 | 00499 + 500 | 0 | 00500 + 501 | 1 | 00501 + 503 | 3 | 00503 + 504 | 4 | 00504 + 506 | 6 | 00506 + 507 | 7 | 00507 + 508 | 8 | 00508 + 509 | 9 | 00509 + 510 | 0 | 00510 + 511 | 1 | 00511 + 513 | 3 | 00513 + 514 | 4 | 00514 + 516 | 6 | 00516 + 517 | 7 | 00517 + 518 | 8 | 00518 + 519 | 9 | 00519 + 520 | 0 | 00520 + 521 | 1 | 00521 + 523 | 3 | 00523 + 524 | 4 | 00524 + 526 | 6 | 00526 + 527 | 7 | 00527 + 528 | 8 | 00528 + 529 | 9 | 00529 + 530 | 0 | 00530 + 531 | 1 | 00531 + 533 | 3 | 00533 + 534 | 4 | 00534 + 536 | 6 | 00536 + 537 | 7 | 00537 + 538 | 8 | 00538 + 539 | 9 | 00539 + 540 | 0 | 00540 + 541 | 1 | 00541 + 543 | 3 | 00543 + 544 | 4 | 00544 + 546 | 6 | 00546 + 547 | 7 | 00547 + 548 | 8 | 00548 + 549 | 9 | 00549 + 550 | 0 | 00550 + 551 | 1 | 00551 + 553 | 3 | 00553 + 554 | 4 | 00554 + 556 | 6 | 00556 + 557 | 7 | 00557 + 558 | 8 | 00558 + 559 | 9 | 00559 + 560 | 0 | 00560 + 561 | 1 | 00561 + 563 | 3 | 00563 + 564 | 4 | 00564 + 566 | 6 | 00566 + 567 | 7 | 00567 + 568 | 8 | 00568 + 569 | 9 | 00569 + 570 | 0 | 00570 + 571 | 1 | 00571 + 573 | 3 | 00573 + 574 | 4 | 00574 + 576 | 6 | 00576 + 577 | 7 | 00577 + 578 | 8 | 00578 + 579 | 9 | 00579 + 580 | 0 | 00580 + 581 | 1 | 00581 + 583 | 3 | 00583 + 584 | 4 | 00584 + 586 | 6 | 00586 + 587 | 7 | 00587 + 588 | 8 | 00588 + 589 | 9 | 00589 + 590 | 0 | 00590 + 591 | 1 | 00591 + 593 | 3 | 00593 + 594 | 4 | 00594 + 596 | 6 | 00596 + 597 | 7 | 00597 + 598 | 8 | 00598 + 599 | 9 | 00599 + 600 | 0 | 00600 + 601 | 1 | 00601 + 603 | 3 | 00603 + 604 | 4 | 00604 + 606 | 6 | 00606 + 607 | 7 | 00607 + 608 | 8 | 00608 + 609 | 9 | 00609 + 610 | 0 | 00610 + 611 | 1 | 00611 + 613 | 3 | 00613 + 614 | 4 | 00614 + 616 | 6 | 00616 + 617 | 7 | 00617 + 618 | 8 | 00618 + 619 | 9 | 00619 + 620 | 0 | 00620 + 621 | 1 | 00621 + 623 | 3 | 00623 + 624 | 4 | 00624 + 626 | 6 | 00626 + 627 | 7 | 00627 + 628 | 8 | 00628 + 629 | 9 | 00629 + 630 | 0 | 00630 + 631 | 1 | 00631 + 633 | 3 | 00633 + 634 | 4 | 00634 + 636 | 6 | 00636 + 637 | 7 | 00637 + 638 | 8 | 00638 + 639 | 9 | 00639 + 640 | 0 | 00640 + 641 | 1 | 00641 + 643 | 3 | 00643 + 644 | 4 | 00644 + 646 | 6 | 00646 + 647 | 7 | 00647 + 648 | 8 | 00648 + 649 | 9 | 00649 + 650 | 0 | 00650 + 651 | 1 | 00651 + 653 | 3 | 00653 + 654 | 4 | 00654 + 656 | 6 | 00656 + 657 | 7 | 00657 + 658 | 8 | 00658 + 659 | 9 | 00659 + 660 | 0 | 00660 + 661 | 1 | 00661 + 663 | 3 | 00663 + 664 | 4 | 00664 + 666 | 6 | 00666 + 667 | 7 | 00667 + 668 | 8 | 00668 + 669 | 9 | 00669 + 670 | 0 | 00670 + 671 | 1 | 00671 + 673 | 3 | 00673 + 674 | 4 | 00674 + 676 | 6 | 00676 + 677 | 7 | 00677 + 678 | 8 | 00678 + 679 | 9 | 00679 + 680 | 0 | 00680 + 681 | 1 | 00681 + 683 | 3 | 00683 + 684 | 4 | 00684 + 686 | 6 | 00686 + 687 | 7 | 00687 + 688 | 8 | 00688 + 689 | 9 | 00689 + 690 | 0 | 00690 + 691 | 1 | 00691 + 693 | 3 | 00693 + 694 | 4 | 00694 + 696 | 6 | 00696 + 697 | 7 | 00697 + 698 | 8 | 00698 + 699 | 9 | 00699 + 700 | 0 | 00700 + 701 | 1 | 00701 + 703 | 3 | 00703 + 704 | 4 | 00704 + 706 | 6 | 00706 + 707 | 7 | 00707 + 708 | 8 | 00708 + 709 | 9 | 00709 + 710 | 0 | 00710 + 711 | 1 | 00711 + 713 | 3 | 00713 + 714 | 4 | 00714 + 716 | 6 | 00716 + 717 | 7 | 00717 + 718 | 8 | 00718 + 719 | 9 | 00719 + 720 | 0 | 00720 + 721 | 1 | 00721 + 723 | 3 | 00723 + 724 | 4 | 00724 + 726 | 6 | 00726 + 727 | 7 | 00727 + 728 | 8 | 00728 + 729 | 9 | 00729 + 730 | 0 | 00730 + 731 | 1 | 00731 + 733 | 3 | 00733 + 734 | 4 | 00734 + 736 | 6 | 00736 + 737 | 7 | 00737 + 738 | 8 | 00738 + 739 | 9 | 00739 + 740 | 0 | 00740 + 741 | 1 | 00741 + 743 | 3 | 00743 + 744 | 4 | 00744 + 746 | 6 | 00746 + 747 | 7 | 00747 + 748 | 8 | 00748 + 749 | 9 | 00749 + 750 | 0 | 00750 + 751 | 1 | 00751 + 753 | 3 | 00753 + 754 | 4 | 00754 + 756 | 6 | 00756 + 757 | 7 | 00757 + 758 | 8 | 00758 + 759 | 9 | 00759 + 760 | 0 | 00760 + 761 | 1 | 00761 + 763 | 3 | 00763 + 764 | 4 | 00764 + 766 | 6 | 00766 + 767 | 7 | 00767 + 768 | 8 | 00768 + 769 | 9 | 00769 + 770 | 0 | 00770 + 771 | 1 | 00771 + 773 | 3 | 00773 + 774 | 4 | 00774 + 776 | 6 | 00776 + 777 | 7 | 00777 + 778 | 8 | 00778 + 779 | 9 | 00779 + 780 | 0 | 00780 + 781 | 1 | 00781 + 783 | 3 | 00783 + 784 | 4 | 00784 + 786 | 6 | 00786 + 787 | 7 | 00787 + 788 | 8 | 00788 + 789 | 9 | 00789 + 790 | 0 | 00790 + 791 | 1 | 00791 + 793 | 3 | 00793 + 794 | 4 | 00794 + 796 | 6 | 00796 + 797 | 7 | 00797 + 798 | 8 | 00798 + 799 | 9 | 00799 + 800 | 0 | 00800 + 801 | 1 | 00801 + 803 | 3 | 00803 + 804 | 4 | 00804 + 806 | 6 | 00806 + 807 | 7 | 00807 + 808 | 8 | 00808 + 809 | 9 | 00809 + 810 | 0 | 00810 + 811 | 1 | 00811 + 813 | 3 | 00813 + 814 | 4 | 00814 + 816 | 6 | 00816 + 817 | 7 | 00817 + 818 | 8 | 00818 + 819 | 9 | 00819 + 820 | 0 | 00820 + 821 | 1 | 00821 + 823 | 3 | 00823 + 824 | 4 | 00824 + 826 | 6 | 00826 + 827 | 7 | 00827 + 828 | 8 | 00828 + 829 | 9 | 00829 + 830 | 0 | 00830 + 831 | 1 | 00831 + 833 | 3 | 00833 + 834 | 4 | 00834 + 836 | 6 | 00836 + 837 | 7 | 00837 + 838 | 8 | 00838 + 839 | 9 | 00839 + 840 | 0 | 00840 + 841 | 1 | 00841 + 843 | 3 | 00843 + 844 | 4 | 00844 + 846 | 6 | 00846 + 847 | 7 | 00847 + 848 | 8 | 00848 + 849 | 9 | 00849 + 850 | 0 | 00850 + 851 | 1 | 00851 + 853 | 3 | 00853 + 854 | 4 | 00854 + 856 | 6 | 00856 + 857 | 7 | 00857 + 858 | 8 | 00858 + 859 | 9 | 00859 + 860 | 0 | 00860 + 861 | 1 | 00861 + 863 | 3 | 00863 + 864 | 4 | 00864 + 866 | 6 | 00866 + 867 | 7 | 00867 + 868 | 8 | 00868 + 869 | 9 | 00869 + 870 | 0 | 00870 + 871 | 1 | 00871 + 873 | 3 | 00873 + 874 | 4 | 00874 + 876 | 6 | 00876 + 877 | 7 | 00877 + 878 | 8 | 00878 + 879 | 9 | 00879 + 880 | 0 | 00880 + 881 | 1 | 00881 + 883 | 3 | 00883 + 884 | 4 | 00884 + 886 | 6 | 00886 + 887 | 7 | 00887 + 888 | 8 | 00888 + 889 | 9 | 00889 + 890 | 0 | 00890 + 891 | 1 | 00891 + 893 | 3 | 00893 + 894 | 4 | 00894 + 896 | 6 | 00896 + 897 | 7 | 00897 + 898 | 8 | 00898 + 899 | 9 | 00899 + 900 | 0 | 00900 + 901 | 1 | 00901 + 903 | 3 | 00903 + 904 | 4 | 00904 + 906 | 6 | 00906 + 907 | 7 | 00907 + 908 | 8 | 00908 + 909 | 9 | 00909 + 910 | 0 | 00910 + 911 | 1 | 00911 + 913 | 3 | 00913 + 914 | 4 | 00914 + 916 | 6 | 00916 + 917 | 7 | 00917 + 918 | 8 | 00918 + 919 | 9 | 00919 + 920 | 0 | 00920 + 921 | 1 | 00921 + 923 | 3 | 00923 + 924 | 4 | 00924 + 926 | 6 | 00926 + 927 | 7 | 00927 + 928 | 8 | 00928 + 929 | 9 | 00929 + 930 | 0 | 00930 + 931 | 1 | 00931 + 933 | 3 | 00933 + 934 | 4 | 00934 + 936 | 6 | 00936 + 937 | 7 | 00937 + 938 | 8 | 00938 + 939 | 9 | 00939 + 940 | 0 | 00940 + 941 | 1 | 00941 + 943 | 3 | 00943 + 944 | 4 | 00944 + 946 | 6 | 00946 + 947 | 7 | 00947 + 948 | 8 | 00948 + 949 | 9 | 00949 + 950 | 0 | 00950 + 951 | 1 | 00951 + 953 | 3 | 00953 + 954 | 4 | 00954 + 956 | 6 | 00956 + 957 | 7 | 00957 + 958 | 8 | 00958 + 959 | 9 | 00959 + 960 | 0 | 00960 + 961 | 1 | 00961 + 963 | 3 | 00963 + 964 | 4 | 00964 + 966 | 6 | 00966 + 967 | 7 | 00967 + 968 | 8 | 00968 + 969 | 9 | 00969 + 970 | 0 | 00970 + 971 | 1 | 00971 + 973 | 3 | 00973 + 974 | 4 | 00974 + 976 | 6 | 00976 + 977 | 7 | 00977 + 978 | 8 | 00978 + 979 | 9 | 00979 + 980 | 0 | 00980 + 981 | 1 | 00981 + 983 | 3 | 00983 + 984 | 4 | 00984 + 986 | 6 | 00986 + 987 | 7 | 00987 + 988 | 8 | 00988 + 989 | 9 | 00989 + 990 | 0 | 00990 + 991 | 1 | 00991 + 993 | 3 | 00993 + 994 | 4 | 00994 + 996 | 6 | 00996 + 997 | 7 | 00997 + 998 | 8 | 00998 + 999 | 9 | 00999 + 1000 | 0 | 01000 + 1001 | 101 | 0000100001 + 1003 | 103 | 0000300003 + 1004 | 104 | 0000400004 + 1006 | 106 | 0000600006 + 1007 | 107 | 0000700007 + 1008 | 108 | 0000800008 + 1009 | 109 | 0000900009 + 1010 | 100 | 0001000010 + 1011 | 101 | 0001100011 + 1013 | 103 | 0001300013 + 1014 | 104 | 0001400014 + 1016 | 106 | 0001600016 + 1017 | 107 | 0001700017 + 1018 | 108 | 0001800018 + 1019 | 109 | 0001900019 + 1020 | 100 | 0002000020 + 1101 | 201 | aaa + 1103 | 203 | ccc + 1104 | 204 | ddd +(819 rows) + +--Testcase 443: +EXPLAIN (verbose, costs off) +INSERT INTO ft2 (c1,c2,c3) VALUES (1200,999,'foo'); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Insert on public.ft2 + Batch Size: 1 + -> Result + Output: 1200, 999, NULL::integer, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft2 '::character(10), NULL::text +(4 rows) + +--Testcase 444: +INSERT INTO ft2 (c1,c2,c3) VALUES (1200,999,'foo'); +--Testcase 445: +SELECT c1 FROM ft2 WHERE c1 = 1200 AND c2 = 999; + c1 +------ + 1200 +(1 row) + +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; -- can be pushed down +--UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; +--Testcase 446: +EXPLAIN (verbose, costs off) +DELETE FROM ft2 WHERE c1 = 1200; + QUERY PLAN +----------------------------------------------------------------------------- + Delete on public.ft2 + -> Foreign Scan on public.ft2 + Output: c3, "time" + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = 1200)) +(4 rows) + +--Testcase 447: +SELECT c1 FROM ft2 WHERE c1 = 1200; + c1 +------ + 1200 +(1 row) + +--Testcase 448: +DELETE FROM ft2 WHERE c1 = 1200; +--Testcase 449: +SELECT c1 FROM ft2 WHERE c1 = 1200; + c1 +---- +(0 rows) + +-- Test UPDATE/DELETE with RETURNING on a three-table join +--Testcase 450: +INSERT INTO ft2 (c1,c2,c3) + SELECT id, id - 1200, to_char(id, 'FM00000') FROM generate_series(1201, 1300) id; +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c3 = 'foo' +-- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) +-- WHERE ft2.c1 > 1200 AND ft2.c2 = ft4.c1 +-- RETURNING ft2, ft2.*, ft4, ft4.*; -- can be pushed down +--UPDATE ft2 SET c3 = 'foo' +-- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) +-- WHERE ft2.c1 > 1200 AND ft2.c2 = ft4.c1 +-- RETURNING ft2, ft2.*, ft4, ft4.*; +--Testcase 451: +EXPLAIN (verbose, costs off) +DELETE FROM ft2 + USING ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) + WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; -- can be pushed down + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------- + Delete on public.ft2 + -> Hash Right Join + Output: ft2.c3, ft2."time", ft4.*, ft5.* + Hash Cond: (ft5.c1 = ft4.c1) + -> Foreign Scan on public.ft5 + Output: ft5.*, ft5.c1 + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" + -> Hash + Output: ft2.c3, ft2."time", ft4.*, ft4.c1 + -> Hash Join + Output: ft2.c3, ft2."time", ft4.*, ft4.c1 + Hash Cond: (ft4.c1 = ft2.c2) + -> Foreign Scan on public.ft4 + Output: ft4.*, ft4.c1 + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" + -> Hash + Output: ft2.c3, ft2."time", ft2.c2 + -> Foreign Scan on public.ft2 + Output: ft2.c3, ft2."time", ft2.c2 + InfluxDB query: SELECT "c2", "c3" FROM "T1" WHERE (("C 1" > 1200)) AND ((("C 1" % 10) = 0)) +(20 rows) + +--Testcase 452: +SELECT 100 FROM ft2, + ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) + WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; + ?column? +---------- + 100 + 100 + 100 + 100 + 100 + 100 + 100 + 100 + 100 + 100 +(10 rows) + +--Testcase 453: +DELETE FROM ft2 + USING ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) + WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; +--Testcase 454: +SELECT 100 FROM ft2, + ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) + WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; + ?column? +---------- +(0 rows) + +--Testcase 455: +DELETE FROM ft2 WHERE ft2.c1 > 1200; +-- Test UPDATE with a MULTIEXPR sub-select +-- (maybe someday this'll be remotely executable, but not today) +--EXPLAIN (verbose, costs off) +--UPDATE ft2 AS target SET (c2, c7) = ( +-- SELECT c2 * 10, c7 +-- FROM ft2 AS src +-- WHERE target.c1 = src.c1 +--) WHERE c1 > 1100; +--UPDATE ft2 AS target SET (c2, c7) = ( +-- SELECT c2 * 10, c7 +-- FROM ft2 AS src +-- WHERE targ--et.c1 = src.c1 +--) WHERE c1 > 1100; +--UPDATE ft2 AS target SET (c2) = ( +-- SELECT c2 / 10 +-- FROM ft2 AS src +-- WHERE targ--et.c1 = src.c1 +--) WHERE c1 > 1100; +-- Test UPDATE involving a join that can be pushed down, +-- but a SET clause that can't be +-- EXPLAIN (VERBOSE, COSTS OFF) +-- UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END +-- FROM ft2 AS t WHERE d.c1 = t.c1 AND d.c1 > 1000; +-- UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END +-- FROM ft2 AS t WHERE d.c1 = t.c1 AND d.c1 > 1000; +-- Test UPDATE/DELETE with WHERE or JOIN/ON conditions containing +-- user-defined operators/functions +--Testcase 456: +INSERT INTO ft2 (c1,c2,c3) + SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id; +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c3 = 'bar' WHERE influxdb_fdw_abs(c1) > 2000 RETURNING *; -- can't be pushed down +--UPDATE ft2 SET c3 = 'bar' WHERE influxdb_fdw_abs(c1) > 2000 RETURNING *; +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c3 = 'baz' +-- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) +-- WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 +-- RETURNING ft2.*, ft4.*, ft5.*; -- can't be pushed down +--UPDATE ft2 SET c3 = 'baz' +-- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) +-- WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 +-- RETURNING ft2.*, ft4.*, ft5.*; +--Testcase 457: +EXPLAIN (verbose, costs off) +DELETE FROM ft2 + USING ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) + WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; -- can't be pushed down + QUERY PLAN +---------------------------------------------------------------------------------------------- + Delete on public.ft2 + -> Nested Loop + Output: ft2.c3, ft2."time", ft4.*, ft5.* + Join Filter: (ft4.c1 === ft5.c1) + -> Hash Join + Output: ft2.c3, ft2."time", ft4.*, ft4.c1 + Hash Cond: (ft4.c1 = ft2.c2) + -> Foreign Scan on public.ft4 + Output: ft4.*, ft4.c1 + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" + -> Hash + Output: ft2.c3, ft2."time", ft2.c2 + -> Foreign Scan on public.ft2 + Output: ft2.c3, ft2."time", ft2.c2 + InfluxDB query: SELECT "c2", "c3" FROM "T1" WHERE (("C 1" > 2000)) + -> Materialize + Output: ft5.*, ft5.c1 + -> Foreign Scan on public.ft5 + Output: ft5.*, ft5.c1 + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" +(20 rows) + +--Testcase 458: +SELECT ft2.c1, ft2.c2, ft2.c3 + FROM ft2, ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) + WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; + c1 | c2 | c3 +------+----+------- + 2006 | 6 | 02006 +(1 row) + +--Testcase 459: +DELETE FROM ft2 + USING ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) + WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; +--Testcase 460: +SELECT ft2.c1, ft2.c2, ft2.c3 + FROM ft2, ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) + WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; + c1 | c2 | c3 +----+----+---- +(0 rows) + +--Testcase 461: +DELETE FROM ft2 WHERE ft2.c1 > 2000; +-- Test that trigger on remote table works as expected +--Testcase 462: +CREATE OR REPLACE FUNCTION "S 1".F_BRTRIG() RETURNS trigger AS $$ +BEGIN + NEW.c3 = NEW.c3 || '_trig_update'; + RETURN NEW; +END; +$$ LANGUAGE plpgsql; +--Testcase 463: +CREATE TRIGGER t1_br_insert BEFORE INSERT OR UPDATE + ON "S 1"."T 1" FOR EACH ROW EXECUTE PROCEDURE "S 1".F_BRTRIG(); +--Testcase 464: +INSERT INTO ft2 (c1,c2,c3) VALUES (1208, 818, 'fff'); +--Testcase 465: +SELECT c1, c2, c3, c6, c7, c8 FROM ft2 WHERE c1 = 1208; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+-----+----+------------+---- + 1208 | 818 | fff | | ft2 | +(1 row) + +--Testcase 466: +INSERT INTO ft2 (c1,c2,c3,c6) VALUES (1218, 818, 'ggg', '(--;'); +--Testcase 467: +SELECT c1, c2, c3, c6, c7, c8 FROM ft2 WHERE c1 = 1218; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+-----+------+------------+---- + 1218 | 818 | ggg | (--; | ft2 | +(1 row) + +--UPDATE ft2 SET c2 = c2 + 600 WHERE c1 % 10 = 8 AND c1 < 1200 RETURNING *; +-- Test errors thrown on remote side during update +--Testcase 468: +ALTER TABLE "S 1"."T 1" ADD CONSTRAINT c2positive CHECK (c2 >= 0); +-- influxdb_fdw does not support key, ON CONFLICT +--INSERT INTO ft1(c1, c2) VALUES(11, 12); -- duplicate key +--Testcase 469: +INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT DO NOTHING; -- works +ERROR: ON CONFLICT is not supported +--Testcase 470: +INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO NOTHING; -- unsupported +ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification +--Testcase 471: +INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO UPDATE SET c3 = 'ffg'; -- unsupported +ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification +--INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive +--UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive +/* +-- influxdb_fdw does not support transactions +-- Test savepoint/rollback behavior +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; +begin; +update ft2 set c2 = 42 where c2 = 0; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +savepoint s1; +update ft2 set c2 = 44 where c2 = 4; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +release savepoint s1; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +savepoint s2; +update ft2 set c2 = 46 where c2 = 6; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +rollback to savepoint s2; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +release savepoint s2; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +savepoint s3; +update ft2 set c2 = -2 where c2 = 42 and c1 = 10; -- fail on remote side +rollback to savepoint s3; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +release savepoint s3; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +-- none of the above is committed yet remotely +select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; +commit; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; +*/ +-- Above DMLs add data with c6 as NULL in ft1, so test ORDER BY NULLS LAST and NULLs +-- FIRST behavior here. +-- ORDER BY DESC NULLS LAST options +--Testcase 472: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY c6 DESC NULLS LAST, c1 OFFSET 795 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------ + Limit + Output: c1, c2, c3, "time", c6, c7, c8 + -> Sort + Output: c1, c2, c3, "time", c6, c7, c8 + Sort Key: ft1.c6 DESC NULLS LAST, ft1.c1 + -> Foreign Scan on public.ft1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(8 rows) + +--Testcase 473: +SELECT c1, c2, c3, c6, c7, c8 FROM ft1 ORDER BY c6 DESC NULLS LAST, c1 OFFSET 795 LIMIT 10; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+------------+------+------------+----- + 960 | 0 | 00960 | 0 | 0 | foo + 970 | 0 | 00970 | 0 | 0 | foo + 980 | 0 | 00980 | 0 | 0 | foo + 990 | 0 | 00990 | 0 | 0 | foo + 1000 | 0 | 01000 | 0 | 0 | foo + 1218 | 818 | ggg | (--; | ft2 | + 1001 | 101 | 0000100001 | | ft2 | + 1003 | 103 | 0000300003 | | ft2 | + 1004 | 104 | 0000400004 | | ft2 | + 1006 | 106 | 0000600006 | | ft2 | +(10 rows) + +-- ORDER BY DESC NULLS FIRST options +--Testcase 474: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY c6 DESC NULLS FIRST, c1 OFFSET 15 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------ + Limit + Output: c1, c2, c3, "time", c6, c7, c8 + -> Sort + Output: c1, c2, c3, "time", c6, c7, c8 + Sort Key: ft1.c6 DESC, ft1.c1 + -> Foreign Scan on public.ft1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(8 rows) + +--Testcase 475: +SELECT c1, c2, c3, c6, c7, c8 FROM ft1 ORDER BY c6 DESC NULLS FIRST, c1 OFFSET 15 LIMIT 10; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+------------+----+------------+----- + 1020 | 100 | 0002000020 | | ft2 | + 1101 | 201 | aaa | | ft2 | + 1103 | 203 | ccc | | ft2 | + 1104 | 204 | ddd | | ft2 | + 1208 | 818 | fff | | ft2 | + 9 | 9 | 00009 | 9 | 9 | foo + 19 | 9 | 00019 | 9 | 9 | foo + 29 | 9 | 00029 | 9 | 9 | foo + 39 | 9 | 00039 | 9 | 9 | foo + 49 | 9 | 00049 | 9 | 9 | foo +(10 rows) + +-- ORDER BY ASC NULLS FIRST options +--Testcase 476: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY c6 ASC NULLS FIRST, c1 OFFSET 15 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------ + Limit + Output: c1, c2, c3, "time", c6, c7, c8 + -> Sort + Output: c1, c2, c3, "time", c6, c7, c8 + Sort Key: ft1.c6 NULLS FIRST, ft1.c1 + -> Foreign Scan on public.ft1 + Output: c1, c2, c3, "time", c6, c7, c8 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" +(8 rows) + +--Testcase 477: +SELECT c1, c2, c3, c6, c7, c8 FROM ft1 ORDER BY c6 ASC NULLS FIRST, c1 OFFSET 15 LIMIT 10; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+------------+------+------------+----- + 1020 | 100 | 0002000020 | | ft2 | + 1101 | 201 | aaa | | ft2 | + 1103 | 203 | ccc | | ft2 | + 1104 | 204 | ddd | | ft2 | + 1208 | 818 | fff | | ft2 | + 1218 | 818 | ggg | (--; | ft2 | + 10 | 0 | 00010 | 0 | 0 | foo + 20 | 0 | 00020 | 0 | 0 | foo + 30 | 0 | 00030 | 0 | 0 | foo + 40 | 0 | 00040 | 0 | 0 | foo +(10 rows) + +-- =================================================================== +-- test check constraints +-- =================================================================== +-- Consistent check constraints provide consistent results +--Testcase 478: +ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2positive CHECK (c2 >= 0); +--Testcase 479: +EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 < 0; + QUERY PLAN +---------------------------------------------------------------- + Foreign Scan + Output: (count(*)) + InfluxDB query: SELECT count(*) FROM "T1" WHERE (("c2" < 0)) +(3 rows) + +-- InfluxDB return null value because it does not have any record. +--Testcase 480: +SELECT count(*) FROM ft1 WHERE c2 < 0; + count +------- +(0 rows) + +--Testcase 481: +SET constraint_exclusion = 'on'; +--Testcase 482: +EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 < 0; + QUERY PLAN +-------------------------------- + Aggregate + Output: count(*) + -> Result + One-Time Filter: false +(4 rows) + +--Testcase 483: +SELECT count(*) FROM ft1 WHERE c2 < 0; + count +------- + 0 +(1 row) + +--Testcase 484: +RESET constraint_exclusion; +-- check constraint is enforced on the remote side, not locally +-- INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive +-- UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive +--Testcase 485: +ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2positive; +-- But inconsistent check constraints provide inconsistent results +--Testcase 486: +ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2negative CHECK (c2 < 0); +--Testcase 487: +EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 >= 0; + QUERY PLAN +----------------------------------------------------------------- + Foreign Scan + Output: (count(*)) + InfluxDB query: SELECT count(*) FROM "T1" WHERE (("c2" >= 0)) +(3 rows) + +--Testcase 488: +SELECT count(*) FROM ft1 WHERE c2 >= 0; + count +------- + 821 +(1 row) + +--Testcase 489: +SET constraint_exclusion = 'on'; +--Testcase 490: +EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 >= 0; + QUERY PLAN +-------------------------------- + Aggregate + Output: count(*) + -> Result + One-Time Filter: false +(4 rows) + +--Testcase 491: +SELECT count(*) FROM ft1 WHERE c2 >= 0; + count +------- + 0 +(1 row) + +--Testcase 492: +RESET constraint_exclusion; +-- local check constraint is not actually enforced +--Testcase 493: +INSERT INTO ft1(c1, c2) VALUES(1111, 2); +-- UPDATE ft1 SET c2 = c2 + 1 WHERE c1 = 1; +--Testcase 494: +ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2negative; +-- influxdb_fdw does not support this feature +-- =================================================================== +-- test WITH CHECK OPTION constraints +-- =================================================================== +--Testcase 495: +CREATE FUNCTION row_before_insupd_trigfunc() RETURNS trigger AS $$BEGIN NEW.a := NEW.a + 10; RETURN NEW; END$$ LANGUAGE plpgsql; +--Testcase 496: +CREATE FOREIGN TABLE base_tbl (a int, b int) SERVER influxdb_svr OPTIONS (table 'base_tbl'); +--ALTER FOREIGN TABLE base_tbl SET (autovacuum_enabled = 'false'); +--Testcase 497: +CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON base_tbl FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); +--Testcase 498: +CREATE FOREIGN TABLE foreign_tbl (a int, b int) + SERVER influxdb_svr OPTIONS (table 'base_tbl'); +--Testcase 499: +CREATE VIEW rw_view AS SELECT * FROM base_tbl + WHERE a < b WITH CHECK OPTION; +--Testcase 500: +\d+ rw_view + View "public.rw_view" + Column | Type | Collation | Nullable | Default | Storage | Description +--------+---------+-----------+----------+---------+---------+------------- + a | integer | | | | plain | + b | integer | | | | plain | +View definition: + SELECT base_tbl.a, + base_tbl.b + FROM base_tbl + WHERE base_tbl.a < base_tbl.b; +Options: check_option=cascaded + +--Testcase 501: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 5); + QUERY PLAN +--------------------------- + Insert on public.base_tbl + Batch Size: 1 + -> Result + Output: 0, 5 +(4 rows) + +--Testcase 502: +INSERT INTO rw_view VALUES (0, 5); -- should fail +ERROR: new row violates check option for view "rw_view" +DETAIL: Failing row contains (10, 5). +--Testcase 503: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15); + QUERY PLAN +--------------------------- + Insert on public.base_tbl + Batch Size: 1 + -> Result + Output: 0, 15 +(4 rows) + +--Testcase 504: +INSERT INTO rw_view VALUES (0, 15); -- ok +--Testcase 505: +SELECT * FROM foreign_tbl; + a | b +----+---- + 10 | 5 + 10 | 15 +(2 rows) + +--EXPLAIN (VERBOSE, COSTS OFF) +--UPDATE rw_view SET b = b + 5; +--UPDATE rw_view SET b = b + 5; -- should fail +--EXPLAIN (VERBOSE, COSTS OFF) +--UPDATE rw_view SET b = b + 15; +--UPDATE rw_view SET b = b + 15; -- ok +--SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +--Testcase 827: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); + QUERY PLAN +-------------------------------------------------------- + Insert on public.base_tbl + Batch Size: 1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, "*VALUES*".column2 +(4 rows) + +--Testcase 828: +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +ERROR: new row violates check option for view "rw_view" +DETAIL: Failing row contains (10, 5). +--Testcase 829: +SELECT * FROM foreign_tbl; + a | b +----+---- + 10 | 5 + 10 | 15 + 10 | 15 + 10 | 5 +(4 rows) + +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); +--Testcase 506: +DELETE FROM foreign_tbl; +--Testcase 784: +DROP FOREIGN TABLE foreign_tbl CASCADE; +--Testcase 507: +DROP TRIGGER row_before_insupd_trigger ON base_tbl; +--Testcase 508: +DROP FOREIGN TABLE base_tbl CASCADE; +NOTICE: drop cascades to view rw_view +-- influxdb_fdw does not support partitions +-- test WCO for partitions +--Testcase 509: +CREATE FOREIGN TABLE child_tbl (a int, b int) SERVER influxdb_svr OPTIONS (table 'child_tbl'); +--ALTER FOREIGN TABLE child_tbl SET (autovacuum_enabled = 'false'); +--Testcase 510: +CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON child_tbl FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); +--Testcase 511: +CREATE FOREIGN TABLE foreign_tbl (a int, b int) + SERVER influxdb_svr OPTIONS (table 'child_tbl'); +--Testcase 512: +CREATE TABLE parent_tbl (a int, b int) PARTITION BY RANGE(a); +--Testcase 513: +ALTER TABLE parent_tbl ATTACH PARTITION child_tbl FOR VALUES FROM (0) TO (100); +-- Detach and re-attach once, to stress the concurrent detach case. +--Testcase 774: +ALTER TABLE parent_tbl DETACH PARTITION child_tbl CONCURRENTLY; +--Testcase 775: +ALTER TABLE parent_tbl ATTACH PARTITION child_tbl FOR VALUES FROM (0) TO (100); +--Testcase 514: +CREATE VIEW rw_view AS SELECT * FROM parent_tbl + WHERE a < b WITH CHECK OPTION; +--Testcase 515: +\d+ rw_view + View "public.rw_view" + Column | Type | Collation | Nullable | Default | Storage | Description +--------+---------+-----------+----------+---------+---------+------------- + a | integer | | | | plain | + b | integer | | | | plain | +View definition: + SELECT parent_tbl.a, + parent_tbl.b + FROM parent_tbl + WHERE parent_tbl.a < parent_tbl.b; +Options: check_option=cascaded + +--Testcase 516: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 5); + QUERY PLAN +----------------------------- + Insert on public.parent_tbl + -> Result + Output: 0, 5 +(3 rows) + +--Testcase 517: +INSERT INTO rw_view VALUES (0, 5); -- should fail +ERROR: Not support partition insert +--Testcase 518: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15); + QUERY PLAN +----------------------------- + Insert on public.parent_tbl + -> Result + Output: 0, 15 +(3 rows) + +--Testcase 519: +INSERT INTO rw_view VALUES (0, 15); -- ok +ERROR: Not support partition insert +--Testcase 520: +SELECT * FROM foreign_tbl; + a | b +---+--- +(0 rows) + +--EXPLAIN (VERBOSE, COSTS OFF) +--UPDATE rw_view SET b = b + 5; +--UPDATE rw_view SET b = b + 5; -- should fail +--EXPLAIN (VERBOSE, COSTS OFF) +--UPDATE rw_view SET b = b + 15; +--UPDATE rw_view SET b = b + 15; -- ok +--SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +--Testcase 830: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); + QUERY PLAN +-------------------------------------------------------- + Insert on public.parent_tbl + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, "*VALUES*".column2 +(3 rows) + +--Testcase 831: +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +ERROR: Not support partition insert +--Testcase 832: +SELECT * FROM foreign_tbl; + a | b +---+--- +(0 rows) + +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); +--Testcase 521: +DROP FOREIGN TABLE foreign_tbl CASCADE; +--Testcase 522: +DROP TRIGGER row_before_insupd_trigger ON child_tbl; +--Testcase 523: +DROP FOREIGN TABLE child_tbl CASCADE; +--Testcase 524: +DROP TABLE parent_tbl CASCADE; +NOTICE: drop cascades to view rw_view +--Testcase 525: +DROP FUNCTION row_before_insupd_trigfunc; +-- =================================================================== +-- test serial columns (ie, sequence-based defaults) +-- =================================================================== +--Testcase 526: +create foreign table loc1 (f1 serial, f2 text) + server influxdb_svr options(table 'loc1'); +--alter foreign table loc1 set (autovacuum_enabled = 'false'); +--Testcase 527: +create foreign table rem1 (f1 serial, f2 text) + server influxdb_svr options(table 'loc1'); +--Testcase 528: +select pg_catalog.setval('rem1_f1_seq', 10, false); + setval +-------- + 10 +(1 row) + +--Testcase 529: +insert into loc1(f2) values('hi'); +--Testcase 530: +insert into rem1(f2) values('hi remote'); +--Testcase 531: +insert into loc1(f2) values('bye'); +--Testcase 532: +insert into rem1(f2) values('bye remote'); +--Testcase 533: +select * from loc1; + f1 | f2 +----+------------ + 1 | hi + 10 | hi remote + 2 | bye + 11 | bye remote +(4 rows) + +--Testcase 534: +select * from rem1; + f1 | f2 +----+------------ + 1 | hi + 10 | hi remote + 2 | bye + 11 | bye remote +(4 rows) + +-- =================================================================== +-- test generated columns +-- =================================================================== +--Testcase 535: +create foreign table gloc1 ( + a int, + b int generated always as (a * 2) stored) + server influxdb_svr options(table 'gloc1'); +--alter foreign table gloc1 set (autovacuum_enabled = 'false'); +--Testcase 536: +create foreign table grem1 ( + a int, + b int generated always as (a * 2) stored) + server influxdb_svr options(table 'gloc1'); +--Testcase 537: +explain (verbose, costs off) +insert into grem1 (a) values (1), (22); + QUERY PLAN +--------------------------------------------------- + Insert on public.grem1 + Batch Size: 1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, NULL::integer +(4 rows) + +--Testcase 765: +insert into grem1 (a) values (1), (22); +--explain (verbose, costs off) +--update grem1 set a = 22 where a = 2; +--update grem1 set a = 22 where a = 2; +--Testcase 538: +select * from gloc1; + a | b +----+---- + 1 | 2 + 22 | 44 +(2 rows) + +--Testcase 539: +select * from grem1; + a | b +----+---- + 1 | 2 + 22 | 44 +(2 rows) + +--Testcase 766: +delete from grem1; +/* +-- InfluxDB FDW does not support partition insert +-- test copy from +copy grem1 from stdin; +1 +2 +\. +select * from gloc1; +select * from grem1; +delete from grem1; +*/ +-- test batch insert +--Testcase 767: +alter server influxdb_svr options (add batch_size '10'); +--Testcase 768: +explain (verbose, costs off) +insert into grem1 (a) values (1), (2); + QUERY PLAN +--------------------------------------------------- + Insert on public.grem1 + Batch Size: 10 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, NULL::integer +(4 rows) + +--Testcase 769: +insert into grem1 (a) values (1), (2); +--Testcase 770: +select * from gloc1; + a | b +---+--- + 1 | 2 + 2 | 4 +(2 rows) + +--Testcase 771: +select * from grem1; + a | b +---+--- + 1 | 2 + 2 | 4 +(2 rows) + +--Testcase 772: +delete from grem1; +--Testcase 773: +alter server influxdb_svr options (drop batch_size); +-- =================================================================== +-- test local triggers +-- =================================================================== +-- Trigger functions "borrowed" from triggers regress test. +--Testcase 540: +CREATE FUNCTION trigger_func() RETURNS trigger LANGUAGE plpgsql AS $$ +BEGIN + RAISE NOTICE 'trigger_func(%) called: action = %, when = %, level = %', + TG_ARGV[0], TG_OP, TG_WHEN, TG_LEVEL; + RETURN NULL; +END;$$; +--Testcase 541: +CREATE TRIGGER trig_stmt_before BEFORE DELETE OR INSERT OR UPDATE ON rem1 + FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); +--Testcase 542: +CREATE TRIGGER trig_stmt_after AFTER DELETE OR INSERT OR UPDATE ON rem1 + FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); +--Testcase 543: +CREATE OR REPLACE FUNCTION trigger_data() RETURNS trigger +LANGUAGE plpgsql AS $$ + +declare + oldnew text[]; + relid text; + argstr text; +begin + + relid := TG_relid::regclass; + argstr := ''; + for i in 0 .. TG_nargs - 1 loop + if i > 0 then + argstr := argstr || ', '; + end if; + argstr := argstr || TG_argv[i]; + end loop; + + RAISE NOTICE '%(%) % % % ON %', + tg_name, argstr, TG_when, TG_level, TG_OP, relid; + oldnew := '{}'::text[]; + if TG_OP != 'INSERT' then + oldnew := array_append(oldnew, format('OLD: %s', OLD)); + end if; + + if TG_OP != 'DELETE' then + oldnew := array_append(oldnew, format('NEW: %s', NEW)); + end if; + + RAISE NOTICE '%', array_to_string(oldnew, ','); + + if TG_OP = 'DELETE' then + return OLD; + else + return NEW; + end if; +end; +$$; +-- Test basic functionality +--Testcase 544: +CREATE TRIGGER trig_row_before +BEFORE INSERT OR UPDATE OR DELETE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 545: +CREATE TRIGGER trig_row_after +AFTER INSERT OR UPDATE OR DELETE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 546: +delete from rem1; +NOTICE: trigger_func() called: action = DELETE, when = BEFORE, level = STATEMENT +NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1 +NOTICE: OLD: (1,hi) +NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1 +NOTICE: OLD: (10,"hi remote") +NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1 +NOTICE: OLD: (2,bye) +NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1 +NOTICE: OLD: (11,"bye remote") +NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1 +NOTICE: OLD: (1,hi) +NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1 +NOTICE: OLD: (10,"hi remote") +NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1 +NOTICE: OLD: (2,bye) +NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1 +NOTICE: OLD: (11,"bye remote") +NOTICE: trigger_func() called: action = DELETE, when = AFTER, level = STATEMENT +--Testcase 547: +insert into rem1 values(1,'insert'); +NOTICE: trigger_func() called: action = INSERT, when = BEFORE, level = STATEMENT +NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1 +NOTICE: NEW: (1,insert) +NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1 +NOTICE: NEW: (1,insert) +NOTICE: trigger_func() called: action = INSERT, when = AFTER, level = STATEMENT +--update rem1 set f2 = 'update' where f1 = 1; +--update rem1 set f2 = f2 || f2; +-- cleanup +--Testcase 548: +DROP TRIGGER trig_row_before ON rem1; +--Testcase 549: +DROP TRIGGER trig_row_after ON rem1; +--Testcase 550: +DROP TRIGGER trig_stmt_before ON rem1; +--Testcase 551: +DROP TRIGGER trig_stmt_after ON rem1; +--Testcase 552: +DELETE from rem1; +-- Test multiple AFTER ROW triggers on a foreign table +--Testcase 553: +CREATE TRIGGER trig_row_after1 +AFTER INSERT OR UPDATE OR DELETE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 554: +CREATE TRIGGER trig_row_after2 +AFTER INSERT OR UPDATE OR DELETE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 555: +insert into rem1 values(1,'insert'); +NOTICE: trig_row_after1(23, skidoo) AFTER ROW INSERT ON rem1 +NOTICE: NEW: (1,insert) +NOTICE: trig_row_after2(23, skidoo) AFTER ROW INSERT ON rem1 +NOTICE: NEW: (1,insert) +--update rem1 set f2 = 'update' where f1 = 1; +--update rem1 set f2 = f2 || f2; +--Testcase 556: +delete from rem1; +NOTICE: trig_row_after1(23, skidoo) AFTER ROW DELETE ON rem1 +NOTICE: OLD: (1,insert) +NOTICE: trig_row_after2(23, skidoo) AFTER ROW DELETE ON rem1 +NOTICE: OLD: (1,insert) +-- cleanup +--Testcase 557: +DROP TRIGGER trig_row_after1 ON rem1; +--Testcase 558: +DROP TRIGGER trig_row_after2 ON rem1; +-- Test WHEN conditions +--Testcase 559: +CREATE TRIGGER trig_row_before_insupd +BEFORE INSERT OR UPDATE ON rem1 +FOR EACH ROW +WHEN (NEW.f2 like '%update%') +EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 560: +CREATE TRIGGER trig_row_after_insupd +AFTER INSERT OR UPDATE ON rem1 +FOR EACH ROW +WHEN (NEW.f2 like '%update%') +EXECUTE PROCEDURE trigger_data(23,'skidoo'); +-- Insert or update not matching: nothing happens +--Testcase 561: +INSERT INTO rem1 values(1, 'insert'); +--UPDATE rem1 set f2 = 'test'; +-- Insert or update matching: triggers are fired +--Testcase 562: +INSERT INTO rem1 values(2, 'update'); +NOTICE: trig_row_before_insupd(23, skidoo) BEFORE ROW INSERT ON rem1 +NOTICE: NEW: (2,update) +NOTICE: trig_row_after_insupd(23, skidoo) AFTER ROW INSERT ON rem1 +NOTICE: NEW: (2,update) +--UPDATE rem1 set f2 = 'update update' where f1 = '2'; +--Testcase 563: +CREATE TRIGGER trig_row_before_delete +BEFORE DELETE ON rem1 +FOR EACH ROW +WHEN (OLD.f2 like '%update%') +EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 564: +CREATE TRIGGER trig_row_after_delete +AFTER DELETE ON rem1 +FOR EACH ROW +WHEN (OLD.f2 like '%update%') +EXECUTE PROCEDURE trigger_data(23,'skidoo'); +-- Trigger is fired for f1=2, not for f1=1 +--Testcase 565: +DELETE FROM rem1; +NOTICE: trig_row_before_delete(23, skidoo) BEFORE ROW DELETE ON rem1 +NOTICE: OLD: (2,update) +NOTICE: trig_row_after_delete(23, skidoo) AFTER ROW DELETE ON rem1 +NOTICE: OLD: (2,update) +-- cleanup +--Testcase 566: +DROP TRIGGER trig_row_before_insupd ON rem1; +--Testcase 567: +DROP TRIGGER trig_row_after_insupd ON rem1; +--Testcase 568: +DROP TRIGGER trig_row_before_delete ON rem1; +--Testcase 569: +DROP TRIGGER trig_row_after_delete ON rem1; +-- Test various RETURN statements in BEFORE triggers. +--Testcase 570: +CREATE FUNCTION trig_row_before_insupdate() RETURNS TRIGGER AS $$ + BEGIN + NEW.f2 := NEW.f2 || ' triggered !'; + RETURN NEW; + END +$$ language plpgsql; +--Testcase 571: +CREATE TRIGGER trig_row_before_insupd +BEFORE INSERT OR UPDATE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); +-- The new values should have 'triggered' appended +--Testcase 572: +INSERT INTO rem1 values(1, 'insert'); +--Testcase 573: +SELECT * from loc1; + f1 | f2 +----+-------------------- + 1 | insert triggered ! +(1 row) + +--Testcase 574: +INSERT INTO rem1 values(2, 'insert'); +--Testcase 575: +SELECT f2 FROM rem1 WHERE f1 = 2; + f2 +-------------------- + insert triggered ! +(1 row) + +--Testcase 576: +SELECT * from loc1; + f1 | f2 +----+-------------------- + 1 | insert triggered ! + 2 | insert triggered ! +(2 rows) + +--UPDATE rem1 set f2 = ''; +--SELECT * from loc1; +--UPDATE rem1 set f2 = 'skidoo' RETURNING f2; +--SELECT * from loc1; +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f1 = 10; -- all columns should be transmitted +--UPDATE rem1 set f1 = 10; +--SELECT * from loc1; +--Testcase 577: +DELETE FROM rem1; +-- Add a second trigger, to check that the changes are propagated correctly +-- from trigger to trigger +--Testcase 578: +CREATE TRIGGER trig_row_before_insupd2 +BEFORE INSERT OR UPDATE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); +--Testcase 579: +INSERT INTO rem1 values(1, 'insert'); +--Testcase 580: +SELECT * from loc1; + f1 | f2 +----+-------------------------------- + 1 | insert triggered ! triggered ! +(1 row) + +--Testcase 581: +INSERT INTO rem1 values(2, 'insert'); +--Testcase 582: +SELECT f2 FROM rem1 WHERE f1 = 2; + f2 +-------------------------------- + insert triggered ! triggered ! +(1 row) + +--Testcase 583: +SELECT * from loc1; + f1 | f2 +----+-------------------------------- + 1 | insert triggered ! triggered ! + 2 | insert triggered ! triggered ! +(2 rows) + +--UPDATE rem1 set f2 = ''; +--SELECT * from loc1; +--UPDATE rem1 set f2 = 'skidoo' RETURNING f2; +--SELECT * from loc1; +--Testcase 584: +DROP TRIGGER trig_row_before_insupd ON rem1; +--Testcase 585: +DROP TRIGGER trig_row_before_insupd2 ON rem1; +--Testcase 586: +DELETE from rem1; +--Testcase 587: +INSERT INTO rem1 VALUES (1, 'test'); +-- Test with a trigger returning NULL +--Testcase 588: +CREATE FUNCTION trig_null() RETURNS TRIGGER AS $$ + BEGIN + RETURN NULL; + END +$$ language plpgsql; +--Testcase 589: +CREATE TRIGGER trig_null +BEFORE INSERT OR UPDATE OR DELETE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trig_null(); +-- Nothing should have changed. +--Testcase 590: +INSERT INTO rem1 VALUES (2, 'test2'); +--Testcase 591: +SELECT * from loc1; + f1 | f2 +----+------ + 1 | test +(1 row) + +--UPDATE rem1 SET f2 = 'test2'; +--SELECT * from loc1; +--Testcase 592: +DELETE from rem1; +--Testcase 593: +SELECT * from loc1; + f1 | f2 +----+------ + 1 | test +(1 row) + +--Testcase 594: +DROP TRIGGER trig_null ON rem1; +--Testcase 595: +DELETE from rem1; +-- Test a combination of local and remote triggers +--Testcase 596: +CREATE TRIGGER trig_row_before +BEFORE INSERT OR UPDATE OR DELETE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 597: +CREATE TRIGGER trig_row_after +AFTER INSERT OR UPDATE OR DELETE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 598: +CREATE TRIGGER trig_local_before BEFORE INSERT OR UPDATE ON loc1 +FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); +--Testcase 599: +INSERT INTO rem1(f2) VALUES ('test'); +NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1 +NOTICE: NEW: (12,test) +NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1 +NOTICE: NEW: (12,test) +--UPDATE rem1 SET f2 = 'testo'; +-- Test returning a system attribute +--Testcase 600: +INSERT INTO rem1(f2) VALUES ('test'); +NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1 +NOTICE: NEW: (13,test) +NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1 +NOTICE: NEW: (13,test) +--Testcase 601: +SELECT * FROM rem1 WHERE f2 = 'test'; + f1 | f2 +----+------ + 12 | test + 13 | test +(2 rows) + +-- cleanup +--Testcase 602: +DROP TRIGGER trig_row_before ON rem1; +--Testcase 603: +DROP TRIGGER trig_row_after ON rem1; +--Testcase 604: +DROP TRIGGER trig_local_before ON loc1; +-- Test direct foreign table modification functionality +--Testcase 774: +EXPLAIN (verbose, costs off) +DELETE FROM rem1; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1 + -> Foreign Delete on public.rem1 + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 775: +EXPLAIN (verbose, costs off) +DELETE FROM rem1 WHERE false; -- currently can't be pushed down + QUERY PLAN +-------------------------------- + Delete on public.rem1 + -> Result + One-Time Filter: false +(3 rows) + +-- Test with statement-level triggers +--Testcase 605: +CREATE TRIGGER trig_stmt_before + BEFORE DELETE OR INSERT OR UPDATE ON rem1 + FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 606: +EXPLAIN (verbose, costs off) +DELETE FROM rem1; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1 + -> Foreign Delete on public.rem1 + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 607: +DROP TRIGGER trig_stmt_before ON rem1; +--Testcase 608: +CREATE TRIGGER trig_stmt_after + AFTER DELETE OR INSERT OR UPDATE ON rem1 + FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 609: +EXPLAIN (verbose, costs off) +DELETE FROM rem1; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1 + -> Foreign Delete on public.rem1 + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 610: +DROP TRIGGER trig_stmt_after ON rem1; +-- Test with row-level ON INSERT triggers +--Testcase 611: +CREATE TRIGGER trig_row_before_insert +BEFORE INSERT ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 612: +EXPLAIN (verbose, costs off) +DELETE FROM rem1; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1 + -> Foreign Delete on public.rem1 + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 613: +DROP TRIGGER trig_row_before_insert ON rem1; +--Testcase 614: +CREATE TRIGGER trig_row_after_insert +AFTER INSERT ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 615: +EXPLAIN (verbose, costs off) +DELETE FROM rem1; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1 + -> Foreign Delete on public.rem1 + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 616: +DROP TRIGGER trig_row_after_insert ON rem1; +-- Test with row-level ON UPDATE triggers +--Testcase 617: +CREATE TRIGGER trig_row_before_update +BEFORE UPDATE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can't be pushed down +--Testcase 618: +EXPLAIN (verbose, costs off) +DELETE FROM rem1; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1 + -> Foreign Delete on public.rem1 + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 619: +DROP TRIGGER trig_row_before_update ON rem1; +--Testcase 620: +CREATE TRIGGER trig_row_after_update +AFTER UPDATE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can't be pushed down +--Testcase 621: +EXPLAIN (verbose, costs off) +DELETE FROM rem1; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1 + -> Foreign Delete on public.rem1 + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 622: +DROP TRIGGER trig_row_after_update ON rem1; +-- Test with row-level ON DELETE triggers +--Testcase 623: +CREATE TRIGGER trig_row_before_delete +BEFORE DELETE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 624: +EXPLAIN (verbose, costs off) +DELETE FROM rem1; -- can't be pushed down + QUERY PLAN +------------------------------------------------------- + Delete on public.rem1 + -> Foreign Scan on public.rem1 + Output: rem1.* + InfluxDB query: SELECT "f1", "f2" FROM "loc1" +(4 rows) + +--Testcase 625: +DROP TRIGGER trig_row_before_delete ON rem1; +--Testcase 626: +CREATE TRIGGER trig_row_after_delete +AFTER DELETE ON rem1 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 627: +EXPLAIN (verbose, costs off) +DELETE FROM rem1; -- can't be pushed down + QUERY PLAN +------------------------------------------------------- + Delete on public.rem1 + -> Foreign Scan on public.rem1 + Output: rem1.* + InfluxDB query: SELECT "f1", "f2" FROM "loc1" +(4 rows) + +--Testcase 628: +DROP TRIGGER trig_row_after_delete ON rem1; +-- =================================================================== +-- test inheritance features +-- =================================================================== +--Testcase 629: +CREATE TABLE a (aa TEXT); +--CREATE TABLE loct (aa TEXT, bb TEXT); +--Testcase 630: +ALTER TABLE a SET (autovacuum_enabled = 'false'); +--ALTER TABLE loct SET (autovacuum_enabled = 'false'); +-- Because influxdb_fdw does not support UPDATE, to test locally +-- we create local table. +--Testcase 631: +CREATE TABLE b (bb TEXT) INHERITS (a); +--Testcase 632: +INSERT INTO a(aa) VALUES('aaa'); +--Testcase 633: +INSERT INTO a(aa) VALUES('aaaa'); +--Testcase 634: +INSERT INTO a(aa) VALUES('aaaaa'); +--Testcase 635: +INSERT INTO b(aa) VALUES('bbb'); +--Testcase 636: +INSERT INTO b(aa) VALUES('bbbb'); +--Testcase 637: +INSERT INTO b(aa) VALUES('bbbbb'); +--Testcase 638: +SELECT tableoid::regclass, * FROM a; + tableoid | aa +----------+------- + a | aaa + a | aaaa + a | aaaaa + b | bbb + b | bbbb + b | bbbbb +(6 rows) + +--Testcase 639: +SELECT tableoid::regclass, * FROM b; + tableoid | aa | bb +----------+-------+---- + b | bbb | + b | bbbb | + b | bbbbb | +(3 rows) + +--Testcase 640: +SELECT tableoid::regclass, * FROM ONLY a; + tableoid | aa +----------+------- + a | aaa + a | aaaa + a | aaaaa +(3 rows) + +--Testcase 641: +UPDATE a SET aa = 'zzzzzz' WHERE aa LIKE 'aaaa%'; +--Testcase 642: +SELECT tableoid::regclass, * FROM a; + tableoid | aa +----------+-------- + a | aaa + a | zzzzzz + a | zzzzzz + b | bbb + b | bbbb + b | bbbbb +(6 rows) + +--Testcase 643: +SELECT tableoid::regclass, * FROM b; + tableoid | aa | bb +----------+-------+---- + b | bbb | + b | bbbb | + b | bbbbb | +(3 rows) + +--Testcase 644: +SELECT tableoid::regclass, * FROM ONLY a; + tableoid | aa +----------+-------- + a | aaa + a | zzzzzz + a | zzzzzz +(3 rows) + +--Testcase 645: +UPDATE b SET aa = 'new'; +--Testcase 646: +SELECT tableoid::regclass, * FROM a; + tableoid | aa +----------+-------- + a | aaa + a | zzzzzz + a | zzzzzz + b | new + b | new + b | new +(6 rows) + +--Testcase 647: +SELECT tableoid::regclass, * FROM b; + tableoid | aa | bb +----------+-----+---- + b | new | + b | new | + b | new | +(3 rows) + +--Testcase 648: +SELECT tableoid::regclass, * FROM ONLY a; + tableoid | aa +----------+-------- + a | aaa + a | zzzzzz + a | zzzzzz +(3 rows) + +--Testcase 649: +UPDATE a SET aa = 'newtoo'; +--Testcase 650: +SELECT tableoid::regclass, * FROM a; + tableoid | aa +----------+-------- + a | newtoo + a | newtoo + a | newtoo + b | newtoo + b | newtoo + b | newtoo +(6 rows) + +--Testcase 651: +SELECT tableoid::regclass, * FROM b; + tableoid | aa | bb +----------+--------+---- + b | newtoo | + b | newtoo | + b | newtoo | +(3 rows) + +--Testcase 652: +SELECT tableoid::regclass, * FROM ONLY a; + tableoid | aa +----------+-------- + a | newtoo + a | newtoo + a | newtoo +(3 rows) + +--Testcase 653: +DELETE FROM a; +--Testcase 654: +SELECT tableoid::regclass, * FROM a; + tableoid | aa +----------+---- +(0 rows) + +--Testcase 655: +SELECT tableoid::regclass, * FROM b; + tableoid | aa | bb +----------+----+---- +(0 rows) + +--Testcase 656: +SELECT tableoid::regclass, * FROM ONLY a; + tableoid | aa +----------+---- +(0 rows) + +--Testcase 657: +DROP TABLE a CASCADE; +NOTICE: drop cascades to table b +--DROP TABLE loct; +-- Check SELECT FOR UPDATE/SHARE with an inherited source table +--Testcase 658: +create foreign table loct1 (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct1'); +--Testcase 659: +create foreign table loct2 (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct2'); +--alter table loct1 set (autovacuum_enabled = 'false'); +--alter table loct2 set (autovacuum_enabled = 'false'); +--Testcase 660: +create foreign table foo (f1 int, f2 int) + server influxdb_svr options (table 'foo'); +--Testcase 661: +create foreign table foo2 (f3 int) inherits (foo) + server influxdb_svr options (table 'loct1'); +--Testcase 662: +create foreign table bar (f1 int, f2 int) + server influxdb_svr options (table 'bar'); +--Testcase 663: +create foreign table bar2 (f3 int) inherits (bar) + server influxdb_svr options (table 'loct2'); +--alter table foo set (autovacuum_enabled = 'false'); +--alter table bar set (autovacuum_enabled = 'false'); +--Testcase 664: +insert into foo values(1,1); +--Testcase 665: +insert into foo values(3,3); +--Testcase 666: +insert into foo2 values(2,2,2); +--Testcase 667: +insert into foo2 values(4,4,4); +--Testcase 668: +insert into bar values(1,11); +--Testcase 669: +insert into bar values(2,22); +--Testcase 670: +insert into bar values(6,66); +--Testcase 671: +insert into bar2 values(3,33,33); +--Testcase 672: +insert into bar2 values(4,44,44); +--Testcase 673: +insert into bar2 values(7,77,77); +--Testcase 674: +explain (verbose, costs off) +select * from bar where f1 in (select f1 from foo); + QUERY PLAN +-------------------------------------------------------------------- + Hash Join + Output: bar.f1, bar.f2 + Inner Unique: true + Hash Cond: (bar.f1 = foo.f1) + -> Append + -> Foreign Scan on public.bar bar_1 + Output: bar_1.f1, bar_1.f2 + InfluxDB query: SELECT "f1", "f2" FROM "bar" + -> Foreign Scan on public.bar2 bar_2 + Output: bar_2.f1, bar_2.f2 + InfluxDB query: SELECT "f1", "f2" FROM "loct2" + -> Hash + Output: foo.f1 + -> HashAggregate + Output: foo.f1 + Group Key: foo.f1 + -> Append + -> Foreign Scan on public.foo foo_1 + Output: foo_1.f1 + InfluxDB query: SELECT "f1" FROM "foo" + -> Foreign Scan on public.foo2 foo_2 + Output: foo_2.f1 + InfluxDB query: SELECT "f1" FROM "loct1" +(23 rows) + +--Testcase 675: +select * from bar where f1 in (select f1 from foo); + f1 | f2 +----+---- + 1 | 11 + 2 | 22 + 3 | 33 + 4 | 44 +(4 rows) + +--Testcase 676: +explain (verbose, costs off) +select * from bar where f1 in (select f1 from foo); + QUERY PLAN +-------------------------------------------------------------------- + Hash Join + Output: bar.f1, bar.f2 + Inner Unique: true + Hash Cond: (bar.f1 = foo.f1) + -> Append + -> Foreign Scan on public.bar bar_1 + Output: bar_1.f1, bar_1.f2 + InfluxDB query: SELECT "f1", "f2" FROM "bar" + -> Foreign Scan on public.bar2 bar_2 + Output: bar_2.f1, bar_2.f2 + InfluxDB query: SELECT "f1", "f2" FROM "loct2" + -> Hash + Output: foo.f1 + -> HashAggregate + Output: foo.f1 + Group Key: foo.f1 + -> Append + -> Foreign Scan on public.foo foo_1 + Output: foo_1.f1 + InfluxDB query: SELECT "f1" FROM "foo" + -> Foreign Scan on public.foo2 foo_2 + Output: foo_2.f1 + InfluxDB query: SELECT "f1" FROM "loct1" +(23 rows) + +--Testcase 677: +select * from bar where f1 in (select f1 from foo); + f1 | f2 +----+---- + 1 | 11 + 2 | 22 + 3 | 33 + 4 | 44 +(4 rows) + +-- Now check SELECT FOR UPDATE/SHARE with an inherited source table, +-- where the parent is itself a foreign table +--Testcase 678: +create foreign table foo2child (f3 int) inherits (foo2) + server influxdb_svr options (table 'loct4'); +NOTICE: moving and merging column "f3" with inherited definition +DETAIL: User-specified column moved to the position of the inherited column. +--Testcase 679: +explain (verbose, costs off) +select * from bar where f1 in (select f1 from foo2) for share; + QUERY PLAN +-------------------------------------------------------------------------------------- + LockRows + Output: bar.f1, bar.f2, bar.*, foo2.*, bar.tableoid, foo2.tableoid + -> Hash Join + Output: bar.f1, bar.f2, bar.*, foo2.*, bar.tableoid, foo2.tableoid + Inner Unique: true + Hash Cond: (bar.f1 = foo2.f1) + -> Append + -> Foreign Scan on public.bar bar_1 + Output: bar_1.f1, bar_1.f2, bar_1.*, bar_1.tableoid + InfluxDB query: SELECT "f1", "f2" FROM "bar" + -> Foreign Scan on public.bar2 bar_2 + Output: bar_2.f1, bar_2.f2, bar_2.*, bar_2.tableoid + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct2" + -> Hash + Output: foo2.*, foo2.f1, foo2.tableoid + -> HashAggregate + Output: foo2.*, foo2.f1, foo2.tableoid + Group Key: foo2.f1 + -> Append + -> Foreign Scan on public.foo2 foo2_1 + Output: foo2_1.*, foo2_1.f1, foo2_1.tableoid + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct1" + -> Foreign Scan on public.foo2child foo2_2 + Output: foo2_2.*, foo2_2.f1, foo2_2.tableoid + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct4" +(25 rows) + +--Testcase 680: +select * from bar where f1 in (select f1 from foo2) for share; + f1 | f2 +----+---- + 2 | 22 + 4 | 44 +(2 rows) + +--Testcase 681: +drop foreign table foo2child; +-- And with a local child relation of the foreign table parent +--Testcase 682: +create foreign table foo2child (f3 int) inherits (foo2) + server influxdb_svr options (table 'foo2child'); +NOTICE: moving and merging column "f3" with inherited definition +DETAIL: User-specified column moved to the position of the inherited column. +--Testcase 683: +explain (verbose, costs off) +select * from bar where f1 in (select f1 from foo2) for share; + QUERY PLAN +------------------------------------------------------------------------------------------ + LockRows + Output: bar.f1, bar.f2, bar.*, foo2.*, bar.tableoid, foo2.tableoid + -> Hash Join + Output: bar.f1, bar.f2, bar.*, foo2.*, bar.tableoid, foo2.tableoid + Inner Unique: true + Hash Cond: (bar.f1 = foo2.f1) + -> Append + -> Foreign Scan on public.bar bar_1 + Output: bar_1.f1, bar_1.f2, bar_1.*, bar_1.tableoid + InfluxDB query: SELECT "f1", "f2" FROM "bar" + -> Foreign Scan on public.bar2 bar_2 + Output: bar_2.f1, bar_2.f2, bar_2.*, bar_2.tableoid + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct2" + -> Hash + Output: foo2.*, foo2.f1, foo2.tableoid + -> HashAggregate + Output: foo2.*, foo2.f1, foo2.tableoid + Group Key: foo2.f1 + -> Append + -> Foreign Scan on public.foo2 foo2_1 + Output: foo2_1.*, foo2_1.f1, foo2_1.tableoid + InfluxDB query: SELECT "f1", "f2", "f3" FROM "loct1" + -> Foreign Scan on public.foo2child foo2_2 + Output: foo2_2.*, foo2_2.f1, foo2_2.tableoid + InfluxDB query: SELECT "f1", "f2", "f3" FROM "foo2child" +(25 rows) + +--Testcase 684: +select * from bar where f1 in (select f1 from foo2) for share; + f1 | f2 +----+---- + 2 | 22 + 4 | 44 +(2 rows) + +--Testcase 685: +drop foreign table foo2child; +/* +-- influxdb_fdw does not support UPDATE +-- Check UPDATE with inherited target and an inherited source table +explain (verbose, costs off) +update bar set f2 = f2 + 100 where f1 in (select f1 from foo); +update bar set f2 = f2 + 100 where f1 in (select f1 from foo); + +select tableoid::regclass, * from bar order by 1,2; + +-- Check UPDATE with inherited target and an appendrel subquery +explain (verbose, costs off) +update bar set f2 = f2 + 100 +from + ( select f1 from foo union all select f1+3 from foo ) ss +where bar.f1 = ss.f1; +update bar set f2 = f2 + 100 +from + ( select f1 from foo union all select f1+3 from foo ) ss +where bar.f1 = ss.f1; + +select tableoid::regclass, * from bar order by 1,2; + +-- Test forcing the remote server to produce sorted data for a merge join, +-- but the foreign table is an inheritance child. +truncate table loct1; +truncate table only foo; +\set num_rows_foo 2000 +insert into loct1 select generate_series(0, :num_rows_foo, 2), generate_series(0, :num_rows_foo, 2), generate_series(0, :num_rows_foo, 2); +insert into foo select generate_series(1, :num_rows_foo, 2), generate_series(1, :num_rows_foo, 2); +SET enable_hashjoin to false; +SET enable_nestloop to false; +alter foreign table foo2 options (use_remote_estimate 'true'); +create index i_loct1_f1 on loct1(f1); +create index i_foo_f1 on foo(f1); +analyze foo; +analyze loct1; +-- inner join; expressions in the clauses appear in the equivalence class list +explain (verbose, costs off) + select foo.f1, loct1.f1 from foo join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; +select foo.f1, loct1.f1 from foo join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; +-- outer join; expressions in the clauses do not appear in equivalence class +-- list but no output change as compared to the previous query +explain (verbose, costs off) + select foo.f1, loct1.f1 from foo left join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; +select foo.f1, loct1.f1 from foo left join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; +RESET enable_hashjoin; +RESET enable_nestloop; + +-- Test that WHERE CURRENT OF is not supported +begin; +declare c cursor for select * from bar where f1 = 7; +fetch from c; +update bar set f2 = null where current of c; +rollback; + +explain (verbose, costs off) +delete from foo where f1 < 5 returning *; +delete from foo where f1 < 5 returning *; +explain (verbose, costs off) +update bar set f2 = f2 + 100 returning *; +update bar set f2 = f2 + 100 returning *; + +-- Test that UPDATE/DELETE with inherited target works with row-level triggers +CREATE TRIGGER trig_row_before +BEFORE UPDATE OR DELETE ON bar2 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); + +CREATE TRIGGER trig_row_after +AFTER UPDATE OR DELETE ON bar2 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); + +explain (verbose, costs off) +update bar set f2 = f2 + 100; +update bar set f2 = f2 + 100; + +explain (verbose, costs off) +delete from bar where f2 < 400; +delete from bar where f2 < 400; + +-- cleanup +drop table foo cascade; +drop table bar cascade; +drop table loct1; +drop table loct2; + +-- Test pushing down UPDATE/DELETE joins to the remote server +create table parent (a int, b text); +create table loct1 (a int, b text); +create table loct2 (a int, b text); +create foreign table remt1 (a int, b text) + server influxdb_svr options (table 'loct1'); +create foreign table remt2 (a int, b text) + server influxdb_svr options (table 'loct2'); +alter foreign table remt1 inherit parent; + +insert into remt1 values (1, 'foo'); +insert into remt1 values (2, 'bar'); +insert into remt2 values (1, 'foo'); +insert into remt2 values (2, 'bar'); + +analyze remt1; +analyze remt2; + +explain (verbose, costs off) +update parent set b = parent.b || remt2.b from remt2 where parent.a = remt2.a returning *; +update parent set b = parent.b || remt2.b from remt2 where parent.a = remt2.a returning *; +explain (verbose, costs off) +delete from parent using remt2 where parent.a = remt2.a returning parent; +delete from parent using remt2 where parent.a = remt2.a returning parent; + +-- cleanup +drop foreign table remt1; +drop foreign table remt2; +drop table loct1; +drop table loct2; +drop table parent; +*/ +/* +-- Skip test because influxdb does not support partitions table, COPY +-- =================================================================== +-- test tuple routing for foreign-table partitions +-- =================================================================== + +-- Test insert tuple routing +create table itrtest (a int, b text) partition by list (a); +create table loct1 (a int check (a in (1)), b text); +create foreign table remp1 (a int check (a in (1)), b text) server loopback options (table_name 'loct1'); +create table loct2 (a int check (a in (2)), b text); +create foreign table remp2 (b text, a int check (a in (2))) server loopback options (table_name 'loct2'); +alter table itrtest attach partition remp1 for values in (1); +alter table itrtest attach partition remp2 for values in (2); + +insert into itrtest values (1, 'foo'); +insert into itrtest values (1, 'bar') returning *; +insert into itrtest values (2, 'baz'); +insert into itrtest values (2, 'qux') returning *; +insert into itrtest values (1, 'test1'), (2, 'test2') returning *; + +select tableoid::regclass, * FROM itrtest; +select tableoid::regclass, * FROM remp1; +select tableoid::regclass, * FROM remp2; + +delete from itrtest; + +create unique index loct1_idx on loct1 (a); + +-- DO NOTHING without an inference specification is supported +insert into itrtest values (1, 'foo') on conflict do nothing returning *; +insert into itrtest values (1, 'foo') on conflict do nothing returning *; + +-- But other cases are not supported +insert into itrtest values (1, 'bar') on conflict (a) do nothing; +insert into itrtest values (1, 'bar') on conflict (a) do update set b = excluded.b; + +select tableoid::regclass, * FROM itrtest; + +delete from itrtest; + +drop index loct1_idx; + +-- Test that remote triggers work with insert tuple routing +create function br_insert_trigfunc() returns trigger as $$ +begin + new.b := new.b || ' triggered !'; + return new; +end +$$ language plpgsql; +create trigger loct1_br_insert_trigger before insert on loct1 + for each row execute procedure br_insert_trigfunc(); +create trigger loct2_br_insert_trigger before insert on loct2 + for each row execute procedure br_insert_trigfunc(); + +-- The new values are concatenated with ' triggered !' +insert into itrtest values (1, 'foo') returning *; +insert into itrtest values (2, 'qux') returning *; +insert into itrtest values (1, 'test1'), (2, 'test2') returning *; +with result as (insert into itrtest values (1, 'test1'), (2, 'test2') returning *) select * from result; + +drop trigger loct1_br_insert_trigger on loct1; +drop trigger loct2_br_insert_trigger on loct2; + +drop table itrtest; +drop table loct1; +drop table loct2; + +-- Test update tuple routing +create table utrtest (a int, b text) partition by list (a); +create table loct (a int check (a in (1)), b text); +create foreign table remp (a int check (a in (1)), b text) server loopback options (table_name 'loct'); +create table locp (a int check (a in (2)), b text); +alter table utrtest attach partition remp for values in (1); +alter table utrtest attach partition locp for values in (2); + +insert into utrtest values (1, 'foo'); +insert into utrtest values (2, 'qux'); + +select tableoid::regclass, * FROM utrtest; +select tableoid::regclass, * FROM remp; +select tableoid::regclass, * FROM locp; + +-- It's not allowed to move a row from a partition that is foreign to another +update utrtest set a = 2 where b = 'foo' returning *; + +-- But the reverse is allowed +update utrtest set a = 1 where b = 'qux' returning *; + +select tableoid::regclass, * FROM utrtest; +select tableoid::regclass, * FROM remp; +select tableoid::regclass, * FROM locp; + +-- The executor should not let unexercised FDWs shut down +update utrtest set a = 1 where b = 'foo'; + +-- Test that remote triggers work with update tuple routing +create trigger loct_br_insert_trigger before insert on loct + for each row execute procedure br_insert_trigfunc(); + +delete from utrtest; +insert into utrtest values (2, 'qux'); + +-- Check case where the foreign partition is a subplan target rel +explain (verbose, costs off) +update utrtest set a = 1 where a = 1 or a = 2 returning *; +-- The new values are concatenated with ' triggered !' +update utrtest set a = 1 where a = 1 or a = 2 returning *; + +delete from utrtest; +insert into utrtest values (2, 'qux'); + +-- Check case where the foreign partition isn't a subplan target rel +explain (verbose, costs off) +update utrtest set a = 1 where a = 2 returning *; +-- The new values are concatenated with ' triggered !' +update utrtest set a = 1 where a = 2 returning *; + +drop trigger loct_br_insert_trigger on loct; + +-- We can move rows to a foreign partition that has been updated already, +-- but can't move rows to a foreign partition that hasn't been updated yet + +delete from utrtest; +insert into utrtest values (1, 'foo'); +insert into utrtest values (2, 'qux'); + +-- Test the former case: +-- with a direct modification plan +explain (verbose, costs off) +update utrtest set a = 1 returning *; +update utrtest set a = 1 returning *; + +delete from utrtest; +insert into utrtest values (1, 'foo'); +insert into utrtest values (2, 'qux'); + +-- with a non-direct modification plan +explain (verbose, costs off) +update utrtest set a = 1 from (values (1), (2)) s(x) where a = s.x returning *; +update utrtest set a = 1 from (values (1), (2)) s(x) where a = s.x returning *; + +-- Change the definition of utrtest so that the foreign partition get updated +-- after the local partition +delete from utrtest; +alter table utrtest detach partition remp; +drop foreign table remp; +alter table loct drop constraint loct_a_check; +alter table loct add check (a in (3)); +create foreign table remp (a int check (a in (3)), b text) server loopback options (table_name 'loct'); +alter table utrtest attach partition remp for values in (3); +insert into utrtest values (2, 'qux'); +insert into utrtest values (3, 'xyzzy'); + +-- Test the latter case: +-- with a direct modification plan +explain (verbose, costs off) +update utrtest set a = 3 returning *; +update utrtest set a = 3 returning *; -- ERROR + +-- with a non-direct modification plan +explain (verbose, costs off) +update utrtest set a = 3 from (values (2), (3)) s(x) where a = s.x returning *; +update utrtest set a = 3 from (values (2), (3)) s(x) where a = s.x returning *; -- ERROR + +drop table utrtest; +drop table loct; + +-- Test copy tuple routing +create table ctrtest (a int, b text) partition by list (a); +create table loct1 (a int check (a in (1)), b text); +create foreign table remp1 (a int check (a in (1)), b text) server loopback options (table_name 'loct1'); +create table loct2 (a int check (a in (2)), b text); +create foreign table remp2 (b text, a int check (a in (2))) server loopback options (table_name 'loct2'); +alter table ctrtest attach partition remp1 for values in (1); +alter table ctrtest attach partition remp2 for values in (2); + +copy ctrtest from stdin; +1 foo +2 qux +\. + +select tableoid::regclass, * FROM ctrtest; +select tableoid::regclass, * FROM remp1; +select tableoid::regclass, * FROM remp2; + +-- Copying into foreign partitions directly should work as well +copy remp1 from stdin; +1 bar +\. + +select tableoid::regclass, * FROM remp1; + +drop table ctrtest; +drop table loct1; +drop table loct2; + +-- =================================================================== +-- test COPY FROM +-- =================================================================== + +create table loc2 (f1 int, f2 text); +alter table loc2 set (autovacuum_enabled = 'false'); +create foreign table rem2 (f1 int, f2 text) server loopback options(table_name 'loc2'); + +-- Test basic functionality +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +delete from rem2; + +-- Test check constraints +alter table loc2 add constraint loc2_f1positive check (f1 >= 0); +alter foreign table rem2 add constraint rem2_f1positive check (f1 >= 0); + +-- check constraint is enforced on the remote side, not locally +copy rem2 from stdin; +1 foo +2 bar +\. +copy rem2 from stdin; -- ERROR +-1 xyzzy +\. +select * from rem2; + +alter foreign table rem2 drop constraint rem2_f1positive; +alter table loc2 drop constraint loc2_f1positive; + +delete from rem2; + +-- Test local triggers +create trigger trig_stmt_before before insert on rem2 + for each statement execute procedure trigger_func(); +create trigger trig_stmt_after after insert on rem2 + for each statement execute procedure trigger_func(); +create trigger trig_row_before before insert on rem2 + for each row execute procedure trigger_data(23,'skidoo'); +create trigger trig_row_after after insert on rem2 + for each row execute procedure trigger_data(23,'skidoo'); + +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger trig_row_before on rem2; +drop trigger trig_row_after on rem2; +drop trigger trig_stmt_before on rem2; +drop trigger trig_stmt_after on rem2; + +delete from rem2; + +create trigger trig_row_before_insert before insert on rem2 + for each row execute procedure trig_row_before_insupdate(); + +-- The new values are concatenated with ' triggered !' +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger trig_row_before_insert on rem2; + +delete from rem2; + +create trigger trig_null before insert on rem2 + for each row execute procedure trig_null(); + +-- Nothing happens +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger trig_null on rem2; + +delete from rem2; + +-- Test remote triggers +create trigger trig_row_before_insert before insert on loc2 + for each row execute procedure trig_row_before_insupdate(); + +-- The new values are concatenated with ' triggered !' +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger trig_row_before_insert on loc2; + +delete from rem2; + +create trigger trig_null before insert on loc2 + for each row execute procedure trig_null(); + +-- Nothing happens +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger trig_null on loc2; + +delete from rem2; + +-- Test a combination of local and remote triggers +create trigger rem2_trig_row_before before insert on rem2 + for each row execute procedure trigger_data(23,'skidoo'); +create trigger rem2_trig_row_after after insert on rem2 + for each row execute procedure trigger_data(23,'skidoo'); +create trigger loc2_trig_row_before_insert before insert on loc2 + for each row execute procedure trig_row_before_insupdate(); + +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger rem2_trig_row_before on rem2; +drop trigger rem2_trig_row_after on rem2; +drop trigger loc2_trig_row_before_insert on loc2; + +delete from rem2; + +-- test COPY FROM with foreign table created in the same transaction +create table loc3 (f1 int, f2 text); +begin; +create foreign table rem3 (f1 int, f2 text) + server loopback options(table_name 'loc3'); +copy rem3 from stdin; +1 foo +2 bar +\. +commit; +select * from rem3; +drop foreign table rem3; +drop table loc3; +*/ +/* +-- Skip test because influxdb does not support TRUNCATE +-- =================================================================== +-- test for TRUNCATE +-- =================================================================== +CREATE TABLE tru_rtable0 (id int primary key); +CREATE FOREIGN TABLE tru_ftable (id int) + SERVER loopback OPTIONS (table_name 'tru_rtable0'); +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(1,10) x); + +CREATE TABLE tru_ptable (id int) PARTITION BY HASH(id); +CREATE TABLE tru_ptable__p0 PARTITION OF tru_ptable + FOR VALUES WITH (MODULUS 2, REMAINDER 0); +CREATE TABLE tru_rtable1 (id int primary key); +CREATE FOREIGN TABLE tru_ftable__p1 PARTITION OF tru_ptable + FOR VALUES WITH (MODULUS 2, REMAINDER 1) + SERVER loopback OPTIONS (table_name 'tru_rtable1'); +INSERT INTO tru_ptable (SELECT x FROM generate_series(11,20) x); + +CREATE TABLE tru_pk_table(id int primary key); +CREATE TABLE tru_fk_table(fkey int references tru_pk_table(id)); +INSERT INTO tru_pk_table (SELECT x FROM generate_series(1,10) x); +INSERT INTO tru_fk_table (SELECT x % 10 + 1 FROM generate_series(5,25) x); +CREATE FOREIGN TABLE tru_pk_ftable (id int) + SERVER loopback OPTIONS (table_name 'tru_pk_table'); + +CREATE TABLE tru_rtable_parent (id int); +CREATE TABLE tru_rtable_child (id int); +CREATE FOREIGN TABLE tru_ftable_parent (id int) + SERVER loopback OPTIONS (table_name 'tru_rtable_parent'); +CREATE FOREIGN TABLE tru_ftable_child () INHERITS (tru_ftable_parent) + SERVER loopback OPTIONS (table_name 'tru_rtable_child'); +INSERT INTO tru_rtable_parent (SELECT x FROM generate_series(1,8) x); +INSERT INTO tru_rtable_child (SELECT x FROM generate_series(10, 18) x); + +-- normal truncate +SELECT sum(id) FROM tru_ftable; -- 55 +TRUNCATE tru_ftable; +SELECT count(*) FROM tru_rtable0; -- 0 +SELECT count(*) FROM tru_ftable; -- 0 + +-- 'truncatable' option +ALTER SERVER loopback OPTIONS (ADD truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER FOREIGN TABLE tru_ftable OPTIONS (ADD truncatable 'true'); +TRUNCATE tru_ftable; -- accepted +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER SERVER loopback OPTIONS (DROP truncatable); +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'true'); +TRUNCATE tru_ftable; -- accepted + +-- partitioned table with both local and foreign tables as partitions +SELECT sum(id) FROM tru_ptable; -- 155 +TRUNCATE tru_ptable; +SELECT count(*) FROM tru_ptable; -- 0 +SELECT count(*) FROM tru_ptable__p0; -- 0 +SELECT count(*) FROM tru_ftable__p1; -- 0 +SELECT count(*) FROM tru_rtable1; -- 0 + +-- 'CASCADE' option +SELECT sum(id) FROM tru_pk_ftable; -- 55 +TRUNCATE tru_pk_ftable; -- failed by FK reference +TRUNCATE tru_pk_ftable CASCADE; +SELECT count(*) FROM tru_pk_ftable; -- 0 +SELECT count(*) FROM tru_fk_table; -- also truncated,0 + +-- truncate two tables at a command +INSERT INTO tru_ftable (SELECT x FROM generate_series(1,8) x); +INSERT INTO tru_pk_ftable (SELECT x FROM generate_series(3,10) x); +SELECT count(*) from tru_ftable; -- 8 +SELECT count(*) from tru_pk_ftable; -- 8 +TRUNCATE tru_ftable, tru_pk_ftable CASCADE; +SELECT count(*) from tru_ftable; -- 0 +SELECT count(*) from tru_pk_ftable; -- 0 + +-- truncate with ONLY clause +-- Since ONLY is specified, the table tru_ftable_child that inherits +-- tru_ftable_parent locally is not truncated. +TRUNCATE ONLY tru_ftable_parent; +SELECT sum(id) FROM tru_ftable_parent; -- 126 +TRUNCATE tru_ftable_parent; +SELECT count(*) FROM tru_ftable_parent; -- 0 + +-- in case when remote table has inherited children +CREATE TABLE tru_rtable0_child () INHERITS (tru_rtable0); +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(5,9) x); +INSERT INTO tru_rtable0_child (SELECT x FROM generate_series(10,14) x); +SELECT sum(id) FROM tru_ftable; -- 95 + +-- Both parent and child tables in the foreign server are truncated +-- even though ONLY is specified because ONLY has no effect +-- when truncating a foreign table. +TRUNCATE ONLY tru_ftable; +SELECT count(*) FROM tru_ftable; -- 0 + +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(21,25) x); +INSERT INTO tru_rtable0_child (SELECT x FROM generate_series(26,30) x); +SELECT sum(id) FROM tru_ftable; -- 255 +TRUNCATE tru_ftable; -- truncate both of parent and child +SELECT count(*) FROM tru_ftable; -- 0 + +-- cleanup +DROP FOREIGN TABLE tru_ftable_parent, tru_ftable_child, tru_pk_ftable,tru_ftable__p1,tru_ftable; +DROP TABLE tru_rtable0, tru_rtable1, tru_ptable, tru_ptable__p0, tru_pk_table, tru_fk_table, +tru_rtable_parent,tru_rtable_child, tru_rtable0_child; +*/ +-- =================================================================== +-- test IMPORT FOREIGN SCHEMA +-- =================================================================== +--Testcase 686: +CREATE SCHEMA import_influx1; +IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx1; +--Testcase 687: +\det+ import_influx1.* + List of foreign tables + Schema | Table | Server | FDW options | Description +----------------+-------+--------------+---------------------------+------------- + import_influx1 | T1 | influxdb_svr | ("table" 'T1', tags 'c3') | + import_influx1 | T2 | influxdb_svr | ("table" 'T2', tags 'c2') | + import_influx1 | T3 | influxdb_svr | ("table" 'T3', tags 'c3') | + import_influx1 | T4 | influxdb_svr | ("table" 'T4', tags 'c3') | + import_influx1 | bar | influxdb_svr | ("table" 'bar') | + import_influx1 | foo | influxdb_svr | ("table" 'foo') | + import_influx1 | loc1 | influxdb_svr | ("table" 'loc1') | + import_influx1 | loct1 | influxdb_svr | ("table" 'loct1') | + import_influx1 | loct2 | influxdb_svr | ("table" 'loct2') | +(9 rows) + +--Testcase 688: +\d import_influx1.* + Foreign table "import_influx1.T1" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + c3 | text | | | | + C 1 | bigint | | | | + c2 | bigint | | | | + c6 | text | | | | + c7 | text | | | | + c8 | text | | | | +Server: influxdb_svr +FDW options: ("table" 'T1', tags 'c3') + + Foreign table "import_influx1.T2" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + c2 | text | | | | + c1 | bigint | | | | +Server: influxdb_svr +FDW options: ("table" 'T2', tags 'c2') + + Foreign table "import_influx1.T3" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + c3 | text | | | | + c1 | bigint | | | | + c2 | bigint | | | | +Server: influxdb_svr +FDW options: ("table" 'T3', tags 'c3') + + Foreign table "import_influx1.T4" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + c3 | text | | | | + c1 | bigint | | | | + c2 | bigint | | | | +Server: influxdb_svr +FDW options: ("table" 'T4', tags 'c3') + + Foreign table "import_influx1.bar" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + f1 | bigint | | | | + f2 | bigint | | | | +Server: influxdb_svr +FDW options: ("table" 'bar') + + Foreign table "import_influx1.foo" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + f1 | bigint | | | | + f2 | bigint | | | | +Server: influxdb_svr +FDW options: ("table" 'foo') + + Foreign table "import_influx1.loc1" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + f1 | bigint | | | | + f2 | text | | | | +Server: influxdb_svr +FDW options: ("table" 'loc1') + + Foreign table "import_influx1.loct1" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + f1 | bigint | | | | + f2 | bigint | | | | + f3 | bigint | | | | +Server: influxdb_svr +FDW options: ("table" 'loct1') + + Foreign table "import_influx1.loct2" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + f1 | bigint | | | | + f2 | bigint | | | | + f3 | bigint | | | | +Server: influxdb_svr +FDW options: ("table" 'loct2') + +-- Options +--Testcase 689: +CREATE SCHEMA import_influx2; +IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx2 + OPTIONS (import_default 'true'); +ERROR: invalid option "import_default" +--Testcase 690: +\det+ import_influx2.* + List of foreign tables + Schema | Table | Server | FDW options | Description +--------+-------+--------+-------------+------------- +(0 rows) + +--Testcase 691: +\d import_influx2.* +--Testcase 692: +CREATE SCHEMA import_influx3; +IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx3 + OPTIONS (import_collate 'false', import_not_null 'false'); +ERROR: invalid option "import_collate" +--Testcase 693: +\det+ import_influx3.* + List of foreign tables + Schema | Table | Server | FDW options | Description +--------+-------+--------+-------------+------------- +(0 rows) + +--Testcase 694: +\d import_influx3.* +-- Check LIMIT TO and EXCEPT +--Testcase 695: +CREATE SCHEMA import_influx4; +IMPORT FOREIGN SCHEMA public LIMIT TO ("T1", loct, nonesuch) + FROM SERVER influxdb_svr INTO import_influx4; +--Testcase 696: +\det+ import_influx4.* + List of foreign tables + Schema | Table | Server | FDW options | Description +----------------+-------+--------------+---------------------------+------------- + import_influx4 | T1 | influxdb_svr | ("table" 'T1', tags 'c3') | +(1 row) + +IMPORT FOREIGN SCHEMA public EXCEPT ("T1", loct, nonesuch) + FROM SERVER influxdb_svr INTO import_influx4; +--Testcase 697: +\det+ import_influx4.* + List of foreign tables + Schema | Table | Server | FDW options | Description +----------------+-------+--------------+---------------------------+------------- + import_influx4 | T1 | influxdb_svr | ("table" 'T1', tags 'c3') | + import_influx4 | T2 | influxdb_svr | ("table" 'T2', tags 'c2') | + import_influx4 | T3 | influxdb_svr | ("table" 'T3', tags 'c3') | + import_influx4 | T4 | influxdb_svr | ("table" 'T4', tags 'c3') | + import_influx4 | bar | influxdb_svr | ("table" 'bar') | + import_influx4 | foo | influxdb_svr | ("table" 'foo') | + import_influx4 | loc1 | influxdb_svr | ("table" 'loc1') | + import_influx4 | loct1 | influxdb_svr | ("table" 'loct1') | + import_influx4 | loct2 | influxdb_svr | ("table" 'loct2') | +(9 rows) + +-- Assorted error cases +IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx4; +ERROR: relation "T1" already exists +CONTEXT: importing foreign table "T1" +IMPORT FOREIGN SCHEMA nonesuch FROM SERVER influxdb_svr INTO import_influx4; +ERROR: relation "T1" already exists +CONTEXT: importing foreign table "T1" +IMPORT FOREIGN SCHEMA nonesuch FROM SERVER influxdb_svr INTO notthere; +ERROR: schema "notthere" does not exist +IMPORT FOREIGN SCHEMA nonesuch FROM SERVER nowhere INTO notthere; +ERROR: server "nowhere" does not exist +/* +-- Skip these test, influxdb_fdw does not support fetch_size option, partition table +-- Check case of a type present only on the remote server. +-- We can fake this by dropping the type locally in our transaction. +CREATE TYPE "Colors" AS ENUM ('red', 'green', 'blue'); +CREATE TABLE import_source.t5 (c1 int, c2 text collate "C", "Col" "Colors"); + +CREATE SCHEMA import_dest5; +BEGIN; +DROP TYPE "Colors" CASCADE; +IMPORT FOREIGN SCHEMA import_source LIMIT TO (t5) + FROM SERVER loopback INTO import_dest5; -- ERROR + +ROLLBACK; + +BEGIN; + + +CREATE SERVER fetch101 FOREIGN DATA WRAPPER postgres_fdw OPTIONS( fetch_size '101' ); + +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'fetch101' +AND srvoptions @> array['fetch_size=101']; + +ALTER SERVER fetch101 OPTIONS( SET fetch_size '202' ); + +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'fetch101' +AND srvoptions @> array['fetch_size=101']; + +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'fetch101' +AND srvoptions @> array['fetch_size=202']; + +CREATE FOREIGN TABLE table30000 ( x int ) SERVER fetch101 OPTIONS ( fetch_size '30000' ); + +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30000'::regclass +AND ftoptions @> array['fetch_size=30000']; + +ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '60000'); + +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30000'::regclass +AND ftoptions @> array['fetch_size=30000']; + +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30000'::regclass +AND ftoptions @> array['fetch_size=60000']; + +ROLLBACK; + +-- =================================================================== +-- test partitionwise joins +-- =================================================================== +SET enable_partitionwise_join=on; + +CREATE TABLE fprt1 (a int, b int, c varchar) PARTITION BY RANGE(a); +CREATE TABLE fprt1_p1 (LIKE fprt1); +CREATE TABLE fprt1_p2 (LIKE fprt1); +ALTER TABLE fprt1_p1 SET (autovacuum_enabled = 'false'); +ALTER TABLE fprt1_p2 SET (autovacuum_enabled = 'false'); +INSERT INTO fprt1_p1 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(0, 249, 2) i; +INSERT INTO fprt1_p2 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(250, 499, 2) i; +CREATE FOREIGN TABLE ftprt1_p1 PARTITION OF fprt1 FOR VALUES FROM (0) TO (250) + SERVER loopback OPTIONS (table_name 'fprt1_p1', use_remote_estimate 'true'); +CREATE FOREIGN TABLE ftprt1_p2 PARTITION OF fprt1 FOR VALUES FROM (250) TO (500) + SERVER loopback OPTIONS (TABLE_NAME 'fprt1_p2'); +ANALYZE fprt1; +ANALYZE fprt1_p1; +ANALYZE fprt1_p2; + +CREATE TABLE fprt2 (a int, b int, c varchar) PARTITION BY RANGE(b); +CREATE TABLE fprt2_p1 (LIKE fprt2); +CREATE TABLE fprt2_p2 (LIKE fprt2); +ALTER TABLE fprt2_p1 SET (autovacuum_enabled = 'false'); +ALTER TABLE fprt2_p2 SET (autovacuum_enabled = 'false'); +INSERT INTO fprt2_p1 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(0, 249, 3) i; +INSERT INTO fprt2_p2 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(250, 499, 3) i; +CREATE FOREIGN TABLE ftprt2_p1 (b int, c varchar, a int) + SERVER loopback OPTIONS (table_name 'fprt2_p1', use_remote_estimate 'true'); +ALTER TABLE fprt2 ATTACH PARTITION ftprt2_p1 FOR VALUES FROM (0) TO (250); +CREATE FOREIGN TABLE ftprt2_p2 PARTITION OF fprt2 FOR VALUES FROM (250) TO (500) + SERVER loopback OPTIONS (table_name 'fprt2_p2', use_remote_estimate 'true'); +ANALYZE fprt2; +ANALYZE fprt2_p1; +ANALYZE fprt2_p2; + +-- inner join three tables +EXPLAIN (COSTS OFF) +SELECT t1.a,t2.b,t3.c FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) INNER JOIN fprt1 t3 ON (t2.b = t3.a) WHERE t1.a % 25 =0 ORDER BY 1,2,3; +SELECT t1.a,t2.b,t3.c FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) INNER JOIN fprt1 t3 ON (t2.b = t3.a) WHERE t1.a % 25 =0 ORDER BY 1,2,3; + +-- left outer join + nullable clause +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.a,t2.b,t2.c FROM fprt1 t1 LEFT JOIN (SELECT * FROM fprt2 WHERE a < 10) t2 ON (t1.a = t2.b and t1.b = t2.a) WHERE t1.a < 10 ORDER BY 1,2,3; +SELECT t1.a,t2.b,t2.c FROM fprt1 t1 LEFT JOIN (SELECT * FROM fprt2 WHERE a < 10) t2 ON (t1.a = t2.b and t1.b = t2.a) WHERE t1.a < 10 ORDER BY 1,2,3; + +-- with whole-row reference; partitionwise join does not apply +EXPLAIN (COSTS OFF) +SELECT t1.wr, t2.wr FROM (SELECT t1 wr, a FROM fprt1 t1 WHERE t1.a % 25 = 0) t1 FULL JOIN (SELECT t2 wr, b FROM fprt2 t2 WHERE t2.b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY 1,2; +SELECT t1.wr, t2.wr FROM (SELECT t1 wr, a FROM fprt1 t1 WHERE t1.a % 25 = 0) t1 FULL JOIN (SELECT t2 wr, b FROM fprt2 t2 WHERE t2.b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY 1,2; + +-- join with lateral reference +EXPLAIN (COSTS OFF) +SELECT t1.a,t1.b FROM fprt1 t1, LATERAL (SELECT t2.a, t2.b FROM fprt2 t2 WHERE t1.a = t2.b AND t1.b = t2.a) q WHERE t1.a%25 = 0 ORDER BY 1,2; +SELECT t1.a,t1.b FROM fprt1 t1, LATERAL (SELECT t2.a, t2.b FROM fprt2 t2 WHERE t1.a = t2.b AND t1.b = t2.a) q WHERE t1.a%25 = 0 ORDER BY 1,2; + +-- with PHVs, partitionwise join selected but no join pushdown +EXPLAIN (COSTS OFF) +SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE a % 25 = 0) t1 FULL JOIN (SELECT 't2_phv' phv, * FROM fprt2 WHERE b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY t1.a, t2.b; +SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE a % 25 = 0) t1 FULL JOIN (SELECT 't2_phv' phv, * FROM fprt2 WHERE b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY t1.a, t2.b; + +-- test FOR UPDATE; partitionwise join does not apply +EXPLAIN (COSTS OFF) +SELECT t1.a, t2.b FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) WHERE t1.a % 25 = 0 ORDER BY 1,2 FOR UPDATE OF t1; +SELECT t1.a, t2.b FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) WHERE t1.a % 25 = 0 ORDER BY 1,2 FOR UPDATE OF t1; + +RESET enable_partitionwise_join; + + +-- =================================================================== +-- test partitionwise aggregates +-- =================================================================== + +CREATE TABLE pagg_tab (a int, b int, c text) PARTITION BY RANGE(a); + +CREATE TABLE pagg_tab_p1 (LIKE pagg_tab); +CREATE TABLE pagg_tab_p2 (LIKE pagg_tab); +CREATE TABLE pagg_tab_p3 (LIKE pagg_tab); + +INSERT INTO pagg_tab_p1 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 10; +INSERT INTO pagg_tab_p2 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 20 and (i % 30) >= 10; +INSERT INTO pagg_tab_p3 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 30 and (i % 30) >= 20; + +-- Create foreign partitions +CREATE FOREIGN TABLE fpagg_tab_p1 PARTITION OF pagg_tab FOR VALUES FROM (0) TO (10) SERVER loopback OPTIONS (table_name 'pagg_tab_p1'); +CREATE FOREIGN TABLE fpagg_tab_p2 PARTITION OF pagg_tab FOR VALUES FROM (10) TO (20) SERVER loopback OPTIONS (table_name 'pagg_tab_p2'); +CREATE FOREIGN TABLE fpagg_tab_p3 PARTITION OF pagg_tab FOR VALUES FROM (20) TO (30) SERVER loopback OPTIONS (table_name 'pagg_tab_p3'); + +ANALYZE pagg_tab; +ANALYZE fpagg_tab_p1; +ANALYZE fpagg_tab_p2; +ANALYZE fpagg_tab_p3; + +-- When GROUP BY clause matches with PARTITION KEY. +-- Plan with partitionwise aggregates is disabled +SET enable_partitionwise_aggregate TO false; +EXPLAIN (COSTS OFF) +SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; + +-- Plan with partitionwise aggregates is enabled +SET enable_partitionwise_aggregate TO true; +EXPLAIN (COSTS OFF) +SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; +SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; + +-- Check with whole-row reference +-- Should have all the columns in the target list for the given relation +EXPLAIN (VERBOSE, COSTS OFF) +SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1; +SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1; + +-- When GROUP BY clause does not match with PARTITION KEY. +EXPLAIN (COSTS OFF) +SELECT b, avg(a), max(a), count(*) FROM pagg_tab GROUP BY b HAVING sum(a) < 700 ORDER BY 1; +*/ +/* +-- Skip test, influxdb_fdw does not support nosuperuser +-- =================================================================== +-- access rights and superuser +-- =================================================================== + +-- Non-superuser cannot create a FDW without a password in the connstr +CREATE ROLE regress_nosuper NOSUPERUSER; + +GRANT USAGE ON FOREIGN DATA WRAPPER influxdb_fdw TO regress_nosuper; + +SET ROLE regress_nosuper; + +SHOW is_superuser; + +-- This will be OK, we can create the FDW +DO $d$ + BEGIN + EXECUTE $$CREATE SERVER loopback_nopw FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname '$$||current_database()||$$', + port '$$||current_setting('port')||$$' + )$$; + END; +$d$; + +-- But creation of user mappings for non-superusers should fail +CREATE USER MAPPING FOR public SERVER loopback_nopw; +CREATE USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; + +CREATE FOREIGN TABLE pg_temp.ft1_nopw ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text, + c4 timestamptz, + c5 timestamp, + c6 varchar(10), + c7 char(10) default 'ft1', + c8 user_enum +) SERVER loopback_nopw OPTIONS (schema_name 'public', table_name 'ft1'); + +SELECT 1 FROM ft1_nopw LIMIT 1; + +-- If we add a password to the connstr it'll fail, because we don't allow passwords +-- in connstrs only in user mappings. + +DO $d$ + BEGIN + EXECUTE $$ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw')$$; + END; +$d$; + +-- If we add a password for our user mapping instead, we should get a different +-- error because the password wasn't actually *used* when we run with trust auth. +-- +-- This won't work with installcheck, but neither will most of the FDW checks. + +ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); + +SELECT 1 FROM ft1_nopw LIMIT 1; + +-- Unpriv user cannot make the mapping passwordless +ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password_required 'false'); + + +SELECT 1 FROM ft1_nopw LIMIT 1; + +RESET ROLE; + +-- But the superuser can +ALTER USER MAPPING FOR regress_nosuper SERVER loopback_nopw OPTIONS (ADD password_required 'false'); + +SET ROLE regress_nosuper; + +-- Should finally work now +SELECT 1 FROM ft1_nopw LIMIT 1; + +-- unpriv user also cannot set sslcert / sslkey on the user mapping +-- first set password_required so we see the right error messages +ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (SET password_required 'true'); +ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD sslcert 'foo.crt'); +ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD sslkey 'foo.key'); + +-- We're done with the role named after a specific user and need to check the +-- changes to the public mapping. +DROP USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; + +-- This will fail again as it'll resolve the user mapping for public, which +-- lacks password_required=false +SELECT 1 FROM ft1_nopw LIMIT 1; + +RESET ROLE; + +-- The user mapping for public is passwordless and lacks the password_required=false +-- mapping option, but will work because the current user is a superuser. +SELECT 1 FROM ft1_nopw LIMIT 1; + +-- cleanup +DROP USER MAPPING FOR public SERVER loopback_nopw; +DROP OWNED BY regress_nosuper; +DROP ROLE regress_nosuper; +*/ +-- influxdb_fdw does not support transactions +-- Two-phase transactions are not supported. +--BEGIN; +--Testcase 698: +SELECT count(*) FROM ft1; + count +------- + 822 +(1 row) + +-- error here +--PREPARE TRANSACTION 'fdw_tpc'; +--ROLLBACK; +/* +-- Influxdb_fdw does not use connection, and does not support connection functions +-- =================================================================== +-- reestablish new connection +-- =================================================================== + +-- Change application_name of remote connection to special one +-- so that we can easily terminate the connection later. +ALTER SERVER loopback OPTIONS (application_name 'fdw_retry_check'); + +-- If debug_discard_caches is active, it results in +-- dropping remote connections after every transaction, making it +-- impossible to test termination meaningfully. So turn that off +-- for this test. +SET debug_discard_caches = 0; + +-- Make sure we have a remote connection. +SELECT 1 FROM ft1 LIMIT 1; + +-- Terminate the remote connection and wait for the termination to complete. +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = 'fdw_retry_check'; + +-- This query should detect the broken connection when starting new remote +-- transaction, reestablish new connection, and then succeed. +BEGIN; +SELECT 1 FROM ft1 LIMIT 1; + +-- If we detect the broken connection when starting a new remote +-- subtransaction, we should fail instead of establishing a new connection. +-- Terminate the remote connection and wait for the termination to complete. +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = 'fdw_retry_check'; +SAVEPOINT s; +-- The text of the error might vary across platforms, so only show SQLSTATE. +\set VERBOSITY sqlstate +SELECT 1 FROM ft1 LIMIT 1; -- should fail +\set VERBOSITY default +COMMIT; + +RESET debug_discard_caches; + +-- ============================================================================= +-- test connection invalidation cases and postgres_fdw_get_connections function +-- ============================================================================= +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- This test case is for closing the connection in pgfdw_xact_callback +BEGIN; +-- Connection xact depth becomes 1 i.e. the connection is in midst of the xact. +SELECT 1 FROM ft1 LIMIT 1; +SELECT 1 FROM ft7 LIMIT 1; +-- List all the existing cached connections. loopback and loopback3 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Connections are not closed at the end of the alter and drop statements. +-- That's because the connections are in midst of this xact, +-- they are just marked as invalid in pgfdw_inval_callback. +ALTER SERVER loopback OPTIONS (ADD use_remote_estimate 'off'); +DROP SERVER loopback3 CASCADE; +-- List all the existing cached connections. loopback and loopback3 +-- should be output as invalid connections. Also the server name for +-- loopback3 should be NULL because the server was dropped. +SELECT * FROM postgres_fdw_get_connections() ORDER BY 1; +-- The invalid connections get closed in pgfdw_xact_callback during commit. +COMMIT; +-- All cached connections were closed while committing above xact, so no +-- records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- ======================================================================= +-- test postgres_fdw_disconnect and postgres_fdw_disconnect_all functions +-- ======================================================================= +BEGIN; +-- Ensure to cache loopback connection. +SELECT 1 FROM ft1 LIMIT 1; +-- Ensure to cache loopback2 connection. +SELECT 1 FROM ft6 LIMIT 1; +-- List all the existing cached connections. loopback and loopback2 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Issue a warning and return false as loopback connection is still in use and +-- can not be closed. +SELECT postgres_fdw_disconnect('loopback'); +-- List all the existing cached connections. loopback and loopback2 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Return false as connections are still in use, warnings are issued. +-- But disable warnings temporarily because the order of them is not stable. +SET client_min_messages = 'ERROR'; +SELECT postgres_fdw_disconnect_all(); +RESET client_min_messages; +COMMIT; +-- Ensure that loopback2 connection is closed. +SELECT 1 FROM postgres_fdw_disconnect('loopback2'); +SELECT server_name FROM postgres_fdw_get_connections() WHERE server_name = 'loopback2'; +-- Return false as loopback2 connection is closed already. +SELECT postgres_fdw_disconnect('loopback2'); +-- Return an error as there is no foreign server with given name. +SELECT postgres_fdw_disconnect('unknownserver'); +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- ============================================================================= +-- test case for having multiple cached connections for a foreign server +-- ============================================================================= +CREATE ROLE regress_multi_conn_user1 SUPERUSER; +CREATE ROLE regress_multi_conn_user2 SUPERUSER; +CREATE USER MAPPING FOR regress_multi_conn_user1 SERVER loopback; +CREATE USER MAPPING FOR regress_multi_conn_user2 SERVER loopback; + +BEGIN; +-- Will cache loopback connection with user mapping for regress_multi_conn_user1 +SET ROLE regress_multi_conn_user1; +SELECT 1 FROM ft1 LIMIT 1; +RESET ROLE; + +-- Will cache loopback connection with user mapping for regress_multi_conn_user2 +SET ROLE regress_multi_conn_user2; +SELECT 1 FROM ft1 LIMIT 1; +RESET ROLE; + +-- Should output two connections for loopback server +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +COMMIT; +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- Clean up +DROP USER MAPPING FOR regress_multi_conn_user1 SERVER loopback; +DROP USER MAPPING FOR regress_multi_conn_user2 SERVER loopback; +DROP ROLE regress_multi_conn_user1; +DROP ROLE regress_multi_conn_user2; + +-- =================================================================== +-- Test foreign server level option keep_connections +-- =================================================================== +-- By default, the connections associated with foreign server are cached i.e. +-- keep_connections option is on. Set it to off. +ALTER SERVER loopback OPTIONS (keep_connections 'off'); +-- connection to loopback server is closed at the end of xact +-- as keep_connections was set to off. +SELECT 1 FROM ft1 LIMIT 1; +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +ALTER SERVER loopback OPTIONS (SET keep_connections 'on'); +*/ +-- =================================================================== +-- batch insert +-- =================================================================== +BEGIN; +--Testcase 699: +CREATE SERVER batch10 FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS(dbname 'postdb', :SERVER, batch_size '10' ); +--Testcase 700: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=10']; + count +------- + 1 +(1 row) + +--Testcase 701: +ALTER SERVER batch10 OPTIONS( SET batch_size '20' ); +--Testcase 702: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=10']; + count +------- + 0 +(1 row) + +--Testcase 703: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=20']; + count +------- + 1 +(1 row) + +--Testcase 704: +CREATE FOREIGN TABLE table30 ( x int ) SERVER batch10 OPTIONS ( batch_size '30' ); +--Testcase 705: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=30']; + count +------- + 1 +(1 row) + +--Testcase 706: +ALTER FOREIGN TABLE table30 OPTIONS ( SET batch_size '40'); +--Testcase 707: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=30']; + count +------- + 0 +(1 row) + +--Testcase 708: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=40']; + count +------- + 1 +(1 row) + +ROLLBACK; +--Testcase 709: +CREATE FOREIGN TABLE batch_table ( x int ) SERVER influxdb_svr; +--Testcase 710: +CREATE FOREIGN TABLE ftable ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '10' ); +--Testcase 711: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable SELECT * FROM generate_series(1, 10) i; + QUERY PLAN +----------------------------------------------------- + Insert on public.ftable + Batch Size: 10 + -> Function Scan on pg_catalog.generate_series i + Output: i.i + Function Call: generate_series(1, 10) +(5 rows) + +--Testcase 712: +INSERT INTO ftable SELECT * FROM generate_series(1, 10) i; +--Testcase 713: +INSERT INTO ftable SELECT * FROM generate_series(11, 31) i; +--Testcase 714: +INSERT INTO ftable VALUES (32); +--Testcase 715: +INSERT INTO ftable VALUES (33), (34); +--Testcase 716: +SELECT COUNT(*) FROM ftable; + count +------- + 34 +(1 row) + +--Testcase 717: +DELETE FROM batch_table; +--Testcase 718: +DROP FOREIGN TABLE ftable; +-- try if large batches exceed max number of bind parameters +--Testcase 719: +CREATE FOREIGN TABLE ftable ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '100000' ); +--Testcase 720: +INSERT INTO ftable SELECT * FROM generate_series(1, 70000) i; +--Testcase 721: +SELECT COUNT(*) FROM ftable; + count +------- + 70000 +(1 row) + +--Testcase 722: +DELETE FROM batch_table; +--Testcase 723: +DROP FOREIGN TABLE ftable; +-- Disable batch insert +--Testcase 724: +CREATE FOREIGN TABLE ftable ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '1' ); +--Testcase 725: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable VALUES (1), (2); + QUERY PLAN +------------------------------------ + Insert on public.ftable + Batch Size: 1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1 +(4 rows) + +--Testcase 726: +INSERT INTO ftable VALUES (1), (2); +--Testcase 727: +SELECT COUNT(*) FROM ftable; + count +------- + 2 +(1 row) + +-- Disable batch inserting into foreign tables with BEFORE ROW INSERT triggers +-- even if the batch_size option is enabled. +--Testcase 776: +ALTER FOREIGN TABLE ftable OPTIONS ( SET batch_size '10' ); +--Testcase 777: +CREATE TRIGGER trig_row_before BEFORE INSERT ON ftable +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 778: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable VALUES (3), (4); + QUERY PLAN +------------------------------------ + Insert on public.ftable + Batch Size: 1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1 +(4 rows) + +--Testcase 779: +INSERT INTO ftable VALUES (3), (4); +NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON ftable +NOTICE: NEW: (3) +NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON ftable +NOTICE: NEW: (4) +--Testcase 780: +SELECT COUNT(*) FROM ftable; + count +------- + 4 +(1 row) + +-- Clean up +--Testcase 781: +DROP TRIGGER trig_row_before ON ftable; +--Testcase 728: +DROP FOREIGN TABLE ftable; +--Testcase 729: +DELETE FROM batch_table; +--Testcase 785: +DROP FOREIGN TABLE batch_table; +-- influxdb_fdw does not support partition insert +-- Use partitioning +--Testcase 730: +CREATE TABLE batch_table ( x int ) PARTITION BY HASH (x); +--Testcase 731: +CREATE TABLE batch_table_p0 (LIKE batch_table); +--Testcase 732: +CREATE FOREIGN TABLE batch_table_p0f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 0) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p0', batch_size '10'); +--Testcase 733: +CREATE TABLE batch_table_p1 (LIKE batch_table); +--Testcase 734: +CREATE FOREIGN TABLE batch_table_p1f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 1) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p1', batch_size '1'); +--Testcase 735: +CREATE TABLE batch_table_p2 + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 2); +--Testcase 736: +INSERT INTO batch_table SELECT * FROM generate_series(1, 66) i; +ERROR: Not support partition insert +--Testcase 737: +SELECT COUNT(*) FROM batch_table; + count +------- + 0 +(1 row) + +-- Check that enabling batched inserts doesn't interfere with cross-partition +-- updates +--Testcase 738: +CREATE TABLE batch_cp_upd_test (a int) PARTITION BY LIST (a); +--Testcase 739: +CREATE TABLE batch_cp_upd_test1 (LIKE batch_cp_upd_test); +--Testcase 740: +CREATE FOREIGN TABLE batch_cp_upd_test1_f + PARTITION OF batch_cp_upd_test + FOR VALUES IN (1) + SERVER influxdb_svr + OPTIONS (table 'batch_cp_upd_test1', batch_size '10'); +--Testcase 741: +CREATE TABLE batch_cp_up_test1 PARTITION OF batch_cp_upd_test + FOR VALUES IN (2); +--Testcase 742: +INSERT INTO batch_cp_upd_test VALUES (1), (2); +ERROR: Not support partition insert +-- The following moves a row from the local partition to the foreign one +-- influxdb_fdw does not support UPDATE +-- UPDATE batch_cp_upd_test t SET a = 1 FROM (VALUES (1), (2)) s(a) WHERE t.a = s.a; +--Testcase 743: +SELECT tableoid::regclass, * FROM batch_cp_upd_test; + tableoid | a +----------+--- +(0 rows) + +-- Clean up +--Testcase 744: +DROP TABLE batch_table, batch_cp_upd_test, batch_table_p0, batch_table_p1 CASCADE; +-- influxdb_fdw does not support partition insert +-- Use partitioning +--Testcase 745: +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +--Testcase 746: +CREATE TABLE batch_table ( x int, field1 text, field2 text) PARTITION BY HASH (x); +--Testcase 747: +CREATE TABLE batch_table_p0 (LIKE batch_table); +--Testcase 748: +ALTER TABLE batch_table_p0 ADD CONSTRAINT p0_pkey PRIMARY KEY (x); +--Testcase 749: +CREATE FOREIGN TABLE batch_table_p0f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 2, REMAINDER 0) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p0'); +--Testcase 750: +CREATE TABLE batch_table_p1 (LIKE batch_table); +--Testcase 751: +ALTER TABLE batch_table_p1 ADD CONSTRAINT p1_pkey PRIMARY KEY (x); +--Testcase 752: +CREATE FOREIGN TABLE batch_table_p1f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 2, REMAINDER 1) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p1'); +--Testcase 753: +INSERT INTO batch_table SELECT i, 'test'||i, 'test'|| i FROM generate_series(1, 50) i; +ERROR: Not support partition insert +--Testcase 754: +SELECT COUNT(*) FROM batch_table; + count +------- + 0 +(1 row) + +--Testcase 755: +SELECT * FROM batch_table ORDER BY x; + x | field1 | field2 +---+--------+-------- +(0 rows) + +--Testcase 756: +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); +-- Clean up +--Testcase 757: +DROP TABLE batch_table, batch_table_p0, batch_table_p1 CASCADE; +/* InfluxDB does not support partition table +-- =================================================================== +-- test asynchronous execution +-- =================================================================== + +ALTER SERVER loopback OPTIONS (DROP extensions); +ALTER SERVER loopback OPTIONS (ADD async_capable 'true'); +ALTER SERVER loopback2 OPTIONS (ADD async_capable 'true'); + +CREATE TABLE async_pt (a int, b int, c text) PARTITION BY RANGE (a); +CREATE TABLE base_tbl1 (a int, b int, c text); +CREATE TABLE base_tbl2 (a int, b int, c text); +CREATE FOREIGN TABLE async_p1 PARTITION OF async_pt FOR VALUES FROM (1000) TO (2000) + SERVER loopback OPTIONS (table_name 'base_tbl1'); +CREATE FOREIGN TABLE async_p2 PARTITION OF async_pt FOR VALUES FROM (2000) TO (3000) + SERVER loopback2 OPTIONS (table_name 'base_tbl2'); +INSERT INTO async_p1 SELECT 1000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +INSERT INTO async_p2 SELECT 2000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +-- simple queries +CREATE TABLE result_tbl (a int, b int, c text); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b % 100 = 0; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b % 100 = 0; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT a, b, 'AAA' || c FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT a, b, 'AAA' || c FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- Check case where multiple partitions use the same connection +CREATE TABLE base_tbl3 (a int, b int, c text); +CREATE FOREIGN TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO (4000) + SERVER loopback2 OPTIONS (table_name 'base_tbl3'); +INSERT INTO async_p3 SELECT 3000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +DROP FOREIGN TABLE async_p3; +DROP TABLE base_tbl3; + +-- Check case where the partitioned table has local/remote partitions +CREATE TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO (4000); +INSERT INTO async_p3 SELECT 3000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- partitionwise joins +SET enable_partitionwise_join TO true; + +CREATE TABLE join_tbl (a1 int, b1 int, c1 text, a2 int, b2 int, c2 text); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT * FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT * FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT t1.a, t1.b, 'AAA' || t1.c, t2.a, t2.b, 'AAA' || t2.c FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT t1.a, t1.b, 'AAA' || t1.c, t2.a, t2.b, 'AAA' || t2.c FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +RESET enable_partitionwise_join; + +-- Test rescan of an async Append node with do_exec_prune=false +SET enable_hashjoin TO false; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT * FROM async_p1 t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT * FROM async_p1 t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +RESET enable_hashjoin; + +-- Test interaction of async execution with plan-time partition pruning +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE a < 3000; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE a < 2000; + +-- Test interaction of async execution with run-time partition pruning +SET plan_cache_mode TO force_generic_plan; + +PREPARE async_pt_query (int, int) AS + INSERT INTO result_tbl SELECT * FROM async_pt WHERE a < $1 AND b === $2; + +EXPLAIN (VERBOSE, COSTS OFF) +EXECUTE async_pt_query (3000, 505); +EXECUTE async_pt_query (3000, 505); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +EXECUTE async_pt_query (2000, 505); +EXECUTE async_pt_query (2000, 505); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +RESET plan_cache_mode; + +CREATE TABLE local_tbl(a int, b int, c text); +INSERT INTO local_tbl VALUES (1505, 505, 'foo'), (2505, 505, 'bar'); +ANALYZE local_tbl; + +CREATE INDEX base_tbl1_idx ON base_tbl1 (a); +CREATE INDEX base_tbl2_idx ON base_tbl2 (a); +CREATE INDEX async_p3_idx ON async_p3 (a); +ANALYZE base_tbl1; +ANALYZE base_tbl2; +ANALYZE async_p3; + +ALTER FOREIGN TABLE async_p1 OPTIONS (use_remote_estimate 'true'); +ALTER FOREIGN TABLE async_p2 OPTIONS (use_remote_estimate 'true'); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; + +ALTER FOREIGN TABLE async_p1 OPTIONS (DROP use_remote_estimate); +ALTER FOREIGN TABLE async_p2 OPTIONS (DROP use_remote_estimate); + +DROP TABLE local_tbl; +DROP INDEX base_tbl1_idx; +DROP INDEX base_tbl2_idx; +DROP INDEX async_p3_idx; + +-- UNION queries +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION ALL +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION ALL +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- Disable async execution if we use gating Result nodes for pseudoconstant +-- quals +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE CURRENT_USER = SESSION_USER; + +EXPLAIN (VERBOSE, COSTS OFF) +(SELECT * FROM async_p1 WHERE CURRENT_USER = SESSION_USER) +UNION ALL +(SELECT * FROM async_p2 WHERE CURRENT_USER = SESSION_USER); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ((SELECT * FROM async_p1 WHERE b < 10) UNION ALL (SELECT * FROM async_p2 WHERE b < 10)) s WHERE CURRENT_USER = SESSION_USER; + +-- Test that pending requests are processed properly +SET enable_mergejoin TO false; +SET enable_hashjoin TO false; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt t1, async_p2 t2 WHERE t1.a = t2.a AND t1.b === 505; +SELECT * FROM async_pt t1, async_p2 t2 WHERE t1.a = t2.a AND t1.b === 505; + +CREATE TABLE local_tbl (a int, b int, c text); +INSERT INTO local_tbl VALUES (1505, 505, 'foo'); +ANALYZE local_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; + +-- Check with foreign modify +CREATE TABLE base_tbl3 (a int, b int, c text); +CREATE FOREIGN TABLE remote_tbl (a int, b int, c text) + SERVER loopback OPTIONS (table_name 'base_tbl3'); +INSERT INTO remote_tbl VALUES (2505, 505, 'bar'); + +CREATE TABLE base_tbl4 (a int, b int, c text); +CREATE FOREIGN TABLE insert_tbl (a int, b int, c text) + SERVER loopback OPTIONS (table_name 'base_tbl4'); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO insert_tbl (SELECT * FROM local_tbl UNION ALL SELECT * FROM remote_tbl); +INSERT INTO insert_tbl (SELECT * FROM local_tbl UNION ALL SELECT * FROM remote_tbl); + +SELECT * FROM insert_tbl ORDER BY a; + +-- Check with direct modify +EXPLAIN (VERBOSE, COSTS OFF) +WITH t AS (UPDATE remote_tbl SET c = c || c RETURNING *) +INSERT INTO join_tbl SELECT * FROM async_pt LEFT JOIN t ON (async_pt.a = t.a AND async_pt.b = t.b) WHERE async_pt.b === 505; +WITH t AS (UPDATE remote_tbl SET c = c || c RETURNING *) +INSERT INTO join_tbl SELECT * FROM async_pt LEFT JOIN t ON (async_pt.a = t.a AND async_pt.b = t.b) WHERE async_pt.b === 505; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +DROP TABLE local_tbl; +DROP FOREIGN TABLE remote_tbl; +DROP FOREIGN TABLE insert_tbl; +DROP TABLE base_tbl3; +DROP TABLE base_tbl4; + +RESET enable_mergejoin; +RESET enable_hashjoin; + +-- Test that UPDATE/DELETE with inherited target works with async_capable enabled +EXPLAIN (VERBOSE, COSTS OFF) +UPDATE async_pt SET c = c || c WHERE b = 0 RETURNING *; +UPDATE async_pt SET c = c || c WHERE b = 0 RETURNING *; +EXPLAIN (VERBOSE, COSTS OFF) +DELETE FROM async_pt WHERE b = 0 RETURNING *; +DELETE FROM async_pt WHERE b = 0 RETURNING *; + +-- Check EXPLAIN ANALYZE for a query that scans empty partitions asynchronously +DELETE FROM async_p1; +DELETE FROM async_p2; +DELETE FROM async_p3; + +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM async_pt; + +-- Clean up +DROP TABLE async_pt; +DROP TABLE base_tbl1; +DROP TABLE base_tbl2; +DROP TABLE result_tbl; +DROP TABLE join_tbl; + +-- Test that an asynchronous fetch is processed before restarting the scan in +-- ReScanForeignScan +CREATE TABLE base_tbl (a int, b int); +INSERT INTO base_tbl VALUES (1, 11), (2, 22), (3, 33); +CREATE FOREIGN TABLE foreign_tbl (b int) + SERVER loopback OPTIONS (table_name 'base_tbl'); +CREATE FOREIGN TABLE foreign_tbl2 () INHERITS (foreign_tbl) + SERVER loopback OPTIONS (table_name 'base_tbl'); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT a FROM base_tbl WHERE a IN (SELECT a FROM foreign_tbl); +SELECT a FROM base_tbl WHERE a IN (SELECT a FROM foreign_tbl); + +-- Clean up +DROP FOREIGN TABLE foreign_tbl CASCADE; +DROP TABLE base_tbl; + +ALTER SERVER loopback OPTIONS (DROP async_capable); +ALTER SERVER loopback2 OPTIONS (DROP async_capable); +*/ +-- =================================================================== +-- test invalid server, foreign table and foreign data wrapper options +-- =================================================================== +/* +-- InfluxDB FDW does not have these options +-- Invalid fdw_startup_cost option +CREATE SERVER inv_scst FOREIGN DATA WRAPPER postgres_fdw + OPTIONS(fdw_startup_cost '100$%$#$#'); +-- Invalid fdw_tuple_cost option +CREATE SERVER inv_scst FOREIGN DATA WRAPPER postgres_fdw + OPTIONS(fdw_tuple_cost '100$%$#$#'); +-- Invalid fetch_size option +CREATE FOREIGN TABLE inv_fsz (c1 int ) + SERVER loopback OPTIONS (fetch_size '100$%$#$#'); +*/ +-- Invalid batch_size option +--Testcase 776: +CREATE FOREIGN TABLE inv_bsz (c1 int ) + SERVER influxdb_svr OPTIONS (batch_size '100$%$#$#'); +ERROR: invalid value for integer option "batch_size": 100$%$#$# +-- No option is allowed to be specified at foreign data wrapper level +--Testcase 782: +ALTER FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (nonexistent 'fdw'); +ERROR: invalid option "nonexistent" +HINT: There are no valid options in this context. +/* +-- =================================================================== +-- application_name is an option in libpq of postgres +-- so Influxdb_fdw not support application_name. +-- test postgres_fdw.application_name GUC +-- =================================================================== +--- Turn debug_discard_caches off for this test to make sure that +--- the remote connection is alive when checking its application_name. +SET debug_discard_caches = 0; + +-- Specify escape sequences in application_name option of a server +-- object so as to test that they are replaced with status information +-- expectedly. +-- +-- Since pg_stat_activity.application_name may be truncated to less than +-- NAMEDATALEN characters, note that substring() needs to be used +-- at the condition of test query to make sure that the string consisting +-- of database name and process ID is also less than that. +ALTER SERVER loopback2 OPTIONS (application_name 'fdw_%d%p'); +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_database() || pg_backend_pid() for + current_setting('max_identifier_length')::int); + +-- postgres_fdw.application_name overrides application_name option +-- of a server object if both settings are present. +SET postgres_fdw.application_name TO 'fdw_%a%u%%'; +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_setting('application_name') || + CURRENT_USER || '%' for current_setting('max_identifier_length')::int); + +-- Test %c (session ID) and %C (cluster name) escape sequences. +SET postgres_fdw.application_name TO 'fdw_%C%c'; +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_setting('cluster_name') || + to_hex(trunc(EXTRACT(EPOCH FROM (SELECT backend_start FROM + pg_stat_get_activity(pg_backend_pid()))))::integer) || '.' || + to_hex(pg_backend_pid()) + for current_setting('max_identifier_length')::int); + +--Clean up +RESET postgres_fdw.application_name; +RESET debug_discard_caches; + +-- =================================================================== +-- test parallel commit +-- =================================================================== +ALTER SERVER loopback OPTIONS (ADD parallel_commit 'true'); +ALTER SERVER loopback2 OPTIONS (ADD parallel_commit 'true'); + +CREATE TABLE ploc1 (f1 int, f2 text); +CREATE FOREIGN TABLE prem1 (f1 int, f2 text) + SERVER loopback OPTIONS (table_name 'ploc1'); +CREATE TABLE ploc2 (f1 int, f2 text); +CREATE FOREIGN TABLE prem2 (f1 int, f2 text) + SERVER loopback2 OPTIONS (table_name 'ploc2'); + +BEGIN; +INSERT INTO prem1 VALUES (101, 'foo'); +INSERT INTO prem2 VALUES (201, 'bar'); +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +BEGIN; +SAVEPOINT s; +INSERT INTO prem1 VALUES (102, 'foofoo'); +INSERT INTO prem2 VALUES (202, 'barbar'); +RELEASE SAVEPOINT s; +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +-- This tests executing DEALLOCATE ALL against foreign servers in parallel +-- during pre-commit +BEGIN; +SAVEPOINT s; +INSERT INTO prem1 VALUES (103, 'baz'); +INSERT INTO prem2 VALUES (203, 'qux'); +ROLLBACK TO SAVEPOINT s; +RELEASE SAVEPOINT s; +INSERT INTO prem1 VALUES (104, 'bazbaz'); +INSERT INTO prem2 VALUES (204, 'quxqux'); +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +ALTER SERVER loopback OPTIONS (DROP parallel_commit); +ALTER SERVER loopback2 OPTIONS (DROP parallel_commit); +*/ +-- Clean-up +--Testcase 786: +delete from ft1; +--Testcase 787: +delete from ft2; +--Testcase 788: +delete from ft4; +--Testcase 789: +delete from ft5; +--Testcase 790: +delete from foo; +--Testcase 791: +delete from bar; +--Testcase 792: +delete from loct1; +--Testcase 793: +delete from loct2; +--Testcase 794: +delete from rem1; +--Testcase 795: +drop foreign table foo cascade; +NOTICE: drop cascades to foreign table foo2 +--Testcase 796: +drop foreign table bar cascade; +NOTICE: drop cascades to foreign table bar2 +--Testcase 797: +drop foreign table loct1; +--Testcase 798: +drop foreign table loct2; +--Testcase 799: +drop foreign table ft1; +--Testcase 800: +drop foreign table ft2; +--Testcase 801: +drop foreign table ft4; +--Testcase 802: +drop foreign table ft5; +--Testcase 803: +DROP TYPE IF EXISTS user_enum; +--Testcase 804: +DROP SCHEMA IF EXISTS "S 1" CASCADE; +NOTICE: drop cascades to 6 other objects +DETAIL: drop cascades to foreign table "S 1"."T 0" +drop cascades to foreign table "S 1"."T 1" +drop cascades to foreign table "S 1"."T 2" +drop cascades to foreign table "S 1"."T 3" +drop cascades to foreign table "S 1"."T 4" +drop cascades to function "S 1".f_brtrig() +--Testcase 805: +DROP FUNCTION IF EXISTS trigger_func(); +--Testcase 806: +DROP FUNCTION IF EXISTS trig_row_before_insupdate(); +--Testcase 807: +DROP FUNCTION IF EXISTS trig_null(); +--Testcase 808: +DROP SCHEMA IF EXISTS import_influx1 CASCADE; +NOTICE: drop cascades to 9 other objects +DETAIL: drop cascades to foreign table import_influx1."T1" +drop cascades to foreign table import_influx1."T2" +drop cascades to foreign table import_influx1."T3" +drop cascades to foreign table import_influx1."T4" +drop cascades to foreign table import_influx1.bar +drop cascades to foreign table import_influx1.foo +drop cascades to foreign table import_influx1.loc1 +drop cascades to foreign table import_influx1.loct1 +drop cascades to foreign table import_influx1.loct2 +--Testcase 809: +DROP SCHEMA IF EXISTS import_influx2 CASCADE; +--Testcase 810: +DROP SCHEMA IF EXISTS import_influx3 CASCADE; +--Testcase 811: +DROP SCHEMA IF EXISTS import_influx4 CASCADE; +NOTICE: drop cascades to 9 other objects +DETAIL: drop cascades to foreign table import_influx4."T1" +drop cascades to foreign table import_influx4."T2" +drop cascades to foreign table import_influx4."T3" +drop cascades to foreign table import_influx4."T4" +drop cascades to foreign table import_influx4.bar +drop cascades to foreign table import_influx4.foo +drop cascades to foreign table import_influx4.loc1 +drop cascades to foreign table import_influx4.loct1 +drop cascades to foreign table import_influx4.loct2 +--Testcase 812: +DROP TABLE IF EXISTS batch_cp_upd_test1; +--Testcase 758: +DROP USER MAPPING FOR public SERVER testserver1; +--Testcase 759: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 760: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2; +--Testcase 761: +DROP SERVER testserver1 CASCADE; +--Testcase 762: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 8 other objects +DETAIL: drop cascades to foreign table loct_empty +drop cascades to foreign table ft_empty +drop cascades to foreign table loct3 +drop cascades to foreign table ft3 +drop cascades to foreign table loc1 +drop cascades to foreign table rem1 +drop cascades to foreign table gloc1 +drop cascades to foreign table grem1 +--Testcase 763: +DROP SERVER influxdb_svr2 CASCADE; +NOTICE: drop cascades to foreign table ft6 +--Testcase 764: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/15.0/extra/insert.out b/expected/15.0/extra/insert.out new file mode 100644 index 0000000..2c77781 --- /dev/null +++ b/expected/15.0/extra/insert.out @@ -0,0 +1,695 @@ +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +-- +-- insert with DEFAULT in the target_list +-- +--Testcase 4: +CREATE FOREIGN TABLE inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 'testing') SERVER influxdb_svr OPTIONS(table 'inserttest'); +--Testcase 5: +insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT); +ERROR: influxdb_fdw : null value in column "col2" of relation "inserttest" violates not-null constraint +--Testcase 6: +insert into inserttest (col2, col3) values (3, DEFAULT); +--Testcase 7: +insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT); +--Testcase 8: +insert into inserttest values (DEFAULT, 5, 'test'); +--Testcase 9: +insert into inserttest values (DEFAULT, 7); +--Testcase 10: +select * from inserttest; + col1 | col2 | col3 +------+------+--------- + | 3 | testing + | 5 | testing + | 5 | test + | 7 | testing +(4 rows) + +-- +-- insert with similar expression / target_list values (all fail) +-- +--Testcase 11: +insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT); +ERROR: INSERT has more target columns than expressions +LINE 1: insert into inserttest (col1, col2, col3) values (DEFAULT, D... + ^ +--Testcase 12: +insert into inserttest (col1, col2, col3) values (1, 2); +ERROR: INSERT has more target columns than expressions +LINE 1: insert into inserttest (col1, col2, col3) values (1, 2); + ^ +--Testcase 13: +insert into inserttest (col1) values (1, 2); +ERROR: INSERT has more expressions than target columns +LINE 1: insert into inserttest (col1) values (1, 2); + ^ +--Testcase 14: +insert into inserttest (col1) values (DEFAULT, DEFAULT); +ERROR: INSERT has more expressions than target columns +LINE 1: insert into inserttest (col1) values (DEFAULT, DEFAULT); + ^ +--Testcase 15: +select * from inserttest; + col1 | col2 | col3 +------+------+--------- + | 3 | testing + | 5 | testing + | 5 | test + | 7 | testing +(4 rows) + +-- +-- VALUES test +-- +--Testcase 16: +insert into inserttest values(10, 20, '40'), (-1, 2, DEFAULT), + ((select 2), (select i from (values(3)) as foo (i)), 'values are fun!'); +--Testcase 17: +select * from inserttest; + col1 | col2 | col3 +------+------+----------------- + | 3 | testing + | 5 | testing + | 5 | test + | 7 | testing + 10 | 20 | 40 + -1 | 2 | testing + 2 | 3 | values are fun! +(7 rows) + +-- +-- TOASTed value test +-- +--Testcase 18: +insert into inserttest values(30, 50, repeat('x', 10000)); +--Testcase 19: +select col1, col2, char_length(col3) from inserttest; + col1 | col2 | char_length +------+------+------------- + | 3 | 7 + | 5 | 7 + | 5 | 4 + | 7 | 7 + 10 | 20 | 2 + -1 | 2 | 7 + 2 | 3 | 15 + 30 | 50 | 10000 +(8 rows) + +--Testcase 20: +-- Clean up: +--Testcase 24: +delete from inserttest; +--Testcase 25: +drop foreign table inserttest; +/* +-- skip, influxdb does not support create table with WITH option +-- +-- tuple larger than fillfactor +-- +CREATE TABLE large_tuple_test (a int, b text) WITH (fillfactor = 10); +ALTER TABLE large_tuple_test ALTER COLUMN b SET STORAGE plain; + +-- create page w/ free space in range [nearlyEmptyFreeSpace, MaxHeapTupleSize) +INSERT INTO large_tuple_test (select 1, NULL); + +-- should still fit on the page +INSERT INTO large_tuple_test (select 2, repeat('a', 1000)); +SELECT pg_size_pretty(pg_relation_size('large_tuple_test'::regclass, 'main')); + +-- add small record to the second page +INSERT INTO large_tuple_test (select 3, NULL); + +-- now this tuple won't fit on the second page, but the insert should +-- still succeed by extending the relation +INSERT INTO large_tuple_test (select 4, repeat('a', 8126)); + +DROP TABLE large_tuple_test; +*/ +/* +-- skip, influxdb does not support create type +-- +-- check indirection (field/array assignment), cf bug #14265 +-- +-- these tests are aware that transformInsertStmt has 3 separate code paths +-- + +create type insert_test_type as (if1 int, if2 text[]); + +create table inserttest (f1 int, f2 int[], + f3 insert_test_type, f4 insert_test_type[]); + +insert into inserttest (f2[1], f2[2]) values (1,2); +insert into inserttest (f2[1], f2[2]) values (3,4), (5,6); +insert into inserttest (f2[1], f2[2]) select 7,8; +insert into inserttest (f2[1], f2[2]) values (1,default); -- not supported + +insert into inserttest (f3.if1, f3.if2) values (1,array['foo']); +insert into inserttest (f3.if1, f3.if2) values (1,'{foo}'), (2,'{bar}'); +insert into inserttest (f3.if1, f3.if2) select 3, '{baz,quux}'; +insert into inserttest (f3.if1, f3.if2) values (1,default); -- not supported + +insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'); +insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'), ('baz', 'quux'); +insert into inserttest (f3.if2[1], f3.if2[2]) select 'bear', 'beer'; + +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'); +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'), ('baz', 'quux'); +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) select 'bear', 'beer'; + +select * from inserttest; + +-- also check reverse-listing +create table inserttest2 (f1 bigint, f2 text); +create rule irule1 as on insert to inserttest2 do also + insert into inserttest (f3.if2[1], f3.if2[2]) + values (new.f1,new.f2); +create rule irule2 as on insert to inserttest2 do also + insert into inserttest (f4[1].if1, f4[1].if2[2]) + values (1,'fool'),(new.f1,new.f2); +create rule irule3 as on insert to inserttest2 do also + insert into inserttest (f4[1].if1, f4[1].if2[2]) + select new.f1, new.f2; +\d+ inserttest2 + +drop table inserttest2; +drop table inserttest; +drop type insert_test_type; +*/ +/* +-- skip, influxdb does not support partition table +-- direct partition inserts should check partition bound constraint +create table range_parted ( + a text, + b int +) partition by range (a, (b+0)); + +-- no partitions, so fail +insert into range_parted values ('a', 11); + +create table part1 partition of range_parted for values from ('a', 1) to ('a', 10); +create table part2 partition of range_parted for values from ('a', 10) to ('a', 20); +create table part3 partition of range_parted for values from ('b', 1) to ('b', 10); +create table part4 partition of range_parted for values from ('b', 10) to ('b', 20); + +-- fail +insert into part1 values ('a', 11); +insert into part1 values ('b', 1); +-- ok +insert into part1 values ('a', 1); +-- fail +insert into part4 values ('b', 21); +insert into part4 values ('a', 10); +-- ok +insert into part4 values ('b', 10); + +-- fail (partition key a has a NOT NULL constraint) +insert into part1 values (null); +-- fail (expression key (b+0) cannot be null either) +insert into part1 values (1); + +create table list_parted ( + a text, + b int +) partition by list (lower(a)); +create table part_aa_bb partition of list_parted FOR VALUES IN ('aa', 'bb'); +create table part_cc_dd partition of list_parted FOR VALUES IN ('cc', 'dd'); +create table part_null partition of list_parted FOR VALUES IN (null); + +-- fail +insert into part_aa_bb values ('cc', 1); +insert into part_aa_bb values ('AAa', 1); +insert into part_aa_bb values (null); +-- ok +insert into part_cc_dd values ('cC', 1); +insert into part_null values (null, 0); + +-- check in case of multi-level partitioned table +create table part_ee_ff partition of list_parted for values in ('ee', 'ff') partition by range (b); +create table part_ee_ff1 partition of part_ee_ff for values from (1) to (10); +create table part_ee_ff2 partition of part_ee_ff for values from (10) to (20); + +-- test default partition +create table part_default partition of list_parted default; +-- Negative test: a row, which would fit in other partition, does not fit +-- default partition, even when inserted directly +insert into part_default values ('aa', 2); +insert into part_default values (null, 2); +-- ok +insert into part_default values ('Zz', 2); +-- test if default partition works as expected for multi-level partitioned +-- table as well as when default partition itself is further partitioned +drop table part_default; +create table part_xx_yy partition of list_parted for values in ('xx', 'yy') partition by list (a); +create table part_xx_yy_p1 partition of part_xx_yy for values in ('xx'); +create table part_xx_yy_defpart partition of part_xx_yy default; +create table part_default partition of list_parted default partition by range(b); +create table part_default_p1 partition of part_default for values from (20) to (30); +create table part_default_p2 partition of part_default for values from (30) to (40); + +-- fail +insert into part_ee_ff1 values ('EE', 11); +insert into part_default_p2 values ('gg', 43); +-- fail (even the parent's, ie, part_ee_ff's partition constraint applies) +insert into part_ee_ff1 values ('cc', 1); +insert into part_default values ('gg', 43); +-- ok +insert into part_ee_ff1 values ('ff', 1); +insert into part_ee_ff2 values ('ff', 11); +insert into part_default_p1 values ('cd', 25); +insert into part_default_p2 values ('de', 35); +insert into list_parted values ('ab', 21); +insert into list_parted values ('xx', 1); +insert into list_parted values ('yy', 2); +select tableoid::regclass, * from list_parted; + +-- Check tuple routing for partitioned tables + +-- fail +insert into range_parted values ('a', 0); +-- ok +insert into range_parted values ('a', 1); +insert into range_parted values ('a', 10); +-- fail +insert into range_parted values ('a', 20); +-- ok +insert into range_parted values ('b', 1); +insert into range_parted values ('b', 10); +-- fail (partition key (b+0) is null) +insert into range_parted values ('a'); + +-- Check default partition +create table part_def partition of range_parted default; +-- fail +insert into part_def values ('b', 10); +-- ok +insert into part_def values ('c', 10); +insert into range_parted values (null, null); +insert into range_parted values ('a', null); +insert into range_parted values (null, 19); +insert into range_parted values ('b', 20); + +select tableoid::regclass, * from range_parted; +-- ok +insert into list_parted values (null, 1); +insert into list_parted (a) values ('aA'); +-- fail (partition of part_ee_ff not found in both cases) +insert into list_parted values ('EE', 0); +insert into part_ee_ff values ('EE', 0); +-- ok +insert into list_parted values ('EE', 1); +insert into part_ee_ff values ('EE', 10); +select tableoid::regclass, * from list_parted; + +-- some more tests to exercise tuple-routing with multi-level partitioning +create table part_gg partition of list_parted for values in ('gg') partition by range (b); +create table part_gg1 partition of part_gg for values from (minvalue) to (1); +create table part_gg2 partition of part_gg for values from (1) to (10) partition by range (b); +create table part_gg2_1 partition of part_gg2 for values from (1) to (5); +create table part_gg2_2 partition of part_gg2 for values from (5) to (10); + +create table part_ee_ff3 partition of part_ee_ff for values from (20) to (30) partition by range (b); +create table part_ee_ff3_1 partition of part_ee_ff3 for values from (20) to (25); +create table part_ee_ff3_2 partition of part_ee_ff3 for values from (25) to (30); + +truncate list_parted; +insert into list_parted values ('aa'), ('cc'); +insert into list_parted select 'Ff', s.a from generate_series(1, 29) s(a); +insert into list_parted select 'gg', s.a from generate_series(1, 9) s(a); +insert into list_parted (b) values (1); +select tableoid::regclass::text, a, min(b) as min_b, max(b) as max_b from list_parted group by 1, 2 order by 1; + +-- direct partition inserts should check hash partition bound constraint + +create table hash_parted ( + a int +) partition by hash (a part_test_int4_ops); +create table hpart0 partition of hash_parted for values with (modulus 4, remainder 0); +create table hpart1 partition of hash_parted for values with (modulus 4, remainder 1); +create table hpart2 partition of hash_parted for values with (modulus 4, remainder 2); +create table hpart3 partition of hash_parted for values with (modulus 4, remainder 3); + +insert into hash_parted values(generate_series(1,10)); + +-- direct insert of values divisible by 4 - ok; +insert into hpart0 values(12),(16); +-- fail; +insert into hpart0 values(11); +-- 11 % 4 -> 3 remainder i.e. valid data for hpart3 partition +insert into hpart3 values(11); + +-- view data +select tableoid::regclass as part, a, a%4 as "remainder = a % 4" +from hash_parted order by part; + +-- test \d+ output on a table which has both partitioned and unpartitioned +-- partitions +\d+ list_parted + +-- cleanup +drop table range_parted, list_parted; +drop table hash_parted; + +-- test that a default partition added as the first partition accepts any value +-- including null +create table list_parted (a int) partition by list (a); +create table part_default partition of list_parted default; +\d+ part_default +insert into part_default values (null); +insert into part_default values (1); +insert into part_default values (-1); +select tableoid::regclass, a from list_parted; +-- cleanup +drop table list_parted; + +-- more tests for certain multi-level partitioning scenarios +create table mlparted (a int, b int) partition by range (a, b); +create table mlparted1 (b int not null, a int not null) partition by range ((b+0)); +create table mlparted11 (like mlparted1); +alter table mlparted11 drop a; +alter table mlparted11 add a int; +alter table mlparted11 drop a; +alter table mlparted11 add a int not null; +-- attnum for key attribute 'a' is different in mlparted, mlparted1, and mlparted11 +select attrelid::regclass, attname, attnum +from pg_attribute +where attname = 'a' + and (attrelid = 'mlparted'::regclass + or attrelid = 'mlparted1'::regclass + or attrelid = 'mlparted11'::regclass) +order by attrelid::regclass::text; + +alter table mlparted1 attach partition mlparted11 for values from (2) to (5); +alter table mlparted attach partition mlparted1 for values from (1, 2) to (1, 10); + +-- check that "(1, 2)" is correctly routed to mlparted11. +insert into mlparted values (1, 2); +select tableoid::regclass, * from mlparted; + +-- check that proper message is shown after failure to route through mlparted1 +insert into mlparted (a, b) values (1, 5); + +truncate mlparted; +alter table mlparted add constraint check_b check (b = 3); + +-- have a BR trigger modify the row such that the check_b is violated +create function mlparted11_trig_fn() +returns trigger AS +$$ +begin + NEW.b := 4; + return NEW; +end; +$$ +language plpgsql; +create trigger mlparted11_trig before insert ON mlparted11 + for each row execute procedure mlparted11_trig_fn(); + +-- check that the correct row is shown when constraint check_b fails after +-- "(1, 2)" is routed to mlparted11 (actually "(1, 4)" would be shown due +-- to the BR trigger mlparted11_trig_fn) +insert into mlparted values (1, 2); +drop trigger mlparted11_trig on mlparted11; +drop function mlparted11_trig_fn(); + +-- check that inserting into an internal partition successfully results in +-- checking its partition constraint before inserting into the leaf partition +-- selected by tuple-routing +insert into mlparted1 (a, b) values (2, 3); + +-- check routing error through a list partitioned table when the key is null +create table lparted_nonullpart (a int, b char) partition by list (b); +create table lparted_nonullpart_a partition of lparted_nonullpart for values in ('a'); +insert into lparted_nonullpart values (1); +drop table lparted_nonullpart; + +-- check that RETURNING works correctly with tuple-routing +alter table mlparted drop constraint check_b; +create table mlparted12 partition of mlparted1 for values from (5) to (10); +create table mlparted2 (b int not null, a int not null); +alter table mlparted attach partition mlparted2 for values from (1, 10) to (1, 20); +create table mlparted3 partition of mlparted for values from (1, 20) to (1, 30); +create table mlparted4 (like mlparted); +alter table mlparted4 drop a; +alter table mlparted4 add a int not null; +alter table mlparted attach partition mlparted4 for values from (1, 30) to (1, 40); +with ins (a, b, c) as + (insert into mlparted (b, a) select s.a, 1 from generate_series(2, 39) s(a) returning tableoid::regclass, *) + select a, b, min(c), max(c) from ins group by a, b order by 1; + +alter table mlparted add c text; +create table mlparted5 (c text, a int not null, b int not null) partition by list (c); +create table mlparted5a (a int not null, c text, b int not null); +alter table mlparted5 attach partition mlparted5a for values in ('a'); +alter table mlparted attach partition mlparted5 for values from (1, 40) to (1, 50); +alter table mlparted add constraint check_b check (a = 1 and b < 45); +insert into mlparted values (1, 45, 'a'); +create function mlparted5abrtrig_func() returns trigger as $$ begin new.c = 'b'; return new; end; $$ language plpgsql; +create trigger mlparted5abrtrig before insert on mlparted5a for each row execute procedure mlparted5abrtrig_func(); +insert into mlparted5 (a, b, c) values (1, 40, 'a'); +drop table mlparted5; +alter table mlparted drop constraint check_b; + +-- Check multi-level default partition +create table mlparted_def partition of mlparted default partition by range(a); +create table mlparted_def1 partition of mlparted_def for values from (40) to (50); +create table mlparted_def2 partition of mlparted_def for values from (50) to (60); +insert into mlparted values (40, 100); +insert into mlparted_def1 values (42, 100); +insert into mlparted_def2 values (54, 50); +-- fail +insert into mlparted values (70, 100); +insert into mlparted_def1 values (52, 50); +insert into mlparted_def2 values (34, 50); +-- ok +create table mlparted_defd partition of mlparted_def default; +insert into mlparted values (70, 100); + +select tableoid::regclass, * from mlparted_def; + +-- Check multi-level tuple routing with attributes dropped from the +-- top-most parent. First remove the last attribute. +alter table mlparted add d int, add e int; +alter table mlparted drop e; +create table mlparted5 partition of mlparted + for values from (1, 40) to (1, 50) partition by range (c); +create table mlparted5_ab partition of mlparted5 + for values from ('a') to ('c') partition by list (c); +-- This partitioned table should remain with no partitions. +create table mlparted5_cd partition of mlparted5 + for values from ('c') to ('e') partition by list (c); +create table mlparted5_a partition of mlparted5_ab for values in ('a'); +create table mlparted5_b (d int, b int, c text, a int); +alter table mlparted5_ab attach partition mlparted5_b for values in ('b'); +truncate mlparted; +insert into mlparted values (1, 2, 'a', 1); +insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a +insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b +insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails +insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails +select tableoid::regclass, * from mlparted order by a, b, c, d; +alter table mlparted drop d; +truncate mlparted; +-- Remove the before last attribute. +alter table mlparted add e int, add d int; +alter table mlparted drop e; +insert into mlparted values (1, 2, 'a', 1); +insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a +insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b +insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails +insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails +select tableoid::regclass, * from mlparted order by a, b, c, d; +alter table mlparted drop d; +drop table mlparted5; + +-- check that message shown after failure to find a partition shows the +-- appropriate key description (or none) in various situations +create table key_desc (a int, b int) partition by list ((a+0)); +create table key_desc_1 partition of key_desc for values in (1) partition by range (b); + +create user regress_insert_other_user; +grant select (a) on key_desc_1 to regress_insert_other_user; +grant insert on key_desc to regress_insert_other_user; + +set role regress_insert_other_user; +-- no key description is shown +insert into key_desc values (1, 1); + +reset role; +grant select (b) on key_desc_1 to regress_insert_other_user; +set role regress_insert_other_user; +-- key description (b)=(1) is now shown +insert into key_desc values (1, 1); + +-- key description is not shown if key contains expression +insert into key_desc values (2, 1); +reset role; +revoke all on key_desc from regress_insert_other_user; +revoke all on key_desc_1 from regress_insert_other_user; +drop role regress_insert_other_user; +drop table key_desc, key_desc_1; + +-- test minvalue/maxvalue restrictions +create table mcrparted (a int, b int, c int) partition by range (a, abs(b), c); +create table mcrparted0 partition of mcrparted for values from (minvalue, 0, 0) to (1, maxvalue, maxvalue); +create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, minvalue); +create table mcrparted4 partition of mcrparted for values from (21, minvalue, 0) to (30, 20, minvalue); + +-- check multi-column range partitioning expression enforces the same +-- constraint as what tuple-routing would determine it to be +create table mcrparted0 partition of mcrparted for values from (minvalue, minvalue, minvalue) to (1, maxvalue, maxvalue); +create table mcrparted1 partition of mcrparted for values from (2, 1, minvalue) to (10, 5, 10); +create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, maxvalue); +create table mcrparted3 partition of mcrparted for values from (11, 1, 1) to (20, 10, 10); +create table mcrparted4 partition of mcrparted for values from (21, minvalue, minvalue) to (30, 20, maxvalue); +create table mcrparted5 partition of mcrparted for values from (30, 21, 20) to (maxvalue, maxvalue, maxvalue); + +-- null not allowed in range partition +insert into mcrparted values (null, null, null); + +-- routed to mcrparted0 +insert into mcrparted values (0, 1, 1); +insert into mcrparted0 values (0, 1, 1); + +-- routed to mcparted1 +insert into mcrparted values (9, 1000, 1); +insert into mcrparted1 values (9, 1000, 1); +insert into mcrparted values (10, 5, -1); +insert into mcrparted1 values (10, 5, -1); +insert into mcrparted values (2, 1, 0); +insert into mcrparted1 values (2, 1, 0); + +-- routed to mcparted2 +insert into mcrparted values (10, 6, 1000); +insert into mcrparted2 values (10, 6, 1000); +insert into mcrparted values (10, 1000, 1000); +insert into mcrparted2 values (10, 1000, 1000); + +-- no partition exists, nor does mcrparted3 accept it +insert into mcrparted values (11, 1, -1); +insert into mcrparted3 values (11, 1, -1); + +-- routed to mcrparted5 +insert into mcrparted values (30, 21, 20); +insert into mcrparted5 values (30, 21, 20); +insert into mcrparted4 values (30, 21, 20); -- error + +-- check rows +select tableoid::regclass::text, * from mcrparted order by 1; + +-- cleanup +drop table mcrparted; + +-- check that a BR constraint can't make partition contain violating rows +create table brtrigpartcon (a int, b text) partition by list (a); +create table brtrigpartcon1 partition of brtrigpartcon for values in (1); +create or replace function brtrigpartcon1trigf() returns trigger as $$begin new.a := 2; return new; end$$ language plpgsql; +create trigger brtrigpartcon1trig before insert on brtrigpartcon1 for each row execute procedure brtrigpartcon1trigf(); +insert into brtrigpartcon values (1, 'hi there'); +insert into brtrigpartcon1 values (1, 'hi there'); + +-- check that the message shows the appropriate column description in a +-- situation where the partitioned table is not the primary ModifyTable node +create table inserttest3 (f1 text default 'foo', f2 text default 'bar', f3 int); +create role regress_coldesc_role; +grant insert on inserttest3 to regress_coldesc_role; +grant insert on brtrigpartcon to regress_coldesc_role; +revoke select on brtrigpartcon from regress_coldesc_role; +set role regress_coldesc_role; +with result as (insert into brtrigpartcon values (1, 'hi there') returning 1) + insert into inserttest3 (f3) select * from result; +reset role; + +-- cleanup +revoke all on inserttest3 from regress_coldesc_role; +revoke all on brtrigpartcon from regress_coldesc_role; +drop role regress_coldesc_role; +drop table inserttest3; +drop table brtrigpartcon; +drop function brtrigpartcon1trigf(); + +-- check that "do nothing" BR triggers work with tuple-routing +create table donothingbrtrig_test (a int, b text) partition by list (a); +create table donothingbrtrig_test1 (b text, a int); +create table donothingbrtrig_test2 (c text, b text, a int); +alter table donothingbrtrig_test2 drop column c; +create or replace function donothingbrtrig_func() returns trigger as $$begin raise notice 'b: %', new.b; return NULL; end$$ language plpgsql; +create trigger donothingbrtrig1 before insert on donothingbrtrig_test1 for each row execute procedure donothingbrtrig_func(); +create trigger donothingbrtrig2 before insert on donothingbrtrig_test2 for each row execute procedure donothingbrtrig_func(); +alter table donothingbrtrig_test attach partition donothingbrtrig_test1 for values in (1); +alter table donothingbrtrig_test attach partition donothingbrtrig_test2 for values in (2); +insert into donothingbrtrig_test values (1, 'foo'), (2, 'bar'); +copy donothingbrtrig_test from stdout; +1 baz +2 qux +\. +select tableoid::regclass, * from donothingbrtrig_test; + +-- cleanup +drop table donothingbrtrig_test; +drop function donothingbrtrig_func(); + +-- check multi-column range partitioning with minvalue/maxvalue constraints +create table mcrparted (a text, b int) partition by range(a, b); +create table mcrparted1_lt_b partition of mcrparted for values from (minvalue, minvalue) to ('b', minvalue); +create table mcrparted2_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue); +create table mcrparted3_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue); +create table mcrparted4_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0); +create table mcrparted5_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10); +create table mcrparted6_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue); +create table mcrparted7_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue); +create table mcrparted8_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, maxvalue); + +\d+ mcrparted +\d+ mcrparted1_lt_b +\d+ mcrparted2_b +\d+ mcrparted3_c_to_common +\d+ mcrparted4_common_lt_0 +\d+ mcrparted5_common_0_to_10 +\d+ mcrparted6_common_ge_10 +\d+ mcrparted7_gt_common_lt_d +\d+ mcrparted8_ge_d + +insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10), + ('comm', -10), ('common', -10), ('common', 0), ('common', 10), + ('commons', 0), ('d', -10), ('e', 0); +select tableoid::regclass, * from mcrparted order by a, b; +drop table mcrparted; + +-- check that wholerow vars in the RETURNING list work with partitioned tables +create table returningwrtest (a int) partition by list (a); +create table returningwrtest1 partition of returningwrtest for values in (1); +insert into returningwrtest values (1) returning returningwrtest; + +-- check also that the wholerow vars in RETURNING list are converted as needed +alter table returningwrtest add b text; +create table returningwrtest2 (b text, c int, a int); +alter table returningwrtest2 drop c; +alter table returningwrtest attach partition returningwrtest2 for values in (2); +insert into returningwrtest values (2, 'foo') returning returningwrtest; +drop table returningwrtest; +*/ +-- Clean up +DO $d$ +declare + l_rec record; +begin + for l_rec in (select foreign_table_schema, foreign_table_name + from information_schema.foreign_tables) loop + execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); + end loop; +end; +$d$; +--Testcase 21: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 22: +DROP SERVER influxdb_svr CASCADE; +--Testcase 23: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/15.0/extra/join.out b/expected/15.0/extra/join.out new file mode 100644 index 0000000..31feccc --- /dev/null +++ b/expected/15.0/extra/join.out @@ -0,0 +1,7329 @@ +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +-- import time column as timestamp and text type +-- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; +-- +-- JOIN +-- Test JOIN clauses +-- +--Testcase 4: +CREATE FOREIGN TABLE J1_TBL ( + i integer, + j integer, + t text +) SERVER influxdb_svr; +--Testcase 5: +CREATE FOREIGN TABLE J2_TBL ( + i integer, + k integer +) SERVER influxdb_svr; +--Testcase 6: +INSERT INTO J1_TBL VALUES (1, 4, 'one'); +--Testcase 7: +INSERT INTO J1_TBL VALUES (2, 3, 'two'); +--Testcase 8: +INSERT INTO J1_TBL VALUES (3, 2, 'three'); +--Testcase 9: +INSERT INTO J1_TBL VALUES (4, 1, 'four'); +--Testcase 10: +INSERT INTO J1_TBL VALUES (5, 0, 'five'); +--Testcase 11: +INSERT INTO J1_TBL VALUES (6, 6, 'six'); +--Testcase 12: +INSERT INTO J1_TBL VALUES (7, 7, 'seven'); +--Testcase 13: +INSERT INTO J1_TBL VALUES (8, 8, 'eight'); +--Testcase 14: +INSERT INTO J1_TBL VALUES (0, NULL, 'zero'); +--Testcase 15: +INSERT INTO J1_TBL VALUES (NULL, NULL, 'null'); +--Testcase 16: +INSERT INTO J1_TBL VALUES (NULL, 0, 'zero'); +--Testcase 17: +INSERT INTO J2_TBL VALUES (1, -1); +--Testcase 18: +INSERT INTO J2_TBL VALUES (2, 2); +--Testcase 19: +INSERT INTO J2_TBL VALUES (3, -3); +--Testcase 20: +INSERT INTO J2_TBL VALUES (2, 4); +--Testcase 21: +INSERT INTO J2_TBL VALUES (5, -5); +--Testcase 22: +INSERT INTO J2_TBL VALUES (5, -5); +--Testcase 23: +INSERT INTO J2_TBL VALUES (0, NULL); +--InfluxDB does not accept NULL value +--INSERT INTO J2_TBL VALUES (NULL, NULL); +--Testcase 24: +INSERT INTO J2_TBL VALUES (NULL, 0); +--Testcase 25: +CREATE FOREIGN TABLE tenk1 ( + unique1 int4, + unique2 int4, + two int4, + four int4, + ten int4, + twenty int4, + hundred int4, + thousand int4, + twothousand int4, + fivethous int4, + tenthous int4, + odd int4, + even int4, + stringu1 name, + stringu2 name, + string4 name +) SERVER influxdb_svr OPTIONS (table 'tenk'); +--Does not support on Postgres 12 +--ALTER TABLE tenk1 SET WITH OIDS; +--Testcase 26: +CREATE FOREIGN TABLE tenk2 ( + unique1 int4, + unique2 int4, + two int4, + four int4, + ten int4, + twenty int4, + hundred int4, + thousand int4, + twothousand int4, + fivethous int4, + tenthous int4, + odd int4, + even int4, + stringu1 name, + stringu2 name, + string4 name +) SERVER influxdb_svr OPTIONS (table 'tenk'); +--Testcase 27: +CREATE FOREIGN TABLE INT4_TBL(f1 int4) SERVER influxdb_svr; +--Testcase 28: +CREATE FOREIGN TABLE FLOAT8_TBL(f1 float8) SERVER influxdb_svr; +--Testcase 29: +CREATE FOREIGN TABLE INT8_TBL( + q1 int8, + q2 int8 +) SERVER influxdb_svr; +--Testcase 30: +CREATE FOREIGN TABLE INT2_TBL(f1 int2) SERVER influxdb_svr; +-- useful in some tests below +--Testcase 31: +create temp table onerow(); +--Testcase 32: +insert into onerow default values; +analyze onerow; +-- +-- CORRELATION NAMES +-- Make sure that table/column aliases are supported +-- before diving into more complex join syntax. +-- +--Testcase 33: +SELECT * + FROM J1_TBL AS tx; + i | j | t +---+---+------- + 1 | 4 | one + 2 | 3 | two + 3 | 2 | three + 4 | 1 | four + 5 | 0 | five + 6 | 6 | six + 7 | 7 | seven + 8 | 8 | eight + 0 | | zero + | | null + | 0 | zero +(11 rows) + +--Testcase 34: +SELECT * + FROM J1_TBL tx; + i | j | t +---+---+------- + 1 | 4 | one + 2 | 3 | two + 3 | 2 | three + 4 | 1 | four + 5 | 0 | five + 6 | 6 | six + 7 | 7 | seven + 8 | 8 | eight + 0 | | zero + | | null + | 0 | zero +(11 rows) + +--Testcase 35: +SELECT * + FROM J1_TBL AS t1 (a, b, c); + a | b | c +---+---+------- + 1 | 4 | one + 2 | 3 | two + 3 | 2 | three + 4 | 1 | four + 5 | 0 | five + 6 | 6 | six + 7 | 7 | seven + 8 | 8 | eight + 0 | | zero + | | null + | 0 | zero +(11 rows) + +--Testcase 36: +SELECT * + FROM J1_TBL t1 (a, b, c); + a | b | c +---+---+------- + 1 | 4 | one + 2 | 3 | two + 3 | 2 | three + 4 | 1 | four + 5 | 0 | five + 6 | 6 | six + 7 | 7 | seven + 8 | 8 | eight + 0 | | zero + | | null + | 0 | zero +(11 rows) + +--Testcase 37: +SELECT * + FROM J1_TBL t1 (a, b, c), J2_TBL t2 (d, e); + a | b | c | d | e +---+---+-------+---+---- + 1 | 4 | one | 1 | -1 + 2 | 3 | two | 1 | -1 + 3 | 2 | three | 1 | -1 + 4 | 1 | four | 1 | -1 + 5 | 0 | five | 1 | -1 + 6 | 6 | six | 1 | -1 + 7 | 7 | seven | 1 | -1 + 8 | 8 | eight | 1 | -1 + 0 | | zero | 1 | -1 + | | null | 1 | -1 + | 0 | zero | 1 | -1 + 1 | 4 | one | 2 | 2 + 2 | 3 | two | 2 | 2 + 3 | 2 | three | 2 | 2 + 4 | 1 | four | 2 | 2 + 5 | 0 | five | 2 | 2 + 6 | 6 | six | 2 | 2 + 7 | 7 | seven | 2 | 2 + 8 | 8 | eight | 2 | 2 + 0 | | zero | 2 | 2 + | | null | 2 | 2 + | 0 | zero | 2 | 2 + 1 | 4 | one | 3 | -3 + 2 | 3 | two | 3 | -3 + 3 | 2 | three | 3 | -3 + 4 | 1 | four | 3 | -3 + 5 | 0 | five | 3 | -3 + 6 | 6 | six | 3 | -3 + 7 | 7 | seven | 3 | -3 + 8 | 8 | eight | 3 | -3 + 0 | | zero | 3 | -3 + | | null | 3 | -3 + | 0 | zero | 3 | -3 + 1 | 4 | one | 2 | 4 + 2 | 3 | two | 2 | 4 + 3 | 2 | three | 2 | 4 + 4 | 1 | four | 2 | 4 + 5 | 0 | five | 2 | 4 + 6 | 6 | six | 2 | 4 + 7 | 7 | seven | 2 | 4 + 8 | 8 | eight | 2 | 4 + 0 | | zero | 2 | 4 + | | null | 2 | 4 + | 0 | zero | 2 | 4 + 1 | 4 | one | 5 | -5 + 2 | 3 | two | 5 | -5 + 3 | 2 | three | 5 | -5 + 4 | 1 | four | 5 | -5 + 5 | 0 | five | 5 | -5 + 6 | 6 | six | 5 | -5 + 7 | 7 | seven | 5 | -5 + 8 | 8 | eight | 5 | -5 + 0 | | zero | 5 | -5 + | | null | 5 | -5 + | 0 | zero | 5 | -5 + 1 | 4 | one | 5 | -5 + 2 | 3 | two | 5 | -5 + 3 | 2 | three | 5 | -5 + 4 | 1 | four | 5 | -5 + 5 | 0 | five | 5 | -5 + 6 | 6 | six | 5 | -5 + 7 | 7 | seven | 5 | -5 + 8 | 8 | eight | 5 | -5 + 0 | | zero | 5 | -5 + | | null | 5 | -5 + | 0 | zero | 5 | -5 + 1 | 4 | one | 0 | + 2 | 3 | two | 0 | + 3 | 2 | three | 0 | + 4 | 1 | four | 0 | + 5 | 0 | five | 0 | + 6 | 6 | six | 0 | + 7 | 7 | seven | 0 | + 8 | 8 | eight | 0 | + 0 | | zero | 0 | + | | null | 0 | + | 0 | zero | 0 | + 1 | 4 | one | | 0 + 2 | 3 | two | | 0 + 3 | 2 | three | | 0 + 4 | 1 | four | | 0 + 5 | 0 | five | | 0 + 6 | 6 | six | | 0 + 7 | 7 | seven | | 0 + 8 | 8 | eight | | 0 + 0 | | zero | | 0 + | | null | | 0 + | 0 | zero | | 0 +(88 rows) + +--Testcase 38: +SELECT t1.a, t2.e + FROM J1_TBL t1 (a, b, c), J2_TBL t2 (d, e) + WHERE t1.a = t2.d; + a | e +---+---- + 0 | + 1 | -1 + 2 | 2 + 2 | 4 + 3 | -3 + 5 | -5 + 5 | -5 +(7 rows) + +-- +-- CROSS JOIN +-- Qualifications are not allowed on cross joins, +-- which degenerate into a standard unqualified inner join. +-- +--Testcase 39: +SELECT * + FROM J1_TBL CROSS JOIN J2_TBL; + i | j | t | i | k +---+---+-------+---+---- + 1 | 4 | one | 1 | -1 + 2 | 3 | two | 1 | -1 + 3 | 2 | three | 1 | -1 + 4 | 1 | four | 1 | -1 + 5 | 0 | five | 1 | -1 + 6 | 6 | six | 1 | -1 + 7 | 7 | seven | 1 | -1 + 8 | 8 | eight | 1 | -1 + 0 | | zero | 1 | -1 + | | null | 1 | -1 + | 0 | zero | 1 | -1 + 1 | 4 | one | 2 | 2 + 2 | 3 | two | 2 | 2 + 3 | 2 | three | 2 | 2 + 4 | 1 | four | 2 | 2 + 5 | 0 | five | 2 | 2 + 6 | 6 | six | 2 | 2 + 7 | 7 | seven | 2 | 2 + 8 | 8 | eight | 2 | 2 + 0 | | zero | 2 | 2 + | | null | 2 | 2 + | 0 | zero | 2 | 2 + 1 | 4 | one | 3 | -3 + 2 | 3 | two | 3 | -3 + 3 | 2 | three | 3 | -3 + 4 | 1 | four | 3 | -3 + 5 | 0 | five | 3 | -3 + 6 | 6 | six | 3 | -3 + 7 | 7 | seven | 3 | -3 + 8 | 8 | eight | 3 | -3 + 0 | | zero | 3 | -3 + | | null | 3 | -3 + | 0 | zero | 3 | -3 + 1 | 4 | one | 2 | 4 + 2 | 3 | two | 2 | 4 + 3 | 2 | three | 2 | 4 + 4 | 1 | four | 2 | 4 + 5 | 0 | five | 2 | 4 + 6 | 6 | six | 2 | 4 + 7 | 7 | seven | 2 | 4 + 8 | 8 | eight | 2 | 4 + 0 | | zero | 2 | 4 + | | null | 2 | 4 + | 0 | zero | 2 | 4 + 1 | 4 | one | 5 | -5 + 2 | 3 | two | 5 | -5 + 3 | 2 | three | 5 | -5 + 4 | 1 | four | 5 | -5 + 5 | 0 | five | 5 | -5 + 6 | 6 | six | 5 | -5 + 7 | 7 | seven | 5 | -5 + 8 | 8 | eight | 5 | -5 + 0 | | zero | 5 | -5 + | | null | 5 | -5 + | 0 | zero | 5 | -5 + 1 | 4 | one | 5 | -5 + 2 | 3 | two | 5 | -5 + 3 | 2 | three | 5 | -5 + 4 | 1 | four | 5 | -5 + 5 | 0 | five | 5 | -5 + 6 | 6 | six | 5 | -5 + 7 | 7 | seven | 5 | -5 + 8 | 8 | eight | 5 | -5 + 0 | | zero | 5 | -5 + | | null | 5 | -5 + | 0 | zero | 5 | -5 + 1 | 4 | one | 0 | + 2 | 3 | two | 0 | + 3 | 2 | three | 0 | + 4 | 1 | four | 0 | + 5 | 0 | five | 0 | + 6 | 6 | six | 0 | + 7 | 7 | seven | 0 | + 8 | 8 | eight | 0 | + 0 | | zero | 0 | + | | null | 0 | + | 0 | zero | 0 | + 1 | 4 | one | | 0 + 2 | 3 | two | | 0 + 3 | 2 | three | | 0 + 4 | 1 | four | | 0 + 5 | 0 | five | | 0 + 6 | 6 | six | | 0 + 7 | 7 | seven | | 0 + 8 | 8 | eight | | 0 + 0 | | zero | | 0 + | | null | | 0 + | 0 | zero | | 0 +(88 rows) + +-- ambiguous column +--Testcase 40: +SELECT i, k, t + FROM J1_TBL CROSS JOIN J2_TBL; +ERROR: column reference "i" is ambiguous +LINE 1: SELECT i, k, t + ^ +-- resolve previous ambiguity by specifying the table name +--Testcase 41: +SELECT t1.i, k, t + FROM J1_TBL t1 CROSS JOIN J2_TBL t2; + i | k | t +---+----+------- + 1 | -1 | one + 2 | -1 | two + 3 | -1 | three + 4 | -1 | four + 5 | -1 | five + 6 | -1 | six + 7 | -1 | seven + 8 | -1 | eight + 0 | -1 | zero + | -1 | null + | -1 | zero + 1 | 2 | one + 2 | 2 | two + 3 | 2 | three + 4 | 2 | four + 5 | 2 | five + 6 | 2 | six + 7 | 2 | seven + 8 | 2 | eight + 0 | 2 | zero + | 2 | null + | 2 | zero + 1 | -3 | one + 2 | -3 | two + 3 | -3 | three + 4 | -3 | four + 5 | -3 | five + 6 | -3 | six + 7 | -3 | seven + 8 | -3 | eight + 0 | -3 | zero + | -3 | null + | -3 | zero + 1 | 4 | one + 2 | 4 | two + 3 | 4 | three + 4 | 4 | four + 5 | 4 | five + 6 | 4 | six + 7 | 4 | seven + 8 | 4 | eight + 0 | 4 | zero + | 4 | null + | 4 | zero + 1 | -5 | one + 2 | -5 | two + 3 | -5 | three + 4 | -5 | four + 5 | -5 | five + 6 | -5 | six + 7 | -5 | seven + 8 | -5 | eight + 0 | -5 | zero + | -5 | null + | -5 | zero + 1 | -5 | one + 2 | -5 | two + 3 | -5 | three + 4 | -5 | four + 5 | -5 | five + 6 | -5 | six + 7 | -5 | seven + 8 | -5 | eight + 0 | -5 | zero + | -5 | null + | -5 | zero + 1 | 0 | one + 2 | 0 | two + 3 | 0 | three + 4 | 0 | four + 5 | 0 | five + 6 | 0 | six + 7 | 0 | seven + 8 | 0 | eight + 0 | 0 | zero + | 0 | null + | 0 | zero +(77 rows) + +--Testcase 42: +SELECT ii, tt, kk + FROM (J1_TBL CROSS JOIN J2_TBL) + AS tx (ii, jj, tt, ii2, kk); + ii | tt | kk +----+-------+---- + 1 | one | -1 + 2 | two | -1 + 3 | three | -1 + 4 | four | -1 + 5 | five | -1 + 6 | six | -1 + 7 | seven | -1 + 8 | eight | -1 + 0 | zero | -1 + | null | -1 + | zero | -1 + 1 | one | 2 + 2 | two | 2 + 3 | three | 2 + 4 | four | 2 + 5 | five | 2 + 6 | six | 2 + 7 | seven | 2 + 8 | eight | 2 + 0 | zero | 2 + | null | 2 + | zero | 2 + 1 | one | -3 + 2 | two | -3 + 3 | three | -3 + 4 | four | -3 + 5 | five | -3 + 6 | six | -3 + 7 | seven | -3 + 8 | eight | -3 + 0 | zero | -3 + | null | -3 + | zero | -3 + 1 | one | 4 + 2 | two | 4 + 3 | three | 4 + 4 | four | 4 + 5 | five | 4 + 6 | six | 4 + 7 | seven | 4 + 8 | eight | 4 + 0 | zero | 4 + | null | 4 + | zero | 4 + 1 | one | -5 + 2 | two | -5 + 3 | three | -5 + 4 | four | -5 + 5 | five | -5 + 6 | six | -5 + 7 | seven | -5 + 8 | eight | -5 + 0 | zero | -5 + | null | -5 + | zero | -5 + 1 | one | -5 + 2 | two | -5 + 3 | three | -5 + 4 | four | -5 + 5 | five | -5 + 6 | six | -5 + 7 | seven | -5 + 8 | eight | -5 + 0 | zero | -5 + | null | -5 + | zero | -5 + 1 | one | 0 + 2 | two | 0 + 3 | three | 0 + 4 | four | 0 + 5 | five | 0 + 6 | six | 0 + 7 | seven | 0 + 8 | eight | 0 + 0 | zero | 0 + | null | 0 + | zero | 0 +(77 rows) + +--Testcase 43: +SELECT tx.ii, tx.jj, tx.kk + FROM (J1_TBL t1 (a, b, c) CROSS JOIN J2_TBL t2 (d, e)) + AS tx (ii, jj, tt, ii2, kk); + ii | jj | kk +----+----+---- + 1 | 4 | -1 + 2 | 3 | -1 + 3 | 2 | -1 + 4 | 1 | -1 + 5 | 0 | -1 + 6 | 6 | -1 + 7 | 7 | -1 + 8 | 8 | -1 + 0 | | -1 + | 0 | -1 + 1 | 4 | 2 + 2 | 3 | 2 + 3 | 2 | 2 + 4 | 1 | 2 + 5 | 0 | 2 + 6 | 6 | 2 + 7 | 7 | 2 + 8 | 8 | 2 + 0 | | 2 + | 0 | 2 + 1 | 4 | -3 + 2 | 3 | -3 + 3 | 2 | -3 + 4 | 1 | -3 + 5 | 0 | -3 + 6 | 6 | -3 + 7 | 7 | -3 + 8 | 8 | -3 + 0 | | -3 + | 0 | -3 + 1 | 4 | 4 + 2 | 3 | 4 + 3 | 2 | 4 + 4 | 1 | 4 + 5 | 0 | 4 + 6 | 6 | 4 + 7 | 7 | 4 + 8 | 8 | 4 + 0 | | 4 + | 0 | 4 + 1 | 4 | -5 + 2 | 3 | -5 + 3 | 2 | -5 + 4 | 1 | -5 + 5 | 0 | -5 + 6 | 6 | -5 + 7 | 7 | -5 + 8 | 8 | -5 + 0 | | -5 + | 0 | -5 + 1 | 4 | -5 + 2 | 3 | -5 + 3 | 2 | -5 + 4 | 1 | -5 + 5 | 0 | -5 + 6 | 6 | -5 + 7 | 7 | -5 + 8 | 8 | -5 + 0 | | -5 + | 0 | -5 + 1 | 4 | 0 + 2 | 3 | 0 + 3 | 2 | 0 + 4 | 1 | 0 + 5 | 0 | 0 + 6 | 6 | 0 + 7 | 7 | 0 + 8 | 8 | 0 + 0 | | 0 + | 0 | 0 +(70 rows) + +--Testcase 44: +SELECT * + FROM J1_TBL CROSS JOIN J2_TBL a CROSS JOIN J2_TBL b; + i | j | t | i | k | i | k +---+---+-------+---+----+---+---- + 1 | 4 | one | 1 | -1 | 1 | -1 + 1 | 4 | one | 1 | -1 | 2 | 2 + 1 | 4 | one | 1 | -1 | 3 | -3 + 1 | 4 | one | 1 | -1 | 2 | 4 + 1 | 4 | one | 1 | -1 | 5 | -5 + 1 | 4 | one | 1 | -1 | 5 | -5 + 1 | 4 | one | 1 | -1 | 0 | + 1 | 4 | one | 1 | -1 | | 0 + 2 | 3 | two | 1 | -1 | 1 | -1 + 2 | 3 | two | 1 | -1 | 2 | 2 + 2 | 3 | two | 1 | -1 | 3 | -3 + 2 | 3 | two | 1 | -1 | 2 | 4 + 2 | 3 | two | 1 | -1 | 5 | -5 + 2 | 3 | two | 1 | -1 | 5 | -5 + 2 | 3 | two | 1 | -1 | 0 | + 2 | 3 | two | 1 | -1 | | 0 + 3 | 2 | three | 1 | -1 | 1 | -1 + 3 | 2 | three | 1 | -1 | 2 | 2 + 3 | 2 | three | 1 | -1 | 3 | -3 + 3 | 2 | three | 1 | -1 | 2 | 4 + 3 | 2 | three | 1 | -1 | 5 | -5 + 3 | 2 | three | 1 | -1 | 5 | -5 + 3 | 2 | three | 1 | -1 | 0 | + 3 | 2 | three | 1 | -1 | | 0 + 4 | 1 | four | 1 | -1 | 1 | -1 + 4 | 1 | four | 1 | -1 | 2 | 2 + 4 | 1 | four | 1 | -1 | 3 | -3 + 4 | 1 | four | 1 | -1 | 2 | 4 + 4 | 1 | four | 1 | -1 | 5 | -5 + 4 | 1 | four | 1 | -1 | 5 | -5 + 4 | 1 | four | 1 | -1 | 0 | + 4 | 1 | four | 1 | -1 | | 0 + 5 | 0 | five | 1 | -1 | 1 | -1 + 5 | 0 | five | 1 | -1 | 2 | 2 + 5 | 0 | five | 1 | -1 | 3 | -3 + 5 | 0 | five | 1 | -1 | 2 | 4 + 5 | 0 | five | 1 | -1 | 5 | -5 + 5 | 0 | five | 1 | -1 | 5 | -5 + 5 | 0 | five | 1 | -1 | 0 | + 5 | 0 | five | 1 | -1 | | 0 + 6 | 6 | six | 1 | -1 | 1 | -1 + 6 | 6 | six | 1 | -1 | 2 | 2 + 6 | 6 | six | 1 | -1 | 3 | -3 + 6 | 6 | six | 1 | -1 | 2 | 4 + 6 | 6 | six | 1 | -1 | 5 | -5 + 6 | 6 | six | 1 | -1 | 5 | -5 + 6 | 6 | six | 1 | -1 | 0 | + 6 | 6 | six | 1 | -1 | | 0 + 7 | 7 | seven | 1 | -1 | 1 | -1 + 7 | 7 | seven | 1 | -1 | 2 | 2 + 7 | 7 | seven | 1 | -1 | 3 | -3 + 7 | 7 | seven | 1 | -1 | 2 | 4 + 7 | 7 | seven | 1 | -1 | 5 | -5 + 7 | 7 | seven | 1 | -1 | 5 | -5 + 7 | 7 | seven | 1 | -1 | 0 | + 7 | 7 | seven | 1 | -1 | | 0 + 8 | 8 | eight | 1 | -1 | 1 | -1 + 8 | 8 | eight | 1 | -1 | 2 | 2 + 8 | 8 | eight | 1 | -1 | 3 | -3 + 8 | 8 | eight | 1 | -1 | 2 | 4 + 8 | 8 | eight | 1 | -1 | 5 | -5 + 8 | 8 | eight | 1 | -1 | 5 | -5 + 8 | 8 | eight | 1 | -1 | 0 | + 8 | 8 | eight | 1 | -1 | | 0 + 0 | | zero | 1 | -1 | 1 | -1 + 0 | | zero | 1 | -1 | 2 | 2 + 0 | | zero | 1 | -1 | 3 | -3 + 0 | | zero | 1 | -1 | 2 | 4 + 0 | | zero | 1 | -1 | 5 | -5 + 0 | | zero | 1 | -1 | 5 | -5 + 0 | | zero | 1 | -1 | 0 | + 0 | | zero | 1 | -1 | | 0 + | | null | 1 | -1 | 1 | -1 + | | null | 1 | -1 | 2 | 2 + | | null | 1 | -1 | 3 | -3 + | | null | 1 | -1 | 2 | 4 + | | null | 1 | -1 | 5 | -5 + | | null | 1 | -1 | 5 | -5 + | | null | 1 | -1 | 0 | + | | null | 1 | -1 | | 0 + | 0 | zero | 1 | -1 | 1 | -1 + | 0 | zero | 1 | -1 | 2 | 2 + | 0 | zero | 1 | -1 | 3 | -3 + | 0 | zero | 1 | -1 | 2 | 4 + | 0 | zero | 1 | -1 | 5 | -5 + | 0 | zero | 1 | -1 | 5 | -5 + | 0 | zero | 1 | -1 | 0 | + | 0 | zero | 1 | -1 | | 0 + 1 | 4 | one | 2 | 2 | 1 | -1 + 1 | 4 | one | 2 | 2 | 2 | 2 + 1 | 4 | one | 2 | 2 | 3 | -3 + 1 | 4 | one | 2 | 2 | 2 | 4 + 1 | 4 | one | 2 | 2 | 5 | -5 + 1 | 4 | one | 2 | 2 | 5 | -5 + 1 | 4 | one | 2 | 2 | 0 | + 1 | 4 | one | 2 | 2 | | 0 + 2 | 3 | two | 2 | 2 | 1 | -1 + 2 | 3 | two | 2 | 2 | 2 | 2 + 2 | 3 | two | 2 | 2 | 3 | -3 + 2 | 3 | two | 2 | 2 | 2 | 4 + 2 | 3 | two | 2 | 2 | 5 | -5 + 2 | 3 | two | 2 | 2 | 5 | -5 + 2 | 3 | two | 2 | 2 | 0 | + 2 | 3 | two | 2 | 2 | | 0 + 3 | 2 | three | 2 | 2 | 1 | -1 + 3 | 2 | three | 2 | 2 | 2 | 2 + 3 | 2 | three | 2 | 2 | 3 | -3 + 3 | 2 | three | 2 | 2 | 2 | 4 + 3 | 2 | three | 2 | 2 | 5 | -5 + 3 | 2 | three | 2 | 2 | 5 | -5 + 3 | 2 | three | 2 | 2 | 0 | + 3 | 2 | three | 2 | 2 | | 0 + 4 | 1 | four | 2 | 2 | 1 | -1 + 4 | 1 | four | 2 | 2 | 2 | 2 + 4 | 1 | four | 2 | 2 | 3 | -3 + 4 | 1 | four | 2 | 2 | 2 | 4 + 4 | 1 | four | 2 | 2 | 5 | -5 + 4 | 1 | four | 2 | 2 | 5 | -5 + 4 | 1 | four | 2 | 2 | 0 | + 4 | 1 | four | 2 | 2 | | 0 + 5 | 0 | five | 2 | 2 | 1 | -1 + 5 | 0 | five | 2 | 2 | 2 | 2 + 5 | 0 | five | 2 | 2 | 3 | -3 + 5 | 0 | five | 2 | 2 | 2 | 4 + 5 | 0 | five | 2 | 2 | 5 | -5 + 5 | 0 | five | 2 | 2 | 5 | -5 + 5 | 0 | five | 2 | 2 | 0 | + 5 | 0 | five | 2 | 2 | | 0 + 6 | 6 | six | 2 | 2 | 1 | -1 + 6 | 6 | six | 2 | 2 | 2 | 2 + 6 | 6 | six | 2 | 2 | 3 | -3 + 6 | 6 | six | 2 | 2 | 2 | 4 + 6 | 6 | six | 2 | 2 | 5 | -5 + 6 | 6 | six | 2 | 2 | 5 | -5 + 6 | 6 | six | 2 | 2 | 0 | + 6 | 6 | six | 2 | 2 | | 0 + 7 | 7 | seven | 2 | 2 | 1 | -1 + 7 | 7 | seven | 2 | 2 | 2 | 2 + 7 | 7 | seven | 2 | 2 | 3 | -3 + 7 | 7 | seven | 2 | 2 | 2 | 4 + 7 | 7 | seven | 2 | 2 | 5 | -5 + 7 | 7 | seven | 2 | 2 | 5 | -5 + 7 | 7 | seven | 2 | 2 | 0 | + 7 | 7 | seven | 2 | 2 | | 0 + 8 | 8 | eight | 2 | 2 | 1 | -1 + 8 | 8 | eight | 2 | 2 | 2 | 2 + 8 | 8 | eight | 2 | 2 | 3 | -3 + 8 | 8 | eight | 2 | 2 | 2 | 4 + 8 | 8 | eight | 2 | 2 | 5 | -5 + 8 | 8 | eight | 2 | 2 | 5 | -5 + 8 | 8 | eight | 2 | 2 | 0 | + 8 | 8 | eight | 2 | 2 | | 0 + 0 | | zero | 2 | 2 | 1 | -1 + 0 | | zero | 2 | 2 | 2 | 2 + 0 | | zero | 2 | 2 | 3 | -3 + 0 | | zero | 2 | 2 | 2 | 4 + 0 | | zero | 2 | 2 | 5 | -5 + 0 | | zero | 2 | 2 | 5 | -5 + 0 | | zero | 2 | 2 | 0 | + 0 | | zero | 2 | 2 | | 0 + | | null | 2 | 2 | 1 | -1 + | | null | 2 | 2 | 2 | 2 + | | null | 2 | 2 | 3 | -3 + | | null | 2 | 2 | 2 | 4 + | | null | 2 | 2 | 5 | -5 + | | null | 2 | 2 | 5 | -5 + | | null | 2 | 2 | 0 | + | | null | 2 | 2 | | 0 + | 0 | zero | 2 | 2 | 1 | -1 + | 0 | zero | 2 | 2 | 2 | 2 + | 0 | zero | 2 | 2 | 3 | -3 + | 0 | zero | 2 | 2 | 2 | 4 + | 0 | zero | 2 | 2 | 5 | -5 + | 0 | zero | 2 | 2 | 5 | -5 + | 0 | zero | 2 | 2 | 0 | + | 0 | zero | 2 | 2 | | 0 + 1 | 4 | one | 3 | -3 | 1 | -1 + 1 | 4 | one | 3 | -3 | 2 | 2 + 1 | 4 | one | 3 | -3 | 3 | -3 + 1 | 4 | one | 3 | -3 | 2 | 4 + 1 | 4 | one | 3 | -3 | 5 | -5 + 1 | 4 | one | 3 | -3 | 5 | -5 + 1 | 4 | one | 3 | -3 | 0 | + 1 | 4 | one | 3 | -3 | | 0 + 2 | 3 | two | 3 | -3 | 1 | -1 + 2 | 3 | two | 3 | -3 | 2 | 2 + 2 | 3 | two | 3 | -3 | 3 | -3 + 2 | 3 | two | 3 | -3 | 2 | 4 + 2 | 3 | two | 3 | -3 | 5 | -5 + 2 | 3 | two | 3 | -3 | 5 | -5 + 2 | 3 | two | 3 | -3 | 0 | + 2 | 3 | two | 3 | -3 | | 0 + 3 | 2 | three | 3 | -3 | 1 | -1 + 3 | 2 | three | 3 | -3 | 2 | 2 + 3 | 2 | three | 3 | -3 | 3 | -3 + 3 | 2 | three | 3 | -3 | 2 | 4 + 3 | 2 | three | 3 | -3 | 5 | -5 + 3 | 2 | three | 3 | -3 | 5 | -5 + 3 | 2 | three | 3 | -3 | 0 | + 3 | 2 | three | 3 | -3 | | 0 + 4 | 1 | four | 3 | -3 | 1 | -1 + 4 | 1 | four | 3 | -3 | 2 | 2 + 4 | 1 | four | 3 | -3 | 3 | -3 + 4 | 1 | four | 3 | -3 | 2 | 4 + 4 | 1 | four | 3 | -3 | 5 | -5 + 4 | 1 | four | 3 | -3 | 5 | -5 + 4 | 1 | four | 3 | -3 | 0 | + 4 | 1 | four | 3 | -3 | | 0 + 5 | 0 | five | 3 | -3 | 1 | -1 + 5 | 0 | five | 3 | -3 | 2 | 2 + 5 | 0 | five | 3 | -3 | 3 | -3 + 5 | 0 | five | 3 | -3 | 2 | 4 + 5 | 0 | five | 3 | -3 | 5 | -5 + 5 | 0 | five | 3 | -3 | 5 | -5 + 5 | 0 | five | 3 | -3 | 0 | + 5 | 0 | five | 3 | -3 | | 0 + 6 | 6 | six | 3 | -3 | 1 | -1 + 6 | 6 | six | 3 | -3 | 2 | 2 + 6 | 6 | six | 3 | -3 | 3 | -3 + 6 | 6 | six | 3 | -3 | 2 | 4 + 6 | 6 | six | 3 | -3 | 5 | -5 + 6 | 6 | six | 3 | -3 | 5 | -5 + 6 | 6 | six | 3 | -3 | 0 | + 6 | 6 | six | 3 | -3 | | 0 + 7 | 7 | seven | 3 | -3 | 1 | -1 + 7 | 7 | seven | 3 | -3 | 2 | 2 + 7 | 7 | seven | 3 | -3 | 3 | -3 + 7 | 7 | seven | 3 | -3 | 2 | 4 + 7 | 7 | seven | 3 | -3 | 5 | -5 + 7 | 7 | seven | 3 | -3 | 5 | -5 + 7 | 7 | seven | 3 | -3 | 0 | + 7 | 7 | seven | 3 | -3 | | 0 + 8 | 8 | eight | 3 | -3 | 1 | -1 + 8 | 8 | eight | 3 | -3 | 2 | 2 + 8 | 8 | eight | 3 | -3 | 3 | -3 + 8 | 8 | eight | 3 | -3 | 2 | 4 + 8 | 8 | eight | 3 | -3 | 5 | -5 + 8 | 8 | eight | 3 | -3 | 5 | -5 + 8 | 8 | eight | 3 | -3 | 0 | + 8 | 8 | eight | 3 | -3 | | 0 + 0 | | zero | 3 | -3 | 1 | -1 + 0 | | zero | 3 | -3 | 2 | 2 + 0 | | zero | 3 | -3 | 3 | -3 + 0 | | zero | 3 | -3 | 2 | 4 + 0 | | zero | 3 | -3 | 5 | -5 + 0 | | zero | 3 | -3 | 5 | -5 + 0 | | zero | 3 | -3 | 0 | + 0 | | zero | 3 | -3 | | 0 + | | null | 3 | -3 | 1 | -1 + | | null | 3 | -3 | 2 | 2 + | | null | 3 | -3 | 3 | -3 + | | null | 3 | -3 | 2 | 4 + | | null | 3 | -3 | 5 | -5 + | | null | 3 | -3 | 5 | -5 + | | null | 3 | -3 | 0 | + | | null | 3 | -3 | | 0 + | 0 | zero | 3 | -3 | 1 | -1 + | 0 | zero | 3 | -3 | 2 | 2 + | 0 | zero | 3 | -3 | 3 | -3 + | 0 | zero | 3 | -3 | 2 | 4 + | 0 | zero | 3 | -3 | 5 | -5 + | 0 | zero | 3 | -3 | 5 | -5 + | 0 | zero | 3 | -3 | 0 | + | 0 | zero | 3 | -3 | | 0 + 1 | 4 | one | 2 | 4 | 1 | -1 + 1 | 4 | one | 2 | 4 | 2 | 2 + 1 | 4 | one | 2 | 4 | 3 | -3 + 1 | 4 | one | 2 | 4 | 2 | 4 + 1 | 4 | one | 2 | 4 | 5 | -5 + 1 | 4 | one | 2 | 4 | 5 | -5 + 1 | 4 | one | 2 | 4 | 0 | + 1 | 4 | one | 2 | 4 | | 0 + 2 | 3 | two | 2 | 4 | 1 | -1 + 2 | 3 | two | 2 | 4 | 2 | 2 + 2 | 3 | two | 2 | 4 | 3 | -3 + 2 | 3 | two | 2 | 4 | 2 | 4 + 2 | 3 | two | 2 | 4 | 5 | -5 + 2 | 3 | two | 2 | 4 | 5 | -5 + 2 | 3 | two | 2 | 4 | 0 | + 2 | 3 | two | 2 | 4 | | 0 + 3 | 2 | three | 2 | 4 | 1 | -1 + 3 | 2 | three | 2 | 4 | 2 | 2 + 3 | 2 | three | 2 | 4 | 3 | -3 + 3 | 2 | three | 2 | 4 | 2 | 4 + 3 | 2 | three | 2 | 4 | 5 | -5 + 3 | 2 | three | 2 | 4 | 5 | -5 + 3 | 2 | three | 2 | 4 | 0 | + 3 | 2 | three | 2 | 4 | | 0 + 4 | 1 | four | 2 | 4 | 1 | -1 + 4 | 1 | four | 2 | 4 | 2 | 2 + 4 | 1 | four | 2 | 4 | 3 | -3 + 4 | 1 | four | 2 | 4 | 2 | 4 + 4 | 1 | four | 2 | 4 | 5 | -5 + 4 | 1 | four | 2 | 4 | 5 | -5 + 4 | 1 | four | 2 | 4 | 0 | + 4 | 1 | four | 2 | 4 | | 0 + 5 | 0 | five | 2 | 4 | 1 | -1 + 5 | 0 | five | 2 | 4 | 2 | 2 + 5 | 0 | five | 2 | 4 | 3 | -3 + 5 | 0 | five | 2 | 4 | 2 | 4 + 5 | 0 | five | 2 | 4 | 5 | -5 + 5 | 0 | five | 2 | 4 | 5 | -5 + 5 | 0 | five | 2 | 4 | 0 | + 5 | 0 | five | 2 | 4 | | 0 + 6 | 6 | six | 2 | 4 | 1 | -1 + 6 | 6 | six | 2 | 4 | 2 | 2 + 6 | 6 | six | 2 | 4 | 3 | -3 + 6 | 6 | six | 2 | 4 | 2 | 4 + 6 | 6 | six | 2 | 4 | 5 | -5 + 6 | 6 | six | 2 | 4 | 5 | -5 + 6 | 6 | six | 2 | 4 | 0 | + 6 | 6 | six | 2 | 4 | | 0 + 7 | 7 | seven | 2 | 4 | 1 | -1 + 7 | 7 | seven | 2 | 4 | 2 | 2 + 7 | 7 | seven | 2 | 4 | 3 | -3 + 7 | 7 | seven | 2 | 4 | 2 | 4 + 7 | 7 | seven | 2 | 4 | 5 | -5 + 7 | 7 | seven | 2 | 4 | 5 | -5 + 7 | 7 | seven | 2 | 4 | 0 | + 7 | 7 | seven | 2 | 4 | | 0 + 8 | 8 | eight | 2 | 4 | 1 | -1 + 8 | 8 | eight | 2 | 4 | 2 | 2 + 8 | 8 | eight | 2 | 4 | 3 | -3 + 8 | 8 | eight | 2 | 4 | 2 | 4 + 8 | 8 | eight | 2 | 4 | 5 | -5 + 8 | 8 | eight | 2 | 4 | 5 | -5 + 8 | 8 | eight | 2 | 4 | 0 | + 8 | 8 | eight | 2 | 4 | | 0 + 0 | | zero | 2 | 4 | 1 | -1 + 0 | | zero | 2 | 4 | 2 | 2 + 0 | | zero | 2 | 4 | 3 | -3 + 0 | | zero | 2 | 4 | 2 | 4 + 0 | | zero | 2 | 4 | 5 | -5 + 0 | | zero | 2 | 4 | 5 | -5 + 0 | | zero | 2 | 4 | 0 | + 0 | | zero | 2 | 4 | | 0 + | | null | 2 | 4 | 1 | -1 + | | null | 2 | 4 | 2 | 2 + | | null | 2 | 4 | 3 | -3 + | | null | 2 | 4 | 2 | 4 + | | null | 2 | 4 | 5 | -5 + | | null | 2 | 4 | 5 | -5 + | | null | 2 | 4 | 0 | + | | null | 2 | 4 | | 0 + | 0 | zero | 2 | 4 | 1 | -1 + | 0 | zero | 2 | 4 | 2 | 2 + | 0 | zero | 2 | 4 | 3 | -3 + | 0 | zero | 2 | 4 | 2 | 4 + | 0 | zero | 2 | 4 | 5 | -5 + | 0 | zero | 2 | 4 | 5 | -5 + | 0 | zero | 2 | 4 | 0 | + | 0 | zero | 2 | 4 | | 0 + 1 | 4 | one | 5 | -5 | 1 | -1 + 1 | 4 | one | 5 | -5 | 2 | 2 + 1 | 4 | one | 5 | -5 | 3 | -3 + 1 | 4 | one | 5 | -5 | 2 | 4 + 1 | 4 | one | 5 | -5 | 5 | -5 + 1 | 4 | one | 5 | -5 | 5 | -5 + 1 | 4 | one | 5 | -5 | 0 | + 1 | 4 | one | 5 | -5 | | 0 + 2 | 3 | two | 5 | -5 | 1 | -1 + 2 | 3 | two | 5 | -5 | 2 | 2 + 2 | 3 | two | 5 | -5 | 3 | -3 + 2 | 3 | two | 5 | -5 | 2 | 4 + 2 | 3 | two | 5 | -5 | 5 | -5 + 2 | 3 | two | 5 | -5 | 5 | -5 + 2 | 3 | two | 5 | -5 | 0 | + 2 | 3 | two | 5 | -5 | | 0 + 3 | 2 | three | 5 | -5 | 1 | -1 + 3 | 2 | three | 5 | -5 | 2 | 2 + 3 | 2 | three | 5 | -5 | 3 | -3 + 3 | 2 | three | 5 | -5 | 2 | 4 + 3 | 2 | three | 5 | -5 | 5 | -5 + 3 | 2 | three | 5 | -5 | 5 | -5 + 3 | 2 | three | 5 | -5 | 0 | + 3 | 2 | three | 5 | -5 | | 0 + 4 | 1 | four | 5 | -5 | 1 | -1 + 4 | 1 | four | 5 | -5 | 2 | 2 + 4 | 1 | four | 5 | -5 | 3 | -3 + 4 | 1 | four | 5 | -5 | 2 | 4 + 4 | 1 | four | 5 | -5 | 5 | -5 + 4 | 1 | four | 5 | -5 | 5 | -5 + 4 | 1 | four | 5 | -5 | 0 | + 4 | 1 | four | 5 | -5 | | 0 + 5 | 0 | five | 5 | -5 | 1 | -1 + 5 | 0 | five | 5 | -5 | 2 | 2 + 5 | 0 | five | 5 | -5 | 3 | -3 + 5 | 0 | five | 5 | -5 | 2 | 4 + 5 | 0 | five | 5 | -5 | 5 | -5 + 5 | 0 | five | 5 | -5 | 5 | -5 + 5 | 0 | five | 5 | -5 | 0 | + 5 | 0 | five | 5 | -5 | | 0 + 6 | 6 | six | 5 | -5 | 1 | -1 + 6 | 6 | six | 5 | -5 | 2 | 2 + 6 | 6 | six | 5 | -5 | 3 | -3 + 6 | 6 | six | 5 | -5 | 2 | 4 + 6 | 6 | six | 5 | -5 | 5 | -5 + 6 | 6 | six | 5 | -5 | 5 | -5 + 6 | 6 | six | 5 | -5 | 0 | + 6 | 6 | six | 5 | -5 | | 0 + 7 | 7 | seven | 5 | -5 | 1 | -1 + 7 | 7 | seven | 5 | -5 | 2 | 2 + 7 | 7 | seven | 5 | -5 | 3 | -3 + 7 | 7 | seven | 5 | -5 | 2 | 4 + 7 | 7 | seven | 5 | -5 | 5 | -5 + 7 | 7 | seven | 5 | -5 | 5 | -5 + 7 | 7 | seven | 5 | -5 | 0 | + 7 | 7 | seven | 5 | -5 | | 0 + 8 | 8 | eight | 5 | -5 | 1 | -1 + 8 | 8 | eight | 5 | -5 | 2 | 2 + 8 | 8 | eight | 5 | -5 | 3 | -3 + 8 | 8 | eight | 5 | -5 | 2 | 4 + 8 | 8 | eight | 5 | -5 | 5 | -5 + 8 | 8 | eight | 5 | -5 | 5 | -5 + 8 | 8 | eight | 5 | -5 | 0 | + 8 | 8 | eight | 5 | -5 | | 0 + 0 | | zero | 5 | -5 | 1 | -1 + 0 | | zero | 5 | -5 | 2 | 2 + 0 | | zero | 5 | -5 | 3 | -3 + 0 | | zero | 5 | -5 | 2 | 4 + 0 | | zero | 5 | -5 | 5 | -5 + 0 | | zero | 5 | -5 | 5 | -5 + 0 | | zero | 5 | -5 | 0 | + 0 | | zero | 5 | -5 | | 0 + | | null | 5 | -5 | 1 | -1 + | | null | 5 | -5 | 2 | 2 + | | null | 5 | -5 | 3 | -3 + | | null | 5 | -5 | 2 | 4 + | | null | 5 | -5 | 5 | -5 + | | null | 5 | -5 | 5 | -5 + | | null | 5 | -5 | 0 | + | | null | 5 | -5 | | 0 + | 0 | zero | 5 | -5 | 1 | -1 + | 0 | zero | 5 | -5 | 2 | 2 + | 0 | zero | 5 | -5 | 3 | -3 + | 0 | zero | 5 | -5 | 2 | 4 + | 0 | zero | 5 | -5 | 5 | -5 + | 0 | zero | 5 | -5 | 5 | -5 + | 0 | zero | 5 | -5 | 0 | + | 0 | zero | 5 | -5 | | 0 + 1 | 4 | one | 5 | -5 | 1 | -1 + 1 | 4 | one | 5 | -5 | 2 | 2 + 1 | 4 | one | 5 | -5 | 3 | -3 + 1 | 4 | one | 5 | -5 | 2 | 4 + 1 | 4 | one | 5 | -5 | 5 | -5 + 1 | 4 | one | 5 | -5 | 5 | -5 + 1 | 4 | one | 5 | -5 | 0 | + 1 | 4 | one | 5 | -5 | | 0 + 2 | 3 | two | 5 | -5 | 1 | -1 + 2 | 3 | two | 5 | -5 | 2 | 2 + 2 | 3 | two | 5 | -5 | 3 | -3 + 2 | 3 | two | 5 | -5 | 2 | 4 + 2 | 3 | two | 5 | -5 | 5 | -5 + 2 | 3 | two | 5 | -5 | 5 | -5 + 2 | 3 | two | 5 | -5 | 0 | + 2 | 3 | two | 5 | -5 | | 0 + 3 | 2 | three | 5 | -5 | 1 | -1 + 3 | 2 | three | 5 | -5 | 2 | 2 + 3 | 2 | three | 5 | -5 | 3 | -3 + 3 | 2 | three | 5 | -5 | 2 | 4 + 3 | 2 | three | 5 | -5 | 5 | -5 + 3 | 2 | three | 5 | -5 | 5 | -5 + 3 | 2 | three | 5 | -5 | 0 | + 3 | 2 | three | 5 | -5 | | 0 + 4 | 1 | four | 5 | -5 | 1 | -1 + 4 | 1 | four | 5 | -5 | 2 | 2 + 4 | 1 | four | 5 | -5 | 3 | -3 + 4 | 1 | four | 5 | -5 | 2 | 4 + 4 | 1 | four | 5 | -5 | 5 | -5 + 4 | 1 | four | 5 | -5 | 5 | -5 + 4 | 1 | four | 5 | -5 | 0 | + 4 | 1 | four | 5 | -5 | | 0 + 5 | 0 | five | 5 | -5 | 1 | -1 + 5 | 0 | five | 5 | -5 | 2 | 2 + 5 | 0 | five | 5 | -5 | 3 | -3 + 5 | 0 | five | 5 | -5 | 2 | 4 + 5 | 0 | five | 5 | -5 | 5 | -5 + 5 | 0 | five | 5 | -5 | 5 | -5 + 5 | 0 | five | 5 | -5 | 0 | + 5 | 0 | five | 5 | -5 | | 0 + 6 | 6 | six | 5 | -5 | 1 | -1 + 6 | 6 | six | 5 | -5 | 2 | 2 + 6 | 6 | six | 5 | -5 | 3 | -3 + 6 | 6 | six | 5 | -5 | 2 | 4 + 6 | 6 | six | 5 | -5 | 5 | -5 + 6 | 6 | six | 5 | -5 | 5 | -5 + 6 | 6 | six | 5 | -5 | 0 | + 6 | 6 | six | 5 | -5 | | 0 + 7 | 7 | seven | 5 | -5 | 1 | -1 + 7 | 7 | seven | 5 | -5 | 2 | 2 + 7 | 7 | seven | 5 | -5 | 3 | -3 + 7 | 7 | seven | 5 | -5 | 2 | 4 + 7 | 7 | seven | 5 | -5 | 5 | -5 + 7 | 7 | seven | 5 | -5 | 5 | -5 + 7 | 7 | seven | 5 | -5 | 0 | + 7 | 7 | seven | 5 | -5 | | 0 + 8 | 8 | eight | 5 | -5 | 1 | -1 + 8 | 8 | eight | 5 | -5 | 2 | 2 + 8 | 8 | eight | 5 | -5 | 3 | -3 + 8 | 8 | eight | 5 | -5 | 2 | 4 + 8 | 8 | eight | 5 | -5 | 5 | -5 + 8 | 8 | eight | 5 | -5 | 5 | -5 + 8 | 8 | eight | 5 | -5 | 0 | + 8 | 8 | eight | 5 | -5 | | 0 + 0 | | zero | 5 | -5 | 1 | -1 + 0 | | zero | 5 | -5 | 2 | 2 + 0 | | zero | 5 | -5 | 3 | -3 + 0 | | zero | 5 | -5 | 2 | 4 + 0 | | zero | 5 | -5 | 5 | -5 + 0 | | zero | 5 | -5 | 5 | -5 + 0 | | zero | 5 | -5 | 0 | + 0 | | zero | 5 | -5 | | 0 + | | null | 5 | -5 | 1 | -1 + | | null | 5 | -5 | 2 | 2 + | | null | 5 | -5 | 3 | -3 + | | null | 5 | -5 | 2 | 4 + | | null | 5 | -5 | 5 | -5 + | | null | 5 | -5 | 5 | -5 + | | null | 5 | -5 | 0 | + | | null | 5 | -5 | | 0 + | 0 | zero | 5 | -5 | 1 | -1 + | 0 | zero | 5 | -5 | 2 | 2 + | 0 | zero | 5 | -5 | 3 | -3 + | 0 | zero | 5 | -5 | 2 | 4 + | 0 | zero | 5 | -5 | 5 | -5 + | 0 | zero | 5 | -5 | 5 | -5 + | 0 | zero | 5 | -5 | 0 | + | 0 | zero | 5 | -5 | | 0 + 1 | 4 | one | 0 | | 1 | -1 + 1 | 4 | one | 0 | | 2 | 2 + 1 | 4 | one | 0 | | 3 | -3 + 1 | 4 | one | 0 | | 2 | 4 + 1 | 4 | one | 0 | | 5 | -5 + 1 | 4 | one | 0 | | 5 | -5 + 1 | 4 | one | 0 | | 0 | + 1 | 4 | one | 0 | | | 0 + 2 | 3 | two | 0 | | 1 | -1 + 2 | 3 | two | 0 | | 2 | 2 + 2 | 3 | two | 0 | | 3 | -3 + 2 | 3 | two | 0 | | 2 | 4 + 2 | 3 | two | 0 | | 5 | -5 + 2 | 3 | two | 0 | | 5 | -5 + 2 | 3 | two | 0 | | 0 | + 2 | 3 | two | 0 | | | 0 + 3 | 2 | three | 0 | | 1 | -1 + 3 | 2 | three | 0 | | 2 | 2 + 3 | 2 | three | 0 | | 3 | -3 + 3 | 2 | three | 0 | | 2 | 4 + 3 | 2 | three | 0 | | 5 | -5 + 3 | 2 | three | 0 | | 5 | -5 + 3 | 2 | three | 0 | | 0 | + 3 | 2 | three | 0 | | | 0 + 4 | 1 | four | 0 | | 1 | -1 + 4 | 1 | four | 0 | | 2 | 2 + 4 | 1 | four | 0 | | 3 | -3 + 4 | 1 | four | 0 | | 2 | 4 + 4 | 1 | four | 0 | | 5 | -5 + 4 | 1 | four | 0 | | 5 | -5 + 4 | 1 | four | 0 | | 0 | + 4 | 1 | four | 0 | | | 0 + 5 | 0 | five | 0 | | 1 | -1 + 5 | 0 | five | 0 | | 2 | 2 + 5 | 0 | five | 0 | | 3 | -3 + 5 | 0 | five | 0 | | 2 | 4 + 5 | 0 | five | 0 | | 5 | -5 + 5 | 0 | five | 0 | | 5 | -5 + 5 | 0 | five | 0 | | 0 | + 5 | 0 | five | 0 | | | 0 + 6 | 6 | six | 0 | | 1 | -1 + 6 | 6 | six | 0 | | 2 | 2 + 6 | 6 | six | 0 | | 3 | -3 + 6 | 6 | six | 0 | | 2 | 4 + 6 | 6 | six | 0 | | 5 | -5 + 6 | 6 | six | 0 | | 5 | -5 + 6 | 6 | six | 0 | | 0 | + 6 | 6 | six | 0 | | | 0 + 7 | 7 | seven | 0 | | 1 | -1 + 7 | 7 | seven | 0 | | 2 | 2 + 7 | 7 | seven | 0 | | 3 | -3 + 7 | 7 | seven | 0 | | 2 | 4 + 7 | 7 | seven | 0 | | 5 | -5 + 7 | 7 | seven | 0 | | 5 | -5 + 7 | 7 | seven | 0 | | 0 | + 7 | 7 | seven | 0 | | | 0 + 8 | 8 | eight | 0 | | 1 | -1 + 8 | 8 | eight | 0 | | 2 | 2 + 8 | 8 | eight | 0 | | 3 | -3 + 8 | 8 | eight | 0 | | 2 | 4 + 8 | 8 | eight | 0 | | 5 | -5 + 8 | 8 | eight | 0 | | 5 | -5 + 8 | 8 | eight | 0 | | 0 | + 8 | 8 | eight | 0 | | | 0 + 0 | | zero | 0 | | 1 | -1 + 0 | | zero | 0 | | 2 | 2 + 0 | | zero | 0 | | 3 | -3 + 0 | | zero | 0 | | 2 | 4 + 0 | | zero | 0 | | 5 | -5 + 0 | | zero | 0 | | 5 | -5 + 0 | | zero | 0 | | 0 | + 0 | | zero | 0 | | | 0 + | | null | 0 | | 1 | -1 + | | null | 0 | | 2 | 2 + | | null | 0 | | 3 | -3 + | | null | 0 | | 2 | 4 + | | null | 0 | | 5 | -5 + | | null | 0 | | 5 | -5 + | | null | 0 | | 0 | + | | null | 0 | | | 0 + | 0 | zero | 0 | | 1 | -1 + | 0 | zero | 0 | | 2 | 2 + | 0 | zero | 0 | | 3 | -3 + | 0 | zero | 0 | | 2 | 4 + | 0 | zero | 0 | | 5 | -5 + | 0 | zero | 0 | | 5 | -5 + | 0 | zero | 0 | | 0 | + | 0 | zero | 0 | | | 0 + 1 | 4 | one | | 0 | 1 | -1 + 1 | 4 | one | | 0 | 2 | 2 + 1 | 4 | one | | 0 | 3 | -3 + 1 | 4 | one | | 0 | 2 | 4 + 1 | 4 | one | | 0 | 5 | -5 + 1 | 4 | one | | 0 | 5 | -5 + 1 | 4 | one | | 0 | 0 | + 1 | 4 | one | | 0 | | 0 + 2 | 3 | two | | 0 | 1 | -1 + 2 | 3 | two | | 0 | 2 | 2 + 2 | 3 | two | | 0 | 3 | -3 + 2 | 3 | two | | 0 | 2 | 4 + 2 | 3 | two | | 0 | 5 | -5 + 2 | 3 | two | | 0 | 5 | -5 + 2 | 3 | two | | 0 | 0 | + 2 | 3 | two | | 0 | | 0 + 3 | 2 | three | | 0 | 1 | -1 + 3 | 2 | three | | 0 | 2 | 2 + 3 | 2 | three | | 0 | 3 | -3 + 3 | 2 | three | | 0 | 2 | 4 + 3 | 2 | three | | 0 | 5 | -5 + 3 | 2 | three | | 0 | 5 | -5 + 3 | 2 | three | | 0 | 0 | + 3 | 2 | three | | 0 | | 0 + 4 | 1 | four | | 0 | 1 | -1 + 4 | 1 | four | | 0 | 2 | 2 + 4 | 1 | four | | 0 | 3 | -3 + 4 | 1 | four | | 0 | 2 | 4 + 4 | 1 | four | | 0 | 5 | -5 + 4 | 1 | four | | 0 | 5 | -5 + 4 | 1 | four | | 0 | 0 | + 4 | 1 | four | | 0 | | 0 + 5 | 0 | five | | 0 | 1 | -1 + 5 | 0 | five | | 0 | 2 | 2 + 5 | 0 | five | | 0 | 3 | -3 + 5 | 0 | five | | 0 | 2 | 4 + 5 | 0 | five | | 0 | 5 | -5 + 5 | 0 | five | | 0 | 5 | -5 + 5 | 0 | five | | 0 | 0 | + 5 | 0 | five | | 0 | | 0 + 6 | 6 | six | | 0 | 1 | -1 + 6 | 6 | six | | 0 | 2 | 2 + 6 | 6 | six | | 0 | 3 | -3 + 6 | 6 | six | | 0 | 2 | 4 + 6 | 6 | six | | 0 | 5 | -5 + 6 | 6 | six | | 0 | 5 | -5 + 6 | 6 | six | | 0 | 0 | + 6 | 6 | six | | 0 | | 0 + 7 | 7 | seven | | 0 | 1 | -1 + 7 | 7 | seven | | 0 | 2 | 2 + 7 | 7 | seven | | 0 | 3 | -3 + 7 | 7 | seven | | 0 | 2 | 4 + 7 | 7 | seven | | 0 | 5 | -5 + 7 | 7 | seven | | 0 | 5 | -5 + 7 | 7 | seven | | 0 | 0 | + 7 | 7 | seven | | 0 | | 0 + 8 | 8 | eight | | 0 | 1 | -1 + 8 | 8 | eight | | 0 | 2 | 2 + 8 | 8 | eight | | 0 | 3 | -3 + 8 | 8 | eight | | 0 | 2 | 4 + 8 | 8 | eight | | 0 | 5 | -5 + 8 | 8 | eight | | 0 | 5 | -5 + 8 | 8 | eight | | 0 | 0 | + 8 | 8 | eight | | 0 | | 0 + 0 | | zero | | 0 | 1 | -1 + 0 | | zero | | 0 | 2 | 2 + 0 | | zero | | 0 | 3 | -3 + 0 | | zero | | 0 | 2 | 4 + 0 | | zero | | 0 | 5 | -5 + 0 | | zero | | 0 | 5 | -5 + 0 | | zero | | 0 | 0 | + 0 | | zero | | 0 | | 0 + | | null | | 0 | 1 | -1 + | | null | | 0 | 2 | 2 + | | null | | 0 | 3 | -3 + | | null | | 0 | 2 | 4 + | | null | | 0 | 5 | -5 + | | null | | 0 | 5 | -5 + | | null | | 0 | 0 | + | | null | | 0 | | 0 + | 0 | zero | | 0 | 1 | -1 + | 0 | zero | | 0 | 2 | 2 + | 0 | zero | | 0 | 3 | -3 + | 0 | zero | | 0 | 2 | 4 + | 0 | zero | | 0 | 5 | -5 + | 0 | zero | | 0 | 5 | -5 + | 0 | zero | | 0 | 0 | + | 0 | zero | | 0 | | 0 +(704 rows) + +-- +-- +-- Inner joins (equi-joins) +-- +-- +-- +-- Inner joins (equi-joins) with USING clause +-- The USING syntax changes the shape of the resulting table +-- by including a column in the USING clause only once in the result. +-- +-- Inner equi-join on specified column +--Testcase 45: +SELECT * + FROM J1_TBL INNER JOIN J2_TBL USING (i); + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +-- Same as above, slightly different syntax +--Testcase 46: +SELECT * + FROM J1_TBL JOIN J2_TBL USING (i); + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +--Testcase 47: +SELECT * + FROM J1_TBL t1 (a, b, c) JOIN J2_TBL t2 (a, d) USING (a) + ORDER BY a, d; + a | b | c | d +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +--Testcase 48: +SELECT * + FROM J1_TBL t1 (a, b, c) JOIN J2_TBL t2 (a, b) USING (b) + ORDER BY b, t1.a; + b | a | c | a +---+---+-------+--- + 0 | 5 | five | + 0 | | zero | + 2 | 3 | three | 2 + 4 | 1 | one | 2 +(4 rows) + +-- test join using aliases +--Testcase 49: +SELECT * FROM J1_TBL JOIN J2_TBL USING (i) WHERE J1_TBL.t = 'one'; -- ok + i | j | t | k +---+---+-----+---- + 1 | 4 | one | -1 +(1 row) + +--Testcase 50: +SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; -- ok + i | j | t | k +---+---+-----+---- + 1 | 4 | one | -1 +(1 row) + +--Testcase 51: +SELECT * FROM (J1_TBL JOIN J2_TBL USING (i)) AS x WHERE J1_TBL.t = 'one'; -- error +ERROR: invalid reference to FROM-clause entry for table "j1_tbl" +LINE 1: ... * FROM (J1_TBL JOIN J2_TBL USING (i)) AS x WHERE J1_TBL.t =... + ^ +HINT: There is an entry for table "j1_tbl", but it cannot be referenced from this part of the query. +--Testcase 52: +SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE x.i = 1; -- ok + i | j | t | k +---+---+-----+---- + 1 | 4 | one | -1 +(1 row) + +--Testcase 53: +SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE x.t = 'one'; -- error +ERROR: column x.t does not exist +LINE 1: ...CT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE x.t = 'one... + ^ +--Testcase 54: +SELECT * FROM (J1_TBL JOIN J2_TBL USING (i) AS x) AS xx WHERE x.i = 1; -- error (XXX could use better hint) +ERROR: missing FROM-clause entry for table "x" +LINE 1: ...ROM (J1_TBL JOIN J2_TBL USING (i) AS x) AS xx WHERE x.i = 1; + ^ +--Testcase 55: +SELECT * FROM J1_TBL a1 JOIN J2_TBL a2 USING (i) AS a1; -- error +ERROR: table name "a1" specified more than once +--Testcase 56: +SELECT x.* FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; + i +--- + 1 +(1 row) + +--Testcase 57: +SELECT ROW(x.*) FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; + row +----- + (1) +(1 row) + +--Testcase 58: +SELECT row_to_json(x.*) FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; + row_to_json +------------- + {"i":1} +(1 row) + +-- +-- NATURAL JOIN +-- Inner equi-join on all columns with the same name +-- +--Testcase 59: +SELECT * + FROM J1_TBL NATURAL JOIN J2_TBL; + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +--Testcase 60: +SELECT * + FROM J1_TBL t1 (a, b, c) NATURAL JOIN J2_TBL t2 (a, d); + a | b | c | d +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +--Testcase 61: +SELECT * + FROM J1_TBL t1 (a, b, c) NATURAL JOIN J2_TBL t2 (d, a); + a | b | c | d +---+---+------+--- + 0 | | zero | + 2 | 3 | two | 2 + 4 | 1 | four | 2 +(3 rows) + +-- mismatch number of columns +-- currently, Postgres will fill in with underlying names +--Testcase 62: +SELECT * + FROM J1_TBL t1 (a, b) NATURAL JOIN J2_TBL t2 (a); + a | b | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +-- +-- Inner joins (equi-joins) +-- +--Testcase 63: +SELECT * + FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i = J2_TBL.i); + i | j | t | i | k +---+---+-------+---+---- + 0 | | zero | 0 | + 1 | 4 | one | 1 | -1 + 2 | 3 | two | 2 | 2 + 2 | 3 | two | 2 | 4 + 3 | 2 | three | 3 | -3 + 5 | 0 | five | 5 | -5 + 5 | 0 | five | 5 | -5 +(7 rows) + +--Testcase 64: +SELECT * + FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i = J2_TBL.k); + i | j | t | i | k +---+---+------+---+--- + 0 | | zero | | 0 + 2 | 3 | two | 2 | 2 + 4 | 1 | four | 2 | 4 +(3 rows) + +-- +-- Non-equi-joins +-- +--Testcase 65: +SELECT * + FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i <= J2_TBL.k); + i | j | t | i | k +---+---+-------+---+--- + 1 | 4 | one | 2 | 2 + 2 | 3 | two | 2 | 2 + 0 | | zero | 2 | 2 + 1 | 4 | one | 2 | 4 + 2 | 3 | two | 2 | 4 + 3 | 2 | three | 2 | 4 + 4 | 1 | four | 2 | 4 + 0 | | zero | 2 | 4 + 0 | | zero | | 0 +(9 rows) + +-- +-- Outer joins +-- Note that OUTER is a noise word +-- +--Testcase 66: +SELECT * + FROM J1_TBL LEFT OUTER JOIN J2_TBL USING (i) + ORDER BY i, k, t; + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 4 | 1 | four | + 5 | 0 | five | -5 + 5 | 0 | five | -5 + 6 | 6 | six | + 7 | 7 | seven | + 8 | 8 | eight | + | | null | + | 0 | zero | +(13 rows) + +--Testcase 67: +SELECT * + FROM J1_TBL LEFT JOIN J2_TBL USING (i) + ORDER BY i, k, t; + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 4 | 1 | four | + 5 | 0 | five | -5 + 5 | 0 | five | -5 + 6 | 6 | six | + 7 | 7 | seven | + 8 | 8 | eight | + | | null | + | 0 | zero | +(13 rows) + +--Testcase 68: +SELECT * + FROM J1_TBL RIGHT OUTER JOIN J2_TBL USING (i); + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 + | | | 0 +(8 rows) + +--Testcase 69: +SELECT * + FROM J1_TBL RIGHT JOIN J2_TBL USING (i); + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 + | | | 0 +(8 rows) + +--Testcase 70: +SELECT * + FROM J1_TBL FULL OUTER JOIN J2_TBL USING (i) + ORDER BY i, k, t; + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 4 | 1 | four | + 5 | 0 | five | -5 + 5 | 0 | five | -5 + 6 | 6 | six | + 7 | 7 | seven | + 8 | 8 | eight | + | | | 0 + | | null | + | 0 | zero | +(14 rows) + +--Testcase 71: +SELECT * + FROM J1_TBL FULL JOIN J2_TBL USING (i) + ORDER BY i, k, t; + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 4 | 1 | four | + 5 | 0 | five | -5 + 5 | 0 | five | -5 + 6 | 6 | six | + 7 | 7 | seven | + 8 | 8 | eight | + | | | 0 + | | null | + | 0 | zero | +(14 rows) + +--Testcase 72: +SELECT * + FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (k = 1); + i | j | t | k +---+---+---+--- +(0 rows) + +--Testcase 73: +SELECT * + FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (i = 1); + i | j | t | k +---+---+-----+---- + 1 | 4 | one | -1 +(1 row) + +-- +-- semijoin selectivity for <> +-- +--Testcase 74: +explain (costs off) +select * from int4_tbl i4, tenk1 a +where exists(select * from tenk1 b + where a.twothousand = b.twothousand and a.fivethous <> b.fivethous) + and i4.f1 = a.tenthous; + QUERY PLAN +---------------------------------------------------------- + Hash Join + Hash Cond: (i4.f1 = a.tenthous) + -> Foreign Scan on int4_tbl i4 + -> Hash + -> Hash Semi Join + Hash Cond: (a.twothousand = b.twothousand) + Join Filter: (a.fivethous <> b.fivethous) + -> Foreign Scan on tenk1 a + -> Hash + -> Foreign Scan on tenk1 b +(10 rows) + +-- +-- More complicated constructs +-- +-- +-- Multiway full join +-- +--Testcase 75: +CREATE FOREIGN TABLE t1 (name TEXT, n INTEGER) SERVER influxdb_svr; +--Testcase 76: +CREATE FOREIGN TABLE t2 (name TEXT, n INTEGER) SERVER influxdb_svr; +--Testcase 77: +CREATE FOREIGN TABLE t3 (name TEXT, n INTEGER) SERVER influxdb_svr; +--Testcase 78: +INSERT INTO t1 VALUES ( 'bb', 11 ); +--Testcase 79: +INSERT INTO t2 VALUES ( 'bb', 12 ); +--Testcase 80: +INSERT INTO t2 VALUES ( 'cc', 22 ); +--Testcase 81: +INSERT INTO t2 VALUES ( 'ee', 42 ); +--Testcase 82: +INSERT INTO t3 VALUES ( 'bb', 13 ); +--Testcase 83: +INSERT INTO t3 VALUES ( 'cc', 23 ); +--Testcase 84: +INSERT INTO t3 VALUES ( 'dd', 33 ); +--Testcase 85: +SELECT * FROM t1 FULL JOIN t2 USING (name) FULL JOIN t3 USING (name); + name | n | n | n +------+----+----+---- + bb | 11 | 12 | 13 + cc | | 22 | 23 + dd | | | 33 + ee | | 42 | +(4 rows) + +-- +-- Test interactions of join syntax and subqueries +-- +-- Basic cases (we expect planner to pull up the subquery here) +--Testcase 86: +SELECT * FROM +(SELECT * FROM t2) as s2 +INNER JOIN +(SELECT * FROM t3) s3 +USING (name); + name | n | n +------+----+---- + bb | 12 | 13 + cc | 22 | 23 +(2 rows) + +--Testcase 87: +SELECT * FROM +(SELECT * FROM t2) as s2 +LEFT JOIN +(SELECT * FROM t3) s3 +USING (name); + name | n | n +------+----+---- + bb | 12 | 13 + cc | 22 | 23 + ee | 42 | +(3 rows) + +--Testcase 88: +SELECT * FROM +(SELECT * FROM t2) as s2 +FULL JOIN +(SELECT * FROM t3) s3 +USING (name); + name | n | n +------+----+---- + bb | 12 | 13 + cc | 22 | 23 + dd | | 33 + ee | 42 | +(4 rows) + +-- Cases with non-nullable expressions in subquery results; +-- make sure these go to null as expected +--Testcase 89: +SELECT * FROM +(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL INNER JOIN +(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; + name | s2_n | s2_2 | s3_n | s3_2 +------+------+------+------+------ + bb | 12 | 2 | 13 | 3 + cc | 22 | 2 | 23 | 3 +(2 rows) + +--Testcase 90: +SELECT * FROM +(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL LEFT JOIN +(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; + name | s2_n | s2_2 | s3_n | s3_2 +------+------+------+------+------ + bb | 12 | 2 | 13 | 3 + cc | 22 | 2 | 23 | 3 + ee | 42 | 2 | | +(3 rows) + +--Testcase 91: +SELECT * FROM +(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL FULL JOIN +(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; + name | s2_n | s2_2 | s3_n | s3_2 +------+------+------+------+------ + bb | 12 | 2 | 13 | 3 + cc | 22 | 2 | 23 | 3 + dd | | | 33 | 3 + ee | 42 | 2 | | +(4 rows) + +--Testcase 92: +SELECT * FROM +(SELECT name, n as s1_n, 1 as s1_1 FROM t1) as s1 +NATURAL INNER JOIN +(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL INNER JOIN +(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; + name | s1_n | s1_1 | s2_n | s2_2 | s3_n | s3_2 +------+------+------+------+------+------+------ + bb | 11 | 1 | 12 | 2 | 13 | 3 +(1 row) + +--Testcase 93: +SELECT * FROM +(SELECT name, n as s1_n, 1 as s1_1 FROM t1) as s1 +NATURAL FULL JOIN +(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL FULL JOIN +(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; + name | s1_n | s1_1 | s2_n | s2_2 | s3_n | s3_2 +------+------+------+------+------+------+------ + bb | 11 | 1 | 12 | 2 | 13 | 3 + cc | | | 22 | 2 | 23 | 3 + dd | | | | | 33 | 3 + ee | | | 42 | 2 | | +(4 rows) + +--Testcase 94: +SELECT * FROM +(SELECT name, n as s1_n FROM t1) as s1 +NATURAL FULL JOIN + (SELECT * FROM + (SELECT name, n as s2_n FROM t2) as s2 + NATURAL FULL JOIN + (SELECT name, n as s3_n FROM t3) as s3 + ) ss2; + name | s1_n | s2_n | s3_n +------+------+------+------ + bb | 11 | 12 | 13 + cc | | 22 | 23 + dd | | | 33 + ee | | 42 | +(4 rows) + +--Testcase 95: +SELECT * FROM +(SELECT name, n as s1_n FROM t1) as s1 +NATURAL FULL JOIN + (SELECT * FROM + (SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 + NATURAL FULL JOIN + (SELECT name, n as s3_n FROM t3) as s3 + ) ss2; + name | s1_n | s2_n | s2_2 | s3_n +------+------+------+------+------ + bb | 11 | 12 | 2 | 13 + cc | | 22 | 2 | 23 + dd | | | | 33 + ee | | 42 | 2 | +(4 rows) + +-- Constants as join keys can also be problematic +--Testcase 96: +SELECT * FROM + (SELECT name, n as s1_n FROM t1) as s1 +FULL JOIN + (SELECT name, 2 as s2_n FROM t2) as s2 +ON (s1_n = s2_n); + name | s1_n | name | s2_n +------+------+------+------ + | | bb | 2 + | | cc | 2 + | | ee | 2 + bb | 11 | | +(4 rows) + +-- Test for propagation of nullability constraints into sub-joins +--Testcase 97: +create foreign table x (x1 int, x2 int) server influxdb_svr; +--Testcase 98: +insert into x values (1,11); +--Testcase 99: +insert into x values (2,22); +--Testcase 100: +insert into x values (3,null); +--Testcase 101: +insert into x values (4,44); +--Testcase 102: +insert into x values (5,null); +--Testcase 103: +create foreign table y (y1 int, y2 int) server influxdb_svr; +--Testcase 104: +insert into y values (1,111); +--Testcase 105: +insert into y values (2,222); +--Testcase 106: +insert into y values (3,333); +--Testcase 107: +insert into y values (4,null); +--Testcase 108: +select * from x; + x1 | x2 +----+---- + 1 | 11 + 2 | 22 + 3 | + 4 | 44 + 5 | +(5 rows) + +--Testcase 109: +select * from y; + y1 | y2 +----+----- + 1 | 111 + 2 | 222 + 3 | 333 + 4 | +(4 rows) + +--Testcase 110: +select * from x left join y on (x1 = y1 and x2 is not null); + x1 | x2 | y1 | y2 +----+----+----+----- + 1 | 11 | 1 | 111 + 2 | 22 | 2 | 222 + 3 | | | + 4 | 44 | 4 | + 5 | | | +(5 rows) + +--Testcase 111: +select * from x left join y on (x1 = y1 and y2 is not null); + x1 | x2 | y1 | y2 +----+----+----+----- + 1 | 11 | 1 | 111 + 2 | 22 | 2 | 222 + 3 | | 3 | 333 + 4 | 44 | | + 5 | | | +(5 rows) + +--Testcase 112: +select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) +on (x1 = xx1); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 3 | | 3 | 333 | 3 | + 4 | 44 | 4 | | 4 | 44 + 5 | | | | 5 | +(5 rows) + +--Testcase 113: +select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) +on (x1 = xx1 and x2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 3 | | 3 | 333 | | + 4 | 44 | 4 | | 4 | 44 + 5 | | | | | +(5 rows) + +--Testcase 114: +select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) +on (x1 = xx1 and y2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 3 | | 3 | 333 | 3 | + 4 | 44 | 4 | | | + 5 | | | | | +(5 rows) + +--Testcase 115: +select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) +on (x1 = xx1 and xx2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 3 | | 3 | 333 | | + 4 | 44 | 4 | | 4 | 44 + 5 | | | | | +(5 rows) + +-- these should NOT give the same answers as above +--Testcase 116: +select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) +on (x1 = xx1) where (x2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 4 | 44 | 4 | | 4 | 44 +(3 rows) + +--Testcase 117: +select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) +on (x1 = xx1) where (y2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 3 | | 3 | 333 | 3 | +(3 rows) + +--Testcase 118: +select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) +on (x1 = xx1) where (xx2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 4 | 44 | 4 | | 4 | 44 +(3 rows) + +-- +-- regression test: check for bug with propagation of implied equality +-- to outside an IN +-- +--Testcase 119: +select count(*) from tenk1 a where unique1 in + (select unique1 from tenk1 b join tenk1 c using (unique1) + where b.unique2 = 42); + count +------- + 1 +(1 row) + +-- +-- regression test: check for failure to generate a plan with multiple +-- degenerate IN clauses +-- +--Testcase 120: +select count(*) from tenk1 x where + x.unique1 in (select a.f1 from int4_tbl a,float8_tbl b where a.f1=b.f1) and + x.unique1 = 0 and + x.unique1 in (select aa.f1 from int4_tbl aa,float8_tbl bb where aa.f1=bb.f1); + count +------- + 1 +(1 row) + +-- try that with GEQO too +begin; +--Testcase 121: +set geqo = on; +--Testcase 122: +set geqo_threshold = 2; +--Testcase 123: +select count(*) from tenk1 x where + x.unique1 in (select a.f1 from int4_tbl a,float8_tbl b where a.f1=b.f1) and + x.unique1 = 0 and + x.unique1 in (select aa.f1 from int4_tbl aa,float8_tbl bb where aa.f1=bb.f1); + count +------- + 1 +(1 row) + +rollback; +-- +-- regression test: be sure we cope with proven-dummy append rels +-- +--Testcase 124: +CREATE FOREIGN TABLE b_star(class char, aa int4, bb text, a int4) SERVER influxdb_svr; +--Testcase 125: +explain (costs off) +select aa, bb, unique1, unique1 + from tenk1 right join b_star on aa = unique1 + where bb < bb and bb is null; + QUERY PLAN +---------------------------------------------------- + Hash Right Join + Hash Cond: (tenk1.unique1 = b_star.aa) + -> Foreign Scan on tenk1 + -> Hash + -> Foreign Scan on b_star + Filter: ((bb IS NULL) AND (bb < bb)) +(6 rows) + +--Testcase 126: +select aa, bb, unique1, unique1 + from tenk1 right join b_star on aa = unique1 + where bb < bb and bb is null; + aa | bb | unique1 | unique1 +----+----+---------+--------- +(0 rows) + +--Testcase 127: +drop foreign table b_star; +-- +-- regression test: check handling of empty-FROM subquery underneath outer join +-- +--Testcase 128: +explain (costs off) +select * from int8_tbl i1 left join (int8_tbl i2 join + (select 123 as x) ss on i2.q1 = x) on i1.q2 = i2.q2 +order by 1, 2; + QUERY PLAN +----------------------------------------------- + Sort + Sort Key: i1.q1, i1.q2 + -> Hash Left Join + Hash Cond: (i1.q2 = i2.q2) + -> Foreign Scan on int8_tbl i1 + -> Hash + -> Foreign Scan on int8_tbl i2 +(7 rows) + +--Testcase 129: +select * from int8_tbl i1 left join (int8_tbl i2 join + (select 123 as x) ss on i2.q1 = x) on i1.q2 = i2.q2 +order by 1, 2; + q1 | q2 | q1 | q2 | x +------------------+-------------------+-----+------------------+----- + 123 | 456 | 123 | 456 | 123 + 123 | 4567890123456789 | 123 | 4567890123456789 | 123 + 4567890123456789 | -4567890123456789 | | | + 4567890123456789 | 123 | | | + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 123 +(5 rows) + +-- +-- regression test: check a case where join_clause_is_movable_into() gives +-- an imprecise result, causing an assertion failure +-- +--Testcase 130: +select count(*) +from + (select t3.tenthous as x1, coalesce(t1.stringu1, t2.stringu1) as x2 + from tenk1 t1 + left join tenk1 t2 on t1.unique1 = t2.unique1 + join tenk1 t3 on t1.unique2 = t3.unique2) ss, + tenk1 t4, + tenk1 t5 +where t4.thousand = t5.unique1 and ss.x1 = t4.tenthous and ss.x2 = t5.stringu1; + count +------- + 1000 +(1 row) + +-- +-- regression test: check a case where we formerly missed including an EC +-- enforcement clause because it was expected to be handled at scan level +-- +--Testcase 131: +explain (costs off) +select a.f1, b.f1, t.thousand, t.tenthous from + tenk1 t, + (select sum(f1)+1 as f1 from int4_tbl i4a) a, + (select sum(f1) as f1 from int4_tbl i4b) b +where b.f1 = t.thousand and a.f1 = b.f1 and (a.f1+b.f1+999) = t.tenthous; + QUERY PLAN +------------------------------------------------------------------------------- + Hash Join + Hash Cond: (t.thousand = (sum(i4b.f1))) + Join Filter: ((((((sum(i4a.f1)) + 1)) + (sum(i4b.f1))) + 999) = t.tenthous) + -> Hash Join + Hash Cond: (t.thousand = (((sum(i4a.f1)) + 1))) + -> Foreign Scan on tenk1 t + -> Hash + -> Foreign Scan + -> Hash + -> Foreign Scan +(10 rows) + +--Testcase 132: +select a.f1, b.f1, t.thousand, t.tenthous from + tenk1 t, + (select sum(f1)+1 as f1 from int4_tbl i4a) a, + (select sum(f1) as f1 from int4_tbl i4b) b +where b.f1 = t.thousand and a.f1 = b.f1 and (a.f1+b.f1+999) = t.tenthous; + f1 | f1 | thousand | tenthous +----+----+----------+---------- +(0 rows) + +-- +-- check a case where we formerly got confused by conflicting sort orders +-- in redundant merge join path keys +-- +--Testcase 133: +explain (costs off) +select * from + j1_tbl full join + (select * from j2_tbl order by j2_tbl.i desc, j2_tbl.k asc) j2_tbl + on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; + QUERY PLAN +----------------------------------------------------------------- + Merge Full Join + Merge Cond: ((j2_tbl.i = j1_tbl.i) AND (j2_tbl.k = j1_tbl.i)) + -> Sort + Sort Key: j2_tbl.i DESC, j2_tbl.k + -> Foreign Scan on j2_tbl + -> Sort + Sort Key: j1_tbl.i DESC + -> Foreign Scan on j1_tbl +(8 rows) + +--Testcase 134: +select * from + j1_tbl full join + (select * from j2_tbl order by j2_tbl.i desc, j2_tbl.k asc) j2_tbl + on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; + i | j | t | i | k +---+---+-------+---+---- + | | | | 0 + | 0 | zero | | + | | null | | + 8 | 8 | eight | | + 7 | 7 | seven | | + 6 | 6 | six | | + | | | 5 | -5 + | | | 5 | -5 + 5 | 0 | five | | + 4 | 1 | four | | + | | | 3 | -3 + 3 | 2 | three | | + 2 | 3 | two | 2 | 2 + | | | 2 | 4 + | | | 1 | -1 + | | | 0 | + 1 | 4 | one | | + 0 | | zero | | +(18 rows) + +-- +-- a different check for handling of redundant sort keys in merge joins +-- +--Testcase 135: +explain (costs off) +select count(*) from + (select * from tenk1 x order by x.thousand, x.twothousand, x.fivethous) x + left join + (select * from tenk1 y order by y.unique2) y + on x.thousand = y.unique2 and x.twothousand = y.hundred and x.fivethous = y.unique2; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Aggregate + -> Merge Left Join + Merge Cond: ((x.thousand = y.unique2) AND (x.twothousand = y.hundred) AND (x.fivethous = y.unique2)) + -> Sort + Sort Key: x.thousand, x.twothousand, x.fivethous + -> Foreign Scan on tenk1 x + -> Sort + Sort Key: y.unique2, y.hundred + -> Subquery Scan on y + -> Sort + Sort Key: y_1.unique2 + -> Foreign Scan on tenk1 y_1 +(12 rows) + +--Testcase 136: +select count(*) from + (select * from tenk1 x order by x.thousand, x.twothousand, x.fivethous) x + left join + (select * from tenk1 y order by y.unique2) y + on x.thousand = y.unique2 and x.twothousand = y.hundred and x.fivethous = y.unique2; + count +------- + 10000 +(1 row) + +-- +-- Clean up +-- +--Testcase 137: +DELETE FROM t1; +--Testcase 138: +DELETE FROM t2; +--Testcase 139: +DELETE FROM t3; +--Testcase 140: +DROP FOREIGN TABLE t1; +--Testcase 141: +DROP FOREIGN TABLE t2; +--Testcase 142: +DROP FOREIGN TABLE t3; +--Testcase 143: +DELETE FROM J1_TBL; +--Testcase 575: +DROP FOREIGN TABLE J1_TBL; +--Testcase 144: +DELETE FROM J2_TBL; +--Testcase 576: +DROP FOREIGN TABLE J2_TBL; +--Testcase 577: +DELETE FROM x; +--Testcase 578: +DELETE FROM y; +--Testcase 579: +DROP FOREIGN TABLE x; +--Testcase 580: +DROP FOREIGN TABLE y; +-- Both DELETE and UPDATE allow the specification of additional tables +-- to "join" against to determine which rows should be modified. +--Testcase 145: +CREATE FOREIGN TABLE t1 (a int, b int) SERVER influxdb_svr; +--Testcase 146: +CREATE FOREIGN TABLE t2 (a int, b int) SERVER influxdb_svr; +--Testcase 147: +CREATE FOREIGN TABLE t3 (x int, y int) SERVER influxdb_svr; +--Testcase 148: +INSERT INTO t1 VALUES (5, 10); +--Testcase 149: +INSERT INTO t1 VALUES (15, 20); +--Testcase 150: +INSERT INTO t1 VALUES (100, 100); +--Testcase 151: +INSERT INTO t1 VALUES (200, 1000); +--Testcase 152: +INSERT INTO t2 VALUES (200, 2000); +--Testcase 153: +INSERT INTO t3 VALUES (5, 20); +--Testcase 154: +INSERT INTO t3 VALUES (6, 7); +--Testcase 155: +INSERT INTO t3 VALUES (7, 8); +--Testcase 156: +INSERT INTO t3 VALUES (500, 100); +--Testcase 157: +ALTER TABLE t3 ADD time timestamp; +--Testcase 158: +SELECT x, y FROM t3; + x | y +-----+----- + 5 | 20 + 6 | 7 + 7 | 8 + 500 | 100 +(4 rows) + +--Testcase 159: +DELETE FROM t3 USING t1 table1 WHERE t3.x = table1.a; +--Testcase 160: +SELECT x, y FROM t3; + x | y +-----+----- + 6 | 7 + 7 | 8 + 500 | 100 +(3 rows) + +--Testcase 161: +DELETE FROM t3 USING t1 JOIN t2 USING (a) WHERE t3.x > t1.a; +--Testcase 162: +SELECT x, y FROM t3; + x | y +---+--- + 6 | 7 + 7 | 8 +(2 rows) + +--Testcase 163: +DELETE FROM t3 USING t3 t3_other WHERE t3.x = t3_other.x AND t3.y = t3_other.y; +--Testcase 164: +SELECT x, y FROM t3; + x | y +---+--- +(0 rows) + +-- Test join against inheritance tree +--Testcase 165: +create temp table t2a () inherits (t2); +--Testcase 166: +insert into t2a values (200, 2001); +--Testcase 167: +select * from t1 left join t2 on (t1.a = t2.a); + a | b | a | b +-----+------+-----+------ + 5 | 10 | | + 15 | 20 | | + 100 | 100 | | + 200 | 1000 | 200 | 2000 + 200 | 1000 | 200 | 2001 +(5 rows) + +-- Test matching of column name with wrong alias +--Testcase 168: +select t1.x from t1 join t3 on (t1.a = t3.x); +ERROR: column t1.x does not exist +LINE 1: select t1.x from t1 join t3 on (t1.a = t3.x); + ^ +HINT: Perhaps you meant to reference the column "t3.x". +-- Test matching of locking clause with wrong alias +--Testcase 602: +select t1.*, t2.*, unnamed_join.* from + t1 join t2 on (t1.a = t2.a), t3 as unnamed_join + for update of unnamed_join; + a | b | a | b | x | y | time +---+---+---+---+---+---+------ +(0 rows) + +--Testcase 603: +select foo.*, unnamed_join.* from + t1 join t2 using (a) as foo, t3 as unnamed_join + for update of unnamed_join; + a | x | y | time +---+---+---+------ +(0 rows) + +--Testcase 604: +select foo.*, unnamed_join.* from + t1 join t2 using (a) as foo, t3 as unnamed_join + for update of foo; +ERROR: FOR UPDATE cannot be applied to a join +LINE 3: for update of foo; + ^ +--Testcase 605: +select bar.*, unnamed_join.* from + (t1 join t2 using (a) as foo) as bar, t3 as unnamed_join + for update of foo; +ERROR: relation "foo" in FOR UPDATE clause not found in FROM clause +LINE 3: for update of foo; + ^ +--Testcase 606: +select bar.*, unnamed_join.* from + (t1 join t2 using (a) as foo) as bar, t3 as unnamed_join + for update of bar; +ERROR: FOR UPDATE cannot be applied to a join +LINE 3: for update of bar; + ^ +-- +-- regression test for 8.1 merge right join bug +-- +--Testcase 169: +CREATE FOREIGN TABLE tt1 ( tt1_id int4, joincol int4 ) SERVER influxdb_svr; +--Testcase 170: +INSERT INTO tt1 VALUES (1, 11); +--Testcase 171: +INSERT INTO tt1 VALUES (2, NULL); +--Testcase 172: +CREATE FOREIGN TABLE tt2 ( tt2_id int4, joincol int4 ) SERVER influxdb_svr; +--Testcase 173: +INSERT INTO tt2 VALUES (21, 11); +--Testcase 174: +INSERT INTO tt2 VALUES (22, 11); +--Testcase 175: +set enable_hashjoin to off; +--Testcase 176: +set enable_nestloop to off; +-- these should give the same results +--Testcase 177: +select tt1.*, tt2.* from tt1 left join tt2 on tt1.joincol = tt2.joincol; + tt1_id | joincol | tt2_id | joincol +--------+---------+--------+--------- + 1 | 11 | 21 | 11 + 1 | 11 | 22 | 11 + 2 | | | +(3 rows) + +--Testcase 178: +select tt1.*, tt2.* from tt2 right join tt1 on tt1.joincol = tt2.joincol; + tt1_id | joincol | tt2_id | joincol +--------+---------+--------+--------- + 1 | 11 | 21 | 11 + 1 | 11 | 22 | 11 + 2 | | | +(3 rows) + +--Testcase 179: +reset enable_hashjoin; +--Testcase 180: +reset enable_nestloop; +-- +-- regression test for bug #13908 (hash join with skew tuples & nbatch increase) +-- +--Testcase 181: +set work_mem to '64kB'; +--Testcase 182: +set enable_mergejoin to off; +--Testcase 183: +set enable_memoize to off; +--Testcase 184: +explain (costs off) +select count(*) from tenk1 a, tenk1 b + where a.hundred = b.thousand and (b.fivethous % 10) < 10; + QUERY PLAN +--------------------------------------------- + Aggregate + -> Hash Join + Hash Cond: (a.hundred = b.thousand) + -> Foreign Scan on tenk1 a + -> Hash + -> Foreign Scan on tenk1 b +(6 rows) + +--Testcase 185: +select count(*) from tenk1 a, tenk1 b + where a.hundred = b.thousand and (b.fivethous % 10) < 10; + count +-------- + 100000 +(1 row) + +--Testcase 186: +reset work_mem; +--Testcase 187: +reset enable_mergejoin; +--Testcase 188: +reset enable_memoize; +-- +-- regression test for 8.2 bug with improper re-ordering of left joins +-- +--Testcase 189: +create foreign table tt3(f1 int, f2 text) server influxdb_svr; +--Testcase 190: +insert into tt3 select x, repeat('xyzzy', 100) from generate_series(1,10000) x; +--Testcase 191: +create foreign table tt4(f1 int) server influxdb_svr; +--Testcase 192: +insert into tt4 values (0),(1),(9999); +--Testcase 193: +SELECT a.f1 +FROM tt4 a +LEFT JOIN ( + SELECT b.f1 + FROM tt3 b LEFT JOIN tt3 c ON (b.f1 = c.f1) + WHERE c.f1 IS NULL +) AS d ON (a.f1 = d.f1) +WHERE d.f1 IS NULL; + f1 +------ + 0 + 1 + 9999 +(3 rows) + +-- +-- regression test for proper handling of outer joins within antijoins +-- +--Testcase 194: +create foreign table tt4x(c1 int, c2 int, c3 int) server influxdb_svr; +--Testcase 195: +explain (costs off) +select * from tt4x t1 +where not exists ( + select 1 from tt4x t2 + left join tt4x t3 on t2.c3 = t3.c1 + left join ( select t5.c1 as c1 + from tt4x t4 left join tt4x t5 on t4.c2 = t5.c1 + ) a1 on t3.c2 = a1.c1 + where t1.c1 = t2.c2 +); + QUERY PLAN +------------------------------------------------------------- + Hash Anti Join + Hash Cond: (t1.c1 = t2.c2) + -> Foreign Scan on tt4x t1 + -> Hash + -> Merge Right Join + Merge Cond: (t5.c1 = t3.c2) + -> Merge Join + Merge Cond: (t4.c2 = t5.c1) + -> Sort + Sort Key: t4.c2 + -> Foreign Scan on tt4x t4 + -> Sort + Sort Key: t5.c1 + -> Foreign Scan on tt4x t5 + -> Sort + Sort Key: t3.c2 + -> Merge Left Join + Merge Cond: (t2.c3 = t3.c1) + -> Sort + Sort Key: t2.c3 + -> Foreign Scan on tt4x t2 + -> Sort + Sort Key: t3.c1 + -> Foreign Scan on tt4x t3 +(24 rows) + +-- +-- regression test for problems of the sort depicted in bug #3494 +-- +--Testcase 196: +create foreign table tt5(f1 int, f2 int) server influxdb_svr; +--Testcase 197: +create foreign table tt6(f1 int, f2 int) server influxdb_svr; +--Testcase 198: +insert into tt5 values(1, 10); +--Testcase 199: +insert into tt5 values(1, 11); +--Testcase 200: +insert into tt6 values(1, 9); +--Testcase 201: +insert into tt6 values(1, 2); +--Testcase 202: +insert into tt6 values(2, 9); +--Testcase 203: +select * from tt5,tt6 where tt5.f1 = tt6.f1 and tt5.f1 = tt5.f2 - tt6.f2; + f1 | f2 | f1 | f2 +----+----+----+---- + 1 | 10 | 1 | 9 +(1 row) + +-- +-- regression test for problems of the sort depicted in bug #3588 +-- +--Testcase 204: +create foreign table xx (pkxx int) server influxdb_svr; +--Testcase 205: +create foreign table yy (pkyy int, pkxx int) server influxdb_svr; +--Testcase 206: +insert into xx values (1); +--Testcase 207: +insert into xx values (2); +--Testcase 208: +insert into xx values (3); +--Testcase 209: +insert into yy values (101, 1); +--Testcase 210: +insert into yy values (201, 2); +--Testcase 211: +insert into yy values (301, NULL); +--Testcase 212: +select yy.pkyy as yy_pkyy, yy.pkxx as yy_pkxx, yya.pkyy as yya_pkyy, + xxa.pkxx as xxa_pkxx, xxb.pkxx as xxb_pkxx +from yy + left join (SELECT * FROM yy where pkyy = 101) as yya ON yy.pkyy = yya.pkyy + left join xx xxa on yya.pkxx = xxa.pkxx + left join xx xxb on coalesce (xxa.pkxx, 1) = xxb.pkxx; + yy_pkyy | yy_pkxx | yya_pkyy | xxa_pkxx | xxb_pkxx +---------+---------+----------+----------+---------- + 101 | 1 | 101 | 1 | 1 + 301 | | | | 1 + 201 | 2 | | | 1 +(3 rows) + +-- +-- regression test for improper pushing of constants across outer-join clauses +-- (as seen in early 8.2.x releases) +-- +--Testcase 213: +create foreign table zt1 (f1 int) server influxdb_svr; +--Testcase 214: +create foreign table zt2 (f2 int) server influxdb_svr; +--Testcase 215: +create foreign table zt3 (f3 int) server influxdb_svr; +--Testcase 216: +insert into zt1 values(53); +--Testcase 217: +insert into zt2 values(53); +--Testcase 218: +select * from + zt2 left join zt3 on (f2 = f3) + left join zt1 on (f3 = f1) +where f2 = 53; + f2 | f3 | f1 +----+----+---- + 53 | | +(1 row) + +--Testcase 219: +create temp view zv1 as select *,'dummy'::text AS junk from zt1; +--Testcase 220: +select * from + zt2 left join zt3 on (f2 = f3) + left join zv1 on (f3 = f1) +where f2 = 53; + f2 | f3 | f1 | junk +----+----+----+------ + 53 | | | +(1 row) + +-- +-- regression test for improper extraction of OR indexqual conditions +-- (as seen in early 8.3.x releases) +-- +--Testcase 221: +select a.unique2, a.ten, b.tenthous, b.unique2, b.hundred +from tenk1 a left join tenk1 b on a.unique2 = b.tenthous +where a.unique1 = 42 and + ((b.unique2 is null and a.ten = 2) or b.hundred = 3); + unique2 | ten | tenthous | unique2 | hundred +---------+-----+----------+---------+--------- +(0 rows) + +-- +-- test proper positioning of one-time quals in EXISTS (8.4devel bug) +-- +--Testcase 222: +prepare foo(bool) as + select count(*) from tenk1 a left join tenk1 b + on (a.unique2 = b.unique1 and exists + (select 1 from tenk1 c where c.thousand = b.unique2 and $1)); +--Testcase 223: +execute foo(true); + count +------- + 10000 +(1 row) + +--Testcase 224: +execute foo(false); + count +------- + 10000 +(1 row) + +-- +-- test for sane behavior with noncanonical merge clauses, per bug #4926 +-- +begin; +--Testcase 225: +set enable_mergejoin = 1; +--Testcase 226: +set enable_hashjoin = 0; +--Testcase 227: +set enable_nestloop = 0; +--Testcase 228: +create foreign table a (i integer) server influxdb_svr; +--Testcase 229: +create foreign table b (x integer, y integer) server influxdb_svr; +--Testcase 230: +select * from a left join b on i = x and i = y and x = i; + i | x | y +---+---+--- +(0 rows) + +--Testcase 231: +DROP FOREIGN TABLE a; +--Testcase 232: +DROP FOREIGN TABLE b; +rollback; +-- +-- test handling of merge clauses using record_ops +-- +begin; +--Testcase 233: +create type mycomptype as (id int, v bigint); +--Testcase 234: +create temp table tidv (idv mycomptype); +--Testcase 235: +create index on tidv (idv); +--Testcase 236: +explain (costs off) +select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; + QUERY PLAN +---------------------------------------------------------- + Merge Join + Merge Cond: (a.idv = b.idv) + -> Index Only Scan using tidv_idv_idx on tidv a + -> Materialize + -> Index Only Scan using tidv_idv_idx on tidv b +(5 rows) + +--Testcase 237: +set enable_mergejoin = 0; +--Testcase 238: +set enable_hashjoin = 0; +--Testcase 239: +explain (costs off) +select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; + QUERY PLAN +---------------------------------------------------- + Nested Loop + -> Seq Scan on tidv a + -> Index Only Scan using tidv_idv_idx on tidv b + Index Cond: (idv = a.idv) +(4 rows) + +rollback; +-- +-- test NULL behavior of whole-row Vars, per bug #5025 +-- +--Testcase 240: +select t1.q2, count(t2.*) +from int8_tbl t1 left join int8_tbl t2 on (t1.q2 = t2.q1) +group by t1.q2 order by 1; + q2 | count +-------------------+------- + -4567890123456789 | 0 + 123 | 2 + 456 | 0 + 4567890123456789 | 6 +(4 rows) + +--Testcase 241: +select t1.q2, count(t2.*) +from int8_tbl t1 left join (select * from int8_tbl) t2 on (t1.q2 = t2.q1) +group by t1.q2 order by 1; + q2 | count +-------------------+------- + -4567890123456789 | 0 + 123 | 2 + 456 | 0 + 4567890123456789 | 6 +(4 rows) + +--Testcase 242: +select t1.q2, count(t2.*) +from int8_tbl t1 left join (select * from int8_tbl offset 0) t2 on (t1.q2 = t2.q1) +group by t1.q2 order by 1; + q2 | count +-------------------+------- + -4567890123456789 | 0 + 123 | 2 + 456 | 0 + 4567890123456789 | 6 +(4 rows) + +--Testcase 243: +select t1.q2, count(t2.*) +from int8_tbl t1 left join + (select q1, case when q2=1 then 1 else q2 end as q2 from int8_tbl) t2 + on (t1.q2 = t2.q1) +group by t1.q2 order by 1; + q2 | count +-------------------+------- + -4567890123456789 | 0 + 123 | 2 + 456 | 0 + 4567890123456789 | 6 +(4 rows) + +-- +-- test incorrect failure to NULL pulled-up subexpressions +-- +begin; +--Testcase 244: +create foreign table a ( + code char +) server influxdb_svr; +--Testcase 245: +create foreign table b ( + a char, + num integer +) server influxdb_svr; +--Testcase 246: +create foreign table c ( + name char, + a char +) server influxdb_svr; +--Testcase 247: +insert into a (code) values ('p'); +--Testcase 248: +insert into a (code) values ('q'); +--Testcase 249: +insert into b (a, num) values ('p', 1); +--Testcase 250: +insert into b (a, num) values ('p', 2); +--Testcase 251: +insert into c (name, a) values ('A', 'p'); +--Testcase 252: +insert into c (name, a) values ('B', 'q'); +--Testcase 253: +insert into c (name, a) values ('C', null); +--Testcase 254: +select c.name, ss.code, ss.b_cnt, ss.const +from c left join + (select a.code, coalesce(b_grp.cnt, 0) as b_cnt, -1 as const + from a left join + (select count(1) as cnt, b.a from b group by b.a) as b_grp + on a.code = b_grp.a + ) as ss + on (c.a = ss.code) +order by c.name; + name | code | b_cnt | const +------+------+-------+------- + A | p | 2 | -1 + B | q | 0 | -1 + C | | | +(3 rows) + +--Testcase 255: +DELETE FROM a; +--Testcase 256: +DELETE FROM b; +--Testcase 257: +DELETE FROM c; +--Testcase 258: +DROP FOREIGN TABLE a; +--Testcase 259: +DROP FOREIGN TABLE b; +--Testcase 260: +DROP FOREIGN TABLE c; +rollback; +-- +-- test incorrect handling of placeholders that only appear in targetlists, +-- per bug #6154 +-- +--Testcase 261: +SELECT * FROM +( SELECT 1 as key1 ) sub1 +LEFT JOIN +( SELECT sub3.key3, sub4.value2, COALESCE(sub4.value2, 66) as value3 FROM + ( SELECT 1 as key3 ) sub3 + LEFT JOIN + ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM + ( SELECT 1 as key5 ) sub5 + LEFT JOIN + ( SELECT 2 as key6, 42 as value1 ) sub6 + ON sub5.key5 = sub6.key6 + ) sub4 + ON sub4.key5 = sub3.key3 +) sub2 +ON sub1.key1 = sub2.key3; + key1 | key3 | value2 | value3 +------+------+--------+-------- + 1 | 1 | 1 | 1 +(1 row) + +-- test the path using join aliases, too +--Testcase 262: +SELECT * FROM +( SELECT 1 as key1 ) sub1 +LEFT JOIN +( SELECT sub3.key3, value2, COALESCE(value2, 66) as value3 FROM + ( SELECT 1 as key3 ) sub3 + LEFT JOIN + ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM + ( SELECT 1 as key5 ) sub5 + LEFT JOIN + ( SELECT 2 as key6, 42 as value1 ) sub6 + ON sub5.key5 = sub6.key6 + ) sub4 + ON sub4.key5 = sub3.key3 +) sub2 +ON sub1.key1 = sub2.key3; + key1 | key3 | value2 | value3 +------+------+--------+-------- + 1 | 1 | 1 | 1 +(1 row) + +-- +-- test case where a PlaceHolderVar is used as a nestloop parameter +-- +--Testcase 263: +EXPLAIN (COSTS OFF) +SELECT qq, unique1 + FROM + ( SELECT COALESCE(q1, 0) AS qq FROM int8_tbl a ) AS ss1 + FULL OUTER JOIN + ( SELECT COALESCE(q2, -1) AS qq FROM int8_tbl b ) AS ss2 + USING (qq) + INNER JOIN tenk1 c ON qq = unique2; + QUERY PLAN +------------------------------------------------------------------------------------------------------- + Merge Join + Merge Cond: (c.unique2 = (COALESCE((COALESCE(a.q1, '0'::bigint)), (COALESCE(b.q2, '-1'::bigint))))) + -> Sort + Sort Key: c.unique2 + -> Foreign Scan on tenk1 c + -> Sort + Sort Key: (COALESCE((COALESCE(a.q1, '0'::bigint)), (COALESCE(b.q2, '-1'::bigint)))) + -> Merge Full Join + Merge Cond: ((COALESCE(a.q1, '0'::bigint)) = (COALESCE(b.q2, '-1'::bigint))) + -> Sort + Sort Key: (COALESCE(a.q1, '0'::bigint)) + -> Foreign Scan on int8_tbl a + -> Sort + Sort Key: (COALESCE(b.q2, '-1'::bigint)) + -> Foreign Scan on int8_tbl b +(15 rows) + +--Testcase 264: +SELECT qq, unique1 + FROM + ( SELECT COALESCE(q1, 0) AS qq FROM int8_tbl a ) AS ss1 + FULL OUTER JOIN + ( SELECT COALESCE(q2, -1) AS qq FROM int8_tbl b ) AS ss2 + USING (qq) + INNER JOIN tenk1 c ON qq = unique2; + qq | unique1 +-----+--------- + 123 | 4596 + 123 | 4596 + 456 | 7318 +(3 rows) + +-- +-- nested nestloops can require nested PlaceHolderVars +-- +--Testcase 265: +create foreign table nt1 ( + id int, + a1 boolean, + a2 boolean +) server influxdb_svr; +--Testcase 266: +create foreign table nt2 ( + id int, + nt1_id int, + b1 boolean, + b2 boolean +) server influxdb_svr; +--Testcase 267: +create foreign table nt3 ( + id int, + nt2_id int, + c1 boolean +) server influxdb_svr; +--Testcase 268: +insert into nt1 values (1,true,true); +--Testcase 269: +insert into nt1 values (2,true,false); +--Testcase 270: +insert into nt1 values (3,false,false); +--Testcase 271: +insert into nt2 values (1,1,true,true); +--Testcase 272: +insert into nt2 values (2,2,true,false); +--Testcase 273: +insert into nt2 values (3,3,false,false); +--Testcase 274: +insert into nt3 values (1,1,true); +--Testcase 275: +insert into nt3 values (2,2,false); +--Testcase 276: +insert into nt3 values (3,3,true); +--Testcase 277: +explain (costs off) +select nt3.id +from nt3 as nt3 + left join + (select nt2.*, (nt2.b1 and ss1.a3) AS b3 + from nt2 as nt2 + left join + (select nt1.*, (nt1.id is not null) as a3 from nt1) as ss1 + on ss1.id = nt2.nt1_id + ) as ss2 + on ss2.id = nt3.nt2_id +where nt3.id = 1 and ss2.b3; + QUERY PLAN +---------------------------------------------------- + Hash Join + Hash Cond: (nt1.id = nt2.nt1_id) + Join Filter: (nt2.b1 AND ((nt1.id IS NOT NULL))) + -> Foreign Scan on nt1 + -> Hash + -> Hash Join + Hash Cond: (nt2.id = nt3.nt2_id) + -> Foreign Scan on nt2 + -> Hash + -> Foreign Scan on nt3 +(10 rows) + +--Testcase 278: +select nt3.id +from nt3 as nt3 + left join + (select nt2.*, (nt2.b1 and ss1.a3) AS b3 + from nt2 as nt2 + left join + (select nt1.*, (nt1.id is not null) as a3 from nt1) as ss1 + on ss1.id = nt2.nt1_id + ) as ss2 + on ss2.id = nt3.nt2_id +where nt3.id = 1 and ss2.b3; + id +---- + 1 +(1 row) + +-- +-- test case where a PlaceHolderVar is propagated into a subquery +-- +--Testcase 279: +explain (costs off) +select * from + int8_tbl t1 left join + (select q1 as x, 42 as y from int8_tbl t2) ss + on t1.q2 = ss.x +where + 1 = (select 1 from int8_tbl t3 where ss.y is not null limit 1) +order by 1,2; + QUERY PLAN +----------------------------------------------------------- + Sort + Sort Key: t1.q1, t1.q2 + -> Hash Right Join + Hash Cond: (t2.q1 = t1.q2) + Filter: (1 = (SubPlan 1)) + -> Foreign Scan on int8_tbl t2 + -> Hash + -> Foreign Scan on int8_tbl t1 + SubPlan 1 + -> Limit + -> Result + One-Time Filter: ((42) IS NOT NULL) + -> Foreign Scan on int8_tbl t3 +(13 rows) + +--Testcase 280: +select * from + int8_tbl t1 left join + (select q1 as x, 42 as y from int8_tbl t2) ss + on t1.q2 = ss.x +where + 1 = (select 1 from int8_tbl t3 where ss.y is not null limit 1) +order by 1,2; + q1 | q2 | x | y +------------------+------------------+------------------+---- + 123 | 4567890123456789 | 4567890123456789 | 42 + 123 | 4567890123456789 | 4567890123456789 | 42 + 123 | 4567890123456789 | 4567890123456789 | 42 + 4567890123456789 | 123 | 123 | 42 + 4567890123456789 | 123 | 123 | 42 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 +(8 rows) + +-- +-- variant where a PlaceHolderVar is needed at a join, but not above the join +-- +--Testcase 281: +explain (costs off) +select * from + int4_tbl as i41, + lateral + (select 1 as x from + (select i41.f1 as lat, + i42.f1 as loc from + int8_tbl as i81, int4_tbl as i42) as ss1 + right join int4_tbl as i43 on (i43.f1 > 1) + where ss1.loc = ss1.lat) as ss2 +where i41.f1 > 0; + QUERY PLAN +------------------------------------------------------ + Nested Loop + -> Nested Loop + -> Foreign Scan on int4_tbl i41 + -> Nested Loop + Join Filter: (i41.f1 = i42.f1) + -> Foreign Scan on int8_tbl i81 + -> Materialize + -> Foreign Scan on int4_tbl i42 + -> Materialize + -> Foreign Scan on int4_tbl i43 +(10 rows) + +--Testcase 282: +select * from + int4_tbl as i41, + lateral + (select 1 as x from + (select i41.f1 as lat, + i42.f1 as loc from + int8_tbl as i81, int4_tbl as i42) as ss1 + right join int4_tbl as i43 on (i43.f1 > 1) + where ss1.loc = ss1.lat) as ss2 +where i41.f1 > 0; + f1 | x +------------+--- + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 +(20 rows) + +-- +-- test the corner cases FULL JOIN ON TRUE and FULL JOIN ON FALSE +-- +--Testcase 283: +select * from int4_tbl a full join int4_tbl b on true; + f1 | f1 +-------------+------------- + 0 | 0 + 0 | 123456 + 0 | -123456 + 0 | 2147483647 + 0 | -2147483647 + 123456 | 0 + 123456 | 123456 + 123456 | -123456 + 123456 | 2147483647 + 123456 | -2147483647 + -123456 | 0 + -123456 | 123456 + -123456 | -123456 + -123456 | 2147483647 + -123456 | -2147483647 + 2147483647 | 0 + 2147483647 | 123456 + 2147483647 | -123456 + 2147483647 | 2147483647 + 2147483647 | -2147483647 + -2147483647 | 0 + -2147483647 | 123456 + -2147483647 | -123456 + -2147483647 | 2147483647 + -2147483647 | -2147483647 +(25 rows) + +--Testcase 284: +select * from int4_tbl a full join int4_tbl b on false; + f1 | f1 +-------------+------------- + | 0 + | 123456 + | -123456 + | 2147483647 + | -2147483647 + 0 | + 123456 | + -123456 | + 2147483647 | + -2147483647 | +(10 rows) + +-- +-- test for ability to use a cartesian join when necessary +-- +--Testcase 285: +create foreign table q1 (q1 int) server influxdb_svr; +--Testcase 286: +create foreign table q2 (q2 int) server influxdb_svr; +--Testcase 287: +explain (costs off) +select * from + tenk1 join int4_tbl on f1 = twothousand, + q1, q2 +where q1 = thousand or q2 = thousand; + QUERY PLAN +----------------------------------------------------------------------------- + Hash Join + Hash Cond: (tenk1.twothousand = int4_tbl.f1) + -> Nested Loop + Join Filter: ((q1.q1 = tenk1.thousand) OR (q2.q2 = tenk1.thousand)) + -> Nested Loop + -> Foreign Scan on q1 + -> Materialize + -> Foreign Scan on tenk1 + -> Materialize + -> Foreign Scan on q2 + -> Hash + -> Foreign Scan on int4_tbl +(12 rows) + +--Testcase 288: +explain (costs off) +select * from + tenk1 join int4_tbl on f1 = twothousand, + q1, q2 +where thousand = (q1 + q2); + QUERY PLAN +------------------------------------------------------------ + Merge Join + Merge Cond: (tenk1.thousand = ((q1.q1 + q2.q2))) + -> Sort + Sort Key: tenk1.thousand + -> Hash Join + Hash Cond: (int4_tbl.f1 = tenk1.twothousand) + -> Foreign Scan on int4_tbl + -> Hash + -> Foreign Scan on tenk1 + -> Materialize + -> Sort + Sort Key: ((q1.q1 + q2.q2)) + -> Nested Loop + -> Foreign Scan on q1 + -> Materialize + -> Foreign Scan on q2 +(16 rows) + +-- +-- test ability to generate a suitable plan for a star-schema query +-- +--Testcase 289: +explain (costs off) +select * from + tenk1, int8_tbl a, int8_tbl b +where thousand = a.q1 and tenthous = b.q1 and a.q2 = 1 and b.q2 = 2; + QUERY PLAN +---------------------------------------------- + Hash Join + Hash Cond: (tenk1.tenthous = b.q1) + -> Hash Join + Hash Cond: (tenk1.thousand = a.q1) + -> Foreign Scan on tenk1 + -> Hash + -> Foreign Scan on int8_tbl a + -> Hash + -> Foreign Scan on int8_tbl b +(9 rows) + +-- +-- test a corner case in which we shouldn't apply the star-schema optimization +-- +--Testcase 290: +explain (costs off) +select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (select 1,0 from onerow) v1(x1,x2) + left join (select 3,1 from onerow) v2(y1,y2) + on v1.x1 = v2.y2) subq1 + on (i1.f1 = subq1.x2) + on (t1.unique2 = subq1.d1) + left join tenk1 t2 + on (subq1.y1 = t2.unique1) +where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; + QUERY PLAN +--------------------------------------------------------------------------- + Nested Loop + -> Nested Loop + Join Filter: ((t1.stringu1 > t2.stringu2) AND ((3) = t2.unique1)) + -> Nested Loop + Join Filter: ((11) = t1.unique2) + -> Nested Loop + -> Seq Scan on onerow + -> Seq Scan on onerow onerow_1 + -> Foreign Scan on tenk1 t1 + -> Foreign Scan on tenk1 t2 + -> Foreign Scan on int4_tbl i1 +(11 rows) + +--Testcase 291: +select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (select 1,0 from onerow) v1(x1,x2) + left join (select 3,1 from onerow) v2(y1,y2) + on v1.x1 = v2.y2) subq1 + on (i1.f1 = subq1.x2) + on (t1.unique2 = subq1.d1) + left join tenk1 t2 + on (subq1.y1 = t2.unique1) +where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; + unique2 | stringu1 | unique1 | stringu2 +---------+----------+---------+---------- + 11 | WFAAAA | 3 | LKIAAA +(1 row) + +-- variant that isn't quite a star-schema case +--Testcase 292: +select ss1.d1 from + tenk1 as t1 + inner join tenk1 as t2 + on t1.tenthous = t2.ten + inner join + int8_tbl as i8 + left join int4_tbl as i4 + inner join (select 64::information_schema.cardinal_number as d1 + from tenk1 t3, + lateral (select abs(t3.unique1) + random()) ss0(x) + where t3.fivethous < 0) as ss1 + on i4.f1 = ss1.d1 + on i8.q1 = i4.f1 + on t1.tenthous = ss1.d1 +where t1.unique1 < i4.f1; + d1 +---- +(0 rows) + +-- this variant is foldable by the remove-useless-RESULT-RTEs code +--Testcase 293: +explain (costs off) +select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (values(1,0)) v1(x1,x2) + left join (values(3,1)) v2(y1,y2) + on v1.x1 = v2.y2) subq1 + on (i1.f1 = subq1.x2) + on (t1.unique2 = subq1.d1) + left join tenk1 t2 + on (subq1.y1 = t2.unique1) +where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; + QUERY PLAN +----------------------------------------------------- + Hash Join + Hash Cond: (t2.unique1 = (3)) + Join Filter: (t1.stringu1 > t2.stringu2) + -> Foreign Scan on tenk1 t2 + -> Hash + -> Hash Join + Hash Cond: (t1.unique2 = (11)) + -> Foreign Scan on tenk1 t1 + -> Hash + -> Foreign Scan on int4_tbl i1 +(10 rows) + +--Testcase 294: +select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (values(1,0)) v1(x1,x2) + left join (values(3,1)) v2(y1,y2) + on v1.x1 = v2.y2) subq1 + on (i1.f1 = subq1.x2) + on (t1.unique2 = subq1.d1) + left join tenk1 t2 + on (subq1.y1 = t2.unique1) +where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; + unique2 | stringu1 | unique1 | stringu2 +---------+----------+---------+---------- + 11 | WFAAAA | 3 | LKIAAA +(1 row) + +-- Here's a variant that we can't fold too aggressively, though, +-- or we end up with noplace to evaluate the lateral PHV +--Testcase 295: +explain (verbose, costs off) +select * from + (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), + lateral (select ss2.y as z limit 1) ss3; + QUERY PLAN +--------------------------- + Nested Loop + Output: 1, (2), ((2)) + -> Result + Output: 2 + -> Limit + Output: ((2)) + -> Result + Output: (2) +(8 rows) + +--Testcase 296: +select * from + (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), + lateral (select ss2.y as z limit 1) ss3; + x | y | z +---+---+--- + 1 | 2 | 2 +(1 row) + +-- Test proper handling of appendrel PHVs during useless-RTE removal +--Testcase 297: +explain (costs off) +select * from + (select 0 as z) as t1 + left join + (select true as a) as t2 + on true, + lateral (select true as b + union all + select a as b) as t3 +where b; + QUERY PLAN +--------------------------------------- + Nested Loop + -> Result + -> Append + -> Result + -> Result + One-Time Filter: (true) +(6 rows) + +--Testcase 298: +select * from + (select 0 as z) as t1 + left join + (select true as a) as t2 + on true, + lateral (select true as b + union all + select a as b) as t3 +where b; + z | a | b +---+---+--- + 0 | t | t + 0 | t | t +(2 rows) + +-- +-- test inlining of immutable functions +-- +--Testcase 299: +create function f_immutable_int4(i integer) returns integer as +$$ begin return i; end; $$ language plpgsql immutable; +-- check optimization of function scan with join +--Testcase 300: +explain (costs off) +select unique1 from tenk1, (select * from f_immutable_int4(1) x) x +where x = unique1; + QUERY PLAN +----------------------- + Foreign Scan on tenk1 +(1 row) + +--Testcase 301: +explain (verbose, costs off) +select unique1, x.* +from tenk1, (select *, random() from f_immutable_int4(1) x) x +where x = unique1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Join + Output: tenk1.unique1, (1), (random()) + Hash Cond: (tenk1.unique1 = (1)) + -> Foreign Scan on public.tenk1 + Output: tenk1.unique1, tenk1.unique2, tenk1.two, tenk1.four, tenk1.ten, tenk1.twenty, tenk1.hundred, tenk1.thousand, tenk1.twothousand, tenk1.fivethous, tenk1.tenthous, tenk1.odd, tenk1.even, tenk1.stringu1, tenk1.stringu2, tenk1.string4 + InfluxDB query: SELECT "unique1" FROM "tenk" + -> Hash + Output: (1), (random()) + -> Result + Output: 1, random() +(10 rows) + +--Testcase 302: +explain (costs off) +select unique1 from tenk1, f_immutable_int4(1) x where x = unique1; + QUERY PLAN +----------------------- + Foreign Scan on tenk1 +(1 row) + +--Testcase 303: +explain (costs off) +select unique1 from tenk1, lateral f_immutable_int4(1) x where x = unique1; + QUERY PLAN +----------------------- + Foreign Scan on tenk1 +(1 row) + +--Testcase 569: +explain (costs off) +select unique1 from tenk1, lateral f_immutable_int4(1) x where x in (select 17); + QUERY PLAN +-------------------------- + Result + One-Time Filter: false +(2 rows) + +--Testcase 304: +explain (costs off) +select unique1, x from tenk1 join f_immutable_int4(1) x on unique1 = x; + QUERY PLAN +----------------------- + Foreign Scan on tenk1 +(1 row) + +--Testcase 305: +explain (costs off) +select unique1, x from tenk1 left join f_immutable_int4(1) x on unique1 = x; + QUERY PLAN +------------------------------------ + Nested Loop Left Join + Join Filter: (tenk1.unique1 = 1) + -> Foreign Scan on tenk1 + -> Materialize + -> Result +(5 rows) + +--Testcase 306: +explain (costs off) +select unique1, x from tenk1 right join f_immutable_int4(1) x on unique1 = x; + QUERY PLAN +----------------------------- + Nested Loop Left Join + -> Result + -> Foreign Scan on tenk1 +(3 rows) + +--Testcase 307: +explain (costs off) +select unique1, x from tenk1 full join f_immutable_int4(1) x on unique1 = x; + QUERY PLAN +------------------------------------ + Hash Full Join + Hash Cond: (tenk1.unique1 = (1)) + -> Foreign Scan on tenk1 + -> Hash + -> Result +(5 rows) + +-- check that pullup of a const function allows further const-folding +--Testcase 308: +explain (costs off) +select unique1 from tenk1, f_immutable_int4(1) x where x = 42; + QUERY PLAN +-------------------------- + Result + One-Time Filter: false +(2 rows) + +-- test inlining of immutable functions with PlaceHolderVars +--Testcase 309: +explain (costs off) +select nt3.id +from nt3 as nt3 + left join + (select nt2.*, (nt2.b1 or i4 = 42) AS b3 + from nt2 as nt2 + left join + f_immutable_int4(0) i4 + on i4 = nt2.nt1_id + ) as ss2 + on ss2.id = nt3.nt2_id +where nt3.id = 1 and ss2.b3; + QUERY PLAN +--------------------------------------- + Hash Right Join + Hash Cond: (nt2.id = nt3.nt2_id) + Filter: ((nt2.b1 OR ((0) = 42))) + -> Nested Loop Left Join + Join Filter: (0 = nt2.nt1_id) + -> Foreign Scan on nt2 + -> Materialize + -> Result + -> Hash + -> Foreign Scan on nt3 +(10 rows) + +--Testcase 310: +drop function f_immutable_int4(int); +-- test inlining when function returns composite +--Testcase 311: +create function mki8(bigint, bigint) returns int8_tbl as +$$select row($1,$2)::int8_tbl$$ language sql; +--Testcase 312: +create function mki4(int) returns int4_tbl as +$$select row($1)::int4_tbl$$ language sql; +--Testcase 313: +explain (verbose, costs off) +select * from mki8(1,2); + QUERY PLAN +------------------------------------ + Function Scan on mki8 + Output: q1, q2 + Function Call: '(1,2)'::int8_tbl +(3 rows) + +--Testcase 314: +select * from mki8(1,2); + q1 | q2 +----+---- + 1 | 2 +(1 row) + +--Testcase 315: +explain (verbose, costs off) +select * from mki4(42); + QUERY PLAN +----------------------------------- + Function Scan on mki4 + Output: f1 + Function Call: '(42)'::int4_tbl +(3 rows) + +--Testcase 316: +select * from mki4(42); + f1 +---- + 42 +(1 row) + +--Testcase 317: +drop function mki8(bigint, bigint); +--Testcase 318: +drop function mki4(int); +-- +-- test extraction of restriction OR clauses from join OR clause +-- (we used to only do this for indexable clauses) +-- +--Testcase 319: +explain (costs off) +select * from tenk1 a join tenk1 b on + (a.unique1 = 1 and b.unique1 = 2) or (a.unique2 = 3 and b.hundred = 4); + QUERY PLAN +------------------------------------------------------------------------------------------------- + Nested Loop + Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR ((a.unique2 = 3) AND (b.hundred = 4))) + -> Foreign Scan on tenk1 a + -> Materialize + -> Foreign Scan on tenk1 b +(5 rows) + +--Testcase 320: +explain (costs off) +select * from tenk1 a join tenk1 b on + (a.unique1 = 1 and b.unique1 = 2) or (a.unique2 = 3 and b.ten = 4); + QUERY PLAN +--------------------------------------------------------------------------------------------- + Nested Loop + Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR ((a.unique2 = 3) AND (b.ten = 4))) + -> Foreign Scan on tenk1 a + -> Materialize + -> Foreign Scan on tenk1 b +(5 rows) + +--Testcase 321: +explain (costs off) +select * from tenk1 a join tenk1 b on + (a.unique1 = 1 and b.unique1 = 2) or + ((a.unique2 = 3 or a.unique2 = 7) and b.hundred = 4); + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------- + Nested Loop + Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR (((a.unique2 = 3) OR (a.unique2 = 7)) AND (b.hundred = 4))) + -> Foreign Scan on tenk1 a + -> Materialize + -> Foreign Scan on tenk1 b +(5 rows) + +-- +-- test placement of movable quals in a parameterized join tree +-- +--Testcase 322: +explain (costs off) +select * from tenk1 t1 left join + (tenk1 t2 join tenk1 t3 on t2.thousand = t3.unique2) + on t1.hundred = t2.hundred and t1.ten = t3.ten +where t1.unique1 = 1; + QUERY PLAN +---------------------------------------------------------------- + Hash Right Join + Hash Cond: ((t2.hundred = t1.hundred) AND (t3.ten = t1.ten)) + -> Hash Join + Hash Cond: (t2.thousand = t3.unique2) + -> Foreign Scan on tenk1 t2 + -> Hash + -> Foreign Scan on tenk1 t3 + -> Hash + -> Foreign Scan on tenk1 t1 +(9 rows) + +--Testcase 323: +explain (costs off) +select * from tenk1 t1 left join + (tenk1 t2 join tenk1 t3 on t2.thousand = t3.unique2) + on t1.hundred = t2.hundred and t1.ten + t2.ten = t3.ten +where t1.unique1 = 1; + QUERY PLAN +----------------------------------------------- + Hash Right Join + Hash Cond: (t2.hundred = t1.hundred) + Join Filter: ((t1.ten + t2.ten) = t3.ten) + -> Hash Join + Hash Cond: (t2.thousand = t3.unique2) + -> Foreign Scan on tenk1 t2 + -> Hash + -> Foreign Scan on tenk1 t3 + -> Hash + -> Foreign Scan on tenk1 t1 +(10 rows) + +--Testcase 324: +explain (costs off) +select count(*) from + tenk1 a join tenk1 b on a.unique1 = b.unique2 + left join tenk1 c on a.unique2 = b.unique1 and c.thousand = a.thousand + join int4_tbl on b.thousand = f1; + QUERY PLAN +--------------------------------------------------------------------- + Aggregate + -> Merge Join + Merge Cond: (int4_tbl.f1 = b.thousand) + -> Sort + Sort Key: int4_tbl.f1 + -> Foreign Scan on int4_tbl + -> Sort + Sort Key: b.thousand + -> Merge Left Join + Merge Cond: (a.thousand = c.thousand) + Join Filter: (a.unique2 = b.unique1) + -> Sort + Sort Key: a.thousand + -> Merge Join + Merge Cond: (a.unique1 = b.unique2) + -> Sort + Sort Key: a.unique1 + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: b.unique2 + -> Foreign Scan on tenk1 b + -> Sort + Sort Key: c.thousand + -> Foreign Scan on tenk1 c +(24 rows) + +--Testcase 325: +select count(*) from + tenk1 a join tenk1 b on a.unique1 = b.unique2 + left join tenk1 c on a.unique2 = b.unique1 and c.thousand = a.thousand + join int4_tbl on b.thousand = f1; + count +------- + 10 +(1 row) + +--Testcase 326: +explain (costs off) +select b.unique1 from + tenk1 a join tenk1 b on a.unique1 = b.unique2 + left join tenk1 c on b.unique1 = 42 and c.thousand = a.thousand + join int4_tbl i1 on b.thousand = f1 + right join int4_tbl i2 on i2.f1 = b.tenthous + order by 1; + QUERY PLAN +--------------------------------------------------------------------------------------- + Sort + Sort Key: b.unique1 + -> Merge Left Join + Merge Cond: (i2.f1 = b.tenthous) + -> Sort + Sort Key: i2.f1 + -> Foreign Scan on int4_tbl i2 + -> Materialize + -> Sort + Sort Key: b.tenthous + -> Merge Join + Merge Cond: (i1.f1 = b.thousand) + -> Sort + Sort Key: i1.f1 + -> Foreign Scan on int4_tbl i1 + -> Sort + Sort Key: b.thousand + -> Merge Left Join + Merge Cond: (a.thousand = c.thousand) + Join Filter: (b.unique1 = 42) + -> Sort + Sort Key: a.thousand + -> Merge Join + Merge Cond: (b.unique2 = a.unique1) + -> Sort + Sort Key: b.unique2 + -> Foreign Scan on tenk1 b + -> Sort + Sort Key: a.unique1 + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: c.thousand + -> Foreign Scan on tenk1 c +(33 rows) + +--Testcase 327: +select b.unique1 from + tenk1 a join tenk1 b on a.unique1 = b.unique2 + left join tenk1 c on b.unique1 = 42 and c.thousand = a.thousand + join int4_tbl i1 on b.thousand = f1 + right join int4_tbl i2 on i2.f1 = b.tenthous + order by 1; + unique1 +--------- + 0 + + + + +(5 rows) + +--Testcase 328: +explain (costs off) +select * from +( + select unique1, q1, coalesce(unique1, -1) + q1 as fault + from int8_tbl left join tenk1 on (q2 = unique2) +) ss +where fault = 122 +order by fault; + QUERY PLAN +-------------------------------------------------------------------------- + Merge Left Join + Merge Cond: (int8_tbl.q2 = tenk1.unique2) + Filter: ((COALESCE(tenk1.unique1, '-1'::integer) + int8_tbl.q1) = 122) + -> Sort + Sort Key: int8_tbl.q2 + -> Foreign Scan on int8_tbl + -> Sort + Sort Key: tenk1.unique2 + -> Foreign Scan on tenk1 +(9 rows) + +--Testcase 329: +select * from +( + select unique1, q1, coalesce(unique1, -1) + q1 as fault + from int8_tbl left join tenk1 on (q2 = unique2) +) ss +where fault = 122 +order by fault; + unique1 | q1 | fault +---------+-----+------- + | 123 | 122 +(1 row) + +--Testcase 330: +explain (costs off) +select * from +(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) +left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x +left join unnest(v1ys) as u1(u1y) on u1y = v2y; + QUERY PLAN +------------------------------------------------------------- + Nested Loop Left Join + -> Values Scan on "*VALUES*" + -> Hash Right Join + Hash Cond: (u1.u1y = "*VALUES*_1".column2) + Filter: ("*VALUES*_1".column1 = "*VALUES*".column1) + -> Function Scan on unnest u1 + -> Hash + -> Values Scan on "*VALUES*_1" +(8 rows) + +--Testcase 331: +select * from +(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) +left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x +left join unnest(v1ys) as u1(u1y) on u1y = v2y; + v1x | v1ys | v2x | v2y | u1y +-----+---------+-----+-----+----- + 1 | {10,20} | 1 | 10 | 10 + 2 | {20,30} | 2 | 20 | 20 +(2 rows) + +-- +-- test handling of potential equivalence clauses above outer joins +-- +--Testcase 332: +explain (costs off) +select q1, unique2, thousand, hundred + from int8_tbl a left join tenk1 b on q1 = unique2 + where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123); + QUERY PLAN +-------------------------------------------------------------------------------------- + Merge Right Join + Merge Cond: (b.unique2 = a.q1) + Filter: ((COALESCE(b.thousand, 123) = a.q1) AND (a.q1 = COALESCE(b.hundred, 123))) + -> Sort + Sort Key: b.unique2 + -> Foreign Scan on tenk1 b + -> Sort + Sort Key: a.q1 + -> Foreign Scan on int8_tbl a +(9 rows) + +--Testcase 333: +select q1, unique2, thousand, hundred + from int8_tbl a left join tenk1 b on q1 = unique2 + where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123); + q1 | unique2 | thousand | hundred +----+---------+----------+--------- +(0 rows) + +--Testcase 334: +explain (costs off) +select f1, unique2, case when unique2 is null then f1 else 0 end + from int4_tbl a left join tenk1 b on f1 = unique2 + where (case when unique2 is null then f1 else 0 end) = 0; + QUERY PLAN +-------------------------------------------------------------------- + Merge Left Join + Merge Cond: (a.f1 = b.unique2) + Filter: (CASE WHEN (b.unique2 IS NULL) THEN a.f1 ELSE 0 END = 0) + -> Sort + Sort Key: a.f1 + -> Foreign Scan on int4_tbl a + -> Sort + Sort Key: b.unique2 + -> Foreign Scan on tenk1 b +(9 rows) + +--Testcase 335: +select f1, unique2, case when unique2 is null then f1 else 0 end + from int4_tbl a left join tenk1 b on f1 = unique2 + where (case when unique2 is null then f1 else 0 end) = 0; + f1 | unique2 | case +----+---------+------ + 0 | 0 | 0 +(1 row) + +-- +-- another case with equivalence clauses above outer joins (bug #8591) +-- +--Testcase 336: +explain (costs off) +select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand) + from tenk1 a left join tenk1 b on b.thousand = a.unique1 left join tenk1 c on c.unique2 = coalesce(b.twothousand, a.twothousand) + where a.unique2 < 10 and coalesce(b.twothousand, a.twothousand) = 44; + QUERY PLAN +------------------------------------------------------------------- + Hash Left Join + Hash Cond: (COALESCE(b.twothousand, a.twothousand) = c.unique2) + -> Merge Left Join + Merge Cond: (a.unique1 = b.thousand) + Filter: (COALESCE(b.twothousand, a.twothousand) = 44) + -> Sort + Sort Key: a.unique1 + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: b.thousand + -> Foreign Scan on tenk1 b + -> Hash + -> Foreign Scan on tenk1 c +(13 rows) + +--Testcase 337: +select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand) + from tenk1 a left join tenk1 b on b.thousand = a.unique1 left join tenk1 c on c.unique2 = coalesce(b.twothousand, a.twothousand) + where a.unique2 < 10 and coalesce(b.twothousand, a.twothousand) = 44; + unique1 | unique1 | unique1 | coalesce +---------+---------+---------+---------- +(0 rows) + +-- +-- check handling of join aliases when flattening multiple levels of subquery +-- +--Testcase 338: +explain (verbose, costs off) +select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from + (values (0),(1)) foo1(join_key) +left join + (select join_key, bug_field from + (select ss1.join_key, ss1.bug_field from + (select f1 as join_key, 666 as bug_field from int4_tbl i1) ss1 + ) foo2 + left join + (select unique2 as join_key from tenk1 i2) ss2 + using (join_key) + ) foo3 +using (join_key); + QUERY PLAN +------------------------------------------------------------------ + Merge Right Join + Output: "*VALUES*".column1, i1.f1, (666) + Merge Cond: (i1.f1 = "*VALUES*".column1) + -> Merge Left Join + Output: i1.f1, 666 + Merge Cond: (i1.f1 = i2.unique2) + -> Sort + Output: i1.f1 + Sort Key: i1.f1 + -> Foreign Scan on public.int4_tbl i1 + Output: i1.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Sort + Output: i2.unique2 + Sort Key: i2.unique2 + -> Foreign Scan on public.tenk1 i2 + Output: i2.unique2 + InfluxDB query: SELECT "unique2" FROM "tenk" + -> Sort + Output: "*VALUES*".column1 + Sort Key: "*VALUES*".column1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1 +(23 rows) + +--Testcase 339: +select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from + (values (0),(1)) foo1(join_key) +left join + (select join_key, bug_field from + (select ss1.join_key, ss1.bug_field from + (select f1 as join_key, 666 as bug_field from int4_tbl i1) ss1 + ) foo2 + left join + (select unique2 as join_key from tenk1 i2) ss2 + using (join_key) + ) foo3 +using (join_key); + foo1_id | foo3_id | bug_field +---------+---------+----------- + 0 | 0 | 666 + 1 | | +(2 rows) + +-- +-- test successful handling of nested outer joins with degenerate join quals +-- +--Testcase 340: +create foreign table text_tbl(f1 text) server influxdb_svr; +--Testcase 341: +explain (verbose, costs off) +select t1.* from + text_tbl t1 + left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 + left join int8_tbl i8 + left join (select *, null::int as d2 from int8_tbl i8b2) b2 + on (i8.q1 = b2.q1) + on (b2.d2 = b1.q2) + on (t1.f1 = b1.d1) + left join int4_tbl i4 + on (i8.q2 = i4.f1); + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Merge Right Join + Output: t1.f1 + Merge Cond: (i4.f1 = i8.q2) + -> Sort + Output: i4.f1 + Sort Key: i4.f1 + -> Foreign Scan on public.int4_tbl i4 + Output: i4.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Materialize + Output: t1.f1, i8.q2 + -> Sort + Output: t1.f1, i8.q2 + Sort Key: i8.q2 + -> Nested Loop Left Join + Output: t1.f1, i8.q2 + Join Filter: (t1.f1 = '***'::text) + -> Foreign Scan on public.text_tbl t1 + Output: t1.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" + -> Materialize + Output: i8.q2 + -> Merge Left Join + Output: i8.q2 + Merge Cond: (i8b1.q2 = (NULL::integer)) + -> Sort + Output: i8b1.q2 + Sort Key: i8b1.q2 + -> Foreign Scan on public.int8_tbl i8b1 + Output: i8b1.q2 + InfluxDB query: SELECT "q2" FROM "int8_tbl" + -> Sort + Output: i8.q2, (NULL::integer) + Sort Key: (NULL::integer) + -> Merge Join + Output: i8.q2, (NULL::integer) + Merge Cond: (i8.q1 = i8b2.q1) + -> Sort + Output: i8.q1, i8.q2 + Sort Key: i8.q1 + -> Foreign Scan on public.int8_tbl i8 + Output: i8.q1, i8.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Sort + Output: i8b2.q1, (NULL::integer) + Sort Key: i8b2.q1 + -> Foreign Scan on public.int8_tbl i8b2 + Output: i8b2.q1, NULL::integer + InfluxDB query: SELECT "q1" FROM "int8_tbl" +(49 rows) + +--Testcase 342: +select t1.* from + text_tbl t1 + left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 + left join int8_tbl i8 + left join (select *, null::int as d2 from int8_tbl i8b2) b2 + on (i8.q1 = b2.q1) + on (b2.d2 = b1.q2) + on (t1.f1 = b1.d1) + left join int4_tbl i4 + on (i8.q2 = i4.f1); + f1 +------------------- + doh! + hi de ho neighbor +(2 rows) + +--Testcase 343: +explain (verbose, costs off) +select t1.* from + text_tbl t1 + left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 + left join int8_tbl i8 + left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2) b2 + on (i8.q1 = b2.q1) + on (b2.d2 = b1.q2) + on (t1.f1 = b1.d1) + left join int4_tbl i4 + on (i8.q2 = i4.f1); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------- + Hash Left Join + Output: t1.f1 + Hash Cond: (i8.q2 = i4.f1) + -> Nested Loop Left Join + Output: t1.f1, i8.q2 + Join Filter: (t1.f1 = '***'::text) + -> Foreign Scan on public.text_tbl t1 + Output: t1.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" + -> Materialize + Output: i8.q2 + -> Merge Left Join + Output: i8.q2 + Merge Cond: (i8b1.q2 = (NULL::integer)) + -> Sort + Output: i8b1.q2 + Sort Key: i8b1.q2 + -> Foreign Scan on public.int8_tbl i8b1 + Output: i8b1.q2 + InfluxDB query: SELECT "q2" FROM "int8_tbl" + -> Materialize + Output: i8.q2, (NULL::integer) + -> Sort + Output: i8.q2, (NULL::integer) + Sort Key: (NULL::integer) + -> Merge Left Join + Output: i8.q2, (NULL::integer) + Merge Cond: (i8.q1 = i8b2.q1) + -> Sort + Output: i8.q1, i8.q2 + Sort Key: i8.q1 + -> Foreign Scan on public.int8_tbl i8 + Output: i8.q1, i8.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Materialize + Output: i8b2.q1, (NULL::integer) + -> Sort + Output: i8b2.q1, (NULL::integer) + Sort Key: i8b2.q1 + -> Nested Loop + Output: i8b2.q1, NULL::integer + -> Foreign Scan on public.int4_tbl i4b2 + Output: i4b2.f1 + InfluxDB query: SELECT * FROM "int4_tbl" + -> Materialize + Output: i8b2.q1 + -> Foreign Scan on public.int8_tbl i8b2 + Output: i8b2.q1 + InfluxDB query: SELECT "q1" FROM "int8_tbl" + -> Hash + Output: i4.f1 + -> Foreign Scan on public.int4_tbl i4 + Output: i4.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" +(54 rows) + +--Testcase 344: +select t1.* from + text_tbl t1 + left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 + left join int8_tbl i8 + left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2) b2 + on (i8.q1 = b2.q1) + on (b2.d2 = b1.q2) + on (t1.f1 = b1.d1) + left join int4_tbl i4 + on (i8.q2 = i4.f1); + f1 +------------------- + doh! + hi de ho neighbor +(2 rows) + +--Testcase 345: +explain (verbose, costs off) +select t1.* from + text_tbl t1 + left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 + left join int8_tbl i8 + left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2 + where q1 = f1) b2 + on (i8.q1 = b2.q1) + on (b2.d2 = b1.q2) + on (t1.f1 = b1.d1) + left join int4_tbl i4 + on (i8.q2 = i4.f1); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------- + Merge Right Join + Output: t1.f1 + Merge Cond: (i4.f1 = i8.q2) + -> Sort + Output: i4.f1 + Sort Key: i4.f1 + -> Foreign Scan on public.int4_tbl i4 + Output: i4.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Materialize + Output: t1.f1, i8.q2 + -> Sort + Output: t1.f1, i8.q2 + Sort Key: i8.q2 + -> Nested Loop Left Join + Output: t1.f1, i8.q2 + Join Filter: (t1.f1 = '***'::text) + -> Foreign Scan on public.text_tbl t1 + Output: t1.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" + -> Materialize + Output: i8.q2 + -> Merge Left Join + Output: i8.q2 + Merge Cond: (i8b1.q2 = (NULL::integer)) + -> Sort + Output: i8b1.q2 + Sort Key: i8b1.q2 + -> Foreign Scan on public.int8_tbl i8b1 + Output: i8b1.q2 + InfluxDB query: SELECT "q2" FROM "int8_tbl" + -> Materialize + Output: i8.q2, (NULL::integer) + -> Sort + Output: i8.q2, (NULL::integer) + Sort Key: (NULL::integer) + -> Merge Left Join + Output: i8.q2, (NULL::integer) + Merge Cond: (i8.q1 = i8b2.q1) + -> Sort + Output: i8.q1, i8.q2 + Sort Key: i8.q1 + -> Foreign Scan on public.int8_tbl i8 + Output: i8.q1, i8.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Materialize + Output: i8b2.q1, (NULL::integer) + -> Merge Join + Output: i8b2.q1, NULL::integer + Merge Cond: (i8b2.q1 = i4b2.f1) + -> Sort + Output: i8b2.q1 + Sort Key: i8b2.q1 + -> Foreign Scan on public.int8_tbl i8b2 + Output: i8b2.q1 + InfluxDB query: SELECT "q1" FROM "int8_tbl" + -> Sort + Output: i4b2.f1 + Sort Key: i4b2.f1 + -> Foreign Scan on public.int4_tbl i4b2 + Output: i4b2.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" +(62 rows) + +--Testcase 346: +select t1.* from + text_tbl t1 + left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 + left join int8_tbl i8 + left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2 + where q1 = f1) b2 + on (i8.q1 = b2.q1) + on (b2.d2 = b1.q2) + on (t1.f1 = b1.d1) + left join int4_tbl i4 + on (i8.q2 = i4.f1); + f1 +------------------- + doh! + hi de ho neighbor +(2 rows) + +--Testcase 347: +explain (verbose, costs off) +select * from + text_tbl t1 + inner join int8_tbl i8 + on i8.q2 = 456 + right join text_tbl t2 + on t1.f1 = 'doh!' + left join int4_tbl i4 + on i8.q1 = i4.f1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------- + Nested Loop Left Join + Output: t1.f1, i8.q1, i8.q2, t2.f1, i4.f1 + -> Foreign Scan on public.text_tbl t2 + Output: t2.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" + -> Materialize + Output: i8.q1, i8.q2, i4.f1, t1.f1 + -> Nested Loop + Output: i8.q1, i8.q2, i4.f1, t1.f1 + -> Hash Right Join + Output: i8.q1, i8.q2, i4.f1 + Hash Cond: (i4.f1 = i8.q1) + -> Foreign Scan on public.int4_tbl i4 + Output: i4.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Hash + Output: i8.q1, i8.q2 + -> Foreign Scan on public.int8_tbl i8 + Output: i8.q1, i8.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (("q2" = 456)) + -> Materialize + Output: t1.f1 + -> Foreign Scan on public.text_tbl t1 + Output: t1.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" WHERE (("f1" = 'doh!')) +(25 rows) + +--Testcase 348: +select * from + text_tbl t1 + inner join int8_tbl i8 + on i8.q2 = 456 + right join text_tbl t2 + on t1.f1 = 'doh!' + left join int4_tbl i4 + on i8.q1 = i4.f1; + f1 | q1 | q2 | f1 | f1 +------+-----+-----+-------------------+---- + doh! | 123 | 456 | doh! | + doh! | 123 | 456 | hi de ho neighbor | +(2 rows) + +-- +-- test for appropriate join order in the presence of lateral references +-- +--Testcase 349: +explain (verbose, costs off) +select * from + text_tbl t1 + left join int8_tbl i8 + on i8.q2 = 123, + lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss +where t1.f1 = ss.f1; + QUERY PLAN +-------------------------------------------------------------------------------------------- + Nested Loop + Output: t1.f1, i8.q1, i8.q2, (i8.q1), t2.f1 + Join Filter: (t1.f1 = t2.f1) + -> Nested Loop Left Join + Output: t1.f1, i8.q1, i8.q2 + -> Foreign Scan on public.text_tbl t1 + Output: t1.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" + -> Materialize + Output: i8.q1, i8.q2 + -> Foreign Scan on public.int8_tbl i8 + Output: i8.q1, i8.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (("q2" = 123)) + -> Foreign Scan on public.text_tbl t2 + Output: i8.q1, t2.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" LIMIT 1 +(16 rows) + +--Testcase 350: +select * from + text_tbl t1 + left join int8_tbl i8 + on i8.q2 = 123, + lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss +where t1.f1 = ss.f1; + f1 | q1 | q2 | q1 | f1 +------+------------------+-----+------------------+------ + doh! | 4567890123456789 | 123 | 4567890123456789 | doh! +(1 row) + +--Testcase 351: +explain (verbose, costs off) +select * from + text_tbl t1 + left join int8_tbl i8 + on i8.q2 = 123, + lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss1, + lateral (select ss1.* from text_tbl t3 limit 1) as ss2 +where t1.f1 = ss2.f1; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Nested Loop + Output: t1.f1, i8.q1, i8.q2, (i8.q1), t2.f1, ((i8.q1)), (t2.f1) + Join Filter: (t1.f1 = (t2.f1)) + -> Nested Loop + Output: t1.f1, i8.q1, i8.q2, (i8.q1), t2.f1 + -> Nested Loop Left Join + Output: t1.f1, i8.q1, i8.q2 + -> Foreign Scan on public.text_tbl t1 + Output: t1.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" + -> Materialize + Output: i8.q1, i8.q2 + -> Foreign Scan on public.int8_tbl i8 + Output: i8.q1, i8.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (("q2" = 123)) + -> Foreign Scan on public.text_tbl t2 + Output: i8.q1, t2.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" LIMIT 1 + -> Foreign Scan on public.text_tbl t3 + Output: (i8.q1), t2.f1 + InfluxDB query: SELECT * FROM "text_tbl" LIMIT 1 +(21 rows) + +--Testcase 352: +select * from + text_tbl t1 + left join int8_tbl i8 + on i8.q2 = 123, + lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss1, + lateral (select ss1.* from text_tbl t3 limit 1) as ss2 +where t1.f1 = ss2.f1; + f1 | q1 | q2 | q1 | f1 | q1 | f1 +------+------------------+-----+------------------+------+------------------+------ + doh! | 4567890123456789 | 123 | 4567890123456789 | doh! | 4567890123456789 | doh! +(1 row) + +--Testcase 353: +explain (verbose, costs off) +select 1 from + text_tbl as tt1 + inner join text_tbl as tt2 on (tt1.f1 = 'foo') + left join text_tbl as tt3 on (tt3.f1 = 'foo') + left join text_tbl as tt4 on (tt3.f1 = tt4.f1), + lateral (select tt4.f1 as c0 from text_tbl as tt5 limit 1) as ss1 +where tt1.f1 = ss1.c0; + QUERY PLAN +---------------------------------------------------------------------------------------------- + Nested Loop + Output: 1 + -> Nested Loop Left Join + Output: tt1.f1, tt4.f1 + -> Nested Loop + Output: tt1.f1 + -> Foreign Scan on public.text_tbl tt2 + Output: tt2.f1 + InfluxDB query: SELECT * FROM "text_tbl" + -> Materialize + Output: tt1.f1 + -> Foreign Scan on public.text_tbl tt1 + Output: tt1.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" WHERE (("f1" = 'foo')) + -> Hash Left Join + Output: tt4.f1 + Hash Cond: (tt3.f1 = tt4.f1) + -> Foreign Scan on public.text_tbl tt3 + Output: tt3.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" WHERE (("f1" = 'foo')) + -> Hash + Output: tt4.f1 + -> Foreign Scan on public.text_tbl tt4 + Output: tt4.f1 + InfluxDB query: SELECT "f1" FROM "text_tbl" WHERE (("f1" = 'foo')) + -> Subquery Scan on ss1 + Output: ss1.c0 + Filter: (ss1.c0 = 'foo'::text) + -> Foreign Scan on public.text_tbl tt5 + Output: tt4.f1 + InfluxDB query: SELECT * FROM "text_tbl" LIMIT 1 +(31 rows) + +--Testcase 354: +select 1 from + text_tbl as tt1 + inner join text_tbl as tt2 on (tt1.f1 = 'foo') + left join text_tbl as tt3 on (tt3.f1 = 'foo') + left join text_tbl as tt4 on (tt3.f1 = tt4.f1), + lateral (select tt4.f1 as c0 from text_tbl as tt5 limit 1) as ss1 +where tt1.f1 = ss1.c0; + ?column? +---------- +(0 rows) + +-- +-- check a case in which a PlaceHolderVar forces join order +-- +--Testcase 355: +explain (verbose, costs off) +select ss2.* from + int4_tbl i41 + left join int8_tbl i8 + join (select i42.f1 as c1, i43.f1 as c2, 42 as c3 + from int4_tbl i42, int4_tbl i43) ss1 + on i8.q1 = ss1.c2 + on i41.f1 = ss1.c1, + lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 +where ss1.c2 = 0; + QUERY PLAN +------------------------------------------------------------------------------------------------ + Nested Loop + Output: (i41.f1), (i8.q1), (i8.q2), (i42.f1), (i43.f1), ((42)) + -> Nested Loop + Output: i41.f1, i42.f1, i8.q1, i8.q2, i43.f1, 42 + -> Nested Loop + Output: i41.f1, i42.f1, i8.q1, i8.q2 + -> Merge Join + Output: i41.f1, i42.f1 + Merge Cond: (i41.f1 = i42.f1) + -> Sort + Output: i41.f1 + Sort Key: i41.f1 + -> Foreign Scan on public.int4_tbl i41 + Output: i41.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Sort + Output: i42.f1 + Sort Key: i42.f1 + -> Foreign Scan on public.int4_tbl i42 + Output: i42.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Materialize + Output: i8.q1, i8.q2 + -> Foreign Scan on public.int8_tbl i8 + Output: i8.q1, i8.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (("q1" = 0)) + -> Materialize + Output: i43.f1 + -> Foreign Scan on public.int4_tbl i43 + Output: i43.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" WHERE (("f1" = 0)) + -> Foreign Scan on public.text_tbl + Output: i41.f1, i8.q1, i8.q2, i42.f1, i43.f1, (42) + InfluxDB query: SELECT * FROM "text_tbl" LIMIT 1 +(34 rows) + +--Testcase 356: +select ss2.* from + int4_tbl i41 + left join int8_tbl i8 + join (select i42.f1 as c1, i43.f1 as c2, 42 as c3 + from int4_tbl i42, int4_tbl i43) ss1 + on i8.q1 = ss1.c2 + on i41.f1 = ss1.c1, + lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 +where ss1.c2 = 0; + f1 | q1 | q2 | c1 | c2 | c3 +----+----+----+----+----+---- +(0 rows) + +-- +-- test successful handling of full join underneath left join (bug #14105) +-- +--Testcase 357: +explain (costs off) +select * from + (select 1 as id) as xx + left join + (tenk1 as a1 full join (select 1 as id) as yy on (a1.unique1 = yy.id)) + on (xx.id = coalesce(yy.id)); + QUERY PLAN +--------------------------------------- + Nested Loop Left Join + -> Result + -> Hash Full Join + Hash Cond: (a1.unique1 = (1)) + Filter: (1 = COALESCE((1))) + -> Foreign Scan on tenk1 a1 + -> Hash + -> Result +(8 rows) + +--Testcase 358: +select * from + (select 1 as id) as xx + left join + (tenk1 as a1 full join (select 1 as id) as yy on (a1.unique1 = yy.id)) + on (xx.id = coalesce(yy.id)); + id | unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 | id +----+---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------+---- + 1 | 1 | 2838 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | EFEAAA | OOOOxx | 1 +(1 row) + +-- +-- test ability to push constants through outer join clauses +-- +--Testcase 359: +explain (costs off) + select * from int4_tbl a left join tenk1 b on f1 = unique2 where f1 = 0; + QUERY PLAN +------------------------------------- + Hash Left Join + Hash Cond: (a.f1 = b.unique2) + -> Foreign Scan on int4_tbl a + -> Hash + -> Foreign Scan on tenk1 b +(5 rows) + +--Testcase 360: +explain (costs off) + select * from tenk1 a full join tenk1 b using(unique2) where unique2 = 42; + QUERY PLAN +--------------------------------------- + Merge Full Join + Merge Cond: (a.unique2 = b.unique2) + -> Sort + Sort Key: a.unique2 + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: b.unique2 + -> Foreign Scan on tenk1 b +(8 rows) + +-- +-- test that quals attached to an outer join have correct semantics, +-- specifically that they don't re-use expressions computed below the join; +-- we force a mergejoin so that coalesce(b.q1, 1) appears as a join input +-- +--Testcase 361: +set enable_hashjoin to off; +--Testcase 362: +set enable_nestloop to off; +--Testcase 363: +explain (verbose, costs off) + select a.q2, b.q1 + from int8_tbl a left join int8_tbl b on a.q2 = coalesce(b.q1, 1) + where coalesce(b.q1, 1) > 0; + QUERY PLAN +----------------------------------------------------------- + Merge Left Join + Output: a.q2, b.q1 + Merge Cond: (a.q2 = (COALESCE(b.q1, '1'::bigint))) + Filter: (COALESCE(b.q1, '1'::bigint) > 0) + -> Sort + Output: a.q2 + Sort Key: a.q2 + -> Foreign Scan on public.int8_tbl a + Output: a.q2 + InfluxDB query: SELECT "q2" FROM "int8_tbl" + -> Sort + Output: b.q1, (COALESCE(b.q1, '1'::bigint)) + Sort Key: (COALESCE(b.q1, '1'::bigint)) + -> Foreign Scan on public.int8_tbl b + Output: b.q1, COALESCE(b.q1, '1'::bigint) + InfluxDB query: SELECT "q1" FROM "int8_tbl" +(16 rows) + +--Testcase 364: +select a.q2, b.q1 + from int8_tbl a left join int8_tbl b on a.q2 = coalesce(b.q1, 1) + where coalesce(b.q1, 1) > 0; + q2 | q1 +-------------------+------------------ + -4567890123456789 | + 123 | 123 + 123 | 123 + 456 | + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 +(10 rows) + +--Testcase 365: +reset enable_hashjoin; +--Testcase 366: +reset enable_nestloop; +-- +-- test join removal +-- +begin; +--Testcase 367: +CREATE FOREIGN TABLE a (id int, b_id int) SERVER influxdb_svr; +--Testcase 368: +CREATE FOREIGN TABLE b (id int, c_id int) SERVER influxdb_svr; +--Testcase 369: +CREATE FOREIGN TABLE c (id int) SERVER influxdb_svr; +--Testcase 370: +CREATE FOREIGN TABLE d (a int, b int) SERVER influxdb_svr; +--Testcase 371: +INSERT INTO a VALUES (0, 0), (1, NULL); +--Testcase 372: +INSERT INTO b VALUES (0, 0), (1, NULL); +--Testcase 373: +INSERT INTO c VALUES (0), (1); +--Testcase 374: +INSERT INTO d VALUES (1,3), (2,2), (3,1); +-- all three cases should be optimizable into a simple seqscan +--Testcase 375: +explain (costs off) SELECT a.* FROM a LEFT JOIN b ON a.b_id = b.id; + QUERY PLAN +------------------------------- + Merge Left Join + Merge Cond: (a.b_id = b.id) + -> Sort + Sort Key: a.b_id + -> Foreign Scan on a + -> Sort + Sort Key: b.id + -> Foreign Scan on b +(8 rows) + +--Testcase 376: +explain (costs off) SELECT b.* FROM b LEFT JOIN c ON b.c_id = c.id; + QUERY PLAN +------------------------------- + Merge Left Join + Merge Cond: (b.c_id = c.id) + -> Sort + Sort Key: b.c_id + -> Foreign Scan on b + -> Sort + Sort Key: c.id + -> Foreign Scan on c +(8 rows) + +--Testcase 377: +explain (costs off) + SELECT a.* FROM a LEFT JOIN (b left join c on b.c_id = c.id) + ON (a.b_id = b.id); + QUERY PLAN +------------------------------------------- + Merge Right Join + Merge Cond: (c.id = b.c_id) + -> Sort + Sort Key: c.id + -> Foreign Scan on c + -> Sort + Sort Key: b.c_id + -> Merge Left Join + Merge Cond: (a.b_id = b.id) + -> Sort + Sort Key: a.b_id + -> Foreign Scan on a + -> Sort + Sort Key: b.id + -> Foreign Scan on b +(15 rows) + +-- check optimization of outer join within another special join +--Testcase 378: +explain (costs off) +select id from a where id in ( + select b.id from b left join c on b.id = c.id +); + QUERY PLAN +------------------------------------------------- + Hash Join + Hash Cond: (a.id = b.id) + -> Foreign Scan on a + -> Hash + -> HashAggregate + Group Key: b.id + -> Merge Left Join + Merge Cond: (b.id = c.id) + -> Sort + Sort Key: b.id + -> Foreign Scan on b + -> Sort + Sort Key: c.id + -> Foreign Scan on c +(14 rows) + +-- check that join removal works for a left join when joining a subquery +-- that is guaranteed to be unique by its GROUP BY clause +--Testcase 379: +explain (costs off) +select d.* from d left join (select * from b group by b.id, b.c_id) s + on d.a = s.id and d.b = s.c_id; + QUERY PLAN +------------------- + Foreign Scan on d +(1 row) + +-- similarly, but keying off a DISTINCT clause +--Testcase 380: +explain (costs off) +select d.* from d left join (select distinct * from b) s + on d.a = s.id and d.b = s.c_id; + QUERY PLAN +------------------- + Foreign Scan on d +(1 row) + +-- join removal is not possible when the GROUP BY contains a column that is +-- not in the join condition. (Note: as of 9.6, we notice that b.id is a +-- primary key and so drop b.c_id from the GROUP BY of the resulting plan; +-- but this happens too late for join removal in the outer plan level.) +--Testcase 381: +explain (costs off) +select d.* from d left join (select * from b group by b.id, b.c_id) s + on d.a = s.id; + QUERY PLAN +--------------------------------------------- + Hash Left Join + Hash Cond: (d.a = s.id) + -> Foreign Scan on d + -> Hash + -> Subquery Scan on s + -> HashAggregate + Group Key: b.id, b.c_id + -> Foreign Scan on b +(8 rows) + +-- similarly, but keying off a DISTINCT clause +--Testcase 382: +explain (costs off) +select d.* from d left join (select distinct * from b) s + on d.a = s.id; + QUERY PLAN +--------------------------------------------- + Hash Left Join + Hash Cond: (d.a = s.id) + -> Foreign Scan on d + -> Hash + -> Subquery Scan on s + -> HashAggregate + Group Key: b.id, b.c_id + -> Foreign Scan on b +(8 rows) + +-- check join removal works when uniqueness of the join condition is enforced +-- by a UNION +--Testcase 383: +explain (costs off) +select d.* from d left join (select id from a union select id from b) s + on d.a = s.id; + QUERY PLAN +------------------- + Foreign Scan on d +(1 row) + +-- check join removal with a cross-type comparison operator +--Testcase 384: +explain (costs off) +select i8.* from int8_tbl i8 left join (select f1 from int4_tbl group by f1) i4 + on i8.q1 = i4.f1; + QUERY PLAN +----------------------------- + Foreign Scan on int8_tbl i8 +(1 row) + +-- check join removal with lateral references +--Testcase 385: +explain (costs off) +select 1 from (select a.id FROM a left join b on a.b_id = b.id) q, + lateral generate_series(1, q.id) gs(i) where q.id = gs.i; + QUERY PLAN +------------------------------------------------------- + Merge Right Join + Merge Cond: (b.id = a.b_id) + -> Sort + Sort Key: b.id + -> Foreign Scan on b + -> Sort + Sort Key: a.b_id + -> Nested Loop + -> Foreign Scan on a + -> Function Scan on generate_series gs + Filter: (a.id = i) +(11 rows) + +--Testcase 386: +DELETE FROM a; +--Testcase 387: +DELETE FROM b; +--Testcase 388: +DELETE FROM c; +--Testcase 389: +DELETE FROM d; +--Testcase 390: +DROP FOREIGN TABLE a; +--Testcase 391: +DROP FOREIGN TABLE b; +--Testcase 392: +DROP FOREIGN TABLE c; +--Testcase 393: +DROP FOREIGN TABLE d; +rollback; +--Testcase 394: +create foreign table parent (k int, pd int) server influxdb_svr; +--Testcase 395: +create foreign table child (k int, cd int) server influxdb_svr; +--Testcase 396: +insert into parent values (1, 10), (2, 20), (3, 30); +--Testcase 397: +insert into child values (1, 100), (4, 400); +-- this case is optimizable +--Testcase 398: +select p.* from parent p left join child c on (p.k = c.k); + k | pd +---+---- + 1 | 10 + 2 | 20 + 3 | 30 +(3 rows) + +--Testcase 399: +explain (costs off) + select p.* from parent p left join child c on (p.k = c.k); + QUERY PLAN +-------------------------------------- + Merge Left Join + Merge Cond: (p.k = c.k) + -> Sort + Sort Key: p.k + -> Foreign Scan on parent p + -> Sort + Sort Key: c.k + -> Foreign Scan on child c +(8 rows) + +-- this case is not +--Testcase 400: +select p.*, linked from parent p + left join (select c.*, true as linked from child c) as ss + on (p.k = ss.k); + k | pd | linked +---+----+-------- + 1 | 10 | t + 2 | 20 | + 3 | 30 | +(3 rows) + +--Testcase 401: +explain (costs off) + select p.*, linked from parent p + left join (select c.*, true as linked from child c) as ss + on (p.k = ss.k); + QUERY PLAN +-------------------------------------- + Merge Left Join + Merge Cond: (p.k = c.k) + -> Sort + Sort Key: p.k + -> Foreign Scan on parent p + -> Sort + Sort Key: c.k + -> Foreign Scan on child c +(8 rows) + +-- check for a 9.0rc1 bug: join removal breaks pseudoconstant qual handling +--Testcase 402: +select p.* from + parent p left join child c on (p.k = c.k) + where p.k = 1 and p.k = 2; + k | pd +---+---- +(0 rows) + +--Testcase 403: +explain (costs off) +select p.* from + parent p left join child c on (p.k = c.k) + where p.k = 1 and p.k = 2; + QUERY PLAN +-------------------------- + Result + One-Time Filter: false +(2 rows) + +--Testcase 404: +select p.* from + (parent p left join child c on (p.k = c.k)) join parent x on p.k = x.k + where p.k = 1 and p.k = 2; + k | pd +---+---- +(0 rows) + +--Testcase 405: +explain (costs off) +select p.* from + (parent p left join child c on (p.k = c.k)) join parent x on p.k = x.k + where p.k = 1 and p.k = 2; + QUERY PLAN +-------------------------- + Result + One-Time Filter: false +(2 rows) + +-- bug 5255: this is not optimizable by join removal +begin; +--Testcase 406: +CREATE FOREIGN TABLE a (id int) SERVER influxdb_svr; +--Testcase 407: +CREATE FOREIGN TABLE b (id int, a_id int) SERVER influxdb_svr; +--Testcase 408: +INSERT INTO a VALUES (0), (1); +--Testcase 409: +INSERT INTO b VALUES (0, 0), (1, NULL); +--Testcase 410: +SELECT * FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0); + id | a_id | id +----+------+---- + 1 | | +(1 row) + +--Testcase 411: +SELECT b.* FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0); + id | a_id +----+------ + 1 | +(1 row) + +--Testcase 412: +DELETE FROM a; +--Testcase 413: +DELETE FROM b; +--Testcase 414: +DROP FOREIGN TABLE a; +--Testcase 415: +DROP FOREIGN TABLE b; +rollback; +-- another join removal bug: this is not optimizable, either +begin; +--Testcase 416: +create foreign table innertab (id int8, dat1 int8) server influxdb_svr; +--Testcase 417: +insert into innertab values(123, 42); +--Testcase 418: +SELECT * FROM + (SELECT 1 AS x) ss1 + LEFT JOIN + (SELECT q1, q2, COALESCE(dat1, q1) AS y + FROM int8_tbl LEFT JOIN innertab ON q2 = id) ss2 + ON true; + x | q1 | q2 | y +---+------------------+-------------------+------------------ + 1 | 4567890123456789 | -4567890123456789 | 4567890123456789 + 1 | 4567890123456789 | 123 | 42 + 1 | 123 | 456 | 123 + 1 | 123 | 4567890123456789 | 123 + 1 | 4567890123456789 | 4567890123456789 | 4567890123456789 +(5 rows) + +-- Clean up +--Testcase 581: +DELETE FROM innertab; +--Testcase 582: +DROP FOREIGN TABLE innertab; +rollback; +-- another join removal bug: we must clean up correctly when removing a PHV +begin; +--Testcase 419: +create foreign table uniquetbl (f1 text) server influxdb_svr; +--Testcase 420: +explain (costs off) +select t1.* from + uniquetbl as t1 + left join (select *, '***'::text as d1 from uniquetbl) t2 + on t1.f1 = t2.f1 + left join uniquetbl t3 + on t2.d1 = t3.f1; + QUERY PLAN +--------------------------------------------------- + Merge Right Join + Merge Cond: (t3.f1 = ('***'::text)) + -> Sort + Sort Key: t3.f1 + -> Foreign Scan on uniquetbl t3 + -> Sort + Sort Key: ('***'::text) + -> Hash Left Join + Hash Cond: (t1.f1 = uniquetbl.f1) + -> Foreign Scan on uniquetbl t1 + -> Hash + -> Foreign Scan on uniquetbl +(12 rows) + +--Testcase 421: +explain (costs off) +select t0.* +from + text_tbl t0 + left join + (select case t1.ten when 0 then 'doh!'::text else null::text end as case1, + t1.stringu2 + from tenk1 t1 + join int4_tbl i4 ON i4.f1 = t1.unique2 + left join uniquetbl u1 ON u1.f1 = t1.string4) ss + on t0.f1 = ss.case1 +where ss.stringu2 !~* ss.case1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------- + Merge Join + Merge Cond: (i4.f1 = t1.unique2) + -> Sort + Sort Key: i4.f1 + -> Foreign Scan on int4_tbl i4 + -> Sort + Sort Key: t1.unique2 + -> Merge Right Join + Merge Cond: (u1.f1 = t1.string4) + -> Sort + Sort Key: u1.f1 COLLATE "C" + -> Foreign Scan on uniquetbl u1 + -> Sort + Sort Key: t1.string4 + -> Merge Join + Merge Cond: ((CASE t1.ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END) = t0.f1) + -> Sort + Sort Key: (CASE t1.ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END) + -> Foreign Scan on tenk1 t1 + Filter: (stringu2 !~* CASE ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END) + -> Sort + Sort Key: t0.f1 + -> Foreign Scan on text_tbl t0 +(23 rows) + +--Testcase 422: +select t0.* +from + text_tbl t0 + left join + (select case t1.ten when 0 then 'doh!'::text else null::text end as case1, + t1.stringu2 + from tenk1 t1 + join int4_tbl i4 ON i4.f1 = t1.unique2 + left join uniquetbl u1 ON u1.f1 = t1.string4) ss + on t0.f1 = ss.case1 +where ss.stringu2 !~* ss.case1; + f1 +------ + doh! +(1 row) + +rollback; +-- test case to expose miscomputation of required relid set for a PHV +--Testcase 423: +explain (verbose, costs off) +select i8.*, ss.v, t.unique2 + from int8_tbl i8 + left join int4_tbl i4 on i4.f1 = 1 + left join lateral (select i4.f1 + 1 as v) as ss on true + left join tenk1 t on t.unique2 = ss.v +where q2 = 456; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Right Join + Output: i8.q1, i8.q2, ((i4.f1 + 1)), t.unique2 + Hash Cond: (t.unique2 = ((i4.f1 + 1))) + -> Foreign Scan on public.tenk1 t + Output: t.unique1, t.unique2, t.two, t.four, t.ten, t.twenty, t.hundred, t.thousand, t.twothousand, t.fivethous, t.tenthous, t.odd, t.even, t.stringu1, t.stringu2, t.string4 + InfluxDB query: SELECT "unique2" FROM "tenk" + -> Hash + Output: i8.q1, i8.q2, ((i4.f1 + 1)) + -> Nested Loop Left Join + Output: i8.q1, i8.q2, (i4.f1 + 1) + -> Foreign Scan on public.int8_tbl i8 + Output: i8.q1, i8.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (("q2" = 456)) + -> Materialize + Output: i4.f1 + -> Foreign Scan on public.int4_tbl i4 + Output: i4.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" WHERE (("f1" = 1)) +(18 rows) + +--Testcase 424: +select i8.*, ss.v, t.unique2 + from int8_tbl i8 + left join int4_tbl i4 on i4.f1 = 1 + left join lateral (select i4.f1 + 1 as v) as ss on true + left join tenk1 t on t.unique2 = ss.v +where q2 = 456; + q1 | q2 | v | unique2 +-----+-----+---+--------- + 123 | 456 | | +(1 row) + +-- InfluxDB does not support partition table, create local table for test +-- and check a related issue where we miscompute required relids for +-- a PHV that's been translated to a child rel +--Testcase 570: +create temp table parttbl (a integer primary key) partition by range (a); +--Testcase 571: +create temp table parttbl1 partition of parttbl for values from (1) to (100); +--Testcase 572: +insert into parttbl values (11), (12); +--Testcase 573: +explain (costs off) +select * from + (select *, 12 as phv from parttbl) as ss + right join int4_tbl on true +where ss.a = ss.phv and f1 = 0; + QUERY PLAN +------------------------------------------ + Nested Loop + -> Foreign Scan on int4_tbl + -> Materialize + -> Seq Scan on parttbl1 parttbl + Filter: (a = 12) +(5 rows) + +--Testcase 574: +select * from + (select *, 12 as phv from parttbl) as ss + right join int4_tbl on true +where ss.a = ss.phv and f1 = 0; + a | phv | f1 +----+-----+---- + 12 | 12 | 0 +(1 row) + +-- bug #8444: we've historically allowed duplicate aliases within aliased JOINs +--Testcase 425: +select * from + int8_tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = f1; -- error +ERROR: column reference "f1" is ambiguous +LINE 2: ..._tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = f1; + ^ +--Testcase 426: +select * from + int8_tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = y.f1; -- error +ERROR: invalid reference to FROM-clause entry for table "y" +LINE 2: ...bl x join (int4_tbl x cross join int4_tbl y) j on q1 = y.f1; + ^ +HINT: There is an entry for table "y", but it cannot be referenced from this part of the query. +--Testcase 427: +select * from + int8_tbl x join (int4_tbl x cross join int4_tbl y(ff)) j on q1 = f1; -- ok + q1 | q2 | f1 | ff +----+----+----+---- +(0 rows) + +-- +-- Test hints given on incorrect column references are useful +-- +--Testcase 428: +select t1.uunique1 from + tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, prefer "t1" suggestion +ERROR: column t1.uunique1 does not exist +LINE 1: select t1.uunique1 from + ^ +HINT: Perhaps you meant to reference the column "t1.unique1". +--Testcase 429: +select t2.uunique1 from + tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, prefer "t2" suggestion +ERROR: column t2.uunique1 does not exist +LINE 1: select t2.uunique1 from + ^ +HINT: Perhaps you meant to reference the column "t2.unique1". +--Testcase 430: +select uunique1 from + tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, suggest both at once +ERROR: column "uunique1" does not exist +LINE 1: select uunique1 from + ^ +HINT: Perhaps you meant to reference the column "t1.unique1" or the column "t2.unique1". +-- +-- Take care to reference the correct RTE +-- +--Testcase 431: +select atts.relid::regclass, s.* from pg_stats s join + pg_attribute a on s.attname = a.attname and s.tablename = + a.attrelid::regclass::text join (select unnest(indkey) attnum, + indexrelid from pg_index i) atts on atts.attnum = a.attnum where + schemaname != 'pg_catalog'; +ERROR: column atts.relid does not exist +LINE 1: select atts.relid::regclass, s.* from pg_stats s join + ^ +-- +-- Test LATERAL +-- +--Testcase 432: +select unique2, x.* +from tenk1 a, lateral (select * from int4_tbl b where f1 = a.unique1) x; + unique2 | f1 +---------+---- + 9998 | 0 +(1 row) + +--Testcase 433: +explain (costs off) + select unique2, x.* + from tenk1 a, lateral (select * from int4_tbl b where f1 = a.unique1) x; + QUERY PLAN +---------------------------------------- + Merge Join + Merge Cond: (a.unique1 = b.f1) + -> Sort + Sort Key: a.unique1 + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: b.f1 + -> Foreign Scan on int4_tbl b +(8 rows) + +--Testcase 434: +select unique2, x.* +from int4_tbl x, lateral (select unique2 from tenk1 where f1 = unique1) ss; + unique2 | f1 +---------+---- + 9998 | 0 +(1 row) + +--Testcase 435: +explain (costs off) + select unique2, x.* + from int4_tbl x, lateral (select unique2 from tenk1 where f1 = unique1) ss; + QUERY PLAN +---------------------------------------- + Merge Join + Merge Cond: (tenk1.unique1 = x.f1) + -> Sort + Sort Key: tenk1.unique1 + -> Foreign Scan on tenk1 + -> Sort + Sort Key: x.f1 + -> Foreign Scan on int4_tbl x +(8 rows) + +--Testcase 436: +explain (costs off) + select unique2, x.* + from int4_tbl x cross join lateral (select unique2 from tenk1 where f1 = unique1) ss; + QUERY PLAN +---------------------------------------- + Merge Join + Merge Cond: (tenk1.unique1 = x.f1) + -> Sort + Sort Key: tenk1.unique1 + -> Foreign Scan on tenk1 + -> Sort + Sort Key: x.f1 + -> Foreign Scan on int4_tbl x +(8 rows) + +--Testcase 437: +select unique2, x.* +from int4_tbl x left join lateral (select unique1, unique2 from tenk1 where f1 = unique1) ss on true; + unique2 | f1 +---------+------------- + | -2147483647 + | -123456 + 9998 | 0 + | 123456 + | 2147483647 +(5 rows) + +--Testcase 438: +explain (costs off) + select unique2, x.* + from int4_tbl x left join lateral (select unique1, unique2 from tenk1 where f1 = unique1) ss on true; + QUERY PLAN +---------------------------------------- + Merge Right Join + Merge Cond: (tenk1.unique1 = x.f1) + -> Sort + Sort Key: tenk1.unique1 + -> Foreign Scan on tenk1 + -> Sort + Sort Key: x.f1 + -> Foreign Scan on int4_tbl x +(8 rows) + +-- check scoping of lateral versus parent references +-- the first of these should return int8_tbl.q2, the second int8_tbl.q1 +--Testcase 439: +select *, (select r from (select q1 as q2) x, (select q2 as r) y) from int8_tbl; + q1 | q2 | r +------------------+-------------------+------------------- + 123 | 456 | 456 + 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | -4567890123456789 +(5 rows) + +--Testcase 440: +select *, (select r from (select q1 as q2) x, lateral (select q2 as r) y) from int8_tbl; + q1 | q2 | r +------------------+-------------------+------------------ + 123 | 456 | 123 + 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 +(5 rows) + +-- lateral with function in FROM +--Testcase 441: +select count(*) from tenk1 a, lateral generate_series(1,two) g; + count +------- + 5000 +(1 row) + +--Testcase 442: +explain (costs off) + select count(*) from tenk1 a, lateral generate_series(1,two) g; + QUERY PLAN +------------------------------------------------ + Aggregate + -> Nested Loop + -> Foreign Scan on tenk1 a + -> Function Scan on generate_series g +(4 rows) + +--Testcase 443: +explain (costs off) + select count(*) from tenk1 a cross join lateral generate_series(1,two) g; + QUERY PLAN +------------------------------------------------ + Aggregate + -> Nested Loop + -> Foreign Scan on tenk1 a + -> Function Scan on generate_series g +(4 rows) + +-- don't need the explicit LATERAL keyword for functions +--Testcase 444: +explain (costs off) + select count(*) from tenk1 a, generate_series(1,two) g; + QUERY PLAN +------------------------------------------------ + Aggregate + -> Nested Loop + -> Foreign Scan on tenk1 a + -> Function Scan on generate_series g +(4 rows) + +-- lateral with UNION ALL subselect +--Testcase 445: +explain (costs off) + select * from generate_series(100,200) g, + lateral (select * from int8_tbl a where g = q1 union all + select * from int8_tbl b where g = q2) ss; + QUERY PLAN +------------------------------------------ + Nested Loop + -> Function Scan on generate_series g + -> Append + -> Foreign Scan on int8_tbl a + -> Foreign Scan on int8_tbl b +(5 rows) + +--Testcase 446: +select * from generate_series(100,200) g, + lateral (select * from int8_tbl a where g = q1 union all + select * from int8_tbl b where g = q2) ss; + g | q1 | q2 +-----+------------------+------------------ + 123 | 123 | 456 + 123 | 123 | 4567890123456789 + 123 | 4567890123456789 | 123 +(3 rows) + +-- lateral with VALUES +--Testcase 447: +explain (costs off) + select count(*) from tenk1 a, + tenk1 b join lateral (values(a.unique1)) ss(x) on b.unique2 = ss.x; + QUERY PLAN +--------------------------------------------- + Aggregate + -> Merge Join + Merge Cond: (a.unique1 = b.unique2) + -> Sort + Sort Key: a.unique1 + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: b.unique2 + -> Foreign Scan on tenk1 b +(9 rows) + +--Testcase 448: +select count(*) from tenk1 a, + tenk1 b join lateral (values(a.unique1)) ss(x) on b.unique2 = ss.x; + count +------- + 10000 +(1 row) + +-- lateral with VALUES, no flattening possible +--Testcase 449: +explain (costs off) + select count(*) from tenk1 a, + tenk1 b join lateral (values(a.unique1),(-1)) ss(x) on b.unique2 = ss.x; + QUERY PLAN +------------------------------------------------------ + Aggregate + -> Merge Join + Merge Cond: (b.unique2 = "*VALUES*".column1) + -> Sort + Sort Key: b.unique2 + -> Foreign Scan on tenk1 b + -> Sort + Sort Key: "*VALUES*".column1 + -> Nested Loop + -> Foreign Scan on tenk1 a + -> Values Scan on "*VALUES*" +(11 rows) + +--Testcase 450: +select count(*) from tenk1 a, + tenk1 b join lateral (values(a.unique1),(-1)) ss(x) on b.unique2 = ss.x; + count +------- + 10000 +(1 row) + +-- lateral injecting a strange outer join condition +--Testcase 451: +explain (costs off) + select * from int8_tbl a, + int8_tbl x left join lateral (select a.q1 from int4_tbl y) ss(z) + on x.q2 = ss.z + order by a.q1, a.q2, x.q1, x.q2, ss.z; + QUERY PLAN +---------------------------------------------------- + Sort + Sort Key: a.q1, a.q2, x.q1, x.q2, (a.q1) + -> Nested Loop + -> Foreign Scan on int8_tbl a + -> Merge Left Join + Merge Cond: (x.q2 = (a.q1)) + -> Sort + Sort Key: x.q2 + -> Foreign Scan on int8_tbl x + -> Sort + Sort Key: (a.q1) + -> Foreign Scan on int4_tbl y +(12 rows) + +--Testcase 452: +select * from int8_tbl a, + int8_tbl x left join lateral (select a.q1 from int4_tbl y) ss(z) + on x.q2 = ss.z + order by a.q1, a.q2, x.q1, x.q2, ss.z; + q1 | q2 | q1 | q2 | z +------------------+-------------------+------------------+-------------------+------------------ + 123 | 456 | 123 | 456 | + 123 | 456 | 123 | 4567890123456789 | + 123 | 456 | 4567890123456789 | -4567890123456789 | + 123 | 456 | 4567890123456789 | 123 | 123 + 123 | 456 | 4567890123456789 | 123 | 123 + 123 | 456 | 4567890123456789 | 123 | 123 + 123 | 456 | 4567890123456789 | 123 | 123 + 123 | 456 | 4567890123456789 | 123 | 123 + 123 | 456 | 4567890123456789 | 4567890123456789 | + 123 | 4567890123456789 | 123 | 456 | + 123 | 4567890123456789 | 123 | 4567890123456789 | + 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | + 4567890123456789 | -4567890123456789 | 123 | 456 | + 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 | -4567890123456789 | + 4567890123456789 | -4567890123456789 | 4567890123456789 | 123 | + 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 456 | + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 4567890123456789 | -4567890123456789 | + 4567890123456789 | 123 | 4567890123456789 | 123 | + 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 123 | 456 | + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 +(57 rows) + +-- lateral reference to a join alias variable +--Testcase 453: +select * from (select f1/2 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1, + lateral (select x) ss2(y); + x | f1 | y +---+----+--- + 0 | 0 | 0 +(1 row) + +--Testcase 454: +select * from (select f1 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1, + lateral (values(x)) ss2(y); + x | f1 | y +-------------+-------------+------------- + -2147483647 | -2147483647 | -2147483647 + -123456 | -123456 | -123456 + 0 | 0 | 0 + 123456 | 123456 | 123456 + 2147483647 | 2147483647 | 2147483647 +(5 rows) + +--Testcase 455: +select * from ((select f1/2 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1) j, + lateral (select x) ss2(y); + x | f1 | y +---+----+--- + 0 | 0 | 0 +(1 row) + +-- lateral references requiring pullup +--Testcase 456: +select * from (values(1)) x(lb), + lateral generate_series(lb,4) x4; + lb | x4 +----+---- + 1 | 1 + 1 | 2 + 1 | 3 + 1 | 4 +(4 rows) + +--Testcase 457: +select * from (select f1/1000000000 from int4_tbl) x(lb), + lateral generate_series(lb,4) x4; + lb | x4 +----+---- + 0 | 0 + 0 | 1 + 0 | 2 + 0 | 3 + 0 | 4 + 0 | 0 + 0 | 1 + 0 | 2 + 0 | 3 + 0 | 4 + 0 | 0 + 0 | 1 + 0 | 2 + 0 | 3 + 0 | 4 + 2 | 2 + 2 | 3 + 2 | 4 + -2 | -2 + -2 | -1 + -2 | 0 + -2 | 1 + -2 | 2 + -2 | 3 + -2 | 4 +(25 rows) + +--Testcase 458: +select * from (values(1)) x(lb), + lateral (values(lb)) y(lbcopy); + lb | lbcopy +----+-------- + 1 | 1 +(1 row) + +--Testcase 459: +select * from (values(1)) x(lb), + lateral (select lb from int4_tbl) y(lbcopy); + lb | lbcopy +----+-------- + 1 | 1 + 1 | 1 + 1 | 1 + 1 | 1 + 1 | 1 +(5 rows) + +--Testcase 460: +select * from + int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, + lateral (values(x.q1,y.q1,y.q2)) v(xq1,yq1,yq2); + q1 | q2 | q1 | q2 | xq1 | yq1 | yq2 +------------------+-------------------+------------------+-------------------+------------------+------------------+------------------- + 4567890123456789 | -4567890123456789 | | | 4567890123456789 | | + 4567890123456789 | 123 | 123 | 456 | 4567890123456789 | 123 | 456 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 123 | 456 | | | 123 | | + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | -4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 +(10 rows) + +--Testcase 461: +select * from + int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, + lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2); + q1 | q2 | q1 | q2 | xq1 | yq1 | yq2 +------------------+-------------------+------------------+-------------------+------------------+------------------+------------------- + 4567890123456789 | -4567890123456789 | | | 4567890123456789 | | + 4567890123456789 | 123 | 123 | 456 | 4567890123456789 | 123 | 456 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 123 | 456 | | | 123 | | + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | -4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 +(10 rows) + +--Testcase 462: +select x.* from + int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, + lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2); + q1 | q2 +------------------+------------------- + 4567890123456789 | -4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 123 + 123 | 456 + 123 | 4567890123456789 + 123 | 4567890123456789 + 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 +(10 rows) + +--Testcase 463: +select v.* from + (int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1) + left join int4_tbl z on z.f1 = x.q2, + lateral (select x.q1,y.q1 union all select x.q2,y.q2) v(vx,vy); + vx | vy +-------------------+------------------- + 4567890123456789 | + -4567890123456789 | + 4567890123456789 | 123 + 123 | 456 + 4567890123456789 | 123 + 123 | 4567890123456789 + 123 | + 456 | + 123 | 4567890123456789 + 4567890123456789 | 123 + 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 + 4567890123456789 | -4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(20 rows) + +--Testcase 464: +select v.* from + (int8_tbl x left join (select q1,(select coalesce(q2,0)) q2 from int8_tbl) y on x.q2 = y.q1) + left join int4_tbl z on z.f1 = x.q2, + lateral (select x.q1,y.q1 union all select x.q2,y.q2) v(vx,vy); + vx | vy +-------------------+------------------- + 4567890123456789 | + -4567890123456789 | + 4567890123456789 | 123 + 123 | 456 + 4567890123456789 | 123 + 123 | 4567890123456789 + 123 | + 456 | + 123 | 4567890123456789 + 4567890123456789 | 123 + 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 + 4567890123456789 | -4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(20 rows) + +--Testcase 465: +select v.* from + (int8_tbl x left join (select q1,(select coalesce(q2,0)) q2 from int8_tbl) y on x.q2 = y.q1) + left join int4_tbl z on z.f1 = x.q2, + lateral (select x.q1,y.q1 from onerow union all select x.q2,y.q2 from onerow) v(vx,vy); + vx | vy +-------------------+------------------- + 4567890123456789 | + -4567890123456789 | + 4567890123456789 | 123 + 123 | 456 + 4567890123456789 | 123 + 123 | 4567890123456789 + 123 | + 456 | + 123 | 4567890123456789 + 4567890123456789 | 123 + 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 + 4567890123456789 | -4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(20 rows) + +--Testcase 466: +explain (verbose, costs off) +select * from + int8_tbl a left join + lateral (select *, a.q2 as x from int8_tbl b) ss on a.q2 = ss.q1; + QUERY PLAN +------------------------------------------------------------------------------- + Nested Loop Left Join + Output: a.q1, a.q2, b.q1, b.q2, (a.q2) + -> Foreign Scan on public.int8_tbl a + Output: a.q1, a.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Foreign Scan on public.int8_tbl b + Output: b.q1, b.q2, a.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (($1 = "q1")) +(8 rows) + +--Testcase 467: +select * from + int8_tbl a left join + lateral (select *, a.q2 as x from int8_tbl b) ss on a.q2 = ss.q1; + q1 | q2 | q1 | q2 | x +------------------+-------------------+------------------+-------------------+------------------ + 123 | 456 | | | + 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 456 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | | | +(10 rows) + +--Testcase 468: +explain (verbose, costs off) +select * from + int8_tbl a left join + lateral (select *, coalesce(a.q2, 42) as x from int8_tbl b) ss on a.q2 = ss.q1; + QUERY PLAN +------------------------------------------------------------------------------- + Nested Loop Left Join + Output: a.q1, a.q2, b.q1, b.q2, (COALESCE(a.q2, '42'::bigint)) + -> Foreign Scan on public.int8_tbl a + Output: a.q1, a.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Foreign Scan on public.int8_tbl b + Output: b.q1, b.q2, COALESCE(a.q2, '42'::bigint) + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (($1 = "q1")) +(8 rows) + +--Testcase 469: +select * from + int8_tbl a left join + lateral (select *, coalesce(a.q2, 42) as x from int8_tbl b) ss on a.q2 = ss.q1; + q1 | q2 | q1 | q2 | x +------------------+-------------------+------------------+-------------------+------------------ + 123 | 456 | | | + 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 456 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | | | +(10 rows) + +-- lateral can result in join conditions appearing below their +-- real semantic level +--Testcase 470: +explain (verbose, costs off) +select * from int4_tbl i left join + lateral (select * from int2_tbl j where i.f1 = j.f1) k on true; + QUERY PLAN +----------------------------------------------------------- + Merge Left Join + Output: i.f1, j.f1 + Merge Cond: (i.f1 = j.f1) + -> Sort + Output: i.f1 + Sort Key: i.f1 + -> Foreign Scan on public.int4_tbl i + Output: i.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Sort + Output: j.f1 + Sort Key: j.f1 + -> Foreign Scan on public.int2_tbl j + Output: j.f1 + InfluxDB query: SELECT "f1" FROM "int2_tbl" +(15 rows) + +--Testcase 471: +select * from int4_tbl i left join + lateral (select * from int2_tbl j where i.f1 = j.f1) k on true; + f1 | f1 +-------------+---- + -2147483647 | + -123456 | + 0 | 0 + 123456 | + 2147483647 | +(5 rows) + +--Testcase 472: +explain (verbose, costs off) +select * from int4_tbl i left join + lateral (select coalesce(i) from int2_tbl j where i.f1 = j.f1) k on true; + QUERY PLAN +------------------------------------------------------------------------- + Nested Loop Left Join + Output: i.f1, (COALESCE(i.*)) + -> Foreign Scan on public.int4_tbl i + Output: i.f1, i.* + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Foreign Scan on public.int2_tbl j + Output: j.f1, COALESCE(i.*) + InfluxDB query: SELECT "f1" FROM "int2_tbl" WHERE (($1 = "f1")) +(8 rows) + +--Testcase 473: +select * from int4_tbl i left join + lateral (select coalesce(i) from int2_tbl j where i.f1 = j.f1) k on true; + f1 | coalesce +-------------+---------- + 0 | (0) + 123456 | + -123456 | + 2147483647 | + -2147483647 | +(5 rows) + +--Testcase 474: +explain (verbose, costs off) +select * from int4_tbl a, + lateral ( + select * from int4_tbl b left join int8_tbl c on (b.f1 = q1 and a.f1 = q2) + ) ss; + QUERY PLAN +------------------------------------------------------------------------------------------- + Nested Loop + Output: a.f1, b.f1, c.q1, c.q2 + -> Foreign Scan on public.int4_tbl a + Output: a.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Hash Left Join + Output: b.f1, c.q1, c.q2 + Hash Cond: (b.f1 = c.q1) + -> Foreign Scan on public.int4_tbl b + Output: b.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Hash + Output: c.q1, c.q2 + -> Foreign Scan on public.int8_tbl c + Output: c.q1, c.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" WHERE (($1 = "q2")) +(16 rows) + +--Testcase 475: +select * from int4_tbl a, + lateral ( + select * from int4_tbl b left join int8_tbl c on (b.f1 = q1 and a.f1 = q2) + ) ss; + f1 | f1 | q1 | q2 +-------------+-------------+----+---- + 0 | 0 | | + 0 | 123456 | | + 0 | -123456 | | + 0 | 2147483647 | | + 0 | -2147483647 | | + 123456 | 0 | | + 123456 | 123456 | | + 123456 | -123456 | | + 123456 | 2147483647 | | + 123456 | -2147483647 | | + -123456 | 0 | | + -123456 | 123456 | | + -123456 | -123456 | | + -123456 | 2147483647 | | + -123456 | -2147483647 | | + 2147483647 | 0 | | + 2147483647 | 123456 | | + 2147483647 | -123456 | | + 2147483647 | 2147483647 | | + 2147483647 | -2147483647 | | + -2147483647 | 0 | | + -2147483647 | 123456 | | + -2147483647 | -123456 | | + -2147483647 | 2147483647 | | + -2147483647 | -2147483647 | | +(25 rows) + +-- lateral reference in a PlaceHolderVar evaluated at join level +--Testcase 476: +explain (verbose, costs off) +select * from + int8_tbl a left join lateral + (select b.q1 as bq1, c.q1 as cq1, least(a.q1,b.q1,c.q1) from + int8_tbl b cross join int8_tbl c) ss + on a.q2 = ss.bq1; + QUERY PLAN +------------------------------------------------------------------------------- + Nested Loop Left Join + Output: a.q1, a.q2, b.q1, c.q1, (LEAST(a.q1, b.q1, c.q1)) + -> Foreign Scan on public.int8_tbl a + Output: a.q1, a.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Nested Loop + Output: b.q1, c.q1, LEAST(a.q1, b.q1, c.q1) + -> Foreign Scan on public.int8_tbl b + Output: b.q1, b.q2 + InfluxDB query: SELECT "q1" FROM "int8_tbl" WHERE (($1 = "q1")) + -> Materialize + Output: c.q1 + -> Foreign Scan on public.int8_tbl c + Output: c.q1 + InfluxDB query: SELECT "q1" FROM "int8_tbl" +(15 rows) + +--Testcase 477: +select * from + int8_tbl a left join lateral + (select b.q1 as bq1, c.q1 as cq1, least(a.q1,b.q1,c.q1) from + int8_tbl b cross join int8_tbl c) ss + on a.q2 = ss.bq1; + q1 | q2 | bq1 | cq1 | least +------------------+-------------------+------------------+------------------+------------------ + 123 | 456 | | | + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 123 | 123 + 4567890123456789 | 123 | 123 | 123 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 123 | 123 + 4567890123456789 | 123 | 123 | 123 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | | | +(42 rows) + +-- case requiring nested PlaceHolderVars +--Testcase 478: +explain (verbose, costs off) +select * from + int8_tbl c left join ( + int8_tbl a left join (select q1, coalesce(q2,42) as x from int8_tbl b) ss1 + on a.q2 = ss1.q1 + cross join + lateral (select q1, coalesce(ss1.x,q2) as y from int8_tbl d) ss2 + ) on c.q2 = ss2.q1, + lateral (select ss2.y offset 0) ss3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Nested Loop + Output: c.q1, c.q2, a.q1, a.q2, b.q1, (COALESCE(b.q2, '42'::bigint)), d.q1, (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)), ((COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2))) + -> Hash Right Join + Output: c.q1, c.q2, a.q1, a.q2, b.q1, d.q1, (COALESCE(b.q2, '42'::bigint)), (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)) + Hash Cond: (d.q1 = c.q2) + -> Nested Loop + Output: a.q1, a.q2, b.q1, d.q1, (COALESCE(b.q2, '42'::bigint)), (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)) + -> Merge Left Join + Output: a.q1, a.q2, b.q1, (COALESCE(b.q2, '42'::bigint)) + Merge Cond: (a.q2 = b.q1) + -> Sort + Output: a.q1, a.q2 + Sort Key: a.q2 + -> Foreign Scan on public.int8_tbl a + Output: a.q1, a.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Sort + Output: b.q1, (COALESCE(b.q2, '42'::bigint)) + Sort Key: b.q1 + -> Foreign Scan on public.int8_tbl b + Output: b.q1, COALESCE(b.q2, '42'::bigint) + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Foreign Scan on public.int8_tbl d + Output: d.q1, COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2) + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Hash + Output: c.q1, c.q2 + -> Foreign Scan on public.int8_tbl c + Output: c.q1, c.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Result + Output: (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)) +(32 rows) + +-- case that breaks the old ph_may_need optimization +--Testcase 479: +explain (verbose, costs off) +select c.*,a.*,ss1.q1,ss2.q1,ss3.* from + int8_tbl c left join ( + int8_tbl a left join + (select q1, coalesce(q2,f1) as x from int8_tbl b, int4_tbl b2 + where q1 < f1) ss1 + on a.q2 = ss1.q1 + cross join + lateral (select q1, coalesce(ss1.x,q2) as y from int8_tbl d) ss2 + ) on c.q2 = ss2.q1, + lateral (select * from int4_tbl i where ss2.y > f1) ss3; + QUERY PLAN +--------------------------------------------------------------------------------------------------------- + Nested Loop + Output: c.q1, c.q2, a.q1, a.q2, b.q1, d.q1, i.f1 + Join Filter: ((COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2)) > i.f1) + -> Hash Right Join + Output: c.q1, c.q2, a.q1, a.q2, b.q1, d.q1, (COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2)) + Hash Cond: (d.q1 = c.q2) + -> Nested Loop + Output: a.q1, a.q2, b.q1, d.q1, (COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2)) + -> Merge Left Join + Output: a.q1, a.q2, b.q1, (COALESCE(b.q2, (b2.f1)::bigint)) + Merge Cond: (a.q2 = b.q1) + -> Sort + Output: a.q1, a.q2 + Sort Key: a.q2 + -> Foreign Scan on public.int8_tbl a + Output: a.q1, a.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Materialize + Output: b.q1, (COALESCE(b.q2, (b2.f1)::bigint)) + -> Sort + Output: b.q1, (COALESCE(b.q2, (b2.f1)::bigint)) + Sort Key: b.q1 + -> Nested Loop + Output: b.q1, COALESCE(b.q2, (b2.f1)::bigint) + Join Filter: (b.q1 < b2.f1) + -> Foreign Scan on public.int4_tbl b2 + Output: b2.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Materialize + Output: b.q1, b.q2 + -> Foreign Scan on public.int8_tbl b + Output: b.q1, b.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Foreign Scan on public.int8_tbl d + Output: d.q1, COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2) + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Hash + Output: c.q1, c.q2 + -> Foreign Scan on public.int8_tbl c + Output: c.q1, c.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Materialize + Output: i.f1 + -> Foreign Scan on public.int4_tbl i + Output: i.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" +(46 rows) + +-- check processing of postponed quals (bug #9041) +--Testcase 480: +explain (verbose, costs off) +select * from + (select 1 as x offset 0) x cross join (select 2 as y offset 0) y + left join lateral ( + select * from (select 3 as z offset 0) z where z.z = x.x + ) zz on zz.z = y.y; + QUERY PLAN +---------------------------------------------- + Nested Loop Left Join + Output: (1), (2), (3) + Join Filter: (((3) = (1)) AND ((3) = (2))) + -> Nested Loop + Output: (1), (2) + -> Result + Output: 1 + -> Result + Output: 2 + -> Result + Output: 3 +(11 rows) + +-- check dummy rels with lateral references (bug #15694) +--Testcase 481: +explain (verbose, costs off) +select * from int8_tbl i8 left join lateral + (select *, i8.q2 from int4_tbl where false) ss on true; + QUERY PLAN +----------------------------------------------------------- + Nested Loop Left Join + Output: i8.q1, i8.q2, f1, (i8.q2) + -> Foreign Scan on public.int8_tbl i8 + Output: i8.q1, i8.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Result + Output: f1, i8.q2 + One-Time Filter: false +(8 rows) + +--Testcase 482: +explain (verbose, costs off) +select * from int8_tbl i8 left join lateral + (select *, i8.q2 from int4_tbl i1, int4_tbl i2 where false) ss on true; + QUERY PLAN +----------------------------------------------------------- + Nested Loop Left Join + Output: i8.q1, i8.q2, f1, f1, (i8.q2) + -> Foreign Scan on public.int8_tbl i8 + Output: i8.q1, i8.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Result + Output: f1, f1, i8.q2 + One-Time Filter: false +(8 rows) + +-- check handling of nested appendrels inside LATERAL +--Testcase 483: +select * from + ((select 2 as v) union all (select 3 as v)) as q1 + cross join lateral + ((select * from + ((select 4 as v) union all (select 5 as v)) as q3) + union all + (select q1.v) + ) as q2; + v | v +---+--- + 2 | 4 + 2 | 5 + 2 | 2 + 3 | 4 + 3 | 5 + 3 | 3 +(6 rows) + +-- check the number of columns specified +--Testcase 601: +SELECT * FROM (int8_tbl i cross join int4_tbl j) ss(a,b,c,d); +ERROR: join expression "ss" has 3 columns available but 4 columns specified +-- check we don't try to do a unique-ified semijoin with LATERAL +--Testcase 484: +explain (verbose, costs off) +select * from + (values (0,9998), (1,1000)) v(id,x), + lateral (select f1 from int4_tbl + where f1 = any (select unique1 from tenk1 + where unique2 = v.x offset 0)) ss; + QUERY PLAN +------------------------------------------------------------------------------------------- + Nested Loop + Output: "*VALUES*".column1, "*VALUES*".column2, int4_tbl.f1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, "*VALUES*".column2 + -> Hash Semi Join + Output: int4_tbl.f1 + Hash Cond: (int4_tbl.f1 = tenk1.unique1) + -> Foreign Scan on public.int4_tbl + Output: int4_tbl.f1 + InfluxDB query: SELECT "f1" FROM "int4_tbl" + -> Hash + Output: tenk1.unique1 + -> Foreign Scan on public.tenk1 + Output: tenk1.unique1 + InfluxDB query: SELECT "unique1" FROM "tenk" WHERE (("unique2" = $1)) +(15 rows) + +--Testcase 485: +select * from + (values (0,9998), (1,1000)) v(id,x), + lateral (select f1 from int4_tbl + where f1 = any (select unique1 from tenk1 + where unique2 = v.x offset 0)) ss; + id | x | f1 +----+------+---- + 0 | 9998 | 0 +(1 row) + +-- check proper extParam/allParam handling (this isn't exactly a LATERAL issue, +-- but we can make the test case much more compact with LATERAL) +--Testcase 486: +explain (verbose, costs off) +select * from (values (0), (1)) v(id), +lateral (select * from int8_tbl t1, + lateral (select * from + (select * from int8_tbl t2 + where q1 = any (select q2 from int8_tbl t3 + where q2 = (select greatest(t1.q1,t2.q2)) + and (select v.id=0)) offset 0) ss2) ss + where t1.q1 = ss.q2) ss0; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Nested Loop + Output: "*VALUES*".column1, t1.q1, t1.q2, ss2.q1, ss2.q2 + -> Foreign Scan on public.int8_tbl t1 + Output: t1.q1, t1.q2 + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + -> Nested Loop + Output: "*VALUES*".column1, ss2.q1, ss2.q2 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1 + -> Subquery Scan on ss2 + Output: ss2.q1, ss2.q2 + Filter: (t1.q1 = ss2.q2) + -> Foreign Scan on public.int8_tbl t2 + Output: t2.q1, t2.q2 + Filter: (SubPlan 3) + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + SubPlan 3 + -> Result + Output: t3.q2 + One-Time Filter: $4 + InitPlan 1 (returns $2) + -> Result + Output: GREATEST($0, t2.q2) + InitPlan 2 (returns $4) + -> Result + Output: ($3 = 0) + -> Foreign Scan on public.int8_tbl t3 + Output: t3.q1, t3.q2 + InfluxDB query: SELECT "q2" FROM "int8_tbl" WHERE (("q2" = $1)) +(29 rows) + +--Testcase 487: +select * from (values (0), (1)) v(id), +lateral (select * from int8_tbl t1, + lateral (select * from + (select * from int8_tbl t2 + where q1 = any (select q2 from int8_tbl t3 + where q2 = (select greatest(t1.q1,t2.q2)) + and (select v.id=0)) offset 0) ss2) ss + where t1.q1 = ss.q2) ss0; + id | q1 | q2 | q1 | q2 +----+------------------+-------------------+------------------+------------------ + 0 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 0 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 0 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 +(3 rows) + +-- test some error cases where LATERAL should have been used but wasn't +--Testcase 488: +select f1,g from int4_tbl a, (select f1 as g) ss; +ERROR: column "f1" does not exist +LINE 1: select f1,g from int4_tbl a, (select f1 as g) ss; + ^ +HINT: There is a column named "f1" in table "a", but it cannot be referenced from this part of the query. +--Testcase 489: +select f1,g from int4_tbl a, (select a.f1 as g) ss; +ERROR: invalid reference to FROM-clause entry for table "a" +LINE 1: select f1,g from int4_tbl a, (select a.f1 as g) ss; + ^ +HINT: There is an entry for table "a", but it cannot be referenced from this part of the query. +--Testcase 490: +select f1,g from int4_tbl a cross join (select f1 as g) ss; +ERROR: column "f1" does not exist +LINE 1: select f1,g from int4_tbl a cross join (select f1 as g) ss; + ^ +HINT: There is a column named "f1" in table "a", but it cannot be referenced from this part of the query. +--Testcase 491: +select f1,g from int4_tbl a cross join (select a.f1 as g) ss; +ERROR: invalid reference to FROM-clause entry for table "a" +LINE 1: select f1,g from int4_tbl a cross join (select a.f1 as g) ss... + ^ +HINT: There is an entry for table "a", but it cannot be referenced from this part of the query. +-- SQL:2008 says the left table is in scope but illegal to access here +--Testcase 492: +select f1,g from int4_tbl a right join lateral generate_series(0, a.f1) g on true; +ERROR: invalid reference to FROM-clause entry for table "a" +LINE 1: ... int4_tbl a right join lateral generate_series(0, a.f1) g on... + ^ +DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. +--Testcase 493: +select f1,g from int4_tbl a full join lateral generate_series(0, a.f1) g on true; +ERROR: invalid reference to FROM-clause entry for table "a" +LINE 1: ...m int4_tbl a full join lateral generate_series(0, a.f1) g on... + ^ +DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. +-- check we complain about ambiguous table references +--Testcase 494: +select * from + int8_tbl x cross join (int4_tbl x cross join lateral (select x.f1) ss); +ERROR: table reference "x" is ambiguous +LINE 2: ...cross join (int4_tbl x cross join lateral (select x.f1) ss); + ^ +-- LATERAL can be used to put an aggregate into the FROM clause of its query +--Testcase 495: +select 1 from tenk1 a, lateral (select max(a.unique1) from int4_tbl b) ss; +ERROR: aggregate functions are not allowed in FROM clause of their own query level +LINE 1: select 1 from tenk1 a, lateral (select max(a.unique1) from i... + ^ +-- check behavior of LATERAL in UPDATE/DELETE +--Testcase 496: +create temp table xx1 as select f1 as x1, -f1 as x2 from int4_tbl; +-- error, can't do this: +--Testcase 497: +update xx1 set x2 = f1 from (select * from int4_tbl where f1 = x1) ss; +ERROR: column "x1" does not exist +LINE 1: ... set x2 = f1 from (select * from int4_tbl where f1 = x1) ss; + ^ +HINT: There is a column named "x1" in table "xx1", but it cannot be referenced from this part of the query. +--Testcase 498: +update xx1 set x2 = f1 from (select * from int4_tbl where f1 = xx1.x1) ss; +ERROR: invalid reference to FROM-clause entry for table "xx1" +LINE 1: ...t x2 = f1 from (select * from int4_tbl where f1 = xx1.x1) ss... + ^ +HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. +-- can't do it even with LATERAL: +--Testcase 499: +update xx1 set x2 = f1 from lateral (select * from int4_tbl where f1 = x1) ss; +ERROR: invalid reference to FROM-clause entry for table "xx1" +LINE 1: ...= f1 from lateral (select * from int4_tbl where f1 = x1) ss; + ^ +HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. +-- we might in future allow something like this, but for now it's an error: +--Testcase 500: +update xx1 set x2 = f1 from xx1, lateral (select * from int4_tbl where f1 = x1) ss; +ERROR: table name "xx1" specified more than once +-- also errors: +--Testcase 501: +delete from xx1 using (select * from int4_tbl where f1 = x1) ss; +ERROR: column "x1" does not exist +LINE 1: ...te from xx1 using (select * from int4_tbl where f1 = x1) ss; + ^ +HINT: There is a column named "x1" in table "xx1", but it cannot be referenced from this part of the query. +--Testcase 502: +delete from xx1 using (select * from int4_tbl where f1 = xx1.x1) ss; +ERROR: invalid reference to FROM-clause entry for table "xx1" +LINE 1: ...from xx1 using (select * from int4_tbl where f1 = xx1.x1) ss... + ^ +HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. +--Testcase 503: +delete from xx1 using lateral (select * from int4_tbl where f1 = x1) ss; +ERROR: invalid reference to FROM-clause entry for table "xx1" +LINE 1: ...xx1 using lateral (select * from int4_tbl where f1 = x1) ss; + ^ +HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. +/* +-- Influx does not support partition table +-- +-- test LATERAL reference propagation down a multi-level inheritance hierarchy +-- produced for a multi-level partitioned table hierarchy. +-- +create table join_pt1 (a int, b int, c varchar) partition by range(a); +create table join_pt1p1 partition of join_pt1 for values from (0) to (100) partition by range(b); +create table join_pt1p2 partition of join_pt1 for values from (100) to (200); +create table join_pt1p1p1 partition of join_pt1p1 for values from (0) to (100); +insert into join_pt1 values (1, 1, 'x'), (101, 101, 'y'); +create table join_ut1 (a int, b int, c varchar); +insert into join_ut1 values (101, 101, 'y'), (2, 2, 'z'); +explain (verbose, costs off) +select t1.b, ss.phv from join_ut1 t1 left join lateral + (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv + from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss + on t1.a = ss.t2a order by t1.a; +select t1.b, ss.phv from join_ut1 t1 left join lateral + (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv + from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss + on t1.a = ss.t2a order by t1.a; + +drop table join_pt1; +drop table join_ut1; + +-- +-- test estimation behavior with multi-column foreign key and constant qual +-- + +begin; + +create table fkest (x integer, x10 integer, x10b integer, x100 integer); +insert into fkest select x, x/10, x/10, x/100 from generate_series(1,1000) x; +create unique index on fkest(x, x10, x100); +analyze fkest; + +explain (costs off) +select * from fkest f1 + join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) + join fkest f3 on f1.x = f3.x + where f1.x100 = 2; + +alter table fkest add constraint fk + foreign key (x, x10b, x100) references fkest (x, x10, x100); + +explain (costs off) +select * from fkest f1 + join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) + join fkest f3 on f1.x = f3.x + where f1.x100 = 2; + +rollback; +*/ +-- +-- test that foreign key join estimation performs sanely for outer joins +-- +begin; +--Testcase 504: +create foreign table fkest (a int, b int, c int) server influxdb_svr; +--Testcase 505: +create foreign table fkest1 (a int, b int) server influxdb_svr; +--Testcase 506: +insert into fkest select x/10, x%10, x from generate_series(1,1000) x; +--Testcase 507: +insert into fkest1 select x/10, x%10 from generate_series(1,1000) x; +--Testcase 508: +explain (costs off) +select * +from fkest f + left join fkest1 f1 on f.a = f1.a and f.b = f1.b + left join fkest1 f2 on f.a = f2.a and f.b = f2.b + left join fkest1 f3 on f.a = f3.a and f.b = f3.b +where f.c = 1; + QUERY PLAN +---------------------------------------------------------------------- + Hash Right Join + Hash Cond: ((f3.a = f.a) AND (f3.b = f.b)) + -> Foreign Scan on fkest1 f3 + -> Hash + -> Hash Right Join + Hash Cond: ((f2.a = f.a) AND (f2.b = f.b)) + -> Foreign Scan on fkest1 f2 + -> Hash + -> Hash Right Join + Hash Cond: ((f1.a = f.a) AND (f1.b = f.b)) + -> Foreign Scan on fkest1 f1 + -> Hash + -> Foreign Scan on fkest f +(13 rows) + +rollback; +-- +-- test planner's ability to mark joins as unique +-- +--Testcase 509: +create foreign table j1 (id int) server influxdb_svr; +--Testcase 510: +create foreign table j2 (id int) server influxdb_svr; +--Testcase 511: +create foreign table j3 (id int) server influxdb_svr; +--Testcase 512: +insert into j1 values(1),(2),(3); +--Testcase 513: +insert into j2 values(1),(2),(3); +--Testcase 514: +insert into j3 values(1),(1); +-- ensure join is properly marked as unique +--Testcase 515: +explain (verbose, costs off) +select * from j1 inner join j2 on j1.id = j2.id; + QUERY PLAN +----------------------------------------------------- + Merge Join + Output: j1.id, j2.id + Merge Cond: (j1.id = j2.id) + -> Sort + Output: j1.id + Sort Key: j1.id + -> Foreign Scan on public.j1 + Output: j1.id + InfluxDB query: SELECT "id" FROM "j1" + -> Sort + Output: j2.id + Sort Key: j2.id + -> Foreign Scan on public.j2 + Output: j2.id + InfluxDB query: SELECT "id" FROM "j2" +(15 rows) + +-- ensure join is not unique when not an equi-join +--Testcase 516: +explain (verbose, costs off) +select * from j1 inner join j2 on j1.id > j2.id; + QUERY PLAN +----------------------------------------------------- + Nested Loop + Output: j1.id, j2.id + Join Filter: (j1.id > j2.id) + -> Foreign Scan on public.j1 + Output: j1.id + InfluxDB query: SELECT "id" FROM "j1" + -> Materialize + Output: j2.id + -> Foreign Scan on public.j2 + Output: j2.id + InfluxDB query: SELECT "id" FROM "j2" +(11 rows) + +-- ensure non-unique rel is not chosen as inner +--Testcase 517: +explain (verbose, costs off) +select * from j1 inner join j3 on j1.id = j3.id; + QUERY PLAN +----------------------------------------------------- + Merge Join + Output: j1.id, j3.id + Merge Cond: (j1.id = j3.id) + -> Sort + Output: j1.id + Sort Key: j1.id + -> Foreign Scan on public.j1 + Output: j1.id + InfluxDB query: SELECT "id" FROM "j1" + -> Sort + Output: j3.id + Sort Key: j3.id + -> Foreign Scan on public.j3 + Output: j3.id + InfluxDB query: SELECT "id" FROM "j3" +(15 rows) + +-- ensure left join is marked as unique +--Testcase 518: +explain (verbose, costs off) +select * from j1 left join j2 on j1.id = j2.id; + QUERY PLAN +----------------------------------------------------- + Merge Left Join + Output: j1.id, j2.id + Merge Cond: (j1.id = j2.id) + -> Sort + Output: j1.id + Sort Key: j1.id + -> Foreign Scan on public.j1 + Output: j1.id + InfluxDB query: SELECT "id" FROM "j1" + -> Sort + Output: j2.id + Sort Key: j2.id + -> Foreign Scan on public.j2 + Output: j2.id + InfluxDB query: SELECT "id" FROM "j2" +(15 rows) + +-- ensure right join is marked as unique +--Testcase 519: +explain (verbose, costs off) +select * from j1 right join j2 on j1.id = j2.id; + QUERY PLAN +----------------------------------------------------- + Merge Left Join + Output: j1.id, j2.id + Merge Cond: (j2.id = j1.id) + -> Sort + Output: j2.id + Sort Key: j2.id + -> Foreign Scan on public.j2 + Output: j2.id + InfluxDB query: SELECT "id" FROM "j2" + -> Sort + Output: j1.id + Sort Key: j1.id + -> Foreign Scan on public.j1 + Output: j1.id + InfluxDB query: SELECT "id" FROM "j1" +(15 rows) + +-- ensure full join is marked as unique +--Testcase 520: +explain (verbose, costs off) +select * from j1 full join j2 on j1.id = j2.id; + QUERY PLAN +----------------------------------------------------- + Merge Full Join + Output: j1.id, j2.id + Merge Cond: (j1.id = j2.id) + -> Sort + Output: j1.id + Sort Key: j1.id + -> Foreign Scan on public.j1 + Output: j1.id + InfluxDB query: SELECT "id" FROM "j1" + -> Sort + Output: j2.id + Sort Key: j2.id + -> Foreign Scan on public.j2 + Output: j2.id + InfluxDB query: SELECT "id" FROM "j2" +(15 rows) + +-- a clauseless (cross) join can't be unique +--Testcase 521: +explain (verbose, costs off) +select * from j1 cross join j2; + QUERY PLAN +----------------------------------------------------- + Nested Loop + Output: j1.id, j2.id + -> Foreign Scan on public.j1 + Output: j1.id + InfluxDB query: SELECT "id" FROM "j1" + -> Materialize + Output: j2.id + -> Foreign Scan on public.j2 + Output: j2.id + InfluxDB query: SELECT "id" FROM "j2" +(10 rows) + +-- ensure a natural join is marked as unique +--Testcase 522: +explain (verbose, costs off) +select * from j1 natural join j2; + QUERY PLAN +----------------------------------------------------- + Merge Join + Output: j1.id + Merge Cond: (j1.id = j2.id) + -> Sort + Output: j1.id + Sort Key: j1.id + -> Foreign Scan on public.j1 + Output: j1.id + InfluxDB query: SELECT "id" FROM "j1" + -> Sort + Output: j2.id + Sort Key: j2.id + -> Foreign Scan on public.j2 + Output: j2.id + InfluxDB query: SELECT "id" FROM "j2" +(15 rows) + +-- ensure a distinct clause allows the inner to become unique +--Testcase 523: +explain (verbose, costs off) +select * from j1 +inner join (select distinct id from j3) j3 on j1.id = j3.id; + QUERY PLAN +----------------------------------------------------------- + Hash Join + Output: j1.id, j3.id + Inner Unique: true + Hash Cond: (j1.id = j3.id) + -> Foreign Scan on public.j1 + Output: j1.id + InfluxDB query: SELECT "id" FROM "j1" + -> Hash + Output: j3.id + -> HashAggregate + Output: j3.id + Group Key: j3.id + -> Foreign Scan on public.j3 + Output: j3.id + InfluxDB query: SELECT "id" FROM "j3" +(15 rows) + +-- ensure group by clause allows the inner to become unique +--Testcase 524: +explain (verbose, costs off) +select * from j1 +inner join (select id from j3 group by id) j3 on j1.id = j3.id; + QUERY PLAN +----------------------------------------------------------- + Hash Join + Output: j1.id, j3.id + Inner Unique: true + Hash Cond: (j1.id = j3.id) + -> Foreign Scan on public.j1 + Output: j1.id + InfluxDB query: SELECT "id" FROM "j1" + -> Hash + Output: j3.id + -> HashAggregate + Output: j3.id + Group Key: j3.id + -> Foreign Scan on public.j3 + Output: j3.id + InfluxDB query: SELECT "id" FROM "j3" +(15 rows) + +--Testcase 525: +delete from j1; +--Testcase 526: +delete from j2; +--Testcase 527: +delete from j3; +--Testcase 528: +drop foreign table j1; +--Testcase 529: +drop foreign table j2; +--Testcase 530: +drop foreign table j3; +-- test more complex permutations of unique joins +--Testcase 531: +create foreign table j1 (id1 int, id2 int) server influxdb_svr; +--Testcase 532: +create foreign table j2 (id1 int, id2 int) server influxdb_svr; +--Testcase 533: +create foreign table j3 (id1 int, id2 int) server influxdb_svr; +--Testcase 534: +insert into j1 values(1,1),(1,2); +--Testcase 535: +insert into j2 values(1,1); +--Testcase 536: +insert into j3 values(1,1); +-- ensure there's no unique join when not all columns which are part of the +-- unique index are seen in the join clause +--Testcase 537: +explain (verbose, costs off) +select * from j1 +inner join j2 on j1.id1 = j2.id1; + QUERY PLAN +------------------------------------------------------------- + Merge Join + Output: j1.id1, j1.id2, j2.id1, j2.id2 + Merge Cond: (j1.id1 = j2.id1) + -> Sort + Output: j1.id1, j1.id2 + Sort Key: j1.id1 + -> Foreign Scan on public.j1 + Output: j1.id1, j1.id2 + InfluxDB query: SELECT "id1", "id2" FROM "j1" + -> Sort + Output: j2.id1, j2.id2 + Sort Key: j2.id1 + -> Foreign Scan on public.j2 + Output: j2.id1, j2.id2 + InfluxDB query: SELECT "id1", "id2" FROM "j2" +(15 rows) + +-- ensure proper unique detection with multiple join quals +--Testcase 538: +explain (verbose, costs off) +select * from j1 +inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2; + QUERY PLAN +------------------------------------------------------------- + Merge Join + Output: j1.id1, j1.id2, j2.id1, j2.id2 + Merge Cond: ((j1.id1 = j2.id1) AND (j1.id2 = j2.id2)) + -> Sort + Output: j1.id1, j1.id2 + Sort Key: j1.id1, j1.id2 + -> Foreign Scan on public.j1 + Output: j1.id1, j1.id2 + InfluxDB query: SELECT "id1", "id2" FROM "j1" + -> Sort + Output: j2.id1, j2.id2 + Sort Key: j2.id1, j2.id2 + -> Foreign Scan on public.j2 + Output: j2.id1, j2.id2 + InfluxDB query: SELECT "id1", "id2" FROM "j2" +(15 rows) + +-- ensure we don't detect the join to be unique when quals are not part of the +-- join condition +--Testcase 539: +explain (verbose, costs off) +select * from j1 +inner join j2 on j1.id1 = j2.id1 where j1.id2 = 1; + QUERY PLAN +--------------------------------------------------------------------------------- + Hash Join + Output: j1.id1, j1.id2, j2.id1, j2.id2 + Hash Cond: (j2.id1 = j1.id1) + -> Foreign Scan on public.j2 + Output: j2.id1, j2.id2 + InfluxDB query: SELECT "id1", "id2" FROM "j2" + -> Hash + Output: j1.id1, j1.id2 + -> Foreign Scan on public.j1 + Output: j1.id1, j1.id2 + InfluxDB query: SELECT "id1", "id2" FROM "j1" WHERE (("id2" = 1)) +(11 rows) + +-- as above, but for left joins. +--Testcase 540: +explain (verbose, costs off) +select * from j1 +left join j2 on j1.id1 = j2.id1 where j1.id2 = 1; + QUERY PLAN +--------------------------------------------------------------------------------- + Hash Right Join + Output: j1.id1, j1.id2, j2.id1, j2.id2 + Hash Cond: (j2.id1 = j1.id1) + -> Foreign Scan on public.j2 + Output: j2.id1, j2.id2 + InfluxDB query: SELECT "id1", "id2" FROM "j2" + -> Hash + Output: j1.id1, j1.id2 + -> Foreign Scan on public.j1 + Output: j1.id1, j1.id2 + InfluxDB query: SELECT "id1", "id2" FROM "j1" WHERE (("id2" = 1)) +(11 rows) + +-- validate logic in merge joins which skips mark and restore. +-- it should only do this if all quals which were used to detect the unique +-- are present as join quals, and not plain quals. +--Testcase 541: +set enable_nestloop to 0; +--Testcase 542: +set enable_hashjoin to 0; +--Testcase 543: +set enable_sort to 0; +-- create indexes that will be preferred over the PKs to perform the join +--create index j1_id1_idx on j1 (id1) where id1 % 1000 = 1; +--create index j2_id1_idx on j2 (id1) where id1 % 1000 = 1; +-- need an additional row in j2, if we want j2_id1_idx to be preferred +--Testcase 544: +insert into j2 values(1,2); +--analyze j2; +--Testcase 545: +explain (costs off) select * from j1 +inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1; + QUERY PLAN +---------------------------------------------------------- + Nested Loop + Join Filter: ((j1.id1 = j2.id1) AND (j1.id2 = j2.id2)) + -> Foreign Scan on j1 + -> Materialize + -> Foreign Scan on j2 +(5 rows) + +--Testcase 546: +select * from j1 +inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1; + id1 | id2 | id1 | id2 +-----+-----+-----+----- + 1 | 1 | 1 | 1 + 1 | 2 | 1 | 2 +(2 rows) + +-- Exercise array keys mark/restore B-Tree code +--Testcase 547: +explain (costs off) select * from j1 +inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 = any (array[1]); + QUERY PLAN +---------------------------------------------------------- + Nested Loop + Join Filter: ((j1.id1 = j2.id1) AND (j1.id2 = j2.id2)) + -> Foreign Scan on j1 + -> Materialize + -> Foreign Scan on j2 +(5 rows) + +--Testcase 548: +select * from j1 +inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 = any (array[1]); + id1 | id2 | id1 | id2 +-----+-----+-----+----- + 1 | 1 | 1 | 1 + 1 | 2 | 1 | 2 +(2 rows) + +-- Exercise array keys "find extreme element" B-Tree code +--Testcase 549: +explain (costs off) select * from j1 +inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 >= any (array[1,5]); + QUERY PLAN +---------------------------------------------------------- + Nested Loop + Join Filter: ((j1.id1 = j2.id1) AND (j1.id2 = j2.id2)) + -> Foreign Scan on j1 + -> Materialize + -> Foreign Scan on j2 +(5 rows) + +--Testcase 550: +select * from j1 +inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 >= any (array[1,5]); + id1 | id2 | id1 | id2 +-----+-----+-----+----- + 1 | 1 | 1 | 1 + 1 | 2 | 1 | 2 +(2 rows) + +--Testcase 551: +reset enable_nestloop; +--Testcase 552: +reset enable_hashjoin; +--Testcase 553: +reset enable_sort; +--Testcase 554: +delete from j1; +--Testcase 555: +delete from j2; +--Testcase 556: +delete from j3; +--Testcase 557: +drop foreign table j1; +--Testcase 558: +drop foreign table j2; +--Testcase 559: +drop foreign table j3; +-- check that semijoin inner is not seen as unique for a portion of the outerrel +--Testcase 560: +CREATE FOREIGN TABLE onek ( + unique1 int4, + unique2 int4, + two int4, + four int4, + ten int4, + twenty int4, + hundred int4, + thousand int4, + twothousand int4, + fivethous int4, + tenthous int4, + odd int4, + even int4, + stringu1 name, + stringu2 name, + string4 name +) SERVER influxdb_svr; +-- check that semijoin inner is not seen as unique for a portion of the outerrel +--Testcase 561: +explain (verbose, costs off) +select t1.unique1, t2.hundred +from onek t1, tenk1 t2 +where exists (select 1 from tenk1 t3 + where t3.thousand = t1.unique1 and t3.tenthous = t2.hundred) + and t1.unique1 < 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Join + Output: t1.unique1, t2.hundred + Hash Cond: (t2.hundred = t3.tenthous) + -> Foreign Scan on public.tenk1 t2 + Output: t2.unique1, t2.unique2, t2.two, t2.four, t2.ten, t2.twenty, t2.hundred, t2.thousand, t2.twothousand, t2.fivethous, t2.tenthous, t2.odd, t2.even, t2.stringu1, t2.stringu2, t2.string4 + InfluxDB query: SELECT "hundred" FROM "tenk" + -> Hash + Output: t1.unique1, t3.tenthous + -> Hash Join + Output: t1.unique1, t3.tenthous + Hash Cond: (t1.unique1 = t3.thousand) + -> Foreign Scan on public.onek t1 + Output: t1.unique1, t1.unique2, t1.two, t1.four, t1.ten, t1.twenty, t1.hundred, t1.thousand, t1.twothousand, t1.fivethous, t1.tenthous, t1.odd, t1.even, t1.stringu1, t1.stringu2, t1.string4 + InfluxDB query: SELECT "unique1" FROM "onek" WHERE (("unique1" < 1)) + -> Hash + Output: t3.thousand, t3.tenthous + -> HashAggregate + Output: t3.thousand, t3.tenthous + Group Key: t3.thousand, t3.tenthous + -> Foreign Scan on public.tenk1 t3 + Output: t3.thousand, t3.tenthous + InfluxDB query: SELECT "thousand", "tenthous" FROM "tenk" +(22 rows) + +-- ... unless it actually is unique +--Testcase 562: +create table j3 as select unique1, tenthous from onek; +vacuum analyze j3; +--Testcase 563: +create unique index on j3(unique1, tenthous); +--Testcase 564: +explain (verbose, costs off) +select t1.unique1, t2.hundred +from onek t1, tenk1 t2 +where exists (select 1 from j3 + where j3.unique1 = t1.unique1 and j3.tenthous = t2.hundred) + and t1.unique1 < 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Join + Output: t1.unique1, t2.hundred + Hash Cond: (t2.hundred = j3.tenthous) + -> Foreign Scan on public.tenk1 t2 + Output: t2.unique1, t2.unique2, t2.two, t2.four, t2.ten, t2.twenty, t2.hundred, t2.thousand, t2.twothousand, t2.fivethous, t2.tenthous, t2.odd, t2.even, t2.stringu1, t2.stringu2, t2.string4 + InfluxDB query: SELECT "hundred" FROM "tenk" + -> Hash + Output: t1.unique1, j3.tenthous + -> Hash Join + Output: t1.unique1, j3.tenthous + Hash Cond: (t1.unique1 = j3.unique1) + -> Foreign Scan on public.onek t1 + Output: t1.unique1, t1.unique2, t1.two, t1.four, t1.ten, t1.twenty, t1.hundred, t1.thousand, t1.twothousand, t1.fivethous, t1.tenthous, t1.odd, t1.even, t1.stringu1, t1.stringu2, t1.string4 + InfluxDB query: SELECT "unique1" FROM "onek" WHERE (("unique1" < 1)) + -> Hash + Output: j3.unique1, j3.tenthous + -> Seq Scan on public.j3 + Output: j3.unique1, j3.tenthous +(18 rows) + +--Testcase 565: +drop table j3; +-- Clean up +--Testcase 583: +DELETE FROM t1; +--Testcase 584: +DELETE FROM t2; +--Testcase 585: +DELETE FROM t3; +--Testcase 586: +DELETE FROM tt1; +--Testcase 587: +DELETE FROM tt2; +--Testcase 588: +DELETE FROM tt3; +--Testcase 589: +DELETE FROM tt4; +--Testcase 590: +DELETE FROM tt5; +--Testcase 591: +DELETE FROM tt6; +--Testcase 592: +DELETE FROM xx; +--Testcase 593: +DELETE FROM yy; +--Testcase 594: +DELETE FROM zt1; +--Testcase 595: +DELETE FROM zt2; +--Testcase 596: +DELETE FROM nt1; +--Testcase 597: +DELETE FROM nt2; +--Testcase 598: +DELETE FROM nt3; +--Testcase 599: +DELETE FROM parent; +--Testcase 600: +DELETE FROM child; +DO $d$ +declare + l_rec record; +begin + for l_rec in (select foreign_table_schema, foreign_table_name + from information_schema.foreign_tables) loop + execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); + end loop; +end; +$d$; +NOTICE: drop cascades to table t2a +NOTICE: drop cascades to view zv1 +--Testcase 566: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 567: +DROP SERVER influxdb_svr CASCADE; +--Testcase 568: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/15.0/extra/limit.out b/expected/15.0/extra/limit.out new file mode 100644 index 0000000..acff225 --- /dev/null +++ b/expected/15.0/extra/limit.out @@ -0,0 +1,863 @@ +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +-- +-- LIMIT +-- Check the LIMIT/OFFSET feature of SELECT +-- +--Testcase 4: +CREATE FOREIGN TABLE onek ( + unique1 int4, + unique2 int4, + two int4, + four int4, + ten int4, + twenty int4, + hundred int4, + thousand int4, + twothousand int4, + fivethous int4, + tenthous int4, + odd int4, + even int4, + stringu1 name, + stringu2 name, + string4 name +) SERVER influxdb_svr; +--Testcase 5: +CREATE FOREIGN TABLE int8_tbl(q1 int8, q2 int8) SERVER influxdb_svr; +--Testcase 6: +CREATE FOREIGN TABLE tenk1 ( + unique1 int4, + unique2 int4, + two int4, + four int4, + ten int4, + twenty int4, + hundred int4, + thousand int4, + twothousand int4, + fivethous int4, + tenthous int4, + odd int4, + even int4, + stringu1 name, + stringu2 name, + string4 name +) SERVER influxdb_svr OPTIONS (table 'tenk'); +--Testcase 7: +SELECT ''::text AS two, unique1, unique2, stringu1 + FROM onek WHERE unique1 > 50 + ORDER BY unique1 LIMIT 2; + two | unique1 | unique2 | stringu1 +-----+---------+---------+---------- + | 51 | 76 | ZBAAAA + | 52 | 985 | ACAAAA +(2 rows) + +--Testcase 8: +SELECT ''::text AS five, unique1, unique2, stringu1 + FROM onek WHERE unique1 > 60 + ORDER BY unique1 LIMIT 5; + five | unique1 | unique2 | stringu1 +------+---------+---------+---------- + | 61 | 560 | JCAAAA + | 62 | 633 | KCAAAA + | 63 | 296 | LCAAAA + | 64 | 479 | MCAAAA + | 65 | 64 | NCAAAA +(5 rows) + +--Testcase 9: +SELECT ''::text AS two, unique1, unique2, stringu1 + FROM onek WHERE unique1 > 60 AND unique1 < 63 + ORDER BY unique1 LIMIT 5; + two | unique1 | unique2 | stringu1 +-----+---------+---------+---------- + | 61 | 560 | JCAAAA + | 62 | 633 | KCAAAA +(2 rows) + +--Testcase 10: +SELECT ''::text AS three, unique1, unique2, stringu1 + FROM onek WHERE unique1 > 100 + ORDER BY unique1 LIMIT 3 OFFSET 20; + three | unique1 | unique2 | stringu1 +-------+---------+---------+---------- + | 121 | 700 | REAAAA + | 122 | 519 | SEAAAA + | 123 | 777 | TEAAAA +(3 rows) + +--Testcase 11: +SELECT ''::text AS zero, unique1, unique2, stringu1 + FROM onek WHERE unique1 < 50 + ORDER BY unique1 DESC LIMIT 8 OFFSET 99; + zero | unique1 | unique2 | stringu1 +------+---------+---------+---------- +(0 rows) + +--Testcase 12: +SELECT ''::text AS eleven, unique1, unique2, stringu1 + FROM onek WHERE unique1 < 50 + ORDER BY unique1 DESC LIMIT 20 OFFSET 39; + eleven | unique1 | unique2 | stringu1 +--------+---------+---------+---------- + | 10 | 520 | KAAAAA + | 9 | 49 | JAAAAA + | 8 | 653 | IAAAAA + | 7 | 647 | HAAAAA + | 6 | 978 | GAAAAA + | 5 | 541 | FAAAAA + | 4 | 833 | EAAAAA + | 3 | 431 | DAAAAA + | 2 | 326 | CAAAAA + | 1 | 214 | BAAAAA + | 0 | 998 | AAAAAA +(11 rows) + +--Testcase 13: +SELECT ''::text AS ten, unique1, unique2, stringu1 + FROM onek + ORDER BY unique1 OFFSET 990; + ten | unique1 | unique2 | stringu1 +-----+---------+---------+---------- + | 990 | 369 | CMAAAA + | 991 | 426 | DMAAAA + | 992 | 363 | EMAAAA + | 993 | 661 | FMAAAA + | 994 | 695 | GMAAAA + | 995 | 144 | HMAAAA + | 996 | 258 | IMAAAA + | 997 | 21 | JMAAAA + | 998 | 549 | KMAAAA + | 999 | 152 | LMAAAA +(10 rows) + +--Testcase 14: +SELECT ''::text AS five, unique1, unique2, stringu1 + FROM onek + ORDER BY unique1 OFFSET 990 LIMIT 5; + five | unique1 | unique2 | stringu1 +------+---------+---------+---------- + | 990 | 369 | CMAAAA + | 991 | 426 | DMAAAA + | 992 | 363 | EMAAAA + | 993 | 661 | FMAAAA + | 994 | 695 | GMAAAA +(5 rows) + +--Testcase 15: +SELECT ''::text AS five, unique1, unique2, stringu1 + FROM onek + ORDER BY unique1 LIMIT 5 OFFSET 900; + five | unique1 | unique2 | stringu1 +------+---------+---------+---------- + | 900 | 913 | QIAAAA + | 901 | 931 | RIAAAA + | 902 | 702 | SIAAAA + | 903 | 641 | TIAAAA + | 904 | 793 | UIAAAA +(5 rows) + +-- Test null limit and offset. The planner would discard a simple null +-- constant, so to ensure executor is exercised, do this: +--Testcase 16: +select * from int8_tbl limit (case when random() < 0.5 then null::bigint end); + q1 | q2 +------------------+------------------- + 123 | 456 + 123 | 4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(5 rows) + +--Testcase 17: +select * from int8_tbl offset (case when random() < 0.5 then null::bigint end); + q1 | q2 +------------------+------------------- + 123 | 456 + 123 | 4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(5 rows) + +-- Test assorted cases involving backwards fetch from a LIMIT plan node +begin; +declare c1 scroll cursor for select * from int8_tbl limit 10; +--Testcase 18: +fetch all in c1; + q1 | q2 +------------------+------------------- + 123 | 456 + 123 | 4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(5 rows) + +--Testcase 19: +fetch 1 in c1; + q1 | q2 +----+---- +(0 rows) + +--Testcase 20: +fetch backward 1 in c1; + q1 | q2 +------------------+------------------- + 4567890123456789 | -4567890123456789 +(1 row) + +--Testcase 21: +fetch backward all in c1; + q1 | q2 +------------------+------------------ + 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 + 123 | 4567890123456789 + 123 | 456 +(4 rows) + +--Testcase 22: +fetch backward 1 in c1; + q1 | q2 +----+---- +(0 rows) + +--Testcase 23: +fetch all in c1; + q1 | q2 +------------------+------------------- + 123 | 456 + 123 | 4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(5 rows) + +declare c2 scroll cursor for select * from int8_tbl limit 3; +--Testcase 24: +fetch all in c2; + q1 | q2 +------------------+------------------ + 123 | 456 + 123 | 4567890123456789 + 4567890123456789 | 123 +(3 rows) + +--Testcase 25: +fetch 1 in c2; + q1 | q2 +----+---- +(0 rows) + +--Testcase 26: +fetch backward 1 in c2; + q1 | q2 +------------------+----- + 4567890123456789 | 123 +(1 row) + +--Testcase 27: +fetch backward all in c2; + q1 | q2 +-----+------------------ + 123 | 4567890123456789 + 123 | 456 +(2 rows) + +--Testcase 28: +fetch backward 1 in c2; + q1 | q2 +----+---- +(0 rows) + +--Testcase 29: +fetch all in c2; + q1 | q2 +------------------+------------------ + 123 | 456 + 123 | 4567890123456789 + 4567890123456789 | 123 +(3 rows) + +declare c3 scroll cursor for select * from int8_tbl offset 3; +--Testcase 30: +fetch all in c3; + q1 | q2 +------------------+------------------- + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(2 rows) + +--Testcase 31: +fetch 1 in c3; + q1 | q2 +----+---- +(0 rows) + +--Testcase 32: +fetch backward 1 in c3; + q1 | q2 +------------------+------------------- + 4567890123456789 | -4567890123456789 +(1 row) + +--Testcase 33: +fetch backward all in c3; + q1 | q2 +------------------+------------------ + 4567890123456789 | 4567890123456789 +(1 row) + +--Testcase 34: +fetch backward 1 in c3; + q1 | q2 +----+---- +(0 rows) + +--Testcase 35: +fetch all in c3; + q1 | q2 +------------------+------------------- + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(2 rows) + +declare c4 scroll cursor for select * from int8_tbl offset 10; +--Testcase 36: +fetch all in c4; + q1 | q2 +----+---- +(0 rows) + +--Testcase 37: +fetch 1 in c4; + q1 | q2 +----+---- +(0 rows) + +--Testcase 38: +fetch backward 1 in c4; + q1 | q2 +----+---- +(0 rows) + +--Testcase 39: +fetch backward all in c4; + q1 | q2 +----+---- +(0 rows) + +--Testcase 40: +fetch backward 1 in c4; + q1 | q2 +----+---- +(0 rows) + +--Testcase 41: +fetch all in c4; + q1 | q2 +----+---- +(0 rows) + +declare c5 scroll cursor for select * from int8_tbl order by q1 fetch first 2 rows with ties; +--Testcase 42: +fetch all in c5; + q1 | q2 +-----+------------------ + 123 | 456 + 123 | 4567890123456789 +(2 rows) + +--Testcase 43: +fetch 1 in c5; + q1 | q2 +----+---- +(0 rows) + +--Testcase 44: +fetch backward 1 in c5; + q1 | q2 +-----+------------------ + 123 | 4567890123456789 +(1 row) + +--Testcase 45: +fetch backward 1 in c5; + q1 | q2 +-----+----- + 123 | 456 +(1 row) + +--Testcase 46: +fetch all in c5; + q1 | q2 +-----+------------------ + 123 | 4567890123456789 +(1 row) + +--Testcase 47: +fetch backward all in c5; + q1 | q2 +-----+------------------ + 123 | 4567890123456789 + 123 | 456 +(2 rows) + +--Testcase 48: +fetch all in c5; + q1 | q2 +-----+------------------ + 123 | 456 + 123 | 4567890123456789 +(2 rows) + +--Testcase 49: +fetch backward all in c5; + q1 | q2 +-----+------------------ + 123 | 4567890123456789 + 123 | 456 +(2 rows) + +rollback; +-- Stress test for variable LIMIT in conjunction with bounded-heap sorting +--Testcase 50: +CREATE FOREIGN TABLE generate_series4(a int) SERVER influxdb_svr; +--Testcase 51: +SELECT + (SELECT a + FROM (VALUES (1)) AS x, + (SELECT a FROM generate_series4 AS n + ORDER BY a LIMIT 1 OFFSET s.a-1) AS y) AS z + FROM generate_series4 AS s; + z +---- + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 +(10 rows) + +-- +-- Test behavior of volatile and set-returning functions in conjunction +-- with ORDER BY and LIMIT. +-- +--Testcase 52: +create temp sequence testseq; +--Testcase 53: +explain (verbose, costs off) +select unique1, unique2, nextval('testseq') + from tenk1 order by unique2 limit 10; + QUERY PLAN +----------------------------------------------------------------------------- + Limit + Output: unique1, unique2, (nextval('testseq'::regclass)) + -> Result + Output: unique1, unique2, nextval('testseq'::regclass) + -> Sort + Output: unique1, unique2 + Sort Key: tenk1.unique2 + -> Foreign Scan on public.tenk1 + Output: unique1, unique2 + InfluxDB query: SELECT "unique1", "unique2" FROM "tenk" +(10 rows) + +--Testcase 54: +select unique1, unique2, nextval('testseq') + from tenk1 order by unique2 limit 10; + unique1 | unique2 | nextval +---------+---------+--------- + 8800 | 0 | 1 + 1891 | 1 | 2 + 3420 | 2 | 3 + 9850 | 3 | 4 + 7164 | 4 | 5 + 8009 | 5 | 6 + 5057 | 6 | 7 + 6701 | 7 | 8 + 4321 | 8 | 9 + 3043 | 9 | 10 +(10 rows) + +--Testcase 55: +select currval('testseq'); + currval +--------- + 10 +(1 row) + +--Testcase 56: +explain (verbose, costs off) +select unique1, unique2, nextval('testseq') + from tenk1 order by tenthous limit 10; + QUERY PLAN +----------------------------------------------------------------------------------------- + Limit + Output: unique1, unique2, (nextval('testseq'::regclass)), tenthous + -> Result + Output: unique1, unique2, nextval('testseq'::regclass), tenthous + -> Sort + Output: unique1, unique2, tenthous + Sort Key: tenk1.tenthous + -> Foreign Scan on public.tenk1 + Output: unique1, unique2, tenthous + InfluxDB query: SELECT "unique1", "unique2", "tenthous" FROM "tenk" +(10 rows) + +--Testcase 57: +select unique1, unique2, nextval('testseq') + from tenk1 order by tenthous limit 10; + unique1 | unique2 | nextval +---------+---------+--------- + 0 | 9998 | 11 + 1 | 2838 | 12 + 2 | 2716 | 13 + 3 | 5679 | 14 + 4 | 1621 | 15 + 5 | 5557 | 16 + 6 | 2855 | 17 + 7 | 8518 | 18 + 8 | 5435 | 19 + 9 | 4463 | 20 +(10 rows) + +--Testcase 58: +select currval('testseq'); + currval +--------- + 20 +(1 row) + +--Testcase 59: +explain (verbose, costs off) +select unique1, unique2, generate_series(1,10) + from tenk1 order by unique2 limit 7; + QUERY PLAN +----------------------------------------------------------------------------- + Limit + Output: unique1, unique2, (generate_series(1, 10)) + -> ProjectSet + Output: unique1, unique2, generate_series(1, 10) + -> Sort + Output: unique1, unique2 + Sort Key: tenk1.unique2 + -> Foreign Scan on public.tenk1 + Output: unique1, unique2 + InfluxDB query: SELECT "unique1", "unique2" FROM "tenk" +(10 rows) + +--Testcase 60: +select unique1, unique2, generate_series(1,10) + from tenk1 order by unique2 limit 7; + unique1 | unique2 | generate_series +---------+---------+----------------- + 8800 | 0 | 1 + 8800 | 0 | 2 + 8800 | 0 | 3 + 8800 | 0 | 4 + 8800 | 0 | 5 + 8800 | 0 | 6 + 8800 | 0 | 7 +(7 rows) + +--Testcase 61: +explain (verbose, costs off) +select unique1, unique2, generate_series(1,10) + from tenk1 order by tenthous limit 7; + QUERY PLAN +----------------------------------------------------------------------------------------- + Limit + Output: unique1, unique2, (generate_series(1, 10)), tenthous + -> ProjectSet + Output: unique1, unique2, generate_series(1, 10), tenthous + -> Sort + Output: unique1, unique2, tenthous + Sort Key: tenk1.tenthous + -> Foreign Scan on public.tenk1 + Output: unique1, unique2, tenthous + InfluxDB query: SELECT "unique1", "unique2", "tenthous" FROM "tenk" +(10 rows) + +--Testcase 62: +select unique1, unique2, generate_series(1,10) + from tenk1 order by tenthous limit 7; + unique1 | unique2 | generate_series +---------+---------+----------------- + 0 | 9998 | 1 + 0 | 9998 | 2 + 0 | 9998 | 3 + 0 | 9998 | 4 + 0 | 9998 | 5 + 0 | 9998 | 6 + 0 | 9998 | 7 +(7 rows) + +-- use of random() is to keep planner from folding the expressions together +--Testcase 63: +explain (verbose, costs off) +select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + ProjectSet + Output: generate_series(0, 2), generate_series(((random() * '0.1'::double precision))::integer, 2) + -> Result +(3 rows) + +--Testcase 64: +select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; + s1 | s2 +----+---- + 0 | 0 + 1 | 1 + 2 | 2 +(3 rows) + +--Testcase 65: +explain (verbose, costs off) +select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2 +order by s2 desc; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Sort + Output: (generate_series(0, 2)), (generate_series(((random() * '0.1'::double precision))::integer, 2)) + Sort Key: (generate_series(((random() * '0.1'::double precision))::integer, 2)) DESC + -> ProjectSet + Output: generate_series(0, 2), generate_series(((random() * '0.1'::double precision))::integer, 2) + -> Result +(6 rows) + +--Testcase 66: +select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2 +order by s2 desc; + s1 | s2 +----+---- + 2 | 2 + 1 | 1 + 0 | 0 +(3 rows) + +-- test for failure to set all aggregates' aggtranstype +--Testcase 67: +explain (verbose, costs off) +select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2 + from tenk1 group by thousand order by thousand limit 3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (sum(tenthous)), ((((sum(tenthous)))::double precision + (random() * '0'::double precision))), thousand + -> Result + Output: (sum(tenthous)), (((sum(tenthous)))::double precision + (random() * '0'::double precision)), thousand + -> Sort + Output: (sum(tenthous)), thousand + Sort Key: tenk1.thousand + -> HashAggregate + Output: sum(tenthous), thousand + Group Key: tenk1.thousand + -> Foreign Scan on public.tenk1 + Output: unique1, unique2, two, four, ten, twenty, hundred, thousand, twothousand, fivethous, tenthous, odd, even, stringu1, stringu2, string4 + InfluxDB query: SELECT "thousand", "tenthous" FROM "tenk" +(13 rows) + +--Testcase 68: +select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2 + from tenk1 group by thousand order by thousand limit 3; + s1 | s2 +-------+------- + 45000 | 45000 + 45010 | 45010 + 45020 | 45020 +(3 rows) + +-- +-- FETCH FIRST +-- Check the WITH TIES clause +-- +--Testcase 69: +SELECT thousand + FROM onek WHERE thousand < 5 + ORDER BY thousand FETCH FIRST 2 ROW WITH TIES; + thousand +---------- + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 +(10 rows) + +--Testcase 70: +SELECT thousand + FROM onek WHERE thousand < 5 + ORDER BY thousand FETCH FIRST ROWS WITH TIES; + thousand +---------- + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 +(10 rows) + +--Testcase 71: +SELECT thousand + FROM onek WHERE thousand < 5 + ORDER BY thousand FETCH FIRST 1 ROW WITH TIES; + thousand +---------- + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 +(10 rows) + +--Testcase 72: +SELECT thousand + FROM onek WHERE thousand < 5 + ORDER BY thousand FETCH FIRST 2 ROW ONLY; + thousand +---------- + 0 + 0 +(2 rows) + +-- SKIP LOCKED and WITH TIES are incompatible +--Testcase 90: +SELECT thousand + FROM onek WHERE thousand < 5 + ORDER BY thousand FETCH FIRST 1 ROW WITH TIES FOR UPDATE SKIP LOCKED; +ERROR: SKIP LOCKED and WITH TIES options cannot be used together +-- should fail +--Testcase 73: +SELECT ''::text AS two, unique1, unique2, stringu1 + FROM onek WHERE unique1 > 50 + FETCH FIRST 2 ROW WITH TIES; +ERROR: WITH TIES cannot be specified without ORDER BY clause +-- test ruleutils +--Testcase 74: +CREATE VIEW limit_thousand_v_1 AS SELECT thousand FROM onek WHERE thousand < 995 + ORDER BY thousand FETCH FIRST 5 ROWS WITH TIES OFFSET 10; +--Testcase 75: +\d+ limit_thousand_v_1 + View "public.limit_thousand_v_1" + Column | Type | Collation | Nullable | Default | Storage | Description +----------+---------+-----------+----------+---------+---------+------------- + thousand | integer | | | | plain | +View definition: + SELECT onek.thousand + FROM onek + WHERE onek.thousand < 995 + ORDER BY onek.thousand + OFFSET 10 + FETCH FIRST 5 ROWS WITH TIES; + +--Testcase 76: +CREATE VIEW limit_thousand_v_2 AS SELECT thousand FROM onek WHERE thousand < 995 + ORDER BY thousand OFFSET 10 FETCH FIRST 5 ROWS ONLY; +--Testcase 77: +\d+ limit_thousand_v_2 + View "public.limit_thousand_v_2" + Column | Type | Collation | Nullable | Default | Storage | Description +----------+---------+-----------+----------+---------+---------+------------- + thousand | integer | | | | plain | +View definition: + SELECT onek.thousand + FROM onek + WHERE onek.thousand < 995 + ORDER BY onek.thousand + OFFSET 10 + LIMIT 5; + +--Testcase 78: +CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995 + ORDER BY thousand FETCH FIRST NULL ROWS WITH TIES; -- fails +ERROR: row count cannot be null in FETCH FIRST ... WITH TIES clause +--Testcase 79: +CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995 + ORDER BY thousand FETCH FIRST (NULL+1) ROWS WITH TIES; +--Testcase 80: +\d+ limit_thousand_v_3 + View "public.limit_thousand_v_3" + Column | Type | Collation | Nullable | Default | Storage | Description +----------+---------+-----------+----------+---------+---------+------------- + thousand | integer | | | | plain | +View definition: + SELECT onek.thousand + FROM onek + WHERE onek.thousand < 995 + ORDER BY onek.thousand + FETCH FIRST (NULL::integer + 1) ROWS WITH TIES; + +--Testcase 81: +CREATE VIEW limit_thousand_v_4 AS SELECT thousand FROM onek WHERE thousand < 995 + ORDER BY thousand FETCH FIRST NULL ROWS ONLY; +--Testcase 82: +\d+ limit_thousand_v_4 + View "public.limit_thousand_v_4" + Column | Type | Collation | Nullable | Default | Storage | Description +----------+---------+-----------+----------+---------+---------+------------- + thousand | integer | | | | plain | +View definition: + SELECT onek.thousand + FROM onek + WHERE onek.thousand < 995 + ORDER BY onek.thousand + LIMIT ALL; + +-- leave these views +--Testcase 83: +DROP VIEW limit_thousand_v_1; +--Testcase 84: +DROP VIEW limit_thousand_v_2; +--Testcase 85: +DROP VIEW limit_thousand_v_3; +--Testcase 86: +DROP VIEW limit_thousand_v_4; +-- Clean up +DO $d$ +declare + l_rec record; +begin + for l_rec in (select foreign_table_schema, foreign_table_name + from information_schema.foreign_tables) loop + execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); + end loop; +end; +$d$; +--Testcase 87: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 88: +DROP SERVER influxdb_svr CASCADE; +--Testcase 89: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/12.8/extra/prepare.out b/expected/15.0/extra/prepare.out similarity index 98% rename from expected/12.8/extra/prepare.out rename to expected/15.0/extra/prepare.out index ceb03bb..fe4d5a0 100644 --- a/expected/12.8/extra/prepare.out +++ b/expected/15.0/extra/prepare.out @@ -2,14 +2,14 @@ -- of the pg_prepared_statements view as prepared statements are -- created and removed. \set ECHO none ---Testcase 27: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 28: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 30: + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: CREATE FOREIGN TABLE tenk1 ( unique1 int4, unique2 int4, @@ -30,29 +30,29 @@ CREATE FOREIGN TABLE tenk1 ( ) SERVER influxdb_svr OPTIONS (table 'tenk'); -- Does not support this command -- ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 31: +--Testcase 5: CREATE FOREIGN TABLE road ( name text, thepath path ) SERVER influxdb_svr; ---Testcase 32: +--Testcase 6: CREATE FOREIGN TABLE road_tmp (a int, b int) SERVER influxdb_svr; ---Testcase 1: +--Testcase 7: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) ---Testcase 2: +--Testcase 8: PREPARE q1 AS SELECT a AS a FROM road_tmp; ---Testcase 3: +--Testcase 9: EXECUTE q1; a --- 1 (1 row) ---Testcase 4: +--Testcase 10: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------+----------------- @@ -60,23 +60,23 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; (1 row) -- should fail ---Testcase 5: +--Testcase 11: PREPARE q1 AS SELECT b FROM road_tmp; ERROR: prepared statement "q1" already exists -- should succeed DEALLOCATE q1; ---Testcase 6: +--Testcase 12: PREPARE q1 AS SELECT b FROM road_tmp; ---Testcase 7: +--Testcase 13: EXECUTE q1; b --- 2 (1 row) ---Testcase 8: +--Testcase 14: PREPARE q2 AS SELECT b AS b FROM road_tmp; ---Testcase 9: +--Testcase 15: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------+----------------- @@ -86,7 +86,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; -- sql92 syntax DEALLOCATE PREPARE q1; ---Testcase 10: +--Testcase 16: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------+----------------- @@ -95,30 +95,30 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; DEALLOCATE PREPARE q2; -- the view should return the empty set again ---Testcase 11: +--Testcase 17: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) -- parameterized queries ---Testcase 12: +--Testcase 18: PREPARE q2(text) AS SELECT datname, datistemplate, datallowconn FROM pg_database WHERE datname = $1; ---Testcase 13: +--Testcase 19: EXECUTE q2('postgres'); datname | datistemplate | datallowconn ----------+---------------+-------------- postgres | f | t (1 row) ---Testcase 14: +--Testcase 20: PREPARE q3(text, int, float, boolean, smallint) AS SELECT * FROM tenk1 WHERE string4 = $1 AND (four = $2 OR ten = $3::bigint OR true = $4 OR odd = $5::int) ORDER BY unique1; ---Testcase 15: +--Testcase 21: EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- @@ -154,34 +154,36 @@ EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); (29 rows) -- too few params ---Testcase 16: +--Testcase 22: EXECUTE q3('bool'); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 1. -- too many params ---Testcase 17: +--Testcase 23: EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 6. -- wrong param types ---Testcase 18: +--Testcase 24: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); ERROR: parameter $3 of type boolean cannot be coerced to the expected type double precision +LINE 1: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'byte... + ^ HINT: You will need to rewrite or cast the expression. -- invalid type ---Testcase 19: +--Testcase 25: PREPARE q4(nonexistenttype) AS SELECT $1; ERROR: type "nonexistenttype" does not exist LINE 1: PREPARE q4(nonexistenttype) AS SELECT $1; ^ -- create table as execute ---Testcase 20: +--Testcase 26: PREPARE q5(int, text) AS SELECT * FROM tenk1 WHERE unique1 = $1 OR stringu1 = $2 ORDER BY unique1; ---Testcase 33: +--Testcase 27: CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); ---Testcase 21: +--Testcase 28: SELECT * FROM q5_prep_results; unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- @@ -203,23 +205,23 @@ SELECT * FROM q5_prep_results; 9961 | 2058 | 1 | 1 | 1 | 1 | 61 | 961 | 1961 | 4961 | 9961 | 122 | 123 | DTAAAA | EBDAAA | OOOOxx (16 rows) ---Testcase 34: +--Testcase 29: CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') WITH NO DATA; ---Testcase 22: +--Testcase 30: SELECT * FROM q5_prep_nodata; unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- (0 rows) -- unknown or unspecified parameter types: should succeed ---Testcase 23: +--Testcase 31: PREPARE q6 AS SELECT * FROM tenk1 WHERE unique1 = $1 AND stringu1 = $2; ---Testcase 24: +--Testcase 32: PREPARE q7(unknown) AS SELECT * FROM road WHERE thepath = $1; ---Testcase 25: +--Testcase 33: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types @@ -242,7 +244,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements -- test DEALLOCATE ALL; DEALLOCATE ALL; ---Testcase 26: +--Testcase 34: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types diff --git a/expected/10.18/extra/select.out b/expected/15.0/extra/select.out similarity index 96% rename from expected/10.18/extra/select.out rename to expected/15.0/extra/select.out index b1c4c96..65ad5cc 100644 --- a/expected/10.18/extra/select.out +++ b/expected/15.0/extra/select.out @@ -2,14 +2,14 @@ -- SELECT -- \set ECHO none ---Testcase 52: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 53: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 55: + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: CREATE FOREIGN TABLE onek ( unique1 int4, unique2 int4, @@ -28,7 +28,7 @@ CREATE FOREIGN TABLE onek ( stringu2 name, string4 name ) SERVER influxdb_svr; ---Testcase 56: +--Testcase 5: CREATE FOREIGN TABLE onek2 ( unique1 int4, unique2 int4, @@ -47,27 +47,27 @@ CREATE FOREIGN TABLE onek2 ( stringu2 name, string4 name ) SERVER influxdb_svr OPTIONS (table 'onek'); ---Testcase 57: +--Testcase 6: CREATE FOREIGN TABLE INT8_TBL ( q1 int8, q2 int8 ) SERVER influxdb_svr; ---Testcase 58: +--Testcase 7: CREATE FOREIGN TABLE person ( name text, age int4, location point ) SERVER influxdb_svr; ---Testcase 59: +--Testcase 8: CREATE FOREIGN TABLE emp ( salary int4, manager text ) INHERITS (person) SERVER influxdb_svr; ---Testcase 60: +--Testcase 9: CREATE FOREIGN TABLE student ( gpa float8 ) INHERITS (person) SERVER influxdb_svr; ---Testcase 61: +--Testcase 10: CREATE FOREIGN TABLE stud_emp ( percent int4 ) INHERITS (emp, student) SERVER influxdb_svr; @@ -77,7 +77,7 @@ NOTICE: merging multiple inherited definitions of column "location" -- btree index -- awk '{if($1<10){print;}else{next;}}' onek.data | sort +0n -1 -- ---Testcase 1: +--Testcase 11: SELECT * FROM onek WHERE onek.unique1 < 10 ORDER BY onek.unique1; @@ -98,7 +98,7 @@ SELECT * FROM onek -- -- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 -- ---Testcase 2: +--Testcase 12: SELECT onek.unique1, onek.stringu1 FROM onek WHERE onek.unique1 < 20 ORDER BY unique1 using >; @@ -129,7 +129,7 @@ SELECT onek.unique1, onek.stringu1 FROM onek -- -- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 -- ---Testcase 3: +--Testcase 13: SELECT onek.unique1, onek.stringu1 FROM onek WHERE onek.unique1 > 980 ORDER BY stringu1 using <; @@ -160,7 +160,7 @@ SELECT onek.unique1, onek.stringu1 FROM onek -- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | -- sort +1d -2 +0nr -1 -- ---Testcase 4: +--Testcase 14: SELECT onek.unique1, onek.string4 FROM onek WHERE onek.unique1 > 980 ORDER BY string4 using <, unique1 using >; @@ -191,7 +191,7 @@ SELECT onek.unique1, onek.string4 FROM onek -- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | -- sort +1dr -2 +0n -1 -- ---Testcase 5: +--Testcase 15: SELECT onek.unique1, onek.string4 FROM onek WHERE onek.unique1 > 980 ORDER BY string4 using >, unique1 using <; @@ -222,7 +222,7 @@ SELECT onek.unique1, onek.string4 FROM onek -- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | -- sort +0nr -1 +1d -2 -- ---Testcase 6: +--Testcase 16: SELECT onek.unique1, onek.string4 FROM onek WHERE onek.unique1 < 20 ORDER BY unique1 using >, string4 using <; @@ -254,7 +254,7 @@ SELECT onek.unique1, onek.string4 FROM onek -- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | -- sort +0n -1 +1dr -2 -- ---Testcase 7: +--Testcase 17: SELECT onek.unique1, onek.string4 FROM onek WHERE onek.unique1 < 20 ORDER BY unique1 using <, string4 using >; @@ -290,13 +290,16 @@ SELECT onek.unique1, onek.string4 FROM onek -- followed by sort, because that could hide index ordering problems. -- -- ANALYZE onek2; +--Testcase 18: SET enable_seqscan TO off; +--Testcase 19: SET enable_bitmapscan TO off; +--Testcase 20: SET enable_sort TO off; -- -- awk '{if($1<10){print $0;}else{next;}}' onek.data | sort +0n -1 -- ---Testcase 8: +--Testcase 21: SELECT onek2.* FROM onek2 WHERE onek2.unique1 < 10 order by 1; unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- @@ -315,7 +318,7 @@ SELECT onek2.* FROM onek2 WHERE onek2.unique1 < 10 order by 1; -- -- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 -- ---Testcase 9: +--Testcase 22: SELECT onek2.unique1, onek2.stringu1 FROM onek2 WHERE onek2.unique1 < 20 ORDER BY unique1 using >; @@ -346,7 +349,7 @@ SELECT onek2.unique1, onek2.stringu1 FROM onek2 -- -- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 -- ---Testcase 10: +--Testcase 23: SELECT onek2.unique1, onek2.stringu1 FROM onek2 WHERE onek2.unique1 > 980 order by 1; unique1 | stringu1 @@ -372,13 +375,16 @@ SELECT onek2.unique1, onek2.stringu1 FROM onek2 999 | LMAAAA (19 rows) +--Testcase 24: RESET enable_seqscan; +--Testcase 25: RESET enable_bitmapscan; +--Testcase 26: RESET enable_sort; ---Testcase 11: -SELECT two, stringu1, ten, string4 - INTO TABLE tmp - FROM onek; +--Testcase 27: +--SELECT two, stringu1, ten, string4 +-- INTO TABLE tmp +-- FROM onek; -- -- awk '{print $1,$2;}' person.data | -- awk '{if(NF!=2){print $3,$2;}else{print;}}' - emp.data | @@ -386,7 +392,7 @@ SELECT two, stringu1, ten, string4 -- awk 'BEGIN{FS=" ";}{if(NF!=2){print $4,$5;}else{print;}}' - stud_emp.data -- -- SELECT name, age FROM person*; ??? check if different ---Testcase 12: +--Testcase 28: SELECT p.name, p.age FROM person* p; name | age ---------+----- @@ -457,7 +463,7 @@ SELECT p.name, p.age FROM person* p; -- awk 'BEGIN{FS=" ";}{if(NF!=1){print $4,$5;}else{print;}}' - stud_emp.data | -- sort +1nr -2 -- ---Testcase 13: +--Testcase 29: SELECT p.name, p.age FROM person* p ORDER BY age using >, name; name | age ---------+----- @@ -524,21 +530,21 @@ SELECT p.name, p.age FROM person* p ORDER BY age using >, name; -- -- Test some cases involving whole-row Var referencing a subquery -- ---Testcase 14: +--Testcase 30: select foo from (select 1 offset 0) as foo; foo ----- (1) (1 row) ---Testcase 15: +--Testcase 31: select foo from (select null offset 0) as foo; foo ----- () (1 row) ---Testcase 16: +--Testcase 32: select foo from (select 'xyzzy',1,null offset 0) as foo; foo ------------ @@ -548,7 +554,7 @@ select foo from (select 'xyzzy',1,null offset 0) as foo; -- -- Test VALUES lists -- ---Testcase 17: +--Testcase 33: select * from onek, (values(147, 'RFAAAA'), (931, 'VJAAAA')) as v (i, j) WHERE onek.unique1 = v.i and onek.stringu1 = v.j; unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 | i | j @@ -559,7 +565,7 @@ select * from onek, (values(147, 'RFAAAA'), (931, 'VJAAAA')) as v (i, j) -- a more complex case -- looks like we're coding lisp :-) ---Testcase 18: +--Testcase 34: select * from onek, (values ((select i from (values(10000), (2), (389), (1000), (2000), ((select 10029))) as foo(i) @@ -571,7 +577,7 @@ select * from onek, (1 row) -- try VALUES in a subquery ---Testcase 19: +--Testcase 35: select * from onek where (unique1,ten) in (values (1,1), (20,0), (99,9), (17,99)) order by unique1; @@ -583,7 +589,7 @@ select * from onek (3 rows) -- VALUES is also legal as a standalone query or a set-operation member ---Testcase 20: +--Testcase 36: VALUES (1,2), (3,4+4), (7,77.7); column1 | column2 ---------+--------- @@ -592,7 +598,7 @@ VALUES (1,2), (3,4+4), (7,77.7); 7 | 77.7 (3 rows) ---Testcase 21: +--Testcase 37: VALUES (1,2), (3,4+4), (7,77.7) UNION ALL SELECT 2+2, 57 @@ -611,12 +617,20 @@ TABLE int8_tbl; 4567890123456789 | -4567890123456789 (9 rows) +-- -- corner case: VALUES with no columns +-- InfluxDB not support table with no columns. +-- --Testcase 79: +-- CREATE FOREIGN TABLE nocols() SERVER influxdb_svr; +-- --Testcase 80: +-- INSERT INTO nocols DEFAULT VALUES; +-- --Testcase 81: +-- SELECT * FROM nocols n, LATERAL (VALUES(n.*)) v; -- -- Test ORDER BY options -- ---Testcase 62: +--Testcase 38: CREATE FOREIGN TABLE foo (f1 int) SERVER influxdb_svr; ---Testcase 22: +--Testcase 39: SELECT * FROM foo ORDER BY f1; f1 ---- @@ -627,7 +641,7 @@ SELECT * FROM foo ORDER BY f1; 42 (5 rows) ---Testcase 23: +--Testcase 40: SELECT * FROM foo ORDER BY f1 ASC; -- same thing f1 ---- @@ -638,7 +652,7 @@ SELECT * FROM foo ORDER BY f1 ASC; -- same thing 42 (5 rows) ---Testcase 24: +--Testcase 41: SELECT * FROM foo ORDER BY f1 NULLS FIRST; f1 ---- @@ -649,7 +663,7 @@ SELECT * FROM foo ORDER BY f1 NULLS FIRST; 42 (5 rows) ---Testcase 25: +--Testcase 42: SELECT * FROM foo ORDER BY f1 DESC; f1 ---- @@ -660,7 +674,7 @@ SELECT * FROM foo ORDER BY f1 DESC; 1 (5 rows) ---Testcase 26: +--Testcase 43: SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; f1 ---- @@ -694,15 +708,16 @@ SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; -- Test planning of some cases with partial indexes -- -- partial index is usable ---Testcase 27: +--Testcase 44: explain (costs off) select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; - QUERY PLAN ------------------------ + QUERY PLAN +--------------------------------------- Foreign Scan on onek2 -(1 row) + Filter: (stringu1 = 'ATAAAA'::name) +(2 rows) ---Testcase 28: +--Testcase 45: select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- @@ -710,23 +725,25 @@ select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; (1 row) -- actually run the query with an analyze to use the partial index ---Testcase 63: +--Testcase 46: explain (costs off, analyze on, timing off, summary off) select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; QUERY PLAN ----------------------------------------------- Foreign Scan on onek2 (actual rows=1 loops=1) -(1 row) + Filter: (stringu1 = 'ATAAAA'::name) +(2 rows) ---Testcase 30: +--Testcase 47: explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; - QUERY PLAN ------------------------ + QUERY PLAN +--------------------------------------- Foreign Scan on onek2 -(1 row) + Filter: (stringu1 = 'ATAAAA'::name) +(2 rows) ---Testcase 31: +--Testcase 48: select unique2 from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; unique2 --------- @@ -734,7 +751,7 @@ select unique2 from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; (1 row) -- partial index predicate implies clause, so no need for retest ---Testcase 32: +--Testcase 49: explain (costs off) select * from onek2 where unique2 = 11 and stringu1 < 'B'; QUERY PLAN @@ -743,14 +760,14 @@ select * from onek2 where unique2 = 11 and stringu1 < 'B'; Filter: (stringu1 < 'B'::name) (2 rows) ---Testcase 33: +--Testcase 50: select * from onek2 where unique2 = 11 and stringu1 < 'B'; unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- 494 | 11 | 0 | 2 | 4 | 14 | 4 | 94 | 94 | 494 | 494 | 8 | 9 | ATAAAA | LAAAAA | VVVVxx (1 row) ---Testcase 34: +--Testcase 51: explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; QUERY PLAN @@ -759,7 +776,7 @@ select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; Filter: (stringu1 < 'B'::name) (2 rows) ---Testcase 35: +--Testcase 52: select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; unique2 --------- @@ -767,7 +784,7 @@ select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; (1 row) -- but if it's an update target, must retest anyway ---Testcase 36: +--Testcase 53: explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 < 'B' for update; QUERY PLAN @@ -777,7 +794,7 @@ select unique2 from onek2 where unique2 = 11 and stringu1 < 'B' for update; Filter: (stringu1 < 'B'::name) (3 rows) ---Testcase 37: +--Testcase 54: select unique2 from onek2 where unique2 = 11 and stringu1 < 'B' for update; unique2 --------- @@ -785,7 +802,7 @@ select unique2 from onek2 where unique2 = 11 and stringu1 < 'B' for update; (1 row) -- partial index is not applicable ---Testcase 38: +--Testcase 55: explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 < 'C'; QUERY PLAN @@ -794,7 +811,7 @@ select unique2 from onek2 where unique2 = 11 and stringu1 < 'C'; Filter: (stringu1 < 'C'::name) (2 rows) ---Testcase 39: +--Testcase 56: select unique2 from onek2 where unique2 = 11 and stringu1 < 'C'; unique2 --------- @@ -802,8 +819,9 @@ select unique2 from onek2 where unique2 = 11 and stringu1 < 'C'; (1 row) -- partial index implies clause, but bitmap scan must recheck predicate anyway +--Testcase 57: SET enable_indexscan TO off; ---Testcase 40: +--Testcase 58: explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; QUERY PLAN @@ -812,16 +830,17 @@ select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; Filter: (stringu1 < 'B'::name) (2 rows) ---Testcase 41: +--Testcase 59: select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; unique2 --------- 11 (1 row) +--Testcase 60: RESET enable_indexscan; -- check multi-index cases too ---Testcase 42: +--Testcase 61: explain (costs off) select unique1, unique2 from onek2 where (unique2 = 11 or unique1 = 0) and stringu1 < 'B'; @@ -831,7 +850,7 @@ select unique1, unique2 from onek2 Filter: (stringu1 < 'B'::name) (2 rows) ---Testcase 43: +--Testcase 62: select unique1, unique2 from onek2 where (unique2 = 11 or unique1 = 0) and stringu1 < 'B'; unique1 | unique2 @@ -840,7 +859,7 @@ select unique1, unique2 from onek2 0 | 998 (2 rows) ---Testcase 44: +--Testcase 63: explain (costs off) select unique1, unique2 from onek2 where (unique2 = 11 and stringu1 < 'B') or unique1 = 0; @@ -850,7 +869,7 @@ select unique1, unique2 from onek2 Filter: (((unique2 = 11) AND (stringu1 < 'B'::name)) OR (unique1 = 0)) (2 rows) ---Testcase 45: +--Testcase 64: select unique1, unique2 from onek2 where (unique2 = 11 and stringu1 < 'B') or unique1 = 0; unique1 | unique2 @@ -863,7 +882,7 @@ select unique1, unique2 from onek2 -- Test some corner cases that have been known to confuse the planner -- -- ORDER BY on a constant doesn't really need any sorting ---Testcase 46: +--Testcase 65: SELECT 1 AS x ORDER BY x; x --- @@ -871,10 +890,10 @@ SELECT 1 AS x ORDER BY x; (1 row) -- But ORDER BY on a set-valued expression does ---Testcase 64: +--Testcase 66: create function sillysrf(int) returns setof int as 'values (1),(10),(2),($1)' language sql immutable; ---Testcase 47: +--Testcase 67: select sillysrf(42); sillysrf ---------- @@ -884,7 +903,7 @@ select sillysrf(42); 42 (4 rows) ---Testcase 48: +--Testcase 68: select sillysrf(-1) order by 1; sillysrf ---------- @@ -894,11 +913,11 @@ select sillysrf(-1) order by 1; 10 (4 rows) ---Testcase 65: +--Testcase 69: drop function sillysrf(int); -- X = X isn't a no-op, it's effectively X IS NOT NULL assuming = is strict -- (see bug #5084) ---Testcase 49: +--Testcase 70: select * from (values (2),(null),(1)) v(k) where k = k order by k; k --- @@ -906,7 +925,7 @@ select * from (values (2),(null),(1)) v(k) where k = k order by k; 2 (2 rows) ---Testcase 50: +--Testcase 71: select * from (values (2),(null),(1)) v(k) where k = k; k --- @@ -916,12 +935,12 @@ select * from (values (2),(null),(1)) v(k) where k = k; -- Test partitioned tables with no partitions, which should be handled the -- same as the non-inheritance case when expanding its RTE. ---Testcase 66: +--Testcase 72: create table list_parted_tbl (a int,b int) partition by list (a); ---Testcase 67: +--Testcase 73: create table list_parted_tbl1 partition of list_parted_tbl for values in (1) partition by list(b); ---Testcase 51: +--Testcase 74: explain (costs off) select * from list_parted_tbl; QUERY PLAN -------------------------- @@ -929,13 +948,13 @@ explain (costs off) select * from list_parted_tbl; One-Time Filter: false (2 rows) ---Testcase 68: +--Testcase 75: drop table list_parted_tbl; -- Clean up: -DROP TABLE IF EXISTS tmp; ---Testcase 69: +--DROP TABLE IF EXISTS tmp; +--Testcase 76: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 70: +--Testcase 77: DROP SERVER influxdb_svr CASCADE; NOTICE: drop cascades to 8 other objects DETAIL: drop cascades to foreign table onek @@ -946,5 +965,5 @@ drop cascades to foreign table emp drop cascades to foreign table student drop cascades to foreign table stud_emp drop cascades to foreign table foo ---Testcase 71: +--Testcase 78: DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/15.0/extra/select_having.out b/expected/15.0/extra/select_having.out new file mode 100644 index 0000000..bda3119 --- /dev/null +++ b/expected/15.0/extra/select_having.out @@ -0,0 +1,133 @@ +-- +-- SELECT_HAVING +-- +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: +CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; +--Testcase 5: +INSERT INTO test_having VALUES (0, 1, 'XXXX', 'A'); +--Testcase 6: +INSERT INTO test_having VALUES (1, 2, 'AAAA', 'b'); +--Testcase 7: +INSERT INTO test_having VALUES (2, 2, 'AAAA', 'c'); +--Testcase 8: +INSERT INTO test_having VALUES (3, 3, 'BBBB', 'D'); +--Testcase 9: +INSERT INTO test_having VALUES (4, 3, 'BBBB', 'e'); +--Testcase 10: +INSERT INTO test_having VALUES (5, 3, 'bbbb', 'F'); +--Testcase 11: +INSERT INTO test_having VALUES (6, 4, 'cccc', 'g'); +--Testcase 12: +INSERT INTO test_having VALUES (7, 4, 'cccc', 'h'); +--Testcase 13: +INSERT INTO test_having VALUES (8, 4, 'CCCC', 'I'); +--Testcase 14: +INSERT INTO test_having VALUES (9, 4, 'CCCC', 'j'); +--Testcase 15: +SELECT b, c FROM test_having + GROUP BY b, c HAVING count(*) = 1 ORDER BY b, c; + b | c +---+---------- + 1 | XXXX + 3 | bbbb +(2 rows) + +-- HAVING is effectively equivalent to WHERE in this case +--Testcase 16: +SELECT b, c FROM test_having + GROUP BY b, c HAVING b = 3 ORDER BY b, c; + b | c +---+---------- + 3 | bbbb + 3 | BBBB +(2 rows) + +--Testcase 17: +SELECT lower(c), count(c) FROM test_having + GROUP BY lower(c) HAVING count(*) > 2 OR min(a) = max(a) + ORDER BY lower(c); + lower | count +-------+------- + bbbb | 3 + cccc | 4 + xxxx | 1 +(3 rows) + +--Testcase 18: +SELECT c, max(a) FROM test_having + GROUP BY c HAVING count(*) > 2 OR min(a) = max(a) + ORDER BY c; + c | max +----------+----- + bbbb | 5 + XXXX | 0 +(2 rows) + +-- test degenerate cases involving HAVING without GROUP BY +-- Per SQL spec, these should generate 0 or 1 row, even without aggregates +--Testcase 19: +SELECT min(a), max(a) FROM test_having HAVING min(a) = max(a); + min | max +-----+----- +(0 rows) + +--Testcase 20: +SELECT min(a), max(a) FROM test_having HAVING min(a) < max(a); + min | max +-----+----- + 0 | 9 +(1 row) + +-- errors: ungrouped column references +--Testcase 21: +SELECT a FROM test_having HAVING min(a) < max(a); +ERROR: column "test_having.a" must appear in the GROUP BY clause or be used in an aggregate function +LINE 1: SELECT a FROM test_having HAVING min(a) < max(a); + ^ +--Testcase 22: +SELECT 1 AS one FROM test_having HAVING a > 1; +ERROR: column "test_having.a" must appear in the GROUP BY clause or be used in an aggregate function +LINE 1: SELECT 1 AS one FROM test_having HAVING a > 1; + ^ +-- the really degenerate case: need not scan table at all +--Testcase 23: +SELECT 1 AS one FROM test_having HAVING 1 > 2; + one +----- +(0 rows) + +--Testcase 24: +SELECT 1 AS one FROM test_having HAVING 1 < 2; + one +----- + 1 +(1 row) + +-- and just to prove that we aren't scanning the table: +--Testcase 25: +SELECT 1 AS one FROM test_having WHERE 1/a = 1 HAVING 1 < 2; + one +----- + 1 +(1 row) + +--Testcase 26: +-- Clean up: +--Testcase 30: +DELETE FROM test_having; +--Testcase 31: +DROP FOREIGN TABLE test_having; +--Testcase 27: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 28: +DROP SERVER influxdb_svr CASCADE; +--Testcase 29: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/15.0/influxdb_fdw.out b/expected/15.0/influxdb_fdw.out new file mode 100644 index 0000000..506d3da --- /dev/null +++ b/expected/15.0/influxdb_fdw.out @@ -0,0 +1,1639 @@ +--SET log_min_messages=debug1; +--SET client_min_messages=debug1; +--Testcase 1: +SET datestyle=ISO; +-- timestamp with time zone differs based on this +--Testcase 2: +SET timezone='Japan'; +\set ECHO none +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); +-- import time column as timestamp and text type +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); +--Testcase 6: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+----------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | | tag2_A | | 2 | | +(3 rows) + +--Testcase 7: +SELECT tag1, value1 FROM cpu; + tag1 | value1 +--------+-------- + tag1_A | 100 + tag1_B | 100 +(2 rows) + +--Testcase 8: +SELECT value1, time, value2 FROM cpu; + value1 | time | value2 +--------+------------------------+-------- + 100 | 2015-08-18 09:00:00+09 | 0.5 + 100 | 2015-08-18 09:00:00+09 | 2 + | 2015-08-18 09:48:08+09 | 2 +(3 rows) + +--Testcase 9: +SELECT value1, time_text, value2 FROM cpu; + value1 | time_text | value2 +--------+----------------------+-------- + 100 | 2015-08-18T00:00:00Z | 0.5 + 100 | 2015-08-18T00:00:00Z | 2 + | 2015-08-18T00:48:08Z | 2 +(3 rows) + +--Testcase 10: +DROP FOREIGN TABLE cpu; +--Testcase 11: +DROP FOREIGN TABLE t3; +--Testcase 12: +DROP FOREIGN TABLE t4; +--Testcase 13: +DROP FOREIGN TABLE tx; +--Testcase 14: +DROP FOREIGN TABLE numbers; +-- test EXECPT +IMPORT FOREIGN SCHEMA public EXCEPT (cpu, t3, t4, tx, numbers) FROM SERVER server1 INTO public; +--Testcase 15: +SELECT ftoptions FROM pg_foreign_table; + ftoptions +----------- +(0 rows) + +-- test LIMIT TO +IMPORT FOREIGN SCHEMA public LIMIT TO (cpu) FROM SERVER server1 INTO public; +--Testcase 16: +SELECT ftoptions FROM pg_foreign_table; + ftoptions +------------------------------ + {table=cpu,"tags=tag1,tag2"} +(1 row) + +--Testcase 17: +DROP FOREIGN TABLE cpu; +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); +--Testcase 18: +SELECT * FROM cpu; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f + 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | +(3 rows) + +--Testcase 19: +SELECT tag1, value1 FROM cpu; + tag1 | value1 +--------+-------- + tag1_A | 100 + tag1_B | 100 +(2 rows) + +--Testcase 20: +SELECT value1, time, value2 FROM cpu; + value1 | time | value2 +--------+------------------------+-------- + 100 | 2015-08-18 09:00:00+09 | 0.5 + 100 | 2015-08-18 09:00:00+09 | 2 + | 2015-08-18 09:48:08+09 | 2 +(3 rows) + +--Testcase 21: +SELECT tag1 FROM cpu; + tag1 +-------- + tag1_A + tag1_B +(2 rows) + +--Testcase 22: +SELECT * FROM numbers; + time | tag1 | a | b +------------------------+------+---+----- + 1970-01-01 09:00:00+09 | a | 1 | One + 1970-01-01 09:00:01+09 | a | 2 | Two +(2 rows) + +--Testcase 23: +\d cpu; + Foreign table "public.cpu" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + tag1 | text | | | | + tag2 | text | | | | + value1 | bigint | | | | + value2 | double precision | | | | + value3 | text | | | | + value4 | boolean | | | | +Server: server1 +FDW options: ("table" 'cpu', tags 'tag1,tag2') + +--Testcase 24: +SELECT * FROM cpu WHERE value1=100; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(2 rows) + +--Testcase 25: +SELECT * FROM cpu WHERE value2=0.5; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t +(1 row) + +--Testcase 26: +SELECT * FROM cpu WHERE value3='str'; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t +(1 row) + +--Testcase 27: +SELECT * FROM cpu WHERE value4=true; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t +(1 row) + +--Testcase 28: +SELECT * FROM cpu WHERE NOT (value4 AND value1=100); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(1 row) + +--Testcase 29: +SELECT * FROM cpu WHERE tag1='tag1_A'; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t +(1 row) + +--Testcase 30: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE value3 IS NULL; + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.cpu + Output: "time", tag1, tag2, value1, value2, value3, value4 + Filter: (cpu.value3 IS NULL) + InfluxDB query: SELECT "tag1", "tag2", "value1", "value2", "value3", "value4" FROM "cpu" +(4 rows) + +--Testcase 31: +SELECT * FROM cpu WHERE value3 IS NULL; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f + 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | +(2 rows) + +--Testcase 32: +SELECT * FROM cpu WHERE tag2 IS NULL; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(1 row) + +--Testcase 33: +SELECT * FROM cpu WHERE value3 IS NOT NULL; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t +(1 row) + +--Testcase 34: +SELECT * FROM cpu WHERE tag2 IS NOT NULL; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | +(2 rows) + +-- InfluxDB not support compare timestamp with OR condition +--Testcase 35: +SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR value2 = 0.5; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | +(2 rows) + +-- InfluxDB not support compare timestamp with != or <> +--Testcase 36: +SELECT * FROM cpu WHERE time != '2015-08-18 09:48:08+09'; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(2 rows) + +--Testcase 37: +SELECT * FROM cpu WHERE time <> '2015-08-18 09:48:08+09'; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(2 rows) + +--Testcase 38: +SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR value2 = 0.5; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | +(2 rows) + +-- There is inconsitency for search of missing values between tag and field +--Testcase 39: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE value3 = ''; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.cpu + Output: "time", tag1, tag2, value1, value2, value3, value4 + InfluxDB query: SELECT "tag1", "tag2", "value1", "value2", "value3", "value4" FROM "cpu" WHERE (("value3" = '')) +(3 rows) + +--Testcase 40: +SELECT * FROM cpu WHERE value3 = ''; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------+------+------+--------+--------+--------+-------- +(0 rows) + +--Testcase 41: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE tag2 = ''; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.cpu + Output: "time", tag1, tag2, value1, value2, value3, value4 + InfluxDB query: SELECT "tag1", "tag2", "value1", "value2", "value3", "value4" FROM "cpu" WHERE (("tag2" = '')) +(3 rows) + +--Testcase 42: +SELECT * FROM cpu WHERE tag2 = ''; + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(1 row) + +--Testcase 43: +SELECT * FROM cpu WHERE tag1 IN ('tag1_A', 'tag1_B'); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(2 rows) + +--Testcase 44: +EXPLAIN VERBOSE +SELECT * FROM cpu WHERE tag1 IN ('tag1_A', 'tag1_B'); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.cpu (cost=10.00..6.00 rows=6 width=121) + Output: "time", tag1, tag2, value1, value2, value3, value4 + InfluxDB query: SELECT "tag1", "tag2", "value1", "value2", "value3", "value4" FROM "cpu" WHERE ("tag1" = 'tag1_A' OR "tag1" = 'tag1_B') +(3 rows) + +-- Rows which have no tag are considered to have empty string +--Testcase 45: +SELECT * FROM cpu WHERE tag1 NOT IN ('tag1_A', 'tag1_B'); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+--------+-------- + 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | +(1 row) + +--Testcase 46: +EXPLAIN VERBOSE +SELECT * FROM cpu WHERE tag1 NOT IN ('tag1_A', 'tag1_B'); + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.cpu (cost=10.00..558.00 rows=558 width=121) + Output: "time", tag1, tag2, value1, value2, value3, value4 + InfluxDB query: SELECT "tag1", "tag2", "value1", "value2", "value3", "value4" FROM "cpu" WHERE ("tag1" <> 'tag1_A' AND "tag1" <> 'tag1_B') +(3 rows) + +-- test IN/NOT IN +--Testcase 47: +SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+--------+-------- + 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | +(1 row) + +--Testcase 48: +SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(2 rows) + +--Testcase 49: +SELECT * FROM cpu WHERE value1 NOT IN (100, 97); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------+------+------+--------+--------+--------+-------- +(0 rows) + +--Testcase 50: +SELECT * FROM cpu WHERE value1 IN (100, 97); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(2 rows) + +--Testcase 51: +SELECT * FROM cpu WHERE value2 IN (0.5, 10.9); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t +(1 row) + +--Testcase 52: +SELECT * FROM cpu WHERE value2 NOT IN (2, 9.7); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t +(1 row) + +--Testcase 53: +SELECT * FROM cpu WHERE value4 NOT IN ('true', 'true'); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(1 row) + +--Testcase 54: +SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+--------+-------- + 2015-08-18 09:48:08+09 | | tag2_A | | 2 | | +(1 row) + +--Testcase 55: +SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(2 rows) + +--Testcase 56: +SELECT * FROM cpu WHERE value1 NOT IN (100, 97); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------+------+------+--------+--------+--------+-------- +(0 rows) + +--Testcase 57: +SELECT * FROM cpu WHERE value1 IN (100, 97); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(2 rows) + +--Testcase 58: +SELECT * FROM cpu WHERE value2 IN (0.5, 10.9); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t +(1 row) + +--Testcase 59: +SELECT * FROM cpu WHERE value2 NOT IN (2, 9.7); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t +(1 row) + +--Testcase 60: +SELECT * FROM cpu WHERE value4 NOT IN ('true', 'true'); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(1 row) + +--Testcase 61: +SELECT * FROM cpu WHERE value4 IN ('f', 't'); + time | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | tag1_B | | 100 | 2 | | f +(2 rows) + +--Testcase 62: +CREATE FOREIGN TABLE t1(time timestamp with time zone , tag1 text, value1 integer) SERVER server1 OPTIONS (table 'cpu'); +--Testcase 63: +CREATE FOREIGN TABLE t2(time timestamp , tag1 text, value1 integer) SERVER server1 OPTIONS (table 'cpu'); +--Testcase 64: +SELECT * FROM t1; + time | tag1 | value1 +------------------------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | 100 + 2015-08-18 09:00:00+09 | tag1_B | 100 +(2 rows) + +--Testcase 65: +SELECT * FROM t2; + time | tag1 | value1 +---------------------+--------+-------- + 2015-08-18 00:00:00 | tag1_A | 100 + 2015-08-18 00:00:00 | tag1_B | 100 +(2 rows) + +-- In following four queries, timestamp condition is added to InfluxQL as "time = '2015-08-18 00:00:00'" +--Testcase 66: +SELECT * FROM t1 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; + time | tag1 | value1 +------------------------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | 100 + 2015-08-18 09:00:00+09 | tag1_B | 100 +(2 rows) + +--Testcase 67: +SELECT * FROM t1 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; + time | tag1 | value1 +------------------------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | 100 + 2015-08-18 09:00:00+09 | tag1_B | 100 +(2 rows) + +--Testcase 68: +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; + time | tag1 | value1 +---------------------+--------+-------- + 2015-08-18 00:00:00 | tag1_A | 100 + 2015-08-18 00:00:00 | tag1_B | 100 +(2 rows) + +--Testcase 69: +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; + time | tag1 | value1 +---------------------+--------+-------- + 2015-08-18 00:00:00 | tag1_A | 100 + 2015-08-18 00:00:00 | tag1_B | 100 +(2 rows) + +-- pushdown now() +--Testcase 70: +SELECT * FROM t2 WHERE now() > time; + time | tag1 | value1 +---------------------+--------+-------- + 2015-08-18 00:00:00 | tag1_A | 100 + 2015-08-18 00:00:00 | tag1_B | 100 +(2 rows) + +--Testcase 71: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE now() > time; + QUERY PLAN +----------------------------------------------------------------------------- + Foreign Scan on public.t2 (cost=10.00..401.00 rows=401 width=44) + Output: "time", tag1, value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" WHERE ((now() > time)) +(3 rows) + +--Testcase 72: +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; + time | tag1 | value1 +---------------------+--------+-------- + 2015-08-18 00:00:00 | tag1_A | 100 + 2015-08-18 00:00:00 | tag1_B | 100 +(2 rows) + +--Testcase 73: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.t2 (cost=10.00..6.00 rows=6 width=44) + Output: "time", tag1, value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" WHERE ((time = ('2015-08-26 05:43:21.1' - 8d5h43m21s100000u))) +(3 rows) + +-- InfluxDB does not seem to support time column + interval, so below query returns empty result +-- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; +-- EXPLAIN (VERBOSE, COSTS OFF) +-- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; +-- InfluxDB does not support month or year interval, so not push down +--Testcase 74: +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; + time | tag1 | value1 +---------------------+--------+-------- + 2015-08-18 00:00:00 | tag1_A | 100 + 2015-08-18 00:00:00 | tag1_B | 100 +(2 rows) + +--Testcase 75: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; + QUERY PLAN +--------------------------------------------------------------------------------------------- + Foreign Scan on public.t2 (cost=10.00..6.00 rows=6 width=44) + Output: "time", tag1, value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" WHERE ((time = '2015-08-18 00:00:00')) +(3 rows) + +--Testcase 76: +SELECT * FROM t2 WHERE value1 = ANY (ARRAY(SELECT value1 FROM t1 WHERE value1 < 1000)); + time | tag1 | value1 +---------------------+--------+-------- + 2015-08-18 00:00:00 | tag1_A | 100 + 2015-08-18 00:00:00 | tag1_B | 100 +(2 rows) + +-- ANY with ARRAY expression +--Testcase 77: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, a + 1]); + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..13.00 rows=13 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" = 1) OR ("a" = ("a" + 1))) +(3 rows) + +--Testcase 78: +SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, a + 1]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 79: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, a + 1]); + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1280.00 rows=1280 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <> 1) OR ("a" <> ("a" + 1))) +(3 rows) + +--Testcase 80: +SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, a + 1]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 81: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, a + 1]); + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" >= 1) OR ("a" >= ("a" + 1))) +(3 rows) + +--Testcase 82: +SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, a + 1]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 83: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, a + 1]); + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <= 1) OR ("a" <= ("a" + 1))) +(3 rows) + +--Testcase 84: +SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, a + 1]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 85: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, a + 1]); + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" > 1) OR ("a" > ("a" + 1))) +(3 rows) + +--Testcase 86: +SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, a + 1]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 87: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, a + 1]); + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" < 1) OR ("a" < ("a" + 1))) +(3 rows) + +--Testcase 88: +SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, a + 1]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +-- ANY with ARRAY const +--Testcase 89: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, 2]); + QUERY PLAN +----------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..13.00 rows=13 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 OR "a" = 2) +(3 rows) + +--Testcase 90: +SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, 2]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 91: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, 2]); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1280.00 rows=1280 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 OR "a" <> 2) +(3 rows) + +--Testcase 92: +SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, 2]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 93: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, 2]); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" >= 1 OR "a" >= 2) +(3 rows) + +--Testcase 94: +SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, 2]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 95: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, 2]); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <= 1 OR "a" <= 2) +(3 rows) + +--Testcase 96: +SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, 2]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 97: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, 2]); + QUERY PLAN +----------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" > 1 OR "a" > 2) +(3 rows) + +--Testcase 98: +SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, 2]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 99: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, 2]); + QUERY PLAN +----------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" < 1 OR "a" < 2) +(3 rows) + +--Testcase 100: +SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, 2]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 101: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a = ANY('{1, 2, 3}'); + QUERY PLAN +---------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..19.00 rows=19 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 OR "a" = 2 OR "a" = 3) +(3 rows) + +--Testcase 102: +SELECT a, b FROM numbers WHERE a = ANY('{1, 2, 3}'); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 103: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <> ANY('{1, 2, 3}'); + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1280.00 rows=1280 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 OR "a" <> 2 OR "a" <> 3) +(3 rows) + +--Testcase 104: +SELECT a, b FROM numbers WHERE a <> ANY('{1, 2, 3}'); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +-- ALL with ARRAY expression +--Testcase 105: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, a * 1]); + QUERY PLAN +------------------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..1.00 rows=1 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" = 1) AND ("a" = ("a" * 1))) +(3 rows) + +--Testcase 106: +SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, a * 1]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 107: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, a + 1]); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1267.00 rows=1267 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <> 1) AND ("a" <> ("a" + 1))) +(3 rows) + +--Testcase 108: +SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, a + 1]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 109: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, a / 1]); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" >= 1) AND ("a" >= ("a" / 1))) +(3 rows) + +--Testcase 110: +SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, a / 1]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 111: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, a + 1]); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <= 1) AND ("a" <= ("a" + 1))) +(3 rows) + +--Testcase 112: +SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, a + 1]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 113: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a > ALL(ARRAY[1, a - 1]); + QUERY PLAN +------------------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" > 1) AND ("a" > ("a" - 1))) +(3 rows) + +--Testcase 114: +SELECT a, b FROM numbers WHERE a > ALL(ARRAY[1, a - 1]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 115: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, a + 1]); + QUERY PLAN +------------------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" < 2) AND ("a" < ("a" + 1))) +(3 rows) + +--Testcase 116: +SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, a + 1]); + a | b +---+----- + 1 | One +(1 row) + +-- ALL with ARRAY const +--Testcase 117: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, 1]); + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..1.00 rows=1 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 AND "a" = 1) +(3 rows) + +--Testcase 118: +SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, 1]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 119: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, 3]); + QUERY PLAN +-------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1267.00 rows=1267 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 AND "a" <> 3) +(3 rows) + +--Testcase 120: +SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, 3]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 121: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, 2]); + QUERY PLAN +-------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" >= 1 AND "a" >= 2) +(3 rows) + +--Testcase 122: +SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, 2]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 123: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, 2]); + QUERY PLAN +-------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <= 1 AND "a" <= 2) +(3 rows) + +--Testcase 124: +SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, 2]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 125: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a > ALL(ARRAY[0, 1]); + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" > 0 AND "a" > 1) +(3 rows) + +--Testcase 126: +SELECT a, b FROM numbers WHERE a > ALL(ARRAY[0, 1]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 127: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, 3]); + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..142.00 rows=142 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" < 2 AND "a" < 3) +(3 rows) + +--Testcase 128: +SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, 3]); + a | b +---+----- + 1 | One +(1 row) + +-- ANY/ALL with TEXT ARRAY const +--Testcase 129: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE b = ANY(ARRAY['One', 'Two']); + QUERY PLAN +------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..13.00 rows=13 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("b" = 'One' OR "b" = 'Two') +(3 rows) + +--Testcase 130: +SELECT a, b FROM numbers WHERE b = ANY(ARRAY['One', 'Two']); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 131: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE b <> ALL(ARRAY['One', 'Four']); + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1267.00 rows=1267 width=40) + Output: a, b + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("b" <> 'One' AND "b" <> 'Four') +(3 rows) + +--Testcase 132: +SELECT a, b FROM numbers WHERE b <> ALL(ARRAY['One', 'Four']); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 133: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE b > ANY(ARRAY['One', 'Two']); + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..711.00 rows=711 width=40) + Output: a, b + Filter: (numbers.b > ANY ('{One,Two}'::text[])) + InfluxDB query: SELECT "a", "b" FROM "numbers" +(4 rows) + +--Testcase 134: +SELECT a, b FROM numbers WHERE b > ANY(ARRAY['One', 'Two']); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 135: +EXPLAIN VERBOSE +SELECT * FROM numbers WHERE b > ALL(ARRAY['Four', 'Five']); + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..87.00 rows=87 width=80) + Output: "time", tag1, a, b + Filter: (numbers.b > ALL ('{Four,Five}'::text[])) + InfluxDB query: SELECT "tag1", "a", "b" FROM "numbers" +(4 rows) + +--Testcase 136: +SELECT a, b FROM numbers WHERE b > ALL(ARRAY['Four', 'Five']); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 137: +DROP FOREIGN TABLE numbers; +--Testcase 138: +ALTER SERVER server1 OPTIONS (SET dbname 'no such database'); +--Testcase 139: +SELECT * FROM t1; +ERROR: influxdb_fdw : database not found: no such database +--Testcase 140: +ALTER SERVER server1 OPTIONS (SET dbname 'mydb'); +--Testcase 141: +SELECT * FROM t1; + time | tag1 | value1 +------------------------+--------+-------- + 2015-08-18 09:00:00+09 | tag1_A | 100 + 2015-08-18 09:00:00+09 | tag1_B | 100 +(2 rows) + +-- map time column to both timestamp and text +--Testcase 142: +CREATE FOREIGN TABLE t5(t timestamp OPTIONS (column_name 'time'), tag1 text OPTIONS (column_name 'time'), v1 integer OPTIONS (column_name 'value1')) SERVER server1 OPTIONS (table 'cpu'); +--Testcase 143: +SELECT * FROM t5; + t | tag1 | v1 +---------------------+----------------------+----- + 2015-08-18 00:00:00 | 2015-08-18T00:00:00Z | 100 + 2015-08-18 00:00:00 | 2015-08-18T00:00:00Z | 100 +(2 rows) + +--get version +--Testcase 144: +\df influxdb_fdw* + List of functions + Schema | Name | Result data type | Argument data types | Type +--------+------------------------+------------------+---------------------+------ + public | influxdb_fdw_handler | fdw_handler | | func + public | influxdb_fdw_validator | void | text[], oid | func + public | influxdb_fdw_version | integer | | func +(3 rows) + +--Testcase 145: +SELECT * FROM public.influxdb_fdw_version(); + influxdb_fdw_version +---------------------- + 20000 +(1 row) + +--Testcase 146: +SELECT influxdb_fdw_version(); + influxdb_fdw_version +---------------------- + 20000 +(1 row) + +--Test pushdown LIMIT...OFFSET +--Testcase 147: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; + QUERY PLAN +----------------------------------------------------------------------- + Foreign Scan on public.t1 + Output: (tableoid)::regclass, "time", tag1, value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" LIMIT 1 OFFSET 0 +(3 rows) + +--Testcase 148: +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; + tableoid | time | tag1 | value1 +----------+------------------------+--------+-------- + t1 | 2015-08-18 09:00:00+09 | tag1_A | 100 +(1 row) + +--Testcase 149: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; + QUERY PLAN +----------------------------------------------------------------------- + Foreign Scan on public.t1 + Output: (tableoid)::regclass, "time", tag1, value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" LIMIT 1 OFFSET 1 +(3 rows) + +--Testcase 150: +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; + tableoid | time | tag1 | value1 +----------+------------------------+--------+-------- + t1 | 2015-08-18 09:00:00+09 | tag1_B | 100 +(1 row) + +--Testcase 151: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; + QUERY PLAN +----------------------------------------------------------------------- + Foreign Scan on public.t1 + Output: ctid, "time", tag1, value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" LIMIT 1 OFFSET 0 +(3 rows) + +--Testcase 152: +SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; + ctid | time | tag1 | value1 +----------------+------------------------+--------+-------- + (4294967295,0) | 2015-08-18 09:00:00+09 | tag1_A | 100 +(1 row) + +--Testcase 153: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; + QUERY PLAN +------------------------------------------------------------------------- + Foreign Scan on public.t2 + Output: ctid, "time", tag1, value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" LIMIT 10 OFFSET 20 +(3 rows) + +--Testcase 154: +SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; + ctid | time | tag1 | value1 +------+------+------+-------- +(0 rows) + +--Testcase 155: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM + t1 + LEFT JOIN t2 + ON t2.value1 = 123, + LATERAL (SELECT t2.value1, t1.tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss +WHERE t1.value1 = ss.value1; + QUERY PLAN +------------------------------------------------------------------------------------------------- + Nested Loop + Output: t1."time", t1.tag1, t1.value1, t2."time", t2.tag1, t2.value1, (t2.value1), t1_1.tag1 + Join Filter: (t1.value1 = (t2.value1)) + -> Nested Loop Left Join + Output: t1."time", t1.tag1, t1.value1, t2."time", t2.tag1, t2.value1 + -> Foreign Scan on public.t1 + Output: t1."time", t1.tag1, t1.value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" + -> Materialize + Output: t2."time", t2.tag1, t2.value1 + -> Foreign Scan on public.t2 + Output: t2."time", t2.tag1, t2.value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" WHERE (("value1" = 123)) + -> Foreign Scan on public.t1 t1_1 + Output: t2.value1, t1_1.tag1 + InfluxDB query: SELECT "tag1" FROM "cpu" LIMIT 1 OFFSET 0 +(16 rows) + +--Testcase 156: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM + t1 + LEFT JOIN t2 + ON t2.value1 = 123, + LATERAL (SELECT t2.value1, t1.tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss1, + LATERAL (SELECT ss1.* from t3 LIMIT 1 OFFSET 20) AS ss2 +WHERE t1.value1 = ss2.value1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Output: t1."time", t1.tag1, t1.value1, t2."time", t2.tag1, t2.value1, (t2.value1), t1_1.tag1, ((t2.value1)), (t1_1.tag1) + Join Filter: (t1.value1 = ((t2.value1))) + -> Nested Loop + Output: t1."time", t1.tag1, t1.value1, t2."time", t2.tag1, t2.value1, (t2.value1), t1_1.tag1 + -> Nested Loop Left Join + Output: t1."time", t1.tag1, t1.value1, t2."time", t2.tag1, t2.value1 + -> Foreign Scan on public.t1 + Output: t1."time", t1.tag1, t1.value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" + -> Materialize + Output: t2."time", t2.tag1, t2.value1 + -> Foreign Scan on public.t2 + Output: t2."time", t2.tag1, t2.value1 + InfluxDB query: SELECT "tag1", "value1" FROM "cpu" WHERE (("value1" = 123)) + -> Foreign Scan on public.t1 t1_1 + Output: t2.value1, t1_1.tag1 + InfluxDB query: SELECT "tag1" FROM "cpu" LIMIT 1 OFFSET 0 + -> Foreign Scan on public.t3 + Output: (t2.value1), t1_1.tag1 + InfluxDB query: SELECT * FROM "t3" LIMIT 1 OFFSET 20 +(21 rows) + +--Testcase 157: +DROP FOREIGN TABLE cpu; +--Testcase 158: +DROP FOREIGN TABLE t1; +--Testcase 159: +DROP FOREIGN TABLE t2; +--Testcase 160: +DROP FOREIGN TABLE t3; +--Testcase 161: +DROP FOREIGN TABLE t4; +--Testcase 162: +DROP FOREIGN TABLE t5; +--Testcase 163: +DROP FOREIGN TABLE tx; +-- test INSERT, DELETE +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); +--Testcase 164: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+----------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | | tag2_A | | 2 | | +(3 rows) + +--Testcase 165: +EXPLAIN VERBOSE +INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test1', true); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Insert on public.cpu (cost=0.00..0.01 rows=0 width=0) + Batch Size: 1 + -> Result (cost=0.00..0.01 rows=1 width=153) + Output: '2021-01-01 00:00:01+09'::timestamp with time zone, NULL::text, 'tag1_K'::text, 'tag2_H'::text, '200'::bigint, '5.5'::double precision, 'test1'::text, true +(4 rows) + +--Testcase 166: +INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test', true); +--Testcase 167: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+----------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | | tag2_A | | 2 | | + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t +(4 rows) + +--Testcase 168: +EXPLAIN VERBOSE +INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), + ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Insert on public.cpu (cost=0.02..0.04 rows=0 width=0) + Batch Size: 1 + InitPlan 1 (returns $0) + -> Result (cost=0.00..0.01 rows=1 width=4) + Output: 350 + InitPlan 2 (returns $1) + -> Result (cost=0.00..0.01 rows=1 width=32) + Output: 6.9 + -> Values Scan on "*VALUES*" (cost=0.00..0.03 rows=2 width=153) + Output: "*VALUES*".column1, NULL::text, "*VALUES*".column2, "*VALUES*".column3, "*VALUES*".column4, "*VALUES*".column5, "*VALUES*".column6, "*VALUES*".column7 +(10 rows) + +--Testcase 169: +INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), + ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); +--Testcase 170: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+----------------------+--------+---------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | | tag2_A | | 2 | | + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2021-01-02 04:00:02+09 | 2021-01-01T19:00:02Z | tag1_I | tag2_E | 300 | 15.5 | test2 | f + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(6 rows) + +--Testcase 171: +INSERT INTO cpu(tag2, value1) VALUES('tag2_KH', 400); +--Testcase 172: +SELECT tag1, tag2, value1, value2, value3, value4 FROM cpu; + tag1 | tag2 | value1 | value2 | value3 | value4 +--------+---------+--------+--------+--------+-------- + tag1_A | tag2_A | 100 | 0.5 | str | t + tag1_B | | 100 | 2 | | f + | tag2_A | | 2 | | + tag1_K | tag2_H | 200 | 5.5 | test | t + tag1_I | tag2_E | 300 | 15.5 | test2 | f + | tag2_KH | 400 | | | + tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(7 rows) + +--Testcase 173: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE tag2 = 'tag2_KH'; + QUERY PLAN +------------------------------------------------------------------------- + Delete on public.cpu (cost=10.00..3.00 rows=0 width=0) + -> Foreign Delete on public.cpu (cost=10.00..3.00 rows=3 width=104) + InfluxDB query: DELETE FROM "cpu" WHERE (("tag2" = 'tag2_KH')) +(3 rows) + +--Testcase 174: +DELETE FROM cpu WHERE tag2 = 'tag2_KH'; +--Testcase 175: +SELECT tag1, tag2, value1, value2, value3, value4 FROM cpu; + tag1 | tag2 | value1 | value2 | value3 | value4 +--------+---------+--------+--------+--------+-------- + tag1_A | tag2_A | 100 | 0.5 | str | t + tag1_B | | 100 | 2 | | f + | tag2_A | | 2 | | + tag1_K | tag2_H | 200 | 5.5 | test | t + tag1_I | tag2_E | 300 | 15.5 | test2 | f + tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(6 rows) + +--Testcase 176: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; + QUERY PLAN +---------------------------------------------------------------------------------- + Delete on public.cpu (cost=10.00..3.00 rows=0 width=0) + -> Foreign Delete on public.cpu (cost=10.00..3.00 rows=3 width=104) + InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-01-01 19:00:02')) +(3 rows) + +--Testcase 177: +DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; +--Testcase 178: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+----------------------+--------+---------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_A | tag2_A | 100 | 0.5 | str | t + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | | tag2_A | | 2 | | + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(5 rows) + +--Testcase 179: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Delete on public.cpu (cost=10.00..212.00 rows=0 width=0) + -> Foreign Delete on public.cpu (cost=10.00..212.00 rows=212 width=104) + InfluxDB query: DELETE FROM "cpu" WHERE ((time < '2018-07-06 15:00:00')) AND (("tag1" <> 'tag1_B')) +(3 rows) + +--Testcase 180: +DELETE FROM cpu WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; +--Testcase 181: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+----------------------+--------+---------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(3 rows) + +-- Test INSERT, DELETE with time_text column +--Testcase 182: +INSERT INTO cpu(time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02T00:00:00Z', 'tag1_D', 'tag2_E', 600, 20.2, 'test3', true); +--Testcase 183: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +------------------------+----------------------+--------+---------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(4 rows) + +--Testcase 184: +INSERT INTO cpu(time_text, tag1, value2) VALUES('2021-02-02T00:00:00.123456789Z', 'tag1_P', 25.8); +--Testcase 185: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +-------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t + 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | tag1_P | | | 25.8 | | + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(5 rows) + +--Testcase 186: +INSERT INTO cpu(time_text, tag1, value2) VALUES('2021-02-02 00:00:01', 'tag1_J', 37.1); +--Testcase 187: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +-------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t + 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | tag1_P | | | 25.8 | | + 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | tag1_J | | | 37.1 | | + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(6 rows) + +--Testcase 188: +INSERT INTO cpu(time, time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02 00:00:01+05', '2021-02-02T00:00:02.123456789Z', 'tag1_A', 'tag2_B', 200, 5.5, 'test', true); +WARNING: Inserting value has both 'time_text' and 'time' columns specified. The 'time' will be ignored. +--Testcase 189: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +-------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t + 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | tag1_P | | | 25.8 | | + 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | tag1_J | | | 37.1 | | + 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | tag1_A | tag2_B | 200 | 5.5 | test | t + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(7 rows) + +--Testcase 190: +INSERT INTO cpu(time_text, time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-03T00:00:03.123456789Z', '2021-03-03 00:00:01+07', 'tag1_C', 'tag2_D', 200, 5.5, 'test', true); +WARNING: Inserting value has both 'time_text' and 'time' columns specified. The 'time' will be ignored. +--Testcase 191: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +-------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t + 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | tag1_P | | | 25.8 | | + 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | tag1_J | | | 37.1 | | + 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | tag1_A | tag2_B | 200 | 5.5 | test | t + 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(8 rows) + +--Testcase 192: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:00.123456789Z'; + QUERY PLAN +--------------------------------------------------------------------------------------------- + Delete on public.cpu (cost=10.00..3.00 rows=0 width=0) + -> Foreign Delete on public.cpu (cost=10.00..3.00 rows=3 width=104) + InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-02-02T00:00:00.123456789Z')) +(3 rows) + +--Testcase 193: +DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:00.123456789Z'; +--Testcase 194: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +-------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t + 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | tag1_J | | | 37.1 | | + 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | tag1_A | tag2_B | 200 | 5.5 | test | t + 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(7 rows) + +--Testcase 195: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Delete on public.cpu (cost=10.00..1.00 rows=0 width=0) + -> Foreign Delete on public.cpu (cost=10.00..1.00 rows=1 width=104) + InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-02-02T00:00:01Z')) AND (("tag1" = 'tag1_J')) +(3 rows) + +--Testcase 196: +DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; +--Testcase 197: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +-------------------------------+--------------------------------+--------+---------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t + 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | tag1_A | tag2_B | 200 | 5.5 | test | t + 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(6 rows) + +--Testcase 198: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------- + Delete on public.cpu (cost=10.00..6.00 rows=0 width=0) + -> Foreign Scan on public.cpu (cost=10.00..6.00 rows=6 width=104) + Output: "time", time_text, tag1, tag2 + Filter: ((cpu.time_text = '2021-02-02 00:00:00'::text) OR (cpu."time" = '2029-02-02 05:02:02+09'::timestamp with time zone)) + InfluxDB query: SELECT "tag1", "tag2", "value1" FROM "cpu" +(5 rows) + +--Testcase 199: +DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; +--Testcase 200: +SELECT * FROM cpu; + time | time_text | tag1 | tag2 | value1 | value2 | value3 | value4 +-------------------------------+--------------------------------+--------+--------+--------+--------+--------+-------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | tag1_B | | 100 | 2 | | f + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | tag1_K | tag2_H | 200 | 5.5 | test | t + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | tag1_D | tag2_E | 600 | 20.2 | test3 | t + 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | tag1_A | tag2_B | 200 | 5.5 | test | t + 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | tag1_C | tag2_D | 200 | 5.5 | test | t +(5 rows) + +-- InfluxDB_FDW will store time data for Field values as a strings +--Testcase 204: +CREATE FOREIGN TABLE tmp_time ( +time timestamp, +c1 time, +c2 timestamp, +c3 timestamp with time zone +) SERVER server1 OPTIONS (table 'tmp_time'); +--Testcase 205: +SELECT * FROM tmp_time; + time | c1 | c2 | c3 +------+----+----+---- +(0 rows) + +--Testcase 206: +INSERT INTO tmp_time (time, c1) VALUES ('1900-01-01 01:01:01', '01:02:03'); +--Testcase 207: +INSERT INTO tmp_time (time, c1) VALUES ('2100-01-01 01:01:01', '04:05:06'); +--Testcase 208: +INSERT INTO tmp_time (time, c1) VALUES ('1990-01-01 01:01:01', '07:08:09'); +--Testcase 209: +INSERT INTO tmp_time (time, c2) VALUES ('2020-12-27 03:02:56.634467', '1950-02-02 02:02:02'); +--Testcase 210: +INSERT INTO tmp_time (time, c3) VALUES ('2021-12-27 03:02:56.668301', '1800-02-02 02:02:02+9'); +--Testcase 210: +INSERT INTO tmp_time (time, c1, c2, c3) VALUES ('2022-05-06 07:08:09', '07:08:09', '2022-05-06 07:08:09', '2022-05-06 07:08:09+9'); +--Testcase 211: +-- 1800-02-02 02:02:02+9 is Daylight Saving Time (DST) changes in Japan. +-- Timezone setting Japan so it will plus 18s:59 +-- https://www.timeanddate.com/time/zone/japan/tokyo?syear=1850 +SELECT * FROM tmp_time; + time | c1 | c2 | c3 +----------------------------+----------+---------------------+------------------------------ + 1900-01-01 01:01:01 | 01:02:03 | | + 1990-01-01 01:01:01 | 07:08:09 | | + 2020-12-27 03:02:56.634467 | | 1950-02-02 02:02:02 | + 2021-12-27 03:02:56.668301 | | | 1800-02-02 02:21:01+09:18:59 + 2022-05-06 07:08:09 | 07:08:09 | 2022-05-06 07:08:09 | 2022-05-06 07:08:09+09 + 2100-01-01 01:01:01 | 04:05:06 | | +(6 rows) + +-- Recover data +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; +--Testcase 201: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 202: +DROP SERVER server1 CASCADE; +NOTICE: drop cascades to 6 other objects +DETAIL: drop cascades to foreign table cpu +drop cascades to foreign table numbers +drop cascades to foreign table t3 +drop cascades to foreign table t4 +drop cascades to foreign table tx +drop cascades to foreign table tmp_time +--Testcase 203: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/15.0/option.out b/expected/15.0/option.out new file mode 100644 index 0000000..59b83f6 --- /dev/null +++ b/expected/15.0/option.out @@ -0,0 +1,304 @@ +--Testcase 1: +SET datestyle=ISO; +--Testcase 2: +CREATE EXTENSION influxdb_fdw; +-- version not valid +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '9999', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +--Testcase 4: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version 'dummy', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '-1', retention_policy ''); +ERROR: InfluxDB only support versions from v1.x to 2.x. "version" must be 1 or 2. +-- host must be not NULL or not empty +--Testcase 6: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', port '38086', version '2', retention_policy ''); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 8: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 9: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Server Host not specified +--Testcase 10: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 11: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host '', port '38086', version '2', retention_policy ''); +--Testcase 12: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 13: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 14: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Server Host not specified +--Testcase 15: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- dbname must be not NULL or not empty +--Testcase 16: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 17: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 18: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 19: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Database not specified +--Testcase 20: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 21: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname '', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 22: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 23: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 24: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw: Database not specified +--Testcase 25: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- retention_policy can be NULL +--Testcase 26: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2'); +--Testcase 27: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 28: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 29: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 30: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 31: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 32: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 33: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 34: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 35: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- auth_token can be NULL +--Testcase 36: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 37: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 38: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 39: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: unauthorized access +--Testcase 40: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- auth_token invalid +--Testcase 41: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 42: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'wrong_token'); +--Testcase 43: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 44: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: Unauthorized +--Testcase 45: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 46: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 47: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token ''); +--Testcase 48: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 49: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: CODE: unauthorized, MESSAGE: unauthorized access +--Testcase 50: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- user must can be NULL +--Testcase 51: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 52: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (password 'pass'); +--Testcase 53: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 54: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 55: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 56: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 57: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password 'pass'); +--Testcase 58: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 59: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 60: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- password can be NULL +--Testcase 61: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 62: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user'); +--Testcase 63: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 65: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: authorization failed +--Testcase 65: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 66: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 67: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password ''); +--Testcase 68: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 69: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: authorization failed +--Testcase 70: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 71: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 72: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password ''); +--Testcase 73: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 74: +SELECT * FROM optiontbl; +ERROR: influxdb_fdw : influx-cxx [treatCurlResponse]: Bad request: ERROR: unable to parse authentication credentials +--Testcase 75: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 76: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 77: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 78: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 79: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 1 | 100 + a | version 1 | 200 + a | version 1 | 300 + b | version 1 | 400 + b | version 1 | 500 +(5 rows) + +--Testcase 80: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- Test if version option is not set +-- Connect to InfluxDB version 1 +--Testcase 81: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086'); +--Testcase 82: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 83: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 84: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 1 | 100 + a | version 1 | 200 + a | version 1 | 300 + b | version 1 | 400 + b | version 1 | 500 +(5 rows) + +--Testcase 85: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +-- Connect to InfluxDB version 2 +--Testcase 86: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', retention_policy ''); +--Testcase 87: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 88: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 89: +SELECT * FROM optiontbl; + tag1 | version | value2 +------+-----------+-------- + a | version 2 | 100 + a | version 2 | 200 + a | version 2 | 300 + b | version 2 | 400 + b | version 2 | 500 +(5 rows) + +--Testcase 90: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table optiontbl +--Testcase 91: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/15.0/schemaless/add_fields.out b/expected/15.0/schemaless/add_fields.out new file mode 100644 index 0000000..ee4e7de --- /dev/null +++ b/expected/15.0/schemaless/add_fields.out @@ -0,0 +1,1295 @@ +SET datestyle=ISO; +-- timestamp with time zone differs based on this +SET timezone='UTC'; +\set ECHO none +-- Init data +:INIT_FIELDS_ORIGINAL; +--Before update data +--Testcase 1: +CREATE EXTENSION influxdb_fdw CASCADE; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: +CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); +--Testcase 5: +CREATE FOREIGN TABLE sctbl2 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); +--Before update data +--Testcase 6: +SELECT * FROM sctbl1; + time | tags | fields +-------------------------------+----------------------------+----------------------------------------------------------------------------------------------------- + 1677-09-21 00:12:43.145224+00 | {"device_id": "dev1"} | {"sig1": "-664", "sig2": null, "sig3": "0.78", "sig4": "true"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "d ,=ev2"} | {"sig1": "2222", "sig2": "x'a8a9aaabacadaeaf'", "sig3": "-1", "sig4": "false"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false"} + 2019-05-02 16:12:41.098+00 | {"device_id": "\"dev 1\""} | {"sig1": "70220", "sig2": "いろはにほへど ちりぬるをわがよたれぞ", "sig3": "0.37", "sig4": "true"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.79769313486", "sig4": "true"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "-8555", "sig2": "AHWEMAKDF", "sig3": "0.34", "sig4": "false"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "319", "sig2": "P_AEF-wefA", "sig3": "0.32", "sig4": "false"} + 2262-04-11 23:47:16.854776+00 | {"device_id": "'dev3'"} | {"sig1": "34422", "sig2": "散りぬるを我が世誰", "sig3": "0.32", "sig4": "false"} +(9 rows) + +--Testcase 7: +SELECT max(time), max((fields->>'sig1')::bigint), max((fields->>'sig1')::bigint)+10, max((fields->>'sig1')::bigint)-10, max((fields->>'sig3')::float8), max((fields->>'sig3')::float8)/2 FROM sctbl1 GROUP BY time,(fields->>'sig1')::bigint; + max | max | ?column? | ?column? | max | ?column? +-------------------------------+-------+----------+----------+----------------+---------------- + 1677-09-21 00:12:43.145224+00 | -664 | -654 | -674 | 0.78 | 0.39 + 2016-06-13 17:43:50.1004+00 | 2222 | 2232 | 2212 | -1 | -0.5 + 2019-05-02 16:12:41.098+00 | -8555 | -8545 | -8565 | 0.34 | 0.17 + 2016-06-13 17:43:50.1004+00 | 35655 | 35665 | 35645 | 0.25 | 0.125 + 2016-06-13 17:43:50.1004+00 | 65535 | 65545 | 65525 | -0.91 | -0.455 + 2019-05-02 16:12:41.098+00 | 319 | 329 | 309 | 0.32 | 0.16 + 2019-05-02 16:12:41.098+00 | 70220 | 70230 | 70210 | 0.37 | 0.185 + 2262-04-11 23:47:16.854776+00 | 34422 | 34432 | 34412 | 0.32 | 0.16 + 2019-05-02 16:12:41.098+00 | 11 | 21 | 1 | -0.79769313486 | -0.39884656743 +(9 rows) + +--Testcase 8: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4 from sctbl1 ORDER BY tags->>'device_id'; + device_id | sig1 | sig2 | sig3 | sig4 +-----------+-------+----------------------------------------+----------------+------ + dev1 | -664 | | 0.78 | t + dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t + "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f + dev2 | -8555 | AHWEMAKDF | 0.34 | f + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f + dev3 | 319 | P_AEF-wefA | 0.32 | f + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f +(9 rows) + +--Testcase 9: +SELECT bool_or((fields->>'sig1')::bigint <> 10) AND true, bool_and(fields->>'sig2' != 'aghsjfh'), bool_or((fields->>'sig1')::bigint+(fields->>'sig3')::float8 <=5.5) OR false from sctbl1 GROUP BY (fields->>'sig1')::bigint,fields->>'sig2'; + ?column? | bool_and | ?column? +----------+----------+---------- + t | t | f + t | t | f + t | t | f + t | t | f + t | t | f + t | | t + t | t | f + t | t | f + t | t | t +(9 rows) + +--Testcase 10: +SELECT sqrt(abs((fields->>'sig1')::float8)), sqrt(abs((fields->>'sig3')::float8)) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint > -1000 AND (fields->>'sig3')::float8 < 1000 ) AS sctbl1 ORDER BY 1 ASC,2 DESC; + sqrt | sqrt +--------------------+-------------------- + 3.3166247903554 | 0.8931366831902047 + 17.86057109949175 | 0.565685424949238 + 25.768197453450252 | 0.8831760866327847 + 47.138094997570704 | 1 + 185.53166845581916 | 0.565685424949238 + 188.8253160992985 | 0.5 + 255.99804686754936 | 0.9539392014169457 + 264.990565869806 | 0.6082762530298219 +(8 rows) + +--Testcase 11: +SELECT fields->>'sig2' sig2, mode((fields->>'sig3')::float8) WITHIN GROUP (ORDER BY (fields->>'sig3')::float8) AS m1 from sctbl1 GROUP BY fields->>'sig2'; +ERROR: function mode(double precision, double precision) does not exist +LINE 1: SELECT fields->>'sig2' sig2, mode((fields->>'sig3')::float8)... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +--Testcase 12: +SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), lower(fields->>'sig2') FROM sctbl1 ORDER BY 1 ASC,2 DESC,3 ASC,4; + upper | upper | lower | lower +----------------------------------------+----------------------------------------+----------------------------------------+---------------------------------------- + `~!@#$%^&*()_+= | `~!@#$%^&*()_+= | `~!@#$%^&*()_+= | `~!@#$%^&*()_+= + いろはにほへど ちりぬるをわがよたれぞ | いろはにほへど ちりぬるをわがよたれぞ | いろはにほへど ちりぬるをわがよたれぞ | いろはにほへど ちりぬるをわがよたれぞ + 2E2EAWEKFRJQ2O | 2E2EAWEKFRJQ2O | 2e2eawekfrjq2o | 2e2eawekfrjq2o + ABCDEFGHIJKLMNOPQRSTUVWXYZ | ABCDEFGHIJKLMNOPQRSTUVWXYZ | abcdefghijklmnopqrstuvwxyz | abcdefghijklmnopqrstuvwxyz + AHWEMAKDF | AHWEMAKDF | ahwemakdf | ahwemakdf + P_AEF-WEFA | P_AEF-WEFA | p_aef-wefa | p_aef-wefa + X'A8A9AAABACADAEAF' | X'A8A9AAABACADAEAF' | x'a8a9aaabacadaeaf' | x'a8a9aaabacadaeaf' + 散りぬるを我が世誰 | 散りぬるを我が世誰 | 散りぬるを我が世誰 | 散りぬるを我が世誰 +(8 rows) + +-------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ +--Update data +:RECOVER_INIT_FIELDS_ADD_1; +--Testcase 13: +DROP FOREIGN TABLE sctbl1; +--Testcase 14: +CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); +--Testcase 15: +SELECT * FROM sctbl1; + time | tags | fields +-------------------------------+----------------------------+---------------------------------------------------------------------------------------------------------------------- + 1677-09-21 00:12:43.145224+00 | {"device_id": "dev1"} | {"sig1": "-664", "sig2": null, "sig3": "0.78", "sig4": "true", "sig5": "false"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "d ,=ev2"} | {"sig1": "2222", "sig2": "x'a8a9aaabacadaeaf'", "sig3": "-1", "sig4": "false", "sig5": "false"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false", "sig5": "true"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false", "sig5": "true"} + 2019-05-02 16:12:41.098+00 | {"device_id": "\"dev 1\""} | {"sig1": "70220", "sig2": "いろはにほへど ちりぬるをわがよたれぞ", "sig3": "0.37", "sig4": "true", "sig5": "false"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.79769313486", "sig4": "true", "sig5": "true"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "-8555", "sig2": "AHWEMAKDF", "sig3": "0.34", "sig4": "false", "sig5": "false"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "319", "sig2": "P_AEF-wefA", "sig3": "0.32", "sig4": "false", "sig5": "true"} + 2262-04-11 23:47:16.854776+00 | {"device_id": "'dev3'"} | {"sig1": "34422", "sig2": "散りぬるを我が世誰", "sig3": "0.32", "sig4": "false", "sig5": "true"} +(9 rows) + +--Select fields,tags +--Testcase 16: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint < (fields->>'sig3')::float8 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; + device_id | sig1 | sig3 +-----------+-------+------- + 'dev3' | 34422 | 0.32 + dev3 | 319 | 0.32 + dev3 | 65535 | -0.91 + d ,=ev2 | 2222 | -1 + dev2 | 35655 | 0.25 +(5 rows) + +--Testcase 17: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE (fields->>'sig3')::float8 < 0 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; + device_id | sig1 | sig3 +-----------+-------+---------------- + dev3 | 65535 | -0.91 + d ,=ev2 | 2222 | -1 + dev1 | 11 | -0.79769313486 +(3 rows) + +--Testcase 18: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE NOT time >'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 2; + device_id | sig1 | sig3 +-----------+-------+------ + d ,=ev2 | 2222 | -1 + dev2 | -8555 | 0.34 + dev2 | 35655 | 0.25 + "dev 1" | 70220 | 0.37 + dev1 | -664 | 0.78 +(5 rows) + +--Testcase 19: +SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | device_id | sig1 | sig2 | sig3 | sig4 | sig5 +-------------------------------+-----------+-------+----------------------------------------+----------------+------+------ + 2262-04-11 23:47:16.854776+00 | 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 2019-05-02 16:12:41.098+00 | dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t + 2019-05-02 16:12:41.098+00 | "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + 2019-05-02 16:12:41.098+00 | dev2 | -8555 | AHWEMAKDF | 0.34 | f | f + 2019-05-02 16:12:41.098+00 | dev3 | 319 | P_AEF-wefA | 0.32 | f | t +(5 rows) + +--Testcase 20: +SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | device_id | sig1 | sig2 | sig3 | sig4 | sig5 +------+-----------+------+------+------+------+------ +(0 rows) + +--Testcase 21: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig1')::bigint BETWEEN 0 AND 10000 ORDER BY (fields->>'sig1')::bigint DESC LIMIT 5 OFFSET 0; + sig1 | sig3 | sig4 | sig5 +------+----------------+------+------ + 2222 | -1 | f | f + 319 | 0.32 | f | t + 11 | -0.79769313486 | t | t +(3 rows) + +--Testcase 22: +SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE fields->>'sig2' LIKE 'x%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | device_id | sig1 | sig2 | sig3 | sig4 | sig5 +-----------------------------+-----------+-------+----------------------------+------+------+------ + 2016-06-13 17:43:50.1004+00 | dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f +(2 rows) + +--Testcase 23: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4 FROM sctbl1 WHERE NOT EXISTS (SELECT fields->>'sig2' FROM sctbl1 WHERE fields->>'sig2'='AHW') ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; + device_id | sig1 | sig2 | sig3 | sig4 +-----------+-------+---------------------+-------+------ + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f + dev3 | 319 | P_AEF-wefA | 0.32 | f + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f + dev2 | -8555 | AHWEMAKDF | 0.34 | f +(5 rows) + +--Testcase 24: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig3')::float8 < ALL (SELECT (fields->>'sig1')::bigint FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig5 +-------+----------------------------------------+-------+------+------ + 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 2222 | x'a8a9aaabacadaeaf' | -1 | f | f +(5 rows) + +--Testcase 25: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig3')::float8 = ANY (ARRAY[0.78,0.32,0.34]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig5 +-------+--------------------+------+------+------ + 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 319 | P_AEF-wefA | 0.32 | f | t + -664 | | 0.78 | t | f + -8555 | AHWEMAKDF | 0.34 | f | f +(4 rows) + +--Testcase 26: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig3')::float8=0.25) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig5 +-------+----------------------------------------+-------+------+------ + 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 2222 | x'a8a9aaabacadaeaf' | -1 | f | f +(5 rows) + +--Testcase 27: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE fields->>'sig1'=ANY (ARRAY(SELECT fields->>'sig1' FROM sctbl1 WHERE (fields->>'sig1')::bigint%2=0)) ORDER BY 1 DESC LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig5 +-------+----------------------------------------+------+------+------ + 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 2222 | x'a8a9aaabacadaeaf' | -1 | f | f + -664 | | 0.78 | t | f +(4 rows) + +--Testcase 28: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig4')::boolean=true) ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig5 +-------+----------------------------------------+-------+------+------ + 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 2222 | x'a8a9aaabacadaeaf' | -1 | f | f +(5 rows) + +--Testcase 29: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint+(fields->>'sig3')::float8 as ss FROM sctbl1 WHERE fields->>'sig2' IS NULL ORDER BY (fields->>'sig1')::bigint DESC,fields->>'sig2' ASC LIMIT 5 OFFSET 0; + sig1 | sig3 | sig5 | ss +------+------+------+--------- + -664 | 0.78 | f | -663.22 +(1 row) + +--Testcase 30: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint/(fields->>'sig3')::float8 as dd FROM sctbl1 WHERE fields->>'sig2' IS NOT NULL ORDER BY fields->>'sig2' DESC,(fields->>'sig1')::bigint ASC LIMIT 5 OFFSET 0; + sig1 | sig3 | sig5 | dd +-------+------+------+-------------------- + 34422 | 0.32 | t | 107568.75 + 2222 | -1 | f | -2222 + 319 | 0.32 | t | 996.875 + -8555 | 0.34 | f | -25161.76470588235 + 35655 | 0.25 | t | 142620 +(5 rows) + +--Testcase 31: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint*(fields->>'sig3')::float8 as mm FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint=5 ORDER BY fields->>'sig2' DESC LIMIT 5 OFFSET 0; + sig1 | sig3 | sig5 | mm +-------+------+------+--------------------- + -664 | 0.78 | f | -517.9200000000001 + 34422 | 0.32 | t | 11015.04 + 2222 | -1 | f | -2222 + 319 | 0.32 | t | 102.08 + -8555 | 0.34 | f | -2908.7000000000003 +(5 rows) + +--Testcase 32: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig1')::bigint != 0 AND (fields->>'sig3')::float8=0.32 ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig5 +-------+--------------------+------+------+------ + 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 319 | P_AEF-wefA | 0.32 | f | t +(2 rows) + +--Testcase 33: +SELECT (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4, (fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 > -1.0 OR fields->>'sig2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig5 +-------+----------------------------------------+-------+------+------ + 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 2222 | x'a8a9aaabacadaeaf' | -1 | f | f +(5 rows) + +--Testcase 34: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 < -0.1 AND fields->>'sig2' > 'Mee' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig5 +------+---------------------+------+------+------ + 2222 | x'a8a9aaabacadaeaf' | -1 | f | f +(1 row) + +--Testcase 35: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig5 +------+---------------------+------+------+------ + 2222 | x'a8a9aaabacadaeaf' | -1 | f | f +(1 row) + +--Testcase 36: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE fields->>'sig2' LIKE 'A%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig5 +------+------------+------+------+------ + 319 | P_AEF-wefA | 0.32 | f | t +(1 row) + +--Testcase 37: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE NOT EXISTS (SELECT fields->>'sig2' FROM sctbl1 WHERE fields->>'sig2'='AHW') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 2; + sig1 | sig2 | sig3 | sig4 | sig5 +-------+----------------------------+----------------+------+------ + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 2222 | x'a8a9aaabacadaeaf' | -1 | f | f + 319 | P_AEF-wefA | 0.32 | f | t + 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t +(5 rows) + +--Testcase 38: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 NOT IN (0, 1000, -1, -2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 1; + sig1 | sig2 | sig3 | sig4 | sig5 +-------+----------------------------+----------------+------+------ + 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 319 | P_AEF-wefA | 0.32 | f | t + 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t +(5 rows) + +--Testcase 39: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE fields->>'sig3'=ANY (ARRAY(SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig1')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 1; + sig1 | sig2 | sig3 | sig4 | sig5 +-------+---------------------+------+------+------ + 34422 | 散りぬるを我が世誰 | 0.32 | f | t + 2222 | x'a8a9aaabacadaeaf' | -1 | f | f + 319 | P_AEF-wefA | 0.32 | f | t + -664 | | 0.78 | t | f +(4 rows) + +--Testcase 40: +SELECT time, fields->>'sig2' sig2 FROM sctbl1 WHERE fields->>'sig2' <= 'A' AND (fields->>'sig3')::float8 <>-5 AND (fields->>'sig1')::bigint <> 100 ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 1; + time | sig2 +----------------------------+---------------------------------------- + 2019-05-02 16:12:41.098+00 | 2e2eawekfrjq2o + 2019-05-02 16:12:41.098+00 | いろはにほへど ちりぬるをわがよたれぞ +(2 rows) + +--Select aggregate functions +--Testcase 41: +SELECT max(time), max((fields->>'sig1')::bigint*0.5), max((fields->>'sig3')::float8+10) FROM sctbl1 WHERE (fields->>'sig3')::float8 NOT IN (0, 1000, -1, -2) GROUP BY fields->>'sig3', fields->>'sig1' HAVING min((fields->>'sig3')::float8) < min((fields->>'sig1')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; + max | max | max +-------------------------------+---------+--------------- + 2262-04-11 23:47:16.854776+00 | 17211.0 | 10.32 + 2019-05-02 16:12:41.098+00 | 5.5 | 9.20230686514 + 2019-05-02 16:12:41.098+00 | 159.5 | 10.32 + 2019-05-02 16:12:41.098+00 | 35110.0 | 10.37 + 2016-06-13 17:43:50.1004+00 | 17827.5 | 10.25 +(5 rows) + +--Testcase 42: +SELECT tags->>'device_id' device_id,abs((fields->>'sig1')::bigint), ceil((fields->>'sig3')::float8), (fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0 AND (fields->>'sig4')::boolean = true; + device_id | abs | ceil | sig5 +-----------+-------+------+------ + "dev 1" | 70220 | 1 | f + dev1 | 11 | -0 | t +(2 rows) + +--Testcase 43: +SELECT count(tags->>'device_id'),sum((fields->>'sig1')::bigint),sum((fields->>'sig1')::bigint+(fields->>'sig3')::float8),stddev((fields->>'sig3')::float8 order by (fields->>'sig3')::float8) from sctbl1 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; + count | sum | sum | stddev +-------+--------+--------------------+-------------------- + 9 | 199165 | 199164.67230686513 | 0.6690182094140991 +(1 row) + +--Testcase 44: +SELECT mode((fields->>'sig1')::bigint) WITHIN GROUP (order by (fields->>'sig1')::bigint) from sctbl1; +ERROR: function mode(bigint, bigint) does not exist +LINE 1: SELECT mode((fields->>'sig1')::bigint) WITHIN GROUP (order b... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +--Testcase 45: +SELECT (fields->>'sig1')::bigint sig1,spread((fields->>'sig1')::bigint) FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig4')::boolean in (true,false)) GROUP BY tags->>'device_id', fields->>'sig1',fields->>'sig5' HAVING (fields->>'sig5')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 1; +ERROR: ORDER BY position 3 is not in select list +LINE 1: ...ds->>'sig5')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 5 ... + ^ +--Testcase 46: +SELECT (fields->>'sig3')::float8 sig3, acos((fields->>'sig3')::float8), atan((fields->>'sig3')::float8) FROM sctbl1 WHERE fields->>'sig2' IS NULL GROUP BY fields->>'sig3' HAVING min((fields->>'sig1')::bigint) < min((fields->>'sig3')::float8) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; + sig3 | acos | atan +------+--------------------+-------------------- + 0.78 | 0.6761305095606613 | 0.6624262938331512 +(1 row) + +--Testcase 47: +SELECT (fields->>'sig3')::float8 sig3, log((fields->>'sig3')::float8),cos((fields->>'sig3')::float8) FROM sctbl1 WHERE fields->>'sig2' IS NOT NULL AND (fields->>'sig3')::float8 > 0 GROUP BY fields->>'sig3' HAVING min((fields->>'sig3')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND sum((fields->>'sig3')::float8) > -1000 AND avg((fields->>'sig3')::float8) > -1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; + sig3 | log | cos +------+----------------------+-------------------- + 0.34 | -0.46852108295774486 | 0.9427546655283462 +(1 row) + +--Testcase 48: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,ln((fields->>'sig1')::bigint), log10((fields->>'sig3')::float8) FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint=5 GROUP BY fields->>'sig1', fields->>'sig3' HAVING min((fields->>'sig3')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND (fields->>'sig1')::bigint > 0 AND (fields->>'sig3')::float8 > 0 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; + sig1 | sig3 | ln | log10 +------+------+-------------------+-------------------- + 319 | 0.32 | 5.765191102784844 | -0.494850021680094 +(1 row) + +--Testcase 49: +SELECT max(time), max((fields->>'sig1')::bigint + (fields->>'sig3')::float8), min((fields->>'sig1')::bigint + (fields->>'sig3')::float8) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig4')::boolean != true ) AS tb1 WHERE (fields->>'sig3')::float8 != -1 AND (fields->>'sig5')::boolean != true GROUP BY fields->>'sig1' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; + max | max | min +----------------------------+----------+---------- + 2019-05-02 16:12:41.098+00 | -8554.66 | -8554.66 +(1 row) + +--Testcase 50: +SELECT every((fields->>'sig1')::bigint > 5),every((fields->>'sig3')::float8 != 5) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig5')::boolean = true ) AS tb1 WHERE (fields->>'sig3')::float8 < 0 GROUP BY fields->>'sig1', fields->>'sig4' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 DESC, 2 LIMIT 5 OFFSET 0; + every | every +-------+------- + t | t + t | t +(2 rows) + +--Testcase 51: +SELECT (fields->>'sig3')::float8 sig3,exp((fields->>'sig3')::float8),exp((fields->>'sig3')::float8*2) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig5')::boolean = true ) AS tb1 WHERE true GROUP BY fields->>'sig3' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; + sig3 | exp | exp +----------------+---------------------+--------------------- + 0.32 | 1.3771277643359572 | 1.8964808793049515 + 0.25 | 1.2840254166877414 | 1.6487212707001282 + -0.79769313486 | 0.45036670194133693 | 0.20283016621751704 + -0.91 | 0.40252422403363597 | 0.16202575093388075 +(4 rows) + +--Testcase 52: +SELECT min(time)+'10 days'::interval, min((fields->>'sig1')::bigint + (fields->>'sig3')::float8) FROM sctbl1 WHERE NOT time>'2020-01-03 20:30:50' GROUP BY fields->>'sig1', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; + ?column? | min +-----------------------------+---------- + 2016-06-23 17:43:50.1004+00 | 65534.09 + 2016-06-23 17:43:50.1004+00 | 35655.25 + 2016-06-23 17:43:50.1004+00 | 2221 + 2019-05-12 16:12:41.098+00 | 70220.37 + 2019-05-12 16:12:41.098+00 | 319.32 +(5 rows) + +--Testcase 53: +SELECT floor((fields->>'sig1')::bigint*(fields->>'sig3')::float8), floor((fields->>'sig1')::bigint/(fields->>'sig3')::float8) FROM sctbl1 WHERE ((fields->>'sig3')::float8 - 1)/3 != 1 GROUP BY fields->>'sig1', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; + floor | floor +--------+-------- + -59637 | -72017 + -2222 | -2222 + -9 | -14 + 102 | 996 + 8913 | 142620 +(5 rows) + +--Testcase 54: +SELECT time, tags->>'device_id' device_id, pow((fields->>'sig1')::bigint,-2) FROM sctbl1 WHERE ((fields->>'sig3')::float8 - 1)/3 != 1 GROUP BY time, tags->>'device_id', fields->>'sig1' ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; + time | device_id | pow +-------------------------------+-----------+------------------------ + 1677-09-21 00:12:43.145224+00 | dev1 | 2.2681085788938886e-06 + 2016-06-13 17:43:50.1004+00 | dev3 | 2.3283774924386086e-10 + 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 2.025405060758101e-07 + 2016-06-13 17:43:50.1004+00 | dev2 | 7.866093755460175e-10 + 2019-05-02 16:12:41.098+00 | dev3 | 9.826947455311957e-06 +(5 rows) + +--Testcase 55: +SELECT min(time)+'10 days'::interval, min((fields->>'sig3')::float8) FROM sctbl1 WHERE false GROUP BY fields->>'sig1',fields->>'sig2', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; + ?column? | min +----------+----- +(0 rows) + +--Testcase 56: +SELECT min(time)+'10 days'::interval, min((fields->>'sig3')::float8) FROM sctbl1 WHERE (fields->>'sig3')::float8 IN (-1,0.32,0.34,0.91,0.78) GROUP BY fields->>'sig3' HAVING min((fields->>'sig1')::bigint) > min((fields->>'sig3')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; + ?column? | min +-----------------------------+------ + 2016-06-23 17:43:50.1004+00 | -1 + 2019-05-12 16:12:41.098+00 | 0.32 +(2 rows) + +--Testcase 57: +SELECT max((fields->>'sig3')::float8), count(*), exists(SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > 1), exists (SELECT count(*) FROM sctbl1 WHERE (fields->>'sig4')::boolean in ('t','f')) FROM sctbl1 WHERE (fields->>'sig5')::boolean =true GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 5 OFFSET 0; + max | count | exists | exists +------+-------+--------+-------- + 0.25 | 2 | f | t + 0.32 | 2 | f | t + 0.32 | 1 | f | t +(3 rows) + +--Join table, each table has 5 fields +--Testcase 58: +SELECT * FROM sctbl1 s1 FULL JOIN sctbl2 s2 ON s1.tags->>'device_id'=s2.tags->>'device_id'; + time | tags | fields | time | tags | fields +-------------------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1677-09-21 00:12:43.145224+00 | {"device_id": "dev1"} | {"sig1": "-664", "sig2": null, "sig3": "0.78", "sig4": "true", "sig5": "false"} | 2016-06-13 17:43:50.1004+00 | {"device_id": "dev1"} | {"sig1": "640", "sig2": "敷ヘカウ告政ヨハツヤ", "sig3": "20.4222211221", "sig4": "true", "sig5": "[(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)]"} + 1677-09-21 00:12:43.145224+00 | {"device_id": "dev1"} | {"sig1": "-664", "sig2": null, "sig3": "0.78", "sig4": "true", "sig5": "false"} | 2262-04-11 23:47:16.854776+00 | {"device_id": "dev1"} | {"sig1": "7060", "sig2": null, "sig3": "-3230.17", "sig4": "true", "sig5": "[(-121.9044,37.895),(-121.9044,37.899)]"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.79769313486", "sig4": "true", "sig5": "true"} | 2016-06-13 17:43:50.1004+00 | {"device_id": "dev1"} | {"sig1": "640", "sig2": "敷ヘカウ告政ヨハツヤ", "sig3": "20.4222211221", "sig4": "true", "sig5": "[(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)]"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.79769313486", "sig4": "true", "sig5": "true"} | 2262-04-11 23:47:16.854776+00 | {"device_id": "dev1"} | {"sig1": "7060", "sig2": null, "sig3": "-3230.17", "sig4": "true", "sig5": "[(-121.9044,37.895),(-121.9044,37.899)]"} + 2019-05-02 16:12:41.098+00 | {"device_id": "\"dev 1\""} | {"sig1": "70220", "sig2": "いろはにほへど ちりぬるをわがよたれぞ", "sig3": "0.37", "sig4": "true", "sig5": "false"} | | | + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false", "sig5": "true"} | 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "7950", "sig2": "`~!@#$%^&*()_+=-{}[]|:;<>?/.", "sig3": "220.2215", "sig4": "false", "sig5": "[(-122.2364,37.436),(-122.2364,37.443)]"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false", "sig5": "true"} | 2262-04-11 23:47:16.854776+00 | {"device_id": "dev2"} | {"sig1": "-7880", "sig2": "EFQEF", "sig3": "2330.8", "sig4": "false", "sig5": "[(-121.9026,37.843),(-121.9028,37.843)]"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "-8555", "sig2": "AHWEMAKDF", "sig3": "0.34", "sig4": "false", "sig5": "false"} | 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "7950", "sig2": "`~!@#$%^&*()_+=-{}[]|:;<>?/.", "sig3": "220.2215", "sig4": "false", "sig5": "[(-122.2364,37.436),(-122.2364,37.443)]"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "-8555", "sig2": "AHWEMAKDF", "sig3": "0.34", "sig4": "false", "sig5": "false"} | 2262-04-11 23:47:16.854776+00 | {"device_id": "dev2"} | {"sig1": "-7880", "sig2": "EFQEF", "sig3": "2330.8", "sig4": "false", "sig5": "[(-121.9026,37.843),(-121.9028,37.843)]"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "d ,=ev2"} | {"sig1": "2222", "sig2": "x'a8a9aaabacadaeaf'", "sig3": "-1", "sig4": "false", "sig5": "false"} | | | + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false", "sig5": "true"} | 1677-09-21 00:12:43.145224+00 | {"device_id": "dev3"} | {"sig1": "-30", "sig2": null, "sig3": "102.3827810127", "sig4": "false", "sig5": "[(-122.106469,37.66446),(-122.1067,37.664)]"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false", "sig5": "true"} | 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "6990", "sig2": "wr3wri", "sig3": "5630.9", "sig4": "false", "sig5": "[(-121.900576,37.74452),(-121.900804,37.74889)]"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "319", "sig2": "P_AEF-wefA", "sig3": "0.32", "sig4": "false", "sig5": "true"} | 1677-09-21 00:12:43.145224+00 | {"device_id": "dev3"} | {"sig1": "-30", "sig2": null, "sig3": "102.3827810127", "sig4": "false", "sig5": "[(-122.106469,37.66446),(-122.1067,37.664)]"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "319", "sig2": "P_AEF-wefA", "sig3": "0.32", "sig4": "false", "sig5": "true"} | 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "6990", "sig2": "wr3wri", "sig3": "5630.9", "sig4": "false", "sig5": "[(-121.900576,37.74452),(-121.900804,37.74889)]"} + 2262-04-11 23:47:16.854776+00 | {"device_id": "'dev3'"} | {"sig1": "34422", "sig2": "散りぬるを我が世誰", "sig3": "0.32", "sig4": "false", "sig5": "true"} | | | +(15 rows) + +--Testcase 59: +SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fields->>'sig2' sig2,(s1.fields->>'sig3')::float8 sig3,(s1.fields->>'sig4')::boolean sig4,s2.fields->>'sig5' sig5 FROM sctbl1 s1 LEFT JOIN sctbl2 s2 ON (s1.fields->>'sig4')::boolean=(s2.fields->>'sig4')::boolean; + device_id | sig1 | sig2 | sig3 | sig4 | sig5 +-----------+-------+----------------------------------------+----------------+------+--------------------------------------------------------------- + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + dev3 | 319 | P_AEF-wefA | 0.32 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + dev2 | -8555 | AHWEMAKDF | 0.34 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] + "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] + dev1 | -664 | | 0.78 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | [(-122.2364,37.436),(-122.2364,37.443)] + dev3 | 319 | P_AEF-wefA | 0.32 | f | [(-122.2364,37.436),(-122.2364,37.443)] + dev2 | -8555 | AHWEMAKDF | 0.34 | f | [(-122.2364,37.436),(-122.2364,37.443)] + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | [(-122.2364,37.436),(-122.2364,37.443)] + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | [(-122.2364,37.436),(-122.2364,37.443)] + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | [(-122.2364,37.436),(-122.2364,37.443)] + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + dev3 | 319 | P_AEF-wefA | 0.32 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + dev2 | -8555 | AHWEMAKDF | 0.34 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | [(-121.9044,37.895),(-121.9044,37.899)] + "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | [(-121.9044,37.895),(-121.9044,37.899)] + dev1 | -664 | | 0.78 | t | [(-121.9044,37.895),(-121.9044,37.899)] + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | [(-121.9026,37.843),(-121.9028,37.843)] + dev3 | 319 | P_AEF-wefA | 0.32 | f | [(-121.9026,37.843),(-121.9028,37.843)] + dev2 | -8555 | AHWEMAKDF | 0.34 | f | [(-121.9026,37.843),(-121.9028,37.843)] + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | [(-121.9026,37.843),(-121.9028,37.843)] + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | [(-121.9026,37.843),(-121.9028,37.843)] + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | [(-121.9026,37.843),(-121.9028,37.843)] +(30 rows) + +--Testcase 60: +SELECT s2.device_id,s2.sig1,s2.sig2,s2.sig3,s1.sig4,s1.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 RIGHT JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 using(sig2) where (s2.sig1)::bigint > 0 ORDER BY s2.device_id,s2.sig1,s2.sig2,s2.sig3,s1.sig4,s1.sig5; + device_id | sig1 | sig2 | sig3 | sig4 | sig5 +-----------+------+------------------------------+---------------+------+------ + dev1 | 640 | 敷ヘカウ告政ヨハツヤ | 20.4222211221 | | + dev1 | 7060 | | -3230.17 | | + dev2 | 7950 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | 220.2215 | | + dev3 | 6990 | wr3wri | 5630.9 | | +(4 rows) + +--Testcase 61: +SELECT * FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 LEFT OUTER JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 using (sig2) ORDER BY s1.sig1,s1.sig2; + sig2 | time | device_id | sig1 | sig3 | sig4 | sig5 | time | device_id | sig1 | sig3 | sig4 | sig5 +----------------------------------------+-------------------------------+-----------+-------+----------------+------+------+------+-----------+------+------+------+------ + AHWEMAKDF | 2019-05-02 16:12:41.098+00 | dev2 | -8555 | 0.34 | f | f | | | | | | + | 1677-09-21 00:12:43.145224+00 | dev1 | -664 | 0.78 | t | f | | | | | | + 2e2eawekfrjq2o | 2019-05-02 16:12:41.098+00 | dev1 | 11 | -0.79769313486 | t | t | | | | | | + P_AEF-wefA | 2019-05-02 16:12:41.098+00 | dev3 | 319 | 0.32 | f | t | | | | | | + x'a8a9aaabacadaeaf' | 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 2222 | -1 | f | f | | | | | | + 散りぬるを我が世誰 | 2262-04-11 23:47:16.854776+00 | 'dev3' | 34422 | 0.32 | f | t | | | | | | + abcdefghijklmnopqrstuvwxyz | 2016-06-13 17:43:50.1004+00 | dev2 | 35655 | 0.25 | f | t | | | | | | + `~!@#$%^&*()_+= | 2016-06-13 17:43:50.1004+00 | dev3 | 65535 | -0.91 | f | t | | | | | | + いろはにほへど ちりぬるをわがよたれぞ | 2019-05-02 16:12:41.098+00 | "dev 1" | 70220 | 0.37 | t | f | | | | | | +(9 rows) + +--Testcase 62: +SELECT s1.device_id,s1.sig1,s1.sig2,s1.sig3,s1.sig4,s1.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 NATURAL JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2; +ERROR: JOIN/USING types boolean and text cannot be matched +--Testcase 63: +SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fields->>'sig2' sig2,(s1.fields->>'sig3')::float8 sig3,(s1.fields->>'sig4')::boolean sig4,(s1.fields->>'sig5')::boolean sig5 FROM sctbl1 s1 JOIN sctbl2 s2 on true; + device_id | sig1 | sig2 | sig3 | sig4 | sig5 +-----------+-------+----------------------------------------+----------------+------+------ + dev1 | -664 | | 0.78 | t | f + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t + dev2 | -8555 | AHWEMAKDF | 0.34 | f | f + dev3 | 319 | P_AEF-wefA | 0.32 | f | t + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t + dev1 | -664 | | 0.78 | t | f + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t + dev2 | -8555 | AHWEMAKDF | 0.34 | f | f + dev3 | 319 | P_AEF-wefA | 0.32 | f | t + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t + dev1 | -664 | | 0.78 | t | f + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t + dev2 | -8555 | AHWEMAKDF | 0.34 | f | f + dev3 | 319 | P_AEF-wefA | 0.32 | f | t + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t + dev1 | -664 | | 0.78 | t | f + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t + dev2 | -8555 | AHWEMAKDF | 0.34 | f | f + dev3 | 319 | P_AEF-wefA | 0.32 | f | t + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t + dev1 | -664 | | 0.78 | t | f + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t + dev2 | -8555 | AHWEMAKDF | 0.34 | f | f + dev3 | 319 | P_AEF-wefA | 0.32 | f | t + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t + dev1 | -664 | | 0.78 | t | f + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t + dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t + "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f + dev1 | 11 | 2e2eawekfrjq2o | -0.79769313486 | t | t + dev2 | -8555 | AHWEMAKDF | 0.34 | f | f + dev3 | 319 | P_AEF-wefA | 0.32 | f | t + 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t +(54 rows) + +-------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ +--Update data +:RECOVER_INIT_FIELDS_ADD_20; +--Testcase 64: +DROP FOREIGN TABLE sctbl1; +--Testcase 65: +CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); +--Testcase 66: +SELECT * FROM sctbl1; + time | tags | fields +-------------------------------+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1677-09-21 00:12:43.145224+00 | {"device_id": "dev1"} | {"sig1": "-664", "sig2": null, "sig3": "0.78", "sig4": "true", "sig5": "false", "sig6": "22", "sig7": "-123445600", "sig8": "4.026", "sig9": "0.24", "sig10": "33", "sig11": ")#O3-kaej", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "false", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "d ,=ev2"} | {"sig1": "2222", "sig2": "x'a8a9aaabacadaeaf'", "sig3": "-1", "sig4": "false", "sig5": "false", "sig6": "33666", "sig7": "-12344560", "sig8": "2.024", "sig9": "-0.22", "sig10": "26", "sig11": "Os", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "false", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0.1"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false", "sig5": "true", "sig6": "33", "sig7": "323445600", "sig8": "5.027", "sig9": "0.425", "sig10": "44", "sig11": "3ae\\aefw\\naf", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false", "sig5": "true", "sig6": "311", "sig7": "-123445600", "sig8": "6.028", "sig9": "0.26", "sig10": "55", "sig11": "wwefs", "sig12": null, "sig13": "false", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": null, "sig19": null, "sig20": "OFF", "sig21": "false", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0.5"} + 2019-05-02 16:12:41.098+00 | {"device_id": "\"dev 1\""} | {"sig1": "70220", "sig2": "いろはにほへど ちりぬるをわがよたれぞ", "sig3": "0.37", "sig4": "true", "sig5": "false", "sig6": "43", "sig7": "223445600", "sig8": "7.029", "sig9": "-0.27", "sig10": "66", "sig11": "3333", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.797693134862", "sig4": "true", "sig5": "true", "sig6": "11", "sig7": "-1.234456e+78", "sig8": "1.023", "sig9": "-0.421", "sig10": "226", "sig11": "ws", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev2"} | {"sig1": "-8555", "sig2": "AHWEMAKDF", "sig3": "0.34", "sig4": "false", "sig5": "false", "sig6": "5", "sig7": "-123445600", "sig8": "8.03", "sig9": "-0.9", "sig10": "77", "sig11": "333u", "sig12": "this is a string", "sig13": "false", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "false", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0.7"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev3"} | {"sig1": "319", "sig2": "P_AEF-wefA", "sig3": "0.32", "sig4": "false", "sig5": "true", "sig6": "111545", "sig7": "-223445600", "sig8": "9.031", "sig9": "-0.9", "sig10": "8228", "sig11": "1122e", "sig12": null, "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} + 2262-04-11 23:47:16.854776+00 | {"device_id": "'dev3'"} | {"sig1": "34422", "sig2": "散りぬるを我が世誰", "sig3": "0.32", "sig4": "false", "sig5": "true", "sig6": "232", "sig7": "123445600", "sig8": "3.025", "sig9": "-0.423", "sig10": "22", "sig11": "Zep", "sig12": null, "sig13": "false", "sig14": null, "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": null, "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0.2"} +(9 rows) + +--Testcase 67: +SELECT avg(null::numeric) FROM sctbl1; + avg +----- + +(1 row) + +--Testcase 68: +SELECT sqrt(null::float8) FROM sctbl1; + sqrt +------ + + + + + + + + + +(9 rows) + +--Testcase 69: +SELECT sum('NaN'::numeric) FROM sctbl1; + sum +----- + NaN +(1 row) + +--Select fields,tags +--Testcase 70: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig6')::bigint sig6 FROM sctbl1 WHERE NOT (fields->>'sig6')::bigint < (fields->>'sig1')::bigint ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; + device_id | sig1 | sig3 | sig6 +-----------+-------+-----------------+-------- + dev3 | 319 | 0.32 | 111545 + d ,=ev2 | 2222 | -1 | 33666 + dev2 | -8555 | 0.34 | 5 + dev1 | -664 | 0.78 | 22 + dev1 | 11 | -0.797693134862 | 11 +(5 rows) + +--Testcase 71: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig7')::float8 sig7 FROM sctbl1 WHERE (fields->>'sig7')::float8 < 0 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; + device_id | sig1 | sig3 | sig7 +-----------+-------+-----------------+--------------- + dev3 | 319 | 0.32 | -223445600 + dev3 | 65535 | -0.91 | -123445600 + d ,=ev2 | 2222 | -1 | -12344560 + dev2 | -8555 | 0.34 | -123445600 + dev1 | -664 | 0.78 | -123445600 + dev1 | 11 | -0.797693134862 | -1.234456e+78 +(6 rows) + +--Testcase 72: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig8')::float8 sig8 FROM sctbl1 WHERE NOT time >'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 2; + device_id | sig1 | sig3 | sig8 +-----------+-------+-----------------+------- + d ,=ev2 | 2222 | -1 | 2.024 + dev2 | -8555 | 0.34 | 8.03 + dev2 | 35655 | 0.25 | 5.027 + "dev 1" | 70220 | 0.37 | 7.029 + dev1 | -664 | 0.78 | 4.026 + dev1 | 11 | -0.797693134862 | 1.023 +(6 rows) + +--Testcase 73: +SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6,(fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::int sig10,fields->>'sig11' sig11,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,fields->>'sig18' sig18,fields->>'sig19' sig19,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; + time | device_id | sig1 | sig2 | sig3 | sig4 | sig5 | sig6 | sig7 | sig8 | sig9 | sig10 | sig11 | sig12 | sig13 | sig14 | sig15 | sig16 | sig17 | sig18 | sig19 | sig20 | sig21 | sig22 | sig23 | sig24 | sig25 +-------------------------------+-----------+-------+----------------------------------------+-----------------+------+------+--------+---------------+-------+--------+-------+--------------+------------------+-------+----------------+---------------------+----------------------+---------------------+-------+-------+-------+-------+-------+-------+-------+------- + 2262-04-11 23:47:16.854776+00 | 'dev3' | 34422 | 散りぬるを我が世誰 | 0.32 | f | t | 232 | 123445600 | 3.025 | -0.423 | 22 | Zep | | f | | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | | t | wef | 1112 | 122 | 0.2 + 2019-05-02 16:12:41.098+00 | dev1 | 11 | 2e2eawekfrjq2o | -0.797693134862 | t | t | 11 | -1.234456e+78 | 1.023 | -0.421 | 226 | ws | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 + 2019-05-02 16:12:41.098+00 | "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | f | 43 | 223445600 | 7.029 | -0.27 | 66 | 3333 | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 + 2019-05-02 16:12:41.098+00 | dev2 | -8555 | AHWEMAKDF | 0.34 | f | f | 5 | -123445600 | 8.03 | -0.9 | 77 | 333u | this is a string | f | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0.7 + 2019-05-02 16:12:41.098+00 | dev3 | 319 | P_AEF-wefA | 0.32 | f | t | 111545 | -223445600 | 9.031 | -0.9 | 8228 | 1122e | | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 + 2016-06-13 17:43:50.1004+00 | dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | t | 33 | 323445600 | 5.027 | 0.425 | 44 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 + 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | -1 | f | f | 33666 | -12344560 | 2.024 | -0.22 | 26 | Os | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0.1 + 2016-06-13 17:43:50.1004+00 | dev3 | 65535 | `~!@#$%^&*()_+= | -0.91 | f | t | 311 | -123445600 | 6.028 | 0.26 | 55 | wwefs | | f | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | | | OFF | f | wef | 1112 | 122 | 0.5 + 1677-09-21 00:12:43.145224+00 | dev1 | -664 | | 0.78 | t | f | 22 | -123445600 | 4.026 | 0.24 | 33 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0 +(9 rows) + +--Testcase 74: +SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6,(fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::int sig10,fields->>'sig11' sig11,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,fields->>'sig18' sig18,fields->>'sig19' sig19,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; + time | device_id | sig1 | sig2 | sig3 | sig4 | sig5 | sig6 | sig7 | sig8 | sig9 | sig10 | sig11 | sig12 | sig13 | sig14 | sig15 | sig16 | sig17 | sig18 | sig19 | sig20 | sig21 | sig22 | sig23 | sig24 | sig25 +------+-----------+------+------+------+------+------+------+------+------+------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------- +(0 rows) + +--Testcase 75: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig9')::float8 sig9, (fields->>'sig10')::int sig10,fields->>'sig11' sig11 FROM sctbl1 WHERE (fields->>'sig8')::float8 BETWEEN 0.0 AND 10.0 ORDER BY (fields->>'sig1')::bigint DESC LIMIT 15 OFFSET 2; + sig1 | sig9 | sig10 | sig11 +-------+--------+-------+-------------- + 35655 | 0.425 | 44 | 3ae\aefw\naf + 34422 | -0.423 | 22 | Zep + 2222 | -0.22 | 26 | Os + 319 | -0.9 | 8228 | 1122e + 11 | -0.421 | 226 | ws + -664 | 0.24 | 33 | )#O3-kaej + -8555 | -0.9 | 77 | 333u +(7 rows) + +--Testcase 76: +SELECT * FROM sctbl1 WHERE fields->>'sig11' LIKE 'w%' ORDER BY fields->>'sig11' DESC LIMIT 15 OFFSET 0; + time | tags | fields +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev3"} | {"sig1": "65535", "sig2": "`~!@#$%^&*()_+=", "sig3": "-0.91", "sig4": "false", "sig5": "true", "sig6": "311", "sig7": "-123445600", "sig8": "6.028", "sig9": "0.26", "sig10": "55", "sig11": "wwefs", "sig12": null, "sig13": "false", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": null, "sig19": null, "sig20": "OFF", "sig21": "false", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0.5"} + 2019-05-02 16:12:41.098+00 | {"device_id": "dev1"} | {"sig1": "11", "sig2": "2e2eawekfrjq2o", "sig3": "-0.797693134862", "sig4": "true", "sig5": "true", "sig6": "11", "sig7": "-1.234456e+78", "sig8": "1.023", "sig9": "-0.421", "sig10": "226", "sig11": "ws", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} + 2016-06-13 17:43:50.1004+00 | {"device_id": "dev2"} | {"sig1": "35655", "sig2": "abcdefghijklmnopqrstuvwxyz", "sig3": "0.25", "sig4": "false", "sig5": "true", "sig6": "33", "sig7": "323445600", "sig8": "5.027", "sig9": "0.425", "sig10": "44", "sig11": "3ae\\aefw\\naf", "sig12": "this is a string", "sig13": "true", "sig14": "example string", "sig15": "9223372036854775807", "sig16": "-9223372036854775808", "sig17": "9223372036854775807", "sig18": "west", "sig19": "east", "sig20": "OFF", "sig21": "true", "sig22": "wef", "sig23": "1112", "sig24": "122", "sig25": "0"} +(3 rows) + +--Testcase 77: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13 FROM sctbl1 WHERE NOT EXISTS (SELECT fields->>'sig12' FROM sctbl1 WHERE fields->>'sig11'='33') ORDER BY tags->>'device_id' DESC,(fields->>'sig1')::bigint ASC LIMIT 15 OFFSET 0; + device_id | sig1 | sig2 | sig12 | sig13 +-----------+-------+----------------------------------------+------------------+------- + 'dev3' | 34422 | 散りぬるを我が世誰 | | f + dev3 | 319 | P_AEF-wefA | | t + dev3 | 65535 | `~!@#$%^&*()_+= | | f + d ,=ev2 | 2222 | x'a8a9aaabacadaeaf' | this is a string | t + dev2 | -8555 | AHWEMAKDF | this is a string | f + dev2 | 35655 | abcdefghijklmnopqrstuvwxyz | this is a string | t + "dev 1" | 70220 | いろはにほへど ちりぬるをわがよたれぞ | this is a string | t + dev1 | -664 | | this is a string | t + dev1 | 11 | 2e2eawekfrjq2o | this is a string | t +(9 rows) + +--Testcase 78: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15 FROM sctbl1 WHERE (fields->>'sig9')::float8 < ALL (SELECT (fields->>'sig8')::float8 FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0 AND fields->>'sig8' IS NOT NULL) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; + sig1 | sig2 | sig3 | sig14 | sig15 +-------+----------------------------------------+-----------------+----------------+--------------------- + 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | example string | 9223372036854775807 + 65535 | `~!@#$%^&*()_+= | -0.91 | example string | 9223372036854775807 + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | example string | 9223372036854775807 + 34422 | 散りぬるを我が世誰 | 0.32 | | 9223372036854775807 + 2222 | x'a8a9aaabacadaeaf' | -1 | example string | 9223372036854775807 + 319 | P_AEF-wefA | 0.32 | example string | 9223372036854775807 + 11 | 2e2eawekfrjq2o | -0.797693134862 | example string | 9223372036854775807 + -664 | | 0.78 | example string | 9223372036854775807 + -8555 | AHWEMAKDF | 0.34 | example string | 9223372036854775807 +(9 rows) + +--Testcase 79: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig16')::bigint sig16 FROM sctbl1 WHERE (fields->>'sig9')::float8 = ANY (ARRAY[-0.22,0.425,-0.9]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig16 +-------+----------------------------+------+------+---------------------- + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | -9223372036854775808 + 2222 | x'a8a9aaabacadaeaf' | -1 | f | -9223372036854775808 + 319 | P_AEF-wefA | 0.32 | f | -9223372036854775808 + -8555 | AHWEMAKDF | 0.34 | f | -9223372036854775808 +(4 rows) + +--Testcase 80: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig17')::bigint sig17 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig10' FROM sctbl1 WHERE (fields->>'sig10')::bigint!=77) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig17 +-------+----------------------------------------+-----------------+------+--------------------- + 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | t | 9223372036854775807 + 65535 | `~!@#$%^&*()_+= | -0.91 | f | 9223372036854775807 + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | 9223372036854775807 + 34422 | 散りぬるを我が世誰 | 0.32 | f | 9223372036854775807 + 2222 | x'a8a9aaabacadaeaf' | -1 | f | 9223372036854775807 + 319 | P_AEF-wefA | 0.32 | f | 9223372036854775807 + 11 | 2e2eawekfrjq2o | -0.797693134862 | t | 9223372036854775807 + -664 | | 0.78 | t | 9223372036854775807 + -8555 | AHWEMAKDF | 0.34 | f | 9223372036854775807 +(9 rows) + +--Testcase 81: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,fields->>'sig18' sig18 FROM sctbl1 WHERE fields->>'sig6'=ANY (ARRAY(SELECT fields->>'sig10' FROM sctbl1 WHERE (fields->>'sig10')::bigint%2 !=0)) ORDER BY 1 DESC LIMIT 15 OFFSET 0; + sig1 | sig2 | sig3 | sig4 | sig18 +-------+----------------------------+------+------+------- + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | f | west +(1 row) + +--Testcase 82: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,fields->>'sig19' sig19,fields->>'sig20' sig20 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig11' FROM sctbl1 WHERE (fields->>'sig13')::boolean=true) ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; + sig1 | sig2 | sig3 | sig19 | sig20 +-------+----------------------------------------+-------+-------+------- + 70220 | いろはにほへど ちりぬるをわがよたれぞ | 0.37 | east | OFF + 65535 | `~!@#$%^&*()_+= | -0.91 | | OFF + 35655 | abcdefghijklmnopqrstuvwxyz | 0.25 | east | OFF + 34422 | 散りぬるを我が世誰 | 0.32 | east | + 2222 | x'a8a9aaabacadaeaf' | -1 | east | OFF +(5 rows) + +--Testcase 83: +SELECT (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig15')::bigint+(fields->>'sig16')::bigint as ss,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21 FROM sctbl1 WHERE fields->>'sig12' IS NULL ORDER BY (fields->>'sig1')::bigint DESC,fields->>'sig12' ASC LIMIT 15 OFFSET 0; + sig15 | sig16 | ss | sig20 | sig21 +---------------------+----------------------+----+-------+------- + 9223372036854775807 | -9223372036854775808 | -1 | OFF | f + 9223372036854775807 | -9223372036854775808 | -1 | | t + 9223372036854775807 | -9223372036854775808 | -1 | OFF | t +(3 rows) + +--Testcase 84: +SELECT (fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,(fields->>'sig16')::bigint/(fields->>'sig17')::bigint as dd,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23 FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL ORDER BY fields->>'sig12' DESC,(fields->>'sig1')::int ASC LIMIT 15 OFFSET 0; + sig16 | sig17 | dd | sig22 | sig23 +----------------------+---------------------+----+-------+------- + -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 + -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 + -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 + -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 + -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 + -9223372036854775808 | 9223372036854775807 | -1 | wef | 1112 +(6 rows) + +--Testcase 85: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig17')::bigint sig17,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25,(fields->>'sig17')::bigint*(fields->>'sig25')::float8 as mm FROM sctbl1 WHERE NOT (fields->>'sig10')::bigint=15 ORDER BY fields->>'sig20' DESC LIMIT 15 OFFSET 0; + sig1 | sig17 | sig24 | sig25 | mm +-------+---------------------+-------+-------+------------------------ + 34422 | 9223372036854775807 | 122 | 0.2 | 1.8446744073709553e+18 + 2222 | 9223372036854775807 | 122 | 0.1 | 9.223372036854776e+17 + 65535 | 9223372036854775807 | 122 | 0.5 | 4.611686018427388e+18 + 35655 | 9223372036854775807 | 122 | 0 | 0 + -664 | 9223372036854775807 | 122 | 0 | 0 + 319 | 9223372036854775807 | 122 | 0 | 0 + -8555 | 9223372036854775807 | 122 | 0.7 | 6.456360425798343e+18 + 11 | 9223372036854775807 | 122 | 0 | 0 + 70220 | 9223372036854775807 | 122 | 0 | 0 +(9 rows) + +--Testcase 86: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig10')::bigint != 0 AND (fields->>'sig7')::float8=-1.234456e+78 ORDER BY 1 DESC,2 ASC LIMIT 15 OFFSET 0; +ERROR: influxdb_fdw : error parsing query: found e, expected ) at line 1, char 158 +--Testcase 87: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 > -1.0 OR fields->>'sig12' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; + sig21 | sig22 | sig23 | sig24 | sig25 +-------+-------+-------+-------+------- + t | wef | 1112 | 122 | 0 + t | wef | 1112 | 122 | 0 + t | wef | 1112 | 122 | 0 + t | wef | 1112 | 122 | 0.2 + f | wef | 1112 | 122 | 0 + f | wef | 1112 | 122 | 0.1 + f | wef | 1112 | 122 | 0.7 +(7 rows) + +--Testcase 88: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 < 0 AND fields->>'sig12' > 'Mee' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; + sig21 | sig22 | sig23 | sig24 | sig25 +-------+-------+-------+-------+------- + t | wef | 1112 | 122 | 0 + f | wef | 1112 | 122 | 0 + f | wef | 1112 | 122 | 0.1 + f | wef | 1112 | 122 | 0.7 +(4 rows) + +--Testcase 89: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 IN (1.234456e+8,-1.234456e+8) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; + sig21 | sig22 | sig23 | sig24 | sig25 +-------+-------+-------+-------+------- + t | wef | 1112 | 122 | 0.2 + f | wef | 1112 | 122 | 0 + f | wef | 1112 | 122 | 0.5 + f | wef | 1112 | 122 | 0.7 +(4 rows) + +--Testcase 90: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE fields->>'sig12' LIKE 't%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; + sig21 | sig22 | sig23 | sig24 | sig25 +-------+-------+-------+-------+------- + t | wef | 1112 | 122 | 0 + t | wef | 1112 | 122 | 0 + t | wef | 1112 | 122 | 0 + f | wef | 1112 | 122 | 0 + f | wef | 1112 | 122 | 0.1 + f | wef | 1112 | 122 | 0.7 +(6 rows) + +--Testcase 91: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE NOT EXISTS (SELECT fields->>'sig22' FROM sctbl1 WHERE fields->>'sig12'='AHWEMAKDF') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 1; + sig21 | sig22 | sig23 | sig24 | sig25 +-------+-------+-------+-------+------- + t | wef | 1112 | 122 | 0 + t | wef | 1112 | 122 | 0 + t | wef | 1112 | 122 | 0 + t | wef | 1112 | 122 | 0.2 + f | wef | 1112 | 122 | 0 + f | wef | 1112 | 122 | 0.1 + f | wef | 1112 | 122 | 0.5 + f | wef | 1112 | 122 | 0.7 +(8 rows) + +--Testcase 92: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig8')::float8 NOT IN (0, 1000, -1, -2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 2; + sig21 | sig22 | sig23 | sig24 | sig25 +-------+-------+-------+-------+------- + t | wef | 1112 | 122 | 0 + t | wef | 1112 | 122 | 0 + t | wef | 1112 | 122 | 0.2 + f | wef | 1112 | 122 | 0 + f | wef | 1112 | 122 | 0.1 +(5 rows) + +--Testcase 93: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE fields->>'sig6'=ANY (ARRAY(SELECT fields->>'sig6' FROM sctbl1 WHERE (fields->>'sig10')::bigint%2!=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; + sig21 | sig22 | sig23 | sig24 | sig25 +-------+-------+-------+-------+------- + f | wef | 1112 | 122 | 0 + f | wef | 1112 | 122 | 0.5 + f | wef | 1112 | 122 | 0.7 +(3 rows) + +--Testcase 94: +SELECT time, (fields->>'sig10')::bigint sig10,fields->>'sig12' sig12 FROM sctbl1 WHERE (fields->>'sig10')::bigint <= 1000 AND (fields->>'sig15')::float8 <> -5 AND (fields->>'sig10')::bigint <> 100 ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 1; + time | sig10 | sig12 +-----------------------------+-------+------------------ + 2016-06-13 17:43:50.1004+00 | 55 | + 2016-06-13 17:43:50.1004+00 | 44 | this is a string + 2016-06-13 17:43:50.1004+00 | 26 | this is a string + 2019-05-02 16:12:41.098+00 | 226 | this is a string + 2019-05-02 16:12:41.098+00 | 77 | this is a string +(5 rows) + +--Select aggregate functions +--Testcase 95: +SELECT max(time), max((fields->>'sig15')::bigint*0.5), max((fields->>'sig17')::bigint - 10) FROM sctbl1 WHERE (fields->>'sig8')::float8 NOT IN (0.0, 1000, -1.0, -2.0) GROUP BY fields->>'sig15', fields->>'sig17' HAVING min((fields->>'sig8')::float8) < min((fields->>'sig17')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; + max | max | max +-------------------------------+-----------------------+--------------------- + 2262-04-11 23:47:16.854776+00 | 4611686018427387903.5 | 9223372036854775797 +(1 row) + +--Testcase 96: +SELECT tags->>'device_id' device_id,abs((fields->>'sig16')::bigint), ceil((fields->>'sig8')::float8), (fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE (fields->>'sig15')::bigint > 0 AND (fields->>'sig13')::boolean = true; +ERROR: bigint out of range +--Testcase 97: +SELECT count(tags->>'device_id'),sum((fields->>'sig10')::bigint),sum((fields->>'sig7')::float8+(fields->>'sig10')::bigint),stddev((fields->>'sig8')::float8 order by (fields->>'sig8')::float8) from sctbl1 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; + count | sum | sum | stddev +-------+------+---------------+------------------- + 9 | 8777 | -1.234456e+78 | 2.741351400313357 +(1 row) + +--Testcase 98: +SELECT mode(fields->>'sig12') WITHIN GROUP (order by fields->>'sig12') from sctbl1; +ERROR: function mode(text, text) does not exist +LINE 1: SELECT mode(fields->>'sig12') WITHIN GROUP (order by fields-... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +--Testcase 99: +SELECT (fields->>'sig10')::int sig10,spread((fields->>'sig10')::bigint) FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig6' FROM sctbl1 WHERE (fields->>'sig13')::boolean in (true,false)) GROUP BY tags->>'device_id', fields->>'sig10',fields->>'sig21' HAVING (fields->>'sig21')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 1; +ERROR: ORDER BY position 3 is not in select list +LINE 1: ...s->>'sig21')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 15... + ^ +--Testcase 100: +SELECT (fields->>'sig9')::float8 sig9, acos((fields->>'sig9')::float8), atan((fields->>'sig9')::float8) FROM sctbl1 WHERE fields->>'sig12' IS NULL GROUP BY fields->>'sig9' HAVING min((fields->>'sig10')::bigint) < min((fields->>'sig6')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; + sig9 | acos | atan +--------+--------------------+--------------------- + 0.26 | 1.3077741238864278 | 0.25436805855326594 + -0.423 | 2.007549882744198 | -0.4001754105655318 + -0.9 | 2.6905658417935308 | -0.7328151017865066 +(3 rows) + +--Testcase 101: +SELECT (fields->>'sig9')::float8 sig9, log((fields->>'sig9')::float8),cos((fields->>'sig9')::float8) FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL AND (fields->>'sig9')::float8 > 0 GROUP BY fields->>'sig9' HAVING min((fields->>'sig9')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND sum((fields->>'sig3')::float8) > -1000 AND avg((fields->>'sig3')::float8) > -1000 ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; + sig9 | log | cos +------+--------------------+-------------------- + 0.24 | -0.619788758288394 | 0.9713379748520297 +(1 row) + +--Testcase 102: +SELECT (fields->>'sig10')::bigint sig10,(fields->>'sig8')::float8 sig8,ln((fields->>'sig10')::bigint), log10((fields->>'sig8')::float8) FROM sctbl1 WHERE NOT (fields->>'sig10')::bigint=5 GROUP BY fields->>'sig10', fields->>'sig8' HAVING min((fields->>'sig7')::float8) < 100 AND max((fields->>'sig6')::bigint) < 1000 AND (fields->>'sig10')::bigint > 0 AND (fields->>'sig8')::float8 > 0 ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; + sig10 | sig8 | ln | log10 +-------+-------+--------------------+---------------------- + 226 | 1.023 | 5.420534999272286 | 0.009875633712160119 + 77 | 8.03 | 4.343805421853684 | 0.9047155452786809 + 55 | 6.028 | 4.007333185232471 | 0.7801732436425941 + 33 | 4.026 | 3.4965075614664802 | 0.6048737705526357 +(4 rows) + +--Testcase 103: +SELECT max(time), max((fields->>'sig6')::bigint + (fields->>'sig7')::float8), min((fields->>'sig6')::bigint + (fields->>'sig7')::float8) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig8')::float8 > -1000 AND (fields->>'sig13')::boolean != true ) AS tb1 WHERE (fields->>'sig7')::float8 != -1 AND (fields->>'sig21')::boolean != true GROUP BY fields->>'sig6' ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; + max | max | min +-----------------------------+------------+------------ + 2019-05-02 16:12:41.098+00 | -123445595 | -123445595 + 2016-06-13 17:43:50.1004+00 | -123445289 | -123445289 +(2 rows) + +--Testcase 104: +SELECT avg((fields->>'sig23')::bigint order by (fields->>'sig23')::bigint),avg((fields->>'sig24')::bigint * 0.5) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig8')::float8 > -1000 AND (fields->>'sig21')::boolean = true ) AS tb1 WHERE (fields->>'sig9')::float8 < 0 GROUP BY (fields->>'sig23')::bigint, fields->>'sig24' HAVING sum((fields->>'sig8')::float8) > avg((fields->>'sig9')::float8) ORDER BY 1 DESC, 2 LIMIT 15 OFFSET 0; + avg | avg +-----------------------+--------------------- + 1112.0000000000000000 | 61.0000000000000000 +(1 row) + +--Testcase 105: +SELECT (fields->>'sig8')::float8 sig8,exp((fields->>'sig8')::float8),exp((fields->>'sig8')::float8*2) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig9')::float8 > -1000 AND (fields->>'sig21')::boolean = true ) AS tb1 WHERE true GROUP BY fields->>'sig8' ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; + sig8 | exp | exp +-------+--------------------+-------------------- + 9.031 | 8358.213608069884 | 69859734.71812458 + 7.029 | 1128.9011444031978 | 1274417.7938348497 + 5.027 | 152.4749011684023 | 23248.595486314054 + 3.025 | 20.59400471119603 | 424.1130300447642 + 1.023 | 2.78152684012137 | 7.736891562315574 +(5 rows) + +--Testcase 106: +SELECT min(time)+'10 days'::interval, min((fields->>'sig10')::bigint + (fields->>'sig25')::float8) FROM sctbl1 WHERE NOT time>'2020-01-03 20:30:50' GROUP BY fields->>'sig10', fields->>'sig25' HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; + ?column? | min +-------------------------------+------ + 1677-10-01 00:12:43.145224+00 | 33 + 2016-06-23 17:43:50.1004+00 | 55.5 + 2016-06-23 17:43:50.1004+00 | 44 + 2016-06-23 17:43:50.1004+00 | 26.1 + 2019-05-12 16:12:41.098+00 | 8228 + 2019-05-12 16:12:41.098+00 | 226 + 2019-05-12 16:12:41.098+00 | 77.7 + 2019-05-12 16:12:41.098+00 | 66 +(8 rows) + +--Testcase 107: +SELECT floor((fields->>'sig23')::bigint*(fields->>'sig25')::float8), floor((fields->>'sig24')::bigint/(fields->>'sig25')::float8) FROM sctbl1 WHERE ((fields->>'sig25')::float8 - 1)/3 != 1 GROUP BY (fields->>'sig23')::bigint, (fields->>'sig24')::bigint,(fields->>'sig25')::float8 HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; +ERROR: division by zero +--Testcase 108: +SELECT time, tags->>'device_id' device_id, pow((fields->>'sig25')::float8,2) FROM sctbl1 WHERE ((fields->>'sig25')::float8 - 1)/3 != 1 GROUP BY time,tags->>'device_id',fields->>'sig25' ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; + time | device_id | pow +-------------------------------+-----------+---------------------- + 1677-09-21 00:12:43.145224+00 | dev1 | 0 + 2016-06-13 17:43:50.1004+00 | dev3 | 0.25 + 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 0.010000000000000002 + 2016-06-13 17:43:50.1004+00 | dev2 | 0 + 2019-05-02 16:12:41.098+00 | dev3 | 0 + 2019-05-02 16:12:41.098+00 | dev2 | 0.48999999999999994 + 2019-05-02 16:12:41.098+00 | "dev 1" | 0 + 2019-05-02 16:12:41.098+00 | dev1 | 0 + 2262-04-11 23:47:16.854776+00 | 'dev3' | 0.04000000000000001 +(9 rows) + +--Testcase 109: +SELECT min(time)+'10 days'::interval, min((fields->>'sig23')::bigint) FROM sctbl1 WHERE false GROUP BY (fields->>'sig23')::bigint HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; + ?column? | min +----------+----- +(0 rows) + +--Testcase 110: +SELECT min(time)+'10 days'::interval, min((fields->>'sig23')::bigint) FROM sctbl1 WHERE (fields->>'sig23')::bigint IN (1112,1000,0) GROUP BY (fields->>'sig23')::bigint HAVING min((fields->>'sig23')::bigint) > min((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; + ?column? | min +-------------------------------+------ + 1677-10-01 00:12:43.145224+00 | 1112 +(1 row) + +--Testcase 111: +SELECT max((fields->>'sig23')::bigint), count(*), exists(SELECT * FROM sctbl1 WHERE (fields->>'sig24')::bigint > 1), exists (SELECT count(*) FROM sctbl1 WHERE (fields->>'sig21')::boolean in ('T','F')) FROM sctbl1 WHERE (fields->>'sig13')::boolean =true GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 15 OFFSET 0; + max | count | exists | exists +------+-------+--------+-------- + 1112 | 3 | t | t + 1112 | 2 | t | t + 1112 | 1 | t | t +(3 rows) + +--Testcase 112: +SELECT (fields->>'sig9')::float8 sig9, abs(avg((fields->>'sig16')::bigint)),string_agg(fields->>'sig22',',' order by fields->>'sig22'),round(sin((fields->>'sig9')::float8)*2.3),sqrt(pow((fields->>'sig25')::float8,2)) FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL AND (fields->>'sig9')::float8 > 0 GROUP BY (fields->>'sig9')::float8,(fields->>'sig25')::float8; + sig9 | abs | string_agg | round | sqrt +-------+---------------------+------------+-------+------ + 0.24 | 9223372036854775808 | wef | 1 | 0 + 0.425 | 9223372036854775808 | wef | 1 | 0 +(2 rows) + +--Join table +--Testcase 113: +SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig21')::boolean sig21,s1.fields->>'sig22' sig22,(s1.fields->>'sig23')::bigint sig23,(s1.fields->>'sig24')::int sig24,(s1.fields->>'sig25')::float8 sig25 FROM sctbl1 s1 FULL JOIN sctbl2 s2 ON s1.tags->>'device_id'=s2.tags->>'device_id' ORDER BY device_id,sig21,sig22,sig23,sig24,sig25; + device_id | sig21 | sig22 | sig23 | sig24 | sig25 +-----------+-------+-------+-------+-------+------- + dev1 | f | wef | 1112 | 122 | 0 + dev1 | f | wef | 1112 | 122 | 0 + dev1 | t | wef | 1112 | 122 | 0 + dev1 | t | wef | 1112 | 122 | 0 + "dev 1" | t | wef | 1112 | 122 | 0 + dev2 | f | wef | 1112 | 122 | 0.7 + dev2 | f | wef | 1112 | 122 | 0.7 + dev2 | t | wef | 1112 | 122 | 0 + dev2 | t | wef | 1112 | 122 | 0 + d ,=ev2 | f | wef | 1112 | 122 | 0.1 + dev3 | f | wef | 1112 | 122 | 0.5 + dev3 | f | wef | 1112 | 122 | 0.5 + dev3 | t | wef | 1112 | 122 | 0 + dev3 | t | wef | 1112 | 122 | 0 + 'dev3' | t | wef | 1112 | 122 | 0.2 +(15 rows) + +--Testcase 114: +SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig21')::boolean sig21,s1.fields->>'sig22' sig22,(s1.fields->>'sig23')::bigint sig23,(s2.fields->>'sig4')::boolean sig4,s2.fields->>'sig5' sig5 FROM sctbl1 s1 LEFT JOIN sctbl2 s2 ON (s1.fields->>'sig21')::boolean=(s2.fields->>'sig4')::boolean; + device_id | sig21 | sig22 | sig23 | sig4 | sig5 +-----------+-------+-------+-------+------+--------------------------------------------------------------- + dev2 | f | wef | 1112 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + dev3 | f | wef | 1112 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + d ,=ev2 | f | wef | 1112 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + dev1 | f | wef | 1112 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + 'dev3' | t | wef | 1112 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] + dev3 | t | wef | 1112 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] + dev1 | t | wef | 1112 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] + "dev 1" | t | wef | 1112 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] + dev2 | t | wef | 1112 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] + dev2 | f | wef | 1112 | f | [(-122.2364,37.436),(-122.2364,37.443)] + dev3 | f | wef | 1112 | f | [(-122.2364,37.436),(-122.2364,37.443)] + d ,=ev2 | f | wef | 1112 | f | [(-122.2364,37.436),(-122.2364,37.443)] + dev1 | f | wef | 1112 | f | [(-122.2364,37.436),(-122.2364,37.443)] + dev2 | f | wef | 1112 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + dev3 | f | wef | 1112 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + d ,=ev2 | f | wef | 1112 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + dev1 | f | wef | 1112 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + 'dev3' | t | wef | 1112 | t | [(-121.9044,37.895),(-121.9044,37.899)] + dev3 | t | wef | 1112 | t | [(-121.9044,37.895),(-121.9044,37.899)] + dev1 | t | wef | 1112 | t | [(-121.9044,37.895),(-121.9044,37.899)] + "dev 1" | t | wef | 1112 | t | [(-121.9044,37.895),(-121.9044,37.899)] + dev2 | t | wef | 1112 | t | [(-121.9044,37.895),(-121.9044,37.899)] + dev2 | f | wef | 1112 | f | [(-121.9026,37.843),(-121.9028,37.843)] + dev3 | f | wef | 1112 | f | [(-121.9026,37.843),(-121.9028,37.843)] + d ,=ev2 | f | wef | 1112 | f | [(-121.9026,37.843),(-121.9028,37.843)] + dev1 | f | wef | 1112 | f | [(-121.9026,37.843),(-121.9028,37.843)] +(26 rows) + +--Testcase 115: +SELECT s1.device_id,s1.sig21,s1.sig22,s1.sig23,s1.sig24,s1.sig25 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 RIGHT JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4, (fields->>'sig5')::boolean sig5 FROM sctbl2) s2 using(sig1) where s2.sig3 != 0; + device_id | sig21 | sig22 | sig23 | sig24 | sig25 +-----------+-------+-------+-------+-------+------- + | | | | | + | | | | | + | | | | | + | | | | | + | | | | | + | | | | | +(6 rows) + +--Testcase 116: +SELECT * FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 FULL OUTER JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 USING(sig2) ORDER BY s1.sig2, s1.time, s1.device_id, s2.time, s2.device_id; + sig2 | time | device_id | sig1 | sig3 | sig4 | sig5 | sig6 | sig7 | sig8 | sig9 | sig10 | sig11 | sig12 | sig13 | sig14 | sig15 | sig16 | sig17 | sig18 | sig19 | sig20 | sig21 | sig22 | sig23 | sig24 | sig25 | time | device_id | sig1 | sig3 | sig4 | sig5 +----------------------------------------+-------------------------------+-----------+-------+-----------------+------+------+--------+---------------+-------+--------+-------+--------------+------------------+-------+----------------+---------------------+----------------------+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------------------------------+-----------+-------+----------------+------+--------------------------------------------------------------- + `~!@#$%^&*()_+= | 2016-06-13 17:43:50.1004+00 | dev3 | 65535 | -0.91 | f | t | 311 | -123445600 | 6.028 | 0.26 | 55 | wwefs | | f | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | | | OFF | f | wef | 1112 | 122 | 0.5 | | | | | | + いろはにほへど ちりぬるをわがよたれぞ | 2019-05-02 16:12:41.098+00 | "dev 1" | 70220 | 0.37 | t | f | 43 | 223445600 | 7.029 | -0.27 | 66 | 3333 | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 | | | | | | + 2e2eawekfrjq2o | 2019-05-02 16:12:41.098+00 | dev1 | 11 | -0.797693134862 | t | t | 11 | -1.234456e+78 | 1.023 | -0.421 | 226 | ws | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 | | | | | | + abcdefghijklmnopqrstuvwxyz | 2016-06-13 17:43:50.1004+00 | dev2 | 35655 | 0.25 | f | t | 33 | 323445600 | 5.027 | 0.425 | 44 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 | | | | | | + AHWEMAKDF | 2019-05-02 16:12:41.098+00 | dev2 | -8555 | 0.34 | f | f | 5 | -123445600 | 8.03 | -0.9 | 77 | 333u | this is a string | f | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0.7 | | | | | | + P_AEF-wefA | 2019-05-02 16:12:41.098+00 | dev3 | 319 | 0.32 | f | t | 111545 | -223445600 | 9.031 | -0.9 | 8228 | 1122e | | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | t | wef | 1112 | 122 | 0 | | | | | | + x'a8a9aaabacadaeaf' | 2016-06-13 17:43:50.1004+00 | d ,=ev2 | 2222 | -1 | f | f | 33666 | -12344560 | 2.024 | -0.22 | 26 | Os | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0.1 | | | | | | + 散りぬるを我が世誰 | 2262-04-11 23:47:16.854776+00 | 'dev3' | 34422 | 0.32 | f | t | 232 | 123445600 | 3.025 | -0.423 | 22 | Zep | | f | | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | | t | wef | 1112 | 122 | 0.2 | | | | | | + | 1677-09-21 00:12:43.145224+00 | dev1 | -664 | 0.78 | t | f | 22 | -123445600 | 4.026 | 0.24 | 33 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 | -9223372036854775808 | 9223372036854775807 | west | east | OFF | f | wef | 1112 | 122 | 0 | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | 1677-09-21 00:12:43.145224+00 | dev3 | -30 | 102.3827810127 | f | [(-122.106469,37.66446),(-122.1067,37.664)] + 敷ヘカウ告政ヨハツヤ | | | | | | | | | | | | | | | | | | | | | | | | | | | 2016-06-13 17:43:50.1004+00 | dev1 | 640 | 20.4222211221 | t | [(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)] + `~!@#$%^&*()_+=-{}[]|:;<>?/. | | | | | | | | | | | | | | | | | | | | | | | | | | | 2019-05-02 16:12:41.098+00 | dev2 | 7950 | 220.2215 | f | [(-122.2364,37.436),(-122.2364,37.443)] + wr3wri | | | | | | | | | | | | | | | | | | | | | | | | | | | 2019-05-02 16:12:41.098+00 | dev3 | 6990 | 5630.9 | f | [(-121.900576,37.74452),(-121.900804,37.74889)] + | | | | | | | | | | | | | | | | | | | | | | | | | | | 2262-04-11 23:47:16.854776+00 | dev1 | 7060 | -3230.17 | t | [(-121.9044,37.895),(-121.9044,37.899)] + EFQEF | | | | | | | | | | | | | | | | | | | | | | | | | | | 2262-04-11 23:47:16.854776+00 | dev2 | -7880 | 2330.8 | f | [(-121.9026,37.843),(-121.9028,37.843)] +(15 rows) + +--Testcase 117: +SELECT s2.device_id,s2.sig1,s2.sig2,s2.sig3,s2.sig4,s2.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 NATURAL JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2; +ERROR: JOIN/USING types boolean and text cannot be matched +--Testcase 118: +SELECT s1.device_id,s1.sig11,s1.sig12,s1.sig13,s1.sig14,s1.sig15 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 on true; + device_id | sig11 | sig12 | sig13 | sig14 | sig15 +-----------+--------------+------------------+-------+----------------+--------------------- + dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 + d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 + dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 + dev3 | wwefs | | f | example string | 9223372036854775807 + "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 + dev1 | ws | this is a string | t | example string | 9223372036854775807 + dev2 | 333u | this is a string | f | example string | 9223372036854775807 + dev3 | 1122e | | t | example string | 9223372036854775807 + 'dev3' | Zep | | f | | 9223372036854775807 + dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 + d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 + dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 + dev3 | wwefs | | f | example string | 9223372036854775807 + "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 + dev1 | ws | this is a string | t | example string | 9223372036854775807 + dev2 | 333u | this is a string | f | example string | 9223372036854775807 + dev3 | 1122e | | t | example string | 9223372036854775807 + 'dev3' | Zep | | f | | 9223372036854775807 + dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 + d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 + dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 + dev3 | wwefs | | f | example string | 9223372036854775807 + "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 + dev1 | ws | this is a string | t | example string | 9223372036854775807 + dev2 | 333u | this is a string | f | example string | 9223372036854775807 + dev3 | 1122e | | t | example string | 9223372036854775807 + 'dev3' | Zep | | f | | 9223372036854775807 + dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 + d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 + dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 + dev3 | wwefs | | f | example string | 9223372036854775807 + "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 + dev1 | ws | this is a string | t | example string | 9223372036854775807 + dev2 | 333u | this is a string | f | example string | 9223372036854775807 + dev3 | 1122e | | t | example string | 9223372036854775807 + 'dev3' | Zep | | f | | 9223372036854775807 + dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 + d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 + dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 + dev3 | wwefs | | f | example string | 9223372036854775807 + "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 + dev1 | ws | this is a string | t | example string | 9223372036854775807 + dev2 | 333u | this is a string | f | example string | 9223372036854775807 + dev3 | 1122e | | t | example string | 9223372036854775807 + 'dev3' | Zep | | f | | 9223372036854775807 + dev1 | )#O3-kaej | this is a string | t | example string | 9223372036854775807 + d ,=ev2 | Os | this is a string | t | example string | 9223372036854775807 + dev2 | 3ae\aefw\naf | this is a string | t | example string | 9223372036854775807 + dev3 | wwefs | | f | example string | 9223372036854775807 + "dev 1" | 3333 | this is a string | t | example string | 9223372036854775807 + dev1 | ws | this is a string | t | example string | 9223372036854775807 + dev2 | 333u | this is a string | f | example string | 9223372036854775807 + dev3 | 1122e | | t | example string | 9223372036854775807 + 'dev3' | Zep | | f | | 9223372036854775807 +(54 rows) + +--Clean +--Testcase 119: +DROP FOREIGN TABLE sctbl1; +--Testcase 120: +DROP FOREIGN TABLE sctbl2; +--Testcase 121: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 122: +DROP SERVER influxdb_svr CASCADE; +--Testcase 123: +DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/schemaless/add_multi_key.out b/expected/15.0/schemaless/add_multi_key.out new file mode 100644 index 0000000..4cc00d6 --- /dev/null +++ b/expected/15.0/schemaless/add_multi_key.out @@ -0,0 +1,2585 @@ +SET datestyle=ISO; +-- timestamp with time zone differs based on this +SET timezone='UTC'; +\set ECHO none +-- Init data original +:INIT_MULTILEY_ORIGINAL; +-- Before update data +--Testcase 1: +CREATE EXTENSION influxdb_fdw CASCADE; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: +CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +-------------------------------------------------TC for before update test data------------------ +-- Select all data with condition and combine clause +--Testcase 5: +SELECT * FROM sctbl3 WHERE time='2020-01-09 01:00:00+00' OR (fields->>'c3')::bigint=3 OR (fields->>'c3')::bigint=10.746 ORDER BY fields->>'c2'; + time | fields +------------------------+-------------------------------------------------------------------------------------- + 2020-01-11 01:00:00+00 | {"c2": "Change our locale from $ to ¥ in", "c3": "3", "c4": "30.631", "c5": "false"} + 2020-01-09 01:00:00+00 | {"c2": "Which started out as a kind", "c3": "1", "c4": "10.746", "c5": "true"} +(2 rows) + +--Testcase 6: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | c2 | c3 | c4 | c5 +------------------------+-----------------------------------+----+---------+---- + 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t + 2020-01-09 01:00:00+00 | Which started out as a kind | 1 | 10.746 | t + 2020-01-08 01:00:00+00 | In Bulgarian it is desirable | 0 | 0.774 | f + 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f + 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f +(5 rows) + +--Testcase 7: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; + time | c2 | c3 | c4 | c5 +-------------------------------+----------------------------------------------------------------------------------+--------------+-----------+---- + 2262-04-11 23:47:16.854776+00 | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f + 2262-04-11 23:47:16.854776+00 | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f + 2020-01-13 01:00:00+00 | $ | 5 | 50.188 | f + 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 | 4 | 40.772 | f + 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in | 3 | 30.631 | f + 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t + 2020-01-09 01:00:00+00 | Which started out as a kind | 1 | 10.746 | t + 2020-01-08 01:00:00+00 | In Bulgarian it is desirable | 0 | 0.774 | f + 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f + 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f + 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t + 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t + 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t + 1677-09-21 00:12:43.145224+00 | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t + 1677-09-21 00:12:43.145224+00 | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | 1.78e+68 | f +(15 rows) + +--Testcase 8: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; + time | c2 | c3 | c4 | c5 +------+----+----+----+---- +(0 rows) + +--Testcase 9: +SELECT * FROM sctbl3 WHERE (fields->>'c5')::bool= true; + time | fields +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------- + 1677-09-21 00:12:43.145224+00 | {"c2": "^%(@#%^(@#%&@#)%^)!^%)!)%", "c3": "-36854775808", "c4": "1.79e+68", "c5": "true"} + 2020-01-03 01:00:00+00 | {"c2": "いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ", "c3": "-5", "c4": "-50.232", "c5": "true"} + 2020-01-04 01:00:00+00 | {"c2": "色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見", "c3": "-4", "c4": "-40.652", "c5": "true"} + 2020-01-05 01:00:00+00 | {"c2": "กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ", "c3": "-3", "c4": "-30.756", "c5": "true"} + 2020-01-09 01:00:00+00 | {"c2": "Which started out as a kind", "c3": "1", "c4": "10.746", "c5": "true"} + 2020-01-10 01:00:00+00 | {"c2": "Canada Denmark Turkey Yemen Tokyo", "c3": "2", "c4": "20.312", "c5": "true"} +(6 rows) + +--Testcase 10: +SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint BETWEEN 0 AND 1000 ORDER BY fields->>'c2', (fields->>'c3')::bigint; + time | fields +------------------------+-------------------------------------------------------------------------------------- + 2020-01-13 01:00:00+00 | {"c2": "$", "c3": "5", "c4": "50.188", "c5": "false"} + 2020-01-10 01:00:00+00 | {"c2": "Canada Denmark Turkey Yemen Tokyo", "c3": "2", "c4": "20.312", "c5": "true"} + 2020-01-11 01:00:00+00 | {"c2": "Change our locale from $ to ¥ in", "c3": "3", "c4": "30.631", "c5": "false"} + 2020-01-12 01:00:00+00 | {"c2": "Chúc mừng năm mới 2021", "c3": "4", "c4": "40.772", "c5": "false"} + 2020-01-08 01:00:00+00 | {"c2": "In Bulgarian it is desirable", "c3": "0", "c4": "0.774", "c5": "false"} + 2020-01-09 01:00:00+00 | {"c2": "Which started out as a kind", "c3": "1", "c4": "10.746", "c5": "true"} +(6 rows) + +--Testcase 11: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2' LIKE 'C%' AND (fields->>'c5')::bool!= true ORDER BY 1 DESC,2 ASC,3 DESC,4,5; + time | c2 | c3 | c4 | c5 +------------------------+----------------------------------+----+--------+---- + 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 | 4 | 40.772 | f + 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in | 3 | 30.631 | f +(2 rows) + +--Testcase 12: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT EXISTS (SELECT fields->>'c2' FROM sctbl3 WHERE fields->>'c2'='abcd') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | c2 | c3 | c4 | c5 +-------------------------------+------------------------------------+-------------+-----------+---- + 2262-04-11 23:47:16.854776+00 | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f + 2262-04-11 23:47:16.854776+00 | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f + 2020-01-13 01:00:00+00 | $ | 5 | 50.188 | f + 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 | 4 | 40.772 | f + 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in | 3 | 30.631 | f +(5 rows) + +--Testcase 13: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint < ALL (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | c2 | c3 | c4 | c5 +------------------------+-----------------------------------------------------------------------+----+---------+---- + 2020-01-08 01:00:00+00 | In Bulgarian it is desirable | 0 | 0.774 | f + 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f + 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f + 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t + 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t +(5 rows) + +-- Select aggregate function and specific column from original table +--Testcase 14: +SELECT time, fields->>'c2' c2 FROM sctbl3 WHERE fields->>'c2'<='$' OR (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 ASC,2 DESC LIMIT 25 OFFSET 8; + time | c2 +-------------------------------+------------------------------------ + 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo + 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in + 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 + 2020-01-13 01:00:00+00 | $ + 2262-04-11 23:47:16.854776+00 | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ + 2262-04-11 23:47:16.854776+00 | ăâđêôơưdêđêdờenờíìờẹ +(6 rows) + +--Testcase 15: +SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE time>= '2000-1-3 20:30:51' GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25 OFFSET 8; +ERROR: relation "view_sctbl3" does not exist +LINE 1: ...M sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl... + ^ +--Testcase 16: +SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c4')::double precision), max((fields->>'c4')::double precision)/2 FROM sctbl3 GROUP BY fields->>'c2'; + max | max | ?column? | ?column? | max | ?column? +-------------------------------+--------------+--------------+--------------+-----------+----------- + 1677-09-21 00:12:43.145224+00 | -36854775808 | -36854775798 | -36854775818 | 1.79e+68 | 8.95e+67 + 2020-01-13 01:00:00+00 | 5 | 15 | -5 | 50.188 | 25.094 + 2020-01-05 01:00:00+00 | -3 | 7 | -13 | -30.756 | -15.378 + 2020-01-08 01:00:00+00 | 0 | 10 | -10 | 0.774 | 0.387 + 2020-01-07 01:00:00+00 | -1 | 9 | -11 | -10.746 | -5.373 + 2020-01-11 01:00:00+00 | 3 | 13 | -7 | 30.631 | 15.3155 + 2262-04-11 23:47:16.854776+00 | 36854775807 | 36854775817 | 36854775797 | -1.79e+68 | -8.95e+67 + 2020-01-12 01:00:00+00 | 4 | 14 | -6 | 40.772 | 20.386 + 2020-01-04 01:00:00+00 | -4 | 6 | -14 | -40.652 | -20.326 + 2020-01-06 01:00:00+00 | -2 | 8 | -12 | -20.56 | -10.28 + 1677-09-21 00:12:43.145224+00 | -36854775807 | -36854775797 | -36854775817 | 1.78e+68 | 8.9e+67 + 2262-04-11 23:47:16.854776+00 | 36854775806 | 36854775816 | 36854775796 | -1.78e+68 | -8.9e+67 + 2020-01-09 01:00:00+00 | 1 | 11 | -9 | 10.746 | 5.373 + 2020-01-03 01:00:00+00 | -5 | 5 | -15 | -50.232 | -25.116 + 2020-01-10 01:00:00+00 | 2 | 12 | -8 | 20.312 | 10.156 +(15 rows) + +--Testcase 17: +SELECT count(fields->>'c2'), (fields->>'c3')::bigint c3, fields->>'c4' c4 from sctbl3 GROUP BY fields->>'c2'; +ERROR: column "sctbl3.fields" must appear in the GROUP BY clause or be used in an aggregate function +LINE 1: SELECT count(fields->>'c2'), (fields->>'c3')::bigint c3, fie... + ^ +--Testcase 18: +SELECT 32 + (fields->>'c3')::bigint, (fields->>'c3')::bigint + (fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c3', fields->>'c5', fields->>'c2' ORDER BY fields->>'c2'; + ?column? | ?column? +--------------+-------------- + 30 | -4 + -36854775776 | -73709551616 + 37 | 10 + 29 | -6 + 27 | -10 + 31 | -2 + 36854775838 | 73709551612 + 34 | 4 + 35 | 6 + 36 | 8 + 32 | 0 + 33 | 2 + -36854775775 | -73709551614 + 36854775839 | 73709551614 + 28 | -8 +(15 rows) + +--Testcase 19: +SELECT max(fields->>'c2'), min((fields->>'c3')::bigint), max((fields->>'c3')::bigint) from sctbl3 GROUP BY fields->>'c3' ORDER BY (fields->>'c3')::bigint; + max | min | max +----------------------------------------------------------------------------------+--------------+-------------- + ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | -36854775808 + べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | -36854775807 + いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -5 + 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -4 + กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -3 + `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -2 + 0123456789 | -1 | -1 + In Bulgarian it is desirable | 0 | 0 + Which started out as a kind | 1 | 1 + Canada Denmark Turkey Yemen Tokyo | 2 | 2 + Change our locale from $ to ¥ in | 3 | 3 + Chúc mừng năm mới 2021 | 4 | 4 + $ | 5 | 5 + ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | 36854775806 + 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | 36854775807 +(15 rows) + +--Testcase 20: +SELECT sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; + sum | sum +-----+----- +(0 rows) + +--Testcase 21: +SELECT count(*), count(time), count (DISTINCT (fields->>'c3')::bigint), count (ALL (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4; + count | count | count | count +-------+-------+-------+------- + 1 | 1 | 1 | 1 + 1 | 1 | 1 | 1 + 1 | 1 | 1 | 1 + 1 | 1 | 1 | 1 + 1 | 1 | 1 | 1 + 1 | 1 | 1 | 1 + 1 | 1 | 1 | 1 + 1 | 1 | 1 | 1 + 1 | 1 | 1 | 1 + 1 | 1 | 1 | 1 + 1 | 1 | 1 | 1 + 2 | 2 | 2 | 2 + 2 | 2 | 2 | 2 +(13 rows) + +--Testcase 22: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; + stddev | stddev +------------------------+------------------------ + 0.70710678118654752440 | 0.70710678118654752440 + 0.70710678118654752440 | 0.70710678118654752440 + | + | + | + | + | + | + | + | + | + | + | +(13 rows) + +--Testcase 23: +SELECT string_agg(fields->>'c2', ';' ORDER BY fields->>'c2') FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1; + string_agg +---------------------------------------------------------------------------------- + `~!@#$%^&*()_+=-{}[]|:;<>?/. + ^%(@#%^(@#%&@#)%^)!^%)!)% + $ + กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ + いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ + 0123456789 + ăâđêôơưdêđêdờenờíìờẹ + Canada Denmark Turkey Yemen Tokyo + Change our locale from $ to ¥ in + Chúc mừng năm mới 2021 + In Bulgarian it is desirable + Which started out as a kind + べ員葉コ番告7次ノヌ従援かやじり図安ヨ + 敷ヘカウ告政ヨハツヤ消70者32精楽ざ + 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 +(15 rows) + +--Testcase 24: +SELECT every((fields->>'c3')::bigint>0), every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; + every | every +-------+------- + f | f + f | f + f | f + f | f + f | f + f | f + f | f + t | f + t | f + t | f + t | f + t | f + t | f +(13 rows) + +--Testcase 25: +SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; + ?column? | bool_and | ?column? +----------+----------+---------- + t | t | f +(1 row) + +--Testcase 26: +SELECT bool_or((fields->>'c4')::double precision <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; + ?column? | bool_or | ?column? +----------+---------+---------- + t | t | t +(1 row) + +-- Select combine aggregate via operation +--Testcase 27: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC; + ?column? | min +-------------------------------+-------------- + 1677-10-01 00:12:43.145224+00 | -73709551616 + 2020-01-13 01:00:00+00 | -10 + 2020-01-14 01:00:00+00 | -8 + 2020-01-15 01:00:00+00 | -6 + 2020-01-16 01:00:00+00 | -4 + 2020-01-17 01:00:00+00 | -2 + 2020-01-18 01:00:00+00 | 0 + 2020-01-19 01:00:00+00 | 2 + 2020-01-20 01:00:00+00 | 4 + 2020-01-21 01:00:00+00 | 6 + 2020-01-22 01:00:00+00 | 8 + 2020-01-23 01:00:00+00 | 10 + 2262-04-21 23:47:16.854776+00 | 73709551612 +(13 rows) + +--Testcase 28: +SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM sctbl3 GROUP BY fields->>'c2'; + max | max | ?column? | ?column? | max | ?column? +-------------------------------+--------------+--------------+--------------+--------------+-------------- + 1677-09-21 00:12:43.145224+00 | -36854775808 | -36854775798 | -36854775818 | -36854775808 | -18427387904 + 2020-01-13 01:00:00+00 | 5 | 15 | -5 | 5 | 2 + 2020-01-05 01:00:00+00 | -3 | 7 | -13 | -3 | -1 + 2020-01-08 01:00:00+00 | 0 | 10 | -10 | 0 | 0 + 2020-01-07 01:00:00+00 | -1 | 9 | -11 | -1 | 0 + 2020-01-11 01:00:00+00 | 3 | 13 | -7 | 3 | 1 + 2262-04-11 23:47:16.854776+00 | 36854775807 | 36854775817 | 36854775797 | 36854775807 | 18427387903 + 2020-01-12 01:00:00+00 | 4 | 14 | -6 | 4 | 2 + 2020-01-04 01:00:00+00 | -4 | 6 | -14 | -4 | -2 + 2020-01-06 01:00:00+00 | -2 | 8 | -12 | -2 | -1 + 1677-09-21 00:12:43.145224+00 | -36854775807 | -36854775797 | -36854775817 | -36854775807 | -18427387903 + 2262-04-11 23:47:16.854776+00 | 36854775806 | 36854775816 | 36854775796 | 36854775806 | 18427387903 + 2020-01-09 01:00:00+00 | 1 | 11 | -9 | 1 | 0 + 2020-01-03 01:00:00+00 | -5 | 5 | -15 | -5 | -2 + 2020-01-10 01:00:00+00 | 2 | 12 | -8 | 2 | 1 +(15 rows) + +--Testcase 29: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; + sum | sum | ?column? +---------------+---------------+-------------- + 147419103226 | 147419103226 | 73709551608 + 10 | 10 | 0 + 8 | 8 | -1 + 6 | 6 | -2 + 4 | 4 | -3 + 2 | 2 | -4 + 0 | 0 | -5 + -2 | -2 | -6 + -4 | -4 | -7 + -6 | -6 | -8 + -8 | -8 | -9 + -10 | -10 | -10 + -147419103230 | -147419103230 | -73709551620 +(13 rows) + +--Testcase 30: +SELECT avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint)-10, avg((fields->>'c3')::bigint)*0.5 FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; + avg | avg | ?column? | ?column? +-----+-----+----------+---------- +(0 rows) + +--Testcase 31: +SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time) FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; + array_agg | array_agg | array_agg +-----------------------------+------------------------------------------------------------------------------------+------------------------------------------------------------------- + {18427387903,18427387903} | {ăâđêôơưdêđêdờenờíìờẹ,敷ヘカウ告政ヨハツヤ消70者32精楽ざ} | {"2262-04-11 23:47:16.854776+00","2262-04-11 23:47:16.854776+00"} + {2} | {$} | {"2020-01-13 01:00:00+00"} + {2} | {"Chúc mừng năm mới 2021"} | {"2020-01-12 01:00:00+00"} + {1} | {"Canada Denmark Turkey Yemen Tokyo"} | {"2020-01-10 01:00:00+00"} + {1} | {"Change our locale from $ to ¥ in"} | {"2020-01-11 01:00:00+00"} + {0} | {0123456789} | {"2020-01-07 01:00:00+00"} + {0} | {"In Bulgarian it is desirable"} | {"2020-01-08 01:00:00+00"} + {0} | {"Which started out as a kind"} | {"2020-01-09 01:00:00+00"} + {-1} | {"`~!@#$%^&*()_+=-{}[]|:;<>?/."} | {"2020-01-06 01:00:00+00"} + {-1} | {กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ} | {"2020-01-05 01:00:00+00"} + {-2} | {いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ} | {"2020-01-03 01:00:00+00"} + {-2} | {"色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見"} | {"2020-01-04 01:00:00+00"} + {-18427387904,-18427387903} | {^%(@#%^(@#%&@#)%^)!^%)!)%,べ員葉コ番告7次ノヌ従援かやじり図安ヨ} | {"1677-09-21 00:12:43.145224+00","1677-09-21 00:12:43.145224+00"} +(13 rows) + +--Testcase 32: +SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; + bit_and | bit_and +--------------+-------------- + -36854775808 | -36854775808 + -5 | 10 + -4 | 11 + -3 | 12 + -2 | 13 + -1 | 14 + 0 | 15 + 1 | 16 + 2 | 17 + 3 | 18 + 4 | 19 + 5 | 20 + 36854775806 | 36854775820 +(13 rows) + +--Testcase 33: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; + bit_or | bit_or +--------------+-------------- + -36854775807 | -18427387903 + -5 | -2 + -4 | -2 + -3 | -1 + -2 | -1 + -1 | 0 + 0 | 0 + 1 | 0 + 2 | 1 + 3 | 1 + 4 | 2 + 5 | 2 + 36854775807 | 18427387903 +(13 rows) + +--Testcase 34: +SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3; + bool_and | bool_and | bool_and +----------+----------+---------- +(0 rows) + +--Testcase 35: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE (fields->>'c3')::bigint NOT IN (0, 1000, -1, -2) GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; + max | max | max +-----+-----+----- +(0 rows) + +--Testcase 36: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE NOT (fields->>'c3')::bigint=5 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; + max | max | max +------------------------+-----+----- + 2020-01-12 01:00:00+00 | 2.0 | 14 + 2020-01-11 01:00:00+00 | 1.5 | 13 + 2020-01-10 01:00:00+00 | 1.0 | 12 + 2020-01-09 01:00:00+00 | 0.5 | 11 + 2020-01-08 01:00:00+00 | 0.0 | 10 +(5 rows) + +--Testcase 37: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE NOT time>'2020-1-3 20:30:50' GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 8; + ?column? | min +----------+----- +(0 rows) + +--Testcase 38: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY time ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; + ?column? | min +-------------------------------+-------------- + 1677-10-01 00:12:43.145224+00 | -73709551616 + 2020-01-13 01:00:00+00 | -10 + 2020-01-14 01:00:00+00 | -8 + 2020-01-15 01:00:00+00 | -6 + 2020-01-16 01:00:00+00 | -4 +(5 rows) + +--Testcase 39: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY fields->>'c3', fields->>'c3'HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; + ?column? | min +----------+----- +(0 rows) + +-- Select from sub query +--Testcase 40: +SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c4')::double precision<1000 ) AS sctbl3; + time | c2 +-------------------------------+---------------------------------------------------------------------------------- + 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ + 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 + 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ + 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. + 2020-01-07 01:00:00+00 | 0123456789 + 2020-01-08 01:00:00+00 | In Bulgarian it is desirable + 2020-01-09 01:00:00+00 | Which started out as a kind + 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo + 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in + 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 + 2020-01-13 01:00:00+00 | $ + 2262-04-11 23:47:16.854776+00 | ăâđêôơưdêđêdờenờíìờẹ + 2262-04-11 23:47:16.854776+00 | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ +(13 rows) + +--Testcase 41: +SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3; + time | c2 +------------------------+---------------------------------------------------------------------------------- + 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ + 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 + 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ + 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. + 2020-01-07 01:00:00+00 | 0123456789 + 2020-01-08 01:00:00+00 | In Bulgarian it is desirable + 2020-01-09 01:00:00+00 | Which started out as a kind + 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo + 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in + 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 + 2020-01-13 01:00:00+00 | $ +(11 rows) + +--Testcase 42: +SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY 1; + max | max | ?column? | ?column? | max | ?column? +------------------------+-----+----------+----------+-----+---------- + 2020-01-03 01:00:00+00 | -5 | 5 | -15 | -5 | -2 + 2020-01-04 01:00:00+00 | -4 | 6 | -14 | -4 | -2 + 2020-01-05 01:00:00+00 | -3 | 7 | -13 | -3 | -1 + 2020-01-06 01:00:00+00 | -2 | 8 | -12 | -2 | -1 + 2020-01-07 01:00:00+00 | -1 | 9 | -11 | -1 | 0 + 2020-01-08 01:00:00+00 | 0 | 10 | -10 | 0 | 0 + 2020-01-09 01:00:00+00 | 1 | 11 | -9 | 1 | 0 + 2020-01-10 01:00:00+00 | 2 | 12 | -8 | 2 | 1 + 2020-01-11 01:00:00+00 | 3 | 13 | -7 | 3 | 1 + 2020-01-12 01:00:00+00 | 4 | 14 | -6 | 4 | 2 + 2020-01-13 01:00:00+00 | 5 | 15 | -5 | 5 | 2 +(11 rows) + +--Testcase 43: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; + stddev | stddev +--------+-------- + | + | + | + | + | + | + | + | + | + | + | +(11 rows) + +--Testcase 44: +SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,2 DESC; + sqrt | sqrt +--------------------+-------------------- + 0 | 0 + 1 | 1 + 1 | 1 + 1.4142135623730951 | 1.4142135623730951 + 1.4142135623730951 | 1.4142135623730951 + 1.7320508075688772 | 1.7320508075688772 + 1.7320508075688772 | 1.7320508075688772 + 2 | 2 + 2 | 2 + 2.23606797749979 | 2.23606797749979 + 2.23606797749979 | 2.23606797749979 +(11 rows) + +--Testcase 45: +SELECT * FROM ( SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE time='2020-01-09 01:00:00+00' AND c3=0 AND c3=10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | c2 | c3 | c4 | c5 +------+----+----+----+---- +(0 rows) + +--Testcase 46: +SELECT * FROM ( SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE c3>10.746 OR c2 != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | c2 | c3 | c4 | c5 +------------------------+-----------------------------------+----+--------+---- + 2020-01-13 01:00:00+00 | $ | 5 | 50.188 | f + 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 | 4 | 40.772 | f + 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in | 3 | 30.631 | f + 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t + 2020-01-09 01:00:00+00 | Which started out as a kind | 1 | 10.746 | t +(5 rows) + +--Testcase 47: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE (fields->>'c3')::bigint != -1 AND (fields->>'c5')::bool != true GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 8; + max | max | max +-----+-----+----- +(0 rows) + +-- Within group +--Testcase 48: +--SELECT (fields->>'c5')::bool (fields->>'c5')::bool, mode((fields->>'c3')::bigint) WITHIN GROUP (ORDER BY (fields->>'c3')::bigint) AS m1 from sctbl3 GROUP BY (fields->>'c5')::bool; +-- Select from view +--Testcase 49: +create view view_sctbl3 as select * from sctbl3 where ((fields->>'c3')::bigint != 6789); +--Testcase 50: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; + stddev | stddev +------------------------+------------------------ + 0.70710678118654752440 | 0.70710678118654752440 + 0.70710678118654752440 | 0.70710678118654752440 + | + | + | + | + | + | + | + | + | + | + | +(13 rows) + +--Testcase 51: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; + bit_or | bit_or +--------+-------- + -1 | -1 +(1 row) + +--Testcase 52: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; + max | max | max +-------------------------------+----------------+-------------- + 2262-04-11 23:47:16.854776+00 | 18427387903.5 | 36854775817 + 2020-01-13 01:00:00+00 | 2.5 | 15 + 2020-01-12 01:00:00+00 | 2.0 | 14 + 2020-01-11 01:00:00+00 | 1.5 | 13 + 2020-01-10 01:00:00+00 | 1.0 | 12 + 2020-01-09 01:00:00+00 | 0.5 | 11 + 2020-01-08 01:00:00+00 | 0.0 | 10 + 2020-01-07 01:00:00+00 | -0.5 | 9 + 2020-01-06 01:00:00+00 | -1.0 | 8 + 2020-01-05 01:00:00+00 | -1.5 | 7 + 2020-01-04 01:00:00+00 | -2.0 | 6 + 2020-01-03 01:00:00+00 | -2.5 | 5 + 1677-09-21 00:12:43.145224+00 | -18427387903.5 | -36854775797 +(13 rows) + +--Testcase 53: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3; + sum | sum | ?column? +--------------+--------------+-------------- + 73709551614 | 73709551614 | 36854775802 + 73709551612 | 73709551612 | 36854775801 + 10 | 10 | 0 + 8 | 8 | -1 + 6 | 6 | -2 + 4 | 4 | -3 + 2 | 2 | -4 + 0 | 0 | -5 + -2 | -2 | -6 + -4 | -4 | -7 + -6 | -6 | -8 + -8 | -8 | -9 + -10 | -10 | -10 + -73709551614 | -73709551614 | -36854775812 + -73709551616 | -73709551616 | -36854775813 +(15 rows) + +--Testcase 54: +SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50 FROM view_sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; + avg | ?column? +------------------------+---------- + 0.00000000000000000000 | f + 0.00000000000000000000 | f + 0.00000000000000000000 | f + 0.00000000000000000000 | f + 0.00000000000000000000 | f + 0.00000000000000000000 | f + 0.00000000000000000000 | f + 0.00000000000000000000 | f + 0.00000000000000000000 | f + 0.00000000000000000000 | f + 0.00000000000000000000 | f +(11 rows) + +--Testcase 55: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; + bit_or | bit_or +--------+-------- + -5 | -2 + -4 | -2 + -3 | -1 + -2 | -1 + -1 | 0 + 0 | 0 + 1 | 0 + 2 | 1 + 3 | 1 + 4 | 2 + 5 | 2 +(11 rows) + +--Testcase 56: +SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; + bool_and | bool_and | bool_and +----------+----------+---------- + t | f | f + t | f | f + t | f | f + t | f | f + t | f | f + t | f | f + f | f | f + f | t | f + f | t | f + f | t | f + f | t | f + f | t | f + f | t | f +(13 rows) + +--Testcase 57: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 + FROM view_sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 8; + time | c2 | c3 | c4 | c5 +------+----+----+----+---- +(0 rows) + + --Testcase 58: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 + FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; + time | c2 | c3 | c4 | c5 +------------------------+----------------------------------------------------------------------------------+----+---------+---- + 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f + 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f + 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t + 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t + 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t +(5 rows) + +--Testcase 59: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 + FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; + time | c2 | c3 | c4 | c5 +------------------------+----------------------------------------------------------------------------------+----+---------+---- + 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f + 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f + 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t + 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t + 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t +(5 rows) + +--Testcase 60: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 + FROM view_sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; + time | c2 | c3 | c4 | c5 +------------------------+----------------------------------------------------------------------------------+----+---------+---- + 2020-01-07 01:00:00+00 | 0123456789 | -1 | -10.746 | f + 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f + 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t + 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t + 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t +(5 rows) + +--Testcase 61: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 + FROM view_sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; + time | c2 | c3 | c4 | c5 +------+----+----+----+---- +(0 rows) + +-- Select many target aggregate in one query and combine with condition +--Testcase 62: +SELECT upper(fields->>'c2'), upper(fields->>'c2'), lower(fields->>'c2'), lower(fields->>'c2') FROM sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; + upper | upper | lower | lower +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------+----------------------------------------------------------------------------------+---------------------------------------------------------------------------------- + `~!@#$%^&*()_+=-{}[]|:;<>?/. | `~!@#$%^&*()_+=-{}[]|:;<>?/. | `~!@#$%^&*()_+=-{}[]|:;<>?/. | `~!@#$%^&*()_+=-{}[]|:;<>?/. + ^%(@#%^(@#%&@#)%^)!^%)!)% | ^%(@#%^(@#%&@#)%^)!^%)!)% | ^%(@#%^(@#%&@#)%^)!^%)!)% | ^%(@#%^(@#%&@#)%^)!^%)!)% + $ | $ | $ | $ + กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ + いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ + 0123456789 | 0123456789 | 0123456789 | 0123456789 + ĂÂĐÊÔƠƯDÊĐÊDỜENỜÍÌỜẸ | ĂÂĐÊÔƠƯDÊĐÊDỜENỜÍÌỜẸ | ăâđêôơưdêđêdờenờíìờẹ | ăâđêôơưdêđêdờenờíìờẹ + CANADA DENMARK TURKEY YEMEN TOKYO | CANADA DENMARK TURKEY YEMEN TOKYO | canada denmark turkey yemen tokyo | canada denmark turkey yemen tokyo + CHANGE OUR LOCALE FROM $ TO ¥ IN | CHANGE OUR LOCALE FROM $ TO ¥ IN | change our locale from $ to ¥ in | change our locale from $ to ¥ in + CHÚC MỪNG NĂM MỚI 2021 | CHÚC MỪNG NĂM MỚI 2021 | chúc mừng năm mới 2021 | chúc mừng năm mới 2021 + IN BULGARIAN IT IS DESIRABLE | IN BULGARIAN IT IS DESIRABLE | in bulgarian it is desirable | in bulgarian it is desirable + WHICH STARTED OUT AS A KIND | WHICH STARTED OUT AS A KIND | which started out as a kind | which started out as a kind + べ員葉コ番告7次ノヌ従援かやじり図安ヨ | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | べ員葉コ番告7次ノヌ従援かやじり図安ヨ + 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ + 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 +(15 rows) + +--Testcase 63: +SELECT max(time), min((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count(*), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC,2 ASC,3 DESC,4,5; + max | min | sum | count | avg +-------------------------------+--------------+--------------+-------+------------------------- + 2262-04-11 23:47:16.854776+00 | 36854775806 | 73709551613 | 2 | 36854775806.50000000 + 2020-01-13 01:00:00+00 | 5 | 5 | 1 | 5.0000000000000000 + 2020-01-12 01:00:00+00 | 4 | 4 | 1 | 4.0000000000000000 + 2020-01-11 01:00:00+00 | 3 | 3 | 1 | 3.0000000000000000 + 2020-01-10 01:00:00+00 | 2 | 2 | 1 | 2.0000000000000000 + 2020-01-09 01:00:00+00 | 1 | 1 | 1 | 1.00000000000000000000 + 2020-01-08 01:00:00+00 | 0 | 0 | 1 | 0.00000000000000000000 + 2020-01-07 01:00:00+00 | -1 | -1 | 1 | -1.00000000000000000000 + 2020-01-06 01:00:00+00 | -2 | -2 | 1 | -2.0000000000000000 + 2020-01-05 01:00:00+00 | -3 | -3 | 1 | -3.0000000000000000 + 2020-01-04 01:00:00+00 | -4 | -4 | 1 | -4.0000000000000000 + 2020-01-03 01:00:00+00 | -5 | -5 | 1 | -5.0000000000000000 + 1677-09-21 00:12:43.145224+00 | -36854775808 | -73709551615 | 2 | -36854775807.50000000 +(13 rows) + +--Testcase 64: +SELECT (fields->>'c3')::bigint*(random()<=1)::int, (random()<=1)::int*(25-10)+10 FROM sctbl3 ORDER BY 1 ASC,2 DESC; + ?column? | ?column? +--------------+---------- + -36854775808 | 25 + -36854775807 | 25 + -5 | 25 + -4 | 25 + -3 | 25 + -2 | 25 + -1 | 25 + 0 | 25 + 1 | 25 + 2 | 25 + 3 | 25 + 4 | 25 + 5 | 25 + 36854775806 | 25 + 36854775807 | 25 +(15 rows) + +--Testcase 65: +SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; + max | count | exists | exists +-----+-------+--------+-------- +(0 rows) + +--Testcase 66: +SELECT sum((fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint<100 and (fields->>'c3')::bigint>-100), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint >0 AND (fields->>'c3')::bigint<100) FROM sctbl3 GROUP BY (fields->>'c5')::bool HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; + sum | avg +-----+-------------------- + 9 | 4.0000000000000000 +(1 row) + +--Testcase 67: +SELECT 'abcd', 1234, (fields->>'c3')::bigint/2, 10+(fields->>'c3')::bigint * (random()<=1)::int * 0.5 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; + ?column? | ?column? | ?column? | ?column? +----------+----------+----------+---------- + abcd | 1234 | -2 | 7.5 + abcd | 1234 | -2 | 8.0 + abcd | 1234 | -1 | 8.5 + abcd | 1234 | -1 | 9.0 + abcd | 1234 | 0 | 9.5 + abcd | 1234 | 0 | 10.0 + abcd | 1234 | 0 | 10.5 + abcd | 1234 | 1 | 11.0 + abcd | 1234 | 1 | 11.5 + abcd | 1234 | 2 | 12.0 + abcd | 1234 | 2 | 12.5 +(11 rows) + +--Testcase 68: +SELECT count((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint) FROM sctbl3 GROUP BY influx_time(time, interval '2d') ORDER BY 1; +ERROR: stub influx_time(timestamp with time zone, interval) is called +CONTEXT: PL/pgSQL function influx_time(timestamp with time zone,interval) line 3 at RAISE +--Testcase 69: +SELECT max((fields->>'c3')::bigint), min((fields->>'c4')::double precision), avg((fields->>'c3')::bigint), count((fields->>'c3')::bigint) FROM sctbl3 WHERE time > '2020-01-10 00:00:00' AND time < '2020-01-15 00:00:00' GROUP BY influx_time(time, interval '1d', interval '10h30m') ORDER BY 1 ASC, 2 DESC, 3 ASC, 4 DESC; +ERROR: stub influx_time(timestamp with time zone, interval, interval) is called +CONTEXT: PL/pgSQL function influx_time(timestamp with time zone,interval,interval) line 3 at RAISE +--Testcase 70: +SELECT min(time), max(time), count(time) FROM sctbl3 GROUP BY (fields->>'c3') ORDER BY 1,2,3; + min | max | count +-------------------------------+-------------------------------+------- + 1677-09-21 00:12:43.145224+00 | 1677-09-21 00:12:43.145224+00 | 1 + 1677-09-21 00:12:43.145224+00 | 1677-09-21 00:12:43.145224+00 | 1 + 2020-01-03 01:00:00+00 | 2020-01-03 01:00:00+00 | 1 + 2020-01-04 01:00:00+00 | 2020-01-04 01:00:00+00 | 1 + 2020-01-05 01:00:00+00 | 2020-01-05 01:00:00+00 | 1 + 2020-01-06 01:00:00+00 | 2020-01-06 01:00:00+00 | 1 + 2020-01-07 01:00:00+00 | 2020-01-07 01:00:00+00 | 1 + 2020-01-08 01:00:00+00 | 2020-01-08 01:00:00+00 | 1 + 2020-01-09 01:00:00+00 | 2020-01-09 01:00:00+00 | 1 + 2020-01-10 01:00:00+00 | 2020-01-10 01:00:00+00 | 1 + 2020-01-11 01:00:00+00 | 2020-01-11 01:00:00+00 | 1 + 2020-01-12 01:00:00+00 | 2020-01-12 01:00:00+00 | 1 + 2020-01-13 01:00:00+00 | 2020-01-13 01:00:00+00 | 1 + 2262-04-11 23:47:16.854776+00 | 2262-04-11 23:47:16.854776+00 | 1 + 2262-04-11 23:47:16.854776+00 | 2262-04-11 23:47:16.854776+00 | 1 +(15 rows) + +--Testcase 71: +SELECT count((fields->>'c3')::bigint), max((fields->>'c3')::bigint), sum((fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3' HAVING(max(fields->>'c2')!='HELLO' and count(fields->>'c2')>1) ORDER BY 1,2,3; + count | max | sum +-------+-----+----- +(0 rows) + +--Testcase 72: +SELECT count(fields->>'c2'), bit_and((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint), bool_and((fields->>'c5')::bool) FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1,2,3,4; + count | bit_and | bit_or | bool_and +-------+--------------+--------------+---------- + 1 | -36854775808 | -36854775808 | t + 1 | -36854775807 | -36854775807 | f + 1 | -5 | -5 | t + 1 | -4 | -4 | t + 1 | -3 | -3 | t + 1 | -2 | -2 | f + 1 | -1 | -1 | f + 1 | 0 | 0 | f + 1 | 1 | 1 | t + 1 | 2 | 2 | t + 1 | 3 | 3 | f + 1 | 4 | 4 | f + 1 | 5 | 5 | f + 1 | 36854775806 | 36854775806 | f + 1 | 36854775807 | 36854775807 | f +(15 rows) + +--Testcase 73: +SELECT array_agg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg((fields->>'c3')::bigint/(fields->>'c3')::bigint*(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint+(fields->>'c3')::bigint/(fields->>'c3')::bigint)*-1000), array_agg((fields->>'c3')::bigint*(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)+9999999999999.998) from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint ORDER BY 1, 2, 3, 4, 5; +ERROR: bigint out of range +--Testcase 74: +SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)-0.567-avg((fields->>'c3')::bigint/3+(fields->>'c3')::bigint)+17.55435, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+45))- -9.5+2*avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint/((fields->>'c3')::bigint-10.2)*(fields->>'c3')::bigint)+0.567+avg((fields->>'c3')::bigint)*4.5+(fields->>'c3')::bigint, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+5.6))+100-(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4 limit 5; + ?column? | ?column? | ?column? | ?column? +----------------------+------------------------+------------------------------------+-------------------------- + 5.9873500000000000 | 24.5000000000000000 | 23.25930769230769230770 | 100.47169811320754716981 + 20.9873500000000000 | 3.5000000000000000 | -10.76086885245901639344 | 99.44444444444444444444 + 85994476901.98735000 | -110564327413.50000000 | -239556042741.23300000280364236800 | 101.00000000015194774295 +(3 rows) + +--Testcase 75: +SELECT bit_and((fields->>'c3')::bigint/3*(fields->>'c3')::bigint)-1 + bit_and((fields->>'c3')::bigint/4/((fields->>'c3')::bigint+6)),2* bit_and((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)*1, 5-bit_and((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-1000000+(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3' ORDER BY 1,2,3; +ERROR: bigint out of range +--Testcase 76: +SELECT bit_or((fields->>'c3')::bigint/3*(fields->>'c3')::bigint)-1 + bit_or((fields->>'c3')::bigint/4/((fields->>'c3')::bigint+6)),2* bit_or((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)*1, 5-bit_or((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-1000000+(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3' ORDER BY 1,2,3; +ERROR: bigint out of range +--Testcase 77: +SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>0.774 OR fields->>'c2' = 'Which started out as a kind' GROUP BY fields->>'c3' ORDER BY 1, 2, 3; + ?column? | ?column? | ?column? +----------+----------+------------------------------- + -4.6 | 2 | -36854775795.8000000000000000 + -4.6 | 2 | -36854775794.8000000000000000 + -4.6 | 2 | 6.2000000000000000 + -4.6 | 2 | 7.2000000000000000 + -4.6 | 2 | 8.2000000000000000 + -4.6 | 2 | 9.2000000000000000 + -4.6 | 2 | 10.2000000000000000 +(7 rows) + +--Testcase 78: +SELECT count(fields->>'c2')-2*count((fields->>'c3')::bigint), count((fields->>'c3')::bigint)/count((fields->>'c5')::bool)-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c5', fields->>'c3' order by 1, 2 limit 1; + ?column? | ?column? +----------+-------------- + -1 | -36854775806 +(1 row) + +--Testcase 79: +SELECT every((fields->>'c3')::bigint != 5.5) AND true, every((fields->>'c3')::bigint <> 10) OR every((fields->>'c3')::bigint > 5.6), every((fields->>'c3')::bigint <= 2) OR (fields->>'c5')::bool from sctbl3 GROUP BY (fields->>'c5')::bool ORDER BY 1,2,3 limit 6; + ?column? | ?column? | ?column? +----------+----------+---------- + t | t | f + t | t | t +(2 rows) + +--Testcase 80: +SELECT stddev((fields->>'c3')::bigint*3-(fields->>'c3')::bigint)*1000000-(fields->>'c3')::bigint, stddev((fields->>'c3')::bigint)-0.567, stddev((fields->>'c3')::bigint/((fields->>'c3')::bigint-1.3))/6, stddev((fields->>'c3')::bigint+4*(fields->>'c3')::bigint)*100, stddev((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint-52.1))+1 from sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY fields->>'c3' ORDER BY 1,2,3,4,5 ; + ?column? | ?column? | ?column? | ?column? | ?column? +----------+----------+----------+----------+---------- + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | +(7 rows) + +--Testcase 81: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-6, sum((fields->>'c3')::bigint/((fields->>'c3')::bigint+9999999)-(fields->>'c3')::bigint)*9999999999999.998, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/((fields->>'c3')::bigint+111111))*-9.5, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6 from sctbl3; + ?column? | ?column? | ?column? | ?column? | ?column? +----------+--------------------+----------+------------------------+---------- + -8 | 39999999999999.992 | 38.0 | 0.11393187443568118444 | -36 +(1 row) + +--Testcase 82: +SELECT sum((fields->>'c3')::bigint-(fields->>'c3')::bigint)-6+sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint*1.3-(fields->>'c3')::bigint)*9.998-sum((fields->>'c3')::bigint)*4, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/4)*-9.5-(fields->>'c3')::bigint, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435+(fields->>'c3')::bigint, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6-(fields->>'c3')::bigint-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4,5; + ?column? | ?column? | ?column? | ?column? | ?column? +--------------+-------------------+-----------------+-------------------------+--------------- + -36854775814 | 36876888673.4848 | 299445053440.0 | -34755308963.14388172 | -589676412928 + -36854775813 | 36876888672.4842 | 299445053439.0 | -34755308962.20084765 | -589676412912 + -11 | 5.0030 | 43.0 | -4.71517031391079703891 | -80 + -10 | 4.0024 | 32.5 | -3.77213625112863763113 | -64 + -9 | 3.0018 | 31.5 | -2.82910218834647822335 | -48 + -8 | 2.0012 | 21.0 | -1.88606812556431881556 | -32 + -7 | 1.0006 | 10.5 | -0.94303406278215940778 | -16 + -6 | 0.0000 | 0.0 | 0.00000000000000000000 | 0 + -5 | -1.0006 | -10.5 | 0.94303406278215940778 | 16 + -4 | -2.0012 | -21.0 | 1.88606812556431881556 | 32 + -3 | -3.0018 | -31.5 | 2.82910218834647822335 | 48 + -2 | -4.0024 | -32.5 | 3.77213625112863763113 | 64 + -1 | -5.0030 | -43.0 | 4.71517031391079703891 | 80 + 36854775800 | -36876888671.4836 | -299445053428.5 | 34755308961.25781359 | 589676412896 + 36854775801 | -36876888672.4842 | -299445053439.0 | 34755308962.20084765 | 589676412912 +(15 rows) + +--Testcase 83: +SELECT max((fields->>'c4')::double precision), max((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, max((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, max((fields->>'c3')::bigint)+max((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c4')::double precision>= 0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4; + max | ?column? | ?column? | ?column? +----------+--------------+--------------+-------------- + 0.774 | -1 | -3 | 0 + 10.746 | 1 | -2 | 2 + 20.312 | 3 | -1 | 4 + 30.631 | 5 | 0 | 6 + 40.772 | 7 | 1 | 8 + 50.188 | 9 | 2 | 10 + 1.78e+68 | -73709551615 | -36854775810 | -73709551614 + 1.79e+68 | -73709551617 | -36854775811 | -73709551616 +(8 rows) + +--Testcase 84: +SELECT min(fields->>'c2'), min((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, min((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, min((fields->>'c3')::bigint)+min((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c4')::double precision<0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4; + min | ?column? | ?column? | ?column? +----------------------------------------------------------------------------------+-------------+-------------+------------- + `~!@#$%^&*()_+=-{}[]|:;<>?/. | -5 | -5 | -4 + กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -7 | -6 | -6 + いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -11 | -8 | -10 + 0123456789 | -3 | -4 | -2 + ăâđêôơưdêđêdờenờíìờẹ | 73709551611 | 36854775803 | 73709551612 + 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 73709551613 | 36854775804 | 73709551614 + 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -9 | -7 | -8 +(7 rows) + +--Testcase 85: +SELECT variance((fields->>'c3')::bigint+(fields->>'c3')::bigint)+(fields->>'c3')::bigint, variance((fields->>'c3')::bigint*3)+(fields->>'c3')::bigint+1, variance((fields->>'c3')::bigint-2)+10 from sctbl3 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3; + ?column? | ?column? | ?column? +----------+----------+---------- + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | +(15 rows) + +--Testcase 86: +SELECT sqrt(abs((fields->>'c3')::bigint*5)) + sqrt(abs((fields->>'c3')::bigint+6)), sqrt(abs((fields->>'c3')::bigint)+5)+(fields->>'c3')::bigint, 4*sqrt(abs((fields->>'c3')::bigint-100))-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1, 2, 3; + ?column? | ?column? | ?column? +--------------------+---------------------+-------------------- + 2.449489742783178 | 2.23606797749979 | 40 + 4.47213595499958 | 1.4494897427831779 | 41.19950248448356 + 5.16227766016838 | 0.6457513110645907 | 42.39801975344831 + 5.605034153776295 | -0.1715728752538097 | 43.59556626036888 + 5.8863495173726745 | -1 | 44.792156108742276 + 6 | -1.8377223398316205 | 45.98780306383839 + 621247.3121249836 | -36854583831.02283 | 36855543710.90968 + 621247.312133412 | -36854583832.02282 | 36855543711.9097 +(8 rows) + +--Testcase 87: +SELECT max((fields->>'c3')::bigint)+min((fields->>'c3')::bigint)+3, min((fields->>'c3')::bigint)-sqrt(abs((fields->>'c3')::bigint-45.21))+(fields->>'c3')::bigint*2, count(*)-count((fields->>'c5')::bool)+2, (fields->>'c5')::bool c5, (fields->>'c3')::bigint c3 from sctbl3 GROUP BY fields->>'c3', fields->>'c3', fields->>'c5' ORDER BY 1,2,3,4; + ?column? | ?column? | ?column? | c5 | c3 +--------------+---------------------------+----------+----+-------------- + -73709551613 | -110564519399.97728155989 | 2 | t | -36854775808 + -73709551611 | -110564519396.97727895540 | 2 | f | -36854775807 + -7 | -22.085901495222750 | 2 | t | -5 + -5 | -19.014983962918233 | 2 | t | -4 + -3 | -15.943342134735980 | 2 | t | -3 + -1 | -12.870953354520754 | 2 | f | -2 + 1 | -9.797793759742936 | 2 | f | -1 + 3 | -6.723838189605696 | 2 | f | 0 + 5 | -3.649060083951716 | 2 | t | 1 + 7 | -0.573431371817918 | 2 | t | 2 + 9 | 2.503077651687685 | 2 | f | 3 + 11 | 5.580498461718387 | 2 | f | 4 + 13 | 8.658864455004924 | 2 | f | 5 + 73709551615 | 110564135442.02295914731 | 2 | f | 36854775806 + 73709551617 | 110564135445.02295654282 | 2 | f | 36854775807 +(15 rows) + +--Testcase 88: +SELECT variance((fields->>'c3')::bigint)-5*min((fields->>'c3')::bigint)-1, every((fields->>'c5')::bool <> true), max((fields->>'c3')::bigint+4.56)*3-min((fields->>'c3')::bigint), count((fields->>'c3')::bigint)-4 from sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1,2,3,4; + ?column? | every | ?column? | ?column? +-------------------------+-------+----------+---------- + -5.00000000000000000000 | f | 21.68 | -1 +(1 row) + +--Testcase 89: +SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3')::bigint)/3-(fields->>'c3')::bigint, min((fields->>'c3')::bigint)+(fields->>'c3')::bigint/4, (fields->>'c5')::bool c5 from sctbl3 GROUP BY fields->>'c3', fields->>'c3', fields->>'c5' ORDER BY 1,2,3,4,5; + ?column? | ?column? | ?column? | ?column? | c5 +--------------+--------------+-------------------------+--------------+---- + -36854775838 | -36854775818 | 24569850538.66666667 | -46068469760 | t + -36854775837 | -36854775817 | 24569850538.00000000 | -46068469758 | f + -35 | -15 | 3.3333333333333333 | -6 | t + -34 | -14 | 2.6666666666666667 | -5 | t + -33 | -13 | 2.00000000000000000000 | -3 | t + -32 | -12 | 1.33333333333333333333 | -2 | f + -31 | -11 | 0.66666666666666666667 | -1 | f + -30 | -10 | 0.00000000000000000000 | 0 | f + -29 | -9 | -0.66666666666666666667 | 1 | t + -28 | -8 | -1.33333333333333333333 | 2 | t + -27 | -7 | -2.00000000000000000000 | 3 | f + -26 | -6 | -2.6666666666666667 | 5 | f + -25 | -5 | -3.3333333333333333 | 6 | f + 36854775776 | 36854775796 | -24569850537.33333333 | 46068469757 | f + 36854775777 | 36854775797 | -24569850538.00000000 | 46068469758 | f +(15 rows) + +---------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- +-- Update data +:RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS; +--Testcase 202: +drop view if exists view_sctbl3 ; +--Testcase 203: +drop foreign table if exists sctbl3; +--Testcase 204: +CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1'); +-- Select all data with condition and combine clause +--Testcase 90: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5; + time | t1 | c1 | c2 | c3 | c4 | c5 +-------------------------------+----------+----+-----------------------------------+----+--------+---- + 2020-01-11 01:00:00+00 | | | Change our locale from $ to ¥ in | 3 | 30.631 | f + 2020-01-10 01:00:00+00 | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t + 2020-01-09 01:00:00+00 | | | Which started out as a kind | 1 | 10.746 | t + 1970-01-01 00:00:04.343314+00 | "3gìvậy" | f | lagi ngopo | 1 | 1.024 | t +(4 rows) + +--Testcase 91: +SELECT * FROM sctbl3 WHERE EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint != 40.772) ORDER BY tags->>'t1'; + time | tags | fields +-------------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------- + 1970-01-01 00:00:00+00 | {"t1": "-2323.54454"} | {"c1": "true", "c2": "Tôi không biết", "c3": "32", "c4": "78.14", "c5": "false"} + 1970-01-01 00:00:04.343314+00 | {"t1": "\"3gìvậy\""} | {"c1": "false", "c2": "lagi ngopo", "c3": "1", "c4": "1.024", "c5": "true"} + 1874-12-07 18:40:00+00 | {"t1": "'afefea'"} | {"c1": "false", "c2": "Qué estás haciendo", "c3": "0", "c4": "2000000000000", "c5": "true"} + 1969-12-22 20:42:30+00 | {"t1": "faefek"} | {"c1": "true", "c2": "change for new change", "c3": "34", "c4": "-74", "c5": "false"} + 2020-01-05 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ", "c3": "-3", "c4": "-30.756", "c5": "true"} + 2020-01-06 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "`~!@#$%^&*()_+=-{}[]|:;<>?/.", "c3": "-2", "c4": "-20.56", "c5": "false"} + 2020-01-07 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "0123456789", "c3": "-1", "c4": "-10.746", "c5": "false"} + 2020-01-08 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "In Bulgarian it is desirable", "c3": "0", "c4": "0.774", "c5": "false"} + 2020-01-09 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "Which started out as a kind", "c3": "1", "c4": "10.746", "c5": "true"} + 2020-01-10 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "Canada Denmark Turkey Yemen Tokyo", "c3": "2", "c4": "20.312", "c5": "true"} + 2020-01-11 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "Change our locale from $ to ¥ in", "c3": "3", "c4": "30.631", "c5": "false"} + 2020-01-12 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "Chúc mừng năm mới 2021", "c3": "4", "c4": "40.772", "c5": "false"} + 2020-01-13 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "$", "c3": "5", "c4": "50.188", "c5": "false"} + 2262-04-11 23:47:16.854776+00 | {"t1": null} | {"c1": null, "c2": "ăâđêôơưdêđêdờenờíìờẹ", "c3": "36854775806", "c4": "-1.78e+68", "c5": "false"} + 1677-09-21 00:12:43.145224+00 | {"t1": null} | {"c1": null, "c2": "^%(@#%^(@#%&@#)%^)!^%)!)%", "c3": "-36854775808", "c4": "1.79e+68", "c5": "true"} + 2262-04-11 23:47:16.854776+00 | {"t1": null} | {"c1": null, "c2": "敷ヘカウ告政ヨハツヤ消70者32精楽ざ", "c3": "36854775807", "c4": "-1.79e+68", "c5": "false"} + 1677-09-21 00:12:43.145224+00 | {"t1": null} | {"c1": null, "c2": "べ員葉コ番告7次ノヌ従援かやじり図安ヨ", "c3": "-36854775807", "c4": "1.78e+68", "c5": "false"} + 2020-01-03 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ", "c3": "-5", "c4": "-50.232", "c5": "true"} + 2020-01-04 01:00:00+00 | {"t1": null} | {"c1": null, "c2": "色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見", "c3": "-4", "c4": "-40.652", "c5": "true"} +(19 rows) + +--Testcase 92: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; + time | t1 | c1 | c2 | c3 | c4 | c5 +-------------------------------+-------------+----+-----------------------------------------------------------------------+--------------+---------------+---- + 2262-04-11 23:47:16.854776+00 | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f + 2020-01-12 01:00:00+00 | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f + 2020-01-10 01:00:00+00 | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t + 2020-01-08 01:00:00+00 | | | In Bulgarian it is desirable | 0 | 0.774 | f + 2020-01-06 01:00:00+00 | | | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f + 2020-01-04 01:00:00+00 | | | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t + 1970-01-01 00:00:00+00 | -2323.54454 | t | Tôi không biết | 32 | 78.14 | f + 1969-12-22 20:42:30+00 | faefek | t | change for new change | 34 | -74 | f + 1874-12-07 18:40:00+00 | 'afefea' | f | Qué estás haciendo | 0 | 2000000000000 | t + 1677-09-21 00:12:43.145224+00 | | | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t +(10 rows) + +--Testcase 93: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint=40.772) ORDER BY 1 DESC,2 ASC,3 DESC,4; + time | t1 | c1 | c2 | c3 | c4 | c5 +-------------------------------+-------------+----+----------------------------------------------------------------------------------+--------------+---------------+---- + 2262-04-11 23:47:16.854776+00 | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f + 2262-04-11 23:47:16.854776+00 | | | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f + 2020-01-13 01:00:00+00 | | | $ | 5 | 50.188 | f + 2020-01-12 01:00:00+00 | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f + 2020-01-11 01:00:00+00 | | | Change our locale from $ to ¥ in | 3 | 30.631 | f + 2020-01-10 01:00:00+00 | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t + 2020-01-09 01:00:00+00 | | | Which started out as a kind | 1 | 10.746 | t + 2020-01-08 01:00:00+00 | | | In Bulgarian it is desirable | 0 | 0.774 | f + 2020-01-07 01:00:00+00 | | | 0123456789 | -1 | -10.746 | f + 2020-01-06 01:00:00+00 | | | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f + 2020-01-05 01:00:00+00 | | | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t + 2020-01-04 01:00:00+00 | | | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t + 2020-01-03 01:00:00+00 | | | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t + 1970-01-01 00:00:04.343314+00 | "3gìvậy" | f | lagi ngopo | 1 | 1.024 | t + 1970-01-01 00:00:00+00 | -2323.54454 | t | Tôi không biết | 32 | 78.14 | f + 1969-12-22 20:42:30+00 | faefek | t | change for new change | 34 | -74 | f + 1874-12-07 18:40:00+00 | 'afefea' | f | Qué estás haciendo | 0 | 2000000000000 | t + 1677-09-21 00:12:43.145224+00 | | | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t + 1677-09-21 00:12:43.145224+00 | | | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | 1.78e+68 | f +(19 rows) + +--Testcase 94: +SELECT * FROM sctbl3 WHERE fields->>'c2' IS NULL OR tags->>'t1' LIKE 'afefea' ORDER BY (fields->>'c1')::bool, fields->>'c2'; + time | tags | fields +------+------+-------- +(0 rows) + +--Testcase 95: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2' IS NOT NULL ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | t1 | c1 | c2 | c3 | c4 | c5 +-------------------------------+----+----+------------------------------------+-------------+-----------+---- + 2262-04-11 23:47:16.854776+00 | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f + 2262-04-11 23:47:16.854776+00 | | | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f + 2020-01-13 01:00:00+00 | | | $ | 5 | 50.188 | f + 2020-01-12 01:00:00+00 | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f + 2020-01-11 01:00:00+00 | | | Change our locale from $ to ¥ in | 3 | 30.631 | f +(5 rows) + +--Testcase 96: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT (fields->>'c3')::bigint=5 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | t1 | c1 | c2 | c3 | c4 | c5 +-------------------------------+----+----+------------------------------------+-------------+-----------+---- + 2262-04-11 23:47:16.854776+00 | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f + 2262-04-11 23:47:16.854776+00 | | | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f + 2020-01-12 01:00:00+00 | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f + 2020-01-11 01:00:00+00 | | | Change our locale from $ to ¥ in | 3 | 30.631 | f + 2020-01-10 01:00:00+00 | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t +(5 rows) + +-- Select aggregate function and specific column from original table +--Testcase 97: +SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, max(tags->>'t1'), sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY tags->>'t1', (fields->>'c1')::bool, (fields->>'c3')::bigint, fields->>'c2' ORDER BY 1; + t1 | c1 | max | sum | sum +-------------+----+-------------+--------------+-------------- + -2323.54454 | t | -2323.54454 | 32 | 32 + "3gìvậy" | f | "3gìvậy" | 1 | 1 + 'afefea' | f | 'afefea' | 0 | 0 + faefek | t | faefek | 34 | 34 + | | | -36854775808 | -36854775808 + | | | -36854775807 | -36854775807 + | | | -5 | -5 + | | | -4 | -4 + | | | -3 | -3 + | | | -2 | -2 + | | | -1 | -1 + | | | 0 | 0 + | | | 1 | 1 + | | | 2 | 2 + | | | 3 | 3 + | | | 4 | 4 + | | | 5 | 5 + | | | 36854775806 | 36854775806 + | | | 36854775807 | 36854775807 +(19 rows) + +--Testcase 98: +SELECT sum((fields->>'c3')::bigint), tags->>'t1' t1, sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), fields->>'c1' c1 FROM sctbl3 GROUP BY fields->>'c1', fields->>'c3', fields->>'c3', tags->>'t1' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; + sum | t1 | sum | c1 +-----+----+-----+---- +(0 rows) + +--Testcase 99: +SELECT stddev((fields->>'c3')::bigint), (fields->>'c1')::bool c1, stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), tags->>'t1' t1 FROM sctbl3 GROUP BY time, fields->>'c3', tags->>'t1', fields->>'c1' ORDER BY tags->>'t1' ASC,fields->>'c1' DESC; + stddev | c1 | stddev | t1 +--------+----+--------+------------- + | t | | -2323.54454 + | f | | "3gìvậy" + | f | | 'afefea' + | t | | faefek + | | | + | | | + | | | + | | | + | | | + | | | + | | | + | | | + | | | + | | | + | | | + | | | + | | | + | | | + | | | +(19 rows) + +--Testcase 100: +SELECT every((fields->>'c3')::bigint>0), (fields->>'c1')::bool c1, every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time, fields->>'c1', fields->>'c3' ORDER BY (fields->>'c1')::bool ASC, (fields->>'c3')::bigint DESC; + every | c1 | every +-------+----+------- + t | f | f + f | f | f + t | t | f + t | t | f + t | | f + t | | f + t | | f + t | | f + t | | f + t | | f + t | | f + f | | f + f | | f + f | | f + f | | f + f | | f + f | | f + f | | f + f | | f +(19 rows) + +--Testcase 101: +SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and((fields->>'c1')::bool), bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; + ?column? | bool_and | bool_and | ?column? +----------+----------+----------+---------- + t | f | t | f +(1 row) + +--Testcase 102: +SELECT bool_or((fields->>'c4')::double precision <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c1')::bool), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, tags->>'t1' t1 from sctbl3 GROUP BY (fields->>'c1')::bool, tags->>'t1', fields->>'c2', (fields->>'c3')::bigint ORDER BY (fields->>'c1')::bool, tags->>'t1'; + ?column? | bool_or | bool_or | ?column? | t1 +----------+---------+---------+----------+------------- + t | t | f | t | "3gìvậy" + t | t | f | t | 'afefea' + t | t | t | f | -2323.54454 + t | t | t | f | faefek + t | t | | f | + t | t | | t | + t | t | | f | + t | t | | t | + t | t | | f | + t | t | | t | + t | t | | t | + t | t | | f | + t | t | | t | + t | t | | t | + t | t | | t | + t | t | | f | + t | t | | t | + t | t | | t | + t | t | | t | +(19 rows) + +-- Select combine aggregate via operation +--Testcase 103: +SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2, max(tags->>'t1') FROM sctbl3 GROUP BY fields->>'c2', tags->>'t1'; + max | max | ?column? | ?column? | max | ?column? | max +-------------------------------+--------------+--------------+--------------+--------------+--------------+------------- + 1970-01-01 00:00:00+00 | 32 | 42 | 22 | 32 | 16 | -2323.54454 + 1677-09-21 00:12:43.145224+00 | -36854775807 | -36854775797 | -36854775817 | -36854775807 | -18427387903 | + 1970-01-01 00:00:04.343314+00 | 1 | 11 | -9 | 1 | 0 | "3gìvậy" + 2020-01-03 01:00:00+00 | -5 | 5 | -15 | -5 | -2 | + 2020-01-07 01:00:00+00 | -1 | 9 | -11 | -1 | 0 | + 2020-01-11 01:00:00+00 | 3 | 13 | -7 | 3 | 1 | + 1677-09-21 00:12:43.145224+00 | -36854775808 | -36854775798 | -36854775818 | -36854775808 | -18427387904 | + 2020-01-09 01:00:00+00 | 1 | 11 | -9 | 1 | 0 | + 2262-04-11 23:47:16.854776+00 | 36854775807 | 36854775817 | 36854775797 | 36854775807 | 18427387903 | + 2020-01-06 01:00:00+00 | -2 | 8 | -12 | -2 | -1 | + 2020-01-04 01:00:00+00 | -4 | 6 | -14 | -4 | -2 | + 1969-12-22 20:42:30+00 | 34 | 44 | 24 | 34 | 17 | faefek + 2020-01-10 01:00:00+00 | 2 | 12 | -8 | 2 | 1 | + 2020-01-12 01:00:00+00 | 4 | 14 | -6 | 4 | 2 | + 2020-01-13 01:00:00+00 | 5 | 15 | -5 | 5 | 2 | + 2262-04-11 23:47:16.854776+00 | 36854775806 | 36854775816 | 36854775796 | 36854775806 | 18427387903 | + 2020-01-08 01:00:00+00 | 0 | 10 | -10 | 0 | 0 | + 2020-01-05 01:00:00+00 | -3 | 7 | -13 | -3 | -1 | + 1874-12-07 18:40:00+00 | 0 | 10 | -10 | 0 | 0 | 'afefea' +(19 rows) + +--Testcase 104: +SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg((fields->>'c1')::bool), array_agg(tags->>'t1'), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::boolean != true ORDER BY 1 DESC, 2, 3; + array_agg | array_agg | array_agg | array_agg | array_agg +----------------------+-------------------------------------+----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {-1,0,0,1,2,2,16,17} | {t,t,NULL,NULL,NULL,NULL,NULL,NULL} | {faefek,-2323.54454,NULL,NULL,NULL,NULL,NULL,NULL} | {"`~!@#$%^&*()_+=-{}[]|:;<>?/.",$,0123456789,"change for new change","Change our locale from $ to ¥ in","Chúc mừng năm mới 2021","In Bulgarian it is desirable","Tôi không biết"} | {"1969-12-22 20:42:30+00","1970-01-01 00:00:00+00","2020-01-06 01:00:00+00","2020-01-07 01:00:00+00","2020-01-08 01:00:00+00","2020-01-11 01:00:00+00","2020-01-12 01:00:00+00","2020-01-13 01:00:00+00"} +(1 row) + +--Testcase 105: +SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15) FROM sctbl3 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; + bit_and | bit_and +---------+--------- +(0 rows) + +--Testcase 106: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; + bit_or | bit_or +--------+-------- + -5 | -2 + -4 | -2 + -3 | -1 + -2 | -1 + -1 | 0 + 0 | 0 + 0 | 0 + 1 | 0 + 1 | 0 + 2 | 1 + 3 | 1 + 4 | 2 + 5 | 2 + 32 | 16 + 34 | 17 +(15 rows) + +--Testcase 107: +SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c1')::bool), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3; + bool_and | bool_and | bool_and | bool_and +----------+----------+----------+---------- + t | f | f | f + t | t | f | f + t | t | f | f + t | | f | f + t | | f | f + t | | f | f + t | | f | f + f | f | f | f + f | | t | f + f | | t | f + f | | t | f + f | | t | f + f | | t | f +(13 rows) + +--Testcase 108: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint=40.772) GROUP BY tags->>'t1', fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 8; + max | max | max +-----+-----+----- +(0 rows) + +--Testcase 109: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE fields->>'c2' IS NOT NULL GROUP BY fields->>'c3', fields->>'c1' HAVING min((fields->>'c3')::bigint)>=min((fields->>'c3')::bigint) ORDER BY (fields->>'c1')::bool DESC, 2, 3; + max | max | max +-------------------------------+----------------+-------------- + 1677-09-21 00:12:43.145224+00 | -18427387904.0 | -36854775798 + 1677-09-21 00:12:43.145224+00 | -18427387903.5 | -36854775797 + 2020-01-03 01:00:00+00 | -2.5 | 5 + 2020-01-04 01:00:00+00 | -2.0 | 6 + 2020-01-05 01:00:00+00 | -1.5 | 7 + 2020-01-06 01:00:00+00 | -1.0 | 8 + 2020-01-07 01:00:00+00 | -0.5 | 9 + 2020-01-08 01:00:00+00 | 0.0 | 10 + 2020-01-09 01:00:00+00 | 0.5 | 11 + 2020-01-10 01:00:00+00 | 1.0 | 12 + 2020-01-11 01:00:00+00 | 1.5 | 13 + 2020-01-12 01:00:00+00 | 2.0 | 14 + 2020-01-13 01:00:00+00 | 2.5 | 15 + 2262-04-11 23:47:16.854776+00 | 18427387903.0 | 36854775816 + 2262-04-11 23:47:16.854776+00 | 18427387903.5 | 36854775817 + 1970-01-01 00:00:00+00 | 16.0 | 42 + 1969-12-22 20:42:30+00 | 17.0 | 44 + 1874-12-07 18:40:00+00 | 0.0 | 10 + 1970-01-01 00:00:04.343314+00 | 0.5 | 11 +(19 rows) + +--Testcase 110: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min(tags->>'t1') FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 8; + ?column? | min | min +----------+-----+----- +(0 rows) + +--Testcase 111: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY time ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; + ?column? | min +-------------------------------+-------------- + 1677-10-01 00:12:43.145224+00 | -73709551616 + 2020-01-13 01:00:00+00 | -10 + 2020-01-14 01:00:00+00 | -8 + 2020-01-15 01:00:00+00 | -6 + 2020-01-16 01:00:00+00 | -4 +(5 rows) + +--Testcase 112: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, tags->>'t1', (fields->>'c4')::double precision HAVING max((fields->>'c3')::bigint)>min((fields->>'c4')::double precision) ORDER BY tags->>'t1' ASC LIMIT 5 OFFSET 0; + ?column? | min +------------------------+----- + 2020-01-16 01:00:00+00 | -4 + 2020-01-17 01:00:00+00 | -2 +(2 rows) + +-- Select from sub query +--Testcase 113: +SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3; + time | c2 +-------------------------------+---------------------------------------------------------------------------------- + 1874-12-07 18:40:00+00 | Qué estás haciendo + 1969-12-22 20:42:30+00 | change for new change + 1970-01-01 00:00:00+00 | Tôi không biết + 1970-01-01 00:00:04.343314+00 | lagi ngopo + 2020-01-03 01:00:00+00 | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ + 2020-01-04 01:00:00+00 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 + 2020-01-05 01:00:00+00 | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ + 2020-01-06 01:00:00+00 | `~!@#$%^&*()_+=-{}[]|:;<>?/. + 2020-01-07 01:00:00+00 | 0123456789 + 2020-01-08 01:00:00+00 | In Bulgarian it is desirable + 2020-01-09 01:00:00+00 | Which started out as a kind + 2020-01-10 01:00:00+00 | Canada Denmark Turkey Yemen Tokyo + 2020-01-11 01:00:00+00 | Change our locale from $ to ¥ in + 2020-01-12 01:00:00+00 | Chúc mừng năm mới 2021 + 2020-01-13 01:00:00+00 | $ +(15 rows) + +--Testcase 114: +SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool = true ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY 1; + max | max | ?column? | ?column? | max | ?column? +------------------------+-----+----------+----------+-----+---------- + 1969-12-22 20:42:30+00 | 34 | 44 | 24 | 34 | 17 + 1970-01-01 00:00:00+00 | 32 | 42 | 22 | 32 | 16 +(2 rows) + +--Testcase 115: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM ( SELECT * FROM sctbl3 WHERE tags->>'t1' LIKE 't1là' ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; + stddev | stddev +--------+-------- +(0 rows) + +--Testcase 116: +SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,tags->>'t1' DESC; + sqrt | sqrt +--------------------+-------------------- + 0 | 0 + 0 | 0 + 1 | 1 + 1 | 1 + 1 | 1 + 1.4142135623730951 | 1.4142135623730951 + 1.4142135623730951 | 1.4142135623730951 + 1.7320508075688772 | 1.7320508075688772 + 1.7320508075688772 | 1.7320508075688772 + 2 | 2 + 2 | 2 + 2.23606797749979 | 2.23606797749979 + 2.23606797749979 | 2.23606797749979 + 5.656854249492381 | 5.656854249492381 + 5.830951894845301 | 5.830951894845301 +(15 rows) + +--Testcase 117: +SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, (fields->>'c3')::bigint c3 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE fields->>'c2' LIKE 'C%' ORDER BY tags->>'t1' DESC,fields->>'c2' ASC LIMIT 25 OFFSET 0; + t1 | c1 | c3 +----+----+---- + | | 2 + | | 3 + | | 4 +(3 rows) + +--Testcase 118: +SELECT (fields->>'c1')::bool c1, tags->>'t1' t1, (fields->>'c4')::double precision c4 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c4')::double precision>-1000 OR (fields->>'c3')::bigint<1000 ) AS tb3 WHERE NOT EXISTS (SELECT fields->>'c2' FROM sctbl3 WHERE fields->>'c2'='abcd') ORDER BY 1 DESC,2 ASC; + c1 | t1 | c4 +----+-------------+--------------- + | | 50.188 + | | 1.78e+68 + | | 20.312 + | | 30.631 + | | 40.772 + | | 1.79e+68 + | | -50.232 + | | -40.652 + | | -30.756 + | | -20.56 + | | -10.746 + | | 0.774 + | | 10.746 + t | -2323.54454 | 78.14 + t | faefek | -74 + f | "3gìvậy" | 1.024 + f | 'afefea' | 2000000000000 +(17 rows) + +--Testcase 119: +SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool != TRUE ) AS tb3 WHERE (fields->>'c3')::bigint NOT IN (345245, 1000, -132, -254) ORDER BY 1 DESC,2 ASC,3 LIMIT 5; + t1 | c1 | c2 +----------+----+-------------------- + 'afefea' | f | Qué estás haciendo + "3gìvậy" | f | lagi ngopo +(2 rows) + +--Testcase 120: +SELECT (fields->>'c1')::bool c1, fields->>'c2' c2, (fields->>'c4')::double precision c4 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY tags->>'t1'; + c1 | c2 | c4 +----+-----------------------------------------------------------------------+--------------- + t | Tôi không biết | 78.14 + f | Qué estás haciendo | 2000000000000 + t | change for new change | -74 + | In Bulgarian it is desirable | 0.774 + | Canada Denmark Turkey Yemen Tokyo | 20.312 + | Chúc mừng năm mới 2021 | 40.772 + | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -40.652 + | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -20.56 +(8 rows) + +--Testcase 121: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10), max(tags->>'t1') FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE true GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3 LIMIT 25 OFFSET 8; + max | max | max | max +-------------------------------+------+-----+------------- + 2020-01-05 01:00:00+00 | -1.5 | 7 | + 2020-01-04 01:00:00+00 | -2.0 | 6 | + 2020-01-03 01:00:00+00 | -2.5 | 5 | + 1970-01-01 00:00:04.343314+00 | 0.5 | 11 | "3gìvậy" + 1970-01-01 00:00:00+00 | 16.0 | 42 | -2323.54454 + 1969-12-22 20:42:30+00 | 17.0 | 44 | faefek + 1874-12-07 18:40:00+00 | 0.0 | 10 | 'afefea' +(7 rows) + +-- Select from view +--Testcase 122: +create view view_sctbl3 as select * from sctbl3 where ((fields->>'c1')::bool != false); +--Testcase 123: +SELECT stddev((fields->>'c3')::bigint), tags->>'t1' t1, stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time, tags->>'t1' ORDER BY 1 ASC,2 DESC; + stddev | t1 | stddev +--------+-------------+-------- + | faefek | + | -2323.54454 | +(2 rows) + +--Testcase 124: +SELECT tags->>'t1' t1 , max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool=false), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE time <= '2000-1-3 20:30:51' GROUP BY fields->>'c2', tags->>'t1' ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25; + t1 | max | count | exists | exists +-------------+-----+-------+--------+-------- + -2323.54454 | 32 | 1 | t | t + faefek | 34 | 1 | t | t +(2 rows) + +--Testcase 125: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c5')::bool HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; + bit_or | bit_or +--------+-------- + 34 | 17 +(1 row) + +--Testcase 126: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10), max(tags->>'t1') FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; + max | max | max | max +------------------------+------+-----+------------- + 1970-01-01 00:00:00+00 | 16.0 | 42 | -2323.54454 + 1969-12-22 20:42:30+00 | 17.0 | 44 | faefek +(2 rows) + +--Testcase 127: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c1' ORDER BY 1 DESC, 2, 3; + sum | sum | ?column? +-----+-----+---------- + 132 | 132 | 61 +(1 row) + +--Testcase 128: +SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50 FROM view_sctbl3 GROUP BY (fields->>'c1')::bool, (fields->>'c3')::bigint HAVING (fields->>'c1')::bool=true AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; + avg | ?column? +------------------------+---------- + 0.00000000000000000000 | f + 0.00000000000000000000 | f +(2 rows) + +--Testcase 129: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; + bit_or | bit_or +--------+-------- + 32 | 16 + 34 | 17 +(2 rows) + +--Testcase 130: +SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY fields->>'c1' ORDER BY 1 DESC, 2, 3; + bool_and | bool_and | bool_and +----------+----------+---------- + t | f | f +(1 row) + +--Testcase 131: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM view_sctbl3 WHERE fields->>'c2'<='$' OR (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 20; + time | t1 | c1 | c2 | c3 | c4 | c5 +------------------------+-------------+----+-----------------------+----+-------+---- + 1970-01-01 00:00:00+00 | -2323.54454 | t | Tôi không biết | 32 | 78.14 | f + 1969-12-22 20:42:30+00 | faefek | t | change for new change | 34 | -74 | f +(2 rows) + +--Testcase 132: +SELECT * FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3; + time | tags | fields +------------------------+-----------------------+--------------------------------------------------------------------------------------- + 1970-01-01 00:00:00+00 | {"t1": "-2323.54454"} | {"c1": "true", "c2": "Tôi không biết", "c3": "32", "c4": "78.14", "c5": "false"} + 1969-12-22 20:42:30+00 | {"t1": "faefek"} | {"c1": "true", "c2": "change for new change", "c3": "34", "c4": "-74", "c5": "false"} +(2 rows) + +--Testcase 133: +SELECT * FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY (fields->>'c1')::bool ASC LIMIT 5; + time | tags | fields +------------------------+-----------------------+--------------------------------------------------------------------------------------- + 1969-12-22 20:42:30+00 | {"t1": "faefek"} | {"c1": "true", "c2": "change for new change", "c3": "34", "c4": "-74", "c5": "false"} + 1970-01-01 00:00:00+00 | {"t1": "-2323.54454"} | {"c1": "true", "c2": "Tôi không biết", "c3": "32", "c4": "78.14", "c5": "false"} +(2 rows) + +--Testcase 134: +SELECT * FROM view_sctbl3 WHERE true ORDER BY (fields->>'c1')::bool DESC,tags->>'t1' LIMIT 5; + time | tags | fields +------------------------+-----------------------+--------------------------------------------------------------------------------------- + 1970-01-01 00:00:00+00 | {"t1": "-2323.54454"} | {"c1": "true", "c2": "Tôi không biết", "c3": "32", "c4": "78.14", "c5": "false"} + 1969-12-22 20:42:30+00 | {"t1": "faefek"} | {"c1": "true", "c2": "change for new change", "c3": "34", "c4": "-74", "c5": "false"} +(2 rows) + +--Testcase 135: +SELECT * FROM view_sctbl3 WHERE (fields->>'c3')::bigint NOT IN (-1,1,0,2,-2) ORDER BY tags->>'t1' DESC; + time | tags | fields +------------------------+-----------------------+--------------------------------------------------------------------------------------- + 1969-12-22 20:42:30+00 | {"t1": "faefek"} | {"c1": "true", "c2": "change for new change", "c3": "34", "c4": "-74", "c5": "false"} + 1970-01-01 00:00:00+00 | {"t1": "-2323.54454"} | {"c1": "true", "c2": "Tôi không biết", "c3": "32", "c4": "78.14", "c5": "false"} +(2 rows) + +-- Select many target aggregate in one query and combine with (fields->>'c1')::bool +--Testcase 136: +SELECT upper(fields->>'c2'), lower(fields->>'c2'), lower(tags->>'t1') FROM sctbl3 ORDER BY 1 ASC,2 DESC,3; + upper | lower | lower +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------+------------- + `~!@#$%^&*()_+=-{}[]|:;<>?/. | `~!@#$%^&*()_+=-{}[]|:;<>?/. | + ^%(@#%^(@#%&@#)%^)!^%)!)% | ^%(@#%^(@#%&@#)%^)!^%)!)% | + $ | $ | + กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | + いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | + 0123456789 | 0123456789 | + ĂÂĐÊÔƠƯDÊĐÊDỜENỜÍÌỜẸ | ăâđêôơưdêđêdờenờíìờẹ | + CANADA DENMARK TURKEY YEMEN TOKYO | canada denmark turkey yemen tokyo | + CHANGE FOR NEW CHANGE | change for new change | faefek + CHANGE OUR LOCALE FROM $ TO ¥ IN | change our locale from $ to ¥ in | + CHÚC MỪNG NĂM MỚI 2021 | chúc mừng năm mới 2021 | + IN BULGARIAN IT IS DESIRABLE | in bulgarian it is desirable | + LAGI NGOPO | lagi ngopo | "3gìvậy" + QUÉ ESTÁS HACIENDO | qué estás haciendo | 'afefea' + TÔI KHÔNG BIẾT | tôi không biết | -2323.54454 + WHICH STARTED OUT AS A KIND | which started out as a kind | + べ員葉コ番告7次ノヌ従援かやじり図安ヨ | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | + 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | + 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | +(19 rows) + +--Testcase 137: +SELECT max(time), min((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count(*), count(tags->>'t1'), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC,2 ASC,3 DESC,4,5; + max | min | sum | count | count | avg +------------------------+-----+-----+-------+-------+--------------------- + 1970-01-01 00:00:00+00 | 32 | 32 | 1 | 1 | 32.0000000000000000 + 1969-12-22 20:42:30+00 | 34 | 34 | 1 | 1 | 34.0000000000000000 +(2 rows) + +--Testcase 138: +SELECT (fields->>'c3')::bigint*(random()<=1)::int, (random()<=1)::int*(25-10)+10 FROM sctbl3 ORDER BY tags->>'t1' ASC,fields->>'c1' DESC; + ?column? | ?column? +--------------+---------- + 32 | 25 + 1 | 25 + 0 | 25 + 34 | 25 + -3 | 25 + -2 | 25 + -1 | 25 + 0 | 25 + 1 | 25 + 2 | 25 + 3 | 25 + 4 | 25 + 5 | 25 + 36854775806 | 25 + -36854775808 | 25 + 36854775807 | 25 + -36854775807 | 25 + -5 | 25 + -4 | 25 +(19 rows) + +--Testcase 139: +SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; + max | count | exists | exists +-----+-------+--------+-------- +(0 rows) + +--Testcase 140: +SELECT sum((fields->>'c3')::bigint) filter (WHERE (fields->>'c1')::bool = true), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint >0 AND (fields->>'c3')::bigint<100) FROM sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; + sum | avg +-----+--------------------- + 66 | 15.6000000000000000 +(1 row) + +--Testcase 141: +SELECT 'abcd', 1234, (fields->>'c3')::bigint/2, 10+(fields->>'c3')::bigint * (random()<=1)::int * 0.5 FROM ( SELECT * FROM sctbl3 WHERE tags->>'t1' LIKE 't1' ) AS sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; + ?column? | ?column? | ?column? | ?column? +----------+----------+----------+---------- +(0 rows) + +--Testcase 142: +SELECT max((fields->>'c3')::bigint), min(tags->>'t1'), avg((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count((fields->>'c3')::bigint) FROM sctbl3 WHERE time > '1970-01-10 00:00:00' AND time < '2020-01-15 00:00:00' GROUP BY influx_time(time, interval '1d', interval '10h30m') ORDER BY 1,2,3,4,5; +ERROR: stub influx_time(timestamp with time zone, interval, interval) is called +CONTEXT: PL/pgSQL function influx_time(timestamp with time zone,interval,interval) line 3 at RAISE +--Testcase 143: +SELECT min(time), max(time), count(time) FROM sctbl3 GROUP BY fields->>'c3' ORDER BY 1,2,3; + min | max | count +-------------------------------+-------------------------------+------- + 1677-09-21 00:12:43.145224+00 | 1677-09-21 00:12:43.145224+00 | 1 + 1677-09-21 00:12:43.145224+00 | 1677-09-21 00:12:43.145224+00 | 1 + 1874-12-07 18:40:00+00 | 2020-01-08 01:00:00+00 | 2 + 1969-12-22 20:42:30+00 | 1969-12-22 20:42:30+00 | 1 + 1970-01-01 00:00:00+00 | 1970-01-01 00:00:00+00 | 1 + 1970-01-01 00:00:04.343314+00 | 2020-01-09 01:00:00+00 | 2 + 2020-01-03 01:00:00+00 | 2020-01-03 01:00:00+00 | 1 + 2020-01-04 01:00:00+00 | 2020-01-04 01:00:00+00 | 1 + 2020-01-05 01:00:00+00 | 2020-01-05 01:00:00+00 | 1 + 2020-01-06 01:00:00+00 | 2020-01-06 01:00:00+00 | 1 + 2020-01-07 01:00:00+00 | 2020-01-07 01:00:00+00 | 1 + 2020-01-10 01:00:00+00 | 2020-01-10 01:00:00+00 | 1 + 2020-01-11 01:00:00+00 | 2020-01-11 01:00:00+00 | 1 + 2020-01-12 01:00:00+00 | 2020-01-12 01:00:00+00 | 1 + 2020-01-13 01:00:00+00 | 2020-01-13 01:00:00+00 | 1 + 2262-04-11 23:47:16.854776+00 | 2262-04-11 23:47:16.854776+00 | 1 + 2262-04-11 23:47:16.854776+00 | 2262-04-11 23:47:16.854776+00 | 1 +(17 rows) + +--Testcase 144: +SELECT count((fields->>'c3')::bigint), max((fields->>'c3')::bigint), sum((fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3' HAVING(max(fields->>'c2')!='change for new change' and count(fields->>'c2')>0) ORDER BY 1,2,3; + count | max | sum +-------+--------------+-------------- + 1 | -36854775808 | -36854775808 + 1 | -36854775807 | -36854775807 + 1 | -5 | -5 + 1 | -4 | -4 + 1 | -3 | -3 + 1 | -2 | -2 + 1 | -1 | -1 + 1 | 2 | 2 + 1 | 3 | 3 + 1 | 4 | 4 + 1 | 5 | 5 + 1 | 32 | 32 + 1 | 36854775806 | 36854775806 + 1 | 36854775807 | 36854775807 + 2 | 0 | 0 + 2 | 1 | 2 +(16 rows) + +--Testcase 145: +SELECT array_agg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg((fields->>'c3')::bigint/(fields->>'c3')::bigint*(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint+(fields->>'c3')::bigint/(fields->>'c3')::bigint)*-1000), array_agg((fields->>'c3')::bigint*(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)+9999999999999.998) from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint ORDER BY 1, 2, 3, 4, 5; +ERROR: bigint out of range +--Testcase 146: +SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)-0.567-avg((fields->>'c3')::bigint/3+(fields->>'c3')::bigint)+17.55435, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+45))- -9.5+2*avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint/((fields->>'c3')::bigint-10.2)*(fields->>'c3')::bigint)+0.567+avg((fields->>'c3')::bigint)*4.5+(fields->>'c3')::bigint, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+5.6))+100-(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4 limit 5; + ?column? | ?column? | ?column? | ?column? +----------------------+------------------------+------------------------------------+-------------------------- + 5.9873500000000000 | 24.5000000000000000 | 23.25930769230769230770 | 100.47169811320754716981 + 20.9873500000000000 | 3.5000000000000000 | -10.76086885245901639344 | 99.44444444444444444444 + 85994476901.98735000 | -110564327413.50000000 | -239556042741.23300000280364236800 | 101.00000000015194774295 +(3 rows) + +--Testcase 147: +SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>0.774 OR fields->>'c2' = 'Which started out as a kind' GROUP BY fields->>'c3' ORDER BY 1, 2, 3; + ?column? | ?column? | ?column? +----------+----------+------------------------------- + -4.6 | 2 | -36854775795.8000000000000000 + -4.6 | 2 | -36854775794.8000000000000000 + -4.6 | 2 | -22.8000000000000000 + -4.6 | 2 | -20.8000000000000000 + -4.6 | 2 | 6.2000000000000000 + -4.6 | 2 | 7.2000000000000000 + -4.6 | 2 | 8.2000000000000000 + -4.6 | 2 | 9.2000000000000000 + -3.6 | 4 | 6.1000000000000000 +(9 rows) + +-- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- +-- Update data +:RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS; +--Testcase 205: +drop view if exists view_sctbl3 ; +--Testcase 206: +drop foreign table if exists sctbl3; +--Testcase 207: +CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1, t2, t3, t4, t5'); +--Testcase 208: +create view view_sctbl3 as select * from sctbl3 where ((fields->>'c20')::int != 6789 OR (fields->>'c19')::double precision != -1); +-- Update data: add 5 tags and 20 fields +-- Select all data with condition and combine clause +--Testcase 148: +SELECT * FROM sctbl3 WHERE (fields->>'c6')::double precision != -1 AND (fields->>'c5')::bool != true OR (fields->>'c8')::float > 0 ORDER BY tags->>'t1' DESC,(tags->>'t2')::int ASC, (fields->>'c6')::float DESC, fields->>'c9', (fields->>'c20')::int LIMIT 5 OFFSET 0; + time | tags | fields +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1970-04-24 05:54:24.343435+00 | {"t1": "hhaffe.3fasf", "t2": "5", "t3": "413.1475", "t4": "8798i", "t5": "-86893.223E+1"} | {"c1": "true", "c2": "何してるの", "c3": "3685808", "c4": "8.7e+22", "c5": "true", "c6": "748452587", "c7": "-246455441441", "c8": "93.147895", "c9": "nospace", "c10": " aaa ", "c11": "-676", "c12": "false", "c13": "0", "c14": "19960102", "c15": "hôm nay là ngày rất rét", "c16": "11111", "c17": "false", "c18": "true", "c19": "-789456.123", "c20": "567"} + 1970-01-01 09:59:36.143464+00 | {"t1": "-4.2541", "t2": "4", "t3": "987412", "t4": "54i", "t5": "'7855.14444'"} | {"c1": "true", "c2": "ඔයා කරන්නේ කුමක් ද", "c3": "0", "c4": "-1200", "c5": "true", "c6": "32767", "c7": "7424654", "c8": "1.00007", "c9": " ", "c10": "aa a ", "c11": "-125", "c12": "false", "c13": "0", "c14": "252500", "c15": "tiếng việt có dấu", "c16": "113456", "c17": "true", "c18": "false", "c19": "-0.0000123", "c20": "-74"} +(2 rows) + +--Testcase 149: +SELECT * FROM sctbl3 WHERE NOT (fields->>'c16')::int<(fields->>'c3')::bigint ORDER BY (fields->>'c7')::float DESC, (fields->>'c8')::double precision ASC,fields->>'c9' DESC,fields->>'c10',(fields->>'c11')::bigint LIMIT 5 OFFSET 0; + time | tags | fields +-------------------------------+------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1970-04-12 17:40:00+00 | {"t1": "'tag2'", "t2": "2", "t3": "741.14", "t4": "4i", "t5": "'THisiSString'"} | {"c1": "false", "c2": "wenzani", "c3": "-98", "c4": "-2.58e+80", "c5": "true", "c6": "2147483647", "c7": "92272036855807", "c8": "-4.7854e-11", "c9": "!@#$%^&*", "c10": "a a", "c11": "32", "c12": "false", "c13": "1", "c14": "19654578", "c15": "Đây là tính năng mới của Influx", "c16": "321654", "c17": "false", "c18": "false", "c19": "-1.79e+308", "c20": "87"} + 1970-01-01 04:06:21.646135+00 | {"t1": "23223r", "t2": "3", "t3": "-74.255", "t4": "21i", "t5": "'111111'"} | {"c1": "true", "c2": "Што правиш", "c3": "-368545807", "c4": "850", "c5": "true", "c6": "-32768", "c7": "5563656565554", "c8": "-12.3456789", "c9": "special string", "c10": " a a", "c11": "-78", "c12": "false", "c13": "1", "c14": "19700101", "c15": "đây là tiếng Việt", "c16": "987987987", "c17": "true", "c18": "false", "c19": "-0.1111111", "c20": "-78"} + 1970-01-01 09:59:36.143464+00 | {"t1": "-4.2541", "t2": "4", "t3": "987412", "t4": "54i", "t5": "'7855.14444'"} | {"c1": "true", "c2": "ඔයා කරන්නේ කුමක් ද", "c3": "0", "c4": "-1200", "c5": "true", "c6": "32767", "c7": "7424654", "c8": "1.00007", "c9": " ", "c10": "aa a ", "c11": "-125", "c12": "false", "c13": "0", "c14": "252500", "c15": "tiếng việt có dấu", "c16": "113456", "c17": "true", "c18": "false", "c19": "-0.0000123", "c20": "-74"} + 1970-01-01 00:00:01.2+00 | {"t1": "'thisisatag'", "t2": "1", "t3": "7945.154", "t4": "0i", "t5": "\"thisistring\""} | {"c1": "true", "c2": "что ты делаешь", "c3": "546", "c4": "2.58e+80", "c5": "true", "c6": "-2147483648", "c7": "-32036854775808", "c8": "-78945.145441", "c9": "$$$$$&&&&&", "c10": "signle test", "c11": "8", "c12": "false", "c13": "0", "c14": "20112020", "c15": "ông là nhà văn hiện thực", "c16": "123456", "c17": "true", "c18": "false", "c19": "1.79e+308", "c20": "54"} +(4 rows) + +--Testcase 150: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE (fields->>'c20')::int > 0 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +-------------------------------+--------------+----+----------+-------+----------------+----+----------------+---------+-----------+----+-------------+-----------------+---------------+------------+-------------+------+-----+-----+----------+---------------------------------+--------+-----+-----+-------------+----- + 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 + 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 + 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 +(3 rows) + +--Testcase 151: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE NOT time>'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC,4,5; + time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +-------------------------------+--------------+----+----------+-------+----------------+----+----------------------------------------------------------------------------------+--------------+---------------+----+-------------+-----------------+---------------+----------------+-------------+------+-----+-----+----------+---------------------------------+-----------+-----+-----+-------------+----- + 2020-01-03 01:00:00+00 | | | | | | | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t | | | | | | | | | | | | | | | + 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 + 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 + 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 + 1970-01-01 04:06:21.646135+00 | 23223r | 3 | -74.255 | 21i | '111111' | t | Што правиш | -368545807 | 850 | t | -32768 | 5563656565554 | -12.3456789 | special string | a a | -78 | f | 1 | 19700101 | đây là tiếng Việt | 987987987 | t | f | -0.1111111 | -78 + 1970-01-01 00:00:04.343314+00 | "3gìvậy" | | | | | f | lagi ngopo | 1 | 1.024 | t | | | | | | | | | | | | | | | + 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 + 1970-01-01 00:00:00+00 | -2323.54454 | | | | | t | Tôi không biết | 32 | 78.14 | f | | | | | | | | | | | | | | | + 1969-12-22 20:42:30+00 | faefek | | | | | t | change for new change | 34 | -74 | f | | | | | | | | | | | | | | | + 1874-12-07 18:40:00+00 | 'afefea' | | | | | f | Qué estás haciendo | 0 | 2000000000000 | t | | | | | | | | | | | | | | | + 1677-09-21 00:12:43.145224+00 | | | | | | | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t | | | | | | | | | | | | | | | + 1677-09-21 00:12:43.145224+00 | | | | | | | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | 1.78e+68 | f | | | | | | | | | | | | | | | +(12 rows) + +--Testcase 152: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE EXISTS (SELECT fields->>'c15' FROM sctbl3 WHERE (fields->>'c19')::double precision!=40.772) ORDER BY 1 DESC,2 ASC,3 DESC,4,5; + time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +-------------------------------+--------------+----+----------+-------+----------------+----+----------------------------------------------------------------------------------+--------------+---------------+----+-------------+-----------------+---------------+----------------+-------------+------+-----+-----+----------+---------------------------------+-----------+-----+-----+-------------+----- + 2262-04-11 23:47:16.854776+00 | | | | | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f | | | | | | | | | | | | | | | + 2262-04-11 23:47:16.854776+00 | | | | | | | 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | -1.79e+68 | f | | | | | | | | | | | | | | | + 2020-01-13 01:00:00+00 | | | | | | | $ | 5 | 50.188 | f | | | | | | | | | | | | | | | + 2020-01-12 01:00:00+00 | | | | | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f | | | | | | | | | | | | | | | + 2020-01-11 01:00:00+00 | | | | | | | Change our locale from $ to ¥ in | 3 | 30.631 | f | | | | | | | | | | | | | | | + 2020-01-10 01:00:00+00 | | | | | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t | | | | | | | | | | | | | | | + 2020-01-09 01:00:00+00 | | | | | | | Which started out as a kind | 1 | 10.746 | t | | | | | | | | | | | | | | | + 2020-01-08 01:00:00+00 | | | | | | | In Bulgarian it is desirable | 0 | 0.774 | f | | | | | | | | | | | | | | | + 2020-01-07 01:00:00+00 | | | | | | | 0123456789 | -1 | -10.746 | f | | | | | | | | | | | | | | | + 2020-01-06 01:00:00+00 | | | | | | | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f | | | | | | | | | | | | | | | + 2020-01-05 01:00:00+00 | | | | | | | กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -30.756 | t | | | | | | | | | | | | | | | + 2020-01-04 01:00:00+00 | | | | | | | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t | | | | | | | | | | | | | | | + 2020-01-03 01:00:00+00 | | | | | | | いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -50.232 | t | | | | | | | | | | | | | | | + 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 + 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 + 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 + 1970-01-01 04:06:21.646135+00 | 23223r | 3 | -74.255 | 21i | '111111' | t | Што правиш | -368545807 | 850 | t | -32768 | 5563656565554 | -12.3456789 | special string | a a | -78 | f | 1 | 19700101 | đây là tiếng Việt | 987987987 | t | f | -0.1111111 | -78 + 1970-01-01 00:00:04.343314+00 | "3gìvậy" | | | | | f | lagi ngopo | 1 | 1.024 | t | | | | | | | | | | | | | | | + 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 + 1970-01-01 00:00:00+00 | -2323.54454 | | | | | t | Tôi không biết | 32 | 78.14 | f | | | | | | | | | | | | | | | + 1969-12-22 20:42:30+00 | faefek | | | | | t | change for new change | 34 | -74 | f | | | | | | | | | | | | | | | + 1874-12-07 18:40:00+00 | 'afefea' | | | | | f | Qué estás haciendo | 0 | 2000000000000 | t | | | | | | | | | | | | | | | + 1677-09-21 00:12:43.145224+00 | | | | | | | べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | 1.78e+68 | f | | | | | | | | | | | | | | | + 1677-09-21 00:12:43.145224+00 | | | | | | | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t | | | | | | | | | | | | | | | +(24 rows) + +--Testcase 153: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; + time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +-------------------------------+--------------+----+----------+-------+----------------+----+-----------------------------------------------------------------------+--------------+---------------+----+-------------+-----------------+---------------+------------+-------------+------+-----+-----+----------+---------------------------------+--------+-----+-----+-------------+----- + 2262-04-11 23:47:16.854776+00 | | | | | | | ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | -1.78e+68 | f | | | | | | | | | | | | | | | + 2020-01-12 01:00:00+00 | | | | | | | Chúc mừng năm mới 2021 | 4 | 40.772 | f | | | | | | | | | | | | | | | + 2020-01-10 01:00:00+00 | | | | | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t | | | | | | | | | | | | | | | + 2020-01-08 01:00:00+00 | | | | | | | In Bulgarian it is desirable | 0 | 0.774 | f | | | | | | | | | | | | | | | + 2020-01-06 01:00:00+00 | | | | | | | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f | | | | | | | | | | | | | | | + 2020-01-04 01:00:00+00 | | | | | | | 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -40.652 | t | | | | | | | | | | | | | | | + 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 + 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 + 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 + 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 + 1970-01-01 00:00:00+00 | -2323.54454 | | | | | t | Tôi không biết | 32 | 78.14 | f | | | | | | | | | | | | | | | + 1969-12-22 20:42:30+00 | faefek | | | | | t | change for new change | 34 | -74 | f | | | | | | | | | | | | | | | + 1874-12-07 18:40:00+00 | 'afefea' | | | | | f | Qué estás haciendo | 0 | 2000000000000 | t | | | | | | | | | | | | | | | + 1677-09-21 00:12:43.145224+00 | | | | | | | ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | 1.79e+68 | t | | | | | | | | | | | | | | | +(14 rows) + +--Testcase 154: +SELECT tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 from sctbl3 WHERE (fields->>'c13')::int >=0; + t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +--------------+----+----------+-------+----------------+----+-----------------+------------+-----------+----+-------------+-----------------+---------------+----------------+-------------+------+-----+-----+----------+---------------------------------+-----------+-----+-----+-------------+----- + 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 + 23223r | 3 | -74.255 | 21i | '111111' | t | Што правиш | -368545807 | 850 | t | -32768 | 5563656565554 | -12.3456789 | special string | a a | -78 | f | 1 | 19700101 | đây là tiếng Việt | 987987987 | t | f | -0.1111111 | -78 + -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 + 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 + hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 +(5 rows) + +-- Select aggregate function and specific column from original table +--Testcase 155: +SELECT max(tags->>'t4'), max(tags->>'t5'), max((fields->>'c3')::bigint), count(*),count((fields->>'c11')::bigint), count((fields->>'c13')::int), count((fields->>'c19')::double precision), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25 OFFSET 0; + max | max | max | count | count | count | count | exists | exists +-----+----------------+------------+-------+-------+-------+-------+--------+-------- + 21i | '111111' | -368545807 | 1 | 1 | 1 | 1 | t | t + 4i | 'THisiSString' | -98 | 1 | 1 | 1 | 1 | t | t +(2 rows) + +--Testcase 156: +SELECT max(fields->>'c2'), min((fields->>'c3')::bigint), max((fields->>'c3')::bigint), max((fields->>'c11')::bigint), max((fields->>'c6')::double precision), max((fields->>'c7')::double precision), max((fields->>'c8')::float), max (20) from sctbl3 GROUP BY fields->>'c3' ORDER BY (fields->>'c3')::bigint; + max | min | max | max | max | max | max | max +----------------------------------------------------------------------------------+--------------+--------------+------+-------------+-----------------+---------------+----- + ^%(@#%^(@#%&@#)%^)!^%)!)% | -36854775808 | -36854775808 | | | | | 20 + べ員葉コ番告7次ノヌ従援かやじり図安ヨ | -36854775807 | -36854775807 | | | | | 20 + Што правиш | -368545807 | -368545807 | -78 | -32768 | 5563656565554 | -12.3456789 | 20 + wenzani | -98 | -98 | 32 | 2147483647 | 92272036855807 | -4.7854e-11 | 20 + いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ | -5 | -5 | | | | | 20 + 色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見 | -4 | -4 | | | | | 20 + กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ | -3 | -3 | | | | | 20 + `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -2 | | | | | 20 + 0123456789 | -1 | -1 | | | | | 20 + ඔයා කරන්නේ කුමක් ද | 0 | 0 | -125 | 32767 | 7424654 | 1.00007 | 20 + Which started out as a kind | 1 | 1 | | | | | 20 + Canada Denmark Turkey Yemen Tokyo | 2 | 2 | | | | | 20 + Change our locale from $ to ¥ in | 3 | 3 | | | | | 20 + Chúc mừng năm mới 2021 | 4 | 4 | | | | | 20 + $ | 5 | 5 | | | | | 20 + Tôi không biết | 32 | 32 | | | | | 20 + change for new change | 34 | 34 | | | | | 20 + что ты делаешь | 546 | 546 | 8 | -2147483648 | -32036854775808 | -78945.145441 | 20 + 何してるの | 3685808 | 3685808 | -676 | 748452587 | -246455441441 | 93.147895 | 20 + ăâđêôơưdêđêdờenờíìờẹ | 36854775806 | 36854775806 | | | | | 20 + 敷ヘカウ告政ヨハツヤ消70者32精楽ざ | 36854775807 | 36854775807 | | | | | 20 +(21 rows) + +--Testcase 157: +SELECT sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), sum((fields->>'c6')::double precision), sum((fields->>'c7')::double precision), sum((fields->>'c8')::float), sum((fields->>'c11')::bigint), sum((fields->>'c13')::int), sum((fields->>'c16')::int) FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1; + sum | sum | sum | sum | sum | sum | sum | sum +--------------+--------------+-------------+-----------------+---------------+------+-----+----------- + -36854775808 | -36854775808 | | | | | | + -36854775807 | -36854775807 | | | | | | + -368545807 | -368545807 | -32768 | 5563656565554 | -12.3456789 | -78 | 1 | 987987987 + -98 | -98 | 2147483647 | 92272036855807 | -4.7854e-11 | 32 | 1 | 321654 + -5 | -5 | | | | | | + -4 | -4 | | | | | | + -3 | -3 | | | | | | + -2 | -2 | | | | | | + -1 | -1 | | | | | | + 0 | 0 | 32767 | 7424654 | 1.00007 | -125 | 0 | 113456 + 0 | 0 | | | | | | + 0 | 0 | | | | | | + 1 | 1 | | | | | | + 1 | 1 | | | | | | + 2 | 2 | | | | | | + 3 | 3 | | | | | | + 4 | 4 | | | | | | + 5 | 5 | | | | | | + 32 | 32 | | | | | | + 34 | 34 | | | | | | + 546 | 546 | -2147483648 | -32036854775808 | -78945.145441 | 8 | 0 | 123456 + 3685808 | 3685808 | 748452587 | -246455441441 | 93.147895 | -676 | 0 | 11111 + 36854775806 | 36854775806 | | | | | | + 36854775807 | 36854775807 | | | | | | +(24 rows) + +--Testcase 158: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), stddev((fields->>'c11')::bigint), stddev((fields->>'c13')::int), stddev((fields->>'c14')::bigint), stddev((fields->>'c16')::int), stddev((fields->>'c19')::double precision), stddev((fields->>'c20')::int) FROM sctbl3 GROUP BY fields->>'c5', fields->>'c12' HAVING (fields->>'c12')::bool = true ORDER BY 1 ASC,2 DESC; + stddev | stddev | stddev | stddev | stddev | stddev | stddev | stddev +--------+--------+--------+--------+--------+--------+--------+-------- +(0 rows) + +--Testcase 159: +SELECT every((fields->>'c3')::bigint>0), every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time, (fields->>'c20')::int, tags->>'t5' ORDER BY (fields->>'c20')::int ASC,tags->>'t5' DESC; + every | every +-------+------- + f | f + f | f + t | f + f | f + t | f + f | f + t | f + t | f + t | f + t | f + f | f + t | f + t | f + f | f + f | f + t | f + f | f + t | f + t | f + f | f + f | f + f | f +(22 rows) + +--Testcase 160: +SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, bool_and((fields->>'c12')::bool), bool_and((fields->>'c17')::bool), bool_and((fields->>'c17')::bool) AND TRUE from sctbl3 ORDER BY 1,2,3; + ?column? | bool_and | ?column? | bool_and | bool_and | ?column? +----------+----------+----------+----------+----------+---------- + t | t | f | f | f | f +(1 row) + +--Testcase 161: +SELECT bool_or((fields->>'c3')::bigint <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, bool_or((fields->>'c17')::bool), bool_or((fields->>'c1')::bool), bool_or((fields->>'c5')::bool) OR FALSE from sctbl3 ORDER BY 1,2,3; + ?column? | bool_or | ?column? | bool_or | bool_or | ?column? +----------+---------+----------+---------+---------+---------- + t | t | t | t | t | t +(1 row) + +-- Select combine aggregate via operation +--Testcase 162: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5, sum((fields->>'c13')::int + -43.3)-3, sum((fields->>'c16')::int*2) + 1, sum((fields->>'c19')::double precision-7554)+785 FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; + sum | sum | ?column? | ?column? | ?column? | ?column? +---------------+---------------+--------------+----------+------------+--------------- + 147419103226 | 147419103226 | 73709551608 | | | + 7371616 | 7371616 | 3685803 | -46.3 | 22223 | -796225.123 + 1092 | 1092 | 541 | -46.3 | 246913 | 1.79e+308 + 68 | 68 | 29 | | | + 64 | 64 | 27 | | | + 10 | 10 | 0 | | | + 8 | 8 | -1 | | | + 6 | 6 | -2 | | | + 4 | 4 | -3 | | | + 2 | 2 | -4 | | | + 2 | 2 | -4 | | | + 0 | 0 | -5 | -46.3 | 226913 | -6769.0000123 + 0 | 0 | -5 | | | + 0 | 0 | -5 | | | + -2 | -2 | -6 | | | + -4 | -4 | -7 | | | + -6 | -6 | -8 | | | + -8 | -8 | -9 | | | + -10 | -10 | -10 | | | + -196 | -196 | -103 | -45.3 | 643309 | -1.79e+308 + -737091614 | -737091614 | -368545812 | -45.3 | 1975975975 | -6769.1111111 + -147419103230 | -147419103230 | -73709551620 | | | +(22 rows) + +--Testcase 163: +SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time), array_agg((fields->>'c6')::double precision+2), array_agg((fields->>'c7')::double precision/10), array_agg((fields->>'c8')::float-2) FROM sctbl3 GROUP BY (fields->>'c17')::bool, (fields->>'c20')::int, (fields->>'c18')::bool, (fields->>'c19')::double precision HAVING (fields->>'c17')::bool != true ORDER BY (fields->>'c20')::int DESC, (fields->>'c19')::double precision, (fields->>'c18')::bool; + array_agg | array_agg | array_agg | array_agg | array_agg | array_agg +-----------+--------------+-----------------------------------+--------------+-------------------+---------------------- + {1842904} | {何してるの} | {"1970-04-24 05:54:24.343435+00"} | {748452589} | {-24645544144.1} | {91.147895} + {-49} | {wenzani} | {"1970-04-12 17:40:00+00"} | {2147483649} | {9227203685580.7} | {-2.000000000047854} +(2 rows) + +--Testcase 164: +SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15), bit_and((fields->>'c13')::int+768) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c16')::int>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c13', fields->>'c14' HAVING min((fields->>'c13')::int)>'c14')::bigint) ORDER BY (fields->>'c13')::int ASC,(fields->>'c14')::bigint DESC; + bit_and | bit_and | bit_and +------------+------------+--------- + 546 | 561 | 768 + 0 | 15 | 768 + -368545807 | -368545792 | 769 + -98 | -83 | 769 +(4 rows) + +--Testcase 165: +SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint), bool_and((fields->>'c19')::double precision <= (fields->>'c20')::int) FROM sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3; + bool_and | bool_and | bool_and | bool_and +----------+----------+----------+---------- + t | f | f | + t | f | f | + t | f | f | + t | f | f | + t | f | f | + t | f | f | + t | f | f | + f | f | f | f + f | t | f | + f | t | f | t + f | t | f | + f | t | f | + f | t | f | + f | t | f | +(14 rows) + +--Testcase 166: +SELECT max(tags->>'t1'), max(tags->>'t2'), max(time), max((fields->>'c3')::bigint*0.5/(fields->>'c11')::bigint), max((fields->>'c3')::bigint+10-(fields->>'c8')::float), max((fields->>'c6')::double precision*2+(fields->>'c13')::int), max((fields->>'c8')::float-32+(fields->>'c16')::int), max((fields->>'c19')::double precision/32) FROM sctbl3 WHERE fields->>'c2' IS NOT NULL GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; + max | max | max | max | max | max | max | max +-----+-----+------------------------+-----+-----+-----+-----+----- + | | 2020-01-03 01:00:00+00 | | | | | + | | 2020-01-04 01:00:00+00 | | | | | + | | 2020-01-05 01:00:00+00 | | | | | + | | 2020-01-06 01:00:00+00 | | | | | + | | 2020-01-07 01:00:00+00 | | | | | +(5 rows) + +--Testcase 167: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE fields->>'c2' IS NULL GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; + max | max | max +-----+-----+----- +(0 rows) + +--Testcase 168: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min((fields->>'c19')::double precision + (fields->>'c20')::int/2) FROM sctbl3 WHERE true GROUP BY fields->>'c2', fields->>'c3', fields->>'c3', fields->>'c14' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c14')::bigint) ORDER BY 1 ASC,2 DESC; + ?column? | min | min +----------+-----+----- +(0 rows) + +--Testcase 169: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min((fields->>'c11')::bigint-(fields->>'c7')::double precision), min((fields->>'c6')::double precision+(fields->>'c8')::float) FROM sctbl3 WHERE false GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; + ?column? | min | min | min +----------+-----+-----+----- +(0 rows) + +--Testcase 170: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY fields->>'c19', fields->>'c20' HAVING min((fields->>'c19')::double precision)>min((fields->>'c20')::int) ORDER BY 1 ASC,2 DESC; + ?column? | min +-------------------------------+----- + 1970-01-11 09:59:36.143464+00 | 0 +(1 row) + +-- Select from sub query +--Testcase 171: +SELECT time, fields->>'c2' c2, fields->>'c15' c15, tags->>'t1' t1, (tags->>'t3')::double precision t3, tags->>'t5' t5, (fields->>'c12')::bool c12, (fields->>'c14')::bigint c14 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c13')::int>-1000 OR (fields->>'c19')::double precision<1000 ) AS sctbl3; + time | c2 | c15 | t1 | t3 | t5 | c12 | c14 +-------------------------------+-----------------+---------------------------------+--------------+----------+----------------+-----+---------- + 1970-01-01 00:00:01.2+00 | что ты делаешь | ông là nhà văn hiện thực | 'thisisatag' | 7945.154 | "thisistring" | f | 20112020 + 1970-01-01 04:06:21.646135+00 | Што правиш | đây là tiếng Việt | 23223r | -74.255 | '111111' | f | 19700101 + 1970-01-01 09:59:36.143464+00 | ඔයා කරන්නේ කුමක් ද | tiếng việt có dấu | -4.2541 | 987412 | '7855.14444' | f | 252500 + 1970-04-12 17:40:00+00 | wenzani | Đây là tính năng mới của Influx | 'tag2' | 741.14 | 'THisiSString' | f | 19654578 + 1970-04-24 05:54:24.343435+00 | 何してるの | hôm nay là ngày rất rét | hhaffe.3fasf | 413.1475 | -86893.223E+1 | f | 19960102 +(5 rows) + +--Testcase 172: +SELECT max(time), max(7), max((fields->>'c7')::double precision)+17, max((fields->>'c11')::bigint)+10, max((fields->>'c3')::bigint), max((fields->>'c14')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY fields->>'c2'; + max | max | ?column? | ?column? | max | ?column? +-------------------------------+-----+-----------------+----------+-----+---------- + 2020-01-06 01:00:00+00 | 7 | | | -2 | + 2020-01-13 01:00:00+00 | 7 | | | 5 | + 2020-01-05 01:00:00+00 | 7 | | | -3 | + 2020-01-03 01:00:00+00 | 7 | | | -5 | + 2020-01-07 01:00:00+00 | 7 | | | -1 | + 2020-01-10 01:00:00+00 | 7 | | | 2 | + 1969-12-22 20:42:30+00 | 7 | | | 34 | + 2020-01-11 01:00:00+00 | 7 | | | 3 | + 2020-01-12 01:00:00+00 | 7 | | | 4 | + 2020-01-08 01:00:00+00 | 7 | | | 0 | + 1970-01-01 00:00:04.343314+00 | 7 | | | 1 | + 1874-12-07 18:40:00+00 | 7 | | | 0 | + 1970-01-01 00:00:00+00 | 7 | | | 32 | + 1970-04-12 17:40:00+00 | 7 | 92272036855824 | 42 | -98 | 9827289 + 2020-01-09 01:00:00+00 | 7 | | | 1 | + 1970-01-01 00:00:01.2+00 | 7 | -32036854775791 | 18 | 546 | 10056010 + 1970-01-01 09:59:36.143464+00 | 7 | 7424671 | -115 | 0 | 126250 + 2020-01-04 01:00:00+00 | 7 | | | -4 | +(18 rows) + +--Testcase 173: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), stddev((fields->>'c11')::bigint), stddev((fields->>'c14')::bigint), stddev((fields->>'c19')::double precision) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; + stddev | stddev | stddev | stddev | stddev +--------+--------+--------+--------+-------- + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | +(18 rows) + +--Testcase 174: +SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c11')::bigint)), sqrt(abs((fields->>'c20')::int)) FROM ( SELECT * FROM sctbl3 WHERE tags->>'t5' LIKE '111111' ) AS sctbl3 ORDER BY 1 ASC,2 DESC; + sqrt | sqrt | sqrt | sqrt +-------------------+-------------------+-------------------+------------------- + 19197.54690058081 | 19197.54690058081 | 8.831760866327848 | 8.831760866327848 +(1 row) + +--Testcase 175: +SELECT * FROM ( SELECT tags->>'t1' t1, (tags->>'t2')::int t2, (tags->>'t3')::double precision t3, tags->>'t4' t4, tags->>'t5' t5, fields->>'c2' c2, (fields->>'c3')::bigint c3 FROM sctbl3 WHERE (fields->>'c13')::int>-1000 OR (fields->>'c14')::bigint<1000 ) AS tb3 WHERE c3 <-1 AND c2 > 'KissMe' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + t1 | t2 | t3 | t4 | t5 | c2 | c3 +--------+----+---------+-----+----------------+------------+------------ + 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | wenzani | -98 + 23223r | 3 | -74.255 | 21i | '111111' | Што правиш | -368545807 +(2 rows) + +--Testcase 176: +SELECT * FROM ( SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE c3 IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; + time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +-------------------------------+----------+----+--------+-----+--------------+----+-----------------------------------+----+---------------+----+-------+---------+---------+----------+------------+------+-----+-----+--------+-------------------+--------+-----+-----+-----------+----- + 2020-01-10 01:00:00+00 | | | | | | | Canada Denmark Turkey Yemen Tokyo | 2 | 20.312 | t | | | | | | | | | | | | | | | + 2020-01-09 01:00:00+00 | | | | | | | Which started out as a kind | 1 | 10.746 | t | | | | | | | | | | | | | | | + 2020-01-08 01:00:00+00 | | | | | | | In Bulgarian it is desirable | 0 | 0.774 | f | | | | | | | | | | | | | | | + 2020-01-07 01:00:00+00 | | | | | | | 0123456789 | -1 | -10.746 | f | | | | | | | | | | | | | | | + 2020-01-06 01:00:00+00 | | | | | | | `~!@#$%^&*()_+=-{}[]|:;<>?/. | -2 | -20.56 | f | | | | | | | | | | | | | | | + 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 + 1970-01-01 00:00:04.343314+00 | "3gìvậy" | | | | | f | lagi ngopo | 1 | 1.024 | t | | | | | | | | | | | | | | | + 1874-12-07 18:40:00+00 | 'afefea' | | | | | f | Qué estás haciendo | 0 | 2000000000000 | t | | | | | | | | | | | | | | | +(8 rows) + +--Testcase 177: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM ( SELECT * FROM sctbl3 WHERE fields->>'c10' LIKE 'a a') AS tb3 WHERE (fields->>'c3')::bigint > 0 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint) < avg((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3; + max | max | max +-----+-----+----- +(0 rows) + +-- Select from view +--Testcase 179: +SELECT stddev((fields->>'c13')::int), stddev((fields->>'c14')::bigint ORDER BY (fields->>'c14')::bigint) FROM view_sctbl3 GROUP BY time, fields->>'c13', fields->>'c14' ORDER BY (fields->>'c13')::int ASC, (fields->>'c14')::bigint DESC; + stddev | stddev +--------+-------- + | + | + | + | + | +(5 rows) + +--Testcase 180: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; + bit_or | bit_or +--------+-------- +(0 rows) + +--Testcase 181: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; + max | max | max +-------------------------------+--------------+------------ + 1970-04-24 05:54:24.343435+00 | 1842904.0 | 3685818 + 1970-04-12 17:40:00+00 | -49.0 | -88 + 1970-01-01 09:59:36.143464+00 | 0.0 | 10 + 1970-01-01 04:06:21.646135+00 | -184272903.5 | -368545797 + 1970-01-01 00:00:01.2+00 | 273.0 | 556 +(5 rows) + +--Testcase 182: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3; + sum | sum | ?column? +------------+------------+------------ + 7371616 | 7371616 | 3685803 + 1092 | 1092 | 541 + 0 | 0 | -5 + -196 | -196 | -103 + -737091614 | -737091614 | -368545812 +(5 rows) + +--Testcase 183: +SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50, tags->>'t4' t4, (fields->>'c12')::bool c12, (fields->>'c19')::double precision+(fields->>'c20')::int FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, tags->>'t4', (fields->>'c12')::bool, (fields->>'c19')::double precision, (fields->>'c20')::int HAVING sum((fields->>'c13')::int)<100 OR sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c11')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; + avg | ?column? | t4 | c12 | ?column? +------------------------+----------+-------+-----+------------- + 0.00000000000000000000 | t | 0i | f | 1.79e+308 + 0.00000000000000000000 | t | 8798i | f | -788889.123 + 0.00000000000000000000 | f | 21i | f | -78.1111111 + 0.00000000000000000000 | f | 4i | f | -1.79e+308 + 0.00000000000000000000 | f | 54i | f | -74.0000123 +(5 rows) + +--Testcase 184: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2), (tags->>'t2')::int t2, (tags->>'t3')::double precision t3 FROM view_sctbl3 GROUP BY tags->>'t2', tags->>'t3', fields->>'c3', fields->>'c3' HAVING min((fields->>'c16')::int)<100 AND max((fields->>'c11')::bigint)<1000 OR sum((fields->>'c7')::double precision)>-7894 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; + bit_or | bit_or | t2 | t3 +--------+--------+----+-------- + -98 | -49 | 2 | 741.14 + 0 | 0 | 4 | 987412 +(2 rows) + +--Testcase 185: +SELECT bool_and((fields->>'c11')::bigint>0), bool_and((fields->>'c13')::int<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint), bool_and((fields->>'c7')::double precision>=(fields->>'c8')::float) FROM view_sctbl3 GROUP BY time, tags->>'t1', tags->>'t2',tags->>'t3' ORDER BY tags->>'t1' DESC,(tags->>'t2')::float, (tags->>'t3')::double precision; + bool_and | bool_and | bool_and | bool_and +----------+----------+----------+---------- + t | f | f | f + t | f | f | t + f | f | f | f + f | f | f | t + f | f | f | t +(5 rows) + +--Testcase 186: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5; + time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----- +(0 rows) + +--Testcase 187: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5; + time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +-------------------------------+--------------+----+----------+-------+----------------+----+-----------------+------------+-----------+----+-------------+-----------------+---------------+----------------+-------------+------+-----+-----+----------+---------------------------------+-----------+-----+-----+-------------+----- + 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 + 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 + 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 + 1970-01-01 04:06:21.646135+00 | 23223r | 3 | -74.255 | 21i | '111111' | t | Што правиш | -368545807 | 850 | t | -32768 | 5563656565554 | -12.3456789 | special string | a a | -78 | f | 1 | 19700101 | đây là tiếng Việt | 987987987 | t | f | -0.1111111 | -78 + 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 +(5 rows) + +--Testcase 188: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; + time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----- +(0 rows) + +--Testcase 189: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 DESC; + time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +-------------------------------+--------------+----+----------+-------+----------------+----+-----------------+------------+-----------+----+-------------+-----------------+---------------+----------------+-------------+------+-----+-----+----------+---------------------------------+-----------+-----+-----+-------------+----- + 1970-04-24 05:54:24.343435+00 | hhaffe.3fasf | 5 | 413.1475 | 8798i | -86893.223E+1 | t | 何してるの | 3685808 | 8.7e+22 | t | 748452587 | -246455441441 | 93.147895 | nospace | aaa | -676 | f | 0 | 19960102 | hôm nay là ngày rất rét | 11111 | f | t | -789456.123 | 567 + 1970-04-12 17:40:00+00 | 'tag2' | 2 | 741.14 | 4i | 'THisiSString' | f | wenzani | -98 | -2.58e+80 | t | 2147483647 | 92272036855807 | -4.7854e-11 | !@#$%^&* | a a | 32 | f | 1 | 19654578 | Đây là tính năng mới của Influx | 321654 | f | f | -1.79e+308 | 87 + 1970-01-01 09:59:36.143464+00 | -4.2541 | 4 | 987412 | 54i | '7855.14444' | t | ඔයා කරන්නේ කුමක් ද | 0 | -1200 | t | 32767 | 7424654 | 1.00007 | | aa a | -125 | f | 0 | 252500 | tiếng việt có dấu | 113456 | t | f | -1.23e-05 | -74 + 1970-01-01 04:06:21.646135+00 | 23223r | 3 | -74.255 | 21i | '111111' | t | Што правиш | -368545807 | 850 | t | -32768 | 5563656565554 | -12.3456789 | special string | a a | -78 | f | 1 | 19700101 | đây là tiếng Việt | 987987987 | t | f | -0.1111111 | -78 + 1970-01-01 00:00:01.2+00 | 'thisisatag' | 1 | 7945.154 | 0i | "thisistring" | t | что ты делаешь | 546 | 2.58e+80 | t | -2147483648 | -32036854775808 | -78945.145441 | $$$$$&&&&& | signle test | 8 | f | 0 | 20112020 | ông là nhà văn hiện thực | 123456 | t | f | 1.79e+308 | 54 +(5 rows) + +--Testcase 190: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE (fields->>'c3')::bigint NOT IN (-42,65,0,78,-891) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; + time | t1 | t2 | t3 | t4 | t5 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | c16 | c17 | c18 | c19 | c20 +------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----- +(0 rows) + +-- Select many target aggregate in one query and combine with condition +--Testcase 191: +SELECT count((fields->>'c1')::bool)+count(fields->>'c2')-2*count((fields->>'c3')::bigint), count((fields->>'c3')::bigint)/count((fields->>'c5')::bool)-(fields->>'c3')::bigint, count((fields->>'c11')::bigint-(fields->>'c14')::bigint), 2*count(*) from sctbl3 GROUP BY fields->>'c5', fields->>'c3', fields->>'c1', fields->>'c20', tags->>'t5' order by tags->>'t5', fields->>'c1', (fields->>'c20')::int limit 1; + ?column? | ?column? | count | ?column? +----------+-----------+-------+---------- + 0 | 368545808 | 1 | 2 +(1 row) + +--Testcase 192: +SELECT every((fields->>'c1')::bool != TRUE) AND true, every((fields->>'c3')::bigint <> 10) OR every((fields->>'c3')::bigint > 5.6), every((fields->>'c3')::bigint <= 2) OR (fields->>'c5')::bool from sctbl3 GROUP BY fields->>'c5' ORDER BY 1,2,3 limit 6; + ?column? | ?column? | ?column? +----------+----------+---------- + f | t | f + f | t | t +(2 rows) + +--Testcase 193: +SELECT stddev((fields->>'c3')::bigint*3-(fields->>'c3')::bigint)*1000000-(fields->>'c3')::bigint, stddev((fields->>'c3')::bigint)-0.567, stddev((fields->>'c3')::bigint/((fields->>'c3')::bigint-1.3))/6, stddev((fields->>'c3')::bigint+4*(fields->>'c3')::bigint)*100, stddev((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint-52.1))+1 from sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY fields->>'c3' ORDER BY 1,2,3,4,5 ; + ?column? | ?column? | ?column? | ?column? | ?column? +----------+----------+----------+----------+---------- + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | + | | | | +(9 rows) + +--Testcase 194: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-6, sum((fields->>'c3')::bigint/((fields->>'c3')::bigint+9999999)-(fields->>'c3')::bigint)*9999999999999.998, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/((fields->>'c3')::bigint+111111))*-9.5, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6 from sctbl3; + ?column? | ?column? | ?column? | ?column? | ?column? +------------+----------------------------+--------------+-----------------------+------------- + -364859492 | 3648594889999999270281.022 | 3466165145.5 | 20784562.572809588507 | -6567470748 +(1 row) + +--Testcase 195: +SELECT sum((fields->>'c14')::bigint+(fields->>'c3')::bigint)-6+sum((fields->>'c11')::bigint), sum((fields->>'c3')::bigint*1.3-(fields->>'c3')::bigint)*9.998-sum((fields->>'c7')::double precision)*4, sum((fields->>'c8')::float-(fields->>'c7')::double precision/4)*-9.5-(fields->>'c3')::bigint, sum((fields->>'c20')::int-(fields->>'c3')::bigint-(fields->>'c16')::int)/17.55435+(fields->>'c3')::bigint, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6-(fields->>'c3')::bigint-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c13', fields->>'c14', fields->>'c16', fields->>'c11', fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4,5; + ?column? | ?column? | ?column? | ?column? | ?column? +------------+---------------------+--------------------+-------------------------+--------------- + -348845790 | -22255731678509.516 | 13214052889115.035 | -403832915.779305414328 | -5896732912 + 252369 | -29698616 | 17633543.749335 | -6467.3428523414424345 | 0 + 19654506 | -369088147423521.94 | 219146087532639.62 | -18410.782871481997 | -1568 + 20112568 | 128147419104869.67 | -76087529343111.12 | -6514.8139862769057242 | 8736 + 23645228 | 985832820976.5153 | -585335360115.28 | 3475241.844032960491 | 58972928 + | | | | -589676412928 + | | | | -589676412912 + | | | | -80 + | | | | -64 + | | | | -48 + | | | | -32 + | | | | -16 + | | | | 0 + | | | | 32 + | | | | 34 + | | | | 48 + | | | | 64 + | | | | 80 + | | | | 512 + | | | | 544 + | | | | 589676412896 + | | | | 589676412912 +(22 rows) + +--Testcase 196: +SELECT max((fields->>'c16')::int), max((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, max((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, max((fields->>'c3')::bigint)+max((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c13')::int>= 0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY (fields->>'c3')::int, (fields->>'c3')::int; + max | ?column? | ?column? | ?column? +-----------+------------+------------+------------ + 987987987 | -737091615 | -368545810 | -737091614 + 321654 | -197 | -101 | -196 + 113456 | -1 | -3 | 0 + 123456 | 1091 | 543 | 1092 + 11111 | 7371615 | 3685805 | 7371616 +(5 rows) + +--Testcase 197: +SELECT variance((fields->>'c3')::bigint+(fields->>'c3')::bigint)+(fields->>'c3')::bigint, variance((fields->>'c3')::bigint*3)+(fields->>'c3')::bigint+1, variance((fields->>'c3')::bigint-2)+10 from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, (tags->>'t3')::double precision ORDER BY (tags->>'t3')::double precision; + ?column? | ?column? | ?column? +----------+----------+---------- + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + 0 | 1 | 10 + | | + | | + | | + | | + | | + | | + | | + | | + 1 | 2 | 10 + | | +(22 rows) + +--Testcase 198: +SELECT sqrt(abs((fields->>'c3')::bigint*5)) + sqrt(abs((fields->>'c3')::bigint+6)), sqrt(abs((fields->>'c3')::bigint)+5)+(fields->>'c3')::bigint, 4*sqrt(abs((fields->>'c3')::bigint-100))-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1, 2, 3; + ?column? | ?column? | ?column? +--------------------+---------------------+-------------------- + 2.449489742783178 | 2.23606797749979 | 40 + 2.449489742783178 | 2.23606797749979 | 40 + 2.449489742783178 | 2.23606797749979 | 40 + 4.47213595499958 | 1.4494897427831779 | 41.19950248448356 + 5.16227766016838 | 0.6457513110645907 | 42.39801975344831 + 5.605034153776295 | -0.1715728752538097 | 43.59556626036888 + 5.8863495173726745 | -1 | 44.792156108742276 + 6 | -1.8377223398316205 | 45.98780306383839 + 31.727606667804093 | -87.85110843490779 | 154.28498911788114 + 62124.56661524995 | -368526609.4529692 | 368622597.19802034 + 621247.3121249836 | -36854583831.02283 | 36855543710.90968 + 621247.312133412 | -36854583832.02282 | 36855543711.9097 +(12 rows) + +--Testcase 199: +SELECT max((fields->>'c3')::bigint)+min((fields->>'c3')::bigint)+3, min((fields->>'c3')::bigint)-sqrt(abs((fields->>'c3')::bigint-45.21))+(fields->>'c3')::bigint*2, count(*)-count((fields->>'c5')::bool)+2, (fields->>'c5')::bool c5, (fields->>'c3')::bigint c3 from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, (fields->>'c5')::bool ORDER BY 1,2,3,4; + ?column? | ?column? | ?column? | c5 | c3 +--------------+---------------------------+----------+----+-------------- + -73709551613 | -110564519399.97728155989 | 2 | t | -36854775808 + -73709551611 | -110564519396.97727895540 | 2 | f | -36854775807 + -737091611 | -1105656618.54807807497 | 2 | t | -368545807 + -193 | -305.967038062946069 | 2 | t | -98 + -7 | -22.085901495222750 | 2 | t | -5 + -5 | -19.014983962918233 | 2 | t | -4 + -3 | -15.943342134735980 | 2 | t | -3 + -1 | -12.870953354520754 | 2 | f | -2 + 1 | -9.797793759742936 | 2 | f | -1 + 3 | -6.723838189605696 | 2 | f | 0 + 3 | -6.723838189605696 | 2 | t | 0 + 5 | -3.649060083951716 | 2 | t | 1 + 7 | -0.573431371817918 | 2 | t | 2 + 9 | 2.503077651687685 | 2 | f | 3 + 11 | 5.580498461718387 | 2 | f | 4 + 13 | 8.658864455004924 | 2 | f | 5 + 67 | 92.365443630922750 | 2 | f | 32 + 71 | 98.651866191443359 | 2 | f | 34 + 1095 | 1615.621662260123072 | 2 | t | 546 + 7371619 | 11055504.1659472756506 | 2 | t | 3685808 + 73709551615 | 110564135442.02295914731 | 2 | f | 36854775806 + 73709551617 | 110564135445.02295654282 | 2 | f | 36854775807 +(22 rows) + +--Testcase 200: +SELECT variance((fields->>'c3')::bigint)-5*min((fields->>'c3')::bigint)-1, every((fields->>'c5')::bool <> true), max((fields->>'c3')::bigint+4.56)*3-min((fields->>'c3')::bigint), count((fields->>'c3')::bigint)-4 from sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1,2,3,4; + ?column? | every | ?column? | ?column? +-------------------------+-------+----------+---------- + -5.08333333333333333333 | f | 21.68 | 0 +(1 row) + +--Testcase 201: +SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3')::bigint)/3-(fields->>'c3')::bigint, min((fields->>'c3')::bigint)+(fields->>'c3')::bigint/4, (fields->>'c5')::bool c5, (fields->>'c20')::int-(fields->>'c19')::double precision-(fields->>'c16')::int from sctbl3 GROUP BY (fields->>'c20')::int, (fields->>'c19')::double precision, (fields->>'c16')::int, (fields->>'c3')::bigint, (fields->>'c3')::bigint, (fields->>'c5')::bool ORDER BY 1,2,3,4,5; + ?column? | ?column? | ?column? | ?column? | c5 | ?column? +--------------+--------------+-------------------------+--------------+----+------------------- + -36854775838 | -36854775818 | 24569850538.66666667 | -46068469760 | t | + -36854775837 | -36854775817 | 24569850538.00000000 | -46068469758 | f | + -368545837 | -368545817 | 245697204.666666666667 | -460682258 | t | -987988064.888889 + -128 | -108 | 65.3333333333333333 | -122 | t | 1.79e+308 + -35 | -15 | 3.3333333333333333 | -6 | t | + -34 | -14 | 2.6666666666666667 | -5 | t | + -33 | -13 | 2.00000000000000000000 | -3 | t | + -32 | -12 | 1.33333333333333333333 | -2 | f | + -31 | -11 | 0.66666666666666666667 | -1 | f | + -30 | -10 | 0.00000000000000000000 | 0 | f | + -30 | -10 | 0.00000000000000000000 | 0 | t | + -30 | -10 | 0.00000000000000000000 | 0 | t | -113529.9999877 + -29 | -9 | -0.33333333333333333333 | 1 | t | + -28 | -8 | -1.33333333333333333333 | 2 | t | + -27 | -7 | -2.00000000000000000000 | 3 | f | + -26 | -6 | -2.6666666666666667 | 5 | f | + -25 | -5 | -3.3333333333333333 | 6 | f | + 2 | 22 | -21.3333333333333333 | 40 | f | + 4 | 24 | -22.6666666666666667 | 42 | f | + 516 | 536 | -364.0000000000000000 | 682 | t | -1.79e+308 + 3685778 | 3685798 | -2457205.333333333333 | 4607260 | t | 778912.123 + 36854775776 | 36854775796 | -24569850537.33333333 | 46068469757 | f | + 36854775777 | 36854775797 | -24569850538.00000000 | 46068469758 | f | +(23 rows) + +-- Clean +--Testcase 209: +DROP FOREIGN TABLE sctbl3 CASCADE; +NOTICE: drop cascades to view view_sctbl3 +--Testcase 210: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 211: +DROP SERVER influxdb_svr CASCADE; +--Testcase 212: +DROP EXTENSION influxdb_fdw; diff --git a/expected/11.13/schemaless/add_tags.out b/expected/15.0/schemaless/add_tags.out similarity index 91% rename from expected/11.13/schemaless/add_tags.out rename to expected/15.0/schemaless/add_tags.out index 235b70d..8981eee 100644 --- a/expected/11.13/schemaless/add_tags.out +++ b/expected/15.0/schemaless/add_tags.out @@ -3,14 +3,14 @@ SET datestyle=ISO; SET timezone='UTC'; \set ECHO none -- Init data original -\! influx -import -path=init/tag_original.txt -precision=s > /dev/null +:INIT_TAG_ORIGINAL; -- Before update data -- Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); --Testcase 5: @@ -62,21 +62,21 @@ select bool_and((fields->>'sig3')::double precision > -10), string_agg('446757sv --Testcase 10: select count(fields->>'sig1'), stddev((fields->>'sig3')::double precision + 333), min(fields->>'sig2') from sctbl4; - count | stddev | min --------+------------------+---------- - 9 | 145.854760330649 | システム + count | stddev | min +-------+--------------------+---------- + 9 | 145.85476033064916 | システム (1 row) --Testcase 11: select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::bigint), stddev((fields->>'sig3')::double precision) from sctbl4; - bool_or | stddev | stddev ----------+-------------------+------------------ - t | 4590.734630148474 | 145.854760330649 + bool_or | stddev | stddev +---------+-------------------+-------------------- + t | 4590.734630148474 | 145.85476033064916 (1 row) --------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_1; --Testcase 12: DROP FOREIGN TABLE sctbl4; --Testcase 13: @@ -84,35 +84,35 @@ CREATE FOREIGN TABLE sctbl4 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIO -- Select all data with aggregate --Testcase 14: select avg((fields->>'sig3')::double precision), bool_and(fields->>'sig2' != '%a%'), count(*) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - avg | bool_and | count -------------------+----------+------- - 2516968931 | t | 3 - 566298823 | t | 2 - -12 | t | 2 - 4917871303.5 | t | 2 - 159.888888888889 | t | 9 + avg | bool_and | count +--------------------+----------+------- + 2516968931 | t | 3 + 566298823 | t | 2 + -12 | t | 2 + 4917871303.5 | t | 2 + 159.88888888888889 | t | 9 (5 rows) --Testcase 15: select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::bigint), avg((fields->>'sig3')::double precision) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - bool_or | stddev | avg ----------+-------------------+------------------ - t | 6603.097757870922 | 2516968931 - t | 1237.436867076458 | 566298823 - t | 6710.443353460336 | -12 - f | 579.827560572969 | 4917871303.5 - t | 4590.734630148474 | 159.888888888889 + bool_or | stddev | avg +---------+-------------------+-------------------- + t | 6603.097757870922 | 2516968931 + t | 1237.436867076458 | 566298823 + t | 6710.443353460336 | -12 + f | 579.827560572969 | 4917871303.5 + t | 4590.734630148474 | 159.88888888888889 (5 rows) --Testcase 16: select max(time), avg((fields->>'sig3')::double precision), sum((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - max | avg | sum ----------------------+------------------+------- - 1970-01-01 02:22:58 | 2516968931 | 13560 - 1970-01-07 01:54:05 | 566298823 | 2490 - 1970-01-01 12:05:46 | -12 | 9030 - 1970-01-01 14:36:06 | 4917871303.5 | 140 - 1970-10-28 16:19:12 | 159.888888888889 | 25220 + max | avg | sum +---------------------+--------------------+------- + 1970-01-01 02:22:58 | 2516968931 | 13560 + 1970-01-07 01:54:05 | 566298823 | 2490 + 1970-01-01 12:05:46 | -12 | 9030 + 1970-01-01 14:36:06 | 4917871303.5 | 140 + 1970-10-28 16:19:12 | 159.88888888888889 | 25220 (5 rows) --Testcase 17: @@ -128,58 +128,58 @@ select string_agg(fields->>'sig2', 'ASDFG!@#$%zxc'), count(time), avg((fields->> --Testcase 18: select sum((fields->>'sig3')::double precision), stddev((fields->>'sig3')::double precision), min((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY 1, 2, 3; - sum | stddev | min -------------+------------------+------ - -24 | 16.9705627484771 | -230 - 1439 | 145.854760330649 | -340 - 1132597646 | 646026566.50168 | 370 - 7550906793 | 2203533896.7414 | 190 - 9835742607 | 6941647940.73026 | -340 + sum | stddev | min +------------+--------------------+------ + -24 | 16.97056274847714 | -230 + 1439 | 145.85476033064916 | -340 + 1132597646 | 646026566.5016799 | 370 + 7550906793 | 2203533896.7414036 | 190 + 9835742607 | 6941647940.73026 | -340 (5 rows) -- Select aggregate contain expression --Testcase 19: select bool_or(((fields->>'sig1')::bigint + (fields->>'sig3')::double precision - 9999) > 0), stddev((fields->>'sig3')::double precision / (fields->>'sig1')::bigint + 3291), stddev((fields->>'sig3')::double precision * 12.3 - (fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - bool_or | stddev | stddev ----------+-------------------+------------------ - t | 10395428.6492871 | 27103463254.8422 - t | 132004.122810283 | 7946125530.5338 - f | 0.0018310546875 | 6919.1812752666 - t | 14495110.0813057 | 85382269091.1546 - t | 0.618104797597138 | 5676.87270740776 + bool_or | stddev | stddev +---------+-----------------------+------------------- + t | 10395428.649287097 | 27103463254.84223 + t | 132004.1228102828 | 7946125530.533796 + f | 0.0018326741624507942 | 6919.181275266606 + t | 14495110.081305722 | 85382269091.15465 + t | 0.6181047995469497 | 5676.87270740776 (5 rows) --Testcase 20: select avg((fields->>'sig3')::double precision * (fields->>'sig1')::bigint / 34241), bool_and(fields->>'sig2' != '%c'), bool_and((fields->>'sig4')::boolean AND true OR true) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - avg | bool_and | bool_and --------------------+----------+---------- - 489923530.058702 | t | t - 32263969.5068777 | t | t - -3.24523232382232 | t | t - 68827732.4599165 | t | t - 4.71293348779403 | t | t + avg | bool_and | bool_and +---------------------+----------+---------- + 489923530.0587015 | t | t + 32263969.506877717 | t | t + -3.2452323238223184 | t | t + 68827732.45991647 | t | t + 4.712933487794035 | t | t (5 rows) --Testcase 21: select sum((fields->>'sig3')::double precision * 123.456 + (fields->>'sig1')::bigint), bool_and((fields->>'sig4')::boolean OR false), bool_or((fields->>'sig4')::boolean AND true AND true) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - sum | bool_and | bool_or -------------------+----------+--------- - 932204762596.608 | f | t - 139825977474.576 | f | t - 6067.056 | f | f - 1214281439429.79 | f | t - 202873.184 | f | t + sum | bool_and | bool_or +--------------------+----------+--------- + 932204762596.608 | f | t + 139825977474.576 | f | t + 6067.0560000000005 | f | f + 1214281439429.792 | f | t + 202873.184 | f | t (5 rows) --Testcase 22: select min((fields->>'sig3')::double precision / ((fields->>'sig3')::double precision + 223344)), max((fields->>'sig1')::bigint * (fields->>'sig3')::double precision - (fields->>'sig3')::double precision), count(*) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - min | max | count ------------------------+----------------+------- - -0.0468726563671816 | 49666316485165 | 3 - 0.997964277529575 | 2167967100091 | 2 - -0.000107469102632993 | -0 | 2 - 0.976755135863558 | 4706825307165 | 2 - -0.000452421800459589 | 1907354 | 9 + min | max | count +-------------------------+----------------+------- + -0.04687265636718164 | 49666316485165 | 3 + 0.9979642775295748 | 2167967100091 | 2 + -0.00010746910263299302 | -0 | 2 + 0.9767551358635582 | 4706825307165 | 2 + -0.00045242180045958885 | 1907354 | 9 (5 rows) --Testcase 23: @@ -196,46 +196,46 @@ select every((fields->>'sig4')::boolean OR (fields->>'sig4')::boolean AND true), -- Select combine-aggregate --Testcase 24: select avg((fields->>'sig3')::double precision) + sum((fields->>'sig3')::double precision) / avg((fields->>'sig1')::bigint), bool_and(fields->>'sig2' != '%a%') AND bool_and((fields->>'sig4')::boolean AND true) AND true , max((fields->>'sig1')::bigint * (fields->>'sig1')::bigint / 0.0001) + min((fields->>'sig3')::double precision / ((fields->>'sig1')::bigint + 99999)) * sum((fields->>'sig1')::bigint * (fields->>'sig1')::bigint - (fields->>'sig3')::double precision) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - ?column? | ?column? | ?column? --------------------+----------+------------------- - 2518639485.60022 | f | 1469675109817.68 - 567208539.984739 | f | -1185515320619.67 - -12.0053156146179 | f | 857475981152.925 - 5058381912.17143 | f | -923903585522.532 - 160.402409903956 | f | 1468943784459.32 + ?column? | ?column? | ?column? +--------------------+----------+--------------------- + 2518639485.600221 | f | 1469675109817.6772 + 567208539.984739 | f | -1185515320619.6707 + -12.00531561461794 | f | 857475981152.9249 + 5058381912.171429 | f | -923903585522.5319 + 160.40240990395628 | f | 1468943784459.3203 (5 rows) --Testcase 25: select stddev((fields->>'sig3')::double precision * 0.0001 - (fields->>'sig1')::bigint) + min((fields->>'sig3')::double precision / ((fields->>'sig1')::bigint + 3.344)) * stddev((fields->>'sig1')::bigint * (fields->>'sig1')::bigint - (fields->>'sig3')::double precision), bool_or((fields->>'sig3')::double precision / (fields->>'sig1')::bigint < -10) OR bool_or((fields->>'sig4')::boolean OR true OR false) AND bool_and(fields->>'sig2' != '%c'), string_agg(fields->>'sig2', '恨挫') from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - ?column? | ?column? | string_agg --------------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------- - -17175771729.8977 | t | 012002'akewo02恨挫aoaowejf恨挫システムGUIソフトウエア - 188553934054511 | t | g029012恨挫BAEFOAWJ#AWEK - -150283.367427508 | t | インターフェース設計検討資料恨挫C)@maEFJAe=3kake - -193510317626755 | t | +!2-3-12030_!@#!)~_#@%)恨挫装置開発機能仕 - -24144718.9596548 | t | 装置開発機能仕恨挫設計 検討資料恨挫+!2-3-12030_!@#!)~_#@%)恨挫aoao wejf恨挫g029012恨挫システム恨挫012002'akewo02恨挫BAEFOAWJ#AWEK恨挫C)@maEFJAe=3kake + ?column? | ?column? | string_agg +---------------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------- + -17175771729.897675 | t | 012002'akewo02恨挫aoaowejf恨挫システムGUIソフトウエア + 188553934054511.12 | t | g029012恨挫BAEFOAWJ#AWEK + -150283.36742750753 | t | インターフェース設計検討資料恨挫C)@maEFJAe=3kake + -193510317626754.6 | t | +!2-3-12030_!@#!)~_#@%)恨挫装置開発機能仕 + -24144718.959654775 | t | 装置開発機能仕恨挫設計 検討資料恨挫+!2-3-12030_!@#!)~_#@%)恨挫aoao wejf恨挫g029012恨挫システム恨挫012002'akewo02恨挫BAEFOAWJ#AWEK恨挫C)@maEFJAe=3kake (5 rows) --Testcase 26: select max((fields->>'sig1')::bigint) * max((fields->>'sig3')::double precision) + sum((fields->>'sig1')::bigint), stddev((fields->>'sig1')::bigint) * avg((fields->>'sig3')::double precision) / avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) + stddev((fields->>'sig3')::double precision) - count((fields->>'sig4')::boolean) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - ?column? | ?column? | ?column? -----------------+-------------------+------------------- - 49670414717760 | 3676945111.70727 | 9754440686.7414 - 2168990211170 | 562858667.760808 | 1778624210.50168 - 9030 | -17.8350653912567 | -9.02943725152286 - 4716651664940 | 40735961730.2887 | 16777390545.7303 - 3770300 | 261.937634130993 | 1575.85476033065 + ?column? | ?column? | ?column? +----------------+---------------------+-------------------- + 49670414717760 | 3676945111.7072725 | 9754440686.741404 + 2168990211170 | 562858667.7608076 | 1778624210.50168 + 9030 | -17.835065391256705 | -9.029437251522861 + 4716651664940 | 40735961730.28875 | 16777390545.730259 + 3770300 | 261.9376341309934 | 1575.8547603306492 (5 rows) --Testcase 27: select count(fields->>'sig2') * count(fields->>'sig4') / min((fields->>'sig1')::bigint), stddev((fields->>'sig1')::bigint) - count(fields->>'sig2') * sum((fields->>'sig1')::bigint), avg((fields->>'sig3')::double precision) - avg((fields->>'sig1')::bigint) * sum((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - ?column? | ?column? | ?column? -----------+----------------------+------------------- - 0 | -34076.902242129078 | 2455677731 - 0 | -3742.563132923542 | 563198773 - 0 | -11349.556646539664 | -40770462 - 0 | 299.827560572969 | 4917861503.5 - 0 | -222389.265369851526 | -70671884.5555556 + ?column? | ?column? | ?column? +----------+----------------------+-------------------- + 0 | -34076.902242129078 | 2455677731 + 0 | -3742.563132923542 | 563198773 + 0 | -11349.556646539664 | -40770462 + 0 | 299.827560572969 | 4917861503.5 + 0 | -222389.265369851526 | -70671884.55555555 (5 rows) -- Select with WHERE multi-condition @@ -261,12 +261,12 @@ select bool_and((fields->>'sig3')::double precision >= 1.6789), string_agg('っ --Testcase 30: select avg((fields->>'sig3')::double precision), count(*), count(fields->>'sig2') from sctbl4 WHERE (fields->>'sig4')::boolean = true OR time = '2020-01-09 01:00:00+00' AND (fields->>'sig3')::double precision != 0 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - avg | count | count -------------------+-------+------- - 4098219035 | 1 | 1 - 109489057 | 1 | 1 - 9384972 | 1 | 1 - 68.6666666666667 | 3 | 3 + avg | count | count +-------------------+-------+------- + 4098219035 | 1 | 1 + 109489057 | 1 | 1 + 9384972 | 1 | 1 + 68.66666666666667 | 3 | 3 (4 rows) --Testcase 31: @@ -300,20 +300,20 @@ select sum((fields->>'sig1')::bigint + (fields->>'sig1')::bigint * (fields->>'si --Testcase 34: select string_agg(fields->>'sig2' || (fields->>'sig2')::text, fields->>'sig2' || '!@#$%^&*'), every((fields->>'sig4')::boolean OR true AND false), stddev((fields->>'sig3')::double precision - (fields->>'sig1')::bigint / (fields->>'sig1')::bigint) from sctbl4 WHERE (fields->>'sig3')::double precision <= 999999999 GROUP BY tags->>'sid',fields->>'sig4' HAVING (fields->>'sig4')::boolean <> false ORDER BY tags->>'sid' LIMIT 5 OFFSET 1; - string_agg | every | stddev -----------------------------------------------------------------------------------------------+-------+------------------ - 装置開発機能仕装置開発機能仕 | t | - 装置開発機能仕装置開発機能仕aoao wejf!@#$%^&*aoao wejfaoao wejfg029012!@#$%^&*g029012g029012 | t | 212.490784113884 + string_agg | every | stddev +----------------------------------------------------------------------------------------------+-------+------------------- + 装置開発機能仕装置開発機能仕 | t | + 装置開発機能仕装置開発機能仕aoao wejf!@#$%^&*aoao wejfaoao wejfg029012!@#$%^&*g029012g029012 | t | 212.4907841138842 (2 rows) --Testcase 35: select stddev((fields->>'sig3')::double precision * 0.416754 + (fields->>'sig1')::bigint), min((fields->>'sig3')::double precision / ((fields->>'sig1')::bigint + 3.344)), stddev((fields->>'sig1')::bigint * (fields->>'sig1')::bigint - (fields->>'sig3')::double precision) from sctbl4 WHERE (fields->>'sig1')::bigint >= -1555.555 GROUP BY tags->>'sid',fields->>'sig4' HAVING (fields->>'sig4')::boolean <> true ORDER BY tags->>'sid' LIMIT 5 OFFSET 1; - stddev | min | stddev -------------------+----------------------+------------------ - | 481838.359210754 | - 6703.37080355266 | -0.00259085703823587 | 60595320.4523096 - | 20329946.4460095 | - 3565.33177691479 | -0.454433149795284 | 34527904.9647854 + stddev | min | stddev +--------------------+------------------------+-------------------- + | 481838.35921075434 | + 6703.370803552657 | -0.0025908570382358683 | 60595320.452309586 + | 20329946.44600947 | + 3565.3317769147857 | -0.4544331497952845 | 34527904.96478543 (4 rows) --Testcase 36: @@ -352,11 +352,11 @@ select time, tags->>'sname' sname, (fields->>'sig1')::bigint sig1, fields->>'sig --Testcase 39: select time, max(sig1), avg(sig3) from (select time, tags->>'sname' sname, ((fields->>'sig1')::bigint) sig1, fields->>'sig2' sig2, ((fields->>'sig3')::double precision) sig3, (fields->>'sig4')::boolean sig4 from sctbl9 GROUP BY time,tags->>'sname',fields->>'sig1',fields->>'sig2',fields->>'sig3',fields->>'sig4' ORDER BY 1,2,3,4,5,6) AS sctbl9 GROUP BY time; - time | max | avg ----------------------+-------+------ - 1970-01-01 00:00:00 | 12120 | 10.2 - 1970-01-01 00:00:01 | 9260 | 20.5 - 1970-01-01 00:00:02 | 480 | 30.8 + time | max | avg +---------------------+-------+-------------------- + 1970-01-01 00:00:00 | 12120 | 10.200000000000001 + 1970-01-01 00:00:01 | 9260 | 20.5 + 1970-01-01 00:00:02 | 480 | 30.8 (3 rows) --Testcase 40: @@ -368,7 +368,7 @@ select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (se --------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_20; --Testcase 41: DROP FOREIGN TABLE sctbl4; --Testcase 42: @@ -688,14 +688,14 @@ select stddev((tags->>'sid12')::double precision), stddev((tags->>'sid13')::doub -- Select aggregate contain expression --Testcase 59: select max((tags->>'sid2')::bigint / (tags->>'sid3')::bigint + (fields->>'sig3')::double precision), avg((tags->>'sid20')::bigint - (fields->>'sig3')::double precision * (tags->>'sid3')::bigint), sum((tags->>'sid2')::bigint + (fields->>'sig3')::double precision / (tags->>'sid3')::bigint) from sctbl4 GROUP BY tags->>'sid20' ORDER BY (tags->>'sid20')::bigint; - max | avg | sum -----------+------------+------------------ - 2658.2 | -35957.2 | 9655923.00279759 - 127140.3 | 30854.6 | 4830959.27105263 - 755.5 | 8731796.5 | 5637128.00267519 - 583.4 | 12226408.6 | 2462190.00467247 - 600.1 | 14595126.2 | 5061715.00117743 - | | + max | avg | sum +----------+------------+------------------- + 2658.2 | -35957.2 | 9655923.002797587 + 127140.3 | 30854.6 | 4830959.271052632 + 755.5 | 8731796.5 | 5637128.002675192 + 583.4 | 12226408.6 | 2462190.004672469 + 600.1 | 14595126.2 | 5061715.001177431 + | | (6 rows) --Testcase 60: @@ -743,48 +743,48 @@ select every((tags->>'sid6')::boolean = (tags->>'sid15')::boolean), bool_or(tags --Testcase 64: select every((tags->>'sid5')::boolean <> (tags->>'sid6')::boolean), sum((tags->>'sid2')::bigint / (fields->>'sig1')::bigint * (fields->>'sig3')::double precision), string_agg(tags->>'sid9' || (tags->>'sid18')::text, tags->>'sid17' || (tags->>'sid16')::text) from sctbl4 GROUP BY tags->>'sid14' ORDER BY tags->>'sid14'; - every | sum | string_agg --------+-----------+------------------------------------------------------------------------ - t | 96646.2 | 悲观失望希望美丽id1那就是他如何赢得100万美元id1辛辣仇恨挫败悲观情绪id1 - t | 46450.8 | 讨厌生活id2 - t | -216341.2 | 爱情不幸福id3 - t | -147716.4 | 生活无聊id4 - | | + every | sum | string_agg +-------+--------------------+------------------------------------------------------------------------ + t | 96646.2 | 悲观失望希望美丽id1那就是他如何赢得100万美元id1辛辣仇恨挫败悲观情绪id1 + t | 46450.799999999996 | 讨厌生活id2 + t | -216341.2 | 爱情不幸福id3 + t | -147716.4 | 生活无聊id4 + | | (5 rows) --Testcase 65: select min((fields->>'sig1')::bigint * (tags->>'sid20')::bigint - (tags->>'sid13')::double precision), bool_and(tags->>'sid4' != '%c%' AND tags->>'sid4' != '%a%'), max((tags->>'sid3')::bigint - (fields->>'sig3')::double precision + (tags->>'sid12')::double precision) from sctbl4 GROUP BY tags->>'sid13' ORDER BY (tags->>'sid13')::double precision; - min | bool_and | max -------------------+----------+---------------- - -7191568.9871 | t | 10781647646.7 - 2601956.5659 | t | 16802.8 - 177942825098.722 | t | 22220.9 - -4187440117.7 | t | 361645191845.6 - 11110452101.99 | t | 6154356.5 - | | + min | bool_and | max +-------------------+----------+---------------- + -7191568.9871 | t | 10781647646.7 + 2601956.5659 | t | 16802.8 + 177942825098.7216 | t | 22220.9 + -4187440117.7 | t | 361645191845.6 + 11110452101.99 | t | 6154356.5 + | | (6 rows) --Testcase 66: select bool_and((tags->>'sid6')::boolean != false OR (tags->>'sid11')::boolean = true), min((tags->>'sid13')::double precision / (fields->>'sig3')::double precision - (tags->>'sid12')::bigint), avg((tags->>'sid20')::bigint / (tags->>'sid12')::bigint + (tags->>'sid3')::bigint) from sctbl4 GROUP BY tags->>'sid12' ORDER BY (tags->>'sid12')::bigint; - bool_and | min | avg -----------+-------------------+----------------------- - t | -12198.035872549 | 3646.0000000000000000 - t | 1652.07707029703 | 9653.0000000000000000 - f | -6114621.41414634 | 7664.0000000000000000 - t | -10781647134.6323 | 38.0000000000000000 - t | -361645178744.23 | 4366.0000000000000000 - | | + bool_and | min | avg +----------+---------------------+----------------------- + t | -12198.035872549019 | 3646.0000000000000000 + t | 1652.0770702970294 | 9653.0000000000000000 + f | -6114621.414146341 | 7664.0000000000000000 + t | -10781647134.63232 | 38.0000000000000000 + t | -361645178744.2304 | 4366.0000000000000000 + | | (6 rows) --Testcase 67: select stddev((tags->>'sid13')::double precision + (fields->>'sig1')::bigint * (tags->>'sid2')::bigint), sum((tags->>'sid12')::bigint + (tags->>'sid20')::bigint - (tags->>'sid3')::bigint), string_agg(tags->>'sid7' || '豚は誰も好', 'なぜ18歳で' || (tags->>'sid17')::text) from sctbl4 GROUP BY tags->>'sid8' ORDER BY tags->>'sid8'; - stddev | sum | string_agg -------------------+--------------+------------------------------------------------------------------------- - | 10753 | constraint豚は誰も好 - | 361657498609 | cooperation豚は誰も好 - 44165363438.8025 | 10796365666 | freighter豚は誰も好なぜ18歳で那就是他如何赢得100万美元attract豚は誰も好 - | 15027939 | average豚は誰も好 - | | + stddev | sum | string_agg +-------------------+--------------+------------------------------------------------------------------------- + | 10753 | constraint豚は誰も好 + | 361657498609 | cooperation豚は誰も好 + 44165363438.80249 | 10796365666 | freighter豚は誰も好なぜ18歳で那就是他如何赢得100万美元attract豚は誰も好 + | 15027939 | average豚は誰も好 + | | (5 rows) --Testcase 68: @@ -929,10 +929,10 @@ select string_agg(tags->>'sid19' || (tags->>'sid17')::text || (tags->>'sid10'):: -- Select with WHERE multi-condition --Testcase 79: select avg((fields->>'sig3')::double precision + (tags->>'sid3')::bigint / (tags->>'sid12')::bigint), count(time) + count(tags->>'sid1') - sum((tags->>'sid2')::bigint), every((tags->>'sid11')::boolean = (tags->>'sid15')::boolean) from sctbl4 WHERE tags->>'sid9' LIKE '%挫败%' OR (tags->>'sid5')::boolean <> true OR tags->>'sid16' ILIKE 'id4' AND (tags->>'sid20')::bigint < 0 GROUP BY tags->>'sid11' ORDER BY tags->>'sid11'; - avg | ?column? | every --------+-----------+------- - 15.35 | -7293145 | t - 10.15 | -14717634 | t + avg | ?column? | every +--------------------+-----------+------- + 15.35 | -7293145 | t + 10.149999999999999 | -14717634 | t (2 rows) --Testcase 80: @@ -987,32 +987,32 @@ select stddev((tags->>'sid13')::double precision + (fields->>'sig1')::bigint * ( -- Select with HAVING LIMIT OFFSET --Testcase 84: select stddev((tags->>'sid2')::bigint * 0.9804754 + (tags->>'sid3')::bigint), min((tags->>'sid13')::double precision / ((fields->>'sig1')::bigint + 3.144)), stddev((tags->>'sid20')::bigint * (tags->>'sid2')::bigint - (tags->>'sid13')::double precision) from sctbl4 WHERE (fields->>'sig3')::double precision >= -999995.955 GROUP BY (fields->>'sig1')::bigint,(fields->>'sig3')::double precision HAVING (fields->>'sig3')::double precision > 0 ORDER BY (fields->>'sig1')::bigint LIMIT 10 OFFSET 10; - stddev | min | stddev ---------+------------------+-------- - | 524.997933198419 | - | | - | 4.65509362530285 | - | | - | | - | | - | 12.7509232266811 | - | | + stddev | min | stddev +--------+--------------------+-------- + | 524.9979331984193 | + | | + | 4.655093625302854 | + | | + | | + | | + | 12.750923226681131 | + | | (8 rows) --Testcase 85: select sum((fields->>'sig3')::double precision + (tags->>'sid3')::bigint * (tags->>'sid12')::bigint), string_agg(tags->>'sid7', tags->>'sid8'), string_agg(fields->>'sig2' || '568hvsvbka', 'も9質18問' || (tags->>'sid9')::text) from sctbl4 WHERE (fields->>'sig3')::double precision >= 0.3871647691 GROUP BY (fields->>'sig1')::bigint,(fields->>'sig3')::double precision,tags->>'sid15' HAVING (fields->>'sig3')::double precision <> 0 ORDER BY tags->>'sid15' LIMIT 10 OFFSET 0; - sum | string_agg | string_agg -----------------------+-------------+---------------------------- - 1.57894288862502e+15 | cooperation | 装置開発機能仕568hvsvbka - 409702609532.3 | freighter | C)@maEFJAe=3kake568hvsvbka - 47102269402.5 | average | システム568hvsvbka - 48006892.2 | constraint | BAEFOAWJ#AWEK568hvsvbka - 117115444.1 | attract | aoaowejf568hvsvbka - | | 装置開発機能仕568hvsvbka - | | C)@maEFJAe=3kake568hvsvbka - | | 012002'akewo02568hvsvbka - | | 012002'akewo02568hvsvbka - | | g029012568hvsvbka + sum | string_agg | string_agg +------------------------+-------------+---------------------------- + 1.5789428886250205e+15 | cooperation | 装置開発機能仕568hvsvbka + 409702609532.3 | freighter | C)@maEFJAe=3kake568hvsvbka + 47102269402.5 | average | システム568hvsvbka + 48006892.2 | constraint | BAEFOAWJ#AWEK568hvsvbka + 117115444.1 | attract | aoaowejf568hvsvbka + | | 装置開発機能仕568hvsvbka + | | C)@maEFJAe=3kake568hvsvbka + | | 012002'akewo02568hvsvbka + | | 012002'akewo02568hvsvbka + | | g029012568hvsvbka (10 rows) --Testcase 86: @@ -1293,7 +1293,11 @@ select sctbl4.tags->>'sid8' sid8, sctbl4.tags->>'sid9' sid9, (sctbl9.fields->>'s -- Clean --Testcase 103: DROP FOREIGN TABLE sctbl4; +--Testcase 104: DROP FOREIGN TABLE sctbl9; +--Testcase 105: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 106: DROP SERVER influxdb_svr CASCADE; +--Testcase 107: DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/schemaless/aggregate.out b/expected/15.0/schemaless/aggregate.out new file mode 100644 index 0000000..54d94a5 --- /dev/null +++ b/expected/15.0/schemaless/aggregate.out @@ -0,0 +1,849 @@ +--SET log_min_messages=debug1; +--SET client_min_messages=debug1; +--Testcase 1: +SET datestyle=ISO; +-- timestamp with time zone differs based on this +--Testcase 2: +SET timezone='UTC'; +\set ECHO none +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); +-- import time column as timestamp and text type +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); +--ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); +--ALTER SERVER server1 OPTIONS (ADD extensions 'influxdb_fdw'); +--Testcase 6: +SELECT * FROM t4; + time | time_text | tags | fields +------------------------+----------------------+----------------------------+----------------------------------- + 1970-01-01 00:00:00+00 | 1970-01-01T00:00:00Z | {"tag1": "a", "tag2": "x"} | {"value1": "1", "value2": "100"} + 1970-01-01 00:00:01+00 | 1970-01-01T00:00:01Z | {"tag1": "a", "tag2": "y"} | {"value1": "2", "value2": "100"} + 1970-01-01 00:00:02+00 | 1970-01-01T00:00:02Z | {"tag1": "a", "tag2": "x"} | {"value1": "3", "value2": "100"} + 1970-01-01 00:00:03+00 | 1970-01-01T00:00:03Z | {"tag1": "b", "tag2": "y"} | {"value1": "10", "value2": "200"} + 1970-01-01 00:00:04+00 | 1970-01-01T00:00:04Z | {"tag1": "b", "tag2": "z"} | {"value1": "20", "value2": "200"} + 1970-01-01 00:00:05+00 | 1970-01-01T00:00:05Z | {"tag1": "b", "tag2": "z"} | {"value1": "30", "value2": "200"} +(6 rows) + +--Testcase 7: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint),influx_time(time,interval '1s', interval '0.00001s'),tags->>'tag1' tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 1 sec'::interval, '@ 0.00001 secs'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m1s0u, 0d0h0m0s10u)), ("tag1") +(3 rows) + +--Testcase 8: +SELECT sum((fields->>'value1')::bigint),influx_time(time,interval '1s', interval '0.00001s'),tags->>'tag1' tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tags->>'tag1'; + sum | influx_time | tag1 +-----+------------------------------+------ + 1 | 1969-12-31 23:59:59.00001+00 | a + 2 | 1970-01-01 00:00:00.00001+00 | a + 3 | 1970-01-01 00:00:01.00001+00 | a + | 1970-01-01 00:00:02.00001+00 | a + | 1970-01-01 00:00:03.00001+00 | a + | 1970-01-01 00:00:04.00001+00 | a + | 1969-12-31 23:59:59.00001+00 | b + | 1970-01-01 00:00:00.00001+00 | b + | 1970-01-01 00:00:01.00001+00 | b + 10 | 1970-01-01 00:00:02.00001+00 | b + 20 | 1970-01-01 00:00:03.00001+00 | b + 30 | 1970-01-01 00:00:04.00001+00 | b +(12 rows) + +--Testcase 9: +EXPLAIN (verbose) +SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint),tags->>'tag2' tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY tags->>'tag2', tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=96) + Output: ((tags ->> 'tag1'::text)), (sum(((fields ->> 'value1'::text))::bigint)), ((tags ->> 'tag2'::text)) + InfluxDB query: SELECT sum("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY ("tag2"), ("tag1") +(3 rows) + +--Testcase 10: +SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint),tags->>'tag2' tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY tags->>'tag2', tags->>'tag1'; + tag1 | sum | tag2 +------+-----+------ + a | 4 | x + a | 2 | y + b | 10 | y + b | 50 | z +(4 rows) + +--Testcase 11: +SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint), count((fields->>'value1')::bigint), tags->>'tag2' tag2 FROM "t4" group by tags->>'tag1', tags->>'tag2'; + tag1 | sum | count | tag2 +------+-----+-------+------ + a | 4 | 2 | x + a | 2 | 1 | y + b | 10 | 1 | y + b | 50 | 2 | z +(4 rows) + +--Testcase 12: +EXPLAIN (verbose) SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint), count((fields->>'value1')::bigint), tags->>'tag2' tag2 FROM "t4" group by tags->>'tag1', tags->>'tag2'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=104) + Output: ((tags ->> 'tag1'::text)), (sum(((fields ->> 'value1'::text))::bigint)), (count(((fields ->> 'value1'::text))::bigint)), ((tags ->> 'tag2'::text)) + InfluxDB query: SELECT sum("value1"), count("value1") FROM "t4" GROUP BY ("tag1"), ("tag2") +(3 rows) + +--Testcase 13: +SELECT influx_time(time,interval '5s',interval '0s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY influx_time(time,interval '5s', interval '0s'), tags->>'tag1'; + influx_time | tag1 | last +------------------------+------+------ + 1970-01-01 00:00:00+00 | a | 3 + 1970-01-01 00:00:05+00 | a | + 1970-01-01 00:00:00+00 | b | 20 + 1970-01-01 00:00:05+00 | b | 30 +(4 rows) + +--Testcase 14: +EXPLAIN (VERBOSE) +SELECT influx_time(time,interval '5s',interval '0s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '5s', interval '0s'), tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (influx_time("time", '@ 5 secs'::interval, '@ 0'::interval)), ((tags ->> 'tag1'::text)), (last("time", ((fields ->> 'value1'::text))::bigint)) + InfluxDB query: SELECT last("value1") FROM "t4" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m5s0u, 0d0h0m0s0u)), ("tag1") +(3 rows) + +-- no offset +--Testcase 15: +SELECT influx_time(time,interval '5s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '5s'), tags->>'tag1'; + influx_time | tag1 | last +------------------------+------+------ + 1970-01-01 00:00:00+00 | a | 3 + 1970-01-01 00:00:05+00 | a | + 1970-01-01 00:00:00+00 | b | 20 + 1970-01-01 00:00:05+00 | b | 30 +(4 rows) + +--Testcase 16: +EXPLAIN (verbose) +SELECT last(time, (fields->>'value1')::bigint),last(time, (fields->>'value2')::bigint) FROM t4 GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (last("time", ((fields ->> 'value1'::text))::bigint)), (last("time", ((fields ->> 'value2'::text))::bigint)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT last("value1"), last("value2") FROM "t4" GROUP BY ("tag1") +(3 rows) + +--Testcase 17: +SELECT last(time, (fields->>'value1')::bigint),last(time, (fields->>'value2')::bigint) FROM t4 GROUP BY tags->>'tag1'; + last | last +------+------ + 3 | 100 + 30 | 200 +(2 rows) + +-- GROUP BY time intervals and fill() +--Testcase 18: +SELECT * FROM tx; + time | time_text | tags | fields +------------------------+----------------------+-----------------------------+------------------------------------ + 1970-01-01 00:00:00+00 | 1970-01-01T00:00:00Z | {"tag1": "a", "tag2": "x"} | {"value1": "1", "value2": "100"} + 1970-01-01 00:00:01+00 | 1970-01-01T00:00:01Z | {"tag1": "a", "tag2": "y"} | {"value1": "2", "value2": "100"} + 1970-01-01 00:00:02+00 | 1970-01-01T00:00:02Z | {"tag1": "a", "tag2": "x"} | {"value1": "3", "value2": "100"} + 1970-01-01 00:00:03+00 | 1970-01-01T00:00:03Z | {"tag1": "b", "tag2": "y"} | {"value1": "10", "value2": "200"} + 1970-01-01 00:00:04+00 | 1970-01-01T00:00:04Z | {"tag1": "b", "tag2": "z"} | {"value1": "20", "value2": "200"} + 1970-01-01 00:00:05+00 | 1970-01-01T00:00:05Z | {"tag1": "b", "tag2": "z"} | {"value1": "30", "value2": "200"} + 1970-01-01 00:00:06+00 | 1970-01-01T00:00:06Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} + 1970-01-01 00:00:07+00 | 1970-01-01T00:00:07Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} + 1970-01-01 00:00:08+00 | 1970-01-01T00:00:08Z | {"tag1": "b", "tag2": "z"} | {"value1": "80", "value2": "200"} + 1970-01-01 00:00:09+00 | 1970-01-01T00:00:09Z | {"tag1": "b", "tag2": "z"} | {"value1": "90", "value2": "200"} + 1970-01-01 00:00:10+00 | 1970-01-01T00:00:10Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} + 1970-01-01 00:00:11+00 | 1970-01-01T00:00:11Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} + 1970-01-01 00:00:12+00 | 1970-01-01T00:00:12Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} + 1970-01-01 00:00:13+00 | 1970-01-01T00:00:13Z | {"tag1": "b", "tag2": "z"} | {"value1": null, "value2": "200"} + 1970-01-01 00:00:14+00 | 1970-01-01T00:00:14Z | {"tag1": "b", "tag2": "z"} | {"value1": "140", "value2": "200"} + 1970-01-01 00:00:15+00 | 1970-01-01T00:00:15Z | {"tag1": "b", "tag2": "z"} | {"value1": "150", "value2": "200"} + 1970-01-01 00:00:16+00 | 1970-01-01T00:00:16Z | {"tag1": "c", "tag2": "zz"} | {"value1": null, "value2": "2000"} + 1970-01-01 00:00:20+00 | 1970-01-01T00:00:20Z | {"tag1": "c", "tag2": "zz"} | {"value1": null, "value2": "2000"} +(18 rows) + +--Testcase 19: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(100) +(3 rows) + +--Testcase 20: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); + sum | influx_time +-----+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + 100 | 1970-01-01 00:00:06+00 + 170 | 1970-01-01 00:00:08+00 + 100 | 1970-01-01 00:00:10+00 + 100 | 1970-01-01 00:00:12+00 + 290 | 1970-01-01 00:00:14+00 +(8 rows) + +--Testcase 21: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(100.001) +(3 rows) + +--Testcase 22: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); + sum | influx_time +---------+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + 100.001 | 1970-01-01 00:00:06+00 + 170 | 1970-01-01 00:00:08+00 + 100.001 | 1970-01-01 00:00:10+00 + 100.001 | 1970-01-01 00:00:12+00 + 290 | 1970-01-01 00:00:14+00 +(8 rows) + +--Testcase 23: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('none'::influx_fill_enum))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(none) +(3 rows) + +--Testcase 24: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); + sum | influx_time +-----+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + 170 | 1970-01-01 00:00:08+00 + 290 | 1970-01-01 00:00:14+00 +(5 rows) + +--Testcase 25: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('null'::influx_fill_enum))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(null) +(3 rows) + +--Testcase 26: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); + sum | influx_time +-----+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + | 1970-01-01 00:00:06+00 + 170 | 1970-01-01 00:00:08+00 + | 1970-01-01 00:00:10+00 + | 1970-01-01 00:00:12+00 + 290 | 1970-01-01 00:00:14+00 +(8 rows) + +--Testcase 27: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('previous'::influx_fill_enum))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(previous) +(3 rows) + +--Testcase 28: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); + sum | influx_time +-----+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + 50 | 1970-01-01 00:00:06+00 + 170 | 1970-01-01 00:00:08+00 + 170 | 1970-01-01 00:00:10+00 + 170 | 1970-01-01 00:00:12+00 + 290 | 1970-01-01 00:00:14+00 +(8 rows) + +--Testcase 29: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('linear'::influx_fill_enum))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)) fill(linear) +(3 rows) + +--Testcase 30: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); + sum | influx_time +-----+------------------------ + 3 | 1970-01-01 00:00:00+00 + 13 | 1970-01-01 00:00:02+00 + 50 | 1970-01-01 00:00:04+00 + 110 | 1970-01-01 00:00:06+00 + 170 | 1970-01-01 00:00:08+00 + 210 | 1970-01-01 00:00:10+00 + 250 | 1970-01-01 00:00:12+00 + 290 | 1970-01-01 00:00:14+00 +(8 rows) + +-- with offset interval '0.00001s' +--Testcase 31: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)) fill(100) +(3 rows) + +--Testcase 32: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); + sum | influx_time +-----+------------------------------ + 1 | 1969-12-31 23:59:58.00001+00 + 5 | 1970-01-01 00:00:00.00001+00 + 30 | 1970-01-01 00:00:02.00001+00 + 30 | 1970-01-01 00:00:04.00001+00 + 80 | 1970-01-01 00:00:06.00001+00 + 90 | 1970-01-01 00:00:08.00001+00 + 100 | 1970-01-01 00:00:10.00001+00 + 140 | 1970-01-01 00:00:12.00001+00 + 150 | 1970-01-01 00:00:14.00001+00 +(9 rows) + +--Testcase 33: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)), ("tag1") fill(100) +(3 rows) + +--Testcase 34: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1'; + sum | influx_time | tag1 +-----+------------------------------+------ + 1 | 1969-12-31 23:59:58.00001+00 | a + 5 | 1970-01-01 00:00:00.00001+00 | a + 100 | 1970-01-01 00:00:02.00001+00 | a + 100 | 1970-01-01 00:00:04.00001+00 | a + 100 | 1970-01-01 00:00:06.00001+00 | a + 100 | 1970-01-01 00:00:08.00001+00 | a + 100 | 1970-01-01 00:00:10.00001+00 | a + 100 | 1970-01-01 00:00:12.00001+00 | a + 100 | 1970-01-01 00:00:14.00001+00 | a + 100 | 1969-12-31 23:59:58.00001+00 | b + 100 | 1970-01-01 00:00:00.00001+00 | b + 30 | 1970-01-01 00:00:02.00001+00 | b + 30 | 1970-01-01 00:00:04.00001+00 | b + 80 | 1970-01-01 00:00:06.00001+00 | b + 90 | 1970-01-01 00:00:08.00001+00 | b + 100 | 1970-01-01 00:00:10.00001+00 | b + 140 | 1970-01-01 00:00:12.00001+00 | b + 150 | 1970-01-01 00:00:14.00001+00 | b +(18 rows) + +--Testcase 35: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=104) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, '@ 0.00001 secs'::interval, influx_fill_numeric(100))), ((tags ->> 'tag1'::text)), ((tags ->> 'tag2'::text)) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u, 0d0h0m0s10u)), ("tag1"), ("tag2") fill(100) +(3 rows) + +--Testcase 36: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; + sum | influx_time | tag1 | tag2 +-----+------------------------------+------+------ + 1 | 1969-12-31 23:59:58.00001+00 | a | x + 3 | 1970-01-01 00:00:00.00001+00 | a | x + 100 | 1970-01-01 00:00:02.00001+00 | a | x + 100 | 1970-01-01 00:00:04.00001+00 | a | x + 100 | 1970-01-01 00:00:06.00001+00 | a | x + 100 | 1970-01-01 00:00:08.00001+00 | a | x + 100 | 1970-01-01 00:00:10.00001+00 | a | x + 100 | 1970-01-01 00:00:12.00001+00 | a | x + 100 | 1970-01-01 00:00:14.00001+00 | a | x + 100 | 1969-12-31 23:59:58.00001+00 | a | y + 2 | 1970-01-01 00:00:00.00001+00 | a | y + 100 | 1970-01-01 00:00:02.00001+00 | a | y + 100 | 1970-01-01 00:00:04.00001+00 | a | y + 100 | 1970-01-01 00:00:06.00001+00 | a | y + 100 | 1970-01-01 00:00:08.00001+00 | a | y + 100 | 1970-01-01 00:00:10.00001+00 | a | y + 100 | 1970-01-01 00:00:12.00001+00 | a | y + 100 | 1970-01-01 00:00:14.00001+00 | a | y + 100 | 1969-12-31 23:59:58.00001+00 | b | y + 100 | 1970-01-01 00:00:00.00001+00 | b | y + 10 | 1970-01-01 00:00:02.00001+00 | b | y + 100 | 1970-01-01 00:00:04.00001+00 | b | y + 100 | 1970-01-01 00:00:06.00001+00 | b | y + 100 | 1970-01-01 00:00:08.00001+00 | b | y + 100 | 1970-01-01 00:00:10.00001+00 | b | y + 100 | 1970-01-01 00:00:12.00001+00 | b | y + 100 | 1970-01-01 00:00:14.00001+00 | b | y + 100 | 1969-12-31 23:59:58.00001+00 | b | z + 100 | 1970-01-01 00:00:00.00001+00 | b | z + 20 | 1970-01-01 00:00:02.00001+00 | b | z + 30 | 1970-01-01 00:00:04.00001+00 | b | z + 80 | 1970-01-01 00:00:06.00001+00 | b | z + 90 | 1970-01-01 00:00:08.00001+00 | b | z + 100 | 1970-01-01 00:00:10.00001+00 | b | z + 140 | 1970-01-01 00:00:12.00001+00 | b | z + 150 | 1970-01-01 00:00:14.00001+00 | b | z +(36 rows) + +--with tag1 +--Testcase 37: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(100) +(3 rows) + +--Testcase 38: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1'; + sum | influx_time | tag1 +-----+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + 100 | 1970-01-01 00:00:04+00 | a + 100 | 1970-01-01 00:00:06+00 | a + 100 | 1970-01-01 00:00:08+00 | a + 100 | 1970-01-01 00:00:10+00 | a + 100 | 1970-01-01 00:00:12+00 | a + 100 | 1970-01-01 00:00:14+00 | a + 100 | 1970-01-01 00:00:00+00 | b + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + 100 | 1970-01-01 00:00:06+00 | b + 170 | 1970-01-01 00:00:08+00 | b + 100 | 1970-01-01 00:00:10+00 | b + 100 | 1970-01-01 00:00:12+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(16 rows) + +--Testcase 39: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(100.001) +(3 rows) + +--Testcase 40: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1'; + sum | influx_time | tag1 +---------+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + 100.001 | 1970-01-01 00:00:04+00 | a + 100.001 | 1970-01-01 00:00:06+00 | a + 100.001 | 1970-01-01 00:00:08+00 | a + 100.001 | 1970-01-01 00:00:10+00 | a + 100.001 | 1970-01-01 00:00:12+00 | a + 100.001 | 1970-01-01 00:00:14+00 | a + 100.001 | 1970-01-01 00:00:00+00 | b + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + 100.001 | 1970-01-01 00:00:06+00 | b + 170 | 1970-01-01 00:00:08+00 | b + 100.001 | 1970-01-01 00:00:10+00 | b + 100.001 | 1970-01-01 00:00:12+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(16 rows) + +--Testcase 41: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('null')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('null'::influx_fill_enum))), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(null) +(3 rows) + +--Testcase 42: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('null')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tags->>'tag1'; + sum | influx_time | tag1 +-----+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + | 1970-01-01 00:00:04+00 | a + | 1970-01-01 00:00:06+00 | a + | 1970-01-01 00:00:08+00 | a + | 1970-01-01 00:00:10+00 | a + | 1970-01-01 00:00:12+00 | a + | 1970-01-01 00:00:14+00 | a + | 1970-01-01 00:00:00+00 | b + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + | 1970-01-01 00:00:06+00 | b + 170 | 1970-01-01 00:00:08+00 | b + | 1970-01-01 00:00:10+00 | b + | 1970-01-01 00:00:12+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(16 rows) + +--Testcase 43: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('none')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('none'::influx_fill_enum))), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(none) +(3 rows) + +--Testcase 44: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('none')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tags->>'tag1'; + sum | influx_time | tag1 +-----+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + 170 | 1970-01-01 00:00:08+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(6 rows) + +--Testcase 45: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('previous')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('previous'::influx_fill_enum))), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(previous) +(3 rows) + +--Testcase 46: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('previous')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tags->>'tag1'; + sum | influx_time | tag1 +-----+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + 3 | 1970-01-01 00:00:04+00 | a + 3 | 1970-01-01 00:00:06+00 | a + 3 | 1970-01-01 00:00:08+00 | a + 3 | 1970-01-01 00:00:10+00 | a + 3 | 1970-01-01 00:00:12+00 | a + 3 | 1970-01-01 00:00:14+00 | a + | 1970-01-01 00:00:00+00 | b + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + 50 | 1970-01-01 00:00:06+00 | b + 170 | 1970-01-01 00:00:08+00 | b + 170 | 1970-01-01 00:00:10+00 | b + 170 | 1970-01-01 00:00:12+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(16 rows) + +--Testcase 47: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('linear')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_option('linear'::influx_fill_enum))), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1") fill(linear) +(3 rows) + +--Testcase 48: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('linear')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tags->>'tag1'; + sum | influx_time | tag1 +-----+------------------------+------ + 3 | 1970-01-01 00:00:00+00 | a + 3 | 1970-01-01 00:00:02+00 | a + | 1970-01-01 00:00:04+00 | a + | 1970-01-01 00:00:06+00 | a + | 1970-01-01 00:00:08+00 | a + | 1970-01-01 00:00:10+00 | a + | 1970-01-01 00:00:12+00 | a + | 1970-01-01 00:00:14+00 | a + | 1970-01-01 00:00:00+00 | b + 10 | 1970-01-01 00:00:02+00 | b + 50 | 1970-01-01 00:00:04+00 | b + 110 | 1970-01-01 00:00:06+00 | b + 170 | 1970-01-01 00:00:08+00 | b + 210 | 1970-01-01 00:00:10+00 | b + 250 | 1970-01-01 00:00:12+00 | b + 290 | 1970-01-01 00:00:14+00 | b +(16 rows) + +--with tag1,tag2 +--Testcase 49: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=104) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric(100))), ((tags ->> 'tag1'::text)), ((tags ->> 'tag2'::text)) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1"), ("tag2") fill(100) +(3 rows) + +--Testcase 50: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; + sum | influx_time | tag1 | tag2 +-----+------------------------+------+------ + 1 | 1970-01-01 00:00:00+00 | a | x + 3 | 1970-01-01 00:00:02+00 | a | x + 100 | 1970-01-01 00:00:04+00 | a | x + 100 | 1970-01-01 00:00:06+00 | a | x + 100 | 1970-01-01 00:00:08+00 | a | x + 100 | 1970-01-01 00:00:10+00 | a | x + 100 | 1970-01-01 00:00:12+00 | a | x + 100 | 1970-01-01 00:00:14+00 | a | x + 2 | 1970-01-01 00:00:00+00 | a | y + 100 | 1970-01-01 00:00:02+00 | a | y + 100 | 1970-01-01 00:00:04+00 | a | y + 100 | 1970-01-01 00:00:06+00 | a | y + 100 | 1970-01-01 00:00:08+00 | a | y + 100 | 1970-01-01 00:00:10+00 | a | y + 100 | 1970-01-01 00:00:12+00 | a | y + 100 | 1970-01-01 00:00:14+00 | a | y + 100 | 1970-01-01 00:00:00+00 | b | y + 10 | 1970-01-01 00:00:02+00 | b | y + 100 | 1970-01-01 00:00:04+00 | b | y + 100 | 1970-01-01 00:00:06+00 | b | y + 100 | 1970-01-01 00:00:08+00 | b | y + 100 | 1970-01-01 00:00:10+00 | b | y + 100 | 1970-01-01 00:00:12+00 | b | y + 100 | 1970-01-01 00:00:14+00 | b | y + 100 | 1970-01-01 00:00:00+00 | b | z + 100 | 1970-01-01 00:00:02+00 | b | z + 50 | 1970-01-01 00:00:04+00 | b | z + 100 | 1970-01-01 00:00:06+00 | b | z + 170 | 1970-01-01 00:00:08+00 | b | z + 100 | 1970-01-01 00:00:10+00 | b | z + 100 | 1970-01-01 00:00:12+00 | b | z + 290 | 1970-01-01 00:00:14+00 | b | z +(32 rows) + +--Testcase 51: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1', tags->>'tag2'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=104) + Output: (sum(((fields ->> 'value1'::text))::bigint)), (influx_time("time", '@ 2 secs'::interval, influx_fill_numeric('100.001'::double precision))), ((tags ->> 'tag1'::text)), ((tags ->> 'tag2'::text)) + InfluxDB query: SELECT sum("value1") FROM "tx" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:15')) GROUP BY (time(0d0h0m2s0u)), ("tag1"), ("tag2") fill(100.001) +(3 rows) + +--Testcase 52: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1', tags->>'tag2'; + sum | influx_time | tag1 | tag2 +---------+------------------------+------+------ + 1 | 1970-01-01 00:00:00+00 | a | x + 3 | 1970-01-01 00:00:02+00 | a | x + 100.001 | 1970-01-01 00:00:04+00 | a | x + 100.001 | 1970-01-01 00:00:06+00 | a | x + 100.001 | 1970-01-01 00:00:08+00 | a | x + 100.001 | 1970-01-01 00:00:10+00 | a | x + 100.001 | 1970-01-01 00:00:12+00 | a | x + 100.001 | 1970-01-01 00:00:14+00 | a | x + 2 | 1970-01-01 00:00:00+00 | a | y + 100.001 | 1970-01-01 00:00:02+00 | a | y + 100.001 | 1970-01-01 00:00:04+00 | a | y + 100.001 | 1970-01-01 00:00:06+00 | a | y + 100.001 | 1970-01-01 00:00:08+00 | a | y + 100.001 | 1970-01-01 00:00:10+00 | a | y + 100.001 | 1970-01-01 00:00:12+00 | a | y + 100.001 | 1970-01-01 00:00:14+00 | a | y + 100.001 | 1970-01-01 00:00:00+00 | b | y + 10 | 1970-01-01 00:00:02+00 | b | y + 100.001 | 1970-01-01 00:00:04+00 | b | y + 100.001 | 1970-01-01 00:00:06+00 | b | y + 100.001 | 1970-01-01 00:00:08+00 | b | y + 100.001 | 1970-01-01 00:00:10+00 | b | y + 100.001 | 1970-01-01 00:00:12+00 | b | y + 100.001 | 1970-01-01 00:00:14+00 | b | y + 100.001 | 1970-01-01 00:00:00+00 | b | z + 100.001 | 1970-01-01 00:00:02+00 | b | z + 50 | 1970-01-01 00:00:04+00 | b | z + 100.001 | 1970-01-01 00:00:06+00 | b | z + 170 | 1970-01-01 00:00:08+00 | b | z + 100.001 | 1970-01-01 00:00:10+00 | b | z + 100.001 | 1970-01-01 00:00:12+00 | b | z + 290 | 1970-01-01 00:00:14+00 | b | z +(32 rows) + +-- unsupport syntax +--Testcase 53: +EXPLAIN (verbose) +SELECT influx_fill_numeric(100) FROM "tx"; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.tx (cost=10.00..4266.25 rows=3413 width=4) + Output: influx_fill_numeric(100) + InfluxDB query: SELECT * FROM "tx" +(3 rows) + +--Testcase 54: +SELECT influx_fill_numeric(100) FROM "tx"; +ERROR: stub influx_fill_numeric(int) is called +CONTEXT: PL/pgSQL function influx_fill_numeric(integer) line 3 at RAISE +--Testcase 55: +SELECT * FROM "tx" WHERE influx_fill_numeric(100) > 0; +ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function + +--Testcase 56: +EXPLAIN (verbose) +SELECT influx_fill_option('linear') FROM "tx"; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.tx (cost=10.00..4266.25 rows=3413 width=4) + Output: influx_fill_option('linear'::influx_fill_enum) + InfluxDB query: SELECT * FROM "tx" +(3 rows) + +--Testcase 57: +SELECT influx_fill_option('linear') FROM "tx"; +ERROR: stub influx_fill_option(influx_fill_enum) is called +CONTEXT: PL/pgSQL function influx_fill_option(influx_fill_enum) line 3 at RAISE +--Testcase 58: +SELECT * FROM "tx" WHERE influx_fill_option('linear') > 0; +ERROR: influxdb_fdw: syntax error influx_fill_numeric() or influx_fill_option() must be embedded inside influx_time() function + +-- InfluxDB does not return error for the following query +--SELECT sum(value1) FROM t4 GROUP BY value1; +-- not allowed +--Testcase 59: +SELECT sum((fields->>'value1')::bigint) FROM t4 GROUP BY time; + sum +----- + 30 + 20 + 10 + 1 + 2 + 3 +(6 rows) + +--last returns NULL for tag +--SELECT last(time, value1),last(time, value2),last(time, tag1) FROM t4 GROUP BY tag1; +--Testcase 60: +DROP FOREIGN TABLE t3; +--Testcase 61: +DROP FOREIGN TABLE t4; +--Testcase 62: +DROP FOREIGN TABLE cpu; +--Testcase 63: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 64: +DROP SERVER server1 CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to foreign table numbers +drop cascades to foreign table tx +--Testcase 65: +DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/schemaless/extra/aggregates.out b/expected/15.0/schemaless/extra/aggregates.out new file mode 100644 index 0000000..94df230 --- /dev/null +++ b/expected/15.0/schemaless/extra/aggregates.out @@ -0,0 +1,3418 @@ +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: +CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 5: +CREATE FOREIGN TABLE aggtest (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'agg', schemaless 'true'); +--Testcase 6: +CREATE FOREIGN TABLE student (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 7: +CREATE FOREIGN TABLE tenk1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); +--Testcase 8: +CREATE FOREIGN TABLE INT8_TBL (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 9: +CREATE FOREIGN TABLE INT8_TBL2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 10: +CREATE FOREIGN TABLE INT4_TBL (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 11: +CREATE FOREIGN TABLE INT4_TBL2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 12: +CREATE FOREIGN TABLE INT4_TBL3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 13: +CREATE FOREIGN TABLE INT4_TBL4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 14: +CREATE FOREIGN TABLE multi_arg_agg (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 15: +CREATE FOREIGN TABLE multi_arg_agg2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 16: +CREATE FOREIGN TABLE multi_arg_agg3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 17: +CREATE FOREIGN TABLE VARCHAR_TBL (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 18: +CREATE FOREIGN TABLE FLOAT8_TBL (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +-- +-- AGGREGATES +-- +-- directory paths are passed to us in environment variables +--\getenv abs_srcdir PG_ABS_SRCDIR +-- avoid bit-exact output here because operations may not be bit-exact. +--Testcase 19: +SET extra_float_digits = 0; +--\set filename :abs_srcdir '/init/agg.txt' +--COPY aggtest_nsc FROM :'filename'; +--ANALYZE aggtest_nsc; +-- avoid bit-exact output here because operations may not be bit-exact. +--Testcase 19: +SET extra_float_digits = 0; +--Testcase 20: +SELECT avg((fields->>'four')::int4) AS avg_1 FROM onek; + avg_1 +-------------------- + 1.5000000000000000 +(1 row) + +--Testcase 21: +SELECT avg((fields->>'a')::int2) AS avg_32 FROM aggtest WHERE (fields->>'a')::int2 < 100; + avg_32 +--------------------- + 32.6666666666666667 +(1 row) + +-- In 7.1, avg(float4) is computed using float8 arithmetic. +-- Round the result to 3 digits to avoid platform-specific results. +--Testcase 22: +SELECT avg((fields->>'b')::float4)::numeric(10,3) AS avg_107_943 FROM aggtest; + avg_107_943 +------------- + 107.943 +(1 row) + +--Testcase 23: +SELECT avg((fields->>'gpa')::float8) AS avg_3_4 FROM ONLY student; + avg_3_4 +--------- + 3.4 +(1 row) + +--Testcase 24: +SELECT sum((fields->>'four')::int4) AS sum_1500 FROM onek; + sum_1500 +---------- + 1500 +(1 row) + +--Testcase 25: +SELECT sum((fields->>'a')::int2) AS sum_198 FROM aggtest; + sum_198 +--------- + 198 +(1 row) + +--Testcase 26: +SELECT sum((fields->>'b')::float4) AS avg_431_773 FROM aggtest; + avg_431_773 +------------- + 431.773 +(1 row) + +--Testcase 27: +SELECT sum((fields->>'gpa')::float8) AS avg_6_8 FROM ONLY student; + avg_6_8 +--------- + 6.8 +(1 row) + +--Testcase 28: +SELECT max((fields->>'four')::int4) AS max_3 FROM onek; + max_3 +------- + 3 +(1 row) + +--Testcase 29: +SELECT max((fields->>'a')::int2) AS max_100 FROM aggtest; + max_100 +--------- + 100 +(1 row) + +--Testcase 30: +SELECT max((aggtest.fields->>'b')::float4) AS max_324_78 FROM aggtest; + max_324_78 +------------ + 324.78 +(1 row) + +--Testcase 31: +SELECT max((student.fields->>'gpa')::float8) AS max_3_7 FROM student; + max_3_7 +--------- + 3.7 +(1 row) + +--Testcase 32: +SELECT stddev_pop((fields->>'b')::float4) FROM aggtest; + stddev_pop +----------------- + 131.10703231895 +(1 row) + +--Testcase 33: +SELECT stddev_samp((fields->>'b')::float4) FROM aggtest; + stddev_samp +------------------ + 151.389360803998 +(1 row) + +--Testcase 34: +SELECT var_pop((fields->>'b')::float4) FROM aggtest; + var_pop +------------------ + 17189.0539234823 +(1 row) + +--Testcase 35: +SELECT var_samp((fields->>'b')::float4) FROM aggtest; + var_samp +------------------ + 22918.7385646431 +(1 row) + +--Testcase 36: +SELECT stddev_pop((fields->>'b')::numeric) FROM aggtest; + stddev_pop +------------------ + 131.107032862199 +(1 row) + +--Testcase 37: +SELECT stddev_samp((fields->>'b')::numeric) FROM aggtest; + stddev_samp +------------------ + 151.389361431288 +(1 row) + +--Testcase 38: +SELECT var_pop((fields->>'b')::numeric) FROM aggtest; + var_pop +-------------------- + 17189.054065929769 +(1 row) + +--Testcase 39: +SELECT var_samp((fields->>'b')::numeric) FROM aggtest; + var_samp +-------------------- + 22918.738754573025 +(1 row) + +-- population variance is defined for a single tuple, sample variance +-- is not +--Testcase 40: +CREATE FOREIGN TABLE agg_t5 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 41: +SELECT var_pop((fields->>'a')::float8), var_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 1; + var_pop | var_samp +---------+---------- + 0 | +(1 row) + +--Testcase 42: +SELECT stddev_pop((fields->>'a')::float8), stddev_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 2; + stddev_pop | stddev_samp +------------+------------- + 0 | +(1 row) + +--Testcase 43: +SELECT var_pop((fields->>'a')::float8), var_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 3; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 44: +SELECT stddev_pop((fields->>'a')::float8), stddev_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 3; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +--Testcase 45: +SELECT var_pop((fields->>'a')::float8), var_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 4; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 46: +SELECT stddev_pop((fields->>'a')::float8), stddev_samp((fields->>'b')::float8) FROM agg_t5 WHERE (fields->>'id')::int = 4; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +--Testcase 47: +SELECT var_pop((fields->>'a')::float4), var_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 1; + var_pop | var_samp +---------+---------- + 0 | +(1 row) + +--Testcase 48: +SELECT stddev_pop((fields->>'a')::float4), stddev_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 2; + stddev_pop | stddev_samp +------------+------------- + 0 | +(1 row) + +--Testcase 49: +SELECT var_pop((fields->>'a')::float4), var_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 3; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 50: +SELECT stddev_pop((fields->>'a')::float4), stddev_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 3; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +--Testcase 51: +SELECT var_pop((fields->>'a')::float4), var_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 4; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 52: +SELECT stddev_pop((fields->>'a')::float4), stddev_samp((fields->>'b')::float4) FROM agg_t5 WHERE (fields->>'id')::int = 4; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +--Testcase 53: +SELECT var_pop((fields->>'a')::numeric), var_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 1; + var_pop | var_samp +---------+---------- + 0 | +(1 row) + +--Testcase 54: +SELECT stddev_pop((fields->>'a')::numeric), stddev_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 2; + stddev_pop | stddev_samp +------------+------------- + 0 | +(1 row) + +--Testcase 55: +SELECT var_pop((fields->>'a')::numeric), var_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 3; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 56: +SELECT stddev_pop((fields->>'a')::numeric), stddev_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 3; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +--Testcase 57: +SELECT var_pop((fields->>'a')::numeric), var_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 4; + var_pop | var_samp +---------+---------- + NaN | +(1 row) + +--Testcase 58: +SELECT stddev_pop((fields->>'a')::numeric), stddev_samp((fields->>'b')::numeric) FROM agg_t5 WHERE (fields->>'id')::int = 4; + stddev_pop | stddev_samp +------------+------------- + NaN | +(1 row) + +-- verify correct results for null and NaN inputs +--Testcase 59: +create foreign table generate_series1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 60: +select sum(null::int4) from generate_series1; + sum +----- + +(1 row) + +--Testcase 61: +select sum(null::int8) from generate_series1; + sum +----- + +(1 row) + +--Testcase 62: +select sum(null::numeric) from generate_series1; + sum +----- + +(1 row) + +--Testcase 63: +select sum(null::float8) from generate_series1; + sum +----- + +(1 row) + +--Testcase 64: +select avg(null::int4) from generate_series1; + avg +----- + +(1 row) + +--Testcase 65: +select avg(null::int8) from generate_series1; + avg +----- + +(1 row) + +--Testcase 66: +select avg(null::numeric) from generate_series1; + avg +----- + +(1 row) + +--Testcase 67: +select avg(null::float8) from generate_series1; + avg +----- + +(1 row) + +--Testcase 68: +select sum('NaN'::numeric) from generate_series1; + sum +----- + NaN +(1 row) + +--Testcase 69: +select avg('NaN'::numeric) from generate_series1; + avg +----- + NaN +(1 row) + +-- verify correct results for infinite inputs +--Testcase 70: +create foreign table infinite1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 71: +SELECT sum((fields->>'x')::float8), avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) +FROM infinite1 WHERE (fields->>'id')::int = 1; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 72: +SELECT sum((fields->>'x')::float8), avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) +FROM infinite1 WHERE (fields->>'id')::int = 2; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 73: +SELECT sum((fields->>'x')::float8), avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) +FROM infinite1 WHERE (fields->>'id')::int = 3; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 74: +SELECT sum((fields->>'x')::float8), avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) +FROM infinite1 WHERE (fields->>'id')::int = 4; + sum | avg | var_pop +-----+-----+--------- + NaN | NaN | NaN +(1 row) + +--Testcase 75: +SELECT sum((fields->>'x')::float8), avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) +FROM infinite1 WHERE (fields->>'id')::int = 5; + sum | avg | var_pop +-----------+-----------+--------- + -Infinity | -Infinity | NaN +(1 row) + +--Testcase 76: +SELECT sum((fields->>'x')::numeric), avg((fields->>'x')::numeric), var_pop((fields->>'x')::numeric) +FROM infinite1 WHERE (fields->>'id')::int = 1; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 77: +SELECT sum((fields->>'x')::numeric), avg((fields->>'x')::numeric), var_pop((fields->>'x')::numeric) +FROM infinite1 WHERE (fields->>'id')::int = 2; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 78: +SELECT sum((fields->>'x')::numeric), avg((fields->>'x')::numeric), var_pop((fields->>'x')::numeric) +FROM infinite1 WHERE (fields->>'id')::int = 3; + sum | avg | var_pop +----------+----------+--------- + Infinity | Infinity | NaN +(1 row) + +--Testcase 79: +SELECT sum((fields->>'x')::numeric), avg((fields->>'x')::numeric), var_pop((fields->>'x')::numeric) +FROM infinite1 WHERE (fields->>'id')::int = 4; + sum | avg | var_pop +-----+-----+--------- + NaN | NaN | NaN +(1 row) + +--Testcase 80: +SELECT sum((fields->>'x')::numeric), avg((fields->>'x')::numeric), var_pop((fields->>'x')::numeric) +FROM infinite1 WHERE (fields->>'id')::int = 5; + sum | avg | var_pop +-----------+-----------+--------- + -Infinity | -Infinity | NaN +(1 row) + +-- test accuracy with a large input offset +--Testcase 81: +create foreign table large_input1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 82: +SELECT avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) +FROM large_input1 WHERE (fields->>'id')::int=1; + avg | var_pop +-----------+--------- + 100000005 | 2.5 +(1 row) + +--Testcase 83: +SELECT avg((fields->>'x')::float8), var_pop((fields->>'x')::float8) +FROM large_input1 WHERE (fields->>'id')::int=2; + avg | var_pop +---------------+--------- + 7000000000006 | 1 +(1 row) + +-- SQL2003 binary aggregates +--Testcase 84: +SELECT regr_count((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; + regr_count +------------ + 4 +(1 row) + +--Testcase 85: +SELECT regr_sxx((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; + regr_sxx +---------- + 5099 +(1 row) + +--Testcase 86: +SELECT regr_syy((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; + regr_syy +------------------ + 68756.2156939293 +(1 row) + +--Testcase 87: +SELECT regr_sxy((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; + regr_sxy +------------------ + 2614.51582155004 +(1 row) + +--Testcase 88: +SELECT regr_avgx((fields->>'b')::float4, (fields->>'a')::int2), regr_avgy((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; + regr_avgx | regr_avgy +-----------+------------------ + 49.5 | 107.943152273074 +(1 row) + +--Testcase 89: +SELECT regr_r2((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; + regr_r2 +-------------------- + 0.0194977982031803 +(1 row) + +--Testcase 90: +SELECT regr_slope((fields->>'b')::float4, (fields->>'a')::int2), regr_intercept((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; + regr_slope | regr_intercept +-------------------+------------------ + 0.512750700441271 | 82.5619926012309 +(1 row) + +--Testcase 91: +SELECT covar_pop((fields->>'b')::float4, (fields->>'a')::int2), covar_samp((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; + covar_pop | covar_samp +-----------------+------------------ + 653.62895538751 | 871.505273850014 +(1 row) + +--Testcase 92: +SELECT corr((fields->>'b')::float4, (fields->>'a')::int2) FROM aggtest; + corr +------------------- + 0.139634516517873 +(1 row) + +-- check single-tuple behavior +--Testcase 93: +create foreign table agg_t4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 94: +SELECT covar_pop((fields->>'a')::float8,(fields->>'b')::float8), covar_samp((fields->>'c')::float8,(fields->>'d')::float8) FROM agg_t4 WHERE (fields->>'id')::int = 1; + covar_pop | covar_samp +-----------+------------ + 0 | +(1 row) + +--Testcase 95: +SELECT covar_pop((fields->>'a')::float8,(fields->>'b')::float8), covar_samp((fields->>'c')::float8,(fields->>'d')::float8) FROM agg_t4 WHERE (fields->>'id')::int = 2; + covar_pop | covar_samp +-----------+------------ + NaN | +(1 row) + +--Testcase 96: +SELECT covar_pop((fields->>'a')::float8,(fields->>'b')::float8), covar_samp((fields->>'c')::float8,(fields->>'d')::float8) FROM agg_t4 WHERE (fields->>'id')::int = 3; + covar_pop | covar_samp +-----------+------------ + NaN | +(1 row) + +-- test accum and combine functions directly +--Testcase 97: +CREATE FOREIGN TABLE regr_test (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 98: +SELECT count(*), sum((fields->>'x')::float8), regr_sxx((fields->>'y')::float8,(fields->>'x')::float8), sum((fields->>'y')::float8),regr_syy((fields->>'y')::float8,(fields->>'x')::float8), regr_sxy((fields->>'y')::float8,(fields->>'x')::float8) +FROM regr_test WHERE (fields->>'x')::int IN (10,20,30,80); + count | sum | regr_sxx | sum | regr_syy | regr_sxy +-------+-----+----------+------+----------+---------- + 4 | 140 | 2900 | 1290 | 83075 | 15050 +(1 row) + +--Testcase 99: +SELECT count(*), sum((fields->>'x')::float8), regr_sxx((fields->>'y')::float8,(fields->>'x')::float8), sum((fields->>'y')::float8),regr_syy((fields->>'y')::float8,(fields->>'x')::float8), regr_sxy((fields->>'y')::float8,(fields->>'x')::float8) +FROM regr_test; + count | sum | regr_sxx | sum | regr_syy | regr_sxy +-------+-----+----------+------+----------+---------- + 5 | 240 | 6280 | 1490 | 95080 | 8680 +(1 row) + +--Testcase 100: +CREATE FOREIGN TABLE float8_arr (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 101: +SELECT float8_accum((fields->>'x')::float8[], 100) FROM float8_arr WHERE (fields->>'id')::int=1; + float8_accum +-------------- + {5,240,6280} +(1 row) + +--Testcase 102: +SELECT float8_regr_accum((fields->>'x')::float8[], 200, 100) FROM float8_arr WHERE (fields->>'id')::int=2; + float8_regr_accum +------------------------------ + {5,240,6280,1490,95080,8680} +(1 row) + +--Testcase 103: +SELECT count(*), sum((fields->>'x')::float8), regr_sxx((fields->>'y')::float8,(fields->>'x')::float8), sum((fields->>'y')::float8),regr_syy((fields->>'y')::float8,(fields->>'x')::float8), regr_sxy((fields->>'y')::float8,(fields->>'x')::float8) +FROM regr_test WHERE (fields->>'x')::int IN (10,20,30); + count | sum | regr_sxx | sum | regr_syy | regr_sxy +-------+-----+----------+-----+----------+---------- + 3 | 60 | 200 | 750 | 20000 | 2000 +(1 row) + +--Testcase 104: +SELECT count(*), sum((fields->>'x')::float8), regr_sxx((fields->>'y')::float8,(fields->>'x')::float8), sum((fields->>'y')::float8),regr_syy((fields->>'y')::float8,(fields->>'x')::float8), regr_sxy((fields->>'y')::float8,(fields->>'x')::float8) +FROM regr_test WHERE (fields->>'x')::int IN (80,100); + count | sum | regr_sxx | sum | regr_syy | regr_sxy +-------+-----+----------+-----+----------+---------- + 2 | 180 | 200 | 740 | 57800 | -3400 +(1 row) + +--Testcase 105: +SELECT float8_combine((fields->>'x')::float8[], (fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=3; + float8_combine +---------------- + {3,60,200} +(1 row) + +--Testcase 106: +SELECT float8_combine((fields->>'x')::float8[], (fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=4; + float8_combine +---------------- + {2,180,200} +(1 row) + +--Testcase 107: +SELECT float8_combine((fields->>'x')::float8[], (fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=5; + float8_combine +---------------- + {5,240,6280} +(1 row) + +--Testcase 108: +SELECT float8_regr_combine((fields->>'x')::float8[],(fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=6; + float8_regr_combine +--------------------------- + {3,60,200,750,20000,2000} +(1 row) + +--Testcase 109: +SELECT float8_regr_combine((fields->>'x')::float8[],(fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=7; + float8_regr_combine +----------------------------- + {2,180,200,740,57800,-3400} +(1 row) + +--Testcase 110: +SELECT float8_regr_combine((fields->>'x')::float8[],(fields->>'y')::float8[]) FROM float8_arr WHERE (fields->>'id')::int=8; + float8_regr_combine +------------------------------ + {5,240,6280,1490,95080,8680} +(1 row) + +--Testcase 111: +DROP FOREIGN TABLE regr_test; +-- test count, distinct +--Testcase 112: +SELECT count((fields->>'four')::int4) AS cnt_1000 FROM onek; + cnt_1000 +---------- + 1000 +(1 row) + +--Testcase 113: +SELECT count(DISTINCT (fields->>'four')::int4) AS cnt_4 FROM onek; + cnt_4 +------- + 4 +(1 row) + +--Testcase 114: +select (fields->>'ten')::int4 ten, count(*), sum((fields->>'four')::int4) from onek +group by fields->>'ten' order by fields->>'ten'; + ten | count | sum +-----+-------+----- + 0 | 100 | 100 + 1 | 100 | 200 + 2 | 100 | 100 + 3 | 100 | 200 + 4 | 100 | 100 + 5 | 100 | 200 + 6 | 100 | 100 + 7 | 100 | 200 + 8 | 100 | 100 + 9 | 100 | 200 +(10 rows) + +--Testcase 115: +select (fields->>'ten')::int4 ten, count((fields->>'four')::int4), sum(DISTINCT (fields->>'four')::int4) from onek +group by fields->>'ten' order by fields->>'ten'; + ten | count | sum +-----+-------+----- + 0 | 100 | 2 + 1 | 100 | 4 + 2 | 100 | 2 + 3 | 100 | 4 + 4 | 100 | 2 + 5 | 100 | 4 + 6 | 100 | 2 + 7 | 100 | 4 + 8 | 100 | 2 + 9 | 100 | 4 +(10 rows) + +-- user-defined aggregates +--Testcase 116: +CREATE AGGREGATE newavg ( + sfunc = int4_avg_accum, basetype = int4, stype = _int8, + finalfunc = int8_avg, + initcond1 = '{0,0}' +); +-- without finalfunc; test obsolete spellings 'sfunc1' etc +--Testcase 117: +CREATE AGGREGATE newsum ( + sfunc1 = int4pl, basetype = int4, stype1 = int4, + initcond1 = '0' +); +-- zero-argument aggregate +--Testcase 118: +CREATE AGGREGATE newcnt (*) ( + sfunc = int8inc, stype = int8, + initcond = '0', parallel = safe +); +-- old-style spelling of same (except without parallel-safe; that's too new) +--Testcase 119: +CREATE AGGREGATE oldcnt ( + sfunc = int8inc, basetype = 'ANY', stype = int8, + initcond = '0' +); +-- aggregate that only cares about null/nonnull input +--Testcase 120: +CREATE AGGREGATE newcnt ("any") ( + sfunc = int8inc_any, stype = int8, + initcond = '0' +); +-- multi-argument aggregate +--Testcase 121: +create function sum3(int8,int8,int8) returns int8 as +'select $1 + $2 + $3' language sql strict immutable; +--Testcase 122: +create aggregate sum2(int8,int8) ( + sfunc = sum3, stype = int8, + initcond = '0' +); +--Testcase 123: +SELECT newavg((fields->>'four')::int4) AS avg_1 FROM onek; + avg_1 +-------------------- + 1.5000000000000000 +(1 row) + +--Testcase 124: +SELECT newsum((fields->>'four')::int4) AS sum_1500 FROM onek; + sum_1500 +---------- + 1500 +(1 row) + +--Testcase 125: +SELECT newcnt((fields->>'four')::int4) AS cnt_1000 FROM onek; + cnt_1000 +---------- + 1000 +(1 row) + +--Testcase 126: +SELECT newcnt(*) AS cnt_1000 FROM onek; + cnt_1000 +---------- + 1000 +(1 row) + +--Testcase 127: +SELECT oldcnt(*) AS cnt_1000 FROM onek; + cnt_1000 +---------- + 1000 +(1 row) + +--Testcase 128: +SELECT sum2((fields->>'q1')::int8,(fields->>'q2')::int8) FROM int8_tbl; + sum2 +------------------- + 18271560493827981 +(1 row) + +-- test for outer-level aggregates +-- this should work +--Testcase 129: +select (fields->>'ten')::int4 ten, sum(distinct (fields->>'four')::int4) from onek a +group by fields->>'ten' +having exists (select 1 from onek b where sum(distinct (a.fields->>'four')::int4) = (b.fields->>'four')::int4); + ten | sum +-----+----- + 0 | 2 + 2 | 2 + 4 | 2 + 6 | 2 + 8 | 2 +(5 rows) + +-- this should fail because subquery has an agg of its own in WHERE +--Testcase 130: +select (fields->>'ten')::int4 ten, sum(distinct (fields->>'four')::int4) from onek a +group by fields->>'ten' +having exists (select 1 from onek b + where sum(distinct (a.fields->>'four')::int4 + (b.fields->>'four')::int4) = (b.fields->>'four')::int4); +ERROR: aggregate functions are not allowed in WHERE +LINE 4: where sum(distinct (a.fields->>'four')::int4 ... + ^ +-- Test handling of sublinks within outer-level aggregates. +-- Per bug report from Daniel Grace. +--Testcase 131: +select + (select max((select (i.fields->>'unique2')::int4 from tenk1 i where (i.fields->>'unique1')::int = (o.fields->>'unique1')::int))) +from tenk1 o; + max +------ + 9999 +(1 row) + +-- Test handling of Params within aggregate arguments in hashed aggregation. +-- Per bug report from Jeevan Chalke. +--Testcase 132: +explain (verbose, costs off) +select (s1.fields->>'a')::int a, ss.a, sm +from generate_series1 s1, + lateral (select (s2.fields->>'a')::int a, sum((s1.fields->>'a')::int + (s2.fields->>'a')::int) sm + from generate_series1 s2 group by s2.fields->>'a') ss +order by 1, 2; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (((s1.fields ->> 'a'::text))::integer), ((((s2.fields ->> 'a'::text)))::integer), (sum((((s1.fields ->> 'a'::text))::integer + (((s2.fields ->> 'a'::text)))::integer))) + Sort Key: (((s1.fields ->> 'a'::text))::integer), ((((s2.fields ->> 'a'::text)))::integer) + -> Nested Loop + Output: ((s1.fields ->> 'a'::text))::integer, ((((s2.fields ->> 'a'::text)))::integer), (sum((((s1.fields ->> 'a'::text))::integer + (((s2.fields ->> 'a'::text)))::integer))) + -> Foreign Scan on public.generate_series1 s1 + Output: s1.fields + InfluxDB query: SELECT * FROM "generate_series1" + -> HashAggregate + Output: (((s2.fields ->> 'a'::text)))::integer, sum((((s1.fields ->> 'a'::text))::integer + (((s2.fields ->> 'a'::text)))::integer)), ((s2.fields ->> 'a'::text)) + Group Key: (s2.fields ->> 'a'::text) + -> Foreign Scan on public.generate_series1 s2 + Output: (s2.fields ->> 'a'::text), s2.fields + InfluxDB query: SELECT * FROM "generate_series1" +(14 rows) + +--Testcase 133: +select (s1.fields->>'a')::int as s1, ss.a as s2, sm +from generate_series1 s1, + lateral (select (s2.fields->>'a')::int a, sum((s1.fields->>'a')::int + (s2.fields->>'a')::int) sm + from generate_series1 s2 group by s2.fields->>'a') ss +order by 1, 2; + s1 | s2 | sm +----+----+---- + 1 | 1 | 2 + 1 | 2 | 3 + 1 | 3 | 4 + 2 | 1 | 3 + 2 | 2 | 4 + 2 | 3 | 5 + 3 | 1 | 4 + 3 | 2 | 5 + 3 | 3 | 6 +(9 rows) + +--Testcase 134: +explain (verbose, costs off) +select array(select sum((x.fields->>'a')::int+(y.fields->>'a')::int) s + from generate_series1 y group by y.fields->>'a' order by s) + from generate_series1 x; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.generate_series1 x + Output: (SubPlan 1) + InfluxDB query: SELECT * FROM "generate_series1" + SubPlan 1 + -> Sort + Output: (sum((((x.fields ->> 'a'::text))::integer + (((y.fields ->> 'a'::text)))::integer))), ((y.fields ->> 'a'::text)) + Sort Key: (sum((((x.fields ->> 'a'::text))::integer + (((y.fields ->> 'a'::text)))::integer))) + -> HashAggregate + Output: sum((((x.fields ->> 'a'::text))::integer + (((y.fields ->> 'a'::text)))::integer)), ((y.fields ->> 'a'::text)) + Group Key: (y.fields ->> 'a'::text) + -> Foreign Scan on public.generate_series1 y + Output: (y.fields ->> 'a'::text), y.fields + InfluxDB query: SELECT * FROM "generate_series1" +(13 rows) + +--Testcase 135: +select array(select sum((x.fields->>'a')::int+(y.fields->>'a')::int) s + from generate_series1 y group by y.fields->>'a' order by s) + from generate_series1 x; + array +--------- + {2,3,4} + {3,4,5} + {4,5,6} +(3 rows) + +-- +-- test for bitwise integer aggregates +-- +--Testcase 136: +CREATE FOREIGN TABLE bitwise_test_empty (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +-- empty case +--Testcase 137: +SELECT + BIT_AND((fields->>'i2')::INT2) AS "?", + BIT_OR((fields->>'i4')::INT4) AS "?", + BIT_XOR((fields->>'i8')::INT8) AS "?" +FROM bitwise_test_empty; + ? | ? | ? +---+---+--- + | | +(1 row) + +--Testcase 138: +CREATE FOREIGN TABLE bitwise_test (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 139: +SELECT + BIT_AND((fields->>'i2')::INT2) AS "1", + BIT_AND((fields->>'i4')::INT4) AS "1", + BIT_AND((fields->>'i8')::INT8) AS "1", + BIT_AND((fields->>'i')::INT) AS "?", + BIT_AND((fields->>'x')::INT2) AS "0", + BIT_AND((fields->>'y')::BIT(4)) AS "0100", + BIT_OR((fields->>'i2')::INT2) AS "7", + BIT_OR((fields->>'i4')::INT4) AS "7", + BIT_OR((fields->>'i8')::INT8) AS "7", + BIT_OR((fields->>'i')::INT) AS "?", + BIT_OR((fields->>'x')::INT2) AS "7", + BIT_OR((fields->>'y')::BIT(4)) AS "1101", + BIT_XOR((fields->>'i2')::INT2) AS "5", + BIT_XOR((fields->>'i4')::INT4) AS "5", + BIT_XOR((fields->>'i8')::INT8) AS "5", + BIT_XOR((fields->>'i')::INT) AS "?", + BIT_XOR((fields->>'x')::INT2) AS "7", + BIT_XOR((fields->>'y')::BIT(4)) AS "1101" +FROM bitwise_test; + 1 | 1 | 1 | ? | 0 | 0100 | 7 | 7 | 7 | ? | 7 | 1101 | 5 | 5 | 5 | ? | 7 | 1101 +---+---+---+---+---+------+---+---+---+---+---+------+---+---+---+---+---+------ + 1 | 1 | 1 | 1 | 0 | 0100 | 7 | 7 | 7 | 3 | 7 | 1101 | 5 | 5 | 5 | 2 | 7 | 1101 +(1 row) + +-- +-- test boolean aggregates +-- +-- first test all possible transition and final states +--Testcase 140: +CREATE FOREIGN TABLE boolean1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 141: +SELECT + -- boolean and transitions + -- null because strict + booland_statefunc((fields->>'x1')::boolean, (fields->>'y1')::boolean) IS NULL AS "t", + booland_statefunc((fields->>'x2')::boolean, (fields->>'y2')::boolean) IS NULL AS "t", + booland_statefunc((fields->>'x3')::boolean, (fields->>'y3')::boolean) IS NULL AS "t", + booland_statefunc((fields->>'x4')::boolean, (fields->>'y4')::boolean) IS NULL AS "t", + booland_statefunc((fields->>'x5')::boolean, (fields->>'y5')::boolean) IS NULL AS "t", + -- and actual computations + booland_statefunc((fields->>'x6')::boolean, (fields->>'y6')::boolean) AS "t", + NOT booland_statefunc((fields->>'x7')::boolean, (fields->>'y7')::boolean) AS "t", + NOT booland_statefunc((fields->>'x8')::boolean, (fields->>'y8')::boolean) AS "t", + NOT booland_statefunc((fields->>'x9')::boolean, (fields->>'y9')::boolean) AS "t" FROM boolean1; + t | t | t | t | t | t | t | t | t +---+---+---+---+---+---+---+---+--- + t | t | t | t | t | t | t | t | t +(1 row) + +--Testcase 142: +SELECT + -- boolean or transitions + -- null because strict + boolor_statefunc((fields->>'x1')::boolean, (fields->>'y1')::boolean) IS NULL AS "t", + boolor_statefunc((fields->>'x2')::boolean, (fields->>'y2')::boolean) IS NULL AS "t", + boolor_statefunc((fields->>'x3')::boolean, (fields->>'y3')::boolean) IS NULL AS "t", + boolor_statefunc((fields->>'x4')::boolean, (fields->>'y4')::boolean) IS NULL AS "t", + boolor_statefunc((fields->>'x5')::boolean, (fields->>'y5')::boolean) IS NULL AS "t", + -- actual computations + boolor_statefunc((fields->>'x6')::boolean, (fields->>'y6')::boolean) AS "t", + boolor_statefunc((fields->>'x7')::boolean, (fields->>'y7')::boolean) AS "t", + boolor_statefunc((fields->>'x8')::boolean, (fields->>'y8')::boolean) AS "t", + NOT boolor_statefunc((fields->>'x9')::boolean, (fields->>'y9')::boolean) AS "t" FROM boolean1; + t | t | t | t | t | t | t | t | t +---+---+---+---+---+---+---+---+--- + t | t | t | t | t | t | t | t | t +(1 row) + +--Testcase 143: +CREATE FOREIGN TABLE bool_test_empty (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +-- empty case +--Testcase 144: +SELECT + BOOL_AND((fields->>'b1')::boolean) AS "n", + BOOL_OR((fields->>'b3')::boolean) AS "n" +FROM bool_test_empty; + n | n +---+--- + | +(1 row) + +--Testcase 145: +CREATE FOREIGN TABLE bool_test (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 146: +SELECT + BOOL_AND((fields->>'b1')::boolean) AS "f", + BOOL_AND((fields->>'b2')::boolean) AS "t", + BOOL_AND((fields->>'b3')::boolean) AS "f", + BOOL_AND((fields->>'b4')::boolean) AS "n", + BOOL_AND(NOT (fields->>'b2')::boolean) AS "f", + BOOL_AND(NOT (fields->>'b3')::boolean) AS "t" +FROM bool_test; + f | t | f | n | f | t +---+---+---+---+---+--- + f | t | f | | f | t +(1 row) + +--Testcase 147: +SELECT + EVERY((fields->>'b1')::boolean) AS "f", + EVERY((fields->>'b2')::boolean) AS "t", + EVERY((fields->>'b3')::boolean) AS "f", + EVERY((fields->>'b4')::boolean) AS "n", + EVERY(NOT (fields->>'b2')::boolean) AS "f", + EVERY(NOT (fields->>'b3')::boolean) AS "t" +FROM bool_test; + f | t | f | n | f | t +---+---+---+---+---+--- + f | t | f | | f | t +(1 row) + +--Testcase 148: +SELECT + BOOL_OR((fields->>'b1')::boolean) AS "t", + BOOL_OR((fields->>'b2')::boolean) AS "t", + BOOL_OR((fields->>'b3')::boolean) AS "f", + BOOL_OR((fields->>'b4')::boolean) AS "n", + BOOL_OR(NOT (fields->>'b2')::boolean) AS "f", + BOOL_OR(NOT (fields->>'b3')::boolean) AS "t" +FROM bool_test; + t | t | f | n | f | t +---+---+---+---+---+--- + t | t | f | | f | t +(1 row) + +-- +-- Test cases that should be optimized into indexscans instead of +-- the generic aggregate implementation. +-- +-- Basic cases +--Testcase 149: +explain (costs off) + select min((fields->>'unique1')::int4) from tenk1; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 150: +select min((fields->>'unique1')::int4) from tenk1; + min +----- + 0 +(1 row) + +--Testcase 151: +explain (costs off) + select max((fields->>'unique1')::int4) from tenk1; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 152: +select max((fields->>'unique1')::int4) from tenk1; + max +------ + 9999 +(1 row) + +--Testcase 153: +explain (costs off) + select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 < 42; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 154: +select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 < 42; + max +----- + 41 +(1 row) + +--Testcase 155: +explain (costs off) + select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > 42; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 156: +select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > 42; + max +------ + 9999 +(1 row) + +-- the planner may choose a generic aggregate here if parallel query is +-- enabled, since that plan will be parallel safe and the "optimized" +-- plan, which has almost identical cost, will not be. we want to test +-- the optimized plan, so temporarily disable parallel query. +begin; +--Testcase 157: +set local max_parallel_workers_per_gather = 0; +--Testcase 158: +explain (costs off) + select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > 42000; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 159: +select max((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > 42000; + max +----- +(0 rows) + +rollback; +-- multi-column index (uses tenk1_thous_tenthous) +--Testcase 160: +explain (costs off) + select max((fields->>'tenthous')::int4) from tenk1 where (fields->>'thousand')::int4 = 33; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 161: +select max((fields->>'tenthous')::int4) from tenk1 where (fields->>'thousand')::int4 = 33; + max +------ + 9033 +(1 row) + +--Testcase 162: +explain (costs off) + select min((fields->>'tenthous')::int4) from tenk1 where (fields->>'thousand')::int4 = 33; + QUERY PLAN +-------------- + Foreign Scan +(1 row) + +--Testcase 163: +select min((fields->>'tenthous')::int4) from tenk1 where (fields->>'thousand')::int4 = 33; + min +----- + 33 +(1 row) + +-- check parameter propagation into an indexscan subquery +--Testcase 164: +explain (costs off) + select (fields->>'f1')::int4 f1, (select min((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > (int4_tbl.fields->>'f1')::int4) AS gt + from int4_tbl; + QUERY PLAN +-------------------------- + Foreign Scan on int4_tbl + SubPlan 1 + -> Foreign Scan +(3 rows) + +--Testcase 165: +select (fields->>'f1')::int4 f1, (select min((fields->>'unique1')::int4) from tenk1 where (fields->>'unique1')::int4 > (int4_tbl.fields->>'f1')::int4) AS gt + from int4_tbl; + f1 | gt +-------------+---- + 0 | 1 + 123456 | + -123456 | 0 + 2147483647 | + -2147483647 | 0 +(5 rows) + +-- check some cases that were handled incorrectly in 8.3.0 +--Testcase 166: +explain (costs off) + select distinct max((fields->>'unique2')::int4) from tenk1; + QUERY PLAN +------------------------------------------------------------------ + Unique + -> Sort + Sort Key: (max(((fields ->> 'unique2'::text))::integer)) + -> Foreign Scan +(4 rows) + +--Testcase 167: +select distinct max((fields->>'unique2')::int4) from tenk1; + max +------ + 9999 +(1 row) + +--Testcase 168: +explain (costs off) + select max((fields->>'unique2')::int4) from tenk1 order by 1; + QUERY PLAN +------------------------------------------------------------ + Sort + Sort Key: (max(((fields ->> 'unique2'::text))::integer)) + -> Foreign Scan +(3 rows) + +--Testcase 169: +select max((fields->>'unique2')::int4) from tenk1 order by 1; + max +------ + 9999 +(1 row) + +--Testcase 170: +explain (costs off) + select max((fields->>'unique2')::int4) from tenk1 order by max((fields->>'unique2')::int4); + QUERY PLAN +------------------------------------------------------------ + Sort + Sort Key: (max(((fields ->> 'unique2'::text))::integer)) + -> Foreign Scan +(3 rows) + +--Testcase 171: +select max((fields->>'unique2')::int4) from tenk1 order by max((fields->>'unique2')::int4); + max +------ + 9999 +(1 row) + +--Testcase 172: +explain (costs off) + select max((fields->>'unique2')::int4) from tenk1 order by max((fields->>'unique2')::int4)+1; + QUERY PLAN +------------------------------------------------------------------ + Sort + Sort Key: ((max(((fields ->> 'unique2'::text))::integer) + 1)) + -> Foreign Scan +(3 rows) + +--Testcase 173: +select max((fields->>'unique2')::int4) from tenk1 order by max((fields->>'unique2')::int4)+1; + max +------ + 9999 +(1 row) + +--Testcase 174: +explain (costs off) + select max((fields->>'unique2')::int4), generate_series(1,3) as g from tenk1 order by g desc; + QUERY PLAN +------------------------------------------ + Sort + Sort Key: (generate_series(1, 3)) DESC + -> ProjectSet + -> Foreign Scan +(4 rows) + +--Testcase 175: +select max((fields->>'unique2')::int4), generate_series(1,3) as g from tenk1 order by g desc; + max | g +------+--- + 9999 | 3 + 9999 | 2 + 9999 | 1 +(3 rows) + +-- interesting corner case: constant gets optimized into a seqscan +--Testcase 176: +explain (costs off) + select max(100) from tenk1; + QUERY PLAN +---------------------------------------------------- + Result + InitPlan 1 (returns $0) + -> Limit + -> Result + One-Time Filter: (100 IS NOT NULL) + -> Foreign Scan on tenk1 +(6 rows) + +--Testcase 177: +select max(100) from tenk1; + max +----- + 100 +(1 row) + +-- try it on an inheritance tree +--Testcase 178: +create foreign table minmaxtest(fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 485: +create foreign table minmaxtest_nsc(f1 int) server influxdb_svr OPTIONS (table 'minmaxtest'); +--Testcase 179: +create table minmaxtest1() inherits (minmaxtest); +--Testcase 180: +create table minmaxtest2() inherits (minmaxtest); +--Testcase 181: +create table minmaxtest3() inherits (minmaxtest); +--create index minmaxtesti on minmaxtest(f1); +--Testcase 182: +create index minmaxtest1i on minmaxtest1(((fields->>'f1')::int)); +--Testcase 183: +create index minmaxtest2i on minmaxtest2(((fields->>'f1')::int) desc); +--Testcase 184: +create index minmaxtest3i on minmaxtest3(((fields->>'f1')::int)) where (fields->>'f1')::int is not null; +--Insert data to InfluxDB through non-schemaless foreign table +--Testcase 185: +insert into minmaxtest_nsc values(11), (12); +--Insert data to inherits schemaless tables +--Testcase 186: +insert into minmaxtest1 values('{"f1": "13"}'), ('{"f1": "14"}'); +--Testcase 187: +insert into minmaxtest2 values('{"f1": "15"}'), ('{"f1": "16"}'); +--Testcase 188: +insert into minmaxtest3 values('{"f1": "17"}'), ('{"f1": "18"}'); +--Testcase 189: +explain (costs off) + select min((fields->>'f1')::int), max((fields->>'f1')::int) from minmaxtest; + QUERY PLAN +----------------------------------------------------- + Aggregate + -> Append + -> Foreign Scan on minmaxtest minmaxtest_1 + -> Seq Scan on minmaxtest1 minmaxtest_2 + -> Seq Scan on minmaxtest2 minmaxtest_3 + -> Seq Scan on minmaxtest3 minmaxtest_4 +(6 rows) + +--Testcase 190: +select min((fields->>'f1')::int), max((fields->>'f1')::int) from minmaxtest; + min | max +-----+----- + 11 | 18 +(1 row) + +-- DISTINCT doesn't do anything useful here, but it shouldn't fail +--Testcase 191: +explain (costs off) + select distinct min((fields->>'f1')::int), max((fields->>'f1')::int) from minmaxtest; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------ + Unique + -> Sort + Sort Key: (min(((minmaxtest.fields ->> 'f1'::text))::integer)), (max(((minmaxtest.fields ->> 'f1'::text))::integer)) + -> Aggregate + -> Append + -> Foreign Scan on minmaxtest minmaxtest_1 + -> Seq Scan on minmaxtest1 minmaxtest_2 + -> Seq Scan on minmaxtest2 minmaxtest_3 + -> Seq Scan on minmaxtest3 minmaxtest_4 +(9 rows) + +--Testcase 192: +select distinct min((fields->>'f1')::int), max((fields->>'f1')::int) from minmaxtest; + min | max +-----+----- + 11 | 18 +(1 row) + +--Testcase 193: +drop foreign table minmaxtest cascade; +NOTICE: drop cascades to 3 other objects +DETAIL: drop cascades to table minmaxtest1 +drop cascades to table minmaxtest2 +drop cascades to table minmaxtest3 +--Testcase 486: +drop foreign table minmaxtest_nsc cascade; +-- check for correct detection of nested-aggregate errors +--Testcase 194: +select max(min((fields->>'unique1')::int4)) from tenk1; +ERROR: aggregate function calls cannot be nested +LINE 1: select max(min((fields->>'unique1')::int4)) from tenk1; + ^ +--Testcase 195: +select (select max(min((fields->>'unique1')::int4)) from int8_tbl) from tenk1; +ERROR: aggregate function calls cannot be nested +LINE 1: select (select max(min((fields->>'unique1')::int4)) from int... + ^ +-- +-- Test removal of redundant GROUP BY columns +-- +--Testcase 196: +create foreign table agg_t1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 197: +create foreign table agg_t2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 198: +create foreign table agg_t3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +-- Non-primary-key columns can be removed from GROUP BY +--Testcase 199: +explain (costs off) select (fields->>'a')::int a,(fields->>'b')::int b,(fields->>'c')::int c,(fields->>'d')::int d from agg_t1 group by (fields->>'a')::int,(fields->>'b')::int,(fields->>'c')::int,(fields->>'d')::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------- + HashAggregate + Group Key: ((fields ->> 'a'::text))::integer, ((fields ->> 'b'::text))::integer, ((fields ->> 'c'::text))::integer, ((fields ->> 'd'::text))::integer + -> Foreign Scan on agg_t1 +(3 rows) + +-- No removal can happen if the complete PK is not present in GROUP BY +--Testcase 200: +explain (costs off) select (fields->>'a')::int a,(fields->>'c')::int c from agg_t1 group by (fields->>'a')::int,(fields->>'c')::int,(fields->>'d')::int; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------- + HashAggregate + Group Key: ((fields ->> 'a'::text))::integer, ((fields ->> 'c'::text))::integer, ((fields ->> 'd'::text))::integer + -> Foreign Scan on agg_t1 +(3 rows) + +-- Test removal across multiple relations +--Testcase 201: +explain (costs off) select agg_t1.a, agg_t1.b, agg_t1.c, agg_t1.d, agg_t2.x, agg_t2.y, agg_t2.z +from (select (agg_t1.fields->>'a')::int a, (agg_t1.fields->>'b')::int b, (agg_t1.fields->>'c')::int c, (agg_t1.fields->>'d')::int d from agg_t1 agg_t1) agg_t1 inner join (select (agg_t2.fields->>'x')::int x, (agg_t2.fields->>'y')::int y, (agg_t2.fields->>'z')::int z from agg_t2 agg_t2) agg_t2 on (agg_t1.a)::int = (agg_t2.x)::int and (agg_t1.b)::int = (agg_t2.y)::int +group by (agg_t1.a)::int,(agg_t1.b)::int,(agg_t1.c)::int,(agg_t1.d)::int,(agg_t2.x)::int,(agg_t2.y)::int,(agg_t2.z)::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Group + Group Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer), (((agg_t1.fields ->> 'c'::text))::integer), (((agg_t1.fields ->> 'd'::text))::integer), (((agg_t2.fields ->> 'x'::text))::integer), (((agg_t2.fields ->> 'y'::text))::integer), (((agg_t2.fields ->> 'z'::text))::integer) + -> Incremental Sort + Sort Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer), (((agg_t1.fields ->> 'c'::text))::integer), (((agg_t1.fields ->> 'd'::text))::integer), (((agg_t2.fields ->> 'z'::text))::integer) + Presorted Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer) + -> Merge Join + Merge Cond: (((((agg_t1.fields ->> 'a'::text))::integer) = (((agg_t2.fields ->> 'x'::text))::integer)) AND ((((agg_t1.fields ->> 'b'::text))::integer) = (((agg_t2.fields ->> 'y'::text))::integer))) + -> Sort + Sort Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer) + -> Foreign Scan on agg_t1 + -> Sort + Sort Key: (((agg_t2.fields ->> 'x'::text))::integer), (((agg_t2.fields ->> 'y'::text))::integer) + -> Foreign Scan on agg_t2 +(13 rows) + +-- Test case where agg_t1 can be optimized but not agg_t2 +--Testcase 202: +explain (costs off) select agg_t1.*,agg_t2.x, agg_t2.z +from (select (agg_t1.fields->>'a')::int a, (agg_t1.fields->>'b')::int b, (agg_t1.fields->>'c')::int c, (agg_t1.fields->>'d')::int d from agg_t1 agg_t1) agg_t1 inner join (select (agg_t2.fields->>'x')::int x, (agg_t2.fields->>'y')::int y, (agg_t2.fields->>'z')::int z from agg_t2 agg_t2) agg_t2 on (agg_t1.a)::int = (agg_t2.x)::int and (agg_t1.b)::int = (agg_t2.y)::int +group by (agg_t1.a)::int,(agg_t1.b)::int,(agg_t1.c)::int,(agg_t1.d)::int,(agg_t2.x)::int,(agg_t2.z)::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Group + Group Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer), (((agg_t1.fields ->> 'c'::text))::integer), (((agg_t1.fields ->> 'd'::text))::integer), (((agg_t2.fields ->> 'x'::text))::integer), (((agg_t2.fields ->> 'z'::text))::integer) + -> Incremental Sort + Sort Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer), (((agg_t1.fields ->> 'c'::text))::integer), (((agg_t1.fields ->> 'd'::text))::integer), (((agg_t2.fields ->> 'z'::text))::integer) + Presorted Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer) + -> Merge Join + Merge Cond: (((((agg_t1.fields ->> 'a'::text))::integer) = (((agg_t2.fields ->> 'x'::text))::integer)) AND ((((agg_t1.fields ->> 'b'::text))::integer) = (((agg_t2.fields ->> 'y'::text))::integer))) + -> Sort + Sort Key: (((agg_t1.fields ->> 'a'::text))::integer), (((agg_t1.fields ->> 'b'::text))::integer) + -> Foreign Scan on agg_t1 + -> Sort + Sort Key: (((agg_t2.fields ->> 'x'::text))::integer), (((agg_t2.fields ->> 'y'::text))::integer) + -> Foreign Scan on agg_t2 +(13 rows) + +-- Cannot optimize when PK is deferrable +--Testcase 203: +explain (costs off) select (fields->>'a')::int a,(fields->>'b')::int b,(fields->>'c')::int c from agg_t3 group by (fields->>'a')::int,(fields->>'b')::int,(fields->>'c')::int; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------- + HashAggregate + Group Key: ((fields ->> 'a'::text))::integer, ((fields ->> 'b'::text))::integer, ((fields ->> 'c'::text))::integer + -> Foreign Scan on agg_t3 +(3 rows) + +--Testcase 204: +create temp table agg_t1c () inherits (agg_t1); +-- Ensure we don't remove any columns when agg_t1 has a child table +--Testcase 205: +explain (costs off) select (fields->>'a')::int a,(fields->>'b')::int b,(fields->>'c')::int c,(fields->>'d')::int d from agg_t1 group by (fields->>'a')::int,(fields->>'b')::int,(fields->>'c')::int,(fields->>'d')::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + HashAggregate + Group Key: ((agg_t1.fields ->> 'a'::text))::integer, ((agg_t1.fields ->> 'b'::text))::integer, ((agg_t1.fields ->> 'c'::text))::integer, ((agg_t1.fields ->> 'd'::text))::integer + -> Result + -> Append + -> Foreign Scan on agg_t1 agg_t1_1 + -> Seq Scan on agg_t1c agg_t1_2 +(6 rows) + +-- Okay to remove columns if we're only querying the parent. +--Testcase 206: +explain (costs off) select (fields->>'a')::int a,(fields->>'b')::int b,(fields->>'c')::int c,(fields->>'d')::int d from only agg_t1 group by (fields->>'a')::int,(fields->>'b')::int,(fields->>'c')::int,(fields->>'d')::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------- + HashAggregate + Group Key: ((fields ->> 'a'::text))::integer, ((fields ->> 'b'::text))::integer, ((fields ->> 'c'::text))::integer, ((fields ->> 'd'::text))::integer + -> Foreign Scan on agg_t1 +(3 rows) + +--Testcase 207: +create temp table p_agg_t1 ( + a int, + b int, + c int, + d int, + primary key(a,b) +) partition by list(a); +--Testcase 208: +create temp table p_agg_t1_1 partition of p_agg_t1 for values in(1); +--Testcase 209: +create temp table p_agg_t1_2 partition of p_agg_t1 for values in(2); +-- Ensure we can remove non-PK columns for partitioned tables. +--Testcase 210: +explain (costs off) select * from p_agg_t1 group by a,b,c,d; + QUERY PLAN +------------------------------------- + HashAggregate + Group Key: p_agg_t1.a, p_agg_t1.b + -> Append + -> Seq Scan on p_agg_t1_1 + -> Seq Scan on p_agg_t1_2 +(5 rows) + +--Testcase 211: +drop foreign table agg_t1 cascade; +NOTICE: drop cascades to table agg_t1c +--Testcase 212: +drop foreign table agg_t2 cascade; +--Testcase 213: +drop foreign table agg_t3 cascade; +--Testcase 214: +drop table p_agg_t1; +-- +-- Test GROUP BY matching of join columns that are type-coerced due to USING +-- +--Testcase 215: +create foreign table agg_t1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 216: +create foreign table agg_t2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 217: +select f1 from (select (fields->>'f1')::int f1, (fields->>'f2')::bigint f2 from agg_t1) agg_t1 left join (select (fields->>'f1')::bigint f1, (fields->>'f22')::bigint f22 from agg_t2) agg_t2 using (f1) group by f1; + f1 +---- +(0 rows) + +--Testcase 218: +select f1 from (select (fields->>'f1')::int f1, (fields->>'f2')::bigint f2 from agg_t1) agg_t1 left join (select (fields->>'f1')::bigint f1, (fields->>'f22')::bigint f22 from agg_t2) agg_t2 using (f1) group by agg_t1.f1; + f1 +---- +(0 rows) + +--Testcase 219: +select (agg_t1.fields->>'f1')::int f1 from agg_t1 left join (select (fields->>'f1')::bigint f1, (fields->>'f22')::bigint f22 from agg_t2) agg_t2 on (agg_t1.fields->>'f1')::bigint = (agg_t2.f1)::bigint group by (agg_t1.fields->>'f1')::int; + f1 +---- +(0 rows) + +-- only this one should fail: +--Testcase 220: +select (agg_t1.fields->>'f1')::int f1 from agg_t1 left join (select (fields->>'f1')::bigint f1, (fields->>'f22')::bigint f22 from agg_t2) agg_t2 on (agg_t1.fields->>'f1')::bigint = (agg_t2.f1)::bigint group by f1; +ERROR: column "agg_t1.fields" must appear in the GROUP BY clause or be used in an aggregate function +LINE 1: select (agg_t1.fields->>'f1')::int f1 from agg_t1 left join ... + ^ +--Testcase 221: +drop foreign table agg_t1 cascade; +--Testcase 222: +drop foreign table agg_t2 cascade; +-- +-- Test combinations of DISTINCT and/or ORDER BY +-- +begin; +--Testcase 223: +select array_agg(fields->>'q1' order by (fields->>'q2')::int8) + from INT8_TBL2; + array_agg +----------- + {3,4,2,1} +(1 row) + +--Testcase 224: +select array_agg(fields->>'q1' order by (fields->>'q1')::int8) + from INT8_TBL2; + array_agg +----------- + {1,2,3,4} +(1 row) + +--Testcase 225: +select array_agg(fields->>'q1' order by (fields->>'q1')::int8 desc) + from INT8_TBL2; + array_agg +----------- + {4,3,2,1} +(1 row) + +--Testcase 226: +select array_agg(fields->>'q2' order by (fields->>'q1')::int8 desc) + from INT8_TBL2; + array_agg +----------- + {2,1,3,4} +(1 row) + +--Testcase 227: +select array_agg(distinct (fields->>'f1')::int4) + from INT4_TBL2; + array_agg +----------- + {1,2,3} +(1 row) + +--Testcase 228: +select array_agg(distinct (fields->>'f1')::int4 order by (fields->>'f1')::int4) + from INT4_TBL2; + array_agg +----------- + {1,2,3} +(1 row) + +--Testcase 229: +select array_agg(distinct (fields->>'f1')::int4 order by (fields->>'f1')::int4 desc) + from INT4_TBL2; + array_agg +----------- + {3,2,1} +(1 row) + +--Testcase 230: +select array_agg(distinct (fields->>'f1')::int4 order by (fields->>'f1')::int4 desc nulls last) + from INT4_TBL2; + array_agg +----------- + {3,2,1} +(1 row) + +rollback; +-- multi-arg aggs, strict/nonstrict, distinct/order by +--Testcase 231: +create type aggtype as (a integer, b integer, c text); +--Testcase 232: +create function aggf_trans(aggtype[],integer,integer,text) returns aggtype[] +as 'select array_append($1,ROW($2,$3,$4)::aggtype)' +language sql strict immutable; +--Testcase 233: +create function aggfns_trans(aggtype[],integer,integer,text) returns aggtype[] +as 'select array_append($1,ROW($2,$3,$4)::aggtype)' +language sql immutable; +--Testcase 234: +create aggregate aggfstr(integer,integer,text) ( + sfunc = aggf_trans, stype = aggtype[], + initcond = '{}' +); +--Testcase 235: +create aggregate aggfns(integer,integer,text) ( + sfunc = aggfns_trans, stype = aggtype[], sspace = 10000, + initcond = '{}' +); +begin; +--Testcase 236: +select aggfstr((fields->>'a')::int,(fields->>'b')::int,fields->>'c') + from multi_arg_agg; + aggfstr +--------------------------------------- + {"(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 237: +select aggfns((fields->>'a')::int,(fields->>'b')::int,fields->>'c') + from multi_arg_agg; + aggfns +----------------------------------------------- + {"(1,3,foo)","(0,,)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 238: +select aggfstr(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c') + from multi_arg_agg, + generate_series(1,3) i; + aggfstr +--------------------------------------- + {"(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 239: +select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c') + from multi_arg_agg, + generate_series(1,3) i; + aggfns +----------------------------------------------- + {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 240: +select aggfstr(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'b')::int) + from multi_arg_agg, + generate_series(1,3) i; + aggfstr +--------------------------------------- + {"(3,1,baz)","(2,2,bar)","(1,3,foo)"} +(1 row) + +--Testcase 241: +select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'b')::int) + from multi_arg_agg, + generate_series(1,3) i; + aggfns +----------------------------------------------- + {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} +(1 row) + +-- test specific code paths +--Testcase 242: +select aggfns(distinct (fields->>'a')::int,(fields->>'a')::int,fields->>'c' order by fields->>'c' using ~<~,(fields->>'a')::int) + from multi_arg_agg, + generate_series(1,2) i; + aggfns +------------------------------------------------ + {"(2,2,bar)","(3,3,baz)","(1,1,foo)","(0,0,)"} +(1 row) + +--Testcase 243: +select aggfns(distinct (fields->>'a')::int,(fields->>'a')::int,fields->>'c' order by fields->>'c' using ~<~) + from multi_arg_agg, + generate_series(1,2) i; + aggfns +------------------------------------------------ + {"(2,2,bar)","(3,3,baz)","(1,1,foo)","(0,0,)"} +(1 row) + +--Testcase 244: +select aggfns(distinct (fields->>'a')::int,(fields->>'a')::int,fields->>'c' order by (fields->>'a')::int) + from multi_arg_agg, + generate_series(1,2) i; + aggfns +------------------------------------------------ + {"(0,0,)","(1,1,foo)","(2,2,bar)","(3,3,baz)"} +(1 row) + +--Testcase 245: +select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'a')::int,fields->>'c' using ~<~,(fields->>'b')::int) + from multi_arg_agg, + generate_series(1,2) i; + aggfns +----------------------------------------------- + {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +-- check node I/O via view creation and usage, also deparsing logic +--Testcase 246: +create view agg_view1 as + select aggfns((fields->>'a')::int,(fields->>'b')::int,fields->>'c') + from multi_arg_agg; +--Testcase 247: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(1,3,foo)","(0,,)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 248: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + SELECT aggfns(((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text)) AS aggfns+ + FROM multi_arg_agg; +(1 row) + +--Testcase 249: +create or replace view agg_view1 as + select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c') + from multi_arg_agg, + generate_series(1,3) i; +--Testcase 250: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 251: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + SELECT aggfns(DISTINCT ((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text)) AS aggfns+ + FROM multi_arg_agg, + + generate_series(1, 3) i(i); +(1 row) + +--Testcase 252: +create or replace view agg_view1 as + select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'b')::int) + from multi_arg_agg, + generate_series(1,3) i; +--Testcase 253: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} +(1 row) + +--Testcase 254: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + SELECT aggfns(DISTINCT ((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) ORDER BY ((multi_arg_agg.fields ->> 'b'::text))::integer) AS aggfns+ + FROM multi_arg_agg, + + generate_series(1, 3) i(i); +(1 row) + +--Testcase 255: +create or replace view agg_view1 as + select aggfns((fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'b')::int+1) + from multi_arg_agg; +--Testcase 256: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} +(1 row) + +--Testcase 257: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + SELECT aggfns(((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) ORDER BY (((multi_arg_agg.fields ->> 'b'::text))::integer + 1)) AS aggfns+ + FROM multi_arg_agg; +(1 row) + +--Testcase 258: +create or replace view agg_view1 as + select aggfns((fields->>'a')::int,(fields->>'a')::int,fields->>'c' order by (fields->>'b')::int) + from multi_arg_agg; +--Testcase 259: +select * from agg_view1; + aggfns +------------------------------------------------ + {"(3,3,baz)","(2,2,bar)","(1,1,foo)","(0,0,)"} +(1 row) + +--Testcase 260: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + SELECT aggfns(((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'a'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) ORDER BY ((multi_arg_agg.fields ->> 'b'::text))::integer) AS aggfns+ + FROM multi_arg_agg; +(1 row) + +--Testcase 261: +create or replace view agg_view1 as + select aggfns((fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by fields->>'c' using ~<~) + from multi_arg_agg; +--Testcase 262: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(2,2,bar)","(3,1,baz)","(1,3,foo)","(0,,)"} +(1 row) + +--Testcase 263: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + SELECT aggfns(((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) ORDER BY (multi_arg_agg.fields ->> 'c'::text) USING ~<~ NULLS LAST) AS aggfns+ + FROM multi_arg_agg; +(1 row) + +--Testcase 264: +create or replace view agg_view1 as + select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'a')::int,fields->>'c' using ~<~,(fields->>'b')::int) + from multi_arg_agg, + generate_series(1,2) i; +--Testcase 265: +select * from agg_view1; + aggfns +----------------------------------------------- + {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} +(1 row) + +--Testcase 266: +select pg_get_viewdef('agg_view1'::regclass); + pg_get_viewdef +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + SELECT aggfns(DISTINCT ((multi_arg_agg.fields ->> 'a'::text))::integer, ((multi_arg_agg.fields ->> 'b'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) ORDER BY ((multi_arg_agg.fields ->> 'a'::text))::integer, (multi_arg_agg.fields ->> 'c'::text) USING ~<~ NULLS LAST, ((multi_arg_agg.fields ->> 'b'::text))::integer) AS aggfns+ + FROM multi_arg_agg, + + generate_series(1, 2) i(i); +(1 row) + +--Testcase 267: +drop view agg_view1; +rollback; +-- incorrect DISTINCT usage errors +--Testcase 268: +select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by i) + from multi_arg_agg2, generate_series(1,2) i; +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: ...lds->>'a')::int,(fields->>'b')::int,fields->>'c' order by i) + ^ +--Testcase 269: +select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'a')::int,(fields->>'b')::int+1) + from multi_arg_agg2, generate_series(1,2) i; +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: ...)::int,fields->>'c' order by (fields->>'a')::int,(fields->>'... + ^ +--Testcase 270: +select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'a')::int,(fields->>'b')::int,i,fields->>'c') + from multi_arg_agg2, generate_series(1,2) i; +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: ... order by (fields->>'a')::int,(fields->>'b')::int,i,fields->... + ^ +--Testcase 271: +select aggfns(distinct (fields->>'a')::int,(fields->>'a')::int,fields->>'c' order by (fields->>'a')::int,(fields->>'b')::int) + from multi_arg_agg2, generate_series(1,2) i; +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: ...)::int,fields->>'c' order by (fields->>'a')::int,(fields->>'... + ^ +-- string_agg tests +--Testcase 272: +create foreign table string_agg1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 273: +create foreign table string_agg2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 274: +create foreign table string_agg3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 275: +create foreign table string_agg4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 276: +select string_agg(fields->>'a1',',') from string_agg1; + string_agg +---------------- + aaaa,bbbb,cccc +(1 row) + +--Testcase 277: +select string_agg(fields->>'a1',',') from string_agg2; + string_agg +---------------- + aaaa,bbbb,cccc +(1 row) + +--Testcase 278: +select string_agg(fields->>'a1','AB') from string_agg3; + string_agg +------------ + bbbbABcccc +(1 row) + +--Testcase 279: +select string_agg(fields->>'a1',',') from string_agg4; + string_agg +------------ + +(1 row) + +-- check some implicit casting cases, as per bug #5564 +--Testcase 280: +select string_agg(distinct (fields->>'f1')::varchar, ',' order by (fields->>'f1')::varchar) from varchar_tbl; -- ok + string_agg +------------ + a,ab,abcd +(1 row) + +--Testcase 281: +select string_agg(distinct (fields->>'f1')::text, ',' order by (fields->>'f1')::varchar) from varchar_tbl; -- not ok +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: ...agg(distinct (fields->>'f1')::text, ',' order by (fields->>'... + ^ +--Testcase 282: +select string_agg(distinct (fields->>'f1')::varchar, ',' order by (fields->>'f1')::text) from varchar_tbl; -- not ok +ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list +LINE 1: ...(distinct (fields->>'f1')::varchar, ',' order by (fields->>'... + ^ +--Testcase 283: +select string_agg(distinct (fields->>'f1')::text, ',' order by (fields->>'f1')::text) from varchar_tbl; -- ok + string_agg +------------ + a,ab,abcd +(1 row) + +-- InfluxDB does not support binary data +-- string_agg bytea tests +/* +create table bytea_test_table(v bytea); + +select string_agg(v, '') from bytea_test_table; + +insert into bytea_test_table values(decode('ff','hex')); + +select string_agg(v, '') from bytea_test_table; + +insert into bytea_test_table values(decode('aa','hex')); + +select string_agg(v, '') from bytea_test_table; +select string_agg(v, NULL) from bytea_test_table; +select string_agg(v, decode('ee', 'hex')) from bytea_test_table; + +drop table bytea_test_table; +*/ +-- FILTER tests +--Testcase 284: +select min((fields->>'unique1')::int4) filter (where (fields->>'unique1')::int4 > 100) from tenk1; + min +----- + 101 +(1 row) + +--Testcase 285: +select sum(1/(fields->>'ten')::int4) filter (where (fields->>'ten')::int4 > 0) from tenk1; + sum +------ + 1000 +(1 row) + +--Testcase 286: +select (fields->>'ten')::int4 ten, sum(distinct (fields->>'four')::int4) filter (where (fields->>'four')::text ~ '123') from onek a +group by fields->>'ten'; + ten | sum +-----+----- + 0 | + 1 | + 2 | + 3 | + 4 | + 5 | + 6 | + 7 | + 8 | + 9 | +(10 rows) + +--Testcase 287: +select (fields->>'ten')::int4 ten, sum(distinct (fields->>'four')::int4) filter (where (fields->>'four')::int4 > 10) from onek a +group by fields->>'ten' +having exists (select 1 from onek b where sum(distinct (a.fields->>'four')::int4) = (b.fields->>'four')::int4); + ten | sum +-----+----- + 0 | + 2 | + 4 | + 6 | + 8 | +(5 rows) + +--Testcase 288: +select max(foo COLLATE "C") filter (where (bar collate "POSIX") > '0') +from (values ('a', 'b')) AS v(foo,bar); + max +----- + a +(1 row) + +-- outer reference in FILTER (PostgreSQL extension) +--Testcase 289: +select (select count(*) + from (values (1)) t0(inner_c)) +from (values (2),(3)) t1(outer_c); -- inner query is aggregation query + count +------- + 1 + 1 +(2 rows) + +--Testcase 290: +select (select count(*) filter (where outer_c <> 0) + from (values (1)) t0(inner_c)) +from (values (2),(3)) t1(outer_c); -- outer query is aggregation query + count +------- + 2 +(1 row) + +--Testcase 291: +select (select count(inner_c) filter (where outer_c <> 0) + from (values (1)) t0(inner_c)) +from (values (2),(3)) t1(outer_c); -- inner query is aggregation query + count +------- + 1 + 1 +(2 rows) + +--Testcase 292: +select + (select max((select (i.fields->>'unique2')::int from tenk1 i where (i.fields->>'unique1')::int = (o.fields->>'unique1')::int)) + filter (where (o.fields->>'unique1')::int < 10)) +from tenk1 o; -- outer query is aggregation query + max +------ + 9998 +(1 row) + +-- subquery in FILTER clause (PostgreSQL extension) +--Testcase 293: +select sum((fields->>'unique1')::int) FILTER (WHERE + (fields->>'unique1')::int IN (SELECT (fields->>'unique1')::int FROM onek where (fields->>'unique1')::int < 100)) FROM tenk1; + sum +------ + 4950 +(1 row) + +-- exercise lots of aggregate parts with FILTER +begin; +--Testcase 294: +select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' order by (fields->>'a')::int,fields->>'c' using ~<~,(fields->>'b')::int) filter (where (fields->>'a')::int > 1) + from multi_arg_agg3, + generate_series(1,2) i; + aggfns +--------------------------- + {"(2,2,bar)","(3,1,baz)"} +(1 row) + +rollback; +-- check handling of bare boolean Var in FILTER +--Testcase 454: +select max(0) filter (where (fields->>'b1')::boolean) from bool_test; + max +----- + 0 +(1 row) + +--Testcase 455: +select (select max(0) filter (where (fields->>'b1')::boolean)) from bool_test; + max +----- + 0 +(1 row) + +-- check for correct detection of nested-aggregate errors in FILTER +--Testcase 456: +select max((fields->>'unique1')::int) filter (where sum((fields->>'ten')::int) > 0) from tenk1; +ERROR: aggregate functions are not allowed in FILTER +LINE 1: ...lect max((fields->>'unique1')::int) filter (where sum((field... + ^ +--Testcase 457: +select (select max((fields->>'unique1')::int) filter (where sum((fields->>'ten')::int) > 0) from int8_tbl) from tenk1; +ERROR: aggregate functions are not allowed in FILTER +LINE 1: ...lect max((fields->>'unique1')::int) filter (where sum((field... + ^ +--Testcase 458: +select max((fields->>'unique1')::int) filter (where bool_or((fields->>'ten')::int > 0)) from tenk1; +ERROR: aggregate functions are not allowed in FILTER +LINE 1: ...lect max((fields->>'unique1')::int) filter (where bool_or((f... + ^ +--Testcase 459: +select (select max((fields->>'unique1')::int) filter (where bool_or((fields->>'ten')::int > 0)) from int8_tbl) from tenk1; +ERROR: aggregate functions are not allowed in FILTER +LINE 1: ...lect max((fields->>'unique1')::int) filter (where bool_or((f... + ^ +-- ordered-set aggregates +begin; +--Testcase 295: +select (fields->>'f1')::float8 f1, percentile_cont((fields->>'f1')::float8) within group (order by x::float8) +from generate_series(1,5) x, + FLOAT8_TBL +group by (fields->>'f1')::float8 order by (fields->>'f1')::float8; + f1 | percentile_cont +------+----------------- + 0 | 1 + 0.1 | 1.4 + 0.25 | 2 + 0.4 | 2.6 + 0.5 | 3 + 0.6 | 3.4 + 0.75 | 4 + 0.9 | 4.6 + 1 | 5 +(9 rows) + +rollback; +begin; +--Testcase 296: +select (fields->>'f1')::float8 f1, percentile_cont((fields->>'f1')::float8 order by (fields->>'f1')::float8) within group (order by x) -- error +from generate_series(1,5) x, + FLOAT8_TBL +group by (fields->>'f1')::float8 order by (fields->>'f1')::float8; +ERROR: cannot use multiple ORDER BY clauses with WITHIN GROUP +LINE 1: ...>>'f1')::float8 order by (fields->>'f1')::float8) within gro... + ^ +rollback; +begin; +--Testcase 297: +select (fields->>'f1')::float8 f1, sum() within group (order by x::float8) -- error +from generate_series(1,5) x, + FLOAT8_TBL +group by (fields->>'f1')::float8 order by (fields->>'f1')::float8; +ERROR: sum is not an ordered-set aggregate, so it cannot have WITHIN GROUP +LINE 1: select (fields->>'f1')::float8 f1, sum() within group (order... + ^ +rollback; +begin; +--Testcase 298: +select (fields->>'f1')::float8 f1, percentile_cont((fields->>'f1')::float8,(fields->>'f1')::float8) -- error +from generate_series(1,5) x, + FLOAT8_TBL +group by (fields->>'f1')::float8 order by (fields->>'f1')::float8; +ERROR: WITHIN GROUP is required for ordered-set aggregate percentile_cont +LINE 1: select (fields->>'f1')::float8 f1, percentile_cont((fields->... + ^ +rollback; +--Testcase 299: +select percentile_cont(0.5) within group (order by (fields->>'b')::float4) from aggtest; + percentile_cont +------------------ + 53.4485001564026 +(1 row) + +--Testcase 300: +select percentile_cont(0.5) within group (order by (fields->>'b')::float4), sum((fields->>'b')::float4) from aggtest; + percentile_cont | sum +------------------+--------- + 53.4485001564026 | 431.773 +(1 row) + +--Testcase 301: +select percentile_cont(0.5) within group (order by (fields->>'thousand')::int) from tenk1; + percentile_cont +----------------- + 499.5 +(1 row) + +--Testcase 302: +select percentile_disc(0.5) within group (order by (fields->>'thousand')::int) from tenk1; + percentile_disc +----------------- + 499 +(1 row) + +begin; +--Testcase 303: +select rank(3) within group (order by (fields->>'f1')::int4) from INT4_TBL3; + rank +------ + 5 +(1 row) + +--Testcase 304: +select cume_dist(3) within group (order by (fields->>'f1')::int4) from INT4_TBL3; + cume_dist +----------- + 0.875 +(1 row) + +--Testcase 305: +select percent_rank(3) within group (order by (fields->>'f1')::int4) from INT4_TBL4; + percent_rank +-------------- + 0.5 +(1 row) + +--Testcase 306: +select dense_rank(3) within group (order by (fields->>'f1')::int4) from INT4_TBL3; + dense_rank +------------ + 3 +(1 row) + +rollback; +--Testcase 307: +select percentile_disc(array[0,0.1,0.25,0.5,0.75,0.9,1]) within group (order by (fields->>'thousand')::int) +from tenk1; + percentile_disc +---------------------------- + {0,99,249,499,749,899,999} +(1 row) + +--Testcase 308: +select percentile_cont(array[0,0.25,0.5,0.75,1]) within group (order by (fields->>'thousand')::int) +from tenk1; + percentile_cont +----------------------------- + {0,249.75,499.5,749.25,999} +(1 row) + +--Testcase 309: +select percentile_disc(array[[null,1,0.5],[0.75,0.25,null]]) within group (order by (fields->>'thousand')::int) +from tenk1; + percentile_disc +--------------------------------- + {{NULL,999,499},{749,249,NULL}} +(1 row) + +--Testcase 310: +create foreign table generate_series2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 311: +select percentile_cont(array[0,1,0.25,0.75,0.5,1,0.3,0.32,0.35,0.38,0.4]) within group (order by (fields->>'a')::int) +from generate_series2; + percentile_cont +------------------------------------------ + {1,6,2.25,4.75,3.5,6,2.5,2.6,2.75,2.9,3} +(1 row) + +--Testcase 312: +select (fields->>'ten')::int4 ten, mode() within group (order by fields->>'string4') from tenk1 group by fields->>'ten'; + ten | mode +-----+-------- + 0 | HHHHxx + 1 | OOOOxx + 2 | VVVVxx + 3 | OOOOxx + 4 | HHHHxx + 5 | HHHHxx + 6 | OOOOxx + 7 | AAAAxx + 8 | VVVVxx + 9 | VVVVxx +(10 rows) + +--Testcase 313: +create foreign table percentile_disc1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 314: +select percentile_disc(array[0.25,0.5,0.75]) within group (order by unnest) +from (select unnest((fields->>'x')::text[]) from percentile_disc1) y; + percentile_disc +----------------- + {fred,jill,jim} +(1 row) + +-- check collation propagates up in suitable cases: +--Testcase 315: +create foreign table pg_collation1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 316: +select pg_collation_for(percentile_disc(1) within group (order by fields->>'x' collate "POSIX")) + from pg_collation1; + pg_collation_for +------------------ + "POSIX" +(1 row) + +-- test ordered-set aggs using built-in support functions +--Testcase 317: +create aggregate test_percentile_disc(float8 ORDER BY anyelement) ( + stype = internal, + sfunc = ordered_set_transition, + finalfunc = percentile_disc_final, + finalfunc_extra = true, + finalfunc_modify = read_write +); +--Testcase 318: +create aggregate test_rank(VARIADIC "any" ORDER BY VARIADIC "any") ( + stype = internal, + sfunc = ordered_set_transition_multi, + finalfunc = rank_final, + finalfunc_extra = true, + hypothetical +); +-- ordered-set aggs created with CREATE AGGREGATE +--Testcase 319: +create foreign table test_rank1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 320: +select test_rank(3) within group (order by (fields->>'x')::int) from test_rank1; + test_rank +----------- + 5 +(1 row) + +--Testcase 321: +select test_percentile_disc(0.5) within group (order by (fields->>'thousand')::int) from tenk1; + test_percentile_disc +---------------------- + 499 +(1 row) + +-- ordered-set aggs can't use ungrouped vars in direct args: +--Testcase 322: +create foreign table generate_series3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 323: +select rank((fields->>'x')::int) within group (order by (fields->>'x')::int) from generate_series3 x; +ERROR: column "x.fields" must appear in the GROUP BY clause or be used in an aggregate function +LINE 1: select rank((fields->>'x')::int) within group (order by (fie... + ^ +DETAIL: Direct arguments of an ordered-set aggregate must use only grouped columns. +-- outer-level agg can't use a grouped arg of a lower level, either: +--Testcase 324: +select array(select percentile_disc(a) within group (order by (fields->>'x')::int) + from (values (0.3),(0.7)) v(a) group by a) + from generate_series3; +ERROR: outer-level aggregate cannot contain a lower-level variable in its direct arguments +LINE 1: select array(select percentile_disc(a) within group (order b... + ^ +-- agg in the direct args is a grouping violation, too: +--Testcase 325: +select rank(sum((fields->>'x')::int)) within group (order by (fields->>'x')::int) from generate_series3 x; +ERROR: aggregate function calls cannot be nested +LINE 1: select rank(sum((fields->>'x')::int)) within group (order by... + ^ +-- hypothetical-set type unification and argument-count failures: +--Testcase 326: +select rank(3) within group (order by fields->>'x') from pg_collation1; +ERROR: WITHIN GROUP types text and integer cannot be matched +LINE 1: select rank(3) within group (order by fields->>'x') from pg_... + ^ +--Testcase 327: +select rank(3) within group (order by (fields->>'stringu1')::name,(fields->>'stringu2')::name) from tenk1; +ERROR: function rank(integer, name, name) does not exist +LINE 1: select rank(3) within group (order by (fields->>'stringu1'):... + ^ +HINT: To use the hypothetical-set aggregate rank, the number of hypothetical direct arguments (here 1) must match the number of ordering columns (here 2). +--Testcase 328: +select rank('fred') within group (order by (fields->>'x')::int) from generate_series3 x; +ERROR: invalid input syntax for type integer: "fred" +LINE 1: select rank('fred') within group (order by (fields->>'x')::i... + ^ +--Testcase 329: +select rank('adam'::text collate "C") within group (order by fields->>'x' collate "POSIX") + from pg_collation1; +ERROR: collation mismatch between explicit collations "C" and "POSIX" +LINE 1: ... collate "C") within group (order by fields->>'x' collate "P... + ^ +-- hypothetical-set type unification successes: +--Testcase 330: +select rank('adam'::varchar) within group (order by (fields->>'x')::varchar) from pg_collation1; + rank +------ + 1 +(1 row) + +--Testcase 331: +select rank('3') within group (order by (fields->>'x')::int) from generate_series3 x; + rank +------ + 3 +(1 row) + +-- divide by zero check +--Testcase 332: +select percent_rank(0) within group (order by x) from generate_series(1,0) x; + percent_rank +-------------- + 0 +(1 row) + +-- deparse and multiple features: +--Testcase 333: +create view aggordview1 as +select (fields->>'ten')::int4 ten, + percentile_disc(0.5) within group (order by (fields->>'thousand')::int) as p50, + percentile_disc(0.5) within group (order by (fields->>'thousand')::int) filter (where (fields->>'hundred')::int=1) as px, + rank(5,'AZZZZ',50) within group (order by (fields->>'hundred')::int, (fields->>'string4')::name desc, (fields->>'hundred')::int) + from tenk1 + group by (fields->>'ten')::int order by (fields->>'ten')::int; +--Testcase 334: +select pg_get_viewdef('aggordview1'); + pg_get_viewdef +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + SELECT ((tenk1.fields ->> 'ten'::text))::integer AS ten, + + percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY ((tenk1.fields ->> 'thousand'::text))::integer) AS p50, + + percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY ((tenk1.fields ->> 'thousand'::text))::integer) FILTER (WHERE (((tenk1.fields ->> 'hundred'::text))::integer = 1)) AS px, + + rank(5, 'AZZZZ'::name, 50) WITHIN GROUP (ORDER BY ((tenk1.fields ->> 'hundred'::text))::integer, (((tenk1.fields ->> 'string4'::text))::name)::name DESC, ((tenk1.fields ->> 'hundred'::text))::integer) AS rank+ + FROM tenk1 + + GROUP BY ((tenk1.fields ->> 'ten'::text))::integer + + ORDER BY ((tenk1.fields ->> 'ten'::text))::integer; +(1 row) + +--Testcase 335: +select * from aggordview1 order by ten; + ten | p50 | px | rank +-----+-----+-----+------ + 0 | 490 | | 101 + 1 | 491 | 401 | 101 + 2 | 492 | | 101 + 3 | 493 | | 101 + 4 | 494 | | 101 + 5 | 495 | | 67 + 6 | 496 | | 1 + 7 | 497 | | 1 + 8 | 498 | | 1 + 9 | 499 | | 1 +(10 rows) + +--Testcase 336: +drop view aggordview1; +-- User defined function for user defined aggregate, VARIADIC +--Testcase 337: +create function least_accum(anyelement, variadic anyarray) +returns anyelement language sql as + 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; +--Testcase 338: +create aggregate least_agg(variadic items anyarray) ( + stype = anyelement, sfunc = least_accum +); +--Testcase 339: +create function cleast_accum(anycompatible, variadic anycompatiblearray) +returns anycompatible language sql as + 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; +--Testcase 340: +create aggregate cleast_agg(variadic items anycompatiblearray) ( + stype = anycompatible, sfunc = cleast_accum +); +-- variadic aggregates +--Testcase 341: +select least_agg((fields->>'q1')::int8,(fields->>'q2')::int8) from int8_tbl; + least_agg +------------------- + -4567890123456789 +(1 row) + +--Testcase 342: +select least_agg(variadic array[(fields->>'q1')::int8,(fields->>'q2')::int8]) from int8_tbl; + least_agg +------------------- + -4567890123456789 +(1 row) + +--Testcase 343: +select cleast_agg((fields->>'q1')::int8,(fields->>'q2')::int8) from int8_tbl; + cleast_agg +------------------- + -4567890123456789 +(1 row) + +--Testcase 344: +select cleast_agg(4.5,(fields->>'f1')::int4) from int4_tbl; + cleast_agg +------------- + -2147483647 +(1 row) + +--Testcase 345: +select cleast_agg(variadic array[4.5,(fields->>'f1')::int4]) from int4_tbl; + cleast_agg +------------- + -2147483647 +(1 row) + +--Testcase 346: +select pg_typeof(cleast_agg(variadic array[4.5,(fields->>'f1')::int4])) from int4_tbl; + pg_typeof +----------- + numeric +(1 row) + +--Testcase 347: +drop aggregate least_agg(variadic items anyarray); +--Testcase 348: +drop function least_accum(anyelement, variadic anyarray); +-- test aggregates with common transition functions share the same states +begin work; +--Testcase 349: +create type avg_state as (total bigint, count bigint); +--Testcase 350: +create or replace function avg_transfn(state avg_state, n int) returns avg_state as +$$ +declare new_state avg_state; +begin + raise notice 'avg_transfn called with %', n; + if state is null then + if n is not null then + new_state.total := n; + new_state.count := 1; + return new_state; + end if; + return null; + elsif n is not null then + state.total := state.total + n; + state.count := state.count + 1; + return state; + end if; + + return null; +end +$$ language plpgsql; +--Testcase 351: +create function avg_finalfn(state avg_state) returns int4 as +$$ +begin + if state is null then + return NULL; + else + return state.total / state.count; + end if; +end +$$ language plpgsql; +--Testcase 352: +create function sum_finalfn(state avg_state) returns int4 as +$$ +begin + if state is null then + return NULL; + else + return state.total; + end if; +end +$$ language plpgsql; +--Testcase 353: +create aggregate my_avg(int4) +( + stype = avg_state, + sfunc = avg_transfn, + finalfunc = avg_finalfn +); +--Testcase 354: +create aggregate my_sum(int4) +( + stype = avg_state, + sfunc = avg_transfn, + finalfunc = sum_finalfn +); +-- aggregate state should be shared as aggs are the same. +--Testcase 355: +create foreign table my_avg1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 356: +select my_avg((fields->>'one')::int4),my_avg((fields->>'one')::int4) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 + my_avg | my_avg +--------+-------- + 2 | 2 +(1 row) + +-- aggregate state should be shared as transfn is the same for both aggs. +--Testcase 357: +select my_avg((fields->>'one')::int4),my_sum((fields->>'one')::int4) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 + my_avg | my_sum +--------+-------- + 2 | 4 +(1 row) + +-- same as previous one, but with DISTINCT, which requires sorting the input. +--Testcase 358: +select my_avg(distinct (fields->>'one')::int4),my_sum(distinct (fields->>'one')::int4) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 + my_avg | my_sum +--------+-------- + 2 | 4 +(1 row) + +-- shouldn't share states due to the distinctness not matching. +--Testcase 359: +select my_avg(distinct (fields->>'one')::int4),my_sum((fields->>'one')::int4) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 + my_avg | my_sum +--------+-------- + 2 | 4 +(1 row) + +-- shouldn't share states due to the filter clause not matching. +--Testcase 360: +select my_avg((fields->>'one')::int4) filter (where (fields->>'one')::int4 > 1),my_sum((fields->>'one')::int4) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 +NOTICE: avg_transfn called with 3 + my_avg | my_sum +--------+-------- + 3 | 4 +(1 row) + +-- this should not share the state due to different input columns. +--Testcase 361: +create foreign table my_avg2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 362: +select my_avg((fields->>'one')::int4),my_sum((fields->>'two')::int4) from my_avg2; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 2 +NOTICE: avg_transfn called with 3 +NOTICE: avg_transfn called with 4 + my_avg | my_sum +--------+-------- + 2 | 6 +(1 row) + +-- exercise cases where OSAs share state +--Testcase 363: +create foreign table percentile_cont1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 364: +select + percentile_cont(0.5) within group (order by (fields->>'a')::int), + percentile_disc(0.5) within group (order by (fields->>'a')::int) +from percentile_cont1; + percentile_cont | percentile_disc +-----------------+----------------- + 4 | 3 +(1 row) + +--Testcase 365: +select + percentile_cont(0.25) within group (order by (fields->>'a')::int), + percentile_disc(0.5) within group (order by (fields->>'a')::int) +from percentile_cont1; + percentile_cont | percentile_disc +-----------------+----------------- + 2.5 | 3 +(1 row) + +-- these can't share state currently +--Testcase 366: +select + rank(4) within group (order by (fields->>'a')::int), + dense_rank(4) within group (order by (fields->>'a')::int) +from percentile_cont1; + rank | dense_rank +------+------------ + 3 | 3 +(1 row) + +-- test that aggs with the same sfunc and initcond share the same agg state +--Testcase 367: +create aggregate my_sum_init(int4) +( + stype = avg_state, + sfunc = avg_transfn, + finalfunc = sum_finalfn, + initcond = '(10,0)' +); +--Testcase 368: +create aggregate my_avg_init(int4) +( + stype = avg_state, + sfunc = avg_transfn, + finalfunc = avg_finalfn, + initcond = '(10,0)' +); +--Testcase 369: +create aggregate my_avg_init2(int4) +( + stype = avg_state, + sfunc = avg_transfn, + finalfunc = avg_finalfn, + initcond = '(4,0)' +); +-- state should be shared if INITCONDs are matching +--Testcase 370: +select my_sum_init((fields->>'one')::int4),my_avg_init((fields->>'one')::int4) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 + my_sum_init | my_avg_init +-------------+------------- + 14 | 7 +(1 row) + +-- Varying INITCONDs should cause the states not to be shared. +--Testcase 371: +select my_sum_init((fields->>'one')::int4),my_avg_init2((fields->>'one')::int4) from my_avg1; +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 1 +NOTICE: avg_transfn called with 3 +NOTICE: avg_transfn called with 3 + my_sum_init | my_avg_init2 +-------------+-------------- + 14 | 4 +(1 row) + +rollback; +-- test aggregate state sharing to ensure it works if one aggregate has a +-- finalfn and the other one has none. +begin work; +--Testcase 372: +create or replace function sum_transfn(state int4, n int4) returns int4 as +$$ +declare new_state int4; +begin + raise notice 'sum_transfn called with %', n; + if state is null then + if n is not null then + new_state := n; + return new_state; + end if; + return null; + elsif n is not null then + state := state + n; + return state; + end if; + + return null; +end +$$ language plpgsql; +--Testcase 373: +create function halfsum_finalfn(state int4) returns int4 as +$$ +begin + if state is null then + return NULL; + else + return state / 2; + end if; +end +$$ language plpgsql; +--Testcase 374: +create aggregate my_sum(int4) +( + stype = int4, + sfunc = sum_transfn +); +--Testcase 375: +create aggregate my_half_sum(int4) +( + stype = int4, + sfunc = sum_transfn, + finalfunc = halfsum_finalfn +); +-- Agg state should be shared even though my_sum has no finalfn +--Testcase 376: +create foreign table my_sum1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 377: +select my_sum((fields->>'one')::int4),my_half_sum((fields->>'one')::int4) from my_sum1; +NOTICE: sum_transfn called with 1 +NOTICE: sum_transfn called with 2 +NOTICE: sum_transfn called with 3 +NOTICE: sum_transfn called with 4 + my_sum | my_half_sum +--------+------------- + 10 | 5 +(1 row) + +rollback; +-- test that the aggregate transition logic correctly handles +-- transition / combine functions returning NULL +-- First test the case of a normal transition function returning NULL +BEGIN; +--Testcase 378: +CREATE FUNCTION balkifnull(int8, int4) +RETURNS int8 +STRICT +LANGUAGE plpgsql AS $$ +BEGIN + IF $1 IS NULL THEN + RAISE 'erroneously called with NULL argument'; + END IF; + RETURN NULL; +END$$; +--Testcase 379: +CREATE AGGREGATE balk(int4) +( + SFUNC = balkifnull(int8, int4), + STYPE = int8, + PARALLEL = SAFE, + INITCOND = '0' +); +--Testcase 380: +SELECT balk((fields->>'hundred')::int4) FROM tenk1; + balk +------ + +(1 row) + +ROLLBACK; +-- Secondly test the case of a parallel aggregate combiner function +-- returning NULL. For that use normal transition function, but a +-- combiner function returning NULL. +BEGIN; +--Testcase 381: +CREATE FUNCTION balkifnull(int8, int8) +RETURNS int8 +PARALLEL SAFE +STRICT +LANGUAGE plpgsql AS $$ +BEGIN + IF $1 IS NULL THEN + RAISE 'erroneously called with NULL argument'; + END IF; + RETURN NULL; +END$$; +--Testcase 382: +CREATE AGGREGATE balk(int4) +( + SFUNC = int4_sum(int8, int4), + STYPE = int8, + COMBINEFUNC = balkifnull(int8, int8), + PARALLEL = SAFE, + INITCOND = '0' +); +-- force use of parallelism +-- ALTER TABLE tenk1 set (parallel_workers = 4); +-- SET LOCAL parallel_setup_cost=0; +-- SET LOCAL max_parallel_workers_per_gather=4; +-- EXPLAIN (COSTS OFF) SELECT balk(hundred) FROM tenk1; +-- SELECT balk(hundred) FROM tenk1; +ROLLBACK; +-- test coverage for aggregate combine/serial/deserial functions +BEGIN; +--Testcase 383: +SET parallel_setup_cost = 0; +--Testcase 384: +SET parallel_tuple_cost = 0; +--Testcase 385: +SET min_parallel_table_scan_size = 0; +--Testcase 386: +SET max_parallel_workers_per_gather = 4; +--Testcase 387: +SET parallel_leader_participation = off; +--Testcase 388: +SET enable_indexonlyscan = off; +-- variance(int4) covers numeric_poly_combine +-- sum(int8) covers int8_avg_combine +-- regr_count(float8, float8) covers int8inc_float8_float8 and aggregates with > 1 arg +--Testcase 389: +EXPLAIN (COSTS OFF, VERBOSE) +SELECT variance((fields->>'unique1')::int4), sum((fields->>'unique1')::int8), regr_count((fields->>'unique1')::float8, (fields->>'unique1')::float8) +FROM (SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1) u; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: variance(((tenk1.fields ->> 'unique1'::text))::integer), sum(((tenk1.fields ->> 'unique1'::text))::bigint), regr_count(((tenk1.fields ->> 'unique1'::text))::double precision, ((tenk1.fields ->> 'unique1'::text))::double precision) + -> Append + -> Foreign Scan on public.tenk1 + Output: tenk1.fields + InfluxDB query: SELECT * FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_1 + Output: tenk1_1.fields + InfluxDB query: SELECT * FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_2 + Output: tenk1_2.fields + InfluxDB query: SELECT * FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_3 + Output: tenk1_3.fields + InfluxDB query: SELECT * FROM "tenk" +(15 rows) + +--Testcase 390: +SELECT variance((fields->>'unique1')::int4), sum((fields->>'unique1')::int8), regr_count((fields->>'unique1')::float8, (fields->>'unique1')::float8) +FROM (SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1) u; + variance | sum | regr_count +----------------------+-----------+------------ + 8333541.588539713493 | 199980000 | 40000 +(1 row) + +-- variance(int8) covers numeric_combine +-- avg(numeric) covers numeric_avg_combine +--Testcase 391: +EXPLAIN (COSTS OFF, VERBOSE) +SELECT variance((fields->>'unique1')::int8), avg((fields->>'unique1')::numeric) +FROM (SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1) u; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: variance(((tenk1.fields ->> 'unique1'::text))::bigint), avg(((tenk1.fields ->> 'unique1'::text))::numeric) + -> Append + -> Foreign Scan on public.tenk1 + Output: tenk1.fields + InfluxDB query: SELECT * FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_1 + Output: tenk1_1.fields + InfluxDB query: SELECT * FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_2 + Output: tenk1_2.fields + InfluxDB query: SELECT * FROM "tenk" + -> Foreign Scan on public.tenk1 tenk1_3 + Output: tenk1_3.fields + InfluxDB query: SELECT * FROM "tenk" +(15 rows) + +--Testcase 392: +SELECT variance((fields->>'unique1')::int8), avg((fields->>'unique1')::numeric) +FROM (SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1 + UNION ALL SELECT * FROM tenk1) u; + variance | avg +----------------------+----------------------- + 8333541.588539713493 | 4999.5000000000000000 +(1 row) + +ROLLBACK; +-- test coverage for dense_rank +--Testcase 393: +create foreign table dense_rank1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 394: +SELECT dense_rank((fields->>'x')::int) WITHIN GROUP (ORDER BY (fields->>'x')::int) FROM dense_rank1 GROUP BY (fields->>'x') ORDER BY 1; + dense_rank +------------ + 1 + 1 + 1 +(3 rows) + +-- Ensure that the STRICT checks for aggregates does not take NULLness +-- of ORDER BY columns into account. See bug report around +-- 2a505161-2727-2473-7c46-591ed108ac52@email.cz +--Testcase 395: +SELECT min(x ORDER BY y) FROM (VALUES(1, NULL)) AS d(x,y); + min +----- + 1 +(1 row) + +--Testcase 396: +SELECT min(x ORDER BY y) FROM (VALUES(1, 2)) AS d(x,y); + min +----- + 1 +(1 row) + +-- check collation-sensitive matching between grouping expressions +--Testcase 397: +select v||'a', case v||'a' when 'aa' then 1 else 0 end, count(*) + from unnest(array['a','b']) u(v) + group by v||'a' order by 1; + ?column? | case | count +----------+------+------- + aa | 1 | 1 + ba | 0 | 1 +(2 rows) + +--Testcase 398: +select v||'a', case when v||'a' = 'aa' then 1 else 0 end, count(*) + from unnest(array['a','b']) u(v) + group by v||'a' order by 1; + ?column? | case | count +----------+------+------- + aa | 1 | 1 + ba | 0 | 1 +(2 rows) + +-- Make sure that generation of HashAggregate for uniqification purposes +-- does not lead to array overflow due to unexpected duplicate hash keys +-- see CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com +--Testcase 399: +set enable_memoize to off; +--Testcase 400: +explain (costs off) + select 1 from tenk1 + where ((fields->>'hundred')::int, (fields->>'thousand')::int) in (select (fields->>'twothousand')::int, (fields->>'twothousand')::int from onek); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------- + Hash Join + Hash Cond: (((onek.fields ->> 'twothousand'::text))::integer = ((tenk1.fields ->> 'hundred'::text))::integer) + -> HashAggregate + Group Key: ((onek.fields ->> 'twothousand'::text))::integer, ((onek.fields ->> 'twothousand'::text))::integer + -> Foreign Scan on onek + -> Hash + -> Foreign Scan on tenk1 +(7 rows) + +--Testcase 401: +reset enable_memoize; +-- +-- Hash Aggregation Spill tests +-- +--Testcase 402: +set enable_sort=false; +--Testcase 403: +set work_mem='64kB'; +--Testcase 404: +select (fields->>'unique1')::int unique1, count(*), sum((fields->>'twothousand')::int) from tenk1 +group by fields->>'unique1' +having sum((fields->>'fivethous')::int) > 4975 +order by sum((fields->>'twothousand')::int); + unique1 | count | sum +---------+-------+------ + 4976 | 1 | 976 + 4977 | 1 | 977 + 4978 | 1 | 978 + 4979 | 1 | 979 + 4980 | 1 | 980 + 4981 | 1 | 981 + 4982 | 1 | 982 + 4983 | 1 | 983 + 4984 | 1 | 984 + 4985 | 1 | 985 + 4986 | 1 | 986 + 4987 | 1 | 987 + 4988 | 1 | 988 + 4989 | 1 | 989 + 4990 | 1 | 990 + 4991 | 1 | 991 + 4992 | 1 | 992 + 4993 | 1 | 993 + 4994 | 1 | 994 + 4995 | 1 | 995 + 4996 | 1 | 996 + 4997 | 1 | 997 + 4998 | 1 | 998 + 4999 | 1 | 999 + 9976 | 1 | 1976 + 9977 | 1 | 1977 + 9978 | 1 | 1978 + 9979 | 1 | 1979 + 9980 | 1 | 1980 + 9981 | 1 | 1981 + 9982 | 1 | 1982 + 9983 | 1 | 1983 + 9984 | 1 | 1984 + 9985 | 1 | 1985 + 9986 | 1 | 1986 + 9987 | 1 | 1987 + 9988 | 1 | 1988 + 9989 | 1 | 1989 + 9990 | 1 | 1990 + 9991 | 1 | 1991 + 9992 | 1 | 1992 + 9993 | 1 | 1993 + 9994 | 1 | 1994 + 9995 | 1 | 1995 + 9996 | 1 | 1996 + 9997 | 1 | 1997 + 9998 | 1 | 1998 + 9999 | 1 | 1999 +(48 rows) + +--Testcase 405: +set work_mem to default; +--Testcase 406: +set enable_sort to default; +-- +-- Compare results between plans using sorting and plans using hash +-- aggregation. Force spilling in both cases by setting work_mem low. +-- +--Testcase 407: +set work_mem='64kB'; +--Testcase 408: +create foreign table agg_data_2k (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 489: +create foreign table agg_data_2k_nsc (g int) server influxdb_svr OPTIONS (table 'agg_data_2k'); +--Testcase 409: +create foreign table agg_data_20k (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 490: +create foreign table agg_data_20k_nsc (g int) server influxdb_svr OPTIONS (table 'agg_data_20k'); +--Testcase 410: +create foreign table agg_group_1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 491: +create foreign table agg_group_1_nsc (c1 int, c2 numeric, c3 int) server influxdb_svr OPTIONS (table 'agg_group_1'); +--Testcase 411: +create foreign table agg_group_2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 492: +create foreign table agg_group_2_nsc (a int, c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_group_2'); +--Testcase 412: +create foreign table agg_group_3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 493: +create foreign table agg_group_3_nsc (c1 numeric, c2 int4, c3 int) server influxdb_svr OPTIONS (table 'agg_group_3'); +--Testcase 413: +create foreign table agg_group_4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 494: +create foreign table agg_group_4_nsc (c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_group_4'); +--Testcase 414: +create foreign table agg_hash_1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 495: +create foreign table agg_hash_1_nsc (c1 int, c2 numeric, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_1'); +--Testcase 415: +create foreign table agg_hash_2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 496: +create foreign table agg_hash_2_nsc (a int, c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_2'); +--Testcase 416: +create foreign table agg_hash_3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 497: +create foreign table agg_hash_3_nsc (c1 numeric, c2 int4, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_3'); +--Testcase 417: +create foreign table agg_hash_4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 498: +create foreign table agg_hash_4_nsc (c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_4'); +--Testcase 418: +insert into agg_data_2k_nsc select g from generate_series(0, 1999) g; +--analyze agg_data_2k; +--Testcase 419: +insert into agg_data_20k_nsc select g from generate_series(0, 19999) g; +--analyze agg_data_20k; +-- Produce results with sorting. +--Testcase 420: +set enable_hashagg = false; +--Testcase 421: +set jit_above_cost = 0; +--Testcase 422: +explain (costs off) +select (fields->>'g')::int%10000 as c1, sum((fields->>'g')::numeric) as c2, count(*) as c3 + from agg_data_20k group by (fields->>'g')::int%10000; + QUERY PLAN +----------------------------------------------------------------- + GroupAggregate + Group Key: ((((fields ->> 'g'::text))::integer % 10000)) + -> Sort + Sort Key: ((((fields ->> 'g'::text))::integer % 10000)) + -> Foreign Scan on agg_data_20k +(5 rows) + +--Testcase 423: +insert into agg_group_1_nsc +select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 + from agg_data_20k_nsc group by g%10000; +--Testcase 424: +insert into agg_group_2_nsc +select * from + (values (100), (300), (500)) as r(a), + lateral ( + select (g/2)::numeric as c1, + array_agg(g::numeric) as c2, + count(*) as c3 + from agg_data_2k_nsc + where g < r.a + group by g/2) as s; +--Testcase 425: +set jit_above_cost to default; +--Testcase 426: +insert into agg_group_3_nsc +select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 + from agg_data_2k_nsc group by g/2; +--Testcase 427: +insert into agg_group_4_nsc +select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 + from agg_data_2k_nsc group by g/2; +-- Produce results with hash aggregation +--Testcase 428: +set enable_hashagg = true; +--Testcase 429: +set enable_sort = false; +--Testcase 430: +set jit_above_cost = 0; +--Testcase 431: +explain (costs off) +select (fields->>'g')::int%10000 as c1, sum((fields->>'g')::numeric) as c2, count(*) as c3 + from agg_data_20k group by (fields->>'g')::int%10000; + QUERY PLAN +---------------------------------------------------------- + HashAggregate + Group Key: (((fields ->> 'g'::text))::integer % 10000) + -> Foreign Scan on agg_data_20k +(3 rows) + +--Testcase 432: +insert into agg_hash_1_nsc +select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 + from agg_data_20k_nsc group by g%10000; +--Testcase 433: +insert into agg_hash_2_nsc +select * from + (values (100), (300), (500)) as r(a), + lateral ( + select (g/2)::numeric as c1, + array_agg(g::numeric) as c2, + count(*) as c3 + from agg_data_2k_nsc + where g < r.a + group by g/2) as s; +--Testcase 434: +set jit_above_cost to default; +--Testcase 435: +insert into agg_hash_3_nsc +select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 + from agg_data_2k_nsc group by g/2; +--Testcase 436: +insert into agg_hash_4_nsc +select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 + from agg_data_2k_nsc group by g/2; +--Testcase 437: +set enable_sort = true; +--Testcase 438: +set work_mem to default; +-- Compare group aggregation results to hash aggregation results +--Testcase 439: +(select * from agg_hash_1 except select * from agg_group_1) + union all +(select * from agg_group_1 except select * from agg_hash_1); + fields +-------- +(0 rows) + +--Testcase 440: +(select * from agg_hash_2 except select * from agg_group_2) + union all +(select * from agg_group_2 except select * from agg_hash_2); + fields +-------- +(0 rows) + +--Testcase 441: +(select * from agg_hash_3 except select * from agg_group_3) + union all +(select * from agg_group_3 except select * from agg_hash_3); + fields +-------- +(0 rows) + +--Testcase 442: +(select * from agg_hash_4 except select * from agg_group_4) + union all +(select * from agg_group_4 except select * from agg_hash_4); + fields +-------- +(0 rows) + +--Testcase 443: +-- Clean up: +--Testcase 499: +delete from agg_data_2k_nsc; +--Testcase 500: +delete from agg_data_20k_nsc; +--Testcase 501: +delete from agg_group_1_nsc; +--Testcase 502: +delete from agg_group_2_nsc; +--Testcase 503: +delete from agg_group_3_nsc; +--Testcase 504: +delete from agg_group_4_nsc; +--Testcase 505: +delete from agg_hash_1_nsc; +--Testcase 506: +delete from agg_hash_2_nsc; +--Testcase 507: +delete from agg_hash_3_nsc; +--Testcase 508: +delete from agg_hash_4_nsc; +--Testcase 509: +drop foreign table agg_data_2k; +--Testcase 510: +drop foreign table agg_data_2k_nsc; +--Testcase 511: +drop foreign table agg_data_20k; +--Testcase 512: +drop foreign table agg_data_20k_nsc; +--Testcase 513: +drop foreign table agg_group_1; +--Testcase 514: +drop foreign table agg_group_1_nsc; +--Testcase 444: +drop foreign table agg_group_2; +--Testcase 515: +drop foreign table agg_group_2_nsc; +--Testcase 445: +drop foreign table agg_group_3; +--Testcase 516: +drop foreign table agg_group_3_nsc; +--Testcase 446: +drop foreign table agg_group_4; +--Testcase 517: +drop foreign table agg_group_4_nsc; +--Testcase 447: +drop foreign table agg_hash_1; +--Testcase 518: +drop foreign table agg_hash_1_nsc; +--Testcase 448: +drop foreign table agg_hash_2; +--Testcase 519: +drop foreign table agg_hash_2_nsc; +--Testcase 449: +drop foreign table agg_hash_3; +--Testcase 520: +drop foreign table agg_hash_3_nsc; +--Testcase 450: +drop foreign table agg_hash_4; +--Testcase 521: +drop foreign table agg_hash_4_nsc; +-- Clean up +DO $d$ +declare + l_rec record; +begin + for l_rec in (select foreign_table_schema, foreign_table_name + from information_schema.foreign_tables) loop + execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); + end loop; +end; +$d$; +-- Clean up: +--Testcase 522: +DROP AGGREGATE IF EXISTS newavg (int4); +--Testcase 523: +DROP AGGREGATE IF EXISTS newsum (int4); +--Testcase 524: +DROP AGGREGATE IF EXISTS newcnt (*); +--Testcase 525: +DROP AGGREGATE IF EXISTS oldcnt (*); +--Testcase 526: +DROP AGGREGATE IF EXISTS newcnt ("any"); +--Testcase 527: +DROP AGGREGATE IF EXISTS sum2(int8,int8); +--Testcase 528: +DROP FUNCTION IF EXISTS sum3(int8,int8,int8); +--Testcase 529: +DROP AGGREGATE IF EXISTS aggfns(integer,integer,text); +--Testcase 530: +DROP AGGREGATE IF EXISTS aggfstr(integer,integer,text); +--Testcase 531: +DROP FUNCTION IF EXISTS aggfns_trans(aggtype[],integer,integer,text); +--Testcase 532: +DROP FUNCTION IF EXISTS aggf_trans(aggtype[],integer,integer,text); +--Testcase 533: +DROP TYPE IF EXISTS aggtype; +--Testcase 534: +DROP AGGREGATE IF EXISTS test_percentile_disc(float8 ORDER BY anyelement); +--Testcase 535: +DROP AGGREGATE IF EXISTS test_rank(VARIADIC "any" ORDER BY VARIADIC "any"); +--Testcase 536: +DROP AGGREGATE IF EXISTS cleast_agg(variadic items anycompatiblearray); +--Testcase 537: +DROP FUNCTION IF EXISTS cleast_accum(anycompatible, variadic anycompatiblearray); +--Testcase 451: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 452: +DROP SERVER influxdb_svr CASCADE; +--Testcase 453: +DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/schemaless/extra/influxdb_fdw_post.out b/expected/15.0/schemaless/extra/influxdb_fdw_post.out new file mode 100644 index 0000000..40087bd --- /dev/null +++ b/expected/15.0/schemaless/extra/influxdb_fdw_post.out @@ -0,0 +1,10760 @@ +-- =================================================================== +-- create FDW objects +-- =================================================================== +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'postdb', :SERVER); +--Testcase 4: +CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'postdb', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); +--Testcase 6: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); +-- =================================================================== +-- create objects used through FDW influxdb server +-- =================================================================== +--Testcase 8: +CREATE TYPE user_enum AS ENUM ('foo', 'bar', 'buz'); +--Testcase 9: +CREATE SCHEMA "S 1"; +--Testcase 10: +CREATE FOREIGN TABLE "S 1"."T 0" (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T0', tags 'c3', schemaless 'true'); +--Testcase 783: +CREATE FOREIGN TABLE "S 1".s1t0 ( + "C 1" int NOT NULL, + c2 int NOT NULL, + c3 text, + time timestamp, + c6 varchar(10), + c7 char(10), + c8 text +) SERVER influxdb_svr OPTIONS (table 'T0', tags 'c3'); +--Testcase 11: +CREATE FOREIGN TABLE "S 1"."T 1" (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T1', tags 'c3', schemaless 'true'); +--Testcase 784: +CREATE FOREIGN TABLE "S 1".s1t1 ( + "C 1" int NOT NULL, + c2 int NOT NULL, + c3 text, + time timestamp, + c6 varchar(10), + c7 char(10), + c8 text +) SERVER influxdb_svr OPTIONS (table 'T1', tags 'c3'); +--Testcase 12: +CREATE FOREIGN TABLE "S 1"."T 2" (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T2', tags 'c2', schemaless 'true'); +--Testcase 785: +CREATE FOREIGN TABLE "S 1".s1t2 ( + c1 int NOT NULL, + c2 text +) SERVER influxdb_svr OPTIONS (table 'T2', tags 'c2'); +--Testcase 13: +CREATE FOREIGN TABLE "S 1"."T 3" (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3', schemaless 'true'); +--Testcase 786: +CREATE FOREIGN TABLE "S 1".s1t3 ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text +) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); +--Testcase 14: +CREATE FOREIGN TABLE "S 1"."T 4" (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3', schemaless 'true'); +--Testcase 787: +CREATE FOREIGN TABLE "S 1".s1t4 ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text +) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3'); +-- Disable autovacuum for these tables to avoid unexpected effects of that +--ALTER TABLE "S 1"."T 1" SET (autovacuum_enabled = 'false'); +--ALTER TABLE "S 1"."T 2" SET (autovacuum_enabled = 'false'); +--ALTER TABLE "S 1"."T 3" SET (autovacuum_enabled = 'false'); +--ALTER TABLE "S 1"."T 4" SET (autovacuum_enabled = 'false'); +--Testcase 15: +INSERT INTO "S 1".s1t1 + SELECT id, + id % 10, + to_char(id, 'FM00000'), + '1970-01-01'::timestamp + ((id % 100) || ' days')::interval, + id % 10, + id % 10, + 'foo'::text + FROM generate_series(1, 1000) id; +--Testcase 16: +INSERT INTO "S 1".s1t2 + SELECT id, + 'AAA' || to_char(id, 'FM000') + FROM generate_series(1, 100) id; +--Testcase 17: +INSERT INTO "S 1".s1t3 + SELECT id, + id + 1, + 'AAA' || to_char(id, 'FM000') + FROM generate_series(1, 100) id; +--Testcase 18: +DELETE FROM "S 1".s1t3 WHERE c1 % 2 != 0; -- delete for outer join tests +--Testcase 19: +INSERT INTO "S 1".s1t4 + SELECT id, + id + 1, + 'AAA' || to_char(id, 'FM000') + FROM generate_series(1, 100) id; +--Testcase 20: +DELETE FROM "S 1".s1t4 WHERE c1 % 3 != 0; -- delete for outer join tests +--ANALYZE "S 1"."T 1"; +--ANALYZE "S 1"."T 2"; +--ANALYZE "S 1"."T 3"; +--ANALYZE "S 1"."T 4"; +-- =================================================================== +-- create foreign tables +-- =================================================================== +--Testcase 21: +CREATE FOREIGN TABLE ft1 (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 788: +CREATE FOREIGN TABLE ft1_nsc ( + c0 int, + c1 int NOT NULL, + c2 int NOT NULL, + c3 text, + time timestamp, + c6 varchar(10), + c7 char(10) default 'ft1', + c8 text +) SERVER influxdb_svr; +--Testcase 22: +ALTER FOREIGN TABLE ft1_nsc DROP COLUMN c0; +--Testcase 23: +CREATE FOREIGN TABLE ft2 (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 789: +CREATE FOREIGN TABLE ft2_nsc ( + c1 int NOT NULL, + c2 int NOT NULL, + cx int, + c3 text, + time timestamp, + c6 varchar(10), + c7 char(10) default 'ft2', + c8 text +) SERVER influxdb_svr; +--Testcase 24: +ALTER FOREIGN TABLE ft2_nsc DROP COLUMN cx; +--Testcase 25: +CREATE FOREIGN TABLE ft4 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3', schemaless 'true'); +--Testcase 790: +CREATE FOREIGN TABLE ft4_nsc ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text +) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); +--Testcase 26: +CREATE FOREIGN TABLE ft5 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3', schemaless 'true'); +--Testcase 791: +CREATE FOREIGN TABLE ft5_nsc ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text +) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3'); +--Testcase 27: +CREATE FOREIGN TABLE ft6 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr2 OPTIONS (table 'T4', tags 'c3', schemaless 'true'); +-- =================================================================== +-- tests for validator +-- =================================================================== +-- requiressl and some other parameters are omitted because +-- valid values for them depend on configure options +--Testcase 28: +ALTER SERVER testserver1 OPTIONS ( + -- use_remote_estimate 'false', + -- updatable 'true', + -- fdw_startup_cost '123.456', + -- fdw_tuple_cost '0.123', + -- service 'value', + -- connect_timeout 'value', + dbname 'value', + host 'value', + -- hostaddr 'value', + port 'value' + --client_encoding 'value', + -- application_name 'value', + --fallback_application_name 'value', + -- keepalives 'value', + -- keepalives_idle 'value', + -- keepalives_interval 'value', + -- tcp_user_timeout 'value', + -- requiressl 'value', + -- sslcompression 'value', + -- sslmode 'value', + -- sslcert 'value', + -- sslkey 'value', + -- sslrootcert 'value', + -- sslcrl 'value', + --requirepeer 'value', + -- krbsrvname 'value', + -- gsslib 'value', + --replication 'value' +); +-- influxdb_fdw does not support option extensions +-- Error, invalid list syntax +--ALTER SERVER testserver1 OPTIONS (ADD extensions 'foo; bar'); +-- OK but gets a warning +--ALTER SERVER testserver1 OPTIONS (ADD extensions 'foo, bar'); +--ALTER SERVER testserver1 OPTIONS (DROP extensions); +--Testcase 29: +ALTER USER MAPPING FOR public SERVER testserver1 + OPTIONS (DROP user, DROP password); +-- Attempt to add a valid option that's not allowed in a user mapping +--ALTER USER MAPPING FOR public SERVER testserver1 +-- OPTIONS (ADD sslmode 'require'); +-- But we can add valid ones fine +--ALTER USER MAPPING FOR public SERVER testserver1 +-- OPTIONS (ADD sslpassword 'dummy'); +-- Ensure valid options we haven't used in a user mapping yet are +-- permitted to check validation. +--ALTER USER MAPPING FOR public SERVER testserver1 +-- OPTIONS (ADD sslkey 'value', ADD sslcert 'value'); +--Testcase 30: +ALTER FOREIGN TABLE ft1 OPTIONS (table 'T1', tags 'c3'); +ALTER FOREIGN TABLE ft1_nsc OPTIONS (table 'T1', tags 'c3'); +--Testcase 31: +ALTER FOREIGN TABLE ft2 OPTIONS (table 'T1', tags 'c3'); +ALTER FOREIGN TABLE ft2_nsc OPTIONS (table 'T1', tags 'c3'); +--Testcase 32: +ALTER FOREIGN TABLE ft1_nsc ALTER COLUMN c1 OPTIONS (column_name 'C 1'); +--Testcase 33: +ALTER FOREIGN TABLE ft2_nsc ALTER COLUMN c1 OPTIONS (column_name 'C 1'); +--Testcase 34: +\det+ + List of foreign tables + Schema | Table | Server | FDW options | Description +--------+---------+---------------+----------------------------------------------+------------- + public | ft1 | influxdb_svr | (schemaless 'true', "table" 'T1', tags 'c3') | + public | ft1_nsc | influxdb_svr | ("table" 'T1', tags 'c3') | + public | ft2 | influxdb_svr | (schemaless 'true', "table" 'T1', tags 'c3') | + public | ft2_nsc | influxdb_svr | ("table" 'T1', tags 'c3') | + public | ft4 | influxdb_svr | ("table" 'T3', tags 'c3', schemaless 'true') | + public | ft4_nsc | influxdb_svr | ("table" 'T3', tags 'c3') | + public | ft5 | influxdb_svr | ("table" 'T4', tags 'c3', schemaless 'true') | + public | ft5_nsc | influxdb_svr | ("table" 'T4', tags 'c3') | + public | ft6 | influxdb_svr2 | ("table" 'T4', tags 'c3', schemaless 'true') | +(9 rows) + +-- Test that alteration of server options causes reconnection +-- Remote's errors might be non-English, so hide them to ensure stable results +\set VERBOSITY terse +--Testcase 35: +SELECT tags->>'c3' c3, time FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int LIMIT 1; -- should work + c3 | time +-------+-------------------------- + 00001 | Fri Jan 02 00:00:00 1970 +(1 row) + +--Testcase 36: +ALTER SERVER influxdb_svr OPTIONS (SET dbname 'no such database'); +--Testcase 37: +SELECT tags->>'c3' c3, time FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int LIMIT 1; -- should fail +ERROR: influxdb_fdw : database not found: no such database +DO $d$ + BEGIN + EXECUTE $$ALTER SERVER influxdb_svr + OPTIONS (SET dbname 'postdb')$$; + END; +$d$; +--Testcase 38: +SELECT tags->>'c3' c3, time FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int LIMIT 1; -- should work again + c3 | time +-------+-------------------------- + 00001 | Fri Jan 02 00:00:00 1970 +(1 row) + +\set VERBOSITY default +-- =================================================================== +-- test error case for create publication on foreign table +-- =================================================================== +--Testcase 765: +CREATE PUBLICATION testpub_ftbl FOR TABLE ft1; -- should fail +ERROR: cannot add relation "ft1" to publication +DETAIL: This operation is not supported for foreign tables. +-- =================================================================== +-- simple queries +-- =================================================================== +-- single table without alias +--Testcase 39: +EXPLAIN (COSTS OFF) SELECT * FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int OFFSET 100 LIMIT 10; + QUERY PLAN +---------------------------------------------------------------------------------- + Limit + -> Sort + Sort Key: ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer) + -> Foreign Scan on ft1 +(4 rows) + +--Testcase 40: +SELECT * FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int OFFSET 100 LIMIT 10; + time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00101"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "101"} + Sat Jan 03 00:00:00 1970 | {"c3": "00102"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "102"} + Sun Jan 04 00:00:00 1970 | {"c3": "00103"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "103"} + Mon Jan 05 00:00:00 1970 | {"c3": "00104"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "104"} + Tue Jan 06 00:00:00 1970 | {"c3": "00105"} | {"c2": "5", "c6": "5", "c7": "5 ", "c8": "foo", "C 1": "105"} + Wed Jan 07 00:00:00 1970 | {"c3": "00106"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "106"} + Thu Jan 08 00:00:00 1970 | {"c3": "00107"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "107"} + Fri Jan 09 00:00:00 1970 | {"c3": "00108"} | {"c2": "8", "c6": "8", "c7": "8 ", "c8": "foo", "C 1": "108"} + Sat Jan 10 00:00:00 1970 | {"c3": "00109"} | {"c2": "9", "c6": "9", "c7": "9 ", "c8": "foo", "C 1": "109"} + Sun Jan 11 00:00:00 1970 | {"c3": "00110"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "110"} +(10 rows) + +-- single table with alias - also test that tableoid sort is not pushed to remote side +--Testcase 41: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int, t1.tableoid OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------ + Limit + Output: "time", tags, fields, ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer), tableoid + -> Sort + Output: "time", tags, fields, ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer), tableoid + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer), t1.tableoid + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields, (tags ->> 'c3'::text), ((fields ->> 'C 1'::text))::integer, tableoid + InfluxDB query: SELECT * FROM "T1" +(8 rows) + +--Testcase 42: +SELECT * FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int, t1.tableoid OFFSET 100 LIMIT 10; + time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00101"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "101"} + Sat Jan 03 00:00:00 1970 | {"c3": "00102"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "102"} + Sun Jan 04 00:00:00 1970 | {"c3": "00103"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "103"} + Mon Jan 05 00:00:00 1970 | {"c3": "00104"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "104"} + Tue Jan 06 00:00:00 1970 | {"c3": "00105"} | {"c2": "5", "c6": "5", "c7": "5 ", "c8": "foo", "C 1": "105"} + Wed Jan 07 00:00:00 1970 | {"c3": "00106"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "106"} + Thu Jan 08 00:00:00 1970 | {"c3": "00107"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "107"} + Fri Jan 09 00:00:00 1970 | {"c3": "00108"} | {"c2": "8", "c6": "8", "c7": "8 ", "c8": "foo", "C 1": "108"} + Sat Jan 10 00:00:00 1970 | {"c3": "00109"} | {"c2": "9", "c6": "9", "c7": "9 ", "c8": "foo", "C 1": "109"} + Sun Jan 11 00:00:00 1970 | {"c3": "00110"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "110"} +(10 rows) + +-- whole-row reference +--Testcase 43: +EXPLAIN (VERBOSE, COSTS OFF) SELECT t1 FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; + QUERY PLAN +---------------------------------------------------------------------------------------- + Limit + Output: t1.*, ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer) + -> Sort + Output: t1.*, ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer) + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.*, (tags ->> 'c3'::text), ((fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(8 rows) + +--Testcase 44: +SELECT t1 FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; + t1 +------------------------------------------------------------------------------------------------------------------------------------------------ + ("Fri Jan 02 00:00:00 1970","{""c3"": ""00101""}","{""c2"": ""1"", ""c6"": ""1"", ""c7"": ""1 "", ""c8"": ""foo"", ""C 1"": ""101""}") + ("Sat Jan 03 00:00:00 1970","{""c3"": ""00102""}","{""c2"": ""2"", ""c6"": ""2"", ""c7"": ""2 "", ""c8"": ""foo"", ""C 1"": ""102""}") + ("Sun Jan 04 00:00:00 1970","{""c3"": ""00103""}","{""c2"": ""3"", ""c6"": ""3"", ""c7"": ""3 "", ""c8"": ""foo"", ""C 1"": ""103""}") + ("Mon Jan 05 00:00:00 1970","{""c3"": ""00104""}","{""c2"": ""4"", ""c6"": ""4"", ""c7"": ""4 "", ""c8"": ""foo"", ""C 1"": ""104""}") + ("Tue Jan 06 00:00:00 1970","{""c3"": ""00105""}","{""c2"": ""5"", ""c6"": ""5"", ""c7"": ""5 "", ""c8"": ""foo"", ""C 1"": ""105""}") + ("Wed Jan 07 00:00:00 1970","{""c3"": ""00106""}","{""c2"": ""6"", ""c6"": ""6"", ""c7"": ""6 "", ""c8"": ""foo"", ""C 1"": ""106""}") + ("Thu Jan 08 00:00:00 1970","{""c3"": ""00107""}","{""c2"": ""7"", ""c6"": ""7"", ""c7"": ""7 "", ""c8"": ""foo"", ""C 1"": ""107""}") + ("Fri Jan 09 00:00:00 1970","{""c3"": ""00108""}","{""c2"": ""8"", ""c6"": ""8"", ""c7"": ""8 "", ""c8"": ""foo"", ""C 1"": ""108""}") + ("Sat Jan 10 00:00:00 1970","{""c3"": ""00109""}","{""c2"": ""9"", ""c6"": ""9"", ""c7"": ""9 "", ""c8"": ""foo"", ""C 1"": ""109""}") + ("Sun Jan 11 00:00:00 1970","{""c3"": ""00110""}","{""c2"": ""0"", ""c6"": ""0"", ""c7"": ""0 "", ""c8"": ""foo"", ""C 1"": ""110""}") +(10 rows) + +-- empty result +--Testcase 45: +SELECT * FROM ft1 WHERE false; + time | tags | fields +------+------+-------- +(0 rows) + +-- with WHERE clause +--Testcase 46: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 101 AND t1.fields->>'c6' = '1' AND t1.fields->>'c7' >= '1'; + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: ((t1.fields ->> 'c7'::text) >= '1'::text) + InfluxDB query: SELECT * FROM "T1" WHERE (("c6" = '1')) AND (("C 1" = 101)) +(4 rows) + +--Testcase 47: +SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 101 AND t1.fields->>'c6' = '1' AND t1.fields->>'c7' >= '1'; + time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00101"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "101"} +(1 row) + +-- with FOR UPDATE/SHARE +--Testcase 48: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 101 FOR UPDATE; + QUERY PLAN +------------------------------------------------------------------ + LockRows + Output: "time", tags, fields, t1.* + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields, t1.* + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 101)) +(5 rows) + +--Testcase 49: +SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 101 FOR UPDATE; + time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00101"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "101"} +(1 row) + +--Testcase 50: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 102 FOR SHARE; + QUERY PLAN +------------------------------------------------------------------ + LockRows + Output: "time", tags, fields, t1.* + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields, t1.* + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 102)) +(5 rows) + +--Testcase 51: +SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 102 FOR SHARE; + time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------- + Sat Jan 03 00:00:00 1970 | {"c3": "00102"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "102"} +(1 row) + +-- aggregate +--Testcase 52: +SELECT COUNT(*) FROM ft1 t1; + count +------- + 1000 +(1 row) + +-- subquery +--Testcase 53: +SELECT * FROM ft1 t1 WHERE t1.tags->>'c3' IN (SELECT tags->>'c3' FROM ft2 t2 WHERE (fields->>'C 1')::int <= 10) ORDER BY (fields->>'C 1')::int; + time | tags | fields +--------------------------+-----------------+---------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} + Sat Jan 03 00:00:00 1970 | {"c3": "00002"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "2"} + Sun Jan 04 00:00:00 1970 | {"c3": "00003"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "3"} + Mon Jan 05 00:00:00 1970 | {"c3": "00004"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "4"} + Tue Jan 06 00:00:00 1970 | {"c3": "00005"} | {"c2": "5", "c6": "5", "c7": "5 ", "c8": "foo", "C 1": "5"} + Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} + Thu Jan 08 00:00:00 1970 | {"c3": "00007"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "7"} + Fri Jan 09 00:00:00 1970 | {"c3": "00008"} | {"c2": "8", "c6": "8", "c7": "8 ", "c8": "foo", "C 1": "8"} + Sat Jan 10 00:00:00 1970 | {"c3": "00009"} | {"c2": "9", "c6": "9", "c7": "9 ", "c8": "foo", "C 1": "9"} + Sun Jan 11 00:00:00 1970 | {"c3": "00010"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "10"} +(10 rows) + +-- subquery+MAX +--Testcase 54: +SELECT * FROM ft1 t1 WHERE t1.tags->>'c3' = (SELECT MAX(tags->>'c3') FROM ft2 t2) ORDER BY (fields->>'C 1')::int; + time | tags | fields +--------------------------+-----------------+------------------------------------------------------------------------ + Thu Jan 01 00:00:00 1970 | {"c3": "01000"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "1000"} +(1 row) + +-- used in CTE +--Testcase 55: +WITH t1 AS (SELECT * FROM ft1 WHERE (fields->>'C 1')::int <= 10) SELECT (t2.fields->>'C 1')::int c1, (t2.fields->>'c2')::int c2, t2.tags->>'c3' c3, t2.time FROM t1, ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'C 1')::int ORDER BY (t1.fields->>'C 1')::int; + c1 | c2 | c3 | time +----+----+-------+-------------------------- + 1 | 1 | 00001 | Fri Jan 02 00:00:00 1970 + 2 | 2 | 00002 | Sat Jan 03 00:00:00 1970 + 3 | 3 | 00003 | Sun Jan 04 00:00:00 1970 + 4 | 4 | 00004 | Mon Jan 05 00:00:00 1970 + 5 | 5 | 00005 | Tue Jan 06 00:00:00 1970 + 6 | 6 | 00006 | Wed Jan 07 00:00:00 1970 + 7 | 7 | 00007 | Thu Jan 08 00:00:00 1970 + 8 | 8 | 00008 | Fri Jan 09 00:00:00 1970 + 9 | 9 | 00009 | Sat Jan 10 00:00:00 1970 + 10 | 0 | 00010 | Sun Jan 11 00:00:00 1970 +(10 rows) + +-- fixed values +--Testcase 56: +SELECT 'fixed', NULL FROM ft1 t1 WHERE (fields->>'C 1')::int = 1; + ?column? | ?column? +----------+---------- + fixed | +(1 row) + +-- Test forcing the remote server to produce sorted data for a merge join. +--Testcase 57: +SET enable_hashjoin TO false; +--Testcase 58: +SET enable_nestloop TO false; +-- inner join; expressions in the clauses appear in the equivalence class list +--Testcase 59: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t1 + Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on "S 1"."T 1" t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(17 rows) + +--Testcase 60: +SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; + c1 | C 1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- outer join; expressions in the clauses do not appear in equivalence class +-- list but no output change as compared to the previous query +--Testcase 61: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + -> Merge Left Join + Output: (((t1.fields ->> 'C 1'::text))::integer), ((t2.fields ->> 'C 1'::text))::integer + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t1 + Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on "S 1"."T 1" t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(17 rows) + +--Testcase 62: +SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; + c1 | C 1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- A join between 2 foreign tables. ORDER BY clause is added to the +-- foreign join so that the other table can be joined using merge join strategy. +--Testcase 63: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer) + -> Merge Left Join + Output: (((t1.fields ->> 'C 1'::text))::integer) + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = ((t3.fields ->> 'C 1'::text))::integer) + -> Sort + Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on "S 1"."T 1" t1 + Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t3.fields + -> Merge Join + Output: t3.fields + Merge Cond: ((((t2.fields ->> 'C 1'::text))::integer) = (((t3.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t3.fields, (((t3.fields ->> 'C 1'::text))::integer) + Sort Key: (((t3.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t3 + Output: t3.fields, ((t3.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(28 rows) + +--Testcase 64: +SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; + C 1 +----- + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 +(10 rows) + +-- Test similar to above, except that the full join prevents any equivalence +-- classes from being merged. This produces single relation equivalence classes +-- included in join restrictions. +--Testcase 65: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (((t3.fields ->> 'C 1'::text))::integer) + -> Merge Left Join + Output: (((t1.fields ->> 'C 1'::text))::integer), ((t2.fields ->> 'C 1'::text))::integer, ((t3.fields ->> 'C 1'::text))::integer + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = ((t3.fields ->> 'C 1'::text))::integer) + -> Sort + Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on "S 1"."T 1" t1 + Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t3.fields, t2.fields + -> Merge Left Join + Output: t3.fields, t2.fields + Merge Cond: ((((t3.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t3.fields, (((t3.fields ->> 'C 1'::text))::integer) + Sort Key: (((t3.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t3 + Output: t3.fields, ((t3.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(28 rows) + +--Testcase 66: +SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; + C 1 | c1 | c1 +-----+-----+----- + 101 | 101 | 101 + 102 | 102 | 102 + 103 | 103 | 103 + 104 | 104 | 104 + 105 | 105 | 105 + 106 | 106 | 106 + 107 | 107 | 107 + 108 | 108 | 108 + 109 | 109 | 109 + 110 | 110 | 110 +(10 rows) + +-- Test similar to above with all full outer joins +--Testcase 67: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (((t3.fields ->> 'C 1'::text))::integer) + -> Merge Full Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'C 1'::text))::integer, ((t3.fields ->> 'C 1'::text))::integer + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t3.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on "S 1"."T 1" t1 + Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, t3.fields, (((t3.fields ->> 'C 1'::text))::integer) + Sort Key: (((t3.fields ->> 'C 1'::text))::integer) + -> Merge Full Join + Output: t2.fields, t3.fields, ((t3.fields ->> 'C 1'::text))::integer + Merge Cond: ((((t2.fields ->> 'C 1'::text))::integer) = (((t3.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t3.fields, (((t3.fields ->> 'C 1'::text))::integer) + Sort Key: (((t3.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t3 + Output: t3.fields, ((t3.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(29 rows) + +--Testcase 68: +SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; + C 1 | c1 | c1 +-----+-----+----- + 101 | 101 | 101 + 102 | 102 | 102 + 103 | 103 | 103 + 104 | 104 | 104 + 105 | 105 | 105 + 106 | 106 | 106 + 107 | 107 | 107 + 108 | 108 | 108 + 109 | 109 | 109 + 110 | 110 | 110 +(10 rows) + +--Testcase 69: +RESET enable_hashjoin; +--Testcase 70: +RESET enable_nestloop; +-- Test executing assertion in estimate_path_cost_size() that makes sure that +-- retrieved_rows for foreign rel re-used to cost pre-sorted foreign paths is +-- a sensible value even when the rel has tuples=0 +--Testcase 71: +CREATE FOREIGN TABLE loct_empty (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 792: +CREATE FOREIGN TABLE loct_empty_nsc (c1 int NOT NULL, c2 text) SERVER influxdb_svr OPTIONS (table 'loct_empty'); +--Testcase 72: +CREATE FOREIGN TABLE ft_empty (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct_empty', schemaless 'true'); +--Testcase 73: +INSERT INTO loct_empty_nsc + SELECT id, 'AAA' || to_char(id, 'FM000') FROM generate_series(1, 100) id; +--Testcase 74: +DELETE FROM loct_empty_nsc; +--Testcase 793: +DROP FOREIGN TABLE loct_empty_nsc; +--ANALYZE ft_empty; +--Testcase 75: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft_empty ORDER BY (fields->>'c1')::int; + QUERY PLAN +------------------------------------------------------------ + Sort + Output: fields, (((fields ->> 'c1'::text))::integer) + Sort Key: (((ft_empty.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft_empty + Output: fields, ((fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "loct_empty" +(6 rows) + +-- =================================================================== +-- WHERE with remotely-executable conditions +-- =================================================================== +--Testcase 76: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 1; -- Var, OpExpr(b), Const + QUERY PLAN +---------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +--Testcase 77: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 100 AND (t1.fields->>'c2')::int = 0; -- BoolExpr + QUERY PLAN +----------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 100)) AND (("c2" = 0)) +(3 rows) + +--Testcase 78: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int IS NULL; -- NullTest + QUERY PLAN +------------------------------------------------------------ + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (((t1.fields ->> 'C 1'::text))::integer IS NULL) + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +--Testcase 79: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int IS NOT NULL; -- NullTest + QUERY PLAN +---------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (((t1.fields ->> 'C 1'::text))::integer IS NOT NULL) + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +--Testcase 80: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE round(abs((t1.fields->>'C 1')::int), 0) = 1; -- FuncExpr + QUERY PLAN +--------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (round((abs(((t1.fields ->> 'C 1'::text))::integer))::numeric, 0) = '1'::numeric) + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +--Testcase 81: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = -(t1.fields->>'C 1')::int; -- OpExpr(l) + QUERY PLAN +------------------------------------------------------------------ + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = (- "C 1"))) +(3 rows) + +--Testcase 82: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE ((t1.fields->>'C 1')::int IS NOT NULL) IS DISTINCT FROM ((t1.fields->>'C 1')::int IS NOT NULL); -- DistinctExpr + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: ((((t1.fields ->> 'C 1'::text))::integer IS NOT NULL) IS DISTINCT FROM (((t1.fields ->> 'C 1'::text))::integer IS NOT NULL)) + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +--Testcase 83: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = ANY(ARRAY[(fields->>'c2')::int, 1, (t1.fields->>'C 1')::int + 0]); -- ScalarArrayOpExpr + QUERY PLAN +----------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = "c2") OR ("C 1" = 1) OR ("C 1" = ("C 1" + 0))) +(3 rows) + +--Testcase 84: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (ARRAY[(t1.fields->>'C 1')::int,(fields->>'c2')::int,3])[1]; -- SubscriptingRef + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (((t1.fields ->> 'C 1'::text))::integer = (ARRAY[((t1.fields ->> 'C 1'::text))::integer, ((t1.fields ->> 'c2'::text))::integer, 3])[1]) + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +--Testcase 85: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE fields->>'c6' = E'foo''s\\bar'; -- check special chars + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c6" = 'foo''s\\bar')) +(3 rows) + +--Testcase 86: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE fields->>'c8' = 'foo'; -- can't be sent to remote + QUERY PLAN +------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) +(3 rows) + +-- parameterized remote path for foreign table +--Testcase 87: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM "S 1"."T 1" a, ft2 b WHERE (a.fields->>'C 1')::int = 47 AND (b.fields->>'C 1')::int = (a.fields->>'c2')::int; + QUERY PLAN +--------------------------------------------------------------------------------------------- + Hash Join + Output: a."time", a.tags, a.fields, b."time", b.tags, b.fields + Hash Cond: (((b.fields ->> 'C 1'::text))::integer = ((a.fields ->> 'c2'::text))::integer) + -> Foreign Scan on public.ft2 b + Output: b."time", b.tags, b.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: a."time", a.tags, a.fields + -> Foreign Scan on "S 1"."T 1" a + Output: a."time", a.tags, a.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 47)) +(11 rows) + +--Testcase 88: +SELECT * FROM ft2 a, ft2 b WHERE (a.fields->>'C 1')::int = 47 AND (b.fields->>'C 1')::int = (a.fields->>'c2')::int; + time | tags | fields | time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------+--------------------------+-----------------+--------------------------------------------------------------------- + Tue Feb 17 00:00:00 1970 | {"c3": "00047"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "47"} | Thu Jan 08 00:00:00 1970 | {"c3": "00007"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "7"} +(1 row) + +-- check both safe and unsafe join conditions +--Testcase 89: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM ft2 a, ft2 b + WHERE (a.fields->>'c2')::int = 6 AND (b.fields->>'C 1')::int = (a.fields->>'C 1')::int AND a.fields->>'c8' = 'foo' AND b.fields->>'c7' = upper(a.fields->>'c7'); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Join + Output: a."time", a.tags, a.fields, b."time", b.tags, b.fields + Hash Cond: ((((b.fields ->> 'C 1'::text))::integer = ((a.fields ->> 'C 1'::text))::integer) AND ((b.fields ->> 'c7'::text) = upper((a.fields ->> 'c7'::text)))) + -> Foreign Scan on public.ft2 b + Output: b."time", b.tags, b.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: a."time", a.tags, a.fields + -> Foreign Scan on public.ft2 a + Output: a."time", a.tags, a.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("c2" = 6)) +(11 rows) + +--Testcase 90: +SELECT * FROM ft2 a, ft2 b +WHERE (a.fields->>'c2')::int = 6 AND (b.fields->>'C 1')::int = (a.fields->>'C 1')::int AND a.fields->>'c8' = 'foo' AND b.fields->>'c7' = upper(a.fields->>'c7') ORDER BY (a.fields->>'C 1')::int; + time | tags | fields | time | tags | fields +--------------------------+-----------------+-----------------------------------------------------------------------+--------------------------+-----------------+----------------------------------------------------------------------- + Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} | Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} + Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} | Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} + Tue Jan 27 00:00:00 1970 | {"c3": "00026"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "26"} | Tue Jan 27 00:00:00 1970 | {"c3": "00026"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "26"} + Fri Feb 06 00:00:00 1970 | {"c3": "00036"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "36"} | Fri Feb 06 00:00:00 1970 | {"c3": "00036"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "36"} + Mon Feb 16 00:00:00 1970 | {"c3": "00046"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "46"} | Mon Feb 16 00:00:00 1970 | {"c3": "00046"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "46"} + Thu Feb 26 00:00:00 1970 | {"c3": "00056"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "56"} | Thu Feb 26 00:00:00 1970 | {"c3": "00056"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "56"} + Sun Mar 08 00:00:00 1970 | {"c3": "00066"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "66"} | Sun Mar 08 00:00:00 1970 | {"c3": "00066"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "66"} + Wed Mar 18 00:00:00 1970 | {"c3": "00076"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "76"} | Wed Mar 18 00:00:00 1970 | {"c3": "00076"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "76"} + Sat Mar 28 00:00:00 1970 | {"c3": "00086"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "86"} | Sat Mar 28 00:00:00 1970 | {"c3": "00086"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "86"} + Tue Apr 07 00:00:00 1970 | {"c3": "00096"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "96"} | Tue Apr 07 00:00:00 1970 | {"c3": "00096"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "96"} + Wed Jan 07 00:00:00 1970 | {"c3": "00106"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "106"} | Wed Jan 07 00:00:00 1970 | {"c3": "00106"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "106"} + Sat Jan 17 00:00:00 1970 | {"c3": "00116"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "116"} | Sat Jan 17 00:00:00 1970 | {"c3": "00116"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "116"} + Tue Jan 27 00:00:00 1970 | {"c3": "00126"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "126"} | Tue Jan 27 00:00:00 1970 | {"c3": "00126"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "126"} + Fri Feb 06 00:00:00 1970 | {"c3": "00136"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "136"} | Fri Feb 06 00:00:00 1970 | {"c3": "00136"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "136"} + Mon Feb 16 00:00:00 1970 | {"c3": "00146"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "146"} | Mon Feb 16 00:00:00 1970 | {"c3": "00146"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "146"} + Thu Feb 26 00:00:00 1970 | {"c3": "00156"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "156"} | Thu Feb 26 00:00:00 1970 | {"c3": "00156"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "156"} + Sun Mar 08 00:00:00 1970 | {"c3": "00166"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "166"} | Sun Mar 08 00:00:00 1970 | {"c3": "00166"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "166"} + Wed Mar 18 00:00:00 1970 | {"c3": "00176"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "176"} | Wed Mar 18 00:00:00 1970 | {"c3": "00176"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "176"} + Sat Mar 28 00:00:00 1970 | {"c3": "00186"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "186"} | Sat Mar 28 00:00:00 1970 | {"c3": "00186"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "186"} + Tue Apr 07 00:00:00 1970 | {"c3": "00196"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "196"} | Tue Apr 07 00:00:00 1970 | {"c3": "00196"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "196"} + Wed Jan 07 00:00:00 1970 | {"c3": "00206"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "206"} | Wed Jan 07 00:00:00 1970 | {"c3": "00206"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "206"} + Sat Jan 17 00:00:00 1970 | {"c3": "00216"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "216"} | Sat Jan 17 00:00:00 1970 | {"c3": "00216"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "216"} + Tue Jan 27 00:00:00 1970 | {"c3": "00226"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "226"} | Tue Jan 27 00:00:00 1970 | {"c3": "00226"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "226"} + Fri Feb 06 00:00:00 1970 | {"c3": "00236"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "236"} | Fri Feb 06 00:00:00 1970 | {"c3": "00236"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "236"} + Mon Feb 16 00:00:00 1970 | {"c3": "00246"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "246"} | Mon Feb 16 00:00:00 1970 | {"c3": "00246"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "246"} + Thu Feb 26 00:00:00 1970 | {"c3": "00256"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "256"} | Thu Feb 26 00:00:00 1970 | {"c3": "00256"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "256"} + Sun Mar 08 00:00:00 1970 | {"c3": "00266"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "266"} | Sun Mar 08 00:00:00 1970 | {"c3": "00266"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "266"} + Wed Mar 18 00:00:00 1970 | {"c3": "00276"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "276"} | Wed Mar 18 00:00:00 1970 | {"c3": "00276"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "276"} + Sat Mar 28 00:00:00 1970 | {"c3": "00286"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "286"} | Sat Mar 28 00:00:00 1970 | {"c3": "00286"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "286"} + Tue Apr 07 00:00:00 1970 | {"c3": "00296"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "296"} | Tue Apr 07 00:00:00 1970 | {"c3": "00296"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "296"} + Wed Jan 07 00:00:00 1970 | {"c3": "00306"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "306"} | Wed Jan 07 00:00:00 1970 | {"c3": "00306"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "306"} + Sat Jan 17 00:00:00 1970 | {"c3": "00316"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "316"} | Sat Jan 17 00:00:00 1970 | {"c3": "00316"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "316"} + Tue Jan 27 00:00:00 1970 | {"c3": "00326"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "326"} | Tue Jan 27 00:00:00 1970 | {"c3": "00326"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "326"} + Fri Feb 06 00:00:00 1970 | {"c3": "00336"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "336"} | Fri Feb 06 00:00:00 1970 | {"c3": "00336"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "336"} + Mon Feb 16 00:00:00 1970 | {"c3": "00346"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "346"} | Mon Feb 16 00:00:00 1970 | {"c3": "00346"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "346"} + Thu Feb 26 00:00:00 1970 | {"c3": "00356"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "356"} | Thu Feb 26 00:00:00 1970 | {"c3": "00356"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "356"} + Sun Mar 08 00:00:00 1970 | {"c3": "00366"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "366"} | Sun Mar 08 00:00:00 1970 | {"c3": "00366"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "366"} + Wed Mar 18 00:00:00 1970 | {"c3": "00376"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "376"} | Wed Mar 18 00:00:00 1970 | {"c3": "00376"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "376"} + Sat Mar 28 00:00:00 1970 | {"c3": "00386"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "386"} | Sat Mar 28 00:00:00 1970 | {"c3": "00386"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "386"} + Tue Apr 07 00:00:00 1970 | {"c3": "00396"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "396"} | Tue Apr 07 00:00:00 1970 | {"c3": "00396"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "396"} + Wed Jan 07 00:00:00 1970 | {"c3": "00406"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "406"} | Wed Jan 07 00:00:00 1970 | {"c3": "00406"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "406"} + Sat Jan 17 00:00:00 1970 | {"c3": "00416"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "416"} | Sat Jan 17 00:00:00 1970 | {"c3": "00416"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "416"} + Tue Jan 27 00:00:00 1970 | {"c3": "00426"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "426"} | Tue Jan 27 00:00:00 1970 | {"c3": "00426"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "426"} + Fri Feb 06 00:00:00 1970 | {"c3": "00436"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "436"} | Fri Feb 06 00:00:00 1970 | {"c3": "00436"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "436"} + Mon Feb 16 00:00:00 1970 | {"c3": "00446"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "446"} | Mon Feb 16 00:00:00 1970 | {"c3": "00446"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "446"} + Thu Feb 26 00:00:00 1970 | {"c3": "00456"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "456"} | Thu Feb 26 00:00:00 1970 | {"c3": "00456"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "456"} + Sun Mar 08 00:00:00 1970 | {"c3": "00466"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "466"} | Sun Mar 08 00:00:00 1970 | {"c3": "00466"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "466"} + Wed Mar 18 00:00:00 1970 | {"c3": "00476"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "476"} | Wed Mar 18 00:00:00 1970 | {"c3": "00476"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "476"} + Sat Mar 28 00:00:00 1970 | {"c3": "00486"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "486"} | Sat Mar 28 00:00:00 1970 | {"c3": "00486"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "486"} + Tue Apr 07 00:00:00 1970 | {"c3": "00496"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "496"} | Tue Apr 07 00:00:00 1970 | {"c3": "00496"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "496"} + Wed Jan 07 00:00:00 1970 | {"c3": "00506"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "506"} | Wed Jan 07 00:00:00 1970 | {"c3": "00506"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "506"} + Sat Jan 17 00:00:00 1970 | {"c3": "00516"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "516"} | Sat Jan 17 00:00:00 1970 | {"c3": "00516"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "516"} + Tue Jan 27 00:00:00 1970 | {"c3": "00526"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "526"} | Tue Jan 27 00:00:00 1970 | {"c3": "00526"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "526"} + Fri Feb 06 00:00:00 1970 | {"c3": "00536"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "536"} | Fri Feb 06 00:00:00 1970 | {"c3": "00536"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "536"} + Mon Feb 16 00:00:00 1970 | {"c3": "00546"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "546"} | Mon Feb 16 00:00:00 1970 | {"c3": "00546"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "546"} + Thu Feb 26 00:00:00 1970 | {"c3": "00556"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "556"} | Thu Feb 26 00:00:00 1970 | {"c3": "00556"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "556"} + Sun Mar 08 00:00:00 1970 | {"c3": "00566"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "566"} | Sun Mar 08 00:00:00 1970 | {"c3": "00566"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "566"} + Wed Mar 18 00:00:00 1970 | {"c3": "00576"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "576"} | Wed Mar 18 00:00:00 1970 | {"c3": "00576"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "576"} + Sat Mar 28 00:00:00 1970 | {"c3": "00586"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "586"} | Sat Mar 28 00:00:00 1970 | {"c3": "00586"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "586"} + Tue Apr 07 00:00:00 1970 | {"c3": "00596"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "596"} | Tue Apr 07 00:00:00 1970 | {"c3": "00596"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "596"} + Wed Jan 07 00:00:00 1970 | {"c3": "00606"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "606"} | Wed Jan 07 00:00:00 1970 | {"c3": "00606"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "606"} + Sat Jan 17 00:00:00 1970 | {"c3": "00616"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "616"} | Sat Jan 17 00:00:00 1970 | {"c3": "00616"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "616"} + Tue Jan 27 00:00:00 1970 | {"c3": "00626"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "626"} | Tue Jan 27 00:00:00 1970 | {"c3": "00626"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "626"} + Fri Feb 06 00:00:00 1970 | {"c3": "00636"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "636"} | Fri Feb 06 00:00:00 1970 | {"c3": "00636"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "636"} + Mon Feb 16 00:00:00 1970 | {"c3": "00646"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "646"} | Mon Feb 16 00:00:00 1970 | {"c3": "00646"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "646"} + Thu Feb 26 00:00:00 1970 | {"c3": "00656"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "656"} | Thu Feb 26 00:00:00 1970 | {"c3": "00656"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "656"} + Sun Mar 08 00:00:00 1970 | {"c3": "00666"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "666"} | Sun Mar 08 00:00:00 1970 | {"c3": "00666"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "666"} + Wed Mar 18 00:00:00 1970 | {"c3": "00676"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "676"} | Wed Mar 18 00:00:00 1970 | {"c3": "00676"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "676"} + Sat Mar 28 00:00:00 1970 | {"c3": "00686"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "686"} | Sat Mar 28 00:00:00 1970 | {"c3": "00686"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "686"} + Tue Apr 07 00:00:00 1970 | {"c3": "00696"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "696"} | Tue Apr 07 00:00:00 1970 | {"c3": "00696"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "696"} + Wed Jan 07 00:00:00 1970 | {"c3": "00706"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "706"} | Wed Jan 07 00:00:00 1970 | {"c3": "00706"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "706"} + Sat Jan 17 00:00:00 1970 | {"c3": "00716"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "716"} | Sat Jan 17 00:00:00 1970 | {"c3": "00716"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "716"} + Tue Jan 27 00:00:00 1970 | {"c3": "00726"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "726"} | Tue Jan 27 00:00:00 1970 | {"c3": "00726"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "726"} + Fri Feb 06 00:00:00 1970 | {"c3": "00736"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "736"} | Fri Feb 06 00:00:00 1970 | {"c3": "00736"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "736"} + Mon Feb 16 00:00:00 1970 | {"c3": "00746"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "746"} | Mon Feb 16 00:00:00 1970 | {"c3": "00746"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "746"} + Thu Feb 26 00:00:00 1970 | {"c3": "00756"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "756"} | Thu Feb 26 00:00:00 1970 | {"c3": "00756"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "756"} + Sun Mar 08 00:00:00 1970 | {"c3": "00766"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "766"} | Sun Mar 08 00:00:00 1970 | {"c3": "00766"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "766"} + Wed Mar 18 00:00:00 1970 | {"c3": "00776"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "776"} | Wed Mar 18 00:00:00 1970 | {"c3": "00776"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "776"} + Sat Mar 28 00:00:00 1970 | {"c3": "00786"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "786"} | Sat Mar 28 00:00:00 1970 | {"c3": "00786"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "786"} + Tue Apr 07 00:00:00 1970 | {"c3": "00796"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "796"} | Tue Apr 07 00:00:00 1970 | {"c3": "00796"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "796"} + Wed Jan 07 00:00:00 1970 | {"c3": "00806"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "806"} | Wed Jan 07 00:00:00 1970 | {"c3": "00806"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "806"} + Sat Jan 17 00:00:00 1970 | {"c3": "00816"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "816"} | Sat Jan 17 00:00:00 1970 | {"c3": "00816"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "816"} + Tue Jan 27 00:00:00 1970 | {"c3": "00826"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "826"} | Tue Jan 27 00:00:00 1970 | {"c3": "00826"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "826"} + Fri Feb 06 00:00:00 1970 | {"c3": "00836"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "836"} | Fri Feb 06 00:00:00 1970 | {"c3": "00836"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "836"} + Mon Feb 16 00:00:00 1970 | {"c3": "00846"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "846"} | Mon Feb 16 00:00:00 1970 | {"c3": "00846"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "846"} + Thu Feb 26 00:00:00 1970 | {"c3": "00856"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "856"} | Thu Feb 26 00:00:00 1970 | {"c3": "00856"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "856"} + Sun Mar 08 00:00:00 1970 | {"c3": "00866"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "866"} | Sun Mar 08 00:00:00 1970 | {"c3": "00866"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "866"} + Wed Mar 18 00:00:00 1970 | {"c3": "00876"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "876"} | Wed Mar 18 00:00:00 1970 | {"c3": "00876"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "876"} + Sat Mar 28 00:00:00 1970 | {"c3": "00886"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "886"} | Sat Mar 28 00:00:00 1970 | {"c3": "00886"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "886"} + Tue Apr 07 00:00:00 1970 | {"c3": "00896"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "896"} | Tue Apr 07 00:00:00 1970 | {"c3": "00896"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "896"} + Wed Jan 07 00:00:00 1970 | {"c3": "00906"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "906"} | Wed Jan 07 00:00:00 1970 | {"c3": "00906"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "906"} + Sat Jan 17 00:00:00 1970 | {"c3": "00916"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "916"} | Sat Jan 17 00:00:00 1970 | {"c3": "00916"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "916"} + Tue Jan 27 00:00:00 1970 | {"c3": "00926"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "926"} | Tue Jan 27 00:00:00 1970 | {"c3": "00926"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "926"} + Fri Feb 06 00:00:00 1970 | {"c3": "00936"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "936"} | Fri Feb 06 00:00:00 1970 | {"c3": "00936"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "936"} + Mon Feb 16 00:00:00 1970 | {"c3": "00946"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "946"} | Mon Feb 16 00:00:00 1970 | {"c3": "00946"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "946"} + Thu Feb 26 00:00:00 1970 | {"c3": "00956"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "956"} | Thu Feb 26 00:00:00 1970 | {"c3": "00956"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "956"} + Sun Mar 08 00:00:00 1970 | {"c3": "00966"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "966"} | Sun Mar 08 00:00:00 1970 | {"c3": "00966"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "966"} + Wed Mar 18 00:00:00 1970 | {"c3": "00976"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "976"} | Wed Mar 18 00:00:00 1970 | {"c3": "00976"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "976"} + Sat Mar 28 00:00:00 1970 | {"c3": "00986"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "986"} | Sat Mar 28 00:00:00 1970 | {"c3": "00986"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "986"} + Tue Apr 07 00:00:00 1970 | {"c3": "00996"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "996"} | Tue Apr 07 00:00:00 1970 | {"c3": "00996"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "996"} +(100 rows) + +-- bug before 9.3.5 due to sloppy handling of remote-estimate parameters +--Testcase 91: +SELECT * FROM ft1 WHERE (fields->>'C 1')::int = ANY (ARRAY(SELECT (fields->>'C 1')::int FROM ft2 WHERE (fields->>'C 1')::int < 5)); + time | tags | fields +--------------------------+-----------------+--------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} + Sat Jan 03 00:00:00 1970 | {"c3": "00002"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "2"} + Sun Jan 04 00:00:00 1970 | {"c3": "00003"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "3"} + Mon Jan 05 00:00:00 1970 | {"c3": "00004"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "4"} +(4 rows) + +--Testcase 92: +SELECT * FROM ft2 WHERE (fields->>'C 1')::int = ANY (ARRAY(SELECT (fields->>'C 1')::int FROM ft1 WHERE (fields->>'C 1')::int < 5)); + time | tags | fields +--------------------------+-----------------+--------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} + Sat Jan 03 00:00:00 1970 | {"c3": "00002"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "2"} + Sun Jan 04 00:00:00 1970 | {"c3": "00003"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "3"} + Mon Jan 05 00:00:00 1970 | {"c3": "00004"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "4"} +(4 rows) + +-- we should not push order by clause with volatile expressions or unsafe +-- collations +--Testcase 93: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM ft2 ORDER BY (ft2.fields->>'C 1')::int, random(); + QUERY PLAN +------------------------------------------------------------------------------------- + Sort + Output: "time", tags, fields, (((fields ->> 'C 1'::text))::integer), (random()) + Sort Key: (((ft2.fields ->> 'C 1'::text))::integer), (random()) + -> Foreign Scan on public.ft2 + Output: "time", tags, fields, ((fields ->> 'C 1'::text))::integer, random() + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +--Testcase 94: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM ft2 ORDER BY (ft2.fields->>'C 1')::int, ft2.tags->>'c3' collate "C"; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Sort + Output: "time", tags, fields, (((fields ->> 'C 1'::text))::integer), ((tags ->> 'c3'::text COLLATE "C")) + Sort Key: (((ft2.fields ->> 'C 1'::text))::integer), ((ft2.tags ->> 'c3'::text COLLATE "C")) COLLATE "C" + -> Foreign Scan on public.ft2 + Output: "time", tags, fields, ((fields ->> 'C 1'::text))::integer, (tags ->> 'c3'::text COLLATE "C") + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +-- user-defined operator/function +--Testcase 95: +CREATE FUNCTION influxdb_fdw_abs(int) RETURNS int AS $$ +BEGIN +RETURN abs($1); +END +$$ LANGUAGE plpgsql IMMUTABLE; +--Testcase 96: +CREATE OPERATOR === ( + LEFTARG = int, + RIGHTARG = int, + PROCEDURE = int4eq, + COMMUTATOR = === +); +-- built-in operators and functions can be shipped for remote execution +--Testcase 97: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = abs((t1.fields->>'c2')::int); + QUERY PLAN +------------------------------------------------------------------------ + Aggregate + Output: count((tags ->> 'c3'::text)) + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = abs("c2"))) +(5 rows) + +--Testcase 98: +SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = abs((t1.fields->>'c2')::int); + count +------- + 9 +(1 row) + +--Testcase 99: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (t1.fields->>'c2')::int; + QUERY PLAN +------------------------------------------------------------------- + Aggregate + Output: count((tags ->> 'c3'::text)) + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = "c2")) +(5 rows) + +--Testcase 100: +SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (t1.fields->>'c2')::int; + count +------- + 9 +(1 row) + +-- by default, user-defined ones cannot +--Testcase 101: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: count((tags ->> 'c3'::text)) + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (((t1.fields ->> 'C 1'::text))::integer = influxdb_fdw_abs(((t1.fields ->> 'c2'::text))::integer)) + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +--Testcase 102: +SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); + count +------- + 9 +(1 row) + +--Testcase 103: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Aggregate + Output: count((tags ->> 'c3'::text)) + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +--Testcase 104: +SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; + count +------- + 9 +(1 row) + +-- ORDER BY can be shipped, though +--Testcase 105: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Limit + Output: "time", tags, fields, (((fields ->> 'c2'::text))::integer) + -> Sort + Output: "time", tags, fields, (((fields ->> 'c2'::text))::integer) + Sort Key: (((t1.fields ->> 'c2'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields, ((fields ->> 'c2'::text))::integer + Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) + InfluxDB query: SELECT * FROM "T1" +(9 rows) + +--Testcase 106: +SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; + time | tags | fields +--------------------------+-----------------+--------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} +(1 row) + +-- but let's put them in an extension ... +--Testcase 107: +ALTER EXTENSION influxdb_fdw ADD FUNCTION influxdb_fdw_abs(int); +--Testcase 108: +ALTER EXTENSION influxdb_fdw ADD OPERATOR === (int, int); +-- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); +-- ... now they can be shipped +--Testcase 109: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: count((tags ->> 'c3'::text)) + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (((t1.fields ->> 'C 1'::text))::integer = influxdb_fdw_abs(((t1.fields ->> 'c2'::text))::integer)) + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +--Testcase 110: +SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); + count +------- + 9 +(1 row) + +--Testcase 111: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Aggregate + Output: count((tags ->> 'c3'::text)) + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +--Testcase 112: +SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; + count +------- + 9 +(1 row) + +-- and both ORDER BY and LIMIT can be shipped +--Testcase 113: +EXPLAIN (VERBOSE, COSTS OFF) + SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Limit + Output: "time", tags, fields, (((fields ->> 'c2'::text))::integer) + -> Sort + Output: "time", tags, fields, (((fields ->> 'c2'::text))::integer) + Sort Key: (((t1.fields ->> 'c2'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields, ((fields ->> 'c2'::text))::integer + Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) + InfluxDB query: SELECT * FROM "T1" +(9 rows) + +--Testcase 114: +SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; + time | tags | fields +--------------------------+-----------------+--------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} +(1 row) + +-- Test CASE pushdown +--Testcase 854: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT fields->>'C 1',fields->>'c2',tags->>'c3' FROM ft2 WHERE CASE WHEN (fields->>'C 1')::int > 990 THEN (fields->>'C 1')::int END < 1000 ORDER BY (fields->>'C 1')::int; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((fields ->> 'C 1'::text)), ((fields ->> 'c2'::text)), ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer) + Sort Key: (((ft2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 + Output: (fields ->> 'C 1'::text), (fields ->> 'c2'::text), (tags ->> 'c3'::text), ((fields ->> 'C 1'::text))::integer + Filter: (CASE WHEN (((ft2.fields ->> 'C 1'::text))::integer > 990) THEN ((ft2.fields ->> 'C 1'::text))::integer ELSE NULL::integer END < 1000) + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(7 rows) + +--Testcase 855: +SELECT fields->>'C 1',fields->>'c2',tags->>'c3' FROM ft2 WHERE CASE WHEN (fields->>'C 1')::int > 990 THEN (fields->>'C 1')::int END < 1000 ORDER BY (fields->>'C 1')::int; + ?column? | ?column? | ?column? +----------+----------+---------- + 991 | 1 | 00991 + 992 | 2 | 00992 + 993 | 3 | 00993 + 994 | 4 | 00994 + 995 | 5 | 00995 + 996 | 6 | 00996 + 997 | 7 | 00997 + 998 | 8 | 00998 + 999 | 9 | 00999 +(9 rows) + +-- Nested CASE +--Testcase 856: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT fields->>'C 1',fields->>'c2',tags->>'c3' FROM ft2 WHERE CASE CASE WHEN (fields->>'c2')::int > 0 THEN (fields->>'c2')::int END WHEN 100 THEN 601 WHEN (fields->>'c2')::int THEN (fields->>'c2')::int ELSE 0 END > 600 ORDER BY (fields->>'C 1')::int; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((fields ->> 'C 1'::text)), ((fields ->> 'c2'::text)), ((tags ->> 'c3'::text)), (((fields ->> 'C 1'::text))::integer) + Sort Key: (((ft2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 + Output: (fields ->> 'C 1'::text), (fields ->> 'c2'::text), (tags ->> 'c3'::text), ((fields ->> 'C 1'::text))::integer + Filter: (CASE CASE WHEN (((ft2.fields ->> 'c2'::text))::integer > 0) THEN ((ft2.fields ->> 'c2'::text))::integer ELSE NULL::integer END WHEN 100 THEN 601 WHEN ((ft2.fields ->> 'c2'::text))::integer THEN ((ft2.fields ->> 'c2'::text))::integer ELSE 0 END > 600) + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(7 rows) + +--Testcase 857: +SELECT fields->>'C 1',fields->>'c2',tags->>'c3' FROM ft2 WHERE CASE CASE WHEN (fields->>'c2')::int > 0 THEN (fields->>'c2')::int END WHEN 100 THEN 601 WHEN (fields->>'c2')::int THEN (fields->>'c2')::int ELSE 0 END > 600 ORDER BY (fields->>'C 1')::int; + ?column? | ?column? | ?column? +----------+----------+---------- +(0 rows) + +-- CASE arg WHEN +--Testcase 858: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE (fields->>'C 1')::int > (CASE mod((fields->>'C 1')::int, 4) WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.ft1 + Output: "time", tags, fields + Filter: (((ft1.fields ->> 'C 1'::text))::integer > CASE mod(((ft1.fields ->> 'C 1'::text))::integer, 4) WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END) + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +-- CASE cannot be pushed down because of unshippable arg clause +--Testcase 859: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE (fields->>'C 1')::int > (CASE random()::integer WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: "time", tags, fields + Filter: (((ft1.fields ->> 'C 1'::text))::integer > CASE (random())::integer WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END) + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +-- these are shippable +--Testcase 860: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE (fields->>'c6')::text WHEN 'foo' THEN true ELSE (tags->>'c3')::text < 'bar' END; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: "time", tags, fields + Filter: CASE (ft1.fields ->> 'c6'::text) WHEN 'foo'::text THEN true ELSE ((ft1.tags ->> 'c3'::text) < 'bar'::text) END + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +--Testcase 861: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE (tags->>'c3')::text WHEN (fields->>'c6')::text THEN true ELSE (tags->>'c3')::text < 'bar' END; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: "time", tags, fields + Filter: CASE (ft1.tags ->> 'c3'::text) WHEN (ft1.fields ->> 'c6'::text) THEN true ELSE ((ft1.tags ->> 'c3'::text) < 'bar'::text) END + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +-- but this is not because of collation +--Testcase 862: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE (tags->>'c3')::text COLLATE "C" WHEN (fields->>'c6')::text THEN true ELSE (tags->>'c3')::text < 'bar' END; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.ft1 + Output: "time", tags, fields + Filter: CASE ((ft1.tags ->> 'c3'::text))::text WHEN (ft1.fields ->> 'c6'::text) THEN true ELSE ((ft1.tags ->> 'c3'::text) < 'bar'::text) END + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +-- This test case drop configuration when execute non-schemaless before +--Testcase 863: +DROP TEXT SEARCH CONFIGURATION IF EXISTS public.custom_search; +-- check schema-qualification of regconfig constant +--Testcase 864: +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +--Testcase 865: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: ((fields ->> 'C 1'::text))::integer, to_tsvector('custom_search'::regconfig, (tags ->> 'c3'::text)) + Filter: (length(to_tsvector('custom_search'::regconfig, (ft1.tags ->> 'c3'::text))) > 0) + InfluxDB query: SELECT "C 1", "c3" FROM "T1" WHERE (("C 1" = 642)) +(4 rows) + +--Testcase 866: +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + c1 | to_tsvector +-----+------------- + 642 | '00642':1 +(1 row) + +-- =================================================================== +-- JOIN queries +-- =================================================================== +-- join two tables +--Testcase 115: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text) + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.fields, t1.tags, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, t1.tags, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(20 rows) + +--Testcase 116: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- join three tables +--Testcase 117: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t3.c1)::int = (t1.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 10 LIMIT 10; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)), ((t1.tags ->> 'c3'::text)) + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)), ((t1.tags ->> 'c3'::text)) + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text), (t1.tags ->> 'c3'::text) + Merge Cond: ((((t2.fields ->> 'C 1'::text))::integer) = ((t1.fields ->> 'C 1'::text))::integer) + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t1.fields, t1.tags, t3.tags, t3.fields + -> Merge Join + Output: t1.fields, t1.tags, t3.tags, t3.fields + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t3.fields ->> 'c1'::text))::integer)) + -> Sort + Output: t1.fields, t1.tags, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, t1.tags, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t3.tags, t3.fields, (((t3.fields ->> 'c1'::text))::integer) + Sort Key: (((t3.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t3 + Output: t3.tags, t3.fields, ((t3.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" +(31 rows) + +--Testcase 118: +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t3.c1)::int = (t1.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 22 | 2 | AAA022 + 24 | 4 | AAA024 + 26 | 6 | AAA026 + 28 | 8 | AAA028 + 30 | 0 | AAA030 + 32 | 2 | AAA032 + 34 | 4 | AAA034 + 36 | 6 | AAA036 + 38 | 8 | AAA038 + 40 | 0 | AAA040 +(10 rows) + +-- left outer join +--Testcase 119: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + -> Incremental Sort + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Presorted Key: (((t1.fields ->> 'c1'::text))::integer) + -> Merge Left Join + Output: (((t1.fields ->> 'c1'::text))::integer), ((t2.fields ->> 'c1'::text))::integer + Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(21 rows) + +--Testcase 120: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; + c1 | c1 +----+---- + 22 | + 24 | 24 + 26 | + 28 | + 30 | 30 + 32 | + 34 | + 36 | 36 + 38 | + 40 | +(10 rows) + +-- left outer join three tables +--Testcase 121: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) + -> Nested Loop Left Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) + Join Filter: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + -> Nested Loop Left Join + Output: t1.fields, t2.fields + Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t2.fields + -> Foreign Scan on public.ft2 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t3.tags, t3.fields + -> Foreign Scan on public.ft4 t3 + Output: t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T3" +(21 rows) + +--Testcase 122: +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +-- left outer join + placement of clauses. +-- clauses within the nullable side are not pulled up, but top level clause on +-- non-nullable side is pushed into non-nullable side +--Testcase 123: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) WHERE (t1.c1)::int < 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Merge Left Join + Output: (((t1.fields ->> 'c1'::text))::integer), ((t1.fields ->> 'c2'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer + Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" < 10)) + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" WHERE (("c1" < 10)) +(15 rows) + +--Testcase 124: +SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) WHERE (t1.c1)::int < 10; + c1 | c2 | c1 | c2 +----+----+----+---- + 2 | 3 | | + 4 | 5 | | + 6 | 7 | 6 | 7 + 8 | 9 | | +(4 rows) + +-- clauses within the nullable side are not pulled up, but the top level clause +-- on nullable side is not pushed down into nullable side +--Testcase 125: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) + WHERE ((t2.fields->>'c1')::int < 10 OR (t2.fields->>'c1')::int IS NULL) AND (t1.c1)::int < 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Merge Left Join + Output: (((t1.fields ->> 'c1'::text))::integer), ((t1.fields ->> 'c2'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer + Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + Filter: ((((t2.fields ->> 'c1'::text))::integer < 10) OR (((t2.fields ->> 'c1'::text))::integer IS NULL)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" < 10)) + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" WHERE (("c1" < 10)) +(16 rows) + +--Testcase 126: +SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) + WHERE ((t2.fields->>'c1')::int < 10 OR (t2.fields->>'c1')::int IS NULL) AND (t1.c1)::int < 10; + c1 | c2 | c1 | c2 +----+----+----+---- + 2 | 3 | | + 4 | 5 | | + 6 | 7 | 6 | 7 + 8 | 9 | | +(4 rows) + +-- right outer join +--Testcase 127: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t2.c1)::int, (t1.c1)::int OFFSET 10 LIMIT 10; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + -> Incremental Sort + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer), (((t1.fields ->> 'c1'::text))::integer) + Presorted Key: (((t2.fields ->> 'c1'::text))::integer) + -> Merge Left Join + Output: ((t1.fields ->> 'c1'::text))::integer, (((t2.fields ->> 'c1'::text))::integer) + Merge Cond: ((((t2.fields ->> 'c1'::text))::integer) = (((t1.fields ->> 'c1'::text))::integer)) + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(21 rows) + +--Testcase 128: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t2.c1)::int, (t1.c1)::int OFFSET 10 LIMIT 10; + c1 | c1 +----+---- + | 22 + 24 | 24 + | 26 + | 28 + 30 | 30 + | 32 + | 34 + 36 | 36 + | 38 + | 40 +(10 rows) + +-- right outer join three tables +--Testcase 129: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) + -> Nested Loop Left Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) + Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Nested Loop Left Join + Output: t3.tags, t2.fields + Join Filter: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t3 + Output: t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T3" + -> Materialize + Output: t2.fields + -> Foreign Scan on public.ft2 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t1.fields + -> Foreign Scan on public.ft2 t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "T1" +(21 rows) + +--Testcase 130: +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 22 | 2 | AAA022 + 24 | 4 | AAA024 + 26 | 6 | AAA026 + 28 | 8 | AAA028 + 30 | 0 | AAA030 + 32 | 2 | AAA032 + 34 | 4 | AAA034 + 36 | 6 | AAA036 + 38 | 8 | AAA038 + 40 | 0 | AAA040 +(10 rows) + +-- full outer join +--Testcase 131: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 45 LIMIT 10; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + -> Sort + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + -> Merge Full Join + Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer + Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(20 rows) + +--Testcase 132: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 45 LIMIT 10; + c1 | c1 +-----+---- + 92 | + 94 | + 96 | 96 + 98 | + 100 | + | 3 + | 9 + | 15 + | 21 + | 27 +(10 rows) + +-- full outer join with restrictions on the joining relations +-- a. the joining relations are both base relations +--Testcase 133: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Sort + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + -> Hash Full Join + Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer + Hash Cond: (((t1.fields ->> 'c1'::text))::integer = ((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: t2.fields + -> Foreign Scan on public.ft5 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(14 rows) + +--Testcase 134: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int; + c1 | c1 +----+---- + 50 | + 52 | + 54 | 54 + 56 | + 58 | + 60 | 60 + | 51 + | 57 +(8 rows) + +--Testcase 135: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT 1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------ + Limit + Output: 1 + -> Merge Full Join + Output: 1 + -> Foreign Scan on public.ft4 t1 + Output: t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Materialize + Output: t2.tags, t2.fields + -> Foreign Scan on public.ft5 t2 + Output: t2.tags, t2.fields + InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(12 rows) + +--Testcase 136: +SELECT 1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; + ?column? +---------- + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +(10 rows) + +-- b. one of the joining relations is a base relation and the other is a join +-- relation +--Testcase 137: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 LEFT JOIN (SELECT (fields->>'c1')::int c1, fields->>'c2' c2, tags->>'c3' c3 FROM ft5 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE ((t2.c1)::int between 50 and 60)) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) + -> Hash Full Join + Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t3.fields ->> 'c1'::text))::integer + Hash Cond: (((t2.fields ->> 'c1'::text))::integer = ((t1.fields ->> 'c1'::text))::integer) + -> Hash Right Join + Output: t2.fields, t3.fields + Hash Cond: (((t3.fields ->> 'c1'::text))::integer = ((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t3 + Output: t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T4" + -> Hash + Output: t2.fields + -> Foreign Scan on public.ft4 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: t1.fields + -> Foreign Scan on public.ft4 t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(22 rows) + +--Testcase 138: +SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 LEFT JOIN (SELECT (fields->>'c1')::int c1, fields->>'c2' c2, tags->>'c3' c3 FROM ft5 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE ((t2.c1)::int between 50 and 60)) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; + c1 | a | b +----+----+---- + 50 | 50 | + 52 | 52 | + 54 | 54 | 54 + 56 | 56 | + 58 | 58 | + 60 | 60 | 60 +(6 rows) + +-- c. test deparsing the remote query as nested subqueries +--Testcase 139: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) + -> Hash Full Join + Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t3.fields ->> 'c1'::text))::integer + Hash Cond: (((t2.fields ->> 'c1'::text))::integer = ((t1.fields ->> 'c1'::text))::integer) + -> Hash Full Join + Output: t2.fields, t3.fields + Hash Cond: (((t2.fields ->> 'c1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + Filter: ((((t2.fields ->> 'c1'::text))::integer IS NULL) OR (((t2.fields ->> 'c1'::text))::integer IS NOT NULL)) + -> Foreign Scan on public.ft4 t2 + Output: t2.tags, t2.fields + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: t3.fields + -> Foreign Scan on public.ft5 t3 + Output: t3.fields + InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: t1.fields + -> Foreign Scan on public.ft4 t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(23 rows) + +--Testcase 140: +SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; + c1 | a | b +----+----+---- + 50 | 50 | + 52 | 52 | + 54 | 54 | 54 + 56 | 56 | + 58 | 58 | + 60 | 60 | 60 + | | 51 + | | 57 +(8 rows) + +-- d. test deparsing rowmarked relations as subqueries +--Testcase 141: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM "S 1"."T 3" t1 WHERE (fields->>'c1')::int = 50) t1 INNER JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY (t1.c1)::int, ss.a, ss.b FOR UPDATE OF t1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------- + LockRows + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer), t1.*, t2.*, t3.* + -> Sort + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer), t1.*, t2.*, t3.* + Sort Key: (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) + -> Nested Loop + Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t3.fields ->> 'c1'::text))::integer, t1.*, t2.*, t3.* + -> Foreign Scan on "S 1"."T 3" t1 + Output: t1.fields, t1.* + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" = 50)) + -> Hash Full Join + Output: t2.fields, t2.*, t3.fields, t3.* + Hash Cond: (((t2.fields ->> 'c1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + Filter: ((((t2.fields ->> 'c1'::text))::integer IS NULL) OR (((t2.fields ->> 'c1'::text))::integer IS NOT NULL)) + -> Foreign Scan on public.ft4 t2 + Output: t2.fields, t2.* + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: t3.fields, t3.* + -> Foreign Scan on public.ft5 t3 + Output: t3.fields, t3.* + InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(22 rows) + +--Testcase 142: +SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM "S 1"."T 3" t1 WHERE (fields->>'c1')::int = 50) t1 INNER JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY (t1.c1)::int, ss.a, ss.b FOR UPDATE OF t1; + c1 | a | b +----+----+---- + 50 | 50 | + 50 | 52 | + 50 | 54 | 54 + 50 | 56 | + 50 | 58 | + 50 | 60 | 60 + 50 | | 51 + 50 | | 57 +(8 rows) + +-- full outer join + inner join +--Testcase 143: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1, t3.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 INNER JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int + 1 and (t1.c1)::int between 50 and 60) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int, (t3.c1)::int LIMIT 10; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) + -> Sort + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer), (((t3.fields ->> 'c1'::text))::integer) + -> Hash Full Join + Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer, ((t3.fields ->> 'c1'::text))::integer + Hash Cond: (((t2.fields ->> 'c1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + -> Hash Join + Output: t1.fields, t2.fields + Hash Cond: ((((t2.fields ->> 'c1'::text))::integer + 1) = ((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.tags, t2.fields + InfluxDB query: SELECT * FROM "T4" + -> Hash + Output: t1.fields + -> Foreign Scan on public.ft4 t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: t3.fields + -> Foreign Scan on public.ft4 t3 + Output: t3.fields + InfluxDB query: SELECT * FROM "T3" +(24 rows) + +--Testcase 144: +SELECT t1.c1, t2.c1, t3.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 INNER JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int + 1 and (t1.c1)::int between 50 and 60) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int, (t3.c1)::int LIMIT 10; + c1 | c1 | c1 +----+----+---- + 52 | 51 | + 58 | 57 | + | | 2 + | | 4 + | | 6 + | | 8 + | | 10 + | | 12 + | | 14 + | | 16 +(10 rows) + +-- full outer join three tables +--Testcase 145: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) + -> Hash Full Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) + Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + -> Hash Full Join + Output: t1.fields, t2.fields + Hash Cond: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: t2.fields + -> Foreign Scan on public.ft2 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: t3.tags, t3.fields + -> Foreign Scan on public.ft4 t3 + Output: t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T3" +(21 rows) + +--Testcase 146: +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +-- full outer join + right outer join +--Testcase 147: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) + -> Nested Loop Left Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) + Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Nested Loop Left Join + Output: t3.tags, t2.fields + Join Filter: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t3 + Output: t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T3" + -> Materialize + Output: t2.fields + -> Foreign Scan on public.ft2 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t1.fields + -> Foreign Scan on public.ft2 t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "T1" +(21 rows) + +--Testcase 148: +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 22 | 2 | AAA022 + 24 | 4 | AAA024 + 26 | 6 | AAA026 + 28 | 8 | AAA028 + 30 | 0 | AAA030 + 32 | 2 | AAA032 + 34 | 4 | AAA034 + 36 | 6 | AAA036 + 38 | 8 | AAA038 + 40 | 0 | AAA040 +(10 rows) + +-- right outer join + full outer join +--Testcase 149: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) + -> Hash Full Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) + Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + -> Nested Loop Left Join + Output: t2.fields, t1.fields + Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2."time", t2.tags, t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t1.fields + -> Foreign Scan on public.ft2 t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: t3.tags, t3.fields + -> Foreign Scan on public.ft4 t3 + Output: t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T3" +(21 rows) + +--Testcase 150: +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +-- full outer join + left outer join +--Testcase 151: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) + -> Nested Loop Left Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) + Join Filter: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + -> Hash Full Join + Output: t1.fields, t2.fields + Hash Cond: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: t2.fields + -> Foreign Scan on public.ft2 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t3.tags, t3.fields + -> Foreign Scan on public.ft4 t3 + Output: t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T3" +(21 rows) + +--Testcase 152: +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +-- left outer join + full outer join +--Testcase 153: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) + -> Hash Full Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) + Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + -> Nested Loop Left Join + Output: t1.fields, t2.fields + Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t2.fields + -> Foreign Scan on public.ft2 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: t3.tags, t3.fields + -> Foreign Scan on public.ft4 t3 + Output: t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T3" +(21 rows) + +--Testcase 154: +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +--Testcase 155: +SET enable_memoize TO off; +-- right outer join + left outer join +--Testcase 156: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) + -> Nested Loop Left Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) + Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Nested Loop Left Join + Output: t2.fields, t3.tags + Join Filter: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2."time", t2.tags, t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t3.tags, t3.fields + -> Foreign Scan on public.ft4 t3 + Output: t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T3" + -> Materialize + Output: t1.fields + -> Foreign Scan on public.ft2 t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "T1" +(21 rows) + +--Testcase 157: +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 11 | 1 | + 12 | 2 | AAA012 + 13 | 3 | + 14 | 4 | AAA014 + 15 | 5 | + 16 | 6 | AAA016 + 17 | 7 | + 18 | 8 | AAA018 + 19 | 9 | + 20 | 0 | AAA020 +(10 rows) + +--Testcase 158: +RESET enable_memoize; +-- left outer join + right outer join +--Testcase 159: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t3.tags ->> 'c3'::text)) + -> Hash Right Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t3.tags ->> 'c3'::text) + Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t3.fields ->> 'c1'::text))::integer) + -> Nested Loop + Output: t1.fields, t2.fields + Join Filter: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t2.fields + -> Foreign Scan on public.ft2 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: t3.tags, t3.fields + -> Foreign Scan on public.ft4 t3 + Output: t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T3" +(21 rows) + +--Testcase 160: +SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 | c3 +----+----+-------- + 22 | 2 | AAA022 + 24 | 4 | AAA024 + 26 | 6 | AAA026 + 28 | 8 | AAA028 + 30 | 0 | AAA030 + 32 | 2 | AAA032 + 34 | 4 | AAA034 + 36 | 6 | AAA036 + 38 | 8 | AAA038 + 40 | 0 | AAA040 +(10 rows) + +-- full outer join + WHERE clause, only matched rows +--Testcase 161: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE ((t1.c1)::int = (t2.c1)::int OR (t1.c1)::int IS NULL) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + -> Sort + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + -> Merge Full Join + Output: ((t1.fields ->> 'c1'::text))::integer, ((t2.fields ->> 'c1'::text))::integer + Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + Filter: ((((t1.fields ->> 'c1'::text))::integer = ((t2.fields ->> 'c1'::text))::integer) OR (((t1.fields ->> 'c1'::text))::integer IS NULL)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(21 rows) + +--Testcase 162: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE ((t1.c1)::int = (t2.c1)::int OR (t1.c1)::int IS NULL) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; + c1 | c1 +----+---- + 66 | 66 + 72 | 72 + 78 | 78 + 84 | 84 + 90 | 90 + 96 | 96 + | 3 + | 9 + | 15 + | 21 +(10 rows) + +-- full outer join + WHERE clause with shippable extensions set +--Testcase 163: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2, t1.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE influxdb_fdw_abs((t1.c1)::int) > 0 OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), ((t1.tags ->> 'c3'::text)) + -> Hash Full Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t1.tags ->> 'c3'::text) + Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t1.fields ->> 'C 1'::text))::integer) + Filter: (influxdb_fdw_abs(((t1.fields ->> 'C 1'::text))::integer) > 0) + -> Foreign Scan on public.ft2 t2 + Output: t2."time", t2.tags, t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: t1.fields, t1.tags + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, t1.tags + InfluxDB query: SELECT * FROM "T1" +(14 rows) + +-- skip, influxdb does not have option 'extensions' +-- ALTER SERVER influxdb_svr OPTIONS (DROP extensions); +-- full outer join + WHERE clause with shippable extensions not set +-- EXPLAIN (VERBOSE, COSTS OFF) +-- SELECT t1.c1, t2.c2, t1.c3 FROM ft1 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE influxdb_fdw_abs(t1.c1) > 0 OFFSET 10 LIMIT 10; +-- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); +-- join two tables with FOR UPDATE clause +-- tests whole-row reference for row marks +--Testcase 164: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE OF t1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + -> LockRows + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text), t1.*, t2.* + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.fields, t1.tags, t1.*, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, t1.tags, t1.*, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, t2.*, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, t2.*, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(22 rows) + +--Testcase 165: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE OF t1; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +--Testcase 166: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + -> LockRows + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text), t1.*, t2.* + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.fields, t1.tags, t1.*, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, t1.tags, t1.*, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, t2.*, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, t2.*, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(22 rows) + +--Testcase 167: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- join two tables with FOR SHARE clause +--Testcase 168: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE OF t1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + -> LockRows + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text), t1.*, t2.* + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.fields, t1.tags, t1.*, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, t1.tags, t1.*, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, t2.*, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, t2.*, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(22 rows) + +--Testcase 169: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE OF t1; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +--Testcase 170: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + -> LockRows + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)), t1.*, t2.* + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text), t1.*, t2.* + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.fields, t1.tags, t1.*, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, t1.tags, t1.*, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, t2.*, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, t2.*, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(22 rows) + +--Testcase 171: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- join in CTE +--Testcase 172: +EXPLAIN (VERBOSE, COSTS OFF) +WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: t.c1_1, t.c2_1, t.c1_3 + CTE t + -> Merge Join + Output: (((t1.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text), (((t2.fields ->> 'C 1'::text))::integer) + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.fields, t1.tags, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, t1.tags, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t.c1_1, t.c2_1, t.c1_3 + Sort Key: t.c1_3, t.c1_1 + -> CTE Scan on t + Output: t.c1_1, t.c2_1, t.c1_3 +(23 rows) + +--Testcase 173: +WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; + c1_1 | c2_1 +------+------ + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- ctid with whole-row reference +--Testcase 174: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.ctid, t1, t2, t1.c1 FROM (SELECT ctid, fields->>'C 1' c1, fields->>'c2' c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: t1.ctid, (ROW(t1.ctid, (t1.fields ->> 'C 1'::text), (t1.fields ->> 'c2'::text), (t1.tags ->> 'c3'::text), (t1.fields ->> 'c4'::text), (t1.fields ->> 'c5'::text), (t1.fields ->> 'c6'::text), (t1.fields ->> 'c7'::text), (t1.fields ->> 'c8'::text))), (ROW(((t2.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t2.tags ->> 'c3'::text), (t2.fields ->> 'c4'::text), (t2.fields ->> 'c5'::text), (t2.fields ->> 'c6'::text), (t2.fields ->> 'c7'::text), (t2.fields ->> 'c8'::text))), ((t1.fields ->> 'C 1'::text)), ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Result + Output: t1.ctid, (ROW(t1.ctid, (t1.fields ->> 'C 1'::text), (t1.fields ->> 'c2'::text), (t1.tags ->> 'c3'::text), (t1.fields ->> 'c4'::text), (t1.fields ->> 'c5'::text), (t1.fields ->> 'c6'::text), (t1.fields ->> 'c7'::text), (t1.fields ->> 'c8'::text))), ROW(((t2.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'c2'::text))::integer, (t2.tags ->> 'c3'::text), (t2.fields ->> 'c4'::text), (t2.fields ->> 'c5'::text), (t2.fields ->> 'c6'::text), (t2.fields ->> 'c7'::text), (t2.fields ->> 'c8'::text)), ((t1.fields ->> 'C 1'::text)), ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Sort + Output: t1.ctid, (ROW(t1.ctid, (t1.fields ->> 'C 1'::text), (t1.fields ->> 'c2'::text), (t1.tags ->> 'c3'::text), (t1.fields ->> 'c4'::text), (t1.fields ->> 'c5'::text), (t1.fields ->> 'c6'::text), (t1.fields ->> 'c7'::text), (t1.fields ->> 'c8'::text))), ((t1.fields ->> 'C 1'::text)), ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer), t2.fields, t2.tags + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: t1.ctid, ROW(t1.ctid, (t1.fields ->> 'C 1'::text), (t1.fields ->> 'c2'::text), (t1.tags ->> 'c3'::text), (t1.fields ->> 'c4'::text), (t1.fields ->> 'c5'::text), (t1.fields ->> 'c6'::text), (t1.fields ->> 'c7'::text), (t1.fields ->> 'c8'::text)), (t1.fields ->> 'C 1'::text), (t1.tags ->> 'c3'::text), (((t1.fields ->> 'C 1'::text))::integer), t2.fields, t2.tags + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.ctid, t1.fields, t1.tags, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.ctid, t1.fields, t1.tags, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, t2.tags, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, t2.tags, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(22 rows) + +-- SEMI JOIN, not pushed down +--Testcase 175: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'C 1')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer) + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Hash Join + Output: ((t1.fields ->> 'C 1'::text))::integer + Inner Unique: true + Hash Cond: (((t1.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: t2.fields + -> HashAggregate + Output: t2.fields + Group Key: ((t2.fields ->> 'C 1'::text))::integer + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(20 rows) + +--Testcase 176: +SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'C 1')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; + c1 +----- + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 +(10 rows) + +-- ANTI JOIN, not pushed down +--Testcase 177: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'c2')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer) + -> Merge Anti Join + Output: (((t1.fields ->> 'C 1'::text))::integer) + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'c2'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c2'::text))::integer) + Sort Key: (((t2.fields ->> 'c2'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, ((t2.fields ->> 'c2'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(17 rows) + +--Testcase 178: +SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'c2')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; + c1 +----- + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 +(10 rows) + +-- CROSS JOIN can be pushed down +--Testcase 179: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 CROSS JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + -> Nested Loop + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'C 1'::text))::integer + -> Foreign Scan on public.ft1 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: t2.fields + -> Foreign Scan on public.ft2 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T1" +(15 rows) + +--Testcase 180: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 CROSS JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; + c1 | c1 +----+----- + 1 | 101 + 1 | 102 + 1 | 103 + 1 | 104 + 1 | 105 + 1 | 106 + 1 | 107 + 1 | 108 + 1 | 109 + 1 | 110 +(10 rows) + +-- different server, not pushed down. No result expected. +--Testcase 181: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft6 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; + QUERY PLAN +--------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + -> Merge Join + Output: (((t1.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft6 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(17 rows) + +--Testcase 182: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft6 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; + c1 | c1 +----+---- +(0 rows) + +-- unsafe join conditions (c8 has a UDT), not pushed down. Practically a CROSS +-- JOIN since c8 in both tables has same value. +--Testcase 183: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON (t1.c8 = t2.c8) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + -> Merge Left Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'C 1'::text))::integer + Merge Cond: (((t1.fields ->> 'c8'::text)) = ((t2.fields ->> 'c8'::text))) + -> Sort + Output: t1.fields, ((t1.fields ->> 'c8'::text)) + Sort Key: ((t1.fields ->> 'c8'::text)) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, (t1.fields ->> 'c8'::text) + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, ((t2.fields ->> 'c8'::text)) + Sort Key: ((t2.fields ->> 'c8'::text)) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, (t2.fields ->> 'c8'::text) + InfluxDB query: SELECT * FROM "T1" +(20 rows) + +--Testcase 184: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON (t1.c8 = t2.c8) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; + c1 | c1 +----+----- + 1 | 101 + 1 | 102 + 1 | 103 + 1 | 104 + 1 | 105 + 1 | 106 + 1 | 107 + 1 | 108 + 1 | 109 + 1 | 110 +(10 rows) + +-- unsafe conditions on one side (c8 has a UDT), not pushed down. +--Testcase 185: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = 'foo' ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Hash Right Join + Output: ((t1.fields ->> 'C 1'::text))::integer, ((t2.fields ->> 'C 1'::text))::integer, (t1.tags ->> 'c3'::text) + Hash Cond: (((t2.fields ->> 'C 1'::text))::integer = ((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2."time", t2.tags, t2.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: t1.fields, t1.tags + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, t1.tags + InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) +(16 rows) + +--Testcase 186: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = 'foo' ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- join where unsafe to pushdown condition in WHERE clause has a column not +-- in the SELECT clause. In this test unsafe clause needs to have column +-- references from both joining sides so that the clause is not pushed down +-- into one of the joining sides. +--Testcase 187: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), ((t1.tags ->> 'c3'::text)) + Sort Key: ((t1.tags ->> 'c3'::text)), (((t1.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer), (t1.tags ->> 'c3'::text) + Merge Cond: (((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) AND (((t1.fields ->> 'c8'::text)) = ((t2.fields ->> 'c8'::text)))) + -> Sort + Output: t1.fields, t1.tags, (((t1.fields ->> 'C 1'::text))::integer), ((t1.fields ->> 'c8'::text)) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer), ((t1.fields ->> 'c8'::text)) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, t1.tags, ((t1.fields ->> 'C 1'::text))::integer, (t1.fields ->> 'c8'::text) + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer), ((t2.fields ->> 'c8'::text)) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer), ((t2.fields ->> 'c8'::text)) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer, (t2.fields ->> 'c8'::text) + InfluxDB query: SELECT * FROM "T1" +(20 rows) + +--Testcase 188: +SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; + c1 | c1 +-----+----- + 101 | 101 + 102 | 102 + 103 | 103 + 104 | 104 + 105 | 105 + 106 | 106 + 107 | 107 + 108 | 108 + 109 | 109 + 110 | 110 +(10 rows) + +-- Aggregate after UNION, for testing setrefs +--Testcase 189: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) UNION SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer), (avg(((((t1.fields ->> 'C 1'::text))::integer) + (((t2.fields ->> 'C 1'::text))::integer)))) + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer), (avg(((((t1.fields ->> 'C 1'::text))::integer) + (((t2.fields ->> 'C 1'::text))::integer)))) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> HashAggregate + Output: (((t1.fields ->> 'C 1'::text))::integer), avg(((((t1.fields ->> 'C 1'::text))::integer) + (((t2.fields ->> 'C 1'::text))::integer))) + Group Key: (((t1.fields ->> 'C 1'::text))::integer) + -> HashAggregate + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + Group Key: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + -> Append + -> Merge Join + Output: (((t1.fields ->> 'C 1'::text))::integer), (((t2.fields ->> 'C 1'::text))::integer) + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Merge Join + Output: (((t1_1.fields ->> 'C 1'::text))::integer), (((t2_1.fields ->> 'C 1'::text))::integer) + Merge Cond: ((((t1_1.fields ->> 'C 1'::text))::integer) = (((t2_1.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: t1_1.fields, (((t1_1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1_1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1_1 + Output: t1_1.fields, ((t1_1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2_1.fields, (((t2_1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2_1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2_1 + Output: t2_1.fields, ((t2_1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(42 rows) + +--Testcase 190: +SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) UNION SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; + t1c1 | avg +------+---------------------- + 101 | 202.0000000000000000 + 102 | 204.0000000000000000 + 103 | 206.0000000000000000 + 104 | 208.0000000000000000 + 105 | 210.0000000000000000 + 106 | 212.0000000000000000 + 107 | 214.0000000000000000 + 108 | 216.0000000000000000 + 109 | 218.0000000000000000 + 110 | 220.0000000000000000 +(10 rows) + +-- join with lateral reference +--Testcase 191: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1, LATERAL (SELECT DISTINCT t2.fields->>'C 1', t3.fields->>'C 1' FROM ft1 t2, ft2 t3 WHERE (t2.fields->>'C 1')::int = (t3.fields->>'C 1')::int AND (t2.fields->>'c2')::int = (t1.c2)::int) q ORDER BY (t1."C 1")::int OFFSET 10 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((t1.fields ->> 'C 1'::text))::integer) + -> Sort + Output: (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Nested Loop + Output: ((t1.fields ->> 'C 1'::text))::integer + -> Foreign Scan on "S 1"."T 1" t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" + -> Unique + Output: ((t2.fields ->> 'C 1'::text)), ((t3.fields ->> 'C 1'::text)) + -> Sort + Output: ((t2.fields ->> 'C 1'::text)), ((t3.fields ->> 'C 1'::text)) + Sort Key: ((t2.fields ->> 'C 1'::text)), ((t3.fields ->> 'C 1'::text)) + -> Hash Join + Output: (t2.fields ->> 'C 1'::text), (t3.fields ->> 'C 1'::text) + Hash Cond: (((t3.fields ->> 'C 1'::text))::integer = ((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t3 + Output: t3."time", t3.tags, t3.fields + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: t2.fields + -> Foreign Scan on public.ft1 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" = $1)) +(26 rows) + +--Testcase 192: +SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1, LATERAL (SELECT DISTINCT t2.fields->>'C 1', t3.fields->>'C 1' FROM ft1 t2, ft2 t3 WHERE (t2.fields->>'C 1')::int = (t3.fields->>'C 1')::int AND (t2.fields->>'c2')::int = (t1.c2)::int) q ORDER BY (t1."C 1")::int OFFSET 10 LIMIT 10; + C 1 +----- + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +(10 rows) + +-- non-Var items in targetlist of the nullable rel of a join preventing +-- push-down in some cases +-- unable to push {ft1, ft2} +--Testcase 193: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT q.a, (ft2.fields->>'C 1')::int c1 FROM (SELECT 13 FROM ft1 WHERE (fields->>'C 1')::int = 13) q(a) RIGHT JOIN ft2 ON (q.a = (ft2.fields->>'C 1')::int) WHERE (ft2.fields->>'C 1')::int BETWEEN 10 AND 15; + QUERY PLAN +-------------------------------------------------------------------------------------- + Nested Loop Left Join + Output: (13), ((ft2.fields ->> 'C 1'::text))::integer + Join Filter: (13 = ((ft2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 + Output: ft2."time", ft2.tags, ft2.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" >= 10)) AND (("C 1" <= 15)) + -> Materialize + Output: (13) + -> Foreign Scan on public.ft1 + Output: 13 + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 13)) +(11 rows) + +--Testcase 194: +SELECT q.a, (ft2.fields->>'C 1')::int c1 FROM (SELECT 13 FROM ft1 WHERE (fields->>'C 1')::int = 13) q(a) RIGHT JOIN ft2 ON (q.a = (ft2.fields->>'C 1')::int) WHERE (ft2.fields->>'C 1')::int BETWEEN 10 AND 15; + a | c1 +----+---- + | 10 + | 11 + | 12 + 13 | 13 + | 14 + | 15 +(6 rows) + +-- ok to push {ft1, ft2} but not {ft1, ft2, ft4} +--Testcase 195: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (ft4.fields->>'c1')::int c1, q.* FROM ft4 LEFT JOIN (SELECT 13, (ft1.fields->>'C 1')::int, (ft2.fields->>'C 1')::int FROM ft1 RIGHT JOIN ft2 ON ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int) WHERE (ft1.fields->>'C 1')::int = 12) q(a, b, c) ON ((ft4.fields->>'c1')::int = q.b) WHERE (ft4.fields->>'c1')::int BETWEEN 10 AND 15; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Hash Right Join + Output: ((ft4.fields ->> 'c1'::text))::integer, (13), ((ft1.fields ->> 'C 1'::text))::integer, ((ft2.fields ->> 'C 1'::text))::integer + Hash Cond: (((ft1.fields ->> 'C 1'::text))::integer = ((ft4.fields ->> 'c1'::text))::integer) + -> Nested Loop + Output: ft1.fields, ft2.fields, 13 + -> Foreign Scan on public.ft1 + Output: ft1."time", ft1.tags, ft1.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 12)) + -> Materialize + Output: ft2.fields + -> Foreign Scan on public.ft2 + Output: ft2.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 12)) + -> Hash + Output: ft4.fields + -> Foreign Scan on public.ft4 + Output: ft4.fields + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 10)) AND (("c1" <= 15)) +(18 rows) + +--Testcase 196: +SELECT (ft4.fields->>'c1')::int c1, q.* FROM ft4 LEFT JOIN (SELECT 13, (ft1.fields->>'C 1')::int, (ft2.fields->>'C 1')::int FROM ft1 RIGHT JOIN ft2 ON ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int) WHERE (ft1.fields->>'C 1')::int = 12) q(a, b, c) ON ((ft4.fields->>'c1')::int = q.b) WHERE (ft4.fields->>'c1')::int BETWEEN 10 AND 15 ORDER BY (ft4.fields->>'c1')::int; + c1 | a | b | c +----+----+----+---- + 10 | | | + 12 | 13 | 12 | 12 + 14 | | | +(3 rows) + +-- join with nullable side with some columns with null values +-- influxdb_fdw does not support UPDATE +-- UPDATE ft5 SET c3 = null where c1 % 9 = 0; +--Testcase 197: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ft5, (ft5.fields->>'c1')::int c1, (ft5.fields->>'c2')::int c2, ft5.tags->>'c3' c3, (ft4.fields->>'c1')::int c1, (ft4.fields->>'c2')::int c2 FROM ft5 left join ft4 on (ft5.fields->>'c1')::int = (ft4.fields->>'c1')::int WHERE (ft4.fields->>'c1')::int BETWEEN 10 and 30 ORDER BY (ft5.fields->>'c1')::int, (ft4.fields->>'c1')::int; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ft5.*, (((ft5.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c2'::text))::integer), ((ft5.tags ->> 'c3'::text)), (((ft4.fields ->> 'c1'::text))::integer), (((ft4.fields ->> 'c2'::text))::integer) + Sort Key: (((ft5.fields ->> 'c1'::text))::integer) + -> Hash Join + Output: ft5.*, ((ft5.fields ->> 'c1'::text))::integer, ((ft5.fields ->> 'c2'::text))::integer, (ft5.tags ->> 'c3'::text), ((ft4.fields ->> 'c1'::text))::integer, ((ft4.fields ->> 'c2'::text))::integer + Hash Cond: (((ft5.fields ->> 'c1'::text))::integer = ((ft4.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 + Output: ft5.*, ft5.fields, ft5.tags + InfluxDB query: SELECT * FROM "T4" + -> Hash + Output: ft4.fields + -> Foreign Scan on public.ft4 + Output: ft4.fields + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 10)) AND (("c1" <= 30)) +(14 rows) + +--Testcase 198: +SELECT ft5, (ft5.fields->>'c1')::int c1, (ft5.fields->>'c2')::int c2, ft5.tags->>'c3' c3, (ft4.fields->>'c1')::int c1, (ft4.fields->>'c2')::int c2 FROM ft5 left join ft4 on (ft5.fields->>'c1')::int = (ft4.fields->>'c1')::int WHERE (ft4.fields->>'c1')::int BETWEEN 10 and 30 ORDER BY (ft5.fields->>'c1')::int, (ft4.fields->>'c1')::int; + ft5 | c1 | c2 | c3 | c1 | c2 +-------------------------------------------------------------+----+----+--------+----+---- + ("{""c3"": ""AAA012""}","{""c1"": ""12"", ""c2"": ""13""}") | 12 | 13 | AAA012 | 12 | 13 + ("{""c3"": ""AAA018""}","{""c1"": ""18"", ""c2"": ""19""}") | 18 | 19 | AAA018 | 18 | 19 + ("{""c3"": ""AAA024""}","{""c1"": ""24"", ""c2"": ""25""}") | 24 | 25 | AAA024 | 24 | 25 + ("{""c3"": ""AAA030""}","{""c1"": ""30"", ""c2"": ""31""}") | 30 | 31 | AAA030 | 30 | 31 +(4 rows) + +-- multi-way join involving multiple merge joins +-- (this case used to have EPQ-related planning problems) +--Testcase 199: +CREATE FOREIGN TABLE local_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'local_tbl', schemaless 'true'); +--Testcase 794: +CREATE FOREIGN TABLE local_tbl_nsc (c1 int NOT NULL, c2 int NOT NULL, c3 text) SERVER influxdb_svr OPTIONS (table 'local_tbl'); +--Testcase 200: +INSERT INTO local_tbl_nsc SELECT id, id % 10, to_char(id, 'FM0000') FROM generate_series(1, 1000) id; +--ANALYZE local_tbl; +--Testcase 201: +SET enable_nestloop TO false; +--Testcase 202: +SET enable_hashjoin TO false; +--Testcase 203: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE (ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int AND (ft1.fields->>'c2')::int = (ft4.fields->>'c1')::int + AND (ft1.fields->>'c2')::int = (ft5.fields->>'c1')::int AND (ft1.fields->>'c2')::int = (local_tbl.fields->>'c1')::int AND (ft1.fields->>'C 1')::int < 100 AND (ft2.fields->>'C 1')::int < 100 ORDER BY (ft1.fields->>'C 1')::int FOR UPDATE; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + LockRows + Output: ft1."time", ft1.tags, ft1.fields, ft2."time", ft2.tags, ft2.fields, ft4.tags, ft4.fields, ft5.tags, ft5.fields, local_tbl.fields, (((ft1.fields ->> 'C 1'::text))::integer), ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* + -> Sort + Output: ft1."time", ft1.tags, ft1.fields, ft2."time", ft2.tags, ft2.fields, ft4.tags, ft4.fields, ft5.tags, ft5.fields, local_tbl.fields, (((ft1.fields ->> 'C 1'::text))::integer), ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* + Sort Key: (((ft1.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: ft1."time", ft1.tags, ft1.fields, ft2."time", ft2.tags, ft2.fields, ft4.tags, ft4.fields, ft5.tags, ft5.fields, local_tbl.fields, ((ft1.fields ->> 'C 1'::text))::integer, ft1.*, ft2.*, ft4.*, ft5.*, local_tbl.* + Merge Cond: (((ft1.fields ->> 'c2'::text))::integer = (((local_tbl.fields ->> 'c1'::text))::integer)) + -> Merge Join + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2."time", ft2.tags, ft2.fields, ft2.*, ft4.tags, ft4.fields, ft4.*, ft5.tags, ft5.fields, ft5.* + Merge Cond: (((ft1.fields ->> 'c2'::text))::integer = (((ft5.fields ->> 'c1'::text))::integer)) + -> Merge Join + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2."time", ft2.tags, ft2.fields, ft2.*, ft4.tags, ft4.fields, ft4.* + Merge Cond: ((((ft1.fields ->> 'c2'::text))::integer) = (((ft4.fields ->> 'c1'::text))::integer)) + -> Sort + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2."time", ft2.tags, ft2.fields, ft2.*, (((ft1.fields ->> 'c2'::text))::integer) + Sort Key: (((ft1.fields ->> 'c2'::text))::integer) + -> Merge Join + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2."time", ft2.tags, ft2.fields, ft2.*, ((ft1.fields ->> 'c2'::text))::integer + Merge Cond: ((((ft1.fields ->> 'C 1'::text))::integer) = (((ft2.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, (((ft1.fields ->> 'C 1'::text))::integer) + Sort Key: (((ft1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ((ft1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) + -> Sort + Output: ft2."time", ft2.tags, ft2.fields, ft2.*, (((ft2.fields ->> 'C 1'::text))::integer) + Sort Key: (((ft2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 + Output: ft2."time", ft2.tags, ft2.fields, ft2.*, ((ft2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) + -> Sort + Output: ft4.tags, ft4.fields, ft4.*, (((ft4.fields ->> 'c1'::text))::integer) + Sort Key: (((ft4.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 + Output: ft4.tags, ft4.fields, ft4.*, ((ft4.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: ft5.tags, ft5.fields, ft5.*, (((ft5.fields ->> 'c1'::text))::integer) + Sort Key: (((ft5.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 + Output: ft5.tags, ft5.fields, ft5.*, ((ft5.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" + -> Sort + Output: local_tbl.fields, local_tbl.*, (((local_tbl.fields ->> 'c1'::text))::integer) + Sort Key: (((local_tbl.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.local_tbl + Output: local_tbl.fields, local_tbl.*, ((local_tbl.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "local_tbl" +(50 rows) + +--Testcase 204: +SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE (ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int AND (ft1.fields->>'c2')::int = (ft4.fields->>'c1')::int + AND (ft1.fields->>'c2')::int = (ft5.fields->>'c1')::int AND (ft1.fields->>'c2')::int = (local_tbl.fields->>'c1')::int AND (ft1.fields->>'C 1')::int < 100 AND (ft2.fields->>'C 1')::int < 100 ORDER BY (ft1.fields->>'C 1')::int FOR UPDATE; + time | tags | fields | time | tags | fields | tags | fields | tags | fields | fields +--------------------------+-----------------+----------------------------------------------------------------------+--------------------------+-----------------+----------------------------------------------------------------------+------------------+------------------------+------------------+------------------------+-------------------------------------- + Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} | Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} + Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} | Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} + Tue Jan 27 00:00:00 1970 | {"c3": "00026"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "26"} | Tue Jan 27 00:00:00 1970 | {"c3": "00026"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "26"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} + Fri Feb 06 00:00:00 1970 | {"c3": "00036"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "36"} | Fri Feb 06 00:00:00 1970 | {"c3": "00036"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "36"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} + Mon Feb 16 00:00:00 1970 | {"c3": "00046"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "46"} | Mon Feb 16 00:00:00 1970 | {"c3": "00046"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "46"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} + Thu Feb 26 00:00:00 1970 | {"c3": "00056"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "56"} | Thu Feb 26 00:00:00 1970 | {"c3": "00056"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "56"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} + Sun Mar 08 00:00:00 1970 | {"c3": "00066"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "66"} | Sun Mar 08 00:00:00 1970 | {"c3": "00066"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "66"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} + Wed Mar 18 00:00:00 1970 | {"c3": "00076"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "76"} | Wed Mar 18 00:00:00 1970 | {"c3": "00076"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "76"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} + Sat Mar 28 00:00:00 1970 | {"c3": "00086"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "86"} | Sat Mar 28 00:00:00 1970 | {"c3": "00086"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "86"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} + Tue Apr 07 00:00:00 1970 | {"c3": "00096"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "96"} | Tue Apr 07 00:00:00 1970 | {"c3": "00096"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "96"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c3": "AAA006"} | {"c1": "6", "c2": "7"} | {"c1": "6", "c2": "6", "c3": "0006"} +(10 rows) + +--Testcase 205: +RESET enable_nestloop; +--Testcase 206: +RESET enable_hashjoin; +-- test that add_paths_with_pathkeys_for_rel() arranges for the epq_path to +-- return columns needed by the parent ForeignScan node +--Testcase 867: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl LEFT JOIN (SELECT ft1.*, COALESCE(ft1.tags->>'c3' || (ft2.tags->>'c3')::text, 'foobar') FROM ft1 INNER JOIN ft2 ON (ft1.fields->>'C 1' = ft2.fields->>'C 1' AND (ft1.fields->>'C 1')::int < 100)) ss ON (local_tbl.fields->>'c1' = ss.fields->>'C 1') ORDER BY local_tbl.fields->>'c1' FOR UPDATE OF local_tbl; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + LockRows + Output: local_tbl.fields, ft1."time", ft1.tags, ft1.fields, (COALESCE(((ft1.tags ->> 'c3'::text) || (ft2.tags ->> 'c3'::text)), 'foobar'::text)), ((local_tbl.fields ->> 'c1'::text)), local_tbl.*, ft1.*, ft2.* + -> Merge Left Join + Output: local_tbl.fields, ft1."time", ft1.tags, ft1.fields, (COALESCE(((ft1.tags ->> 'c3'::text) || (ft2.tags ->> 'c3'::text)), 'foobar'::text)), ((local_tbl.fields ->> 'c1'::text)), local_tbl.*, ft1.*, ft2.* + Merge Cond: (((local_tbl.fields ->> 'c1'::text)) = ((ft1.fields ->> 'C 1'::text))) + -> Sort + Output: local_tbl.fields, local_tbl.*, ((local_tbl.fields ->> 'c1'::text)) + Sort Key: ((local_tbl.fields ->> 'c1'::text)) + -> Foreign Scan on public.local_tbl + Output: local_tbl.fields, local_tbl.*, (local_tbl.fields ->> 'c1'::text) + InfluxDB query: SELECT * FROM "local_tbl" + -> Sort + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2.*, (COALESCE(((ft1.tags ->> 'c3'::text) || (ft2.tags ->> 'c3'::text)), 'foobar'::text)), ((ft1.fields ->> 'C 1'::text)) + Sort Key: ((ft1.fields ->> 'C 1'::text)) + -> Hash Join + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2.*, COALESCE(((ft1.tags ->> 'c3'::text) || (ft2.tags ->> 'c3'::text)), 'foobar'::text), (ft1.fields ->> 'C 1'::text) + Hash Cond: ((ft2.fields ->> 'C 1'::text) = (ft1.fields ->> 'C 1'::text)) + -> Foreign Scan on public.ft2 + Output: ft2.*, ft2.fields, ft2.tags + InfluxDB query: SELECT * FROM "T1" + -> Hash + Output: ft1."time", ft1.tags, ft1.fields, ft1.* + -> Foreign Scan on public.ft1 + Output: ft1."time", ft1.tags, ft1.fields, ft1.* + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) +(25 rows) + +-- ALTER SERVER loopback OPTIONS (DROP extensions); +-- ALTER SERVER loopback OPTIONS (ADD fdw_startup_cost '10000.0'); +--Testcase 868: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl LEFT JOIN (SELECT ft1.* FROM ft1 INNER JOIN ft2 ON ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int AND (ft1.fields->>'C 1')::int < 100 AND (ft1.fields->>'C 1')::int = influxdb_fdw_abs((ft2.fields->>'C 1')::int))) ss ON (local_tbl.fields->>'c3' = ss.tags->>'c3') ORDER BY local_tbl.fields->>'c1' FOR UPDATE OF local_tbl; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + LockRows + Output: local_tbl.fields, ft1."time", ft1.tags, ft1.fields, ((local_tbl.fields ->> 'c1'::text)), local_tbl.*, ft1.*, ft2.* + -> Sort + Output: local_tbl.fields, ft1."time", ft1.tags, ft1.fields, ((local_tbl.fields ->> 'c1'::text)), local_tbl.*, ft1.*, ft2.* + Sort Key: ((local_tbl.fields ->> 'c1'::text)) + -> Hash Left Join + Output: local_tbl.fields, ft1."time", ft1.tags, ft1.fields, (local_tbl.fields ->> 'c1'::text), local_tbl.*, ft1.*, ft2.* + Hash Cond: ((local_tbl.fields ->> 'c3'::text) = (ft1.tags ->> 'c3'::text)) + -> Foreign Scan on public.local_tbl + Output: local_tbl.fields, local_tbl.* + InfluxDB query: SELECT * FROM "local_tbl" + -> Hash + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2.* + -> Merge Join + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ft2.* + Merge Cond: (((((ft1.fields ->> 'C 1'::text))::integer) = (influxdb_fdw_abs(((ft2.fields ->> 'C 1'::text))::integer))) AND ((((ft1.fields ->> 'C 1'::text))::integer) = (((ft2.fields ->> 'C 1'::text))::integer))) + -> Sort + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, (((ft1.fields ->> 'C 1'::text))::integer) + Sort Key: (((ft1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 + Output: ft1."time", ft1.tags, ft1.fields, ft1.*, ((ft1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) + -> Sort + Output: ft2.*, ft2.fields, (influxdb_fdw_abs(((ft2.fields ->> 'C 1'::text))::integer)), (((ft2.fields ->> 'C 1'::text))::integer) + Sort Key: (influxdb_fdw_abs(((ft2.fields ->> 'C 1'::text))::integer)), (((ft2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 + Output: ft2.*, ft2.fields, influxdb_fdw_abs(((ft2.fields ->> 'C 1'::text))::integer), ((ft2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(28 rows) + +-- ALTER SERVER loopback OPTIONS (DROP fdw_startup_cost); +-- ALTER SERVER loopback OPTIONS (ADD extensions 'postgres_fdw'); +--Testcase 207: +DELETE FROM local_tbl_nsc; +--Testcase 795: +DROP FOREIGN TABLE local_tbl; +--Testcase 796: +DROP FOREIGN TABLE local_tbl_nsc; +-- check join pushdown in situations where multiple userids are involved +--Testcase 208: +CREATE ROLE regress_view_owner SUPERUSER; +--Testcase 209: +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +GRANT SELECT ON ft4 TO regress_view_owner; +GRANT SELECT ON ft5 TO regress_view_owner; +--Testcase 210: +CREATE VIEW v4 AS SELECT * FROM ft4; +--Testcase 211: +CREATE VIEW v5 AS SELECT * FROM ft5; +--Testcase 212: +ALTER VIEW v5 OWNER TO regress_view_owner; +--Testcase 213: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can't be pushed down, different view owners + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c2'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) + -> Incremental Sort + Output: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c2'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) + Sort Key: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) + Presorted Key: (((ft4.fields ->> 'c1'::text))::integer) + -> Merge Left Join + Output: (((ft4.fields ->> 'c1'::text))::integer), ((ft5.fields ->> 'c2'::text))::integer, ((ft5.fields ->> 'c1'::text))::integer + Merge Cond: ((((ft4.fields ->> 'c1'::text))::integer) = (((ft5.fields ->> 'c1'::text))::integer)) + -> Sort + Output: ft4.fields, (((ft4.fields ->> 'c1'::text))::integer) + Sort Key: (((ft4.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 + Output: ft4.fields, ((ft4.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: ft5.fields, (((ft5.fields ->> 'c1'::text))::integer) + Sort Key: (((ft5.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 + Output: ft5.fields, ((ft5.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(21 rows) + +--Testcase 214: +SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 +----+---- + 22 | + 24 | 25 + 26 | + 28 | + 30 | 31 + 32 | + 34 | + 36 | 37 + 38 | + 40 | +(10 rows) + +--Testcase 215: +ALTER VIEW v4 OWNER TO regress_view_owner; +--Testcase 216: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can be pushed down + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------ + Limit + Output: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c2'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) + -> Incremental Sort + Output: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c2'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) + Sort Key: (((ft4.fields ->> 'c1'::text))::integer), (((ft5.fields ->> 'c1'::text))::integer) + Presorted Key: (((ft4.fields ->> 'c1'::text))::integer) + -> Merge Left Join + Output: (((ft4.fields ->> 'c1'::text))::integer), ((ft5.fields ->> 'c2'::text))::integer, ((ft5.fields ->> 'c1'::text))::integer + Merge Cond: ((((ft4.fields ->> 'c1'::text))::integer) = (((ft5.fields ->> 'c1'::text))::integer)) + -> Sort + Output: ft4.fields, (((ft4.fields ->> 'c1'::text))::integer) + Sort Key: (((ft4.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 + Output: ft4.fields, ((ft4.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: ft5.fields, (((ft5.fields ->> 'c1'::text))::integer) + Sort Key: (((ft5.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 + Output: ft5.fields, ((ft5.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(21 rows) + +--Testcase 217: +SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 +----+---- + 22 | + 24 | 25 + 26 | + 28 | + 30 | 31 + 32 | + 34 | + 36 | 37 + 38 | + 40 | +(10 rows) + +--Testcase 218: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can't be pushed down, view owner not current user + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + -> Incremental Sort + Output: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Presorted Key: (((ft4.fields ->> 'c1'::text))::integer) + -> Merge Left Join + Output: (((ft4.fields ->> 'c1'::text))::integer), ((t2.fields ->> 'c2'::text))::integer, ((t2.fields ->> 'c1'::text))::integer + Merge Cond: ((((ft4.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + -> Sort + Output: ft4.fields, (((ft4.fields ->> 'c1'::text))::integer) + Sort Key: (((ft4.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 + Output: ft4.fields, ((ft4.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(21 rows) + +--Testcase 219: +SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 +----+---- + 22 | + 24 | 25 + 26 | + 28 | + 30 | 31 + 32 | + 34 | + 36 | 37 + 38 | + 40 | +(10 rows) + +--Testcase 220: +ALTER VIEW v4 OWNER TO CURRENT_USER; +--Testcase 221: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can be pushed down + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + -> Incremental Sort + Output: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c2'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((ft4.fields ->> 'c1'::text))::integer), (((t2.fields ->> 'c1'::text))::integer) + Presorted Key: (((ft4.fields ->> 'c1'::text))::integer) + -> Merge Left Join + Output: (((ft4.fields ->> 'c1'::text))::integer), ((t2.fields ->> 'c2'::text))::integer, ((t2.fields ->> 'c1'::text))::integer + Merge Cond: ((((ft4.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + -> Sort + Output: ft4.fields, (((ft4.fields ->> 'c1'::text))::integer) + Sort Key: (((ft4.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 + Output: ft4.fields, ((ft4.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(21 rows) + +--Testcase 222: +SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; + c1 | c2 +----+---- + 22 | + 24 | 25 + 26 | + 28 | + 30 | 31 + 32 | + 34 | + 36 | 37 + 38 | + 40 | +(10 rows) + +--Testcase 223: +ALTER VIEW v4 OWNER TO regress_view_owner; +-- cleanup +--Testcase 224: +DROP OWNED BY regress_view_owner; +--Testcase 225: +DROP ROLE regress_view_owner; +-- =================================================================== +-- Aggregate and grouping queries +-- =================================================================== +-- Simple aggregates +--Testcase 226: +explain (verbose, costs off) +select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Result + Output: (count((fields ->> 'c6'::text))), (sum(((fields ->> 'C 1'::text))::integer)), (avg(((fields ->> 'C 1'::text))::integer)), (min((((fields ->> 'c2'::text)))::integer)), (max(((fields ->> 'C 1'::text))::integer)), (stddev((((fields ->> 'c2'::text)))::integer)), ((sum(((fields ->> 'C 1'::text))::integer)) * ((random() <= '1'::double precision))::integer), ((fields ->> 'c2'::text)) + -> Sort + Output: (count((fields ->> 'c6'::text))), (sum(((fields ->> 'C 1'::text))::integer)), (avg(((fields ->> 'C 1'::text))::integer)), (min((((fields ->> 'c2'::text)))::integer)), (max(((fields ->> 'C 1'::text))::integer)), (stddev((((fields ->> 'c2'::text)))::integer)), ((fields ->> 'c2'::text)) + Sort Key: (count((ft1.fields ->> 'c6'::text))), (sum(((ft1.fields ->> 'C 1'::text))::integer)) + -> HashAggregate + Output: count((fields ->> 'c6'::text)), sum(((fields ->> 'C 1'::text))::integer), avg(((fields ->> 'C 1'::text))::integer), min((((fields ->> 'c2'::text)))::integer), max(((fields ->> 'C 1'::text))::integer), stddev((((fields ->> 'c2'::text)))::integer), ((fields ->> 'c2'::text)) + Group Key: (ft1.fields ->> 'c2'::text) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 5)) +(11 rows) + +--Testcase 227: +select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2; + count | sum | avg | min | max | stddev | sum2 +-------+-------+----------------------+-----+------+--------+------- + 100 | 49600 | 496.0000000000000000 | 1 | 991 | 0 | 49600 + 100 | 49700 | 497.0000000000000000 | 2 | 992 | 0 | 49700 + 100 | 49800 | 498.0000000000000000 | 3 | 993 | 0 | 49800 + 100 | 49900 | 499.0000000000000000 | 4 | 994 | 0 | 49900 + 100 | 50500 | 505.0000000000000000 | 0 | 1000 | 0 | 50500 +(5 rows) + +--Testcase 228: +explain (verbose, costs off) +select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2 limit 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Limit + Output: (count((fields ->> 'c6'::text))), (sum(((fields ->> 'C 1'::text))::integer)), (avg(((fields ->> 'C 1'::text))::integer)), (min((((fields ->> 'c2'::text)))::integer)), (max(((fields ->> 'C 1'::text))::integer)), (stddev((((fields ->> 'c2'::text)))::integer)), (((sum(((fields ->> 'C 1'::text))::integer)) * ((random() <= '1'::double precision))::integer)), ((fields ->> 'c2'::text)) + -> Result + Output: (count((fields ->> 'c6'::text))), (sum(((fields ->> 'C 1'::text))::integer)), (avg(((fields ->> 'C 1'::text))::integer)), (min((((fields ->> 'c2'::text)))::integer)), (max(((fields ->> 'C 1'::text))::integer)), (stddev((((fields ->> 'c2'::text)))::integer)), ((sum(((fields ->> 'C 1'::text))::integer)) * ((random() <= '1'::double precision))::integer), ((fields ->> 'c2'::text)) + -> Sort + Output: (count((fields ->> 'c6'::text))), (sum(((fields ->> 'C 1'::text))::integer)), (avg(((fields ->> 'C 1'::text))::integer)), (min((((fields ->> 'c2'::text)))::integer)), (max(((fields ->> 'C 1'::text))::integer)), (stddev((((fields ->> 'c2'::text)))::integer)), ((fields ->> 'c2'::text)) + Sort Key: (count((ft1.fields ->> 'c6'::text))), (sum(((ft1.fields ->> 'C 1'::text))::integer)) + -> HashAggregate + Output: count((fields ->> 'c6'::text)), sum(((fields ->> 'C 1'::text))::integer), avg(((fields ->> 'C 1'::text))::integer), min((((fields ->> 'c2'::text)))::integer), max(((fields ->> 'C 1'::text))::integer), stddev((((fields ->> 'c2'::text)))::integer), ((fields ->> 'c2'::text)) + Group Key: (ft1.fields ->> 'c2'::text) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 5)) +(13 rows) + +--Testcase 229: +select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2 limit 1; + count | sum | avg | min | max | stddev | sum2 +-------+-------+----------------------+-----+-----+--------+------- + 100 | 49600 | 496.0000000000000000 | 1 | 991 | 0 | 49600 +(1 row) + +-- Aggregate is not pushed down as aggregation contains random() +--Testcase 230: +explain (verbose, costs off) +select sum((fields->>'C 1')::int * (random() <= 1)::int) as sum, avg((fields->>'C 1')::int) from ft1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: sum((((fields ->> 'C 1'::text))::integer * ((random() <= '1'::double precision))::integer)), avg(((fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" +(5 rows) + +-- Aggregate over join query +--Testcase 231: +explain (verbose, costs off) +select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 inner join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 on ((t1.c2)::int = (t2.c2)::int) where (t1.c2)::int = 6; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Aggregate + Output: count(*), sum(((t1.fields ->> 'C 1'::text))::integer), avg(((t2.fields ->> 'C 1'::text))::integer) + -> Nested Loop + Output: t1.fields, t2.fields + -> Foreign Scan on public.ft1 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" = 6)) + -> Materialize + Output: t2.fields + -> Foreign Scan on public.ft1 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" = 6)) +(12 rows) + +--Testcase 232: +select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 inner join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 on ((t1.c2)::int = (t2.c2)::int) where (t1.c2)::int = 6; + count | sum | avg +-------+---------+---------------------- + 10000 | 5010000 | 501.0000000000000000 +(1 row) + +-- Not pushed down due to local conditions present in underneath input rel +--Testcase 233: +explain (verbose, costs off) +select sum((t1.c1)::int), count((t2.c1)::int) from (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 inner join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (((t1.c1)::int * (t2.c1)::int)/((t1.c1)::int * (t2.c1)::int)) * random() <= 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Aggregate + Output: sum(((t1.fields ->> 'C 1'::text))::integer), count(((t2.fields ->> 'C 1'::text))::integer) + -> Merge Join + Output: t1.fields, t2.fields + Merge Cond: ((((t1.fields ->> 'C 1'::text))::integer) = (((t2.fields ->> 'C 1'::text))::integer)) + Join Filter: ((((((((t1.fields ->> 'C 1'::text))::integer) * (((t2.fields ->> 'C 1'::text))::integer)) / ((((t1.fields ->> 'C 1'::text))::integer) * (((t2.fields ->> 'C 1'::text))::integer))))::double precision * random()) <= '1'::double precision) + -> Sort + Output: t1.fields, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 t1 + Output: t1.fields, ((t1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: t2.fields, (((t2.fields ->> 'C 1'::text))::integer) + Sort Key: (((t2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 t2 + Output: t2.fields, ((t2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(18 rows) + +-- GROUP BY clause having expressions +--Testcase 234: +explain (verbose, costs off) +select (fields->>'c2')::int/2, sum((fields->>'c2')::int) * ((fields->>'c2')::int/2) from ft1 group by (fields->>'c2')::int/2 order by (fields->>'c2')::int/2; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text))::integer / 2)), ((sum(((fields ->> 'c2'::text))::integer) * ((((fields ->> 'c2'::text))::integer / 2)))) + Sort Key: ((((ft1.fields ->> 'c2'::text))::integer / 2)) + -> HashAggregate + Output: ((((fields ->> 'c2'::text))::integer / 2)), (sum(((fields ->> 'c2'::text))::integer) * ((((fields ->> 'c2'::text))::integer / 2))) + Group Key: (((ft1.fields ->> 'c2'::text))::integer / 2) + -> Foreign Scan on public.ft1 + Output: (((fields ->> 'c2'::text))::integer / 2), fields + InfluxDB query: SELECT * FROM "T1" +(9 rows) + +--Testcase 235: +select (fields->>'c2')::int/2, sum((fields->>'c2')::int) * ((fields->>'c2')::int/2) from ft1 group by (fields->>'c2')::int/2 order by (fields->>'c2')::int/2; + ?column? | ?column? +----------+---------- + 0 | 0 + 1 | 500 + 2 | 1800 + 3 | 3900 + 4 | 6800 +(5 rows) + +-- Aggregates in subquery are pushed down. +--Testcase 236: +explain (verbose, costs off) +select count(x.a), sum(x.a) from (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2', sqrt((fields->>'C 1')::int) order by 1, 2) x; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Aggregate + Output: count(((((ft1.fields ->> 'c2'::text)))::integer)), sum(((((ft1.fields ->> 'c2'::text)))::integer)) + -> Sort + Output: ((((ft1.fields ->> 'c2'::text)))::integer), (sum(((ft1.fields ->> 'C 1'::text))::integer)), ((ft1.fields ->> 'c2'::text)), (sqrt((((ft1.fields ->> 'C 1'::text))::integer)::double precision)) + Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer), (sum(((ft1.fields ->> 'C 1'::text))::integer)) + -> HashAggregate + Output: (((ft1.fields ->> 'c2'::text)))::integer, sum(((ft1.fields ->> 'C 1'::text))::integer), ((ft1.fields ->> 'c2'::text)), (sqrt((((ft1.fields ->> 'C 1'::text))::integer)::double precision)) + Group Key: (ft1.fields ->> 'c2'::text), sqrt((((ft1.fields ->> 'C 1'::text))::integer)::double precision) + -> Foreign Scan on public.ft1 + Output: (ft1.fields ->> 'c2'::text), sqrt((((ft1.fields ->> 'C 1'::text))::integer)::double precision), ft1.fields + InfluxDB query: SELECT * FROM "T1" +(11 rows) + +--Testcase 237: +select count(x.a), sum(x.a) from (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2', sqrt((fields->>'C 1')::int) order by 1, 2) x; + count | sum +-------+------ + 1000 | 4500 +(1 row) + +-- Aggregate is still pushed down by taking unshippable expression out +--Testcase 238: +explain (verbose, costs off) +select (fields->>'c2')::int * (random() <= 1)::int as sum1, sum((fields->>'C 1')::int) * (fields->>'c2')::int as sum2 from ft1 group by fields->>'c2' order by 1, 2; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (((((fields ->> 'c2'::text)))::integer * ((random() <= '1'::double precision))::integer)), ((sum(((fields ->> 'C 1'::text))::integer) * (((fields ->> 'c2'::text)))::integer)), ((fields ->> 'c2'::text)) + Sort Key: (((((ft1.fields ->> 'c2'::text)))::integer * ((random() <= '1'::double precision))::integer)), ((sum(((ft1.fields ->> 'C 1'::text))::integer) * (((ft1.fields ->> 'c2'::text)))::integer)) + -> HashAggregate + Output: ((((fields ->> 'c2'::text)))::integer * ((random() <= '1'::double precision))::integer), (sum(((fields ->> 'C 1'::text))::integer) * (((fields ->> 'c2'::text)))::integer), ((fields ->> 'c2'::text)) + Group Key: (ft1.fields ->> 'c2'::text) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" +(9 rows) + +--Testcase 239: +select (fields->>'c2')::int * (random() <= 1)::int as sum1, sum((fields->>'C 1')::int) * (fields->>'c2')::int as sum2 from ft1 group by fields->>'c2' order by 1, 2; + sum1 | sum2 +------+-------- + 0 | 0 + 1 | 49600 + 2 | 99400 + 3 | 149400 + 4 | 199600 + 5 | 250000 + 6 | 300600 + 7 | 351400 + 8 | 402400 + 9 | 453600 +(10 rows) + +-- Aggregate with unshippable GROUP BY clause are not pushed +--Testcase 240: +explain (verbose, costs off) +select (fields->>'c2')::int * (random() <= 1)::int as c2 from ft2 group by (fields->>'c2')::int * (random() <= 1)::int order by 1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text))::integer * ((random() <= '1'::double precision))::integer)) + Sort Key: ((((ft2.fields ->> 'c2'::text))::integer * ((random() <= '1'::double precision))::integer)) + -> HashAggregate + Output: ((((fields ->> 'c2'::text))::integer * ((random() <= '1'::double precision))::integer)) + Group Key: (((ft2.fields ->> 'c2'::text))::integer * ((random() <= '1'::double precision))::integer) + -> Foreign Scan on public.ft2 + Output: (((fields ->> 'c2'::text))::integer * ((random() <= '1'::double precision))::integer) + InfluxDB query: SELECT "c2" FROM "T1" +(9 rows) + +-- GROUP BY clause in various forms, cardinal, alias and constant expression +--Testcase 241: +explain (verbose, costs off) +select count(fields->>'c2') w, fields->>'c2' x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; + QUERY PLAN +-------------------------------------------------------------------------------------------- + Sort + Output: (count(((fields ->> 'c2'::text)))), ((fields ->> 'c2'::text)), 5, 7.0, 9 + Sort Key: ((ft1.fields ->> 'c2'::text)) + -> HashAggregate + Output: count(((fields ->> 'c2'::text))), ((fields ->> 'c2'::text)), (5), 7.0, (9) + Group Key: (ft1.fields ->> 'c2'::text), 5, 9 + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), 5, 9, fields + InfluxDB query: SELECT * FROM "T1" +(9 rows) + +--Testcase 242: +select count(fields->>'c2') w, fields->>'c2' x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; + w | x | y | z +-----+---+---+----- + 100 | 0 | 5 | 7.0 + 100 | 1 | 5 | 7.0 + 100 | 2 | 5 | 7.0 + 100 | 3 | 5 | 7.0 + 100 | 4 | 5 | 7.0 + 100 | 5 | 5 | 7.0 + 100 | 6 | 5 | 7.0 + 100 | 7 | 5 | 7.0 + 100 | 8 | 5 | 7.0 + 100 | 9 | 5 | 7.0 +(10 rows) + +-- GROUP BY clause referring to same column multiple times +-- Also, ORDER BY contains an aggregate function +--Testcase 243: +explain (verbose, costs off) +select (fields->>'c2')::int c2, (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int > 6 group by 1, 2 order by sum((fields->>'C 1')::int); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (((fields ->> 'c2'::text))::integer), (((fields ->> 'c2'::text))::integer), (sum(((fields ->> 'C 1'::text))::integer)) + Sort Key: (sum(((ft1.fields ->> 'C 1'::text))::integer)) + -> HashAggregate + Output: (((fields ->> 'c2'::text))::integer), (((fields ->> 'c2'::text))::integer), sum(((fields ->> 'C 1'::text))::integer) + Group Key: ((ft1.fields ->> 'c2'::text))::integer, ((ft1.fields ->> 'c2'::text))::integer + -> Foreign Scan on public.ft1 + Output: ((fields ->> 'c2'::text))::integer, ((fields ->> 'c2'::text))::integer, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" > 6)) +(9 rows) + +--Testcase 244: +select (fields->>'c2')::int c2, (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int > 6 group by 1, 2 order by sum((fields->>'C 1')::int); + c2 | c2 +----+---- + 7 | 7 + 8 | 8 + 9 | 9 +(3 rows) + +-- Testing HAVING clause shippability +--Testcase 245: +explain (verbose, costs off) +select(fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft2 group by fields->>'c2' having avg((fields->>'C 1')::int) < 500 and sum((fields->>'C 1')::int) < 49800 order by (fields->>'c2')::int; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text)))::integer), (sum(((fields ->> 'C 1'::text))::integer)), ((fields ->> 'c2'::text)) + Sort Key: ((((ft2.fields ->> 'c2'::text)))::integer) + -> HashAggregate + Output: (((fields ->> 'c2'::text)))::integer, sum(((fields ->> 'C 1'::text))::integer), ((fields ->> 'c2'::text)) + Group Key: (ft2.fields ->> 'c2'::text) + Filter: ((avg(((ft2.fields ->> 'C 1'::text))::integer) < '500'::numeric) AND (sum(((ft2.fields ->> 'C 1'::text))::integer) < 49800)) + -> Foreign Scan on public.ft2 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" +(10 rows) + +--Testcase 246: +select(fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft2 group by fields->>'c2' having avg((fields->>'C 1')::int) < 500 and sum((fields->>'C 1')::int) < 49800 order by (fields->>'c2')::int; + c2 | sum +----+------- + 1 | 49600 + 2 | 49700 +(2 rows) + +-- Unshippable HAVING clause will be evaluated locally, and other qual in HAVING clause is pushed down +--Testcase 247: +explain (verbose, costs off) +select count(*) from (select time, count((fields->>'C 1')::int) from ft1 group by time, sqrt((fields->>'c2')::int) having (avg((fields->>'C 1')::int) / avg((fields->>'C 1')::int)) * random() <= 1 and avg((fields->>'C 1')::int) < 500) x; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: count(*) + -> HashAggregate + Output: ft1."time", NULL::bigint, (sqrt((((ft1.fields ->> 'c2'::text))::integer)::double precision)) + Group Key: ft1."time", sqrt((((ft1.fields ->> 'c2'::text))::integer)::double precision) + Filter: ((avg(((ft1.fields ->> 'C 1'::text))::integer) < '500'::numeric) AND ((((avg(((ft1.fields ->> 'C 1'::text))::integer) / avg(((ft1.fields ->> 'C 1'::text))::integer)))::double precision * random()) <= '1'::double precision)) + -> Foreign Scan on public.ft1 + Output: ft1."time", sqrt((((ft1.fields ->> 'c2'::text))::integer)::double precision), ft1.fields + InfluxDB query: SELECT * FROM "T1" +(9 rows) + +--Testcase 248: +select count(*) from (select time, count((fields->>'C 1')::int) from ft1 group by time, sqrt((fields->>'c2')::int) having (avg((fields->>'C 1')::int) / avg((fields->>'C 1')::int)) * random() <= 1 and avg((fields->>'C 1')::int) < 500) x; + count +------- + 49 +(1 row) + +-- Aggregate in HAVING clause is not pushable, and thus aggregation is not pushed down +--Testcase 249: +explain (verbose, costs off) +select sum((fields->>'C 1')::int) from ft1 group by fields->>'c2' having avg((fields->>'C 1')::int * (random() <= 1)::int) > 100 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------ + Sort + Output: (sum(((fields ->> 'C 1'::text))::integer)), ((fields ->> 'c2'::text)) + Sort Key: (sum(((ft1.fields ->> 'C 1'::text))::integer)) + -> HashAggregate + Output: sum(((fields ->> 'C 1'::text))::integer), ((fields ->> 'c2'::text)) + Group Key: (ft1.fields ->> 'c2'::text) + Filter: (avg((((ft1.fields ->> 'C 1'::text))::integer * ((random() <= '1'::double precision))::integer)) > '100'::numeric) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" +(10 rows) + +-- Remote aggregate in combination with a local Param (for the output +-- of an initplan) can be trouble, per bug #15781 +--Testcase 250: +explain (verbose, costs off) +select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1; + QUERY PLAN +-------------------------------------------------------------- + Foreign Scan + Output: $0, (sum(((ft1.fields ->> 'C 1'::text))::integer)) + InfluxDB query: SELECT sum("C 1") FROM "T1" + InitPlan 1 (returns $0) + -> Seq Scan on pg_catalog.pg_enum +(5 rows) + +--Testcase 251: +select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1; + exists | sum +--------+-------- + t | 500500 +(1 row) + +--Testcase 252: +explain (verbose, costs off) +select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1 group by 1; + QUERY PLAN +-------------------------------------------------------------- + GroupAggregate + Output: ($0), sum(((ft1.fields ->> 'C 1'::text))::integer) + Group Key: $0 + InitPlan 1 (returns $0) + -> Seq Scan on pg_catalog.pg_enum + -> Foreign Scan on public.ft1 + Output: $0, ft1.fields + InfluxDB query: SELECT * FROM "T1" +(8 rows) + +--Testcase 253: +select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1 group by 1; + exists | sum +--------+-------- + t | 500500 +(1 row) + +-- Testing ORDER BY, DISTINCT, FILTER, Ordered-sets and VARIADIC within aggregates +-- ORDER BY within aggregate, same column used to order +--Testcase 254: +explain (verbose, costs off) +select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int) from ft1 where (fields->>'C 1')::int < 100 group by fields->>'c2' order by 1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (array_agg(((fields ->> 'C 1'::text))::integer ORDER BY ((fields ->> 'C 1'::text))::integer)), ((fields ->> 'c2'::text)) + Sort Key: (array_agg(((ft1.fields ->> 'C 1'::text))::integer ORDER BY ((ft1.fields ->> 'C 1'::text))::integer)) + -> GroupAggregate + Output: array_agg(((fields ->> 'C 1'::text))::integer ORDER BY ((fields ->> 'C 1'::text))::integer), ((fields ->> 'c2'::text)) + Group Key: ((ft1.fields ->> 'c2'::text)) + -> Sort + Output: ((fields ->> 'c2'::text)), fields + Sort Key: ((ft1.fields ->> 'c2'::text)) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) +(12 rows) + +--Testcase 255: +select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int) from ft1 where (fields->>'C 1')::int < 100 group by fields->>'c2' order by 1; + array_agg +-------------------------------- + {1,11,21,31,41,51,61,71,81,91} + {2,12,22,32,42,52,62,72,82,92} + {3,13,23,33,43,53,63,73,83,93} + {4,14,24,34,44,54,64,74,84,94} + {5,15,25,35,45,55,65,75,85,95} + {6,16,26,36,46,56,66,76,86,96} + {7,17,27,37,47,57,67,77,87,97} + {8,18,28,38,48,58,68,78,88,98} + {9,19,29,39,49,59,69,79,89,99} + {10,20,30,40,50,60,70,80,90} +(10 rows) + +-- ORDER BY within aggregate, different column used to order also using DESC +--Testcase 256: +explain (verbose, costs off) +select array_agg(time order by (fields->>'C 1')::int desc) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 50; + QUERY PLAN +---------------------------------------------------------------------------------- + Aggregate + Output: array_agg("time" ORDER BY ((fields ->> 'C 1'::text))::integer DESC) + -> Foreign Scan on public.ft2 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 50)) AND (("c2" = 6)) +(5 rows) + +--Testcase 257: +select array_agg(time order by (fields->>'C 1')::int desc) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 50; + array_agg +------------------------------------------------------------------------------------------------------------------------------------------ + {"Mon Feb 16 00:00:00 1970","Fri Feb 06 00:00:00 1970","Tue Jan 27 00:00:00 1970","Sat Jan 17 00:00:00 1970","Wed Jan 07 00:00:00 1970"} +(1 row) + +-- DISTINCT within aggregate +--Testcase 258: +explain (verbose, costs off) +select array_agg(distinct ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5))), ((((t2.fields ->> 'c1'::text))::integer % 3)) + Sort Key: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5))) + -> GroupAggregate + Output: array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5)), ((((t2.fields ->> 'c1'::text))::integer % 3)) + Group Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) + -> Sort + Output: ((((t2.fields ->> 'c1'::text))::integer % 3)), t1.fields + Sort Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) + -> Merge Full Join + Output: (((t2.fields ->> 'c1'::text))::integer % 3), t1.fields + Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + Filter: ((((t1.fields ->> 'c1'::text))::integer < 20) OR ((((t1.fields ->> 'c1'::text))::integer IS NULL) AND (((t2.fields ->> 'c1'::text))::integer < 5))) + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(25 rows) + +--Testcase 259: +select array_agg(distinct ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; + array_agg +-------------- + {0,1,2,3,4} + {1,2,3,NULL} +(2 rows) + +-- DISTINCT combined with ORDER BY within aggregate +--Testcase 260: +explain (verbose, costs off) +select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5))), ((((t2.fields ->> 'c1'::text))::integer % 3)) + Sort Key: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5))) + -> GroupAggregate + Output: array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5)), ((((t2.fields ->> 'c1'::text))::integer % 3)) + Group Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) + -> Sort + Output: ((((t2.fields ->> 'c1'::text))::integer % 3)), t1.fields + Sort Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) + -> Merge Full Join + Output: (((t2.fields ->> 'c1'::text))::integer % 3), t1.fields + Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + Filter: ((((t1.fields ->> 'c1'::text))::integer < 20) OR ((((t1.fields ->> 'c1'::text))::integer IS NULL) AND (((t2.fields ->> 'c1'::text))::integer < 5))) + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(25 rows) + +--Testcase 261: +select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; + array_agg +-------------- + {0,1,2,3,4} + {1,2,3,NULL} +(2 rows) + +--Testcase 262: +explain (verbose, costs off) +select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5 desc nulls last) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5) DESC NULLS LAST)), ((((t2.fields ->> 'c1'::text))::integer % 3)) + Sort Key: (array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5) DESC NULLS LAST)) + -> GroupAggregate + Output: array_agg(DISTINCT (((t1.fields ->> 'c1'::text))::integer % 5) ORDER BY (((t1.fields ->> 'c1'::text))::integer % 5) DESC NULLS LAST), ((((t2.fields ->> 'c1'::text))::integer % 3)) + Group Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) + -> Sort + Output: ((((t2.fields ->> 'c1'::text))::integer % 3)), t1.fields + Sort Key: ((((t2.fields ->> 'c1'::text))::integer % 3)) + -> Merge Full Join + Output: (((t2.fields ->> 'c1'::text))::integer % 3), t1.fields + Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + Filter: ((((t1.fields ->> 'c1'::text))::integer < 20) OR ((((t1.fields ->> 'c1'::text))::integer IS NULL) AND (((t2.fields ->> 'c1'::text))::integer < 5))) + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(25 rows) + +--Testcase 263: +select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5 desc nulls last) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; + array_agg +-------------- + {3,2,1,NULL} + {4,3,2,1,0} +(2 rows) + +-- FILTER within aggregate +--Testcase 264: +explain (verbose, costs off) +select sum((fields->>'C 1')::int) filter (where (fields->>'C 1')::int < 100 and (fields->>'c2')::int > 5) from ft1 group by fields->>'c2' order by 1 nulls last; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (sum(((fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((fields ->> 'C 1'::text))::integer < 100) AND ((((fields ->> 'c2'::text)))::integer > 5)))), ((fields ->> 'c2'::text)) + Sort Key: (sum(((ft1.fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((ft1.fields ->> 'C 1'::text))::integer < 100) AND ((((ft1.fields ->> 'c2'::text)))::integer > 5)))) + -> HashAggregate + Output: sum(((fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((fields ->> 'C 1'::text))::integer < 100) AND ((((fields ->> 'c2'::text)))::integer > 5))), ((fields ->> 'c2'::text)) + Group Key: (ft1.fields ->> 'c2'::text) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" +(9 rows) + +--Testcase 265: +select sum((fields->>'C 1')::int) filter (where (fields->>'C 1')::int < 100 and (fields->>'c2')::int > 5) from ft1 group by fields->>'c2' order by 1 nulls last; + sum +----- + 510 + 520 + 530 + 540 + + + + + + +(10 rows) + +-- DISTINCT, ORDER BY and FILTER within aggregate +--Testcase 266: +explain (verbose, costs off) +select sum((fields->>'C 1')::int%3), sum(distinct (fields->>'C 1')::int%3 order by (fields->>'C 1')::int%3) filter (where (fields->>'C 1')::int%3 < 2), (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int = 6 group by fields->>'c2'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + GroupAggregate + Output: sum((((fields ->> 'C 1'::text))::integer % 3)), sum(DISTINCT (((fields ->> 'C 1'::text))::integer % 3) ORDER BY (((fields ->> 'C 1'::text))::integer % 3)) FILTER (WHERE ((((fields ->> 'C 1'::text))::integer % 3) < 2)), (((fields ->> 'c2'::text)))::integer, ((fields ->> 'c2'::text)) + Group Key: ((ft1.fields ->> 'c2'::text)) + -> Sort + Output: ((fields ->> 'c2'::text)), fields + Sort Key: ((ft1.fields ->> 'c2'::text)) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" = 6)) +(9 rows) + +--Testcase 267: +select sum((fields->>'C 1')::int%3), sum(distinct (fields->>'C 1')::int%3 order by (fields->>'C 1')::int%3) filter (where (fields->>'C 1')::int%3 < 2), (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int = 6 group by fields->>'c2'; + sum | sum | c2 +-----+-----+---- + 99 | 1 | 6 +(1 row) + +-- Outer query is aggregation query +--Testcase 268: +explain (verbose, costs off) +select distinct (select count(*) filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------- + Unique + Output: ((SubPlan 1)) + -> Sort + Output: ((SubPlan 1)) + Sort Key: ((SubPlan 1)) + -> Aggregate + Output: (SubPlan 1) + -> Foreign Scan on public.ft2 t2 + Output: t2."time", t2.tags, t2.fields + InfluxDB query: SELECT * FROM "T1" WHERE ((("c2" % 6) = 0)) + SubPlan 1 + -> Foreign Scan on public.ft1 t1 + Output: count(*) FILTER (WHERE ((((t2.fields ->> 'c2'::text))::integer = 6) AND (((t2.fields ->> 'C 1'::text))::integer < 10))) + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 6)) +(14 rows) + +--Testcase 269: +select distinct (select count(*) filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; + count +------- + 1 +(1 row) + +-- Inner query is aggregation query +--Testcase 270: +explain (verbose, costs off) +select distinct (select count(t1.fields->>'C 1') filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Unique + Output: ((SubPlan 1)) + -> Sort + Output: ((SubPlan 1)) + Sort Key: ((SubPlan 1)) + -> Foreign Scan on public.ft2 t2 + Output: (SubPlan 1) + InfluxDB query: SELECT * FROM "T1" WHERE ((("c2" % 6) = 0)) + SubPlan 1 + -> Aggregate + Output: count((t1.fields ->> 'C 1'::text)) FILTER (WHERE ((((t2.fields ->> 'c2'::text))::integer = 6) AND (((t2.fields ->> 'C 1'::text))::integer < 10))) + -> Foreign Scan on public.ft1 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 6)) +(14 rows) + +--Testcase 271: +select distinct (select count(t1.fields->>'C 1') filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; + count +------- + 0 + 1 +(2 rows) + +-- Aggregate not pushed down as FILTER condition is not pushable +--Testcase 272: +explain (verbose, costs off) +select sum((fields->>'C 1')::int) filter (where ((fields->>'C 1')::int / (fields->>'C 1')::int) * random() <= 1) from ft1 group by fields->>'c2' order by 1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (sum(((fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((((fields ->> 'C 1'::text))::integer / ((fields ->> 'C 1'::text))::integer))::double precision * random()) <= '1'::double precision))), ((fields ->> 'c2'::text)) + Sort Key: (sum(((ft1.fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((((ft1.fields ->> 'C 1'::text))::integer / ((ft1.fields ->> 'C 1'::text))::integer))::double precision * random()) <= '1'::double precision))) + -> HashAggregate + Output: sum(((fields ->> 'C 1'::text))::integer) FILTER (WHERE ((((((fields ->> 'C 1'::text))::integer / ((fields ->> 'C 1'::text))::integer))::double precision * random()) <= '1'::double precision)), ((fields ->> 'c2'::text)) + Group Key: (ft1.fields ->> 'c2'::text) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" +(9 rows) + +--Testcase 273: +explain (verbose, costs off) +select sum((fields->>'c2')::int) filter (where (fields->>'c2')::int in (select (fields->>'c2')::int from ft1 where (fields->>'c2')::int < 5)) from ft1; + QUERY PLAN +----------------------------------------------------------------------------------------- + Aggregate + Output: sum(((ft1.fields ->> 'c2'::text))::integer) FILTER (WHERE (hashed SubPlan 1)) + -> Foreign Scan on public.ft1 + Output: ft1."time", ft1.tags, ft1.fields + InfluxDB query: SELECT * FROM "T1" + SubPlan 1 + -> Foreign Scan on public.ft1 ft1_1 + Output: ((ft1_1.fields ->> 'c2'::text))::integer + InfluxDB query: SELECT "c2" FROM "T1" WHERE (("c2" < 5)) +(9 rows) + +-- Ordered-sets within aggregate +--Testcase 274: +explain (verbose, costs off) +select (fields->>'c2')::int c2, rank('10'::varchar) within group (order by fields->>'c6'), percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' having percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) < 500 order by (fields->>'c2')::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text)))::integer), (rank('10'::text) WITHIN GROUP (ORDER BY (fields ->> 'c6'::text))), (percentile_cont(((((((fields ->> 'c2'::text)))::integer)::numeric / '10'::numeric))::double precision) WITHIN GROUP (ORDER BY ((((fields ->> 'C 1'::text))::integer)::double precision))), ((fields ->> 'c2'::text)) + Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) + -> GroupAggregate + Output: (((fields ->> 'c2'::text)))::integer, rank('10'::text) WITHIN GROUP (ORDER BY (fields ->> 'c6'::text)), percentile_cont(((((((fields ->> 'c2'::text)))::integer)::numeric / '10'::numeric))::double precision) WITHIN GROUP (ORDER BY ((((fields ->> 'C 1'::text))::integer)::double precision)), ((fields ->> 'c2'::text)) + Group Key: ((ft1.fields ->> 'c2'::text)) + Filter: (percentile_cont(((((((ft1.fields ->> 'c2'::text)))::integer)::numeric / '10'::numeric))::double precision) WITHIN GROUP (ORDER BY ((((ft1.fields ->> 'C 1'::text))::integer)::double precision)) < '500'::double precision) + -> Sort + Output: ((fields ->> 'c2'::text)), fields + Sort Key: ((ft1.fields ->> 'c2'::text)) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 10)) +(13 rows) + +--Testcase 275: +select (fields->>'c2')::int c2, rank('10'::varchar) within group (order by fields->>'c6'), percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' having percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) < 500 order by (fields->>'c2')::int; + c2 | rank | percentile_cont +----+------+----------------- + 0 | 101 | 10 + 1 | 101 | 100 + 2 | 1 | 200 + 3 | 1 | 300 + 4 | 1 | 400 +(5 rows) + +-- Using multiple arguments within aggregates +--Testcase 276: +explain (verbose, costs off) +select (fields->>'C 1')::int c1, rank(fields->>'C 1', fields->>'c2') within group (order by fields->>'C 1', fields->>'c2') from ft1 group by fields->>'C 1', fields->>'c2' having (fields->>'C 1')::int = 6 order by 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + GroupAggregate + Output: (((fields ->> 'C 1'::text)))::integer, rank(((fields ->> 'C 1'::text)), ((fields ->> 'c2'::text))) WITHIN GROUP (ORDER BY ((fields ->> 'C 1'::text)), ((fields ->> 'c2'::text))), ((fields ->> 'C 1'::text)), ((fields ->> 'c2'::text)) + Group Key: ((ft1.fields ->> 'C 1'::text)), ((ft1.fields ->> 'c2'::text)) + -> Sort + Output: ((fields ->> 'C 1'::text)), ((fields ->> 'c2'::text)), fields + Sort Key: ((ft1.fields ->> 'C 1'::text)), ((ft1.fields ->> 'c2'::text)) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'C 1'::text), (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 6)) +(9 rows) + +--Testcase 277: +select (fields->>'C 1')::int c1, rank(fields->>'C 1', fields->>'c2') within group (order by fields->>'C 1', fields->>'c2') from ft1 group by fields->>'C 1', fields->>'c2' having (fields->>'C 1')::int = 6 order by 1; + c1 | rank +----+------ + 6 | 1 +(1 row) + +-- User defined function for user defined aggregate, VARIADIC +--Testcase 278: +create function least_accum(anyelement, variadic anyarray) +returns anyelement language sql as + 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; +--Testcase 279: +create aggregate least_agg(variadic items anyarray) ( + stype = anyelement, sfunc = least_accum +); +-- Disable hash aggregation for plan stability. +--Testcase 280: +set enable_hashagg to false; +-- Not pushed down due to user defined aggregate +--Testcase 281: +explain (verbose, costs off) +select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 group by fields->>'c2' order by (fields->>'c2')::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text)))::integer), (least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer])), ((fields ->> 'c2'::text)) + Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) + -> GroupAggregate + Output: (((fields ->> 'c2'::text)))::integer, least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer]), ((fields ->> 'c2'::text)) + Group Key: ((ft1.fields ->> 'c2'::text)) + -> Sort + Output: ((fields ->> 'c2'::text)), fields + Sort Key: ((ft1.fields ->> 'c2'::text)) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" +(12 rows) + +-- Add function and aggregate into extension +--Testcase 282: +alter extension influxdb_fdw add function least_accum(anyelement, variadic anyarray); +--Testcase 283: +alter extension influxdb_fdw add aggregate least_agg(variadic items anyarray); +-- Now aggregate will be pushed. Aggregate will display VARIADIC argument. +--Testcase 284: +explain (verbose, costs off) +select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 100 group by fields->>'c2' order by (fields->>'c2')::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text)))::integer), (least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer])), ((fields ->> 'c2'::text)) + Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) + -> GroupAggregate + Output: (((fields ->> 'c2'::text)))::integer, least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer]), ((fields ->> 'c2'::text)) + Group Key: ((ft1.fields ->> 'c2'::text)) + -> Sort + Output: ((fields ->> 'c2'::text)), fields + Sort Key: ((ft1.fields ->> 'c2'::text)) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 100)) +(12 rows) + +--Testcase 285: +select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 100 group by fields->>'c2' order by (fields->>'c2')::int; + c2 | least_agg +----+----------- + 0 | 10 + 1 | 1 + 2 | 2 + 3 | 3 + 4 | 4 + 5 | 5 + 6 | 6 + 7 | 7 + 8 | 8 + 9 | 9 +(10 rows) + +-- Remove function and aggregate from extension +--Testcase 286: +alter extension influxdb_fdw drop function least_accum(anyelement, variadic anyarray); +--Testcase 287: +alter extension influxdb_fdw drop aggregate least_agg(variadic items anyarray); +-- Not pushed down as we have dropped objects from extension. +--Testcase 288: +explain (verbose, costs off) +select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 group by fields->>'c2' order by (fields->>'c2')::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text)))::integer), (least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer])), ((fields ->> 'c2'::text)) + Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) + -> GroupAggregate + Output: (((fields ->> 'c2'::text)))::integer, least_agg(VARIADIC ARRAY[((fields ->> 'C 1'::text))::integer]), ((fields ->> 'c2'::text)) + Group Key: ((ft1.fields ->> 'c2'::text)) + -> Sort + Output: ((fields ->> 'c2'::text)), fields + Sort Key: ((ft1.fields ->> 'c2'::text)) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" +(12 rows) + +-- Cleanup +--Testcase 289: +reset enable_hashagg; +--Testcase 290: +drop aggregate least_agg(variadic items anyarray); +--Testcase 291: +drop function least_accum(anyelement, variadic anyarray); +-- Testing USING OPERATOR() in ORDER BY within aggregate. +-- For this, we need user defined operators along with operator family and +-- operator class. Create those and then add them in extension. Note that +-- user defined objects are considered unshippable unless they are part of +-- the extension. +--Testcase 292: +create operator public.<^ ( + leftarg = int4, + rightarg = int4, + procedure = int4eq +); +--Testcase 293: +create operator public.=^ ( + leftarg = int4, + rightarg = int4, + procedure = int4lt +); +--Testcase 294: +create operator public.>^ ( + leftarg = int4, + rightarg = int4, + procedure = int4gt +); +--Testcase 295: +create operator family my_op_family using btree; +--Testcase 296: +create function my_op_cmp(a int, b int) returns int as + $$begin return btint4cmp(a, b); end $$ language plpgsql; +--Testcase 297: +create operator class my_op_class for type int using btree family my_op_family as + operator 1 public.<^, + operator 3 public.=^, + operator 5 public.>^, + function 1 my_op_cmp(int, int); +-- This will not be pushed as user defined sort operator is not part of the +-- extension yet. +--Testcase 298: +explain (verbose, costs off) +select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + GroupAggregate + Output: array_agg(((fields ->> 'C 1'::text))::integer ORDER BY ((fields ->> 'C 1'::text))::integer USING <^ NULLS LAST), ((fields ->> 'c2'::text)) + Group Key: ((ft2.fields ->> 'c2'::text)) + -> Sort + Output: ((fields ->> 'c2'::text)), fields + Sort Key: ((ft2.fields ->> 'c2'::text)) + -> Foreign Scan on public.ft2 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) +(9 rows) + +-- This should not be pushed either. +--Testcase 766: +explain (verbose, costs off) +select * from ft2 order by (fields->>'C 1')::int using operator(public.<^); + QUERY PLAN +--------------------------------------------------------------------------- + Sort + Output: "time", tags, fields, (((fields ->> 'C 1'::text))::integer) + Sort Key: (((ft2.fields ->> 'C 1'::text))::integer) USING <^ + -> Foreign Scan on public.ft2 + Output: "time", tags, fields, ((fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +-- Update local stats on ft2 +--ANALYZE ft2; +-- Add into extension +--Testcase 299: +alter extension influxdb_fdw add operator class my_op_class using btree; +--Testcase 300: +alter extension influxdb_fdw add function my_op_cmp(a int, b int); +--Testcase 301: +alter extension influxdb_fdw add operator family my_op_family using btree; +--Testcase 302: +alter extension influxdb_fdw add operator public.<^(int, int); +--Testcase 303: +alter extension influxdb_fdw add operator public.=^(int, int); +--Testcase 304: +alter extension influxdb_fdw add operator public.>^(int, int); +-- Now this will be pushed as sort operator is part of the extension. +--Testcase 305: +explain (verbose, costs off) +select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + GroupAggregate + Output: array_agg(((fields ->> 'C 1'::text))::integer ORDER BY ((fields ->> 'C 1'::text))::integer USING <^ NULLS LAST), ((fields ->> 'c2'::text)) + Group Key: ((ft2.fields ->> 'c2'::text)) + -> Sort + Output: ((fields ->> 'c2'::text)), fields + Sort Key: ((ft2.fields ->> 'c2'::text)) + -> Foreign Scan on public.ft2 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) +(9 rows) + +--Testcase 306: +select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; + array_agg +-------------------------------- + {6,16,26,36,46,56,66,76,86,96} +(1 row) + +-- This should be pushed too. +-- Influx not support user-defined operator +--Testcase 767: +explain (verbose, costs off) +select * from ft2 order by (fields->>'C 1')::int using operator(public.<^); + QUERY PLAN +--------------------------------------------------------------------------- + Sort + Output: "time", tags, fields, (((fields ->> 'C 1'::text))::integer) + Sort Key: (((ft2.fields ->> 'C 1'::text))::integer) USING <^ + -> Foreign Scan on public.ft2 + Output: "time", tags, fields, ((fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +-- Remove from extension +--Testcase 307: +alter extension influxdb_fdw drop operator class my_op_class using btree; +--Testcase 308: +alter extension influxdb_fdw drop function my_op_cmp(a int, b int); +--Testcase 309: +alter extension influxdb_fdw drop operator family my_op_family using btree; +--Testcase 310: +alter extension influxdb_fdw drop operator public.<^(int, int); +--Testcase 311: +alter extension influxdb_fdw drop operator public.=^(int, int); +--Testcase 312: +alter extension influxdb_fdw drop operator public.>^(int, int); +-- This will not be pushed as sort operator is now removed from the extension. +--Testcase 313: +explain (verbose, costs off) +select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + GroupAggregate + Output: array_agg(((fields ->> 'C 1'::text))::integer ORDER BY ((fields ->> 'C 1'::text))::integer USING <^ NULLS LAST), ((fields ->> 'c2'::text)) + Group Key: ((ft2.fields ->> 'c2'::text)) + -> Sort + Output: ((fields ->> 'c2'::text)), fields + Sort Key: ((ft2.fields ->> 'c2'::text)) + -> Foreign Scan on public.ft2 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 100)) AND (("c2" = 6)) +(9 rows) + +-- Cleanup +--Testcase 314: +drop operator class my_op_class using btree; +--Testcase 315: +drop function my_op_cmp(a int, b int); +--Testcase 316: +drop operator family my_op_family using btree; +--Testcase 317: +drop operator public.>^(int, int); +--Testcase 318: +drop operator public.=^(int, int); +--Testcase 319: +drop operator public.<^(int, int); +-- Input relation to aggregate push down hook is not safe to pushdown and thus +-- the aggregate cannot be pushed down to foreign server. +--Testcase 320: +explain (verbose, costs off) +select count(t1.c3) from ((SELECT fields->>'C 1' c1, fields->>'c2' c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2)) t1 left join ((SELECT fields->>'C 1' c1, fields->>'c2' c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2)) t2 on ((t1.c1)::int = random() * (t2.c2)::int); + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: count((ft2.tags ->> 'c3'::text)) + -> Nested Loop Left Join + Output: ft2.tags + Join Filter: ((((ft2.fields ->> 'C 1'::text))::integer)::double precision = (random() * (((ft2_1.fields ->> 'c2'::text))::integer)::double precision)) + -> Foreign Scan on public.ft2 + Output: ft2."time", ft2.tags, ft2.fields + InfluxDB query: SELECT * FROM "T1" + -> Materialize + Output: ft2_1.fields + -> Foreign Scan on public.ft2 ft2_1 + Output: ft2_1.fields + InfluxDB query: SELECT * FROM "T1" +(13 rows) + +-- Subquery in FROM clause having aggregate +--Testcase 321: +explain (verbose, costs off) +select count(*), x.b from ft1, (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2') x where (ft1.fields->>'c2')::int = x.a group by x.b order by 1, 2; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (count(*)), x.b + Sort Key: (count(*)), x.b + -> HashAggregate + Output: count(*), x.b + Group Key: x.b + -> Merge Join + Output: x.b + Merge Cond: (x.a = (((ft1.fields ->> 'c2'::text))::integer)) + -> Sort + Output: x.b, x.a + Sort Key: x.a + -> Subquery Scan on x + Output: x.b, x.a + -> HashAggregate + Output: (((ft1_1.fields ->> 'c2'::text)))::integer, sum(((ft1_1.fields ->> 'C 1'::text))::integer), ((ft1_1.fields ->> 'c2'::text)) + Group Key: (ft1_1.fields ->> 'c2'::text) + -> Foreign Scan on public.ft1 ft1_1 + Output: (ft1_1.fields ->> 'c2'::text), ft1_1.fields + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: ft1.fields, (((ft1.fields ->> 'c2'::text))::integer) + Sort Key: (((ft1.fields ->> 'c2'::text))::integer) + -> Foreign Scan on public.ft1 + Output: ft1.fields, ((ft1.fields ->> 'c2'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(26 rows) + +--Testcase 322: +select count(*), x.b from ft1, (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2') x where (ft1.fields->>'c2')::int = x.a group by x.b order by 1, 2; + count | b +-------+------- + 100 | 49600 + 100 | 49700 + 100 | 49800 + 100 | 49900 + 100 | 50000 + 100 | 50100 + 100 | 50200 + 100 | 50300 + 100 | 50400 + 100 | 50500 +(10 rows) + +-- FULL join with IS NULL check in HAVING +--Testcase 323: +explain (verbose, costs off) +select avg((t1.c1)::int), sum((t2.c1)::int) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) group by t2.c1 having (avg((t1.c1)::int) is null and sum((t2.c1)::int) < 10) or sum((t2.c1)::int) is null order by 1 nulls last, 2; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (avg(((t1.fields ->> 'c1'::text))::integer)), (sum((((t2.fields ->> 'c1'::text))::integer))), (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (avg(((t1.fields ->> 'c1'::text))::integer)), (sum((((t2.fields ->> 'c1'::text))::integer))) + -> HashAggregate + Output: avg(((t1.fields ->> 'c1'::text))::integer), sum((((t2.fields ->> 'c1'::text))::integer)), (((t2.fields ->> 'c1'::text))::integer) + Group Key: ((t2.fields ->> 'c1'::text))::integer + Filter: (((avg(((t1.fields ->> 'c1'::text))::integer) IS NULL) AND (sum((((t2.fields ->> 'c1'::text))::integer)) < 10)) OR (sum((((t2.fields ->> 'c1'::text))::integer)) IS NULL)) + -> Merge Full Join + Output: ((t2.fields ->> 'c1'::text))::integer, t1.fields, t2.fields + Merge Cond: ((((t1.fields ->> 'c1'::text))::integer) = (((t2.fields ->> 'c1'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'c1'::text))::integer) + Sort Key: (((t1.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.fields, ((t1.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T3" + -> Sort + Output: t2.fields, (((t2.fields ->> 'c1'::text))::integer) + Sort Key: (((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft5 t2 + Output: t2.fields, ((t2.fields ->> 'c1'::text))::integer + InfluxDB query: SELECT * FROM "T4" +(22 rows) + +--Testcase 324: +select avg((t1.c1)::int), sum((t2.c1)::int) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) group by t2.c1 having (avg((t1.c1)::int) is null and sum((t2.c1)::int) < 10) or sum((t2.c1)::int) is null order by 1 nulls last, 2; + avg | sum +---------------------+----- + 51.0000000000000000 | + | 3 + | 9 +(3 rows) + +-- Aggregate over FULL join needing to deparse the joining relations as +-- subqueries. +--Testcase 325: +explain (verbose, costs off) +select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 full join (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 on ((t1.c1)::int = (t2.c1)::int); + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Aggregate + Output: count(*), sum(((t1.fields ->> 'c1'::text))::integer), avg(((t2.fields ->> 'c1'::text))::integer) + -> Hash Full Join + Output: t1.fields, t2.fields + Hash Cond: (((t1.fields ->> 'c1'::text))::integer = ((t2.fields ->> 'c1'::text))::integer) + -> Foreign Scan on public.ft4 t1 + Output: t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T3" WHERE (("c1" >= 50)) AND (("c1" <= 60)) + -> Hash + Output: t2.fields + -> Foreign Scan on public.ft5 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "T4" WHERE (("c1" >= 50)) AND (("c1" <= 60)) +(13 rows) + +--Testcase 326: +select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 full join (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 on ((t1.c1)::int = (t2.c1)::int); + count | sum | avg +-------+-----+--------------------- + 8 | 330 | 55.5000000000000000 +(1 row) + +-- ORDER BY expression is part of the target list but not pushed down to +-- foreign server. +--Testcase 327: +explain (verbose, costs off) +select sum((fields->>'c2')::int) * (random() <= 1)::int as sum from ft1 order by 1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------- + Sort + Output: (((sum(((fields ->> 'c2'::text))::integer)) * ((random() <= '1'::double precision))::integer)) + Sort Key: (((sum(((ft1.fields ->> 'c2'::text))::integer)) * ((random() <= '1'::double precision))::integer)) + -> Foreign Scan + Output: ((sum(((fields ->> 'c2'::text))::integer)) * ((random() <= '1'::double precision))::integer) + InfluxDB query: SELECT sum("c2") FROM "T1" +(6 rows) + +--Testcase 328: +select sum((fields->>'c2')::int) * (random() <= 1)::int as sum from ft1 order by 1; + sum +------ + 4500 +(1 row) + +-- LATERAL join, with parameterization +--Testcase 329: +set enable_hashagg to false; +--Testcase 330: +explain (verbose, costs off) +select (fields->>'c2')::int c2, sum from "S 1"."T 1" t1, lateral (select sum((t2.fields->>'C 1')::int + (t1.fields->>'C 1')::int) sum from ft2 t2 group by t2.fields->>'C 1') qry where (t1.fields->>'c2')::int * 2 = qry.sum and (t1.fields->>'c2')::int < 3 and (t1.fields->>'C 1')::int < 100 order by 1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (((t1.fields ->> 'c2'::text))::integer), qry.sum + Sort Key: (((t1.fields ->> 'c2'::text))::integer) + -> Nested Loop + Output: ((t1.fields ->> 'c2'::text))::integer, qry.sum + -> Foreign Scan on "S 1"."T 1" t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 3)) AND (("C 1" < 100)) + -> Subquery Scan on qry + Output: qry.sum, ((t2.fields ->> 'C 1'::text)) + Filter: ((((t1.fields ->> 'c2'::text))::integer * 2) = qry.sum) + -> GroupAggregate + Output: sum(((((t2.fields ->> 'C 1'::text)))::integer + ((t1.fields ->> 'C 1'::text))::integer)), ((t2.fields ->> 'C 1'::text)) + Group Key: ((t2.fields ->> 'C 1'::text)) + -> Sort + Output: ((t2.fields ->> 'C 1'::text)), t2.fields + Sort Key: ((t2.fields ->> 'C 1'::text)) + -> Foreign Scan on public.ft2 t2 + Output: (t2.fields ->> 'C 1'::text), t2.fields + InfluxDB query: SELECT * FROM "T1" +(20 rows) + +--Testcase 331: +select (fields->>'c2')::int c2, sum from "S 1"."T 1" t1, lateral (select sum((t2.fields->>'C 1')::int + (t1.fields->>'C 1')::int) sum from ft2 t2 group by t2.fields->>'C 1') qry where (t1.fields->>'c2')::int * 2 = qry.sum and (t1.fields->>'c2')::int < 3 and (t1.fields->>'C 1')::int < 100 order by 1; + c2 | sum +----+----- + 1 | 2 + 2 | 4 +(2 rows) + +--Testcase 332: +reset enable_hashagg; +-- bug #15613: bad plan for foreign table scan with lateral reference +--Testcase 333: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (ref_0.fields->>'c2')::int c2, subq_1.* +FROM + "S 1"."T 1" AS ref_0, + LATERAL ( + SELECT (ref_0.fields->>'C 1')::int c1, subq_0.* + FROM (SELECT (ref_0.fields->>'c2')::int c2, ref_1.tags->>'c3' c3 + FROM ft1 AS ref_1) AS subq_0 + RIGHT JOIN ft2 AS ref_3 ON (subq_0.c3 = ref_3.tags->>'c3') + ) AS subq_1 +WHERE (ref_0.fields->>'C 1')::int < 10 AND subq_1.c3 = '00001' +ORDER BY (ref_0.fields->>'C 1')::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: (((ref_0.fields ->> 'c2'::text))::integer), (((ref_0.fields ->> 'C 1'::text))::integer), (((ref_0.fields ->> 'c2'::text))::integer), ((ref_1.tags ->> 'c3'::text)), (((ref_0.fields ->> 'C 1'::text))::integer) + Sort Key: (((ref_0.fields ->> 'C 1'::text))::integer) + -> Nested Loop + Output: ((ref_0.fields ->> 'c2'::text))::integer, ((ref_0.fields ->> 'C 1'::text))::integer, (((ref_0.fields ->> 'c2'::text))::integer), (ref_1.tags ->> 'c3'::text), ((ref_0.fields ->> 'C 1'::text))::integer + -> Nested Loop + Output: ref_0.fields, ref_1.tags, (((ref_0.fields ->> 'c2'::text))::integer) + -> Foreign Scan on "S 1"."T 1" ref_0 + Output: ref_0."time", ref_0.tags, ref_0.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 10)) + -> Foreign Scan on public.ft1 ref_1 + Output: ref_1.tags, ((ref_0.fields ->> 'c2'::text))::integer + InfluxDB query: SELECT * FROM "T1" WHERE (("c3" = '00001')) + -> Materialize + Output: ref_3.tags + -> Foreign Scan on public.ft2 ref_3 + Output: ref_3.tags + InfluxDB query: SELECT * FROM "T1" WHERE (("c3" = '00001')) +(18 rows) + +--Testcase 334: +SELECT (ref_0.fields->>'c2')::int c2, subq_1.* +FROM + "S 1"."T 1" AS ref_0, + LATERAL ( + SELECT (ref_0.fields->>'C 1')::int c1, subq_0.* + FROM (SELECT (ref_0.fields->>'c2')::int c2, ref_1.tags->>'c3' c3 + FROM ft1 AS ref_1) AS subq_0 + RIGHT JOIN ft2 AS ref_3 ON (subq_0.c3 = ref_3.tags->>'c3') + ) AS subq_1 +WHERE (ref_0.fields->>'C 1')::int < 10 AND subq_1.c3 = '00001' +ORDER BY (ref_0.fields->>'C 1')::int; + c2 | c1 | c2 | c3 +----+----+----+------- + 1 | 1 | 1 | 00001 + 2 | 2 | 2 | 00001 + 3 | 3 | 3 | 00001 + 4 | 4 | 4 | 00001 + 5 | 5 | 5 | 00001 + 6 | 6 | 6 | 00001 + 7 | 7 | 7 | 00001 + 8 | 8 | 8 | 00001 + 9 | 9 | 9 | 00001 +(9 rows) + +-- Check with placeHolderVars +--Testcase 335: +explain (verbose, costs off) +select sum(q.a), count(q.b) from ft4 left join (select 13, avg((ft1.fields->>'C 1')::int), sum((ft2.fields->>'C 1')::int) from ft1 right join ft2 on ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int)) q(a, b, c) on ((ft4.fields->>'c1')::int <= q.b); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------- + Aggregate + Output: sum(q.a), count(q.b) + -> Nested Loop Left Join + Output: q.a, q.b + Inner Unique: true + Join Filter: ((((ft4.fields ->> 'c1'::text))::integer)::numeric <= q.b) + -> Foreign Scan on public.ft4 + Output: ft4.tags, ft4.fields + InfluxDB query: SELECT * FROM "T3" + -> Materialize + Output: q.a, q.b + -> Subquery Scan on q + Output: q.a, q.b + -> Aggregate + Output: 13, avg(((ft1.fields ->> 'C 1'::text))::integer), NULL::bigint + -> Merge Left Join + Output: ft1.fields + Merge Cond: ((((ft2.fields ->> 'C 1'::text))::integer) = (((ft1.fields ->> 'C 1'::text))::integer)) + -> Sort + Output: ft2.fields, (((ft2.fields ->> 'C 1'::text))::integer) + Sort Key: (((ft2.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft2 + Output: ft2.fields, ((ft2.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" + -> Sort + Output: ft1.fields, (((ft1.fields ->> 'C 1'::text))::integer) + Sort Key: (((ft1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 + Output: ft1.fields, ((ft1.fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(30 rows) + +--Testcase 336: +select sum(q.a), count(q.b) from ft4 left join (select 13, avg((ft1.fields->>'C 1')::int), sum((ft2.fields->>'C 1')::int) from ft1 right join ft2 on ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int)) q(a, b, c) on ((ft4.fields->>'c1')::int <= q.b); + sum | count +-----+------- + 650 | 50 +(1 row) + +-- Not supported cases +-- Grouping sets +--Testcase 337: +explain (verbose, costs off) +select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by rollup((fields->>'c2')::int) order by 1 nulls last; + QUERY PLAN +------------------------------------------------------------------------------------------------ + Sort + Output: (((fields ->> 'c2'::text))::integer), (sum(((fields ->> 'C 1'::text))::integer)) + Sort Key: (((ft1.fields ->> 'c2'::text))::integer) + -> MixedAggregate + Output: (((fields ->> 'c2'::text))::integer), sum(((fields ->> 'C 1'::text))::integer) + Hash Key: ((ft1.fields ->> 'c2'::text))::integer + Group Key: () + -> Foreign Scan on public.ft1 + Output: ((fields ->> 'c2'::text))::integer, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 3)) +(10 rows) + +--Testcase 338: +select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by rollup((fields->>'c2')::int) order by 1 nulls last; + c2 | sum +----+-------- + 0 | 50500 + 1 | 49600 + 2 | 49700 + | 149800 +(4 rows) + +--Testcase 339: +explain (verbose, costs off) +select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by cube((fields->>'c2')::int) order by 1 nulls last; + QUERY PLAN +------------------------------------------------------------------------------------------------ + Sort + Output: (((fields ->> 'c2'::text))::integer), (sum(((fields ->> 'C 1'::text))::integer)) + Sort Key: (((ft1.fields ->> 'c2'::text))::integer) + -> MixedAggregate + Output: (((fields ->> 'c2'::text))::integer), sum(((fields ->> 'C 1'::text))::integer) + Hash Key: ((ft1.fields ->> 'c2'::text))::integer + Group Key: () + -> Foreign Scan on public.ft1 + Output: ((fields ->> 'c2'::text))::integer, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 3)) +(10 rows) + +--Testcase 340: +select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by cube((fields->>'c2')::int) order by 1 nulls last; + c2 | sum +----+-------- + 0 | 50500 + 1 | 49600 + 2 | 49700 + | 149800 +(4 rows) + +--Testcase 341: +explain (verbose, costs off) +select (fields->>'c2')::int c2, fields->>'c6' c6, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by grouping sets(fields->>'c2', fields->>'c6') order by 1 nulls last, 2 nulls last; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Sort + Output: ((((fields ->> 'c2'::text)))::integer), ((fields ->> 'c6'::text)), (sum(((fields ->> 'C 1'::text))::integer)), ((fields ->> 'c2'::text)) + Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer), ((ft1.fields ->> 'c6'::text)) + -> HashAggregate + Output: (((fields ->> 'c2'::text)))::integer, ((fields ->> 'c6'::text)), sum(((fields ->> 'C 1'::text))::integer), ((fields ->> 'c2'::text)) + Hash Key: (ft1.fields ->> 'c2'::text) + Hash Key: (ft1.fields ->> 'c6'::text) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c6'::text), (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 3)) +(10 rows) + +--Testcase 342: +select (fields->>'c2')::int c2, fields->>'c6' c6, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by grouping sets(fields->>'c2', fields->>'c6') order by 1 nulls last, 2 nulls last; + c2 | c6 | sum +----+----+------- + 0 | | 50500 + 1 | | 49600 + 2 | | 49700 + | 0 | 50500 + | 1 | 49600 + | 2 | 49700 +(6 rows) + +--Testcase 343: +explain (verbose, costs off) +select (fields->>'c2')::int c2, sum((fields->>'C 1')::int), grouping(fields->>'c2') from ft1 where (fields->>'c2')::int < 3 group by fields->>'c2' order by 1 nulls last; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text)))::integer), (sum(((fields ->> 'C 1'::text))::integer)), (GROUPING(((fields ->> 'c2'::text)))), ((fields ->> 'c2'::text)) + Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) + -> HashAggregate + Output: (((fields ->> 'c2'::text)))::integer, sum(((fields ->> 'C 1'::text))::integer), GROUPING(((fields ->> 'c2'::text))), ((fields ->> 'c2'::text)) + Group Key: (ft1.fields ->> 'c2'::text) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 3)) +(9 rows) + +--Testcase 344: +select (fields->>'c2')::int c2, sum((fields->>'C 1')::int), grouping(fields->>'c2') from ft1 where (fields->>'c2')::int < 3 group by fields->>'c2' order by 1 nulls last; + c2 | sum | grouping +----+-------+---------- + 0 | 50500 | 0 + 1 | 49600 | 0 + 2 | 49700 | 0 +(3 rows) + +-- DISTINCT itself is not pushed down, whereas underneath aggregate is pushed +--Testcase 345: +explain (verbose, costs off) +select distinct sum((fields->>'C 1')::int)/1000 s from ft2 where (fields->>'c2')::int < 6 group by fields->>'c2' order by 1; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Unique + Output: ((sum(((fields ->> 'C 1'::text))::integer) / 1000)), ((fields ->> 'c2'::text)) + -> Sort + Output: ((sum(((fields ->> 'C 1'::text))::integer) / 1000)), ((fields ->> 'c2'::text)) + Sort Key: ((sum(((ft2.fields ->> 'C 1'::text))::integer) / 1000)) + -> HashAggregate + Output: (sum(((fields ->> 'C 1'::text))::integer) / 1000), ((fields ->> 'c2'::text)) + Group Key: (ft2.fields ->> 'c2'::text) + -> Foreign Scan on public.ft2 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 6)) +(11 rows) + +--Testcase 346: +select distinct sum((fields->>'C 1')::int)/1000 s from ft2 where (fields->>'c2')::int < 6 group by fields->>'c2' order by 1; + s +---- + 49 + 50 +(2 rows) + +-- WindowAgg +--Testcase 347: +explain (verbose, costs off) +select (fields->>'c2')::int c2, sum((fields->>'c2')::int), count((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2) from ft2 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text)))::integer), (sum((((fields ->> 'c2'::text)))::integer)), (count((((fields ->> 'c2'::text)))::integer) OVER (?)), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) + Sort Key: ((((ft2.fields ->> 'c2'::text)))::integer) + -> WindowAgg + Output: (((fields ->> 'c2'::text)))::integer, (sum((((fields ->> 'c2'::text)))::integer)), count((((fields ->> 'c2'::text)))::integer) OVER (?), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) + -> Sort + Output: ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)), fields, (sum((((fields ->> 'c2'::text)))::integer)) + Sort Key: (((((ft2.fields ->> 'c2'::text)))::integer % 2)) + -> HashAggregate + Output: ((fields ->> 'c2'::text)), ((((fields ->> 'c2'::text)))::integer % 2), fields, sum((((fields ->> 'c2'::text)))::integer) + Group Key: (ft2.fields ->> 'c2'::text) + -> Foreign Scan on public.ft2 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 10)) +(14 rows) + +--Testcase 348: +select (fields->>'c2')::int c2, sum((fields->>'c2')::int), count((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2) from ft2 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; + c2 | sum | count +----+-----+------- + 0 | 0 | 5 + 1 | 100 | 5 + 2 | 200 | 5 + 3 | 300 | 5 + 4 | 400 | 5 + 5 | 500 | 5 + 6 | 600 | 5 + 7 | 700 | 5 + 8 | 800 | 5 + 9 | 900 | 5 +(10 rows) + +--Testcase 349: +explain (verbose, costs off) +select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int desc) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text)))::integer), (array_agg(((((fields ->> 'c2'::text)))::integer)) OVER (?)), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) + Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) + -> WindowAgg + Output: ((((fields ->> 'c2'::text)))::integer), array_agg(((((fields ->> 'c2'::text)))::integer)) OVER (?), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) + -> Sort + Output: ((((fields ->> 'c2'::text)))::integer), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)), fields + Sort Key: (((((ft1.fields ->> 'c2'::text)))::integer % 2)), ((((ft1.fields ->> 'c2'::text)))::integer) DESC + -> HashAggregate + Output: (((fields ->> 'c2'::text)))::integer, ((fields ->> 'c2'::text)), ((((fields ->> 'c2'::text)))::integer % 2), fields + Group Key: (ft1.fields ->> 'c2'::text) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 10)) +(14 rows) + +--Testcase 350: +select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int desc) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; + c2 | array_agg +----+------------- + 0 | {8,6,4,2,0} + 1 | {9,7,5,3,1} + 2 | {8,6,4,2} + 3 | {9,7,5,3} + 4 | {8,6,4} + 5 | {9,7,5} + 6 | {8,6} + 7 | {9,7} + 8 | {8} + 9 | {9} +(10 rows) + +--Testcase 351: +explain (verbose, costs off) +select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int range between current row and unbounded following) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Output: ((((fields ->> 'c2'::text)))::integer), (array_agg(((((fields ->> 'c2'::text)))::integer)) OVER (?)), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) + Sort Key: ((((ft1.fields ->> 'c2'::text)))::integer) + -> WindowAgg + Output: ((((fields ->> 'c2'::text)))::integer), array_agg(((((fields ->> 'c2'::text)))::integer)) OVER (?), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)) + -> Sort + Output: ((((fields ->> 'c2'::text)))::integer), ((fields ->> 'c2'::text)), (((((fields ->> 'c2'::text)))::integer % 2)), fields + Sort Key: (((((ft1.fields ->> 'c2'::text)))::integer % 2)), ((((ft1.fields ->> 'c2'::text)))::integer) + -> HashAggregate + Output: (((fields ->> 'c2'::text)))::integer, ((fields ->> 'c2'::text)), ((((fields ->> 'c2'::text)))::integer % 2), fields + Group Key: (ft1.fields ->> 'c2'::text) + -> Foreign Scan on public.ft1 + Output: (fields ->> 'c2'::text), fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c2" < 10)) +(14 rows) + +--Testcase 352: +select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int range between current row and unbounded following) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; + c2 | array_agg +----+------------- + 0 | {0,2,4,6,8} + 1 | {1,3,5,7,9} + 2 | {2,4,6,8} + 3 | {3,5,7,9} + 4 | {4,6,8} + 5 | {5,7,9} + 6 | {6,8} + 7 | {7,9} + 8 | {8} + 9 | {9} +(10 rows) + +-- =================================================================== +-- parameterized queries +-- =================================================================== +-- simple join +--Testcase 353: +PREPARE st1(int, int) AS SELECT t1.tags->>'c3' c3, t2.tags->>'c3' c3 FROM ft1 t1, ft2 t2 WHERE (t1.fields->>'C 1')::int = $1 AND (t2.fields->>'C 1')::int = $2; +--Testcase 354: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st1(1, 2); + QUERY PLAN +---------------------------------------------------------------------- + Nested Loop + Output: (t1.tags ->> 'c3'::text), (t2.tags ->> 'c3'::text) + -> Foreign Scan on public.ft1 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) + -> Materialize + Output: t2.tags + -> Foreign Scan on public.ft2 t2 + Output: t2.tags + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 2)) +(10 rows) + +--Testcase 355: +EXECUTE st1(1, 1); + c3 | c3 +-------+------- + 00001 | 00001 +(1 row) + +--Testcase 356: +EXECUTE st1(101, 101); + c3 | c3 +-------+------- + 00101 | 00101 +(1 row) + +-- subquery using stable function (can't be sent to remote) +--Testcase 357: +PREPARE st2(int) AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int < $2 AND t1.tags->>'c3' IN (SELECT tags->>'c3' FROM ft2 t2 WHERE (fields->>'C 1')::int > $1 AND date(time) = '1970-01-17'::date) ORDER BY (fields->>'C 1')::int; +--Testcase 358: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st2(10, 20); + QUERY PLAN +--------------------------------------------------------------------------------------- + Sort + Output: t1."time", t1.tags, t1.fields, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Hash Semi Join + Output: t1."time", t1.tags, t1.fields, ((t1.fields ->> 'C 1'::text))::integer + Hash Cond: ((t1.tags ->> 'c3'::text) = (t2.tags ->> 'c3'::text)) + -> Foreign Scan on public.ft1 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 20)) + -> Hash + Output: t2.tags + -> Foreign Scan on public.ft2 t2 + Output: t2.tags + Filter: (date(t2."time") = '01-17-1970'::date) + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" > 10)) +(15 rows) + +--Testcase 359: +EXECUTE st2(10, 20); + time | tags | fields +--------------------------+-----------------+---------------------------------------------------------------------- + Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} +(1 row) + +--Testcase 360: +EXECUTE st2(101, 121); + time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------- + Sat Jan 17 00:00:00 1970 | {"c3": "00116"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "116"} +(1 row) + +-- subquery using immutable function (can be sent to remote) +--Testcase 361: +PREPARE st3(int) AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int < $2 AND t1.tags->>'c3' IN (SELECT tags->>'c3' FROM ft2 t2 WHERE (fields->>'C 1')::int > $1 AND date(time) = '1970-01-17'::date) ORDER BY (fields->>'C 1')::int; +--Testcase 362: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st3(10, 20); + QUERY PLAN +--------------------------------------------------------------------------------------- + Sort + Output: t1."time", t1.tags, t1.fields, (((t1.fields ->> 'C 1'::text))::integer) + Sort Key: (((t1.fields ->> 'C 1'::text))::integer) + -> Hash Semi Join + Output: t1."time", t1.tags, t1.fields, ((t1.fields ->> 'C 1'::text))::integer + Hash Cond: ((t1.tags ->> 'c3'::text) = (t2.tags ->> 'c3'::text)) + -> Foreign Scan on public.ft1 t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" < 20)) + -> Hash + Output: t2.tags + -> Foreign Scan on public.ft2 t2 + Output: t2.tags + Filter: (date(t2."time") = '01-17-1970'::date) + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" > 10)) +(15 rows) + +--Testcase 363: +EXECUTE st3(10, 20); + time | tags | fields +--------------------------+-----------------+---------------------------------------------------------------------- + Sat Jan 17 00:00:00 1970 | {"c3": "00016"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "16"} +(1 row) + +--Testcase 364: +EXECUTE st3(20, 30); + time | tags | fields +------+------+-------- +(0 rows) + +-- custom plan should be chosen initially +--Testcase 365: +PREPARE st4(int) AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = $1; +--Testcase 366: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +---------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +--Testcase 367: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +---------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +--Testcase 368: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +---------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +--Testcase 369: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +---------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +--Testcase 370: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +---------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = 1)) +(3 rows) + +-- once we try it enough times, should switch to generic plan +--Testcase 371: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); + QUERY PLAN +----------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = $1)) +(3 rows) + +-- value of $1 should not be sent to remote +--Testcase 372: +PREPARE st5(text,int) AS SELECT * FROM ft1 t1 WHERE fields->>'c8' = $1 and (fields->>'C 1')::int = $2; +--Testcase 373: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) +(3 rows) + +--Testcase 374: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) +(3 rows) + +--Testcase 375: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) +(3 rows) + +--Testcase 376: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) +(3 rows) + +--Testcase 377: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) AND (("C 1" = 1)) +(3 rows) + +--Testcase 378: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); + QUERY PLAN +----------------------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = $1)) AND (("C 1" = $2)) +(3 rows) + +--Testcase 379: +EXECUTE st5('foo', 1); + time | tags | fields +--------------------------+-----------------+--------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} +(1 row) + +-- altering FDW options requires replanning +--Testcase 380: +PREPARE st6 AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (t1.fields->>'c2')::int; +--Testcase 381: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; + QUERY PLAN +------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("C 1" = "c2")) +(3 rows) + +--Testcase 382: +PREPARE st7 AS INSERT INTO ft1_nsc (c1,c2,c3) VALUES (1001,101,'foo'); +--Testcase 383: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Insert on public.ft1_nsc + Batch Size: 1 + -> Result + Output: NULL::integer, 1001, 101, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft1 '::character(10), NULL::text +(4 rows) + +--Testcase 384: +INSERT INTO "S 1".s1t0 SELECT * FROM "S 1".s1t1; +--Testcase 385: +ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T0'); +--Testcase 386: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; + QUERY PLAN +------------------------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T0" WHERE (("C 1" = "c2")) +(3 rows) + +--Testcase 387: +EXECUTE st6; + time | tags | fields +--------------------------+-----------------+--------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} + Sat Jan 03 00:00:00 1970 | {"c3": "00002"} | {"c2": "2", "c6": "2", "c7": "2 ", "c8": "foo", "C 1": "2"} + Sun Jan 04 00:00:00 1970 | {"c3": "00003"} | {"c2": "3", "c6": "3", "c7": "3 ", "c8": "foo", "C 1": "3"} + Mon Jan 05 00:00:00 1970 | {"c3": "00004"} | {"c2": "4", "c6": "4", "c7": "4 ", "c8": "foo", "C 1": "4"} + Tue Jan 06 00:00:00 1970 | {"c3": "00005"} | {"c2": "5", "c6": "5", "c7": "5 ", "c8": "foo", "C 1": "5"} + Wed Jan 07 00:00:00 1970 | {"c3": "00006"} | {"c2": "6", "c6": "6", "c7": "6 ", "c8": "foo", "C 1": "6"} + Thu Jan 08 00:00:00 1970 | {"c3": "00007"} | {"c2": "7", "c6": "7", "c7": "7 ", "c8": "foo", "C 1": "7"} + Fri Jan 09 00:00:00 1970 | {"c3": "00008"} | {"c2": "8", "c6": "8", "c7": "8 ", "c8": "foo", "C 1": "8"} + Sat Jan 10 00:00:00 1970 | {"c3": "00009"} | {"c2": "9", "c6": "9", "c7": "9 ", "c8": "foo", "C 1": "9"} +(9 rows) + +--Testcase 388: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Insert on public.ft1_nsc + Batch Size: 1 + -> Result + Output: NULL::integer, 1001, 101, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft1 '::character(10), NULL::text +(4 rows) + +--Testcase 389: +DELETE FROM "S 1".s1t0; +--Testcase 390: +ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T1'); +--Testcase 391: +PREPARE st8 AS SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; +--Testcase 392: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Aggregate + Output: count((tags ->> 'c3'::text)) + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +-- Skip, influxdb_fdw does not support extensions +-- ALTER SERVER loopback OPTIONS (DROP extensions); +--Testcase 393: +EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Aggregate + Output: count((tags ->> 'c3'::text)) + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (((t1.fields ->> 'C 1'::text))::integer === ((t1.fields ->> 'c2'::text))::integer) + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +--Testcase 394: +EXECUTE st8; + count +------- + 9 +(1 row) + +-- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); +-- cleanup +DEALLOCATE st1; +DEALLOCATE st2; +DEALLOCATE st3; +DEALLOCATE st4; +DEALLOCATE st5; +DEALLOCATE st6; +DEALLOCATE st7; +DEALLOCATE st8; +-- System columns, except ctid and oid, should not be sent to remote +--Testcase 395: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 t1 WHERE t1.tableoid = 'pg_class'::regclass LIMIT 1; + QUERY PLAN +--------------------------------------------- + Limit + Output: "time", tags, fields + -> Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (t1.tableoid = '1259'::oid) + InfluxDB query: SELECT * FROM "T1" +(6 rows) + +--Testcase 396: +SELECT * FROM ft1 t1 WHERE t1.tableoid = 'ft1'::regclass ORDER BY (fields->>'C 1')::int LIMIT 1; + time | tags | fields +--------------------------+-----------------+--------------------------------------------------------------------- + Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} +(1 row) + +--Testcase 397: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT tableoid::regclass, * FROM ft1 t1 LIMIT 1; + QUERY PLAN +------------------------------------------------------ + Foreign Scan on public.ft1 t1 + Output: (tableoid)::regclass, "time", tags, fields + InfluxDB query: SELECT * FROM "T1" LIMIT 1 +(3 rows) + +--Testcase 398: +SELECT tableoid::regclass, * FROM ft1 t1 ORDER BY (fields->>'C 1')::int LIMIT 1; + tableoid | time | tags | fields +----------+--------------------------+-----------------+--------------------------------------------------------------------- + ft1 | Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} +(1 row) + +--Testcase 399: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; + QUERY PLAN +-------------------------------------- + Foreign Scan on public.ft1 t1 + Output: "time", tags, fields + Filter: (t1.ctid = '(0,2)'::tid) + InfluxDB query: SELECT * FROM "T1" +(4 rows) + +--Testcase 400: +SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; + time | tags | fields +------+------+-------- +(0 rows) + +--Testcase 401: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ctid, * FROM ft1 t1 LIMIT 1; + QUERY PLAN +---------------------------------------------- + Foreign Scan on public.ft1 t1 + Output: ctid, "time", tags, fields + InfluxDB query: SELECT * FROM "T1" LIMIT 1 +(3 rows) + +--Testcase 402: +SELECT ctid, * FROM ft1 t1 ORDER BY (fields->>'C 1')::int LIMIT 1; + ctid | time | tags | fields +----------------+--------------------------+-----------------+--------------------------------------------------------------------- + (4294967295,0) | Fri Jan 02 00:00:00 1970 | {"c3": "00001"} | {"c2": "1", "c6": "1", "c7": "1 ", "c8": "foo", "C 1": "1"} +(1 row) + +-- =================================================================== +-- used in PL/pgSQL function +-- =================================================================== +--Testcase 403: +CREATE OR REPLACE FUNCTION f_test(p_c1 int) RETURNS int AS $$ +DECLARE + v_c1 int; +BEGIN +--Testcase 404: + SELECT fields->>'C 1' INTO v_c1 FROM ft1 WHERE (fields->>'C 1')::int = p_c1 LIMIT 1; + PERFORM fields->>'C 1' FROM ft1 WHERE (fields->>'C 1')::int = p_c1 AND p_c1 = v_c1 LIMIT 1; + RETURN v_c1; +END; +$$ LANGUAGE plpgsql; +--Testcase 405: +SELECT f_test(100); + f_test +-------- + 100 +(1 row) + +--Testcase 406: +DROP FUNCTION f_test(int); +-- =================================================================== +-- REINDEX +-- =================================================================== +-- remote table is not created here +--Testcase 407: +CREATE FOREIGN TABLE reindex_foreign (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr2 OPTIONS (table 'reindex_local', schemaless 'true'); +REINDEX TABLE reindex_foreign; -- error +ERROR: "reindex_foreign" is not a table or materialized view +REINDEX TABLE CONCURRENTLY reindex_foreign; -- error +ERROR: "reindex_foreign" is not a table or materialized view +--Testcase 408: +DROP FOREIGN TABLE reindex_foreign; +-- partitions and foreign tables +--Testcase 409: +CREATE TABLE reind_fdw_parent (c1 int) PARTITION BY RANGE (c1); +--Testcase 410: +CREATE TABLE reind_fdw_0_10 PARTITION OF reind_fdw_parent + FOR VALUES FROM (0) TO (10); +--Testcase 411: +CREATE FOREIGN TABLE reind_fdw_10_20 PARTITION OF reind_fdw_parent + FOR VALUES FROM (10) TO (20) + SERVER influxdb_svr OPTIONS (table 'reind_local_10_20'); +REINDEX TABLE reind_fdw_parent; -- ok +REINDEX TABLE CONCURRENTLY reind_fdw_parent; -- ok +--Testcase 412: +DROP TABLE reind_fdw_parent; +-- =================================================================== +-- conversion error +-- =================================================================== +--Testcase 413: +--ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE int; +--Testcase 414: +--SELECT * FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8) WHERE x1 = 1; -- ERROR +--Testcase 415: +--SELECT ftx.x1, ft2.c2, ftx.x8 FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8), ft2 +-- WHERE ftx.x1 = (ft2.fields->>'C 1')::int AND ftx.x1 = 1; -- ERROR +--Testcase 416: +--SELECT ftx.x1, ft2.c2, ftx FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8), ft2 +-- WHERE ftx.x1 = (ft2.fields->>'C 1')::int AND ftx.x1 = 1; -- ERROR +--Testcase 417: +--SELECT sum(c2), array_agg(c8) FROM ft1 GROUP BY c8; -- ERROR +-- ANALYZE ft1; -- ERROR +--ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE user_enum; +-- =================================================================== +-- local type can be different from remote type in some cases, +-- in particular if similarly-named operators do equivalent things +-- =================================================================== +--Testcase 768: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE (fields->>'c8')::text = 'foo' LIMIT 1; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (("c8" = 'foo')) LIMIT 1 +(3 rows) + +--Testcase 769: +SELECT * FROM ft1 WHERE (fields->>'c8')::text = 'foo' LIMIT 1; + time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------- + Thu Jan 01 00:00:00 1970 | {"c3": "00100"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "100"} +(1 row) + +--Testcase 770: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE 'foo' = (fields->>'c8')::text LIMIT 1; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.ft1 + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "T1" WHERE (('foo' = "c8")) LIMIT 1 +(3 rows) + +--Testcase 771: +SELECT * FROM ft1 WHERE 'foo' = (fields->>'c8')::text LIMIT 1; + time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------- + Thu Jan 01 00:00:00 1970 | {"c3": "00100"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "100"} +(1 row) + +-- we declared c8 to be text locally, but it's still the same type on +-- the remote which will balk if we try to do anything incompatible +-- with that remote type +-- Can not create user define type in InfluxDB. +-- Type c8 of foreign table ft1 and remote table T1 are +-- match. These case below not error with influxdb_fdw. +--Testcase 772: +SELECT * FROM ft1 WHERE (fields->>'c8')::text LIKE 'foo' LIMIT 1; -- ERROR + time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------- + Thu Jan 01 00:00:00 1970 | {"c3": "00100"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "100"} +(1 row) + +--Testcase 773: +SELECT * FROM ft1 WHERE ((fields->>'c8')::text)::text LIKE 'foo' LIMIT 1; -- ERROR; cast not pushed down + time | tags | fields +--------------------------+-----------------+----------------------------------------------------------------------- + Thu Jan 01 00:00:00 1970 | {"c3": "00100"} | {"c2": "0", "c6": "0", "c7": "0 ", "c8": "foo", "C 1": "100"} +(1 row) + +/* +-- influxdb_fdw does not support transactions +-- =================================================================== +-- subtransaction +-- + local/remote error doesn't break cursor +-- =================================================================== +BEGIN; +DECLARE c CURSOR FOR SELECT * FROM ft1 ORDER BY c1; +FETCH c; +SAVEPOINT s; +ERROR OUT; -- ERROR +ROLLBACK TO s; +FETCH c; +SAVEPOINT s; +SELECT * FROM ft1 WHERE 1 / (c1 - 1) > 0; -- ERROR +ROLLBACK TO s; +FETCH c; +SELECT * FROM ft1 ORDER BY c1 LIMIT 1; +COMMIT; +*/ +-- =================================================================== +-- test handling of collations +-- =================================================================== +--Testcase 419: +create foreign table loct3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct3', schemaless 'true'); +--Testcase 420: +create foreign table ft3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct3', schemaless 'true'); +-- can be sent to remote +--Testcase 421: +explain (verbose, costs off) select * from ft3 where fields->>'f1' = 'foo'; + QUERY PLAN +---------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: fields + InfluxDB query: SELECT * FROM "loct3" WHERE (("f1" = 'foo')) +(3 rows) + +--Testcase 422: +explain (verbose, costs off) select * from ft3 where fields->>'f1' COLLATE "C" = 'foo'; + QUERY PLAN +---------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: fields + InfluxDB query: SELECT * FROM "loct3" WHERE (("f1" = 'foo')) +(3 rows) + +--Testcase 423: +explain (verbose, costs off) select * from ft3 where fields->>'f2' = 'foo'; + QUERY PLAN +---------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: fields + InfluxDB query: SELECT * FROM "loct3" WHERE (("f2" = 'foo')) +(3 rows) + +--Testcase 424: +explain (verbose, costs off) select * from ft3 where fields->>'f3' = 'foo'; + QUERY PLAN +---------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: fields + InfluxDB query: SELECT * FROM "loct3" WHERE (("f3" = 'foo')) +(3 rows) + +--Testcase 425: +explain (verbose, costs off) select * from ft3 f, loct3 l + where f.fields->>'f3' = l.fields->>'f3' and l.fields->>'f1' = 'foo'; + QUERY PLAN +---------------------------------------------------------------------------- + Hash Join + Output: f.fields, l.fields + Hash Cond: ((f.fields ->> 'f3'::text) = (l.fields ->> 'f3'::text)) + -> Foreign Scan on public.ft3 f + Output: f.fields + InfluxDB query: SELECT * FROM "loct3" + -> Hash + Output: l.fields + -> Foreign Scan on public.loct3 l + Output: l.fields + InfluxDB query: SELECT * FROM "loct3" WHERE (("f1" = 'foo')) +(11 rows) + +-- can't be sent to remote +--Testcase 426: +explain (verbose, costs off) select * from ft3 where fields->>'f1' COLLATE "POSIX" = 'foo'; + QUERY PLAN +---------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: fields + InfluxDB query: SELECT * FROM "loct3" WHERE (("f1" = 'foo')) +(3 rows) + +--Testcase 427: +explain (verbose, costs off) select * from ft3 where fields->>'f1' = 'foo' COLLATE "C"; + QUERY PLAN +------------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: fields + Filter: ((ft3.fields ->> 'f1'::text) = 'foo'::text COLLATE "C") + InfluxDB query: SELECT * FROM "loct3" +(4 rows) + +--Testcase 428: +explain (verbose, costs off) select * from ft3 where fields->>'f2' COLLATE "C" = 'foo'; + QUERY PLAN +---------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: fields + InfluxDB query: SELECT * FROM "loct3" WHERE (("f2" = 'foo')) +(3 rows) + +--Testcase 429: +explain (verbose, costs off) select * from ft3 where fields->>'f2' = 'foo' COLLATE "C"; + QUERY PLAN +------------------------------------------------------------------- + Foreign Scan on public.ft3 + Output: fields + Filter: ((ft3.fields ->> 'f2'::text) = 'foo'::text COLLATE "C") + InfluxDB query: SELECT * FROM "loct3" +(4 rows) + +--Testcase 430: +explain (verbose, costs off) select * from ft3 f, loct3 l + where f.fields->>'f3' = l.fields->>'f3' COLLATE "POSIX" and l.fields->>'f1' = 'foo'; + QUERY PLAN +---------------------------------------------------------------------------------------------- + Hash Join + Output: f.fields, l.fields + Hash Cond: (((f.fields ->> 'f3'::text))::text = (l.fields ->> 'f3'::text COLLATE "POSIX")) + -> Foreign Scan on public.ft3 f + Output: f.fields + InfluxDB query: SELECT * FROM "loct3" + -> Hash + Output: l.fields + -> Foreign Scan on public.loct3 l + Output: l.fields + InfluxDB query: SELECT * FROM "loct3" WHERE (("f1" = 'foo')) +(11 rows) + +-- influxdb_fdw does not support UPDATE +-- =================================================================== +-- test writable foreign table stuff +-- =================================================================== +--Testcase 431: +EXPLAIN (verbose, costs off) +INSERT INTO ft2_nsc (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2_nsc ORDER BY c1 LIMIT 20; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Insert on public.ft2_nsc + Batch Size: 1 + -> Subquery Scan on "*SELECT*" + Output: "*SELECT*"."?column?", "*SELECT*"."?column?_1", NULL::integer, "*SELECT*"."?column?_2", NULL::timestamp without time zone, NULL::character varying, 'ft2 '::character(10), NULL::text + -> Limit + Output: ((ft2_nsc_1.c1 + 1000)), ((ft2_nsc_1.c2 + 100)), ((ft2_nsc_1.c3 || ft2_nsc_1.c3)), ft2_nsc_1.c1 + -> Sort + Output: ((ft2_nsc_1.c1 + 1000)), ((ft2_nsc_1.c2 + 100)), ((ft2_nsc_1.c3 || ft2_nsc_1.c3)), ft2_nsc_1.c1 + Sort Key: ft2_nsc_1.c1 + -> Foreign Scan on public.ft2_nsc ft2_nsc_1 + Output: (ft2_nsc_1.c1 + 1000), (ft2_nsc_1.c2 + 100), (ft2_nsc_1.c3 || ft2_nsc_1.c3), ft2_nsc_1.c1 + InfluxDB query: SELECT "C 1", "c2", "c3" FROM "T1" +(12 rows) + +--Testcase 432: +INSERT INTO ft2_nsc (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2_nsc ORDER BY c1 LIMIT 20; +--Testcase 433: +INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1101,201,'aaa'), (1102,202,'bbb'), (1103,203,'ccc'); +--Testcase 434: +SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 WHERE (fields->>'c2')::int > 200; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+-----+----+------------+---- + 1101 | 201 | aaa | | ft2 | + 1102 | 202 | bbb | | ft2 | + 1103 | 203 | ccc | | ft2 | +(3 rows) + +--Testcase 435: +INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1104,204,'ddd'), (1105,205,'eee'); +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c2 = c2 + 300, c3 = c3 || '_update3' WHERE c1 % 10 = 3; -- can be pushed down +--UPDATE ft2 SET c2 = c2 + 300, c3 = c3 || '_update3' WHERE c1 % 10 = 3; +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c2 = c2 + 400, c3 = c3 || '_update7' WHERE c1 % 10 = 7 RETURNING *; -- can be pushed down +--UPDATE ft2 SET c2 = c2 + 400, c3 = c3 || '_update7' WHERE c1 % 10 = 7 RETURNING *; +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c2 = ft2.c2 + 500, c3 = ft2.c3 || '_update9', c7 = DEFAULT +-- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; -- can be pushed down +--UPDATE ft2 SET c2 = ft2.c2 + 500, c3 = ft2.c3 || '_update9', c7 = DEFAULT +-- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; +--Testcase 436: +EXPLAIN (verbose, costs off) + DELETE FROM ft2_nsc WHERE c1 % 10 = 5; -- can be pushed down + QUERY PLAN +--------------------------------------------------------------------------------- + Delete on public.ft2_nsc + -> Foreign Scan on public.ft2_nsc + Output: c3, "time" + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE ((("C 1" % 10) = 5)) +(4 rows) + +--Testcase 437: +SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int % 10 = 5 ORDER BY (fields->>'C 1')::int; + c1 +------ + 5 + 15 + 25 + 35 + 45 + 55 + 65 + 75 + 85 + 95 + 105 + 115 + 125 + 135 + 145 + 155 + 165 + 175 + 185 + 195 + 205 + 215 + 225 + 235 + 245 + 255 + 265 + 275 + 285 + 295 + 305 + 315 + 325 + 335 + 345 + 355 + 365 + 375 + 385 + 395 + 405 + 415 + 425 + 435 + 445 + 455 + 465 + 475 + 485 + 495 + 505 + 515 + 525 + 535 + 545 + 555 + 565 + 575 + 585 + 595 + 605 + 615 + 625 + 635 + 645 + 655 + 665 + 675 + 685 + 695 + 705 + 715 + 725 + 735 + 745 + 755 + 765 + 775 + 785 + 795 + 805 + 815 + 825 + 835 + 845 + 855 + 865 + 875 + 885 + 895 + 905 + 915 + 925 + 935 + 945 + 955 + 965 + 975 + 985 + 995 + 1005 + 1015 + 1105 +(103 rows) + +--Testcase 438: +DELETE FROM ft2_nsc WHERE c1 % 10 = 5; +--Testcase 439: +SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int % 10 = 5; + c1 +---- +(0 rows) + +--Testcase 440: +EXPLAIN (verbose, costs off) +DELETE FROM ft2_nsc USING ft1_nsc WHERE ft1_nsc.c1 = ft2_nsc.c2 AND ft1_nsc.c1 % 10 = 2; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------- + Delete on public.ft2_nsc + -> Hash Join + Output: ft2_nsc.c3, ft2_nsc."time", ft1_nsc.* + Hash Cond: (ft2_nsc.c2 = ft1_nsc.c1) + -> Foreign Scan on public.ft2_nsc + Output: ft2_nsc.c3, ft2_nsc."time", ft2_nsc.c2 + InfluxDB query: SELECT "c2", "c3" FROM "T1" + -> Hash + Output: ft1_nsc.*, ft1_nsc.c1 + -> Foreign Scan on public.ft1_nsc + Output: ft1_nsc.*, ft1_nsc.c1 + InfluxDB query: SELECT "C 1", "c2", "c3", "c6", "c7", "c8" FROM "T1" WHERE ((("C 1" % 10) = 2)) +(12 rows) + +--Testcase 441: +DELETE FROM ft2_nsc USING ft1_nsc WHERE ft1_nsc.c1 = ft2_nsc.c2 AND ft1_nsc.c1 % 10 = 2; +--Testcase 442: +SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft2 ORDER BY (fields->>'C 1')::int; + c1 | c2 | c3 +------+-----+------------ + 1 | 1 | 00001 + 3 | 3 | 00003 + 4 | 4 | 00004 + 6 | 6 | 00006 + 7 | 7 | 00007 + 8 | 8 | 00008 + 9 | 9 | 00009 + 10 | 0 | 00010 + 11 | 1 | 00011 + 13 | 3 | 00013 + 14 | 4 | 00014 + 16 | 6 | 00016 + 17 | 7 | 00017 + 18 | 8 | 00018 + 19 | 9 | 00019 + 20 | 0 | 00020 + 21 | 1 | 00021 + 23 | 3 | 00023 + 24 | 4 | 00024 + 26 | 6 | 00026 + 27 | 7 | 00027 + 28 | 8 | 00028 + 29 | 9 | 00029 + 30 | 0 | 00030 + 31 | 1 | 00031 + 33 | 3 | 00033 + 34 | 4 | 00034 + 36 | 6 | 00036 + 37 | 7 | 00037 + 38 | 8 | 00038 + 39 | 9 | 00039 + 40 | 0 | 00040 + 41 | 1 | 00041 + 43 | 3 | 00043 + 44 | 4 | 00044 + 46 | 6 | 00046 + 47 | 7 | 00047 + 48 | 8 | 00048 + 49 | 9 | 00049 + 50 | 0 | 00050 + 51 | 1 | 00051 + 53 | 3 | 00053 + 54 | 4 | 00054 + 56 | 6 | 00056 + 57 | 7 | 00057 + 58 | 8 | 00058 + 59 | 9 | 00059 + 60 | 0 | 00060 + 61 | 1 | 00061 + 63 | 3 | 00063 + 64 | 4 | 00064 + 66 | 6 | 00066 + 67 | 7 | 00067 + 68 | 8 | 00068 + 69 | 9 | 00069 + 70 | 0 | 00070 + 71 | 1 | 00071 + 73 | 3 | 00073 + 74 | 4 | 00074 + 76 | 6 | 00076 + 77 | 7 | 00077 + 78 | 8 | 00078 + 79 | 9 | 00079 + 80 | 0 | 00080 + 81 | 1 | 00081 + 83 | 3 | 00083 + 84 | 4 | 00084 + 86 | 6 | 00086 + 87 | 7 | 00087 + 88 | 8 | 00088 + 89 | 9 | 00089 + 90 | 0 | 00090 + 91 | 1 | 00091 + 93 | 3 | 00093 + 94 | 4 | 00094 + 96 | 6 | 00096 + 97 | 7 | 00097 + 98 | 8 | 00098 + 99 | 9 | 00099 + 100 | 0 | 00100 + 101 | 1 | 00101 + 103 | 3 | 00103 + 104 | 4 | 00104 + 106 | 6 | 00106 + 107 | 7 | 00107 + 108 | 8 | 00108 + 109 | 9 | 00109 + 110 | 0 | 00110 + 111 | 1 | 00111 + 113 | 3 | 00113 + 114 | 4 | 00114 + 116 | 6 | 00116 + 117 | 7 | 00117 + 118 | 8 | 00118 + 119 | 9 | 00119 + 120 | 0 | 00120 + 121 | 1 | 00121 + 123 | 3 | 00123 + 124 | 4 | 00124 + 126 | 6 | 00126 + 127 | 7 | 00127 + 128 | 8 | 00128 + 129 | 9 | 00129 + 130 | 0 | 00130 + 131 | 1 | 00131 + 133 | 3 | 00133 + 134 | 4 | 00134 + 136 | 6 | 00136 + 137 | 7 | 00137 + 138 | 8 | 00138 + 139 | 9 | 00139 + 140 | 0 | 00140 + 141 | 1 | 00141 + 143 | 3 | 00143 + 144 | 4 | 00144 + 146 | 6 | 00146 + 147 | 7 | 00147 + 148 | 8 | 00148 + 149 | 9 | 00149 + 150 | 0 | 00150 + 151 | 1 | 00151 + 153 | 3 | 00153 + 154 | 4 | 00154 + 156 | 6 | 00156 + 157 | 7 | 00157 + 158 | 8 | 00158 + 159 | 9 | 00159 + 160 | 0 | 00160 + 161 | 1 | 00161 + 163 | 3 | 00163 + 164 | 4 | 00164 + 166 | 6 | 00166 + 167 | 7 | 00167 + 168 | 8 | 00168 + 169 | 9 | 00169 + 170 | 0 | 00170 + 171 | 1 | 00171 + 173 | 3 | 00173 + 174 | 4 | 00174 + 176 | 6 | 00176 + 177 | 7 | 00177 + 178 | 8 | 00178 + 179 | 9 | 00179 + 180 | 0 | 00180 + 181 | 1 | 00181 + 183 | 3 | 00183 + 184 | 4 | 00184 + 186 | 6 | 00186 + 187 | 7 | 00187 + 188 | 8 | 00188 + 189 | 9 | 00189 + 190 | 0 | 00190 + 191 | 1 | 00191 + 193 | 3 | 00193 + 194 | 4 | 00194 + 196 | 6 | 00196 + 197 | 7 | 00197 + 198 | 8 | 00198 + 199 | 9 | 00199 + 200 | 0 | 00200 + 201 | 1 | 00201 + 203 | 3 | 00203 + 204 | 4 | 00204 + 206 | 6 | 00206 + 207 | 7 | 00207 + 208 | 8 | 00208 + 209 | 9 | 00209 + 210 | 0 | 00210 + 211 | 1 | 00211 + 213 | 3 | 00213 + 214 | 4 | 00214 + 216 | 6 | 00216 + 217 | 7 | 00217 + 218 | 8 | 00218 + 219 | 9 | 00219 + 220 | 0 | 00220 + 221 | 1 | 00221 + 223 | 3 | 00223 + 224 | 4 | 00224 + 226 | 6 | 00226 + 227 | 7 | 00227 + 228 | 8 | 00228 + 229 | 9 | 00229 + 230 | 0 | 00230 + 231 | 1 | 00231 + 233 | 3 | 00233 + 234 | 4 | 00234 + 236 | 6 | 00236 + 237 | 7 | 00237 + 238 | 8 | 00238 + 239 | 9 | 00239 + 240 | 0 | 00240 + 241 | 1 | 00241 + 243 | 3 | 00243 + 244 | 4 | 00244 + 246 | 6 | 00246 + 247 | 7 | 00247 + 248 | 8 | 00248 + 249 | 9 | 00249 + 250 | 0 | 00250 + 251 | 1 | 00251 + 253 | 3 | 00253 + 254 | 4 | 00254 + 256 | 6 | 00256 + 257 | 7 | 00257 + 258 | 8 | 00258 + 259 | 9 | 00259 + 260 | 0 | 00260 + 261 | 1 | 00261 + 263 | 3 | 00263 + 264 | 4 | 00264 + 266 | 6 | 00266 + 267 | 7 | 00267 + 268 | 8 | 00268 + 269 | 9 | 00269 + 270 | 0 | 00270 + 271 | 1 | 00271 + 273 | 3 | 00273 + 274 | 4 | 00274 + 276 | 6 | 00276 + 277 | 7 | 00277 + 278 | 8 | 00278 + 279 | 9 | 00279 + 280 | 0 | 00280 + 281 | 1 | 00281 + 283 | 3 | 00283 + 284 | 4 | 00284 + 286 | 6 | 00286 + 287 | 7 | 00287 + 288 | 8 | 00288 + 289 | 9 | 00289 + 290 | 0 | 00290 + 291 | 1 | 00291 + 293 | 3 | 00293 + 294 | 4 | 00294 + 296 | 6 | 00296 + 297 | 7 | 00297 + 298 | 8 | 00298 + 299 | 9 | 00299 + 300 | 0 | 00300 + 301 | 1 | 00301 + 303 | 3 | 00303 + 304 | 4 | 00304 + 306 | 6 | 00306 + 307 | 7 | 00307 + 308 | 8 | 00308 + 309 | 9 | 00309 + 310 | 0 | 00310 + 311 | 1 | 00311 + 313 | 3 | 00313 + 314 | 4 | 00314 + 316 | 6 | 00316 + 317 | 7 | 00317 + 318 | 8 | 00318 + 319 | 9 | 00319 + 320 | 0 | 00320 + 321 | 1 | 00321 + 323 | 3 | 00323 + 324 | 4 | 00324 + 326 | 6 | 00326 + 327 | 7 | 00327 + 328 | 8 | 00328 + 329 | 9 | 00329 + 330 | 0 | 00330 + 331 | 1 | 00331 + 333 | 3 | 00333 + 334 | 4 | 00334 + 336 | 6 | 00336 + 337 | 7 | 00337 + 338 | 8 | 00338 + 339 | 9 | 00339 + 340 | 0 | 00340 + 341 | 1 | 00341 + 343 | 3 | 00343 + 344 | 4 | 00344 + 346 | 6 | 00346 + 347 | 7 | 00347 + 348 | 8 | 00348 + 349 | 9 | 00349 + 350 | 0 | 00350 + 351 | 1 | 00351 + 353 | 3 | 00353 + 354 | 4 | 00354 + 356 | 6 | 00356 + 357 | 7 | 00357 + 358 | 8 | 00358 + 359 | 9 | 00359 + 360 | 0 | 00360 + 361 | 1 | 00361 + 363 | 3 | 00363 + 364 | 4 | 00364 + 366 | 6 | 00366 + 367 | 7 | 00367 + 368 | 8 | 00368 + 369 | 9 | 00369 + 370 | 0 | 00370 + 371 | 1 | 00371 + 373 | 3 | 00373 + 374 | 4 | 00374 + 376 | 6 | 00376 + 377 | 7 | 00377 + 378 | 8 | 00378 + 379 | 9 | 00379 + 380 | 0 | 00380 + 381 | 1 | 00381 + 383 | 3 | 00383 + 384 | 4 | 00384 + 386 | 6 | 00386 + 387 | 7 | 00387 + 388 | 8 | 00388 + 389 | 9 | 00389 + 390 | 0 | 00390 + 391 | 1 | 00391 + 393 | 3 | 00393 + 394 | 4 | 00394 + 396 | 6 | 00396 + 397 | 7 | 00397 + 398 | 8 | 00398 + 399 | 9 | 00399 + 400 | 0 | 00400 + 401 | 1 | 00401 + 403 | 3 | 00403 + 404 | 4 | 00404 + 406 | 6 | 00406 + 407 | 7 | 00407 + 408 | 8 | 00408 + 409 | 9 | 00409 + 410 | 0 | 00410 + 411 | 1 | 00411 + 413 | 3 | 00413 + 414 | 4 | 00414 + 416 | 6 | 00416 + 417 | 7 | 00417 + 418 | 8 | 00418 + 419 | 9 | 00419 + 420 | 0 | 00420 + 421 | 1 | 00421 + 423 | 3 | 00423 + 424 | 4 | 00424 + 426 | 6 | 00426 + 427 | 7 | 00427 + 428 | 8 | 00428 + 429 | 9 | 00429 + 430 | 0 | 00430 + 431 | 1 | 00431 + 433 | 3 | 00433 + 434 | 4 | 00434 + 436 | 6 | 00436 + 437 | 7 | 00437 + 438 | 8 | 00438 + 439 | 9 | 00439 + 440 | 0 | 00440 + 441 | 1 | 00441 + 443 | 3 | 00443 + 444 | 4 | 00444 + 446 | 6 | 00446 + 447 | 7 | 00447 + 448 | 8 | 00448 + 449 | 9 | 00449 + 450 | 0 | 00450 + 451 | 1 | 00451 + 453 | 3 | 00453 + 454 | 4 | 00454 + 456 | 6 | 00456 + 457 | 7 | 00457 + 458 | 8 | 00458 + 459 | 9 | 00459 + 460 | 0 | 00460 + 461 | 1 | 00461 + 463 | 3 | 00463 + 464 | 4 | 00464 + 466 | 6 | 00466 + 467 | 7 | 00467 + 468 | 8 | 00468 + 469 | 9 | 00469 + 470 | 0 | 00470 + 471 | 1 | 00471 + 473 | 3 | 00473 + 474 | 4 | 00474 + 476 | 6 | 00476 + 477 | 7 | 00477 + 478 | 8 | 00478 + 479 | 9 | 00479 + 480 | 0 | 00480 + 481 | 1 | 00481 + 483 | 3 | 00483 + 484 | 4 | 00484 + 486 | 6 | 00486 + 487 | 7 | 00487 + 488 | 8 | 00488 + 489 | 9 | 00489 + 490 | 0 | 00490 + 491 | 1 | 00491 + 493 | 3 | 00493 + 494 | 4 | 00494 + 496 | 6 | 00496 + 497 | 7 | 00497 + 498 | 8 | 00498 + 499 | 9 | 00499 + 500 | 0 | 00500 + 501 | 1 | 00501 + 503 | 3 | 00503 + 504 | 4 | 00504 + 506 | 6 | 00506 + 507 | 7 | 00507 + 508 | 8 | 00508 + 509 | 9 | 00509 + 510 | 0 | 00510 + 511 | 1 | 00511 + 513 | 3 | 00513 + 514 | 4 | 00514 + 516 | 6 | 00516 + 517 | 7 | 00517 + 518 | 8 | 00518 + 519 | 9 | 00519 + 520 | 0 | 00520 + 521 | 1 | 00521 + 523 | 3 | 00523 + 524 | 4 | 00524 + 526 | 6 | 00526 + 527 | 7 | 00527 + 528 | 8 | 00528 + 529 | 9 | 00529 + 530 | 0 | 00530 + 531 | 1 | 00531 + 533 | 3 | 00533 + 534 | 4 | 00534 + 536 | 6 | 00536 + 537 | 7 | 00537 + 538 | 8 | 00538 + 539 | 9 | 00539 + 540 | 0 | 00540 + 541 | 1 | 00541 + 543 | 3 | 00543 + 544 | 4 | 00544 + 546 | 6 | 00546 + 547 | 7 | 00547 + 548 | 8 | 00548 + 549 | 9 | 00549 + 550 | 0 | 00550 + 551 | 1 | 00551 + 553 | 3 | 00553 + 554 | 4 | 00554 + 556 | 6 | 00556 + 557 | 7 | 00557 + 558 | 8 | 00558 + 559 | 9 | 00559 + 560 | 0 | 00560 + 561 | 1 | 00561 + 563 | 3 | 00563 + 564 | 4 | 00564 + 566 | 6 | 00566 + 567 | 7 | 00567 + 568 | 8 | 00568 + 569 | 9 | 00569 + 570 | 0 | 00570 + 571 | 1 | 00571 + 573 | 3 | 00573 + 574 | 4 | 00574 + 576 | 6 | 00576 + 577 | 7 | 00577 + 578 | 8 | 00578 + 579 | 9 | 00579 + 580 | 0 | 00580 + 581 | 1 | 00581 + 583 | 3 | 00583 + 584 | 4 | 00584 + 586 | 6 | 00586 + 587 | 7 | 00587 + 588 | 8 | 00588 + 589 | 9 | 00589 + 590 | 0 | 00590 + 591 | 1 | 00591 + 593 | 3 | 00593 + 594 | 4 | 00594 + 596 | 6 | 00596 + 597 | 7 | 00597 + 598 | 8 | 00598 + 599 | 9 | 00599 + 600 | 0 | 00600 + 601 | 1 | 00601 + 603 | 3 | 00603 + 604 | 4 | 00604 + 606 | 6 | 00606 + 607 | 7 | 00607 + 608 | 8 | 00608 + 609 | 9 | 00609 + 610 | 0 | 00610 + 611 | 1 | 00611 + 613 | 3 | 00613 + 614 | 4 | 00614 + 616 | 6 | 00616 + 617 | 7 | 00617 + 618 | 8 | 00618 + 619 | 9 | 00619 + 620 | 0 | 00620 + 621 | 1 | 00621 + 623 | 3 | 00623 + 624 | 4 | 00624 + 626 | 6 | 00626 + 627 | 7 | 00627 + 628 | 8 | 00628 + 629 | 9 | 00629 + 630 | 0 | 00630 + 631 | 1 | 00631 + 633 | 3 | 00633 + 634 | 4 | 00634 + 636 | 6 | 00636 + 637 | 7 | 00637 + 638 | 8 | 00638 + 639 | 9 | 00639 + 640 | 0 | 00640 + 641 | 1 | 00641 + 643 | 3 | 00643 + 644 | 4 | 00644 + 646 | 6 | 00646 + 647 | 7 | 00647 + 648 | 8 | 00648 + 649 | 9 | 00649 + 650 | 0 | 00650 + 651 | 1 | 00651 + 653 | 3 | 00653 + 654 | 4 | 00654 + 656 | 6 | 00656 + 657 | 7 | 00657 + 658 | 8 | 00658 + 659 | 9 | 00659 + 660 | 0 | 00660 + 661 | 1 | 00661 + 663 | 3 | 00663 + 664 | 4 | 00664 + 666 | 6 | 00666 + 667 | 7 | 00667 + 668 | 8 | 00668 + 669 | 9 | 00669 + 670 | 0 | 00670 + 671 | 1 | 00671 + 673 | 3 | 00673 + 674 | 4 | 00674 + 676 | 6 | 00676 + 677 | 7 | 00677 + 678 | 8 | 00678 + 679 | 9 | 00679 + 680 | 0 | 00680 + 681 | 1 | 00681 + 683 | 3 | 00683 + 684 | 4 | 00684 + 686 | 6 | 00686 + 687 | 7 | 00687 + 688 | 8 | 00688 + 689 | 9 | 00689 + 690 | 0 | 00690 + 691 | 1 | 00691 + 693 | 3 | 00693 + 694 | 4 | 00694 + 696 | 6 | 00696 + 697 | 7 | 00697 + 698 | 8 | 00698 + 699 | 9 | 00699 + 700 | 0 | 00700 + 701 | 1 | 00701 + 703 | 3 | 00703 + 704 | 4 | 00704 + 706 | 6 | 00706 + 707 | 7 | 00707 + 708 | 8 | 00708 + 709 | 9 | 00709 + 710 | 0 | 00710 + 711 | 1 | 00711 + 713 | 3 | 00713 + 714 | 4 | 00714 + 716 | 6 | 00716 + 717 | 7 | 00717 + 718 | 8 | 00718 + 719 | 9 | 00719 + 720 | 0 | 00720 + 721 | 1 | 00721 + 723 | 3 | 00723 + 724 | 4 | 00724 + 726 | 6 | 00726 + 727 | 7 | 00727 + 728 | 8 | 00728 + 729 | 9 | 00729 + 730 | 0 | 00730 + 731 | 1 | 00731 + 733 | 3 | 00733 + 734 | 4 | 00734 + 736 | 6 | 00736 + 737 | 7 | 00737 + 738 | 8 | 00738 + 739 | 9 | 00739 + 740 | 0 | 00740 + 741 | 1 | 00741 + 743 | 3 | 00743 + 744 | 4 | 00744 + 746 | 6 | 00746 + 747 | 7 | 00747 + 748 | 8 | 00748 + 749 | 9 | 00749 + 750 | 0 | 00750 + 751 | 1 | 00751 + 753 | 3 | 00753 + 754 | 4 | 00754 + 756 | 6 | 00756 + 757 | 7 | 00757 + 758 | 8 | 00758 + 759 | 9 | 00759 + 760 | 0 | 00760 + 761 | 1 | 00761 + 763 | 3 | 00763 + 764 | 4 | 00764 + 766 | 6 | 00766 + 767 | 7 | 00767 + 768 | 8 | 00768 + 769 | 9 | 00769 + 770 | 0 | 00770 + 771 | 1 | 00771 + 773 | 3 | 00773 + 774 | 4 | 00774 + 776 | 6 | 00776 + 777 | 7 | 00777 + 778 | 8 | 00778 + 779 | 9 | 00779 + 780 | 0 | 00780 + 781 | 1 | 00781 + 783 | 3 | 00783 + 784 | 4 | 00784 + 786 | 6 | 00786 + 787 | 7 | 00787 + 788 | 8 | 00788 + 789 | 9 | 00789 + 790 | 0 | 00790 + 791 | 1 | 00791 + 793 | 3 | 00793 + 794 | 4 | 00794 + 796 | 6 | 00796 + 797 | 7 | 00797 + 798 | 8 | 00798 + 799 | 9 | 00799 + 800 | 0 | 00800 + 801 | 1 | 00801 + 803 | 3 | 00803 + 804 | 4 | 00804 + 806 | 6 | 00806 + 807 | 7 | 00807 + 808 | 8 | 00808 + 809 | 9 | 00809 + 810 | 0 | 00810 + 811 | 1 | 00811 + 813 | 3 | 00813 + 814 | 4 | 00814 + 816 | 6 | 00816 + 817 | 7 | 00817 + 818 | 8 | 00818 + 819 | 9 | 00819 + 820 | 0 | 00820 + 821 | 1 | 00821 + 823 | 3 | 00823 + 824 | 4 | 00824 + 826 | 6 | 00826 + 827 | 7 | 00827 + 828 | 8 | 00828 + 829 | 9 | 00829 + 830 | 0 | 00830 + 831 | 1 | 00831 + 833 | 3 | 00833 + 834 | 4 | 00834 + 836 | 6 | 00836 + 837 | 7 | 00837 + 838 | 8 | 00838 + 839 | 9 | 00839 + 840 | 0 | 00840 + 841 | 1 | 00841 + 843 | 3 | 00843 + 844 | 4 | 00844 + 846 | 6 | 00846 + 847 | 7 | 00847 + 848 | 8 | 00848 + 849 | 9 | 00849 + 850 | 0 | 00850 + 851 | 1 | 00851 + 853 | 3 | 00853 + 854 | 4 | 00854 + 856 | 6 | 00856 + 857 | 7 | 00857 + 858 | 8 | 00858 + 859 | 9 | 00859 + 860 | 0 | 00860 + 861 | 1 | 00861 + 863 | 3 | 00863 + 864 | 4 | 00864 + 866 | 6 | 00866 + 867 | 7 | 00867 + 868 | 8 | 00868 + 869 | 9 | 00869 + 870 | 0 | 00870 + 871 | 1 | 00871 + 873 | 3 | 00873 + 874 | 4 | 00874 + 876 | 6 | 00876 + 877 | 7 | 00877 + 878 | 8 | 00878 + 879 | 9 | 00879 + 880 | 0 | 00880 + 881 | 1 | 00881 + 883 | 3 | 00883 + 884 | 4 | 00884 + 886 | 6 | 00886 + 887 | 7 | 00887 + 888 | 8 | 00888 + 889 | 9 | 00889 + 890 | 0 | 00890 + 891 | 1 | 00891 + 893 | 3 | 00893 + 894 | 4 | 00894 + 896 | 6 | 00896 + 897 | 7 | 00897 + 898 | 8 | 00898 + 899 | 9 | 00899 + 900 | 0 | 00900 + 901 | 1 | 00901 + 903 | 3 | 00903 + 904 | 4 | 00904 + 906 | 6 | 00906 + 907 | 7 | 00907 + 908 | 8 | 00908 + 909 | 9 | 00909 + 910 | 0 | 00910 + 911 | 1 | 00911 + 913 | 3 | 00913 + 914 | 4 | 00914 + 916 | 6 | 00916 + 917 | 7 | 00917 + 918 | 8 | 00918 + 919 | 9 | 00919 + 920 | 0 | 00920 + 921 | 1 | 00921 + 923 | 3 | 00923 + 924 | 4 | 00924 + 926 | 6 | 00926 + 927 | 7 | 00927 + 928 | 8 | 00928 + 929 | 9 | 00929 + 930 | 0 | 00930 + 931 | 1 | 00931 + 933 | 3 | 00933 + 934 | 4 | 00934 + 936 | 6 | 00936 + 937 | 7 | 00937 + 938 | 8 | 00938 + 939 | 9 | 00939 + 940 | 0 | 00940 + 941 | 1 | 00941 + 943 | 3 | 00943 + 944 | 4 | 00944 + 946 | 6 | 00946 + 947 | 7 | 00947 + 948 | 8 | 00948 + 949 | 9 | 00949 + 950 | 0 | 00950 + 951 | 1 | 00951 + 953 | 3 | 00953 + 954 | 4 | 00954 + 956 | 6 | 00956 + 957 | 7 | 00957 + 958 | 8 | 00958 + 959 | 9 | 00959 + 960 | 0 | 00960 + 961 | 1 | 00961 + 963 | 3 | 00963 + 964 | 4 | 00964 + 966 | 6 | 00966 + 967 | 7 | 00967 + 968 | 8 | 00968 + 969 | 9 | 00969 + 970 | 0 | 00970 + 971 | 1 | 00971 + 973 | 3 | 00973 + 974 | 4 | 00974 + 976 | 6 | 00976 + 977 | 7 | 00977 + 978 | 8 | 00978 + 979 | 9 | 00979 + 980 | 0 | 00980 + 981 | 1 | 00981 + 983 | 3 | 00983 + 984 | 4 | 00984 + 986 | 6 | 00986 + 987 | 7 | 00987 + 988 | 8 | 00988 + 989 | 9 | 00989 + 990 | 0 | 00990 + 991 | 1 | 00991 + 993 | 3 | 00993 + 994 | 4 | 00994 + 996 | 6 | 00996 + 997 | 7 | 00997 + 998 | 8 | 00998 + 999 | 9 | 00999 + 1000 | 0 | 01000 + 1001 | 101 | 0000100001 + 1003 | 103 | 0000300003 + 1004 | 104 | 0000400004 + 1006 | 106 | 0000600006 + 1007 | 107 | 0000700007 + 1008 | 108 | 0000800008 + 1009 | 109 | 0000900009 + 1010 | 100 | 0001000010 + 1011 | 101 | 0001100011 + 1013 | 103 | 0001300013 + 1014 | 104 | 0001400014 + 1016 | 106 | 0001600016 + 1017 | 107 | 0001700017 + 1018 | 108 | 0001800018 + 1019 | 109 | 0001900019 + 1020 | 100 | 0002000020 + 1101 | 201 | aaa + 1103 | 203 | ccc + 1104 | 204 | ddd +(819 rows) + +--Testcase 443: +EXPLAIN (verbose, costs off) +INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1200,999,'foo'); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Insert on public.ft2_nsc + Batch Size: 1 + -> Result + Output: 1200, 999, NULL::integer, 'foo'::text, NULL::timestamp without time zone, NULL::character varying, 'ft2 '::character(10), NULL::text +(4 rows) + +--Testcase 444: +INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1200,999,'foo'); +--Testcase 445: +SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int = 1200 AND (fields->>'c2')::int = 999; + c1 +------ + 1200 +(1 row) + +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; -- can be pushed down +--UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; +--Testcase 446: +EXPLAIN (verbose, costs off) +DELETE FROM ft2_nsc WHERE c1 = 1200; + QUERY PLAN +----------------------------------------------------------------------------- + Delete on public.ft2_nsc + -> Foreign Scan on public.ft2_nsc + Output: c3, "time" + InfluxDB query: SELECT "c3", "C 1" FROM "T1" WHERE (("C 1" = 1200)) +(4 rows) + +--Testcase 447: +SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int = 1200; + c1 +------ + 1200 +(1 row) + +--Testcase 448: +DELETE FROM ft2_nsc WHERE c1 = 1200; +--Testcase 449: +SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int = 1200; + c1 +---- +(0 rows) + +-- Test UPDATE/DELETE with RETURNING on a three-table join +--Testcase 450: +INSERT INTO ft2_nsc (c1,c2,c3) + SELECT id, id - 1200, to_char(id, 'FM00000') FROM generate_series(1201, 1300) id; +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c3 = 'foo' +-- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) +-- WHERE ft2.c1 > 1200 AND ft2.c2 = ft4.c1 +-- RETURNING ft2, ft2.*, ft4, ft4.*; -- can be pushed down +--UPDATE ft2 SET c3 = 'foo' +-- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) +-- WHERE ft2.c1 > 1200 AND ft2.c2 = ft4.c1 +-- RETURNING ft2, ft2.*, ft4, ft4.*; +--Testcase 451: +EXPLAIN (verbose, costs off) +DELETE FROM ft2_nsc + USING ft4_nsc LEFT JOIN ft5_nsc ON (ft4_nsc.c1 = ft5_nsc.c1) + WHERE ft2_nsc.c1 > 1200 AND ft2_nsc.c1 % 10 = 0 AND ft2_nsc.c2 = ft4_nsc.c1; -- can be pushed down + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------- + Delete on public.ft2_nsc + -> Hash Right Join + Output: ft2_nsc.c3, ft2_nsc."time", ft4_nsc.*, ft5_nsc.* + Hash Cond: (ft5_nsc.c1 = ft4_nsc.c1) + -> Foreign Scan on public.ft5_nsc + Output: ft5_nsc.*, ft5_nsc.c1 + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" + -> Hash + Output: ft2_nsc.c3, ft2_nsc."time", ft4_nsc.*, ft4_nsc.c1 + -> Hash Join + Output: ft2_nsc.c3, ft2_nsc."time", ft4_nsc.*, ft4_nsc.c1 + Hash Cond: (ft4_nsc.c1 = ft2_nsc.c2) + -> Foreign Scan on public.ft4_nsc + Output: ft4_nsc.*, ft4_nsc.c1 + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" + -> Hash + Output: ft2_nsc.c3, ft2_nsc."time", ft2_nsc.c2 + -> Foreign Scan on public.ft2_nsc + Output: ft2_nsc.c3, ft2_nsc."time", ft2_nsc.c2 + InfluxDB query: SELECT "c2", "c3" FROM "T1" WHERE (("C 1" > 1200)) AND ((("C 1" % 10) = 0)) +(20 rows) + +--Testcase 452: +SELECT 100 FROM ft2, + ft4 LEFT JOIN ft5 ON ((ft4.fields->>'c1')::int = (ft5.fields->>'c1')::int) + WHERE (ft2.fields->>'C 1')::int > 1200 AND (ft2.fields->>'C 1')::int % 10 = 0 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; + ?column? +---------- + 100 + 100 + 100 + 100 + 100 + 100 + 100 + 100 + 100 + 100 +(10 rows) + +--Testcase 453: +DELETE FROM ft2_nsc + USING ft4_nsc LEFT JOIN ft5_nsc ON (ft4_nsc.c1 = ft5_nsc.c1) + WHERE ft2_nsc.c1 > 1200 AND ft2_nsc.c1 % 10 = 0 AND ft2_nsc.c2 = ft4_nsc.c1; +--Testcase 454: +SELECT 100 FROM ft2, + ft4 LEFT JOIN ft5 ON ((ft4.fields->>'c1')::int = (ft5.fields->>'c1')::int) + WHERE (ft2.fields->>'C 1')::int > 1200 AND (ft2.fields->>'C 1')::int % 10 = 0 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; + ?column? +---------- +(0 rows) + +--Testcase 455: +DELETE FROM ft2_nsc WHERE ft2_nsc.c1 > 1200; +-- Test UPDATE with a MULTIEXPR sub-select +-- (maybe someday this'll be remotely executable, but not today) +--EXPLAIN (verbose, costs off) +--UPDATE ft2 AS target SET (c2, c7) = ( +-- SELECT c2 * 10, c7 +-- FROM ft2 AS src +-- WHERE target.c1 = src.c1 +--) WHERE c1 > 1100; +--UPDATE ft2 AS target SET (c2, c7) = ( +-- SELECT c2 * 10, c7 +-- FROM ft2 AS src +-- WHERE targ--et.c1 = src.c1 +--) WHERE c1 > 1100; +--UPDATE ft2 AS target SET (c2) = ( +-- SELECT c2 / 10 +-- FROM ft2 AS src +-- WHERE targ--et.c1 = src.c1 +--) WHERE c1 > 1100; +-- Test UPDATE involving a join that can be pushed down, +-- but a SET clause that can't be +-- EXPLAIN (VERBOSE, COSTS OFF) +-- UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END +-- FROM ft2 AS t WHERE d.c1 = t.c1 AND d.c1 > 1000; +-- UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END +-- FROM ft2 AS t WHERE d.c1 = t.c1 AND d.c1 > 1000; +-- Test UPDATE/DELETE with WHERE or JOIN/ON conditions containing +-- user-defined operators/functions +--Testcase 456: +INSERT INTO ft2_nsc (c1,c2,c3) + SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id; +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c3 = 'bar' WHERE influxdb_fdw_abs(c1) > 2000 RETURNING *; -- can't be pushed down +--UPDATE ft2 SET c3 = 'bar' WHERE influxdb_fdw_abs(c1) > 2000 RETURNING *; +--EXPLAIN (verbose, costs off) +--UPDATE ft2 SET c3 = 'baz' +-- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) +-- WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 +-- RETURNING ft2.*, ft4.*, ft5.*; -- can't be pushed down +--UPDATE ft2 SET c3 = 'baz' +-- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) +-- WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 +-- RETURNING ft2.*, ft4.*, ft5.*; +--Testcase 457: +EXPLAIN (verbose, costs off) +DELETE FROM ft2_nsc + USING ft4_nsc INNER JOIN ft5_nsc ON (ft4_nsc.c1 === ft5_nsc.c1) + WHERE ft2_nsc.c1 > 2000 AND ft2_nsc.c2 = ft4_nsc.c1; -- can't be pushed down + QUERY PLAN +---------------------------------------------------------------------------------------------- + Delete on public.ft2_nsc + -> Nested Loop + Output: ft2_nsc.c3, ft2_nsc."time", ft4_nsc.*, ft5_nsc.* + Join Filter: (ft4_nsc.c1 === ft5_nsc.c1) + -> Hash Join + Output: ft2_nsc.c3, ft2_nsc."time", ft4_nsc.*, ft4_nsc.c1 + Hash Cond: (ft4_nsc.c1 = ft2_nsc.c2) + -> Foreign Scan on public.ft4_nsc + Output: ft4_nsc.*, ft4_nsc.c1 + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T3" + -> Hash + Output: ft2_nsc.c3, ft2_nsc."time", ft2_nsc.c2 + -> Foreign Scan on public.ft2_nsc + Output: ft2_nsc.c3, ft2_nsc."time", ft2_nsc.c2 + InfluxDB query: SELECT "c2", "c3" FROM "T1" WHERE (("C 1" > 2000)) + -> Materialize + Output: ft5_nsc.*, ft5_nsc.c1 + -> Foreign Scan on public.ft5_nsc + Output: ft5_nsc.*, ft5_nsc.c1 + InfluxDB query: SELECT "c1", "c2", "c3" FROM "T4" +(20 rows) + +--Testcase 458: +SELECT (ft2.fields->>'C 1')::int c1, (ft2.fields->>'c2')::int c2, ft2.tags->>'c3' c3 + FROM ft2, ft4 INNER JOIN ft5 ON ((ft4.fields->>'c1')::int === (ft5.fields->>'c1')::int) + WHERE (ft2.fields->>'C 1')::int > 2000 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; + c1 | c2 | c3 +------+----+------- + 2006 | 6 | 02006 +(1 row) + +--Testcase 459: +DELETE FROM ft2_nsc + USING ft4_nsc INNER JOIN ft5_nsc ON (ft4_nsc.c1 === ft5_nsc.c1) + WHERE ft2_nsc.c1 > 2000 AND ft2_nsc.c2 = ft4_nsc.c1; +--Testcase 460: +SELECT (ft2.fields->>'C 1')::int c1, (ft2.fields->>'c2')::int c2, ft2.tags->>'c3' c3 + FROM ft2, ft4 INNER JOIN ft5 ON ((ft4.fields->>'c1')::int === (ft5.fields->>'c1')::int) + WHERE (ft2.fields->>'C 1')::int > 2000 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; + c1 | c2 | c3 +----+----+---- +(0 rows) + +--Testcase 461: +DELETE FROM ft2_nsc WHERE ft2_nsc.c1 > 2000; +-- Test that trigger on remote table works as expected +--Testcase 462: +CREATE OR REPLACE FUNCTION "S 1".F_BRTRIG() RETURNS trigger AS $$ +BEGIN + NEW.c3 = NEW.c3 || '_trig_update'; + RETURN NEW; +END; +$$ LANGUAGE plpgsql; +--Testcase 463: +CREATE TRIGGER t1_br_insert BEFORE INSERT OR UPDATE + ON "S 1".s1t1 FOR EACH ROW EXECUTE PROCEDURE "S 1".F_BRTRIG(); +--Testcase 464: +INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1208, 818, 'fff'); +--Testcase 465: +SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 WHERE (fields->>'C 1')::int = 1208; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+-----+----+------------+---- + 1208 | 818 | fff | | ft2 | +(1 row) + +--Testcase 466: +INSERT INTO ft2_nsc (c1,c2,c3,c6) VALUES (1218, 818, 'ggg', '(--;'); +--Testcase 467: +SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 WHERE (fields->>'C 1')::int = 1218; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+-----+------+------------+---- + 1218 | 818 | ggg | (--; | ft2 | +(1 row) + +--UPDATE ft2 SET c2 = c2 + 600 WHERE c1 % 10 = 8 AND c1 < 1200 RETURNING *; +-- Test errors thrown on remote side during update +--Testcase 468: +ALTER TABLE "S 1"."T 1" ADD CONSTRAINT c2positive CHECK ((fields->>'c2')::int >= 0); +-- influxdb_fdw does not support key, ON CONFLICT +--INSERT INTO ft1(c1, c2) VALUES(11, 12); -- duplicate key +--Testcase 469: +INSERT INTO ft1_nsc(c1, c2) VALUES(11, 12) ON CONFLICT DO NOTHING; -- works +ERROR: ON CONFLICT is not supported +--Testcase 470: +INSERT INTO ft1_nsc(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO NOTHING; -- unsupported +ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification +--Testcase 471: +INSERT INTO ft1_nsc(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO UPDATE SET c3 = 'ffg'; -- unsupported +ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification +--INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive +--UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive +/* +-- influxdb_fdw does not support transactions +-- Test savepoint/rollback behavior +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; +begin; +update ft2 set c2 = 42 where c2 = 0; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +savepoint s1; +update ft2 set c2 = 44 where c2 = 4; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +release savepoint s1; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +savepoint s2; +update ft2 set c2 = 46 where c2 = 6; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +rollback to savepoint s2; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +release savepoint s2; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +savepoint s3; +update ft2 set c2 = -2 where c2 = 42 and c1 = 10; -- fail on remote side +rollback to savepoint s3; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +release savepoint s3; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +-- none of the above is committed yet remotely +select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; +commit; +select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; +select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; +*/ +-- Above DMLs add data with c6 as NULL in ft1, so test ORDER BY NULLS LAST and NULLs +-- FIRST behavior here. +-- ORDER BY DESC NULLS LAST options +--Testcase 472: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY fields->>'c6' DESC NULLS LAST, (fields->>'C 1')::int OFFSET 795 LIMIT 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Limit + Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) + -> Sort + Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) + Sort Key: ((ft1.fields ->> 'c6'::text)) DESC NULLS LAST, (((ft1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 + Output: "time", tags, fields, (fields ->> 'c6'::text), ((fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(8 rows) + +--Testcase 473: +SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 ORDER BY fields->>'c6' DESC NULLS LAST, (fields->>'C 1')::int OFFSET 795 LIMIT 10; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+------------+------+------------+----- + 960 | 0 | 00960 | 0 | 0 | foo + 970 | 0 | 00970 | 0 | 0 | foo + 980 | 0 | 00980 | 0 | 0 | foo + 990 | 0 | 00990 | 0 | 0 | foo + 1000 | 0 | 01000 | 0 | 0 | foo + 1218 | 818 | ggg | (--; | ft2 | + 1001 | 101 | 0000100001 | | ft2 | + 1003 | 103 | 0000300003 | | ft2 | + 1004 | 104 | 0000400004 | | ft2 | + 1006 | 106 | 0000600006 | | ft2 | +(10 rows) + +-- ORDER BY DESC NULLS FIRST options +--Testcase 474: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY fields->>'c6' DESC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Limit + Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) + -> Sort + Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) + Sort Key: ((ft1.fields ->> 'c6'::text)) DESC, (((ft1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 + Output: "time", tags, fields, (fields ->> 'c6'::text), ((fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(8 rows) + +--Testcase 475: +SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 ORDER BY fields->>'c6' DESC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+------------+----+------------+----- + 1020 | 100 | 0002000020 | | ft2 | + 1101 | 201 | aaa | | ft2 | + 1103 | 203 | ccc | | ft2 | + 1104 | 204 | ddd | | ft2 | + 1208 | 818 | fff | | ft2 | + 9 | 9 | 00009 | 9 | 9 | foo + 19 | 9 | 00019 | 9 | 9 | foo + 29 | 9 | 00029 | 9 | 9 | foo + 39 | 9 | 00039 | 9 | 9 | foo + 49 | 9 | 00049 | 9 | 9 | foo +(10 rows) + +-- ORDER BY ASC NULLS FIRST options +--Testcase 476: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY fields->>'c6' ASC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Limit + Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) + -> Sort + Output: "time", tags, fields, ((fields ->> 'c6'::text)), (((fields ->> 'C 1'::text))::integer) + Sort Key: ((ft1.fields ->> 'c6'::text)) NULLS FIRST, (((ft1.fields ->> 'C 1'::text))::integer) + -> Foreign Scan on public.ft1 + Output: "time", tags, fields, (fields ->> 'c6'::text), ((fields ->> 'C 1'::text))::integer + InfluxDB query: SELECT * FROM "T1" +(8 rows) + +--Testcase 477: +SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 ORDER BY fields->>'c6' ASC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; + c1 | c2 | c3 | c6 | c7 | c8 +------+-----+------------+------+------------+----- + 1020 | 100 | 0002000020 | | ft2 | + 1101 | 201 | aaa | | ft2 | + 1103 | 203 | ccc | | ft2 | + 1104 | 204 | ddd | | ft2 | + 1208 | 818 | fff | | ft2 | + 1218 | 818 | ggg | (--; | ft2 | + 10 | 0 | 00010 | 0 | 0 | foo + 20 | 0 | 00020 | 0 | 0 | foo + 30 | 0 | 00030 | 0 | 0 | foo + 40 | 0 | 00040 | 0 | 0 | foo +(10 rows) + +-- =================================================================== +-- test check constraints +-- =================================================================== +-- Consistent check constraints provide consistent results +--Testcase 478: +ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2positive CHECK ((fields->>'c2')::int >= 0); +--Testcase 479: +EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; + QUERY PLAN +---------------------------------------------------------------- + Foreign Scan + Output: (count(*)) + InfluxDB query: SELECT count(*) FROM "T1" WHERE (("c2" < 0)) +(3 rows) + +-- InfluxDB return null value because it does not have any record. +--Testcase 480: +SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; + count +------- +(0 rows) + +--Testcase 481: +SET constraint_exclusion = 'on'; +--Testcase 482: +EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; + QUERY PLAN +-------------------------------- + Aggregate + Output: count(*) + -> Result + One-Time Filter: false +(4 rows) + +--Testcase 483: +SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; + count +------- + 0 +(1 row) + +--Testcase 484: +RESET constraint_exclusion; +-- check constraint is enforced on the remote side, not locally +-- INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive +-- UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive +--Testcase 485: +ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2positive; +-- But inconsistent check constraints provide inconsistent results +--Testcase 486: +ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2negative CHECK ((fields->>'c2')::int < 0); +--Testcase 487: +EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; + QUERY PLAN +----------------------------------------------------------------- + Foreign Scan + Output: (count(*)) + InfluxDB query: SELECT count(*) FROM "T1" WHERE (("c2" >= 0)) +(3 rows) + +--Testcase 488: +SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; + count +------- + 821 +(1 row) + +--Testcase 489: +SET constraint_exclusion = 'on'; +--Testcase 490: +EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; + QUERY PLAN +-------------------------------- + Aggregate + Output: count(*) + -> Result + One-Time Filter: false +(4 rows) + +--Testcase 491: +SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; + count +------- + 0 +(1 row) + +--Testcase 492: +RESET constraint_exclusion; +-- local check constraint is not actually enforced +--Testcase 493: +INSERT INTO ft1_nsc(c1, c2) VALUES(1111, 2); +-- UPDATE ft1 SET c2 = c2 + 1 WHERE c1 = 1; +--Testcase 494: +ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2negative; +-- influxdb_fdw does not support this feature +-- =================================================================== +-- test WITH CHECK OPTION constraints +-- =================================================================== +--Testcase 495: +CREATE FUNCTION row_before_insupd_trigfunc() RETURNS trigger AS $$BEGIN NEW.a := NEW.a + 10; RETURN NEW; END$$ LANGUAGE plpgsql; +--Testcase 496: +CREATE FOREIGN TABLE base_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'base_tbl', schemaless 'true'); +--ALTER FOREIGN TABLE base_tbl SET (autovacuum_enabled = 'false'); +--Testcase 797: +CREATE FOREIGN TABLE base_tbl_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 'base_tbl'); +--Testcase 497: +CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON base_tbl_nsc FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); +--Testcase 498: +CREATE FOREIGN TABLE foreign_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'base_tbl', schemaless 'true'); +--Testcase 499: +CREATE VIEW rw_view AS SELECT * FROM base_tbl + WHERE (fields->>'a')::int < (fields->>'b')::int WITH CHECK OPTION; +--Testcase 798: +CREATE VIEW rw_view_nsc AS SELECT * FROM base_tbl_nsc + WHERE a < b WITH CHECK OPTION; +--Testcase 500: +\d+ rw_view + View "public.rw_view" + Column | Type | Collation | Nullable | Default | Storage | Description +--------+-------+-----------+----------+---------+----------+------------- + fields | jsonb | | | | extended | +View definition: + SELECT base_tbl.fields + FROM base_tbl + WHERE ((base_tbl.fields ->> 'a'::text)::integer) < ((base_tbl.fields ->> 'b'::text)::integer); +Options: check_option=cascaded + +--Testcase 501: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view_nsc VALUES (0, 5); + QUERY PLAN +------------------------------- + Insert on public.base_tbl_nsc + Batch Size: 1 + -> Result + Output: 0, 5 +(4 rows) + +--Testcase 502: +INSERT INTO rw_view_nsc VALUES (0, 5); -- should fail +ERROR: new row violates check option for view "rw_view_nsc" +DETAIL: Failing row contains (10, 5). +--Testcase 503: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view_nsc VALUES (0, 15); + QUERY PLAN +------------------------------- + Insert on public.base_tbl_nsc + Batch Size: 1 + -> Result + Output: 0, 15 +(4 rows) + +--Testcase 504: +INSERT INTO rw_view_nsc VALUES (0, 15); -- ok +--Testcase 505: +SELECT * FROM foreign_tbl; + fields +------------------------ + {"a": "10", "b": "5"} + {"a": "10", "b": "15"} +(2 rows) + +--EXPLAIN (VERBOSE, COSTS OFF) +--UPDATE rw_view SET b = b + 5; +--UPDATE rw_view SET b = b + 5; -- should fail +--EXPLAIN (VERBOSE, COSTS OFF) +--UPDATE rw_view SET b = b + 15; +--UPDATE rw_view SET b = b + 15; -- ok +--SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +--Testcase 869: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); +ERROR: INSERT has more expressions than target columns +LINE 2: INSERT INTO rw_view VALUES (0, 15), (0, 5); + ^ +--Testcase 870: +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +ERROR: INSERT has more expressions than target columns +LINE 1: INSERT INTO rw_view VALUES (0, 15), (0, 5); + ^ +--Testcase 871: +SELECT * FROM foreign_tbl; + fields +------------------------ + {"a": "10", "b": "5"} + {"a": "10", "b": "15"} +(2 rows) + +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); +--Testcase 506: +DELETE FROM foreign_tbl; +--Testcase 799: +DROP FOREIGN TABLE foreign_tbl CASCADE; +--Testcase 507: +DROP TRIGGER row_before_insupd_trigger ON base_tbl_nsc; +--Testcase 508: +DROP FOREIGN TABLE base_tbl CASCADE; +NOTICE: drop cascades to view rw_view +--Testcase 800: +DROP FOREIGN TABLE base_tbl_nsc CASCADE; +NOTICE: drop cascades to view rw_view_nsc +-- influxdb_fdw does not support partitions +-- test WCO for partitions +--Testcase 509: +CREATE FOREIGN TABLE child_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'child_tbl', schemaless 'true'); +--ALTER FOREIGN TABLE child_tbl SET (autovacuum_enabled = 'false'); +--Testcase 801: +CREATE FOREIGN TABLE child_tbl_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 'child_tbl'); +--Testcase 510: +CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON child_tbl_nsc FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); +--Testcase 511: +CREATE FOREIGN TABLE foreign_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'child_tbl', schemaless 'true'); +--Testcase 512: +CREATE TABLE parent_tbl (a int, b int) PARTITION BY RANGE(a); +--Testcase 513: +ALTER TABLE parent_tbl ATTACH PARTITION child_tbl_nsc FOR VALUES FROM (0) TO (100); +-- Detach and re-attach once, to stress the concurrent detach case. +--Testcase 774: +ALTER TABLE parent_tbl DETACH PARTITION child_tbl_nsc CONCURRENTLY; +--Testcase 775: +ALTER TABLE parent_tbl ATTACH PARTITION child_tbl_nsc FOR VALUES FROM (0) TO (100); +--Testcase 514: +CREATE VIEW rw_view AS SELECT * FROM parent_tbl + WHERE a < b WITH CHECK OPTION; +--Testcase 515: +\d+ rw_view + View "public.rw_view" + Column | Type | Collation | Nullable | Default | Storage | Description +--------+---------+-----------+----------+---------+---------+------------- + a | integer | | | | plain | + b | integer | | | | plain | +View definition: + SELECT parent_tbl.a, + parent_tbl.b + FROM parent_tbl + WHERE parent_tbl.a < parent_tbl.b; +Options: check_option=cascaded + +--Testcase 516: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 5); + QUERY PLAN +----------------------------- + Insert on public.parent_tbl + -> Result + Output: 0, 5 +(3 rows) + +--Testcase 517: +INSERT INTO rw_view VALUES (0, 5); -- should fail +ERROR: Not support partition insert +--Testcase 518: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15); + QUERY PLAN +----------------------------- + Insert on public.parent_tbl + -> Result + Output: 0, 15 +(3 rows) + +--Testcase 519: +INSERT INTO rw_view VALUES (0, 15); -- ok +ERROR: Not support partition insert +--Testcase 520: +SELECT * FROM foreign_tbl; + fields +-------- +(0 rows) + +--EXPLAIN (VERBOSE, COSTS OFF) +--UPDATE rw_view SET b = b + 5; +--UPDATE rw_view SET b = b + 5; -- should fail +--EXPLAIN (VERBOSE, COSTS OFF) +--UPDATE rw_view SET b = b + 15; +--UPDATE rw_view SET b = b + 15; -- ok +--SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +--Testcase 872: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); + QUERY PLAN +-------------------------------------------------------- + Insert on public.parent_tbl + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, "*VALUES*".column2 +(3 rows) + +--Testcase 873: +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +ERROR: Not support partition insert +--Testcase 874: +SELECT * FROM foreign_tbl; + fields +-------- +(0 rows) + +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); +--Testcase 521: +DROP FOREIGN TABLE foreign_tbl CASCADE; +--Testcase 522: +DROP TRIGGER row_before_insupd_trigger ON child_tbl_nsc; +--Testcase 523: +DROP FOREIGN TABLE child_tbl CASCADE; +--Testcase 802: +DROP FOREIGN TABLE child_tbl_nsc CASCADE; +--Testcase 524: +DROP TABLE parent_tbl CASCADE; +NOTICE: drop cascades to view rw_view +--Testcase 525: +DROP FUNCTION row_before_insupd_trigfunc; +-- =================================================================== +-- test serial columns (ie, sequence-based defaults) +-- =================================================================== +--Testcase 526: +create foreign table loc1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loc1', schemaless 'true'); +--alter foreign table loc1 set (autovacuum_enabled = 'false'); +--Testcase 803: +create foreign table loc1_nsc (f1 serial, f2 text) + server influxdb_svr options(table 'loc1'); +--Testcase 527: +create foreign table rem1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loc1', schemaless 'true'); +--Testcase 804: +create foreign table rem1_nsc (f1 serial, f2 text) + server influxdb_svr options(table 'loc1'); +--Testcase 528: +select pg_catalog.setval('rem1_nsc_f1_seq', 10, false); + setval +-------- + 10 +(1 row) + +--Testcase 529: +insert into loc1_nsc(f2) values('hi'); +--Testcase 530: +insert into rem1_nsc(f2) values('hi remote'); +--Testcase 531: +insert into loc1_nsc(f2) values('bye'); +--Testcase 532: +insert into rem1_nsc(f2) values('bye remote'); +--Testcase 533: +select * from loc1; + fields +---------------------------------- + {"f1": "1", "f2": "hi"} + {"f1": "10", "f2": "hi remote"} + {"f1": "2", "f2": "bye"} + {"f1": "11", "f2": "bye remote"} +(4 rows) + +--Testcase 534: +select * from rem1; + fields +---------------------------------- + {"f1": "1", "f2": "hi"} + {"f1": "10", "f2": "hi remote"} + {"f1": "2", "f2": "bye"} + {"f1": "11", "f2": "bye remote"} +(4 rows) + +-- =================================================================== +-- test generated columns +-- =================================================================== +--Testcase 535: +create foreign table gloc1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'gloc1', schemaless 'true'); +--alter foreign table gloc1 set (autovacuum_enabled = 'false'); +--Testcase 805: +create foreign table gloc1_nsc ( + a int, + b int generated always as (a * 2) stored) + server influxdb_svr options(table 'gloc1'); +--Testcase 536: +create foreign table grem1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'gloc1', schemaless 'true'); +--Testcase 806: +create foreign table grem1_nsc ( + a int, + b int generated always as (a * 2) stored) + server influxdb_svr options(table 'gloc1'); +--Testcase 537: +explain (verbose, costs off) +insert into grem1_nsc (a) values (1), (22); + QUERY PLAN +--------------------------------------------------- + Insert on public.grem1_nsc + Batch Size: 1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, NULL::integer +(4 rows) + +--Testcase 765: +insert into grem1_nsc (a) values (1), (22); +--explain (verbose, costs off) +--update grem1 set a = 22 where a = 2; +--update grem1 set a = 22 where a = 2; +--Testcase 538: +select * from gloc1; + fields +------------------------ + {"a": "1", "b": "2"} + {"a": "22", "b": "44"} +(2 rows) + +--Testcase 539: +select * from grem1; + fields +------------------------ + {"a": "1", "b": "2"} + {"a": "22", "b": "44"} +(2 rows) + +--Testcase 766: +delete from grem1_nsc; +/* +-- InfluxDB FDW does not support partition insert +-- test copy from +copy grem1 from stdin; +1 +2 +\. +select * from gloc1; +select * from grem1; +delete from grem1; +*/ +-- test batch insert +--Testcase 767: +alter server influxdb_svr options (add batch_size '10'); +--Testcase 768: +explain (verbose, costs off) +insert into grem1_nsc (a) values (1), (2); + QUERY PLAN +--------------------------------------------------- + Insert on public.grem1_nsc + Batch Size: 10 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, NULL::integer +(4 rows) + +--Testcase 769: +insert into grem1_nsc (a) values (1), (2); +--Testcase 770: +select * from gloc1; + fields +---------------------- + {"a": "1", "b": "2"} + {"a": "2", "b": "4"} +(2 rows) + +--Testcase 771: +select * from grem1; + fields +---------------------- + {"a": "1", "b": "2"} + {"a": "2", "b": "4"} +(2 rows) + +--Testcase 772: +delete from grem1_nsc; +--Testcase 773: +alter server influxdb_svr options (drop batch_size); +-- =================================================================== +-- test local triggers +-- =================================================================== +-- Trigger functions "borrowed" from triggers regress test. +--Testcase 540: +CREATE FUNCTION trigger_func() RETURNS trigger LANGUAGE plpgsql AS $$ +BEGIN + RAISE NOTICE 'trigger_func(%) called: action = %, when = %, level = %', + TG_ARGV[0], TG_OP, TG_WHEN, TG_LEVEL; + RETURN NULL; +END;$$; +--Testcase 541: +CREATE TRIGGER trig_stmt_before BEFORE DELETE OR INSERT OR UPDATE ON rem1_nsc + FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); +--Testcase 542: +CREATE TRIGGER trig_stmt_after AFTER DELETE OR INSERT OR UPDATE ON rem1_nsc + FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); +--Testcase 543: +CREATE OR REPLACE FUNCTION trigger_data() RETURNS trigger +LANGUAGE plpgsql AS $$ + +declare + oldnew text[]; + relid text; + argstr text; +begin + + relid := TG_relid::regclass; + argstr := ''; + for i in 0 .. TG_nargs - 1 loop + if i > 0 then + argstr := argstr || ', '; + end if; + argstr := argstr || TG_argv[i]; + end loop; + + RAISE NOTICE '%(%) % % % ON %', + tg_name, argstr, TG_when, TG_level, TG_OP, relid; + oldnew := '{}'::text[]; + if TG_OP != 'INSERT' then + oldnew := array_append(oldnew, format('OLD: %s', OLD)); + end if; + + if TG_OP != 'DELETE' then + oldnew := array_append(oldnew, format('NEW: %s', NEW)); + end if; + + RAISE NOTICE '%', array_to_string(oldnew, ','); + + if TG_OP = 'DELETE' then + return OLD; + else + return NEW; + end if; +end; +$$; +-- Test basic functionality +--Testcase 544: +CREATE TRIGGER trig_row_before +BEFORE INSERT OR UPDATE OR DELETE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 545: +CREATE TRIGGER trig_row_after +AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 546: +delete from rem1_nsc; +NOTICE: trigger_func() called: action = DELETE, when = BEFORE, level = STATEMENT +NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1_nsc +NOTICE: OLD: (1,hi) +NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1_nsc +NOTICE: OLD: (10,"hi remote") +NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1_nsc +NOTICE: OLD: (2,bye) +NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON rem1_nsc +NOTICE: OLD: (11,"bye remote") +NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1_nsc +NOTICE: OLD: (1,hi) +NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1_nsc +NOTICE: OLD: (10,"hi remote") +NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1_nsc +NOTICE: OLD: (2,bye) +NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON rem1_nsc +NOTICE: OLD: (11,"bye remote") +NOTICE: trigger_func() called: action = DELETE, when = AFTER, level = STATEMENT +--Testcase 547: +insert into rem1_nsc values(1,'insert'); +NOTICE: trigger_func() called: action = INSERT, when = BEFORE, level = STATEMENT +NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1_nsc +NOTICE: NEW: (1,insert) +NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1_nsc +NOTICE: NEW: (1,insert) +NOTICE: trigger_func() called: action = INSERT, when = AFTER, level = STATEMENT +--update rem1 set f2 = 'update' where f1 = 1; +--update rem1 set f2 = f2 || f2; +-- cleanup +--Testcase 548: +DROP TRIGGER trig_row_before ON rem1_nsc; +--Testcase 549: +DROP TRIGGER trig_row_after ON rem1_nsc; +--Testcase 550: +DROP TRIGGER trig_stmt_before ON rem1_nsc; +--Testcase 551: +DROP TRIGGER trig_stmt_after ON rem1_nsc; +--Testcase 552: +DELETE from rem1_nsc; +-- Test multiple AFTER ROW triggers on a foreign table +--Testcase 553: +CREATE TRIGGER trig_row_after1 +AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 554: +CREATE TRIGGER trig_row_after2 +AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 555: +insert into rem1_nsc values(1,'insert'); +NOTICE: trig_row_after1(23, skidoo) AFTER ROW INSERT ON rem1_nsc +NOTICE: NEW: (1,insert) +NOTICE: trig_row_after2(23, skidoo) AFTER ROW INSERT ON rem1_nsc +NOTICE: NEW: (1,insert) +--update rem1 set f2 = 'update' where f1 = 1; +--update rem1 set f2 = f2 || f2; +--Testcase 556: +delete from rem1_nsc; +NOTICE: trig_row_after1(23, skidoo) AFTER ROW DELETE ON rem1_nsc +NOTICE: OLD: (1,insert) +NOTICE: trig_row_after2(23, skidoo) AFTER ROW DELETE ON rem1_nsc +NOTICE: OLD: (1,insert) +-- cleanup +--Testcase 557: +DROP TRIGGER trig_row_after1 ON rem1_nsc; +--Testcase 558: +DROP TRIGGER trig_row_after2 ON rem1_nsc; +-- Test WHEN conditions +--Testcase 559: +CREATE TRIGGER trig_row_before_insupd +BEFORE INSERT OR UPDATE ON rem1_nsc +FOR EACH ROW +WHEN (NEW.f2 like '%update%') +EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 560: +CREATE TRIGGER trig_row_after_insupd +AFTER INSERT OR UPDATE ON rem1_nsc +FOR EACH ROW +WHEN (NEW.f2 like '%update%') +EXECUTE PROCEDURE trigger_data(23,'skidoo'); +-- Insert or update not matching: nothing happens +--Testcase 561: +INSERT INTO rem1_nsc values(1, 'insert'); +--UPDATE rem1 set f2 = 'test'; +-- Insert or update matching: triggers are fired +--Testcase 562: +INSERT INTO rem1_nsc values(2, 'update'); +NOTICE: trig_row_before_insupd(23, skidoo) BEFORE ROW INSERT ON rem1_nsc +NOTICE: NEW: (2,update) +NOTICE: trig_row_after_insupd(23, skidoo) AFTER ROW INSERT ON rem1_nsc +NOTICE: NEW: (2,update) +--UPDATE rem1 set f2 = 'update update' where f1 = '2'; +--Testcase 563: +CREATE TRIGGER trig_row_before_delete +BEFORE DELETE ON rem1_nsc +FOR EACH ROW +WHEN (OLD.f2 like '%update%') +EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 564: +CREATE TRIGGER trig_row_after_delete +AFTER DELETE ON rem1_nsc +FOR EACH ROW +WHEN (OLD.f2 like '%update%') +EXECUTE PROCEDURE trigger_data(23,'skidoo'); +-- Trigger is fired for f1=2, not for f1=1 +--Testcase 565: +DELETE FROM rem1_nsc; +NOTICE: trig_row_before_delete(23, skidoo) BEFORE ROW DELETE ON rem1_nsc +NOTICE: OLD: (2,update) +NOTICE: trig_row_after_delete(23, skidoo) AFTER ROW DELETE ON rem1_nsc +NOTICE: OLD: (2,update) +-- cleanup +--Testcase 566: +DROP TRIGGER trig_row_before_insupd ON rem1_nsc; +--Testcase 567: +DROP TRIGGER trig_row_after_insupd ON rem1_nsc; +--Testcase 568: +DROP TRIGGER trig_row_before_delete ON rem1_nsc; +--Testcase 569: +DROP TRIGGER trig_row_after_delete ON rem1_nsc; +-- Test various RETURN statements in BEFORE triggers. +--Testcase 570: +CREATE FUNCTION trig_row_before_insupdate() RETURNS TRIGGER AS $$ + BEGIN + NEW.f2 := NEW.f2 || ' triggered !'; + RETURN NEW; + END +$$ language plpgsql; +--Testcase 571: +CREATE TRIGGER trig_row_before_insupd +BEFORE INSERT OR UPDATE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); +-- The new values should have 'triggered' appended +--Testcase 572: +INSERT INTO rem1_nsc values(1, 'insert'); +--Testcase 573: +SELECT * from loc1; + fields +----------------------------------------- + {"f1": "1", "f2": "insert triggered !"} +(1 row) + +--Testcase 574: +INSERT INTO rem1_nsc values(2, 'insert'); +--Testcase 575: +SELECT fields->>'f2' f2 FROM rem1 WHERE (fields->>'f1')::int = 2; + f2 +-------------------- + insert triggered ! +(1 row) + +--Testcase 576: +SELECT * from loc1; + fields +----------------------------------------- + {"f1": "1", "f2": "insert triggered !"} + {"f1": "2", "f2": "insert triggered !"} +(2 rows) + +--UPDATE rem1 set f2 = ''; +--SELECT * from loc1; +--UPDATE rem1 set f2 = 'skidoo' RETURNING f2; +--SELECT * from loc1; +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f1 = 10; -- all columns should be transmitted +--UPDATE rem1 set f1 = 10; +--SELECT * from loc1; +--Testcase 577: +DELETE FROM rem1_nsc; +-- Add a second trigger, to check that the changes are propagated correctly +-- from trigger to trigger +--Testcase 578: +CREATE TRIGGER trig_row_before_insupd2 +BEFORE INSERT OR UPDATE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); +--Testcase 579: +INSERT INTO rem1_nsc values(1, 'insert'); +--Testcase 580: +SELECT * from loc1; + fields +----------------------------------------------------- + {"f1": "1", "f2": "insert triggered ! triggered !"} +(1 row) + +--Testcase 581: +INSERT INTO rem1_nsc values(2, 'insert'); +--Testcase 582: +SELECT fields->>'f2' f2 FROM rem1 WHERE (fields->>'f1')::int = 2; + f2 +-------------------------------- + insert triggered ! triggered ! +(1 row) + +--Testcase 583: +SELECT * from loc1; + fields +----------------------------------------------------- + {"f1": "1", "f2": "insert triggered ! triggered !"} + {"f1": "2", "f2": "insert triggered ! triggered !"} +(2 rows) + +--UPDATE rem1 set f2 = ''; +--SELECT * from loc1; +--UPDATE rem1 set f2 = 'skidoo' RETURNING f2; +--SELECT * from loc1; +--Testcase 584: +DROP TRIGGER trig_row_before_insupd ON rem1_nsc; +--Testcase 585: +DROP TRIGGER trig_row_before_insupd2 ON rem1_nsc; +--Testcase 586: +DELETE from rem1_nsc; +--Testcase 587: +INSERT INTO rem1_nsc VALUES (1, 'test'); +-- Test with a trigger returning NULL +--Testcase 588: +CREATE FUNCTION trig_null() RETURNS TRIGGER AS $$ + BEGIN + RETURN NULL; + END +$$ language plpgsql; +--Testcase 589: +CREATE TRIGGER trig_null +BEFORE INSERT OR UPDATE OR DELETE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trig_null(); +-- Nothing should have changed. +--Testcase 590: +INSERT INTO rem1_nsc VALUES (2, 'test2'); +--Testcase 591: +SELECT * from loc1; + fields +--------------------------- + {"f1": "1", "f2": "test"} +(1 row) + +--UPDATE rem1 SET f2 = 'test2'; +--SELECT * from loc1; +--Testcase 592: +DELETE from rem1_nsc; +--Testcase 593: +SELECT * from loc1; + fields +--------------------------- + {"f1": "1", "f2": "test"} +(1 row) + +--Testcase 594: +DROP TRIGGER trig_null ON rem1_nsc; +--Testcase 595: +DELETE from rem1_nsc; +-- Test a combination of local and remote triggers +--Testcase 596: +CREATE TRIGGER trig_row_before +BEFORE INSERT OR UPDATE OR DELETE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 597: +CREATE TRIGGER trig_row_after +AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 598: +CREATE TRIGGER trig_local_before BEFORE INSERT OR UPDATE ON loc1_nsc +FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); +--Testcase 599: +INSERT INTO rem1_nsc(f2) VALUES ('test'); +NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1_nsc +NOTICE: NEW: (12,test) +NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1_nsc +NOTICE: NEW: (12,test) +--UPDATE rem1 SET f2 = 'testo'; +-- Test returning a system attribute +--Testcase 600: +INSERT INTO rem1_nsc(f2) VALUES ('test'); +NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1_nsc +NOTICE: NEW: (13,test) +NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1_nsc +NOTICE: NEW: (13,test) +--Testcase 601: +SELECT * FROM rem1 WHERE fields->>'f2' = 'test'; + fields +---------------------------- + {"f1": "12", "f2": "test"} + {"f1": "13", "f2": "test"} +(2 rows) + +-- cleanup +--Testcase 602: +DROP TRIGGER trig_row_before ON rem1_nsc; +--Testcase 603: +DROP TRIGGER trig_row_after ON rem1_nsc; +--Testcase 604: +DROP TRIGGER trig_local_before ON loc1_nsc; +-- Test direct foreign table modification functionality +--Testcase 774: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1_nsc + -> Foreign Delete on public.rem1_nsc + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 775: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc WHERE false; -- currently can't be pushed down + QUERY PLAN +-------------------------------- + Delete on public.rem1_nsc + -> Result + One-Time Filter: false +(3 rows) + +-- Test with statement-level triggers +--Testcase 605: +CREATE TRIGGER trig_stmt_before + BEFORE DELETE OR INSERT OR UPDATE ON rem1_nsc + FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 606: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1_nsc + -> Foreign Delete on public.rem1_nsc + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 607: +DROP TRIGGER trig_stmt_before ON rem1_nsc; +--Testcase 608: +CREATE TRIGGER trig_stmt_after + AFTER DELETE OR INSERT OR UPDATE ON rem1_nsc + FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 609: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1_nsc + -> Foreign Delete on public.rem1_nsc + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 610: +DROP TRIGGER trig_stmt_after ON rem1_nsc; +-- Test with row-level ON INSERT triggers +--Testcase 611: +CREATE TRIGGER trig_row_before_insert +BEFORE INSERT ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 612: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1_nsc + -> Foreign Delete on public.rem1_nsc + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 613: +DROP TRIGGER trig_row_before_insert ON rem1_nsc; +--Testcase 614: +CREATE TRIGGER trig_row_after_insert +AFTER INSERT ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 615: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1_nsc + -> Foreign Delete on public.rem1_nsc + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 616: +DROP TRIGGER trig_row_after_insert ON rem1_nsc; +-- Test with row-level ON UPDATE triggers +--Testcase 617: +CREATE TRIGGER trig_row_before_update +BEFORE UPDATE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can't be pushed down +--Testcase 618: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1_nsc + -> Foreign Delete on public.rem1_nsc + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 619: +DROP TRIGGER trig_row_before_update ON rem1_nsc; +--Testcase 620: +CREATE TRIGGER trig_row_after_update +AFTER UPDATE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can't be pushed down +--Testcase 621: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc; -- can be pushed down + QUERY PLAN +-------------------------------------------- + Delete on public.rem1_nsc + -> Foreign Delete on public.rem1_nsc + InfluxDB query: DELETE FROM "loc1" +(3 rows) + +--Testcase 622: +DROP TRIGGER trig_row_after_update ON rem1_nsc; +-- Test with row-level ON DELETE triggers +--Testcase 623: +CREATE TRIGGER trig_row_before_delete +BEFORE DELETE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 624: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc; -- can't be pushed down + QUERY PLAN +------------------------------------------------------- + Delete on public.rem1_nsc + -> Foreign Scan on public.rem1_nsc + Output: rem1_nsc.* + InfluxDB query: SELECT "f1", "f2" FROM "loc1" +(4 rows) + +--Testcase 625: +DROP TRIGGER trig_row_before_delete ON rem1_nsc; +--Testcase 626: +CREATE TRIGGER trig_row_after_delete +AFTER DELETE ON rem1_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--EXPLAIN (verbose, costs off) +--UPDATE rem1 set f2 = ''; -- can be pushed down +--Testcase 627: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc; -- can't be pushed down + QUERY PLAN +------------------------------------------------------- + Delete on public.rem1_nsc + -> Foreign Scan on public.rem1_nsc + Output: rem1_nsc.* + InfluxDB query: SELECT "f1", "f2" FROM "loc1" +(4 rows) + +--Testcase 628: +DROP TRIGGER trig_row_after_delete ON rem1_nsc; +-- =================================================================== +-- test inheritance features +-- =================================================================== +--Testcase 629: +CREATE TABLE a (aa TEXT); +--CREATE TABLE loct (aa TEXT, bb TEXT); +--Testcase 630: +ALTER TABLE a SET (autovacuum_enabled = 'false'); +--ALTER TABLE loct SET (autovacuum_enabled = 'false'); +-- Because influxdb_fdw does not support UPDATE, to test locally +-- we create local table. +--Testcase 631: +CREATE TABLE b (bb TEXT) INHERITS (a); +--Testcase 632: +INSERT INTO a(aa) VALUES('aaa'); +--Testcase 633: +INSERT INTO a(aa) VALUES('aaaa'); +--Testcase 634: +INSERT INTO a(aa) VALUES('aaaaa'); +--Testcase 635: +INSERT INTO b(aa) VALUES('bbb'); +--Testcase 636: +INSERT INTO b(aa) VALUES('bbbb'); +--Testcase 637: +INSERT INTO b(aa) VALUES('bbbbb'); +--Testcase 638: +SELECT tableoid::regclass, * FROM a; + tableoid | aa +----------+------- + a | aaa + a | aaaa + a | aaaaa + b | bbb + b | bbbb + b | bbbbb +(6 rows) + +--Testcase 639: +SELECT tableoid::regclass, * FROM b; + tableoid | aa | bb +----------+-------+---- + b | bbb | + b | bbbb | + b | bbbbb | +(3 rows) + +--Testcase 640: +SELECT tableoid::regclass, * FROM ONLY a; + tableoid | aa +----------+------- + a | aaa + a | aaaa + a | aaaaa +(3 rows) + +--Testcase 641: +UPDATE a SET aa = 'zzzzzz' WHERE aa LIKE 'aaaa%'; +--Testcase 642: +SELECT tableoid::regclass, * FROM a; + tableoid | aa +----------+-------- + a | aaa + a | zzzzzz + a | zzzzzz + b | bbb + b | bbbb + b | bbbbb +(6 rows) + +--Testcase 643: +SELECT tableoid::regclass, * FROM b; + tableoid | aa | bb +----------+-------+---- + b | bbb | + b | bbbb | + b | bbbbb | +(3 rows) + +--Testcase 644: +SELECT tableoid::regclass, * FROM ONLY a; + tableoid | aa +----------+-------- + a | aaa + a | zzzzzz + a | zzzzzz +(3 rows) + +--Testcase 645: +UPDATE b SET aa = 'new'; +--Testcase 646: +SELECT tableoid::regclass, * FROM a; + tableoid | aa +----------+-------- + a | aaa + a | zzzzzz + a | zzzzzz + b | new + b | new + b | new +(6 rows) + +--Testcase 647: +SELECT tableoid::regclass, * FROM b; + tableoid | aa | bb +----------+-----+---- + b | new | + b | new | + b | new | +(3 rows) + +--Testcase 648: +SELECT tableoid::regclass, * FROM ONLY a; + tableoid | aa +----------+-------- + a | aaa + a | zzzzzz + a | zzzzzz +(3 rows) + +--Testcase 649: +UPDATE a SET aa = 'newtoo'; +--Testcase 650: +SELECT tableoid::regclass, * FROM a; + tableoid | aa +----------+-------- + a | newtoo + a | newtoo + a | newtoo + b | newtoo + b | newtoo + b | newtoo +(6 rows) + +--Testcase 651: +SELECT tableoid::regclass, * FROM b; + tableoid | aa | bb +----------+--------+---- + b | newtoo | + b | newtoo | + b | newtoo | +(3 rows) + +--Testcase 652: +SELECT tableoid::regclass, * FROM ONLY a; + tableoid | aa +----------+-------- + a | newtoo + a | newtoo + a | newtoo +(3 rows) + +--Testcase 653: +DELETE FROM a; +--Testcase 654: +SELECT tableoid::regclass, * FROM a; + tableoid | aa +----------+---- +(0 rows) + +--Testcase 655: +SELECT tableoid::regclass, * FROM b; + tableoid | aa | bb +----------+----+---- +(0 rows) + +--Testcase 656: +SELECT tableoid::regclass, * FROM ONLY a; + tableoid | aa +----------+---- +(0 rows) + +--Testcase 657: +DROP TABLE a CASCADE; +NOTICE: drop cascades to table b +--DROP TABLE loct; +-- Check SELECT FOR UPDATE/SHARE with an inherited source table +--Testcase 658: +create foreign table loct1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct1', schemaless 'true'); +--Testcase 807: +create foreign table loct1_nsc (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct1'); +--Testcase 659: +create foreign table loct2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct2', schemaless 'true'); +--Testcase 808: +create foreign table loct2_nsc (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct2'); +--alter table loct1 set (autovacuum_enabled = 'false'); +--alter table loct2 set (autovacuum_enabled = 'false'); +--Testcase 660: +create foreign table foo (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'foo', schemaless 'true'); +--Testcase 809: +create foreign table foo_nsc (f1 int, f2 int) + server influxdb_svr options (table 'foo'); +--Testcase 661: +create foreign table foo2 (fields jsonb OPTIONS(fields 'true')) inherits (foo) + server influxdb_svr options (table 'loct1', schemaless 'true'); +NOTICE: merging column "fields" with inherited definition +--Testcase 810: +create foreign table foo2_nsc (f3 int) inherits (foo_nsc) + server influxdb_svr options (table 'loct1'); +--Testcase 662: +create foreign table bar (fields jsonb OPTIONS(fields 'true')) + server influxdb_svr options (table 'bar', schemaless 'true'); +--Testcase 811: +create foreign table bar_nsc (f1 int, f2 int) + server influxdb_svr options (table 'bar'); +--Testcase 663: +create foreign table bar2 (fields jsonb OPTIONS(fields 'true')) inherits (bar) + server influxdb_svr options (table 'loct2', schemaless 'true'); +NOTICE: merging column "fields" with inherited definition +--Testcase 812: +create foreign table bar2_nsc (f3 int) inherits (bar_nsc) + server influxdb_svr options (table 'loct2'); +--alter table foo set (autovacuum_enabled = 'false'); +--alter table bar set (autovacuum_enabled = 'false'); +--Testcase 664: +insert into foo_nsc values(1,1); +--Testcase 665: +insert into foo_nsc values(3,3); +--Testcase 666: +insert into foo2_nsc values(2,2,2); +--Testcase 667: +insert into foo2_nsc values(4,4,4); +--Testcase 668: +insert into bar_nsc values(1,11); +--Testcase 669: +insert into bar_nsc values(2,22); +--Testcase 670: +insert into bar_nsc values(6,66); +--Testcase 671: +insert into bar2_nsc values(3,33,33); +--Testcase 672: +insert into bar2_nsc values(4,44,44); +--Testcase 673: +insert into bar2_nsc values(7,77,77); +--Testcase 674: +explain (verbose, costs off) +select * from bar where fields->>'f1' in (select fields->>'f1' from foo); + QUERY PLAN +-------------------------------------------------------------------------- + Hash Join + Output: bar.fields + Inner Unique: true + Hash Cond: ((bar.fields ->> 'f1'::text) = (foo.fields ->> 'f1'::text)) + -> Append + -> Foreign Scan on public.bar bar_1 + Output: bar_1.fields + InfluxDB query: SELECT * FROM "bar" + -> Foreign Scan on public.bar2 bar_2 + Output: bar_2.fields + InfluxDB query: SELECT * FROM "loct2" + -> Hash + Output: foo.fields + -> HashAggregate + Output: foo.fields + Group Key: (foo.fields ->> 'f1'::text) + -> Result + Output: foo.fields, (foo.fields ->> 'f1'::text) + -> Append + -> Foreign Scan on public.foo foo_1 + Output: foo_1.fields + InfluxDB query: SELECT * FROM "foo" + -> Foreign Scan on public.foo2 foo_2 + Output: foo_2.fields + InfluxDB query: SELECT * FROM "loct1" +(25 rows) + +--Testcase 675: +select * from bar where fields->>'f1' in (select fields->>'f1' from foo); + fields +------------------------------------- + {"f1": "1", "f2": "11"} + {"f1": "2", "f2": "22"} + {"f1": "3", "f2": "33", "f3": "33"} + {"f1": "4", "f2": "44", "f3": "44"} +(4 rows) + +--Testcase 676: +explain (verbose, costs off) +select * from bar where fields->>'f1' in (select fields->>'f1' from foo); + QUERY PLAN +-------------------------------------------------------------------------- + Hash Join + Output: bar.fields + Inner Unique: true + Hash Cond: ((bar.fields ->> 'f1'::text) = (foo.fields ->> 'f1'::text)) + -> Append + -> Foreign Scan on public.bar bar_1 + Output: bar_1.fields + InfluxDB query: SELECT * FROM "bar" + -> Foreign Scan on public.bar2 bar_2 + Output: bar_2.fields + InfluxDB query: SELECT * FROM "loct2" + -> Hash + Output: foo.fields + -> HashAggregate + Output: foo.fields + Group Key: (foo.fields ->> 'f1'::text) + -> Result + Output: foo.fields, (foo.fields ->> 'f1'::text) + -> Append + -> Foreign Scan on public.foo foo_1 + Output: foo_1.fields + InfluxDB query: SELECT * FROM "foo" + -> Foreign Scan on public.foo2 foo_2 + Output: foo_2.fields + InfluxDB query: SELECT * FROM "loct1" +(25 rows) + +--Testcase 677: +select * from bar where fields->>'f1' in (select fields->>'f1' from foo); + fields +------------------------------------- + {"f1": "1", "f2": "11"} + {"f1": "2", "f2": "22"} + {"f1": "3", "f2": "33", "f3": "33"} + {"f1": "4", "f2": "44", "f3": "44"} +(4 rows) + +-- Now check SELECT FOR UPDATE/SHARE with an inherited source table, +-- where the parent is itself a foreign table +--Testcase 678: +create foreign table foo2child (fields jsonb OPTIONS(fields 'true')) inherits (foo2) + server influxdb_svr options (table 'loct4', schemaless 'true'); +NOTICE: merging column "fields" with inherited definition +--Testcase 679: +explain (verbose, costs off) +select * from bar where fields->>'f1' in (select fields->>'f1' from foo2) for share; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + LockRows + Output: bar.fields, bar.*, foo2.*, bar.tableoid, foo2.tableoid + -> Hash Join + Output: bar.fields, bar.*, foo2.*, bar.tableoid, foo2.tableoid + Inner Unique: true + Hash Cond: ((bar.fields ->> 'f1'::text) = (foo2.fields ->> 'f1'::text)) + -> Append + -> Foreign Scan on public.bar bar_1 + Output: bar_1.fields, bar_1.*, bar_1.tableoid + InfluxDB query: SELECT * FROM "bar" + -> Foreign Scan on public.bar2 bar_2 + Output: bar_2.fields, bar_2.*, bar_2.tableoid + InfluxDB query: SELECT * FROM "loct2" + -> Hash + Output: foo2.*, foo2.fields, foo2.tableoid + -> HashAggregate + Output: foo2.*, foo2.fields, foo2.tableoid + Group Key: (foo2.fields ->> 'f1'::text) + -> Result + Output: foo2.*, foo2.fields, foo2.tableoid, (foo2.fields ->> 'f1'::text) + -> Append + -> Foreign Scan on public.foo2 foo2_1 + Output: foo2_1.*, foo2_1.fields, foo2_1.tableoid + InfluxDB query: SELECT * FROM "loct1" + -> Foreign Scan on public.foo2child foo2_2 + Output: foo2_2.*, foo2_2.fields, foo2_2.tableoid + InfluxDB query: SELECT * FROM "loct4" +(27 rows) + +--Testcase 680: +select * from bar where fields->>'f1' in (select fields->>'f1' from foo2) for share; + fields +------------------------------------- + {"f1": "2", "f2": "22"} + {"f1": "4", "f2": "44", "f3": "44"} +(2 rows) + +--Testcase 681: +drop foreign table foo2child; +-- And with a local child relation of the foreign table parent +--Testcase 682: +create foreign table foo2child (fields jsonb OPTIONS(fields 'true')) inherits (foo2) + server influxdb_svr options (table 'foo2child', schemaless 'true'); +NOTICE: merging column "fields" with inherited definition +--Testcase 683: +explain (verbose, costs off) +select * from bar where fields->>'f1' in (select fields->>'f1' from foo2) for share; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + LockRows + Output: bar.fields, bar.*, foo2.*, bar.tableoid, foo2.tableoid + -> Hash Join + Output: bar.fields, bar.*, foo2.*, bar.tableoid, foo2.tableoid + Inner Unique: true + Hash Cond: ((bar.fields ->> 'f1'::text) = (foo2.fields ->> 'f1'::text)) + -> Append + -> Foreign Scan on public.bar bar_1 + Output: bar_1.fields, bar_1.*, bar_1.tableoid + InfluxDB query: SELECT * FROM "bar" + -> Foreign Scan on public.bar2 bar_2 + Output: bar_2.fields, bar_2.*, bar_2.tableoid + InfluxDB query: SELECT * FROM "loct2" + -> Hash + Output: foo2.*, foo2.fields, foo2.tableoid + -> HashAggregate + Output: foo2.*, foo2.fields, foo2.tableoid + Group Key: (foo2.fields ->> 'f1'::text) + -> Result + Output: foo2.*, foo2.fields, foo2.tableoid, (foo2.fields ->> 'f1'::text) + -> Append + -> Foreign Scan on public.foo2 foo2_1 + Output: foo2_1.*, foo2_1.fields, foo2_1.tableoid + InfluxDB query: SELECT * FROM "loct1" + -> Foreign Scan on public.foo2child foo2_2 + Output: foo2_2.*, foo2_2.fields, foo2_2.tableoid + InfluxDB query: SELECT * FROM "foo2child" +(27 rows) + +--Testcase 684: +select * from bar where fields->>'f1' in (select fields->>'f1' from foo2) for share; + fields +------------------------------------- + {"f1": "2", "f2": "22"} + {"f1": "4", "f2": "44", "f3": "44"} +(2 rows) + +--Testcase 685: +drop foreign table foo2child; +/* +-- influxdb_fdw does not support UPDATE +-- Check UPDATE with inherited target and an inherited source table +explain (verbose, costs off) +update bar set f2 = f2 + 100 where f1 in (select f1 from foo); +update bar set f2 = f2 + 100 where f1 in (select f1 from foo); + +select tableoid::regclass, * from bar order by 1,2; + +-- Check UPDATE with inherited target and an appendrel subquery +explain (verbose, costs off) +update bar set f2 = f2 + 100 +from + ( select f1 from foo union all select f1+3 from foo ) ss +where bar.f1 = ss.f1; +update bar set f2 = f2 + 100 +from + ( select f1 from foo union all select f1+3 from foo ) ss +where bar.f1 = ss.f1; + +select tableoid::regclass, * from bar order by 1,2; + +-- Test forcing the remote server to produce sorted data for a merge join, +-- but the foreign table is an inheritance child. +truncate table loct1; +truncate table only foo; +\set num_rows_foo 2000 +insert into loct1 select generate_series(0, :num_rows_foo, 2), generate_series(0, :num_rows_foo, 2), generate_series(0, :num_rows_foo, 2); +insert into foo select generate_series(1, :num_rows_foo, 2), generate_series(1, :num_rows_foo, 2); +SET enable_hashjoin to false; +SET enable_nestloop to false; +alter foreign table foo2 options (use_remote_estimate 'true'); +create index i_loct1_f1 on loct1(f1); +create index i_foo_f1 on foo(f1); +analyze foo; +analyze loct1; +-- inner join; expressions in the clauses appear in the equivalence class list +explain (verbose, costs off) + select foo.f1, loct1.f1 from foo join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; +select foo.f1, loct1.f1 from foo join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; +-- outer join; expressions in the clauses do not appear in equivalence class +-- list but no output change as compared to the previous query +explain (verbose, costs off) + select foo.f1, loct1.f1 from foo left join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; +select foo.f1, loct1.f1 from foo left join loct1 on (foo.f1 = loct1.f1) order by foo.f2 offset 10 limit 10; +RESET enable_hashjoin; +RESET enable_nestloop; + +-- Test that WHERE CURRENT OF is not supported +begin; +declare c cursor for select * from bar where f1 = 7; +fetch from c; +update bar set f2 = null where current of c; +rollback; + +explain (verbose, costs off) +delete from foo where f1 < 5 returning *; +delete from foo where f1 < 5 returning *; +explain (verbose, costs off) +update bar set f2 = f2 + 100 returning *; +update bar set f2 = f2 + 100 returning *; + +-- Test that UPDATE/DELETE with inherited target works with row-level triggers +CREATE TRIGGER trig_row_before +BEFORE UPDATE OR DELETE ON bar2 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); + +CREATE TRIGGER trig_row_after +AFTER UPDATE OR DELETE ON bar2 +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); + +explain (verbose, costs off) +update bar set f2 = f2 + 100; +update bar set f2 = f2 + 100; + +explain (verbose, costs off) +delete from bar where f2 < 400; +delete from bar where f2 < 400; + +-- cleanup +drop table foo cascade; +drop table bar cascade; +drop table loct1; +drop table loct2; + +-- Test pushing down UPDATE/DELETE joins to the remote server +create table parent (a int, b text); +create table loct1 (a int, b text); +create table loct2 (a int, b text); +create foreign table remt1 (a int, b text) + server influxdb_svr options (table 'loct1'); +create foreign table remt2 (a int, b text) + server influxdb_svr options (table 'loct2'); +alter foreign table remt1 inherit parent; + +insert into remt1 values (1, 'foo'); +insert into remt1 values (2, 'bar'); +insert into remt2 values (1, 'foo'); +insert into remt2 values (2, 'bar'); + +analyze remt1; +analyze remt2; + +explain (verbose, costs off) +update parent set b = parent.b || remt2.b from remt2 where parent.a = remt2.a returning *; +update parent set b = parent.b || remt2.b from remt2 where parent.a = remt2.a returning *; +explain (verbose, costs off) +delete from parent using remt2 where parent.a = remt2.a returning parent; +delete from parent using remt2 where parent.a = remt2.a returning parent; + +-- cleanup +drop foreign table remt1; +drop foreign table remt2; +drop table loct1; +drop table loct2; +drop table parent; +*/ +/* +-- Skip test because influxdb does not support partitions table, COPY +-- =================================================================== +-- test tuple routing for foreign-table partitions +-- =================================================================== + +-- Test insert tuple routing +create table itrtest (a int, b text) partition by list (a); +create table loct1 (a int check (a in (1)), b text); +create foreign table remp1 (a int check (a in (1)), b text) server loopback options (table_name 'loct1'); +create table loct2 (a int check (a in (2)), b text); +create foreign table remp2 (b text, a int check (a in (2))) server loopback options (table_name 'loct2'); +alter table itrtest attach partition remp1 for values in (1); +alter table itrtest attach partition remp2 for values in (2); + +insert into itrtest values (1, 'foo'); +insert into itrtest values (1, 'bar') returning *; +insert into itrtest values (2, 'baz'); +insert into itrtest values (2, 'qux') returning *; +insert into itrtest values (1, 'test1'), (2, 'test2') returning *; + +select tableoid::regclass, * FROM itrtest; +select tableoid::regclass, * FROM remp1; +select tableoid::regclass, * FROM remp2; + +delete from itrtest; + +create unique index loct1_idx on loct1 (a); + +-- DO NOTHING without an inference specification is supported +insert into itrtest values (1, 'foo') on conflict do nothing returning *; +insert into itrtest values (1, 'foo') on conflict do nothing returning *; + +-- But other cases are not supported +insert into itrtest values (1, 'bar') on conflict (a) do nothing; +insert into itrtest values (1, 'bar') on conflict (a) do update set b = excluded.b; + +select tableoid::regclass, * FROM itrtest; + +delete from itrtest; + +drop index loct1_idx; + +-- Test that remote triggers work with insert tuple routing +create function br_insert_trigfunc() returns trigger as $$ +begin + new.b := new.b || ' triggered !'; + return new; +end +$$ language plpgsql; +create trigger loct1_br_insert_trigger before insert on loct1 + for each row execute procedure br_insert_trigfunc(); +create trigger loct2_br_insert_trigger before insert on loct2 + for each row execute procedure br_insert_trigfunc(); + +-- The new values are concatenated with ' triggered !' +insert into itrtest values (1, 'foo') returning *; +insert into itrtest values (2, 'qux') returning *; +insert into itrtest values (1, 'test1'), (2, 'test2') returning *; +with result as (insert into itrtest values (1, 'test1'), (2, 'test2') returning *) select * from result; + +drop trigger loct1_br_insert_trigger on loct1; +drop trigger loct2_br_insert_trigger on loct2; + +drop table itrtest; +drop table loct1; +drop table loct2; + +-- Test update tuple routing +create table utrtest (a int, b text) partition by list (a); +create table loct (a int check (a in (1)), b text); +create foreign table remp (a int check (a in (1)), b text) server loopback options (table_name 'loct'); +create table locp (a int check (a in (2)), b text); +alter table utrtest attach partition remp for values in (1); +alter table utrtest attach partition locp for values in (2); + +insert into utrtest values (1, 'foo'); +insert into utrtest values (2, 'qux'); + +select tableoid::regclass, * FROM utrtest; +select tableoid::regclass, * FROM remp; +select tableoid::regclass, * FROM locp; + +-- It's not allowed to move a row from a partition that is foreign to another +update utrtest set a = 2 where b = 'foo' returning *; + +-- But the reverse is allowed +update utrtest set a = 1 where b = 'qux' returning *; + +select tableoid::regclass, * FROM utrtest; +select tableoid::regclass, * FROM remp; +select tableoid::regclass, * FROM locp; + +-- The executor should not let unexercised FDWs shut down +update utrtest set a = 1 where b = 'foo'; + +-- Test that remote triggers work with update tuple routing +create trigger loct_br_insert_trigger before insert on loct + for each row execute procedure br_insert_trigfunc(); + +delete from utrtest; +insert into utrtest values (2, 'qux'); + +-- Check case where the foreign partition is a subplan target rel +explain (verbose, costs off) +update utrtest set a = 1 where a = 1 or a = 2 returning *; +-- The new values are concatenated with ' triggered !' +update utrtest set a = 1 where a = 1 or a = 2 returning *; + +delete from utrtest; +insert into utrtest values (2, 'qux'); + +-- Check case where the foreign partition isn't a subplan target rel +explain (verbose, costs off) +update utrtest set a = 1 where a = 2 returning *; +-- The new values are concatenated with ' triggered !' +update utrtest set a = 1 where a = 2 returning *; + +drop trigger loct_br_insert_trigger on loct; + +-- We can move rows to a foreign partition that has been updated already, +-- but can't move rows to a foreign partition that hasn't been updated yet + +delete from utrtest; +insert into utrtest values (1, 'foo'); +insert into utrtest values (2, 'qux'); + +-- Test the former case: +-- with a direct modification plan +explain (verbose, costs off) +update utrtest set a = 1 returning *; +update utrtest set a = 1 returning *; + +delete from utrtest; +insert into utrtest values (1, 'foo'); +insert into utrtest values (2, 'qux'); + +-- with a non-direct modification plan +explain (verbose, costs off) +update utrtest set a = 1 from (values (1), (2)) s(x) where a = s.x returning *; +update utrtest set a = 1 from (values (1), (2)) s(x) where a = s.x returning *; + +-- Change the definition of utrtest so that the foreign partition get updated +-- after the local partition +delete from utrtest; +alter table utrtest detach partition remp; +drop foreign table remp; +alter table loct drop constraint loct_a_check; +alter table loct add check (a in (3)); +create foreign table remp (a int check (a in (3)), b text) server loopback options (table_name 'loct'); +alter table utrtest attach partition remp for values in (3); +insert into utrtest values (2, 'qux'); +insert into utrtest values (3, 'xyzzy'); + +-- Test the latter case: +-- with a direct modification plan +explain (verbose, costs off) +update utrtest set a = 3 returning *; +update utrtest set a = 3 returning *; -- ERROR + +-- with a non-direct modification plan +explain (verbose, costs off) +update utrtest set a = 3 from (values (2), (3)) s(x) where a = s.x returning *; +update utrtest set a = 3 from (values (2), (3)) s(x) where a = s.x returning *; -- ERROR + +drop table utrtest; +drop table loct; + +-- Test copy tuple routing +create table ctrtest (a int, b text) partition by list (a); +create table loct1 (a int check (a in (1)), b text); +create foreign table remp1 (a int check (a in (1)), b text) server loopback options (table_name 'loct1'); +create table loct2 (a int check (a in (2)), b text); +create foreign table remp2 (b text, a int check (a in (2))) server loopback options (table_name 'loct2'); +alter table ctrtest attach partition remp1 for values in (1); +alter table ctrtest attach partition remp2 for values in (2); + +copy ctrtest from stdin; +1 foo +2 qux +\. + +select tableoid::regclass, * FROM ctrtest; +select tableoid::regclass, * FROM remp1; +select tableoid::regclass, * FROM remp2; + +-- Copying into foreign partitions directly should work as well +copy remp1 from stdin; +1 bar +\. + +select tableoid::regclass, * FROM remp1; + +drop table ctrtest; +drop table loct1; +drop table loct2; + +-- =================================================================== +-- test COPY FROM +-- =================================================================== + +create table loc2 (f1 int, f2 text); +alter table loc2 set (autovacuum_enabled = 'false'); +create foreign table rem2 (f1 int, f2 text) server loopback options(table_name 'loc2'); + +-- Test basic functionality +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +delete from rem2; + +-- Test check constraints +alter table loc2 add constraint loc2_f1positive check (f1 >= 0); +alter foreign table rem2 add constraint rem2_f1positive check (f1 >= 0); + +-- check constraint is enforced on the remote side, not locally +copy rem2 from stdin; +1 foo +2 bar +\. +copy rem2 from stdin; -- ERROR +-1 xyzzy +\. +select * from rem2; + +alter foreign table rem2 drop constraint rem2_f1positive; +alter table loc2 drop constraint loc2_f1positive; + +delete from rem2; + +-- Test local triggers +create trigger trig_stmt_before before insert on rem2 + for each statement execute procedure trigger_func(); +create trigger trig_stmt_after after insert on rem2 + for each statement execute procedure trigger_func(); +create trigger trig_row_before before insert on rem2 + for each row execute procedure trigger_data(23,'skidoo'); +create trigger trig_row_after after insert on rem2 + for each row execute procedure trigger_data(23,'skidoo'); + +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger trig_row_before on rem2; +drop trigger trig_row_after on rem2; +drop trigger trig_stmt_before on rem2; +drop trigger trig_stmt_after on rem2; + +delete from rem2; + +create trigger trig_row_before_insert before insert on rem2 + for each row execute procedure trig_row_before_insupdate(); + +-- The new values are concatenated with ' triggered !' +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger trig_row_before_insert on rem2; + +delete from rem2; + +create trigger trig_null before insert on rem2 + for each row execute procedure trig_null(); + +-- Nothing happens +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger trig_null on rem2; + +delete from rem2; + +-- Test remote triggers +create trigger trig_row_before_insert before insert on loc2 + for each row execute procedure trig_row_before_insupdate(); + +-- The new values are concatenated with ' triggered !' +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger trig_row_before_insert on loc2; + +delete from rem2; + +create trigger trig_null before insert on loc2 + for each row execute procedure trig_null(); + +-- Nothing happens +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger trig_null on loc2; + +delete from rem2; + +-- Test a combination of local and remote triggers +create trigger rem2_trig_row_before before insert on rem2 + for each row execute procedure trigger_data(23,'skidoo'); +create trigger rem2_trig_row_after after insert on rem2 + for each row execute procedure trigger_data(23,'skidoo'); +create trigger loc2_trig_row_before_insert before insert on loc2 + for each row execute procedure trig_row_before_insupdate(); + +copy rem2 from stdin; +1 foo +2 bar +\. +select * from rem2; + +drop trigger rem2_trig_row_before on rem2; +drop trigger rem2_trig_row_after on rem2; +drop trigger loc2_trig_row_before_insert on loc2; + +delete from rem2; + +-- test COPY FROM with foreign table created in the same transaction +create table loc3 (f1 int, f2 text); +begin; +create foreign table rem3 (f1 int, f2 text) + server loopback options(table_name 'loc3'); +copy rem3 from stdin; +1 foo +2 bar +\. +commit; +select * from rem3; +drop foreign table rem3; +drop table loc3; +*/ +/* +-- Skip test because influxdb does not support TRUNCATE +-- =================================================================== +-- test for TRUNCATE +-- =================================================================== +CREATE TABLE tru_rtable0 (id int primary key); +CREATE FOREIGN TABLE tru_ftable (id int) + SERVER loopback OPTIONS (table_name 'tru_rtable0'); +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(1,10) x); + +CREATE TABLE tru_ptable (id int) PARTITION BY HASH(id); +CREATE TABLE tru_ptable__p0 PARTITION OF tru_ptable + FOR VALUES WITH (MODULUS 2, REMAINDER 0); +CREATE TABLE tru_rtable1 (id int primary key); +CREATE FOREIGN TABLE tru_ftable__p1 PARTITION OF tru_ptable + FOR VALUES WITH (MODULUS 2, REMAINDER 1) + SERVER loopback OPTIONS (table_name 'tru_rtable1'); +INSERT INTO tru_ptable (SELECT x FROM generate_series(11,20) x); + +CREATE TABLE tru_pk_table(id int primary key); +CREATE TABLE tru_fk_table(fkey int references tru_pk_table(id)); +INSERT INTO tru_pk_table (SELECT x FROM generate_series(1,10) x); +INSERT INTO tru_fk_table (SELECT x % 10 + 1 FROM generate_series(5,25) x); +CREATE FOREIGN TABLE tru_pk_ftable (id int) + SERVER loopback OPTIONS (table_name 'tru_pk_table'); + +CREATE TABLE tru_rtable_parent (id int); +CREATE TABLE tru_rtable_child (id int); +CREATE FOREIGN TABLE tru_ftable_parent (id int) + SERVER loopback OPTIONS (table_name 'tru_rtable_parent'); +CREATE FOREIGN TABLE tru_ftable_child () INHERITS (tru_ftable_parent) + SERVER loopback OPTIONS (table_name 'tru_rtable_child'); +INSERT INTO tru_rtable_parent (SELECT x FROM generate_series(1,8) x); +INSERT INTO tru_rtable_child (SELECT x FROM generate_series(10, 18) x); + +-- normal truncate +SELECT sum(id) FROM tru_ftable; -- 55 +TRUNCATE tru_ftable; +SELECT count(*) FROM tru_rtable0; -- 0 +SELECT count(*) FROM tru_ftable; -- 0 + +-- 'truncatable' option +ALTER SERVER loopback OPTIONS (ADD truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER FOREIGN TABLE tru_ftable OPTIONS (ADD truncatable 'true'); +TRUNCATE tru_ftable; -- accepted +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER SERVER loopback OPTIONS (DROP truncatable); +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'true'); +TRUNCATE tru_ftable; -- accepted + +-- partitioned table with both local and foreign tables as partitions +SELECT sum(id) FROM tru_ptable; -- 155 +TRUNCATE tru_ptable; +SELECT count(*) FROM tru_ptable; -- 0 +SELECT count(*) FROM tru_ptable__p0; -- 0 +SELECT count(*) FROM tru_ftable__p1; -- 0 +SELECT count(*) FROM tru_rtable1; -- 0 + +-- 'CASCADE' option +SELECT sum(id) FROM tru_pk_ftable; -- 55 +TRUNCATE tru_pk_ftable; -- failed by FK reference +TRUNCATE tru_pk_ftable CASCADE; +SELECT count(*) FROM tru_pk_ftable; -- 0 +SELECT count(*) FROM tru_fk_table; -- also truncated,0 + +-- truncate two tables at a command +INSERT INTO tru_ftable (SELECT x FROM generate_series(1,8) x); +INSERT INTO tru_pk_ftable (SELECT x FROM generate_series(3,10) x); +SELECT count(*) from tru_ftable; -- 8 +SELECT count(*) from tru_pk_ftable; -- 8 +TRUNCATE tru_ftable, tru_pk_ftable CASCADE; +SELECT count(*) from tru_ftable; -- 0 +SELECT count(*) from tru_pk_ftable; -- 0 + +-- truncate with ONLY clause +-- Since ONLY is specified, the table tru_ftable_child that inherits +-- tru_ftable_parent locally is not truncated. +TRUNCATE ONLY tru_ftable_parent; +SELECT sum(id) FROM tru_ftable_parent; -- 126 +TRUNCATE tru_ftable_parent; +SELECT count(*) FROM tru_ftable_parent; -- 0 + +-- in case when remote table has inherited children +CREATE TABLE tru_rtable0_child () INHERITS (tru_rtable0); +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(5,9) x); +INSERT INTO tru_rtable0_child (SELECT x FROM generate_series(10,14) x); +SELECT sum(id) FROM tru_ftable; -- 95 + +-- Both parent and child tables in the foreign server are truncated +-- even though ONLY is specified because ONLY has no effect +-- when truncating a foreign table. +TRUNCATE ONLY tru_ftable; +SELECT count(*) FROM tru_ftable; -- 0 + +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(21,25) x); +INSERT INTO tru_rtable0_child (SELECT x FROM generate_series(26,30) x); +SELECT sum(id) FROM tru_ftable; -- 255 +TRUNCATE tru_ftable; -- truncate both of parent and child +SELECT count(*) FROM tru_ftable; -- 0 + +-- cleanup +DROP FOREIGN TABLE tru_ftable_parent, tru_ftable_child, tru_pk_ftable,tru_ftable__p1,tru_ftable; +DROP TABLE tru_rtable0, tru_rtable1, tru_ptable, tru_ptable__p0, tru_pk_table, tru_fk_table, +tru_rtable_parent,tru_rtable_child, tru_rtable0_child; +*/ +-- =================================================================== +-- test IMPORT FOREIGN SCHEMA +-- =================================================================== +--Testcase 686: +CREATE SCHEMA import_influx1; +IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx1 OPTIONS (schemaless 'true'); +--Testcase 687: +\det+ import_influx1.* + List of foreign tables + Schema | Table | Server | FDW options | Description +----------------+-------+--------------+----------------------------------------------+------------- + import_influx1 | T1 | influxdb_svr | ("table" 'T1', schemaless 'true', tags 'c3') | + import_influx1 | T2 | influxdb_svr | ("table" 'T2', schemaless 'true', tags 'c2') | + import_influx1 | T3 | influxdb_svr | ("table" 'T3', schemaless 'true', tags 'c3') | + import_influx1 | T4 | influxdb_svr | ("table" 'T4', schemaless 'true', tags 'c3') | + import_influx1 | bar | influxdb_svr | ("table" 'bar', schemaless 'true') | + import_influx1 | foo | influxdb_svr | ("table" 'foo', schemaless 'true') | + import_influx1 | loc1 | influxdb_svr | ("table" 'loc1', schemaless 'true') | + import_influx1 | loct1 | influxdb_svr | ("table" 'loct1', schemaless 'true') | + import_influx1 | loct2 | influxdb_svr | ("table" 'loct2', schemaless 'true') | +(9 rows) + +--Testcase 688: +\d import_influx1.* + Foreign table "import_influx1.T1" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: influxdb_svr +FDW options: ("table" 'T1', schemaless 'true', tags 'c3') + + Foreign table "import_influx1.T2" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: influxdb_svr +FDW options: ("table" 'T2', schemaless 'true', tags 'c2') + + Foreign table "import_influx1.T3" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: influxdb_svr +FDW options: ("table" 'T3', schemaless 'true', tags 'c3') + + Foreign table "import_influx1.T4" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: influxdb_svr +FDW options: ("table" 'T4', schemaless 'true', tags 'c3') + + Foreign table "import_influx1.bar" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: influxdb_svr +FDW options: ("table" 'bar', schemaless 'true') + + Foreign table "import_influx1.foo" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: influxdb_svr +FDW options: ("table" 'foo', schemaless 'true') + + Foreign table "import_influx1.loc1" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: influxdb_svr +FDW options: ("table" 'loc1', schemaless 'true') + + Foreign table "import_influx1.loct1" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: influxdb_svr +FDW options: ("table" 'loct1', schemaless 'true') + + Foreign table "import_influx1.loct2" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: influxdb_svr +FDW options: ("table" 'loct2', schemaless 'true') + +-- Options +--Testcase 689: +CREATE SCHEMA import_influx2; +IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx2 + OPTIONS (import_default 'true', schemaless 'true'); +ERROR: invalid option "import_default" +--Testcase 690: +\det+ import_influx2.* + List of foreign tables + Schema | Table | Server | FDW options | Description +--------+-------+--------+-------------+------------- +(0 rows) + +--Testcase 691: +\d import_influx2.* +--Testcase 692: +CREATE SCHEMA import_influx3; +IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx3 + OPTIONS (import_collate 'false', import_not_null 'false', schemaless 'true'); +ERROR: invalid option "import_collate" +--Testcase 693: +\det+ import_influx3.* + List of foreign tables + Schema | Table | Server | FDW options | Description +--------+-------+--------+-------------+------------- +(0 rows) + +--Testcase 694: +\d import_influx3.* +-- Check LIMIT TO and EXCEPT +--Testcase 695: +CREATE SCHEMA import_influx4; +IMPORT FOREIGN SCHEMA public LIMIT TO ("T1", loct, nonesuch) + FROM SERVER influxdb_svr INTO import_influx4 OPTIONS (schemaless 'true'); +--Testcase 696: +\det+ import_influx4.* + List of foreign tables + Schema | Table | Server | FDW options | Description +----------------+-------+--------------+----------------------------------------------+------------- + import_influx4 | T1 | influxdb_svr | ("table" 'T1', schemaless 'true', tags 'c3') | +(1 row) + +IMPORT FOREIGN SCHEMA public EXCEPT ("T1", loct, nonesuch) + FROM SERVER influxdb_svr INTO import_influx4 OPTIONS (schemaless 'true'); +--Testcase 697: +\det+ import_influx4.* + List of foreign tables + Schema | Table | Server | FDW options | Description +----------------+-------+--------------+----------------------------------------------+------------- + import_influx4 | T1 | influxdb_svr | ("table" 'T1', schemaless 'true', tags 'c3') | + import_influx4 | T2 | influxdb_svr | ("table" 'T2', schemaless 'true', tags 'c2') | + import_influx4 | T3 | influxdb_svr | ("table" 'T3', schemaless 'true', tags 'c3') | + import_influx4 | T4 | influxdb_svr | ("table" 'T4', schemaless 'true', tags 'c3') | + import_influx4 | bar | influxdb_svr | ("table" 'bar', schemaless 'true') | + import_influx4 | foo | influxdb_svr | ("table" 'foo', schemaless 'true') | + import_influx4 | loc1 | influxdb_svr | ("table" 'loc1', schemaless 'true') | + import_influx4 | loct1 | influxdb_svr | ("table" 'loct1', schemaless 'true') | + import_influx4 | loct2 | influxdb_svr | ("table" 'loct2', schemaless 'true') | +(9 rows) + +-- Assorted error cases +IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx4 OPTIONS (schemaless 'true'); +ERROR: relation "T1" already exists +CONTEXT: importing foreign table "T1" +IMPORT FOREIGN SCHEMA nonesuch FROM SERVER influxdb_svr INTO import_influx4 OPTIONS (schemaless 'true'); +ERROR: relation "T1" already exists +CONTEXT: importing foreign table "T1" +IMPORT FOREIGN SCHEMA nonesuch FROM SERVER influxdb_svr INTO notthere OPTIONS (schemaless 'true'); +ERROR: schema "notthere" does not exist +IMPORT FOREIGN SCHEMA nonesuch FROM SERVER nowhere INTO notthere OPTIONS (schemaless 'true'); +ERROR: server "nowhere" does not exist +/* +-- Skip these test, influxdb_fdw does not support fetch_size option, partition table +-- Check case of a type present only on the remote server. +-- We can fake this by dropping the type locally in our transaction. +CREATE TYPE "Colors" AS ENUM ('red', 'green', 'blue'); +CREATE TABLE import_source.t5 (c1 int, c2 text collate "C", "Col" "Colors"); + +CREATE SCHEMA import_dest5; +BEGIN; +DROP TYPE "Colors" CASCADE; +IMPORT FOREIGN SCHEMA import_source LIMIT TO (t5) + FROM SERVER loopback INTO import_dest5; -- ERROR + +ROLLBACK; + +BEGIN; + + +CREATE SERVER fetch101 FOREIGN DATA WRAPPER postgres_fdw OPTIONS( fetch_size '101' ); + +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'fetch101' +AND srvoptions @> array['fetch_size=101']; + +ALTER SERVER fetch101 OPTIONS( SET fetch_size '202' ); + +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'fetch101' +AND srvoptions @> array['fetch_size=101']; + +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'fetch101' +AND srvoptions @> array['fetch_size=202']; + +CREATE FOREIGN TABLE table30000 ( x int ) SERVER fetch101 OPTIONS ( fetch_size '30000' ); + +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30000'::regclass +AND ftoptions @> array['fetch_size=30000']; + +ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '60000'); + +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30000'::regclass +AND ftoptions @> array['fetch_size=30000']; + +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30000'::regclass +AND ftoptions @> array['fetch_size=60000']; + +ROLLBACK; + +-- =================================================================== +-- test partitionwise joins +-- =================================================================== +SET enable_partitionwise_join=on; + +CREATE TABLE fprt1 (a int, b int, c varchar) PARTITION BY RANGE(a); +CREATE TABLE fprt1_p1 (LIKE fprt1); +CREATE TABLE fprt1_p2 (LIKE fprt1); +ALTER TABLE fprt1_p1 SET (autovacuum_enabled = 'false'); +ALTER TABLE fprt1_p2 SET (autovacuum_enabled = 'false'); +INSERT INTO fprt1_p1 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(0, 249, 2) i; +INSERT INTO fprt1_p2 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(250, 499, 2) i; +CREATE FOREIGN TABLE ftprt1_p1 PARTITION OF fprt1 FOR VALUES FROM (0) TO (250) + SERVER loopback OPTIONS (table_name 'fprt1_p1', use_remote_estimate 'true'); +CREATE FOREIGN TABLE ftprt1_p2 PARTITION OF fprt1 FOR VALUES FROM (250) TO (500) + SERVER loopback OPTIONS (TABLE_NAME 'fprt1_p2'); +ANALYZE fprt1; +ANALYZE fprt1_p1; +ANALYZE fprt1_p2; + +CREATE TABLE fprt2 (a int, b int, c varchar) PARTITION BY RANGE(b); +CREATE TABLE fprt2_p1 (LIKE fprt2); +CREATE TABLE fprt2_p2 (LIKE fprt2); +ALTER TABLE fprt2_p1 SET (autovacuum_enabled = 'false'); +ALTER TABLE fprt2_p2 SET (autovacuum_enabled = 'false'); +INSERT INTO fprt2_p1 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(0, 249, 3) i; +INSERT INTO fprt2_p2 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(250, 499, 3) i; +CREATE FOREIGN TABLE ftprt2_p1 (b int, c varchar, a int) + SERVER loopback OPTIONS (table_name 'fprt2_p1', use_remote_estimate 'true'); +ALTER TABLE fprt2 ATTACH PARTITION ftprt2_p1 FOR VALUES FROM (0) TO (250); +CREATE FOREIGN TABLE ftprt2_p2 PARTITION OF fprt2 FOR VALUES FROM (250) TO (500) + SERVER loopback OPTIONS (table_name 'fprt2_p2', use_remote_estimate 'true'); +ANALYZE fprt2; +ANALYZE fprt2_p1; +ANALYZE fprt2_p2; + +-- inner join three tables +EXPLAIN (COSTS OFF) +SELECT t1.a,t2.b,t3.c FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) INNER JOIN fprt1 t3 ON (t2.b = t3.a) WHERE t1.a % 25 =0 ORDER BY 1,2,3; +SELECT t1.a,t2.b,t3.c FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) INNER JOIN fprt1 t3 ON (t2.b = t3.a) WHERE t1.a % 25 =0 ORDER BY 1,2,3; + +-- left outer join + nullable clause +EXPLAIN (VERBOSE, COSTS OFF) +SELECT t1.a,t2.b,t2.c FROM fprt1 t1 LEFT JOIN (SELECT * FROM fprt2 WHERE a < 10) t2 ON (t1.a = t2.b and t1.b = t2.a) WHERE t1.a < 10 ORDER BY 1,2,3; +SELECT t1.a,t2.b,t2.c FROM fprt1 t1 LEFT JOIN (SELECT * FROM fprt2 WHERE a < 10) t2 ON (t1.a = t2.b and t1.b = t2.a) WHERE t1.a < 10 ORDER BY 1,2,3; + +-- with whole-row reference; partitionwise join does not apply +EXPLAIN (COSTS OFF) +SELECT t1.wr, t2.wr FROM (SELECT t1 wr, a FROM fprt1 t1 WHERE t1.a % 25 = 0) t1 FULL JOIN (SELECT t2 wr, b FROM fprt2 t2 WHERE t2.b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY 1,2; +SELECT t1.wr, t2.wr FROM (SELECT t1 wr, a FROM fprt1 t1 WHERE t1.a % 25 = 0) t1 FULL JOIN (SELECT t2 wr, b FROM fprt2 t2 WHERE t2.b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY 1,2; + +-- join with lateral reference +EXPLAIN (COSTS OFF) +SELECT t1.a,t1.b FROM fprt1 t1, LATERAL (SELECT t2.a, t2.b FROM fprt2 t2 WHERE t1.a = t2.b AND t1.b = t2.a) q WHERE t1.a%25 = 0 ORDER BY 1,2; +SELECT t1.a,t1.b FROM fprt1 t1, LATERAL (SELECT t2.a, t2.b FROM fprt2 t2 WHERE t1.a = t2.b AND t1.b = t2.a) q WHERE t1.a%25 = 0 ORDER BY 1,2; + +-- with PHVs, partitionwise join selected but no join pushdown +EXPLAIN (COSTS OFF) +SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE a % 25 = 0) t1 FULL JOIN (SELECT 't2_phv' phv, * FROM fprt2 WHERE b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY t1.a, t2.b; +SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE a % 25 = 0) t1 FULL JOIN (SELECT 't2_phv' phv, * FROM fprt2 WHERE b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY t1.a, t2.b; + +-- test FOR UPDATE; partitionwise join does not apply +EXPLAIN (COSTS OFF) +SELECT t1.a, t2.b FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) WHERE t1.a % 25 = 0 ORDER BY 1,2 FOR UPDATE OF t1; +SELECT t1.a, t2.b FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) WHERE t1.a % 25 = 0 ORDER BY 1,2 FOR UPDATE OF t1; + +RESET enable_partitionwise_join; + + +-- =================================================================== +-- test partitionwise aggregates +-- =================================================================== + +CREATE TABLE pagg_tab (a int, b int, c text) PARTITION BY RANGE(a); + +CREATE TABLE pagg_tab_p1 (LIKE pagg_tab); +CREATE TABLE pagg_tab_p2 (LIKE pagg_tab); +CREATE TABLE pagg_tab_p3 (LIKE pagg_tab); + +INSERT INTO pagg_tab_p1 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 10; +INSERT INTO pagg_tab_p2 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 20 and (i % 30) >= 10; +INSERT INTO pagg_tab_p3 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 30 and (i % 30) >= 20; + +-- Create foreign partitions +CREATE FOREIGN TABLE fpagg_tab_p1 PARTITION OF pagg_tab FOR VALUES FROM (0) TO (10) SERVER loopback OPTIONS (table_name 'pagg_tab_p1'); +CREATE FOREIGN TABLE fpagg_tab_p2 PARTITION OF pagg_tab FOR VALUES FROM (10) TO (20) SERVER loopback OPTIONS (table_name 'pagg_tab_p2'); +CREATE FOREIGN TABLE fpagg_tab_p3 PARTITION OF pagg_tab FOR VALUES FROM (20) TO (30) SERVER loopback OPTIONS (table_name 'pagg_tab_p3'); + +ANALYZE pagg_tab; +ANALYZE fpagg_tab_p1; +ANALYZE fpagg_tab_p2; +ANALYZE fpagg_tab_p3; + +-- When GROUP BY clause matches with PARTITION KEY. +-- Plan with partitionwise aggregates is disabled +SET enable_partitionwise_aggregate TO false; +EXPLAIN (COSTS OFF) +SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; + +-- Plan with partitionwise aggregates is enabled +SET enable_partitionwise_aggregate TO true; +EXPLAIN (COSTS OFF) +SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; +SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; + +-- Check with whole-row reference +-- Should have all the columns in the target list for the given relation +EXPLAIN (VERBOSE, COSTS OFF) +SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1; +SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1; + +-- When GROUP BY clause does not match with PARTITION KEY. +EXPLAIN (COSTS OFF) +SELECT b, avg(a), max(a), count(*) FROM pagg_tab GROUP BY b HAVING sum(a) < 700 ORDER BY 1; +*/ +/* +-- Skip test, influxdb_fdw does not support nosuperuser +-- =================================================================== +-- access rights and superuser +-- =================================================================== + +-- Non-superuser cannot create a FDW without a password in the connstr +CREATE ROLE regress_nosuper NOSUPERUSER; + +GRANT USAGE ON FOREIGN DATA WRAPPER influxdb_fdw TO regress_nosuper; + +SET ROLE regress_nosuper; + +SHOW is_superuser; + +-- This will be OK, we can create the FDW +DO $d$ + BEGIN + EXECUTE $$CREATE SERVER loopback_nopw FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname '$$||current_database()||$$', + port '$$||current_setting('port')||$$' + )$$; + END; +$d$; + +-- But creation of user mappings for non-superusers should fail +CREATE USER MAPPING FOR public SERVER loopback_nopw; +CREATE USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; + +CREATE FOREIGN TABLE pg_temp.ft1_nopw ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 text, + c4 timestamptz, + c5 timestamp, + c6 varchar(10), + c7 char(10) default 'ft1', + c8 user_enum +) SERVER loopback_nopw OPTIONS (schema_name 'public', table_name 'ft1'); + +SELECT 1 FROM ft1_nopw LIMIT 1; + +-- If we add a password to the connstr it'll fail, because we don't allow passwords +-- in connstrs only in user mappings. + +DO $d$ + BEGIN + EXECUTE $$ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw')$$; + END; +$d$; + +-- If we add a password for our user mapping instead, we should get a different +-- error because the password wasn't actually *used* when we run with trust auth. +-- +-- This won't work with installcheck, but neither will most of the FDW checks. + +ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); + +SELECT 1 FROM ft1_nopw LIMIT 1; + +-- Unpriv user cannot make the mapping passwordless +ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password_required 'false'); + + +SELECT 1 FROM ft1_nopw LIMIT 1; + +RESET ROLE; + +-- But the superuser can +ALTER USER MAPPING FOR regress_nosuper SERVER loopback_nopw OPTIONS (ADD password_required 'false'); + +SET ROLE regress_nosuper; + +-- Should finally work now +SELECT 1 FROM ft1_nopw LIMIT 1; + +-- unpriv user also cannot set sslcert / sslkey on the user mapping +-- first set password_required so we see the right error messages +ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (SET password_required 'true'); +ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD sslcert 'foo.crt'); +ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD sslkey 'foo.key'); + +-- We're done with the role named after a specific user and need to check the +-- changes to the public mapping. +DROP USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; + +-- This will fail again as it'll resolve the user mapping for public, which +-- lacks password_required=false +SELECT 1 FROM ft1_nopw LIMIT 1; + +RESET ROLE; + +-- The user mapping for public is passwordless and lacks the password_required=false +-- mapping option, but will work because the current user is a superuser. +SELECT 1 FROM ft1_nopw LIMIT 1; + +-- cleanup +DROP USER MAPPING FOR public SERVER loopback_nopw; +DROP OWNED BY regress_nosuper; +DROP ROLE regress_nosuper; +*/ +-- influxdb_fdw does not support transactions +-- Two-phase transactions are not supported. +--BEGIN; +--Testcase 698: +SELECT count(*) FROM ft1; + count +------- + 822 +(1 row) + +-- error here +--PREPARE TRANSACTION 'fdw_tpc'; +--ROLLBACK; +/* +-- Influxdb_fdw does not use connection, and does not support connection functions +-- =================================================================== +-- reestablish new connection +-- =================================================================== + +-- Change application_name of remote connection to special one +-- so that we can easily terminate the connection later. +ALTER SERVER loopback OPTIONS (application_name 'fdw_retry_check'); + +-- If debug_discard_caches is active, it results in +-- dropping remote connections after every transaction, making it +-- impossible to test termination meaningfully. So turn that off +-- for this test. +SET debug_discard_caches = 0; + +-- Make sure we have a remote connection. +SELECT 1 FROM ft1 LIMIT 1; + +-- Terminate the remote connection and wait for the termination to complete. +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = 'fdw_retry_check'; + +-- This query should detect the broken connection when starting new remote +-- transaction, reestablish new connection, and then succeed. +BEGIN; +SELECT 1 FROM ft1 LIMIT 1; + +-- If we detect the broken connection when starting a new remote +-- subtransaction, we should fail instead of establishing a new connection. +-- Terminate the remote connection and wait for the termination to complete. +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = 'fdw_retry_check'; +SAVEPOINT s; +-- The text of the error might vary across platforms, so only show SQLSTATE. +\set VERBOSITY sqlstate +SELECT 1 FROM ft1 LIMIT 1; -- should fail +\set VERBOSITY default +COMMIT; + +RESET debug_discard_caches; + +-- ============================================================================= +-- test connection invalidation cases and postgres_fdw_get_connections function +-- ============================================================================= +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- This test case is for closing the connection in pgfdw_xact_callback +BEGIN; +-- Connection xact depth becomes 1 i.e. the connection is in midst of the xact. +SELECT 1 FROM ft1 LIMIT 1; +SELECT 1 FROM ft7 LIMIT 1; +-- List all the existing cached connections. loopback and loopback3 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Connections are not closed at the end of the alter and drop statements. +-- That's because the connections are in midst of this xact, +-- they are just marked as invalid in pgfdw_inval_callback. +ALTER SERVER loopback OPTIONS (ADD use_remote_estimate 'off'); +DROP SERVER loopback3 CASCADE; +-- List all the existing cached connections. loopback and loopback3 +-- should be output as invalid connections. Also the server name for +-- loopback3 should be NULL because the server was dropped. +SELECT * FROM postgres_fdw_get_connections() ORDER BY 1; +-- The invalid connections get closed in pgfdw_xact_callback during commit. +COMMIT; +-- All cached connections were closed while committing above xact, so no +-- records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- ======================================================================= +-- test postgres_fdw_disconnect and postgres_fdw_disconnect_all functions +-- ======================================================================= +BEGIN; +-- Ensure to cache loopback connection. +SELECT 1 FROM ft1 LIMIT 1; +-- Ensure to cache loopback2 connection. +SELECT 1 FROM ft6 LIMIT 1; +-- List all the existing cached connections. loopback and loopback2 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Issue a warning and return false as loopback connection is still in use and +-- can not be closed. +SELECT postgres_fdw_disconnect('loopback'); +-- List all the existing cached connections. loopback and loopback2 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Return false as connections are still in use, warnings are issued. +-- But disable warnings temporarily because the order of them is not stable. +SET client_min_messages = 'ERROR'; +SELECT postgres_fdw_disconnect_all(); +RESET client_min_messages; +COMMIT; +-- Ensure that loopback2 connection is closed. +SELECT 1 FROM postgres_fdw_disconnect('loopback2'); +SELECT server_name FROM postgres_fdw_get_connections() WHERE server_name = 'loopback2'; +-- Return false as loopback2 connection is closed already. +SELECT postgres_fdw_disconnect('loopback2'); +-- Return an error as there is no foreign server with given name. +SELECT postgres_fdw_disconnect('unknownserver'); +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- ============================================================================= +-- test case for having multiple cached connections for a foreign server +-- ============================================================================= +CREATE ROLE regress_multi_conn_user1 SUPERUSER; +CREATE ROLE regress_multi_conn_user2 SUPERUSER; +CREATE USER MAPPING FOR regress_multi_conn_user1 SERVER loopback; +CREATE USER MAPPING FOR regress_multi_conn_user2 SERVER loopback; + +BEGIN; +-- Will cache loopback connection with user mapping for regress_multi_conn_user1 +SET ROLE regress_multi_conn_user1; +SELECT 1 FROM ft1 LIMIT 1; +RESET ROLE; + +-- Will cache loopback connection with user mapping for regress_multi_conn_user2 +SET ROLE regress_multi_conn_user2; +SELECT 1 FROM ft1 LIMIT 1; +RESET ROLE; + +-- Should output two connections for loopback server +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +COMMIT; +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- Clean up +DROP USER MAPPING FOR regress_multi_conn_user1 SERVER loopback; +DROP USER MAPPING FOR regress_multi_conn_user2 SERVER loopback; +DROP ROLE regress_multi_conn_user1; +DROP ROLE regress_multi_conn_user2; + +-- =================================================================== +-- Test foreign server level option keep_connections +-- =================================================================== +-- By default, the connections associated with foreign server are cached i.e. +-- keep_connections option is on. Set it to off. +ALTER SERVER loopback OPTIONS (keep_connections 'off'); +-- connection to loopback server is closed at the end of xact +-- as keep_connections was set to off. +SELECT 1 FROM ft1 LIMIT 1; +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +ALTER SERVER loopback OPTIONS (SET keep_connections 'on'); +*/ +-- =================================================================== +-- batch insert +-- =================================================================== +BEGIN; +--Testcase 699: +CREATE SERVER batch10 FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS(dbname 'postdb', :SERVER, batch_size '10' ); +--Testcase 700: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=10']; + count +------- + 1 +(1 row) + +--Testcase 701: +ALTER SERVER batch10 OPTIONS( SET batch_size '20' ); +--Testcase 702: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=10']; + count +------- + 0 +(1 row) + +--Testcase 703: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=20']; + count +------- + 1 +(1 row) + +--Testcase 704: +CREATE FOREIGN TABLE table30 (fields jsonb OPTIONS(fields 'true')) + server batch10 options ( batch_size '30', schemaless 'true'); +--Testcase 705: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=30']; + count +------- + 1 +(1 row) + +--Testcase 706: +ALTER FOREIGN TABLE table30 OPTIONS ( SET batch_size '40'); +--Testcase 707: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=30']; + count +------- + 0 +(1 row) + +--Testcase 708: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=40']; + count +------- + 1 +(1 row) + +ROLLBACK; +--Testcase 709: +CREATE FOREIGN TABLE batch_table (fields jsonb OPTIONS(fields 'true')) + SERVER influxdb_svr options (schemaless 'true'); +--Testcase 813: +CREATE FOREIGN TABLE batch_table_nsc ( x int ) SERVER influxdb_svr OPTIONS (table 'batch_table'); +--Testcase 710: +CREATE FOREIGN TABLE ftable (fields jsonb OPTIONS(fields 'true')) + SERVER influxdb_svr options ( table 'batch_table', batch_size '10', schemaless 'true'); +--Testcase 814: +CREATE FOREIGN TABLE ftable_nsc ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '10' ); +--Testcase 711: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable_nsc SELECT * FROM generate_series(1, 10) i; + QUERY PLAN +----------------------------------------------------- + Insert on public.ftable_nsc + Batch Size: 10 + -> Function Scan on pg_catalog.generate_series i + Output: i.i + Function Call: generate_series(1, 10) +(5 rows) + +--Testcase 712: +INSERT INTO ftable_nsc SELECT * FROM generate_series(1, 10) i; +--Testcase 713: +INSERT INTO ftable_nsc SELECT * FROM generate_series(11, 31) i; +--Testcase 714: +INSERT INTO ftable_nsc VALUES (32); +--Testcase 715: +INSERT INTO ftable_nsc VALUES (33), (34); +--Testcase 716: +SELECT COUNT(*) FROM ftable; + count +------- + 34 +(1 row) + +--Testcase 717: +DELETE FROM batch_table_nsc; +--Testcase 718: +DROP FOREIGN TABLE ftable; +--Testcase 815: +DROP FOREIGN TABLE ftable_nsc; +-- try if large batches exceed max number of bind parameters +--Testcase 719: +CREATE FOREIGN TABLE ftable (fields jsonb OPTIONS(fields 'true')) + SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '100000', schemaless 'true' ); +--Testcase 816: +CREATE FOREIGN TABLE ftable_nsc ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '100000' ); +--Testcase 720: +INSERT INTO ftable_nsc SELECT * FROM generate_series(1, 70000) i; +--Testcase 721: +SELECT COUNT(*) FROM ftable; + count +------- + 70000 +(1 row) + +--Testcase 722: +DELETE FROM batch_table_nsc; +--Testcase 723: +DROP FOREIGN TABLE ftable; +--Testcase 817: +DROP FOREIGN TABLE ftable_nsc; +-- Disable batch insert +--Testcase 724: +CREATE FOREIGN TABLE ftable (fields jsonb OPTIONS(fields 'true')) + SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '1', schemaless 'true' ); +--Testcase 818: +CREATE FOREIGN TABLE ftable_nsc ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '1' ); +--Testcase 725: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable_nsc VALUES (1), (2); + QUERY PLAN +------------------------------------ + Insert on public.ftable_nsc + Batch Size: 1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1 +(4 rows) + +--Testcase 726: +INSERT INTO ftable_nsc VALUES (1), (2); +--Testcase 727: +SELECT COUNT(*) FROM ftable; + count +------- + 2 +(1 row) + +-- Disable batch inserting into foreign tables with BEFORE ROW INSERT triggers +-- even if the batch_size option is enabled. +--Testcase 776: +ALTER FOREIGN TABLE ftable OPTIONS ( SET batch_size '10' ); +--Testcase 777: +CREATE TRIGGER trig_row_before BEFORE INSERT ON ftable_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 778: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable_nsc VALUES (3), (4); + QUERY PLAN +------------------------------------ + Insert on public.ftable_nsc + Batch Size: 1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1 +(4 rows) + +--Testcase 779: +INSERT INTO ftable_nsc VALUES (3), (4); +NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON ftable_nsc +NOTICE: NEW: (3) +NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON ftable_nsc +NOTICE: NEW: (4) +--Testcase 780: +SELECT COUNT(*) FROM ftable; + count +------- + 4 +(1 row) + +-- Clean up +--Testcase 781: +DROP TRIGGER trig_row_before ON ftable_nsc; +--Testcase 728: +DROP FOREIGN TABLE ftable; +--Testcase 819: +DROP FOREIGN TABLE ftable_nsc; +--Testcase 729: +DELETE FROM batch_table_nsc; +--Testcase 820: +DROP FOREIGN TABLE batch_table; +--Testcase 821: +DROP FOREIGN TABLE batch_table_nsc; +-- influxdb_fdw does not support partition insert +-- Use partitioning +--Testcase 730: +CREATE TABLE batch_table ( x int ) PARTITION BY HASH (x); +--Testcase 731: +CREATE TABLE batch_table_p0 (LIKE batch_table); +--Testcase 732: +CREATE FOREIGN TABLE batch_table_p0f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 0) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p0', batch_size '10', schemaless 'true'); +--Testcase 733: +CREATE TABLE batch_table_p1 (LIKE batch_table); +--Testcase 734: +CREATE FOREIGN TABLE batch_table_p1f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 1) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p1', batch_size '1', schemaless 'true'); +--Testcase 735: +CREATE TABLE batch_table_p2 + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 2); +--Testcase 736: +INSERT INTO batch_table SELECT * FROM generate_series(1, 66) i; +ERROR: Not support partition insert +--Testcase 737: +SELECT COUNT(*) FROM batch_table; + count +------- + 0 +(1 row) + +-- Check that enabling batched inserts doesn't interfere with cross-partition +-- updates +--Testcase 738: +CREATE TABLE batch_cp_upd_test (a int) PARTITION BY LIST (a); +--Testcase 739: +CREATE TABLE batch_cp_upd_test1 (LIKE batch_cp_upd_test); +--Testcase 740: +CREATE FOREIGN TABLE batch_cp_upd_test1_f + PARTITION OF batch_cp_upd_test + FOR VALUES IN (1) + SERVER influxdb_svr + OPTIONS (table 'batch_cp_upd_test1', batch_size '10', schemaless 'true'); +--Testcase 741: +CREATE TABLE batch_cp_up_test1 PARTITION OF batch_cp_upd_test + FOR VALUES IN (2); +--Testcase 742: +INSERT INTO batch_cp_upd_test VALUES (1), (2); +ERROR: Not support partition insert +-- The following moves a row from the local partition to the foreign one +-- influxdb_fdw does not support UPDATE +-- UPDATE batch_cp_upd_test t SET a = 1 FROM (VALUES (1), (2)) s(a) WHERE t.a = s.a; +--Testcase 743: +SELECT tableoid::regclass, * FROM batch_cp_upd_test; + tableoid | a +----------+--- +(0 rows) + +-- Clean up +--Testcase 744: +DROP TABLE batch_table, batch_cp_upd_test, batch_table_p0, batch_table_p1 CASCADE; +-- influxdb_fdw does not support partition insert +-- Use partitioning +--Testcase 745: +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +--Testcase 746: +CREATE TABLE batch_table ( x int, field1 text, field2 text) PARTITION BY HASH (x); +--Testcase 747: +CREATE TABLE batch_table_p0 (LIKE batch_table); +--Testcase 748: +ALTER TABLE batch_table_p0 ADD CONSTRAINT p0_pkey PRIMARY KEY (x); +--Testcase 749: +CREATE FOREIGN TABLE batch_table_p0f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 2, REMAINDER 0) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p0', schemaless 'true'); +--Testcase 750: +CREATE TABLE batch_table_p1 (LIKE batch_table); +--Testcase 751: +ALTER TABLE batch_table_p1 ADD CONSTRAINT p1_pkey PRIMARY KEY (x); +--Testcase 752: +CREATE FOREIGN TABLE batch_table_p1f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 2, REMAINDER 1) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p1', schemaless 'true'); +--Testcase 753: +INSERT INTO batch_table SELECT i, 'test'||i, 'test'|| i FROM generate_series(1, 50) i; +ERROR: Not support partition insert +--Testcase 754: +SELECT COUNT(*) FROM batch_table; + count +------- + 0 +(1 row) + +--Testcase 755: +SELECT * FROM batch_table ORDER BY x; + x | field1 | field2 +---+--------+-------- +(0 rows) + +--Testcase 756: +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); +-- Clean up +--Testcase 757: +DROP TABLE batch_table, batch_table_p0, batch_table_p1 CASCADE; +/* InfluxDB does not support partition table +-- =================================================================== +-- test asynchronous execution +-- =================================================================== + +ALTER SERVER loopback OPTIONS (DROP extensions); +ALTER SERVER loopback OPTIONS (ADD async_capable 'true'); +ALTER SERVER loopback2 OPTIONS (ADD async_capable 'true'); + +CREATE TABLE async_pt (a int, b int, c text) PARTITION BY RANGE (a); +CREATE TABLE base_tbl1 (a int, b int, c text); +CREATE TABLE base_tbl2 (a int, b int, c text); +CREATE FOREIGN TABLE async_p1 PARTITION OF async_pt FOR VALUES FROM (1000) TO (2000) + SERVER loopback OPTIONS (table_name 'base_tbl1'); +CREATE FOREIGN TABLE async_p2 PARTITION OF async_pt FOR VALUES FROM (2000) TO (3000) + SERVER loopback2 OPTIONS (table_name 'base_tbl2'); +INSERT INTO async_p1 SELECT 1000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +INSERT INTO async_p2 SELECT 2000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +-- simple queries +CREATE TABLE result_tbl (a int, b int, c text); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b % 100 = 0; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b % 100 = 0; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT a, b, 'AAA' || c FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT a, b, 'AAA' || c FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- Check case where multiple partitions use the same connection +CREATE TABLE base_tbl3 (a int, b int, c text); +CREATE FOREIGN TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO (4000) + SERVER loopback2 OPTIONS (table_name 'base_tbl3'); +INSERT INTO async_p3 SELECT 3000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +DROP FOREIGN TABLE async_p3; +DROP TABLE base_tbl3; + +-- Check case where the partitioned table has local/remote partitions +CREATE TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO (4000); +INSERT INTO async_p3 SELECT 3000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- partitionwise joins +SET enable_partitionwise_join TO true; + +CREATE TABLE join_tbl (a1 int, b1 int, c1 text, a2 int, b2 int, c2 text); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT * FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT * FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT t1.a, t1.b, 'AAA' || t1.c, t2.a, t2.b, 'AAA' || t2.c FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT t1.a, t1.b, 'AAA' || t1.c, t2.a, t2.b, 'AAA' || t2.c FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +RESET enable_partitionwise_join; + +-- Test rescan of an async Append node with do_exec_prune=false +SET enable_hashjoin TO false; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT * FROM async_p1 t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT * FROM async_p1 t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +RESET enable_hashjoin; + +-- Test interaction of async execution with plan-time partition pruning +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE a < 3000; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE a < 2000; + +-- Test interaction of async execution with run-time partition pruning +SET plan_cache_mode TO force_generic_plan; + +PREPARE async_pt_query (int, int) AS + INSERT INTO result_tbl SELECT * FROM async_pt WHERE a < $1 AND b === $2; + +EXPLAIN (VERBOSE, COSTS OFF) +EXECUTE async_pt_query (3000, 505); +EXECUTE async_pt_query (3000, 505); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +EXECUTE async_pt_query (2000, 505); +EXECUTE async_pt_query (2000, 505); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +RESET plan_cache_mode; + +CREATE TABLE local_tbl(a int, b int, c text); +INSERT INTO local_tbl VALUES (1505, 505, 'foo'), (2505, 505, 'bar'); +ANALYZE local_tbl; + +CREATE INDEX base_tbl1_idx ON base_tbl1 (a); +CREATE INDEX base_tbl2_idx ON base_tbl2 (a); +CREATE INDEX async_p3_idx ON async_p3 (a); +ANALYZE base_tbl1; +ANALYZE base_tbl2; +ANALYZE async_p3; + +ALTER FOREIGN TABLE async_p1 OPTIONS (use_remote_estimate 'true'); +ALTER FOREIGN TABLE async_p2 OPTIONS (use_remote_estimate 'true'); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; + +ALTER FOREIGN TABLE async_p1 OPTIONS (DROP use_remote_estimate); +ALTER FOREIGN TABLE async_p2 OPTIONS (DROP use_remote_estimate); + +DROP TABLE local_tbl; +DROP INDEX base_tbl1_idx; +DROP INDEX base_tbl2_idx; +DROP INDEX async_p3_idx; + +-- UNION queries +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION ALL +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION ALL +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- Disable async execution if we use gating Result nodes for pseudoconstant +-- quals +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE CURRENT_USER = SESSION_USER; + +EXPLAIN (VERBOSE, COSTS OFF) +(SELECT * FROM async_p1 WHERE CURRENT_USER = SESSION_USER) +UNION ALL +(SELECT * FROM async_p2 WHERE CURRENT_USER = SESSION_USER); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ((SELECT * FROM async_p1 WHERE b < 10) UNION ALL (SELECT * FROM async_p2 WHERE b < 10)) s WHERE CURRENT_USER = SESSION_USER; + +-- Test that pending requests are processed properly +SET enable_mergejoin TO false; +SET enable_hashjoin TO false; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt t1, async_p2 t2 WHERE t1.a = t2.a AND t1.b === 505; +SELECT * FROM async_pt t1, async_p2 t2 WHERE t1.a = t2.a AND t1.b === 505; + +CREATE TABLE local_tbl (a int, b int, c text); +INSERT INTO local_tbl VALUES (1505, 505, 'foo'); +ANALYZE local_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; + +-- Check with foreign modify +CREATE TABLE base_tbl3 (a int, b int, c text); +CREATE FOREIGN TABLE remote_tbl (a int, b int, c text) + SERVER loopback OPTIONS (table_name 'base_tbl3'); +INSERT INTO remote_tbl VALUES (2505, 505, 'bar'); + +CREATE TABLE base_tbl4 (a int, b int, c text); +CREATE FOREIGN TABLE insert_tbl (a int, b int, c text) + SERVER loopback OPTIONS (table_name 'base_tbl4'); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO insert_tbl (SELECT * FROM local_tbl UNION ALL SELECT * FROM remote_tbl); +INSERT INTO insert_tbl (SELECT * FROM local_tbl UNION ALL SELECT * FROM remote_tbl); + +SELECT * FROM insert_tbl ORDER BY a; + +-- Check with direct modify +EXPLAIN (VERBOSE, COSTS OFF) +WITH t AS (UPDATE remote_tbl SET c = c || c RETURNING *) +INSERT INTO join_tbl SELECT * FROM async_pt LEFT JOIN t ON (async_pt.a = t.a AND async_pt.b = t.b) WHERE async_pt.b === 505; +WITH t AS (UPDATE remote_tbl SET c = c || c RETURNING *) +INSERT INTO join_tbl SELECT * FROM async_pt LEFT JOIN t ON (async_pt.a = t.a AND async_pt.b = t.b) WHERE async_pt.b === 505; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +DROP TABLE local_tbl; +DROP FOREIGN TABLE remote_tbl; +DROP FOREIGN TABLE insert_tbl; +DROP TABLE base_tbl3; +DROP TABLE base_tbl4; + +RESET enable_mergejoin; +RESET enable_hashjoin; + +-- Test that UPDATE/DELETE with inherited target works with async_capable enabled +EXPLAIN (VERBOSE, COSTS OFF) +UPDATE async_pt SET c = c || c WHERE b = 0 RETURNING *; +UPDATE async_pt SET c = c || c WHERE b = 0 RETURNING *; +EXPLAIN (VERBOSE, COSTS OFF) +DELETE FROM async_pt WHERE b = 0 RETURNING *; +DELETE FROM async_pt WHERE b = 0 RETURNING *; + +-- Check EXPLAIN ANALYZE for a query that scans empty partitions asynchronously +DELETE FROM async_p1; +DELETE FROM async_p2; +DELETE FROM async_p3; + +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM async_pt; + +-- Clean up +DROP TABLE async_pt; +DROP TABLE base_tbl1; +DROP TABLE base_tbl2; +DROP TABLE result_tbl; +DROP TABLE join_tbl; + +-- Test that an asynchronous fetch is processed before restarting the scan in +-- ReScanForeignScan +CREATE TABLE base_tbl (a int, b int); +INSERT INTO base_tbl VALUES (1, 11), (2, 22), (3, 33); +CREATE FOREIGN TABLE foreign_tbl (b int) + SERVER loopback OPTIONS (table_name 'base_tbl'); +CREATE FOREIGN TABLE foreign_tbl2 () INHERITS (foreign_tbl) + SERVER loopback OPTIONS (table_name 'base_tbl'); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT a FROM base_tbl WHERE a IN (SELECT a FROM foreign_tbl); +SELECT a FROM base_tbl WHERE a IN (SELECT a FROM foreign_tbl); + +-- Clean up +DROP FOREIGN TABLE foreign_tbl CASCADE; +DROP TABLE base_tbl; + +ALTER SERVER loopback OPTIONS (DROP async_capable); +ALTER SERVER loopback2 OPTIONS (DROP async_capable); +*/ +-- =================================================================== +-- test invalid server, foreign table and foreign data wrapper options +-- =================================================================== +/* +-- InfluxDB FDW does not have these options +-- Invalid fdw_startup_cost option +CREATE SERVER inv_scst FOREIGN DATA WRAPPER postgres_fdw + OPTIONS(fdw_startup_cost '100$%$#$#'); +-- Invalid fdw_tuple_cost option +CREATE SERVER inv_scst FOREIGN DATA WRAPPER postgres_fdw + OPTIONS(fdw_tuple_cost '100$%$#$#'); +-- Invalid fetch_size option +CREATE FOREIGN TABLE inv_fsz (c1 int ) + SERVER loopback OPTIONS (fetch_size '100$%$#$#'); +*/ +-- Invalid batch_size option +--Testcase 776: +CREATE FOREIGN TABLE inv_bsz (fields jsonb OPTIONS(fields 'true')) + SERVER influxdb_svr OPTIONS (batch_size '100$%$#$#', schemaless 'true'); +ERROR: invalid value for integer option "batch_size": 100$%$#$# +-- No option is allowed to be specified at foreign data wrapper level +--Testcase 782: +ALTER FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (nonexistent 'fdw'); +ERROR: invalid option "nonexistent" +HINT: There are no valid options in this context. +/* +-- =================================================================== +-- application_name is an option in libpq of postgres +-- so Influxdb_fdw not support application_name. +-- test postgres_fdw.application_name GUC +-- =================================================================== +--- Turn debug_discard_caches off for this test to make sure that +--- the remote connection is alive when checking its application_name. +SET debug_discard_caches = 0; + +-- Specify escape sequences in application_name option of a server +-- object so as to test that they are replaced with status information +-- expectedly. +-- +-- Since pg_stat_activity.application_name may be truncated to less than +-- NAMEDATALEN characters, note that substring() needs to be used +-- at the condition of test query to make sure that the string consisting +-- of database name and process ID is also less than that. +ALTER SERVER loopback2 OPTIONS (application_name 'fdw_%d%p'); +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_database() || pg_backend_pid() for + current_setting('max_identifier_length')::int); + +-- postgres_fdw.application_name overrides application_name option +-- of a server object if both settings are present. +SET postgres_fdw.application_name TO 'fdw_%a%u%%'; +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_setting('application_name') || + CURRENT_USER || '%' for current_setting('max_identifier_length')::int); + +-- Test %c (session ID) and %C (cluster name) escape sequences. +SET postgres_fdw.application_name TO 'fdw_%C%c'; +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_setting('cluster_name') || + to_hex(trunc(EXTRACT(EPOCH FROM (SELECT backend_start FROM + pg_stat_get_activity(pg_backend_pid()))))::integer) || '.' || + to_hex(pg_backend_pid()) + for current_setting('max_identifier_length')::int); + +--Clean up +RESET postgres_fdw.application_name; +RESET debug_discard_caches; + +-- =================================================================== +-- test parallel commit +-- =================================================================== +ALTER SERVER loopback OPTIONS (ADD parallel_commit 'true'); +ALTER SERVER loopback2 OPTIONS (ADD parallel_commit 'true'); + +CREATE TABLE ploc1 (f1 int, f2 text); +CREATE FOREIGN TABLE prem1 (f1 int, f2 text) + SERVER loopback OPTIONS (table_name 'ploc1'); +CREATE TABLE ploc2 (f1 int, f2 text); +CREATE FOREIGN TABLE prem2 (f1 int, f2 text) + SERVER loopback2 OPTIONS (table_name 'ploc2'); + +BEGIN; +INSERT INTO prem1 VALUES (101, 'foo'); +INSERT INTO prem2 VALUES (201, 'bar'); +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +BEGIN; +SAVEPOINT s; +INSERT INTO prem1 VALUES (102, 'foofoo'); +INSERT INTO prem2 VALUES (202, 'barbar'); +RELEASE SAVEPOINT s; +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +-- This tests executing DEALLOCATE ALL against foreign servers in parallel +-- during pre-commit +BEGIN; +SAVEPOINT s; +INSERT INTO prem1 VALUES (103, 'baz'); +INSERT INTO prem2 VALUES (203, 'qux'); +ROLLBACK TO SAVEPOINT s; +RELEASE SAVEPOINT s; +INSERT INTO prem1 VALUES (104, 'bazbaz'); +INSERT INTO prem2 VALUES (204, 'quxqux'); +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +ALTER SERVER loopback OPTIONS (DROP parallel_commit); +ALTER SERVER loopback2 OPTIONS (DROP parallel_commit); +*/ +-- Clean-up +--Testcase 822: +DELETE FROM ft1_nsc; +--Testcase 823: +DELETE FROM ft2_nsc; +--Testcase 824: +DELETE FROM ft4_nsc; +--Testcase 825: +DELETE FROM ft5_nsc; +--Testcase 826: +DELETE FROM foo_nsc; +--Testcase 827: +DELETE FROM bar_nsc; +--Testcase 828: +DELETE FROM loct1_nsc; +--Testcase 829: +DELETE FROM loct2_nsc; +--Testcase 830: +DELETE FROM rem1_nsc; +--Testcase 831: +DROP FOREIGN TABLE foo_nsc cascade; +NOTICE: drop cascades to foreign table foo2_nsc +--Testcase 832: +DROP FOREIGN TABLE bar_nsc cascade; +NOTICE: drop cascades to foreign table bar2_nsc +--Testcase 833: +DROP FOREIGN TABLE loct1_nsc; +--Testcase 834: +DROP FOREIGN TABLE loct2_nsc; +--Testcase 835: +DROP FOREIGN TABLE "S 1".s1t0; +--Testcase 836: +DROP FOREIGN TABLE "S 1".s1t1; +--Testcase 837: +DROP FOREIGN TABLE "S 1".s1t2; +--Testcase 838: +DROP FOREIGN TABLE "S 1".s1t3; +--Testcase 839: +DROP FOREIGN TABLE "S 1".s1t4; +--Testcase 840: +DROP FOREIGN TABLE ft1_nsc; +--Testcase 841: +DROP FOREIGN TABLE ft2_nsc; +--Testcase 842: +DROP FOREIGN TABLE ft4_nsc; +--Testcase 843: +DROP FOREIGN TABLE ft5_nsc; +--Testcase 844: +DROP TYPE IF EXISTS user_enum; +--Testcase 845: +DROP SCHEMA IF EXISTS "S 1" CASCADE; +NOTICE: drop cascades to 6 other objects +DETAIL: drop cascades to foreign table "S 1"."T 0" +drop cascades to foreign table "S 1"."T 1" +drop cascades to foreign table "S 1"."T 2" +drop cascades to foreign table "S 1"."T 3" +drop cascades to foreign table "S 1"."T 4" +drop cascades to function "S 1".f_brtrig() +--Testcase 846: +DROP FUNCTION IF EXISTS trigger_func(); +--Testcase 847: +DROP FUNCTION IF EXISTS trig_row_before_insupdate(); +--Testcase 848: +DROP FUNCTION IF EXISTS trig_null(); +--Testcase 849: +DROP SCHEMA IF EXISTS import_influx1 CASCADE; +NOTICE: drop cascades to 9 other objects +DETAIL: drop cascades to foreign table import_influx1."T1" +drop cascades to foreign table import_influx1."T2" +drop cascades to foreign table import_influx1."T3" +drop cascades to foreign table import_influx1."T4" +drop cascades to foreign table import_influx1.bar +drop cascades to foreign table import_influx1.foo +drop cascades to foreign table import_influx1.loc1 +drop cascades to foreign table import_influx1.loct1 +drop cascades to foreign table import_influx1.loct2 +--Testcase 850: +DROP SCHEMA IF EXISTS import_influx2 CASCADE; +--Testcase 851: +DROP SCHEMA IF EXISTS import_influx3 CASCADE; +--Testcase 852: +DROP SCHEMA IF EXISTS import_influx4 CASCADE; +NOTICE: drop cascades to 9 other objects +DETAIL: drop cascades to foreign table import_influx4."T1" +drop cascades to foreign table import_influx4."T2" +drop cascades to foreign table import_influx4."T3" +drop cascades to foreign table import_influx4."T4" +drop cascades to foreign table import_influx4.bar +drop cascades to foreign table import_influx4.foo +drop cascades to foreign table import_influx4.loc1 +drop cascades to foreign table import_influx4.loct1 +drop cascades to foreign table import_influx4.loct2 +--Testcase 853: +DROP TABLE IF EXISTS batch_cp_upd_test1; +--Testcase 758: +DROP USER MAPPING FOR public SERVER testserver1; +--Testcase 759: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 760: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2; +--Testcase 761: +DROP SERVER testserver1 CASCADE; +--Testcase 762: +DROP SERVER influxdb_svr CASCADE; +NOTICE: drop cascades to 22 other objects +DETAIL: drop cascades to foreign table ft1 +drop cascades to foreign table ft2 +drop cascades to foreign table ft4 +drop cascades to foreign table ft5 +drop cascades to foreign table loct_empty +drop cascades to foreign table ft_empty +drop cascades to foreign table loct3 +drop cascades to foreign table ft3 +drop cascades to foreign table loc1 +drop cascades to foreign table loc1_nsc +drop cascades to foreign table rem1 +drop cascades to foreign table rem1_nsc +drop cascades to foreign table gloc1 +drop cascades to foreign table gloc1_nsc +drop cascades to foreign table grem1 +drop cascades to foreign table grem1_nsc +drop cascades to foreign table loct1 +drop cascades to foreign table loct2 +drop cascades to foreign table foo +drop cascades to foreign table foo2 +drop cascades to foreign table bar +drop cascades to foreign table bar2 +--Testcase 763: +DROP SERVER influxdb_svr2 CASCADE; +NOTICE: drop cascades to foreign table ft6 +--Testcase 764: +DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/schemaless/extra/insert.out b/expected/15.0/schemaless/extra/insert.out new file mode 100644 index 0000000..26fa3bb --- /dev/null +++ b/expected/15.0/schemaless/extra/insert.out @@ -0,0 +1,726 @@ +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +-- +-- insert with DEFAULT in the target_list +-- +--Testcase 4: +CREATE FOREIGN TABLE inserttest (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 24: +CREATE FOREIGN TABLE inserttest_nsc (col1 int4, col2 int4 NOT NULL, col3 text default 'testing') SERVER influxdb_svr OPTIONS(table 'inserttest'); +--Testcase 5: +insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT); +ERROR: influxdb_fdw : null value in column "col2" of relation "inserttest" violates not-null constraint +--Testcase 6: +insert into inserttest_nsc (col2, col3) values (3, DEFAULT); +--Testcase 7: +insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, 5, DEFAULT); +--Testcase 8: +insert into inserttest_nsc values (DEFAULT, 5, 'test'); +--Testcase 9: +insert into inserttest_nsc values (DEFAULT, 7); +--Testcase 10: +select * from inserttest; + fields +---------------------------------- + {"col2": "3", "col3": "testing"} + {"col2": "5", "col3": "testing"} + {"col2": "5", "col3": "test"} + {"col2": "7", "col3": "testing"} +(4 rows) + +-- +-- insert with similar expression / target_list values (all fail) +-- +--Testcase 11: +insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, DEFAULT); +ERROR: INSERT has more target columns than expressions +LINE 1: insert into inserttest_nsc (col1, col2, col3) values (DEFAUL... + ^ +--Testcase 12: +insert into inserttest_nsc (col1, col2, col3) values (1, 2); +ERROR: INSERT has more target columns than expressions +LINE 1: insert into inserttest_nsc (col1, col2, col3) values (1, 2); + ^ +--Testcase 13: +insert into inserttest_nsc (col1) values (1, 2); +ERROR: INSERT has more expressions than target columns +LINE 1: insert into inserttest_nsc (col1) values (1, 2); + ^ +--Testcase 14: +insert into inserttest_nsc (col1) values (DEFAULT, DEFAULT); +ERROR: INSERT has more expressions than target columns +LINE 1: insert into inserttest_nsc (col1) values (DEFAULT, DEFAULT); + ^ +--Testcase 15: +select * from inserttest; + fields +---------------------------------- + {"col2": "3", "col3": "testing"} + {"col2": "5", "col3": "testing"} + {"col2": "5", "col3": "test"} + {"col2": "7", "col3": "testing"} +(4 rows) + +-- +-- VALUES test +-- +--Testcase 16: +insert into inserttest_nsc values(10, 20, '40'), (-1, 2, DEFAULT), + ((select 2), (select i from (values(3)) as foo (i)), 'values are fun!'); +--Testcase 17: +select * from inserttest; + fields +------------------------------------------------------- + {"col1": null, "col2": "3", "col3": "testing"} + {"col1": null, "col2": "5", "col3": "testing"} + {"col1": null, "col2": "5", "col3": "test"} + {"col1": null, "col2": "7", "col3": "testing"} + {"col1": "10", "col2": "20", "col3": "40"} + {"col1": "-1", "col2": "2", "col3": "testing"} + {"col1": "2", "col2": "3", "col3": "values are fun!"} +(7 rows) + +-- +-- TOASTed value test +-- +--Testcase 18: +insert into inserttest_nsc values(30, 50, repeat('x', 10000)); +--Testcase 19: +select (fields->>'col1')::int4 col1, (fields->>'col2')::int4 col2, char_length(fields->>'col3') from inserttest; + col1 | col2 | char_length +------+------+------------- + | 3 | 7 + | 5 | 7 + | 5 | 4 + | 7 | 7 + 10 | 20 | 2 + -1 | 2 | 7 + 2 | 3 | 15 + 30 | 50 | 10000 +(8 rows) + +--Testcase 20: +-- Clean up: +--Testcase 25: +delete from inserttest_nsc; +--Testcase 26: +drop foreign table inserttest; +--Testcase 27: +drop foreign table inserttest_nsc; +/* +-- skip, influxdb does not support create table with WITH option +-- +-- tuple larger than fillfactor +-- +CREATE TABLE large_tuple_test (a int, b text) WITH (fillfactor = 10); +ALTER TABLE large_tuple_test ALTER COLUMN b SET STORAGE plain; + +-- create page w/ free space in range [nearlyEmptyFreeSpace, MaxHeapTupleSize) +INSERT INTO large_tuple_test (select 1, NULL); + +-- should still fit on the page +INSERT INTO large_tuple_test (select 2, repeat('a', 1000)); +SELECT pg_size_pretty(pg_relation_size('large_tuple_test'::regclass, 'main')); + +-- add small record to the second page +INSERT INTO large_tuple_test (select 3, NULL); + +-- now this tuple won't fit on the second page, but the insert should +-- still succeed by extending the relation +INSERT INTO large_tuple_test (select 4, repeat('a', 8126)); + +DROP TABLE large_tuple_test; +*/ +/* +-- skip, influxdb does not support create type +-- +-- check indirection (field/array assignment), cf bug #14265 +-- +-- these tests are aware that transformInsertStmt has 3 separate code paths +-- + +create type insert_test_type as (if1 int, if2 text[]); + +create table inserttest (f1 int, f2 int[], + f3 insert_test_type, f4 insert_test_type[]); + +insert into inserttest (f2[1], f2[2]) values (1,2); +insert into inserttest (f2[1], f2[2]) values (3,4), (5,6); +insert into inserttest (f2[1], f2[2]) select 7,8; +insert into inserttest (f2[1], f2[2]) values (1,default); -- not supported + +insert into inserttest (f3.if1, f3.if2) values (1,array['foo']); +insert into inserttest (f3.if1, f3.if2) values (1,'{foo}'), (2,'{bar}'); +insert into inserttest (f3.if1, f3.if2) select 3, '{baz,quux}'; +insert into inserttest (f3.if1, f3.if2) values (1,default); -- not supported + +insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'); +insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'), ('baz', 'quux'); +insert into inserttest (f3.if2[1], f3.if2[2]) select 'bear', 'beer'; + +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'); +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'), ('baz', 'quux'); +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) select 'bear', 'beer'; + +select * from inserttest; + +-- also check reverse-listing +create table inserttest2 (f1 bigint, f2 text); +create rule irule1 as on insert to inserttest2 do also + insert into inserttest (f3.if2[1], f3.if2[2]) + values (new.f1,new.f2); +create rule irule2 as on insert to inserttest2 do also + insert into inserttest (f4[1].if1, f4[1].if2[2]) + values (1,'fool'),(new.f1,new.f2); +create rule irule3 as on insert to inserttest2 do also + insert into inserttest (f4[1].if1, f4[1].if2[2]) + select new.f1, new.f2; +\d+ inserttest2 + +drop table inserttest2; +drop table inserttest; +drop type insert_test_type; +*/ +/* +-- skip, influxdb does not support partition table +-- direct partition inserts should check partition bound constraint +create table range_parted ( + a text, + b int +) partition by range (a, (b+0)); + +-- no partitions, so fail +insert into range_parted values ('a', 11); + +create table part1 partition of range_parted for values from ('a', 1) to ('a', 10); +create table part2 partition of range_parted for values from ('a', 10) to ('a', 20); +create table part3 partition of range_parted for values from ('b', 1) to ('b', 10); +create table part4 partition of range_parted for values from ('b', 10) to ('b', 20); + +-- fail +insert into part1 values ('a', 11); +insert into part1 values ('b', 1); +-- ok +insert into part1 values ('a', 1); +-- fail +insert into part4 values ('b', 21); +insert into part4 values ('a', 10); +-- ok +insert into part4 values ('b', 10); + +-- fail (partition key a has a NOT NULL constraint) +insert into part1 values (null); +-- fail (expression key (b+0) cannot be null either) +insert into part1 values (1); + +create table list_parted ( + a text, + b int +) partition by list (lower(a)); +create table part_aa_bb partition of list_parted FOR VALUES IN ('aa', 'bb'); +create table part_cc_dd partition of list_parted FOR VALUES IN ('cc', 'dd'); +create table part_null partition of list_parted FOR VALUES IN (null); + +-- fail +insert into part_aa_bb values ('cc', 1); +insert into part_aa_bb values ('AAa', 1); +insert into part_aa_bb values (null); +-- ok +insert into part_cc_dd values ('cC', 1); +insert into part_null values (null, 0); + +-- check in case of multi-level partitioned table +create table part_ee_ff partition of list_parted for values in ('ee', 'ff') partition by range (b); +create table part_ee_ff1 partition of part_ee_ff for values from (1) to (10); +create table part_ee_ff2 partition of part_ee_ff for values from (10) to (20); + +-- test default partition +create table part_default partition of list_parted default; +-- Negative test: a row, which would fit in other partition, does not fit +-- default partition, even when inserted directly +insert into part_default values ('aa', 2); +insert into part_default values (null, 2); +-- ok +insert into part_default values ('Zz', 2); +-- test if default partition works as expected for multi-level partitioned +-- table as well as when default partition itself is further partitioned +drop table part_default; +create table part_xx_yy partition of list_parted for values in ('xx', 'yy') partition by list (a); +create table part_xx_yy_p1 partition of part_xx_yy for values in ('xx'); +create table part_xx_yy_defpart partition of part_xx_yy default; +create table part_default partition of list_parted default partition by range(b); +create table part_default_p1 partition of part_default for values from (20) to (30); +create table part_default_p2 partition of part_default for values from (30) to (40); + +-- fail +insert into part_ee_ff1 values ('EE', 11); +insert into part_default_p2 values ('gg', 43); +-- fail (even the parent's, ie, part_ee_ff's partition constraint applies) +insert into part_ee_ff1 values ('cc', 1); +insert into part_default values ('gg', 43); +-- ok +insert into part_ee_ff1 values ('ff', 1); +insert into part_ee_ff2 values ('ff', 11); +insert into part_default_p1 values ('cd', 25); +insert into part_default_p2 values ('de', 35); +insert into list_parted values ('ab', 21); +insert into list_parted values ('xx', 1); +insert into list_parted values ('yy', 2); +select tableoid::regclass, * from list_parted; + +-- Check tuple routing for partitioned tables + +-- fail +insert into range_parted values ('a', 0); +-- ok +insert into range_parted values ('a', 1); +insert into range_parted values ('a', 10); +-- fail +insert into range_parted values ('a', 20); +-- ok +insert into range_parted values ('b', 1); +insert into range_parted values ('b', 10); +-- fail (partition key (b+0) is null) +insert into range_parted values ('a'); + +-- Check default partition +create table part_def partition of range_parted default; +-- fail +insert into part_def values ('b', 10); +-- ok +insert into part_def values ('c', 10); +insert into range_parted values (null, null); +insert into range_parted values ('a', null); +insert into range_parted values (null, 19); +insert into range_parted values ('b', 20); + +select tableoid::regclass, * from range_parted; +-- ok +insert into list_parted values (null, 1); +insert into list_parted (a) values ('aA'); +-- fail (partition of part_ee_ff not found in both cases) +insert into list_parted values ('EE', 0); +insert into part_ee_ff values ('EE', 0); +-- ok +insert into list_parted values ('EE', 1); +insert into part_ee_ff values ('EE', 10); +select tableoid::regclass, * from list_parted; + +-- some more tests to exercise tuple-routing with multi-level partitioning +create table part_gg partition of list_parted for values in ('gg') partition by range (b); +create table part_gg1 partition of part_gg for values from (minvalue) to (1); +create table part_gg2 partition of part_gg for values from (1) to (10) partition by range (b); +create table part_gg2_1 partition of part_gg2 for values from (1) to (5); +create table part_gg2_2 partition of part_gg2 for values from (5) to (10); + +create table part_ee_ff3 partition of part_ee_ff for values from (20) to (30) partition by range (b); +create table part_ee_ff3_1 partition of part_ee_ff3 for values from (20) to (25); +create table part_ee_ff3_2 partition of part_ee_ff3 for values from (25) to (30); + +truncate list_parted; +insert into list_parted values ('aa'), ('cc'); +insert into list_parted select 'Ff', s.a from generate_series(1, 29) s(a); +insert into list_parted select 'gg', s.a from generate_series(1, 9) s(a); +insert into list_parted (b) values (1); +select tableoid::regclass::text, a, min(b) as min_b, max(b) as max_b from list_parted group by 1, 2 order by 1; + +-- direct partition inserts should check hash partition bound constraint + +-- Use hand-rolled hash functions and operator classes to get predictable +-- result on different machines. The hash function for int4 simply returns +-- the sum of the values passed to it and the one for text returns the length +-- of the non-empty string value passed to it or 0. + +create or replace function part_hashint4_noop(value int4, seed int8) +returns int8 as $$ +select value + seed; +$$ language sql immutable; + +create operator class part_test_int4_ops +for type int4 +using hash as +operator 1 =, +function 2 part_hashint4_noop(int4, int8); + +create or replace function part_hashtext_length(value text, seed int8) +RETURNS int8 AS $$ +select length(coalesce(value, ''))::int8 +$$ language sql immutable; + +create operator class part_test_text_ops +for type text +using hash as +operator 1 =, +function 2 part_hashtext_length(text, int8); + +create table hash_parted ( + a int +) partition by hash (a part_test_int4_ops); +create table hpart0 partition of hash_parted for values with (modulus 4, remainder 0); +create table hpart1 partition of hash_parted for values with (modulus 4, remainder 1); +create table hpart2 partition of hash_parted for values with (modulus 4, remainder 2); +create table hpart3 partition of hash_parted for values with (modulus 4, remainder 3); + +insert into hash_parted values(generate_series(1,10)); + +-- direct insert of values divisible by 4 - ok; +insert into hpart0 values(12),(16); +-- fail; +insert into hpart0 values(11); +-- 11 % 4 -> 3 remainder i.e. valid data for hpart3 partition +insert into hpart3 values(11); + +-- view data +select tableoid::regclass as part, a, a%4 as "remainder = a % 4" +from hash_parted order by part; + +-- test \d+ output on a table which has both partitioned and unpartitioned +-- partitions +\d+ list_parted + +-- cleanup +drop table range_parted, list_parted; +drop table hash_parted; + +-- test that a default partition added as the first partition accepts any value +-- including null +create table list_parted (a int) partition by list (a); +create table part_default partition of list_parted default; +\d+ part_default +insert into part_default values (null); +insert into part_default values (1); +insert into part_default values (-1); +select tableoid::regclass, a from list_parted; +-- cleanup +drop table list_parted; + +-- more tests for certain multi-level partitioning scenarios +create table mlparted (a int, b int) partition by range (a, b); +create table mlparted1 (b int not null, a int not null) partition by range ((b+0)); +create table mlparted11 (like mlparted1); +alter table mlparted11 drop a; +alter table mlparted11 add a int; +alter table mlparted11 drop a; +alter table mlparted11 add a int not null; +-- attnum for key attribute 'a' is different in mlparted, mlparted1, and mlparted11 +select attrelid::regclass, attname, attnum +from pg_attribute +where attname = 'a' + and (attrelid = 'mlparted'::regclass + or attrelid = 'mlparted1'::regclass + or attrelid = 'mlparted11'::regclass) +order by attrelid::regclass::text; + +alter table mlparted1 attach partition mlparted11 for values from (2) to (5); +alter table mlparted attach partition mlparted1 for values from (1, 2) to (1, 10); + +-- check that "(1, 2)" is correctly routed to mlparted11. +insert into mlparted values (1, 2); +select tableoid::regclass, * from mlparted; + +-- check that proper message is shown after failure to route through mlparted1 +insert into mlparted (a, b) values (1, 5); + +truncate mlparted; +alter table mlparted add constraint check_b check (b = 3); + +-- have a BR trigger modify the row such that the check_b is violated +create function mlparted11_trig_fn() +returns trigger AS +$$ +begin + NEW.b := 4; + return NEW; +end; +$$ +language plpgsql; +create trigger mlparted11_trig before insert ON mlparted11 + for each row execute procedure mlparted11_trig_fn(); + +-- check that the correct row is shown when constraint check_b fails after +-- "(1, 2)" is routed to mlparted11 (actually "(1, 4)" would be shown due +-- to the BR trigger mlparted11_trig_fn) +insert into mlparted values (1, 2); +drop trigger mlparted11_trig on mlparted11; +drop function mlparted11_trig_fn(); + +-- check that inserting into an internal partition successfully results in +-- checking its partition constraint before inserting into the leaf partition +-- selected by tuple-routing +insert into mlparted1 (a, b) values (2, 3); + +-- check routing error through a list partitioned table when the key is null +create table lparted_nonullpart (a int, b char) partition by list (b); +create table lparted_nonullpart_a partition of lparted_nonullpart for values in ('a'); +insert into lparted_nonullpart values (1); +drop table lparted_nonullpart; + +-- check that RETURNING works correctly with tuple-routing +alter table mlparted drop constraint check_b; +create table mlparted12 partition of mlparted1 for values from (5) to (10); +create table mlparted2 (b int not null, a int not null); +alter table mlparted attach partition mlparted2 for values from (1, 10) to (1, 20); +create table mlparted3 partition of mlparted for values from (1, 20) to (1, 30); +create table mlparted4 (like mlparted); +alter table mlparted4 drop a; +alter table mlparted4 add a int not null; +alter table mlparted attach partition mlparted4 for values from (1, 30) to (1, 40); +with ins (a, b, c) as + (insert into mlparted (b, a) select s.a, 1 from generate_series(2, 39) s(a) returning tableoid::regclass, *) + select a, b, min(c), max(c) from ins group by a, b order by 1; + +alter table mlparted add c text; +create table mlparted5 (c text, a int not null, b int not null) partition by list (c); +create table mlparted5a (a int not null, c text, b int not null); +alter table mlparted5 attach partition mlparted5a for values in ('a'); +alter table mlparted attach partition mlparted5 for values from (1, 40) to (1, 50); +alter table mlparted add constraint check_b check (a = 1 and b < 45); +insert into mlparted values (1, 45, 'a'); +create function mlparted5abrtrig_func() returns trigger as $$ begin new.c = 'b'; return new; end; $$ language plpgsql; +create trigger mlparted5abrtrig before insert on mlparted5a for each row execute procedure mlparted5abrtrig_func(); +insert into mlparted5 (a, b, c) values (1, 40, 'a'); +drop table mlparted5; +alter table mlparted drop constraint check_b; + +-- Check multi-level default partition +create table mlparted_def partition of mlparted default partition by range(a); +create table mlparted_def1 partition of mlparted_def for values from (40) to (50); +create table mlparted_def2 partition of mlparted_def for values from (50) to (60); +insert into mlparted values (40, 100); +insert into mlparted_def1 values (42, 100); +insert into mlparted_def2 values (54, 50); +-- fail +insert into mlparted values (70, 100); +insert into mlparted_def1 values (52, 50); +insert into mlparted_def2 values (34, 50); +-- ok +create table mlparted_defd partition of mlparted_def default; +insert into mlparted values (70, 100); + +select tableoid::regclass, * from mlparted_def; + +-- Check multi-level tuple routing with attributes dropped from the +-- top-most parent. First remove the last attribute. +alter table mlparted add d int, add e int; +alter table mlparted drop e; +create table mlparted5 partition of mlparted + for values from (1, 40) to (1, 50) partition by range (c); +create table mlparted5_ab partition of mlparted5 + for values from ('a') to ('c') partition by list (c); +-- This partitioned table should remain with no partitions. +create table mlparted5_cd partition of mlparted5 + for values from ('c') to ('e') partition by list (c); +create table mlparted5_a partition of mlparted5_ab for values in ('a'); +create table mlparted5_b (d int, b int, c text, a int); +alter table mlparted5_ab attach partition mlparted5_b for values in ('b'); +truncate mlparted; +insert into mlparted values (1, 2, 'a', 1); +insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a +insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b +insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails +insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails +select tableoid::regclass, * from mlparted order by a, b, c, d; +alter table mlparted drop d; +truncate mlparted; +-- Remove the before last attribute. +alter table mlparted add e int, add d int; +alter table mlparted drop e; +insert into mlparted values (1, 2, 'a', 1); +insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a +insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b +insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails +insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails +select tableoid::regclass, * from mlparted order by a, b, c, d; +alter table mlparted drop d; +drop table mlparted5; + +-- check that message shown after failure to find a partition shows the +-- appropriate key description (or none) in various situations +create table key_desc (a int, b int) partition by list ((a+0)); +create table key_desc_1 partition of key_desc for values in (1) partition by range (b); + +create user regress_insert_other_user; +grant select (a) on key_desc_1 to regress_insert_other_user; +grant insert on key_desc to regress_insert_other_user; + +set role regress_insert_other_user; +-- no key description is shown +insert into key_desc values (1, 1); + +reset role; +grant select (b) on key_desc_1 to regress_insert_other_user; +set role regress_insert_other_user; +-- key description (b)=(1) is now shown +insert into key_desc values (1, 1); + +-- key description is not shown if key contains expression +insert into key_desc values (2, 1); +reset role; +revoke all on key_desc from regress_insert_other_user; +revoke all on key_desc_1 from regress_insert_other_user; +drop role regress_insert_other_user; +drop table key_desc, key_desc_1; + +-- test minvalue/maxvalue restrictions +create table mcrparted (a int, b int, c int) partition by range (a, abs(b), c); +create table mcrparted0 partition of mcrparted for values from (minvalue, 0, 0) to (1, maxvalue, maxvalue); +create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, minvalue); +create table mcrparted4 partition of mcrparted for values from (21, minvalue, 0) to (30, 20, minvalue); + +-- check multi-column range partitioning expression enforces the same +-- constraint as what tuple-routing would determine it to be +create table mcrparted0 partition of mcrparted for values from (minvalue, minvalue, minvalue) to (1, maxvalue, maxvalue); +create table mcrparted1 partition of mcrparted for values from (2, 1, minvalue) to (10, 5, 10); +create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, maxvalue); +create table mcrparted3 partition of mcrparted for values from (11, 1, 1) to (20, 10, 10); +create table mcrparted4 partition of mcrparted for values from (21, minvalue, minvalue) to (30, 20, maxvalue); +create table mcrparted5 partition of mcrparted for values from (30, 21, 20) to (maxvalue, maxvalue, maxvalue); + +-- null not allowed in range partition +insert into mcrparted values (null, null, null); + +-- routed to mcrparted0 +insert into mcrparted values (0, 1, 1); +insert into mcrparted0 values (0, 1, 1); + +-- routed to mcparted1 +insert into mcrparted values (9, 1000, 1); +insert into mcrparted1 values (9, 1000, 1); +insert into mcrparted values (10, 5, -1); +insert into mcrparted1 values (10, 5, -1); +insert into mcrparted values (2, 1, 0); +insert into mcrparted1 values (2, 1, 0); + +-- routed to mcparted2 +insert into mcrparted values (10, 6, 1000); +insert into mcrparted2 values (10, 6, 1000); +insert into mcrparted values (10, 1000, 1000); +insert into mcrparted2 values (10, 1000, 1000); + +-- no partition exists, nor does mcrparted3 accept it +insert into mcrparted values (11, 1, -1); +insert into mcrparted3 values (11, 1, -1); + +-- routed to mcrparted5 +insert into mcrparted values (30, 21, 20); +insert into mcrparted5 values (30, 21, 20); +insert into mcrparted4 values (30, 21, 20); -- error + +-- check rows +select tableoid::regclass::text, * from mcrparted order by 1; + +-- cleanup +drop table mcrparted; + +-- check that a BR constraint can't make partition contain violating rows +create table brtrigpartcon (a int, b text) partition by list (a); +create table brtrigpartcon1 partition of brtrigpartcon for values in (1); +create or replace function brtrigpartcon1trigf() returns trigger as $$begin new.a := 2; return new; end$$ language plpgsql; +create trigger brtrigpartcon1trig before insert on brtrigpartcon1 for each row execute procedure brtrigpartcon1trigf(); +insert into brtrigpartcon values (1, 'hi there'); +insert into brtrigpartcon1 values (1, 'hi there'); + +-- check that the message shows the appropriate column description in a +-- situation where the partitioned table is not the primary ModifyTable node +create table inserttest3 (f1 text default 'foo', f2 text default 'bar', f3 int); +create role regress_coldesc_role; +grant insert on inserttest3 to regress_coldesc_role; +grant insert on brtrigpartcon to regress_coldesc_role; +revoke select on brtrigpartcon from regress_coldesc_role; +set role regress_coldesc_role; +with result as (insert into brtrigpartcon values (1, 'hi there') returning 1) + insert into inserttest3 (f3) select * from result; +reset role; + +-- cleanup +revoke all on inserttest3 from regress_coldesc_role; +revoke all on brtrigpartcon from regress_coldesc_role; +drop role regress_coldesc_role; +drop table inserttest3; +drop table brtrigpartcon; +drop function brtrigpartcon1trigf(); + +-- check that "do nothing" BR triggers work with tuple-routing +create table donothingbrtrig_test (a int, b text) partition by list (a); +create table donothingbrtrig_test1 (b text, a int); +create table donothingbrtrig_test2 (c text, b text, a int); +alter table donothingbrtrig_test2 drop column c; +create or replace function donothingbrtrig_func() returns trigger as $$begin raise notice 'b: %', new.b; return NULL; end$$ language plpgsql; +create trigger donothingbrtrig1 before insert on donothingbrtrig_test1 for each row execute procedure donothingbrtrig_func(); +create trigger donothingbrtrig2 before insert on donothingbrtrig_test2 for each row execute procedure donothingbrtrig_func(); +alter table donothingbrtrig_test attach partition donothingbrtrig_test1 for values in (1); +alter table donothingbrtrig_test attach partition donothingbrtrig_test2 for values in (2); +insert into donothingbrtrig_test values (1, 'foo'), (2, 'bar'); +copy donothingbrtrig_test from stdout; +1 baz +2 qux +\. +select tableoid::regclass, * from donothingbrtrig_test; + +-- cleanup +drop table donothingbrtrig_test; +drop function donothingbrtrig_func(); + +-- check multi-column range partitioning with minvalue/maxvalue constraints +create table mcrparted (a text, b int) partition by range(a, b); +create table mcrparted1_lt_b partition of mcrparted for values from (minvalue, minvalue) to ('b', minvalue); +create table mcrparted2_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue); +create table mcrparted3_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue); +create table mcrparted4_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0); +create table mcrparted5_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10); +create table mcrparted6_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue); +create table mcrparted7_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue); +create table mcrparted8_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, maxvalue); + +\d+ mcrparted +\d+ mcrparted1_lt_b +\d+ mcrparted2_b +\d+ mcrparted3_c_to_common +\d+ mcrparted4_common_lt_0 +\d+ mcrparted5_common_0_to_10 +\d+ mcrparted6_common_ge_10 +\d+ mcrparted7_gt_common_lt_d +\d+ mcrparted8_ge_d + +insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10), + ('comm', -10), ('common', -10), ('common', 0), ('common', 10), + ('commons', 0), ('d', -10), ('e', 0); +select tableoid::regclass, * from mcrparted order by a, b; +drop table mcrparted; + +-- check that wholerow vars in the RETURNING list work with partitioned tables +create table returningwrtest (a int) partition by list (a); +create table returningwrtest1 partition of returningwrtest for values in (1); +insert into returningwrtest values (1) returning returningwrtest; + +-- check also that the wholerow vars in RETURNING list are converted as needed +alter table returningwrtest add b text; +create table returningwrtest2 (b text, c int, a int); +alter table returningwrtest2 drop c; +alter table returningwrtest attach partition returningwrtest2 for values in (2); +insert into returningwrtest values (2, 'foo') returning returningwrtest; +drop table returningwrtest; +*/ +-- Clean up +DO $d$ +declare + l_rec record; +begin + for l_rec in (select foreign_table_schema, foreign_table_name + from information_schema.foreign_tables) loop + execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); + end loop; +end; +$d$; +--Testcase 21: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 22: +DROP SERVER influxdb_svr CASCADE; +--Testcase 23: +DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/schemaless/extra/join.out b/expected/15.0/schemaless/extra/join.out new file mode 100644 index 0000000..2190e31 --- /dev/null +++ b/expected/15.0/schemaless/extra/join.out @@ -0,0 +1,7528 @@ +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +-- import time column as timestamp and text type +-- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; +-- +-- JOIN +-- Test JOIN clauses +-- +--Testcase 4: +CREATE FOREIGN TABLE J1_TBL ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 575: +CREATE FOREIGN TABLE j1_tbl_nsc ( + i integer, + j integer, + t text +) SERVER influxdb_svr OPTIONS (table 'j1_tbl'); +--Testcase 5: +CREATE FOREIGN TABLE J2_TBL ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 576: +CREATE FOREIGN TABLE j2_tbl_nsc ( + i integer, + k integer +) SERVER influxdb_svr OPTIONS (table 'j2_tbl'); +--Testcase 6: +INSERT INTO j1_tbl_nsc VALUES (1, 4, 'one'); +--Testcase 7: +INSERT INTO j1_tbl_nsc VALUES (2, 3, 'two'); +--Testcase 8: +INSERT INTO j1_tbl_nsc VALUES (3, 2, 'three'); +--Testcase 9: +INSERT INTO j1_tbl_nsc VALUES (4, 1, 'four'); +--Testcase 10: +INSERT INTO j1_tbl_nsc VALUES (5, 0, 'five'); +--Testcase 11: +INSERT INTO j1_tbl_nsc VALUES (6, 6, 'six'); +--Testcase 12: +INSERT INTO j1_tbl_nsc VALUES (7, 7, 'seven'); +--Testcase 13: +INSERT INTO j1_tbl_nsc VALUES (8, 8, 'eight'); +--Testcase 14: +INSERT INTO j1_tbl_nsc VALUES (0, NULL, 'zero'); +--Testcase 15: +INSERT INTO j1_tbl_nsc VALUES (NULL, NULL, 'null'); +--Testcase 16: +INSERT INTO j1_tbl_nsc VALUES (NULL, 0, 'zero'); +--Testcase 17: +INSERT INTO j2_tbl_nsc VALUES (1, -1); +--Testcase 18: +INSERT INTO j2_tbl_nsc VALUES (2, 2); +--Testcase 19: +INSERT INTO j2_tbl_nsc VALUES (3, -3); +--Testcase 20: +INSERT INTO j2_tbl_nsc VALUES (2, 4); +--Testcase 21: +INSERT INTO j2_tbl_nsc VALUES (5, -5); +--Testcase 22: +INSERT INTO j2_tbl_nsc VALUES (5, -5); +--Testcase 23: +INSERT INTO j2_tbl_nsc VALUES (0, NULL); +--InfluxDB does not accept NULL value +--INSERT INTO J2_TBL VALUES (NULL, NULL); +--Testcase 24: +INSERT INTO j2_tbl_nsc VALUES (NULL, 0); +--Testcase 25: +CREATE FOREIGN TABLE tenk1 ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); +--Does not support on Postgres 12 +--ALTER TABLE tenk1 SET WITH OIDS; +--Testcase 26: +CREATE FOREIGN TABLE tenk2 ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); +--Testcase 27: +CREATE FOREIGN TABLE INT4_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 28: +CREATE FOREIGN TABLE FLOAT8_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 29: +CREATE FOREIGN TABLE INT8_TBL( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 30: +CREATE FOREIGN TABLE INT2_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +-- useful in some tests below +--Testcase 31: +create temp table onerow(); +--Testcase 32: +insert into onerow default values; +analyze onerow; +-- +-- CORRELATION NAMES +-- Make sure that table/column aliases are supported +-- before diving into more complex join syntax. +-- +--Testcase 33: +SELECT * + FROM J1_TBL AS tx; + fields +------------------------------------- + {"i": "1", "j": "4", "t": "one"} + {"i": "2", "j": "3", "t": "two"} + {"i": "3", "j": "2", "t": "three"} + {"i": "4", "j": "1", "t": "four"} + {"i": "5", "j": "0", "t": "five"} + {"i": "6", "j": "6", "t": "six"} + {"i": "7", "j": "7", "t": "seven"} + {"i": "8", "j": "8", "t": "eight"} + {"i": "0", "j": null, "t": "zero"} + {"i": null, "j": null, "t": "null"} + {"i": null, "j": "0", "t": "zero"} +(11 rows) + +--Testcase 34: +SELECT * + FROM J1_TBL tx; + fields +------------------------------------- + {"i": "1", "j": "4", "t": "one"} + {"i": "2", "j": "3", "t": "two"} + {"i": "3", "j": "2", "t": "three"} + {"i": "4", "j": "1", "t": "four"} + {"i": "5", "j": "0", "t": "five"} + {"i": "6", "j": "6", "t": "six"} + {"i": "7", "j": "7", "t": "seven"} + {"i": "8", "j": "8", "t": "eight"} + {"i": "0", "j": null, "t": "zero"} + {"i": null, "j": null, "t": "null"} + {"i": null, "j": "0", "t": "zero"} +(11 rows) + +--Testcase 35: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) AS t1 (a, b, c); + a | b | c +---+---+------- + 1 | 4 | one + 2 | 3 | two + 3 | 2 | three + 4 | 1 | four + 5 | 0 | five + 6 | 6 | six + 7 | 7 | seven + 8 | 8 | eight + 0 | | zero + | | null + | 0 | zero +(11 rows) + +--Testcase 36: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c); + a | b | c +---+---+------- + 1 | 4 | one + 2 | 3 | two + 3 | 2 | three + 4 | 1 | four + 5 | 0 | five + 6 | 6 | six + 7 | 7 | seven + 8 | 8 | eight + 0 | | zero + | | null + | 0 | zero +(11 rows) + +--Testcase 37: +SELECT * + FROM (SELECT (fields->>'i')::int, (fields->>'j')::int,fields->>'t' FROM J1_TBL) t1 (a, b, c), (SELECT (fields->>'i')::int ,(fields->>'k')::int FROM J2_TBL) t2 (d, e) ORDER BY t1.a, t1.b, t1.c, t2.d, t2.e; + a | b | c | d | e +---+---+-------+---+---- + 0 | | zero | 0 | + 0 | | zero | 1 | -1 + 0 | | zero | 2 | 2 + 0 | | zero | 2 | 4 + 0 | | zero | 3 | -3 + 0 | | zero | 5 | -5 + 0 | | zero | 5 | -5 + 0 | | zero | | 0 + 1 | 4 | one | 0 | + 1 | 4 | one | 1 | -1 + 1 | 4 | one | 2 | 2 + 1 | 4 | one | 2 | 4 + 1 | 4 | one | 3 | -3 + 1 | 4 | one | 5 | -5 + 1 | 4 | one | 5 | -5 + 1 | 4 | one | | 0 + 2 | 3 | two | 0 | + 2 | 3 | two | 1 | -1 + 2 | 3 | two | 2 | 2 + 2 | 3 | two | 2 | 4 + 2 | 3 | two | 3 | -3 + 2 | 3 | two | 5 | -5 + 2 | 3 | two | 5 | -5 + 2 | 3 | two | | 0 + 3 | 2 | three | 0 | + 3 | 2 | three | 1 | -1 + 3 | 2 | three | 2 | 2 + 3 | 2 | three | 2 | 4 + 3 | 2 | three | 3 | -3 + 3 | 2 | three | 5 | -5 + 3 | 2 | three | 5 | -5 + 3 | 2 | three | | 0 + 4 | 1 | four | 0 | + 4 | 1 | four | 1 | -1 + 4 | 1 | four | 2 | 2 + 4 | 1 | four | 2 | 4 + 4 | 1 | four | 3 | -3 + 4 | 1 | four | 5 | -5 + 4 | 1 | four | 5 | -5 + 4 | 1 | four | | 0 + 5 | 0 | five | 0 | + 5 | 0 | five | 1 | -1 + 5 | 0 | five | 2 | 2 + 5 | 0 | five | 2 | 4 + 5 | 0 | five | 3 | -3 + 5 | 0 | five | 5 | -5 + 5 | 0 | five | 5 | -5 + 5 | 0 | five | | 0 + 6 | 6 | six | 0 | + 6 | 6 | six | 1 | -1 + 6 | 6 | six | 2 | 2 + 6 | 6 | six | 2 | 4 + 6 | 6 | six | 3 | -3 + 6 | 6 | six | 5 | -5 + 6 | 6 | six | 5 | -5 + 6 | 6 | six | | 0 + 7 | 7 | seven | 0 | + 7 | 7 | seven | 1 | -1 + 7 | 7 | seven | 2 | 2 + 7 | 7 | seven | 2 | 4 + 7 | 7 | seven | 3 | -3 + 7 | 7 | seven | 5 | -5 + 7 | 7 | seven | 5 | -5 + 7 | 7 | seven | | 0 + 8 | 8 | eight | 0 | + 8 | 8 | eight | 1 | -1 + 8 | 8 | eight | 2 | 2 + 8 | 8 | eight | 2 | 4 + 8 | 8 | eight | 3 | -3 + 8 | 8 | eight | 5 | -5 + 8 | 8 | eight | 5 | -5 + 8 | 8 | eight | | 0 + | 0 | zero | 0 | + | 0 | zero | 1 | -1 + | 0 | zero | 2 | 2 + | 0 | zero | 2 | 4 + | 0 | zero | 3 | -3 + | 0 | zero | 5 | -5 + | 0 | zero | 5 | -5 + | 0 | zero | | 0 + | | null | 0 | + | | null | 1 | -1 + | | null | 2 | 2 + | | null | 2 | 4 + | | null | 3 | -3 + | | null | 5 | -5 + | | null | 5 | -5 + | | null | | 0 +(88 rows) + +--Testcase 38: +SELECT t1.a, t2.e + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c), (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, e) + WHERE t1.a = t2.d; + a | e +---+---- + 0 | + 1 | -1 + 2 | 2 + 2 | 4 + 3 | -3 + 5 | -5 + 5 | -5 +(7 rows) + +-- +-- CROSS JOIN +-- Qualifications are not allowed on cross joins, +-- which degenerate into a standard unqualified inner join. +-- +--Testcase 39: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; + i | j | t | i | k +---+---+-------+---+---- + 0 | | zero | 0 | + 0 | | zero | 1 | -1 + 0 | | zero | 2 | 2 + 0 | | zero | 2 | 4 + 0 | | zero | 3 | -3 + 0 | | zero | 5 | -5 + 0 | | zero | 5 | -5 + 0 | | zero | | 0 + 1 | 4 | one | 0 | + 1 | 4 | one | 1 | -1 + 1 | 4 | one | 2 | 2 + 1 | 4 | one | 2 | 4 + 1 | 4 | one | 3 | -3 + 1 | 4 | one | 5 | -5 + 1 | 4 | one | 5 | -5 + 1 | 4 | one | | 0 + 2 | 3 | two | 0 | + 2 | 3 | two | 1 | -1 + 2 | 3 | two | 2 | 2 + 2 | 3 | two | 2 | 4 + 2 | 3 | two | 3 | -3 + 2 | 3 | two | 5 | -5 + 2 | 3 | two | 5 | -5 + 2 | 3 | two | | 0 + 3 | 2 | three | 0 | + 3 | 2 | three | 1 | -1 + 3 | 2 | three | 2 | 2 + 3 | 2 | three | 2 | 4 + 3 | 2 | three | 3 | -3 + 3 | 2 | three | 5 | -5 + 3 | 2 | three | 5 | -5 + 3 | 2 | three | | 0 + 4 | 1 | four | 0 | + 4 | 1 | four | 1 | -1 + 4 | 1 | four | 2 | 2 + 4 | 1 | four | 2 | 4 + 4 | 1 | four | 3 | -3 + 4 | 1 | four | 5 | -5 + 4 | 1 | four | 5 | -5 + 4 | 1 | four | | 0 + 5 | 0 | five | 0 | + 5 | 0 | five | 1 | -1 + 5 | 0 | five | 2 | 2 + 5 | 0 | five | 2 | 4 + 5 | 0 | five | 3 | -3 + 5 | 0 | five | 5 | -5 + 5 | 0 | five | 5 | -5 + 5 | 0 | five | | 0 + 6 | 6 | six | 0 | + 6 | 6 | six | 1 | -1 + 6 | 6 | six | 2 | 2 + 6 | 6 | six | 2 | 4 + 6 | 6 | six | 3 | -3 + 6 | 6 | six | 5 | -5 + 6 | 6 | six | 5 | -5 + 6 | 6 | six | | 0 + 7 | 7 | seven | 0 | + 7 | 7 | seven | 1 | -1 + 7 | 7 | seven | 2 | 2 + 7 | 7 | seven | 2 | 4 + 7 | 7 | seven | 3 | -3 + 7 | 7 | seven | 5 | -5 + 7 | 7 | seven | 5 | -5 + 7 | 7 | seven | | 0 + 8 | 8 | eight | 0 | + 8 | 8 | eight | 1 | -1 + 8 | 8 | eight | 2 | 2 + 8 | 8 | eight | 2 | 4 + 8 | 8 | eight | 3 | -3 + 8 | 8 | eight | 5 | -5 + 8 | 8 | eight | 5 | -5 + 8 | 8 | eight | | 0 + | 0 | zero | 0 | + | 0 | zero | 1 | -1 + | 0 | zero | 2 | 2 + | 0 | zero | 2 | 4 + | 0 | zero | 3 | -3 + | 0 | zero | 5 | -5 + | 0 | zero | 5 | -5 + | 0 | zero | | 0 + | | null | 0 | + | | null | 1 | -1 + | | null | 2 | 2 + | | null | 2 | 4 + | | null | 3 | -3 + | | null | 5 | -5 + | | null | 5 | -5 + | | null | | 0 +(88 rows) + +-- ambiguous column +--Testcase 40: +SELECT i, k, t + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; +ERROR: column reference "i" is ambiguous +LINE 1: SELECT i, k, t + ^ +-- resolve previous ambiguity by specifying the table name +--Testcase 41: +SELECT t1.i, k, t + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 ORDER BY t1.i, t1.j, t1.t, t2.i, t2.k; + i | k | t +---+----+------- + 0 | | zero + 0 | -1 | zero + 0 | 2 | zero + 0 | 4 | zero + 0 | -3 | zero + 0 | -5 | zero + 0 | -5 | zero + 0 | 0 | zero + 1 | | one + 1 | -1 | one + 1 | 2 | one + 1 | 4 | one + 1 | -3 | one + 1 | -5 | one + 1 | -5 | one + 1 | 0 | one + 2 | | two + 2 | -1 | two + 2 | 2 | two + 2 | 4 | two + 2 | -3 | two + 2 | -5 | two + 2 | -5 | two + 2 | 0 | two + 3 | | three + 3 | -1 | three + 3 | 2 | three + 3 | 4 | three + 3 | -3 | three + 3 | -5 | three + 3 | -5 | three + 3 | 0 | three + 4 | | four + 4 | -1 | four + 4 | 2 | four + 4 | 4 | four + 4 | -3 | four + 4 | -5 | four + 4 | -5 | four + 4 | 0 | four + 5 | | five + 5 | -1 | five + 5 | 2 | five + 5 | 4 | five + 5 | -3 | five + 5 | -5 | five + 5 | -5 | five + 5 | 0 | five + 6 | | six + 6 | -1 | six + 6 | 2 | six + 6 | 4 | six + 6 | -3 | six + 6 | -5 | six + 6 | -5 | six + 6 | 0 | six + 7 | | seven + 7 | -1 | seven + 7 | 2 | seven + 7 | 4 | seven + 7 | -3 | seven + 7 | -5 | seven + 7 | -5 | seven + 7 | 0 | seven + 8 | | eight + 8 | -1 | eight + 8 | 2 | eight + 8 | 4 | eight + 8 | -3 | eight + 8 | -5 | eight + 8 | -5 | eight + 8 | 0 | eight + | | zero + | -1 | zero + | 2 | zero + | 4 | zero + | -3 | zero + | -5 | zero + | -5 | zero + | 0 | zero + | | null + | -1 | null + | 2 | null + | 4 | null + | -3 | null + | -5 | null + | -5 | null + | 0 | null +(88 rows) + +--Testcase 42: +SELECT ii, tt, kk + FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL) + AS tx (ii, jj, tt, ii2, kk) ORDER BY ii, tt, kk; + ii | tt | kk +----+-------+---- + 0 | zero | -5 + 0 | zero | -5 + 0 | zero | -3 + 0 | zero | -1 + 0 | zero | 0 + 0 | zero | 2 + 0 | zero | 4 + 0 | zero | + 1 | one | -5 + 1 | one | -5 + 1 | one | -3 + 1 | one | -1 + 1 | one | 0 + 1 | one | 2 + 1 | one | 4 + 1 | one | + 2 | two | -5 + 2 | two | -5 + 2 | two | -3 + 2 | two | -1 + 2 | two | 0 + 2 | two | 2 + 2 | two | 4 + 2 | two | + 3 | three | -5 + 3 | three | -5 + 3 | three | -3 + 3 | three | -1 + 3 | three | 0 + 3 | three | 2 + 3 | three | 4 + 3 | three | + 4 | four | -5 + 4 | four | -5 + 4 | four | -3 + 4 | four | -1 + 4 | four | 0 + 4 | four | 2 + 4 | four | 4 + 4 | four | + 5 | five | -5 + 5 | five | -5 + 5 | five | -3 + 5 | five | -1 + 5 | five | 0 + 5 | five | 2 + 5 | five | 4 + 5 | five | + 6 | six | -5 + 6 | six | -5 + 6 | six | -3 + 6 | six | -1 + 6 | six | 0 + 6 | six | 2 + 6 | six | 4 + 6 | six | + 7 | seven | -5 + 7 | seven | -5 + 7 | seven | -3 + 7 | seven | -1 + 7 | seven | 0 + 7 | seven | 2 + 7 | seven | 4 + 7 | seven | + 8 | eight | -5 + 8 | eight | -5 + 8 | eight | -3 + 8 | eight | -1 + 8 | eight | 0 + 8 | eight | 2 + 8 | eight | 4 + 8 | eight | + | null | -5 + | null | -5 + | null | -3 + | null | -1 + | null | 0 + | null | 2 + | null | 4 + | null | + | zero | -5 + | zero | -5 + | zero | -3 + | zero | -1 + | zero | 0 + | zero | 2 + | zero | 4 + | zero | +(88 rows) + +--Testcase 43: +SELECT tx.ii, tx.jj, tx.kk + FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, e)) + AS tx (ii, jj, tt, ii2, kk) ORDER BY tx.ii, tx.jj, tx.kk; + ii | jj | kk +----+----+---- + 0 | | -5 + 0 | | -5 + 0 | | -3 + 0 | | -1 + 0 | | 0 + 0 | | 2 + 0 | | 4 + 0 | | + 1 | 4 | -5 + 1 | 4 | -5 + 1 | 4 | -3 + 1 | 4 | -1 + 1 | 4 | 0 + 1 | 4 | 2 + 1 | 4 | 4 + 1 | 4 | + 2 | 3 | -5 + 2 | 3 | -5 + 2 | 3 | -3 + 2 | 3 | -1 + 2 | 3 | 0 + 2 | 3 | 2 + 2 | 3 | 4 + 2 | 3 | + 3 | 2 | -5 + 3 | 2 | -5 + 3 | 2 | -3 + 3 | 2 | -1 + 3 | 2 | 0 + 3 | 2 | 2 + 3 | 2 | 4 + 3 | 2 | + 4 | 1 | -5 + 4 | 1 | -5 + 4 | 1 | -3 + 4 | 1 | -1 + 4 | 1 | 0 + 4 | 1 | 2 + 4 | 1 | 4 + 4 | 1 | + 5 | 0 | -5 + 5 | 0 | -5 + 5 | 0 | -3 + 5 | 0 | -1 + 5 | 0 | 0 + 5 | 0 | 2 + 5 | 0 | 4 + 5 | 0 | + 6 | 6 | -5 + 6 | 6 | -5 + 6 | 6 | -3 + 6 | 6 | -1 + 6 | 6 | 0 + 6 | 6 | 2 + 6 | 6 | 4 + 6 | 6 | + 7 | 7 | -5 + 7 | 7 | -5 + 7 | 7 | -3 + 7 | 7 | -1 + 7 | 7 | 0 + 7 | 7 | 2 + 7 | 7 | 4 + 7 | 7 | + 8 | 8 | -5 + 8 | 8 | -5 + 8 | 8 | -3 + 8 | 8 | -1 + 8 | 8 | 0 + 8 | 8 | 2 + 8 | 8 | 4 + 8 | 8 | + | 0 | -5 + | 0 | -5 + | 0 | -3 + | 0 | -1 + | 0 | 0 + | 0 | 2 + | 0 | 4 + | 0 | + | | -5 + | | -5 + | | -3 + | | -1 + | | 0 + | | 2 + | | 4 + | | +(88 rows) + +--Testcase 44: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) a CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) b ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, a.i, a.k, b.i, b.k; + i | j | t | i | k | i | k +---+---+-------+---+----+---+---- + 0 | | zero | 0 | | 0 | + 0 | | zero | 0 | | 1 | -1 + 0 | | zero | 0 | | 2 | 2 + 0 | | zero | 0 | | 2 | 4 + 0 | | zero | 0 | | 3 | -3 + 0 | | zero | 0 | | 5 | -5 + 0 | | zero | 0 | | 5 | -5 + 0 | | zero | 0 | | | 0 + 0 | | zero | 1 | -1 | 0 | + 0 | | zero | 1 | -1 | 1 | -1 + 0 | | zero | 1 | -1 | 2 | 2 + 0 | | zero | 1 | -1 | 2 | 4 + 0 | | zero | 1 | -1 | 3 | -3 + 0 | | zero | 1 | -1 | 5 | -5 + 0 | | zero | 1 | -1 | 5 | -5 + 0 | | zero | 1 | -1 | | 0 + 0 | | zero | 2 | 2 | 0 | + 0 | | zero | 2 | 2 | 1 | -1 + 0 | | zero | 2 | 2 | 2 | 2 + 0 | | zero | 2 | 2 | 2 | 4 + 0 | | zero | 2 | 2 | 3 | -3 + 0 | | zero | 2 | 2 | 5 | -5 + 0 | | zero | 2 | 2 | 5 | -5 + 0 | | zero | 2 | 2 | | 0 + 0 | | zero | 2 | 4 | 0 | + 0 | | zero | 2 | 4 | 1 | -1 + 0 | | zero | 2 | 4 | 2 | 2 + 0 | | zero | 2 | 4 | 2 | 4 + 0 | | zero | 2 | 4 | 3 | -3 + 0 | | zero | 2 | 4 | 5 | -5 + 0 | | zero | 2 | 4 | 5 | -5 + 0 | | zero | 2 | 4 | | 0 + 0 | | zero | 3 | -3 | 0 | + 0 | | zero | 3 | -3 | 1 | -1 + 0 | | zero | 3 | -3 | 2 | 2 + 0 | | zero | 3 | -3 | 2 | 4 + 0 | | zero | 3 | -3 | 3 | -3 + 0 | | zero | 3 | -3 | 5 | -5 + 0 | | zero | 3 | -3 | 5 | -5 + 0 | | zero | 3 | -3 | | 0 + 0 | | zero | 5 | -5 | 0 | + 0 | | zero | 5 | -5 | 0 | + 0 | | zero | 5 | -5 | 1 | -1 + 0 | | zero | 5 | -5 | 1 | -1 + 0 | | zero | 5 | -5 | 2 | 2 + 0 | | zero | 5 | -5 | 2 | 2 + 0 | | zero | 5 | -5 | 2 | 4 + 0 | | zero | 5 | -5 | 2 | 4 + 0 | | zero | 5 | -5 | 3 | -3 + 0 | | zero | 5 | -5 | 3 | -3 + 0 | | zero | 5 | -5 | 5 | -5 + 0 | | zero | 5 | -5 | 5 | -5 + 0 | | zero | 5 | -5 | 5 | -5 + 0 | | zero | 5 | -5 | 5 | -5 + 0 | | zero | 5 | -5 | | 0 + 0 | | zero | 5 | -5 | | 0 + 0 | | zero | | 0 | 0 | + 0 | | zero | | 0 | 1 | -1 + 0 | | zero | | 0 | 2 | 2 + 0 | | zero | | 0 | 2 | 4 + 0 | | zero | | 0 | 3 | -3 + 0 | | zero | | 0 | 5 | -5 + 0 | | zero | | 0 | 5 | -5 + 0 | | zero | | 0 | | 0 + 1 | 4 | one | 0 | | 0 | + 1 | 4 | one | 0 | | 1 | -1 + 1 | 4 | one | 0 | | 2 | 2 + 1 | 4 | one | 0 | | 2 | 4 + 1 | 4 | one | 0 | | 3 | -3 + 1 | 4 | one | 0 | | 5 | -5 + 1 | 4 | one | 0 | | 5 | -5 + 1 | 4 | one | 0 | | | 0 + 1 | 4 | one | 1 | -1 | 0 | + 1 | 4 | one | 1 | -1 | 1 | -1 + 1 | 4 | one | 1 | -1 | 2 | 2 + 1 | 4 | one | 1 | -1 | 2 | 4 + 1 | 4 | one | 1 | -1 | 3 | -3 + 1 | 4 | one | 1 | -1 | 5 | -5 + 1 | 4 | one | 1 | -1 | 5 | -5 + 1 | 4 | one | 1 | -1 | | 0 + 1 | 4 | one | 2 | 2 | 0 | + 1 | 4 | one | 2 | 2 | 1 | -1 + 1 | 4 | one | 2 | 2 | 2 | 2 + 1 | 4 | one | 2 | 2 | 2 | 4 + 1 | 4 | one | 2 | 2 | 3 | -3 + 1 | 4 | one | 2 | 2 | 5 | -5 + 1 | 4 | one | 2 | 2 | 5 | -5 + 1 | 4 | one | 2 | 2 | | 0 + 1 | 4 | one | 2 | 4 | 0 | + 1 | 4 | one | 2 | 4 | 1 | -1 + 1 | 4 | one | 2 | 4 | 2 | 2 + 1 | 4 | one | 2 | 4 | 2 | 4 + 1 | 4 | one | 2 | 4 | 3 | -3 + 1 | 4 | one | 2 | 4 | 5 | -5 + 1 | 4 | one | 2 | 4 | 5 | -5 + 1 | 4 | one | 2 | 4 | | 0 + 1 | 4 | one | 3 | -3 | 0 | + 1 | 4 | one | 3 | -3 | 1 | -1 + 1 | 4 | one | 3 | -3 | 2 | 2 + 1 | 4 | one | 3 | -3 | 2 | 4 + 1 | 4 | one | 3 | -3 | 3 | -3 + 1 | 4 | one | 3 | -3 | 5 | -5 + 1 | 4 | one | 3 | -3 | 5 | -5 + 1 | 4 | one | 3 | -3 | | 0 + 1 | 4 | one | 5 | -5 | 0 | + 1 | 4 | one | 5 | -5 | 0 | + 1 | 4 | one | 5 | -5 | 1 | -1 + 1 | 4 | one | 5 | -5 | 1 | -1 + 1 | 4 | one | 5 | -5 | 2 | 2 + 1 | 4 | one | 5 | -5 | 2 | 2 + 1 | 4 | one | 5 | -5 | 2 | 4 + 1 | 4 | one | 5 | -5 | 2 | 4 + 1 | 4 | one | 5 | -5 | 3 | -3 + 1 | 4 | one | 5 | -5 | 3 | -3 + 1 | 4 | one | 5 | -5 | 5 | -5 + 1 | 4 | one | 5 | -5 | 5 | -5 + 1 | 4 | one | 5 | -5 | 5 | -5 + 1 | 4 | one | 5 | -5 | 5 | -5 + 1 | 4 | one | 5 | -5 | | 0 + 1 | 4 | one | 5 | -5 | | 0 + 1 | 4 | one | | 0 | 0 | + 1 | 4 | one | | 0 | 1 | -1 + 1 | 4 | one | | 0 | 2 | 2 + 1 | 4 | one | | 0 | 2 | 4 + 1 | 4 | one | | 0 | 3 | -3 + 1 | 4 | one | | 0 | 5 | -5 + 1 | 4 | one | | 0 | 5 | -5 + 1 | 4 | one | | 0 | | 0 + 2 | 3 | two | 0 | | 0 | + 2 | 3 | two | 0 | | 1 | -1 + 2 | 3 | two | 0 | | 2 | 2 + 2 | 3 | two | 0 | | 2 | 4 + 2 | 3 | two | 0 | | 3 | -3 + 2 | 3 | two | 0 | | 5 | -5 + 2 | 3 | two | 0 | | 5 | -5 + 2 | 3 | two | 0 | | | 0 + 2 | 3 | two | 1 | -1 | 0 | + 2 | 3 | two | 1 | -1 | 1 | -1 + 2 | 3 | two | 1 | -1 | 2 | 2 + 2 | 3 | two | 1 | -1 | 2 | 4 + 2 | 3 | two | 1 | -1 | 3 | -3 + 2 | 3 | two | 1 | -1 | 5 | -5 + 2 | 3 | two | 1 | -1 | 5 | -5 + 2 | 3 | two | 1 | -1 | | 0 + 2 | 3 | two | 2 | 2 | 0 | + 2 | 3 | two | 2 | 2 | 1 | -1 + 2 | 3 | two | 2 | 2 | 2 | 2 + 2 | 3 | two | 2 | 2 | 2 | 4 + 2 | 3 | two | 2 | 2 | 3 | -3 + 2 | 3 | two | 2 | 2 | 5 | -5 + 2 | 3 | two | 2 | 2 | 5 | -5 + 2 | 3 | two | 2 | 2 | | 0 + 2 | 3 | two | 2 | 4 | 0 | + 2 | 3 | two | 2 | 4 | 1 | -1 + 2 | 3 | two | 2 | 4 | 2 | 2 + 2 | 3 | two | 2 | 4 | 2 | 4 + 2 | 3 | two | 2 | 4 | 3 | -3 + 2 | 3 | two | 2 | 4 | 5 | -5 + 2 | 3 | two | 2 | 4 | 5 | -5 + 2 | 3 | two | 2 | 4 | | 0 + 2 | 3 | two | 3 | -3 | 0 | + 2 | 3 | two | 3 | -3 | 1 | -1 + 2 | 3 | two | 3 | -3 | 2 | 2 + 2 | 3 | two | 3 | -3 | 2 | 4 + 2 | 3 | two | 3 | -3 | 3 | -3 + 2 | 3 | two | 3 | -3 | 5 | -5 + 2 | 3 | two | 3 | -3 | 5 | -5 + 2 | 3 | two | 3 | -3 | | 0 + 2 | 3 | two | 5 | -5 | 0 | + 2 | 3 | two | 5 | -5 | 0 | + 2 | 3 | two | 5 | -5 | 1 | -1 + 2 | 3 | two | 5 | -5 | 1 | -1 + 2 | 3 | two | 5 | -5 | 2 | 2 + 2 | 3 | two | 5 | -5 | 2 | 2 + 2 | 3 | two | 5 | -5 | 2 | 4 + 2 | 3 | two | 5 | -5 | 2 | 4 + 2 | 3 | two | 5 | -5 | 3 | -3 + 2 | 3 | two | 5 | -5 | 3 | -3 + 2 | 3 | two | 5 | -5 | 5 | -5 + 2 | 3 | two | 5 | -5 | 5 | -5 + 2 | 3 | two | 5 | -5 | 5 | -5 + 2 | 3 | two | 5 | -5 | 5 | -5 + 2 | 3 | two | 5 | -5 | | 0 + 2 | 3 | two | 5 | -5 | | 0 + 2 | 3 | two | | 0 | 0 | + 2 | 3 | two | | 0 | 1 | -1 + 2 | 3 | two | | 0 | 2 | 2 + 2 | 3 | two | | 0 | 2 | 4 + 2 | 3 | two | | 0 | 3 | -3 + 2 | 3 | two | | 0 | 5 | -5 + 2 | 3 | two | | 0 | 5 | -5 + 2 | 3 | two | | 0 | | 0 + 3 | 2 | three | 0 | | 0 | + 3 | 2 | three | 0 | | 1 | -1 + 3 | 2 | three | 0 | | 2 | 2 + 3 | 2 | three | 0 | | 2 | 4 + 3 | 2 | three | 0 | | 3 | -3 + 3 | 2 | three | 0 | | 5 | -5 + 3 | 2 | three | 0 | | 5 | -5 + 3 | 2 | three | 0 | | | 0 + 3 | 2 | three | 1 | -1 | 0 | + 3 | 2 | three | 1 | -1 | 1 | -1 + 3 | 2 | three | 1 | -1 | 2 | 2 + 3 | 2 | three | 1 | -1 | 2 | 4 + 3 | 2 | three | 1 | -1 | 3 | -3 + 3 | 2 | three | 1 | -1 | 5 | -5 + 3 | 2 | three | 1 | -1 | 5 | -5 + 3 | 2 | three | 1 | -1 | | 0 + 3 | 2 | three | 2 | 2 | 0 | + 3 | 2 | three | 2 | 2 | 1 | -1 + 3 | 2 | three | 2 | 2 | 2 | 2 + 3 | 2 | three | 2 | 2 | 2 | 4 + 3 | 2 | three | 2 | 2 | 3 | -3 + 3 | 2 | three | 2 | 2 | 5 | -5 + 3 | 2 | three | 2 | 2 | 5 | -5 + 3 | 2 | three | 2 | 2 | | 0 + 3 | 2 | three | 2 | 4 | 0 | + 3 | 2 | three | 2 | 4 | 1 | -1 + 3 | 2 | three | 2 | 4 | 2 | 2 + 3 | 2 | three | 2 | 4 | 2 | 4 + 3 | 2 | three | 2 | 4 | 3 | -3 + 3 | 2 | three | 2 | 4 | 5 | -5 + 3 | 2 | three | 2 | 4 | 5 | -5 + 3 | 2 | three | 2 | 4 | | 0 + 3 | 2 | three | 3 | -3 | 0 | + 3 | 2 | three | 3 | -3 | 1 | -1 + 3 | 2 | three | 3 | -3 | 2 | 2 + 3 | 2 | three | 3 | -3 | 2 | 4 + 3 | 2 | three | 3 | -3 | 3 | -3 + 3 | 2 | three | 3 | -3 | 5 | -5 + 3 | 2 | three | 3 | -3 | 5 | -5 + 3 | 2 | three | 3 | -3 | | 0 + 3 | 2 | three | 5 | -5 | 0 | + 3 | 2 | three | 5 | -5 | 0 | + 3 | 2 | three | 5 | -5 | 1 | -1 + 3 | 2 | three | 5 | -5 | 1 | -1 + 3 | 2 | three | 5 | -5 | 2 | 2 + 3 | 2 | three | 5 | -5 | 2 | 2 + 3 | 2 | three | 5 | -5 | 2 | 4 + 3 | 2 | three | 5 | -5 | 2 | 4 + 3 | 2 | three | 5 | -5 | 3 | -3 + 3 | 2 | three | 5 | -5 | 3 | -3 + 3 | 2 | three | 5 | -5 | 5 | -5 + 3 | 2 | three | 5 | -5 | 5 | -5 + 3 | 2 | three | 5 | -5 | 5 | -5 + 3 | 2 | three | 5 | -5 | 5 | -5 + 3 | 2 | three | 5 | -5 | | 0 + 3 | 2 | three | 5 | -5 | | 0 + 3 | 2 | three | | 0 | 0 | + 3 | 2 | three | | 0 | 1 | -1 + 3 | 2 | three | | 0 | 2 | 2 + 3 | 2 | three | | 0 | 2 | 4 + 3 | 2 | three | | 0 | 3 | -3 + 3 | 2 | three | | 0 | 5 | -5 + 3 | 2 | three | | 0 | 5 | -5 + 3 | 2 | three | | 0 | | 0 + 4 | 1 | four | 0 | | 0 | + 4 | 1 | four | 0 | | 1 | -1 + 4 | 1 | four | 0 | | 2 | 2 + 4 | 1 | four | 0 | | 2 | 4 + 4 | 1 | four | 0 | | 3 | -3 + 4 | 1 | four | 0 | | 5 | -5 + 4 | 1 | four | 0 | | 5 | -5 + 4 | 1 | four | 0 | | | 0 + 4 | 1 | four | 1 | -1 | 0 | + 4 | 1 | four | 1 | -1 | 1 | -1 + 4 | 1 | four | 1 | -1 | 2 | 2 + 4 | 1 | four | 1 | -1 | 2 | 4 + 4 | 1 | four | 1 | -1 | 3 | -3 + 4 | 1 | four | 1 | -1 | 5 | -5 + 4 | 1 | four | 1 | -1 | 5 | -5 + 4 | 1 | four | 1 | -1 | | 0 + 4 | 1 | four | 2 | 2 | 0 | + 4 | 1 | four | 2 | 2 | 1 | -1 + 4 | 1 | four | 2 | 2 | 2 | 2 + 4 | 1 | four | 2 | 2 | 2 | 4 + 4 | 1 | four | 2 | 2 | 3 | -3 + 4 | 1 | four | 2 | 2 | 5 | -5 + 4 | 1 | four | 2 | 2 | 5 | -5 + 4 | 1 | four | 2 | 2 | | 0 + 4 | 1 | four | 2 | 4 | 0 | + 4 | 1 | four | 2 | 4 | 1 | -1 + 4 | 1 | four | 2 | 4 | 2 | 2 + 4 | 1 | four | 2 | 4 | 2 | 4 + 4 | 1 | four | 2 | 4 | 3 | -3 + 4 | 1 | four | 2 | 4 | 5 | -5 + 4 | 1 | four | 2 | 4 | 5 | -5 + 4 | 1 | four | 2 | 4 | | 0 + 4 | 1 | four | 3 | -3 | 0 | + 4 | 1 | four | 3 | -3 | 1 | -1 + 4 | 1 | four | 3 | -3 | 2 | 2 + 4 | 1 | four | 3 | -3 | 2 | 4 + 4 | 1 | four | 3 | -3 | 3 | -3 + 4 | 1 | four | 3 | -3 | 5 | -5 + 4 | 1 | four | 3 | -3 | 5 | -5 + 4 | 1 | four | 3 | -3 | | 0 + 4 | 1 | four | 5 | -5 | 0 | + 4 | 1 | four | 5 | -5 | 0 | + 4 | 1 | four | 5 | -5 | 1 | -1 + 4 | 1 | four | 5 | -5 | 1 | -1 + 4 | 1 | four | 5 | -5 | 2 | 2 + 4 | 1 | four | 5 | -5 | 2 | 2 + 4 | 1 | four | 5 | -5 | 2 | 4 + 4 | 1 | four | 5 | -5 | 2 | 4 + 4 | 1 | four | 5 | -5 | 3 | -3 + 4 | 1 | four | 5 | -5 | 3 | -3 + 4 | 1 | four | 5 | -5 | 5 | -5 + 4 | 1 | four | 5 | -5 | 5 | -5 + 4 | 1 | four | 5 | -5 | 5 | -5 + 4 | 1 | four | 5 | -5 | 5 | -5 + 4 | 1 | four | 5 | -5 | | 0 + 4 | 1 | four | 5 | -5 | | 0 + 4 | 1 | four | | 0 | 0 | + 4 | 1 | four | | 0 | 1 | -1 + 4 | 1 | four | | 0 | 2 | 2 + 4 | 1 | four | | 0 | 2 | 4 + 4 | 1 | four | | 0 | 3 | -3 + 4 | 1 | four | | 0 | 5 | -5 + 4 | 1 | four | | 0 | 5 | -5 + 4 | 1 | four | | 0 | | 0 + 5 | 0 | five | 0 | | 0 | + 5 | 0 | five | 0 | | 1 | -1 + 5 | 0 | five | 0 | | 2 | 2 + 5 | 0 | five | 0 | | 2 | 4 + 5 | 0 | five | 0 | | 3 | -3 + 5 | 0 | five | 0 | | 5 | -5 + 5 | 0 | five | 0 | | 5 | -5 + 5 | 0 | five | 0 | | | 0 + 5 | 0 | five | 1 | -1 | 0 | + 5 | 0 | five | 1 | -1 | 1 | -1 + 5 | 0 | five | 1 | -1 | 2 | 2 + 5 | 0 | five | 1 | -1 | 2 | 4 + 5 | 0 | five | 1 | -1 | 3 | -3 + 5 | 0 | five | 1 | -1 | 5 | -5 + 5 | 0 | five | 1 | -1 | 5 | -5 + 5 | 0 | five | 1 | -1 | | 0 + 5 | 0 | five | 2 | 2 | 0 | + 5 | 0 | five | 2 | 2 | 1 | -1 + 5 | 0 | five | 2 | 2 | 2 | 2 + 5 | 0 | five | 2 | 2 | 2 | 4 + 5 | 0 | five | 2 | 2 | 3 | -3 + 5 | 0 | five | 2 | 2 | 5 | -5 + 5 | 0 | five | 2 | 2 | 5 | -5 + 5 | 0 | five | 2 | 2 | | 0 + 5 | 0 | five | 2 | 4 | 0 | + 5 | 0 | five | 2 | 4 | 1 | -1 + 5 | 0 | five | 2 | 4 | 2 | 2 + 5 | 0 | five | 2 | 4 | 2 | 4 + 5 | 0 | five | 2 | 4 | 3 | -3 + 5 | 0 | five | 2 | 4 | 5 | -5 + 5 | 0 | five | 2 | 4 | 5 | -5 + 5 | 0 | five | 2 | 4 | | 0 + 5 | 0 | five | 3 | -3 | 0 | + 5 | 0 | five | 3 | -3 | 1 | -1 + 5 | 0 | five | 3 | -3 | 2 | 2 + 5 | 0 | five | 3 | -3 | 2 | 4 + 5 | 0 | five | 3 | -3 | 3 | -3 + 5 | 0 | five | 3 | -3 | 5 | -5 + 5 | 0 | five | 3 | -3 | 5 | -5 + 5 | 0 | five | 3 | -3 | | 0 + 5 | 0 | five | 5 | -5 | 0 | + 5 | 0 | five | 5 | -5 | 0 | + 5 | 0 | five | 5 | -5 | 1 | -1 + 5 | 0 | five | 5 | -5 | 1 | -1 + 5 | 0 | five | 5 | -5 | 2 | 2 + 5 | 0 | five | 5 | -5 | 2 | 2 + 5 | 0 | five | 5 | -5 | 2 | 4 + 5 | 0 | five | 5 | -5 | 2 | 4 + 5 | 0 | five | 5 | -5 | 3 | -3 + 5 | 0 | five | 5 | -5 | 3 | -3 + 5 | 0 | five | 5 | -5 | 5 | -5 + 5 | 0 | five | 5 | -5 | 5 | -5 + 5 | 0 | five | 5 | -5 | 5 | -5 + 5 | 0 | five | 5 | -5 | 5 | -5 + 5 | 0 | five | 5 | -5 | | 0 + 5 | 0 | five | 5 | -5 | | 0 + 5 | 0 | five | | 0 | 0 | + 5 | 0 | five | | 0 | 1 | -1 + 5 | 0 | five | | 0 | 2 | 2 + 5 | 0 | five | | 0 | 2 | 4 + 5 | 0 | five | | 0 | 3 | -3 + 5 | 0 | five | | 0 | 5 | -5 + 5 | 0 | five | | 0 | 5 | -5 + 5 | 0 | five | | 0 | | 0 + 6 | 6 | six | 0 | | 0 | + 6 | 6 | six | 0 | | 1 | -1 + 6 | 6 | six | 0 | | 2 | 2 + 6 | 6 | six | 0 | | 2 | 4 + 6 | 6 | six | 0 | | 3 | -3 + 6 | 6 | six | 0 | | 5 | -5 + 6 | 6 | six | 0 | | 5 | -5 + 6 | 6 | six | 0 | | | 0 + 6 | 6 | six | 1 | -1 | 0 | + 6 | 6 | six | 1 | -1 | 1 | -1 + 6 | 6 | six | 1 | -1 | 2 | 2 + 6 | 6 | six | 1 | -1 | 2 | 4 + 6 | 6 | six | 1 | -1 | 3 | -3 + 6 | 6 | six | 1 | -1 | 5 | -5 + 6 | 6 | six | 1 | -1 | 5 | -5 + 6 | 6 | six | 1 | -1 | | 0 + 6 | 6 | six | 2 | 2 | 0 | + 6 | 6 | six | 2 | 2 | 1 | -1 + 6 | 6 | six | 2 | 2 | 2 | 2 + 6 | 6 | six | 2 | 2 | 2 | 4 + 6 | 6 | six | 2 | 2 | 3 | -3 + 6 | 6 | six | 2 | 2 | 5 | -5 + 6 | 6 | six | 2 | 2 | 5 | -5 + 6 | 6 | six | 2 | 2 | | 0 + 6 | 6 | six | 2 | 4 | 0 | + 6 | 6 | six | 2 | 4 | 1 | -1 + 6 | 6 | six | 2 | 4 | 2 | 2 + 6 | 6 | six | 2 | 4 | 2 | 4 + 6 | 6 | six | 2 | 4 | 3 | -3 + 6 | 6 | six | 2 | 4 | 5 | -5 + 6 | 6 | six | 2 | 4 | 5 | -5 + 6 | 6 | six | 2 | 4 | | 0 + 6 | 6 | six | 3 | -3 | 0 | + 6 | 6 | six | 3 | -3 | 1 | -1 + 6 | 6 | six | 3 | -3 | 2 | 2 + 6 | 6 | six | 3 | -3 | 2 | 4 + 6 | 6 | six | 3 | -3 | 3 | -3 + 6 | 6 | six | 3 | -3 | 5 | -5 + 6 | 6 | six | 3 | -3 | 5 | -5 + 6 | 6 | six | 3 | -3 | | 0 + 6 | 6 | six | 5 | -5 | 0 | + 6 | 6 | six | 5 | -5 | 0 | + 6 | 6 | six | 5 | -5 | 1 | -1 + 6 | 6 | six | 5 | -5 | 1 | -1 + 6 | 6 | six | 5 | -5 | 2 | 2 + 6 | 6 | six | 5 | -5 | 2 | 2 + 6 | 6 | six | 5 | -5 | 2 | 4 + 6 | 6 | six | 5 | -5 | 2 | 4 + 6 | 6 | six | 5 | -5 | 3 | -3 + 6 | 6 | six | 5 | -5 | 3 | -3 + 6 | 6 | six | 5 | -5 | 5 | -5 + 6 | 6 | six | 5 | -5 | 5 | -5 + 6 | 6 | six | 5 | -5 | 5 | -5 + 6 | 6 | six | 5 | -5 | 5 | -5 + 6 | 6 | six | 5 | -5 | | 0 + 6 | 6 | six | 5 | -5 | | 0 + 6 | 6 | six | | 0 | 0 | + 6 | 6 | six | | 0 | 1 | -1 + 6 | 6 | six | | 0 | 2 | 2 + 6 | 6 | six | | 0 | 2 | 4 + 6 | 6 | six | | 0 | 3 | -3 + 6 | 6 | six | | 0 | 5 | -5 + 6 | 6 | six | | 0 | 5 | -5 + 6 | 6 | six | | 0 | | 0 + 7 | 7 | seven | 0 | | 0 | + 7 | 7 | seven | 0 | | 1 | -1 + 7 | 7 | seven | 0 | | 2 | 2 + 7 | 7 | seven | 0 | | 2 | 4 + 7 | 7 | seven | 0 | | 3 | -3 + 7 | 7 | seven | 0 | | 5 | -5 + 7 | 7 | seven | 0 | | 5 | -5 + 7 | 7 | seven | 0 | | | 0 + 7 | 7 | seven | 1 | -1 | 0 | + 7 | 7 | seven | 1 | -1 | 1 | -1 + 7 | 7 | seven | 1 | -1 | 2 | 2 + 7 | 7 | seven | 1 | -1 | 2 | 4 + 7 | 7 | seven | 1 | -1 | 3 | -3 + 7 | 7 | seven | 1 | -1 | 5 | -5 + 7 | 7 | seven | 1 | -1 | 5 | -5 + 7 | 7 | seven | 1 | -1 | | 0 + 7 | 7 | seven | 2 | 2 | 0 | + 7 | 7 | seven | 2 | 2 | 1 | -1 + 7 | 7 | seven | 2 | 2 | 2 | 2 + 7 | 7 | seven | 2 | 2 | 2 | 4 + 7 | 7 | seven | 2 | 2 | 3 | -3 + 7 | 7 | seven | 2 | 2 | 5 | -5 + 7 | 7 | seven | 2 | 2 | 5 | -5 + 7 | 7 | seven | 2 | 2 | | 0 + 7 | 7 | seven | 2 | 4 | 0 | + 7 | 7 | seven | 2 | 4 | 1 | -1 + 7 | 7 | seven | 2 | 4 | 2 | 2 + 7 | 7 | seven | 2 | 4 | 2 | 4 + 7 | 7 | seven | 2 | 4 | 3 | -3 + 7 | 7 | seven | 2 | 4 | 5 | -5 + 7 | 7 | seven | 2 | 4 | 5 | -5 + 7 | 7 | seven | 2 | 4 | | 0 + 7 | 7 | seven | 3 | -3 | 0 | + 7 | 7 | seven | 3 | -3 | 1 | -1 + 7 | 7 | seven | 3 | -3 | 2 | 2 + 7 | 7 | seven | 3 | -3 | 2 | 4 + 7 | 7 | seven | 3 | -3 | 3 | -3 + 7 | 7 | seven | 3 | -3 | 5 | -5 + 7 | 7 | seven | 3 | -3 | 5 | -5 + 7 | 7 | seven | 3 | -3 | | 0 + 7 | 7 | seven | 5 | -5 | 0 | + 7 | 7 | seven | 5 | -5 | 0 | + 7 | 7 | seven | 5 | -5 | 1 | -1 + 7 | 7 | seven | 5 | -5 | 1 | -1 + 7 | 7 | seven | 5 | -5 | 2 | 2 + 7 | 7 | seven | 5 | -5 | 2 | 2 + 7 | 7 | seven | 5 | -5 | 2 | 4 + 7 | 7 | seven | 5 | -5 | 2 | 4 + 7 | 7 | seven | 5 | -5 | 3 | -3 + 7 | 7 | seven | 5 | -5 | 3 | -3 + 7 | 7 | seven | 5 | -5 | 5 | -5 + 7 | 7 | seven | 5 | -5 | 5 | -5 + 7 | 7 | seven | 5 | -5 | 5 | -5 + 7 | 7 | seven | 5 | -5 | 5 | -5 + 7 | 7 | seven | 5 | -5 | | 0 + 7 | 7 | seven | 5 | -5 | | 0 + 7 | 7 | seven | | 0 | 0 | + 7 | 7 | seven | | 0 | 1 | -1 + 7 | 7 | seven | | 0 | 2 | 2 + 7 | 7 | seven | | 0 | 2 | 4 + 7 | 7 | seven | | 0 | 3 | -3 + 7 | 7 | seven | | 0 | 5 | -5 + 7 | 7 | seven | | 0 | 5 | -5 + 7 | 7 | seven | | 0 | | 0 + 8 | 8 | eight | 0 | | 0 | + 8 | 8 | eight | 0 | | 1 | -1 + 8 | 8 | eight | 0 | | 2 | 2 + 8 | 8 | eight | 0 | | 2 | 4 + 8 | 8 | eight | 0 | | 3 | -3 + 8 | 8 | eight | 0 | | 5 | -5 + 8 | 8 | eight | 0 | | 5 | -5 + 8 | 8 | eight | 0 | | | 0 + 8 | 8 | eight | 1 | -1 | 0 | + 8 | 8 | eight | 1 | -1 | 1 | -1 + 8 | 8 | eight | 1 | -1 | 2 | 2 + 8 | 8 | eight | 1 | -1 | 2 | 4 + 8 | 8 | eight | 1 | -1 | 3 | -3 + 8 | 8 | eight | 1 | -1 | 5 | -5 + 8 | 8 | eight | 1 | -1 | 5 | -5 + 8 | 8 | eight | 1 | -1 | | 0 + 8 | 8 | eight | 2 | 2 | 0 | + 8 | 8 | eight | 2 | 2 | 1 | -1 + 8 | 8 | eight | 2 | 2 | 2 | 2 + 8 | 8 | eight | 2 | 2 | 2 | 4 + 8 | 8 | eight | 2 | 2 | 3 | -3 + 8 | 8 | eight | 2 | 2 | 5 | -5 + 8 | 8 | eight | 2 | 2 | 5 | -5 + 8 | 8 | eight | 2 | 2 | | 0 + 8 | 8 | eight | 2 | 4 | 0 | + 8 | 8 | eight | 2 | 4 | 1 | -1 + 8 | 8 | eight | 2 | 4 | 2 | 2 + 8 | 8 | eight | 2 | 4 | 2 | 4 + 8 | 8 | eight | 2 | 4 | 3 | -3 + 8 | 8 | eight | 2 | 4 | 5 | -5 + 8 | 8 | eight | 2 | 4 | 5 | -5 + 8 | 8 | eight | 2 | 4 | | 0 + 8 | 8 | eight | 3 | -3 | 0 | + 8 | 8 | eight | 3 | -3 | 1 | -1 + 8 | 8 | eight | 3 | -3 | 2 | 2 + 8 | 8 | eight | 3 | -3 | 2 | 4 + 8 | 8 | eight | 3 | -3 | 3 | -3 + 8 | 8 | eight | 3 | -3 | 5 | -5 + 8 | 8 | eight | 3 | -3 | 5 | -5 + 8 | 8 | eight | 3 | -3 | | 0 + 8 | 8 | eight | 5 | -5 | 0 | + 8 | 8 | eight | 5 | -5 | 0 | + 8 | 8 | eight | 5 | -5 | 1 | -1 + 8 | 8 | eight | 5 | -5 | 1 | -1 + 8 | 8 | eight | 5 | -5 | 2 | 2 + 8 | 8 | eight | 5 | -5 | 2 | 2 + 8 | 8 | eight | 5 | -5 | 2 | 4 + 8 | 8 | eight | 5 | -5 | 2 | 4 + 8 | 8 | eight | 5 | -5 | 3 | -3 + 8 | 8 | eight | 5 | -5 | 3 | -3 + 8 | 8 | eight | 5 | -5 | 5 | -5 + 8 | 8 | eight | 5 | -5 | 5 | -5 + 8 | 8 | eight | 5 | -5 | 5 | -5 + 8 | 8 | eight | 5 | -5 | 5 | -5 + 8 | 8 | eight | 5 | -5 | | 0 + 8 | 8 | eight | 5 | -5 | | 0 + 8 | 8 | eight | | 0 | 0 | + 8 | 8 | eight | | 0 | 1 | -1 + 8 | 8 | eight | | 0 | 2 | 2 + 8 | 8 | eight | | 0 | 2 | 4 + 8 | 8 | eight | | 0 | 3 | -3 + 8 | 8 | eight | | 0 | 5 | -5 + 8 | 8 | eight | | 0 | 5 | -5 + 8 | 8 | eight | | 0 | | 0 + | 0 | zero | 0 | | 0 | + | 0 | zero | 0 | | 1 | -1 + | 0 | zero | 0 | | 2 | 2 + | 0 | zero | 0 | | 2 | 4 + | 0 | zero | 0 | | 3 | -3 + | 0 | zero | 0 | | 5 | -5 + | 0 | zero | 0 | | 5 | -5 + | 0 | zero | 0 | | | 0 + | 0 | zero | 1 | -1 | 0 | + | 0 | zero | 1 | -1 | 1 | -1 + | 0 | zero | 1 | -1 | 2 | 2 + | 0 | zero | 1 | -1 | 2 | 4 + | 0 | zero | 1 | -1 | 3 | -3 + | 0 | zero | 1 | -1 | 5 | -5 + | 0 | zero | 1 | -1 | 5 | -5 + | 0 | zero | 1 | -1 | | 0 + | 0 | zero | 2 | 2 | 0 | + | 0 | zero | 2 | 2 | 1 | -1 + | 0 | zero | 2 | 2 | 2 | 2 + | 0 | zero | 2 | 2 | 2 | 4 + | 0 | zero | 2 | 2 | 3 | -3 + | 0 | zero | 2 | 2 | 5 | -5 + | 0 | zero | 2 | 2 | 5 | -5 + | 0 | zero | 2 | 2 | | 0 + | 0 | zero | 2 | 4 | 0 | + | 0 | zero | 2 | 4 | 1 | -1 + | 0 | zero | 2 | 4 | 2 | 2 + | 0 | zero | 2 | 4 | 2 | 4 + | 0 | zero | 2 | 4 | 3 | -3 + | 0 | zero | 2 | 4 | 5 | -5 + | 0 | zero | 2 | 4 | 5 | -5 + | 0 | zero | 2 | 4 | | 0 + | 0 | zero | 3 | -3 | 0 | + | 0 | zero | 3 | -3 | 1 | -1 + | 0 | zero | 3 | -3 | 2 | 2 + | 0 | zero | 3 | -3 | 2 | 4 + | 0 | zero | 3 | -3 | 3 | -3 + | 0 | zero | 3 | -3 | 5 | -5 + | 0 | zero | 3 | -3 | 5 | -5 + | 0 | zero | 3 | -3 | | 0 + | 0 | zero | 5 | -5 | 0 | + | 0 | zero | 5 | -5 | 0 | + | 0 | zero | 5 | -5 | 1 | -1 + | 0 | zero | 5 | -5 | 1 | -1 + | 0 | zero | 5 | -5 | 2 | 2 + | 0 | zero | 5 | -5 | 2 | 2 + | 0 | zero | 5 | -5 | 2 | 4 + | 0 | zero | 5 | -5 | 2 | 4 + | 0 | zero | 5 | -5 | 3 | -3 + | 0 | zero | 5 | -5 | 3 | -3 + | 0 | zero | 5 | -5 | 5 | -5 + | 0 | zero | 5 | -5 | 5 | -5 + | 0 | zero | 5 | -5 | 5 | -5 + | 0 | zero | 5 | -5 | 5 | -5 + | 0 | zero | 5 | -5 | | 0 + | 0 | zero | 5 | -5 | | 0 + | 0 | zero | | 0 | 0 | + | 0 | zero | | 0 | 1 | -1 + | 0 | zero | | 0 | 2 | 2 + | 0 | zero | | 0 | 2 | 4 + | 0 | zero | | 0 | 3 | -3 + | 0 | zero | | 0 | 5 | -5 + | 0 | zero | | 0 | 5 | -5 + | 0 | zero | | 0 | | 0 + | | null | 0 | | 0 | + | | null | 0 | | 1 | -1 + | | null | 0 | | 2 | 2 + | | null | 0 | | 2 | 4 + | | null | 0 | | 3 | -3 + | | null | 0 | | 5 | -5 + | | null | 0 | | 5 | -5 + | | null | 0 | | | 0 + | | null | 1 | -1 | 0 | + | | null | 1 | -1 | 1 | -1 + | | null | 1 | -1 | 2 | 2 + | | null | 1 | -1 | 2 | 4 + | | null | 1 | -1 | 3 | -3 + | | null | 1 | -1 | 5 | -5 + | | null | 1 | -1 | 5 | -5 + | | null | 1 | -1 | | 0 + | | null | 2 | 2 | 0 | + | | null | 2 | 2 | 1 | -1 + | | null | 2 | 2 | 2 | 2 + | | null | 2 | 2 | 2 | 4 + | | null | 2 | 2 | 3 | -3 + | | null | 2 | 2 | 5 | -5 + | | null | 2 | 2 | 5 | -5 + | | null | 2 | 2 | | 0 + | | null | 2 | 4 | 0 | + | | null | 2 | 4 | 1 | -1 + | | null | 2 | 4 | 2 | 2 + | | null | 2 | 4 | 2 | 4 + | | null | 2 | 4 | 3 | -3 + | | null | 2 | 4 | 5 | -5 + | | null | 2 | 4 | 5 | -5 + | | null | 2 | 4 | | 0 + | | null | 3 | -3 | 0 | + | | null | 3 | -3 | 1 | -1 + | | null | 3 | -3 | 2 | 2 + | | null | 3 | -3 | 2 | 4 + | | null | 3 | -3 | 3 | -3 + | | null | 3 | -3 | 5 | -5 + | | null | 3 | -3 | 5 | -5 + | | null | 3 | -3 | | 0 + | | null | 5 | -5 | 0 | + | | null | 5 | -5 | 0 | + | | null | 5 | -5 | 1 | -1 + | | null | 5 | -5 | 1 | -1 + | | null | 5 | -5 | 2 | 2 + | | null | 5 | -5 | 2 | 2 + | | null | 5 | -5 | 2 | 4 + | | null | 5 | -5 | 2 | 4 + | | null | 5 | -5 | 3 | -3 + | | null | 5 | -5 | 3 | -3 + | | null | 5 | -5 | 5 | -5 + | | null | 5 | -5 | 5 | -5 + | | null | 5 | -5 | 5 | -5 + | | null | 5 | -5 | 5 | -5 + | | null | 5 | -5 | | 0 + | | null | 5 | -5 | | 0 + | | null | | 0 | 0 | + | | null | | 0 | 1 | -1 + | | null | | 0 | 2 | 2 + | | null | | 0 | 2 | 4 + | | null | | 0 | 3 | -3 + | | null | | 0 | 5 | -5 + | | null | | 0 | 5 | -5 + | | null | | 0 | | 0 +(704 rows) + +-- +-- +-- Inner joins (equi-joins) +-- +-- +-- +-- Inner joins (equi-joins) with USING clause +-- The USING syntax changes the shape of the resulting table +-- by including a column in the USING clause only once in the result. +-- +-- Inner equi-join on specified column +--Testcase 45: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL INNER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +-- Same as above, slightly different syntax +--Testcase 46: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +--Testcase 47: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, d) USING (a) + ORDER BY a, d; + a | b | c | d +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +--Testcase 48: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, b) USING (b) + ORDER BY b, t1.a; + b | a | c | a +---+---+-------+--- + 0 | 5 | five | + 0 | | zero | + 2 | 3 | three | 2 + 4 | 1 | one | 2 +(4 rows) + +-- test join using aliases +--Testcase 49: +SELECT * FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) WHERE J1_TBL.t = 'one'; -- ok + i | j | t | k +---+---+-----+---- + 1 | 4 | one | -1 +(1 row) + +--Testcase 50: +SELECT * FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; -- ok + i | j | t | k +---+---+-----+---- + 1 | 4 | one | -1 +(1 row) + +--Testcase 51: +SELECT * FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i)) AS x WHERE J1_TBL.t = 'one'; -- error +ERROR: invalid reference to FROM-clause entry for table "j1_tbl" +LINE 1: ...::int k FROM J2_TBL) J2_TBL USING (i)) AS x WHERE J1_TBL.t =... + ^ +HINT: There is an entry for table "j1_tbl", but it cannot be referenced from this part of the query. +--Testcase 52: +SELECT * FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE x.i::int = 1; -- ok + i | j | t | k +---+---+-----+---- + 1 | 4 | one | -1 +(1 row) + +--Testcase 53: +SELECT * FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE x.t = 'one'; -- error +ERROR: column x.t does not exist +LINE 1: ...)::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE x.t = 'one... + ^ +--Testcase 54: +SELECT * FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x) AS xx WHERE x.i::int = 1; -- error (XXX could use better hint) +ERROR: missing FROM-clause entry for table "x" +LINE 1: ...k FROM J2_TBL) J2_TBL USING (i) AS x) AS xx WHERE x.i::int =... + ^ +--Testcase 55: +SELECT * FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) a1 JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) a2 USING (i) AS a1; -- error +ERROR: table name "a1" specified more than once +--Testcase 56: +SELECT x.* FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; + i +--- + 1 +(1 row) + +--Testcase 57: +SELECT ROW(x.*) FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; + row +----- + (1) +(1 row) + +--Testcase 58: +SELECT row_to_json(x.*) FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; + row_to_json +------------- + {"i":1} +(1 row) + +-- +-- NATURAL JOIN +-- Inner equi-join on all columns with the same name +-- +--Testcase 59: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL NATURAL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL; + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +--Testcase 60: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) NATURAL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, d); + a | b | c | d +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +--Testcase 61: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) NATURAL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, a); + a | b | c | d +---+---+------+--- + 0 | | zero | + 2 | 3 | two | 2 + 4 | 1 | four | 2 +(3 rows) + +-- mismatch number of columns +-- currently, Postgres will fill in with underlying names +--Testcase 62: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) t1 (a, b) NATURAL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) t2 (a); + a | b | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 +(7 rows) + +-- +-- Inner joins (equi-joins) +-- +--Testcase 63: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint = (J2_TBL.i)::bigint); + i | j | t | i | k +---+---+-------+---+---- + 0 | | zero | 0 | + 1 | 4 | one | 1 | -1 + 2 | 3 | two | 2 | 2 + 2 | 3 | two | 2 | 4 + 3 | 2 | three | 3 | -3 + 5 | 0 | five | 5 | -5 + 5 | 0 | five | 5 | -5 +(7 rows) + +--Testcase 64: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint = (J2_TBL.k)::bigint); + i | j | t | i | k +---+---+------+---+--- + 0 | | zero | | 0 + 2 | 3 | two | 2 | 2 + 4 | 1 | four | 2 | 4 +(3 rows) + +-- +-- Non-equi-joins +-- +--Testcase 65: +SELECT * + FROM (select (fields->>'i')::int i, (fields->>'j')::int j,fields->>'t' t from J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint <= (J2_TBL.k)::bigint) ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; + i | j | t | i | k +---+---+-------+---+--- + 0 | | zero | 2 | 2 + 0 | | zero | 2 | 4 + 0 | | zero | | 0 + 1 | 4 | one | 2 | 2 + 1 | 4 | one | 2 | 4 + 2 | 3 | two | 2 | 2 + 2 | 3 | two | 2 | 4 + 3 | 2 | three | 2 | 4 + 4 | 1 | four | 2 | 4 +(9 rows) + +-- +-- Outer joins +-- Note that OUTER is a noise word +-- +--Testcase 66: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j ,fields->>'t' t FROM J1_TBL) J1_TBL LEFT OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) + ORDER BY i, k, t; + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 4 | 1 | four | + 5 | 0 | five | -5 + 5 | 0 | five | -5 + 6 | 6 | six | + 7 | 7 | seven | + 8 | 8 | eight | + | | null | + | 0 | zero | +(13 rows) + +--Testcase 67: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) + ORDER BY i::int, k, t; + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 4 | 1 | four | + 5 | 0 | five | -5 + 5 | 0 | five | -5 + 6 | 6 | six | + 7 | 7 | seven | + 8 | 8 | eight | + | | null | + | 0 | zero | +(13 rows) + +--Testcase 68: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL RIGHT OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 + | | | 0 +(8 rows) + +--Testcase 69: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL RIGHT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 5 | 0 | five | -5 + 5 | 0 | five | -5 + | | | 0 +(8 rows) + +--Testcase 70: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL FULL OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) + ORDER BY i::int, k, t; + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 4 | 1 | four | + 5 | 0 | five | -5 + 5 | 0 | five | -5 + 6 | 6 | six | + 7 | 7 | seven | + 8 | 8 | eight | + | | | 0 + | | null | + | 0 | zero | +(14 rows) + +--Testcase 71: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL FULL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) + ORDER BY i::int, k, t; + i | j | t | k +---+---+-------+---- + 0 | | zero | + 1 | 4 | one | -1 + 2 | 3 | two | 2 + 2 | 3 | two | 4 + 3 | 2 | three | -3 + 4 | 1 | four | + 5 | 0 | five | -5 + 5 | 0 | five | -5 + 6 | 6 | six | + 7 | 7 | seven | + 8 | 8 | eight | + | | | 0 + | | null | + | 0 | zero | +(14 rows) + +--Testcase 72: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) WHERE (k)::int = 1; + i | j | t | k +---+---+---+--- +(0 rows) + +--Testcase 73: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) WHERE (i)::int = 1; + i | j | t | k +---+---+-----+---- + 1 | 4 | one | -1 +(1 row) + +-- +-- semijoin selectivity for <> +-- +--Testcase 74: +explain (costs off) +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4, (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a +where exists(select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b + where (a.twothousand)::int4 = (b.twothousand)::int4 and (a.fivethous)::int4 <> (b.fivethous)::int4) + and (i4.f1)::int4 = (a.tenthous)::int4; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------- + Merge Join + Merge Cond: ((((a.fields ->> 'tenthous'::text))::integer) = (((i4.fields ->> 'f1'::text))::integer)) + -> Sort + Sort Key: (((a.fields ->> 'tenthous'::text))::integer) + -> Hash Semi Join + Hash Cond: (((a.fields ->> 'twothousand'::text))::integer = ((b.fields ->> 'twothousand'::text))::integer) + Join Filter: (((a.fields ->> 'fivethous'::text))::integer <> ((b.fields ->> 'fivethous'::text))::integer) + -> Foreign Scan on tenk1 a + -> Hash + -> Foreign Scan on tenk1 b + -> Sort + Sort Key: (((i4.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl i4 +(13 rows) + +-- +-- More complicated constructs +-- +-- +-- Multiway full join +-- +--Testcase 75: +CREATE FOREIGN TABLE t1 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 577: +CREATE FOREIGN TABLE t1_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't1'); +--Testcase 76: +CREATE FOREIGN TABLE t2 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 578: +CREATE FOREIGN TABLE t2_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't2'); +--Testcase 77: +CREATE FOREIGN TABLE t3 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 579: +CREATE FOREIGN TABLE t3_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't3'); +--Testcase 78: +INSERT INTO t1_nsc VALUES ( 'bb', 11 ); +--Testcase 79: +INSERT INTO t2_nsc VALUES ( 'bb', 12 ); +--Testcase 80: +INSERT INTO t2_nsc VALUES ( 'cc', 22 ); +--Testcase 81: +INSERT INTO t2_nsc VALUES ( 'ee', 42 ); +--Testcase 82: +INSERT INTO t3_nsc VALUES ( 'bb', 13 ); +--Testcase 83: +INSERT INTO t3_nsc VALUES ( 'cc', 23 ); +--Testcase 84: +INSERT INTO t3_nsc VALUES ( 'dd', 33 ); +--Testcase 85: +SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t1) t1 FULL JOIN (select fields->>'name' "name", (fields->>'n')::int n from t2) t2 USING (name) FULL JOIN (select fields->>'name' "name", (fields->>'n')::int n from t3) t3 USING (name); + name | n | n | n +------+----+----+---- + bb | 11 | 12 | 13 + cc | | 22 | 23 + dd | | | 33 + ee | | 42 | +(4 rows) + +-- +-- Test interactions of join syntax and subqueries +-- +-- Basic cases (we expect planner to pull up the subquery here) +--Testcase 86: +SELECT * FROM +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 +INNER JOIN +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 +USING (name); + name | n | n +------+----+---- + bb | 12 | 13 + cc | 22 | 23 +(2 rows) + +--Testcase 87: +SELECT * FROM +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 +LEFT JOIN +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 +USING (name); + name | n | n +------+----+---- + bb | 12 | 13 + cc | 22 | 23 + ee | 42 | +(3 rows) + +--Testcase 88: +SELECT * FROM +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 +FULL JOIN +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 +USING (name); + name | n | n +------+----+---- + bb | 12 | 13 + cc | 22 | 23 + dd | | 33 + ee | 42 | +(4 rows) + +-- Cases with non-nullable expressions in subquery results; +-- make sure these go to null as expected +--Testcase 89: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL INNER JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; + name | s2_n | s2_2 | s3_n | s3_2 +------+------+------+------+------ + bb | 12 | 2 | 13 | 3 + cc | 22 | 2 | 23 | 3 +(2 rows) + +--Testcase 90: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL LEFT JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; + name | s2_n | s2_2 | s3_n | s3_2 +------+------+------+------+------ + bb | 12 | 2 | 13 | 3 + cc | 22 | 2 | 23 | 3 + ee | 42 | 2 | | +(3 rows) + +--Testcase 91: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL FULL JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; + name | s2_n | s2_2 | s3_n | s3_2 +------+------+------+------+------ + bb | 12 | 2 | 13 | 3 + cc | 22 | 2 | 23 | 3 + dd | | | 33 | 3 + ee | 42 | 2 | | +(4 rows) + +--Testcase 92: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n, 1 as s1_1 FROM t1) as s1 +NATURAL INNER JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL INNER JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; + name | s1_n | s1_1 | s2_n | s2_2 | s3_n | s3_2 +------+------+------+------+------+------+------ + bb | 11 | 1 | 12 | 2 | 13 | 3 +(1 row) + +--Testcase 93: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n, 1 as s1_1 FROM t1) as s1 +NATURAL FULL JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL FULL JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; + name | s1_n | s1_1 | s2_n | s2_2 | s3_n | s3_2 +------+------+------+------+------+------+------ + bb | 11 | 1 | 12 | 2 | 13 | 3 + cc | | | 22 | 2 | 23 | 3 + dd | | | | | 33 | 3 + ee | | | 42 | 2 | | +(4 rows) + +--Testcase 94: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 +NATURAL FULL JOIN + (SELECT * FROM + (SELECT fields->>'name' "name", (fields->>'n')::int as s2_n FROM t2) as s2 + NATURAL FULL JOIN + (SELECT fields->>'name' "name", (fields->>'n')::int as s3_n FROM t3) as s3 + ) ss2; + name | s1_n | s2_n | s3_n +------+------+------+------ + bb | 11 | 12 | 13 + cc | | 22 | 23 + dd | | | 33 + ee | | 42 | +(4 rows) + +--Testcase 95: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 +NATURAL FULL JOIN + (SELECT * FROM + (SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 + NATURAL FULL JOIN + (SELECT fields->>'name' "name", (fields->>'n')::int as s3_n FROM t3) as s3 + ) ss2; + name | s1_n | s2_n | s2_2 | s3_n +------+------+------+------+------ + bb | 11 | 12 | 2 | 13 + cc | | 22 | 2 | 23 + dd | | | | 33 + ee | | 42 | 2 | +(4 rows) + +-- Constants as join keys can also be problematic +--Testcase 96: +SELECT * FROM + (SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 +FULL JOIN + (SELECT fields->>'name' "name", 2 as s2_n FROM t2) as s2 +ON ((s1_n)::int = (s2_n)::int); + name | s1_n | name | s2_n +------+------+------+------ + | | bb | 2 + | | cc | 2 + | | ee | 2 + bb | 11 | | +(4 rows) + +-- Test for propagation of nullability constraints into sub-joins +--Testcase 97: +create foreign table x (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 580: +create foreign table x_nsc (x1 int, x2 int) server influxdb_svr OPTIONS (table 'x'); +--Testcase 98: +insert into x_nsc values (1,11); +--Testcase 99: +insert into x_nsc values (2,22); +--Testcase 100: +insert into x_nsc values (3,null); +--Testcase 101: +insert into x_nsc values (4,44); +--Testcase 102: +insert into x_nsc values (5,null); +--Testcase 103: +create foreign table y (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 581: +create foreign table y_nsc (y1 int, y2 int) server influxdb_svr OPTIONS (table 'y'); +--Testcase 104: +insert into y_nsc values (1,111); +--Testcase 105: +insert into y_nsc values (2,222); +--Testcase 106: +insert into y_nsc values (3,333); +--Testcase 107: +insert into y_nsc values (4,null); +--Testcase 108: +select * from x; + fields +------------------------- + {"x1": "1", "x2": "11"} + {"x1": "2", "x2": "22"} + {"x1": "3", "x2": null} + {"x1": "4", "x2": "44"} + {"x1": "5", "x2": null} +(5 rows) + +--Testcase 109: +select * from y; + fields +-------------------------- + {"y1": "1", "y2": "111"} + {"y1": "2", "y2": "222"} + {"y1": "3", "y2": "333"} + {"y1": "4", "y2": null} +(4 rows) + +--Testcase 110: +select * from (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int and x2 is not null); + x1 | x2 | y1 | y2 +----+----+----+----- + 1 | 11 | 1 | 111 + 2 | 22 | 2 | 222 + 3 | | | + 4 | 44 | 4 | + 5 | | | +(5 rows) + +--Testcase 111: +select * from (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int and y2 is not null); + x1 | x2 | y1 | y2 +----+----+----+----- + 1 | 11 | 1 | 111 + 2 | 22 | 2 | 222 + 3 | | 3 | 333 + 4 | 44 | | + 5 | | | +(5 rows) + +--Testcase 112: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 3 | | 3 | 333 | 3 | + 4 | 44 | 4 | | 4 | 44 + 5 | | | | 5 | +(5 rows) + +--Testcase 113: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int and x2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 3 | | 3 | 333 | | + 4 | 44 | 4 | | 4 | 44 + 5 | | | | | +(5 rows) + +--Testcase 114: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int and y2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 3 | | 3 | 333 | 3 | + 4 | 44 | 4 | | | + 5 | | | | | +(5 rows) + +--Testcase 115: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int and xx2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 3 | | 3 | 333 | | + 4 | 44 | 4 | | 4 | 44 + 5 | | | | | +(5 rows) + +-- these should NOT give the same answers as above +--Testcase 116: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int) where (x2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 4 | 44 | 4 | | 4 | 44 +(3 rows) + +--Testcase 117: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int) where (y2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 3 | | 3 | 333 | 3 | +(3 rows) + +--Testcase 118: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int) where (xx2 is not null); + x1 | x2 | y1 | y2 | xx1 | xx2 +----+----+----+-----+-----+----- + 1 | 11 | 1 | 111 | 1 | 11 + 2 | 22 | 2 | 222 | 2 | 22 + 4 | 44 | 4 | | 4 | 44 +(3 rows) + +-- +-- regression test: check for bug with propagation of implied equality +-- to outside an IN +-- +--Testcase 119: +select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a where unique1 in + (select unique1 from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) c using (unique1) + where b.unique2::int4 = 42); + count +------- + 1 +(1 row) + +-- +-- regression test: check for failure to generate a plan with multiple +-- degenerate IN clauses +-- +--Testcase 120: +select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) x where + (x.unique1)::int4 in (select (a.fields->>'f1')::int4 from int4_tbl a,float8_tbl b where (a.fields->>'f1')::int4=(b.fields->>'f1')::float8) and + (x.unique1)::int4 = 0 and + (x.unique1)::int4 in (select (aa.fields->>'f1')::int4 from int4_tbl aa,float8_tbl bb where (aa.fields->>'f1')::int4=(bb.fields->>'f1')::float8); + count +------- + 1 +(1 row) + +-- try that with GEQO too +begin; +--Testcase 121: +set geqo = on; +--Testcase 122: +set geqo_threshold = 2; +--Testcase 123: +select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) x where + (x.unique1)::int4 in (select a.f1 from (select (fields->>'f1')::int4 f1 from INT4_TBL) a,(select (fields->>'f1')::float8 f1 from FLOAT8_TBL) b where a.f1::int4=b.f1::float8) and + (x.unique1)::int4 = 0 and + (x.unique1)::int4 in (select aa.f1 from (select (fields->>'f1')::int4 f1 from INT4_TBL) aa,(select (fields->>'f1')::float8 f1 from FLOAT8_TBL) bb where aa.f1::int4=bb.f1::float8); + count +------- + 1 +(1 row) + +rollback; +-- +-- regression test: be sure we cope with proven-dummy append rels +-- +--Testcase 124: +CREATE FOREIGN TABLE b_star(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 125: +explain (costs off) +select b_star.aa::int4, bb, tenk1.unique1::int, tenk1.unique1::int + from (select (fields->>'unique1')::int unique1, fields->>'unique2' unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1) tenk1 right join (select (fields->>'class')::char class, (fields->>'aa')::int4 aa, fields->>'bb' bb, (fields->>'a')::int4 a from b_star) b_star on b_star.aa::int4 = tenk1.unique1::int + where b_star.bb < b_star.bb and b_star.bb is null; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------- + Hash Right Join + Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = ((b_star.fields ->> 'aa'::text))::integer) + -> Foreign Scan on tenk1 + -> Hash + -> Foreign Scan on b_star + Filter: (((fields ->> 'bb'::text) IS NULL) AND ((fields ->> 'bb'::text) < (fields ->> 'bb'::text))) +(6 rows) + +--Testcase 126: +select b_star.aa::int4, bb, tenk1.unique1::int, tenk1.unique1::int + from (select (fields->>'unique1')::int unique1, fields->>'unique2' unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1) tenk1 right join (select (fields->>'class')::char class, (fields->>'aa')::int4 aa, fields->>'bb' bb, (fields->>'a')::int4 a from b_star) b_star on b_star.aa::int4 = tenk1.unique1::int + where b_star.bb < b_star.bb and b_star.bb is null; + aa | bb | unique1 | unique1 +----+----+---------+--------- +(0 rows) + +--Testcase 127: +drop foreign table b_star; +-- +-- regression test: check handling of empty-FROM subquery underneath outer join +-- +--Testcase 128: +explain (costs off) +select (i1.fields->>'q1')::int8 q1, (i1.fields->>'q2')::int8 q2, (i2.fields->>'q1')::int8 q1, (i2.fields->>'q2')::int8 q2, x from int8_tbl i1 left join (int8_tbl i2 join + (select 123 as x) ss on (i2.fields->>'q1')::int8 = x) on (i1.fields->>'q2')::int8 = (i2.fields->>'q2')::int8 +order by 1, 2; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Sort + Sort Key: (((i1.fields ->> 'q1'::text))::bigint), (((i1.fields ->> 'q2'::text))::bigint) + -> Hash Left Join + Hash Cond: (((i1.fields ->> 'q2'::text))::bigint = ((i2.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on int8_tbl i1 + -> Hash + -> Foreign Scan on int8_tbl i2 +(7 rows) + +--Testcase 129: +select (i1.fields->>'q1')::int8 q1, (i1.fields->>'q2')::int8 q2, (i2.fields->>'q1')::int8 q1, (i2.fields->>'q2')::int8 q2, x from int8_tbl i1 left join (int8_tbl i2 join + (select 123 as x) ss on (i2.fields->>'q1')::int8 = x) on (i1.fields->>'q2')::int8= (i2.fields->>'q2')::int8 +order by 1, 2; + q1 | q2 | q1 | q2 | x +------------------+-------------------+-----+------------------+----- + 123 | 456 | 123 | 456 | 123 + 123 | 4567890123456789 | 123 | 4567890123456789 | 123 + 4567890123456789 | -4567890123456789 | | | + 4567890123456789 | 123 | | | + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 123 +(5 rows) + +-- +-- regression test: check a case where join_clause_is_movable_into() gives +-- an imprecise result, causing an assertion failure +-- +--Testcase 130: +select count(*) +from + (select (t3.fields->>'tenthous')::int4 as x1, coalesce((t1.fields->>'stringu1')::name, (t2.fields->>'stringu1')::name) as x2 + from tenk1 t1 + left join tenk1 t2 on (t1.fields->>'unique1')::int4 = (t2.fields->>'unique1')::int4 + join tenk1 t3 on (t1.fields->>'unique2')::int4 = (t3.fields->>'unique2')::int4) ss, + tenk1 t4, + tenk1 t5 +where (t4.fields->>'thousand')::int4 = (t5.fields->>'unique1')::int4 and ss.x1 = (t4.fields->>'tenthous')::int4 and ss.x2 = (t5.fields->>'stringu1')::name; + count +------- + 1000 +(1 row) + +-- +-- regression test: check a case where we formerly missed including an EC +-- enforcement clause because it was expected to be handled at scan level +-- +--Testcase 131: +explain (costs off) +select a.f1, b.f1, (t.fields->>'thousand')::int4 thousand, (t.fields->>'tenhous')::int4 tenthous from + tenk1 t, + (select sum((fields->>'f1')::int4)+1 as f1 from int4_tbl i4a) a, + (select sum((fields->>'f1')::int4) as f1 from int4_tbl i4b) b +where b.f1 = (t.fields->>'thousand')::int4 and a.f1 = b.f1 and (a.f1+b.f1+999) = (t.fields->>'tenthous')::int4; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Join + Hash Cond: (((sum(((i4a.fields ->> 'f1'::text))::integer) + 1)) = (sum(((i4b.fields ->> 'f1'::text))::integer))) + Join Filter: (((((sum(((i4a.fields ->> 'f1'::text))::integer) + 1)) + (sum(((i4b.fields ->> 'f1'::text))::integer))) + 999) = ((t.fields ->> 'tenthous'::text))::integer) + -> Hash Join + Hash Cond: (((t.fields ->> 'thousand'::text))::integer = ((sum(((i4a.fields ->> 'f1'::text))::integer) + 1))) + -> Foreign Scan on tenk1 t + -> Hash + -> Foreign Scan + -> Hash + -> Foreign Scan +(10 rows) + +--Testcase 132: +select a.f1, b.f1, (t.fields->>'thousand')::int4 thousand, (t.fields->>'tenhous')::int4 tenthous from + tenk1 t, + (select sum((fields->>'f1')::int4)+1 as f1 from int4_tbl i4a) a, + (select sum((fields->>'f1')::int4) as f1 from int4_tbl i4b) b +where b.f1 = (t.fields->>'thousand')::int4 and a.f1 = b.f1 and (a.f1+b.f1+999) = (t.fields->>'tenthous')::int4; + f1 | f1 | thousand | tenthous +----+----+----------+---------- +(0 rows) + +-- +-- check a case where we formerly got confused by conflicting sort orders +-- in redundant merge join path keys +-- +--Testcase 133: +explain (costs off) +select * from + (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL j1_tbl) j1_tbl full join + (select * from (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL j2_tbl) j2_tbl order by (j2_tbl.i)::int desc, (j2_tbl.k)::int asc) j2_tbl + on (j1_tbl.i)::int = (j2_tbl.i)::int and (j1_tbl.i)::int = (j2_tbl.k)::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Merge Full Join + Merge Cond: (((((j2_tbl.fields ->> 'i'::text))::integer) = (((j1_tbl.fields ->> 'i'::text))::integer)) AND ((((j2_tbl.fields ->> 'k'::text))::integer) = (((j1_tbl.fields ->> 'i'::text))::integer))) + -> Sort + Sort Key: (((j2_tbl.fields ->> 'i'::text))::integer) DESC, (((j2_tbl.fields ->> 'k'::text))::integer) + -> Foreign Scan on j2_tbl + -> Sort + Sort Key: (((j1_tbl.fields ->> 'i'::text))::integer) DESC + -> Foreign Scan on j1_tbl +(8 rows) + +--Testcase 134: +select * from + (select (fields->>'i')::int i, (fields->>'j')::int j,fields->>'t' t from J1_TBL j1_tbl) j1_tbl full join + (select * from (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL j2_tbl) j2_tbl order by (j2_tbl.i)::int desc, (j2_tbl.k)::int asc) j2_tbl + on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; + i | j | t | i | k +---+---+-------+---+---- + | | | | 0 + | 0 | zero | | + | | null | | + 8 | 8 | eight | | + 7 | 7 | seven | | + 6 | 6 | six | | + | | | 5 | -5 + | | | 5 | -5 + 5 | 0 | five | | + 4 | 1 | four | | + | | | 3 | -3 + 3 | 2 | three | | + 2 | 3 | two | 2 | 2 + | | | 2 | 4 + | | | 1 | -1 + | | | 0 | + 1 | 4 | one | | + 0 | | zero | | +(18 rows) + +-- +-- a different check for handling of redundant sort keys in merge joins +-- +--Testcase 135: +explain (costs off) +select count(*) from + (select * from tenk1 x order by (x.fields->>'thousand')::int4, (x.fields->>'twothousand')::int4, (x.fields->>'fivethous')::int4) x + left join + (select * from tenk1 y order by (y.fields->>'unique2')::int4) y + on (x.fields->>'thousand')::int4 = (y.fields->>'unique2')::int4 and (x.fields->>'twothousand')::int4 = (y.fields->>'hundred')::int4 and (x.fields->>'fivethous')::int4 = (y.fields->>'unique2')::int4; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Aggregate + -> Merge Left Join + Merge Cond: (((((x.fields ->> 'thousand'::text))::integer) = (((y.fields ->> 'unique2'::text))::integer)) AND ((((x.fields ->> 'twothousand'::text))::integer) = (((y.fields ->> 'hundred'::text))::integer)) AND ((((x.fields ->> 'fivethous'::text))::integer) = (((y.fields ->> 'unique2'::text))::integer))) + -> Sort + Sort Key: (((x.fields ->> 'thousand'::text))::integer), (((x.fields ->> 'twothousand'::text))::integer), (((x.fields ->> 'fivethous'::text))::integer) + -> Subquery Scan on x + -> Sort + Sort Key: (((x_1.fields ->> 'thousand'::text))::integer), (((x_1.fields ->> 'twothousand'::text))::integer), (((x_1.fields ->> 'fivethous'::text))::integer) + -> Foreign Scan on tenk1 x_1 + -> Sort + Sort Key: (((y.fields ->> 'unique2'::text))::integer), (((y.fields ->> 'hundred'::text))::integer) + -> Subquery Scan on y + -> Sort + Sort Key: (((y_1.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 y_1 +(15 rows) + +--Testcase 136: +select count(*) from + (select * from tenk1 x order by (x.fields->>'thousand')::int4, (x.fields->>'twothousand')::int4, (x.fields->>'fivethous')::int4) x + left join + (select * from tenk1 y order by (y.fields->>'unique2')::int4) y + on (x.fields->>'thousand')::int4 = (y.fields->>'unique2')::int4 and (x.fields->>'twothousand')::int4 = (y.fields->>'hundred')::int4 and (x.fields->>'fivethous')::int4 = (y.fields->>'unique2')::int4; + count +------- + 10000 +(1 row) + +-- +-- Clean up +-- +--Testcase 137: +DELETE FROM t1_nsc; +--Testcase 138: +DELETE FROM t2_nsc; +--Testcase 139: +DELETE FROM t3_nsc; +--Testcase 140: +DROP FOREIGN TABLE t1; +--Testcase 582: +DROP FOREIGN TABLE t1_nsc; +--Testcase 141: +DROP FOREIGN TABLE t2; +--Testcase 583: +DROP FOREIGN TABLE t2_nsc; +--Testcase 142: +DROP FOREIGN TABLE t3; +--Testcase 584: +DROP FOREIGN TABLE t3_nsc; +--Testcase 143: +DELETE FROM j1_tbl_nsc; +--Testcase 585: +DROP FOREIGN TABLE J1_TBL; +--Testcase 586: +DROP FOREIGN TABLE j1_tbl_nsc; +--Testcase 144: +DELETE FROM j2_tbl_nsc; +--Testcase 587: +DROP FOREIGN TABLE J2_TBL; +--Testcase 588: +DROP FOREIGN TABLE j2_tbl_nsc; +--Testcase 589: +DELETE FROM x_nsc; +--Testcase 590: +DELETE FROM y_nsc; +--Testcase 591: +DROP FOREIGN TABLE x_nsc; +--Testcase 592: +DROP FOREIGN TABLE y_nsc; +-- Both DELETE and UPDATE allow the specification of additional tables +-- to "join" against to determine which rows should be modified. +--Testcase 145: +CREATE FOREIGN TABLE t1 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 593: +CREATE FOREIGN TABLE t1_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 't1'); +--Testcase 146: +CREATE FOREIGN TABLE t2 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 594: +CREATE FOREIGN TABLE t2_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 't2'); +--Testcase 147: +CREATE FOREIGN TABLE t3 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 595: +CREATE FOREIGN TABLE t3_nsc (x int, y int) SERVER influxdb_svr OPTIONS (table 't3'); +--Testcase 148: +INSERT INTO t1_nsc VALUES (5, 10); +--Testcase 149: +INSERT INTO t1_nsc VALUES (15, 20); +--Testcase 150: +INSERT INTO t1_nsc VALUES (100, 100); +--Testcase 151: +INSERT INTO t1_nsc VALUES (200, 1000); +--Testcase 152: +INSERT INTO t2_nsc VALUES (200, 2000); +--Testcase 153: +INSERT INTO t3_nsc VALUES (5, 20); +--Testcase 154: +INSERT INTO t3_nsc VALUES (6, 7); +--Testcase 155: +INSERT INTO t3_nsc VALUES (7, 8); +--Testcase 156: +INSERT INTO t3_nsc VALUES (500, 100); +--Testcase 157: +ALTER TABLE t3 ADD time timestamp; +ALTER TABLE t3_nsc ADD time timestamp; +--Testcase 158: +SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; + x | y +-----+----- + 5 | 20 + 6 | 7 + 7 | 8 + 500 | 100 +(4 rows) + +--Testcase 159: +DELETE FROM t3_nsc USING t1_nsc table1 WHERE t3_nsc.x = table1.a; +--Testcase 160: +SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; + x | y +-----+----- + 6 | 7 + 7 | 8 + 500 | 100 +(3 rows) + +--Testcase 161: +DELETE FROM t3_nsc USING t1_nsc JOIN t2_nsc USING (a) WHERE t3_nsc.x > t1_nsc.a; +--Testcase 162: +SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; + x | y +---+--- + 6 | 7 + 7 | 8 +(2 rows) + +--Testcase 163: +DELETE FROM t3_nsc USING t3_nsc t3_other WHERE t3_nsc.x = t3_other.x AND t3_nsc.y = t3_other.y; +--Testcase 164: +SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; + x | y +---+--- +(0 rows) + +-- Test join against inheritance tree +--Testcase 165: +create temp table t2a () inherits (t2); +--Testcase 166: +insert into t2a values ('{"a": "200", "b": "2001"}'); +--Testcase 167: +select * from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 left join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int); + a | b | a | b +-----+------+-----+------ + 5 | 10 | | + 15 | 20 | | + 100 | 100 | | + 200 | 1000 | 200 | 2000 + 200 | 1000 | 200 | 2001 +(5 rows) + +-- Test matching of column name with wrong alias +--Testcase 168: +select t1.x from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'x')::int x, (fields->>'y')::int y from t3) t3 on (t1.a::int = t3.x::int); +ERROR: column t1.x does not exist +LINE 1: select t1.x from (select (fields->>'a')::int a, (fields->>'b... + ^ +HINT: Perhaps you meant to reference the column "t3.x". +-- Test matching of locking clause with wrong alias +--Testcase 666: +select t1.*, t2.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int), t3 as unnamed_join + for update of unnamed_join; + a | b | a | b | fields | time +---+---+---+---+--------+------ +(0 rows) + +--Testcase 667: +select foo.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo, t3 as unnamed_join + for update of unnamed_join; + a | fields | time +---+--------+------ +(0 rows) + +--Testcase 668: +select foo.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo, t3 as unnamed_join + for update of foo; +ERROR: FOR UPDATE cannot be applied to a join +LINE 3: for update of foo; + ^ +--Testcase 669: +select bar.*, unnamed_join.* from + ((select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo) as bar, t3 as unnamed_join + for update of foo; +ERROR: relation "foo" in FOR UPDATE clause not found in FROM clause +LINE 3: for update of foo; + ^ +--Testcase 670: +select bar.*, unnamed_join.* from + ((select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo) as bar, t3 as unnamed_join + for update of bar; +ERROR: FOR UPDATE cannot be applied to a join +LINE 3: for update of bar; + ^ +-- +-- regression test for 8.1 merge right join bug +-- +--Testcase 169: +CREATE FOREIGN TABLE tt1 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 596: +CREATE FOREIGN TABLE tt1_nsc ( tt1_id int4, joincol int4 ) SERVER influxdb_svr OPTIONS (table 'tt1'); +--Testcase 170: +INSERT INTO tt1_nsc VALUES (1, 11); +--Testcase 171: +INSERT INTO tt1_nsc VALUES (2, NULL); +--Testcase 172: +CREATE FOREIGN TABLE tt2 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 597: +CREATE FOREIGN TABLE tt2_nsc ( tt2_id int4, joincol int4 ) SERVER influxdb_svr OPTIONS (table 'tt2'); +--Testcase 173: +INSERT INTO tt2_nsc VALUES (21, 11); +--Testcase 174: +INSERT INTO tt2_nsc VALUES (22, 11); +--Testcase 175: +set enable_hashjoin to off; +--Testcase 176: +set enable_nestloop to off; +-- these should give the same results +--Testcase 177: +select tt1.*, tt2.* from (select (fields->>'tt1_id')::int4 tt1_id, (fields->>'joincol')::int4 joincol from tt1) tt1 left join (select (fields->>'tt2_id')::int4 tt2_id, (fields->>'joincol')::int4 joincol from tt2) tt2 on tt1.joincol::int4 = tt2.joincol::int4; + tt1_id | joincol | tt2_id | joincol +--------+---------+--------+--------- + 1 | 11 | 21 | 11 + 1 | 11 | 22 | 11 + 2 | | | +(3 rows) + +--Testcase 178: +select tt1.*, tt2.* from (select (fields->>'tt2_id')::int4 tt2_id, (fields->>'joincol')::int4 joincol from tt2) tt2 right join (select (fields->>'tt1_id')::int4 tt1_id, (fields->>'joincol')::int4 joincol from tt1) tt1 on tt1.joincol::int4 = tt2.joincol::int4; + tt1_id | joincol | tt2_id | joincol +--------+---------+--------+--------- + 1 | 11 | 21 | 11 + 1 | 11 | 22 | 11 + 2 | | | +(3 rows) + +--Testcase 179: +reset enable_hashjoin; +--Testcase 180: +reset enable_nestloop; +-- +-- regression test for bug #13908 (hash join with skew tuples & nbatch increase) +-- +--Testcase 181: +set work_mem to '64kB'; +--Testcase 182: +set enable_mergejoin to off; +--Testcase 183: +set enable_memoize to off; +--Testcase 184: +explain (costs off) +select count(*) from tenk1 a, tenk1 b + where ((a.fields->>'hundred')::int4 = (b.fields->>'thousand')::int4) and ((b.fields->>'fivethous')::int4 % 10) < 10; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Aggregate + -> Hash Join + Hash Cond: (((a.fields ->> 'hundred'::text))::integer = ((b.fields ->> 'thousand'::text))::integer) + -> Foreign Scan on tenk1 a + -> Hash + -> Foreign Scan on tenk1 b +(6 rows) + +--Testcase 185: +select count(*) from tenk1 a, tenk1 b + where ((a.fields->>'hundred')::int4 = (b.fields->>'thousand')::int4) and ((b.fields->>'fivethous')::int4 % 10) < 10; + count +-------- + 100000 +(1 row) + +--Testcase 186: +reset work_mem; +--Testcase 187: +reset enable_mergejoin; +--Testcase 188: +reset enable_memoize; +-- +-- regression test for 8.2 bug with improper re-ordering of left joins +-- +--Testcase 189: +create foreign table tt3(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 598: +create foreign table tt3_nsc(f1 int, f2 text) server influxdb_svr OPTIONS (table 'tt3'); +--Testcase 190: +insert into tt3_nsc select x, repeat('xyzzy', 100) from generate_series(1,10000) x; +--Testcase 191: +create foreign table tt4(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 599: +create foreign table tt4_nsc(f1 int) server influxdb_svr OPTIONS (table 'tt4'); +--Testcase 192: +insert into tt4_nsc values (0),(1),(9999); +--Testcase 193: +SELECT (a.fields->>'f1')::int f1 +FROM tt4 a +LEFT JOIN ( + SELECT (b.fields->>'f1')::int f1 + FROM tt3 b LEFT JOIN tt3 c ON ((b.fields->>'f1')::int = (c.fields->>'f1')::int) + WHERE c.fields->>'f1' IS NULL +) AS d ON ((a.fields->>'f1')::int = (d.f1)::int) +WHERE d.f1 IS NULL; + f1 +------ + 0 + 1 + 9999 +(3 rows) + +-- +-- regression test for proper handling of outer joins within antijoins +-- +--Testcase 194: +create foreign table tt4x(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 195: +explain (costs off) +select * from tt4x t1 +where not exists ( + select 1 from tt4x t2 + left join tt4x t3 on (t2.fields->>'c3')::int = (t3.fields->>'c1')::int + left join ( select (t5.fields->>'c1')::int as c1 + from tt4x t4 left join tt4x t5 on (t4.fields->>'c2')::int = (t5.fields->>'c1')::int + ) a1 on (t3.fields->>'c2')::int = a1.c1 + where (t1.fields->>'c1')::int = (t2.fields->>'c2')::int +); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------- + Hash Anti Join + Hash Cond: (((t1.fields ->> 'c1'::text))::integer = ((t2.fields ->> 'c2'::text))::integer) + -> Foreign Scan on tt4x t1 + -> Hash + -> Merge Right Join + Merge Cond: (((t5.fields ->> 'c1'::text))::integer = (((t3.fields ->> 'c2'::text))::integer)) + -> Merge Join + Merge Cond: ((((t4.fields ->> 'c2'::text))::integer) = (((t5.fields ->> 'c1'::text))::integer)) + -> Sort + Sort Key: (((t4.fields ->> 'c2'::text))::integer) + -> Foreign Scan on tt4x t4 + -> Sort + Sort Key: (((t5.fields ->> 'c1'::text))::integer) + -> Foreign Scan on tt4x t5 + -> Sort + Sort Key: (((t3.fields ->> 'c2'::text))::integer) + -> Merge Left Join + Merge Cond: ((((t2.fields ->> 'c3'::text))::integer) = (((t3.fields ->> 'c1'::text))::integer)) + -> Sort + Sort Key: (((t2.fields ->> 'c3'::text))::integer) + -> Foreign Scan on tt4x t2 + -> Sort + Sort Key: (((t3.fields ->> 'c1'::text))::integer) + -> Foreign Scan on tt4x t3 +(24 rows) + +-- +-- regression test for problems of the sort depicted in bug #3494 +-- +--Testcase 196: +create foreign table tt5(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 600: +create foreign table tt5_nsc(f1 int, f2 int) server influxdb_svr OPTIONS (table 'tt5'); +--Testcase 197: +create foreign table tt6(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 601: +create foreign table tt6_nsc(f1 int, f2 int) server influxdb_svr OPTIONS (table 'tt6'); +--Testcase 198: +insert into tt5_nsc values(1, 10); +--Testcase 199: +insert into tt5_nsc values(1, 11); +--Testcase 200: +insert into tt6_nsc values(1, 9); +--Testcase 201: +insert into tt6_nsc values(1, 2); +--Testcase 202: +insert into tt6_nsc values(2, 9); +--Testcase 203: +select * from (select (fields->>'f1')::int f1, (fields->>'f2')::int f2 from tt5) tt5,(select (fields->>'f1')::int f1, (fields->>'f2')::int f2 from tt6) tt6 where (tt5.f1)::int = (tt6.f1)::int and (tt5.f1)::int = (tt5.f2)::int - (tt6.f2)::int; + f1 | f2 | f1 | f2 +----+----+----+---- + 1 | 10 | 1 | 9 +(1 row) + +-- +-- regression test for problems of the sort depicted in bug #3588 +-- +--Testcase 204: +create foreign table xx (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 602: +create foreign table xx_nsc (pkxx int) server influxdb_svr OPTIONS (table 'xx'); +--Testcase 205: +create foreign table yy (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 603: +create foreign table yy_nsc (pkyy int, pkxx int) server influxdb_svr OPTIONS (table 'yy'); +--Testcase 206: +insert into xx_nsc values (1); +--Testcase 207: +insert into xx_nsc values (2); +--Testcase 208: +insert into xx_nsc values (3); +--Testcase 209: +insert into yy_nsc values (101, 1); +--Testcase 210: +insert into yy_nsc values (201, 2); +--Testcase 211: +insert into yy_nsc values (301, NULL); +--Testcase 212: +select (yy.fields->>'pkyy')::int as yy_pkyy, (yy.fields->>'pkxx')::int as yy_pkxx, (yya.fields->>'pkyy')::int as yya_pkyy, + (xxa.fields->>'pkxx')::int as xxa_pkxx, (xxb.fields->>'pkxx')::int as xxb_pkxx +from yy + left join (SELECT * FROM yy where (fields->>'pkyy')::int = 101) as yya ON (yy.fields->>'pkyy')::int = (yya.fields->>'pkyy')::int + left join xx xxa on (yya.fields->>'pkxx')::int = (xxa.fields->>'pkxx')::int + left join xx xxb on coalesce ((xxa.fields->>'pkxx')::int, 1) = (xxb.fields->>'pkxx')::int ORDER BY yy_pkyy, yy_pkxx, yya_pkyy, xxa_pkxx, xxb_pkxx; + yy_pkyy | yy_pkxx | yya_pkyy | xxa_pkxx | xxb_pkxx +---------+---------+----------+----------+---------- + 101 | 1 | 101 | 1 | 1 + 201 | 2 | | | 1 + 301 | | | | 1 +(3 rows) + +-- +-- regression test for improper pushing of constants across outer-join clauses +-- (as seen in early 8.2.x releases) +-- +--Testcase 213: +create foreign table zt1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 604: +create foreign table zt1_nsc (f1 int) server influxdb_svr OPTIONS (table 'zt1'); +--Testcase 214: +create foreign table zt2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 605: +create foreign table zt2_nsc (f2 int) server influxdb_svr OPTIONS (table 'zt2'); +--Testcase 215: +create foreign table zt3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 216: +insert into zt1_nsc values(53); +--Testcase 217: +insert into zt2_nsc values(53); +--Testcase 218: +select * from + (select (fields->>'f2')::int f2 from zt2) zt2 left join (select (fields->>'f3')::int f3 from zt3) zt3 on (f2::int = f3::int) + left join (select (fields->>'f1')::int f1 from zt1) zt1 on (f3::int = f1::int) +where (f2)::int = 53; + f2 | f3 | f1 +----+----+---- + 53 | | +(1 row) + +--Testcase 219: +create temp view zv1 as select *,'dummy'::text AS junk from zt1; +--Testcase 220: +select * from + (select (fields->>'f2')::int f2 from zt2) zt2 left join (select (fields->>'f3')::int f3 from zt3) zt3 on (f2::int = f3::int) + left join zv1 on (f3::int = (zv1.fields->>'f1')::int) +where (f2)::int = 53; + f2 | f3 | fields | junk +----+----+--------+------ + 53 | | | +(1 row) + +-- +-- regression test for improper extraction of OR indexqual conditions +-- (as seen in early 8.3.x releases) +-- +--Testcase 221: +select a.unique2, a.ten, b.tenthous, b.unique2, b.hundred +from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b on a.unique2 = b.tenthous +where (a.unique1)::int4 = 42 and + ((b.unique2 is null and (a.ten)::int4 = 2) or (b.hundred)::int4 = 3); + unique2 | ten | tenthous | unique2 | hundred +---------+-----+----------+---------+--------- +(0 rows) + +-- +-- test proper positioning of one-time quals in EXISTS (8.4devel bug) +-- +--Testcase 222: +prepare foo(bool) as + select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b + on ((a.unique2)::int4 = (b.unique1)::int4 and exists + (select 1 from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) c where (c.thousand)::int4 = (b.unique2)::int4 and $1)); +--Testcase 223: +execute foo(true); + count +------- + 10000 +(1 row) + +--Testcase 224: +execute foo(false); + count +------- + 10000 +(1 row) + +-- +-- test for sane behavior with noncanonical merge clauses, per bug #4926 +-- +begin; +--Testcase 225: +set enable_mergejoin = 1; +--Testcase 226: +set enable_hashjoin = 0; +--Testcase 227: +set enable_nestloop = 0; +--Testcase 228: +create foreign table a (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 229: +create foreign table b (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 230: +select * from (select (fields->>'i')::int i from a) a left join (select (fields->>'x')::int x, (fields->>'y')::int y from b) b on i::int = x::int and i::int = y::int and x::int = i::int; + i | x | y +---+---+--- +(0 rows) + +--Testcase 231: +DROP FOREIGN TABLE a; +--Testcase 232: +DROP FOREIGN TABLE b; +rollback; +-- +-- test handling of merge clauses using record_ops +-- +begin; +--Testcase 233: +create type mycomptype as (id int, v bigint); +--Testcase 234: +create temp table tidv (idv mycomptype); +--Testcase 235: +create index on tidv (idv); +--Testcase 236: +explain (costs off) +select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; + QUERY PLAN +---------------------------------------------------------- + Merge Join + Merge Cond: (a.idv = b.idv) + -> Index Only Scan using tidv_idv_idx on tidv a + -> Materialize + -> Index Only Scan using tidv_idv_idx on tidv b +(5 rows) + +--Testcase 237: +set enable_mergejoin = 0; +--Testcase 238: +set enable_hashjoin = 0; +--Testcase 239: +explain (costs off) +select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; + QUERY PLAN +---------------------------------------------------- + Nested Loop + -> Seq Scan on tidv a + -> Index Only Scan using tidv_idv_idx on tidv b + Index Cond: (idv = a.idv) +(4 rows) + +rollback; +-- +-- test NULL behavior of whole-row Vars, per bug #5025 +-- +--Testcase 240: +select t1.q2, count(t2.*) +from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1 left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 on (t1.q2 = t2.q1) +group by t1.q2 order by 1; + q2 | count +-------------------+------- + -4567890123456789 | 0 + 123 | 2 + 456 | 0 + 4567890123456789 | 6 +(4 rows) + +--Testcase 241: +select (t1.fields->>'q2')::int8 q2, count(t2.*) +from int8_tbl t1 left join (select * from int8_tbl) t2 on ((t1.fields->>'q2')::int8 = (t2.fields->>'q1')::int8) +group by t1.fields->>'q2' order by 1; + q2 | count +-------------------+------- + -4567890123456789 | 0 + 123 | 2 + 456 | 0 + 4567890123456789 | 6 +(4 rows) + +--Testcase 242: +select (t1.fields->>'q2')::int8 q2, count(t2.*) +from int8_tbl t1 left join (select * from int8_tbl offset 0) t2 on ((t1.fields->>'q2')::int8 = (t2.fields->>'q1')::int8) +group by t1.fields->>'q2' order by 1; + q2 | count +-------------------+------- + -4567890123456789 | 0 + 123 | 2 + 456 | 0 + 4567890123456789 | 6 +(4 rows) + +--Testcase 243: +select (t1.fields->>'q2')::int8 q2, count(t2.*) +from int8_tbl t1 left join + (select (fields->>'q1')::int8 q1, case when (fields->>'q2')::int8=1 then 1 else (fields->>'q2')::int8 end as q2 from int8_tbl) t2 + on ((t1.fields->>'q2')::int8 = t2.q1) +group by t1.fields->>'q2' order by 1; + q2 | count +-------------------+------- + -4567890123456789 | 0 + 123 | 2 + 456 | 0 + 4567890123456789 | 6 +(4 rows) + +-- +-- test incorrect failure to NULL pulled-up subexpressions +-- +begin; +--Testcase 244: +create foreign table a ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 606: +create foreign table a_nsc ( + code char +) server influxdb_svr OPTIONS (table 'a'); +--Testcase 245: +create foreign table b ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 607: +create foreign table b_nsc ( + a char, + num integer +) server influxdb_svr OPTIONS (table 'b'); +--Testcase 246: +create foreign table c ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 608: +create foreign table c_nsc ( + name char, + a char +) server influxdb_svr OPTIONS (table 'c'); +--Testcase 247: +insert into a_nsc (code) values ('p'); +--Testcase 248: +insert into a_nsc (code) values ('q'); +--Testcase 249: +insert into b_nsc (a, num) values ('p', 1); +--Testcase 250: +insert into b_nsc (a, num) values ('p', 2); +--Testcase 251: +insert into c_nsc (name, a) values ('A', 'p'); +--Testcase 252: +insert into c_nsc (name, a) values ('B', 'q'); +--Testcase 253: +insert into c_nsc (name, a) values ('C', null); +--Testcase 254: +select c.name, ss.code, ss.b_cnt, ss.const +from (select fields->>'name' "name", fields->>'a' a from c) c left join + (select a.code, coalesce(b_grp.cnt, 0) as b_cnt, -1 as const + from (select fields->>'code' code from a) a left join + (select count(1) as cnt, b.fields->>'a' a from b group by b.fields->>'a') as b_grp + on a.code = b_grp.a + ) as ss + on (c.a = ss.code) +order by c.name; + name | code | b_cnt | const +------+------+-------+------- + A | p | 2 | -1 + B | q | 0 | -1 + C | | | +(3 rows) + +--Testcase 255: +DELETE FROM a_nsc; +--Testcase 256: +DELETE FROM b_nsc; +--Testcase 257: +DELETE FROM c_nsc; +--Testcase 258: +DROP FOREIGN TABLE a; +--Testcase 609: +DROP FOREIGN TABLE a_nsc; +--Testcase 259: +DROP FOREIGN TABLE b; +--Testcase 610: +DROP FOREIGN TABLE b_nsc; +--Testcase 260: +DROP FOREIGN TABLE c; +--Testcase 611: +DROP FOREIGN TABLE c_nsc; +rollback; +-- +-- test incorrect handling of placeholders that only appear in targetlists, +-- per bug #6154 +-- +--Testcase 261: +SELECT * FROM +( SELECT 1 as key1 ) sub1 +LEFT JOIN +( SELECT sub3.key3, sub4.value2, COALESCE(sub4.value2, 66) as value3 FROM + ( SELECT 1 as key3 ) sub3 + LEFT JOIN + ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM + ( SELECT 1 as key5 ) sub5 + LEFT JOIN + ( SELECT 2 as key6, 42 as value1 ) sub6 + ON sub5.key5 = sub6.key6 + ) sub4 + ON sub4.key5 = sub3.key3 +) sub2 +ON sub1.key1 = sub2.key3; + key1 | key3 | value2 | value3 +------+------+--------+-------- + 1 | 1 | 1 | 1 +(1 row) + +-- test the path using join aliases, too +--Testcase 262: +SELECT * FROM +( SELECT 1 as key1 ) sub1 +LEFT JOIN +( SELECT sub3.key3, value2, COALESCE(value2, 66) as value3 FROM + ( SELECT 1 as key3 ) sub3 + LEFT JOIN + ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM + ( SELECT 1 as key5 ) sub5 + LEFT JOIN + ( SELECT 2 as key6, 42 as value1 ) sub6 + ON sub5.key5 = sub6.key6 + ) sub4 + ON sub4.key5 = sub3.key3 +) sub2 +ON sub1.key1 = sub2.key3; + key1 | key3 | value2 | value3 +------+------+--------+-------- + 1 | 1 | 1 | 1 +(1 row) + +-- +-- test case where a PlaceHolderVar is used as a nestloop parameter +-- +--Testcase 263: +EXPLAIN (COSTS OFF) +SELECT qq, (fields->>'unique1')::int4 unique1 + FROM + ( SELECT COALESCE((fields->>'q1')::int8, 0) AS qq FROM int8_tbl a ) AS ss1 + FULL OUTER JOIN + ( SELECT COALESCE((fields->>'q2')::int8, -1) AS qq FROM int8_tbl b ) AS ss2 + USING (qq) + INNER JOIN tenk1 c ON qq = (fields->>'unique2')::int4; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Merge Join + Merge Cond: ((((c.fields ->> 'unique2'::text))::integer) = (COALESCE((COALESCE(((a.fields ->> 'q1'::text))::bigint, '0'::bigint)), (COALESCE(((b.fields ->> 'q2'::text))::bigint, '-1'::bigint))))) + -> Sort + Sort Key: (((c.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 c + -> Sort + Sort Key: (COALESCE((COALESCE(((a.fields ->> 'q1'::text))::bigint, '0'::bigint)), (COALESCE(((b.fields ->> 'q2'::text))::bigint, '-1'::bigint)))) + -> Merge Full Join + Merge Cond: ((COALESCE(((a.fields ->> 'q1'::text))::bigint, '0'::bigint)) = (COALESCE(((b.fields ->> 'q2'::text))::bigint, '-1'::bigint))) + -> Sort + Sort Key: (COALESCE(((a.fields ->> 'q1'::text))::bigint, '0'::bigint)) + -> Foreign Scan on int8_tbl a + -> Sort + Sort Key: (COALESCE(((b.fields ->> 'q2'::text))::bigint, '-1'::bigint)) + -> Foreign Scan on int8_tbl b +(15 rows) + +--Testcase 264: +SELECT qq, (fields->>'unique1')::int4 unique1 + FROM + ( SELECT COALESCE((fields->>'q1')::int8, 0) AS qq FROM int8_tbl a ) AS ss1 + FULL OUTER JOIN + ( SELECT COALESCE((fields->>'q2')::int8, -1) AS qq FROM int8_tbl b ) AS ss2 + USING (qq) + INNER JOIN tenk1 c ON qq = (fields->>'unique2')::int4; + qq | unique1 +-----+--------- + 123 | 4596 + 123 | 4596 + 456 | 7318 +(3 rows) + +-- +-- nested nestloops can require nested PlaceHolderVars +-- +--Testcase 265: +create foreign table nt1 ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 612: +create foreign table nt1_nsc ( + id int, + a1 boolean, + a2 boolean +) server influxdb_svr OPTIONS (table 'nt1'); +--Testcase 266: +create foreign table nt2 ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 613: +create foreign table nt2_nsc ( + id int, + nt1_id int, + b1 boolean, + b2 boolean +) server influxdb_svr OPTIONS (table 'nt2'); +--Testcase 267: +create foreign table nt3 ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 614: +create foreign table nt3_nsc ( + id int, + nt2_id int, + c1 boolean +) server influxdb_svr OPTIONS (table 'nt3'); +--Testcase 268: +insert into nt1_nsc values (1,true,true); +--Testcase 269: +insert into nt1_nsc values (2,true,false); +--Testcase 270: +insert into nt1_nsc values (3,false,false); +--Testcase 271: +insert into nt2_nsc values (1,1,true,true); +--Testcase 272: +insert into nt2_nsc values (2,2,true,false); +--Testcase 273: +insert into nt2_nsc values (3,3,false,false); +--Testcase 274: +insert into nt3_nsc values (1,1,true); +--Testcase 275: +insert into nt3_nsc values (2,2,false); +--Testcase 276: +insert into nt3_nsc values (3,3,true); +--Testcase 277: +explain (costs off) +select (nt3.fields->>'id')::int id +from nt3 as nt3 + left join + (select (nt2.fields->>'id')::int id, (nt2.fields->>'nt1_id')::int nt1_id, (nt2.fields->>'b1')::boolean b1, (nt2.fields->>'b2')::boolean b2, ((nt2.fields->>'b1')::boolean and ss1.a3) AS b3 + from nt2 as nt2 + left join + (select (nt1.fields->>'id')::int id, (nt1.fields->>'a1')::boolean a1, (nt1.fields->>'a2')::boolean a2, ((nt1.fields->>'id')::int is not null) as a3 from nt1) as ss1 + on ss1.id = (nt2.fields->>'nt1_id')::int + ) as ss2 + on ss2.id = (nt3.fields->>'nt2_id')::int +where (nt3.fields->>'id')::int = 1 and ss2.b3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------- + Hash Join + Hash Cond: (((nt2.fields ->> 'nt1_id'::text))::integer = ((nt1.fields ->> 'id'::text))::integer) + Join Filter: (((nt2.fields ->> 'b1'::text))::boolean AND ((((nt1.fields ->> 'id'::text))::integer IS NOT NULL))) + -> Hash Join + Hash Cond: (((nt2.fields ->> 'id'::text))::integer = ((nt3.fields ->> 'nt2_id'::text))::integer) + -> Foreign Scan on nt2 + -> Hash + -> Foreign Scan on nt3 + -> Hash + -> Foreign Scan on nt1 +(10 rows) + +--Testcase 278: +select (nt3.fields->>'id')::int id +from nt3 as nt3 + left join + (select (nt2.fields->>'id')::int id, (nt2.fields->>'nt1_id')::int nt1_id, (nt2.fields->>'b1')::boolean b1, (nt2.fields->>'b2')::boolean b2, ((nt2.fields->>'b1')::boolean and ss1.a3) AS b3 + from nt2 as nt2 + left join + (select (nt1.fields->>'id')::int id, (nt1.fields->>'a1')::boolean a1, (nt1.fields->>'a2')::boolean a2, ((nt1.fields->>'id')::int is not null) as a3 from nt1) as ss1 + on ss1.id = (nt2.fields->>'nt1_id')::int + ) as ss2 + on ss2.id = (nt3.fields->>'nt2_id')::int +where (nt3.fields->>'id')::int = 1 and ss2.b3; + id +---- + 1 +(1 row) + +-- +-- test case where a PlaceHolderVar is propagated into a subquery +-- +--Testcase 279: +explain (costs off) +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t1) t1 left join + (select q1 as x, 42 as y from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t2) t2) ss + on (t1.q2)::int8 = (ss.x)::int8 +where + 1 = (select 1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t3) t3 where ss.y is not null limit 1) +order by 1,2; + QUERY PLAN +------------------------------------------------------------------------------------------------------- + Sort + Sort Key: (((t1.fields ->> 'q1'::text))::bigint), (((t1.fields ->> 'q2'::text))::bigint) + -> Merge Right Join + Merge Cond: ((((t2.fields ->> 'q1'::text))::bigint) = (((t1.fields ->> 'q2'::text))::bigint)) + Filter: (1 = (SubPlan 1)) + -> Sort + Sort Key: (((t2.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on int8_tbl t2 + -> Sort + Sort Key: (((t1.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on int8_tbl t1 + SubPlan 1 + -> Limit + -> Result + One-Time Filter: ((42) IS NOT NULL) + -> Foreign Scan on int8_tbl t3 +(16 rows) + +--Testcase 280: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t1) t1 left join + (select q1 as x, 42 as y from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t2) t2) ss + on (t1.q2)::int8 = (ss.x)::int8 +where + 1 = (select 1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t3) t3 where ss.y is not null limit 1) +order by 1,2; + q1 | q2 | x | y +------------------+------------------+------------------+---- + 123 | 4567890123456789 | 4567890123456789 | 42 + 123 | 4567890123456789 | 4567890123456789 | 42 + 123 | 4567890123456789 | 4567890123456789 | 42 + 4567890123456789 | 123 | 123 | 42 + 4567890123456789 | 123 | 123 | 42 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 +(8 rows) + +-- +-- variant where a PlaceHolderVar is needed at a join, but not above the join +-- +--Testcase 281: +explain (costs off) +select * from + (select (fields->>'f1')::int4 f1 from INT4_TBL i41) as i41, + lateral + (select 1 as x from + (select i41.f1 as lat, + i42.f1 as loc from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i81) as i81, (select (fields->>'f1')::int4 f1 from INT4_TBL i42) as i42) as ss1 + right join (select (fields->>'f1')::int4 f1 from INT4_TBL i43) as i43 on (i43.f1 > 1) + where ss1.loc = ss1.lat) as ss2 +where i41.f1 > 0; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Nested Loop + -> Nested Loop + -> Foreign Scan on int4_tbl i41 + -> Nested Loop + Join Filter: (((i41.fields ->> 'f1'::text))::integer = ((i42.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int8_tbl i81 + -> Materialize + -> Foreign Scan on int4_tbl i42 + -> Materialize + -> Foreign Scan on int4_tbl i43 +(10 rows) + +--Testcase 282: +select * from + (select (fields->>'f1')::int4 f1 from INT4_TBL i41) as i41, + lateral + (select 1 as x from + (select i41.f1 as lat, + i42.f1 as loc from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i81) as i81, (select (fields->>'f1')::int4 f1 from INT4_TBL i42) as i42) as ss1 + right join (select (fields->>'f1')::int4 f1 from INT4_TBL i43) as i43 on (i43.f1 > 1) + where ss1.loc = ss1.lat) as ss2 +where i41.f1 > 0; + f1 | x +------------+--- + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 123456 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 + 2147483647 | 1 +(20 rows) + +-- +-- test the corner cases FULL JOIN ON TRUE and FULL JOIN ON FALSE +-- +--Testcase 283: +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) a full join (select (fields->>'f1')::int4 f1 from INT4_TBL) b on true; + f1 | f1 +-------------+------------- + 0 | 0 + 0 | 123456 + 0 | -123456 + 0 | 2147483647 + 0 | -2147483647 + 123456 | 0 + 123456 | 123456 + 123456 | -123456 + 123456 | 2147483647 + 123456 | -2147483647 + -123456 | 0 + -123456 | 123456 + -123456 | -123456 + -123456 | 2147483647 + -123456 | -2147483647 + 2147483647 | 0 + 2147483647 | 123456 + 2147483647 | -123456 + 2147483647 | 2147483647 + 2147483647 | -2147483647 + -2147483647 | 0 + -2147483647 | 123456 + -2147483647 | -123456 + -2147483647 | 2147483647 + -2147483647 | -2147483647 +(25 rows) + +--Testcase 284: +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) a full join (select (fields->>'f1')::int4 f1 from INT4_TBL) b on false; + f1 | f1 +-------------+------------- + | 0 + | 123456 + | -123456 + | 2147483647 + | -2147483647 + 0 | + 123456 | + -123456 | + 2147483647 | + -2147483647 | +(10 rows) + +-- +-- test for ability to use a cartesian join when necessary +-- +--Testcase 285: +create foreign table q1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 286: +create foreign table q2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 287: +explain (costs off) +select * from + (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (f1)::int = (twothousand)::int, + (select (fields->>'q1')::int q1 from q1) q1, (select (fields->>'q2')::int q2 from q2) q2 +where (q1)::int = thousand::int or (q2)::int = thousand::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Merge Join + Merge Cond: ((((int4_tbl.fields ->> 'f1'::text))::integer) = (((tenk1.fields ->> 'twothousand'::text))::integer)) + -> Sort + Sort Key: (((int4_tbl.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl + -> Materialize + -> Sort + Sort Key: (((tenk1.fields ->> 'twothousand'::text))::integer) + -> Nested Loop + Join Filter: ((((q1.fields ->> 'q1'::text))::integer = ((tenk1.fields ->> 'thousand'::text))::integer) OR (((q2.fields ->> 'q2'::text))::integer = ((tenk1.fields ->> 'thousand'::text))::integer)) + -> Nested Loop + -> Foreign Scan on tenk1 + -> Materialize + -> Foreign Scan on q1 + -> Materialize + -> Foreign Scan on q2 +(16 rows) + +--Testcase 288: +explain (costs off) +select * from + (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (f1)::int = (twothousand)::int, + (select (fields->>'q1')::int q1 from q1) q1, (select (fields->>'q2')::int q2 from q2) q2 +where (thousand)::int = ((q1)::int + (q2)::int); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Merge Join + Merge Cond: ((((tenk1.fields ->> 'thousand'::text))::integer) = ((((q1.fields ->> 'q1'::text))::integer + ((q2.fields ->> 'q2'::text))::integer))) + -> Sort + Sort Key: (((tenk1.fields ->> 'thousand'::text))::integer) + -> Merge Join + Merge Cond: ((((tenk1.fields ->> 'twothousand'::text))::integer) = (((int4_tbl.fields ->> 'f1'::text))::integer)) + -> Sort + Sort Key: (((tenk1.fields ->> 'twothousand'::text))::integer) + -> Foreign Scan on tenk1 + -> Sort + Sort Key: (((int4_tbl.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl + -> Materialize + -> Sort + Sort Key: ((((q1.fields ->> 'q1'::text))::integer + ((q2.fields ->> 'q2'::text))::integer)) + -> Nested Loop + -> Foreign Scan on q1 + -> Materialize + -> Foreign Scan on q2 +(19 rows) + +-- +-- test ability to generate a suitable plan for a star-schema query +-- +--Testcase 289: +explain (costs off) +select * from + (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 tenk1) tenk1, (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b +where thousand::int4 = a.q1::int8 and tenthous::int4 = b.q1::int8 and a.q2::int8 = 1 and b.q2::int8 = 2; + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Hash Join + Hash Cond: (((tenk1.fields ->> 'tenthous'::text))::integer = ((b.fields ->> 'q1'::text))::bigint) + -> Hash Join + Hash Cond: (((tenk1.fields ->> 'thousand'::text))::integer = ((a.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on tenk1 + -> Hash + -> Foreign Scan on int8_tbl a + -> Hash + -> Foreign Scan on int8_tbl b +(9 rows) + +-- +-- test a corner case in which we shouldn't apply the star-schema optimization +-- +--Testcase 290: +explain (costs off) +select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (select 1,0 from onerow) v1(x1,x2) + left join (select 3,1 from onerow) v2(y1,y2) + on (v1.x1)::int4 = (v2.y2)::int4) subq1 + on ((i1.fields->>'f1')::int4 = (subq1.x2)::int4) + on ((t1.fields->>'unique2')::int4 = (subq1.d1)::int4) + left join tenk1 t2 + on ((subq1.y1)::int4 = (t2.fields->>'unique1')::int4) +where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > t2.fields->>'stringu2'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Nested Loop + -> Foreign Scan on int4_tbl i1 + -> Materialize + -> Hash Join + Hash Cond: ((11) = ((t1.fields ->> 'unique2'::text))::integer) + Join Filter: (((t1.fields ->> 'stringu1'::text))::name > (t2.fields ->> 'stringu2'::text)) + -> Nested Loop + -> Seq Scan on onerow + -> Hash Join + Hash Cond: (((t2.fields ->> 'unique1'::text))::integer = (3)) + -> Foreign Scan on tenk1 t2 + -> Hash + -> Seq Scan on onerow onerow_1 + -> Hash + -> Foreign Scan on tenk1 t1 +(15 rows) + +--Testcase 291: +select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (select 1,0 from onerow) v1(x1,x2) + left join (select 3,1 from onerow) v2(y1,y2) + on (v1.x1)::int4 = (v2.y2)::int4) subq1 + on ((i1.fields->>'f1')::int4 = (subq1.x2)::int4) + on ((t1.fields->>'unique2')::int4 = (subq1.d1)::int4) + left join tenk1 t2 + on ((subq1.y1)::int4 = (t2.fields->>'unique1')::int4) +where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > t2.fields->>'stringu2'; + unique2 | stringu1 | unique1 | stringu2 +---------+----------+---------+---------- + 11 | WFAAAA | 3 | LKIAAA +(1 row) + +-- variant that isn't quite a star-schema case +--Testcase 292: +select ss1.d1 from + tenk1 as t1 + inner join tenk1 as t2 + on (t1.fields->>'tenthous')::int4 = (t2.fields->>'ten')::int4 + inner join + int8_tbl as i8 + left join int4_tbl as i4 + inner join (select 64::information_schema.cardinal_number as d1 + from tenk1 t3, + lateral (select abs((t3.fields->>'unique1')::int4) + random()) ss0(x) + where (t3.fields->>'fivethous')::int4 < 0) as ss1 + on (i4.fields->>'f1')::int4 = ss1.d1 + on (i8.fields->>'q1')::int8 = (i4.fields->>'f1')::int4 + on (t1.fields->>'tenthous')::int4 = ss1.d1 +where (t1.fields->>'unique1')::int4 < (i4.fields->>'f1')::int4; + d1 +---- +(0 rows) + +-- this variant is foldable by the remove-useless-RESULT-RTEs code +--Testcase 293: +explain (costs off) +select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (values(1,0)) v1(x1,x2) + left join (values(3,1)) v2(y1,y2) + on v1.x1 = v2.y2) subq1 + on ((i1.fields->>'f1')::int4 = subq1.x2) + on ((t1.fields->>'unique2')::int4 = subq1.d1) + left join tenk1 t2 + on (subq1.y1 = (t2.fields->>'unique1')::int4) +where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > (t2.fields->>'stringu2')::name; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Hash Join + Hash Cond: (((t2.fields ->> 'unique1'::text))::integer = (3)) + Join Filter: (((t1.fields ->> 'stringu1'::text))::name > ((t2.fields ->> 'stringu2'::text))::name) + -> Foreign Scan on tenk1 t2 + -> Hash + -> Hash Join + Hash Cond: (((t1.fields ->> 'unique2'::text))::integer = (11)) + -> Foreign Scan on tenk1 t1 + -> Hash + -> Foreign Scan on int4_tbl i1 +(10 rows) + +--Testcase 294: +select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (values(1,0)) v1(x1,x2) + left join (values(3,1)) v2(y1,y2) + on v1.x1 = v2.y2) subq1 + on ((i1.fields->>'f1')::int4 = subq1.x2) + on ((t1.fields->>'unique2')::int4 = subq1.d1) + left join tenk1 t2 + on (subq1.y1 = (t2.fields->>'unique1')::int4) +where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > (t2.fields->>'stringu2')::name; + unique2 | stringu1 | unique1 | stringu2 +---------+----------+---------+---------- + 11 | WFAAAA | 3 | LKIAAA +(1 row) + +-- Here's a variant that we can't fold too aggressively, though, +-- or we end up with noplace to evaluate the lateral PHV +--Testcase 295: +explain (verbose, costs off) +select * from + (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), + lateral (select ss2.y as z limit 1) ss3; + QUERY PLAN +--------------------------- + Nested Loop + Output: 1, (2), ((2)) + -> Result + Output: 2 + -> Limit + Output: ((2)) + -> Result + Output: (2) +(8 rows) + +--Testcase 296: +select * from + (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), + lateral (select ss2.y as z limit 1) ss3; + x | y | z +---+---+--- + 1 | 2 | 2 +(1 row) + +-- Test proper handling of appendrel PHVs during useless-RTE removal +--Testcase 297: +explain (costs off) +select * from + (select 0 as z) as t1 + left join + (select true as a) as t2 + on true, + lateral (select true as b + union all + select a as b) as t3 +where b; + QUERY PLAN +--------------------------------------- + Nested Loop + -> Result + -> Append + -> Result + -> Result + One-Time Filter: (true) +(6 rows) + +--Testcase 298: +select * from + (select 0 as z) as t1 + left join + (select true as a) as t2 + on true, + lateral (select true as b + union all + select a as b) as t3 +where b; + z | a | b +---+---+--- + 0 | t | t + 0 | t | t +(2 rows) + +-- +-- test inlining of immutable functions +-- +--Testcase 299: +create function f_immutable_int4(i integer) returns integer as +$$ begin return i; end; $$ language plpgsql immutable; +-- check optimization of function scan with join +--Testcase 300: +explain (costs off) +select (fields->>'unique1')::int4 unique1 from tenk1, (select * from f_immutable_int4(1) x) x +where x = (fields->>'unique1')::int4; + QUERY PLAN +----------------------- + Foreign Scan on tenk1 +(1 row) + +--Testcase 301: +explain (verbose, costs off) +select (fields->>'unique1')::int4 unique1, x.* +from tenk1, (select *, random() from f_immutable_int4(1) x) x +where x = (fields->>'unique1')::int4; + QUERY PLAN +-------------------------------------------------------------------------- + Hash Join + Output: ((tenk1.fields ->> 'unique1'::text))::integer, (1), (random()) + Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = (1)) + -> Foreign Scan on public.tenk1 + Output: tenk1.fields + InfluxDB query: SELECT * FROM "tenk" + -> Hash + Output: (1), (random()) + -> Result + Output: 1, random() +(10 rows) + +--Testcase 302: +explain (costs off) +select (fields->>'unique1')::int4 unique1 from tenk1, f_immutable_int4(1) x where x = (fields->>'unique1')::int4; + QUERY PLAN +----------------------- + Foreign Scan on tenk1 +(1 row) + +--Testcase 303: +explain (costs off) +select (fields->>'unique1')::int4 unique1 from tenk1, lateral f_immutable_int4(1) x where x = (fields->>'unique1')::int4; + QUERY PLAN +----------------------- + Foreign Scan on tenk1 +(1 row) + +--Testcase 569: +explain (costs off) +select (fields->>'unique1')::int4 unique1 from tenk1, lateral f_immutable_int4(1) x where x in (select 17); + QUERY PLAN +-------------------------- + Result + One-Time Filter: false +(2 rows) + +--Testcase 304: +explain (costs off) +select (fields->>'unique1')::int4 unique1, x from tenk1 join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; + QUERY PLAN +----------------------- + Foreign Scan on tenk1 +(1 row) + +--Testcase 305: +explain (costs off) +select (fields->>'unique1')::int4 unique1, x from tenk1 left join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; + QUERY PLAN +-------------------------------------------------------------------- + Nested Loop Left Join + Join Filter: (((tenk1.fields ->> 'unique1'::text))::integer = 1) + -> Foreign Scan on tenk1 + -> Materialize + -> Result +(5 rows) + +--Testcase 306: +explain (costs off) +select (fields->>'unique1')::int4 unique1, x from tenk1 right join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; + QUERY PLAN +----------------------------- + Nested Loop Left Join + -> Result + -> Foreign Scan on tenk1 +(3 rows) + +--Testcase 307: +explain (costs off) +select (fields->>'unique1')::int4 unique1, x from tenk1 full join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; + QUERY PLAN +-------------------------------------------------------------------- + Hash Full Join + Hash Cond: (((tenk1.fields ->> 'unique1'::text))::integer = (1)) + -> Foreign Scan on tenk1 + -> Hash + -> Result +(5 rows) + +-- check that pullup of a const function allows further const-folding +--Testcase 308: +explain (costs off) +select (fields->>'unique1')::int4 unique1 from tenk1, f_immutable_int4(1) x where x = 42; + QUERY PLAN +-------------------------- + Result + One-Time Filter: false +(2 rows) + +-- test inlining of immutable functions with PlaceHolderVars +--Testcase 309: +explain (costs off) +select (nt3.fields->>'id')::int id +from nt3 as nt3 + left join + (select nt2.*, ((nt2.fields->>'b1')::boolean or i4 = 42) AS b3 + from nt2 as nt2 + left join + f_immutable_int4(0) i4 + on i4 = (nt2.fields->>'nt1_id')::int + ) as ss2 + on (ss2.fields->>'id')::int = (nt3.fields->>'nt2_id')::int +where (nt3.fields->>'id')::int = 1 and (ss2.b3)::boolean; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Hash Right Join + Hash Cond: (((nt2.fields ->> 'id'::text))::integer = ((nt3.fields ->> 'nt2_id'::text))::integer) + Filter: ((((nt2.fields ->> 'b1'::text))::boolean OR ((0) = 42))) + -> Nested Loop Left Join + Join Filter: (0 = ((nt2.fields ->> 'nt1_id'::text))::integer) + -> Foreign Scan on nt2 + -> Materialize + -> Result + -> Hash + -> Foreign Scan on nt3 +(10 rows) + +--Testcase 310: +drop function f_immutable_int4(int); +-- test inlining when function returns composite +--Testcase 311: +create function mki8(bigint, bigint) returns int8_tbl as +$$select row('{"q1" : ' || cast($1 as text) || ', "q2" : ' || cast($2 as text) || '}')::int8_tbl$$ language sql; +--Testcase 312: +create function mki4(int) returns int4_tbl as +$$select row('{"f1" : ' || cast($1 as text) || '}')::int4_tbl$$ language sql; +--Testcase 313: +explain (verbose, costs off) +select * from mki8(1, 2); + QUERY PLAN +--------------------------------------------------------- + Function Scan on mki8 + Output: fields + Function Call: '("{""q1"": 1, ""q2"": 2}")'::int8_tbl +(3 rows) + +--Testcase 314: +select * from mki8(1, 2); + fields +-------------------- + {"q1": 1, "q2": 2} +(1 row) + +--Testcase 315: +explain (verbose, costs off) +select * from mki4(42); + QUERY PLAN +----------------------------------------------- + Function Scan on mki4 + Output: fields + Function Call: '("{""f1"": 42}")'::int4_tbl +(3 rows) + +--Testcase 316: +select * from mki4(42); + fields +------------ + {"f1": 42} +(1 row) + +--Testcase 317: +drop function mki8(bigint, bigint); +--Testcase 318: +drop function mki4(int); +-- +-- test extraction of restriction OR clauses from join OR clause +-- (we used to only do this for indexable clauses) +-- +--Testcase 319: +explain (costs off) +select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on + ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or ((a.unique2)::int4 = 3 and (b.hundred)::int4 = 4); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Join Filter: (((((a.fields ->> 'unique1'::text))::integer = 1) AND (((b.fields ->> 'unique1'::text))::integer = 2)) OR ((((a.fields ->> 'unique2'::text))::integer = 3) AND (((b.fields ->> 'hundred'::text))::integer = 4))) + -> Foreign Scan on tenk1 a + -> Materialize + -> Foreign Scan on tenk1 b +(5 rows) + +--Testcase 320: +explain (costs off) +select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on + ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or ((a.unique2)::int4 = 3 and (b.ten)::int4 = 4); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Join Filter: (((((a.fields ->> 'unique1'::text))::integer = 1) AND (((b.fields ->> 'unique1'::text))::integer = 2)) OR ((((a.fields ->> 'unique2'::text))::integer = 3) AND (((b.fields ->> 'ten'::text))::integer = 4))) + -> Foreign Scan on tenk1 a + -> Materialize + -> Foreign Scan on tenk1 b +(5 rows) + +--Testcase 321: +explain (costs off) +select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on + ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or + (((a.unique2)::int4 = 3 or (a.unique2)::int4 = 7) and (b.hundred)::int4 = 4); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Join Filter: (((((a.fields ->> 'unique1'::text))::integer = 1) AND (((b.fields ->> 'unique1'::text))::integer = 2)) OR (((((a.fields ->> 'unique2'::text))::integer = 3) OR (((a.fields ->> 'unique2'::text))::integer = 7)) AND (((b.fields ->> 'hundred'::text))::integer = 4))) + -> Foreign Scan on tenk1 a + -> Materialize + -> Foreign Scan on tenk1 b +(5 rows) + +-- +-- test placement of movable quals in a parameterized join tree +-- +--Testcase 322: +explain (costs off) +select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t1) t1 left join + ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t2) t2 join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t3) t3 on (t2.thousand)::int4 = (t3.unique2)::int4) + on (t1.hundred)::int4 = (t2.hundred)::int4 and (t1.ten)::int4 = (t3.ten)::int4 +where (t1.unique1)::int4 = 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Hash Right Join + Hash Cond: ((((t2.fields ->> 'hundred'::text))::integer = ((t1.fields ->> 'hundred'::text))::integer) AND (((t3.fields ->> 'ten'::text))::integer = ((t1.fields ->> 'ten'::text))::integer)) + -> Merge Join + Merge Cond: ((((t2.fields ->> 'thousand'::text))::integer) = (((t3.fields ->> 'unique2'::text))::integer)) + -> Sort + Sort Key: (((t2.fields ->> 'thousand'::text))::integer) + -> Foreign Scan on tenk1 t2 + -> Sort + Sort Key: (((t3.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 t3 + -> Hash + -> Foreign Scan on tenk1 t1 +(12 rows) + +--Testcase 323: +explain (costs off) +select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t1) t1 left join + ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t2) t2 join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t3) t3 on (t2.thousand)::int4 = (t3.unique2)::int4) + on (t1.hundred)::int4 = (t2.hundred)::int4 and (t1.ten)::int4 + (t2.ten)::int4 = (t3.ten)::int4 +where (t1.unique1)::int4 = 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Hash Right Join + Hash Cond: (((t2.fields ->> 'hundred'::text))::integer = ((t1.fields ->> 'hundred'::text))::integer) + Join Filter: ((((t1.fields ->> 'ten'::text))::integer + ((t2.fields ->> 'ten'::text))::integer) = ((t3.fields ->> 'ten'::text))::integer) + -> Merge Join + Merge Cond: ((((t2.fields ->> 'thousand'::text))::integer) = (((t3.fields ->> 'unique2'::text))::integer)) + -> Sort + Sort Key: (((t2.fields ->> 'thousand'::text))::integer) + -> Foreign Scan on tenk1 t2 + -> Sort + Sort Key: (((t3.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 t3 + -> Hash + -> Foreign Scan on tenk1 t1 +(13 rows) + +--Testcase 324: +explain (costs off) +select count(*) from + (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (a.unique1)::int4 = (b.unique2)::int4 + left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 c) c on (a.unique2)::int4 = (b.unique1)::int4 and (c.thousand)::int4 = (a.thousand)::int4 + join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (b.thousand)::int4 = (f1)::int4; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------- + Aggregate + -> Merge Join + Merge Cond: ((((int4_tbl.fields ->> 'f1'::text))::integer) = (((b.fields ->> 'thousand'::text))::integer)) + -> Sort + Sort Key: (((int4_tbl.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl + -> Sort + Sort Key: (((b.fields ->> 'thousand'::text))::integer) + -> Merge Left Join + Merge Cond: ((((a.fields ->> 'thousand'::text))::integer) = (((c.fields ->> 'thousand'::text))::integer)) + Join Filter: (((a.fields ->> 'unique2'::text))::integer = ((b.fields ->> 'unique1'::text))::integer) + -> Sort + Sort Key: (((a.fields ->> 'thousand'::text))::integer) + -> Merge Join + Merge Cond: ((((a.fields ->> 'unique1'::text))::integer) = (((b.fields ->> 'unique2'::text))::integer)) + -> Sort + Sort Key: (((a.fields ->> 'unique1'::text))::integer) + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: (((b.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 b + -> Sort + Sort Key: (((c.fields ->> 'thousand'::text))::integer) + -> Foreign Scan on tenk1 c +(24 rows) + +--Testcase 325: +select count(*) from + (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (a.unique1)::int4 = (b.unique2)::int4 + left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 c) c on (a.unique2)::int4 = (b.unique1)::int4 and (c.thousand)::int4 = (a.thousand)::int4 + join int4_tbl on (b.thousand)::int4 = (fields->>'f1')::int4; + count +------- + 10 +(1 row) + +--Testcase 326: +explain (costs off) +select (b.fields->>'unique1')::int4 unique1 from + tenk1 a join tenk1 b on (a.fields->>'unique1')::int4 = (b.fields->>'unique2')::int4 + left join tenk1 c on (b.fields->>'unique1')::int4 = 42 and (c.fields->>'thousand')::int4 = (a.fields->>'thousand')::int4 + join (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1 on (b.fields->>'thousand')::int4 = (f1)::int4 + right join int4_tbl i2 on (i2.fields->>'f1')::int4 = (b.fields->>'tenthous')::int4 + order by 1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Sort Key: (((b.fields ->> 'unique1'::text))::integer) + -> Merge Left Join + Merge Cond: ((((i2.fields ->> 'f1'::text))::integer) = (((b.fields ->> 'tenthous'::text))::integer)) + -> Sort + Sort Key: (((i2.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl i2 + -> Materialize + -> Sort + Sort Key: (((b.fields ->> 'tenthous'::text))::integer) + -> Merge Join + Merge Cond: ((((i1.fields ->> 'f1'::text))::integer) = (((b.fields ->> 'thousand'::text))::integer)) + -> Sort + Sort Key: (((i1.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl i1 + -> Sort + Sort Key: (((b.fields ->> 'thousand'::text))::integer) + -> Merge Left Join + Merge Cond: ((((a.fields ->> 'thousand'::text))::integer) = (((c.fields ->> 'thousand'::text))::integer)) + Join Filter: (((b.fields ->> 'unique1'::text))::integer = 42) + -> Sort + Sort Key: (((a.fields ->> 'thousand'::text))::integer) + -> Merge Join + Merge Cond: ((((a.fields ->> 'unique1'::text))::integer) = (((b.fields ->> 'unique2'::text))::integer)) + -> Sort + Sort Key: (((a.fields ->> 'unique1'::text))::integer) + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: (((b.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 b + -> Sort + Sort Key: (((c.fields ->> 'thousand'::text))::integer) + -> Foreign Scan on tenk1 c +(33 rows) + +--Testcase 327: +select (b.fields->>'unique1')::int4 unique1 from + tenk1 a join tenk1 b on (a.fields->>'unique1')::int4 = (b.fields->>'unique2')::int4 + left join tenk1 c on (b.fields->>'unique1')::int4 = 42 and (c.fields->>'thousand')::int4 = (a.fields->>'thousand')::int4 + join (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1 on (b.fields->>'thousand')::int4 = (f1)::int4 + right join int4_tbl i2 on (i2.fields->>'f1')::int4 = (b.fields->>'tenthous')::int4 + order by 1; + unique1 +--------- + 0 + + + + +(5 rows) + +--Testcase 328: +explain (costs off) +select * from +( + select unique1, q1, coalesce((unique1)::int4, -1) + (q1)::int8 as fault + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 on ((q2)::int8 = (unique2)::int4) +) ss +where fault = 122 +order by fault; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------- + Merge Left Join + Merge Cond: ((((int8_tbl.fields ->> 'q2'::text))::bigint) = (((tenk1.fields ->> 'unique2'::text))::integer)) + Filter: ((COALESCE(((tenk1.fields ->> 'unique1'::text))::integer, '-1'::integer) + ((int8_tbl.fields ->> 'q1'::text))::bigint) = 122) + -> Sort + Sort Key: (((int8_tbl.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on int8_tbl + -> Sort + Sort Key: (((tenk1.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 +(9 rows) + +--Testcase 329: +select * from +( + select unique1, q1, coalesce((unique1)::int4, -1) + (q1)::int8 as fault + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 on ((q2)::int8 = (unique2)::int4) +) ss +where fault = 122 +order by fault; + unique1 | q1 | fault +---------+-----+------- + | 123 | 122 +(1 row) + +--Testcase 330: +explain (costs off) +select * from +(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) +left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x +left join unnest(v1ys) as u1(u1y) on u1y = v2y; + QUERY PLAN +------------------------------------------------------------- + Nested Loop Left Join + -> Values Scan on "*VALUES*" + -> Hash Right Join + Hash Cond: (u1.u1y = "*VALUES*_1".column2) + Filter: ("*VALUES*_1".column1 = "*VALUES*".column1) + -> Function Scan on unnest u1 + -> Hash + -> Values Scan on "*VALUES*_1" +(8 rows) + +--Testcase 331: +select * from +(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) +left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x +left join unnest(v1ys) as u1(u1y) on u1y = v2y; + v1x | v1ys | v2x | v2y | u1y +-----+---------+-----+-----+----- + 1 | {10,20} | 1 | 10 | 10 + 2 | {20,30} | 2 | 20 | 20 +(2 rows) + +-- +-- test handling of potential equivalence clauses above outer joins +-- +--Testcase 332: +explain (costs off) +select q1, unique2, thousand, hundred + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (q1)::int8 = (unique2)::int4 + where coalesce((thousand)::int4,123) = (q1)::int8 and (q1)::int8 = coalesce((hundred)::int4,123); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Merge Left Join + Merge Cond: ((((a.fields ->> 'q1'::text))::bigint) = (((b.fields ->> 'unique2'::text))::integer)) + Filter: ((COALESCE(((b.fields ->> 'thousand'::text))::integer, 123) = (((a.fields ->> 'q1'::text))::bigint)) AND ((((a.fields ->> 'q1'::text))::bigint) = COALESCE(((b.fields ->> 'hundred'::text))::integer, 123))) + -> Sort + Sort Key: (((a.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on int8_tbl a + -> Sort + Sort Key: (((b.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 b +(9 rows) + +--Testcase 333: +select q1, unique2, thousand, hundred + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (q1)::int8 = (unique2)::int4 + where coalesce((thousand)::int4,123) = (q1)::int8 and (q1)::int8 = coalesce((hundred)::int4,123); + q1 | unique2 | thousand | hundred +----+---------+----------+--------- +(0 rows) + +--Testcase 334: +explain (costs off) +select f1, unique2, case when (unique2)::int4 is null then (f1)::int4 else 0 end + from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 + where (case when (unique2)::int4 is null then (f1)::int4 else 0 end) = 0; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------- + Merge Left Join + Merge Cond: ((((a.fields ->> 'f1'::text))::integer) = (((b.fields ->> 'unique2'::text))::integer)) + Filter: (CASE WHEN (((b.fields ->> 'unique2'::text))::integer IS NULL) THEN (((a.fields ->> 'f1'::text))::integer) ELSE 0 END = 0) + -> Sort + Sort Key: (((a.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl a + -> Sort + Sort Key: (((b.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 b +(9 rows) + +--Testcase 335: +select f1, unique2, case when (unique2)::int4 is null then (f1)::int4 else 0 end + from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 + where (case when (unique2)::int4 is null then (f1)::int4 else 0 end) = 0; + f1 | unique2 | case +----+---------+------ + 0 | 0 | 0 +(1 row) + +-- +-- another case with equivalence clauses above outer joins (bug #8591) +-- +--Testcase 336: +explain (costs off) +select (a.fields->>'unique1')::int4 unique1, (b.fields->>'unique1')::int4 unique1, (c.fields->>'unique1')::int4 unique1, coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) + from tenk1 a left join tenk1 b on (b.fields->>'thousand')::int4 = (a.fields->>'unique1')::int4 left join tenk1 c on (c.fields->>'unique2')::int4 = coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) + where (a.fields->>'unique2')::int4 < 10 and coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) = 44; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Left Join + Hash Cond: (COALESCE(((b.fields ->> 'twothousand'::text))::integer, ((a.fields ->> 'twothousand'::text))::integer) = ((c.fields ->> 'unique2'::text))::integer) + -> Merge Left Join + Merge Cond: ((((a.fields ->> 'unique1'::text))::integer) = (((b.fields ->> 'thousand'::text))::integer)) + Filter: (COALESCE(((b.fields ->> 'twothousand'::text))::integer, ((a.fields ->> 'twothousand'::text))::integer) = 44) + -> Sort + Sort Key: (((a.fields ->> 'unique1'::text))::integer) + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: (((b.fields ->> 'thousand'::text))::integer) + -> Foreign Scan on tenk1 b + -> Hash + -> Foreign Scan on tenk1 c +(13 rows) + +--Testcase 337: +select (a.fields->>'unique1')::int4 unique1, (b.fields->>'unique1')::int4 unique1, (c.fields->>'unique1')::int4 unique1, coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) + from tenk1 a left join tenk1 b on (b.fields->>'thousand')::int4 = (a.fields->>'unique1')::int4 left join tenk1 c on (c.fields->>'unique2')::int4 = coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) + where (a.fields->>'unique2')::int4 < 10 and coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) = 44; + unique1 | unique1 | unique1 | coalesce +---------+---------+---------+---------- +(0 rows) + +-- +-- check handling of join aliases when flattening multiple levels of subquery +-- +--Testcase 338: +explain (verbose, costs off) +select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from + (values (0),(1)) foo1(join_key) +left join + (select join_key, bug_field from + (select ss1.join_key, ss1.bug_field from + (select (fields->>'f1')::int4 as join_key, 666 as bug_field from int4_tbl i1) ss1 + ) foo2 + left join + (select (fields->>'unique2')::int4 as join_key from tenk1 i2) ss2 + using (join_key) + ) foo3 +using (join_key); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Hash Right Join + Output: "*VALUES*".column1, ((i1.fields ->> 'f1'::text))::integer, (666) + Hash Cond: (((i1.fields ->> 'f1'::text))::integer = "*VALUES*".column1) + -> Merge Left Join + Output: i1.fields, 666 + Merge Cond: ((((i1.fields ->> 'f1'::text))::integer) = (((i2.fields ->> 'unique2'::text))::integer)) + -> Sort + Output: i1.fields, (((i1.fields ->> 'f1'::text))::integer) + Sort Key: (((i1.fields ->> 'f1'::text))::integer) + -> Foreign Scan on public.int4_tbl i1 + Output: i1.fields, ((i1.fields ->> 'f1'::text))::integer + InfluxDB query: SELECT * FROM "int4_tbl" + -> Sort + Output: i2.fields, (((i2.fields ->> 'unique2'::text))::integer) + Sort Key: (((i2.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on public.tenk1 i2 + Output: i2.fields, ((i2.fields ->> 'unique2'::text))::integer + InfluxDB query: SELECT * FROM "tenk" + -> Hash + Output: "*VALUES*".column1 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1 +(22 rows) + +--Testcase 339: +select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from + (values (0),(1)) foo1(join_key) +left join + (select join_key, bug_field from + (select ss1.join_key, ss1.bug_field from + (select (fields->>'f1')::int4 as join_key, 666 as bug_field from int4_tbl i1) ss1 + ) foo2 + left join + (select (fields->>'unique2')::int4 as join_key from tenk1 i2) ss2 + using (join_key) + ) foo3 +using (join_key); + foo1_id | foo3_id | bug_field +---------+---------+----------- + 0 | 0 | 666 + 1 | | +(2 rows) + +-- +-- test successful handling of nested outer joins with degenerate join quals +-- +--Testcase 340: +create foreign table text_tbl(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 341: +explain (verbose, costs off) +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 + left join int8_tbl i8 + left join (select *, null::int as d2 from int8_tbl i8b2) b2 + on ((i8.fields->>'q1')::int8 = (b2.fields->>'q1')::int8) + on ((b2.d2)::int8 = (b1.fields->>'q2')::int8) + on (t1.f1 = b1.d1) + left join int4_tbl i4 + on ((i8.fields->>'q2')::int8 = (i4.fields->>'f1')::int4); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Merge Right Join + Output: (t1.fields ->> 'f1'::text) + Merge Cond: ((((i4.fields ->> 'f1'::text))::integer) = (((i8.fields ->> 'q2'::text))::bigint)) + -> Sort + Output: i4.fields, (((i4.fields ->> 'f1'::text))::integer) + Sort Key: (((i4.fields ->> 'f1'::text))::integer) + -> Foreign Scan on public.int4_tbl i4 + Output: i4.fields, ((i4.fields ->> 'f1'::text))::integer + InfluxDB query: SELECT * FROM "int4_tbl" + -> Materialize + Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) + -> Sort + Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) + Sort Key: (((i8.fields ->> 'q2'::text))::bigint) + -> Nested Loop Left Join + Output: t1.fields, i8.fields, ((i8.fields ->> 'q2'::text))::bigint + Join Filter: ((t1.fields ->> 'f1'::text) = '***'::text) + -> Foreign Scan on public.text_tbl t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "text_tbl" + -> Materialize + Output: i8.fields + -> Merge Left Join + Output: i8.fields + Merge Cond: ((((i8b1.fields ->> 'q2'::text))::bigint) = (((NULL::integer))::bigint)) + -> Sort + Output: i8b1.fields, (((i8b1.fields ->> 'q2'::text))::bigint) + Sort Key: (((i8b1.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl i8b1 + Output: i8b1.fields, ((i8b1.fields ->> 'q2'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Sort + Output: i8.fields, (NULL::integer), (((NULL::integer))::bigint) + Sort Key: (((NULL::integer))::bigint) + -> Merge Join + Output: i8.fields, (NULL::integer), ((NULL::integer))::bigint + Merge Cond: ((((i8b2.fields ->> 'q1'::text))::bigint) = (((i8.fields ->> 'q1'::text))::bigint)) + -> Sort + Output: i8b2.fields, (NULL::integer), (((i8b2.fields ->> 'q1'::text))::bigint) + Sort Key: (((i8b2.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on public.int8_tbl i8b2 + Output: i8b2.fields, NULL::integer, ((i8b2.fields ->> 'q1'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Sort + Output: i8.fields, (((i8.fields ->> 'q1'::text))::bigint) + Sort Key: (((i8.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on public.int8_tbl i8 + Output: i8.fields, ((i8.fields ->> 'q1'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" +(49 rows) + +--Testcase 342: +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 + left join int8_tbl i8 + left join (select *, null::int as d2 from int8_tbl i8b2) b2 + on ((i8.fields->>'q1')::int8 = (b2.fields->>'q1')::int8) + on ((b2.d2)::int8 = (b1.fields->>'q2')::int8) + on (t1.f1 = b1.d1) + left join int4_tbl i4 + on ((i8.fields->>'q2')::int8 = (i4.fields->>'f1')::int4); + f1 +------------------- + doh! + hi de ho neighbor +(2 rows) + +--Testcase 343: +explain (verbose, costs off) +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1 ) b1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2) b2 + on ((i8.q1)::int8 = (b2.q1)::int8) + on ((b2.d2)::int8 = (b1.q2)::int8) + on (t1.f1 = b1.d1) + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on ((i8.q2)::int8 = (i4.f1)::int4); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------- + Merge Right Join + Output: (t1.fields ->> 'f1'::text) + Merge Cond: ((((i4.fields ->> 'f1'::text))::integer) = (((i8.fields ->> 'q2'::text))::bigint)) + -> Sort + Output: i4.fields, (((i4.fields ->> 'f1'::text))::integer) + Sort Key: (((i4.fields ->> 'f1'::text))::integer) + -> Foreign Scan on public.int4_tbl i4 + Output: i4.fields, ((i4.fields ->> 'f1'::text))::integer + InfluxDB query: SELECT * FROM "int4_tbl" + -> Materialize + Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) + -> Sort + Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) + Sort Key: (((i8.fields ->> 'q2'::text))::bigint) + -> Nested Loop Left Join + Output: t1.fields, i8.fields, ((i8.fields ->> 'q2'::text))::bigint + Join Filter: ((t1.fields ->> 'f1'::text) = '***'::text) + -> Foreign Scan on public.text_tbl t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "text_tbl" + -> Materialize + Output: i8.fields + -> Merge Left Join + Output: i8.fields + Merge Cond: ((((i8b1.fields ->> 'q2'::text))::bigint) = (((NULL::integer))::bigint)) + -> Sort + Output: i8b1.fields, (((i8b1.fields ->> 'q2'::text))::bigint) + Sort Key: (((i8b1.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl i8b1 + Output: i8b1.fields, ((i8b1.fields ->> 'q2'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Materialize + Output: i8.fields, (NULL::integer), (((NULL::integer))::bigint) + -> Sort + Output: i8.fields, (NULL::integer), (((NULL::integer))::bigint) + Sort Key: (((NULL::integer))::bigint) + -> Merge Left Join + Output: i8.fields, (NULL::integer), ((NULL::integer))::bigint + Merge Cond: ((((i8.fields ->> 'q1'::text))::bigint) = (((i8b2.fields ->> 'q1'::text))::bigint)) + -> Sort + Output: i8.fields, (((i8.fields ->> 'q1'::text))::bigint) + Sort Key: (((i8.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on public.int8_tbl i8 + Output: i8.fields, ((i8.fields ->> 'q1'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Materialize + Output: i8b2.fields, (NULL::integer), (((i8b2.fields ->> 'q1'::text))::bigint) + -> Sort + Output: i8b2.fields, (NULL::integer), (((i8b2.fields ->> 'q1'::text))::bigint) + Sort Key: (((i8b2.fields ->> 'q1'::text))::bigint) + -> Nested Loop + Output: i8b2.fields, NULL::integer, ((i8b2.fields ->> 'q1'::text))::bigint + -> Foreign Scan on public.int4_tbl i4b2 + Output: i4b2.fields + InfluxDB query: SELECT * FROM "int4_tbl" + -> Materialize + Output: i8b2.fields + -> Foreign Scan on public.int8_tbl i8b2 + Output: i8b2.fields + InfluxDB query: SELECT * FROM "int8_tbl" +(60 rows) + +--Testcase 344: +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2) b2 + on ((i8.q1)::int8 = (b2.q1)::int8) + on ((b2.d2)::int8 = (b1.q2)::int8) + on (t1.f1 = b1.d1) + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on ((i8.q2)::int8 = (i4.f1)::int4); + f1 +------------------- + doh! + hi de ho neighbor +(2 rows) + +--Testcase 345: +explain (verbose, costs off) +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2 + where (q1)::int8 = (f1)::int8) b2 + on ((i8.q1)::int8 = (b2.q1)::int8) + on ((b2.d2)::int8 = (b1.q2)::int8) + on (t1.f1 = b1.d1) + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on ((i8.q2)::int8 = (i4.f1)::int4); + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Merge Right Join + Output: (t1.fields ->> 'f1'::text) + Merge Cond: ((((i4.fields ->> 'f1'::text))::integer) = (((i8.fields ->> 'q2'::text))::bigint)) + -> Sort + Output: i4.fields, (((i4.fields ->> 'f1'::text))::integer) + Sort Key: (((i4.fields ->> 'f1'::text))::integer) + -> Foreign Scan on public.int4_tbl i4 + Output: i4.fields, ((i4.fields ->> 'f1'::text))::integer + InfluxDB query: SELECT * FROM "int4_tbl" + -> Materialize + Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) + -> Sort + Output: t1.fields, i8.fields, (((i8.fields ->> 'q2'::text))::bigint) + Sort Key: (((i8.fields ->> 'q2'::text))::bigint) + -> Nested Loop Left Join + Output: t1.fields, i8.fields, ((i8.fields ->> 'q2'::text))::bigint + Join Filter: ((t1.fields ->> 'f1'::text) = '***'::text) + -> Foreign Scan on public.text_tbl t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "text_tbl" + -> Materialize + Output: i8.fields + -> Merge Left Join + Output: i8.fields + Merge Cond: ((((i8b1.fields ->> 'q2'::text))::bigint) = (((NULL::integer))::bigint)) + -> Sort + Output: i8b1.fields, (((i8b1.fields ->> 'q2'::text))::bigint) + Sort Key: (((i8b1.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl i8b1 + Output: i8b1.fields, ((i8b1.fields ->> 'q2'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Materialize + Output: i8.fields, (NULL::integer), (((NULL::integer))::bigint) + -> Sort + Output: i8.fields, (NULL::integer), (((NULL::integer))::bigint) + Sort Key: (((NULL::integer))::bigint) + -> Merge Left Join + Output: i8.fields, (NULL::integer), ((NULL::integer))::bigint + Merge Cond: ((((i8.fields ->> 'q1'::text))::bigint) = ((i8b2.fields ->> 'q1'::text))::bigint) + -> Sort + Output: i8.fields, (((i8.fields ->> 'q1'::text))::bigint) + Sort Key: (((i8.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on public.int8_tbl i8 + Output: i8.fields, ((i8.fields ->> 'q1'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Materialize + Output: i8b2.fields, (NULL::integer) + -> Merge Join + Output: i8b2.fields, NULL::integer + Merge Cond: ((((i8b2.fields ->> 'q1'::text))::bigint) = ((((i4b2.fields ->> 'f1'::text))::integer)::bigint)) + -> Sort + Output: i8b2.fields, (((i8b2.fields ->> 'q1'::text))::bigint) + Sort Key: (((i8b2.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on public.int8_tbl i8b2 + Output: i8b2.fields, ((i8b2.fields ->> 'q1'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Sort + Output: i4b2.fields, ((((i4b2.fields ->> 'f1'::text))::integer)::bigint) + Sort Key: ((((i4b2.fields ->> 'f1'::text))::integer)::bigint) + -> Foreign Scan on public.int4_tbl i4b2 + Output: i4b2.fields, (((i4b2.fields ->> 'f1'::text))::integer)::bigint + InfluxDB query: SELECT * FROM "int4_tbl" +(62 rows) + +--Testcase 346: +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2 + where (q1)::int8 = (f1)::int8) b2 + on ((i8.q1)::int8 = (b2.q1)::int8) + on ((b2.d2)::int8 = (b1.q2)::int8) + on (t1.f1 = b1.d1) + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on ((i8.q2)::int8 = (i4.f1)::int4); + f1 +------------------- + doh! + hi de ho neighbor +(2 rows) + +--Testcase 347: +explain (verbose, costs off) +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + inner join (select (fields->>'q1')::int8 q1, fields->>'q2' q2 from INT8_TBL i8) i8 + on (i8.q2)::bigint = 456 + right join (select fields->>'f1' f1 from text_tbl t2) t2 + on t1.f1 = 'doh!' + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on i8.q1 = i4.f1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop Left Join + Output: (t1.fields ->> 'f1'::text), ((i8.fields ->> 'q1'::text))::bigint, (i8.fields ->> 'q2'::text), (t2.fields ->> 'f1'::text), ((i4.fields ->> 'f1'::text))::integer + -> Foreign Scan on public.text_tbl t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "text_tbl" + -> Materialize + Output: i8.fields, i4.fields, t1.fields + -> Nested Loop + Output: i8.fields, i4.fields, t1.fields + -> Hash Right Join + Output: i8.fields, i4.fields + Hash Cond: (((i4.fields ->> 'f1'::text))::integer = ((i8.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on public.int4_tbl i4 + Output: i4.fields + InfluxDB query: SELECT * FROM "int4_tbl" + -> Hash + Output: i8.fields + -> Foreign Scan on public.int8_tbl i8 + Output: i8.fields + InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q2" = 456)) + -> Materialize + Output: t1.fields + -> Foreign Scan on public.text_tbl t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "text_tbl" WHERE (("f1" = 'doh!')) +(25 rows) + +--Testcase 348: +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + inner join (select (fields->>'q1')::int8 q1, fields->>'q2' q2 from INT8_TBL i8) i8 + on (i8.q2)::bigint = 456 + right join (select fields->>'f1' f1 from text_tbl t2) t2 + on t1.f1 = 'doh!' + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on i8.q1 = i4.f1; + f1 | q1 | q2 | f1 | f1 +------+-----+-----+-------------------+---- + doh! | 123 | 456 | doh! | + doh! | 123 | 456 | hi de ho neighbor | +(2 rows) + +-- +-- test for appropriate join order in the presence of lateral references +-- +--Testcase 349: +explain (verbose, costs off) +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + on (i8.q2)::int8 = 123, + lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss +where t1.f1 = ss.f1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Output: (t1.fields ->> 'f1'::text), ((i8.fields ->> 'q1'::text))::bigint, ((i8.fields ->> 'q2'::text))::bigint, (((i8.fields ->> 'q1'::text))::bigint), ((t2.fields ->> 'f1'::text)) + Join Filter: ((t1.fields ->> 'f1'::text) = ((t2.fields ->> 'f1'::text))) + -> Nested Loop Left Join + Output: t1.fields, i8.fields + -> Foreign Scan on public.text_tbl t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "text_tbl" + -> Materialize + Output: i8.fields + -> Foreign Scan on public.int8_tbl i8 + Output: i8.fields + InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q2" = 123)) + -> Foreign Scan on public.text_tbl t2 + Output: ((i8.fields ->> 'q1'::text))::bigint, (t2.fields ->> 'f1'::text) + InfluxDB query: SELECT "f1" FROM "text_tbl" LIMIT 1 +(16 rows) + +--Testcase 350: +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + on (i8.q2)::int8 = 123, + lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss +where t1.f1 = ss.f1; + f1 | q1 | q2 | q1 | f1 +------+------------------+-----+------------------+------ + doh! | 4567890123456789 | 123 | 4567890123456789 | doh! +(1 row) + +--Testcase 351: +explain (verbose, costs off) +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + on (i8.q2)::bigint = 123, + lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss1, + lateral (select ss1.* from text_tbl t3 limit 1) as ss2 +where t1.f1 = ss2.f1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Nested Loop + Output: (t1.fields ->> 'f1'::text), ((i8.fields ->> 'q1'::text))::bigint, ((i8.fields ->> 'q2'::text))::bigint, (((i8.fields ->> 'q1'::text))::bigint), ((t2.fields ->> 'f1'::text)), ((((i8.fields ->> 'q1'::text))::bigint)), (((t2.fields ->> 'f1'::text))) + Join Filter: ((t1.fields ->> 'f1'::text) = (((t2.fields ->> 'f1'::text)))) + -> Nested Loop + Output: t1.fields, i8.fields, (((i8.fields ->> 'q1'::text))::bigint), ((t2.fields ->> 'f1'::text)) + -> Nested Loop Left Join + Output: t1.fields, i8.fields + -> Foreign Scan on public.text_tbl t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "text_tbl" + -> Materialize + Output: i8.fields + -> Foreign Scan on public.int8_tbl i8 + Output: i8.fields + InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q2" = 123)) + -> Foreign Scan on public.text_tbl t2 + Output: ((i8.fields ->> 'q1'::text))::bigint, (t2.fields ->> 'f1'::text) + InfluxDB query: SELECT "f1" FROM "text_tbl" LIMIT 1 + -> Foreign Scan on public.text_tbl t3 + Output: (((i8.fields ->> 'q1'::text))::bigint), ((t2.fields ->> 'f1'::text)) + InfluxDB query: SELECT * FROM "text_tbl" LIMIT 1 +(21 rows) + +--Testcase 352: +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + on (i8.q2)::bigint = 123, + lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss1, + lateral (select ss1.* from text_tbl t3 limit 1) as ss2 +where t1.f1 = ss2.f1; + f1 | q1 | q2 | q1 | f1 | q1 | f1 +------+------------------+-----+------------------+------+------------------+------ + doh! | 4567890123456789 | 123 | 4567890123456789 | doh! | 4567890123456789 | doh! +(1 row) + +--Testcase 353: +explain (verbose, costs off) +select 1 from + text_tbl as tt1 + inner join text_tbl as tt2 on (tt1.fields->>'f1' = 'foo') + left join text_tbl as tt3 on (tt3.fields->>'f1' = 'foo') + left join text_tbl as tt4 on (tt3.fields->>'f1' = tt4.fields->>'f1'), + lateral (select tt4.fields->>'f1' as c0 from text_tbl as tt5 limit 1) as ss1 +where tt1.fields->>'f1' = ss1.c0; + QUERY PLAN +------------------------------------------------------------------------------------------- + Nested Loop + Output: 1 + -> Nested Loop Left Join + Output: tt1.fields, tt4.fields + -> Nested Loop + Output: tt1.fields + -> Foreign Scan on public.text_tbl tt2 + Output: tt2.fields + InfluxDB query: SELECT * FROM "text_tbl" + -> Materialize + Output: tt1.fields + -> Foreign Scan on public.text_tbl tt1 + Output: tt1.fields + InfluxDB query: SELECT * FROM "text_tbl" WHERE (("f1" = 'foo')) + -> Hash Left Join + Output: tt4.fields + Hash Cond: ((tt3.fields ->> 'f1'::text) = (tt4.fields ->> 'f1'::text)) + -> Foreign Scan on public.text_tbl tt3 + Output: tt3.fields + InfluxDB query: SELECT * FROM "text_tbl" WHERE (("f1" = 'foo')) + -> Hash + Output: tt4.fields + -> Foreign Scan on public.text_tbl tt4 + Output: tt4.fields + InfluxDB query: SELECT * FROM "text_tbl" WHERE (("f1" = 'foo')) + -> Subquery Scan on ss1 + Output: ss1.c0 + Filter: (ss1.c0 = 'foo'::text) + -> Foreign Scan on public.text_tbl tt5 + Output: (tt4.fields ->> 'f1'::text) + InfluxDB query: SELECT * FROM "text_tbl" LIMIT 1 +(31 rows) + +--Testcase 354: +select 1 from + text_tbl as tt1 + inner join text_tbl as tt2 on (tt1.fields->>'f1' = 'foo') + left join text_tbl as tt3 on (tt3.fields->>'f1' = 'foo') + left join text_tbl as tt4 on (tt3.fields->>'f1' = tt4.fields->>'f1'), + lateral (select tt4.fields->>'f1' as c0 from text_tbl as tt5 limit 1) as ss1 +where tt1.fields->>'f1' = ss1.c0; + ?column? +---------- +(0 rows) + +-- +-- check a case in which a PlaceHolderVar forces join order +-- +--Testcase 355: +explain (verbose, costs off) +select ss2.* from + (select (fields->>'f1')::int4 f1 from INT4_TBL) i41 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) i8 + join (select i42.fields->>'f1' as c1, i43.fields->>'f1' as c2, 42 as c3 + from int4_tbl i42, int4_tbl i43) ss1 + on (i8.q1)::int8 = (ss1.c2)::int8 + on (i41.f1)::int4 = (ss1.c1)::int4, + lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 +where (ss1.c2)::int8 = 0; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Output: (((int4_tbl.fields ->> 'f1'::text))::integer), (((int8_tbl.fields ->> 'q1'::text))::bigint), (((int8_tbl.fields ->> 'q2'::text))::bigint), ((i42.fields ->> 'f1'::text)), ((i43.fields ->> 'f1'::text)), ((42)) + -> Nested Loop + Output: int4_tbl.fields, i42.fields, int8_tbl.fields, i43.fields, 42 + -> Nested Loop + Output: int4_tbl.fields, i42.fields, int8_tbl.fields + -> Merge Join + Output: int4_tbl.fields, i42.fields + Merge Cond: ((((int4_tbl.fields ->> 'f1'::text))::integer) = (((i42.fields ->> 'f1'::text))::integer)) + -> Sort + Output: int4_tbl.fields, (((int4_tbl.fields ->> 'f1'::text))::integer) + Sort Key: (((int4_tbl.fields ->> 'f1'::text))::integer) + -> Foreign Scan on public.int4_tbl + Output: int4_tbl.fields, ((int4_tbl.fields ->> 'f1'::text))::integer + InfluxDB query: SELECT * FROM "int4_tbl" + -> Sort + Output: i42.fields, (((i42.fields ->> 'f1'::text))::integer) + Sort Key: (((i42.fields ->> 'f1'::text))::integer) + -> Foreign Scan on public.int4_tbl i42 + Output: i42.fields, ((i42.fields ->> 'f1'::text))::integer + InfluxDB query: SELECT * FROM "int4_tbl" + -> Materialize + Output: int8_tbl.fields + -> Foreign Scan on public.int8_tbl + Output: int8_tbl.fields + InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q1" = 0)) + -> Materialize + Output: i43.fields + -> Foreign Scan on public.int4_tbl i43 + Output: i43.fields + InfluxDB query: SELECT * FROM "int4_tbl" WHERE (("f1" = 0)) + -> Foreign Scan on public.text_tbl + Output: ((int4_tbl.fields ->> 'f1'::text))::integer, ((int8_tbl.fields ->> 'q1'::text))::bigint, ((int8_tbl.fields ->> 'q2'::text))::bigint, (i42.fields ->> 'f1'::text), (i43.fields ->> 'f1'::text), (42) + InfluxDB query: SELECT * FROM "text_tbl" LIMIT 1 +(34 rows) + +--Testcase 356: +select ss2.* from + (select (fields->>'f1')::int4 f1 from INT4_TBL) i41 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) i8 + join (select i42.fields->>'f1' as c1, i43.fields->>'f1' as c2, 42 as c3 + from int4_tbl i42, int4_tbl i43) ss1 + on (i8.q1)::int8 = (ss1.c2)::int8 + on (i41.f1)::int4 = (ss1.c1)::int4, + lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 +where (ss1.c2)::int8 = 0; + f1 | q1 | q2 | c1 | c2 | c3 +----+----+----+----+----+---- +(0 rows) + +-- +-- test successful handling of full join underneath left join (bug #14105) +-- +--Testcase 357: +explain (costs off) +select * from + (select 1 as id) as xx + left join + ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a1) as a1 full join (select 1 as id) as yy on ((a1.unique1)::int4 = yy.id)) + on (xx.id = coalesce(yy.id)); + QUERY PLAN +----------------------------------------------------------------------- + Nested Loop Left Join + -> Result + -> Hash Full Join + Hash Cond: (((a1.fields ->> 'unique1'::text))::integer = (1)) + Filter: (1 = COALESCE((1))) + -> Foreign Scan on tenk1 a1 + -> Hash + -> Result +(8 rows) + +--Testcase 358: +select * from + (select 1 as id) as xx + left join + ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) as a1 full join (select 1 as id) as yy on ((a1.unique1)::int4 = yy.id)) + on (xx.id = coalesce(yy.id)); + id | unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 | id +----+---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------+---- + 1 | 1 | 2838 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | EFEAAA | OOOOxx | 1 +(1 row) + +-- +-- test ability to push constants through outer join clauses +-- +--Testcase 359: +explain (costs off) + select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 where (f1)::int4 = 0; + QUERY PLAN +------------------------------------------------------------------------------------------------- + Hash Left Join + Hash Cond: (((a.fields ->> 'f1'::text))::integer = ((b.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on int4_tbl a + -> Hash + -> Foreign Scan on tenk1 b +(5 rows) + +--Testcase 360: +explain (costs off) + select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a full join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b using(unique2) where (unique2)::int4 = 42; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Hash Full Join + Hash Cond: (((a.fields ->> 'unique2'::text))::integer = ((b.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 a + -> Hash + -> Foreign Scan on tenk1 b +(5 rows) + +-- +-- test that quals attached to an outer join have correct semantics, +-- specifically that they don't re-use expressions computed below the join; +-- we force a mergejoin so that coalesce(b.q1, 1) appears as a join input +-- +--Testcase 361: +set enable_hashjoin to off; +--Testcase 362: +set enable_nestloop to off; +--Testcase 363: +explain (verbose, costs off) + select (a.fields->>'q2')::int8 q2, (b.fields->>'q1')::int8 q1 + from int8_tbl a left join int8_tbl b on (a.fields->>'q2')::int8 = coalesce((b.fields->>'q1')::int8, 1) + where coalesce((b.fields->>'q1')::int8, 1) > 0; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------- + Merge Left Join + Output: (((a.fields ->> 'q2'::text))::bigint), ((b.fields ->> 'q1'::text))::bigint + Merge Cond: ((((a.fields ->> 'q2'::text))::bigint) = (COALESCE(((b.fields ->> 'q1'::text))::bigint, '1'::bigint))) + Filter: (COALESCE(((b.fields ->> 'q1'::text))::bigint, '1'::bigint) > 0) + -> Sort + Output: a.fields, (((a.fields ->> 'q2'::text))::bigint) + Sort Key: (((a.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl a + Output: a.fields, ((a.fields ->> 'q2'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Sort + Output: b.fields, (COALESCE(((b.fields ->> 'q1'::text))::bigint, '1'::bigint)) + Sort Key: (COALESCE(((b.fields ->> 'q1'::text))::bigint, '1'::bigint)) + -> Foreign Scan on public.int8_tbl b + Output: b.fields, COALESCE(((b.fields ->> 'q1'::text))::bigint, '1'::bigint) + InfluxDB query: SELECT * FROM "int8_tbl" +(16 rows) + +--Testcase 364: +select (a.fields->>'q2')::int8 q2, (b.fields->>'q1')::int8 q1 + from int8_tbl a left join int8_tbl b on (a.fields->>'q2')::int8 = coalesce((b.fields->>'q1')::int8, 1) + where coalesce((b.fields->>'q1')::int8, 1) > 0; + q2 | q1 +-------------------+------------------ + -4567890123456789 | + 123 | 123 + 123 | 123 + 456 | + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 +(10 rows) + +--Testcase 365: +reset enable_hashjoin; +--Testcase 366: +reset enable_nestloop; +-- +-- test join removal +-- +begin; +--Testcase 367: +CREATE FOREIGN TABLE a (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 615: +CREATE FOREIGN TABLE a_nsc (id int, b_id int) SERVER influxdb_svr OPTIONS (table 'a'); +--Testcase 368: +CREATE FOREIGN TABLE b (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 616: +CREATE FOREIGN TABLE b_nsc (id int, c_id int) SERVER influxdb_svr OPTIONS (table 'b'); +--Testcase 369: +CREATE FOREIGN TABLE c (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 617: +CREATE FOREIGN TABLE c_nsc (id int) SERVER influxdb_svr OPTIONS (table 'c'); +--Testcase 370: +CREATE FOREIGN TABLE d (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 618: +CREATE FOREIGN TABLE d_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 'd'); +--Testcase 371: +INSERT INTO a_nsc VALUES (0, 0), (1, NULL); +--Testcase 372: +INSERT INTO b_nsc VALUES (0, 0), (1, NULL); +--Testcase 373: +INSERT INTO c_nsc VALUES (0), (1); +--Testcase 374: +INSERT INTO d_nsc VALUES (1,3), (2,2), (3,1); +-- all three cases should be optimizable into a simple seqscan +--Testcase 375: +explain (costs off) SELECT a.* FROM (select (fields->>'id')::int id, (fields->>'b_id')::int b_id from a) a LEFT JOIN (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b ON a.b_id = b.id; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Merge Left Join + Merge Cond: ((((a.fields ->> 'b_id'::text))::integer) = (((b.fields ->> 'id'::text))::integer)) + -> Sort + Sort Key: (((a.fields ->> 'b_id'::text))::integer) + -> Foreign Scan on a + -> Sort + Sort Key: (((b.fields ->> 'id'::text))::integer) + -> Foreign Scan on b +(8 rows) + +--Testcase 376: +explain (costs off) SELECT b.* FROM (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b LEFT JOIN (select (fields->>'id')::int id from c) c ON b.c_id = c.id; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Merge Left Join + Merge Cond: ((((b.fields ->> 'c_id'::text))::integer) = (((c.fields ->> 'id'::text))::integer)) + -> Sort + Sort Key: (((b.fields ->> 'c_id'::text))::integer) + -> Foreign Scan on b + -> Sort + Sort Key: (((c.fields ->> 'id'::text))::integer) + -> Foreign Scan on c +(8 rows) + +--Testcase 377: +explain (costs off) + SELECT a.* FROM (select (fields->>'id')::int id, (fields->>'b_id')::int b_id from a) a LEFT JOIN ((select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b left join (select (fields->>'id')::int id from c) c on b.c_id = c.id) + ON (a.b_id = b.id); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Merge Right Join + Merge Cond: ((((c.fields ->> 'id'::text))::integer) = (((b.fields ->> 'c_id'::text))::integer)) + -> Sort + Sort Key: (((c.fields ->> 'id'::text))::integer) + -> Foreign Scan on c + -> Sort + Sort Key: (((b.fields ->> 'c_id'::text))::integer) + -> Merge Left Join + Merge Cond: ((((a.fields ->> 'b_id'::text))::integer) = (((b.fields ->> 'id'::text))::integer)) + -> Sort + Sort Key: (((a.fields ->> 'b_id'::text))::integer) + -> Foreign Scan on a + -> Sort + Sort Key: (((b.fields ->> 'id'::text))::integer) + -> Foreign Scan on b +(15 rows) + +-- check optimization of outer join within another special join +--Testcase 378: +explain (costs off) +select (fields->>'id')::int id from a where (fields->>'id')::int in ( + select (b.fields->>'id')::int from b left join c on (b.fields->>'id')::int = (c.fields->>'id')::int +); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------- + Hash Join + Hash Cond: (((a.fields ->> 'id'::text))::integer = ((b.fields ->> 'id'::text))::integer) + -> Foreign Scan on a + -> Hash + -> HashAggregate + Group Key: (((b.fields ->> 'id'::text))::integer) + -> Merge Left Join + Merge Cond: ((((b.fields ->> 'id'::text))::integer) = (((c.fields ->> 'id'::text))::integer)) + -> Sort + Sort Key: (((b.fields ->> 'id'::text))::integer) + -> Foreign Scan on b + -> Sort + Sort Key: (((c.fields ->> 'id'::text))::integer) + -> Foreign Scan on c +(14 rows) + +-- check that join removal works for a left join when joining a subquery +-- that is guaranteed to be unique by its GROUP BY clause +--Testcase 379: +explain (costs off) +select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b group by b.id, b.c_id) s + on (d.a)::int = (s.id)::int and (d.b)::int = (s.c_id)::int; + QUERY PLAN +------------------- + Foreign Scan on d +(1 row) + +-- similarly, but keying off a DISTINCT clause +--Testcase 380: +explain (costs off) +select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select distinct * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b) s + on (d.a)::int = (s.id)::int and (d.b)::int = (s.c_id)::int; + QUERY PLAN +------------------- + Foreign Scan on d +(1 row) + +-- join removal is not possible when the GROUP BY contains a column that is +-- not in the join condition. (Note: as of 9.6, we notice that b.id is a +-- primary key and so drop b.c_id from the GROUP BY of the resulting plan; +-- but this happens too late for join removal in the outer plan level.) +--Testcase 381: +explain (costs off) +select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b group by b.id, b.c_id) s + on (d.a)::int = (s.id)::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Merge Right Join + Merge Cond: (s.id = (((d.fields ->> 'a'::text))::integer)) + -> Sort + Sort Key: s.id + -> Subquery Scan on s + -> HashAggregate + Group Key: ((b.fields ->> 'id'::text))::integer, ((b.fields ->> 'c_id'::text))::integer + -> Foreign Scan on b + -> Sort + Sort Key: (((d.fields ->> 'a'::text))::integer) + -> Foreign Scan on d +(11 rows) + +-- similarly, but keying off a DISTINCT clause +--Testcase 382: +explain (costs off) +select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select distinct * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b) s + on (d.a)::int = (s.id)::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Merge Right Join + Merge Cond: (s.id = (((d.fields ->> 'a'::text))::integer)) + -> Sort + Sort Key: s.id + -> Subquery Scan on s + -> HashAggregate + Group Key: ((b.fields ->> 'id'::text))::integer, ((b.fields ->> 'c_id'::text))::integer + -> Foreign Scan on b + -> Sort + Sort Key: (((d.fields ->> 'a'::text))::integer) + -> Foreign Scan on d +(11 rows) + +-- check join removal works when uniqueness of the join condition is enforced +-- by a UNION +--Testcase 383: +explain (costs off) +select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select (fields->>'id')::int id from a union select (fields->>'id')::int id from b) s + on (d.a)::int = (s.id)::int; + QUERY PLAN +------------------- + Foreign Scan on d +(1 row) + +-- check join removal with a cross-type comparison operator +--Testcase 384: +explain (costs off) +select i8.* from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join (select (fields->>'f1')::int f1 from int4_tbl group by (fields->>'f1')::int) i4 + on (i8.q1)::int8 = (i4.f1)::int4; + QUERY PLAN +----------------------------- + Foreign Scan on int8_tbl i8 +(1 row) + +-- check join removal with lateral references +--Testcase 385: +explain (costs off) +select 1 from (select (a.fields->>'id')::int id FROM a left join b on (a.fields->>'b_id')::int = (b.fields->>'id')::int) q, + lateral generate_series(1, (q.id)::int) gs(i) where (q.id)::int = (gs.i)::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Merge Right Join + Merge Cond: ((((b.fields ->> 'id'::text))::integer) = (((a.fields ->> 'b_id'::text))::integer)) + -> Sort + Sort Key: (((b.fields ->> 'id'::text))::integer) + -> Foreign Scan on b + -> Sort + Sort Key: (((a.fields ->> 'b_id'::text))::integer) + -> Nested Loop + -> Foreign Scan on a + -> Function Scan on generate_series gs + Filter: (((a.fields ->> 'id'::text))::integer = i) +(11 rows) + +--Testcase 386: +DELETE FROM a_nsc; +--Testcase 387: +DELETE FROM b_nsc; +--Testcase 388: +DELETE FROM c_nsc; +--Testcase 389: +DELETE FROM d_nsc; +--Testcase 390: +DROP FOREIGN TABLE a; +--Testcase 619: +DROP FOREIGN TABLE a_nsc; +--Testcase 391: +DROP FOREIGN TABLE b; +--Testcase 620: +DROP FOREIGN TABLE b_nsc; +--Testcase 392: +DROP FOREIGN TABLE c; +--Testcase 621: +DROP FOREIGN TABLE c_nsc; +--Testcase 393: +DROP FOREIGN TABLE d; +--Testcase 622: +DROP FOREIGN TABLE d_nsc; +rollback; +--Testcase 394: +create foreign table parent (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 623: +create foreign table parent_nsc (k int, pd int) server influxdb_svr OPTIONS (table 'parent'); +--Testcase 395: +create foreign table child (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 624: +create foreign table child_nsc (k int, cd int) server influxdb_svr OPTIONS (table 'child'); +--Testcase 396: +insert into parent_nsc values (1, 10), (2, 20), (3, 30); +--Testcase 397: +insert into child_nsc values (1, 100), (4, 400); +-- this case is optimizable +--Testcase 398: +select p.* from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c on ((p.k)::int = (c.k)::int); + k | pd +---+---- + 1 | 10 + 2 | 20 + 3 | 30 +(3 rows) + +--Testcase 399: +explain (costs off) + select p.* from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c on ((p.k)::int = (c.k)::int); + QUERY PLAN +----------------------------------------------------------------------------------------------- + Merge Left Join + Merge Cond: ((((p.fields ->> 'k'::text))::integer) = (((c.fields ->> 'k'::text))::integer)) + -> Sort + Sort Key: (((p.fields ->> 'k'::text))::integer) + -> Foreign Scan on parent p + -> Sort + Sort Key: (((c.fields ->> 'k'::text))::integer) + -> Foreign Scan on child c +(8 rows) + +-- this case is not +--Testcase 400: +select p.*, linked from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p + left join (select c.*, true as linked from (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c) as ss + on (p.k = ss.k); + k | pd | linked +---+----+-------- + 1 | 10 | t + 2 | 20 | + 3 | 30 | +(3 rows) + +--Testcase 401: +explain (costs off) + select p.*, linked from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p + left join (select c.*, true as linked from (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c) as ss + on (p.k = ss.k); + QUERY PLAN +----------------------------------------------------------------------------------------------- + Merge Right Join + Merge Cond: ((((c.fields ->> 'k'::text))::integer) = (((p.fields ->> 'k'::text))::integer)) + -> Sort + Sort Key: (((c.fields ->> 'k'::text))::integer) + -> Foreign Scan on child c + -> Sort + Sort Key: (((p.fields ->> 'k'::text))::integer) + -> Foreign Scan on parent p +(8 rows) + +-- check for a 9.0rc1 bug: join removal breaks pseudoconstant qual handling +--Testcase 402: +select p.* from + (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int) + where (p.k)::int = 1 and (p.k)::int = 2; + k | pd +---+---- +(0 rows) + +--Testcase 403: +explain (costs off) +select p.* from + (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int) + where (p.k)::int = 1 and (p.k)::int = 2; + QUERY PLAN +-------------------------- + Result + One-Time Filter: false +(2 rows) + +--Testcase 404: +select p.* from + ((select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int)) join (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) x on (p.k)::int = (x.k)::int + where (p.k)::int = 1 and (p.k)::int = 2; + k | pd +---+---- +(0 rows) + +--Testcase 405: +explain (costs off) +select p.* from + ((select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int)) join (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) x on (p.k)::int = (x.k)::int + where (p.k)::int = 1 and (p.k)::int = 2; + QUERY PLAN +-------------------------- + Result + One-Time Filter: false +(2 rows) + +-- bug 5255: this is not optimizable by join removal +begin; +--Testcase 406: +CREATE FOREIGN TABLE a (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 625: +CREATE FOREIGN TABLE a_nsc (id int) SERVER influxdb_svr OPTIONS (table 'a'); +--Testcase 407: +CREATE FOREIGN TABLE b (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 626: +CREATE FOREIGN TABLE b_nsc (id int, a_id int) SERVER influxdb_svr OPTIONS (table 'b'); +--Testcase 408: +INSERT INTO a_nsc VALUES (0), (1); +--Testcase 409: +INSERT INTO b_nsc VALUES (0, 0), (1, NULL); +--Testcase 410: +SELECT * FROM (select (fields->>'id')::int id, (fields->>'a_id')::int a_id from b) b LEFT JOIN (select (fields->>'id')::int id from a) a ON ((b.a_id)::int = (a.id)::int) WHERE ((a.id)::int IS NULL OR (a.id)::int > 0); + id | a_id | id +----+------+---- + 1 | | +(1 row) + +--Testcase 411: +SELECT b.* FROM (select (fields->>'id')::int id, (fields->>'a_id')::int a_id from b) b LEFT JOIN (select (fields->>'id')::int id from a) a ON ((b.a_id)::int = (a.id)::int) WHERE ((a.id)::int IS NULL OR (a.id)::int > 0); + id | a_id +----+------ + 1 | +(1 row) + +--Testcase 412: +DELETE FROM a_nsc; +--Testcase 413: +DELETE FROM b_nsc; +--Testcase 414: +DROP FOREIGN TABLE a; +--Testcase 627: +DROP FOREIGN TABLE a_nsc; +--Testcase 415: +DROP FOREIGN TABLE b; +--Testcase 628: +DROP FOREIGN TABLE b_nsc; +rollback; +-- another join removal bug: this is not optimizable, either +begin; +--Testcase 416: +create foreign table innertab (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 629: +create foreign table innertab_nsc (id int8, dat1 int8) server influxdb_svr OPTIONS (table 'innertab'); +--Testcase 417: +insert into innertab_nsc values(123, 42); +--Testcase 418: +SELECT * FROM + (SELECT 1 AS x) ss1 + LEFT JOIN + (SELECT q1, q2, COALESCE(dat1, q1) AS y + FROM (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl LEFT JOIN (select (fields->>'id')::int id, (fields->>'dat1')::int dat1 from innertab) innertab ON (q2)::int8 = (id)::int) ss2 + ON true; + x | q1 | q2 | y +---+------------------+-------------------+------------------ + 1 | 4567890123456789 | -4567890123456789 | 4567890123456789 + 1 | 4567890123456789 | 123 | 42 + 1 | 123 | 456 | 123 + 1 | 123 | 4567890123456789 | 123 + 1 | 4567890123456789 | 4567890123456789 | 4567890123456789 +(5 rows) + +-- Clean up +--Testcase 630: +DELETE FROM innertab_nsc; +--Testcase 631: +DROP FOREIGN TABLE innertab; +--Testcase 632: +DROP FOREIGN TABLE innertab_nsc; +rollback; +-- another join removal bug: we must clean up correctly when removing a PHV +begin; +--Testcase 419: +create foreign table uniquetbl (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 420: +explain (costs off) +select t1.* from + (select fields->>'f1' f1 from uniquetbl t1) as t1 + left join (select *, '***'::text as d1 from (select fields->>'f1' f1 from uniquetbl uniquetbl) uniquetbl) t2 + on t1.f1 = t2.f1 + left join (select fields->>'f1' f1 from uniquetbl t3) t3 + on t2.d1 = t3.f1; + QUERY PLAN +------------------------------------------------------------------------------------------------ + Merge Right Join + Merge Cond: (((t3.fields ->> 'f1'::text)) = ('***'::text)) + -> Sort + Sort Key: ((t3.fields ->> 'f1'::text)) + -> Foreign Scan on uniquetbl t3 + -> Sort + Sort Key: ('***'::text) + -> Merge Right Join + Merge Cond: (((uniquetbl.fields ->> 'f1'::text)) = ((t1.fields ->> 'f1'::text))) + -> Sort + Sort Key: ((uniquetbl.fields ->> 'f1'::text)) + -> Foreign Scan on uniquetbl + -> Sort + Sort Key: ((t1.fields ->> 'f1'::text)) + -> Foreign Scan on uniquetbl t1 +(15 rows) + +--Testcase 421: +explain (costs off) +select t0.* +from + (select fields->>'f1' f1 from text_tbl t0) t0 + left join + (select case (t1.fields->>'ten')::int4 when 0 then 'doh!'::text else null::text end as case1, + t1.fields->>'stringu2' stringu2 + from tenk1 t1 + join int4_tbl i4 ON (i4.fields->>'f1')::int4 = (t1.fields->>'unique2')::int4 + left join uniquetbl u1 ON u1.fields->>'f1' = (t1.fields->>'string4')::name) ss + on t0.f1 = ss.case1 +where ss.stringu2 !~* ss.case1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Merge Right Join + Merge Cond: (((u1.fields ->> 'f1'::text)) = (((t1.fields ->> 'string4'::text))::name)) + -> Sort + Sort Key: ((u1.fields ->> 'f1'::text)) + -> Foreign Scan on uniquetbl u1 + -> Materialize + -> Sort + Sort Key: (((t1.fields ->> 'string4'::text))::name) COLLATE "default" + -> Merge Join + Merge Cond: (((t0.fields ->> 'f1'::text)) = (CASE ((t1.fields ->> 'ten'::text))::integer WHEN 0 THEN 'doh!'::text ELSE NULL::text END)) + -> Sort + Sort Key: ((t0.fields ->> 'f1'::text)) + -> Foreign Scan on text_tbl t0 + -> Sort + Sort Key: (CASE ((t1.fields ->> 'ten'::text))::integer WHEN 0 THEN 'doh!'::text ELSE NULL::text END) + -> Merge Join + Merge Cond: ((((t1.fields ->> 'unique2'::text))::integer) = (((i4.fields ->> 'f1'::text))::integer)) + -> Sort + Sort Key: (((t1.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 t1 + Filter: ((fields ->> 'stringu2'::text) !~* CASE ((fields ->> 'ten'::text))::integer WHEN 0 THEN 'doh!'::text ELSE NULL::text END) + -> Sort + Sort Key: (((i4.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl i4 +(24 rows) + +--Testcase 422: +select t0.* +from + (select fields->>'f1' f1 from text_tbl t0) t0 + left join + (select case (t1.fields->>'ten')::int4 when 0 then 'doh!'::text else null::text end as case1, + t1.fields->>'stringu2' stringu2 + from tenk1 t1 + join int4_tbl i4 ON (i4.fields->>'f1')::int4 = (t1.fields->>'unique2')::int4 + left join uniquetbl u1 ON u1.fields->>'f1' = (t1.fields->>'string4')::name) ss + on t0.f1 = ss.case1 +where ss.stringu2 !~* ss.case1; + f1 +------ + doh! +(1 row) + +rollback; +-- test case to expose miscomputation of required relid set for a PHV +--Testcase 423: +explain (verbose, costs off) +select i8.*, ss.v, (t.fields->>'unique2')::int4 unique2 + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join int4_tbl i4 on (i4.fields->>'f1')::int4 = 1 + left join lateral (select (i4.fields->>'f1')::int4 + 1 as v) as ss on true + left join tenk1 t on (t.fields->>'unique2')::int4 = (ss.v)::int4 +where q2::int8 = 456; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Right Join + Output: ((i8.fields ->> 'q1'::text))::bigint, ((i8.fields ->> 'q2'::text))::bigint, ((((i4.fields ->> 'f1'::text))::integer + 1)), ((t.fields ->> 'unique2'::text))::integer + Hash Cond: (((t.fields ->> 'unique2'::text))::integer = ((((i4.fields ->> 'f1'::text))::integer + 1))) + -> Foreign Scan on public.tenk1 t + Output: t.fields + InfluxDB query: SELECT * FROM "tenk" + -> Hash + Output: i8.fields, ((((i4.fields ->> 'f1'::text))::integer + 1)) + -> Nested Loop Left Join + Output: i8.fields, (((i4.fields ->> 'f1'::text))::integer + 1) + -> Foreign Scan on public.int8_tbl i8 + Output: i8.fields + InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q2" = 456)) + -> Materialize + Output: i4.fields + -> Foreign Scan on public.int4_tbl i4 + Output: i4.fields + InfluxDB query: SELECT * FROM "int4_tbl" WHERE (("f1" = 1)) +(18 rows) + +--Testcase 424: +select i8.*, ss.v, (t.fields->>'unique2')::int4 unique2 + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join int4_tbl i4 on (i4.fields->>'f1')::int4 = 1 + left join lateral (select (i4.fields->>'f1')::int4 + 1 as v) as ss on true + left join tenk1 t on (t.fields->>'unique2')::int4 = (ss.v)::int4 +where q2::int8 = 456; + q1 | q2 | v | unique2 +-----+-----+---+--------- + 123 | 456 | | +(1 row) + +-- InfluxDB does not support partition table, create local table for test +-- and check a related issue where we miscompute required relids for +-- a PHV that's been translated to a child rel +--Testcase 570: +create temp table parttbl (a integer primary key) partition by range (a); +--Testcase 571: +create temp table parttbl1 partition of parttbl for values from (1) to (100); +--Testcase 572: +insert into parttbl values (11), (12); +--Testcase 573: +explain (costs off) +select * from + (select *, 12 as phv from parttbl) as ss + right join (select (fields->>'f1')::int4 f1 from int4_tbl) int4_tbl on true +where ss.a = ss.phv and f1 = 0; + QUERY PLAN +-------------------------------------- + Nested Loop + -> Seq Scan on parttbl1 parttbl + Filter: (a = 12) + -> Materialize + -> Foreign Scan on int4_tbl +(5 rows) + +--Testcase 574: +select * from + (select *, 12 as phv from parttbl) as ss + right join (select (fields->>'f1')::int4 f1 from int4_tbl) int4_tbl on true +where ss.a = ss.phv and f1 = 0; + a | phv | f1 +----+-----+---- + 12 | 12 | 0 +(1 row) + +-- bug #8444: we've historically allowed duplicate aliases within aliased JOINs +--Testcase 425: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = f1; -- error +ERROR: column reference "f1" is ambiguous +LINE 2: ...ct (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = f1; + ^ +--Testcase 426: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = y.f1; -- error +ERROR: invalid reference to FROM-clause entry for table "y" +LINE 2: ...t (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = y.f1; + ^ +HINT: There is an entry for table "y", but it cannot be referenced from this part of the query. +--Testcase 427: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y(ff)) j on q1 = f1; -- ok + q1 | q2 | f1 | ff +----+----+----+---- +(0 rows) + +-- +-- Test hints given on incorrect column references are useful +-- +--Testcase 428: +select (t1.ffields->>'unique1')::int4 unique1 from + tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, prefer "t1" suggestion +ERROR: column t1.ffields does not exist +LINE 1: select (t1.ffields->>'unique1')::int4 unique1 from + ^ +HINT: Perhaps you meant to reference the column "t1.fields". +--Testcase 429: +select (t2.ffields->>'unique1')::int4 unique1 from + tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, prefer "t2" suggestion +ERROR: column t2.ffields does not exist +LINE 1: select (t2.ffields->>'unique1')::int4 unique1 from + ^ +HINT: Perhaps you meant to reference the column "t2.fields". +--Testcase 430: +select (ffields->>'unique1')::int4 unique1 from + tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, suggest both at once +ERROR: column "ffields" does not exist +LINE 1: select (ffields->>'unique1')::int4 unique1 from + ^ +HINT: Perhaps you meant to reference the column "t1.fields" or the column "t2.fields". +-- +-- Take care to reference the correct RTE +-- +--Testcase 431: +select atts.relid::regclass, s.* from pg_stats s join + pg_attribute a on s.attname = a.attname and s.tablename = + a.attrelid::regclass::text join (select unnest(indkey) attnum, + indexrelid from pg_index i) atts on atts.attnum = a.attnum where + schemaname != 'pg_catalog'; +ERROR: column atts.relid does not exist +LINE 1: select atts.relid::regclass, s.* from pg_stats s join + ^ +-- +-- Test LATERAL +-- +--Testcase 432: +select unique2, x.* +from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1 a) a, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b where f1 = a.unique1) x; + unique2 | f1 +---------+---- + 9998 | 0 +(1 row) + +--Testcase 433: +explain (costs off) + select unique2, x.* + from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1 a) a, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b where f1 = a.unique1) x; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Merge Join + Merge Cond: ((((a.fields ->> 'unique1'::text))::integer) = (((b.fields ->> 'f1'::text))::integer)) + -> Sort + Sort Key: (((a.fields ->> 'unique1'::text))::integer) + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: (((b.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl b +(8 rows) + +--Testcase 434: +select unique2, x.* +from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x, lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; + unique2 | f1 +---------+---- + 9998 | 0 +(1 row) + +--Testcase 435: +explain (costs off) + select unique2, x.* + from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x, lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Merge Join + Merge Cond: ((((x.fields ->> 'f1'::text))::integer) = (((tenk1.fields ->> 'unique1'::text))::integer)) + -> Sort + Sort Key: (((x.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl x + -> Sort + Sort Key: (((tenk1.fields ->> 'unique1'::text))::integer) + -> Foreign Scan on tenk1 +(8 rows) + +--Testcase 436: +explain (costs off) + select unique2, x.* + from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x cross join lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Merge Join + Merge Cond: ((((x.fields ->> 'f1'::text))::integer) = (((tenk1.fields ->> 'unique1'::text))::integer)) + -> Sort + Sort Key: (((x.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl x + -> Sort + Sort Key: (((tenk1.fields ->> 'unique1'::text))::integer) + -> Foreign Scan on tenk1 +(8 rows) + +--Testcase 437: +select unique2, x.* +from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x left join lateral (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss on true; + unique2 | f1 +---------+------------- + | -2147483647 + | -123456 + 9998 | 0 + | 123456 + | 2147483647 +(5 rows) + +--Testcase 438: +explain (costs off) + select unique2, x.* + from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x left join lateral (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss on true; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Merge Left Join + Merge Cond: ((((x.fields ->> 'f1'::text))::integer) = (((tenk1.fields ->> 'unique1'::text))::integer)) + -> Sort + Sort Key: (((x.fields ->> 'f1'::text))::integer) + -> Foreign Scan on int4_tbl x + -> Sort + Sort Key: (((tenk1.fields ->> 'unique1'::text))::integer) + -> Foreign Scan on tenk1 +(8 rows) + +-- check scoping of lateral versus parent references +-- the first of these should return int8_tbl.q2, the second int8_tbl.q1 +--Testcase 439: +select *, (select r from (select q1 as q2) x, (select q2 as r) y) from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl; + q1 | q2 | r +------------------+-------------------+------------------- + 123 | 456 | 456 + 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | -4567890123456789 +(5 rows) + +--Testcase 440: +select *, (select r from (select q1 as q2) x, lateral (select q2 as r) y) from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl; + q1 | q2 | r +------------------+-------------------+------------------ + 123 | 456 | 123 + 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 +(5 rows) + +-- lateral with function in FROM +--Testcase 441: +select count(*) from tenk1 a, lateral generate_series(1, (fields->>'two')::int4) g; + count +------- + 5000 +(1 row) + +--Testcase 442: +explain (costs off) + select count(*) from tenk1 a, lateral generate_series(1, (fields->>'two')::int4) g; + QUERY PLAN +------------------------------------------------ + Aggregate + -> Nested Loop + -> Foreign Scan on tenk1 a + -> Function Scan on generate_series g +(4 rows) + +--Testcase 443: +explain (costs off) + select count(*) from tenk1 a cross join lateral generate_series(1,(fields->>'two')::int4) g; + QUERY PLAN +------------------------------------------------ + Aggregate + -> Nested Loop + -> Foreign Scan on tenk1 a + -> Function Scan on generate_series g +(4 rows) + +-- don't need the explicit LATERAL keyword for functions +--Testcase 444: +explain (costs off) + select count(*) from tenk1 a, generate_series(1,(fields->>'two')::int4) g; + QUERY PLAN +------------------------------------------------ + Aggregate + -> Nested Loop + -> Foreign Scan on tenk1 a + -> Function Scan on generate_series g +(4 rows) + +-- lateral with UNION ALL subselect +--Testcase 445: +explain (costs off) + select * from generate_series(100,200) g, + lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a where g = (q1)::int8 union all + select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b where g = (q2)::int8) ss; + QUERY PLAN +------------------------------------------ + Nested Loop + -> Function Scan on generate_series g + -> Append + -> Foreign Scan on int8_tbl a + -> Foreign Scan on int8_tbl b +(5 rows) + +--Testcase 446: +select * from generate_series(100,200) g, + lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a where g = (q1)::int8 union all + select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b where g = (q2)::int8) ss; + g | q1 | q2 +-----+------------------+------------------ + 123 | 123 | 456 + 123 | 123 | 4567890123456789 + 123 | 4567890123456789 | 123 +(3 rows) + +-- lateral with VALUES +--Testcase 447: +explain (costs off) + select count(*) from tenk1 a, + tenk1 b join lateral (values(a.fields->>'unique1')) ss(x) on b.fields->>'unique2' = ss.x; + QUERY PLAN +------------------------------------------------------------------------------------------- + Aggregate + -> Merge Join + Merge Cond: (((a.fields ->> 'unique1'::text)) = ((b.fields ->> 'unique2'::text))) + -> Sort + Sort Key: ((a.fields ->> 'unique1'::text)) + -> Foreign Scan on tenk1 a + -> Sort + Sort Key: ((b.fields ->> 'unique2'::text)) + -> Foreign Scan on tenk1 b +(9 rows) + +--Testcase 448: +select count(*) from tenk1 a, + tenk1 b join lateral (values(a.fields->>'unique1')) ss(x) on b.fields->>'unique2' = ss.x; + count +------- + 10000 +(1 row) + +-- lateral with VALUES, no flattening possible +--Testcase 449: +explain (costs off) + select count(*) from tenk1 a, + tenk1 b join lateral (values((a.fields->>'unique1')::int4),(-1)) ss(x) on (b.fields->>'unique2')::int4 = (ss.x)::int; + QUERY PLAN +---------------------------------------------------------------------------------------- + Aggregate + -> Merge Join + Merge Cond: ((((b.fields ->> 'unique2'::text))::integer) = "*VALUES*".column1) + -> Sort + Sort Key: (((b.fields ->> 'unique2'::text))::integer) + -> Foreign Scan on tenk1 b + -> Sort + Sort Key: "*VALUES*".column1 + -> Nested Loop + -> Foreign Scan on tenk1 a + -> Values Scan on "*VALUES*" +(11 rows) + +--Testcase 450: +select count(*) from tenk1 a, + tenk1 b join lateral (values((a.fields->>'unique1')::int4),(-1)) ss(x) on (b.fields->>'unique2')::int4 = (ss.x)::int; + count +------- + 10000 +(1 row) + +-- lateral injecting a strange outer join condition +--Testcase 451: +explain (costs off) + select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL x) x left join lateral (select a.q1 from (select (fields->>'f1')::int4 f1 from INT4_TBL y) y) ss(z) + on x.q2 = ss.z + order by (a.q1)::int8, (a.q2)::int8, (x.q1)::int8, (x.q2)::int8, (ss.z)::int8; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort + Sort Key: (((a.fields ->> 'q1'::text))::bigint), (((a.fields ->> 'q2'::text))::bigint), (((x.fields ->> 'q1'::text))::bigint), (((x.fields ->> 'q2'::text))::bigint), (((a.fields ->> 'q1'::text))::bigint) + -> Nested Loop + -> Foreign Scan on int8_tbl a + -> Merge Left Join + Merge Cond: ((((x.fields ->> 'q2'::text))::bigint) = (((a.fields ->> 'q1'::text))::bigint)) + -> Sort + Sort Key: (((x.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on int8_tbl x + -> Sort + Sort Key: (((a.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on int4_tbl y +(12 rows) + +--Testcase 452: +select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL x) x left join lateral (select a.q1 from (select (fields->>'f1')::int4 f1 from INT4_TBL y) y) ss(z) + on x.q2 = ss.z + order by (a.q1)::int8, (a.q2)::int8, (x.q1)::int8, (x.q2)::int8, (ss.z)::int8; + q1 | q2 | q1 | q2 | z +------------------+-------------------+------------------+-------------------+------------------ + 123 | 456 | 123 | 456 | + 123 | 456 | 123 | 4567890123456789 | + 123 | 456 | 4567890123456789 | -4567890123456789 | + 123 | 456 | 4567890123456789 | 123 | 123 + 123 | 456 | 4567890123456789 | 123 | 123 + 123 | 456 | 4567890123456789 | 123 | 123 + 123 | 456 | 4567890123456789 | 123 | 123 + 123 | 456 | 4567890123456789 | 123 | 123 + 123 | 456 | 4567890123456789 | 4567890123456789 | + 123 | 4567890123456789 | 123 | 456 | + 123 | 4567890123456789 | 123 | 4567890123456789 | + 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | + 4567890123456789 | -4567890123456789 | 123 | 456 | + 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 | -4567890123456789 | + 4567890123456789 | -4567890123456789 | 4567890123456789 | 123 | + 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 456 | + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 4567890123456789 | -4567890123456789 | + 4567890123456789 | 123 | 4567890123456789 | 123 | + 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 123 | 456 | + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 +(57 rows) + +-- lateral reference to a join alias variable +--Testcase 453: +select * from (select (fields->>'f1')::int4/2 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4, + lateral (select x) ss2(y); + x | f1 | y +---+----+--- + 0 | 0 | 0 +(1 row) + +--Testcase 454: +select * from (select (fields->>'f1')::int4 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4, + lateral (values(x)) ss2(y); + x | f1 | y +-------------+-------------+------------- + -2147483647 | -2147483647 | -2147483647 + -123456 | -123456 | -123456 + 0 | 0 | 0 + 123456 | 123456 | 123456 + 2147483647 | 2147483647 | 2147483647 +(5 rows) + +--Testcase 455: +select * from ((select (fields->>'f1')::int4/2 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4) j, + lateral (select x) ss2(y); + x | f1 | y +---+----+--- + 0 | 0 | 0 +(1 row) + +-- lateral references requiring pullup +--Testcase 456: +select * from (values(1)) x(lb), + lateral generate_series(lb,4) x4; + lb | x4 +----+---- + 1 | 1 + 1 | 2 + 1 | 3 + 1 | 4 +(4 rows) + +--Testcase 457: +select * from (select (fields->>'f1')::int4/1000000000 from int4_tbl) x(lb), + lateral generate_series(lb,4) x4; + lb | x4 +----+---- + 0 | 0 + 0 | 1 + 0 | 2 + 0 | 3 + 0 | 4 + 0 | 0 + 0 | 1 + 0 | 2 + 0 | 3 + 0 | 4 + 0 | 0 + 0 | 1 + 0 | 2 + 0 | 3 + 0 | 4 + 2 | 2 + 2 | 3 + 2 | 4 + -2 | -2 + -2 | -1 + -2 | 0 + -2 | 1 + -2 | 2 + -2 | 3 + -2 | 4 +(25 rows) + +--Testcase 458: +select * from (values(1)) x(lb), + lateral (values(lb)) y(lbcopy); + lb | lbcopy +----+-------- + 1 | 1 +(1 row) + +--Testcase 459: +select * from (values(1)) x(lb), + lateral (select lb from int4_tbl) y(lbcopy); + lb | lbcopy +----+-------- + 1 | 1 + 1 | 1 + 1 | 1 + 1 | 1 + 1 | 1 +(5 rows) + +--Testcase 460: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, + lateral (values(x.q1,y.q1,y.q2)) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; + q1 | q2 | q1 | q2 | xq1 | yq1 | yq2 +------------------+-------------------+------------------+-------------------+------------------+------------------+------------------- + 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | -4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 123 | 456 | | | 123 | | + 4567890123456789 | 123 | 123 | 456 | 4567890123456789 | 123 | 456 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | | | 4567890123456789 | | +(10 rows) + +--Testcase 461: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, + lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; + q1 | q2 | q1 | q2 | xq1 | yq1 | yq2 +------------------+-------------------+------------------+-------------------+------------------+------------------+------------------- + 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | -4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 123 | 456 | | | 123 | | + 4567890123456789 | 123 | 123 | 456 | 4567890123456789 | 123 | 456 + 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | | | 4567890123456789 | | +(10 rows) + +--Testcase 462: +select x.* from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, + lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; + q1 | q2 +------------------+------------------- + 123 | 4567890123456789 + 123 | 4567890123456789 + 123 | 4567890123456789 + 123 | 456 + 4567890123456789 | 123 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(10 rows) + +--Testcase 463: +select v.* from + (int8_tbl x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) + left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, + lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 union all select (x.fields->>'q2')::int8,(y.q2)::int8) v(vx,vy); + vx | vy +-------------------+------------------- + 4567890123456789 | + -4567890123456789 | + 4567890123456789 | 123 + 123 | 456 + 4567890123456789 | 123 + 123 | 4567890123456789 + 123 | + 456 | + 123 | 4567890123456789 + 4567890123456789 | 123 + 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 + 4567890123456789 | -4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(20 rows) + +--Testcase 464: +select v.* from + (int8_tbl x left join (select (fields->>'q1')::int8 q1,(select coalesce((fields->>'q2')::int8,0)) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) + left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, + lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 union all select (x.fields->>'q2')::int8,(y.q2)::int8) v(vx,vy); + vx | vy +-------------------+------------------- + 4567890123456789 | + -4567890123456789 | + 4567890123456789 | 123 + 123 | 456 + 4567890123456789 | 123 + 123 | 4567890123456789 + 123 | + 456 | + 123 | 4567890123456789 + 4567890123456789 | 123 + 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 + 4567890123456789 | -4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(20 rows) + +--Testcase 465: +select v.* from + (int8_tbl x left join (select (fields->>'q1')::int8 q1,(select coalesce((fields->>'q2')::int8,0)) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) + left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, + lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 from onerow union all select (x.fields->>'q2')::int8,(y.q2)::int8 from onerow) v(vx,vy); + vx | vy +-------------------+------------------- + 4567890123456789 | + -4567890123456789 | + 4567890123456789 | 123 + 123 | 456 + 4567890123456789 | 123 + 123 | 4567890123456789 + 123 | + 456 | + 123 | 4567890123456789 + 4567890123456789 | 123 + 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 + 4567890123456789 | -4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 +(20 rows) + +--Testcase 466: +explain (verbose, costs off) +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join + lateral (select *, a.q2 as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop Left Join + Output: ((a.fields ->> 'q1'::text))::bigint, ((a.fields ->> 'q2'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((b.fields ->> 'q2'::text))::bigint, (((a.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl a + Output: a.fields + InfluxDB query: SELECT * FROM "int8_tbl" + -> Foreign Scan on public.int8_tbl b + Output: b.fields, ((a.fields ->> 'q2'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" WHERE (($1 = "q1")) +(8 rows) + +--Testcase 467: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join + lateral (select *, a.q2 as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; + q1 | q2 | q1 | q2 | x +------------------+-------------------+------------------+-------------------+------------------ + 123 | 456 | | | + 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 456 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | | | +(10 rows) + +--Testcase 468: +explain (verbose, costs off) +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join + lateral (select *, coalesce((a.q2)::int8, 42) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop Left Join + Output: ((a.fields ->> 'q1'::text))::bigint, ((a.fields ->> 'q2'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((b.fields ->> 'q2'::text))::bigint, (COALESCE(((a.fields ->> 'q2'::text))::bigint, '42'::bigint)) + -> Foreign Scan on public.int8_tbl a + Output: a.fields + InfluxDB query: SELECT * FROM "int8_tbl" + -> Foreign Scan on public.int8_tbl b + Output: b.fields, COALESCE(((a.fields ->> 'q2'::text))::bigint, '42'::bigint) + InfluxDB query: SELECT * FROM "int8_tbl" WHERE (($1 = "q1")) +(8 rows) + +--Testcase 469: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join + lateral (select *, coalesce((a.q2)::int8, 42) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; + q1 | q2 | q1 | q2 | x +------------------+-------------------+------------------+-------------------+------------------ + 123 | 456 | | | + 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 + 4567890123456789 | 123 | 123 | 456 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | | | +(10 rows) + +-- lateral can result in join conditions appearing below their +-- real semantic level +--Testcase 470: +explain (verbose, costs off) +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join + lateral (select * from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Merge Left Join + Output: (((i.fields ->> 'f1'::text))::integer), ((j.fields ->> 'f1'::text))::smallint + Merge Cond: ((((i.fields ->> 'f1'::text))::integer) = (((j.fields ->> 'f1'::text))::smallint)) + -> Sort + Output: i.fields, (((i.fields ->> 'f1'::text))::integer) + Sort Key: (((i.fields ->> 'f1'::text))::integer) + -> Foreign Scan on public.int4_tbl i + Output: i.fields, ((i.fields ->> 'f1'::text))::integer + InfluxDB query: SELECT * FROM "int4_tbl" + -> Sort + Output: j.fields, (((j.fields ->> 'f1'::text))::smallint) + Sort Key: (((j.fields ->> 'f1'::text))::smallint) + -> Foreign Scan on public.int2_tbl j + Output: j.fields, ((j.fields ->> 'f1'::text))::smallint + InfluxDB query: SELECT * FROM "int2_tbl" +(15 rows) + +--Testcase 471: +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join + lateral (select * from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; + f1 | f1 +-------------+---- + -2147483647 | + -123456 | + 0 | 0 + 123456 | + 2147483647 | +(5 rows) + +--Testcase 472: +explain (verbose, costs off) +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join + lateral (select coalesce(i) from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; + QUERY PLAN +------------------------------------------------------------------------------------------------------- + Nested Loop Left Join + Output: ((i.fields ->> 'f1'::text))::integer, (COALESCE(ROW(((i.fields ->> 'f1'::text))::integer))) + -> Foreign Scan on public.int4_tbl i + Output: i.fields + InfluxDB query: SELECT * FROM "int4_tbl" + -> Foreign Scan on public.int2_tbl j + Output: j.fields, COALESCE(ROW(((i.fields ->> 'f1'::text))::integer)) + InfluxDB query: SELECT * FROM "int2_tbl" WHERE (($1 = "f1")) +(8 rows) + +--Testcase 473: +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join + lateral (select coalesce(i) from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; + f1 | coalesce +-------------+---------- + 0 | (0) + 123456 | + -123456 | + 2147483647 | + -2147483647 | +(5 rows) + +--Testcase 474: +explain (verbose, costs off) +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a, + lateral ( + select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c on (b.f1 = q1 and a.f1 = q2) + ) ss; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Output: ((a.fields ->> 'f1'::text))::integer, (((b.fields ->> 'f1'::text))::integer), (((c.fields ->> 'q1'::text))::bigint), (((c.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int4_tbl a + Output: a.fields + InfluxDB query: SELECT * FROM "int4_tbl" + -> Hash Left Join + Output: ((b.fields ->> 'f1'::text))::integer, ((c.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q2'::text))::bigint + Hash Cond: (((b.fields ->> 'f1'::text))::integer = ((c.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on public.int4_tbl b + Output: b.fields + InfluxDB query: SELECT * FROM "int4_tbl" + -> Hash + Output: c.fields + -> Foreign Scan on public.int8_tbl c + Output: c.fields + InfluxDB query: SELECT * FROM "int8_tbl" WHERE (($1 = "q2")) +(16 rows) + +--Testcase 475: +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a, + lateral ( + select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c on (b.f1 = q1 and a.f1 = q2) + ) ss; + f1 | f1 | q1 | q2 +-------------+-------------+----+---- + 0 | 0 | | + 0 | 123456 | | + 0 | -123456 | | + 0 | 2147483647 | | + 0 | -2147483647 | | + 123456 | 0 | | + 123456 | 123456 | | + 123456 | -123456 | | + 123456 | 2147483647 | | + 123456 | -2147483647 | | + -123456 | 0 | | + -123456 | 123456 | | + -123456 | -123456 | | + -123456 | 2147483647 | | + -123456 | -2147483647 | | + 2147483647 | 0 | | + 2147483647 | 123456 | | + 2147483647 | -123456 | | + 2147483647 | 2147483647 | | + 2147483647 | -2147483647 | | + -2147483647 | 0 | | + -2147483647 | 123456 | | + -2147483647 | -123456 | | + -2147483647 | 2147483647 | | + -2147483647 | -2147483647 | | +(25 rows) + +-- lateral reference in a PlaceHolderVar evaluated at join level +--Testcase 476: +explain (verbose, costs off) +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) a left join lateral + (select (b.fields->>'q1')::int8 as bq1, (c.fields->>'q1')::int8 as cq1, least(a.q1,(b.fields->>'q1')::int8,(c.fields->>'q1')::int8) from + int8_tbl b cross join int8_tbl c) ss + on a.q2 = ss.bq1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop Left Join + Output: ((int8_tbl.fields ->> 'q1'::text))::bigint, ((int8_tbl.fields ->> 'q2'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q1'::text))::bigint, (LEAST(((int8_tbl.fields ->> 'q1'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q1'::text))::bigint)) + -> Foreign Scan on public.int8_tbl + Output: int8_tbl.fields + InfluxDB query: SELECT * FROM "int8_tbl" + -> Nested Loop + Output: b.fields, c.fields, LEAST(((int8_tbl.fields ->> 'q1'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on public.int8_tbl b + Output: b.fields + InfluxDB query: SELECT * FROM "int8_tbl" WHERE (($1 = "q1")) + -> Materialize + Output: c.fields + -> Foreign Scan on public.int8_tbl c + Output: c.fields + InfluxDB query: SELECT * FROM "int8_tbl" +(15 rows) + +--Testcase 477: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) a left join lateral + (select (b.fields->>'q1')::int8 as bq1, (c.fields->>'q1')::int8 as cq1, least(a.q1,(b.fields->>'q1')::int8,(c.fields->>'q1')::int8) from + int8_tbl b cross join int8_tbl c) ss + on a.q2 = ss.bq1; + q1 | q2 | bq1 | cq1 | least +------------------+-------------------+------------------+------------------+------------------ + 123 | 456 | | | + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 123 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 123 | 123 + 4567890123456789 | 123 | 123 | 123 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 123 | 123 + 4567890123456789 | 123 | 123 | 123 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 123 | 123 | 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 4567890123456789 | -4567890123456789 | | | +(42 rows) + +-- case requiring nested PlaceHolderVars +--Testcase 478: +explain (verbose, costs off) +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c left join ( + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'q1')::int8 q1, coalesce((fields->>'q2')::int8,42) as x from int8_tbl b) ss1 + on a.q2 = ss1.q1 + cross join + lateral (select (fields->>'q1')::int8 q1, coalesce(ss1.x,(fields->>'q2')::int8) as y from int8_tbl d) ss2 + ) on c.q2 = ss2.q1, + lateral (select ss2.y offset 0) ss3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Output: ((c.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q2'::text))::bigint, ((a.fields ->> 'q1'::text))::bigint, ((a.fields ->> 'q2'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q1'::text))::bigint, (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)), ((COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint))) + -> Merge Left Join + Output: c.fields, a.fields, b.fields, d.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)) + Merge Cond: ((((c.fields ->> 'q2'::text))::bigint) = (((d.fields ->> 'q1'::text))::bigint)) + -> Sort + Output: c.fields, (((c.fields ->> 'q2'::text))::bigint) + Sort Key: (((c.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl c + Output: c.fields, ((c.fields ->> 'q2'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Materialize + Output: a.fields, b.fields, d.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)), (((d.fields ->> 'q1'::text))::bigint) + -> Sort + Output: a.fields, b.fields, d.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)), (((d.fields ->> 'q1'::text))::bigint) + Sort Key: (((d.fields ->> 'q1'::text))::bigint) + -> Nested Loop + Output: a.fields, b.fields, d.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)), ((d.fields ->> 'q1'::text))::bigint + -> Merge Right Join + Output: a.fields, b.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)) + Merge Cond: ((((b.fields ->> 'q1'::text))::bigint) = (((a.fields ->> 'q2'::text))::bigint)) + -> Sort + Output: b.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), (((b.fields ->> 'q1'::text))::bigint) + Sort Key: (((b.fields ->> 'q1'::text))::bigint) + -> Foreign Scan on public.int8_tbl b + Output: b.fields, COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint), ((b.fields ->> 'q1'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Sort + Output: a.fields, (((a.fields ->> 'q2'::text))::bigint) + Sort Key: (((a.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl a + Output: a.fields, ((a.fields ->> 'q2'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Foreign Scan on public.int8_tbl d + Output: d.fields, COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint) + InfluxDB query: SELECT * FROM "int8_tbl" + -> Result + Output: (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, '42'::bigint)), ((d.fields ->> 'q2'::text))::bigint)) +(38 rows) + +-- case that breaks the old ph_may_need optimization +--Testcase 479: +explain (verbose, costs off) +select c.*,a.*,ss1.q1,ss2.q1,ss3.* from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c left join ( + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join + (select q1, coalesce(q2,f1) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b, (select (fields->>'f1')::int4 f1 from INT4_TBL b2) b2 + where (q1)::int8 < (f1)::int4) ss1 + on a.q2 = ss1.q1 + cross join + lateral (select (fields->>'q1')::int8 q1, coalesce(ss1.x,(fields->>'q2')::int8) as y from int8_tbl d) ss2 + ) on c.q2 = ss2.q1, + lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i where (ss2.y)::int8 > (f1)::int4) ss3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Nested Loop + Output: ((c.fields ->> 'q1'::text))::bigint, ((c.fields ->> 'q2'::text))::bigint, ((a.fields ->> 'q1'::text))::bigint, ((a.fields ->> 'q2'::text))::bigint, ((b.fields ->> 'q1'::text))::bigint, ((d.fields ->> 'q1'::text))::bigint, ((i.fields ->> 'f1'::text))::integer + Join Filter: ((COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint)) > ((i.fields ->> 'f1'::text))::integer) + -> Merge Left Join + Output: c.fields, a.fields, b.fields, d.fields, (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint)) + Merge Cond: ((((c.fields ->> 'q2'::text))::bigint) = (((d.fields ->> 'q1'::text))::bigint)) + -> Sort + Output: c.fields, (((c.fields ->> 'q2'::text))::bigint) + Sort Key: (((c.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl c + Output: c.fields, ((c.fields ->> 'q2'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Materialize + Output: a.fields, b.fields, d.fields, (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint)), (((d.fields ->> 'q1'::text))::bigint) + -> Sort + Output: a.fields, b.fields, d.fields, (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint)), (((d.fields ->> 'q1'::text))::bigint) + Sort Key: (((d.fields ->> 'q1'::text))::bigint) + -> Nested Loop + Output: a.fields, b.fields, d.fields, (COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint)), ((d.fields ->> 'q1'::text))::bigint + -> Merge Left Join + Output: a.fields, b.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)) + Merge Cond: ((((a.fields ->> 'q2'::text))::bigint) = (((b.fields ->> 'q1'::text))::bigint)) + -> Sort + Output: a.fields, (((a.fields ->> 'q2'::text))::bigint) + Sort Key: (((a.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl a + Output: a.fields, ((a.fields ->> 'q2'::text))::bigint + InfluxDB query: SELECT * FROM "int8_tbl" + -> Materialize + Output: b.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), (((b.fields ->> 'q1'::text))::bigint) + -> Sort + Output: b.fields, (COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), (((b.fields ->> 'q1'::text))::bigint) + Sort Key: (((b.fields ->> 'q1'::text))::bigint) + -> Nested Loop + Output: b.fields, COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint), ((b.fields ->> 'q1'::text))::bigint + Join Filter: (((b.fields ->> 'q1'::text))::bigint < ((b2.fields ->> 'f1'::text))::integer) + -> Foreign Scan on public.int8_tbl b + Output: b.fields + InfluxDB query: SELECT * FROM "int8_tbl" + -> Materialize + Output: b2.fields + -> Foreign Scan on public.int4_tbl b2 + Output: b2.fields + InfluxDB query: SELECT * FROM "int4_tbl" + -> Foreign Scan on public.int8_tbl d + Output: d.fields, COALESCE((COALESCE(((b.fields ->> 'q2'::text))::bigint, (((b2.fields ->> 'f1'::text))::integer)::bigint)), ((d.fields ->> 'q2'::text))::bigint) + InfluxDB query: SELECT * FROM "int8_tbl" + -> Materialize + Output: i.fields + -> Foreign Scan on public.int4_tbl i + Output: i.fields + InfluxDB query: SELECT * FROM "int4_tbl" +(52 rows) + +-- check processing of postponed quals (bug #9041) +--Testcase 480: +explain (verbose, costs off) +select * from + (select 1 as x offset 0) x cross join (select 2 as y offset 0) y + left join lateral ( + select * from (select 3 as z offset 0) z where z.z = x.x + ) zz on zz.z = y.y; + QUERY PLAN +---------------------------------------------- + Nested Loop Left Join + Output: (1), (2), (3) + Join Filter: (((3) = (1)) AND ((3) = (2))) + -> Nested Loop + Output: (1), (2) + -> Result + Output: 1 + -> Result + Output: 2 + -> Result + Output: 3 +(11 rows) + +-- check dummy rels with lateral references (bug #15694) +--Testcase 481: +explain (verbose, costs off) +select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join lateral + (select *, i8.q2 from (select (fields->>'f1')::int4 f1 from INT4_TBL int4_tbl) int4_tbl where false) ss on true; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Nested Loop Left Join + Output: ((i8.fields ->> 'q1'::text))::bigint, ((i8.fields ->> 'q2'::text))::bigint, ((fields ->> 'f1'::text))::integer, (((i8.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl i8 + Output: i8.fields + InfluxDB query: SELECT * FROM "int8_tbl" + -> Result + Output: fields, ((i8.fields ->> 'q2'::text))::bigint + One-Time Filter: false +(8 rows) + +--Testcase 482: +explain (verbose, costs off) +select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join lateral + (select *, i8.q2 from (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1, (select (fields->>'f1')::int4 f1 from INT4_TBL i2) i2 where false) ss on true; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Nested Loop Left Join + Output: ((i8.fields ->> 'q1'::text))::bigint, ((i8.fields ->> 'q2'::text))::bigint, ((fields ->> 'f1'::text))::integer, ((fields ->> 'f1'::text))::integer, (((i8.fields ->> 'q2'::text))::bigint) + -> Foreign Scan on public.int8_tbl i8 + Output: i8.fields + InfluxDB query: SELECT * FROM "int8_tbl" + -> Result + Output: fields, fields, ((i8.fields ->> 'q2'::text))::bigint + One-Time Filter: false +(8 rows) + +-- check handling of nested appendrels inside LATERAL +--Testcase 483: +select * from + ((select 2 as v) union all (select 3 as v)) as q1 + cross join lateral + ((select * from + ((select 4 as v) union all (select 5 as v)) as q3) + union all + (select q1.v) + ) as q2; + v | v +---+--- + 2 | 4 + 2 | 5 + 2 | 2 + 3 | 4 + 3 | 5 + 3 | 3 +(6 rows) + +-- check the number of columns specified +--Testcase 665: +SELECT * FROM ((SELECT fields->>'q1', fields->>'q2' FROM int8_tbl) i cross join (SELECT fields->>'f1' FROM int4_tbl) j) ss(a,b,c,d); +ERROR: join expression "ss" has 3 columns available but 4 columns specified +-- check we don't try to do a unique-ified semijoin with LATERAL +--Testcase 484: +explain (verbose, costs off) +select * from + (values (0,9998), (1,1000)) v(id,x), + lateral (select (fields->>'f1')::int4 f1 from INT4_TBL + where (fields->>'f1')::int4 = any (select (fields->>'unique1')::int4 from tenk1 + where (fields->>'unique2')::int4 = v.x offset 0)) ss; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------- + Nested Loop + Output: "*VALUES*".column1, "*VALUES*".column2, ((int4_tbl.fields ->> 'f1'::text))::integer + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1, "*VALUES*".column2 + -> Hash Semi Join + Output: int4_tbl.fields + Hash Cond: (((int4_tbl.fields ->> 'f1'::text))::integer = (((tenk1.fields ->> 'unique1'::text))::integer)) + -> Foreign Scan on public.int4_tbl + Output: int4_tbl.fields + InfluxDB query: SELECT * FROM "int4_tbl" + -> Hash + Output: (((tenk1.fields ->> 'unique1'::text))::integer) + -> Foreign Scan on public.tenk1 + Output: ((tenk1.fields ->> 'unique1'::text))::integer + InfluxDB query: SELECT "unique1" FROM "tenk" WHERE (("unique2" = $1)) +(15 rows) + +--Testcase 485: +select * from + (values (0,9998), (1,1000)) v(id,x), + lateral (select (fields->>'f1')::int4 f1 from INT4_TBL + where (fields->>'f1')::int4 = any (select (fields->>'unique1')::int4 from tenk1 + where (fields->>'unique2')::int4 = v.x offset 0)) ss; + id | x | f1 +----+------+---- + 0 | 9998 | 0 +(1 row) + +-- check proper extParam/allParam handling (this isn't exactly a LATERAL issue, +-- but we can make the test case much more compact with LATERAL) +--Testcase 486: +explain (verbose, costs off) +select * from (values (0), (1)) v(id), +lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1, + lateral (select * from + (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 + where q1 = any (select (fields->>'q2')::int8 from int8_tbl t3 + where (fields->>'q2')::int8 = (select greatest(t1.q1,t2.q2)) + and (select v.id=0)) offset 0) ss2) ss + where (t1.q1)::int8 = (ss.q2)::int8) ss0; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Output: "*VALUES*".column1, ((int8_tbl.fields ->> 'q1'::text))::bigint, ((int8_tbl.fields ->> 'q2'::text))::bigint, ss2.q1, ss2.q2 + -> Foreign Scan on public.int8_tbl + Output: int8_tbl.fields + InfluxDB query: SELECT * FROM "int8_tbl" + -> Nested Loop + Output: "*VALUES*".column1, ss2.q1, ss2.q2 + -> Values Scan on "*VALUES*" + Output: "*VALUES*".column1 + -> Subquery Scan on ss2 + Output: ss2.q1, ss2.q2 + Filter: (((int8_tbl.fields ->> 'q1'::text))::bigint = ss2.q2) + -> Foreign Scan on public.int8_tbl int8_tbl_1 + Output: ((int8_tbl_1.fields ->> 'q1'::text))::bigint, ((int8_tbl_1.fields ->> 'q2'::text))::bigint + Filter: (SubPlan 3) + InfluxDB query: SELECT "q1", "q2" FROM "int8_tbl" + SubPlan 3 + -> Result + Output: ((t3.fields ->> 'q2'::text))::bigint + One-Time Filter: $4 + InitPlan 1 (returns $2) + -> Result + Output: GREATEST((($0 ->> 'q1'::text))::bigint, ((int8_tbl_1.fields ->> 'q2'::text))::bigint) + InitPlan 2 (returns $4) + -> Result + Output: ($3 = 0) + -> Foreign Scan on public.int8_tbl t3 + Output: t3.fields + InfluxDB query: SELECT * FROM "int8_tbl" WHERE (("q2" = $1)) +(29 rows) + +--Testcase 487: +select * from (values (0), (1)) v(id), +lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1, + lateral (select * from + (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 + where q1 = any (select (fields->>'q2')::int8 from int8_tbl t3 + where (fields->>'q2')::int8 = (select greatest(t1.q1,t2.q2)) + and (select v.id=0)) offset 0) ss2) ss + where t1.q1 = ss.q2) ss0; + id | q1 | q2 | q1 | q2 +----+------------------+-------------------+------------------+------------------ + 0 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 + 0 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 + 0 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 +(3 rows) + +-- test some error cases where LATERAL should have been used but wasn't +--Testcase 488: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a, (select fields->>'f1' as g) ss; +ERROR: column "fields" does not exist +LINE 1: ...1,(fields->>'g')::int4 g from int4_tbl a, (select fields->>'... + ^ +HINT: There is a column named "fields" in table "a", but it cannot be referenced from this part of the query. +--Testcase 489: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a, (select a.fields->>'f1' as g) ss; +ERROR: invalid reference to FROM-clause entry for table "a" +LINE 1: ...1,(fields->>'g')::int4 g from int4_tbl a, (select a.fields->... + ^ +HINT: There is an entry for table "a", but it cannot be referenced from this part of the query. +--Testcase 490: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a cross join (select fields->>'f1' as g) ss; +ERROR: column "fields" does not exist +LINE 1: ...>>'g')::int4 g from int4_tbl a cross join (select fields->>'... + ^ +HINT: There is a column named "fields" in table "a", but it cannot be referenced from this part of the query. +--Testcase 491: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a cross join (select a.fields->>'f1' as g) ss; +ERROR: invalid reference to FROM-clause entry for table "a" +LINE 1: ...>>'g')::int4 g from int4_tbl a cross join (select a.fields->... + ^ +HINT: There is an entry for table "a", but it cannot be referenced from this part of the query. +-- SQL:2008 says the left table is in scope but illegal to access here +--Testcase 492: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a right join lateral generate_series(0, (a.fields->>'f1')::int4) g on true; +ERROR: invalid reference to FROM-clause entry for table "a" +LINE 1: ...int4_tbl a right join lateral generate_series(0, (a.fields->... + ^ +DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. +--Testcase 493: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a full join lateral generate_series(0, (a.fields->>'f1')::int4) g on true; +ERROR: invalid reference to FROM-clause entry for table "a" +LINE 1: ... int4_tbl a full join lateral generate_series(0, (a.fields->... + ^ +DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. +-- check we complain about ambiguous table references +--Testcase 494: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x cross join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join lateral (select x.f1) ss); +ERROR: table reference "x" is ambiguous +LINE 2: ...t4 f1 from INT4_TBL) x cross join lateral (select x.f1) ss); + ^ +-- LATERAL can be used to put an aggregate into the FROM clause of its query +--Testcase 495: +select 1 from tenk1 a, lateral (select max((a.fields->>'unique1')::int4) from int4_tbl b) ss; +ERROR: aggregate functions are not allowed in FROM clause of their own query level +LINE 1: select 1 from tenk1 a, lateral (select max((a.fields->>'uniq... + ^ +-- check behavior of LATERAL in UPDATE/DELETE +--Testcase 496: +create temp table xx1 as select fields->>'f1' as x1, -(fields->>'f1')::int4 as x2 from int4_tbl; +-- error, can't do this: +--Testcase 497: +update xx1 set x2 = f1 from (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; +ERROR: column "x1" does not exist +LINE 1: ...->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; + ^ +HINT: There is a column named "x1" in table "xx1", but it cannot be referenced from this part of the query. +--Testcase 498: +update xx1 set x2 = f1 from (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss; +ERROR: invalid reference to FROM-clause entry for table "xx1" +LINE 1: ...'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss... + ^ +HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. +-- can't do it even with LATERAL: +--Testcase 499: +update xx1 set x2 = f1 from lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; +ERROR: invalid reference to FROM-clause entry for table "xx1" +LINE 1: ...->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; + ^ +HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. +-- we might in future allow something like this, but for now it's an error: +--Testcase 500: +update xx1 set x2 = f1 from xx1, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; +ERROR: table name "xx1" specified more than once +-- also errors: +--Testcase 501: +delete from xx1 using (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; +ERROR: column "x1" does not exist +LINE 1: ...->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; + ^ +HINT: There is a column named "x1" in table "xx1", but it cannot be referenced from this part of the query. +--Testcase 502: +delete from xx1 using (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss; +ERROR: invalid reference to FROM-clause entry for table "xx1" +LINE 1: ...'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss... + ^ +HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. +--Testcase 503: +delete from xx1 using lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; +ERROR: invalid reference to FROM-clause entry for table "xx1" +LINE 1: ...->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; + ^ +HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. +/* +-- Influx does not support partition table +-- +-- test LATERAL reference propagation down a multi-level inheritance hierarchy +-- produced for a multi-level partitioned table hierarchy. +-- +create table join_pt1 (a int, b int, c varchar) partition by range(a); +create table join_pt1p1 partition of join_pt1 for values from (0) to (100) partition by range(b); +create table join_pt1p2 partition of join_pt1 for values from (100) to (200); +create table join_pt1p1p1 partition of join_pt1p1 for values from (0) to (100); +insert into join_pt1 values (1, 1, 'x'), (101, 101, 'y'); +create table join_ut1 (a int, b int, c varchar); +insert into join_ut1 values (101, 101, 'y'), (2, 2, 'z'); +explain (verbose, costs off) +select t1.b, ss.phv from join_ut1 t1 left join lateral + (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv + from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss + on t1.a = ss.t2a order by t1.a; +select t1.b, ss.phv from join_ut1 t1 left join lateral + (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv + from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss + on t1.a = ss.t2a order by t1.a; + +drop table join_pt1; +drop table join_ut1; + +-- +-- test estimation behavior with multi-column foreign key and constant qual +-- + +begin; + +create table fkest (x integer, x10 integer, x10b integer, x100 integer); +insert into fkest select x, x/10, x/10, x/100 from generate_series(1,1000) x; +create unique index on fkest(x, x10, x100); +analyze fkest; + +explain (costs off) +select * from fkest f1 + join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) + join fkest f3 on f1.x = f3.x + where f1.x100 = 2; + +alter table fkest add constraint fk + foreign key (x, x10b, x100) references fkest (x, x10, x100); + +explain (costs off) +select * from fkest f1 + join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) + join fkest f3 on f1.x = f3.x + where f1.x100 = 2; + +rollback; +*/ +-- +-- test that foreign key join estimation performs sanely for outer joins +-- +begin; +--Testcase 504: +create foreign table fkest (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 633: +create foreign table fkest_nsc (a int, b int, c int) server influxdb_svr OPTIONS (table 'fkest'); +--Testcase 505: +create foreign table fkest1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 634: +create foreign table fkest1_nsc (a int, b int) server influxdb_svr OPTIONS (table 'fkest1'); +--Testcase 506: +insert into fkest_nsc select x/10, x%10, x from generate_series(1,1000) x; +--Testcase 507: +insert into fkest1_nsc select x/10, x%10 from generate_series(1,1000) x; +--Testcase 508: +explain (costs off) +select * +from (select (fields->>'a')::int a, (fields->>'b')::int b, (fields->>'c')::int c from fkest f) f + left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f1) f1 on (f.a)::int = (f1.a)::int and (f.b)::int = (f1.b)::int + left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f2) f2 on (f.a)::int = (f2.a)::int and (f.b)::int = (f2.b)::int + left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f3) f3 on (f.a)::int = (f3.a)::int and (f.b)::int = (f3.b)::int +where (f.c)::bigint = 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Hash Right Join + Hash Cond: ((((f3.fields ->> 'a'::text))::integer = ((f.fields ->> 'a'::text))::integer) AND (((f3.fields ->> 'b'::text))::integer = ((f.fields ->> 'b'::text))::integer)) + -> Foreign Scan on fkest1 f3 + -> Hash + -> Hash Right Join + Hash Cond: ((((f2.fields ->> 'a'::text))::integer = ((f.fields ->> 'a'::text))::integer) AND (((f2.fields ->> 'b'::text))::integer = ((f.fields ->> 'b'::text))::integer)) + -> Foreign Scan on fkest1 f2 + -> Hash + -> Hash Right Join + Hash Cond: ((((f1.fields ->> 'a'::text))::integer = ((f.fields ->> 'a'::text))::integer) AND (((f1.fields ->> 'b'::text))::integer = ((f.fields ->> 'b'::text))::integer)) + -> Foreign Scan on fkest1 f1 + -> Hash + -> Foreign Scan on fkest f + Filter: ((((fields ->> 'c'::text))::integer)::bigint = 1) +(14 rows) + +rollback; +-- +-- test planner's ability to mark joins as unique +-- +--Testcase 509: +create foreign table j1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 635: +create foreign table j1_nsc (id int) server influxdb_svr OPTIONS (table 'j1'); +--Testcase 510: +create foreign table j2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 636: +create foreign table j2_nsc (id int) server influxdb_svr OPTIONS (table 'j2'); +--Testcase 511: +create foreign table j3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 637: +create foreign table j3_nsc (id int) server influxdb_svr OPTIONS (table 'j3'); +--Testcase 512: +insert into j1_nsc values(1),(2),(3); +--Testcase 513: +insert into j2_nsc values(1),(2),(3); +--Testcase 514: +insert into j3_nsc values(1),(1); +-- ensure join is properly marked as unique +--Testcase 515: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Merge Join + Output: (((j1.fields ->> 'id'::text))::integer), (((j2.fields ->> 'id'::text))::integer) + Merge Cond: ((((j1.fields ->> 'id'::text))::integer) = (((j2.fields ->> 'id'::text))::integer)) + -> Sort + Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) + Sort Key: (((j1.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j1 + Output: j1.fields, ((j1.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j1" + -> Sort + Output: j2.fields, (((j2.fields ->> 'id'::text))::integer) + Sort Key: (((j2.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j2 + Output: j2.fields, ((j2.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j2" +(15 rows) + +-- ensure join is not unique when not an equi-join +--Testcase 516: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int > (j2.id)::int; + QUERY PLAN +------------------------------------------------------------------------------------------------ + Nested Loop + Output: ((j1.fields ->> 'id'::text))::integer, ((j2.fields ->> 'id'::text))::integer + Join Filter: (((j1.fields ->> 'id'::text))::integer > ((j2.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j1 + Output: j1.fields + InfluxDB query: SELECT * FROM "j1" + -> Materialize + Output: j2.fields + -> Foreign Scan on public.j2 + Output: j2.fields + InfluxDB query: SELECT * FROM "j2" +(11 rows) + +-- ensure non-unique rel is not chosen as inner +--Testcase 517: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j3) j3 on (j1.id)::int = (j3.id)::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Merge Join + Output: (((j1.fields ->> 'id'::text))::integer), (((j3.fields ->> 'id'::text))::integer) + Merge Cond: ((((j1.fields ->> 'id'::text))::integer) = (((j3.fields ->> 'id'::text))::integer)) + -> Sort + Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) + Sort Key: (((j1.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j1 + Output: j1.fields, ((j1.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j1" + -> Sort + Output: j3.fields, (((j3.fields ->> 'id'::text))::integer) + Sort Key: (((j3.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j3 + Output: j3.fields, ((j3.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j3" +(15 rows) + +-- ensure left join is marked as unique +--Testcase 518: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 left join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Merge Left Join + Output: (((j1.fields ->> 'id'::text))::integer), ((j2.fields ->> 'id'::text))::integer + Merge Cond: ((((j1.fields ->> 'id'::text))::integer) = (((j2.fields ->> 'id'::text))::integer)) + -> Sort + Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) + Sort Key: (((j1.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j1 + Output: j1.fields, ((j1.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j1" + -> Sort + Output: j2.fields, (((j2.fields ->> 'id'::text))::integer) + Sort Key: (((j2.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j2 + Output: j2.fields, ((j2.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j2" +(15 rows) + +-- ensure right join is marked as unique +--Testcase 519: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 right join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Merge Left Join + Output: ((j1.fields ->> 'id'::text))::integer, (((j2.fields ->> 'id'::text))::integer) + Merge Cond: ((((j2.fields ->> 'id'::text))::integer) = (((j1.fields ->> 'id'::text))::integer)) + -> Sort + Output: j2.fields, (((j2.fields ->> 'id'::text))::integer) + Sort Key: (((j2.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j2 + Output: j2.fields, ((j2.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j2" + -> Sort + Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) + Sort Key: (((j1.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j1 + Output: j1.fields, ((j1.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j1" +(15 rows) + +-- ensure full join is marked as unique +--Testcase 520: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 full join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Merge Full Join + Output: ((j1.fields ->> 'id'::text))::integer, ((j2.fields ->> 'id'::text))::integer + Merge Cond: ((((j1.fields ->> 'id'::text))::integer) = (((j2.fields ->> 'id'::text))::integer)) + -> Sort + Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) + Sort Key: (((j1.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j1 + Output: j1.fields, ((j1.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j1" + -> Sort + Output: j2.fields, (((j2.fields ->> 'id'::text))::integer) + Sort Key: (((j2.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j2 + Output: j2.fields, ((j2.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j2" +(15 rows) + +-- a clauseless (cross) join can't be unique +--Testcase 521: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 cross join (select (fields->>'id')::int id from j2) j2; + QUERY PLAN +---------------------------------------------------------------------------------------- + Nested Loop + Output: ((j1.fields ->> 'id'::text))::integer, ((j2.fields ->> 'id'::text))::integer + -> Foreign Scan on public.j1 + Output: j1.fields + InfluxDB query: SELECT * FROM "j1" + -> Materialize + Output: j2.fields + -> Foreign Scan on public.j2 + Output: j2.fields + InfluxDB query: SELECT * FROM "j2" +(10 rows) + +-- ensure a natural join is marked as unique +--Testcase 522: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 natural join (select (fields->>'id')::int id from j2) j2; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Merge Join + Output: (((j1.fields ->> 'id'::text))::integer) + Merge Cond: ((((j1.fields ->> 'id'::text))::integer) = (((j2.fields ->> 'id'::text))::integer)) + -> Sort + Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) + Sort Key: (((j1.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j1 + Output: j1.fields, ((j1.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j1" + -> Sort + Output: j2.fields, (((j2.fields ->> 'id'::text))::integer) + Sort Key: (((j2.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j2 + Output: j2.fields, ((j2.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j2" +(15 rows) + +-- ensure a distinct clause allows the inner to become unique +--Testcase 523: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1 j1) j1 +inner join (select distinct (fields->>'id')::int id from j3 j3) j3 on (j1.id)::int = (j3.id)::int; + QUERY PLAN +------------------------------------------------------------------------------------------------ + Hash Join + Output: ((j1.fields ->> 'id'::text))::integer, (((j3.fields ->> 'id'::text))::integer) + Inner Unique: true + Hash Cond: (((j1.fields ->> 'id'::text))::integer = (((j3.fields ->> 'id'::text))::integer)) + -> Foreign Scan on public.j1 + Output: j1.fields + InfluxDB query: SELECT * FROM "j1" + -> Hash + Output: (((j3.fields ->> 'id'::text))::integer) + -> HashAggregate + Output: (((j3.fields ->> 'id'::text))::integer) + Group Key: ((j3.fields ->> 'id'::text))::integer + -> Foreign Scan on public.j3 + Output: ((j3.fields ->> 'id'::text))::integer + InfluxDB query: SELECT "id" FROM "j3" +(15 rows) + +-- ensure group by clause allows the inner to become unique +--Testcase 524: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1 j1) j1 +inner join (select (fields->>'id')::int id from j3 j3 group by fields->>'id') j3 on (j1.id)::int = (j3.id)::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------- + Merge Join + Output: (((j1.fields ->> 'id'::text))::integer), j3.id + Merge Cond: (j3.id = (((j1.fields ->> 'id'::text))::integer)) + -> Sort + Output: j3.id + Sort Key: j3.id + -> Subquery Scan on j3 + Output: j3.id + -> HashAggregate + Output: (((j3_1.fields ->> 'id'::text)))::integer, ((j3_1.fields ->> 'id'::text)) + Group Key: (j3_1.fields ->> 'id'::text) + -> Foreign Scan on public.j3 j3_1 + Output: (j3_1.fields ->> 'id'::text), j3_1.fields + InfluxDB query: SELECT * FROM "j3" + -> Sort + Output: j1.fields, (((j1.fields ->> 'id'::text))::integer) + Sort Key: (((j1.fields ->> 'id'::text))::integer) + -> Foreign Scan on public.j1 + Output: j1.fields, ((j1.fields ->> 'id'::text))::integer + InfluxDB query: SELECT * FROM "j1" +(20 rows) + +--Testcase 525: +delete from j1_nsc; +--Testcase 526: +delete from j2_nsc; +--Testcase 527: +delete from j3_nsc; +--Testcase 528: +drop foreign table j1; +--Testcase 638: +drop foreign table j1_nsc; +--Testcase 529: +drop foreign table j2; +--Testcase 639: +drop foreign table j2_nsc; +--Testcase 530: +drop foreign table j3; +--Testcase 640: +drop foreign table j3_nsc; +-- test more complex permutations of unique joins +--Testcase 531: +create foreign table j1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 641: +create foreign table j1_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j1'); +--Testcase 532: +create foreign table j2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 642: +create foreign table j2_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j2'); +--Testcase 533: +create foreign table j3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 643: +create foreign table j3_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j3'); +--Testcase 534: +insert into j1_nsc values(1,1),(1,2); +--Testcase 535: +insert into j2_nsc values(1,1); +--Testcase 536: +insert into j3_nsc values(1,1); +-- ensure there's no unique join when not all columns which are part of the +-- unique index are seen in the join clause +--Testcase 537: +explain (verbose, costs off) +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Merge Join + Output: (((j1.fields ->> 'id1'::text))::integer), ((j1.fields ->> 'id2'::text))::integer, (((j2.fields ->> 'id1'::text))::integer), ((j2.fields ->> 'id2'::text))::integer + Merge Cond: ((((j1.fields ->> 'id1'::text))::integer) = (((j2.fields ->> 'id1'::text))::integer)) + -> Sort + Output: j1.fields, (((j1.fields ->> 'id1'::text))::integer) + Sort Key: (((j1.fields ->> 'id1'::text))::integer) + -> Foreign Scan on public.j1 + Output: j1.fields, ((j1.fields ->> 'id1'::text))::integer + InfluxDB query: SELECT * FROM "j1" + -> Sort + Output: j2.fields, (((j2.fields ->> 'id1'::text))::integer) + Sort Key: (((j2.fields ->> 'id1'::text))::integer) + -> Foreign Scan on public.j2 + Output: j2.fields, ((j2.fields ->> 'id1'::text))::integer + InfluxDB query: SELECT * FROM "j2" +(15 rows) + +-- ensure proper unique detection with multiple join quals +--Testcase 538: +explain (verbose, costs off) +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int and (j1.id2)::int = (j2.id2)::int; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Merge Join + Output: (((j1.fields ->> 'id1'::text))::integer), (((j1.fields ->> 'id2'::text))::integer), (((j2.fields ->> 'id1'::text))::integer), (((j2.fields ->> 'id2'::text))::integer) + Merge Cond: (((((j1.fields ->> 'id1'::text))::integer) = (((j2.fields ->> 'id1'::text))::integer)) AND ((((j1.fields ->> 'id2'::text))::integer) = (((j2.fields ->> 'id2'::text))::integer))) + -> Sort + Output: j1.fields, (((j1.fields ->> 'id1'::text))::integer), (((j1.fields ->> 'id2'::text))::integer) + Sort Key: (((j1.fields ->> 'id1'::text))::integer), (((j1.fields ->> 'id2'::text))::integer) + -> Foreign Scan on public.j1 + Output: j1.fields, ((j1.fields ->> 'id1'::text))::integer, ((j1.fields ->> 'id2'::text))::integer + InfluxDB query: SELECT * FROM "j1" + -> Sort + Output: j2.fields, (((j2.fields ->> 'id1'::text))::integer), (((j2.fields ->> 'id2'::text))::integer) + Sort Key: (((j2.fields ->> 'id1'::text))::integer), (((j2.fields ->> 'id2'::text))::integer) + -> Foreign Scan on public.j2 + Output: j2.fields, ((j2.fields ->> 'id1'::text))::integer, ((j2.fields ->> 'id2'::text))::integer + InfluxDB query: SELECT * FROM "j2" +(15 rows) + +-- ensure we don't detect the join to be unique when quals are not part of the +-- join condition +--Testcase 539: +explain (verbose, costs off) +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int where (j1.id2)::int = 1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Join + Output: ((j1.fields ->> 'id1'::text))::integer, ((j1.fields ->> 'id2'::text))::integer, ((j2.fields ->> 'id1'::text))::integer, ((j2.fields ->> 'id2'::text))::integer + Hash Cond: (((j2.fields ->> 'id1'::text))::integer = ((j1.fields ->> 'id1'::text))::integer) + -> Foreign Scan on public.j2 + Output: j2.fields + InfluxDB query: SELECT * FROM "j2" + -> Hash + Output: j1.fields + -> Foreign Scan on public.j1 + Output: j1.fields + InfluxDB query: SELECT * FROM "j1" WHERE (("id2" = 1)) +(11 rows) + +-- as above, but for left joins. +--Testcase 540: +explain (verbose, costs off) +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +left join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int where (j1.id2)::int = 1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Right Join + Output: ((j1.fields ->> 'id1'::text))::integer, ((j1.fields ->> 'id2'::text))::integer, ((j2.fields ->> 'id1'::text))::integer, ((j2.fields ->> 'id2'::text))::integer + Hash Cond: (((j2.fields ->> 'id1'::text))::integer = ((j1.fields ->> 'id1'::text))::integer) + -> Foreign Scan on public.j2 + Output: j2.fields + InfluxDB query: SELECT * FROM "j2" + -> Hash + Output: j1.fields + -> Foreign Scan on public.j1 + Output: j1.fields + InfluxDB query: SELECT * FROM "j1" WHERE (("id2" = 1)) +(11 rows) + +-- validate logic in merge joins which skips mark and restore. +-- it should only do this if all quals which were used to detect the unique +-- are present as join quals, and not plain quals. +--Testcase 541: +set enable_nestloop to 0; +--Testcase 542: +set enable_hashjoin to 0; +--Testcase 543: +set enable_sort to 0; +-- create indexes that will be preferred over the PKs to perform the join +--create index j1_id1_idx on j1 (id1) where id1 % 1000 = 1; +--create index j2_id1_idx on j2 (id1) where id1 % 1000 = 1; +-- need an additional row in j2, if we want j2_id1_idx to be preferred +--Testcase 544: +insert into j2_nsc values(1,2); +--analyze j2; +--Testcase 545: +explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Nested Loop + Join Filter: ((((j1.fields ->> 'id1'::text))::integer = ((j2.fields ->> 'id1'::text))::integer) AND (((j1.fields ->> 'id2'::text))::integer = ((j2.fields ->> 'id2'::text))::integer)) + -> Foreign Scan on j1 + -> Materialize + -> Foreign Scan on j2 +(5 rows) + +--Testcase 546: +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1; + id1 | id2 | id1 | id2 +-----+-----+-----+----- + 1 | 1 | 1 | 1 + 1 | 2 | 1 | 2 +(2 rows) + +-- Exercise array keys mark/restore B-Tree code +--Testcase 547: +explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int = any (array[1]); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Nested Loop + Join Filter: ((((j1.fields ->> 'id1'::text))::integer = ((j2.fields ->> 'id1'::text))::integer) AND (((j1.fields ->> 'id2'::text))::integer = ((j2.fields ->> 'id2'::text))::integer)) + -> Foreign Scan on j1 + -> Materialize + -> Foreign Scan on j2 +(5 rows) + +--Testcase 548: +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int = any (array[1]); + id1 | id2 | id1 | id2 +-----+-----+-----+----- + 1 | 1 | 1 | 1 + 1 | 2 | 1 | 2 +(2 rows) + +-- Exercise array keys "find extreme element" B-Tree code +--Testcase 549: +explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int >= any (array[1,5]); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Nested Loop + Join Filter: ((((j1.fields ->> 'id1'::text))::integer = ((j2.fields ->> 'id1'::text))::integer) AND (((j1.fields ->> 'id2'::text))::integer = ((j2.fields ->> 'id2'::text))::integer)) + -> Foreign Scan on j1 + -> Materialize + -> Foreign Scan on j2 +(5 rows) + +--Testcase 550: +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int >= any (array[1,5]); + id1 | id2 | id1 | id2 +-----+-----+-----+----- + 1 | 1 | 1 | 1 + 1 | 2 | 1 | 2 +(2 rows) + +--Testcase 551: +reset enable_nestloop; +--Testcase 552: +reset enable_hashjoin; +--Testcase 553: +reset enable_sort; +--Testcase 554: +delete from j1_nsc; +--Testcase 555: +delete from j2_nsc; +--Testcase 556: +delete from j3_nsc; +--Testcase 557: +drop foreign table j1; +--Testcase 644: +drop foreign table j1_nsc; +--Testcase 558: +drop foreign table j2; +--Testcase 645: +drop foreign table j2_nsc; +--Testcase 559: +drop foreign table j3; +--Testcase 646: +drop foreign table j3_nsc; +-- check that semijoin inner is not seen as unique for a portion of the outerrel +--Testcase 560: +CREATE FOREIGN TABLE onek ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS(schemaless 'true'); +-- check that semijoin inner is not seen as unique for a portion of the outerrel +--Testcase 561: +explain (verbose, costs off) +select (t1.fields->>'unique1')::int4 unique1, (t2.fields->>'hundred')::int4 hundred +from onek t1, tenk1 t2 +where exists (select 1 from tenk1 t3 + where (t3.fields->>'thousand')::int4 = (t1.fields->>'unique1')::int4 and (t3.fields->>'tenthous')::int4 = (t2.fields->>'hundred')::int4) + and (t1.fields->>'unique1')::int4 < 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Merge Join + Output: (((t1.fields ->> 'unique1'::text))::integer), ((t2.fields ->> 'hundred'::text))::integer + Merge Cond: ((((t1.fields ->> 'unique1'::text))::integer) = (((t3.fields ->> 'thousand'::text))::integer)) + -> Sort + Output: t1.fields, (((t1.fields ->> 'unique1'::text))::integer) + Sort Key: (((t1.fields ->> 'unique1'::text))::integer) + -> Foreign Scan on public.onek t1 + Output: t1.fields, ((t1.fields ->> 'unique1'::text))::integer + InfluxDB query: SELECT * FROM "onek" WHERE (("unique1" < 1)) + -> Sort + Output: t2.fields, t3.fields, (((t3.fields ->> 'thousand'::text))::integer) + Sort Key: (((t3.fields ->> 'thousand'::text))::integer) + -> Hash Join + Output: t2.fields, t3.fields, ((t3.fields ->> 'thousand'::text))::integer + Hash Cond: (((t2.fields ->> 'hundred'::text))::integer = ((t3.fields ->> 'tenthous'::text))::integer) + -> Foreign Scan on public.tenk1 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "tenk" + -> Hash + Output: t3.fields + -> HashAggregate + Output: t3.fields + Group Key: ((t3.fields ->> 'thousand'::text))::integer, ((t3.fields ->> 'tenthous'::text))::integer + -> Foreign Scan on public.tenk1 t3 + Output: t3.fields, ((t3.fields ->> 'thousand'::text))::integer, ((t3.fields ->> 'tenthous'::text))::integer + InfluxDB query: SELECT * FROM "tenk" +(26 rows) + +-- ... unless it actually is unique +--Testcase 562: +create table j3 as select (fields->>'unique1')::int4 unique1, (fields->>'tenthous')::int4 tenthous from onek; +vacuum analyze j3; +--Testcase 563: +create unique index on j3(unique1, tenthous); +--Testcase 564: +explain (verbose, costs off) +select (t1.fields->>'unique1')::int4 unique1, (t2.fields->>'hundred')::int4 hundred +from onek t1, tenk1 t2 +where exists (select 1 from j3 + where j3.unique1 = (t1.fields->>'unique1')::int4 and j3.tenthous = (t2.fields->>'hundred')::int4) + and (t1.fields->>'unique1')::int4 < 1; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Hash Join + Output: ((t1.fields ->> 'unique1'::text))::integer, ((t2.fields ->> 'hundred'::text))::integer + Hash Cond: (((t2.fields ->> 'hundred'::text))::integer = j3.tenthous) + -> Foreign Scan on public.tenk1 t2 + Output: t2.fields + InfluxDB query: SELECT * FROM "tenk" + -> Hash + Output: t1.fields, j3.tenthous + -> Hash Join + Output: t1.fields, j3.tenthous + Hash Cond: (((t1.fields ->> 'unique1'::text))::integer = j3.unique1) + -> Foreign Scan on public.onek t1 + Output: t1.fields + InfluxDB query: SELECT * FROM "onek" WHERE (("unique1" < 1)) + -> Hash + Output: j3.unique1, j3.tenthous + -> Seq Scan on public.j3 + Output: j3.unique1, j3.tenthous +(18 rows) + +--Testcase 565: +drop table j3; +-- Clean up +--Testcase 647: +DELETE FROM t1_nsc; +--Testcase 648: +DELETE FROM t2_nsc; +--Testcase 649: +DELETE FROM t3_nsc; +--Testcase 650: +DELETE FROM tt1_nsc; +--Testcase 651: +DELETE FROM tt2_nsc; +--Testcase 652: +DELETE FROM tt3_nsc; +--Testcase 653: +DELETE FROM tt4_nsc; +--Testcase 654: +DELETE FROM tt5_nsc; +--Testcase 655: +DELETE FROM tt6_nsc; +--Testcase 656: +DELETE FROM xx_nsc; +--Testcase 657: +DELETE FROM yy_nsc; +--Testcase 658: +DELETE FROM zt1_nsc; +--Testcase 659: +DELETE FROM zt2_nsc; +--Testcase 660: +DELETE FROM nt1_nsc; +--Testcase 661: +DELETE FROM nt2_nsc; +--Testcase 662: +DELETE FROM nt3_nsc; +--Testcase 663: +DELETE FROM parent_nsc; +--Testcase 664: +DELETE FROM child_nsc; +DO $d$ +declare + l_rec record; +begin + for l_rec in (select foreign_table_schema, foreign_table_name + from information_schema.foreign_tables) loop + execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); + end loop; +end; +$d$; +NOTICE: drop cascades to table t2a +NOTICE: drop cascades to view zv1 +--Testcase 566: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 567: +DROP SERVER influxdb_svr CASCADE; +--Testcase 568: +DROP EXTENSION influxdb_fdw; diff --git a/expected/10.18/schemaless/extra/limit.out b/expected/15.0/schemaless/extra/limit.out similarity index 89% rename from expected/10.18/schemaless/extra/limit.out rename to expected/15.0/schemaless/extra/limit.out index 4cb9ad0..bc373b8 100644 --- a/expected/10.18/schemaless/extra/limit.out +++ b/expected/15.0/schemaless/extra/limit.out @@ -1,28 +1,26 @@ \set ECHO none ---Testcase 51: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 52: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- import time column as timestamp and text type --- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- LIMIT -- Check the LIMIT/OFFSET feature of SELECT -- ---Testcase 54: +--Testcase 4: CREATE FOREIGN TABLE onek ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 55: +--Testcase 5: CREATE FOREIGN TABLE int8_tbl(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 56: +--Testcase 6: CREATE FOREIGN TABLE tenk1 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); ---Testcase 1: +--Testcase 7: SELECT ''::text AS two, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 > 50 ORDER BY (fields->>'unique1')::int4 LIMIT 2; @@ -32,7 +30,7 @@ SELECT ''::text AS two, (fields->>'unique1')::int4 unique1, (fields->>'unique2') | 52 | 985 | ACAAAA (2 rows) ---Testcase 2: +--Testcase 8: SELECT ''::text AS five, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 > 60 ORDER BY (fields->>'unique1')::int4 LIMIT 5; @@ -45,7 +43,7 @@ SELECT ''::text AS five, (fields->>'unique1')::int4 unique1, (fields->>'unique2' | 65 | 64 | NCAAAA (5 rows) ---Testcase 3: +--Testcase 9: SELECT ''::text AS two, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 > 60 AND (fields->>'unique1')::int4 < 63 ORDER BY (fields->>'unique1')::int4 LIMIT 5; @@ -55,7 +53,7 @@ SELECT ''::text AS two, (fields->>'unique1')::int4 unique1, (fields->>'unique2') | 62 | 633 | KCAAAA (2 rows) ---Testcase 4: +--Testcase 10: SELECT ''::text AS three, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 > 100 ORDER BY (fields->>'unique1')::int4 LIMIT 3 OFFSET 20; @@ -66,7 +64,7 @@ SELECT ''::text AS three, (fields->>'unique1')::int4 unique1, (fields->>'unique2 | 123 | 777 | TEAAAA (3 rows) ---Testcase 5: +--Testcase 11: SELECT ''::text AS zero, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 < 50 ORDER BY (fields->>'unique1')::int4 DESC LIMIT 8 OFFSET 99; @@ -74,7 +72,7 @@ SELECT ''::text AS zero, (fields->>'unique1')::int4 unique1, (fields->>'unique2' ------+---------+---------+---------- (0 rows) ---Testcase 6: +--Testcase 12: SELECT ''::text AS eleven, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 < 50 ORDER BY (fields->>'unique1')::int4 DESC LIMIT 20 OFFSET 39; @@ -93,7 +91,7 @@ SELECT ''::text AS eleven, (fields->>'unique1')::int4 unique1, (fields->>'unique | 0 | 998 | AAAAAA (11 rows) ---Testcase 7: +--Testcase 13: SELECT ''::text AS ten, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek ORDER BY (fields->>'unique1')::int4 OFFSET 990; @@ -111,7 +109,7 @@ SELECT ''::text AS ten, (fields->>'unique1')::int4 unique1, (fields->>'unique2') | 999 | 152 | LMAAAA (10 rows) ---Testcase 8: +--Testcase 14: SELECT ''::text AS five, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek ORDER BY (fields->>'unique1')::int4 OFFSET 990 LIMIT 5; @@ -124,7 +122,7 @@ SELECT ''::text AS five, (fields->>'unique1')::int4 unique1, (fields->>'unique2' | 994 | 695 | GMAAAA (5 rows) ---Testcase 9: +--Testcase 15: SELECT ''::text AS five, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek ORDER BY (fields->>'unique1')::int4 LIMIT 5 OFFSET 900; @@ -139,7 +137,7 @@ SELECT ''::text AS five, (fields->>'unique1')::int4 unique1, (fields->>'unique2' -- Test null limit and offset. The planner would discard a simple null -- constant, so to ensure executor is exercised, do this: ---Testcase 10: +--Testcase 16: select * from int8_tbl limit (case when random() < 0.5 then null::bigint end); fields ------------------------------------------------------- @@ -150,7 +148,7 @@ select * from int8_tbl limit (case when random() < 0.5 then null::bigint end); {"q1": "4567890123456789", "q2": "-4567890123456789"} (5 rows) ---Testcase 11: +--Testcase 17: select * from int8_tbl offset (case when random() < 0.5 then null::bigint end); fields ------------------------------------------------------- @@ -164,7 +162,7 @@ select * from int8_tbl offset (case when random() < 0.5 then null::bigint end); -- Test assorted cases involving backwards fetch from a LIMIT plan node begin; declare c1 scroll cursor for select * from int8_tbl limit 10; ---Testcase 12: +--Testcase 18: fetch all in c1; fields ------------------------------------------------------- @@ -175,20 +173,20 @@ fetch all in c1; {"q1": "4567890123456789", "q2": "-4567890123456789"} (5 rows) ---Testcase 13: +--Testcase 19: fetch 1 in c1; fields -------- (0 rows) ---Testcase 14: +--Testcase 20: fetch backward 1 in c1; fields ------------------------------------------------------- {"q1": "4567890123456789", "q2": "-4567890123456789"} (1 row) ---Testcase 15: +--Testcase 21: fetch backward all in c1; fields ------------------------------------------------------ @@ -198,13 +196,13 @@ fetch backward all in c1; {"q1": "123", "q2": "456"} (4 rows) ---Testcase 16: +--Testcase 22: fetch backward 1 in c1; fields -------- (0 rows) ---Testcase 17: +--Testcase 23: fetch all in c1; fields ------------------------------------------------------- @@ -216,7 +214,7 @@ fetch all in c1; (5 rows) declare c2 scroll cursor for select * from int8_tbl limit 3; ---Testcase 18: +--Testcase 24: fetch all in c2; fields ----------------------------------------- @@ -225,20 +223,20 @@ fetch all in c2; {"q1": "4567890123456789", "q2": "123"} (3 rows) ---Testcase 19: +--Testcase 25: fetch 1 in c2; fields -------- (0 rows) ---Testcase 20: +--Testcase 26: fetch backward 1 in c2; fields ----------------------------------------- {"q1": "4567890123456789", "q2": "123"} (1 row) ---Testcase 21: +--Testcase 27: fetch backward all in c2; fields ----------------------------------------- @@ -246,13 +244,13 @@ fetch backward all in c2; {"q1": "123", "q2": "456"} (2 rows) ---Testcase 22: +--Testcase 28: fetch backward 1 in c2; fields -------- (0 rows) ---Testcase 23: +--Testcase 29: fetch all in c2; fields ----------------------------------------- @@ -262,7 +260,7 @@ fetch all in c2; (3 rows) declare c3 scroll cursor for select * from int8_tbl offset 3; ---Testcase 24: +--Testcase 30: fetch all in c3; fields ------------------------------------------------------- @@ -270,33 +268,33 @@ fetch all in c3; {"q1": "4567890123456789", "q2": "-4567890123456789"} (2 rows) ---Testcase 25: +--Testcase 31: fetch 1 in c3; fields -------- (0 rows) ---Testcase 26: +--Testcase 32: fetch backward 1 in c3; fields ------------------------------------------------------- {"q1": "4567890123456789", "q2": "-4567890123456789"} (1 row) ---Testcase 27: +--Testcase 33: fetch backward all in c3; fields ------------------------------------------------------ {"q1": "4567890123456789", "q2": "4567890123456789"} (1 row) ---Testcase 28: +--Testcase 34: fetch backward 1 in c3; fields -------- (0 rows) ---Testcase 29: +--Testcase 35: fetch all in c3; fields ------------------------------------------------------- @@ -305,75 +303,107 @@ fetch all in c3; (2 rows) declare c4 scroll cursor for select * from int8_tbl offset 10; ---Testcase 30: +--Testcase 36: fetch all in c4; fields -------- (0 rows) ---Testcase 31: +--Testcase 37: fetch 1 in c4; fields -------- (0 rows) ---Testcase 32: +--Testcase 38: fetch backward 1 in c4; fields -------- (0 rows) ---Testcase 33: +--Testcase 39: fetch backward all in c4; fields -------- (0 rows) ---Testcase 34: +--Testcase 40: fetch backward 1 in c4; fields -------- (0 rows) ---Testcase 35: +--Testcase 41: fetch all in c4; fields -------- (0 rows) declare c5 scroll cursor for select * from int8_tbl order by (fields->>'q1')::int8 fetch first 2 rows with ties; -ERROR: syntax error at or near "with" -LINE 1: ...order by (fields->>'q1')::int8 fetch first 2 rows with ties; - ^ ---Testcase 57: +--Testcase 42: fetch all in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 58: + fields +----------------------------------------- + {"q1": "123", "q2": "456"} + {"q1": "123", "q2": "4567890123456789"} +(2 rows) + +--Testcase 43: fetch 1 in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 59: + fields +-------- +(0 rows) + +--Testcase 44: fetch backward 1 in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 60: + fields +----------------------------------------- + {"q1": "123", "q2": "4567890123456789"} +(1 row) + +--Testcase 45: fetch backward 1 in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 61: + fields +---------------------------- + {"q1": "123", "q2": "456"} +(1 row) + +--Testcase 46: fetch all in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 62: + fields +----------------------------------------- + {"q1": "123", "q2": "4567890123456789"} +(1 row) + +--Testcase 47: fetch backward all in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 63: + fields +----------------------------------------- + {"q1": "123", "q2": "4567890123456789"} + {"q1": "123", "q2": "456"} +(2 rows) + +--Testcase 48: fetch all in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block ---Testcase 64: + fields +----------------------------------------- + {"q1": "123", "q2": "456"} + {"q1": "123", "q2": "4567890123456789"} +(2 rows) + +--Testcase 49: fetch backward all in c5; -ERROR: current transaction is aborted, commands ignored until end of transaction block + fields +----------------------------------------- + {"q1": "123", "q2": "4567890123456789"} + {"q1": "123", "q2": "456"} +(2 rows) + rollback; -- Stress test for variable LIMIT in conjunction with bounded-heap sorting ---Testcase 65: +--Testcase 50: CREATE FOREIGN TABLE generate_series4(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 36: +--Testcase 51: SELECT (SELECT (fields->>'a')::int a FROM (VALUES (1)) AS x, @@ -398,9 +428,9 @@ SELECT -- Test behavior of volatile and set-returning functions in conjunction -- with ORDER BY and LIMIT. -- ---Testcase 66: +--Testcase 52: create temp sequence testseq; ---Testcase 37: +--Testcase 53: explain (verbose, costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, nextval('testseq') from tenk1 order by (fields->>'unique2')::int4 limit 10; @@ -418,7 +448,7 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, n InfluxDB query: SELECT "unique1", "unique2" FROM "tenk" (10 rows) ---Testcase 38: +--Testcase 54: select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, nextval('testseq') from tenk1 order by (fields->>'unique2')::int4 limit 10; unique1 | unique2 | nextval @@ -435,14 +465,14 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, n 3043 | 9 | 10 (10 rows) ---Testcase 39: +--Testcase 55: select currval('testseq'); currval --------- 10 (1 row) ---Testcase 40: +--Testcase 56: explain (verbose, costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, nextval('testseq') from tenk1 order by (fields->>'tenthous')::int4 limit 10; @@ -460,7 +490,7 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, n InfluxDB query: SELECT "unique1", "unique2", "tenthous" FROM "tenk" (10 rows) ---Testcase 41: +--Testcase 57: select(fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, nextval('testseq') from tenk1 order by (fields->>'tenthous')::int4 limit 10; unique1 | unique2 | nextval @@ -477,14 +507,14 @@ select(fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, ne 9 | 4463 | 20 (10 rows) ---Testcase 42: +--Testcase 58: select currval('testseq'); currval --------- 20 (1 row) ---Testcase 43: +--Testcase 59: explain (verbose, costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, generate_series(1,10) from tenk1 order by (fields->>'unique2')::int4 limit 7; @@ -502,7 +532,7 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, g InfluxDB query: SELECT "unique1", "unique2" FROM "tenk" (10 rows) ---Testcase 44: +--Testcase 60: select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, generate_series(1,10) from tenk1 order by (fields->>'unique2')::int4 limit 7; unique1 | unique2 | generate_series @@ -516,7 +546,7 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, g 8800 | 0 | 7 (7 rows) ---Testcase 45: +--Testcase 61: explain (verbose, costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, generate_series(1,10) from tenk1 order by (fields->>'tenthous')::int4 limit 7; @@ -534,7 +564,7 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, g InfluxDB query: SELECT "unique1", "unique2", "tenthous" FROM "tenk" (10 rows) ---Testcase 46: +--Testcase 62: select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, generate_series(1,10) from tenk1 order by (fields->>'tenthous')::int4 limit 7; unique1 | unique2 | generate_series @@ -549,7 +579,7 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, g (7 rows) -- use of random() is to keep planner from folding the expressions together ---Testcase 47: +--Testcase 63: explain (verbose, costs off) select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; QUERY PLAN @@ -559,7 +589,7 @@ select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; -> Result (3 rows) ---Testcase 48: +--Testcase 64: select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; s1 | s2 ----+---- @@ -568,7 +598,7 @@ select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; 2 | 2 (3 rows) ---Testcase 49: +--Testcase 65: explain (verbose, costs off) select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2 order by s2 desc; @@ -582,7 +612,7 @@ order by s2 desc; -> Result (6 rows) ---Testcase 50: +--Testcase 66: select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2 order by s2 desc; s1 | s2 @@ -632,23 +662,56 @@ select sum((fields->>'tenthous')::int4) as s1, sum((fields->>'tenthous')::int4) SELECT (fields->>'thousand')::int4 thousand FROM onek WHERE (fields->>'thousand')::int4 < 5 ORDER BY (fields->>'thousand')::int4 FETCH FIRST 2 ROW WITH TIES; -ERROR: syntax error at or near "WITH" -LINE 3: ... BY (fields->>'thousand')::int4 FETCH FIRST 2 ROW WITH TIES; - ^ + thousand +---------- + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 +(10 rows) + --Testcase 70: SELECT (fields->>'thousand')::int4 thousand FROM onek WHERE (fields->>'thousand')::int4 < 5 ORDER BY (fields->>'thousand')::int4 FETCH FIRST ROWS WITH TIES; -ERROR: syntax error at or near "WITH" -LINE 3: ...R BY (fields->>'thousand')::int4 FETCH FIRST ROWS WITH TIES; - ^ + thousand +---------- + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 +(10 rows) + --Testcase 71: SELECT (fields->>'thousand')::int4 thousand FROM onek WHERE (fields->>'thousand')::int4 < 5 ORDER BY (fields->>'thousand')::int4 FETCH FIRST 1 ROW WITH TIES; -ERROR: syntax error at or near "WITH" -LINE 3: ... BY (fields->>'thousand')::int4 FETCH FIRST 1 ROW WITH TIES; - ^ + thousand +---------- + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 +(10 rows) + --Testcase 72: SELECT (fields->>'thousand')::int4 thousand FROM onek WHERE (fields->>'thousand')::int4 < 5 @@ -659,23 +722,36 @@ SELECT (fields->>'thousand')::int4 thousand 0 (2 rows) +-- SKIP LOCKED and WITH TIES are incompatible +--Testcase 90: +SELECT (fields->>'thousand')::int4 thousand + FROM onek WHERE (fields->>'thousand')::int4 < 5 + ORDER BY (fields->>'thousand')::int4 FETCH FIRST 1 ROW WITH TIES FOR UPDATE SKIP LOCKED; +ERROR: SKIP LOCKED and WITH TIES options cannot be used together -- should fail --Testcase 73: SELECT ''::text AS two, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 > 50 FETCH FIRST 2 ROW WITH TIES; -ERROR: syntax error at or near "WITH" -LINE 3: FETCH FIRST 2 ROW WITH TIES; - ^ +ERROR: WITH TIES cannot be specified without ORDER BY clause -- test ruleutils --Testcase 74: CREATE VIEW limit_thousand_v_1 AS SELECT (fields->>'thousand')::int4 thousand FROM onek WHERE (fields->>'thousand')::int4 < 995 ORDER BY (fields->>'thousand')::int4 FETCH FIRST 5 ROWS WITH TIES OFFSET 10; -ERROR: syntax error at or near "WITH" -LINE 2: ...BY (fields->>'thousand')::int4 FETCH FIRST 5 ROWS WITH TIES ... - ^ --Testcase 75: \d+ limit_thousand_v_1 + View "public.limit_thousand_v_1" + Column | Type | Collation | Nullable | Default | Storage | Description +----------+---------+-----------+----------+---------+---------+------------- + thousand | integer | | | | plain | +View definition: + SELECT (onek.fields ->> 'thousand'::text)::integer AS thousand + FROM onek + WHERE ((onek.fields ->> 'thousand'::text)::integer) < 995 + ORDER BY ((onek.fields ->> 'thousand'::text)::integer) + OFFSET 10 + FETCH FIRST 5 ROWS WITH TIES; + --Testcase 76: CREATE VIEW limit_thousand_v_2 AS SELECT (fields->>'thousand')::int4 thousand FROM onek WHERE (fields->>'thousand')::int4 < 995 ORDER BY (fields->>'thousand')::int4 OFFSET 10 FETCH FIRST 5 ROWS ONLY; @@ -696,17 +772,23 @@ View definition: --Testcase 78: CREATE VIEW limit_thousand_v_3 AS SELECT (fields->>'thousand')::int4 thousand FROM onek WHERE (fields->>'thousand')::int4 < 995 ORDER BY (fields->>'thousand')::int4 FETCH FIRST NULL ROWS WITH TIES; -- fails -ERROR: syntax error at or near "WITH" -LINE 2: ...(fields->>'thousand')::int4 FETCH FIRST NULL ROWS WITH TIES; - ^ +ERROR: row count cannot be null in FETCH FIRST ... WITH TIES clause --Testcase 79: CREATE VIEW limit_thousand_v_3 AS SELECT (fields->>'thousand')::int4 thousand FROM onek WHERE (fields->>'thousand')::int4 < 995 ORDER BY (fields->>'thousand')::int4 FETCH FIRST (NULL+1) ROWS WITH TIES; -ERROR: syntax error at or near "WITH" -LINE 2: ...lds->>'thousand')::int4 FETCH FIRST (NULL+1) ROWS WITH TIES; - ^ --Testcase 80: \d+ limit_thousand_v_3 + View "public.limit_thousand_v_3" + Column | Type | Collation | Nullable | Default | Storage | Description +----------+---------+-----------+----------+---------+---------+------------- + thousand | integer | | | | plain | +View definition: + SELECT (onek.fields ->> 'thousand'::text)::integer AS thousand + FROM onek + WHERE ((onek.fields ->> 'thousand'::text)::integer) < 995 + ORDER BY ((onek.fields ->> 'thousand'::text)::integer) + FETCH FIRST (NULL::integer + 1) ROWS WITH TIES; + --Testcase 81: CREATE VIEW limit_thousand_v_4 AS SELECT (fields->>'thousand')::int4 thousand FROM onek WHERE (fields->>'thousand')::int4 < 995 ORDER BY (fields->>'thousand')::int4 FETCH FIRST NULL ROWS ONLY; @@ -726,12 +808,10 @@ View definition: -- leave these views --Testcase 83: DROP VIEW limit_thousand_v_1; -ERROR: view "limit_thousand_v_1" does not exist --Testcase 84: DROP VIEW limit_thousand_v_2; --Testcase 85: DROP VIEW limit_thousand_v_3; -ERROR: view "limit_thousand_v_3" does not exist --Testcase 86: DROP VIEW limit_thousand_v_4; -- Clean up diff --git a/expected/11.13/schemaless/extra/prepare.out b/expected/15.0/schemaless/extra/prepare.out similarity index 99% rename from expected/11.13/schemaless/extra/prepare.out rename to expected/15.0/schemaless/extra/prepare.out index e2ab018..8f7029a 100644 --- a/expected/11.13/schemaless/extra/prepare.out +++ b/expected/15.0/schemaless/extra/prepare.out @@ -2,41 +2,41 @@ -- of the pg_prepared_statements view as prepared statements are -- created and removed. \set ECHO none ---Testcase 27: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 28: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 30: + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: CREATE FOREIGN TABLE tenk1 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); -- Does not support this command -- ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 31: +--Testcase 5: CREATE FOREIGN TABLE road ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 32: +--Testcase 6: CREATE FOREIGN TABLE road_tmp (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 1: +--Testcase 7: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) ---Testcase 2: +--Testcase 8: PREPARE q1 AS SELECT (fields->>'a')::int AS a FROM road_tmp; ---Testcase 3: +--Testcase 9: EXECUTE q1; a --- 1 (1 row) ---Testcase 4: +--Testcase 10: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------------------------+----------------- @@ -44,23 +44,23 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; (1 row) -- should fail ---Testcase 5: +--Testcase 11: PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; ERROR: prepared statement "q1" already exists -- should succeed DEALLOCATE q1; ---Testcase 6: +--Testcase 12: PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; ---Testcase 7: +--Testcase 13: EXECUTE q1; b --- 2 (1 row) ---Testcase 8: +--Testcase 14: PREPARE q2 AS SELECT (fields->>'b')::int AS b FROM road_tmp; ---Testcase 9: +--Testcase 15: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------------------------+----------------- @@ -70,7 +70,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; -- sql92 syntax DEALLOCATE PREPARE q1; ---Testcase 10: +--Testcase 16: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+--------------------------------------------------------------+----------------- @@ -79,30 +79,30 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements; DEALLOCATE PREPARE q2; -- the view should return the empty set again ---Testcase 11: +--Testcase 17: SELECT name, statement, parameter_types FROM pg_prepared_statements; name | statement | parameter_types ------+-----------+----------------- (0 rows) -- parameterized queries ---Testcase 12: +--Testcase 18: PREPARE q2(text) AS SELECT datname, datistemplate, datallowconn FROM pg_database WHERE datname = $1; ---Testcase 13: +--Testcase 19: EXECUTE q2('postgres'); datname | datistemplate | datallowconn ----------+---------------+-------------- postgres | f | t (1 row) ---Testcase 14: +--Testcase 20: PREPARE q3(text, int, float, boolean, smallint) AS SELECT * FROM tenk1 WHERE fields->>'string4' = $1 AND ((fields->>'four')::int = $2 OR (fields->>'ten')::int = $3::bigint OR true = $4 OR (fields->>'odd')::int = $5::int) ORDER BY (fields->>'unique1')::int; ---Testcase 15: +--Testcase 21: EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); fields ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -138,34 +138,36 @@ EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); (29 rows) -- too few params ---Testcase 16: +--Testcase 22: EXECUTE q3('bool'); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 1. -- too many params ---Testcase 17: +--Testcase 23: EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); ERROR: wrong number of parameters for prepared statement "q3" DETAIL: Expected 5 parameters but got 6. -- wrong param types ---Testcase 18: +--Testcase 24: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); ERROR: parameter $3 of type boolean cannot be coerced to the expected type double precision +LINE 1: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'byte... + ^ HINT: You will need to rewrite or cast the expression. -- invalid type ---Testcase 19: +--Testcase 25: PREPARE q4(nonexistenttype) AS SELECT $1; ERROR: type "nonexistenttype" does not exist LINE 1: PREPARE q4(nonexistenttype) AS SELECT $1; ^ -- create table as execute ---Testcase 20: +--Testcase 26: PREPARE q5(int, text) AS SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 OR fields->>'stringu1' = $2 ORDER BY (fields->>'unique1')::int; ---Testcase 33: +--Testcase 27: CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); ---Testcase 21: +--Testcase 28: SELECT * FROM q5_prep_results; fields ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -187,23 +189,23 @@ SELECT * FROM q5_prep_results; {"odd": "122", "ten": "1", "two": "1", "even": "123", "four": "1", "twenty": "1", "hundred": "61", "string4": "OOOOxx", "unique1": "9961", "unique2": "2058", "stringu1": "DTAAAA", "stringu2": "EBDAAA", "tenthous": "9961", "thousand": "961", "fivethous": "4961", "twothousand": "1961"} (16 rows) ---Testcase 34: +--Testcase 29: CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') WITH NO DATA; ---Testcase 22: +--Testcase 30: SELECT * FROM q5_prep_nodata; fields -------- (0 rows) -- unknown or unspecified parameter types: should succeed ---Testcase 23: +--Testcase 31: PREPARE q6 AS SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 AND fields->>'stringu1' = $2; ---Testcase 24: +--Testcase 32: PREPARE q7(unknown) AS SELECT * FROM road WHERE fields->>'thepath' = $1; ---Testcase 25: +--Testcase 33: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types @@ -226,7 +228,7 @@ SELECT name, statement, parameter_types FROM pg_prepared_statements -- test DEALLOCATE ALL; DEALLOCATE ALL; ---Testcase 26: +--Testcase 34: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; name | statement | parameter_types diff --git a/expected/10.18/schemaless/extra/select.out b/expected/15.0/schemaless/extra/select.out similarity index 98% rename from expected/10.18/schemaless/extra/select.out rename to expected/15.0/schemaless/extra/select.out index 522c26f..7df5b87 100644 --- a/expected/10.18/schemaless/extra/select.out +++ b/expected/15.0/schemaless/extra/select.out @@ -2,40 +2,40 @@ -- SELECT -- \set ECHO none ---Testcase 52: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 53: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); ---Testcase 55: + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: CREATE FOREIGN TABLE onek ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 56: +--Testcase 5: CREATE FOREIGN TABLE onek2 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (table 'onek', schemaless 'true'); ---Testcase 57: +--Testcase 6: CREATE FOREIGN TABLE INT8_TBL ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 58: +--Testcase 7: CREATE FOREIGN TABLE person ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 59: +--Testcase 8: CREATE FOREIGN TABLE emp ( fields jsonb OPTIONS (fields 'true') ) INHERITS (person) SERVER influxdb_svr OPTIONS (schemaless 'true'); NOTICE: merging column "fields" with inherited definition ---Testcase 60: +--Testcase 9: CREATE FOREIGN TABLE student ( fields jsonb OPTIONS (fields 'true') ) INHERITS (person) SERVER influxdb_svr OPTIONS (schemaless 'true'); NOTICE: merging column "fields" with inherited definition ---Testcase 61: +--Testcase 10: CREATE FOREIGN TABLE stud_emp ( fields jsonb OPTIONS (fields 'true') ) INHERITS (emp, student) SERVER influxdb_svr OPTIONS (schemaless 'true'); @@ -44,7 +44,7 @@ NOTICE: merging column "fields" with inherited definition -- btree index -- awk '{if($1<10){print;}else{next;}}' onek.data | sort +0n -1 -- ---Testcase 1: +--Testcase 11: SELECT * FROM onek WHERE (onek.fields->>'unique1')::int4 < 10 ORDER BY (onek.fields->>'unique1')::int4; @@ -65,7 +65,7 @@ SELECT * FROM onek -- -- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 -- ---Testcase 2: +--Testcase 12: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'stringu1')::name stringu1 FROM onek WHERE (onek.fields->>'unique1')::int4 < 20 ORDER BY (onek.fields->>'unique1')::int4 using >; @@ -96,7 +96,7 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'stringu1')::name -- -- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 -- ---Testcase 3: +--Testcase 13: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'stringu1')::name stringu1 FROM onek WHERE (onek.fields->>'unique1')::int4 > 980 ORDER BY (fields->>'stringu1')::name using <; @@ -127,7 +127,7 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'stringu1')::name -- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | -- sort +1d -2 +0nr -1 -- ---Testcase 4: +--Testcase 14: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name string4 FROM onek WHERE (onek.fields->>'unique1')::int4 > 980 ORDER BY (fields->>'string4')::name using <, (fields->>'unique1')::int4 using >; @@ -158,7 +158,7 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name -- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | -- sort +1dr -2 +0n -1 -- ---Testcase 5: +--Testcase 15: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name string4 FROM onek WHERE (onek.fields->>'unique1')::int4 > 980 ORDER BY (fields->>'string4')::name using >, (fields->>'unique1')::int4 using <; @@ -189,7 +189,7 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name -- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | -- sort +0nr -1 +1d -2 -- ---Testcase 6: +--Testcase 16: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name string4 FROM onek WHERE (onek.fields->>'unique1')::int4 < 20 ORDER BY (fields->>'unique1')::int4 using >, (fields->>'string4')::name using <; @@ -221,7 +221,7 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name -- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | -- sort +0n -1 +1dr -2 -- ---Testcase 7: +--Testcase 17: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name string4 FROM onek WHERE (onek.fields->>'unique1')::int4 < 20 ORDER BY (fields->>'unique1')::int4 using <, (fields->>'string4')::name using >; @@ -257,13 +257,16 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name -- followed by sort, because that could hide index ordering problems. -- -- ANALYZE onek2; +--Testcase 18: SET enable_seqscan TO off; +--Testcase 19: SET enable_bitmapscan TO off; +--Testcase 20: SET enable_sort TO off; -- -- awk '{if($1<10){print $0;}else{next;}}' onek.data | sort +0n -1 -- ---Testcase 8: +--Testcase 21: SELECT onek2.* FROM onek2 WHERE (onek2.fields->>'unique1')::int4 < 10 order by 1; fields ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -282,7 +285,7 @@ SELECT onek2.* FROM onek2 WHERE (onek2.fields->>'unique1')::int4 < 10 order by 1 -- -- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 -- ---Testcase 9: +--Testcase 22: SELECT (onek2.fields->>'unique1')::int4 unique1, (onek2.fields->>'stringu1')::name stringu1 FROM onek2 WHERE (onek2.fields->>'unique1')::int4 < 20 ORDER BY (fields->>'unique1')::int4 using >; @@ -313,7 +316,7 @@ SELECT (onek2.fields->>'unique1')::int4 unique1, (onek2.fields->>'stringu1')::na -- -- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 -- ---Testcase 10: +--Testcase 23: SELECT (onek2.fields->>'unique1')::int4 unique1, (onek2.fields->>'stringu1')::name stringu1 FROM onek2 WHERE (onek2.fields->>'unique1')::int4 > 980 order by 1; unique1 | stringu1 @@ -339,13 +342,16 @@ SELECT (onek2.fields->>'unique1')::int4 unique1, (onek2.fields->>'stringu1')::na 999 | LMAAAA (19 rows) +--Testcase 24: RESET enable_seqscan; +--Testcase 25: RESET enable_bitmapscan; +--Testcase 26: RESET enable_sort; ---Testcase 11: -SELECT (fields->>'two')::int4 two, (fields->>'stringu1')::name stringu1, (fields->>'ten')::int4 ten, (fields->>'string4')::name string4 - INTO TABLE tmp - FROM onek; +--Testcase 27: +--SELECT (fields->>'two')::int4 two, (fields->>'stringu1')::name stringu1, (fields->>'ten')::int4 ten, (fields->>'string4')::name string4 +-- INTO TABLE tmp +-- FROM onek; -- -- awk '{print $1,$2;}' person.data | -- awk '{if(NF!=2){print $3,$2;}else{print;}}' - emp.data | @@ -353,7 +359,7 @@ SELECT (fields->>'two')::int4 two, (fields->>'stringu1')::name stringu1, (fields -- awk 'BEGIN{FS=" ";}{if(NF!=2){print $4,$5;}else{print;}}' - stud_emp.data -- -- SELECT name, age FROM person*; ??? check if different ---Testcase 12: +--Testcase 28: SELECT p.fields->>'name' "name", (p.fields->>'age')::int4 age FROM person* p; name | age ---------+----- @@ -424,7 +430,7 @@ SELECT p.fields->>'name' "name", (p.fields->>'age')::int4 age FROM person* p; -- awk 'BEGIN{FS=" ";}{if(NF!=1){print $4,$5;}else{print;}}' - stud_emp.data | -- sort +1nr -2 -- ---Testcase 13: +--Testcase 29: SELECT p.fields->>'name' "name", (p.fields->>'age')::int4 age FROM person* p ORDER BY (fields->>'age')::int4 using >, fields->>'name'; name | age ---------+----- @@ -491,21 +497,21 @@ SELECT p.fields->>'name' "name", (p.fields->>'age')::int4 age FROM person* p ORD -- -- Test some cases involving whole-row Var referencing a subquery -- ---Testcase 14: +--Testcase 30: select foo from (select 1 offset 0) as foo; foo ----- (1) (1 row) ---Testcase 15: +--Testcase 31: select foo from (select null offset 0) as foo; foo ----- () (1 row) ---Testcase 16: +--Testcase 32: select foo from (select 'xyzzy',1,null offset 0) as foo; foo ------------ @@ -515,7 +521,7 @@ select foo from (select 'xyzzy',1,null offset 0) as foo; -- -- Test VALUES lists -- ---Testcase 17: +--Testcase 33: select * from onek, (values(147, 'RFAAAA'), (931, 'VJAAAA')) as v (i, j) WHERE (onek.fields->>'unique1')::int4 = v.i and (onek.fields->>'stringu1')::name = v.j; fields | i | j @@ -526,7 +532,7 @@ select * from onek, (values(147, 'RFAAAA'), (931, 'VJAAAA')) as v (i, j) -- a more complex case -- looks like we're coding lisp :-) ---Testcase 18: +--Testcase 34: select * from onek, (values ((select i from (values(10000), (2), (389), (1000), (2000), ((select 10029))) as foo(i) @@ -538,7 +544,7 @@ select * from onek, (1 row) -- try VALUES in a subquery ---Testcase 19: +--Testcase 35: select * from onek where ((fields->>'unique1')::int4,(fields->>'ten')::int4) in (values (1,1), (20,0), (99,9), (17,99)) order by (fields->>'unique1')::int4; @@ -550,7 +556,7 @@ select * from onek (3 rows) -- VALUES is also legal as a standalone query or a set-operation member ---Testcase 20: +--Testcase 36: VALUES (1,2), (3,4+4), (7,77.7); column1 | column2 ---------+--------- @@ -559,7 +565,7 @@ VALUES (1,2), (3,4+4), (7,77.7); 7 | 77.7 (3 rows) ---Testcase 21: +--Testcase 37: VALUES (1,2), (3,4+4), (7,77.7) UNION ALL SELECT 2+2, 57 @@ -578,12 +584,20 @@ SELECT (fields->>'q1')::int8, (fields->>'q2')::int8 FROM int8_tbl; 4567890123456789 | -4567890123456789 (9 rows) +-- -- corner case: VALUES with no columns +-- InfluxDB not support table with no columns. +-- --Testcase 79: +-- CREATE FOREIGN TABLE nocols() SERVER influxdb_svr; +-- --Testcase 80: +-- INSERT INTO nocols DEFAULT VALUES; +-- --Testcase 81: +-- SELECT * FROM nocols n, LATERAL (VALUES(n.*)) v; -- -- Test ORDER BY options -- ---Testcase 62: +--Testcase 38: CREATE FOREIGN TABLE foo (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 22: +--Testcase 39: SELECT * FROM foo ORDER BY (fields->>'f1')::int; fields -------------- @@ -594,7 +608,7 @@ SELECT * FROM foo ORDER BY (fields->>'f1')::int; {"f1": "42"} (5 rows) ---Testcase 23: +--Testcase 40: SELECT * FROM foo ORDER BY (fields->>'f1')::int ASC; -- same thing fields -------------- @@ -605,7 +619,7 @@ SELECT * FROM foo ORDER BY (fields->>'f1')::int ASC; -- same thing {"f1": "42"} (5 rows) ---Testcase 24: +--Testcase 41: SELECT * FROM foo ORDER BY (fields->>'f1')::int NULLS FIRST; fields -------------- @@ -616,7 +630,7 @@ SELECT * FROM foo ORDER BY (fields->>'f1')::int NULLS FIRST; {"f1": "42"} (5 rows) ---Testcase 25: +--Testcase 42: SELECT * FROM foo ORDER BY (fields->>'f1')::int DESC; fields -------------- @@ -627,7 +641,7 @@ SELECT * FROM foo ORDER BY (fields->>'f1')::int DESC; {"f1": "1"} (5 rows) ---Testcase 26: +--Testcase 43: SELECT * FROM foo ORDER BY (fields->>'f1')::int DESC NULLS LAST; fields -------------- @@ -661,7 +675,7 @@ SELECT * FROM foo ORDER BY (fields->>'f1')::int DESC NULLS LAST; -- Test planning of some cases with partial indexes -- -- partial index is usable ---Testcase 27: +--Testcase 44: explain (costs off) select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name = 'ATAAAA'; QUERY PLAN @@ -670,7 +684,7 @@ select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu Filter: (((fields ->> 'stringu1'::text))::name = 'ATAAAA'::name) (2 rows) ---Testcase 28: +--Testcase 45: select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name = 'ATAAAA'; fields ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -678,7 +692,7 @@ select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu (1 row) -- actually run the query with an analyze to use the partial index ---Testcase 63: +--Testcase 46: explain (costs off, analyze on, timing off, summary off) select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name = 'ATAAAA'; QUERY PLAN @@ -687,7 +701,7 @@ select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu Filter: (((fields ->> 'stringu1'::text))::name = 'ATAAAA'::name) (2 rows) ---Testcase 30: +--Testcase 47: explain (costs off) select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name = 'ATAAAA'; QUERY PLAN @@ -696,7 +710,7 @@ select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2'): Filter: (((fields ->> 'stringu1'::text))::name = 'ATAAAA'::name) (2 rows) ---Testcase 31: +--Testcase 48: select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name = 'ATAAAA'; unique2 --------- @@ -704,7 +718,7 @@ select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2'): (1 row) -- partial index predicate implies clause, so no need for retest ---Testcase 32: +--Testcase 49: explain (costs off) select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; QUERY PLAN @@ -713,14 +727,14 @@ select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu Filter: (((fields ->> 'stringu1'::text))::name < 'B'::name) (2 rows) ---Testcase 33: +--Testcase 50: select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; fields ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {"odd": "8", "ten": "4", "two": "0", "even": "9", "four": "2", "twenty": "14", "hundred": "4", "string4": "VVVVxx", "unique1": "494", "unique2": "11", "stringu1": "ATAAAA", "stringu2": "LAAAAA", "tenthous": "494", "thousand": "94", "fivethous": "494", "twothousand": "94"} (1 row) ---Testcase 34: +--Testcase 51: explain (costs off) select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; QUERY PLAN @@ -729,7 +743,7 @@ select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2'): Filter: (((fields ->> 'stringu1'::text))::name < 'B'::name) (2 rows) ---Testcase 35: +--Testcase 52: select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; unique2 --------- @@ -737,7 +751,7 @@ select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2'): (1 row) -- but if it's an update target, must retest anyway ---Testcase 36: +--Testcase 53: explain (costs off) select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B' for update; QUERY PLAN @@ -747,7 +761,7 @@ select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2'): Filter: (((fields ->> 'stringu1'::text))::name < 'B'::name) (3 rows) ---Testcase 37: +--Testcase 54: select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B' for update; unique2 --------- @@ -755,7 +769,7 @@ select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2'): (1 row) -- partial index is not applicable ---Testcase 38: +--Testcase 55: explain (costs off) select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'C'; QUERY PLAN @@ -764,7 +778,7 @@ select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2'): Filter: (((fields ->> 'stringu1'::text))::name < 'C'::name) (2 rows) ---Testcase 39: +--Testcase 56: select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'C'; unique2 --------- @@ -772,8 +786,9 @@ select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2'): (1 row) -- partial index implies clause, but bitmap scan must recheck predicate anyway +--Testcase 57: SET enable_indexscan TO off; ---Testcase 40: +--Testcase 58: explain (costs off) select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; QUERY PLAN @@ -782,16 +797,17 @@ select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2'): Filter: (((fields ->> 'stringu1'::text))::name < 'B'::name) (2 rows) ---Testcase 41: +--Testcase 59: select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; unique2 --------- 11 (1 row) +--Testcase 60: RESET enable_indexscan; -- check multi-index cases too ---Testcase 42: +--Testcase 61: explain (costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from onek2 where ((fields->>'unique2')::int4 = 11 or (fields->>'unique1')::int4 = 0) and (fields->>'stringu1')::name < 'B'; @@ -801,7 +817,7 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 fr Filter: (((fields ->> 'stringu1'::text))::name < 'B'::name) (2 rows) ---Testcase 43: +--Testcase 62: select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from onek2 where ((fields->>'unique2')::int4 = 11 or (fields->>'unique1')::int4 = 0) and (fields->>'stringu1')::name < 'B'; unique1 | unique2 @@ -810,7 +826,7 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 fr 0 | 998 (2 rows) ---Testcase 44: +--Testcase 63: explain (costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from onek2 where ((fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B') or (fields->>'unique1')::int4 = 0; @@ -820,7 +836,7 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 fr Filter: (((((fields ->> 'unique2'::text))::integer = 11) AND (((fields ->> 'stringu1'::text))::name < 'B'::name)) OR (((fields ->> 'unique1'::text))::integer = 0)) (2 rows) ---Testcase 45: +--Testcase 64: select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from onek2 where ((fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B') or (fields->>'unique1')::int4 = 0; unique1 | unique2 @@ -833,7 +849,7 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 fr -- Test some corner cases that have been known to confuse the planner -- -- ORDER BY on a constant doesn't really need any sorting ---Testcase 46: +--Testcase 65: SELECT 1 AS x ORDER BY x; x --- @@ -841,10 +857,10 @@ SELECT 1 AS x ORDER BY x; (1 row) -- But ORDER BY on a set-valued expression does ---Testcase 64: +--Testcase 66: create function sillysrf(int) returns setof int as 'values (1),(10),(2),($1)' language sql immutable; ---Testcase 47: +--Testcase 67: select sillysrf(42); sillysrf ---------- @@ -854,7 +870,7 @@ select sillysrf(42); 42 (4 rows) ---Testcase 48: +--Testcase 68: select sillysrf(-1) order by 1; sillysrf ---------- @@ -864,11 +880,11 @@ select sillysrf(-1) order by 1; 10 (4 rows) ---Testcase 65: +--Testcase 69: drop function sillysrf(int); -- X = X isn't a no-op, it's effectively X IS NOT NULL assuming = is strict -- (see bug #5084) ---Testcase 49: +--Testcase 70: select * from (values (2),(null),(1)) v(k) where k = k order by k; k --- @@ -876,7 +892,7 @@ select * from (values (2),(null),(1)) v(k) where k = k order by k; 2 (2 rows) ---Testcase 50: +--Testcase 71: select * from (values (2),(null),(1)) v(k) where k = k; k --- @@ -886,12 +902,12 @@ select * from (values (2),(null),(1)) v(k) where k = k; -- Test partitioned tables with no partitions, which should be handled the -- same as the non-inheritance case when expanding its RTE. ---Testcase 66: +--Testcase 72: create table list_parted_tbl (a int,b int) partition by list (a); ---Testcase 67: +--Testcase 73: create table list_parted_tbl1 partition of list_parted_tbl for values in (1) partition by list(b); ---Testcase 51: +--Testcase 74: explain (costs off) select * from list_parted_tbl; QUERY PLAN -------------------------- @@ -899,13 +915,13 @@ explain (costs off) select * from list_parted_tbl; One-Time Filter: false (2 rows) ---Testcase 68: +--Testcase 75: drop table list_parted_tbl; -- Clean up: -DROP TABLE IF EXISTS tmp; ---Testcase 69: +--DROP TABLE IF EXISTS tmp; +--Testcase 76: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 70: +--Testcase 77: DROP SERVER influxdb_svr CASCADE; NOTICE: drop cascades to 8 other objects DETAIL: drop cascades to foreign table onek @@ -916,5 +932,5 @@ drop cascades to foreign table emp drop cascades to foreign table student drop cascades to foreign table stud_emp drop cascades to foreign table foo ---Testcase 71: +--Testcase 78: DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/schemaless/extra/select_having.out b/expected/15.0/schemaless/extra/select_having.out new file mode 100644 index 0000000..7b0a8f5 --- /dev/null +++ b/expected/15.0/schemaless/extra/select_having.out @@ -0,0 +1,137 @@ +-- +-- SELECT_HAVING +-- +\set ECHO none +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +--Testcase 4: +CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 30: +CREATE FOREIGN TABLE test_having_nsc (a int, b int, c char(8), d char) SERVER influxdb_svr OPTIONS (table 'test_having'); +--Testcase 5: +INSERT INTO test_having_nsc VALUES (0, 1, 'XXXX', 'A'); +--Testcase 6: +INSERT INTO test_having_nsc VALUES (1, 2, 'AAAA', 'b'); +--Testcase 7: +INSERT INTO test_having_nsc VALUES (2, 2, 'AAAA', 'c'); +--Testcase 8: +INSERT INTO test_having_nsc VALUES (3, 3, 'BBBB', 'D'); +--Testcase 9: +INSERT INTO test_having_nsc VALUES (4, 3, 'BBBB', 'e'); +--Testcase 10: +INSERT INTO test_having_nsc VALUES (5, 3, 'bbbb', 'F'); +--Testcase 11: +INSERT INTO test_having_nsc VALUES (6, 4, 'cccc', 'g'); +--Testcase 12: +INSERT INTO test_having_nsc VALUES (7, 4, 'cccc', 'h'); +--Testcase 13: +INSERT INTO test_having_nsc VALUES (8, 4, 'CCCC', 'I'); +--Testcase 14: +INSERT INTO test_having_nsc VALUES (9, 4, 'CCCC', 'j'); +--Testcase 15: +SELECT (fields->>'b')::int b, fields->>'c' c FROM test_having + GROUP BY fields->>'b', fields->>'c' HAVING count(*) = 1 ORDER BY (fields->>'b')::int, fields->>'c'; + b | c +---+---------- + 1 | XXXX + 3 | bbbb +(2 rows) + +-- HAVING is effectively equivalent to WHERE in this case +--Testcase 16: +SELECT (fields->>'b')::int b, fields->>'c' c FROM test_having + GROUP BY fields->>'b', fields->>'c' HAVING (fields->>'b')::int = 3 ORDER BY (fields->>'b')::int, fields->>'c'; + b | c +---+---------- + 3 | bbbb + 3 | BBBB +(2 rows) + +--Testcase 17: +SELECT lower((fields->>'c')::char(8)), count(fields->>'c') FROM test_having + GROUP BY lower((fields->>'c')::char(8)) HAVING count(*) > 2 OR min((fields->>'a')::int) = max((fields->>'a')::int) + ORDER BY lower((fields->>'c')::char(8)); + lower | count +-------+------- + bbbb | 3 + cccc | 4 + xxxx | 1 +(3 rows) + +--Testcase 18: +SELECT fields->>'c' c, max((fields->>'a')::int) FROM test_having + GROUP BY fields->>'c' HAVING count(*) > 2 OR min((fields->>'a')::int) = max((fields->>'a')::int) + ORDER BY fields->>'c'; + c | max +----------+----- + bbbb | 5 + XXXX | 0 +(2 rows) + +-- test degenerate cases involving HAVING without GROUP BY +-- Per SQL spec, these should generate 0 or 1 row, even without aggregates +--Testcase 19: +SELECT min((fields->>'a')::int), max((fields->>'a')::int) FROM test_having HAVING min((fields->>'a')::int) = max((fields->>'a')::int); + min | max +-----+----- +(0 rows) + +--Testcase 20: +SELECT min((fields->>'a')::int), max((fields->>'a')::int) FROM test_having HAVING min((fields->>'a')::int) < max((fields->>'a')::int); + min | max +-----+----- + 0 | 9 +(1 row) + +-- errors: ungrouped column references +--Testcase 21: +SELECT (fields->>'a')::int a FROM test_having HAVING min((fields->>'a')::int) < max((fields->>'a')::int); +ERROR: column "test_having.fields" must appear in the GROUP BY clause or be used in an aggregate function +LINE 1: SELECT (fields->>'a')::int a FROM test_having HAVING min((fi... + ^ +--Testcase 22: +SELECT 1 AS one FROM test_having HAVING (fields->>'a')::int > 1; +ERROR: column "test_having.fields" must appear in the GROUP BY clause or be used in an aggregate function +LINE 1: SELECT 1 AS one FROM test_having HAVING (fields->>'a')::int ... + ^ +-- the really degenerate case: need not scan table at all +--Testcase 23: +SELECT 1 AS one FROM test_having HAVING 1 > 2; + one +----- +(0 rows) + +--Testcase 24: +SELECT 1 AS one FROM test_having HAVING 1 < 2; + one +----- + 1 +(1 row) + +-- and just to prove that we aren't scanning the table: +--Testcase 25: +SELECT 1 AS one FROM test_having WHERE 1/(fields->>'a')::int = 1 HAVING 1 < 2; + one +----- + 1 +(1 row) + +--Testcase 26: +-- Clean up: +--Testcase 31: +DELETE FROM test_having_nsc; +--Testcase 32: +DROP FOREIGN TABLE test_having; +--Testcase 33: +DROP FOREIGN TABLE test_having_nsc; +--Testcase 27: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 28: +DROP SERVER influxdb_svr CASCADE; +--Testcase 29: +DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/schemaless/influxdb_fdw.out b/expected/15.0/schemaless/influxdb_fdw.out new file mode 100644 index 0000000..8222748 --- /dev/null +++ b/expected/15.0/schemaless/influxdb_fdw.out @@ -0,0 +1,1603 @@ +--SET log_min_messages=debug1; +--SET client_min_messages=debug1; +--Testcase 1: +SET datestyle=ISO; +-- timestamp with time zone differs based on this +--Testcase 2: +SET timezone='Japan'; +\set ECHO none +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); +-- import time column as timestamp and text type +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); +--Testcase 6: +SELECT * FROM cpu; + time | time_text | tags | fields +------------------------+----------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} +(3 rows) + +--Testcase 7: +SELECT tags->>'tag1' tag1, (fields->>'value1')::bigint value1 FROM cpu; + tag1 | value1 +--------+-------- + tag1_A | 100 + tag1_B | 100 +(2 rows) + +--Testcase 8: +SELECT (fields->>'value1')::bigint value1, time, (fields->>'value2')::double precision value2 FROM cpu; + value1 | time | value2 +--------+------------------------+-------- + 100 | 2015-08-18 09:00:00+09 | 0.5 + 100 | 2015-08-18 09:00:00+09 | 2 + | 2015-08-18 09:48:08+09 | 2 +(3 rows) + +--Testcase 9: +SELECT (fields->>'value1')::bigint value1, time_text, (fields->>'value2')::double precision value2 FROM cpu; + value1 | time_text | value2 +--------+----------------------+-------- + 100 | 2015-08-18T00:00:00Z | 0.5 + 100 | 2015-08-18T00:00:00Z | 2 + | 2015-08-18T00:48:08Z | 2 +(3 rows) + +--Testcase 10: +DROP FOREIGN TABLE cpu; +--Testcase 11: +DROP FOREIGN TABLE t3; +--Testcase 12: +DROP FOREIGN TABLE t4; +--Testcase 13: +DROP FOREIGN TABLE tx; +--Testcase 14: +DROP FOREIGN TABLE numbers; +-- test EXECPT +IMPORT FOREIGN SCHEMA public EXCEPT (cpu, t3, t4, tx, numbers) FROM SERVER server1 INTO public OPTIONS(schemaless 'true'); +--Testcase 15: +SELECT ftoptions FROM pg_foreign_table; + ftoptions +----------- +(0 rows) + +-- test LIMIT TO +IMPORT FOREIGN SCHEMA public LIMIT TO (cpu) FROM SERVER server1 INTO public OPTIONS(schemaless 'true'); +--Testcase 16: +SELECT ftoptions FROM pg_foreign_table; + ftoptions +---------------------------------------------- + {table=cpu,schemaless=true,"tags=tag1,tag2"} +(1 row) + +--Testcase 17: +DROP FOREIGN TABLE cpu; +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false', schemaless 'true'); +--Testcase 18: +SELECT * FROM cpu; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} +(3 rows) + +--Testcase 19: +SELECT tags->>'tag1' tag1, (fields->>'value1')::int value1 FROM cpu; + tag1 | value1 +--------+-------- + tag1_A | 100 + tag1_B | 100 +(2 rows) + +--Testcase 20: +SELECT (fields->>'value1')::int value1, time, (fields->>'value2')::double precision value2 FROM cpu; + value1 | time | value2 +--------+------------------------+-------- + 100 | 2015-08-18 09:00:00+09 | 0.5 + 100 | 2015-08-18 09:00:00+09 | 2 + | 2015-08-18 09:48:08+09 | 2 +(3 rows) + +--Testcase 21: +SELECT tags->>'tag1' tag1 FROM cpu; + tag1 +-------- + tag1_A + tag1_B + +(3 rows) + +--Testcase 22: +SELECT * FROM numbers; + time | tags | fields +------------------------+---------------+------------------------ + 1970-01-01 09:00:00+09 | {"tag1": "a"} | {"a": "1", "b": "One"} + 1970-01-01 09:00:01+09 | {"tag1": "a"} | {"a": "2", "b": "Two"} +(2 rows) + +--Testcase 23: +\d cpu; + Foreign table "public.cpu" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: server1 +FDW options: ("table" 'cpu', schemaless 'true', tags 'tag1,tag2') + +--Testcase 24: +SELECT * FROM cpu WHERE (fields->>'value1')::int=100; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 25: +SELECT * FROM cpu WHERE (fields->>'value2')::double precision=0.5; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 26: +SELECT * FROM cpu WHERE fields->>'value3'='str'; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 27: +SELECT * FROM cpu WHERE (fields->>'value4')::boolean=true; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 28: +SELECT * FROM cpu WHERE NOT ((fields->>'value4')::boolean AND (fields->>'value1')::int=100); + time | tags | fields +------------------------+----------------------------------+--------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(1 row) + +--Testcase 29: +SELECT * FROM cpu WHERE tags->>'tag1'='tag1_A'; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 30: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE fields->>'value3' IS NULL; + QUERY PLAN +----------------------------------------------------- + Foreign Scan on public.cpu + Output: "time", tags, fields + Filter: ((cpu.fields ->> 'value3'::text) IS NULL) + InfluxDB query: SELECT * FROM "cpu" +(4 rows) + +--Testcase 31: +SELECT * FROM cpu WHERE fields->>'value3' IS NULL; + time | tags | fields +------------------------+----------------------------------+--------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} +(2 rows) + +--Testcase 32: +SELECT * FROM cpu WHERE tags->>'tag2' IS NULL; + time | tags | fields +------------------------+----------------------------------+--------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(1 row) + +--Testcase 33: +SELECT * FROM cpu WHERE fields->>'value3' IS NOT NULL; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 34: +SELECT * FROM cpu WHERE tags->>'tag2' IS NOT NULL; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} +(2 rows) + +-- InfluxDB not support compare timestamp with OR condition +--Testcase 35: +SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR (fields->>'value2')::double precision = 0.5; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} +(2 rows) + +-- InfluxDB not support compare timestamp with != or <> +--Testcase 36: +SELECT * FROM cpu WHERE time != '2015-08-18 09:48:08+09'; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 37: +SELECT * FROM cpu WHERE time <> '2015-08-18 09:48:08+09'; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 38: +SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR (fields->>'value2')::double precision = 0.5; + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} +(2 rows) + +-- There is inconsitency for search of missing values between tag and field +--Testcase 39: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE fields->>'value3' = ''; + QUERY PLAN +--------------------------------------------------------------- + Foreign Scan on public.cpu + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" WHERE (("value3" = '')) +(3 rows) + +--Testcase 40: +SELECT * FROM cpu WHERE fields->>'value3' = ''; + time | tags | fields +------+------+-------- +(0 rows) + +--Testcase 41: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE tags->>'tag2' = ''; + QUERY PLAN +------------------------------------------------------------- + Foreign Scan on public.cpu + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" WHERE (("tag2" = '')) +(3 rows) + +--Testcase 42: +SELECT * FROM cpu WHERE tags->>'tag2' = ''; + time | tags | fields +------------------------+----------------------------------+--------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(1 row) + +--Testcase 43: +SELECT * FROM cpu WHERE tags->>'tag1' IN ('tag1_A', 'tag1_B'); + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 44: +EXPLAIN VERBOSE +SELECT * FROM cpu WHERE tags->>'tag1' IN ('tag1_A', 'tag1_B'); + QUERY PLAN +-------------------------------------------------------------------------------------- + Foreign Scan on public.cpu (cost=10.00..9.00 rows=9 width=72) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" WHERE ("tag1" = 'tag1_A' OR "tag1" = 'tag1_B') +(3 rows) + +-- Rows which have no tag are considered to have empty string +--Testcase 45: +SELECT * FROM cpu WHERE tags->>'tag1' NOT IN ('tag1_A', 'tag1_B'); + time | tags | fields +------------------------+----------------------------------+----------------------------------------------------------------- + 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} +(1 row) + +--Testcase 46: +EXPLAIN VERBOSE +SELECT * FROM cpu WHERE tags->>'tag1' NOT IN ('tag1_A', 'tag1_B'); + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.cpu (cost=10.00..844.00 rows=844 width=72) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" WHERE ("tag1" <> 'tag1_A' AND "tag1" <> 'tag1_B') +(3 rows) + +-- test IN/NOT IN +--Testcase 47: +SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); + time | tags | fields +------------------------+----------------------------------+----------------------------------------------------------------- + 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} +(1 row) + +--Testcase 48: +SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 49: +SELECT * FROM cpu WHERE (fields->>'value1')::int NOT IN (100, 97); + time | tags | fields +------+------+-------- +(0 rows) + +--Testcase 50: +SELECT * FROM cpu WHERE (fields->>'value1')::int IN (100, 97); + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 51: +SELECT * FROM cpu WHERE (fields->>'value2')::double precision IN (0.5, 10.9); + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 52: +SELECT * FROM cpu WHERE (fields->>'value2')::double precision NOT IN (2, 9.7); + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 53: +SELECT * FROM cpu WHERE (fields->>'value4')::boolean NOT IN ('true', 'true'); + time | tags | fields +------------------------+----------------------------------+--------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(1 row) + +--Testcase 54: +SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); + time | tags | fields +------------------------+----------------------------------+----------------------------------------------------------------- + 2015-08-18 09:48:08+09 | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} +(1 row) + +--Testcase 55: +SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 56: +SELECT * FROM cpu WHERE (fields->>'value1')::int NOT IN (100, 97); + time | tags | fields +------+------+-------- +(0 rows) + +--Testcase 57: +SELECT * FROM cpu WHERE (fields->>'value1')::int IN (100, 97); + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 58: +SELECT * FROM cpu WHERE (fields->>'value2')::double precision IN (0.5, 10.9); + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 59: +SELECT * FROM cpu WHERE (fields->>'value2')::double precision NOT IN (2, 9.7); + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 60: +SELECT * FROM cpu WHERE (fields->>'value4')::boolean NOT IN ('true', 'true'); + time | tags | fields +------------------------+----------------------------------+--------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(1 row) + +--Testcase 61: +SELECT * FROM cpu WHERE (fields->>'value4')::boolean IN ('f', 't'); + time | tags | fields +------------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 62: +CREATE FOREIGN TABLE t1(time timestamp with time zone ,tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true', tags 'tag1'); +--Testcase 63: +CREATE FOREIGN TABLE t2(time timestamp ,tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true', tags 'tag1'); +--Testcase 64: +SELECT * FROM t1; + time | tags | fields +------------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 09:48:08+09 | {"tag1": null} | {"tag2": "tag2_A", "value1": null, "value2": "2", "value3": null, "value4": null} +(3 rows) + +--Testcase 65: +SELECT * FROM t2; + time | tags | fields +---------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 00:48:08 | {"tag1": null} | {"tag2": "tag2_A", "value1": null, "value2": "2", "value3": null, "value4": null} +(3 rows) + +-- In following four queries, timestamp condition is added to InfluxQL as "time = '2015-08-18 00:00:00'" +--Testcase 66: +SELECT * FROM t1 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; + time | tags | fields +------------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 67: +SELECT * FROM t1 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; + time | tags | fields +------------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 68: +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; + time | tags | fields +---------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 69: +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; + time | tags | fields +---------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +-- pushdown now() +--Testcase 70: +SELECT * FROM t2 WHERE now() > time; + time | tags | fields +---------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 00:48:08 | {"tag1": null} | {"tag2": "tag2_A", "value1": null, "value2": "2", "value3": null, "value4": null} +(3 rows) + +--Testcase 71: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE now() > time; + QUERY PLAN +------------------------------------------------------------------- + Foreign Scan on public.t2 (cost=10.00..284.00 rows=284 width=72) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" WHERE ((now() > time)) +(3 rows) + +--Testcase 72: +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; + time | tags | fields +---------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 73: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.t2 (cost=10.00..4.00 rows=4 width=72) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" WHERE ((time = ('2015-08-26 05:43:21.1' - 8d5h43m21s100000u))) +(3 rows) + +-- InfluxDB does not seem to support time column + interval, so below query returns empty result +-- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; +-- EXPLAIN (VERBOSE, COSTS OFF) +-- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; +-- InfluxDB does not support month or year interval, so not push down +--Testcase 74: +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; + time | tags | fields +---------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +--Testcase 75: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan on public.t2 (cost=10.00..4.00 rows=4 width=72) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" WHERE ((time = '2015-08-18 00:00:00')) +(3 rows) + +--Testcase 76: +SELECT * FROM t2 WHERE (fields->>'value1')::int = ANY (ARRAY(SELECT (fields->>'value1')::int FROM t1 WHERE (fields->>'value1')::int < 1000)); + time | tags | fields +---------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 00:00:00 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 00:00:00 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} +(2 rows) + +-- ANY with ARRAY expression +--Testcase 77: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, (fields->>'a')::int + 1]); + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..15.15 rows=15 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" = 1) OR ("a" = ("a" + 1))) +(3 rows) + +--Testcase 78: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, (fields->>'a')::int + 1]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 79: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, (fields->>'a')::int + 1]); + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1476.62 rows=1462 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <> 1) OR ("a" <> ("a" + 1))) +(3 rows) + +--Testcase 80: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, (fields->>'a')::int + 1]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 81: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, (fields->>'a')::int + 1]); + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" >= 1) OR ("a" >= ("a" + 1))) +(3 rows) + +--Testcase 82: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, (fields->>'a')::int + 1]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 83: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, (fields->>'a')::int + 1]); + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <= 1) OR ("a" <= ("a" + 1))) +(3 rows) + +--Testcase 84: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, (fields->>'a')::int + 1]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 85: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, (fields->>'a')::int + 1]); + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" > 1) OR ("a" > ("a" + 1))) +(3 rows) + +--Testcase 86: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, (fields->>'a')::int + 1]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 87: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, (fields->>'a')::int + 1]); + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" < 1) OR ("a" < ("a" + 1))) +(3 rows) + +--Testcase 88: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, (fields->>'a')::int + 1]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +-- ANY with ARRAY const +--Testcase 89: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, 2]); + QUERY PLAN +----------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..15.15 rows=15 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 OR "a" = 2) +(3 rows) + +--Testcase 90: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, 2]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 91: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, 2]); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1476.62 rows=1462 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 OR "a" <> 2) +(3 rows) + +--Testcase 92: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, 2]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 93: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, 2]); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" >= 1 OR "a" >= 2) +(3 rows) + +--Testcase 94: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, 2]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 95: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, 2]); + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <= 1 OR "a" <= 2) +(3 rows) + +--Testcase 96: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, 2]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 97: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, 2]); + QUERY PLAN +----------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" > 1 OR "a" > 2) +(3 rows) + +--Testcase 98: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, 2]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 99: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, 2]); + QUERY PLAN +----------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" < 1 OR "a" < 2) +(3 rows) + +--Testcase 100: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, 2]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 101: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY('{1, 2, 3}'); + QUERY PLAN +---------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..22.22 rows=22 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 OR "a" = 2 OR "a" = 3) +(3 rows) + +--Testcase 102: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY('{1, 2, 3}'); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 103: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY('{1, 2, 3}'); + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1476.62 rows=1462 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 OR "a" <> 2 OR "a" <> 3) +(3 rows) + +--Testcase 104: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY('{1, 2, 3}'); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +-- ALL with ARRAY expression +--Testcase 105: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, (fields->>'a')::int * 1]); + QUERY PLAN +------------------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..1.01 rows=1 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" = 1) AND ("a" = ("a" * 1))) +(3 rows) + +--Testcase 106: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, (fields->>'a')::int * 1]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 107: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, (fields->>'a')::int + 1]); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1461.47 rows=1447 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <> 1) AND ("a" <> ("a" + 1))) +(3 rows) + +--Testcase 108: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, (fields->>'a')::int + 1]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 109: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, (fields->>'a')::int / 1]); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" >= 1) AND ("a" >= ("a" / 1))) +(3 rows) + +--Testcase 110: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, (fields->>'a')::int / 1]); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 111: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, (fields->>'a')::int + 1]); + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" <= 1) AND ("a" <= ("a" + 1))) +(3 rows) + +--Testcase 112: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, (fields->>'a')::int + 1]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 113: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[1, (fields->>'a')::int - 1]); + QUERY PLAN +------------------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" > 1) AND ("a" > ("a" - 1))) +(3 rows) + +--Testcase 114: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[1, (fields->>'a')::int - 1]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 115: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, (fields->>'a')::int + 1]); + QUERY PLAN +------------------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE (("a" < 2) AND ("a" < ("a" + 1))) +(3 rows) + +--Testcase 116: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, (fields->>'a')::int + 1]); + a | b +---+----- + 1 | One +(1 row) + +-- ALL with ARRAY const +--Testcase 117: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, 1]); + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..1.01 rows=1 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" = 1 AND "a" = 1) +(3 rows) + +--Testcase 118: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, 1]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 119: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, 3]); + QUERY PLAN +-------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1461.47 rows=1447 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <> 1 AND "a" <> 3) +(3 rows) + +--Testcase 120: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, 3]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 121: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, 2]); + QUERY PLAN +-------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" >= 1 AND "a" >= 2) +(3 rows) + +--Testcase 122: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, 2]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 123: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, 2]); + QUERY PLAN +-------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" <= 1 AND "a" <= 2) +(3 rows) + +--Testcase 124: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, 2]); + a | b +---+----- + 1 | One +(1 row) + +--Testcase 125: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[0, 1]); + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" > 0 AND "a" > 1) +(3 rows) + +--Testcase 126: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[0, 1]); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 127: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, 3]); + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..163.62 rows=162 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("a" < 2 AND "a" < 3) +(3 rows) + +--Testcase 128: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, 3]); + a | b +---+----- + 1 | One +(1 row) + +-- ANY/ALL with TEXT ARRAY const +--Testcase 129: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' = ANY(ARRAY['One', 'Two']); + QUERY PLAN +------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..15.15 rows=15 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("b" = 'One' OR "b" = 'Two') +(3 rows) + +--Testcase 130: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' = ANY(ARRAY['One', 'Two']); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 131: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' <> ALL(ARRAY['One', 'Four']); + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..1461.47 rows=1447 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + InfluxDB query: SELECT "a", "b" FROM "numbers" WHERE ("b" <> 'One' AND "b" <> 'Four') +(3 rows) + +--Testcase 132: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' <> ALL(ARRAY['One', 'Four']); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 133: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ANY(ARRAY['One', 'Two']); + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan on public.numbers (cost=10.00..820.12 rows=812 width=36) + Output: ((fields ->> 'a'::text))::integer, (fields ->> 'b'::text) + Filter: ((numbers.fields ->> 'b'::text) > ANY ('{One,Two}'::text[])) + InfluxDB query: SELECT "a", "b" FROM "numbers" +(4 rows) + +--Testcase 134: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ANY(ARRAY['One', 'Two']); + a | b +---+----- + 2 | Two +(1 row) + +--Testcase 135: +EXPLAIN VERBOSE +SELECT * FROM numbers WHERE fields->>'b' > ALL(ARRAY['Four', 'Five']); + QUERY PLAN +-------------------------------------------------------------------------- + Foreign Scan on public.numbers (cost=10.00..95.00 rows=95 width=72) + Output: "time", tags, fields + Filter: ((numbers.fields ->> 'b'::text) > ALL ('{Four,Five}'::text[])) + InfluxDB query: SELECT * FROM "numbers" +(4 rows) + +--Testcase 136: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ALL(ARRAY['Four', 'Five']); + a | b +---+----- + 1 | One + 2 | Two +(2 rows) + +--Testcase 137: +DROP FOREIGN TABLE numbers; +--Testcase 138: +ALTER SERVER server1 OPTIONS (SET dbname 'no such database'); +--Testcase 139: +SELECT * FROM t1; +ERROR: influxdb_fdw : database not found: no such database +--Testcase 140: +ALTER SERVER server1 OPTIONS (SET dbname 'mydb'); +--Testcase 141: +SELECT * FROM t1; + time | tags | fields +------------------------+--------------------+----------------------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 09:48:08+09 | {"tag1": null} | {"tag2": "tag2_A", "value1": null, "value2": "2", "value3": null, "value4": null} +(3 rows) + +-- map time column to both timestamp and text +--Testcase 142: +CREATE FOREIGN TABLE t5(t timestamp OPTIONS (column_name 'time'), tag1 text OPTIONS (column_name 'time'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true'); +--Testcase 143: +SELECT * FROM t5; + t | tag1 | fields +---------------------+----------------------+----------------------------------------------------------------------------------------------------------- + 2015-08-18 00:00:00 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 00:00:00 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 00:48:08 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A", "value1": null, "value2": "2", "value3": null, "value4": null} +(3 rows) + +--get version +--Testcase 144: +\df influxdb_fdw* + List of functions + Schema | Name | Result data type | Argument data types | Type +--------+------------------------+------------------+---------------------+------ + public | influxdb_fdw_handler | fdw_handler | | func + public | influxdb_fdw_validator | void | text[], oid | func + public | influxdb_fdw_version | integer | | func +(3 rows) + +--Testcase 145: +SELECT * FROM public.influxdb_fdw_version(); + influxdb_fdw_version +---------------------- + 20000 +(1 row) + +--Testcase 146: +SELECT influxdb_fdw_version(); + influxdb_fdw_version +---------------------- + 20000 +(1 row) + +--Test pushdown LIMIT...OFFSET +--Testcase 147: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; + QUERY PLAN +-------------------------------------------------------- + Foreign Scan on public.t1 + Output: (tableoid)::regclass, "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" LIMIT 1 OFFSET 0 +(3 rows) + +--Testcase 148: +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; + tableoid | time | tags | fields +----------+------------------------+--------------------+----------------------------------------------------------------------------------------- + t1 | 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 149: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; + QUERY PLAN +-------------------------------------------------------- + Foreign Scan on public.t1 + Output: (tableoid)::regclass, "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" LIMIT 1 OFFSET 1 +(3 rows) + +--Testcase 150: +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; + tableoid | time | tags | fields +----------+------------------------+--------------------+----------------------------------------------------------------------------------- + t1 | 2015-08-18 09:00:00+09 | {"tag1": "tag1_B"} | {"tag2": null, "value1": "100", "value2": "2", "value3": null, "value4": "false"} +(1 row) + +--Testcase 151: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; + QUERY PLAN +-------------------------------------------------------- + Foreign Scan on public.t1 + Output: ctid, "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" LIMIT 1 OFFSET 0 +(3 rows) + +--Testcase 152: +SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; + ctid | time | tags | fields +----------------+------------------------+--------------------+----------------------------------------------------------------------------------------- + (4294967295,0) | 2015-08-18 09:00:00+09 | {"tag1": "tag1_A"} | {"tag2": "tag2_A", "value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} +(1 row) + +--Testcase 153: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; + QUERY PLAN +---------------------------------------------------------- + Foreign Scan on public.t2 + Output: ctid, "time", tags, fields + InfluxDB query: SELECT * FROM "cpu" LIMIT 10 OFFSET 20 +(3 rows) + +--Testcase 154: +SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; + ctid | time | tags | fields +------+------+------+-------- +(0 rows) + +--Testcase 155: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM + t1 + LEFT JOIN t2 + ON (t2.fields->>'value1')::int = 123, + LATERAL (SELECT (t2.fields->>'value1')::int value1, t1.tags->>'tag1' tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss +WHERE (t1.fields->>'value1')::int = ss.value1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Output: t1."time", t1.tags, t1.fields, t2."time", t2.tags, t2.fields, (((t2.fields ->> 'value1'::text))::integer), ((t1_1.tags ->> 'tag1'::text)) + Join Filter: (((t1.fields ->> 'value1'::text))::integer = (((t2.fields ->> 'value1'::text))::integer)) + -> Nested Loop Left Join + Output: t1."time", t1.tags, t1.fields, t2."time", t2.tags, t2.fields + -> Foreign Scan on public.t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "cpu" + -> Materialize + Output: t2."time", t2.tags, t2.fields + -> Foreign Scan on public.t2 + Output: t2."time", t2.tags, t2.fields + InfluxDB query: SELECT * FROM "cpu" WHERE (("value1" = 123)) + -> Foreign Scan on public.t1 t1_1 + Output: ((t2.fields ->> 'value1'::text))::integer, (t1_1.tags ->> 'tag1'::text) + InfluxDB query: SELECT * FROM "cpu" LIMIT 1 OFFSET 0 +(16 rows) + +--Testcase 156: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM + t1 + LEFT JOIN t2 + ON (t2.fields->>'value1')::int = 123, + LATERAL (SELECT (t2.fields->>'value1')::int value1, t1.tags->>'tag1' tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss1, + LATERAL (SELECT ss1.* from t3 LIMIT 1 OFFSET 20) AS ss2 +WHERE (t1.fields->>'value1')::int = ss2.value1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop + Output: t1."time", t1.tags, t1.fields, t2."time", t2.tags, t2.fields, (((t2.fields ->> 'value1'::text))::integer), ((t1_1.tags ->> 'tag1'::text)), ((((t2.fields ->> 'value1'::text))::integer)), (((t1_1.tags ->> 'tag1'::text))) + Join Filter: (((t1.fields ->> 'value1'::text))::integer = ((((t2.fields ->> 'value1'::text))::integer))) + -> Nested Loop + Output: t1."time", t1.tags, t1.fields, t2."time", t2.tags, t2.fields, (((t2.fields ->> 'value1'::text))::integer), ((t1_1.tags ->> 'tag1'::text)) + -> Nested Loop Left Join + Output: t1."time", t1.tags, t1.fields, t2."time", t2.tags, t2.fields + -> Foreign Scan on public.t1 + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "cpu" + -> Materialize + Output: t2."time", t2.tags, t2.fields + -> Foreign Scan on public.t2 + Output: t2."time", t2.tags, t2.fields + InfluxDB query: SELECT * FROM "cpu" WHERE (("value1" = 123)) + -> Foreign Scan on public.t1 t1_1 + Output: ((t2.fields ->> 'value1'::text))::integer, (t1_1.tags ->> 'tag1'::text) + InfluxDB query: SELECT * FROM "cpu" LIMIT 1 OFFSET 0 + -> Foreign Scan on public.t3 + Output: (((t2.fields ->> 'value1'::text))::integer), ((t1_1.tags ->> 'tag1'::text)) + InfluxDB query: SELECT * FROM "t3" LIMIT 1 OFFSET 20 +(21 rows) + +--Testcase 157: +DROP FOREIGN TABLE cpu; +--Testcase 158: +DROP FOREIGN TABLE t1; +--Testcase 159: +DROP FOREIGN TABLE t2; +--Testcase 160: +DROP FOREIGN TABLE t3; +--Testcase 161: +DROP FOREIGN TABLE t4; +--Testcase 162: +DROP FOREIGN TABLE t5; +--Testcase 163: +DROP FOREIGN TABLE tx; +-- test INSERT, DELETE +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); +--Testcase 204: +CREATE FOREIGN TABLE cpu_nsc (time timestamp with time zone, time_text text, tag1 text, tag2 text, value1 int, value2 float, value3 text, value4 boolean) SERVER server1 OPTIONS (table 'cpu', tags 'tag1, tag2'); +--Testcase 164: +SELECT * FROM cpu; + time | time_text | tags | fields +------------------------+----------------------+--------------------------------------+----------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} +(3 rows) + +--Testcase 165: +EXPLAIN VERBOSE +INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test1', true); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Insert on public.cpu_nsc (cost=0.00..0.01 rows=0 width=0) + Batch Size: 1 + -> Result (cost=0.00..0.01 rows=1 width=149) + Output: '2021-01-01 00:00:01+09'::timestamp with time zone, NULL::text, 'tag1_K'::text, 'tag2_H'::text, 200, '5.5'::double precision, 'test1'::text, true +(4 rows) + +--Testcase 166: +INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test', true); +--Testcase 167: +SELECT * FROM cpu; + time | time_text | tags | fields +------------------------+----------------------+--------------------------------------+------------------------------------------------------------------------ + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} +(4 rows) + +--Testcase 168: +EXPLAIN VERBOSE +INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), + ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Insert on public.cpu_nsc (cost=0.02..0.04 rows=0 width=0) + Batch Size: 1 + InitPlan 1 (returns $0) + -> Result (cost=0.00..0.01 rows=1 width=4) + Output: 350 + InitPlan 2 (returns $1) + -> Result (cost=0.00..0.01 rows=1 width=32) + Output: 6.9 + -> Values Scan on "*VALUES*" (cost=0.00..0.03 rows=2 width=149) + Output: "*VALUES*".column1, NULL::text, "*VALUES*".column2, "*VALUES*".column3, "*VALUES*".column4, "*VALUES*".column5, "*VALUES*".column6, "*VALUES*".column7 +(10 rows) + +--Testcase 169: +INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), + ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); +--Testcase 170: +SELECT * FROM cpu; + time | time_text | tags | fields +------------------------+----------------------+---------------------------------------+--------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-01-02 04:00:02+09 | 2021-01-01T19:00:02Z | {"tag1": "tag1_I", "tag2": "tag2_E"} | {"value1": "300", "value2": "15.5", "value3": "test2", "value4": "false"} + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} +(6 rows) + +--Testcase 171: +INSERT INTO cpu_nsc(tag2, value1) VALUES('tag2_KH', 400); +--Testcase 172: +SELECT tags->>'tag1' tag1, tags->>'tag2' tag2, (fields->>'value1')::bigint value1, (fields->>'value2')::double precision value2, fields->>'value3' value3, (fields->>'value4')::boolean value4 FROM cpu; + tag1 | tag2 | value1 | value2 | value3 | value4 +--------+---------+--------+--------+--------+-------- + tag1_A | tag2_A | 100 | 0.5 | str | t + tag1_B | | 100 | 2 | | f + | tag2_A | | 2 | | + tag1_K | tag2_H | 200 | 5.5 | test | t + tag1_I | tag2_E | 300 | 15.5 | test2 | f + | tag2_KH | 400 | | | + tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(7 rows) + +--Testcase 173: +EXPLAIN VERBOSE +DELETE FROM cpu_nsc WHERE tag2 = 'tag2_KH'; + QUERY PLAN +----------------------------------------------------------------------------- + Delete on public.cpu_nsc (cost=10.00..3.00 rows=0 width=0) + -> Foreign Delete on public.cpu_nsc (cost=10.00..3.00 rows=3 width=104) + InfluxDB query: DELETE FROM "cpu" WHERE (("tag2" = 'tag2_KH')) +(3 rows) + +--Testcase 174: +DELETE FROM cpu_nsc WHERE tag2 = 'tag2_KH'; +--Testcase 175: +SELECT tags->>'tag1' tag1, tags->>'tag2' tag2, (fields->>'value1')::bigint value1, (fields->>'value2')::double precision value2, fields->>'value3' value3, (fields->>'value4')::boolean value4 FROM cpu; + tag1 | tag2 | value1 | value2 | value3 | value4 +--------+---------+--------+--------+--------+-------- + tag1_A | tag2_A | 100 | 0.5 | str | t + tag1_B | | 100 | 2 | | f + | tag2_A | | 2 | | + tag1_K | tag2_H | 200 | 5.5 | test | t + tag1_I | tag2_E | 300 | 15.5 | test2 | f + tag1_U | tag2_DZ | 350 | 6.9 | funny | t +(6 rows) + +--Testcase 176: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; + QUERY PLAN +---------------------------------------------------------------------------------- + Delete on public.cpu (cost=10.00..6.00 rows=0 width=0) + -> Foreign Delete on public.cpu (cost=10.00..6.00 rows=6 width=40) + InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-01-01 19:00:02')) +(3 rows) + +--Testcase 177: +DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; +--Testcase 178: +SELECT * FROM cpu; + time | time_text | tags | fields +------------------------+----------------------+---------------------------------------+------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_A", "tag2": "tag2_A"} | {"value1": "100", "value2": "0.5", "value3": "str", "value4": "true"} + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2015-08-18 09:48:08+09 | 2015-08-18T00:48:08Z | {"tag1": null, "tag2": "tag2_A"} | {"value1": null, "value2": "2", "value3": null, "value4": null} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} +(5 rows) + +--Testcase 179: +EXPLAIN VERBOSE +DELETE FROM cpu_nsc WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Delete on public.cpu_nsc (cost=10.00..212.00 rows=0 width=0) + -> Foreign Delete on public.cpu_nsc (cost=10.00..212.00 rows=212 width=104) + InfluxDB query: DELETE FROM "cpu" WHERE ((time < '2018-07-06 15:00:00')) AND (("tag1" <> 'tag1_B')) +(3 rows) + +--Testcase 180: +DELETE FROM cpu_nsc WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; +--Testcase 181: +SELECT * FROM cpu; + time | time_text | tags | fields +------------------------+----------------------+---------------------------------------+------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} +(3 rows) + +-- Test INSERT, DELETE with time_text column +--Testcase 182: +INSERT INTO cpu_nsc(time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02T00:00:00Z', 'tag1_D', 'tag2_E', 600, 20.2, 'test3', true); +--Testcase 183: +SELECT * FROM cpu; + time | time_text | tags | fields +------------------------+----------------------+---------------------------------------+-------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} +(4 rows) + +--Testcase 184: +INSERT INTO cpu_nsc(time_text, tag1, value2) VALUES('2021-02-02T00:00:00.123456789Z', 'tag1_P', 25.8); +--Testcase 185: +SELECT * FROM cpu; + time | time_text | tags | fields +-------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} + 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | {"tag1": "tag1_P", "tag2": null} | {"value1": null, "value2": "25.8", "value3": null, "value4": null} + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} +(5 rows) + +--Testcase 186: +INSERT INTO cpu_nsc(time_text, tag1, value2) VALUES('2021-02-02 00:00:01', 'tag1_J', 37.1); +--Testcase 187: +SELECT * FROM cpu; + time | time_text | tags | fields +-------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} + 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | {"tag1": "tag1_P", "tag2": null} | {"value1": null, "value2": "25.8", "value3": null, "value4": null} + 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | {"tag1": "tag1_J", "tag2": null} | {"value1": null, "value2": "37.1", "value3": null, "value4": null} + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} +(6 rows) + +--Testcase 188: +INSERT INTO cpu_nsc(time, time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02 00:00:01+05', '2021-02-02T00:00:02.123456789Z', 'tag1_A', 'tag2_B', 200, 5.5, 'test', true); +WARNING: Inserting value has both 'time_text' and 'time' columns specified. The 'time' will be ignored. +--Testcase 189: +SELECT * FROM cpu; + time | time_text | tags | fields +-------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} + 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | {"tag1": "tag1_P", "tag2": null} | {"value1": null, "value2": "25.8", "value3": null, "value4": null} + 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | {"tag1": "tag1_J", "tag2": null} | {"value1": null, "value2": "37.1", "value3": null, "value4": null} + 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | {"tag1": "tag1_A", "tag2": "tag2_B"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} +(7 rows) + +--Testcase 190: +INSERT INTO cpu_nsc(time_text, time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-03T00:00:03.123456789Z', '2021-03-03 00:00:01+07', 'tag1_C', 'tag2_D', 200, 5.5, 'test', true); +WARNING: Inserting value has both 'time_text' and 'time' columns specified. The 'time' will be ignored. +--Testcase 191: +SELECT * FROM cpu; + time | time_text | tags | fields +-------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} + 2021-02-02 09:00:00.123457+09 | 2021-02-02T00:00:00.123456789Z | {"tag1": "tag1_P", "tag2": null} | {"value1": null, "value2": "25.8", "value3": null, "value4": null} + 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | {"tag1": "tag1_J", "tag2": null} | {"value1": null, "value2": "37.1", "value3": null, "value4": null} + 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | {"tag1": "tag1_A", "tag2": "tag2_B"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | {"tag1": "tag1_C", "tag2": "tag2_D"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} +(8 rows) + +--Testcase 192: +EXPLAIN VERBOSE +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:00.123456789Z'; + QUERY PLAN +--------------------------------------------------------------------------------------------- + Delete on public.cpu_nsc (cost=10.00..3.00 rows=0 width=0) + -> Foreign Delete on public.cpu_nsc (cost=10.00..3.00 rows=3 width=104) + InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-02-02T00:00:00.123456789Z')) +(3 rows) + +--Testcase 193: +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:00.123456789Z'; +--Testcase 194: +SELECT * FROM cpu; + time | time_text | tags | fields +-------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} + 2021-02-02 09:00:01+09 | 2021-02-02T00:00:01Z | {"tag1": "tag1_J", "tag2": null} | {"value1": null, "value2": "37.1", "value3": null, "value4": null} + 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | {"tag1": "tag1_A", "tag2": "tag2_B"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | {"tag1": "tag1_C", "tag2": "tag2_D"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} +(7 rows) + +--Testcase 195: +EXPLAIN VERBOSE +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Delete on public.cpu_nsc (cost=10.00..1.00 rows=0 width=0) + -> Foreign Delete on public.cpu_nsc (cost=10.00..1.00 rows=1 width=104) + InfluxDB query: DELETE FROM "cpu" WHERE ((time = '2021-02-02T00:00:01Z')) AND (("tag1" = 'tag1_J')) +(3 rows) + +--Testcase 196: +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; +--Testcase 197: +SELECT * FROM cpu; + time | time_text | tags | fields +-------------------------------+--------------------------------+---------------------------------------+-------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} + 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | {"tag1": "tag1_A", "tag2": "tag2_B"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | {"tag1": "tag1_C", "tag2": "tag2_D"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2029-02-02 05:02:02+09 | 2029-02-01T20:02:02Z | {"tag1": "tag1_U", "tag2": "tag2_DZ"} | {"value1": "350", "value2": "6.9", "value3": "funny", "value4": "true"} +(6 rows) + +--Testcase 198: +EXPLAIN VERBOSE +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Delete on public.cpu_nsc (cost=10.00..6.00 rows=0 width=0) + -> Foreign Scan on public.cpu_nsc (cost=10.00..6.00 rows=6 width=104) + Output: "time", time_text, tag1, tag2 + Filter: ((cpu_nsc.time_text = '2021-02-02 00:00:00'::text) OR (cpu_nsc."time" = '2029-02-02 05:02:02+09'::timestamp with time zone)) + InfluxDB query: SELECT "tag1", "tag2", "value1" FROM "cpu" +(5 rows) + +--Testcase 199: +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; +--Testcase 200: +SELECT * FROM cpu; + time | time_text | tags | fields +-------------------------------+--------------------------------+--------------------------------------+-------------------------------------------------------------------------- + 2015-08-18 09:00:00+09 | 2015-08-18T00:00:00Z | {"tag1": "tag1_B", "tag2": null} | {"value1": "100", "value2": "2", "value3": null, "value4": "false"} + 2021-01-01 00:00:01+09 | 2020-12-31T15:00:01Z | {"tag1": "tag1_K", "tag2": "tag2_H"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-02 09:00:00+09 | 2021-02-02T00:00:00Z | {"tag1": "tag1_D", "tag2": "tag2_E"} | {"value1": "600", "value2": "20.2", "value3": "test3", "value4": "true"} + 2021-02-02 09:00:02.123457+09 | 2021-02-02T00:00:02.123456789Z | {"tag1": "tag1_A", "tag2": "tag2_B"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} + 2021-02-03 09:00:03.123457+09 | 2021-02-03T00:00:03.123456789Z | {"tag1": "tag1_C", "tag2": "tag2_D"} | {"value1": "200", "value2": "5.5", "value3": "test", "value4": "true"} +(5 rows) + +-- Recover data +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; +--Testcase 201: +DROP FOREIGN TABLE cpu_nsc; +--Testcase 205: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 202: +DROP SERVER server1 CASCADE; +NOTICE: drop cascades to 5 other objects +DETAIL: drop cascades to foreign table cpu +drop cascades to foreign table numbers +drop cascades to foreign table t3 +drop cascades to foreign table t4 +drop cascades to foreign table tx +--Testcase 203: +DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/schemaless/schemaless.out b/expected/15.0/schemaless/schemaless.out new file mode 100644 index 0000000..4a3e213 --- /dev/null +++ b/expected/15.0/schemaless/schemaless.out @@ -0,0 +1,921 @@ +--Testcase 1: +SET datestyle=ISO; +-- timestamp with time zone differs based on this +--Testcase 2: +SET timezone='Japan'; +\set ECHO none +--Testcase 3: +DROP EXTENSION IF EXISTS influxdb_fdw CASCADE; +NOTICE: extension "influxdb_fdw" does not exist, skipping +--Testcase 4: +CREATE EXTENSION influxdb_fdw CASCADE; +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); +--Testcase 6: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +-- create foreign table +--Testcase 7: +CREATE FOREIGN TABLE sc1(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc1', tags 'device_id', schemaless 'true'); +--Testcase 8: +CREATE FOREIGN TABLE sc2(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc2', tags 'device_id', schemaless 'true'); +--Testcase 9: +DROP FOREIGN TABLE sc1; +--Testcase 10: +DROP FOREIGN TABLE sc2; +-- import foreign table +IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO public OPTIONS (schemaless 'true'); +--Testcase 11: +ALTER FOREIGN TABLE sc2 RENAME COLUMN fields TO fields2; +--Testcase 12: +ALTER FOREIGN TABLE sc2 RENAME COLUMN tags TO tags2; +-- baserel * +--Testcase 13: +EXPLAIN VERBOSE +SELECT * FROM sc1; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..853.00 rows=853 width=72) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "sc1" +(3 rows) + +--Testcase 14: +SELECT * FROM sc1; + time | tags | fields +------------------------+-----------------------+------------------------------------------------------------ + 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "1", "sig2": "a", "sig3": "1.1", "sig4": "true"} + 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "2", "sig2": "b", "sig3": "1.2", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "3", "sig2": "c", "sig3": "1.3", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "4", "sig2": "d", "sig3": "2.4", "sig4": "true"} + 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "5", "sig2": "e", "sig3": "2.5", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "6", "sig2": "f", "sig3": "2.6", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "7", "sig2": "g", "sig3": "3.7", "sig4": "true"} + 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "8", "sig2": "h", "sig3": "3.8", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "9", "sig2": "i", "sig3": "3.9", "sig4": "false"} +(9 rows) + +-- baserel all column names +--Testcase 15: +EXPLAIN VERBOSE +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..876.46 rows=853 width=89) + Output: "time", (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" +(3 rows) + +--Testcase 16: +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + time | device_id | sig1 | sig2 | sig3 | sig4 +------------------------+-----------+------+------+------+------ + 1970-01-01 09:00:00+09 | dev1 | 1 | a | 1.1 | t + 1970-01-01 09:00:00+09 | dev2 | 2 | b | 1.2 | f + 1970-01-01 09:00:00+09 | dev3 | 3 | c | 1.3 | f + 1970-01-01 09:00:00+09 | dev1 | 4 | d | 2.4 | t + 1970-01-01 09:00:00+09 | dev2 | 5 | e | 2.5 | f + 1970-01-01 09:00:00+09 | dev3 | 6 | f | 2.6 | f + 1970-01-01 09:00:00+09 | dev1 | 7 | g | 3.7 | t + 1970-01-01 09:00:00+09 | dev2 | 8 | h | 3.8 | f + 1970-01-01 09:00:00+09 | dev3 | 9 | i | 3.9 | f +(9 rows) + +-- baserel time only +--Testcase 17: +EXPLAIN VERBOSE +SELECT time FROM sc1; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..2560.00 rows=2560 width=8) + Output: "time" + InfluxDB query: SELECT * FROM "sc1" +(3 rows) + +--Testcase 18: +SELECT time FROM sc1; + time +------------------------ + 1970-01-01 09:00:00+09 + 1970-01-01 09:00:00+09 + 1970-01-01 09:00:00+09 + 1970-01-01 09:00:00+09 + 1970-01-01 09:00:00+09 + 1970-01-01 09:00:00+09 + 1970-01-01 09:00:00+09 + 1970-01-01 09:00:00+09 + 1970-01-01 09:00:00+09 +(9 rows) + +-- baserel tag only +--Testcase 19: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id FROM sc1; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..1465.65 rows=1462 width=32) + Output: (tags ->> 'device_id'::text) + InfluxDB query: SELECT * FROM "sc1" +(3 rows) + +--Testcase 20: +SELECT tags->>'device_id' device_id FROM sc1; + device_id +----------- + dev1 + dev2 + dev3 + dev1 + dev2 + dev3 + dev1 + dev2 + dev3 +(9 rows) + +-- baserel field only +--Testcase 21: +EXPLAIN VERBOSE +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..1498.55 rows=1462 width=49) + Output: ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + InfluxDB query: SELECT "sig1", "sig2", "sig3", "sig4" FROM "sc1" +(3 rows) + +--Testcase 22: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + sig1 | sig2 | sig3 | sig4 +------+------+------+------ + 1 | a | 1.1 | t + 3 | c | 1.3 | f + 2 | b | 1.2 | f + 6 | f | 2.6 | f + 5 | e | 2.5 | f + 4 | d | 2.4 | t + 8 | h | 3.8 | f + 7 | g | 3.7 | t + 9 | i | 3.9 | f +(9 rows) + +-- baserel tag+field +--Testcase 23: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..955.58 rows=930 width=81) + Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" +(3 rows) + +--Testcase 24: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + device_id | sig1 | sig2 | sig3 | sig4 +-----------+------+------+------+------ + dev1 | 1 | a | 1.1 | t + dev2 | 2 | b | 1.2 | f + dev3 | 3 | c | 1.3 | f + dev1 | 4 | d | 2.4 | t + dev2 | 5 | e | 2.5 | f + dev3 | 6 | f | 2.6 | f + dev1 | 7 | g | 3.7 | t + dev2 | 8 | h | 3.8 | f + dev3 | 9 | i | 3.9 | f +(9 rows) + +-- baserel * (remote restrict only) +--Testcase 25: +EXPLAIN VERBOSE +SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..284.00 rows=284 width=72) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "sc1" WHERE (("sig3" > 2)) +(3 rows) + +--Testcase 26: +SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + time | tags | fields +------------------------+-----------------------+------------------------------------------------------------ + 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "4", "sig2": "d", "sig3": "2.4", "sig4": "true"} + 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "5", "sig2": "e", "sig3": "2.5", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "6", "sig2": "f", "sig3": "2.6", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "7", "sig2": "g", "sig3": "3.7", "sig4": "true"} + 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "8", "sig2": "h", "sig3": "3.8", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "9", "sig2": "i", "sig3": "3.9", "sig4": "false"} +(6 rows) + +-- baserel all (remote restrict only) +--Testcase 27: +EXPLAIN VERBOSE +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..291.81 rows=284 width=89) + Output: "time", (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) +(3 rows) + +--Testcase 28: +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + time | device_id | sig1 | sig2 | sig3 | sig4 +------------------------+-----------+------+------+------+------ + 1970-01-01 09:00:00+09 | dev1 | 4 | d | 2.4 | t + 1970-01-01 09:00:00+09 | dev2 | 5 | e | 2.5 | f + 1970-01-01 09:00:00+09 | dev3 | 6 | f | 2.6 | f + 1970-01-01 09:00:00+09 | dev1 | 7 | g | 3.7 | t + 1970-01-01 09:00:00+09 | dev2 | 8 | h | 3.8 | f + 1970-01-01 09:00:00+09 | dev3 | 9 | i | 3.9 | f +(6 rows) + +-- baserel field only (remote restrict only) +--Testcase 29: +EXPLAIN VERBOSE +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..499.18 rows=487 width=49) + Output: ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + InfluxDB query: SELECT "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) +(3 rows) + +--Testcase 30: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + sig1 | sig2 | sig3 | sig4 +------+------+------+------ + 4 | d | 2.4 | t + 6 | f | 2.6 | f + 5 | e | 2.5 | f + 9 | i | 3.9 | f + 8 | h | 3.8 | f + 7 | g | 3.7 | t +(6 rows) + +-- baserel tag+field (remote restrict only) +--Testcase 31: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..318.52 rows=310 width=81) + Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) +(3 rows) + +--Testcase 32: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + device_id | sig1 | sig2 | sig3 | sig4 +-----------+------+------+------+------ + dev1 | 4 | d | 2.4 | t + dev2 | 5 | e | 2.5 | f + dev3 | 6 | f | 2.6 | f + dev1 | 7 | g | 3.7 | t + dev2 | 8 | h | 3.8 | f + dev3 | 9 | i | 3.9 | f +(6 rows) + +-- baserel tag+field(except restrict var) (remote restrict only) +--Testcase 33: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..316.20 rows=310 width=73) + Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig4'::text))::boolean + InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig4" FROM "sc1" WHERE (("sig3" > 2)) +(3 rows) + +--Testcase 34: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + device_id | sig1 | sig2 | sig4 +-----------+------+------+------ + dev1 | 4 | d | t + dev2 | 5 | e | f + dev3 | 6 | f | f + dev1 | 7 | g | t + dev2 | 8 | h | f + dev3 | 9 | i | f +(6 rows) + +-- baserel * (local restrict only) +--Testcase 35: +EXPLAIN VERBOSE +SELECT * FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..849.00 rows=849 width=72) + Output: "time", tags, fields + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT * FROM "sc1" +(4 rows) + +--Testcase 36: +SELECT * FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + time | tags | fields +------------------------+-----------------------+------------------------------------------------------------ + 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "1", "sig2": "a", "sig3": "1.1", "sig4": "true"} + 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "2", "sig2": "b", "sig3": "1.2", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "3", "sig2": "c", "sig3": "1.3", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "4", "sig2": "d", "sig3": "2.4", "sig4": "true"} + 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "5", "sig2": "e", "sig3": "2.5", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "6", "sig2": "f", "sig3": "2.6", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "7", "sig2": "g", "sig3": "3.7", "sig4": "true"} + 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "8", "sig2": "h", "sig3": "3.8", "sig4": "false"} +(8 rows) + +-- baserel all (local restrict only) +--Testcase 37: +EXPLAIN VERBOSE +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..872.35 rows=849 width=89) + Output: "time", (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" +(4 rows) + +--Testcase 38: +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + time | device_id | sig1 | sig2 | sig3 | sig4 +------------------------+-----------+------+------+------+------ + 1970-01-01 09:00:00+09 | dev1 | 1 | a | 1.1 | t + 1970-01-01 09:00:00+09 | dev2 | 2 | b | 1.2 | f + 1970-01-01 09:00:00+09 | dev3 | 3 | c | 1.3 | f + 1970-01-01 09:00:00+09 | dev1 | 4 | d | 2.4 | t + 1970-01-01 09:00:00+09 | dev2 | 5 | e | 2.5 | f + 1970-01-01 09:00:00+09 | dev3 | 6 | f | 2.6 | f + 1970-01-01 09:00:00+09 | dev1 | 7 | g | 3.7 | t + 1970-01-01 09:00:00+09 | dev2 | 8 | h | 3.8 | f +(8 rows) + +-- baserel field only (local restrict only) +--Testcase 39: +EXPLAIN VERBOSE +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..1491.38 rows=1455 width=49) + Output: ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT "sig1", "sig2", "sig3", "sig4" FROM "sc1" +(4 rows) + +--Testcase 40: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + sig1 | sig2 | sig3 | sig4 +------+------+------+------ + 1 | a | 1.1 | t + 3 | c | 1.3 | f + 2 | b | 1.2 | f + 6 | f | 2.6 | f + 5 | e | 2.5 | f + 4 | d | 2.4 | t + 8 | h | 3.8 | f + 7 | g | 3.7 | t +(8 rows) + +-- baserel tag+field (local restrict only) +--Testcase 41: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..950.44 rows=925 width=81) + Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" +(4 rows) + +--Testcase 42: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + device_id | sig1 | sig2 | sig3 | sig4 +-----------+------+------+------+------ + dev1 | 1 | a | 1.1 | t + dev2 | 2 | b | 1.2 | f + dev3 | 3 | c | 1.3 | f + dev1 | 4 | d | 2.4 | t + dev2 | 5 | e | 2.5 | f + dev3 | 6 | f | 2.6 | f + dev1 | 7 | g | 3.7 | t + dev2 | 8 | h | 3.8 | f +(8 rows) + +-- baserel tag+field(except local restrict var) (local restrict only) +--Testcase 43: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.sc1 (cost=10.00..948.12 rows=925 width=49) + Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT "device_id", "sig1", "sig3", "sig4", "sig2" FROM "sc1" +(4 rows) + +--Testcase 44: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + device_id | sig1 | sig3 | sig4 +-----------+------+------+------ + dev1 | 1 | 1.1 | t + dev2 | 2 | 1.2 | f + dev3 | 3 | 1.3 | f + dev1 | 4 | 2.4 | t + dev2 | 5 | 2.5 | f + dev3 | 6 | 2.6 | f + dev1 | 7 | 3.7 | t + dev2 | 8 | 3.8 | f +(8 rows) + +-- baserel * (both restricts) +--Testcase 45: +EXPLAIN VERBOSE +SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..283.00 rows=283 width=72) + Output: "time", tags, fields + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT * FROM "sc1" WHERE (("sig3" > 2)) +(4 rows) + +--Testcase 46: +SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + time | tags | fields +------------------------+-----------------------+------------------------------------------------------------ + 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "4", "sig2": "d", "sig3": "2.4", "sig4": "true"} + 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "5", "sig2": "e", "sig3": "2.5", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev3"} | {"sig1": "6", "sig2": "f", "sig3": "2.6", "sig4": "false"} + 1970-01-01 09:00:00+09 | {"device_id": "dev1"} | {"sig1": "7", "sig2": "g", "sig3": "3.7", "sig4": "true"} + 1970-01-01 09:00:00+09 | {"device_id": "dev2"} | {"sig1": "8", "sig2": "h", "sig3": "3.8", "sig4": "false"} +(5 rows) + +-- baserel all (both restricts) +--Testcase 47: +EXPLAIN VERBOSE +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..290.78 rows=283 width=89) + Output: "time", (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) +(4 rows) + +--Testcase 48: +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + time | device_id | sig1 | sig2 | sig3 | sig4 +------------------------+-----------+------+------+------+------ + 1970-01-01 09:00:00+09 | dev1 | 4 | d | 2.4 | t + 1970-01-01 09:00:00+09 | dev2 | 5 | e | 2.5 | f + 1970-01-01 09:00:00+09 | dev3 | 6 | f | 2.6 | f + 1970-01-01 09:00:00+09 | dev1 | 7 | g | 3.7 | t + 1970-01-01 09:00:00+09 | dev2 | 8 | h | 3.8 | f +(5 rows) + +-- baserel field only (both restricts) +--Testcase 49: +EXPLAIN VERBOSE +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..497.12 rows=485 width=49) + Output: ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) +(4 rows) + +--Testcase 50: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + sig1 | sig2 | sig3 | sig4 +------+------+------+------ + 4 | d | 2.4 | t + 6 | f | 2.6 | f + 5 | e | 2.5 | f + 8 | h | 3.8 | f + 7 | g | 3.7 | t +(5 rows) + +-- baserel tag+field (both restricts) +--Testcase 51: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..316.47 rows=308 width=81) + Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig3", "sig4" FROM "sc1" WHERE (("sig3" > 2)) +(4 rows) + +--Testcase 52: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + device_id | sig1 | sig2 | sig3 | sig4 +-----------+------+------+------+------ + dev1 | 4 | d | 2.4 | t + dev2 | 5 | e | 2.5 | f + dev3 | 6 | f | 2.6 | f + dev1 | 7 | g | 3.7 | t + dev2 | 8 | h | 3.8 | f +(5 rows) + +-- baserel tag+field(except local restrict var) (both restricts) +--Testcase 53: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.sc1 (cost=10.00..315.70 rows=308 width=49) + Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, ((fields ->> 'sig3'::text))::double precision, ((fields ->> 'sig4'::text))::boolean + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT "device_id", "sig1", "sig3", "sig4", "sig2" FROM "sc1" WHERE (("sig3" > 2)) +(4 rows) + +--Testcase 54: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + device_id | sig1 | sig3 | sig4 +-----------+------+------+------ + dev1 | 4 | 2.4 | t + dev2 | 5 | 2.5 | f + dev3 | 6 | 2.6 | f + dev1 | 7 | 3.7 | t + dev2 | 8 | 3.8 | f +(5 rows) + +-- baserel tag+field(except remote restrict var) (both restricts) +--Testcase 55: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..314.16 rows=308 width=73) + Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, (fields ->> 'sig2'::text), ((fields ->> 'sig4'::text))::boolean + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT "device_id", "sig1", "sig2", "sig4" FROM "sc1" WHERE (("sig3" > 2)) +(4 rows) + +--Testcase 56: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + device_id | sig1 | sig2 | sig4 +-----------+------+------+------ + dev1 | 4 | d | t + dev2 | 5 | e | f + dev3 | 6 | f | f + dev1 | 7 | g | t + dev2 | 8 | h | f +(5 rows) + +-- baserel tag+field(except local and remote restrict var) (both restricts) +--Testcase 57: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..313.39 rows=308 width=41) + Output: (tags ->> 'device_id'::text), ((fields ->> 'sig1'::text))::bigint, ((fields ->> 'sig4'::text))::boolean + Filter: (upper((sc1.fields ->> 'sig2'::text)) <> 'I'::text) + InfluxDB query: SELECT "device_id", "sig1", "sig4", "sig2" FROM "sc1" WHERE (("sig3" > 2)) +(4 rows) + +--Testcase 58: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + device_id | sig1 | sig4 +-----------+------+------ + dev1 | 4 | t + dev2 | 5 | f + dev3 | 6 | f + dev1 | 7 | t + dev2 | 8 | f +(5 rows) + +-- aggregate sum (remote) +--Testcase 59: +EXPLAIN VERBOSE +SELECT sum((fields->>'sig1')::bigint),sum((fields->>'sig3')::double precision) FROM sc1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (sum(((fields ->> 'sig1'::text))::bigint)), (sum(((fields ->> 'sig3'::text))::double precision)) + InfluxDB query: SELECT sum("sig1"), sum("sig3") FROM "sc1" +(3 rows) + +--Testcase 60: +SELECT sum((fields->>'sig1')::bigint),sum((fields->>'sig3')::double precision) FROM sc1; + sum | sum +-----+------ + 45 | 22.5 +(1 row) + +-- aggregate count (remote) +--Testcase 61: +EXPLAIN VERBOSE +SELECT count(fields->>'sig1'),count(fields->>'sig2'),count(fields->>'sig3'),count(fields->>'sig4') FROM sc1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (count((fields ->> 'sig1'::text))), (count((fields ->> 'sig2'::text))), (count((fields ->> 'sig3'::text))), (count((fields ->> 'sig4'::text))) + InfluxDB query: SELECT count("sig1"), count("sig2"), count("sig3"), count("sig4") FROM "sc1" +(3 rows) + +--Testcase 62: +SELECT count(fields->>'sig1'),count(fields->>'sig2'),count(fields->>'sig3'),count(fields->>'sig4') FROM sc1; + count | count | count | count +-------+-------+-------+------- + 9 | 9 | 9 | 9 +(1 row) + +-- aggregate avg (local) +--Testcase 63: +EXPLAIN VERBOSE +SELECT avg((fields->>'sig1')::bigint),avg((fields->>'sig3')::double precision) FROM sc1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------- + Aggregate (cost=1491.25..1491.26 rows=1 width=40) + Output: avg(((fields ->> 'sig1'::text))::bigint), avg(((fields ->> 'sig3'::text))::double precision) + -> Foreign Scan on public.sc1 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "sc1" +(5 rows) + +--Testcase 64: +SELECT avg((fields->>'sig1')::bigint),avg((fields->>'sig3')::double precision) FROM sc1; + avg | avg +--------------------+----- + 5.0000000000000000 | 2.5 +(1 row) + +-- aggregate sum (remote) + tag + group by +--Testcase 65: +EXPLAIN VERBOSE +SELECT sum((fields->>'sig1')::bigint),tags->>'device_id' device_id FROM sc1 GROUP BY tags->>'device_id'; + QUERY PLAN +-------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (sum(((fields ->> 'sig1'::text))::bigint)), ((tags ->> 'device_id'::text)) + InfluxDB query: SELECT sum("sig1") FROM "sc1" GROUP BY ("device_id") +(3 rows) + +--Testcase 66: +SELECT sum((fields->>'sig1')::bigint),tags->>'device_id' device_id FROM sc1 GROUP BY tags->>'device_id'; + sum | device_id +-----+----------- + 12 | dev1 + 15 | dev2 + 18 | dev3 +(3 rows) + +-- aggregate sum (remote) + tag + group by time +--Testcase 67: +EXPLAIN VERBOSE +SELECT sum((fields->>'sig1')::bigint) FROM sc1 WHERE time >= to_timestamp(0) AND time <= to_timestamp(2) GROUP BY influx_time(time, interval '1s'); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (sum(((fields ->> 'sig1'::text))::bigint)), (influx_time("time", '@ 1 sec'::interval)) + InfluxDB query: SELECT sum("sig1") FROM "sc1" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:02')) GROUP BY (time(0d0h0m1s0u)) +(3 rows) + +--Testcase 68: +SELECT sum((fields->>'sig1')::bigint) FROM sc1 WHERE time >= to_timestamp(0) AND time <= to_timestamp(2) GROUP BY influx_time(time, interval '1s'); + sum +----- + 45 + + +(3 rows) + +-- aggreagte sum (remote) + tag + group by time +--Testcase 69: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,sum((fields->>'sig1')::bigint),fields->>'sid' sid FROM sc3 GROUP BY fields->>'sid', tags->>'device_id'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=96) + Output: ((tags ->> 'device_id'::text)), (sum(((fields ->> 'sig1'::text))::bigint)), ((fields ->> 'sid'::text)) + InfluxDB query: SELECT sum("sig1") FROM "sc3" GROUP BY ("sid"), ("device_id") +(3 rows) + +--Testcase 70: +SELECT tags->>'device_id' device_id,sum((fields->>'sig1')::bigint),fields->>'sid' sid FROM sc3 GROUP BY fields->>'sid', tags->>'device_id'; + device_id | sum | sid +-----------+-----+----- + dev1 | 10 | id1 + dev1 | 40 | id2 + dev1 | 70 | id3 + dev2 | 20 | id1 + dev2 | 50 | id2 + dev2 | 80 | id3 + dev3 | 30 | id1 + dev3 | 60 | id2 + dev3 | 90 | id3 +(9 rows) + +-- fucntion (remote) +--Testcase 71: +EXPLAIN VERBOSE +SELECT sqrt((fields->>'sig1')::bigint) FROM sc1; + QUERY PLAN +------------------------------------------------------------------------- + Foreign Scan on public.sc1 (cost=10.00..1480.28 rows=1462 width=8) + Output: sqrt((((fields ->> 'sig1'::text))::bigint)::double precision) + InfluxDB query: SELECT "sig1" FROM "sc1" +(3 rows) + +--Testcase 72: +SELECT sqrt((fields->>'sig1')::bigint) FROM sc1; + sqrt +-------------------- + 1 + 1.7320508075688772 + 1.4142135623730951 + 2.449489742783178 + 2.23606797749979 + 2 + 2.8284271247461903 + 2.6457513110645907 + 3 +(9 rows) + +-- sparse data - baserel field only +--Testcase 73: +EXPLAIN VERBOSE +SELECT (fields->>'sig')::double precision sig FROM sc4; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.sc4 (cost=10.00..1472.96 rows=1462 width=8) + Output: ((fields ->> 'sig'::text))::double precision + InfluxDB query: SELECT "sig" FROM "sc4" +(3 rows) + +--Testcase 74: +SELECT (fields->>'sig')::double precision sig FROM sc4; + sig +----- + 1 + 3 + 2 +(3 rows) + +-- sparse data - baserel filed + remote restrict - no result by filter +--Testcase 75: +EXPLAIN VERBOSE +SELECT (fields->>'sig')::double precision sig FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.sc4 (cost=10.00..7.05 rows=7 width=8) + Output: ((fields ->> 'sig'::text))::double precision + InfluxDB query: SELECT "sig" FROM "sc4" WHERE ((time >= '1970-01-01 00:00:01')) AND ((time <= '1970-01-01 00:00:02')) +(3 rows) + +--Testcase 76: +SELECT (fields->>'sig')::double precision sig FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); + sig +----- +(0 rows) + +-- sparse data - aggreate avg (local) + remote restrict - ? +--Testcase 77: +EXPLAIN VERBOSE +SELECT avg((fields->>'sig')::double precision) FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------- + Aggregate (cost=7.07..7.08 rows=1 width=8) + Output: avg(((fields ->> 'sig'::text))::double precision) + -> Foreign Scan on public.sc4 (cost=10.00..7.00 rows=7 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "sc4" WHERE ((time >= '1970-01-01 00:00:01')) AND ((time <= '1970-01-01 00:00:02')) +(5 rows) + +--Testcase 78: +SELECT avg((fields->>'sig')::double precision) FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); + avg +----- + +(1 row) + +-- aggregate sum (remote) and avg (local) +--Testcase 79: +EXPLAIN VERBOSE +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig1')::bigint) FROM sc1; + QUERY PLAN +---------------------------------------------------------------------------------------------- + Aggregate (cost=1476.62..1476.63 rows=1 width=64) + Output: avg(((fields ->> 'sig1'::text))::bigint), sum(((fields ->> 'sig1'::text))::bigint) + -> Foreign Scan on public.sc1 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "sc1" +(5 rows) + +--Testcase 80: +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig1')::bigint) FROM sc1; + avg | sum +--------------------+----- + 5.0000000000000000 | 45 +(1 row) + +-- aggregate sum (remote) and avg (local) different remote column +--Testcase 81: +EXPLAIN VERBOSE +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) FROM sc1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------- + Aggregate (cost=1491.24..1491.25 rows=1 width=40) + Output: avg(((fields ->> 'sig1'::text))::bigint), sum(((fields ->> 'sig3'::text))::double precision) + -> Foreign Scan on public.sc1 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "sc1" +(5 rows) + +--Testcase 82: +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) FROM sc1; + avg | sum +--------------------+------ + 5.0000000000000000 | 22.5 +(1 row) + +-- aggregate sum (remote) and avg (local) having non existed remote column +--Testcase 83: +EXPLAIN VERBOSE +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig')::double precision) FROM sc1; + QUERY PLAN +------------------------------------------------------------------------------------------------------- + Aggregate (cost=1491.24..1491.25 rows=1 width=40) + Output: avg(((fields ->> 'sig1'::text))::bigint), sum(((fields ->> 'sig'::text))::double precision) + -> Foreign Scan on public.sc1 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "sc1" +(5 rows) + +--Testcase 84: +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig')::double precision) FROM sc1; + avg | sum +--------------------+----- + 5.0000000000000000 | +(1 row) + +-- aggregate sum (remote) + field + group by(field) + order by(field) - no pushdown for aggregation +--Testcase 85: +EXPLAIN VERBOSE +SELECT sum((fields->>'sig1')::bigint),(fields->>'sig1')::bigint sig1 FROM sc1 GROUP BY (fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Sort (cost=1502.88..1503.38 rows=200 width=40) + Output: (sum((((fields ->> 'sig1'::text))::bigint))), (((fields ->> 'sig1'::text))::bigint) + Sort Key: (((sc1.fields ->> 'sig1'::text))::bigint) + -> HashAggregate (cost=1491.24..1495.24 rows=200 width=40) + Output: sum((((fields ->> 'sig1'::text))::bigint)), (((fields ->> 'sig1'::text))::bigint) + Group Key: ((sc1.fields ->> 'sig1'::text))::bigint + -> Foreign Scan on public.sc1 (cost=10.00..1472.96 rows=1462 width=40) + Output: ((fields ->> 'sig1'::text))::bigint, fields + InfluxDB query: SELECT * FROM "sc1" +(9 rows) + +--Testcase 86: +SELECT sum((fields->>'sig1')::bigint),(fields->>'sig1')::bigint sig1 FROM sc1 GROUP BY (fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; + sum | sig1 +-----+------ + 1 | 1 + 2 | 2 + 3 | 3 + 4 | 4 + 5 | 5 + 6 | 6 + 7 | 7 + 8 | 8 + 9 | 9 +(9 rows) + +--Testcase 87: +EXPLAIN VERBOSE +SELECT count(*) FROM (SELECT (fields->>'sig1')::bigint sig1 FROM sc1) sc; + QUERY PLAN +------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=8) + Output: (count(*)) + InfluxDB query: SELECT count(*) FROM "sc1" +(3 rows) + +--Testcase 88: +SELECT count(*) FROM (SELECT (fields->>'sig1')::bigint sig1 FROM sc1) sc; + count +------- + 9 +(1 row) + +-- drop extension +--Testcase 89: +DROP FOREIGN TABLE sc1; +--Testcase 90: +DROP FOREIGN TABLE sc2; +--Testcase 91: +DROP FOREIGN TABLE sc3; +--Testcase 92: +DROP FOREIGN TABLE sc4; +--Testcase 93: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 94: +DROP SERVER influxdb_svr; +--Testcase 95: +DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/schemaless/selectfunc.out b/expected/15.0/schemaless/selectfunc.out new file mode 100644 index 0000000..f8ca280 --- /dev/null +++ b/expected/15.0/schemaless/selectfunc.out @@ -0,0 +1,9133 @@ +--Testcase 1: +SET datestyle=ISO; +--Testcase 2: +SET timezone='Japan'; +\set ECHO none +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb2', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); +--IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); +--Testcase 6: +CREATE FOREIGN TABLE s3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 's3', tags 'tag1', schemaless 'true'); +-- s3 (value1 as float8, value2 as bigint) +--Testcase 7: +\d s3; + Foreign table "public.s3" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+----------------- + time | timestamp with time zone | | | | + tags | jsonb | | | | (tags 'true') + fields | jsonb | | | | (fields 'true') +Server: server1 +FDW options: ("table" 's3', tags 'tag1', schemaless 'true') + +--Testcase 8: +SELECT * FROM s3; + time | tags | fields +------------------------+---------------+------------------------------------------------------------------------ + 1970-01-01 09:00:00+09 | {"tag1": "a"} | {"value1": "0.1", "value2": "100", "value3": "-0.1", "value4": "-100"} + 1970-01-01 09:00:01+09 | {"tag1": "a"} | {"value1": "0.2", "value2": "100", "value3": "-0.2", "value4": "-100"} + 1970-01-01 09:00:02+09 | {"tag1": "a"} | {"value1": "0.3", "value2": "100", "value3": "-0.3", "value4": "-100"} + 1970-01-01 09:00:03+09 | {"tag1": "b"} | {"value1": "1.1", "value2": "200", "value3": "-1.1", "value4": "-200"} + 1970-01-01 09:00:04+09 | {"tag1": "b"} | {"value1": "2.2", "value2": "200", "value3": "-2.2", "value4": "-200"} + 1970-01-01 09:00:05+09 | {"tag1": "b"} | {"value1": "3.3", "value2": "200", "value3": "-3.3", "value4": "-200"} +(6 rows) + +-- select float8() (not pushdown, remove float8, explain) +--Testcase 9: +EXPLAIN VERBOSE +SELECT float8(fields->>'value1'), float8(fields->>'value2'), float8(fields->>'value3'), float8(fields->>'value4') FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1505.86 rows=1462 width=32) + Output: ((fields ->> 'value1'::text))::double precision, ((fields ->> 'value2'::text))::double precision, ((fields ->> 'value3'::text))::double precision, ((fields ->> 'value4'::text))::double precision + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select float8() (not pushdown, remove float8, result) +--Testcase 10: +SELECT float8(fields->>'value1'), float8(fields->>'value2'), float8(fields->>'value3'), float8(fields->>'value4') FROM s3; + float8 | float8 | float8 | float8 +--------+--------+--------+-------- + 0.1 | 100 | -0.1 | -100 + 0.2 | 100 | -0.2 | -100 + 0.3 | 100 | -0.3 | -100 + 1.1 | 200 | -1.1 | -200 + 2.2 | 200 | -2.2 | -200 + 3.3 | 200 | -3.3 | -200 +(6 rows) + +-- select sqrt (builtin function, explain) +--Testcase 11: +EXPLAIN VERBOSE +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1494.89 rows=1462 width=16) + Output: sqrt(((fields ->> 'value1'::text))::double precision), sqrt((((fields ->> 'value2'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(3 rows) + +-- select sqrt (builtin function, result) +--Testcase 12: +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3; + sqrt | sqrt +---------------------+-------------------- + 0.31622776601683794 | 10 + 0.4472135954999579 | 10 + 0.5477225575051661 | 10 + 1.0488088481701516 | 14.142135623730951 + 1.4832396974191326 | 14.142135623730951 + 1.816590212458495 | 14.142135623730951 +(6 rows) + +-- select sqrt (builtin function, not pushdown constraints, explain) +--Testcase 13: +EXPLAIN VERBOSE +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1487.74 rows=1455 width=16) + Output: sqrt(((fields ->> 'value1'::text))::double precision), sqrt((((fields ->> 'value2'::text))::bigint)::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(4 rows) + +-- select sqrt (builtin function, not pushdown constraints, result) +--Testcase 14: +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + sqrt | sqrt +--------------------+-------------------- + 1.0488088481701516 | 14.142135623730951 + 1.4832396974191326 | 14.142135623730951 + 1.816590212458495 | 14.142135623730951 +(3 rows) + +-- select sqrt (builtin function, pushdown constraints, explain) +--Testcase 15: +EXPLAIN VERBOSE +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1487.74 rows=1455 width=16) + Output: sqrt(((fields ->> 'value1'::text))::double precision), sqrt((((fields ->> 'value2'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select sqrt (builtin function, pushdown constraints, result) +--Testcase 16: +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + sqrt | sqrt +---------------------+------ + 0.31622776601683794 | 10 + 0.4472135954999579 | 10 + 0.5477225575051661 | 10 +(3 rows) + +-- select sqrt(*) (stub agg function, explain) +--Testcase 17: +EXPLAIN VERBOSE +SELECT sqrt_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: sqrt_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sqrt(*) (stub agg function, result) +--Testcase 18: +SELECT sqrt_all() from s3; +ERROR: stub sqrt_all() is called +CONTEXT: PL/pgSQL function sqrt_all() line 3 at RAISE +-- select sqrt(*) (stub agg function and group by tag only) (explain) +--Testcase 19: +EXPLAIN VERBOSE +SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (sqrt_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sqrt(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select sqrt(*) (stub agg function and group by tag only) (result) +--Testcase 20: +SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + sqrt_all +------------------------------------------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.31622776601683794\",\"value2\" : \"10\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.4472135954999579\",\"value2\" : \"10\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.5477225575051661\",\"value2\" : \"10\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.0488088481701516\",\"value2\" : \"14.142135623730951\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.4832396974191326\",\"value2\" : \"14.142135623730951\",\"value3\" : null,\"value4\" : null }") +(5 rows) + +-- select abs (builtin function, explain) +--Testcase 21: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.48 rows=1462 width=32) + Output: abs(((fields ->> 'value1'::text))::double precision), abs(((fields ->> 'value2'::text))::bigint), abs(((fields ->> 'value3'::text))::double precision), abs(((fields ->> 'value4'::text))::bigint) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- ABS() returns negative values if integer (https://github.com/influxdata/influxdb/issues/10261) +-- select abs (builtin function, result) +--Testcase 22: +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3; + abs | abs | abs | abs +-----+-----+-----+----- + 0.1 | 100 | 0.1 | 100 + 0.2 | 100 | 0.2 | 100 + 0.3 | 100 | 0.3 | 100 + 1.1 | 200 | 1.1 | 200 + 2.2 | 200 | 2.2 | 200 + 3.3 | 200 | 3.3 | 200 +(6 rows) + +-- select abs (builtin function, not pushdown constraints, explain) +--Testcase 23: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1513.20 rows=1455 width=32) + Output: abs(((fields ->> 'value1'::text))::double precision), abs(((fields ->> 'value2'::text))::bigint), abs(((fields ->> 'value3'::text))::double precision), abs(((fields ->> 'value4'::text))::bigint) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select abs (builtin function, not pushdown constraints, result) +--Testcase 24: +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + abs | abs | abs | abs +-----+-----+-----+----- + 1.1 | 200 | 1.1 | 200 + 2.2 | 200 | 2.2 | 200 + 3.3 | 200 | 3.3 | 200 +(3 rows) + +-- select abs (builtin function, pushdown constraints, explain) +--Testcase 25: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1513.20 rows=1455 width=32) + Output: abs(((fields ->> 'value1'::text))::double precision), abs(((fields ->> 'value2'::text))::bigint), abs(((fields ->> 'value3'::text))::double precision), abs(((fields ->> 'value4'::text))::bigint) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select abs (builtin function, pushdown constraints, result) +--Testcase 26: +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + abs | abs | abs | abs +-----+-----+-----+----- + 0.1 | 100 | 0.1 | 100 + 0.2 | 100 | 0.2 | 100 + 0.3 | 100 | 0.3 | 100 +(3 rows) + +-- select log (builtin function, need to swap arguments, numeric cast, explain) +-- log_(v) : postgresql (base, v), influxdb (v, base) +--Testcase 27: +EXPLAIN VERBOSE +SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + QUERY PLAN +----------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1480.46 rows=1455 width=32) + Output: log(((fields ->> 'value1'::text))::numeric, ((fields ->> 'value2'::text))::numeric) + InfluxDB query: SELECT "value1", "value2" FROM "s3" WHERE (("value1" <> 1)) +(3 rows) + +-- select log (builtin function, need to swap arguments, numeric cast, result) +--Testcase 28: +SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + log +--------------------- + -2.0000000000000000 + -2.8613531161467861 + -3.8249785787863969 + 55.590256753535330 + 6.7198527566540755 + 4.4377398922117404 +(6 rows) + +-- select log (builtin function, need to swap arguments, float8, explain) +--Testcase 29: +EXPLAIN VERBOSE +SELECT log((fields->>'value1')::numeric, 0.1) FROM s3 WHERE (fields->>'value1')::float != 1; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1469.55 rows=1455 width=32) + Output: log(((fields ->> 'value1'::text))::numeric, 0.1) + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" <> 1)) +(3 rows) + +-- select log (builtin function, need to swap arguments, float8, result) +--Testcase 30: +SELECT log((fields->>'value1')::numeric, 0.1) FROM s3 WHERE (fields->>'value1')::float != 1; + log +--------------------- + 1.0000000000000000 + 1.4306765580733931 + 1.9124892893931984 + -24.158857928096806 + -2.9203673004336506 + -1.9285884584617046 +(6 rows) + +-- select log (builtin function, need to swap arguments, bigint, explain) +--Testcase 31: +EXPLAIN VERBOSE +SELECT log((fields->>'value2')::numeric, 3::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1469.55 rows=1455 width=32) + Output: log(((fields ->> 'value2'::text))::numeric, '3'::numeric) + InfluxDB query: SELECT "value2" FROM "s3" WHERE (("value1" <> 1)) +(3 rows) + +-- select log (builtin function, need to swap arguments, bigint, result) +--Testcase 32: +SELECT log((fields->>'value2')::numeric, 3::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + log +-------------------- + 0.2385606273598312 + 0.2385606273598312 + 0.2385606273598312 + 0.2073511669203535 + 0.2073511669203535 + 0.2073511669203535 +(6 rows) + +-- select log (builtin function, need to swap arguments, mix type, explain) +--Testcase 33: +EXPLAIN VERBOSE +SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + QUERY PLAN +----------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1480.46 rows=1455 width=32) + Output: log(((fields ->> 'value1'::text))::numeric, ((fields ->> 'value2'::text))::numeric) + InfluxDB query: SELECT "value1", "value2" FROM "s3" WHERE (("value1" <> 1)) +(3 rows) + +-- select log (builtin function, need to swap arguments, mix type, result) +--Testcase 34: +SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + log +--------------------- + -2.0000000000000000 + -2.8613531161467861 + -3.8249785787863969 + 55.590256753535330 + 6.7198527566540755 + 4.4377398922117404 +(6 rows) + +-- select log(*) (stub agg function, explain) +--Testcase 35: +EXPLAIN VERBOSE +SELECT log_all(50) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: log_all('50'::double precision) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select log(*) (stub agg function, result) +--Testcase 36: +SELECT log_all(50) FROM s3; +ERROR: stub log_all(float8) is called +CONTEXT: PL/pgSQL function log_all(double precision) line 3 at RAISE +-- select log(*) (stub agg function, explain) +--Testcase 37: +EXPLAIN VERBOSE +SELECT log_all(70.5) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: log_all('70.5'::double precision) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select log(*) (stub agg function, result) +--Testcase 38: +SELECT log_all(70.5) FROM s3; +ERROR: stub log_all(float8) is called +CONTEXT: PL/pgSQL function log_all(double precision) line 3 at RAISE +-- select log(*) (stub agg function and group by tag only) (explain) +--Testcase 39: +EXPLAIN VERBOSE +SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (log_all('50'::double precision)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT log(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select log(*) (stub agg function and group by tag only) (result) +--Testcase 40: +SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + log_all +-------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"-0.5885919100677789\",\"value2\" : \"1.177183820135558\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"-0.41140808993222105\",\"value2\" : \"1.177183820135558\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"-0.3077621994183976\",\"value2\" : \"1.177183820135558\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.024363399620113902\",\"value2\" : \"1.3543676402711158\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.20154721975567183\",\"value2\" : \"1.3543676402711158\",\"value3\" : null,\"value4\" : null }") +(5 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 41: +SELECT ln_all(),log10_all(),log_all(50) FROM s3; +ERROR: stub ln_all() is called +CONTEXT: PL/pgSQL function ln_all() line 3 at RAISE +-- select log2 (stub function, explain) +--Testcase 42: +EXPLAIN VERBOSE +SELECT log2((fields->>'value1')::float),log2((fields->>'value2')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2218.59 rows=1462 width=16) + Output: log2(((fields ->> 'value1'::text))::double precision), log2((((fields ->> 'value2'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(3 rows) + +-- select log2 (stub function, result) +--Testcase 43: +SELECT log2((fields->>'value1')::float),log2((fields->>'value2')::bigint) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select log2(*) (stub agg function, explain) +--Testcase 44: +EXPLAIN VERBOSE +SELECT log2_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: log2_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select log2(*) (stub agg function, result) +--Testcase 45: +SELECT log2_all() from s3; +ERROR: stub log2_all() is called +CONTEXT: PL/pgSQL function log2_all() line 3 at RAISE +-- select log2(*) (stub agg function and group by tag only) (explain) +--Testcase 46: +EXPLAIN VERBOSE +SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (log2_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT log2(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select log2(*) (stub agg function and group by tag only) (result) +--Testcase 47: +SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + log2_all +------------------------------------------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,"{\"value1\" : \"-3.321928094887362\",\"value2\" : \"6.643856189774724\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"-2.321928094887362\",\"value2\" : \"6.643856189774724\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"-1.736965594166206\",\"value2\" : \"6.643856189774724\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.13750352374993502\",\"value2\" : \"7.643856189774724\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1375035237499351\",\"value2\" : \"7.643856189774724\",\"value3\" : null,\"value4\" : null }") +(5 rows) + +-- select log10 (stub function, explain) +--Testcase 48: +EXPLAIN VERBOSE +SELECT log10((fields->>'value1')::float),log10((fields->>'value2')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1494.89 rows=1462 width=16) + Output: log10(((fields ->> 'value1'::text))::double precision), log10((((fields ->> 'value2'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(3 rows) + +-- select log10 (stub function, result) +--Testcase 49: +SELECT log10((fields->>'value1')::float),log10((fields->>'value2')::bigint) FROM s3; + log10 | log10 +---------------------+-------------------- + -1 | 2 + -0.6989700043360187 | 2 + -0.5228787452803376 | 2 + 0.04139268515822507 | 2.3010299956639813 + 0.3424226808222063 | 2.3010299956639813 + 0.5185139398778874 | 2.3010299956639813 +(6 rows) + +-- select log10(*) (stub agg function, explain) +--Testcase 50: +EXPLAIN VERBOSE +SELECT log10_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: log10_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select log10(*) (stub agg function, result) +--Testcase 51: +SELECT log10_all() from s3; +ERROR: stub log10_all() is called +CONTEXT: PL/pgSQL function log10_all() line 3 at RAISE +-- select log10(*) (stub agg function and group by tag only) (explain) +--Testcase 52: +EXPLAIN VERBOSE +SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (log10_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT log10(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select log10(*) (stub agg function and group by tag only) (result) +--Testcase 53: +SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + log10_all +------------------------------------------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,"{\"value1\" : \"-0.9999999999999999\",\"value2\" : \"2\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"-0.6989700043360187\",\"value2\" : \"2\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"-0.5228787452803376\",\"value2\" : \"2\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.04139268515822507\",\"value2\" : \"2.301029995663981\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.3424226808222063\",\"value2\" : \"2.301029995663981\",\"value3\" : null,\"value4\" : null }") +(5 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 54: +SELECT log2_all(), log10_all() FROM s3; +ERROR: stub log2_all() is called +CONTEXT: PL/pgSQL function log2_all() line 3 at RAISE +-- select spread (stub agg function, explain) +--Testcase 55: +EXPLAIN VERBOSE +SELECT spread((fields->>'value1')::float),spread((fields->>'value2')::bigint),spread((fields->>'value3')::float),spread((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (spread(((fields ->> 'value1'::text))::double precision)), (spread(((fields ->> 'value2'::text))::bigint)), (spread(((fields ->> 'value3'::text))::double precision)), (spread(((fields ->> 'value4'::text))::bigint)) + InfluxDB query: SELECT spread("value1"), spread("value2"), spread("value3"), spread("value4") FROM "s3" +(3 rows) + +-- select spread (stub agg function, result) +--Testcase 56: +SELECT spread((fields->>'value1')::float),spread((fields->>'value2')::bigint),spread((fields->>'value3')::float),spread((fields->>'value4')::bigint) FROM s3; + spread | spread | spread | spread +--------------------+--------+--------------------+-------- + 3.1999999999999997 | 100 | 3.1999999999999997 | 100 +(1 row) + +-- select spread (stub agg function, raise exception if not expected type) +--Testcase 57: +SELECT spread((fields->>'value1')::numeric),spread((fields->>'value2')::numeric),spread((fields->>'value3')::numeric),spread((fields->>'value4')::numeric) FROM s3; +ERROR: stub spread_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE +-- select abs as nest function with agg (pushdown, explain) +--Testcase 58: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),abs(sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (abs(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), abs(sum("value3")) FROM "s3" +(3 rows) + +-- select abs as nest function with agg (pushdown, result) +--Testcase 59: +SELECT sum((fields->>'value3')::float),abs(sum((fields->>'value3')::float)) FROM s3; + sum | abs +--------------------+------------------- + -7.199999999999999 | 7.199999999999999 +(1 row) + +-- select abs as nest with log2 (pushdown, explain) +--Testcase 60: +EXPLAIN VERBOSE +SELECT abs(log2((fields->>'value1')::float)),abs(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: abs(log2(((fields ->> 'value1'::text))::double precision)), abs(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select abs as nest with log2 (pushdown, result) +--Testcase 61: +SELECT abs(log2((fields->>'value1')::float)),abs(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select abs with non pushdown func and explicit constant (explain) +--Testcase 62: +EXPLAIN VERBOSE +SELECT abs((fields->>'value3')::float), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: abs(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select abs with non pushdown func and explicit constant (result) +--Testcase 63: +SELECT abs((fields->>'value3')::float), pi(), 4.1 FROM s3; + abs | pi | ?column? +-----+-------------------+---------- + 0.1 | 3.141592653589793 | 4.1 + 0.2 | 3.141592653589793 | 4.1 + 0.3 | 3.141592653589793 | 4.1 + 1.1 | 3.141592653589793 | 4.1 + 2.2 | 3.141592653589793 | 4.1 + 3.3 | 3.141592653589793 | 4.1 +(6 rows) + +-- select sqrt as nest function with agg and explicit constant (pushdown, explain) +--Testcase 64: +EXPLAIN VERBOSE +SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sqrt((count(((fields ->> 'value1'::text))::double precision))::double precision)), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT sqrt(count("value1")) FROM "s3" +(3 rows) + +-- select sqrt as nest function with agg and explicit constant (pushdown, result) +--Testcase 65: +SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1 FROM s3; + sqrt | pi | ?column? +-------------------+-------------------+---------- + 2.449489742783178 | 3.141592653589793 | 4.1 +(1 row) + +-- select sqrt as nest function with agg and explicit constant and tag (error, explain) +--Testcase 66: +EXPLAIN VERBOSE +SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1, tags->>'tag1' tag1 FROM s3; +ERROR: column "s3.tags" must appear in the GROUP BY clause or be used in an aggregate function +LINE 2: ...rt(count((fields->>'value1')::float)), pi(), 4.1, tags->>'ta... + ^ +-- select spread (stub agg function and group by influx_time() and tag) (explain) +--Testcase 67: +EXPLAIN VERBOSE +SELECT spread((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (spread(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT spread("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select spread (stub agg function and group by influx_time() and tag) (result) +--Testcase 68: +SELECT spread((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + spread | influx_time | tag1 +--------+------------------------+------ + 0 | 1970-01-01 09:00:00+09 | a + 0 | 1970-01-01 09:00:01+09 | a + 0 | 1970-01-01 09:00:02+09 | a + | 1970-01-01 09:00:03+09 | a + | 1970-01-01 09:00:04+09 | a + | 1970-01-01 09:00:00+09 | b + | 1970-01-01 09:00:01+09 | b + | 1970-01-01 09:00:02+09 | b + 0 | 1970-01-01 09:00:03+09 | b + 0 | 1970-01-01 09:00:04+09 | b +(10 rows) + +-- select spread (stub agg function and group by tag only) (result) +--Testcase 69: +SELECT tags->>'tag1' tag1,spread((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + tag1 | spread +------+--------------------- + a | 0.19999999999999998 + b | 1.1 +(2 rows) + +-- select spread (stub agg function and other aggs) (result) +--Testcase 70: +SELECT sum((fields->>'value1')::float),spread((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; + sum | spread | count +-------------------+--------------------+------- + 7.199999999999999 | 3.1999999999999997 | 6 +(1 row) + +-- select abs with order by (explain) +--Testcase 71: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by abs(1-(fields->>'value1')::float); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (abs(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (abs(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, abs(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select abs with order by (result) +--Testcase 72: +SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by abs(1-(fields->>'value1')::float); + value1 | abs +--------+--------------------- + 1.1 | 0.10000000000000009 + 0.3 | 0.7 + 0.2 | 0.8 + 0.1 | 0.9 + 2.2 | 1.2000000000000002 + 3.3 | 2.3 +(6 rows) + +-- select abs with order by index (result) +--Testcase 73: +SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by 2,1; + value1 | abs +--------+--------------------- + 1.1 | 0.10000000000000009 + 0.3 | 0.7 + 0.2 | 0.8 + 0.1 | 0.9 + 2.2 | 1.2000000000000002 + 3.3 | 2.3 +(6 rows) + +-- select abs with order by index (result) +--Testcase 74: +SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by 1,2; + value1 | abs +--------+--------------------- + 0.1 | 0.9 + 0.2 | 0.8 + 0.3 | 0.7 + 1.1 | 0.10000000000000009 + 2.2 | 1.2000000000000002 + 3.3 | 2.3 +(6 rows) + +-- select abs and as +--Testcase 75: +SELECT abs((fields->>'value3')::float) as abs1 FROM s3; + abs1 +------ + 0.1 + 0.2 + 0.3 + 1.1 + 2.2 + 3.3 +(6 rows) + +-- select abs(*) (stub agg function, explain) +--Testcase 76: +EXPLAIN VERBOSE +SELECT abs_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: abs_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select abs(*) (stub agg function, result) +--Testcase 77: +SELECT abs_all() from s3; +ERROR: stub abs_all() is called +CONTEXT: PL/pgSQL function abs_all() line 3 at RAISE +-- select abs(*) (stub agg function and group by tag only) (explain) +--Testcase 78: +EXPLAIN VERBOSE +SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (abs_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT abs(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select abs(*) (stub agg function and group by tag only) (result) +--Testcase 79: +SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + abs_all +------------------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"0.1\",\"value4\" : \"100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"0.2\",\"value4\" : \"100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"0.3\",\"value4\" : \"100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"1.1\",\"value4\" : \"200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"2.2\",\"value4\" : \"200\" }") +(5 rows) + +-- select abs(*) (stub agg function, expose data, explain) +--Testcase 80: +EXPLAIN VERBOSE +SELECT (abs_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((abs_all())::s3)."time", ((abs_all())::s3).tags, ((abs_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select abs(*) (stub agg function, expose data, result) +--Testcase 81: +SELECT (abs_all()::s3).* from s3; +ERROR: stub abs_all() is called +CONTEXT: PL/pgSQL function abs_all() line 3 at RAISE +-- select spread over join query (explain) +--Testcase 82: +EXPLAIN VERBOSE +SELECT spread((t1.fields->>'value1')::float), spread((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------- + Aggregate (cost=39.87..39.88 rows=1 width=16) + Output: spread(((t1.fields ->> 'value1'::text))::double precision), spread(((t2.fields ->> 'value1'::text))::double precision) + -> Nested Loop (cost=20.00..14.63 rows=49 width=64) + Output: t1.fields, t2.fields + -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..7.04 rows=7 width=32) + Output: t2.fields + -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) + Output: t2.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select spread over join query (result, stub call error) +--Testcase 83: +SELECT spread((t1.fields->>'value1')::float), spread((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; +ERROR: stub spread_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE +-- select spread with having (explain) +--Testcase 84: +EXPLAIN VERBOSE +SELECT spread((fields->>'value1')::float) FROM s3 HAVING spread((fields->>'value1')::float) > 100; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Aggregate (cost=1838.47..1838.48 rows=1 width=8) + Output: spread(((fields ->> 'value1'::text))::double precision) + Filter: (spread(((s3.fields ->> 'value1'::text))::double precision) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "s3" +(6 rows) + +-- select spread with having (result, not pushdown, stub call error) +--Testcase 85: +SELECT spread((fields->>'value1')::float) FROM s3 HAVING spread((fields->>'value1')::float) > 100; +ERROR: stub spread_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE +-- select spread(*) (stub agg function, explain) +--Testcase 86: +EXPLAIN VERBOSE +SELECT spread_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (spread_all(*)) + InfluxDB query: SELECT spread(*) FROM "s3" +(3 rows) + +-- select spread(*) (stub agg function, result) +--Testcase 87: +SELECT spread_all(*) from s3; + spread_all +------------------------------------------------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.1999999999999997\",\"value2\" : \"100\",\"value3\" : \"3.1999999999999997\",\"value4\" : \"100\" }") +(1 row) + +-- select spread(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 88: +EXPLAIN VERBOSE +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (spread_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT spread(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select spread(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 89: +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + spread_all +---------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") +(10 rows) + +-- select spread(*) (stub agg function and group by tag only) (explain) +--Testcase 90: +EXPLAIN VERBOSE +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (spread_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT spread(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select spread(*) (stub agg function and group by tag only) (result) +--Testcase 91: +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + spread_all +---------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.19999999999999998\",\"value2\" : \"0\",\"value3\" : \"0.19999999999999998\",\"value4\" : \"0\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : \"1.1\",\"value4\" : \"0\" }") +(2 rows) + +-- select spread(*) (stub agg function, expose data, explain) +--Testcase 92: +EXPLAIN VERBOSE +SELECT (spread_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((spread_all(*)))::s3)."time", (((spread_all(*)))::s3).tags, (((spread_all(*)))::s3).fields + InfluxDB query: SELECT spread(*) FROM "s3" +(3 rows) + +-- select spread(*) (stub agg function, expose data, result) +--Testcase 93: +SELECT (spread_all(*)::s3).* from s3; + time | tags | fields +------------------------+------+---------------------------------------------------------------------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "3.1999999999999997", "value2": "100", "value3": "3.1999999999999997", "value4": "100"} +(1 row) + +-- select spread(regex) (stub agg function, explain) +--Testcase 94: +EXPLAIN VERBOSE +SELECT spread('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (spread('/value[1,4]/'::text)) + InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" +(3 rows) + +-- select spread(regex) (stub agg function, result) +--Testcase 95: +SELECT spread('/value[1,4]/') from s3; + spread +--------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.1999999999999997\",\"value4\" : \"100\" }") +(1 row) + +-- select spread(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 96: +EXPLAIN VERBOSE +SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (spread('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT spread(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select spread(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 97: +SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + spread +---------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") +(10 rows) + +-- select spread(regex) (stub agg function and group by tag only) (explain) +--Testcase 98: +EXPLAIN VERBOSE +SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (spread('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select spread(regex) (stub agg function and group by tag only) (result) +--Testcase 99: +SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + spread +-------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.19999999999999998\",\"value4\" : \"0\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") +(2 rows) + +-- select spread(regex) (stub agg function, expose data, explain) +--Testcase 100: +EXPLAIN VERBOSE +SELECT (spread('/value[1,4]/')::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((spread('/value[1,4]/'::text)))::s3)."time", (((spread('/value[1,4]/'::text)))::s3).tags, (((spread('/value[1,4]/'::text)))::s3).fields + InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" +(3 rows) + +-- select spread(regex) (stub agg function, expose data, result) +--Testcase 101: +SELECT (spread('/value[1,4]/')::s3).* from s3; + time | tags | fields +------------------------+------+--------------------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "3.1999999999999997", "value4": "100"} +(1 row) + +-- select abs with arithmetic and tag in the middle (explain) +--Testcase 102: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float) + 1, (fields->>'value2')::bigint value2, tags->>'tag1' tag1, sqrt((fields->>'value2')::bigint) FROM s3; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..962.55 rows=930 width=56) + Output: (abs(((fields ->> 'value1'::text))::double precision) + '1'::double precision), ((fields ->> 'value2'::text))::bigint, (tags ->> 'tag1'::text), sqrt((((fields ->> 'value2'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "tag1" FROM "s3" +(3 rows) + +-- select abs with arithmetic and tag in the middle (result) +--Testcase 103: +SELECT abs((fields->>'value1')::float) + 1, (fields->>'value2')::bigint value2, tags->>'tag1' tag1, sqrt((fields->>'value2')::bigint) FROM s3; + ?column? | value2 | tag1 | sqrt +----------+--------+------+-------------------- + 1.1 | 100 | a | 10 + 1.2 | 100 | a | 10 + 1.3 | 100 | a | 10 + 2.1 | 200 | b | 14.142135623730951 + 3.2 | 200 | b | 14.142135623730951 + 4.3 | 200 | b | 14.142135623730951 +(6 rows) + +-- select with order by limit (explain) +--Testcase 104: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float), abs((fields->>'value3')::float), sqrt((fields->>'value2')::bigint) FROM s3 ORDER BY abs((fields->>'value3')::float) LIMIT 1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Limit (cost=1516.83..1516.83 rows=1 width=24) + Output: (abs(((fields ->> 'value1'::text))::double precision)), (abs(((fields ->> 'value3'::text))::double precision)), (sqrt((((fields ->> 'value2'::text))::bigint)::double precision)) + -> Sort (cost=1516.83..1520.48 rows=1462 width=24) + Output: (abs(((fields ->> 'value1'::text))::double precision)), (abs(((fields ->> 'value3'::text))::double precision)), (sqrt((((fields ->> 'value2'::text))::bigint)::double precision)) + Sort Key: (abs(((s3.fields ->> 'value3'::text))::double precision)) + -> Foreign Scan on public.s3 (cost=10.00..1509.52 rows=1462 width=24) + Output: abs(((fields ->> 'value1'::text))::double precision), abs(((fields ->> 'value3'::text))::double precision), sqrt((((fields ->> 'value2'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value3", "value2" FROM "s3" +(8 rows) + +-- select with order by limit (result) +--Testcase 105: +SELECT abs((fields->>'value1')::float), abs((fields->>'value3')::float), sqrt((fields->>'value2')::bigint) FROM s3 ORDER BY abs((fields->>'value3')::float) LIMIT 1; + abs | abs | sqrt +-----+-----+------ + 0.1 | 0.1 | 10 +(1 row) + +-- select mixing with non pushdown func (all not pushdown, explain) +--Testcase 106: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float), sqrt((fields->>'value2')::bigint), upper(tags->>'tag1') FROM s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..955.58 rows=930 width=48) + Output: abs(((fields ->> 'value1'::text))::double precision), sqrt((((fields ->> 'value2'::text))::bigint)::double precision), upper((tags ->> 'tag1'::text)) + InfluxDB query: SELECT "value1", "value2", "tag1" FROM "s3" +(3 rows) + +-- select mixing with non pushdown func (result) +--Testcase 107: +SELECT abs((fields->>'value1')::float), sqrt((fields->>'value2')::bigint), upper(tags->>'tag1') FROM s3; + abs | sqrt | upper +-----+--------------------+------- + 0.1 | 10 | A + 0.2 | 10 | A + 0.3 | 10 | A + 1.1 | 14.142135623730951 | B + 2.2 | 14.142135623730951 | B + 3.3 | 14.142135623730951 | B +(6 rows) + +-- nested function in where clause (explain) +--Testcase 108: +EXPLAIN VERBOSE +SELECT sqrt(abs((fields->>'value3')::float)),min((fields->>'value1')::float) FROM s3 GROUP BY fields->>'value3' HAVING sqrt(abs((fields->>'value3')::float)) > 0 ORDER BY 1,2; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=506.25..506.72 rows=190 width=48) + Output: (sqrt(abs((((fields ->> 'value3'::text)))::double precision))), (min(((fields ->> 'value1'::text))::double precision)), ((fields ->> 'value3'::text)) + Sort Key: (sqrt(abs((((s3.fields ->> 'value3'::text)))::double precision))), (min(((s3.fields ->> 'value1'::text))::double precision)) + -> HashAggregate (cost=494.30..499.05 rows=190 width=48) + Output: sqrt(abs((((fields ->> 'value3'::text)))::double precision)), min(((fields ->> 'value1'::text))::double precision), ((fields ->> 'value3'::text)) + Group Key: (s3.fields ->> 'value3'::text) + -> Foreign Scan on public.s3 (cost=10.00..488.22 rows=487 width=64) + Output: (fields ->> 'value3'::text), fields + Filter: (sqrt(abs(((s3.fields ->> 'value3'::text))::double precision)) > '0'::double precision) + InfluxDB query: SELECT * FROM "s3" +(10 rows) + +-- nested function in where clause (result) +--Testcase 109: +SELECT sqrt(abs((fields->>'value3')::float)),min((fields->>'value1')::float) FROM s3 GROUP BY fields->>'value3' HAVING sqrt(abs((fields->>'value3')::float)) > 0 ORDER BY 1,2; + sqrt | min +---------------------+----- + 0.31622776601683794 | 0.1 + 0.4472135954999579 | 0.2 + 0.5477225575051661 | 0.3 + 1.0488088481701516 | 1.1 + 1.4832396974191326 | 2.2 + 1.816590212458495 | 3.3 +(6 rows) + +--Testcase 110: +EXPLAIN VERBOSE +SELECT first(time, (fields->>'value1')::float), first(time, (fields->>'value2')::bigint), first(time, (fields->>'value3')::float), first(time, (fields->>'value4')::bigint) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (first("time", ((fields ->> 'value1'::text))::double precision)), (first("time", ((fields ->> 'value2'::text))::bigint)), (first("time", ((fields ->> 'value3'::text))::double precision)), (first("time", ((fields ->> 'value4'::text))::bigint)) + InfluxDB query: SELECT first("value1"), first("value2"), first("value3"), first("value4") FROM "s3" +(3 rows) + +--Testcase 111: +SELECT first(time, (fields->>'value1')::float), first(time, (fields->>'value2')::bigint), first(time, (fields->>'value3')::float), first(time, (fields->>'value4')::bigint) FROM s3; + first | first | first | first +-------+-------+-------+------- + 0.1 | 100 | -0.1 | -100 +(1 row) + +-- select first(*) (stub agg function, explain) +--Testcase 112: +EXPLAIN VERBOSE +SELECT first_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (first_all(*)) + InfluxDB query: SELECT first(*) FROM "s3" +(3 rows) + +-- select first(*) (stub agg function, result) +--Testcase 113: +SELECT first_all(*) from s3; + first_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") +(1 row) + +-- select first(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 114: +EXPLAIN VERBOSE +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (first_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT first(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select first(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 115: +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + first_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select first(*) (stub agg function and group by tag only) (explain) +--Testcase 116: +EXPLAIN VERBOSE +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (first_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT first(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select first(*) (stub agg function and group by tag only) (result) +--Testcase 117: +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + first_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") +(2 rows) + +-- select first(*) (stub agg function, expose data, explain) +--Testcase 118: +EXPLAIN VERBOSE +SELECT (first_all(*)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((first_all(*)))::s3)."time", (((first_all(*)))::s3).tags, (((first_all(*)))::s3).fields + InfluxDB query: SELECT first(*) FROM "s3" +(3 rows) + +-- select first(*) (stub agg function, expose data, result) +--Testcase 119: +SELECT (first_all(*)::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------------------------------------------ + 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value2": "100", "value3": "-0.1", "value4": "-100"} +(1 row) + +-- select first(regex) (stub function, explain) +--Testcase 120: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/') from s3; + QUERY PLAN +-------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (first('/value[1,4]/'::text)) + InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" +(3 rows) + +-- select first(regex) (stub function, explain) +--Testcase 121: +SELECT first('/value[1,4]/') from s3; + first +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") +(1 row) + +-- select multiple regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 122: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; +WARNING: Selecting multiple functions with regular expression or star is not supported. + QUERY PLAN +-------------------------------------------------------------------------- + Aggregate (cost=5119.50..5119.51 rows=1 width=64) + Output: first('/value[1,4]/'::text), first('/^v.*/'::text) + -> Foreign Scan on public.s3 (cost=10.00..3413.00 rows=3413 width=0) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "s3" +(5 rows) + +-- select multiple regex functions (do not push down, raise warning and stub error) (result) +--Testcase 123: +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; +WARNING: Selecting multiple functions with regular expression or star is not supported. +ERROR: stub first_sfunc(text, text) is called +CONTEXT: PL/pgSQL function first_sfunc(text,text) line 3 at RAISE +-- select first(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 124: +EXPLAIN VERBOSE +SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (first('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT first(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select first(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 125: +SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + first +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select first(regex) (stub agg function and group by tag only) (explain) +--Testcase 126: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (first('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select first(regex) (stub agg function and group by tag only) (result) +--Testcase 127: +SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + first +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") +(2 rows) + +-- select first(regex) (stub agg function, expose data, explain) +--Testcase 128: +EXPLAIN VERBOSE +SELECT (first('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((first('/value[1,4]/'::text)))::s3)."time", (((first('/value[1,4]/'::text)))::s3).tags, (((first('/value[1,4]/'::text)))::s3).fields + InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" +(3 rows) + +-- select first(regex) (stub agg function, expose data, result) +--Testcase 129: +SELECT (first('/value[1,4]/')::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value4": "-100"} +(1 row) + +--Testcase 130: +EXPLAIN VERBOSE +SELECT last(time, (fields->>'value1')::float), last(time, (fields->>'value2')::bigint), last(time, (fields->>'value3')::float), last(time, (fields->>'value4')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (last("time", ((fields ->> 'value1'::text))::double precision)), (last("time", ((fields ->> 'value2'::text))::bigint)), (last("time", ((fields ->> 'value3'::text))::double precision)), (last("time", ((fields ->> 'value4'::text))::bigint)) + InfluxDB query: SELECT last("value1"), last("value2"), last("value3"), last("value4") FROM "s3" +(3 rows) + +--Testcase 131: +SELECT last(time, (fields->>'value1')::float), last(time, (fields->>'value2')::bigint), last(time, (fields->>'value3')::float), last(time, (fields->>'value4')::bigint) FROM s3; + last | last | last | last +------+------+------+------ + 3.3 | 200 | -3.3 | -200 +(1 row) + +-- select last(*) (stub agg function, explain) +--Testcase 132: +EXPLAIN VERBOSE +SELECT last_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (last_all(*)) + InfluxDB query: SELECT last(*) FROM "s3" +(3 rows) + +-- select last(*) (stub agg function, result) +--Testcase 133: +SELECT last_all(*) from s3; + last_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3\",\"value2\" : \"200\",\"value3\" : \"-3.3\",\"value4\" : \"-200\" }") +(1 row) + +-- select last(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 134: +EXPLAIN VERBOSE +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (last_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT last(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select last(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 135: +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + last_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select last(*) (stub agg function and group by tag only) (explain) +--Testcase 136: +EXPLAIN VERBOSE +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (last_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT last(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select last(*) (stub agg function and group by tag only) (result) +--Testcase 137: +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + last_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(2 rows) + +-- select last(*) (stub agg function, expose data, explain) +--Testcase 138: +EXPLAIN VERBOSE +SELECT (last_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((last_all(*)))::s3)."time", (((last_all(*)))::s3).tags, (((last_all(*)))::s3).fields + InfluxDB query: SELECT last(*) FROM "s3" +(3 rows) + +-- select last(*) (stub agg function, expose data, result) +--Testcase 139: +SELECT (last_all(*)::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------------------------------------------ + 1970-01-01 09:00:00+09 | | {"value1": "3.3", "value2": "200", "value3": "-3.3", "value4": "-200"} +(1 row) + +-- select last(regex) (stub function, explain) +--Testcase 140: +EXPLAIN VERBOSE +SELECT last('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (last('/value[1,4]/'::text)) + InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" +(3 rows) + +-- select last(regex) (stub function, result) +--Testcase 141: +SELECT last('/value[1,4]/') from s3; + last +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3\",\"value4\" : \"-200\" }") +(1 row) + +-- select multiple regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 142: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; +WARNING: Selecting multiple functions with regular expression or star is not supported. + QUERY PLAN +-------------------------------------------------------------------------- + Aggregate (cost=5119.50..5119.51 rows=1 width=64) + Output: first('/value[1,4]/'::text), first('/^v.*/'::text) + -> Foreign Scan on public.s3 (cost=10.00..3413.00 rows=3413 width=0) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "s3" +(5 rows) + +-- select multiple regex functions (do not push down, raise warning and stub error) (result) +--Testcase 143: +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; +WARNING: Selecting multiple functions with regular expression or star is not supported. +ERROR: stub first_sfunc(text, text) is called +CONTEXT: PL/pgSQL function first_sfunc(text,text) line 3 at RAISE +-- select last(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 144: +EXPLAIN VERBOSE +SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (last('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT last(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select last(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 145: +SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + last +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select last(regex) (stub agg function and group by tag only) (explain) +--Testcase 146: +EXPLAIN VERBOSE +SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (last('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select last(regex) (stub agg function and group by tag only) (result) +--Testcase 147: +SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + last +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"2.2\",\"value4\" : \"-200\" }") +(2 rows) + +-- select last(regex) (stub agg function, expose data, explain) +--Testcase 148: +EXPLAIN VERBOSE +SELECT (last('/value[1,4]/')::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((last('/value[1,4]/'::text)))::s3)."time", (((last('/value[1,4]/'::text)))::s3).tags, (((last('/value[1,4]/'::text)))::s3).fields + InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" +(3 rows) + +-- select last(regex) (stub agg function, expose data, result) +--Testcase 149: +SELECT (last('/value[1,4]/')::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "3.3", "value4": "-200"} +(1 row) + +--Testcase 150: +EXPLAIN VERBOSE +SELECT sample((fields->>'value2')::bigint, 3) FROM s3 WHERE (fields->>'value2')::bigint < 200; + QUERY PLAN +--------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=8) + Output: (sample(((fields ->> 'value2'::text))::bigint, 3)) + InfluxDB query: SELECT sample("value2", 3) FROM "s3" WHERE (("value2" < 200)) +(3 rows) + +--Testcase 151: +SELECT sample((fields->>'value2')::bigint, 3) FROM s3 WHERE (fields->>'value2')::bigint < 200; + sample +-------- + 100 + 100 + 100 +(3 rows) + +--Testcase 152: +EXPLAIN VERBOSE +SELECT sample((fields->>'value2')::bigint, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sample(((fields ->> 'value2'::text))::bigint, 1)), (influx_time("time", '@ 3 secs'::interval)) + InfluxDB query: SELECT sample("value2", 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m3s0u)) +(3 rows) + +--Testcase 153: +SELECT sample((fields->>'value2')::bigint, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); + sample +-------- + 100 + 200 +(2 rows) + +-- select sample(*, int) (stub agg function, explain) +--Testcase 154: +EXPLAIN VERBOSE +SELECT sample_all(50) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: sample_all(50) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sample(*, int) (stub agg function, result) +--Testcase 155: +SELECT sample_all(50) from s3; +ERROR: stub sample_all(int) is called +CONTEXT: PL/pgSQL function sample_all(integer) line 3 at RAISE +-- select sample(*, int) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 156: +EXPLAIN VERBOSE +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sample_all(50)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sample(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select sample(*, int) (stub agg function and group by influx_time() and tag) (result) +--Testcase 157: +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + sample_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(5 rows) + +-- select sample(*, int) (stub agg function and group by tag only) (explain) +--Testcase 158: +EXPLAIN VERBOSE +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (sample_all(50)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sample(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select sample(*, int) (stub agg function and group by tag only) (result) +--Testcase 159: +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + sample_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(5 rows) + +-- select sample(*, int) (stub agg function, expose data, explain) +--Testcase 160: +EXPLAIN VERBOSE +SELECT (sample_all(50)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((sample_all(50))::s3)."time", ((sample_all(50))::s3).tags, ((sample_all(50))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sample(*, int) (stub agg function, expose data, result) +--Testcase 161: +SELECT (sample_all(50)::s3).* from s3; +ERROR: stub sample_all(int) is called +CONTEXT: PL/pgSQL function sample_all(integer) line 3 at RAISE +-- select sample(regex) (stub agg function, explain) +--Testcase 162: +EXPLAIN VERBOSE +SELECT sample('/value[1,4]/', 50) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: sample('/value[1,4]/'::text, 50) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sample(regex) (stub agg function, result) +--Testcase 163: +SELECT sample('/value[1,4]/', 50) from s3; +ERROR: stub sample(text, int) is called +CONTEXT: PL/pgSQL function sample(text,integer) line 3 at RAISE +-- select sample(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 164: +EXPLAIN VERBOSE +SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sample('/^v.*/'::text, 50)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sample(/^v.*/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select sample(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 165: +SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + sample +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(5 rows) + +-- select sample(regex) (stub agg function and group by tag only) (explain) +--Testcase 166: +EXPLAIN VERBOSE +SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (sample('/value[1,4]/'::text, 50)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sample(/value[1,4]/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select sample(regex) (stub agg function and group by tag only) (result) +--Testcase 167: +SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + sample +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value4\" : \"-200\" }") +(5 rows) + +-- select sample(regex) (stub agg function, expose data, explain) +--Testcase 168: +EXPLAIN VERBOSE +SELECT (sample('/value[1,4]/', 50)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((sample('/value[1,4]/'::text, 50))::s3)."time", ((sample('/value[1,4]/'::text, 50))::s3).tags, ((sample('/value[1,4]/'::text, 50))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sample(regex) (stub agg function, expose data, result) +--Testcase 169: +SELECT (sample('/value[1,4]/', 50)::s3).* from s3; +ERROR: stub sample(text, int) is called +CONTEXT: PL/pgSQL function sample(text,integer) line 3 at RAISE +--Testcase 170: +EXPLAIN VERBOSE +SELECT cumulative_sum((fields->>'value1')::float),cumulative_sum((fields->>'value2')::bigint),cumulative_sum((fields->>'value3')::float),cumulative_sum((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: cumulative_sum(((fields ->> 'value1'::text))::double precision), cumulative_sum(((fields ->> 'value2'::text))::bigint), cumulative_sum(((fields ->> 'value3'::text))::double precision), cumulative_sum(((fields ->> 'value4'::text))::bigint) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 171: +SELECT cumulative_sum((fields->>'value1')::float),cumulative_sum((fields->>'value2')::bigint),cumulative_sum((fields->>'value3')::float),cumulative_sum((fields->>'value4')::bigint) FROM s3; +ERROR: stub cumulative_sum(float8) is called +CONTEXT: PL/pgSQL function cumulative_sum(double precision) line 3 at RAISE +-- select cumulative_sum(*) (stub function, explain) +--Testcase 172: +EXPLAIN VERBOSE +SELECT cumulative_sum_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: cumulative_sum_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select cumulative_sum(*) (stub function, result) +--Testcase 173: +SELECT cumulative_sum_all() from s3; +ERROR: stub cumulative_sum_all() is called +CONTEXT: PL/pgSQL function cumulative_sum_all() line 3 at RAISE +-- select cumulative_sum(regex) (stub function, result) +--Testcase 174: +SELECT cumulative_sum('/value[1,4]/') from s3; +ERROR: stub cumulative_sum(text) is called +CONTEXT: PL/pgSQL function cumulative_sum(text) line 3 at RAISE +-- select cumulative_sum(regex) (stub function, result) +--Testcase 175: +SELECT cumulative_sum('/value[1,4]/') from s3; +ERROR: stub cumulative_sum(text) is called +CONTEXT: PL/pgSQL function cumulative_sum(text) line 3 at RAISE +-- select multiple star and regex functions (do not push down, raise warning and stub error) (result) +--Testcase 176: +EXPLAIN VERBOSE +SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..5119.50 rows=3413 width=64) + Output: cumulative_sum_all(), cumulative_sum('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (result) +--Testcase 177: +SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; +ERROR: stub cumulative_sum_all() is called +CONTEXT: PL/pgSQL function cumulative_sum_all() line 3 at RAISE +-- select cumulative_sum(*) (stub function and group by tag only) (explain) +--Testcase 178: +EXPLAIN VERBOSE +SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (cumulative_sum_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT cumulative_sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select cumulative_sum(*) (stub function and group by tag only) (result) +--Testcase 179: +SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + cumulative_sum_all +---------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.30000000000000004\",\"value2\" : \"200\",\"value3\" : \"-0.30000000000000004\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.6000000000000001\",\"value2\" : \"300\",\"value3\" : \"-0.6000000000000001\",\"value4\" : \"-300\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"3.3000000000000003\",\"value2\" : \"400\",\"value3\" : \"-3.3000000000000003\",\"value4\" : \"-400\" }") +(5 rows) + +-- select cumulative_sum(regex) (stub function and group by tag only) (explain) +--Testcase 180: +EXPLAIN VERBOSE +SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (cumulative_sum('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT cumulative_sum(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select cumulative_sum(regex) (stub function and group by tag only) (result) +--Testcase 181: +SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + cumulative_sum +----------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.30000000000000004\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.6000000000000001\",\"value4\" : \"-300\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"3.3000000000000003\",\"value4\" : \"-400\" }") +(5 rows) + +-- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, explain) +--Testcase 182: +EXPLAIN VERBOSE +SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=144) + Output: ((cumulative_sum_all())::s3)."time", ((cumulative_sum_all())::s3).tags, ((cumulative_sum_all())::s3).fields, ((cumulative_sum('/value[1,4]/'::text))::s3)."time", ((cumulative_sum('/value[1,4]/'::text))::s3).tags, ((cumulative_sum('/value[1,4]/'::text))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, result) +--Testcase 183: +SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; +ERROR: stub cumulative_sum_all() is called +CONTEXT: PL/pgSQL function cumulative_sum_all() line 3 at RAISE +--Testcase 184: +EXPLAIN VERBOSE +SELECT derivative((fields->>'value1')::float),derivative((fields->>'value2')::bigint),derivative((fields->>'value3')::float),derivative((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: derivative(((fields ->> 'value1'::text))::double precision), derivative(((fields ->> 'value2'::text))::bigint), derivative(((fields ->> 'value3'::text))::double precision), derivative(((fields ->> 'value4'::text))::bigint) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 185: +SELECT derivative((fields->>'value1')::float),derivative((fields->>'value2')::bigint),derivative((fields->>'value3')::float),derivative((fields->>'value4')::bigint) FROM s3; +ERROR: stub derivative(anyelement) is called +CONTEXT: PL/pgSQL function derivative(anyelement) line 3 at RAISE +--Testcase 186: +EXPLAIN VERBOSE +SELECT derivative((fields->>'value1')::float, interval '0.5s'),derivative((fields->>'value2')::bigint, interval '0.2s'),derivative((fields->>'value3')::float, interval '0.1s'),derivative((fields->>'value4')::bigint, interval '2s') FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: derivative(((fields ->> 'value1'::text))::double precision, '@ 0.5 secs'::interval), derivative(((fields ->> 'value2'::text))::bigint, '@ 0.2 secs'::interval), derivative(((fields ->> 'value3'::text))::double precision, '@ 0.1 secs'::interval), derivative(((fields ->> 'value4'::text))::bigint, '@ 2 secs'::interval) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 187: +SELECT derivative((fields->>'value1')::float, interval '0.5s'),derivative((fields->>'value2')::bigint, interval '0.2s'),derivative((fields->>'value3')::float, interval '0.1s'),derivative((fields->>'value4')::bigint, interval '2s') FROM s3; +ERROR: stub derivative(anyelement, interval) is called +CONTEXT: PL/pgSQL function derivative(anyelement,interval) line 3 at RAISE +-- select derivative(*) (stub function, explain) +--Testcase 188: +EXPLAIN VERBOSE +SELECT derivative_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: derivative_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select derivative(*) (stub function, result) +--Testcase 189: +SELECT derivative_all() from s3; +ERROR: stub derivative_all() is called +CONTEXT: PL/pgSQL function derivative_all() line 3 at RAISE +-- select derivative(regex) (stub function, explain) +--Testcase 190: +EXPLAIN VERBOSE +SELECT derivative('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: derivative('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select derivative(regex) (stub function, result) +--Testcase 191: +SELECT derivative('/value[1,4]/') from s3; +ERROR: stub derivative(text) is called +CONTEXT: PL/pgSQL function derivative(text) line 3 at RAISE +-- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 192: +EXPLAIN VERBOSE +SELECT derivative_all(), derivative('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..5119.50 rows=3413 width=64) + Output: derivative_all(), derivative('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 193: +SELECT derivative_all(), derivative('/value[1,4]/') from s3; +ERROR: stub derivative_all() is called +CONTEXT: PL/pgSQL function derivative_all() line 3 at RAISE +-- select derivative(*) (stub function and group by tag only) (explain) +--Testcase 194: +EXPLAIN VERBOSE +SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (derivative_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT derivative(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select derivative(*) (stub function and group by tag only) (result) +--Testcase 195: +SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + derivative_all +----------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : \"-0.1\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : \"-0.09999999999999998\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : \"-1.1\",\"value4\" : \"0\" }") +(3 rows) + +-- select derivative(regex) (stub function and group by tag only) (explain) +--Testcase 196: +EXPLAIN VERBOSE +SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (derivative('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT derivative(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select derivative(regex) (stub function and group by tag only) (result) +--Testcase 197: +SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + derivative +-------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") +(3 rows) + +-- select derivative(*) (stub agg function, expose data, explain) +--Testcase 198: +EXPLAIN VERBOSE +SELECT (derivative_all()::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((derivative_all())::s3)."time", ((derivative_all())::s3).tags, ((derivative_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select derivative(*) (stub agg function, expose data, result) +--Testcase 199: +SELECT (derivative_all()::s3).* from s3; +ERROR: stub derivative_all() is called +CONTEXT: PL/pgSQL function derivative_all() line 3 at RAISE +-- select derivative(regex) (stub agg function, expose data, explain) +--Testcase 200: +EXPLAIN VERBOSE +SELECT (derivative('/value[1,4]/')::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((derivative('/value[1,4]/'::text))::s3)."time", ((derivative('/value[1,4]/'::text))::s3).tags, ((derivative('/value[1,4]/'::text))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select derivative(regex) (stub agg function, expose data, result) +--Testcase 201: +SELECT (derivative('/value[1,4]/')::s3).* from s3; +ERROR: stub derivative(text) is called +CONTEXT: PL/pgSQL function derivative(text) line 3 at RAISE +--Testcase 202: +EXPLAIN VERBOSE +SELECT non_negative_derivative((fields->>'value1')::float),non_negative_derivative((fields->>'value2')::bigint),non_negative_derivative((fields->>'value3')::float),non_negative_derivative((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: non_negative_derivative(((fields ->> 'value1'::text))::double precision), non_negative_derivative(((fields ->> 'value2'::text))::bigint), non_negative_derivative(((fields ->> 'value3'::text))::double precision), non_negative_derivative(((fields ->> 'value4'::text))::bigint) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 203: +SELECT non_negative_derivative((fields->>'value1')::float),non_negative_derivative((fields->>'value2')::bigint),non_negative_derivative((fields->>'value3')::float),non_negative_derivative((fields->>'value4')::bigint) FROM s3; +ERROR: stub non_negative_derivative(anyelement) is called +CONTEXT: PL/pgSQL function non_negative_derivative(anyelement) line 3 at RAISE +--Testcase 204: +EXPLAIN VERBOSE +SELECT non_negative_derivative((fields->>'value1')::float, interval '0.5s'),non_negative_derivative((fields->>'value2')::bigint, interval '0.2s'),non_negative_derivative((fields->>'value3')::float, interval '0.1s'),non_negative_derivative((fields->>'value4')::bigint, interval '2s') FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: non_negative_derivative(((fields ->> 'value1'::text))::double precision, '@ 0.5 secs'::interval), non_negative_derivative(((fields ->> 'value2'::text))::bigint, '@ 0.2 secs'::interval), non_negative_derivative(((fields ->> 'value3'::text))::double precision, '@ 0.1 secs'::interval), non_negative_derivative(((fields ->> 'value4'::text))::bigint, '@ 2 secs'::interval) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 205: +SELECT non_negative_derivative((fields->>'value1')::float, interval '0.5s'),non_negative_derivative((fields->>'value2')::bigint, interval '0.2s'),non_negative_derivative((fields->>'value3')::float, interval '0.1s'),non_negative_derivative((fields->>'value4')::bigint, interval '2s') FROM s3; +ERROR: stub non_negative_derivative(anyelement, interval) is called +CONTEXT: PL/pgSQL function non_negative_derivative(anyelement,interval) line 3 at RAISE +-- select non_negative_derivative(*) (stub function, explain) +--Testcase 206: +EXPLAIN VERBOSE +SELECT non_negative_derivative_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: non_negative_derivative_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_derivative(*) (stub function, result) +--Testcase 207: +SELECT non_negative_derivative_all() from s3; +ERROR: stub non_negative_derivative_all() is called +CONTEXT: PL/pgSQL function non_negative_derivative_all() line 3 at RAISE +-- select non_negative_derivative(regex) (stub function, explain) +--Testcase 208: +EXPLAIN VERBOSE +SELECT non_negative_derivative('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: non_negative_derivative('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_derivative(regex) (stub function, result) +--Testcase 209: +SELECT non_negative_derivative('/value[1,4]/') from s3; +ERROR: stub non_negative_derivative(text) is called +CONTEXT: PL/pgSQL function non_negative_derivative(text) line 3 at RAISE +-- select non_negative_derivative(*) (stub function and group by tag only) (explain) +--Testcase 210: +EXPLAIN VERBOSE +SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (non_negative_derivative_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT non_negative_derivative(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select non_negative_derivative(*) (stub function and group by tag only) (result) +--Testcase 211: +SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + non_negative_derivative_all +--------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") +(3 rows) + +-- select non_negative_derivative(regex) (stub function and group by tag only) (explain) +--Testcase 212: +EXPLAIN VERBOSE +SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (non_negative_derivative('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT non_negative_derivative(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select non_negative_derivative(regex) (stub agg function and group by tag only) (result) +--Testcase 213: +SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + non_negative_derivative +-------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") +(3 rows) + +-- select non_negative_derivative(*) (stub function, expose data, explain) +--Testcase 214: +EXPLAIN VERBOSE +SELECT (non_negative_derivative_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((non_negative_derivative_all())::s3)."time", ((non_negative_derivative_all())::s3).tags, ((non_negative_derivative_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_derivative(*) (stub agg function, expose data, result) +--Testcase 215: +SELECT (non_negative_derivative_all()::s3).* from s3; +ERROR: stub non_negative_derivative_all() is called +CONTEXT: PL/pgSQL function non_negative_derivative_all() line 3 at RAISE +-- select non_negative_derivative(regex) (stub function, expose data, explain) +--Testcase 216: +EXPLAIN VERBOSE +SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((non_negative_derivative('/value[1,4]/'::text))::s3)."time", ((non_negative_derivative('/value[1,4]/'::text))::s3).tags, ((non_negative_derivative('/value[1,4]/'::text))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_derivative(regex) (stub agg function, expose data, result) +--Testcase 217: +SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; +ERROR: stub non_negative_derivative(text) is called +CONTEXT: PL/pgSQL function non_negative_derivative(text) line 3 at RAISE +--Testcase 218: +EXPLAIN VERBOSE +SELECT difference((fields->>'value1')::float),difference((fields->>'value2')::bigint),difference((fields->>'value3')::float),difference((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: difference(((fields ->> 'value1'::text))::double precision), difference(((fields ->> 'value2'::text))::bigint), difference(((fields ->> 'value3'::text))::double precision), difference(((fields ->> 'value4'::text))::bigint) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 219: +SELECT difference((fields->>'value1')::float),difference((fields->>'value2')::bigint),difference((fields->>'value3')::float),difference((fields->>'value4')::bigint) FROM s3; +ERROR: stub difference(float8) is called +CONTEXT: PL/pgSQL function difference(double precision) line 3 at RAISE +-- select difference(*) (stub function, explain) +--Testcase 220: +EXPLAIN VERBOSE +SELECT difference_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: difference_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select difference(*) (stub function, result) +--Testcase 221: +SELECT difference_all() from s3; +ERROR: stub difference_all() is called +CONTEXT: PL/pgSQL function difference_all() line 3 at RAISE +-- select difference(regex) (stub function, explain) +--Testcase 222: +EXPLAIN VERBOSE +SELECT difference('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: difference('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select difference(regex) (stub function, result) +--Testcase 223: +SELECT difference('/value[1,4]/') from s3; +ERROR: stub difference(text) is called +CONTEXT: PL/pgSQL function difference(text) line 3 at RAISE +-- select difference(*) (stub agg function and group by tag only) (explain) +--Testcase 224: +EXPLAIN VERBOSE +SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (difference_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT difference(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select difference(*) (stub agg function and group by tag only) (result) +--Testcase 225: +SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + difference_all +----------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : \"-0.1\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : \"-0.09999999999999998\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : \"-1.1\",\"value4\" : \"0\" }") +(3 rows) + +-- select difference(regex) (stub agg function and group by tag only) (explain) +--Testcase 226: +EXPLAIN VERBOSE +SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (difference('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT difference(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select difference(regex) (stub agg function and group by tag only) (result) +--Testcase 227: +SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + difference +-------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") +(3 rows) + +-- select difference(*) (stub function, expose data, explain) +--Testcase 228: +EXPLAIN VERBOSE +SELECT (difference_all()::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((difference_all())::s3)."time", ((difference_all())::s3).tags, ((difference_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select difference(*) (stub function, expose data, result) +--Testcase 229: +SELECT (difference_all()::s3).* from s3; +ERROR: stub difference_all() is called +CONTEXT: PL/pgSQL function difference_all() line 3 at RAISE +-- select difference(regex) (stub function, expose data, explain) +--Testcase 230: +EXPLAIN VERBOSE +SELECT (difference('/value[1,4]/')::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((difference('/value[1,4]/'::text))::s3)."time", ((difference('/value[1,4]/'::text))::s3).tags, ((difference('/value[1,4]/'::text))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select difference(regex) (stub function, expose data, result) +--Testcase 231: +SELECT (difference('/value[1,4]/')::s3).* from s3; +ERROR: stub difference(text) is called +CONTEXT: PL/pgSQL function difference(text) line 3 at RAISE +--Testcase 232: +EXPLAIN VERBOSE +SELECT non_negative_difference((fields->>'value1')::float),non_negative_difference((fields->>'value2')::bigint),non_negative_difference((fields->>'value3')::float),non_negative_difference((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: non_negative_difference(((fields ->> 'value1'::text))::double precision), non_negative_difference(((fields ->> 'value2'::text))::bigint), non_negative_difference(((fields ->> 'value3'::text))::double precision), non_negative_difference(((fields ->> 'value4'::text))::bigint) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 233: +SELECT non_negative_difference((fields->>'value1')::float),non_negative_difference((fields->>'value2')::bigint),non_negative_difference((fields->>'value3')::float),non_negative_difference((fields->>'value4')::bigint) FROM s3; +ERROR: stub non_negative_difference(float8) is called +CONTEXT: PL/pgSQL function non_negative_difference(double precision) line 3 at RAISE +-- select non_negative_difference(*) (stub function, explain) +--Testcase 234: +EXPLAIN VERBOSE +SELECT non_negative_difference_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: non_negative_difference_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_difference(*) (stub function, result) +--Testcase 235: +SELECT non_negative_difference_all() from s3; +ERROR: stub non_negative_difference_all() is called +CONTEXT: PL/pgSQL function non_negative_difference_all() line 3 at RAISE +-- select non_negative_difference(regex) (stub agg function, explain) +--Testcase 236: +EXPLAIN VERBOSE +SELECT non_negative_difference('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: non_negative_difference('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_difference(*), non_negative_difference(regex) (stub function, result) +--Testcase 237: +SELECT non_negative_difference('/value[1,4]/') from s3; +ERROR: stub non_negative_difference(text) is called +CONTEXT: PL/pgSQL function non_negative_difference(text) line 3 at RAISE +-- select non_negative_difference(*) (stub function and group by tag only) (explain) +--Testcase 238: +EXPLAIN VERBOSE +SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (non_negative_difference_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT non_negative_difference(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select non_negative_difference(*) (stub function and group by tag only) (result) +--Testcase 239: +SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + non_negative_difference_all +--------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value2\" : \"0\",\"value3\" : null,\"value4\" : \"0\" }") +(3 rows) + +-- select non_negative_difference(regex) (stub function and group by tag only) (explain) +--Testcase 240: +EXPLAIN VERBOSE +SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (non_negative_difference('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT non_negative_difference(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select non_negative_difference(regex) (stub function and group by tag only) (result) +--Testcase 241: +SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + non_negative_difference +-------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09999999999999998\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1\",\"value4\" : \"0\" }") +(3 rows) + +-- select non_negative_difference(*) (stub function, expose data, explain) +--Testcase 242: +EXPLAIN VERBOSE +SELECT (non_negative_difference_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((non_negative_difference_all())::s3)."time", ((non_negative_difference_all())::s3).tags, ((non_negative_difference_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_difference(*) (stub function, expose data, result) +--Testcase 243: +SELECT (non_negative_difference_all()::s3).* from s3; +ERROR: stub non_negative_difference_all() is called +CONTEXT: PL/pgSQL function non_negative_difference_all() line 3 at RAISE +-- select non_negative_difference(regex) (stub function, expose data, explain) +--Testcase 244: +EXPLAIN VERBOSE +SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((non_negative_difference('/value[1,4]/'::text))::s3)."time", ((non_negative_difference('/value[1,4]/'::text))::s3).tags, ((non_negative_difference('/value[1,4]/'::text))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_difference(regex) (stub function, expose data, result) +--Testcase 245: +SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; +ERROR: stub non_negative_difference(text) is called +CONTEXT: PL/pgSQL function non_negative_difference(text) line 3 at RAISE +--Testcase 246: +EXPLAIN VERBOSE +SELECT elapsed((fields->>'value1')::float),elapsed((fields->>'value2')::bigint),elapsed((fields->>'value3')::float),elapsed((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: elapsed(((fields ->> 'value1'::text))::double precision), elapsed(((fields ->> 'value2'::text))::bigint), elapsed(((fields ->> 'value3'::text))::double precision), elapsed(((fields ->> 'value4'::text))::bigint) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 247: +SELECT elapsed((fields->>'value1')::float),elapsed((fields->>'value2')::bigint),elapsed((fields->>'value3')::float),elapsed((fields->>'value4')::bigint) FROM s3; +ERROR: stub elapsed(anyelement) is called +CONTEXT: PL/pgSQL function elapsed(anyelement) line 3 at RAISE +--Testcase 248: +EXPLAIN VERBOSE +SELECT elapsed((fields->>'value1')::float, interval '0.5s'),elapsed((fields->>'value2')::bigint, interval '0.2s'),elapsed((fields->>'value3')::float, interval '0.1s'),elapsed((fields->>'value4')::bigint, interval '2s') FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: elapsed(((fields ->> 'value1'::text))::double precision, '@ 0.5 secs'::interval), elapsed(((fields ->> 'value2'::text))::bigint, '@ 0.2 secs'::interval), elapsed(((fields ->> 'value3'::text))::double precision, '@ 0.1 secs'::interval), elapsed(((fields ->> 'value4'::text))::bigint, '@ 2 secs'::interval) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 249: +SELECT elapsed((fields->>'value1')::float, interval '0.5s'),elapsed((fields->>'value2')::bigint, interval '0.2s'),elapsed((fields->>'value3')::float, interval '0.1s'),elapsed((fields->>'value4')::bigint, interval '2s') FROM s3; +ERROR: stub elapsed(anyelement, interval) is called +CONTEXT: PL/pgSQL function elapsed(anyelement,interval) line 3 at RAISE +-- select elapsed(*) (stub function, explain) +--Testcase 250: +EXPLAIN VERBOSE +SELECT elapsed_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: elapsed_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select elapsed(*) (stub function, result) +--Testcase 251: +SELECT elapsed_all() from s3; +ERROR: stub elapsed_all() is called +CONTEXT: PL/pgSQL function elapsed_all() line 3 at RAISE +-- select elapsed(regex) (stub function, explain) +--Testcase 252: +EXPLAIN VERBOSE +SELECT elapsed('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: elapsed('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select elapsed(regex) (stub agg function, result) +--Testcase 253: +SELECT elapsed('/value[1,4]/') from s3; +ERROR: stub elapsed(text) is called +CONTEXT: PL/pgSQL function elapsed(text) line 3 at RAISE +-- select elapsed(*) (stub function and group by tag only) (explain) +--Testcase 254: +EXPLAIN VERBOSE +SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (elapsed_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT elapsed(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select elapsed(*) (stub function and group by tag only) (result) +--Testcase 255: +SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + elapsed_all +---------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1000000000\",\"value2\" : \"1000000000\",\"value3\" : \"1000000000\",\"value4\" : \"1000000000\" }") +(3 rows) + +-- select elapsed(regex) (stub function and group by tag only) (explain) +--Testcase 256: +EXPLAIN VERBOSE +SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (elapsed('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT elapsed(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select elapsed(regex) (stub function and group by tag only) (result) +--Testcase 257: +SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + elapsed +-------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1000000000\",\"value4\" : \"1000000000\" }") +(3 rows) + +-- select elapsed(*) (stub function, expose data, explain) +--Testcase 258: +EXPLAIN VERBOSE +SELECT (elapsed_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((elapsed_all())::s3)."time", ((elapsed_all())::s3).tags, ((elapsed_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select elapsed(*) (stub function, expose data, result) +--Testcase 259: +SELECT (elapsed_all()::s3).* from s3; +ERROR: stub elapsed_all() is called +CONTEXT: PL/pgSQL function elapsed_all() line 3 at RAISE +-- select elapsed(regex) (stub function, expose data, explain) +--Testcase 260: +EXPLAIN VERBOSE +SELECT (elapsed('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((elapsed('/value[1,4]/'::text))::s3)."time", ((elapsed('/value[1,4]/'::text))::s3).tags, ((elapsed('/value[1,4]/'::text))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select elapsed(regex) (stub agg function, expose data, result) +--Testcase 261: +SELECT (elapsed('/value[1,4]/')::s3).* from s3; +ERROR: stub elapsed(text) is called +CONTEXT: PL/pgSQL function elapsed(text) line 3 at RAISE +--Testcase 262: +EXPLAIN VERBOSE +SELECT moving_average((fields->>'value1')::float, 2),moving_average((fields->>'value2')::bigint, 2),moving_average((fields->>'value3')::float, 2),moving_average((fields->>'value4')::bigint, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: moving_average(((fields ->> 'value1'::text))::double precision, 2), moving_average(((fields ->> 'value2'::text))::bigint, 2), moving_average(((fields ->> 'value3'::text))::double precision, 2), moving_average(((fields ->> 'value4'::text))::bigint, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 263: +SELECT moving_average((fields->>'value1')::float, 2),moving_average((fields->>'value2')::bigint, 2),moving_average((fields->>'value3')::float, 2),moving_average((fields->>'value4')::bigint, 2) FROM s3; +ERROR: stub moving_average(float8, int) is called +CONTEXT: PL/pgSQL function moving_average(double precision,integer) line 3 at RAISE +-- select moving_average(*) (stub function, explain) +--Testcase 264: +EXPLAIN VERBOSE +SELECT moving_average_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: moving_average_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select moving_average(*) (stub function, result) +--Testcase 265: +SELECT moving_average_all(2) from s3; +ERROR: stub moving_average_all(int) is called +CONTEXT: PL/pgSQL function moving_average_all(integer) line 3 at RAISE +-- select moving_average(regex) (stub function, explain) +--Testcase 266: +EXPLAIN VERBOSE +SELECT moving_average('/value[1,4]/', 2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: moving_average('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select moving_average(regex) (stub function, result) +--Testcase 267: +SELECT moving_average('/value[1,4]/', 2) from s3; +ERROR: stub moving_average(text, int) is called +CONTEXT: PL/pgSQL function moving_average(text,integer) line 3 at RAISE +-- select moving_average(*) (stub function and group by tag only) (explain) +--Testcase 268: +EXPLAIN VERBOSE +SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (moving_average_all(2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select moving_average(*) (stub function and group by tag only) (result) +--Testcase 269: +SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + moving_average_all +---------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.15000000000000002\",\"value2\" : \"100\",\"value3\" : \"-0.15000000000000002\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25\",\"value2\" : \"100\",\"value3\" : \"-0.25\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") +(3 rows) + +-- select moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 270: +EXPLAIN VERBOSE +SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (moving_average('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select moving_average(regex) (stub function and group by tag only) (result) +--Testcase 271: +SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + moving_average +----------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.15000000000000002\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.6500000000000001\",\"value4\" : \"-200\" }") +(3 rows) + +-- select moving_average(*) (stub function, expose data, explain) +--Testcase 272: +EXPLAIN VERBOSE +SELECT (moving_average_all(2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((moving_average_all(2))::s3)."time", ((moving_average_all(2))::s3).tags, ((moving_average_all(2))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select moving_average(*) (stub function, expose data, result) +--Testcase 273: +SELECT (moving_average_all(2)::s3).* from s3; +ERROR: stub moving_average_all(int) is called +CONTEXT: PL/pgSQL function moving_average_all(integer) line 3 at RAISE +-- select moving_average(regex) (stub function, expose data, explain) +--Testcase 274: +EXPLAIN VERBOSE +SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((moving_average('/value[1,4]/'::text, 2))::s3)."time", ((moving_average('/value[1,4]/'::text, 2))::s3).tags, ((moving_average('/value[1,4]/'::text, 2))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select moving_average(regex) (stub function, expose data, result) +--Testcase 275: +SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; +ERROR: stub moving_average(text, int) is called +CONTEXT: PL/pgSQL function moving_average(text,integer) line 3 at RAISE +--Testcase 276: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator((fields->>'value1')::float, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2),chande_momentum_oscillator((fields->>'value3')::float, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: chande_momentum_oscillator(((fields ->> 'value1'::text))::double precision, 2), chande_momentum_oscillator(((fields ->> 'value2'::text))::bigint, 2), chande_momentum_oscillator(((fields ->> 'value3'::text))::double precision, 2), chande_momentum_oscillator(((fields ->> 'value4'::text))::bigint, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 277: +SELECT chande_momentum_oscillator((fields->>'value1')::float, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2),chande_momentum_oscillator((fields->>'value3')::float, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2) FROM s3; +ERROR: stub chande_momentum_oscillator(float8, int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator(double precision,integer) line 3 at RAISE +--Testcase 278: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator((fields->>'value1')::float, 2, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2, 2),chande_momentum_oscillator((fields->>'value3')::float, 2, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: chande_momentum_oscillator(((fields ->> 'value1'::text))::double precision, 2, 2), chande_momentum_oscillator(((fields ->> 'value2'::text))::bigint, 2, 2), chande_momentum_oscillator(((fields ->> 'value3'::text))::double precision, 2, 2), chande_momentum_oscillator(((fields ->> 'value4'::text))::bigint, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 279: +SELECT chande_momentum_oscillator((fields->>'value1')::float, 2, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2, 2),chande_momentum_oscillator((fields->>'value3')::float, 2, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2, 2) FROM s3; +ERROR: stub chande_momentum_oscillator(float8, int, int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator(double precision,integer,integer) line 3 at RAISE +-- select chande_momentum_oscillator(*) (stub function, explain) +--Testcase 280: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: chande_momentum_oscillator_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select chande_momentum_oscillator(*) (stub function, result) +--Testcase 281: +SELECT chande_momentum_oscillator_all(2) from s3; +ERROR: stub chande_momentum_oscillator_all(int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator_all(integer) line 3 at RAISE +-- select chande_momentum_oscillator(regex) (stub function, explain) +--Testcase 282: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: chande_momentum_oscillator('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select chande_momentum_oscillator(regex) (stub agg function, result) +--Testcase 283: +SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; +ERROR: stub chande_momentum_oscillator(text, int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator(text,integer) line 3 at RAISE +-- select chande_momentum_oscillator(*) (stub function and group by tag only) (explain) +--Testcase 284: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (chande_momentum_oscillator_all(2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT chande_momentum_oscillator(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select chande_momentum_oscillator(*) (stub agg function and group by tag only) (result) +--Testcase 285: +SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + chande_momentum_oscillator_all +--------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"100\",\"value2\" : \"0\",\"value3\" : \"-100\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value2\" : \"0\",\"value3\" : \"-100\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"100\",\"value2\" : \"0\",\"value3\" : \"-100\",\"value4\" : \"0\" }") +(3 rows) + +-- select chande_momentum_oscillator(regex) (stub agg function and group by tag only) (explain) +--Testcase 286: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (chande_momentum_oscillator('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT chande_momentum_oscillator(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select chande_momentum_oscillator(regex) (stub function and group by tag only) (result) +--Testcase 287: +SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + chande_momentum_oscillator +---------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") +(3 rows) + +-- select chande_momentum_oscillator(*) (stub agg function, expose data, explain) +--Testcase 288: +EXPLAIN VERBOSE +SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((chande_momentum_oscillator_all(2))::s3)."time", ((chande_momentum_oscillator_all(2))::s3).tags, ((chande_momentum_oscillator_all(2))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select chande_momentum_oscillator(*) (stub function, expose data, result) +--Testcase 289: +SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; +ERROR: stub chande_momentum_oscillator_all(int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator_all(integer) line 3 at RAISE +-- select chande_momentum_oscillator(regex) (stub function, expose data, explain) +--Testcase 290: +EXPLAIN VERBOSE +SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((chande_momentum_oscillator('/value[1,4]/'::text, 2))::s3)."time", ((chande_momentum_oscillator('/value[1,4]/'::text, 2))::s3).tags, ((chande_momentum_oscillator('/value[1,4]/'::text, 2))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select chande_momentum_oscillator(regex) (stub function, expose data, result) +--Testcase 291: +SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; +ERROR: stub chande_momentum_oscillator(text, int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator(text,integer) line 3 at RAISE +--Testcase 292: +EXPLAIN VERBOSE +SELECT exponential_moving_average((fields->>'value1')::float, 2),exponential_moving_average((fields->>'value2')::bigint, 2),exponential_moving_average((fields->>'value3')::float, 2),exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2), exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2), exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2), exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 293: +SELECT exponential_moving_average((fields->>'value1')::float, 2),exponential_moving_average((fields->>'value2')::bigint, 2),exponential_moving_average((fields->>'value3')::float, 2),exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; +ERROR: stub exponential_moving_average(float8, int) is called +CONTEXT: PL/pgSQL function exponential_moving_average(double precision,integer) line 3 at RAISE +--Testcase 294: +EXPLAIN VERBOSE +SELECT exponential_moving_average((fields->>'value1')::float, 2, 2),exponential_moving_average((fields->>'value2')::bigint, 2, 2),exponential_moving_average((fields->>'value3')::float, 2, 2),exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2, 2), exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2, 2), exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2, 2), exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 295: +SELECT exponential_moving_average((fields->>'value1')::float, 2, 2),exponential_moving_average((fields->>'value2')::bigint, 2, 2),exponential_moving_average((fields->>'value3')::float, 2, 2),exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; +ERROR: stub exponential_moving_average(float8, int, int) is called +CONTEXT: PL/pgSQL function exponential_moving_average(double precision,integer,integer) line 3 at RAISE +-- select exponential_moving_average(*) (stub function, explain) +--Testcase 296: +EXPLAIN VERBOSE +SELECT exponential_moving_average_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: exponential_moving_average_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select exponential_moving_average(*) (stub function, result) +--Testcase 297: +SELECT exponential_moving_average_all(2) from s3; +ERROR: stub exponential_moving_average_all(int) is called +CONTEXT: PL/pgSQL function exponential_moving_average_all(integer) line 3 at RAISE +-- select exponential_moving_average(regex) (stub function, explain) +--Testcase 298: +EXPLAIN VERBOSE +SELECT exponential_moving_average('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: exponential_moving_average('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select exponential_moving_average(regex) (stub function, result) +--Testcase 299: +SELECT exponential_moving_average('/value[1,4]/',2) from s3; +ERROR: stub exponential_moving_average(text, int) is called +CONTEXT: PL/pgSQL function exponential_moving_average(text,integer) line 3 at RAISE +-- select exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 300: +EXPLAIN VERBOSE +SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (exponential_moving_average_all(2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 301: +SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + exponential_moving_average_all +---------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.16666666666666669\",\"value2\" : \"100\",\"value3\" : \"-0.16666666666666669\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25555555555555554\",\"value2\" : \"100\",\"value3\" : \"-0.25555555555555554\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.8333333333333335\",\"value2\" : \"200\",\"value3\" : \"-1.8333333333333335\",\"value4\" : \"-200\" }") +(3 rows) + +-- select exponential_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 302: +EXPLAIN VERBOSE +SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (exponential_moving_average('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select exponential_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 303: +SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + exponential_moving_average +----------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.16666666666666669\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.25555555555555554\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.8333333333333335\",\"value4\" : \"-200\" }") +(3 rows) + +--Testcase 304: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average((fields->>'value1')::float, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2),double_exponential_moving_average((fields->>'value3')::float, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: double_exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2), double_exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2), double_exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2), double_exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 305: +SELECT double_exponential_moving_average((fields->>'value1')::float, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2),double_exponential_moving_average((fields->>'value3')::float, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; +ERROR: stub double_exponential_moving_average(float8, int) is called +CONTEXT: PL/pgSQL function double_exponential_moving_average(double precision,integer) line 3 at RAISE +--Testcase 306: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average((fields->>'value1')::float, 2, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2, 2),double_exponential_moving_average((fields->>'value3')::float, 2, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: double_exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2, 2), double_exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2, 2), double_exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2, 2), double_exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 307: +SELECT double_exponential_moving_average((fields->>'value1')::float, 2, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2, 2),double_exponential_moving_average((fields->>'value3')::float, 2, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; +ERROR: stub double_exponential_moving_average(float8, int, int) is called +CONTEXT: PL/pgSQL function double_exponential_moving_average(double precision,integer,integer) line 3 at RAISE +-- select double_exponential_moving_average(*) (stub function, explain) +--Testcase 308: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: double_exponential_moving_average_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select double_exponential_moving_average(*) (stub function, result) +--Testcase 309: +SELECT double_exponential_moving_average_all(2) from s3; +ERROR: stub double_exponential_moving_average_all(int) is called +CONTEXT: PL/pgSQL function double_exponential_moving_average_all(integer) line 3 at RAISE +-- select double_exponential_moving_average(regex) (stub function, explain) +--Testcase 310: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: double_exponential_moving_average('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select double_exponential_moving_average(regex) (stub function, result) +--Testcase 311: +SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; +ERROR: stub double_exponential_moving_average(text, int) is called +CONTEXT: PL/pgSQL function double_exponential_moving_average(text,integer) line 3 at RAISE +-- select double_exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 312: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (double_exponential_moving_average_all(2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT double_exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select double_exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 313: +SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + double_exponential_moving_average_all +---------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1888888888888889\",\"value2\" : \"100\",\"value3\" : \"-0.1888888888888889\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.29259259259259257\",\"value2\" : \"100\",\"value3\" : \"-0.29259259259259257\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.077777777777778\",\"value2\" : \"200\",\"value3\" : \"-2.077777777777778\",\"value4\" : \"-200\" }") +(3 rows) + +-- select double_exponential_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 314: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (double_exponential_moving_average('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT double_exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select double_exponential_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 315: +SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + double_exponential_moving_average +----------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1888888888888889\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.29259259259259257\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.077777777777778\",\"value4\" : \"-200\" }") +(3 rows) + +--Testcase 316: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: kaufmans_efficiency_ratio(((fields ->> 'value1'::text))::double precision, 2), kaufmans_efficiency_ratio(((fields ->> 'value2'::text))::bigint, 2), kaufmans_efficiency_ratio(((fields ->> 'value3'::text))::double precision, 2), kaufmans_efficiency_ratio(((fields ->> 'value4'::text))::bigint, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 317: +SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2) FROM s3; +ERROR: stub kaufmans_efficiency_ratio(float8, int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio(double precision,integer) line 3 at RAISE +--Testcase 318: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2, 2) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: kaufmans_efficiency_ratio(((fields ->> 'value1'::text))::double precision, 2, 2), kaufmans_efficiency_ratio(((fields ->> 'value2'::text))::bigint, 2, 2), kaufmans_efficiency_ratio(((fields ->> 'value3'::text))::double precision, 2, 2), kaufmans_efficiency_ratio(((fields ->> 'value4'::text))::bigint, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 319: +SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2, 2) FROM s3; +ERROR: stub kaufmans_efficiency_ratio(float8, int, int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio(double precision,integer,integer) line 3 at RAISE +-- select kaufmans_efficiency_ratio(*) (stub function, explain) +--Testcase 320: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: kaufmans_efficiency_ratio_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_efficiency_ratio(*) (stub function, result) +--Testcase 321: +SELECT kaufmans_efficiency_ratio_all(2) from s3; +ERROR: stub kaufmans_efficiency_ratio_all(int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio_all(integer) line 3 at RAISE +-- select kaufmans_efficiency_ratio(regex) (stub function, explain) +--Testcase 322: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: kaufmans_efficiency_ratio('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_efficiency_ratio(regex) (stub function, result) +--Testcase 323: +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; +ERROR: stub kaufmans_efficiency_ratio(text, int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio(text,integer) line 3 at RAISE +-- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (explain) +--Testcase 324: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (kaufmans_efficiency_ratio_all(2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT kaufmans_efficiency_ratio(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (result) +--Testcase 325: +SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + kaufmans_efficiency_ratio_all +---------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value2\" : \"0\",\"value3\" : \"1\",\"value4\" : \"0\" }") +(1 row) + +-- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (explain) +--Testcase 326: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT kaufmans_efficiency_ratio(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (result) +--Testcase 327: +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + kaufmans_efficiency_ratio +-------------------------------------------------------------------- + (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value4\" : \"0\" }") +(1 row) + +-- select kaufmans_efficiency_ratio(*) (stub function, expose data, explain) +--Testcase 328: +EXPLAIN VERBOSE +SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((kaufmans_efficiency_ratio_all(2))::s3)."time", ((kaufmans_efficiency_ratio_all(2))::s3).tags, ((kaufmans_efficiency_ratio_all(2))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_efficiency_ratio(*) (stub function, expose data, result) +--Testcase 329: +SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; +ERROR: stub kaufmans_efficiency_ratio_all(int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio_all(integer) line 3 at RAISE +-- select kaufmans_efficiency_ratio(regex) (stub function, expose data, explain) +--Testcase 330: +EXPLAIN VERBOSE +SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2))::s3)."time", ((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2))::s3).tags, ((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_efficiency_ratio(regex) (stub function, expose data, result) +--Testcase 331: +SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; +ERROR: stub kaufmans_efficiency_ratio(text, int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio(text,integer) line 3 at RAISE +--Testcase 332: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: kaufmans_adaptive_moving_average(((fields ->> 'value1'::text))::double precision, 2), kaufmans_adaptive_moving_average(((fields ->> 'value2'::text))::bigint, 2), kaufmans_adaptive_moving_average(((fields ->> 'value3'::text))::double precision, 2), kaufmans_adaptive_moving_average(((fields ->> 'value4'::text))::bigint, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 333: +SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2) FROM s3; +ERROR: stub kaufmans_adaptive_moving_average(float8, int) is called +CONTEXT: PL/pgSQL function kaufmans_adaptive_moving_average(double precision,integer) line 3 at RAISE +--Testcase 334: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: kaufmans_adaptive_moving_average(((fields ->> 'value1'::text))::double precision, 2, 2), kaufmans_adaptive_moving_average(((fields ->> 'value2'::text))::bigint, 2, 2), kaufmans_adaptive_moving_average(((fields ->> 'value3'::text))::double precision, 2, 2), kaufmans_adaptive_moving_average(((fields ->> 'value4'::text))::bigint, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 335: +SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; +ERROR: stub kaufmans_adaptive_moving_average(float8, int, int) is called +CONTEXT: PL/pgSQL function kaufmans_adaptive_moving_average(double precision,integer,integer) line 3 at RAISE +-- select kaufmans_adaptive_moving_average(*) (stub function, explain) +--Testcase 336: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: kaufmans_adaptive_moving_average_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_adaptive_moving_average(*) (stub function, result) +--Testcase 337: +SELECT kaufmans_adaptive_moving_average_all(2) from s3; +ERROR: stub kaufmans_adaptive_moving_average_all(int) is called +CONTEXT: PL/pgSQL function kaufmans_adaptive_moving_average_all(integer) line 3 at RAISE +-- select kaufmans_adaptive_moving_average(regex) (stub function, explain) +--Testcase 338: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: kaufmans_adaptive_moving_average('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_adaptive_moving_average(regex) (stub agg function, result) +--Testcase 339: +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; +ERROR: stub kaufmans_adaptive_moving_average(text, int) is called +CONTEXT: PL/pgSQL function kaufmans_adaptive_moving_average(text,integer) line 3 at RAISE +-- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 340: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (kaufmans_adaptive_moving_average_all(2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT kaufmans_adaptive_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (result) +--Testcase 341: +SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + kaufmans_adaptive_moving_average_all +---------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.24444444444444446\",\"value2\" : \"100\",\"value3\" : \"-0.24444444444444446\",\"value4\" : \"-100\" }") +(1 row) + +-- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 342: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (kaufmans_adaptive_moving_average('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT kaufmans_adaptive_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 343: +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + kaufmans_adaptive_moving_average +----------------------------------------------------------------------------------------- + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.24444444444444446\",\"value4\" : \"-100\" }") +(1 row) + +--Testcase 344: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average((fields->>'value1')::float, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2),triple_exponential_moving_average((fields->>'value3')::float, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: triple_exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2), triple_exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2), triple_exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2), triple_exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 345: +SELECT triple_exponential_moving_average((fields->>'value1')::float, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2),triple_exponential_moving_average((fields->>'value3')::float, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; +ERROR: stub triple_exponential_moving_average(float8, int) is called +CONTEXT: PL/pgSQL function triple_exponential_moving_average(double precision,integer) line 3 at RAISE +--Testcase 346: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average((fields->>'value1')::float, 2, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2, 2),triple_exponential_moving_average((fields->>'value3')::float, 2, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: triple_exponential_moving_average(((fields ->> 'value1'::text))::double precision, 2, 2), triple_exponential_moving_average(((fields ->> 'value2'::text))::bigint, 2, 2), triple_exponential_moving_average(((fields ->> 'value3'::text))::double precision, 2, 2), triple_exponential_moving_average(((fields ->> 'value4'::text))::bigint, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 347: +SELECT triple_exponential_moving_average((fields->>'value1')::float, 2, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2, 2),triple_exponential_moving_average((fields->>'value3')::float, 2, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; +ERROR: stub triple_exponential_moving_average(float8, int, int) is called +CONTEXT: PL/pgSQL function triple_exponential_moving_average(double precision,integer,integer) line 3 at RAISE +-- select triple_exponential_moving_average(*) (stub function, explain) +--Testcase 348: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: triple_exponential_moving_average_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select triple_exponential_moving_average(*) (stub function, result) +--Testcase 349: +SELECT triple_exponential_moving_average_all(2) from s3; +ERROR: stub triple_exponential_moving_average_all(int) is called +CONTEXT: PL/pgSQL function triple_exponential_moving_average_all(integer) line 3 at RAISE +-- select triple_exponential_moving_average(regex) (stub function, explain) +--Testcase 350: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: triple_exponential_moving_average('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select triple_exponential_moving_average(regex) (stub function, result) +--Testcase 351: +SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; +ERROR: stub triple_exponential_moving_average(text, int) is called +CONTEXT: PL/pgSQL function triple_exponential_moving_average(text,integer) line 3 at RAISE +-- select triple_exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 352: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (triple_exponential_moving_average_all(2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT triple_exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select triple_exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 353: +SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + triple_exponential_moving_average_all +---------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1962962962962963\",\"value2\" : \"100\",\"value3\" : \"-0.1962962962962963\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.30000000000000004\",\"value2\" : \"100\",\"value3\" : \"-0.30000000000000004\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.1592592592592585\",\"value2\" : \"200\",\"value3\" : \"-2.1592592592592585\",\"value4\" : \"-200\" }") +(3 rows) + +-- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (explain) +--Testcase 354: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (triple_exponential_moving_average('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT triple_exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (result) +--Testcase 355: +SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + triple_exponential_moving_average +----------------------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.1962962962962963\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.30000000000000004\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.1592592592592585\",\"value4\" : \"-200\" }") +(3 rows) + +--Testcase 356: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative((fields->>'value1')::float, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2),triple_exponential_derivative((fields->>'value3')::float, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: triple_exponential_derivative(((fields ->> 'value1'::text))::double precision, 2), triple_exponential_derivative(((fields ->> 'value2'::text))::bigint, 2), triple_exponential_derivative(((fields ->> 'value3'::text))::double precision, 2), triple_exponential_derivative(((fields ->> 'value4'::text))::bigint, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 357: +SELECT triple_exponential_derivative((fields->>'value1')::float, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2),triple_exponential_derivative((fields->>'value3')::float, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2) FROM s3; +ERROR: stub triple_exponential_derivative(float8, int) is called +CONTEXT: PL/pgSQL function triple_exponential_derivative(double precision,integer) line 3 at RAISE +--Testcase 358: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative((fields->>'value1')::float, 2, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2, 2),triple_exponential_derivative((fields->>'value3')::float, 2, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: triple_exponential_derivative(((fields ->> 'value1'::text))::double precision, 2, 2), triple_exponential_derivative(((fields ->> 'value2'::text))::bigint, 2, 2), triple_exponential_derivative(((fields ->> 'value3'::text))::double precision, 2, 2), triple_exponential_derivative(((fields ->> 'value4'::text))::bigint, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 359: +SELECT triple_exponential_derivative((fields->>'value1')::float, 2, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2, 2),triple_exponential_derivative((fields->>'value3')::float, 2, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2, 2) FROM s3; +ERROR: stub triple_exponential_derivative(float8, int, int) is called +CONTEXT: PL/pgSQL function triple_exponential_derivative(double precision,integer,integer) line 3 at RAISE +-- select triple_exponential_derivative(*) (stub function, explain) +--Testcase 360: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: triple_exponential_derivative_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select triple_exponential_derivative(*) (stub function, result) +--Testcase 361: +SELECT triple_exponential_derivative_all(2) from s3; +ERROR: stub triple_exponential_derivative_all(int) is called +CONTEXT: PL/pgSQL function triple_exponential_derivative_all(integer) line 3 at RAISE +-- select triple_exponential_derivative(regex) (stub function, explain) +--Testcase 362: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: triple_exponential_derivative('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select triple_exponential_derivative(regex) (stub function, result) +--Testcase 363: +SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; +ERROR: stub triple_exponential_derivative(text, int) is called +CONTEXT: PL/pgSQL function triple_exponential_derivative(text,integer) line 3 at RAISE +-- select triple_exponential_derivative(*) (stub function and group by tag only) (explain) +--Testcase 364: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (triple_exponential_derivative_all(2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT triple_exponential_derivative(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select triple_exponential_derivative(*) (stub function and group by tag only) (result) +--Testcase 365: +SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + triple_exponential_derivative_all +------------------------------------------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:02Z,,"{\"value1\" : \"45.71428571428569\",\"value2\" : \"0\",\"value3\" : \"45.71428571428569\",\"value4\" : \"0\" }") +(1 row) + +-- select triple_exponential_derivative(regex) (stub function and group by tag only) (explain) +--Testcase 366: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (triple_exponential_derivative('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT triple_exponential_derivative(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select triple_exponential_derivative(regex) (stub function and group by tag only) (result) +--Testcase 367: +SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + triple_exponential_derivative +------------------------------------------------------------------------------------ + (1970-01-01T00:00:02Z,,"{\"value1\" : \"45.71428571428569\",\"value4\" : \"0\" }") +(1 row) + +--Testcase 368: +EXPLAIN VERBOSE +SELECT relative_strength_index((fields->>'value1')::float, 2),relative_strength_index((fields->>'value2')::bigint, 2),relative_strength_index((fields->>'value3')::float, 2),relative_strength_index((fields->>'value4')::bigint, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: relative_strength_index(((fields ->> 'value1'::text))::double precision, 2), relative_strength_index(((fields ->> 'value2'::text))::bigint, 2), relative_strength_index(((fields ->> 'value3'::text))::double precision, 2), relative_strength_index(((fields ->> 'value4'::text))::bigint, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 369: +SELECT relative_strength_index((fields->>'value1')::float, 2),relative_strength_index((fields->>'value2')::bigint, 2),relative_strength_index((fields->>'value3')::float, 2),relative_strength_index((fields->>'value4')::bigint, 2) FROM s3; +ERROR: stub relative_strength_index(float8, int) is called +CONTEXT: PL/pgSQL function relative_strength_index(double precision,integer) line 3 at RAISE +--Testcase 370: +EXPLAIN VERBOSE +SELECT relative_strength_index((fields->>'value1')::float, 2, 2),relative_strength_index((fields->>'value2')::bigint, 2, 2),relative_strength_index((fields->>'value3')::float, 2, 2),relative_strength_index((fields->>'value4')::bigint, 2, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: relative_strength_index(((fields ->> 'value1'::text))::double precision, 2, 2), relative_strength_index(((fields ->> 'value2'::text))::bigint, 2, 2), relative_strength_index(((fields ->> 'value3'::text))::double precision, 2, 2), relative_strength_index(((fields ->> 'value4'::text))::bigint, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 371: +SELECT relative_strength_index((fields->>'value1')::float, 2, 2),relative_strength_index((fields->>'value2')::bigint, 2, 2),relative_strength_index((fields->>'value3')::float, 2, 2),relative_strength_index((fields->>'value4')::bigint, 2, 2) FROM s3; +ERROR: stub relative_strength_index(float8, int, int) is called +CONTEXT: PL/pgSQL function relative_strength_index(double precision,integer,integer) line 3 at RAISE +-- select relative_strength_index(*) (stub function, explain) +--Testcase 372: +EXPLAIN VERBOSE +SELECT relative_strength_index_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: relative_strength_index_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select relative_strength_index(*) (stub function, result) +--Testcase 373: +SELECT relative_strength_index_all(2) from s3; +ERROR: stub relative_strength_index_all(int) is called +CONTEXT: PL/pgSQL function relative_strength_index_all(integer) line 3 at RAISE +-- select relative_strength_index(regex) (stub agg function, explain) +--Testcase 374: +EXPLAIN VERBOSE +SELECT relative_strength_index('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: relative_strength_index('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select relative_strength_index(regex) (stub agg function, result) +--Testcase 375: +SELECT relative_strength_index('/value[1,4]/',2) from s3; +ERROR: stub relative_strength_index(text, int) is called +CONTEXT: PL/pgSQL function relative_strength_index(text,integer) line 3 at RAISE +-- select relative_strength_index(*) (stub function and group by tag only) (explain) +--Testcase 376: +EXPLAIN VERBOSE +SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (relative_strength_index_all(2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT relative_strength_index(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select relative_strength_index(*) (stub function and group by tag only) (result) +--Testcase 377: +SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + relative_strength_index_all +-------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value2\" : \"100\",\"value3\" : \"0\",\"value4\" : \"0\" }") +(1 row) + +-- select relative_strength_index(regex) (stub function and group by tag only) (explain) +--Testcase 378: +EXPLAIN VERBOSE +SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (relative_strength_index('/value[1,4]/'::text, 2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT relative_strength_index(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select relative_strength_index(regex) (stub function and group by tag only) (result) +--Testcase 379: +SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + relative_strength_index +---------------------------------------------------------------------- + (1970-01-01T00:00:02Z,,"{\"value1\" : \"100\",\"value4\" : \"0\" }") +(1 row) + +-- select relative_strength_index(*) (stub function, expose data, explain) +--Testcase 380: +EXPLAIN VERBOSE +SELECT (relative_strength_index_all(2)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((relative_strength_index_all(2))::s3)."time", ((relative_strength_index_all(2))::s3).tags, ((relative_strength_index_all(2))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select relative_strength_index(*) (stub function, expose data, result) +--Testcase 381: +SELECT (relative_strength_index_all(2)::s3).* from s3; +ERROR: stub relative_strength_index_all(int) is called +CONTEXT: PL/pgSQL function relative_strength_index_all(integer) line 3 at RAISE +-- select relative_strength_index(regex) (stub function, expose data, explain) +--Testcase 382: +EXPLAIN VERBOSE +SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((relative_strength_index('/value[1,4]/'::text, 2))::s3)."time", ((relative_strength_index('/value[1,4]/'::text, 2))::s3).tags, ((relative_strength_index('/value[1,4]/'::text, 2))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select relative_strength_index(regex) (stub function, expose data, result) +--Testcase 383: +SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; +ERROR: stub relative_strength_index(text, int) is called +CONTEXT: PL/pgSQL function relative_strength_index(text,integer) line 3 at RAISE +-- select integral (stub agg function, explain) +--Testcase 384: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float),integral((fields->>'value2')::bigint),integral((fields->>'value3')::float),integral((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (integral(((fields ->> 'value1'::text))::double precision)), (integral(((fields ->> 'value2'::text))::bigint)), (integral(((fields ->> 'value3'::text))::double precision)), (integral(((fields ->> 'value4'::text))::bigint)) + InfluxDB query: SELECT integral("value1"), integral("value2"), integral("value3"), integral("value4") FROM "s3" +(3 rows) + +-- select integral (stub agg function, result) +--Testcase 385: +SELECT integral((fields->>'value1')::float),integral((fields->>'value2')::bigint),integral((fields->>'value3')::float),integral((fields->>'value4')::bigint) FROM s3; + integral | integral | integral | integral +----------+----------+----------+---------- + 5.5 | 750 | -5.5 | -750 +(1 row) + +--Testcase 386: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float, interval '1s'),integral((fields->>'value2')::bigint, interval '1s'),integral((fields->>'value3')::float, interval '1s'),integral((fields->>'value4')::bigint, interval '1s') FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (integral(((fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval)), (integral(((fields ->> 'value2'::text))::bigint, '@ 1 sec'::interval)), (integral(((fields ->> 'value3'::text))::double precision, '@ 1 sec'::interval)), (integral(((fields ->> 'value4'::text))::bigint, '@ 1 sec'::interval)) + InfluxDB query: SELECT integral("value1", 0d0h0m1s0u), integral("value2", 0d0h0m1s0u), integral("value3", 0d0h0m1s0u), integral("value4", 0d0h0m1s0u) FROM "s3" +(3 rows) + +-- select integral (stub agg function, result) +--Testcase 387: +SELECT integral((fields->>'value1')::float, interval '1s'),integral((fields->>'value2')::bigint, interval '1s'),integral((fields->>'value3')::float, interval '1s'),integral((fields->>'value4')::bigint, interval '1s') FROM s3; + integral | integral | integral | integral +----------+----------+----------+---------- + 5.5 | 750 | -5.5 | -750 +(1 row) + +-- select integral (stub agg function, raise exception if not expected type) +--Testcase 388: +SELECT integral((fields->>'value1')::numeric),integral((fields->>'value2')::numeric),integral((fields->>'value3')::numeric),integral((fields->>'value4')::numeric) FROM s3; +ERROR: stub integral_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE +-- select integral (stub agg function and group by influx_time() and tag) (explain) +--Testcase 389: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (integral(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT integral("value1") FROM "s3" GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select integral (stub agg function and group by influx_time() and tag) (result) +--Testcase 390: +SELECT integral((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + integral | influx_time | tag1 +---------------------+------------------------+------ + 0.15000000000000002 | 1970-01-01 09:00:00+09 | a + 0.25 | 1970-01-01 09:00:01+09 | a + 1.6500000000000001 | 1970-01-01 09:00:03+09 | b + 2.75 | 1970-01-01 09:00:04+09 | b +(4 rows) + +-- select integral (stub agg function and group by influx_time() and tag) (explain) +--Testcase 391: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float, interval '1s'),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (integral(((fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT integral("value1", 0d0h0m1s0u) FROM "s3" GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select integral (stub agg function and group by influx_time() and tag) (result) +--Testcase 392: +SELECT integral((fields->>'value1')::float, interval '1s'),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + integral | influx_time | tag1 +---------------------+------------------------+------ + 0.15000000000000002 | 1970-01-01 09:00:00+09 | a + 0.25 | 1970-01-01 09:00:01+09 | a + 1.6500000000000001 | 1970-01-01 09:00:03+09 | b + 2.75 | 1970-01-01 09:00:04+09 | b +(4 rows) + +-- select integral (stub agg function and group by tag only) (result) +--Testcase 393: +SELECT tags->>'tag1' tag1,integral((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1' ORDER BY 1; + tag1 | integral +------+-------------------- + a | 0.4 + b | 1.6500000000000001 +(2 rows) + +-- select integral (stub agg function and other aggs) (result) +--Testcase 394: +SELECT sum((fields->>'value1')::float),integral((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; + sum | integral | count +-------------------+----------+------- + 7.199999999999999 | 5.5 | 6 +(1 row) + +-- select integral (stub agg function and group by tag only) (result) +--Testcase 395: +SELECT tags->>'tag1' tag1,integral((fields->>'value1')::float, interval '1s') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1' ORDER BY 1; + tag1 | integral +------+-------------------- + a | 0.4 + b | 1.6500000000000001 +(2 rows) + +-- select integral (stub agg function and other aggs) (result) +--Testcase 396: +SELECT sum((fields->>'value1')::float),integral((fields->>'value1')::float, interval '1s'),count((fields->>'value1')::float) FROM s3; + sum | integral | count +-------------------+----------+------- + 7.199999999999999 | 5.5 | 6 +(1 row) + +-- select integral over join query (explain) +--Testcase 397: +EXPLAIN VERBOSE +SELECT integral((t1.fields->>'value1')::float), integral((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------- + Aggregate (cost=39.87..39.88 rows=1 width=16) + Output: integral(((t1.fields ->> 'value1'::text))::double precision), integral(((t2.fields ->> 'value1'::text))::double precision) + -> Nested Loop (cost=20.00..14.63 rows=49 width=64) + Output: t1.fields, t2.fields + -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..7.04 rows=7 width=32) + Output: t2.fields + -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) + Output: t2.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select integral over join query (result, stub call error) +--Testcase 398: +SELECT integral((t1.fields->>'value1')::float), integral((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; +ERROR: stub integral_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE +-- select integral over join query (explain) +--Testcase 399: +EXPLAIN VERBOSE +SELECT integral((t1.fields->>'value1')::float, interval '1s'), integral((t2.fields->>'value1')::float, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Aggregate (cost=39.87..39.88 rows=1 width=16) + Output: integral(((t1.fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval), integral(((t2.fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval) + -> Nested Loop (cost=20.00..14.63 rows=49 width=64) + Output: t1.fields, t2.fields + -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..7.04 rows=7 width=32) + Output: t2.fields + -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) + Output: t2.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select integral over join query (result, stub call error) +--Testcase 400: +SELECT integral((t1.fields->>'value1')::float, interval '1s'), integral((t2.fields->>'value1')::float, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; +ERROR: stub integral_sfunc(double precision, float8, interval) is called +CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision,interval) line 3 at RAISE +-- select integral with having (explain) +--Testcase 401: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float) FROM s3 HAVING integral((fields->>'value1')::float) > 100; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Aggregate (cost=1838.47..1838.48 rows=1 width=8) + Output: integral(((fields ->> 'value1'::text))::double precision) + Filter: (integral(((s3.fields ->> 'value1'::text))::double precision) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "s3" +(6 rows) + +-- select integral with having (explain, not pushdown, stub call error) +--Testcase 402: +SELECT integral((fields->>'value1')::float) FROM s3 HAVING integral((fields->>'value1')::float) > 100; +ERROR: stub integral_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE +-- select integral with having (explain) +--Testcase 403: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float, interval '1s') FROM s3 HAVING integral((fields->>'value1')::float, interval '1s') > 100; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------- + Aggregate (cost=1838.47..1838.48 rows=1 width=8) + Output: integral(((fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval) + Filter: (integral(((s3.fields ->> 'value1'::text))::double precision, '@ 1 sec'::interval) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "s3" +(6 rows) + +-- select integral with having (explain, not pushdown, stub call error) +--Testcase 404: +SELECT integral((fields->>'value1')::float, interval '1s') FROM s3 HAVING integral((fields->>'value1')::float, interval '1s') > 100; +ERROR: stub integral_sfunc(double precision, float8, interval) is called +CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision,interval) line 3 at RAISE +-- select integral(*) (stub agg function, explain) +--Testcase 405: +EXPLAIN VERBOSE +SELECT integral_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (integral_all(*)) + InfluxDB query: SELECT integral(*) FROM "s3" +(3 rows) + +-- select integral(*) (stub agg function, result) +--Testcase 406: +SELECT integral_all(*) from s3; + integral_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"5.5\",\"value2\" : \"750\",\"value3\" : \"-5.5\",\"value4\" : \"-750\" }") +(1 row) + +-- select integral(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 407: +EXPLAIN VERBOSE +SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (integral_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT integral(*) FROM "s3" GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select integral(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 408: +SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + integral_all +---------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.15000000000000002\",\"value2\" : \"100\",\"value3\" : \"-0.15000000000000002\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.25\",\"value2\" : \"100\",\"value3\" : \"-0.25\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.75\",\"value2\" : \"200\",\"value3\" : \"-2.75\",\"value4\" : \"-200\" }") +(4 rows) + +-- select integral(*) (stub agg function and group by tag only) (explain) +--Testcase 409: +EXPLAIN VERBOSE +SELECT integral_all(*) FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (integral_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT integral(*) FROM "s3" WHERE (("value1" > 0.3)) GROUP BY ("tag1") +(3 rows) + +-- select integral(*) (stub agg function and group by tag only) (result) +--Testcase 410: +SELECT integral_all(*) FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; + integral_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"4.4\",\"value2\" : \"400\",\"value3\" : \"-4.4\",\"value4\" : \"-400\" }") +(1 row) + +-- select integral(*) (stub agg function, expose data, explain) +--Testcase 411: +EXPLAIN VERBOSE +SELECT (integral_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((integral_all(*)))::s3)."time", (((integral_all(*)))::s3).tags, (((integral_all(*)))::s3).fields + InfluxDB query: SELECT integral(*) FROM "s3" +(3 rows) + +-- select integral(*) (stub agg function, expose data, result) +--Testcase 412: +SELECT (integral_all(*)::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------------------------------------------ + 1970-01-01 09:00:00+09 | | {"value1": "5.5", "value2": "750", "value3": "-5.5", "value4": "-750"} +(1 row) + +-- select integral(regex) (stub agg function, explain) +--Testcase 413: +EXPLAIN VERBOSE +SELECT integral('/value[1,4]/') from s3; + QUERY PLAN +----------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (integral('/value[1,4]/'::text)) + InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" +(3 rows) + +-- select integral(regex) (stub agg function, result) +--Testcase 414: +SELECT integral('/value[1,4]/') from s3; + integral +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"5.5\",\"value4\" : \"-750\" }") +(1 row) + +-- select integral(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 415: +EXPLAIN VERBOSE +SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (integral('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT integral(/^v.*/) FROM "s3" GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select integral(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 416: +SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + integral +---------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.15000000000000002\",\"value2\" : \"100\",\"value3\" : \"-0.15000000000000002\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.25\",\"value2\" : \"100\",\"value3\" : \"-0.25\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.75\",\"value2\" : \"200\",\"value3\" : \"-2.75\",\"value4\" : \"-200\" }") +(4 rows) + +-- select integral(regex) (stub agg function and group by tag only) (explain) +--Testcase 417: +EXPLAIN VERBOSE +SELECT integral('/value[1,4]/') FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (integral('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" WHERE (("value1" > 0.3)) GROUP BY ("tag1") +(3 rows) + +-- select integral(regex) (stub agg function and group by tag only) (result) +--Testcase 418: +SELECT integral('/value[1,4]/') FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; + integral +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"4.4\",\"value4\" : \"-400\" }") +(1 row) + +-- select integral(regex) (stub agg function, expose data, explain) +--Testcase 419: +EXPLAIN VERBOSE +SELECT (integral('/value[1,4]/')::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((integral('/value[1,4]/'::text)))::s3)."time", (((integral('/value[1,4]/'::text)))::s3).tags, (((integral('/value[1,4]/'::text)))::s3).fields + InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" +(3 rows) + +-- select integral(regex) (stub agg function, expose data, result) +--Testcase 420: +SELECT (integral('/value[1,4]/')::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "5.5", "value4": "-750"} +(1 row) + +-- select mean (stub agg function, explain) +--Testcase 421: +EXPLAIN VERBOSE +SELECT mean((fields->>'value1')::float),mean((fields->>'value2')::bigint),mean((fields->>'value3')::float),mean((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (mean(((fields ->> 'value1'::text))::double precision)), (mean(((fields ->> 'value2'::text))::bigint)), (mean(((fields ->> 'value3'::text))::double precision)), (mean(((fields ->> 'value4'::text))::bigint)) + InfluxDB query: SELECT mean("value1"), mean("value2"), mean("value3"), mean("value4") FROM "s3" +(3 rows) + +-- select mean (stub agg function, result) +--Testcase 422: +SELECT mean((fields->>'value1')::float),mean((fields->>'value2')::bigint),mean((fields->>'value3')::float),mean((fields->>'value4')::bigint) FROM s3; + mean | mean | mean | mean +------+------+------+------ + 1.2 | 150 | -1.2 | -150 +(1 row) + +-- select mean (stub agg function, raise exception if not expected type) +--Testcase 423: +SELECT mean((fields->>'value1')::numeric),mean((fields->>'value2')::numeric),mean((fields->>'value3')::numeric),mean((fields->>'value4')::numeric) FROM s3; +ERROR: stub mean_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE +-- select mean (stub agg function and group by influx_time() and tag) (explain) +--Testcase 424: +EXPLAIN VERBOSE +SELECT mean((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (mean(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT mean("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select mean (stub agg function and group by influx_time() and tag) (result) +--Testcase 425: +SELECT mean((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + mean | influx_time | tag1 +------+------------------------+------ + 0.1 | 1970-01-01 09:00:00+09 | a + 0.2 | 1970-01-01 09:00:01+09 | a + 0.3 | 1970-01-01 09:00:02+09 | a + | 1970-01-01 09:00:03+09 | a + | 1970-01-01 09:00:04+09 | a + | 1970-01-01 09:00:00+09 | b + | 1970-01-01 09:00:01+09 | b + | 1970-01-01 09:00:02+09 | b + 1.1 | 1970-01-01 09:00:03+09 | b + 2.2 | 1970-01-01 09:00:04+09 | b +(10 rows) + +-- select mean (stub agg function and group by tag only) (result) +--Testcase 426: +SELECT tags->>'tag1' tag1,mean((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + tag1 | mean +------+--------------------- + a | 0.20000000000000004 + b | 1.6500000000000001 +(2 rows) + +-- select mean (stub agg function and other aggs) (result) +--Testcase 427: +SELECT sum((fields->>'value1')::float),mean((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; + sum | mean | count +-------------------+------+------- + 7.199999999999999 | 1.2 | 6 +(1 row) + +-- select mean over join query (explain) +--Testcase 428: +EXPLAIN VERBOSE +SELECT mean((t1.fields->>'value1')::float), mean((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------ + Aggregate (cost=39.87..39.88 rows=1 width=16) + Output: mean(((t1.fields ->> 'value1'::text))::double precision), mean(((t2.fields ->> 'value1'::text))::double precision) + -> Nested Loop (cost=20.00..14.63 rows=49 width=64) + Output: t1.fields, t2.fields + -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..7.04 rows=7 width=32) + Output: t2.fields + -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) + Output: t2.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select mean over join query (result, stub call error) +--Testcase 429: +SELECT mean((t1.fields->>'value1')::float), mean((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; +ERROR: stub mean_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE +-- select mean with having (explain) +--Testcase 430: +EXPLAIN VERBOSE +SELECT mean((fields->>'value1')::float) FROM s3 HAVING mean((fields->>'value1')::float) > 100; + QUERY PLAN +------------------------------------------------------------------------------------------------ + Aggregate (cost=1838.47..1838.48 rows=1 width=8) + Output: mean(((fields ->> 'value1'::text))::double precision) + Filter: (mean(((s3.fields ->> 'value1'::text))::double precision) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "s3" +(6 rows) + +-- select mean with having (explain, not pushdown, stub call error) +--Testcase 431: +SELECT mean((fields->>'value1')::float) FROM s3 HAVING mean((fields->>'value1')::float) > 100; +ERROR: stub mean_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE +-- select mean(*) (stub agg function, explain) +--Testcase 432: +EXPLAIN VERBOSE +SELECT mean_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (mean_all(*)) + InfluxDB query: SELECT mean(*) FROM "s3" +(3 rows) + +-- select mean(*) (stub agg function, result) +--Testcase 433: +SELECT mean_all(*) from s3; + mean_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.2\",\"value2\" : \"150\",\"value3\" : \"-1.2\",\"value4\" : \"-150\" }") +(1 row) + +-- select mean(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 434: +EXPLAIN VERBOSE +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (mean_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT mean(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select mean(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 435: +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + mean_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select mean(*) (stub agg function and group by tag only) (explain) +--Testcase 436: +EXPLAIN VERBOSE +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (mean_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT mean(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select mean(*) (stub agg function and group by tag only) (result) +--Testcase 437: +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + mean_all +---------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.20000000000000004\",\"value2\" : \"100\",\"value3\" : \"-0.20000000000000004\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") +(2 rows) + +-- select mean(*) (stub agg function, expose data, explain) +--Testcase 438: +EXPLAIN VERBOSE +SELECT (mean_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((mean_all(*)))::s3)."time", (((mean_all(*)))::s3).tags, (((mean_all(*)))::s3).fields + InfluxDB query: SELECT mean(*) FROM "s3" +(3 rows) + +-- select mean(*) (stub agg function, expose data, result) +--Testcase 439: +SELECT (mean_all(*)::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------------------------------------------ + 1970-01-01 09:00:00+09 | | {"value1": "1.2", "value2": "150", "value3": "-1.2", "value4": "-150"} +(1 row) + +-- select mean(regex) (stub agg function, explain) +--Testcase 440: +EXPLAIN VERBOSE +SELECT mean('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (mean('/value[1,4]/'::text)) + InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" +(3 rows) + +-- select mean(regex) (stub agg function, result) +--Testcase 441: +SELECT mean('/value[1,4]/') from s3; + mean +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.2\",\"value4\" : \"-150\" }") +(1 row) + +-- select mean(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 442: +EXPLAIN VERBOSE +SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (mean('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT mean(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select mean(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 443: +SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + mean +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select mean(regex) (stub agg function and group by tag only) (explain) +--Testcase 444: +EXPLAIN VERBOSE +SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (mean('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select mean(regex) (stub agg function and group by tag only) (result) +--Testcase 445: +SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + mean +----------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.20000000000000004\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.6500000000000001\",\"value4\" : \"-200\" }") +(2 rows) + +-- select mean(regex) (stub agg function, expose data, explain) +--Testcase 446: +EXPLAIN VERBOSE +SELECT (mean('/value[1,4]/')::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((mean('/value[1,4]/'::text)))::s3)."time", (((mean('/value[1,4]/'::text)))::s3).tags, (((mean('/value[1,4]/'::text)))::s3).fields + InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" +(3 rows) + +-- select mean(regex) (stub agg function, expose data, result) +--Testcase 447: +SELECT (mean('/value[1,4]/')::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "1.2", "value4": "-150"} +(1 row) + +-- select median (stub agg function, explain) +--Testcase 448: +EXPLAIN VERBOSE +SELECT median((fields->>'value1')::float),median((fields->>'value2')::bigint),median((fields->>'value3')::float),median((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (median(((fields ->> 'value1'::text))::double precision)), (median(((fields ->> 'value2'::text))::bigint)), (median(((fields ->> 'value3'::text))::double precision)), (median(((fields ->> 'value4'::text))::bigint)) + InfluxDB query: SELECT median("value1"), median("value2"), median("value3"), median("value4") FROM "s3" +(3 rows) + +-- select median (stub agg function, result) +--Testcase 449: +SELECT median((fields->>'value1')::float),median((fields->>'value2')::bigint),median((fields->>'value3')::float),median((fields->>'value4')::bigint) FROM s3; + median | median | median | median +--------+--------+---------------------+-------- + 0.7 | 150 | -0.7000000000000001 | -150 +(1 row) + +-- select median (stub agg function, raise exception if not expected type) +--Testcase 450: +SELECT median((fields->>'value1')::numeric),median((fields->>'value2')::numeric),median((fields->>'value3')::numeric),median((fields->>'value4')::numeric) FROM s3; +ERROR: stub median_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE +-- select median (stub agg function and group by influx_time() and tag) (explain) +--Testcase 451: +EXPLAIN VERBOSE +SELECT median((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (median(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT median("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select median (stub agg function and group by influx_time() and tag) (result) +--Testcase 452: +SELECT median((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + median | influx_time | tag1 +--------+------------------------+------ + 0.1 | 1970-01-01 09:00:00+09 | a + 0.2 | 1970-01-01 09:00:01+09 | a + 0.3 | 1970-01-01 09:00:02+09 | a + | 1970-01-01 09:00:03+09 | a + | 1970-01-01 09:00:04+09 | a + | 1970-01-01 09:00:00+09 | b + | 1970-01-01 09:00:01+09 | b + | 1970-01-01 09:00:02+09 | b + 1.1 | 1970-01-01 09:00:03+09 | b + 2.2 | 1970-01-01 09:00:04+09 | b +(10 rows) + +-- select median (stub agg function and group by tag only) (result) +--Testcase 453: +SELECT tags->>'tag1' tag1,median((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + tag1 | median +------+-------------------- + a | 0.2 + b | 1.6500000000000001 +(2 rows) + +-- select median (stub agg function and other aggs) (result) +--Testcase 454: +SELECT sum((fields->>'value1')::float),median((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; + sum | median | count +-------------------+--------+------- + 7.199999999999999 | 0.7 | 6 +(1 row) + +-- select median over join query (explain) +--Testcase 455: +EXPLAIN VERBOSE +SELECT median((t1.fields->>'value1')::float), median((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------- + Aggregate (cost=39.87..39.88 rows=1 width=16) + Output: median(((t1.fields ->> 'value1'::text))::double precision), median(((t2.fields ->> 'value1'::text))::double precision) + -> Nested Loop (cost=20.00..14.63 rows=49 width=64) + Output: t1.fields, t2.fields + -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..7.04 rows=7 width=32) + Output: t2.fields + -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) + Output: t2.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select median over join query (result, stub call error) +--Testcase 456: +SELECT median((t1.fields->>'value1')::float), median((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; +ERROR: stub median_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE +-- select median with having (explain) +--Testcase 457: +EXPLAIN VERBOSE +SELECT median((fields->>'value1')::float) FROM s3 HAVING median((fields->>'value1')::float) > 100; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Aggregate (cost=1838.47..1838.48 rows=1 width=8) + Output: median(((fields ->> 'value1'::text))::double precision) + Filter: (median(((s3.fields ->> 'value1'::text))::double precision) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "s3" +(6 rows) + +-- select median with having (explain, not pushdown, stub call error) +--Testcase 458: +SELECT median((fields->>'value1')::float) FROM s3 HAVING median((fields->>'value1')::float) > 100; +ERROR: stub median_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE +-- select median(*) (stub agg function, explain) +--Testcase 459: +EXPLAIN VERBOSE +SELECT median_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (median_all(*)) + InfluxDB query: SELECT median(*) FROM "s3" +(3 rows) + +-- select median(*) (stub agg function, result) +--Testcase 460: +SELECT median_all(*) from s3; + median_all +----------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.7\",\"value2\" : \"150\",\"value3\" : \"-0.7000000000000001\",\"value4\" : \"-150\" }") +(1 row) + +-- select median(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 461: +EXPLAIN VERBOSE +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (median_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT median(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select median(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 462: +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + median_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select median(*) (stub agg function and group by tag only) (explain) +--Testcase 463: +EXPLAIN VERBOSE +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (median_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT median(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select median(*) (stub agg function and group by tag only) (result) +--Testcase 464: +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + median_all +-------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.6500000000000001\",\"value2\" : \"200\",\"value3\" : \"-1.6500000000000001\",\"value4\" : \"-200\" }") +(2 rows) + +-- select median(*) (stub agg function, expose data, explain) +--Testcase 465: +EXPLAIN VERBOSE +SELECT (median_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((median_all(*)))::s3)."time", (((median_all(*)))::s3).tags, (((median_all(*)))::s3).fields + InfluxDB query: SELECT median(*) FROM "s3" +(3 rows) + +-- select median(*) (stub agg function, expose data, result) +--Testcase 466: +SELECT (median_all(*)::s3).* from s3; + time | tags | fields +------------------------+------+--------------------------------------------------------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "0.7", "value2": "150", "value3": "-0.7000000000000001", "value4": "-150"} +(1 row) + +-- select median(regex) (stub agg function, explain) +--Testcase 467: +EXPLAIN VERBOSE +SELECT median('/^v.*/') from s3; + QUERY PLAN +--------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (median('/^v.*/'::text)) + InfluxDB query: SELECT median(/^v.*/) FROM "s3" +(3 rows) + +-- select median(regex) (stub agg function, result) +--Testcase 468: +SELECT median('/^v.*/') from s3; + median +----------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.7\",\"value2\" : \"150\",\"value3\" : \"-0.7000000000000001\",\"value4\" : \"-150\" }") +(1 row) + +-- select median(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 469: +EXPLAIN VERBOSE +SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (median('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT median(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select median(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 470: +SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + median +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select median(regex) (stub agg function and group by tag only) (explain) +--Testcase 471: +EXPLAIN VERBOSE +SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (median('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT median(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select median(regex) (stub agg function and group by tag only) (result) +--Testcase 472: +SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + median +---------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.6500000000000001\",\"value4\" : \"-200\" }") +(2 rows) + +-- select median(regex) (stub agg function, expose data, explain) +--Testcase 473: +EXPLAIN VERBOSE +SELECT (median('/value[1,4]/')::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((median('/value[1,4]/'::text)))::s3)."time", (((median('/value[1,4]/'::text)))::s3).tags, (((median('/value[1,4]/'::text)))::s3).fields + InfluxDB query: SELECT median(/value[1,4]/) FROM "s3" +(3 rows) + +-- select median(regex) (stub agg function, expose data, result) +--Testcase 474: +SELECT (median('/value[1,4]/')::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "0.7", "value4": "-150"} +(1 row) + +-- select influx_mode (stub agg function, explain) +--Testcase 475: +EXPLAIN VERBOSE +SELECT influx_mode((fields->>'value1')::float),influx_mode((fields->>'value2')::bigint),influx_mode((fields->>'value3')::float),influx_mode((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_mode(((fields ->> 'value1'::text))::double precision)), (influx_mode(((fields ->> 'value2'::text))::bigint)), (influx_mode(((fields ->> 'value3'::text))::double precision)), (influx_mode(((fields ->> 'value4'::text))::bigint)) + InfluxDB query: SELECT mode("value1"), mode("value2"), mode("value3"), mode("value4") FROM "s3" +(3 rows) + +-- select influx_mode (stub agg function, result) +--Testcase 476: +SELECT influx_mode((fields->>'value1')::float),influx_mode((fields->>'value2')::bigint),influx_mode((fields->>'value3')::float),influx_mode((fields->>'value4')::bigint) FROM s3; + influx_mode | influx_mode | influx_mode | influx_mode +-------------+-------------+-------------+------------- + 0.1 | 100 | -3.3 | -100 +(1 row) + +-- select influx_mode (stub agg function, raise exception if not expected type) +--Testcase 477: +SELECT influx_mode((fields->>'value1')::numeric),influx_mode((fields->>'value2')::numeric),influx_mode((fields->>'value3')::numeric),influx_mode((fields->>'value4')::numeric) FROM s3; + influx_mode | influx_mode | influx_mode | influx_mode +-------------+-------------+-------------+------------- + 0.1 | 100 | -3.3 | -100 +(1 row) + +-- select influx_mode (stub agg function and group by influx_time() and tag) (explain) +--Testcase 478: +EXPLAIN VERBOSE +SELECT influx_mode((fields->>'value1')::numeric),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_mode(((fields ->> 'value1'::text))::numeric)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT mode("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select influx_mode (stub agg function and group by influx_time() and tag) (result) +--Testcase 479: +SELECT influx_mode((fields->>'value1')::numeric),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_mode | influx_time | tag1 +-------------+------------------------+------ + 0.1 | 1970-01-01 09:00:00+09 | a + 0.2 | 1970-01-01 09:00:01+09 | a + 0.3 | 1970-01-01 09:00:02+09 | a + | 1970-01-01 09:00:03+09 | a + | 1970-01-01 09:00:04+09 | a + | 1970-01-01 09:00:00+09 | b + | 1970-01-01 09:00:01+09 | b + | 1970-01-01 09:00:02+09 | b + 1.1 | 1970-01-01 09:00:03+09 | b + 2.2 | 1970-01-01 09:00:04+09 | b +(10 rows) + +-- select influx_mode (stub agg function and group by tag only) (result) +--Testcase 480: +SELECT tags->>'tag1' tag1,influx_mode((fields->>'value1')::numeric) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + tag1 | influx_mode +------+------------- + a | 0.1 + b | 1.1 +(2 rows) + +-- select influx_mode (stub agg function and other aggs) (result) +--Testcase 481: +SELECT sum((fields->>'value1')::float),influx_mode((fields->>'value1')::numeric),count((fields->>'value1')::float) FROM s3; + sum | influx_mode | count +-------------------+-------------+------- + 7.199999999999999 | 0.1 | 6 +(1 row) + +-- select influx_mode over join query (explain) +--Testcase 482: +EXPLAIN VERBOSE +SELECT influx_mode((t1.fields->>'value1')::float), influx_mode((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Aggregate (cost=39.87..39.88 rows=1 width=16) + Output: influx_mode(((t1.fields ->> 'value1'::text))::double precision), influx_mode(((t2.fields ->> 'value1'::text))::double precision) + -> Nested Loop (cost=20.00..14.63 rows=49 width=64) + Output: t1.fields, t2.fields + -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..7.04 rows=7 width=32) + Output: t2.fields + -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) + Output: t2.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select influx_mode over join query (result, stub call error) +--Testcase 483: +SELECT influx_mode((t1.fields->>'value1')::float), influx_mode((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; +ERROR: stub influx_mode_sfunc(anyelement, anyelement) is called +CONTEXT: PL/pgSQL function influx_mode_sfunc(anyelement,anyelement) line 3 at RAISE +-- select influx_mode with having (explain) +--Testcase 484: +EXPLAIN VERBOSE +SELECT influx_mode((fields->>'value1')::float) FROM s3 HAVING influx_mode((fields->>'value1')::float) > 100; + QUERY PLAN +------------------------------------------------------------------------------------------------------- + Aggregate (cost=1838.47..1838.48 rows=1 width=8) + Output: influx_mode(((fields ->> 'value1'::text))::double precision) + Filter: (influx_mode(((s3.fields ->> 'value1'::text))::double precision) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "s3" +(6 rows) + +-- select influx_mode with having (explain, not pushdown, stub call error) +--Testcase 485: +SELECT influx_mode((fields->>'value1')::float) FROM s3 HAVING influx_mode((fields->>'value1')::float) > 100; +ERROR: stub influx_mode_sfunc(anyelement, anyelement) is called +CONTEXT: PL/pgSQL function influx_mode_sfunc(anyelement,anyelement) line 3 at RAISE +-- select influx_mode(*) (stub agg function, explain) +--Testcase 486: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_mode_all(*)) + InfluxDB query: SELECT mode(*) FROM "s3" +(3 rows) + +-- select influx_mode(*) (stub agg function, result) +--Testcase 487: +SELECT influx_mode_all(*) from s3; + influx_mode_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-3.3\",\"value4\" : \"-100\" }") +(1 row) + +-- select influx_mode(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 488: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_mode_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT mode(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select influx_mode(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 489: +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_mode_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select influx_mode(*) (stub agg function and group by tag only) (explain) +--Testcase 490: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_mode_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT mode(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select influx_mode(*) (stub agg function and group by tag only) (result) +--Testcase 491: +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + influx_mode_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(2 rows) + +-- select influx_mode(*) (stub agg function, expose data, explain) +--Testcase 492: +EXPLAIN VERBOSE +SELECT (influx_mode_all(*)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_mode_all(*)))::s3)."time", (((influx_mode_all(*)))::s3).tags, (((influx_mode_all(*)))::s3).fields + InfluxDB query: SELECT mode(*) FROM "s3" +(3 rows) + +-- select influx_mode(*) (stub agg function, expose data, result) +--Testcase 493: +SELECT (influx_mode_all(*)::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------------------------------------------ + 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value2": "100", "value3": "-3.3", "value4": "-100"} +(1 row) + +-- select influx_mode(regex) (stub function, explain) +--Testcase 494: +EXPLAIN VERBOSE +SELECT influx_mode('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_mode('/value[1,4]/'::text)) + InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_mode(regex) (stub function, result) +--Testcase 495: +SELECT influx_mode('/value[1,4]/') from s3; + influx_mode +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") +(1 row) + +-- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 496: +EXPLAIN VERBOSE +SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_mode('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT mode(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 497: +SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_mode +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select influx_mode(regex) (stub agg function and group by tag only) (explain) +--Testcase 498: +EXPLAIN VERBOSE +SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_mode('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select influx_mode(regex) (stub agg function and group by tag only) (result) +--Testcase 499: +SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + influx_mode +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") +(2 rows) + +-- select influx_mode(regex) (stub agg function, expose data, explain) +--Testcase 500: +EXPLAIN VERBOSE +SELECT (influx_mode('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_mode('/value[1,4]/'::text)))::s3)."time", (((influx_mode('/value[1,4]/'::text)))::s3).tags, (((influx_mode('/value[1,4]/'::text)))::s3).fields + InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_mode(regex) (stub agg function, expose data, result) +--Testcase 501: +SELECT (influx_mode('/value[1,4]/')::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value4": "-100"} +(1 row) + +-- select stddev (agg function, explain) +--Testcase 502: +EXPLAIN VERBOSE +SELECT stddev((fields->>'value1')::float),stddev((fields->>'value2')::bigint),stddev((fields->>'value3')::float),stddev((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=80) + Output: (stddev(((fields ->> 'value1'::text))::double precision)), (stddev(((fields ->> 'value2'::text))::bigint)), (stddev(((fields ->> 'value3'::text))::double precision)), (stddev(((fields ->> 'value4'::text))::bigint)) + InfluxDB query: SELECT stddev("value1"), stddev("value2"), stddev("value3"), stddev("value4") FROM "s3" +(3 rows) + +-- select stddev (agg function, result) +--Testcase 503: +SELECT stddev((fields->>'value1')::float),stddev((fields->>'value2')::bigint),stddev((fields->>'value3')::float),stddev((fields->>'value4')::bigint) FROM s3; + stddev | stddev | stddev | stddev +-------------------+--------------------+-------------------+-------------------- + 1.299230541512937 | 54.772255750516614 | 1.299230541512937 | 54.772255750516614 +(1 row) + +-- select stddev (agg function and group by influx_time() and tag) (explain) +--Testcase 504: +EXPLAIN VERBOSE +SELECT stddev((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (stddev(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT stddev("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select stddev (agg function and group by influx_time() and tag) (result) +--Testcase 505: +SELECT stddev((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + stddev | influx_time | tag1 +--------+------------------------+------ + | 1970-01-01 09:00:00+09 | a + | 1970-01-01 09:00:01+09 | a + | 1970-01-01 09:00:02+09 | a + | 1970-01-01 09:00:03+09 | a + | 1970-01-01 09:00:04+09 | a + | 1970-01-01 09:00:00+09 | b + | 1970-01-01 09:00:01+09 | b + | 1970-01-01 09:00:02+09 | b + | 1970-01-01 09:00:03+09 | b + | 1970-01-01 09:00:04+09 | b +(10 rows) + +-- select stddev (agg function and group by tag only) (result) +--Testcase 506: +SELECT tags->>'tag1' tag1,stddev((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + tag1 | stddev +------+--------------------- + a | 0.09999999999999999 + b | 0.7778174593052023 +(2 rows) + +-- select stddev (agg function and other aggs) (result) +--Testcase 507: +SELECT sum((fields->>'value1')::float),stddev((fields->>'value1')::float),count(fields->>'value1') FROM s3; + sum | stddev | count +-------------------+-------------------+------- + 7.199999999999999 | 1.299230541512937 | 6 +(1 row) + +-- select stddev(*) (stub agg function, explain) +--Testcase 508: +EXPLAIN VERBOSE +SELECT stddev_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (stddev_all(*)) + InfluxDB query: SELECT stddev(*) FROM "s3" +(3 rows) + +-- select stddev(*) (stub agg function, result) +--Testcase 509: +SELECT stddev_all(*) from s3; + stddev_all +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.299230541512937\",\"value2\" : \"54.772255750516614\",\"value3\" : \"1.299230541512937\",\"value4\" : \"54.772255750516614\" }") +(1 row) + +-- select stddev(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 510: +EXPLAIN VERBOSE +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (stddev_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT stddev(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select stddev(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 511: +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + stddev_all +------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") +(10 rows) + +-- select stddev(*) (stub agg function and group by tag only) (explain) +--Testcase 512: +EXPLAIN VERBOSE +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (stddev_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT stddev(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select stddev(*) (stub agg function and group by tag only) (result) +--Testcase 513: +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + stddev_all +---------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.09999999999999999\",\"value2\" : \"0\",\"value3\" : \"0.09999999999999999\",\"value4\" : \"0\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.7778174593052023\",\"value2\" : \"0\",\"value3\" : \"0.7778174593052023\",\"value4\" : \"0\" }") +(2 rows) + +-- select stddev(regex) (stub function, explain) +--Testcase 514: +EXPLAIN VERBOSE +SELECT stddev('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (stddev('/value[1,4]/'::text)) + InfluxDB query: SELECT stddev(/value[1,4]/) FROM "s3" +(3 rows) + +-- select stddev(regex) (stub function, result) +--Testcase 515: +SELECT stddev('/value[1,4]/') from s3; + stddev +----------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.299230541512937\",\"value4\" : \"54.772255750516614\" }") +(1 row) + +-- select stddev(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 516: +EXPLAIN VERBOSE +SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (stddev('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT stddev(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select stddev(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 517: +SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + stddev +------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") +(10 rows) + +-- select stddev(regex) (stub agg function and group by tag only) (explain) +--Testcase 518: +EXPLAIN VERBOSE +SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (stddev('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT stddev(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select stddev(regex) (stub agg function and group by tag only) (result) +--Testcase 519: +SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + stddev +-------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.09999999999999999\",\"value4\" : \"0\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.7778174593052023\",\"value4\" : \"0\" }") +(2 rows) + +-- select influx_sum(*) (stub agg function, explain) +--Testcase 520: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_sum_all(*)) + InfluxDB query: SELECT sum(*) FROM "s3" +(3 rows) + +-- select influx_sum(*) (stub agg function, result) +--Testcase 521: +SELECT influx_sum_all(*) from s3; + influx_sum_all +------------------------------------------------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,"{\"value1\" : \"7.199999999999999\",\"value2\" : \"900\",\"value3\" : \"-7.199999999999999\",\"value4\" : \"-900\" }") +(1 row) + +-- select influx_sum(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 522: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_sum_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select influx_sum(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 523: +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_sum_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select influx_sum(*) (stub agg function and group by tag only) (explain) +--Testcase 524: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_sum_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select influx_sum(*) (stub agg function and group by tag only) (result) +--Testcase 525: +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + influx_sum_all +-------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.6000000000000001\",\"value2\" : \"300\",\"value3\" : \"-0.6000000000000001\",\"value4\" : \"-300\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3000000000000003\",\"value2\" : \"400\",\"value3\" : \"-3.3000000000000003\",\"value4\" : \"-400\" }") +(2 rows) + +-- select influx_sum(*) (stub agg function, expose data, explain) +--Testcase 526: +EXPLAIN VERBOSE +SELECT (influx_sum_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_sum_all(*)))::s3)."time", (((influx_sum_all(*)))::s3).tags, (((influx_sum_all(*)))::s3).fields + InfluxDB query: SELECT sum(*) FROM "s3" +(3 rows) + +-- select influx_sum(*) (stub agg function, expose data, result) +--Testcase 527: +SELECT (influx_sum_all(*)::s3).* from s3; + time | tags | fields +------------------------+------+---------------------------------------------------------------------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "7.199999999999999", "value2": "900", "value3": "-7.199999999999999", "value4": "-900"} +(1 row) + +-- select influx_sum(regex) (stub function, explain) +--Testcase 528: +EXPLAIN VERBOSE +SELECT influx_sum('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_sum('/value[1,4]/'::text)) + InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_sum(regex) (stub function, result) +--Testcase 529: +SELECT influx_sum('/value[1,4]/') from s3; + influx_sum +--------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"7.199999999999999\",\"value4\" : \"-900\" }") +(1 row) + +-- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 530: +EXPLAIN VERBOSE +SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_sum('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 531: +SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_sum +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select influx_sum(regex) (stub agg function and group by tag only) (explain) +--Testcase 532: +EXPLAIN VERBOSE +SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_sum('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select influx_sum(regex) (stub agg function and group by tag only) (result) +--Testcase 533: +SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + influx_sum +---------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.6000000000000001\",\"value4\" : \"-300\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3000000000000003\",\"value4\" : \"-400\" }") +(2 rows) + +-- select influx_sum(regex) (stub agg function, expose data, explain) +--Testcase 534: +EXPLAIN VERBOSE +SELECT (influx_sum('/value[1,4]/')::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_sum('/value[1,4]/'::text)))::s3)."time", (((influx_sum('/value[1,4]/'::text)))::s3).tags, (((influx_sum('/value[1,4]/'::text)))::s3).fields + InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_sum(regex) (stub agg function, expose data, result) +--Testcase 535: +SELECT (influx_sum('/value[1,4]/')::s3).* from s3; + time | tags | fields +------------------------+------+--------------------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "7.199999999999999", "value4": "-900"} +(1 row) + +-- selector function bottom() (explain) +--Testcase 536: +EXPLAIN VERBOSE +SELECT bottom((fields->>'value1')::float, 1) FROM s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1838.47 rows=1462 width=8) + Output: bottom(((fields ->> 'value1'::text))::double precision, 1) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- selector function bottom() (result) +--Testcase 537: +SELECT bottom((fields->>'value1')::float, 1) FROM s3; +ERROR: stub bottom(float8, int) is called +CONTEXT: PL/pgSQL function bottom(double precision,integer) line 3 at RAISE +-- selector function bottom() cannot be combined with other functions(explain) +--Testcase 538: +EXPLAIN VERBOSE +SELECT bottom((fields->>'value1')::float, 1), bottom((fields->>'value2')::bigint, 1), bottom((fields->>'value3')::float, 1), bottom((fields->>'value4')::bigint, 1) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: bottom(((fields ->> 'value1'::text))::double precision, 1), bottom(((fields ->> 'value2'::text))::bigint, 1), bottom(((fields ->> 'value3'::text))::double precision, 1), bottom(((fields ->> 'value4'::text))::bigint, 1) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- selector function bottom() cannot be combined with other functions(result) +--Testcase 539: +SELECT bottom((fields->>'value1')::float, 1), bottom((fields->>'value2')::bigint, 1), bottom((fields->>'value3')::float, 1), bottom((fields->>'value4')::bigint, 1) FROM s3; +ERROR: stub bottom(float8, int) is called +CONTEXT: PL/pgSQL function bottom(double precision,integer) line 3 at RAISE +-- select influx_max(*) (stub agg function, explain) +--Testcase 540: +EXPLAIN VERBOSE +SELECT influx_max_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_max_all(*)) + InfluxDB query: SELECT max(*) FROM "s3" +(3 rows) + +-- select influx_max(*) (stub agg function, result) +--Testcase 541: +SELECT influx_max_all(*) from s3; + influx_max_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3\",\"value2\" : \"200\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") +(1 row) + +-- select influx_max(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 542: +EXPLAIN VERBOSE +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_max_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT max(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select influx_max(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 543: +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_max_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select influx_max(*) (stub agg function and group by tag only) (explain) +--Testcase 544: +EXPLAIN VERBOSE +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_max_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT max(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select influx_max(*) (stub agg function and group by tag only) (result) +--Testcase 545: +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + influx_max_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") +(2 rows) + +-- select influx_max(*) (stub agg function, expose data, explain) +--Testcase 546: +EXPLAIN VERBOSE +SELECT (influx_max_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_max_all(*)))::s3)."time", (((influx_max_all(*)))::s3).tags, (((influx_max_all(*)))::s3).fields + InfluxDB query: SELECT max(*) FROM "s3" +(3 rows) + +-- select influx_max(*) (stub agg function, expose data, result) +--Testcase 547: +SELECT (influx_max_all(*)::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------------------------------------------ + 1970-01-01 09:00:00+09 | | {"value1": "3.3", "value2": "200", "value3": "-0.1", "value4": "-100"} +(1 row) + +-- select influx_max(regex) (stub function, explain) +--Testcase 548: +EXPLAIN VERBOSE +SELECT influx_max('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_max('/value[1,4]/'::text)) + InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_max(regex) (stub function, result) +--Testcase 549: +SELECT influx_max('/value[1,4]/') from s3; + influx_max +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"3.3\",\"value4\" : \"-100\" }") +(1 row) + +-- select influx_max(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 550: +EXPLAIN VERBOSE +SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_max('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT max(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select influx_max(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 551: +SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_max +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select influx_max(regex) (stub agg function and group by tag only) (explain) +--Testcase 552: +EXPLAIN VERBOSE +SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_max('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select influx_max(regex) (stub agg function and group by tag only) (result) +--Testcase 553: +SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + influx_max +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"2.2\",\"value4\" : \"-200\" }") +(2 rows) + +-- select influx_max(regex) (stub agg function, expose data, explain) +--Testcase 554: +EXPLAIN VERBOSE +SELECT (influx_max('/value[1,4]/')::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_max('/value[1,4]/'::text)))::s3)."time", (((influx_max('/value[1,4]/'::text)))::s3).tags, (((influx_max('/value[1,4]/'::text)))::s3).fields + InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_max(regex) (stub agg function, expose data, result) +--Testcase 555: +SELECT (influx_max('/value[1,4]/')::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "3.3", "value4": "-100"} +(1 row) + +-- select influx_min(*) (stub agg function, explain) +--Testcase 556: +EXPLAIN VERBOSE +SELECT influx_min_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_min_all(*)) + InfluxDB query: SELECT min(*) FROM "s3" +(3 rows) + +-- select influx_min(*) (stub agg function, result) +--Testcase 557: +SELECT influx_min_all(*) from s3; + influx_min_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-3.3\",\"value4\" : \"-200\" }") +(1 row) + +-- select influx_min(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 558: +EXPLAIN VERBOSE +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_min_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT min(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select influx_min(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 559: +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_min_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select influx_min(*) (stub agg function and group by tag only) (explain) +--Testcase 560: +EXPLAIN VERBOSE +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_min_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT min(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select influx_min(*) (stub agg function and group by tag only) (result) +--Testcase 561: +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + influx_min_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(2 rows) + +-- select influx_min(*) (stub agg function, expose data, explain) +--Testcase 562: +EXPLAIN VERBOSE +SELECT (influx_min_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_min_all(*)))::s3)."time", (((influx_min_all(*)))::s3).tags, (((influx_min_all(*)))::s3).fields + InfluxDB query: SELECT min(*) FROM "s3" +(3 rows) + +-- select influx_min(*) (stub agg function, expose data, result) +--Testcase 563: +SELECT (influx_min_all(*)::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------------------------------------------ + 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value2": "100", "value3": "-3.3", "value4": "-200"} +(1 row) + +-- select influx_min(regex) (stub function, explain) +--Testcase 564: +EXPLAIN VERBOSE +SELECT influx_min('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_min('/value[1,4]/'::text)) + InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_min(regex) (stub function, result) +--Testcase 565: +SELECT influx_min('/value[1,4]/') from s3; + influx_min +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-200\" }") +(1 row) + +-- select influx_min(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 566: +EXPLAIN VERBOSE +SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_min('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT min(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select influx_min(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 567: +SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_min +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select influx_min(regex) (stub agg function and group by tag only) (explain) +--Testcase 568: +EXPLAIN VERBOSE +SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_min('/value[1,4]/'::text)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select influx_min(regex) (stub agg function and group by tag only) (result) +--Testcase 569: +SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + influx_min +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") +(2 rows) + +-- select influx_min(regex) (stub agg function, expose data, explain) +--Testcase 570: +EXPLAIN VERBOSE +SELECT (influx_min('/value[1,4]/')::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_min('/value[1,4]/'::text)))::s3)."time", (((influx_min('/value[1,4]/'::text)))::s3).tags, (((influx_min('/value[1,4]/'::text)))::s3).fields + InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_min(regex) (stub agg function, expose data, result) +--Testcase 571: +SELECT (influx_min('/value[1,4]/')::s3).* from s3; + time | tags | fields +------------------------+------+------------------------------------- + 1970-01-01 09:00:00+09 | | {"value1": "0.1", "value4": "-200"} +(1 row) + +-- selector function percentile() (explain) +--Testcase 572: +EXPLAIN VERBOSE +SELECT percentile((fields->>'value1')::float, 50), percentile((fields->>'value2')::bigint, 60), percentile((fields->>'value3')::float, 25), percentile((fields->>'value4')::bigint, 33) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: percentile(((fields ->> 'value1'::text))::double precision, 50), percentile(((fields ->> 'value2'::text))::bigint, 60), percentile(((fields ->> 'value3'::text))::double precision, 25), percentile(((fields ->> 'value4'::text))::bigint, 33) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- selector function percentile() (result) +--Testcase 573: +SELECT percentile((fields->>'value1')::float, 50), percentile((fields->>'value2')::bigint, 60), percentile((fields->>'value3')::float, 25), percentile((fields->>'value4')::bigint, 33) FROM s3; +ERROR: stub percentile(float8, int) is called +CONTEXT: PL/pgSQL function percentile(double precision,integer) line 3 at RAISE +-- selector function percentile() (explain) +--Testcase 574: +EXPLAIN VERBOSE +SELECT percentile((fields->>'value1')::float, 1.5), percentile((fields->>'value2')::bigint, 6.7), percentile((fields->>'value3')::float, 20.5), percentile((fields->>'value4')::bigint, 75.2) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: percentile(((fields ->> 'value1'::text))::double precision, '1.5'::double precision), percentile(((fields ->> 'value2'::text))::bigint, '6.7'::double precision), percentile(((fields ->> 'value3'::text))::double precision, '20.5'::double precision), percentile(((fields ->> 'value4'::text))::bigint, '75.2'::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- selector function percentile() (result) +--Testcase 575: +SELECT percentile((fields->>'value1')::float, 1.5), percentile((fields->>'value2')::bigint, 6.7), percentile((fields->>'value3')::float, 20.5), percentile((fields->>'value4')::bigint, 75.2) FROM s3; +ERROR: stub percentile(float8, float8) is called +CONTEXT: PL/pgSQL function percentile(double precision,double precision) line 3 at RAISE +-- select percentile(*, int) (stub agg function, explain) +--Testcase 576: +EXPLAIN VERBOSE +SELECT percentile_all(50) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: percentile_all(50) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(*, int) (stub agg function, result) +--Testcase 577: +SELECT percentile_all(50) from s3; +ERROR: stub percentile_all(int) is called +CONTEXT: PL/pgSQL function percentile_all(integer) line 3 at RAISE +-- select percentile(*, float8) (stub agg function, explain) +--Testcase 578: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: percentile_all('70.5'::double precision) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(*, float8) (stub agg function, result) +--Testcase 579: +SELECT percentile_all(70.5) from s3; +ERROR: stub percentile_all(float8) is called +CONTEXT: PL/pgSQL function percentile_all(double precision) line 3 at RAISE +-- select percentile(*, int) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 580: +EXPLAIN VERBOSE +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (percentile_all(50)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT percentile(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select percentile(*, int) (stub agg function and group by influx_time() and tag) (result) +--Testcase 581: +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + percentile_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 582: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (percentile_all('70.5'::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (result) +--Testcase 583: +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + percentile_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select percentile(*, int) (stub agg function and group by tag only) (explain) +--Testcase 584: +EXPLAIN VERBOSE +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (percentile_all(50)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT percentile(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select percentile(*, int) (stub agg function and group by tag only) (result) +--Testcase 585: +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + percentile_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(2 rows) + +-- select percentile(*, float8) (stub agg function and group by tag only) (explain) +--Testcase 586: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (percentile_all('70.5'::double precision)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select percentile(*, float8) (stub agg function and group by tag only) (result) +--Testcase 587: +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + percentile_all +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(2 rows) + +-- select percentile(*, int) (stub agg function, expose data, explain) +--Testcase 588: +EXPLAIN VERBOSE +SELECT (percentile_all(50)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((percentile_all(50))::s3)."time", ((percentile_all(50))::s3).tags, ((percentile_all(50))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(*, int) (stub agg function, expose data, result) +--Testcase 589: +SELECT (percentile_all(50)::s3).* from s3; +ERROR: stub percentile_all(int) is called +CONTEXT: PL/pgSQL function percentile_all(integer) line 3 at RAISE +-- select percentile(*, int) (stub agg function, expose data, explain) +--Testcase 590: +EXPLAIN VERBOSE +SELECT (percentile_all(70.5)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((percentile_all('70.5'::double precision))::s3)."time", ((percentile_all('70.5'::double precision))::s3).tags, ((percentile_all('70.5'::double precision))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(*, int) (stub agg function, expose data, result) +--Testcase 591: +SELECT (percentile_all(70.5)::s3).* from s3; +ERROR: stub percentile_all(float8) is called +CONTEXT: PL/pgSQL function percentile_all(double precision) line 3 at RAISE +-- select percentile(regex) (stub function, explain) +--Testcase 592: +EXPLAIN VERBOSE +SELECT percentile('/value[1,4]/', 50) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: percentile('/value[1,4]/'::text, 50) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(regex) (stub function, result) +--Testcase 593: +SELECT percentile('/value[1,4]/', 50) from s3; +ERROR: stub percentile(text, int) is called +CONTEXT: PL/pgSQL function percentile(text,integer) line 3 at RAISE +-- select percentile(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 594: +EXPLAIN VERBOSE +SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (percentile('/^v.*/'::text, 50)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT percentile(/^v.*/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select percentile(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 595: +SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + percentile +-------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1\",\"value2\" : \"100\",\"value3\" : \"-0.1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2\",\"value2\" : \"100\",\"value3\" : \"-0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3\",\"value2\" : \"100\",\"value3\" : \"-0.3\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:00Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.1\",\"value2\" : \"200\",\"value3\" : \"-1.1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2.2\",\"value2\" : \"200\",\"value3\" : \"-2.2\",\"value4\" : \"-200\" }") +(10 rows) + +-- select percentile(regex) (stub agg function and group by tag only) (explain) +--Testcase 596: +EXPLAIN VERBOSE +SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (percentile('/value[1,4]/'::text, '70.5'::double precision)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT percentile(/value[1,4]/, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select percentile(regex) (stub agg function and group by tag only) (result) +--Testcase 597: +SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + percentile +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.2\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1\",\"value4\" : \"-200\" }") +(2 rows) + +-- select percentile(regex) (stub agg function, expose data, explain) +--Testcase 598: +EXPLAIN VERBOSE +SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((percentile('/value[1,4]/'::text, 50))::s3)."time", ((percentile('/value[1,4]/'::text, 50))::s3).tags, ((percentile('/value[1,4]/'::text, 50))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(regex) (stub agg function, expose data, result) +--Testcase 599: +SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; +ERROR: stub percentile(text, int) is called +CONTEXT: PL/pgSQL function percentile(text,integer) line 3 at RAISE +-- select percentile(regex) (stub agg function, expose data, explain) +--Testcase 600: +EXPLAIN VERBOSE +SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((percentile('/value[1,4]/'::text, '70.5'::double precision))::s3)."time", ((percentile('/value[1,4]/'::text, '70.5'::double precision))::s3).tags, ((percentile('/value[1,4]/'::text, '70.5'::double precision))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(regex) (stub agg function, expose data, result) +--Testcase 601: +SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; +ERROR: stub percentile(text, float8) is called +CONTEXT: PL/pgSQL function percentile(text,double precision) line 3 at RAISE +-- selector function top(field_key,N) (explain) +--Testcase 602: +EXPLAIN VERBOSE +SELECT top((fields->>'value1')::float, 1) FROM s3; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1838.47 rows=1462 width=8) + Output: top(((fields ->> 'value1'::text))::double precision, 1) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- selector function top(field_key,N) (result) +--Testcase 603: +SELECT top((fields->>'value1')::float, 1) FROM s3; +ERROR: stub top(float8, int) is called +CONTEXT: PL/pgSQL function top(double precision,integer) line 3 at RAISE +-- selector function top(field_key,tag_key(s),N) (explain) +--Testcase 604: +EXPLAIN VERBOSE +SELECT top((fields->>'value1')::float, tags->>'tag1', 1) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1171.80 rows=930 width=8) + Output: top(((fields ->> 'value1'::text))::double precision, (tags ->> 'tag1'::text), 1) + InfluxDB query: SELECT "value1", "tag1" FROM "s3" +(3 rows) + +-- selector function top(field_key,tag_key(s),N) (result) +--Testcase 605: +SELECT top((fields->>'value1')::float, tags->>'tag1', 1) FROM s3; +ERROR: stub top(float8, text, int) is called +CONTEXT: PL/pgSQL function top(double precision,text,integer) line 3 at RAISE +-- selector function top() cannot be combined with other functions(explain) +--Testcase 606: +EXPLAIN VERBOSE +SELECT top((fields->>'value1')::float, 1), top((fields->>'value2')::bigint, 1), top((fields->>'value3')::float, 1), top((fields->>'value4')::bigint, 1) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2967.86 rows=1462 width=32) + Output: top(((fields ->> 'value1'::text))::double precision, 1), top(((fields ->> 'value2'::text))::bigint, 1), top(((fields ->> 'value3'::text))::double precision, 1), top(((fields ->> 'value4'::text))::bigint, 1) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- selector function top() cannot be combined with other functions(result) +--Testcase 607: +SELECT top((fields->>'value1')::float, 1), top((fields->>'value2')::bigint, 1), top((fields->>'value3')::float, 1), top((fields->>'value4')::bigint, 1) FROM s3; +ERROR: stub top(float8, int) is called +CONTEXT: PL/pgSQL function top(double precision,integer) line 3 at RAISE +-- select acos (builtin function, explain) +--Testcase 608: +EXPLAIN VERBOSE +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: acos(((fields ->> 'value1'::text))::double precision), acos(((fields ->> 'value3'::text))::double precision) + InfluxDB query: SELECT "value1", "value3" FROM "s3" +(3 rows) + +-- select acos (builtin function, result) +--Testcase 609: +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3; +ERROR: input is out of range +-- select acos (builtin function, not pushdown constraints, explain) +--Testcase 610: +EXPLAIN VERBOSE +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..7.14 rows=7 width=16) + Output: acos(((fields ->> 'value1'::text))::double precision), acos(((fields ->> 'value3'::text))::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) = '64'::text) + InfluxDB query: SELECT "value1", "value3", "value2" FROM "s3" +(4 rows) + +-- select acos (builtin function, not pushdown constraints, result) +--Testcase 611: +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; + acos | acos +--------------------+-------------------- + 1.4706289056333368 | 1.6709637479564565 + 1.369438406004566 | 1.7721542475852274 + 1.2661036727794992 | 1.8754889808102941 +(3 rows) + +-- select acos (builtin function, pushdown constraints, explain) +--Testcase 612: +EXPLAIN VERBOSE +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1484.10 rows=1455 width=16) + Output: acos(((fields ->> 'value1'::text))::double precision), acos(((fields ->> 'value3'::text))::double precision) + InfluxDB query: SELECT "value1", "value3" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select acos (builtin function, pushdown constraints, result) +--Testcase 613: +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + acos | acos +--------------------+-------------------- + 1.4706289056333368 | 1.6709637479564565 + 1.369438406004566 | 1.7721542475852274 + 1.2661036727794992 | 1.8754889808102941 +(3 rows) + +-- select acos as nest function with agg (pushdown, explain) +--Testcase 614: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float), acos(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (acos(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), acos(sum("value3")) FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select acos as nest function with agg (pushdown, result) +--Testcase 615: +SELECT sum((fields->>'value3')::float), acos(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; + sum | acos +---------------------+------------------- + -0.6000000000000001 | 2.214297435588181 +(1 row) + +-- select acos as nest with log2 (pushdown, explain) +--Testcase 616: +EXPLAIN VERBOSE +SELECT acos(log2((fields->>'value1')::float)),acos(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: acos(log2(((fields ->> 'value1'::text))::double precision)), acos(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select acos as nest with log2 (pushdown, result) +--Testcase 617: +SELECT acos(log2((fields->>'value1')::float)),acos(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select acos with non pushdown func and explicit constant (explain) +--Testcase 618: +EXPLAIN VERBOSE +SELECT acos((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1469.55 rows=1455 width=48) + Output: acos(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select acos with non pushdown func and explicit constant (result) +--Testcase 619: +SELECT acos((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + acos | pi | ?column? +--------------------+-------------------+---------- + 1.6709637479564565 | 3.141592653589793 | 4.1 + 1.7721542475852274 | 3.141592653589793 | 4.1 + 1.8754889808102941 | 3.141592653589793 | 4.1 +(3 rows) + +-- select acos with order by (explain) +--Testcase 620: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY acos(1-(fields->>'value1')::float); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1560.54..1564.17 rows=1455 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (acos(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (acos(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1484.10 rows=1455 width=16) + Output: ((fields ->> 'value1'::text))::double precision, acos(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value2" <> 200)) +(6 rows) + +-- select acos with order by (result) +--Testcase 621: +SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY acos(1-(fields->>'value1')::float); + value1 | acos +--------+--------------------- + 0.1 | 0.45102681179626236 + 0.2 | 0.6435011087932843 + 0.3 | 0.7953988301841436 +(3 rows) + +-- select acos with order by index (result) +--Testcase 622: +SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 2,1; + value1 | acos +--------+--------------------- + 0.1 | 0.45102681179626236 + 0.2 | 0.6435011087932843 + 0.3 | 0.7953988301841436 +(3 rows) + +-- select acos with order by index (result) +--Testcase 623: +SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 1,2; + value1 | acos +--------+--------------------- + 0.1 | 0.45102681179626236 + 0.2 | 0.6435011087932843 + 0.3 | 0.7953988301841436 +(3 rows) + +-- select acos and as +--Testcase 624: +SELECT acos((fields->>'value3')::float) as acos1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + acos1 +-------------------- + 1.6709637479564565 + 1.7721542475852274 + 1.8754889808102941 +(3 rows) + +-- select acos(*) (stub agg function, explain) +--Testcase 625: +EXPLAIN VERBOSE +SELECT acos_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: acos_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select acos(*) (stub agg function, result) +--Testcase 626: +SELECT acos_all() from s3; +ERROR: stub acos_all() is called +CONTEXT: PL/pgSQL function acos_all() line 3 at RAISE +-- select acos(*) (stub agg function and group by tag only) (explain) +--Testcase 627: +EXPLAIN VERBOSE +SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (acos_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT acos(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select acos(*) (stub agg function and group by tag only) (result) +--Testcase 628: +SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + acos_all +------------------------------------------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.4706289056333368\",\"value2\" : null,\"value3\" : \"1.6709637479564563\",\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"1.3694384060045657\",\"value2\" : null,\"value3\" : \"1.7721542475852274\",\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"1.266103672779499\",\"value2\" : null,\"value3\" : \"1.8754889808102941\",\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") +(5 rows) + +-- select acos(*) (stub agg function, expose data, explain) +--Testcase 629: +EXPLAIN VERBOSE +SELECT (acos_all()::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((acos_all())::s3)."time", ((acos_all())::s3).tags, ((acos_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select acos(*) (stub agg function, expose data, result) +--Testcase 630: +SELECT (acos_all()::s3).* from s3; +ERROR: stub acos_all() is called +CONTEXT: PL/pgSQL function acos_all() line 3 at RAISE +-- select asin (builtin function, explain) +--Testcase 631: +EXPLAIN VERBOSE +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: asin(((fields ->> 'value1'::text))::double precision), asin(((fields ->> 'value3'::text))::double precision) + InfluxDB query: SELECT "value1", "value3" FROM "s3" +(3 rows) + +-- select asin (builtin function, result) +--Testcase 632: +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3; +ERROR: input is out of range +-- select asin (builtin function, not pushdown constraints, explain) +--Testcase 633: +EXPLAIN VERBOSE +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..7.14 rows=7 width=16) + Output: asin(((fields ->> 'value1'::text))::double precision), asin(((fields ->> 'value3'::text))::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) = '64'::text) + InfluxDB query: SELECT "value1", "value3", "value2" FROM "s3" +(4 rows) + +-- select asin (builtin function, not pushdown constraints, result) +--Testcase 634: +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; + asin | asin +--------------------+--------------------- + 0.1001674211615598 | -0.1001674211615598 + 0.2013579207903308 | -0.2013579207903308 + 0.3046926540153975 | -0.3046926540153975 +(3 rows) + +-- select asin (builtin function, pushdown constraints, explain) +--Testcase 635: +EXPLAIN VERBOSE +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1484.10 rows=1455 width=16) + Output: asin(((fields ->> 'value1'::text))::double precision), asin(((fields ->> 'value3'::text))::double precision) + InfluxDB query: SELECT "value1", "value3" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select asin (builtin function, pushdown constraints, result) +--Testcase 636: +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + asin | asin +--------------------+--------------------- + 0.1001674211615598 | -0.1001674211615598 + 0.2013579207903308 | -0.2013579207903308 + 0.3046926540153975 | -0.3046926540153975 +(3 rows) + +-- select asin as nest function with agg (pushdown, explain) +--Testcase 637: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float), asin(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (asin(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), asin(sum("value3")) FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select asin as nest function with agg (pushdown, result) +--Testcase 638: +SELECT sum((fields->>'value3')::float), asin(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; + sum | asin +---------------------+--------------------- + -0.6000000000000001 | -0.6435011087932845 +(1 row) + +-- select asin as nest with log2 (pushdown, explain) +--Testcase 639: +EXPLAIN VERBOSE +SELECT asin(log2((fields->>'value1')::float)),asin(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: asin(log2(((fields ->> 'value1'::text))::double precision)), asin(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select asin as nest with log2 (pushdown, result) +--Testcase 640: +SELECT asin(log2((fields->>'value1')::float)),asin(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select asin with non pushdown func and explicit constant (explain) +--Testcase 641: +EXPLAIN VERBOSE +SELECT asin((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1469.55 rows=1455 width=48) + Output: asin(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select asin with non pushdown func and explicit constant (result) +--Testcase 642: +SELECT asin((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + asin | pi | ?column? +---------------------+-------------------+---------- + -0.1001674211615598 | 3.141592653589793 | 4.1 + -0.2013579207903308 | 3.141592653589793 | 4.1 + -0.3046926540153975 | 3.141592653589793 | 4.1 +(3 rows) + +-- select asin with order by (explain) +--Testcase 643: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY asin(1-(fields->>'value1')::float); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1560.54..1564.17 rows=1455 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (asin(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (asin(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1484.10 rows=1455 width=16) + Output: ((fields ->> 'value1'::text))::double precision, asin(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value2" <> 200)) +(6 rows) + +-- select asin with order by (result) +--Testcase 644: +SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY asin(1-(fields->>'value1')::float); + value1 | asin +--------+-------------------- + 0.3 | 0.775397496610753 + 0.2 | 0.9272952180016123 + 0.1 | 1.1197695149986342 +(3 rows) + +-- select asin with order by index (result) +--Testcase 645: +SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 2,1; + value1 | asin +--------+-------------------- + 0.3 | 0.775397496610753 + 0.2 | 0.9272952180016123 + 0.1 | 1.1197695149986342 +(3 rows) + +-- select asin with order by index (result) +--Testcase 646: +SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 1,2; + value1 | asin +--------+-------------------- + 0.1 | 1.1197695149986342 + 0.2 | 0.9272952180016123 + 0.3 | 0.775397496610753 +(3 rows) + +-- select asin and as +--Testcase 647: +SELECT asin((fields->>'value3')::float) as asin1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + asin1 +--------------------- + -0.1001674211615598 + -0.2013579207903308 + -0.3046926540153975 +(3 rows) + +-- select asin(*) (stub agg function, explain) +--Testcase 648: +EXPLAIN VERBOSE +SELECT asin_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: asin_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select asin(*) (stub agg function, result) +--Testcase 649: +SELECT asin_all() from s3; +ERROR: stub asin_all() is called +CONTEXT: PL/pgSQL function asin_all() line 3 at RAISE +-- select asin(*) (stub agg function and group by tag only) (explain) +--Testcase 650: +EXPLAIN VERBOSE +SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (asin_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT asin(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select asin(*) (stub agg function and group by tag only) (result) +--Testcase 651: +SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + asin_all +--------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.1001674211615598\",\"value2\" : null,\"value3\" : \"-0.1001674211615598\",\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.20135792079033082\",\"value2\" : null,\"value3\" : \"-0.20135792079033082\",\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.3046926540153975\",\"value2\" : null,\"value3\" : \"-0.3046926540153975\",\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : null,\"value2\" : null,\"value3\" : null,\"value4\" : null }") +(5 rows) + +-- select asin(*) (stub agg function, expose data, explain) +--Testcase 652: +EXPLAIN VERBOSE +SELECT (asin_all()::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((asin_all())::s3)."time", ((asin_all())::s3).tags, ((asin_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select asin(*) (stub agg function, expose data, result) +--Testcase 653: +SELECT (asin_all()::s3).* from s3; +ERROR: stub asin_all() is called +CONTEXT: PL/pgSQL function asin_all() line 3 at RAISE +-- select atan (builtin function, explain) +--Testcase 654: +EXPLAIN VERBOSE +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1527.79 rows=1462 width=32) + Output: atan(((fields ->> 'value1'::text))::double precision), atan((((fields ->> 'value2'::text))::bigint)::double precision), atan(((fields ->> 'value3'::text))::double precision), atan((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select atan (builtin function, result) +--Testcase 655: +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3; + atan | atan | atan | atan +---------------------+--------------------+----------------------+--------------------- + 0.09966865249116204 | 1.5607966601082315 | -0.09966865249116204 | -1.5607966601082315 + 0.19739555984988078 | 1.5607966601082315 | -0.19739555984988078 | -1.5607966601082315 + 0.2914567944778671 | 1.5607966601082315 | -0.2914567944778671 | -1.5607966601082315 + 0.8329812666744317 | 1.5657963684609384 | -0.8329812666744317 | -1.5657963684609384 + 1.1441688336680205 | 1.5657963684609384 | -1.1441688336680205 | -1.5657963684609384 + 1.2765617616837088 | 1.5657963684609384 | -1.2765617616837088 | -1.5657963684609384 +(6 rows) + +-- select atan (builtin function, not pushdown constraints, explain) +--Testcase 656: +EXPLAIN VERBOSE +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: atan(((fields ->> 'value1'::text))::double precision), atan((((fields ->> 'value2'::text))::bigint)::double precision), atan(((fields ->> 'value3'::text))::double precision), atan((((fields ->> 'value4'::text))::bigint)::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select atan (builtin function, not pushdown constraints, result) +--Testcase 657: +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + atan | atan | atan | atan +--------------------+--------------------+---------------------+--------------------- + 0.8329812666744317 | 1.5657963684609384 | -0.8329812666744317 | -1.5657963684609384 + 1.1441688336680205 | 1.5657963684609384 | -1.1441688336680205 | -1.5657963684609384 + 1.2765617616837088 | 1.5657963684609384 | -1.2765617616837088 | -1.5657963684609384 +(3 rows) + +-- select atan (builtin function, pushdown constraints, explain) +--Testcase 658: +EXPLAIN VERBOSE +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: atan(((fields ->> 'value1'::text))::double precision), atan((((fields ->> 'value2'::text))::bigint)::double precision), atan(((fields ->> 'value3'::text))::double precision), atan((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select atan (builtin function, pushdown constraints, result) +--Testcase 659: +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + atan | atan | atan | atan +---------------------+--------------------+----------------------+--------------------- + 0.09966865249116204 | 1.5607966601082315 | -0.09966865249116204 | -1.5607966601082315 + 0.19739555984988078 | 1.5607966601082315 | -0.19739555984988078 | -1.5607966601082315 + 0.2914567944778671 | 1.5607966601082315 | -0.2914567944778671 | -1.5607966601082315 +(3 rows) + +-- select atan as nest function with agg (pushdown, explain) +--Testcase 660: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),atan(sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (atan(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), atan(sum("value3")) FROM "s3" +(3 rows) + +-- select atan as nest function with agg (pushdown, result) +--Testcase 661: +SELECT sum((fields->>'value3')::float),atan(sum((fields->>'value3')::float)) FROM s3; + sum | atan +--------------------+--------------------- + -7.199999999999999 | -1.4327903031373772 +(1 row) + +-- select atan as nest with log2 (pushdown, explain) +--Testcase 662: +EXPLAIN VERBOSE +SELECT atan(log2((fields->>'value1')::float)),atan(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: atan(log2(((fields ->> 'value1'::text))::double precision)), atan(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select atan as nest with log2 (pushdown, result) +--Testcase 663: +SELECT atan(log2((fields->>'value1')::float)),atan(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select atan with non pushdown func and explicit constant (explain) +--Testcase 664: +EXPLAIN VERBOSE +SELECT atan((fields->>'value3')::float), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: atan(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select atan with non pushdown func and explicit constant (result) +--Testcase 665: +SELECT atan((fields->>'value3')::float), pi(), 4.1 FROM s3; + atan | pi | ?column? +----------------------+-------------------+---------- + -0.09966865249116204 | 3.141592653589793 | 4.1 + -0.19739555984988078 | 3.141592653589793 | 4.1 + -0.2914567944778671 | 3.141592653589793 | 4.1 + -0.8329812666744317 | 3.141592653589793 | 4.1 + -1.1441688336680205 | 3.141592653589793 | 4.1 + -1.2765617616837088 | 3.141592653589793 | 4.1 +(6 rows) + +-- select atan with order by (explain) +--Testcase 666: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by atan(1-(fields->>'value1')::float); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (atan(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (atan(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, atan(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select atan with order by (result) +--Testcase 667: +SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by atan(1-(fields->>'value1')::float); + value1 | atan +--------+---------------------- + 3.3 | -1.1606689862534056 + 2.2 | -0.8760580505981935 + 1.1 | -0.09966865249116212 + 0.3 | 0.6107259643892086 + 0.2 | 0.6747409422235527 + 0.1 | 0.7328151017865066 +(6 rows) + +-- select atan with order by index (result) +--Testcase 668: +SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by 2,1; + value1 | atan +--------+---------------------- + 3.3 | -1.1606689862534056 + 2.2 | -0.8760580505981935 + 1.1 | -0.09966865249116212 + 0.3 | 0.6107259643892086 + 0.2 | 0.6747409422235527 + 0.1 | 0.7328151017865066 +(6 rows) + +-- select atan with order by index (result) +--Testcase 669: +SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by 1,2; + value1 | atan +--------+---------------------- + 0.1 | 0.7328151017865066 + 0.2 | 0.6747409422235527 + 0.3 | 0.6107259643892086 + 1.1 | -0.09966865249116212 + 2.2 | -0.8760580505981935 + 3.3 | -1.1606689862534056 +(6 rows) + +-- select atan and as +--Testcase 670: +SELECT atan((fields->>'value3')::float) as atan1 FROM s3; + atan1 +---------------------- + -0.09966865249116204 + -0.19739555984988078 + -0.2914567944778671 + -0.8329812666744317 + -1.1441688336680205 + -1.2765617616837088 +(6 rows) + +-- select atan(*) (stub agg function, explain) +--Testcase 671: +EXPLAIN VERBOSE +SELECT atan_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: atan_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select atan(*) (stub agg function, result) +--Testcase 672: +SELECT atan_all() from s3; +ERROR: stub atan_all() is called +CONTEXT: PL/pgSQL function atan_all() line 3 at RAISE +-- select atan(*) (stub agg function and group by tag only) (explain) +--Testcase 673: +EXPLAIN VERBOSE +SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (atan_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT atan(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select atan(*) (stub agg function and group by tag only) (result) +--Testcase 674: +SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + atan_all +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.09966865249116204\",\"value2\" : \"1.5607966601082313\",\"value3\" : \"-0.09966865249116204\",\"value4\" : \"-1.5607966601082313\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.19739555984988078\",\"value2\" : \"1.5607966601082313\",\"value3\" : \"-0.19739555984988078\",\"value4\" : \"-1.5607966601082313\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.2914567944778671\",\"value2\" : \"1.5607966601082313\",\"value3\" : \"-0.2914567944778671\",\"value4\" : \"-1.5607966601082313\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8329812666744317\",\"value2\" : \"1.5657963684609382\",\"value3\" : \"-0.8329812666744317\",\"value4\" : \"-1.5657963684609382\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1.1441688336680205\",\"value2\" : \"1.5657963684609382\",\"value3\" : \"-1.1441688336680205\",\"value4\" : \"-1.5657963684609382\" }") +(5 rows) + +-- select atan(*) (stub agg function, expose data, explain) +--Testcase 675: +EXPLAIN VERBOSE +SELECT (atan_all()::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((atan_all())::s3)."time", ((atan_all())::s3).tags, ((atan_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 676: +SELECT asin_all(), acos_all(), atan_all() FROM s3; +ERROR: stub asin_all() is called +CONTEXT: PL/pgSQL function asin_all() line 3 at RAISE +-- select atan2 (builtin function, explain) +--Testcase 677: +EXPLAIN VERBOSE +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1578.96 rows=1462 width=32) + Output: atan2(((fields ->> 'value1'::text))::double precision, (((fields ->> 'value2'::text))::bigint)::double precision), atan2((((fields ->> 'value2'::text))::bigint)::double precision, ((fields ->> 'value3'::text))::double precision), atan2(((fields ->> 'value3'::text))::double precision, (((fields ->> 'value4'::text))::bigint)::double precision), atan2((((fields ->> 'value4'::text))::bigint)::double precision, ((fields ->> 'value1'::text))::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select atan2 (builtin function, result) +--Testcase 678: +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3; + atan2 | atan2 | atan2 | atan2 +-----------------------+--------------------+---------------------+--------------------- + 0.0009999996666668668 | 1.5717963264615635 | -3.1405926539231266 | -1.5697963271282298 + 0.0019999973333397333 | 1.5727963241282363 | -3.1395926562564536 | -1.5687963294615568 + 0.0029999910000485996 | 1.5737963177949452 | -3.1385926625897445 | -1.5677963357948481 + 0.005499944542673214 | 1.5762962713375699 | -3.1360927090471202 | -1.5652963822522235 + 0.010999556365540751 | 1.5817958831604373 | -3.1305930972242524 | -1.5597967704293558 + 0.01649850286954865 | 1.5872948296644454 | -3.1250941507202445 | -1.554297823925348 +(6 rows) + +-- select atan2 (builtin function, not pushdown constraints, explain) +--Testcase 679: +EXPLAIN VERBOSE +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1571.40 rows=1455 width=32) + Output: atan2(((fields ->> 'value1'::text))::double precision, (((fields ->> 'value2'::text))::bigint)::double precision), atan2((((fields ->> 'value2'::text))::bigint)::double precision, ((fields ->> 'value3'::text))::double precision), atan2(((fields ->> 'value3'::text))::double precision, (((fields ->> 'value4'::text))::bigint)::double precision), atan2((((fields ->> 'value4'::text))::bigint)::double precision, ((fields ->> 'value1'::text))::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select atan2 (builtin function, not pushdown constraints, result) +--Testcase 680: +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + atan2 | atan2 | atan2 | atan2 +----------------------+--------------------+---------------------+--------------------- + 0.005499944542673214 | 1.5762962713375699 | -3.1360927090471202 | -1.5652963822522235 + 0.010999556365540751 | 1.5817958831604373 | -3.1305930972242524 | -1.5597967704293558 + 0.01649850286954865 | 1.5872948296644454 | -3.1250941507202445 | -1.554297823925348 +(3 rows) + +-- select atan2 (builtin function, pushdown constraints, explain) +--Testcase 681: +EXPLAIN VERBOSE +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1571.40 rows=1455 width=32) + Output: atan2(((fields ->> 'value1'::text))::double precision, (((fields ->> 'value2'::text))::bigint)::double precision), atan2((((fields ->> 'value2'::text))::bigint)::double precision, ((fields ->> 'value3'::text))::double precision), atan2(((fields ->> 'value3'::text))::double precision, (((fields ->> 'value4'::text))::bigint)::double precision), atan2((((fields ->> 'value4'::text))::bigint)::double precision, ((fields ->> 'value1'::text))::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select atan2 (builtin function, pushdown constraints, result) +--Testcase 682: +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + atan2 | atan2 | atan2 | atan2 +-----------------------+--------------------+---------------------+--------------------- + 0.0009999996666668668 | 1.5717963264615635 | -3.1405926539231266 | -1.5697963271282298 + 0.0019999973333397333 | 1.5727963241282363 | -3.1395926562564536 | -1.5687963294615568 + 0.0029999910000485996 | 1.5737963177949452 | -3.1385926625897445 | -1.5677963357948481 +(3 rows) + +-- select atan2 as nest function with agg (pushdown, explain) +--Testcase 683: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float), sum((fields->>'value4')::bigint),atan2(sum((fields->>'value3')::float), sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (sum(((fields ->> 'value4'::text))::bigint)), (atan2(sum(((fields ->> 'value3'::text))::double precision), sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), sum("value4"), atan2(sum("value3"), sum("value3")) FROM "s3" +(3 rows) + +-- select atan2 as nest function with agg (pushdown, result) +--Testcase 684: +SELECT sum((fields->>'value3')::float), sum((fields->>'value4')::bigint),atan2(sum((fields->>'value3')::float), sum((fields->>'value3')::float)) FROM s3; + sum | sum | atan2 +--------------------+------+-------------------- + -7.199999999999999 | -900 | -2.356194490192345 +(1 row) + +-- select atan2 as nest with log2 (pushdown, explain) +--Testcase 685: +EXPLAIN VERBOSE +SELECT atan2(log2((fields->>'value1')::float), log2((fields->>'value1')::float)),atan2(log2(1/(fields->>'value1')::float), log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2982.48 rows=1462 width=16) + Output: atan2(log2(((fields ->> 'value1'::text))::double precision), log2(((fields ->> 'value1'::text))::double precision)), atan2(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)), log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select atan2 as nest with log2 (pushdown, result) +--Testcase 686: +SELECT atan2(log2((fields->>'value1')::float), log2((fields->>'value1')::float)),atan2(log2(1/(fields->>'value1')::float), log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select atan2 with non pushdown func and explicit constant (explain) +--Testcase 687: +EXPLAIN VERBOSE +SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=48) + Output: atan2(((fields ->> 'value3'::text))::double precision, (((fields ->> 'value4'::text))::bigint)::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3", "value4" FROM "s3" +(3 rows) + +-- select atan2 with non pushdown func and explicit constant (result) +--Testcase 688: +SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint), pi(), 4.1 FROM s3; + atan2 | pi | ?column? +---------------------+-------------------+---------- + -3.1405926539231266 | 3.141592653589793 | 4.1 + -3.1395926562564536 | 3.141592653589793 | 4.1 + -3.1385926625897445 | 3.141592653589793 | 4.1 + -3.1360927090471202 | 3.141592653589793 | 4.1 + -3.1305930972242524 | 3.141592653589793 | 4.1 + -3.1250941507202445 | 3.141592653589793 | 4.1 +(6 rows) + +-- select atan2 with order by (explain) +--Testcase 689: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1586.37..1590.03 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (atan2(('1'::double precision - ((fields ->> 'value1'::text))::double precision), ((1 - ((fields ->> 'value2'::text))::bigint))::double precision)) + Sort Key: (atan2(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision), ((1 - ((s3.fields ->> 'value2'::text))::bigint))::double precision)) + -> Foreign Scan on public.s3 (cost=10.00..1509.52 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, atan2(('1'::double precision - ((fields ->> 'value1'::text))::double precision), ((1 - ((fields ->> 'value2'::text))::bigint))::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(6 rows) + +-- select atan2 with order by (result) +--Testcase 690: +SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint); + value1 | atan2 +--------+--------------------- + 1.1 | -3.1410901410692773 + 2.2 | -3.1355625759253205 + 3.3 | -3.130035379243216 + 0.1 | 3.1325019949247332 + 0.2 | 3.1335120213928933 + 0.3 | 3.1345220643486456 +(6 rows) + +-- select atan2 with order by index (result) +--Testcase 691: +SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by 2,1; + value1 | atan2 +--------+--------------------- + 1.1 | -3.1410901410692773 + 2.2 | -3.1355625759253205 + 3.3 | -3.130035379243216 + 0.1 | 3.1325019949247332 + 0.2 | 3.1335120213928933 + 0.3 | 3.1345220643486456 +(6 rows) + +-- select atan2 with order by index (result) +--Testcase 692: +SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by 1,2; + value1 | atan2 +--------+--------------------- + 0.1 | 3.1325019949247332 + 0.2 | 3.1335120213928933 + 0.3 | 3.1345220643486456 + 1.1 | -3.1410901410692773 + 2.2 | -3.1355625759253205 + 3.3 | -3.130035379243216 +(6 rows) + +-- select atan2 and as +--Testcase 693: +SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint) as atan21 FROM s3; + atan21 +--------------------- + -3.1405926539231266 + -3.1395926562564536 + -3.1385926625897445 + -3.1360927090471202 + -3.1305930972242524 + -3.1250941507202445 +(6 rows) + +-- select atan2(*) (stub function, explain) +--Testcase 694: +EXPLAIN VERBOSE +SELECT atan2_all((fields->>'value1')::float) from s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1838.47 rows=1462 width=32) + Output: atan2_all(((fields ->> 'value1'::text))::double precision) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select atan2(*) (stub function, result) +--Testcase 695: +SELECT atan2_all((fields->>'value1')::float) from s3; +ERROR: stub atan2_all(float8) is called +CONTEXT: PL/pgSQL function atan2_all(double precision) line 3 at RAISE +-- select ceil (builtin function, explain) +--Testcase 696: +EXPLAIN VERBOSE +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1527.79 rows=1462 width=32) + Output: ceil(((fields ->> 'value1'::text))::double precision), ceil((((fields ->> 'value2'::text))::bigint)::double precision), ceil(((fields ->> 'value3'::text))::double precision), ceil((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select ceil (builtin function, result) +--Testcase 697: +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3; + ceil | ceil | ceil | ceil +------+------+------+------ + 1 | 100 | -0 | -100 + 1 | 100 | -0 | -100 + 1 | 100 | -0 | -100 + 2 | 200 | -1 | -200 + 3 | 200 | -2 | -200 + 4 | 200 | -3 | -200 +(6 rows) + +-- select ceil (builtin function, not pushdown constraints, explain) +--Testcase 698: +EXPLAIN VERBOSE +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: ceil(((fields ->> 'value1'::text))::double precision), ceil((((fields ->> 'value2'::text))::bigint)::double precision), ceil(((fields ->> 'value3'::text))::double precision), ceil((((fields ->> 'value4'::text))::bigint)::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select ceil (builtin function, not pushdown constraints, result) +--Testcase 699: +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + ceil | ceil | ceil | ceil +------+------+------+------ + 2 | 200 | -1 | -200 + 3 | 200 | -2 | -200 + 4 | 200 | -3 | -200 +(3 rows) + +-- select ceil (builtin function, pushdown constraints, explain) +--Testcase 700: +EXPLAIN VERBOSE +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: ceil(((fields ->> 'value1'::text))::double precision), ceil((((fields ->> 'value2'::text))::bigint)::double precision), ceil(((fields ->> 'value3'::text))::double precision), ceil((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select ceil (builtin function, pushdown constraints, result) +--Testcase 701: +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + ceil | ceil | ceil | ceil +------+------+------+------ + 1 | 100 | -0 | -100 + 1 | 100 | -0 | -100 + 1 | 100 | -0 | -100 +(3 rows) + +-- select ceil as nest function with agg (pushdown, explain) +--Testcase 702: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),ceil(sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (ceil(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), ceil(sum("value3")) FROM "s3" +(3 rows) + +-- select ceil as nest function with agg (pushdown, result) +--Testcase 703: +SELECT sum((fields->>'value3')::float),ceil(sum((fields->>'value3')::float)) FROM s3; + sum | ceil +--------------------+------ + -7.199999999999999 | -7 +(1 row) + +-- select ceil as nest with log2 (pushdown, explain) +--Testcase 704: +EXPLAIN VERBOSE +SELECT ceil(log2((fields->>'value1')::float)),ceil(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: ceil(log2(((fields ->> 'value1'::text))::double precision)), ceil(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select ceil as nest with log2 (pushdown, result) +--Testcase 705: +SELECT ceil(log2((fields->>'value1')::float)),ceil(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select ceil with non pushdown func and explicit constant (explain) +--Testcase 706: +EXPLAIN VERBOSE +SELECT ceil((fields->>'value3')::float), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: ceil(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select ceil with non pushdown func and explicit constant (result) +--Testcase 707: +SELECT ceil((fields->>'value3')::float), pi(), 4.1 FROM s3; + ceil | pi | ?column? +------+-------------------+---------- + -0 | 3.141592653589793 | 4.1 + -0 | 3.141592653589793 | 4.1 + -0 | 3.141592653589793 | 4.1 + -1 | 3.141592653589793 | 4.1 + -2 | 3.141592653589793 | 4.1 + -3 | 3.141592653589793 | 4.1 +(6 rows) + +-- select ceil with order by (explain) +--Testcase 708: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by ceil(1-(fields->>'value1')::float); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (ceil(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (ceil(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, ceil(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select ceil with order by (result) +--Testcase 709: +SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by ceil(1-(fields->>'value1')::float); + value1 | ceil +--------+------ + 3.3 | -2 + 2.2 | -1 + 1.1 | -0 + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 +(6 rows) + +-- select ceil with order by index (result) +--Testcase 710: +SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by 2,1; + value1 | ceil +--------+------ + 3.3 | -2 + 2.2 | -1 + 1.1 | -0 + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 +(6 rows) + +-- select ceil with order by index (result) +--Testcase 711: +SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by 1,2; + value1 | ceil +--------+------ + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 + 1.1 | -0 + 2.2 | -1 + 3.3 | -2 +(6 rows) + +-- select ceil and as +--Testcase 712: +SELECT ceil((fields->>'value3')::float) as ceil1 FROM s3; + ceil1 +------- + -0 + -0 + -0 + -1 + -2 + -3 +(6 rows) + +-- select ceil(*) (stub agg function, explain) +--Testcase 713: +EXPLAIN VERBOSE +SELECT ceil_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: ceil_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select ceil(*) (stub agg function, result) +--Testcase 714: +SELECT ceil_all() from s3; +ERROR: stub ceil_all() is called +CONTEXT: PL/pgSQL function ceil_all() line 3 at RAISE +-- select ceil(*) (stub agg function and group by tag only) (explain) +--Testcase 715: +EXPLAIN VERBOSE +SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (ceil_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT ceil(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select ceil(*) (stub agg function and group by tag only) (result) +--Testcase 716: +SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + ceil_all +---------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"1\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"2\",\"value2\" : \"200\",\"value3\" : \"-1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"3\",\"value2\" : \"200\",\"value3\" : \"-2\",\"value4\" : \"-200\" }") +(5 rows) + +-- select ceil(*) (stub agg function, expose data, explain) +--Testcase 717: +EXPLAIN VERBOSE +SELECT (ceil_all()::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((ceil_all())::s3)."time", ((ceil_all())::s3).tags, ((ceil_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select ceil(*) (stub agg function, expose data, result) +--Testcase 718: +SELECT (ceil_all()::s3).* from s3; +ERROR: stub ceil_all() is called +CONTEXT: PL/pgSQL function ceil_all() line 3 at RAISE +-- select cos (builtin function, explain) +--Testcase 719: +EXPLAIN VERBOSE +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1527.79 rows=1462 width=32) + Output: cos(((fields ->> 'value1'::text))::double precision), cos((((fields ->> 'value2'::text))::bigint)::double precision), cos(((fields ->> 'value3'::text))::double precision), cos((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select cos (builtin function, result) +--Testcase 720: +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3; + cos | cos | cos | cos +---------------------+---------------------+---------------------+--------------------- + 0.9950041652780258 | 0.8623188722876839 | 0.9950041652780258 | 0.8623188722876839 + 0.9800665778412416 | 0.8623188722876839 | 0.9800665778412416 | 0.8623188722876839 + 0.955336489125606 | 0.8623188722876839 | 0.955336489125606 | 0.8623188722876839 + 0.4535961214255773 | 0.48718767500700594 | 0.4535961214255773 | 0.48718767500700594 + -0.5885011172553458 | 0.48718767500700594 | -0.5885011172553458 | 0.48718767500700594 + -0.9874797699088649 | 0.48718767500700594 | -0.9874797699088649 | 0.48718767500700594 +(6 rows) + +-- select cos (builtin function, not pushdown constraints, explain) +--Testcase 721: +EXPLAIN VERBOSE +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: cos(((fields ->> 'value1'::text))::double precision), cos((((fields ->> 'value2'::text))::bigint)::double precision), cos(((fields ->> 'value3'::text))::double precision), cos((((fields ->> 'value4'::text))::bigint)::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select cos (builtin function, not pushdown constraints, result) +--Testcase 722: +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + cos | cos | cos | cos +---------------------+---------------------+---------------------+--------------------- + 0.4535961214255773 | 0.48718767500700594 | 0.4535961214255773 | 0.48718767500700594 + -0.5885011172553458 | 0.48718767500700594 | -0.5885011172553458 | 0.48718767500700594 + -0.9874797699088649 | 0.48718767500700594 | -0.9874797699088649 | 0.48718767500700594 +(3 rows) + +-- select cos (builtin function, pushdown constraints, explain) +--Testcase 723: +EXPLAIN VERBOSE +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: cos(((fields ->> 'value1'::text))::double precision), cos((((fields ->> 'value2'::text))::bigint)::double precision), cos(((fields ->> 'value3'::text))::double precision), cos((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select cos (builtin function, pushdown constraints, result) +--Testcase 724: +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + cos | cos | cos | cos +--------------------+--------------------+--------------------+-------------------- + 0.9950041652780258 | 0.8623188722876839 | 0.9950041652780258 | 0.8623188722876839 + 0.9800665778412416 | 0.8623188722876839 | 0.9800665778412416 | 0.8623188722876839 + 0.955336489125606 | 0.8623188722876839 | 0.955336489125606 | 0.8623188722876839 +(3 rows) + +-- select cos as nest function with agg (pushdown, explain) +--Testcase 725: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),cos(sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (cos(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), cos(sum("value3")) FROM "s3" +(3 rows) + +-- select cos as nest function with agg (pushdown, result) +--Testcase 726: +SELECT sum((fields->>'value3')::float),cos(sum((fields->>'value3')::float)) FROM s3; + sum | cos +--------------------+-------------------- + -7.199999999999999 | 0.6083513145322552 +(1 row) + +-- select cos as nest with log2 (pushdown, explain) +--Testcase 727: +EXPLAIN VERBOSE +SELECT cos(log2((fields->>'value1')::float)),cos(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: cos(log2(((fields ->> 'value1'::text))::double precision)), cos(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select cos as nest with log2 (pushdown, result) +--Testcase 728: +SELECT cos(log2((fields->>'value1')::float)),cos(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select cos with non pushdown func and explicit constant (explain) +--Testcase 729: +EXPLAIN VERBOSE +SELECT cos((fields->>'value3')::float), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: cos(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select cos with non pushdown func and explicit constant (result) +--Testcase 730: +SELECT cos((fields->>'value3')::float), pi(), 4.1 FROM s3; + cos | pi | ?column? +---------------------+-------------------+---------- + 0.9950041652780258 | 3.141592653589793 | 4.1 + 0.9800665778412416 | 3.141592653589793 | 4.1 + 0.955336489125606 | 3.141592653589793 | 4.1 + 0.4535961214255773 | 3.141592653589793 | 4.1 + -0.5885011172553458 | 3.141592653589793 | 4.1 + -0.9874797699088649 | 3.141592653589793 | 4.1 +(6 rows) + +-- select cos with order by (explain) +--Testcase 731: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by cos(1-(fields->>'value1')::float); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (cos(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (cos(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, cos(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select cos with order by (result) +--Testcase 732: +SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by cos(1-(fields->>'value1')::float); + value1 | cos +--------+--------------------- + 3.3 | -0.6662760212798241 + 2.2 | 0.3623577544766734 + 0.1 | 0.6216099682706644 + 0.2 | 0.6967067093471654 + 0.3 | 0.7648421872844885 + 1.1 | 0.9950041652780257 +(6 rows) + +-- select cos with order by index (result) +--Testcase 733: +SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by 2,1; + value1 | cos +--------+--------------------- + 3.3 | -0.6662760212798241 + 2.2 | 0.3623577544766734 + 0.1 | 0.6216099682706644 + 0.2 | 0.6967067093471654 + 0.3 | 0.7648421872844885 + 1.1 | 0.9950041652780257 +(6 rows) + +-- select cos with order by index (result) +--Testcase 734: +SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by 1,2; + value1 | cos +--------+--------------------- + 0.1 | 0.6216099682706644 + 0.2 | 0.6967067093471654 + 0.3 | 0.7648421872844885 + 1.1 | 0.9950041652780257 + 2.2 | 0.3623577544766734 + 3.3 | -0.6662760212798241 +(6 rows) + +-- select cos and as +--Testcase 735: +SELECT cos((fields->>'value3')::float) as cos1 FROM s3; + cos1 +--------------------- + 0.9950041652780258 + 0.9800665778412416 + 0.955336489125606 + 0.4535961214255773 + -0.5885011172553458 + -0.9874797699088649 +(6 rows) + +-- select cos(*) (stub agg function, explain) +--Testcase 736: +EXPLAIN VERBOSE +SELECT cos_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: cos_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select cos(*) (stub agg function, result) +--Testcase 737: +SELECT cos_all() from s3; +ERROR: stub cos_all() is called +CONTEXT: PL/pgSQL function cos_all() line 3 at RAISE +-- select cos(*) (stub agg function and group by tag only) (explain) +--Testcase 738: +EXPLAIN VERBOSE +SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (cos_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT cos(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select cos(*) (stub agg function and group by tag only) (result) +--Testcase 739: +SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + cos_all +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.9950041652780257\",\"value2\" : \"0.8623188722876839\",\"value3\" : \"0.9950041652780257\",\"value4\" : \"0.8623188722876839\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.9800665778412416\",\"value2\" : \"0.8623188722876839\",\"value3\" : \"0.9800665778412416\",\"value4\" : \"0.8623188722876839\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.955336489125606\",\"value2\" : \"0.8623188722876839\",\"value3\" : \"0.955336489125606\",\"value4\" : \"0.8623188722876839\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.4535961214255773\",\"value2\" : \"0.48718767500700594\",\"value3\" : \"0.4535961214255773\",\"value4\" : \"0.48718767500700594\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"-0.5885011172553458\",\"value2\" : \"0.48718767500700594\",\"value3\" : \"-0.5885011172553458\",\"value4\" : \"0.48718767500700594\" }") +(5 rows) + +-- select exp (builtin function, explain) +--Testcase 740: +EXPLAIN VERBOSE +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1527.79 rows=1462 width=32) + Output: exp(((fields ->> 'value1'::text))::double precision), exp((((fields ->> 'value2'::text))::bigint)::double precision), exp(((fields ->> 'value3'::text))::double precision), exp((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select exp (builtin function, result) +--Testcase 741: +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3; + exp | exp | exp | exp +--------------------+------------------------+----------------------+------------------------ + 1.1051709180756477 | 2.6881171418161356e+43 | 0.9048374180359595 | 3.720075976020836e-44 + 1.2214027581601699 | 2.6881171418161356e+43 | 0.8187307530779818 | 3.720075976020836e-44 + 1.3498588075760032 | 2.6881171418161356e+43 | 0.7408182206817179 | 3.720075976020836e-44 + 3.0041660239464334 | 7.225973768125749e+86 | 0.33287108369807955 | 1.3838965267367376e-87 + 9.025013499434122 | 7.225973768125749e+86 | 0.11080315836233387 | 1.3838965267367376e-87 + 27.112638920657883 | 7.225973768125749e+86 | 0.036883167401240015 | 1.3838965267367376e-87 +(6 rows) + +-- select exp (builtin function, not pushdown constraints, explain) +--Testcase 742: +EXPLAIN VERBOSE +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: exp(((fields ->> 'value1'::text))::double precision), exp((((fields ->> 'value2'::text))::bigint)::double precision), exp(((fields ->> 'value3'::text))::double precision), exp((((fields ->> 'value4'::text))::bigint)::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select exp (builtin function, not pushdown constraints, result) +--Testcase 743: +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + exp | exp | exp | exp +--------------------+-----------------------+----------------------+------------------------ + 3.0041660239464334 | 7.225973768125749e+86 | 0.33287108369807955 | 1.3838965267367376e-87 + 9.025013499434122 | 7.225973768125749e+86 | 0.11080315836233387 | 1.3838965267367376e-87 + 27.112638920657883 | 7.225973768125749e+86 | 0.036883167401240015 | 1.3838965267367376e-87 +(3 rows) + +-- select exp (builtin function, pushdown constraints, explain) +--Testcase 744: +EXPLAIN VERBOSE +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: exp(((fields ->> 'value1'::text))::double precision), exp((((fields ->> 'value2'::text))::bigint)::double precision), exp(((fields ->> 'value3'::text))::double precision), exp((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select exp (builtin function, pushdown constraints, result) +--Testcase 745: +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + exp | exp | exp | exp +--------------------+------------------------+--------------------+----------------------- + 1.1051709180756477 | 2.6881171418161356e+43 | 0.9048374180359595 | 3.720075976020836e-44 + 1.2214027581601699 | 2.6881171418161356e+43 | 0.8187307530779818 | 3.720075976020836e-44 + 1.3498588075760032 | 2.6881171418161356e+43 | 0.7408182206817179 | 3.720075976020836e-44 +(3 rows) + +-- select exp as nest function with agg (pushdown, explain) +--Testcase 746: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),exp(sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (exp(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), exp(sum("value3")) FROM "s3" +(3 rows) + +-- select exp as nest function with agg (pushdown, result) +--Testcase 747: +SELECT sum((fields->>'value3')::float),exp(sum((fields->>'value3')::float)) FROM s3; + sum | exp +--------------------+----------------------- + -7.199999999999999 | 0.0007465858083766799 +(1 row) + +-- select exp as nest with log2 (pushdown, explain) +--Testcase 748: +EXPLAIN VERBOSE +SELECT exp(log2((fields->>'value1')::float)),exp(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: exp(log2(((fields ->> 'value1'::text))::double precision)), exp(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select exp as nest with log2 (pushdown, result) +--Testcase 749: +SELECT exp(log2((fields->>'value1')::float)),exp(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select exp with non pushdown func and explicit constant (explain) +--Testcase 750: +EXPLAIN VERBOSE +SELECT exp((fields->>'value3')::float), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: exp(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select exp with non pushdown func and explicit constant (result) +--Testcase 751: +SELECT exp((fields->>'value3')::float), pi(), 4.1 FROM s3; + exp | pi | ?column? +----------------------+-------------------+---------- + 0.9048374180359595 | 3.141592653589793 | 4.1 + 0.8187307530779818 | 3.141592653589793 | 4.1 + 0.7408182206817179 | 3.141592653589793 | 4.1 + 0.33287108369807955 | 3.141592653589793 | 4.1 + 0.11080315836233387 | 3.141592653589793 | 4.1 + 0.036883167401240015 | 3.141592653589793 | 4.1 +(6 rows) + +-- select exp with order by (explain) +--Testcase 752: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by exp(1-(fields->>'value1')::float); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (exp(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (exp(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, exp(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select exp with order by (result) +--Testcase 753: +SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by exp(1-(fields->>'value1')::float); + value1 | exp +--------+--------------------- + 3.3 | 0.10025884372280375 + 2.2 | 0.301194211912202 + 1.1 | 0.9048374180359595 + 0.3 | 2.0137527074704766 + 0.2 | 2.225540928492468 + 0.1 | 2.45960311115695 +(6 rows) + +-- select exp with order by index (result) +--Testcase 754: +SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by 2,1; + value1 | exp +--------+--------------------- + 3.3 | 0.10025884372280375 + 2.2 | 0.301194211912202 + 1.1 | 0.9048374180359595 + 0.3 | 2.0137527074704766 + 0.2 | 2.225540928492468 + 0.1 | 2.45960311115695 +(6 rows) + +-- select exp with order by index (result) +--Testcase 755: +SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by 1,2; + value1 | exp +--------+--------------------- + 0.1 | 2.45960311115695 + 0.2 | 2.225540928492468 + 0.3 | 2.0137527074704766 + 1.1 | 0.9048374180359595 + 2.2 | 0.301194211912202 + 3.3 | 0.10025884372280375 +(6 rows) + +-- select exp and as +--Testcase 756: +SELECT exp((fields->>'value3')::float) as exp1 FROM s3; + exp1 +---------------------- + 0.9048374180359595 + 0.8187307530779818 + 0.7408182206817179 + 0.33287108369807955 + 0.11080315836233387 + 0.036883167401240015 +(6 rows) + +-- select exp(*) (stub agg function, explain) +--Testcase 757: +EXPLAIN VERBOSE +SELECT exp_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: exp_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select exp(*) (stub agg function, result) +--Testcase 758: +SELECT exp_all() from s3; +ERROR: stub exp_all() is called +CONTEXT: PL/pgSQL function exp_all() line 3 at RAISE +-- select exp(*) (stub agg function and group by tag only) (explain) +--Testcase 759: +EXPLAIN VERBOSE +SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (exp_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT exp(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select exp(*) (stub agg function and group by tag only) (result) +--Testcase 760: +SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + exp_all +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1.1051709180756477\",\"value2\" : \"2.6881171418161356e+43\",\"value3\" : \"0.9048374180359595\",\"value4\" : \"3.720075976020836e-44\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"1.2214027581601699\",\"value2\" : \"2.6881171418161356e+43\",\"value3\" : \"0.8187307530779819\",\"value4\" : \"3.720075976020836e-44\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"1.3498588075760032\",\"value2\" : \"2.6881171418161356e+43\",\"value3\" : \"0.7408182206817179\",\"value4\" : \"3.720075976020836e-44\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"3.0041660239464334\",\"value2\" : \"7.22597376812575e+86\",\"value3\" : \"0.3328710836980795\",\"value4\" : \"1.3838965267367376e-87\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"9.025013499434122\",\"value2\" : \"7.22597376812575e+86\",\"value3\" : \"0.11080315836233386\",\"value4\" : \"1.3838965267367376e-87\" }") +(5 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 761: +SELECT ceil_all(), cos_all(), exp_all() FROM s3; +ERROR: stub ceil_all() is called +CONTEXT: PL/pgSQL function ceil_all() line 3 at RAISE +-- select floor (builtin function, explain) +--Testcase 762: +EXPLAIN VERBOSE +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1527.79 rows=1462 width=32) + Output: floor(((fields ->> 'value1'::text))::double precision), floor((((fields ->> 'value2'::text))::bigint)::double precision), floor(((fields ->> 'value3'::text))::double precision), floor((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select floor (builtin function, result) +--Testcase 763: +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3; + floor | floor | floor | floor +-------+-------+-------+------- + 0 | 100 | -1 | -100 + 0 | 100 | -1 | -100 + 0 | 100 | -1 | -100 + 1 | 200 | -2 | -200 + 2 | 200 | -3 | -200 + 3 | 200 | -4 | -200 +(6 rows) + +-- select floor (builtin function, not pushdown constraints, explain) +--Testcase 764: +EXPLAIN VERBOSE +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: floor(((fields ->> 'value1'::text))::double precision), floor((((fields ->> 'value2'::text))::bigint)::double precision), floor(((fields ->> 'value3'::text))::double precision), floor((((fields ->> 'value4'::text))::bigint)::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select floor (builtin function, not pushdown constraints, result) +--Testcase 765: +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + floor | floor | floor | floor +-------+-------+-------+------- + 1 | 200 | -2 | -200 + 2 | 200 | -3 | -200 + 3 | 200 | -4 | -200 +(3 rows) + +-- select floor (builtin function, pushdown constraints, explain) +--Testcase 766: +EXPLAIN VERBOSE +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: floor(((fields ->> 'value1'::text))::double precision), floor((((fields ->> 'value2'::text))::bigint)::double precision), floor(((fields ->> 'value3'::text))::double precision), floor((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select floor (builtin function, pushdown constraints, result) +--Testcase 767: +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + floor | floor | floor | floor +-------+-------+-------+------- + 0 | 100 | -1 | -100 + 0 | 100 | -1 | -100 + 0 | 100 | -1 | -100 +(3 rows) + +-- select floor as nest function with agg (pushdown, explain) +--Testcase 768: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),floor(sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (floor(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), floor(sum("value3")) FROM "s3" +(3 rows) + +-- select floor as nest function with agg (pushdown, result) +--Testcase 769: +SELECT sum((fields->>'value3')::float),floor(sum((fields->>'value3')::float)) FROM s3; + sum | floor +--------------------+------- + -7.199999999999999 | -8 +(1 row) + +-- select floor as nest with log2 (pushdown, explain) +--Testcase 770: +EXPLAIN VERBOSE +SELECT floor(log2((fields->>'value1')::float)),floor(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: floor(log2(((fields ->> 'value1'::text))::double precision)), floor(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select floor as nest with log2 (pushdown, result) +--Testcase 771: +SELECT floor(log2((fields->>'value1')::float)),floor(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select floor with non pushdown func and explicit constant (explain) +--Testcase 772: +EXPLAIN VERBOSE +SELECT floor((fields->>'value3')::float), pi(), 4.1 FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: floor(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select floor with non pushdown func and explicit constant (result) +--Testcase 773: +SELECT floor((fields->>'value3')::float), pi(), 4.1 FROM s3; + floor | pi | ?column? +-------+-------------------+---------- + -1 | 3.141592653589793 | 4.1 + -1 | 3.141592653589793 | 4.1 + -1 | 3.141592653589793 | 4.1 + -2 | 3.141592653589793 | 4.1 + -3 | 3.141592653589793 | 4.1 + -4 | 3.141592653589793 | 4.1 +(6 rows) + +-- select floor with order by (explain) +--Testcase 774: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by floor(1-(fields->>'value1')::float); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (floor(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (floor(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, floor(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select floor with order by (result) +--Testcase 775: +SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by floor(1-(fields->>'value1')::float); + value1 | floor +--------+------- + 3.3 | -3 + 2.2 | -2 + 1.1 | -1 + 0.1 | 0 + 0.2 | 0 + 0.3 | 0 +(6 rows) + +-- select floor with order by index (result) +--Testcase 776: +SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by 2,1; + value1 | floor +--------+------- + 3.3 | -3 + 2.2 | -2 + 1.1 | -1 + 0.1 | 0 + 0.2 | 0 + 0.3 | 0 +(6 rows) + +-- select floor with order by index (result) +--Testcase 777: +SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by 1,2; + value1 | floor +--------+------- + 0.1 | 0 + 0.2 | 0 + 0.3 | 0 + 1.1 | -1 + 2.2 | -2 + 3.3 | -3 +(6 rows) + +-- select floor and as +--Testcase 778: +SELECT floor((fields->>'value3')::float) as floor1 FROM s3; + floor1 +-------- + -1 + -1 + -1 + -2 + -3 + -4 +(6 rows) + +-- select floor(*) (stub agg function, explain) +--Testcase 779: +EXPLAIN VERBOSE +SELECT floor_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: floor_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select floor(*) (stub agg function, result) +--Testcase 780: +SELECT floor_all() from s3; +ERROR: stub floor_all() is called +CONTEXT: PL/pgSQL function floor_all() line 3 at RAISE +-- select floor(*) (stub agg function and group by tag only) (explain) +--Testcase 781: +EXPLAIN VERBOSE +SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (floor_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT floor(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select floor(*) (stub agg function and group by tag only) (result) +--Testcase 782: +SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + floor_all +---------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-1\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1\",\"value2\" : \"200\",\"value3\" : \"-2\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2\",\"value2\" : \"200\",\"value3\" : \"-3\",\"value4\" : \"-200\" }") +(5 rows) + +-- select floor(*) (stub agg function, expose data, explain) +--Testcase 783: +EXPLAIN VERBOSE +SELECT (floor_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((floor_all())::s3)."time", ((floor_all())::s3).tags, ((floor_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select floor(*) (stub agg function, expose data, result) +--Testcase 784: +SELECT (floor_all()::s3).* from s3; +ERROR: stub floor_all() is called +CONTEXT: PL/pgSQL function floor_all() line 3 at RAISE +-- select ln (builtin function, explain) +--Testcase 785: +EXPLAIN VERBOSE +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1494.89 rows=1462 width=16) + Output: ln(((fields ->> 'value1'::text))::double precision), ln((((fields ->> 'value2'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(3 rows) + +-- select ln (builtin function, result) +--Testcase 786: +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3; + ln | ln +---------------------+------------------- + -2.3025850929940455 | 4.605170185988092 + -1.6094379124341003 | 4.605170185988092 + -1.2039728043259361 | 4.605170185988092 + 0.09531017980432493 | 5.298317366548036 + 0.7884573603642703 | 5.298317366548036 + 1.1939224684724346 | 5.298317366548036 +(6 rows) + +-- select ln (builtin function, not pushdown constraints, explain) +--Testcase 787: +EXPLAIN VERBOSE +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1487.74 rows=1455 width=16) + Output: ln(((fields ->> 'value1'::text))::double precision), ln((((fields ->> 'value2'::text))::bigint)::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(4 rows) + +-- select ln (builtin function, not pushdown constraints, result) +--Testcase 788: +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + ln | ln +---------------------+------------------- + 0.09531017980432493 | 5.298317366548036 + 0.7884573603642703 | 5.298317366548036 + 1.1939224684724346 | 5.298317366548036 +(3 rows) + +-- select ln (builtin function, pushdown constraints, explain) +--Testcase 789: +EXPLAIN VERBOSE +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1487.74 rows=1455 width=16) + Output: ln(((fields ->> 'value1'::text))::double precision), ln((((fields ->> 'value2'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select ln (builtin function, pushdown constraints, result) +--Testcase 790: +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + ln | ln +---------------------+------------------- + -2.3025850929940455 | 4.605170185988092 + -1.6094379124341003 | 4.605170185988092 + -1.2039728043259361 | 4.605170185988092 +(3 rows) + +-- select ln as nest function with agg (pushdown, explain) +--Testcase 791: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),ln(sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (ln(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), ln(sum("value3")) FROM "s3" +(3 rows) + +-- select ln as nest function with agg (pushdown, result) +--Testcase 792: +SELECT sum((fields->>'value3')::float),ln(sum((fields->>'value3')::float)) FROM s3; + sum | ln +--------------------+---- + -7.199999999999999 | +(1 row) + +-- select ln as nest with log2 (pushdown, explain) +--Testcase 793: +EXPLAIN VERBOSE +SELECT ln(log2((fields->>'value1')::float)),ln(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: ln(log2(((fields ->> 'value1'::text))::double precision)), ln(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select ln as nest with log2 (pushdown, result) +--Testcase 794: +SELECT ln(log2((fields->>'value1')::float)),ln(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select ln with non pushdown func and explicit constant (explain) +--Testcase 795: +EXPLAIN VERBOSE +SELECT ln((fields->>'value3')::float), pi(), 4.1 FROM s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: ln(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select ln with non pushdown func and explicit constant (result) +--Testcase 796: +SELECT ln((fields->>'value3')::float), pi(), 4.1 FROM s3; +ERROR: cannot take logarithm of a negative number +-- select ln with order by (explain) +--Testcase 797: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by ln(1-(fields->>'value1')::float); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------ + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (ln(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (ln(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, ln(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select ln with order by (result) +--Testcase 798: +SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by ln(1-(fields->>'value1')::float); +ERROR: cannot take logarithm of a negative number +-- select ln with order by index (result) +--Testcase 799: +SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by 2,1; +ERROR: cannot take logarithm of a negative number +-- select ln with order by index (result) +--Testcase 800: +SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by 1,2; +ERROR: cannot take logarithm of a negative number +-- select ln and as +--Testcase 801: +SELECT ln((fields->>'value1')::float) as ln1 FROM s3; + ln1 +--------------------- + -2.3025850929940455 + -1.6094379124341003 + -1.2039728043259361 + 0.09531017980432493 + 0.7884573603642703 + 1.1939224684724346 +(6 rows) + +-- select ln(*) (stub agg function, explain) +--Testcase 802: +EXPLAIN VERBOSE +SELECT ln_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: ln_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select ln(*) (stub agg function, result) +--Testcase 803: +SELECT ln_all() from s3; +ERROR: stub ln_all() is called +CONTEXT: PL/pgSQL function ln_all() line 3 at RAISE +-- select ln(*) (stub agg function and group by tag only) (explain) +--Testcase 804: +EXPLAIN VERBOSE +SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (ln_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT ln(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select ln(*) (stub agg function and group by tag only) (result) +--Testcase 805: +SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + ln_all +------------------------------------------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,"{\"value1\" : \"-2.3025850929940455\",\"value2\" : \"4.605170185988092\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"-1.6094379124341003\",\"value2\" : \"4.605170185988092\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"-1.2039728043259361\",\"value2\" : \"4.605170185988092\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.09531017980432493\",\"value2\" : \"5.298317366548036\",\"value3\" : null,\"value4\" : null }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.7884573603642703\",\"value2\" : \"5.298317366548036\",\"value3\" : null,\"value4\" : null }") +(5 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 806: +SELECT ln_all(), floor_all() FROM s3; +ERROR: stub ln_all() is called +CONTEXT: PL/pgSQL function ln_all() line 3 at RAISE +-- select pow (builtin function, explain) +--Testcase 807: +EXPLAIN VERBOSE +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1527.79 rows=1462 width=32) + Output: pow(((fields ->> 'value1'::text))::double precision, '2'::double precision), pow((((fields ->> 'value2'::text))::bigint)::double precision, '2'::double precision), pow(((fields ->> 'value3'::text))::double precision, '2'::double precision), pow((((fields ->> 'value4'::text))::bigint)::double precision, '2'::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select pow (builtin function, result) +--Testcase 808: +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3; + pow | pow | pow | pow +----------------------+-------+----------------------+------- + 0.010000000000000002 | 10000 | 0.010000000000000002 | 10000 + 0.04000000000000001 | 10000 | 0.04000000000000001 | 10000 + 0.09 | 10000 | 0.09 | 10000 + 1.2100000000000002 | 40000 | 1.2100000000000002 | 40000 + 4.840000000000001 | 40000 | 4.840000000000001 | 40000 + 10.889999999999999 | 40000 | 10.889999999999999 | 40000 +(6 rows) + +-- select pow (builtin function, not pushdown constraints, explain) +--Testcase 809: +EXPLAIN VERBOSE +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: pow(((fields ->> 'value1'::text))::double precision, '2'::double precision), pow((((fields ->> 'value2'::text))::bigint)::double precision, '2'::double precision), pow(((fields ->> 'value3'::text))::double precision, '2'::double precision), pow((((fields ->> 'value4'::text))::bigint)::double precision, '2'::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select pow (builtin function, not pushdown constraints, result) +--Testcase 810: +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + pow | pow | pow | pow +--------------------+-------+--------------------+------- + 1.2100000000000002 | 40000 | 1.2100000000000002 | 40000 + 4.840000000000001 | 40000 | 4.840000000000001 | 40000 + 10.889999999999999 | 40000 | 10.889999999999999 | 40000 +(3 rows) + +-- select pow (builtin function, pushdown constraints, explain) +--Testcase 811: +EXPLAIN VERBOSE +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: pow(((fields ->> 'value1'::text))::double precision, '2'::double precision), pow((((fields ->> 'value2'::text))::bigint)::double precision, '2'::double precision), pow(((fields ->> 'value3'::text))::double precision, '2'::double precision), pow((((fields ->> 'value4'::text))::bigint)::double precision, '2'::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select pow (builtin function, pushdown constraints, result) +--Testcase 812: +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE (fields->>'value2')::bigint != 200; + pow | pow | pow | pow +----------------------+-------+----------------------+------- + 0.010000000000000002 | 10000 | 0.010000000000000002 | 10000 + 0.04000000000000001 | 10000 | 0.04000000000000001 | 10000 + 0.09 | 10000 | 0.09 | 10000 +(3 rows) + +-- select pow as nest function with agg (pushdown, explain) +--Testcase 813: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),pow(sum((fields->>'value3')::float), 2) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (pow(sum(((fields ->> 'value3'::text))::double precision), '2'::double precision)) + InfluxDB query: SELECT sum("value3"), pow(sum("value3"), 2) FROM "s3" +(3 rows) + +-- select pow as nest function with agg (pushdown, result) +--Testcase 814: +SELECT sum((fields->>'value3')::float),pow(sum((fields->>'value3')::float), 2) FROM s3; + sum | pow +--------------------+------------------- + -7.199999999999999 | 51.83999999999999 +(1 row) + +-- select pow as nest with log2 (pushdown, explain) +--Testcase 815: +EXPLAIN VERBOSE +SELECT pow(log2((fields->>'value1')::float), 2),pow(log2(1/(fields->>'value1')::float), 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: pow(log2(((fields ->> 'value1'::text))::double precision), '2'::double precision), pow(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision)), '2'::double precision) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select pow as nest with log2 (pushdown, result) +--Testcase 816: +SELECT pow(log2((fields->>'value1')::float), 2),pow(log2(1/(fields->>'value1')::float), 2) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select pow with non pushdown func and explicit constant (explain) +--Testcase 817: +EXPLAIN VERBOSE +SELECT pow((fields->>'value3')::float, 2), pi(), 4.1 FROM s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: pow(((fields ->> 'value3'::text))::double precision, '2'::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select pow with non pushdown func and explicit constant (result) +--Testcase 818: +SELECT pow((fields->>'value3')::float, 2), pi(), 4.1 FROM s3; + pow | pi | ?column? +----------------------+-------------------+---------- + 0.010000000000000002 | 3.141592653589793 | 4.1 + 0.04000000000000001 | 3.141592653589793 | 4.1 + 0.09 | 3.141592653589793 | 4.1 + 1.2100000000000002 | 3.141592653589793 | 4.1 + 4.840000000000001 | 3.141592653589793 | 4.1 + 10.889999999999999 | 3.141592653589793 | 4.1 +(6 rows) + +-- select pow with order by (explain) +--Testcase 819: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by pow(1-(fields->>'value1')::float, 2); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (pow(('1'::double precision - ((fields ->> 'value1'::text))::double precision), '2'::double precision)) + Sort Key: (pow(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision), '2'::double precision)) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, pow(('1'::double precision - ((fields ->> 'value1'::text))::double precision), '2'::double precision) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select pow with order by (result) +--Testcase 820: +SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by pow(1-(fields->>'value1')::float, 2); + value1 | pow +--------+---------------------- + 1.1 | 0.010000000000000018 + 0.3 | 0.48999999999999994 + 0.2 | 0.6400000000000001 + 0.1 | 0.81 + 2.2 | 1.4400000000000004 + 3.3 | 5.289999999999999 +(6 rows) + +-- select pow with order by index (result) +--Testcase 821: +SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by 2,1; + value1 | pow +--------+---------------------- + 1.1 | 0.010000000000000018 + 0.3 | 0.48999999999999994 + 0.2 | 0.6400000000000001 + 0.1 | 0.81 + 2.2 | 1.4400000000000004 + 3.3 | 5.289999999999999 +(6 rows) + +-- select pow with order by index (result) +--Testcase 822: +SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by 1,2; + value1 | pow +--------+---------------------- + 0.1 | 0.81 + 0.2 | 0.6400000000000001 + 0.3 | 0.48999999999999994 + 1.1 | 0.010000000000000018 + 2.2 | 1.4400000000000004 + 3.3 | 5.289999999999999 +(6 rows) + +-- select pow and as +--Testcase 823: +SELECT pow((fields->>'value3')::float, 2) as pow1 FROM s3; + pow1 +---------------------- + 0.010000000000000002 + 0.04000000000000001 + 0.09 + 1.2100000000000002 + 4.840000000000001 + 10.889999999999999 +(6 rows) + +-- select pow_all(2) (stub agg function, explain) +--Testcase 824: +EXPLAIN VERBOSE +SELECT pow_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: pow_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select pow_all(2) (stub agg function, result) +--Testcase 825: +SELECT pow_all(2) from s3; +ERROR: stub pow_all(int) is called +CONTEXT: PL/pgSQL function pow_all(integer) line 3 at RAISE +-- select pow_all(2) (stub agg function and group by tag only) (explain) +--Testcase 826: +EXPLAIN VERBOSE +SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (pow_all(2)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT pow(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select pow_all(2) (stub agg function and group by tag only) (result) +--Testcase 827: +SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + pow_all +-------------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.010000000000000002\",\"value2\" : \"10000\",\"value3\" : \"0.010000000000000002\",\"value4\" : \"10000\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.04000000000000001\",\"value2\" : \"10000\",\"value3\" : \"0.04000000000000001\",\"value4\" : \"10000\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.09\",\"value2\" : \"10000\",\"value3\" : \"0.09\",\"value4\" : \"10000\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.2100000000000002\",\"value2\" : \"40000\",\"value3\" : \"1.2100000000000002\",\"value4\" : \"40000\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"4.840000000000001\",\"value2\" : \"40000\",\"value3\" : \"4.840000000000001\",\"value4\" : \"40000\" }") +(5 rows) + +-- select pow_all(2) (stub agg function, expose data, explain) +--Testcase 828: +EXPLAIN VERBOSE +SELECT (pow_all(2)::s3).* from s3; + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((pow_all(2))::s3)."time", ((pow_all(2))::s3).tags, ((pow_all(2))::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select pow_all(2) (stub agg function, expose data, result) +--Testcase 829: +SELECT (pow_all(2)::s3).* from s3; +ERROR: stub pow_all(int) is called +CONTEXT: PL/pgSQL function pow_all(integer) line 3 at RAISE +-- select round (builtin function, explain) +--Testcase 830: +EXPLAIN VERBOSE +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1527.79 rows=1462 width=32) + Output: round(((fields ->> 'value1'::text))::double precision), round((((fields ->> 'value2'::text))::bigint)::double precision), round(((fields ->> 'value3'::text))::double precision), round((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select round (builtin function, result) +--Testcase 831: +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3; + round | round | round | round +-------+-------+-------+------- + 0 | 100 | -0 | -100 + 0 | 100 | -0 | -100 + 0 | 100 | -0 | -100 + 1 | 200 | -1 | -200 + 2 | 200 | -2 | -200 + 3 | 200 | -3 | -200 +(6 rows) + +-- select round (builtin function, not pushdown constraints, explain) +--Testcase 832: +EXPLAIN VERBOSE +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: round(((fields ->> 'value1'::text))::double precision), round((((fields ->> 'value2'::text))::bigint)::double precision), round(((fields ->> 'value3'::text))::double precision), round((((fields ->> 'value4'::text))::bigint)::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select round (builtin function, not pushdown constraints, result) +--Testcase 833: +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + round | round | round | round +-------+-------+-------+------- + 1 | 200 | -1 | -200 + 2 | 200 | -2 | -200 + 3 | 200 | -3 | -200 +(3 rows) + +-- select round (builtin function, pushdown constraints, explain) +--Testcase 834: +EXPLAIN VERBOSE +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: round(((fields ->> 'value1'::text))::double precision), round((((fields ->> 'value2'::text))::bigint)::double precision), round(((fields ->> 'value3'::text))::double precision), round((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select round (builtin function, pushdown constraints, result) +--Testcase 835: +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + round | round | round | round +-------+-------+-------+------- + 0 | 100 | -0 | -100 + 0 | 100 | -0 | -100 + 0 | 100 | -0 | -100 +(3 rows) + +-- select round as nest function with agg (pushdown, explain) +--Testcase 836: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),round(sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (round(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), round(sum("value3")) FROM "s3" +(3 rows) + +-- select round as nest function with agg (pushdown, result) +--Testcase 837: +SELECT sum((fields->>'value3')::float),round(sum((fields->>'value3')::float)) FROM s3; + sum | round +--------------------+------- + -7.199999999999999 | -7 +(1 row) + +-- select round as nest with log2 (pushdown, explain) +--Testcase 838: +EXPLAIN VERBOSE +SELECT round(log2((fields->>'value1')::float)),round(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: round(log2(((fields ->> 'value1'::text))::double precision)), round(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select round as nest with log2 (pushdown, result) +--Testcase 839: +SELECT round(log2((fields->>'value1')::float)),round(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select round with non pushdown func and roundlicit constant (explain) +--Testcase 840: +EXPLAIN VERBOSE +SELECT round((fields->>'value3')::float), pi(), 4.1 FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: round(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select round with non pushdown func and roundlicit constant (result) +--Testcase 841: +SELECT round((fields->>'value3')::float), pi(), 4.1 FROM s3; + round | pi | ?column? +-------+-------------------+---------- + -0 | 3.141592653589793 | 4.1 + -0 | 3.141592653589793 | 4.1 + -0 | 3.141592653589793 | 4.1 + -1 | 3.141592653589793 | 4.1 + -2 | 3.141592653589793 | 4.1 + -3 | 3.141592653589793 | 4.1 +(6 rows) + +-- select round with order by (explain) +--Testcase 842: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by round(1-(fields->>'value1')::float); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (round(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (round(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, round(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select round with order by (result) +--Testcase 843: +SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by round(1-(fields->>'value1')::float); + value1 | round +--------+------- + 3.3 | -2 + 2.2 | -1 + 1.1 | -0 + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 +(6 rows) + +-- select round with order by index (result) +--Testcase 844: +SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by 2,1; + value1 | round +--------+------- + 3.3 | -2 + 2.2 | -1 + 1.1 | -0 + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 +(6 rows) + +-- select round with order by index (result) +--Testcase 845: +SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by 1,2; + value1 | round +--------+------- + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 + 1.1 | -0 + 2.2 | -1 + 3.3 | -2 +(6 rows) + +-- select round and as +--Testcase 846: +SELECT round((fields->>'value3')::float) as round1 FROM s3; + round1 +-------- + -0 + -0 + -0 + -1 + -2 + -3 +(6 rows) + +-- select round(*) (stub agg function, explain) +--Testcase 847: +EXPLAIN VERBOSE +SELECT round_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: round_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select round(*) (stub agg function, result) +--Testcase 848: +SELECT round_all() from s3; +ERROR: stub round_all() is called +CONTEXT: PL/pgSQL function round_all() line 3 at RAISE +-- select round(*) (stub agg function and group by tag only) (explain) +--Testcase 849: +EXPLAIN VERBOSE +SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (round_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT round(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select round(*) (stub agg function and group by tag only) (result) +--Testcase 850: +SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + round_all +---------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"100\",\"value3\" : \"-0\",\"value4\" : \"-100\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1\",\"value2\" : \"200\",\"value3\" : \"-1\",\"value4\" : \"-200\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"2\",\"value2\" : \"200\",\"value3\" : \"-2\",\"value4\" : \"-200\" }") +(5 rows) + +-- select round(*) (stub agg function, expose data, explain) +--Testcase 851: +EXPLAIN VERBOSE +SELECT (round_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..6023.94 rows=3413 width=72) + Output: ((round_all())::s3)."time", ((round_all())::s3).tags, ((round_all())::s3).fields + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select round(*) (stub agg function, expose data, result) +--Testcase 852: +SELECT (round_all()::s3).* from s3; +ERROR: stub round_all() is called +CONTEXT: PL/pgSQL function round_all() line 3 at RAISE +-- select sin (builtin function, explain) +--Testcase 853: +EXPLAIN VERBOSE +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1527.79 rows=1462 width=32) + Output: sin(((fields ->> 'value1'::text))::double precision), sin((((fields ->> 'value2'::text))::bigint)::double precision), sin(((fields ->> 'value3'::text))::double precision), sin((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select sin (builtin function, result) +--Testcase 854: +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3; + sin | sin | sin | sin +---------------------+---------------------+----------------------+-------------------- + 0.09983341664682815 | -0.5063656411097588 | -0.09983341664682815 | 0.5063656411097588 + 0.19866933079506122 | -0.5063656411097588 | -0.19866933079506122 | 0.5063656411097588 + 0.29552020666133955 | -0.5063656411097588 | -0.29552020666133955 | 0.5063656411097588 + 0.8912073600614354 | -0.8732972972139946 | -0.8912073600614354 | 0.8732972972139946 + 0.8084964038195901 | -0.8732972972139946 | -0.8084964038195901 | 0.8732972972139946 + -0.1577456941432482 | -0.8732972972139946 | 0.1577456941432482 | 0.8732972972139946 +(6 rows) + +-- select sin (builtin function, not pushdown constraints, explain) +--Testcase 855: +EXPLAIN VERBOSE +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: sin(((fields ->> 'value1'::text))::double precision), sin((((fields ->> 'value2'::text))::bigint)::double precision), sin(((fields ->> 'value3'::text))::double precision), sin((((fields ->> 'value4'::text))::bigint)::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select sin (builtin function, not pushdown constraints, result) +--Testcase 856: +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + sin | sin | sin | sin +---------------------+---------------------+---------------------+-------------------- + 0.8912073600614354 | -0.8732972972139946 | -0.8912073600614354 | 0.8732972972139946 + 0.8084964038195901 | -0.8732972972139946 | -0.8084964038195901 | 0.8732972972139946 + -0.1577456941432482 | -0.8732972972139946 | 0.1577456941432482 | 0.8732972972139946 +(3 rows) + +-- select sin (builtin function, pushdown constraints, explain) +--Testcase 857: +EXPLAIN VERBOSE +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: sin(((fields ->> 'value1'::text))::double precision), sin((((fields ->> 'value2'::text))::bigint)::double precision), sin(((fields ->> 'value3'::text))::double precision), sin((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select sin (builtin function, pushdown constraints, result) +--Testcase 858: +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + sin | sin | sin | sin +---------------------+---------------------+----------------------+-------------------- + 0.09983341664682815 | -0.5063656411097588 | -0.09983341664682815 | 0.5063656411097588 + 0.19866933079506122 | -0.5063656411097588 | -0.19866933079506122 | 0.5063656411097588 + 0.29552020666133955 | -0.5063656411097588 | -0.29552020666133955 | 0.5063656411097588 +(3 rows) + +-- select sin as nest function with agg (pushdown, explain) +--Testcase 859: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),sin(sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (sin(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), sin(sum("value3")) FROM "s3" +(3 rows) + +-- select sin as nest function with agg (pushdown, result) +--Testcase 860: +SELECT sum((fields->>'value3')::float),sin(sum((fields->>'value3')::float)) FROM s3; + sum | sin +--------------------+--------------------- + -7.199999999999999 | -0.7936678638491526 +(1 row) + +-- select sin as nest with log2 (pushdown, explain) +--Testcase 861: +EXPLAIN VERBOSE +SELECT sin(log2((fields->>'value1')::float)),sin(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: sin(log2(((fields ->> 'value1'::text))::double precision)), sin(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select sin as nest with log2 (pushdown, result) +--Testcase 862: +SELECT sin(log2((fields->>'value1')::float)),sin(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select sin with non pushdown func and explicit constant (explain) +--Testcase 863: +EXPLAIN VERBOSE +SELECT sin((fields->>'value3')::float), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: sin(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select sin with non pushdown func and explicit constant (result) +--Testcase 864: +SELECT sin((fields->>'value3')::float), pi(), 4.1 FROM s3; + sin | pi | ?column? +----------------------+-------------------+---------- + -0.09983341664682815 | 3.141592653589793 | 4.1 + -0.19866933079506122 | 3.141592653589793 | 4.1 + -0.29552020666133955 | 3.141592653589793 | 4.1 + -0.8912073600614354 | 3.141592653589793 | 4.1 + -0.8084964038195901 | 3.141592653589793 | 4.1 + 0.1577456941432482 | 3.141592653589793 | 4.1 +(6 rows) + +-- select sin with order by (explain) +--Testcase 865: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by sin(1-(fields->>'value1')::float); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (sin(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (sin(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, sin(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select sin with order by (result) +--Testcase 866: +SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by sin(1-(fields->>'value1')::float); + value1 | sin +--------+---------------------- + 2.2 | -0.9320390859672264 + 3.3 | -0.7457052121767203 + 1.1 | -0.09983341664682824 + 0.3 | 0.644217687237691 + 0.2 | 0.7173560908995228 + 0.1 | 0.7833269096274834 +(6 rows) + +-- select sin with order by index (result) +--Testcase 867: +SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by 2,1; + value1 | sin +--------+---------------------- + 2.2 | -0.9320390859672264 + 3.3 | -0.7457052121767203 + 1.1 | -0.09983341664682824 + 0.3 | 0.644217687237691 + 0.2 | 0.7173560908995228 + 0.1 | 0.7833269096274834 +(6 rows) + +-- select sin with order by index (result) +--Testcase 868: +SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by 1,2; + value1 | sin +--------+---------------------- + 0.1 | 0.7833269096274834 + 0.2 | 0.7173560908995228 + 0.3 | 0.644217687237691 + 1.1 | -0.09983341664682824 + 2.2 | -0.9320390859672264 + 3.3 | -0.7457052121767203 +(6 rows) + +-- select sin and as +--Testcase 869: +SELECT sin((fields->>'value3')::float) as sin1 FROM s3; + sin1 +---------------------- + -0.09983341664682815 + -0.19866933079506122 + -0.29552020666133955 + -0.8912073600614354 + -0.8084964038195901 + 0.1577456941432482 +(6 rows) + +-- select sin(*) (stub agg function, explain) +--Testcase 870: +EXPLAIN VERBOSE +SELECT sin_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: sin_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sin(*) (stub agg function, result) +--Testcase 871: +SELECT sin_all() from s3; +ERROR: stub sin_all() is called +CONTEXT: PL/pgSQL function sin_all() line 3 at RAISE +-- select sin(*) (stub agg function and group by tag only) (explain) +--Testcase 872: +EXPLAIN VERBOSE +SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (sin_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT sin(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select sin(*) (stub agg function and group by tag only) (result) +--Testcase 873: +SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + sin_all +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.09983341664682815\",\"value2\" : \"-0.5063656411097588\",\"value3\" : \"-0.09983341664682815\",\"value4\" : \"0.5063656411097588\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.19866933079506122\",\"value2\" : \"-0.5063656411097588\",\"value3\" : \"-0.19866933079506122\",\"value4\" : \"0.5063656411097588\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.29552020666133955\",\"value2\" : \"-0.5063656411097588\",\"value3\" : \"-0.29552020666133955\",\"value4\" : \"0.5063656411097588\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"0.8912073600614354\",\"value2\" : \"-0.8732972972139945\",\"value3\" : \"-0.8912073600614354\",\"value4\" : \"0.8732972972139945\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"0.8084964038195901\",\"value2\" : \"-0.8732972972139945\",\"value3\" : \"-0.8084964038195901\",\"value4\" : \"0.8732972972139945\" }") +(5 rows) + +-- select tan (builtin function, explain) +--Testcase 874: +EXPLAIN VERBOSE +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1527.79 rows=1462 width=32) + Output: tan(((fields ->> 'value1'::text))::double precision), tan((((fields ->> 'value2'::text))::bigint)::double precision), tan(((fields ->> 'value3'::text))::double precision), tan((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select tan (builtin function, result) +--Testcase 875: +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3; + tan | tan | tan | tan +---------------------+---------------------+----------------------+-------------------- + 0.10033467208545055 | -0.5872139151569291 | -0.10033467208545055 | 0.5872139151569291 + 0.2027100355086725 | -0.5872139151569291 | -0.2027100355086725 | 0.5872139151569291 + 0.30933624960962325 | -0.5872139151569291 | -0.30933624960962325 | 0.5872139151569291 + 1.9647596572486523 | -1.7925274837903817 | -1.9647596572486523 | 1.7925274837903817 + -1.3738230567687946 | -1.7925274837903817 | 1.3738230567687946 | 1.7925274837903817 + 0.15974574766003222 | -1.7925274837903817 | -0.15974574766003222 | 1.7925274837903817 +(6 rows) + +-- select tan (builtin function, not pushdown constraints, explain) +--Testcase 876: +EXPLAIN VERBOSE +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: tan(((fields ->> 'value1'::text))::double precision), tan((((fields ->> 'value2'::text))::bigint)::double precision), tan(((fields ->> 'value3'::text))::double precision), tan((((fields ->> 'value4'::text))::bigint)::double precision) + Filter: (to_hex(((s3.fields ->> 'value2'::text))::bigint) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select tan (builtin function, not pushdown constraints, result) +--Testcase 877: +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + tan | tan | tan | tan +---------------------+---------------------+----------------------+-------------------- + 1.9647596572486523 | -1.7925274837903817 | -1.9647596572486523 | 1.7925274837903817 + -1.3738230567687946 | -1.7925274837903817 | 1.3738230567687946 | 1.7925274837903817 + 0.15974574766003222 | -1.7925274837903817 | -0.15974574766003222 | 1.7925274837903817 +(3 rows) + +-- select tan (builtin function, pushdown constraints, explain) +--Testcase 878: +EXPLAIN VERBOSE +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1520.47 rows=1455 width=32) + Output: tan(((fields ->> 'value1'::text))::double precision), tan((((fields ->> 'value2'::text))::bigint)::double precision), tan(((fields ->> 'value3'::text))::double precision), tan((((fields ->> 'value4'::text))::bigint)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select tan (builtin function, pushdown constraints, result) +--Testcase 879: +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + tan | tan | tan | tan +---------------------+---------------------+----------------------+-------------------- + 0.10033467208545055 | -0.5872139151569291 | -0.10033467208545055 | 0.5872139151569291 + 0.2027100355086725 | -0.5872139151569291 | -0.2027100355086725 | 0.5872139151569291 + 0.30933624960962325 | -0.5872139151569291 | -0.30933624960962325 | 0.5872139151569291 +(3 rows) + +-- select tan as nest function with agg (pushdown, explain) +--Testcase 880: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),tan(sum((fields->>'value3')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(((fields ->> 'value3'::text))::double precision)), (tan(sum(((fields ->> 'value3'::text))::double precision))) + InfluxDB query: SELECT sum("value3"), tan(sum("value3")) FROM "s3" +(3 rows) + +-- select tan as nest function with agg (pushdown, result) +--Testcase 881: +SELECT sum((fields->>'value3')::float),tan(sum((fields->>'value3')::float)) FROM s3; + sum | tan +--------------------+--------------------- + -7.199999999999999 | -1.3046209400556357 +(1 row) + +-- select tan as nest with log2 (pushdown, explain) +--Testcase 882: +EXPLAIN VERBOSE +SELECT tan(log2((fields->>'value1')::float)),tan(log2(1/(fields->>'value1')::float)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2225.89 rows=1462 width=16) + Output: tan(log2(((fields ->> 'value1'::text))::double precision)), tan(log2(('1'::double precision / ((fields ->> 'value1'::text))::double precision))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select tan as nest with log2 (pushdown, result) +--Testcase 883: +SELECT tan(log2((fields->>'value1')::float)),tan(log2(1/(fields->>'value1')::float)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select tan with non pushdown func and tanlicit constant (explain) +--Testcase 884: +EXPLAIN VERBOSE +SELECT tan((fields->>'value3')::float), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=48) + Output: tan(((fields ->> 'value3'::text))::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select tan with non pushdown func and tanlicit constant (result) +--Testcase 885: +SELECT tan((fields->>'value3')::float), pi(), 4.1 FROM s3; + tan | pi | ?column? +----------------------+-------------------+---------- + -0.10033467208545055 | 3.141592653589793 | 4.1 + -0.2027100355086725 | 3.141592653589793 | 4.1 + -0.30933624960962325 | 3.141592653589793 | 4.1 + -1.9647596572486523 | 3.141592653589793 | 4.1 + 1.3738230567687946 | 3.141592653589793 | 4.1 + -0.15974574766003222 | 3.141592653589793 | 4.1 +(6 rows) + +-- select tan with order by (explain) +--Testcase 886: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by tan(1-(fields->>'value1')::float); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------- + Sort (cost=1568.10..1571.75 rows=1462 width=16) + Output: (((fields ->> 'value1'::text))::double precision), (tan(('1'::double precision - ((fields ->> 'value1'::text))::double precision))) + Sort Key: (tan(('1'::double precision - ((s3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=16) + Output: ((fields ->> 'value1'::text))::double precision, tan(('1'::double precision - ((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select tan with order by (result) +--Testcase 887: +SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by tan(1-(fields->>'value1')::float); + value1 | tan +--------+---------------------- + 2.2 | -2.57215162212632 + 1.1 | -0.10033467208545063 + 0.3 | 0.8422883804630794 + 0.2 | 1.0296385570503641 + 3.3 | 1.1192136417341325 + 0.1 | 1.2601582175503392 +(6 rows) + +-- select tan with order by index (result) +--Testcase 888: +SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by 2,1; + value1 | tan +--------+---------------------- + 2.2 | -2.57215162212632 + 1.1 | -0.10033467208545063 + 0.3 | 0.8422883804630794 + 0.2 | 1.0296385570503641 + 3.3 | 1.1192136417341325 + 0.1 | 1.2601582175503392 +(6 rows) + +-- select tan with order by index (result) +--Testcase 889: +SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by 1,2; + value1 | tan +--------+---------------------- + 0.1 | 1.2601582175503392 + 0.2 | 1.0296385570503641 + 0.3 | 0.8422883804630794 + 1.1 | -0.10033467208545063 + 2.2 | -2.57215162212632 + 3.3 | 1.1192136417341325 +(6 rows) + +-- select tan and as +--Testcase 890: +SELECT tan((fields->>'value3')::float) as tan1 FROM s3; + tan1 +---------------------- + -0.10033467208545055 + -0.2027100355086725 + -0.30933624960962325 + -1.9647596572486523 + 1.3738230567687946 + -0.15974574766003222 +(6 rows) + +-- select tan(*) (stub agg function, explain) +--Testcase 891: +EXPLAIN VERBOSE +SELECT tan_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: tan_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select tan(*) (stub agg function, result) +--Testcase 892: +SELECT tan_all() from s3; +ERROR: stub tan_all() is called +CONTEXT: PL/pgSQL function tan_all() line 3 at RAISE +-- select tan(*) (stub agg function and group by tag only) (explain) +--Testcase 893: +EXPLAIN VERBOSE +SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (tan_all()), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT tan(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select tan(*) (stub agg function and group by tag only) (result) +--Testcase 894: +SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + tan_all +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0.10033467208545055\",\"value2\" : \"-0.587213915156929\",\"value3\" : \"-0.10033467208545055\",\"value4\" : \"0.587213915156929\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0.2027100355086725\",\"value2\" : \"-0.587213915156929\",\"value3\" : \"-0.2027100355086725\",\"value4\" : \"0.587213915156929\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0.30933624960962325\",\"value2\" : \"-0.587213915156929\",\"value3\" : \"-0.30933624960962325\",\"value4\" : \"0.587213915156929\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1.9647596572486523\",\"value2\" : \"-1.7925274837903817\",\"value3\" : \"-1.9647596572486523\",\"value4\" : \"1.7925274837903817\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"-1.3738230567687948\",\"value2\" : \"-1.7925274837903817\",\"value3\" : \"1.3738230567687948\",\"value4\" : \"1.7925274837903817\" }") +(5 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 895: +SELECT sin_all(), round_all(), tan_all() FROM s3; +ERROR: stub sin_all() is called +CONTEXT: PL/pgSQL function sin_all() line 3 at RAISE +-- select predictors function holt_winters() (explain) +--Testcase 896: +EXPLAIN VERBOSE +SELECT holt_winters(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (holt_winters(min(((fields ->> 'value1'::text))::double precision), 5, 1)), (influx_time("time", '@ 1 sec'::interval)) + InfluxDB query: SELECT holt_winters(min("value1"), 5, 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)) +(3 rows) + +-- select predictors function holt_winters() (result) +--Testcase 897: +SELECT holt_winters(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + holt_winters +-------------------- + 5.187460065608529 + 13.293330784570104 + 37.584774262501654 + 116.55752059657874 + 392.43117130749647 +(5 rows) + +-- select predictors function holt_winters_with_fit() (explain) +--Testcase 898: +EXPLAIN VERBOSE +SELECT holt_winters_with_fit(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (holt_winters_with_fit(min(((fields ->> 'value1'::text))::double precision), 5, 1)), (influx_time("time", '@ 1 sec'::interval)) + InfluxDB query: SELECT holt_winters_with_fit(min("value1"), 5, 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)) +(3 rows) + +-- select predictors function holt_winters_with_fit() (result) +--Testcase 899: +SELECT holt_winters_with_fit(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + holt_winters_with_fit +----------------------- + 0.1 + 0.14656936198258175 + 0.44929718992786366 + 1.0087607138536199 + 2.218941363096379 + 5.187460065608529 + 13.293330784570104 + 37.584774262501654 + 116.55752059657874 + 392.43117130749647 +(10 rows) + +-- select count(*) function of InfluxDB (stub agg function, explain) +--Testcase 900: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_count_all(*)) + InfluxDB query: SELECT count(*) FROM "s3" +(3 rows) + +-- select count(*) function of InfluxDB (stub agg function, result) +--Testcase 901: +SELECT influx_count_all(*) FROM s3; + influx_count_all +---------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"6\",\"value2\" : \"6\",\"value3\" : \"6\",\"value4\" : \"6\" }") +(1 row) + +-- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (explain) +--Testcase 902: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_count_all(*)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT count(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (result) +--Testcase 903: +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_count_all +---------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:01Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:02Z,,"{\"value1\" : \"0\",\"value2\" : \"0\",\"value3\" : \"0\",\"value4\" : \"0\" }") + (1970-01-01T00:00:03Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") + (1970-01-01T00:00:04Z,,"{\"value1\" : \"1\",\"value2\" : \"1\",\"value3\" : \"1\",\"value4\" : \"1\" }") +(10 rows) + +-- select count(*) function of InfluxDB (stub agg function and group by tag only) (explain) +--Testcase 904: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_count_all(*)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT count(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select count(*) function of InfluxDB (stub agg function and group by tag only) (result) +--Testcase 905: +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + influx_count_all +---------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,"{\"value1\" : \"3\",\"value2\" : \"3\",\"value3\" : \"3\",\"value4\" : \"3\" }") + (1970-01-01T00:00:00Z,,"{\"value1\" : \"2\",\"value2\" : \"2\",\"value3\" : \"2\",\"value4\" : \"2\" }") +(2 rows) + +-- select count(*) function of InfluxDB over join query (explain) +--Testcase 906: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + QUERY PLAN +------------------------------------------------------------------------------------ + Aggregate (cost=26.88..26.89 rows=1 width=32) + Output: influx_count_all(*) + -> Nested Loop (cost=20.00..14.63 rows=49 width=0) + -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..7.04 rows=7 width=32) + Output: t2.fields + -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) + Output: t2.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) +(11 rows) + +-- select count(*) function of InfluxDB over join query (result, stub call error) +--Testcase 907: +SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; +ERROR: stub influx_count_all_sfunc(text) is called +CONTEXT: PL/pgSQL function influx_count_all_sfunc(text) line 3 at RAISE +-- select distinct (stub agg function, explain) +--Testcase 908: +EXPLAIN VERBOSE +SELECT influx_distinct((fields->>'value1')::float) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=8) + Output: (influx_distinct(((fields ->> 'value1'::text))::double precision)) + InfluxDB query: SELECT distinct("value1") FROM "s3" +(3 rows) + +-- select distinct (stub agg function, result) +--Testcase 909: +SELECT influx_distinct((fields->>'value1')::float) FROM s3; + influx_distinct +----------------- + 0.1 + 0.2 + 0.3 + 1.1 + 2.2 + 3.3 +(6 rows) + +-- select distinct (stub agg function and group by influx_time() and tag) (explain) +--Testcase 910: +EXPLAIN VERBOSE +SELECT influx_distinct((fields->>'value1')::float), influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (influx_distinct(((fields ->> 'value1'::text))::double precision)), (influx_time("time", '@ 1 sec'::interval)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT distinct("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), ("tag1") +(3 rows) + +-- select distinct (stub agg function and group by influx_time() and tag) (result) +--Testcase 911: +SELECT influx_distinct((fields->>'value1')::float), influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + influx_distinct | influx_time | tag1 +-----------------+------------------------+------ + 0.1 | 1970-01-01 09:00:00+09 | a + 0.2 | 1970-01-01 09:00:01+09 | a + 0.3 | 1970-01-01 09:00:02+09 | a + 1.1 | 1970-01-01 09:00:03+09 | b + 2.2 | 1970-01-01 09:00:04+09 | b +(5 rows) + +-- select distinct (stub agg function and group by tag only) (explain) +--Testcase 912: +EXPLAIN VERBOSE +SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (influx_distinct(((fields ->> 'value2'::text))::bigint)), ((tags ->> 'tag1'::text)) + InfluxDB query: SELECT distinct("value2") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY ("tag1") +(3 rows) + +-- select distinct (stub agg function and group by tag only) (result) +--Testcase 913: +SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + influx_distinct +----------------- + 100 + 200 +(2 rows) + +-- select distinct over join query (explain) +--Testcase 914: +EXPLAIN VERBOSE +SELECT influx_distinct((t1.fields->>'value2')::bigint) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + QUERY PLAN +------------------------------------------------------------------------------------ + Aggregate (cost=27.25..27.26 rows=1 width=8) + Output: influx_distinct(((t1.fields ->> 'value2'::text))::bigint) + -> Nested Loop (cost=20.00..14.63 rows=49 width=32) + Output: t1.fields + -> Foreign Scan on public.s3 t1 (cost=10.00..7.00 rows=7 width=32) + Output: t1."time", t1.tags, t1.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..7.04 rows=7 width=32) + Output: t2.fields + -> Foreign Scan on public.s3 t2 (cost=10.00..7.00 rows=7 width=32) + Output: t2.fields + InfluxDB query: SELECT * FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select distinct over join query (result, stub call error) +--Testcase 915: +SELECT influx_distinct((t1.fields->>'value2')::bigint) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; +ERROR: stub influx_distinct_sfunc(anyelement, anyelement) is called +CONTEXT: PL/pgSQL function influx_distinct_sfunc(anyelement,anyelement) line 3 at RAISE +-- select distinct with having (explain) +--Testcase 916: +EXPLAIN VERBOSE +SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 HAVING influx_distinct((fields->>'value2')::bigint) > 100; + QUERY PLAN +----------------------------------------------------------------------------- + Aggregate (cost=1838.47..1838.48 rows=1 width=8) + Output: influx_distinct(((fields ->> 'value2'::text))::bigint) + Filter: (influx_distinct(((s3.fields ->> 'value2'::text))::bigint) > 100) + -> Foreign Scan on public.s3 (cost=10.00..1462.00 rows=1462 width=32) + Output: "time", tags, fields + InfluxDB query: SELECT * FROM "s3" +(6 rows) + +-- select distinct with having (result, not pushdown, stub call error) +--Testcase 917: +SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 HAVING influx_distinct((fields->>'value2')::bigint) > 100; +ERROR: stub influx_distinct_sfunc(anyelement, anyelement) is called +CONTEXT: PL/pgSQL function influx_distinct_sfunc(anyelement,anyelement) line 3 at RAISE +--Testcase 918: +DROP FOREIGN TABLE s3; +--Testcase 919: +CREATE FOREIGN TABLE b3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 'b3', tags 'tag1', schemaless 'true'); +-- bool type var in where clause (result) +--Testcase 920: +EXPLAIN VERBOSE +SELECT sqrt(abs((fields->>'value1')::float)) FROM b3 WHERE (fields->>'value3')::boolean != true ORDER BY 1; + QUERY PLAN +----------------------------------------------------------------------------- + Sort (cost=774.91..776.74 rows=731 width=8) + Output: (sqrt(abs(((fields ->> 'value1'::text))::double precision))) + Sort Key: (sqrt(abs(((b3.fields ->> 'value1'::text))::double precision))) + -> Foreign Scan on public.b3 (cost=10.00..740.14 rows=731 width=8) + Output: sqrt(abs(((fields ->> 'value1'::text))::double precision)) + Filter: (NOT ((b3.fields ->> 'value3'::text))::boolean) + InfluxDB query: SELECT "value1", "value3" FROM "b3" +(7 rows) + +-- bool type var in where clause (result) +--Testcase 921: +SELECT sqrt(abs((fields->>'value1')::float)) FROM b3 WHERE (fields->>'value3')::boolean != true ORDER BY 1; + sqrt +-------------------- + 0.4472135954999579 + 1.0488088481701516 + 1.816590212458495 +(3 rows) + +--Testcase 922: +DROP FOREIGN TABLE b3; +--Testcase 923: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 924: +DROP SERVER server1; +--Testcase 925: +DROP EXTENSION influxdb_fdw; diff --git a/expected/15.0/selectfunc.out b/expected/15.0/selectfunc.out new file mode 100644 index 0000000..26e182d --- /dev/null +++ b/expected/15.0/selectfunc.out @@ -0,0 +1,9133 @@ +--Testcase 1: +SET datestyle=ISO; +--Testcase 2: +SET timezone='Japan'; +\set ECHO none +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb2', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); +--IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); +--Testcase 6: +CREATE FOREIGN TABLE s3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 float8, value4 bigint) SERVER server1 OPTIONS(table 's3', tags 'tag1'); +-- s3 (value1 as float8, value2 as bigint) +--Testcase 7: +\d s3; + Foreign table "public.s3" + Column | Type | Collation | Nullable | Default | FDW options +--------+--------------------------+-----------+----------+---------+------------- + time | timestamp with time zone | | | | + tag1 | text | | | | + value1 | double precision | | | | + value2 | bigint | | | | + value3 | double precision | | | | + value4 | bigint | | | | +Server: server1 +FDW options: ("table" 's3', tags 'tag1') + +--Testcase 8: +SELECT * FROM s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | a | 0.1 | 100 | -0.1 | -100 + 1970-01-01 09:00:01+09 | a | 0.2 | 100 | -0.2 | -100 + 1970-01-01 09:00:02+09 | a | 0.3 | 100 | -0.3 | -100 + 1970-01-01 09:00:03+09 | b | 1.1 | 200 | -1.1 | -200 + 1970-01-01 09:00:04+09 | b | 2.2 | 200 | -2.2 | -200 + 1970-01-01 09:00:05+09 | b | 3.3 | 200 | -3.3 | -200 +(6 rows) + +-- select float8() (not pushdown, remove float8, explain) +--Testcase 9: +EXPLAIN VERBOSE +SELECT float8(value1), float8(value2), float8(value3), float8(value4) FROM s3; + QUERY PLAN +--------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1469.31 rows=1462 width=32) + Output: value1, float8(value2), value3, float8(value4) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select float8() (not pushdown, remove float8, result) +--Testcase 10: +SELECT float8(value1), float8(value2), float8(value3), float8(value4) FROM s3; + float8 | float8 | float8 | float8 +--------+--------+--------+-------- + 0.1 | 100 | -0.1 | -100 + 0.2 | 100 | -0.2 | -100 + 0.3 | 100 | -0.3 | -100 + 1.1 | 200 | -1.1 | -200 + 2.2 | 200 | -2.2 | -200 + 3.3 | 200 | -3.3 | -200 +(6 rows) + +-- select sqrt (builtin function, explain) +--Testcase 11: +EXPLAIN VERBOSE +SELECT sqrt(value1), sqrt(value2) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2063.36 rows=2048 width=16) + Output: sqrt(value1), sqrt((value2)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(3 rows) + +-- select sqrt (builtin function, result) +--Testcase 12: +SELECT sqrt(value1), sqrt(value2) FROM s3; + sqrt | sqrt +---------------------+-------------------- + 0.31622776601683794 | 10 + 0.4472135954999579 | 10 + 0.5477225575051661 | 10 + 1.0488088481701516 | 14.142135623730951 + 1.4832396974191326 | 14.142135623730951 + 1.816590212458495 | 14.142135623730951 +(6 rows) + +-- select sqrt (builtin function, not pushdown constraints, explain) +--Testcase 13: +EXPLAIN VERBOSE +SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2053.28 rows=2038 width=16) + Output: sqrt(value1), sqrt((value2)::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(4 rows) + +-- select sqrt (builtin function, not pushdown constraints, result) +--Testcase 14: +SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE to_hex(value2) != '64'; + sqrt | sqrt +--------------------+-------------------- + 1.0488088481701516 | 14.142135623730951 + 1.4832396974191326 | 14.142135623730951 + 1.816590212458495 | 14.142135623730951 +(3 rows) + +-- select sqrt (builtin function, pushdown constraints, explain) +--Testcase 15: +EXPLAIN VERBOSE +SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE value2 != 200; + QUERY PLAN +--------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2053.28 rows=2038 width=16) + Output: sqrt(value1), sqrt((value2)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select sqrt (builtin function, pushdown constraints, result) +--Testcase 16: +SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE value2 != 200; + sqrt | sqrt +---------------------+------ + 0.31622776601683794 | 10 + 0.4472135954999579 | 10 + 0.5477225575051661 | 10 +(3 rows) + +-- select sqrt(*) (stub agg function, explain) +--Testcase 17: +EXPLAIN VERBOSE +SELECT sqrt_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: sqrt_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sqrt(*) (stub agg function, result) +--Testcase 18: +SELECT sqrt_all() from s3; +ERROR: stub sqrt_all() is called +CONTEXT: PL/pgSQL function sqrt_all() line 3 at RAISE +-- select sqrt(*) (stub agg function and group by tag only) (explain) +--Testcase 19: +EXPLAIN VERBOSE +SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (sqrt_all()), tag1 + InfluxDB query: SELECT sqrt(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select sqrt(*) (stub agg function and group by tag only) (result) +--Testcase 20: +SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + sqrt_all +----------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.31622776601683794,10,,) + (1970-01-01T00:00:01Z,,0.4472135954999579,10,,) + (1970-01-01T00:00:02Z,,0.5477225575051661,10,,) + (1970-01-01T00:00:03Z,,1.0488088481701516,14.142135623730951,,) + (1970-01-01T00:00:04Z,,1.4832396974191326,14.142135623730951,,) +(5 rows) + +-- select abs (builtin function, explain) +--Testcase 21: +EXPLAIN VERBOSE +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3; + QUERY PLAN +--------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.62 rows=1462 width=32) + Output: abs(value1), abs(value2), abs(value3), abs(value4) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- ABS() returns negative values if integer (https://github.com/influxdata/influxdb/issues/10261) +-- select abs (builtin function, result) +--Testcase 22: +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3; + abs | abs | abs | abs +-----+-----+-----+----- + 0.1 | 100 | 0.1 | 100 + 0.2 | 100 | 0.2 | 100 + 0.3 | 100 | 0.3 | 100 + 1.1 | 200 | 1.1 | 200 + 2.2 | 200 | 2.2 | 200 + 3.3 | 200 | 3.3 | 200 +(6 rows) + +-- select abs (builtin function, not pushdown constraints, explain) +--Testcase 23: +EXPLAIN VERBOSE +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +--------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1469.55 rows=1455 width=32) + Output: abs(value1), abs(value2), abs(value3), abs(value4) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select abs (builtin function, not pushdown constraints, result) +--Testcase 24: +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE to_hex(value2) != '64'; + abs | abs | abs | abs +-----+-----+-----+----- + 1.1 | 200 | 1.1 | 200 + 2.2 | 200 | 2.2 | 200 + 3.3 | 200 | 3.3 | 200 +(3 rows) + +-- select abs (builtin function, pushdown constraints, explain) +--Testcase 25: +EXPLAIN VERBOSE +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE value2 != 200; + QUERY PLAN +----------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1469.55 rows=1455 width=32) + Output: abs(value1), abs(value2), abs(value3), abs(value4) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select abs (builtin function, pushdown constraints, result) +--Testcase 26: +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE value2 != 200; + abs | abs | abs | abs +-----+-----+-----+----- + 0.1 | 100 | 0.1 | 100 + 0.2 | 100 | 0.2 | 100 + 0.3 | 100 | 0.3 | 100 +(3 rows) + +-- select log (builtin function, need to swap arguments, numeric cast, explain) +-- log_(v) : postgresql (base, v), influxdb (v, base) +--Testcase 27: +EXPLAIN VERBOSE +SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2053.28 rows=2038 width=32) + Output: log((value1)::numeric, (value2)::numeric) + InfluxDB query: SELECT "value1", "value2" FROM "s3" WHERE (("value1" <> 1)) +(3 rows) + +-- select log (builtin function, need to swap arguments, numeric cast, result) +--Testcase 28: +SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; + log +--------------------- + -2.0000000000000000 + -2.8613531161467861 + -3.8249785787863969 + 55.590256753535330 + 6.7198527566540755 + 4.4377398922117404 +(6 rows) + +-- select log (builtin function, need to swap arguments, float8, explain) +--Testcase 29: +EXPLAIN VERBOSE +SELECT log(value1::numeric, 0.1) FROM s3 WHERE value1 != 1; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2559.74 rows=2547 width=32) + Output: log((value1)::numeric, 0.1) + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" <> 1)) +(3 rows) + +-- select log (builtin function, need to swap arguments, float8, result) +--Testcase 30: +SELECT log(value1::numeric, 0.1) FROM s3 WHERE value1 != 1; + log +--------------------- + 1.0000000000000000 + 1.4306765580733931 + 1.9124892893931984 + -24.158857928096806 + -2.9203673004336506 + -1.9285884584617046 +(6 rows) + +-- select log (builtin function, need to swap arguments, bigint, explain) +--Testcase 31: +EXPLAIN VERBOSE +SELECT log(value2::numeric, 3::numeric) FROM s3 WHERE value1 != 1; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2559.74 rows=2547 width=32) + Output: log((value2)::numeric, '3'::numeric) + InfluxDB query: SELECT "value2" FROM "s3" WHERE (("value1" <> 1)) +(3 rows) + +-- select log (builtin function, need to swap arguments, bigint, result) +--Testcase 32: +SELECT log(value2::numeric, 3::numeric) FROM s3 WHERE value1 != 1; + log +-------------------- + 0.2385606273598312 + 0.2385606273598312 + 0.2385606273598312 + 0.2073511669203535 + 0.2073511669203535 + 0.2073511669203535 +(6 rows) + +-- select log (builtin function, need to swap arguments, mix type, explain) +--Testcase 33: +EXPLAIN VERBOSE +SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2053.28 rows=2038 width=32) + Output: log((value1)::numeric, (value2)::numeric) + InfluxDB query: SELECT "value1", "value2" FROM "s3" WHERE (("value1" <> 1)) +(3 rows) + +-- select log (builtin function, need to swap arguments, mix type, result) +--Testcase 34: +SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; + log +--------------------- + -2.0000000000000000 + -2.8613531161467861 + -3.8249785787863969 + 55.590256753535330 + 6.7198527566540755 + 4.4377398922117404 +(6 rows) + +-- select log(*) (stub agg function, explain) +--Testcase 35: +EXPLAIN VERBOSE +SELECT log_all(50) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: log_all('50'::double precision) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select log(*) (stub agg function, result) +--Testcase 36: +SELECT log_all(50) FROM s3; +ERROR: stub log_all(float8) is called +CONTEXT: PL/pgSQL function log_all(double precision) line 3 at RAISE +-- select log(*) (stub agg function, explain) +--Testcase 37: +EXPLAIN VERBOSE +SELECT log_all(70.5) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: log_all('70.5'::double precision) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select log(*) (stub agg function, result) +--Testcase 38: +SELECT log_all(70.5) FROM s3; +ERROR: stub log_all(float8) is called +CONTEXT: PL/pgSQL function log_all(double precision) line 3 at RAISE +-- select log(*) (stub agg function and group by tag only) (explain) +--Testcase 39: +EXPLAIN VERBOSE +SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (log_all('50'::double precision)), tag1 + InfluxDB query: SELECT log(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select log(*) (stub agg function and group by tag only) (result) +--Testcase 40: +SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + log_all +------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,-0.5885919100677789,1.177183820135558,,) + (1970-01-01T00:00:01Z,,-0.41140808993222105,1.177183820135558,,) + (1970-01-01T00:00:02Z,,-0.3077621994183976,1.177183820135558,,) + (1970-01-01T00:00:03Z,,0.024363399620113902,1.3543676402711158,,) + (1970-01-01T00:00:04Z,,0.20154721975567183,1.3543676402711158,,) +(5 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 41: +SELECT ln_all(),log10_all(),log_all(50) FROM s3; +ERROR: stub ln_all() is called +CONTEXT: PL/pgSQL function ln_all() line 3 at RAISE +-- select log2 (stub function, explain) +--Testcase 42: +EXPLAIN VERBOSE +SELECT log2(value1),log2(value2) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3077.12 rows=2048 width=16) + Output: log2(value1), log2((value2)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(3 rows) + +-- select log2 (stub function, result) +--Testcase 43: +SELECT log2(value1),log2(value2) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select log2(*) (stub agg function, explain) +--Testcase 44: +EXPLAIN VERBOSE +SELECT log2_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: log2_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select log2(*) (stub agg function, result) +--Testcase 45: +SELECT log2_all() from s3; +ERROR: stub log2_all() is called +CONTEXT: PL/pgSQL function log2_all() line 3 at RAISE +-- select log2(*) (stub agg function and group by tag only) (explain) +--Testcase 46: +EXPLAIN VERBOSE +SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (log2_all()), tag1 + InfluxDB query: SELECT log2(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select log2(*) (stub agg function and group by tag only) (result) +--Testcase 47: +SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + log2_all +----------------------------------------------------------------- + (1970-01-01T00:00:00Z,,-3.321928094887362,6.643856189774724,,) + (1970-01-01T00:00:01Z,,-2.321928094887362,6.643856189774724,,) + (1970-01-01T00:00:02Z,,-1.736965594166206,6.643856189774724,,) + (1970-01-01T00:00:03Z,,0.13750352374993502,7.643856189774724,,) + (1970-01-01T00:00:04Z,,1.1375035237499351,7.643856189774724,,) +(5 rows) + +-- select log10 (stub function, explain) +--Testcase 48: +EXPLAIN VERBOSE +SELECT log10(value1),log10(value2) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2063.36 rows=2048 width=16) + Output: log10(value1), log10((value2)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(3 rows) + +-- select log10 (stub function, result) +--Testcase 49: +SELECT log10(value1),log10(value2) FROM s3; + log10 | log10 +---------------------+-------------------- + -1 | 2 + -0.6989700043360187 | 2 + -0.5228787452803376 | 2 + 0.04139268515822507 | 2.3010299956639813 + 0.3424226808222063 | 2.3010299956639813 + 0.5185139398778874 | 2.3010299956639813 +(6 rows) + +-- select log10(*) (stub agg function, explain) +--Testcase 50: +EXPLAIN VERBOSE +SELECT log10_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: log10_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select log10(*) (stub agg function, result) +--Testcase 51: +SELECT log10_all() from s3; +ERROR: stub log10_all() is called +CONTEXT: PL/pgSQL function log10_all() line 3 at RAISE +-- select log10(*) (stub agg function and group by tag only) (explain) +--Testcase 52: +EXPLAIN VERBOSE +SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (log10_all()), tag1 + InfluxDB query: SELECT log10(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select log10(*) (stub agg function and group by tag only) (result) +--Testcase 53: +SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + log10_all +----------------------------------------------------------------- + (1970-01-01T00:00:00Z,,-0.9999999999999999,2,,) + (1970-01-01T00:00:01Z,,-0.6989700043360187,2,,) + (1970-01-01T00:00:02Z,,-0.5228787452803376,2,,) + (1970-01-01T00:00:03Z,,0.04139268515822507,2.301029995663981,,) + (1970-01-01T00:00:04Z,,0.3424226808222063,2.301029995663981,,) +(5 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 54: +SELECT log2_all(), log10_all() FROM s3; +ERROR: stub log2_all() is called +CONTEXT: PL/pgSQL function log2_all() line 3 at RAISE +-- select spread (stub agg function, explain) +--Testcase 55: +EXPLAIN VERBOSE +SELECT spread(value1),spread(value2),spread(value3),spread(value4) FROM s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (spread(value1)), (spread(value2)), (spread(value3)), (spread(value4)) + InfluxDB query: SELECT spread("value1"), spread("value2"), spread("value3"), spread("value4") FROM "s3" +(3 rows) + +-- select spread (stub agg function, result) +--Testcase 56: +SELECT spread(value1),spread(value2),spread(value3),spread(value4) FROM s3; + spread | spread | spread | spread +--------------------+--------+--------------------+-------- + 3.1999999999999997 | 100 | 3.1999999999999997 | 100 +(1 row) + +-- select spread (stub agg function, raise exception if not expected type) +--Testcase 57: +SELECT spread(value1::numeric),spread(value2::numeric),spread(value3::numeric),spread(value4::numeric) FROM s3; +ERROR: stub spread_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE +-- select abs as nest function with agg (pushdown, explain) +--Testcase 58: +EXPLAIN VERBOSE +SELECT sum(value3),abs(sum(value3)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (abs(sum(value3))) + InfluxDB query: SELECT sum("value3"), abs(sum("value3")) FROM "s3" +(3 rows) + +-- select abs as nest function with agg (pushdown, result) +--Testcase 59: +SELECT sum(value3),abs(sum(value3)) FROM s3; + sum | abs +--------------------+------------------- + -7.199999999999999 | 7.199999999999999 +(1 row) + +-- select abs as nest with log2 (pushdown, explain) +--Testcase 60: +EXPLAIN VERBOSE +SELECT abs(log2(value1)),abs(log2(1/value1)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: abs(log2(value1)), abs(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select abs as nest with log2 (pushdown, result) +--Testcase 61: +SELECT abs(log2(value1)),abs(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select abs with non pushdown func and explicit constant (explain) +--Testcase 62: +EXPLAIN VERBOSE +SELECT abs(value3), pi(), 4.1 FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: abs(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select abs with non pushdown func and explicit constant (result) +--Testcase 63: +SELECT abs(value3), pi(), 4.1 FROM s3; + abs | pi | ?column? +-----+-------------------+---------- + 0.1 | 3.141592653589793 | 4.1 + 0.2 | 3.141592653589793 | 4.1 + 0.3 | 3.141592653589793 | 4.1 + 1.1 | 3.141592653589793 | 4.1 + 2.2 | 3.141592653589793 | 4.1 + 3.3 | 3.141592653589793 | 4.1 +(6 rows) + +-- select sqrt as nest function with agg and explicit constant (pushdown, explain) +--Testcase 64: +EXPLAIN VERBOSE +SELECT sqrt(count(value1)), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sqrt((count(value1))::double precision)), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT sqrt(count("value1")) FROM "s3" +(3 rows) + +-- select sqrt as nest function with agg and explicit constant (pushdown, result) +--Testcase 65: +SELECT sqrt(count(value1)), pi(), 4.1 FROM s3; + sqrt | pi | ?column? +-------------------+-------------------+---------- + 2.449489742783178 | 3.141592653589793 | 4.1 +(1 row) + +-- select sqrt as nest function with agg and explicit constant and tag (error, explain) +--Testcase 66: +EXPLAIN VERBOSE +SELECT sqrt(count(value1)), pi(), 4.1, tag1 FROM s3; +ERROR: column "s3.tag1" must appear in the GROUP BY clause or be used in an aggregate function +LINE 2: SELECT sqrt(count(value1)), pi(), 4.1, tag1 FROM s3; + ^ +-- select spread (stub agg function and group by influx_time() and tag) (explain) +--Testcase 67: +EXPLAIN VERBOSE +SELECT spread("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (spread(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT spread("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select spread (stub agg function and group by influx_time() and tag) (result) +--Testcase 68: +SELECT spread("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + spread | influx_time | tag1 +--------+------------------------+------ + 0 | 1970-01-01 09:00:00+09 | a + 0 | 1970-01-01 09:00:01+09 | a + 0 | 1970-01-01 09:00:02+09 | a + | 1970-01-01 09:00:03+09 | a + | 1970-01-01 09:00:04+09 | a + | 1970-01-01 09:00:00+09 | b + | 1970-01-01 09:00:01+09 | b + | 1970-01-01 09:00:02+09 | b + 0 | 1970-01-01 09:00:03+09 | b + 0 | 1970-01-01 09:00:04+09 | b +(10 rows) + +-- select spread (stub agg function and group by tag only) (result) +--Testcase 69: +SELECT tag1,spread("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + tag1 | spread +------+--------------------- + a | 0.19999999999999998 + b | 1.1 +(2 rows) + +-- select spread (stub agg function and other aggs) (result) +--Testcase 70: +SELECT sum("value1"),spread("value1"),count("value1") FROM s3; + sum | spread | count +-------------------+--------------------+------- + 7.199999999999999 | 3.1999999999999997 | 6 +(1 row) + +-- select abs with order by (explain) +--Testcase 71: +EXPLAIN VERBOSE +SELECT value1, abs(1-value1) FROM s3 order by abs(1-value1); + QUERY PLAN +--------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (abs(('1'::double precision - value1))) + Sort Key: (abs(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, abs(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select abs with order by (result) +--Testcase 72: +SELECT value1, abs(1-value1) FROM s3 order by abs(1-value1); + value1 | abs +--------+--------------------- + 1.1 | 0.10000000000000009 + 0.3 | 0.7 + 0.2 | 0.8 + 0.1 | 0.9 + 2.2 | 1.2000000000000002 + 3.3 | 2.3 +(6 rows) + +-- select abs with order by index (result) +--Testcase 73: +SELECT value1, abs(1-value1) FROM s3 order by 2,1; + value1 | abs +--------+--------------------- + 1.1 | 0.10000000000000009 + 0.3 | 0.7 + 0.2 | 0.8 + 0.1 | 0.9 + 2.2 | 1.2000000000000002 + 3.3 | 2.3 +(6 rows) + +-- select abs with order by index (result) +--Testcase 74: +SELECT value1, abs(1-value1) FROM s3 order by 1,2; + value1 | abs +--------+--------------------- + 0.1 | 0.9 + 0.2 | 0.8 + 0.3 | 0.7 + 1.1 | 0.10000000000000009 + 2.2 | 1.2000000000000002 + 3.3 | 2.3 +(6 rows) + +-- select abs and as +--Testcase 75: +SELECT abs(value3) as abs1 FROM s3; + abs1 +------ + 0.1 + 0.2 + 0.3 + 1.1 + 2.2 + 3.3 +(6 rows) + +-- select abs(*) (stub agg function, explain) +--Testcase 76: +EXPLAIN VERBOSE +SELECT abs_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: abs_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select abs(*) (stub agg function, result) +--Testcase 77: +SELECT abs_all() from s3; +ERROR: stub abs_all() is called +CONTEXT: PL/pgSQL function abs_all() line 3 at RAISE +-- select abs(*) (stub agg function and group by tag only) (explain) +--Testcase 78: +EXPLAIN VERBOSE +SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (abs_all()), tag1 + InfluxDB query: SELECT abs(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select abs(*) (stub agg function and group by tag only) (result) +--Testcase 79: +SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + abs_all +----------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,0.1,100) + (1970-01-01T00:00:01Z,,0.2,100,0.2,100) + (1970-01-01T00:00:02Z,,0.3,100,0.3,100) + (1970-01-01T00:00:03Z,,1.1,200,1.1,200) + (1970-01-01T00:00:04Z,,2.2,200,2.2,200) +(5 rows) + +-- select abs(*) (stub agg function, expose data, explain) +--Testcase 80: +EXPLAIN VERBOSE +SELECT (abs_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((abs_all())::s3)."time", ((abs_all())::s3).tag1, ((abs_all())::s3).value1, ((abs_all())::s3).value2, ((abs_all())::s3).value3, ((abs_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select abs(*) (stub agg function, expose data, result) +--Testcase 81: +SELECT (abs_all()::s3).* from s3; +ERROR: stub abs_all() is called +CONTEXT: PL/pgSQL function abs_all() line 3 at RAISE +-- select spread over join query (explain) +--Testcase 82: +EXPLAIN VERBOSE +SELECT spread(t1.value1), spread(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + QUERY PLAN +---------------------------------------------------------------------------------------- + Aggregate (cost=112.64..112.66 rows=1 width=16) + Output: spread(t1.value1), spread(t2.value1) + -> Nested Loop (cost=20.00..28.14 rows=169 width=16) + Output: t1.value1, t2.value1 + -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) + Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..13.06 rows=13 width=8) + Output: t2.value1 + -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) + Output: t2.value1 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select spread over join query (result, stub call error) +--Testcase 83: +SELECT spread(t1.value1), spread(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; +ERROR: stub spread_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE +-- select spread with having (explain) +--Testcase 84: +EXPLAIN VERBOSE +SELECT spread(value1) FROM s3 HAVING spread(value1) > 100; + QUERY PLAN +-------------------------------------------------------------------------- + Aggregate (cost=3200.00..3200.01 rows=1 width=8) + Output: spread(value1) + Filter: (spread(s3.value1) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) + Output: "time", tag1, value1, value2, value3, value4 + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select spread with having (result, not pushdown, stub call error) +--Testcase 85: +SELECT spread(value1) FROM s3 HAVING spread(value1) > 100; +ERROR: stub spread_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function spread_sfunc(double precision,double precision) line 3 at RAISE +-- select spread(*) (stub agg function, explain) +--Testcase 86: +EXPLAIN VERBOSE +SELECT spread_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (spread_all(*)) + InfluxDB query: SELECT spread(*) FROM "s3" +(3 rows) + +-- select spread(*) (stub agg function, result) +--Testcase 87: +SELECT spread_all(*) from s3; + spread_all +----------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,3.1999999999999997,100,3.1999999999999997,100) +(1 row) + +-- select spread(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 88: +EXPLAIN VERBOSE +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (spread_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT spread(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select spread(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 89: +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + spread_all +--------------------------------- + (1970-01-01T00:00:00Z,,0,0,0,0) + (1970-01-01T00:00:01Z,,0,0,0,0) + (1970-01-01T00:00:02Z,,0,0,0,0) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,0,0,0,0) + (1970-01-01T00:00:04Z,,0,0,0,0) +(10 rows) + +-- select spread(*) (stub agg function and group by tag only) (explain) +--Testcase 90: +EXPLAIN VERBOSE +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (spread_all(*)), tag1 + InfluxDB query: SELECT spread(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select spread(*) (stub agg function and group by tag only) (result) +--Testcase 91: +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + spread_all +--------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.19999999999999998,0,0.19999999999999998,0) + (1970-01-01T00:00:00Z,,1.1,0,1.1,0) +(2 rows) + +-- select spread(*) (stub agg function, expose data, explain) +--Testcase 92: +EXPLAIN VERBOSE +SELECT (spread_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((spread_all(*)))::s3)."time", (((spread_all(*)))::s3).tag1, (((spread_all(*)))::s3).value1, (((spread_all(*)))::s3).value2, (((spread_all(*)))::s3).value3, (((spread_all(*)))::s3).value4 + InfluxDB query: SELECT spread(*) FROM "s3" +(3 rows) + +-- select spread(*) (stub agg function, expose data, result) +--Testcase 93: +SELECT (spread_all(*)::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------------------+--------+--------------------+-------- + 1970-01-01 09:00:00+09 | | 3.1999999999999997 | 100 | 3.1999999999999997 | 100 +(1 row) + +-- select spread(regex) (stub agg function, explain) +--Testcase 94: +EXPLAIN VERBOSE +SELECT spread('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (spread('/value[1,4]/'::text)) + InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" +(3 rows) + +-- select spread(regex) (stub agg function, result) +--Testcase 95: +SELECT spread('/value[1,4]/') from s3; + spread +-------------------------------------------------- + (1970-01-01T00:00:00Z,,3.1999999999999997,,,100) +(1 row) + +-- select spread(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 96: +EXPLAIN VERBOSE +SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (spread('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT spread(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select spread(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 97: +SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + spread +--------------------------------- + (1970-01-01T00:00:00Z,,0,0,0,0) + (1970-01-01T00:00:01Z,,0,0,0,0) + (1970-01-01T00:00:02Z,,0,0,0,0) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,0,0,0,0) + (1970-01-01T00:00:04Z,,0,0,0,0) +(10 rows) + +-- select spread(regex) (stub agg function and group by tag only) (explain) +--Testcase 98: +EXPLAIN VERBOSE +SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (spread('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select spread(regex) (stub agg function and group by tag only) (result) +--Testcase 99: +SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + spread +------------------------------------------------- + (1970-01-01T00:00:00Z,,0.19999999999999998,,,0) + (1970-01-01T00:00:00Z,,1.1,,,0) +(2 rows) + +-- select spread(regex) (stub agg function, expose data, explain) +--Testcase 100: +EXPLAIN VERBOSE +SELECT (spread('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((spread('/value[1,4]/'::text)))::s3)."time", (((spread('/value[1,4]/'::text)))::s3).tag1, (((spread('/value[1,4]/'::text)))::s3).value1, (((spread('/value[1,4]/'::text)))::s3).value2, (((spread('/value[1,4]/'::text)))::s3).value3, (((spread('/value[1,4]/'::text)))::s3).value4 + InfluxDB query: SELECT spread(/value[1,4]/) FROM "s3" +(3 rows) + +-- select spread(regex) (stub agg function, expose data, result) +--Testcase 101: +SELECT (spread('/value[1,4]/')::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------------------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 3.1999999999999997 | | | 100 +(1 row) + +-- select abs with arithmetic and tag in the middle (explain) +--Testcase 102: +EXPLAIN VERBOSE +SELECT abs(value1) + 1, value2, tag1, sqrt(value2) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1148.37 rows=1137 width=56) + Output: (abs(value1) + '1'::double precision), value2, tag1, sqrt((value2)::double precision) + InfluxDB query: SELECT "tag1", "value1", "value2" FROM "s3" +(3 rows) + +-- select abs with arithmetic and tag in the middle (result) +--Testcase 103: +SELECT abs(value1) + 1, value2, tag1, sqrt(value2) FROM s3; + ?column? | value2 | tag1 | sqrt +----------+--------+------+-------------------- + 1.1 | 100 | a | 10 + 1.2 | 100 | a | 10 + 1.3 | 100 | a | 10 + 2.1 | 200 | b | 14.142135623730951 + 3.2 | 200 | b | 14.142135623730951 + 4.3 | 200 | b | 14.142135623730951 +(6 rows) + +-- select with order by limit (explain) +--Testcase 104: +EXPLAIN VERBOSE +SELECT abs(value1), abs(value3), sqrt(value2) FROM s3 ORDER BY abs(value3) LIMIT 1; + QUERY PLAN +---------------------------------------------------------------------------------- + Limit (cost=1731.59..1731.59 rows=1 width=24) + Output: (abs(value1)), (abs(value3)), (sqrt((value2)::double precision)) + -> Sort (cost=1731.59..1735.86 rows=1706 width=24) + Output: (abs(value1)), (abs(value3)), (sqrt((value2)::double precision)) + Sort Key: (abs(s3.value3)) + -> Foreign Scan on public.s3 (cost=10.00..1723.06 rows=1706 width=24) + Output: abs(value1), abs(value3), sqrt((value2)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3" FROM "s3" +(8 rows) + +-- select with order by limit (result) +--Testcase 105: +SELECT abs(value1), abs(value3), sqrt(value2) FROM s3 ORDER BY abs(value3) LIMIT 1; + abs | abs | sqrt +-----+-----+------ + 0.1 | 0.1 | 10 +(1 row) + +-- select mixing with non pushdown func (all not pushdown, explain) +--Testcase 106: +EXPLAIN VERBOSE +SELECT abs(value1), sqrt(value2), upper(tag1) FROM s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1148.37 rows=1137 width=48) + Output: abs(value1), sqrt((value2)::double precision), upper(tag1) + InfluxDB query: SELECT "tag1", "value1", "value2" FROM "s3" +(3 rows) + +-- select mixing with non pushdown func (result) +--Testcase 107: +SELECT abs(value1), sqrt(value2), upper(tag1) FROM s3; + abs | sqrt | upper +-----+--------------------+------- + 0.1 | 10 | A + 0.2 | 10 | A + 0.3 | 10 | A + 1.1 | 14.142135623730951 | B + 2.2 | 14.142135623730951 | B + 3.3 | 14.142135623730951 | B +(6 rows) + +-- nested function in where clause (explain) +--Testcase 108: +EXPLAIN VERBOSE +SELECT sqrt(abs(value3)),min(value1) FROM s3 GROUP BY value3 HAVING sqrt(abs(value3)) > 0 ORDER BY 1,2; + QUERY PLAN +------------------------------------------------------------------------------- + Sort (cost=696.88..697.37 rows=197 width=24) + Output: (sqrt(abs(value3))), (min(value1)), value3 + Sort Key: (sqrt(abs(s3.value3))), (min(s3.value1)) + -> HashAggregate (cost=686.41..689.37 rows=197 width=24) + Output: sqrt(abs(value3)), min(value1), value3 + Group Key: s3.value3 + -> Foreign Scan on public.s3 (cost=10.00..683.00 rows=683 width=16) + Output: "time", tag1, value1, value2, value3, value4 + Filter: (sqrt(abs(s3.value3)) > '0'::double precision) + InfluxDB query: SELECT "value1", "value3" FROM "s3" +(10 rows) + +-- nested function in where clause (result) +--Testcase 109: +SELECT sqrt(abs(value3)),min(value1) FROM s3 GROUP BY value3 HAVING sqrt(abs(value3)) > 0 ORDER BY 1,2; + sqrt | min +---------------------+----- + 0.31622776601683794 | 0.1 + 0.4472135954999579 | 0.2 + 0.5477225575051661 | 0.3 + 1.0488088481701516 | 1.1 + 1.4832396974191326 | 2.2 + 1.816590212458495 | 3.3 +(6 rows) + +--Testcase 110: +EXPLAIN VERBOSE +SELECT first(time, value1), first(time, value2), first(time, value3), first(time, value4) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (first("time", value1)), (first("time", value2)), (first("time", value3)), (first("time", value4)) + InfluxDB query: SELECT first("value1"), first("value2"), first("value3"), first("value4") FROM "s3" +(3 rows) + +--Testcase 111: +SELECT first(time, value1), first(time, value2), first(time, value3), first(time, value4) FROM s3; + first | first | first | first +-------+-------+-------+------- + 0.1 | 100 | -0.1 | -100 +(1 row) + +-- select first(*) (stub agg function, explain) +--Testcase 112: +EXPLAIN VERBOSE +SELECT first_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (first_all(*)) + InfluxDB query: SELECT first(*) FROM "s3" +(3 rows) + +-- select first(*) (stub agg function, result) +--Testcase 113: +SELECT first_all(*) from s3; + first_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) +(1 row) + +-- select first(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 114: +EXPLAIN VERBOSE +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (first_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT first(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select first(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 115: +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + first_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select first(*) (stub agg function and group by tag only) (explain) +--Testcase 116: +EXPLAIN VERBOSE +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (first_all(*)), tag1 + InfluxDB query: SELECT first(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select first(*) (stub agg function and group by tag only) (result) +--Testcase 117: +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + first_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:00Z,,1.1,200,-1.1,-200) +(2 rows) + +-- select first(*) (stub agg function, expose data, explain) +--Testcase 118: +EXPLAIN VERBOSE +SELECT (first_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((first_all(*)))::s3)."time", (((first_all(*)))::s3).tag1, (((first_all(*)))::s3).value1, (((first_all(*)))::s3).value2, (((first_all(*)))::s3).value3, (((first_all(*)))::s3).value4 + InfluxDB query: SELECT first(*) FROM "s3" +(3 rows) + +-- select first(*) (stub agg function, expose data, result) +--Testcase 119: +SELECT (first_all(*)::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 0.1 | 100 | -0.1 | -100 +(1 row) + +-- select first(regex) (stub function, explain) +--Testcase 120: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/') from s3; + QUERY PLAN +-------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (first('/value[1,4]/'::text)) + InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" +(3 rows) + +-- select first(regex) (stub function, explain) +--Testcase 121: +SELECT first('/value[1,4]/') from s3; + first +------------------------------------ + (1970-01-01T00:00:00Z,,0.1,,,-100) +(1 row) + +-- select multiple regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 122: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; +WARNING: Selecting multiple functions with regular expression or star is not supported. + QUERY PLAN +-------------------------------------------------------------------------- + Aggregate (cost=5119.50..5119.51 rows=1 width=64) + Output: first('/value[1,4]/'::text), first('/^v.*/'::text) + -> Foreign Scan on public.s3 (cost=10.00..3413.00 rows=3413 width=0) + Output: "time", tag1, value1, value2, value3, value4 + InfluxDB query: SELECT * FROM "s3" +(5 rows) + +-- select multiple regex functions (do not push down, raise warning and stub error) (result) +--Testcase 123: +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; +WARNING: Selecting multiple functions with regular expression or star is not supported. +ERROR: stub first_sfunc(text, text) is called +CONTEXT: PL/pgSQL function first_sfunc(text,text) line 3 at RAISE +-- select first(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 124: +EXPLAIN VERBOSE +SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (first('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT first(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select first(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 125: +SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + first +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select first(regex) (stub agg function and group by tag only) (explain) +--Testcase 126: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (first('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select first(regex) (stub agg function and group by tag only) (result) +--Testcase 127: +SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + first +------------------------------------ + (1970-01-01T00:00:00Z,,0.1,,,-100) + (1970-01-01T00:00:00Z,,1.1,,,-200) +(2 rows) + +-- select first(regex) (stub agg function, expose data, explain) +--Testcase 128: +EXPLAIN VERBOSE +SELECT (first('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((first('/value[1,4]/'::text)))::s3)."time", (((first('/value[1,4]/'::text)))::s3).tag1, (((first('/value[1,4]/'::text)))::s3).value1, (((first('/value[1,4]/'::text)))::s3).value2, (((first('/value[1,4]/'::text)))::s3).value3, (((first('/value[1,4]/'::text)))::s3).value4 + InfluxDB query: SELECT first(/value[1,4]/) FROM "s3" +(3 rows) + +-- select first(regex) (stub agg function, expose data, result) +--Testcase 129: +SELECT (first('/value[1,4]/')::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 0.1 | | | -100 +(1 row) + +--Testcase 130: +EXPLAIN VERBOSE +SELECT last(time, value1), last(time, value2), last(time, value3), last(time, value4) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (last("time", value1)), (last("time", value2)), (last("time", value3)), (last("time", value4)) + InfluxDB query: SELECT last("value1"), last("value2"), last("value3"), last("value4") FROM "s3" +(3 rows) + +--Testcase 131: +SELECT last(time, value1), last(time, value2), last(time, value3), last(time, value4) FROM s3; + last | last | last | last +------+------+------+------ + 3.3 | 200 | -3.3 | -200 +(1 row) + +-- select last(*) (stub agg function, explain) +--Testcase 132: +EXPLAIN VERBOSE +SELECT last_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (last_all(*)) + InfluxDB query: SELECT last(*) FROM "s3" +(3 rows) + +-- select last(*) (stub agg function, result) +--Testcase 133: +SELECT last_all(*) from s3; + last_all +------------------------------------------- + (1970-01-01T00:00:00Z,,3.3,200,-3.3,-200) +(1 row) + +-- select last(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 134: +EXPLAIN VERBOSE +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (last_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT last(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select last(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 135: +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + last_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select last(*) (stub agg function and group by tag only) (explain) +--Testcase 136: +EXPLAIN VERBOSE +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (last_all(*)), tag1 + InfluxDB query: SELECT last(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select last(*) (stub agg function and group by tag only) (result) +--Testcase 137: +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + last_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:00Z,,2.2,200,-2.2,-200) +(2 rows) + +-- select last(*) (stub agg function, expose data, explain) +--Testcase 138: +EXPLAIN VERBOSE +SELECT (last_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((last_all(*)))::s3)."time", (((last_all(*)))::s3).tag1, (((last_all(*)))::s3).value1, (((last_all(*)))::s3).value2, (((last_all(*)))::s3).value3, (((last_all(*)))::s3).value4 + InfluxDB query: SELECT last(*) FROM "s3" +(3 rows) + +-- select last(*) (stub agg function, expose data, result) +--Testcase 139: +SELECT (last_all(*)::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 3.3 | 200 | -3.3 | -200 +(1 row) + +-- select last(regex) (stub function, explain) +--Testcase 140: +EXPLAIN VERBOSE +SELECT last('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (last('/value[1,4]/'::text)) + InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" +(3 rows) + +-- select last(regex) (stub function, result) +--Testcase 141: +SELECT last('/value[1,4]/') from s3; + last +------------------------------------ + (1970-01-01T00:00:00Z,,3.3,,,-200) +(1 row) + +-- select multiple regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 142: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; +WARNING: Selecting multiple functions with regular expression or star is not supported. + QUERY PLAN +-------------------------------------------------------------------------- + Aggregate (cost=5119.50..5119.51 rows=1 width=64) + Output: first('/value[1,4]/'::text), first('/^v.*/'::text) + -> Foreign Scan on public.s3 (cost=10.00..3413.00 rows=3413 width=0) + Output: "time", tag1, value1, value2, value3, value4 + InfluxDB query: SELECT * FROM "s3" +(5 rows) + +-- select multiple regex functions (do not push down, raise warning and stub error) (result) +--Testcase 143: +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; +WARNING: Selecting multiple functions with regular expression or star is not supported. +ERROR: stub first_sfunc(text, text) is called +CONTEXT: PL/pgSQL function first_sfunc(text,text) line 3 at RAISE +-- select last(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 144: +EXPLAIN VERBOSE +SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (last('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT last(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select last(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 145: +SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + last +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select last(regex) (stub agg function and group by tag only) (explain) +--Testcase 146: +EXPLAIN VERBOSE +SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (last('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select last(regex) (stub agg function and group by tag only) (result) +--Testcase 147: +SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + last +------------------------------------ + (1970-01-01T00:00:00Z,,0.3,,,-100) + (1970-01-01T00:00:00Z,,2.2,,,-200) +(2 rows) + +-- select last(regex) (stub agg function, expose data, explain) +--Testcase 148: +EXPLAIN VERBOSE +SELECT (last('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((last('/value[1,4]/'::text)))::s3)."time", (((last('/value[1,4]/'::text)))::s3).tag1, (((last('/value[1,4]/'::text)))::s3).value1, (((last('/value[1,4]/'::text)))::s3).value2, (((last('/value[1,4]/'::text)))::s3).value3, (((last('/value[1,4]/'::text)))::s3).value4 + InfluxDB query: SELECT last(/value[1,4]/) FROM "s3" +(3 rows) + +-- select last(regex) (stub agg function, expose data, result) +--Testcase 149: +SELECT (last('/value[1,4]/')::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 3.3 | | | -200 +(1 row) + +--Testcase 150: +EXPLAIN VERBOSE +SELECT sample(value2, 3) FROM s3 WHERE value2 < 200; + QUERY PLAN +--------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=8) + Output: (sample(value2, 3)) + InfluxDB query: SELECT sample("value2", 3) FROM "s3" WHERE (("value2" < 200)) +(3 rows) + +--Testcase 151: +SELECT sample(value2, 3) FROM s3 WHERE value2 < 200; + sample +-------- + 100 + 100 + 100 +(3 rows) + +--Testcase 152: +EXPLAIN VERBOSE +SELECT sample(value2, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sample(value2, 1)), (influx_time("time", '@ 3 secs'::interval)) + InfluxDB query: SELECT sample("value2", 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:05')) GROUP BY (time(0d0h0m3s0u)) +(3 rows) + +--Testcase 153: +SELECT sample(value2, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); + sample +-------- + 100 + 200 +(2 rows) + +-- select sample(*, int) (stub agg function, explain) +--Testcase 154: +EXPLAIN VERBOSE +SELECT sample_all(50) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: sample_all(50) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sample(*, int) (stub agg function, result) +--Testcase 155: +SELECT sample_all(50) from s3; +ERROR: stub sample_all(int) is called +CONTEXT: PL/pgSQL function sample_all(integer) line 3 at RAISE +-- select sample(*, int) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 156: +EXPLAIN VERBOSE +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sample_all(50)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT sample(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select sample(*, int) (stub agg function and group by influx_time() and tag) (result) +--Testcase 157: +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + sample_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(5 rows) + +-- select sample(*, int) (stub agg function and group by tag only) (explain) +--Testcase 158: +EXPLAIN VERBOSE +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (sample_all(50)), tag1 + InfluxDB query: SELECT sample(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select sample(*, int) (stub agg function and group by tag only) (result) +--Testcase 159: +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + sample_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(5 rows) + +-- select sample(*, int) (stub agg function, expose data, explain) +--Testcase 160: +EXPLAIN VERBOSE +SELECT (sample_all(50)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((sample_all(50))::s3)."time", ((sample_all(50))::s3).tag1, ((sample_all(50))::s3).value1, ((sample_all(50))::s3).value2, ((sample_all(50))::s3).value3, ((sample_all(50))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sample(*, int) (stub agg function, expose data, result) +--Testcase 161: +SELECT (sample_all(50)::s3).* from s3; +ERROR: stub sample_all(int) is called +CONTEXT: PL/pgSQL function sample_all(integer) line 3 at RAISE +-- select sample(regex) (stub agg function, explain) +--Testcase 162: +EXPLAIN VERBOSE +SELECT sample('/value[1,4]/', 50) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: sample('/value[1,4]/'::text, 50) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sample(regex) (stub agg function, result) +--Testcase 163: +SELECT sample('/value[1,4]/', 50) from s3; +ERROR: stub sample(text, int) is called +CONTEXT: PL/pgSQL function sample(text,integer) line 3 at RAISE +-- select sample(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 164: +EXPLAIN VERBOSE +SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (sample('/^v.*/'::text, 50)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT sample(/^v.*/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select sample(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 165: +SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + sample +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(5 rows) + +-- select sample(regex) (stub agg function and group by tag only) (explain) +--Testcase 166: +EXPLAIN VERBOSE +SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (sample('/value[1,4]/'::text, 50)), tag1 + InfluxDB query: SELECT sample(/value[1,4]/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select sample(regex) (stub agg function and group by tag only) (result) +--Testcase 167: +SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + sample +------------------------------------ + (1970-01-01T00:00:00Z,,0.1,,,-100) + (1970-01-01T00:00:01Z,,0.2,,,-100) + (1970-01-01T00:00:02Z,,0.3,,,-100) + (1970-01-01T00:00:03Z,,1.1,,,-200) + (1970-01-01T00:00:04Z,,2.2,,,-200) +(5 rows) + +-- select sample(regex) (stub agg function, expose data, explain) +--Testcase 168: +EXPLAIN VERBOSE +SELECT (sample('/value[1,4]/', 50)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((sample('/value[1,4]/'::text, 50))::s3)."time", ((sample('/value[1,4]/'::text, 50))::s3).tag1, ((sample('/value[1,4]/'::text, 50))::s3).value1, ((sample('/value[1,4]/'::text, 50))::s3).value2, ((sample('/value[1,4]/'::text, 50))::s3).value3, ((sample('/value[1,4]/'::text, 50))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sample(regex) (stub agg function, expose data, result) +--Testcase 169: +SELECT (sample('/value[1,4]/', 50)::s3).* from s3; +ERROR: stub sample(text, int) is called +CONTEXT: PL/pgSQL function sample(text,integer) line 3 at RAISE +--Testcase 170: +EXPLAIN VERBOSE +SELECT cumulative_sum(value1),cumulative_sum(value2),cumulative_sum(value3),cumulative_sum(value4) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: cumulative_sum(value1), cumulative_sum(value2), cumulative_sum(value3), cumulative_sum(value4) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 171: +SELECT cumulative_sum(value1),cumulative_sum(value2),cumulative_sum(value3),cumulative_sum(value4) FROM s3; +ERROR: stub cumulative_sum(float8) is called +CONTEXT: PL/pgSQL function cumulative_sum(double precision) line 3 at RAISE +-- select cumulative_sum(*) (stub function, explain) +--Testcase 172: +EXPLAIN VERBOSE +SELECT cumulative_sum_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: cumulative_sum_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select cumulative_sum(*) (stub function, result) +--Testcase 173: +SELECT cumulative_sum_all() from s3; +ERROR: stub cumulative_sum_all() is called +CONTEXT: PL/pgSQL function cumulative_sum_all() line 3 at RAISE +-- select cumulative_sum(regex) (stub function, result) +--Testcase 174: +SELECT cumulative_sum('/value[1,4]/') from s3; +ERROR: stub cumulative_sum(text) is called +CONTEXT: PL/pgSQL function cumulative_sum(text) line 3 at RAISE +-- select cumulative_sum(regex) (stub function, result) +--Testcase 175: +SELECT cumulative_sum('/value[1,4]/') from s3; +ERROR: stub cumulative_sum(text) is called +CONTEXT: PL/pgSQL function cumulative_sum(text) line 3 at RAISE +-- select multiple star and regex functions (do not push down, raise warning and stub error) (result) +--Testcase 176: +EXPLAIN VERBOSE +SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..5119.50 rows=3413 width=64) + Output: cumulative_sum_all(), cumulative_sum('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (result) +--Testcase 177: +SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; +ERROR: stub cumulative_sum_all() is called +CONTEXT: PL/pgSQL function cumulative_sum_all() line 3 at RAISE +-- select cumulative_sum(*) (stub function and group by tag only) (explain) +--Testcase 178: +EXPLAIN VERBOSE +SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (cumulative_sum_all()), tag1 + InfluxDB query: SELECT cumulative_sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select cumulative_sum(*) (stub function and group by tag only) (result) +--Testcase 179: +SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + cumulative_sum_all +--------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.30000000000000004,200,-0.30000000000000004,-200) + (1970-01-01T00:00:02Z,,0.6000000000000001,300,-0.6000000000000001,-300) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,3.3000000000000003,400,-3.3000000000000003,-400) +(5 rows) + +-- select cumulative_sum(regex) (stub function and group by tag only) (explain) +--Testcase 180: +EXPLAIN VERBOSE +SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (cumulative_sum('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT cumulative_sum(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select cumulative_sum(regex) (stub function and group by tag only) (result) +--Testcase 181: +SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + cumulative_sum +---------------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,,,-100) + (1970-01-01T00:00:01Z,,0.30000000000000004,,,-200) + (1970-01-01T00:00:02Z,,0.6000000000000001,,,-300) + (1970-01-01T00:00:03Z,,1.1,,,-200) + (1970-01-01T00:00:04Z,,3.3000000000000003,,,-400) +(5 rows) + +-- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, explain) +--Testcase 182: +EXPLAIN VERBOSE +SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..13856.78 rows=3413 width=144) + Output: ((cumulative_sum_all())::s3)."time", ((cumulative_sum_all())::s3).tag1, ((cumulative_sum_all())::s3).value1, ((cumulative_sum_all())::s3).value2, ((cumulative_sum_all())::s3).value3, ((cumulative_sum_all())::s3).value4, ((cumulative_sum('/value[1,4]/'::text))::s3)."time", ((cumulative_sum('/value[1,4]/'::text))::s3).tag1, ((cumulative_sum('/value[1,4]/'::text))::s3).value1, ((cumulative_sum('/value[1,4]/'::text))::s3).value2, ((cumulative_sum('/value[1,4]/'::text))::s3).value3, ((cumulative_sum('/value[1,4]/'::text))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, result) +--Testcase 183: +SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; +ERROR: stub cumulative_sum_all() is called +CONTEXT: PL/pgSQL function cumulative_sum_all() line 3 at RAISE +--Testcase 184: +EXPLAIN VERBOSE +SELECT derivative(value1),derivative(value2),derivative(value3),derivative(value4) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: derivative(value1), derivative(value2), derivative(value3), derivative(value4) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 185: +SELECT derivative(value1),derivative(value2),derivative(value3),derivative(value4) FROM s3; +ERROR: stub derivative(anyelement) is called +CONTEXT: PL/pgSQL function derivative(anyelement) line 3 at RAISE +--Testcase 186: +EXPLAIN VERBOSE +SELECT derivative(value1, interval '0.5s'),derivative(value2, interval '0.2s'),derivative(value3, interval '0.1s'),derivative(value4, interval '2s') FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: derivative(value1, '@ 0.5 secs'::interval), derivative(value2, '@ 0.2 secs'::interval), derivative(value3, '@ 0.1 secs'::interval), derivative(value4, '@ 2 secs'::interval) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 187: +SELECT derivative(value1, interval '0.5s'),derivative(value2, interval '0.2s'),derivative(value3, interval '0.1s'),derivative(value4, interval '2s') FROM s3; +ERROR: stub derivative(anyelement, interval) is called +CONTEXT: PL/pgSQL function derivative(anyelement,interval) line 3 at RAISE +-- select derivative(*) (stub function, explain) +--Testcase 188: +EXPLAIN VERBOSE +SELECT derivative_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: derivative_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select derivative(*) (stub function, result) +--Testcase 189: +SELECT derivative_all() from s3; +ERROR: stub derivative_all() is called +CONTEXT: PL/pgSQL function derivative_all() line 3 at RAISE +-- select derivative(regex) (stub function, explain) +--Testcase 190: +EXPLAIN VERBOSE +SELECT derivative('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: derivative('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select derivative(regex) (stub function, result) +--Testcase 191: +SELECT derivative('/value[1,4]/') from s3; +ERROR: stub derivative(text) is called +CONTEXT: PL/pgSQL function derivative(text) line 3 at RAISE +-- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 192: +EXPLAIN VERBOSE +SELECT derivative_all(), derivative('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..5119.50 rows=3413 width=64) + Output: derivative_all(), derivative('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 193: +SELECT derivative_all(), derivative('/value[1,4]/') from s3; +ERROR: stub derivative_all() is called +CONTEXT: PL/pgSQL function derivative_all() line 3 at RAISE +-- select derivative(*) (stub function and group by tag only) (explain) +--Testcase 194: +EXPLAIN VERBOSE +SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (derivative_all()), tag1 + InfluxDB query: SELECT derivative(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select derivative(*) (stub function and group by tag only) (result) +--Testcase 195: +SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + derivative_all +---------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1,0,-0.1,0) + (1970-01-01T00:00:02Z,,0.09999999999999998,0,-0.09999999999999998,0) + (1970-01-01T00:00:04Z,,1.1,0,-1.1,0) +(3 rows) + +-- select derivative(regex) (stub function and group by tag only) (explain) +--Testcase 196: +EXPLAIN VERBOSE +SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (derivative('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT derivative(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select derivative(regex) (stub function and group by tag only) (result) +--Testcase 197: +SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + derivative +------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1,,,0) + (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) + (1970-01-01T00:00:04Z,,1.1,,,0) +(3 rows) + +-- select derivative(*) (stub agg function, expose data, explain) +--Testcase 198: +EXPLAIN VERBOSE +SELECT (derivative_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((derivative_all())::s3)."time", ((derivative_all())::s3).tag1, ((derivative_all())::s3).value1, ((derivative_all())::s3).value2, ((derivative_all())::s3).value3, ((derivative_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select derivative(*) (stub agg function, expose data, result) +--Testcase 199: +SELECT (derivative_all()::s3).* from s3; +ERROR: stub derivative_all() is called +CONTEXT: PL/pgSQL function derivative_all() line 3 at RAISE +-- select derivative(regex) (stub agg function, expose data, explain) +--Testcase 200: +EXPLAIN VERBOSE +SELECT (derivative('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((derivative('/value[1,4]/'::text))::s3)."time", ((derivative('/value[1,4]/'::text))::s3).tag1, ((derivative('/value[1,4]/'::text))::s3).value1, ((derivative('/value[1,4]/'::text))::s3).value2, ((derivative('/value[1,4]/'::text))::s3).value3, ((derivative('/value[1,4]/'::text))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select derivative(regex) (stub agg function, expose data, result) +--Testcase 201: +SELECT (derivative('/value[1,4]/')::s3).* from s3; +ERROR: stub derivative(text) is called +CONTEXT: PL/pgSQL function derivative(text) line 3 at RAISE +--Testcase 202: +EXPLAIN VERBOSE +SELECT non_negative_derivative(value1),non_negative_derivative(value2),non_negative_derivative(value3),non_negative_derivative(value4) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: non_negative_derivative(value1), non_negative_derivative(value2), non_negative_derivative(value3), non_negative_derivative(value4) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 203: +SELECT non_negative_derivative(value1),non_negative_derivative(value2),non_negative_derivative(value3),non_negative_derivative(value4) FROM s3; +ERROR: stub non_negative_derivative(anyelement) is called +CONTEXT: PL/pgSQL function non_negative_derivative(anyelement) line 3 at RAISE +--Testcase 204: +EXPLAIN VERBOSE +SELECT non_negative_derivative(value1, interval '0.5s'),non_negative_derivative(value2, interval '0.2s'),non_negative_derivative(value3, interval '0.1s'),non_negative_derivative(value4, interval '2s') FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: non_negative_derivative(value1, '@ 0.5 secs'::interval), non_negative_derivative(value2, '@ 0.2 secs'::interval), non_negative_derivative(value3, '@ 0.1 secs'::interval), non_negative_derivative(value4, '@ 2 secs'::interval) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 205: +SELECT non_negative_derivative(value1, interval '0.5s'),non_negative_derivative(value2, interval '0.2s'),non_negative_derivative(value3, interval '0.1s'),non_negative_derivative(value4, interval '2s') FROM s3; +ERROR: stub non_negative_derivative(anyelement, interval) is called +CONTEXT: PL/pgSQL function non_negative_derivative(anyelement,interval) line 3 at RAISE +-- select non_negative_derivative(*) (stub function, explain) +--Testcase 206: +EXPLAIN VERBOSE +SELECT non_negative_derivative_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: non_negative_derivative_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_derivative(*) (stub function, result) +--Testcase 207: +SELECT non_negative_derivative_all() from s3; +ERROR: stub non_negative_derivative_all() is called +CONTEXT: PL/pgSQL function non_negative_derivative_all() line 3 at RAISE +-- select non_negative_derivative(regex) (stub function, explain) +--Testcase 208: +EXPLAIN VERBOSE +SELECT non_negative_derivative('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: non_negative_derivative('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_derivative(regex) (stub function, result) +--Testcase 209: +SELECT non_negative_derivative('/value[1,4]/') from s3; +ERROR: stub non_negative_derivative(text) is called +CONTEXT: PL/pgSQL function non_negative_derivative(text) line 3 at RAISE +-- select non_negative_derivative(*) (stub function and group by tag only) (explain) +--Testcase 210: +EXPLAIN VERBOSE +SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (non_negative_derivative_all()), tag1 + InfluxDB query: SELECT non_negative_derivative(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select non_negative_derivative(*) (stub function and group by tag only) (result) +--Testcase 211: +SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + non_negative_derivative_all +-------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1,0,,0) + (1970-01-01T00:00:02Z,,0.09999999999999998,0,,0) + (1970-01-01T00:00:04Z,,1.1,0,,0) +(3 rows) + +-- select non_negative_derivative(regex) (stub function and group by tag only) (explain) +--Testcase 212: +EXPLAIN VERBOSE +SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (non_negative_derivative('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT non_negative_derivative(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select non_negative_derivative(regex) (stub agg function and group by tag only) (result) +--Testcase 213: +SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + non_negative_derivative +------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1,,,0) + (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) + (1970-01-01T00:00:04Z,,1.1,,,0) +(3 rows) + +-- select non_negative_derivative(*) (stub function, expose data, explain) +--Testcase 214: +EXPLAIN VERBOSE +SELECT (non_negative_derivative_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((non_negative_derivative_all())::s3)."time", ((non_negative_derivative_all())::s3).tag1, ((non_negative_derivative_all())::s3).value1, ((non_negative_derivative_all())::s3).value2, ((non_negative_derivative_all())::s3).value3, ((non_negative_derivative_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_derivative(*) (stub agg function, expose data, result) +--Testcase 215: +SELECT (non_negative_derivative_all()::s3).* from s3; +ERROR: stub non_negative_derivative_all() is called +CONTEXT: PL/pgSQL function non_negative_derivative_all() line 3 at RAISE +-- select non_negative_derivative(regex) (stub function, expose data, explain) +--Testcase 216: +EXPLAIN VERBOSE +SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((non_negative_derivative('/value[1,4]/'::text))::s3)."time", ((non_negative_derivative('/value[1,4]/'::text))::s3).tag1, ((non_negative_derivative('/value[1,4]/'::text))::s3).value1, ((non_negative_derivative('/value[1,4]/'::text))::s3).value2, ((non_negative_derivative('/value[1,4]/'::text))::s3).value3, ((non_negative_derivative('/value[1,4]/'::text))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_derivative(regex) (stub agg function, expose data, result) +--Testcase 217: +SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; +ERROR: stub non_negative_derivative(text) is called +CONTEXT: PL/pgSQL function non_negative_derivative(text) line 3 at RAISE +--Testcase 218: +EXPLAIN VERBOSE +SELECT difference(value1),difference(value2),difference(value3),difference(value4) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: difference(value1), difference(value2), difference(value3), difference(value4) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 219: +SELECT difference(value1),difference(value2),difference(value3),difference(value4) FROM s3; +ERROR: stub difference(float8) is called +CONTEXT: PL/pgSQL function difference(double precision) line 3 at RAISE +-- select difference(*) (stub function, explain) +--Testcase 220: +EXPLAIN VERBOSE +SELECT difference_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: difference_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select difference(*) (stub function, result) +--Testcase 221: +SELECT difference_all() from s3; +ERROR: stub difference_all() is called +CONTEXT: PL/pgSQL function difference_all() line 3 at RAISE +-- select difference(regex) (stub function, explain) +--Testcase 222: +EXPLAIN VERBOSE +SELECT difference('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: difference('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select difference(regex) (stub function, result) +--Testcase 223: +SELECT difference('/value[1,4]/') from s3; +ERROR: stub difference(text) is called +CONTEXT: PL/pgSQL function difference(text) line 3 at RAISE +-- select difference(*) (stub agg function and group by tag only) (explain) +--Testcase 224: +EXPLAIN VERBOSE +SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (difference_all()), tag1 + InfluxDB query: SELECT difference(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select difference(*) (stub agg function and group by tag only) (result) +--Testcase 225: +SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + difference_all +---------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1,0,-0.1,0) + (1970-01-01T00:00:02Z,,0.09999999999999998,0,-0.09999999999999998,0) + (1970-01-01T00:00:04Z,,1.1,0,-1.1,0) +(3 rows) + +-- select difference(regex) (stub agg function and group by tag only) (explain) +--Testcase 226: +EXPLAIN VERBOSE +SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (difference('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT difference(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select difference(regex) (stub agg function and group by tag only) (result) +--Testcase 227: +SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + difference +------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1,,,0) + (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) + (1970-01-01T00:00:04Z,,1.1,,,0) +(3 rows) + +-- select difference(*) (stub function, expose data, explain) +--Testcase 228: +EXPLAIN VERBOSE +SELECT (difference_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((difference_all())::s3)."time", ((difference_all())::s3).tag1, ((difference_all())::s3).value1, ((difference_all())::s3).value2, ((difference_all())::s3).value3, ((difference_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select difference(*) (stub function, expose data, result) +--Testcase 229: +SELECT (difference_all()::s3).* from s3; +ERROR: stub difference_all() is called +CONTEXT: PL/pgSQL function difference_all() line 3 at RAISE +-- select difference(regex) (stub function, expose data, explain) +--Testcase 230: +EXPLAIN VERBOSE +SELECT (difference('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((difference('/value[1,4]/'::text))::s3)."time", ((difference('/value[1,4]/'::text))::s3).tag1, ((difference('/value[1,4]/'::text))::s3).value1, ((difference('/value[1,4]/'::text))::s3).value2, ((difference('/value[1,4]/'::text))::s3).value3, ((difference('/value[1,4]/'::text))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select difference(regex) (stub function, expose data, result) +--Testcase 231: +SELECT (difference('/value[1,4]/')::s3).* from s3; +ERROR: stub difference(text) is called +CONTEXT: PL/pgSQL function difference(text) line 3 at RAISE +--Testcase 232: +EXPLAIN VERBOSE +SELECT non_negative_difference(value1),non_negative_difference(value2),non_negative_difference(value3),non_negative_difference(value4) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: non_negative_difference(value1), non_negative_difference(value2), non_negative_difference(value3), non_negative_difference(value4) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 233: +SELECT non_negative_difference(value1),non_negative_difference(value2),non_negative_difference(value3),non_negative_difference(value4) FROM s3; +ERROR: stub non_negative_difference(float8) is called +CONTEXT: PL/pgSQL function non_negative_difference(double precision) line 3 at RAISE +-- select non_negative_difference(*) (stub function, explain) +--Testcase 234: +EXPLAIN VERBOSE +SELECT non_negative_difference_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: non_negative_difference_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_difference(*) (stub function, result) +--Testcase 235: +SELECT non_negative_difference_all() from s3; +ERROR: stub non_negative_difference_all() is called +CONTEXT: PL/pgSQL function non_negative_difference_all() line 3 at RAISE +-- select non_negative_difference(regex) (stub agg function, explain) +--Testcase 236: +EXPLAIN VERBOSE +SELECT non_negative_difference('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: non_negative_difference('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_difference(*), non_negative_difference(regex) (stub function, result) +--Testcase 237: +SELECT non_negative_difference('/value[1,4]/') from s3; +ERROR: stub non_negative_difference(text) is called +CONTEXT: PL/pgSQL function non_negative_difference(text) line 3 at RAISE +-- select non_negative_difference(*) (stub function and group by tag only) (explain) +--Testcase 238: +EXPLAIN VERBOSE +SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (non_negative_difference_all()), tag1 + InfluxDB query: SELECT non_negative_difference(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select non_negative_difference(*) (stub function and group by tag only) (result) +--Testcase 239: +SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + non_negative_difference_all +-------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1,0,,0) + (1970-01-01T00:00:02Z,,0.09999999999999998,0,,0) + (1970-01-01T00:00:04Z,,1.1,0,,0) +(3 rows) + +-- select non_negative_difference(regex) (stub function and group by tag only) (explain) +--Testcase 240: +EXPLAIN VERBOSE +SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (non_negative_difference('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT non_negative_difference(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select non_negative_difference(regex) (stub function and group by tag only) (result) +--Testcase 241: +SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + non_negative_difference +------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1,,,0) + (1970-01-01T00:00:02Z,,0.09999999999999998,,,0) + (1970-01-01T00:00:04Z,,1.1,,,0) +(3 rows) + +-- select non_negative_difference(*) (stub function, expose data, explain) +--Testcase 242: +EXPLAIN VERBOSE +SELECT (non_negative_difference_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((non_negative_difference_all())::s3)."time", ((non_negative_difference_all())::s3).tag1, ((non_negative_difference_all())::s3).value1, ((non_negative_difference_all())::s3).value2, ((non_negative_difference_all())::s3).value3, ((non_negative_difference_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_difference(*) (stub function, expose data, result) +--Testcase 243: +SELECT (non_negative_difference_all()::s3).* from s3; +ERROR: stub non_negative_difference_all() is called +CONTEXT: PL/pgSQL function non_negative_difference_all() line 3 at RAISE +-- select non_negative_difference(regex) (stub function, expose data, explain) +--Testcase 244: +EXPLAIN VERBOSE +SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((non_negative_difference('/value[1,4]/'::text))::s3)."time", ((non_negative_difference('/value[1,4]/'::text))::s3).tag1, ((non_negative_difference('/value[1,4]/'::text))::s3).value1, ((non_negative_difference('/value[1,4]/'::text))::s3).value2, ((non_negative_difference('/value[1,4]/'::text))::s3).value3, ((non_negative_difference('/value[1,4]/'::text))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select non_negative_difference(regex) (stub function, expose data, result) +--Testcase 245: +SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; +ERROR: stub non_negative_difference(text) is called +CONTEXT: PL/pgSQL function non_negative_difference(text) line 3 at RAISE +--Testcase 246: +EXPLAIN VERBOSE +SELECT elapsed(value1),elapsed(value2),elapsed(value3),elapsed(value4) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: elapsed(value1), elapsed(value2), elapsed(value3), elapsed(value4) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 247: +SELECT elapsed(value1),elapsed(value2),elapsed(value3),elapsed(value4) FROM s3; +ERROR: stub elapsed(anyelement) is called +CONTEXT: PL/pgSQL function elapsed(anyelement) line 3 at RAISE +--Testcase 248: +EXPLAIN VERBOSE +SELECT elapsed(value1, interval '0.5s'),elapsed(value2, interval '0.2s'),elapsed(value3, interval '0.1s'),elapsed(value4, interval '2s') FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: elapsed(value1, '@ 0.5 secs'::interval), elapsed(value2, '@ 0.2 secs'::interval), elapsed(value3, '@ 0.1 secs'::interval), elapsed(value4, '@ 2 secs'::interval) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 249: +SELECT elapsed(value1, interval '0.5s'),elapsed(value2, interval '0.2s'),elapsed(value3, interval '0.1s'),elapsed(value4, interval '2s') FROM s3; +ERROR: stub elapsed(anyelement, interval) is called +CONTEXT: PL/pgSQL function elapsed(anyelement,interval) line 3 at RAISE +-- select elapsed(*) (stub function, explain) +--Testcase 250: +EXPLAIN VERBOSE +SELECT elapsed_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: elapsed_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select elapsed(*) (stub function, result) +--Testcase 251: +SELECT elapsed_all() from s3; +ERROR: stub elapsed_all() is called +CONTEXT: PL/pgSQL function elapsed_all() line 3 at RAISE +-- select elapsed(regex) (stub function, explain) +--Testcase 252: +EXPLAIN VERBOSE +SELECT elapsed('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: elapsed('/value[1,4]/'::text) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select elapsed(regex) (stub agg function, result) +--Testcase 253: +SELECT elapsed('/value[1,4]/') from s3; +ERROR: stub elapsed(text) is called +CONTEXT: PL/pgSQL function elapsed(text) line 3 at RAISE +-- select elapsed(*) (stub function and group by tag only) (explain) +--Testcase 254: +EXPLAIN VERBOSE +SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (elapsed_all()), tag1 + InfluxDB query: SELECT elapsed(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select elapsed(*) (stub function and group by tag only) (result) +--Testcase 255: +SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + elapsed_all +--------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,1000000000,1000000000,1000000000,1000000000) + (1970-01-01T00:00:02Z,,1000000000,1000000000,1000000000,1000000000) + (1970-01-01T00:00:04Z,,1000000000,1000000000,1000000000,1000000000) +(3 rows) + +-- select elapsed(regex) (stub function and group by tag only) (explain) +--Testcase 256: +EXPLAIN VERBOSE +SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (elapsed('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT elapsed(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select elapsed(regex) (stub function and group by tag only) (result) +--Testcase 257: +SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + elapsed +------------------------------------------------- + (1970-01-01T00:00:01Z,,1000000000,,,1000000000) + (1970-01-01T00:00:02Z,,1000000000,,,1000000000) + (1970-01-01T00:00:04Z,,1000000000,,,1000000000) +(3 rows) + +-- select elapsed(*) (stub function, expose data, explain) +--Testcase 258: +EXPLAIN VERBOSE +SELECT (elapsed_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((elapsed_all())::s3)."time", ((elapsed_all())::s3).tag1, ((elapsed_all())::s3).value1, ((elapsed_all())::s3).value2, ((elapsed_all())::s3).value3, ((elapsed_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select elapsed(*) (stub function, expose data, result) +--Testcase 259: +SELECT (elapsed_all()::s3).* from s3; +ERROR: stub elapsed_all() is called +CONTEXT: PL/pgSQL function elapsed_all() line 3 at RAISE +-- select elapsed(regex) (stub function, expose data, explain) +--Testcase 260: +EXPLAIN VERBOSE +SELECT (elapsed('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((elapsed('/value[1,4]/'::text))::s3)."time", ((elapsed('/value[1,4]/'::text))::s3).tag1, ((elapsed('/value[1,4]/'::text))::s3).value1, ((elapsed('/value[1,4]/'::text))::s3).value2, ((elapsed('/value[1,4]/'::text))::s3).value3, ((elapsed('/value[1,4]/'::text))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select elapsed(regex) (stub agg function, expose data, result) +--Testcase 261: +SELECT (elapsed('/value[1,4]/')::s3).* from s3; +ERROR: stub elapsed(text) is called +CONTEXT: PL/pgSQL function elapsed(text) line 3 at RAISE +--Testcase 262: +EXPLAIN VERBOSE +SELECT moving_average(value1, 2),moving_average(value2, 2),moving_average(value3, 2),moving_average(value4, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: moving_average(value1, 2), moving_average(value2, 2), moving_average(value3, 2), moving_average(value4, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 263: +SELECT moving_average(value1, 2),moving_average(value2, 2),moving_average(value3, 2),moving_average(value4, 2) FROM s3; +ERROR: stub moving_average(float8, int) is called +CONTEXT: PL/pgSQL function moving_average(double precision,integer) line 3 at RAISE +-- select moving_average(*) (stub function, explain) +--Testcase 264: +EXPLAIN VERBOSE +SELECT moving_average_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: moving_average_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select moving_average(*) (stub function, result) +--Testcase 265: +SELECT moving_average_all(2) from s3; +ERROR: stub moving_average_all(int) is called +CONTEXT: PL/pgSQL function moving_average_all(integer) line 3 at RAISE +-- select moving_average(regex) (stub function, explain) +--Testcase 266: +EXPLAIN VERBOSE +SELECT moving_average('/value[1,4]/', 2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: moving_average('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select moving_average(regex) (stub function, result) +--Testcase 267: +SELECT moving_average('/value[1,4]/', 2) from s3; +ERROR: stub moving_average(text, int) is called +CONTEXT: PL/pgSQL function moving_average(text,integer) line 3 at RAISE +-- select moving_average(*) (stub function and group by tag only) (explain) +--Testcase 268: +EXPLAIN VERBOSE +SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (moving_average_all(2)), tag1 + InfluxDB query: SELECT moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select moving_average(*) (stub function and group by tag only) (result) +--Testcase 269: +SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + moving_average_all +--------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,0.15000000000000002,100,-0.15000000000000002,-100) + (1970-01-01T00:00:02Z,,0.25,100,-0.25,-100) + (1970-01-01T00:00:04Z,,1.6500000000000001,200,-1.6500000000000001,-200) +(3 rows) + +-- select moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 270: +EXPLAIN VERBOSE +SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (moving_average('/value[1,4]/'::text, 2)), tag1 + InfluxDB query: SELECT moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select moving_average(regex) (stub function and group by tag only) (result) +--Testcase 271: +SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + moving_average +---------------------------------------------------- + (1970-01-01T00:00:01Z,,0.15000000000000002,,,-100) + (1970-01-01T00:00:02Z,,0.25,,,-100) + (1970-01-01T00:00:04Z,,1.6500000000000001,,,-200) +(3 rows) + +-- select moving_average(*) (stub function, expose data, explain) +--Testcase 272: +EXPLAIN VERBOSE +SELECT (moving_average_all(2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((moving_average_all(2))::s3)."time", ((moving_average_all(2))::s3).tag1, ((moving_average_all(2))::s3).value1, ((moving_average_all(2))::s3).value2, ((moving_average_all(2))::s3).value3, ((moving_average_all(2))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select moving_average(*) (stub function, expose data, result) +--Testcase 273: +SELECT (moving_average_all(2)::s3).* from s3; +ERROR: stub moving_average_all(int) is called +CONTEXT: PL/pgSQL function moving_average_all(integer) line 3 at RAISE +-- select moving_average(regex) (stub function, expose data, explain) +--Testcase 274: +EXPLAIN VERBOSE +SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((moving_average('/value[1,4]/'::text, 2))::s3)."time", ((moving_average('/value[1,4]/'::text, 2))::s3).tag1, ((moving_average('/value[1,4]/'::text, 2))::s3).value1, ((moving_average('/value[1,4]/'::text, 2))::s3).value2, ((moving_average('/value[1,4]/'::text, 2))::s3).value3, ((moving_average('/value[1,4]/'::text, 2))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select moving_average(regex) (stub function, expose data, result) +--Testcase 275: +SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; +ERROR: stub moving_average(text, int) is called +CONTEXT: PL/pgSQL function moving_average(text,integer) line 3 at RAISE +--Testcase 276: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator(value1, 2),chande_momentum_oscillator(value2, 2),chande_momentum_oscillator(value3, 2),chande_momentum_oscillator(value4, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: chande_momentum_oscillator(value1, 2), chande_momentum_oscillator(value2, 2), chande_momentum_oscillator(value3, 2), chande_momentum_oscillator(value4, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 277: +SELECT chande_momentum_oscillator(value1, 2),chande_momentum_oscillator(value2, 2),chande_momentum_oscillator(value3, 2),chande_momentum_oscillator(value4, 2) FROM s3; +ERROR: stub chande_momentum_oscillator(float8, int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator(double precision,integer) line 3 at RAISE +--Testcase 278: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator(value1, 2, 2),chande_momentum_oscillator(value2, 2, 2),chande_momentum_oscillator(value3, 2, 2),chande_momentum_oscillator(value4, 2, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: chande_momentum_oscillator(value1, 2, 2), chande_momentum_oscillator(value2, 2, 2), chande_momentum_oscillator(value3, 2, 2), chande_momentum_oscillator(value4, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 279: +SELECT chande_momentum_oscillator(value1, 2, 2),chande_momentum_oscillator(value2, 2, 2),chande_momentum_oscillator(value3, 2, 2),chande_momentum_oscillator(value4, 2, 2) FROM s3; +ERROR: stub chande_momentum_oscillator(float8, int, int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator(double precision,integer,integer) line 3 at RAISE +-- select chande_momentum_oscillator(*) (stub function, explain) +--Testcase 280: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: chande_momentum_oscillator_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select chande_momentum_oscillator(*) (stub function, result) +--Testcase 281: +SELECT chande_momentum_oscillator_all(2) from s3; +ERROR: stub chande_momentum_oscillator_all(int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator_all(integer) line 3 at RAISE +-- select chande_momentum_oscillator(regex) (stub function, explain) +--Testcase 282: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: chande_momentum_oscillator('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select chande_momentum_oscillator(regex) (stub agg function, result) +--Testcase 283: +SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; +ERROR: stub chande_momentum_oscillator(text, int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator(text,integer) line 3 at RAISE +-- select chande_momentum_oscillator(*) (stub function and group by tag only) (explain) +--Testcase 284: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (chande_momentum_oscillator_all(2)), tag1 + InfluxDB query: SELECT chande_momentum_oscillator(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select chande_momentum_oscillator(*) (stub agg function and group by tag only) (result) +--Testcase 285: +SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + chande_momentum_oscillator_all +-------------------------------------- + (1970-01-01T00:00:01Z,,100,0,-100,0) + (1970-01-01T00:00:02Z,,100,0,-100,0) + (1970-01-01T00:00:04Z,,100,0,-100,0) +(3 rows) + +-- select chande_momentum_oscillator(regex) (stub agg function and group by tag only) (explain) +--Testcase 286: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (chande_momentum_oscillator('/value[1,4]/'::text, 2)), tag1 + InfluxDB query: SELECT chande_momentum_oscillator(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select chande_momentum_oscillator(regex) (stub function and group by tag only) (result) +--Testcase 287: +SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + chande_momentum_oscillator +--------------------------------- + (1970-01-01T00:00:01Z,,100,,,0) + (1970-01-01T00:00:02Z,,100,,,0) + (1970-01-01T00:00:04Z,,100,,,0) +(3 rows) + +-- select chande_momentum_oscillator(*) (stub agg function, expose data, explain) +--Testcase 288: +EXPLAIN VERBOSE +SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((chande_momentum_oscillator_all(2))::s3)."time", ((chande_momentum_oscillator_all(2))::s3).tag1, ((chande_momentum_oscillator_all(2))::s3).value1, ((chande_momentum_oscillator_all(2))::s3).value2, ((chande_momentum_oscillator_all(2))::s3).value3, ((chande_momentum_oscillator_all(2))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select chande_momentum_oscillator(*) (stub function, expose data, result) +--Testcase 289: +SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; +ERROR: stub chande_momentum_oscillator_all(int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator_all(integer) line 3 at RAISE +-- select chande_momentum_oscillator(regex) (stub function, expose data, explain) +--Testcase 290: +EXPLAIN VERBOSE +SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((chande_momentum_oscillator('/value[1,4]/'::text, 2))::s3)."time", ((chande_momentum_oscillator('/value[1,4]/'::text, 2))::s3).tag1, ((chande_momentum_oscillator('/value[1,4]/'::text, 2))::s3).value1, ((chande_momentum_oscillator('/value[1,4]/'::text, 2))::s3).value2, ((chande_momentum_oscillator('/value[1,4]/'::text, 2))::s3).value3, ((chande_momentum_oscillator('/value[1,4]/'::text, 2))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select chande_momentum_oscillator(regex) (stub function, expose data, result) +--Testcase 291: +SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; +ERROR: stub chande_momentum_oscillator(text, int) is called +CONTEXT: PL/pgSQL function chande_momentum_oscillator(text,integer) line 3 at RAISE +--Testcase 292: +EXPLAIN VERBOSE +SELECT exponential_moving_average(value1, 2),exponential_moving_average(value2, 2),exponential_moving_average(value3, 2),exponential_moving_average(value4, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: exponential_moving_average(value1, 2), exponential_moving_average(value2, 2), exponential_moving_average(value3, 2), exponential_moving_average(value4, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 293: +SELECT exponential_moving_average(value1, 2),exponential_moving_average(value2, 2),exponential_moving_average(value3, 2),exponential_moving_average(value4, 2) FROM s3; +ERROR: stub exponential_moving_average(float8, int) is called +CONTEXT: PL/pgSQL function exponential_moving_average(double precision,integer) line 3 at RAISE +--Testcase 294: +EXPLAIN VERBOSE +SELECT exponential_moving_average(value1, 2, 2),exponential_moving_average(value2, 2, 2),exponential_moving_average(value3, 2, 2),exponential_moving_average(value4, 2, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: exponential_moving_average(value1, 2, 2), exponential_moving_average(value2, 2, 2), exponential_moving_average(value3, 2, 2), exponential_moving_average(value4, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 295: +SELECT exponential_moving_average(value1, 2, 2),exponential_moving_average(value2, 2, 2),exponential_moving_average(value3, 2, 2),exponential_moving_average(value4, 2, 2) FROM s3; +ERROR: stub exponential_moving_average(float8, int, int) is called +CONTEXT: PL/pgSQL function exponential_moving_average(double precision,integer,integer) line 3 at RAISE +-- select exponential_moving_average(*) (stub function, explain) +--Testcase 296: +EXPLAIN VERBOSE +SELECT exponential_moving_average_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: exponential_moving_average_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select exponential_moving_average(*) (stub function, result) +--Testcase 297: +SELECT exponential_moving_average_all(2) from s3; +ERROR: stub exponential_moving_average_all(int) is called +CONTEXT: PL/pgSQL function exponential_moving_average_all(integer) line 3 at RAISE +-- select exponential_moving_average(regex) (stub function, explain) +--Testcase 298: +EXPLAIN VERBOSE +SELECT exponential_moving_average('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: exponential_moving_average('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select exponential_moving_average(regex) (stub function, result) +--Testcase 299: +SELECT exponential_moving_average('/value[1,4]/',2) from s3; +ERROR: stub exponential_moving_average(text, int) is called +CONTEXT: PL/pgSQL function exponential_moving_average(text,integer) line 3 at RAISE +-- select exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 300: +EXPLAIN VERBOSE +SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (exponential_moving_average_all(2)), tag1 + InfluxDB query: SELECT exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 301: +SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + exponential_moving_average_all +--------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,0.16666666666666669,100,-0.16666666666666669,-100) + (1970-01-01T00:00:02Z,,0.25555555555555554,100,-0.25555555555555554,-100) + (1970-01-01T00:00:04Z,,1.8333333333333335,200,-1.8333333333333335,-200) +(3 rows) + +-- select exponential_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 302: +EXPLAIN VERBOSE +SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (exponential_moving_average('/value[1,4]/'::text, 2)), tag1 + InfluxDB query: SELECT exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select exponential_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 303: +SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + exponential_moving_average +---------------------------------------------------- + (1970-01-01T00:00:01Z,,0.16666666666666669,,,-100) + (1970-01-01T00:00:02Z,,0.25555555555555554,,,-100) + (1970-01-01T00:00:04Z,,1.8333333333333335,,,-200) +(3 rows) + +--Testcase 304: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average(value1, 2),double_exponential_moving_average(value2, 2),double_exponential_moving_average(value3, 2),double_exponential_moving_average(value4, 2) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: double_exponential_moving_average(value1, 2), double_exponential_moving_average(value2, 2), double_exponential_moving_average(value3, 2), double_exponential_moving_average(value4, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 305: +SELECT double_exponential_moving_average(value1, 2),double_exponential_moving_average(value2, 2),double_exponential_moving_average(value3, 2),double_exponential_moving_average(value4, 2) FROM s3; +ERROR: stub double_exponential_moving_average(float8, int) is called +CONTEXT: PL/pgSQL function double_exponential_moving_average(double precision,integer) line 3 at RAISE +--Testcase 306: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average(value1, 2, 2),double_exponential_moving_average(value2, 2, 2),double_exponential_moving_average(value3, 2, 2),double_exponential_moving_average(value4, 2, 2) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: double_exponential_moving_average(value1, 2, 2), double_exponential_moving_average(value2, 2, 2), double_exponential_moving_average(value3, 2, 2), double_exponential_moving_average(value4, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 307: +SELECT double_exponential_moving_average(value1, 2, 2),double_exponential_moving_average(value2, 2, 2),double_exponential_moving_average(value3, 2, 2),double_exponential_moving_average(value4, 2, 2) FROM s3; +ERROR: stub double_exponential_moving_average(float8, int, int) is called +CONTEXT: PL/pgSQL function double_exponential_moving_average(double precision,integer,integer) line 3 at RAISE +-- select double_exponential_moving_average(*) (stub function, explain) +--Testcase 308: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: double_exponential_moving_average_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select double_exponential_moving_average(*) (stub function, result) +--Testcase 309: +SELECT double_exponential_moving_average_all(2) from s3; +ERROR: stub double_exponential_moving_average_all(int) is called +CONTEXT: PL/pgSQL function double_exponential_moving_average_all(integer) line 3 at RAISE +-- select double_exponential_moving_average(regex) (stub function, explain) +--Testcase 310: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: double_exponential_moving_average('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select double_exponential_moving_average(regex) (stub function, result) +--Testcase 311: +SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; +ERROR: stub double_exponential_moving_average(text, int) is called +CONTEXT: PL/pgSQL function double_exponential_moving_average(text,integer) line 3 at RAISE +-- select double_exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 312: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (double_exponential_moving_average_all(2)), tag1 + InfluxDB query: SELECT double_exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select double_exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 313: +SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + double_exponential_moving_average_all +--------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1888888888888889,100,-0.1888888888888889,-100) + (1970-01-01T00:00:02Z,,0.29259259259259257,100,-0.29259259259259257,-100) + (1970-01-01T00:00:04Z,,2.077777777777778,200,-2.077777777777778,-200) +(3 rows) + +-- select double_exponential_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 314: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (double_exponential_moving_average('/value[1,4]/'::text, 2)), tag1 + InfluxDB query: SELECT double_exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select double_exponential_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 315: +SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + double_exponential_moving_average +---------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1888888888888889,,,-100) + (1970-01-01T00:00:02Z,,0.29259259259259257,,,-100) + (1970-01-01T00:00:04Z,,2.077777777777778,,,-200) +(3 rows) + +--Testcase 316: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio(value1, 2),kaufmans_efficiency_ratio(value2, 2),kaufmans_efficiency_ratio(value3, 2),kaufmans_efficiency_ratio(value4, 2) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: kaufmans_efficiency_ratio(value1, 2), kaufmans_efficiency_ratio(value2, 2), kaufmans_efficiency_ratio(value3, 2), kaufmans_efficiency_ratio(value4, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 317: +SELECT kaufmans_efficiency_ratio(value1, 2),kaufmans_efficiency_ratio(value2, 2),kaufmans_efficiency_ratio(value3, 2),kaufmans_efficiency_ratio(value4, 2) FROM s3; +ERROR: stub kaufmans_efficiency_ratio(float8, int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio(double precision,integer) line 3 at RAISE +--Testcase 318: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio(value1, 2, 2),kaufmans_efficiency_ratio(value2, 2, 2),kaufmans_efficiency_ratio(value3, 2, 2),kaufmans_efficiency_ratio(value4, 2, 2) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: kaufmans_efficiency_ratio(value1, 2, 2), kaufmans_efficiency_ratio(value2, 2, 2), kaufmans_efficiency_ratio(value3, 2, 2), kaufmans_efficiency_ratio(value4, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 319: +SELECT kaufmans_efficiency_ratio(value1, 2, 2),kaufmans_efficiency_ratio(value2, 2, 2),kaufmans_efficiency_ratio(value3, 2, 2),kaufmans_efficiency_ratio(value4, 2, 2) FROM s3; +ERROR: stub kaufmans_efficiency_ratio(float8, int, int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio(double precision,integer,integer) line 3 at RAISE +-- select kaufmans_efficiency_ratio(*) (stub function, explain) +--Testcase 320: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: kaufmans_efficiency_ratio_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_efficiency_ratio(*) (stub function, result) +--Testcase 321: +SELECT kaufmans_efficiency_ratio_all(2) from s3; +ERROR: stub kaufmans_efficiency_ratio_all(int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio_all(integer) line 3 at RAISE +-- select kaufmans_efficiency_ratio(regex) (stub function, explain) +--Testcase 322: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: kaufmans_efficiency_ratio('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_efficiency_ratio(regex) (stub function, result) +--Testcase 323: +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; +ERROR: stub kaufmans_efficiency_ratio(text, int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio(text,integer) line 3 at RAISE +-- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (explain) +--Testcase 324: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (kaufmans_efficiency_ratio_all(2)), tag1 + InfluxDB query: SELECT kaufmans_efficiency_ratio(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (result) +--Testcase 325: +SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + kaufmans_efficiency_ratio_all +--------------------------------- + (1970-01-01T00:00:02Z,,1,0,1,0) +(1 row) + +-- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (explain) +--Testcase 326: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (kaufmans_efficiency_ratio('/value[1,4]/'::text, 2)), tag1 + InfluxDB query: SELECT kaufmans_efficiency_ratio(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (result) +--Testcase 327: +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + kaufmans_efficiency_ratio +------------------------------- + (1970-01-01T00:00:02Z,,1,,,0) +(1 row) + +-- select kaufmans_efficiency_ratio(*) (stub function, expose data, explain) +--Testcase 328: +EXPLAIN VERBOSE +SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((kaufmans_efficiency_ratio_all(2))::s3)."time", ((kaufmans_efficiency_ratio_all(2))::s3).tag1, ((kaufmans_efficiency_ratio_all(2))::s3).value1, ((kaufmans_efficiency_ratio_all(2))::s3).value2, ((kaufmans_efficiency_ratio_all(2))::s3).value3, ((kaufmans_efficiency_ratio_all(2))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_efficiency_ratio(*) (stub function, expose data, result) +--Testcase 329: +SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; +ERROR: stub kaufmans_efficiency_ratio_all(int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio_all(integer) line 3 at RAISE +-- select kaufmans_efficiency_ratio(regex) (stub function, expose data, explain) +--Testcase 330: +EXPLAIN VERBOSE +SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2))::s3)."time", ((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2))::s3).tag1, ((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2))::s3).value1, ((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2))::s3).value2, ((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2))::s3).value3, ((kaufmans_efficiency_ratio('/value[1,4]/'::text, 2))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_efficiency_ratio(regex) (stub function, expose data, result) +--Testcase 331: +SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; +ERROR: stub kaufmans_efficiency_ratio(text, int) is called +CONTEXT: PL/pgSQL function kaufmans_efficiency_ratio(text,integer) line 3 at RAISE +--Testcase 332: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average(value1, 2),kaufmans_adaptive_moving_average(value2, 2),kaufmans_adaptive_moving_average(value3, 2),kaufmans_adaptive_moving_average(value4, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: kaufmans_adaptive_moving_average(value1, 2), kaufmans_adaptive_moving_average(value2, 2), kaufmans_adaptive_moving_average(value3, 2), kaufmans_adaptive_moving_average(value4, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 333: +SELECT kaufmans_adaptive_moving_average(value1, 2),kaufmans_adaptive_moving_average(value2, 2),kaufmans_adaptive_moving_average(value3, 2),kaufmans_adaptive_moving_average(value4, 2) FROM s3; +ERROR: stub kaufmans_adaptive_moving_average(float8, int) is called +CONTEXT: PL/pgSQL function kaufmans_adaptive_moving_average(double precision,integer) line 3 at RAISE +--Testcase 334: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average(value1, 2, 2),kaufmans_adaptive_moving_average(value2, 2, 2),kaufmans_adaptive_moving_average(value3, 2, 2),kaufmans_adaptive_moving_average(value4, 2, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: kaufmans_adaptive_moving_average(value1, 2, 2), kaufmans_adaptive_moving_average(value2, 2, 2), kaufmans_adaptive_moving_average(value3, 2, 2), kaufmans_adaptive_moving_average(value4, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 335: +SELECT kaufmans_adaptive_moving_average(value1, 2, 2),kaufmans_adaptive_moving_average(value2, 2, 2),kaufmans_adaptive_moving_average(value3, 2, 2),kaufmans_adaptive_moving_average(value4, 2, 2) FROM s3; +ERROR: stub kaufmans_adaptive_moving_average(float8, int, int) is called +CONTEXT: PL/pgSQL function kaufmans_adaptive_moving_average(double precision,integer,integer) line 3 at RAISE +-- select kaufmans_adaptive_moving_average(*) (stub function, explain) +--Testcase 336: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: kaufmans_adaptive_moving_average_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_adaptive_moving_average(*) (stub function, result) +--Testcase 337: +SELECT kaufmans_adaptive_moving_average_all(2) from s3; +ERROR: stub kaufmans_adaptive_moving_average_all(int) is called +CONTEXT: PL/pgSQL function kaufmans_adaptive_moving_average_all(integer) line 3 at RAISE +-- select kaufmans_adaptive_moving_average(regex) (stub function, explain) +--Testcase 338: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: kaufmans_adaptive_moving_average('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select kaufmans_adaptive_moving_average(regex) (stub agg function, result) +--Testcase 339: +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; +ERROR: stub kaufmans_adaptive_moving_average(text, int) is called +CONTEXT: PL/pgSQL function kaufmans_adaptive_moving_average(text,integer) line 3 at RAISE +-- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 340: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (kaufmans_adaptive_moving_average_all(2)), tag1 + InfluxDB query: SELECT kaufmans_adaptive_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (result) +--Testcase 341: +SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + kaufmans_adaptive_moving_average_all +--------------------------------------------------------------------------- + (1970-01-01T00:00:02Z,,0.24444444444444446,100,-0.24444444444444446,-100) +(1 row) + +-- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 342: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (kaufmans_adaptive_moving_average('/value[1,4]/'::text, 2)), tag1 + InfluxDB query: SELECT kaufmans_adaptive_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 343: +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + kaufmans_adaptive_moving_average +---------------------------------------------------- + (1970-01-01T00:00:02Z,,0.24444444444444446,,,-100) +(1 row) + +--Testcase 344: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average(value1, 2),triple_exponential_moving_average(value2, 2),triple_exponential_moving_average(value3, 2),triple_exponential_moving_average(value4, 2) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: triple_exponential_moving_average(value1, 2), triple_exponential_moving_average(value2, 2), triple_exponential_moving_average(value3, 2), triple_exponential_moving_average(value4, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 345: +SELECT triple_exponential_moving_average(value1, 2),triple_exponential_moving_average(value2, 2),triple_exponential_moving_average(value3, 2),triple_exponential_moving_average(value4, 2) FROM s3; +ERROR: stub triple_exponential_moving_average(float8, int) is called +CONTEXT: PL/pgSQL function triple_exponential_moving_average(double precision,integer) line 3 at RAISE +--Testcase 346: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average(value1, 2, 2),triple_exponential_moving_average(value2, 2, 2),triple_exponential_moving_average(value3, 2, 2),triple_exponential_moving_average(value4, 2, 2) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: triple_exponential_moving_average(value1, 2, 2), triple_exponential_moving_average(value2, 2, 2), triple_exponential_moving_average(value3, 2, 2), triple_exponential_moving_average(value4, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 347: +SELECT triple_exponential_moving_average(value1, 2, 2),triple_exponential_moving_average(value2, 2, 2),triple_exponential_moving_average(value3, 2, 2),triple_exponential_moving_average(value4, 2, 2) FROM s3; +ERROR: stub triple_exponential_moving_average(float8, int, int) is called +CONTEXT: PL/pgSQL function triple_exponential_moving_average(double precision,integer,integer) line 3 at RAISE +-- select triple_exponential_moving_average(*) (stub function, explain) +--Testcase 348: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: triple_exponential_moving_average_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select triple_exponential_moving_average(*) (stub function, result) +--Testcase 349: +SELECT triple_exponential_moving_average_all(2) from s3; +ERROR: stub triple_exponential_moving_average_all(int) is called +CONTEXT: PL/pgSQL function triple_exponential_moving_average_all(integer) line 3 at RAISE +-- select triple_exponential_moving_average(regex) (stub function, explain) +--Testcase 350: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: triple_exponential_moving_average('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select triple_exponential_moving_average(regex) (stub function, result) +--Testcase 351: +SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; +ERROR: stub triple_exponential_moving_average(text, int) is called +CONTEXT: PL/pgSQL function triple_exponential_moving_average(text,integer) line 3 at RAISE +-- select triple_exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 352: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (triple_exponential_moving_average_all(2)), tag1 + InfluxDB query: SELECT triple_exponential_moving_average(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select triple_exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 353: +SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + triple_exponential_moving_average_all +--------------------------------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1962962962962963,100,-0.1962962962962963,-100) + (1970-01-01T00:00:02Z,,0.30000000000000004,100,-0.30000000000000004,-100) + (1970-01-01T00:00:04Z,,2.1592592592592585,200,-2.1592592592592585,-200) +(3 rows) + +-- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (explain) +--Testcase 354: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (triple_exponential_moving_average('/value[1,4]/'::text, 2)), tag1 + InfluxDB query: SELECT triple_exponential_moving_average(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (result) +--Testcase 355: +SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + triple_exponential_moving_average +---------------------------------------------------- + (1970-01-01T00:00:01Z,,0.1962962962962963,,,-100) + (1970-01-01T00:00:02Z,,0.30000000000000004,,,-100) + (1970-01-01T00:00:04Z,,2.1592592592592585,,,-200) +(3 rows) + +--Testcase 356: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative(value1, 2),triple_exponential_derivative(value2, 2),triple_exponential_derivative(value3, 2),triple_exponential_derivative(value4, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: triple_exponential_derivative(value1, 2), triple_exponential_derivative(value2, 2), triple_exponential_derivative(value3, 2), triple_exponential_derivative(value4, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 357: +SELECT triple_exponential_derivative(value1, 2),triple_exponential_derivative(value2, 2),triple_exponential_derivative(value3, 2),triple_exponential_derivative(value4, 2) FROM s3; +ERROR: stub triple_exponential_derivative(float8, int) is called +CONTEXT: PL/pgSQL function triple_exponential_derivative(double precision,integer) line 3 at RAISE +--Testcase 358: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative(value1, 2, 2),triple_exponential_derivative(value2, 2, 2),triple_exponential_derivative(value3, 2, 2),triple_exponential_derivative(value4, 2, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: triple_exponential_derivative(value1, 2, 2), triple_exponential_derivative(value2, 2, 2), triple_exponential_derivative(value3, 2, 2), triple_exponential_derivative(value4, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 359: +SELECT triple_exponential_derivative(value1, 2, 2),triple_exponential_derivative(value2, 2, 2),triple_exponential_derivative(value3, 2, 2),triple_exponential_derivative(value4, 2, 2) FROM s3; +ERROR: stub triple_exponential_derivative(float8, int, int) is called +CONTEXT: PL/pgSQL function triple_exponential_derivative(double precision,integer,integer) line 3 at RAISE +-- select triple_exponential_derivative(*) (stub function, explain) +--Testcase 360: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: triple_exponential_derivative_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select triple_exponential_derivative(*) (stub function, result) +--Testcase 361: +SELECT triple_exponential_derivative_all(2) from s3; +ERROR: stub triple_exponential_derivative_all(int) is called +CONTEXT: PL/pgSQL function triple_exponential_derivative_all(integer) line 3 at RAISE +-- select triple_exponential_derivative(regex) (stub function, explain) +--Testcase 362: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: triple_exponential_derivative('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select triple_exponential_derivative(regex) (stub function, result) +--Testcase 363: +SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; +ERROR: stub triple_exponential_derivative(text, int) is called +CONTEXT: PL/pgSQL function triple_exponential_derivative(text,integer) line 3 at RAISE +-- select triple_exponential_derivative(*) (stub function and group by tag only) (explain) +--Testcase 364: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (triple_exponential_derivative_all(2)), tag1 + InfluxDB query: SELECT triple_exponential_derivative(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select triple_exponential_derivative(*) (stub function and group by tag only) (result) +--Testcase 365: +SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + triple_exponential_derivative_all +----------------------------------------------------------------- + (1970-01-01T00:00:02Z,,45.71428571428569,0,45.71428571428569,0) +(1 row) + +-- select triple_exponential_derivative(regex) (stub function and group by tag only) (explain) +--Testcase 366: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (triple_exponential_derivative('/value[1,4]/'::text, 2)), tag1 + InfluxDB query: SELECT triple_exponential_derivative(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select triple_exponential_derivative(regex) (stub function and group by tag only) (result) +--Testcase 367: +SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + triple_exponential_derivative +----------------------------------------------- + (1970-01-01T00:00:02Z,,45.71428571428569,,,0) +(1 row) + +--Testcase 368: +EXPLAIN VERBOSE +SELECT relative_strength_index(value1, 2),relative_strength_index(value2, 2),relative_strength_index(value3, 2),relative_strength_index(value4, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: relative_strength_index(value1, 2), relative_strength_index(value2, 2), relative_strength_index(value3, 2), relative_strength_index(value4, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 369: +SELECT relative_strength_index(value1, 2),relative_strength_index(value2, 2),relative_strength_index(value3, 2),relative_strength_index(value4, 2) FROM s3; +ERROR: stub relative_strength_index(float8, int) is called +CONTEXT: PL/pgSQL function relative_strength_index(double precision,integer) line 3 at RAISE +--Testcase 370: +EXPLAIN VERBOSE +SELECT relative_strength_index(value1, 2, 2),relative_strength_index(value2, 2, 2),relative_strength_index(value3, 2, 2),relative_strength_index(value4, 2, 2) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: relative_strength_index(value1, 2, 2), relative_strength_index(value2, 2, 2), relative_strength_index(value3, 2, 2), relative_strength_index(value4, 2, 2) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +--Testcase 371: +SELECT relative_strength_index(value1, 2, 2),relative_strength_index(value2, 2, 2),relative_strength_index(value3, 2, 2),relative_strength_index(value4, 2, 2) FROM s3; +ERROR: stub relative_strength_index(float8, int, int) is called +CONTEXT: PL/pgSQL function relative_strength_index(double precision,integer,integer) line 3 at RAISE +-- select relative_strength_index(*) (stub function, explain) +--Testcase 372: +EXPLAIN VERBOSE +SELECT relative_strength_index_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: relative_strength_index_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select relative_strength_index(*) (stub function, result) +--Testcase 373: +SELECT relative_strength_index_all(2) from s3; +ERROR: stub relative_strength_index_all(int) is called +CONTEXT: PL/pgSQL function relative_strength_index_all(integer) line 3 at RAISE +-- select relative_strength_index(regex) (stub agg function, explain) +--Testcase 374: +EXPLAIN VERBOSE +SELECT relative_strength_index('/value[1,4]/',2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: relative_strength_index('/value[1,4]/'::text, 2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select relative_strength_index(regex) (stub agg function, result) +--Testcase 375: +SELECT relative_strength_index('/value[1,4]/',2) from s3; +ERROR: stub relative_strength_index(text, int) is called +CONTEXT: PL/pgSQL function relative_strength_index(text,integer) line 3 at RAISE +-- select relative_strength_index(*) (stub function and group by tag only) (explain) +--Testcase 376: +EXPLAIN VERBOSE +SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (relative_strength_index_all(2)), tag1 + InfluxDB query: SELECT relative_strength_index(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select relative_strength_index(*) (stub function and group by tag only) (result) +--Testcase 377: +SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + relative_strength_index_all +------------------------------------- + (1970-01-01T00:00:02Z,,100,100,0,0) +(1 row) + +-- select relative_strength_index(regex) (stub function and group by tag only) (explain) +--Testcase 378: +EXPLAIN VERBOSE +SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (relative_strength_index('/value[1,4]/'::text, 2)), tag1 + InfluxDB query: SELECT relative_strength_index(/value[1,4]/, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select relative_strength_index(regex) (stub function and group by tag only) (result) +--Testcase 379: +SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + relative_strength_index +--------------------------------- + (1970-01-01T00:00:02Z,,100,,,0) +(1 row) + +-- select relative_strength_index(*) (stub function, expose data, explain) +--Testcase 380: +EXPLAIN VERBOSE +SELECT (relative_strength_index_all(2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((relative_strength_index_all(2))::s3)."time", ((relative_strength_index_all(2))::s3).tag1, ((relative_strength_index_all(2))::s3).value1, ((relative_strength_index_all(2))::s3).value2, ((relative_strength_index_all(2))::s3).value3, ((relative_strength_index_all(2))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select relative_strength_index(*) (stub function, expose data, result) +--Testcase 381: +SELECT (relative_strength_index_all(2)::s3).* from s3; +ERROR: stub relative_strength_index_all(int) is called +CONTEXT: PL/pgSQL function relative_strength_index_all(integer) line 3 at RAISE +-- select relative_strength_index(regex) (stub function, expose data, explain) +--Testcase 382: +EXPLAIN VERBOSE +SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((relative_strength_index('/value[1,4]/'::text, 2))::s3)."time", ((relative_strength_index('/value[1,4]/'::text, 2))::s3).tag1, ((relative_strength_index('/value[1,4]/'::text, 2))::s3).value1, ((relative_strength_index('/value[1,4]/'::text, 2))::s3).value2, ((relative_strength_index('/value[1,4]/'::text, 2))::s3).value3, ((relative_strength_index('/value[1,4]/'::text, 2))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select relative_strength_index(regex) (stub function, expose data, result) +--Testcase 383: +SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; +ERROR: stub relative_strength_index(text, int) is called +CONTEXT: PL/pgSQL function relative_strength_index(text,integer) line 3 at RAISE +-- select integral (stub agg function, explain) +--Testcase 384: +EXPLAIN VERBOSE +SELECT integral(value1),integral(value2),integral(value3),integral(value4) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (integral(value1)), (integral(value2)), (integral(value3)), (integral(value4)) + InfluxDB query: SELECT integral("value1"), integral("value2"), integral("value3"), integral("value4") FROM "s3" +(3 rows) + +-- select integral (stub agg function, result) +--Testcase 385: +SELECT integral(value1),integral(value2),integral(value3),integral(value4) FROM s3; + integral | integral | integral | integral +----------+----------+----------+---------- + 5.5 | 750 | -5.5 | -750 +(1 row) + +--Testcase 386: +EXPLAIN VERBOSE +SELECT integral(value1, interval '1s'),integral(value2, interval '1s'),integral(value3, interval '1s'),integral(value4, interval '1s') FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (integral(value1, '@ 1 sec'::interval)), (integral(value2, '@ 1 sec'::interval)), (integral(value3, '@ 1 sec'::interval)), (integral(value4, '@ 1 sec'::interval)) + InfluxDB query: SELECT integral("value1", 0d0h0m1s0u), integral("value2", 0d0h0m1s0u), integral("value3", 0d0h0m1s0u), integral("value4", 0d0h0m1s0u) FROM "s3" +(3 rows) + +-- select integral (stub agg function, result) +--Testcase 387: +SELECT integral(value1, interval '1s'),integral(value2, interval '1s'),integral(value3, interval '1s'),integral(value4, interval '1s') FROM s3; + integral | integral | integral | integral +----------+----------+----------+---------- + 5.5 | 750 | -5.5 | -750 +(1 row) + +-- select integral (stub agg function, raise exception if not expected type) +--Testcase 388: +SELECT integral(value1::numeric),integral(value2::numeric),integral(value3::numeric),integral(value4::numeric) FROM s3; +ERROR: stub integral_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE +-- select integral (stub agg function and group by influx_time() and tag) (explain) +--Testcase 389: +EXPLAIN VERBOSE +SELECT integral("value1"),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (integral(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT integral("value1") FROM "s3" GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select integral (stub agg function and group by influx_time() and tag) (result) +--Testcase 390: +SELECT integral("value1"),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + integral | influx_time | tag1 +---------------------+------------------------+------ + 0.15000000000000002 | 1970-01-01 09:00:00+09 | a + 0.25 | 1970-01-01 09:00:01+09 | a + 1.6500000000000001 | 1970-01-01 09:00:03+09 | b + 2.75 | 1970-01-01 09:00:04+09 | b +(4 rows) + +-- select integral (stub agg function and group by influx_time() and tag) (explain) +--Testcase 391: +EXPLAIN VERBOSE +SELECT integral("value1", interval '1s'),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (integral(value1, '@ 1 sec'::interval)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT integral("value1", 0d0h0m1s0u) FROM "s3" GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select integral (stub agg function and group by influx_time() and tag) (result) +--Testcase 392: +SELECT integral("value1", interval '1s'),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + integral | influx_time | tag1 +---------------------+------------------------+------ + 0.15000000000000002 | 1970-01-01 09:00:00+09 | a + 0.25 | 1970-01-01 09:00:01+09 | a + 1.6500000000000001 | 1970-01-01 09:00:03+09 | b + 2.75 | 1970-01-01 09:00:04+09 | b +(4 rows) + +-- select integral (stub agg function and group by tag only) (result) +--Testcase 393: +SELECT tag1,integral("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1 ORDER BY 1; + tag1 | integral +------+-------------------- + a | 0.4 + b | 1.6500000000000001 +(2 rows) + +-- select integral (stub agg function and other aggs) (result) +--Testcase 394: +SELECT sum("value1"),integral("value1"),count("value1") FROM s3; + sum | integral | count +-------------------+----------+------- + 7.199999999999999 | 5.5 | 6 +(1 row) + +-- select integral (stub agg function and group by tag only) (result) +--Testcase 395: +SELECT tag1,integral("value1", interval '1s') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1 ORDER BY 1; + tag1 | integral +------+-------------------- + a | 0.4 + b | 1.6500000000000001 +(2 rows) + +-- select integral (stub agg function and other aggs) (result) +--Testcase 396: +SELECT sum("value1"),integral("value1", interval '1s'),count("value1") FROM s3; + sum | integral | count +-------------------+----------+------- + 7.199999999999999 | 5.5 | 6 +(1 row) + +-- select integral over join query (explain) +--Testcase 397: +EXPLAIN VERBOSE +SELECT integral(t1.value1), integral(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + QUERY PLAN +---------------------------------------------------------------------------------------- + Aggregate (cost=112.64..112.66 rows=1 width=16) + Output: integral(t1.value1), integral(t2.value1) + -> Nested Loop (cost=20.00..28.14 rows=169 width=16) + Output: t1.value1, t2.value1 + -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) + Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..13.06 rows=13 width=8) + Output: t2.value1 + -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) + Output: t2.value1 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select integral over join query (result, stub call error) +--Testcase 398: +SELECT integral(t1.value1), integral(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; +ERROR: stub integral_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE +-- select integral over join query (explain) +--Testcase 399: +EXPLAIN VERBOSE +SELECT integral(t1.value1, interval '1s'), integral(t2.value1, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + QUERY PLAN +---------------------------------------------------------------------------------------------- + Aggregate (cost=112.64..112.66 rows=1 width=16) + Output: integral(t1.value1, '@ 1 sec'::interval), integral(t2.value1, '@ 1 sec'::interval) + -> Nested Loop (cost=20.00..28.14 rows=169 width=16) + Output: t1.value1, t2.value1 + -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) + Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..13.06 rows=13 width=8) + Output: t2.value1 + -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) + Output: t2.value1 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select integral over join query (result, stub call error) +--Testcase 400: +SELECT integral(t1.value1, interval '1s'), integral(t2.value1, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; +ERROR: stub integral_sfunc(double precision, float8, interval) is called +CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision,interval) line 3 at RAISE +-- select integral with having (explain) +--Testcase 401: +EXPLAIN VERBOSE +SELECT integral(value1) FROM s3 HAVING integral(value1) > 100; + QUERY PLAN +-------------------------------------------------------------------------- + Aggregate (cost=3200.00..3200.01 rows=1 width=8) + Output: integral(value1) + Filter: (integral(s3.value1) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) + Output: "time", tag1, value1, value2, value3, value4 + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select integral with having (explain, not pushdown, stub call error) +--Testcase 402: +SELECT integral(value1) FROM s3 HAVING integral(value1) > 100; +ERROR: stub integral_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision) line 3 at RAISE +-- select integral with having (explain) +--Testcase 403: +EXPLAIN VERBOSE +SELECT integral(value1, interval '1s') FROM s3 HAVING integral(value1, interval '1s') > 100; + QUERY PLAN +-------------------------------------------------------------------------------- + Aggregate (cost=3200.00..3200.01 rows=1 width=8) + Output: integral(value1, '@ 1 sec'::interval) + Filter: (integral(s3.value1, '@ 1 sec'::interval) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) + Output: "time", tag1, value1, value2, value3, value4 + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select integral with having (explain, not pushdown, stub call error) +--Testcase 404: +SELECT integral(value1, interval '1s') FROM s3 HAVING integral(value1, interval '1s') > 100; +ERROR: stub integral_sfunc(double precision, float8, interval) is called +CONTEXT: PL/pgSQL function integral_sfunc(double precision,double precision,interval) line 3 at RAISE +-- select integral(*) (stub agg function, explain) +--Testcase 405: +EXPLAIN VERBOSE +SELECT integral_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (integral_all(*)) + InfluxDB query: SELECT integral(*) FROM "s3" +(3 rows) + +-- select integral(*) (stub agg function, result) +--Testcase 406: +SELECT integral_all(*) from s3; + integral_all +------------------------------------------- + (1970-01-01T00:00:00Z,,5.5,750,-5.5,-750) +(1 row) + +-- select integral(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 407: +EXPLAIN VERBOSE +SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (integral_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT integral(*) FROM "s3" GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select integral(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 408: +SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + integral_all +--------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.15000000000000002,100,-0.15000000000000002,-100) + (1970-01-01T00:00:01Z,,0.25,100,-0.25,-100) + (1970-01-01T00:00:03Z,,1.6500000000000001,200,-1.6500000000000001,-200) + (1970-01-01T00:00:04Z,,2.75,200,-2.75,-200) +(4 rows) + +-- select integral(*) (stub agg function and group by tag only) (explain) +--Testcase 409: +EXPLAIN VERBOSE +SELECT integral_all(*) FROM s3 WHERE value1 > 0.3 GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (integral_all(*)), tag1 + InfluxDB query: SELECT integral(*) FROM "s3" WHERE (("value1" > 0.3)) GROUP BY "tag1" +(3 rows) + +-- select integral(*) (stub agg function and group by tag only) (result) +--Testcase 410: +SELECT integral_all(*) FROM s3 WHERE value1 > 0.3 GROUP BY tag1; + integral_all +------------------------------------------- + (1970-01-01T00:00:00Z,,4.4,400,-4.4,-400) +(1 row) + +-- select integral(*) (stub agg function, expose data, explain) +--Testcase 411: +EXPLAIN VERBOSE +SELECT (integral_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((integral_all(*)))::s3)."time", (((integral_all(*)))::s3).tag1, (((integral_all(*)))::s3).value1, (((integral_all(*)))::s3).value2, (((integral_all(*)))::s3).value3, (((integral_all(*)))::s3).value4 + InfluxDB query: SELECT integral(*) FROM "s3" +(3 rows) + +-- select integral(*) (stub agg function, expose data, result) +--Testcase 412: +SELECT (integral_all(*)::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 5.5 | 750 | -5.5 | -750 +(1 row) + +-- select integral(regex) (stub agg function, explain) +--Testcase 413: +EXPLAIN VERBOSE +SELECT integral('/value[1,4]/') from s3; + QUERY PLAN +----------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (integral('/value[1,4]/'::text)) + InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" +(3 rows) + +-- select integral(regex) (stub agg function, result) +--Testcase 414: +SELECT integral('/value[1,4]/') from s3; + integral +------------------------------------ + (1970-01-01T00:00:00Z,,5.5,,,-750) +(1 row) + +-- select integral(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 415: +EXPLAIN VERBOSE +SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +----------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (integral('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT integral(/^v.*/) FROM "s3" GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select integral(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 416: +SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + integral +--------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.15000000000000002,100,-0.15000000000000002,-100) + (1970-01-01T00:00:01Z,,0.25,100,-0.25,-100) + (1970-01-01T00:00:03Z,,1.6500000000000001,200,-1.6500000000000001,-200) + (1970-01-01T00:00:04Z,,2.75,200,-2.75,-200) +(4 rows) + +-- select integral(regex) (stub agg function and group by tag only) (explain) +--Testcase 417: +EXPLAIN VERBOSE +SELECT integral('/value[1,4]/') FROM s3 WHERE value1 > 0.3 GROUP BY tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (integral('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" WHERE (("value1" > 0.3)) GROUP BY "tag1" +(3 rows) + +-- select integral(regex) (stub agg function and group by tag only) (result) +--Testcase 418: +SELECT integral('/value[1,4]/') FROM s3 WHERE value1 > 0.3 GROUP BY tag1; + integral +------------------------------------ + (1970-01-01T00:00:00Z,,4.4,,,-400) +(1 row) + +-- select integral(regex) (stub agg function, expose data, explain) +--Testcase 419: +EXPLAIN VERBOSE +SELECT (integral('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((integral('/value[1,4]/'::text)))::s3)."time", (((integral('/value[1,4]/'::text)))::s3).tag1, (((integral('/value[1,4]/'::text)))::s3).value1, (((integral('/value[1,4]/'::text)))::s3).value2, (((integral('/value[1,4]/'::text)))::s3).value3, (((integral('/value[1,4]/'::text)))::s3).value4 + InfluxDB query: SELECT integral(/value[1,4]/) FROM "s3" +(3 rows) + +-- select integral(regex) (stub agg function, expose data, result) +--Testcase 420: +SELECT (integral('/value[1,4]/')::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 5.5 | | | -750 +(1 row) + +-- select mean (stub agg function, explain) +--Testcase 421: +EXPLAIN VERBOSE +SELECT mean(value1),mean(value2),mean(value3),mean(value4) FROM s3; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (mean(value1)), (mean(value2)), (mean(value3)), (mean(value4)) + InfluxDB query: SELECT mean("value1"), mean("value2"), mean("value3"), mean("value4") FROM "s3" +(3 rows) + +-- select mean (stub agg function, result) +--Testcase 422: +SELECT mean(value1),mean(value2),mean(value3),mean(value4) FROM s3; + mean | mean | mean | mean +------+------+------+------ + 1.2 | 150 | -1.2 | -150 +(1 row) + +-- select mean (stub agg function, raise exception if not expected type) +--Testcase 423: +SELECT mean(value1::numeric),mean(value2::numeric),mean(value3::numeric),mean(value4::numeric) FROM s3; +ERROR: stub mean_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE +-- select mean (stub agg function and group by influx_time() and tag) (explain) +--Testcase 424: +EXPLAIN VERBOSE +SELECT mean("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (mean(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT mean("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select mean (stub agg function and group by influx_time() and tag) (result) +--Testcase 425: +SELECT mean("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + mean | influx_time | tag1 +------+------------------------+------ + 0.1 | 1970-01-01 09:00:00+09 | a + 0.2 | 1970-01-01 09:00:01+09 | a + 0.3 | 1970-01-01 09:00:02+09 | a + | 1970-01-01 09:00:03+09 | a + | 1970-01-01 09:00:04+09 | a + | 1970-01-01 09:00:00+09 | b + | 1970-01-01 09:00:01+09 | b + | 1970-01-01 09:00:02+09 | b + 1.1 | 1970-01-01 09:00:03+09 | b + 2.2 | 1970-01-01 09:00:04+09 | b +(10 rows) + +-- select mean (stub agg function and group by tag only) (result) +--Testcase 426: +SELECT tag1,mean("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + tag1 | mean +------+--------------------- + a | 0.20000000000000004 + b | 1.6500000000000001 +(2 rows) + +-- select mean (stub agg function and other aggs) (result) +--Testcase 427: +SELECT sum("value1"),mean("value1"),count("value1") FROM s3; + sum | mean | count +-------------------+------+------- + 7.199999999999999 | 1.2 | 6 +(1 row) + +-- select mean over join query (explain) +--Testcase 428: +EXPLAIN VERBOSE +SELECT mean(t1.value1), mean(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + QUERY PLAN +---------------------------------------------------------------------------------------- + Aggregate (cost=112.64..112.66 rows=1 width=16) + Output: mean(t1.value1), mean(t2.value1) + -> Nested Loop (cost=20.00..28.14 rows=169 width=16) + Output: t1.value1, t2.value1 + -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) + Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..13.06 rows=13 width=8) + Output: t2.value1 + -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) + Output: t2.value1 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select mean over join query (result, stub call error) +--Testcase 429: +SELECT mean(t1.value1), mean(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; +ERROR: stub mean_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE +-- select mean with having (explain) +--Testcase 430: +EXPLAIN VERBOSE +SELECT mean(value1) FROM s3 HAVING mean(value1) > 100; + QUERY PLAN +-------------------------------------------------------------------------- + Aggregate (cost=3200.00..3200.01 rows=1 width=8) + Output: mean(value1) + Filter: (mean(s3.value1) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) + Output: "time", tag1, value1, value2, value3, value4 + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select mean with having (explain, not pushdown, stub call error) +--Testcase 431: +SELECT mean(value1) FROM s3 HAVING mean(value1) > 100; +ERROR: stub mean_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function mean_sfunc(double precision,double precision) line 3 at RAISE +-- select mean(*) (stub agg function, explain) +--Testcase 432: +EXPLAIN VERBOSE +SELECT mean_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (mean_all(*)) + InfluxDB query: SELECT mean(*) FROM "s3" +(3 rows) + +-- select mean(*) (stub agg function, result) +--Testcase 433: +SELECT mean_all(*) from s3; + mean_all +------------------------------------------- + (1970-01-01T00:00:00Z,,1.2,150,-1.2,-150) +(1 row) + +-- select mean(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 434: +EXPLAIN VERBOSE +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (mean_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT mean(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select mean(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 435: +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + mean_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select mean(*) (stub agg function and group by tag only) (explain) +--Testcase 436: +EXPLAIN VERBOSE +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (mean_all(*)), tag1 + InfluxDB query: SELECT mean(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select mean(*) (stub agg function and group by tag only) (result) +--Testcase 437: +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + mean_all +--------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.20000000000000004,100,-0.20000000000000004,-100) + (1970-01-01T00:00:00Z,,1.6500000000000001,200,-1.6500000000000001,-200) +(2 rows) + +-- select mean(*) (stub agg function, expose data, explain) +--Testcase 438: +EXPLAIN VERBOSE +SELECT (mean_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((mean_all(*)))::s3)."time", (((mean_all(*)))::s3).tag1, (((mean_all(*)))::s3).value1, (((mean_all(*)))::s3).value2, (((mean_all(*)))::s3).value3, (((mean_all(*)))::s3).value4 + InfluxDB query: SELECT mean(*) FROM "s3" +(3 rows) + +-- select mean(*) (stub agg function, expose data, result) +--Testcase 439: +SELECT (mean_all(*)::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 1.2 | 150 | -1.2 | -150 +(1 row) + +-- select mean(regex) (stub agg function, explain) +--Testcase 440: +EXPLAIN VERBOSE +SELECT mean('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (mean('/value[1,4]/'::text)) + InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" +(3 rows) + +-- select mean(regex) (stub agg function, result) +--Testcase 441: +SELECT mean('/value[1,4]/') from s3; + mean +------------------------------------ + (1970-01-01T00:00:00Z,,1.2,,,-150) +(1 row) + +-- select mean(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 442: +EXPLAIN VERBOSE +SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (mean('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT mean(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select mean(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 443: +SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + mean +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select mean(regex) (stub agg function and group by tag only) (explain) +--Testcase 444: +EXPLAIN VERBOSE +SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (mean('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select mean(regex) (stub agg function and group by tag only) (result) +--Testcase 445: +SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + mean +---------------------------------------------------- + (1970-01-01T00:00:00Z,,0.20000000000000004,,,-100) + (1970-01-01T00:00:00Z,,1.6500000000000001,,,-200) +(2 rows) + +-- select mean(regex) (stub agg function, expose data, explain) +--Testcase 446: +EXPLAIN VERBOSE +SELECT (mean('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((mean('/value[1,4]/'::text)))::s3)."time", (((mean('/value[1,4]/'::text)))::s3).tag1, (((mean('/value[1,4]/'::text)))::s3).value1, (((mean('/value[1,4]/'::text)))::s3).value2, (((mean('/value[1,4]/'::text)))::s3).value3, (((mean('/value[1,4]/'::text)))::s3).value4 + InfluxDB query: SELECT mean(/value[1,4]/) FROM "s3" +(3 rows) + +-- select mean(regex) (stub agg function, expose data, result) +--Testcase 447: +SELECT (mean('/value[1,4]/')::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 1.2 | | | -150 +(1 row) + +-- select median (stub agg function, explain) +--Testcase 448: +EXPLAIN VERBOSE +SELECT median(value1),median(value2),median(value3),median(value4) FROM s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (median(value1)), (median(value2)), (median(value3)), (median(value4)) + InfluxDB query: SELECT median("value1"), median("value2"), median("value3"), median("value4") FROM "s3" +(3 rows) + +-- select median (stub agg function, result) +--Testcase 449: +SELECT median(value1),median(value2),median(value3),median(value4) FROM s3; + median | median | median | median +--------+--------+---------------------+-------- + 0.7 | 150 | -0.7000000000000001 | -150 +(1 row) + +-- select median (stub agg function, raise exception if not expected type) +--Testcase 450: +SELECT median(value1::numeric),median(value2::numeric),median(value3::numeric),median(value4::numeric) FROM s3; +ERROR: stub median_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE +-- select median (stub agg function and group by influx_time() and tag) (explain) +--Testcase 451: +EXPLAIN VERBOSE +SELECT median("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (median(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT median("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select median (stub agg function and group by influx_time() and tag) (result) +--Testcase 452: +SELECT median("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + median | influx_time | tag1 +--------+------------------------+------ + 0.1 | 1970-01-01 09:00:00+09 | a + 0.2 | 1970-01-01 09:00:01+09 | a + 0.3 | 1970-01-01 09:00:02+09 | a + | 1970-01-01 09:00:03+09 | a + | 1970-01-01 09:00:04+09 | a + | 1970-01-01 09:00:00+09 | b + | 1970-01-01 09:00:01+09 | b + | 1970-01-01 09:00:02+09 | b + 1.1 | 1970-01-01 09:00:03+09 | b + 2.2 | 1970-01-01 09:00:04+09 | b +(10 rows) + +-- select median (stub agg function and group by tag only) (result) +--Testcase 453: +SELECT tag1,median("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + tag1 | median +------+-------------------- + a | 0.2 + b | 1.6500000000000001 +(2 rows) + +-- select median (stub agg function and other aggs) (result) +--Testcase 454: +SELECT sum("value1"),median("value1"),count("value1") FROM s3; + sum | median | count +-------------------+--------+------- + 7.199999999999999 | 0.7 | 6 +(1 row) + +-- select median over join query (explain) +--Testcase 455: +EXPLAIN VERBOSE +SELECT median(t1.value1), median(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + QUERY PLAN +---------------------------------------------------------------------------------------- + Aggregate (cost=112.64..112.66 rows=1 width=16) + Output: median(t1.value1), median(t2.value1) + -> Nested Loop (cost=20.00..28.14 rows=169 width=16) + Output: t1.value1, t2.value1 + -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) + Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..13.06 rows=13 width=8) + Output: t2.value1 + -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) + Output: t2.value1 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select median over join query (result, stub call error) +--Testcase 456: +SELECT median(t1.value1), median(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; +ERROR: stub median_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE +-- select median with having (explain) +--Testcase 457: +EXPLAIN VERBOSE +SELECT median(value1) FROM s3 HAVING median(value1) > 100; + QUERY PLAN +-------------------------------------------------------------------------- + Aggregate (cost=3200.00..3200.01 rows=1 width=8) + Output: median(value1) + Filter: (median(s3.value1) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) + Output: "time", tag1, value1, value2, value3, value4 + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select median with having (explain, not pushdown, stub call error) +--Testcase 458: +SELECT median(value1) FROM s3 HAVING median(value1) > 100; +ERROR: stub median_sfunc(double precision, float8) is called +CONTEXT: PL/pgSQL function median_sfunc(double precision,double precision) line 3 at RAISE +-- select median(*) (stub agg function, explain) +--Testcase 459: +EXPLAIN VERBOSE +SELECT median_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (median_all(*)) + InfluxDB query: SELECT median(*) FROM "s3" +(3 rows) + +-- select median(*) (stub agg function, result) +--Testcase 460: +SELECT median_all(*) from s3; + median_all +---------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.7,150,-0.7000000000000001,-150) +(1 row) + +-- select median(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 461: +EXPLAIN VERBOSE +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (median_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT median(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select median(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 462: +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + median_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select median(*) (stub agg function and group by tag only) (explain) +--Testcase 463: +EXPLAIN VERBOSE +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (median_all(*)), tag1 + InfluxDB query: SELECT median(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select median(*) (stub agg function and group by tag only) (result) +--Testcase 464: +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + median_all +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:00Z,,1.6500000000000001,200,-1.6500000000000001,-200) +(2 rows) + +-- select median(*) (stub agg function, expose data, explain) +--Testcase 465: +EXPLAIN VERBOSE +SELECT (median_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((median_all(*)))::s3)."time", (((median_all(*)))::s3).tag1, (((median_all(*)))::s3).value1, (((median_all(*)))::s3).value2, (((median_all(*)))::s3).value3, (((median_all(*)))::s3).value4 + InfluxDB query: SELECT median(*) FROM "s3" +(3 rows) + +-- select median(*) (stub agg function, expose data, result) +--Testcase 466: +SELECT (median_all(*)::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+---------------------+-------- + 1970-01-01 09:00:00+09 | | 0.7 | 150 | -0.7000000000000001 | -150 +(1 row) + +-- select median(regex) (stub agg function, explain) +--Testcase 467: +EXPLAIN VERBOSE +SELECT median('/^v.*/') from s3; + QUERY PLAN +--------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (median('/^v.*/'::text)) + InfluxDB query: SELECT median(/^v.*/) FROM "s3" +(3 rows) + +-- select median(regex) (stub agg function, result) +--Testcase 468: +SELECT median('/^v.*/') from s3; + median +---------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.7,150,-0.7000000000000001,-150) +(1 row) + +-- select median(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 469: +EXPLAIN VERBOSE +SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (median('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT median(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select median(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 470: +SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + median +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select median(regex) (stub agg function and group by tag only) (explain) +--Testcase 471: +EXPLAIN VERBOSE +SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (median('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT median(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select median(regex) (stub agg function and group by tag only) (result) +--Testcase 472: +SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + median +--------------------------------------------------- + (1970-01-01T00:00:00Z,,0.2,,,-100) + (1970-01-01T00:00:00Z,,1.6500000000000001,,,-200) +(2 rows) + +-- select median(regex) (stub agg function, expose data, explain) +--Testcase 473: +EXPLAIN VERBOSE +SELECT (median('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((median('/value[1,4]/'::text)))::s3)."time", (((median('/value[1,4]/'::text)))::s3).tag1, (((median('/value[1,4]/'::text)))::s3).value1, (((median('/value[1,4]/'::text)))::s3).value2, (((median('/value[1,4]/'::text)))::s3).value3, (((median('/value[1,4]/'::text)))::s3).value4 + InfluxDB query: SELECT median(/value[1,4]/) FROM "s3" +(3 rows) + +-- select median(regex) (stub agg function, expose data, result) +--Testcase 474: +SELECT (median('/value[1,4]/')::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 0.7 | | | -150 +(1 row) + +-- select influx_mode (stub agg function, explain) +--Testcase 475: +EXPLAIN VERBOSE +SELECT influx_mode(value1),influx_mode(value2),influx_mode(value3),influx_mode(value4) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_mode(value1)), (influx_mode(value2)), (influx_mode(value3)), (influx_mode(value4)) + InfluxDB query: SELECT mode("value1"), mode("value2"), mode("value3"), mode("value4") FROM "s3" +(3 rows) + +-- select influx_mode (stub agg function, result) +--Testcase 476: +SELECT influx_mode(value1),influx_mode(value2),influx_mode(value3),influx_mode(value4) FROM s3; + influx_mode | influx_mode | influx_mode | influx_mode +-------------+-------------+-------------+------------- + 0.1 | 100 | -3.3 | -100 +(1 row) + +-- select influx_mode (stub agg function, raise exception if not expected type) +--Testcase 477: +SELECT influx_mode(value1::numeric),influx_mode(value2::numeric),influx_mode(value3::numeric),influx_mode(value4::numeric) FROM s3; +ERROR: stub influx_mode_sfunc(anyelement, anyelement) is called +CONTEXT: PL/pgSQL function influx_mode_sfunc(anyelement,anyelement) line 3 at RAISE +-- select influx_mode (stub agg function and group by influx_time() and tag) (explain) +--Testcase 478: +EXPLAIN VERBOSE +SELECT influx_mode("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (influx_mode(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT mode("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select influx_mode (stub agg function and group by influx_time() and tag) (result) +--Testcase 479: +SELECT influx_mode("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_mode | influx_time | tag1 +-------------+------------------------+------ + 0.1 | 1970-01-01 09:00:00+09 | a + 0.2 | 1970-01-01 09:00:01+09 | a + 0.3 | 1970-01-01 09:00:02+09 | a + | 1970-01-01 09:00:03+09 | a + | 1970-01-01 09:00:04+09 | a + | 1970-01-01 09:00:00+09 | b + | 1970-01-01 09:00:01+09 | b + | 1970-01-01 09:00:02+09 | b + 1.1 | 1970-01-01 09:00:03+09 | b + 2.2 | 1970-01-01 09:00:04+09 | b +(10 rows) + +-- select influx_mode (stub agg function and group by tag only) (result) +--Testcase 480: +SELECT tag1,influx_mode("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + tag1 | influx_mode +------+------------- + a | 0.1 + b | 1.1 +(2 rows) + +-- select influx_mode (stub agg function and other aggs) (result) +--Testcase 481: +SELECT sum("value1"),influx_mode("value1"),count("value1") FROM s3; + sum | influx_mode | count +-------------------+-------------+------- + 7.199999999999999 | 0.1 | 6 +(1 row) + +-- select influx_mode over join query (explain) +--Testcase 482: +EXPLAIN VERBOSE +SELECT influx_mode(t1.value1), influx_mode(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + QUERY PLAN +---------------------------------------------------------------------------------------- + Aggregate (cost=112.64..112.66 rows=1 width=16) + Output: influx_mode(t1.value1), influx_mode(t2.value1) + -> Nested Loop (cost=20.00..28.14 rows=169 width=16) + Output: t1.value1, t2.value1 + -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) + Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..13.06 rows=13 width=8) + Output: t2.value1 + -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) + Output: t2.value1 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select influx_mode over join query (result, stub call error) +--Testcase 483: +SELECT influx_mode(t1.value1), influx_mode(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; +ERROR: stub influx_mode_sfunc(anyelement, anyelement) is called +CONTEXT: PL/pgSQL function influx_mode_sfunc(anyelement,anyelement) line 3 at RAISE +-- select influx_mode with having (explain) +--Testcase 484: +EXPLAIN VERBOSE +SELECT influx_mode(value1) FROM s3 HAVING influx_mode(value1) > 100; + QUERY PLAN +-------------------------------------------------------------------------- + Aggregate (cost=3200.00..3200.01 rows=1 width=8) + Output: influx_mode(value1) + Filter: (influx_mode(s3.value1) > '100'::double precision) + -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) + Output: "time", tag1, value1, value2, value3, value4 + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select influx_mode with having (explain, not pushdown, stub call error) +--Testcase 485: +SELECT influx_mode(value1) FROM s3 HAVING influx_mode(value1) > 100; +ERROR: stub influx_mode_sfunc(anyelement, anyelement) is called +CONTEXT: PL/pgSQL function influx_mode_sfunc(anyelement,anyelement) line 3 at RAISE +-- select influx_mode(*) (stub agg function, explain) +--Testcase 486: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_mode_all(*)) + InfluxDB query: SELECT mode(*) FROM "s3" +(3 rows) + +-- select influx_mode(*) (stub agg function, result) +--Testcase 487: +SELECT influx_mode_all(*) from s3; + influx_mode_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-3.3,-100) +(1 row) + +-- select influx_mode(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 488: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_mode_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT mode(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select influx_mode(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 489: +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_mode_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select influx_mode(*) (stub agg function and group by tag only) (explain) +--Testcase 490: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_mode_all(*)), tag1 + InfluxDB query: SELECT mode(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select influx_mode(*) (stub agg function and group by tag only) (result) +--Testcase 491: +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + influx_mode_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.3,-100) + (1970-01-01T00:00:00Z,,1.1,200,-2.2,-200) +(2 rows) + +-- select influx_mode(*) (stub agg function, expose data, explain) +--Testcase 492: +EXPLAIN VERBOSE +SELECT (influx_mode_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_mode_all(*)))::s3)."time", (((influx_mode_all(*)))::s3).tag1, (((influx_mode_all(*)))::s3).value1, (((influx_mode_all(*)))::s3).value2, (((influx_mode_all(*)))::s3).value3, (((influx_mode_all(*)))::s3).value4 + InfluxDB query: SELECT mode(*) FROM "s3" +(3 rows) + +-- select influx_mode(*) (stub agg function, expose data, result) +--Testcase 493: +SELECT (influx_mode_all(*)::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 0.1 | 100 | -3.3 | -100 +(1 row) + +-- select influx_mode(regex) (stub function, explain) +--Testcase 494: +EXPLAIN VERBOSE +SELECT influx_mode('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_mode('/value[1,4]/'::text)) + InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_mode(regex) (stub function, result) +--Testcase 495: +SELECT influx_mode('/value[1,4]/') from s3; + influx_mode +------------------------------------ + (1970-01-01T00:00:00Z,,0.1,,,-100) +(1 row) + +-- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 496: +EXPLAIN VERBOSE +SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_mode('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT mode(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 497: +SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_mode +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select influx_mode(regex) (stub agg function and group by tag only) (explain) +--Testcase 498: +EXPLAIN VERBOSE +SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_mode('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select influx_mode(regex) (stub agg function and group by tag only) (result) +--Testcase 499: +SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + influx_mode +------------------------------------ + (1970-01-01T00:00:00Z,,0.1,,,-100) + (1970-01-01T00:00:00Z,,1.1,,,-200) +(2 rows) + +-- select influx_mode(regex) (stub agg function, expose data, explain) +--Testcase 500: +EXPLAIN VERBOSE +SELECT (influx_mode('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_mode('/value[1,4]/'::text)))::s3)."time", (((influx_mode('/value[1,4]/'::text)))::s3).tag1, (((influx_mode('/value[1,4]/'::text)))::s3).value1, (((influx_mode('/value[1,4]/'::text)))::s3).value2, (((influx_mode('/value[1,4]/'::text)))::s3).value3, (((influx_mode('/value[1,4]/'::text)))::s3).value4 + InfluxDB query: SELECT mode(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_mode(regex) (stub agg function, expose data, result) +--Testcase 501: +SELECT (influx_mode('/value[1,4]/')::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 0.1 | | | -100 +(1 row) + +-- select stddev (agg function, explain) +--Testcase 502: +EXPLAIN VERBOSE +SELECT stddev(value1),stddev(value2),stddev(value3),stddev(value4) FROM s3; + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=80) + Output: (stddev(value1)), (stddev(value2)), (stddev(value3)), (stddev(value4)) + InfluxDB query: SELECT stddev("value1"), stddev("value2"), stddev("value3"), stddev("value4") FROM "s3" +(3 rows) + +-- select stddev (agg function, result) +--Testcase 503: +SELECT stddev(value1),stddev(value2),stddev(value3),stddev(value4) FROM s3; + stddev | stddev | stddev | stddev +-------------------+--------------------+-------------------+-------------------- + 1.299230541512937 | 54.772255750516614 | 1.299230541512937 | 54.772255750516614 +(1 row) + +-- select stddev (agg function and group by influx_time() and tag) (explain) +--Testcase 504: +EXPLAIN VERBOSE +SELECT stddev("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (stddev(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT stddev("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select stddev (agg function and group by influx_time() and tag) (result) +--Testcase 505: +SELECT stddev("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + stddev | influx_time | tag1 +--------+------------------------+------ + | 1970-01-01 09:00:00+09 | a + | 1970-01-01 09:00:01+09 | a + | 1970-01-01 09:00:02+09 | a + | 1970-01-01 09:00:03+09 | a + | 1970-01-01 09:00:04+09 | a + | 1970-01-01 09:00:00+09 | b + | 1970-01-01 09:00:01+09 | b + | 1970-01-01 09:00:02+09 | b + | 1970-01-01 09:00:03+09 | b + | 1970-01-01 09:00:04+09 | b +(10 rows) + +-- select stddev (agg function and group by tag only) (result) +--Testcase 506: +SELECT tag1,stddev("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + tag1 | stddev +------+--------------------- + a | 0.09999999999999999 + b | 0.7778174593052023 +(2 rows) + +-- select stddev (agg function and other aggs) (result) +--Testcase 507: +SELECT sum("value1"),stddev("value1"),count("value1") FROM s3; + sum | stddev | count +-------------------+-------------------+------- + 7.199999999999999 | 1.299230541512937 | 6 +(1 row) + +-- select stddev(*) (stub agg function, explain) +--Testcase 508: +EXPLAIN VERBOSE +SELECT stddev_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (stddev_all(*)) + InfluxDB query: SELECT stddev(*) FROM "s3" +(3 rows) + +-- select stddev(*) (stub agg function, result) +--Testcase 509: +SELECT stddev_all(*) from s3; + stddev_all +--------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,1.299230541512937,54.772255750516614,1.299230541512937,54.772255750516614) +(1 row) + +-- select stddev(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 510: +EXPLAIN VERBOSE +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (stddev_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT stddev(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select stddev(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 511: +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + stddev_all +----------------------------- + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) +(10 rows) + +-- select stddev(*) (stub agg function and group by tag only) (explain) +--Testcase 512: +EXPLAIN VERBOSE +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (stddev_all(*)), tag1 + InfluxDB query: SELECT stddev(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select stddev(*) (stub agg function and group by tag only) (result) +--Testcase 513: +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + stddev_all +--------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.09999999999999999,0,0.09999999999999999,0) + (1970-01-01T00:00:00Z,,0.7778174593052023,0,0.7778174593052023,0) +(2 rows) + +-- select stddev(regex) (stub function, explain) +--Testcase 514: +EXPLAIN VERBOSE +SELECT stddev('/value[1,4]/') from s3; + QUERY PLAN +--------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (stddev('/value[1,4]/'::text)) + InfluxDB query: SELECT stddev(/value[1,4]/) FROM "s3" +(3 rows) + +-- select stddev(regex) (stub function, result) +--Testcase 515: +SELECT stddev('/value[1,4]/') from s3; + stddev +---------------------------------------------------------------- + (1970-01-01T00:00:00Z,,1.299230541512937,,,54.772255750516614) +(1 row) + +-- select stddev(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 516: +EXPLAIN VERBOSE +SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (stddev('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT stddev(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select stddev(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 517: +SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + stddev +----------------------------- + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) +(10 rows) + +-- select stddev(regex) (stub agg function and group by tag only) (explain) +--Testcase 518: +EXPLAIN VERBOSE +SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (stddev('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT stddev(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select stddev(regex) (stub agg function and group by tag only) (result) +--Testcase 519: +SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + stddev +------------------------------------------------- + (1970-01-01T00:00:00Z,,0.09999999999999999,,,0) + (1970-01-01T00:00:00Z,,0.7778174593052023,,,0) +(2 rows) + +-- select influx_sum(*) (stub agg function, explain) +--Testcase 520: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_sum_all(*)) + InfluxDB query: SELECT sum(*) FROM "s3" +(3 rows) + +-- select influx_sum(*) (stub agg function, result) +--Testcase 521: +SELECT influx_sum_all(*) from s3; + influx_sum_all +----------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,7.199999999999999,900,-7.199999999999999,-900) +(1 row) + +-- select influx_sum(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 522: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_sum_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select influx_sum(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 523: +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_sum_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select influx_sum(*) (stub agg function and group by tag only) (explain) +--Testcase 524: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_sum_all(*)), tag1 + InfluxDB query: SELECT sum(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select influx_sum(*) (stub agg function and group by tag only) (result) +--Testcase 525: +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + influx_sum_all +------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.6000000000000001,300,-0.6000000000000001,-300) + (1970-01-01T00:00:00Z,,3.3000000000000003,400,-3.3000000000000003,-400) +(2 rows) + +-- select influx_sum(*) (stub agg function, expose data, explain) +--Testcase 526: +EXPLAIN VERBOSE +SELECT (influx_sum_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_sum_all(*)))::s3)."time", (((influx_sum_all(*)))::s3).tag1, (((influx_sum_all(*)))::s3).value1, (((influx_sum_all(*)))::s3).value2, (((influx_sum_all(*)))::s3).value3, (((influx_sum_all(*)))::s3).value4 + InfluxDB query: SELECT sum(*) FROM "s3" +(3 rows) + +-- select influx_sum(*) (stub agg function, expose data, result) +--Testcase 527: +SELECT (influx_sum_all(*)::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+-------------------+--------+--------------------+-------- + 1970-01-01 09:00:00+09 | | 7.199999999999999 | 900 | -7.199999999999999 | -900 +(1 row) + +-- select influx_sum(regex) (stub function, explain) +--Testcase 528: +EXPLAIN VERBOSE +SELECT influx_sum('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_sum('/value[1,4]/'::text)) + InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_sum(regex) (stub function, result) +--Testcase 529: +SELECT influx_sum('/value[1,4]/') from s3; + influx_sum +-------------------------------------------------- + (1970-01-01T00:00:00Z,,7.199999999999999,,,-900) +(1 row) + +-- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 530: +EXPLAIN VERBOSE +SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_sum('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT sum(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 531: +SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_sum +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select influx_sum(regex) (stub agg function and group by tag only) (explain) +--Testcase 532: +EXPLAIN VERBOSE +SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_sum('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select influx_sum(regex) (stub agg function and group by tag only) (result) +--Testcase 533: +SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + influx_sum +--------------------------------------------------- + (1970-01-01T00:00:00Z,,0.6000000000000001,,,-300) + (1970-01-01T00:00:00Z,,3.3000000000000003,,,-400) +(2 rows) + +-- select influx_sum(regex) (stub agg function, expose data, explain) +--Testcase 534: +EXPLAIN VERBOSE +SELECT (influx_sum('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_sum('/value[1,4]/'::text)))::s3)."time", (((influx_sum('/value[1,4]/'::text)))::s3).tag1, (((influx_sum('/value[1,4]/'::text)))::s3).value1, (((influx_sum('/value[1,4]/'::text)))::s3).value2, (((influx_sum('/value[1,4]/'::text)))::s3).value3, (((influx_sum('/value[1,4]/'::text)))::s3).value4 + InfluxDB query: SELECT sum(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_sum(regex) (stub agg function, expose data, result) +--Testcase 535: +SELECT (influx_sum('/value[1,4]/')::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+-------------------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 7.199999999999999 | | | -900 +(1 row) + +-- selector function bottom() (explain) +--Testcase 536: +EXPLAIN VERBOSE +SELECT bottom(value1, 1) FROM s3; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3200.00 rows=2560 width=8) + Output: bottom(value1, 1) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- selector function bottom() (result) +--Testcase 537: +SELECT bottom(value1, 1) FROM s3; +ERROR: stub bottom(float8, int) is called +CONTEXT: PL/pgSQL function bottom(double precision,integer) line 3 at RAISE +-- selector function bottom() cannot be combined with other functions(explain) +--Testcase 538: +EXPLAIN VERBOSE +SELECT bottom(value1, 1), bottom(value2, 1), bottom(value3, 1), bottom(value4, 1) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: bottom(value1, 1), bottom(value2, 1), bottom(value3, 1), bottom(value4, 1) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- selector function bottom() cannot be combined with other functions(result) +--Testcase 539: +SELECT bottom(value1, 1), bottom(value2, 1), bottom(value3, 1), bottom(value4, 1) FROM s3; +ERROR: stub bottom(float8, int) is called +CONTEXT: PL/pgSQL function bottom(double precision,integer) line 3 at RAISE +-- select influx_max(*) (stub agg function, explain) +--Testcase 540: +EXPLAIN VERBOSE +SELECT influx_max_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_max_all(*)) + InfluxDB query: SELECT max(*) FROM "s3" +(3 rows) + +-- select influx_max(*) (stub agg function, result) +--Testcase 541: +SELECT influx_max_all(*) from s3; + influx_max_all +------------------------------------------- + (1970-01-01T00:00:00Z,,3.3,200,-0.1,-100) +(1 row) + +-- select influx_max(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 542: +EXPLAIN VERBOSE +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_max_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT max(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select influx_max(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 543: +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_max_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select influx_max(*) (stub agg function and group by tag only) (explain) +--Testcase 544: +EXPLAIN VERBOSE +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_max_all(*)), tag1 + InfluxDB query: SELECT max(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select influx_max(*) (stub agg function and group by tag only) (result) +--Testcase 545: +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + influx_max_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.3,100,-0.1,-100) + (1970-01-01T00:00:00Z,,2.2,200,-1.1,-200) +(2 rows) + +-- select influx_max(*) (stub agg function, expose data, explain) +--Testcase 546: +EXPLAIN VERBOSE +SELECT (influx_max_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_max_all(*)))::s3)."time", (((influx_max_all(*)))::s3).tag1, (((influx_max_all(*)))::s3).value1, (((influx_max_all(*)))::s3).value2, (((influx_max_all(*)))::s3).value3, (((influx_max_all(*)))::s3).value4 + InfluxDB query: SELECT max(*) FROM "s3" +(3 rows) + +-- select influx_max(*) (stub agg function, expose data, result) +--Testcase 547: +SELECT (influx_max_all(*)::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 3.3 | 200 | -0.1 | -100 +(1 row) + +-- select influx_max(regex) (stub function, explain) +--Testcase 548: +EXPLAIN VERBOSE +SELECT influx_max('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_max('/value[1,4]/'::text)) + InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_max(regex) (stub function, result) +--Testcase 549: +SELECT influx_max('/value[1,4]/') from s3; + influx_max +------------------------------------ + (1970-01-01T00:00:00Z,,3.3,,,-100) +(1 row) + +-- select influx_max(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 550: +EXPLAIN VERBOSE +SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_max('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT max(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select influx_max(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 551: +SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_max +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select influx_max(regex) (stub agg function and group by tag only) (explain) +--Testcase 552: +EXPLAIN VERBOSE +SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_max('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select influx_max(regex) (stub agg function and group by tag only) (result) +--Testcase 553: +SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + influx_max +------------------------------------ + (1970-01-01T00:00:00Z,,0.3,,,-100) + (1970-01-01T00:00:00Z,,2.2,,,-200) +(2 rows) + +-- select influx_max(regex) (stub agg function, expose data, explain) +--Testcase 554: +EXPLAIN VERBOSE +SELECT (influx_max('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_max('/value[1,4]/'::text)))::s3)."time", (((influx_max('/value[1,4]/'::text)))::s3).tag1, (((influx_max('/value[1,4]/'::text)))::s3).value1, (((influx_max('/value[1,4]/'::text)))::s3).value2, (((influx_max('/value[1,4]/'::text)))::s3).value3, (((influx_max('/value[1,4]/'::text)))::s3).value4 + InfluxDB query: SELECT max(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_max(regex) (stub agg function, expose data, result) +--Testcase 555: +SELECT (influx_max('/value[1,4]/')::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 3.3 | | | -100 +(1 row) + +-- select influx_min(*) (stub agg function, explain) +--Testcase 556: +EXPLAIN VERBOSE +SELECT influx_min_all(*) from s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_min_all(*)) + InfluxDB query: SELECT min(*) FROM "s3" +(3 rows) + +-- select influx_min(*) (stub agg function, result) +--Testcase 557: +SELECT influx_min_all(*) from s3; + influx_min_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-3.3,-200) +(1 row) + +-- select influx_min(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 558: +EXPLAIN VERBOSE +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_min_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT min(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select influx_min(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 559: +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_min_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select influx_min(*) (stub agg function and group by tag only) (explain) +--Testcase 560: +EXPLAIN VERBOSE +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_min_all(*)), tag1 + InfluxDB query: SELECT min(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select influx_min(*) (stub agg function and group by tag only) (result) +--Testcase 561: +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + influx_min_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.3,-100) + (1970-01-01T00:00:00Z,,1.1,200,-2.2,-200) +(2 rows) + +-- select influx_min(*) (stub agg function, expose data, explain) +--Testcase 562: +EXPLAIN VERBOSE +SELECT (influx_min_all(*)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_min_all(*)))::s3)."time", (((influx_min_all(*)))::s3).tag1, (((influx_min_all(*)))::s3).value1, (((influx_min_all(*)))::s3).value2, (((influx_min_all(*)))::s3).value3, (((influx_min_all(*)))::s3).value4 + InfluxDB query: SELECT min(*) FROM "s3" +(3 rows) + +-- select influx_min(*) (stub agg function, expose data, result) +--Testcase 563: +SELECT (influx_min_all(*)::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 0.1 | 100 | -3.3 | -200 +(1 row) + +-- select influx_min(regex) (stub function, explain) +--Testcase 564: +EXPLAIN VERBOSE +SELECT influx_min('/value[1,4]/') from s3; + QUERY PLAN +------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_min('/value[1,4]/'::text)) + InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_min(regex) (stub function, result) +--Testcase 565: +SELECT influx_min('/value[1,4]/') from s3; + influx_min +------------------------------------ + (1970-01-01T00:00:00Z,,0.1,,,-200) +(1 row) + +-- select influx_min(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 566: +EXPLAIN VERBOSE +SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_min('/^v.*/'::text)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT min(/^v.*/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select influx_min(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 567: +SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_min +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select influx_min(regex) (stub agg function and group by tag only) (explain) +--Testcase 568: +EXPLAIN VERBOSE +SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_min('/value[1,4]/'::text)), tag1 + InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select influx_min(regex) (stub agg function and group by tag only) (result) +--Testcase 569: +SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + influx_min +------------------------------------ + (1970-01-01T00:00:00Z,,0.1,,,-100) + (1970-01-01T00:00:00Z,,1.1,,,-200) +(2 rows) + +-- select influx_min(regex) (stub agg function, expose data, explain) +--Testcase 570: +EXPLAIN VERBOSE +SELECT (influx_min('/value[1,4]/')::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (((influx_min('/value[1,4]/'::text)))::s3)."time", (((influx_min('/value[1,4]/'::text)))::s3).tag1, (((influx_min('/value[1,4]/'::text)))::s3).value1, (((influx_min('/value[1,4]/'::text)))::s3).value2, (((influx_min('/value[1,4]/'::text)))::s3).value3, (((influx_min('/value[1,4]/'::text)))::s3).value4 + InfluxDB query: SELECT min(/value[1,4]/) FROM "s3" +(3 rows) + +-- select influx_min(regex) (stub agg function, expose data, result) +--Testcase 571: +SELECT (influx_min('/value[1,4]/')::s3).* from s3; + time | tag1 | value1 | value2 | value3 | value4 +------------------------+------+--------+--------+--------+-------- + 1970-01-01 09:00:00+09 | | 0.1 | | | -200 +(1 row) + +-- selector function percentile() (explain) +--Testcase 572: +EXPLAIN VERBOSE +SELECT percentile(value1, 50), percentile(value2, 60), percentile(value3, 25), percentile(value4, 33) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: percentile(value1, 50), percentile(value2, 60), percentile(value3, 25), percentile(value4, 33) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- selector function percentile() (result) +--Testcase 573: +SELECT percentile(value1, 50), percentile(value2, 60), percentile(value3, 25), percentile(value4, 33) FROM s3; +ERROR: stub percentile(float8, int) is called +CONTEXT: PL/pgSQL function percentile(double precision,integer) line 3 at RAISE +-- selector function percentile() (explain) +--Testcase 574: +EXPLAIN VERBOSE +SELECT percentile(value1, 1.5), percentile(value2, 6.7), percentile(value3, 20.5), percentile(value4, 75.2) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: percentile(value1, '1.5'::double precision), percentile(value2, '6.7'::double precision), percentile(value3, '20.5'::double precision), percentile(value4, '75.2'::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- selector function percentile() (result) +--Testcase 575: +SELECT percentile(value1, 1.5), percentile(value2, 6.7), percentile(value3, 20.5), percentile(value4, 75.2) FROM s3; +ERROR: stub percentile(float8, float8) is called +CONTEXT: PL/pgSQL function percentile(double precision,double precision) line 3 at RAISE +-- select percentile(*, int) (stub agg function, explain) +--Testcase 576: +EXPLAIN VERBOSE +SELECT percentile_all(50) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: percentile_all(50) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(*, int) (stub agg function, result) +--Testcase 577: +SELECT percentile_all(50) from s3; +ERROR: stub percentile_all(int) is called +CONTEXT: PL/pgSQL function percentile_all(integer) line 3 at RAISE +-- select percentile(*, float8) (stub agg function, explain) +--Testcase 578: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: percentile_all('70.5'::double precision) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(*, float8) (stub agg function, result) +--Testcase 579: +SELECT percentile_all(70.5) from s3; +ERROR: stub percentile_all(float8) is called +CONTEXT: PL/pgSQL function percentile_all(double precision) line 3 at RAISE +-- select percentile(*, int) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 580: +EXPLAIN VERBOSE +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (percentile_all(50)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT percentile(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select percentile(*, int) (stub agg function and group by influx_time() and tag) (result) +--Testcase 581: +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + percentile_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 582: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (percentile_all('70.5'::double precision)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (result) +--Testcase 583: +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + percentile_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select percentile(*, int) (stub agg function and group by tag only) (explain) +--Testcase 584: +EXPLAIN VERBOSE +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (percentile_all(50)), tag1 + InfluxDB query: SELECT percentile(*, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select percentile(*, int) (stub agg function and group by tag only) (result) +--Testcase 585: +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + percentile_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:00Z,,1.1,200,-2.2,-200) +(2 rows) + +-- select percentile(*, float8) (stub agg function and group by tag only) (explain) +--Testcase 586: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (percentile_all('70.5'::double precision)), tag1 + InfluxDB query: SELECT percentile(*, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select percentile(*, float8) (stub agg function and group by tag only) (result) +--Testcase 587: +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + percentile_all +------------------------------------------- + (1970-01-01T00:00:00Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:00Z,,1.1,200,-2.2,-200) +(2 rows) + +-- select percentile(*, int) (stub agg function, expose data, explain) +--Testcase 588: +EXPLAIN VERBOSE +SELECT (percentile_all(50)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((percentile_all(50))::s3)."time", ((percentile_all(50))::s3).tag1, ((percentile_all(50))::s3).value1, ((percentile_all(50))::s3).value2, ((percentile_all(50))::s3).value3, ((percentile_all(50))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(*, int) (stub agg function, expose data, result) +--Testcase 589: +SELECT (percentile_all(50)::s3).* from s3; +ERROR: stub percentile_all(int) is called +CONTEXT: PL/pgSQL function percentile_all(integer) line 3 at RAISE +-- select percentile(*, int) (stub agg function, expose data, explain) +--Testcase 590: +EXPLAIN VERBOSE +SELECT (percentile_all(70.5)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((percentile_all('70.5'::double precision))::s3)."time", ((percentile_all('70.5'::double precision))::s3).tag1, ((percentile_all('70.5'::double precision))::s3).value1, ((percentile_all('70.5'::double precision))::s3).value2, ((percentile_all('70.5'::double precision))::s3).value3, ((percentile_all('70.5'::double precision))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(*, int) (stub agg function, expose data, result) +--Testcase 591: +SELECT (percentile_all(70.5)::s3).* from s3; +ERROR: stub percentile_all(float8) is called +CONTEXT: PL/pgSQL function percentile_all(double precision) line 3 at RAISE +-- select percentile(regex) (stub function, explain) +--Testcase 592: +EXPLAIN VERBOSE +SELECT percentile('/value[1,4]/', 50) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: percentile('/value[1,4]/'::text, 50) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(regex) (stub function, result) +--Testcase 593: +SELECT percentile('/value[1,4]/', 50) from s3; +ERROR: stub percentile(text, int) is called +CONTEXT: PL/pgSQL function percentile(text,integer) line 3 at RAISE +-- select percentile(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 594: +EXPLAIN VERBOSE +SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (percentile('/^v.*/'::text, 50)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT percentile(/^v.*/, 50) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select percentile(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 595: +SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + percentile +------------------------------------------- + (1970-01-01T00:00:00Z,,0.1,100,-0.1,-100) + (1970-01-01T00:00:01Z,,0.2,100,-0.2,-100) + (1970-01-01T00:00:02Z,,0.3,100,-0.3,-100) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) + (1970-01-01T00:00:00Z,,,,,) + (1970-01-01T00:00:01Z,,,,,) + (1970-01-01T00:00:02Z,,,,,) + (1970-01-01T00:00:03Z,,1.1,200,-1.1,-200) + (1970-01-01T00:00:04Z,,2.2,200,-2.2,-200) +(10 rows) + +-- select percentile(regex) (stub agg function and group by tag only) (explain) +--Testcase 596: +EXPLAIN VERBOSE +SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (percentile('/value[1,4]/'::text, '70.5'::double precision)), tag1 + InfluxDB query: SELECT percentile(/value[1,4]/, 70.5) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select percentile(regex) (stub agg function and group by tag only) (result) +--Testcase 597: +SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + percentile +------------------------------------ + (1970-01-01T00:00:00Z,,0.2,,,-100) + (1970-01-01T00:00:00Z,,1.1,,,-200) +(2 rows) + +-- select percentile(regex) (stub agg function, expose data, explain) +--Testcase 598: +EXPLAIN VERBOSE +SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((percentile('/value[1,4]/'::text, 50))::s3)."time", ((percentile('/value[1,4]/'::text, 50))::s3).tag1, ((percentile('/value[1,4]/'::text, 50))::s3).value1, ((percentile('/value[1,4]/'::text, 50))::s3).value2, ((percentile('/value[1,4]/'::text, 50))::s3).value3, ((percentile('/value[1,4]/'::text, 50))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(regex) (stub agg function, expose data, result) +--Testcase 599: +SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; +ERROR: stub percentile(text, int) is called +CONTEXT: PL/pgSQL function percentile(text,integer) line 3 at RAISE +-- select percentile(regex) (stub agg function, expose data, explain) +--Testcase 600: +EXPLAIN VERBOSE +SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((percentile('/value[1,4]/'::text, '70.5'::double precision))::s3)."time", ((percentile('/value[1,4]/'::text, '70.5'::double precision))::s3).tag1, ((percentile('/value[1,4]/'::text, '70.5'::double precision))::s3).value1, ((percentile('/value[1,4]/'::text, '70.5'::double precision))::s3).value2, ((percentile('/value[1,4]/'::text, '70.5'::double precision))::s3).value3, ((percentile('/value[1,4]/'::text, '70.5'::double precision))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select percentile(regex) (stub agg function, expose data, result) +--Testcase 601: +SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; +ERROR: stub percentile(text, float8) is called +CONTEXT: PL/pgSQL function percentile(text,double precision) line 3 at RAISE +-- selector function top(field_key,N) (explain) +--Testcase 602: +EXPLAIN VERBOSE +SELECT top(value1, 1) FROM s3; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3200.00 rows=2560 width=8) + Output: top(value1, 1) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- selector function top(field_key,N) (result) +--Testcase 603: +SELECT top(value1, 1) FROM s3; +ERROR: stub top(float8, int) is called +CONTEXT: PL/pgSQL function top(double precision,integer) line 3 at RAISE +-- selector function top(field_key,tag_key(s),N) (explain) +--Testcase 604: +EXPLAIN VERBOSE +SELECT top(value1, tag1, 1) FROM s3; + QUERY PLAN +-------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1600.00 rows=1280 width=8) + Output: top(value1, tag1, 1) + InfluxDB query: SELECT "tag1", "value1" FROM "s3" +(3 rows) + +-- selector function top(field_key,tag_key(s),N) (result) +--Testcase 605: +SELECT top(value1, tag1, 1) FROM s3; +ERROR: stub top(float8, text, int) is called +CONTEXT: PL/pgSQL function top(double precision,text,integer) line 3 at RAISE +-- selector function top() cannot be combined with other functions(explain) +--Testcase 606: +EXPLAIN VERBOSE +SELECT top(value1, 1), top(value2, 1), top(value3, 1), top(value4, 1) FROM s3; + QUERY PLAN +--------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2924.00 rows=1462 width=32) + Output: top(value1, 1), top(value2, 1), top(value3, 1), top(value4, 1) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- selector function top() cannot be combined with other functions(result) +--Testcase 607: +SELECT top(value1, 1), top(value2, 1), top(value3, 1), top(value4, 1) FROM s3; +ERROR: stub top(float8, int) is called +CONTEXT: PL/pgSQL function top(double precision,integer) line 3 at RAISE +-- select acos (builtin function, explain) +--Testcase 608: +EXPLAIN VERBOSE +SELECT acos(value1), acos(value3) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2058.24 rows=2048 width=16) + Output: acos(value1), acos(value3) + InfluxDB query: SELECT "value1", "value3" FROM "s3" +(3 rows) + +-- select acos (builtin function, result) +--Testcase 609: +SELECT acos(value1), acos(value3) FROM s3; +ERROR: input is out of range +-- select acos (builtin function, not pushdown constraints, explain) +--Testcase 610: +EXPLAIN VERBOSE +SELECT acos(value1), acos(value3) FROM s3 WHERE to_hex(value2) = '64'; + QUERY PLAN +----------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..10.05 rows=10 width=16) + Output: acos(value1), acos(value3) + Filter: (to_hex(s3.value2) = '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3" FROM "s3" +(4 rows) + +-- select acos (builtin function, not pushdown constraints, result) +--Testcase 611: +SELECT acos(value1), acos(value3) FROM s3 WHERE to_hex(value2) = '64'; + acos | acos +--------------------+-------------------- + 1.4706289056333368 | 1.6709637479564565 + 1.369438406004566 | 1.7721542475852274 + 1.2661036727794992 | 1.8754889808102941 +(3 rows) + +-- select acos (builtin function, pushdown constraints, explain) +--Testcase 612: +EXPLAIN VERBOSE +SELECT acos(value1), acos(value3) FROM s3 WHERE value2 != 200; + QUERY PLAN +--------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2048.19 rows=2038 width=16) + Output: acos(value1), acos(value3) + InfluxDB query: SELECT "value1", "value3" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select acos (builtin function, pushdown constraints, result) +--Testcase 613: +SELECT acos(value1), acos(value3) FROM s3 WHERE value2 != 200; + acos | acos +--------------------+-------------------- + 1.4706289056333368 | 1.6709637479564565 + 1.369438406004566 | 1.7721542475852274 + 1.2661036727794992 | 1.8754889808102941 +(3 rows) + +-- select acos as nest function with agg (pushdown, explain) +--Testcase 614: +EXPLAIN VERBOSE +SELECT sum(value3), acos(sum(value3)) FROM s3 WHERE value2 != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (acos(sum(value3))) + InfluxDB query: SELECT sum("value3"), acos(sum("value3")) FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select acos as nest function with agg (pushdown, result) +--Testcase 615: +SELECT sum(value3), acos(sum(value3)) FROM s3 WHERE value2 != 200; + sum | acos +---------------------+------------------- + -0.6000000000000001 | 2.214297435588181 +(1 row) + +-- select acos as nest with log2 (pushdown, explain) +--Testcase 616: +EXPLAIN VERBOSE +SELECT acos(log2(value1)),acos(log2(1/value1)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: acos(log2(value1)), acos(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select acos as nest with log2 (pushdown, result) +--Testcase 617: +SELECT acos(log2(value1)),acos(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select acos with non pushdown func and explicit constant (explain) +--Testcase 618: +EXPLAIN VERBOSE +SELECT acos(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; + QUERY PLAN +----------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2553.37 rows=2547 width=48) + Output: acos(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select acos with non pushdown func and explicit constant (result) +--Testcase 619: +SELECT acos(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; + acos | pi | ?column? +--------------------+-------------------+---------- + 1.6709637479564565 | 3.141592653589793 | 4.1 + 1.7721542475852274 | 3.141592653589793 | 4.1 + 1.8754889808102941 | 3.141592653589793 | 4.1 +(3 rows) + +-- select acos with order by (explain) +--Testcase 620: +EXPLAIN VERBOSE +SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY acos(1-value1); + QUERY PLAN +----------------------------------------------------------------------------- + Sort (cost=2703.83..2710.19 rows=2547 width=16) + Output: value1, (acos(('1'::double precision - value1))) + Sort Key: (acos(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2559.74 rows=2547 width=16) + Output: value1, acos(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value2" <> 200)) +(6 rows) + +-- select acos with order by (result) +--Testcase 621: +SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY acos(1-value1); + value1 | acos +--------+--------------------- + 0.1 | 0.45102681179626236 + 0.2 | 0.6435011087932843 + 0.3 | 0.7953988301841436 +(3 rows) + +-- select acos with order by index (result) +--Testcase 622: +SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 2,1; + value1 | acos +--------+--------------------- + 0.1 | 0.45102681179626236 + 0.2 | 0.6435011087932843 + 0.3 | 0.7953988301841436 +(3 rows) + +-- select acos with order by index (result) +--Testcase 623: +SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 1,2; + value1 | acos +--------+--------------------- + 0.1 | 0.45102681179626236 + 0.2 | 0.6435011087932843 + 0.3 | 0.7953988301841436 +(3 rows) + +-- select acos and as +--Testcase 624: +SELECT acos(value3) as acos1 FROM s3 WHERE value2 != 200; + acos1 +-------------------- + 1.6709637479564565 + 1.7721542475852274 + 1.8754889808102941 +(3 rows) + +-- select acos(*) (stub agg function, explain) +--Testcase 625: +EXPLAIN VERBOSE +SELECT acos_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: acos_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select acos(*) (stub agg function, result) +--Testcase 626: +SELECT acos_all() from s3; +ERROR: stub acos_all() is called +CONTEXT: PL/pgSQL function acos_all() line 3 at RAISE +-- select acos(*) (stub agg function and group by tag only) (explain) +--Testcase 627: +EXPLAIN VERBOSE +SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (acos_all()), tag1 + InfluxDB query: SELECT acos(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select acos(*) (stub agg function and group by tag only) (result) +--Testcase 628: +SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + acos_all +----------------------------------------------------------------- + (1970-01-01T00:00:00Z,,1.4706289056333368,,1.6709637479564563,) + (1970-01-01T00:00:01Z,,1.3694384060045657,,1.7721542475852274,) + (1970-01-01T00:00:02Z,,1.266103672779499,,1.8754889808102941,) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) +(5 rows) + +-- select acos(*) (stub agg function, expose data, explain) +--Testcase 629: +EXPLAIN VERBOSE +SELECT (acos_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((acos_all())::s3)."time", ((acos_all())::s3).tag1, ((acos_all())::s3).value1, ((acos_all())::s3).value2, ((acos_all())::s3).value3, ((acos_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select acos(*) (stub agg function, expose data, result) +--Testcase 630: +SELECT (acos_all()::s3).* from s3; +ERROR: stub acos_all() is called +CONTEXT: PL/pgSQL function acos_all() line 3 at RAISE +-- select asin (builtin function, explain) +--Testcase 631: +EXPLAIN VERBOSE +SELECT asin(value1), asin(value3) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2058.24 rows=2048 width=16) + Output: asin(value1), asin(value3) + InfluxDB query: SELECT "value1", "value3" FROM "s3" +(3 rows) + +-- select asin (builtin function, result) +--Testcase 632: +SELECT asin(value1), asin(value3) FROM s3; +ERROR: input is out of range +-- select asin (builtin function, not pushdown constraints, explain) +--Testcase 633: +EXPLAIN VERBOSE +SELECT asin(value1), asin(value3) FROM s3 WHERE to_hex(value2) = '64'; + QUERY PLAN +----------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..10.05 rows=10 width=16) + Output: asin(value1), asin(value3) + Filter: (to_hex(s3.value2) = '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3" FROM "s3" +(4 rows) + +-- select asin (builtin function, not pushdown constraints, result) +--Testcase 634: +SELECT asin(value1), asin(value3) FROM s3 WHERE to_hex(value2) = '64'; + asin | asin +--------------------+--------------------- + 0.1001674211615598 | -0.1001674211615598 + 0.2013579207903308 | -0.2013579207903308 + 0.3046926540153975 | -0.3046926540153975 +(3 rows) + +-- select asin (builtin function, pushdown constraints, explain) +--Testcase 635: +EXPLAIN VERBOSE +SELECT asin(value1), asin(value3) FROM s3 WHERE value2 != 200; + QUERY PLAN +--------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2048.19 rows=2038 width=16) + Output: asin(value1), asin(value3) + InfluxDB query: SELECT "value1", "value3" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select asin (builtin function, pushdown constraints, result) +--Testcase 636: +SELECT asin(value1), asin(value3) FROM s3 WHERE value2 != 200; + asin | asin +--------------------+--------------------- + 0.1001674211615598 | -0.1001674211615598 + 0.2013579207903308 | -0.2013579207903308 + 0.3046926540153975 | -0.3046926540153975 +(3 rows) + +-- select asin as nest function with agg (pushdown, explain) +--Testcase 637: +EXPLAIN VERBOSE +SELECT sum(value3), asin(sum(value3)) FROM s3 WHERE value2 != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (asin(sum(value3))) + InfluxDB query: SELECT sum("value3"), asin(sum("value3")) FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select asin as nest function with agg (pushdown, result) +--Testcase 638: +SELECT sum(value3), asin(sum(value3)) FROM s3 WHERE value2 != 200; + sum | asin +---------------------+--------------------- + -0.6000000000000001 | -0.6435011087932845 +(1 row) + +-- select asin as nest with log2 (pushdown, explain) +--Testcase 639: +EXPLAIN VERBOSE +SELECT asin(log2(value1)),asin(log2(1/value1)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: asin(log2(value1)), asin(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select asin as nest with log2 (pushdown, result) +--Testcase 640: +SELECT asin(log2(value1)),asin(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select asin with non pushdown func and explicit constant (explain) +--Testcase 641: +EXPLAIN VERBOSE +SELECT asin(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; + QUERY PLAN +----------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2553.37 rows=2547 width=48) + Output: asin(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select asin with non pushdown func and explicit constant (result) +--Testcase 642: +SELECT asin(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; + asin | pi | ?column? +---------------------+-------------------+---------- + -0.1001674211615598 | 3.141592653589793 | 4.1 + -0.2013579207903308 | 3.141592653589793 | 4.1 + -0.3046926540153975 | 3.141592653589793 | 4.1 +(3 rows) + +-- select asin with order by (explain) +--Testcase 643: +EXPLAIN VERBOSE +SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY asin(1-value1); + QUERY PLAN +----------------------------------------------------------------------------- + Sort (cost=2703.83..2710.19 rows=2547 width=16) + Output: value1, (asin(('1'::double precision - value1))) + Sort Key: (asin(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2559.74 rows=2547 width=16) + Output: value1, asin(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value2" <> 200)) +(6 rows) + +-- select asin with order by (result) +--Testcase 644: +SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY asin(1-value1); + value1 | asin +--------+-------------------- + 0.3 | 0.775397496610753 + 0.2 | 0.9272952180016123 + 0.1 | 1.1197695149986342 +(3 rows) + +-- select asin with order by index (result) +--Testcase 645: +SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 2,1; + value1 | asin +--------+-------------------- + 0.3 | 0.775397496610753 + 0.2 | 0.9272952180016123 + 0.1 | 1.1197695149986342 +(3 rows) + +-- select asin with order by index (result) +--Testcase 646: +SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 1,2; + value1 | asin +--------+-------------------- + 0.1 | 1.1197695149986342 + 0.2 | 0.9272952180016123 + 0.3 | 0.775397496610753 +(3 rows) + +-- select asin and as +--Testcase 647: +SELECT asin(value3) as asin1 FROM s3 WHERE value2 != 200; + asin1 +--------------------- + -0.1001674211615598 + -0.2013579207903308 + -0.3046926540153975 +(3 rows) + +-- select asin(*) (stub agg function, explain) +--Testcase 648: +EXPLAIN VERBOSE +SELECT asin_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: asin_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select asin(*) (stub agg function, result) +--Testcase 649: +SELECT asin_all() from s3; +ERROR: stub asin_all() is called +CONTEXT: PL/pgSQL function asin_all() line 3 at RAISE +-- select asin(*) (stub agg function and group by tag only) (explain) +--Testcase 650: +EXPLAIN VERBOSE +SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (asin_all()), tag1 + InfluxDB query: SELECT asin(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select asin(*) (stub agg function and group by tag only) (result) +--Testcase 651: +SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + asin_all +-------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.1001674211615598,,-0.1001674211615598,) + (1970-01-01T00:00:01Z,,0.20135792079033082,,-0.20135792079033082,) + (1970-01-01T00:00:02Z,,0.3046926540153975,,-0.3046926540153975,) + (1970-01-01T00:00:03Z,,,,,) + (1970-01-01T00:00:04Z,,,,,) +(5 rows) + +-- select asin(*) (stub agg function, expose data, explain) +--Testcase 652: +EXPLAIN VERBOSE +SELECT (asin_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((asin_all())::s3)."time", ((asin_all())::s3).tag1, ((asin_all())::s3).value1, ((asin_all())::s3).value2, ((asin_all())::s3).value3, ((asin_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select asin(*) (stub agg function, expose data, result) +--Testcase 653: +SELECT (asin_all()::s3).* from s3; +ERROR: stub asin_all() is called +CONTEXT: PL/pgSQL function asin_all() line 3 at RAISE +-- select atan (builtin function, explain) +--Testcase 654: +EXPLAIN VERBOSE +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1483.93 rows=1462 width=32) + Output: atan(value1), atan((value2)::double precision), atan(value3), atan((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select atan (builtin function, result) +--Testcase 655: +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3; + atan | atan | atan | atan +---------------------+--------------------+----------------------+--------------------- + 0.09966865249116204 | 1.5607966601082315 | -0.09966865249116204 | -1.5607966601082315 + 0.19739555984988078 | 1.5607966601082315 | -0.19739555984988078 | -1.5607966601082315 + 0.2914567944778671 | 1.5607966601082315 | -0.2914567944778671 | -1.5607966601082315 + 0.8329812666744317 | 1.5657963684609384 | -0.8329812666744317 | -1.5657963684609384 + 1.1441688336680205 | 1.5657963684609384 | -1.1441688336680205 | -1.5657963684609384 + 1.2765617616837088 | 1.5657963684609384 | -1.2765617616837088 | -1.5657963684609384 +(6 rows) + +-- select atan (builtin function, not pushdown constraints, explain) +--Testcase 656: +EXPLAIN VERBOSE +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: atan(value1), atan((value2)::double precision), atan(value3), atan((value4)::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select atan (builtin function, not pushdown constraints, result) +--Testcase 657: +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE to_hex(value2) != '64'; + atan | atan | atan | atan +--------------------+--------------------+---------------------+--------------------- + 0.8329812666744317 | 1.5657963684609384 | -0.8329812666744317 | -1.5657963684609384 + 1.1441688336680205 | 1.5657963684609384 | -1.1441688336680205 | -1.5657963684609384 + 1.2765617616837088 | 1.5657963684609384 | -1.2765617616837088 | -1.5657963684609384 +(3 rows) + +-- select atan (builtin function, pushdown constraints, explain) +--Testcase 658: +EXPLAIN VERBOSE +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE value2 != 200; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: atan(value1), atan((value2)::double precision), atan(value3), atan((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select atan (builtin function, pushdown constraints, result) +--Testcase 659: +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE value2 != 200; + atan | atan | atan | atan +---------------------+--------------------+----------------------+--------------------- + 0.09966865249116204 | 1.5607966601082315 | -0.09966865249116204 | -1.5607966601082315 + 0.19739555984988078 | 1.5607966601082315 | -0.19739555984988078 | -1.5607966601082315 + 0.2914567944778671 | 1.5607966601082315 | -0.2914567944778671 | -1.5607966601082315 +(3 rows) + +-- select atan as nest function with agg (pushdown, explain) +--Testcase 660: +EXPLAIN VERBOSE +SELECT sum(value3),atan(sum(value3)) FROM s3; + QUERY PLAN +----------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (atan(sum(value3))) + InfluxDB query: SELECT sum("value3"), atan(sum("value3")) FROM "s3" +(3 rows) + +-- select atan as nest function with agg (pushdown, result) +--Testcase 661: +SELECT sum(value3),atan(sum(value3)) FROM s3; + sum | atan +--------------------+--------------------- + -7.199999999999999 | -1.4327903031373772 +(1 row) + +-- select atan as nest with log2 (pushdown, explain) +--Testcase 662: +EXPLAIN VERBOSE +SELECT atan(log2(value1)),atan(log2(1/value1)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: atan(log2(value1)), atan(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select atan as nest with log2 (pushdown, result) +--Testcase 663: +SELECT atan(log2(value1)),atan(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select atan with non pushdown func and explicit constant (explain) +--Testcase 664: +EXPLAIN VERBOSE +SELECT atan(value3), pi(), 4.1 FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: atan(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select atan with non pushdown func and explicit constant (result) +--Testcase 665: +SELECT atan(value3), pi(), 4.1 FROM s3; + atan | pi | ?column? +----------------------+-------------------+---------- + -0.09966865249116204 | 3.141592653589793 | 4.1 + -0.19739555984988078 | 3.141592653589793 | 4.1 + -0.2914567944778671 | 3.141592653589793 | 4.1 + -0.8329812666744317 | 3.141592653589793 | 4.1 + -1.1441688336680205 | 3.141592653589793 | 4.1 + -1.2765617616837088 | 3.141592653589793 | 4.1 +(6 rows) + +-- select atan with order by (explain) +--Testcase 666: +EXPLAIN VERBOSE +SELECT value1, atan(1-value1) FROM s3 order by atan(1-value1); + QUERY PLAN +--------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (atan(('1'::double precision - value1))) + Sort Key: (atan(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, atan(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select atan with order by (result) +--Testcase 667: +SELECT value1, atan(1-value1) FROM s3 order by atan(1-value1); + value1 | atan +--------+---------------------- + 3.3 | -1.1606689862534056 + 2.2 | -0.8760580505981935 + 1.1 | -0.09966865249116212 + 0.3 | 0.6107259643892086 + 0.2 | 0.6747409422235527 + 0.1 | 0.7328151017865066 +(6 rows) + +-- select atan with order by index (result) +--Testcase 668: +SELECT value1, atan(1-value1) FROM s3 order by 2,1; + value1 | atan +--------+---------------------- + 3.3 | -1.1606689862534056 + 2.2 | -0.8760580505981935 + 1.1 | -0.09966865249116212 + 0.3 | 0.6107259643892086 + 0.2 | 0.6747409422235527 + 0.1 | 0.7328151017865066 +(6 rows) + +-- select atan with order by index (result) +--Testcase 669: +SELECT value1, atan(1-value1) FROM s3 order by 1,2; + value1 | atan +--------+---------------------- + 0.1 | 0.7328151017865066 + 0.2 | 0.6747409422235527 + 0.3 | 0.6107259643892086 + 1.1 | -0.09966865249116212 + 2.2 | -0.8760580505981935 + 3.3 | -1.1606689862534056 +(6 rows) + +-- select atan and as +--Testcase 670: +SELECT atan(value3) as atan1 FROM s3; + atan1 +---------------------- + -0.09966865249116204 + -0.19739555984988078 + -0.2914567944778671 + -0.8329812666744317 + -1.1441688336680205 + -1.2765617616837088 +(6 rows) + +-- select atan(*) (stub agg function, explain) +--Testcase 671: +EXPLAIN VERBOSE +SELECT atan_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: atan_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select atan(*) (stub agg function, result) +--Testcase 672: +SELECT atan_all() from s3; +ERROR: stub atan_all() is called +CONTEXT: PL/pgSQL function atan_all() line 3 at RAISE +-- select atan(*) (stub agg function and group by tag only) (explain) +--Testcase 673: +EXPLAIN VERBOSE +SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (atan_all()), tag1 + InfluxDB query: SELECT atan(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select atan(*) (stub agg function and group by tag only) (result) +--Testcase 674: +SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + atan_all +--------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.09966865249116204,1.5607966601082313,-0.09966865249116204,-1.5607966601082313) + (1970-01-01T00:00:01Z,,0.19739555984988078,1.5607966601082313,-0.19739555984988078,-1.5607966601082313) + (1970-01-01T00:00:02Z,,0.2914567944778671,1.5607966601082313,-0.2914567944778671,-1.5607966601082313) + (1970-01-01T00:00:03Z,,0.8329812666744317,1.5657963684609382,-0.8329812666744317,-1.5657963684609382) + (1970-01-01T00:00:04Z,,1.1441688336680205,1.5657963684609382,-1.1441688336680205,-1.5657963684609382) +(5 rows) + +-- select atan(*) (stub agg function, expose data, explain) +--Testcase 675: +EXPLAIN VERBOSE +SELECT (atan_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((atan_all())::s3)."time", ((atan_all())::s3).tag1, ((atan_all())::s3).value1, ((atan_all())::s3).value2, ((atan_all())::s3).value3, ((atan_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 676: +SELECT asin_all(), acos_all(), atan_all() FROM s3; +ERROR: stub asin_all() is called +CONTEXT: PL/pgSQL function asin_all() line 3 at RAISE +-- select atan2 (builtin function, explain) +--Testcase 677: +EXPLAIN VERBOSE +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1491.24 rows=1462 width=32) + Output: atan2(value1, (value2)::double precision), atan2((value2)::double precision, value3), atan2(value3, (value4)::double precision), atan2((value4)::double precision, value1) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select atan2 (builtin function, result) +--Testcase 678: +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3; + atan2 | atan2 | atan2 | atan2 +-----------------------+--------------------+---------------------+--------------------- + 0.0009999996666668668 | 1.5717963264615635 | -3.1405926539231266 | -1.5697963271282298 + 0.0019999973333397333 | 1.5727963241282363 | -3.1395926562564536 | -1.5687963294615568 + 0.0029999910000485996 | 1.5737963177949452 | -3.1385926625897445 | -1.5677963357948481 + 0.005499944542673214 | 1.5762962713375699 | -3.1360927090471202 | -1.5652963822522235 + 0.010999556365540751 | 1.5817958831604373 | -3.1305930972242524 | -1.5597967704293558 + 0.01649850286954865 | 1.5872948296644454 | -3.1250941507202445 | -1.554297823925348 +(6 rows) + +-- select atan2 (builtin function, not pushdown constraints, explain) +--Testcase 679: +EXPLAIN VERBOSE +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1484.10 rows=1455 width=32) + Output: atan2(value1, (value2)::double precision), atan2((value2)::double precision, value3), atan2(value3, (value4)::double precision), atan2((value4)::double precision, value1) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select atan2 (builtin function, not pushdown constraints, result) +--Testcase 680: +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE to_hex(value2) != '64'; + atan2 | atan2 | atan2 | atan2 +----------------------+--------------------+---------------------+--------------------- + 0.005499944542673214 | 1.5762962713375699 | -3.1360927090471202 | -1.5652963822522235 + 0.010999556365540751 | 1.5817958831604373 | -3.1305930972242524 | -1.5597967704293558 + 0.01649850286954865 | 1.5872948296644454 | -3.1250941507202445 | -1.554297823925348 +(3 rows) + +-- select atan2 (builtin function, pushdown constraints, explain) +--Testcase 681: +EXPLAIN VERBOSE +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE value2 != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1484.10 rows=1455 width=32) + Output: atan2(value1, (value2)::double precision), atan2((value2)::double precision, value3), atan2(value3, (value4)::double precision), atan2((value4)::double precision, value1) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select atan2 (builtin function, pushdown constraints, result) +--Testcase 682: +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE value2 != 200; + atan2 | atan2 | atan2 | atan2 +-----------------------+--------------------+---------------------+--------------------- + 0.0009999996666668668 | 1.5717963264615635 | -3.1405926539231266 | -1.5697963271282298 + 0.0019999973333397333 | 1.5727963241282363 | -3.1395926562564536 | -1.5687963294615568 + 0.0029999910000485996 | 1.5737963177949452 | -3.1385926625897445 | -1.5677963357948481 +(3 rows) + +-- select atan2 as nest function with agg (pushdown, explain) +--Testcase 683: +EXPLAIN VERBOSE +SELECT sum(value3), sum(value4),atan2(sum(value3), sum(value3)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (sum(value3)), (sum(value4)), (atan2(sum(value3), sum(value3))) + InfluxDB query: SELECT sum("value3"), sum("value4"), atan2(sum("value3"), sum("value3")) FROM "s3" +(3 rows) + +-- select atan2 as nest function with agg (pushdown, result) +--Testcase 684: +SELECT sum(value3), sum(value4),atan2(sum(value3), sum(value3)) FROM s3; + sum | sum | atan2 +--------------------+------+-------------------- + -7.199999999999999 | -900 | -2.356194490192345 +(1 row) + +-- select atan2 as nest with log2 (pushdown, explain) +--Testcase 685: +EXPLAIN VERBOSE +SELECT atan2(log2(value1), log2(value1)),atan2(log2(1/value1), log2(1/value1)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..5145.60 rows=2560 width=16) + Output: atan2(log2(value1), log2(value1)), atan2(log2(('1'::double precision / value1)), log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select atan2 as nest with log2 (pushdown, result) +--Testcase 686: +SELECT atan2(log2(value1), log2(value1)),atan2(log2(1/value1), log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select atan2 with non pushdown func and explicit constant (explain) +--Testcase 687: +EXPLAIN VERBOSE +SELECT atan2(value3, value4), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2058.24 rows=2048 width=48) + Output: atan2(value3, (value4)::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3", "value4" FROM "s3" +(3 rows) + +-- select atan2 with non pushdown func and explicit constant (result) +--Testcase 688: +SELECT atan2(value3, value4), pi(), 4.1 FROM s3; + atan2 | pi | ?column? +---------------------+-------------------+---------- + -3.1405926539231266 | 3.141592653589793 | 4.1 + -3.1395926562564536 | 3.141592653589793 | 4.1 + -3.1385926625897445 | 3.141592653589793 | 4.1 + -3.1360927090471202 | 3.141592653589793 | 4.1 + -3.1305930972242524 | 3.141592653589793 | 4.1 + -3.1250941507202445 | 3.141592653589793 | 4.1 +(6 rows) + +-- select atan2 with order by (explain) +--Testcase 689: +EXPLAIN VERBOSE +SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by atan2(1-value1, 1-value2); + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Sort (cost=2181.12..2186.24 rows=2048 width=16) + Output: value1, (atan2(('1'::double precision - value1), ((1 - value2))::double precision)) + Sort Key: (atan2(('1'::double precision - s3.value1), ((1 - s3.value2))::double precision)) + -> Foreign Scan on public.s3 (cost=10.00..2068.48 rows=2048 width=16) + Output: value1, atan2(('1'::double precision - value1), ((1 - value2))::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(6 rows) + +-- select atan2 with order by (result) +--Testcase 690: +SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by atan2(1-value1, 1-value2); + value1 | atan2 +--------+--------------------- + 1.1 | -3.1410901410692773 + 2.2 | -3.1355625759253205 + 3.3 | -3.130035379243216 + 0.1 | 3.1325019949247332 + 0.2 | 3.1335120213928933 + 0.3 | 3.1345220643486456 +(6 rows) + +-- select atan2 with order by index (result) +--Testcase 691: +SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by 2,1; + value1 | atan2 +--------+--------------------- + 1.1 | -3.1410901410692773 + 2.2 | -3.1355625759253205 + 3.3 | -3.130035379243216 + 0.1 | 3.1325019949247332 + 0.2 | 3.1335120213928933 + 0.3 | 3.1345220643486456 +(6 rows) + +-- select atan2 with order by index (result) +--Testcase 692: +SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by 1,2; + value1 | atan2 +--------+--------------------- + 0.1 | 3.1325019949247332 + 0.2 | 3.1335120213928933 + 0.3 | 3.1345220643486456 + 1.1 | -3.1410901410692773 + 2.2 | -3.1355625759253205 + 3.3 | -3.130035379243216 +(6 rows) + +-- select atan2 and as +--Testcase 693: +SELECT atan2(value3, value4) as atan21 FROM s3; + atan21 +--------------------- + -3.1405926539231266 + -3.1395926562564536 + -3.1385926625897445 + -3.1360927090471202 + -3.1305930972242524 + -3.1250941507202445 +(6 rows) + +-- select atan2(*) (stub function, explain) +--Testcase 694: +EXPLAIN VERBOSE +SELECT atan2_all(value1) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3200.00 rows=2560 width=32) + Output: atan2_all(value1) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select atan2(*) (stub function, result) +--Testcase 695: +SELECT atan2_all(value1) from s3; +ERROR: stub atan2_all(float8) is called +CONTEXT: PL/pgSQL function atan2_all(double precision) line 3 at RAISE +-- select ceil (builtin function, explain) +--Testcase 696: +EXPLAIN VERBOSE +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1483.93 rows=1462 width=32) + Output: ceil(value1), ceil((value2)::double precision), ceil(value3), ceil((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select ceil (builtin function, result) +--Testcase 697: +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3; + ceil | ceil | ceil | ceil +------+------+------+------ + 1 | 100 | -0 | -100 + 1 | 100 | -0 | -100 + 1 | 100 | -0 | -100 + 2 | 200 | -1 | -200 + 3 | 200 | -2 | -200 + 4 | 200 | -3 | -200 +(6 rows) + +-- select ceil (builtin function, not pushdown constraints, explain) +--Testcase 698: +EXPLAIN VERBOSE +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: ceil(value1), ceil((value2)::double precision), ceil(value3), ceil((value4)::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select ceil (builtin function, not pushdown constraints, result) +--Testcase 699: +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE to_hex(value2) != '64'; + ceil | ceil | ceil | ceil +------+------+------+------ + 2 | 200 | -1 | -200 + 3 | 200 | -2 | -200 + 4 | 200 | -3 | -200 +(3 rows) + +-- select ceil (builtin function, pushdown constraints, explain) +--Testcase 700: +EXPLAIN VERBOSE +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE value2 != 200; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: ceil(value1), ceil((value2)::double precision), ceil(value3), ceil((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select ceil (builtin function, pushdown constraints, result) +--Testcase 701: +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE value2 != 200; + ceil | ceil | ceil | ceil +------+------+------+------ + 1 | 100 | -0 | -100 + 1 | 100 | -0 | -100 + 1 | 100 | -0 | -100 +(3 rows) + +-- select ceil as nest function with agg (pushdown, explain) +--Testcase 702: +EXPLAIN VERBOSE +SELECT sum(value3),ceil(sum(value3)) FROM s3; + QUERY PLAN +----------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (ceil(sum(value3))) + InfluxDB query: SELECT sum("value3"), ceil(sum("value3")) FROM "s3" +(3 rows) + +-- select ceil as nest function with agg (pushdown, result) +--Testcase 703: +SELECT sum(value3),ceil(sum(value3)) FROM s3; + sum | ceil +--------------------+------ + -7.199999999999999 | -7 +(1 row) + +-- select ceil as nest with log2 (pushdown, explain) +--Testcase 704: +EXPLAIN VERBOSE +SELECT ceil(log2(value1)),ceil(log2(1/value1)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: ceil(log2(value1)), ceil(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select ceil as nest with log2 (pushdown, result) +--Testcase 705: +SELECT ceil(log2(value1)),ceil(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select ceil with non pushdown func and explicit constant (explain) +--Testcase 706: +EXPLAIN VERBOSE +SELECT ceil(value3), pi(), 4.1 FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: ceil(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select ceil with non pushdown func and explicit constant (result) +--Testcase 707: +SELECT ceil(value3), pi(), 4.1 FROM s3; + ceil | pi | ?column? +------+-------------------+---------- + -0 | 3.141592653589793 | 4.1 + -0 | 3.141592653589793 | 4.1 + -0 | 3.141592653589793 | 4.1 + -1 | 3.141592653589793 | 4.1 + -2 | 3.141592653589793 | 4.1 + -3 | 3.141592653589793 | 4.1 +(6 rows) + +-- select ceil with order by (explain) +--Testcase 708: +EXPLAIN VERBOSE +SELECT value1, ceil(1-value1) FROM s3 order by ceil(1-value1); + QUERY PLAN +--------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (ceil(('1'::double precision - value1))) + Sort Key: (ceil(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, ceil(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select ceil with order by (result) +--Testcase 709: +SELECT value1, ceil(1-value1) FROM s3 order by ceil(1-value1); + value1 | ceil +--------+------ + 3.3 | -2 + 2.2 | -1 + 1.1 | -0 + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 +(6 rows) + +-- select ceil with order by index (result) +--Testcase 710: +SELECT value1, ceil(1-value1) FROM s3 order by 2,1; + value1 | ceil +--------+------ + 3.3 | -2 + 2.2 | -1 + 1.1 | -0 + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 +(6 rows) + +-- select ceil with order by index (result) +--Testcase 711: +SELECT value1, ceil(1-value1) FROM s3 order by 1,2; + value1 | ceil +--------+------ + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 + 1.1 | -0 + 2.2 | -1 + 3.3 | -2 +(6 rows) + +-- select ceil and as +--Testcase 712: +SELECT ceil(value3) as ceil1 FROM s3; + ceil1 +------- + -0 + -0 + -0 + -1 + -2 + -3 +(6 rows) + +-- select ceil(*) (stub agg function, explain) +--Testcase 713: +EXPLAIN VERBOSE +SELECT ceil_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: ceil_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select ceil(*) (stub agg function, result) +--Testcase 714: +SELECT ceil_all() from s3; +ERROR: stub ceil_all() is called +CONTEXT: PL/pgSQL function ceil_all() line 3 at RAISE +-- select ceil(*) (stub agg function and group by tag only) (explain) +--Testcase 715: +EXPLAIN VERBOSE +SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (ceil_all()), tag1 + InfluxDB query: SELECT ceil(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select ceil(*) (stub agg function and group by tag only) (result) +--Testcase 716: +SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + ceil_all +--------------------------------------- + (1970-01-01T00:00:00Z,,1,100,-0,-100) + (1970-01-01T00:00:01Z,,1,100,-0,-100) + (1970-01-01T00:00:02Z,,1,100,-0,-100) + (1970-01-01T00:00:03Z,,2,200,-1,-200) + (1970-01-01T00:00:04Z,,3,200,-2,-200) +(5 rows) + +-- select ceil(*) (stub agg function, expose data, explain) +--Testcase 717: +EXPLAIN VERBOSE +SELECT (ceil_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((ceil_all())::s3)."time", ((ceil_all())::s3).tag1, ((ceil_all())::s3).value1, ((ceil_all())::s3).value2, ((ceil_all())::s3).value3, ((ceil_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select ceil(*) (stub agg function, expose data, result) +--Testcase 718: +SELECT (ceil_all()::s3).* from s3; +ERROR: stub ceil_all() is called +CONTEXT: PL/pgSQL function ceil_all() line 3 at RAISE +-- select cos (builtin function, explain) +--Testcase 719: +EXPLAIN VERBOSE +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1483.93 rows=1462 width=32) + Output: cos(value1), cos((value2)::double precision), cos(value3), cos((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select cos (builtin function, result) +--Testcase 720: +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3; + cos | cos | cos | cos +---------------------+---------------------+---------------------+--------------------- + 0.9950041652780258 | 0.8623188722876839 | 0.9950041652780258 | 0.8623188722876839 + 0.9800665778412416 | 0.8623188722876839 | 0.9800665778412416 | 0.8623188722876839 + 0.955336489125606 | 0.8623188722876839 | 0.955336489125606 | 0.8623188722876839 + 0.4535961214255773 | 0.48718767500700594 | 0.4535961214255773 | 0.48718767500700594 + -0.5885011172553458 | 0.48718767500700594 | -0.5885011172553458 | 0.48718767500700594 + -0.9874797699088649 | 0.48718767500700594 | -0.9874797699088649 | 0.48718767500700594 +(6 rows) + +-- select cos (builtin function, not pushdown constraints, explain) +--Testcase 721: +EXPLAIN VERBOSE +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: cos(value1), cos((value2)::double precision), cos(value3), cos((value4)::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select cos (builtin function, not pushdown constraints, result) +--Testcase 722: +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE to_hex(value2) != '64'; + cos | cos | cos | cos +---------------------+---------------------+---------------------+--------------------- + 0.4535961214255773 | 0.48718767500700594 | 0.4535961214255773 | 0.48718767500700594 + -0.5885011172553458 | 0.48718767500700594 | -0.5885011172553458 | 0.48718767500700594 + -0.9874797699088649 | 0.48718767500700594 | -0.9874797699088649 | 0.48718767500700594 +(3 rows) + +-- select cos (builtin function, pushdown constraints, explain) +--Testcase 723: +EXPLAIN VERBOSE +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE value2 != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: cos(value1), cos((value2)::double precision), cos(value3), cos((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select cos (builtin function, pushdown constraints, result) +--Testcase 724: +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE value2 != 200; + cos | cos | cos | cos +--------------------+--------------------+--------------------+-------------------- + 0.9950041652780258 | 0.8623188722876839 | 0.9950041652780258 | 0.8623188722876839 + 0.9800665778412416 | 0.8623188722876839 | 0.9800665778412416 | 0.8623188722876839 + 0.955336489125606 | 0.8623188722876839 | 0.955336489125606 | 0.8623188722876839 +(3 rows) + +-- select cos as nest function with agg (pushdown, explain) +--Testcase 725: +EXPLAIN VERBOSE +SELECT sum(value3),cos(sum(value3)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (cos(sum(value3))) + InfluxDB query: SELECT sum("value3"), cos(sum("value3")) FROM "s3" +(3 rows) + +-- select cos as nest function with agg (pushdown, result) +--Testcase 726: +SELECT sum(value3),cos(sum(value3)) FROM s3; + sum | cos +--------------------+-------------------- + -7.199999999999999 | 0.6083513145322552 +(1 row) + +-- select cos as nest with log2 (pushdown, explain) +--Testcase 727: +EXPLAIN VERBOSE +SELECT cos(log2(value1)),cos(log2(1/value1)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: cos(log2(value1)), cos(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select cos as nest with log2 (pushdown, result) +--Testcase 728: +SELECT cos(log2(value1)),cos(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select cos with non pushdown func and explicit constant (explain) +--Testcase 729: +EXPLAIN VERBOSE +SELECT cos(value3), pi(), 4.1 FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: cos(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select cos with non pushdown func and explicit constant (result) +--Testcase 730: +SELECT cos(value3), pi(), 4.1 FROM s3; + cos | pi | ?column? +---------------------+-------------------+---------- + 0.9950041652780258 | 3.141592653589793 | 4.1 + 0.9800665778412416 | 3.141592653589793 | 4.1 + 0.955336489125606 | 3.141592653589793 | 4.1 + 0.4535961214255773 | 3.141592653589793 | 4.1 + -0.5885011172553458 | 3.141592653589793 | 4.1 + -0.9874797699088649 | 3.141592653589793 | 4.1 +(6 rows) + +-- select cos with order by (explain) +--Testcase 731: +EXPLAIN VERBOSE +SELECT value1, cos(1-value1) FROM s3 order by cos(1-value1); + QUERY PLAN +--------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (cos(('1'::double precision - value1))) + Sort Key: (cos(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, cos(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select cos with order by (result) +--Testcase 732: +SELECT value1, cos(1-value1) FROM s3 order by cos(1-value1); + value1 | cos +--------+--------------------- + 3.3 | -0.6662760212798241 + 2.2 | 0.3623577544766734 + 0.1 | 0.6216099682706644 + 0.2 | 0.6967067093471654 + 0.3 | 0.7648421872844885 + 1.1 | 0.9950041652780257 +(6 rows) + +-- select cos with order by index (result) +--Testcase 733: +SELECT value1, cos(1-value1) FROM s3 order by 2,1; + value1 | cos +--------+--------------------- + 3.3 | -0.6662760212798241 + 2.2 | 0.3623577544766734 + 0.1 | 0.6216099682706644 + 0.2 | 0.6967067093471654 + 0.3 | 0.7648421872844885 + 1.1 | 0.9950041652780257 +(6 rows) + +-- select cos with order by index (result) +--Testcase 734: +SELECT value1, cos(1-value1) FROM s3 order by 1,2; + value1 | cos +--------+--------------------- + 0.1 | 0.6216099682706644 + 0.2 | 0.6967067093471654 + 0.3 | 0.7648421872844885 + 1.1 | 0.9950041652780257 + 2.2 | 0.3623577544766734 + 3.3 | -0.6662760212798241 +(6 rows) + +-- select cos and as +--Testcase 735: +SELECT cos(value3) as cos1 FROM s3; + cos1 +--------------------- + 0.9950041652780258 + 0.9800665778412416 + 0.955336489125606 + 0.4535961214255773 + -0.5885011172553458 + -0.9874797699088649 +(6 rows) + +-- select cos(*) (stub agg function, explain) +--Testcase 736: +EXPLAIN VERBOSE +SELECT cos_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: cos_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select cos(*) (stub agg function, result) +--Testcase 737: +SELECT cos_all() from s3; +ERROR: stub cos_all() is called +CONTEXT: PL/pgSQL function cos_all() line 3 at RAISE +-- select cos(*) (stub agg function and group by tag only) (explain) +--Testcase 738: +EXPLAIN VERBOSE +SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (cos_all()), tag1 + InfluxDB query: SELECT cos(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select cos(*) (stub agg function and group by tag only) (result) +--Testcase 739: +SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + cos_all +--------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.9950041652780257,0.8623188722876839,0.9950041652780257,0.8623188722876839) + (1970-01-01T00:00:01Z,,0.9800665778412416,0.8623188722876839,0.9800665778412416,0.8623188722876839) + (1970-01-01T00:00:02Z,,0.955336489125606,0.8623188722876839,0.955336489125606,0.8623188722876839) + (1970-01-01T00:00:03Z,,0.4535961214255773,0.48718767500700594,0.4535961214255773,0.48718767500700594) + (1970-01-01T00:00:04Z,,-0.5885011172553458,0.48718767500700594,-0.5885011172553458,0.48718767500700594) +(5 rows) + +-- select exp (builtin function, explain) +--Testcase 740: +EXPLAIN VERBOSE +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1483.93 rows=1462 width=32) + Output: exp(value1), exp((value2)::double precision), exp(value3), exp((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select exp (builtin function, result) +--Testcase 741: +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3; + exp | exp | exp | exp +--------------------+------------------------+----------------------+------------------------ + 1.1051709180756477 | 2.6881171418161356e+43 | 0.9048374180359595 | 3.720075976020836e-44 + 1.2214027581601699 | 2.6881171418161356e+43 | 0.8187307530779818 | 3.720075976020836e-44 + 1.3498588075760032 | 2.6881171418161356e+43 | 0.7408182206817179 | 3.720075976020836e-44 + 3.0041660239464334 | 7.225973768125749e+86 | 0.33287108369807955 | 1.3838965267367376e-87 + 9.025013499434122 | 7.225973768125749e+86 | 0.11080315836233387 | 1.3838965267367376e-87 + 27.112638920657883 | 7.225973768125749e+86 | 0.036883167401240015 | 1.3838965267367376e-87 +(6 rows) + +-- select exp (builtin function, not pushdown constraints, explain) +--Testcase 742: +EXPLAIN VERBOSE +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: exp(value1), exp((value2)::double precision), exp(value3), exp((value4)::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select exp (builtin function, not pushdown constraints, result) +--Testcase 743: +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE to_hex(value2) != '64'; + exp | exp | exp | exp +--------------------+-----------------------+----------------------+------------------------ + 3.0041660239464334 | 7.225973768125749e+86 | 0.33287108369807955 | 1.3838965267367376e-87 + 9.025013499434122 | 7.225973768125749e+86 | 0.11080315836233387 | 1.3838965267367376e-87 + 27.112638920657883 | 7.225973768125749e+86 | 0.036883167401240015 | 1.3838965267367376e-87 +(3 rows) + +-- select exp (builtin function, pushdown constraints, explain) +--Testcase 744: +EXPLAIN VERBOSE +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE value2 != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: exp(value1), exp((value2)::double precision), exp(value3), exp((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select exp (builtin function, pushdown constraints, result) +--Testcase 745: +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE value2 != 200; + exp | exp | exp | exp +--------------------+------------------------+--------------------+----------------------- + 1.1051709180756477 | 2.6881171418161356e+43 | 0.9048374180359595 | 3.720075976020836e-44 + 1.2214027581601699 | 2.6881171418161356e+43 | 0.8187307530779818 | 3.720075976020836e-44 + 1.3498588075760032 | 2.6881171418161356e+43 | 0.7408182206817179 | 3.720075976020836e-44 +(3 rows) + +-- select exp as nest function with agg (pushdown, explain) +--Testcase 746: +EXPLAIN VERBOSE +SELECT sum(value3),exp(sum(value3)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (exp(sum(value3))) + InfluxDB query: SELECT sum("value3"), exp(sum("value3")) FROM "s3" +(3 rows) + +-- select exp as nest function with agg (pushdown, result) +--Testcase 747: +SELECT sum(value3),exp(sum(value3)) FROM s3; + sum | exp +--------------------+----------------------- + -7.199999999999999 | 0.0007465858083766799 +(1 row) + +-- select exp as nest with log2 (pushdown, explain) +--Testcase 748: +EXPLAIN VERBOSE +SELECT exp(log2(value1)),exp(log2(1/value1)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: exp(log2(value1)), exp(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select exp as nest with log2 (pushdown, result) +--Testcase 749: +SELECT exp(log2(value1)),exp(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select exp with non pushdown func and explicit constant (explain) +--Testcase 750: +EXPLAIN VERBOSE +SELECT exp(value3), pi(), 4.1 FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: exp(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select exp with non pushdown func and explicit constant (result) +--Testcase 751: +SELECT exp(value3), pi(), 4.1 FROM s3; + exp | pi | ?column? +----------------------+-------------------+---------- + 0.9048374180359595 | 3.141592653589793 | 4.1 + 0.8187307530779818 | 3.141592653589793 | 4.1 + 0.7408182206817179 | 3.141592653589793 | 4.1 + 0.33287108369807955 | 3.141592653589793 | 4.1 + 0.11080315836233387 | 3.141592653589793 | 4.1 + 0.036883167401240015 | 3.141592653589793 | 4.1 +(6 rows) + +-- select exp with order by (explain) +--Testcase 752: +EXPLAIN VERBOSE +SELECT value1, exp(1-value1) FROM s3 order by exp(1-value1); + QUERY PLAN +--------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (exp(('1'::double precision - value1))) + Sort Key: (exp(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, exp(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select exp with order by (result) +--Testcase 753: +SELECT value1, exp(1-value1) FROM s3 order by exp(1-value1); + value1 | exp +--------+--------------------- + 3.3 | 0.10025884372280375 + 2.2 | 0.301194211912202 + 1.1 | 0.9048374180359595 + 0.3 | 2.0137527074704766 + 0.2 | 2.225540928492468 + 0.1 | 2.45960311115695 +(6 rows) + +-- select exp with order by index (result) +--Testcase 754: +SELECT value1, exp(1-value1) FROM s3 order by 2,1; + value1 | exp +--------+--------------------- + 3.3 | 0.10025884372280375 + 2.2 | 0.301194211912202 + 1.1 | 0.9048374180359595 + 0.3 | 2.0137527074704766 + 0.2 | 2.225540928492468 + 0.1 | 2.45960311115695 +(6 rows) + +-- select exp with order by index (result) +--Testcase 755: +SELECT value1, exp(1-value1) FROM s3 order by 1,2; + value1 | exp +--------+--------------------- + 0.1 | 2.45960311115695 + 0.2 | 2.225540928492468 + 0.3 | 2.0137527074704766 + 1.1 | 0.9048374180359595 + 2.2 | 0.301194211912202 + 3.3 | 0.10025884372280375 +(6 rows) + +-- select exp and as +--Testcase 756: +SELECT exp(value3) as exp1 FROM s3; + exp1 +---------------------- + 0.9048374180359595 + 0.8187307530779818 + 0.7408182206817179 + 0.33287108369807955 + 0.11080315836233387 + 0.036883167401240015 +(6 rows) + +-- select exp(*) (stub agg function, explain) +--Testcase 757: +EXPLAIN VERBOSE +SELECT exp_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: exp_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select exp(*) (stub agg function, result) +--Testcase 758: +SELECT exp_all() from s3; +ERROR: stub exp_all() is called +CONTEXT: PL/pgSQL function exp_all() line 3 at RAISE +-- select exp(*) (stub agg function and group by tag only) (explain) +--Testcase 759: +EXPLAIN VERBOSE +SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (exp_all()), tag1 + InfluxDB query: SELECT exp(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select exp(*) (stub agg function and group by tag only) (result) +--Testcase 760: +SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + exp_all +------------------------------------------------------------------------------------------------------------ + (1970-01-01T00:00:00Z,,1.1051709180756477,2.6881171418161356e+43,0.9048374180359595,3.720075976020836e-44) + (1970-01-01T00:00:01Z,,1.2214027581601699,2.6881171418161356e+43,0.8187307530779819,3.720075976020836e-44) + (1970-01-01T00:00:02Z,,1.3498588075760032,2.6881171418161356e+43,0.7408182206817179,3.720075976020836e-44) + (1970-01-01T00:00:03Z,,3.0041660239464334,7.22597376812575e+86,0.3328710836980795,1.3838965267367376e-87) + (1970-01-01T00:00:04Z,,9.025013499434122,7.22597376812575e+86,0.11080315836233386,1.3838965267367376e-87) +(5 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 761: +SELECT ceil_all(), cos_all(), exp_all() FROM s3; +ERROR: stub ceil_all() is called +CONTEXT: PL/pgSQL function ceil_all() line 3 at RAISE +-- select floor (builtin function, explain) +--Testcase 762: +EXPLAIN VERBOSE +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1483.93 rows=1462 width=32) + Output: floor(value1), floor((value2)::double precision), floor(value3), floor((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select floor (builtin function, result) +--Testcase 763: +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3; + floor | floor | floor | floor +-------+-------+-------+------- + 0 | 100 | -1 | -100 + 0 | 100 | -1 | -100 + 0 | 100 | -1 | -100 + 1 | 200 | -2 | -200 + 2 | 200 | -3 | -200 + 3 | 200 | -4 | -200 +(6 rows) + +-- select floor (builtin function, not pushdown constraints, explain) +--Testcase 764: +EXPLAIN VERBOSE +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: floor(value1), floor((value2)::double precision), floor(value3), floor((value4)::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select floor (builtin function, not pushdown constraints, result) +--Testcase 765: +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE to_hex(value2) != '64'; + floor | floor | floor | floor +-------+-------+-------+------- + 1 | 200 | -2 | -200 + 2 | 200 | -3 | -200 + 3 | 200 | -4 | -200 +(3 rows) + +-- select floor (builtin function, pushdown constraints, explain) +--Testcase 766: +EXPLAIN VERBOSE +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE value2 != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: floor(value1), floor((value2)::double precision), floor(value3), floor((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select floor (builtin function, pushdown constraints, result) +--Testcase 767: +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE value2 != 200; + floor | floor | floor | floor +-------+-------+-------+------- + 0 | 100 | -1 | -100 + 0 | 100 | -1 | -100 + 0 | 100 | -1 | -100 +(3 rows) + +-- select floor as nest function with agg (pushdown, explain) +--Testcase 768: +EXPLAIN VERBOSE +SELECT sum(value3),floor(sum(value3)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (floor(sum(value3))) + InfluxDB query: SELECT sum("value3"), floor(sum("value3")) FROM "s3" +(3 rows) + +-- select floor as nest function with agg (pushdown, result) +--Testcase 769: +SELECT sum(value3),floor(sum(value3)) FROM s3; + sum | floor +--------------------+------- + -7.199999999999999 | -8 +(1 row) + +-- select floor as nest with log2 (pushdown, explain) +--Testcase 770: +EXPLAIN VERBOSE +SELECT floor(log2(value1)),floor(log2(1/value1)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: floor(log2(value1)), floor(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select floor as nest with log2 (pushdown, result) +--Testcase 771: +SELECT floor(log2(value1)),floor(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select floor with non pushdown func and explicit constant (explain) +--Testcase 772: +EXPLAIN VERBOSE +SELECT floor(value3), pi(), 4.1 FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: floor(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select floor with non pushdown func and explicit constant (result) +--Testcase 773: +SELECT floor(value3), pi(), 4.1 FROM s3; + floor | pi | ?column? +-------+-------------------+---------- + -1 | 3.141592653589793 | 4.1 + -1 | 3.141592653589793 | 4.1 + -1 | 3.141592653589793 | 4.1 + -2 | 3.141592653589793 | 4.1 + -3 | 3.141592653589793 | 4.1 + -4 | 3.141592653589793 | 4.1 +(6 rows) + +-- select floor with order by (explain) +--Testcase 774: +EXPLAIN VERBOSE +SELECT value1, floor(1-value1) FROM s3 order by floor(1-value1); + QUERY PLAN +--------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (floor(('1'::double precision - value1))) + Sort Key: (floor(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, floor(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select floor with order by (result) +--Testcase 775: +SELECT value1, floor(1-value1) FROM s3 order by floor(1-value1); + value1 | floor +--------+------- + 3.3 | -3 + 2.2 | -2 + 1.1 | -1 + 0.1 | 0 + 0.2 | 0 + 0.3 | 0 +(6 rows) + +-- select floor with order by index (result) +--Testcase 776: +SELECT value1, floor(1-value1) FROM s3 order by 2,1; + value1 | floor +--------+------- + 3.3 | -3 + 2.2 | -2 + 1.1 | -1 + 0.1 | 0 + 0.2 | 0 + 0.3 | 0 +(6 rows) + +-- select floor with order by index (result) +--Testcase 777: +SELECT value1, floor(1-value1) FROM s3 order by 1,2; + value1 | floor +--------+------- + 0.1 | 0 + 0.2 | 0 + 0.3 | 0 + 1.1 | -1 + 2.2 | -2 + 3.3 | -3 +(6 rows) + +-- select floor and as +--Testcase 778: +SELECT floor(value3) as floor1 FROM s3; + floor1 +-------- + -1 + -1 + -1 + -2 + -3 + -4 +(6 rows) + +-- select floor(*) (stub agg function, explain) +--Testcase 779: +EXPLAIN VERBOSE +SELECT floor_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: floor_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select floor(*) (stub agg function, result) +--Testcase 780: +SELECT floor_all() from s3; +ERROR: stub floor_all() is called +CONTEXT: PL/pgSQL function floor_all() line 3 at RAISE +-- select floor(*) (stub agg function and group by tag only) (explain) +--Testcase 781: +EXPLAIN VERBOSE +SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (floor_all()), tag1 + InfluxDB query: SELECT floor(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select floor(*) (stub agg function and group by tag only) (result) +--Testcase 782: +SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + floor_all +--------------------------------------- + (1970-01-01T00:00:00Z,,0,100,-1,-100) + (1970-01-01T00:00:01Z,,0,100,-1,-100) + (1970-01-01T00:00:02Z,,0,100,-1,-100) + (1970-01-01T00:00:03Z,,1,200,-2,-200) + (1970-01-01T00:00:04Z,,2,200,-3,-200) +(5 rows) + +-- select floor(*) (stub agg function, expose data, explain) +--Testcase 783: +EXPLAIN VERBOSE +SELECT (floor_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((floor_all())::s3)."time", ((floor_all())::s3).tag1, ((floor_all())::s3).value1, ((floor_all())::s3).value2, ((floor_all())::s3).value3, ((floor_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select floor(*) (stub agg function, expose data, result) +--Testcase 784: +SELECT (floor_all()::s3).* from s3; +ERROR: stub floor_all() is called +CONTEXT: PL/pgSQL function floor_all() line 3 at RAISE +-- select ln (builtin function, explain) +--Testcase 785: +EXPLAIN VERBOSE +SELECT ln(value1), ln(value2) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2063.36 rows=2048 width=16) + Output: ln(value1), ln((value2)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(3 rows) + +-- select ln (builtin function, result) +--Testcase 786: +SELECT ln(value1), ln(value2) FROM s3; + ln | ln +---------------------+------------------- + -2.3025850929940455 | 4.605170185988092 + -1.6094379124341003 | 4.605170185988092 + -1.2039728043259361 | 4.605170185988092 + 0.09531017980432493 | 5.298317366548036 + 0.7884573603642703 | 5.298317366548036 + 1.1939224684724346 | 5.298317366548036 +(6 rows) + +-- select ln (builtin function, not pushdown constraints, explain) +--Testcase 787: +EXPLAIN VERBOSE +SELECT ln(value1), ln(value2) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2053.28 rows=2038 width=16) + Output: ln(value1), ln((value2)::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2" FROM "s3" +(4 rows) + +-- select ln (builtin function, not pushdown constraints, result) +--Testcase 788: +SELECT ln(value1), ln(value2) FROM s3 WHERE to_hex(value2) != '64'; + ln | ln +---------------------+------------------- + 0.09531017980432493 | 5.298317366548036 + 0.7884573603642703 | 5.298317366548036 + 1.1939224684724346 | 5.298317366548036 +(3 rows) + +-- select ln (builtin function, pushdown constraints, explain) +--Testcase 789: +EXPLAIN VERBOSE +SELECT ln(value1), ln(value2) FROM s3 WHERE value2 != 200; + QUERY PLAN +--------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2053.28 rows=2038 width=16) + Output: ln(value1), ln((value2)::double precision) + InfluxDB query: SELECT "value1", "value2" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select ln (builtin function, pushdown constraints, result) +--Testcase 790: +SELECT ln(value1), ln(value2) FROM s3 WHERE value2 != 200; + ln | ln +---------------------+------------------- + -2.3025850929940455 | 4.605170185988092 + -1.6094379124341003 | 4.605170185988092 + -1.2039728043259361 | 4.605170185988092 +(3 rows) + +-- select ln as nest function with agg (pushdown, explain) +--Testcase 791: +EXPLAIN VERBOSE +SELECT sum(value3),ln(sum(value3)) FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (ln(sum(value3))) + InfluxDB query: SELECT sum("value3"), ln(sum("value3")) FROM "s3" +(3 rows) + +-- select ln as nest function with agg (pushdown, result) +--Testcase 792: +SELECT sum(value3),ln(sum(value3)) FROM s3; + sum | ln +--------------------+---- + -7.199999999999999 | +(1 row) + +-- select ln as nest with log2 (pushdown, explain) +--Testcase 793: +EXPLAIN VERBOSE +SELECT ln(log2(value1)),ln(log2(1/value1)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: ln(log2(value1)), ln(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select ln as nest with log2 (pushdown, result) +--Testcase 794: +SELECT ln(log2(value1)),ln(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select ln with non pushdown func and explicit constant (explain) +--Testcase 795: +EXPLAIN VERBOSE +SELECT ln(value3), pi(), 4.1 FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: ln(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select ln with non pushdown func and explicit constant (result) +--Testcase 796: +SELECT ln(value3), pi(), 4.1 FROM s3; +ERROR: cannot take logarithm of a negative number +-- select ln with order by (explain) +--Testcase 797: +EXPLAIN VERBOSE +SELECT value1, ln(1-value1) FROM s3 order by ln(1-value1); + QUERY PLAN +--------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (ln(('1'::double precision - value1))) + Sort Key: (ln(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, ln(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select ln with order by (result) +--Testcase 798: +SELECT value1, ln(1-value1) FROM s3 order by ln(1-value1); +ERROR: cannot take logarithm of a negative number +-- select ln with order by index (result) +--Testcase 799: +SELECT value1, ln(1-value1) FROM s3 order by 2,1; +ERROR: cannot take logarithm of a negative number +-- select ln with order by index (result) +--Testcase 800: +SELECT value1, ln(1-value1) FROM s3 order by 1,2; +ERROR: cannot take logarithm of a negative number +-- select ln and as +--Testcase 801: +SELECT ln(value1) as ln1 FROM s3; + ln1 +--------------------- + -2.3025850929940455 + -1.6094379124341003 + -1.2039728043259361 + 0.09531017980432493 + 0.7884573603642703 + 1.1939224684724346 +(6 rows) + +-- select ln(*) (stub agg function, explain) +--Testcase 802: +EXPLAIN VERBOSE +SELECT ln_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: ln_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select ln(*) (stub agg function, result) +--Testcase 803: +SELECT ln_all() from s3; +ERROR: stub ln_all() is called +CONTEXT: PL/pgSQL function ln_all() line 3 at RAISE +-- select ln(*) (stub agg function and group by tag only) (explain) +--Testcase 804: +EXPLAIN VERBOSE +SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (ln_all()), tag1 + InfluxDB query: SELECT ln(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select ln(*) (stub agg function and group by tag only) (result) +--Testcase 805: +SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + ln_all +----------------------------------------------------------------- + (1970-01-01T00:00:00Z,,-2.3025850929940455,4.605170185988092,,) + (1970-01-01T00:00:01Z,,-1.6094379124341003,4.605170185988092,,) + (1970-01-01T00:00:02Z,,-1.2039728043259361,4.605170185988092,,) + (1970-01-01T00:00:03Z,,0.09531017980432493,5.298317366548036,,) + (1970-01-01T00:00:04Z,,0.7884573603642703,5.298317366548036,,) +(5 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 806: +SELECT ln_all(), floor_all() FROM s3; +ERROR: stub ln_all() is called +CONTEXT: PL/pgSQL function ln_all() line 3 at RAISE +-- select pow (builtin function, explain) +--Testcase 807: +EXPLAIN VERBOSE +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1483.93 rows=1462 width=32) + Output: pow(value1, '2'::double precision), pow((value2)::double precision, '2'::double precision), pow(value3, '2'::double precision), pow((value4)::double precision, '2'::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select pow (builtin function, result) +--Testcase 808: +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3; + pow | pow | pow | pow +----------------------+-------+----------------------+------- + 0.010000000000000002 | 10000 | 0.010000000000000002 | 10000 + 0.04000000000000001 | 10000 | 0.04000000000000001 | 10000 + 0.09 | 10000 | 0.09 | 10000 + 1.2100000000000002 | 40000 | 1.2100000000000002 | 40000 + 4.840000000000001 | 40000 | 4.840000000000001 | 40000 + 10.889999999999999 | 40000 | 10.889999999999999 | 40000 +(6 rows) + +-- select pow (builtin function, not pushdown constraints, explain) +--Testcase 809: +EXPLAIN VERBOSE +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: pow(value1, '2'::double precision), pow((value2)::double precision, '2'::double precision), pow(value3, '2'::double precision), pow((value4)::double precision, '2'::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select pow (builtin function, not pushdown constraints, result) +--Testcase 810: +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE to_hex(value2) != '64'; + pow | pow | pow | pow +--------------------+-------+--------------------+------- + 1.2100000000000002 | 40000 | 1.2100000000000002 | 40000 + 4.840000000000001 | 40000 | 4.840000000000001 | 40000 + 10.889999999999999 | 40000 | 10.889999999999999 | 40000 +(3 rows) + +-- select pow (builtin function, pushdown constraints, explain) +--Testcase 811: +EXPLAIN VERBOSE +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE value2 != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: pow(value1, '2'::double precision), pow((value2)::double precision, '2'::double precision), pow(value3, '2'::double precision), pow((value4)::double precision, '2'::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select pow (builtin function, pushdown constraints, result) +--Testcase 812: +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE value2 != 200; + pow | pow | pow | pow +----------------------+-------+----------------------+------- + 0.010000000000000002 | 10000 | 0.010000000000000002 | 10000 + 0.04000000000000001 | 10000 | 0.04000000000000001 | 10000 + 0.09 | 10000 | 0.09 | 10000 +(3 rows) + +-- select pow as nest function with agg (pushdown, explain) +--Testcase 813: +EXPLAIN VERBOSE +SELECT sum(value3),pow(sum(value3), 2) FROM s3; + QUERY PLAN +------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (pow(sum(value3), '2'::double precision)) + InfluxDB query: SELECT sum("value3"), pow(sum("value3"), 2) FROM "s3" +(3 rows) + +-- select pow as nest function with agg (pushdown, result) +--Testcase 814: +SELECT sum(value3),pow(sum(value3), 2) FROM s3; + sum | pow +--------------------+------------------- + -7.199999999999999 | 51.83999999999999 +(1 row) + +-- select pow as nest with log2 (pushdown, explain) +--Testcase 815: +EXPLAIN VERBOSE +SELECT pow(log2(value1), 2),pow(log2(1/value1), 2) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: pow(log2(value1), '2'::double precision), pow(log2(('1'::double precision / value1)), '2'::double precision) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select pow as nest with log2 (pushdown, result) +--Testcase 816: +SELECT pow(log2(value1), 2),pow(log2(1/value1), 2) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select pow with non pushdown func and explicit constant (explain) +--Testcase 817: +EXPLAIN VERBOSE +SELECT pow(value3, 2), pi(), 4.1 FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: pow(value3, '2'::double precision), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select pow with non pushdown func and explicit constant (result) +--Testcase 818: +SELECT pow(value3, 2), pi(), 4.1 FROM s3; + pow | pi | ?column? +----------------------+-------------------+---------- + 0.010000000000000002 | 3.141592653589793 | 4.1 + 0.04000000000000001 | 3.141592653589793 | 4.1 + 0.09 | 3.141592653589793 | 4.1 + 1.2100000000000002 | 3.141592653589793 | 4.1 + 4.840000000000001 | 3.141592653589793 | 4.1 + 10.889999999999999 | 3.141592653589793 | 4.1 +(6 rows) + +-- select pow with order by (explain) +--Testcase 819: +EXPLAIN VERBOSE +SELECT value1, pow(1-value1, 2) FROM s3 order by pow(1-value1, 2); + QUERY PLAN +-------------------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (pow(('1'::double precision - value1), '2'::double precision)) + Sort Key: (pow(('1'::double precision - s3.value1), '2'::double precision)) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, pow(('1'::double precision - value1), '2'::double precision) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select pow with order by (result) +--Testcase 820: +SELECT value1, pow(1-value1, 2) FROM s3 order by pow(1-value1, 2); + value1 | pow +--------+---------------------- + 1.1 | 0.010000000000000018 + 0.3 | 0.48999999999999994 + 0.2 | 0.6400000000000001 + 0.1 | 0.81 + 2.2 | 1.4400000000000004 + 3.3 | 5.289999999999999 +(6 rows) + +-- select pow with order by index (result) +--Testcase 821: +SELECT value1, pow(1-value1, 2) FROM s3 order by 2,1; + value1 | pow +--------+---------------------- + 1.1 | 0.010000000000000018 + 0.3 | 0.48999999999999994 + 0.2 | 0.6400000000000001 + 0.1 | 0.81 + 2.2 | 1.4400000000000004 + 3.3 | 5.289999999999999 +(6 rows) + +-- select pow with order by index (result) +--Testcase 822: +SELECT value1, pow(1-value1, 2) FROM s3 order by 1,2; + value1 | pow +--------+---------------------- + 0.1 | 0.81 + 0.2 | 0.6400000000000001 + 0.3 | 0.48999999999999994 + 1.1 | 0.010000000000000018 + 2.2 | 1.4400000000000004 + 3.3 | 5.289999999999999 +(6 rows) + +-- select pow and as +--Testcase 823: +SELECT pow(value3, 2) as pow1 FROM s3; + pow1 +---------------------- + 0.010000000000000002 + 0.04000000000000001 + 0.09 + 1.2100000000000002 + 4.840000000000001 + 10.889999999999999 +(6 rows) + +-- select pow_all(2) (stub agg function, explain) +--Testcase 824: +EXPLAIN VERBOSE +SELECT pow_all(2) from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: pow_all(2) + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select pow_all(2) (stub agg function, result) +--Testcase 825: +SELECT pow_all(2) from s3; +ERROR: stub pow_all(int) is called +CONTEXT: PL/pgSQL function pow_all(integer) line 3 at RAISE +-- select pow_all(2) (stub agg function and group by tag only) (explain) +--Testcase 826: +EXPLAIN VERBOSE +SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (pow_all(2)), tag1 + InfluxDB query: SELECT pow(*, 2) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select pow_all(2) (stub agg function and group by tag only) (result) +--Testcase 827: +SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + pow_all +------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.010000000000000002,10000,0.010000000000000002,10000) + (1970-01-01T00:00:01Z,,0.04000000000000001,10000,0.04000000000000001,10000) + (1970-01-01T00:00:02Z,,0.09,10000,0.09,10000) + (1970-01-01T00:00:03Z,,1.2100000000000002,40000,1.2100000000000002,40000) + (1970-01-01T00:00:04Z,,4.840000000000001,40000,4.840000000000001,40000) +(5 rows) + +-- select pow_all(2) (stub agg function, expose data, explain) +--Testcase 828: +EXPLAIN VERBOSE +SELECT (pow_all(2)::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((pow_all(2))::s3)."time", ((pow_all(2))::s3).tag1, ((pow_all(2))::s3).value1, ((pow_all(2))::s3).value2, ((pow_all(2))::s3).value3, ((pow_all(2))::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select pow_all(2) (stub agg function, expose data, result) +--Testcase 829: +SELECT (pow_all(2)::s3).* from s3; +ERROR: stub pow_all(int) is called +CONTEXT: PL/pgSQL function pow_all(integer) line 3 at RAISE +-- select round (builtin function, explain) +--Testcase 830: +EXPLAIN VERBOSE +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1483.93 rows=1462 width=32) + Output: round(value1), round((value2)::double precision), round(value3), round((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select round (builtin function, result) +--Testcase 831: +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3; + round | round | round | round +-------+-------+-------+------- + 0 | 100 | -0 | -100 + 0 | 100 | -0 | -100 + 0 | 100 | -0 | -100 + 1 | 200 | -1 | -200 + 2 | 200 | -2 | -200 + 3 | 200 | -3 | -200 +(6 rows) + +-- select round (builtin function, not pushdown constraints, explain) +--Testcase 832: +EXPLAIN VERBOSE +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: round(value1), round((value2)::double precision), round(value3), round((value4)::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select round (builtin function, not pushdown constraints, result) +--Testcase 833: +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE to_hex(value2) != '64'; + round | round | round | round +-------+-------+-------+------- + 1 | 200 | -1 | -200 + 2 | 200 | -2 | -200 + 3 | 200 | -3 | -200 +(3 rows) + +-- select round (builtin function, pushdown constraints, explain) +--Testcase 834: +EXPLAIN VERBOSE +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE value2 != 200; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: round(value1), round((value2)::double precision), round(value3), round((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select round (builtin function, pushdown constraints, result) +--Testcase 835: +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE value2 != 200; + round | round | round | round +-------+-------+-------+------- + 0 | 100 | -0 | -100 + 0 | 100 | -0 | -100 + 0 | 100 | -0 | -100 +(3 rows) + +-- select round as nest function with agg (pushdown, explain) +--Testcase 836: +EXPLAIN VERBOSE +SELECT sum(value3),round(sum(value3)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (round(sum(value3))) + InfluxDB query: SELECT sum("value3"), round(sum("value3")) FROM "s3" +(3 rows) + +-- select round as nest function with agg (pushdown, result) +--Testcase 837: +SELECT sum(value3),round(sum(value3)) FROM s3; + sum | round +--------------------+------- + -7.199999999999999 | -7 +(1 row) + +-- select round as nest with log2 (pushdown, explain) +--Testcase 838: +EXPLAIN VERBOSE +SELECT round(log2(value1)),round(log2(1/value1)) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: round(log2(value1)), round(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select round as nest with log2 (pushdown, result) +--Testcase 839: +SELECT round(log2(value1)),round(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select round with non pushdown func and roundlicit constant (explain) +--Testcase 840: +EXPLAIN VERBOSE +SELECT round(value3), pi(), 4.1 FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: round(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select round with non pushdown func and roundlicit constant (result) +--Testcase 841: +SELECT round(value3), pi(), 4.1 FROM s3; + round | pi | ?column? +-------+-------------------+---------- + -0 | 3.141592653589793 | 4.1 + -0 | 3.141592653589793 | 4.1 + -0 | 3.141592653589793 | 4.1 + -1 | 3.141592653589793 | 4.1 + -2 | 3.141592653589793 | 4.1 + -3 | 3.141592653589793 | 4.1 +(6 rows) + +-- select round with order by (explain) +--Testcase 842: +EXPLAIN VERBOSE +SELECT value1, round(1-value1) FROM s3 order by round(1-value1); + QUERY PLAN +--------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (round(('1'::double precision - value1))) + Sort Key: (round(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, round(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select round with order by (result) +--Testcase 843: +SELECT value1, round(1-value1) FROM s3 order by round(1-value1); + value1 | round +--------+------- + 3.3 | -2 + 2.2 | -1 + 1.1 | -0 + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 +(6 rows) + +-- select round with order by index (result) +--Testcase 844: +SELECT value1, round(1-value1) FROM s3 order by 2,1; + value1 | round +--------+------- + 3.3 | -2 + 2.2 | -1 + 1.1 | -0 + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 +(6 rows) + +-- select round with order by index (result) +--Testcase 845: +SELECT value1, round(1-value1) FROM s3 order by 1,2; + value1 | round +--------+------- + 0.1 | 1 + 0.2 | 1 + 0.3 | 1 + 1.1 | -0 + 2.2 | -1 + 3.3 | -2 +(6 rows) + +-- select round and as +--Testcase 846: +SELECT round(value3) as round1 FROM s3; + round1 +-------- + -0 + -0 + -0 + -1 + -2 + -3 +(6 rows) + +-- select round(*) (stub agg function, explain) +--Testcase 847: +EXPLAIN VERBOSE +SELECT round_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: round_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select round(*) (stub agg function, result) +--Testcase 848: +SELECT round_all() from s3; +ERROR: stub round_all() is called +CONTEXT: PL/pgSQL function round_all() line 3 at RAISE +-- select round(*) (stub agg function and group by tag only) (explain) +--Testcase 849: +EXPLAIN VERBOSE +SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (round_all()), tag1 + InfluxDB query: SELECT round(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select round(*) (stub agg function and group by tag only) (result) +--Testcase 850: +SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + round_all +--------------------------------------- + (1970-01-01T00:00:00Z,,0,100,-0,-100) + (1970-01-01T00:00:01Z,,0,100,-0,-100) + (1970-01-01T00:00:02Z,,0,100,-0,-100) + (1970-01-01T00:00:03Z,,1,200,-1,-200) + (1970-01-01T00:00:04Z,,2,200,-2,-200) +(5 rows) + +-- select round(*) (stub agg function, expose data, explain) +--Testcase 851: +EXPLAIN VERBOSE +SELECT (round_all()::s3).* from s3; + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..8634.89 rows=3413 width=72) + Output: ((round_all())::s3)."time", ((round_all())::s3).tag1, ((round_all())::s3).value1, ((round_all())::s3).value2, ((round_all())::s3).value3, ((round_all())::s3).value4 + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select round(*) (stub agg function, expose data, result) +--Testcase 852: +SELECT (round_all()::s3).* from s3; +ERROR: stub round_all() is called +CONTEXT: PL/pgSQL function round_all() line 3 at RAISE +-- select sin (builtin function, explain) +--Testcase 853: +EXPLAIN VERBOSE +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1483.93 rows=1462 width=32) + Output: sin(value1), sin((value2)::double precision), sin(value3), sin((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select sin (builtin function, result) +--Testcase 854: +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3; + sin | sin | sin | sin +---------------------+---------------------+----------------------+-------------------- + 0.09983341664682815 | -0.5063656411097588 | -0.09983341664682815 | 0.5063656411097588 + 0.19866933079506122 | -0.5063656411097588 | -0.19866933079506122 | 0.5063656411097588 + 0.29552020666133955 | -0.5063656411097588 | -0.29552020666133955 | 0.5063656411097588 + 0.8912073600614354 | -0.8732972972139946 | -0.8912073600614354 | 0.8732972972139946 + 0.8084964038195901 | -0.8732972972139946 | -0.8084964038195901 | 0.8732972972139946 + -0.1577456941432482 | -0.8732972972139946 | 0.1577456941432482 | 0.8732972972139946 +(6 rows) + +-- select sin (builtin function, not pushdown constraints, explain) +--Testcase 855: +EXPLAIN VERBOSE +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: sin(value1), sin((value2)::double precision), sin(value3), sin((value4)::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select sin (builtin function, not pushdown constraints, result) +--Testcase 856: +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE to_hex(value2) != '64'; + sin | sin | sin | sin +---------------------+---------------------+---------------------+-------------------- + 0.8912073600614354 | -0.8732972972139946 | -0.8912073600614354 | 0.8732972972139946 + 0.8084964038195901 | -0.8732972972139946 | -0.8084964038195901 | 0.8732972972139946 + -0.1577456941432482 | -0.8732972972139946 | 0.1577456941432482 | 0.8732972972139946 +(3 rows) + +-- select sin (builtin function, pushdown constraints, explain) +--Testcase 857: +EXPLAIN VERBOSE +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE value2 != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: sin(value1), sin((value2)::double precision), sin(value3), sin((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select sin (builtin function, pushdown constraints, result) +--Testcase 858: +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE value2 != 200; + sin | sin | sin | sin +---------------------+---------------------+----------------------+-------------------- + 0.09983341664682815 | -0.5063656411097588 | -0.09983341664682815 | 0.5063656411097588 + 0.19866933079506122 | -0.5063656411097588 | -0.19866933079506122 | 0.5063656411097588 + 0.29552020666133955 | -0.5063656411097588 | -0.29552020666133955 | 0.5063656411097588 +(3 rows) + +-- select sin as nest function with agg (pushdown, explain) +--Testcase 859: +EXPLAIN VERBOSE +SELECT sum(value3),sin(sum(value3)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (sin(sum(value3))) + InfluxDB query: SELECT sum("value3"), sin(sum("value3")) FROM "s3" +(3 rows) + +-- select sin as nest function with agg (pushdown, result) +--Testcase 860: +SELECT sum(value3),sin(sum(value3)) FROM s3; + sum | sin +--------------------+--------------------- + -7.199999999999999 | -0.7936678638491526 +(1 row) + +-- select sin as nest with log2 (pushdown, explain) +--Testcase 861: +EXPLAIN VERBOSE +SELECT sin(log2(value1)),sin(log2(1/value1)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: sin(log2(value1)), sin(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select sin as nest with log2 (pushdown, result) +--Testcase 862: +SELECT sin(log2(value1)),sin(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select sin with non pushdown func and explicit constant (explain) +--Testcase 863: +EXPLAIN VERBOSE +SELECT sin(value3), pi(), 4.1 FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: sin(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select sin with non pushdown func and explicit constant (result) +--Testcase 864: +SELECT sin(value3), pi(), 4.1 FROM s3; + sin | pi | ?column? +----------------------+-------------------+---------- + -0.09983341664682815 | 3.141592653589793 | 4.1 + -0.19866933079506122 | 3.141592653589793 | 4.1 + -0.29552020666133955 | 3.141592653589793 | 4.1 + -0.8912073600614354 | 3.141592653589793 | 4.1 + -0.8084964038195901 | 3.141592653589793 | 4.1 + 0.1577456941432482 | 3.141592653589793 | 4.1 +(6 rows) + +-- select sin with order by (explain) +--Testcase 865: +EXPLAIN VERBOSE +SELECT value1, sin(1-value1) FROM s3 order by sin(1-value1); + QUERY PLAN +--------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (sin(('1'::double precision - value1))) + Sort Key: (sin(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, sin(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select sin with order by (result) +--Testcase 866: +SELECT value1, sin(1-value1) FROM s3 order by sin(1-value1); + value1 | sin +--------+---------------------- + 2.2 | -0.9320390859672264 + 3.3 | -0.7457052121767203 + 1.1 | -0.09983341664682824 + 0.3 | 0.644217687237691 + 0.2 | 0.7173560908995228 + 0.1 | 0.7833269096274834 +(6 rows) + +-- select sin with order by index (result) +--Testcase 867: +SELECT value1, sin(1-value1) FROM s3 order by 2,1; + value1 | sin +--------+---------------------- + 2.2 | -0.9320390859672264 + 3.3 | -0.7457052121767203 + 1.1 | -0.09983341664682824 + 0.3 | 0.644217687237691 + 0.2 | 0.7173560908995228 + 0.1 | 0.7833269096274834 +(6 rows) + +-- select sin with order by index (result) +--Testcase 868: +SELECT value1, sin(1-value1) FROM s3 order by 1,2; + value1 | sin +--------+---------------------- + 0.1 | 0.7833269096274834 + 0.2 | 0.7173560908995228 + 0.3 | 0.644217687237691 + 1.1 | -0.09983341664682824 + 2.2 | -0.9320390859672264 + 3.3 | -0.7457052121767203 +(6 rows) + +-- select sin and as +--Testcase 869: +SELECT sin(value3) as sin1 FROM s3; + sin1 +---------------------- + -0.09983341664682815 + -0.19866933079506122 + -0.29552020666133955 + -0.8912073600614354 + -0.8084964038195901 + 0.1577456941432482 +(6 rows) + +-- select sin(*) (stub agg function, explain) +--Testcase 870: +EXPLAIN VERBOSE +SELECT sin_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: sin_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select sin(*) (stub agg function, result) +--Testcase 871: +SELECT sin_all() from s3; +ERROR: stub sin_all() is called +CONTEXT: PL/pgSQL function sin_all() line 3 at RAISE +-- select sin(*) (stub agg function and group by tag only) (explain) +--Testcase 872: +EXPLAIN VERBOSE +SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (sin_all()), tag1 + InfluxDB query: SELECT sin(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select sin(*) (stub agg function and group by tag only) (result) +--Testcase 873: +SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + sin_all +--------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.09983341664682815,-0.5063656411097588,-0.09983341664682815,0.5063656411097588) + (1970-01-01T00:00:01Z,,0.19866933079506122,-0.5063656411097588,-0.19866933079506122,0.5063656411097588) + (1970-01-01T00:00:02Z,,0.29552020666133955,-0.5063656411097588,-0.29552020666133955,0.5063656411097588) + (1970-01-01T00:00:03Z,,0.8912073600614354,-0.8732972972139945,-0.8912073600614354,0.8732972972139945) + (1970-01-01T00:00:04Z,,0.8084964038195901,-0.8732972972139945,-0.8084964038195901,0.8732972972139945) +(5 rows) + +-- select tan (builtin function, explain) +--Testcase 874: +EXPLAIN VERBOSE +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1483.93 rows=1462 width=32) + Output: tan(value1), tan((value2)::double precision), tan(value3), tan((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(3 rows) + +-- select tan (builtin function, result) +--Testcase 875: +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3; + tan | tan | tan | tan +---------------------+---------------------+----------------------+-------------------- + 0.10033467208545055 | -0.5872139151569291 | -0.10033467208545055 | 0.5872139151569291 + 0.2027100355086725 | -0.5872139151569291 | -0.2027100355086725 | 0.5872139151569291 + 0.30933624960962325 | -0.5872139151569291 | -0.30933624960962325 | 0.5872139151569291 + 1.9647596572486523 | -1.7925274837903817 | -1.9647596572486523 | 1.7925274837903817 + -1.3738230567687946 | -1.7925274837903817 | 1.3738230567687946 | 1.7925274837903817 + 0.15974574766003222 | -1.7925274837903817 | -0.15974574766003222 | 1.7925274837903817 +(6 rows) + +-- select tan (builtin function, not pushdown constraints, explain) +--Testcase 876: +EXPLAIN VERBOSE +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE to_hex(value2) != '64'; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: tan(value1), tan((value2)::double precision), tan(value3), tan((value4)::double precision) + Filter: (to_hex(s3.value2) <> '64'::text) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" +(4 rows) + +-- select tan (builtin function, not pushdown constraints, result) +--Testcase 877: +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE to_hex(value2) != '64'; + tan | tan | tan | tan +---------------------+---------------------+----------------------+-------------------- + 1.9647596572486523 | -1.7925274837903817 | -1.9647596572486523 | 1.7925274837903817 + -1.3738230567687946 | -1.7925274837903817 | 1.3738230567687946 | 1.7925274837903817 + 0.15974574766003222 | -1.7925274837903817 | -0.15974574766003222 | 1.7925274837903817 +(3 rows) + +-- select tan (builtin function, pushdown constraints, explain) +--Testcase 878: +EXPLAIN VERBOSE +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE value2 != 200; + QUERY PLAN +------------------------------------------------------------------------------------------------------ + Foreign Scan on public.s3 (cost=10.00..1476.83 rows=1455 width=32) + Output: tan(value1), tan((value2)::double precision), tan(value3), tan((value4)::double precision) + InfluxDB query: SELECT "value1", "value2", "value3", "value4" FROM "s3" WHERE (("value2" <> 200)) +(3 rows) + +-- select tan (builtin function, pushdown constraints, result) +--Testcase 879: +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE value2 != 200; + tan | tan | tan | tan +---------------------+---------------------+----------------------+-------------------- + 0.10033467208545055 | -0.5872139151569291 | -0.10033467208545055 | 0.5872139151569291 + 0.2027100355086725 | -0.5872139151569291 | -0.2027100355086725 | 0.5872139151569291 + 0.30933624960962325 | -0.5872139151569291 | -0.30933624960962325 | 0.5872139151569291 +(3 rows) + +-- select tan as nest function with agg (pushdown, explain) +--Testcase 880: +EXPLAIN VERBOSE +SELECT sum(value3),tan(sum(value3)) FROM s3; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (sum(value3)), (tan(sum(value3))) + InfluxDB query: SELECT sum("value3"), tan(sum("value3")) FROM "s3" +(3 rows) + +-- select tan as nest function with agg (pushdown, result) +--Testcase 881: +SELECT sum(value3),tan(sum(value3)) FROM s3; + sum | tan +--------------------+--------------------- + -7.199999999999999 | -1.3046209400556357 +(1 row) + +-- select tan as nest with log2 (pushdown, explain) +--Testcase 882: +EXPLAIN VERBOSE +SELECT tan(log2(value1)),tan(log2(1/value1)) FROM s3; + QUERY PLAN +-------------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..3859.20 rows=2560 width=16) + Output: tan(log2(value1)), tan(log2(('1'::double precision / value1))) + InfluxDB query: SELECT "value1" FROM "s3" +(3 rows) + +-- select tan as nest with log2 (pushdown, result) +--Testcase 883: +SELECT tan(log2(value1)),tan(log2(1/value1)) FROM s3; +ERROR: stub log2(float8) is called +CONTEXT: PL/pgSQL function log2(double precision) line 3 at RAISE +-- select tan with non pushdown func and tanlicit constant (explain) +--Testcase 884: +EXPLAIN VERBOSE +SELECT tan(value3), pi(), 4.1 FROM s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..2566.40 rows=2560 width=48) + Output: tan(value3), '3.141592653589793'::double precision, 4.1 + InfluxDB query: SELECT "value3" FROM "s3" +(3 rows) + +-- select tan with non pushdown func and tanlicit constant (result) +--Testcase 885: +SELECT tan(value3), pi(), 4.1 FROM s3; + tan | pi | ?column? +----------------------+-------------------+---------- + -0.10033467208545055 | 3.141592653589793 | 4.1 + -0.2027100355086725 | 3.141592653589793 | 4.1 + -0.30933624960962325 | 3.141592653589793 | 4.1 + -1.9647596572486523 | 3.141592653589793 | 4.1 + 1.3738230567687946 | 3.141592653589793 | 4.1 + -0.15974574766003222 | 3.141592653589793 | 4.1 +(6 rows) + +-- select tan with order by (explain) +--Testcase 886: +EXPLAIN VERBOSE +SELECT value1, tan(1-value1) FROM s3 order by tan(1-value1); + QUERY PLAN +--------------------------------------------------------------------------- + Sort (cost=2717.72..2724.12 rows=2560 width=16) + Output: value1, (tan(('1'::double precision - value1))) + Sort Key: (tan(('1'::double precision - s3.value1))) + -> Foreign Scan on public.s3 (cost=10.00..2572.80 rows=2560 width=16) + Output: value1, tan(('1'::double precision - value1)) + InfluxDB query: SELECT "value1" FROM "s3" +(6 rows) + +-- select tan with order by (result) +--Testcase 887: +SELECT value1, tan(1-value1) FROM s3 order by tan(1-value1); + value1 | tan +--------+---------------------- + 2.2 | -2.57215162212632 + 1.1 | -0.10033467208545063 + 0.3 | 0.8422883804630794 + 0.2 | 1.0296385570503641 + 3.3 | 1.1192136417341325 + 0.1 | 1.2601582175503392 +(6 rows) + +-- select tan with order by index (result) +--Testcase 888: +SELECT value1, tan(1-value1) FROM s3 order by 2,1; + value1 | tan +--------+---------------------- + 2.2 | -2.57215162212632 + 1.1 | -0.10033467208545063 + 0.3 | 0.8422883804630794 + 0.2 | 1.0296385570503641 + 3.3 | 1.1192136417341325 + 0.1 | 1.2601582175503392 +(6 rows) + +-- select tan with order by index (result) +--Testcase 889: +SELECT value1, tan(1-value1) FROM s3 order by 1,2; + value1 | tan +--------+---------------------- + 0.1 | 1.2601582175503392 + 0.2 | 1.0296385570503641 + 0.3 | 0.8422883804630794 + 1.1 | -0.10033467208545063 + 2.2 | -2.57215162212632 + 3.3 | 1.1192136417341325 +(6 rows) + +-- select tan and as +--Testcase 890: +SELECT tan(value3) as tan1 FROM s3; + tan1 +---------------------- + -0.10033467208545055 + -0.2027100355086725 + -0.30933624960962325 + -1.9647596572486523 + 1.3738230567687946 + -0.15974574766003222 +(6 rows) + +-- select tan(*) (stub agg function, explain) +--Testcase 891: +EXPLAIN VERBOSE +SELECT tan_all() from s3; + QUERY PLAN +--------------------------------------------------------------------- + Foreign Scan on public.s3 (cost=10.00..4266.25 rows=3413 width=32) + Output: tan_all() + InfluxDB query: SELECT * FROM "s3" +(3 rows) + +-- select tan(*) (stub agg function, result) +--Testcase 892: +SELECT tan_all() from s3; +ERROR: stub tan_all() is called +CONTEXT: PL/pgSQL function tan_all() line 3 at RAISE +-- select tan(*) (stub agg function and group by tag only) (explain) +--Testcase 893: +EXPLAIN VERBOSE +SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (tan_all()), tag1 + InfluxDB query: SELECT tan(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select tan(*) (stub agg function and group by tag only) (result) +--Testcase 894: +SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + tan_all +------------------------------------------------------------------------------------------------------- + (1970-01-01T00:00:00Z,,0.10033467208545055,-0.587213915156929,-0.10033467208545055,0.587213915156929) + (1970-01-01T00:00:01Z,,0.2027100355086725,-0.587213915156929,-0.2027100355086725,0.587213915156929) + (1970-01-01T00:00:02Z,,0.30933624960962325,-0.587213915156929,-0.30933624960962325,0.587213915156929) + (1970-01-01T00:00:03Z,,1.9647596572486523,-1.7925274837903817,-1.9647596572486523,1.7925274837903817) + (1970-01-01T00:00:04Z,,-1.3738230567687948,-1.7925274837903817,1.3738230567687948,1.7925274837903817) +(5 rows) + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 895: +SELECT sin_all(), round_all(), tan_all() FROM s3; +ERROR: stub sin_all() is called +CONTEXT: PL/pgSQL function sin_all() line 3 at RAISE +-- select predictors function holt_winters() (explain) +--Testcase 896: +EXPLAIN VERBOSE +SELECT holt_winters(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + QUERY PLAN +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (holt_winters(min(value1), 5, 1)), (influx_time("time", '@ 1 sec'::interval)) + InfluxDB query: SELECT holt_winters(min("value1"), 5, 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)) +(3 rows) + +-- select predictors function holt_winters() (result) +--Testcase 897: +SELECT holt_winters(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + holt_winters +-------------------- + 5.187460065608529 + 13.293330784570104 + 37.584774262501654 + 116.55752059657874 + 392.43117130749647 +(5 rows) + +-- select predictors function holt_winters_with_fit() (explain) +--Testcase 898: +EXPLAIN VERBOSE +SELECT holt_winters_with_fit(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=16) + Output: (holt_winters_with_fit(min(value1), 5, 1)), (influx_time("time", '@ 1 sec'::interval)) + InfluxDB query: SELECT holt_winters_with_fit(min("value1"), 5, 1) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)) +(3 rows) + +-- select predictors function holt_winters_with_fit() (result) +--Testcase 899: +SELECT holt_winters_with_fit(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + holt_winters_with_fit +----------------------- + 0.1 + 0.14656936198258175 + 0.44929718992786366 + 1.0087607138536199 + 2.218941363096379 + 5.187460065608529 + 13.293330784570104 + 37.584774262501654 + 116.55752059657874 + 392.43117130749647 +(10 rows) + +-- select count(*) function of InfluxDB (stub agg function, explain) +--Testcase 900: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3; + QUERY PLAN +------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: (influx_count_all(*)) + InfluxDB query: SELECT count(*) FROM "s3" +(3 rows) + +-- select count(*) function of InfluxDB (stub agg function, result) +--Testcase 901: +SELECT influx_count_all(*) FROM s3; + influx_count_all +--------------------------------- + (1970-01-01T00:00:00Z,,6,6,6,6) +(1 row) + +-- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (explain) +--Testcase 902: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=72) + Output: (influx_count_all(*)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT count(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (result) +--Testcase 903: +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_count_all +--------------------------------- + (1970-01-01T00:00:00Z,,1,1,1,1) + (1970-01-01T00:00:01Z,,1,1,1,1) + (1970-01-01T00:00:02Z,,1,1,1,1) + (1970-01-01T00:00:03Z,,0,0,0,0) + (1970-01-01T00:00:04Z,,0,0,0,0) + (1970-01-01T00:00:00Z,,0,0,0,0) + (1970-01-01T00:00:01Z,,0,0,0,0) + (1970-01-01T00:00:02Z,,0,0,0,0) + (1970-01-01T00:00:03Z,,1,1,1,1) + (1970-01-01T00:00:04Z,,1,1,1,1) +(10 rows) + +-- select count(*) function of InfluxDB (stub agg function and group by tag only) (explain) +--Testcase 904: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=64) + Output: (influx_count_all(*)), tag1 + InfluxDB query: SELECT count(*) FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select count(*) function of InfluxDB (stub agg function and group by tag only) (result) +--Testcase 905: +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + influx_count_all +--------------------------------- + (1970-01-01T00:00:00Z,,3,3,3,3) + (1970-01-01T00:00:00Z,,2,2,2,2) +(2 rows) + +-- select count(*) function of InfluxDB over join query (explain) +--Testcase 906: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + QUERY PLAN +---------------------------------------------------------------------------------------- + Aggregate (cost=70.39..70.41 rows=1 width=32) + Output: influx_count_all(*) + -> Nested Loop (cost=20.00..28.14 rows=169 width=0) + -> Foreign Scan on public.s3 t1 (cost=10.00..13.00 rows=13 width=8) + Output: t1."time", t1.tag1, t1.value1, t1.value2, t1.value3, t1.value4 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..13.06 rows=13 width=8) + Output: t2.value1 + -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) + Output: t2.value1 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) +(11 rows) + +-- select count(*) function of InfluxDB over join query (result, stub call error) +--Testcase 907: +SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; +ERROR: stub influx_count_all_sfunc(text) is called +CONTEXT: PL/pgSQL function influx_count_all_sfunc(text) line 3 at RAISE +-- select distinct (stub agg function, explain) +--Testcase 908: +EXPLAIN VERBOSE +SELECT influx_distinct(value1) FROM s3; + QUERY PLAN +------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=8) + Output: (influx_distinct(value1)) + InfluxDB query: SELECT distinct("value1") FROM "s3" +(3 rows) + +-- select distinct (stub agg function, result) +--Testcase 909: +SELECT influx_distinct(value1) FROM s3; + influx_distinct +----------------- + 0.1 + 0.2 + 0.3 + 1.1 + 2.2 + 3.3 +(6 rows) + +-- select distinct (stub agg function and group by influx_time() and tag) (explain) +--Testcase 910: +EXPLAIN VERBOSE +SELECT influx_distinct(value1), influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=48) + Output: (influx_distinct(value1)), (influx_time("time", '@ 1 sec'::interval)), tag1 + InfluxDB query: SELECT distinct("value1") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY (time(0d0h0m1s0u)), "tag1" +(3 rows) + +-- select distinct (stub agg function and group by influx_time() and tag) (result) +--Testcase 911: +SELECT influx_distinct(value1), influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + influx_distinct | influx_time | tag1 +-----------------+------------------------+------ + 0.1 | 1970-01-01 09:00:00+09 | a + 0.2 | 1970-01-01 09:00:01+09 | a + 0.3 | 1970-01-01 09:00:02+09 | a + 1.1 | 1970-01-01 09:00:03+09 | b + 2.2 | 1970-01-01 09:00:04+09 | b +(5 rows) + +-- select distinct (stub agg function and group by tag only) (explain) +--Testcase 912: +EXPLAIN VERBOSE +SELECT influx_distinct(value2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------------------------------- + Foreign Scan (cost=1.00..1.00 rows=1 width=40) + Output: (influx_distinct(value2)), tag1 + InfluxDB query: SELECT distinct("value2") FROM "s3" WHERE ((time >= '1970-01-01 00:00:00')) AND ((time <= '1970-01-01 00:00:04')) GROUP BY "tag1" +(3 rows) + +-- select distinct (stub agg function and group by tag only) (result) +--Testcase 913: +SELECT influx_distinct(value2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + influx_distinct +----------------- + 100 + 200 +(2 rows) + +-- select distinct over join query (explain) +--Testcase 914: +EXPLAIN VERBOSE +SELECT influx_distinct(t1.value2) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Aggregate (cost=57.15..57.16 rows=1 width=8) + Output: influx_distinct(t1.value2) + -> Nested Loop (cost=20.00..24.65 rows=130 width=8) + Output: t1.value2 + -> Foreign Scan on public.s3 t2 (cost=10.00..13.00 rows=13 width=8) + Output: t2."time", t2.tag1, t2.value1, t2.value2, t2.value3, t2.value4 + InfluxDB query: SELECT "value1" FROM "s3" WHERE (("value1" = 0.1)) + -> Materialize (cost=10.00..10.05 rows=10 width=16) + Output: t1.value2, t1.value1 + -> Foreign Scan on public.s3 t1 (cost=10.00..10.00 rows=10 width=16) + Output: t1.value2, t1.value1 + InfluxDB query: SELECT "value1", "value2" FROM "s3" WHERE (("value1" = 0.1)) +(12 rows) + +-- select distinct over join query (result, stub call error) +--Testcase 915: +SELECT influx_distinct(t1.value2) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; +ERROR: stub influx_distinct_sfunc(anyelement, anyelement) is called +CONTEXT: PL/pgSQL function influx_distinct_sfunc(anyelement,anyelement) line 3 at RAISE +-- select distinct with having (explain) +--Testcase 916: +EXPLAIN VERBOSE +SELECT influx_distinct(value2) FROM s3 HAVING influx_distinct(value2) > 100; + QUERY PLAN +-------------------------------------------------------------------------- + Aggregate (cost=3200.00..3200.01 rows=1 width=8) + Output: influx_distinct(value2) + Filter: (influx_distinct(s3.value2) > 100) + -> Foreign Scan on public.s3 (cost=10.00..2560.00 rows=2560 width=8) + Output: "time", tag1, value1, value2, value3, value4 + InfluxDB query: SELECT "value2" FROM "s3" +(6 rows) + +-- select distinct with having (result, not pushdown, stub call error) +--Testcase 917: +SELECT influx_distinct(value2) FROM s3 HAVING influx_distinct(value2) > 100; +ERROR: stub influx_distinct_sfunc(anyelement, anyelement) is called +CONTEXT: PL/pgSQL function influx_distinct_sfunc(anyelement,anyelement) line 3 at RAISE +--Testcase 918: +DROP FOREIGN TABLE s3; +--Testcase 919: +CREATE FOREIGN TABLE b3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 bool) SERVER server1 OPTIONS(table 'b3', tags 'tag1'); +-- bool type var in where clause (result) +--Testcase 920: +EXPLAIN VERBOSE +SELECT sqrt(abs(value1)) FROM b3 WHERE value3 != true ORDER BY 1; + QUERY PLAN +-------------------------------------------------------------------------- + Sort (cost=1352.46..1355.66 rows=1280 width=8) + Output: (sqrt(abs(value1))) + Sort Key: (sqrt(abs(b3.value1))) + -> Foreign Scan on public.b3 (cost=10.00..1286.40 rows=1280 width=8) + Output: sqrt(abs(value1)) + Filter: (NOT b3.value3) + InfluxDB query: SELECT "value1", "value3" FROM "b3" +(7 rows) + +-- bool type var in where clause (result) +--Testcase 921: +SELECT sqrt(abs(value1)) FROM b3 WHERE value3 != true ORDER BY 1; + sqrt +-------------------- + 0.4472135954999579 + 1.0488088481701516 + 1.816590212458495 +(3 rows) + +--Testcase 922: +DROP FOREIGN TABLE b3; +--Testcase 923: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 924: +DROP SERVER server1; +--Testcase 925: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/expected/performance/influxdb_performance.out b/expected/performance/influxdb_performance.out new file mode 100644 index 0000000..b9d6e24 --- /dev/null +++ b/expected/performance/influxdb_performance.out @@ -0,0 +1,6222 @@ +-- =================================================================== +-- create FDW objects +-- =================================================================== +\set ECHO none +\timing +SET datestyle = ISO; +Time: 0.354 ms +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +Time: 70.012 ms +-- need change base on multi version support +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'performance_test', :SERVER); +Time: 0.757 ms +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); +Time: 0.613 ms +--Testcase 4: +CREATE FOREIGN TABLE tbl1 ( + tag1 text, + tag2 text, + tag3 text, + c1 bigint, + c2 text, + c3 double precision, + c4 boolean, + time timestamp +) SERVER influxdb_svr OPTIONS (table 'tbl1', tags 'tag1, tag2, tag3'); +Time: 1.731 ms +-- =================================================================== +-- test for insert data +-- =================================================================== +-- +-- batch size 1 +-- +--Testcase 5: +EXPLAIN VERBOSE +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Insert on public.tbl1 (cost=0.00..37.50 rows=0 width=0) + Batch Size: 1 + -> Function Scan on pg_catalog.generate_series id (cost=0.00..37.50 rows=1000 width=153) + Output: to_char((id.id % 100), 'FM000'::text), to_char((id.id % 1000), 'FM0000'::text), to_char((id.id % 5000), 'FM0000'::text), id.id, to_char((id.id % 100), 'FM00000000000000000000'::text), sqrt((id.id)::double precision), true, NULL::timestamp without time zone + Function Call: generate_series(1, 1000) +(5 rows) + +Time: 1.460 ms +-- checking all record is inserted +--Testcase 6: +EXPLAIN VERBOSE +SELECT count(*) FROM tbl1; + QUERY PLAN +------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=8) + Output: (count(*)) + InfluxDB query: SELECT count(*) FROM "tbl1" +(3 rows) + +Time: 0.596 ms +-- +-- batch size 10 +-- +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +Time: 0.344 ms +--Testcase 7: +EXPLAIN VERBOSE +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Insert on public.tbl1 (cost=0.00..37.50 rows=0 width=0) + Batch Size: 10 + -> Function Scan on pg_catalog.generate_series id (cost=0.00..37.50 rows=1000 width=153) + Output: to_char((id.id % 100), 'FM000'::text), to_char((id.id % 1000), 'FM0000'::text), to_char((id.id % 5000), 'FM0000'::text), id.id, to_char((id.id % 100), 'FM00000000000000000000'::text), sqrt((id.id)::double precision), true, NULL::timestamp without time zone + Function Call: generate_series(1, 1000) +(5 rows) + +Time: 0.557 ms +-- checking all record is inserted +--Testcase 8: +EXPLAIN VERBOSE +SELECT count(*) FROM tbl1; + QUERY PLAN +------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=8) + Output: (count(*)) + InfluxDB query: SELECT count(*) FROM "tbl1" +(3 rows) + +Time: 0.397 ms +-- +-- batch size 1000 +-- +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '1000'); +Time: 0.341 ms +--Testcase 9: +EXPLAIN VERBOSE +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Insert on public.tbl1 (cost=0.00..37.50 rows=0 width=0) + Batch Size: 1000 + -> Function Scan on pg_catalog.generate_series id (cost=0.00..37.50 rows=1000 width=153) + Output: to_char((id.id % 100), 'FM000'::text), to_char((id.id % 1000), 'FM0000'::text), to_char((id.id % 5000), 'FM0000'::text), id.id, to_char((id.id % 100), 'FM00000000000000000000'::text), sqrt((id.id)::double precision), true, NULL::timestamp without time zone + Function Call: generate_series(1, 1000) +(5 rows) + +Time: 0.611 ms +-- checking all record is inserted +--Testcase 10: +EXPLAIN VERBOSE +SELECT count(*) FROM tbl1; + QUERY PLAN +------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=8) + Output: (count(*)) + InfluxDB query: SELECT count(*) FROM "tbl1" +(3 rows) + +Time: 0.356 ms +-- +-- batch size 5000 +-- +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '5000'); +Time: 0.314 ms +--Testcase 11: +EXPLAIN VERBOSE +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Insert on public.tbl1 (cost=0.00..37.50 rows=0 width=0) + Batch Size: 5000 + -> Function Scan on pg_catalog.generate_series id (cost=0.00..37.50 rows=1000 width=153) + Output: to_char((id.id % 100), 'FM000'::text), to_char((id.id % 1000), 'FM0000'::text), to_char((id.id % 5000), 'FM0000'::text), id.id, to_char((id.id % 100), 'FM00000000000000000000'::text), sqrt((id.id)::double precision), true, NULL::timestamp without time zone + Function Call: generate_series(1, 1000) +(5 rows) + +Time: 0.523 ms +-- checking all record is inserted +--Testcase 12: +SELECT count(*) FROM tbl1; + count +------- +(0 rows) + +Time: 10.137 ms +-- clean-up +--Testcase 13: +DELETE FROM tbl1; +Time: 1.620 ms +-- +-- batch size 20000 +-- +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '20000'); +Time: 0.543 ms +--Testcase 14: +EXPLAIN VERBOSE +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Insert on public.tbl1 (cost=0.00..37.50 rows=0 width=0) + Batch Size: 20000 + -> Function Scan on pg_catalog.generate_series id (cost=0.00..37.50 rows=1000 width=153) + Output: to_char((id.id % 100), 'FM000'::text), to_char((id.id % 1000), 'FM0000'::text), to_char((id.id % 5000), 'FM0000'::text), id.id, to_char((id.id % 100), 'FM00000000000000000000'::text), sqrt((id.id)::double precision), true, NULL::timestamp without time zone + Function Call: generate_series(1, 1000) +(5 rows) + +Time: 0.707 ms +-- checking all record is inserted +--Testcase 15: +EXPLAIN VERBOSE +SELECT count(*) FROM tbl1; + QUERY PLAN +------------------------------------------------ + Foreign Scan (cost=1.00..1.00 rows=1 width=8) + Output: (count(*)) + InfluxDB query: SELECT count(*) FROM "tbl1" +(3 rows) + +Time: 0.420 ms +-- does not clean-up, using inserted data to test SELECT +-- =================================================================== +-- test for SELECT data +-- =================================================================== +-- select all column +--Testcase 16: +EXPLAIN VERBOSE +SELECT * FROM tbl1; + QUERY PLAN +------------------------------------------------------------------------------------- + Foreign Scan on public.tbl1 (cost=10.00..462.00 rows=462 width=153) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + InfluxDB query: SELECT "tag1", "tag2", "tag3", "c1", "c2", "c3", "c4" FROM "tbl1" +(3 rows) + +Time: 0.566 ms +-- select one column +--Testcase 17: +EXPLAIN VERBOSE +SELECT c1 FROM tbl1; + QUERY PLAN +---------------------------------------------------------------------- + Foreign Scan on public.tbl1 (cost=10.00..2560.00 rows=2560 width=8) + Output: c1 + InfluxDB query: SELECT "c1" FROM "tbl1" +(3 rows) + +Time: 0.417 ms +-- +-- WHERE condition +-- +-- 20% +--Testcase 18: +EXPLAIN VERBOSE +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 5; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan on public.tbl1 (cost=10.00..154.00 rows=154 width=153) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + InfluxDB query: SELECT "tag1", "tag2", "tag3", "c1", "c2", "c3", "c4" FROM "tbl1" WHERE (("c1" < 200)) +(3 rows) + +Time: 0.690 ms +-- 10% +--Testcase 19: +EXPLAIN VERBOSE +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 10; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Foreign Scan on public.tbl1 (cost=10.00..154.00 rows=154 width=153) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + InfluxDB query: SELECT "tag1", "tag2", "tag3", "c1", "c2", "c3", "c4" FROM "tbl1" WHERE (("c1" < 100)) +(3 rows) + +Time: 0.568 ms +-- 1% +--Testcase 20: +EXPLAIN VERBOSE +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 100; + QUERY PLAN +--------------------------------------------------------------------------------------------------------- + Foreign Scan on public.tbl1 (cost=10.00..154.00 rows=154 width=153) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + InfluxDB query: SELECT "tag1", "tag2", "tag3", "c1", "c2", "c3", "c4" FROM "tbl1" WHERE (("c1" < 10)) +(3 rows) + +Time: 0.524 ms +-- +-- agg push down +-- +--Testcase 21: +EXPLAIN VERBOSE +SELECT avg(c1), count(*) FROM tbl1; + QUERY PLAN +---------------------------------------------------------------------------- + Aggregate (cost=2572.80..2572.81 rows=1 width=40) + Output: avg(c1), count(*) + -> Foreign Scan on public.tbl1 (cost=10.00..2560.00 rows=2560 width=8) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + InfluxDB query: SELECT "c1" FROM "tbl1" +(5 rows) + +Time: 0.663 ms +-- +-- select data based on time series as: time period, data frequency +-- +--Testcase 22: +EXPLAIN VERBOSE +SELECT * FROM tbl1 WHERE time <= now() AND time > now() - interval '1 day' GROUP BY tag2, tag3, tag1, c1, c2, c3, c4, time; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------- + Group (cost=2.01..2.05 rows=2 width=153) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + Group Key: tbl1.tag2, tbl1.tag3, tbl1.tag1, tbl1.c1, tbl1.c2, tbl1.c3, tbl1.c4, tbl1."time" + -> Sort (cost=2.01..2.01 rows=2 width=153) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + Sort Key: tbl1.tag2, tbl1.tag3, tbl1.tag1, tbl1.c1, tbl1.c2, tbl1.c3, tbl1.c4, tbl1."time" + -> Foreign Scan on public.tbl1 (cost=10.00..2.00 rows=2 width=153) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + InfluxDB query: SELECT "tag1", "tag2", "tag3", "c1", "c2", "c3", "c4" FROM "tbl1" WHERE ((time <= now())) AND ((time > (now() - 1d0h0m0s0u))) +(9 rows) + +Time: 3.153 ms +--Testcase 23: +EXPLAIN VERBOSE +SELECT DISTINCT (tag1) FROM tbl1 GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------- + Unique (cost=1.01..1.02 rows=1 width=32) + Output: tag1 + -> Sort (cost=1.01..1.01 rows=1 width=32) + Output: tag1 + Sort Key: tbl1.tag1 + -> Foreign Scan (cost=1.00..1.00 rows=1 width=32) + Output: tag1 + InfluxDB query: SELECT "c1" FROM "tbl1" GROUP BY "tag1" +(8 rows) + +Time: 0.511 ms +--Testcase 24: +EXPLAIN VERBOSE SELECT avg(c1), sum(c3)/:DATA_SIZE FROM tbl1 WHERE time < now() AND time > now() - interval '2 days'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------ + Aggregate (cost=10.05..10.06 rows=1 width=40) + Output: avg(c1), (sum(c3) / '1000'::double precision) + -> Foreign Scan on public.tbl1 (cost=10.00..10.00 rows=10 width=16) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + InfluxDB query: SELECT "c1", "c3" FROM "tbl1" WHERE ((time < now())) AND ((time > (now() - 2d0h0m0s0u))) +(5 rows) + +Time: 0.964 ms +--Testcase 25: +EXPLAIN VERBOSE SELECT count(tag1), avg(c1) FROM tbl1 WHERE time > now() - interval '1 day' GROUP BY tag1; + QUERY PLAN +----------------------------------------------------------------------------------------------- + HashAggregate (cost=430.20..432.51 rows=185 width=72) + Output: count(tag1), avg(c1), tag1 + Group Key: tbl1.tag1 + -> Foreign Scan on public.tbl1 (cost=10.00..427.00 rows=427 width=40) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + InfluxDB query: SELECT "tag1", "c1" FROM "tbl1" WHERE ((time > (now() - 1d0h0m0s0u))) +(6 rows) + +Time: 0.700 ms +--Testcase 26: +EXPLAIN VERBOSE SELECT tag1, avg(c3), avg(c1), c2 FROM tbl1 WHERE time > '1970-02-11 00:00:00'::timestamp AND time < now() GROUP BY tag1, c1, c2, c3; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------- + HashAggregate (cost=4.06..4.12 rows=4 width=120) + Output: tag1, avg(c3), avg(c1), c2, c1, c3 + Group Key: tbl1.tag1, tbl1.c1, tbl1.c2, tbl1.c3 + -> Foreign Scan on public.tbl1 (cost=10.00..4.00 rows=4 width=80) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + InfluxDB query: SELECT "tag1", "c1", "c2", "c3" FROM "tbl1" WHERE ((time > '1970-02-11 00:00:00')) AND ((time < now())) +(6 rows) + +Time: 0.847 ms +--Testcase 27: +EXPLAIN VERBOSE SELECT max(c1), min(c2), min(c3) FROM tbl1 WHERE time > now() - interval '3 days'; + QUERY PLAN +--------------------------------------------------------------------------------------------------- + Aggregate (cost=381.84..381.85 rows=1 width=48) + Output: max(c1), min(c2), min(c3) + -> Foreign Scan on public.tbl1 (cost=10.00..379.00 rows=379 width=48) + Output: tag1, tag2, tag3, c1, c2, c3, c4, "time" + InfluxDB query: SELECT "c1", "c2", "c3" FROM "tbl1" WHERE ((time > (now() - 3d0h0m0s0u))) +(5 rows) + +Time: 1.029 ms +-- +-- DELETE +-- +--Testcase 28: +EXPLAIN VERBOSE DELETE FROM tbl1 WHERE tag1 = '000'; + QUERY PLAN +-------------------------------------------------------------------------- + Delete on public.tbl1 (cost=10.00..3.00 rows=0 width=0) + -> Foreign Delete on public.tbl1 (cost=10.00..3.00 rows=3 width=104) + InfluxDB query: DELETE FROM "tbl1" WHERE (("tag1" = '000')) +(3 rows) + +Time: 0.751 ms +--Testcase 29: +EXPLAIN VERBOSE DELETE FROM tbl1 WHERE tag2 = 'tag2_111'; + QUERY PLAN +-------------------------------------------------------------------------- + Delete on public.tbl1 (cost=10.00..3.00 rows=0 width=0) + -> Foreign Delete on public.tbl1 (cost=10.00..3.00 rows=3 width=104) + InfluxDB query: DELETE FROM "tbl1" WHERE (("tag2" = 'tag2_111')) +(3 rows) + +Time: 0.692 ms +--Testcase 30: +EXPLAIN VERBOSE DELETE FROM tbl1 WHERE tag1 = '011' AND tag2 IS NOT NULL; + QUERY PLAN +-------------------------------------------------------------------------------------------------- + Delete on public.tbl1 (cost=10.00..3.00 rows=0 width=0) + -> Foreign Scan on public.tbl1 (cost=10.00..3.00 rows=3 width=104) + Output: tag1, tag2, tag3, "time" + Filter: (tbl1.tag2 IS NOT NULL) + InfluxDB query: SELECT "tag1", "tag2", "tag3", "c1" FROM "tbl1" WHERE (("tag1" = '011')) +(5 rows) + +Time: 0.558 ms +--Testcase 31: +EXPLAIN VERBOSE DELETE FROM tbl1; + QUERY PLAN +------------------------------------------------------------------------------ + Delete on public.tbl1 (cost=10.00..640.00 rows=0 width=0) + -> Foreign Delete on public.tbl1 (cost=10.00..640.00 rows=640 width=104) + InfluxDB query: DELETE FROM "tbl1" +(3 rows) + +Time: 0.564 ms +-- Execute phase +-- =================================================================== +-- test for insert data +-- =================================================================== +-- batch size 1 +--Testcase 32: +DELETE FROM tbl1; +Time: 11.301 ms +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); +Time: 0.483 ms +--Testcase 33: +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; +Time: 1209.967 ms (00:01.210) +-- checking all record is inserted +--Testcase 34: +SELECT count(*) FROM tbl1; + count +------- + 1000 +(1 row) + +Time: 47.392 ms +--Testcase 35: +SELECT * FROM tbl1; + tag1 | tag2 | tag3 | c1 | c2 | c3 | c4 | time +------+------+------+------+----------------------+--------------------+----+---------------------------- + 001 | 0001 | 0001 | 1 | 00000000000000000001 | 1 | t | 2023-01-30 07:13:51.185117 + 002 | 0002 | 0002 | 2 | 00000000000000000002 | 1.4142135623730951 | t | 2023-01-30 07:13:51.2058 + 003 | 0003 | 0003 | 3 | 00000000000000000003 | 1.7320508075688772 | t | 2023-01-30 07:13:51.207161 + 004 | 0004 | 0004 | 4 | 00000000000000000004 | 2 | t | 2023-01-30 07:13:51.208418 + 005 | 0005 | 0005 | 5 | 00000000000000000005 | 2.23606797749979 | t | 2023-01-30 07:13:51.209647 + 006 | 0006 | 0006 | 6 | 00000000000000000006 | 2.449489742783178 | t | 2023-01-30 07:13:51.210842 + 007 | 0007 | 0007 | 7 | 00000000000000000007 | 2.6457513110645907 | t | 2023-01-30 07:13:51.211953 + 008 | 0008 | 0008 | 8 | 00000000000000000008 | 2.8284271247461903 | t | 2023-01-30 07:13:51.213105 + 009 | 0009 | 0009 | 9 | 00000000000000000009 | 3 | t | 2023-01-30 07:13:51.214207 + 010 | 0010 | 0010 | 10 | 00000000000000000010 | 3.1622776601683795 | t | 2023-01-30 07:13:51.215353 + 011 | 0011 | 0011 | 11 | 00000000000000000011 | 3.3166247903554 | t | 2023-01-30 07:13:51.216438 + 012 | 0012 | 0012 | 12 | 00000000000000000012 | 3.4641016151377544 | t | 2023-01-30 07:13:51.217414 + 013 | 0013 | 0013 | 13 | 00000000000000000013 | 3.605551275463989 | t | 2023-01-30 07:13:51.218429 + 014 | 0014 | 0014 | 14 | 00000000000000000014 | 3.7416573867739413 | t | 2023-01-30 07:13:51.219541 + 015 | 0015 | 0015 | 15 | 00000000000000000015 | 3.872983346207417 | t | 2023-01-30 07:13:51.220737 + 016 | 0016 | 0016 | 16 | 00000000000000000016 | 4 | t | 2023-01-30 07:13:51.221826 + 017 | 0017 | 0017 | 17 | 00000000000000000017 | 4.123105625617661 | t | 2023-01-30 07:13:51.222792 + 018 | 0018 | 0018 | 18 | 00000000000000000018 | 4.242640687119285 | t | 2023-01-30 07:13:51.223713 + 019 | 0019 | 0019 | 19 | 00000000000000000019 | 4.358898943540674 | t | 2023-01-30 07:13:51.224643 + 020 | 0020 | 0020 | 20 | 00000000000000000020 | 4.47213595499958 | t | 2023-01-30 07:13:51.22568 + 021 | 0021 | 0021 | 21 | 00000000000000000021 | 4.58257569495584 | t | 2023-01-30 07:13:51.226566 + 022 | 0022 | 0022 | 22 | 00000000000000000022 | 4.69041575982343 | t | 2023-01-30 07:13:51.227585 + 023 | 0023 | 0023 | 23 | 00000000000000000023 | 4.795831523312719 | t | 2023-01-30 07:13:51.228506 + 024 | 0024 | 0024 | 24 | 00000000000000000024 | 4.898979485566356 | t | 2023-01-30 07:13:51.22939 + 025 | 0025 | 0025 | 25 | 00000000000000000025 | 5 | t | 2023-01-30 07:13:51.230351 + 026 | 0026 | 0026 | 26 | 00000000000000000026 | 5.0990195135927845 | t | 2023-01-30 07:13:51.231213 + 027 | 0027 | 0027 | 27 | 00000000000000000027 | 5.196152422706632 | t | 2023-01-30 07:13:51.232213 + 028 | 0028 | 0028 | 28 | 00000000000000000028 | 5.291502622129181 | t | 2023-01-30 07:13:51.233223 + 029 | 0029 | 0029 | 29 | 00000000000000000029 | 5.385164807134504 | t | 2023-01-30 07:13:51.234076 + 030 | 0030 | 0030 | 30 | 00000000000000000030 | 5.477225575051661 | t | 2023-01-30 07:13:51.235162 + 031 | 0031 | 0031 | 31 | 00000000000000000031 | 5.5677643628300215 | t | 2023-01-30 07:13:51.236191 + 032 | 0032 | 0032 | 32 | 00000000000000000032 | 5.656854249492381 | t | 2023-01-30 07:13:51.237596 + 033 | 0033 | 0033 | 33 | 00000000000000000033 | 5.744562646538029 | t | 2023-01-30 07:13:51.238644 + 034 | 0034 | 0034 | 34 | 00000000000000000034 | 5.830951894845301 | t | 2023-01-30 07:13:51.239586 + 035 | 0035 | 0035 | 35 | 00000000000000000035 | 5.916079783099616 | t | 2023-01-30 07:13:51.240478 + 036 | 0036 | 0036 | 36 | 00000000000000000036 | 6 | t | 2023-01-30 07:13:51.241474 + 037 | 0037 | 0037 | 37 | 00000000000000000037 | 6.082762530298219 | t | 2023-01-30 07:13:51.242471 + 038 | 0038 | 0038 | 38 | 00000000000000000038 | 6.164414002968976 | t | 2023-01-30 07:13:51.244178 + 039 | 0039 | 0039 | 39 | 00000000000000000039 | 6.244997998398398 | t | 2023-01-30 07:13:51.245392 + 040 | 0040 | 0040 | 40 | 00000000000000000040 | 6.324555320336759 | t | 2023-01-30 07:13:51.24659 + 041 | 0041 | 0041 | 41 | 00000000000000000041 | 6.4031242374328485 | t | 2023-01-30 07:13:51.247884 + 042 | 0042 | 0042 | 42 | 00000000000000000042 | 6.48074069840786 | t | 2023-01-30 07:13:51.249235 + 043 | 0043 | 0043 | 43 | 00000000000000000043 | 6.557438524302 | t | 2023-01-30 07:13:51.250559 + 044 | 0044 | 0044 | 44 | 00000000000000000044 | 6.6332495807108 | t | 2023-01-30 07:13:51.25194 + 045 | 0045 | 0045 | 45 | 00000000000000000045 | 6.708203932499369 | t | 2023-01-30 07:13:51.253536 + 046 | 0046 | 0046 | 46 | 00000000000000000046 | 6.782329983125268 | t | 2023-01-30 07:13:51.255101 + 047 | 0047 | 0047 | 47 | 00000000000000000047 | 6.855654600401044 | t | 2023-01-30 07:13:51.256433 + 048 | 0048 | 0048 | 48 | 00000000000000000048 | 6.928203230275509 | t | 2023-01-30 07:13:51.257609 + 049 | 0049 | 0049 | 49 | 00000000000000000049 | 7 | t | 2023-01-30 07:13:51.258936 + 050 | 0050 | 0050 | 50 | 00000000000000000050 | 7.0710678118654755 | t | 2023-01-30 07:13:51.259914 + 051 | 0051 | 0051 | 51 | 00000000000000000051 | 7.14142842854285 | t | 2023-01-30 07:13:51.260886 + 052 | 0052 | 0052 | 52 | 00000000000000000052 | 7.211102550927978 | t | 2023-01-30 07:13:51.262173 + 053 | 0053 | 0053 | 53 | 00000000000000000053 | 7.280109889280518 | t | 2023-01-30 07:13:51.263446 + 054 | 0054 | 0054 | 54 | 00000000000000000054 | 7.3484692283495345 | t | 2023-01-30 07:13:51.264589 + 055 | 0055 | 0055 | 55 | 00000000000000000055 | 7.416198487095663 | t | 2023-01-30 07:13:51.265999 + 056 | 0056 | 0056 | 56 | 00000000000000000056 | 7.483314773547883 | t | 2023-01-30 07:13:51.267008 + 057 | 0057 | 0057 | 57 | 00000000000000000057 | 7.54983443527075 | t | 2023-01-30 07:13:51.268255 + 058 | 0058 | 0058 | 58 | 00000000000000000058 | 7.615773105863909 | t | 2023-01-30 07:13:51.269724 + 059 | 0059 | 0059 | 59 | 00000000000000000059 | 7.681145747868608 | t | 2023-01-30 07:13:51.271603 + 060 | 0060 | 0060 | 60 | 00000000000000000060 | 7.745966692414834 | t | 2023-01-30 07:13:51.272897 + 061 | 0061 | 0061 | 61 | 00000000000000000061 | 7.810249675906654 | t | 2023-01-30 07:13:51.274188 + 062 | 0062 | 0062 | 62 | 00000000000000000062 | 7.874007874011811 | t | 2023-01-30 07:13:51.275481 + 063 | 0063 | 0063 | 63 | 00000000000000000063 | 7.937253933193772 | t | 2023-01-30 07:13:51.27667 + 064 | 0064 | 0064 | 64 | 00000000000000000064 | 8 | t | 2023-01-30 07:13:51.277821 + 065 | 0065 | 0065 | 65 | 00000000000000000065 | 8.06225774829855 | t | 2023-01-30 07:13:51.279054 + 066 | 0066 | 0066 | 66 | 00000000000000000066 | 8.12403840463596 | t | 2023-01-30 07:13:51.28027 + 067 | 0067 | 0067 | 67 | 00000000000000000067 | 8.18535277187245 | t | 2023-01-30 07:13:51.287683 + 068 | 0068 | 0068 | 68 | 00000000000000000068 | 8.246211251235321 | t | 2023-01-30 07:13:51.292609 + 069 | 0069 | 0069 | 69 | 00000000000000000069 | 8.306623862918075 | t | 2023-01-30 07:13:51.295028 + 070 | 0070 | 0070 | 70 | 00000000000000000070 | 8.366600265340756 | t | 2023-01-30 07:13:51.296302 + 071 | 0071 | 0071 | 71 | 00000000000000000071 | 8.426149773176359 | t | 2023-01-30 07:13:51.298138 + 072 | 0072 | 0072 | 72 | 00000000000000000072 | 8.48528137423857 | t | 2023-01-30 07:13:51.299708 + 073 | 0073 | 0073 | 73 | 00000000000000000073 | 8.54400374531753 | t | 2023-01-30 07:13:51.301453 + 074 | 0074 | 0074 | 74 | 00000000000000000074 | 8.602325267042627 | t | 2023-01-30 07:13:51.303024 + 075 | 0075 | 0075 | 75 | 00000000000000000075 | 8.660254037844387 | t | 2023-01-30 07:13:51.3068 + 076 | 0076 | 0076 | 76 | 00000000000000000076 | 8.717797887081348 | t | 2023-01-30 07:13:51.316271 + 077 | 0077 | 0077 | 77 | 00000000000000000077 | 8.774964387392123 | t | 2023-01-30 07:13:51.317561 + 078 | 0078 | 0078 | 78 | 00000000000000000078 | 8.831760866327848 | t | 2023-01-30 07:13:51.318983 + 079 | 0079 | 0079 | 79 | 00000000000000000079 | 8.888194417315589 | t | 2023-01-30 07:13:51.320766 + 080 | 0080 | 0080 | 80 | 00000000000000000080 | 8.94427190999916 | t | 2023-01-30 07:13:51.323608 + 081 | 0081 | 0081 | 81 | 00000000000000000081 | 9 | t | 2023-01-30 07:13:51.326137 + 082 | 0082 | 0082 | 82 | 00000000000000000082 | 9.055385138137417 | t | 2023-01-30 07:13:51.327753 + 083 | 0083 | 0083 | 83 | 00000000000000000083 | 9.1104335791443 | t | 2023-01-30 07:13:51.329273 + 084 | 0084 | 0084 | 84 | 00000000000000000084 | 9.16515138991168 | t | 2023-01-30 07:13:51.330504 + 085 | 0085 | 0085 | 85 | 00000000000000000085 | 9.219544457292887 | t | 2023-01-30 07:13:51.331752 + 086 | 0086 | 0086 | 86 | 00000000000000000086 | 9.273618495495704 | t | 2023-01-30 07:13:51.333068 + 087 | 0087 | 0087 | 87 | 00000000000000000087 | 9.327379053088816 | t | 2023-01-30 07:13:51.334407 + 088 | 0088 | 0088 | 88 | 00000000000000000088 | 9.38083151964686 | t | 2023-01-30 07:13:51.335522 + 089 | 0089 | 0089 | 89 | 00000000000000000089 | 9.433981132056603 | t | 2023-01-30 07:13:51.337292 + 090 | 0090 | 0090 | 90 | 00000000000000000090 | 9.486832980505138 | t | 2023-01-30 07:13:51.338573 + 091 | 0091 | 0091 | 91 | 00000000000000000091 | 9.539392014169456 | t | 2023-01-30 07:13:51.340225 + 092 | 0092 | 0092 | 92 | 00000000000000000092 | 9.591663046625438 | t | 2023-01-30 07:13:51.341358 + 093 | 0093 | 0093 | 93 | 00000000000000000093 | 9.643650760992955 | t | 2023-01-30 07:13:51.34267 + 094 | 0094 | 0094 | 94 | 00000000000000000094 | 9.695359714832659 | t | 2023-01-30 07:13:51.343833 + 095 | 0095 | 0095 | 95 | 00000000000000000095 | 9.746794344808963 | t | 2023-01-30 07:13:51.344936 + 096 | 0096 | 0096 | 96 | 00000000000000000096 | 9.797958971132712 | t | 2023-01-30 07:13:51.346061 + 097 | 0097 | 0097 | 97 | 00000000000000000097 | 9.848857801796104 | t | 2023-01-30 07:13:51.347534 + 098 | 0098 | 0098 | 98 | 00000000000000000098 | 9.899494936611665 | t | 2023-01-30 07:13:51.348953 + 099 | 0099 | 0099 | 99 | 00000000000000000099 | 9.9498743710662 | t | 2023-01-30 07:13:51.350003 + 000 | 0100 | 0100 | 100 | 00000000000000000000 | 10 | t | 2023-01-30 07:13:51.351012 + 001 | 0101 | 0101 | 101 | 00000000000000000001 | 10.04987562112089 | t | 2023-01-30 07:13:51.352214 + 002 | 0102 | 0102 | 102 | 00000000000000000002 | 10.099504938362077 | t | 2023-01-30 07:13:51.353457 + 003 | 0103 | 0103 | 103 | 00000000000000000003 | 10.14889156509222 | t | 2023-01-30 07:13:51.354817 + 004 | 0104 | 0104 | 104 | 00000000000000000004 | 10.198039027185569 | t | 2023-01-30 07:13:51.355918 + 005 | 0105 | 0105 | 105 | 00000000000000000005 | 10.246950765959598 | t | 2023-01-30 07:13:51.356941 + 006 | 0106 | 0106 | 106 | 00000000000000000006 | 10.295630140987 | t | 2023-01-30 07:13:51.35796 + 007 | 0107 | 0107 | 107 | 00000000000000000007 | 10.344080432788601 | t | 2023-01-30 07:13:51.359167 + 008 | 0108 | 0108 | 108 | 00000000000000000008 | 10.392304845413264 | t | 2023-01-30 07:13:51.360201 + 009 | 0109 | 0109 | 109 | 00000000000000000009 | 10.44030650891055 | t | 2023-01-30 07:13:51.36118 + 010 | 0110 | 0110 | 110 | 00000000000000000010 | 10.488088481701515 | t | 2023-01-30 07:13:51.362126 + 011 | 0111 | 0111 | 111 | 00000000000000000011 | 10.535653752852738 | t | 2023-01-30 07:13:51.363489 + 012 | 0112 | 0112 | 112 | 00000000000000000012 | 10.583005244258363 | t | 2023-01-30 07:13:51.364817 + 013 | 0113 | 0113 | 113 | 00000000000000000013 | 10.63014581273465 | t | 2023-01-30 07:13:51.36597 + 014 | 0114 | 0114 | 114 | 00000000000000000014 | 10.677078252031311 | t | 2023-01-30 07:13:51.36731 + 015 | 0115 | 0115 | 115 | 00000000000000000015 | 10.723805294763608 | t | 2023-01-30 07:13:51.370845 + 016 | 0116 | 0116 | 116 | 00000000000000000016 | 10.770329614269007 | t | 2023-01-30 07:13:51.372301 + 017 | 0117 | 0117 | 117 | 00000000000000000017 | 10.816653826391969 | t | 2023-01-30 07:13:51.377126 + 018 | 0118 | 0118 | 118 | 00000000000000000018 | 10.862780491200215 | t | 2023-01-30 07:13:51.378391 + 019 | 0119 | 0119 | 119 | 00000000000000000019 | 10.908712114635714 | t | 2023-01-30 07:13:51.379788 + 020 | 0120 | 0120 | 120 | 00000000000000000020 | 10.954451150103322 | t | 2023-01-30 07:13:51.381127 + 021 | 0121 | 0121 | 121 | 00000000000000000021 | 11 | t | 2023-01-30 07:13:51.382476 + 022 | 0122 | 0122 | 122 | 00000000000000000022 | 11.045361017187261 | t | 2023-01-30 07:13:51.38369 + 023 | 0123 | 0123 | 123 | 00000000000000000023 | 11.090536506409418 | t | 2023-01-30 07:13:51.385016 + 024 | 0124 | 0124 | 124 | 00000000000000000024 | 11.135528725660043 | t | 2023-01-30 07:13:51.386514 + 025 | 0125 | 0125 | 125 | 00000000000000000025 | 11.180339887498949 | t | 2023-01-30 07:13:51.387934 + 026 | 0126 | 0126 | 126 | 00000000000000000026 | 11.224972160321824 | t | 2023-01-30 07:13:51.389226 + 027 | 0127 | 0127 | 127 | 00000000000000000027 | 11.269427669584644 | t | 2023-01-30 07:13:51.390582 + 028 | 0128 | 0128 | 128 | 00000000000000000028 | 11.313708498984761 | t | 2023-01-30 07:13:51.391916 + 029 | 0129 | 0129 | 129 | 00000000000000000029 | 11.357816691600547 | t | 2023-01-30 07:13:51.393265 + 030 | 0130 | 0130 | 130 | 00000000000000000030 | 11.40175425099138 | t | 2023-01-30 07:13:51.394531 + 031 | 0131 | 0131 | 131 | 00000000000000000031 | 11.445523142259598 | t | 2023-01-30 07:13:51.395795 + 032 | 0132 | 0132 | 132 | 00000000000000000032 | 11.489125293076057 | t | 2023-01-30 07:13:51.397144 + 033 | 0133 | 0133 | 133 | 00000000000000000033 | 11.532562594670797 | t | 2023-01-30 07:13:51.398348 + 034 | 0134 | 0134 | 134 | 00000000000000000034 | 11.575836902790225 | t | 2023-01-30 07:13:51.399549 + 035 | 0135 | 0135 | 135 | 00000000000000000035 | 11.61895003862225 | t | 2023-01-30 07:13:51.400722 + 036 | 0136 | 0136 | 136 | 00000000000000000036 | 11.661903789690601 | t | 2023-01-30 07:13:51.401928 + 037 | 0137 | 0137 | 137 | 00000000000000000037 | 11.704699910719626 | t | 2023-01-30 07:13:51.403684 + 038 | 0138 | 0138 | 138 | 00000000000000000038 | 11.74734012447073 | t | 2023-01-30 07:13:51.405359 + 039 | 0139 | 0139 | 139 | 00000000000000000039 | 11.789826122551595 | t | 2023-01-30 07:13:51.406647 + 040 | 0140 | 0140 | 140 | 00000000000000000040 | 11.832159566199232 | t | 2023-01-30 07:13:51.407944 + 041 | 0141 | 0141 | 141 | 00000000000000000041 | 11.874342087037917 | t | 2023-01-30 07:13:51.40921 + 042 | 0142 | 0142 | 142 | 00000000000000000042 | 11.916375287812984 | t | 2023-01-30 07:13:51.410426 + 043 | 0143 | 0143 | 143 | 00000000000000000043 | 11.958260743101398 | t | 2023-01-30 07:13:51.411677 + 044 | 0144 | 0144 | 144 | 00000000000000000044 | 12 | t | 2023-01-30 07:13:51.412938 + 045 | 0145 | 0145 | 145 | 00000000000000000045 | 12.041594578792296 | t | 2023-01-30 07:13:51.414185 + 046 | 0146 | 0146 | 146 | 00000000000000000046 | 12.083045973594572 | t | 2023-01-30 07:13:51.415391 + 047 | 0147 | 0147 | 147 | 00000000000000000047 | 12.12435565298214 | t | 2023-01-30 07:13:51.416645 + 048 | 0148 | 0148 | 148 | 00000000000000000048 | 12.165525060596439 | t | 2023-01-30 07:13:51.418162 + 049 | 0149 | 0149 | 149 | 00000000000000000049 | 12.206555615733702 | t | 2023-01-30 07:13:51.419532 + 050 | 0150 | 0150 | 150 | 00000000000000000050 | 12.24744871391589 | t | 2023-01-30 07:13:51.422679 + 051 | 0151 | 0151 | 151 | 00000000000000000051 | 12.288205727444508 | t | 2023-01-30 07:13:51.423911 + 052 | 0152 | 0152 | 152 | 00000000000000000052 | 12.328828005937952 | t | 2023-01-30 07:13:51.425069 + 053 | 0153 | 0153 | 153 | 00000000000000000053 | 12.36931687685298 | t | 2023-01-30 07:13:51.426235 + 054 | 0154 | 0154 | 154 | 00000000000000000054 | 12.409673645990857 | t | 2023-01-30 07:13:51.427651 + 055 | 0155 | 0155 | 155 | 00000000000000000055 | 12.449899597988733 | t | 2023-01-30 07:13:51.429029 + 056 | 0156 | 0156 | 156 | 00000000000000000056 | 12.489995996796797 | t | 2023-01-30 07:13:51.431408 + 057 | 0157 | 0157 | 157 | 00000000000000000057 | 12.529964086141668 | t | 2023-01-30 07:13:51.432631 + 058 | 0158 | 0158 | 158 | 00000000000000000058 | 12.569805089976535 | t | 2023-01-30 07:13:51.438548 + 059 | 0159 | 0159 | 159 | 00000000000000000059 | 12.609520212918492 | t | 2023-01-30 07:13:51.440556 + 060 | 0160 | 0160 | 160 | 00000000000000000060 | 12.649110640673518 | t | 2023-01-30 07:13:51.447949 + 061 | 0161 | 0161 | 161 | 00000000000000000061 | 12.68857754044952 | t | 2023-01-30 07:13:51.449335 + 062 | 0162 | 0162 | 162 | 00000000000000000062 | 12.727922061357855 | t | 2023-01-30 07:13:51.45046 + 063 | 0163 | 0163 | 163 | 00000000000000000063 | 12.767145334803704 | t | 2023-01-30 07:13:51.451809 + 064 | 0164 | 0164 | 164 | 00000000000000000064 | 12.806248474865697 | t | 2023-01-30 07:13:51.453149 + 065 | 0165 | 0165 | 165 | 00000000000000000065 | 12.84523257866513 | t | 2023-01-30 07:13:51.454603 + 066 | 0166 | 0166 | 166 | 00000000000000000066 | 12.884098726725126 | t | 2023-01-30 07:13:51.462251 + 067 | 0167 | 0167 | 167 | 00000000000000000067 | 12.922847983320086 | t | 2023-01-30 07:13:51.463454 + 068 | 0168 | 0168 | 168 | 00000000000000000068 | 12.96148139681572 | t | 2023-01-30 07:13:51.464548 + 069 | 0169 | 0169 | 169 | 00000000000000000069 | 13 | t | 2023-01-30 07:13:51.465627 + 070 | 0170 | 0170 | 170 | 00000000000000000070 | 13.038404810405298 | t | 2023-01-30 07:13:51.466636 + 071 | 0171 | 0171 | 171 | 00000000000000000071 | 13.076696830622021 | t | 2023-01-30 07:13:51.467601 + 072 | 0172 | 0172 | 172 | 00000000000000000072 | 13.114877048604 | t | 2023-01-30 07:13:51.46867 + 073 | 0173 | 0173 | 173 | 00000000000000000073 | 13.152946437965905 | t | 2023-01-30 07:13:51.470192 + 074 | 0174 | 0174 | 174 | 00000000000000000074 | 13.19090595827292 | t | 2023-01-30 07:13:51.471825 + 075 | 0175 | 0175 | 175 | 00000000000000000075 | 13.228756555322953 | t | 2023-01-30 07:13:51.472971 + 076 | 0176 | 0176 | 176 | 00000000000000000076 | 13.2664991614216 | t | 2023-01-30 07:13:51.474042 + 077 | 0177 | 0177 | 177 | 00000000000000000077 | 13.30413469565007 | t | 2023-01-30 07:13:51.475115 + 078 | 0178 | 0178 | 178 | 00000000000000000078 | 13.341664064126334 | t | 2023-01-30 07:13:51.476205 + 079 | 0179 | 0179 | 179 | 00000000000000000079 | 13.379088160259652 | t | 2023-01-30 07:13:51.477221 + 080 | 0180 | 0180 | 180 | 00000000000000000080 | 13.416407864998739 | t | 2023-01-30 07:13:51.478204 + 081 | 0181 | 0181 | 181 | 00000000000000000081 | 13.45362404707371 | t | 2023-01-30 07:13:51.479197 + 082 | 0182 | 0182 | 182 | 00000000000000000082 | 13.490737563232042 | t | 2023-01-30 07:13:51.48019 + 083 | 0183 | 0183 | 183 | 00000000000000000083 | 13.527749258468683 | t | 2023-01-30 07:13:51.481209 + 084 | 0184 | 0184 | 184 | 00000000000000000084 | 13.564659966250536 | t | 2023-01-30 07:13:51.482438 + 085 | 0185 | 0185 | 185 | 00000000000000000085 | 13.601470508735444 | t | 2023-01-30 07:13:51.483606 + 086 | 0186 | 0186 | 186 | 00000000000000000086 | 13.638181696985855 | t | 2023-01-30 07:13:51.484673 + 087 | 0187 | 0187 | 187 | 00000000000000000087 | 13.674794331177344 | t | 2023-01-30 07:13:51.485765 + 088 | 0188 | 0188 | 188 | 00000000000000000088 | 13.711309200802088 | t | 2023-01-30 07:13:51.487641 + 089 | 0189 | 0189 | 189 | 00000000000000000089 | 13.74772708486752 | t | 2023-01-30 07:13:51.48908 + 090 | 0190 | 0190 | 190 | 00000000000000000090 | 13.784048752090222 | t | 2023-01-30 07:13:51.490108 + 091 | 0191 | 0191 | 191 | 00000000000000000091 | 13.820274961085254 | t | 2023-01-30 07:13:51.491332 + 092 | 0192 | 0192 | 192 | 00000000000000000092 | 13.856406460551018 | t | 2023-01-30 07:13:51.492625 + 093 | 0193 | 0193 | 193 | 00000000000000000093 | 13.892443989449804 | t | 2023-01-30 07:13:51.493749 + 094 | 0194 | 0194 | 194 | 00000000000000000094 | 13.92838827718412 | t | 2023-01-30 07:13:51.494713 + 095 | 0195 | 0195 | 195 | 00000000000000000095 | 13.96424004376894 | t | 2023-01-30 07:13:51.495782 + 096 | 0196 | 0196 | 196 | 00000000000000000096 | 14 | t | 2023-01-30 07:13:51.496904 + 097 | 0197 | 0197 | 197 | 00000000000000000097 | 14.035668847618199 | t | 2023-01-30 07:13:51.497928 + 098 | 0198 | 0198 | 198 | 00000000000000000098 | 14.071247279470288 | t | 2023-01-30 07:13:51.498961 + 099 | 0199 | 0199 | 199 | 00000000000000000099 | 14.106735979665885 | t | 2023-01-30 07:13:51.499929 + 000 | 0200 | 0200 | 200 | 00000000000000000000 | 14.142135623730951 | t | 2023-01-30 07:13:51.500943 + 001 | 0201 | 0201 | 201 | 00000000000000000001 | 14.177446878757825 | t | 2023-01-30 07:13:51.501941 + 002 | 0202 | 0202 | 202 | 00000000000000000002 | 14.212670403551895 | t | 2023-01-30 07:13:51.503437 + 003 | 0203 | 0203 | 203 | 00000000000000000003 | 14.247806848775006 | t | 2023-01-30 07:13:51.504665 + 004 | 0204 | 0204 | 204 | 00000000000000000004 | 14.2828568570857 | t | 2023-01-30 07:13:51.505763 + 005 | 0205 | 0205 | 205 | 00000000000000000005 | 14.317821063276353 | t | 2023-01-30 07:13:51.506858 + 006 | 0206 | 0206 | 206 | 00000000000000000006 | 14.352700094407323 | t | 2023-01-30 07:13:51.508364 + 007 | 0207 | 0207 | 207 | 00000000000000000007 | 14.38749456993816 | t | 2023-01-30 07:13:51.509604 + 008 | 0208 | 0208 | 208 | 00000000000000000008 | 14.422205101855956 | t | 2023-01-30 07:13:51.510708 + 009 | 0209 | 0209 | 209 | 00000000000000000009 | 14.45683229480096 | t | 2023-01-30 07:13:51.51181 + 010 | 0210 | 0210 | 210 | 00000000000000000010 | 14.491376746189438 | t | 2023-01-30 07:13:51.51297 + 011 | 0211 | 0211 | 211 | 00000000000000000011 | 14.52583904633395 | t | 2023-01-30 07:13:51.514015 + 012 | 0212 | 0212 | 212 | 00000000000000000012 | 14.560219778561036 | t | 2023-01-30 07:13:51.515044 + 013 | 0213 | 0213 | 213 | 00000000000000000013 | 14.594519519326424 | t | 2023-01-30 07:13:51.516208 + 014 | 0214 | 0214 | 214 | 00000000000000000014 | 14.628738838327793 | t | 2023-01-30 07:13:51.517213 + 015 | 0215 | 0215 | 215 | 00000000000000000015 | 14.66287829861518 | t | 2023-01-30 07:13:51.518226 + 016 | 0216 | 0216 | 216 | 00000000000000000016 | 14.696938456699069 | t | 2023-01-30 07:13:51.519411 + 017 | 0217 | 0217 | 217 | 00000000000000000017 | 14.730919862656235 | t | 2023-01-30 07:13:51.520923 + 018 | 0218 | 0218 | 218 | 00000000000000000018 | 14.7648230602334 | t | 2023-01-30 07:13:51.522084 + 019 | 0219 | 0219 | 219 | 00000000000000000019 | 14.798648586948742 | t | 2023-01-30 07:13:51.523312 + 020 | 0220 | 0220 | 220 | 00000000000000000020 | 14.832396974191326 | t | 2023-01-30 07:13:51.524343 + 021 | 0221 | 0221 | 221 | 00000000000000000021 | 14.866068747318506 | t | 2023-01-30 07:13:51.525373 + 022 | 0222 | 0222 | 222 | 00000000000000000022 | 14.89966442575134 | t | 2023-01-30 07:13:51.52631 + 023 | 0223 | 0223 | 223 | 00000000000000000023 | 14.933184523068078 | t | 2023-01-30 07:13:51.527339 + 024 | 0224 | 0224 | 224 | 00000000000000000024 | 14.966629547095765 | t | 2023-01-30 07:13:51.52837 + 025 | 0225 | 0225 | 225 | 00000000000000000025 | 15 | t | 2023-01-30 07:13:51.529258 + 026 | 0226 | 0226 | 226 | 00000000000000000026 | 15.033296378372908 | t | 2023-01-30 07:13:51.530221 + 027 | 0227 | 0227 | 227 | 00000000000000000027 | 15.066519173319364 | t | 2023-01-30 07:13:51.531276 + 028 | 0228 | 0228 | 228 | 00000000000000000028 | 15.0996688705415 | t | 2023-01-30 07:13:51.536743 + 029 | 0229 | 0229 | 229 | 00000000000000000029 | 15.132745950421556 | t | 2023-01-30 07:13:51.538079 + 030 | 0230 | 0230 | 230 | 00000000000000000030 | 15.165750888103101 | t | 2023-01-30 07:13:51.539202 + 031 | 0231 | 0231 | 231 | 00000000000000000031 | 15.198684153570664 | t | 2023-01-30 07:13:51.540525 + 032 | 0232 | 0232 | 232 | 00000000000000000032 | 15.231546211727817 | t | 2023-01-30 07:13:51.541612 + 033 | 0233 | 0233 | 233 | 00000000000000000033 | 15.264337522473747 | t | 2023-01-30 07:13:51.542579 + 034 | 0234 | 0234 | 234 | 00000000000000000034 | 15.297058540778355 | t | 2023-01-30 07:13:51.543596 + 035 | 0235 | 0235 | 235 | 00000000000000000035 | 15.329709716755891 | t | 2023-01-30 07:13:51.544664 + 036 | 0236 | 0236 | 236 | 00000000000000000036 | 15.362291495737216 | t | 2023-01-30 07:13:51.54584 + 037 | 0237 | 0237 | 237 | 00000000000000000037 | 15.394804318340652 | t | 2023-01-30 07:13:51.546967 + 038 | 0238 | 0238 | 238 | 00000000000000000038 | 15.427248620541512 | t | 2023-01-30 07:13:51.547961 + 039 | 0239 | 0239 | 239 | 00000000000000000039 | 15.459624833740307 | t | 2023-01-30 07:13:51.548921 + 040 | 0240 | 0240 | 240 | 00000000000000000040 | 15.491933384829668 | t | 2023-01-30 07:13:51.549957 + 041 | 0241 | 0241 | 241 | 00000000000000000041 | 15.524174696260024 | t | 2023-01-30 07:13:51.550965 + 042 | 0242 | 0242 | 242 | 00000000000000000042 | 15.556349186104045 | t | 2023-01-30 07:13:51.551936 + 043 | 0243 | 0243 | 243 | 00000000000000000043 | 15.588457268119896 | t | 2023-01-30 07:13:51.553461 + 044 | 0244 | 0244 | 244 | 00000000000000000044 | 15.620499351813308 | t | 2023-01-30 07:13:51.554636 + 045 | 0245 | 0245 | 245 | 00000000000000000045 | 15.652475842498529 | t | 2023-01-30 07:13:51.555694 + 046 | 0246 | 0246 | 246 | 00000000000000000046 | 15.684387141358123 | t | 2023-01-30 07:13:51.556648 + 047 | 0247 | 0247 | 247 | 00000000000000000047 | 15.716233645501712 | t | 2023-01-30 07:13:51.557605 + 048 | 0248 | 0248 | 248 | 00000000000000000048 | 15.748015748023622 | t | 2023-01-30 07:13:51.558745 + 049 | 0249 | 0249 | 249 | 00000000000000000049 | 15.7797338380595 | t | 2023-01-30 07:13:51.559719 + 050 | 0250 | 0250 | 250 | 00000000000000000050 | 15.811388300841896 | t | 2023-01-30 07:13:51.560907 + 051 | 0251 | 0251 | 251 | 00000000000000000051 | 15.84297951775486 | t | 2023-01-30 07:13:51.561985 + 052 | 0252 | 0252 | 252 | 00000000000000000052 | 15.874507866387544 | t | 2023-01-30 07:13:51.562962 + 053 | 0253 | 0253 | 253 | 00000000000000000053 | 15.905973720586866 | t | 2023-01-30 07:13:51.563941 + 054 | 0254 | 0254 | 254 | 00000000000000000054 | 15.937377450509228 | t | 2023-01-30 07:13:51.564909 + 055 | 0255 | 0255 | 255 | 00000000000000000055 | 15.968719422671311 | t | 2023-01-30 07:13:51.565939 + 056 | 0256 | 0256 | 256 | 00000000000000000056 | 16 | t | 2023-01-30 07:13:51.567145 + 057 | 0257 | 0257 | 257 | 00000000000000000057 | 16.0312195418814 | t | 2023-01-30 07:13:51.568177 + 058 | 0258 | 0258 | 258 | 00000000000000000058 | 16.06237840420901 | t | 2023-01-30 07:13:51.569243 + 059 | 0259 | 0259 | 259 | 00000000000000000059 | 16.09347693943108 | t | 2023-01-30 07:13:51.570646 + 060 | 0260 | 0260 | 260 | 00000000000000000060 | 16.1245154965971 | t | 2023-01-30 07:13:51.571829 + 061 | 0261 | 0261 | 261 | 00000000000000000061 | 16.15549442140351 | t | 2023-01-30 07:13:51.572849 + 062 | 0262 | 0262 | 262 | 00000000000000000062 | 16.186414056238647 | t | 2023-01-30 07:13:51.573913 + 063 | 0263 | 0263 | 263 | 00000000000000000063 | 16.217274740226856 | t | 2023-01-30 07:13:51.575541 + 064 | 0264 | 0264 | 264 | 00000000000000000064 | 16.24807680927192 | t | 2023-01-30 07:13:51.576635 + 065 | 0265 | 0265 | 265 | 00000000000000000065 | 16.278820596099706 | t | 2023-01-30 07:13:51.577695 + 066 | 0266 | 0266 | 266 | 00000000000000000066 | 16.30950643030009 | t | 2023-01-30 07:13:51.578747 + 067 | 0267 | 0267 | 267 | 00000000000000000067 | 16.34013463836819 | t | 2023-01-30 07:13:51.579817 + 068 | 0268 | 0268 | 268 | 00000000000000000068 | 16.3707055437449 | t | 2023-01-30 07:13:51.580836 + 069 | 0269 | 0269 | 269 | 00000000000000000069 | 16.401219466856727 | t | 2023-01-30 07:13:51.581992 + 070 | 0270 | 0270 | 270 | 00000000000000000070 | 16.431676725154983 | t | 2023-01-30 07:13:51.583128 + 071 | 0271 | 0271 | 271 | 00000000000000000071 | 16.46207763315433 | t | 2023-01-30 07:13:51.584135 + 072 | 0272 | 0272 | 272 | 00000000000000000072 | 16.492422502470642 | t | 2023-01-30 07:13:51.585133 + 073 | 0273 | 0273 | 273 | 00000000000000000073 | 16.522711641858304 | t | 2023-01-30 07:13:51.586529 + 074 | 0274 | 0274 | 274 | 00000000000000000074 | 16.55294535724685 | t | 2023-01-30 07:13:51.58788 + 075 | 0275 | 0275 | 275 | 00000000000000000075 | 16.583123951777 | t | 2023-01-30 07:13:51.588911 + 076 | 0276 | 0276 | 276 | 00000000000000000076 | 16.61324772583615 | t | 2023-01-30 07:13:51.590041 + 077 | 0277 | 0277 | 277 | 00000000000000000077 | 16.64331697709324 | t | 2023-01-30 07:13:51.591246 + 078 | 0278 | 0278 | 278 | 00000000000000000078 | 16.673332000533065 | t | 2023-01-30 07:13:51.592288 + 079 | 0279 | 0279 | 279 | 00000000000000000079 | 16.703293088490067 | t | 2023-01-30 07:13:51.593339 + 080 | 0280 | 0280 | 280 | 00000000000000000080 | 16.73320053068151 | t | 2023-01-30 07:13:51.594457 + 081 | 0281 | 0281 | 281 | 00000000000000000081 | 16.76305461424021 | t | 2023-01-30 07:13:51.595531 + 082 | 0282 | 0282 | 282 | 00000000000000000082 | 16.792855623746664 | t | 2023-01-30 07:13:51.59655 + 083 | 0283 | 0283 | 283 | 00000000000000000083 | 16.822603841260722 | t | 2023-01-30 07:13:51.59953 + 084 | 0284 | 0284 | 284 | 00000000000000000084 | 16.852299546352718 | t | 2023-01-30 07:13:51.600634 + 085 | 0285 | 0285 | 285 | 00000000000000000085 | 16.881943016134134 | t | 2023-01-30 07:13:51.601625 + 086 | 0286 | 0286 | 286 | 00000000000000000086 | 16.911534525287763 | t | 2023-01-30 07:13:51.603138 + 087 | 0287 | 0287 | 287 | 00000000000000000087 | 16.941074346097416 | t | 2023-01-30 07:13:51.604549 + 088 | 0288 | 0288 | 288 | 00000000000000000088 | 16.97056274847714 | t | 2023-01-30 07:13:51.605823 + 089 | 0289 | 0289 | 289 | 00000000000000000089 | 17 | t | 2023-01-30 07:13:51.606929 + 090 | 0290 | 0290 | 290 | 00000000000000000090 | 17.029386365926403 | t | 2023-01-30 07:13:51.607952 + 091 | 0291 | 0291 | 291 | 00000000000000000091 | 17.05872210923198 | t | 2023-01-30 07:13:51.609276 + 092 | 0292 | 0292 | 292 | 00000000000000000092 | 17.08800749063506 | t | 2023-01-30 07:13:51.610358 + 093 | 0293 | 0293 | 293 | 00000000000000000093 | 17.11724276862369 | t | 2023-01-30 07:13:51.611403 + 094 | 0294 | 0294 | 294 | 00000000000000000094 | 17.146428199482248 | t | 2023-01-30 07:13:51.612524 + 095 | 0295 | 0295 | 295 | 00000000000000000095 | 17.175564037317667 | t | 2023-01-30 07:13:51.613666 + 096 | 0296 | 0296 | 296 | 00000000000000000096 | 17.204650534085253 | t | 2023-01-30 07:13:51.614561 + 097 | 0297 | 0297 | 297 | 00000000000000000097 | 17.233687939614086 | t | 2023-01-30 07:13:51.615583 + 098 | 0298 | 0298 | 298 | 00000000000000000098 | 17.26267650163207 | t | 2023-01-30 07:13:51.616648 + 099 | 0299 | 0299 | 299 | 00000000000000000099 | 17.291616465790582 | t | 2023-01-30 07:13:51.617648 + 000 | 0300 | 0300 | 300 | 00000000000000000000 | 17.320508075688775 | t | 2023-01-30 07:13:51.618612 + 001 | 0301 | 0301 | 301 | 00000000000000000001 | 17.349351572897472 | t | 2023-01-30 07:13:51.619772 + 002 | 0302 | 0302 | 302 | 00000000000000000002 | 17.378147196982766 | t | 2023-01-30 07:13:51.621423 + 003 | 0303 | 0303 | 303 | 00000000000000000003 | 17.406895185529212 | t | 2023-01-30 07:13:51.622987 + 004 | 0304 | 0304 | 304 | 00000000000000000004 | 17.435595774162696 | t | 2023-01-30 07:13:51.624356 + 005 | 0305 | 0305 | 305 | 00000000000000000005 | 17.46424919657298 | t | 2023-01-30 07:13:51.625568 + 006 | 0306 | 0306 | 306 | 00000000000000000006 | 17.4928556845359 | t | 2023-01-30 07:13:51.626889 + 007 | 0307 | 0307 | 307 | 00000000000000000007 | 17.52141546793523 | t | 2023-01-30 07:13:51.628804 + 008 | 0308 | 0308 | 308 | 00000000000000000008 | 17.549928774784245 | t | 2023-01-30 07:13:51.630278 + 009 | 0309 | 0309 | 309 | 00000000000000000009 | 17.578395831246947 | t | 2023-01-30 07:13:51.631606 + 010 | 0310 | 0310 | 310 | 00000000000000000010 | 17.60681686165901 | t | 2023-01-30 07:13:51.633153 + 011 | 0311 | 0311 | 311 | 00000000000000000011 | 17.635192088548397 | t | 2023-01-30 07:13:51.634704 + 012 | 0312 | 0312 | 312 | 00000000000000000012 | 17.663521732655695 | t | 2023-01-30 07:13:51.635935 + 013 | 0313 | 0313 | 313 | 00000000000000000013 | 17.69180601295413 | t | 2023-01-30 07:13:51.637708 + 014 | 0314 | 0314 | 314 | 00000000000000000014 | 17.72004514666935 | t | 2023-01-30 07:13:51.639134 + 015 | 0315 | 0315 | 315 | 00000000000000000015 | 17.74823934929885 | t | 2023-01-30 07:13:51.640282 + 016 | 0316 | 0316 | 316 | 00000000000000000016 | 17.776388834631177 | t | 2023-01-30 07:13:51.641349 + 017 | 0317 | 0317 | 317 | 00000000000000000017 | 17.804493814764857 | t | 2023-01-30 07:13:51.642491 + 018 | 0318 | 0318 | 318 | 00000000000000000018 | 17.832554500127006 | t | 2023-01-30 07:13:51.643621 + 019 | 0319 | 0319 | 319 | 00000000000000000019 | 17.86057109949175 | t | 2023-01-30 07:13:51.644653 + 020 | 0320 | 0320 | 320 | 00000000000000000020 | 17.88854381999832 | t | 2023-01-30 07:13:51.64572 + 021 | 0321 | 0321 | 321 | 00000000000000000021 | 17.916472867168917 | t | 2023-01-30 07:13:51.646881 + 022 | 0322 | 0322 | 322 | 00000000000000000022 | 17.944358444926362 | t | 2023-01-30 07:13:51.648064 + 023 | 0323 | 0323 | 323 | 00000000000000000023 | 17.97220075561143 | t | 2023-01-30 07:13:51.649139 + 024 | 0324 | 0324 | 324 | 00000000000000000024 | 18 | t | 2023-01-30 07:13:51.650206 + 025 | 0325 | 0325 | 325 | 00000000000000000025 | 18.027756377319946 | t | 2023-01-30 07:13:51.651238 + 026 | 0326 | 0326 | 326 | 00000000000000000026 | 18.05547008526779 | t | 2023-01-30 07:13:51.652337 + 027 | 0327 | 0327 | 327 | 00000000000000000027 | 18.083141320025124 | t | 2023-01-30 07:13:51.654674 + 028 | 0328 | 0328 | 328 | 00000000000000000028 | 18.110770276274835 | t | 2023-01-30 07:13:51.655956 + 029 | 0329 | 0329 | 329 | 00000000000000000029 | 18.138357147217054 | t | 2023-01-30 07:13:51.657384 + 030 | 0330 | 0330 | 330 | 00000000000000000030 | 18.16590212458495 | t | 2023-01-30 07:13:51.658601 + 031 | 0331 | 0331 | 331 | 00000000000000000031 | 18.193405398660254 | t | 2023-01-30 07:13:51.659657 + 032 | 0332 | 0332 | 332 | 00000000000000000032 | 18.2208671582886 | t | 2023-01-30 07:13:51.660886 + 033 | 0333 | 0333 | 333 | 00000000000000000033 | 18.24828759089466 | t | 2023-01-30 07:13:51.66211 + 034 | 0334 | 0334 | 334 | 00000000000000000034 | 18.275666882497067 | t | 2023-01-30 07:13:51.663246 + 035 | 0335 | 0335 | 335 | 00000000000000000035 | 18.303005217723125 | t | 2023-01-30 07:13:51.664434 + 036 | 0336 | 0336 | 336 | 00000000000000000036 | 18.33030277982336 | t | 2023-01-30 07:13:51.665492 + 037 | 0337 | 0337 | 337 | 00000000000000000037 | 18.35755975068582 | t | 2023-01-30 07:13:51.666461 + 038 | 0338 | 0338 | 338 | 00000000000000000038 | 18.384776310850235 | t | 2023-01-30 07:13:51.667608 + 039 | 0339 | 0339 | 339 | 00000000000000000039 | 18.411952639521967 | t | 2023-01-30 07:13:51.668615 + 040 | 0340 | 0340 | 340 | 00000000000000000040 | 18.439088914585774 | t | 2023-01-30 07:13:51.670113 + 041 | 0341 | 0341 | 341 | 00000000000000000041 | 18.466185312619388 | t | 2023-01-30 07:13:51.671263 + 042 | 0342 | 0342 | 342 | 00000000000000000042 | 18.49324200890693 | t | 2023-01-30 07:13:51.672347 + 043 | 0343 | 0343 | 343 | 00000000000000000043 | 18.520259177452136 | t | 2023-01-30 07:13:51.673543 + 044 | 0344 | 0344 | 344 | 00000000000000000044 | 18.547236990991408 | t | 2023-01-30 07:13:51.674615 + 045 | 0345 | 0345 | 345 | 00000000000000000045 | 18.57417562100671 | t | 2023-01-30 07:13:51.675703 + 046 | 0346 | 0346 | 346 | 00000000000000000046 | 18.601075237738275 | t | 2023-01-30 07:13:51.676777 + 047 | 0347 | 0347 | 347 | 00000000000000000047 | 18.627936010197157 | t | 2023-01-30 07:13:51.678352 + 048 | 0348 | 0348 | 348 | 00000000000000000048 | 18.65475810617763 | t | 2023-01-30 07:13:51.68021 + 049 | 0349 | 0349 | 349 | 00000000000000000049 | 18.681541692269406 | t | 2023-01-30 07:13:51.681303 + 050 | 0350 | 0350 | 350 | 00000000000000000050 | 18.708286933869708 | t | 2023-01-30 07:13:51.682336 + 051 | 0351 | 0351 | 351 | 00000000000000000051 | 18.734993995195193 | t | 2023-01-30 07:13:51.683379 + 052 | 0352 | 0352 | 352 | 00000000000000000052 | 18.76166303929372 | t | 2023-01-30 07:13:51.684395 + 053 | 0353 | 0353 | 353 | 00000000000000000053 | 18.788294228055936 | t | 2023-01-30 07:13:51.685407 + 054 | 0354 | 0354 | 354 | 00000000000000000054 | 18.81488772222678 | t | 2023-01-30 07:13:51.686649 + 055 | 0355 | 0355 | 355 | 00000000000000000055 | 18.841443681416774 | t | 2023-01-30 07:13:51.687758 + 056 | 0356 | 0356 | 356 | 00000000000000000056 | 18.867962264113206 | t | 2023-01-30 07:13:51.688864 + 057 | 0357 | 0357 | 357 | 00000000000000000057 | 18.894443627691185 | t | 2023-01-30 07:13:51.690156 + 058 | 0358 | 0358 | 358 | 00000000000000000058 | 18.920887928424502 | t | 2023-01-30 07:13:51.69151 + 059 | 0359 | 0359 | 359 | 00000000000000000059 | 18.947295321496416 | t | 2023-01-30 07:13:51.692648 + 060 | 0360 | 0360 | 360 | 00000000000000000060 | 18.973665961010276 | t | 2023-01-30 07:13:51.693759 + 061 | 0361 | 0361 | 361 | 00000000000000000061 | 19 | t | 2023-01-30 07:13:51.694808 + 062 | 0362 | 0362 | 362 | 00000000000000000062 | 19.026297590440446 | t | 2023-01-30 07:13:51.695971 + 063 | 0363 | 0363 | 363 | 00000000000000000063 | 19.05255888325765 | t | 2023-01-30 07:13:51.697059 + 064 | 0364 | 0364 | 364 | 00000000000000000064 | 19.078784028338912 | t | 2023-01-30 07:13:51.698192 + 065 | 0365 | 0365 | 365 | 00000000000000000065 | 19.1049731745428 | t | 2023-01-30 07:13:51.699271 + 066 | 0366 | 0366 | 366 | 00000000000000000066 | 19.131126469708992 | t | 2023-01-30 07:13:51.700358 + 067 | 0367 | 0367 | 367 | 00000000000000000067 | 19.157244060668017 | t | 2023-01-30 07:13:51.701386 + 068 | 0368 | 0368 | 368 | 00000000000000000068 | 19.183326093250876 | t | 2023-01-30 07:13:51.702602 + 069 | 0369 | 0369 | 369 | 00000000000000000069 | 19.209372712298546 | t | 2023-01-30 07:13:51.7038 + 070 | 0370 | 0370 | 370 | 00000000000000000070 | 19.235384061671343 | t | 2023-01-30 07:13:51.704841 + 071 | 0371 | 0371 | 371 | 00000000000000000071 | 19.261360284258224 | t | 2023-01-30 07:13:51.70588 + 072 | 0372 | 0372 | 372 | 00000000000000000072 | 19.28730152198591 | t | 2023-01-30 07:13:51.706982 + 073 | 0373 | 0373 | 373 | 00000000000000000073 | 19.313207915827967 | t | 2023-01-30 07:13:51.707993 + 074 | 0374 | 0374 | 374 | 00000000000000000074 | 19.339079605813716 | t | 2023-01-30 07:13:51.709033 + 075 | 0375 | 0375 | 375 | 00000000000000000075 | 19.364916731037084 | t | 2023-01-30 07:13:51.710119 + 076 | 0376 | 0376 | 376 | 00000000000000000076 | 19.390719429665317 | t | 2023-01-30 07:13:51.711198 + 077 | 0377 | 0377 | 377 | 00000000000000000077 | 19.4164878389476 | t | 2023-01-30 07:13:51.712678 + 078 | 0378 | 0378 | 378 | 00000000000000000078 | 19.44222209522358 | t | 2023-01-30 07:13:51.713755 + 079 | 0379 | 0379 | 379 | 00000000000000000079 | 19.467922333931785 | t | 2023-01-30 07:13:51.714834 + 080 | 0380 | 0380 | 380 | 00000000000000000080 | 19.493588689617926 | t | 2023-01-30 07:13:51.716337 + 081 | 0381 | 0381 | 381 | 00000000000000000081 | 19.519221295943137 | t | 2023-01-30 07:13:51.721344 + 082 | 0382 | 0382 | 382 | 00000000000000000082 | 19.544820285692065 | t | 2023-01-30 07:13:51.722294 + 083 | 0383 | 0383 | 383 | 00000000000000000083 | 19.570385790780925 | t | 2023-01-30 07:13:51.723464 + 084 | 0384 | 0384 | 384 | 00000000000000000084 | 19.595917942265423 | t | 2023-01-30 07:13:51.724414 + 085 | 0385 | 0385 | 385 | 00000000000000000085 | 19.621416870348583 | t | 2023-01-30 07:13:51.725348 + 086 | 0386 | 0386 | 386 | 00000000000000000086 | 19.6468827043885 | t | 2023-01-30 07:13:51.726238 + 087 | 0387 | 0387 | 387 | 00000000000000000087 | 19.672315572906 | t | 2023-01-30 07:13:51.727218 + 088 | 0388 | 0388 | 388 | 00000000000000000088 | 19.697715603592208 | t | 2023-01-30 07:13:51.728273 + 089 | 0389 | 0389 | 389 | 00000000000000000089 | 19.72308292331602 | t | 2023-01-30 07:13:51.729209 + 090 | 0390 | 0390 | 390 | 00000000000000000090 | 19.748417658131498 | t | 2023-01-30 07:13:51.730127 + 091 | 0391 | 0391 | 391 | 00000000000000000091 | 19.77371993328519 | t | 2023-01-30 07:13:51.731139 + 092 | 0392 | 0392 | 392 | 00000000000000000092 | 19.79898987322333 | t | 2023-01-30 07:13:51.732383 + 093 | 0393 | 0393 | 393 | 00000000000000000093 | 19.82422760159901 | t | 2023-01-30 07:13:51.73347 + 094 | 0394 | 0394 | 394 | 00000000000000000094 | 19.849433241279208 | t | 2023-01-30 07:13:51.734691 + 095 | 0395 | 0395 | 395 | 00000000000000000095 | 19.87460691435179 | t | 2023-01-30 07:13:51.735973 + 096 | 0396 | 0396 | 396 | 00000000000000000096 | 19.8997487421324 | t | 2023-01-30 07:13:51.73719 + 097 | 0397 | 0397 | 397 | 00000000000000000097 | 19.924858845171276 | t | 2023-01-30 07:13:51.738289 + 098 | 0398 | 0398 | 398 | 00000000000000000098 | 19.949937343260004 | t | 2023-01-30 07:13:51.739373 + 099 | 0399 | 0399 | 399 | 00000000000000000099 | 19.974984355438178 | t | 2023-01-30 07:13:51.740254 + 000 | 0400 | 0400 | 400 | 00000000000000000000 | 20 | t | 2023-01-30 07:13:51.741184 + 001 | 0401 | 0401 | 401 | 00000000000000000001 | 20.024984394500787 | t | 2023-01-30 07:13:51.742048 + 002 | 0402 | 0402 | 402 | 00000000000000000002 | 20.049937655763422 | t | 2023-01-30 07:13:51.743185 + 003 | 0403 | 0403 | 403 | 00000000000000000003 | 20.074859899884732 | t | 2023-01-30 07:13:51.74418 + 004 | 0404 | 0404 | 404 | 00000000000000000004 | 20.09975124224178 | t | 2023-01-30 07:13:51.745257 + 005 | 0405 | 0405 | 405 | 00000000000000000005 | 20.12461179749811 | t | 2023-01-30 07:13:51.746255 + 006 | 0406 | 0406 | 406 | 00000000000000000006 | 20.149441679609886 | t | 2023-01-30 07:13:51.747419 + 007 | 0407 | 0407 | 407 | 00000000000000000007 | 20.174241001832016 | t | 2023-01-30 07:13:51.748601 + 008 | 0408 | 0408 | 408 | 00000000000000000008 | 20.199009876724155 | t | 2023-01-30 07:13:51.749587 + 009 | 0409 | 0409 | 409 | 00000000000000000009 | 20.223748416156685 | t | 2023-01-30 07:13:51.750553 + 010 | 0410 | 0410 | 410 | 00000000000000000010 | 20.248456731316587 | t | 2023-01-30 07:13:51.751622 + 011 | 0411 | 0411 | 411 | 00000000000000000011 | 20.273134932713294 | t | 2023-01-30 07:13:51.752626 + 012 | 0412 | 0412 | 412 | 00000000000000000012 | 20.29778313018444 | t | 2023-01-30 07:13:51.754294 + 013 | 0413 | 0413 | 413 | 00000000000000000013 | 20.322401432901575 | t | 2023-01-30 07:13:51.760357 + 014 | 0414 | 0414 | 414 | 00000000000000000014 | 20.346989949375804 | t | 2023-01-30 07:13:51.761772 + 015 | 0415 | 0415 | 415 | 00000000000000000015 | 20.37154878746336 | t | 2023-01-30 07:13:51.763002 + 016 | 0416 | 0416 | 416 | 00000000000000000016 | 20.396078054371138 | t | 2023-01-30 07:13:51.764841 + 017 | 0417 | 0417 | 417 | 00000000000000000017 | 20.42057785666214 | t | 2023-01-30 07:13:51.766178 + 018 | 0418 | 0418 | 418 | 00000000000000000018 | 20.445048300260872 | t | 2023-01-30 07:13:51.775887 + 019 | 0419 | 0419 | 419 | 00000000000000000019 | 20.46948949045872 | t | 2023-01-30 07:13:51.777826 + 020 | 0420 | 0420 | 420 | 00000000000000000020 | 20.493901531919196 | t | 2023-01-30 07:13:51.779171 + 021 | 0421 | 0421 | 421 | 00000000000000000021 | 20.518284528683193 | t | 2023-01-30 07:13:51.780506 + 022 | 0422 | 0422 | 422 | 00000000000000000022 | 20.54263858417414 | t | 2023-01-30 07:13:51.781709 + 023 | 0423 | 0423 | 423 | 00000000000000000023 | 20.566963801203133 | t | 2023-01-30 07:13:51.782722 + 024 | 0424 | 0424 | 424 | 00000000000000000024 | 20.591260281974 | t | 2023-01-30 07:13:51.783614 + 025 | 0425 | 0425 | 425 | 00000000000000000025 | 20.615528128088304 | t | 2023-01-30 07:13:51.784584 + 026 | 0426 | 0426 | 426 | 00000000000000000026 | 20.639767440550294 | t | 2023-01-30 07:13:51.785507 + 027 | 0427 | 0427 | 427 | 00000000000000000027 | 20.663978319771825 | t | 2023-01-30 07:13:51.786507 + 028 | 0428 | 0428 | 428 | 00000000000000000028 | 20.688160865577203 | t | 2023-01-30 07:13:51.787484 + 029 | 0429 | 0429 | 429 | 00000000000000000029 | 20.71231517720798 | t | 2023-01-30 07:13:51.788429 + 030 | 0430 | 0430 | 430 | 00000000000000000030 | 20.73644135332772 | t | 2023-01-30 07:13:51.789327 + 031 | 0431 | 0431 | 431 | 00000000000000000031 | 20.760539492026695 | t | 2023-01-30 07:13:51.790365 + 032 | 0432 | 0432 | 432 | 00000000000000000032 | 20.784609690826528 | t | 2023-01-30 07:13:51.791288 + 033 | 0433 | 0433 | 433 | 00000000000000000033 | 20.808652046684813 | t | 2023-01-30 07:13:51.792195 + 034 | 0434 | 0434 | 434 | 00000000000000000034 | 20.83266665599966 | t | 2023-01-30 07:13:51.79329 + 035 | 0435 | 0435 | 435 | 00000000000000000035 | 20.85665361461421 | t | 2023-01-30 07:13:51.794231 + 036 | 0436 | 0436 | 436 | 00000000000000000036 | 20.8806130178211 | t | 2023-01-30 07:13:51.795343 + 037 | 0437 | 0437 | 437 | 00000000000000000037 | 20.904544960366874 | t | 2023-01-30 07:13:51.796376 + 038 | 0438 | 0438 | 438 | 00000000000000000038 | 20.92844953645635 | t | 2023-01-30 07:13:51.797366 + 039 | 0439 | 0439 | 439 | 00000000000000000039 | 20.952326839756964 | t | 2023-01-30 07:13:51.798368 + 040 | 0440 | 0440 | 440 | 00000000000000000040 | 20.97617696340303 | t | 2023-01-30 07:13:51.799389 + 041 | 0441 | 0441 | 441 | 00000000000000000041 | 21 | t | 2023-01-30 07:13:51.800416 + 042 | 0442 | 0442 | 442 | 00000000000000000042 | 21.02379604162864 | t | 2023-01-30 07:13:51.80155 + 043 | 0443 | 0443 | 443 | 00000000000000000043 | 21.047565179849187 | t | 2023-01-30 07:13:51.802671 + 044 | 0444 | 0444 | 444 | 00000000000000000044 | 21.071307505705477 | t | 2023-01-30 07:13:51.804054 + 045 | 0445 | 0445 | 445 | 00000000000000000045 | 21.095023109728988 | t | 2023-01-30 07:13:51.805479 + 046 | 0446 | 0446 | 446 | 00000000000000000046 | 21.118712081942874 | t | 2023-01-30 07:13:51.806523 + 047 | 0447 | 0447 | 447 | 00000000000000000047 | 21.142374511865974 | t | 2023-01-30 07:13:51.807717 + 048 | 0448 | 0448 | 448 | 00000000000000000048 | 21.166010488516726 | t | 2023-01-30 07:13:51.809013 + 049 | 0449 | 0449 | 449 | 00000000000000000049 | 21.18962010041709 | t | 2023-01-30 07:13:51.810056 + 050 | 0450 | 0450 | 450 | 00000000000000000050 | 21.213203435596427 | t | 2023-01-30 07:13:51.811056 + 051 | 0451 | 0451 | 451 | 00000000000000000051 | 21.236760581595302 | t | 2023-01-30 07:13:51.811998 + 052 | 0452 | 0452 | 452 | 00000000000000000052 | 21.2602916254693 | t | 2023-01-30 07:13:51.813033 + 053 | 0453 | 0453 | 453 | 00000000000000000053 | 21.283796653792763 | t | 2023-01-30 07:13:51.814004 + 054 | 0454 | 0454 | 454 | 00000000000000000054 | 21.307275752662516 | t | 2023-01-30 07:13:51.815021 + 055 | 0455 | 0455 | 455 | 00000000000000000055 | 21.330729007701542 | t | 2023-01-30 07:13:51.816042 + 056 | 0456 | 0456 | 456 | 00000000000000000056 | 21.354156504062622 | t | 2023-01-30 07:13:51.817015 + 057 | 0457 | 0457 | 457 | 00000000000000000057 | 21.37755832643195 | t | 2023-01-30 07:13:51.817994 + 058 | 0458 | 0458 | 458 | 00000000000000000058 | 21.400934559032695 | t | 2023-01-30 07:13:51.819165 + 059 | 0459 | 0459 | 459 | 00000000000000000059 | 21.42428528562855 | t | 2023-01-30 07:13:51.820217 + 060 | 0460 | 0460 | 460 | 00000000000000000060 | 21.447610589527216 | t | 2023-01-30 07:13:51.821301 + 061 | 0461 | 0461 | 461 | 00000000000000000061 | 21.470910553583888 | t | 2023-01-30 07:13:51.822293 + 062 | 0462 | 0462 | 462 | 00000000000000000062 | 21.494185260204677 | t | 2023-01-30 07:13:51.823409 + 063 | 0463 | 0463 | 463 | 00000000000000000063 | 21.517434791350013 | t | 2023-01-30 07:13:51.824452 + 064 | 0464 | 0464 | 464 | 00000000000000000064 | 21.540659228538015 | t | 2023-01-30 07:13:51.825444 + 065 | 0465 | 0465 | 465 | 00000000000000000065 | 21.563858652847824 | t | 2023-01-30 07:13:51.826383 + 066 | 0466 | 0466 | 466 | 00000000000000000066 | 21.587033144922902 | t | 2023-01-30 07:13:51.827343 + 067 | 0467 | 0467 | 467 | 00000000000000000067 | 21.61018278497431 | t | 2023-01-30 07:13:51.828342 + 068 | 0468 | 0468 | 468 | 00000000000000000068 | 21.633307652783937 | t | 2023-01-30 07:13:51.82926 + 069 | 0469 | 0469 | 469 | 00000000000000000069 | 21.656407827707714 | t | 2023-01-30 07:13:51.830194 + 070 | 0470 | 0470 | 470 | 00000000000000000070 | 21.6794833886788 | t | 2023-01-30 07:13:51.831455 + 071 | 0471 | 0471 | 471 | 00000000000000000071 | 21.702534414210707 | t | 2023-01-30 07:13:51.832444 + 072 | 0472 | 0472 | 472 | 00000000000000000072 | 21.72556098240043 | t | 2023-01-30 07:13:51.833426 + 073 | 0473 | 0473 | 473 | 00000000000000000073 | 21.748563170931547 | t | 2023-01-30 07:13:51.834407 + 074 | 0474 | 0474 | 474 | 00000000000000000074 | 21.77154105707724 | t | 2023-01-30 07:13:51.835444 + 075 | 0475 | 0475 | 475 | 00000000000000000075 | 21.79449471770337 | t | 2023-01-30 07:13:51.836435 + 076 | 0476 | 0476 | 476 | 00000000000000000076 | 21.817424229271428 | t | 2023-01-30 07:13:51.837425 + 077 | 0477 | 0477 | 477 | 00000000000000000077 | 21.840329667841555 | t | 2023-01-30 07:13:51.838563 + 078 | 0478 | 0478 | 478 | 00000000000000000078 | 21.863211109075447 | t | 2023-01-30 07:13:51.839611 + 079 | 0479 | 0479 | 479 | 00000000000000000079 | 21.88606862823929 | t | 2023-01-30 07:13:51.840593 + 080 | 0480 | 0480 | 480 | 00000000000000000080 | 21.908902300206645 | t | 2023-01-30 07:13:51.841546 + 081 | 0481 | 0481 | 481 | 00000000000000000081 | 21.93171219946131 | t | 2023-01-30 07:13:51.84256 + 082 | 0482 | 0482 | 482 | 00000000000000000082 | 21.95449840010015 | t | 2023-01-30 07:13:51.843501 + 083 | 0483 | 0483 | 483 | 00000000000000000083 | 21.97726097583591 | t | 2023-01-30 07:13:51.844469 + 084 | 0484 | 0484 | 484 | 00000000000000000084 | 22 | t | 2023-01-30 07:13:51.845416 + 085 | 0485 | 0485 | 485 | 00000000000000000085 | 22.02271554554524 | t | 2023-01-30 07:13:51.846444 + 086 | 0486 | 0486 | 486 | 00000000000000000086 | 22.045407685048602 | t | 2023-01-30 07:13:51.847378 + 087 | 0487 | 0487 | 487 | 00000000000000000087 | 22.06807649071391 | t | 2023-01-30 07:13:51.848303 + 088 | 0488 | 0488 | 488 | 00000000000000000088 | 22.090722034374522 | t | 2023-01-30 07:13:51.849233 + 089 | 0489 | 0489 | 489 | 00000000000000000089 | 22.11334438749598 | t | 2023-01-30 07:13:51.850267 + 090 | 0490 | 0490 | 490 | 00000000000000000090 | 22.135943621178654 | t | 2023-01-30 07:13:51.851268 + 091 | 0491 | 0491 | 491 | 00000000000000000091 | 22.15851980616034 | t | 2023-01-30 07:13:51.852244 + 092 | 0492 | 0492 | 492 | 00000000000000000092 | 22.181073012818835 | t | 2023-01-30 07:13:51.853307 + 093 | 0493 | 0493 | 493 | 00000000000000000093 | 22.20360331117452 | t | 2023-01-30 07:13:51.854353 + 094 | 0494 | 0494 | 494 | 00000000000000000094 | 22.22611077089287 | t | 2023-01-30 07:13:51.855415 + 095 | 0495 | 0495 | 495 | 00000000000000000095 | 22.24859546128699 | t | 2023-01-30 07:13:51.856429 + 096 | 0496 | 0496 | 496 | 00000000000000000096 | 22.271057451320086 | t | 2023-01-30 07:13:51.857423 + 097 | 0497 | 0497 | 497 | 00000000000000000097 | 22.293496809607955 | t | 2023-01-30 07:13:51.858388 + 098 | 0498 | 0498 | 498 | 00000000000000000098 | 22.315913604421397 | t | 2023-01-30 07:13:51.859392 + 099 | 0499 | 0499 | 499 | 00000000000000000099 | 22.338307903688676 | t | 2023-01-30 07:13:51.860369 + 000 | 0500 | 0500 | 500 | 00000000000000000000 | 22.360679774997898 | t | 2023-01-30 07:13:51.861352 + 001 | 0501 | 0501 | 501 | 00000000000000000001 | 22.38302928559939 | t | 2023-01-30 07:13:51.862324 + 002 | 0502 | 0502 | 502 | 00000000000000000002 | 22.40535650240808 | t | 2023-01-30 07:13:51.863277 + 003 | 0503 | 0503 | 503 | 00000000000000000003 | 22.427661492005804 | t | 2023-01-30 07:13:51.864259 + 004 | 0504 | 0504 | 504 | 00000000000000000004 | 22.44994432064365 | t | 2023-01-30 07:13:51.865236 + 005 | 0505 | 0505 | 505 | 00000000000000000005 | 22.47220505424423 | t | 2023-01-30 07:13:51.8663 + 006 | 0506 | 0506 | 506 | 00000000000000000006 | 22.494443758403985 | t | 2023-01-30 07:13:51.867235 + 007 | 0507 | 0507 | 507 | 00000000000000000007 | 22.516660498395403 | t | 2023-01-30 07:13:51.868201 + 008 | 0508 | 0508 | 508 | 00000000000000000008 | 22.538855339169288 | t | 2023-01-30 07:13:51.869267 + 009 | 0509 | 0509 | 509 | 00000000000000000009 | 22.561028345356956 | t | 2023-01-30 07:13:51.870343 + 010 | 0510 | 0510 | 510 | 00000000000000000010 | 22.58317958127243 | t | 2023-01-30 07:13:51.871328 + 011 | 0511 | 0511 | 511 | 00000000000000000011 | 22.60530911091463 | t | 2023-01-30 07:13:51.87235 + 012 | 0512 | 0512 | 512 | 00000000000000000012 | 22.627416997969522 | t | 2023-01-30 07:13:51.873337 + 013 | 0513 | 0513 | 513 | 00000000000000000013 | 22.64950330581225 | t | 2023-01-30 07:13:51.8743 + 014 | 0514 | 0514 | 514 | 00000000000000000014 | 22.67156809750927 | t | 2023-01-30 07:13:51.875397 + 015 | 0515 | 0515 | 515 | 00000000000000000015 | 22.693611435820433 | t | 2023-01-30 07:13:51.87638 + 016 | 0516 | 0516 | 516 | 00000000000000000016 | 22.715633383201094 | t | 2023-01-30 07:13:51.877361 + 017 | 0517 | 0517 | 517 | 00000000000000000017 | 22.737634001804146 | t | 2023-01-30 07:13:51.878386 + 018 | 0518 | 0518 | 518 | 00000000000000000018 | 22.759613353482084 | t | 2023-01-30 07:13:51.879291 + 019 | 0519 | 0519 | 519 | 00000000000000000019 | 22.781571499789035 | t | 2023-01-30 07:13:51.880241 + 020 | 0520 | 0520 | 520 | 00000000000000000020 | 22.80350850198276 | t | 2023-01-30 07:13:51.881224 + 021 | 0521 | 0521 | 521 | 00000000000000000021 | 22.825424421026653 | t | 2023-01-30 07:13:51.882211 + 022 | 0522 | 0522 | 522 | 00000000000000000022 | 22.847319317591726 | t | 2023-01-30 07:13:51.883171 + 023 | 0523 | 0523 | 523 | 00000000000000000023 | 22.869193252058544 | t | 2023-01-30 07:13:51.884131 + 024 | 0524 | 0524 | 524 | 00000000000000000024 | 22.891046284519195 | t | 2023-01-30 07:13:51.885116 + 025 | 0525 | 0525 | 525 | 00000000000000000025 | 22.9128784747792 | t | 2023-01-30 07:13:51.88622 + 026 | 0526 | 0526 | 526 | 00000000000000000026 | 22.93468988235943 | t | 2023-01-30 07:13:51.88725 + 027 | 0527 | 0527 | 527 | 00000000000000000027 | 22.956480566497994 | t | 2023-01-30 07:13:51.888227 + 028 | 0528 | 0528 | 528 | 00000000000000000028 | 22.978250586152114 | t | 2023-01-30 07:13:51.889221 + 029 | 0529 | 0529 | 529 | 00000000000000000029 | 23 | t | 2023-01-30 07:13:51.890225 + 030 | 0530 | 0530 | 530 | 00000000000000000030 | 23.021728866442675 | t | 2023-01-30 07:13:51.891222 + 031 | 0531 | 0531 | 531 | 00000000000000000031 | 23.043437243605826 | t | 2023-01-30 07:13:51.892194 + 032 | 0532 | 0532 | 532 | 00000000000000000032 | 23.065125189341593 | t | 2023-01-30 07:13:51.893149 + 033 | 0533 | 0533 | 533 | 00000000000000000033 | 23.08679276123039 | t | 2023-01-30 07:13:51.894115 + 034 | 0534 | 0534 | 534 | 00000000000000000034 | 23.108440016582687 | t | 2023-01-30 07:13:51.895041 + 035 | 0535 | 0535 | 535 | 00000000000000000035 | 23.130067012440755 | t | 2023-01-30 07:13:51.895999 + 036 | 0536 | 0536 | 536 | 00000000000000000036 | 23.15167380558045 | t | 2023-01-30 07:13:51.896903 + 037 | 0537 | 0537 | 537 | 00000000000000000037 | 23.173260452512935 | t | 2023-01-30 07:13:51.897891 + 038 | 0538 | 0538 | 538 | 00000000000000000038 | 23.194827009486403 | t | 2023-01-30 07:13:51.898959 + 039 | 0539 | 0539 | 539 | 00000000000000000039 | 23.2163735324878 | t | 2023-01-30 07:13:51.899954 + 040 | 0540 | 0540 | 540 | 00000000000000000040 | 23.2379000772445 | t | 2023-01-30 07:13:51.900908 + 041 | 0541 | 0541 | 541 | 00000000000000000041 | 23.259406699226016 | t | 2023-01-30 07:13:51.902139 + 042 | 0542 | 0542 | 542 | 00000000000000000042 | 23.280893453645632 | t | 2023-01-30 07:13:51.903252 + 043 | 0543 | 0543 | 543 | 00000000000000000043 | 23.302360395462088 | t | 2023-01-30 07:13:51.904328 + 044 | 0544 | 0544 | 544 | 00000000000000000044 | 23.323807579381203 | t | 2023-01-30 07:13:51.905467 + 045 | 0545 | 0545 | 545 | 00000000000000000045 | 23.345235059857504 | t | 2023-01-30 07:13:51.906531 + 046 | 0546 | 0546 | 546 | 00000000000000000046 | 23.366642891095847 | t | 2023-01-30 07:13:51.907529 + 047 | 0547 | 0547 | 547 | 00000000000000000047 | 23.388031127053 | t | 2023-01-30 07:13:51.908524 + 048 | 0548 | 0548 | 548 | 00000000000000000048 | 23.40939982143925 | t | 2023-01-30 07:13:51.909464 + 049 | 0549 | 0549 | 549 | 00000000000000000049 | 23.430749027719962 | t | 2023-01-30 07:13:51.910526 + 050 | 0550 | 0550 | 550 | 00000000000000000050 | 23.45207879911715 | t | 2023-01-30 07:13:51.91142 + 051 | 0551 | 0551 | 551 | 00000000000000000051 | 23.473389188611005 | t | 2023-01-30 07:13:51.912368 + 052 | 0552 | 0552 | 552 | 00000000000000000052 | 23.49468024894146 | t | 2023-01-30 07:13:51.913351 + 053 | 0553 | 0553 | 553 | 00000000000000000053 | 23.515952032609693 | t | 2023-01-30 07:13:51.914302 + 054 | 0554 | 0554 | 554 | 00000000000000000054 | 23.53720459187964 | t | 2023-01-30 07:13:51.915303 + 055 | 0555 | 0555 | 555 | 00000000000000000055 | 23.558437978779494 | t | 2023-01-30 07:13:51.91626 + 056 | 0556 | 0556 | 556 | 00000000000000000056 | 23.57965224510319 | t | 2023-01-30 07:13:51.917206 + 057 | 0557 | 0557 | 557 | 00000000000000000057 | 23.600847442411894 | t | 2023-01-30 07:13:51.918146 + 058 | 0558 | 0558 | 558 | 00000000000000000058 | 23.62202362203543 | t | 2023-01-30 07:13:51.919111 + 059 | 0559 | 0559 | 559 | 00000000000000000059 | 23.643180835073778 | t | 2023-01-30 07:13:51.920137 + 060 | 0560 | 0560 | 560 | 00000000000000000060 | 23.664319132398465 | t | 2023-01-30 07:13:51.921105 + 061 | 0561 | 0561 | 561 | 00000000000000000061 | 23.68543856465402 | t | 2023-01-30 07:13:51.922033 + 062 | 0562 | 0562 | 562 | 00000000000000000062 | 23.706539182259394 | t | 2023-01-30 07:13:51.922988 + 063 | 0563 | 0563 | 563 | 00000000000000000063 | 23.727621035409346 | t | 2023-01-30 07:13:51.923966 + 064 | 0564 | 0564 | 564 | 00000000000000000064 | 23.748684174075834 | t | 2023-01-30 07:13:51.924933 + 065 | 0565 | 0565 | 565 | 00000000000000000065 | 23.769728648009426 | t | 2023-01-30 07:13:51.925911 + 066 | 0566 | 0566 | 566 | 00000000000000000066 | 23.790754506740637 | t | 2023-01-30 07:13:51.926924 + 067 | 0567 | 0567 | 567 | 00000000000000000067 | 23.811761799581316 | t | 2023-01-30 07:13:51.927866 + 068 | 0568 | 0568 | 568 | 00000000000000000068 | 23.83275057562597 | t | 2023-01-30 07:13:51.928866 + 069 | 0569 | 0569 | 569 | 00000000000000000069 | 23.853720883753127 | t | 2023-01-30 07:13:51.929821 + 070 | 0570 | 0570 | 570 | 00000000000000000070 | 23.874672772626646 | t | 2023-01-30 07:13:51.930827 + 071 | 0571 | 0571 | 571 | 00000000000000000071 | 23.895606290697042 | t | 2023-01-30 07:13:51.931782 + 072 | 0572 | 0572 | 572 | 00000000000000000072 | 23.916521486202797 | t | 2023-01-30 07:13:51.932884 + 073 | 0573 | 0573 | 573 | 00000000000000000073 | 23.93741840717165 | t | 2023-01-30 07:13:51.933834 + 074 | 0574 | 0574 | 574 | 00000000000000000074 | 23.958297101421877 | t | 2023-01-30 07:13:51.93479 + 075 | 0575 | 0575 | 575 | 00000000000000000075 | 23.979157616563597 | t | 2023-01-30 07:13:51.935812 + 076 | 0576 | 0576 | 576 | 00000000000000000076 | 24 | t | 2023-01-30 07:13:51.93677 + 077 | 0577 | 0577 | 577 | 00000000000000000077 | 24.020824298928627 | t | 2023-01-30 07:13:51.937973 + 078 | 0578 | 0578 | 578 | 00000000000000000078 | 24.041630560342615 | t | 2023-01-30 07:13:51.938974 + 079 | 0579 | 0579 | 579 | 00000000000000000079 | 24.06241883103193 | t | 2023-01-30 07:13:51.939913 + 080 | 0580 | 0580 | 580 | 00000000000000000080 | 24.08318915758459 | t | 2023-01-30 07:13:51.940859 + 081 | 0581 | 0581 | 581 | 00000000000000000081 | 24.1039415863879 | t | 2023-01-30 07:13:51.94182 + 082 | 0582 | 0582 | 582 | 00000000000000000082 | 24.124676163629637 | t | 2023-01-30 07:13:51.942811 + 083 | 0583 | 0583 | 583 | 00000000000000000083 | 24.145392935299274 | t | 2023-01-30 07:13:51.943795 + 084 | 0584 | 0584 | 584 | 00000000000000000084 | 24.166091947189145 | t | 2023-01-30 07:13:51.94475 + 085 | 0585 | 0585 | 585 | 00000000000000000085 | 24.186773244895647 | t | 2023-01-30 07:13:51.94565 + 086 | 0586 | 0586 | 586 | 00000000000000000086 | 24.20743687382041 | t | 2023-01-30 07:13:51.946604 + 087 | 0587 | 0587 | 587 | 00000000000000000087 | 24.228082879171435 | t | 2023-01-30 07:13:51.947588 + 088 | 0588 | 0588 | 588 | 00000000000000000088 | 24.24871130596428 | t | 2023-01-30 07:13:51.94853 + 089 | 0589 | 0589 | 589 | 00000000000000000089 | 24.269322199023193 | t | 2023-01-30 07:13:51.949448 + 090 | 0590 | 0590 | 590 | 00000000000000000090 | 24.289915602982237 | t | 2023-01-30 07:13:51.950473 + 091 | 0591 | 0591 | 591 | 00000000000000000091 | 24.310491562286437 | t | 2023-01-30 07:13:51.951529 + 092 | 0592 | 0592 | 592 | 00000000000000000092 | 24.331050121192877 | t | 2023-01-30 07:13:51.95252 + 093 | 0593 | 0593 | 593 | 00000000000000000093 | 24.351591323771842 | t | 2023-01-30 07:13:51.953515 + 094 | 0594 | 0594 | 594 | 00000000000000000094 | 24.372115213907882 | t | 2023-01-30 07:13:51.954522 + 095 | 0595 | 0595 | 595 | 00000000000000000095 | 24.392621835300936 | t | 2023-01-30 07:13:51.955543 + 096 | 0596 | 0596 | 596 | 00000000000000000096 | 24.413111231467404 | t | 2023-01-30 07:13:51.956494 + 097 | 0597 | 0597 | 597 | 00000000000000000097 | 24.43358344574123 | t | 2023-01-30 07:13:51.957449 + 098 | 0598 | 0598 | 598 | 00000000000000000098 | 24.454038521274967 | t | 2023-01-30 07:13:51.958355 + 099 | 0599 | 0599 | 599 | 00000000000000000099 | 24.474476501040833 | t | 2023-01-30 07:13:51.959272 + 000 | 0600 | 0600 | 600 | 00000000000000000000 | 24.49489742783178 | t | 2023-01-30 07:13:51.960216 + 001 | 0601 | 0601 | 601 | 00000000000000000001 | 24.515301344262525 | t | 2023-01-30 07:13:51.961298 + 002 | 0602 | 0602 | 602 | 00000000000000000002 | 24.535688292770594 | t | 2023-01-30 07:13:51.962375 + 003 | 0603 | 0603 | 603 | 00000000000000000003 | 24.55605831561735 | t | 2023-01-30 07:13:51.963365 + 004 | 0604 | 0604 | 604 | 00000000000000000004 | 24.576411454889016 | t | 2023-01-30 07:13:51.964399 + 005 | 0605 | 0605 | 605 | 00000000000000000005 | 24.596747752497688 | t | 2023-01-30 07:13:51.965411 + 006 | 0606 | 0606 | 606 | 00000000000000000006 | 24.61706725018234 | t | 2023-01-30 07:13:51.966494 + 007 | 0607 | 0607 | 607 | 00000000000000000007 | 24.63736998950984 | t | 2023-01-30 07:13:51.967435 + 008 | 0608 | 0608 | 608 | 00000000000000000008 | 24.657656011875904 | t | 2023-01-30 07:13:51.968404 + 009 | 0609 | 0609 | 609 | 00000000000000000009 | 24.677925358506133 | t | 2023-01-30 07:13:51.969432 + 010 | 0610 | 0610 | 610 | 00000000000000000010 | 24.698178070456937 | t | 2023-01-30 07:13:51.970492 + 011 | 0611 | 0611 | 611 | 00000000000000000011 | 24.71841418861655 | t | 2023-01-30 07:13:51.971543 + 012 | 0612 | 0612 | 612 | 00000000000000000012 | 24.73863375370596 | t | 2023-01-30 07:13:51.972534 + 013 | 0613 | 0613 | 613 | 00000000000000000013 | 24.758836806279895 | t | 2023-01-30 07:13:51.973624 + 014 | 0614 | 0614 | 614 | 00000000000000000014 | 24.779023386727733 | t | 2023-01-30 07:13:51.974642 + 015 | 0615 | 0615 | 615 | 00000000000000000015 | 24.79919353527449 | t | 2023-01-30 07:13:51.979846 + 016 | 0616 | 0616 | 616 | 00000000000000000016 | 24.819347291981714 | t | 2023-01-30 07:13:51.98115 + 017 | 0617 | 0617 | 617 | 00000000000000000017 | 24.839484696748443 | t | 2023-01-30 07:13:51.982271 + 018 | 0618 | 0618 | 618 | 00000000000000000018 | 24.859605789312106 | t | 2023-01-30 07:13:51.983323 + 019 | 0619 | 0619 | 619 | 00000000000000000019 | 24.879710609249457 | t | 2023-01-30 07:13:51.984297 + 020 | 0620 | 0620 | 620 | 00000000000000000020 | 24.899799195977465 | t | 2023-01-30 07:13:51.987351 + 021 | 0621 | 0621 | 621 | 00000000000000000021 | 24.919871588754223 | t | 2023-01-30 07:13:51.988536 + 022 | 0622 | 0622 | 622 | 00000000000000000022 | 24.939927826679853 | t | 2023-01-30 07:13:51.989663 + 023 | 0623 | 0623 | 623 | 00000000000000000023 | 24.95996794869737 | t | 2023-01-30 07:13:51.990842 + 024 | 0624 | 0624 | 624 | 00000000000000000024 | 24.979991993593593 | t | 2023-01-30 07:13:51.991932 + 025 | 0625 | 0625 | 625 | 00000000000000000025 | 25 | t | 2023-01-30 07:13:51.992984 + 026 | 0626 | 0626 | 626 | 00000000000000000026 | 25.019992006393608 | t | 2023-01-30 07:13:51.993976 + 027 | 0627 | 0627 | 627 | 00000000000000000027 | 25.03996805109783 | t | 2023-01-30 07:13:51.994946 + 028 | 0628 | 0628 | 628 | 00000000000000000028 | 25.059928172283335 | t | 2023-01-30 07:13:51.995943 + 029 | 0629 | 0629 | 629 | 00000000000000000029 | 25.079872407968907 | t | 2023-01-30 07:13:51.99692 + 030 | 0630 | 0630 | 630 | 00000000000000000030 | 25.099800796022265 | t | 2023-01-30 07:13:51.997953 + 031 | 0631 | 0631 | 631 | 00000000000000000031 | 25.11971337416094 | t | 2023-01-30 07:13:51.998993 + 032 | 0632 | 0632 | 632 | 00000000000000000032 | 25.13961017995307 | t | 2023-01-30 07:13:51.999993 + 033 | 0633 | 0633 | 633 | 00000000000000000033 | 25.15949125081825 | t | 2023-01-30 07:13:52.00093 + 034 | 0634 | 0634 | 634 | 00000000000000000034 | 25.179356624028344 | t | 2023-01-30 07:13:52.001921 + 035 | 0635 | 0635 | 635 | 00000000000000000035 | 25.199206336708304 | t | 2023-01-30 07:13:52.002933 + 036 | 0636 | 0636 | 636 | 00000000000000000036 | 25.219040425836983 | t | 2023-01-30 07:13:52.003938 + 037 | 0637 | 0637 | 637 | 00000000000000000037 | 25.238858928247925 | t | 2023-01-30 07:13:52.004969 + 038 | 0638 | 0638 | 638 | 00000000000000000038 | 25.25866188063018 | t | 2023-01-30 07:13:52.005963 + 039 | 0639 | 0639 | 639 | 00000000000000000039 | 25.278449319529077 | t | 2023-01-30 07:13:52.00696 + 040 | 0640 | 0640 | 640 | 00000000000000000040 | 25.298221281347036 | t | 2023-01-30 07:13:52.007973 + 041 | 0641 | 0641 | 641 | 00000000000000000041 | 25.317977802344327 | t | 2023-01-30 07:13:52.008935 + 042 | 0642 | 0642 | 642 | 00000000000000000042 | 25.337718918639855 | t | 2023-01-30 07:13:52.009883 + 043 | 0643 | 0643 | 643 | 00000000000000000043 | 25.357444666211933 | t | 2023-01-30 07:13:52.010893 + 044 | 0644 | 0644 | 644 | 00000000000000000044 | 25.37715508089904 | t | 2023-01-30 07:13:52.011878 + 045 | 0645 | 0645 | 645 | 00000000000000000045 | 25.39685019840059 | t | 2023-01-30 07:13:52.012861 + 046 | 0646 | 0646 | 646 | 00000000000000000046 | 25.41653005427767 | t | 2023-01-30 07:13:52.013926 + 047 | 0647 | 0647 | 647 | 00000000000000000047 | 25.436194683953808 | t | 2023-01-30 07:13:52.014915 + 048 | 0648 | 0648 | 648 | 00000000000000000048 | 25.45584412271571 | t | 2023-01-30 07:13:52.016029 + 049 | 0649 | 0649 | 649 | 00000000000000000049 | 25.475478405713993 | t | 2023-01-30 07:13:52.016981 + 050 | 0650 | 0650 | 650 | 00000000000000000050 | 25.495097567963924 | t | 2023-01-30 07:13:52.017946 + 051 | 0651 | 0651 | 651 | 00000000000000000051 | 25.514701644346147 | t | 2023-01-30 07:13:52.018952 + 052 | 0652 | 0652 | 652 | 00000000000000000052 | 25.534290669607408 | t | 2023-01-30 07:13:52.019951 + 053 | 0653 | 0653 | 653 | 00000000000000000053 | 25.553864678361276 | t | 2023-01-30 07:13:52.020925 + 054 | 0654 | 0654 | 654 | 00000000000000000054 | 25.573423705088842 | t | 2023-01-30 07:13:52.021928 + 055 | 0655 | 0655 | 655 | 00000000000000000055 | 25.592967784139454 | t | 2023-01-30 07:13:52.022962 + 056 | 0656 | 0656 | 656 | 00000000000000000056 | 25.612496949731394 | t | 2023-01-30 07:13:52.023897 + 057 | 0657 | 0657 | 657 | 00000000000000000057 | 25.632011235952593 | t | 2023-01-30 07:13:52.025104 + 058 | 0658 | 0658 | 658 | 00000000000000000058 | 25.65151067676132 | t | 2023-01-30 07:13:52.026124 + 059 | 0659 | 0659 | 659 | 00000000000000000059 | 25.67099530598687 | t | 2023-01-30 07:13:52.027057 + 060 | 0660 | 0660 | 660 | 00000000000000000060 | 25.69046515733026 | t | 2023-01-30 07:13:52.028135 + 061 | 0661 | 0661 | 661 | 00000000000000000061 | 25.709920264364882 | t | 2023-01-30 07:13:52.029118 + 062 | 0662 | 0662 | 662 | 00000000000000000062 | 25.729360660537214 | t | 2023-01-30 07:13:52.030095 + 063 | 0663 | 0663 | 663 | 00000000000000000063 | 25.748786379167466 | t | 2023-01-30 07:13:52.031141 + 064 | 0664 | 0664 | 664 | 00000000000000000064 | 25.768197453450252 | t | 2023-01-30 07:13:52.032148 + 065 | 0665 | 0665 | 665 | 00000000000000000065 | 25.787593916455254 | t | 2023-01-30 07:13:52.03316 + 066 | 0666 | 0666 | 666 | 00000000000000000066 | 25.80697580112788 | t | 2023-01-30 07:13:52.034136 + 067 | 0667 | 0667 | 667 | 00000000000000000067 | 25.826343140289914 | t | 2023-01-30 07:13:52.035137 + 068 | 0668 | 0668 | 668 | 00000000000000000068 | 25.84569596664017 | t | 2023-01-30 07:13:52.036273 + 069 | 0669 | 0669 | 669 | 00000000000000000069 | 25.865034312755125 | t | 2023-01-30 07:13:52.037473 + 070 | 0670 | 0670 | 670 | 00000000000000000070 | 25.88435821108957 | t | 2023-01-30 07:13:52.038646 + 071 | 0671 | 0671 | 671 | 00000000000000000071 | 25.903667693977237 | t | 2023-01-30 07:13:52.039781 + 072 | 0672 | 0672 | 672 | 00000000000000000072 | 25.92296279363144 | t | 2023-01-30 07:13:52.041112 + 073 | 0673 | 0673 | 673 | 00000000000000000073 | 25.942243542145693 | t | 2023-01-30 07:13:52.042091 + 074 | 0674 | 0674 | 674 | 00000000000000000074 | 25.96150997149434 | t | 2023-01-30 07:13:52.043102 + 075 | 0675 | 0675 | 675 | 00000000000000000075 | 25.98076211353316 | t | 2023-01-30 07:13:52.044024 + 076 | 0676 | 0676 | 676 | 00000000000000000076 | 26 | t | 2023-01-30 07:13:52.045055 + 077 | 0677 | 0677 | 677 | 00000000000000000077 | 26.019223662515376 | t | 2023-01-30 07:13:52.046053 + 078 | 0678 | 0678 | 678 | 00000000000000000078 | 26.038433132583073 | t | 2023-01-30 07:13:52.047056 + 079 | 0679 | 0679 | 679 | 00000000000000000079 | 26.057628441590765 | t | 2023-01-30 07:13:52.048037 + 080 | 0680 | 0680 | 680 | 00000000000000000080 | 26.076809620810597 | t | 2023-01-30 07:13:52.049103 + 081 | 0681 | 0681 | 681 | 00000000000000000081 | 26.095976701399778 | t | 2023-01-30 07:13:52.050208 + 082 | 0682 | 0682 | 682 | 00000000000000000082 | 26.115129714401192 | t | 2023-01-30 07:13:52.051262 + 083 | 0683 | 0683 | 683 | 00000000000000000083 | 26.13426869074396 | t | 2023-01-30 07:13:52.052251 + 084 | 0684 | 0684 | 684 | 00000000000000000084 | 26.153393661244042 | t | 2023-01-30 07:13:52.053581 + 085 | 0685 | 0685 | 685 | 00000000000000000085 | 26.1725046566048 | t | 2023-01-30 07:13:52.054603 + 086 | 0686 | 0686 | 686 | 00000000000000000086 | 26.19160170741759 | t | 2023-01-30 07:13:52.059641 + 087 | 0687 | 0687 | 687 | 00000000000000000087 | 26.210684844162312 | t | 2023-01-30 07:13:52.060748 + 088 | 0688 | 0688 | 688 | 00000000000000000088 | 26.229754097208 | t | 2023-01-30 07:13:52.062072 + 089 | 0689 | 0689 | 689 | 00000000000000000089 | 26.248809496813376 | t | 2023-01-30 07:13:52.063241 + 090 | 0690 | 0690 | 690 | 00000000000000000090 | 26.267851073127396 | t | 2023-01-30 07:13:52.064615 + 091 | 0691 | 0691 | 691 | 00000000000000000091 | 26.28687885618983 | t | 2023-01-30 07:13:52.065745 + 092 | 0692 | 0692 | 692 | 00000000000000000092 | 26.30589287593181 | t | 2023-01-30 07:13:52.066797 + 093 | 0693 | 0693 | 693 | 00000000000000000093 | 26.324893162176366 | t | 2023-01-30 07:13:52.068039 + 094 | 0694 | 0694 | 694 | 00000000000000000094 | 26.343879744638983 | t | 2023-01-30 07:13:52.069362 + 095 | 0695 | 0695 | 695 | 00000000000000000095 | 26.362852652928137 | t | 2023-01-30 07:13:52.070507 + 096 | 0696 | 0696 | 696 | 00000000000000000096 | 26.38181191654584 | t | 2023-01-30 07:13:52.071511 + 097 | 0697 | 0697 | 697 | 00000000000000000097 | 26.40075756488817 | t | 2023-01-30 07:13:52.072591 + 098 | 0698 | 0698 | 698 | 00000000000000000098 | 26.419689627245813 | t | 2023-01-30 07:13:52.073656 + 099 | 0699 | 0699 | 699 | 00000000000000000099 | 26.43860813280457 | t | 2023-01-30 07:13:52.074731 + 000 | 0700 | 0700 | 700 | 00000000000000000000 | 26.457513110645905 | t | 2023-01-30 07:13:52.075737 + 001 | 0701 | 0701 | 701 | 00000000000000000001 | 26.476404589747453 | t | 2023-01-30 07:13:52.076772 + 002 | 0702 | 0702 | 702 | 00000000000000000002 | 26.49528259898354 | t | 2023-01-30 07:13:52.077899 + 003 | 0703 | 0703 | 703 | 00000000000000000003 | 26.514147167125703 | t | 2023-01-30 07:13:52.078975 + 004 | 0704 | 0704 | 704 | 00000000000000000004 | 26.5329983228432 | t | 2023-01-30 07:13:52.079985 + 005 | 0705 | 0705 | 705 | 00000000000000000005 | 26.551836094703507 | t | 2023-01-30 07:13:52.081059 + 006 | 0706 | 0706 | 706 | 00000000000000000006 | 26.570660511172846 | t | 2023-01-30 07:13:52.082134 + 007 | 0707 | 0707 | 707 | 00000000000000000007 | 26.589471600616662 | t | 2023-01-30 07:13:52.08314 + 008 | 0708 | 0708 | 708 | 00000000000000000008 | 26.60826939130014 | t | 2023-01-30 07:13:52.084272 + 009 | 0709 | 0709 | 709 | 00000000000000000009 | 26.627053911388696 | t | 2023-01-30 07:13:52.085314 + 010 | 0710 | 0710 | 710 | 00000000000000000010 | 26.645825188948457 | t | 2023-01-30 07:13:52.086383 + 011 | 0711 | 0711 | 711 | 00000000000000000011 | 26.664583251946766 | t | 2023-01-30 07:13:52.087419 + 012 | 0712 | 0712 | 712 | 00000000000000000012 | 26.68332812825267 | t | 2023-01-30 07:13:52.088445 + 013 | 0713 | 0713 | 713 | 00000000000000000013 | 26.70205984563738 | t | 2023-01-30 07:13:52.089526 + 014 | 0714 | 0714 | 714 | 00000000000000000014 | 26.720778431774775 | t | 2023-01-30 07:13:52.090581 + 015 | 0715 | 0715 | 715 | 00000000000000000015 | 26.739483914241877 | t | 2023-01-30 07:13:52.091627 + 016 | 0716 | 0716 | 716 | 00000000000000000016 | 26.758176320519304 | t | 2023-01-30 07:13:52.092666 + 017 | 0717 | 0717 | 717 | 00000000000000000017 | 26.77685567799177 | t | 2023-01-30 07:13:52.093661 + 018 | 0718 | 0718 | 718 | 00000000000000000018 | 26.795522013948524 | t | 2023-01-30 07:13:52.094736 + 019 | 0719 | 0719 | 719 | 00000000000000000019 | 26.814175355583846 | t | 2023-01-30 07:13:52.09576 + 020 | 0720 | 0720 | 720 | 00000000000000000020 | 26.832815729997478 | t | 2023-01-30 07:13:52.096739 + 021 | 0721 | 0721 | 721 | 00000000000000000021 | 26.851443164195103 | t | 2023-01-30 07:13:52.097745 + 022 | 0722 | 0722 | 722 | 00000000000000000022 | 26.870057685088806 | t | 2023-01-30 07:13:52.098817 + 023 | 0723 | 0723 | 723 | 00000000000000000023 | 26.888659319497503 | t | 2023-01-30 07:13:52.099796 + 024 | 0724 | 0724 | 724 | 00000000000000000024 | 26.90724809414742 | t | 2023-01-30 07:13:52.100852 + 025 | 0725 | 0725 | 725 | 00000000000000000025 | 26.92582403567252 | t | 2023-01-30 07:13:52.101912 + 026 | 0726 | 0726 | 726 | 00000000000000000026 | 26.94438717061496 | t | 2023-01-30 07:13:52.102949 + 027 | 0727 | 0727 | 727 | 00000000000000000027 | 26.962937525425527 | t | 2023-01-30 07:13:52.103935 + 028 | 0728 | 0728 | 728 | 00000000000000000028 | 26.981475126464083 | t | 2023-01-30 07:13:52.104959 + 029 | 0729 | 0729 | 729 | 00000000000000000029 | 27 | t | 2023-01-30 07:13:52.105855 + 030 | 0730 | 0730 | 730 | 00000000000000000030 | 27.018512172212592 | t | 2023-01-30 07:13:52.106823 + 031 | 0731 | 0731 | 731 | 00000000000000000031 | 27.03701166919155 | t | 2023-01-30 07:13:52.107834 + 032 | 0732 | 0732 | 732 | 00000000000000000032 | 27.055498516937366 | t | 2023-01-30 07:13:52.108783 + 033 | 0733 | 0733 | 733 | 00000000000000000033 | 27.073972741361768 | t | 2023-01-30 07:13:52.109764 + 034 | 0734 | 0734 | 734 | 00000000000000000034 | 27.09243436828813 | t | 2023-01-30 07:13:52.110704 + 035 | 0735 | 0735 | 735 | 00000000000000000035 | 27.110883423451916 | t | 2023-01-30 07:13:52.111667 + 036 | 0736 | 0736 | 736 | 00000000000000000036 | 27.129319932501073 | t | 2023-01-30 07:13:52.112675 + 037 | 0737 | 0737 | 737 | 00000000000000000037 | 27.147743920996454 | t | 2023-01-30 07:13:52.113696 + 038 | 0738 | 0738 | 738 | 00000000000000000038 | 27.16615541441225 | t | 2023-01-30 07:13:52.114691 + 039 | 0739 | 0739 | 739 | 00000000000000000039 | 27.184554438136374 | t | 2023-01-30 07:13:52.115622 + 040 | 0740 | 0740 | 740 | 00000000000000000040 | 27.202941017470888 | t | 2023-01-30 07:13:52.116612 + 041 | 0741 | 0741 | 741 | 00000000000000000041 | 27.2213151776324 | t | 2023-01-30 07:13:52.117622 + 042 | 0742 | 0742 | 742 | 00000000000000000042 | 27.23967694375247 | t | 2023-01-30 07:13:52.118593 + 043 | 0743 | 0743 | 743 | 00000000000000000043 | 27.258026340878022 | t | 2023-01-30 07:13:52.119676 + 044 | 0744 | 0744 | 744 | 00000000000000000044 | 27.27636339397171 | t | 2023-01-30 07:13:52.120672 + 045 | 0745 | 0745 | 745 | 00000000000000000045 | 27.294688127912362 | t | 2023-01-30 07:13:52.12169 + 046 | 0746 | 0746 | 746 | 00000000000000000046 | 27.313000567495326 | t | 2023-01-30 07:13:52.12273 + 047 | 0747 | 0747 | 747 | 00000000000000000047 | 27.331300737432898 | t | 2023-01-30 07:13:52.123688 + 048 | 0748 | 0748 | 748 | 00000000000000000048 | 27.349588662354687 | t | 2023-01-30 07:13:52.12487 + 049 | 0749 | 0749 | 749 | 00000000000000000049 | 27.367864366808018 | t | 2023-01-30 07:13:52.126026 + 050 | 0750 | 0750 | 750 | 00000000000000000050 | 27.386127875258307 | t | 2023-01-30 07:13:52.127121 + 051 | 0751 | 0751 | 751 | 00000000000000000051 | 27.40437921208944 | t | 2023-01-30 07:13:52.128193 + 052 | 0752 | 0752 | 752 | 00000000000000000052 | 27.422618401604176 | t | 2023-01-30 07:13:52.129249 + 053 | 0753 | 0753 | 753 | 00000000000000000053 | 27.440845468024488 | t | 2023-01-30 07:13:52.13034 + 054 | 0754 | 0754 | 754 | 00000000000000000054 | 27.459060435491963 | t | 2023-01-30 07:13:52.131526 + 055 | 0755 | 0755 | 755 | 00000000000000000055 | 27.477263328068172 | t | 2023-01-30 07:13:52.132651 + 056 | 0756 | 0756 | 756 | 00000000000000000056 | 27.49545416973504 | t | 2023-01-30 07:13:52.133879 + 057 | 0757 | 0757 | 757 | 00000000000000000057 | 27.51363298439521 | t | 2023-01-30 07:13:52.135103 + 058 | 0758 | 0758 | 758 | 00000000000000000058 | 27.53179979587241 | t | 2023-01-30 07:13:52.136382 + 059 | 0759 | 0759 | 759 | 00000000000000000059 | 27.54995462791182 | t | 2023-01-30 07:13:52.137513 + 060 | 0760 | 0760 | 760 | 00000000000000000060 | 27.568097504180443 | t | 2023-01-30 07:13:52.138504 + 061 | 0761 | 0761 | 761 | 00000000000000000061 | 27.586228448267445 | t | 2023-01-30 07:13:52.139507 + 062 | 0762 | 0762 | 762 | 00000000000000000062 | 27.60434748368452 | t | 2023-01-30 07:13:52.140537 + 063 | 0763 | 0763 | 763 | 00000000000000000063 | 27.622454633866266 | t | 2023-01-30 07:13:52.141584 + 064 | 0764 | 0764 | 764 | 00000000000000000064 | 27.640549922170507 | t | 2023-01-30 07:13:52.142536 + 065 | 0765 | 0765 | 765 | 00000000000000000065 | 27.65863337187866 | t | 2023-01-30 07:13:52.143579 + 066 | 0766 | 0766 | 766 | 00000000000000000066 | 27.676705006196094 | t | 2023-01-30 07:13:52.14458 + 067 | 0767 | 0767 | 767 | 00000000000000000067 | 27.694764848252458 | t | 2023-01-30 07:13:52.145494 + 068 | 0768 | 0768 | 768 | 00000000000000000068 | 27.712812921102035 | t | 2023-01-30 07:13:52.146513 + 069 | 0769 | 0769 | 769 | 00000000000000000069 | 27.730849247724095 | t | 2023-01-30 07:13:52.147468 + 070 | 0770 | 0770 | 770 | 00000000000000000070 | 27.748873851023216 | t | 2023-01-30 07:13:52.148515 + 071 | 0771 | 0771 | 771 | 00000000000000000071 | 27.76688675382964 | t | 2023-01-30 07:13:52.149552 + 072 | 0772 | 0772 | 772 | 00000000000000000072 | 27.784887978899608 | t | 2023-01-30 07:13:52.150494 + 073 | 0773 | 0773 | 773 | 00000000000000000073 | 27.80287754891569 | t | 2023-01-30 07:13:52.151477 + 074 | 0774 | 0774 | 774 | 00000000000000000074 | 27.820855486487112 | t | 2023-01-30 07:13:52.152641 + 075 | 0775 | 0775 | 775 | 00000000000000000075 | 27.83882181415011 | t | 2023-01-30 07:13:52.15367 + 076 | 0776 | 0776 | 776 | 00000000000000000076 | 27.85677655436824 | t | 2023-01-30 07:13:52.154636 + 077 | 0777 | 0777 | 777 | 00000000000000000077 | 27.874719729532707 | t | 2023-01-30 07:13:52.15571 + 078 | 0778 | 0778 | 778 | 00000000000000000078 | 27.892651361962706 | t | 2023-01-30 07:13:52.15674 + 079 | 0779 | 0779 | 779 | 00000000000000000079 | 27.910571473905726 | t | 2023-01-30 07:13:52.157736 + 080 | 0780 | 0780 | 780 | 00000000000000000080 | 27.92848008753788 | t | 2023-01-30 07:13:52.158704 + 081 | 0781 | 0781 | 781 | 00000000000000000081 | 27.94637722496424 | t | 2023-01-30 07:13:52.159675 + 082 | 0782 | 0782 | 782 | 00000000000000000082 | 27.964262908219126 | t | 2023-01-30 07:13:52.160775 + 083 | 0783 | 0783 | 783 | 00000000000000000083 | 27.982137159266443 | t | 2023-01-30 07:13:52.161846 + 084 | 0784 | 0784 | 784 | 00000000000000000084 | 28 | t | 2023-01-30 07:13:52.162808 + 085 | 0785 | 0785 | 785 | 00000000000000000085 | 28.0178514522438 | t | 2023-01-30 07:13:52.163821 + 086 | 0786 | 0786 | 786 | 00000000000000000086 | 28.035691537752374 | t | 2023-01-30 07:13:52.164863 + 087 | 0787 | 0787 | 787 | 00000000000000000087 | 28.053520278211074 | t | 2023-01-30 07:13:52.165871 + 088 | 0788 | 0788 | 788 | 00000000000000000088 | 28.071337695236398 | t | 2023-01-30 07:13:52.166877 + 089 | 0789 | 0789 | 789 | 00000000000000000089 | 28.089143810376278 | t | 2023-01-30 07:13:52.167855 + 090 | 0790 | 0790 | 790 | 00000000000000000090 | 28.106938645110393 | t | 2023-01-30 07:13:52.168906 + 091 | 0791 | 0791 | 791 | 00000000000000000091 | 28.124722220850465 | t | 2023-01-30 07:13:52.169921 + 092 | 0792 | 0792 | 792 | 00000000000000000092 | 28.142494558940577 | t | 2023-01-30 07:13:52.171015 + 093 | 0793 | 0793 | 793 | 00000000000000000093 | 28.160255680657446 | t | 2023-01-30 07:13:52.172129 + 094 | 0794 | 0794 | 794 | 00000000000000000094 | 28.178005607210743 | t | 2023-01-30 07:13:52.173136 + 095 | 0795 | 0795 | 795 | 00000000000000000095 | 28.19574435974337 | t | 2023-01-30 07:13:52.174094 + 096 | 0796 | 0796 | 796 | 00000000000000000096 | 28.21347195933177 | t | 2023-01-30 07:13:52.175076 + 097 | 0797 | 0797 | 797 | 00000000000000000097 | 28.231188426986208 | t | 2023-01-30 07:13:52.176117 + 098 | 0798 | 0798 | 798 | 00000000000000000098 | 28.24889378365107 | t | 2023-01-30 07:13:52.177097 + 099 | 0799 | 0799 | 799 | 00000000000000000099 | 28.26658805020514 | t | 2023-01-30 07:13:52.178058 + 000 | 0800 | 0800 | 800 | 00000000000000000000 | 28.284271247461902 | t | 2023-01-30 07:13:52.179124 + 001 | 0801 | 0801 | 801 | 00000000000000000001 | 28.30194339616981 | t | 2023-01-30 07:13:52.180222 + 002 | 0802 | 0802 | 802 | 00000000000000000002 | 28.319604517012593 | t | 2023-01-30 07:13:52.181303 + 003 | 0803 | 0803 | 803 | 00000000000000000003 | 28.337254630609507 | t | 2023-01-30 07:13:52.182475 + 004 | 0804 | 0804 | 804 | 00000000000000000004 | 28.35489375751565 | t | 2023-01-30 07:13:52.183488 + 005 | 0805 | 0805 | 805 | 00000000000000000005 | 28.372521918222215 | t | 2023-01-30 07:13:52.184446 + 006 | 0806 | 0806 | 806 | 00000000000000000006 | 28.39013913315678 | t | 2023-01-30 07:13:52.185526 + 007 | 0807 | 0807 | 807 | 00000000000000000007 | 28.407745422683583 | t | 2023-01-30 07:13:52.186522 + 008 | 0808 | 0808 | 808 | 00000000000000000008 | 28.42534080710379 | t | 2023-01-30 07:13:52.187529 + 009 | 0809 | 0809 | 809 | 00000000000000000009 | 28.442925306655784 | t | 2023-01-30 07:13:52.188585 + 010 | 0810 | 0810 | 810 | 00000000000000000010 | 28.460498941515414 | t | 2023-01-30 07:13:52.189645 + 011 | 0811 | 0811 | 811 | 00000000000000000011 | 28.478061731796284 | t | 2023-01-30 07:13:52.190698 + 012 | 0812 | 0812 | 812 | 00000000000000000012 | 28.495613697550013 | t | 2023-01-30 07:13:52.191696 + 013 | 0813 | 0813 | 813 | 00000000000000000013 | 28.513154858766505 | t | 2023-01-30 07:13:52.192745 + 014 | 0814 | 0814 | 814 | 00000000000000000014 | 28.53068523537421 | t | 2023-01-30 07:13:52.193672 + 015 | 0815 | 0815 | 815 | 00000000000000000015 | 28.548204847240395 | t | 2023-01-30 07:13:52.194702 + 016 | 0816 | 0816 | 816 | 00000000000000000016 | 28.5657137141714 | t | 2023-01-30 07:13:52.195667 + 017 | 0817 | 0817 | 817 | 00000000000000000017 | 28.583211855912904 | t | 2023-01-30 07:13:52.196682 + 018 | 0818 | 0818 | 818 | 00000000000000000018 | 28.600699292150182 | t | 2023-01-30 07:13:52.197632 + 019 | 0819 | 0819 | 819 | 00000000000000000019 | 28.61817604250837 | t | 2023-01-30 07:13:52.198599 + 020 | 0820 | 0820 | 820 | 00000000000000000020 | 28.635642126552707 | t | 2023-01-30 07:13:52.199644 + 021 | 0821 | 0821 | 821 | 00000000000000000021 | 28.653097563788805 | t | 2023-01-30 07:13:52.200558 + 022 | 0822 | 0822 | 822 | 00000000000000000022 | 28.6705423736629 | t | 2023-01-30 07:13:52.201563 + 023 | 0823 | 0823 | 823 | 00000000000000000023 | 28.687976575562104 | t | 2023-01-30 07:13:52.20254 + 024 | 0824 | 0824 | 824 | 00000000000000000024 | 28.705400188814647 | t | 2023-01-30 07:13:52.203558 + 025 | 0825 | 0825 | 825 | 00000000000000000025 | 28.722813232690143 | t | 2023-01-30 07:13:52.209734 + 026 | 0826 | 0826 | 826 | 00000000000000000026 | 28.74021572639983 | t | 2023-01-30 07:13:52.21121 + 027 | 0827 | 0827 | 827 | 00000000000000000027 | 28.75760768909681 | t | 2023-01-30 07:13:52.212625 + 028 | 0828 | 0828 | 828 | 00000000000000000028 | 28.77498913987632 | t | 2023-01-30 07:13:52.214128 + 029 | 0829 | 0829 | 829 | 00000000000000000029 | 28.792360097775937 | t | 2023-01-30 07:13:52.215371 + 030 | 0830 | 0830 | 830 | 00000000000000000030 | 28.809720581775867 | t | 2023-01-30 07:13:52.216597 + 031 | 0831 | 0831 | 831 | 00000000000000000031 | 28.827070610799147 | t | 2023-01-30 07:13:52.217979 + 032 | 0832 | 0832 | 832 | 00000000000000000032 | 28.844410203711913 | t | 2023-01-30 07:13:52.219226 + 033 | 0833 | 0833 | 833 | 00000000000000000033 | 28.861739379323623 | t | 2023-01-30 07:13:52.220369 + 034 | 0834 | 0834 | 834 | 00000000000000000034 | 28.879058156387302 | t | 2023-01-30 07:13:52.221552 + 035 | 0835 | 0835 | 835 | 00000000000000000035 | 28.89636655359978 | t | 2023-01-30 07:13:52.222648 + 036 | 0836 | 0836 | 836 | 00000000000000000036 | 28.91366458960192 | t | 2023-01-30 07:13:52.223756 + 037 | 0837 | 0837 | 837 | 00000000000000000037 | 28.930952282978865 | t | 2023-01-30 07:13:52.224747 + 038 | 0838 | 0838 | 838 | 00000000000000000038 | 28.948229652260256 | t | 2023-01-30 07:13:52.225823 + 039 | 0839 | 0839 | 839 | 00000000000000000039 | 28.965496715920477 | t | 2023-01-30 07:13:52.226992 + 040 | 0840 | 0840 | 840 | 00000000000000000040 | 28.982753492378876 | t | 2023-01-30 07:13:52.228047 + 041 | 0841 | 0841 | 841 | 00000000000000000041 | 29 | t | 2023-01-30 07:13:52.229003 + 042 | 0842 | 0842 | 842 | 00000000000000000042 | 29.017236257093817 | t | 2023-01-30 07:13:52.230129 + 043 | 0843 | 0843 | 843 | 00000000000000000043 | 29.03446228191595 | t | 2023-01-30 07:13:52.231128 + 044 | 0844 | 0844 | 844 | 00000000000000000044 | 29.0516780926679 | t | 2023-01-30 07:13:52.232174 + 045 | 0845 | 0845 | 845 | 00000000000000000045 | 29.068883707497267 | t | 2023-01-30 07:13:52.233414 + 046 | 0846 | 0846 | 846 | 00000000000000000046 | 29.086079144497972 | t | 2023-01-30 07:13:52.234546 + 047 | 0847 | 0847 | 847 | 00000000000000000047 | 29.103264421710495 | t | 2023-01-30 07:13:52.23549 + 048 | 0848 | 0848 | 848 | 00000000000000000048 | 29.120439557122072 | t | 2023-01-30 07:13:52.236648 + 049 | 0849 | 0849 | 849 | 00000000000000000049 | 29.13760456866693 | t | 2023-01-30 07:13:52.237617 + 050 | 0850 | 0850 | 850 | 00000000000000000050 | 29.154759474226502 | t | 2023-01-30 07:13:52.238605 + 051 | 0851 | 0851 | 851 | 00000000000000000051 | 29.171904291629644 | t | 2023-01-30 07:13:52.239691 + 052 | 0852 | 0852 | 852 | 00000000000000000052 | 29.189039038652847 | t | 2023-01-30 07:13:52.240615 + 053 | 0853 | 0853 | 853 | 00000000000000000053 | 29.206163733020468 | t | 2023-01-30 07:13:52.241587 + 054 | 0854 | 0854 | 854 | 00000000000000000054 | 29.223278392404914 | t | 2023-01-30 07:13:52.242688 + 055 | 0855 | 0855 | 855 | 00000000000000000055 | 29.24038303442689 | t | 2023-01-30 07:13:52.243932 + 056 | 0856 | 0856 | 856 | 00000000000000000056 | 29.257477676655586 | t | 2023-01-30 07:13:52.244904 + 057 | 0857 | 0857 | 857 | 00000000000000000057 | 29.274562336608895 | t | 2023-01-30 07:13:52.246056 + 058 | 0858 | 0858 | 858 | 00000000000000000058 | 29.29163703175362 | t | 2023-01-30 07:13:52.247165 + 059 | 0859 | 0859 | 859 | 00000000000000000059 | 29.30870177950569 | t | 2023-01-30 07:13:52.248337 + 060 | 0860 | 0860 | 860 | 00000000000000000060 | 29.32575659723036 | t | 2023-01-30 07:13:52.249388 + 061 | 0861 | 0861 | 861 | 00000000000000000061 | 29.34280150224242 | t | 2023-01-30 07:13:52.250345 + 062 | 0862 | 0862 | 862 | 00000000000000000062 | 29.359836511806396 | t | 2023-01-30 07:13:52.251302 + 063 | 0863 | 0863 | 863 | 00000000000000000063 | 29.376861643136763 | t | 2023-01-30 07:13:52.252347 + 064 | 0864 | 0864 | 864 | 00000000000000000064 | 29.393876913398138 | t | 2023-01-30 07:13:52.253524 + 065 | 0865 | 0865 | 865 | 00000000000000000065 | 29.410882339705484 | t | 2023-01-30 07:13:52.254551 + 066 | 0866 | 0866 | 866 | 00000000000000000066 | 29.427877939124322 | t | 2023-01-30 07:13:52.255552 + 067 | 0867 | 0867 | 867 | 00000000000000000067 | 29.444863728670914 | t | 2023-01-30 07:13:52.25652 + 068 | 0868 | 0868 | 868 | 00000000000000000068 | 29.46183972531247 | t | 2023-01-30 07:13:52.25749 + 069 | 0869 | 0869 | 869 | 00000000000000000069 | 29.478805945967352 | t | 2023-01-30 07:13:52.258396 + 070 | 0870 | 0870 | 870 | 00000000000000000070 | 29.49576240750525 | t | 2023-01-30 07:13:52.259423 + 071 | 0871 | 0871 | 871 | 00000000000000000071 | 29.512709126747414 | t | 2023-01-30 07:13:52.260389 + 072 | 0872 | 0872 | 872 | 00000000000000000072 | 29.5296461204668 | t | 2023-01-30 07:13:52.261332 + 073 | 0873 | 0873 | 873 | 00000000000000000073 | 29.546573405388315 | t | 2023-01-30 07:13:52.262401 + 074 | 0874 | 0874 | 874 | 00000000000000000074 | 29.563490998188964 | t | 2023-01-30 07:13:52.263358 + 075 | 0875 | 0875 | 875 | 00000000000000000075 | 29.58039891549808 | t | 2023-01-30 07:13:52.26432 + 076 | 0876 | 0876 | 876 | 00000000000000000076 | 29.597297173897484 | t | 2023-01-30 07:13:52.265273 + 077 | 0877 | 0877 | 877 | 00000000000000000077 | 29.614185789921695 | t | 2023-01-30 07:13:52.266226 + 078 | 0878 | 0878 | 878 | 00000000000000000078 | 29.631064780058107 | t | 2023-01-30 07:13:52.267166 + 079 | 0879 | 0879 | 879 | 00000000000000000079 | 29.647934160747187 | t | 2023-01-30 07:13:52.268193 + 080 | 0880 | 0880 | 880 | 00000000000000000080 | 29.664793948382652 | t | 2023-01-30 07:13:52.269401 + 081 | 0881 | 0881 | 881 | 00000000000000000081 | 29.68164415931166 | t | 2023-01-30 07:13:52.270514 + 082 | 0882 | 0882 | 882 | 00000000000000000082 | 29.698484809834994 | t | 2023-01-30 07:13:52.271536 + 083 | 0883 | 0883 | 883 | 00000000000000000083 | 29.715315916207253 | t | 2023-01-30 07:13:52.272546 + 084 | 0884 | 0884 | 884 | 00000000000000000084 | 29.732137494637012 | t | 2023-01-30 07:13:52.273752 + 085 | 0885 | 0885 | 885 | 00000000000000000085 | 29.748949561287034 | t | 2023-01-30 07:13:52.274699 + 086 | 0886 | 0886 | 886 | 00000000000000000086 | 29.765752132274432 | t | 2023-01-30 07:13:52.275726 + 087 | 0887 | 0887 | 887 | 00000000000000000087 | 29.782545223670862 | t | 2023-01-30 07:13:52.276702 + 088 | 0888 | 0888 | 888 | 00000000000000000088 | 29.79932885150268 | t | 2023-01-30 07:13:52.277778 + 089 | 0889 | 0889 | 889 | 00000000000000000089 | 29.816103031751148 | t | 2023-01-30 07:13:52.278897 + 090 | 0890 | 0890 | 890 | 00000000000000000090 | 29.832867780352597 | t | 2023-01-30 07:13:52.279873 + 091 | 0891 | 0891 | 891 | 00000000000000000091 | 29.8496231131986 | t | 2023-01-30 07:13:52.280855 + 092 | 0892 | 0892 | 892 | 00000000000000000092 | 29.866369046136157 | t | 2023-01-30 07:13:52.282145 + 093 | 0893 | 0893 | 893 | 00000000000000000093 | 29.88310559496787 | t | 2023-01-30 07:13:52.283189 + 094 | 0894 | 0894 | 894 | 00000000000000000094 | 29.899832775452108 | t | 2023-01-30 07:13:52.284219 + 095 | 0895 | 0895 | 895 | 00000000000000000095 | 29.916550603303182 | t | 2023-01-30 07:13:52.285366 + 096 | 0896 | 0896 | 896 | 00000000000000000096 | 29.93325909419153 | t | 2023-01-30 07:13:52.286404 + 097 | 0897 | 0897 | 897 | 00000000000000000097 | 29.949958263743873 | t | 2023-01-30 07:13:52.2874 + 098 | 0898 | 0898 | 898 | 00000000000000000098 | 29.966648127543394 | t | 2023-01-30 07:13:52.28859 + 099 | 0899 | 0899 | 899 | 00000000000000000099 | 29.9833287011299 | t | 2023-01-30 07:13:52.289658 + 000 | 0900 | 0900 | 900 | 00000000000000000000 | 30 | t | 2023-01-30 07:13:52.29073 + 001 | 0901 | 0901 | 901 | 00000000000000000001 | 30.01666203960727 | t | 2023-01-30 07:13:52.291776 + 002 | 0902 | 0902 | 902 | 00000000000000000002 | 30.033314835362415 | t | 2023-01-30 07:13:52.292795 + 003 | 0903 | 0903 | 903 | 00000000000000000003 | 30.04995840263344 | t | 2023-01-30 07:13:52.293766 + 004 | 0904 | 0904 | 904 | 00000000000000000004 | 30.066592756745816 | t | 2023-01-30 07:13:52.294836 + 005 | 0905 | 0905 | 905 | 00000000000000000005 | 30.083217912982647 | t | 2023-01-30 07:13:52.295865 + 006 | 0906 | 0906 | 906 | 00000000000000000006 | 30.099833886584822 | t | 2023-01-30 07:13:52.296925 + 007 | 0907 | 0907 | 907 | 00000000000000000007 | 30.116440692751194 | t | 2023-01-30 07:13:52.298013 + 008 | 0908 | 0908 | 908 | 00000000000000000008 | 30.133038346638727 | t | 2023-01-30 07:13:52.29899 + 009 | 0909 | 0909 | 909 | 00000000000000000009 | 30.14962686336267 | t | 2023-01-30 07:13:52.300178 + 010 | 0910 | 0910 | 910 | 00000000000000000010 | 30.166206257996713 | t | 2023-01-30 07:13:52.301198 + 011 | 0911 | 0911 | 911 | 00000000000000000011 | 30.18277654557314 | t | 2023-01-30 07:13:52.302281 + 012 | 0912 | 0912 | 912 | 00000000000000000012 | 30.199337741083 | t | 2023-01-30 07:13:52.303292 + 013 | 0913 | 0913 | 913 | 00000000000000000013 | 30.215889859476256 | t | 2023-01-30 07:13:52.304265 + 014 | 0914 | 0914 | 914 | 00000000000000000014 | 30.23243291566195 | t | 2023-01-30 07:13:52.305269 + 015 | 0915 | 0915 | 915 | 00000000000000000015 | 30.24896692450835 | t | 2023-01-30 07:13:52.306293 + 016 | 0916 | 0916 | 916 | 00000000000000000016 | 30.265491900843113 | t | 2023-01-30 07:13:52.307439 + 017 | 0917 | 0917 | 917 | 00000000000000000017 | 30.28200785945344 | t | 2023-01-30 07:13:52.308426 + 018 | 0918 | 0918 | 918 | 00000000000000000018 | 30.298514815086232 | t | 2023-01-30 07:13:52.309384 + 019 | 0919 | 0919 | 919 | 00000000000000000019 | 30.315012782448235 | t | 2023-01-30 07:13:52.310381 + 020 | 0920 | 0920 | 920 | 00000000000000000020 | 30.331501776206203 | t | 2023-01-30 07:13:52.311411 + 021 | 0921 | 0921 | 921 | 00000000000000000021 | 30.347981810987037 | t | 2023-01-30 07:13:52.312463 + 022 | 0922 | 0922 | 922 | 00000000000000000022 | 30.364452901377952 | t | 2023-01-30 07:13:52.313521 + 023 | 0923 | 0923 | 923 | 00000000000000000023 | 30.380915061926625 | t | 2023-01-30 07:13:52.314533 + 024 | 0924 | 0924 | 924 | 00000000000000000024 | 30.397368307141328 | t | 2023-01-30 07:13:52.315652 + 025 | 0925 | 0925 | 925 | 00000000000000000025 | 30.4138126514911 | t | 2023-01-30 07:13:52.316654 + 026 | 0926 | 0926 | 926 | 00000000000000000026 | 30.430248109405877 | t | 2023-01-30 07:13:52.317689 + 027 | 0927 | 0927 | 927 | 00000000000000000027 | 30.44667469527666 | t | 2023-01-30 07:13:52.318788 + 028 | 0928 | 0928 | 928 | 00000000000000000028 | 30.463092423455635 | t | 2023-01-30 07:13:52.319901 + 029 | 0929 | 0929 | 929 | 00000000000000000029 | 30.479501308256342 | t | 2023-01-30 07:13:52.321008 + 030 | 0930 | 0930 | 930 | 00000000000000000030 | 30.495901363953813 | t | 2023-01-30 07:13:52.322152 + 031 | 0931 | 0931 | 931 | 00000000000000000031 | 30.512292604784715 | t | 2023-01-30 07:13:52.32321 + 032 | 0932 | 0932 | 932 | 00000000000000000032 | 30.528675044947494 | t | 2023-01-30 07:13:52.32417 + 033 | 0933 | 0933 | 933 | 00000000000000000033 | 30.54504869860253 | t | 2023-01-30 07:13:52.325177 + 034 | 0934 | 0934 | 934 | 00000000000000000034 | 30.56141357987225 | t | 2023-01-30 07:13:52.326251 + 035 | 0935 | 0935 | 935 | 00000000000000000035 | 30.577769702841312 | t | 2023-01-30 07:13:52.327179 + 036 | 0936 | 0936 | 936 | 00000000000000000036 | 30.59411708155671 | t | 2023-01-30 07:13:52.328072 + 037 | 0937 | 0937 | 937 | 00000000000000000037 | 30.610455730027933 | t | 2023-01-30 07:13:52.329167 + 038 | 0938 | 0938 | 938 | 00000000000000000038 | 30.62678566222711 | t | 2023-01-30 07:13:52.330409 + 039 | 0939 | 0939 | 939 | 00000000000000000039 | 30.643106892089126 | t | 2023-01-30 07:13:52.331506 + 040 | 0940 | 0940 | 940 | 00000000000000000040 | 30.659419433511783 | t | 2023-01-30 07:13:52.332527 + 041 | 0941 | 0941 | 941 | 00000000000000000041 | 30.675723300355934 | t | 2023-01-30 07:13:52.333491 + 042 | 0942 | 0942 | 942 | 00000000000000000042 | 30.692018506445613 | t | 2023-01-30 07:13:52.33455 + 043 | 0943 | 0943 | 943 | 00000000000000000043 | 30.708305065568176 | t | 2023-01-30 07:13:52.335506 + 044 | 0944 | 0944 | 944 | 00000000000000000044 | 30.72458299147443 | t | 2023-01-30 07:13:52.336577 + 045 | 0945 | 0945 | 945 | 00000000000000000045 | 30.740852297878796 | t | 2023-01-30 07:13:52.337586 + 046 | 0946 | 0946 | 946 | 00000000000000000046 | 30.757112998459398 | t | 2023-01-30 07:13:52.338576 + 047 | 0947 | 0947 | 947 | 00000000000000000047 | 30.773365106858236 | t | 2023-01-30 07:13:52.339563 + 048 | 0948 | 0948 | 948 | 00000000000000000048 | 30.789608636681304 | t | 2023-01-30 07:13:52.340463 + 049 | 0949 | 0949 | 949 | 00000000000000000049 | 30.805843601498726 | t | 2023-01-30 07:13:52.341574 + 050 | 0950 | 0950 | 950 | 00000000000000000050 | 30.822070014844883 | t | 2023-01-30 07:13:52.342635 + 051 | 0951 | 0951 | 951 | 00000000000000000051 | 30.83828789021855 | t | 2023-01-30 07:13:52.3436 + 052 | 0952 | 0952 | 952 | 00000000000000000052 | 30.854497241083024 | t | 2023-01-30 07:13:52.344632 + 053 | 0953 | 0953 | 953 | 00000000000000000053 | 30.870698080866262 | t | 2023-01-30 07:13:52.345601 + 054 | 0954 | 0954 | 954 | 00000000000000000054 | 30.886890422961002 | t | 2023-01-30 07:13:52.346759 + 055 | 0955 | 0955 | 955 | 00000000000000000055 | 30.903074280724887 | t | 2023-01-30 07:13:52.347715 + 056 | 0956 | 0956 | 956 | 00000000000000000056 | 30.919249667480614 | t | 2023-01-30 07:13:52.348735 + 057 | 0957 | 0957 | 957 | 00000000000000000057 | 30.93541659651604 | t | 2023-01-30 07:13:52.349726 + 058 | 0958 | 0958 | 958 | 00000000000000000058 | 30.95157508108432 | t | 2023-01-30 07:13:52.350646 + 059 | 0959 | 0959 | 959 | 00000000000000000059 | 30.967725134404045 | t | 2023-01-30 07:13:52.351733 + 060 | 0960 | 0960 | 960 | 00000000000000000060 | 30.983866769659336 | t | 2023-01-30 07:13:52.352762 + 061 | 0961 | 0961 | 961 | 00000000000000000061 | 31 | t | 2023-01-30 07:13:52.353892 + 062 | 0962 | 0962 | 962 | 00000000000000000062 | 31.016124838541646 | t | 2023-01-30 07:13:52.354857 + 063 | 0963 | 0963 | 963 | 00000000000000000063 | 31.0322412983658 | t | 2023-01-30 07:13:52.355874 + 064 | 0964 | 0964 | 964 | 00000000000000000064 | 31.04834939252005 | t | 2023-01-30 07:13:52.356959 + 065 | 0965 | 0965 | 965 | 00000000000000000065 | 31.064449134018133 | t | 2023-01-30 07:13:52.357957 + 066 | 0966 | 0966 | 966 | 00000000000000000066 | 31.080540535840107 | t | 2023-01-30 07:13:52.358991 + 067 | 0967 | 0967 | 967 | 00000000000000000067 | 31.096623610932426 | t | 2023-01-30 07:13:52.359945 + 068 | 0968 | 0968 | 968 | 00000000000000000068 | 31.11269837220809 | t | 2023-01-30 07:13:52.36089 + 069 | 0969 | 0969 | 969 | 00000000000000000069 | 31.12876483254676 | t | 2023-01-30 07:13:52.361923 + 070 | 0970 | 0970 | 970 | 00000000000000000070 | 31.144823004794873 | t | 2023-01-30 07:13:52.362842 + 071 | 0971 | 0971 | 971 | 00000000000000000071 | 31.160872901765767 | t | 2023-01-30 07:13:52.363831 + 072 | 0972 | 0972 | 972 | 00000000000000000072 | 31.176914536239792 | t | 2023-01-30 07:13:52.364821 + 073 | 0973 | 0973 | 973 | 00000000000000000073 | 31.192947920964443 | t | 2023-01-30 07:13:52.365778 + 074 | 0974 | 0974 | 974 | 00000000000000000074 | 31.20897306865447 | t | 2023-01-30 07:13:52.366722 + 075 | 0975 | 0975 | 975 | 00000000000000000075 | 31.22498999199199 | t | 2023-01-30 07:13:52.367652 + 076 | 0976 | 0976 | 976 | 00000000000000000076 | 31.240998703626616 | t | 2023-01-30 07:13:52.368632 + 077 | 0977 | 0977 | 977 | 00000000000000000077 | 31.25699921617557 | t | 2023-01-30 07:13:52.369568 + 078 | 0978 | 0978 | 978 | 00000000000000000078 | 31.272991542223778 | t | 2023-01-30 07:13:52.370656 + 079 | 0979 | 0979 | 979 | 00000000000000000079 | 31.28897569432403 | t | 2023-01-30 07:13:52.371631 + 080 | 0980 | 0980 | 980 | 00000000000000000080 | 31.304951684997057 | t | 2023-01-30 07:13:52.372955 + 081 | 0981 | 0981 | 981 | 00000000000000000081 | 31.32091952673165 | t | 2023-01-30 07:13:52.374112 + 082 | 0982 | 0982 | 982 | 00000000000000000082 | 31.336879231984796 | t | 2023-01-30 07:13:52.375219 + 083 | 0983 | 0983 | 983 | 00000000000000000083 | 31.352830813181765 | t | 2023-01-30 07:13:52.376123 + 084 | 0984 | 0984 | 984 | 00000000000000000084 | 31.368774282716245 | t | 2023-01-30 07:13:52.37713 + 085 | 0985 | 0985 | 985 | 00000000000000000085 | 31.38470965295043 | t | 2023-01-30 07:13:52.378211 + 086 | 0986 | 0986 | 986 | 00000000000000000086 | 31.400636936215164 | t | 2023-01-30 07:13:52.379115 + 087 | 0987 | 0987 | 987 | 00000000000000000087 | 31.416556144810016 | t | 2023-01-30 07:13:52.380061 + 088 | 0988 | 0988 | 988 | 00000000000000000088 | 31.432467291003423 | t | 2023-01-30 07:13:52.381042 + 089 | 0989 | 0989 | 989 | 00000000000000000089 | 31.448370387032774 | t | 2023-01-30 07:13:52.382098 + 090 | 0990 | 0990 | 990 | 00000000000000000090 | 31.464265445104548 | t | 2023-01-30 07:13:52.382986 + 091 | 0991 | 0991 | 991 | 00000000000000000091 | 31.480152477394387 | t | 2023-01-30 07:13:52.384046 + 092 | 0992 | 0992 | 992 | 00000000000000000092 | 31.496031496047245 | t | 2023-01-30 07:13:52.385043 + 093 | 0993 | 0993 | 993 | 00000000000000000093 | 31.51190251317746 | t | 2023-01-30 07:13:52.385973 + 094 | 0994 | 0994 | 994 | 00000000000000000094 | 31.52776554086889 | t | 2023-01-30 07:13:52.386991 + 095 | 0995 | 0995 | 995 | 00000000000000000095 | 31.54362059117501 | t | 2023-01-30 07:13:52.387976 + 096 | 0996 | 0996 | 996 | 00000000000000000096 | 31.559467676119 | t | 2023-01-30 07:13:52.388911 + 097 | 0997 | 0997 | 997 | 00000000000000000097 | 31.575306807693888 | t | 2023-01-30 07:13:52.389871 + 098 | 0998 | 0998 | 998 | 00000000000000000098 | 31.591137997862628 | t | 2023-01-30 07:13:52.390781 + 099 | 0999 | 0999 | 999 | 00000000000000000099 | 31.606961258558215 | t | 2023-01-30 07:13:52.391694 + 000 | 0000 | 1000 | 1000 | 00000000000000000000 | 31.622776601683793 | t | 2023-01-30 07:13:52.392603 +(1000 rows) + +Time: 35.013 ms +-- clean-up +--Testcase 36: +DELETE FROM tbl1; +Time: 17.687 ms +-- +-- batch size 10 +-- +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +Time: 0.630 ms +--Testcase 37: +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; +Time: 180.099 ms +-- checking all record is inserted +--Testcase 38: +SELECT count(*) FROM tbl1; + count +------- + 1000 +(1 row) + +Time: 38.174 ms +-- clean-up +--Testcase 39: +DELETE FROM tbl1; +Time: 15.573 ms +-- +-- batch size 1000 +-- +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '1000'); +Time: 0.557 ms +--Testcase 40: +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; +Time: 121.167 ms +-- checking all record is inserted +--Testcase 41: +SELECT count(*) FROM tbl1; + count +------- + 1000 +(1 row) + +Time: 25.238 ms +-- clean-up +--Testcase 42: +DELETE FROM tbl1; +Time: 14.640 ms +-- +-- batch size 5000 +-- +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '5000'); +Time: 0.744 ms +--Testcase 43: +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; +Time: 87.310 ms +-- checking all record is inserted +--Testcase 44: +SELECT count(*) FROM tbl1; + count +------- + 1000 +(1 row) + +Time: 17.392 ms +-- clean-up +--Testcase 45: +DELETE FROM tbl1; +Time: 18.062 ms +-- +-- batch size 20000 +-- +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '20000'); +Time: 1.195 ms +--Testcase 46: +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; +Time: 93.481 ms +-- checking all record is inserted +--Testcase 47: +SELECT count(*) FROM tbl1; + count +------- + 1000 +(1 row) + +Time: 22.890 ms +-- does not clean-up, using inserted data to test SELECT +-- =================================================================== +-- test for SELECT data +-- =================================================================== +-- select all column +--Testcase 48: +SELECT * FROM tbl1; + tag1 | tag2 | tag3 | c1 | c2 | c3 | c4 | time +------+------+------+------+----------------------+--------------------+----+---------------------------- + 001 | 0001 | 0001 | 1 | 00000000000000000001 | 1 | t | 2023-01-30 07:13:53.057435 + 002 | 0002 | 0002 | 2 | 00000000000000000002 | 1.4142135623730951 | t | 2023-01-30 07:13:53.05744 + 003 | 0003 | 0003 | 3 | 00000000000000000003 | 1.7320508075688772 | t | 2023-01-30 07:13:53.057444 + 004 | 0004 | 0004 | 4 | 00000000000000000004 | 2 | t | 2023-01-30 07:13:53.057447 + 005 | 0005 | 0005 | 5 | 00000000000000000005 | 2.23606797749979 | t | 2023-01-30 07:13:53.057451 + 006 | 0006 | 0006 | 6 | 00000000000000000006 | 2.449489742783178 | t | 2023-01-30 07:13:53.057454 + 007 | 0007 | 0007 | 7 | 00000000000000000007 | 2.6457513110645907 | t | 2023-01-30 07:13:53.057457 + 008 | 0008 | 0008 | 8 | 00000000000000000008 | 2.8284271247461903 | t | 2023-01-30 07:13:53.05746 + 009 | 0009 | 0009 | 9 | 00000000000000000009 | 3 | t | 2023-01-30 07:13:53.057463 + 010 | 0010 | 0010 | 10 | 00000000000000000010 | 3.1622776601683795 | t | 2023-01-30 07:13:53.057466 + 011 | 0011 | 0011 | 11 | 00000000000000000011 | 3.3166247903554 | t | 2023-01-30 07:13:53.05747 + 012 | 0012 | 0012 | 12 | 00000000000000000012 | 3.4641016151377544 | t | 2023-01-30 07:13:53.057473 + 013 | 0013 | 0013 | 13 | 00000000000000000013 | 3.605551275463989 | t | 2023-01-30 07:13:53.057476 + 014 | 0014 | 0014 | 14 | 00000000000000000014 | 3.7416573867739413 | t | 2023-01-30 07:13:53.057479 + 015 | 0015 | 0015 | 15 | 00000000000000000015 | 3.872983346207417 | t | 2023-01-30 07:13:53.057482 + 016 | 0016 | 0016 | 16 | 00000000000000000016 | 4 | t | 2023-01-30 07:13:53.057486 + 017 | 0017 | 0017 | 17 | 00000000000000000017 | 4.123105625617661 | t | 2023-01-30 07:13:53.057489 + 018 | 0018 | 0018 | 18 | 00000000000000000018 | 4.242640687119285 | t | 2023-01-30 07:13:53.057494 + 019 | 0019 | 0019 | 19 | 00000000000000000019 | 4.358898943540674 | t | 2023-01-30 07:13:53.057497 + 020 | 0020 | 0020 | 20 | 00000000000000000020 | 4.47213595499958 | t | 2023-01-30 07:13:53.057501 + 021 | 0021 | 0021 | 21 | 00000000000000000021 | 4.58257569495584 | t | 2023-01-30 07:13:53.057504 + 022 | 0022 | 0022 | 22 | 00000000000000000022 | 4.69041575982343 | t | 2023-01-30 07:13:53.057509 + 023 | 0023 | 0023 | 23 | 00000000000000000023 | 4.795831523312719 | t | 2023-01-30 07:13:53.057512 + 024 | 0024 | 0024 | 24 | 00000000000000000024 | 4.898979485566356 | t | 2023-01-30 07:13:53.057516 + 025 | 0025 | 0025 | 25 | 00000000000000000025 | 5 | t | 2023-01-30 07:13:53.05752 + 026 | 0026 | 0026 | 26 | 00000000000000000026 | 5.0990195135927845 | t | 2023-01-30 07:13:53.057524 + 027 | 0027 | 0027 | 27 | 00000000000000000027 | 5.196152422706632 | t | 2023-01-30 07:13:53.057527 + 028 | 0028 | 0028 | 28 | 00000000000000000028 | 5.291502622129181 | t | 2023-01-30 07:13:53.057531 + 029 | 0029 | 0029 | 29 | 00000000000000000029 | 5.385164807134504 | t | 2023-01-30 07:13:53.057534 + 030 | 0030 | 0030 | 30 | 00000000000000000030 | 5.477225575051661 | t | 2023-01-30 07:13:53.057539 + 031 | 0031 | 0031 | 31 | 00000000000000000031 | 5.5677643628300215 | t | 2023-01-30 07:13:53.057542 + 032 | 0032 | 0032 | 32 | 00000000000000000032 | 5.656854249492381 | t | 2023-01-30 07:13:53.057546 + 033 | 0033 | 0033 | 33 | 00000000000000000033 | 5.744562646538029 | t | 2023-01-30 07:13:53.057549 + 034 | 0034 | 0034 | 34 | 00000000000000000034 | 5.830951894845301 | t | 2023-01-30 07:13:53.057554 + 035 | 0035 | 0035 | 35 | 00000000000000000035 | 5.916079783099616 | t | 2023-01-30 07:13:53.057557 + 036 | 0036 | 0036 | 36 | 00000000000000000036 | 6 | t | 2023-01-30 07:13:53.057561 + 037 | 0037 | 0037 | 37 | 00000000000000000037 | 6.082762530298219 | t | 2023-01-30 07:13:53.057564 + 038 | 0038 | 0038 | 38 | 00000000000000000038 | 6.164414002968976 | t | 2023-01-30 07:13:53.057568 + 039 | 0039 | 0039 | 39 | 00000000000000000039 | 6.244997998398398 | t | 2023-01-30 07:13:53.057571 + 040 | 0040 | 0040 | 40 | 00000000000000000040 | 6.324555320336759 | t | 2023-01-30 07:13:53.057575 + 041 | 0041 | 0041 | 41 | 00000000000000000041 | 6.4031242374328485 | t | 2023-01-30 07:13:53.057578 + 042 | 0042 | 0042 | 42 | 00000000000000000042 | 6.48074069840786 | t | 2023-01-30 07:13:53.057582 + 043 | 0043 | 0043 | 43 | 00000000000000000043 | 6.557438524302 | t | 2023-01-30 07:13:53.057585 + 044 | 0044 | 0044 | 44 | 00000000000000000044 | 6.6332495807108 | t | 2023-01-30 07:13:53.05759 + 045 | 0045 | 0045 | 45 | 00000000000000000045 | 6.708203932499369 | t | 2023-01-30 07:13:53.057593 + 046 | 0046 | 0046 | 46 | 00000000000000000046 | 6.782329983125268 | t | 2023-01-30 07:13:53.057598 + 047 | 0047 | 0047 | 47 | 00000000000000000047 | 6.855654600401044 | t | 2023-01-30 07:13:53.057601 + 048 | 0048 | 0048 | 48 | 00000000000000000048 | 6.928203230275509 | t | 2023-01-30 07:13:53.057605 + 049 | 0049 | 0049 | 49 | 00000000000000000049 | 7 | t | 2023-01-30 07:13:53.057608 + 050 | 0050 | 0050 | 50 | 00000000000000000050 | 7.0710678118654755 | t | 2023-01-30 07:13:53.057612 + 051 | 0051 | 0051 | 51 | 00000000000000000051 | 7.14142842854285 | t | 2023-01-30 07:13:53.057615 + 052 | 0052 | 0052 | 52 | 00000000000000000052 | 7.211102550927978 | t | 2023-01-30 07:13:53.057619 + 053 | 0053 | 0053 | 53 | 00000000000000000053 | 7.280109889280518 | t | 2023-01-30 07:13:53.057623 + 054 | 0054 | 0054 | 54 | 00000000000000000054 | 7.3484692283495345 | t | 2023-01-30 07:13:53.057627 + 055 | 0055 | 0055 | 55 | 00000000000000000055 | 7.416198487095663 | t | 2023-01-30 07:13:53.05763 + 056 | 0056 | 0056 | 56 | 00000000000000000056 | 7.483314773547883 | t | 2023-01-30 07:13:53.057634 + 057 | 0057 | 0057 | 57 | 00000000000000000057 | 7.54983443527075 | t | 2023-01-30 07:13:53.057637 + 058 | 0058 | 0058 | 58 | 00000000000000000058 | 7.615773105863909 | t | 2023-01-30 07:13:53.057641 + 059 | 0059 | 0059 | 59 | 00000000000000000059 | 7.681145747868608 | t | 2023-01-30 07:13:53.057644 + 060 | 0060 | 0060 | 60 | 00000000000000000060 | 7.745966692414834 | t | 2023-01-30 07:13:53.057648 + 061 | 0061 | 0061 | 61 | 00000000000000000061 | 7.810249675906654 | t | 2023-01-30 07:13:53.057651 + 062 | 0062 | 0062 | 62 | 00000000000000000062 | 7.874007874011811 | t | 2023-01-30 07:13:53.057656 + 063 | 0063 | 0063 | 63 | 00000000000000000063 | 7.937253933193772 | t | 2023-01-30 07:13:53.057659 + 064 | 0064 | 0064 | 64 | 00000000000000000064 | 8 | t | 2023-01-30 07:13:53.057663 + 065 | 0065 | 0065 | 65 | 00000000000000000065 | 8.06225774829855 | t | 2023-01-30 07:13:53.057666 + 066 | 0066 | 0066 | 66 | 00000000000000000066 | 8.12403840463596 | t | 2023-01-30 07:13:53.057669 + 067 | 0067 | 0067 | 67 | 00000000000000000067 | 8.18535277187245 | t | 2023-01-30 07:13:53.057673 + 068 | 0068 | 0068 | 68 | 00000000000000000068 | 8.246211251235321 | t | 2023-01-30 07:13:53.057676 + 069 | 0069 | 0069 | 69 | 00000000000000000069 | 8.306623862918075 | t | 2023-01-30 07:13:53.05768 + 070 | 0070 | 0070 | 70 | 00000000000000000070 | 8.366600265340756 | t | 2023-01-30 07:13:53.057683 + 071 | 0071 | 0071 | 71 | 00000000000000000071 | 8.426149773176359 | t | 2023-01-30 07:13:53.057687 + 072 | 0072 | 0072 | 72 | 00000000000000000072 | 8.48528137423857 | t | 2023-01-30 07:13:53.05769 + 073 | 0073 | 0073 | 73 | 00000000000000000073 | 8.54400374531753 | t | 2023-01-30 07:13:53.057695 + 074 | 0074 | 0074 | 74 | 00000000000000000074 | 8.602325267042627 | t | 2023-01-30 07:13:53.057698 + 075 | 0075 | 0075 | 75 | 00000000000000000075 | 8.660254037844387 | t | 2023-01-30 07:13:53.057705 + 076 | 0076 | 0076 | 76 | 00000000000000000076 | 8.717797887081348 | t | 2023-01-30 07:13:53.057708 + 077 | 0077 | 0077 | 77 | 00000000000000000077 | 8.774964387392123 | t | 2023-01-30 07:13:53.057712 + 078 | 0078 | 0078 | 78 | 00000000000000000078 | 8.831760866327848 | t | 2023-01-30 07:13:53.057715 + 079 | 0079 | 0079 | 79 | 00000000000000000079 | 8.888194417315589 | t | 2023-01-30 07:13:53.05772 + 080 | 0080 | 0080 | 80 | 00000000000000000080 | 8.94427190999916 | t | 2023-01-30 07:13:53.057722 + 081 | 0081 | 0081 | 81 | 00000000000000000081 | 9 | t | 2023-01-30 07:13:53.057727 + 082 | 0082 | 0082 | 82 | 00000000000000000082 | 9.055385138137417 | t | 2023-01-30 07:13:53.05773 + 083 | 0083 | 0083 | 83 | 00000000000000000083 | 9.1104335791443 | t | 2023-01-30 07:13:53.057736 + 084 | 0084 | 0084 | 84 | 00000000000000000084 | 9.16515138991168 | t | 2023-01-30 07:13:53.057739 + 085 | 0085 | 0085 | 85 | 00000000000000000085 | 9.219544457292887 | t | 2023-01-30 07:13:53.057743 + 086 | 0086 | 0086 | 86 | 00000000000000000086 | 9.273618495495704 | t | 2023-01-30 07:13:53.057746 + 087 | 0087 | 0087 | 87 | 00000000000000000087 | 9.327379053088816 | t | 2023-01-30 07:13:53.057751 + 088 | 0088 | 0088 | 88 | 00000000000000000088 | 9.38083151964686 | t | 2023-01-30 07:13:53.057754 + 089 | 0089 | 0089 | 89 | 00000000000000000089 | 9.433981132056603 | t | 2023-01-30 07:13:53.057758 + 090 | 0090 | 0090 | 90 | 00000000000000000090 | 9.486832980505138 | t | 2023-01-30 07:13:53.057761 + 091 | 0091 | 0091 | 91 | 00000000000000000091 | 9.539392014169456 | t | 2023-01-30 07:13:53.057765 + 092 | 0092 | 0092 | 92 | 00000000000000000092 | 9.591663046625438 | t | 2023-01-30 07:13:53.057768 + 093 | 0093 | 0093 | 93 | 00000000000000000093 | 9.643650760992955 | t | 2023-01-30 07:13:53.057772 + 094 | 0094 | 0094 | 94 | 00000000000000000094 | 9.695359714832659 | t | 2023-01-30 07:13:53.057775 + 095 | 0095 | 0095 | 95 | 00000000000000000095 | 9.746794344808963 | t | 2023-01-30 07:13:53.05778 + 096 | 0096 | 0096 | 96 | 00000000000000000096 | 9.797958971132712 | t | 2023-01-30 07:13:53.057783 + 097 | 0097 | 0097 | 97 | 00000000000000000097 | 9.848857801796104 | t | 2023-01-30 07:13:53.057787 + 098 | 0098 | 0098 | 98 | 00000000000000000098 | 9.899494936611665 | t | 2023-01-30 07:13:53.05779 + 099 | 0099 | 0099 | 99 | 00000000000000000099 | 9.9498743710662 | t | 2023-01-30 07:13:53.057794 + 000 | 0100 | 0100 | 100 | 00000000000000000000 | 10 | t | 2023-01-30 07:13:53.057797 + 001 | 0101 | 0101 | 101 | 00000000000000000001 | 10.04987562112089 | t | 2023-01-30 07:13:53.057802 + 002 | 0102 | 0102 | 102 | 00000000000000000002 | 10.099504938362077 | t | 2023-01-30 07:13:53.057805 + 003 | 0103 | 0103 | 103 | 00000000000000000003 | 10.14889156509222 | t | 2023-01-30 07:13:53.057809 + 004 | 0104 | 0104 | 104 | 00000000000000000004 | 10.198039027185569 | t | 2023-01-30 07:13:53.057812 + 005 | 0105 | 0105 | 105 | 00000000000000000005 | 10.246950765959598 | t | 2023-01-30 07:13:53.057816 + 006 | 0106 | 0106 | 106 | 00000000000000000006 | 10.295630140987 | t | 2023-01-30 07:13:53.057819 + 007 | 0107 | 0107 | 107 | 00000000000000000007 | 10.344080432788601 | t | 2023-01-30 07:13:53.057824 + 008 | 0108 | 0108 | 108 | 00000000000000000008 | 10.392304845413264 | t | 2023-01-30 07:13:53.057827 + 009 | 0109 | 0109 | 109 | 00000000000000000009 | 10.44030650891055 | t | 2023-01-30 07:13:53.057831 + 010 | 0110 | 0110 | 110 | 00000000000000000010 | 10.488088481701515 | t | 2023-01-30 07:13:53.057834 + 011 | 0111 | 0111 | 111 | 00000000000000000011 | 10.535653752852738 | t | 2023-01-30 07:13:53.057839 + 012 | 0112 | 0112 | 112 | 00000000000000000012 | 10.583005244258363 | t | 2023-01-30 07:13:53.057842 + 013 | 0113 | 0113 | 113 | 00000000000000000013 | 10.63014581273465 | t | 2023-01-30 07:13:53.057846 + 014 | 0114 | 0114 | 114 | 00000000000000000014 | 10.677078252031311 | t | 2023-01-30 07:13:53.057849 + 015 | 0115 | 0115 | 115 | 00000000000000000015 | 10.723805294763608 | t | 2023-01-30 07:13:53.057853 + 016 | 0116 | 0116 | 116 | 00000000000000000016 | 10.770329614269007 | t | 2023-01-30 07:13:53.057856 + 017 | 0117 | 0117 | 117 | 00000000000000000017 | 10.816653826391969 | t | 2023-01-30 07:13:53.05786 + 018 | 0118 | 0118 | 118 | 00000000000000000018 | 10.862780491200215 | t | 2023-01-30 07:13:53.057863 + 019 | 0119 | 0119 | 119 | 00000000000000000019 | 10.908712114635714 | t | 2023-01-30 07:13:53.057868 + 020 | 0120 | 0120 | 120 | 00000000000000000020 | 10.954451150103322 | t | 2023-01-30 07:13:53.057871 + 021 | 0121 | 0121 | 121 | 00000000000000000021 | 11 | t | 2023-01-30 07:13:53.057875 + 022 | 0122 | 0122 | 122 | 00000000000000000022 | 11.045361017187261 | t | 2023-01-30 07:13:53.057878 + 023 | 0123 | 0123 | 123 | 00000000000000000023 | 11.090536506409418 | t | 2023-01-30 07:13:53.057882 + 024 | 0124 | 0124 | 124 | 00000000000000000024 | 11.135528725660043 | t | 2023-01-30 07:13:53.057885 + 025 | 0125 | 0125 | 125 | 00000000000000000025 | 11.180339887498949 | t | 2023-01-30 07:13:53.057889 + 026 | 0126 | 0126 | 126 | 00000000000000000026 | 11.224972160321824 | t | 2023-01-30 07:13:53.057892 + 027 | 0127 | 0127 | 127 | 00000000000000000027 | 11.269427669584644 | t | 2023-01-30 07:13:53.057896 + 028 | 0128 | 0128 | 128 | 00000000000000000028 | 11.313708498984761 | t | 2023-01-30 07:13:53.057899 + 029 | 0129 | 0129 | 129 | 00000000000000000029 | 11.357816691600547 | t | 2023-01-30 07:13:53.057904 + 030 | 0130 | 0130 | 130 | 00000000000000000030 | 11.40175425099138 | t | 2023-01-30 07:13:53.057907 + 031 | 0131 | 0131 | 131 | 00000000000000000031 | 11.445523142259598 | t | 2023-01-30 07:13:53.057911 + 032 | 0132 | 0132 | 132 | 00000000000000000032 | 11.489125293076057 | t | 2023-01-30 07:13:53.057915 + 033 | 0133 | 0133 | 133 | 00000000000000000033 | 11.532562594670797 | t | 2023-01-30 07:13:53.057919 + 034 | 0134 | 0134 | 134 | 00000000000000000034 | 11.575836902790225 | t | 2023-01-30 07:13:53.057922 + 035 | 0135 | 0135 | 135 | 00000000000000000035 | 11.61895003862225 | t | 2023-01-30 07:13:53.057926 + 036 | 0136 | 0136 | 136 | 00000000000000000036 | 11.661903789690601 | t | 2023-01-30 07:13:53.057929 + 037 | 0137 | 0137 | 137 | 00000000000000000037 | 11.704699910719626 | t | 2023-01-30 07:13:53.057932 + 038 | 0138 | 0138 | 138 | 00000000000000000038 | 11.74734012447073 | t | 2023-01-30 07:13:53.057939 + 039 | 0139 | 0139 | 139 | 00000000000000000039 | 11.789826122551595 | t | 2023-01-30 07:13:53.057942 + 040 | 0140 | 0140 | 140 | 00000000000000000040 | 11.832159566199232 | t | 2023-01-30 07:13:53.057946 + 041 | 0141 | 0141 | 141 | 00000000000000000041 | 11.874342087037917 | t | 2023-01-30 07:13:53.057949 + 042 | 0142 | 0142 | 142 | 00000000000000000042 | 11.916375287812984 | t | 2023-01-30 07:13:53.057953 + 043 | 0143 | 0143 | 143 | 00000000000000000043 | 11.958260743101398 | t | 2023-01-30 07:13:53.057956 + 044 | 0144 | 0144 | 144 | 00000000000000000044 | 12 | t | 2023-01-30 07:13:53.057961 + 045 | 0145 | 0145 | 145 | 00000000000000000045 | 12.041594578792296 | t | 2023-01-30 07:13:53.057964 + 046 | 0146 | 0146 | 146 | 00000000000000000046 | 12.083045973594572 | t | 2023-01-30 07:13:53.057968 + 047 | 0147 | 0147 | 147 | 00000000000000000047 | 12.12435565298214 | t | 2023-01-30 07:13:53.057971 + 048 | 0148 | 0148 | 148 | 00000000000000000048 | 12.165525060596439 | t | 2023-01-30 07:13:53.057975 + 049 | 0149 | 0149 | 149 | 00000000000000000049 | 12.206555615733702 | t | 2023-01-30 07:13:53.057978 + 050 | 0150 | 0150 | 150 | 00000000000000000050 | 12.24744871391589 | t | 2023-01-30 07:13:53.057983 + 051 | 0151 | 0151 | 151 | 00000000000000000051 | 12.288205727444508 | t | 2023-01-30 07:13:53.057986 + 052 | 0152 | 0152 | 152 | 00000000000000000052 | 12.328828005937952 | t | 2023-01-30 07:13:53.057991 + 053 | 0153 | 0153 | 153 | 00000000000000000053 | 12.36931687685298 | t | 2023-01-30 07:13:53.057994 + 054 | 0154 | 0154 | 154 | 00000000000000000054 | 12.409673645990857 | t | 2023-01-30 07:13:53.057998 + 055 | 0155 | 0155 | 155 | 00000000000000000055 | 12.449899597988733 | t | 2023-01-30 07:13:53.058001 + 056 | 0156 | 0156 | 156 | 00000000000000000056 | 12.489995996796797 | t | 2023-01-30 07:13:53.058005 + 057 | 0157 | 0157 | 157 | 00000000000000000057 | 12.529964086141668 | t | 2023-01-30 07:13:53.058008 + 058 | 0158 | 0158 | 158 | 00000000000000000058 | 12.569805089976535 | t | 2023-01-30 07:13:53.058013 + 059 | 0159 | 0159 | 159 | 00000000000000000059 | 12.609520212918492 | t | 2023-01-30 07:13:53.058016 + 060 | 0160 | 0160 | 160 | 00000000000000000060 | 12.649110640673518 | t | 2023-01-30 07:13:53.05802 + 061 | 0161 | 0161 | 161 | 00000000000000000061 | 12.68857754044952 | t | 2023-01-30 07:13:53.058023 + 062 | 0162 | 0162 | 162 | 00000000000000000062 | 12.727922061357855 | t | 2023-01-30 07:13:53.058027 + 063 | 0163 | 0163 | 163 | 00000000000000000063 | 12.767145334803704 | t | 2023-01-30 07:13:53.05803 + 064 | 0164 | 0164 | 164 | 00000000000000000064 | 12.806248474865697 | t | 2023-01-30 07:13:53.058035 + 065 | 0165 | 0165 | 165 | 00000000000000000065 | 12.84523257866513 | t | 2023-01-30 07:13:53.058038 + 066 | 0166 | 0166 | 166 | 00000000000000000066 | 12.884098726725126 | t | 2023-01-30 07:13:53.058058 + 067 | 0167 | 0167 | 167 | 00000000000000000067 | 12.922847983320086 | t | 2023-01-30 07:13:53.058061 + 068 | 0168 | 0168 | 168 | 00000000000000000068 | 12.96148139681572 | t | 2023-01-30 07:13:53.058065 + 069 | 0169 | 0169 | 169 | 00000000000000000069 | 13 | t | 2023-01-30 07:13:53.058068 + 070 | 0170 | 0170 | 170 | 00000000000000000070 | 13.038404810405298 | t | 2023-01-30 07:13:53.058073 + 071 | 0171 | 0171 | 171 | 00000000000000000071 | 13.076696830622021 | t | 2023-01-30 07:13:53.058076 + 072 | 0172 | 0172 | 172 | 00000000000000000072 | 13.114877048604 | t | 2023-01-30 07:13:53.05808 + 073 | 0173 | 0173 | 173 | 00000000000000000073 | 13.152946437965905 | t | 2023-01-30 07:13:53.058083 + 074 | 0174 | 0174 | 174 | 00000000000000000074 | 13.19090595827292 | t | 2023-01-30 07:13:53.058087 + 075 | 0175 | 0175 | 175 | 00000000000000000075 | 13.228756555322953 | t | 2023-01-30 07:13:53.058102 + 076 | 0176 | 0176 | 176 | 00000000000000000076 | 13.2664991614216 | t | 2023-01-30 07:13:53.058107 + 077 | 0177 | 0177 | 177 | 00000000000000000077 | 13.30413469565007 | t | 2023-01-30 07:13:53.05811 + 078 | 0178 | 0178 | 178 | 00000000000000000078 | 13.341664064126334 | t | 2023-01-30 07:13:53.058114 + 079 | 0179 | 0179 | 179 | 00000000000000000079 | 13.379088160259652 | t | 2023-01-30 07:13:53.058117 + 080 | 0180 | 0180 | 180 | 00000000000000000080 | 13.416407864998739 | t | 2023-01-30 07:13:53.058122 + 081 | 0181 | 0181 | 181 | 00000000000000000081 | 13.45362404707371 | t | 2023-01-30 07:13:53.058125 + 082 | 0182 | 0182 | 182 | 00000000000000000082 | 13.490737563232042 | t | 2023-01-30 07:13:53.058129 + 083 | 0183 | 0183 | 183 | 00000000000000000083 | 13.527749258468683 | t | 2023-01-30 07:13:53.058132 + 084 | 0184 | 0184 | 184 | 00000000000000000084 | 13.564659966250536 | t | 2023-01-30 07:13:53.058135 + 085 | 0185 | 0185 | 185 | 00000000000000000085 | 13.601470508735444 | t | 2023-01-30 07:13:53.058139 + 086 | 0186 | 0186 | 186 | 00000000000000000086 | 13.638181696985855 | t | 2023-01-30 07:13:53.058142 + 087 | 0187 | 0187 | 187 | 00000000000000000087 | 13.674794331177344 | t | 2023-01-30 07:13:53.058147 + 088 | 0188 | 0188 | 188 | 00000000000000000088 | 13.711309200802088 | t | 2023-01-30 07:13:53.05815 + 089 | 0189 | 0189 | 189 | 00000000000000000089 | 13.74772708486752 | t | 2023-01-30 07:13:53.058154 + 090 | 0190 | 0190 | 190 | 00000000000000000090 | 13.784048752090222 | t | 2023-01-30 07:13:53.058157 + 091 | 0191 | 0191 | 191 | 00000000000000000091 | 13.820274961085254 | t | 2023-01-30 07:13:53.058161 + 092 | 0192 | 0192 | 192 | 00000000000000000092 | 13.856406460551018 | t | 2023-01-30 07:13:53.058164 + 093 | 0193 | 0193 | 193 | 00000000000000000093 | 13.892443989449804 | t | 2023-01-30 07:13:53.058169 + 094 | 0194 | 0194 | 194 | 00000000000000000094 | 13.92838827718412 | t | 2023-01-30 07:13:53.058171 + 095 | 0195 | 0195 | 195 | 00000000000000000095 | 13.96424004376894 | t | 2023-01-30 07:13:53.058176 + 096 | 0196 | 0196 | 196 | 00000000000000000096 | 14 | t | 2023-01-30 07:13:53.058179 + 097 | 0197 | 0197 | 197 | 00000000000000000097 | 14.035668847618199 | t | 2023-01-30 07:13:53.058183 + 098 | 0198 | 0198 | 198 | 00000000000000000098 | 14.071247279470288 | t | 2023-01-30 07:13:53.058186 + 099 | 0199 | 0199 | 199 | 00000000000000000099 | 14.106735979665885 | t | 2023-01-30 07:13:53.05819 + 000 | 0200 | 0200 | 200 | 00000000000000000000 | 14.142135623730951 | t | 2023-01-30 07:13:53.058193 + 001 | 0201 | 0201 | 201 | 00000000000000000001 | 14.177446878757825 | t | 2023-01-30 07:13:53.0582 + 002 | 0202 | 0202 | 202 | 00000000000000000002 | 14.212670403551895 | t | 2023-01-30 07:13:53.058203 + 003 | 0203 | 0203 | 203 | 00000000000000000003 | 14.247806848775006 | t | 2023-01-30 07:13:53.058207 + 004 | 0204 | 0204 | 204 | 00000000000000000004 | 14.2828568570857 | t | 2023-01-30 07:13:53.05821 + 005 | 0205 | 0205 | 205 | 00000000000000000005 | 14.317821063276353 | t | 2023-01-30 07:13:53.058214 + 006 | 0206 | 0206 | 206 | 00000000000000000006 | 14.352700094407323 | t | 2023-01-30 07:13:53.058217 + 007 | 0207 | 0207 | 207 | 00000000000000000007 | 14.38749456993816 | t | 2023-01-30 07:13:53.058221 + 008 | 0208 | 0208 | 208 | 00000000000000000008 | 14.422205101855956 | t | 2023-01-30 07:13:53.058224 + 009 | 0209 | 0209 | 209 | 00000000000000000009 | 14.45683229480096 | t | 2023-01-30 07:13:53.058229 + 010 | 0210 | 0210 | 210 | 00000000000000000010 | 14.491376746189438 | t | 2023-01-30 07:13:53.058232 + 011 | 0211 | 0211 | 211 | 00000000000000000011 | 14.52583904633395 | t | 2023-01-30 07:13:53.058236 + 012 | 0212 | 0212 | 212 | 00000000000000000012 | 14.560219778561036 | t | 2023-01-30 07:13:53.058239 + 013 | 0213 | 0213 | 213 | 00000000000000000013 | 14.594519519326424 | t | 2023-01-30 07:13:53.058244 + 014 | 0214 | 0214 | 214 | 00000000000000000014 | 14.628738838327793 | t | 2023-01-30 07:13:53.058248 + 015 | 0215 | 0215 | 215 | 00000000000000000015 | 14.66287829861518 | t | 2023-01-30 07:13:53.058252 + 016 | 0216 | 0216 | 216 | 00000000000000000016 | 14.696938456699069 | t | 2023-01-30 07:13:53.058254 + 017 | 0217 | 0217 | 217 | 00000000000000000017 | 14.730919862656235 | t | 2023-01-30 07:13:53.058262 + 018 | 0218 | 0218 | 218 | 00000000000000000018 | 14.7648230602334 | t | 2023-01-30 07:13:53.058265 + 019 | 0219 | 0219 | 219 | 00000000000000000019 | 14.798648586948742 | t | 2023-01-30 07:13:53.058269 + 020 | 0220 | 0220 | 220 | 00000000000000000020 | 14.832396974191326 | t | 2023-01-30 07:13:53.058272 + 021 | 0221 | 0221 | 221 | 00000000000000000021 | 14.866068747318506 | t | 2023-01-30 07:13:53.058276 + 022 | 0222 | 0222 | 222 | 00000000000000000022 | 14.89966442575134 | t | 2023-01-30 07:13:53.058279 + 023 | 0223 | 0223 | 223 | 00000000000000000023 | 14.933184523068078 | t | 2023-01-30 07:13:53.058283 + 024 | 0224 | 0224 | 224 | 00000000000000000024 | 14.966629547095765 | t | 2023-01-30 07:13:53.058286 + 025 | 0225 | 0225 | 225 | 00000000000000000025 | 15 | t | 2023-01-30 07:13:53.058291 + 026 | 0226 | 0226 | 226 | 00000000000000000026 | 15.033296378372908 | t | 2023-01-30 07:13:53.058294 + 027 | 0227 | 0227 | 227 | 00000000000000000027 | 15.066519173319364 | t | 2023-01-30 07:13:53.058298 + 028 | 0228 | 0228 | 228 | 00000000000000000028 | 15.0996688705415 | t | 2023-01-30 07:13:53.058301 + 029 | 0229 | 0229 | 229 | 00000000000000000029 | 15.132745950421556 | t | 2023-01-30 07:13:53.058305 + 030 | 0230 | 0230 | 230 | 00000000000000000030 | 15.165750888103101 | t | 2023-01-30 07:13:53.058308 + 031 | 0231 | 0231 | 231 | 00000000000000000031 | 15.198684153570664 | t | 2023-01-30 07:13:53.058312 + 032 | 0232 | 0232 | 232 | 00000000000000000032 | 15.231546211727817 | t | 2023-01-30 07:13:53.058315 + 033 | 0233 | 0233 | 233 | 00000000000000000033 | 15.264337522473747 | t | 2023-01-30 07:13:53.05832 + 034 | 0234 | 0234 | 234 | 00000000000000000034 | 15.297058540778355 | t | 2023-01-30 07:13:53.058323 + 035 | 0235 | 0235 | 235 | 00000000000000000035 | 15.329709716755891 | t | 2023-01-30 07:13:53.058327 + 036 | 0236 | 0236 | 236 | 00000000000000000036 | 15.362291495737216 | t | 2023-01-30 07:13:53.05833 + 037 | 0237 | 0237 | 237 | 00000000000000000037 | 15.394804318340652 | t | 2023-01-30 07:13:53.058334 + 038 | 0238 | 0238 | 238 | 00000000000000000038 | 15.427248620541512 | t | 2023-01-30 07:13:53.058337 + 039 | 0239 | 0239 | 239 | 00000000000000000039 | 15.459624833740307 | t | 2023-01-30 07:13:53.058341 + 040 | 0240 | 0240 | 240 | 00000000000000000040 | 15.491933384829668 | t | 2023-01-30 07:13:53.058344 + 041 | 0241 | 0241 | 241 | 00000000000000000041 | 15.524174696260024 | t | 2023-01-30 07:13:53.058348 + 042 | 0242 | 0242 | 242 | 00000000000000000042 | 15.556349186104045 | t | 2023-01-30 07:13:53.058351 + 043 | 0243 | 0243 | 243 | 00000000000000000043 | 15.588457268119896 | t | 2023-01-30 07:13:53.058356 + 044 | 0244 | 0244 | 244 | 00000000000000000044 | 15.620499351813308 | t | 2023-01-30 07:13:53.058359 + 045 | 0245 | 0245 | 245 | 00000000000000000045 | 15.652475842498529 | t | 2023-01-30 07:13:53.058363 + 046 | 0246 | 0246 | 246 | 00000000000000000046 | 15.684387141358123 | t | 2023-01-30 07:13:53.058366 + 047 | 0247 | 0247 | 247 | 00000000000000000047 | 15.716233645501712 | t | 2023-01-30 07:13:53.058371 + 048 | 0248 | 0248 | 248 | 00000000000000000048 | 15.748015748023622 | t | 2023-01-30 07:13:53.058374 + 049 | 0249 | 0249 | 249 | 00000000000000000049 | 15.7797338380595 | t | 2023-01-30 07:13:53.058378 + 050 | 0250 | 0250 | 250 | 00000000000000000050 | 15.811388300841896 | t | 2023-01-30 07:13:53.058381 + 051 | 0251 | 0251 | 251 | 00000000000000000051 | 15.84297951775486 | t | 2023-01-30 07:13:53.058385 + 052 | 0252 | 0252 | 252 | 00000000000000000052 | 15.874507866387544 | t | 2023-01-30 07:13:53.058388 + 053 | 0253 | 0253 | 253 | 00000000000000000053 | 15.905973720586866 | t | 2023-01-30 07:13:53.058392 + 054 | 0254 | 0254 | 254 | 00000000000000000054 | 15.937377450509228 | t | 2023-01-30 07:13:53.058395 + 055 | 0255 | 0255 | 255 | 00000000000000000055 | 15.968719422671311 | t | 2023-01-30 07:13:53.058399 + 056 | 0256 | 0256 | 256 | 00000000000000000056 | 16 | t | 2023-01-30 07:13:53.058402 + 057 | 0257 | 0257 | 257 | 00000000000000000057 | 16.0312195418814 | t | 2023-01-30 07:13:53.058406 + 058 | 0258 | 0258 | 258 | 00000000000000000058 | 16.06237840420901 | t | 2023-01-30 07:13:53.058409 + 059 | 0259 | 0259 | 259 | 00000000000000000059 | 16.09347693943108 | t | 2023-01-30 07:13:53.058413 + 060 | 0260 | 0260 | 260 | 00000000000000000060 | 16.1245154965971 | t | 2023-01-30 07:13:53.058416 + 061 | 0261 | 0261 | 261 | 00000000000000000061 | 16.15549442140351 | t | 2023-01-30 07:13:53.058421 + 062 | 0262 | 0262 | 262 | 00000000000000000062 | 16.186414056238647 | t | 2023-01-30 07:13:53.058424 + 063 | 0263 | 0263 | 263 | 00000000000000000063 | 16.217274740226856 | t | 2023-01-30 07:13:53.05843 + 064 | 0264 | 0264 | 264 | 00000000000000000064 | 16.24807680927192 | t | 2023-01-30 07:13:53.058433 + 065 | 0265 | 0265 | 265 | 00000000000000000065 | 16.278820596099706 | t | 2023-01-30 07:13:53.058438 + 066 | 0266 | 0266 | 266 | 00000000000000000066 | 16.30950643030009 | t | 2023-01-30 07:13:53.058441 + 067 | 0267 | 0267 | 267 | 00000000000000000067 | 16.34013463836819 | t | 2023-01-30 07:13:53.058445 + 068 | 0268 | 0268 | 268 | 00000000000000000068 | 16.3707055437449 | t | 2023-01-30 07:13:53.058448 + 069 | 0269 | 0269 | 269 | 00000000000000000069 | 16.401219466856727 | t | 2023-01-30 07:13:53.058452 + 070 | 0270 | 0270 | 270 | 00000000000000000070 | 16.431676725154983 | t | 2023-01-30 07:13:53.058455 + 071 | 0271 | 0271 | 271 | 00000000000000000071 | 16.46207763315433 | t | 2023-01-30 07:13:53.058458 + 072 | 0272 | 0272 | 272 | 00000000000000000072 | 16.492422502470642 | t | 2023-01-30 07:13:53.058463 + 073 | 0273 | 0273 | 273 | 00000000000000000073 | 16.522711641858304 | t | 2023-01-30 07:13:53.058466 + 074 | 0274 | 0274 | 274 | 00000000000000000074 | 16.55294535724685 | t | 2023-01-30 07:13:53.05847 + 075 | 0275 | 0275 | 275 | 00000000000000000075 | 16.583123951777 | t | 2023-01-30 07:13:53.058473 + 076 | 0276 | 0276 | 276 | 00000000000000000076 | 16.61324772583615 | t | 2023-01-30 07:13:53.058477 + 077 | 0277 | 0277 | 277 | 00000000000000000077 | 16.64331697709324 | t | 2023-01-30 07:13:53.05848 + 078 | 0278 | 0278 | 278 | 00000000000000000078 | 16.673332000533065 | t | 2023-01-30 07:13:53.058484 + 079 | 0279 | 0279 | 279 | 00000000000000000079 | 16.703293088490067 | t | 2023-01-30 07:13:53.058487 + 080 | 0280 | 0280 | 280 | 00000000000000000080 | 16.73320053068151 | t | 2023-01-30 07:13:53.058491 + 081 | 0281 | 0281 | 281 | 00000000000000000081 | 16.76305461424021 | t | 2023-01-30 07:13:53.058494 + 082 | 0282 | 0282 | 282 | 00000000000000000082 | 16.792855623746664 | t | 2023-01-30 07:13:53.058499 + 083 | 0283 | 0283 | 283 | 00000000000000000083 | 16.822603841260722 | t | 2023-01-30 07:13:53.058502 + 084 | 0284 | 0284 | 284 | 00000000000000000084 | 16.852299546352718 | t | 2023-01-30 07:13:53.058507 + 085 | 0285 | 0285 | 285 | 00000000000000000085 | 16.881943016134134 | t | 2023-01-30 07:13:53.05851 + 086 | 0286 | 0286 | 286 | 00000000000000000086 | 16.911534525287763 | t | 2023-01-30 07:13:53.058515 + 087 | 0287 | 0287 | 287 | 00000000000000000087 | 16.941074346097416 | t | 2023-01-30 07:13:53.058518 + 088 | 0288 | 0288 | 288 | 00000000000000000088 | 16.97056274847714 | t | 2023-01-30 07:13:53.058522 + 089 | 0289 | 0289 | 289 | 00000000000000000089 | 17 | t | 2023-01-30 07:13:53.058525 + 090 | 0290 | 0290 | 290 | 00000000000000000090 | 17.029386365926403 | t | 2023-01-30 07:13:53.058529 + 091 | 0291 | 0291 | 291 | 00000000000000000091 | 17.05872210923198 | t | 2023-01-30 07:13:53.058552 + 092 | 0292 | 0292 | 292 | 00000000000000000092 | 17.08800749063506 | t | 2023-01-30 07:13:53.058558 + 093 | 0293 | 0293 | 293 | 00000000000000000093 | 17.11724276862369 | t | 2023-01-30 07:13:53.058561 + 094 | 0294 | 0294 | 294 | 00000000000000000094 | 17.146428199482248 | t | 2023-01-30 07:13:53.058565 + 095 | 0295 | 0295 | 295 | 00000000000000000095 | 17.175564037317667 | t | 2023-01-30 07:13:53.058568 + 096 | 0296 | 0296 | 296 | 00000000000000000096 | 17.204650534085253 | t | 2023-01-30 07:13:53.058573 + 097 | 0297 | 0297 | 297 | 00000000000000000097 | 17.233687939614086 | t | 2023-01-30 07:13:53.058576 + 098 | 0298 | 0298 | 298 | 00000000000000000098 | 17.26267650163207 | t | 2023-01-30 07:13:53.05858 + 099 | 0299 | 0299 | 299 | 00000000000000000099 | 17.291616465790582 | t | 2023-01-30 07:13:53.058583 + 000 | 0300 | 0300 | 300 | 00000000000000000000 | 17.320508075688775 | t | 2023-01-30 07:13:53.058588 + 001 | 0301 | 0301 | 301 | 00000000000000000001 | 17.349351572897472 | t | 2023-01-30 07:13:53.058591 + 002 | 0302 | 0302 | 302 | 00000000000000000002 | 17.378147196982766 | t | 2023-01-30 07:13:53.058595 + 003 | 0303 | 0303 | 303 | 00000000000000000003 | 17.406895185529212 | t | 2023-01-30 07:13:53.058598 + 004 | 0304 | 0304 | 304 | 00000000000000000004 | 17.435595774162696 | t | 2023-01-30 07:13:53.058602 + 005 | 0305 | 0305 | 305 | 00000000000000000005 | 17.46424919657298 | t | 2023-01-30 07:13:53.058605 + 006 | 0306 | 0306 | 306 | 00000000000000000006 | 17.4928556845359 | t | 2023-01-30 07:13:53.05861 + 007 | 0307 | 0307 | 307 | 00000000000000000007 | 17.52141546793523 | t | 2023-01-30 07:13:53.058613 + 008 | 0308 | 0308 | 308 | 00000000000000000008 | 17.549928774784245 | t | 2023-01-30 07:13:53.058617 + 009 | 0309 | 0309 | 309 | 00000000000000000009 | 17.578395831246947 | t | 2023-01-30 07:13:53.05862 + 010 | 0310 | 0310 | 310 | 00000000000000000010 | 17.60681686165901 | t | 2023-01-30 07:13:53.058624 + 011 | 0311 | 0311 | 311 | 00000000000000000011 | 17.635192088548397 | t | 2023-01-30 07:13:53.058627 + 012 | 0312 | 0312 | 312 | 00000000000000000012 | 17.663521732655695 | t | 2023-01-30 07:13:53.058631 + 013 | 0313 | 0313 | 313 | 00000000000000000013 | 17.69180601295413 | t | 2023-01-30 07:13:53.058634 + 014 | 0314 | 0314 | 314 | 00000000000000000014 | 17.72004514666935 | t | 2023-01-30 07:13:53.058638 + 015 | 0315 | 0315 | 315 | 00000000000000000015 | 17.74823934929885 | t | 2023-01-30 07:13:53.058641 + 016 | 0316 | 0316 | 316 | 00000000000000000016 | 17.776388834631177 | t | 2023-01-30 07:13:53.058645 + 017 | 0317 | 0317 | 317 | 00000000000000000017 | 17.804493814764857 | t | 2023-01-30 07:13:53.058649 + 018 | 0318 | 0318 | 318 | 00000000000000000018 | 17.832554500127006 | t | 2023-01-30 07:13:53.058651 + 019 | 0319 | 0319 | 319 | 00000000000000000019 | 17.86057109949175 | t | 2023-01-30 07:13:53.058656 + 020 | 0320 | 0320 | 320 | 00000000000000000020 | 17.88854381999832 | t | 2023-01-30 07:13:53.058659 + 021 | 0321 | 0321 | 321 | 00000000000000000021 | 17.916472867168917 | t | 2023-01-30 07:13:53.058663 + 022 | 0322 | 0322 | 322 | 00000000000000000022 | 17.944358444926362 | t | 2023-01-30 07:13:53.058666 + 023 | 0323 | 0323 | 323 | 00000000000000000023 | 17.97220075561143 | t | 2023-01-30 07:13:53.05867 + 024 | 0324 | 0324 | 324 | 00000000000000000024 | 18 | t | 2023-01-30 07:13:53.058673 + 025 | 0325 | 0325 | 325 | 00000000000000000025 | 18.027756377319946 | t | 2023-01-30 07:13:53.058677 + 026 | 0326 | 0326 | 326 | 00000000000000000026 | 18.05547008526779 | t | 2023-01-30 07:13:53.05868 + 027 | 0327 | 0327 | 327 | 00000000000000000027 | 18.083141320025124 | t | 2023-01-30 07:13:53.058687 + 028 | 0328 | 0328 | 328 | 00000000000000000028 | 18.110770276274835 | t | 2023-01-30 07:13:53.05869 + 029 | 0329 | 0329 | 329 | 00000000000000000029 | 18.138357147217054 | t | 2023-01-30 07:13:53.058695 + 030 | 0330 | 0330 | 330 | 00000000000000000030 | 18.16590212458495 | t | 2023-01-30 07:13:53.058698 + 031 | 0331 | 0331 | 331 | 00000000000000000031 | 18.193405398660254 | t | 2023-01-30 07:13:53.058702 + 032 | 0332 | 0332 | 332 | 00000000000000000032 | 18.2208671582886 | t | 2023-01-30 07:13:53.058705 + 033 | 0333 | 0333 | 333 | 00000000000000000033 | 18.24828759089466 | t | 2023-01-30 07:13:53.058709 + 034 | 0334 | 0334 | 334 | 00000000000000000034 | 18.275666882497067 | t | 2023-01-30 07:13:53.058712 + 035 | 0335 | 0335 | 335 | 00000000000000000035 | 18.303005217723125 | t | 2023-01-30 07:13:53.058716 + 036 | 0336 | 0336 | 336 | 00000000000000000036 | 18.33030277982336 | t | 2023-01-30 07:13:53.058719 + 037 | 0337 | 0337 | 337 | 00000000000000000037 | 18.35755975068582 | t | 2023-01-30 07:13:53.058723 + 038 | 0338 | 0338 | 338 | 00000000000000000038 | 18.384776310850235 | t | 2023-01-30 07:13:53.058726 + 039 | 0339 | 0339 | 339 | 00000000000000000039 | 18.411952639521967 | t | 2023-01-30 07:13:53.05873 + 040 | 0340 | 0340 | 340 | 00000000000000000040 | 18.439088914585774 | t | 2023-01-30 07:13:53.058733 + 041 | 0341 | 0341 | 341 | 00000000000000000041 | 18.466185312619388 | t | 2023-01-30 07:13:53.058737 + 042 | 0342 | 0342 | 342 | 00000000000000000042 | 18.49324200890693 | t | 2023-01-30 07:13:53.05874 + 043 | 0343 | 0343 | 343 | 00000000000000000043 | 18.520259177452136 | t | 2023-01-30 07:13:53.058745 + 044 | 0344 | 0344 | 344 | 00000000000000000044 | 18.547236990991408 | t | 2023-01-30 07:13:53.058748 + 045 | 0345 | 0345 | 345 | 00000000000000000045 | 18.57417562100671 | t | 2023-01-30 07:13:53.058752 + 046 | 0346 | 0346 | 346 | 00000000000000000046 | 18.601075237738275 | t | 2023-01-30 07:13:53.058755 + 047 | 0347 | 0347 | 347 | 00000000000000000047 | 18.627936010197157 | t | 2023-01-30 07:13:53.058759 + 048 | 0348 | 0348 | 348 | 00000000000000000048 | 18.65475810617763 | t | 2023-01-30 07:13:53.058762 + 049 | 0349 | 0349 | 349 | 00000000000000000049 | 18.681541692269406 | t | 2023-01-30 07:13:53.058766 + 050 | 0350 | 0350 | 350 | 00000000000000000050 | 18.708286933869708 | t | 2023-01-30 07:13:53.058769 + 051 | 0351 | 0351 | 351 | 00000000000000000051 | 18.734993995195193 | t | 2023-01-30 07:13:53.058776 + 052 | 0352 | 0352 | 352 | 00000000000000000052 | 18.76166303929372 | t | 2023-01-30 07:13:53.058779 + 053 | 0353 | 0353 | 353 | 00000000000000000053 | 18.788294228055936 | t | 2023-01-30 07:13:53.058783 + 054 | 0354 | 0354 | 354 | 00000000000000000054 | 18.81488772222678 | t | 2023-01-30 07:13:53.058786 + 055 | 0355 | 0355 | 355 | 00000000000000000055 | 18.841443681416774 | t | 2023-01-30 07:13:53.05879 + 056 | 0356 | 0356 | 356 | 00000000000000000056 | 18.867962264113206 | t | 2023-01-30 07:13:53.058793 + 057 | 0357 | 0357 | 357 | 00000000000000000057 | 18.894443627691185 | t | 2023-01-30 07:13:53.058798 + 058 | 0358 | 0358 | 358 | 00000000000000000058 | 18.920887928424502 | t | 2023-01-30 07:13:53.058801 + 059 | 0359 | 0359 | 359 | 00000000000000000059 | 18.947295321496416 | t | 2023-01-30 07:13:53.058805 + 060 | 0360 | 0360 | 360 | 00000000000000000060 | 18.973665961010276 | t | 2023-01-30 07:13:53.058808 + 061 | 0361 | 0361 | 361 | 00000000000000000061 | 19 | t | 2023-01-30 07:13:53.058812 + 062 | 0362 | 0362 | 362 | 00000000000000000062 | 19.026297590440446 | t | 2023-01-30 07:13:53.058816 + 063 | 0363 | 0363 | 363 | 00000000000000000063 | 19.05255888325765 | t | 2023-01-30 07:13:53.05882 + 064 | 0364 | 0364 | 364 | 00000000000000000064 | 19.078784028338912 | t | 2023-01-30 07:13:53.058823 + 065 | 0365 | 0365 | 365 | 00000000000000000065 | 19.1049731745428 | t | 2023-01-30 07:13:53.058827 + 066 | 0366 | 0366 | 366 | 00000000000000000066 | 19.131126469708992 | t | 2023-01-30 07:13:53.05883 + 067 | 0367 | 0367 | 367 | 00000000000000000067 | 19.157244060668017 | t | 2023-01-30 07:13:53.058834 + 068 | 0368 | 0368 | 368 | 00000000000000000068 | 19.183326093250876 | t | 2023-01-30 07:13:53.058837 + 069 | 0369 | 0369 | 369 | 00000000000000000069 | 19.209372712298546 | t | 2023-01-30 07:13:53.058841 + 070 | 0370 | 0370 | 370 | 00000000000000000070 | 19.235384061671343 | t | 2023-01-30 07:13:53.058844 + 071 | 0371 | 0371 | 371 | 00000000000000000071 | 19.261360284258224 | t | 2023-01-30 07:13:53.058849 + 072 | 0372 | 0372 | 372 | 00000000000000000072 | 19.28730152198591 | t | 2023-01-30 07:13:53.058852 + 073 | 0373 | 0373 | 373 | 00000000000000000073 | 19.313207915827967 | t | 2023-01-30 07:13:53.058856 + 074 | 0374 | 0374 | 374 | 00000000000000000074 | 19.339079605813716 | t | 2023-01-30 07:13:53.058859 + 075 | 0375 | 0375 | 375 | 00000000000000000075 | 19.364916731037084 | t | 2023-01-30 07:13:53.058862 + 076 | 0376 | 0376 | 376 | 00000000000000000076 | 19.390719429665317 | t | 2023-01-30 07:13:53.058866 + 077 | 0377 | 0377 | 377 | 00000000000000000077 | 19.4164878389476 | t | 2023-01-30 07:13:53.058869 + 078 | 0378 | 0378 | 378 | 00000000000000000078 | 19.44222209522358 | t | 2023-01-30 07:13:53.058873 + 079 | 0379 | 0379 | 379 | 00000000000000000079 | 19.467922333931785 | t | 2023-01-30 07:13:53.058876 + 080 | 0380 | 0380 | 380 | 00000000000000000080 | 19.493588689617926 | t | 2023-01-30 07:13:53.058881 + 081 | 0381 | 0381 | 381 | 00000000000000000081 | 19.519221295943137 | t | 2023-01-30 07:13:53.058884 + 082 | 0382 | 0382 | 382 | 00000000000000000082 | 19.544820285692065 | t | 2023-01-30 07:13:53.058888 + 083 | 0383 | 0383 | 383 | 00000000000000000083 | 19.570385790780925 | t | 2023-01-30 07:13:53.058891 + 084 | 0384 | 0384 | 384 | 00000000000000000084 | 19.595917942265423 | t | 2023-01-30 07:13:53.058896 + 085 | 0385 | 0385 | 385 | 00000000000000000085 | 19.621416870348583 | t | 2023-01-30 07:13:53.058899 + 086 | 0386 | 0386 | 386 | 00000000000000000086 | 19.6468827043885 | t | 2023-01-30 07:13:53.058905 + 087 | 0387 | 0387 | 387 | 00000000000000000087 | 19.672315572906 | t | 2023-01-30 07:13:53.058908 + 088 | 0388 | 0388 | 388 | 00000000000000000088 | 19.697715603592208 | t | 2023-01-30 07:13:53.058912 + 089 | 0389 | 0389 | 389 | 00000000000000000089 | 19.72308292331602 | t | 2023-01-30 07:13:53.058915 + 090 | 0390 | 0390 | 390 | 00000000000000000090 | 19.748417658131498 | t | 2023-01-30 07:13:53.058919 + 091 | 0391 | 0391 | 391 | 00000000000000000091 | 19.77371993328519 | t | 2023-01-30 07:13:53.058922 + 092 | 0392 | 0392 | 392 | 00000000000000000092 | 19.79898987322333 | t | 2023-01-30 07:13:53.058927 + 093 | 0393 | 0393 | 393 | 00000000000000000093 | 19.82422760159901 | t | 2023-01-30 07:13:53.05893 + 094 | 0394 | 0394 | 394 | 00000000000000000094 | 19.849433241279208 | t | 2023-01-30 07:13:53.058934 + 095 | 0395 | 0395 | 395 | 00000000000000000095 | 19.87460691435179 | t | 2023-01-30 07:13:53.058937 + 096 | 0396 | 0396 | 396 | 00000000000000000096 | 19.8997487421324 | t | 2023-01-30 07:13:53.058941 + 097 | 0397 | 0397 | 397 | 00000000000000000097 | 19.924858845171276 | t | 2023-01-30 07:13:53.058944 + 098 | 0398 | 0398 | 398 | 00000000000000000098 | 19.949937343260004 | t | 2023-01-30 07:13:53.058949 + 099 | 0399 | 0399 | 399 | 00000000000000000099 | 19.974984355438178 | t | 2023-01-30 07:13:53.058952 + 000 | 0400 | 0400 | 400 | 00000000000000000000 | 20 | t | 2023-01-30 07:13:53.058956 + 001 | 0401 | 0401 | 401 | 00000000000000000001 | 20.024984394500787 | t | 2023-01-30 07:13:53.058959 + 002 | 0402 | 0402 | 402 | 00000000000000000002 | 20.049937655763422 | t | 2023-01-30 07:13:53.058963 + 003 | 0403 | 0403 | 403 | 00000000000000000003 | 20.074859899884732 | t | 2023-01-30 07:13:53.058966 + 004 | 0404 | 0404 | 404 | 00000000000000000004 | 20.09975124224178 | t | 2023-01-30 07:13:53.058971 + 005 | 0405 | 0405 | 405 | 00000000000000000005 | 20.12461179749811 | t | 2023-01-30 07:13:53.058974 + 006 | 0406 | 0406 | 406 | 00000000000000000006 | 20.149441679609886 | t | 2023-01-30 07:13:53.058978 + 007 | 0407 | 0407 | 407 | 00000000000000000007 | 20.174241001832016 | t | 2023-01-30 07:13:53.058981 + 008 | 0408 | 0408 | 408 | 00000000000000000008 | 20.199009876724155 | t | 2023-01-30 07:13:53.058985 + 009 | 0409 | 0409 | 409 | 00000000000000000009 | 20.223748416156685 | t | 2023-01-30 07:13:53.058988 + 010 | 0410 | 0410 | 410 | 00000000000000000010 | 20.248456731316587 | t | 2023-01-30 07:13:53.058993 + 011 | 0411 | 0411 | 411 | 00000000000000000011 | 20.273134932713294 | t | 2023-01-30 07:13:53.058996 + 012 | 0412 | 0412 | 412 | 00000000000000000012 | 20.29778313018444 | t | 2023-01-30 07:13:53.059 + 013 | 0413 | 0413 | 413 | 00000000000000000013 | 20.322401432901575 | t | 2023-01-30 07:13:53.059003 + 014 | 0414 | 0414 | 414 | 00000000000000000014 | 20.346989949375804 | t | 2023-01-30 07:13:53.059008 + 015 | 0415 | 0415 | 415 | 00000000000000000015 | 20.37154878746336 | t | 2023-01-30 07:13:53.059011 + 016 | 0416 | 0416 | 416 | 00000000000000000016 | 20.396078054371138 | t | 2023-01-30 07:13:53.059016 + 017 | 0417 | 0417 | 417 | 00000000000000000017 | 20.42057785666214 | t | 2023-01-30 07:13:53.059019 + 018 | 0418 | 0418 | 418 | 00000000000000000018 | 20.445048300260872 | t | 2023-01-30 07:13:53.059025 + 019 | 0419 | 0419 | 419 | 00000000000000000019 | 20.46948949045872 | t | 2023-01-30 07:13:53.059028 + 020 | 0420 | 0420 | 420 | 00000000000000000020 | 20.493901531919196 | t | 2023-01-30 07:13:53.059031 + 021 | 0421 | 0421 | 421 | 00000000000000000021 | 20.518284528683193 | t | 2023-01-30 07:13:53.059035 + 022 | 0422 | 0422 | 422 | 00000000000000000022 | 20.54263858417414 | t | 2023-01-30 07:13:53.059038 + 023 | 0423 | 0423 | 423 | 00000000000000000023 | 20.566963801203133 | t | 2023-01-30 07:13:53.059043 + 024 | 0424 | 0424 | 424 | 00000000000000000024 | 20.591260281974 | t | 2023-01-30 07:13:53.059046 + 025 | 0425 | 0425 | 425 | 00000000000000000025 | 20.615528128088304 | t | 2023-01-30 07:13:53.05905 + 026 | 0426 | 0426 | 426 | 00000000000000000026 | 20.639767440550294 | t | 2023-01-30 07:13:53.059053 + 027 | 0427 | 0427 | 427 | 00000000000000000027 | 20.663978319771825 | t | 2023-01-30 07:13:53.05906 + 028 | 0428 | 0428 | 428 | 00000000000000000028 | 20.688160865577203 | t | 2023-01-30 07:13:53.059063 + 029 | 0429 | 0429 | 429 | 00000000000000000029 | 20.71231517720798 | t | 2023-01-30 07:13:53.059091 + 030 | 0430 | 0430 | 430 | 00000000000000000030 | 20.73644135332772 | t | 2023-01-30 07:13:53.059095 + 031 | 0431 | 0431 | 431 | 00000000000000000031 | 20.760539492026695 | t | 2023-01-30 07:13:53.059099 + 032 | 0432 | 0432 | 432 | 00000000000000000032 | 20.784609690826528 | t | 2023-01-30 07:13:53.059102 + 033 | 0433 | 0433 | 433 | 00000000000000000033 | 20.808652046684813 | t | 2023-01-30 07:13:53.059111 + 034 | 0434 | 0434 | 434 | 00000000000000000034 | 20.83266665599966 | t | 2023-01-30 07:13:53.059114 + 035 | 0435 | 0435 | 435 | 00000000000000000035 | 20.85665361461421 | t | 2023-01-30 07:13:53.059118 + 036 | 0436 | 0436 | 436 | 00000000000000000036 | 20.8806130178211 | t | 2023-01-30 07:13:53.059121 + 037 | 0437 | 0437 | 437 | 00000000000000000037 | 20.904544960366874 | t | 2023-01-30 07:13:53.059124 + 038 | 0438 | 0438 | 438 | 00000000000000000038 | 20.92844953645635 | t | 2023-01-30 07:13:53.059128 + 039 | 0439 | 0439 | 439 | 00000000000000000039 | 20.952326839756964 | t | 2023-01-30 07:13:53.059132 + 040 | 0440 | 0440 | 440 | 00000000000000000040 | 20.97617696340303 | t | 2023-01-30 07:13:53.059136 + 041 | 0441 | 0441 | 441 | 00000000000000000041 | 21 | t | 2023-01-30 07:13:53.059139 + 042 | 0442 | 0442 | 442 | 00000000000000000042 | 21.02379604162864 | t | 2023-01-30 07:13:53.059144 + 043 | 0443 | 0443 | 443 | 00000000000000000043 | 21.047565179849187 | t | 2023-01-30 07:13:53.059147 + 044 | 0444 | 0444 | 444 | 00000000000000000044 | 21.071307505705477 | t | 2023-01-30 07:13:53.059152 + 045 | 0445 | 0445 | 445 | 00000000000000000045 | 21.095023109728988 | t | 2023-01-30 07:13:53.059155 + 046 | 0446 | 0446 | 446 | 00000000000000000046 | 21.118712081942874 | t | 2023-01-30 07:13:53.059159 + 047 | 0447 | 0447 | 447 | 00000000000000000047 | 21.142374511865974 | t | 2023-01-30 07:13:53.059162 + 048 | 0448 | 0448 | 448 | 00000000000000000048 | 21.166010488516726 | t | 2023-01-30 07:13:53.059166 + 049 | 0449 | 0449 | 449 | 00000000000000000049 | 21.18962010041709 | t | 2023-01-30 07:13:53.059169 + 050 | 0450 | 0450 | 450 | 00000000000000000050 | 21.213203435596427 | t | 2023-01-30 07:13:53.059173 + 051 | 0451 | 0451 | 451 | 00000000000000000051 | 21.236760581595302 | t | 2023-01-30 07:13:53.059176 + 052 | 0452 | 0452 | 452 | 00000000000000000052 | 21.2602916254693 | t | 2023-01-30 07:13:53.059181 + 053 | 0453 | 0453 | 453 | 00000000000000000053 | 21.283796653792763 | t | 2023-01-30 07:13:53.059184 + 054 | 0454 | 0454 | 454 | 00000000000000000054 | 21.307275752662516 | t | 2023-01-30 07:13:53.059188 + 055 | 0455 | 0455 | 455 | 00000000000000000055 | 21.330729007701542 | t | 2023-01-30 07:13:53.059191 + 056 | 0456 | 0456 | 456 | 00000000000000000056 | 21.354156504062622 | t | 2023-01-30 07:13:53.059196 + 057 | 0457 | 0457 | 457 | 00000000000000000057 | 21.37755832643195 | t | 2023-01-30 07:13:53.059199 + 058 | 0458 | 0458 | 458 | 00000000000000000058 | 21.400934559032695 | t | 2023-01-30 07:13:53.059203 + 059 | 0459 | 0459 | 459 | 00000000000000000059 | 21.42428528562855 | t | 2023-01-30 07:13:53.059206 + 060 | 0460 | 0460 | 460 | 00000000000000000060 | 21.447610589527216 | t | 2023-01-30 07:13:53.05921 + 061 | 0461 | 0461 | 461 | 00000000000000000061 | 21.470910553583888 | t | 2023-01-30 07:13:53.059213 + 062 | 0462 | 0462 | 462 | 00000000000000000062 | 21.494185260204677 | t | 2023-01-30 07:13:53.059217 + 063 | 0463 | 0463 | 463 | 00000000000000000063 | 21.517434791350013 | t | 2023-01-30 07:13:53.05922 + 064 | 0464 | 0464 | 464 | 00000000000000000064 | 21.540659228538015 | t | 2023-01-30 07:13:53.059225 + 065 | 0465 | 0465 | 465 | 00000000000000000065 | 21.563858652847824 | t | 2023-01-30 07:13:53.059228 + 066 | 0466 | 0466 | 466 | 00000000000000000066 | 21.587033144922902 | t | 2023-01-30 07:13:53.059232 + 067 | 0467 | 0467 | 467 | 00000000000000000067 | 21.61018278497431 | t | 2023-01-30 07:13:53.059235 + 068 | 0468 | 0468 | 468 | 00000000000000000068 | 21.633307652783937 | t | 2023-01-30 07:13:53.059239 + 069 | 0469 | 0469 | 469 | 00000000000000000069 | 21.656407827707714 | t | 2023-01-30 07:13:53.059242 + 070 | 0470 | 0470 | 470 | 00000000000000000070 | 21.6794833886788 | t | 2023-01-30 07:13:53.059247 + 071 | 0471 | 0471 | 471 | 00000000000000000071 | 21.702534414210707 | t | 2023-01-30 07:13:53.05925 + 072 | 0472 | 0472 | 472 | 00000000000000000072 | 21.72556098240043 | t | 2023-01-30 07:13:53.059255 + 073 | 0473 | 0473 | 473 | 00000000000000000073 | 21.748563170931547 | t | 2023-01-30 07:13:53.059258 + 074 | 0474 | 0474 | 474 | 00000000000000000074 | 21.77154105707724 | t | 2023-01-30 07:13:53.059262 + 075 | 0475 | 0475 | 475 | 00000000000000000075 | 21.79449471770337 | t | 2023-01-30 07:13:53.059265 + 076 | 0476 | 0476 | 476 | 00000000000000000076 | 21.817424229271428 | t | 2023-01-30 07:13:53.059269 + 077 | 0477 | 0477 | 477 | 00000000000000000077 | 21.840329667841555 | t | 2023-01-30 07:13:53.059272 + 078 | 0478 | 0478 | 478 | 00000000000000000078 | 21.863211109075447 | t | 2023-01-30 07:13:53.059276 + 079 | 0479 | 0479 | 479 | 00000000000000000079 | 21.88606862823929 | t | 2023-01-30 07:13:53.059279 + 080 | 0480 | 0480 | 480 | 00000000000000000080 | 21.908902300206645 | t | 2023-01-30 07:13:53.059283 + 081 | 0481 | 0481 | 481 | 00000000000000000081 | 21.93171219946131 | t | 2023-01-30 07:13:53.059287 + 082 | 0482 | 0482 | 482 | 00000000000000000082 | 21.95449840010015 | t | 2023-01-30 07:13:53.059291 + 083 | 0483 | 0483 | 483 | 00000000000000000083 | 21.97726097583591 | t | 2023-01-30 07:13:53.059294 + 084 | 0484 | 0484 | 484 | 00000000000000000084 | 22 | t | 2023-01-30 07:13:53.059297 + 085 | 0485 | 0485 | 485 | 00000000000000000085 | 22.02271554554524 | t | 2023-01-30 07:13:53.059304 + 086 | 0486 | 0486 | 486 | 00000000000000000086 | 22.045407685048602 | t | 2023-01-30 07:13:53.059307 + 087 | 0487 | 0487 | 487 | 00000000000000000087 | 22.06807649071391 | t | 2023-01-30 07:13:53.059311 + 088 | 0488 | 0488 | 488 | 00000000000000000088 | 22.090722034374522 | t | 2023-01-30 07:13:53.059314 + 089 | 0489 | 0489 | 489 | 00000000000000000089 | 22.11334438749598 | t | 2023-01-30 07:13:53.059319 + 090 | 0490 | 0490 | 490 | 00000000000000000090 | 22.135943621178654 | t | 2023-01-30 07:13:53.059322 + 091 | 0491 | 0491 | 491 | 00000000000000000091 | 22.15851980616034 | t | 2023-01-30 07:13:53.059326 + 092 | 0492 | 0492 | 492 | 00000000000000000092 | 22.181073012818835 | t | 2023-01-30 07:13:53.059329 + 093 | 0493 | 0493 | 493 | 00000000000000000093 | 22.20360331117452 | t | 2023-01-30 07:13:53.059334 + 094 | 0494 | 0494 | 494 | 00000000000000000094 | 22.22611077089287 | t | 2023-01-30 07:13:53.059337 + 095 | 0495 | 0495 | 495 | 00000000000000000095 | 22.24859546128699 | t | 2023-01-30 07:13:53.059341 + 096 | 0496 | 0496 | 496 | 00000000000000000096 | 22.271057451320086 | t | 2023-01-30 07:13:53.059344 + 097 | 0497 | 0497 | 497 | 00000000000000000097 | 22.293496809607955 | t | 2023-01-30 07:13:53.059353 + 098 | 0498 | 0498 | 498 | 00000000000000000098 | 22.315913604421397 | t | 2023-01-30 07:13:53.059356 + 099 | 0499 | 0499 | 499 | 00000000000000000099 | 22.338307903688676 | t | 2023-01-30 07:13:53.059361 + 000 | 0500 | 0500 | 500 | 00000000000000000000 | 22.360679774997898 | t | 2023-01-30 07:13:53.059364 + 001 | 0501 | 0501 | 501 | 00000000000000000001 | 22.38302928559939 | t | 2023-01-30 07:13:53.059369 + 002 | 0502 | 0502 | 502 | 00000000000000000002 | 22.40535650240808 | t | 2023-01-30 07:13:53.059372 + 003 | 0503 | 0503 | 503 | 00000000000000000003 | 22.427661492005804 | t | 2023-01-30 07:13:53.059376 + 004 | 0504 | 0504 | 504 | 00000000000000000004 | 22.44994432064365 | t | 2023-01-30 07:13:53.059379 + 005 | 0505 | 0505 | 505 | 00000000000000000005 | 22.47220505424423 | t | 2023-01-30 07:13:53.059383 + 006 | 0506 | 0506 | 506 | 00000000000000000006 | 22.494443758403985 | t | 2023-01-30 07:13:53.059386 + 007 | 0507 | 0507 | 507 | 00000000000000000007 | 22.516660498395403 | t | 2023-01-30 07:13:53.059391 + 008 | 0508 | 0508 | 508 | 00000000000000000008 | 22.538855339169288 | t | 2023-01-30 07:13:53.059394 + 009 | 0509 | 0509 | 509 | 00000000000000000009 | 22.561028345356956 | t | 2023-01-30 07:13:53.059398 + 010 | 0510 | 0510 | 510 | 00000000000000000010 | 22.58317958127243 | t | 2023-01-30 07:13:53.059401 + 011 | 0511 | 0511 | 511 | 00000000000000000011 | 22.60530911091463 | t | 2023-01-30 07:13:53.059405 + 012 | 0512 | 0512 | 512 | 00000000000000000012 | 22.627416997969522 | t | 2023-01-30 07:13:53.059408 + 013 | 0513 | 0513 | 513 | 00000000000000000013 | 22.64950330581225 | t | 2023-01-30 07:13:53.059412 + 014 | 0514 | 0514 | 514 | 00000000000000000014 | 22.67156809750927 | t | 2023-01-30 07:13:53.059415 + 015 | 0515 | 0515 | 515 | 00000000000000000015 | 22.693611435820433 | t | 2023-01-30 07:13:53.05942 + 016 | 0516 | 0516 | 516 | 00000000000000000016 | 22.715633383201094 | t | 2023-01-30 07:13:53.059423 + 017 | 0517 | 0517 | 517 | 00000000000000000017 | 22.737634001804146 | t | 2023-01-30 07:13:53.059427 + 018 | 0518 | 0518 | 518 | 00000000000000000018 | 22.759613353482084 | t | 2023-01-30 07:13:53.05943 + 019 | 0519 | 0519 | 519 | 00000000000000000019 | 22.781571499789035 | t | 2023-01-30 07:13:53.059434 + 020 | 0520 | 0520 | 520 | 00000000000000000020 | 22.80350850198276 | t | 2023-01-30 07:13:53.059437 + 021 | 0521 | 0521 | 521 | 00000000000000000021 | 22.825424421026653 | t | 2023-01-30 07:13:53.059442 + 022 | 0522 | 0522 | 522 | 00000000000000000022 | 22.847319317591726 | t | 2023-01-30 07:13:53.059445 + 023 | 0523 | 0523 | 523 | 00000000000000000023 | 22.869193252058544 | t | 2023-01-30 07:13:53.059449 + 024 | 0524 | 0524 | 524 | 00000000000000000024 | 22.891046284519195 | t | 2023-01-30 07:13:53.059452 + 025 | 0525 | 0525 | 525 | 00000000000000000025 | 22.9128784747792 | t | 2023-01-30 07:13:53.059476 + 026 | 0526 | 0526 | 526 | 00000000000000000026 | 22.93468988235943 | t | 2023-01-30 07:13:53.059479 + 027 | 0527 | 0527 | 527 | 00000000000000000027 | 22.956480566497994 | t | 2023-01-30 07:13:53.059484 + 028 | 0528 | 0528 | 528 | 00000000000000000028 | 22.978250586152114 | t | 2023-01-30 07:13:53.059487 + 029 | 0529 | 0529 | 529 | 00000000000000000029 | 23 | t | 2023-01-30 07:13:53.059491 + 030 | 0530 | 0530 | 530 | 00000000000000000030 | 23.021728866442675 | t | 2023-01-30 07:13:53.059494 + 031 | 0531 | 0531 | 531 | 00000000000000000031 | 23.043437243605826 | t | 2023-01-30 07:13:53.059498 + 032 | 0532 | 0532 | 532 | 00000000000000000032 | 23.065125189341593 | t | 2023-01-30 07:13:53.059501 + 033 | 0533 | 0533 | 533 | 00000000000000000033 | 23.08679276123039 | t | 2023-01-30 07:13:53.059506 + 034 | 0534 | 0534 | 534 | 00000000000000000034 | 23.108440016582687 | t | 2023-01-30 07:13:53.059509 + 035 | 0535 | 0535 | 535 | 00000000000000000035 | 23.130067012440755 | t | 2023-01-30 07:13:53.059513 + 036 | 0536 | 0536 | 536 | 00000000000000000036 | 23.15167380558045 | t | 2023-01-30 07:13:53.059516 + 037 | 0537 | 0537 | 537 | 00000000000000000037 | 23.173260452512935 | t | 2023-01-30 07:13:53.05952 + 038 | 0538 | 0538 | 538 | 00000000000000000038 | 23.194827009486403 | t | 2023-01-30 07:13:53.059523 + 039 | 0539 | 0539 | 539 | 00000000000000000039 | 23.2163735324878 | t | 2023-01-30 07:13:53.059528 + 040 | 0540 | 0540 | 540 | 00000000000000000040 | 23.2379000772445 | t | 2023-01-30 07:13:53.059531 + 041 | 0541 | 0541 | 541 | 00000000000000000041 | 23.259406699226016 | t | 2023-01-30 07:13:53.059533 + 042 | 0542 | 0542 | 542 | 00000000000000000042 | 23.280893453645632 | t | 2023-01-30 07:13:53.059538 + 043 | 0543 | 0543 | 543 | 00000000000000000043 | 23.302360395462088 | t | 2023-01-30 07:13:53.059541 + 044 | 0544 | 0544 | 544 | 00000000000000000044 | 23.323807579381203 | t | 2023-01-30 07:13:53.059545 + 045 | 0545 | 0545 | 545 | 00000000000000000045 | 23.345235059857504 | t | 2023-01-30 07:13:53.059548 + 046 | 0546 | 0546 | 546 | 00000000000000000046 | 23.366642891095847 | t | 2023-01-30 07:13:53.059553 + 047 | 0547 | 0547 | 547 | 00000000000000000047 | 23.388031127053 | t | 2023-01-30 07:13:53.059556 + 048 | 0548 | 0548 | 548 | 00000000000000000048 | 23.40939982143925 | t | 2023-01-30 07:13:53.05956 + 049 | 0549 | 0549 | 549 | 00000000000000000049 | 23.430749027719962 | t | 2023-01-30 07:13:53.059563 + 050 | 0550 | 0550 | 550 | 00000000000000000050 | 23.45207879911715 | t | 2023-01-30 07:13:53.059567 + 051 | 0551 | 0551 | 551 | 00000000000000000051 | 23.473389188611005 | t | 2023-01-30 07:13:53.05957 + 052 | 0552 | 0552 | 552 | 00000000000000000052 | 23.49468024894146 | t | 2023-01-30 07:13:53.059577 + 053 | 0553 | 0553 | 553 | 00000000000000000053 | 23.515952032609693 | t | 2023-01-30 07:13:53.05958 + 054 | 0554 | 0554 | 554 | 00000000000000000054 | 23.53720459187964 | t | 2023-01-30 07:13:53.059585 + 055 | 0555 | 0555 | 555 | 00000000000000000055 | 23.558437978779494 | t | 2023-01-30 07:13:53.059773 + 056 | 0556 | 0556 | 556 | 00000000000000000056 | 23.57965224510319 | t | 2023-01-30 07:13:53.059786 + 057 | 0557 | 0557 | 557 | 00000000000000000057 | 23.600847442411894 | t | 2023-01-30 07:13:53.059789 + 058 | 0558 | 0558 | 558 | 00000000000000000058 | 23.62202362203543 | t | 2023-01-30 07:13:53.059794 + 059 | 0559 | 0559 | 559 | 00000000000000000059 | 23.643180835073778 | t | 2023-01-30 07:13:53.059797 + 060 | 0560 | 0560 | 560 | 00000000000000000060 | 23.664319132398465 | t | 2023-01-30 07:13:53.059806 + 061 | 0561 | 0561 | 561 | 00000000000000000061 | 23.68543856465402 | t | 2023-01-30 07:13:53.059809 + 062 | 0562 | 0562 | 562 | 00000000000000000062 | 23.706539182259394 | t | 2023-01-30 07:13:53.059813 + 063 | 0563 | 0563 | 563 | 00000000000000000063 | 23.727621035409346 | t | 2023-01-30 07:13:53.059816 + 064 | 0564 | 0564 | 564 | 00000000000000000064 | 23.748684174075834 | t | 2023-01-30 07:13:53.05982 + 065 | 0565 | 0565 | 565 | 00000000000000000065 | 23.769728648009426 | t | 2023-01-30 07:13:53.059823 + 066 | 0566 | 0566 | 566 | 00000000000000000066 | 23.790754506740637 | t | 2023-01-30 07:13:53.059828 + 067 | 0567 | 0567 | 567 | 00000000000000000067 | 23.811761799581316 | t | 2023-01-30 07:13:53.059831 + 068 | 0568 | 0568 | 568 | 00000000000000000068 | 23.83275057562597 | t | 2023-01-30 07:13:53.059835 + 069 | 0569 | 0569 | 569 | 00000000000000000069 | 23.853720883753127 | t | 2023-01-30 07:13:53.059838 + 070 | 0570 | 0570 | 570 | 00000000000000000070 | 23.874672772626646 | t | 2023-01-30 07:13:53.059842 + 071 | 0571 | 0571 | 571 | 00000000000000000071 | 23.895606290697042 | t | 2023-01-30 07:13:53.059845 + 072 | 0572 | 0572 | 572 | 00000000000000000072 | 23.916521486202797 | t | 2023-01-30 07:13:53.05985 + 073 | 0573 | 0573 | 573 | 00000000000000000073 | 23.93741840717165 | t | 2023-01-30 07:13:53.059853 + 074 | 0574 | 0574 | 574 | 00000000000000000074 | 23.958297101421877 | t | 2023-01-30 07:13:53.059857 + 075 | 0575 | 0575 | 575 | 00000000000000000075 | 23.979157616563597 | t | 2023-01-30 07:13:53.05986 + 076 | 0576 | 0576 | 576 | 00000000000000000076 | 24 | t | 2023-01-30 07:13:53.059864 + 077 | 0577 | 0577 | 577 | 00000000000000000077 | 24.020824298928627 | t | 2023-01-30 07:13:53.059867 + 078 | 0578 | 0578 | 578 | 00000000000000000078 | 24.041630560342615 | t | 2023-01-30 07:13:53.059872 + 079 | 0579 | 0579 | 579 | 00000000000000000079 | 24.06241883103193 | t | 2023-01-30 07:13:53.059875 + 080 | 0580 | 0580 | 580 | 00000000000000000080 | 24.08318915758459 | t | 2023-01-30 07:13:53.059879 + 081 | 0581 | 0581 | 581 | 00000000000000000081 | 24.1039415863879 | t | 2023-01-30 07:13:53.059882 + 082 | 0582 | 0582 | 582 | 00000000000000000082 | 24.124676163629637 | t | 2023-01-30 07:13:53.059886 + 083 | 0583 | 0583 | 583 | 00000000000000000083 | 24.145392935299274 | t | 2023-01-30 07:13:53.059889 + 084 | 0584 | 0584 | 584 | 00000000000000000084 | 24.166091947189145 | t | 2023-01-30 07:13:53.059894 + 085 | 0585 | 0585 | 585 | 00000000000000000085 | 24.186773244895647 | t | 2023-01-30 07:13:53.059897 + 086 | 0586 | 0586 | 586 | 00000000000000000086 | 24.20743687382041 | t | 2023-01-30 07:13:53.0599 + 087 | 0587 | 0587 | 587 | 00000000000000000087 | 24.228082879171435 | t | 2023-01-30 07:13:53.059905 + 088 | 0588 | 0588 | 588 | 00000000000000000088 | 24.24871130596428 | t | 2023-01-30 07:13:53.059908 + 089 | 0589 | 0589 | 589 | 00000000000000000089 | 24.269322199023193 | t | 2023-01-30 07:13:53.059912 + 090 | 0590 | 0590 | 590 | 00000000000000000090 | 24.289915602982237 | t | 2023-01-30 07:13:53.059915 + 091 | 0591 | 0591 | 591 | 00000000000000000091 | 24.310491562286437 | t | 2023-01-30 07:13:53.059919 + 092 | 0592 | 0592 | 592 | 00000000000000000092 | 24.331050121192877 | t | 2023-01-30 07:13:53.059922 + 093 | 0593 | 0593 | 593 | 00000000000000000093 | 24.351591323771842 | t | 2023-01-30 07:13:53.059927 + 094 | 0594 | 0594 | 594 | 00000000000000000094 | 24.372115213907882 | t | 2023-01-30 07:13:53.05993 + 095 | 0595 | 0595 | 595 | 00000000000000000095 | 24.392621835300936 | t | 2023-01-30 07:13:53.059934 + 096 | 0596 | 0596 | 596 | 00000000000000000096 | 24.413111231467404 | t | 2023-01-30 07:13:53.059937 + 097 | 0597 | 0597 | 597 | 00000000000000000097 | 24.43358344574123 | t | 2023-01-30 07:13:53.059941 + 098 | 0598 | 0598 | 598 | 00000000000000000098 | 24.454038521274967 | t | 2023-01-30 07:13:53.059944 + 099 | 0599 | 0599 | 599 | 00000000000000000099 | 24.474476501040833 | t | 2023-01-30 07:13:53.059949 + 000 | 0600 | 0600 | 600 | 00000000000000000000 | 24.49489742783178 | t | 2023-01-30 07:13:53.059952 + 001 | 0601 | 0601 | 601 | 00000000000000000001 | 24.515301344262525 | t | 2023-01-30 07:13:53.059956 + 002 | 0602 | 0602 | 602 | 00000000000000000002 | 24.535688292770594 | t | 2023-01-30 07:13:53.059959 + 003 | 0603 | 0603 | 603 | 00000000000000000003 | 24.55605831561735 | t | 2023-01-30 07:13:53.059963 + 004 | 0604 | 0604 | 604 | 00000000000000000004 | 24.576411454889016 | t | 2023-01-30 07:13:53.059966 + 005 | 0605 | 0605 | 605 | 00000000000000000005 | 24.596747752497688 | t | 2023-01-30 07:13:53.05997 + 006 | 0606 | 0606 | 606 | 00000000000000000006 | 24.61706725018234 | t | 2023-01-30 07:13:53.059973 + 007 | 0607 | 0607 | 607 | 00000000000000000007 | 24.63736998950984 | t | 2023-01-30 07:13:53.059978 + 008 | 0608 | 0608 | 608 | 00000000000000000008 | 24.657656011875904 | t | 2023-01-30 07:13:53.059981 + 009 | 0609 | 0609 | 609 | 00000000000000000009 | 24.677925358506133 | t | 2023-01-30 07:13:53.059985 + 010 | 0610 | 0610 | 610 | 00000000000000000010 | 24.698178070456937 | t | 2023-01-30 07:13:53.059988 + 011 | 0611 | 0611 | 611 | 00000000000000000011 | 24.71841418861655 | t | 2023-01-30 07:13:53.059992 + 012 | 0612 | 0612 | 612 | 00000000000000000012 | 24.73863375370596 | t | 2023-01-30 07:13:53.059995 + 013 | 0613 | 0613 | 613 | 00000000000000000013 | 24.758836806279895 | t | 2023-01-30 07:13:53.06 + 014 | 0614 | 0614 | 614 | 00000000000000000014 | 24.779023386727733 | t | 2023-01-30 07:13:53.060003 + 015 | 0615 | 0615 | 615 | 00000000000000000015 | 24.79919353527449 | t | 2023-01-30 07:13:53.060007 + 016 | 0616 | 0616 | 616 | 00000000000000000016 | 24.819347291981714 | t | 2023-01-30 07:13:53.06001 + 017 | 0617 | 0617 | 617 | 00000000000000000017 | 24.839484696748443 | t | 2023-01-30 07:13:53.060014 + 018 | 0618 | 0618 | 618 | 00000000000000000018 | 24.859605789312106 | t | 2023-01-30 07:13:53.060017 + 019 | 0619 | 0619 | 619 | 00000000000000000019 | 24.879710609249457 | t | 2023-01-30 07:13:53.060025 + 020 | 0620 | 0620 | 620 | 00000000000000000020 | 24.899799195977465 | t | 2023-01-30 07:13:53.060028 + 021 | 0621 | 0621 | 621 | 00000000000000000021 | 24.919871588754223 | t | 2023-01-30 07:13:53.060032 + 022 | 0622 | 0622 | 622 | 00000000000000000022 | 24.939927826679853 | t | 2023-01-30 07:13:53.060035 + 023 | 0623 | 0623 | 623 | 00000000000000000023 | 24.95996794869737 | t | 2023-01-30 07:13:53.060065 + 024 | 0624 | 0624 | 624 | 00000000000000000024 | 24.979991993593593 | t | 2023-01-30 07:13:53.060068 + 025 | 0625 | 0625 | 625 | 00000000000000000025 | 25 | t | 2023-01-30 07:13:53.060073 + 026 | 0626 | 0626 | 626 | 00000000000000000026 | 25.019992006393608 | t | 2023-01-30 07:13:53.060076 + 027 | 0627 | 0627 | 627 | 00000000000000000027 | 25.03996805109783 | t | 2023-01-30 07:13:53.06008 + 028 | 0628 | 0628 | 628 | 00000000000000000028 | 25.059928172283335 | t | 2023-01-30 07:13:53.060083 + 029 | 0629 | 0629 | 629 | 00000000000000000029 | 25.079872407968907 | t | 2023-01-30 07:13:53.060087 + 030 | 0630 | 0630 | 630 | 00000000000000000030 | 25.099800796022265 | t | 2023-01-30 07:13:53.06009 + 031 | 0631 | 0631 | 631 | 00000000000000000031 | 25.11971337416094 | t | 2023-01-30 07:13:53.060095 + 032 | 0632 | 0632 | 632 | 00000000000000000032 | 25.13961017995307 | t | 2023-01-30 07:13:53.060098 + 033 | 0633 | 0633 | 633 | 00000000000000000033 | 25.15949125081825 | t | 2023-01-30 07:13:53.060102 + 034 | 0634 | 0634 | 634 | 00000000000000000034 | 25.179356624028344 | t | 2023-01-30 07:13:53.060105 + 035 | 0635 | 0635 | 635 | 00000000000000000035 | 25.199206336708304 | t | 2023-01-30 07:13:53.06011 + 036 | 0636 | 0636 | 636 | 00000000000000000036 | 25.219040425836983 | t | 2023-01-30 07:13:53.060113 + 037 | 0637 | 0637 | 637 | 00000000000000000037 | 25.238858928247925 | t | 2023-01-30 07:13:53.060117 + 038 | 0638 | 0638 | 638 | 00000000000000000038 | 25.25866188063018 | t | 2023-01-30 07:13:53.06012 + 039 | 0639 | 0639 | 639 | 00000000000000000039 | 25.278449319529077 | t | 2023-01-30 07:13:53.060124 + 040 | 0640 | 0640 | 640 | 00000000000000000040 | 25.298221281347036 | t | 2023-01-30 07:13:53.060127 + 041 | 0641 | 0641 | 641 | 00000000000000000041 | 25.317977802344327 | t | 2023-01-30 07:13:53.060133 + 042 | 0642 | 0642 | 642 | 00000000000000000042 | 25.337718918639855 | t | 2023-01-30 07:13:53.060136 + 043 | 0643 | 0643 | 643 | 00000000000000000043 | 25.357444666211933 | t | 2023-01-30 07:13:53.060139 + 044 | 0644 | 0644 | 644 | 00000000000000000044 | 25.37715508089904 | t | 2023-01-30 07:13:53.060143 + 045 | 0645 | 0645 | 645 | 00000000000000000045 | 25.39685019840059 | t | 2023-01-30 07:13:53.060146 + 046 | 0646 | 0646 | 646 | 00000000000000000046 | 25.41653005427767 | t | 2023-01-30 07:13:53.060151 + 047 | 0647 | 0647 | 647 | 00000000000000000047 | 25.436194683953808 | t | 2023-01-30 07:13:53.060154 + 048 | 0648 | 0648 | 648 | 00000000000000000048 | 25.45584412271571 | t | 2023-01-30 07:13:53.060158 + 049 | 0649 | 0649 | 649 | 00000000000000000049 | 25.475478405713993 | t | 2023-01-30 07:13:53.060161 + 050 | 0650 | 0650 | 650 | 00000000000000000050 | 25.495097567963924 | t | 2023-01-30 07:13:53.060166 + 051 | 0651 | 0651 | 651 | 00000000000000000051 | 25.514701644346147 | t | 2023-01-30 07:13:53.060169 + 052 | 0652 | 0652 | 652 | 00000000000000000052 | 25.534290669607408 | t | 2023-01-30 07:13:53.060196 + 053 | 0653 | 0653 | 653 | 00000000000000000053 | 25.553864678361276 | t | 2023-01-30 07:13:53.060199 + 054 | 0654 | 0654 | 654 | 00000000000000000054 | 25.573423705088842 | t | 2023-01-30 07:13:53.060203 + 055 | 0655 | 0655 | 655 | 00000000000000000055 | 25.592967784139454 | t | 2023-01-30 07:13:53.060206 + 056 | 0656 | 0656 | 656 | 00000000000000000056 | 25.612496949731394 | t | 2023-01-30 07:13:53.06021 + 057 | 0657 | 0657 | 657 | 00000000000000000057 | 25.632011235952593 | t | 2023-01-30 07:13:53.060213 + 058 | 0658 | 0658 | 658 | 00000000000000000058 | 25.65151067676132 | t | 2023-01-30 07:13:53.060219 + 059 | 0659 | 0659 | 659 | 00000000000000000059 | 25.67099530598687 | t | 2023-01-30 07:13:53.060222 + 060 | 0660 | 0660 | 660 | 00000000000000000060 | 25.69046515733026 | t | 2023-01-30 07:13:53.060226 + 061 | 0661 | 0661 | 661 | 00000000000000000061 | 25.709920264364882 | t | 2023-01-30 07:13:53.060229 + 062 | 0662 | 0662 | 662 | 00000000000000000062 | 25.729360660537214 | t | 2023-01-30 07:13:53.060233 + 063 | 0663 | 0663 | 663 | 00000000000000000063 | 25.748786379167466 | t | 2023-01-30 07:13:53.060236 + 064 | 0664 | 0664 | 664 | 00000000000000000064 | 25.768197453450252 | t | 2023-01-30 07:13:53.060241 + 065 | 0665 | 0665 | 665 | 00000000000000000065 | 25.787593916455254 | t | 2023-01-30 07:13:53.060244 + 066 | 0666 | 0666 | 666 | 00000000000000000066 | 25.80697580112788 | t | 2023-01-30 07:13:53.060248 + 067 | 0667 | 0667 | 667 | 00000000000000000067 | 25.826343140289914 | t | 2023-01-30 07:13:53.060251 + 068 | 0668 | 0668 | 668 | 00000000000000000068 | 25.84569596664017 | t | 2023-01-30 07:13:53.060256 + 069 | 0669 | 0669 | 669 | 00000000000000000069 | 25.865034312755125 | t | 2023-01-30 07:13:53.060259 + 070 | 0670 | 0670 | 670 | 00000000000000000070 | 25.88435821108957 | t | 2023-01-30 07:13:53.060264 + 071 | 0671 | 0671 | 671 | 00000000000000000071 | 25.903667693977237 | t | 2023-01-30 07:13:53.060267 + 072 | 0672 | 0672 | 672 | 00000000000000000072 | 25.92296279363144 | t | 2023-01-30 07:13:53.060272 + 073 | 0673 | 0673 | 673 | 00000000000000000073 | 25.942243542145693 | t | 2023-01-30 07:13:53.060275 + 074 | 0674 | 0674 | 674 | 00000000000000000074 | 25.96150997149434 | t | 2023-01-30 07:13:53.060279 + 075 | 0675 | 0675 | 675 | 00000000000000000075 | 25.98076211353316 | t | 2023-01-30 07:13:53.060282 + 076 | 0676 | 0676 | 676 | 00000000000000000076 | 26 | t | 2023-01-30 07:13:53.060287 + 077 | 0677 | 0677 | 677 | 00000000000000000077 | 26.019223662515376 | t | 2023-01-30 07:13:53.06029 + 078 | 0678 | 0678 | 678 | 00000000000000000078 | 26.038433132583073 | t | 2023-01-30 07:13:53.060294 + 079 | 0679 | 0679 | 679 | 00000000000000000079 | 26.057628441590765 | t | 2023-01-30 07:13:53.060297 + 080 | 0680 | 0680 | 680 | 00000000000000000080 | 26.076809620810597 | t | 2023-01-30 07:13:53.060301 + 081 | 0681 | 0681 | 681 | 00000000000000000081 | 26.095976701399778 | t | 2023-01-30 07:13:53.060304 + 082 | 0682 | 0682 | 682 | 00000000000000000082 | 26.115129714401192 | t | 2023-01-30 07:13:53.060309 + 083 | 0683 | 0683 | 683 | 00000000000000000083 | 26.13426869074396 | t | 2023-01-30 07:13:53.060312 + 084 | 0684 | 0684 | 684 | 00000000000000000084 | 26.153393661244042 | t | 2023-01-30 07:13:53.060316 + 085 | 0685 | 0685 | 685 | 00000000000000000085 | 26.1725046566048 | t | 2023-01-30 07:13:53.060319 + 086 | 0686 | 0686 | 686 | 00000000000000000086 | 26.19160170741759 | t | 2023-01-30 07:13:53.06033 + 087 | 0687 | 0687 | 687 | 00000000000000000087 | 26.210684844162312 | t | 2023-01-30 07:13:53.060333 + 088 | 0688 | 0688 | 688 | 00000000000000000088 | 26.229754097208 | t | 2023-01-30 07:13:53.060337 + 089 | 0689 | 0689 | 689 | 00000000000000000089 | 26.248809496813376 | t | 2023-01-30 07:13:53.06034 + 090 | 0690 | 0690 | 690 | 00000000000000000090 | 26.267851073127396 | t | 2023-01-30 07:13:53.060343 + 091 | 0691 | 0691 | 691 | 00000000000000000091 | 26.28687885618983 | t | 2023-01-30 07:13:53.060348 + 092 | 0692 | 0692 | 692 | 00000000000000000092 | 26.30589287593181 | t | 2023-01-30 07:13:53.060351 + 093 | 0693 | 0693 | 693 | 00000000000000000093 | 26.324893162176366 | t | 2023-01-30 07:13:53.060355 + 094 | 0694 | 0694 | 694 | 00000000000000000094 | 26.343879744638983 | t | 2023-01-30 07:13:53.060358 + 095 | 0695 | 0695 | 695 | 00000000000000000095 | 26.362852652928137 | t | 2023-01-30 07:13:53.060362 + 096 | 0696 | 0696 | 696 | 00000000000000000096 | 26.38181191654584 | t | 2023-01-30 07:13:53.060365 + 097 | 0697 | 0697 | 697 | 00000000000000000097 | 26.40075756488817 | t | 2023-01-30 07:13:53.06037 + 098 | 0698 | 0698 | 698 | 00000000000000000098 | 26.419689627245813 | t | 2023-01-30 07:13:53.060373 + 099 | 0699 | 0699 | 699 | 00000000000000000099 | 26.43860813280457 | t | 2023-01-30 07:13:53.060378 + 000 | 0700 | 0700 | 700 | 00000000000000000000 | 26.457513110645905 | t | 2023-01-30 07:13:53.060381 + 001 | 0701 | 0701 | 701 | 00000000000000000001 | 26.476404589747453 | t | 2023-01-30 07:13:53.060385 + 002 | 0702 | 0702 | 702 | 00000000000000000002 | 26.49528259898354 | t | 2023-01-30 07:13:53.060388 + 003 | 0703 | 0703 | 703 | 00000000000000000003 | 26.514147167125703 | t | 2023-01-30 07:13:53.060392 + 004 | 0704 | 0704 | 704 | 00000000000000000004 | 26.5329983228432 | t | 2023-01-30 07:13:53.060395 + 005 | 0705 | 0705 | 705 | 00000000000000000005 | 26.551836094703507 | t | 2023-01-30 07:13:53.060399 + 006 | 0706 | 0706 | 706 | 00000000000000000006 | 26.570660511172846 | t | 2023-01-30 07:13:53.060402 + 007 | 0707 | 0707 | 707 | 00000000000000000007 | 26.589471600616662 | t | 2023-01-30 07:13:53.060406 + 008 | 0708 | 0708 | 708 | 00000000000000000008 | 26.60826939130014 | t | 2023-01-30 07:13:53.060409 + 009 | 0709 | 0709 | 709 | 00000000000000000009 | 26.627053911388696 | t | 2023-01-30 07:13:53.060414 + 010 | 0710 | 0710 | 710 | 00000000000000000010 | 26.645825188948457 | t | 2023-01-30 07:13:53.060417 + 011 | 0711 | 0711 | 711 | 00000000000000000011 | 26.664583251946766 | t | 2023-01-30 07:13:53.060421 + 012 | 0712 | 0712 | 712 | 00000000000000000012 | 26.68332812825267 | t | 2023-01-30 07:13:53.060424 + 013 | 0713 | 0713 | 713 | 00000000000000000013 | 26.70205984563738 | t | 2023-01-30 07:13:53.060428 + 014 | 0714 | 0714 | 714 | 00000000000000000014 | 26.720778431774775 | t | 2023-01-30 07:13:53.060431 + 015 | 0715 | 0715 | 715 | 00000000000000000015 | 26.739483914241877 | t | 2023-01-30 07:13:53.060435 + 016 | 0716 | 0716 | 716 | 00000000000000000016 | 26.758176320519304 | t | 2023-01-30 07:13:53.060438 + 017 | 0717 | 0717 | 717 | 00000000000000000017 | 26.77685567799177 | t | 2023-01-30 07:13:53.060443 + 018 | 0718 | 0718 | 718 | 00000000000000000018 | 26.795522013948524 | t | 2023-01-30 07:13:53.060446 + 019 | 0719 | 0719 | 719 | 00000000000000000019 | 26.814175355583846 | t | 2023-01-30 07:13:53.06045 + 020 | 0720 | 0720 | 720 | 00000000000000000020 | 26.832815729997478 | t | 2023-01-30 07:13:53.060453 + 021 | 0721 | 0721 | 721 | 00000000000000000021 | 26.851443164195103 | t | 2023-01-30 07:13:53.060457 + 022 | 0722 | 0722 | 722 | 00000000000000000022 | 26.870057685088806 | t | 2023-01-30 07:13:53.06046 + 023 | 0723 | 0723 | 723 | 00000000000000000023 | 26.888659319497503 | t | 2023-01-30 07:13:53.060465 + 024 | 0724 | 0724 | 724 | 00000000000000000024 | 26.90724809414742 | t | 2023-01-30 07:13:53.060467 + 025 | 0725 | 0725 | 725 | 00000000000000000025 | 26.92582403567252 | t | 2023-01-30 07:13:53.060472 + 026 | 0726 | 0726 | 726 | 00000000000000000026 | 26.94438717061496 | t | 2023-01-30 07:13:53.060475 + 027 | 0727 | 0727 | 727 | 00000000000000000027 | 26.962937525425527 | t | 2023-01-30 07:13:53.06048 + 028 | 0728 | 0728 | 728 | 00000000000000000028 | 26.981475126464083 | t | 2023-01-30 07:13:53.060483 + 029 | 0729 | 0729 | 729 | 00000000000000000029 | 27 | t | 2023-01-30 07:13:53.060487 + 030 | 0730 | 0730 | 730 | 00000000000000000030 | 27.018512172212592 | t | 2023-01-30 07:13:53.06049 + 031 | 0731 | 0731 | 731 | 00000000000000000031 | 27.03701166919155 | t | 2023-01-30 07:13:53.060494 + 032 | 0732 | 0732 | 732 | 00000000000000000032 | 27.055498516937366 | t | 2023-01-30 07:13:53.060497 + 033 | 0733 | 0733 | 733 | 00000000000000000033 | 27.073972741361768 | t | 2023-01-30 07:13:53.060501 + 034 | 0734 | 0734 | 734 | 00000000000000000034 | 27.09243436828813 | t | 2023-01-30 07:13:53.060504 + 035 | 0735 | 0735 | 735 | 00000000000000000035 | 27.110883423451916 | t | 2023-01-30 07:13:53.060509 + 036 | 0736 | 0736 | 736 | 00000000000000000036 | 27.129319932501073 | t | 2023-01-30 07:13:53.060512 + 037 | 0737 | 0737 | 737 | 00000000000000000037 | 27.147743920996454 | t | 2023-01-30 07:13:53.060516 + 038 | 0738 | 0738 | 738 | 00000000000000000038 | 27.16615541441225 | t | 2023-01-30 07:13:53.060519 + 039 | 0739 | 0739 | 739 | 00000000000000000039 | 27.184554438136374 | t | 2023-01-30 07:13:53.060523 + 040 | 0740 | 0740 | 740 | 00000000000000000040 | 27.202941017470888 | t | 2023-01-30 07:13:53.060526 + 041 | 0741 | 0741 | 741 | 00000000000000000041 | 27.2213151776324 | t | 2023-01-30 07:13:53.06053 + 042 | 0742 | 0742 | 742 | 00000000000000000042 | 27.23967694375247 | t | 2023-01-30 07:13:53.060533 + 043 | 0743 | 0743 | 743 | 00000000000000000043 | 27.258026340878022 | t | 2023-01-30 07:13:53.060537 + 044 | 0744 | 0744 | 744 | 00000000000000000044 | 27.27636339397171 | t | 2023-01-30 07:13:53.06054 + 045 | 0745 | 0745 | 745 | 00000000000000000045 | 27.294688127912362 | t | 2023-01-30 07:13:53.060543 + 046 | 0746 | 0746 | 746 | 00000000000000000046 | 27.313000567495326 | t | 2023-01-30 07:13:53.060548 + 047 | 0747 | 0747 | 747 | 00000000000000000047 | 27.331300737432898 | t | 2023-01-30 07:13:53.060551 + 048 | 0748 | 0748 | 748 | 00000000000000000048 | 27.349588662354687 | t | 2023-01-30 07:13:53.060555 + 049 | 0749 | 0749 | 749 | 00000000000000000049 | 27.367864366808018 | t | 2023-01-30 07:13:53.060558 + 050 | 0750 | 0750 | 750 | 00000000000000000050 | 27.386127875258307 | t | 2023-01-30 07:13:53.060566 + 051 | 0751 | 0751 | 751 | 00000000000000000051 | 27.40437921208944 | t | 2023-01-30 07:13:53.060569 + 052 | 0752 | 0752 | 752 | 00000000000000000052 | 27.422618401604176 | t | 2023-01-30 07:13:53.060574 + 053 | 0753 | 0753 | 753 | 00000000000000000053 | 27.440845468024488 | t | 2023-01-30 07:13:53.060577 + 054 | 0754 | 0754 | 754 | 00000000000000000054 | 27.459060435491963 | t | 2023-01-30 07:13:53.060582 + 055 | 0755 | 0755 | 755 | 00000000000000000055 | 27.477263328068172 | t | 2023-01-30 07:13:53.060586 + 056 | 0756 | 0756 | 756 | 00000000000000000056 | 27.49545416973504 | t | 2023-01-30 07:13:53.06059 + 057 | 0757 | 0757 | 757 | 00000000000000000057 | 27.51363298439521 | t | 2023-01-30 07:13:53.060594 + 058 | 0758 | 0758 | 758 | 00000000000000000058 | 27.53179979587241 | t | 2023-01-30 07:13:53.060598 + 059 | 0759 | 0759 | 759 | 00000000000000000059 | 27.54995462791182 | t | 2023-01-30 07:13:53.060601 + 060 | 0760 | 0760 | 760 | 00000000000000000060 | 27.568097504180443 | t | 2023-01-30 07:13:53.060605 + 061 | 0761 | 0761 | 761 | 00000000000000000061 | 27.586228448267445 | t | 2023-01-30 07:13:53.060608 + 062 | 0762 | 0762 | 762 | 00000000000000000062 | 27.60434748368452 | t | 2023-01-30 07:13:53.060612 + 063 | 0763 | 0763 | 763 | 00000000000000000063 | 27.622454633866266 | t | 2023-01-30 07:13:53.060615 + 064 | 0764 | 0764 | 764 | 00000000000000000064 | 27.640549922170507 | t | 2023-01-30 07:13:53.06062 + 065 | 0765 | 0765 | 765 | 00000000000000000065 | 27.65863337187866 | t | 2023-01-30 07:13:53.060623 + 066 | 0766 | 0766 | 766 | 00000000000000000066 | 27.676705006196094 | t | 2023-01-30 07:13:53.060627 + 067 | 0767 | 0767 | 767 | 00000000000000000067 | 27.694764848252458 | t | 2023-01-30 07:13:53.06063 + 068 | 0768 | 0768 | 768 | 00000000000000000068 | 27.712812921102035 | t | 2023-01-30 07:13:53.060635 + 069 | 0769 | 0769 | 769 | 00000000000000000069 | 27.730849247724095 | t | 2023-01-30 07:13:53.060638 + 070 | 0770 | 0770 | 770 | 00000000000000000070 | 27.748873851023216 | t | 2023-01-30 07:13:53.060642 + 071 | 0771 | 0771 | 771 | 00000000000000000071 | 27.76688675382964 | t | 2023-01-30 07:13:53.060645 + 072 | 0772 | 0772 | 772 | 00000000000000000072 | 27.784887978899608 | t | 2023-01-30 07:13:53.06065 + 073 | 0773 | 0773 | 773 | 00000000000000000073 | 27.80287754891569 | t | 2023-01-30 07:13:53.060653 + 074 | 0774 | 0774 | 774 | 00000000000000000074 | 27.820855486487112 | t | 2023-01-30 07:13:53.060657 + 075 | 0775 | 0775 | 775 | 00000000000000000075 | 27.83882181415011 | t | 2023-01-30 07:13:53.06066 + 076 | 0776 | 0776 | 776 | 00000000000000000076 | 27.85677655436824 | t | 2023-01-30 07:13:53.060664 + 077 | 0777 | 0777 | 777 | 00000000000000000077 | 27.874719729532707 | t | 2023-01-30 07:13:53.060667 + 078 | 0778 | 0778 | 778 | 00000000000000000078 | 27.892651361962706 | t | 2023-01-30 07:13:53.060671 + 079 | 0779 | 0779 | 779 | 00000000000000000079 | 27.910571473905726 | t | 2023-01-30 07:13:53.060675 + 080 | 0780 | 0780 | 780 | 00000000000000000080 | 27.92848008753788 | t | 2023-01-30 07:13:53.060679 + 081 | 0781 | 0781 | 781 | 00000000000000000081 | 27.94637722496424 | t | 2023-01-30 07:13:53.060682 + 082 | 0782 | 0782 | 782 | 00000000000000000082 | 27.964262908219126 | t | 2023-01-30 07:13:53.060686 + 083 | 0783 | 0783 | 783 | 00000000000000000083 | 27.982137159266443 | t | 2023-01-30 07:13:53.060689 + 084 | 0784 | 0784 | 784 | 00000000000000000084 | 28 | t | 2023-01-30 07:13:53.060694 + 085 | 0785 | 0785 | 785 | 00000000000000000085 | 28.0178514522438 | t | 2023-01-30 07:13:53.060697 + 086 | 0786 | 0786 | 786 | 00000000000000000086 | 28.035691537752374 | t | 2023-01-30 07:13:53.060701 + 087 | 0787 | 0787 | 787 | 00000000000000000087 | 28.053520278211074 | t | 2023-01-30 07:13:53.060704 + 088 | 0788 | 0788 | 788 | 00000000000000000088 | 28.071337695236398 | t | 2023-01-30 07:13:53.060709 + 089 | 0789 | 0789 | 789 | 00000000000000000089 | 28.089143810376278 | t | 2023-01-30 07:13:53.060712 + 090 | 0790 | 0790 | 790 | 00000000000000000090 | 28.106938645110393 | t | 2023-01-30 07:13:53.060716 + 091 | 0791 | 0791 | 791 | 00000000000000000091 | 28.124722220850465 | t | 2023-01-30 07:13:53.060719 + 092 | 0792 | 0792 | 792 | 00000000000000000092 | 28.142494558940577 | t | 2023-01-30 07:13:53.060722 + 093 | 0793 | 0793 | 793 | 00000000000000000093 | 28.160255680657446 | t | 2023-01-30 07:13:53.060726 + 094 | 0794 | 0794 | 794 | 00000000000000000094 | 28.178005607210743 | t | 2023-01-30 07:13:53.060729 + 095 | 0795 | 0795 | 795 | 00000000000000000095 | 28.19574435974337 | t | 2023-01-30 07:13:53.060733 + 096 | 0796 | 0796 | 796 | 00000000000000000096 | 28.21347195933177 | t | 2023-01-30 07:13:53.060736 + 097 | 0797 | 0797 | 797 | 00000000000000000097 | 28.231188426986208 | t | 2023-01-30 07:13:53.060741 + 098 | 0798 | 0798 | 798 | 00000000000000000098 | 28.24889378365107 | t | 2023-01-30 07:13:53.060744 + 099 | 0799 | 0799 | 799 | 00000000000000000099 | 28.26658805020514 | t | 2023-01-30 07:13:53.060748 + 000 | 0800 | 0800 | 800 | 00000000000000000000 | 28.284271247461902 | t | 2023-01-30 07:13:53.060751 + 001 | 0801 | 0801 | 801 | 00000000000000000001 | 28.30194339616981 | t | 2023-01-30 07:13:53.060755 + 002 | 0802 | 0802 | 802 | 00000000000000000002 | 28.319604517012593 | t | 2023-01-30 07:13:53.060758 + 003 | 0803 | 0803 | 803 | 00000000000000000003 | 28.337254630609507 | t | 2023-01-30 07:13:53.060762 + 004 | 0804 | 0804 | 804 | 00000000000000000004 | 28.35489375751565 | t | 2023-01-30 07:13:53.060765 + 005 | 0805 | 0805 | 805 | 00000000000000000005 | 28.372521918222215 | t | 2023-01-30 07:13:53.06077 + 006 | 0806 | 0806 | 806 | 00000000000000000006 | 28.39013913315678 | t | 2023-01-30 07:13:53.060772 + 007 | 0807 | 0807 | 807 | 00000000000000000007 | 28.407745422683583 | t | 2023-01-30 07:13:53.060777 + 008 | 0808 | 0808 | 808 | 00000000000000000008 | 28.42534080710379 | t | 2023-01-30 07:13:53.06078 + 009 | 0809 | 0809 | 809 | 00000000000000000009 | 28.442925306655784 | t | 2023-01-30 07:13:53.060784 + 010 | 0810 | 0810 | 810 | 00000000000000000010 | 28.460498941515414 | t | 2023-01-30 07:13:53.060787 + 011 | 0811 | 0811 | 811 | 00000000000000000011 | 28.478061731796284 | t | 2023-01-30 07:13:53.060791 + 012 | 0812 | 0812 | 812 | 00000000000000000012 | 28.495613697550013 | t | 2023-01-30 07:13:53.060794 + 013 | 0813 | 0813 | 813 | 00000000000000000013 | 28.513154858766505 | t | 2023-01-30 07:13:53.060803 + 014 | 0814 | 0814 | 814 | 00000000000000000014 | 28.53068523537421 | t | 2023-01-30 07:13:53.060806 + 015 | 0815 | 0815 | 815 | 00000000000000000015 | 28.548204847240395 | t | 2023-01-30 07:13:53.06081 + 016 | 0816 | 0816 | 816 | 00000000000000000016 | 28.5657137141714 | t | 2023-01-30 07:13:53.060813 + 017 | 0817 | 0817 | 817 | 00000000000000000017 | 28.583211855912904 | t | 2023-01-30 07:13:53.060817 + 018 | 0818 | 0818 | 818 | 00000000000000000018 | 28.600699292150182 | t | 2023-01-30 07:13:53.06082 + 019 | 0819 | 0819 | 819 | 00000000000000000019 | 28.61817604250837 | t | 2023-01-30 07:13:53.060824 + 020 | 0820 | 0820 | 820 | 00000000000000000020 | 28.635642126552707 | t | 2023-01-30 07:13:53.060827 + 021 | 0821 | 0821 | 821 | 00000000000000000021 | 28.653097563788805 | t | 2023-01-30 07:13:53.060833 + 022 | 0822 | 0822 | 822 | 00000000000000000022 | 28.6705423736629 | t | 2023-01-30 07:13:53.060836 + 023 | 0823 | 0823 | 823 | 00000000000000000023 | 28.687976575562104 | t | 2023-01-30 07:13:53.06084 + 024 | 0824 | 0824 | 824 | 00000000000000000024 | 28.705400188814647 | t | 2023-01-30 07:13:53.060843 + 025 | 0825 | 0825 | 825 | 00000000000000000025 | 28.722813232690143 | t | 2023-01-30 07:13:53.060847 + 026 | 0826 | 0826 | 826 | 00000000000000000026 | 28.74021572639983 | t | 2023-01-30 07:13:53.06085 + 027 | 0827 | 0827 | 827 | 00000000000000000027 | 28.75760768909681 | t | 2023-01-30 07:13:53.060855 + 028 | 0828 | 0828 | 828 | 00000000000000000028 | 28.77498913987632 | t | 2023-01-30 07:13:53.060858 + 029 | 0829 | 0829 | 829 | 00000000000000000029 | 28.792360097775937 | t | 2023-01-30 07:13:53.060862 + 030 | 0830 | 0830 | 830 | 00000000000000000030 | 28.809720581775867 | t | 2023-01-30 07:13:53.060865 + 031 | 0831 | 0831 | 831 | 00000000000000000031 | 28.827070610799147 | t | 2023-01-30 07:13:53.060869 + 032 | 0832 | 0832 | 832 | 00000000000000000032 | 28.844410203711913 | t | 2023-01-30 07:13:53.060872 + 033 | 0833 | 0833 | 833 | 00000000000000000033 | 28.861739379323623 | t | 2023-01-30 07:13:53.060876 + 034 | 0834 | 0834 | 834 | 00000000000000000034 | 28.879058156387302 | t | 2023-01-30 07:13:53.060879 + 035 | 0835 | 0835 | 835 | 00000000000000000035 | 28.89636655359978 | t | 2023-01-30 07:13:53.060884 + 036 | 0836 | 0836 | 836 | 00000000000000000036 | 28.91366458960192 | t | 2023-01-30 07:13:53.060887 + 037 | 0837 | 0837 | 837 | 00000000000000000037 | 28.930952282978865 | t | 2023-01-30 07:13:53.060891 + 038 | 0838 | 0838 | 838 | 00000000000000000038 | 28.948229652260256 | t | 2023-01-30 07:13:53.060894 + 039 | 0839 | 0839 | 839 | 00000000000000000039 | 28.965496715920477 | t | 2023-01-30 07:13:53.060898 + 040 | 0840 | 0840 | 840 | 00000000000000000040 | 28.982753492378876 | t | 2023-01-30 07:13:53.060901 + 041 | 0841 | 0841 | 841 | 00000000000000000041 | 29 | t | 2023-01-30 07:13:53.060906 + 042 | 0842 | 0842 | 842 | 00000000000000000042 | 29.017236257093817 | t | 2023-01-30 07:13:53.060909 + 043 | 0843 | 0843 | 843 | 00000000000000000043 | 29.03446228191595 | t | 2023-01-30 07:13:53.060914 + 044 | 0844 | 0844 | 844 | 00000000000000000044 | 29.0516780926679 | t | 2023-01-30 07:13:53.060917 + 045 | 0845 | 0845 | 845 | 00000000000000000045 | 29.068883707497267 | t | 2023-01-30 07:13:53.060921 + 046 | 0846 | 0846 | 846 | 00000000000000000046 | 29.086079144497972 | t | 2023-01-30 07:13:53.060924 + 047 | 0847 | 0847 | 847 | 00000000000000000047 | 29.103264421710495 | t | 2023-01-30 07:13:53.060927 + 048 | 0848 | 0848 | 848 | 00000000000000000048 | 29.120439557122072 | t | 2023-01-30 07:13:53.060931 + 049 | 0849 | 0849 | 849 | 00000000000000000049 | 29.13760456866693 | t | 2023-01-30 07:13:53.060934 + 050 | 0850 | 0850 | 850 | 00000000000000000050 | 29.154759474226502 | t | 2023-01-30 07:13:53.060938 + 051 | 0851 | 0851 | 851 | 00000000000000000051 | 29.171904291629644 | t | 2023-01-30 07:13:53.060941 + 052 | 0852 | 0852 | 852 | 00000000000000000052 | 29.189039038652847 | t | 2023-01-30 07:13:53.060946 + 053 | 0853 | 0853 | 853 | 00000000000000000053 | 29.206163733020468 | t | 2023-01-30 07:13:53.060952 + 054 | 0854 | 0854 | 854 | 00000000000000000054 | 29.223278392404914 | t | 2023-01-30 07:13:53.060955 + 055 | 0855 | 0855 | 855 | 00000000000000000055 | 29.24038303442689 | t | 2023-01-30 07:13:53.06096 + 056 | 0856 | 0856 | 856 | 00000000000000000056 | 29.257477676655586 | t | 2023-01-30 07:13:53.060963 + 057 | 0857 | 0857 | 857 | 00000000000000000057 | 29.274562336608895 | t | 2023-01-30 07:13:53.060968 + 058 | 0858 | 0858 | 858 | 00000000000000000058 | 29.29163703175362 | t | 2023-01-30 07:13:53.060971 + 059 | 0859 | 0859 | 859 | 00000000000000000059 | 29.30870177950569 | t | 2023-01-30 07:13:53.060975 + 060 | 0860 | 0860 | 860 | 00000000000000000060 | 29.32575659723036 | t | 2023-01-30 07:13:53.060978 + 061 | 0861 | 0861 | 861 | 00000000000000000061 | 29.34280150224242 | t | 2023-01-30 07:13:53.060982 + 062 | 0862 | 0862 | 862 | 00000000000000000062 | 29.359836511806396 | t | 2023-01-30 07:13:53.060985 + 063 | 0863 | 0863 | 863 | 00000000000000000063 | 29.376861643136763 | t | 2023-01-30 07:13:53.060989 + 064 | 0864 | 0864 | 864 | 00000000000000000064 | 29.393876913398138 | t | 2023-01-30 07:13:53.060992 + 065 | 0865 | 0865 | 865 | 00000000000000000065 | 29.410882339705484 | t | 2023-01-30 07:13:53.060997 + 066 | 0866 | 0866 | 866 | 00000000000000000066 | 29.427877939124322 | t | 2023-01-30 07:13:53.061 + 067 | 0867 | 0867 | 867 | 00000000000000000067 | 29.444863728670914 | t | 2023-01-30 07:13:53.061005 + 068 | 0868 | 0868 | 868 | 00000000000000000068 | 29.46183972531247 | t | 2023-01-30 07:13:53.061007 + 069 | 0869 | 0869 | 869 | 00000000000000000069 | 29.478805945967352 | t | 2023-01-30 07:13:53.061012 + 070 | 0870 | 0870 | 870 | 00000000000000000070 | 29.49576240750525 | t | 2023-01-30 07:13:53.061015 + 071 | 0871 | 0871 | 871 | 00000000000000000071 | 29.512709126747414 | t | 2023-01-30 07:13:53.061032 + 072 | 0872 | 0872 | 872 | 00000000000000000072 | 29.5296461204668 | t | 2023-01-30 07:13:53.061038 + 073 | 0873 | 0873 | 873 | 00000000000000000073 | 29.546573405388315 | t | 2023-01-30 07:13:53.061041 + 074 | 0874 | 0874 | 874 | 00000000000000000074 | 29.563490998188964 | t | 2023-01-30 07:13:53.061049 + 075 | 0875 | 0875 | 875 | 00000000000000000075 | 29.58039891549808 | t | 2023-01-30 07:13:53.061052 + 076 | 0876 | 0876 | 876 | 00000000000000000076 | 29.597297173897484 | t | 2023-01-30 07:13:53.061056 + 077 | 0877 | 0877 | 877 | 00000000000000000077 | 29.614185789921695 | t | 2023-01-30 07:13:53.061081 + 078 | 0878 | 0878 | 878 | 00000000000000000078 | 29.631064780058107 | t | 2023-01-30 07:13:53.061087 + 079 | 0879 | 0879 | 879 | 00000000000000000079 | 29.647934160747187 | t | 2023-01-30 07:13:53.06109 + 080 | 0880 | 0880 | 880 | 00000000000000000080 | 29.664793948382652 | t | 2023-01-30 07:13:53.061094 + 081 | 0881 | 0881 | 881 | 00000000000000000081 | 29.68164415931166 | t | 2023-01-30 07:13:53.061097 + 082 | 0882 | 0882 | 882 | 00000000000000000082 | 29.698484809834994 | t | 2023-01-30 07:13:53.061101 + 083 | 0883 | 0883 | 883 | 00000000000000000083 | 29.715315916207253 | t | 2023-01-30 07:13:53.061104 + 084 | 0884 | 0884 | 884 | 00000000000000000084 | 29.732137494637012 | t | 2023-01-30 07:13:53.061109 + 085 | 0885 | 0885 | 885 | 00000000000000000085 | 29.748949561287034 | t | 2023-01-30 07:13:53.061112 + 086 | 0886 | 0886 | 886 | 00000000000000000086 | 29.765752132274432 | t | 2023-01-30 07:13:53.061119 + 087 | 0887 | 0887 | 887 | 00000000000000000087 | 29.782545223670862 | t | 2023-01-30 07:13:53.061122 + 088 | 0888 | 0888 | 888 | 00000000000000000088 | 29.79932885150268 | t | 2023-01-30 07:13:53.061126 + 089 | 0889 | 0889 | 889 | 00000000000000000089 | 29.816103031751148 | t | 2023-01-30 07:13:53.061129 + 090 | 0890 | 0890 | 890 | 00000000000000000090 | 29.832867780352597 | t | 2023-01-30 07:13:53.061133 + 091 | 0891 | 0891 | 891 | 00000000000000000091 | 29.8496231131986 | t | 2023-01-30 07:13:53.061136 + 092 | 0892 | 0892 | 892 | 00000000000000000092 | 29.866369046136157 | t | 2023-01-30 07:13:53.06114 + 093 | 0893 | 0893 | 893 | 00000000000000000093 | 29.88310559496787 | t | 2023-01-30 07:13:53.061143 + 094 | 0894 | 0894 | 894 | 00000000000000000094 | 29.899832775452108 | t | 2023-01-30 07:13:53.061148 + 095 | 0895 | 0895 | 895 | 00000000000000000095 | 29.916550603303182 | t | 2023-01-30 07:13:53.061151 + 096 | 0896 | 0896 | 896 | 00000000000000000096 | 29.93325909419153 | t | 2023-01-30 07:13:53.061178 + 097 | 0897 | 0897 | 897 | 00000000000000000097 | 29.949958263743873 | t | 2023-01-30 07:13:53.061181 + 098 | 0898 | 0898 | 898 | 00000000000000000098 | 29.966648127543394 | t | 2023-01-30 07:13:53.061185 + 099 | 0899 | 0899 | 899 | 00000000000000000099 | 29.9833287011299 | t | 2023-01-30 07:13:53.061188 + 000 | 0900 | 0900 | 900 | 00000000000000000000 | 30 | t | 2023-01-30 07:13:53.061193 + 001 | 0901 | 0901 | 901 | 00000000000000000001 | 30.01666203960727 | t | 2023-01-30 07:13:53.061196 + 002 | 0902 | 0902 | 902 | 00000000000000000002 | 30.033314835362415 | t | 2023-01-30 07:13:53.061201 + 003 | 0903 | 0903 | 903 | 00000000000000000003 | 30.04995840263344 | t | 2023-01-30 07:13:53.061204 + 004 | 0904 | 0904 | 904 | 00000000000000000004 | 30.066592756745816 | t | 2023-01-30 07:13:53.061208 + 005 | 0905 | 0905 | 905 | 00000000000000000005 | 30.083217912982647 | t | 2023-01-30 07:13:53.061211 + 006 | 0906 | 0906 | 906 | 00000000000000000006 | 30.099833886584822 | t | 2023-01-30 07:13:53.061216 + 007 | 0907 | 0907 | 907 | 00000000000000000007 | 30.116440692751194 | t | 2023-01-30 07:13:53.061232 + 008 | 0908 | 0908 | 908 | 00000000000000000008 | 30.133038346638727 | t | 2023-01-30 07:13:53.061237 + 009 | 0909 | 0909 | 909 | 00000000000000000009 | 30.14962686336267 | t | 2023-01-30 07:13:53.06124 + 010 | 0910 | 0910 | 910 | 00000000000000000010 | 30.166206257996713 | t | 2023-01-30 07:13:53.061244 + 011 | 0911 | 0911 | 911 | 00000000000000000011 | 30.18277654557314 | t | 2023-01-30 07:13:53.061247 + 012 | 0912 | 0912 | 912 | 00000000000000000012 | 30.199337741083 | t | 2023-01-30 07:13:53.061254 + 013 | 0913 | 0913 | 913 | 00000000000000000013 | 30.215889859476256 | t | 2023-01-30 07:13:53.061257 + 014 | 0914 | 0914 | 914 | 00000000000000000014 | 30.23243291566195 | t | 2023-01-30 07:13:53.061262 + 015 | 0915 | 0915 | 915 | 00000000000000000015 | 30.24896692450835 | t | 2023-01-30 07:13:53.061265 + 016 | 0916 | 0916 | 916 | 00000000000000000016 | 30.265491900843113 | t | 2023-01-30 07:13:53.061269 + 017 | 0917 | 0917 | 917 | 00000000000000000017 | 30.28200785945344 | t | 2023-01-30 07:13:53.061272 + 018 | 0918 | 0918 | 918 | 00000000000000000018 | 30.298514815086232 | t | 2023-01-30 07:13:53.061275 + 019 | 0919 | 0919 | 919 | 00000000000000000019 | 30.315012782448235 | t | 2023-01-30 07:13:53.061279 + 020 | 0920 | 0920 | 920 | 00000000000000000020 | 30.331501776206203 | t | 2023-01-30 07:13:53.061282 + 021 | 0921 | 0921 | 921 | 00000000000000000021 | 30.347981810987037 | t | 2023-01-30 07:13:53.061286 + 022 | 0922 | 0922 | 922 | 00000000000000000022 | 30.364452901377952 | t | 2023-01-30 07:13:53.061289 + 023 | 0923 | 0923 | 923 | 00000000000000000023 | 30.380915061926625 | t | 2023-01-30 07:13:53.061293 + 024 | 0924 | 0924 | 924 | 00000000000000000024 | 30.397368307141328 | t | 2023-01-30 07:13:53.061296 + 025 | 0925 | 0925 | 925 | 00000000000000000025 | 30.4138126514911 | t | 2023-01-30 07:13:53.061301 + 026 | 0926 | 0926 | 926 | 00000000000000000026 | 30.430248109405877 | t | 2023-01-30 07:13:53.061304 + 027 | 0927 | 0927 | 927 | 00000000000000000027 | 30.44667469527666 | t | 2023-01-30 07:13:53.061309 + 028 | 0928 | 0928 | 928 | 00000000000000000028 | 30.463092423455635 | t | 2023-01-30 07:13:53.061312 + 029 | 0929 | 0929 | 929 | 00000000000000000029 | 30.479501308256342 | t | 2023-01-30 07:13:53.061316 + 030 | 0930 | 0930 | 930 | 00000000000000000030 | 30.495901363953813 | t | 2023-01-30 07:13:53.061319 + 031 | 0931 | 0931 | 931 | 00000000000000000031 | 30.512292604784715 | t | 2023-01-30 07:13:53.061323 + 032 | 0932 | 0932 | 932 | 00000000000000000032 | 30.528675044947494 | t | 2023-01-30 07:13:53.061326 + 033 | 0933 | 0933 | 933 | 00000000000000000033 | 30.54504869860253 | t | 2023-01-30 07:13:53.06133 + 034 | 0934 | 0934 | 934 | 00000000000000000034 | 30.56141357987225 | t | 2023-01-30 07:13:53.061333 + 035 | 0935 | 0935 | 935 | 00000000000000000035 | 30.577769702841312 | t | 2023-01-30 07:13:53.061337 + 036 | 0936 | 0936 | 936 | 00000000000000000036 | 30.59411708155671 | t | 2023-01-30 07:13:53.06134 + 037 | 0937 | 0937 | 937 | 00000000000000000037 | 30.610455730027933 | t | 2023-01-30 07:13:53.061344 + 038 | 0938 | 0938 | 938 | 00000000000000000038 | 30.62678566222711 | t | 2023-01-30 07:13:53.061347 + 039 | 0939 | 0939 | 939 | 00000000000000000039 | 30.643106892089126 | t | 2023-01-30 07:13:53.061351 + 040 | 0940 | 0940 | 940 | 00000000000000000040 | 30.659419433511783 | t | 2023-01-30 07:13:53.061354 + 041 | 0941 | 0941 | 941 | 00000000000000000041 | 30.675723300355934 | t | 2023-01-30 07:13:53.061358 + 042 | 0942 | 0942 | 942 | 00000000000000000042 | 30.692018506445613 | t | 2023-01-30 07:13:53.061361 + 043 | 0943 | 0943 | 943 | 00000000000000000043 | 30.708305065568176 | t | 2023-01-30 07:13:53.061366 + 044 | 0944 | 0944 | 944 | 00000000000000000044 | 30.72458299147443 | t | 2023-01-30 07:13:53.061369 + 045 | 0945 | 0945 | 945 | 00000000000000000045 | 30.740852297878796 | t | 2023-01-30 07:13:53.061373 + 046 | 0946 | 0946 | 946 | 00000000000000000046 | 30.757112998459398 | t | 2023-01-30 07:13:53.061376 + 047 | 0947 | 0947 | 947 | 00000000000000000047 | 30.773365106858236 | t | 2023-01-30 07:13:53.06138 + 048 | 0948 | 0948 | 948 | 00000000000000000048 | 30.789608636681304 | t | 2023-01-30 07:13:53.061383 + 049 | 0949 | 0949 | 949 | 00000000000000000049 | 30.805843601498726 | t | 2023-01-30 07:13:53.061387 + 050 | 0950 | 0950 | 950 | 00000000000000000050 | 30.822070014844883 | t | 2023-01-30 07:13:53.06139 + 051 | 0951 | 0951 | 951 | 00000000000000000051 | 30.83828789021855 | t | 2023-01-30 07:13:53.061394 + 052 | 0952 | 0952 | 952 | 00000000000000000052 | 30.854497241083024 | t | 2023-01-30 07:13:53.061397 + 053 | 0953 | 0953 | 953 | 00000000000000000053 | 30.870698080866262 | t | 2023-01-30 07:13:53.061403 + 054 | 0954 | 0954 | 954 | 00000000000000000054 | 30.886890422961002 | t | 2023-01-30 07:13:53.061406 + 055 | 0955 | 0955 | 955 | 00000000000000000055 | 30.903074280724887 | t | 2023-01-30 07:13:53.061411 + 056 | 0956 | 0956 | 956 | 00000000000000000056 | 30.919249667480614 | t | 2023-01-30 07:13:53.061414 + 057 | 0957 | 0957 | 957 | 00000000000000000057 | 30.93541659651604 | t | 2023-01-30 07:13:53.061418 + 058 | 0958 | 0958 | 958 | 00000000000000000058 | 30.95157508108432 | t | 2023-01-30 07:13:53.061421 + 059 | 0959 | 0959 | 959 | 00000000000000000059 | 30.967725134404045 | t | 2023-01-30 07:13:53.061425 + 060 | 0960 | 0960 | 960 | 00000000000000000060 | 30.983866769659336 | t | 2023-01-30 07:13:53.061428 + 061 | 0961 | 0961 | 961 | 00000000000000000061 | 31 | t | 2023-01-30 07:13:53.061432 + 062 | 0962 | 0962 | 962 | 00000000000000000062 | 31.016124838541646 | t | 2023-01-30 07:13:53.061435 + 063 | 0963 | 0963 | 963 | 00000000000000000063 | 31.0322412983658 | t | 2023-01-30 07:13:53.06144 + 064 | 0964 | 0964 | 964 | 00000000000000000064 | 31.04834939252005 | t | 2023-01-30 07:13:53.061443 + 065 | 0965 | 0965 | 965 | 00000000000000000065 | 31.064449134018133 | t | 2023-01-30 07:13:53.061447 + 066 | 0966 | 0966 | 966 | 00000000000000000066 | 31.080540535840107 | t | 2023-01-30 07:13:53.06145 + 067 | 0967 | 0967 | 967 | 00000000000000000067 | 31.096623610932426 | t | 2023-01-30 07:13:53.061454 + 068 | 0968 | 0968 | 968 | 00000000000000000068 | 31.11269837220809 | t | 2023-01-30 07:13:53.061457 + 069 | 0969 | 0969 | 969 | 00000000000000000069 | 31.12876483254676 | t | 2023-01-30 07:13:53.061461 + 070 | 0970 | 0970 | 970 | 00000000000000000070 | 31.144823004794873 | t | 2023-01-30 07:13:53.061464 + 071 | 0971 | 0971 | 971 | 00000000000000000071 | 31.160872901765767 | t | 2023-01-30 07:13:53.061469 + 072 | 0972 | 0972 | 972 | 00000000000000000072 | 31.176914536239792 | t | 2023-01-30 07:13:53.061472 + 073 | 0973 | 0973 | 973 | 00000000000000000073 | 31.192947920964443 | t | 2023-01-30 07:13:53.061476 + 074 | 0974 | 0974 | 974 | 00000000000000000074 | 31.20897306865447 | t | 2023-01-30 07:13:53.061479 + 075 | 0975 | 0975 | 975 | 00000000000000000075 | 31.22498999199199 | t | 2023-01-30 07:13:53.061482 + 076 | 0976 | 0976 | 976 | 00000000000000000076 | 31.240998703626616 | t | 2023-01-30 07:13:53.061489 + 077 | 0977 | 0977 | 977 | 00000000000000000077 | 31.25699921617557 | t | 2023-01-30 07:13:53.061492 + 078 | 0978 | 0978 | 978 | 00000000000000000078 | 31.272991542223778 | t | 2023-01-30 07:13:53.061496 + 079 | 0979 | 0979 | 979 | 00000000000000000079 | 31.28897569432403 | t | 2023-01-30 07:13:53.061499 + 080 | 0980 | 0980 | 980 | 00000000000000000080 | 31.304951684997057 | t | 2023-01-30 07:13:53.061503 + 081 | 0981 | 0981 | 981 | 00000000000000000081 | 31.32091952673165 | t | 2023-01-30 07:13:53.061506 + 082 | 0982 | 0982 | 982 | 00000000000000000082 | 31.336879231984796 | t | 2023-01-30 07:13:53.061511 + 083 | 0983 | 0983 | 983 | 00000000000000000083 | 31.352830813181765 | t | 2023-01-30 07:13:53.061514 + 084 | 0984 | 0984 | 984 | 00000000000000000084 | 31.368774282716245 | t | 2023-01-30 07:13:53.061518 + 085 | 0985 | 0985 | 985 | 00000000000000000085 | 31.38470965295043 | t | 2023-01-30 07:13:53.061521 + 086 | 0986 | 0986 | 986 | 00000000000000000086 | 31.400636936215164 | t | 2023-01-30 07:13:53.061525 + 087 | 0987 | 0987 | 987 | 00000000000000000087 | 31.416556144810016 | t | 2023-01-30 07:13:53.061528 + 088 | 0988 | 0988 | 988 | 00000000000000000088 | 31.432467291003423 | t | 2023-01-30 07:13:53.061532 + 089 | 0989 | 0989 | 989 | 00000000000000000089 | 31.448370387032774 | t | 2023-01-30 07:13:53.061535 + 090 | 0990 | 0990 | 990 | 00000000000000000090 | 31.464265445104548 | t | 2023-01-30 07:13:53.061539 + 091 | 0991 | 0991 | 991 | 00000000000000000091 | 31.480152477394387 | t | 2023-01-30 07:13:53.061542 + 092 | 0992 | 0992 | 992 | 00000000000000000092 | 31.496031496047245 | t | 2023-01-30 07:13:53.061547 + 093 | 0993 | 0993 | 993 | 00000000000000000093 | 31.51190251317746 | t | 2023-01-30 07:13:53.06155 + 094 | 0994 | 0994 | 994 | 00000000000000000094 | 31.52776554086889 | t | 2023-01-30 07:13:53.061554 + 095 | 0995 | 0995 | 995 | 00000000000000000095 | 31.54362059117501 | t | 2023-01-30 07:13:53.061557 + 096 | 0996 | 0996 | 996 | 00000000000000000096 | 31.559467676119 | t | 2023-01-30 07:13:53.061561 + 097 | 0997 | 0997 | 997 | 00000000000000000097 | 31.575306807693888 | t | 2023-01-30 07:13:53.061564 + 098 | 0998 | 0998 | 998 | 00000000000000000098 | 31.591137997862628 | t | 2023-01-30 07:13:53.061568 + 099 | 0999 | 0999 | 999 | 00000000000000000099 | 31.606961258558215 | t | 2023-01-30 07:13:53.061571 + 000 | 0000 | 1000 | 1000 | 00000000000000000000 | 31.622776601683793 | t | 2023-01-30 07:13:53.061576 +(1000 rows) + +Time: 35.955 ms +-- select one column +--Testcase 49: +SELECT c1 FROM tbl1; + c1 +------ + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + 257 + 258 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 269 + 270 + 271 + 272 + 273 + 274 + 275 + 276 + 277 + 278 + 279 + 280 + 281 + 282 + 283 + 284 + 285 + 286 + 287 + 288 + 289 + 290 + 291 + 292 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 303 + 304 + 305 + 306 + 307 + 308 + 309 + 310 + 311 + 312 + 313 + 314 + 315 + 316 + 317 + 318 + 319 + 320 + 321 + 322 + 323 + 324 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 332 + 333 + 334 + 335 + 336 + 337 + 338 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 347 + 348 + 349 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 359 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + 369 + 370 + 371 + 372 + 373 + 374 + 375 + 376 + 377 + 378 + 379 + 380 + 381 + 382 + 383 + 384 + 385 + 386 + 387 + 388 + 389 + 390 + 391 + 392 + 393 + 394 + 395 + 396 + 397 + 398 + 399 + 400 + 401 + 402 + 403 + 404 + 405 + 406 + 407 + 408 + 409 + 410 + 411 + 412 + 413 + 414 + 415 + 416 + 417 + 418 + 419 + 420 + 421 + 422 + 423 + 424 + 425 + 426 + 427 + 428 + 429 + 430 + 431 + 432 + 433 + 434 + 435 + 436 + 437 + 438 + 439 + 440 + 441 + 442 + 443 + 444 + 445 + 446 + 447 + 448 + 449 + 450 + 451 + 452 + 453 + 454 + 455 + 456 + 457 + 458 + 459 + 460 + 461 + 462 + 463 + 464 + 465 + 466 + 467 + 468 + 469 + 470 + 471 + 472 + 473 + 474 + 475 + 476 + 477 + 478 + 479 + 480 + 481 + 482 + 483 + 484 + 485 + 486 + 487 + 488 + 489 + 490 + 491 + 492 + 493 + 494 + 495 + 496 + 497 + 498 + 499 + 500 + 501 + 502 + 503 + 504 + 505 + 506 + 507 + 508 + 509 + 510 + 511 + 512 + 513 + 514 + 515 + 516 + 517 + 518 + 519 + 520 + 521 + 522 + 523 + 524 + 525 + 526 + 527 + 528 + 529 + 530 + 531 + 532 + 533 + 534 + 535 + 536 + 537 + 538 + 539 + 540 + 541 + 542 + 543 + 544 + 545 + 546 + 547 + 548 + 549 + 550 + 551 + 552 + 553 + 554 + 555 + 556 + 557 + 558 + 559 + 560 + 561 + 562 + 563 + 564 + 565 + 566 + 567 + 568 + 569 + 570 + 571 + 572 + 573 + 574 + 575 + 576 + 577 + 578 + 579 + 580 + 581 + 582 + 583 + 584 + 585 + 586 + 587 + 588 + 589 + 590 + 591 + 592 + 593 + 594 + 595 + 596 + 597 + 598 + 599 + 600 + 601 + 602 + 603 + 604 + 605 + 606 + 607 + 608 + 609 + 610 + 611 + 612 + 613 + 614 + 615 + 616 + 617 + 618 + 619 + 620 + 621 + 622 + 623 + 624 + 625 + 626 + 627 + 628 + 629 + 630 + 631 + 632 + 633 + 634 + 635 + 636 + 637 + 638 + 639 + 640 + 641 + 642 + 643 + 644 + 645 + 646 + 647 + 648 + 649 + 650 + 651 + 652 + 653 + 654 + 655 + 656 + 657 + 658 + 659 + 660 + 661 + 662 + 663 + 664 + 665 + 666 + 667 + 668 + 669 + 670 + 671 + 672 + 673 + 674 + 675 + 676 + 677 + 678 + 679 + 680 + 681 + 682 + 683 + 684 + 685 + 686 + 687 + 688 + 689 + 690 + 691 + 692 + 693 + 694 + 695 + 696 + 697 + 698 + 699 + 700 + 701 + 702 + 703 + 704 + 705 + 706 + 707 + 708 + 709 + 710 + 711 + 712 + 713 + 714 + 715 + 716 + 717 + 718 + 719 + 720 + 721 + 722 + 723 + 724 + 725 + 726 + 727 + 728 + 729 + 730 + 731 + 732 + 733 + 734 + 735 + 736 + 737 + 738 + 739 + 740 + 741 + 742 + 743 + 744 + 745 + 746 + 747 + 748 + 749 + 750 + 751 + 752 + 753 + 754 + 755 + 756 + 757 + 758 + 759 + 760 + 761 + 762 + 763 + 764 + 765 + 766 + 767 + 768 + 769 + 770 + 771 + 772 + 773 + 774 + 775 + 776 + 777 + 778 + 779 + 780 + 781 + 782 + 783 + 784 + 785 + 786 + 787 + 788 + 789 + 790 + 791 + 792 + 793 + 794 + 795 + 796 + 797 + 798 + 799 + 800 + 801 + 802 + 803 + 804 + 805 + 806 + 807 + 808 + 809 + 810 + 811 + 812 + 813 + 814 + 815 + 816 + 817 + 818 + 819 + 820 + 821 + 822 + 823 + 824 + 825 + 826 + 827 + 828 + 829 + 830 + 831 + 832 + 833 + 834 + 835 + 836 + 837 + 838 + 839 + 840 + 841 + 842 + 843 + 844 + 845 + 846 + 847 + 848 + 849 + 850 + 851 + 852 + 853 + 854 + 855 + 856 + 857 + 858 + 859 + 860 + 861 + 862 + 863 + 864 + 865 + 866 + 867 + 868 + 869 + 870 + 871 + 872 + 873 + 874 + 875 + 876 + 877 + 878 + 879 + 880 + 881 + 882 + 883 + 884 + 885 + 886 + 887 + 888 + 889 + 890 + 891 + 892 + 893 + 894 + 895 + 896 + 897 + 898 + 899 + 900 + 901 + 902 + 903 + 904 + 905 + 906 + 907 + 908 + 909 + 910 + 911 + 912 + 913 + 914 + 915 + 916 + 917 + 918 + 919 + 920 + 921 + 922 + 923 + 924 + 925 + 926 + 927 + 928 + 929 + 930 + 931 + 932 + 933 + 934 + 935 + 936 + 937 + 938 + 939 + 940 + 941 + 942 + 943 + 944 + 945 + 946 + 947 + 948 + 949 + 950 + 951 + 952 + 953 + 954 + 955 + 956 + 957 + 958 + 959 + 960 + 961 + 962 + 963 + 964 + 965 + 966 + 967 + 968 + 969 + 970 + 971 + 972 + 973 + 974 + 975 + 976 + 977 + 978 + 979 + 980 + 981 + 982 + 983 + 984 + 985 + 986 + 987 + 988 + 989 + 990 + 991 + 992 + 993 + 994 + 995 + 996 + 997 + 998 + 999 + 1000 +(1000 rows) + +Time: 11.907 ms +-- +-- WHERE condition +-- +-- 20% +--Testcase 50: +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 5; + tag1 | tag2 | tag3 | c1 | c2 | c3 | c4 | time +------+------+------+-----+----------------------+--------------------+----+---------------------------- + 001 | 0001 | 0001 | 1 | 00000000000000000001 | 1 | t | 2023-01-30 07:13:53.057435 + 002 | 0002 | 0002 | 2 | 00000000000000000002 | 1.4142135623730951 | t | 2023-01-30 07:13:53.05744 + 003 | 0003 | 0003 | 3 | 00000000000000000003 | 1.7320508075688772 | t | 2023-01-30 07:13:53.057444 + 004 | 0004 | 0004 | 4 | 00000000000000000004 | 2 | t | 2023-01-30 07:13:53.057447 + 005 | 0005 | 0005 | 5 | 00000000000000000005 | 2.23606797749979 | t | 2023-01-30 07:13:53.057451 + 006 | 0006 | 0006 | 6 | 00000000000000000006 | 2.449489742783178 | t | 2023-01-30 07:13:53.057454 + 007 | 0007 | 0007 | 7 | 00000000000000000007 | 2.6457513110645907 | t | 2023-01-30 07:13:53.057457 + 008 | 0008 | 0008 | 8 | 00000000000000000008 | 2.8284271247461903 | t | 2023-01-30 07:13:53.05746 + 009 | 0009 | 0009 | 9 | 00000000000000000009 | 3 | t | 2023-01-30 07:13:53.057463 + 010 | 0010 | 0010 | 10 | 00000000000000000010 | 3.1622776601683795 | t | 2023-01-30 07:13:53.057466 + 011 | 0011 | 0011 | 11 | 00000000000000000011 | 3.3166247903554 | t | 2023-01-30 07:13:53.05747 + 012 | 0012 | 0012 | 12 | 00000000000000000012 | 3.4641016151377544 | t | 2023-01-30 07:13:53.057473 + 013 | 0013 | 0013 | 13 | 00000000000000000013 | 3.605551275463989 | t | 2023-01-30 07:13:53.057476 + 014 | 0014 | 0014 | 14 | 00000000000000000014 | 3.7416573867739413 | t | 2023-01-30 07:13:53.057479 + 015 | 0015 | 0015 | 15 | 00000000000000000015 | 3.872983346207417 | t | 2023-01-30 07:13:53.057482 + 016 | 0016 | 0016 | 16 | 00000000000000000016 | 4 | t | 2023-01-30 07:13:53.057486 + 017 | 0017 | 0017 | 17 | 00000000000000000017 | 4.123105625617661 | t | 2023-01-30 07:13:53.057489 + 018 | 0018 | 0018 | 18 | 00000000000000000018 | 4.242640687119285 | t | 2023-01-30 07:13:53.057494 + 019 | 0019 | 0019 | 19 | 00000000000000000019 | 4.358898943540674 | t | 2023-01-30 07:13:53.057497 + 020 | 0020 | 0020 | 20 | 00000000000000000020 | 4.47213595499958 | t | 2023-01-30 07:13:53.057501 + 021 | 0021 | 0021 | 21 | 00000000000000000021 | 4.58257569495584 | t | 2023-01-30 07:13:53.057504 + 022 | 0022 | 0022 | 22 | 00000000000000000022 | 4.69041575982343 | t | 2023-01-30 07:13:53.057509 + 023 | 0023 | 0023 | 23 | 00000000000000000023 | 4.795831523312719 | t | 2023-01-30 07:13:53.057512 + 024 | 0024 | 0024 | 24 | 00000000000000000024 | 4.898979485566356 | t | 2023-01-30 07:13:53.057516 + 025 | 0025 | 0025 | 25 | 00000000000000000025 | 5 | t | 2023-01-30 07:13:53.05752 + 026 | 0026 | 0026 | 26 | 00000000000000000026 | 5.0990195135927845 | t | 2023-01-30 07:13:53.057524 + 027 | 0027 | 0027 | 27 | 00000000000000000027 | 5.196152422706632 | t | 2023-01-30 07:13:53.057527 + 028 | 0028 | 0028 | 28 | 00000000000000000028 | 5.291502622129181 | t | 2023-01-30 07:13:53.057531 + 029 | 0029 | 0029 | 29 | 00000000000000000029 | 5.385164807134504 | t | 2023-01-30 07:13:53.057534 + 030 | 0030 | 0030 | 30 | 00000000000000000030 | 5.477225575051661 | t | 2023-01-30 07:13:53.057539 + 031 | 0031 | 0031 | 31 | 00000000000000000031 | 5.5677643628300215 | t | 2023-01-30 07:13:53.057542 + 032 | 0032 | 0032 | 32 | 00000000000000000032 | 5.656854249492381 | t | 2023-01-30 07:13:53.057546 + 033 | 0033 | 0033 | 33 | 00000000000000000033 | 5.744562646538029 | t | 2023-01-30 07:13:53.057549 + 034 | 0034 | 0034 | 34 | 00000000000000000034 | 5.830951894845301 | t | 2023-01-30 07:13:53.057554 + 035 | 0035 | 0035 | 35 | 00000000000000000035 | 5.916079783099616 | t | 2023-01-30 07:13:53.057557 + 036 | 0036 | 0036 | 36 | 00000000000000000036 | 6 | t | 2023-01-30 07:13:53.057561 + 037 | 0037 | 0037 | 37 | 00000000000000000037 | 6.082762530298219 | t | 2023-01-30 07:13:53.057564 + 038 | 0038 | 0038 | 38 | 00000000000000000038 | 6.164414002968976 | t | 2023-01-30 07:13:53.057568 + 039 | 0039 | 0039 | 39 | 00000000000000000039 | 6.244997998398398 | t | 2023-01-30 07:13:53.057571 + 040 | 0040 | 0040 | 40 | 00000000000000000040 | 6.324555320336759 | t | 2023-01-30 07:13:53.057575 + 041 | 0041 | 0041 | 41 | 00000000000000000041 | 6.4031242374328485 | t | 2023-01-30 07:13:53.057578 + 042 | 0042 | 0042 | 42 | 00000000000000000042 | 6.48074069840786 | t | 2023-01-30 07:13:53.057582 + 043 | 0043 | 0043 | 43 | 00000000000000000043 | 6.557438524302 | t | 2023-01-30 07:13:53.057585 + 044 | 0044 | 0044 | 44 | 00000000000000000044 | 6.6332495807108 | t | 2023-01-30 07:13:53.05759 + 045 | 0045 | 0045 | 45 | 00000000000000000045 | 6.708203932499369 | t | 2023-01-30 07:13:53.057593 + 046 | 0046 | 0046 | 46 | 00000000000000000046 | 6.782329983125268 | t | 2023-01-30 07:13:53.057598 + 047 | 0047 | 0047 | 47 | 00000000000000000047 | 6.855654600401044 | t | 2023-01-30 07:13:53.057601 + 048 | 0048 | 0048 | 48 | 00000000000000000048 | 6.928203230275509 | t | 2023-01-30 07:13:53.057605 + 049 | 0049 | 0049 | 49 | 00000000000000000049 | 7 | t | 2023-01-30 07:13:53.057608 + 050 | 0050 | 0050 | 50 | 00000000000000000050 | 7.0710678118654755 | t | 2023-01-30 07:13:53.057612 + 051 | 0051 | 0051 | 51 | 00000000000000000051 | 7.14142842854285 | t | 2023-01-30 07:13:53.057615 + 052 | 0052 | 0052 | 52 | 00000000000000000052 | 7.211102550927978 | t | 2023-01-30 07:13:53.057619 + 053 | 0053 | 0053 | 53 | 00000000000000000053 | 7.280109889280518 | t | 2023-01-30 07:13:53.057623 + 054 | 0054 | 0054 | 54 | 00000000000000000054 | 7.3484692283495345 | t | 2023-01-30 07:13:53.057627 + 055 | 0055 | 0055 | 55 | 00000000000000000055 | 7.416198487095663 | t | 2023-01-30 07:13:53.05763 + 056 | 0056 | 0056 | 56 | 00000000000000000056 | 7.483314773547883 | t | 2023-01-30 07:13:53.057634 + 057 | 0057 | 0057 | 57 | 00000000000000000057 | 7.54983443527075 | t | 2023-01-30 07:13:53.057637 + 058 | 0058 | 0058 | 58 | 00000000000000000058 | 7.615773105863909 | t | 2023-01-30 07:13:53.057641 + 059 | 0059 | 0059 | 59 | 00000000000000000059 | 7.681145747868608 | t | 2023-01-30 07:13:53.057644 + 060 | 0060 | 0060 | 60 | 00000000000000000060 | 7.745966692414834 | t | 2023-01-30 07:13:53.057648 + 061 | 0061 | 0061 | 61 | 00000000000000000061 | 7.810249675906654 | t | 2023-01-30 07:13:53.057651 + 062 | 0062 | 0062 | 62 | 00000000000000000062 | 7.874007874011811 | t | 2023-01-30 07:13:53.057656 + 063 | 0063 | 0063 | 63 | 00000000000000000063 | 7.937253933193772 | t | 2023-01-30 07:13:53.057659 + 064 | 0064 | 0064 | 64 | 00000000000000000064 | 8 | t | 2023-01-30 07:13:53.057663 + 065 | 0065 | 0065 | 65 | 00000000000000000065 | 8.06225774829855 | t | 2023-01-30 07:13:53.057666 + 066 | 0066 | 0066 | 66 | 00000000000000000066 | 8.12403840463596 | t | 2023-01-30 07:13:53.057669 + 067 | 0067 | 0067 | 67 | 00000000000000000067 | 8.18535277187245 | t | 2023-01-30 07:13:53.057673 + 068 | 0068 | 0068 | 68 | 00000000000000000068 | 8.246211251235321 | t | 2023-01-30 07:13:53.057676 + 069 | 0069 | 0069 | 69 | 00000000000000000069 | 8.306623862918075 | t | 2023-01-30 07:13:53.05768 + 070 | 0070 | 0070 | 70 | 00000000000000000070 | 8.366600265340756 | t | 2023-01-30 07:13:53.057683 + 071 | 0071 | 0071 | 71 | 00000000000000000071 | 8.426149773176359 | t | 2023-01-30 07:13:53.057687 + 072 | 0072 | 0072 | 72 | 00000000000000000072 | 8.48528137423857 | t | 2023-01-30 07:13:53.05769 + 073 | 0073 | 0073 | 73 | 00000000000000000073 | 8.54400374531753 | t | 2023-01-30 07:13:53.057695 + 074 | 0074 | 0074 | 74 | 00000000000000000074 | 8.602325267042627 | t | 2023-01-30 07:13:53.057698 + 075 | 0075 | 0075 | 75 | 00000000000000000075 | 8.660254037844387 | t | 2023-01-30 07:13:53.057705 + 076 | 0076 | 0076 | 76 | 00000000000000000076 | 8.717797887081348 | t | 2023-01-30 07:13:53.057708 + 077 | 0077 | 0077 | 77 | 00000000000000000077 | 8.774964387392123 | t | 2023-01-30 07:13:53.057712 + 078 | 0078 | 0078 | 78 | 00000000000000000078 | 8.831760866327848 | t | 2023-01-30 07:13:53.057715 + 079 | 0079 | 0079 | 79 | 00000000000000000079 | 8.888194417315589 | t | 2023-01-30 07:13:53.05772 + 080 | 0080 | 0080 | 80 | 00000000000000000080 | 8.94427190999916 | t | 2023-01-30 07:13:53.057722 + 081 | 0081 | 0081 | 81 | 00000000000000000081 | 9 | t | 2023-01-30 07:13:53.057727 + 082 | 0082 | 0082 | 82 | 00000000000000000082 | 9.055385138137417 | t | 2023-01-30 07:13:53.05773 + 083 | 0083 | 0083 | 83 | 00000000000000000083 | 9.1104335791443 | t | 2023-01-30 07:13:53.057736 + 084 | 0084 | 0084 | 84 | 00000000000000000084 | 9.16515138991168 | t | 2023-01-30 07:13:53.057739 + 085 | 0085 | 0085 | 85 | 00000000000000000085 | 9.219544457292887 | t | 2023-01-30 07:13:53.057743 + 086 | 0086 | 0086 | 86 | 00000000000000000086 | 9.273618495495704 | t | 2023-01-30 07:13:53.057746 + 087 | 0087 | 0087 | 87 | 00000000000000000087 | 9.327379053088816 | t | 2023-01-30 07:13:53.057751 + 088 | 0088 | 0088 | 88 | 00000000000000000088 | 9.38083151964686 | t | 2023-01-30 07:13:53.057754 + 089 | 0089 | 0089 | 89 | 00000000000000000089 | 9.433981132056603 | t | 2023-01-30 07:13:53.057758 + 090 | 0090 | 0090 | 90 | 00000000000000000090 | 9.486832980505138 | t | 2023-01-30 07:13:53.057761 + 091 | 0091 | 0091 | 91 | 00000000000000000091 | 9.539392014169456 | t | 2023-01-30 07:13:53.057765 + 092 | 0092 | 0092 | 92 | 00000000000000000092 | 9.591663046625438 | t | 2023-01-30 07:13:53.057768 + 093 | 0093 | 0093 | 93 | 00000000000000000093 | 9.643650760992955 | t | 2023-01-30 07:13:53.057772 + 094 | 0094 | 0094 | 94 | 00000000000000000094 | 9.695359714832659 | t | 2023-01-30 07:13:53.057775 + 095 | 0095 | 0095 | 95 | 00000000000000000095 | 9.746794344808963 | t | 2023-01-30 07:13:53.05778 + 096 | 0096 | 0096 | 96 | 00000000000000000096 | 9.797958971132712 | t | 2023-01-30 07:13:53.057783 + 097 | 0097 | 0097 | 97 | 00000000000000000097 | 9.848857801796104 | t | 2023-01-30 07:13:53.057787 + 098 | 0098 | 0098 | 98 | 00000000000000000098 | 9.899494936611665 | t | 2023-01-30 07:13:53.05779 + 099 | 0099 | 0099 | 99 | 00000000000000000099 | 9.9498743710662 | t | 2023-01-30 07:13:53.057794 + 000 | 0100 | 0100 | 100 | 00000000000000000000 | 10 | t | 2023-01-30 07:13:53.057797 + 001 | 0101 | 0101 | 101 | 00000000000000000001 | 10.04987562112089 | t | 2023-01-30 07:13:53.057802 + 002 | 0102 | 0102 | 102 | 00000000000000000002 | 10.099504938362077 | t | 2023-01-30 07:13:53.057805 + 003 | 0103 | 0103 | 103 | 00000000000000000003 | 10.14889156509222 | t | 2023-01-30 07:13:53.057809 + 004 | 0104 | 0104 | 104 | 00000000000000000004 | 10.198039027185569 | t | 2023-01-30 07:13:53.057812 + 005 | 0105 | 0105 | 105 | 00000000000000000005 | 10.246950765959598 | t | 2023-01-30 07:13:53.057816 + 006 | 0106 | 0106 | 106 | 00000000000000000006 | 10.295630140987 | t | 2023-01-30 07:13:53.057819 + 007 | 0107 | 0107 | 107 | 00000000000000000007 | 10.344080432788601 | t | 2023-01-30 07:13:53.057824 + 008 | 0108 | 0108 | 108 | 00000000000000000008 | 10.392304845413264 | t | 2023-01-30 07:13:53.057827 + 009 | 0109 | 0109 | 109 | 00000000000000000009 | 10.44030650891055 | t | 2023-01-30 07:13:53.057831 + 010 | 0110 | 0110 | 110 | 00000000000000000010 | 10.488088481701515 | t | 2023-01-30 07:13:53.057834 + 011 | 0111 | 0111 | 111 | 00000000000000000011 | 10.535653752852738 | t | 2023-01-30 07:13:53.057839 + 012 | 0112 | 0112 | 112 | 00000000000000000012 | 10.583005244258363 | t | 2023-01-30 07:13:53.057842 + 013 | 0113 | 0113 | 113 | 00000000000000000013 | 10.63014581273465 | t | 2023-01-30 07:13:53.057846 + 014 | 0114 | 0114 | 114 | 00000000000000000014 | 10.677078252031311 | t | 2023-01-30 07:13:53.057849 + 015 | 0115 | 0115 | 115 | 00000000000000000015 | 10.723805294763608 | t | 2023-01-30 07:13:53.057853 + 016 | 0116 | 0116 | 116 | 00000000000000000016 | 10.770329614269007 | t | 2023-01-30 07:13:53.057856 + 017 | 0117 | 0117 | 117 | 00000000000000000017 | 10.816653826391969 | t | 2023-01-30 07:13:53.05786 + 018 | 0118 | 0118 | 118 | 00000000000000000018 | 10.862780491200215 | t | 2023-01-30 07:13:53.057863 + 019 | 0119 | 0119 | 119 | 00000000000000000019 | 10.908712114635714 | t | 2023-01-30 07:13:53.057868 + 020 | 0120 | 0120 | 120 | 00000000000000000020 | 10.954451150103322 | t | 2023-01-30 07:13:53.057871 + 021 | 0121 | 0121 | 121 | 00000000000000000021 | 11 | t | 2023-01-30 07:13:53.057875 + 022 | 0122 | 0122 | 122 | 00000000000000000022 | 11.045361017187261 | t | 2023-01-30 07:13:53.057878 + 023 | 0123 | 0123 | 123 | 00000000000000000023 | 11.090536506409418 | t | 2023-01-30 07:13:53.057882 + 024 | 0124 | 0124 | 124 | 00000000000000000024 | 11.135528725660043 | t | 2023-01-30 07:13:53.057885 + 025 | 0125 | 0125 | 125 | 00000000000000000025 | 11.180339887498949 | t | 2023-01-30 07:13:53.057889 + 026 | 0126 | 0126 | 126 | 00000000000000000026 | 11.224972160321824 | t | 2023-01-30 07:13:53.057892 + 027 | 0127 | 0127 | 127 | 00000000000000000027 | 11.269427669584644 | t | 2023-01-30 07:13:53.057896 + 028 | 0128 | 0128 | 128 | 00000000000000000028 | 11.313708498984761 | t | 2023-01-30 07:13:53.057899 + 029 | 0129 | 0129 | 129 | 00000000000000000029 | 11.357816691600547 | t | 2023-01-30 07:13:53.057904 + 030 | 0130 | 0130 | 130 | 00000000000000000030 | 11.40175425099138 | t | 2023-01-30 07:13:53.057907 + 031 | 0131 | 0131 | 131 | 00000000000000000031 | 11.445523142259598 | t | 2023-01-30 07:13:53.057911 + 032 | 0132 | 0132 | 132 | 00000000000000000032 | 11.489125293076057 | t | 2023-01-30 07:13:53.057915 + 033 | 0133 | 0133 | 133 | 00000000000000000033 | 11.532562594670797 | t | 2023-01-30 07:13:53.057919 + 034 | 0134 | 0134 | 134 | 00000000000000000034 | 11.575836902790225 | t | 2023-01-30 07:13:53.057922 + 035 | 0135 | 0135 | 135 | 00000000000000000035 | 11.61895003862225 | t | 2023-01-30 07:13:53.057926 + 036 | 0136 | 0136 | 136 | 00000000000000000036 | 11.661903789690601 | t | 2023-01-30 07:13:53.057929 + 037 | 0137 | 0137 | 137 | 00000000000000000037 | 11.704699910719626 | t | 2023-01-30 07:13:53.057932 + 038 | 0138 | 0138 | 138 | 00000000000000000038 | 11.74734012447073 | t | 2023-01-30 07:13:53.057939 + 039 | 0139 | 0139 | 139 | 00000000000000000039 | 11.789826122551595 | t | 2023-01-30 07:13:53.057942 + 040 | 0140 | 0140 | 140 | 00000000000000000040 | 11.832159566199232 | t | 2023-01-30 07:13:53.057946 + 041 | 0141 | 0141 | 141 | 00000000000000000041 | 11.874342087037917 | t | 2023-01-30 07:13:53.057949 + 042 | 0142 | 0142 | 142 | 00000000000000000042 | 11.916375287812984 | t | 2023-01-30 07:13:53.057953 + 043 | 0143 | 0143 | 143 | 00000000000000000043 | 11.958260743101398 | t | 2023-01-30 07:13:53.057956 + 044 | 0144 | 0144 | 144 | 00000000000000000044 | 12 | t | 2023-01-30 07:13:53.057961 + 045 | 0145 | 0145 | 145 | 00000000000000000045 | 12.041594578792296 | t | 2023-01-30 07:13:53.057964 + 046 | 0146 | 0146 | 146 | 00000000000000000046 | 12.083045973594572 | t | 2023-01-30 07:13:53.057968 + 047 | 0147 | 0147 | 147 | 00000000000000000047 | 12.12435565298214 | t | 2023-01-30 07:13:53.057971 + 048 | 0148 | 0148 | 148 | 00000000000000000048 | 12.165525060596439 | t | 2023-01-30 07:13:53.057975 + 049 | 0149 | 0149 | 149 | 00000000000000000049 | 12.206555615733702 | t | 2023-01-30 07:13:53.057978 + 050 | 0150 | 0150 | 150 | 00000000000000000050 | 12.24744871391589 | t | 2023-01-30 07:13:53.057983 + 051 | 0151 | 0151 | 151 | 00000000000000000051 | 12.288205727444508 | t | 2023-01-30 07:13:53.057986 + 052 | 0152 | 0152 | 152 | 00000000000000000052 | 12.328828005937952 | t | 2023-01-30 07:13:53.057991 + 053 | 0153 | 0153 | 153 | 00000000000000000053 | 12.36931687685298 | t | 2023-01-30 07:13:53.057994 + 054 | 0154 | 0154 | 154 | 00000000000000000054 | 12.409673645990857 | t | 2023-01-30 07:13:53.057998 + 055 | 0155 | 0155 | 155 | 00000000000000000055 | 12.449899597988733 | t | 2023-01-30 07:13:53.058001 + 056 | 0156 | 0156 | 156 | 00000000000000000056 | 12.489995996796797 | t | 2023-01-30 07:13:53.058005 + 057 | 0157 | 0157 | 157 | 00000000000000000057 | 12.529964086141668 | t | 2023-01-30 07:13:53.058008 + 058 | 0158 | 0158 | 158 | 00000000000000000058 | 12.569805089976535 | t | 2023-01-30 07:13:53.058013 + 059 | 0159 | 0159 | 159 | 00000000000000000059 | 12.609520212918492 | t | 2023-01-30 07:13:53.058016 + 060 | 0160 | 0160 | 160 | 00000000000000000060 | 12.649110640673518 | t | 2023-01-30 07:13:53.05802 + 061 | 0161 | 0161 | 161 | 00000000000000000061 | 12.68857754044952 | t | 2023-01-30 07:13:53.058023 + 062 | 0162 | 0162 | 162 | 00000000000000000062 | 12.727922061357855 | t | 2023-01-30 07:13:53.058027 + 063 | 0163 | 0163 | 163 | 00000000000000000063 | 12.767145334803704 | t | 2023-01-30 07:13:53.05803 + 064 | 0164 | 0164 | 164 | 00000000000000000064 | 12.806248474865697 | t | 2023-01-30 07:13:53.058035 + 065 | 0165 | 0165 | 165 | 00000000000000000065 | 12.84523257866513 | t | 2023-01-30 07:13:53.058038 + 066 | 0166 | 0166 | 166 | 00000000000000000066 | 12.884098726725126 | t | 2023-01-30 07:13:53.058058 + 067 | 0167 | 0167 | 167 | 00000000000000000067 | 12.922847983320086 | t | 2023-01-30 07:13:53.058061 + 068 | 0168 | 0168 | 168 | 00000000000000000068 | 12.96148139681572 | t | 2023-01-30 07:13:53.058065 + 069 | 0169 | 0169 | 169 | 00000000000000000069 | 13 | t | 2023-01-30 07:13:53.058068 + 070 | 0170 | 0170 | 170 | 00000000000000000070 | 13.038404810405298 | t | 2023-01-30 07:13:53.058073 + 071 | 0171 | 0171 | 171 | 00000000000000000071 | 13.076696830622021 | t | 2023-01-30 07:13:53.058076 + 072 | 0172 | 0172 | 172 | 00000000000000000072 | 13.114877048604 | t | 2023-01-30 07:13:53.05808 + 073 | 0173 | 0173 | 173 | 00000000000000000073 | 13.152946437965905 | t | 2023-01-30 07:13:53.058083 + 074 | 0174 | 0174 | 174 | 00000000000000000074 | 13.19090595827292 | t | 2023-01-30 07:13:53.058087 + 075 | 0175 | 0175 | 175 | 00000000000000000075 | 13.228756555322953 | t | 2023-01-30 07:13:53.058102 + 076 | 0176 | 0176 | 176 | 00000000000000000076 | 13.2664991614216 | t | 2023-01-30 07:13:53.058107 + 077 | 0177 | 0177 | 177 | 00000000000000000077 | 13.30413469565007 | t | 2023-01-30 07:13:53.05811 + 078 | 0178 | 0178 | 178 | 00000000000000000078 | 13.341664064126334 | t | 2023-01-30 07:13:53.058114 + 079 | 0179 | 0179 | 179 | 00000000000000000079 | 13.379088160259652 | t | 2023-01-30 07:13:53.058117 + 080 | 0180 | 0180 | 180 | 00000000000000000080 | 13.416407864998739 | t | 2023-01-30 07:13:53.058122 + 081 | 0181 | 0181 | 181 | 00000000000000000081 | 13.45362404707371 | t | 2023-01-30 07:13:53.058125 + 082 | 0182 | 0182 | 182 | 00000000000000000082 | 13.490737563232042 | t | 2023-01-30 07:13:53.058129 + 083 | 0183 | 0183 | 183 | 00000000000000000083 | 13.527749258468683 | t | 2023-01-30 07:13:53.058132 + 084 | 0184 | 0184 | 184 | 00000000000000000084 | 13.564659966250536 | t | 2023-01-30 07:13:53.058135 + 085 | 0185 | 0185 | 185 | 00000000000000000085 | 13.601470508735444 | t | 2023-01-30 07:13:53.058139 + 086 | 0186 | 0186 | 186 | 00000000000000000086 | 13.638181696985855 | t | 2023-01-30 07:13:53.058142 + 087 | 0187 | 0187 | 187 | 00000000000000000087 | 13.674794331177344 | t | 2023-01-30 07:13:53.058147 + 088 | 0188 | 0188 | 188 | 00000000000000000088 | 13.711309200802088 | t | 2023-01-30 07:13:53.05815 + 089 | 0189 | 0189 | 189 | 00000000000000000089 | 13.74772708486752 | t | 2023-01-30 07:13:53.058154 + 090 | 0190 | 0190 | 190 | 00000000000000000090 | 13.784048752090222 | t | 2023-01-30 07:13:53.058157 + 091 | 0191 | 0191 | 191 | 00000000000000000091 | 13.820274961085254 | t | 2023-01-30 07:13:53.058161 + 092 | 0192 | 0192 | 192 | 00000000000000000092 | 13.856406460551018 | t | 2023-01-30 07:13:53.058164 + 093 | 0193 | 0193 | 193 | 00000000000000000093 | 13.892443989449804 | t | 2023-01-30 07:13:53.058169 + 094 | 0194 | 0194 | 194 | 00000000000000000094 | 13.92838827718412 | t | 2023-01-30 07:13:53.058171 + 095 | 0195 | 0195 | 195 | 00000000000000000095 | 13.96424004376894 | t | 2023-01-30 07:13:53.058176 + 096 | 0196 | 0196 | 196 | 00000000000000000096 | 14 | t | 2023-01-30 07:13:53.058179 + 097 | 0197 | 0197 | 197 | 00000000000000000097 | 14.035668847618199 | t | 2023-01-30 07:13:53.058183 + 098 | 0198 | 0198 | 198 | 00000000000000000098 | 14.071247279470288 | t | 2023-01-30 07:13:53.058186 + 099 | 0199 | 0199 | 199 | 00000000000000000099 | 14.106735979665885 | t | 2023-01-30 07:13:53.05819 +(199 rows) + +Time: 17.451 ms +-- 10% +--Testcase 51: +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 10; + tag1 | tag2 | tag3 | c1 | c2 | c3 | c4 | time +------+------+------+----+----------------------+--------------------+----+---------------------------- + 001 | 0001 | 0001 | 1 | 00000000000000000001 | 1 | t | 2023-01-30 07:13:53.057435 + 002 | 0002 | 0002 | 2 | 00000000000000000002 | 1.4142135623730951 | t | 2023-01-30 07:13:53.05744 + 003 | 0003 | 0003 | 3 | 00000000000000000003 | 1.7320508075688772 | t | 2023-01-30 07:13:53.057444 + 004 | 0004 | 0004 | 4 | 00000000000000000004 | 2 | t | 2023-01-30 07:13:53.057447 + 005 | 0005 | 0005 | 5 | 00000000000000000005 | 2.23606797749979 | t | 2023-01-30 07:13:53.057451 + 006 | 0006 | 0006 | 6 | 00000000000000000006 | 2.449489742783178 | t | 2023-01-30 07:13:53.057454 + 007 | 0007 | 0007 | 7 | 00000000000000000007 | 2.6457513110645907 | t | 2023-01-30 07:13:53.057457 + 008 | 0008 | 0008 | 8 | 00000000000000000008 | 2.8284271247461903 | t | 2023-01-30 07:13:53.05746 + 009 | 0009 | 0009 | 9 | 00000000000000000009 | 3 | t | 2023-01-30 07:13:53.057463 + 010 | 0010 | 0010 | 10 | 00000000000000000010 | 3.1622776601683795 | t | 2023-01-30 07:13:53.057466 + 011 | 0011 | 0011 | 11 | 00000000000000000011 | 3.3166247903554 | t | 2023-01-30 07:13:53.05747 + 012 | 0012 | 0012 | 12 | 00000000000000000012 | 3.4641016151377544 | t | 2023-01-30 07:13:53.057473 + 013 | 0013 | 0013 | 13 | 00000000000000000013 | 3.605551275463989 | t | 2023-01-30 07:13:53.057476 + 014 | 0014 | 0014 | 14 | 00000000000000000014 | 3.7416573867739413 | t | 2023-01-30 07:13:53.057479 + 015 | 0015 | 0015 | 15 | 00000000000000000015 | 3.872983346207417 | t | 2023-01-30 07:13:53.057482 + 016 | 0016 | 0016 | 16 | 00000000000000000016 | 4 | t | 2023-01-30 07:13:53.057486 + 017 | 0017 | 0017 | 17 | 00000000000000000017 | 4.123105625617661 | t | 2023-01-30 07:13:53.057489 + 018 | 0018 | 0018 | 18 | 00000000000000000018 | 4.242640687119285 | t | 2023-01-30 07:13:53.057494 + 019 | 0019 | 0019 | 19 | 00000000000000000019 | 4.358898943540674 | t | 2023-01-30 07:13:53.057497 + 020 | 0020 | 0020 | 20 | 00000000000000000020 | 4.47213595499958 | t | 2023-01-30 07:13:53.057501 + 021 | 0021 | 0021 | 21 | 00000000000000000021 | 4.58257569495584 | t | 2023-01-30 07:13:53.057504 + 022 | 0022 | 0022 | 22 | 00000000000000000022 | 4.69041575982343 | t | 2023-01-30 07:13:53.057509 + 023 | 0023 | 0023 | 23 | 00000000000000000023 | 4.795831523312719 | t | 2023-01-30 07:13:53.057512 + 024 | 0024 | 0024 | 24 | 00000000000000000024 | 4.898979485566356 | t | 2023-01-30 07:13:53.057516 + 025 | 0025 | 0025 | 25 | 00000000000000000025 | 5 | t | 2023-01-30 07:13:53.05752 + 026 | 0026 | 0026 | 26 | 00000000000000000026 | 5.0990195135927845 | t | 2023-01-30 07:13:53.057524 + 027 | 0027 | 0027 | 27 | 00000000000000000027 | 5.196152422706632 | t | 2023-01-30 07:13:53.057527 + 028 | 0028 | 0028 | 28 | 00000000000000000028 | 5.291502622129181 | t | 2023-01-30 07:13:53.057531 + 029 | 0029 | 0029 | 29 | 00000000000000000029 | 5.385164807134504 | t | 2023-01-30 07:13:53.057534 + 030 | 0030 | 0030 | 30 | 00000000000000000030 | 5.477225575051661 | t | 2023-01-30 07:13:53.057539 + 031 | 0031 | 0031 | 31 | 00000000000000000031 | 5.5677643628300215 | t | 2023-01-30 07:13:53.057542 + 032 | 0032 | 0032 | 32 | 00000000000000000032 | 5.656854249492381 | t | 2023-01-30 07:13:53.057546 + 033 | 0033 | 0033 | 33 | 00000000000000000033 | 5.744562646538029 | t | 2023-01-30 07:13:53.057549 + 034 | 0034 | 0034 | 34 | 00000000000000000034 | 5.830951894845301 | t | 2023-01-30 07:13:53.057554 + 035 | 0035 | 0035 | 35 | 00000000000000000035 | 5.916079783099616 | t | 2023-01-30 07:13:53.057557 + 036 | 0036 | 0036 | 36 | 00000000000000000036 | 6 | t | 2023-01-30 07:13:53.057561 + 037 | 0037 | 0037 | 37 | 00000000000000000037 | 6.082762530298219 | t | 2023-01-30 07:13:53.057564 + 038 | 0038 | 0038 | 38 | 00000000000000000038 | 6.164414002968976 | t | 2023-01-30 07:13:53.057568 + 039 | 0039 | 0039 | 39 | 00000000000000000039 | 6.244997998398398 | t | 2023-01-30 07:13:53.057571 + 040 | 0040 | 0040 | 40 | 00000000000000000040 | 6.324555320336759 | t | 2023-01-30 07:13:53.057575 + 041 | 0041 | 0041 | 41 | 00000000000000000041 | 6.4031242374328485 | t | 2023-01-30 07:13:53.057578 + 042 | 0042 | 0042 | 42 | 00000000000000000042 | 6.48074069840786 | t | 2023-01-30 07:13:53.057582 + 043 | 0043 | 0043 | 43 | 00000000000000000043 | 6.557438524302 | t | 2023-01-30 07:13:53.057585 + 044 | 0044 | 0044 | 44 | 00000000000000000044 | 6.6332495807108 | t | 2023-01-30 07:13:53.05759 + 045 | 0045 | 0045 | 45 | 00000000000000000045 | 6.708203932499369 | t | 2023-01-30 07:13:53.057593 + 046 | 0046 | 0046 | 46 | 00000000000000000046 | 6.782329983125268 | t | 2023-01-30 07:13:53.057598 + 047 | 0047 | 0047 | 47 | 00000000000000000047 | 6.855654600401044 | t | 2023-01-30 07:13:53.057601 + 048 | 0048 | 0048 | 48 | 00000000000000000048 | 6.928203230275509 | t | 2023-01-30 07:13:53.057605 + 049 | 0049 | 0049 | 49 | 00000000000000000049 | 7 | t | 2023-01-30 07:13:53.057608 + 050 | 0050 | 0050 | 50 | 00000000000000000050 | 7.0710678118654755 | t | 2023-01-30 07:13:53.057612 + 051 | 0051 | 0051 | 51 | 00000000000000000051 | 7.14142842854285 | t | 2023-01-30 07:13:53.057615 + 052 | 0052 | 0052 | 52 | 00000000000000000052 | 7.211102550927978 | t | 2023-01-30 07:13:53.057619 + 053 | 0053 | 0053 | 53 | 00000000000000000053 | 7.280109889280518 | t | 2023-01-30 07:13:53.057623 + 054 | 0054 | 0054 | 54 | 00000000000000000054 | 7.3484692283495345 | t | 2023-01-30 07:13:53.057627 + 055 | 0055 | 0055 | 55 | 00000000000000000055 | 7.416198487095663 | t | 2023-01-30 07:13:53.05763 + 056 | 0056 | 0056 | 56 | 00000000000000000056 | 7.483314773547883 | t | 2023-01-30 07:13:53.057634 + 057 | 0057 | 0057 | 57 | 00000000000000000057 | 7.54983443527075 | t | 2023-01-30 07:13:53.057637 + 058 | 0058 | 0058 | 58 | 00000000000000000058 | 7.615773105863909 | t | 2023-01-30 07:13:53.057641 + 059 | 0059 | 0059 | 59 | 00000000000000000059 | 7.681145747868608 | t | 2023-01-30 07:13:53.057644 + 060 | 0060 | 0060 | 60 | 00000000000000000060 | 7.745966692414834 | t | 2023-01-30 07:13:53.057648 + 061 | 0061 | 0061 | 61 | 00000000000000000061 | 7.810249675906654 | t | 2023-01-30 07:13:53.057651 + 062 | 0062 | 0062 | 62 | 00000000000000000062 | 7.874007874011811 | t | 2023-01-30 07:13:53.057656 + 063 | 0063 | 0063 | 63 | 00000000000000000063 | 7.937253933193772 | t | 2023-01-30 07:13:53.057659 + 064 | 0064 | 0064 | 64 | 00000000000000000064 | 8 | t | 2023-01-30 07:13:53.057663 + 065 | 0065 | 0065 | 65 | 00000000000000000065 | 8.06225774829855 | t | 2023-01-30 07:13:53.057666 + 066 | 0066 | 0066 | 66 | 00000000000000000066 | 8.12403840463596 | t | 2023-01-30 07:13:53.057669 + 067 | 0067 | 0067 | 67 | 00000000000000000067 | 8.18535277187245 | t | 2023-01-30 07:13:53.057673 + 068 | 0068 | 0068 | 68 | 00000000000000000068 | 8.246211251235321 | t | 2023-01-30 07:13:53.057676 + 069 | 0069 | 0069 | 69 | 00000000000000000069 | 8.306623862918075 | t | 2023-01-30 07:13:53.05768 + 070 | 0070 | 0070 | 70 | 00000000000000000070 | 8.366600265340756 | t | 2023-01-30 07:13:53.057683 + 071 | 0071 | 0071 | 71 | 00000000000000000071 | 8.426149773176359 | t | 2023-01-30 07:13:53.057687 + 072 | 0072 | 0072 | 72 | 00000000000000000072 | 8.48528137423857 | t | 2023-01-30 07:13:53.05769 + 073 | 0073 | 0073 | 73 | 00000000000000000073 | 8.54400374531753 | t | 2023-01-30 07:13:53.057695 + 074 | 0074 | 0074 | 74 | 00000000000000000074 | 8.602325267042627 | t | 2023-01-30 07:13:53.057698 + 075 | 0075 | 0075 | 75 | 00000000000000000075 | 8.660254037844387 | t | 2023-01-30 07:13:53.057705 + 076 | 0076 | 0076 | 76 | 00000000000000000076 | 8.717797887081348 | t | 2023-01-30 07:13:53.057708 + 077 | 0077 | 0077 | 77 | 00000000000000000077 | 8.774964387392123 | t | 2023-01-30 07:13:53.057712 + 078 | 0078 | 0078 | 78 | 00000000000000000078 | 8.831760866327848 | t | 2023-01-30 07:13:53.057715 + 079 | 0079 | 0079 | 79 | 00000000000000000079 | 8.888194417315589 | t | 2023-01-30 07:13:53.05772 + 080 | 0080 | 0080 | 80 | 00000000000000000080 | 8.94427190999916 | t | 2023-01-30 07:13:53.057722 + 081 | 0081 | 0081 | 81 | 00000000000000000081 | 9 | t | 2023-01-30 07:13:53.057727 + 082 | 0082 | 0082 | 82 | 00000000000000000082 | 9.055385138137417 | t | 2023-01-30 07:13:53.05773 + 083 | 0083 | 0083 | 83 | 00000000000000000083 | 9.1104335791443 | t | 2023-01-30 07:13:53.057736 + 084 | 0084 | 0084 | 84 | 00000000000000000084 | 9.16515138991168 | t | 2023-01-30 07:13:53.057739 + 085 | 0085 | 0085 | 85 | 00000000000000000085 | 9.219544457292887 | t | 2023-01-30 07:13:53.057743 + 086 | 0086 | 0086 | 86 | 00000000000000000086 | 9.273618495495704 | t | 2023-01-30 07:13:53.057746 + 087 | 0087 | 0087 | 87 | 00000000000000000087 | 9.327379053088816 | t | 2023-01-30 07:13:53.057751 + 088 | 0088 | 0088 | 88 | 00000000000000000088 | 9.38083151964686 | t | 2023-01-30 07:13:53.057754 + 089 | 0089 | 0089 | 89 | 00000000000000000089 | 9.433981132056603 | t | 2023-01-30 07:13:53.057758 + 090 | 0090 | 0090 | 90 | 00000000000000000090 | 9.486832980505138 | t | 2023-01-30 07:13:53.057761 + 091 | 0091 | 0091 | 91 | 00000000000000000091 | 9.539392014169456 | t | 2023-01-30 07:13:53.057765 + 092 | 0092 | 0092 | 92 | 00000000000000000092 | 9.591663046625438 | t | 2023-01-30 07:13:53.057768 + 093 | 0093 | 0093 | 93 | 00000000000000000093 | 9.643650760992955 | t | 2023-01-30 07:13:53.057772 + 094 | 0094 | 0094 | 94 | 00000000000000000094 | 9.695359714832659 | t | 2023-01-30 07:13:53.057775 + 095 | 0095 | 0095 | 95 | 00000000000000000095 | 9.746794344808963 | t | 2023-01-30 07:13:53.05778 + 096 | 0096 | 0096 | 96 | 00000000000000000096 | 9.797958971132712 | t | 2023-01-30 07:13:53.057783 + 097 | 0097 | 0097 | 97 | 00000000000000000097 | 9.848857801796104 | t | 2023-01-30 07:13:53.057787 + 098 | 0098 | 0098 | 98 | 00000000000000000098 | 9.899494936611665 | t | 2023-01-30 07:13:53.05779 + 099 | 0099 | 0099 | 99 | 00000000000000000099 | 9.9498743710662 | t | 2023-01-30 07:13:53.057794 +(99 rows) + +Time: 12.472 ms +-- 1% +--Testcase 52: +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 100; + tag1 | tag2 | tag3 | c1 | c2 | c3 | c4 | time +------+------+------+----+----------------------+--------------------+----+---------------------------- + 001 | 0001 | 0001 | 1 | 00000000000000000001 | 1 | t | 2023-01-30 07:13:53.057435 + 002 | 0002 | 0002 | 2 | 00000000000000000002 | 1.4142135623730951 | t | 2023-01-30 07:13:53.05744 + 003 | 0003 | 0003 | 3 | 00000000000000000003 | 1.7320508075688772 | t | 2023-01-30 07:13:53.057444 + 004 | 0004 | 0004 | 4 | 00000000000000000004 | 2 | t | 2023-01-30 07:13:53.057447 + 005 | 0005 | 0005 | 5 | 00000000000000000005 | 2.23606797749979 | t | 2023-01-30 07:13:53.057451 + 006 | 0006 | 0006 | 6 | 00000000000000000006 | 2.449489742783178 | t | 2023-01-30 07:13:53.057454 + 007 | 0007 | 0007 | 7 | 00000000000000000007 | 2.6457513110645907 | t | 2023-01-30 07:13:53.057457 + 008 | 0008 | 0008 | 8 | 00000000000000000008 | 2.8284271247461903 | t | 2023-01-30 07:13:53.05746 + 009 | 0009 | 0009 | 9 | 00000000000000000009 | 3 | t | 2023-01-30 07:13:53.057463 +(9 rows) + +Time: 9.080 ms +-- +-- agg push down +-- +--Testcase 53: +SELECT avg(c1), count(*) FROM tbl1; + avg | count +----------------------+------- + 500.5000000000000000 | 1000 +(1 row) + +Time: 14.842 ms +-- +-- select data based on time series as: time period, data frequency +-- +--Testcase 54: +SELECT * FROM tbl1 WHERE time <= now() AND time > now() - interval '1 day' GROUP BY tag2, tag3, tag1, c1, c2, c3, c4, time; + tag1 | tag2 | tag3 | c1 | c2 | c3 | c4 | time +------+------+------+------+----------------------+--------------------+----+---------------------------- + 000 | 0000 | 1000 | 1000 | 00000000000000000000 | 31.622776601683793 | t | 2023-01-30 07:13:53.061576 + 001 | 0001 | 0001 | 1 | 00000000000000000001 | 1 | t | 2023-01-30 07:13:53.057435 + 002 | 0002 | 0002 | 2 | 00000000000000000002 | 1.4142135623730951 | t | 2023-01-30 07:13:53.05744 + 003 | 0003 | 0003 | 3 | 00000000000000000003 | 1.7320508075688772 | t | 2023-01-30 07:13:53.057444 + 004 | 0004 | 0004 | 4 | 00000000000000000004 | 2 | t | 2023-01-30 07:13:53.057447 + 005 | 0005 | 0005 | 5 | 00000000000000000005 | 2.23606797749979 | t | 2023-01-30 07:13:53.057451 + 006 | 0006 | 0006 | 6 | 00000000000000000006 | 2.449489742783178 | t | 2023-01-30 07:13:53.057454 + 007 | 0007 | 0007 | 7 | 00000000000000000007 | 2.6457513110645907 | t | 2023-01-30 07:13:53.057457 + 008 | 0008 | 0008 | 8 | 00000000000000000008 | 2.8284271247461903 | t | 2023-01-30 07:13:53.05746 + 009 | 0009 | 0009 | 9 | 00000000000000000009 | 3 | t | 2023-01-30 07:13:53.057463 + 010 | 0010 | 0010 | 10 | 00000000000000000010 | 3.1622776601683795 | t | 2023-01-30 07:13:53.057466 + 011 | 0011 | 0011 | 11 | 00000000000000000011 | 3.3166247903554 | t | 2023-01-30 07:13:53.05747 + 012 | 0012 | 0012 | 12 | 00000000000000000012 | 3.4641016151377544 | t | 2023-01-30 07:13:53.057473 + 013 | 0013 | 0013 | 13 | 00000000000000000013 | 3.605551275463989 | t | 2023-01-30 07:13:53.057476 + 014 | 0014 | 0014 | 14 | 00000000000000000014 | 3.7416573867739413 | t | 2023-01-30 07:13:53.057479 + 015 | 0015 | 0015 | 15 | 00000000000000000015 | 3.872983346207417 | t | 2023-01-30 07:13:53.057482 + 016 | 0016 | 0016 | 16 | 00000000000000000016 | 4 | t | 2023-01-30 07:13:53.057486 + 017 | 0017 | 0017 | 17 | 00000000000000000017 | 4.123105625617661 | t | 2023-01-30 07:13:53.057489 + 018 | 0018 | 0018 | 18 | 00000000000000000018 | 4.242640687119285 | t | 2023-01-30 07:13:53.057494 + 019 | 0019 | 0019 | 19 | 00000000000000000019 | 4.358898943540674 | t | 2023-01-30 07:13:53.057497 + 020 | 0020 | 0020 | 20 | 00000000000000000020 | 4.47213595499958 | t | 2023-01-30 07:13:53.057501 + 021 | 0021 | 0021 | 21 | 00000000000000000021 | 4.58257569495584 | t | 2023-01-30 07:13:53.057504 + 022 | 0022 | 0022 | 22 | 00000000000000000022 | 4.69041575982343 | t | 2023-01-30 07:13:53.057509 + 023 | 0023 | 0023 | 23 | 00000000000000000023 | 4.795831523312719 | t | 2023-01-30 07:13:53.057512 + 024 | 0024 | 0024 | 24 | 00000000000000000024 | 4.898979485566356 | t | 2023-01-30 07:13:53.057516 + 025 | 0025 | 0025 | 25 | 00000000000000000025 | 5 | t | 2023-01-30 07:13:53.05752 + 026 | 0026 | 0026 | 26 | 00000000000000000026 | 5.0990195135927845 | t | 2023-01-30 07:13:53.057524 + 027 | 0027 | 0027 | 27 | 00000000000000000027 | 5.196152422706632 | t | 2023-01-30 07:13:53.057527 + 028 | 0028 | 0028 | 28 | 00000000000000000028 | 5.291502622129181 | t | 2023-01-30 07:13:53.057531 + 029 | 0029 | 0029 | 29 | 00000000000000000029 | 5.385164807134504 | t | 2023-01-30 07:13:53.057534 + 030 | 0030 | 0030 | 30 | 00000000000000000030 | 5.477225575051661 | t | 2023-01-30 07:13:53.057539 + 031 | 0031 | 0031 | 31 | 00000000000000000031 | 5.5677643628300215 | t | 2023-01-30 07:13:53.057542 + 032 | 0032 | 0032 | 32 | 00000000000000000032 | 5.656854249492381 | t | 2023-01-30 07:13:53.057546 + 033 | 0033 | 0033 | 33 | 00000000000000000033 | 5.744562646538029 | t | 2023-01-30 07:13:53.057549 + 034 | 0034 | 0034 | 34 | 00000000000000000034 | 5.830951894845301 | t | 2023-01-30 07:13:53.057554 + 035 | 0035 | 0035 | 35 | 00000000000000000035 | 5.916079783099616 | t | 2023-01-30 07:13:53.057557 + 036 | 0036 | 0036 | 36 | 00000000000000000036 | 6 | t | 2023-01-30 07:13:53.057561 + 037 | 0037 | 0037 | 37 | 00000000000000000037 | 6.082762530298219 | t | 2023-01-30 07:13:53.057564 + 038 | 0038 | 0038 | 38 | 00000000000000000038 | 6.164414002968976 | t | 2023-01-30 07:13:53.057568 + 039 | 0039 | 0039 | 39 | 00000000000000000039 | 6.244997998398398 | t | 2023-01-30 07:13:53.057571 + 040 | 0040 | 0040 | 40 | 00000000000000000040 | 6.324555320336759 | t | 2023-01-30 07:13:53.057575 + 041 | 0041 | 0041 | 41 | 00000000000000000041 | 6.4031242374328485 | t | 2023-01-30 07:13:53.057578 + 042 | 0042 | 0042 | 42 | 00000000000000000042 | 6.48074069840786 | t | 2023-01-30 07:13:53.057582 + 043 | 0043 | 0043 | 43 | 00000000000000000043 | 6.557438524302 | t | 2023-01-30 07:13:53.057585 + 044 | 0044 | 0044 | 44 | 00000000000000000044 | 6.6332495807108 | t | 2023-01-30 07:13:53.05759 + 045 | 0045 | 0045 | 45 | 00000000000000000045 | 6.708203932499369 | t | 2023-01-30 07:13:53.057593 + 046 | 0046 | 0046 | 46 | 00000000000000000046 | 6.782329983125268 | t | 2023-01-30 07:13:53.057598 + 047 | 0047 | 0047 | 47 | 00000000000000000047 | 6.855654600401044 | t | 2023-01-30 07:13:53.057601 + 048 | 0048 | 0048 | 48 | 00000000000000000048 | 6.928203230275509 | t | 2023-01-30 07:13:53.057605 + 049 | 0049 | 0049 | 49 | 00000000000000000049 | 7 | t | 2023-01-30 07:13:53.057608 + 050 | 0050 | 0050 | 50 | 00000000000000000050 | 7.0710678118654755 | t | 2023-01-30 07:13:53.057612 + 051 | 0051 | 0051 | 51 | 00000000000000000051 | 7.14142842854285 | t | 2023-01-30 07:13:53.057615 + 052 | 0052 | 0052 | 52 | 00000000000000000052 | 7.211102550927978 | t | 2023-01-30 07:13:53.057619 + 053 | 0053 | 0053 | 53 | 00000000000000000053 | 7.280109889280518 | t | 2023-01-30 07:13:53.057623 + 054 | 0054 | 0054 | 54 | 00000000000000000054 | 7.3484692283495345 | t | 2023-01-30 07:13:53.057627 + 055 | 0055 | 0055 | 55 | 00000000000000000055 | 7.416198487095663 | t | 2023-01-30 07:13:53.05763 + 056 | 0056 | 0056 | 56 | 00000000000000000056 | 7.483314773547883 | t | 2023-01-30 07:13:53.057634 + 057 | 0057 | 0057 | 57 | 00000000000000000057 | 7.54983443527075 | t | 2023-01-30 07:13:53.057637 + 058 | 0058 | 0058 | 58 | 00000000000000000058 | 7.615773105863909 | t | 2023-01-30 07:13:53.057641 + 059 | 0059 | 0059 | 59 | 00000000000000000059 | 7.681145747868608 | t | 2023-01-30 07:13:53.057644 + 060 | 0060 | 0060 | 60 | 00000000000000000060 | 7.745966692414834 | t | 2023-01-30 07:13:53.057648 + 061 | 0061 | 0061 | 61 | 00000000000000000061 | 7.810249675906654 | t | 2023-01-30 07:13:53.057651 + 062 | 0062 | 0062 | 62 | 00000000000000000062 | 7.874007874011811 | t | 2023-01-30 07:13:53.057656 + 063 | 0063 | 0063 | 63 | 00000000000000000063 | 7.937253933193772 | t | 2023-01-30 07:13:53.057659 + 064 | 0064 | 0064 | 64 | 00000000000000000064 | 8 | t | 2023-01-30 07:13:53.057663 + 065 | 0065 | 0065 | 65 | 00000000000000000065 | 8.06225774829855 | t | 2023-01-30 07:13:53.057666 + 066 | 0066 | 0066 | 66 | 00000000000000000066 | 8.12403840463596 | t | 2023-01-30 07:13:53.057669 + 067 | 0067 | 0067 | 67 | 00000000000000000067 | 8.18535277187245 | t | 2023-01-30 07:13:53.057673 + 068 | 0068 | 0068 | 68 | 00000000000000000068 | 8.246211251235321 | t | 2023-01-30 07:13:53.057676 + 069 | 0069 | 0069 | 69 | 00000000000000000069 | 8.306623862918075 | t | 2023-01-30 07:13:53.05768 + 070 | 0070 | 0070 | 70 | 00000000000000000070 | 8.366600265340756 | t | 2023-01-30 07:13:53.057683 + 071 | 0071 | 0071 | 71 | 00000000000000000071 | 8.426149773176359 | t | 2023-01-30 07:13:53.057687 + 072 | 0072 | 0072 | 72 | 00000000000000000072 | 8.48528137423857 | t | 2023-01-30 07:13:53.05769 + 073 | 0073 | 0073 | 73 | 00000000000000000073 | 8.54400374531753 | t | 2023-01-30 07:13:53.057695 + 074 | 0074 | 0074 | 74 | 00000000000000000074 | 8.602325267042627 | t | 2023-01-30 07:13:53.057698 + 075 | 0075 | 0075 | 75 | 00000000000000000075 | 8.660254037844387 | t | 2023-01-30 07:13:53.057705 + 076 | 0076 | 0076 | 76 | 00000000000000000076 | 8.717797887081348 | t | 2023-01-30 07:13:53.057708 + 077 | 0077 | 0077 | 77 | 00000000000000000077 | 8.774964387392123 | t | 2023-01-30 07:13:53.057712 + 078 | 0078 | 0078 | 78 | 00000000000000000078 | 8.831760866327848 | t | 2023-01-30 07:13:53.057715 + 079 | 0079 | 0079 | 79 | 00000000000000000079 | 8.888194417315589 | t | 2023-01-30 07:13:53.05772 + 080 | 0080 | 0080 | 80 | 00000000000000000080 | 8.94427190999916 | t | 2023-01-30 07:13:53.057722 + 081 | 0081 | 0081 | 81 | 00000000000000000081 | 9 | t | 2023-01-30 07:13:53.057727 + 082 | 0082 | 0082 | 82 | 00000000000000000082 | 9.055385138137417 | t | 2023-01-30 07:13:53.05773 + 083 | 0083 | 0083 | 83 | 00000000000000000083 | 9.1104335791443 | t | 2023-01-30 07:13:53.057736 + 084 | 0084 | 0084 | 84 | 00000000000000000084 | 9.16515138991168 | t | 2023-01-30 07:13:53.057739 + 085 | 0085 | 0085 | 85 | 00000000000000000085 | 9.219544457292887 | t | 2023-01-30 07:13:53.057743 + 086 | 0086 | 0086 | 86 | 00000000000000000086 | 9.273618495495704 | t | 2023-01-30 07:13:53.057746 + 087 | 0087 | 0087 | 87 | 00000000000000000087 | 9.327379053088816 | t | 2023-01-30 07:13:53.057751 + 088 | 0088 | 0088 | 88 | 00000000000000000088 | 9.38083151964686 | t | 2023-01-30 07:13:53.057754 + 089 | 0089 | 0089 | 89 | 00000000000000000089 | 9.433981132056603 | t | 2023-01-30 07:13:53.057758 + 090 | 0090 | 0090 | 90 | 00000000000000000090 | 9.486832980505138 | t | 2023-01-30 07:13:53.057761 + 091 | 0091 | 0091 | 91 | 00000000000000000091 | 9.539392014169456 | t | 2023-01-30 07:13:53.057765 + 092 | 0092 | 0092 | 92 | 00000000000000000092 | 9.591663046625438 | t | 2023-01-30 07:13:53.057768 + 093 | 0093 | 0093 | 93 | 00000000000000000093 | 9.643650760992955 | t | 2023-01-30 07:13:53.057772 + 094 | 0094 | 0094 | 94 | 00000000000000000094 | 9.695359714832659 | t | 2023-01-30 07:13:53.057775 + 095 | 0095 | 0095 | 95 | 00000000000000000095 | 9.746794344808963 | t | 2023-01-30 07:13:53.05778 + 096 | 0096 | 0096 | 96 | 00000000000000000096 | 9.797958971132712 | t | 2023-01-30 07:13:53.057783 + 097 | 0097 | 0097 | 97 | 00000000000000000097 | 9.848857801796104 | t | 2023-01-30 07:13:53.057787 + 098 | 0098 | 0098 | 98 | 00000000000000000098 | 9.899494936611665 | t | 2023-01-30 07:13:53.05779 + 099 | 0099 | 0099 | 99 | 00000000000000000099 | 9.9498743710662 | t | 2023-01-30 07:13:53.057794 + 000 | 0100 | 0100 | 100 | 00000000000000000000 | 10 | t | 2023-01-30 07:13:53.057797 + 001 | 0101 | 0101 | 101 | 00000000000000000001 | 10.04987562112089 | t | 2023-01-30 07:13:53.057802 + 002 | 0102 | 0102 | 102 | 00000000000000000002 | 10.099504938362077 | t | 2023-01-30 07:13:53.057805 + 003 | 0103 | 0103 | 103 | 00000000000000000003 | 10.14889156509222 | t | 2023-01-30 07:13:53.057809 + 004 | 0104 | 0104 | 104 | 00000000000000000004 | 10.198039027185569 | t | 2023-01-30 07:13:53.057812 + 005 | 0105 | 0105 | 105 | 00000000000000000005 | 10.246950765959598 | t | 2023-01-30 07:13:53.057816 + 006 | 0106 | 0106 | 106 | 00000000000000000006 | 10.295630140987 | t | 2023-01-30 07:13:53.057819 + 007 | 0107 | 0107 | 107 | 00000000000000000007 | 10.344080432788601 | t | 2023-01-30 07:13:53.057824 + 008 | 0108 | 0108 | 108 | 00000000000000000008 | 10.392304845413264 | t | 2023-01-30 07:13:53.057827 + 009 | 0109 | 0109 | 109 | 00000000000000000009 | 10.44030650891055 | t | 2023-01-30 07:13:53.057831 + 010 | 0110 | 0110 | 110 | 00000000000000000010 | 10.488088481701515 | t | 2023-01-30 07:13:53.057834 + 011 | 0111 | 0111 | 111 | 00000000000000000011 | 10.535653752852738 | t | 2023-01-30 07:13:53.057839 + 012 | 0112 | 0112 | 112 | 00000000000000000012 | 10.583005244258363 | t | 2023-01-30 07:13:53.057842 + 013 | 0113 | 0113 | 113 | 00000000000000000013 | 10.63014581273465 | t | 2023-01-30 07:13:53.057846 + 014 | 0114 | 0114 | 114 | 00000000000000000014 | 10.677078252031311 | t | 2023-01-30 07:13:53.057849 + 015 | 0115 | 0115 | 115 | 00000000000000000015 | 10.723805294763608 | t | 2023-01-30 07:13:53.057853 + 016 | 0116 | 0116 | 116 | 00000000000000000016 | 10.770329614269007 | t | 2023-01-30 07:13:53.057856 + 017 | 0117 | 0117 | 117 | 00000000000000000017 | 10.816653826391969 | t | 2023-01-30 07:13:53.05786 + 018 | 0118 | 0118 | 118 | 00000000000000000018 | 10.862780491200215 | t | 2023-01-30 07:13:53.057863 + 019 | 0119 | 0119 | 119 | 00000000000000000019 | 10.908712114635714 | t | 2023-01-30 07:13:53.057868 + 020 | 0120 | 0120 | 120 | 00000000000000000020 | 10.954451150103322 | t | 2023-01-30 07:13:53.057871 + 021 | 0121 | 0121 | 121 | 00000000000000000021 | 11 | t | 2023-01-30 07:13:53.057875 + 022 | 0122 | 0122 | 122 | 00000000000000000022 | 11.045361017187261 | t | 2023-01-30 07:13:53.057878 + 023 | 0123 | 0123 | 123 | 00000000000000000023 | 11.090536506409418 | t | 2023-01-30 07:13:53.057882 + 024 | 0124 | 0124 | 124 | 00000000000000000024 | 11.135528725660043 | t | 2023-01-30 07:13:53.057885 + 025 | 0125 | 0125 | 125 | 00000000000000000025 | 11.180339887498949 | t | 2023-01-30 07:13:53.057889 + 026 | 0126 | 0126 | 126 | 00000000000000000026 | 11.224972160321824 | t | 2023-01-30 07:13:53.057892 + 027 | 0127 | 0127 | 127 | 00000000000000000027 | 11.269427669584644 | t | 2023-01-30 07:13:53.057896 + 028 | 0128 | 0128 | 128 | 00000000000000000028 | 11.313708498984761 | t | 2023-01-30 07:13:53.057899 + 029 | 0129 | 0129 | 129 | 00000000000000000029 | 11.357816691600547 | t | 2023-01-30 07:13:53.057904 + 030 | 0130 | 0130 | 130 | 00000000000000000030 | 11.40175425099138 | t | 2023-01-30 07:13:53.057907 + 031 | 0131 | 0131 | 131 | 00000000000000000031 | 11.445523142259598 | t | 2023-01-30 07:13:53.057911 + 032 | 0132 | 0132 | 132 | 00000000000000000032 | 11.489125293076057 | t | 2023-01-30 07:13:53.057915 + 033 | 0133 | 0133 | 133 | 00000000000000000033 | 11.532562594670797 | t | 2023-01-30 07:13:53.057919 + 034 | 0134 | 0134 | 134 | 00000000000000000034 | 11.575836902790225 | t | 2023-01-30 07:13:53.057922 + 035 | 0135 | 0135 | 135 | 00000000000000000035 | 11.61895003862225 | t | 2023-01-30 07:13:53.057926 + 036 | 0136 | 0136 | 136 | 00000000000000000036 | 11.661903789690601 | t | 2023-01-30 07:13:53.057929 + 037 | 0137 | 0137 | 137 | 00000000000000000037 | 11.704699910719626 | t | 2023-01-30 07:13:53.057932 + 038 | 0138 | 0138 | 138 | 00000000000000000038 | 11.74734012447073 | t | 2023-01-30 07:13:53.057939 + 039 | 0139 | 0139 | 139 | 00000000000000000039 | 11.789826122551595 | t | 2023-01-30 07:13:53.057942 + 040 | 0140 | 0140 | 140 | 00000000000000000040 | 11.832159566199232 | t | 2023-01-30 07:13:53.057946 + 041 | 0141 | 0141 | 141 | 00000000000000000041 | 11.874342087037917 | t | 2023-01-30 07:13:53.057949 + 042 | 0142 | 0142 | 142 | 00000000000000000042 | 11.916375287812984 | t | 2023-01-30 07:13:53.057953 + 043 | 0143 | 0143 | 143 | 00000000000000000043 | 11.958260743101398 | t | 2023-01-30 07:13:53.057956 + 044 | 0144 | 0144 | 144 | 00000000000000000044 | 12 | t | 2023-01-30 07:13:53.057961 + 045 | 0145 | 0145 | 145 | 00000000000000000045 | 12.041594578792296 | t | 2023-01-30 07:13:53.057964 + 046 | 0146 | 0146 | 146 | 00000000000000000046 | 12.083045973594572 | t | 2023-01-30 07:13:53.057968 + 047 | 0147 | 0147 | 147 | 00000000000000000047 | 12.12435565298214 | t | 2023-01-30 07:13:53.057971 + 048 | 0148 | 0148 | 148 | 00000000000000000048 | 12.165525060596439 | t | 2023-01-30 07:13:53.057975 + 049 | 0149 | 0149 | 149 | 00000000000000000049 | 12.206555615733702 | t | 2023-01-30 07:13:53.057978 + 050 | 0150 | 0150 | 150 | 00000000000000000050 | 12.24744871391589 | t | 2023-01-30 07:13:53.057983 + 051 | 0151 | 0151 | 151 | 00000000000000000051 | 12.288205727444508 | t | 2023-01-30 07:13:53.057986 + 052 | 0152 | 0152 | 152 | 00000000000000000052 | 12.328828005937952 | t | 2023-01-30 07:13:53.057991 + 053 | 0153 | 0153 | 153 | 00000000000000000053 | 12.36931687685298 | t | 2023-01-30 07:13:53.057994 + 054 | 0154 | 0154 | 154 | 00000000000000000054 | 12.409673645990857 | t | 2023-01-30 07:13:53.057998 + 055 | 0155 | 0155 | 155 | 00000000000000000055 | 12.449899597988733 | t | 2023-01-30 07:13:53.058001 + 056 | 0156 | 0156 | 156 | 00000000000000000056 | 12.489995996796797 | t | 2023-01-30 07:13:53.058005 + 057 | 0157 | 0157 | 157 | 00000000000000000057 | 12.529964086141668 | t | 2023-01-30 07:13:53.058008 + 058 | 0158 | 0158 | 158 | 00000000000000000058 | 12.569805089976535 | t | 2023-01-30 07:13:53.058013 + 059 | 0159 | 0159 | 159 | 00000000000000000059 | 12.609520212918492 | t | 2023-01-30 07:13:53.058016 + 060 | 0160 | 0160 | 160 | 00000000000000000060 | 12.649110640673518 | t | 2023-01-30 07:13:53.05802 + 061 | 0161 | 0161 | 161 | 00000000000000000061 | 12.68857754044952 | t | 2023-01-30 07:13:53.058023 + 062 | 0162 | 0162 | 162 | 00000000000000000062 | 12.727922061357855 | t | 2023-01-30 07:13:53.058027 + 063 | 0163 | 0163 | 163 | 00000000000000000063 | 12.767145334803704 | t | 2023-01-30 07:13:53.05803 + 064 | 0164 | 0164 | 164 | 00000000000000000064 | 12.806248474865697 | t | 2023-01-30 07:13:53.058035 + 065 | 0165 | 0165 | 165 | 00000000000000000065 | 12.84523257866513 | t | 2023-01-30 07:13:53.058038 + 066 | 0166 | 0166 | 166 | 00000000000000000066 | 12.884098726725126 | t | 2023-01-30 07:13:53.058058 + 067 | 0167 | 0167 | 167 | 00000000000000000067 | 12.922847983320086 | t | 2023-01-30 07:13:53.058061 + 068 | 0168 | 0168 | 168 | 00000000000000000068 | 12.96148139681572 | t | 2023-01-30 07:13:53.058065 + 069 | 0169 | 0169 | 169 | 00000000000000000069 | 13 | t | 2023-01-30 07:13:53.058068 + 070 | 0170 | 0170 | 170 | 00000000000000000070 | 13.038404810405298 | t | 2023-01-30 07:13:53.058073 + 071 | 0171 | 0171 | 171 | 00000000000000000071 | 13.076696830622021 | t | 2023-01-30 07:13:53.058076 + 072 | 0172 | 0172 | 172 | 00000000000000000072 | 13.114877048604 | t | 2023-01-30 07:13:53.05808 + 073 | 0173 | 0173 | 173 | 00000000000000000073 | 13.152946437965905 | t | 2023-01-30 07:13:53.058083 + 074 | 0174 | 0174 | 174 | 00000000000000000074 | 13.19090595827292 | t | 2023-01-30 07:13:53.058087 + 075 | 0175 | 0175 | 175 | 00000000000000000075 | 13.228756555322953 | t | 2023-01-30 07:13:53.058102 + 076 | 0176 | 0176 | 176 | 00000000000000000076 | 13.2664991614216 | t | 2023-01-30 07:13:53.058107 + 077 | 0177 | 0177 | 177 | 00000000000000000077 | 13.30413469565007 | t | 2023-01-30 07:13:53.05811 + 078 | 0178 | 0178 | 178 | 00000000000000000078 | 13.341664064126334 | t | 2023-01-30 07:13:53.058114 + 079 | 0179 | 0179 | 179 | 00000000000000000079 | 13.379088160259652 | t | 2023-01-30 07:13:53.058117 + 080 | 0180 | 0180 | 180 | 00000000000000000080 | 13.416407864998739 | t | 2023-01-30 07:13:53.058122 + 081 | 0181 | 0181 | 181 | 00000000000000000081 | 13.45362404707371 | t | 2023-01-30 07:13:53.058125 + 082 | 0182 | 0182 | 182 | 00000000000000000082 | 13.490737563232042 | t | 2023-01-30 07:13:53.058129 + 083 | 0183 | 0183 | 183 | 00000000000000000083 | 13.527749258468683 | t | 2023-01-30 07:13:53.058132 + 084 | 0184 | 0184 | 184 | 00000000000000000084 | 13.564659966250536 | t | 2023-01-30 07:13:53.058135 + 085 | 0185 | 0185 | 185 | 00000000000000000085 | 13.601470508735444 | t | 2023-01-30 07:13:53.058139 + 086 | 0186 | 0186 | 186 | 00000000000000000086 | 13.638181696985855 | t | 2023-01-30 07:13:53.058142 + 087 | 0187 | 0187 | 187 | 00000000000000000087 | 13.674794331177344 | t | 2023-01-30 07:13:53.058147 + 088 | 0188 | 0188 | 188 | 00000000000000000088 | 13.711309200802088 | t | 2023-01-30 07:13:53.05815 + 089 | 0189 | 0189 | 189 | 00000000000000000089 | 13.74772708486752 | t | 2023-01-30 07:13:53.058154 + 090 | 0190 | 0190 | 190 | 00000000000000000090 | 13.784048752090222 | t | 2023-01-30 07:13:53.058157 + 091 | 0191 | 0191 | 191 | 00000000000000000091 | 13.820274961085254 | t | 2023-01-30 07:13:53.058161 + 092 | 0192 | 0192 | 192 | 00000000000000000092 | 13.856406460551018 | t | 2023-01-30 07:13:53.058164 + 093 | 0193 | 0193 | 193 | 00000000000000000093 | 13.892443989449804 | t | 2023-01-30 07:13:53.058169 + 094 | 0194 | 0194 | 194 | 00000000000000000094 | 13.92838827718412 | t | 2023-01-30 07:13:53.058171 + 095 | 0195 | 0195 | 195 | 00000000000000000095 | 13.96424004376894 | t | 2023-01-30 07:13:53.058176 + 096 | 0196 | 0196 | 196 | 00000000000000000096 | 14 | t | 2023-01-30 07:13:53.058179 + 097 | 0197 | 0197 | 197 | 00000000000000000097 | 14.035668847618199 | t | 2023-01-30 07:13:53.058183 + 098 | 0198 | 0198 | 198 | 00000000000000000098 | 14.071247279470288 | t | 2023-01-30 07:13:53.058186 + 099 | 0199 | 0199 | 199 | 00000000000000000099 | 14.106735979665885 | t | 2023-01-30 07:13:53.05819 + 000 | 0200 | 0200 | 200 | 00000000000000000000 | 14.142135623730951 | t | 2023-01-30 07:13:53.058193 + 001 | 0201 | 0201 | 201 | 00000000000000000001 | 14.177446878757825 | t | 2023-01-30 07:13:53.0582 + 002 | 0202 | 0202 | 202 | 00000000000000000002 | 14.212670403551895 | t | 2023-01-30 07:13:53.058203 + 003 | 0203 | 0203 | 203 | 00000000000000000003 | 14.247806848775006 | t | 2023-01-30 07:13:53.058207 + 004 | 0204 | 0204 | 204 | 00000000000000000004 | 14.2828568570857 | t | 2023-01-30 07:13:53.05821 + 005 | 0205 | 0205 | 205 | 00000000000000000005 | 14.317821063276353 | t | 2023-01-30 07:13:53.058214 + 006 | 0206 | 0206 | 206 | 00000000000000000006 | 14.352700094407323 | t | 2023-01-30 07:13:53.058217 + 007 | 0207 | 0207 | 207 | 00000000000000000007 | 14.38749456993816 | t | 2023-01-30 07:13:53.058221 + 008 | 0208 | 0208 | 208 | 00000000000000000008 | 14.422205101855956 | t | 2023-01-30 07:13:53.058224 + 009 | 0209 | 0209 | 209 | 00000000000000000009 | 14.45683229480096 | t | 2023-01-30 07:13:53.058229 + 010 | 0210 | 0210 | 210 | 00000000000000000010 | 14.491376746189438 | t | 2023-01-30 07:13:53.058232 + 011 | 0211 | 0211 | 211 | 00000000000000000011 | 14.52583904633395 | t | 2023-01-30 07:13:53.058236 + 012 | 0212 | 0212 | 212 | 00000000000000000012 | 14.560219778561036 | t | 2023-01-30 07:13:53.058239 + 013 | 0213 | 0213 | 213 | 00000000000000000013 | 14.594519519326424 | t | 2023-01-30 07:13:53.058244 + 014 | 0214 | 0214 | 214 | 00000000000000000014 | 14.628738838327793 | t | 2023-01-30 07:13:53.058248 + 015 | 0215 | 0215 | 215 | 00000000000000000015 | 14.66287829861518 | t | 2023-01-30 07:13:53.058252 + 016 | 0216 | 0216 | 216 | 00000000000000000016 | 14.696938456699069 | t | 2023-01-30 07:13:53.058254 + 017 | 0217 | 0217 | 217 | 00000000000000000017 | 14.730919862656235 | t | 2023-01-30 07:13:53.058262 + 018 | 0218 | 0218 | 218 | 00000000000000000018 | 14.7648230602334 | t | 2023-01-30 07:13:53.058265 + 019 | 0219 | 0219 | 219 | 00000000000000000019 | 14.798648586948742 | t | 2023-01-30 07:13:53.058269 + 020 | 0220 | 0220 | 220 | 00000000000000000020 | 14.832396974191326 | t | 2023-01-30 07:13:53.058272 + 021 | 0221 | 0221 | 221 | 00000000000000000021 | 14.866068747318506 | t | 2023-01-30 07:13:53.058276 + 022 | 0222 | 0222 | 222 | 00000000000000000022 | 14.89966442575134 | t | 2023-01-30 07:13:53.058279 + 023 | 0223 | 0223 | 223 | 00000000000000000023 | 14.933184523068078 | t | 2023-01-30 07:13:53.058283 + 024 | 0224 | 0224 | 224 | 00000000000000000024 | 14.966629547095765 | t | 2023-01-30 07:13:53.058286 + 025 | 0225 | 0225 | 225 | 00000000000000000025 | 15 | t | 2023-01-30 07:13:53.058291 + 026 | 0226 | 0226 | 226 | 00000000000000000026 | 15.033296378372908 | t | 2023-01-30 07:13:53.058294 + 027 | 0227 | 0227 | 227 | 00000000000000000027 | 15.066519173319364 | t | 2023-01-30 07:13:53.058298 + 028 | 0228 | 0228 | 228 | 00000000000000000028 | 15.0996688705415 | t | 2023-01-30 07:13:53.058301 + 029 | 0229 | 0229 | 229 | 00000000000000000029 | 15.132745950421556 | t | 2023-01-30 07:13:53.058305 + 030 | 0230 | 0230 | 230 | 00000000000000000030 | 15.165750888103101 | t | 2023-01-30 07:13:53.058308 + 031 | 0231 | 0231 | 231 | 00000000000000000031 | 15.198684153570664 | t | 2023-01-30 07:13:53.058312 + 032 | 0232 | 0232 | 232 | 00000000000000000032 | 15.231546211727817 | t | 2023-01-30 07:13:53.058315 + 033 | 0233 | 0233 | 233 | 00000000000000000033 | 15.264337522473747 | t | 2023-01-30 07:13:53.05832 + 034 | 0234 | 0234 | 234 | 00000000000000000034 | 15.297058540778355 | t | 2023-01-30 07:13:53.058323 + 035 | 0235 | 0235 | 235 | 00000000000000000035 | 15.329709716755891 | t | 2023-01-30 07:13:53.058327 + 036 | 0236 | 0236 | 236 | 00000000000000000036 | 15.362291495737216 | t | 2023-01-30 07:13:53.05833 + 037 | 0237 | 0237 | 237 | 00000000000000000037 | 15.394804318340652 | t | 2023-01-30 07:13:53.058334 + 038 | 0238 | 0238 | 238 | 00000000000000000038 | 15.427248620541512 | t | 2023-01-30 07:13:53.058337 + 039 | 0239 | 0239 | 239 | 00000000000000000039 | 15.459624833740307 | t | 2023-01-30 07:13:53.058341 + 040 | 0240 | 0240 | 240 | 00000000000000000040 | 15.491933384829668 | t | 2023-01-30 07:13:53.058344 + 041 | 0241 | 0241 | 241 | 00000000000000000041 | 15.524174696260024 | t | 2023-01-30 07:13:53.058348 + 042 | 0242 | 0242 | 242 | 00000000000000000042 | 15.556349186104045 | t | 2023-01-30 07:13:53.058351 + 043 | 0243 | 0243 | 243 | 00000000000000000043 | 15.588457268119896 | t | 2023-01-30 07:13:53.058356 + 044 | 0244 | 0244 | 244 | 00000000000000000044 | 15.620499351813308 | t | 2023-01-30 07:13:53.058359 + 045 | 0245 | 0245 | 245 | 00000000000000000045 | 15.652475842498529 | t | 2023-01-30 07:13:53.058363 + 046 | 0246 | 0246 | 246 | 00000000000000000046 | 15.684387141358123 | t | 2023-01-30 07:13:53.058366 + 047 | 0247 | 0247 | 247 | 00000000000000000047 | 15.716233645501712 | t | 2023-01-30 07:13:53.058371 + 048 | 0248 | 0248 | 248 | 00000000000000000048 | 15.748015748023622 | t | 2023-01-30 07:13:53.058374 + 049 | 0249 | 0249 | 249 | 00000000000000000049 | 15.7797338380595 | t | 2023-01-30 07:13:53.058378 + 050 | 0250 | 0250 | 250 | 00000000000000000050 | 15.811388300841896 | t | 2023-01-30 07:13:53.058381 + 051 | 0251 | 0251 | 251 | 00000000000000000051 | 15.84297951775486 | t | 2023-01-30 07:13:53.058385 + 052 | 0252 | 0252 | 252 | 00000000000000000052 | 15.874507866387544 | t | 2023-01-30 07:13:53.058388 + 053 | 0253 | 0253 | 253 | 00000000000000000053 | 15.905973720586866 | t | 2023-01-30 07:13:53.058392 + 054 | 0254 | 0254 | 254 | 00000000000000000054 | 15.937377450509228 | t | 2023-01-30 07:13:53.058395 + 055 | 0255 | 0255 | 255 | 00000000000000000055 | 15.968719422671311 | t | 2023-01-30 07:13:53.058399 + 056 | 0256 | 0256 | 256 | 00000000000000000056 | 16 | t | 2023-01-30 07:13:53.058402 + 057 | 0257 | 0257 | 257 | 00000000000000000057 | 16.0312195418814 | t | 2023-01-30 07:13:53.058406 + 058 | 0258 | 0258 | 258 | 00000000000000000058 | 16.06237840420901 | t | 2023-01-30 07:13:53.058409 + 059 | 0259 | 0259 | 259 | 00000000000000000059 | 16.09347693943108 | t | 2023-01-30 07:13:53.058413 + 060 | 0260 | 0260 | 260 | 00000000000000000060 | 16.1245154965971 | t | 2023-01-30 07:13:53.058416 + 061 | 0261 | 0261 | 261 | 00000000000000000061 | 16.15549442140351 | t | 2023-01-30 07:13:53.058421 + 062 | 0262 | 0262 | 262 | 00000000000000000062 | 16.186414056238647 | t | 2023-01-30 07:13:53.058424 + 063 | 0263 | 0263 | 263 | 00000000000000000063 | 16.217274740226856 | t | 2023-01-30 07:13:53.05843 + 064 | 0264 | 0264 | 264 | 00000000000000000064 | 16.24807680927192 | t | 2023-01-30 07:13:53.058433 + 065 | 0265 | 0265 | 265 | 00000000000000000065 | 16.278820596099706 | t | 2023-01-30 07:13:53.058438 + 066 | 0266 | 0266 | 266 | 00000000000000000066 | 16.30950643030009 | t | 2023-01-30 07:13:53.058441 + 067 | 0267 | 0267 | 267 | 00000000000000000067 | 16.34013463836819 | t | 2023-01-30 07:13:53.058445 + 068 | 0268 | 0268 | 268 | 00000000000000000068 | 16.3707055437449 | t | 2023-01-30 07:13:53.058448 + 069 | 0269 | 0269 | 269 | 00000000000000000069 | 16.401219466856727 | t | 2023-01-30 07:13:53.058452 + 070 | 0270 | 0270 | 270 | 00000000000000000070 | 16.431676725154983 | t | 2023-01-30 07:13:53.058455 + 071 | 0271 | 0271 | 271 | 00000000000000000071 | 16.46207763315433 | t | 2023-01-30 07:13:53.058458 + 072 | 0272 | 0272 | 272 | 00000000000000000072 | 16.492422502470642 | t | 2023-01-30 07:13:53.058463 + 073 | 0273 | 0273 | 273 | 00000000000000000073 | 16.522711641858304 | t | 2023-01-30 07:13:53.058466 + 074 | 0274 | 0274 | 274 | 00000000000000000074 | 16.55294535724685 | t | 2023-01-30 07:13:53.05847 + 075 | 0275 | 0275 | 275 | 00000000000000000075 | 16.583123951777 | t | 2023-01-30 07:13:53.058473 + 076 | 0276 | 0276 | 276 | 00000000000000000076 | 16.61324772583615 | t | 2023-01-30 07:13:53.058477 + 077 | 0277 | 0277 | 277 | 00000000000000000077 | 16.64331697709324 | t | 2023-01-30 07:13:53.05848 + 078 | 0278 | 0278 | 278 | 00000000000000000078 | 16.673332000533065 | t | 2023-01-30 07:13:53.058484 + 079 | 0279 | 0279 | 279 | 00000000000000000079 | 16.703293088490067 | t | 2023-01-30 07:13:53.058487 + 080 | 0280 | 0280 | 280 | 00000000000000000080 | 16.73320053068151 | t | 2023-01-30 07:13:53.058491 + 081 | 0281 | 0281 | 281 | 00000000000000000081 | 16.76305461424021 | t | 2023-01-30 07:13:53.058494 + 082 | 0282 | 0282 | 282 | 00000000000000000082 | 16.792855623746664 | t | 2023-01-30 07:13:53.058499 + 083 | 0283 | 0283 | 283 | 00000000000000000083 | 16.822603841260722 | t | 2023-01-30 07:13:53.058502 + 084 | 0284 | 0284 | 284 | 00000000000000000084 | 16.852299546352718 | t | 2023-01-30 07:13:53.058507 + 085 | 0285 | 0285 | 285 | 00000000000000000085 | 16.881943016134134 | t | 2023-01-30 07:13:53.05851 + 086 | 0286 | 0286 | 286 | 00000000000000000086 | 16.911534525287763 | t | 2023-01-30 07:13:53.058515 + 087 | 0287 | 0287 | 287 | 00000000000000000087 | 16.941074346097416 | t | 2023-01-30 07:13:53.058518 + 088 | 0288 | 0288 | 288 | 00000000000000000088 | 16.97056274847714 | t | 2023-01-30 07:13:53.058522 + 089 | 0289 | 0289 | 289 | 00000000000000000089 | 17 | t | 2023-01-30 07:13:53.058525 + 090 | 0290 | 0290 | 290 | 00000000000000000090 | 17.029386365926403 | t | 2023-01-30 07:13:53.058529 + 091 | 0291 | 0291 | 291 | 00000000000000000091 | 17.05872210923198 | t | 2023-01-30 07:13:53.058552 + 092 | 0292 | 0292 | 292 | 00000000000000000092 | 17.08800749063506 | t | 2023-01-30 07:13:53.058558 + 093 | 0293 | 0293 | 293 | 00000000000000000093 | 17.11724276862369 | t | 2023-01-30 07:13:53.058561 + 094 | 0294 | 0294 | 294 | 00000000000000000094 | 17.146428199482248 | t | 2023-01-30 07:13:53.058565 + 095 | 0295 | 0295 | 295 | 00000000000000000095 | 17.175564037317667 | t | 2023-01-30 07:13:53.058568 + 096 | 0296 | 0296 | 296 | 00000000000000000096 | 17.204650534085253 | t | 2023-01-30 07:13:53.058573 + 097 | 0297 | 0297 | 297 | 00000000000000000097 | 17.233687939614086 | t | 2023-01-30 07:13:53.058576 + 098 | 0298 | 0298 | 298 | 00000000000000000098 | 17.26267650163207 | t | 2023-01-30 07:13:53.05858 + 099 | 0299 | 0299 | 299 | 00000000000000000099 | 17.291616465790582 | t | 2023-01-30 07:13:53.058583 + 000 | 0300 | 0300 | 300 | 00000000000000000000 | 17.320508075688775 | t | 2023-01-30 07:13:53.058588 + 001 | 0301 | 0301 | 301 | 00000000000000000001 | 17.349351572897472 | t | 2023-01-30 07:13:53.058591 + 002 | 0302 | 0302 | 302 | 00000000000000000002 | 17.378147196982766 | t | 2023-01-30 07:13:53.058595 + 003 | 0303 | 0303 | 303 | 00000000000000000003 | 17.406895185529212 | t | 2023-01-30 07:13:53.058598 + 004 | 0304 | 0304 | 304 | 00000000000000000004 | 17.435595774162696 | t | 2023-01-30 07:13:53.058602 + 005 | 0305 | 0305 | 305 | 00000000000000000005 | 17.46424919657298 | t | 2023-01-30 07:13:53.058605 + 006 | 0306 | 0306 | 306 | 00000000000000000006 | 17.4928556845359 | t | 2023-01-30 07:13:53.05861 + 007 | 0307 | 0307 | 307 | 00000000000000000007 | 17.52141546793523 | t | 2023-01-30 07:13:53.058613 + 008 | 0308 | 0308 | 308 | 00000000000000000008 | 17.549928774784245 | t | 2023-01-30 07:13:53.058617 + 009 | 0309 | 0309 | 309 | 00000000000000000009 | 17.578395831246947 | t | 2023-01-30 07:13:53.05862 + 010 | 0310 | 0310 | 310 | 00000000000000000010 | 17.60681686165901 | t | 2023-01-30 07:13:53.058624 + 011 | 0311 | 0311 | 311 | 00000000000000000011 | 17.635192088548397 | t | 2023-01-30 07:13:53.058627 + 012 | 0312 | 0312 | 312 | 00000000000000000012 | 17.663521732655695 | t | 2023-01-30 07:13:53.058631 + 013 | 0313 | 0313 | 313 | 00000000000000000013 | 17.69180601295413 | t | 2023-01-30 07:13:53.058634 + 014 | 0314 | 0314 | 314 | 00000000000000000014 | 17.72004514666935 | t | 2023-01-30 07:13:53.058638 + 015 | 0315 | 0315 | 315 | 00000000000000000015 | 17.74823934929885 | t | 2023-01-30 07:13:53.058641 + 016 | 0316 | 0316 | 316 | 00000000000000000016 | 17.776388834631177 | t | 2023-01-30 07:13:53.058645 + 017 | 0317 | 0317 | 317 | 00000000000000000017 | 17.804493814764857 | t | 2023-01-30 07:13:53.058649 + 018 | 0318 | 0318 | 318 | 00000000000000000018 | 17.832554500127006 | t | 2023-01-30 07:13:53.058651 + 019 | 0319 | 0319 | 319 | 00000000000000000019 | 17.86057109949175 | t | 2023-01-30 07:13:53.058656 + 020 | 0320 | 0320 | 320 | 00000000000000000020 | 17.88854381999832 | t | 2023-01-30 07:13:53.058659 + 021 | 0321 | 0321 | 321 | 00000000000000000021 | 17.916472867168917 | t | 2023-01-30 07:13:53.058663 + 022 | 0322 | 0322 | 322 | 00000000000000000022 | 17.944358444926362 | t | 2023-01-30 07:13:53.058666 + 023 | 0323 | 0323 | 323 | 00000000000000000023 | 17.97220075561143 | t | 2023-01-30 07:13:53.05867 + 024 | 0324 | 0324 | 324 | 00000000000000000024 | 18 | t | 2023-01-30 07:13:53.058673 + 025 | 0325 | 0325 | 325 | 00000000000000000025 | 18.027756377319946 | t | 2023-01-30 07:13:53.058677 + 026 | 0326 | 0326 | 326 | 00000000000000000026 | 18.05547008526779 | t | 2023-01-30 07:13:53.05868 + 027 | 0327 | 0327 | 327 | 00000000000000000027 | 18.083141320025124 | t | 2023-01-30 07:13:53.058687 + 028 | 0328 | 0328 | 328 | 00000000000000000028 | 18.110770276274835 | t | 2023-01-30 07:13:53.05869 + 029 | 0329 | 0329 | 329 | 00000000000000000029 | 18.138357147217054 | t | 2023-01-30 07:13:53.058695 + 030 | 0330 | 0330 | 330 | 00000000000000000030 | 18.16590212458495 | t | 2023-01-30 07:13:53.058698 + 031 | 0331 | 0331 | 331 | 00000000000000000031 | 18.193405398660254 | t | 2023-01-30 07:13:53.058702 + 032 | 0332 | 0332 | 332 | 00000000000000000032 | 18.2208671582886 | t | 2023-01-30 07:13:53.058705 + 033 | 0333 | 0333 | 333 | 00000000000000000033 | 18.24828759089466 | t | 2023-01-30 07:13:53.058709 + 034 | 0334 | 0334 | 334 | 00000000000000000034 | 18.275666882497067 | t | 2023-01-30 07:13:53.058712 + 035 | 0335 | 0335 | 335 | 00000000000000000035 | 18.303005217723125 | t | 2023-01-30 07:13:53.058716 + 036 | 0336 | 0336 | 336 | 00000000000000000036 | 18.33030277982336 | t | 2023-01-30 07:13:53.058719 + 037 | 0337 | 0337 | 337 | 00000000000000000037 | 18.35755975068582 | t | 2023-01-30 07:13:53.058723 + 038 | 0338 | 0338 | 338 | 00000000000000000038 | 18.384776310850235 | t | 2023-01-30 07:13:53.058726 + 039 | 0339 | 0339 | 339 | 00000000000000000039 | 18.411952639521967 | t | 2023-01-30 07:13:53.05873 + 040 | 0340 | 0340 | 340 | 00000000000000000040 | 18.439088914585774 | t | 2023-01-30 07:13:53.058733 + 041 | 0341 | 0341 | 341 | 00000000000000000041 | 18.466185312619388 | t | 2023-01-30 07:13:53.058737 + 042 | 0342 | 0342 | 342 | 00000000000000000042 | 18.49324200890693 | t | 2023-01-30 07:13:53.05874 + 043 | 0343 | 0343 | 343 | 00000000000000000043 | 18.520259177452136 | t | 2023-01-30 07:13:53.058745 + 044 | 0344 | 0344 | 344 | 00000000000000000044 | 18.547236990991408 | t | 2023-01-30 07:13:53.058748 + 045 | 0345 | 0345 | 345 | 00000000000000000045 | 18.57417562100671 | t | 2023-01-30 07:13:53.058752 + 046 | 0346 | 0346 | 346 | 00000000000000000046 | 18.601075237738275 | t | 2023-01-30 07:13:53.058755 + 047 | 0347 | 0347 | 347 | 00000000000000000047 | 18.627936010197157 | t | 2023-01-30 07:13:53.058759 + 048 | 0348 | 0348 | 348 | 00000000000000000048 | 18.65475810617763 | t | 2023-01-30 07:13:53.058762 + 049 | 0349 | 0349 | 349 | 00000000000000000049 | 18.681541692269406 | t | 2023-01-30 07:13:53.058766 + 050 | 0350 | 0350 | 350 | 00000000000000000050 | 18.708286933869708 | t | 2023-01-30 07:13:53.058769 + 051 | 0351 | 0351 | 351 | 00000000000000000051 | 18.734993995195193 | t | 2023-01-30 07:13:53.058776 + 052 | 0352 | 0352 | 352 | 00000000000000000052 | 18.76166303929372 | t | 2023-01-30 07:13:53.058779 + 053 | 0353 | 0353 | 353 | 00000000000000000053 | 18.788294228055936 | t | 2023-01-30 07:13:53.058783 + 054 | 0354 | 0354 | 354 | 00000000000000000054 | 18.81488772222678 | t | 2023-01-30 07:13:53.058786 + 055 | 0355 | 0355 | 355 | 00000000000000000055 | 18.841443681416774 | t | 2023-01-30 07:13:53.05879 + 056 | 0356 | 0356 | 356 | 00000000000000000056 | 18.867962264113206 | t | 2023-01-30 07:13:53.058793 + 057 | 0357 | 0357 | 357 | 00000000000000000057 | 18.894443627691185 | t | 2023-01-30 07:13:53.058798 + 058 | 0358 | 0358 | 358 | 00000000000000000058 | 18.920887928424502 | t | 2023-01-30 07:13:53.058801 + 059 | 0359 | 0359 | 359 | 00000000000000000059 | 18.947295321496416 | t | 2023-01-30 07:13:53.058805 + 060 | 0360 | 0360 | 360 | 00000000000000000060 | 18.973665961010276 | t | 2023-01-30 07:13:53.058808 + 061 | 0361 | 0361 | 361 | 00000000000000000061 | 19 | t | 2023-01-30 07:13:53.058812 + 062 | 0362 | 0362 | 362 | 00000000000000000062 | 19.026297590440446 | t | 2023-01-30 07:13:53.058816 + 063 | 0363 | 0363 | 363 | 00000000000000000063 | 19.05255888325765 | t | 2023-01-30 07:13:53.05882 + 064 | 0364 | 0364 | 364 | 00000000000000000064 | 19.078784028338912 | t | 2023-01-30 07:13:53.058823 + 065 | 0365 | 0365 | 365 | 00000000000000000065 | 19.1049731745428 | t | 2023-01-30 07:13:53.058827 + 066 | 0366 | 0366 | 366 | 00000000000000000066 | 19.131126469708992 | t | 2023-01-30 07:13:53.05883 + 067 | 0367 | 0367 | 367 | 00000000000000000067 | 19.157244060668017 | t | 2023-01-30 07:13:53.058834 + 068 | 0368 | 0368 | 368 | 00000000000000000068 | 19.183326093250876 | t | 2023-01-30 07:13:53.058837 + 069 | 0369 | 0369 | 369 | 00000000000000000069 | 19.209372712298546 | t | 2023-01-30 07:13:53.058841 + 070 | 0370 | 0370 | 370 | 00000000000000000070 | 19.235384061671343 | t | 2023-01-30 07:13:53.058844 + 071 | 0371 | 0371 | 371 | 00000000000000000071 | 19.261360284258224 | t | 2023-01-30 07:13:53.058849 + 072 | 0372 | 0372 | 372 | 00000000000000000072 | 19.28730152198591 | t | 2023-01-30 07:13:53.058852 + 073 | 0373 | 0373 | 373 | 00000000000000000073 | 19.313207915827967 | t | 2023-01-30 07:13:53.058856 + 074 | 0374 | 0374 | 374 | 00000000000000000074 | 19.339079605813716 | t | 2023-01-30 07:13:53.058859 + 075 | 0375 | 0375 | 375 | 00000000000000000075 | 19.364916731037084 | t | 2023-01-30 07:13:53.058862 + 076 | 0376 | 0376 | 376 | 00000000000000000076 | 19.390719429665317 | t | 2023-01-30 07:13:53.058866 + 077 | 0377 | 0377 | 377 | 00000000000000000077 | 19.4164878389476 | t | 2023-01-30 07:13:53.058869 + 078 | 0378 | 0378 | 378 | 00000000000000000078 | 19.44222209522358 | t | 2023-01-30 07:13:53.058873 + 079 | 0379 | 0379 | 379 | 00000000000000000079 | 19.467922333931785 | t | 2023-01-30 07:13:53.058876 + 080 | 0380 | 0380 | 380 | 00000000000000000080 | 19.493588689617926 | t | 2023-01-30 07:13:53.058881 + 081 | 0381 | 0381 | 381 | 00000000000000000081 | 19.519221295943137 | t | 2023-01-30 07:13:53.058884 + 082 | 0382 | 0382 | 382 | 00000000000000000082 | 19.544820285692065 | t | 2023-01-30 07:13:53.058888 + 083 | 0383 | 0383 | 383 | 00000000000000000083 | 19.570385790780925 | t | 2023-01-30 07:13:53.058891 + 084 | 0384 | 0384 | 384 | 00000000000000000084 | 19.595917942265423 | t | 2023-01-30 07:13:53.058896 + 085 | 0385 | 0385 | 385 | 00000000000000000085 | 19.621416870348583 | t | 2023-01-30 07:13:53.058899 + 086 | 0386 | 0386 | 386 | 00000000000000000086 | 19.6468827043885 | t | 2023-01-30 07:13:53.058905 + 087 | 0387 | 0387 | 387 | 00000000000000000087 | 19.672315572906 | t | 2023-01-30 07:13:53.058908 + 088 | 0388 | 0388 | 388 | 00000000000000000088 | 19.697715603592208 | t | 2023-01-30 07:13:53.058912 + 089 | 0389 | 0389 | 389 | 00000000000000000089 | 19.72308292331602 | t | 2023-01-30 07:13:53.058915 + 090 | 0390 | 0390 | 390 | 00000000000000000090 | 19.748417658131498 | t | 2023-01-30 07:13:53.058919 + 091 | 0391 | 0391 | 391 | 00000000000000000091 | 19.77371993328519 | t | 2023-01-30 07:13:53.058922 + 092 | 0392 | 0392 | 392 | 00000000000000000092 | 19.79898987322333 | t | 2023-01-30 07:13:53.058927 + 093 | 0393 | 0393 | 393 | 00000000000000000093 | 19.82422760159901 | t | 2023-01-30 07:13:53.05893 + 094 | 0394 | 0394 | 394 | 00000000000000000094 | 19.849433241279208 | t | 2023-01-30 07:13:53.058934 + 095 | 0395 | 0395 | 395 | 00000000000000000095 | 19.87460691435179 | t | 2023-01-30 07:13:53.058937 + 096 | 0396 | 0396 | 396 | 00000000000000000096 | 19.8997487421324 | t | 2023-01-30 07:13:53.058941 + 097 | 0397 | 0397 | 397 | 00000000000000000097 | 19.924858845171276 | t | 2023-01-30 07:13:53.058944 + 098 | 0398 | 0398 | 398 | 00000000000000000098 | 19.949937343260004 | t | 2023-01-30 07:13:53.058949 + 099 | 0399 | 0399 | 399 | 00000000000000000099 | 19.974984355438178 | t | 2023-01-30 07:13:53.058952 + 000 | 0400 | 0400 | 400 | 00000000000000000000 | 20 | t | 2023-01-30 07:13:53.058956 + 001 | 0401 | 0401 | 401 | 00000000000000000001 | 20.024984394500787 | t | 2023-01-30 07:13:53.058959 + 002 | 0402 | 0402 | 402 | 00000000000000000002 | 20.049937655763422 | t | 2023-01-30 07:13:53.058963 + 003 | 0403 | 0403 | 403 | 00000000000000000003 | 20.074859899884732 | t | 2023-01-30 07:13:53.058966 + 004 | 0404 | 0404 | 404 | 00000000000000000004 | 20.09975124224178 | t | 2023-01-30 07:13:53.058971 + 005 | 0405 | 0405 | 405 | 00000000000000000005 | 20.12461179749811 | t | 2023-01-30 07:13:53.058974 + 006 | 0406 | 0406 | 406 | 00000000000000000006 | 20.149441679609886 | t | 2023-01-30 07:13:53.058978 + 007 | 0407 | 0407 | 407 | 00000000000000000007 | 20.174241001832016 | t | 2023-01-30 07:13:53.058981 + 008 | 0408 | 0408 | 408 | 00000000000000000008 | 20.199009876724155 | t | 2023-01-30 07:13:53.058985 + 009 | 0409 | 0409 | 409 | 00000000000000000009 | 20.223748416156685 | t | 2023-01-30 07:13:53.058988 + 010 | 0410 | 0410 | 410 | 00000000000000000010 | 20.248456731316587 | t | 2023-01-30 07:13:53.058993 + 011 | 0411 | 0411 | 411 | 00000000000000000011 | 20.273134932713294 | t | 2023-01-30 07:13:53.058996 + 012 | 0412 | 0412 | 412 | 00000000000000000012 | 20.29778313018444 | t | 2023-01-30 07:13:53.059 + 013 | 0413 | 0413 | 413 | 00000000000000000013 | 20.322401432901575 | t | 2023-01-30 07:13:53.059003 + 014 | 0414 | 0414 | 414 | 00000000000000000014 | 20.346989949375804 | t | 2023-01-30 07:13:53.059008 + 015 | 0415 | 0415 | 415 | 00000000000000000015 | 20.37154878746336 | t | 2023-01-30 07:13:53.059011 + 016 | 0416 | 0416 | 416 | 00000000000000000016 | 20.396078054371138 | t | 2023-01-30 07:13:53.059016 + 017 | 0417 | 0417 | 417 | 00000000000000000017 | 20.42057785666214 | t | 2023-01-30 07:13:53.059019 + 018 | 0418 | 0418 | 418 | 00000000000000000018 | 20.445048300260872 | t | 2023-01-30 07:13:53.059025 + 019 | 0419 | 0419 | 419 | 00000000000000000019 | 20.46948949045872 | t | 2023-01-30 07:13:53.059028 + 020 | 0420 | 0420 | 420 | 00000000000000000020 | 20.493901531919196 | t | 2023-01-30 07:13:53.059031 + 021 | 0421 | 0421 | 421 | 00000000000000000021 | 20.518284528683193 | t | 2023-01-30 07:13:53.059035 + 022 | 0422 | 0422 | 422 | 00000000000000000022 | 20.54263858417414 | t | 2023-01-30 07:13:53.059038 + 023 | 0423 | 0423 | 423 | 00000000000000000023 | 20.566963801203133 | t | 2023-01-30 07:13:53.059043 + 024 | 0424 | 0424 | 424 | 00000000000000000024 | 20.591260281974 | t | 2023-01-30 07:13:53.059046 + 025 | 0425 | 0425 | 425 | 00000000000000000025 | 20.615528128088304 | t | 2023-01-30 07:13:53.05905 + 026 | 0426 | 0426 | 426 | 00000000000000000026 | 20.639767440550294 | t | 2023-01-30 07:13:53.059053 + 027 | 0427 | 0427 | 427 | 00000000000000000027 | 20.663978319771825 | t | 2023-01-30 07:13:53.05906 + 028 | 0428 | 0428 | 428 | 00000000000000000028 | 20.688160865577203 | t | 2023-01-30 07:13:53.059063 + 029 | 0429 | 0429 | 429 | 00000000000000000029 | 20.71231517720798 | t | 2023-01-30 07:13:53.059091 + 030 | 0430 | 0430 | 430 | 00000000000000000030 | 20.73644135332772 | t | 2023-01-30 07:13:53.059095 + 031 | 0431 | 0431 | 431 | 00000000000000000031 | 20.760539492026695 | t | 2023-01-30 07:13:53.059099 + 032 | 0432 | 0432 | 432 | 00000000000000000032 | 20.784609690826528 | t | 2023-01-30 07:13:53.059102 + 033 | 0433 | 0433 | 433 | 00000000000000000033 | 20.808652046684813 | t | 2023-01-30 07:13:53.059111 + 034 | 0434 | 0434 | 434 | 00000000000000000034 | 20.83266665599966 | t | 2023-01-30 07:13:53.059114 + 035 | 0435 | 0435 | 435 | 00000000000000000035 | 20.85665361461421 | t | 2023-01-30 07:13:53.059118 + 036 | 0436 | 0436 | 436 | 00000000000000000036 | 20.8806130178211 | t | 2023-01-30 07:13:53.059121 + 037 | 0437 | 0437 | 437 | 00000000000000000037 | 20.904544960366874 | t | 2023-01-30 07:13:53.059124 + 038 | 0438 | 0438 | 438 | 00000000000000000038 | 20.92844953645635 | t | 2023-01-30 07:13:53.059128 + 039 | 0439 | 0439 | 439 | 00000000000000000039 | 20.952326839756964 | t | 2023-01-30 07:13:53.059132 + 040 | 0440 | 0440 | 440 | 00000000000000000040 | 20.97617696340303 | t | 2023-01-30 07:13:53.059136 + 041 | 0441 | 0441 | 441 | 00000000000000000041 | 21 | t | 2023-01-30 07:13:53.059139 + 042 | 0442 | 0442 | 442 | 00000000000000000042 | 21.02379604162864 | t | 2023-01-30 07:13:53.059144 + 043 | 0443 | 0443 | 443 | 00000000000000000043 | 21.047565179849187 | t | 2023-01-30 07:13:53.059147 + 044 | 0444 | 0444 | 444 | 00000000000000000044 | 21.071307505705477 | t | 2023-01-30 07:13:53.059152 + 045 | 0445 | 0445 | 445 | 00000000000000000045 | 21.095023109728988 | t | 2023-01-30 07:13:53.059155 + 046 | 0446 | 0446 | 446 | 00000000000000000046 | 21.118712081942874 | t | 2023-01-30 07:13:53.059159 + 047 | 0447 | 0447 | 447 | 00000000000000000047 | 21.142374511865974 | t | 2023-01-30 07:13:53.059162 + 048 | 0448 | 0448 | 448 | 00000000000000000048 | 21.166010488516726 | t | 2023-01-30 07:13:53.059166 + 049 | 0449 | 0449 | 449 | 00000000000000000049 | 21.18962010041709 | t | 2023-01-30 07:13:53.059169 + 050 | 0450 | 0450 | 450 | 00000000000000000050 | 21.213203435596427 | t | 2023-01-30 07:13:53.059173 + 051 | 0451 | 0451 | 451 | 00000000000000000051 | 21.236760581595302 | t | 2023-01-30 07:13:53.059176 + 052 | 0452 | 0452 | 452 | 00000000000000000052 | 21.2602916254693 | t | 2023-01-30 07:13:53.059181 + 053 | 0453 | 0453 | 453 | 00000000000000000053 | 21.283796653792763 | t | 2023-01-30 07:13:53.059184 + 054 | 0454 | 0454 | 454 | 00000000000000000054 | 21.307275752662516 | t | 2023-01-30 07:13:53.059188 + 055 | 0455 | 0455 | 455 | 00000000000000000055 | 21.330729007701542 | t | 2023-01-30 07:13:53.059191 + 056 | 0456 | 0456 | 456 | 00000000000000000056 | 21.354156504062622 | t | 2023-01-30 07:13:53.059196 + 057 | 0457 | 0457 | 457 | 00000000000000000057 | 21.37755832643195 | t | 2023-01-30 07:13:53.059199 + 058 | 0458 | 0458 | 458 | 00000000000000000058 | 21.400934559032695 | t | 2023-01-30 07:13:53.059203 + 059 | 0459 | 0459 | 459 | 00000000000000000059 | 21.42428528562855 | t | 2023-01-30 07:13:53.059206 + 060 | 0460 | 0460 | 460 | 00000000000000000060 | 21.447610589527216 | t | 2023-01-30 07:13:53.05921 + 061 | 0461 | 0461 | 461 | 00000000000000000061 | 21.470910553583888 | t | 2023-01-30 07:13:53.059213 + 062 | 0462 | 0462 | 462 | 00000000000000000062 | 21.494185260204677 | t | 2023-01-30 07:13:53.059217 + 063 | 0463 | 0463 | 463 | 00000000000000000063 | 21.517434791350013 | t | 2023-01-30 07:13:53.05922 + 064 | 0464 | 0464 | 464 | 00000000000000000064 | 21.540659228538015 | t | 2023-01-30 07:13:53.059225 + 065 | 0465 | 0465 | 465 | 00000000000000000065 | 21.563858652847824 | t | 2023-01-30 07:13:53.059228 + 066 | 0466 | 0466 | 466 | 00000000000000000066 | 21.587033144922902 | t | 2023-01-30 07:13:53.059232 + 067 | 0467 | 0467 | 467 | 00000000000000000067 | 21.61018278497431 | t | 2023-01-30 07:13:53.059235 + 068 | 0468 | 0468 | 468 | 00000000000000000068 | 21.633307652783937 | t | 2023-01-30 07:13:53.059239 + 069 | 0469 | 0469 | 469 | 00000000000000000069 | 21.656407827707714 | t | 2023-01-30 07:13:53.059242 + 070 | 0470 | 0470 | 470 | 00000000000000000070 | 21.6794833886788 | t | 2023-01-30 07:13:53.059247 + 071 | 0471 | 0471 | 471 | 00000000000000000071 | 21.702534414210707 | t | 2023-01-30 07:13:53.05925 + 072 | 0472 | 0472 | 472 | 00000000000000000072 | 21.72556098240043 | t | 2023-01-30 07:13:53.059255 + 073 | 0473 | 0473 | 473 | 00000000000000000073 | 21.748563170931547 | t | 2023-01-30 07:13:53.059258 + 074 | 0474 | 0474 | 474 | 00000000000000000074 | 21.77154105707724 | t | 2023-01-30 07:13:53.059262 + 075 | 0475 | 0475 | 475 | 00000000000000000075 | 21.79449471770337 | t | 2023-01-30 07:13:53.059265 + 076 | 0476 | 0476 | 476 | 00000000000000000076 | 21.817424229271428 | t | 2023-01-30 07:13:53.059269 + 077 | 0477 | 0477 | 477 | 00000000000000000077 | 21.840329667841555 | t | 2023-01-30 07:13:53.059272 + 078 | 0478 | 0478 | 478 | 00000000000000000078 | 21.863211109075447 | t | 2023-01-30 07:13:53.059276 + 079 | 0479 | 0479 | 479 | 00000000000000000079 | 21.88606862823929 | t | 2023-01-30 07:13:53.059279 + 080 | 0480 | 0480 | 480 | 00000000000000000080 | 21.908902300206645 | t | 2023-01-30 07:13:53.059283 + 081 | 0481 | 0481 | 481 | 00000000000000000081 | 21.93171219946131 | t | 2023-01-30 07:13:53.059287 + 082 | 0482 | 0482 | 482 | 00000000000000000082 | 21.95449840010015 | t | 2023-01-30 07:13:53.059291 + 083 | 0483 | 0483 | 483 | 00000000000000000083 | 21.97726097583591 | t | 2023-01-30 07:13:53.059294 + 084 | 0484 | 0484 | 484 | 00000000000000000084 | 22 | t | 2023-01-30 07:13:53.059297 + 085 | 0485 | 0485 | 485 | 00000000000000000085 | 22.02271554554524 | t | 2023-01-30 07:13:53.059304 + 086 | 0486 | 0486 | 486 | 00000000000000000086 | 22.045407685048602 | t | 2023-01-30 07:13:53.059307 + 087 | 0487 | 0487 | 487 | 00000000000000000087 | 22.06807649071391 | t | 2023-01-30 07:13:53.059311 + 088 | 0488 | 0488 | 488 | 00000000000000000088 | 22.090722034374522 | t | 2023-01-30 07:13:53.059314 + 089 | 0489 | 0489 | 489 | 00000000000000000089 | 22.11334438749598 | t | 2023-01-30 07:13:53.059319 + 090 | 0490 | 0490 | 490 | 00000000000000000090 | 22.135943621178654 | t | 2023-01-30 07:13:53.059322 + 091 | 0491 | 0491 | 491 | 00000000000000000091 | 22.15851980616034 | t | 2023-01-30 07:13:53.059326 + 092 | 0492 | 0492 | 492 | 00000000000000000092 | 22.181073012818835 | t | 2023-01-30 07:13:53.059329 + 093 | 0493 | 0493 | 493 | 00000000000000000093 | 22.20360331117452 | t | 2023-01-30 07:13:53.059334 + 094 | 0494 | 0494 | 494 | 00000000000000000094 | 22.22611077089287 | t | 2023-01-30 07:13:53.059337 + 095 | 0495 | 0495 | 495 | 00000000000000000095 | 22.24859546128699 | t | 2023-01-30 07:13:53.059341 + 096 | 0496 | 0496 | 496 | 00000000000000000096 | 22.271057451320086 | t | 2023-01-30 07:13:53.059344 + 097 | 0497 | 0497 | 497 | 00000000000000000097 | 22.293496809607955 | t | 2023-01-30 07:13:53.059353 + 098 | 0498 | 0498 | 498 | 00000000000000000098 | 22.315913604421397 | t | 2023-01-30 07:13:53.059356 + 099 | 0499 | 0499 | 499 | 00000000000000000099 | 22.338307903688676 | t | 2023-01-30 07:13:53.059361 + 000 | 0500 | 0500 | 500 | 00000000000000000000 | 22.360679774997898 | t | 2023-01-30 07:13:53.059364 + 001 | 0501 | 0501 | 501 | 00000000000000000001 | 22.38302928559939 | t | 2023-01-30 07:13:53.059369 + 002 | 0502 | 0502 | 502 | 00000000000000000002 | 22.40535650240808 | t | 2023-01-30 07:13:53.059372 + 003 | 0503 | 0503 | 503 | 00000000000000000003 | 22.427661492005804 | t | 2023-01-30 07:13:53.059376 + 004 | 0504 | 0504 | 504 | 00000000000000000004 | 22.44994432064365 | t | 2023-01-30 07:13:53.059379 + 005 | 0505 | 0505 | 505 | 00000000000000000005 | 22.47220505424423 | t | 2023-01-30 07:13:53.059383 + 006 | 0506 | 0506 | 506 | 00000000000000000006 | 22.494443758403985 | t | 2023-01-30 07:13:53.059386 + 007 | 0507 | 0507 | 507 | 00000000000000000007 | 22.516660498395403 | t | 2023-01-30 07:13:53.059391 + 008 | 0508 | 0508 | 508 | 00000000000000000008 | 22.538855339169288 | t | 2023-01-30 07:13:53.059394 + 009 | 0509 | 0509 | 509 | 00000000000000000009 | 22.561028345356956 | t | 2023-01-30 07:13:53.059398 + 010 | 0510 | 0510 | 510 | 00000000000000000010 | 22.58317958127243 | t | 2023-01-30 07:13:53.059401 + 011 | 0511 | 0511 | 511 | 00000000000000000011 | 22.60530911091463 | t | 2023-01-30 07:13:53.059405 + 012 | 0512 | 0512 | 512 | 00000000000000000012 | 22.627416997969522 | t | 2023-01-30 07:13:53.059408 + 013 | 0513 | 0513 | 513 | 00000000000000000013 | 22.64950330581225 | t | 2023-01-30 07:13:53.059412 + 014 | 0514 | 0514 | 514 | 00000000000000000014 | 22.67156809750927 | t | 2023-01-30 07:13:53.059415 + 015 | 0515 | 0515 | 515 | 00000000000000000015 | 22.693611435820433 | t | 2023-01-30 07:13:53.05942 + 016 | 0516 | 0516 | 516 | 00000000000000000016 | 22.715633383201094 | t | 2023-01-30 07:13:53.059423 + 017 | 0517 | 0517 | 517 | 00000000000000000017 | 22.737634001804146 | t | 2023-01-30 07:13:53.059427 + 018 | 0518 | 0518 | 518 | 00000000000000000018 | 22.759613353482084 | t | 2023-01-30 07:13:53.05943 + 019 | 0519 | 0519 | 519 | 00000000000000000019 | 22.781571499789035 | t | 2023-01-30 07:13:53.059434 + 020 | 0520 | 0520 | 520 | 00000000000000000020 | 22.80350850198276 | t | 2023-01-30 07:13:53.059437 + 021 | 0521 | 0521 | 521 | 00000000000000000021 | 22.825424421026653 | t | 2023-01-30 07:13:53.059442 + 022 | 0522 | 0522 | 522 | 00000000000000000022 | 22.847319317591726 | t | 2023-01-30 07:13:53.059445 + 023 | 0523 | 0523 | 523 | 00000000000000000023 | 22.869193252058544 | t | 2023-01-30 07:13:53.059449 + 024 | 0524 | 0524 | 524 | 00000000000000000024 | 22.891046284519195 | t | 2023-01-30 07:13:53.059452 + 025 | 0525 | 0525 | 525 | 00000000000000000025 | 22.9128784747792 | t | 2023-01-30 07:13:53.059476 + 026 | 0526 | 0526 | 526 | 00000000000000000026 | 22.93468988235943 | t | 2023-01-30 07:13:53.059479 + 027 | 0527 | 0527 | 527 | 00000000000000000027 | 22.956480566497994 | t | 2023-01-30 07:13:53.059484 + 028 | 0528 | 0528 | 528 | 00000000000000000028 | 22.978250586152114 | t | 2023-01-30 07:13:53.059487 + 029 | 0529 | 0529 | 529 | 00000000000000000029 | 23 | t | 2023-01-30 07:13:53.059491 + 030 | 0530 | 0530 | 530 | 00000000000000000030 | 23.021728866442675 | t | 2023-01-30 07:13:53.059494 + 031 | 0531 | 0531 | 531 | 00000000000000000031 | 23.043437243605826 | t | 2023-01-30 07:13:53.059498 + 032 | 0532 | 0532 | 532 | 00000000000000000032 | 23.065125189341593 | t | 2023-01-30 07:13:53.059501 + 033 | 0533 | 0533 | 533 | 00000000000000000033 | 23.08679276123039 | t | 2023-01-30 07:13:53.059506 + 034 | 0534 | 0534 | 534 | 00000000000000000034 | 23.108440016582687 | t | 2023-01-30 07:13:53.059509 + 035 | 0535 | 0535 | 535 | 00000000000000000035 | 23.130067012440755 | t | 2023-01-30 07:13:53.059513 + 036 | 0536 | 0536 | 536 | 00000000000000000036 | 23.15167380558045 | t | 2023-01-30 07:13:53.059516 + 037 | 0537 | 0537 | 537 | 00000000000000000037 | 23.173260452512935 | t | 2023-01-30 07:13:53.05952 + 038 | 0538 | 0538 | 538 | 00000000000000000038 | 23.194827009486403 | t | 2023-01-30 07:13:53.059523 + 039 | 0539 | 0539 | 539 | 00000000000000000039 | 23.2163735324878 | t | 2023-01-30 07:13:53.059528 + 040 | 0540 | 0540 | 540 | 00000000000000000040 | 23.2379000772445 | t | 2023-01-30 07:13:53.059531 + 041 | 0541 | 0541 | 541 | 00000000000000000041 | 23.259406699226016 | t | 2023-01-30 07:13:53.059533 + 042 | 0542 | 0542 | 542 | 00000000000000000042 | 23.280893453645632 | t | 2023-01-30 07:13:53.059538 + 043 | 0543 | 0543 | 543 | 00000000000000000043 | 23.302360395462088 | t | 2023-01-30 07:13:53.059541 + 044 | 0544 | 0544 | 544 | 00000000000000000044 | 23.323807579381203 | t | 2023-01-30 07:13:53.059545 + 045 | 0545 | 0545 | 545 | 00000000000000000045 | 23.345235059857504 | t | 2023-01-30 07:13:53.059548 + 046 | 0546 | 0546 | 546 | 00000000000000000046 | 23.366642891095847 | t | 2023-01-30 07:13:53.059553 + 047 | 0547 | 0547 | 547 | 00000000000000000047 | 23.388031127053 | t | 2023-01-30 07:13:53.059556 + 048 | 0548 | 0548 | 548 | 00000000000000000048 | 23.40939982143925 | t | 2023-01-30 07:13:53.05956 + 049 | 0549 | 0549 | 549 | 00000000000000000049 | 23.430749027719962 | t | 2023-01-30 07:13:53.059563 + 050 | 0550 | 0550 | 550 | 00000000000000000050 | 23.45207879911715 | t | 2023-01-30 07:13:53.059567 + 051 | 0551 | 0551 | 551 | 00000000000000000051 | 23.473389188611005 | t | 2023-01-30 07:13:53.05957 + 052 | 0552 | 0552 | 552 | 00000000000000000052 | 23.49468024894146 | t | 2023-01-30 07:13:53.059577 + 053 | 0553 | 0553 | 553 | 00000000000000000053 | 23.515952032609693 | t | 2023-01-30 07:13:53.05958 + 054 | 0554 | 0554 | 554 | 00000000000000000054 | 23.53720459187964 | t | 2023-01-30 07:13:53.059585 + 055 | 0555 | 0555 | 555 | 00000000000000000055 | 23.558437978779494 | t | 2023-01-30 07:13:53.059773 + 056 | 0556 | 0556 | 556 | 00000000000000000056 | 23.57965224510319 | t | 2023-01-30 07:13:53.059786 + 057 | 0557 | 0557 | 557 | 00000000000000000057 | 23.600847442411894 | t | 2023-01-30 07:13:53.059789 + 058 | 0558 | 0558 | 558 | 00000000000000000058 | 23.62202362203543 | t | 2023-01-30 07:13:53.059794 + 059 | 0559 | 0559 | 559 | 00000000000000000059 | 23.643180835073778 | t | 2023-01-30 07:13:53.059797 + 060 | 0560 | 0560 | 560 | 00000000000000000060 | 23.664319132398465 | t | 2023-01-30 07:13:53.059806 + 061 | 0561 | 0561 | 561 | 00000000000000000061 | 23.68543856465402 | t | 2023-01-30 07:13:53.059809 + 062 | 0562 | 0562 | 562 | 00000000000000000062 | 23.706539182259394 | t | 2023-01-30 07:13:53.059813 + 063 | 0563 | 0563 | 563 | 00000000000000000063 | 23.727621035409346 | t | 2023-01-30 07:13:53.059816 + 064 | 0564 | 0564 | 564 | 00000000000000000064 | 23.748684174075834 | t | 2023-01-30 07:13:53.05982 + 065 | 0565 | 0565 | 565 | 00000000000000000065 | 23.769728648009426 | t | 2023-01-30 07:13:53.059823 + 066 | 0566 | 0566 | 566 | 00000000000000000066 | 23.790754506740637 | t | 2023-01-30 07:13:53.059828 + 067 | 0567 | 0567 | 567 | 00000000000000000067 | 23.811761799581316 | t | 2023-01-30 07:13:53.059831 + 068 | 0568 | 0568 | 568 | 00000000000000000068 | 23.83275057562597 | t | 2023-01-30 07:13:53.059835 + 069 | 0569 | 0569 | 569 | 00000000000000000069 | 23.853720883753127 | t | 2023-01-30 07:13:53.059838 + 070 | 0570 | 0570 | 570 | 00000000000000000070 | 23.874672772626646 | t | 2023-01-30 07:13:53.059842 + 071 | 0571 | 0571 | 571 | 00000000000000000071 | 23.895606290697042 | t | 2023-01-30 07:13:53.059845 + 072 | 0572 | 0572 | 572 | 00000000000000000072 | 23.916521486202797 | t | 2023-01-30 07:13:53.05985 + 073 | 0573 | 0573 | 573 | 00000000000000000073 | 23.93741840717165 | t | 2023-01-30 07:13:53.059853 + 074 | 0574 | 0574 | 574 | 00000000000000000074 | 23.958297101421877 | t | 2023-01-30 07:13:53.059857 + 075 | 0575 | 0575 | 575 | 00000000000000000075 | 23.979157616563597 | t | 2023-01-30 07:13:53.05986 + 076 | 0576 | 0576 | 576 | 00000000000000000076 | 24 | t | 2023-01-30 07:13:53.059864 + 077 | 0577 | 0577 | 577 | 00000000000000000077 | 24.020824298928627 | t | 2023-01-30 07:13:53.059867 + 078 | 0578 | 0578 | 578 | 00000000000000000078 | 24.041630560342615 | t | 2023-01-30 07:13:53.059872 + 079 | 0579 | 0579 | 579 | 00000000000000000079 | 24.06241883103193 | t | 2023-01-30 07:13:53.059875 + 080 | 0580 | 0580 | 580 | 00000000000000000080 | 24.08318915758459 | t | 2023-01-30 07:13:53.059879 + 081 | 0581 | 0581 | 581 | 00000000000000000081 | 24.1039415863879 | t | 2023-01-30 07:13:53.059882 + 082 | 0582 | 0582 | 582 | 00000000000000000082 | 24.124676163629637 | t | 2023-01-30 07:13:53.059886 + 083 | 0583 | 0583 | 583 | 00000000000000000083 | 24.145392935299274 | t | 2023-01-30 07:13:53.059889 + 084 | 0584 | 0584 | 584 | 00000000000000000084 | 24.166091947189145 | t | 2023-01-30 07:13:53.059894 + 085 | 0585 | 0585 | 585 | 00000000000000000085 | 24.186773244895647 | t | 2023-01-30 07:13:53.059897 + 086 | 0586 | 0586 | 586 | 00000000000000000086 | 24.20743687382041 | t | 2023-01-30 07:13:53.0599 + 087 | 0587 | 0587 | 587 | 00000000000000000087 | 24.228082879171435 | t | 2023-01-30 07:13:53.059905 + 088 | 0588 | 0588 | 588 | 00000000000000000088 | 24.24871130596428 | t | 2023-01-30 07:13:53.059908 + 089 | 0589 | 0589 | 589 | 00000000000000000089 | 24.269322199023193 | t | 2023-01-30 07:13:53.059912 + 090 | 0590 | 0590 | 590 | 00000000000000000090 | 24.289915602982237 | t | 2023-01-30 07:13:53.059915 + 091 | 0591 | 0591 | 591 | 00000000000000000091 | 24.310491562286437 | t | 2023-01-30 07:13:53.059919 + 092 | 0592 | 0592 | 592 | 00000000000000000092 | 24.331050121192877 | t | 2023-01-30 07:13:53.059922 + 093 | 0593 | 0593 | 593 | 00000000000000000093 | 24.351591323771842 | t | 2023-01-30 07:13:53.059927 + 094 | 0594 | 0594 | 594 | 00000000000000000094 | 24.372115213907882 | t | 2023-01-30 07:13:53.05993 + 095 | 0595 | 0595 | 595 | 00000000000000000095 | 24.392621835300936 | t | 2023-01-30 07:13:53.059934 + 096 | 0596 | 0596 | 596 | 00000000000000000096 | 24.413111231467404 | t | 2023-01-30 07:13:53.059937 + 097 | 0597 | 0597 | 597 | 00000000000000000097 | 24.43358344574123 | t | 2023-01-30 07:13:53.059941 + 098 | 0598 | 0598 | 598 | 00000000000000000098 | 24.454038521274967 | t | 2023-01-30 07:13:53.059944 + 099 | 0599 | 0599 | 599 | 00000000000000000099 | 24.474476501040833 | t | 2023-01-30 07:13:53.059949 + 000 | 0600 | 0600 | 600 | 00000000000000000000 | 24.49489742783178 | t | 2023-01-30 07:13:53.059952 + 001 | 0601 | 0601 | 601 | 00000000000000000001 | 24.515301344262525 | t | 2023-01-30 07:13:53.059956 + 002 | 0602 | 0602 | 602 | 00000000000000000002 | 24.535688292770594 | t | 2023-01-30 07:13:53.059959 + 003 | 0603 | 0603 | 603 | 00000000000000000003 | 24.55605831561735 | t | 2023-01-30 07:13:53.059963 + 004 | 0604 | 0604 | 604 | 00000000000000000004 | 24.576411454889016 | t | 2023-01-30 07:13:53.059966 + 005 | 0605 | 0605 | 605 | 00000000000000000005 | 24.596747752497688 | t | 2023-01-30 07:13:53.05997 + 006 | 0606 | 0606 | 606 | 00000000000000000006 | 24.61706725018234 | t | 2023-01-30 07:13:53.059973 + 007 | 0607 | 0607 | 607 | 00000000000000000007 | 24.63736998950984 | t | 2023-01-30 07:13:53.059978 + 008 | 0608 | 0608 | 608 | 00000000000000000008 | 24.657656011875904 | t | 2023-01-30 07:13:53.059981 + 009 | 0609 | 0609 | 609 | 00000000000000000009 | 24.677925358506133 | t | 2023-01-30 07:13:53.059985 + 010 | 0610 | 0610 | 610 | 00000000000000000010 | 24.698178070456937 | t | 2023-01-30 07:13:53.059988 + 011 | 0611 | 0611 | 611 | 00000000000000000011 | 24.71841418861655 | t | 2023-01-30 07:13:53.059992 + 012 | 0612 | 0612 | 612 | 00000000000000000012 | 24.73863375370596 | t | 2023-01-30 07:13:53.059995 + 013 | 0613 | 0613 | 613 | 00000000000000000013 | 24.758836806279895 | t | 2023-01-30 07:13:53.06 + 014 | 0614 | 0614 | 614 | 00000000000000000014 | 24.779023386727733 | t | 2023-01-30 07:13:53.060003 + 015 | 0615 | 0615 | 615 | 00000000000000000015 | 24.79919353527449 | t | 2023-01-30 07:13:53.060007 + 016 | 0616 | 0616 | 616 | 00000000000000000016 | 24.819347291981714 | t | 2023-01-30 07:13:53.06001 + 017 | 0617 | 0617 | 617 | 00000000000000000017 | 24.839484696748443 | t | 2023-01-30 07:13:53.060014 + 018 | 0618 | 0618 | 618 | 00000000000000000018 | 24.859605789312106 | t | 2023-01-30 07:13:53.060017 + 019 | 0619 | 0619 | 619 | 00000000000000000019 | 24.879710609249457 | t | 2023-01-30 07:13:53.060025 + 020 | 0620 | 0620 | 620 | 00000000000000000020 | 24.899799195977465 | t | 2023-01-30 07:13:53.060028 + 021 | 0621 | 0621 | 621 | 00000000000000000021 | 24.919871588754223 | t | 2023-01-30 07:13:53.060032 + 022 | 0622 | 0622 | 622 | 00000000000000000022 | 24.939927826679853 | t | 2023-01-30 07:13:53.060035 + 023 | 0623 | 0623 | 623 | 00000000000000000023 | 24.95996794869737 | t | 2023-01-30 07:13:53.060065 + 024 | 0624 | 0624 | 624 | 00000000000000000024 | 24.979991993593593 | t | 2023-01-30 07:13:53.060068 + 025 | 0625 | 0625 | 625 | 00000000000000000025 | 25 | t | 2023-01-30 07:13:53.060073 + 026 | 0626 | 0626 | 626 | 00000000000000000026 | 25.019992006393608 | t | 2023-01-30 07:13:53.060076 + 027 | 0627 | 0627 | 627 | 00000000000000000027 | 25.03996805109783 | t | 2023-01-30 07:13:53.06008 + 028 | 0628 | 0628 | 628 | 00000000000000000028 | 25.059928172283335 | t | 2023-01-30 07:13:53.060083 + 029 | 0629 | 0629 | 629 | 00000000000000000029 | 25.079872407968907 | t | 2023-01-30 07:13:53.060087 + 030 | 0630 | 0630 | 630 | 00000000000000000030 | 25.099800796022265 | t | 2023-01-30 07:13:53.06009 + 031 | 0631 | 0631 | 631 | 00000000000000000031 | 25.11971337416094 | t | 2023-01-30 07:13:53.060095 + 032 | 0632 | 0632 | 632 | 00000000000000000032 | 25.13961017995307 | t | 2023-01-30 07:13:53.060098 + 033 | 0633 | 0633 | 633 | 00000000000000000033 | 25.15949125081825 | t | 2023-01-30 07:13:53.060102 + 034 | 0634 | 0634 | 634 | 00000000000000000034 | 25.179356624028344 | t | 2023-01-30 07:13:53.060105 + 035 | 0635 | 0635 | 635 | 00000000000000000035 | 25.199206336708304 | t | 2023-01-30 07:13:53.06011 + 036 | 0636 | 0636 | 636 | 00000000000000000036 | 25.219040425836983 | t | 2023-01-30 07:13:53.060113 + 037 | 0637 | 0637 | 637 | 00000000000000000037 | 25.238858928247925 | t | 2023-01-30 07:13:53.060117 + 038 | 0638 | 0638 | 638 | 00000000000000000038 | 25.25866188063018 | t | 2023-01-30 07:13:53.06012 + 039 | 0639 | 0639 | 639 | 00000000000000000039 | 25.278449319529077 | t | 2023-01-30 07:13:53.060124 + 040 | 0640 | 0640 | 640 | 00000000000000000040 | 25.298221281347036 | t | 2023-01-30 07:13:53.060127 + 041 | 0641 | 0641 | 641 | 00000000000000000041 | 25.317977802344327 | t | 2023-01-30 07:13:53.060133 + 042 | 0642 | 0642 | 642 | 00000000000000000042 | 25.337718918639855 | t | 2023-01-30 07:13:53.060136 + 043 | 0643 | 0643 | 643 | 00000000000000000043 | 25.357444666211933 | t | 2023-01-30 07:13:53.060139 + 044 | 0644 | 0644 | 644 | 00000000000000000044 | 25.37715508089904 | t | 2023-01-30 07:13:53.060143 + 045 | 0645 | 0645 | 645 | 00000000000000000045 | 25.39685019840059 | t | 2023-01-30 07:13:53.060146 + 046 | 0646 | 0646 | 646 | 00000000000000000046 | 25.41653005427767 | t | 2023-01-30 07:13:53.060151 + 047 | 0647 | 0647 | 647 | 00000000000000000047 | 25.436194683953808 | t | 2023-01-30 07:13:53.060154 + 048 | 0648 | 0648 | 648 | 00000000000000000048 | 25.45584412271571 | t | 2023-01-30 07:13:53.060158 + 049 | 0649 | 0649 | 649 | 00000000000000000049 | 25.475478405713993 | t | 2023-01-30 07:13:53.060161 + 050 | 0650 | 0650 | 650 | 00000000000000000050 | 25.495097567963924 | t | 2023-01-30 07:13:53.060166 + 051 | 0651 | 0651 | 651 | 00000000000000000051 | 25.514701644346147 | t | 2023-01-30 07:13:53.060169 + 052 | 0652 | 0652 | 652 | 00000000000000000052 | 25.534290669607408 | t | 2023-01-30 07:13:53.060196 + 053 | 0653 | 0653 | 653 | 00000000000000000053 | 25.553864678361276 | t | 2023-01-30 07:13:53.060199 + 054 | 0654 | 0654 | 654 | 00000000000000000054 | 25.573423705088842 | t | 2023-01-30 07:13:53.060203 + 055 | 0655 | 0655 | 655 | 00000000000000000055 | 25.592967784139454 | t | 2023-01-30 07:13:53.060206 + 056 | 0656 | 0656 | 656 | 00000000000000000056 | 25.612496949731394 | t | 2023-01-30 07:13:53.06021 + 057 | 0657 | 0657 | 657 | 00000000000000000057 | 25.632011235952593 | t | 2023-01-30 07:13:53.060213 + 058 | 0658 | 0658 | 658 | 00000000000000000058 | 25.65151067676132 | t | 2023-01-30 07:13:53.060219 + 059 | 0659 | 0659 | 659 | 00000000000000000059 | 25.67099530598687 | t | 2023-01-30 07:13:53.060222 + 060 | 0660 | 0660 | 660 | 00000000000000000060 | 25.69046515733026 | t | 2023-01-30 07:13:53.060226 + 061 | 0661 | 0661 | 661 | 00000000000000000061 | 25.709920264364882 | t | 2023-01-30 07:13:53.060229 + 062 | 0662 | 0662 | 662 | 00000000000000000062 | 25.729360660537214 | t | 2023-01-30 07:13:53.060233 + 063 | 0663 | 0663 | 663 | 00000000000000000063 | 25.748786379167466 | t | 2023-01-30 07:13:53.060236 + 064 | 0664 | 0664 | 664 | 00000000000000000064 | 25.768197453450252 | t | 2023-01-30 07:13:53.060241 + 065 | 0665 | 0665 | 665 | 00000000000000000065 | 25.787593916455254 | t | 2023-01-30 07:13:53.060244 + 066 | 0666 | 0666 | 666 | 00000000000000000066 | 25.80697580112788 | t | 2023-01-30 07:13:53.060248 + 067 | 0667 | 0667 | 667 | 00000000000000000067 | 25.826343140289914 | t | 2023-01-30 07:13:53.060251 + 068 | 0668 | 0668 | 668 | 00000000000000000068 | 25.84569596664017 | t | 2023-01-30 07:13:53.060256 + 069 | 0669 | 0669 | 669 | 00000000000000000069 | 25.865034312755125 | t | 2023-01-30 07:13:53.060259 + 070 | 0670 | 0670 | 670 | 00000000000000000070 | 25.88435821108957 | t | 2023-01-30 07:13:53.060264 + 071 | 0671 | 0671 | 671 | 00000000000000000071 | 25.903667693977237 | t | 2023-01-30 07:13:53.060267 + 072 | 0672 | 0672 | 672 | 00000000000000000072 | 25.92296279363144 | t | 2023-01-30 07:13:53.060272 + 073 | 0673 | 0673 | 673 | 00000000000000000073 | 25.942243542145693 | t | 2023-01-30 07:13:53.060275 + 074 | 0674 | 0674 | 674 | 00000000000000000074 | 25.96150997149434 | t | 2023-01-30 07:13:53.060279 + 075 | 0675 | 0675 | 675 | 00000000000000000075 | 25.98076211353316 | t | 2023-01-30 07:13:53.060282 + 076 | 0676 | 0676 | 676 | 00000000000000000076 | 26 | t | 2023-01-30 07:13:53.060287 + 077 | 0677 | 0677 | 677 | 00000000000000000077 | 26.019223662515376 | t | 2023-01-30 07:13:53.06029 + 078 | 0678 | 0678 | 678 | 00000000000000000078 | 26.038433132583073 | t | 2023-01-30 07:13:53.060294 + 079 | 0679 | 0679 | 679 | 00000000000000000079 | 26.057628441590765 | t | 2023-01-30 07:13:53.060297 + 080 | 0680 | 0680 | 680 | 00000000000000000080 | 26.076809620810597 | t | 2023-01-30 07:13:53.060301 + 081 | 0681 | 0681 | 681 | 00000000000000000081 | 26.095976701399778 | t | 2023-01-30 07:13:53.060304 + 082 | 0682 | 0682 | 682 | 00000000000000000082 | 26.115129714401192 | t | 2023-01-30 07:13:53.060309 + 083 | 0683 | 0683 | 683 | 00000000000000000083 | 26.13426869074396 | t | 2023-01-30 07:13:53.060312 + 084 | 0684 | 0684 | 684 | 00000000000000000084 | 26.153393661244042 | t | 2023-01-30 07:13:53.060316 + 085 | 0685 | 0685 | 685 | 00000000000000000085 | 26.1725046566048 | t | 2023-01-30 07:13:53.060319 + 086 | 0686 | 0686 | 686 | 00000000000000000086 | 26.19160170741759 | t | 2023-01-30 07:13:53.06033 + 087 | 0687 | 0687 | 687 | 00000000000000000087 | 26.210684844162312 | t | 2023-01-30 07:13:53.060333 + 088 | 0688 | 0688 | 688 | 00000000000000000088 | 26.229754097208 | t | 2023-01-30 07:13:53.060337 + 089 | 0689 | 0689 | 689 | 00000000000000000089 | 26.248809496813376 | t | 2023-01-30 07:13:53.06034 + 090 | 0690 | 0690 | 690 | 00000000000000000090 | 26.267851073127396 | t | 2023-01-30 07:13:53.060343 + 091 | 0691 | 0691 | 691 | 00000000000000000091 | 26.28687885618983 | t | 2023-01-30 07:13:53.060348 + 092 | 0692 | 0692 | 692 | 00000000000000000092 | 26.30589287593181 | t | 2023-01-30 07:13:53.060351 + 093 | 0693 | 0693 | 693 | 00000000000000000093 | 26.324893162176366 | t | 2023-01-30 07:13:53.060355 + 094 | 0694 | 0694 | 694 | 00000000000000000094 | 26.343879744638983 | t | 2023-01-30 07:13:53.060358 + 095 | 0695 | 0695 | 695 | 00000000000000000095 | 26.362852652928137 | t | 2023-01-30 07:13:53.060362 + 096 | 0696 | 0696 | 696 | 00000000000000000096 | 26.38181191654584 | t | 2023-01-30 07:13:53.060365 + 097 | 0697 | 0697 | 697 | 00000000000000000097 | 26.40075756488817 | t | 2023-01-30 07:13:53.06037 + 098 | 0698 | 0698 | 698 | 00000000000000000098 | 26.419689627245813 | t | 2023-01-30 07:13:53.060373 + 099 | 0699 | 0699 | 699 | 00000000000000000099 | 26.43860813280457 | t | 2023-01-30 07:13:53.060378 + 000 | 0700 | 0700 | 700 | 00000000000000000000 | 26.457513110645905 | t | 2023-01-30 07:13:53.060381 + 001 | 0701 | 0701 | 701 | 00000000000000000001 | 26.476404589747453 | t | 2023-01-30 07:13:53.060385 + 002 | 0702 | 0702 | 702 | 00000000000000000002 | 26.49528259898354 | t | 2023-01-30 07:13:53.060388 + 003 | 0703 | 0703 | 703 | 00000000000000000003 | 26.514147167125703 | t | 2023-01-30 07:13:53.060392 + 004 | 0704 | 0704 | 704 | 00000000000000000004 | 26.5329983228432 | t | 2023-01-30 07:13:53.060395 + 005 | 0705 | 0705 | 705 | 00000000000000000005 | 26.551836094703507 | t | 2023-01-30 07:13:53.060399 + 006 | 0706 | 0706 | 706 | 00000000000000000006 | 26.570660511172846 | t | 2023-01-30 07:13:53.060402 + 007 | 0707 | 0707 | 707 | 00000000000000000007 | 26.589471600616662 | t | 2023-01-30 07:13:53.060406 + 008 | 0708 | 0708 | 708 | 00000000000000000008 | 26.60826939130014 | t | 2023-01-30 07:13:53.060409 + 009 | 0709 | 0709 | 709 | 00000000000000000009 | 26.627053911388696 | t | 2023-01-30 07:13:53.060414 + 010 | 0710 | 0710 | 710 | 00000000000000000010 | 26.645825188948457 | t | 2023-01-30 07:13:53.060417 + 011 | 0711 | 0711 | 711 | 00000000000000000011 | 26.664583251946766 | t | 2023-01-30 07:13:53.060421 + 012 | 0712 | 0712 | 712 | 00000000000000000012 | 26.68332812825267 | t | 2023-01-30 07:13:53.060424 + 013 | 0713 | 0713 | 713 | 00000000000000000013 | 26.70205984563738 | t | 2023-01-30 07:13:53.060428 + 014 | 0714 | 0714 | 714 | 00000000000000000014 | 26.720778431774775 | t | 2023-01-30 07:13:53.060431 + 015 | 0715 | 0715 | 715 | 00000000000000000015 | 26.739483914241877 | t | 2023-01-30 07:13:53.060435 + 016 | 0716 | 0716 | 716 | 00000000000000000016 | 26.758176320519304 | t | 2023-01-30 07:13:53.060438 + 017 | 0717 | 0717 | 717 | 00000000000000000017 | 26.77685567799177 | t | 2023-01-30 07:13:53.060443 + 018 | 0718 | 0718 | 718 | 00000000000000000018 | 26.795522013948524 | t | 2023-01-30 07:13:53.060446 + 019 | 0719 | 0719 | 719 | 00000000000000000019 | 26.814175355583846 | t | 2023-01-30 07:13:53.06045 + 020 | 0720 | 0720 | 720 | 00000000000000000020 | 26.832815729997478 | t | 2023-01-30 07:13:53.060453 + 021 | 0721 | 0721 | 721 | 00000000000000000021 | 26.851443164195103 | t | 2023-01-30 07:13:53.060457 + 022 | 0722 | 0722 | 722 | 00000000000000000022 | 26.870057685088806 | t | 2023-01-30 07:13:53.06046 + 023 | 0723 | 0723 | 723 | 00000000000000000023 | 26.888659319497503 | t | 2023-01-30 07:13:53.060465 + 024 | 0724 | 0724 | 724 | 00000000000000000024 | 26.90724809414742 | t | 2023-01-30 07:13:53.060467 + 025 | 0725 | 0725 | 725 | 00000000000000000025 | 26.92582403567252 | t | 2023-01-30 07:13:53.060472 + 026 | 0726 | 0726 | 726 | 00000000000000000026 | 26.94438717061496 | t | 2023-01-30 07:13:53.060475 + 027 | 0727 | 0727 | 727 | 00000000000000000027 | 26.962937525425527 | t | 2023-01-30 07:13:53.06048 + 028 | 0728 | 0728 | 728 | 00000000000000000028 | 26.981475126464083 | t | 2023-01-30 07:13:53.060483 + 029 | 0729 | 0729 | 729 | 00000000000000000029 | 27 | t | 2023-01-30 07:13:53.060487 + 030 | 0730 | 0730 | 730 | 00000000000000000030 | 27.018512172212592 | t | 2023-01-30 07:13:53.06049 + 031 | 0731 | 0731 | 731 | 00000000000000000031 | 27.03701166919155 | t | 2023-01-30 07:13:53.060494 + 032 | 0732 | 0732 | 732 | 00000000000000000032 | 27.055498516937366 | t | 2023-01-30 07:13:53.060497 + 033 | 0733 | 0733 | 733 | 00000000000000000033 | 27.073972741361768 | t | 2023-01-30 07:13:53.060501 + 034 | 0734 | 0734 | 734 | 00000000000000000034 | 27.09243436828813 | t | 2023-01-30 07:13:53.060504 + 035 | 0735 | 0735 | 735 | 00000000000000000035 | 27.110883423451916 | t | 2023-01-30 07:13:53.060509 + 036 | 0736 | 0736 | 736 | 00000000000000000036 | 27.129319932501073 | t | 2023-01-30 07:13:53.060512 + 037 | 0737 | 0737 | 737 | 00000000000000000037 | 27.147743920996454 | t | 2023-01-30 07:13:53.060516 + 038 | 0738 | 0738 | 738 | 00000000000000000038 | 27.16615541441225 | t | 2023-01-30 07:13:53.060519 + 039 | 0739 | 0739 | 739 | 00000000000000000039 | 27.184554438136374 | t | 2023-01-30 07:13:53.060523 + 040 | 0740 | 0740 | 740 | 00000000000000000040 | 27.202941017470888 | t | 2023-01-30 07:13:53.060526 + 041 | 0741 | 0741 | 741 | 00000000000000000041 | 27.2213151776324 | t | 2023-01-30 07:13:53.06053 + 042 | 0742 | 0742 | 742 | 00000000000000000042 | 27.23967694375247 | t | 2023-01-30 07:13:53.060533 + 043 | 0743 | 0743 | 743 | 00000000000000000043 | 27.258026340878022 | t | 2023-01-30 07:13:53.060537 + 044 | 0744 | 0744 | 744 | 00000000000000000044 | 27.27636339397171 | t | 2023-01-30 07:13:53.06054 + 045 | 0745 | 0745 | 745 | 00000000000000000045 | 27.294688127912362 | t | 2023-01-30 07:13:53.060543 + 046 | 0746 | 0746 | 746 | 00000000000000000046 | 27.313000567495326 | t | 2023-01-30 07:13:53.060548 + 047 | 0747 | 0747 | 747 | 00000000000000000047 | 27.331300737432898 | t | 2023-01-30 07:13:53.060551 + 048 | 0748 | 0748 | 748 | 00000000000000000048 | 27.349588662354687 | t | 2023-01-30 07:13:53.060555 + 049 | 0749 | 0749 | 749 | 00000000000000000049 | 27.367864366808018 | t | 2023-01-30 07:13:53.060558 + 050 | 0750 | 0750 | 750 | 00000000000000000050 | 27.386127875258307 | t | 2023-01-30 07:13:53.060566 + 051 | 0751 | 0751 | 751 | 00000000000000000051 | 27.40437921208944 | t | 2023-01-30 07:13:53.060569 + 052 | 0752 | 0752 | 752 | 00000000000000000052 | 27.422618401604176 | t | 2023-01-30 07:13:53.060574 + 053 | 0753 | 0753 | 753 | 00000000000000000053 | 27.440845468024488 | t | 2023-01-30 07:13:53.060577 + 054 | 0754 | 0754 | 754 | 00000000000000000054 | 27.459060435491963 | t | 2023-01-30 07:13:53.060582 + 055 | 0755 | 0755 | 755 | 00000000000000000055 | 27.477263328068172 | t | 2023-01-30 07:13:53.060586 + 056 | 0756 | 0756 | 756 | 00000000000000000056 | 27.49545416973504 | t | 2023-01-30 07:13:53.06059 + 057 | 0757 | 0757 | 757 | 00000000000000000057 | 27.51363298439521 | t | 2023-01-30 07:13:53.060594 + 058 | 0758 | 0758 | 758 | 00000000000000000058 | 27.53179979587241 | t | 2023-01-30 07:13:53.060598 + 059 | 0759 | 0759 | 759 | 00000000000000000059 | 27.54995462791182 | t | 2023-01-30 07:13:53.060601 + 060 | 0760 | 0760 | 760 | 00000000000000000060 | 27.568097504180443 | t | 2023-01-30 07:13:53.060605 + 061 | 0761 | 0761 | 761 | 00000000000000000061 | 27.586228448267445 | t | 2023-01-30 07:13:53.060608 + 062 | 0762 | 0762 | 762 | 00000000000000000062 | 27.60434748368452 | t | 2023-01-30 07:13:53.060612 + 063 | 0763 | 0763 | 763 | 00000000000000000063 | 27.622454633866266 | t | 2023-01-30 07:13:53.060615 + 064 | 0764 | 0764 | 764 | 00000000000000000064 | 27.640549922170507 | t | 2023-01-30 07:13:53.06062 + 065 | 0765 | 0765 | 765 | 00000000000000000065 | 27.65863337187866 | t | 2023-01-30 07:13:53.060623 + 066 | 0766 | 0766 | 766 | 00000000000000000066 | 27.676705006196094 | t | 2023-01-30 07:13:53.060627 + 067 | 0767 | 0767 | 767 | 00000000000000000067 | 27.694764848252458 | t | 2023-01-30 07:13:53.06063 + 068 | 0768 | 0768 | 768 | 00000000000000000068 | 27.712812921102035 | t | 2023-01-30 07:13:53.060635 + 069 | 0769 | 0769 | 769 | 00000000000000000069 | 27.730849247724095 | t | 2023-01-30 07:13:53.060638 + 070 | 0770 | 0770 | 770 | 00000000000000000070 | 27.748873851023216 | t | 2023-01-30 07:13:53.060642 + 071 | 0771 | 0771 | 771 | 00000000000000000071 | 27.76688675382964 | t | 2023-01-30 07:13:53.060645 + 072 | 0772 | 0772 | 772 | 00000000000000000072 | 27.784887978899608 | t | 2023-01-30 07:13:53.06065 + 073 | 0773 | 0773 | 773 | 00000000000000000073 | 27.80287754891569 | t | 2023-01-30 07:13:53.060653 + 074 | 0774 | 0774 | 774 | 00000000000000000074 | 27.820855486487112 | t | 2023-01-30 07:13:53.060657 + 075 | 0775 | 0775 | 775 | 00000000000000000075 | 27.83882181415011 | t | 2023-01-30 07:13:53.06066 + 076 | 0776 | 0776 | 776 | 00000000000000000076 | 27.85677655436824 | t | 2023-01-30 07:13:53.060664 + 077 | 0777 | 0777 | 777 | 00000000000000000077 | 27.874719729532707 | t | 2023-01-30 07:13:53.060667 + 078 | 0778 | 0778 | 778 | 00000000000000000078 | 27.892651361962706 | t | 2023-01-30 07:13:53.060671 + 079 | 0779 | 0779 | 779 | 00000000000000000079 | 27.910571473905726 | t | 2023-01-30 07:13:53.060675 + 080 | 0780 | 0780 | 780 | 00000000000000000080 | 27.92848008753788 | t | 2023-01-30 07:13:53.060679 + 081 | 0781 | 0781 | 781 | 00000000000000000081 | 27.94637722496424 | t | 2023-01-30 07:13:53.060682 + 082 | 0782 | 0782 | 782 | 00000000000000000082 | 27.964262908219126 | t | 2023-01-30 07:13:53.060686 + 083 | 0783 | 0783 | 783 | 00000000000000000083 | 27.982137159266443 | t | 2023-01-30 07:13:53.060689 + 084 | 0784 | 0784 | 784 | 00000000000000000084 | 28 | t | 2023-01-30 07:13:53.060694 + 085 | 0785 | 0785 | 785 | 00000000000000000085 | 28.0178514522438 | t | 2023-01-30 07:13:53.060697 + 086 | 0786 | 0786 | 786 | 00000000000000000086 | 28.035691537752374 | t | 2023-01-30 07:13:53.060701 + 087 | 0787 | 0787 | 787 | 00000000000000000087 | 28.053520278211074 | t | 2023-01-30 07:13:53.060704 + 088 | 0788 | 0788 | 788 | 00000000000000000088 | 28.071337695236398 | t | 2023-01-30 07:13:53.060709 + 089 | 0789 | 0789 | 789 | 00000000000000000089 | 28.089143810376278 | t | 2023-01-30 07:13:53.060712 + 090 | 0790 | 0790 | 790 | 00000000000000000090 | 28.106938645110393 | t | 2023-01-30 07:13:53.060716 + 091 | 0791 | 0791 | 791 | 00000000000000000091 | 28.124722220850465 | t | 2023-01-30 07:13:53.060719 + 092 | 0792 | 0792 | 792 | 00000000000000000092 | 28.142494558940577 | t | 2023-01-30 07:13:53.060722 + 093 | 0793 | 0793 | 793 | 00000000000000000093 | 28.160255680657446 | t | 2023-01-30 07:13:53.060726 + 094 | 0794 | 0794 | 794 | 00000000000000000094 | 28.178005607210743 | t | 2023-01-30 07:13:53.060729 + 095 | 0795 | 0795 | 795 | 00000000000000000095 | 28.19574435974337 | t | 2023-01-30 07:13:53.060733 + 096 | 0796 | 0796 | 796 | 00000000000000000096 | 28.21347195933177 | t | 2023-01-30 07:13:53.060736 + 097 | 0797 | 0797 | 797 | 00000000000000000097 | 28.231188426986208 | t | 2023-01-30 07:13:53.060741 + 098 | 0798 | 0798 | 798 | 00000000000000000098 | 28.24889378365107 | t | 2023-01-30 07:13:53.060744 + 099 | 0799 | 0799 | 799 | 00000000000000000099 | 28.26658805020514 | t | 2023-01-30 07:13:53.060748 + 000 | 0800 | 0800 | 800 | 00000000000000000000 | 28.284271247461902 | t | 2023-01-30 07:13:53.060751 + 001 | 0801 | 0801 | 801 | 00000000000000000001 | 28.30194339616981 | t | 2023-01-30 07:13:53.060755 + 002 | 0802 | 0802 | 802 | 00000000000000000002 | 28.319604517012593 | t | 2023-01-30 07:13:53.060758 + 003 | 0803 | 0803 | 803 | 00000000000000000003 | 28.337254630609507 | t | 2023-01-30 07:13:53.060762 + 004 | 0804 | 0804 | 804 | 00000000000000000004 | 28.35489375751565 | t | 2023-01-30 07:13:53.060765 + 005 | 0805 | 0805 | 805 | 00000000000000000005 | 28.372521918222215 | t | 2023-01-30 07:13:53.06077 + 006 | 0806 | 0806 | 806 | 00000000000000000006 | 28.39013913315678 | t | 2023-01-30 07:13:53.060772 + 007 | 0807 | 0807 | 807 | 00000000000000000007 | 28.407745422683583 | t | 2023-01-30 07:13:53.060777 + 008 | 0808 | 0808 | 808 | 00000000000000000008 | 28.42534080710379 | t | 2023-01-30 07:13:53.06078 + 009 | 0809 | 0809 | 809 | 00000000000000000009 | 28.442925306655784 | t | 2023-01-30 07:13:53.060784 + 010 | 0810 | 0810 | 810 | 00000000000000000010 | 28.460498941515414 | t | 2023-01-30 07:13:53.060787 + 011 | 0811 | 0811 | 811 | 00000000000000000011 | 28.478061731796284 | t | 2023-01-30 07:13:53.060791 + 012 | 0812 | 0812 | 812 | 00000000000000000012 | 28.495613697550013 | t | 2023-01-30 07:13:53.060794 + 013 | 0813 | 0813 | 813 | 00000000000000000013 | 28.513154858766505 | t | 2023-01-30 07:13:53.060803 + 014 | 0814 | 0814 | 814 | 00000000000000000014 | 28.53068523537421 | t | 2023-01-30 07:13:53.060806 + 015 | 0815 | 0815 | 815 | 00000000000000000015 | 28.548204847240395 | t | 2023-01-30 07:13:53.06081 + 016 | 0816 | 0816 | 816 | 00000000000000000016 | 28.5657137141714 | t | 2023-01-30 07:13:53.060813 + 017 | 0817 | 0817 | 817 | 00000000000000000017 | 28.583211855912904 | t | 2023-01-30 07:13:53.060817 + 018 | 0818 | 0818 | 818 | 00000000000000000018 | 28.600699292150182 | t | 2023-01-30 07:13:53.06082 + 019 | 0819 | 0819 | 819 | 00000000000000000019 | 28.61817604250837 | t | 2023-01-30 07:13:53.060824 + 020 | 0820 | 0820 | 820 | 00000000000000000020 | 28.635642126552707 | t | 2023-01-30 07:13:53.060827 + 021 | 0821 | 0821 | 821 | 00000000000000000021 | 28.653097563788805 | t | 2023-01-30 07:13:53.060833 + 022 | 0822 | 0822 | 822 | 00000000000000000022 | 28.6705423736629 | t | 2023-01-30 07:13:53.060836 + 023 | 0823 | 0823 | 823 | 00000000000000000023 | 28.687976575562104 | t | 2023-01-30 07:13:53.06084 + 024 | 0824 | 0824 | 824 | 00000000000000000024 | 28.705400188814647 | t | 2023-01-30 07:13:53.060843 + 025 | 0825 | 0825 | 825 | 00000000000000000025 | 28.722813232690143 | t | 2023-01-30 07:13:53.060847 + 026 | 0826 | 0826 | 826 | 00000000000000000026 | 28.74021572639983 | t | 2023-01-30 07:13:53.06085 + 027 | 0827 | 0827 | 827 | 00000000000000000027 | 28.75760768909681 | t | 2023-01-30 07:13:53.060855 + 028 | 0828 | 0828 | 828 | 00000000000000000028 | 28.77498913987632 | t | 2023-01-30 07:13:53.060858 + 029 | 0829 | 0829 | 829 | 00000000000000000029 | 28.792360097775937 | t | 2023-01-30 07:13:53.060862 + 030 | 0830 | 0830 | 830 | 00000000000000000030 | 28.809720581775867 | t | 2023-01-30 07:13:53.060865 + 031 | 0831 | 0831 | 831 | 00000000000000000031 | 28.827070610799147 | t | 2023-01-30 07:13:53.060869 + 032 | 0832 | 0832 | 832 | 00000000000000000032 | 28.844410203711913 | t | 2023-01-30 07:13:53.060872 + 033 | 0833 | 0833 | 833 | 00000000000000000033 | 28.861739379323623 | t | 2023-01-30 07:13:53.060876 + 034 | 0834 | 0834 | 834 | 00000000000000000034 | 28.879058156387302 | t | 2023-01-30 07:13:53.060879 + 035 | 0835 | 0835 | 835 | 00000000000000000035 | 28.89636655359978 | t | 2023-01-30 07:13:53.060884 + 036 | 0836 | 0836 | 836 | 00000000000000000036 | 28.91366458960192 | t | 2023-01-30 07:13:53.060887 + 037 | 0837 | 0837 | 837 | 00000000000000000037 | 28.930952282978865 | t | 2023-01-30 07:13:53.060891 + 038 | 0838 | 0838 | 838 | 00000000000000000038 | 28.948229652260256 | t | 2023-01-30 07:13:53.060894 + 039 | 0839 | 0839 | 839 | 00000000000000000039 | 28.965496715920477 | t | 2023-01-30 07:13:53.060898 + 040 | 0840 | 0840 | 840 | 00000000000000000040 | 28.982753492378876 | t | 2023-01-30 07:13:53.060901 + 041 | 0841 | 0841 | 841 | 00000000000000000041 | 29 | t | 2023-01-30 07:13:53.060906 + 042 | 0842 | 0842 | 842 | 00000000000000000042 | 29.017236257093817 | t | 2023-01-30 07:13:53.060909 + 043 | 0843 | 0843 | 843 | 00000000000000000043 | 29.03446228191595 | t | 2023-01-30 07:13:53.060914 + 044 | 0844 | 0844 | 844 | 00000000000000000044 | 29.0516780926679 | t | 2023-01-30 07:13:53.060917 + 045 | 0845 | 0845 | 845 | 00000000000000000045 | 29.068883707497267 | t | 2023-01-30 07:13:53.060921 + 046 | 0846 | 0846 | 846 | 00000000000000000046 | 29.086079144497972 | t | 2023-01-30 07:13:53.060924 + 047 | 0847 | 0847 | 847 | 00000000000000000047 | 29.103264421710495 | t | 2023-01-30 07:13:53.060927 + 048 | 0848 | 0848 | 848 | 00000000000000000048 | 29.120439557122072 | t | 2023-01-30 07:13:53.060931 + 049 | 0849 | 0849 | 849 | 00000000000000000049 | 29.13760456866693 | t | 2023-01-30 07:13:53.060934 + 050 | 0850 | 0850 | 850 | 00000000000000000050 | 29.154759474226502 | t | 2023-01-30 07:13:53.060938 + 051 | 0851 | 0851 | 851 | 00000000000000000051 | 29.171904291629644 | t | 2023-01-30 07:13:53.060941 + 052 | 0852 | 0852 | 852 | 00000000000000000052 | 29.189039038652847 | t | 2023-01-30 07:13:53.060946 + 053 | 0853 | 0853 | 853 | 00000000000000000053 | 29.206163733020468 | t | 2023-01-30 07:13:53.060952 + 054 | 0854 | 0854 | 854 | 00000000000000000054 | 29.223278392404914 | t | 2023-01-30 07:13:53.060955 + 055 | 0855 | 0855 | 855 | 00000000000000000055 | 29.24038303442689 | t | 2023-01-30 07:13:53.06096 + 056 | 0856 | 0856 | 856 | 00000000000000000056 | 29.257477676655586 | t | 2023-01-30 07:13:53.060963 + 057 | 0857 | 0857 | 857 | 00000000000000000057 | 29.274562336608895 | t | 2023-01-30 07:13:53.060968 + 058 | 0858 | 0858 | 858 | 00000000000000000058 | 29.29163703175362 | t | 2023-01-30 07:13:53.060971 + 059 | 0859 | 0859 | 859 | 00000000000000000059 | 29.30870177950569 | t | 2023-01-30 07:13:53.060975 + 060 | 0860 | 0860 | 860 | 00000000000000000060 | 29.32575659723036 | t | 2023-01-30 07:13:53.060978 + 061 | 0861 | 0861 | 861 | 00000000000000000061 | 29.34280150224242 | t | 2023-01-30 07:13:53.060982 + 062 | 0862 | 0862 | 862 | 00000000000000000062 | 29.359836511806396 | t | 2023-01-30 07:13:53.060985 + 063 | 0863 | 0863 | 863 | 00000000000000000063 | 29.376861643136763 | t | 2023-01-30 07:13:53.060989 + 064 | 0864 | 0864 | 864 | 00000000000000000064 | 29.393876913398138 | t | 2023-01-30 07:13:53.060992 + 065 | 0865 | 0865 | 865 | 00000000000000000065 | 29.410882339705484 | t | 2023-01-30 07:13:53.060997 + 066 | 0866 | 0866 | 866 | 00000000000000000066 | 29.427877939124322 | t | 2023-01-30 07:13:53.061 + 067 | 0867 | 0867 | 867 | 00000000000000000067 | 29.444863728670914 | t | 2023-01-30 07:13:53.061005 + 068 | 0868 | 0868 | 868 | 00000000000000000068 | 29.46183972531247 | t | 2023-01-30 07:13:53.061007 + 069 | 0869 | 0869 | 869 | 00000000000000000069 | 29.478805945967352 | t | 2023-01-30 07:13:53.061012 + 070 | 0870 | 0870 | 870 | 00000000000000000070 | 29.49576240750525 | t | 2023-01-30 07:13:53.061015 + 071 | 0871 | 0871 | 871 | 00000000000000000071 | 29.512709126747414 | t | 2023-01-30 07:13:53.061032 + 072 | 0872 | 0872 | 872 | 00000000000000000072 | 29.5296461204668 | t | 2023-01-30 07:13:53.061038 + 073 | 0873 | 0873 | 873 | 00000000000000000073 | 29.546573405388315 | t | 2023-01-30 07:13:53.061041 + 074 | 0874 | 0874 | 874 | 00000000000000000074 | 29.563490998188964 | t | 2023-01-30 07:13:53.061049 + 075 | 0875 | 0875 | 875 | 00000000000000000075 | 29.58039891549808 | t | 2023-01-30 07:13:53.061052 + 076 | 0876 | 0876 | 876 | 00000000000000000076 | 29.597297173897484 | t | 2023-01-30 07:13:53.061056 + 077 | 0877 | 0877 | 877 | 00000000000000000077 | 29.614185789921695 | t | 2023-01-30 07:13:53.061081 + 078 | 0878 | 0878 | 878 | 00000000000000000078 | 29.631064780058107 | t | 2023-01-30 07:13:53.061087 + 079 | 0879 | 0879 | 879 | 00000000000000000079 | 29.647934160747187 | t | 2023-01-30 07:13:53.06109 + 080 | 0880 | 0880 | 880 | 00000000000000000080 | 29.664793948382652 | t | 2023-01-30 07:13:53.061094 + 081 | 0881 | 0881 | 881 | 00000000000000000081 | 29.68164415931166 | t | 2023-01-30 07:13:53.061097 + 082 | 0882 | 0882 | 882 | 00000000000000000082 | 29.698484809834994 | t | 2023-01-30 07:13:53.061101 + 083 | 0883 | 0883 | 883 | 00000000000000000083 | 29.715315916207253 | t | 2023-01-30 07:13:53.061104 + 084 | 0884 | 0884 | 884 | 00000000000000000084 | 29.732137494637012 | t | 2023-01-30 07:13:53.061109 + 085 | 0885 | 0885 | 885 | 00000000000000000085 | 29.748949561287034 | t | 2023-01-30 07:13:53.061112 + 086 | 0886 | 0886 | 886 | 00000000000000000086 | 29.765752132274432 | t | 2023-01-30 07:13:53.061119 + 087 | 0887 | 0887 | 887 | 00000000000000000087 | 29.782545223670862 | t | 2023-01-30 07:13:53.061122 + 088 | 0888 | 0888 | 888 | 00000000000000000088 | 29.79932885150268 | t | 2023-01-30 07:13:53.061126 + 089 | 0889 | 0889 | 889 | 00000000000000000089 | 29.816103031751148 | t | 2023-01-30 07:13:53.061129 + 090 | 0890 | 0890 | 890 | 00000000000000000090 | 29.832867780352597 | t | 2023-01-30 07:13:53.061133 + 091 | 0891 | 0891 | 891 | 00000000000000000091 | 29.8496231131986 | t | 2023-01-30 07:13:53.061136 + 092 | 0892 | 0892 | 892 | 00000000000000000092 | 29.866369046136157 | t | 2023-01-30 07:13:53.06114 + 093 | 0893 | 0893 | 893 | 00000000000000000093 | 29.88310559496787 | t | 2023-01-30 07:13:53.061143 + 094 | 0894 | 0894 | 894 | 00000000000000000094 | 29.899832775452108 | t | 2023-01-30 07:13:53.061148 + 095 | 0895 | 0895 | 895 | 00000000000000000095 | 29.916550603303182 | t | 2023-01-30 07:13:53.061151 + 096 | 0896 | 0896 | 896 | 00000000000000000096 | 29.93325909419153 | t | 2023-01-30 07:13:53.061178 + 097 | 0897 | 0897 | 897 | 00000000000000000097 | 29.949958263743873 | t | 2023-01-30 07:13:53.061181 + 098 | 0898 | 0898 | 898 | 00000000000000000098 | 29.966648127543394 | t | 2023-01-30 07:13:53.061185 + 099 | 0899 | 0899 | 899 | 00000000000000000099 | 29.9833287011299 | t | 2023-01-30 07:13:53.061188 + 000 | 0900 | 0900 | 900 | 00000000000000000000 | 30 | t | 2023-01-30 07:13:53.061193 + 001 | 0901 | 0901 | 901 | 00000000000000000001 | 30.01666203960727 | t | 2023-01-30 07:13:53.061196 + 002 | 0902 | 0902 | 902 | 00000000000000000002 | 30.033314835362415 | t | 2023-01-30 07:13:53.061201 + 003 | 0903 | 0903 | 903 | 00000000000000000003 | 30.04995840263344 | t | 2023-01-30 07:13:53.061204 + 004 | 0904 | 0904 | 904 | 00000000000000000004 | 30.066592756745816 | t | 2023-01-30 07:13:53.061208 + 005 | 0905 | 0905 | 905 | 00000000000000000005 | 30.083217912982647 | t | 2023-01-30 07:13:53.061211 + 006 | 0906 | 0906 | 906 | 00000000000000000006 | 30.099833886584822 | t | 2023-01-30 07:13:53.061216 + 007 | 0907 | 0907 | 907 | 00000000000000000007 | 30.116440692751194 | t | 2023-01-30 07:13:53.061232 + 008 | 0908 | 0908 | 908 | 00000000000000000008 | 30.133038346638727 | t | 2023-01-30 07:13:53.061237 + 009 | 0909 | 0909 | 909 | 00000000000000000009 | 30.14962686336267 | t | 2023-01-30 07:13:53.06124 + 010 | 0910 | 0910 | 910 | 00000000000000000010 | 30.166206257996713 | t | 2023-01-30 07:13:53.061244 + 011 | 0911 | 0911 | 911 | 00000000000000000011 | 30.18277654557314 | t | 2023-01-30 07:13:53.061247 + 012 | 0912 | 0912 | 912 | 00000000000000000012 | 30.199337741083 | t | 2023-01-30 07:13:53.061254 + 013 | 0913 | 0913 | 913 | 00000000000000000013 | 30.215889859476256 | t | 2023-01-30 07:13:53.061257 + 014 | 0914 | 0914 | 914 | 00000000000000000014 | 30.23243291566195 | t | 2023-01-30 07:13:53.061262 + 015 | 0915 | 0915 | 915 | 00000000000000000015 | 30.24896692450835 | t | 2023-01-30 07:13:53.061265 + 016 | 0916 | 0916 | 916 | 00000000000000000016 | 30.265491900843113 | t | 2023-01-30 07:13:53.061269 + 017 | 0917 | 0917 | 917 | 00000000000000000017 | 30.28200785945344 | t | 2023-01-30 07:13:53.061272 + 018 | 0918 | 0918 | 918 | 00000000000000000018 | 30.298514815086232 | t | 2023-01-30 07:13:53.061275 + 019 | 0919 | 0919 | 919 | 00000000000000000019 | 30.315012782448235 | t | 2023-01-30 07:13:53.061279 + 020 | 0920 | 0920 | 920 | 00000000000000000020 | 30.331501776206203 | t | 2023-01-30 07:13:53.061282 + 021 | 0921 | 0921 | 921 | 00000000000000000021 | 30.347981810987037 | t | 2023-01-30 07:13:53.061286 + 022 | 0922 | 0922 | 922 | 00000000000000000022 | 30.364452901377952 | t | 2023-01-30 07:13:53.061289 + 023 | 0923 | 0923 | 923 | 00000000000000000023 | 30.380915061926625 | t | 2023-01-30 07:13:53.061293 + 024 | 0924 | 0924 | 924 | 00000000000000000024 | 30.397368307141328 | t | 2023-01-30 07:13:53.061296 + 025 | 0925 | 0925 | 925 | 00000000000000000025 | 30.4138126514911 | t | 2023-01-30 07:13:53.061301 + 026 | 0926 | 0926 | 926 | 00000000000000000026 | 30.430248109405877 | t | 2023-01-30 07:13:53.061304 + 027 | 0927 | 0927 | 927 | 00000000000000000027 | 30.44667469527666 | t | 2023-01-30 07:13:53.061309 + 028 | 0928 | 0928 | 928 | 00000000000000000028 | 30.463092423455635 | t | 2023-01-30 07:13:53.061312 + 029 | 0929 | 0929 | 929 | 00000000000000000029 | 30.479501308256342 | t | 2023-01-30 07:13:53.061316 + 030 | 0930 | 0930 | 930 | 00000000000000000030 | 30.495901363953813 | t | 2023-01-30 07:13:53.061319 + 031 | 0931 | 0931 | 931 | 00000000000000000031 | 30.512292604784715 | t | 2023-01-30 07:13:53.061323 + 032 | 0932 | 0932 | 932 | 00000000000000000032 | 30.528675044947494 | t | 2023-01-30 07:13:53.061326 + 033 | 0933 | 0933 | 933 | 00000000000000000033 | 30.54504869860253 | t | 2023-01-30 07:13:53.06133 + 034 | 0934 | 0934 | 934 | 00000000000000000034 | 30.56141357987225 | t | 2023-01-30 07:13:53.061333 + 035 | 0935 | 0935 | 935 | 00000000000000000035 | 30.577769702841312 | t | 2023-01-30 07:13:53.061337 + 036 | 0936 | 0936 | 936 | 00000000000000000036 | 30.59411708155671 | t | 2023-01-30 07:13:53.06134 + 037 | 0937 | 0937 | 937 | 00000000000000000037 | 30.610455730027933 | t | 2023-01-30 07:13:53.061344 + 038 | 0938 | 0938 | 938 | 00000000000000000038 | 30.62678566222711 | t | 2023-01-30 07:13:53.061347 + 039 | 0939 | 0939 | 939 | 00000000000000000039 | 30.643106892089126 | t | 2023-01-30 07:13:53.061351 + 040 | 0940 | 0940 | 940 | 00000000000000000040 | 30.659419433511783 | t | 2023-01-30 07:13:53.061354 + 041 | 0941 | 0941 | 941 | 00000000000000000041 | 30.675723300355934 | t | 2023-01-30 07:13:53.061358 + 042 | 0942 | 0942 | 942 | 00000000000000000042 | 30.692018506445613 | t | 2023-01-30 07:13:53.061361 + 043 | 0943 | 0943 | 943 | 00000000000000000043 | 30.708305065568176 | t | 2023-01-30 07:13:53.061366 + 044 | 0944 | 0944 | 944 | 00000000000000000044 | 30.72458299147443 | t | 2023-01-30 07:13:53.061369 + 045 | 0945 | 0945 | 945 | 00000000000000000045 | 30.740852297878796 | t | 2023-01-30 07:13:53.061373 + 046 | 0946 | 0946 | 946 | 00000000000000000046 | 30.757112998459398 | t | 2023-01-30 07:13:53.061376 + 047 | 0947 | 0947 | 947 | 00000000000000000047 | 30.773365106858236 | t | 2023-01-30 07:13:53.06138 + 048 | 0948 | 0948 | 948 | 00000000000000000048 | 30.789608636681304 | t | 2023-01-30 07:13:53.061383 + 049 | 0949 | 0949 | 949 | 00000000000000000049 | 30.805843601498726 | t | 2023-01-30 07:13:53.061387 + 050 | 0950 | 0950 | 950 | 00000000000000000050 | 30.822070014844883 | t | 2023-01-30 07:13:53.06139 + 051 | 0951 | 0951 | 951 | 00000000000000000051 | 30.83828789021855 | t | 2023-01-30 07:13:53.061394 + 052 | 0952 | 0952 | 952 | 00000000000000000052 | 30.854497241083024 | t | 2023-01-30 07:13:53.061397 + 053 | 0953 | 0953 | 953 | 00000000000000000053 | 30.870698080866262 | t | 2023-01-30 07:13:53.061403 + 054 | 0954 | 0954 | 954 | 00000000000000000054 | 30.886890422961002 | t | 2023-01-30 07:13:53.061406 + 055 | 0955 | 0955 | 955 | 00000000000000000055 | 30.903074280724887 | t | 2023-01-30 07:13:53.061411 + 056 | 0956 | 0956 | 956 | 00000000000000000056 | 30.919249667480614 | t | 2023-01-30 07:13:53.061414 + 057 | 0957 | 0957 | 957 | 00000000000000000057 | 30.93541659651604 | t | 2023-01-30 07:13:53.061418 + 058 | 0958 | 0958 | 958 | 00000000000000000058 | 30.95157508108432 | t | 2023-01-30 07:13:53.061421 + 059 | 0959 | 0959 | 959 | 00000000000000000059 | 30.967725134404045 | t | 2023-01-30 07:13:53.061425 + 060 | 0960 | 0960 | 960 | 00000000000000000060 | 30.983866769659336 | t | 2023-01-30 07:13:53.061428 + 061 | 0961 | 0961 | 961 | 00000000000000000061 | 31 | t | 2023-01-30 07:13:53.061432 + 062 | 0962 | 0962 | 962 | 00000000000000000062 | 31.016124838541646 | t | 2023-01-30 07:13:53.061435 + 063 | 0963 | 0963 | 963 | 00000000000000000063 | 31.0322412983658 | t | 2023-01-30 07:13:53.06144 + 064 | 0964 | 0964 | 964 | 00000000000000000064 | 31.04834939252005 | t | 2023-01-30 07:13:53.061443 + 065 | 0965 | 0965 | 965 | 00000000000000000065 | 31.064449134018133 | t | 2023-01-30 07:13:53.061447 + 066 | 0966 | 0966 | 966 | 00000000000000000066 | 31.080540535840107 | t | 2023-01-30 07:13:53.06145 + 067 | 0967 | 0967 | 967 | 00000000000000000067 | 31.096623610932426 | t | 2023-01-30 07:13:53.061454 + 068 | 0968 | 0968 | 968 | 00000000000000000068 | 31.11269837220809 | t | 2023-01-30 07:13:53.061457 + 069 | 0969 | 0969 | 969 | 00000000000000000069 | 31.12876483254676 | t | 2023-01-30 07:13:53.061461 + 070 | 0970 | 0970 | 970 | 00000000000000000070 | 31.144823004794873 | t | 2023-01-30 07:13:53.061464 + 071 | 0971 | 0971 | 971 | 00000000000000000071 | 31.160872901765767 | t | 2023-01-30 07:13:53.061469 + 072 | 0972 | 0972 | 972 | 00000000000000000072 | 31.176914536239792 | t | 2023-01-30 07:13:53.061472 + 073 | 0973 | 0973 | 973 | 00000000000000000073 | 31.192947920964443 | t | 2023-01-30 07:13:53.061476 + 074 | 0974 | 0974 | 974 | 00000000000000000074 | 31.20897306865447 | t | 2023-01-30 07:13:53.061479 + 075 | 0975 | 0975 | 975 | 00000000000000000075 | 31.22498999199199 | t | 2023-01-30 07:13:53.061482 + 076 | 0976 | 0976 | 976 | 00000000000000000076 | 31.240998703626616 | t | 2023-01-30 07:13:53.061489 + 077 | 0977 | 0977 | 977 | 00000000000000000077 | 31.25699921617557 | t | 2023-01-30 07:13:53.061492 + 078 | 0978 | 0978 | 978 | 00000000000000000078 | 31.272991542223778 | t | 2023-01-30 07:13:53.061496 + 079 | 0979 | 0979 | 979 | 00000000000000000079 | 31.28897569432403 | t | 2023-01-30 07:13:53.061499 + 080 | 0980 | 0980 | 980 | 00000000000000000080 | 31.304951684997057 | t | 2023-01-30 07:13:53.061503 + 081 | 0981 | 0981 | 981 | 00000000000000000081 | 31.32091952673165 | t | 2023-01-30 07:13:53.061506 + 082 | 0982 | 0982 | 982 | 00000000000000000082 | 31.336879231984796 | t | 2023-01-30 07:13:53.061511 + 083 | 0983 | 0983 | 983 | 00000000000000000083 | 31.352830813181765 | t | 2023-01-30 07:13:53.061514 + 084 | 0984 | 0984 | 984 | 00000000000000000084 | 31.368774282716245 | t | 2023-01-30 07:13:53.061518 + 085 | 0985 | 0985 | 985 | 00000000000000000085 | 31.38470965295043 | t | 2023-01-30 07:13:53.061521 + 086 | 0986 | 0986 | 986 | 00000000000000000086 | 31.400636936215164 | t | 2023-01-30 07:13:53.061525 + 087 | 0987 | 0987 | 987 | 00000000000000000087 | 31.416556144810016 | t | 2023-01-30 07:13:53.061528 + 088 | 0988 | 0988 | 988 | 00000000000000000088 | 31.432467291003423 | t | 2023-01-30 07:13:53.061532 + 089 | 0989 | 0989 | 989 | 00000000000000000089 | 31.448370387032774 | t | 2023-01-30 07:13:53.061535 + 090 | 0990 | 0990 | 990 | 00000000000000000090 | 31.464265445104548 | t | 2023-01-30 07:13:53.061539 + 091 | 0991 | 0991 | 991 | 00000000000000000091 | 31.480152477394387 | t | 2023-01-30 07:13:53.061542 + 092 | 0992 | 0992 | 992 | 00000000000000000092 | 31.496031496047245 | t | 2023-01-30 07:13:53.061547 + 093 | 0993 | 0993 | 993 | 00000000000000000093 | 31.51190251317746 | t | 2023-01-30 07:13:53.06155 + 094 | 0994 | 0994 | 994 | 00000000000000000094 | 31.52776554086889 | t | 2023-01-30 07:13:53.061554 + 095 | 0995 | 0995 | 995 | 00000000000000000095 | 31.54362059117501 | t | 2023-01-30 07:13:53.061557 + 096 | 0996 | 0996 | 996 | 00000000000000000096 | 31.559467676119 | t | 2023-01-30 07:13:53.061561 + 097 | 0997 | 0997 | 997 | 00000000000000000097 | 31.575306807693888 | t | 2023-01-30 07:13:53.061564 + 098 | 0998 | 0998 | 998 | 00000000000000000098 | 31.591137997862628 | t | 2023-01-30 07:13:53.061568 + 099 | 0999 | 0999 | 999 | 00000000000000000099 | 31.606961258558215 | t | 2023-01-30 07:13:53.061571 +(1000 rows) + +Time: 40.748 ms +--Testcase 55: +SELECT DISTINCT (tag1) FROM tbl1 GROUP BY tag1; + tag1 +------ + 000 + 001 + 002 + 003 + 004 + 005 + 006 + 007 + 008 + 009 + 010 + 011 + 012 + 013 + 014 + 015 + 016 + 017 + 018 + 019 + 020 + 021 + 022 + 023 + 024 + 025 + 026 + 027 + 028 + 029 + 030 + 031 + 032 + 033 + 034 + 035 + 036 + 037 + 038 + 039 + 040 + 041 + 042 + 043 + 044 + 045 + 046 + 047 + 048 + 049 + 050 + 051 + 052 + 053 + 054 + 055 + 056 + 057 + 058 + 059 + 060 + 061 + 062 + 063 + 064 + 065 + 066 + 067 + 068 + 069 + 070 + 071 + 072 + 073 + 074 + 075 + 076 + 077 + 078 + 079 + 080 + 081 + 082 + 083 + 084 + 085 + 086 + 087 + 088 + 089 + 090 + 091 + 092 + 093 + 094 + 095 + 096 + 097 + 098 + 099 +(100 rows) + +Time: 30.853 ms +--Testcase 56: +SELECT avg(c1), sum(c3)/:DATA_SIZE FROM tbl1 WHERE time < now() AND time > now() - interval '2 days'; + avg | ?column? +----------------------+-------------------- + 500.5000000000000000 | 21.097455887480734 +(1 row) + +Time: 15.611 ms +--Testcase 57: +SELECT count(tag1), avg(c1) FROM tbl1 WHERE time > now() - interval '1 day' GROUP BY tag1; + count | avg +-------+---------------------- + 10 | 517.0000000000000000 + 10 | 515.0000000000000000 + 10 | 518.0000000000000000 + 10 | 484.0000000000000000 + 10 | 489.0000000000000000 + 10 | 506.0000000000000000 + 10 | 461.0000000000000000 + 10 | 483.0000000000000000 + 10 | 472.0000000000000000 + 10 | 503.0000000000000000 + 10 | 493.0000000000000000 + 10 | 479.0000000000000000 + 10 | 526.0000000000000000 + 10 | 455.0000000000000000 + 10 | 534.0000000000000000 + 10 | 463.0000000000000000 + 10 | 540.0000000000000000 + 10 | 470.0000000000000000 + 10 | 532.0000000000000000 + 10 | 502.0000000000000000 + 10 | 452.0000000000000000 + 10 | 460.0000000000000000 + 10 | 486.0000000000000000 + 10 | 511.0000000000000000 + 10 | 480.0000000000000000 + 10 | 476.0000000000000000 + 10 | 508.0000000000000000 + 10 | 537.0000000000000000 + 10 | 504.0000000000000000 + 10 | 546.0000000000000000 + 10 | 520.0000000000000000 + 10 | 457.0000000000000000 + 10 | 481.0000000000000000 + 10 | 495.0000000000000000 + 10 | 541.0000000000000000 + 10 | 507.0000000000000000 + 10 | 488.0000000000000000 + 10 | 544.0000000000000000 + 10 | 545.0000000000000000 + 10 | 519.0000000000000000 + 10 | 496.0000000000000000 + 10 | 516.0000000000000000 + 10 | 451.0000000000000000 + 10 | 530.0000000000000000 + 10 | 494.0000000000000000 + 10 | 510.0000000000000000 + 10 | 474.0000000000000000 + 10 | 522.0000000000000000 + 10 | 459.0000000000000000 + 10 | 477.0000000000000000 + 10 | 500.0000000000000000 + 10 | 466.0000000000000000 + 10 | 490.0000000000000000 + 10 | 464.0000000000000000 + 10 | 478.0000000000000000 + 10 | 539.0000000000000000 + 10 | 505.0000000000000000 + 10 | 497.0000000000000000 + 10 | 548.0000000000000000 + 10 | 491.0000000000000000 + 10 | 524.0000000000000000 + 10 | 535.0000000000000000 + 10 | 473.0000000000000000 + 10 | 547.0000000000000000 + 10 | 453.0000000000000000 + 10 | 549.0000000000000000 + 10 | 487.0000000000000000 + 10 | 468.0000000000000000 + 10 | 485.0000000000000000 + 10 | 523.0000000000000000 + 10 | 499.0000000000000000 + 10 | 462.0000000000000000 + 10 | 512.0000000000000000 + 10 | 509.0000000000000000 + 10 | 498.0000000000000000 + 10 | 465.0000000000000000 + 10 | 467.0000000000000000 + 10 | 454.0000000000000000 + 10 | 513.0000000000000000 + 10 | 458.0000000000000000 + 10 | 514.0000000000000000 + 10 | 531.0000000000000000 + 10 | 492.0000000000000000 + 10 | 525.0000000000000000 + 10 | 533.0000000000000000 + 10 | 469.0000000000000000 + 10 | 521.0000000000000000 + 10 | 471.0000000000000000 + 10 | 529.0000000000000000 + 10 | 501.0000000000000000 + 10 | 482.0000000000000000 + 10 | 538.0000000000000000 + 10 | 528.0000000000000000 + 10 | 475.0000000000000000 + 10 | 550.0000000000000000 + 10 | 456.0000000000000000 + 10 | 527.0000000000000000 + 10 | 543.0000000000000000 + 10 | 542.0000000000000000 + 10 | 536.0000000000000000 +(100 rows) + +Time: 16.629 ms +--Testcase 58: +SELECT tag1, avg(c3), avg(c1), c2 FROM tbl1 WHERE time > '1970-02-11 00:00:00'::timestamp AND time < now() GROUP BY tag1, c1, c2, c3; + tag1 | avg | avg | c2 +------+--------------------+------------------------+---------------------- + 013 | 22.64950330581225 | 513.0000000000000000 | 00000000000000000013 + 049 | 25.475478405713993 | 649.0000000000000000 | 00000000000000000049 + 011 | 28.478061731796284 | 811.0000000000000000 | 00000000000000000011 + 075 | 23.979157616563597 | 575.0000000000000000 | 00000000000000000075 + 067 | 21.61018278497431 | 467.0000000000000000 | 00000000000000000067 + 013 | 20.322401432901575 | 413.0000000000000000 | 00000000000000000013 + 089 | 17 | 289.0000000000000000 | 00000000000000000089 + 066 | 31.080540535840107 | 966.0000000000000000 | 00000000000000000066 + 070 | 21.6794833886788 | 470.0000000000000000 | 00000000000000000070 + 075 | 25.98076211353316 | 675.0000000000000000 | 00000000000000000075 + 053 | 25.553864678361276 | 653.0000000000000000 | 00000000000000000053 + 090 | 13.784048752090222 | 190.0000000000000000 | 00000000000000000090 + 091 | 29.8496231131986 | 891.0000000000000000 | 00000000000000000091 + 004 | 2 | 4.0000000000000000 | 00000000000000000004 + 073 | 19.313207915827967 | 373.0000000000000000 | 00000000000000000073 + 014 | 3.7416573867739413 | 14.0000000000000000 | 00000000000000000014 + 083 | 13.527749258468683 | 183.0000000000000000 | 00000000000000000083 + 089 | 24.269322199023193 | 589.0000000000000000 | 00000000000000000089 + 078 | 8.831760866327848 | 78.0000000000000000 | 00000000000000000078 + 013 | 30.215889859476256 | 913.0000000000000000 | 00000000000000000013 + 095 | 9.746794344808963 | 95.0000000000000000 | 00000000000000000095 + 098 | 24.454038521274967 | 598.0000000000000000 | 00000000000000000098 + 010 | 20.248456731316587 | 410.0000000000000000 | 00000000000000000010 + 075 | 19.364916731037084 | 375.0000000000000000 | 00000000000000000075 + 044 | 29.0516780926679 | 844.0000000000000000 | 00000000000000000044 + 001 | 26.476404589747453 | 701.0000000000000000 | 00000000000000000001 + 022 | 26.870057685088806 | 722.0000000000000000 | 00000000000000000022 + 093 | 24.351591323771842 | 593.0000000000000000 | 00000000000000000093 + 076 | 16.61324772583615 | 276.0000000000000000 | 00000000000000000076 + 088 | 19.697715603592208 | 388.0000000000000000 | 00000000000000000088 + 035 | 25.199206336708304 | 635.0000000000000000 | 00000000000000000035 + 084 | 9.16515138991168 | 84.0000000000000000 | 00000000000000000084 + 051 | 25.514701644346147 | 651.0000000000000000 | 00000000000000000051 + 020 | 17.88854381999832 | 320.0000000000000000 | 00000000000000000020 + 006 | 30.099833886584822 | 906.0000000000000000 | 00000000000000000006 + 082 | 26.115129714401192 | 682.0000000000000000 | 00000000000000000082 + 023 | 17.97220075561143 | 323.0000000000000000 | 00000000000000000023 + 069 | 27.730849247724095 | 769.0000000000000000 | 00000000000000000069 + 000 | 30 | 900.0000000000000000 | 00000000000000000000 + 018 | 30.298514815086232 | 918.0000000000000000 | 00000000000000000018 + 090 | 17.029386365926403 | 290.0000000000000000 | 00000000000000000090 + 071 | 27.76688675382964 | 771.0000000000000000 | 00000000000000000071 + 078 | 24.041630560342615 | 578.0000000000000000 | 00000000000000000078 + 018 | 24.859605789312106 | 618.0000000000000000 | 00000000000000000018 + 006 | 10.295630140987 | 106.0000000000000000 | 00000000000000000006 + 001 | 10.04987562112089 | 101.0000000000000000 | 00000000000000000001 + 051 | 27.40437921208944 | 751.0000000000000000 | 00000000000000000051 + 077 | 21.840329667841555 | 477.0000000000000000 | 00000000000000000077 + 055 | 21.330729007701542 | 455.0000000000000000 | 00000000000000000055 + 067 | 23.811761799581316 | 567.0000000000000000 | 00000000000000000067 + 005 | 28.372521918222215 | 805.0000000000000000 | 00000000000000000005 + 090 | 31.464265445104548 | 990.0000000000000000 | 00000000000000000090 + 079 | 24.06241883103193 | 579.0000000000000000 | 00000000000000000079 + 062 | 23.706539182259394 | 562.0000000000000000 | 00000000000000000062 + 037 | 18.35755975068582 | 337.0000000000000000 | 00000000000000000037 + 088 | 9.38083151964686 | 88.0000000000000000 | 00000000000000000088 + 053 | 15.905973720586866 | 253.0000000000000000 | 00000000000000000053 + 014 | 26.720778431774775 | 714.0000000000000000 | 00000000000000000014 + 005 | 10.246950765959598 | 105.0000000000000000 | 00000000000000000005 + 004 | 22.44994432064365 | 504.0000000000000000 | 00000000000000000004 + 026 | 11.224972160321824 | 126.0000000000000000 | 00000000000000000026 + 073 | 8.54400374531753 | 73.0000000000000000 | 00000000000000000073 + 054 | 15.937377450509228 | 254.0000000000000000 | 00000000000000000054 + 041 | 18.466185312619388 | 341.0000000000000000 | 00000000000000000041 + 098 | 28.24889378365107 | 798.0000000000000000 | 00000000000000000098 + 053 | 18.788294228055936 | 353.0000000000000000 | 00000000000000000053 + 063 | 27.622454633866266 | 763.0000000000000000 | 00000000000000000063 + 090 | 26.267851073127396 | 690.0000000000000000 | 00000000000000000090 + 096 | 9.797958971132712 | 96.0000000000000000 | 00000000000000000096 + 096 | 24.413111231467404 | 596.0000000000000000 | 00000000000000000096 + 064 | 23.748684174075834 | 564.0000000000000000 | 00000000000000000064 + 030 | 30.495901363953813 | 930.0000000000000000 | 00000000000000000030 + 033 | 18.24828759089466 | 333.0000000000000000 | 00000000000000000033 + 050 | 27.386127875258307 | 750.0000000000000000 | 00000000000000000050 + 058 | 27.53179979587241 | 758.0000000000000000 | 00000000000000000058 + 070 | 16.431676725154983 | 270.0000000000000000 | 00000000000000000070 + 054 | 27.459060435491963 | 754.0000000000000000 | 00000000000000000054 + 063 | 7.937253933193772 | 63.0000000000000000 | 00000000000000000063 + 017 | 10.816653826391969 | 117.0000000000000000 | 00000000000000000017 + 047 | 29.103264421710495 | 847.0000000000000000 | 00000000000000000047 + 063 | 19.05255888325765 | 363.0000000000000000 | 00000000000000000063 + 076 | 26 | 676.0000000000000000 | 00000000000000000076 + 041 | 11.874342087037917 | 141.0000000000000000 | 00000000000000000041 + 012 | 30.199337741083 | 912.0000000000000000 | 00000000000000000012 + 090 | 22.135943621178654 | 490.0000000000000000 | 00000000000000000090 + 056 | 7.483314773547883 | 56.0000000000000000 | 00000000000000000056 + 055 | 23.558437978779494 | 555.0000000000000000 | 00000000000000000055 + 070 | 8.366600265340756 | 70.0000000000000000 | 00000000000000000070 + 099 | 24.474476501040833 | 599.0000000000000000 | 00000000000000000099 + 013 | 10.63014581273465 | 113.0000000000000000 | 00000000000000000013 + 008 | 2.8284271247461903 | 8.0000000000000000 | 00000000000000000008 + 011 | 20.273134932713294 | 411.0000000000000000 | 00000000000000000011 + 087 | 29.782545223670862 | 887.0000000000000000 | 00000000000000000087 + 067 | 27.694764848252458 | 767.0000000000000000 | 00000000000000000067 + 000 | 24.49489742783178 | 600.0000000000000000 | 00000000000000000000 + 081 | 21.93171219946131 | 481.0000000000000000 | 00000000000000000081 + 042 | 21.02379604162864 | 442.0000000000000000 | 00000000000000000042 + 051 | 7.14142842854285 | 51.0000000000000000 | 00000000000000000051 + 096 | 31.559467676119 | 996.0000000000000000 | 00000000000000000096 + 017 | 26.77685567799177 | 717.0000000000000000 | 00000000000000000017 + 040 | 15.491933384829668 | 240.0000000000000000 | 00000000000000000040 + 081 | 27.94637722496424 | 781.0000000000000000 | 00000000000000000081 + 062 | 27.60434748368452 | 762.0000000000000000 | 00000000000000000062 + 042 | 25.337718918639855 | 642.0000000000000000 | 00000000000000000042 + 031 | 18.193405398660254 | 331.0000000000000000 | 00000000000000000031 + 048 | 15.748015748023622 | 248.0000000000000000 | 00000000000000000048 + 004 | 14.2828568570857 | 204.0000000000000000 | 00000000000000000004 + 018 | 4.242640687119285 | 18.0000000000000000 | 00000000000000000018 + 008 | 30.133038346638727 | 908.0000000000000000 | 00000000000000000008 + 093 | 13.892443989449804 | 193.0000000000000000 | 00000000000000000093 + 057 | 16.0312195418814 | 257.0000000000000000 | 00000000000000000057 + 077 | 26.019223662515376 | 677.0000000000000000 | 00000000000000000077 + 036 | 15.362291495737216 | 236.0000000000000000 | 00000000000000000036 + 020 | 24.899799195977465 | 620.0000000000000000 | 00000000000000000020 + 076 | 27.85677655436824 | 776.0000000000000000 | 00000000000000000076 + 046 | 27.313000567495326 | 746.0000000000000000 | 00000000000000000046 + 071 | 31.160872901765767 | 971.0000000000000000 | 00000000000000000071 + 067 | 29.444863728670914 | 867.0000000000000000 | 00000000000000000067 + 024 | 30.397368307141328 | 924.0000000000000000 | 00000000000000000024 + 031 | 28.827070610799147 | 831.0000000000000000 | 00000000000000000031 + 071 | 19.261360284258224 | 371.0000000000000000 | 00000000000000000071 + 053 | 30.870698080866262 | 953.0000000000000000 | 00000000000000000053 + 099 | 19.974984355438178 | 399.0000000000000000 | 00000000000000000099 + 019 | 30.315012782448235 | 919.0000000000000000 | 00000000000000000019 + 048 | 23.40939982143925 | 548.0000000000000000 | 00000000000000000048 + 027 | 28.75760768909681 | 827.0000000000000000 | 00000000000000000027 + 022 | 22.847319317591726 | 522.0000000000000000 | 00000000000000000022 + 020 | 14.832396974191326 | 220.0000000000000000 | 00000000000000000020 + 053 | 27.440845468024488 | 753.0000000000000000 | 00000000000000000053 + 048 | 25.45584412271571 | 648.0000000000000000 | 00000000000000000048 + 009 | 28.442925306655784 | 809.0000000000000000 | 00000000000000000009 + 022 | 20.54263858417414 | 422.0000000000000000 | 00000000000000000022 + 080 | 13.416407864998739 | 180.0000000000000000 | 00000000000000000080 + 074 | 21.77154105707724 | 474.0000000000000000 | 00000000000000000074 + 093 | 17.11724276862369 | 293.0000000000000000 | 00000000000000000093 + 074 | 8.602325267042627 | 74.0000000000000000 | 00000000000000000074 + 010 | 3.1622776601683795 | 10.0000000000000000 | 00000000000000000010 + 004 | 30.066592756745816 | 904.0000000000000000 | 00000000000000000004 + 067 | 25.826343140289914 | 667.0000000000000000 | 00000000000000000067 + 034 | 18.275666882497067 | 334.0000000000000000 | 00000000000000000034 + 015 | 3.872983346207417 | 15.0000000000000000 | 00000000000000000015 + 030 | 11.40175425099138 | 130.0000000000000000 | 00000000000000000030 + 023 | 11.090536506409418 | 123.0000000000000000 | 00000000000000000023 + 020 | 10.954451150103322 | 120.0000000000000000 | 00000000000000000020 + 097 | 9.848857801796104 | 97.0000000000000000 | 00000000000000000097 + 034 | 5.830951894845301 | 34.0000000000000000 | 00000000000000000034 + 062 | 31.016124838541646 | 962.0000000000000000 | 00000000000000000062 + 079 | 29.647934160747187 | 879.0000000000000000 | 00000000000000000079 + 023 | 30.380915061926625 | 923.0000000000000000 | 00000000000000000023 + 037 | 30.610455730027933 | 937.0000000000000000 | 00000000000000000037 + 046 | 12.083045973594572 | 146.0000000000000000 | 00000000000000000046 + 009 | 24.677925358506133 | 609.0000000000000000 | 00000000000000000009 + 040 | 6.324555320336759 | 40.0000000000000000 | 00000000000000000040 + 051 | 30.83828789021855 | 951.0000000000000000 | 00000000000000000051 + 084 | 13.564659966250536 | 184.0000000000000000 | 00000000000000000084 + 059 | 30.967725134404045 | 959.0000000000000000 | 00000000000000000059 + 067 | 16.34013463836819 | 267.0000000000000000 | 00000000000000000067 + 070 | 25.88435821108957 | 670.0000000000000000 | 00000000000000000070 + 025 | 22.9128784747792 | 525.0000000000000000 | 00000000000000000025 + 058 | 21.400934559032695 | 458.0000000000000000 | 00000000000000000058 + 043 | 15.588457268119896 | 243.0000000000000000 | 00000000000000000043 + 044 | 6.6332495807108 | 44.0000000000000000 | 00000000000000000044 + 010 | 24.698178070456937 | 610.0000000000000000 | 00000000000000000010 + 094 | 13.92838827718412 | 194.0000000000000000 | 00000000000000000094 + 036 | 11.661903789690601 | 136.0000000000000000 | 00000000000000000036 + 037 | 15.394804318340652 | 237.0000000000000000 | 00000000000000000037 + 026 | 20.639767440550294 | 426.0000000000000000 | 00000000000000000026 + 076 | 21.817424229271428 | 476.0000000000000000 | 00000000000000000076 + 010 | 14.491376746189438 | 210.0000000000000000 | 00000000000000000010 + 058 | 18.920887928424502 | 358.0000000000000000 | 00000000000000000058 + 099 | 9.9498743710662 | 99.0000000000000000 | 00000000000000000099 + 050 | 30.822070014844883 | 950.0000000000000000 | 00000000000000000050 + 017 | 28.583211855912904 | 817.0000000000000000 | 00000000000000000017 + 041 | 25.317977802344327 | 641.0000000000000000 | 00000000000000000041 + 056 | 30.919249667480614 | 956.0000000000000000 | 00000000000000000056 + 088 | 31.432467291003423 | 988.0000000000000000 | 00000000000000000088 + 086 | 29.765752132274432 | 886.0000000000000000 | 00000000000000000086 + 076 | 19.390719429665317 | 376.0000000000000000 | 00000000000000000076 + 005 | 17.46424919657298 | 305.0000000000000000 | 00000000000000000005 + 087 | 24.228082879171435 | 587.0000000000000000 | 00000000000000000087 + 006 | 22.494443758403985 | 506.0000000000000000 | 00000000000000000006 + 087 | 13.674794331177344 | 187.0000000000000000 | 00000000000000000087 + 090 | 28.106938645110393 | 790.0000000000000000 | 00000000000000000090 + 060 | 23.664319132398465 | 560.0000000000000000 | 00000000000000000060 + 003 | 30.04995840263344 | 903.0000000000000000 | 00000000000000000003 + 060 | 29.32575659723036 | 860.0000000000000000 | 00000000000000000060 + 007 | 26.589471600616662 | 707.0000000000000000 | 00000000000000000007 + 089 | 13.74772708486752 | 189.0000000000000000 | 00000000000000000089 + 003 | 10.14889156509222 | 103.0000000000000000 | 00000000000000000003 + 074 | 13.19090595827292 | 174.0000000000000000 | 00000000000000000074 + 006 | 24.61706725018234 | 606.0000000000000000 | 00000000000000000006 + 031 | 11.445523142259598 | 131.0000000000000000 | 00000000000000000031 + 092 | 19.79898987322333 | 392.0000000000000000 | 00000000000000000092 + 039 | 30.643106892089126 | 939.0000000000000000 | 00000000000000000039 + 014 | 28.53068523537421 | 814.0000000000000000 | 00000000000000000014 + 002 | 26.49528259898354 | 702.0000000000000000 | 00000000000000000002 + 056 | 21.354156504062622 | 456.0000000000000000 | 00000000000000000056 + 048 | 27.349588662354687 | 748.0000000000000000 | 00000000000000000048 + 026 | 22.93468988235943 | 526.0000000000000000 | 00000000000000000026 + 074 | 16.55294535724685 | 274.0000000000000000 | 00000000000000000074 + 096 | 22.271057451320086 | 496.0000000000000000 | 00000000000000000096 + 052 | 27.422618401604176 | 752.0000000000000000 | 00000000000000000052 + 015 | 22.693611435820433 | 515.0000000000000000 | 00000000000000000015 + 033 | 20.808652046684813 | 433.0000000000000000 | 00000000000000000033 + 012 | 3.4641016151377544 | 12.0000000000000000 | 00000000000000000012 + 096 | 28.21347195933177 | 796.0000000000000000 | 00000000000000000096 + 069 | 16.401219466856727 | 269.0000000000000000 | 00000000000000000069 + 061 | 19 | 361.0000000000000000 | 00000000000000000061 + 092 | 22.181073012818835 | 492.0000000000000000 | 00000000000000000092 + 065 | 8.06225774829855 | 65.0000000000000000 | 00000000000000000065 + 051 | 29.171904291629644 | 851.0000000000000000 | 00000000000000000051 + 000 | 31.622776601683793 | 1000.0000000000000000 | 00000000000000000000 + 025 | 20.615528128088304 | 425.0000000000000000 | 00000000000000000025 + 039 | 18.411952639521967 | 339.0000000000000000 | 00000000000000000039 + 000 | 22.360679774997898 | 500.0000000000000000 | 00000000000000000000 + 086 | 31.400636936215164 | 986.0000000000000000 | 00000000000000000086 + 075 | 21.79449471770337 | 475.0000000000000000 | 00000000000000000075 + 002 | 30.033314835362415 | 902.0000000000000000 | 00000000000000000002 + 084 | 26.153393661244042 | 684.0000000000000000 | 00000000000000000084 + 001 | 24.515301344262525 | 601.0000000000000000 | 00000000000000000001 + 071 | 13.076696830622021 | 171.0000000000000000 | 00000000000000000071 + 079 | 26.057628441590765 | 679.0000000000000000 | 00000000000000000079 + 083 | 24.145392935299274 | 583.0000000000000000 | 00000000000000000083 + 085 | 22.02271554554524 | 485.0000000000000000 | 00000000000000000085 + 086 | 26.19160170741759 | 686.0000000000000000 | 00000000000000000086 + 068 | 8.246211251235321 | 68.0000000000000000 | 00000000000000000068 + 092 | 29.866369046136157 | 892.0000000000000000 | 00000000000000000092 + 085 | 31.38470965295043 | 985.0000000000000000 | 00000000000000000085 + 030 | 18.16590212458495 | 330.0000000000000000 | 00000000000000000030 + 040 | 30.659419433511783 | 940.0000000000000000 | 00000000000000000040 + 075 | 29.58039891549808 | 875.0000000000000000 | 00000000000000000075 + 049 | 27.367864366808018 | 749.0000000000000000 | 00000000000000000049 + 004 | 10.198039027185569 | 104.0000000000000000 | 00000000000000000004 + 021 | 17.916472867168917 | 321.0000000000000000 | 00000000000000000021 + 061 | 16.15549442140351 | 261.0000000000000000 | 00000000000000000061 + 022 | 17.944358444926362 | 322.0000000000000000 | 00000000000000000022 + 099 | 17.291616465790582 | 299.0000000000000000 | 00000000000000000099 + 049 | 29.13760456866693 | 849.0000000000000000 | 00000000000000000049 + 066 | 19.131126469708992 | 366.0000000000000000 | 00000000000000000066 + 005 | 24.596747752497688 | 605.0000000000000000 | 00000000000000000005 + 002 | 22.40535650240808 | 502.0000000000000000 | 00000000000000000002 + 043 | 21.047565179849187 | 443.0000000000000000 | 00000000000000000043 + 056 | 18.867962264113206 | 356.0000000000000000 | 00000000000000000056 + 090 | 9.486832980505138 | 90.0000000000000000 | 00000000000000000090 + 008 | 22.538855339169288 | 508.0000000000000000 | 00000000000000000008 + 072 | 29.5296461204668 | 872.0000000000000000 | 00000000000000000072 + 023 | 26.888659319497503 | 723.0000000000000000 | 00000000000000000023 + 096 | 29.93325909419153 | 896.0000000000000000 | 00000000000000000096 + 087 | 16.941074346097416 | 287.0000000000000000 | 00000000000000000087 + 003 | 14.247806848775006 | 203.0000000000000000 | 00000000000000000003 + 078 | 27.892651361962706 | 778.0000000000000000 | 00000000000000000078 + 056 | 16 | 256.0000000000000000 | 00000000000000000056 + 062 | 12.727922061357855 | 162.0000000000000000 | 00000000000000000062 + 043 | 11.958260743101398 | 143.0000000000000000 | 00000000000000000043 + 086 | 16.911534525287763 | 286.0000000000000000 | 00000000000000000086 + 068 | 16.3707055437449 | 268.0000000000000000 | 00000000000000000068 + 028 | 22.978250586152114 | 528.0000000000000000 | 00000000000000000028 + 034 | 27.09243436828813 | 734.0000000000000000 | 00000000000000000034 + 061 | 31 | 961.0000000000000000 | 00000000000000000061 + 039 | 15.459624833740307 | 239.0000000000000000 | 00000000000000000039 + 059 | 21.42428528562855 | 459.0000000000000000 | 00000000000000000059 + 039 | 20.952326839756964 | 439.0000000000000000 | 00000000000000000039 + 029 | 28.792360097775937 | 829.0000000000000000 | 00000000000000000029 + 011 | 26.664583251946766 | 711.0000000000000000 | 00000000000000000011 + 063 | 16.217274740226856 | 263.0000000000000000 | 00000000000000000063 + 029 | 5.385164807134504 | 29.0000000000000000 | 00000000000000000029 + 015 | 24.79919353527449 | 615.0000000000000000 | 00000000000000000015 + 007 | 28.407745422683583 | 807.0000000000000000 | 00000000000000000007 + 085 | 26.1725046566048 | 685.0000000000000000 | 00000000000000000085 + 098 | 17.26267650163207 | 298.0000000000000000 | 00000000000000000098 + 072 | 25.92296279363144 | 672.0000000000000000 | 00000000000000000072 + 001 | 14.177446878757825 | 201.0000000000000000 | 00000000000000000001 + 015 | 10.723805294763608 | 115.0000000000000000 | 00000000000000000015 + 097 | 31.575306807693888 | 997.0000000000000000 | 00000000000000000097 + 071 | 25.903667693977237 | 671.0000000000000000 | 00000000000000000071 + 064 | 19.078784028338912 | 364.0000000000000000 | 00000000000000000064 + 017 | 30.28200785945344 | 917.0000000000000000 | 00000000000000000017 + 076 | 13.2664991614216 | 176.0000000000000000 | 00000000000000000076 + 027 | 15.066519173319364 | 227.0000000000000000 | 00000000000000000027 + 050 | 23.45207879911715 | 550.0000000000000000 | 00000000000000000050 + 055 | 18.841443681416774 | 355.0000000000000000 | 00000000000000000055 + 093 | 28.160255680657446 | 793.0000000000000000 | 00000000000000000093 + 079 | 13.379088160259652 | 179.0000000000000000 | 00000000000000000079 + 038 | 6.164414002968976 | 38.0000000000000000 | 00000000000000000038 + 098 | 29.966648127543394 | 898.0000000000000000 | 00000000000000000098 + 012 | 14.560219778561036 | 212.0000000000000000 | 00000000000000000012 + 032 | 20.784609690826528 | 432.0000000000000000 | 00000000000000000032 + 011 | 17.635192088548397 | 311.0000000000000000 | 00000000000000000011 + 085 | 9.219544457292887 | 85.0000000000000000 | 00000000000000000085 + 045 | 29.068883707497267 | 845.0000000000000000 | 00000000000000000045 + 047 | 21.142374511865974 | 447.0000000000000000 | 00000000000000000047 + 034 | 20.83266665599966 | 434.0000000000000000 | 00000000000000000034 + 011 | 24.71841418861655 | 611.0000000000000000 | 00000000000000000011 + 020 | 28.635642126552707 | 820.0000000000000000 | 00000000000000000020 + 079 | 31.28897569432403 | 979.0000000000000000 | 00000000000000000079 + 024 | 22.891046284519195 | 524.0000000000000000 | 00000000000000000024 + 070 | 23.874672772626646 | 570.0000000000000000 | 00000000000000000070 + 041 | 27.2213151776324 | 741.0000000000000000 | 00000000000000000041 + 067 | 8.18535277187245 | 67.0000000000000000 | 00000000000000000067 + 057 | 27.51363298439521 | 757.0000000000000000 | 00000000000000000057 + 009 | 20.223748416156685 | 409.0000000000000000 | 00000000000000000009 + 069 | 31.12876483254676 | 969.0000000000000000 | 00000000000000000069 + 012 | 26.68332812825267 | 712.0000000000000000 | 00000000000000000012 + 041 | 30.675723300355934 | 941.0000000000000000 | 00000000000000000041 + 003 | 28.337254630609507 | 803.0000000000000000 | 00000000000000000003 + 003 | 22.427661492005804 | 503.0000000000000000 | 00000000000000000003 + 081 | 13.45362404707371 | 181.0000000000000000 | 00000000000000000081 + 016 | 10.770329614269007 | 116.0000000000000000 | 00000000000000000016 + 094 | 17.146428199482248 | 294.0000000000000000 | 00000000000000000094 + 016 | 4 | 16.0000000000000000 | 00000000000000000016 + 070 | 13.038404810405298 | 170.0000000000000000 | 00000000000000000070 + 044 | 12 | 144.0000000000000000 | 00000000000000000044 + 098 | 19.949937343260004 | 398.0000000000000000 | 00000000000000000098 + 096 | 14 | 196.0000000000000000 | 00000000000000000096 + 099 | 14.106735979665885 | 199.0000000000000000 | 00000000000000000099 + 068 | 31.11269837220809 | 968.0000000000000000 | 00000000000000000068 + 077 | 24.020824298928627 | 577.0000000000000000 | 00000000000000000077 + 046 | 21.118712081942874 | 446.0000000000000000 | 00000000000000000046 + 082 | 27.964262908219126 | 782.0000000000000000 | 00000000000000000082 + 019 | 26.814175355583846 | 719.0000000000000000 | 00000000000000000019 + 005 | 14.317821063276353 | 205.0000000000000000 | 00000000000000000005 + 064 | 25.768197453450252 | 664.0000000000000000 | 00000000000000000064 + 040 | 23.2379000772445 | 540.0000000000000000 | 00000000000000000040 + 070 | 31.144823004794873 | 970.0000000000000000 | 00000000000000000070 + 032 | 27.055498516937366 | 732.0000000000000000 | 00000000000000000032 + 097 | 17.233687939614086 | 297.0000000000000000 | 00000000000000000097 + 099 | 29.9833287011299 | 899.0000000000000000 | 00000000000000000099 + 086 | 24.20743687382041 | 586.0000000000000000 | 00000000000000000086 + 077 | 19.4164878389476 | 377.0000000000000000 | 00000000000000000077 + 031 | 23.043437243605826 | 531.0000000000000000 | 00000000000000000031 + 054 | 29.223278392404914 | 854.0000000000000000 | 00000000000000000054 + 000 | 20 | 400.0000000000000000 | 00000000000000000000 + 057 | 18.894443627691185 | 357.0000000000000000 | 00000000000000000057 + 060 | 12.649110640673518 | 160.0000000000000000 | 00000000000000000060 + 040 | 27.202941017470888 | 740.0000000000000000 | 00000000000000000040 + 069 | 21.656407827707714 | 469.0000000000000000 | 00000000000000000069 + 079 | 8.888194417315589 | 79.0000000000000000 | 00000000000000000079 + 094 | 31.52776554086889 | 994.0000000000000000 | 00000000000000000094 + 009 | 26.627053911388696 | 709.0000000000000000 | 00000000000000000009 + 015 | 14.66287829861518 | 215.0000000000000000 | 00000000000000000015 + 092 | 28.142494558940577 | 792.0000000000000000 | 00000000000000000092 + 066 | 21.587033144922902 | 466.0000000000000000 | 00000000000000000066 + 008 | 28.42534080710379 | 808.0000000000000000 | 00000000000000000008 + 075 | 27.83882181415011 | 775.0000000000000000 | 00000000000000000075 + 043 | 29.03446228191595 | 843.0000000000000000 | 00000000000000000043 + 084 | 24.166091947189145 | 584.0000000000000000 | 00000000000000000084 + 064 | 12.806248474865697 | 164.0000000000000000 | 00000000000000000064 + 006 | 28.39013913315678 | 806.0000000000000000 | 00000000000000000006 + 094 | 26.343879744638983 | 694.0000000000000000 | 00000000000000000094 + 010 | 17.60681686165901 | 310.0000000000000000 | 00000000000000000010 + 040 | 25.298221281347036 | 640.0000000000000000 | 00000000000000000040 + 074 | 29.563490998188964 | 874.0000000000000000 | 00000000000000000074 + 015 | 26.739483914241877 | 715.0000000000000000 | 00000000000000000015 + 016 | 22.715633383201094 | 516.0000000000000000 | 00000000000000000016 + 040 | 11.832159566199232 | 140.0000000000000000 | 00000000000000000040 + 009 | 17.578395831246947 | 309.0000000000000000 | 00000000000000000009 + 032 | 23.065125189341593 | 532.0000000000000000 | 00000000000000000032 + 042 | 27.23967694375247 | 742.0000000000000000 | 00000000000000000042 + 053 | 7.280109889280518 | 53.0000000000000000 | 00000000000000000053 + 069 | 19.209372712298546 | 369.0000000000000000 | 00000000000000000069 + 093 | 22.20360331117452 | 493.0000000000000000 | 00000000000000000093 + 014 | 10.677078252031311 | 114.0000000000000000 | 00000000000000000014 + 007 | 20.174241001832016 | 407.0000000000000000 | 00000000000000000007 + 031 | 5.5677643628300215 | 31.0000000000000000 | 00000000000000000031 + 018 | 14.7648230602334 | 218.0000000000000000 | 00000000000000000018 + 095 | 26.362852652928137 | 695.0000000000000000 | 00000000000000000095 + 062 | 16.186414056238647 | 262.0000000000000000 | 00000000000000000062 + 082 | 29.698484809834994 | 882.0000000000000000 | 00000000000000000082 + 011 | 22.60530911091463 | 511.0000000000000000 | 00000000000000000011 + 049 | 21.18962010041709 | 449.0000000000000000 | 00000000000000000049 + 076 | 31.240998703626616 | 976.0000000000000000 | 00000000000000000076 + 035 | 28.89636655359978 | 835.0000000000000000 | 00000000000000000035 + 085 | 16.881943016134134 | 285.0000000000000000 | 00000000000000000085 + 095 | 17.175564037317667 | 295.0000000000000000 | 00000000000000000095 + 013 | 26.70205984563738 | 713.0000000000000000 | 00000000000000000013 + 048 | 30.789608636681304 | 948.0000000000000000 | 00000000000000000048 + 007 | 10.344080432788601 | 107.0000000000000000 | 00000000000000000007 + 022 | 28.6705423736629 | 822.0000000000000000 | 00000000000000000022 + 075 | 8.660254037844387 | 75.0000000000000000 | 00000000000000000075 + 098 | 31.591137997862628 | 998.0000000000000000 | 00000000000000000098 + 021 | 11 | 121.0000000000000000 | 00000000000000000021 + 012 | 24.73863375370596 | 612.0000000000000000 | 00000000000000000012 + 050 | 15.811388300841896 | 250.0000000000000000 | 00000000000000000050 + 069 | 13 | 169.0000000000000000 | 00000000000000000069 + 038 | 25.25866188063018 | 638.0000000000000000 | 00000000000000000038 + 033 | 25.15949125081825 | 633.0000000000000000 | 00000000000000000033 + 000 | 17.320508075688775 | 300.0000000000000000 | 00000000000000000000 + 035 | 18.303005217723125 | 335.0000000000000000 | 00000000000000000035 + 012 | 10.583005244258363 | 112.0000000000000000 | 00000000000000000012 + 061 | 25.709920264364882 | 661.0000000000000000 | 00000000000000000061 + 028 | 5.291502622129181 | 28.0000000000000000 | 00000000000000000028 + 069 | 8.306623862918075 | 69.0000000000000000 | 00000000000000000069 + 070 | 27.748873851023216 | 770.0000000000000000 | 00000000000000000070 + 024 | 20.591260281974 | 424.0000000000000000 | 00000000000000000024 + 068 | 21.633307652783937 | 468.0000000000000000 | 00000000000000000068 + 021 | 24.919871588754223 | 621.0000000000000000 | 00000000000000000021 + 073 | 27.80287754891569 | 773.0000000000000000 | 00000000000000000073 + 068 | 12.96148139681572 | 168.0000000000000000 | 00000000000000000068 + 095 | 13.96424004376894 | 195.0000000000000000 | 00000000000000000095 + 054 | 12.409673645990857 | 154.0000000000000000 | 00000000000000000054 + 090 | 29.832867780352597 | 890.0000000000000000 | 00000000000000000090 + 082 | 19.544820285692065 | 382.0000000000000000 | 00000000000000000082 + 071 | 23.895606290697042 | 571.0000000000000000 | 00000000000000000071 + 066 | 27.676705006196094 | 766.0000000000000000 | 00000000000000000066 + 060 | 16.1245154965971 | 260.0000000000000000 | 00000000000000000060 + 013 | 14.594519519326424 | 213.0000000000000000 | 00000000000000000013 + 017 | 24.839484696748443 | 617.0000000000000000 | 00000000000000000017 + 069 | 29.478805945967352 | 869.0000000000000000 | 00000000000000000069 + 064 | 27.640549922170507 | 764.0000000000000000 | 00000000000000000064 + 055 | 25.592967784139454 | 655.0000000000000000 | 00000000000000000055 + 078 | 16.673332000533065 | 278.0000000000000000 | 00000000000000000078 + 030 | 15.165750888103101 | 230.0000000000000000 | 00000000000000000030 + 094 | 29.899832775452108 | 894.0000000000000000 | 00000000000000000094 + 008 | 20.199009876724155 | 408.0000000000000000 | 00000000000000000008 + 084 | 22 | 484.0000000000000000 | 00000000000000000084 + 079 | 19.467922333931785 | 379.0000000000000000 | 00000000000000000079 + 072 | 8.48528137423857 | 72.0000000000000000 | 00000000000000000072 + 023 | 20.566963801203133 | 423.0000000000000000 | 00000000000000000023 + 052 | 15.874507866387544 | 252.0000000000000000 | 00000000000000000052 + 057 | 7.54983443527075 | 57.0000000000000000 | 00000000000000000057 + 047 | 6.855654600401044 | 47.0000000000000000 | 00000000000000000047 + 025 | 25 | 625.0000000000000000 | 00000000000000000025 + 023 | 22.869193252058544 | 523.0000000000000000 | 00000000000000000023 + 038 | 30.62678566222711 | 938.0000000000000000 | 00000000000000000038 + 019 | 24.879710609249457 | 619.0000000000000000 | 00000000000000000019 + 064 | 21.540659228538015 | 464.0000000000000000 | 00000000000000000064 + 093 | 31.51190251317746 | 993.0000000000000000 | 00000000000000000093 + 043 | 25.357444666211933 | 643.0000000000000000 | 00000000000000000043 + 087 | 19.672315572906 | 387.0000000000000000 | 00000000000000000087 + 019 | 17.86057109949175 | 319.0000000000000000 | 00000000000000000019 + 048 | 6.928203230275509 | 48.0000000000000000 | 00000000000000000048 + 093 | 29.88310559496787 | 893.0000000000000000 | 00000000000000000093 + 059 | 25.67099530598687 | 659.0000000000000000 | 00000000000000000059 + 001 | 17.349351572897472 | 301.0000000000000000 | 00000000000000000001 + 065 | 19.1049731745428 | 365.0000000000000000 | 00000000000000000065 + 004 | 28.35489375751565 | 804.0000000000000000 | 00000000000000000004 + 049 | 30.805843601498726 | 949.0000000000000000 | 00000000000000000049 + 015 | 30.24896692450835 | 915.0000000000000000 | 00000000000000000015 + 056 | 29.257477676655586 | 856.0000000000000000 | 00000000000000000056 + 057 | 25.632011235952593 | 657.0000000000000000 | 00000000000000000057 + 002 | 20.049937655763422 | 402.0000000000000000 | 00000000000000000002 + 088 | 26.229754097208 | 688.0000000000000000 | 00000000000000000088 + 077 | 29.614185789921695 | 877.0000000000000000 | 00000000000000000077 + 045 | 21.095023109728988 | 445.0000000000000000 | 00000000000000000045 + 010 | 10.488088481701515 | 110.0000000000000000 | 00000000000000000010 + 091 | 9.539392014169456 | 91.0000000000000000 | 00000000000000000091 + 045 | 12.041594578792296 | 145.0000000000000000 | 00000000000000000045 + 081 | 19.519221295943137 | 381.0000000000000000 | 00000000000000000081 + 098 | 9.899494936611665 | 98.0000000000000000 | 00000000000000000098 + 077 | 16.64331697709324 | 277.0000000000000000 | 00000000000000000077 + 056 | 23.57965224510319 | 556.0000000000000000 | 00000000000000000056 + 026 | 15.033296378372908 | 226.0000000000000000 | 00000000000000000026 + 012 | 22.627416997969522 | 512.0000000000000000 | 00000000000000000012 + 056 | 12.489995996796797 | 156.0000000000000000 | 00000000000000000056 + 003 | 24.55605831561735 | 603.0000000000000000 | 00000000000000000003 + 014 | 20.346989949375804 | 414.0000000000000000 | 00000000000000000014 + 065 | 16.278820596099706 | 265.0000000000000000 | 00000000000000000065 + 094 | 24.372115213907882 | 594.0000000000000000 | 00000000000000000094 + 000 | 14.142135623730951 | 200.0000000000000000 | 00000000000000000000 + 025 | 26.92582403567252 | 725.0000000000000000 | 00000000000000000025 + 058 | 12.569805089976535 | 158.0000000000000000 | 00000000000000000058 + 047 | 12.12435565298214 | 147.0000000000000000 | 00000000000000000047 + 044 | 25.37715508089904 | 644.0000000000000000 | 00000000000000000044 + 053 | 29.206163733020468 | 853.0000000000000000 | 00000000000000000053 + 021 | 28.653097563788805 | 821.0000000000000000 | 00000000000000000021 + 091 | 22.15851980616034 | 491.0000000000000000 | 00000000000000000091 + 080 | 26.076809620810597 | 680.0000000000000000 | 00000000000000000080 + 018 | 20.445048300260872 | 418.0000000000000000 | 00000000000000000018 + 029 | 18.138357147217054 | 329.0000000000000000 | 00000000000000000029 + 030 | 25.099800796022265 | 630.0000000000000000 | 00000000000000000030 + 043 | 18.520259177452136 | 343.0000000000000000 | 00000000000000000043 + 052 | 7.211102550927978 | 52.0000000000000000 | 00000000000000000052 + 089 | 29.816103031751148 | 889.0000000000000000 | 00000000000000000089 + 060 | 7.745966692414834 | 60.0000000000000000 | 00000000000000000060 + 024 | 14.966629547095765 | 224.0000000000000000 | 00000000000000000024 + 032 | 18.2208671582886 | 332.0000000000000000 | 00000000000000000032 + 060 | 30.983866769659336 | 960.0000000000000000 | 00000000000000000060 + 066 | 23.790754506740637 | 566.0000000000000000 | 00000000000000000066 + 073 | 21.748563170931547 | 473.0000000000000000 | 00000000000000000073 + 045 | 6.708203932499369 | 45.0000000000000000 | 00000000000000000045 + 065 | 29.410882339705484 | 865.0000000000000000 | 00000000000000000065 + 006 | 20.149441679609886 | 406.0000000000000000 | 00000000000000000006 + 052 | 30.854497241083024 | 952.0000000000000000 | 00000000000000000052 + 044 | 30.72458299147443 | 944.0000000000000000 | 00000000000000000044 + 027 | 30.44667469527666 | 927.0000000000000000 | 00000000000000000027 + 077 | 27.874719729532707 | 777.0000000000000000 | 00000000000000000077 + 034 | 23.108440016582687 | 534.0000000000000000 | 00000000000000000034 + 079 | 27.910571473905726 | 779.0000000000000000 | 00000000000000000079 + 099 | 28.26658805020514 | 799.0000000000000000 | 00000000000000000099 + 039 | 25.278449319529077 | 639.0000000000000000 | 00000000000000000039 + 044 | 15.620499351813308 | 244.0000000000000000 | 00000000000000000044 + 032 | 30.528675044947494 | 932.0000000000000000 | 00000000000000000032 + 052 | 29.189039038652847 | 852.0000000000000000 | 00000000000000000052 + 061 | 27.586228448267445 | 761.0000000000000000 | 00000000000000000061 + 037 | 27.147743920996454 | 737.0000000000000000 | 00000000000000000037 + 050 | 7.0710678118654755 | 50.0000000000000000 | 00000000000000000050 + 042 | 11.916375287812984 | 142.0000000000000000 | 00000000000000000042 + 091 | 31.480152477394387 | 991.0000000000000000 | 00000000000000000091 + 033 | 5.744562646538029 | 33.0000000000000000 | 00000000000000000033 + 091 | 28.124722220850465 | 791.0000000000000000 | 00000000000000000091 + 002 | 24.535688292770594 | 602.0000000000000000 | 00000000000000000002 + 095 | 19.87460691435179 | 395.0000000000000000 | 00000000000000000095 + 087 | 22.06807649071391 | 487.0000000000000000 | 00000000000000000087 + 092 | 9.591663046625438 | 92.0000000000000000 | 00000000000000000092 + 073 | 16.522711641858304 | 273.0000000000000000 | 00000000000000000073 + 037 | 28.930952282978865 | 837.0000000000000000 | 00000000000000000037 + 069 | 25.865034312755125 | 669.0000000000000000 | 00000000000000000069 + 054 | 30.886890422961002 | 954.0000000000000000 | 00000000000000000054 + 035 | 23.130067012440755 | 535.0000000000000000 | 00000000000000000035 + 063 | 21.517434791350013 | 463.0000000000000000 | 00000000000000000063 + 076 | 29.597297173897484 | 876.0000000000000000 | 00000000000000000076 + 044 | 23.323807579381203 | 544.0000000000000000 | 00000000000000000044 + 033 | 28.861739379323623 | 833.0000000000000000 | 00000000000000000033 + 030 | 28.809720581775867 | 830.0000000000000000 | 00000000000000000030 + 027 | 26.962937525425527 | 727.0000000000000000 | 00000000000000000027 + 022 | 11.045361017187261 | 122.0000000000000000 | 00000000000000000022 + 088 | 29.79932885150268 | 888.0000000000000000 | 00000000000000000088 + 082 | 13.490737563232042 | 182.0000000000000000 | 00000000000000000082 + 074 | 19.339079605813716 | 374.0000000000000000 | 00000000000000000074 + 075 | 13.228756555322953 | 175.0000000000000000 | 00000000000000000075 + 015 | 28.548204847240395 | 815.0000000000000000 | 00000000000000000015 + 018 | 10.862780491200215 | 118.0000000000000000 | 00000000000000000018 + 043 | 27.258026340878022 | 743.0000000000000000 | 00000000000000000043 + 052 | 25.534290669607408 | 652.0000000000000000 | 00000000000000000052 + 065 | 25.787593916455254 | 665.0000000000000000 | 00000000000000000065 + 055 | 15.968719422671311 | 255.0000000000000000 | 00000000000000000055 + 027 | 20.663978319771825 | 427.0000000000000000 | 00000000000000000027 + 018 | 26.795522013948524 | 718.0000000000000000 | 00000000000000000018 + 001 | 28.30194339616981 | 801.0000000000000000 | 00000000000000000001 + 002 | 10.099504938362077 | 102.0000000000000000 | 00000000000000000002 + 078 | 21.863211109075447 | 478.0000000000000000 | 00000000000000000078 + 002 | 1.4142135623730951 | 2.0000000000000000 | 00000000000000000002 + 014 | 30.23243291566195 | 914.0000000000000000 | 00000000000000000014 + 063 | 12.767145334803704 | 163.0000000000000000 | 00000000000000000063 + 097 | 26.40075756488817 | 697.0000000000000000 | 00000000000000000097 + 032 | 11.489125293076057 | 132.0000000000000000 | 00000000000000000032 + 013 | 17.69180601295413 | 313.0000000000000000 | 00000000000000000013 + 090 | 24.289915602982237 | 590.0000000000000000 | 00000000000000000090 + 041 | 29 | 841.0000000000000000 | 00000000000000000041 + 022 | 24.939927826679853 | 622.0000000000000000 | 00000000000000000022 + 037 | 11.704699910719626 | 137.0000000000000000 | 00000000000000000037 + 036 | 28.91366458960192 | 836.0000000000000000 | 00000000000000000036 + 024 | 24.979991993593593 | 624.0000000000000000 | 00000000000000000024 + 097 | 28.231188426986208 | 797.0000000000000000 | 00000000000000000097 + 050 | 21.213203435596427 | 450.0000000000000000 | 00000000000000000050 + 077 | 13.30413469565007 | 177.0000000000000000 | 00000000000000000077 + 036 | 27.129319932501073 | 736.0000000000000000 | 00000000000000000036 + 045 | 30.740852297878796 | 945.0000000000000000 | 00000000000000000045 + 009 | 22.561028345356956 | 509.0000000000000000 | 00000000000000000009 + 067 | 31.096623610932426 | 967.0000000000000000 | 00000000000000000067 + 068 | 23.83275057562597 | 568.0000000000000000 | 00000000000000000068 + 028 | 18.110770276274835 | 328.0000000000000000 | 00000000000000000028 + 093 | 19.82422760159901 | 393.0000000000000000 | 00000000000000000093 + 051 | 18.734993995195193 | 351.0000000000000000 | 00000000000000000051 + 086 | 28.035691537752374 | 786.0000000000000000 | 00000000000000000086 + 009 | 30.14962686336267 | 909.0000000000000000 | 00000000000000000009 + 080 | 19.493588689617926 | 380.0000000000000000 | 00000000000000000080 + 092 | 31.496031496047245 | 992.0000000000000000 | 00000000000000000092 + 085 | 24.186773244895647 | 585.0000000000000000 | 00000000000000000085 + 047 | 18.627936010197157 | 347.0000000000000000 | 00000000000000000047 + 017 | 14.730919862656235 | 217.0000000000000000 | 00000000000000000017 + 057 | 29.274562336608895 | 857.0000000000000000 | 00000000000000000057 + 085 | 28.0178514522438 | 785.0000000000000000 | 00000000000000000085 + 072 | 13.114877048604 | 172.0000000000000000 | 00000000000000000072 + 047 | 27.331300737432898 | 747.0000000000000000 | 00000000000000000047 + 080 | 16.73320053068151 | 280.0000000000000000 | 00000000000000000080 + 044 | 18.547236990991408 | 344.0000000000000000 | 00000000000000000044 + 020 | 22.80350850198276 | 520.0000000000000000 | 00000000000000000020 + 066 | 29.427877939124322 | 866.0000000000000000 | 00000000000000000066 + 097 | 19.924858845171276 | 397.0000000000000000 | 00000000000000000097 + 034 | 25.179356624028344 | 634.0000000000000000 | 00000000000000000034 + 032 | 25.13961017995307 | 632.0000000000000000 | 00000000000000000032 + 055 | 12.449899597988733 | 155.0000000000000000 | 00000000000000000055 + 021 | 14.866068747318506 | 221.0000000000000000 | 00000000000000000021 + 072 | 21.72556098240043 | 472.0000000000000000 | 00000000000000000072 + 064 | 31.04834939252005 | 964.0000000000000000 | 00000000000000000064 + 051 | 23.473389188611005 | 551.0000000000000000 | 00000000000000000051 + 019 | 4.358898943540674 | 19.0000000000000000 | 00000000000000000019 + 074 | 31.20897306865447 | 974.0000000000000000 | 00000000000000000074 + 000 | 26.457513110645905 | 700.0000000000000000 | 00000000000000000000 + 065 | 31.064449134018133 | 965.0000000000000000 | 00000000000000000065 + 095 | 29.916550603303182 | 895.0000000000000000 | 00000000000000000095 + 074 | 23.958297101421877 | 574.0000000000000000 | 00000000000000000074 + 093 | 9.643650760992955 | 93.0000000000000000 | 00000000000000000093 + 039 | 6.244997998398398 | 39.0000000000000000 | 00000000000000000039 + 020 | 26.832815729997478 | 720.0000000000000000 | 00000000000000000020 + 056 | 27.49545416973504 | 756.0000000000000000 | 00000000000000000056 + 092 | 24.331050121192877 | 592.0000000000000000 | 00000000000000000092 + 036 | 30.59411708155671 | 936.0000000000000000 | 00000000000000000036 + 080 | 24.08318915758459 | 580.0000000000000000 | 00000000000000000080 + 089 | 19.72308292331602 | 389.0000000000000000 | 00000000000000000089 + 034 | 30.56141357987225 | 934.0000000000000000 | 00000000000000000034 + 013 | 28.513154858766505 | 813.0000000000000000 | 00000000000000000013 + 091 | 17.05872210923198 | 291.0000000000000000 | 00000000000000000091 + 026 | 25.019992006393608 | 626.0000000000000000 | 00000000000000000026 + 028 | 20.688160865577203 | 428.0000000000000000 | 00000000000000000028 + 005 | 20.12461179749811 | 405.0000000000000000 | 00000000000000000005 + 048 | 29.120439557122072 | 848.0000000000000000 | 00000000000000000048 + 012 | 28.495613697550013 | 812.0000000000000000 | 00000000000000000012 + 080 | 21.908902300206645 | 480.0000000000000000 | 00000000000000000080 + 000 | 10 | 100.0000000000000000 | 00000000000000000000 + 062 | 7.874007874011811 | 62.0000000000000000 | 00000000000000000062 + 029 | 25.079872407968907 | 629.0000000000000000 | 00000000000000000029 + 062 | 29.359836511806396 | 862.0000000000000000 | 00000000000000000062 + 049 | 23.430749027719962 | 549.0000000000000000 | 00000000000000000049 + 045 | 23.345235059857504 | 545.0000000000000000 | 00000000000000000045 + 007 | 22.516660498395403 | 507.0000000000000000 | 00000000000000000007 + 036 | 20.8806130178211 | 436.0000000000000000 | 00000000000000000036 + 091 | 13.820274961085254 | 191.0000000000000000 | 00000000000000000091 + 097 | 24.43358344574123 | 597.0000000000000000 | 00000000000000000097 + 071 | 29.512709126747414 | 871.0000000000000000 | 00000000000000000071 + 076 | 24 | 576.0000000000000000 | 00000000000000000076 + 082 | 24.124676163629637 | 582.0000000000000000 | 00000000000000000082 + 031 | 27.03701166919155 | 731.0000000000000000 | 00000000000000000031 + 036 | 23.15167380558045 | 536.0000000000000000 | 00000000000000000036 + 083 | 27.982137159266443 | 783.0000000000000000 | 00000000000000000083 + 036 | 18.33030277982336 | 336.0000000000000000 | 00000000000000000036 + 020 | 20.493901531919196 | 420.0000000000000000 | 00000000000000000020 + 002 | 17.378147196982766 | 302.0000000000000000 | 00000000000000000002 + 083 | 9.1104335791443 | 83.0000000000000000 | 00000000000000000083 + 083 | 31.352830813181765 | 983.0000000000000000 | 00000000000000000083 + 068 | 19.183326093250876 | 368.0000000000000000 | 00000000000000000068 + 042 | 15.556349186104045 | 242.0000000000000000 | 00000000000000000042 + 012 | 20.29778313018444 | 412.0000000000000000 | 00000000000000000012 + 011 | 14.52583904633395 | 211.0000000000000000 | 00000000000000000011 + 046 | 18.601075237738275 | 346.0000000000000000 | 00000000000000000046 + 098 | 26.419689627245813 | 698.0000000000000000 | 00000000000000000098 + 019 | 20.46948949045872 | 419.0000000000000000 | 00000000000000000019 + 007 | 17.52141546793523 | 307.0000000000000000 | 00000000000000000007 + 082 | 31.336879231984796 | 982.0000000000000000 | 00000000000000000082 + 017 | 22.737634001804146 | 517.0000000000000000 | 00000000000000000017 + 095 | 31.54362059117501 | 995.0000000000000000 | 00000000000000000095 + 046 | 25.41653005427767 | 646.0000000000000000 | 00000000000000000046 + 087 | 28.053520278211074 | 787.0000000000000000 | 00000000000000000087 + 053 | 21.283796653792763 | 453.0000000000000000 | 00000000000000000053 + 054 | 25.573423705088842 | 654.0000000000000000 | 00000000000000000054 + 059 | 29.30870177950569 | 859.0000000000000000 | 00000000000000000059 + 088 | 28.071337695236398 | 788.0000000000000000 | 00000000000000000088 + 060 | 27.568097504180443 | 760.0000000000000000 | 00000000000000000060 + 019 | 28.61817604250837 | 819.0000000000000000 | 00000000000000000019 + 038 | 15.427248620541512 | 238.0000000000000000 | 00000000000000000038 + 042 | 6.48074069840786 | 42.0000000000000000 | 00000000000000000042 + 016 | 28.5657137141714 | 816.0000000000000000 | 00000000000000000016 + 091 | 24.310491562286437 | 591.0000000000000000 | 00000000000000000091 + 086 | 22.045407685048602 | 486.0000000000000000 | 00000000000000000086 + 039 | 27.184554438136374 | 739.0000000000000000 | 00000000000000000039 + 007 | 14.38749456993816 | 207.0000000000000000 | 00000000000000000007 + 089 | 28.089143810376278 | 789.0000000000000000 | 00000000000000000089 + 088 | 22.090722034374522 | 488.0000000000000000 | 00000000000000000088 + 026 | 18.05547008526779 | 326.0000000000000000 | 00000000000000000026 + 006 | 14.352700094407323 | 206.0000000000000000 | 00000000000000000006 + 063 | 25.748786379167466 | 663.0000000000000000 | 00000000000000000063 + 077 | 8.774964387392123 | 77.0000000000000000 | 00000000000000000077 + 041 | 15.524174696260024 | 241.0000000000000000 | 00000000000000000041 + 034 | 28.879058156387302 | 834.0000000000000000 | 00000000000000000034 + 067 | 19.157244060668017 | 367.0000000000000000 | 00000000000000000067 + 046 | 23.366642891095847 | 546.0000000000000000 | 00000000000000000046 + 041 | 21 | 441.0000000000000000 | 00000000000000000041 + 016 | 14.696938456699069 | 216.0000000000000000 | 00000000000000000016 + 031 | 15.198684153570664 | 231.0000000000000000 | 00000000000000000031 + 035 | 15.329709716755891 | 235.0000000000000000 | 00000000000000000035 + 068 | 25.84569596664017 | 668.0000000000000000 | 00000000000000000068 + 060 | 25.69046515733026 | 660.0000000000000000 | 00000000000000000060 + 084 | 16.852299546352718 | 284.0000000000000000 | 00000000000000000084 + 008 | 26.60826939130014 | 708.0000000000000000 | 00000000000000000008 + 018 | 28.600699292150182 | 818.0000000000000000 | 00000000000000000018 + 059 | 18.947295321496416 | 359.0000000000000000 | 00000000000000000059 + 008 | 14.422205101855956 | 208.0000000000000000 | 00000000000000000008 + 064 | 8 | 64.0000000000000000 | 00000000000000000064 + 075 | 31.22498999199199 | 975.0000000000000000 | 00000000000000000075 + 031 | 25.11971337416094 | 631.0000000000000000 | 00000000000000000031 + 059 | 27.54995462791182 | 759.0000000000000000 | 00000000000000000059 + 008 | 24.657656011875904 | 608.0000000000000000 | 00000000000000000008 + 033 | 11.532562594670797 | 133.0000000000000000 | 00000000000000000033 + 014 | 24.779023386727733 | 614.0000000000000000 | 00000000000000000014 + 040 | 18.439088914585774 | 340.0000000000000000 | 00000000000000000040 + 068 | 29.46183972531247 | 868.0000000000000000 | 00000000000000000068 + 045 | 18.57417562100671 | 345.0000000000000000 | 00000000000000000045 + 074 | 27.820855486487112 | 774.0000000000000000 | 00000000000000000074 + 058 | 25.65151067676132 | 658.0000000000000000 | 00000000000000000058 + 057 | 30.93541659651604 | 957.0000000000000000 | 00000000000000000057 + 050 | 12.24744871391589 | 150.0000000000000000 | 00000000000000000050 + 011 | 30.18277654557314 | 911.0000000000000000 | 00000000000000000011 + 083 | 26.13426869074396 | 683.0000000000000000 | 00000000000000000083 + 015 | 20.37154878746336 | 415.0000000000000000 | 00000000000000000015 + 012 | 17.663521732655695 | 312.0000000000000000 | 00000000000000000012 + 099 | 31.606961258558215 | 999.0000000000000000 | 00000000000000000099 + 051 | 21.236760581595302 | 451.0000000000000000 | 00000000000000000051 + 068 | 27.712812921102035 | 768.0000000000000000 | 00000000000000000068 + 066 | 25.80697580112788 | 666.0000000000000000 | 00000000000000000066 + 058 | 16.06237840420901 | 258.0000000000000000 | 00000000000000000058 + 052 | 18.76166303929372 | 352.0000000000000000 | 00000000000000000052 + 050 | 25.495097567963924 | 650.0000000000000000 | 00000000000000000050 + 083 | 19.570385790780925 | 383.0000000000000000 | 00000000000000000083 + 084 | 31.368774282716245 | 984.0000000000000000 | 00000000000000000084 + 021 | 4.58257569495584 | 21.0000000000000000 | 00000000000000000021 + 073 | 31.192947920964443 | 973.0000000000000000 | 00000000000000000073 + 045 | 15.652475842498529 | 245.0000000000000000 | 00000000000000000045 + 086 | 13.638181696985855 | 186.0000000000000000 | 00000000000000000086 + 079 | 16.703293088490067 | 279.0000000000000000 | 00000000000000000079 + 072 | 16.492422502470642 | 272.0000000000000000 | 00000000000000000072 + 040 | 28.982753492378876 | 840.0000000000000000 | 00000000000000000040 + 035 | 11.61895003862225 | 135.0000000000000000 | 00000000000000000035 + 046 | 6.782329983125268 | 46.0000000000000000 | 00000000000000000046 + 054 | 18.81488772222678 | 354.0000000000000000 | 00000000000000000054 + 054 | 21.307275752662516 | 454.0000000000000000 | 00000000000000000054 + 024 | 26.90724809414742 | 724.0000000000000000 | 00000000000000000024 + 087 | 9.327379053088816 | 87.0000000000000000 | 00000000000000000087 + 039 | 11.789826122551595 | 139.0000000000000000 | 00000000000000000039 + 025 | 18.027756377319946 | 325.0000000000000000 | 00000000000000000025 + 047 | 15.716233645501712 | 247.0000000000000000 | 00000000000000000047 + 049 | 12.206555615733702 | 149.0000000000000000 | 00000000000000000049 + 009 | 10.44030650891055 | 109.0000000000000000 | 00000000000000000009 + 072 | 19.28730152198591 | 372.0000000000000000 | 00000000000000000072 + 002 | 28.319604517012593 | 802.0000000000000000 | 00000000000000000002 + 081 | 29.68164415931166 | 881.0000000000000000 | 00000000000000000081 + 030 | 27.018512172212592 | 730.0000000000000000 | 00000000000000000030 + 051 | 12.288205727444508 | 151.0000000000000000 | 00000000000000000051 + 075 | 16.583123951777 | 275.0000000000000000 | 00000000000000000075 + 019 | 14.798648586948742 | 219.0000000000000000 | 00000000000000000019 + 007 | 30.116440692751194 | 907.0000000000000000 | 00000000000000000007 + 013 | 24.758836806279895 | 613.0000000000000000 | 00000000000000000013 + 094 | 19.849433241279208 | 394.0000000000000000 | 00000000000000000094 + 082 | 21.95449840010015 | 482.0000000000000000 | 00000000000000000082 + 052 | 21.2602916254693 | 452.0000000000000000 | 00000000000000000052 + 049 | 18.681541692269406 | 349.0000000000000000 | 00000000000000000049 + 032 | 15.231546211727817 | 232.0000000000000000 | 00000000000000000032 + 055 | 30.903074280724887 | 955.0000000000000000 | 00000000000000000055 + 028 | 25.059928172283335 | 628.0000000000000000 | 00000000000000000028 + 096 | 19.8997487421324 | 396.0000000000000000 | 00000000000000000096 + 035 | 27.110883423451916 | 735.0000000000000000 | 00000000000000000035 + 036 | 6 | 36.0000000000000000 | 00000000000000000036 + 024 | 11.135528725660043 | 124.0000000000000000 | 00000000000000000024 + 027 | 25.03996805109783 | 627.0000000000000000 | 00000000000000000027 + 016 | 17.776388834631177 | 316.0000000000000000 | 00000000000000000016 + 037 | 23.173260452512935 | 537.0000000000000000 | 00000000000000000037 + 097 | 22.293496809607955 | 497.0000000000000000 | 00000000000000000097 + 048 | 21.166010488516726 | 448.0000000000000000 | 00000000000000000048 + 030 | 20.73644135332772 | 430.0000000000000000 | 00000000000000000030 + 038 | 20.92844953645635 | 438.0000000000000000 | 00000000000000000038 + 001 | 30.01666203960727 | 901.0000000000000000 | 00000000000000000001 + 024 | 4.898979485566356 | 24.0000000000000000 | 00000000000000000024 + 042 | 23.280893453645632 | 542.0000000000000000 | 00000000000000000042 + 086 | 19.6468827043885 | 386.0000000000000000 | 00000000000000000086 + 097 | 29.949958263743873 | 897.0000000000000000 | 00000000000000000097 + 010 | 26.645825188948457 | 710.0000000000000000 | 00000000000000000010 + 029 | 11.357816691600547 | 129.0000000000000000 | 00000000000000000029 + 025 | 11.180339887498949 | 125.0000000000000000 | 00000000000000000025 + 031 | 30.512292604784715 | 931.0000000000000000 | 00000000000000000031 + 028 | 28.77498913987632 | 828.0000000000000000 | 00000000000000000028 + 024 | 18 | 324.0000000000000000 | 00000000000000000024 + 028 | 30.463092423455635 | 928.0000000000000000 | 00000000000000000028 + 003 | 17.406895185529212 | 303.0000000000000000 | 00000000000000000003 + 027 | 11.269427669584644 | 127.0000000000000000 | 00000000000000000027 + 036 | 25.219040425836983 | 636.0000000000000000 | 00000000000000000036 + 021 | 30.347981810987037 | 921.0000000000000000 | 00000000000000000021 + 088 | 24.24871130596428 | 588.0000000000000000 | 00000000000000000088 + 061 | 21.470910553583888 | 461.0000000000000000 | 00000000000000000061 + 084 | 28 | 784.0000000000000000 | 00000000000000000084 + 072 | 27.784887978899608 | 772.0000000000000000 | 00000000000000000072 + 063 | 31.0322412983658 | 963.0000000000000000 | 00000000000000000063 + 017 | 20.42057785666214 | 417.0000000000000000 | 00000000000000000017 + 056 | 25.612496949731394 | 656.0000000000000000 | 00000000000000000056 + 074 | 25.96150997149434 | 674.0000000000000000 | 00000000000000000074 + 038 | 18.384776310850235 | 338.0000000000000000 | 00000000000000000038 + 019 | 22.781571499789035 | 519.0000000000000000 | 00000000000000000019 + 026 | 5.0990195135927845 | 26.0000000000000000 | 00000000000000000026 + 052 | 23.49468024894146 | 552.0000000000000000 | 00000000000000000052 + 085 | 19.621416870348583 | 385.0000000000000000 | 00000000000000000085 + 026 | 30.430248109405877 | 926.0000000000000000 | 00000000000000000026 + 047 | 30.773365106858236 | 947.0000000000000000 | 00000000000000000047 + 073 | 23.93741840717165 | 573.0000000000000000 | 00000000000000000073 + 092 | 17.08800749063506 | 292.0000000000000000 | 00000000000000000092 + 038 | 11.74734012447073 | 138.0000000000000000 | 00000000000000000038 + 087 | 26.210684844162312 | 687.0000000000000000 | 00000000000000000087 + 076 | 8.717797887081348 | 76.0000000000000000 | 00000000000000000076 + 023 | 4.795831523312719 | 23.0000000000000000 | 00000000000000000023 + 013 | 3.605551275463989 | 13.0000000000000000 | 00000000000000000013 + 000 | 28.284271247461902 | 800.0000000000000000 | 00000000000000000000 + 029 | 15.132745950421556 | 229.0000000000000000 | 00000000000000000029 + 028 | 15.0996688705415 | 228.0000000000000000 | 00000000000000000028 + 029 | 20.71231517720798 | 429.0000000000000000 | 00000000000000000029 + 019 | 10.908712114635714 | 119.0000000000000000 | 00000000000000000019 + 078 | 31.272991542223778 | 978.0000000000000000 | 00000000000000000078 + 078 | 13.341664064126334 | 178.0000000000000000 | 00000000000000000078 + 025 | 28.722813232690143 | 825.0000000000000000 | 00000000000000000025 + 082 | 16.792855623746664 | 282.0000000000000000 | 00000000000000000082 + 047 | 23.388031127053 | 547.0000000000000000 | 00000000000000000047 + 030 | 5.477225575051661 | 30.0000000000000000 | 00000000000000000030 + 018 | 22.759613353482084 | 518.0000000000000000 | 00000000000000000018 + 030 | 23.021728866442675 | 530.0000000000000000 | 00000000000000000030 + 080 | 31.304951684997057 | 980.0000000000000000 | 00000000000000000080 + 053 | 12.36931687685298 | 153.0000000000000000 | 00000000000000000053 + 015 | 17.74823934929885 | 315.0000000000000000 | 00000000000000000015 + 034 | 11.575836902790225 | 134.0000000000000000 | 00000000000000000034 + 022 | 4.69041575982343 | 22.0000000000000000 | 00000000000000000022 + 041 | 23.259406699226016 | 541.0000000000000000 | 00000000000000000041 + 033 | 15.264337522473747 | 233.0000000000000000 | 00000000000000000033 + 043 | 6.557438524302 | 43.0000000000000000 | 00000000000000000043 + 016 | 20.396078054371138 | 416.0000000000000000 | 00000000000000000016 + 001 | 1 | 1.00000000000000000000 | 00000000000000000001 + 006 | 26.570660511172846 | 706.0000000000000000 | 00000000000000000006 + 070 | 29.49576240750525 | 870.0000000000000000 | 00000000000000000070 + 062 | 19.026297590440446 | 362.0000000000000000 | 00000000000000000062 + 092 | 13.856406460551018 | 192.0000000000000000 | 00000000000000000092 + 009 | 14.45683229480096 | 209.0000000000000000 | 00000000000000000009 + 021 | 20.518284528683193 | 421.0000000000000000 | 00000000000000000021 + 020 | 4.47213595499958 | 20.0000000000000000 | 00000000000000000020 + 094 | 22.22611077089287 | 494.0000000000000000 | 00000000000000000094 + 038 | 23.194827009486403 | 538.0000000000000000 | 00000000000000000038 + 061 | 29.34280150224242 | 861.0000000000000000 | 00000000000000000061 + 097 | 14.035668847618199 | 197.0000000000000000 | 00000000000000000097 + 087 | 31.416556144810016 | 987.0000000000000000 | 00000000000000000087 + 022 | 14.89966442575134 | 222.0000000000000000 | 00000000000000000022 + 005 | 2.23606797749979 | 5.0000000000000000 | 00000000000000000005 + 004 | 24.576411454889016 | 604.0000000000000000 | 00000000000000000004 + 025 | 15 | 225.0000000000000000 | 00000000000000000025 + 004 | 26.5329983228432 | 704.0000000000000000 | 00000000000000000004 + 080 | 29.664793948382652 | 880.0000000000000000 | 00000000000000000080 + 085 | 13.601470508735444 | 185.0000000000000000 | 00000000000000000085 + 073 | 29.546573405388315 | 873.0000000000000000 | 00000000000000000073 + 011 | 10.535653752852738 | 111.0000000000000000 | 00000000000000000011 + 099 | 22.338307903688676 | 499.0000000000000000 | 00000000000000000099 + 010 | 30.166206257996713 | 910.0000000000000000 | 00000000000000000010 + 042 | 18.49324200890693 | 342.0000000000000000 | 00000000000000000042 + 039 | 28.965496715920477 | 839.0000000000000000 | 00000000000000000039 + 023 | 24.95996794869737 | 623.0000000000000000 | 00000000000000000023 + 055 | 7.416198487095663 | 55.0000000000000000 | 00000000000000000055 + 045 | 25.39685019840059 | 645.0000000000000000 | 00000000000000000045 + 055 | 29.24038303442689 | 855.0000000000000000 | 00000000000000000055 + 055 | 27.477263328068172 | 755.0000000000000000 | 00000000000000000055 + 020 | 30.331501776206203 | 920.0000000000000000 | 00000000000000000020 + 081 | 16.76305461424021 | 281.0000000000000000 | 00000000000000000081 + 062 | 21.494185260204677 | 462.0000000000000000 | 00000000000000000062 + 066 | 8.12403840463596 | 66.0000000000000000 | 00000000000000000066 + 099 | 26.43860813280457 | 699.0000000000000000 | 00000000000000000099 + 034 | 15.297058540778355 | 234.0000000000000000 | 00000000000000000034 + 006 | 17.4928556845359 | 306.0000000000000000 | 00000000000000000006 + 088 | 13.711309200802088 | 188.0000000000000000 | 00000000000000000088 + 066 | 12.884098726725126 | 166.0000000000000000 | 00000000000000000066 + 032 | 28.844410203711913 | 832.0000000000000000 | 00000000000000000032 + 053 | 23.515952032609693 | 553.0000000000000000 | 00000000000000000053 + 077 | 31.25699921617557 | 977.0000000000000000 | 00000000000000000077 + 024 | 28.705400188814647 | 824.0000000000000000 | 00000000000000000024 + 031 | 20.760539492026695 | 431.0000000000000000 | 00000000000000000031 + 072 | 23.916521486202797 | 572.0000000000000000 | 00000000000000000072 + 004 | 17.435595774162696 | 304.0000000000000000 | 00000000000000000004 + 006 | 2.449489742783178 | 6.0000000000000000 | 00000000000000000006 + 057 | 12.529964086141668 | 157.0000000000000000 | 00000000000000000057 + 003 | 1.7320508075688772 | 3.0000000000000000 | 00000000000000000003 + 042 | 29.017236257093817 | 842.0000000000000000 | 00000000000000000042 + 078 | 26.038433132583073 | 678.0000000000000000 | 00000000000000000078 + 032 | 5.656854249492381 | 32.0000000000000000 | 00000000000000000032 + 089 | 31.448370387032774 | 989.0000000000000000 | 00000000000000000089 + 022 | 30.364452901377952 | 922.0000000000000000 | 00000000000000000022 + 014 | 22.67156809750927 | 514.0000000000000000 | 00000000000000000014 + 048 | 18.65475810617763 | 348.0000000000000000 | 00000000000000000048 + 084 | 19.595917942265423 | 384.0000000000000000 | 00000000000000000084 + 037 | 6.082762530298219 | 37.0000000000000000 | 00000000000000000037 + 083 | 16.822603841260722 | 283.0000000000000000 | 00000000000000000083 + 065 | 27.65863337187866 | 765.0000000000000000 | 00000000000000000065 + 096 | 26.38181191654584 | 696.0000000000000000 | 00000000000000000096 + 095 | 22.24859546128699 | 495.0000000000000000 | 00000000000000000095 + 021 | 26.851443164195103 | 721.0000000000000000 | 00000000000000000021 + 038 | 28.948229652260256 | 838.0000000000000000 | 00000000000000000038 + 073 | 25.942243542145693 | 673.0000000000000000 | 00000000000000000073 + 071 | 8.426149773176359 | 71.0000000000000000 | 00000000000000000071 + 007 | 24.63736998950984 | 607.0000000000000000 | 00000000000000000007 + 005 | 26.551836094703507 | 705.0000000000000000 | 00000000000000000005 + 025 | 30.4138126514911 | 925.0000000000000000 | 00000000000000000025 + 058 | 23.62202362203543 | 558.0000000000000000 | 00000000000000000058 + 070 | 19.235384061671343 | 370.0000000000000000 | 00000000000000000070 + 093 | 26.324893162176366 | 693.0000000000000000 | 00000000000000000093 + 069 | 23.853720883753127 | 569.0000000000000000 | 00000000000000000069 + 065 | 23.769728648009426 | 565.0000000000000000 | 00000000000000000065 + 050 | 18.708286933869708 | 350.0000000000000000 | 00000000000000000050 + 059 | 12.609520212918492 | 159.0000000000000000 | 00000000000000000059 + 033 | 30.54504869860253 | 933.0000000000000000 | 00000000000000000033 + 081 | 26.095976701399778 | 681.0000000000000000 | 00000000000000000081 + 065 | 21.563858652847824 | 465.0000000000000000 | 00000000000000000065 + 085 | 29.748949561287034 | 885.0000000000000000 | 00000000000000000085 + 038 | 27.16615541441225 | 738.0000000000000000 | 00000000000000000038 + 060 | 18.973665961010276 | 360.0000000000000000 | 00000000000000000060 + 081 | 9 | 81.0000000000000000 | 00000000000000000081 + 060 | 21.447610589527216 | 460.0000000000000000 | 00000000000000000060 + 089 | 9.433981132056603 | 89.0000000000000000 | 00000000000000000089 + 035 | 5.916079783099616 | 35.0000000000000000 | 00000000000000000035 + 002 | 14.212670403551895 | 202.0000000000000000 | 00000000000000000002 + 027 | 5.196152422706632 | 27.0000000000000000 | 00000000000000000027 + 080 | 8.94427190999916 | 80.0000000000000000 | 00000000000000000080 + 023 | 28.687976575562104 | 823.0000000000000000 | 00000000000000000023 + 098 | 14.071247279470288 | 198.0000000000000000 | 00000000000000000098 + 098 | 22.315913604421397 | 498.0000000000000000 | 00000000000000000098 + 061 | 23.68543856465402 | 561.0000000000000000 | 00000000000000000061 + 061 | 7.810249675906654 | 61.0000000000000000 | 00000000000000000061 + 078 | 19.44222209522358 | 378.0000000000000000 | 00000000000000000078 + 027 | 18.083141320025124 | 327.0000000000000000 | 00000000000000000027 + 079 | 21.88606862823929 | 479.0000000000000000 | 00000000000000000079 + 081 | 24.1039415863879 | 581.0000000000000000 | 00000000000000000081 + 083 | 29.715315916207253 | 883.0000000000000000 | 00000000000000000083 + 095 | 24.392621835300936 | 595.0000000000000000 | 00000000000000000095 + 072 | 31.176914536239792 | 972.0000000000000000 | 00000000000000000072 + 091 | 26.28687885618983 | 691.0000000000000000 | 00000000000000000091 + 063 | 29.376861643136763 | 863.0000000000000000 | 00000000000000000063 + 021 | 22.825424421026653 | 521.0000000000000000 | 00000000000000000021 + 089 | 22.11334438749598 | 489.0000000000000000 | 00000000000000000089 + 062 | 25.729360660537214 | 662.0000000000000000 | 00000000000000000062 + 066 | 16.30950643030009 | 266.0000000000000000 | 00000000000000000066 + 046 | 15.684387141358123 | 246.0000000000000000 | 00000000000000000046 + 007 | 2.6457513110645907 | 7.0000000000000000 | 00000000000000000007 + 059 | 23.643180835073778 | 559.0000000000000000 | 00000000000000000059 + 061 | 12.68857754044952 | 161.0000000000000000 | 00000000000000000061 + 016 | 30.265491900843113 | 916.0000000000000000 | 00000000000000000016 + 028 | 26.981475126464083 | 728.0000000000000000 | 00000000000000000028 + 010 | 22.58317958127243 | 510.0000000000000000 | 00000000000000000010 + 044 | 21.071307505705477 | 444.0000000000000000 | 00000000000000000044 + 052 | 12.328828005937952 | 152.0000000000000000 | 00000000000000000052 + 026 | 28.74021572639983 | 826.0000000000000000 | 00000000000000000026 + 058 | 30.95157508108432 | 958.0000000000000000 | 00000000000000000058 + 018 | 17.832554500127006 | 318.0000000000000000 | 00000000000000000018 + 080 | 27.92848008753788 | 780.0000000000000000 | 00000000000000000080 + 028 | 11.313708498984761 | 128.0000000000000000 | 00000000000000000028 + 064 | 29.393876913398138 | 864.0000000000000000 | 00000000000000000064 + 048 | 12.165525060596439 | 148.0000000000000000 | 00000000000000000048 + 086 | 9.273618495495704 | 86.0000000000000000 | 00000000000000000086 + 078 | 29.631064780058107 | 878.0000000000000000 | 00000000000000000078 + 014 | 14.628738838327793 | 214.0000000000000000 | 00000000000000000014 + 023 | 14.933184523068078 | 223.0000000000000000 | 00000000000000000023 + 003 | 20.074859899884732 | 403.0000000000000000 | 00000000000000000003 + 010 | 28.460498941515414 | 810.0000000000000000 | 00000000000000000010 + 029 | 30.479501308256342 | 929.0000000000000000 | 00000000000000000029 + 094 | 9.695359714832659 | 94.0000000000000000 | 00000000000000000094 + 071 | 16.46207763315433 | 271.0000000000000000 | 00000000000000000071 + 073 | 13.152946437965905 | 173.0000000000000000 | 00000000000000000073 + 090 | 19.748417658131498 | 390.0000000000000000 | 00000000000000000090 + 016 | 26.758176320519304 | 716.0000000000000000 | 00000000000000000016 + 050 | 29.154759474226502 | 850.0000000000000000 | 00000000000000000050 + 083 | 21.97726097583591 | 483.0000000000000000 | 00000000000000000083 + 046 | 30.757112998459398 | 946.0000000000000000 | 00000000000000000046 + 041 | 6.4031242374328485 | 41.0000000000000000 | 00000000000000000041 + 001 | 20.024984394500787 | 401.0000000000000000 | 00000000000000000001 + 071 | 21.702534414210707 | 471.0000000000000000 | 00000000000000000071 + 003 | 26.514147167125703 | 703.0000000000000000 | 00000000000000000003 + 037 | 20.904544960366874 | 437.0000000000000000 | 00000000000000000037 + 026 | 26.94438717061496 | 726.0000000000000000 | 00000000000000000026 + 033 | 23.08679276123039 | 533.0000000000000000 | 00000000000000000033 + 064 | 16.24807680927192 | 264.0000000000000000 | 00000000000000000064 + 049 | 15.7797338380595 | 249.0000000000000000 | 00000000000000000049 + 009 | 3 | 9.0000000000000000 | 00000000000000000009 + 084 | 29.732137494637012 | 884.0000000000000000 | 00000000000000000084 + 065 | 12.84523257866513 | 165.0000000000000000 | 00000000000000000065 + 045 | 27.294688127912362 | 745.0000000000000000 | 00000000000000000045 + 067 | 12.922847983320086 | 167.0000000000000000 | 00000000000000000067 + 044 | 27.27636339397171 | 744.0000000000000000 | 00000000000000000044 + 043 | 30.708305065568176 | 943.0000000000000000 | 00000000000000000043 + 039 | 23.2163735324878 | 539.0000000000000000 | 00000000000000000039 + 027 | 22.956480566497994 | 527.0000000000000000 | 00000000000000000027 + 035 | 20.85665361461421 | 435.0000000000000000 | 00000000000000000035 + 037 | 25.238858928247925 | 637.0000000000000000 | 00000000000000000037 + 091 | 19.77371993328519 | 391.0000000000000000 | 00000000000000000091 + 014 | 17.72004514666935 | 314.0000000000000000 | 00000000000000000014 + 049 | 7 | 49.0000000000000000 | 00000000000000000049 + 095 | 28.19574435974337 | 795.0000000000000000 | 00000000000000000095 + 054 | 23.53720459187964 | 554.0000000000000000 | 00000000000000000054 + 043 | 23.302360395462088 | 543.0000000000000000 | 00000000000000000043 + 081 | 31.32091952673165 | 981.0000000000000000 | 00000000000000000081 + 089 | 26.248809496813376 | 689.0000000000000000 | 00000000000000000089 + 082 | 9.055385138137417 | 82.0000000000000000 | 00000000000000000082 + 029 | 27 | 729.0000000000000000 | 00000000000000000029 + 005 | 30.083217912982647 | 905.0000000000000000 | 00000000000000000005 + 042 | 30.692018506445613 | 942.0000000000000000 | 00000000000000000042 + 057 | 23.600847442411894 | 557.0000000000000000 | 00000000000000000057 + 008 | 10.392304845413264 | 108.0000000000000000 | 00000000000000000008 + 040 | 20.97617696340303 | 440.0000000000000000 | 00000000000000000040 + 016 | 24.819347291981714 | 616.0000000000000000 | 00000000000000000016 + 088 | 16.97056274847714 | 288.0000000000000000 | 00000000000000000088 + 001 | 22.38302928559939 | 501.0000000000000000 | 00000000000000000001 + 096 | 17.204650534085253 | 296.0000000000000000 | 00000000000000000096 + 029 | 23 | 529.0000000000000000 | 00000000000000000029 + 033 | 27.073972741361768 | 733.0000000000000000 | 00000000000000000033 + 035 | 30.577769702841312 | 935.0000000000000000 | 00000000000000000035 + 008 | 17.549928774784245 | 308.0000000000000000 | 00000000000000000008 + 059 | 16.09347693943108 | 259.0000000000000000 | 00000000000000000059 + 094 | 28.178005607210743 | 794.0000000000000000 | 00000000000000000094 + 051 | 15.84297951775486 | 251.0000000000000000 | 00000000000000000051 + 054 | 7.3484692283495345 | 54.0000000000000000 | 00000000000000000054 + 011 | 3.3166247903554 | 11.0000000000000000 | 00000000000000000011 + 058 | 29.29163703175362 | 858.0000000000000000 | 00000000000000000058 + 017 | 4.123105625617661 | 17.0000000000000000 | 00000000000000000017 + 046 | 29.086079144497972 | 846.0000000000000000 | 00000000000000000046 + 059 | 7.681145747868608 | 59.0000000000000000 | 00000000000000000059 + 058 | 7.615773105863909 | 58.0000000000000000 | 00000000000000000058 + 005 | 22.47220505424423 | 505.0000000000000000 | 00000000000000000005 + 063 | 23.727621035409346 | 563.0000000000000000 | 00000000000000000063 + 025 | 5 | 25.0000000000000000 | 00000000000000000025 + 004 | 20.09975124224178 | 404.0000000000000000 | 00000000000000000004 + 092 | 26.30589287593181 | 692.0000000000000000 | 00000000000000000092 + 057 | 21.37755832643195 | 457.0000000000000000 | 00000000000000000057 + 047 | 25.436194683953808 | 647.0000000000000000 | 00000000000000000047 + 017 | 17.804493814764857 | 317.0000000000000000 | 00000000000000000017 +(1000 rows) + +Time: 26.538 ms +--Testcase 59: +SELECT max(c1), min(c2), min(c3) FROM tbl1 WHERE time > now() - interval '3 days'; + max | min | min +------+----------------------+----- + 1000 | 00000000000000000000 | 1 +(1 row) + +Time: 21.283 ms +-- +-- DELETE +-- +--Testcase 60: +DELETE FROM tbl1 WHERE tag1 = '000'; +Time: 7.519 ms +--Testcase 61: +DELETE FROM tbl1 WHERE tag2 = 'tag2_111'; +Time: 1.399 ms +--Testcase 62: +DELETE FROM tbl1 WHERE tag1 = '011' AND tag2 IS NOT NULL; +Time: 77.348 ms +--Testcase 63: +DELETE FROM tbl1; +Time: 14.513 ms +--Testcase 64: +DROP EXTENSION influxdb_fdw CASCADE; +NOTICE: drop cascades to 3 other objects +DETAIL: drop cascades to server influxdb_svr +drop cascades to user mapping for vagrant on server influxdb_svr +drop cascades to foreign table tbl1 +Time: 33.518 ms diff --git a/influxdb_fdw--1.0.sql b/influxdb_fdw--1.0.sql index b460551..68aeccc 100644 --- a/influxdb_fdw--1.0.sql +++ b/influxdb_fdw--1.0.sql @@ -2,7 +2,7 @@ * * InfluxDB Foreign Data Wrapper for PostgreSQL * - * Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION + * Portions Copyright (c) 2018, TOSHIBA CORPORATION * * IDENTIFICATION * influxdb_fdw--1.0.sql diff --git a/influxdb_fdw--1.1.sql b/influxdb_fdw--1.1.sql index bac24fb..842b99e 100644 --- a/influxdb_fdw--1.1.sql +++ b/influxdb_fdw--1.1.sql @@ -2,7 +2,7 @@ * * InfluxDB Foreign Data Wrapper for PostgreSQL * - * Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION + * Portions Copyright (c) 2020, TOSHIBA CORPORATION * * IDENTIFICATION * influxdb_fdw--1.1.sql diff --git a/influxdb_fdw--1.2.sql b/influxdb_fdw--1.2.sql index b8cb6f1..2a0b92a 100644 --- a/influxdb_fdw--1.2.sql +++ b/influxdb_fdw--1.2.sql @@ -2,7 +2,7 @@ * * InfluxDB Foreign Data Wrapper for PostgreSQL * - * Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION + * Portions Copyright (c) 2020, TOSHIBA CORPORATION * * IDENTIFICATION * influxdb_fdw--1.2.sql diff --git a/influxdb_fdw--1.3.sql b/influxdb_fdw--1.3.sql index 711e803..6879f39 100644 --- a/influxdb_fdw--1.3.sql +++ b/influxdb_fdw--1.3.sql @@ -2,7 +2,7 @@ * * InfluxDB Foreign Data Wrapper for PostgreSQL * - * Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION + * Portions Copyright (c) 2020, TOSHIBA CORPORATION * * IDENTIFICATION * influxdb_fdw--1.3.sql diff --git a/influxdb_fdw.c b/influxdb_fdw.c index 5db1753..16cb2f4 100644 --- a/influxdb_fdw.c +++ b/influxdb_fdw.c @@ -2,7 +2,7 @@ * * InfluxDB Foreign Data Wrapper for PostgreSQL * - * Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION + * Portions Copyright (c) 2018, TOSHIBA CORPORATION * * IDENTIFICATION * influxdb_fdw.c @@ -64,6 +64,10 @@ #include "utils/selfuncs.h" #include "utils/syscache.h" +#ifdef CXX_CLIENT +#include "query_cxx.h" +#endif + extern PGDLLEXPORT void _PG_init(void); bool influxdb_load_library(void); @@ -219,7 +223,8 @@ static void process_query_params(ExprContext *econtext, const char **param_values, Oid *param_types, InfluxDBType * param_influxdb_types, - InfluxDBValue * param_influxdb_values); + InfluxDBValue * param_influxdb_values, + InfluxDBColumnInfo *param_column_info); static void create_cursor(ForeignScanState *node); static void execute_dml_stmt(ForeignScanState *node); @@ -239,6 +244,10 @@ static int influxdb_get_batch_size_option(Relation rel); #endif static void influxdb_extract_slcols(InfluxDBFdwRelationInfo *fpinfo, PlannerInfo *root, RelOptInfo *baserel, List *tlist); +#ifdef CXX_CLIENT +#define free(x) pfree(x) +#endif + /* * This enum describes what's kept in the fdw_private list for a ForeignPath. * We store: @@ -248,9 +257,9 @@ static void influxdb_extract_slcols(InfluxDBFdwRelationInfo *fpinfo, PlannerInfo */ enum FdwPathPrivateIndex { - /* has-final-sort flag (as an integer Value node) */ + /* has-final-sort flag (as a Boolean node) */ FdwPathPrivateHasFinalSort, - /* has-limit flag (as an integer Value node) */ + /* has-limit flag (as a Boolean node) */ FdwPathPrivateHasLimit }; @@ -282,11 +291,11 @@ enum FdwDirectModifyPrivateIndex { /* SQL statement to execute remotely (as a String node) */ FdwDirectModifyPrivateUpdateSql, - /* has-returning flag (as an integer Value node) */ + /* has-returning flag (as an Boolean node) */ FdwDirectModifyPrivateHasReturning, /* Integer list of attribute numbers retrieved by RETURNING */ FdwDirectModifyPrivateRetrievedAttrs, - /* set-processed flag (as an integer Value node) */ + /* set-processed flag (as an Boolean node) */ FdwDirectModifyPrivateSetProcessed }; @@ -296,6 +305,7 @@ enum FdwDirectModifyPrivateIndex typedef struct InfluxDBFdwDirectModifyState { Relation rel; /* relcache entry for the foreign table */ + UserMapping *user; /* user mapping of foreign server */ AttInMetadata *attinmeta; /* attribute datatype conversion metadata */ /* extracted fdw_private data */ @@ -313,6 +323,7 @@ typedef struct InfluxDBFdwDirectModifyState Oid *param_types; /* type of query parameters */ InfluxDBType *param_influxdb_types; /* InfluxDB type of query parameters */ InfluxDBValue *param_influxdb_values; /* values for InfluxDB */ + InfluxDBColumnInfo *param_column_info; /* information of columns */ influxdb_opt *influxdbFdwOptions; /* InfluxDB FDW options */ @@ -345,6 +356,9 @@ _PG_init(void) static void influxdb_fdw_exit(int code, Datum arg) { +#ifdef CXX_CLIENT + cleanup_cxx_client_connection(); +#endif } Datum @@ -781,7 +795,11 @@ influxdbGetForeignPlan(PlannerInfo *root, */ if (best_path->fdw_private) { +#if (PG_VERSION_NUM >= 150000) + has_limit = boolVal(list_nth(best_path->fdw_private, FdwPathPrivateHasLimit)); +#else has_limit = intVal(list_nth(best_path->fdw_private, FdwPathPrivateHasLimit)); +#endif } /* @@ -1026,6 +1044,9 @@ influxdbBeginForeignScan(ForeignScanState *node, int eflags) int numParams; int rtindex; bool schemaless; +#ifdef CXX_CLIENT + ForeignTable *ftable; +#endif elog(DEBUG1, "influxdb_fdw : %s", __func__); @@ -1058,6 +1079,16 @@ influxdbBeginForeignScan(ForeignScanState *node, int eflags) rtindex = bms_next_member(fsplan->fs_relids, -1); rte = exec_rt_fetch(rtindex, estate); + /* Fetch options */ + festate->influxdbFdwOptions = influxdb_get_options(rte->relid); +#ifdef CXX_CLIENT + if (!festate->influxdbFdwOptions->svr_version) + festate->influxdbFdwOptions->svr_version = influxdb_get_version_option(festate->influxdbFdwOptions); + /* get user mapping */ + ftable = GetForeignTable(rte->relid); + festate->user = GetUserMapping(GetUserId(), ftable->serverid); +#endif + influxdb_get_schemaless_info(&(festate->slinfo), schemaless, rte->relid); /* Prepare for output conversion of parameters used in remote query. */ @@ -1446,6 +1477,7 @@ make_tuple_from_result_row(InfluxDBRow * result_row, } } +#ifndef CXX_CLIENT static void copyInfluxDBResult(InfluxDBFdwExecState *festate, struct InfluxDBResult volatile *result) { @@ -1494,6 +1526,7 @@ copyInfluxDBResult(InfluxDBFdwExecState *festate, struct InfluxDBResult volatile festate->temp_result = r; } +#endif static void freeInfluxDBResultRow(InfluxDBFdwExecState *festate, int index) @@ -1593,7 +1626,7 @@ influxdbIterateForeignScan(ForeignScanState *node) rte = rt_fetch(rtindex, estate->es_range_table); /* Fetch the options */ - options = influxdb_get_options(rte->relid); + options = festate->influxdbFdwOptions; /* * If this is the first call after Begin or ReScan, we need to create the @@ -1612,9 +1645,15 @@ influxdbIterateForeignScan(ForeignScanState *node) PG_TRY(); { + /* festate->rows need longer context than per tuple */ + oldcontext = MemoryContextSwitchTo(estate->es_query_cxt); +#ifdef CXX_CLIENT + ret = InfluxDBQuery(festate->query, festate->user, options, +#else ret = InfluxDBQuery(festate->query, options->svr_address, options->svr_port, options->svr_username, options->svr_password, options->svr_database, +#endif festate->param_influxdb_types, festate->param_influxdb_values, festate->numParams); @@ -1626,14 +1665,16 @@ influxdbIterateForeignScan(ForeignScanState *node) ret.r1 = err; elog(ERROR, "influxdb_fdw : %s", err); } +#ifdef CXX_CLIENT + /* With cxx client, ret.r0 is pointer to result set */ + result = ret.r0; + festate->temp_result = (void *) result; +#else result = &ret.r0; - elog(DEBUG1, "influxdb_fdw : query: %s", festate->query); - /* festate->rows need longer context than per tuple */ - oldcontext = MemoryContextSwitchTo(estate->es_query_cxt); - - festate->row_nums = result->nrow; - copyInfluxDBResult(festate, result); +#endif + festate->row_nums = result->nrow; + elog(DEBUG1, "influxdb_fdw : query: %s", festate->query); MemoryContextSwitchTo(oldcontext); InfluxDBFreeResult((InfluxDBResult *) result); @@ -1873,6 +1914,9 @@ influxdbBeginForeignModify(ModifyTableState *mtstate, Oid foreignTableId = InvalidOid; Plan *subplan; int i; +#ifdef CXX_CLIENT + ForeignTable *ftable; +#endif elog(DEBUG1, "influxdb_fdw : %s", __func__); @@ -1895,6 +1939,13 @@ influxdbBeginForeignModify(ModifyTableState *mtstate, /* Stash away the state info we have already */ fmstate->influxdbFdwOptions = influxdb_get_options(foreignTableId); +#ifdef CXX_CLIENT + if (!fmstate->influxdbFdwOptions->svr_version) + fmstate->influxdbFdwOptions->svr_version = influxdb_get_version_option(fmstate->influxdbFdwOptions); + /* get user mapping */ + ftable = GetForeignTable(foreignTableId); + fmstate->user = GetUserMapping(GetUserId(), ftable->serverid); +#endif fmstate->rel = rel; fmstate->query = strVal(list_nth(fdw_private, FdwModifyPrivateUpdateSql)); fmstate->retrieved_attrs = (List *) list_nth(fdw_private, FdwModifyPrivateTargetAttnums); @@ -2044,8 +2095,8 @@ influxdbExecForeignBatchInsert(EState *estate, * Determine the maximum number of tuples that can be inserted in bulk * * Returns the batch size specified for server or table. When batching is not - * allowed (e.g. for tables with AFTER ROW triggers or with RETURNING clause), - * returns 1. + * allowed (e.g. for tables with BEFORE/AFTER ROW triggers or with RETURNING + * clause), returns 1. */ static int influxdbGetForeignModifyBatchSize(ResultRelInfo *resultRelInfo) @@ -2076,10 +2127,26 @@ influxdbGetForeignModifyBatchSize(ResultRelInfo *resultRelInfo) else batch_size = influxdb_get_batch_size_option(resultRelInfo->ri_RelationDesc); - /* Disable batching when we have to use RETURNING. */ + /* + * Disable batching when we have to use RETURNING, there are any + * BEFORE/AFTER ROW INSERT triggers on the foreign table, or there are any + * WITH CHECK OPTION constraints from parent views. + * + * When there are any BEFORE ROW INSERT triggers on the table, we can't + * support it, because such triggers might query the table we're inserting + * into and act differently if the tuples that have already been processed + * and prepared for insertion are not there. + */ + if (resultRelInfo->ri_projectReturning != NULL || + resultRelInfo->ri_WithCheckOptions != NIL || (resultRelInfo->ri_TrigDesc && +#if (PG_VERSION_NUM >= 150000) + (resultRelInfo->ri_TrigDesc->trig_insert_before_row || + resultRelInfo->ri_TrigDesc->trig_insert_after_row))) +#else resultRelInfo->ri_TrigDesc->trig_insert_after_row)) +#endif return 1; /* @@ -2124,7 +2191,7 @@ bindJunkColumnValue(InfluxDBFdwExecState * fmstate, fmstate->param_influxdb_values[bindnum].i = 0; } else - influxdb_bind_sql_var(type, bindnum, value, &is_null, + influxdb_bind_sql_var(type, bindnum, value, &is_null, fmstate->param_column_info, fmstate->param_influxdb_types, fmstate->param_influxdb_values); bindnum++; } @@ -2149,9 +2216,13 @@ influxdbExecForeignDelete(EState *estate, bindJunkColumnValue(fmstate, slot, planSlot, foreignTableId, 0); /* Execute the query */ +#ifdef CXX_CLIENT + ret = InfluxDBQuery(fmstate->query, fmstate->user, fmstate->influxdbFdwOptions, +#else ret = InfluxDBQuery(fmstate->query, fmstate->influxdbFdwOptions->svr_address, fmstate->influxdbFdwOptions->svr_port, fmstate->influxdbFdwOptions->svr_username, fmstate->influxdbFdwOptions->svr_password, fmstate->influxdbFdwOptions->svr_database, +#endif fmstate->param_influxdb_types, fmstate->param_influxdb_values, fmstate->p_nums); if (ret.r1 != NULL) { @@ -2400,11 +2471,17 @@ influxdbPlanDirectModify(PlannerInfo *root, * Update the fdw_private list that will be available to the executor. * Items in the list must match enum FdwDirectModifyPrivateIndex, above. */ +#if (PG_VERSION_NUM >= 150000) + fscan->fdw_private = list_make4(makeString(sql.data), + makeBoolean(retrieved_attrs != NIL), + retrieved_attrs, + makeBoolean(plan->canSetTag)); +#else fscan->fdw_private = list_make4(makeString(sql.data), makeInteger(0), retrieved_attrs, makeInteger(plan->canSetTag)); - +#endif /* * Update the foreign-join-related fields. */ @@ -2430,6 +2507,9 @@ influxdbBeginDirectModify(ForeignScanState *node, int eflags) Index rtindex; RangeTblEntry *rte; int numParams; +#ifdef CXX_CLIENT + ForeignTable *ftable; +#endif elog(DEBUG1, "influxdb_fdw : %s", __func__); @@ -2465,6 +2545,13 @@ influxdbBeginDirectModify(ForeignScanState *node, int eflags) /* Fetch options */ dmstate->influxdbFdwOptions = influxdb_get_options(rte->relid); +#ifdef CXX_CLIENT + if (!dmstate->influxdbFdwOptions->svr_version) + dmstate->influxdbFdwOptions->svr_version = influxdb_get_version_option(dmstate->influxdbFdwOptions); + /* get user mapping */ + ftable = GetForeignTable(RelationGetRelid(dmstate->rel)); + dmstate->user = GetUserMapping(GetUserId(), ftable->serverid); +#endif /* Update the foreign-join-related fields. */ if (fsplan->scan.scanrelid == 0) @@ -2487,12 +2574,22 @@ influxdbBeginDirectModify(ForeignScanState *node, int eflags) /* Get private info created by planner functions. */ dmstate->query = strVal(list_nth(fsplan->fdw_private, FdwDirectModifyPrivateUpdateSql)); +#if (PG_VERSION_NUM >= 150000) + dmstate->has_returning = boolVal(list_nth(fsplan->fdw_private, + FdwDirectModifyPrivateHasReturning)); +#else dmstate->has_returning = intVal(list_nth(fsplan->fdw_private, FdwDirectModifyPrivateHasReturning)); +#endif dmstate->retrieved_attrs = (List *) list_nth(fsplan->fdw_private, FdwDirectModifyPrivateRetrievedAttrs); +#if (PG_VERSION_NUM >= 150000) + dmstate->set_processed = boolVal(list_nth(fsplan->fdw_private, + FdwDirectModifyPrivateSetProcessed)); +#else dmstate->set_processed = intVal(list_nth(fsplan->fdw_private, FdwDirectModifyPrivateSetProcessed)); +#endif /* * Prepare for processing of parameters used in remote query, if any. @@ -2659,6 +2756,10 @@ influxdbImportForeignSchema(ImportForeignSchemaStmt *stmt, bool import_time_text = false; bool schemaless = false; struct InfluxDBSchemaInfo_return ret; +#ifdef CXX_CLIENT + ForeignServer *server; + UserMapping *mapping; +#endif elog(DEBUG1, "influxdb_fdw : %s", __func__); /* Parse statement options */ @@ -2677,9 +2778,15 @@ influxdbImportForeignSchema(ImportForeignSchemaStmt *stmt, } options = influxdb_get_options(serverOid); +#ifndef CXX_CLIENT ret = InfluxDBSchemaInfo(options->svr_address, options->svr_port, options->svr_username, options->svr_password, options->svr_database); +#else + server = GetForeignServer(serverOid); + mapping = GetUserMapping(GetUserId(), server->serverid); + ret = InfluxDBSchemaInfo(mapping, options); +#endif if (ret.r2 != NULL) { char *err = pstrdup(ret.r2); @@ -2925,7 +3032,11 @@ foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel) * different from those in the plan's targetlist. Use a copy of path * target to record the new sortgrouprefs. */ +#if (PG_VERSION_NUM <= 110000) grouping_target = copy_pathtarget(root->upper_targets[UPPERREL_GROUP_AGG]); +#else + grouping_target = copy_pathtarget(grouped_rel->reltarget); +#endif /* * Evaluate grouping targets and check whether they are safe to push down @@ -3382,13 +3493,17 @@ add_foreign_final_paths(PlannerInfo *root, RelOptInfo *input_rel, * Build the fdw_private list that will be used by influxdbGetForeignPlan. * Items in the list must match order in enum FdwPathPrivateIndex. */ +#if (PG_VERSION_NUM >= 150000) + fdw_private = list_make2(makeBoolean(has_final_sort), + makeBoolean(extra->limit_needed)); +#else fdw_private = list_make2(makeInteger(has_final_sort) #if (PG_VERSION_NUM >= 120000) ,makeInteger(extra->limit_needed)); #else ,makeInteger(false)); #endif - +#endif /* * Create foreign final path; this gets rid of a no-longer-needed outer * plan (if any), which makes the EXPLAIN output look cleaner @@ -3457,6 +3572,7 @@ influxdbGetForeignUpperPaths(PlannerInfo *root, UpperRelationKind stage, fpinfo = (InfluxDBFdwRelationInfo *) palloc0(sizeof(InfluxDBFdwRelationInfo)); fpinfo->pushdown_safe = false; + fpinfo->stage = stage; output_rel->fdw_private = fpinfo; switch (stage) @@ -3619,6 +3735,14 @@ influxdb_set_transmission_modes(void) PGC_USERSET, PGC_S_SESSION, GUC_ACTION_SAVE, true, 0, false); + /* + * In addition force restrictive search_path, in case there are any + * regproc or similar constants to be printed. + */ + (void) set_config_option("search_path", "pg_catalog", + PGC_USERSET, PGC_S_SESSION, + GUC_ACTION_SAVE, true, 0, false); + return nestlevel; } @@ -3694,7 +3818,8 @@ process_query_params(ExprContext *econtext, const char **param_values, Oid *param_types, InfluxDBType * param_influxdb_types, - InfluxDBValue * param_influxdb_values) + InfluxDBValue * param_influxdb_values, + InfluxDBColumnInfo *param_column_info) { int nestlevel; int i; @@ -3712,7 +3837,7 @@ process_query_params(ExprContext *econtext, /* Evaluate the parameter expression */ expr_value = ExecEvalExpr(expr_state, econtext, &isNull); /* Bind parameters */ - influxdb_bind_sql_var(param_types[i], i, expr_value, &isNull, + influxdb_bind_sql_var(param_types[i], i, expr_value, &isNull, param_column_info, param_influxdb_types, param_influxdb_values); /* @@ -3756,7 +3881,8 @@ create_cursor(ForeignScanState *node) values, festate->param_types, festate->param_influxdb_types, - festate->param_influxdb_values); + festate->param_influxdb_values, + festate->param_column_info); MemoryContextSwitchTo(oldcontext); } @@ -3792,7 +3918,8 @@ execute_dml_stmt(ForeignScanState *node) values, dmstate->param_types, dmstate->param_influxdb_types, - dmstate->param_influxdb_values); + dmstate->param_influxdb_values, + dmstate->param_column_info); MemoryContextSwitchTo(oldcontext); } @@ -3804,9 +3931,13 @@ execute_dml_stmt(ForeignScanState *node) * the desired result. This allows us to avoid assuming that the remote * server has the same OIDs we do for the parameters' types. */ +#ifdef CXX_CLIENT + ret = InfluxDBQuery(dmstate->query, dmstate->user, dmstate->influxdbFdwOptions, +#else ret = InfluxDBQuery(dmstate->query, dmstate->influxdbFdwOptions->svr_address, dmstate->influxdbFdwOptions->svr_port, dmstate->influxdbFdwOptions->svr_username, dmstate->influxdbFdwOptions->svr_password, dmstate->influxdbFdwOptions->svr_database, +#endif dmstate->param_influxdb_types, dmstate->param_influxdb_values, dmstate->numParams); if (ret.r1 != NULL) { @@ -3895,7 +4026,7 @@ execute_foreign_insert_modify(EState *estate, /* time column has no value */ if (!time_had_value) { - influxdb_bind_sql_var(type, bindnum, value, &is_null, + influxdb_bind_sql_var(type, bindnum, value, &is_null, fmstate->param_column_info, fmstate->param_influxdb_types, fmstate->param_influxdb_values); bind_num_time_column = bindnum; time_had_value = true; @@ -3910,7 +4041,7 @@ execute_foreign_insert_modify(EState *estate, elog(WARNING, "Inserting value has both \'time_text\' and \'time\' columns specified. The \'time\' will be ignored."); if (strcmp(col->column_name, INFLUXDB_TIME_TEXT_COLUMN) == 0) { - influxdb_bind_sql_var(type, bind_num_time_column, value, &is_null, + influxdb_bind_sql_var(type, bind_num_time_column, value, &is_null, fmstate->param_column_info, fmstate->param_influxdb_types, fmstate->param_influxdb_values); } fmstate->param_influxdb_types[bindnum] = INFLUXDB_NULL; @@ -3918,7 +4049,7 @@ execute_foreign_insert_modify(EState *estate, } } else - influxdb_bind_sql_var(type, bindnum, value, &is_null, + influxdb_bind_sql_var(type, bindnum, value, &is_null, fmstate->param_column_info, fmstate->param_influxdb_types, fmstate->param_influxdb_values); } bindnum++; @@ -3929,10 +4060,14 @@ execute_foreign_insert_modify(EState *estate, Assert(bindnum == fmstate->p_nums * numSlots); /* Insert the record */ +#ifndef CXX_CLIENT ret = InfluxDBInsert(fmstate->influxdbFdwOptions->svr_address, fmstate->influxdbFdwOptions->svr_port, fmstate->influxdbFdwOptions->svr_username, fmstate->influxdbFdwOptions->svr_password, - fmstate->influxdbFdwOptions->svr_database, tablename, fmstate->param_column_info, - fmstate->param_influxdb_types, fmstate->param_influxdb_values, fmstate->p_nums, numSlots); + fmstate->influxdbFdwOptions->svr_database, tablename, +#else + ret = InfluxDBInsert(tablename, fmstate->user, fmstate->influxdbFdwOptions, +#endif + fmstate->param_column_info, fmstate->param_influxdb_types, fmstate->param_influxdb_values, fmstate->p_nums, numSlots); if (ret != NULL) elog(ERROR, "influxdb_fdw : %s", ret); diff --git a/influxdb_fdw.h b/influxdb_fdw.h index 195d3d0..7d47ee7 100644 --- a/influxdb_fdw.h +++ b/influxdb_fdw.h @@ -2,7 +2,7 @@ * * InfluxDB Foreign Data Wrapper for PostgreSQL * - * Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION + * Portions Copyright (c) 2018, TOSHIBA CORPORATION * * IDENTIFICATION * influxdb_fdw.h @@ -13,7 +13,13 @@ #ifndef INFLUXDB_FDW_H #define INFLUXDB_FDW_H +#ifdef GO_CLIENT #include "_obj/_cgo_export.h" +#else +#ifdef CXX_CLIENT +#include "query_cxx.h" +#endif +#endif #include "foreign/foreign.h" #include "lib/stringinfo.h" @@ -30,7 +36,6 @@ #endif #include "utils/rel.h" -#include "funcapi.h" #define WAIT_TIMEOUT 0 #define INTERACTIVE_TIMEOUT 0 @@ -70,7 +75,12 @@ #define INFLUXDB_TARGETS_MIXING_AGGREF_UNSAFE (INFLUXDB_TARGETS_MARK_COLUMN | INFLUXDB_TARGETS_MARK_AGGREF) #define INFLUXDB_TARGETS_MIXING_AGGREF_SAFE (0u) -#define CODE_VERSION 10200 +#define CODE_VERSION 20000 + +#ifdef CXX_CLIENT +#define INFLUXDB_VERSION_1 1 +#define INFLUXDB_VERSION_2 2 +#endif /* * Options structure to store the InfluxDB @@ -86,15 +96,20 @@ typedef struct influxdb_opt char *svr_password; /* InfluxDB password */ List *tags_list; /* Contain tag keys of a foreign table */ int schemaless; /* Schemaless mode */ +#ifdef CXX_CLIENT + int svr_version; /* InfluxDB version. Only be 1 or 2 */ + char *svr_token; /* Token for InfluxDB V2 Token authentication */ + char *svr_retention_policy; /* Retention policy of target database */ +#endif } influxdb_opt; typedef struct schemaless_info { - bool schemaless; /* Enable schemaless check */ - Oid slcol_type_oid; /* Schemaless column's jsonb type OID */ - Oid jsonb_op_oid; /* Jsonb type "->>" arrow operator OID */ + bool schemaless; /* Enable schemaless check */ + Oid slcol_type_oid; /* Schemaless column's jsonb type OID */ + Oid jsonb_op_oid; /* Jsonb type "->>" arrow operator OID */ - Oid relid; /* OID of the relation */ + Oid relid; /* OID of the relation */ } schemaless_info; /* @@ -106,6 +121,7 @@ typedef struct InfluxDBFdwExecState char *query; /* Query string */ Relation rel; /* relcache entry for the foreign table */ Oid relid; /* relation oid */ + UserMapping *user; /* User mapping of foreign server */ List *retrieved_attrs; /* list of target attribute numbers */ char **params; @@ -149,7 +165,7 @@ typedef struct InfluxDBFdwExecState /* Schemaless info */ schemaless_info slinfo; - void *temp_result; + void *temp_result; } InfluxDBFdwExecState; typedef struct InfluxDBFdwRelationInfo @@ -249,7 +265,7 @@ typedef struct InfluxDBFdwRelationInfo /* Schemaless info */ schemaless_info slinfo; /* JsonB column list */ - List *slcols; + List *slcols; } InfluxDBFdwRelationInfo; extern bool influxdb_is_foreign_expr(PlannerInfo *root, @@ -263,6 +279,9 @@ extern bool influxdb_is_foreign_function_tlist(PlannerInfo *root, /* option.c headers */ extern influxdb_opt * influxdb_get_options(Oid foreigntableid); +#ifdef CXX_CLIENT +extern int influxdb_get_version_option(influxdb_opt *opt); +#endif /* depare.c headers */ extern void influxdb_deparse_select_stmt_for_rel(StringInfo buf, PlannerInfo *root, RelOptInfo *rel, @@ -291,7 +310,7 @@ extern Datum influxdb_convert_to_pg(Oid pgtyp, int pgtypmod, char *value); extern Datum influxdb_convert_record_to_datum(Oid pgtyp, int pgtypmod, char **row, int attnum, int ntags, int nfield, char **column, char *opername, Oid relid, int ncol, bool is_schemaless); -extern void influxdb_bind_sql_var(Oid type, int attnum, Datum value, bool *isnull, +extern void influxdb_bind_sql_var(Oid type, int attnum, Datum value, bool *isnull, InfluxDBColumnInfo *param_column_info, InfluxDBType * param_influxdb_types, InfluxDBValue * param_influxdb_values); extern char *influxdb_get_data_type_name(Oid data_type_id); extern bool influxdb_is_mixing_aggref(List *tlist); @@ -299,7 +318,7 @@ extern bool influxdb_is_tag_key(const char *colname, Oid reloid); extern char *influxdb_get_column_name(Oid relid, int attnum); extern char *influxdb_get_table_name(Relation rel); extern int influxdb_get_number_field_key_match(Oid relid, char *regex); -extern int influxdb_get_number_tag_key(Oid relid, schemaless_info *pslinfo); +extern int influxdb_get_number_tag_key(Oid relid, schemaless_info * pslinfo); extern bool influxdb_is_builtin(Oid oid); extern bool influxdb_is_regex_argument(Const *node, char **extval); extern bool influxdb_is_star_func(Oid funcid, char *in); @@ -308,12 +327,29 @@ extern bool influxdb_is_grouping_target(TargetEntry *tle, Query *query); extern char *influxdb_escape_json_string(char *string); extern char *influxdb_escape_record_string(char *string); -extern List *influxdb_pull_slvars(Expr *expr, Index varno, List *columns, bool extract_raw, List *remote_exprs, schemaless_info *pslinfo); -extern void influxdb_get_schemaless_info(schemaless_info *pslinfo, bool schemaless, Oid reloid); -extern char *influxdb_get_slvar(Expr *node, schemaless_info *slinfo); - -extern bool influxdb_is_select_all(RangeTblEntry *rte, List *tlist, schemaless_info *pslinfo); -extern bool influxdb_is_slvar(Oid oid, int attnum, schemaless_info *pslinfo, bool *is_tags, bool *is_fields); -extern bool influxdb_is_slvar_fetch(Node *node, schemaless_info *pslinfo); -extern bool influxdb_is_param_fetch(Node *node, schemaless_info *pslinfo); +extern List *influxdb_pull_slvars(Expr *expr, Index varno, List *columns, bool extract_raw, List *remote_exprs, schemaless_info * pslinfo); +extern void influxdb_get_schemaless_info(schemaless_info * pslinfo, bool schemaless, Oid reloid); +extern char *influxdb_get_slvar(Expr *node, schemaless_info * slinfo); + +extern bool influxdb_is_select_all(RangeTblEntry *rte, List *tlist, schemaless_info * pslinfo); +extern bool influxdb_is_slvar(Oid oid, int attnum, schemaless_info * pslinfo, bool *is_tags, bool *is_fields); +extern bool influxdb_is_slvar_fetch(Node *node, schemaless_info * pslinfo); +extern bool influxdb_is_param_fetch(Node *node, schemaless_info * pslinfo); + +#ifdef CXX_CLIENT +/* InfluxDBSchemaInfo returns information of table if success */ +extern struct InfluxDBSchemaInfo_return InfluxDBSchemaInfo(UserMapping *user, influxdb_opt *opts); +/* InfluxDBFreeSchemaInfo returns nothing */ +extern void InfluxDBFreeSchemaInfo(struct TableInfo* tableInfo, long long length); +/* InfluxDBQuery returns result set */ +extern struct InfluxDBQuery_return InfluxDBQuery(char *query, UserMapping *user, influxdb_opt *opts, InfluxDBType* ctypes, InfluxDBValue* cvalues, int cparamNum); +/* InfluxDBFreeResult returns nothing */ +extern void InfluxDBFreeResult(InfluxDBResult* result); +/* InfluxDBInsert returns nil if success */ +extern char* InfluxDBInsert(char *table_name, UserMapping *user, influxdb_opt *opts, struct InfluxDBColumnInfo* ccolumns, InfluxDBType* ctypes, InfluxDBValue* cvalues, int cparamNum, int cnumSlots); +/* If version not set, check to which version can be connected */ +extern int check_connected_influxdb_version(char* addr, int port, char* user, char* pass, char* db, char* auth_token, char* retention_policy); +/* clean up all cache connections of influx cxx client */ +extern void cleanup_cxx_client_connection(void); +#endif /* CXX_CLIENT */ #endif /* InfluxDB_FDW_H */ diff --git a/influxdb_query.c b/influxdb_query.c index 918fbfc..ad41756 100644 --- a/influxdb_query.c +++ b/influxdb_query.c @@ -2,7 +2,7 @@ * * InfluxDB Foreign Data Wrapper for PostgreSQL * - * Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION + * Portions Copyright (c) 2018, TOSHIBA CORPORATION * * IDENTIFICATION * influxdb_query.c @@ -274,7 +274,7 @@ influxdb_convert_record_to_datum(Oid pgtyp, int pgtypmod, char **row, int attnum * Bind the values provided as DatumBind the values and nulls to modify the target table */ void -influxdb_bind_sql_var(Oid type, int idx, Datum value, bool *isnull, +influxdb_bind_sql_var(Oid type, int idx, Datum value, bool *isnull, InfluxDBColumnInfo *param_column_info, InfluxDBType * param_influxdb_types, InfluxDBValue * param_influxdb_values) { @@ -379,7 +379,28 @@ influxdb_bind_sql_var(Oid type, int idx, Datum value, bool *isnull, getTypeOutputInfo(type, &outputFunctionId, &typeVarLength); outputString = OidOutputFunctionCall(outputFunctionId, value); param_influxdb_values[idx].s = outputString; - param_influxdb_types[idx] = INFLUXDB_TIME; +#ifdef CXX_CLIENT + if (param_column_info[idx].column_type == INFLUXDB_TIME_KEY) + { + const int64 postgres_to_unix_epoch_usecs = (POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * USECS_PER_DAY; + Timestamp valueTimestamp = DatumGetTimestamp(value); + int64 valueNanoSecs = (valueTimestamp + postgres_to_unix_epoch_usecs) * 1000; + + param_influxdb_values[idx].i = valueNanoSecs; + } +#endif + /* + * In InfluxDB, Measurements,tag keys,tag values and field + * keys are always strings type. And Field values only can be + * floats, integers, strings, or Booleans. So if column isn't + * 'time' column in InfluxdDB, data will be store like strings + * in InfluxDB. + */ + if (param_column_info[idx].column_type != INFLUXDB_TIME_KEY) + param_influxdb_types[idx] = INFLUXDB_STRING; + else + param_influxdb_types[idx] = INFLUXDB_TIME; + break; } default: diff --git a/init.sh b/init.sh index 08e9c2e..ed556d7 100755 --- a/init.sh +++ b/init.sh @@ -1,18 +1,131 @@ -influx -import -path=init/init.txt -precision=s -influx -import -path=init/selectfunc.txt -precision=s - -influx -import -path=init/others.txt -precision=ns -influx -import -path=init/join.txt -precision=ns -influx -import -path=init/select.txt -precision=ns -influx -import -path=init/onek.txt -precision=ns -influx -import -path=init/tenk.txt -precision=ns -influx -import -path=init/agg.txt -precision=ns -influx -import -path=init/student.txt -precision=ns -influx -import -path=init/person.txt -precision=ns -influx -import -path=init/streets.txt -precision=ns -influx -import -path=init/emp.txt -precision=ns -influx -import -path=init/stud_emp.txt -precision=ns - -influx -import -path=init/init_post.txt -precision=ns - -influx -import -path=init/schemaless.txt -precision=ns +#! /bin/bash + +# InfluxDB systemtest config +container_name_v2='influxdb_server_v2' +influxdbV2_image='influxdb:2.2' +container_name_v1='influxdb_server_v1' +influxdbV1_image='influxdb:1.8.10' + +if [[ "--CXX_V2" == $1 || "--CXX_V1" == $1 ]]; then + # clean influxdb server if exists + if [ "$(docker ps -aq -f name=^/${container_name_v2}$)" ]; then + if [ "$(docker ps -aq -f status=exited -f status=created -f name=^/${container_name_v2}$)" ]; then + docker rm ${container_name_v2} + else + docker rm $(docker stop ${container_name_v2}) + fi + fi + + if [ "$(docker ps -aq -f name=^/${container_name_v1}$)" ]; then + if [ "$(docker ps -aq -f status=exited -f status=created -f name=^/${container_name_v1}$)" ]; then + docker rm ${container_name_v1} + else + docker rm $(docker stop ${container_name_v1}) + fi + fi + + # run server + docker run -d --name ${container_name_v1} -it -p 18086:8086 \ + -e "INFLUXDB_HTTP_AUTH_ENABLED=true" \ + -e "INFLUXDB_ADMIN_ENABLED=true" \ + -e "INFLUXDB_ADMIN_USER=user" \ + -e "INFLUXDB_ADMIN_PASSWORD=pass" \ + -v $(pwd)/init:/tmp \ + ${influxdbV1_image} + + # If timeout occurs, please increase this time + sleep 10 + + docker run -d --name ${container_name_v2} -it -p 38086:8086 \ + -e "DOCKER_INFLUXDB_INIT_MODE=setup" \ + -e "DOCKER_INFLUXDB_INIT_USERNAME=root" \ + -e "DOCKER_INFLUXDB_INIT_PASSWORD=rootroot" \ + -e "DOCKER_INFLUXDB_INIT_ORG=myorg" \ + -e "DOCKER_INFLUXDB_INIT_BUCKET=mybucket" \ + -e "DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=mytoken" \ + -e "INFLUXD_STORAGE_WRITE_TIMEOUT=100s" \ + -v $(pwd)/init_v2:/tmp \ + ${influxdbV2_image} + + # If timeout occurs, please increase this time + sleep 10 +fi + + +if [[ "--CXX_V2" == $1 ]]; then + # create buket and database mapping for v2 + COREDB_ID=$(docker exec ${container_name_v2} influx bucket create -n coredb | grep coredb | cut -f 1) + docker exec ${container_name_v2} influx v1 dbrp create --bucket-id $COREDB_ID --db coredb -rp autogen --default + SCHEMALESS_ID=$(docker exec ${container_name_v2} influx bucket create -n schemalessdb | grep schemalessdb | cut -f 1) + docker exec ${container_name_v2} influx v1 dbrp create --bucket-id $SCHEMALESS_ID --db schemalessdb -rp autogen --default --org myorg + POST_ID=$(docker exec ${container_name_v2} influx bucket create -n postdb | grep postdb | cut -f 1) + docker exec ${container_name_v2} influx v1 dbrp create --bucket-id $POST_ID --db postdb -rp autogen --default --org myorg + MYDB_ID=$(docker exec ${container_name_v2} influx bucket create -n mydb | grep mydb | cut -f 1) + docker exec ${container_name_v2} influx v1 dbrp create --bucket-id $MYDB_ID --db mydb -rp autogen --default --org myorg + MYDB2_ID=$(docker exec ${container_name_v2} influx bucket create -n mydb2 | grep mydb2 | cut -f 1) + docker exec ${container_name_v2} influx v1 dbrp create --bucket-id $MYDB2_ID --db mydb2 -rp autogen --default --org myorg + OPTIONDB_ID=$(docker exec ${container_name_v2} influx bucket create -n optiondb | grep optiondb | cut -f 1) + docker exec ${container_name_v2} influx v1 dbrp create --bucket-id $OPTIONDB_ID --db optiondb -rp autogen --default + + # Init data V2 + docker exec ${container_name_v2} influx write --bucket mydb --precision s --file /tmp/init.txt + docker exec ${container_name_v2} influx write --bucket mydb2 --precision s --file /tmp/selectfunc.txt + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/agg.txt + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/emp.txt + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/join.txt + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/others.txt + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/person.txt + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/select.txt + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/stud_emp.txt + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/student.txt + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/onek.txt + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/streets.txt + sleep 5 + docker exec ${container_name_v2} influx write --bucket coredb --precision ns --file /tmp/tenk.txt + docker exec ${container_name_v2} influx write --bucket schemalessdb --precision ns --file /tmp/schemaless.txt + docker exec ${container_name_v2} influx write --bucket optiondb --precision ns --file /tmp/option.txt + + # Init data V1 + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/option.txt -precision=ns + +elif [[ "--CXX_V1" == $1 ]]; then + # Init data V1 + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/init.txt -precision=s + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/selectfunc.txt -precision=s + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/others.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/join.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/select.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/onek.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/tenk.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/agg.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/student.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/person.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/streets.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/emp.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/stud_emp.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/init_post.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/schemaless.txt -precision=ns + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/option.txt -precision=ns + + # Init data V2 + OPTIONDB_ID=$(docker exec ${container_name_v2} influx bucket create -n optiondb | grep optiondb | cut -f 1) + docker exec ${container_name_v2} influx v1 dbrp create --bucket-id $OPTIONDB_ID --db optiondb -rp autogen --default + docker exec ${container_name_v2} influx write --bucket optiondb --precision ns --file /tmp/option.txt + +else + influx -import -path=init/init.txt -precision=s + influx -import -path=init/selectfunc.txt -precision=s + influx -import -path=init/others.txt -precision=ns + influx -import -path=init/join.txt -precision=ns + influx -import -path=init/select.txt -precision=ns + influx -import -path=init/onek.txt -precision=ns + influx -import -path=init/tenk.txt -precision=ns + influx -import -path=init/agg.txt -precision=ns + influx -import -path=init/student.txt -precision=ns + influx -import -path=init/person.txt -precision=ns + influx -import -path=init/streets.txt -precision=ns + influx -import -path=init/emp.txt -precision=ns + influx -import -path=init/stud_emp.txt -precision=ns + influx -import -path=init/init_post.txt -precision=ns + influx -import -path=init/schemaless.txt -precision=ns +fi \ No newline at end of file diff --git a/init/init_performance.txt b/init/init_performance.txt new file mode 100644 index 0000000..beb9117 --- /dev/null +++ b/init/init_performance.txt @@ -0,0 +1,6 @@ +# DDL +DROP DATABASE performance_test +CREATE DATABASE performance_test + +# DML +# CONTEXT-DATABASE: performance_test diff --git a/init/join.txt b/init/join.txt index 2508589..589ed57 100644 --- a/init/join.txt +++ b/init/join.txt @@ -4,3 +4,25 @@ q1 q1=1i 0000000000000000001 q2 q2=0i 0000000000000000001 + + +b_star class="b",aa=3i,bb="mumble" 0000000000000000001 +b_star class="b",aa=4i 0000000000000000002 +b_star class="b",bb="bumble" 0000000000000000003 +b_star class="" 0000000000000000004 +b_star class="d",aa=7i,bb="grumble" 0000000000000000005 +b_star class="d",aa=8i,bb="stumble" 0000000000000000006 +b_star class="d",aa=9i,bb="rumble" 0000000000000000007 +b_star class="d",aa=10i 0000000000000000008 +b_star class="d",bb="crumble" 0000000000000000009 +b_star class="d",aa=11i,bb="fumble" 0000000000000000010 +b_star class="d",aa=12i 0000000000000000011 +b_star class="d",aa=13i 0000000000000000012 +b_star class="d",bb="tumble" 0000000000000000013 +b_star class="d",bb="humble" 0000000000000000014 +b_star class="d" 0000000000000000015 +b_star class="d",aa=14i 0000000000000000016 +b_star class="d",bb="jumble" 0000000000000000017 +b_star class="d" 0000000000000000018 +b_star class="d" 0000000000000000019 +b_star class="d" 0000000000000000020 \ No newline at end of file diff --git a/init/option.txt b/init/option.txt new file mode 100644 index 0000000..02db319 --- /dev/null +++ b/init/option.txt @@ -0,0 +1,13 @@ +# DDL +DROP DATABASE optiondb +CREATE DATABASE optiondb + +# DML +# CONTEXT-DATABASE: optiondb + +optiontbl,tag1=a version="version 1",value2=100 0 +optiontbl,tag1=a version="version 1",value2=200 1 +optiontbl,tag1=a version="version 1",value2=300 2 +optiontbl,tag1=b version="version 1",value2=400 3 +optiontbl,tag1=b version="version 1",value2=500 4 + diff --git a/init_performance.sh b/init_performance.sh new file mode 100755 index 0000000..7ef1670 --- /dev/null +++ b/init_performance.sh @@ -0,0 +1,86 @@ +#! /bin/bash + +# InfluxDB systemtest config +container_name_v2='influxdb_server_v2' +influxdbV2_image='influxdb:2.2' +container_name_v1='influxdb_server_v1' +influxdbV1_image='influxdb:1.8.10' +container_name_go='influxdb_server_go' + +usage() { echo "Usage: $0 [-t ]" 1>&2; exit 1; } + +while getopts ":t:" o; do + case "${o}" in + t) + t=${OPTARG} + ;; + *) + usage + ;; + esac +done +shift $((OPTIND-1)) + +if [ -z "${t}" ]; then + echo "target client required!" + usage +fi + +function docker_cleanup() +{ + if [ "$(docker ps -aq -f name=^/${1}$)" ]; then + if [ "$(docker ps -aq -f status=exited -f status=created -f name=^/${1}$)" ]; then + docker rm ${1} + else + docker rm $(docker stop ${1}) + fi + fi +} + +if [[ "CXX_V2" == $t ]]; then + docker_cleanup $container_name_v2 + docker run -d --name ${container_name_v2} -it -p 38086:8086 \ + -e "DOCKER_INFLUXDB_INIT_MODE=setup" \ + -e "DOCKER_INFLUXDB_INIT_USERNAME=root" \ + -e "DOCKER_INFLUXDB_INIT_PASSWORD=rootroot" \ + -e "DOCKER_INFLUXDB_INIT_ORG=myorg" \ + -e "DOCKER_INFLUXDB_INIT_BUCKET=mybucket" \ + -e "DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=mytoken" \ + -e "INFLUXD_STORAGE_WRITE_TIMEOUT=100s" \ + -v $(pwd)/init_v2:/tmp \ + ${influxdbV2_image} + + # If timeout occurs, please increase this time + sleep 10 + # create buket and database mapping for v2 + PER_MEASURE=$(docker exec ${container_name_v2} influx bucket create -n performance_test | grep performance_test | cut -f 1) + docker exec ${container_name_v2} influx v1 dbrp create --bucket-id $PER_MEASURE --db performance_test -rp autogen --default + +elif [[ "CXX_V1" == $t ]]; then + docker_cleanup $container_name_v1 + docker run -d --name ${container_name_v1} -it -p 18086:8086 \ + -e "INFLUXDB_HTTP_AUTH_ENABLED=true" \ + -e "INFLUXDB_ADMIN_ENABLED=true" \ + -e "INFLUXDB_ADMIN_USER=user" \ + -e "INFLUXDB_ADMIN_PASSWORD=pass" \ + -v $(pwd)/init:/tmp \ + ${influxdbV1_image} + + # If timeout occurs, please increase this time + sleep 10 + + # Init data V1 + docker exec ${container_name_v1} influx -username=user -password=pass -import -path=/tmp/init_performance.txt -precision=s + +elif [[ "GO" == $t ]]; then + docker_cleanup $container_name_go + # run server + docker run -d --name ${container_name_go} -it -p 8086:8086 \ + -v $(pwd)/init:/tmp \ + ${influxdbV1_image} + # If timeout occurs, please increase this time + sleep 10 + docker exec ${container_name_go} influx -import -path=/tmp/init_performance.txt -precision=s +else + usage +fi diff --git a/init_v2/agg.txt b/init_v2/agg.txt new file mode 100644 index 0000000..3077307 --- /dev/null +++ b/init_v2/agg.txt @@ -0,0 +1,7 @@ +# DML +# CONTEXT-DATABASE: coredb + +agg a=56i,b=7.8 86400000000000 +agg a=100i,b=99.097 172800000000000 +agg a=0i,b=0.09561 259200000000000 +agg a=42i,b=324.78 345600000000000 diff --git a/init_v2/emp.txt b/init_v2/emp.txt new file mode 100644 index 0000000..0f08327 --- /dev/null +++ b/init_v2/emp.txt @@ -0,0 +1,6 @@ +# DML +# CONTEXT-DATABASE: coredb + +emp name="sharon",age=25i,location="(15,12)",salary=1000i,manager="sam" 4330000000000000 +emp name="sam",age=30i,location="(10,5)",salary=2000i,manager="bill" 4340000000000000 +emp name="bill",age=20i,location="(11,10)",salary=1000i,manager="sharon" 4350000000000000 diff --git a/init_v2/fields_add_1.txt b/init_v2/fields_add_1.txt new file mode 100644 index 0000000..9b0c81e --- /dev/null +++ b/init_v2/fields_add_1.txt @@ -0,0 +1,12 @@ +# DML +# CONTEXT-DATABASE: schemalessdb + +sctbl1,device_id=dev1 sig1=11i,sig2="2e2eawekfrjq2o",sig3=-0.79769313486,sig4=true,sig5=T 1556813561098000000 +sctbl1,device_id=d\ \,\=ev2 sig1=2222i,sig2="x'a8a9aaabacadaeaf'",sig3=-1.0,sig4=false,sig5=F 1465839830100400200 +sctbl1,device_id='dev3' sig1=34422i,sig2="散りぬるを我が世誰",sig3=0.32,sig4=false,sig5=t 9223372036854775806 +sctbl1,device_id=dev1 sig1=-664i,sig3=0.78,sig4=true,sig5=f -9223372036854775806 +sctbl1,device_id=dev2 sig1=35655i,sig2="abcdefghijklmnopqrstuvwxyz",sig3=0.25,sig4=false,sig5=T 1465839830100400200 +sctbl1,device_id=dev3 sig1=65535i,sig2="`~!@#$%^&*()_+=",sig3=-0.91,sig4=false,sig5=T 1465839830100400200 +sctbl1,device_id="dev\ 1" sig1=70220i,sig2="いろはにほへど ちりぬるをわがよたれぞ",sig3=0.37,sig4=true,sig5=F 1556813561098000000 +sctbl1,device_id=dev2 sig1=-8555i,sig2="AHWEMAKDF",sig3=0.34,sig4=false,sig5=F 1556813561098000000 +sctbl1,device_id=dev3 sig1=319i,sig2="P_AEF-wefA",sig3=0.32,sig4=false,sig5=T 1556813561098000000 diff --git a/init_v2/fields_add_20.txt b/init_v2/fields_add_20.txt new file mode 100644 index 0000000..2771c9a --- /dev/null +++ b/init_v2/fields_add_20.txt @@ -0,0 +1,12 @@ +# DML +# CONTEXT-DATABASE: schemalessdb + +sctbl1,device_id=dev1 sig1=11i,sig2="2e2eawekfrjq2o",sig3=-0.797693134862,sig4=true,sig5=T,sig6=11i,sig7=-1.234456e+78,sig8=1.023,sig9=-0.421,sig10=226i,sig11="ws",sig12="this is a string",sig13=t,sig14="example string",sig15=9223372036854775807i,sig16=-9223372036854775808i,sig17=9223372036854775807i,sig18="west",sig19="east",sig20="OFF",sig21=true,sig22="wef",sig23=1112i,sig24=122i,sig25=0.0 1556813561098000000 +sctbl1,device_id=d\ \,\=ev2 sig1=2222i,sig2="x'a8a9aaabacadaeaf'",sig3=-1.0,sig4=false,sig5=F,sig6=33666i,sig7=-1.234456e+7,sig8=2.024,sig9=-0.22,sig10=26i,sig11="Os",sig12="this is a string",sig13=t,sig14="example string",sig15=9223372036854775807i,sig16=-9223372036854775808i,sig17=9223372036854775807i,sig18="west",sig19="east",sig20="OFF",sig21=false,sig22="wef",sig23=1112i,sig24=122i,sig25=0.1 1465839830100400200 +sctbl1,device_id='dev3' sig1=34422i,sig2="散りぬるを我が世誰",sig3=0.32,sig4=false,sig5=t,sig6=232i,sig7=1.234456e+8,sig8=3.025,sig9=-0.423,sig10=22i,sig11="Zep",sig13=f,sig15=9223372036854775807i,sig16=-9223372036854775808i,sig17=9223372036854775807i,sig18="west",sig19="east",sig21=TRUE,sig22="wef",sig23=1112i,sig24=122i,sig25=0.2 9223372036854775806 +sctbl1,device_id=dev1 sig1=-664i,sig3=0.78,sig4=true,sig5=f,sig6=22i,sig7=-1.234456e+8,sig8=4.026,sig9=0.24,sig10=33i,sig11=")#O3-kaej",sig12="this is a string",sig13=t,sig14="example string",sig15=9223372036854775807i,sig16=-9223372036854775808i,sig17=9223372036854775807i,sig18="west",sig19="east",sig20="OFF",sig21=FALSE,sig22="wef",sig23=1112i,sig24=122i,sig25=0.0 -9223372036854775806 +sctbl1,device_id=dev2 sig1=35655i,sig2="abcdefghijklmnopqrstuvwxyz",sig3=0.25,sig4=false,sig5=T,sig6=33i,sig7=3.234456e+8,sig8=5.027,sig9=0.425,sig10=44i,sig11="3ae\aefw\naf",sig12="this is a string",sig13=t,sig14="example string",sig15=9223372036854775807i,sig16=-9223372036854775808i,sig17=9223372036854775807i,sig18="west",sig19="east",sig20="OFF",sig21=t,sig22="wef",sig23=1112i,sig24=122i,sig25=0.0 1465839830100400200 +sctbl1,device_id=dev3 sig1=65535i,sig2="`~!@#$%^&*()_+=",sig3=-0.91,sig4=false,sig5=T,sig6=311i,sig7=-1.234456e+8,sig8=6.028,sig9=0.26,sig10=55i,sig11="wwefs",sig13=f,sig14="example string",sig15=9223372036854775807i,sig16=-9223372036854775808i,sig17=9223372036854775807i,sig20="OFF",sig21=f,sig22="wef",sig23=1112i,sig24=122i,sig25=0.5 1465839830100400200 +sctbl1,device_id="dev\ 1" sig1=70220i,sig2="いろはにほへど ちりぬるをわがよたれぞ",sig3=0.37,sig4=true,sig5=F,sig6=43i,sig7=2.234456e+8,sig8=7.029,sig9=-0.27,sig10=66i,sig11="3333",sig12="this is a string",sig13=t,sig14="example string",sig15=9223372036854775807i,sig16=-9223372036854775808i,sig17=9223372036854775807i,sig18="west",sig19="east",sig20="OFF",sig21=T,sig22="wef",sig23=1112i,sig24=122i,sig25=0.0 1556813561098000000 +sctbl1,device_id=dev2 sig1=-8555i,sig2="AHWEMAKDF",sig3=0.34,sig4=false,sig5=F,sig6=5i,sig7=-1.234456e+8,sig8=8.030,sig9=-0.9,sig10=77i,sig11="333u",sig12="this is a string",sig13=f,sig14="example string",sig15=9223372036854775807i,sig16=-9223372036854775808i,sig17=9223372036854775807i,sig18="west",sig19="east",sig20="OFF",sig21=F,sig22="wef",sig23=1112i,sig24=122i,sig25=0.7 1556813561098000000 +sctbl1,device_id=dev3 sig1=319i,sig2="P_AEF-wefA",sig3=0.32,sig4=false,sig5=T,sig6=111545i,sig7=-2.234456e+8,sig8=9.031,sig9=-0.9,sig10=8228i,sig11="1122e",sig13=t,sig14="example string",sig15=9223372036854775807i,sig16=-9223372036854775808i,sig17=9223372036854775807i,sig18="west",sig19="east",sig20="OFF",sig21=true,sig22="wef",sig23=1112i,sig24=122i,sig25=0.00 1556813561098000000 diff --git a/init_v2/fields_original.txt b/init_v2/fields_original.txt new file mode 100644 index 0000000..78f05f2 --- /dev/null +++ b/init_v2/fields_original.txt @@ -0,0 +1,26 @@ +# DDL +# DROP DATABASE schemalessdb +# CREATE DATABASE schemalessdb + +# DML +# CONTEXT-DATABASE: schemalessdb + +sctbl1,device_id=dev1 sig1=11i,sig2="2e2eawekfrjq2o",sig3=-0.79769313486,sig4=true 1556813561098000000 +sctbl1,device_id=d\ \,\=ev2 sig1=2222i,sig2="x'a8a9aaabacadaeaf'",sig3=-1.0,sig4=false 1465839830100400200 +sctbl1,device_id='dev3' sig1=34422i,sig2="散りぬるを我が世誰",sig3=0.32,sig4=false 9223372036854775806 +sctbl1,device_id=dev1 sig1=-664i,sig3=0.78,sig4=true -9223372036854775806 +sctbl1,device_id=dev2 sig1=35655i,sig2="abcdefghijklmnopqrstuvwxyz",sig3=0.25,sig4=false 1465839830100400200 +sctbl1,device_id=dev3 sig1=65535i,sig2="`~!@#$%^&*()_+=",sig3=-0.91,sig4=false 1465839830100400200 +sctbl1,device_id="dev\ 1" sig1=70220i,sig2="いろはにほへど ちりぬるをわがよたれぞ",sig3=0.37,sig4=true 1556813561098000000 +sctbl1,device_id=dev2 sig1=-8555i,sig2="AHWEMAKDF",sig3=0.34,sig4=false 1556813561098000000 +sctbl1,device_id=dev3 sig1=319i,sig2="P_AEF-wefA",sig3=0.32,sig4=false 1556813561098000000 + +sctbl2,device_id=dev1 sig1=102i,sig2="~!*)!@*#a",sig3=-8810.1,sig5="[(-122.0265,37.049),(-122.0271,37.045)]" 1465839830100400200 +sctbl2,device_id=dev2 sig1=-20i,sig2="+(#@!_#(_",sig3=4282.8730,sig4=false,sig5="[(-122.103913,37.66632),(-122.104037,37.66611),(-122.104051,37.66609)]" 1556813561098000000 +sctbl2,device_id=dev3 sig1=-30i,sig3=102.3827810127,sig4=false,sig5="[(-122.106469,37.66446),(-122.1067,37.664)]" -9223372036854775806 +sctbl2,device_id=dev1 sig1=640i,sig2="敷ヘカウ告政ヨハツヤ",sig3=20.4222211221,sig4=true,sig5="[(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)]" 1465839830100400200 +sctbl2,device_id=dev2 sig1=7950i,sig2="`~!@#$%^&*()_+=-{}[]|:;<>?/.",sig3=220.2215,sig4=false,sig5="[(-122.2364,37.436),(-122.2364,37.443)]" 1556813561098000000 +sctbl2,device_id=dev3 sig1=660i,sig2="ăâđêôơư",sig3=35520.12126,sig4=false,sig5="[(-121.742,37.829),(-121.742,37.822)]" 1556813561098000000 +sctbl2,device_id=dev1 sig1=7060i,sig3=-3230.17,sig4=true,sig5="[(-121.9044,37.895),(-121.9044,37.899)]" 9223372036854775806 +sctbl2,device_id=dev2 sig1=-7880i,sig2="EFQEF",sig3=2330.8,sig4=false,sig5="[(-121.9026,37.843),(-121.9028,37.843)]" 9223372036854775806 +sctbl2,device_id=dev3 sig1=6990i,sig2="wr3wri",sig3=5630.9,sig4=false,sig5="[(-121.900576,37.74452),(-121.900804,37.74889)]" 1556813561098000000 diff --git a/init_v2/init.txt b/init_v2/init.txt new file mode 100644 index 0000000..a7ab5fd --- /dev/null +++ b/init_v2/init.txt @@ -0,0 +1,45 @@ +# DDL +# DROP DATABASE mydb +# CREATE DATABASE mydb + +# DML +# CONTEXT-DATABASE: mydb + +cpu,tag1=tag1_A,tag2=tag2_A value1=100i,value2=0.5,value3="str",value4=true 1439856000 +cpu,tag1=tag1_B value1=100i,value2=2.0,value4=false 1439856000 +cpu,tag2=tag2_A value2=2.0 1439858888 + +t3,tag1=a value1=1.0,value2=100 0 +t3,tag1=a value1=2.0,value2=100 1 +t3,tag1=a value1=3.0,value2=100 2 +t3,tag1=b value1=10.0,value2=200 3 +t3,tag1=b value1=20.0,value2=200 4 + +t4,tag1=a,tag2=x value1=1.0,value2=100 0 +t4,tag1=a,tag2=y value1=2.0,value2=100 1 +t4,tag1=a,tag2=x value1=3.0,value2=100 2 +t4,tag1=b,tag2=y value1=10.0,value2=200 3 +t4,tag1=b,tag2=z value1=20.0,value2=200 4 +t4,tag1=b,tag2=z value1=30.0,value2=200 5 + +numbers,tag1=a a=1i,b="One" 0 +numbers,tag1=a a=2i,b="Two" 1 + +tx,tag1=a,tag2=x value1=1.0,value2=100 0 +tx,tag1=a,tag2=y value1=2.0,value2=100 1 +tx,tag1=a,tag2=x value1=3.0,value2=100 2 +tx,tag1=b,tag2=y value1=10.0,value2=200 3 +tx,tag1=b,tag2=z value1=20.0,value2=200 4 +tx,tag1=b,tag2=z value1=30.0,value2=200 5 +tx,tag1=b,tag2=z value2=200 6 +tx,tag1=b,tag2=z value2=200 7 +tx,tag1=b,tag2=z value1=80.0,value2=200 8 +tx,tag1=b,tag2=z value1=90.0,value2=200 9 +tx,tag1=b,tag2=z value2=200 10 +tx,tag1=b,tag2=z value2=200 11 +tx,tag1=b,tag2=z value2=200 12 +tx,tag1=b,tag2=z value2=200 13 +tx,tag1=b,tag2=z value1=140.0,value2=200 14 +tx,tag1=b,tag2=z value1=150.0,value2=200 15 +tx,tag1=c,tag2=zz value2=2000 16 +tx,tag1=c,tag2=zz value2=2000 20 diff --git a/init_v2/init_post.txt b/init_v2/init_post.txt new file mode 100644 index 0000000..e1e7ed1 --- /dev/null +++ b/init_v2/init_post.txt @@ -0,0 +1,3 @@ +# DDL +# DROP DATABASE postdb +# CREATE DATABASE postdb diff --git a/init_v2/join.txt b/init_v2/join.txt new file mode 100644 index 0000000..589ed57 --- /dev/null +++ b/init_v2/join.txt @@ -0,0 +1,28 @@ +# DML +# CONTEXT-DATABASE: coredb + +q1 q1=1i 0000000000000000001 + +q2 q2=0i 0000000000000000001 + + +b_star class="b",aa=3i,bb="mumble" 0000000000000000001 +b_star class="b",aa=4i 0000000000000000002 +b_star class="b",bb="bumble" 0000000000000000003 +b_star class="" 0000000000000000004 +b_star class="d",aa=7i,bb="grumble" 0000000000000000005 +b_star class="d",aa=8i,bb="stumble" 0000000000000000006 +b_star class="d",aa=9i,bb="rumble" 0000000000000000007 +b_star class="d",aa=10i 0000000000000000008 +b_star class="d",bb="crumble" 0000000000000000009 +b_star class="d",aa=11i,bb="fumble" 0000000000000000010 +b_star class="d",aa=12i 0000000000000000011 +b_star class="d",aa=13i 0000000000000000012 +b_star class="d",bb="tumble" 0000000000000000013 +b_star class="d",bb="humble" 0000000000000000014 +b_star class="d" 0000000000000000015 +b_star class="d",aa=14i 0000000000000000016 +b_star class="d",bb="jumble" 0000000000000000017 +b_star class="d" 0000000000000000018 +b_star class="d" 0000000000000000019 +b_star class="d" 0000000000000000020 \ No newline at end of file diff --git a/init_v2/multikey_add_1tag_1field.txt b/init_v2/multikey_add_1tag_1field.txt new file mode 100644 index 0000000..ca7b626 --- /dev/null +++ b/init_v2/multikey_add_1tag_1field.txt @@ -0,0 +1,7 @@ +# DML +# CONTEXT-DATABASE: schemalessdb + +sctbl3,t1=-2323.54454 c1=true,c2="Tôi không biết",c3=32i,c4=78.14,c5=F 000000000000000000111 +sctbl3,t1=faefek c1=T,c2="change for new change",c3=34i,c4=-74,c5=false -789450000000000 +sctbl3,t1='afefea' c1=F,c2="Qué estás haciendo",c3=0i,c4=2E+12,c5=t -3000000000000000000 +sctbl3,t1="3gìvậy" c1=false,c2="lagi ngopo",c3=1i,c4=1.024,c5=T 4343314000 diff --git a/init_v2/multikey_add_5tag_20field.txt b/init_v2/multikey_add_5tag_20field.txt new file mode 100644 index 0000000..96dd45e --- /dev/null +++ b/init_v2/multikey_add_5tag_20field.txt @@ -0,0 +1,8 @@ +# DML +# CONTEXT-DATABASE: schemalessdb + +sctbl3,t1='thisisatag',t2=1,t3=7945.154,t4=0i,t5="thisistring" c1=T,c2="что ты делаешь",c3=546i,c4=2.58E+80,c5=true,c6=-2147483648,c7=-32036854775808,c8=-78945.145441,c9="$$$$$&&&&&",c10="signle test",c11=8i,c12=F,c13=0,c14=20112020,c15="ông là nhà văn hiện thực",c16=123456,c17=true,c18=false,c19=1.79E+308,c20=54i 1200000000 +sctbl3,t1='tag2',t2=2,t3=741.14,t4=4i,t5='THisiSString' c1=F,c2="wenzani",c3=-98i,c4=-2.58E+80,c5=TRUE,c6=2147483647,c7=92272036855807,c8=-0.000000000047854,c9="!@#$%^&*",c10="a a",c11=32i,c12=f,c13=1,c14=19654578,c15="Đây là tính năng mới của Influx",c16=321654,c17=false,c18=FALSE,c19=-1.79E+308,c20=87i 8790000000000000 +sctbl3,t1=23223r,t2=3,t3=-74.255,t4=21i,t5='111111' c1=True,c2="Што правиш",c3=-368545807i,c4=85E+1,c5=T,c6=-32768,c7=5563656565554,c8=-12.3456789,c9="special string",c10=" a a",c11=-78i,c12=false,c13=1,c14=19700101,c15="đây là tiếng Việt",c16=987987987,c17=T,c18=F,c19=-0.1111111,c20=-78i 14781646135431 +sctbl3,t1=-4.2541,t2=4,t3=987412,t4=54i,t5='7855.14444' c1=true,c2="ඔයා කරන්නේ කුමක් ද",c3=0i,c4=-12E+2,c5=t,c6=32767,c7=7424654,c8=1.00007,c9=" ",c10="aa a ",c11=-125i,c12=False,c13=0,c14=252500,c15="tiếng việt có dấu",c16=113456,c17=T,c18=F,c19=-0.0000123,c20=-74i 35976143464313 +sctbl3,t1=hhaffe.3fasf,t2=5,t3=413.1475,t4=8798i,t5=-86893.223E+1 c1=TRUE,c2="何してるの",c3=3685808i,c4=87E+21,c5=T,c6=748452587,c7=-246455441441,c8=93.147895,c9="nospace",c10=" aaa ",c11=-676i,c12=F,c13=0,c14=19960102,c15="hôm nay là ngày rất rét",c16=11111,c17=F,c18=T,c19=-789456.123,c20=567i 9784464343435131 diff --git a/init_v2/multikey_original.txt b/init_v2/multikey_original.txt new file mode 100644 index 0000000..7436180 --- /dev/null +++ b/init_v2/multikey_original.txt @@ -0,0 +1,22 @@ +# DDL +# DROP DATABASE schemalessdb +# CREATE DATABASE schemalessdb + +# DML +# CONTEXT-DATABASE: schemalessdb + +sctbl3 c2="^%(@#%^(@#%&@#)%^)!^%)!)%",c3=-36854775808i,c4=1.79E+68,c5=t -9223372036854775806 +sctbl3 c2="敷ヘカウ告政ヨハツヤ消70者32精楽ざ",c3=36854775807i,c4=-1.79E+68,c5=F 9223372036854775806 +sctbl3 c2="べ員葉コ番告7次ノヌ従援かやじり図安ヨ",c3=-36854775807i,c4=1.78E+68,c5=FALSE -9223372036854775805 +sctbl3 c2="ăâđêôơưdêđêdờenờíìờẹ",c3=36854775806i,c4=-1.78E+68,c5=false 9223372036854775805 +sctbl3 c2="いろはにほへど ちりぬるをわがよたれぞ つねならむうゐのおくやま けふこえてあさ",c3=-5i,c4=-50.232,c5=TRUE 1578013200000000000 +sctbl3 c2="色は匂へど 散りぬるを我が世誰ぞ 常ならむ有為の奥山 今日越えて浅き夢見",c3=-4i,c4=-40.652,c5=true 1578099600000000000 +sctbl3 c2="กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผภฮ",c3=-3i,c4=-30.756,c5=true 1578186000000000000 +sctbl3 c2="`~!@#$%^&*()_+=-{}[]|:;<>?/.",c3=-2i,c4=-20.56,c5=F 1578272400000000000 +sctbl3 c2="0123456789",c3=-1i,c4=-10.746,c5=f 1578358800000000000 +sctbl3 c2="In Bulgarian it is desirable",c3=0i,c4=0.774,c5=false 1578445200000000000 +sctbl3 c2="Which started out as a kind",c3=1i,c4=10.746,c5=T 1578531600000000000 +sctbl3 c2="Canada Denmark Turkey Yemen Tokyo",c3=2i,c4=20.312,c5=true 1578618000000000000 +sctbl3 c2="Change our locale from $ to ¥ in",c3=3i,c4=30.631,c5=false 1578704400000000000 +sctbl3 c2="Chúc mừng năm mới 2021",c3=4i,c4=40.772,c5=false 1578790800000000000 +sctbl3 c2="$",c3=5i,c4=50.188,c5=false 1578877200000000000 diff --git a/init_v2/onek.txt b/init_v2/onek.txt new file mode 100644 index 0000000..a19e3db --- /dev/null +++ b/init_v2/onek.txt @@ -0,0 +1,1003 @@ +# DML +# CONTEXT-DATABASE: coredb + +onek unique1=147i,unique2=0i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=47i,twothousand=147i,fivethous=147i,tenthous=147i,odd=14i,even=15i,stringu1="RFAAAA",stringu2="AAAAAA",string4="AAAAxx" 86400000000000 +onek unique1=931i,unique2=1i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=31i,twothousand=131i,fivethous=431i,tenthous=931i,odd=2i,even=3i,stringu1="VJAAAA",stringu2="BAAAAA",string4="HHHHxx" 172800000000000 +onek unique1=714i,unique2=2i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=14i,twothousand=114i,fivethous=214i,tenthous=714i,odd=8i,even=9i,stringu1="MBAAAA",stringu2="CAAAAA",string4="OOOOxx" 259200000000000 +onek unique1=711i,unique2=3i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=11i,twothousand=111i,fivethous=211i,tenthous=711i,odd=2i,even=3i,stringu1="JBAAAA",stringu2="DAAAAA",string4="VVVVxx" 345600000000000 +onek unique1=883i,unique2=4i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=83i,twothousand=83i,fivethous=383i,tenthous=883i,odd=6i,even=7i,stringu1="ZHAAAA",stringu2="EAAAAA",string4="AAAAxx" 432000000000000 +onek unique1=439i,unique2=5i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=39i,twothousand=39i,fivethous=439i,tenthous=439i,odd=18i,even=19i,stringu1="XQAAAA",stringu2="FAAAAA",string4="HHHHxx" 518400000000000 +onek unique1=670i,unique2=6i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=70i,twothousand=70i,fivethous=170i,tenthous=670i,odd=0i,even=1i,stringu1="UZAAAA",stringu2="GAAAAA",string4="OOOOxx" 604800000000000 +onek unique1=543i,unique2=7i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=43i,twothousand=143i,fivethous=43i,tenthous=543i,odd=6i,even=7i,stringu1="XUAAAA",stringu2="HAAAAA",string4="VVVVxx" 691200000000000 +onek unique1=425i,unique2=8i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=25i,twothousand=25i,fivethous=425i,tenthous=425i,odd=10i,even=11i,stringu1="JQAAAA",stringu2="IAAAAA",string4="AAAAxx" 777600000000000 +onek unique1=800i,unique2=9i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=0i,fivethous=300i,tenthous=800i,odd=0i,even=1i,stringu1="UEAAAA",stringu2="JAAAAA",string4="HHHHxx" 864000000000000 +onek unique1=489i,unique2=10i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=89i,twothousand=89i,fivethous=489i,tenthous=489i,odd=18i,even=19i,stringu1="VSAAAA",stringu2="KAAAAA",string4="OOOOxx" 950400000000000 +onek unique1=494i,unique2=11i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=94i,twothousand=94i,fivethous=494i,tenthous=494i,odd=8i,even=9i,stringu1="ATAAAA",stringu2="LAAAAA",string4="VVVVxx" 1036800000000000 +onek unique1=880i,unique2=12i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=80i,twothousand=80i,fivethous=380i,tenthous=880i,odd=0i,even=1i,stringu1="WHAAAA",stringu2="MAAAAA",string4="AAAAxx" 1123200000000000 +onek unique1=611i,unique2=13i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=11i,twothousand=11i,fivethous=111i,tenthous=611i,odd=2i,even=3i,stringu1="NXAAAA",stringu2="NAAAAA",string4="HHHHxx" 1209600000000000 +onek unique1=226i,unique2=14i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=26i,twothousand=26i,fivethous=226i,tenthous=226i,odd=12i,even=13i,stringu1="SIAAAA",stringu2="OAAAAA",string4="OOOOxx" 1296000000000000 +onek unique1=774i,unique2=15i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=74i,twothousand=174i,fivethous=274i,tenthous=774i,odd=8i,even=9i,stringu1="UDAAAA",stringu2="PAAAAA",string4="VVVVxx" 1382400000000000 +onek unique1=298i,unique2=16i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=98i,twothousand=98i,fivethous=298i,tenthous=298i,odd=16i,even=17i,stringu1="MLAAAA",stringu2="QAAAAA",string4="AAAAxx" 1468800000000000 +onek unique1=682i,unique2=17i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=82i,twothousand=82i,fivethous=182i,tenthous=682i,odd=4i,even=5i,stringu1="GAAAAA",stringu2="RAAAAA",string4="HHHHxx" 1555200000000000 +onek unique1=864i,unique2=18i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=64i,twothousand=64i,fivethous=364i,tenthous=864i,odd=8i,even=9i,stringu1="GHAAAA",stringu2="SAAAAA",string4="OOOOxx" 1641600000000000 +onek unique1=183i,unique2=19i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=83i,twothousand=183i,fivethous=183i,tenthous=183i,odd=6i,even=7i,stringu1="BHAAAA",stringu2="TAAAAA",string4="VVVVxx" 1728000000000000 +onek unique1=885i,unique2=20i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=85i,twothousand=85i,fivethous=385i,tenthous=885i,odd=10i,even=11i,stringu1="BIAAAA",stringu2="UAAAAA",string4="AAAAxx" 1814400000000000 +onek unique1=997i,unique2=21i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=97i,twothousand=197i,fivethous=497i,tenthous=997i,odd=14i,even=15i,stringu1="JMAAAA",stringu2="VAAAAA",string4="HHHHxx" 1900800000000000 +onek unique1=966i,unique2=22i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=66i,twothousand=166i,fivethous=466i,tenthous=966i,odd=12i,even=13i,stringu1="ELAAAA",stringu2="WAAAAA",string4="OOOOxx" 1987200000000000 +onek unique1=389i,unique2=23i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=89i,twothousand=189i,fivethous=389i,tenthous=389i,odd=18i,even=19i,stringu1="ZOAAAA",stringu2="XAAAAA",string4="VVVVxx" 2073600000000000 +onek unique1=846i,unique2=24i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=46i,twothousand=46i,fivethous=346i,tenthous=846i,odd=12i,even=13i,stringu1="OGAAAA",stringu2="YAAAAA",string4="AAAAxx" 2160000000000000 +onek unique1=206i,unique2=25i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=6i,fivethous=206i,tenthous=206i,odd=12i,even=13i,stringu1="YHAAAA",stringu2="ZAAAAA",string4="HHHHxx" 2246400000000000 +onek unique1=239i,unique2=26i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=39i,twothousand=39i,fivethous=239i,tenthous=239i,odd=18i,even=19i,stringu1="FJAAAA",stringu2="ABAAAA",string4="OOOOxx" 2332800000000000 +onek unique1=365i,unique2=27i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=65i,twothousand=165i,fivethous=365i,tenthous=365i,odd=10i,even=11i,stringu1="BOAAAA",stringu2="BBAAAA",string4="VVVVxx" 2419200000000000 +onek unique1=204i,unique2=28i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=4i,fivethous=204i,tenthous=204i,odd=8i,even=9i,stringu1="WHAAAA",stringu2="CBAAAA",string4="AAAAxx" 2505600000000000 +onek unique1=690i,unique2=29i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=90i,twothousand=90i,fivethous=190i,tenthous=690i,odd=0i,even=1i,stringu1="OAAAAA",stringu2="DBAAAA",string4="HHHHxx" 2592000000000000 +onek unique1=69i,unique2=30i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=69i,twothousand=69i,fivethous=69i,tenthous=69i,odd=18i,even=19i,stringu1="RCAAAA",stringu2="EBAAAA",string4="OOOOxx" 2678400000000000 +onek unique1=358i,unique2=31i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=58i,twothousand=158i,fivethous=358i,tenthous=358i,odd=16i,even=17i,stringu1="UNAAAA",stringu2="FBAAAA",string4="VVVVxx" 2764800000000000 +onek unique1=269i,unique2=32i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=69i,twothousand=69i,fivethous=269i,tenthous=269i,odd=18i,even=19i,stringu1="JKAAAA",stringu2="GBAAAA",string4="AAAAxx" 2851200000000000 +onek unique1=663i,unique2=33i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=63i,twothousand=63i,fivethous=163i,tenthous=663i,odd=6i,even=7i,stringu1="NZAAAA",stringu2="HBAAAA",string4="HHHHxx" 2937600000000000 +onek unique1=608i,unique2=34i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=8i,fivethous=108i,tenthous=608i,odd=16i,even=17i,stringu1="KXAAAA",stringu2="IBAAAA",string4="OOOOxx" 3024000000000000 +onek unique1=398i,unique2=35i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=98i,twothousand=198i,fivethous=398i,tenthous=398i,odd=16i,even=17i,stringu1="IPAAAA",stringu2="JBAAAA",string4="VVVVxx" 3110400000000000 +onek unique1=330i,unique2=36i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=30i,twothousand=130i,fivethous=330i,tenthous=330i,odd=0i,even=1i,stringu1="SMAAAA",stringu2="KBAAAA",string4="AAAAxx" 3196800000000000 +onek unique1=529i,unique2=37i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=29i,twothousand=129i,fivethous=29i,tenthous=529i,odd=18i,even=19i,stringu1="JUAAAA",stringu2="LBAAAA",string4="HHHHxx" 3283200000000000 +onek unique1=555i,unique2=38i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=55i,twothousand=155i,fivethous=55i,tenthous=555i,odd=10i,even=11i,stringu1="JVAAAA",stringu2="MBAAAA",string4="OOOOxx" 3369600000000000 +onek unique1=746i,unique2=39i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=46i,twothousand=146i,fivethous=246i,tenthous=746i,odd=12i,even=13i,stringu1="SCAAAA",stringu2="NBAAAA",string4="VVVVxx" 3456000000000000 +onek unique1=558i,unique2=40i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=58i,twothousand=158i,fivethous=58i,tenthous=558i,odd=16i,even=17i,stringu1="MVAAAA",stringu2="OBAAAA",string4="AAAAxx" 3542400000000000 +onek unique1=574i,unique2=41i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=74i,twothousand=174i,fivethous=74i,tenthous=574i,odd=8i,even=9i,stringu1="CWAAAA",stringu2="PBAAAA",string4="HHHHxx" 3628800000000000 +onek unique1=343i,unique2=42i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=43i,twothousand=143i,fivethous=343i,tenthous=343i,odd=6i,even=7i,stringu1="FNAAAA",stringu2="QBAAAA",string4="OOOOxx" 3715200000000000 +onek unique1=120i,unique2=43i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=20i,twothousand=120i,fivethous=120i,tenthous=120i,odd=0i,even=1i,stringu1="QEAAAA",stringu2="RBAAAA",string4="VVVVxx" 3801600000000000 +onek unique1=461i,unique2=44i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=61i,twothousand=61i,fivethous=461i,tenthous=461i,odd=2i,even=3i,stringu1="TRAAAA",stringu2="SBAAAA",string4="AAAAxx" 3888000000000000 +onek unique1=754i,unique2=45i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=54i,twothousand=154i,fivethous=254i,tenthous=754i,odd=8i,even=9i,stringu1="ADAAAA",stringu2="TBAAAA",string4="HHHHxx" 3974400000000000 +onek unique1=772i,unique2=46i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=72i,twothousand=172i,fivethous=272i,tenthous=772i,odd=4i,even=5i,stringu1="SDAAAA",stringu2="UBAAAA",string4="OOOOxx" 4060800000000000 +onek unique1=749i,unique2=47i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=49i,twothousand=149i,fivethous=249i,tenthous=749i,odd=18i,even=19i,stringu1="VCAAAA",stringu2="VBAAAA",string4="VVVVxx" 4147200000000000 +onek unique1=386i,unique2=48i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=86i,twothousand=186i,fivethous=386i,tenthous=386i,odd=12i,even=13i,stringu1="WOAAAA",stringu2="WBAAAA",string4="AAAAxx" 4233600000000000 +onek unique1=9i,unique2=49i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=9i,fivethous=9i,tenthous=9i,odd=18i,even=19i,stringu1="JAAAAA",stringu2="XBAAAA",string4="HHHHxx" 4320000000000000 +onek unique1=771i,unique2=50i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=71i,twothousand=171i,fivethous=271i,tenthous=771i,odd=2i,even=3i,stringu1="RDAAAA",stringu2="YBAAAA",string4="OOOOxx" 4406400000000000 +onek unique1=470i,unique2=51i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=70i,twothousand=70i,fivethous=470i,tenthous=470i,odd=0i,even=1i,stringu1="CSAAAA",stringu2="ZBAAAA",string4="VVVVxx" 4492800000000000 +onek unique1=238i,unique2=52i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=38i,twothousand=38i,fivethous=238i,tenthous=238i,odd=16i,even=17i,stringu1="EJAAAA",stringu2="ACAAAA",string4="AAAAxx" 4579200000000000 +onek unique1=86i,unique2=53i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=86i,twothousand=86i,fivethous=86i,tenthous=86i,odd=12i,even=13i,stringu1="IDAAAA",stringu2="BCAAAA",string4="HHHHxx" 4665600000000000 +onek unique1=56i,unique2=54i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=56i,twothousand=56i,fivethous=56i,tenthous=56i,odd=12i,even=13i,stringu1="ECAAAA",stringu2="CCAAAA",string4="OOOOxx" 4752000000000000 +onek unique1=767i,unique2=55i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=67i,twothousand=167i,fivethous=267i,tenthous=767i,odd=14i,even=15i,stringu1="NDAAAA",stringu2="DCAAAA",string4="VVVVxx" 4838400000000000 +onek unique1=363i,unique2=56i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=63i,twothousand=163i,fivethous=363i,tenthous=363i,odd=6i,even=7i,stringu1="ZNAAAA",stringu2="ECAAAA",string4="AAAAxx" 4924800000000000 +onek unique1=655i,unique2=57i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=55i,twothousand=55i,fivethous=155i,tenthous=655i,odd=10i,even=11i,stringu1="FZAAAA",stringu2="FCAAAA",string4="HHHHxx" 5011200000000000 +onek unique1=394i,unique2=58i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=94i,twothousand=194i,fivethous=394i,tenthous=394i,odd=8i,even=9i,stringu1="EPAAAA",stringu2="GCAAAA",string4="OOOOxx" 5097600000000000 +onek unique1=223i,unique2=59i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=23i,twothousand=23i,fivethous=223i,tenthous=223i,odd=6i,even=7i,stringu1="PIAAAA",stringu2="HCAAAA",string4="VVVVxx" 5184000000000000 +onek unique1=946i,unique2=60i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=46i,twothousand=146i,fivethous=446i,tenthous=946i,odd=12i,even=13i,stringu1="KKAAAA",stringu2="ICAAAA",string4="AAAAxx" 5270400000000000 +onek unique1=863i,unique2=61i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=63i,twothousand=63i,fivethous=363i,tenthous=863i,odd=6i,even=7i,stringu1="FHAAAA",stringu2="JCAAAA",string4="HHHHxx" 5356800000000000 +onek unique1=913i,unique2=62i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=13i,twothousand=113i,fivethous=413i,tenthous=913i,odd=6i,even=7i,stringu1="DJAAAA",stringu2="KCAAAA",string4="OOOOxx" 5443200000000000 +onek unique1=737i,unique2=63i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=37i,twothousand=137i,fivethous=237i,tenthous=737i,odd=14i,even=15i,stringu1="JCAAAA",stringu2="LCAAAA",string4="VVVVxx" 5529600000000000 +onek unique1=65i,unique2=64i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=65i,twothousand=65i,fivethous=65i,tenthous=65i,odd=10i,even=11i,stringu1="NCAAAA",stringu2="MCAAAA",string4="AAAAxx" 5616000000000000 +onek unique1=251i,unique2=65i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=51i,twothousand=51i,fivethous=251i,tenthous=251i,odd=2i,even=3i,stringu1="RJAAAA",stringu2="NCAAAA",string4="HHHHxx" 5702400000000000 +onek unique1=686i,unique2=66i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=86i,twothousand=86i,fivethous=186i,tenthous=686i,odd=12i,even=13i,stringu1="KAAAAA",stringu2="OCAAAA",string4="OOOOxx" 5788800000000000 +onek unique1=971i,unique2=67i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=71i,twothousand=171i,fivethous=471i,tenthous=971i,odd=2i,even=3i,stringu1="JLAAAA",stringu2="PCAAAA",string4="VVVVxx" 5875200000000000 +onek unique1=775i,unique2=68i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=75i,twothousand=175i,fivethous=275i,tenthous=775i,odd=10i,even=11i,stringu1="VDAAAA",stringu2="QCAAAA",string4="AAAAxx" 5961600000000000 +onek unique1=577i,unique2=69i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=77i,twothousand=177i,fivethous=77i,tenthous=577i,odd=14i,even=15i,stringu1="FWAAAA",stringu2="RCAAAA",string4="HHHHxx" 6048000000000000 +onek unique1=830i,unique2=70i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=30i,twothousand=30i,fivethous=330i,tenthous=830i,odd=0i,even=1i,stringu1="YFAAAA",stringu2="SCAAAA",string4="OOOOxx" 6134400000000000 +onek unique1=787i,unique2=71i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=87i,twothousand=187i,fivethous=287i,tenthous=787i,odd=14i,even=15i,stringu1="HEAAAA",stringu2="TCAAAA",string4="VVVVxx" 6220800000000000 +onek unique1=898i,unique2=72i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=98i,twothousand=98i,fivethous=398i,tenthous=898i,odd=16i,even=17i,stringu1="OIAAAA",stringu2="UCAAAA",string4="AAAAxx" 6307200000000000 +onek unique1=588i,unique2=73i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=88i,twothousand=188i,fivethous=88i,tenthous=588i,odd=16i,even=17i,stringu1="QWAAAA",stringu2="VCAAAA",string4="HHHHxx" 6393600000000000 +onek unique1=872i,unique2=74i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=72i,twothousand=72i,fivethous=372i,tenthous=872i,odd=4i,even=5i,stringu1="OHAAAA",stringu2="WCAAAA",string4="OOOOxx" 6480000000000000 +onek unique1=397i,unique2=75i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=97i,twothousand=197i,fivethous=397i,tenthous=397i,odd=14i,even=15i,stringu1="HPAAAA",stringu2="XCAAAA",string4="VVVVxx" 6566400000000000 +onek unique1=51i,unique2=76i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=51i,twothousand=51i,fivethous=51i,tenthous=51i,odd=2i,even=3i,stringu1="ZBAAAA",stringu2="YCAAAA",string4="AAAAxx" 6652800000000000 +onek unique1=381i,unique2=77i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=81i,twothousand=181i,fivethous=381i,tenthous=381i,odd=2i,even=3i,stringu1="ROAAAA",stringu2="ZCAAAA",string4="HHHHxx" 6739200000000000 +onek unique1=632i,unique2=78i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=32i,twothousand=32i,fivethous=132i,tenthous=632i,odd=4i,even=5i,stringu1="IYAAAA",stringu2="ADAAAA",string4="OOOOxx" 6825600000000000 +onek unique1=31i,unique2=79i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=31i,twothousand=31i,fivethous=31i,tenthous=31i,odd=2i,even=3i,stringu1="FBAAAA",stringu2="BDAAAA",string4="VVVVxx" 6912000000000000 +onek unique1=855i,unique2=80i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=55i,twothousand=55i,fivethous=355i,tenthous=855i,odd=10i,even=11i,stringu1="XGAAAA",stringu2="CDAAAA",string4="AAAAxx" 6998400000000000 +onek unique1=699i,unique2=81i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=99i,twothousand=99i,fivethous=199i,tenthous=699i,odd=18i,even=19i,stringu1="XAAAAA",stringu2="DDAAAA",string4="HHHHxx" 7084800000000000 +onek unique1=562i,unique2=82i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=62i,twothousand=162i,fivethous=62i,tenthous=562i,odd=4i,even=5i,stringu1="QVAAAA",stringu2="EDAAAA",string4="OOOOxx" 7171200000000000 +onek unique1=681i,unique2=83i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=81i,twothousand=81i,fivethous=181i,tenthous=681i,odd=2i,even=3i,stringu1="FAAAAA",stringu2="FDAAAA",string4="VVVVxx" 7257600000000000 +onek unique1=585i,unique2=84i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=85i,twothousand=185i,fivethous=85i,tenthous=585i,odd=10i,even=11i,stringu1="NWAAAA",stringu2="GDAAAA",string4="AAAAxx" 7344000000000000 +onek unique1=35i,unique2=85i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=35i,twothousand=35i,fivethous=35i,tenthous=35i,odd=10i,even=11i,stringu1="JBAAAA",stringu2="HDAAAA",string4="HHHHxx" 7430400000000000 +onek unique1=962i,unique2=86i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=62i,twothousand=162i,fivethous=462i,tenthous=962i,odd=4i,even=5i,stringu1="ALAAAA",stringu2="IDAAAA",string4="OOOOxx" 7516800000000000 +onek unique1=282i,unique2=87i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=82i,twothousand=82i,fivethous=282i,tenthous=282i,odd=4i,even=5i,stringu1="WKAAAA",stringu2="JDAAAA",string4="VVVVxx" 7603200000000000 +onek unique1=254i,unique2=88i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=54i,twothousand=54i,fivethous=254i,tenthous=254i,odd=8i,even=9i,stringu1="UJAAAA",stringu2="KDAAAA",string4="AAAAxx" 7689600000000000 +onek unique1=514i,unique2=89i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=14i,twothousand=114i,fivethous=14i,tenthous=514i,odd=8i,even=9i,stringu1="UTAAAA",stringu2="LDAAAA",string4="HHHHxx" 7776000000000000 +onek unique1=406i,unique2=90i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=6i,fivethous=406i,tenthous=406i,odd=12i,even=13i,stringu1="QPAAAA",stringu2="MDAAAA",string4="OOOOxx" 7862400000000000 +onek unique1=544i,unique2=91i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=44i,twothousand=144i,fivethous=44i,tenthous=544i,odd=8i,even=9i,stringu1="YUAAAA",stringu2="NDAAAA",string4="VVVVxx" 7948800000000000 +onek unique1=704i,unique2=92i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=104i,fivethous=204i,tenthous=704i,odd=8i,even=9i,stringu1="CBAAAA",stringu2="ODAAAA",string4="AAAAxx" 8035200000000000 +onek unique1=948i,unique2=93i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=48i,twothousand=148i,fivethous=448i,tenthous=948i,odd=16i,even=17i,stringu1="MKAAAA",stringu2="PDAAAA",string4="HHHHxx" 8121600000000000 +onek unique1=412i,unique2=94i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=12i,twothousand=12i,fivethous=412i,tenthous=412i,odd=4i,even=5i,stringu1="WPAAAA",stringu2="QDAAAA",string4="OOOOxx" 8208000000000000 +onek unique1=200i,unique2=95i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=0i,fivethous=200i,tenthous=200i,odd=0i,even=1i,stringu1="SHAAAA",stringu2="RDAAAA",string4="VVVVxx" 8294400000000000 +onek unique1=583i,unique2=96i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=83i,twothousand=183i,fivethous=83i,tenthous=583i,odd=6i,even=7i,stringu1="LWAAAA",stringu2="SDAAAA",string4="AAAAxx" 8380800000000000 +onek unique1=486i,unique2=97i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=86i,twothousand=86i,fivethous=486i,tenthous=486i,odd=12i,even=13i,stringu1="SSAAAA",stringu2="TDAAAA",string4="HHHHxx" 8467200000000000 +onek unique1=666i,unique2=98i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=66i,twothousand=66i,fivethous=166i,tenthous=666i,odd=12i,even=13i,stringu1="QZAAAA",stringu2="UDAAAA",string4="OOOOxx" 8553600000000000 +onek unique1=436i,unique2=99i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=36i,twothousand=36i,fivethous=436i,tenthous=436i,odd=12i,even=13i,stringu1="UQAAAA",stringu2="VDAAAA",string4="VVVVxx" 8640000000000000 +onek unique1=842i,unique2=100i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=42i,twothousand=42i,fivethous=342i,tenthous=842i,odd=4i,even=5i,stringu1="KGAAAA",stringu2="WDAAAA",string4="AAAAxx" 8726400000000000 +onek unique1=99i,unique2=101i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=99i,twothousand=99i,fivethous=99i,tenthous=99i,odd=18i,even=19i,stringu1="VDAAAA",stringu2="XDAAAA",string4="HHHHxx" 8812800000000000 +onek unique1=656i,unique2=102i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=56i,twothousand=56i,fivethous=156i,tenthous=656i,odd=12i,even=13i,stringu1="GZAAAA",stringu2="YDAAAA",string4="OOOOxx" 8899200000000000 +onek unique1=673i,unique2=103i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=73i,twothousand=73i,fivethous=173i,tenthous=673i,odd=6i,even=7i,stringu1="XZAAAA",stringu2="ZDAAAA",string4="VVVVxx" 8985600000000000 +onek unique1=371i,unique2=104i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=71i,twothousand=171i,fivethous=371i,tenthous=371i,odd=2i,even=3i,stringu1="HOAAAA",stringu2="AEAAAA",string4="AAAAxx" 9072000000000000 +onek unique1=869i,unique2=105i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=69i,twothousand=69i,fivethous=369i,tenthous=869i,odd=18i,even=19i,stringu1="LHAAAA",stringu2="BEAAAA",string4="HHHHxx" 9158400000000000 +onek unique1=569i,unique2=106i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=69i,twothousand=169i,fivethous=69i,tenthous=569i,odd=18i,even=19i,stringu1="XVAAAA",stringu2="CEAAAA",string4="OOOOxx" 9244800000000000 +onek unique1=616i,unique2=107i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=16i,twothousand=16i,fivethous=116i,tenthous=616i,odd=12i,even=13i,stringu1="SXAAAA",stringu2="DEAAAA",string4="VVVVxx" 9331200000000000 +onek unique1=612i,unique2=108i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=12i,twothousand=12i,fivethous=112i,tenthous=612i,odd=4i,even=5i,stringu1="OXAAAA",stringu2="EEAAAA",string4="AAAAxx" 9417600000000000 +onek unique1=505i,unique2=109i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=105i,fivethous=5i,tenthous=505i,odd=10i,even=11i,stringu1="LTAAAA",stringu2="FEAAAA",string4="HHHHxx" 9504000000000000 +onek unique1=922i,unique2=110i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=22i,twothousand=122i,fivethous=422i,tenthous=922i,odd=4i,even=5i,stringu1="MJAAAA",stringu2="GEAAAA",string4="OOOOxx" 9590400000000000 +onek unique1=221i,unique2=111i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=21i,twothousand=21i,fivethous=221i,tenthous=221i,odd=2i,even=3i,stringu1="NIAAAA",stringu2="HEAAAA",string4="VVVVxx" 9676800000000000 +onek unique1=388i,unique2=112i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=88i,twothousand=188i,fivethous=388i,tenthous=388i,odd=16i,even=17i,stringu1="YOAAAA",stringu2="IEAAAA",string4="AAAAxx" 9763200000000000 +onek unique1=567i,unique2=113i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=67i,twothousand=167i,fivethous=67i,tenthous=567i,odd=14i,even=15i,stringu1="VVAAAA",stringu2="JEAAAA",string4="HHHHxx" 9849600000000000 +onek unique1=58i,unique2=114i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=58i,twothousand=58i,fivethous=58i,tenthous=58i,odd=16i,even=17i,stringu1="GCAAAA",stringu2="KEAAAA",string4="OOOOxx" 9936000000000000 +onek unique1=316i,unique2=115i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=16i,twothousand=116i,fivethous=316i,tenthous=316i,odd=12i,even=13i,stringu1="EMAAAA",stringu2="LEAAAA",string4="VVVVxx" 10022400000000000 +onek unique1=659i,unique2=116i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=59i,twothousand=59i,fivethous=159i,tenthous=659i,odd=18i,even=19i,stringu1="JZAAAA",stringu2="MEAAAA",string4="AAAAxx" 10108800000000000 +onek unique1=501i,unique2=117i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=101i,fivethous=1i,tenthous=501i,odd=2i,even=3i,stringu1="HTAAAA",stringu2="NEAAAA",string4="HHHHxx" 10195200000000000 +onek unique1=815i,unique2=118i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=15i,twothousand=15i,fivethous=315i,tenthous=815i,odd=10i,even=11i,stringu1="JFAAAA",stringu2="OEAAAA",string4="OOOOxx" 10281600000000000 +onek unique1=638i,unique2=119i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=38i,twothousand=38i,fivethous=138i,tenthous=638i,odd=16i,even=17i,stringu1="OYAAAA",stringu2="PEAAAA",string4="VVVVxx" 10368000000000000 +onek unique1=696i,unique2=120i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=96i,twothousand=96i,fivethous=196i,tenthous=696i,odd=12i,even=13i,stringu1="UAAAAA",stringu2="QEAAAA",string4="AAAAxx" 10454400000000000 +onek unique1=734i,unique2=121i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=34i,twothousand=134i,fivethous=234i,tenthous=734i,odd=8i,even=9i,stringu1="GCAAAA",stringu2="REAAAA",string4="HHHHxx" 10540800000000000 +onek unique1=237i,unique2=122i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=37i,twothousand=37i,fivethous=237i,tenthous=237i,odd=14i,even=15i,stringu1="DJAAAA",stringu2="SEAAAA",string4="OOOOxx" 10627200000000000 +onek unique1=816i,unique2=123i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=16i,twothousand=16i,fivethous=316i,tenthous=816i,odd=12i,even=13i,stringu1="KFAAAA",stringu2="TEAAAA",string4="VVVVxx" 10713600000000000 +onek unique1=917i,unique2=124i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=17i,twothousand=117i,fivethous=417i,tenthous=917i,odd=14i,even=15i,stringu1="HJAAAA",stringu2="UEAAAA",string4="AAAAxx" 10800000000000000 +onek unique1=844i,unique2=125i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=44i,twothousand=44i,fivethous=344i,tenthous=844i,odd=8i,even=9i,stringu1="MGAAAA",stringu2="VEAAAA",string4="HHHHxx" 10886400000000000 +onek unique1=657i,unique2=126i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=57i,twothousand=57i,fivethous=157i,tenthous=657i,odd=14i,even=15i,stringu1="HZAAAA",stringu2="WEAAAA",string4="OOOOxx" 10972800000000000 +onek unique1=952i,unique2=127i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=52i,twothousand=152i,fivethous=452i,tenthous=952i,odd=4i,even=5i,stringu1="QKAAAA",stringu2="XEAAAA",string4="VVVVxx" 11059200000000000 +onek unique1=519i,unique2=128i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=19i,twothousand=119i,fivethous=19i,tenthous=519i,odd=18i,even=19i,stringu1="ZTAAAA",stringu2="YEAAAA",string4="AAAAxx" 11145600000000000 +onek unique1=792i,unique2=129i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=92i,twothousand=192i,fivethous=292i,tenthous=792i,odd=4i,even=5i,stringu1="MEAAAA",stringu2="ZEAAAA",string4="HHHHxx" 11232000000000000 +onek unique1=275i,unique2=130i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=75i,twothousand=75i,fivethous=275i,tenthous=275i,odd=10i,even=11i,stringu1="PKAAAA",stringu2="AFAAAA",string4="OOOOxx" 11318400000000000 +onek unique1=319i,unique2=131i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=19i,twothousand=119i,fivethous=319i,tenthous=319i,odd=18i,even=19i,stringu1="HMAAAA",stringu2="BFAAAA",string4="VVVVxx" 11404800000000000 +onek unique1=487i,unique2=132i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=87i,twothousand=87i,fivethous=487i,tenthous=487i,odd=14i,even=15i,stringu1="TSAAAA",stringu2="CFAAAA",string4="AAAAxx" 11491200000000000 +onek unique1=945i,unique2=133i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=45i,twothousand=145i,fivethous=445i,tenthous=945i,odd=10i,even=11i,stringu1="JKAAAA",stringu2="DFAAAA",string4="HHHHxx" 11577600000000000 +onek unique1=584i,unique2=134i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=84i,twothousand=184i,fivethous=84i,tenthous=584i,odd=8i,even=9i,stringu1="MWAAAA",stringu2="EFAAAA",string4="OOOOxx" 11664000000000000 +onek unique1=765i,unique2=135i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=65i,twothousand=165i,fivethous=265i,tenthous=765i,odd=10i,even=11i,stringu1="LDAAAA",stringu2="FFAAAA",string4="VVVVxx" 11750400000000000 +onek unique1=814i,unique2=136i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=14i,twothousand=14i,fivethous=314i,tenthous=814i,odd=8i,even=9i,stringu1="IFAAAA",stringu2="GFAAAA",string4="AAAAxx" 11836800000000000 +onek unique1=359i,unique2=137i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=59i,twothousand=159i,fivethous=359i,tenthous=359i,odd=18i,even=19i,stringu1="VNAAAA",stringu2="HFAAAA",string4="HHHHxx" 11923200000000000 +onek unique1=548i,unique2=138i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=48i,twothousand=148i,fivethous=48i,tenthous=548i,odd=16i,even=17i,stringu1="CVAAAA",stringu2="IFAAAA",string4="OOOOxx" 12009600000000000 +onek unique1=811i,unique2=139i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=11i,twothousand=11i,fivethous=311i,tenthous=811i,odd=2i,even=3i,stringu1="FFAAAA",stringu2="JFAAAA",string4="VVVVxx" 12096000000000000 +onek unique1=531i,unique2=140i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=31i,twothousand=131i,fivethous=31i,tenthous=531i,odd=2i,even=3i,stringu1="LUAAAA",stringu2="KFAAAA",string4="AAAAxx" 12182400000000000 +onek unique1=104i,unique2=141i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=104i,fivethous=104i,tenthous=104i,odd=8i,even=9i,stringu1="AEAAAA",stringu2="LFAAAA",string4="HHHHxx" 12268800000000000 +onek unique1=33i,unique2=142i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=33i,twothousand=33i,fivethous=33i,tenthous=33i,odd=6i,even=7i,stringu1="HBAAAA",stringu2="MFAAAA",string4="OOOOxx" 12355200000000000 +onek unique1=404i,unique2=143i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=4i,fivethous=404i,tenthous=404i,odd=8i,even=9i,stringu1="OPAAAA",stringu2="NFAAAA",string4="VVVVxx" 12441600000000000 +onek unique1=995i,unique2=144i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=95i,twothousand=195i,fivethous=495i,tenthous=995i,odd=10i,even=11i,stringu1="HMAAAA",stringu2="OFAAAA",string4="AAAAxx" 12528000000000000 +onek unique1=408i,unique2=145i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=8i,fivethous=408i,tenthous=408i,odd=16i,even=17i,stringu1="SPAAAA",stringu2="PFAAAA",string4="HHHHxx" 12614400000000000 +onek unique1=93i,unique2=146i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=93i,twothousand=93i,fivethous=93i,tenthous=93i,odd=6i,even=7i,stringu1="PDAAAA",stringu2="QFAAAA",string4="OOOOxx" 12700800000000000 +onek unique1=794i,unique2=147i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=94i,twothousand=194i,fivethous=294i,tenthous=794i,odd=8i,even=9i,stringu1="OEAAAA",stringu2="RFAAAA",string4="VVVVxx" 12787200000000000 +onek unique1=833i,unique2=148i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=33i,twothousand=33i,fivethous=333i,tenthous=833i,odd=6i,even=7i,stringu1="BGAAAA",stringu2="SFAAAA",string4="AAAAxx" 12873600000000000 +onek unique1=615i,unique2=149i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=15i,twothousand=15i,fivethous=115i,tenthous=615i,odd=10i,even=11i,stringu1="RXAAAA",stringu2="TFAAAA",string4="HHHHxx" 12960000000000000 +onek unique1=333i,unique2=150i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=33i,twothousand=133i,fivethous=333i,tenthous=333i,odd=6i,even=7i,stringu1="VMAAAA",stringu2="UFAAAA",string4="OOOOxx" 13046400000000000 +onek unique1=357i,unique2=151i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=57i,twothousand=157i,fivethous=357i,tenthous=357i,odd=14i,even=15i,stringu1="TNAAAA",stringu2="VFAAAA",string4="VVVVxx" 13132800000000000 +onek unique1=999i,unique2=152i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=99i,twothousand=199i,fivethous=499i,tenthous=999i,odd=18i,even=19i,stringu1="LMAAAA",stringu2="WFAAAA",string4="AAAAxx" 13219200000000000 +onek unique1=515i,unique2=153i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=15i,twothousand=115i,fivethous=15i,tenthous=515i,odd=10i,even=11i,stringu1="VTAAAA",stringu2="XFAAAA",string4="HHHHxx" 13305600000000000 +onek unique1=685i,unique2=154i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=85i,twothousand=85i,fivethous=185i,tenthous=685i,odd=10i,even=11i,stringu1="JAAAAA",stringu2="YFAAAA",string4="OOOOxx" 13392000000000000 +onek unique1=692i,unique2=155i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=92i,twothousand=92i,fivethous=192i,tenthous=692i,odd=4i,even=5i,stringu1="QAAAAA",stringu2="ZFAAAA",string4="VVVVxx" 13478400000000000 +onek unique1=627i,unique2=156i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=27i,twothousand=27i,fivethous=127i,tenthous=627i,odd=14i,even=15i,stringu1="DYAAAA",stringu2="AGAAAA",string4="AAAAxx" 13564800000000000 +onek unique1=654i,unique2=157i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=54i,twothousand=54i,fivethous=154i,tenthous=654i,odd=8i,even=9i,stringu1="EZAAAA",stringu2="BGAAAA",string4="HHHHxx" 13651200000000000 +onek unique1=115i,unique2=158i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=15i,twothousand=115i,fivethous=115i,tenthous=115i,odd=10i,even=11i,stringu1="LEAAAA",stringu2="CGAAAA",string4="OOOOxx" 13737600000000000 +onek unique1=75i,unique2=159i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=75i,twothousand=75i,fivethous=75i,tenthous=75i,odd=10i,even=11i,stringu1="XCAAAA",stringu2="DGAAAA",string4="VVVVxx" 13824000000000000 +onek unique1=14i,unique2=160i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=14i,twothousand=14i,fivethous=14i,tenthous=14i,odd=8i,even=9i,stringu1="OAAAAA",stringu2="EGAAAA",string4="AAAAxx" 13910400000000000 +onek unique1=148i,unique2=161i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=48i,twothousand=148i,fivethous=148i,tenthous=148i,odd=16i,even=17i,stringu1="SFAAAA",stringu2="FGAAAA",string4="HHHHxx" 13996800000000000 +onek unique1=201i,unique2=162i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1i,fivethous=201i,tenthous=201i,odd=2i,even=3i,stringu1="THAAAA",stringu2="GGAAAA",string4="OOOOxx" 14083200000000000 +onek unique1=862i,unique2=163i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=62i,twothousand=62i,fivethous=362i,tenthous=862i,odd=4i,even=5i,stringu1="EHAAAA",stringu2="HGAAAA",string4="VVVVxx" 14169600000000000 +onek unique1=634i,unique2=164i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=34i,twothousand=34i,fivethous=134i,tenthous=634i,odd=8i,even=9i,stringu1="KYAAAA",stringu2="IGAAAA",string4="AAAAxx" 14256000000000000 +onek unique1=589i,unique2=165i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=89i,twothousand=189i,fivethous=89i,tenthous=589i,odd=18i,even=19i,stringu1="RWAAAA",stringu2="JGAAAA",string4="HHHHxx" 14342400000000000 +onek unique1=142i,unique2=166i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=42i,twothousand=142i,fivethous=142i,tenthous=142i,odd=4i,even=5i,stringu1="MFAAAA",stringu2="KGAAAA",string4="OOOOxx" 14428800000000000 +onek unique1=545i,unique2=167i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=45i,twothousand=145i,fivethous=45i,tenthous=545i,odd=10i,even=11i,stringu1="ZUAAAA",stringu2="LGAAAA",string4="VVVVxx" 14515200000000000 +onek unique1=983i,unique2=168i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=83i,twothousand=183i,fivethous=483i,tenthous=983i,odd=6i,even=7i,stringu1="VLAAAA",stringu2="MGAAAA",string4="AAAAxx" 14601600000000000 +onek unique1=87i,unique2=169i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=87i,twothousand=87i,fivethous=87i,tenthous=87i,odd=14i,even=15i,stringu1="JDAAAA",stringu2="NGAAAA",string4="HHHHxx" 14688000000000000 +onek unique1=335i,unique2=170i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=35i,twothousand=135i,fivethous=335i,tenthous=335i,odd=10i,even=11i,stringu1="XMAAAA",stringu2="OGAAAA",string4="OOOOxx" 14774400000000000 +onek unique1=915i,unique2=171i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=15i,twothousand=115i,fivethous=415i,tenthous=915i,odd=10i,even=11i,stringu1="FJAAAA",stringu2="PGAAAA",string4="VVVVxx" 14860800000000000 +onek unique1=286i,unique2=172i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=86i,twothousand=86i,fivethous=286i,tenthous=286i,odd=12i,even=13i,stringu1="ALAAAA",stringu2="QGAAAA",string4="AAAAxx" 14947200000000000 +onek unique1=361i,unique2=173i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=61i,twothousand=161i,fivethous=361i,tenthous=361i,odd=2i,even=3i,stringu1="XNAAAA",stringu2="RGAAAA",string4="HHHHxx" 15033600000000000 +onek unique1=97i,unique2=174i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=97i,twothousand=97i,fivethous=97i,tenthous=97i,odd=14i,even=15i,stringu1="TDAAAA",stringu2="SGAAAA",string4="OOOOxx" 15120000000000000 +onek unique1=98i,unique2=175i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=98i,twothousand=98i,fivethous=98i,tenthous=98i,odd=16i,even=17i,stringu1="UDAAAA",stringu2="TGAAAA",string4="VVVVxx" 15206400000000000 +onek unique1=377i,unique2=176i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=77i,twothousand=177i,fivethous=377i,tenthous=377i,odd=14i,even=15i,stringu1="NOAAAA",stringu2="UGAAAA",string4="AAAAxx" 15292800000000000 +onek unique1=525i,unique2=177i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=25i,twothousand=125i,fivethous=25i,tenthous=525i,odd=10i,even=11i,stringu1="FUAAAA",stringu2="VGAAAA",string4="HHHHxx" 15379200000000000 +onek unique1=448i,unique2=178i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=48i,twothousand=48i,fivethous=448i,tenthous=448i,odd=16i,even=17i,stringu1="GRAAAA",stringu2="WGAAAA",string4="OOOOxx" 15465600000000000 +onek unique1=154i,unique2=179i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=54i,twothousand=154i,fivethous=154i,tenthous=154i,odd=8i,even=9i,stringu1="YFAAAA",stringu2="XGAAAA",string4="VVVVxx" 15552000000000000 +onek unique1=866i,unique2=180i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=66i,twothousand=66i,fivethous=366i,tenthous=866i,odd=12i,even=13i,stringu1="IHAAAA",stringu2="YGAAAA",string4="AAAAxx" 15638400000000000 +onek unique1=741i,unique2=181i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=41i,twothousand=141i,fivethous=241i,tenthous=741i,odd=2i,even=3i,stringu1="NCAAAA",stringu2="ZGAAAA",string4="HHHHxx" 15724800000000000 +onek unique1=172i,unique2=182i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=72i,twothousand=172i,fivethous=172i,tenthous=172i,odd=4i,even=5i,stringu1="QGAAAA",stringu2="AHAAAA",string4="OOOOxx" 15811200000000000 +onek unique1=843i,unique2=183i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=43i,twothousand=43i,fivethous=343i,tenthous=843i,odd=6i,even=7i,stringu1="LGAAAA",stringu2="BHAAAA",string4="VVVVxx" 15897600000000000 +onek unique1=378i,unique2=184i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=78i,twothousand=178i,fivethous=378i,tenthous=378i,odd=16i,even=17i,stringu1="OOAAAA",stringu2="CHAAAA",string4="AAAAxx" 15984000000000000 +onek unique1=804i,unique2=185i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=4i,fivethous=304i,tenthous=804i,odd=8i,even=9i,stringu1="YEAAAA",stringu2="DHAAAA",string4="HHHHxx" 16070400000000000 +onek unique1=596i,unique2=186i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=96i,twothousand=196i,fivethous=96i,tenthous=596i,odd=12i,even=13i,stringu1="YWAAAA",stringu2="EHAAAA",string4="OOOOxx" 16156800000000000 +onek unique1=77i,unique2=187i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=77i,twothousand=77i,fivethous=77i,tenthous=77i,odd=14i,even=15i,stringu1="ZCAAAA",stringu2="FHAAAA",string4="VVVVxx" 16243200000000000 +onek unique1=572i,unique2=188i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=72i,twothousand=172i,fivethous=72i,tenthous=572i,odd=4i,even=5i,stringu1="AWAAAA",stringu2="GHAAAA",string4="AAAAxx" 16329600000000000 +onek unique1=444i,unique2=189i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=44i,twothousand=44i,fivethous=444i,tenthous=444i,odd=8i,even=9i,stringu1="CRAAAA",stringu2="HHAAAA",string4="HHHHxx" 16416000000000000 +onek unique1=47i,unique2=190i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=47i,twothousand=47i,fivethous=47i,tenthous=47i,odd=14i,even=15i,stringu1="VBAAAA",stringu2="IHAAAA",string4="OOOOxx" 16502400000000000 +onek unique1=274i,unique2=191i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=74i,twothousand=74i,fivethous=274i,tenthous=274i,odd=8i,even=9i,stringu1="OKAAAA",stringu2="JHAAAA",string4="VVVVxx" 16588800000000000 +onek unique1=40i,unique2=192i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=40i,twothousand=40i,fivethous=40i,tenthous=40i,odd=0i,even=1i,stringu1="OBAAAA",stringu2="KHAAAA",string4="AAAAxx" 16675200000000000 +onek unique1=339i,unique2=193i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=39i,twothousand=139i,fivethous=339i,tenthous=339i,odd=18i,even=19i,stringu1="BNAAAA",stringu2="LHAAAA",string4="HHHHxx" 16761600000000000 +onek unique1=13i,unique2=194i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=13i,twothousand=13i,fivethous=13i,tenthous=13i,odd=6i,even=7i,stringu1="NAAAAA",stringu2="MHAAAA",string4="OOOOxx" 16848000000000000 +onek unique1=878i,unique2=195i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=78i,twothousand=78i,fivethous=378i,tenthous=878i,odd=16i,even=17i,stringu1="UHAAAA",stringu2="NHAAAA",string4="VVVVxx" 16934400000000000 +onek unique1=53i,unique2=196i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=53i,twothousand=53i,fivethous=53i,tenthous=53i,odd=6i,even=7i,stringu1="BCAAAA",stringu2="OHAAAA",string4="AAAAxx" 17020800000000000 +onek unique1=939i,unique2=197i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=39i,twothousand=139i,fivethous=439i,tenthous=939i,odd=18i,even=19i,stringu1="DKAAAA",stringu2="PHAAAA",string4="HHHHxx" 17107200000000000 +onek unique1=928i,unique2=198i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=28i,twothousand=128i,fivethous=428i,tenthous=928i,odd=16i,even=17i,stringu1="SJAAAA",stringu2="QHAAAA",string4="OOOOxx" 17193600000000000 +onek unique1=886i,unique2=199i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=86i,twothousand=86i,fivethous=386i,tenthous=886i,odd=12i,even=13i,stringu1="CIAAAA",stringu2="RHAAAA",string4="VVVVxx" 17280000000000000 +onek unique1=267i,unique2=200i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=67i,twothousand=67i,fivethous=267i,tenthous=267i,odd=14i,even=15i,stringu1="HKAAAA",stringu2="SHAAAA",string4="AAAAxx" 17366400000000000 +onek unique1=105i,unique2=201i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=105i,fivethous=105i,tenthous=105i,odd=10i,even=11i,stringu1="BEAAAA",stringu2="THAAAA",string4="HHHHxx" 17452800000000000 +onek unique1=312i,unique2=202i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=12i,twothousand=112i,fivethous=312i,tenthous=312i,odd=4i,even=5i,stringu1="AMAAAA",stringu2="UHAAAA",string4="OOOOxx" 17539200000000000 +onek unique1=552i,unique2=203i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=52i,twothousand=152i,fivethous=52i,tenthous=552i,odd=4i,even=5i,stringu1="GVAAAA",stringu2="VHAAAA",string4="VVVVxx" 17625600000000000 +onek unique1=918i,unique2=204i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=18i,twothousand=118i,fivethous=418i,tenthous=918i,odd=16i,even=17i,stringu1="IJAAAA",stringu2="WHAAAA",string4="AAAAxx" 17712000000000000 +onek unique1=114i,unique2=205i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=14i,twothousand=114i,fivethous=114i,tenthous=114i,odd=8i,even=9i,stringu1="KEAAAA",stringu2="XHAAAA",string4="HHHHxx" 17798400000000000 +onek unique1=805i,unique2=206i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=5i,fivethous=305i,tenthous=805i,odd=10i,even=11i,stringu1="ZEAAAA",stringu2="YHAAAA",string4="OOOOxx" 17884800000000000 +onek unique1=875i,unique2=207i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=75i,twothousand=75i,fivethous=375i,tenthous=875i,odd=10i,even=11i,stringu1="RHAAAA",stringu2="ZHAAAA",string4="VVVVxx" 17971200000000000 +onek unique1=225i,unique2=208i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=25i,twothousand=25i,fivethous=225i,tenthous=225i,odd=10i,even=11i,stringu1="RIAAAA",stringu2="AIAAAA",string4="AAAAxx" 18057600000000000 +onek unique1=495i,unique2=209i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=95i,twothousand=95i,fivethous=495i,tenthous=495i,odd=10i,even=11i,stringu1="BTAAAA",stringu2="BIAAAA",string4="HHHHxx" 18144000000000000 +onek unique1=150i,unique2=210i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=50i,twothousand=150i,fivethous=150i,tenthous=150i,odd=0i,even=1i,stringu1="UFAAAA",stringu2="CIAAAA",string4="OOOOxx" 18230400000000000 +onek unique1=759i,unique2=211i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=59i,twothousand=159i,fivethous=259i,tenthous=759i,odd=18i,even=19i,stringu1="FDAAAA",stringu2="DIAAAA",string4="VVVVxx" 18316800000000000 +onek unique1=149i,unique2=212i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=49i,twothousand=149i,fivethous=149i,tenthous=149i,odd=18i,even=19i,stringu1="TFAAAA",stringu2="EIAAAA",string4="AAAAxx" 18403200000000000 +onek unique1=480i,unique2=213i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=80i,twothousand=80i,fivethous=480i,tenthous=480i,odd=0i,even=1i,stringu1="MSAAAA",stringu2="FIAAAA",string4="HHHHxx" 18489600000000000 +onek unique1=1i,unique2=214i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1i,fivethous=1i,tenthous=1i,odd=2i,even=3i,stringu1="BAAAAA",stringu2="GIAAAA",string4="OOOOxx" 18576000000000000 +onek unique1=557i,unique2=215i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=57i,twothousand=157i,fivethous=57i,tenthous=557i,odd=14i,even=15i,stringu1="LVAAAA",stringu2="HIAAAA",string4="VVVVxx" 18662400000000000 +onek unique1=295i,unique2=216i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=95i,twothousand=95i,fivethous=295i,tenthous=295i,odd=10i,even=11i,stringu1="JLAAAA",stringu2="IIAAAA",string4="AAAAxx" 18748800000000000 +onek unique1=854i,unique2=217i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=54i,twothousand=54i,fivethous=354i,tenthous=854i,odd=8i,even=9i,stringu1="WGAAAA",stringu2="JIAAAA",string4="HHHHxx" 18835200000000000 +onek unique1=420i,unique2=218i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=20i,twothousand=20i,fivethous=420i,tenthous=420i,odd=0i,even=1i,stringu1="EQAAAA",stringu2="KIAAAA",string4="OOOOxx" 18921600000000000 +onek unique1=414i,unique2=219i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=14i,twothousand=14i,fivethous=414i,tenthous=414i,odd=8i,even=9i,stringu1="YPAAAA",stringu2="LIAAAA",string4="VVVVxx" 19008000000000000 +onek unique1=758i,unique2=220i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=58i,twothousand=158i,fivethous=258i,tenthous=758i,odd=16i,even=17i,stringu1="EDAAAA",stringu2="MIAAAA",string4="AAAAxx" 19094400000000000 +onek unique1=879i,unique2=221i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=79i,twothousand=79i,fivethous=379i,tenthous=879i,odd=18i,even=19i,stringu1="VHAAAA",stringu2="NIAAAA",string4="HHHHxx" 19180800000000000 +onek unique1=332i,unique2=222i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=32i,twothousand=132i,fivethous=332i,tenthous=332i,odd=4i,even=5i,stringu1="UMAAAA",stringu2="OIAAAA",string4="OOOOxx" 19267200000000000 +onek unique1=78i,unique2=223i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=78i,twothousand=78i,fivethous=78i,tenthous=78i,odd=16i,even=17i,stringu1="ADAAAA",stringu2="PIAAAA",string4="VVVVxx" 19353600000000000 +onek unique1=851i,unique2=224i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=51i,twothousand=51i,fivethous=351i,tenthous=851i,odd=2i,even=3i,stringu1="TGAAAA",stringu2="QIAAAA",string4="AAAAxx" 19440000000000000 +onek unique1=592i,unique2=225i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=92i,twothousand=192i,fivethous=92i,tenthous=592i,odd=4i,even=5i,stringu1="UWAAAA",stringu2="RIAAAA",string4="HHHHxx" 19526400000000000 +onek unique1=979i,unique2=226i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=79i,twothousand=179i,fivethous=479i,tenthous=979i,odd=18i,even=19i,stringu1="RLAAAA",stringu2="SIAAAA",string4="OOOOxx" 19612800000000000 +onek unique1=989i,unique2=227i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=89i,twothousand=189i,fivethous=489i,tenthous=989i,odd=18i,even=19i,stringu1="BMAAAA",stringu2="TIAAAA",string4="VVVVxx" 19699200000000000 +onek unique1=752i,unique2=228i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=52i,twothousand=152i,fivethous=252i,tenthous=752i,odd=4i,even=5i,stringu1="YCAAAA",stringu2="UIAAAA",string4="AAAAxx" 19785600000000000 +onek unique1=214i,unique2=229i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=14i,twothousand=14i,fivethous=214i,tenthous=214i,odd=8i,even=9i,stringu1="GIAAAA",stringu2="VIAAAA",string4="HHHHxx" 19872000000000000 +onek unique1=453i,unique2=230i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=53i,twothousand=53i,fivethous=453i,tenthous=453i,odd=6i,even=7i,stringu1="LRAAAA",stringu2="WIAAAA",string4="OOOOxx" 19958400000000000 +onek unique1=540i,unique2=231i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=40i,twothousand=140i,fivethous=40i,tenthous=540i,odd=0i,even=1i,stringu1="UUAAAA",stringu2="XIAAAA",string4="VVVVxx" 20044800000000000 +onek unique1=597i,unique2=232i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=97i,twothousand=197i,fivethous=97i,tenthous=597i,odd=14i,even=15i,stringu1="ZWAAAA",stringu2="YIAAAA",string4="AAAAxx" 20131200000000000 +onek unique1=356i,unique2=233i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=56i,twothousand=156i,fivethous=356i,tenthous=356i,odd=12i,even=13i,stringu1="SNAAAA",stringu2="ZIAAAA",string4="HHHHxx" 20217600000000000 +onek unique1=720i,unique2=234i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=20i,twothousand=120i,fivethous=220i,tenthous=720i,odd=0i,even=1i,stringu1="SBAAAA",stringu2="AJAAAA",string4="OOOOxx" 20304000000000000 +onek unique1=367i,unique2=235i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=67i,twothousand=167i,fivethous=367i,tenthous=367i,odd=14i,even=15i,stringu1="DOAAAA",stringu2="BJAAAA",string4="VVVVxx" 20390400000000000 +onek unique1=762i,unique2=236i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=62i,twothousand=162i,fivethous=262i,tenthous=762i,odd=4i,even=5i,stringu1="IDAAAA",stringu2="CJAAAA",string4="AAAAxx" 20476800000000000 +onek unique1=986i,unique2=237i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=86i,twothousand=186i,fivethous=486i,tenthous=986i,odd=12i,even=13i,stringu1="YLAAAA",stringu2="DJAAAA",string4="HHHHxx" 20563200000000000 +onek unique1=924i,unique2=238i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=24i,twothousand=124i,fivethous=424i,tenthous=924i,odd=8i,even=9i,stringu1="OJAAAA",stringu2="EJAAAA",string4="OOOOxx" 20649600000000000 +onek unique1=779i,unique2=239i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=79i,twothousand=179i,fivethous=279i,tenthous=779i,odd=18i,even=19i,stringu1="ZDAAAA",stringu2="FJAAAA",string4="VVVVxx" 20736000000000000 +onek unique1=684i,unique2=240i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=84i,twothousand=84i,fivethous=184i,tenthous=684i,odd=8i,even=9i,stringu1="IAAAAA",stringu2="GJAAAA",string4="AAAAxx" 20822400000000000 +onek unique1=413i,unique2=241i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=13i,twothousand=13i,fivethous=413i,tenthous=413i,odd=6i,even=7i,stringu1="XPAAAA",stringu2="HJAAAA",string4="HHHHxx" 20908800000000000 +onek unique1=479i,unique2=242i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=79i,twothousand=79i,fivethous=479i,tenthous=479i,odd=18i,even=19i,stringu1="LSAAAA",stringu2="IJAAAA",string4="OOOOxx" 20995200000000000 +onek unique1=731i,unique2=243i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=31i,twothousand=131i,fivethous=231i,tenthous=731i,odd=2i,even=3i,stringu1="DCAAAA",stringu2="JJAAAA",string4="VVVVxx" 21081600000000000 +onek unique1=409i,unique2=244i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=9i,fivethous=409i,tenthous=409i,odd=18i,even=19i,stringu1="TPAAAA",stringu2="KJAAAA",string4="AAAAxx" 21168000000000000 +onek unique1=372i,unique2=245i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=72i,twothousand=172i,fivethous=372i,tenthous=372i,odd=4i,even=5i,stringu1="IOAAAA",stringu2="LJAAAA",string4="HHHHxx" 21254400000000000 +onek unique1=139i,unique2=246i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=39i,twothousand=139i,fivethous=139i,tenthous=139i,odd=18i,even=19i,stringu1="JFAAAA",stringu2="MJAAAA",string4="OOOOxx" 21340800000000000 +onek unique1=717i,unique2=247i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=17i,twothousand=117i,fivethous=217i,tenthous=717i,odd=14i,even=15i,stringu1="PBAAAA",stringu2="NJAAAA",string4="VVVVxx" 21427200000000000 +onek unique1=539i,unique2=248i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=39i,twothousand=139i,fivethous=39i,tenthous=539i,odd=18i,even=19i,stringu1="TUAAAA",stringu2="OJAAAA",string4="AAAAxx" 21513600000000000 +onek unique1=318i,unique2=249i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=18i,twothousand=118i,fivethous=318i,tenthous=318i,odd=16i,even=17i,stringu1="GMAAAA",stringu2="PJAAAA",string4="HHHHxx" 21600000000000000 +onek unique1=208i,unique2=250i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=8i,fivethous=208i,tenthous=208i,odd=16i,even=17i,stringu1="AIAAAA",stringu2="QJAAAA",string4="OOOOxx" 21686400000000000 +onek unique1=797i,unique2=251i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=97i,twothousand=197i,fivethous=297i,tenthous=797i,odd=14i,even=15i,stringu1="REAAAA",stringu2="RJAAAA",string4="VVVVxx" 21772800000000000 +onek unique1=661i,unique2=252i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=61i,twothousand=61i,fivethous=161i,tenthous=661i,odd=2i,even=3i,stringu1="LZAAAA",stringu2="SJAAAA",string4="AAAAxx" 21859200000000000 +onek unique1=50i,unique2=253i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=50i,twothousand=50i,fivethous=50i,tenthous=50i,odd=0i,even=1i,stringu1="YBAAAA",stringu2="TJAAAA",string4="HHHHxx" 21945600000000000 +onek unique1=102i,unique2=254i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=102i,fivethous=102i,tenthous=102i,odd=4i,even=5i,stringu1="YDAAAA",stringu2="UJAAAA",string4="OOOOxx" 22032000000000000 +onek unique1=484i,unique2=255i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=84i,twothousand=84i,fivethous=484i,tenthous=484i,odd=8i,even=9i,stringu1="QSAAAA",stringu2="VJAAAA",string4="VVVVxx" 22118400000000000 +onek unique1=108i,unique2=256i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=108i,fivethous=108i,tenthous=108i,odd=16i,even=17i,stringu1="EEAAAA",stringu2="WJAAAA",string4="AAAAxx" 22204800000000000 +onek unique1=140i,unique2=257i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=40i,twothousand=140i,fivethous=140i,tenthous=140i,odd=0i,even=1i,stringu1="KFAAAA",stringu2="XJAAAA",string4="HHHHxx" 22291200000000000 +onek unique1=996i,unique2=258i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=96i,twothousand=196i,fivethous=496i,tenthous=996i,odd=12i,even=13i,stringu1="IMAAAA",stringu2="YJAAAA",string4="OOOOxx" 22377600000000000 +onek unique1=687i,unique2=259i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=87i,twothousand=87i,fivethous=187i,tenthous=687i,odd=14i,even=15i,stringu1="LAAAAA",stringu2="ZJAAAA",string4="VVVVxx" 22464000000000000 +onek unique1=241i,unique2=260i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=41i,twothousand=41i,fivethous=241i,tenthous=241i,odd=2i,even=3i,stringu1="HJAAAA",stringu2="AKAAAA",string4="AAAAxx" 22550400000000000 +onek unique1=923i,unique2=261i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=23i,twothousand=123i,fivethous=423i,tenthous=923i,odd=6i,even=7i,stringu1="NJAAAA",stringu2="BKAAAA",string4="HHHHxx" 22636800000000000 +onek unique1=500i,unique2=262i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=100i,fivethous=0i,tenthous=500i,odd=0i,even=1i,stringu1="GTAAAA",stringu2="CKAAAA",string4="OOOOxx" 22723200000000000 +onek unique1=536i,unique2=263i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=36i,twothousand=136i,fivethous=36i,tenthous=536i,odd=12i,even=13i,stringu1="QUAAAA",stringu2="DKAAAA",string4="VVVVxx" 22809600000000000 +onek unique1=490i,unique2=264i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=90i,twothousand=90i,fivethous=490i,tenthous=490i,odd=0i,even=1i,stringu1="WSAAAA",stringu2="EKAAAA",string4="AAAAxx" 22896000000000000 +onek unique1=773i,unique2=265i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=73i,twothousand=173i,fivethous=273i,tenthous=773i,odd=6i,even=7i,stringu1="TDAAAA",stringu2="FKAAAA",string4="HHHHxx" 22982400000000000 +onek unique1=19i,unique2=266i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=19i,twothousand=19i,fivethous=19i,tenthous=19i,odd=18i,even=19i,stringu1="TAAAAA",stringu2="GKAAAA",string4="OOOOxx" 23068800000000000 +onek unique1=534i,unique2=267i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=34i,twothousand=134i,fivethous=34i,tenthous=534i,odd=8i,even=9i,stringu1="OUAAAA",stringu2="HKAAAA",string4="VVVVxx" 23155200000000000 +onek unique1=941i,unique2=268i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=41i,twothousand=141i,fivethous=441i,tenthous=941i,odd=2i,even=3i,stringu1="FKAAAA",stringu2="IKAAAA",string4="AAAAxx" 23241600000000000 +onek unique1=477i,unique2=269i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=77i,twothousand=77i,fivethous=477i,tenthous=477i,odd=14i,even=15i,stringu1="JSAAAA",stringu2="JKAAAA",string4="HHHHxx" 23328000000000000 +onek unique1=173i,unique2=270i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=73i,twothousand=173i,fivethous=173i,tenthous=173i,odd=6i,even=7i,stringu1="RGAAAA",stringu2="KKAAAA",string4="OOOOxx" 23414400000000000 +onek unique1=113i,unique2=271i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=13i,twothousand=113i,fivethous=113i,tenthous=113i,odd=6i,even=7i,stringu1="JEAAAA",stringu2="LKAAAA",string4="VVVVxx" 23500800000000000 +onek unique1=526i,unique2=272i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=26i,twothousand=126i,fivethous=26i,tenthous=526i,odd=12i,even=13i,stringu1="GUAAAA",stringu2="MKAAAA",string4="AAAAxx" 23587200000000000 +onek unique1=727i,unique2=273i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=27i,twothousand=127i,fivethous=227i,tenthous=727i,odd=14i,even=15i,stringu1="ZBAAAA",stringu2="NKAAAA",string4="HHHHxx" 23673600000000000 +onek unique1=302i,unique2=274i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=102i,fivethous=302i,tenthous=302i,odd=4i,even=5i,stringu1="QLAAAA",stringu2="OKAAAA",string4="OOOOxx" 23760000000000000 +onek unique1=789i,unique2=275i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=89i,twothousand=189i,fivethous=289i,tenthous=789i,odd=18i,even=19i,stringu1="JEAAAA",stringu2="PKAAAA",string4="VVVVxx" 23846400000000000 +onek unique1=447i,unique2=276i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=47i,twothousand=47i,fivethous=447i,tenthous=447i,odd=14i,even=15i,stringu1="FRAAAA",stringu2="QKAAAA",string4="AAAAxx" 23932800000000000 +onek unique1=884i,unique2=277i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=84i,twothousand=84i,fivethous=384i,tenthous=884i,odd=8i,even=9i,stringu1="AIAAAA",stringu2="RKAAAA",string4="HHHHxx" 24019200000000000 +onek unique1=718i,unique2=278i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=18i,twothousand=118i,fivethous=218i,tenthous=718i,odd=16i,even=17i,stringu1="QBAAAA",stringu2="SKAAAA",string4="OOOOxx" 24105600000000000 +onek unique1=818i,unique2=279i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=18i,twothousand=18i,fivethous=318i,tenthous=818i,odd=16i,even=17i,stringu1="MFAAAA",stringu2="TKAAAA",string4="VVVVxx" 24192000000000000 +onek unique1=466i,unique2=280i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=66i,twothousand=66i,fivethous=466i,tenthous=466i,odd=12i,even=13i,stringu1="YRAAAA",stringu2="UKAAAA",string4="AAAAxx" 24278400000000000 +onek unique1=131i,unique2=281i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=31i,twothousand=131i,fivethous=131i,tenthous=131i,odd=2i,even=3i,stringu1="BFAAAA",stringu2="VKAAAA",string4="HHHHxx" 24364800000000000 +onek unique1=503i,unique2=282i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=103i,fivethous=3i,tenthous=503i,odd=6i,even=7i,stringu1="JTAAAA",stringu2="WKAAAA",string4="OOOOxx" 24451200000000000 +onek unique1=364i,unique2=283i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=64i,twothousand=164i,fivethous=364i,tenthous=364i,odd=8i,even=9i,stringu1="AOAAAA",stringu2="XKAAAA",string4="VVVVxx" 24537600000000000 +onek unique1=934i,unique2=284i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=34i,twothousand=134i,fivethous=434i,tenthous=934i,odd=8i,even=9i,stringu1="YJAAAA",stringu2="YKAAAA",string4="AAAAxx" 24624000000000000 +onek unique1=542i,unique2=285i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=42i,twothousand=142i,fivethous=42i,tenthous=542i,odd=4i,even=5i,stringu1="WUAAAA",stringu2="ZKAAAA",string4="HHHHxx" 24710400000000000 +onek unique1=146i,unique2=286i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=46i,twothousand=146i,fivethous=146i,tenthous=146i,odd=12i,even=13i,stringu1="QFAAAA",stringu2="ALAAAA",string4="OOOOxx" 24796800000000000 +onek unique1=652i,unique2=287i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=52i,twothousand=52i,fivethous=152i,tenthous=652i,odd=4i,even=5i,stringu1="CZAAAA",stringu2="BLAAAA",string4="VVVVxx" 24883200000000000 +onek unique1=566i,unique2=288i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=66i,twothousand=166i,fivethous=66i,tenthous=566i,odd=12i,even=13i,stringu1="UVAAAA",stringu2="CLAAAA",string4="AAAAxx" 24969600000000000 +onek unique1=788i,unique2=289i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=88i,twothousand=188i,fivethous=288i,tenthous=788i,odd=16i,even=17i,stringu1="IEAAAA",stringu2="DLAAAA",string4="HHHHxx" 25056000000000000 +onek unique1=168i,unique2=290i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=68i,twothousand=168i,fivethous=168i,tenthous=168i,odd=16i,even=17i,stringu1="MGAAAA",stringu2="ELAAAA",string4="OOOOxx" 25142400000000000 +onek unique1=736i,unique2=291i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=36i,twothousand=136i,fivethous=236i,tenthous=736i,odd=12i,even=13i,stringu1="ICAAAA",stringu2="FLAAAA",string4="VVVVxx" 25228800000000000 +onek unique1=795i,unique2=292i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=95i,twothousand=195i,fivethous=295i,tenthous=795i,odd=10i,even=11i,stringu1="PEAAAA",stringu2="GLAAAA",string4="AAAAxx" 25315200000000000 +onek unique1=103i,unique2=293i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=103i,fivethous=103i,tenthous=103i,odd=6i,even=7i,stringu1="ZDAAAA",stringu2="HLAAAA",string4="HHHHxx" 25401600000000000 +onek unique1=763i,unique2=294i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=63i,twothousand=163i,fivethous=263i,tenthous=763i,odd=6i,even=7i,stringu1="JDAAAA",stringu2="ILAAAA",string4="OOOOxx" 25488000000000000 +onek unique1=256i,unique2=295i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=56i,twothousand=56i,fivethous=256i,tenthous=256i,odd=12i,even=13i,stringu1="WJAAAA",stringu2="JLAAAA",string4="VVVVxx" 25574400000000000 +onek unique1=63i,unique2=296i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=63i,twothousand=63i,fivethous=63i,tenthous=63i,odd=6i,even=7i,stringu1="LCAAAA",stringu2="KLAAAA",string4="AAAAxx" 25660800000000000 +onek unique1=702i,unique2=297i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=102i,fivethous=202i,tenthous=702i,odd=4i,even=5i,stringu1="ABAAAA",stringu2="LLAAAA",string4="HHHHxx" 25747200000000000 +onek unique1=390i,unique2=298i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=90i,twothousand=190i,fivethous=390i,tenthous=390i,odd=0i,even=1i,stringu1="APAAAA",stringu2="MLAAAA",string4="OOOOxx" 25833600000000000 +onek unique1=116i,unique2=299i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=16i,twothousand=116i,fivethous=116i,tenthous=116i,odd=12i,even=13i,stringu1="MEAAAA",stringu2="NLAAAA",string4="VVVVxx" 25920000000000000 +onek unique1=354i,unique2=300i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=54i,twothousand=154i,fivethous=354i,tenthous=354i,odd=8i,even=9i,stringu1="QNAAAA",stringu2="OLAAAA",string4="AAAAxx" 26006400000000000 +onek unique1=162i,unique2=301i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=62i,twothousand=162i,fivethous=162i,tenthous=162i,odd=4i,even=5i,stringu1="GGAAAA",stringu2="PLAAAA",string4="HHHHxx" 26092800000000000 +onek unique1=71i,unique2=302i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=71i,twothousand=71i,fivethous=71i,tenthous=71i,odd=2i,even=3i,stringu1="TCAAAA",stringu2="QLAAAA",string4="OOOOxx" 26179200000000000 +onek unique1=916i,unique2=303i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=16i,twothousand=116i,fivethous=416i,tenthous=916i,odd=12i,even=13i,stringu1="GJAAAA",stringu2="RLAAAA",string4="VVVVxx" 26265600000000000 +onek unique1=565i,unique2=304i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=65i,twothousand=165i,fivethous=65i,tenthous=565i,odd=10i,even=11i,stringu1="TVAAAA",stringu2="SLAAAA",string4="AAAAxx" 26352000000000000 +onek unique1=509i,unique2=305i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=109i,fivethous=9i,tenthous=509i,odd=18i,even=19i,stringu1="PTAAAA",stringu2="TLAAAA",string4="HHHHxx" 26438400000000000 +onek unique1=20i,unique2=306i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=20i,twothousand=20i,fivethous=20i,tenthous=20i,odd=0i,even=1i,stringu1="UAAAAA",stringu2="ULAAAA",string4="OOOOxx" 26524800000000000 +onek unique1=813i,unique2=307i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=13i,twothousand=13i,fivethous=313i,tenthous=813i,odd=6i,even=7i,stringu1="HFAAAA",stringu2="VLAAAA",string4="VVVVxx" 26611200000000000 +onek unique1=80i,unique2=308i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=80i,twothousand=80i,fivethous=80i,tenthous=80i,odd=0i,even=1i,stringu1="CDAAAA",stringu2="WLAAAA",string4="AAAAxx" 26697600000000000 +onek unique1=400i,unique2=309i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=0i,fivethous=400i,tenthous=400i,odd=0i,even=1i,stringu1="KPAAAA",stringu2="XLAAAA",string4="HHHHxx" 26784000000000000 +onek unique1=888i,unique2=310i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=88i,twothousand=88i,fivethous=388i,tenthous=888i,odd=16i,even=17i,stringu1="EIAAAA",stringu2="YLAAAA",string4="OOOOxx" 26870400000000000 +onek unique1=825i,unique2=311i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=25i,twothousand=25i,fivethous=325i,tenthous=825i,odd=10i,even=11i,stringu1="TFAAAA",stringu2="ZLAAAA",string4="VVVVxx" 26956800000000000 +onek unique1=401i,unique2=312i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1i,fivethous=401i,tenthous=401i,odd=2i,even=3i,stringu1="LPAAAA",stringu2="AMAAAA",string4="AAAAxx" 27043200000000000 +onek unique1=158i,unique2=313i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=58i,twothousand=158i,fivethous=158i,tenthous=158i,odd=16i,even=17i,stringu1="CGAAAA",stringu2="BMAAAA",string4="HHHHxx" 27129600000000000 +onek unique1=973i,unique2=314i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=73i,twothousand=173i,fivethous=473i,tenthous=973i,odd=6i,even=7i,stringu1="LLAAAA",stringu2="CMAAAA",string4="OOOOxx" 27216000000000000 +onek unique1=324i,unique2=315i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=24i,twothousand=124i,fivethous=324i,tenthous=324i,odd=8i,even=9i,stringu1="MMAAAA",stringu2="DMAAAA",string4="VVVVxx" 27302400000000000 +onek unique1=873i,unique2=316i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=73i,twothousand=73i,fivethous=373i,tenthous=873i,odd=6i,even=7i,stringu1="PHAAAA",stringu2="EMAAAA",string4="AAAAxx" 27388800000000000 +onek unique1=676i,unique2=317i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=76i,twothousand=76i,fivethous=176i,tenthous=676i,odd=12i,even=13i,stringu1="AAAAAA",stringu2="FMAAAA",string4="HHHHxx" 27475200000000000 +onek unique1=199i,unique2=318i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=99i,twothousand=199i,fivethous=199i,tenthous=199i,odd=18i,even=19i,stringu1="RHAAAA",stringu2="GMAAAA",string4="OOOOxx" 27561600000000000 +onek unique1=304i,unique2=319i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=104i,fivethous=304i,tenthous=304i,odd=8i,even=9i,stringu1="SLAAAA",stringu2="HMAAAA",string4="VVVVxx" 27648000000000000 +onek unique1=338i,unique2=320i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=38i,twothousand=138i,fivethous=338i,tenthous=338i,odd=16i,even=17i,stringu1="ANAAAA",stringu2="IMAAAA",string4="AAAAxx" 27734400000000000 +onek unique1=743i,unique2=321i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=43i,twothousand=143i,fivethous=243i,tenthous=743i,odd=6i,even=7i,stringu1="PCAAAA",stringu2="JMAAAA",string4="HHHHxx" 27820800000000000 +onek unique1=730i,unique2=322i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=30i,twothousand=130i,fivethous=230i,tenthous=730i,odd=0i,even=1i,stringu1="CCAAAA",stringu2="KMAAAA",string4="OOOOxx" 27907200000000000 +onek unique1=130i,unique2=323i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=30i,twothousand=130i,fivethous=130i,tenthous=130i,odd=0i,even=1i,stringu1="AFAAAA",stringu2="LMAAAA",string4="VVVVxx" 27993600000000000 +onek unique1=224i,unique2=324i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=24i,twothousand=24i,fivethous=224i,tenthous=224i,odd=8i,even=9i,stringu1="QIAAAA",stringu2="MMAAAA",string4="AAAAxx" 28080000000000000 +onek unique1=216i,unique2=325i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=16i,twothousand=16i,fivethous=216i,tenthous=216i,odd=12i,even=13i,stringu1="IIAAAA",stringu2="NMAAAA",string4="HHHHxx" 28166400000000000 +onek unique1=2i,unique2=326i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=2i,fivethous=2i,tenthous=2i,odd=4i,even=5i,stringu1="CAAAAA",stringu2="OMAAAA",string4="OOOOxx" 28252800000000000 +onek unique1=836i,unique2=327i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=36i,twothousand=36i,fivethous=336i,tenthous=836i,odd=12i,even=13i,stringu1="EGAAAA",stringu2="PMAAAA",string4="VVVVxx" 28339200000000000 +onek unique1=443i,unique2=328i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=43i,twothousand=43i,fivethous=443i,tenthous=443i,odd=6i,even=7i,stringu1="BRAAAA",stringu2="QMAAAA",string4="AAAAxx" 28425600000000000 +onek unique1=777i,unique2=329i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=77i,twothousand=177i,fivethous=277i,tenthous=777i,odd=14i,even=15i,stringu1="XDAAAA",stringu2="RMAAAA",string4="HHHHxx" 28512000000000000 +onek unique1=126i,unique2=330i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=26i,twothousand=126i,fivethous=126i,tenthous=126i,odd=12i,even=13i,stringu1="WEAAAA",stringu2="SMAAAA",string4="OOOOxx" 28598400000000000 +onek unique1=117i,unique2=331i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=17i,twothousand=117i,fivethous=117i,tenthous=117i,odd=14i,even=15i,stringu1="NEAAAA",stringu2="TMAAAA",string4="VVVVxx" 28684800000000000 +onek unique1=633i,unique2=332i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=33i,twothousand=33i,fivethous=133i,tenthous=633i,odd=6i,even=7i,stringu1="JYAAAA",stringu2="UMAAAA",string4="AAAAxx" 28771200000000000 +onek unique1=310i,unique2=333i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=10i,twothousand=110i,fivethous=310i,tenthous=310i,odd=0i,even=1i,stringu1="YLAAAA",stringu2="VMAAAA",string4="HHHHxx" 28857600000000000 +onek unique1=622i,unique2=334i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=22i,twothousand=22i,fivethous=122i,tenthous=622i,odd=4i,even=5i,stringu1="YXAAAA",stringu2="WMAAAA",string4="OOOOxx" 28944000000000000 +onek unique1=268i,unique2=335i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=68i,twothousand=68i,fivethous=268i,tenthous=268i,odd=16i,even=17i,stringu1="IKAAAA",stringu2="XMAAAA",string4="VVVVxx" 29030400000000000 +onek unique1=384i,unique2=336i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=84i,twothousand=184i,fivethous=384i,tenthous=384i,odd=8i,even=9i,stringu1="UOAAAA",stringu2="YMAAAA",string4="AAAAxx" 29116800000000000 +onek unique1=460i,unique2=337i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=60i,twothousand=60i,fivethous=460i,tenthous=460i,odd=0i,even=1i,stringu1="SRAAAA",stringu2="ZMAAAA",string4="HHHHxx" 29203200000000000 +onek unique1=475i,unique2=338i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=75i,twothousand=75i,fivethous=475i,tenthous=475i,odd=10i,even=11i,stringu1="HSAAAA",stringu2="ANAAAA",string4="OOOOxx" 29289600000000000 +onek unique1=624i,unique2=339i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=24i,twothousand=24i,fivethous=124i,tenthous=624i,odd=8i,even=9i,stringu1="AYAAAA",stringu2="BNAAAA",string4="VVVVxx" 29376000000000000 +onek unique1=826i,unique2=340i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=26i,twothousand=26i,fivethous=326i,tenthous=826i,odd=12i,even=13i,stringu1="UFAAAA",stringu2="CNAAAA",string4="AAAAxx" 29462400000000000 +onek unique1=680i,unique2=341i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=80i,twothousand=80i,fivethous=180i,tenthous=680i,odd=0i,even=1i,stringu1="EAAAAA",stringu2="DNAAAA",string4="HHHHxx" 29548800000000000 +onek unique1=306i,unique2=342i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=106i,fivethous=306i,tenthous=306i,odd=12i,even=13i,stringu1="ULAAAA",stringu2="ENAAAA",string4="OOOOxx" 29635200000000000 +onek unique1=896i,unique2=343i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=96i,twothousand=96i,fivethous=396i,tenthous=896i,odd=12i,even=13i,stringu1="MIAAAA",stringu2="FNAAAA",string4="VVVVxx" 29721600000000000 +onek unique1=30i,unique2=344i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=30i,twothousand=30i,fivethous=30i,tenthous=30i,odd=0i,even=1i,stringu1="EBAAAA",stringu2="GNAAAA",string4="AAAAxx" 29808000000000000 +onek unique1=576i,unique2=345i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=76i,twothousand=176i,fivethous=76i,tenthous=576i,odd=12i,even=13i,stringu1="EWAAAA",stringu2="HNAAAA",string4="HHHHxx" 29894400000000000 +onek unique1=551i,unique2=346i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=51i,twothousand=151i,fivethous=51i,tenthous=551i,odd=2i,even=3i,stringu1="FVAAAA",stringu2="INAAAA",string4="OOOOxx" 29980800000000000 +onek unique1=639i,unique2=347i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=39i,twothousand=39i,fivethous=139i,tenthous=639i,odd=18i,even=19i,stringu1="PYAAAA",stringu2="JNAAAA",string4="VVVVxx" 30067200000000000 +onek unique1=975i,unique2=348i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=75i,twothousand=175i,fivethous=475i,tenthous=975i,odd=10i,even=11i,stringu1="NLAAAA",stringu2="KNAAAA",string4="AAAAxx" 30153600000000000 +onek unique1=882i,unique2=349i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=82i,twothousand=82i,fivethous=382i,tenthous=882i,odd=4i,even=5i,stringu1="YHAAAA",stringu2="LNAAAA",string4="HHHHxx" 30240000000000000 +onek unique1=160i,unique2=350i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=60i,twothousand=160i,fivethous=160i,tenthous=160i,odd=0i,even=1i,stringu1="EGAAAA",stringu2="MNAAAA",string4="OOOOxx" 30326400000000000 +onek unique1=522i,unique2=351i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=22i,twothousand=122i,fivethous=22i,tenthous=522i,odd=4i,even=5i,stringu1="CUAAAA",stringu2="NNAAAA",string4="VVVVxx" 30412800000000000 +onek unique1=620i,unique2=352i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=20i,twothousand=20i,fivethous=120i,tenthous=620i,odd=0i,even=1i,stringu1="WXAAAA",stringu2="ONAAAA",string4="AAAAxx" 30499200000000000 +onek unique1=719i,unique2=353i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=19i,twothousand=119i,fivethous=219i,tenthous=719i,odd=18i,even=19i,stringu1="RBAAAA",stringu2="PNAAAA",string4="HHHHxx" 30585600000000000 +onek unique1=88i,unique2=354i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=88i,twothousand=88i,fivethous=88i,tenthous=88i,odd=16i,even=17i,stringu1="KDAAAA",stringu2="QNAAAA",string4="OOOOxx" 30672000000000000 +onek unique1=614i,unique2=355i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=14i,twothousand=14i,fivethous=114i,tenthous=614i,odd=8i,even=9i,stringu1="QXAAAA",stringu2="RNAAAA",string4="VVVVxx" 30758400000000000 +onek unique1=54i,unique2=356i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=54i,twothousand=54i,fivethous=54i,tenthous=54i,odd=8i,even=9i,stringu1="CCAAAA",stringu2="SNAAAA",string4="AAAAxx" 30844800000000000 +onek unique1=209i,unique2=357i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=9i,fivethous=209i,tenthous=209i,odd=18i,even=19i,stringu1="BIAAAA",stringu2="TNAAAA",string4="HHHHxx" 30931200000000000 +onek unique1=67i,unique2=358i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=67i,twothousand=67i,fivethous=67i,tenthous=67i,odd=14i,even=15i,stringu1="PCAAAA",stringu2="UNAAAA",string4="OOOOxx" 31017600000000000 +onek unique1=809i,unique2=359i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=9i,fivethous=309i,tenthous=809i,odd=18i,even=19i,stringu1="DFAAAA",stringu2="VNAAAA",string4="VVVVxx" 31104000000000000 +onek unique1=982i,unique2=360i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=82i,twothousand=182i,fivethous=482i,tenthous=982i,odd=4i,even=5i,stringu1="ULAAAA",stringu2="WNAAAA",string4="AAAAxx" 31190400000000000 +onek unique1=817i,unique2=361i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=17i,twothousand=17i,fivethous=317i,tenthous=817i,odd=14i,even=15i,stringu1="LFAAAA",stringu2="XNAAAA",string4="HHHHxx" 31276800000000000 +onek unique1=187i,unique2=362i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=87i,twothousand=187i,fivethous=187i,tenthous=187i,odd=14i,even=15i,stringu1="FHAAAA",stringu2="YNAAAA",string4="OOOOxx" 31363200000000000 +onek unique1=992i,unique2=363i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=92i,twothousand=192i,fivethous=492i,tenthous=992i,odd=4i,even=5i,stringu1="EMAAAA",stringu2="ZNAAAA",string4="VVVVxx" 31449600000000000 +onek unique1=580i,unique2=364i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=80i,twothousand=180i,fivethous=80i,tenthous=580i,odd=0i,even=1i,stringu1="IWAAAA",stringu2="AOAAAA",string4="AAAAxx" 31536000000000000 +onek unique1=658i,unique2=365i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=58i,twothousand=58i,fivethous=158i,tenthous=658i,odd=16i,even=17i,stringu1="IZAAAA",stringu2="BOAAAA",string4="HHHHxx" 31622400000000000 +onek unique1=222i,unique2=366i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=22i,twothousand=22i,fivethous=222i,tenthous=222i,odd=4i,even=5i,stringu1="OIAAAA",stringu2="COAAAA",string4="OOOOxx" 31708800000000000 +onek unique1=667i,unique2=367i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=67i,twothousand=67i,fivethous=167i,tenthous=667i,odd=14i,even=15i,stringu1="RZAAAA",stringu2="DOAAAA",string4="VVVVxx" 31795200000000000 +onek unique1=715i,unique2=368i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=15i,twothousand=115i,fivethous=215i,tenthous=715i,odd=10i,even=11i,stringu1="NBAAAA",stringu2="EOAAAA",string4="AAAAxx" 31881600000000000 +onek unique1=990i,unique2=369i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=90i,twothousand=190i,fivethous=490i,tenthous=990i,odd=0i,even=1i,stringu1="CMAAAA",stringu2="FOAAAA",string4="HHHHxx" 31968000000000000 +onek unique1=22i,unique2=370i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=22i,twothousand=22i,fivethous=22i,tenthous=22i,odd=4i,even=5i,stringu1="WAAAAA",stringu2="GOAAAA",string4="OOOOxx" 32054400000000000 +onek unique1=362i,unique2=371i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=62i,twothousand=162i,fivethous=362i,tenthous=362i,odd=4i,even=5i,stringu1="YNAAAA",stringu2="HOAAAA",string4="VVVVxx" 32140800000000000 +onek unique1=376i,unique2=372i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=76i,twothousand=176i,fivethous=376i,tenthous=376i,odd=12i,even=13i,stringu1="MOAAAA",stringu2="IOAAAA",string4="AAAAxx" 32227200000000000 +onek unique1=246i,unique2=373i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=46i,twothousand=46i,fivethous=246i,tenthous=246i,odd=12i,even=13i,stringu1="MJAAAA",stringu2="JOAAAA",string4="HHHHxx" 32313600000000000 +onek unique1=300i,unique2=374i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=100i,fivethous=300i,tenthous=300i,odd=0i,even=1i,stringu1="OLAAAA",stringu2="KOAAAA",string4="OOOOxx" 32400000000000000 +onek unique1=231i,unique2=375i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=31i,twothousand=31i,fivethous=231i,tenthous=231i,odd=2i,even=3i,stringu1="XIAAAA",stringu2="LOAAAA",string4="VVVVxx" 32486400000000000 +onek unique1=151i,unique2=376i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=51i,twothousand=151i,fivethous=151i,tenthous=151i,odd=2i,even=3i,stringu1="VFAAAA",stringu2="MOAAAA",string4="AAAAxx" 32572800000000000 +onek unique1=29i,unique2=377i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=29i,twothousand=29i,fivethous=29i,tenthous=29i,odd=18i,even=19i,stringu1="DBAAAA",stringu2="NOAAAA",string4="HHHHxx" 32659200000000000 +onek unique1=297i,unique2=378i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=97i,twothousand=97i,fivethous=297i,tenthous=297i,odd=14i,even=15i,stringu1="LLAAAA",stringu2="OOAAAA",string4="OOOOxx" 32745600000000000 +onek unique1=403i,unique2=379i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=3i,fivethous=403i,tenthous=403i,odd=6i,even=7i,stringu1="NPAAAA",stringu2="POAAAA",string4="VVVVxx" 32832000000000000 +onek unique1=716i,unique2=380i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=16i,twothousand=116i,fivethous=216i,tenthous=716i,odd=12i,even=13i,stringu1="OBAAAA",stringu2="QOAAAA",string4="AAAAxx" 32918400000000000 +onek unique1=260i,unique2=381i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=60i,twothousand=60i,fivethous=260i,tenthous=260i,odd=0i,even=1i,stringu1="AKAAAA",stringu2="ROAAAA",string4="HHHHxx" 33004800000000000 +onek unique1=170i,unique2=382i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=70i,twothousand=170i,fivethous=170i,tenthous=170i,odd=0i,even=1i,stringu1="OGAAAA",stringu2="SOAAAA",string4="OOOOxx" 33091200000000000 +onek unique1=285i,unique2=383i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=85i,twothousand=85i,fivethous=285i,tenthous=285i,odd=10i,even=11i,stringu1="ZKAAAA",stringu2="TOAAAA",string4="VVVVxx" 33177600000000000 +onek unique1=82i,unique2=384i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=82i,twothousand=82i,fivethous=82i,tenthous=82i,odd=4i,even=5i,stringu1="EDAAAA",stringu2="UOAAAA",string4="AAAAxx" 33264000000000000 +onek unique1=958i,unique2=385i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=58i,twothousand=158i,fivethous=458i,tenthous=958i,odd=16i,even=17i,stringu1="WKAAAA",stringu2="VOAAAA",string4="HHHHxx" 33350400000000000 +onek unique1=175i,unique2=386i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=75i,twothousand=175i,fivethous=175i,tenthous=175i,odd=10i,even=11i,stringu1="TGAAAA",stringu2="WOAAAA",string4="OOOOxx" 33436800000000000 +onek unique1=671i,unique2=387i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=71i,twothousand=71i,fivethous=171i,tenthous=671i,odd=2i,even=3i,stringu1="VZAAAA",stringu2="XOAAAA",string4="VVVVxx" 33523200000000000 +onek unique1=822i,unique2=388i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=22i,twothousand=22i,fivethous=322i,tenthous=822i,odd=4i,even=5i,stringu1="QFAAAA",stringu2="YOAAAA",string4="AAAAxx" 33609600000000000 +onek unique1=573i,unique2=389i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=73i,twothousand=173i,fivethous=73i,tenthous=573i,odd=6i,even=7i,stringu1="BWAAAA",stringu2="ZOAAAA",string4="HHHHxx" 33696000000000000 +onek unique1=723i,unique2=390i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=23i,twothousand=123i,fivethous=223i,tenthous=723i,odd=6i,even=7i,stringu1="VBAAAA",stringu2="APAAAA",string4="OOOOxx" 33782400000000000 +onek unique1=195i,unique2=391i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=95i,twothousand=195i,fivethous=195i,tenthous=195i,odd=10i,even=11i,stringu1="NHAAAA",stringu2="BPAAAA",string4="VVVVxx" 33868800000000000 +onek unique1=197i,unique2=392i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=97i,twothousand=197i,fivethous=197i,tenthous=197i,odd=14i,even=15i,stringu1="PHAAAA",stringu2="CPAAAA",string4="AAAAxx" 33955200000000000 +onek unique1=755i,unique2=393i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=55i,twothousand=155i,fivethous=255i,tenthous=755i,odd=10i,even=11i,stringu1="BDAAAA",stringu2="DPAAAA",string4="HHHHxx" 34041600000000000 +onek unique1=42i,unique2=394i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=42i,twothousand=42i,fivethous=42i,tenthous=42i,odd=4i,even=5i,stringu1="QBAAAA",stringu2="EPAAAA",string4="OOOOxx" 34128000000000000 +onek unique1=897i,unique2=395i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=97i,twothousand=97i,fivethous=397i,tenthous=897i,odd=14i,even=15i,stringu1="NIAAAA",stringu2="FPAAAA",string4="VVVVxx" 34214400000000000 +onek unique1=309i,unique2=396i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=109i,fivethous=309i,tenthous=309i,odd=18i,even=19i,stringu1="XLAAAA",stringu2="GPAAAA",string4="AAAAxx" 34300800000000000 +onek unique1=724i,unique2=397i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=24i,twothousand=124i,fivethous=224i,tenthous=724i,odd=8i,even=9i,stringu1="WBAAAA",stringu2="HPAAAA",string4="HHHHxx" 34387200000000000 +onek unique1=474i,unique2=398i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=74i,twothousand=74i,fivethous=474i,tenthous=474i,odd=8i,even=9i,stringu1="GSAAAA",stringu2="IPAAAA",string4="OOOOxx" 34473600000000000 +onek unique1=345i,unique2=399i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=45i,twothousand=145i,fivethous=345i,tenthous=345i,odd=10i,even=11i,stringu1="HNAAAA",stringu2="JPAAAA",string4="VVVVxx" 34560000000000000 +onek unique1=678i,unique2=400i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=78i,twothousand=78i,fivethous=178i,tenthous=678i,odd=16i,even=17i,stringu1="CAAAAA",stringu2="KPAAAA",string4="AAAAxx" 34646400000000000 +onek unique1=757i,unique2=401i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=57i,twothousand=157i,fivethous=257i,tenthous=757i,odd=14i,even=15i,stringu1="DDAAAA",stringu2="LPAAAA",string4="HHHHxx" 34732800000000000 +onek unique1=600i,unique2=402i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=0i,fivethous=100i,tenthous=600i,odd=0i,even=1i,stringu1="CXAAAA",stringu2="MPAAAA",string4="OOOOxx" 34819200000000000 +onek unique1=184i,unique2=403i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=84i,twothousand=184i,fivethous=184i,tenthous=184i,odd=8i,even=9i,stringu1="CHAAAA",stringu2="NPAAAA",string4="VVVVxx" 34905600000000000 +onek unique1=155i,unique2=404i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=55i,twothousand=155i,fivethous=155i,tenthous=155i,odd=10i,even=11i,stringu1="ZFAAAA",stringu2="OPAAAA",string4="AAAAxx" 34992000000000000 +onek unique1=136i,unique2=405i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=36i,twothousand=136i,fivethous=136i,tenthous=136i,odd=12i,even=13i,stringu1="GFAAAA",stringu2="PPAAAA",string4="HHHHxx" 35078400000000000 +onek unique1=889i,unique2=406i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=89i,twothousand=89i,fivethous=389i,tenthous=889i,odd=18i,even=19i,stringu1="FIAAAA",stringu2="QPAAAA",string4="OOOOxx" 35164800000000000 +onek unique1=95i,unique2=407i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=95i,twothousand=95i,fivethous=95i,tenthous=95i,odd=10i,even=11i,stringu1="RDAAAA",stringu2="RPAAAA",string4="VVVVxx" 35251200000000000 +onek unique1=549i,unique2=408i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=49i,twothousand=149i,fivethous=49i,tenthous=549i,odd=18i,even=19i,stringu1="DVAAAA",stringu2="SPAAAA",string4="AAAAxx" 35337600000000000 +onek unique1=81i,unique2=409i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=81i,twothousand=81i,fivethous=81i,tenthous=81i,odd=2i,even=3i,stringu1="DDAAAA",stringu2="TPAAAA",string4="HHHHxx" 35424000000000000 +onek unique1=679i,unique2=410i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=79i,twothousand=79i,fivethous=179i,tenthous=679i,odd=18i,even=19i,stringu1="DAAAAA",stringu2="UPAAAA",string4="OOOOxx" 35510400000000000 +onek unique1=27i,unique2=411i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=27i,twothousand=27i,fivethous=27i,tenthous=27i,odd=14i,even=15i,stringu1="BBAAAA",stringu2="VPAAAA",string4="VVVVxx" 35596800000000000 +onek unique1=748i,unique2=412i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=48i,twothousand=148i,fivethous=248i,tenthous=748i,odd=16i,even=17i,stringu1="UCAAAA",stringu2="WPAAAA",string4="AAAAxx" 35683200000000000 +onek unique1=107i,unique2=413i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=107i,fivethous=107i,tenthous=107i,odd=14i,even=15i,stringu1="DEAAAA",stringu2="XPAAAA",string4="HHHHxx" 35769600000000000 +onek unique1=870i,unique2=414i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=70i,twothousand=70i,fivethous=370i,tenthous=870i,odd=0i,even=1i,stringu1="MHAAAA",stringu2="YPAAAA",string4="OOOOxx" 35856000000000000 +onek unique1=848i,unique2=415i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=48i,twothousand=48i,fivethous=348i,tenthous=848i,odd=16i,even=17i,stringu1="QGAAAA",stringu2="ZPAAAA",string4="VVVVxx" 35942400000000000 +onek unique1=764i,unique2=416i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=64i,twothousand=164i,fivethous=264i,tenthous=764i,odd=8i,even=9i,stringu1="KDAAAA",stringu2="AQAAAA",string4="AAAAxx" 36028800000000000 +onek unique1=535i,unique2=417i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=35i,twothousand=135i,fivethous=35i,tenthous=535i,odd=10i,even=11i,stringu1="PUAAAA",stringu2="BQAAAA",string4="HHHHxx" 36115200000000000 +onek unique1=211i,unique2=418i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=11i,twothousand=11i,fivethous=211i,tenthous=211i,odd=2i,even=3i,stringu1="DIAAAA",stringu2="CQAAAA",string4="OOOOxx" 36201600000000000 +onek unique1=625i,unique2=419i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=25i,twothousand=25i,fivethous=125i,tenthous=625i,odd=10i,even=11i,stringu1="BYAAAA",stringu2="DQAAAA",string4="VVVVxx" 36288000000000000 +onek unique1=96i,unique2=420i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=96i,twothousand=96i,fivethous=96i,tenthous=96i,odd=12i,even=13i,stringu1="SDAAAA",stringu2="EQAAAA",string4="AAAAxx" 36374400000000000 +onek unique1=828i,unique2=421i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=28i,twothousand=28i,fivethous=328i,tenthous=828i,odd=16i,even=17i,stringu1="WFAAAA",stringu2="FQAAAA",string4="HHHHxx" 36460800000000000 +onek unique1=229i,unique2=422i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=29i,twothousand=29i,fivethous=229i,tenthous=229i,odd=18i,even=19i,stringu1="VIAAAA",stringu2="GQAAAA",string4="OOOOxx" 36547200000000000 +onek unique1=602i,unique2=423i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=2i,fivethous=102i,tenthous=602i,odd=4i,even=5i,stringu1="EXAAAA",stringu2="HQAAAA",string4="VVVVxx" 36633600000000000 +onek unique1=742i,unique2=424i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=42i,twothousand=142i,fivethous=242i,tenthous=742i,odd=4i,even=5i,stringu1="OCAAAA",stringu2="IQAAAA",string4="AAAAxx" 36720000000000000 +onek unique1=451i,unique2=425i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=51i,twothousand=51i,fivethous=451i,tenthous=451i,odd=2i,even=3i,stringu1="JRAAAA",stringu2="JQAAAA",string4="HHHHxx" 36806400000000000 +onek unique1=991i,unique2=426i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=91i,twothousand=191i,fivethous=491i,tenthous=991i,odd=2i,even=3i,stringu1="DMAAAA",stringu2="KQAAAA",string4="OOOOxx" 36892800000000000 +onek unique1=301i,unique2=427i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=101i,fivethous=301i,tenthous=301i,odd=2i,even=3i,stringu1="PLAAAA",stringu2="LQAAAA",string4="VVVVxx" 36979200000000000 +onek unique1=510i,unique2=428i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=10i,twothousand=110i,fivethous=10i,tenthous=510i,odd=0i,even=1i,stringu1="QTAAAA",stringu2="MQAAAA",string4="AAAAxx" 37065600000000000 +onek unique1=299i,unique2=429i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=99i,twothousand=99i,fivethous=299i,tenthous=299i,odd=18i,even=19i,stringu1="NLAAAA",stringu2="NQAAAA",string4="HHHHxx" 37152000000000000 +onek unique1=961i,unique2=430i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=61i,twothousand=161i,fivethous=461i,tenthous=961i,odd=2i,even=3i,stringu1="ZKAAAA",stringu2="OQAAAA",string4="OOOOxx" 37238400000000000 +onek unique1=3i,unique2=431i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=3i,fivethous=3i,tenthous=3i,odd=6i,even=7i,stringu1="DAAAAA",stringu2="PQAAAA",string4="VVVVxx" 37324800000000000 +onek unique1=106i,unique2=432i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=106i,fivethous=106i,tenthous=106i,odd=12i,even=13i,stringu1="CEAAAA",stringu2="QQAAAA",string4="AAAAxx" 37411200000000000 +onek unique1=591i,unique2=433i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=91i,twothousand=191i,fivethous=91i,tenthous=591i,odd=2i,even=3i,stringu1="TWAAAA",stringu2="RQAAAA",string4="HHHHxx" 37497600000000000 +onek unique1=700i,unique2=434i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=100i,fivethous=200i,tenthous=700i,odd=0i,even=1i,stringu1="YAAAAA",stringu2="SQAAAA",string4="OOOOxx" 37584000000000000 +onek unique1=841i,unique2=435i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=41i,twothousand=41i,fivethous=341i,tenthous=841i,odd=2i,even=3i,stringu1="JGAAAA",stringu2="TQAAAA",string4="VVVVxx" 37670400000000000 +onek unique1=829i,unique2=436i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=29i,twothousand=29i,fivethous=329i,tenthous=829i,odd=18i,even=19i,stringu1="XFAAAA",stringu2="UQAAAA",string4="AAAAxx" 37756800000000000 +onek unique1=508i,unique2=437i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=108i,fivethous=8i,tenthous=508i,odd=16i,even=17i,stringu1="OTAAAA",stringu2="VQAAAA",string4="HHHHxx" 37843200000000000 +onek unique1=750i,unique2=438i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=50i,twothousand=150i,fivethous=250i,tenthous=750i,odd=0i,even=1i,stringu1="WCAAAA",stringu2="WQAAAA",string4="OOOOxx" 37929600000000000 +onek unique1=665i,unique2=439i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=65i,twothousand=65i,fivethous=165i,tenthous=665i,odd=10i,even=11i,stringu1="PZAAAA",stringu2="XQAAAA",string4="VVVVxx" 38016000000000000 +onek unique1=157i,unique2=440i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=57i,twothousand=157i,fivethous=157i,tenthous=157i,odd=14i,even=15i,stringu1="BGAAAA",stringu2="YQAAAA",string4="AAAAxx" 38102400000000000 +onek unique1=694i,unique2=441i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=94i,twothousand=94i,fivethous=194i,tenthous=694i,odd=8i,even=9i,stringu1="SAAAAA",stringu2="ZQAAAA",string4="HHHHxx" 38188800000000000 +onek unique1=176i,unique2=442i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=76i,twothousand=176i,fivethous=176i,tenthous=176i,odd=12i,even=13i,stringu1="UGAAAA",stringu2="ARAAAA",string4="OOOOxx" 38275200000000000 +onek unique1=950i,unique2=443i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=50i,twothousand=150i,fivethous=450i,tenthous=950i,odd=0i,even=1i,stringu1="OKAAAA",stringu2="BRAAAA",string4="VVVVxx" 38361600000000000 +onek unique1=970i,unique2=444i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=70i,twothousand=170i,fivethous=470i,tenthous=970i,odd=0i,even=1i,stringu1="ILAAAA",stringu2="CRAAAA",string4="AAAAxx" 38448000000000000 +onek unique1=496i,unique2=445i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=96i,twothousand=96i,fivethous=496i,tenthous=496i,odd=12i,even=13i,stringu1="CTAAAA",stringu2="DRAAAA",string4="HHHHxx" 38534400000000000 +onek unique1=429i,unique2=446i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=29i,twothousand=29i,fivethous=429i,tenthous=429i,odd=18i,even=19i,stringu1="NQAAAA",stringu2="ERAAAA",string4="OOOOxx" 38620800000000000 +onek unique1=907i,unique2=447i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=107i,fivethous=407i,tenthous=907i,odd=14i,even=15i,stringu1="XIAAAA",stringu2="FRAAAA",string4="VVVVxx" 38707200000000000 +onek unique1=72i,unique2=448i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=72i,twothousand=72i,fivethous=72i,tenthous=72i,odd=4i,even=5i,stringu1="UCAAAA",stringu2="GRAAAA",string4="AAAAxx" 38793600000000000 +onek unique1=186i,unique2=449i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=86i,twothousand=186i,fivethous=186i,tenthous=186i,odd=12i,even=13i,stringu1="EHAAAA",stringu2="HRAAAA",string4="HHHHxx" 38880000000000000 +onek unique1=713i,unique2=450i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=13i,twothousand=113i,fivethous=213i,tenthous=713i,odd=6i,even=7i,stringu1="LBAAAA",stringu2="IRAAAA",string4="OOOOxx" 38966400000000000 +onek unique1=432i,unique2=451i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=32i,twothousand=32i,fivethous=432i,tenthous=432i,odd=4i,even=5i,stringu1="QQAAAA",stringu2="JRAAAA",string4="VVVVxx" 39052800000000000 +onek unique1=735i,unique2=452i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=35i,twothousand=135i,fivethous=235i,tenthous=735i,odd=10i,even=11i,stringu1="HCAAAA",stringu2="KRAAAA",string4="AAAAxx" 39139200000000000 +onek unique1=516i,unique2=453i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=16i,twothousand=116i,fivethous=16i,tenthous=516i,odd=12i,even=13i,stringu1="WTAAAA",stringu2="LRAAAA",string4="HHHHxx" 39225600000000000 +onek unique1=964i,unique2=454i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=64i,twothousand=164i,fivethous=464i,tenthous=964i,odd=8i,even=9i,stringu1="CLAAAA",stringu2="MRAAAA",string4="OOOOxx" 39312000000000000 +onek unique1=840i,unique2=455i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=40i,twothousand=40i,fivethous=340i,tenthous=840i,odd=0i,even=1i,stringu1="IGAAAA",stringu2="NRAAAA",string4="VVVVxx" 39398400000000000 +onek unique1=550i,unique2=456i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=50i,twothousand=150i,fivethous=50i,tenthous=550i,odd=0i,even=1i,stringu1="EVAAAA",stringu2="ORAAAA",string4="AAAAxx" 39484800000000000 +onek unique1=360i,unique2=457i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=60i,twothousand=160i,fivethous=360i,tenthous=360i,odd=0i,even=1i,stringu1="WNAAAA",stringu2="PRAAAA",string4="HHHHxx" 39571200000000000 +onek unique1=827i,unique2=458i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=27i,twothousand=27i,fivethous=327i,tenthous=827i,odd=14i,even=15i,stringu1="VFAAAA",stringu2="QRAAAA",string4="OOOOxx" 39657600000000000 +onek unique1=959i,unique2=459i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=59i,twothousand=159i,fivethous=459i,tenthous=959i,odd=18i,even=19i,stringu1="XKAAAA",stringu2="RRAAAA",string4="VVVVxx" 39744000000000000 +onek unique1=454i,unique2=460i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=54i,twothousand=54i,fivethous=454i,tenthous=454i,odd=8i,even=9i,stringu1="MRAAAA",stringu2="SRAAAA",string4="AAAAxx" 39830400000000000 +onek unique1=819i,unique2=461i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=19i,twothousand=19i,fivethous=319i,tenthous=819i,odd=18i,even=19i,stringu1="NFAAAA",stringu2="TRAAAA",string4="HHHHxx" 39916800000000000 +onek unique1=745i,unique2=462i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=45i,twothousand=145i,fivethous=245i,tenthous=745i,odd=10i,even=11i,stringu1="RCAAAA",stringu2="URAAAA",string4="OOOOxx" 40003200000000000 +onek unique1=279i,unique2=463i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=79i,twothousand=79i,fivethous=279i,tenthous=279i,odd=18i,even=19i,stringu1="TKAAAA",stringu2="VRAAAA",string4="VVVVxx" 40089600000000000 +onek unique1=426i,unique2=464i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=26i,twothousand=26i,fivethous=426i,tenthous=426i,odd=12i,even=13i,stringu1="KQAAAA",stringu2="WRAAAA",string4="AAAAxx" 40176000000000000 +onek unique1=70i,unique2=465i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=70i,twothousand=70i,fivethous=70i,tenthous=70i,odd=0i,even=1i,stringu1="SCAAAA",stringu2="XRAAAA",string4="HHHHxx" 40262400000000000 +onek unique1=637i,unique2=466i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=37i,twothousand=37i,fivethous=137i,tenthous=637i,odd=14i,even=15i,stringu1="NYAAAA",stringu2="YRAAAA",string4="OOOOxx" 40348800000000000 +onek unique1=417i,unique2=467i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=17i,twothousand=17i,fivethous=417i,tenthous=417i,odd=14i,even=15i,stringu1="BQAAAA",stringu2="ZRAAAA",string4="VVVVxx" 40435200000000000 +onek unique1=586i,unique2=468i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=86i,twothousand=186i,fivethous=86i,tenthous=586i,odd=12i,even=13i,stringu1="OWAAAA",stringu2="ASAAAA",string4="AAAAxx" 40521600000000000 +onek unique1=314i,unique2=469i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=14i,twothousand=114i,fivethous=314i,tenthous=314i,odd=8i,even=9i,stringu1="CMAAAA",stringu2="BSAAAA",string4="HHHHxx" 40608000000000000 +onek unique1=101i,unique2=470i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=101i,fivethous=101i,tenthous=101i,odd=2i,even=3i,stringu1="XDAAAA",stringu2="CSAAAA",string4="OOOOxx" 40694400000000000 +onek unique1=205i,unique2=471i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=5i,fivethous=205i,tenthous=205i,odd=10i,even=11i,stringu1="XHAAAA",stringu2="DSAAAA",string4="VVVVxx" 40780800000000000 +onek unique1=969i,unique2=472i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=69i,twothousand=169i,fivethous=469i,tenthous=969i,odd=18i,even=19i,stringu1="HLAAAA",stringu2="ESAAAA",string4="AAAAxx" 40867200000000000 +onek unique1=217i,unique2=473i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=17i,twothousand=17i,fivethous=217i,tenthous=217i,odd=14i,even=15i,stringu1="JIAAAA",stringu2="FSAAAA",string4="HHHHxx" 40953600000000000 +onek unique1=281i,unique2=474i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=81i,twothousand=81i,fivethous=281i,tenthous=281i,odd=2i,even=3i,stringu1="VKAAAA",stringu2="GSAAAA",string4="OOOOxx" 41040000000000000 +onek unique1=984i,unique2=475i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=84i,twothousand=184i,fivethous=484i,tenthous=984i,odd=8i,even=9i,stringu1="WLAAAA",stringu2="HSAAAA",string4="VVVVxx" 41126400000000000 +onek unique1=366i,unique2=476i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=66i,twothousand=166i,fivethous=366i,tenthous=366i,odd=12i,even=13i,stringu1="COAAAA",stringu2="ISAAAA",string4="AAAAxx" 41212800000000000 +onek unique1=483i,unique2=477i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=83i,twothousand=83i,fivethous=483i,tenthous=483i,odd=6i,even=7i,stringu1="PSAAAA",stringu2="JSAAAA",string4="HHHHxx" 41299200000000000 +onek unique1=838i,unique2=478i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=38i,twothousand=38i,fivethous=338i,tenthous=838i,odd=16i,even=17i,stringu1="GGAAAA",stringu2="KSAAAA",string4="OOOOxx" 41385600000000000 +onek unique1=64i,unique2=479i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=64i,twothousand=64i,fivethous=64i,tenthous=64i,odd=8i,even=9i,stringu1="MCAAAA",stringu2="LSAAAA",string4="VVVVxx" 41472000000000000 +onek unique1=981i,unique2=480i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=81i,twothousand=181i,fivethous=481i,tenthous=981i,odd=2i,even=3i,stringu1="TLAAAA",stringu2="MSAAAA",string4="AAAAxx" 41558400000000000 +onek unique1=538i,unique2=481i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=38i,twothousand=138i,fivethous=38i,tenthous=538i,odd=16i,even=17i,stringu1="SUAAAA",stringu2="NSAAAA",string4="HHHHxx" 41644800000000000 +onek unique1=39i,unique2=482i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=39i,twothousand=39i,fivethous=39i,tenthous=39i,odd=18i,even=19i,stringu1="NBAAAA",stringu2="OSAAAA",string4="OOOOxx" 41731200000000000 +onek unique1=60i,unique2=483i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=60i,twothousand=60i,fivethous=60i,tenthous=60i,odd=0i,even=1i,stringu1="ICAAAA",stringu2="PSAAAA",string4="VVVVxx" 41817600000000000 +onek unique1=874i,unique2=484i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=74i,twothousand=74i,fivethous=374i,tenthous=874i,odd=8i,even=9i,stringu1="QHAAAA",stringu2="QSAAAA",string4="AAAAxx" 41904000000000000 +onek unique1=955i,unique2=485i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=55i,twothousand=155i,fivethous=455i,tenthous=955i,odd=10i,even=11i,stringu1="TKAAAA",stringu2="RSAAAA",string4="HHHHxx" 41990400000000000 +onek unique1=347i,unique2=486i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=47i,twothousand=147i,fivethous=347i,tenthous=347i,odd=14i,even=15i,stringu1="JNAAAA",stringu2="SSAAAA",string4="OOOOxx" 42076800000000000 +onek unique1=227i,unique2=487i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=27i,twothousand=27i,fivethous=227i,tenthous=227i,odd=14i,even=15i,stringu1="TIAAAA",stringu2="TSAAAA",string4="VVVVxx" 42163200000000000 +onek unique1=44i,unique2=488i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=44i,twothousand=44i,fivethous=44i,tenthous=44i,odd=8i,even=9i,stringu1="SBAAAA",stringu2="USAAAA",string4="AAAAxx" 42249600000000000 +onek unique1=446i,unique2=489i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=46i,twothousand=46i,fivethous=446i,tenthous=446i,odd=12i,even=13i,stringu1="ERAAAA",stringu2="VSAAAA",string4="HHHHxx" 42336000000000000 +onek unique1=605i,unique2=490i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=5i,fivethous=105i,tenthous=605i,odd=10i,even=11i,stringu1="HXAAAA",stringu2="WSAAAA",string4="OOOOxx" 42422400000000000 +onek unique1=570i,unique2=491i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=70i,twothousand=170i,fivethous=70i,tenthous=570i,odd=0i,even=1i,stringu1="YVAAAA",stringu2="XSAAAA",string4="VVVVxx" 42508800000000000 +onek unique1=895i,unique2=492i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=95i,twothousand=95i,fivethous=395i,tenthous=895i,odd=10i,even=11i,stringu1="LIAAAA",stringu2="YSAAAA",string4="AAAAxx" 42595200000000000 +onek unique1=760i,unique2=493i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=60i,twothousand=160i,fivethous=260i,tenthous=760i,odd=0i,even=1i,stringu1="GDAAAA",stringu2="ZSAAAA",string4="HHHHxx" 42681600000000000 +onek unique1=428i,unique2=494i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=28i,twothousand=28i,fivethous=428i,tenthous=428i,odd=16i,even=17i,stringu1="MQAAAA",stringu2="ATAAAA",string4="OOOOxx" 42768000000000000 +onek unique1=628i,unique2=495i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=28i,twothousand=28i,fivethous=128i,tenthous=628i,odd=16i,even=17i,stringu1="EYAAAA",stringu2="BTAAAA",string4="VVVVxx" 42854400000000000 +onek unique1=933i,unique2=496i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=33i,twothousand=133i,fivethous=433i,tenthous=933i,odd=6i,even=7i,stringu1="XJAAAA",stringu2="CTAAAA",string4="AAAAxx" 42940800000000000 +onek unique1=263i,unique2=497i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=63i,twothousand=63i,fivethous=263i,tenthous=263i,odd=6i,even=7i,stringu1="DKAAAA",stringu2="DTAAAA",string4="HHHHxx" 43027200000000000 +onek unique1=729i,unique2=498i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=29i,twothousand=129i,fivethous=229i,tenthous=729i,odd=18i,even=19i,stringu1="BCAAAA",stringu2="ETAAAA",string4="OOOOxx" 43113600000000000 +onek unique1=860i,unique2=499i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=60i,twothousand=60i,fivethous=360i,tenthous=860i,odd=0i,even=1i,stringu1="CHAAAA",stringu2="FTAAAA",string4="VVVVxx" 43200000000000000 +onek unique1=76i,unique2=500i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=76i,twothousand=76i,fivethous=76i,tenthous=76i,odd=12i,even=13i,stringu1="YCAAAA",stringu2="GTAAAA",string4="AAAAxx" 43286400000000000 +onek unique1=293i,unique2=501i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=93i,twothousand=93i,fivethous=293i,tenthous=293i,odd=6i,even=7i,stringu1="HLAAAA",stringu2="HTAAAA",string4="HHHHxx" 43372800000000000 +onek unique1=296i,unique2=502i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=96i,twothousand=96i,fivethous=296i,tenthous=296i,odd=12i,even=13i,stringu1="KLAAAA",stringu2="ITAAAA",string4="OOOOxx" 43459200000000000 +onek unique1=124i,unique2=503i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=24i,twothousand=124i,fivethous=124i,tenthous=124i,odd=8i,even=9i,stringu1="UEAAAA",stringu2="JTAAAA",string4="VVVVxx" 43545600000000000 +onek unique1=568i,unique2=504i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=68i,twothousand=168i,fivethous=68i,tenthous=568i,odd=16i,even=17i,stringu1="WVAAAA",stringu2="KTAAAA",string4="AAAAxx" 43632000000000000 +onek unique1=337i,unique2=505i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=37i,twothousand=137i,fivethous=337i,tenthous=337i,odd=14i,even=15i,stringu1="ZMAAAA",stringu2="LTAAAA",string4="HHHHxx" 43718400000000000 +onek unique1=464i,unique2=506i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=64i,twothousand=64i,fivethous=464i,tenthous=464i,odd=8i,even=9i,stringu1="WRAAAA",stringu2="MTAAAA",string4="OOOOxx" 43804800000000000 +onek unique1=582i,unique2=507i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=82i,twothousand=182i,fivethous=82i,tenthous=582i,odd=4i,even=5i,stringu1="KWAAAA",stringu2="NTAAAA",string4="VVVVxx" 43891200000000000 +onek unique1=207i,unique2=508i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=7i,fivethous=207i,tenthous=207i,odd=14i,even=15i,stringu1="ZHAAAA",stringu2="OTAAAA",string4="AAAAxx" 43977600000000000 +onek unique1=518i,unique2=509i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=18i,twothousand=118i,fivethous=18i,tenthous=518i,odd=16i,even=17i,stringu1="YTAAAA",stringu2="PTAAAA",string4="HHHHxx" 44064000000000000 +onek unique1=513i,unique2=510i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=13i,twothousand=113i,fivethous=13i,tenthous=513i,odd=6i,even=7i,stringu1="TTAAAA",stringu2="QTAAAA",string4="OOOOxx" 44150400000000000 +onek unique1=127i,unique2=511i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=27i,twothousand=127i,fivethous=127i,tenthous=127i,odd=14i,even=15i,stringu1="XEAAAA",stringu2="RTAAAA",string4="VVVVxx" 44236800000000000 +onek unique1=396i,unique2=512i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=96i,twothousand=196i,fivethous=396i,tenthous=396i,odd=12i,even=13i,stringu1="GPAAAA",stringu2="STAAAA",string4="AAAAxx" 44323200000000000 +onek unique1=781i,unique2=513i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=81i,twothousand=181i,fivethous=281i,tenthous=781i,odd=2i,even=3i,stringu1="BEAAAA",stringu2="TTAAAA",string4="HHHHxx" 44409600000000000 +onek unique1=233i,unique2=514i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=33i,twothousand=33i,fivethous=233i,tenthous=233i,odd=6i,even=7i,stringu1="ZIAAAA",stringu2="UTAAAA",string4="OOOOxx" 44496000000000000 +onek unique1=709i,unique2=515i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=109i,fivethous=209i,tenthous=709i,odd=18i,even=19i,stringu1="HBAAAA",stringu2="VTAAAA",string4="VVVVxx" 44582400000000000 +onek unique1=325i,unique2=516i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=25i,twothousand=125i,fivethous=325i,tenthous=325i,odd=10i,even=11i,stringu1="NMAAAA",stringu2="WTAAAA",string4="AAAAxx" 44668800000000000 +onek unique1=143i,unique2=517i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=43i,twothousand=143i,fivethous=143i,tenthous=143i,odd=6i,even=7i,stringu1="NFAAAA",stringu2="XTAAAA",string4="HHHHxx" 44755200000000000 +onek unique1=824i,unique2=518i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=24i,twothousand=24i,fivethous=324i,tenthous=824i,odd=8i,even=9i,stringu1="SFAAAA",stringu2="YTAAAA",string4="OOOOxx" 44841600000000000 +onek unique1=122i,unique2=519i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=22i,twothousand=122i,fivethous=122i,tenthous=122i,odd=4i,even=5i,stringu1="SEAAAA",stringu2="ZTAAAA",string4="VVVVxx" 44928000000000000 +onek unique1=10i,unique2=520i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=10i,twothousand=10i,fivethous=10i,tenthous=10i,odd=0i,even=1i,stringu1="KAAAAA",stringu2="AUAAAA",string4="AAAAxx" 45014400000000000 +onek unique1=41i,unique2=521i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=41i,twothousand=41i,fivethous=41i,tenthous=41i,odd=2i,even=3i,stringu1="PBAAAA",stringu2="BUAAAA",string4="HHHHxx" 45100800000000000 +onek unique1=618i,unique2=522i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=18i,twothousand=18i,fivethous=118i,tenthous=618i,odd=16i,even=17i,stringu1="UXAAAA",stringu2="CUAAAA",string4="OOOOxx" 45187200000000000 +onek unique1=161i,unique2=523i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=61i,twothousand=161i,fivethous=161i,tenthous=161i,odd=2i,even=3i,stringu1="FGAAAA",stringu2="DUAAAA",string4="VVVVxx" 45273600000000000 +onek unique1=801i,unique2=524i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1i,fivethous=301i,tenthous=801i,odd=2i,even=3i,stringu1="VEAAAA",stringu2="EUAAAA",string4="AAAAxx" 45360000000000000 +onek unique1=768i,unique2=525i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=68i,twothousand=168i,fivethous=268i,tenthous=768i,odd=16i,even=17i,stringu1="ODAAAA",stringu2="FUAAAA",string4="HHHHxx" 45446400000000000 +onek unique1=642i,unique2=526i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=42i,twothousand=42i,fivethous=142i,tenthous=642i,odd=4i,even=5i,stringu1="SYAAAA",stringu2="GUAAAA",string4="OOOOxx" 45532800000000000 +onek unique1=803i,unique2=527i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=3i,fivethous=303i,tenthous=803i,odd=6i,even=7i,stringu1="XEAAAA",stringu2="HUAAAA",string4="VVVVxx" 45619200000000000 +onek unique1=317i,unique2=528i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=17i,twothousand=117i,fivethous=317i,tenthous=317i,odd=14i,even=15i,stringu1="FMAAAA",stringu2="IUAAAA",string4="AAAAxx" 45705600000000000 +onek unique1=938i,unique2=529i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=38i,twothousand=138i,fivethous=438i,tenthous=938i,odd=16i,even=17i,stringu1="CKAAAA",stringu2="JUAAAA",string4="HHHHxx" 45792000000000000 +onek unique1=649i,unique2=530i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=49i,twothousand=49i,fivethous=149i,tenthous=649i,odd=18i,even=19i,stringu1="ZYAAAA",stringu2="KUAAAA",string4="OOOOxx" 45878400000000000 +onek unique1=738i,unique2=531i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=38i,twothousand=138i,fivethous=238i,tenthous=738i,odd=16i,even=17i,stringu1="KCAAAA",stringu2="LUAAAA",string4="VVVVxx" 45964800000000000 +onek unique1=344i,unique2=532i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=44i,twothousand=144i,fivethous=344i,tenthous=344i,odd=8i,even=9i,stringu1="GNAAAA",stringu2="MUAAAA",string4="AAAAxx" 46051200000000000 +onek unique1=399i,unique2=533i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=99i,twothousand=199i,fivethous=399i,tenthous=399i,odd=18i,even=19i,stringu1="JPAAAA",stringu2="NUAAAA",string4="HHHHxx" 46137600000000000 +onek unique1=609i,unique2=534i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=9i,fivethous=109i,tenthous=609i,odd=18i,even=19i,stringu1="LXAAAA",stringu2="OUAAAA",string4="OOOOxx" 46224000000000000 +onek unique1=677i,unique2=535i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=77i,twothousand=77i,fivethous=177i,tenthous=677i,odd=14i,even=15i,stringu1="BAAAAA",stringu2="PUAAAA",string4="VVVVxx" 46310400000000000 +onek unique1=478i,unique2=536i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=78i,twothousand=78i,fivethous=478i,tenthous=478i,odd=16i,even=17i,stringu1="KSAAAA",stringu2="QUAAAA",string4="AAAAxx" 46396800000000000 +onek unique1=452i,unique2=537i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=52i,twothousand=52i,fivethous=452i,tenthous=452i,odd=4i,even=5i,stringu1="KRAAAA",stringu2="RUAAAA",string4="HHHHxx" 46483200000000000 +onek unique1=261i,unique2=538i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=61i,twothousand=61i,fivethous=261i,tenthous=261i,odd=2i,even=3i,stringu1="BKAAAA",stringu2="SUAAAA",string4="OOOOxx" 46569600000000000 +onek unique1=449i,unique2=539i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=49i,twothousand=49i,fivethous=449i,tenthous=449i,odd=18i,even=19i,stringu1="HRAAAA",stringu2="TUAAAA",string4="VVVVxx" 46656000000000000 +onek unique1=433i,unique2=540i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=33i,twothousand=33i,fivethous=433i,tenthous=433i,odd=6i,even=7i,stringu1="RQAAAA",stringu2="UUAAAA",string4="AAAAxx" 46742400000000000 +onek unique1=5i,unique2=541i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=5i,fivethous=5i,tenthous=5i,odd=10i,even=11i,stringu1="FAAAAA",stringu2="VUAAAA",string4="HHHHxx" 46828800000000000 +onek unique1=664i,unique2=542i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=64i,twothousand=64i,fivethous=164i,tenthous=664i,odd=8i,even=9i,stringu1="OZAAAA",stringu2="WUAAAA",string4="OOOOxx" 46915200000000000 +onek unique1=887i,unique2=543i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=87i,twothousand=87i,fivethous=387i,tenthous=887i,odd=14i,even=15i,stringu1="DIAAAA",stringu2="XUAAAA",string4="VVVVxx" 47001600000000000 +onek unique1=546i,unique2=544i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=46i,twothousand=146i,fivethous=46i,tenthous=546i,odd=12i,even=13i,stringu1="AVAAAA",stringu2="YUAAAA",string4="AAAAxx" 47088000000000000 +onek unique1=253i,unique2=545i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=53i,twothousand=53i,fivethous=253i,tenthous=253i,odd=6i,even=7i,stringu1="TJAAAA",stringu2="ZUAAAA",string4="HHHHxx" 47174400000000000 +onek unique1=235i,unique2=546i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=35i,twothousand=35i,fivethous=235i,tenthous=235i,odd=10i,even=11i,stringu1="BJAAAA",stringu2="AVAAAA",string4="OOOOxx" 47260800000000000 +onek unique1=258i,unique2=547i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=58i,twothousand=58i,fivethous=258i,tenthous=258i,odd=16i,even=17i,stringu1="YJAAAA",stringu2="BVAAAA",string4="VVVVxx" 47347200000000000 +onek unique1=621i,unique2=548i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=21i,twothousand=21i,fivethous=121i,tenthous=621i,odd=2i,even=3i,stringu1="XXAAAA",stringu2="CVAAAA",string4="AAAAxx" 47433600000000000 +onek unique1=998i,unique2=549i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=98i,twothousand=198i,fivethous=498i,tenthous=998i,odd=16i,even=17i,stringu1="KMAAAA",stringu2="DVAAAA",string4="HHHHxx" 47520000000000000 +onek unique1=236i,unique2=550i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=36i,twothousand=36i,fivethous=236i,tenthous=236i,odd=12i,even=13i,stringu1="CJAAAA",stringu2="EVAAAA",string4="OOOOxx" 47606400000000000 +onek unique1=537i,unique2=551i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=37i,twothousand=137i,fivethous=37i,tenthous=537i,odd=14i,even=15i,stringu1="RUAAAA",stringu2="FVAAAA",string4="VVVVxx" 47692800000000000 +onek unique1=769i,unique2=552i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=69i,twothousand=169i,fivethous=269i,tenthous=769i,odd=18i,even=19i,stringu1="PDAAAA",stringu2="GVAAAA",string4="AAAAxx" 47779200000000000 +onek unique1=921i,unique2=553i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=21i,twothousand=121i,fivethous=421i,tenthous=921i,odd=2i,even=3i,stringu1="LJAAAA",stringu2="HVAAAA",string4="HHHHxx" 47865600000000000 +onek unique1=951i,unique2=554i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=51i,twothousand=151i,fivethous=451i,tenthous=951i,odd=2i,even=3i,stringu1="PKAAAA",stringu2="IVAAAA",string4="OOOOxx" 47952000000000000 +onek unique1=240i,unique2=555i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=40i,twothousand=40i,fivethous=240i,tenthous=240i,odd=0i,even=1i,stringu1="GJAAAA",stringu2="JVAAAA",string4="VVVVxx" 48038400000000000 +onek unique1=644i,unique2=556i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=44i,twothousand=44i,fivethous=144i,tenthous=644i,odd=8i,even=9i,stringu1="UYAAAA",stringu2="KVAAAA",string4="AAAAxx" 48124800000000000 +onek unique1=352i,unique2=557i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=52i,twothousand=152i,fivethous=352i,tenthous=352i,odd=4i,even=5i,stringu1="ONAAAA",stringu2="LVAAAA",string4="HHHHxx" 48211200000000000 +onek unique1=613i,unique2=558i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=13i,twothousand=13i,fivethous=113i,tenthous=613i,odd=6i,even=7i,stringu1="PXAAAA",stringu2="MVAAAA",string4="OOOOxx" 48297600000000000 +onek unique1=784i,unique2=559i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=84i,twothousand=184i,fivethous=284i,tenthous=784i,odd=8i,even=9i,stringu1="EEAAAA",stringu2="NVAAAA",string4="VVVVxx" 48384000000000000 +onek unique1=61i,unique2=560i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=61i,twothousand=61i,fivethous=61i,tenthous=61i,odd=2i,even=3i,stringu1="JCAAAA",stringu2="OVAAAA",string4="AAAAxx" 48470400000000000 +onek unique1=144i,unique2=561i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=44i,twothousand=144i,fivethous=144i,tenthous=144i,odd=8i,even=9i,stringu1="OFAAAA",stringu2="PVAAAA",string4="HHHHxx" 48556800000000000 +onek unique1=94i,unique2=562i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=94i,twothousand=94i,fivethous=94i,tenthous=94i,odd=8i,even=9i,stringu1="QDAAAA",stringu2="QVAAAA",string4="OOOOxx" 48643200000000000 +onek unique1=270i,unique2=563i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=70i,twothousand=70i,fivethous=270i,tenthous=270i,odd=0i,even=1i,stringu1="KKAAAA",stringu2="RVAAAA",string4="VVVVxx" 48729600000000000 +onek unique1=942i,unique2=564i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=42i,twothousand=142i,fivethous=442i,tenthous=942i,odd=4i,even=5i,stringu1="GKAAAA",stringu2="SVAAAA",string4="AAAAxx" 48816000000000000 +onek unique1=756i,unique2=565i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=56i,twothousand=156i,fivethous=256i,tenthous=756i,odd=12i,even=13i,stringu1="CDAAAA",stringu2="TVAAAA",string4="HHHHxx" 48902400000000000 +onek unique1=321i,unique2=566i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=21i,twothousand=121i,fivethous=321i,tenthous=321i,odd=2i,even=3i,stringu1="JMAAAA",stringu2="UVAAAA",string4="OOOOxx" 48988800000000000 +onek unique1=36i,unique2=567i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=36i,twothousand=36i,fivethous=36i,tenthous=36i,odd=12i,even=13i,stringu1="KBAAAA",stringu2="VVAAAA",string4="VVVVxx" 49075200000000000 +onek unique1=232i,unique2=568i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=32i,twothousand=32i,fivethous=232i,tenthous=232i,odd=4i,even=5i,stringu1="YIAAAA",stringu2="WVAAAA",string4="AAAAxx" 49161600000000000 +onek unique1=430i,unique2=569i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=30i,twothousand=30i,fivethous=430i,tenthous=430i,odd=0i,even=1i,stringu1="OQAAAA",stringu2="XVAAAA",string4="HHHHxx" 49248000000000000 +onek unique1=177i,unique2=570i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=77i,twothousand=177i,fivethous=177i,tenthous=177i,odd=14i,even=15i,stringu1="VGAAAA",stringu2="YVAAAA",string4="OOOOxx" 49334400000000000 +onek unique1=220i,unique2=571i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=20i,twothousand=20i,fivethous=220i,tenthous=220i,odd=0i,even=1i,stringu1="MIAAAA",stringu2="ZVAAAA",string4="VVVVxx" 49420800000000000 +onek unique1=109i,unique2=572i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=109i,fivethous=109i,tenthous=109i,odd=18i,even=19i,stringu1="FEAAAA",stringu2="AWAAAA",string4="AAAAxx" 49507200000000000 +onek unique1=419i,unique2=573i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=19i,twothousand=19i,fivethous=419i,tenthous=419i,odd=18i,even=19i,stringu1="DQAAAA",stringu2="BWAAAA",string4="HHHHxx" 49593600000000000 +onek unique1=135i,unique2=574i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=35i,twothousand=135i,fivethous=135i,tenthous=135i,odd=10i,even=11i,stringu1="FFAAAA",stringu2="CWAAAA",string4="OOOOxx" 49680000000000000 +onek unique1=610i,unique2=575i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=10i,twothousand=10i,fivethous=110i,tenthous=610i,odd=0i,even=1i,stringu1="MXAAAA",stringu2="DWAAAA",string4="VVVVxx" 49766400000000000 +onek unique1=956i,unique2=576i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=56i,twothousand=156i,fivethous=456i,tenthous=956i,odd=12i,even=13i,stringu1="UKAAAA",stringu2="EWAAAA",string4="AAAAxx" 49852800000000000 +onek unique1=626i,unique2=577i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=26i,twothousand=26i,fivethous=126i,tenthous=626i,odd=12i,even=13i,stringu1="CYAAAA",stringu2="FWAAAA",string4="HHHHxx" 49939200000000000 +onek unique1=375i,unique2=578i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=75i,twothousand=175i,fivethous=375i,tenthous=375i,odd=10i,even=11i,stringu1="LOAAAA",stringu2="GWAAAA",string4="OOOOxx" 50025600000000000 +onek unique1=976i,unique2=579i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=76i,twothousand=176i,fivethous=476i,tenthous=976i,odd=12i,even=13i,stringu1="OLAAAA",stringu2="HWAAAA",string4="VVVVxx" 50112000000000000 +onek unique1=152i,unique2=580i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=52i,twothousand=152i,fivethous=152i,tenthous=152i,odd=4i,even=5i,stringu1="WFAAAA",stringu2="IWAAAA",string4="AAAAxx" 50198400000000000 +onek unique1=308i,unique2=581i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=108i,fivethous=308i,tenthous=308i,odd=16i,even=17i,stringu1="WLAAAA",stringu2="JWAAAA",string4="HHHHxx" 50284800000000000 +onek unique1=445i,unique2=582i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=45i,twothousand=45i,fivethous=445i,tenthous=445i,odd=10i,even=11i,stringu1="DRAAAA",stringu2="KWAAAA",string4="OOOOxx" 50371200000000000 +onek unique1=326i,unique2=583i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=26i,twothousand=126i,fivethous=326i,tenthous=326i,odd=12i,even=13i,stringu1="OMAAAA",stringu2="LWAAAA",string4="VVVVxx" 50457600000000000 +onek unique1=422i,unique2=584i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=22i,twothousand=22i,fivethous=422i,tenthous=422i,odd=4i,even=5i,stringu1="GQAAAA",stringu2="MWAAAA",string4="AAAAxx" 50544000000000000 +onek unique1=972i,unique2=585i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=72i,twothousand=172i,fivethous=472i,tenthous=972i,odd=4i,even=5i,stringu1="KLAAAA",stringu2="NWAAAA",string4="HHHHxx" 50630400000000000 +onek unique1=45i,unique2=586i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=45i,twothousand=45i,fivethous=45i,tenthous=45i,odd=10i,even=11i,stringu1="TBAAAA",stringu2="OWAAAA",string4="OOOOxx" 50716800000000000 +onek unique1=725i,unique2=587i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=25i,twothousand=125i,fivethous=225i,tenthous=725i,odd=10i,even=11i,stringu1="XBAAAA",stringu2="PWAAAA",string4="VVVVxx" 50803200000000000 +onek unique1=753i,unique2=588i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=53i,twothousand=153i,fivethous=253i,tenthous=753i,odd=6i,even=7i,stringu1="ZCAAAA",stringu2="QWAAAA",string4="AAAAxx" 50889600000000000 +onek unique1=493i,unique2=589i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=93i,twothousand=93i,fivethous=493i,tenthous=493i,odd=6i,even=7i,stringu1="ZSAAAA",stringu2="RWAAAA",string4="HHHHxx" 50976000000000000 +onek unique1=601i,unique2=590i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1i,fivethous=101i,tenthous=601i,odd=2i,even=3i,stringu1="DXAAAA",stringu2="SWAAAA",string4="OOOOxx" 51062400000000000 +onek unique1=463i,unique2=591i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=63i,twothousand=63i,fivethous=463i,tenthous=463i,odd=6i,even=7i,stringu1="VRAAAA",stringu2="TWAAAA",string4="VVVVxx" 51148800000000000 +onek unique1=303i,unique2=592i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=103i,fivethous=303i,tenthous=303i,odd=6i,even=7i,stringu1="RLAAAA",stringu2="UWAAAA",string4="AAAAxx" 51235200000000000 +onek unique1=59i,unique2=593i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=59i,twothousand=59i,fivethous=59i,tenthous=59i,odd=18i,even=19i,stringu1="HCAAAA",stringu2="VWAAAA",string4="HHHHxx" 51321600000000000 +onek unique1=595i,unique2=594i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=95i,twothousand=195i,fivethous=95i,tenthous=595i,odd=10i,even=11i,stringu1="XWAAAA",stringu2="WWAAAA",string4="OOOOxx" 51408000000000000 +onek unique1=807i,unique2=595i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=7i,fivethous=307i,tenthous=807i,odd=14i,even=15i,stringu1="BFAAAA",stringu2="XWAAAA",string4="VVVVxx" 51494400000000000 +onek unique1=424i,unique2=596i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=24i,twothousand=24i,fivethous=424i,tenthous=424i,odd=8i,even=9i,stringu1="IQAAAA",stringu2="YWAAAA",string4="AAAAxx" 51580800000000000 +onek unique1=521i,unique2=597i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=21i,twothousand=121i,fivethous=21i,tenthous=521i,odd=2i,even=3i,stringu1="BUAAAA",stringu2="ZWAAAA",string4="HHHHxx" 51667200000000000 +onek unique1=341i,unique2=598i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=41i,twothousand=141i,fivethous=341i,tenthous=341i,odd=2i,even=3i,stringu1="DNAAAA",stringu2="AXAAAA",string4="OOOOxx" 51753600000000000 +onek unique1=571i,unique2=599i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=71i,twothousand=171i,fivethous=71i,tenthous=571i,odd=2i,even=3i,stringu1="ZVAAAA",stringu2="BXAAAA",string4="VVVVxx" 51840000000000000 +onek unique1=165i,unique2=600i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=65i,twothousand=165i,fivethous=165i,tenthous=165i,odd=10i,even=11i,stringu1="JGAAAA",stringu2="CXAAAA",string4="AAAAxx" 51926400000000000 +onek unique1=908i,unique2=601i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=108i,fivethous=408i,tenthous=908i,odd=16i,even=17i,stringu1="YIAAAA",stringu2="DXAAAA",string4="HHHHxx" 52012800000000000 +onek unique1=351i,unique2=602i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=51i,twothousand=151i,fivethous=351i,tenthous=351i,odd=2i,even=3i,stringu1="NNAAAA",stringu2="EXAAAA",string4="OOOOxx" 52099200000000000 +onek unique1=334i,unique2=603i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=34i,twothousand=134i,fivethous=334i,tenthous=334i,odd=8i,even=9i,stringu1="WMAAAA",stringu2="FXAAAA",string4="VVVVxx" 52185600000000000 +onek unique1=636i,unique2=604i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=36i,twothousand=36i,fivethous=136i,tenthous=636i,odd=12i,even=13i,stringu1="MYAAAA",stringu2="GXAAAA",string4="AAAAxx" 52272000000000000 +onek unique1=138i,unique2=605i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=38i,twothousand=138i,fivethous=138i,tenthous=138i,odd=16i,even=17i,stringu1="IFAAAA",stringu2="HXAAAA",string4="HHHHxx" 52358400000000000 +onek unique1=438i,unique2=606i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=38i,twothousand=38i,fivethous=438i,tenthous=438i,odd=16i,even=17i,stringu1="WQAAAA",stringu2="IXAAAA",string4="OOOOxx" 52444800000000000 +onek unique1=391i,unique2=607i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=91i,twothousand=191i,fivethous=391i,tenthous=391i,odd=2i,even=3i,stringu1="BPAAAA",stringu2="JXAAAA",string4="VVVVxx" 52531200000000000 +onek unique1=395i,unique2=608i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=95i,twothousand=195i,fivethous=395i,tenthous=395i,odd=10i,even=11i,stringu1="FPAAAA",stringu2="KXAAAA",string4="AAAAxx" 52617600000000000 +onek unique1=502i,unique2=609i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=102i,fivethous=2i,tenthous=502i,odd=4i,even=5i,stringu1="ITAAAA",stringu2="LXAAAA",string4="HHHHxx" 52704000000000000 +onek unique1=85i,unique2=610i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=85i,twothousand=85i,fivethous=85i,tenthous=85i,odd=10i,even=11i,stringu1="HDAAAA",stringu2="MXAAAA",string4="OOOOxx" 52790400000000000 +onek unique1=786i,unique2=611i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=86i,twothousand=186i,fivethous=286i,tenthous=786i,odd=12i,even=13i,stringu1="GEAAAA",stringu2="NXAAAA",string4="VVVVxx" 52876800000000000 +onek unique1=619i,unique2=612i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=19i,twothousand=19i,fivethous=119i,tenthous=619i,odd=18i,even=19i,stringu1="VXAAAA",stringu2="OXAAAA",string4="AAAAxx" 52963200000000000 +onek unique1=440i,unique2=613i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=40i,twothousand=40i,fivethous=440i,tenthous=440i,odd=0i,even=1i,stringu1="YQAAAA",stringu2="PXAAAA",string4="HHHHxx" 53049600000000000 +onek unique1=949i,unique2=614i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=49i,twothousand=149i,fivethous=449i,tenthous=949i,odd=18i,even=19i,stringu1="NKAAAA",stringu2="QXAAAA",string4="OOOOxx" 53136000000000000 +onek unique1=691i,unique2=615i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=91i,twothousand=91i,fivethous=191i,tenthous=691i,odd=2i,even=3i,stringu1="PAAAAA",stringu2="RXAAAA",string4="VVVVxx" 53222400000000000 +onek unique1=348i,unique2=616i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=48i,twothousand=148i,fivethous=348i,tenthous=348i,odd=16i,even=17i,stringu1="KNAAAA",stringu2="SXAAAA",string4="AAAAxx" 53308800000000000 +onek unique1=506i,unique2=617i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=106i,fivethous=6i,tenthous=506i,odd=12i,even=13i,stringu1="MTAAAA",stringu2="TXAAAA",string4="HHHHxx" 53395200000000000 +onek unique1=192i,unique2=618i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=92i,twothousand=192i,fivethous=192i,tenthous=192i,odd=4i,even=5i,stringu1="KHAAAA",stringu2="UXAAAA",string4="OOOOxx" 53481600000000000 +onek unique1=369i,unique2=619i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=69i,twothousand=169i,fivethous=369i,tenthous=369i,odd=18i,even=19i,stringu1="FOAAAA",stringu2="VXAAAA",string4="VVVVxx" 53568000000000000 +onek unique1=311i,unique2=620i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=11i,twothousand=111i,fivethous=311i,tenthous=311i,odd=2i,even=3i,stringu1="ZLAAAA",stringu2="WXAAAA",string4="AAAAxx" 53654400000000000 +onek unique1=273i,unique2=621i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=73i,twothousand=73i,fivethous=273i,tenthous=273i,odd=6i,even=7i,stringu1="NKAAAA",stringu2="XXAAAA",string4="HHHHxx" 53740800000000000 +onek unique1=770i,unique2=622i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=70i,twothousand=170i,fivethous=270i,tenthous=770i,odd=0i,even=1i,stringu1="QDAAAA",stringu2="YXAAAA",string4="OOOOxx" 53827200000000000 +onek unique1=191i,unique2=623i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=91i,twothousand=191i,fivethous=191i,tenthous=191i,odd=2i,even=3i,stringu1="JHAAAA",stringu2="ZXAAAA",string4="VVVVxx" 53913600000000000 +onek unique1=90i,unique2=624i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=90i,twothousand=90i,fivethous=90i,tenthous=90i,odd=0i,even=1i,stringu1="MDAAAA",stringu2="AYAAAA",string4="AAAAxx" 54000000000000000 +onek unique1=163i,unique2=625i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=63i,twothousand=163i,fivethous=163i,tenthous=163i,odd=6i,even=7i,stringu1="HGAAAA",stringu2="BYAAAA",string4="HHHHxx" 54086400000000000 +onek unique1=350i,unique2=626i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=50i,twothousand=150i,fivethous=350i,tenthous=350i,odd=0i,even=1i,stringu1="MNAAAA",stringu2="CYAAAA",string4="OOOOxx" 54172800000000000 +onek unique1=55i,unique2=627i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=55i,twothousand=55i,fivethous=55i,tenthous=55i,odd=10i,even=11i,stringu1="DCAAAA",stringu2="DYAAAA",string4="VVVVxx" 54259200000000000 +onek unique1=488i,unique2=628i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=88i,twothousand=88i,fivethous=488i,tenthous=488i,odd=16i,even=17i,stringu1="USAAAA",stringu2="EYAAAA",string4="AAAAxx" 54345600000000000 +onek unique1=215i,unique2=629i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=15i,twothousand=15i,fivethous=215i,tenthous=215i,odd=10i,even=11i,stringu1="HIAAAA",stringu2="FYAAAA",string4="HHHHxx" 54432000000000000 +onek unique1=732i,unique2=630i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=32i,twothousand=132i,fivethous=232i,tenthous=732i,odd=4i,even=5i,stringu1="ECAAAA",stringu2="GYAAAA",string4="OOOOxx" 54518400000000000 +onek unique1=688i,unique2=631i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=88i,twothousand=88i,fivethous=188i,tenthous=688i,odd=16i,even=17i,stringu1="MAAAAA",stringu2="HYAAAA",string4="VVVVxx" 54604800000000000 +onek unique1=520i,unique2=632i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=20i,twothousand=120i,fivethous=20i,tenthous=520i,odd=0i,even=1i,stringu1="AUAAAA",stringu2="IYAAAA",string4="AAAAxx" 54691200000000000 +onek unique1=62i,unique2=633i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=62i,twothousand=62i,fivethous=62i,tenthous=62i,odd=4i,even=5i,stringu1="KCAAAA",stringu2="JYAAAA",string4="HHHHxx" 54777600000000000 +onek unique1=423i,unique2=634i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=23i,twothousand=23i,fivethous=423i,tenthous=423i,odd=6i,even=7i,stringu1="HQAAAA",stringu2="KYAAAA",string4="OOOOxx" 54864000000000000 +onek unique1=242i,unique2=635i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=42i,twothousand=42i,fivethous=242i,tenthous=242i,odd=4i,even=5i,stringu1="IJAAAA",stringu2="LYAAAA",string4="VVVVxx" 54950400000000000 +onek unique1=193i,unique2=636i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=93i,twothousand=193i,fivethous=193i,tenthous=193i,odd=6i,even=7i,stringu1="LHAAAA",stringu2="MYAAAA",string4="AAAAxx" 55036800000000000 +onek unique1=648i,unique2=637i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=48i,twothousand=48i,fivethous=148i,tenthous=648i,odd=16i,even=17i,stringu1="YYAAAA",stringu2="NYAAAA",string4="HHHHxx" 55123200000000000 +onek unique1=459i,unique2=638i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=59i,twothousand=59i,fivethous=459i,tenthous=459i,odd=18i,even=19i,stringu1="RRAAAA",stringu2="OYAAAA",string4="OOOOxx" 55209600000000000 +onek unique1=196i,unique2=639i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=96i,twothousand=196i,fivethous=196i,tenthous=196i,odd=12i,even=13i,stringu1="OHAAAA",stringu2="PYAAAA",string4="VVVVxx" 55296000000000000 +onek unique1=476i,unique2=640i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=76i,twothousand=76i,fivethous=476i,tenthous=476i,odd=12i,even=13i,stringu1="ISAAAA",stringu2="QYAAAA",string4="AAAAxx" 55382400000000000 +onek unique1=903i,unique2=641i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=103i,fivethous=403i,tenthous=903i,odd=6i,even=7i,stringu1="TIAAAA",stringu2="RYAAAA",string4="HHHHxx" 55468800000000000 +onek unique1=974i,unique2=642i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=74i,twothousand=174i,fivethous=474i,tenthous=974i,odd=8i,even=9i,stringu1="MLAAAA",stringu2="SYAAAA",string4="OOOOxx" 55555200000000000 +onek unique1=603i,unique2=643i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=3i,fivethous=103i,tenthous=603i,odd=6i,even=7i,stringu1="FXAAAA",stringu2="TYAAAA",string4="VVVVxx" 55641600000000000 +onek unique1=12i,unique2=644i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=12i,twothousand=12i,fivethous=12i,tenthous=12i,odd=4i,even=5i,stringu1="MAAAAA",stringu2="UYAAAA",string4="AAAAxx" 55728000000000000 +onek unique1=599i,unique2=645i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=99i,twothousand=199i,fivethous=99i,tenthous=599i,odd=18i,even=19i,stringu1="BXAAAA",stringu2="VYAAAA",string4="HHHHxx" 55814400000000000 +onek unique1=914i,unique2=646i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=14i,twothousand=114i,fivethous=414i,tenthous=914i,odd=8i,even=9i,stringu1="EJAAAA",stringu2="WYAAAA",string4="OOOOxx" 55900800000000000 +onek unique1=7i,unique2=647i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=7i,fivethous=7i,tenthous=7i,odd=14i,even=15i,stringu1="HAAAAA",stringu2="XYAAAA",string4="VVVVxx" 55987200000000000 +onek unique1=213i,unique2=648i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=13i,twothousand=13i,fivethous=213i,tenthous=213i,odd=6i,even=7i,stringu1="FIAAAA",stringu2="YYAAAA",string4="AAAAxx" 56073600000000000 +onek unique1=174i,unique2=649i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=74i,twothousand=174i,fivethous=174i,tenthous=174i,odd=8i,even=9i,stringu1="SGAAAA",stringu2="ZYAAAA",string4="HHHHxx" 56160000000000000 +onek unique1=392i,unique2=650i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=92i,twothousand=192i,fivethous=392i,tenthous=392i,odd=4i,even=5i,stringu1="CPAAAA",stringu2="AZAAAA",string4="OOOOxx" 56246400000000000 +onek unique1=674i,unique2=651i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=74i,twothousand=74i,fivethous=174i,tenthous=674i,odd=8i,even=9i,stringu1="YZAAAA",stringu2="BZAAAA",string4="VVVVxx" 56332800000000000 +onek unique1=650i,unique2=652i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=50i,twothousand=50i,fivethous=150i,tenthous=650i,odd=0i,even=1i,stringu1="AZAAAA",stringu2="CZAAAA",string4="AAAAxx" 56419200000000000 +onek unique1=8i,unique2=653i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=8i,fivethous=8i,tenthous=8i,odd=16i,even=17i,stringu1="IAAAAA",stringu2="DZAAAA",string4="HHHHxx" 56505600000000000 +onek unique1=492i,unique2=654i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=92i,twothousand=92i,fivethous=492i,tenthous=492i,odd=4i,even=5i,stringu1="YSAAAA",stringu2="EZAAAA",string4="OOOOxx" 56592000000000000 +onek unique1=322i,unique2=655i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=22i,twothousand=122i,fivethous=322i,tenthous=322i,odd=4i,even=5i,stringu1="KMAAAA",stringu2="FZAAAA",string4="VVVVxx" 56678400000000000 +onek unique1=315i,unique2=656i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=15i,twothousand=115i,fivethous=315i,tenthous=315i,odd=10i,even=11i,stringu1="DMAAAA",stringu2="GZAAAA",string4="AAAAxx" 56764800000000000 +onek unique1=380i,unique2=657i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=80i,twothousand=180i,fivethous=380i,tenthous=380i,odd=0i,even=1i,stringu1="QOAAAA",stringu2="HZAAAA",string4="HHHHxx" 56851200000000000 +onek unique1=353i,unique2=658i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=53i,twothousand=153i,fivethous=353i,tenthous=353i,odd=6i,even=7i,stringu1="PNAAAA",stringu2="IZAAAA",string4="OOOOxx" 56937600000000000 +onek unique1=892i,unique2=659i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=92i,twothousand=92i,fivethous=392i,tenthous=892i,odd=4i,even=5i,stringu1="IIAAAA",stringu2="JZAAAA",string4="VVVVxx" 57024000000000000 +onek unique1=932i,unique2=660i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=32i,twothousand=132i,fivethous=432i,tenthous=932i,odd=4i,even=5i,stringu1="WJAAAA",stringu2="KZAAAA",string4="AAAAxx" 57110400000000000 +onek unique1=993i,unique2=661i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=93i,twothousand=193i,fivethous=493i,tenthous=993i,odd=6i,even=7i,stringu1="FMAAAA",stringu2="LZAAAA",string4="HHHHxx" 57196800000000000 +onek unique1=859i,unique2=662i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=59i,twothousand=59i,fivethous=359i,tenthous=859i,odd=18i,even=19i,stringu1="BHAAAA",stringu2="MZAAAA",string4="OOOOxx" 57283200000000000 +onek unique1=806i,unique2=663i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=6i,fivethous=306i,tenthous=806i,odd=12i,even=13i,stringu1="AFAAAA",stringu2="NZAAAA",string4="VVVVxx" 57369600000000000 +onek unique1=145i,unique2=664i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=45i,twothousand=145i,fivethous=145i,tenthous=145i,odd=10i,even=11i,stringu1="PFAAAA",stringu2="OZAAAA",string4="AAAAxx" 57456000000000000 +onek unique1=373i,unique2=665i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=73i,twothousand=173i,fivethous=373i,tenthous=373i,odd=6i,even=7i,stringu1="JOAAAA",stringu2="PZAAAA",string4="HHHHxx" 57542400000000000 +onek unique1=418i,unique2=666i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=18i,twothousand=18i,fivethous=418i,tenthous=418i,odd=16i,even=17i,stringu1="CQAAAA",stringu2="QZAAAA",string4="OOOOxx" 57628800000000000 +onek unique1=865i,unique2=667i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=65i,twothousand=65i,fivethous=365i,tenthous=865i,odd=10i,even=11i,stringu1="HHAAAA",stringu2="RZAAAA",string4="VVVVxx" 57715200000000000 +onek unique1=462i,unique2=668i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=62i,twothousand=62i,fivethous=462i,tenthous=462i,odd=4i,even=5i,stringu1="URAAAA",stringu2="SZAAAA",string4="AAAAxx" 57801600000000000 +onek unique1=24i,unique2=669i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=24i,twothousand=24i,fivethous=24i,tenthous=24i,odd=8i,even=9i,stringu1="YAAAAA",stringu2="TZAAAA",string4="HHHHxx" 57888000000000000 +onek unique1=920i,unique2=670i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=20i,twothousand=120i,fivethous=420i,tenthous=920i,odd=0i,even=1i,stringu1="KJAAAA",stringu2="UZAAAA",string4="OOOOxx" 57974400000000000 +onek unique1=672i,unique2=671i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=72i,twothousand=72i,fivethous=172i,tenthous=672i,odd=4i,even=5i,stringu1="WZAAAA",stringu2="VZAAAA",string4="VVVVxx" 58060800000000000 +onek unique1=92i,unique2=672i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=92i,twothousand=92i,fivethous=92i,tenthous=92i,odd=4i,even=5i,stringu1="ODAAAA",stringu2="WZAAAA",string4="AAAAxx" 58147200000000000 +onek unique1=721i,unique2=673i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=21i,twothousand=121i,fivethous=221i,tenthous=721i,odd=2i,even=3i,stringu1="TBAAAA",stringu2="XZAAAA",string4="HHHHxx" 58233600000000000 +onek unique1=646i,unique2=674i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=46i,twothousand=46i,fivethous=146i,tenthous=646i,odd=12i,even=13i,stringu1="WYAAAA",stringu2="YZAAAA",string4="OOOOxx" 58320000000000000 +onek unique1=910i,unique2=675i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=10i,twothousand=110i,fivethous=410i,tenthous=910i,odd=0i,even=1i,stringu1="AJAAAA",stringu2="ZZAAAA",string4="VVVVxx" 58406400000000000 +onek unique1=909i,unique2=676i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=109i,fivethous=409i,tenthous=909i,odd=18i,even=19i,stringu1="ZIAAAA",stringu2="AABAAA",string4="AAAAxx" 58492800000000000 +onek unique1=630i,unique2=677i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=30i,twothousand=30i,fivethous=130i,tenthous=630i,odd=0i,even=1i,stringu1="GYAAAA",stringu2="BABAAA",string4="HHHHxx" 58579200000000000 +onek unique1=482i,unique2=678i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=82i,twothousand=82i,fivethous=482i,tenthous=482i,odd=4i,even=5i,stringu1="OSAAAA",stringu2="CABAAA",string4="OOOOxx" 58665600000000000 +onek unique1=559i,unique2=679i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=59i,twothousand=159i,fivethous=59i,tenthous=559i,odd=18i,even=19i,stringu1="NVAAAA",stringu2="DABAAA",string4="VVVVxx" 58752000000000000 +onek unique1=853i,unique2=680i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=53i,twothousand=53i,fivethous=353i,tenthous=853i,odd=6i,even=7i,stringu1="VGAAAA",stringu2="EABAAA",string4="AAAAxx" 58838400000000000 +onek unique1=141i,unique2=681i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=41i,twothousand=141i,fivethous=141i,tenthous=141i,odd=2i,even=3i,stringu1="LFAAAA",stringu2="FABAAA",string4="HHHHxx" 58924800000000000 +onek unique1=266i,unique2=682i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=66i,twothousand=66i,fivethous=266i,tenthous=266i,odd=12i,even=13i,stringu1="GKAAAA",stringu2="GABAAA",string4="OOOOxx" 59011200000000000 +onek unique1=835i,unique2=683i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=35i,twothousand=35i,fivethous=335i,tenthous=835i,odd=10i,even=11i,stringu1="DGAAAA",stringu2="HABAAA",string4="VVVVxx" 59097600000000000 +onek unique1=164i,unique2=684i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=64i,twothousand=164i,fivethous=164i,tenthous=164i,odd=8i,even=9i,stringu1="IGAAAA",stringu2="IABAAA",string4="AAAAxx" 59184000000000000 +onek unique1=629i,unique2=685i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=29i,twothousand=29i,fivethous=129i,tenthous=629i,odd=18i,even=19i,stringu1="FYAAAA",stringu2="JABAAA",string4="HHHHxx" 59270400000000000 +onek unique1=203i,unique2=686i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=3i,fivethous=203i,tenthous=203i,odd=6i,even=7i,stringu1="VHAAAA",stringu2="KABAAA",string4="OOOOxx" 59356800000000000 +onek unique1=411i,unique2=687i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=11i,twothousand=11i,fivethous=411i,tenthous=411i,odd=2i,even=3i,stringu1="VPAAAA",stringu2="LABAAA",string4="VVVVxx" 59443200000000000 +onek unique1=930i,unique2=688i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=30i,twothousand=130i,fivethous=430i,tenthous=930i,odd=0i,even=1i,stringu1="UJAAAA",stringu2="MABAAA",string4="AAAAxx" 59529600000000000 +onek unique1=435i,unique2=689i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=35i,twothousand=35i,fivethous=435i,tenthous=435i,odd=10i,even=11i,stringu1="TQAAAA",stringu2="NABAAA",string4="HHHHxx" 59616000000000000 +onek unique1=563i,unique2=690i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=63i,twothousand=163i,fivethous=63i,tenthous=563i,odd=6i,even=7i,stringu1="RVAAAA",stringu2="OABAAA",string4="OOOOxx" 59702400000000000 +onek unique1=960i,unique2=691i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=60i,twothousand=160i,fivethous=460i,tenthous=960i,odd=0i,even=1i,stringu1="YKAAAA",stringu2="PABAAA",string4="VVVVxx" 59788800000000000 +onek unique1=733i,unique2=692i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=33i,twothousand=133i,fivethous=233i,tenthous=733i,odd=6i,even=7i,stringu1="FCAAAA",stringu2="QABAAA",string4="AAAAxx" 59875200000000000 +onek unique1=967i,unique2=693i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=67i,twothousand=167i,fivethous=467i,tenthous=967i,odd=14i,even=15i,stringu1="FLAAAA",stringu2="RABAAA",string4="HHHHxx" 59961600000000000 +onek unique1=668i,unique2=694i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=68i,twothousand=68i,fivethous=168i,tenthous=668i,odd=16i,even=17i,stringu1="SZAAAA",stringu2="SABAAA",string4="OOOOxx" 60048000000000000 +onek unique1=994i,unique2=695i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=94i,twothousand=194i,fivethous=494i,tenthous=994i,odd=8i,even=9i,stringu1="GMAAAA",stringu2="TABAAA",string4="VVVVxx" 60134400000000000 +onek unique1=129i,unique2=696i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=29i,twothousand=129i,fivethous=129i,tenthous=129i,odd=18i,even=19i,stringu1="ZEAAAA",stringu2="UABAAA",string4="AAAAxx" 60220800000000000 +onek unique1=954i,unique2=697i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=54i,twothousand=154i,fivethous=454i,tenthous=954i,odd=8i,even=9i,stringu1="SKAAAA",stringu2="VABAAA",string4="HHHHxx" 60307200000000000 +onek unique1=68i,unique2=698i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=68i,twothousand=68i,fivethous=68i,tenthous=68i,odd=16i,even=17i,stringu1="QCAAAA",stringu2="WABAAA",string4="OOOOxx" 60393600000000000 +onek unique1=79i,unique2=699i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=79i,twothousand=79i,fivethous=79i,tenthous=79i,odd=18i,even=19i,stringu1="BDAAAA",stringu2="XABAAA",string4="VVVVxx" 60480000000000000 +onek unique1=121i,unique2=700i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=21i,twothousand=121i,fivethous=121i,tenthous=121i,odd=2i,even=3i,stringu1="REAAAA",stringu2="YABAAA",string4="AAAAxx" 60566400000000000 +onek unique1=740i,unique2=701i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=40i,twothousand=140i,fivethous=240i,tenthous=740i,odd=0i,even=1i,stringu1="MCAAAA",stringu2="ZABAAA",string4="HHHHxx" 60652800000000000 +onek unique1=902i,unique2=702i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=102i,fivethous=402i,tenthous=902i,odd=4i,even=5i,stringu1="SIAAAA",stringu2="ABBAAA",string4="OOOOxx" 60739200000000000 +onek unique1=695i,unique2=703i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=95i,twothousand=95i,fivethous=195i,tenthous=695i,odd=10i,even=11i,stringu1="TAAAAA",stringu2="BBBAAA",string4="VVVVxx" 60825600000000000 +onek unique1=455i,unique2=704i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=55i,twothousand=55i,fivethous=455i,tenthous=455i,odd=10i,even=11i,stringu1="NRAAAA",stringu2="CBBAAA",string4="AAAAxx" 60912000000000000 +onek unique1=89i,unique2=705i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=89i,twothousand=89i,fivethous=89i,tenthous=89i,odd=18i,even=19i,stringu1="LDAAAA",stringu2="DBBAAA",string4="HHHHxx" 60998400000000000 +onek unique1=893i,unique2=706i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=93i,twothousand=93i,fivethous=393i,tenthous=893i,odd=6i,even=7i,stringu1="JIAAAA",stringu2="EBBAAA",string4="OOOOxx" 61084800000000000 +onek unique1=202i,unique2=707i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=2i,fivethous=202i,tenthous=202i,odd=4i,even=5i,stringu1="UHAAAA",stringu2="FBBAAA",string4="VVVVxx" 61171200000000000 +onek unique1=132i,unique2=708i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=32i,twothousand=132i,fivethous=132i,tenthous=132i,odd=4i,even=5i,stringu1="CFAAAA",stringu2="GBBAAA",string4="AAAAxx" 61257600000000000 +onek unique1=782i,unique2=709i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=82i,twothousand=182i,fivethous=282i,tenthous=782i,odd=4i,even=5i,stringu1="CEAAAA",stringu2="HBBAAA",string4="HHHHxx" 61344000000000000 +onek unique1=512i,unique2=710i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=12i,twothousand=112i,fivethous=12i,tenthous=512i,odd=4i,even=5i,stringu1="STAAAA",stringu2="IBBAAA",string4="OOOOxx" 61430400000000000 +onek unique1=857i,unique2=711i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=57i,twothousand=57i,fivethous=357i,tenthous=857i,odd=14i,even=15i,stringu1="ZGAAAA",stringu2="JBBAAA",string4="VVVVxx" 61516800000000000 +onek unique1=248i,unique2=712i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=48i,twothousand=48i,fivethous=248i,tenthous=248i,odd=16i,even=17i,stringu1="OJAAAA",stringu2="KBBAAA",string4="AAAAxx" 61603200000000000 +onek unique1=858i,unique2=713i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=58i,twothousand=58i,fivethous=358i,tenthous=858i,odd=16i,even=17i,stringu1="AHAAAA",stringu2="LBBAAA",string4="HHHHxx" 61689600000000000 +onek unique1=527i,unique2=714i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=27i,twothousand=127i,fivethous=27i,tenthous=527i,odd=14i,even=15i,stringu1="HUAAAA",stringu2="MBBAAA",string4="OOOOxx" 61776000000000000 +onek unique1=450i,unique2=715i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=50i,twothousand=50i,fivethous=450i,tenthous=450i,odd=0i,even=1i,stringu1="IRAAAA",stringu2="NBBAAA",string4="VVVVxx" 61862400000000000 +onek unique1=712i,unique2=716i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=12i,twothousand=112i,fivethous=212i,tenthous=712i,odd=4i,even=5i,stringu1="KBAAAA",stringu2="OBBAAA",string4="AAAAxx" 61948800000000000 +onek unique1=153i,unique2=717i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=53i,twothousand=153i,fivethous=153i,tenthous=153i,odd=6i,even=7i,stringu1="XFAAAA",stringu2="PBBAAA",string4="HHHHxx" 62035200000000000 +onek unique1=587i,unique2=718i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=87i,twothousand=187i,fivethous=87i,tenthous=587i,odd=14i,even=15i,stringu1="PWAAAA",stringu2="QBBAAA",string4="OOOOxx" 62121600000000000 +onek unique1=593i,unique2=719i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=93i,twothousand=193i,fivethous=93i,tenthous=593i,odd=6i,even=7i,stringu1="VWAAAA",stringu2="RBBAAA",string4="VVVVxx" 62208000000000000 +onek unique1=249i,unique2=720i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=49i,twothousand=49i,fivethous=249i,tenthous=249i,odd=18i,even=19i,stringu1="PJAAAA",stringu2="SBBAAA",string4="AAAAxx" 62294400000000000 +onek unique1=128i,unique2=721i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=28i,twothousand=128i,fivethous=128i,tenthous=128i,odd=16i,even=17i,stringu1="YEAAAA",stringu2="TBBAAA",string4="HHHHxx" 62380800000000000 +onek unique1=675i,unique2=722i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=75i,twothousand=75i,fivethous=175i,tenthous=675i,odd=10i,even=11i,stringu1="ZZAAAA",stringu2="UBBAAA",string4="OOOOxx" 62467200000000000 +onek unique1=929i,unique2=723i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=29i,twothousand=129i,fivethous=429i,tenthous=929i,odd=18i,even=19i,stringu1="TJAAAA",stringu2="VBBAAA",string4="VVVVxx" 62553600000000000 +onek unique1=156i,unique2=724i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=56i,twothousand=156i,fivethous=156i,tenthous=156i,odd=12i,even=13i,stringu1="AGAAAA",stringu2="WBBAAA",string4="AAAAxx" 62640000000000000 +onek unique1=415i,unique2=725i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=15i,twothousand=15i,fivethous=415i,tenthous=415i,odd=10i,even=11i,stringu1="ZPAAAA",stringu2="XBBAAA",string4="HHHHxx" 62726400000000000 +onek unique1=28i,unique2=726i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=28i,twothousand=28i,fivethous=28i,tenthous=28i,odd=16i,even=17i,stringu1="CBAAAA",stringu2="YBBAAA",string4="OOOOxx" 62812800000000000 +onek unique1=18i,unique2=727i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=18i,twothousand=18i,fivethous=18i,tenthous=18i,odd=16i,even=17i,stringu1="SAAAAA",stringu2="ZBBAAA",string4="VVVVxx" 62899200000000000 +onek unique1=255i,unique2=728i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=55i,twothousand=55i,fivethous=255i,tenthous=255i,odd=10i,even=11i,stringu1="VJAAAA",stringu2="ACBAAA",string4="AAAAxx" 62985600000000000 +onek unique1=793i,unique2=729i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=93i,twothousand=193i,fivethous=293i,tenthous=793i,odd=6i,even=7i,stringu1="NEAAAA",stringu2="BCBAAA",string4="HHHHxx" 63072000000000000 +onek unique1=554i,unique2=730i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=54i,twothousand=154i,fivethous=54i,tenthous=554i,odd=8i,even=9i,stringu1="IVAAAA",stringu2="CCBAAA",string4="OOOOxx" 63158400000000000 +onek unique1=467i,unique2=731i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=67i,twothousand=67i,fivethous=467i,tenthous=467i,odd=14i,even=15i,stringu1="ZRAAAA",stringu2="DCBAAA",string4="VVVVxx" 63244800000000000 +onek unique1=410i,unique2=732i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=10i,twothousand=10i,fivethous=410i,tenthous=410i,odd=0i,even=1i,stringu1="UPAAAA",stringu2="ECBAAA",string4="AAAAxx" 63331200000000000 +onek unique1=651i,unique2=733i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=51i,twothousand=51i,fivethous=151i,tenthous=651i,odd=2i,even=3i,stringu1="BZAAAA",stringu2="FCBAAA",string4="HHHHxx" 63417600000000000 +onek unique1=287i,unique2=734i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=87i,twothousand=87i,fivethous=287i,tenthous=287i,odd=14i,even=15i,stringu1="BLAAAA",stringu2="GCBAAA",string4="OOOOxx" 63504000000000000 +onek unique1=640i,unique2=735i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=40i,twothousand=40i,fivethous=140i,tenthous=640i,odd=0i,even=1i,stringu1="QYAAAA",stringu2="HCBAAA",string4="VVVVxx" 63590400000000000 +onek unique1=245i,unique2=736i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=45i,twothousand=45i,fivethous=245i,tenthous=245i,odd=10i,even=11i,stringu1="LJAAAA",stringu2="ICBAAA",string4="AAAAxx" 63676800000000000 +onek unique1=21i,unique2=737i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=21i,twothousand=21i,fivethous=21i,tenthous=21i,odd=2i,even=3i,stringu1="VAAAAA",stringu2="JCBAAA",string4="HHHHxx" 63763200000000000 +onek unique1=83i,unique2=738i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=83i,twothousand=83i,fivethous=83i,tenthous=83i,odd=6i,even=7i,stringu1="FDAAAA",stringu2="KCBAAA",string4="OOOOxx" 63849600000000000 +onek unique1=228i,unique2=739i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=28i,twothousand=28i,fivethous=228i,tenthous=228i,odd=16i,even=17i,stringu1="UIAAAA",stringu2="LCBAAA",string4="VVVVxx" 63936000000000000 +onek unique1=323i,unique2=740i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=23i,twothousand=123i,fivethous=323i,tenthous=323i,odd=6i,even=7i,stringu1="LMAAAA",stringu2="MCBAAA",string4="AAAAxx" 64022400000000000 +onek unique1=594i,unique2=741i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=94i,twothousand=194i,fivethous=94i,tenthous=594i,odd=8i,even=9i,stringu1="WWAAAA",stringu2="NCBAAA",string4="HHHHxx" 64108800000000000 +onek unique1=528i,unique2=742i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=28i,twothousand=128i,fivethous=28i,tenthous=528i,odd=16i,even=17i,stringu1="IUAAAA",stringu2="OCBAAA",string4="OOOOxx" 64195200000000000 +onek unique1=276i,unique2=743i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=76i,twothousand=76i,fivethous=276i,tenthous=276i,odd=12i,even=13i,stringu1="QKAAAA",stringu2="PCBAAA",string4="VVVVxx" 64281600000000000 +onek unique1=598i,unique2=744i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=98i,twothousand=198i,fivethous=98i,tenthous=598i,odd=16i,even=17i,stringu1="AXAAAA",stringu2="QCBAAA",string4="AAAAxx" 64368000000000000 +onek unique1=635i,unique2=745i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=35i,twothousand=35i,fivethous=135i,tenthous=635i,odd=10i,even=11i,stringu1="LYAAAA",stringu2="RCBAAA",string4="HHHHxx" 64454400000000000 +onek unique1=868i,unique2=746i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=68i,twothousand=68i,fivethous=368i,tenthous=868i,odd=16i,even=17i,stringu1="KHAAAA",stringu2="SCBAAA",string4="OOOOxx" 64540800000000000 +onek unique1=290i,unique2=747i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=90i,twothousand=90i,fivethous=290i,tenthous=290i,odd=0i,even=1i,stringu1="ELAAAA",stringu2="TCBAAA",string4="VVVVxx" 64627200000000000 +onek unique1=468i,unique2=748i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=68i,twothousand=68i,fivethous=468i,tenthous=468i,odd=16i,even=17i,stringu1="ASAAAA",stringu2="UCBAAA",string4="AAAAxx" 64713600000000000 +onek unique1=689i,unique2=749i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=89i,twothousand=89i,fivethous=189i,tenthous=689i,odd=18i,even=19i,stringu1="NAAAAA",stringu2="VCBAAA",string4="HHHHxx" 64800000000000000 +onek unique1=799i,unique2=750i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=99i,twothousand=199i,fivethous=299i,tenthous=799i,odd=18i,even=19i,stringu1="TEAAAA",stringu2="WCBAAA",string4="OOOOxx" 64886400000000000 +onek unique1=210i,unique2=751i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=10i,twothousand=10i,fivethous=210i,tenthous=210i,odd=0i,even=1i,stringu1="CIAAAA",stringu2="XCBAAA",string4="VVVVxx" 64972800000000000 +onek unique1=346i,unique2=752i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=46i,twothousand=146i,fivethous=346i,tenthous=346i,odd=12i,even=13i,stringu1="INAAAA",stringu2="YCBAAA",string4="AAAAxx" 65059200000000000 +onek unique1=957i,unique2=753i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=57i,twothousand=157i,fivethous=457i,tenthous=957i,odd=14i,even=15i,stringu1="VKAAAA",stringu2="ZCBAAA",string4="HHHHxx" 65145600000000000 +onek unique1=905i,unique2=754i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=105i,fivethous=405i,tenthous=905i,odd=10i,even=11i,stringu1="VIAAAA",stringu2="ADBAAA",string4="OOOOxx" 65232000000000000 +onek unique1=523i,unique2=755i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=23i,twothousand=123i,fivethous=23i,tenthous=523i,odd=6i,even=7i,stringu1="DUAAAA",stringu2="BDBAAA",string4="VVVVxx" 65318400000000000 +onek unique1=899i,unique2=756i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=99i,twothousand=99i,fivethous=399i,tenthous=899i,odd=18i,even=19i,stringu1="PIAAAA",stringu2="CDBAAA",string4="AAAAxx" 65404800000000000 +onek unique1=867i,unique2=757i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=67i,twothousand=67i,fivethous=367i,tenthous=867i,odd=14i,even=15i,stringu1="JHAAAA",stringu2="DDBAAA",string4="HHHHxx" 65491200000000000 +onek unique1=11i,unique2=758i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=11i,twothousand=11i,fivethous=11i,tenthous=11i,odd=2i,even=3i,stringu1="LAAAAA",stringu2="EDBAAA",string4="OOOOxx" 65577600000000000 +onek unique1=320i,unique2=759i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=20i,twothousand=120i,fivethous=320i,tenthous=320i,odd=0i,even=1i,stringu1="IMAAAA",stringu2="FDBAAA",string4="VVVVxx" 65664000000000000 +onek unique1=766i,unique2=760i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=66i,twothousand=166i,fivethous=266i,tenthous=766i,odd=12i,even=13i,stringu1="MDAAAA",stringu2="GDBAAA",string4="AAAAxx" 65750400000000000 +onek unique1=84i,unique2=761i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=84i,twothousand=84i,fivethous=84i,tenthous=84i,odd=8i,even=9i,stringu1="GDAAAA",stringu2="HDBAAA",string4="HHHHxx" 65836800000000000 +onek unique1=507i,unique2=762i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=107i,fivethous=7i,tenthous=507i,odd=14i,even=15i,stringu1="NTAAAA",stringu2="IDBAAA",string4="OOOOxx" 65923200000000000 +onek unique1=471i,unique2=763i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=71i,twothousand=71i,fivethous=471i,tenthous=471i,odd=2i,even=3i,stringu1="DSAAAA",stringu2="JDBAAA",string4="VVVVxx" 66009600000000000 +onek unique1=517i,unique2=764i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=17i,twothousand=117i,fivethous=17i,tenthous=517i,odd=14i,even=15i,stringu1="XTAAAA",stringu2="KDBAAA",string4="AAAAxx" 66096000000000000 +onek unique1=234i,unique2=765i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=34i,twothousand=34i,fivethous=234i,tenthous=234i,odd=8i,even=9i,stringu1="AJAAAA",stringu2="LDBAAA",string4="HHHHxx" 66182400000000000 +onek unique1=988i,unique2=766i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=88i,twothousand=188i,fivethous=488i,tenthous=988i,odd=16i,even=17i,stringu1="AMAAAA",stringu2="MDBAAA",string4="OOOOxx" 66268800000000000 +onek unique1=473i,unique2=767i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=73i,twothousand=73i,fivethous=473i,tenthous=473i,odd=6i,even=7i,stringu1="FSAAAA",stringu2="NDBAAA",string4="VVVVxx" 66355200000000000 +onek unique1=66i,unique2=768i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=66i,twothousand=66i,fivethous=66i,tenthous=66i,odd=12i,even=13i,stringu1="OCAAAA",stringu2="ODBAAA",string4="AAAAxx" 66441600000000000 +onek unique1=530i,unique2=769i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=30i,twothousand=130i,fivethous=30i,tenthous=530i,odd=0i,even=1i,stringu1="KUAAAA",stringu2="PDBAAA",string4="HHHHxx" 66528000000000000 +onek unique1=834i,unique2=770i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=34i,twothousand=34i,fivethous=334i,tenthous=834i,odd=8i,even=9i,stringu1="CGAAAA",stringu2="QDBAAA",string4="OOOOxx" 66614400000000000 +onek unique1=894i,unique2=771i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=94i,twothousand=94i,fivethous=394i,tenthous=894i,odd=8i,even=9i,stringu1="KIAAAA",stringu2="RDBAAA",string4="VVVVxx" 66700800000000000 +onek unique1=481i,unique2=772i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=81i,twothousand=81i,fivethous=481i,tenthous=481i,odd=2i,even=3i,stringu1="NSAAAA",stringu2="SDBAAA",string4="AAAAxx" 66787200000000000 +onek unique1=280i,unique2=773i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=80i,twothousand=80i,fivethous=280i,tenthous=280i,odd=0i,even=1i,stringu1="UKAAAA",stringu2="TDBAAA",string4="HHHHxx" 66873600000000000 +onek unique1=705i,unique2=774i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=105i,fivethous=205i,tenthous=705i,odd=10i,even=11i,stringu1="DBAAAA",stringu2="UDBAAA",string4="OOOOxx" 66960000000000000 +onek unique1=218i,unique2=775i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=18i,twothousand=18i,fivethous=218i,tenthous=218i,odd=16i,even=17i,stringu1="KIAAAA",stringu2="VDBAAA",string4="VVVVxx" 67046400000000000 +onek unique1=560i,unique2=776i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=60i,twothousand=160i,fivethous=60i,tenthous=560i,odd=0i,even=1i,stringu1="OVAAAA",stringu2="WDBAAA",string4="AAAAxx" 67132800000000000 +onek unique1=123i,unique2=777i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=23i,twothousand=123i,fivethous=123i,tenthous=123i,odd=6i,even=7i,stringu1="TEAAAA",stringu2="XDBAAA",string4="HHHHxx" 67219200000000000 +onek unique1=289i,unique2=778i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=89i,twothousand=89i,fivethous=289i,tenthous=289i,odd=18i,even=19i,stringu1="DLAAAA",stringu2="YDBAAA",string4="OOOOxx" 67305600000000000 +onek unique1=189i,unique2=779i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=89i,twothousand=189i,fivethous=189i,tenthous=189i,odd=18i,even=19i,stringu1="HHAAAA",stringu2="ZDBAAA",string4="VVVVxx" 67392000000000000 +onek unique1=541i,unique2=780i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=41i,twothousand=141i,fivethous=41i,tenthous=541i,odd=2i,even=3i,stringu1="VUAAAA",stringu2="AEBAAA",string4="AAAAxx" 67478400000000000 +onek unique1=876i,unique2=781i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=76i,twothousand=76i,fivethous=376i,tenthous=876i,odd=12i,even=13i,stringu1="SHAAAA",stringu2="BEBAAA",string4="HHHHxx" 67564800000000000 +onek unique1=504i,unique2=782i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=104i,fivethous=4i,tenthous=504i,odd=8i,even=9i,stringu1="KTAAAA",stringu2="CEBAAA",string4="OOOOxx" 67651200000000000 +onek unique1=643i,unique2=783i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=43i,twothousand=43i,fivethous=143i,tenthous=643i,odd=6i,even=7i,stringu1="TYAAAA",stringu2="DEBAAA",string4="VVVVxx" 67737600000000000 +onek unique1=73i,unique2=784i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=73i,twothousand=73i,fivethous=73i,tenthous=73i,odd=6i,even=7i,stringu1="VCAAAA",stringu2="EEBAAA",string4="AAAAxx" 67824000000000000 +onek unique1=465i,unique2=785i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=65i,twothousand=65i,fivethous=465i,tenthous=465i,odd=10i,even=11i,stringu1="XRAAAA",stringu2="FEBAAA",string4="HHHHxx" 67910400000000000 +onek unique1=861i,unique2=786i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=61i,twothousand=61i,fivethous=361i,tenthous=861i,odd=2i,even=3i,stringu1="DHAAAA",stringu2="GEBAAA",string4="OOOOxx" 67996800000000000 +onek unique1=355i,unique2=787i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=55i,twothousand=155i,fivethous=355i,tenthous=355i,odd=10i,even=11i,stringu1="RNAAAA",stringu2="HEBAAA",string4="VVVVxx" 68083200000000000 +onek unique1=441i,unique2=788i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=41i,twothousand=41i,fivethous=441i,tenthous=441i,odd=2i,even=3i,stringu1="ZQAAAA",stringu2="IEBAAA",string4="AAAAxx" 68169600000000000 +onek unique1=219i,unique2=789i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=19i,twothousand=19i,fivethous=219i,tenthous=219i,odd=18i,even=19i,stringu1="LIAAAA",stringu2="JEBAAA",string4="HHHHxx" 68256000000000000 +onek unique1=839i,unique2=790i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=39i,twothousand=39i,fivethous=339i,tenthous=839i,odd=18i,even=19i,stringu1="HGAAAA",stringu2="KEBAAA",string4="OOOOxx" 68342400000000000 +onek unique1=271i,unique2=791i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=71i,twothousand=71i,fivethous=271i,tenthous=271i,odd=2i,even=3i,stringu1="LKAAAA",stringu2="LEBAAA",string4="VVVVxx" 68428800000000000 +onek unique1=212i,unique2=792i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=12i,twothousand=12i,fivethous=212i,tenthous=212i,odd=4i,even=5i,stringu1="EIAAAA",stringu2="MEBAAA",string4="AAAAxx" 68515200000000000 +onek unique1=904i,unique2=793i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=104i,fivethous=404i,tenthous=904i,odd=8i,even=9i,stringu1="UIAAAA",stringu2="NEBAAA",string4="HHHHxx" 68601600000000000 +onek unique1=244i,unique2=794i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=44i,twothousand=44i,fivethous=244i,tenthous=244i,odd=8i,even=9i,stringu1="KJAAAA",stringu2="OEBAAA",string4="OOOOxx" 68688000000000000 +onek unique1=751i,unique2=795i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=51i,twothousand=151i,fivethous=251i,tenthous=751i,odd=2i,even=3i,stringu1="XCAAAA",stringu2="PEBAAA",string4="VVVVxx" 68774400000000000 +onek unique1=944i,unique2=796i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=44i,twothousand=144i,fivethous=444i,tenthous=944i,odd=8i,even=9i,stringu1="IKAAAA",stringu2="QEBAAA",string4="AAAAxx" 68860800000000000 +onek unique1=305i,unique2=797i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=105i,fivethous=305i,tenthous=305i,odd=10i,even=11i,stringu1="TLAAAA",stringu2="REBAAA",string4="HHHHxx" 68947200000000000 +onek unique1=617i,unique2=798i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=17i,twothousand=17i,fivethous=117i,tenthous=617i,odd=14i,even=15i,stringu1="TXAAAA",stringu2="SEBAAA",string4="OOOOxx" 69033600000000000 +onek unique1=891i,unique2=799i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=91i,twothousand=91i,fivethous=391i,tenthous=891i,odd=2i,even=3i,stringu1="HIAAAA",stringu2="TEBAAA",string4="VVVVxx" 69120000000000000 +onek unique1=653i,unique2=800i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=53i,twothousand=53i,fivethous=153i,tenthous=653i,odd=6i,even=7i,stringu1="DZAAAA",stringu2="UEBAAA",string4="AAAAxx" 69206400000000000 +onek unique1=845i,unique2=801i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=45i,twothousand=45i,fivethous=345i,tenthous=845i,odd=10i,even=11i,stringu1="NGAAAA",stringu2="VEBAAA",string4="HHHHxx" 69292800000000000 +onek unique1=936i,unique2=802i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=36i,twothousand=136i,fivethous=436i,tenthous=936i,odd=12i,even=13i,stringu1="AKAAAA",stringu2="WEBAAA",string4="OOOOxx" 69379200000000000 +onek unique1=91i,unique2=803i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=91i,twothousand=91i,fivethous=91i,tenthous=91i,odd=2i,even=3i,stringu1="NDAAAA",stringu2="XEBAAA",string4="VVVVxx" 69465600000000000 +onek unique1=442i,unique2=804i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=42i,twothousand=42i,fivethous=442i,tenthous=442i,odd=4i,even=5i,stringu1="ARAAAA",stringu2="YEBAAA",string4="AAAAxx" 69552000000000000 +onek unique1=498i,unique2=805i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=98i,twothousand=98i,fivethous=498i,tenthous=498i,odd=16i,even=17i,stringu1="ETAAAA",stringu2="ZEBAAA",string4="HHHHxx" 69638400000000000 +onek unique1=987i,unique2=806i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=87i,twothousand=187i,fivethous=487i,tenthous=987i,odd=14i,even=15i,stringu1="ZLAAAA",stringu2="AFBAAA",string4="OOOOxx" 69724800000000000 +onek unique1=194i,unique2=807i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=94i,twothousand=194i,fivethous=194i,tenthous=194i,odd=8i,even=9i,stringu1="MHAAAA",stringu2="BFBAAA",string4="VVVVxx" 69811200000000000 +onek unique1=927i,unique2=808i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=27i,twothousand=127i,fivethous=427i,tenthous=927i,odd=14i,even=15i,stringu1="RJAAAA",stringu2="CFBAAA",string4="AAAAxx" 69897600000000000 +onek unique1=607i,unique2=809i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=7i,fivethous=107i,tenthous=607i,odd=14i,even=15i,stringu1="JXAAAA",stringu2="DFBAAA",string4="HHHHxx" 69984000000000000 +onek unique1=119i,unique2=810i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=19i,twothousand=119i,fivethous=119i,tenthous=119i,odd=18i,even=19i,stringu1="PEAAAA",stringu2="EFBAAA",string4="OOOOxx" 70070400000000000 +onek unique1=182i,unique2=811i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=82i,twothousand=182i,fivethous=182i,tenthous=182i,odd=4i,even=5i,stringu1="AHAAAA",stringu2="FFBAAA",string4="VVVVxx" 70156800000000000 +onek unique1=606i,unique2=812i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=6i,fivethous=106i,tenthous=606i,odd=12i,even=13i,stringu1="IXAAAA",stringu2="GFBAAA",string4="AAAAxx" 70243200000000000 +onek unique1=849i,unique2=813i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=49i,twothousand=49i,fivethous=349i,tenthous=849i,odd=18i,even=19i,stringu1="RGAAAA",stringu2="HFBAAA",string4="HHHHxx" 70329600000000000 +onek unique1=34i,unique2=814i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=34i,twothousand=34i,fivethous=34i,tenthous=34i,odd=8i,even=9i,stringu1="IBAAAA",stringu2="IFBAAA",string4="OOOOxx" 70416000000000000 +onek unique1=683i,unique2=815i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=83i,twothousand=83i,fivethous=183i,tenthous=683i,odd=6i,even=7i,stringu1="HAAAAA",stringu2="JFBAAA",string4="VVVVxx" 70502400000000000 +onek unique1=134i,unique2=816i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=34i,twothousand=134i,fivethous=134i,tenthous=134i,odd=8i,even=9i,stringu1="EFAAAA",stringu2="KFBAAA",string4="AAAAxx" 70588800000000000 +onek unique1=331i,unique2=817i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=31i,twothousand=131i,fivethous=331i,tenthous=331i,odd=2i,even=3i,stringu1="TMAAAA",stringu2="LFBAAA",string4="HHHHxx" 70675200000000000 +onek unique1=808i,unique2=818i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=8i,fivethous=308i,tenthous=808i,odd=16i,even=17i,stringu1="CFAAAA",stringu2="MFBAAA",string4="OOOOxx" 70761600000000000 +onek unique1=703i,unique2=819i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=103i,fivethous=203i,tenthous=703i,odd=6i,even=7i,stringu1="BBAAAA",stringu2="NFBAAA",string4="VVVVxx" 70848000000000000 +onek unique1=669i,unique2=820i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=69i,twothousand=69i,fivethous=169i,tenthous=669i,odd=18i,even=19i,stringu1="TZAAAA",stringu2="OFBAAA",string4="AAAAxx" 70934400000000000 +onek unique1=264i,unique2=821i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=64i,twothousand=64i,fivethous=264i,tenthous=264i,odd=8i,even=9i,stringu1="EKAAAA",stringu2="PFBAAA",string4="HHHHxx" 71020800000000000 +onek unique1=277i,unique2=822i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=77i,twothousand=77i,fivethous=277i,tenthous=277i,odd=14i,even=15i,stringu1="RKAAAA",stringu2="QFBAAA",string4="OOOOxx" 71107200000000000 +onek unique1=877i,unique2=823i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=77i,twothousand=77i,fivethous=377i,tenthous=877i,odd=14i,even=15i,stringu1="THAAAA",stringu2="RFBAAA",string4="VVVVxx" 71193600000000000 +onek unique1=783i,unique2=824i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=83i,twothousand=183i,fivethous=283i,tenthous=783i,odd=6i,even=7i,stringu1="DEAAAA",stringu2="SFBAAA",string4="AAAAxx" 71280000000000000 +onek unique1=791i,unique2=825i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=91i,twothousand=191i,fivethous=291i,tenthous=791i,odd=2i,even=3i,stringu1="LEAAAA",stringu2="TFBAAA",string4="HHHHxx" 71366400000000000 +onek unique1=171i,unique2=826i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=71i,twothousand=171i,fivethous=171i,tenthous=171i,odd=2i,even=3i,stringu1="PGAAAA",stringu2="UFBAAA",string4="OOOOxx" 71452800000000000 +onek unique1=564i,unique2=827i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=64i,twothousand=164i,fivethous=64i,tenthous=564i,odd=8i,even=9i,stringu1="SVAAAA",stringu2="VFBAAA",string4="VVVVxx" 71539200000000000 +onek unique1=230i,unique2=828i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=30i,twothousand=30i,fivethous=230i,tenthous=230i,odd=0i,even=1i,stringu1="WIAAAA",stringu2="WFBAAA",string4="AAAAxx" 71625600000000000 +onek unique1=881i,unique2=829i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=81i,twothousand=81i,fivethous=381i,tenthous=881i,odd=2i,even=3i,stringu1="XHAAAA",stringu2="XFBAAA",string4="HHHHxx" 71712000000000000 +onek unique1=890i,unique2=830i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=90i,twothousand=90i,fivethous=390i,tenthous=890i,odd=0i,even=1i,stringu1="GIAAAA",stringu2="YFBAAA",string4="OOOOxx" 71798400000000000 +onek unique1=374i,unique2=831i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=74i,twothousand=174i,fivethous=374i,tenthous=374i,odd=8i,even=9i,stringu1="KOAAAA",stringu2="ZFBAAA",string4="VVVVxx" 71884800000000000 +onek unique1=697i,unique2=832i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=97i,twothousand=97i,fivethous=197i,tenthous=697i,odd=14i,even=15i,stringu1="VAAAAA",stringu2="AGBAAA",string4="AAAAxx" 71971200000000000 +onek unique1=4i,unique2=833i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=4i,fivethous=4i,tenthous=4i,odd=8i,even=9i,stringu1="EAAAAA",stringu2="BGBAAA",string4="HHHHxx" 72057600000000000 +onek unique1=385i,unique2=834i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=85i,twothousand=185i,fivethous=385i,tenthous=385i,odd=10i,even=11i,stringu1="VOAAAA",stringu2="CGBAAA",string4="OOOOxx" 72144000000000000 +onek unique1=739i,unique2=835i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=39i,twothousand=139i,fivethous=239i,tenthous=739i,odd=18i,even=19i,stringu1="LCAAAA",stringu2="DGBAAA",string4="VVVVxx" 72230400000000000 +onek unique1=623i,unique2=836i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=23i,twothousand=23i,fivethous=123i,tenthous=623i,odd=6i,even=7i,stringu1="ZXAAAA",stringu2="EGBAAA",string4="AAAAxx" 72316800000000000 +onek unique1=547i,unique2=837i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=47i,twothousand=147i,fivethous=47i,tenthous=547i,odd=14i,even=15i,stringu1="BVAAAA",stringu2="FGBAAA",string4="HHHHxx" 72403200000000000 +onek unique1=532i,unique2=838i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=32i,twothousand=132i,fivethous=32i,tenthous=532i,odd=4i,even=5i,stringu1="MUAAAA",stringu2="GGBAAA",string4="OOOOxx" 72489600000000000 +onek unique1=383i,unique2=839i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=83i,twothousand=183i,fivethous=383i,tenthous=383i,odd=6i,even=7i,stringu1="TOAAAA",stringu2="HGBAAA",string4="VVVVxx" 72576000000000000 +onek unique1=181i,unique2=840i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=81i,twothousand=181i,fivethous=181i,tenthous=181i,odd=2i,even=3i,stringu1="ZGAAAA",stringu2="IGBAAA",string4="AAAAxx" 72662400000000000 +onek unique1=327i,unique2=841i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=27i,twothousand=127i,fivethous=327i,tenthous=327i,odd=14i,even=15i,stringu1="PMAAAA",stringu2="JGBAAA",string4="HHHHxx" 72748800000000000 +onek unique1=701i,unique2=842i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=101i,fivethous=201i,tenthous=701i,odd=2i,even=3i,stringu1="ZAAAAA",stringu2="KGBAAA",string4="OOOOxx" 72835200000000000 +onek unique1=111i,unique2=843i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=11i,twothousand=111i,fivethous=111i,tenthous=111i,odd=2i,even=3i,stringu1="HEAAAA",stringu2="LGBAAA",string4="VVVVxx" 72921600000000000 +onek unique1=977i,unique2=844i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=77i,twothousand=177i,fivethous=477i,tenthous=977i,odd=14i,even=15i,stringu1="PLAAAA",stringu2="MGBAAA",string4="AAAAxx" 73008000000000000 +onek unique1=431i,unique2=845i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=31i,twothousand=31i,fivethous=431i,tenthous=431i,odd=2i,even=3i,stringu1="PQAAAA",stringu2="NGBAAA",string4="HHHHxx" 73094400000000000 +onek unique1=456i,unique2=846i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=56i,twothousand=56i,fivethous=456i,tenthous=456i,odd=12i,even=13i,stringu1="ORAAAA",stringu2="OGBAAA",string4="OOOOxx" 73180800000000000 +onek unique1=368i,unique2=847i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=68i,twothousand=168i,fivethous=368i,tenthous=368i,odd=16i,even=17i,stringu1="EOAAAA",stringu2="PGBAAA",string4="VVVVxx" 73267200000000000 +onek unique1=32i,unique2=848i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=32i,twothousand=32i,fivethous=32i,tenthous=32i,odd=4i,even=5i,stringu1="GBAAAA",stringu2="QGBAAA",string4="AAAAxx" 73353600000000000 +onek unique1=125i,unique2=849i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=25i,twothousand=125i,fivethous=125i,tenthous=125i,odd=10i,even=11i,stringu1="VEAAAA",stringu2="RGBAAA",string4="HHHHxx" 73440000000000000 +onek unique1=847i,unique2=850i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=47i,twothousand=47i,fivethous=347i,tenthous=847i,odd=14i,even=15i,stringu1="PGAAAA",stringu2="SGBAAA",string4="OOOOxx" 73526400000000000 +onek unique1=485i,unique2=851i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=85i,twothousand=85i,fivethous=485i,tenthous=485i,odd=10i,even=11i,stringu1="RSAAAA",stringu2="TGBAAA",string4="VVVVxx" 73612800000000000 +onek unique1=387i,unique2=852i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=87i,twothousand=187i,fivethous=387i,tenthous=387i,odd=14i,even=15i,stringu1="XOAAAA",stringu2="UGBAAA",string4="AAAAxx" 73699200000000000 +onek unique1=288i,unique2=853i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=88i,twothousand=88i,fivethous=288i,tenthous=288i,odd=16i,even=17i,stringu1="CLAAAA",stringu2="VGBAAA",string4="HHHHxx" 73785600000000000 +onek unique1=919i,unique2=854i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=19i,twothousand=119i,fivethous=419i,tenthous=919i,odd=18i,even=19i,stringu1="JJAAAA",stringu2="WGBAAA",string4="OOOOxx" 73872000000000000 +onek unique1=393i,unique2=855i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=93i,twothousand=193i,fivethous=393i,tenthous=393i,odd=6i,even=7i,stringu1="DPAAAA",stringu2="XGBAAA",string4="VVVVxx" 73958400000000000 +onek unique1=953i,unique2=856i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=53i,twothousand=153i,fivethous=453i,tenthous=953i,odd=6i,even=7i,stringu1="RKAAAA",stringu2="YGBAAA",string4="AAAAxx" 74044800000000000 +onek unique1=798i,unique2=857i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=98i,twothousand=198i,fivethous=298i,tenthous=798i,odd=16i,even=17i,stringu1="SEAAAA",stringu2="ZGBAAA",string4="HHHHxx" 74131200000000000 +onek unique1=940i,unique2=858i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=40i,twothousand=140i,fivethous=440i,tenthous=940i,odd=0i,even=1i,stringu1="EKAAAA",stringu2="AHBAAA",string4="OOOOxx" 74217600000000000 +onek unique1=198i,unique2=859i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=98i,twothousand=198i,fivethous=198i,tenthous=198i,odd=16i,even=17i,stringu1="QHAAAA",stringu2="BHBAAA",string4="VVVVxx" 74304000000000000 +onek unique1=25i,unique2=860i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=25i,twothousand=25i,fivethous=25i,tenthous=25i,odd=10i,even=11i,stringu1="ZAAAAA",stringu2="CHBAAA",string4="AAAAxx" 74390400000000000 +onek unique1=190i,unique2=861i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=90i,twothousand=190i,fivethous=190i,tenthous=190i,odd=0i,even=1i,stringu1="IHAAAA",stringu2="DHBAAA",string4="HHHHxx" 74476800000000000 +onek unique1=820i,unique2=862i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=20i,twothousand=20i,fivethous=320i,tenthous=820i,odd=0i,even=1i,stringu1="OFAAAA",stringu2="EHBAAA",string4="OOOOxx" 74563200000000000 +onek unique1=15i,unique2=863i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=15i,twothousand=15i,fivethous=15i,tenthous=15i,odd=10i,even=11i,stringu1="PAAAAA",stringu2="FHBAAA",string4="VVVVxx" 74649600000000000 +onek unique1=427i,unique2=864i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=27i,twothousand=27i,fivethous=427i,tenthous=427i,odd=14i,even=15i,stringu1="LQAAAA",stringu2="GHBAAA",string4="AAAAxx" 74736000000000000 +onek unique1=349i,unique2=865i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=49i,twothousand=149i,fivethous=349i,tenthous=349i,odd=18i,even=19i,stringu1="LNAAAA",stringu2="HHBAAA",string4="HHHHxx" 74822400000000000 +onek unique1=785i,unique2=866i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=85i,twothousand=185i,fivethous=285i,tenthous=785i,odd=10i,even=11i,stringu1="FEAAAA",stringu2="IHBAAA",string4="OOOOxx" 74908800000000000 +onek unique1=340i,unique2=867i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=40i,twothousand=140i,fivethous=340i,tenthous=340i,odd=0i,even=1i,stringu1="CNAAAA",stringu2="JHBAAA",string4="VVVVxx" 74995200000000000 +onek unique1=292i,unique2=868i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=92i,twothousand=92i,fivethous=292i,tenthous=292i,odd=4i,even=5i,stringu1="GLAAAA",stringu2="KHBAAA",string4="AAAAxx" 75081600000000000 +onek unique1=17i,unique2=869i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=17i,twothousand=17i,fivethous=17i,tenthous=17i,odd=14i,even=15i,stringu1="RAAAAA",stringu2="LHBAAA",string4="HHHHxx" 75168000000000000 +onek unique1=985i,unique2=870i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=85i,twothousand=185i,fivethous=485i,tenthous=985i,odd=10i,even=11i,stringu1="XLAAAA",stringu2="MHBAAA",string4="OOOOxx" 75254400000000000 +onek unique1=645i,unique2=871i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=45i,twothousand=45i,fivethous=145i,tenthous=645i,odd=10i,even=11i,stringu1="VYAAAA",stringu2="NHBAAA",string4="VVVVxx" 75340800000000000 +onek unique1=631i,unique2=872i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=31i,twothousand=31i,fivethous=131i,tenthous=631i,odd=2i,even=3i,stringu1="HYAAAA",stringu2="OHBAAA",string4="AAAAxx" 75427200000000000 +onek unique1=761i,unique2=873i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=61i,twothousand=161i,fivethous=261i,tenthous=761i,odd=2i,even=3i,stringu1="HDAAAA",stringu2="PHBAAA",string4="HHHHxx" 75513600000000000 +onek unique1=707i,unique2=874i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=107i,fivethous=207i,tenthous=707i,odd=14i,even=15i,stringu1="FBAAAA",stringu2="QHBAAA",string4="OOOOxx" 75600000000000000 +onek unique1=776i,unique2=875i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=76i,twothousand=176i,fivethous=276i,tenthous=776i,odd=12i,even=13i,stringu1="WDAAAA",stringu2="RHBAAA",string4="VVVVxx" 75686400000000000 +onek unique1=856i,unique2=876i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=56i,twothousand=56i,fivethous=356i,tenthous=856i,odd=12i,even=13i,stringu1="YGAAAA",stringu2="SHBAAA",string4="AAAAxx" 75772800000000000 +onek unique1=978i,unique2=877i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=78i,twothousand=178i,fivethous=478i,tenthous=978i,odd=16i,even=17i,stringu1="QLAAAA",stringu2="THBAAA",string4="HHHHxx" 75859200000000000 +onek unique1=710i,unique2=878i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=10i,twothousand=110i,fivethous=210i,tenthous=710i,odd=0i,even=1i,stringu1="IBAAAA",stringu2="UHBAAA",string4="OOOOxx" 75945600000000000 +onek unique1=604i,unique2=879i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=4i,fivethous=104i,tenthous=604i,odd=8i,even=9i,stringu1="GXAAAA",stringu2="VHBAAA",string4="VVVVxx" 76032000000000000 +onek unique1=291i,unique2=880i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=91i,twothousand=91i,fivethous=291i,tenthous=291i,odd=2i,even=3i,stringu1="FLAAAA",stringu2="WHBAAA",string4="AAAAxx" 76118400000000000 +onek unique1=747i,unique2=881i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=47i,twothousand=147i,fivethous=247i,tenthous=747i,odd=14i,even=15i,stringu1="TCAAAA",stringu2="XHBAAA",string4="HHHHxx" 76204800000000000 +onek unique1=837i,unique2=882i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=37i,twothousand=37i,fivethous=337i,tenthous=837i,odd=14i,even=15i,stringu1="FGAAAA",stringu2="YHBAAA",string4="OOOOxx" 76291200000000000 +onek unique1=722i,unique2=883i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=22i,twothousand=122i,fivethous=222i,tenthous=722i,odd=4i,even=5i,stringu1="UBAAAA",stringu2="ZHBAAA",string4="VVVVxx" 76377600000000000 +onek unique1=925i,unique2=884i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=25i,twothousand=125i,fivethous=425i,tenthous=925i,odd=10i,even=11i,stringu1="PJAAAA",stringu2="AIBAAA",string4="AAAAxx" 76464000000000000 +onek unique1=49i,unique2=885i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=49i,twothousand=49i,fivethous=49i,tenthous=49i,odd=18i,even=19i,stringu1="XBAAAA",stringu2="BIBAAA",string4="HHHHxx" 76550400000000000 +onek unique1=832i,unique2=886i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=32i,twothousand=32i,fivethous=332i,tenthous=832i,odd=4i,even=5i,stringu1="AGAAAA",stringu2="CIBAAA",string4="OOOOxx" 76636800000000000 +onek unique1=336i,unique2=887i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=36i,twothousand=136i,fivethous=336i,tenthous=336i,odd=12i,even=13i,stringu1="YMAAAA",stringu2="DIBAAA",string4="VVVVxx" 76723200000000000 +onek unique1=185i,unique2=888i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=85i,twothousand=185i,fivethous=185i,tenthous=185i,odd=10i,even=11i,stringu1="DHAAAA",stringu2="EIBAAA",string4="AAAAxx" 76809600000000000 +onek unique1=434i,unique2=889i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=34i,twothousand=34i,fivethous=434i,tenthous=434i,odd=8i,even=9i,stringu1="SQAAAA",stringu2="FIBAAA",string4="HHHHxx" 76896000000000000 +onek unique1=284i,unique2=890i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=84i,twothousand=84i,fivethous=284i,tenthous=284i,odd=8i,even=9i,stringu1="YKAAAA",stringu2="GIBAAA",string4="OOOOxx" 76982400000000000 +onek unique1=812i,unique2=891i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=12i,twothousand=12i,fivethous=312i,tenthous=812i,odd=4i,even=5i,stringu1="GFAAAA",stringu2="HIBAAA",string4="VVVVxx" 77068800000000000 +onek unique1=810i,unique2=892i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=10i,twothousand=10i,fivethous=310i,tenthous=810i,odd=0i,even=1i,stringu1="EFAAAA",stringu2="IIBAAA",string4="AAAAxx" 77155200000000000 +onek unique1=252i,unique2=893i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=52i,twothousand=52i,fivethous=252i,tenthous=252i,odd=4i,even=5i,stringu1="SJAAAA",stringu2="JIBAAA",string4="HHHHxx" 77241600000000000 +onek unique1=965i,unique2=894i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=65i,twothousand=165i,fivethous=465i,tenthous=965i,odd=10i,even=11i,stringu1="DLAAAA",stringu2="KIBAAA",string4="OOOOxx" 77328000000000000 +onek unique1=110i,unique2=895i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=10i,twothousand=110i,fivethous=110i,tenthous=110i,odd=0i,even=1i,stringu1="GEAAAA",stringu2="LIBAAA",string4="VVVVxx" 77414400000000000 +onek unique1=698i,unique2=896i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=98i,twothousand=98i,fivethous=198i,tenthous=698i,odd=16i,even=17i,stringu1="WAAAAA",stringu2="MIBAAA",string4="AAAAxx" 77500800000000000 +onek unique1=283i,unique2=897i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=83i,twothousand=83i,fivethous=283i,tenthous=283i,odd=6i,even=7i,stringu1="XKAAAA",stringu2="NIBAAA",string4="HHHHxx" 77587200000000000 +onek unique1=533i,unique2=898i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=33i,twothousand=133i,fivethous=33i,tenthous=533i,odd=6i,even=7i,stringu1="NUAAAA",stringu2="OIBAAA",string4="OOOOxx" 77673600000000000 +onek unique1=662i,unique2=899i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=62i,twothousand=62i,fivethous=162i,tenthous=662i,odd=4i,even=5i,stringu1="MZAAAA",stringu2="PIBAAA",string4="VVVVxx" 77760000000000000 +onek unique1=329i,unique2=900i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=29i,twothousand=129i,fivethous=329i,tenthous=329i,odd=18i,even=19i,stringu1="RMAAAA",stringu2="QIBAAA",string4="AAAAxx" 77846400000000000 +onek unique1=250i,unique2=901i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=50i,twothousand=50i,fivethous=250i,tenthous=250i,odd=0i,even=1i,stringu1="QJAAAA",stringu2="RIBAAA",string4="HHHHxx" 77932800000000000 +onek unique1=407i,unique2=902i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=7i,fivethous=407i,tenthous=407i,odd=14i,even=15i,stringu1="RPAAAA",stringu2="SIBAAA",string4="OOOOxx" 78019200000000000 +onek unique1=823i,unique2=903i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=23i,twothousand=23i,fivethous=323i,tenthous=823i,odd=6i,even=7i,stringu1="RFAAAA",stringu2="TIBAAA",string4="VVVVxx" 78105600000000000 +onek unique1=852i,unique2=904i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=52i,twothousand=52i,fivethous=352i,tenthous=852i,odd=4i,even=5i,stringu1="UGAAAA",stringu2="UIBAAA",string4="AAAAxx" 78192000000000000 +onek unique1=871i,unique2=905i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=71i,twothousand=71i,fivethous=371i,tenthous=871i,odd=2i,even=3i,stringu1="NHAAAA",stringu2="VIBAAA",string4="HHHHxx" 78278400000000000 +onek unique1=118i,unique2=906i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=18i,twothousand=118i,fivethous=118i,tenthous=118i,odd=16i,even=17i,stringu1="OEAAAA",stringu2="WIBAAA",string4="OOOOxx" 78364800000000000 +onek unique1=912i,unique2=907i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=12i,twothousand=112i,fivethous=412i,tenthous=912i,odd=4i,even=5i,stringu1="CJAAAA",stringu2="XIBAAA",string4="VVVVxx" 78451200000000000 +onek unique1=458i,unique2=908i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=58i,twothousand=58i,fivethous=458i,tenthous=458i,odd=16i,even=17i,stringu1="QRAAAA",stringu2="YIBAAA",string4="AAAAxx" 78537600000000000 +onek unique1=926i,unique2=909i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=26i,twothousand=126i,fivethous=426i,tenthous=926i,odd=12i,even=13i,stringu1="QJAAAA",stringu2="ZIBAAA",string4="HHHHxx" 78624000000000000 +onek unique1=328i,unique2=910i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=28i,twothousand=128i,fivethous=328i,tenthous=328i,odd=16i,even=17i,stringu1="QMAAAA",stringu2="AJBAAA",string4="OOOOxx" 78710400000000000 +onek unique1=980i,unique2=911i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=80i,twothousand=180i,fivethous=480i,tenthous=980i,odd=0i,even=1i,stringu1="SLAAAA",stringu2="BJBAAA",string4="VVVVxx" 78796800000000000 +onek unique1=259i,unique2=912i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=59i,twothousand=59i,fivethous=259i,tenthous=259i,odd=18i,even=19i,stringu1="ZJAAAA",stringu2="CJBAAA",string4="AAAAxx" 78883200000000000 +onek unique1=900i,unique2=913i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=100i,fivethous=400i,tenthous=900i,odd=0i,even=1i,stringu1="QIAAAA",stringu2="DJBAAA",string4="HHHHxx" 78969600000000000 +onek unique1=137i,unique2=914i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=37i,twothousand=137i,fivethous=137i,tenthous=137i,odd=14i,even=15i,stringu1="HFAAAA",stringu2="EJBAAA",string4="OOOOxx" 79056000000000000 +onek unique1=159i,unique2=915i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=59i,twothousand=159i,fivethous=159i,tenthous=159i,odd=18i,even=19i,stringu1="DGAAAA",stringu2="FJBAAA",string4="VVVVxx" 79142400000000000 +onek unique1=243i,unique2=916i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=43i,twothousand=43i,fivethous=243i,tenthous=243i,odd=6i,even=7i,stringu1="JJAAAA",stringu2="GJBAAA",string4="AAAAxx" 79228800000000000 +onek unique1=472i,unique2=917i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=72i,twothousand=72i,fivethous=472i,tenthous=472i,odd=4i,even=5i,stringu1="ESAAAA",stringu2="HJBAAA",string4="HHHHxx" 79315200000000000 +onek unique1=796i,unique2=918i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=96i,twothousand=196i,fivethous=296i,tenthous=796i,odd=12i,even=13i,stringu1="QEAAAA",stringu2="IJBAAA",string4="OOOOxx" 79401600000000000 +onek unique1=382i,unique2=919i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=82i,twothousand=182i,fivethous=382i,tenthous=382i,odd=4i,even=5i,stringu1="SOAAAA",stringu2="JJBAAA",string4="VVVVxx" 79488000000000000 +onek unique1=911i,unique2=920i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=11i,twothousand=111i,fivethous=411i,tenthous=911i,odd=2i,even=3i,stringu1="BJAAAA",stringu2="KJBAAA",string4="AAAAxx" 79574400000000000 +onek unique1=179i,unique2=921i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=79i,twothousand=179i,fivethous=179i,tenthous=179i,odd=18i,even=19i,stringu1="XGAAAA",stringu2="LJBAAA",string4="HHHHxx" 79660800000000000 +onek unique1=778i,unique2=922i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=78i,twothousand=178i,fivethous=278i,tenthous=778i,odd=16i,even=17i,stringu1="YDAAAA",stringu2="MJBAAA",string4="OOOOxx" 79747200000000000 +onek unique1=405i,unique2=923i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=5i,fivethous=405i,tenthous=405i,odd=10i,even=11i,stringu1="PPAAAA",stringu2="NJBAAA",string4="VVVVxx" 79833600000000000 +onek unique1=265i,unique2=924i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=65i,twothousand=65i,fivethous=265i,tenthous=265i,odd=10i,even=11i,stringu1="FKAAAA",stringu2="OJBAAA",string4="AAAAxx" 79920000000000000 +onek unique1=556i,unique2=925i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=56i,twothousand=156i,fivethous=56i,tenthous=556i,odd=12i,even=13i,stringu1="KVAAAA",stringu2="PJBAAA",string4="HHHHxx" 80006400000000000 +onek unique1=16i,unique2=926i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=16i,twothousand=16i,fivethous=16i,tenthous=16i,odd=12i,even=13i,stringu1="QAAAAA",stringu2="QJBAAA",string4="OOOOxx" 80092800000000000 +onek unique1=706i,unique2=927i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=106i,fivethous=206i,tenthous=706i,odd=12i,even=13i,stringu1="EBAAAA",stringu2="RJBAAA",string4="VVVVxx" 80179200000000000 +onek unique1=497i,unique2=928i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=97i,twothousand=97i,fivethous=497i,tenthous=497i,odd=14i,even=15i,stringu1="DTAAAA",stringu2="SJBAAA",string4="AAAAxx" 80265600000000000 +onek unique1=708i,unique2=929i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=108i,fivethous=208i,tenthous=708i,odd=16i,even=17i,stringu1="GBAAAA",stringu2="TJBAAA",string4="HHHHxx" 80352000000000000 +onek unique1=46i,unique2=930i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=46i,twothousand=46i,fivethous=46i,tenthous=46i,odd=12i,even=13i,stringu1="UBAAAA",stringu2="UJBAAA",string4="OOOOxx" 80438400000000000 +onek unique1=901i,unique2=931i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=101i,fivethous=401i,tenthous=901i,odd=2i,even=3i,stringu1="RIAAAA",stringu2="VJBAAA",string4="VVVVxx" 80524800000000000 +onek unique1=416i,unique2=932i,two=0i,four=0i,ten=6i,twenty=16i,hundred=6i,thousand=16i,twothousand=16i,fivethous=416i,tenthous=416i,odd=12i,even=13i,stringu1="AQAAAA",stringu2="WJBAAA",string4="AAAAxx" 80611200000000000 +onek unique1=307i,unique2=933i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=107i,fivethous=307i,tenthous=307i,odd=14i,even=15i,stringu1="VLAAAA",stringu2="XJBAAA",string4="HHHHxx" 80697600000000000 +onek unique1=166i,unique2=934i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=66i,twothousand=166i,fivethous=166i,tenthous=166i,odd=12i,even=13i,stringu1="KGAAAA",stringu2="YJBAAA",string4="OOOOxx" 80784000000000000 +onek unique1=178i,unique2=935i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=78i,twothousand=178i,fivethous=178i,tenthous=178i,odd=16i,even=17i,stringu1="WGAAAA",stringu2="ZJBAAA",string4="VVVVxx" 80870400000000000 +onek unique1=499i,unique2=936i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=99i,twothousand=99i,fivethous=499i,tenthous=499i,odd=18i,even=19i,stringu1="FTAAAA",stringu2="AKBAAA",string4="AAAAxx" 80956800000000000 +onek unique1=257i,unique2=937i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=57i,twothousand=57i,fivethous=257i,tenthous=257i,odd=14i,even=15i,stringu1="XJAAAA",stringu2="BKBAAA",string4="HHHHxx" 81043200000000000 +onek unique1=342i,unique2=938i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=42i,twothousand=142i,fivethous=342i,tenthous=342i,odd=4i,even=5i,stringu1="ENAAAA",stringu2="CKBAAA",string4="OOOOxx" 81129600000000000 +onek unique1=850i,unique2=939i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=50i,twothousand=50i,fivethous=350i,tenthous=850i,odd=0i,even=1i,stringu1="SGAAAA",stringu2="DKBAAA",string4="VVVVxx" 81216000000000000 +onek unique1=313i,unique2=940i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=13i,twothousand=113i,fivethous=313i,tenthous=313i,odd=6i,even=7i,stringu1="BMAAAA",stringu2="EKBAAA",string4="AAAAxx" 81302400000000000 +onek unique1=831i,unique2=941i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=31i,twothousand=31i,fivethous=331i,tenthous=831i,odd=2i,even=3i,stringu1="ZFAAAA",stringu2="FKBAAA",string4="HHHHxx" 81388800000000000 +onek unique1=57i,unique2=942i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=57i,twothousand=57i,fivethous=57i,tenthous=57i,odd=14i,even=15i,stringu1="FCAAAA",stringu2="GKBAAA",string4="OOOOxx" 81475200000000000 +onek unique1=37i,unique2=943i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=37i,twothousand=37i,fivethous=37i,tenthous=37i,odd=14i,even=15i,stringu1="LBAAAA",stringu2="HKBAAA",string4="VVVVxx" 81561600000000000 +onek unique1=511i,unique2=944i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=11i,twothousand=111i,fivethous=11i,tenthous=511i,odd=2i,even=3i,stringu1="RTAAAA",stringu2="IKBAAA",string4="AAAAxx" 81648000000000000 +onek unique1=578i,unique2=945i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=78i,twothousand=178i,fivethous=78i,tenthous=578i,odd=16i,even=17i,stringu1="GWAAAA",stringu2="JKBAAA",string4="HHHHxx" 81734400000000000 +onek unique1=100i,unique2=946i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=100i,fivethous=100i,tenthous=100i,odd=0i,even=1i,stringu1="WDAAAA",stringu2="KKBAAA",string4="OOOOxx" 81820800000000000 +onek unique1=935i,unique2=947i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=35i,twothousand=135i,fivethous=435i,tenthous=935i,odd=10i,even=11i,stringu1="ZJAAAA",stringu2="LKBAAA",string4="VVVVxx" 81907200000000000 +onek unique1=821i,unique2=948i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=21i,twothousand=21i,fivethous=321i,tenthous=821i,odd=2i,even=3i,stringu1="PFAAAA",stringu2="MKBAAA",string4="AAAAxx" 81993600000000000 +onek unique1=294i,unique2=949i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=94i,twothousand=94i,fivethous=294i,tenthous=294i,odd=8i,even=9i,stringu1="ILAAAA",stringu2="NKBAAA",string4="HHHHxx" 82080000000000000 +onek unique1=575i,unique2=950i,two=1i,four=3i,ten=5i,twenty=15i,hundred=5i,thousand=75i,twothousand=175i,fivethous=75i,tenthous=575i,odd=10i,even=11i,stringu1="DWAAAA",stringu2="OKBAAA",string4="OOOOxx" 82166400000000000 +onek unique1=272i,unique2=951i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=72i,twothousand=72i,fivethous=272i,tenthous=272i,odd=4i,even=5i,stringu1="MKAAAA",stringu2="PKBAAA",string4="VVVVxx" 82252800000000000 +onek unique1=491i,unique2=952i,two=1i,four=3i,ten=1i,twenty=11i,hundred=1i,thousand=91i,twothousand=91i,fivethous=491i,tenthous=491i,odd=2i,even=3i,stringu1="XSAAAA",stringu2="QKBAAA",string4="AAAAxx" 82339200000000000 +onek unique1=43i,unique2=953i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=43i,twothousand=43i,fivethous=43i,tenthous=43i,odd=6i,even=7i,stringu1="RBAAAA",stringu2="RKBAAA",string4="HHHHxx" 82425600000000000 +onek unique1=167i,unique2=954i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=67i,twothousand=167i,fivethous=167i,tenthous=167i,odd=14i,even=15i,stringu1="LGAAAA",stringu2="SKBAAA",string4="OOOOxx" 82512000000000000 +onek unique1=457i,unique2=955i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=57i,twothousand=57i,fivethous=457i,tenthous=457i,odd=14i,even=15i,stringu1="PRAAAA",stringu2="TKBAAA",string4="VVVVxx" 82598400000000000 +onek unique1=647i,unique2=956i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=47i,twothousand=47i,fivethous=147i,tenthous=647i,odd=14i,even=15i,stringu1="XYAAAA",stringu2="UKBAAA",string4="AAAAxx" 82684800000000000 +onek unique1=180i,unique2=957i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=80i,twothousand=180i,fivethous=180i,tenthous=180i,odd=0i,even=1i,stringu1="YGAAAA",stringu2="VKBAAA",string4="HHHHxx" 82771200000000000 +onek unique1=48i,unique2=958i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=48i,twothousand=48i,fivethous=48i,tenthous=48i,odd=16i,even=17i,stringu1="WBAAAA",stringu2="WKBAAA",string4="OOOOxx" 82857600000000000 +onek unique1=553i,unique2=959i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=53i,twothousand=153i,fivethous=53i,tenthous=553i,odd=6i,even=7i,stringu1="HVAAAA",stringu2="XKBAAA",string4="VVVVxx" 82944000000000000 +onek unique1=188i,unique2=960i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=88i,twothousand=188i,fivethous=188i,tenthous=188i,odd=16i,even=17i,stringu1="GHAAAA",stringu2="YKBAAA",string4="AAAAxx" 83030400000000000 +onek unique1=262i,unique2=961i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=62i,twothousand=62i,fivethous=262i,tenthous=262i,odd=4i,even=5i,stringu1="CKAAAA",stringu2="ZKBAAA",string4="HHHHxx" 83116800000000000 +onek unique1=728i,unique2=962i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=28i,twothousand=128i,fivethous=228i,tenthous=728i,odd=16i,even=17i,stringu1="ACAAAA",stringu2="ALBAAA",string4="OOOOxx" 83203200000000000 +onek unique1=581i,unique2=963i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=81i,twothousand=181i,fivethous=81i,tenthous=581i,odd=2i,even=3i,stringu1="JWAAAA",stringu2="BLBAAA",string4="VVVVxx" 83289600000000000 +onek unique1=937i,unique2=964i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=37i,twothousand=137i,fivethous=437i,tenthous=937i,odd=14i,even=15i,stringu1="BKAAAA",stringu2="CLBAAA",string4="AAAAxx" 83376000000000000 +onek unique1=370i,unique2=965i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=70i,twothousand=170i,fivethous=370i,tenthous=370i,odd=0i,even=1i,stringu1="GOAAAA",stringu2="DLBAAA",string4="HHHHxx" 83462400000000000 +onek unique1=590i,unique2=966i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=90i,twothousand=190i,fivethous=90i,tenthous=590i,odd=0i,even=1i,stringu1="SWAAAA",stringu2="ELBAAA",string4="OOOOxx" 83548800000000000 +onek unique1=421i,unique2=967i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=21i,twothousand=21i,fivethous=421i,tenthous=421i,odd=2i,even=3i,stringu1="FQAAAA",stringu2="FLBAAA",string4="VVVVxx" 83635200000000000 +onek unique1=693i,unique2=968i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=93i,twothousand=93i,fivethous=193i,tenthous=693i,odd=6i,even=7i,stringu1="RAAAAA",stringu2="GLBAAA",string4="AAAAxx" 83721600000000000 +onek unique1=906i,unique2=969i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=106i,fivethous=406i,tenthous=906i,odd=12i,even=13i,stringu1="WIAAAA",stringu2="HLBAAA",string4="HHHHxx" 83808000000000000 +onek unique1=802i,unique2=970i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=2i,fivethous=302i,tenthous=802i,odd=4i,even=5i,stringu1="WEAAAA",stringu2="ILBAAA",string4="OOOOxx" 83894400000000000 +onek unique1=38i,unique2=971i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=38i,twothousand=38i,fivethous=38i,tenthous=38i,odd=16i,even=17i,stringu1="MBAAAA",stringu2="JLBAAA",string4="VVVVxx" 83980800000000000 +onek unique1=790i,unique2=972i,two=0i,four=2i,ten=0i,twenty=10i,hundred=0i,thousand=90i,twothousand=190i,fivethous=290i,tenthous=790i,odd=0i,even=1i,stringu1="KEAAAA",stringu2="KLBAAA",string4="AAAAxx" 84067200000000000 +onek unique1=726i,unique2=973i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=26i,twothousand=126i,fivethous=226i,tenthous=726i,odd=12i,even=13i,stringu1="YBAAAA",stringu2="LLBAAA",string4="HHHHxx" 84153600000000000 +onek unique1=23i,unique2=974i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=23i,twothousand=23i,fivethous=23i,tenthous=23i,odd=6i,even=7i,stringu1="XAAAAA",stringu2="MLBAAA",string4="OOOOxx" 84240000000000000 +onek unique1=641i,unique2=975i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=41i,twothousand=41i,fivethous=141i,tenthous=641i,odd=2i,even=3i,stringu1="RYAAAA",stringu2="NLBAAA",string4="VVVVxx" 84326400000000000 +onek unique1=524i,unique2=976i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=24i,twothousand=124i,fivethous=24i,tenthous=524i,odd=8i,even=9i,stringu1="EUAAAA",stringu2="OLBAAA",string4="AAAAxx" 84412800000000000 +onek unique1=169i,unique2=977i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=69i,twothousand=169i,fivethous=169i,tenthous=169i,odd=18i,even=19i,stringu1="NGAAAA",stringu2="PLBAAA",string4="HHHHxx" 84499200000000000 +onek unique1=6i,unique2=978i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=6i,fivethous=6i,tenthous=6i,odd=12i,even=13i,stringu1="GAAAAA",stringu2="QLBAAA",string4="OOOOxx" 84585600000000000 +onek unique1=943i,unique2=979i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=43i,twothousand=143i,fivethous=443i,tenthous=943i,odd=6i,even=7i,stringu1="HKAAAA",stringu2="RLBAAA",string4="VVVVxx" 84672000000000000 +onek unique1=26i,unique2=980i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=26i,twothousand=26i,fivethous=26i,tenthous=26i,odd=12i,even=13i,stringu1="ABAAAA",stringu2="SLBAAA",string4="AAAAxx" 84758400000000000 +onek unique1=469i,unique2=981i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=69i,twothousand=69i,fivethous=469i,tenthous=469i,odd=18i,even=19i,stringu1="BSAAAA",stringu2="TLBAAA",string4="HHHHxx" 84844800000000000 +onek unique1=968i,unique2=982i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=68i,twothousand=168i,fivethous=468i,tenthous=968i,odd=16i,even=17i,stringu1="GLAAAA",stringu2="ULBAAA",string4="OOOOxx" 84931200000000000 +onek unique1=947i,unique2=983i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=47i,twothousand=147i,fivethous=447i,tenthous=947i,odd=14i,even=15i,stringu1="LKAAAA",stringu2="VLBAAA",string4="VVVVxx" 85017600000000000 +onek unique1=133i,unique2=984i,two=1i,four=1i,ten=3i,twenty=13i,hundred=3i,thousand=33i,twothousand=133i,fivethous=133i,tenthous=133i,odd=6i,even=7i,stringu1="DFAAAA",stringu2="WLBAAA",string4="AAAAxx" 85104000000000000 +onek unique1=52i,unique2=985i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=52i,twothousand=52i,fivethous=52i,tenthous=52i,odd=4i,even=5i,stringu1="ACAAAA",stringu2="XLBAAA",string4="HHHHxx" 85190400000000000 +onek unique1=660i,unique2=986i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=60i,twothousand=60i,fivethous=160i,tenthous=660i,odd=0i,even=1i,stringu1="KZAAAA",stringu2="YLBAAA",string4="OOOOxx" 85276800000000000 +onek unique1=780i,unique2=987i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=80i,twothousand=180i,fivethous=280i,tenthous=780i,odd=0i,even=1i,stringu1="AEAAAA",stringu2="ZLBAAA",string4="VVVVxx" 85363200000000000 +onek unique1=963i,unique2=988i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=63i,twothousand=163i,fivethous=463i,tenthous=963i,odd=6i,even=7i,stringu1="BLAAAA",stringu2="AMBAAA",string4="AAAAxx" 85449600000000000 +onek unique1=561i,unique2=989i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=61i,twothousand=161i,fivethous=61i,tenthous=561i,odd=2i,even=3i,stringu1="PVAAAA",stringu2="BMBAAA",string4="HHHHxx" 85536000000000000 +onek unique1=402i,unique2=990i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=2i,fivethous=402i,tenthous=402i,odd=4i,even=5i,stringu1="MPAAAA",stringu2="CMBAAA",string4="OOOOxx" 85622400000000000 +onek unique1=437i,unique2=991i,two=1i,four=1i,ten=7i,twenty=17i,hundred=7i,thousand=37i,twothousand=37i,fivethous=437i,tenthous=437i,odd=14i,even=15i,stringu1="VQAAAA",stringu2="DMBAAA",string4="VVVVxx" 85708800000000000 +onek unique1=112i,unique2=992i,two=0i,four=0i,ten=2i,twenty=12i,hundred=2i,thousand=12i,twothousand=112i,fivethous=112i,tenthous=112i,odd=4i,even=5i,stringu1="IEAAAA",stringu2="EMBAAA",string4="AAAAxx" 85795200000000000 +onek unique1=247i,unique2=993i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=47i,twothousand=47i,fivethous=247i,tenthous=247i,odd=14i,even=15i,stringu1="NJAAAA",stringu2="FMBAAA",string4="HHHHxx" 85881600000000000 +onek unique1=579i,unique2=994i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=79i,twothousand=179i,fivethous=79i,tenthous=579i,odd=18i,even=19i,stringu1="HWAAAA",stringu2="GMBAAA",string4="OOOOxx" 85968000000000000 +onek unique1=379i,unique2=995i,two=1i,four=3i,ten=9i,twenty=19i,hundred=9i,thousand=79i,twothousand=179i,fivethous=379i,tenthous=379i,odd=18i,even=19i,stringu1="POAAAA",stringu2="HMBAAA",string4="VVVVxx" 86054400000000000 +onek unique1=74i,unique2=996i,two=0i,four=2i,ten=4i,twenty=14i,hundred=4i,thousand=74i,twothousand=74i,fivethous=74i,tenthous=74i,odd=8i,even=9i,stringu1="WCAAAA",stringu2="IMBAAA",string4="AAAAxx" 86140800000000000 +onek unique1=744i,unique2=997i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=44i,twothousand=144i,fivethous=244i,tenthous=744i,odd=8i,even=9i,stringu1="QCAAAA",stringu2="JMBAAA",string4="HHHHxx" 86227200000000000 +onek unique1=0i,unique2=998i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=0i,fivethous=0i,tenthous=0i,odd=0i,even=1i,stringu1="AAAAAA",stringu2="KMBAAA",string4="OOOOxx" 86313600000000000 +onek unique1=278i,unique2=999i,two=0i,four=2i,ten=8i,twenty=18i,hundred=8i,thousand=78i,twothousand=78i,fivethous=278i,tenthous=278i,odd=16i,even=17i,stringu1="SKAAAA",stringu2="LMBAAA",string4="VVVVxx" 86400000000000000 diff --git a/init_v2/option.txt b/init_v2/option.txt new file mode 100644 index 0000000..105be16 --- /dev/null +++ b/init_v2/option.txt @@ -0,0 +1,12 @@ +# DDL +# DROP DATABASE optiondb +# CREATE DATABASE optiondb + +# DML +# CONTEXT-DATABASE: optiondb + +optiontbl,tag1=a version="version 2",value2=100 0 +optiontbl,tag1=a version="version 2",value2=200 1 +optiontbl,tag1=a version="version 2",value2=300 2 +optiontbl,tag1=b version="version 2",value2=400 3 +optiontbl,tag1=b version="version 2",value2=500 4 diff --git a/init_v2/others.txt b/init_v2/others.txt new file mode 100644 index 0000000..184e8f9 --- /dev/null +++ b/init_v2/others.txt @@ -0,0 +1,238 @@ +# DDL +# DROP DATABASE coredb +# CREATE DATABASE coredb + +# DML +# CONTEXT-DATABASE: coredb + +int2_tbl f1=0i 0000000000000000001 +int2_tbl f1=1234i 0000000000000000002 +int2_tbl f1=-1234i 0000000000000000003 +int2_tbl f1=35i 0000000000000000004 +int2_tbl f1=32767i 0000000000000000005 +int2_tbl f1=-32767i 0000000000000000006 + +int4_tbl f1=0i 0000000000000000001 +int4_tbl f1=123456i 0000000000000000002 +int4_tbl f1=-123456i 0000000000000000003 +int4_tbl f1=2147483647i 0000000000000000005 +int4_tbl f1=-2147483647i 0000000000000000006 + +int8_tbl q1=123i,q2=456i 0000000000000000001 +int8_tbl q1=123i,q2=4567890123456789i 0000000000000000002 +int8_tbl q1=4567890123456789i,q2=123i 0000000000000000003 +int8_tbl q1=4567890123456789i,q2=4567890123456789i 0000000000000000004 +int8_tbl q1=4567890123456789i,q2=-4567890123456789i 0000000000000000005 + +text_tbl f1="doh!" 0000000000000000001 +text_tbl f1="hi de ho neighbor" 0000000000000000002 + +bitwise_test i2=1i,i4=1i,i8=1i,i=1i,x=1i,y="0101" 0000000000000000001 +bitwise_test i2=3i,i4=3i,i8=3i,x=2i,y="0100" 0000000000000000002 +bitwise_test i2=7i,i4=7i,i8=7i,i=3i,x=4i,y="1100" 0000000000000000003 + +bool_test b1=true,b3=false 0000000000000000001 +bool_test b1=false,b2=true 0000000000000000002 +bool_test b2=true,b3=false 0000000000000000003 + +varchar_tbl f1="a" 0000000000000000001 +varchar_tbl f1="ab" 0000000000000000002 +varchar_tbl f1="abcd" 0000000000000000003 + +multi_arg_agg a=1i,b=3i,c="foo" 0000000000000000001 +multi_arg_agg a=0i 0000000000000000002 +multi_arg_agg a=2i,b=2i,c="bar" 0000000000000000003 +multi_arg_agg a=3i,b=1i,c="baz" 0000000000000000004 + +multi_arg_agg2 a=1i,b=3i,c="foo" 0000000000000000001 +multi_arg_agg2 a=0i 0000000000000000002 +multi_arg_agg2 a=2i,b=2i,c="bar" 0000000000000000003 +multi_arg_agg2 a=3i,b=1i,c="baz" 0000000000000000004 +multi_arg_agg2 a=1i,b=1i,c="foo" 0000000000000000005 + +multi_arg_agg3 a=1i,b=3i,c="foo" 0000000000000000001 +multi_arg_agg3 a=0i 0000000000000000002 +multi_arg_agg3 a=2i,b=2i,c="bar" 0000000000000000003 +multi_arg_agg3 a=3i,b=1i,c="baz" 0000000000000000004 + +float8_tbl f1=0 0000000000000000001 +float8_tbl f1=0.1 0000000000000000002 +float8_tbl f1=0.25 0000000000000000003 +float8_tbl f1=0.4 0000000000000000004 +float8_tbl f1=0.5 0000000000000000005 +float8_tbl f1=0.6 0000000000000000006 +float8_tbl f1=0.75 0000000000000000007 +float8_tbl f1=0.9 0000000000000000008 +float8_tbl f1=1 0000000000000000009 + +int4_tbl2 f1=1i 0000000000000000001 +int4_tbl2 f1=2i 0000000000000000002 +int4_tbl2 f1=1i 0000000000000000003 +int4_tbl2 f1=3i 0000000000000000004 +int4_tbl2 f1=2i 0000000000000000005 + +int4_tbl3 f1=1i 0000000000000000001 +int4_tbl3 f1=1i 0000000000000000002 +int4_tbl3 f1=2i 0000000000000000003 +int4_tbl3 f1=2i 0000000000000000004 +int4_tbl3 f1=3i 0000000000000000005 +int4_tbl3 f1=3i 0000000000000000006 +int4_tbl3 f1=4i 0000000000000000007 + +int4_tbl4 f1=1i 0000000000000000001 +int4_tbl4 f1=1i 0000000000000000002 +int4_tbl4 f1=2i 0000000000000000003 +int4_tbl4 f1=2i 0000000000000000004 +int4_tbl4 f1=3i 0000000000000000005 +int4_tbl4 f1=3i 0000000000000000006 +int4_tbl4 f1=4i 0000000000000000007 +int4_tbl4 f1=5i 0000000000000000008 + +int8_tbl2 q1=1i,q2=4i 0000000000000000001 +int8_tbl2 q1=2i,q2=3i 0000000000000000002 +int8_tbl2 q1=3i,q2=1i 0000000000000000003 +int8_tbl2 q1=4i,q2=2i 0000000000000000004 + + +# For test aggregates.sql + +string_agg1 a1="aaaa",a2="" 0000000000000000001 +string_agg1 a1="bbbb",a2="" 0000000000000000002 +string_agg1 a1="cccc",a2="" 0000000000000000003 + +string_agg2 a1="aaaa",a2="" 0000000000000000001 +string_agg2 a2="bbbb" 0000000000000000002 +string_agg2 a1="bbbb",a2="" 0000000000000000003 +string_agg2 a1="cccc",a2="" 0000000000000000004 + +string_agg3 a2="aaaa" 0000000000000000001 +string_agg3 a2="bbbb" 0000000000000000002 +string_agg3 a1="bbbb",a2="" 0000000000000000003 +string_agg3 a1="cccc",a2="" 0000000000000000004 + +string_agg4 a2="aaaa" 0000000000000000001 +string_agg4 a2="bbbb" 0000000000000000002 + +generate_series1 a=1i 00000000000001 +generate_series1 a=2i 00000000000002 +generate_series1 a=3i 00000000000003 + +infinite1 id=1i,x="1" 00000000000001 +infinite1 id=1i,x="infinity" 00000000000002 +infinite1 id=2i,x="infinity" 00000000000003 +infinite1 id=2i,x="1" 00000000000004 +infinite1 id=3i,x="infinity" 00000000000005 +infinite1 id=3i,x="infinity" 00000000000006 +infinite1 id=4i,x="-infinity" 00000000000007 +infinite1 id=4i,x="infinity" 00000000000008 +infinite1 id=5i,x="-infinity" 00000000000009 +infinite1 id=5i,x="-infinity" 00000000000010 + +large_input1 id=1i,x=100000003 00000000000001 +large_input1 id=1i,x=100000004 00000000000002 +large_input1 id=1i,x=100000006 00000000000003 +large_input1 id=1i,x=100000007 00000000000004 +large_input1 id=2i,x=7000000000005 00000000000005 +large_input1 id=2i,x=7000000000007 00000000000006 + +regr_test x=10,y=150 00000000000001 +regr_test x=20,y=250 00000000000002 +regr_test x=30,y=350 00000000000003 +regr_test x=80,y=540 00000000000004 +regr_test x=100,y=200 00000000000005 + +float8_arr id=1i,x="{4,140,2900}" 00000000000001 +float8_arr id=2i,x="{4,140,2900,1290,83075,15050}" 00000000000002 +float8_arr id=3i,x="{3,60,200}",y="{0,0,0}" 00000000000003 +float8_arr id=4i,x="{0,0,0}",y="{2,180,200}" 00000000000004 +float8_arr id=5i,x="{3,60,200}",y="{2,180,200}" 00000000000005 +float8_arr id=6i,x="{3,60,200,750,20000,2000}",y="{0,0,0,0,0,0}" 00000000000006 +float8_arr id=7i,x="{0,0,0,0,0,0}",y="{2,180,200,740,57800,-3400}" 00000000000007 +float8_arr id=8i,x="{3,60,200,750,20000,2000}",y="{2,180,200,740,57800,-3400}" 00000000000008 + +boolean1 x2=TRUE,x3=FALSE,y4=TRUE,y5=FALSE,x6=TRUE,y6=TRUE,x7=FALSE,y7=TRUE,x8=FALSE,y8=TRUE,x9=FALSE,y9=FALSE 00000000000001 + +generate_series2 a=1i 00000000000001 +generate_series2 a=2i 00000000000002 +generate_series2 a=3i 00000000000003 +generate_series2 a=4i 00000000000004 +generate_series2 a=5i 00000000000005 +generate_series2 a=6i 00000000000006 + +percentile_disc1 x="{fred,jim,fred,jack,jill,fred,jill,jim,jim,sheila,jim,sheila}" 00000000000001 + +pg_collation1 x="fred" 00000000000001 +pg_collation1 x="jim" 00000000000002 + +test_rank1 x=1i 00000000000001 +test_rank1 x=1i 00000000000002 +test_rank1 x=2i 00000000000003 +test_rank1 x=2i 00000000000004 +test_rank1 x=3i 00000000000005 +test_rank1 x=3i 00000000000006 +test_rank1 x=4i 00000000000007 + +generate_series3 x=1i 00000000000001 +generate_series3 x=2i 00000000000002 +generate_series3 x=3i 00000000000003 +generate_series3 x=4i 00000000000004 +generate_series3 x=5i 00000000000005 +generate_series3 x=6i 00000000000006 +generate_series3 x=7i 00000000000007 + +my_avg1 one=1i 00000000000001 +my_avg1 one=3i 00000000000002 + +my_avg2 one=1i,two=2i 00000000000001 +my_avg2 one=3i,two=4i 00000000000002 + +percentile_cont1 a=1i 00000000000001 +percentile_cont1 a=3i 00000000000002 +percentile_cont1 a=5i 00000000000003 +percentile_cont1 a=7i 00000000000004 + +my_sum1 one=1i 00000000000001 +my_sum1 one=2i 00000000000002 +my_sum1 one=3i 00000000000003 +my_sum1 one=4i 00000000000004 + +dense_rank1 x=1i 00000000000001 +dense_rank1 x=1i 00000000000002 +dense_rank1 x=2i 00000000000003 +dense_rank1 x=2i 00000000000004 +dense_rank1 x=3i 00000000000005 +dense_rank1 x=3i 00000000000006 + +agg_t5 id=1i,a="1.0",b="2.0" 00000000000001 +agg_t5 id=2i,a="3.0",b="4.0" 00000000000002 +agg_t5 id=3i,a="inf",b="inf" 00000000000003 +agg_t5 id=4i,a="nan",b="nan" 00000000000004 + +agg_t4 id=1i,a="1",b="2",c="3",d="4" 00000000000001 +agg_t4 id=2i,a="1",b="inf",c="3",d="inf" 00000000000002 +agg_t4 id=3i,a="1",b="nan",c="3",d="nan" 00000000000003 + + +# End for test aggregates.sql + + +# For test limit.sql + +generate_series4 a=1i 1 +generate_series4 a=2i 2 +generate_series4 a=3i 3 +generate_series4 a=4i 4 +generate_series4 a=5i 5 +generate_series4 a=6i 6 +generate_series4 a=7i 7 +generate_series4 a=8i 8 +generate_series4 a=9i 9 +generate_series4 a=10i 10 + +# End for test limit.sql + +# For test prepare.sql + +road_tmp a=1i,b=2i 1 + +# End for test prepare.sql diff --git a/init_v2/person.txt b/init_v2/person.txt new file mode 100644 index 0000000..787eac5 --- /dev/null +++ b/init_v2/person.txt @@ -0,0 +1,53 @@ +# DML +# CONTEXT-DATABASE: coredb + +person name="mike",age=40i,location="(3.1,6.2)" 86400000000000 +person name="joe",age=20i,location="(5.5,2.5)" 172800000000000 +person name="sally",age=34i,location="(3.8,45.8)" 259200000000000 +person name="sandra",age=19i,location="(9.345,09.6)" 345600000000000 +person name="alex",age=30i,location="(1.352,8.2)" 432000000000000 +person name="sue",age=50i,location="(8.34,7.375)" 518400000000000 +person name="denise",age=24i,location="(3.78,87.90)" 604800000000000 +person name="sarah",age=88i,location="(8.4,2.3)" 691200000000000 +person name="teresa",age=38i,location="(7.7,1.8)" 777600000000000 +person name="nan",age=28i,location="(6.35,0.43)" 864000000000000 +person name="leah",age=68i,location="(0.6,3.37)" 950400000000000 +person name="wendy",age=78i,location="(2.62,03.3)" 1036800000000000 +person name="melissa",age=28i,location="(3.089,087.23)" 1123200000000000 +person name="joan",age=18i,location="(9.4,47.04)" 1209600000000000 +person name="mary",age=08i,location="(3.7,39.20)" 1296000000000000 +person name="jane",age=58i,location="(1.34,0.44)" 1382400000000000 +person name="liza",age=38i,location="(9.76,6.90)" 1468800000000000 +person name="jean",age=28i,location="(8.561,7.3)" 1555200000000000 +person name="jenifer",age=38i,location="(6.6,23.3)" 1641600000000000 +person name="juanita",age=58i,location="(4.57,35.8)" 1728000000000000 +person name="susan",age=78i,location="(6.579,3)" 1814400000000000 +person name="zena",age=98i,location="(0.35,0)" 1900800000000000 +person name="martie",age=88i,location="(8.358,.93)" 1987200000000000 +person name="chris",age=78i,location="(9.78,2)" 2073600000000000 +person name="pat",age=18i,location="(1.19,0.6)" 2160000000000000 +person name="zola",age=58i,location="(2.56,4.3)" 2246400000000000 +person name="louise",age=98i,location="(5.0,8.7)" 2332800000000000 +person name="edna",age=18i,location="(1.53,3.5)" 2419200000000000 +person name="bertha",age=88i,location="(2.75,9.4)" 2505600000000000 +person name="sumi",age=38i,location="(1.15,0.6)" 2592000000000000 +person name="koko",age=88i,location="(1.7,5.5)" 2678400000000000 +person name="gina",age=18i,location="(9.82,7.5)" 2764800000000000 +person name="rean",age=48i,location="(8.5,5.0)" 2851200000000000 +person name="sharon",age=78i,location="(9.237,8.8)" 2937600000000000 +person name="paula",age=68i,location="(0.5,0.5)" 3024000000000000 +person name="julie",age=68i,location="(3.6,7.2)" 3110400000000000 +person name="belinda",age=38i,location="(8.9,1.7)" 3196800000000000 +person name="karen",age=48i,location="(8.73,0.0)" 3283200000000000 +person name="carina",age=58i,location="(4.27,8.8)" 3369600000000000 +person name="diane",age=18i,location="(5.912,5.3)" 3456000000000000 +person name="esther",age=98i,location="(5.36,7.6)" 3542400000000000 +person name="trudy",age=88i,location="(6.01,0.5)" 3628800000000000 +person name="fanny",age=08i,location="(1.2,0.9)" 3715200000000000 +person name="carmen",age=78i,location="(3.8,8.2)" 3801600000000000 +person name="lita",age=25i,location="(1.3,8.7)" 3888000000000000 +person name="pamela",age=48i,location="(8.21,9.3)" 3974400000000000 +person name="sandy",age=38i,location="(3.8,0.2)" 4060800000000000 +person name="trisha",age=88i,location="(1.29,2.2)" 4147200000000000 +person name="uma",age=78i,location="(9.73,6.4)" 4233600000000000 +person name="velma",age=68i,location="(8.8,8.9)" 4320000000000000 diff --git a/init_v2/schemaless.txt b/init_v2/schemaless.txt new file mode 100644 index 0000000..5aea40d --- /dev/null +++ b/init_v2/schemaless.txt @@ -0,0 +1,46 @@ +# DDL +# DROP DATABASE schemalessdb +# CREATE DATABASE schemalessdb + +# DML +# CONTEXT-DATABASE: schemalessdb + +sc1,device_id=dev1 sig1=1i,sig2="a",sig3=1.1,sig4=true 0 +sc1,device_id=dev2 sig1=2i,sig2="b",sig3=1.2,sig4=false 0 +sc1,device_id=dev3 sig1=3i,sig2="c",sig3=1.3,sig4=false 0 +sc1,device_id=dev1 sig1=4i,sig2="d",sig3=2.4,sig4=true 1 +sc1,device_id=dev2 sig1=5i,sig2="e",sig3=2.5,sig4=false 1 +sc1,device_id=dev3 sig1=6i,sig2="f",sig3=2.6,sig4=false 1 +sc1,device_id=dev1 sig1=7i,sig2="g",sig3=3.7,sig4=true 2 +sc1,device_id=dev2 sig1=8i,sig2="h",sig3=3.8,sig4=false 2 +sc1,device_id=dev3 sig1=9i,sig2="i",sig3=3.9,sig4=false 2 + +sc2,device_id=dev1 sig1=10i,sig2="a",sig3=10.1,sig4=true 0 +sc2,device_id=dev2 sig1=20i,sig2="b",sig3=10.2,sig4=false 0 +sc2,device_id=dev3 sig1=30i,sig2="c",sig3=10.3,sig4=false 0 +sc2,device_id=dev1 sig1=40i,sig2="d",sig3=20.4,sig4=true 1 +sc2,device_id=dev2 sig1=50i,sig2="e",sig3=20.5,sig4=false 1 +sc2,device_id=dev3 sig1=60i,sig2="f",sig3=20.6,sig4=false 1 +sc2,device_id=dev1 sig1=70i,sig2="g",sig3=30.7,sig4=true 2 +sc2,device_id=dev2 sig1=80i,sig2="h",sig3=30.8,sig4=false 2 +sc2,device_id=dev3 sig1=90i,sig2="i",sig3=30.9,sig4=false 2 + +sc3,device_id=dev1,sid=id1 sig1=10i,sig2="a",sig3=10.1,sig4=true 0 +sc3,device_id=dev2,sid=id1 sig1=20i,sig2="b",sig3=10.2,sig4=false 0 +sc3,device_id=dev3,sid=id1 sig1=30i,sig2="c",sig3=10.3,sig4=false 0 +sc3,device_id=dev1,sid=id2 sig1=40i,sig2="d",sig3=20.4,sig4=true 1 +sc3,device_id=dev2,sid=id2 sig1=50i,sig2="e",sig3=20.5,sig4=false 1 +sc3,device_id=dev3,sid=id2 sig1=60i,sig2="f",sig3=20.6,sig4=false 1 +sc3,device_id=dev1,sid=id3 sig1=70i,sig2="g",sig3=30.7,sig4=true 2 +sc3,device_id=dev2,sid=id3 sig1=80i,sig2="h",sig3=30.8,sig4=false 2 +sc3,device_id=dev3,sid=id3 sig1=90i,sig2="i",sig3=30.9,sig4=false 2 + +sc4,device_id=dev1 sig1=10i,sig2="a",sig3=10.1,sig4=true,sig=1 0 +sc4,device_id=dev2 sig1=20i,sig2="b",sig3=10.2,sig4=false,sig=2 0 +sc4,device_id=dev3 sig1=30i,sig2="c",sig3=10.3,sig4=false,sig=3 0 +sc4,device_id=dev1 sig1=40i,sig2="d",sig3=20.4,sig4=true 1 +sc4,device_id=dev2 sig1=50i,sig2="e",sig3=20.5,sig4=false 1 +sc4,device_id=dev3 sig1=60i,sig2="f",sig3=20.6,sig4=false 1 +sc4,device_id=dev1 sig1=70i,sig2="g",sig3=30.7,sig4=true 2 +sc4,device_id=dev2 sig1=80i,sig2="h",sig3=30.8,sig4=false 2 +sc4,device_id=dev3 sig1=90i,sig2="i",sig3=30.9,sig4=false 2 diff --git a/init_v2/select.txt b/init_v2/select.txt new file mode 100644 index 0000000..5bc019b --- /dev/null +++ b/init_v2/select.txt @@ -0,0 +1,8 @@ +# DML +# CONTEXT-DATABASE: coredb + +foo f1=42i 0000000000000000001 +foo f1=3i 0000000000000000002 +foo f1=10i 0000000000000000003 +foo f1=7i 0000000000000000004 +foo f1=1i 0000000000000000005 diff --git a/init_v2/selectfunc.txt b/init_v2/selectfunc.txt new file mode 100644 index 0000000..7850fbd --- /dev/null +++ b/init_v2/selectfunc.txt @@ -0,0 +1,20 @@ +# DDL +# DROP DATABASE mydb2 +# CREATE DATABASE mydb2 + +# DML +# CONTEXT-DATABASE: mydb2 + +s3,tag1=a value1=0.1,value2=100i,value3=-0.1,value4=-100i 0 +s3,tag1=a value1=0.2,value2=100i,value3=-0.2,value4=-100i 1 +s3,tag1=a value1=0.3,value2=100i,value3=-0.3,value4=-100i 2 +s3,tag1=b value1=1.1,value2=200i,value3=-1.1,value4=-200i 3 +s3,tag1=b value1=2.2,value2=200i,value3=-2.2,value4=-200i 4 +s3,tag1=b value1=3.3,value2=200i,value3=-3.3,value4=-200i 5 + +b3,tag1=a value1=0.1,value2=100i,value3=true 0 +b3,tag1=a value1=0.2,value2=100i,value3=false 1 +b3,tag1=a value1=0.3,value2=100i,value3=true 2 +b3,tag1=b value1=1.1,value2=200i,value3=false 3 +b3,tag1=b value1=2.2,value2=200i,value3=true 4 +b3,tag1=b value1=3.3,value2=200i,value3=false 5 diff --git a/init_v2/streets.txt b/init_v2/streets.txt new file mode 100644 index 0000000..a741e4d --- /dev/null +++ b/init_v2/streets.txt @@ -0,0 +1,5127 @@ +# DML +# CONTEXT-DATABASE: coredb + +road name="A St ",thepath="[(-122.0265,37.049),(-122.0271,37.045)]" 86400000000000 +road name="A St ",thepath="[(-122.089,37.71),(-122.0886,37.711)]" 172800000000000 +road name="A St ",thepath="[(-122.0985,37.671),(-122.0981,37.674)]" 259200000000000 +road name="A St ",thepath="[(-122.0991,37.668),(-122.0988,37.669)]" 345600000000000 +road name="A St ",thepath="[(-122.103419,37.667),(-122.103439,37.667)]" 432000000000000 +road name="A St ",thepath="[(-122.103913,37.66632),(-122.104037,37.66611),(-122.104051,37.66609)]" 518400000000000 +road name="A St ",thepath="[(-122.106469,37.66446),(-122.1067,37.664)]" 604800000000000 +road name="A St ",thepath="[(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)]" 691200000000000 +road name="A St ",thepath="[(-122.1172,37.659),(-122.119506,37.65661)]" 777600000000000 +road name="Abbie St ",thepath="[(-121.867486,37.54243),(-121.868,37.545)]" 864000000000000 +road name="Acacia Ave ",thepath="[(-122.2353,37.457),(-122.2344,37.461)]" 950400000000000 +road name="Acacia Ave ",thepath="[(-122.2364,37.436),(-122.2364,37.443)]" 1036800000000000 +road name="Acacia Ave ",thepath="[(-122.2415,37.435),(-122.2407,37.437)]" 1123200000000000 +road name="Acadia Ct ",thepath="[(-121.9007,37.773),(-121.9016,37.768)]" 1209600000000000 +road name="Acapulco Way ",thepath="[(-122.0517,37.91),(-122.0519,37.911)]" 1296000000000000 +road name="Access Rd 162 ",thepath="[(-121.9469,37.993),(-121.9475,37.993)]" 1382400000000000 +road name="Access Rd 25 ",thepath="[(-121.9283,37.894),(-121.9283,37.9)]" 1468800000000000 +road name="Access Rd 29 ",thepath="[(-121.9339,37.854),(-121.9343,37.85)]" 1555200000000000 +road name="Acton Cir ",thepath="[(-122.2824,37.681),(-122.2824,37.688)]" 1641600000000000 +road name="Ada St ",thepath="[(-122.2487,37.398),(-122.2496,37.401)]" 1728000000000000 +road name="Ada St ",thepath="[(-122.2807,37.807),(-122.2797,37.811)]" 1814400000000000 +road name="Adams Ave ",thepath="[(-121.742,37.829),(-121.742,37.822)]" 1900800000000000 +road name="Adams Ave ",thepath="[(-122.1906,37.253),(-122.1893,37.272)]" 1987200000000000 +road name="Adams St ",thepath="[(-122.2349,37.542),(-122.2341,37.537)]" 2073600000000000 +road name="Adams St ",thepath="[(-122.2364,37.553),(-122.2357,37.548)]" 2160000000000000 +road name="Adason Dr ",thepath="[(-122.1315,37.016),(-122.1288,37.009)]" 2246400000000000 +road name="Addison St ",thepath="[(-122.2735,37.705),(-122.2722,37.707)]" 2332800000000000 +road name="Addison St ",thepath="[(-122.2856,37.688),(-122.2854,37.689)]" 2419200000000000 +road name="Addison St ",thepath="[(-122.2874,37.686),(-122.2864,37.688)]" 2505600000000000 +road name="Addison Way ",thepath="[(-121.9044,37.881),(-121.9044,37.889)]" 2592000000000000 +road name="Addison Way ",thepath="[(-121.9044,37.895),(-121.9044,37.899)]" 2678400000000000 +road name="Adelina Common ",thepath="[(-121.925847,37.29985),(-121.925765,37.29493)]" 2764800000000000 +road name="Adeline St ",thepath="[(-122.2728,37.442),(-122.2725,37.451)]" 2851200000000000 +road name="Adeline St ",thepath="[(-122.2785,37.291),(-122.2783,37.296)]" 2937600000000000 +road name="Adelle St ",thepath="[(-121.7793,37.841),(-121.7797,37.849)]" 3024000000000000 +road name="Admirality Lane",thepath="[(-122.2424,37.323),(-122.2429,37.318)]" 3110400000000000 +road name="Adobe Dr ",thepath="[(-122.0304,37.579),(-122.0278,37.592)]" 3196800000000000 +road name="Adrian Ave ",thepath="[(-122.1019,37.389),(-122.1019,37.369)]" 3283200000000000 +road name="Adriano St ",thepath="[(-122.032,37.663),(-122.0312,37.653)]" 3369600000000000 +road name="Agate Ct ",thepath="[(-121.801,37.653),(-121.8008,37.649)]" 3456000000000000 +road name="Agena Cir ",thepath="[(-122.0694,37.847),(-122.0696,37.839)]" 3542400000000000 +road name="Agua Fria Creek ",thepath="[(-121.909487,37.94485),(-121.910653,37.94809)]" 3628800000000000 +road name="Agua Fria Creek ",thepath="[(-121.9125,37.95367),(-121.9138,37.958)]" 3715200000000000 +road name="Agua Fria Creek ",thepath="[(-121.9254,37.922),(-121.9281,37.889)]" 3801600000000000 +road name="Agua Fria Creek ",thepath="[(-121.935,37.828),(-121.9356,37.826)]" 3888000000000000 +road name="Agua Vista ",thepath="[(-122.0796,37.896),(-122.0792,37.896)]" 3974400000000000 +road name="Agua Vista St ",thepath="[(-122.2089,37.839),(-122.2069,37.819)]" 4060800000000000 +road name="Aileen St ",thepath="[(-122.2612,37.42),(-122.2622,37.421)]" 4147200000000000 +road name="Airport road",thepath="[(-122.2085,37.147),(-122.2101,37.154)]" 4233600000000000 +road name="Aladdin Ave ",thepath="[(-122.1532,37.088),(-122.1577,37.068)]" 4320000000000000 +road name="Alameda Ave ",thepath="[(-122.2197,37.68),(-122.2192,37.68)]" 4406400000000000 +road name="Alameda Ave ",thepath="[(-122.2555,37.689),(-122.2534,37.68)]" 4492800000000000 +road name="Alameda Ave ",thepath="[(-122.2605,37.713),(-122.2588,37.704)]" 4579200000000000 +road name="Alameda Dr ",thepath="[(-121.8756,37.746),(-121.8763,37.746)]" 4665600000000000 +road name="Alameda road",thepath="[(-122.2955,37.875),(-122.2963,37.871)]" 4752000000000000 +road name="Alameda Belt Line Railroad ",thepath="[(-122.2586,37.769),(-122.2624,37.784)]" 4838400000000000 +road name="Alameda Belt Line Railroad ",thepath="[(-122.2697,37.798),(-122.2709,37.797)]" 4924800000000000 +road name="Alameda Creek ",thepath="[(-121.8283,37.151),(-121.8273,37.142)]" 5011200000000000 +road name="Alameda Creek ",thepath="[(-121.909502,37.93892),(-121.909,37.94)]" 5097600000000000 +road name="Alameda Creek ",thepath="[(-121.930593,37.93785),(-121.930096,37.94011)]" 5184000000000000 +road name="Alameda Creek ",thepath="[(-121.9466,37.974),(-121.9503,37.973)]" 5270400000000000 +road name="Alameda Creek ",thepath="[(-121.9691,37.748),(-121.97,37.73)]" 5356800000000000 +road name="Alameda Creek ",thepath="[(-121.9724,37.727),(-121.9738,37.726)]" 5443200000000000 +road name="Alameda Creek ",thepath="[(-121.978805,37.72143),(-121.9839,37.717)]" 5529600000000000 +road name="Alameda Creek ",thepath="[(-122.0136,37.734),(-122.0165,37.748)]" 5616000000000000 +road name="Alameda Creek ",thepath="[(-122.022956,37.77306),(-122.025,37.781)]" 5702400000000000 +road name="Alameda Creek ",thepath="[(-122.038,37.877),(-122.0446,37.873)]" 5788800000000000 +road name="Alameda Creek ",thepath="[(-122.0513,37.248),(-122.0556,37.215)]" 5875200000000000 +road name="Alameda Diversion ",thepath="[(-121.774647,37.97333),(-121.772718,37.98591)]" 5961600000000000 +road name="Alamo Canal ",thepath="[(-121.910434,37.73476),(-121.9101,37.726)]" 6048000000000000 +road name="Alamo Canal ",thepath="[(-121.9117,37.768),(-121.911261,37.75648)]" 6134400000000000 +road name="Alamo Creek ",thepath="[(-121.910523,37.2611),(-121.910923,37.26374)]" 6220800000000000 +road name="Albany St ",thepath="[(-122.0327,37.129),(-122.0326,37.115)]" 6307200000000000 +road name="Albany Ter ",thepath="[(-122.2864,37.868),(-122.2856,37.867)]" 6393600000000000 +road name="Alborg Ct ",thepath="[(-122.0492,37.154),(-122.0484,37.15)]" 6480000000000000 +road name="Alcatraz Ave ",thepath="[(-122.2525,37.515),(-122.2531,37.514)]" 6566400000000000 +road name="Alcatraz Ave ",thepath="[(-122.2617,37.502),(-122.2624,37.501)]" 6652800000000000 +road name="Alcatraz Ave ",thepath="[(-122.279,37.479),(-122.2773,37.482)]" 6739200000000000 +road name="Alcatraz Ave ",thepath="[(-122.2817,37.475),(-122.2825,37.475)]" 6825600000000000 +road name="Alcosta Blvd",thepath="[(-121.938,37.237),(-121.9392,37.235)]" 6912000000000000 +road name="Alden Lane",thepath="[(-121.786092,37.56057),(-121.7837,37.56)]" 6998400000000000 +road name="Alden Lane",thepath="[(-121.7978,37.561),(-121.795183,37.561)]" 7084800000000000 +road name="Alden road",thepath="[(-122.1116,37.817),(-122.110686,37.81989),(-122.1097,37.823)]" 7171200000000000 +road name="Alder Ct ",thepath="[(-122.0117,37.66),(-122.0109,37.653)]" 7257600000000000 +road name="Alexander Ct ",thepath="[(-121.8708,37.845),(-121.8706,37.841)]" 7344000000000000 +road name="Alexander St ",thepath="[(-121.7888,37.724),(-121.7874,37.724)]" 7430400000000000 +road name="Alexandria St ",thepath="[(-122.1411,37.892),(-122.1417,37.892)]" 7516800000000000 +road name="Algonquin Ave ",thepath="[(-121.7851,37.888),(-121.7852,37.891)]" 7603200000000000 +road name="Alhambra Lane",thepath="[(-122.2107,37.368),(-122.2102,37.367)]" 7689600000000000 +road name="Alicante Dr ",thepath="[(-122.0211,37.587),(-122.0198,37.582)]" 7776000000000000 +road name="Alice St ",thepath="[(-122.086,37.644),(-122.0848,37.625)]" 7862400000000000 +road name="Alice St ",thepath="[(-122.2696,37.967),(-122.2695,37.969)]" 7948800000000000 +road name="Alice St ",thepath="[(-122.2722,37.927),(-122.2714,37.94)]" 8035200000000000 +road name="Alice Way ",thepath="[(-121.7968,37.718),(-121.7958,37.718)]" 8121600000000000 +road name="Alice Way ",thepath="[(-122.0715,37.836),(-122.072,37.833)]" 8208000000000000 +road name="Alida St ",thepath="[(-122.2025,37.06),(-122.2019,37.056)]" 8294400000000000 +road name="Alisal St ",thepath="[(-121.86925,37.34979),(-121.8685,37.326)]" 8380800000000000 +road name="Alisal St ",thepath="[(-121.87,37.382),(-121.8695,37.35)]" 8467200000000000 +road name="Aliso Ave ",thepath="[(-122.1809,37.953),(-122.18,37.946)]" 8553600000000000 +road name="Allegro Ct ",thepath="[(-121.9755,37.201),(-121.9764,37.201)]" 8640000000000000 +road name="Allen Ct ",thepath="[(-122.0131,37.602),(-122.0117,37.597)]" 8726400000000000 +road name="Allendale Ave ",thepath="[(-122.2048,37.863),(-122.2041,37.858),(-122.2035,37.851)]" 8812800000000000 +road name="Allendale Ave ",thepath="[(-122.2067,37.882),(-122.2065,37.879)]" 8899200000000000 +road name="Allison Dr ",thepath="[(-122.0748,37.863),(-122.073,37.855)]" 8985600000000000 +road name="Allston Way ",thepath="[(-122.2799,37.677),(-122.2787,37.681)]" 9072000000000000 +road name="Alma Ct ",thepath="[(-121.9087,37.799),(-121.9089,37.814)]" 9158400000000000 +road name="Almaden Blvd",thepath="[(-122.0551,37.008),(-122.0551,37.016)]" 9244800000000000 +road name="Almaden Pl ",thepath="[(-121.9603,37.697),(-121.9601,37.693)]" 9331200000000000 +road name="Almeria Dr ",thepath="[(-122.0711,37.224),(-122.0736,37.224)]" 9417600000000000 +road name="Almond Ave ",thepath="[(-121.7387,37.75527),(-121.7387,37.74118)]" 9504000000000000 +road name="Almond Ave ",thepath="[(-121.7388,37.778),(-121.7387,37.772)]" 9590400000000000 +road name="Almond road",thepath="[(-122.0818,37.132),(-122.0831,37.116)]" 9676800000000000 +road name="Aloe Ct ",thepath="[(-121.9158,37.922),(-121.9152,37.927)]" 9763200000000000 +road name="Alpine Ter ",thepath="[(-122.2374,37.445),(-122.2377,37.459)]" 9849600000000000 +road name="Alta Dr ",thepath="[(-122.0109,37.424),(-122.0101,37.419)]" 9936000000000000 +road name="Alta Vista Ave ",thepath="[(-122.2483,37.174),(-122.2473,37.167)]" 10022400000000000 +road name="Altamont Creek ",thepath="[(-121.7422,37.178),(-121.7413,37.203)]" 10108800000000000 +road name="Altamont Creek ",thepath="[(-121.7509,37.149),(-121.7474,37.154)]" 10195200000000000 +road name="Altamont Pass road",thepath="[(-121.659901,37.44449),(-121.666828,37.41016)]" 10281600000000000 +road name="Altimirano Dr ",thepath="[(-121.8781,37.0193),(-121.8713,37.01707)]" 10368000000000000 +road name="Alton Ct ",thepath="[(-121.9977,37.581),(-121.9981,37.576)]" 10454400000000000 +road name="Alvarado Blvd",thepath="[(-122.0562,37.829),(-122.055814,37.82723)]" 10540800000000000 +road name="Alvarado road",thepath="[(-122.2339,37.608),(-122.2322,37.616)]" 10627200000000000 +road name="Alvarado road",thepath="[(-122.2391,37.573),(-122.2397,37.58)]" 10713600000000000 +road name="Alvarado St ",thepath="[(-122.1505,37.05),(-122.1494,37.03)]" 10800000000000000 +road name="Alvarado Niles road",thepath="[(-122.0325,37.903),(-122.0316,37.9)]" 10886400000000000 +road name="Alvarado Niles road",thepath="[(-122.049848,37.95115),(-122.0473,37.945)]" 10972800000000000 +road name="Alvord Way ",thepath="[(-121.9085,37.891),(-121.9093,37.889)]" 11059200000000000 +road name="Amador St ",thepath="[(-122.0963,37.614),(-122.0962,37.609)]" 11145600000000000 +road name="Amador St ",thepath="[(-122.0981,37.647),(-122.0966,37.635)]" 11232000000000000 +road name="Amador St ",thepath="[(-122.0999,37.664),(-122.099,37.655)]" 11318400000000000 +road name="Amador Valley Blvd",thepath="[(-121.9198,37.146),(-121.9211,37.138)]" 11404800000000000 +road name="Amador Valley Ct ",thepath="[(-121.9365,37.068),(-121.937909,37.06375)]" 11491200000000000 +road name="Amarillo Ct ",thepath="[(-121.9439,37.044),(-121.9432,37.046)]" 11577600000000000 +road name="Ambar Pl ",thepath="[(-121.9494,37.482),(-121.9479,37.474)]" 11664000000000000 +road name="Amber Ct ",thepath="[(-121.7997,37.708),(-121.7997,37.704)]" 11750400000000000 +road name="Amber Way ",thepath="[(-121.8025,37.707),(-121.8015,37.708)]" 11836800000000000 +road name="American Ave ",thepath="[(-122.1271,37.478),(-122.1281,37.489)]" 11923200000000000 +road name="Ames Ter ",thepath="[(-121.9962,37.763),(-121.9955,37.762)]" 12009600000000000 +road name="Amherst Ct ",thepath="[(-122.1571,37.036),(-122.1575,37.034)]" 12096000000000000 +road name="Anchor Dr ",thepath="[(-122.3027,37.374),(-122.3032,37.383)]" 12182400000000000 +road name="Andrade road",thepath="[(-121.8842,37.741),(-121.8841,37.738)]" 12268800000000000 +road name="Andrade road",thepath="[(-121.8853,37.565),(-121.8855,37.564)]" 12355200000000000 +road name="Andrea Cir ",thepath="[(-121.733218,37.88641),(-121.733286,37.90617)]" 12441600000000000 +road name="Andrews St ",thepath="[(-121.7814,37.834),(-121.7814,37.829)]" 12528000000000000 +road name="Angela St ",thepath="[(-121.865522,37.55324),(-121.8652,37.552)]" 12614400000000000 +road name="Angela St ",thepath="[(-121.8795,37.607),(-121.8798,37.608)]" 12700800000000000 +road name="Angus Way ",thepath="[(-122.098774,37.86535),(-122.0986,37.861)]" 12787200000000000 +road name="Anita Ct ",thepath="[(-121.9655,37.744),(-121.9653,37.738)]" 12873600000000000 +road name="Ann St ",thepath="[(-121.9888,37.604),(-121.9894,37.603)]" 12960000000000000 +road name="Anna Maria St ",thepath="[(-121.7957,37.756),(-121.7958,37.725)]" 13046400000000000 +road name="Annerley road",thepath="[(-122.2328,37.168),(-122.2325,37.17)]" 13132800000000000 +road name="Antelope Ct ",thepath="[(-122.0653,37.773),(-122.0648,37.773)]" 13219200000000000 +road name="Antonio St ",thepath="[(-122.1642,37.251),(-122.1653,37.247)]" 13305600000000000 +road name="Anza St ",thepath="[(-121.9184,37.306),(-121.9197,37.304)]" 13392000000000000 +road name="Anza Way ",thepath="[(-121.7794,37.714),(-121.7788,37.714)]" 13478400000000000 +road name="Apgar St ",thepath="[(-122.2709,37.288),(-122.2719,37.29)]" 13564800000000000 +road name="Apgar St ",thepath="[(-122.278,37.291),(-122.2785,37.291)]" 13651200000000000 +road name="Apollo Cir ",thepath="[(-122.068531,37.87654),(-122.0686,37.877)]" 13737600000000000 +road name="Appian Way ",thepath="[(-122.0022,37.98),(-122.0019,37.983)]" 13824000000000000 +road name="Apple Ave ",thepath="[(-122.0909,37.85),(-122.0901,37.857)]" 13910400000000000 +road name="Applewood St ",thepath="[(-121.9629,37.192),(-121.9616,37.168)]" 13996800000000000 +road name="Apricot Lane",thepath="[(-121.9471,37.401),(-121.9456,37.392)]" 14083200000000000 +road name="Aquarius Cir ",thepath="[(-122.0669,37.877),(-122.0674,37.88)]" 14169600000000000 +road name="Arbor Dr ",thepath="[(-121.8506,37.576),(-121.8521,37.578)]" 14256000000000000 +road name="Arbor St ",thepath="[(-122.2587,37.758),(-122.2582,37.765)]" 14342400000000000 +road name="Arcade Lane",thepath="[(-122.2514,37.865),(-122.251558,37.86316)]" 14428800000000000 +road name="Arch St ",thepath="[(-122.2639,37.79),(-122.2638,37.782)]" 14515200000000000 +road name="Arch St ",thepath="[(-122.2647,37.846),(-122.2646,37.844)]" 14601600000000000 +road name="Archer Ave ",thepath="[(-121.9879,37.627),(-121.9888,37.626)]" 14688000000000000 +road name="Arden road",thepath="[(-122.0978,37.177),(-122.1,37.177)]" 14774400000000000 +road name="Ardenwood Blvd",thepath="[(-122.063701,37.59653),(-122.063302,37.58815)]" 14860800000000000 +road name="Ardmore Dr ",thepath="[(-122.1308,37.211),(-122.1293,37.212)]" 14947200000000000 +road name="Ardo St ",thepath="[(-122.0295,37.682),(-122.0302,37.674)]" 15033600000000000 +road name="Ardo St ",thepath="[(-122.0306,37.659),(-122.0312,37.653)]" 15120000000000000 +road name="Arena St ",thepath="[(-122.155014,37.82347),(-122.1559,37.82)]" 15206400000000000 +road name="Arendt Way ",thepath="[(-121.8717,37.606),(-121.871,37.602)]" 15292800000000000 +road name="Argonaut Way ",thepath="[(-121.993,37.475),(-121.9926,37.473)]" 15379200000000000 +road name="Argonne St ",thepath="[(-122.146,37.806),(-122.1455,37.801),(-122.1451,37.796)]" 15465600000000000 +road name="Arizona St ",thepath="[(-122.0381,37.901),(-122.0367,37.898)]" 15552000000000000 +road name="Arizona St ",thepath="[(-122.044507,37.905),(-122.0443,37.904)]" 15638400000000000 +road name="Arizona St ",thepath="[(-122.1985,37.978),(-122.1981,37.974)]" 15724800000000000 +road name="Ark Dr ",thepath="[(-122.1313,37.029),(-122.1313,37.036)]" 15811200000000000 +road name="Arkansas Pl ",thepath="[(-121.9148,37.696),(-121.9149,37.699)]" 15897600000000000 +road name="Arlington Ave ",thepath="[(-122.2699,37.43),(-122.2719,37.428)]" 15984000000000000 +road name="Arlington Ave ",thepath="[(-122.276,37.024),(-122.276,37.014)]" 16070400000000000 +road name="Arlington Ave ",thepath="[(-122.276,37.988),(-122.2753,37.974)]" 16156800000000000 +road name="Arlington Dr ",thepath="[(-121.8802,37.408),(-121.8807,37.394)]" 16243200000000000 +road name="Arlington road",thepath="[(-121.7957,37.898),(-121.7956,37.906)]" 16329600000000000 +road name="Armata St ",thepath="[(-121.9236,37.858),(-121.9232,37.853)]" 16416000000000000 +road name="Arnold Ct ",thepath="[(-122.0887,37.669),(-122.0894,37.666)]" 16502400000000000 +road name="Arnold road",thepath="[(-121.8923,37.113),(-121.8924,37.111)]" 16588800000000000 +road name="Arnold road",thepath="[(-121.8924,37.06),(-121.8924,37.062)]" 16675200000000000 +road name="Arrowhead Dr ",thepath="[(-122.1943,37.389),(-122.1908,37.366)]" 16761600000000000 +road name="Arroyo Dr ",thepath="[(-121.9049,37.509),(-121.9029,37.516)]" 16848000000000000 +road name="Arroyo road",thepath="[(-121.749307,37.14717),(-121.7481,37.14957)]" 16934400000000000 +road name="Arroyo road",thepath="[(-121.7506,37.189),(-121.75,37.18541)]" 17020800000000000 +road name="Arroyo road",thepath="[(-121.7555,37.258),(-121.7556,37.251)]" 17107200000000000 +road name="Arroyo road",thepath="[(-121.76696,37.7112),(-121.76687,37.7094)]" 17193600000000000 +road name="Arroyo road",thepath="[(-121.7671,37.654),(-121.767086,37.65214),(-121.767,37.641)]" 17280000000000000 +road name="Arroyo de la Laguna ",thepath="[(-121.9064,37.612),(-121.9047,37.551)]" 17366400000000000 +road name="Arroyo del Valle ",thepath="[(-121.607487,37.89841),(-121.612773,37.92638)]" 17452800000000000 +road name="Arroyo del Valle ",thepath="[(-121.654588,37.36507),(-121.656972,37.4088)]" 17539200000000000 +road name="Arroyo del Valle ",thepath="[(-121.75,37.20484),(-121.7584,37.208)]" 17625600000000000 +road name="Arroyo del Valle ",thepath="[(-121.8049,37.539),(-121.7856,37.463)]" 17712000000000000 +road name="Arroyo del Valle ",thepath="[(-121.8751,37.656),(-121.8731,37.646)]" 17798400000000000 +road name="Arroyo Las Positas ",thepath="[(-121.7308,37.87),(-121.72772,37.85435)]" 17884800000000000 +road name="Arroyo Las Positas ",thepath="[(-121.7349,37.943),(-121.734048,37.9262)]" 17971200000000000 +road name="Arroyo Las Positas ",thepath="[(-121.7836,37.997),(-121.783492,37.99605)]" 18057600000000000 +road name="Arroyo Las Positas ",thepath="[(-121.7973,37.997),(-121.7957,37.005)]" 18144000000000000 +road name="Arroyo Las Positas ",thepath="[(-121.8473,37.965),(-121.8312,37.992)]" 18230400000000000 +road name="Arroyo Las Positas ",thepath="[(-121.858962,37.94925),(-121.858919,37.95878)]" 18316800000000000 +road name="Arroyo Mocho ",thepath="[(-121.553409,37.25257),(-121.565204,37.37327)]" 18403200000000000 +road name="Arroyo Mocho ",thepath="[(-121.625,37.83316),(-121.624698,37.83019)]" 18489600000000000 +road name="Arroyo Mocho ",thepath="[(-121.660579,37.01388),(-121.668949,37.027),(-121.682578,37.10817)]" 18576000000000000 +road name="Arroyo Mocho ",thepath="[(-121.7316,37.595),(-121.7186,37.466)]" 18662400000000000 +road name="Arroyo Mocho Canal ",thepath="[(-121.90854,37.78099),(-121.907797,37.78392)]" 18748800000000000 +road name="Arroyo Seco ",thepath="[(-121.655796,37.50684),(-121.657215,37.51096)]" 18835200000000000 +road name="Arroyo Seco ",thepath="[(-121.7073,37.766),(-121.6997,37.729)]" 18921600000000000 +road name="Arroyuelo Ave ",thepath="[(-122.2496,37.271),(-122.249564,37.2728)]" 19008000000000000 +road name="Ascot Dr ",thepath="[(-122.1934,37.217),(-122.1926,37.219)]" 19094400000000000 +road name="Ascot Dr ",thepath="[(-122.1969,37.211),(-122.1951,37.207)]" 19180800000000000 +road name="Ash St ",thepath="[(-122.0384,37.259),(-122.0388,37.276)]" 19267200000000000 +road name="Ash St ",thepath="[(-122.0408,37.31),(-122.04,37.292)]" 19353600000000000 +road name="Ashby Ave ",thepath="[(-122.2494,37.579),(-122.2485,37.579)]" 19440000000000000 +road name="Ashby Ave ",thepath="[(-122.2526,37.574),(-122.2518,37.574)]" 19526400000000000 +road name="Ashby Ave ",thepath="[(-122.264,37.557),(-122.263,37.559)]" 19612800000000000 +road name="Ashland Ave ",thepath="[(-122.1178,37.941),(-122.1178,37.93)]" 19699200000000000 +road name="Ashland Ave ",thepath="[(-122.1179,37.914),(-122.1179,37.913)]" 19785600000000000 +road name="Ashwood Common ",thepath="[(-121.962832,37.21086),(-121.963052,37.21067)]" 19872000000000000 +road name="Asilomar Dr ",thepath="[(-122.2028,37.298),(-122.20355,37.2905)]" 19958400000000000 +road name="Asilomar Dr ",thepath="[(-122.2041,37.333),(-122.204,37.312)]" 20044800000000000 +road name="Aspinwall road",thepath="[(-122.2074,37.39),(-122.2068,37.39)]" 20131200000000000 +road name="Aster Ct ",thepath="[(-121.9125,37.72),(-121.9129,37.719)]" 20217600000000000 +road name="At and Sf Railroad ",thepath="[(-122.2765,37.347),(-122.2768,37.339)]" 20304000000000000 +road name="At and Sf Railroad ",thepath="[(-122.2767,37.463),(-122.2766,37.454)]" 20390400000000000 +road name="At and Sf Railroad ",thepath="[(-122.2785,37.544),(-122.2784,37.535)]" 20476800000000000 +road name="At and Sf Railroad ",thepath="[(-122.281389,37.30695),(-122.282488,37.30491)]" 20563200000000000 +road name="At and Sf Railroad ",thepath="[(-122.2827,37.611),(-122.2821,37.603)]" 20649600000000000 +road name="At and Sf Railroad ",thepath="[(-122.2844,37.293),(-122.2848,37.291)]" 20736000000000000 +road name="At and Sf Railroad ",thepath="[(-122.2878,37.788),(-122.2874,37.783)]" 20822400000000000 +road name="At and Sf Railroad ",thepath="[(-122.288,37.3),(-122.288,37.294)]" 20908800000000000 +road name="Atherton St ",thepath="[(-122.0819,37.68),(-122.0809,37.669)]" 20995200000000000 +road name="Atherton St ",thepath="[(-122.0838,37.7),(-122.0829,37.69)]" 21081600000000000 +road name="Atherton St ",thepath="[(-122.1701,37.612),(-122.1696,37.606)]" 21168000000000000 +road name="Athol Ave ",thepath="[(-122.2535,37.01),(-122.2523,37.016)]" 21254400000000000 +road name="Atlantic Ave ",thepath="[(-122.2831,37.804),(-122.2816,37.803)]" 21340800000000000 +road name="Atlantic St ",thepath="[(-122.0371,37.018),(-122.0382,37.018)]" 21427200000000000 +road name="Atlas Ave ",thepath="[(-122.1889,37.964),(-122.1882,37.966)]" 21513600000000000 +road name="Atwater Ct ",thepath="[(-122.0076,37.662),(-122.0084,37.654)]" 21600000000000000 +road name="Auburn Ave ",thepath="[(-122.25,37.489),(-122.25035,37.4945)]" 21686400000000000 +road name="Audrey Dr ",thepath="[(-122.069,37.13),(-122.0683,37.131)]" 21772800000000000 +road name="Audubon St ",thepath="[(-122.0388,37.261),(-122.0383,37.258)]" 21859200000000000 +road name="Aughinbaugh Way ",thepath="[(-122.2491,37.473),(-122.249,37.471)]" 21945600000000000 +road name="Augustine Pl ",thepath="[(-122.0169,37.732),(-122.0163,37.725)]" 22032000000000000 +road name="Aurora Dr ",thepath="[(-122.1804,37.973),(-122.18,37.966)]" 22118400000000000 +road name="Auseon Ave ",thepath="[(-122.1653,37.565),(-122.165,37.567)]" 22204800000000000 +road name="Austin St ",thepath="[(-121.943,37.422),(-121.9435,37.425)]" 22291200000000000 +road name="Autumn Oak Dr ",thepath="[(-121.749435,37.09187),(-121.749806,37.10065)]" 22377600000000000 +road name="Avalon Ave ",thepath="[(-122.2477,37.597),(-122.246,37.598)]" 22464000000000000 +road name="Avenue 130th ",thepath="[(-122.1851,37.044),(-122.1872,37.036)]" 22550400000000000 +road name="Avenue 134th ",thepath="[(-122.1823,37.002),(-122.1851,37.992)]" 22636800000000000 +road name="Avenue 140th ",thepath="[(-122.1656,37.003),(-122.1691,37.988)]" 22723200000000000 +road name="Avenue A ",thepath="[(-122.3005,37.885),(-122.3024,37.885)]" 22809600000000000 +road name="Avenue A ",thepath="[(-122.3035,37.885),(-122.3076,37.886)]" 22896000000000000 +road name="Avenue D ",thepath="[(-122.298,37.848),(-122.3024,37.849)]" 22982400000000000 +road name="Avenue F ",thepath="[(-122.2943,37.831),(-122.2971,37.832)]" 23068800000000000 +road name="Avenue L ",thepath="[(-122.296,37.757),(-122.2985,37.757)]" 23155200000000000 +road name="Avoca Ave ",thepath="[(-122.2211,37.413),(-122.2204,37.416)]" 23241600000000000 +road name="Ayala Ave ",thepath="[(-122.2587,37.429),(-122.2584,37.435)]" 23328000000000000 +road name="Azalea Ct ",thepath="[(-121.7365,37.13),(-121.7357,37.136)]" 23414400000000000 +road name="Azevedo Ave ",thepath="[(-122.0639,37.756),(-122.0641,37.75)]" 23500800000000000 +road name="Aztec Ct ",thepath="[(-121.922,37.92),(-121.921,37.92)]" 23587200000000000 +road name="B St ",thepath="[(-121.8924,37.95133),(-121.8924,37.952)]" 23673600000000000 +road name="B St ",thepath="[(-122.0241,37.05),(-122.0248,37.045)]" 23760000000000000 +road name="B St ",thepath="[(-122.0531,37.434),(-122.0537,37.434)]" 23846400000000000 +road name="B St ",thepath="[(-122.0656,37.823),(-122.0652,37.825)]" 23932800000000000 +road name="B St ",thepath="[(-122.0799,37.742),(-122.0782,37.753)]" 24019200000000000 +road name="B St ",thepath="[(-122.087,37.707),(-122.0863,37.709)]" 24105600000000000 +road name="B St ",thepath="[(-122.0955,37.673),(-122.0944,37.677)]" 24192000000000000 +road name="B St ",thepath="[(-122.1749,37.451),(-122.1743,37.443)]" 24278400000000000 +road name="Bach Ct ",thepath="[(-121.9778,37.295),(-121.9769,37.292)]" 24364800000000000 +road name="Bahama Ave ",thepath="[(-122.1039,37.335),(-122.1031,37.321)]" 24451200000000000 +road name="Bahama Com ",thepath="[(-122.0361,37.72),(-122.036031,37.72046),(-122.0358,37.722)]" 24537600000000000 +road name="Baine Ave ",thepath="[(-122.0089,37.565),(-122.0104,37.546)]" 24624000000000000 +road name="Bairo Ct ",thepath="[(-121.9505,37.398),(-121.9498,37.393)]" 24710400000000000 +road name="Baker St ",thepath="[(-122.2792,37.495),(-122.2791,37.488)]" 24796800000000000 +road name="Balboa Dr ",thepath="[(-122.1982,37.319),(-122.1971,37.333)]" 24883200000000000 +road name="Balboa Way ",thepath="[(-122.0205,37.519),(-122.0207,37.517)]" 24969600000000000 +road name="Baldwin Pl ",thepath="[(-122.0274,37.697),(-122.0265,37.692)]" 25056000000000000 +road name="Ballantyne Dr ",thepath="[(-121.858907,37.985),(-121.8585,37.985)]" 25142400000000000 +road name="Ballantyne Dr ",thepath="[(-121.8611,37.986),(-121.8605,37.985)]" 25228800000000000 +road name="Ballena Blvd",thepath="[(-122.2854,37.691),(-122.285393,37.68924)]" 25315200000000000 +road name="Ballentine Dr ",thepath="[(-121.859765,37.96825),(-121.860477,37.96784)]" 25401600000000000 +road name="Balmoral Dr ",thepath="[(-122.1639,37.981),(-122.1635,37.988)]" 25488000000000000 +road name="Balmoral Dr ",thepath="[(-122.1658,37.027),(-122.1656,37.042)]" 25574400000000000 +road name="Balmoral St ",thepath="[(-122.055,37.971),(-122.0555,37.979)]" 25660800000000000 +road name="Banbury St ",thepath="[(-122.0943,37.495),(-122.0949,37.493)]" 25747200000000000 +road name="Bancroft Ave ",thepath="[(-122.1475,37.288),(-122.147,37.276)]" 25833600000000000 +road name="Bancroft Ave ",thepath="[(-122.1485,37.311),(-122.1481,37.303)]" 25920000000000000 +road name="Bancroft Ave ",thepath="[(-122.1518,37.358),(-122.1511,37.349)]" 26006400000000000 +road name="Bancroft Ave ",thepath="[(-122.15714,37.4242),(-122.156,37.409)]" 26092800000000000 +road name="Bancroft Ave ",thepath="[(-122.1585,37.445),(-122.1583,37.441)]" 26179200000000000 +road name="Bancroft Ave ",thepath="[(-122.1643,37.523),(-122.1631,37.508),(-122.1621,37.493)]" 26265600000000000 +road name="Bancroft Ave ",thepath="[(-122.1718,37.62),(-122.1715,37.617)]" 26352000000000000 +road name="Bancroft Ave ",thepath="[(-122.1796,37.689),(-122.1792,37.684)]" 26438400000000000 +road name="Bancroft Ave ",thepath="[(-122.1903,37.706),(-122.189,37.705)]" 26524800000000000 +road name="Bancroft Ave ",thepath="[(-122.2041,37.716),(-122.202,37.716)]" 26611200000000000 +road name="Bancroft Ct ",thepath="[(-122.1329,37.109),(-122.1322,37.116)]" 26697600000000000 +road name="Bancroft Way ",thepath="[(-122.2753,37.667),(-122.2742,37.668)]" 26784000000000000 +road name="Bancroft Way ",thepath="[(-122.2846,37.654),(-122.283747,37.655)]" 26870400000000000 +road name="Bancroft Way ",thepath="[(-122.291,37.644),(-122.2899,37.647)]" 26956800000000000 +road name="Bandon Dr ",thepath="[(-121.9311,37.234),(-121.931,37.237)]" 27043200000000000 +road name="Banyan Tree road",thepath="[(-121.9901,37.317),(-121.9877,37.304)]" 27129600000000000 +road name="Barbers Point road",thepath="[(-122.2957,37.896),(-122.2965,37.894)]" 27216000000000000 +road name="Barcelona Ave ",thepath="[(-122.0896,37.276),(-122.0894,37.253)]" 27302400000000000 +road name="Barcelona St ",thepath="[(-122.1459,37.639),(-122.1445,37.623)]" 27388800000000000 +road name="Barcelona Way ",thepath="[(-122.0787,37.86),(-122.0783,37.858)]" 27475200000000000 +road name="Bardolph Cir ",thepath="[(-122.0583,37.718),(-122.0586,37.726)]" 27561600000000000 +road name="Barlow Dr ",thepath="[(-122.0891,37.034),(-122.088,37.037),(-122.086558,37.03988)]" 27648000000000000 +road name="Barlow Dr ",thepath="[(-122.0915,37.03),(-122.0903,37.032)]" 27734400000000000 +road name="Bart Ramp",thepath="[(-122.0495,37.208),(-122.0473,37.196)]" 27820800000000000 +road name="Bart Access road",thepath="[(-122.0346,37.081),(-122.0329,37.057)]" 27907200000000000 +road name="Bartlett Lane",thepath="[(-122.111062,37.71771),(-122.10988,37.70276)]" 27993600000000000 +road name="Bartlett St ",thepath="[(-122.2071,37.902),(-122.2053,37.913)]" 28080000000000000 +road name="Barton Dr ",thepath="[(-121.9655,37.744),(-121.9644,37.749)]" 28166400000000000 +road name="Bates Dr ",thepath="[(-122.0328,37.748),(-122.0322,37.745)]" 28252800000000000 +road name="Baumberg Ave ",thepath="[(-122.0987,37.241),(-122.0985,37.237)]" 28339200000000000 +road name="Bautista St ",thepath="[(-121.9227,37.29),(-121.9225,37.284)]" 28425600000000000 +road name="Bay St ",thepath="[(-121.9611,37.33),(-121.9627,37.329)]" 28512000000000000 +road name="Bay St ",thepath="[(-122.2642,37.732),(-122.2641,37.751)]" 28598400000000000 +road name="Bay Area Rapid Transit ",thepath="[(-121.983355,37.64329),(-121.982907,37.63842)]" 28684800000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.0049,37.816),(-122.004,37.809)]" 28771200000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.007,37.833),(-122.0062,37.827)]" 28857600000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.02,37.935),(-122.0193,37.926)]" 28944000000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.0309,37.057),(-122.0281,37.027),(-122.0262,37.001)]" 29030400000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.0813,37.661),(-122.0806,37.654)]" 29116800000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.0981,37.779),(-122.0963,37.767)]" 29203200000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.1694,37.311),(-122.1679,37.3)]" 29289600000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.2086,37.641),(-122.2061,37.619)]" 29376000000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.2129,37.676),(-122.212,37.668)]" 29462400000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.2172,37.713),(-122.2184,37.719)]" 29548800000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.231147,37.54912),(-122.229,37.562)]" 29635200000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.2349,37.525),(-122.2339,37.532)]" 29721600000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.2571,37.427),(-122.2563,37.431)]" 29808000000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.2658,37.337),(-122.2644,37.38)]" 29894400000000000 +road name="Bay Area Rapid Transit ",thepath="[(-122.267508,37.25368),(-122.2674,37.258)]" 29980800000000000 +road name="Bay Forest Dr ",thepath="[(-122.2139,37.561),(-122.2142,37.565)]" 30067200000000000 +road name="Bay Walk road",thepath="[(-122.2471,37.389),(-122.2462,37.389)]" 30153600000000000 +road name="Bayfield Pl ",thepath="[(-121.9665,37.204),(-121.9664,37.196)]" 30240000000000000 +road name="Baylor St ",thepath="[(-122.0272,37.93),(-122.0284,37.903)]" 30326400000000000 +road name="Bayview Ave ",thepath="[(-122.0584,37.864),(-122.0581,37.855)]" 30412800000000000 +road name="Bayview Dr ",thepath="[(-122.2386,37.511),(-122.2379,37.514)]" 30499200000000000 +road name="Beachwood Way ",thepath="[(-121.8817,37.731),(-121.8807,37.731)]" 30585600000000000 +road name="Beacon St ",thepath="[(-122.2484,37.09),(-122.2472,37.088)]" 30672000000000000 +road name="Beard road",thepath="[(-122.0417,37.819),(-122.0424,37.81)]" 30758400000000000 +road name="Beard road",thepath="[(-122.0447,37.778),(-122.045,37.775)]" 30844800000000000 +road name="Beaumont Ave ",thepath="[(-122.2263,37.033),(-122.2262,37.04)]" 30931200000000000 +road name="Becket Dr ",thepath="[(-122.0509,37.005),(-122.0509,37.033)]" 31017600000000000 +road name="Bedelio Ter ",thepath="[(-122.019,37.579),(-122.018,37.574)]" 31104000000000000 +road name="Bedford St ",thepath="[(-121.9333,37.403),(-121.9338,37.402)]" 31190400000000000 +road name="Bedford Way ",thepath="[(-121.928,37.149),(-121.9288,37.15)]" 31276800000000000 +road name="Beecham Ct ",thepath="[(-121.8693,37.959),(-121.8704,37.959)]" 31363200000000000 +road name="Beechmont Lane",thepath="[(-122.0971,37.558),(-122.0984,37.555)]" 31449600000000000 +road name="Begier Ave ",thepath="[(-122.15,37.314),(-122.1488,37.317)]" 31536000000000000 +road name="Begonia Dr ",thepath="[(-122.1334,37.01),(-122.1342,37.01)]" 31622400000000000 +road name="Begonia St ",thepath="[(-122.0153,37.785),(-122.0156,37.772)]" 31708800000000000 +road name="Begonia St ",thepath="[(-122.0218,37.797),(-122.022,37.789)]" 31795200000000000 +road name="Bel Aire St ",thepath="[(-122.0717,37.726),(-122.0714,37.725)]" 31881600000000000 +road name="Bell St ",thepath="[(-121.99126,37.4916),(-121.991407,37.49215)]" 31968000000000000 +road name="Belleview Dr ",thepath="[(-122.1626,37.325),(-122.1635,37.32)]" 32054400000000000 +road name="Bellevue Ave ",thepath="[(-122.2529,37.13),(-122.2521,37.111)]" 32140800000000000 +road name="Bellflower Dr ",thepath="[(-122.0103,37.317),(-122.009979,37.31387)]" 32227200000000000 +road name="Bellhaven Ave ",thepath="[(-122.0354,37.414),(-122.0364,37.405)]" 32313600000000000 +road name="Belmont Ave ",thepath="[(-122.0708,37.588),(-122.0703,37.582)]" 32400000000000000 +road name="Belvedere Ave ",thepath="[(-122.1768,37.918),(-122.1772,37.918)]" 32486400000000000 +road name="Belvedere Ave ",thepath="[(-122.2892,37.767),(-122.2888,37.759)]" 32572800000000000 +road name="Benecia Ave ",thepath="[(-122.0077,37.222),(-122.0076,37.225)]" 32659200000000000 +road name="Benedict Dr ",thepath="[(-122.1326,37.204),(-122.1323,37.199)]" 32745600000000000 +road name="Benner Ct ",thepath="[(-121.9063,37.891),(-121.9076,37.888)]" 32832000000000000 +road name="Bennington Lane",thepath="[(-122.103818,37.36136),(-122.1045,37.361)]" 32918400000000000 +road name="Benson road",thepath="[(-122.083217,37.94765),(-122.0891,37.928)]" 33004800000000000 +road name="Benton St ",thepath="[(-122.2605,37.713),(-122.2605,37.731)]" 33091200000000000 +road name="Berkeley Way ",thepath="[(-122.2747,37.722),(-122.2726,37.725)]" 33177600000000000 +road name="Berlin Way ",thepath="[(-121.7774,37.649),(-121.7766,37.649)]" 33264000000000000 +road name="Bernal Ave ",thepath="[(-121.8556,37.668),(-121.85626,37.68656)]" 33350400000000000 +road name="Bernal Ave ",thepath="[(-121.895208,37.57837),(-121.884914,37.57603)]" 33436800000000000 +road name="Bernhardt Dr ",thepath="[(-122.1852,37.297),(-122.1847,37.292)]" 33523200000000000 +road name="Bernhardt St ",thepath="[(-122.1326,37.399),(-122.1322,37.449)]" 33609600000000000 +road name="Berwind Ave ",thepath="[(-121.7308,37.183),(-121.7303,37.181)]" 33696000000000000 +road name="Besco Dr ",thepath="[(-121.9764,37.32),(-121.9761,37.311)]" 33782400000000000 +road name="Bess Ave ",thepath="[(-121.765239,37.625),(-121.763602,37.625)]" 33868800000000000 +road name="Best Ave ",thepath="[(-122.1622,37.284),(-122.1636,37.278)]" 33955200000000000 +road name="Betlen Dr ",thepath="[(-121.9407,37.026),(-121.9397,37.029)]" 34041600000000000 +road name="Betlen Dr ",thepath="[(-121.9507,37.018),(-121.950121,37.01678)]" 34128000000000000 +road name="Bettencourt St ",thepath="[(-122.0479,37.34),(-122.0473,37.337)]" 34214400000000000 +road name="Beverly Ave ",thepath="[(-122.1578,37.382),(-122.1572,37.375)]" 34300800000000000 +road name="Beverly Ave ",thepath="[(-122.1586,37.395),(-122.1582,37.388)]" 34387200000000000 +road name="Beverly St ",thepath="[(-121.736023,37.85177),(-121.737956,37.84632)]" 34473600000000000 +road name="Bianca Way ",thepath="[(-121.7244,37.946),(-121.7257,37.945)]" 34560000000000000 +road name="Bianca Way ",thepath="[(-121.7281,37.939),(-121.729,37.937)]" 34646400000000000 +road name="Biddle Ave ",thepath="[(-122.0317,37.425),(-122.0329,37.417)]" 34732800000000000 +road name="Bidwell Dr ",thepath="[(-121.9748,37.448),(-121.9763,37.427)]" 34819200000000000 +road name="Bidwell Dr ",thepath="[(-121.9763,37.422),(-121.9764,37.42)]" 34905600000000000 +road name="Biehs Ct ",thepath="[(-122.2289,37.386),(-122.2283,37.391)]" 34992000000000000 +road name="Big Burn road",thepath="[(-122.0918,37.802),(-122.1091,37.788)]" 35078400000000000 +road name="Binnacle Hill ",thepath="[(-122.2269,37.533),(-122.2274,37.523)]" 35164800000000000 +road name="Birch St ",thepath="[(-122.0269,37.368),(-122.0254,37.36)]" 35251200000000000 +road name="Birch St ",thepath="[(-122.1617,37.425),(-122.1614,37.417)]" 35337600000000000 +road name="Birch St ",thepath="[(-122.1653,37.478),(-122.1641,37.464)]" 35424000000000000 +road name="Birch St ",thepath="[(-122.1673,37.509),(-122.1661,37.492)]" 35510400000000000 +road name="Birch Creek Dr ",thepath="[(-121.8641,37.629),(-121.8642,37.64)]" 35596800000000000 +road name="Birdsall Ave ",thepath="[(-122.1907,37.774),(-122.1907,37.781)]" 35683200000000000 +road name="Birdsall Ave ",thepath="[(-122.191,37.789),(-122.1911,37.796)]" 35769600000000000 +road name="Birkdale Dr ",thepath="[(-122.0515,37.373),(-122.0521,37.368)]" 35856000000000000 +road name="Birkdale Way ",thepath="[(-122.0406,37.17),(-122.0386,37.153)]" 35942400000000000 +road name="Biscayne Ave ",thepath="[(-122.0734,37.278),(-122.0734,37.274)]" 36028800000000000 +road name="Bishop Ave ",thepath="[(-121.9911,37.635),(-121.9921,37.632)]" 36115200000000000 +road name="Bitterroot Ave ",thepath="[(-122.0091,37.276),(-122.0087,37.282)]" 36201600000000000 +road name="Black Ave ",thepath="[(-121.8816,37.721),(-121.8826,37.721)]" 36288000000000000 +road name="Black Ave ",thepath="[(-121.8909,37.704),(-121.892,37.698)]" 36374400000000000 +road name="Black Ave ",thepath="[(-121.8964,37.701),(-121.8967,37.706)]" 36460800000000000 +road name="Blackbird Way ",thepath="[(-121.8867,37.801),(-121.8876,37.801),(-121.8882,37.801)]" 36547200000000000 +road name="Blackstone Way ",thepath="[(-122.0393,37.724),(-122.0388,37.721)]" 36633600000000000 +road name="Blackstone Way ",thepath="[(-122.0418,37.736),(-122.043,37.743)]" 36720000000000000 +road name="Blacow road",thepath="[(-121.9909,37.33),(-121.9895,37.324)]" 36806400000000000 +road name="Blacow road",thepath="[(-122.0061,37.409),(-122.0053,37.405)]" 36892800000000000 +road name="Blacow road",thepath="[(-122.0179,37.469),(-122.0167,37.465)]" 36979200000000000 +road name="Blair Ave ",thepath="[(-122.2225,37.27),(-122.2217,37.276)]" 37065600000000000 +road name="Blair Ave ",thepath="[(-122.2364,37.263),(-122.2359,37.267)]" 37152000000000000 +road name="Blaisdell Way ",thepath="[(-121.9858,37.816),(-121.9853,37.811)]" 37238400000000000 +road name="Blake St ",thepath="[(-122.2622,37.639),(-122.2599,37.642)]" 37324800000000000 +road name="Blake St ",thepath="[(-122.2864,37.605),(-122.2845,37.608)]" 37411200000000000 +road name="Blanchard St ",thepath="[(-121.97,37.382),(-121.9693,37.382)]" 37497600000000000 +road name="Blanchard St ",thepath="[(-121.9729,37.38),(-121.9709,37.383)]" 37584000000000000 +road name="Blanding Ave ",thepath="[(-122.2313,37.68),(-122.2328,37.686)]" 37670400000000000 +road name="Blewett St ",thepath="[(-121.9732,37.373),(-121.9733,37.369)]" 37756800000000000 +road name="Bloomington Way ",thepath="[(-121.9448,37.205),(-121.9434,37.204)]" 37843200000000000 +road name="Blossom Ct ",thepath="[(-121.8766,37.395),(-121.876493,37.39469)]" 37929600000000000 +road name="Blossom Ct ",thepath="[(-122.0212,37.772),(-122.0213,37.769)]" 38016000000000000 +road name="Blossom Way ",thepath="[(-122.1096,37.758),(-122.1087,37.764),(-122.1057,37.774)]" 38102400000000000 +road name="Blue Coral ",thepath="[(-121.965392,37.69509),(-121.965261,37.70132)]" 38188800000000000 +road name="Bluebell Dr ",thepath="[(-121.74,37.151),(-121.7411,37.161)]" 38275200000000000 +road name="Bluefield Lane",thepath="[(-122.1024,37.584),(-122.1033,37.561)]" 38361600000000000 +road name="Blythe St ",thepath="[(-122.0704,37.745),(-122.0711,37.739)]" 38448000000000000 +road name="Boar Cir ",thepath="[(-121.912463,37.08667),(-121.912335,37.09052)]" 38534400000000000 +road name="Bobwhite Ter ",thepath="[(-122.046797,37.80224),(-122.046672,37.80179)]" 38620800000000000 +road name="Bockman road",thepath="[(-122.1206,37.713),(-122.122,37.712)]" 38707200000000000 +road name="Bodie Ter ",thepath="[(-121.9253,37.884),(-121.9247,37.887)]" 38793600000000000 +road name="Boeing St ",thepath="[(-122.2122,37.34),(-122.2112,37.322)]" 38880000000000000 +road name="Bolero Ave ",thepath="[(-122.0904,37.297),(-122.0913,37.297)]" 38966400000000000 +road name="Bonar St ",thepath="[(-122.2857,37.653),(-122.2856,37.642)]" 39052800000000000 +road name="Bond St ",thepath="[(-122.2071,37.718),(-122.2067,37.716)]" 39139200000000000 +road name="Bond St ",thepath="[(-122.2126,37.75),(-122.2116,37.739)]" 39225600000000000 +road name="Bonde Way ",thepath="[(-122.0077,37.59),(-122.0084,37.58)]" 39312000000000000 +road name="Bonita Ave ",thepath="[(-122.2355,37.306),(-122.235,37.296)]" 39398400000000000 +road name="Bonita Ave ",thepath="[(-122.2727,37.843),(-122.2725,37.835)]" 39484800000000000 +road name="Bonner Ave ",thepath="[(-121.9748,37.635),(-121.976,37.631)]" 39571200000000000 +road name="Bonnie St ",thepath="[(-122.0332,37.381),(-122.0324,37.378)]" 39657600000000000 +road name="Booker Way ",thepath="[(-122.0898,37.464),(-122.0902,37.454)]" 39744000000000000 +road name="Boone Dr ",thepath="[(-121.9825,37.329),(-121.9829,37.324)]" 39830400000000000 +road name="Boone Dr ",thepath="[(-122.0271,37.151),(-122.02815,37.14124)]" 39916800000000000 +road name="Bordeaux St ",thepath="[(-121.7685,37.688),(-121.7687,37.664)]" 40003200000000000 +road name="Boston Ave ",thepath="[(-122.2132,37.961),(-122.2129,37.969)]" 40089600000000000 +road name="Boulevard Way ",thepath="[(-122.2427,37.18),(-122.2423,37.181)]" 40176000000000000 +road name="Bourbon Dr ",thepath="[(-122.0869,37.194),(-122.0878,37.192)]" 40262400000000000 +road name="Bowditch St ",thepath="[(-122.2559,37.665),(-122.2557,37.656)]" 40348800000000000 +road name="Bowie Common ",thepath="[(-122.042847,37.64532),(-122.042808,37.64484)]" 40435200000000000 +road name="Boxwood Way ",thepath="[(-121.9329,37.094),(-121.9335,37.096)]" 40521600000000000 +road name="Bradrick Dr ",thepath="[(-122.138,37.962),(-122.1361,37.963)]" 40608000000000000 +road name="Bradshire road",thepath="[(-122.0885,37.204),(-122.0883,37.2)]" 40694400000000000 +road name="Bramble Ct ",thepath="[(-122.0944,37.941),(-122.0951,37.94)]" 40780800000000000 +road name="Brann St ",thepath="[(-122.1806,37.709),(-122.1785,37.705)]" 40867200000000000 +road name="Brayton Ct ",thepath="[(-122.0123,37.423),(-122.0114,37.418)]" 40953600000000000 +road name="Breakwater Ave ",thepath="[(-122.1196,37.294),(-122.1203,37.282)]" 41040000000000000 +road name="Brentford St ",thepath="[(-122.1965,37.581),(-122.1964,37.564)]" 41126400000000000 +road name="Breton Dr ",thepath="[(-122.0435,37.463),(-122.043,37.458)]" 41212800000000000 +road name="Brian St ",thepath="[(-122.0686,37.348),(-122.0693,37.344)]" 41299200000000000 +road name="Briar Cliff road",thepath="[(-122.1409,37.647),(-122.1382,37.658)]" 41385600000000000 +road name="Briarwood Dr ",thepath="[(-121.7663,37.915),(-121.7652,37.916)]" 41472000000000000 +road name="Brickell Way ",thepath="[(-122.067,37.104),(-122.067,37.101)]" 41558400000000000 +road name="Bridge Ct ",thepath="[(-122.0879,37.848),(-122.0874,37.844)]" 41644800000000000 +road name="Bridgepointe Dr ",thepath="[(-122.0514,37.305),(-122.0509,37.299)]" 41731200000000000 +road name="Bridgeview Dr ",thepath="[(-122.2112,37.133),(-122.21,37.138)]" 41817600000000000 +road name="Bridgewood Ter ",thepath="[(-122.0042,37.639),(-122.0047,37.632)]" 41904000000000000 +road name="Brier St ",thepath="[(-122.0806,37.959),(-122.0805,37.963)]" 41990400000000000 +road name="Brighton Ave ",thepath="[(-122.2944,37.979),(-122.2934,37.979)]" 42076800000000000 +road name="Brighton Dr ",thepath="[(-121.9263,37.188),(-121.9277,37.189),(-121.9285,37.19)]" 42163200000000000 +road name="Brighton Dr ",thepath="[(-121.931,37.198),(-121.9312,37.197)]" 42249600000000000 +road name="Briscoe Ter ",thepath="[(-121.948491,37.4184),(-121.948634,37.41645)]" 42336000000000000 +road name="Bristol Blvd",thepath="[(-122.1674,37.353),(-122.1698,37.342)]" 42422400000000000 +road name="Bristolwood road",thepath="[(-121.9165,37.78),(-121.9164,37.787)]" 42508800000000000 +road name="Broadmoor Blvd",thepath="[(-122.147,37.397),(-122.1466,37.399)]" 42595200000000000 +road name="Broadmoor Blvd",thepath="[(-122.156,37.358),(-122.1546,37.364)]" 42681600000000000 +road name="Broadmoor St ",thepath="[(-121.7313,37.257),(-121.7313,37.263)]" 42768000000000000 +road name="Broadmoor St ",thepath="[(-121.7314,37.194),(-121.7314,37.199)]" 42854400000000000 +road name="Broadmoor St ",thepath="[(-121.7314,37.213),(-121.7314,37.221)]" 42940800000000000 +road name="Broadmore Ave ",thepath="[(-122.095,37.522),(-122.0936,37.497)]" 43027200000000000 +road name="Broadway ",thepath="[(-122.2212,37.5),(-122.2204,37.517)]" 43113600000000000 +road name="Broadway ",thepath="[(-122.2372,37.631),(-122.236753,37.63675)]" 43200000000000000 +road name="Broadway ",thepath="[(-122.2391,37.493),(-122.2386,37.495)]" 43286400000000000 +road name="Broadway ",thepath="[(-122.2409,37.586),(-122.2395,37.601)]" 43372800000000000 +road name="Broadway ",thepath="[(-122.243008,37.55961),(-122.2427,37.563)]" 43459200000000000 +road name="Broadway ",thepath="[(-122.245,37.45),(-122.2443,37.46),(-122.2436,37.469)]" 43545600000000000 +road name="Broadway ",thepath="[(-122.2457,37.528),(-122.2455,37.529)]" 43632000000000000 +road name="Broadway ",thepath="[(-122.2472,37.418),(-122.2468,37.426)]" 43718400000000000 +road name="Broadway ",thepath="[(-122.2539,37.316),(-122.2525,37.337)]" 43804800000000000 +road name="Broadway ",thepath="[(-122.2598,37.222),(-122.2596,37.227)]" 43891200000000000 +road name="Broadway ",thepath="[(-122.2632,37.167),(-122.2626,37.177),(-122.2617,37.19)]" 43977600000000000 +road name="Broadway ",thepath="[(-122.2719,37.028),(-122.2714,37.036)]" 44064000000000000 +road name="Broadway ",thepath="[(-122.2727,37.015),(-122.2723,37.021)]" 44150400000000000 +road name="Broadway Ter ",thepath="[(-122.2429,37.393),(-122.2413,37.397)]" 44236800000000000 +road name="Brookdale Ave ",thepath="[(-122.2043,37.834),(-122.2032,37.824)]" 44323200000000000 +road name="Brookdale Ave ",thepath="[(-122.2092,37.878),(-122.208568,37.87208)]" 44409600000000000 +road name="Brookdale Ave ",thepath="[(-122.2095,37.888),(-122.2088,37.882)]" 44496000000000000 +road name="Brookdale Blvd",thepath="[(-122.0915,37.164),(-122.0912,37.166)]" 44582400000000000 +road name="Brookdale Blvd",thepath="[(-122.0965,37.123),(-122.0958,37.133)]" 44668800000000000 +road name="Brooklyn Ave ",thepath="[(-122.2425,37.029),(-122.2416,37.026)]" 44755200000000000 +road name="Brooklyn Ave ",thepath="[(-122.2455,37.04),(-122.2445,37.036)]" 44841600000000000 +road name="Brooklyn Ave ",thepath="[(-122.2502,37.055),(-122.2495,37.053)]" 44928000000000000 +road name="Brookside Ct ",thepath="[(-121.9218,37.902),(-121.9213,37.908)]" 45014400000000000 +road name="Browning Ct ",thepath="[(-122.037289,37.766),(-122.038366,37.76228)]" 45100800000000000 +road name="Browning St ",thepath="[(-122.2874,37.686),(-122.2872,37.669)]" 45187200000000000 +road name="Bruce Ct ",thepath="[(-122.0595,37.084),(-122.0588,37.076)]" 45273600000000000 +road name="Bruce Dr ",thepath="[(-121.9442,37.309),(-121.945,37.312)]" 45360000000000000 +road name="Brunetti Lane",thepath="[(-122.136,37.91),(-122.1351,37.906)]" 45446400000000000 +road name="Bruns road",thepath="[(-121.603992,37.95307),(-121.6046,37.049)]" 45532800000000000 +road name="Brush St ",thepath="[(-122.2788,37.065),(-122.2784,37.07)]" 45619200000000000 +road name="Brush St ",thepath="[(-122.283,37.989),(-122.2827,37.994)]" 45705600000000000 +road name="Brush Ramp St ",thepath="[(-122.2758,37.107),(-122.27511,37.11304),(-122.275,37.114)]" 45792000000000000 +road name="Bryant St ",thepath="[(-121.9216,37.321),(-121.9213,37.316)]" 45878400000000000 +road name="Bryce Canyon Ct ",thepath="[(-121.9008,37.78),(-121.9017,37.78)]" 45964800000000000 +road name="Buchanan St ",thepath="[(-122.3022,37.877),(-122.3014,37.878)]" 46051200000000000 +road name="Buckeye Pl ",thepath="[(-122.0448,37.336),(-122.0452,37.332)]" 46137600000000000 +road name="Buckingham Blvd",thepath="[(-122.2231,37.59),(-122.2214,37.606)]" 46224000000000000 +road name="Buckingham Way ",thepath="[(-122.0647,37.214),(-122.0653,37.214)]" 46310400000000000 +road name="Buckingham Way ",thepath="[(-122.0689,37.208),(-122.0693,37.207)]" 46396800000000000 +road name="Buckner Ter ",thepath="[(-122.060105,37.62504),(-122.059743,37.62326)]" 46483200000000000 +road name="Bucks Lake St ",thepath="[(-122.0559,37.882),(-122.0546,37.874)]" 46569600000000000 +road name="Buckskin road",thepath="[(-121.7421,37.213),(-121.7421,37.22)]" 46656000000000000 +road name="Budwing Ter ",thepath="[(-121.9516,37.136),(-121.951826,37.13555)]" 46742400000000000 +road name="Buena Ave ",thepath="[(-122.2786,37.792),(-122.2773,37.797)]" 46828800000000000 +road name="Buena Ave ",thepath="[(-122.2813,37.781),(-122.2807,37.782)]" 46915200000000000 +road name="Buena Vista Ave ",thepath="[(-122.2301,37.437),(-122.2295,37.424)]" 47001600000000000 +road name="Buena Vista Ave ",thepath="[(-122.2337,37.651),(-122.2328,37.645)]" 47088000000000000 +road name="Buena Vista Ave ",thepath="[(-122.2359,37.47),(-122.2353,37.468)]" 47174400000000000 +road name="Buena Vista Ave ",thepath="[(-122.251,37.735),(-122.2499,37.73)]" 47260800000000000 +road name="Buena Vista Ave ",thepath="[(-122.2687,37.774),(-122.2673,37.773)]" 47347200000000000 +road name="Buena Vista Ave ",thepath="[(-122.271,37.774),(-122.2698,37.774)]" 47433600000000000 +road name="Buena Vista Way ",thepath="[(-122.2609,37.805),(-122.2597,37.809)]" 47520000000000000 +road name="Bullard Dr ",thepath="[(-122.2157,37.297),(-122.2138,37.276)]" 47606400000000000 +road name="Bullard St ",thepath="[(-121.9694,37.355),(-121.97,37.349)]" 47692800000000000 +road name="Burdeck Dr ",thepath="[(-122.1939,37.099),(-122.1932,37.091)]" 47779200000000000 +road name="Burdette St ",thepath="[(-121.9789,37.609),(-121.9795,37.611)]" 47865600000000000 +road name="Burdette St ",thepath="[(-121.98,37.62),(-121.9801,37.626)]" 47952000000000000 +road name="Burdick St ",thepath="[(-122.0273,37.421),(-122.0266,37.418)]" 48038400000000000 +road name="Burk St ",thepath="[(-122.2501,37.101),(-122.2502,37.106)]" 48124800000000000 +road name="Burkhart Ave ",thepath="[(-122.1422,37.856),(-122.1431,37.859)]" 48211200000000000 +road name="Burlington St ",thepath="[(-122.2046,37.057),(-122.2042,37.058)]" 48297600000000000 +road name="Burnett St ",thepath="[(-122.2823,37.539),(-122.281,37.541)]" 48384000000000000 +road name="Burnham Way ",thepath="[(-121.9242,37.176),(-121.9243,37.183)]" 48470400000000000 +road name="Burnside Ct ",thepath="[(-122.0063,37.345),(-122.0069,37.338)]" 48556800000000000 +road name="Busby Ave ",thepath="[(-122.1545,37.79),(-122.154983,37.78916)]" 48643200000000000 +road name="Butte Ct ",thepath="[(-121.783,37.938),(-121.783,37.934)]" 48729600000000000 +road name="Butterfield Dr ",thepath="[(-122.0838,37.002),(-122.0834,37.987)]" 48816000000000000 +road name="C St ",thepath="[(-122.0218,37.05),(-122.0224,37.045)]" 48902400000000000 +road name="C St ",thepath="[(-122.0737,37.767),(-122.0722,37.778)]" 48988800000000000 +road name="C St ",thepath="[(-122.0773,37.742),(-122.0756,37.754)]" 49075200000000000 +road name="C St ",thepath="[(-122.0906,37.681),(-122.0896,37.684)]" 49161600000000000 +road name="C St ",thepath="[(-122.1737,37.418),(-122.1723,37.399),(-122.1716,37.393)]" 49248000000000000 +road name="C St ",thepath="[(-122.1768,37.46),(-122.1749,37.435)]" 49334400000000000 +road name="Cabello St ",thepath="[(-122.078,37.811),(-122.0783,37.807)]" 49420800000000000 +road name="Cabernet Ct ",thepath="[(-121.8636,37.593),(-121.8641,37.582)]" 49507200000000000 +road name="Cabot Blvd",thepath="[(-122.1334,37.412),(-122.1326,37.399)]" 49593600000000000 +road name="Cabot Ct ",thepath="[(-121.9848,37.583),(-121.9833,37.583)]" 49680000000000000 +road name="Cabral Dr ",thepath="[(-122.0294,37.569),(-122.0288,37.563)]" 49766400000000000 +road name="Cabral Dr ",thepath="[(-122.0348,37.648),(-122.035,37.643)]" 49852800000000000 +road name="Cabrillo Dr ",thepath="[(-122.0153,37.515),(-122.0144,37.511)]" 49939200000000000 +road name="Cabrillo Dr ",thepath="[(-122.0325,37.637),(-122.0318,37.633)]" 50025600000000000 +road name="Cabrillo Dr ",thepath="[(-122.091,37.218),(-122.0932,37.222)]" 50112000000000000 +road name="Cadiz Dr ",thepath="[(-122.0239,37.655),(-122.0235,37.653)]" 50198400000000000 +road name="Calaroga Ave ",thepath="[(-122.0886,37.297),(-122.0885,37.276)]" 50284800000000000 +road name="Calaroga Ave ",thepath="[(-122.0892,37.374),(-122.0888,37.361)]" 50371200000000000 +road name="Calaroga Ave ",thepath="[(-122.09,37.386),(-122.0897,37.38)]" 50457600000000000 +road name="Calaroga Ave ",thepath="[(-122.101,37.493),(-122.1006,37.487)]" 50544000000000000 +road name="Calaveras Ave ",thepath="[(-121.9924,37.364),(-121.9927,37.359)]" 50630400000000000 +road name="Calaveras Ave ",thepath="[(-122.1864,37.845),(-122.1854,37.841)]" 50716800000000000 +road name="Calaveras road",thepath="[(-121.8389,37.143),(-121.8338,37.128)]" 50803200000000000 +road name="Calaveras road",thepath="[(-121.8476,37.209),(-121.8431,37.178)]" 50889600000000000 +road name="Calaveras Creek ",thepath="[(-121.8203,37.035),(-121.8207,37.931)]" 50976000000000000 +road name="Calaveras Creek ",thepath="[(-121.8531,37.337),(-121.8517,37.316)]" 51062400000000000 +road name="Calaveras Creek ",thepath="[(-121.8637,37.611),(-121.8628,37.587)]" 51148800000000000 +road name="Calcott Ct ",thepath="[(-122.0306,37.822),(-122.0311,37.817)]" 51235200000000000 +road name="Caldecott Lane",thepath="[(-122.2312,37.512),(-122.2261,37.491)]" 51321600000000000 +road name="Calhoun St ",thepath="[(-122.0542,37.43),(-122.0521,37.428)]" 51408000000000000 +road name="Calhoun St ",thepath="[(-122.2409,37.553),(-122.2405,37.551)]" 51494400000000000 +road name="Caliban Dr ",thepath="[(-122.0553,37.765),(-122.053955,37.75806)]" 51580800000000000 +road name="Caliente Dr ",thepath="[(-122.1393,37.993),(-122.1409,37.99),(-122.1417,37.993)]" 51667200000000000 +road name="California St ",thepath="[(-122.1952,37.942),(-122.1946,37.935)]" 51753600000000000 +road name="California St ",thepath="[(-122.2032,37.005),(-122.2016,37.996)]" 51840000000000000 +road name="California St ",thepath="[(-122.2767,37.563),(-122.2767,37.554)]" 51926400000000000 +road name="California St ",thepath="[(-122.2791,37.698),(-122.2787,37.681)]" 52012800000000000 +road name="California St ",thepath="[(-122.2793,37.743),(-122.2794,37.733)]" 52099200000000000 +road name="California St ",thepath="[(-122.2795,37.761),(-122.2795,37.751)]" 52185600000000000 +road name="California Aqueduct ",thepath="[(-121.587742,37.65201),(-121.600239,37.70939)]" 52272000000000000 +road name="California Aqueduct ",thepath="[(-121.622944,37.98443),(-121.622669,37.98611)]" 52358400000000000 +road name="Call Ave ",thepath="[(-122.0435,37.56),(-122.0436,37.566)]" 52444800000000000 +road name="Calle Alegre ",thepath="[(-121.895178,37.71975),(-121.8946,37.725)]" 52531200000000000 +road name="Calle Altamira ",thepath="[(-121.8994,37.669),(-121.8988,37.656)]" 52617600000000000 +road name="Calle de la Mesa ",thepath="[(-121.905106,37.71532),(-121.906643,37.69977)]" 52704000000000000 +road name="Calle de Monte ",thepath="[(-122.2452,37.344),(-122.2456,37.34)]" 52790400000000000 +road name="Calle Morelia ",thepath="[(-121.9003,37.684),(-121.9006,37.691)]" 52876800000000000 +road name="Calmar Ave ",thepath="[(-122.2384,37.105),(-122.2381,37.113)]" 52963200000000000 +road name="Camanoe Lane",thepath="[(-122.2339,37.33),(-122.2334,37.326)]" 53049600000000000 +road name="Cambio Ct ",thepath="[(-122.0217,37.558),(-122.0226,37.552)]" 53136000000000000 +road name="Cambridge Ave ",thepath="[(-122.1616,37.335),(-122.1575,37.353)]" 53222400000000000 +road name="Cambridge Way ",thepath="[(-122.2442,37.231),(-122.2419,37.244)]" 53308800000000000 +road name="Camden St ",thepath="[(-121.9932,37.571),(-121.992,37.564)]" 53395200000000000 +road name="Camden St ",thepath="[(-121.9956,37.603),(-121.9955,37.598)]" 53481600000000000 +road name="Camden St ",thepath="[(-122.1823,37.735),(-122.1817,37.73)]" 53568000000000000 +road name="Camelford Pl ",thepath="[(-122.1933,37.211),(-122.1919,37.216)]" 53654400000000000 +road name="Camelia Dr ",thepath="[(-121.7852,37.695),(-121.7852,37.686)]" 53740800000000000 +road name="Camelia St ",thepath="[(-122.2928,37.792),(-122.2916,37.792)]" 53827200000000000 +road name="Camero Pl ",thepath="[(-121.9461,37.463),(-121.9453,37.454)]" 53913600000000000 +road name="Camero Way ",thepath="[(-121.9481,37.459),(-121.9488,37.456)]" 54000000000000000 +road name="Cameron Ave ",thepath="[(-121.86732,37.8431),(-121.865836,37.84371)]" 54086400000000000 +road name="Cameron Ave ",thepath="[(-122.1316,37.502),(-122.1327,37.481)]" 54172800000000000 +road name="Camino del Valle ",thepath="[(-122.2431,37.343),(-122.2437,37.334)]" 54259200000000000 +road name="Camino Santa Barbara ",thepath="[(-121.9314,37.446),(-121.9303,37.436)]" 54345600000000000 +road name="Camino Segura ",thepath="[(-121.900094,37.71647),(-121.9002,37.726)]" 54432000000000000 +road name="Campbell St ",thepath="[(-122.2941,37.123),(-122.2936,37.129)]" 54518400000000000 +road name="Campbell St ",thepath="[(-122.2985,37.066),(-122.2981,37.077)]" 54604800000000000 +road name="Campus Dr ",thepath="[(-122.0578,37.665),(-122.0545,37.66)]" 54691200000000000 +road name="Campus Dr ",thepath="[(-122.1626,37.858),(-122.1611,37.843)]" 54777600000000000 +road name="Campus Dr ",thepath="[(-122.1704,37.905),(-122.1678,37.868),(-122.1671,37.865)]" 54864000000000000 +road name="Canary Ct ",thepath="[(-122.019,37.856),(-122.0192,37.85)]" 54950400000000000 +road name="Canfield Dr ",thepath="[(-121.9952,37.488),(-121.9955,37.482)]" 55036800000000000 +road name="Canon Ave ",thepath="[(-122.21715,37.01951),(-122.2151,37.053)]" 55123200000000000 +road name="Canterbury Lane",thepath="[(-121.9277,37.141),(-121.9276,37.149)]" 55209600000000000 +road name="Canterbury St ",thepath="[(-121.995,37.573),(-121.9948,37.57)]" 55296000000000000 +road name="Canyon Heights Dr ",thepath="[(-121.9431,37.568),(-121.9433,37.571)]" 55382400000000000 +road name="Canyon Heights Dr ",thepath="[(-121.9513,37.618),(-121.9528,37.627)]" 55468800000000000 +road name="Canyon Heights Dr ",thepath="[(-121.9595,37.76),(-121.9596,37.753)]" 55555200000000000 +road name="Cape Cod Dr ",thepath="[(-122.1351,37.928),(-122.1331,37.928)]" 55641600000000000 +road name="Capella Lane",thepath="[(-122.2345,37.322),(-122.2352,37.326)]" 55728000000000000 +road name="Capitan Dr ",thepath="[(-121.84488,37.65695),(-121.84458,37.65195)]" 55814400000000000 +road name="Capricorn Ave ",thepath="[(-122.2176,37.404),(-122.2164,37.384)]" 55900800000000000 +road name="Capulet Cir ",thepath="[(-122.057612,37.69268),(-122.0578,37.7)]" 55987200000000000 +road name="Cardinal Dr ",thepath="[(-121.7865,37.805),(-121.7858,37.805)]" 56073600000000000 +road name="Caribbean Com ",thepath="[(-122.0361,37.73),(-122.0366,37.724)]" 56160000000000000 +road name="Carleton St ",thepath="[(-122.2641,37.617),(-122.2619,37.62)]" 56246400000000000 +road name="Carlos Bee Blvd",thepath="[(-122.065049,37.59928),(-122.0639,37.596)]" 56332800000000000 +road name="Carlston Ave ",thepath="[(-122.23,37.132),(-122.2307,37.141)]" 56419200000000000 +road name="Carmel Ave ",thepath="[(-122.2891,37.979),(-122.2893,37.968),(-122.2893,37.95)]" 56505600000000000 +road name="Carmel Dr ",thepath="[(-122.0965,37.135),(-122.0958,37.133)]" 56592000000000000 +road name="Carmel Way ",thepath="[(-122.1394,37.979),(-122.1386,37.98)]" 56678400000000000 +road name="Carmel Way ",thepath="[(-122.1419,37.98),(-122.1411,37.98)]" 56764800000000000 +road name="Carmen St ",thepath="[(-121.9501,37.38),(-121.9484,37.369)]" 56851200000000000 +road name="Carnation Way ",thepath="[(-121.9975,37.775),(-121.996,37.773)]" 56937600000000000 +road name="Carol Ave ",thepath="[(-121.9537,37.283),(-121.955,37.282)]" 57024000000000000 +road name="Carol Ave ",thepath="[(-121.9574,37.279),(-121.959,37.277)]" 57110400000000000 +road name="Carol Ave ",thepath="[(-121.9657,37.27),(-121.9679,37.268)]" 57196800000000000 +road name="Caroline St ",thepath="[(-122.2676,37.695),(-122.2676,37.706)]" 57283200000000000 +road name="Carolyn St ",thepath="[(-122.1108,37.038),(-122.1091,37.028)]" 57369600000000000 +road name="Carpentier St ",thepath="[(-122.1567,37.203),(-122.1561,37.194)]" 57456000000000000 +road name="Carriage Circle Com ",thepath="[(-122.0128,37.433),(-122.0129,37.431)]" 57542400000000000 +road name="Carrol road",thepath="[(-121.659839,37.19494),(-121.659626,37.19326)]" 57628800000000000 +road name="Carson St ",thepath="[(-122.1846,37.9),(-122.1843,37.901)]" 57715200000000000 +road name="Carver Lane",thepath="[(-121.877,37.057),(-121.8811,37.068)]" 57801600000000000 +road name="Cascade road",thepath="[(-122.1832,37.241),(-122.1808,37.216)]" 57888000000000000 +road name="Cascade St ",thepath="[(-122.0839,37.416),(-122.0831,37.416)]" 57974400000000000 +road name="Cascade St ",thepath="[(-122.0894,37.448),(-122.0887,37.431)]" 58060800000000000 +road name="Cassiopia St ",thepath="[(-121.735979,37.18311),(-121.735979,37.19069)]" 58147200000000000 +road name="Castilian road",thepath="[(-121.9447,37.135),(-121.9445,37.14)]" 58233600000000000 +road name="Castille Lane",thepath="[(-122.0826,37.811),(-122.082655,37.8124)]" 58320000000000000 +road name="Castillejo road",thepath="[(-121.9397,37.313),(-121.9396,37.304)]" 58406400000000000 +road name="Castle Park Way ",thepath="[(-122.1936,37.15),(-122.1933,37.151)]" 58492800000000000 +road name="Castlewood Dr ",thepath="[(-121.8895,37.376),(-121.8902,37.373)]" 58579200000000000 +road name="Castro St ",thepath="[(-122.1629,37.144),(-122.1636,37.141)]" 58665600000000000 +road name="Castro St ",thepath="[(-122.2739,37.114),(-122.2735,37.121)]" 58752000000000000 +road name="Castro St ",thepath="[(-122.2749,37.1),(-122.2746,37.103)]" 58838400000000000 +road name="Castro St ",thepath="[(-122.2757,37.084),(-122.2753,37.091)]" 58924800000000000 +road name="Castro St ",thepath="[(-122.2782,37.045),(-122.2778,37.052)]" 59011200000000000 +road name="Castro St ",thepath="[(-122.2787,37.03),(-122.2785,37.038)]" 59097600000000000 +road name="Castro Valley Blvd",thepath="[(-122.0478,37.966),(-122.047,37.969)]" 59184000000000000 +road name="Castro Valley Blvd",thepath="[(-122.049131,37.96068),(-122.048358,37.96377)]" 59270400000000000 +road name="Castro Valley Blvd",thepath="[(-122.0604,37.92),(-122.0585,37.925)]" 59356800000000000 +road name="Castro Valley Blvd",thepath="[(-122.081,37.954),(-122.0801,37.955)]" 59443200000000000 +road name="Castro Valley Blvd",thepath="[(-122.086,37.939),(-122.0853,37.942)]" 59529600000000000 +road name="Catalina Ave ",thepath="[(-122.2458,37.329),(-122.246102,37.33109)]" 59616000000000000 +road name="Catalina Dr ",thepath="[(-121.7837,37.628),(-121.7834,37.628)]" 59702400000000000 +road name="Catalina Dr ",thepath="[(-121.7892,37.66),(-121.7896,37.649)]" 59788800000000000 +road name="Catalpa Way ",thepath="[(-122.0852,37.218),(-122.088,37.207)]" 59875200000000000 +road name="Cato Ct ",thepath="[(-122.0691,37.944),(-122.0694,37.938)]" 59961600000000000 +road name="Catron Dr ",thepath="[(-122.1716,37.27),(-122.1711,37.275)]" 60048000000000000 +road name="Cavalier Lane",thepath="[(-121.9361,37.175),(-121.9363,37.189)]" 60134400000000000 +road name="Cavendish Dr ",thepath="[(-122.0477,37.158),(-122.0475,37.151)]" 60220800000000000 +road name="Cavour St ",thepath="[(-122.2555,37.375),(-122.2561,37.379)]" 60307200000000000 +road name="Cayuga Pl ",thepath="[(-121.9205,37.023),(-121.9218,37.02)]" 60393600000000000 +road name="Cayuga Way ",thepath="[(-121.9233,37.013),(-121.9239,37.008)]" 60480000000000000 +road name="Cedar Blvd",thepath="[(-122.0214,37.402),(-122.0193,37.391)]" 60566400000000000 +road name="Cedar Blvd",thepath="[(-122.0282,37.446),(-122.0265,37.43)]" 60652800000000000 +road name="Cedar Dr ",thepath="[(-121.7964,37.859),(-121.7941,37.858),(-121.7931,37.858)]" 60739200000000000 +road name="Cedar Lane",thepath="[(-121.9173,37.08),(-121.9183,37.083),(-121.9196,37.089),(-121.92,37.098)]" 60825600000000000 +road name="Cedar St ",thepath="[(-121.9188,37.277),(-121.92,37.276)]" 60912000000000000 +road name="Cedar St ",thepath="[(-122.260055,37.79558),(-122.2582,37.798)]" 60998400000000000 +road name="Cedar St ",thepath="[(-122.2841,37.764),(-122.2818,37.766)]" 61084800000000000 +road name="Cedar St ",thepath="[(-122.2864,37.76),(-122.2858,37.762)]" 61171200000000000 +road name="Cedar St ",thepath="[(-122.2913,37.755),(-122.2905,37.756)]" 61257600000000000 +road name="Cedar St ",thepath="[(-122.2945,37.75),(-122.2934,37.753)]" 61344000000000000 +road name="Cedar St ",thepath="[(-122.3011,37.737),(-122.2999,37.739)]" 61430400000000000 +road name="Cedar St ",thepath="[(-122.3043,37.729),(-122.3032,37.732)]" 61516800000000000 +road name="Cedar St ",thepath="[(-122.3045,37.078),(-122.3041,37.087)]" 61603200000000000 +road name="Cedarwood Lane",thepath="[(-121.8746,37.706),(-121.8746,37.721)]" 61689600000000000 +road name="Celia St ",thepath="[(-122.0611,37.3),(-122.0616,37.299)]" 61776000000000000 +road name="Celia St ",thepath="[(-122.0623,37.297),(-122.0631,37.296)]" 61862400000000000 +road name="Center St ",thepath="[(-122.0598,37.052),(-122.0593,37.046)]" 61948800000000000 +road name="Center St ",thepath="[(-122.0599,37.111),(-122.06,37.106)]" 62035200000000000 +road name="Center St ",thepath="[(-122.0606,37.968),(-122.0608,37.958)]" 62121600000000000 +road name="Center St ",thepath="[(-122.2674,37.704),(-122.267,37.704)]" 62208000000000000 +road name="Central Ave ",thepath="[(-122.0064,37.524),(-122.0079,37.505)]" 62294400000000000 +road name="Central Ave ",thepath="[(-122.0118,37.455),(-122.0129,37.443)]" 62380800000000000 +road name="Central Ave ",thepath="[(-122.0148,37.415),(-122.0157,37.404)]" 62467200000000000 +road name="Central Ave ",thepath="[(-122.0302,37.226),(-122.0325,37.196)]" 62553600000000000 +road name="Central Ave ",thepath="[(-122.0487,37.144),(-122.0452,37.158)]" 62640000000000000 +road name="Central Ave ",thepath="[(-122.2309,37.579),(-122.2276,37.557)]" 62726400000000000 +road name="Central Ave ",thepath="[(-122.2343,37.602),(-122.2331,37.595)]" 62812800000000000 +road name="Central Ave ",thepath="[(-122.27,37.715),(-122.2685,37.714)]" 62899200000000000 +road name="Central Ave ",thepath="[(-122.2787,37.718),(-122.2777,37.717),(-122.2762,37.717)]" 62985600000000000 +road name="Central Ave ",thepath="[(-122.2906,37.769),(-122.2905,37.756)]" 63072000000000000 +road name="Central Blvd",thepath="[(-122.0643,37.553),(-122.0633,37.552),(-122.0622,37.545)]" 63158400000000000 +road name="Central Blvd",thepath="[(-122.0703,37.582),(-122.0697,37.586)]" 63244800000000000 +road name="Cerrito St ",thepath="[(-122.3023,37.93),(-122.3018,37.918)]" 63331200000000000 +road name="Cerro Vista Pl ",thepath="[(-121.73402,37.74008),(-121.735461,37.73955)]" 63417600000000000 +road name="Chabolyn Ter ",thepath="[(-122.242959,37.5192),(-122.2429,37.519)]" 63504000000000000 +road name="Chabot Ct ",thepath="[(-122.2432,37.489),(-122.2439,37.5)]" 63590400000000000 +road name="Chabot Canal ",thepath="[(-121.9027,37.804),(-121.9027,37.812)]" 63676800000000000 +road name="Chabot Canal ",thepath="[(-121.9036,37.013),(-121.9044,37.017)]" 63763200000000000 +road name="Chabot Canal ",thepath="[(-121.9044,37.017),(-121.9037,37.02)]" 63849600000000000 +road name="Chabot Crest ",thepath="[(-122.2425,37.504),(-122.2427,37.514)]" 63936000000000000 +road name="Chambers Dr ",thepath="[(-122.2004,37.352),(-122.1972,37.368)]" 64022400000000000 +road name="Chambers Lane",thepath="[(-122.2001,37.359),(-122.1975,37.371)]" 64108800000000000 +road name="Champagne Pl ",thepath="[(-121.950378,37.11376),(-121.949579,37.11174)]" 64195200000000000 +road name="Champion St ",thepath="[(-122.214,37.991),(-122.2147,37.002)]" 64281600000000000 +road name="Champion St ",thepath="[(-122.2146,37.977),(-122.2145,37.982)]" 64368000000000000 +road name="Chance St ",thepath="[(-122.0536,37.259),(-122.0534,37.256)]" 64454400000000000 +road name="Chandler road",thepath="[(-122.10851,37.48139),(-122.108787,37.48677)]" 64540800000000000 +road name="Channel St ",thepath="[(-122.1372,37.71),(-122.1369,37.706)]" 64627200000000000 +road name="Channing Way ",thepath="[(-122.2453,37.425),(-122.2466,37.408)]" 64713600000000000 +road name="Channing Way ",thepath="[(-122.2638,37.664),(-122.2629,37.665),(-122.2606,37.669)]" 64800000000000000 +road name="Channing Way ",thepath="[(-122.2695,37.657),(-122.2669,37.66)]" 64886400000000000 +road name="Channing Way ",thepath="[(-122.2727,37.652),(-122.2717,37.653)]" 64972800000000000 +road name="Channing Way ",thepath="[(-122.2806,37.641),(-122.2795,37.641)]" 65059200000000000 +road name="Channing Way ",thepath="[(-122.2842,37.636),(-122.2835,37.637)]" 65145600000000000 +road name="Channing Way ",thepath="[(-122.292641,37.62357),(-122.2925,37.624)]" 65232000000000000 +road name="Chapel Ct ",thepath="[(-122.1508,37.897),(-122.1508,37.894)]" 65318400000000000 +road name="Chapman Dr ",thepath="[(-122.0421,37.504),(-122.0414,37.498)]" 65404800000000000 +road name="Chardonnay Dr ",thepath="[(-121.846993,37.64201),(-121.846448,37.64146)]" 65491200000000000 +road name="Charles St ",thepath="[(-122.0255,37.505),(-122.0252,37.499)]" 65577600000000000 +road name="Charlotte Way ",thepath="[(-121.7247,37.839),(-121.7246,37.836)]" 65664000000000000 +road name="Charlotte Way ",thepath="[(-121.7261,37.856),(-121.7254,37.851)]" 65750400000000000 +road name="Charlotte Way ",thepath="[(-121.733871,37.88044),(-121.734295,37.88051)]" 65836800000000000 +road name="Charter Oaks Dr ",thepath="[(-122.0574,37.212),(-122.0568,37.22)]" 65923200000000000 +road name="Chateau Way ",thepath="[(-121.7627,37.727),(-121.7627,37.723)]" 66009600000000000 +road name="Chateau Park Ct ",thepath="[(-121.9658,37.196),(-121.966,37.193)]" 66096000000000000 +road name="Chatsworth St ",thepath="[(-121.7766,37.502),(-121.7766,37.496)]" 66182400000000000 +road name="Chaucer Dr ",thepath="[(-122.0339,37.813),(-122.0342,37.812)]" 66268800000000000 +road name="Chaucer Dr ",thepath="[(-122.0357,37.794),(-122.0362,37.788)]" 66355200000000000 +road name="Chelsea Dr ",thepath="[(-122.03044,37.5228),(-122.0303,37.522)]" 66441600000000000 +road name="Chelsea Way ",thepath="[(-122.068,37.224),(-122.0686,37.223)]" 66528000000000000 +road name="Chelton Dr ",thepath="[(-122.189,37.293),(-122.1887,37.304)]" 66614400000000000 +road name="Chemult Com ",thepath="[(-121.9254,37.878),(-121.9255,37.881)]" 66700800000000000 +road name="Cherry Lane",thepath="[(-121.966799,37.63085),(-121.966874,37.63373)]" 66787200000000000 +road name="Cherry St ",thepath="[(-122.0266,37.297),(-122.0258,37.294)]" 66873600000000000 +road name="Cherry St ",thepath="[(-122.040954,37.37918),(-122.04,37.369)]" 66960000000000000 +road name="Cherry St ",thepath="[(-122.0429,37.396),(-122.0424,37.392)]" 67046400000000000 +road name="Cherry St ",thepath="[(-122.0437,37.42),(-122.0434,37.413)]" 67132800000000000 +road name="Cherry St ",thepath="[(-122.1511,37.161),(-122.1503,37.149)]" 67219200000000000 +road name="Cherry St ",thepath="[(-122.1671,37.488),(-122.1661,37.474)]" 67305600000000000 +road name="Cherry St ",thepath="[(-122.1691,37.512),(-122.1684,37.502)]" 67392000000000000 +road name="Cherrywood Dr ",thepath="[(-122.023,37.838),(-122.0237,37.82)]" 67478400000000000 +road name="Cheryl Cir ",thepath="[(-121.8979,37.8),(-121.8957,37.794)]" 67564800000000000 +road name="Cheryl Ann Cir ",thepath="[(-122.0754,37.352),(-122.076,37.358)]" 67651200000000000 +road name="Chester St ",thepath="[(-122.0791,37.955),(-122.079,37.932)]" 67737600000000000 +road name="Chester St ",thepath="[(-122.2949,37.07),(-122.2946,37.078)]" 67824000000000000 +road name="Chestnut St ",thepath="[(-122.2482,37.733),(-122.2475,37.742)]" 67910400000000000 +road name="Chestnut St ",thepath="[(-122.2853,37.069),(-122.2848,37.084)]" 67996800000000000 +road name="Chestnut St ",thepath="[(-122.2873,37.722),(-122.2873,37.711)]" 68083200000000000 +road name="Chetwood Ave ",thepath="[(-121.9591,37.232),(-121.960057,37.23087)]" 68169600000000000 +road name="Chetwood St ",thepath="[(-122.2521,37.167),(-122.2513,37.169)]" 68256000000000000 +road name="Cheyenne River Com ",thepath="[(-122.0521,37.779),(-122.0524,37.775)]" 68342400000000000 +road name="Chiltern Dr ",thepath="[(-121.9414,37.433),(-121.9412,37.424)]" 68428800000000000 +road name="Chiltern Dr ",thepath="[(-121.9447,37.457),(-121.9442,37.454)]" 68515200000000000 +road name="Chimney Rock ",thepath="[(-122.13,37.701),(-122.12905,37.70195)]" 68601600000000000 +road name="Chippendale Dr ",thepath="[(-122.0665,37.843),(-122.068,37.828)]" 68688000000000000 +road name="Chisholm Ct ",thepath="[(-122.0773,37.42),(-122.077,37.409)]" 68774400000000000 +road name="Choctaw Dr ",thepath="[(-121.9179,37.87),(-121.9172,37.876)]" 68860800000000000 +road name="Chris Commons ",thepath="[(-121.73647,37.89437),(-121.736359,37.88665)]" 68947200000000000 +road name="Chrisholm Pl ",thepath="[(-121.9599,37.726),(-121.9592,37.732)]" 69033600000000000 +road name="Christensen Ct ",thepath="[(-122.0863,37.074),(-122.0863,37.065)]" 69120000000000000 +road name="Christensen Lane",thepath="[(-122.085026,37.06463),(-122.0844,37.064)]" 69206400000000000 +road name="Christensen road",thepath="[(-121.625309,37.79774),(-121.621265,37.83993)]" 69292800000000000 +road name="Christina Ct ",thepath="[(-121.8654,37.629),(-121.8651,37.616)]" 69379200000000000 +road name="Christine Dr ",thepath="[(-122.0759,37.739),(-122.0756,37.734)]" 69465600000000000 +road name="Christine St ",thepath="[(-122.0364,37.385),(-122.0357,37.379)]" 69552000000000000 +road name="Christy St ",thepath="[(-121.9662,37.022),(-121.9658,37.019)]" 69638400000000000 +road name="Church St ",thepath="[(-122.179,37.675),(-122.1785,37.678)]" 69724800000000000 +road name="Cindy Lane",thepath="[(-121.7346,37.8244),(-121.734673,37.83042)]" 69811200000000000 +road name="Circle Way ",thepath="[(-121.9418,37.013),(-121.9422,37.02)]" 69897600000000000 +road name="Citron Way ",thepath="[(-122.1008,37.461),(-122.1017,37.46)]" 69984000000000000 +road name="Civic Terrace Ave ",thepath="[(-122.0251,37.389),(-122.0263,37.374)]" 70070400000000000 +road name="Clara St ",thepath="[(-122.1855,37.377),(-122.1851,37.381)]" 70156800000000000 +road name="Clara St ",thepath="[(-122.187,37.339),(-122.1865,37.357)]" 70243200000000000 +road name="Claremont Ave ",thepath="[(-122.2429,37.607),(-122.2421,37.609)]" 70329600000000000 +road name="Claremont Ave ",thepath="[(-122.243294,37.59318),(-122.2434,37.59)]" 70416000000000000 +road name="Claremont Ave ",thepath="[(-122.246,37.565),(-122.2461,37.562)]" 70502400000000000 +road name="Claremont Ave ",thepath="[(-122.2508,37.509),(-122.2505,37.514)]" 70588800000000000 +road name="Claremont Ave ",thepath="[(-122.2591,37.408),(-122.2586,37.413)]" 70675200000000000 +road name="Claremont Ave ",thepath="[(-122.2612,37.386),(-122.2604,37.393)]" 70761600000000000 +road name="Claremont Pl ",thepath="[(-122.0542,37.995),(-122.0542,37.008)]" 70848000000000000 +road name="Clarendon Cres",thepath="[(-122.2278,37.126),(-122.2266,37.119)]" 70934400000000000 +road name="Claret road",thepath="[(-121.757012,37.72568),(-121.757266,37.71391)]" 71020800000000000 +road name="Clarewood Lane",thepath="[(-122.2343,37.393),(-122.232365,37.38802)]" 71107200000000000 +road name="Clarke Lane",thepath="[(-122.236271,37.29202),(-122.236552,37.28906)]" 71193600000000000 +road name="Clarke St ",thepath="[(-122.1568,37.225),(-122.1562,37.217)]" 71280000000000000 +road name="Clausen Ct ",thepath="[(-122.040846,37.6758),(-122.040845,37.66913)]" 71366400000000000 +road name="Clawiter road",thepath="[(-122.1186,37.321),(-122.1186,37.308)]" 71452800000000000 +road name="Clawiter road",thepath="[(-122.1187,37.442),(-122.1188,37.435)]" 71539200000000000 +road name="Clay St ",thepath="[(-122.2733,37.051),(-122.2729,37.059)]" 71625600000000000 +road name="Clay St ",thepath="[(-122.2755,37.017),(-122.2751,37.024)]" 71712000000000000 +road name="Clement Ave ",thepath="[(-122.2525,37.765),(-122.252147,37.76429)]" 71798400000000000 +road name="Cleveland Ave ",thepath="[(-122.3061,37.895),(-122.3058,37.889)]" 71884800000000000 +road name="Cleveland St ",thepath="[(-122.2435,37.048),(-122.2418,37.042)]" 71971200000000000 +road name="Clifton St ",thepath="[(-122.2526,37.383),(-122.2533,37.388)]" 72057600000000000 +road name="Clipper Dr ",thepath="[(-122.2438,37.42),(-122.2437,37.406)]" 72144000000000000 +road name="Clover St ",thepath="[(-122.023,37.805),(-122.0217,37.801)]" 72230400000000000 +road name="Clubhouse Dr ",thepath="[(-121.8179,37.971),(-121.8181,37.972)]" 72316800000000000 +road name="Clubhouse Dr ",thepath="[(-122.121,37.67),(-122.1215,37.671)]" 72403200000000000 +road name="Clubhouse Dr ",thepath="[(-122.1227,37.671),(-122.1234,37.67)]" 72489600000000000 +road name="Cluny Pl ",thepath="[(-122.0438,37.432),(-122.0433,37.432)]" 72576000000000000 +road name="Coach Dr ",thepath="[(-122.1383,37.735),(-122.1355,37.706)]" 72662400000000000 +road name="Cobblestone Dr ",thepath="[(-122.00122,37.8492),(-122.000944,37.84795)]" 72748800000000000 +road name="Coco Palm Dr ",thepath="[(-121.9905,37.311),(-121.991,37.305)]" 72835200000000000 +road name="Codornices Creek ",thepath="[(-122.2986,37.83),(-122.2994,37.828)]" 72921600000000000 +road name="Codornices Creek ",thepath="[(-122.3069,37.818),(-122.3074,37.817)]" 73008000000000000 +road name="Cody Ct ",thepath="[(-121.9853,37.324),(-121.986,37.316)]" 73094400000000000 +road name="Coit Ave ",thepath="[(-121.9244,37.346),(-121.9244,37.338)]" 73180800000000000 +road name="Coit Ave ",thepath="[(-121.9245,37.352),(-121.924594,37.362)]" 73267200000000000 +road name="Colby St ",thepath="[(-122.1282,37.959),(-122.1279,37.959)]" 73353600000000000 +road name="Cold Water Dr ",thepath="[(-122.0403,37.068),(-122.041,37.069)]" 73440000000000000 +road name="Cole Pl ",thepath="[(-122.057,37.343),(-122.0564,37.334)]" 73526400000000000 +road name="Cole St ",thepath="[(-122.1974,37.724),(-122.1975,37.716)]" 73612800000000000 +road name="Cole St ",thepath="[(-122.1975,37.749),(-122.1962,37.76)]" 73699200000000000 +road name="Coleen St ",thepath="[(-121.79,37.763),(-121.7892,37.744)]" 73785600000000000 +road name="Coleport Landing ",thepath="[(-122.2374,37.426),(-122.2378,37.42)]" 73872000000000000 +road name="Coleport Landing ",thepath="[(-122.237889,37.41293),(-122.2379,37.412)]" 73958400000000000 +road name="Colette St ",thepath="[(-122.063,37.46),(-122.0623,37.451)]" 74044800000000000 +road name="Colette St ",thepath="[(-122.06565,37.4825),(-122.0646,37.479)]" 74131200000000000 +road name="Colgate Dr ",thepath="[(-122.0271,37.94),(-122.0249,37.933)]" 74217600000000000 +road name="Colgate St ",thepath="[(-122.1545,37.019),(-122.1538,37.014)]" 74304000000000000 +road name="Colima Ct ",thepath="[(-122.0251,37.664),(-122.0245,37.661)]" 74390400000000000 +road name="Coliseum Way ",thepath="[(-122.19759,37.4533),(-122.1948,37.444)]" 74476800000000000 +road name="Coliseum Way ",thepath="[(-122.2001,37.47),(-122.1978,37.516)]" 74563200000000000 +road name="Coliseum Way ",thepath="[(-122.2113,37.626),(-122.2085,37.592),(-122.2063,37.568)]" 74649600000000000 +road name="College Ave ",thepath="[(-121.7675,37.745),(-121.7658,37.745)]" 74736000000000000 +road name="College Ave ",thepath="[(-121.7693,37.744),(-121.769,37.744)]" 74822400000000000 +road name="College Ave ",thepath="[(-122.2506,37.367),(-122.2508,37.374)]" 74908800000000000 +road name="College Ave ",thepath="[(-122.2511,37.421),(-122.2512,37.429)]" 74995200000000000 +road name="College Ave ",thepath="[(-122.2516,37.474),(-122.2518,37.483)]" 75081600000000000 +road name="Collier Dr ",thepath="[(-122.1409,37.299),(-122.14,37.302)]" 75168000000000000 +road name="Colonial Loma Verde Dr ",thepath="[(-122.1184,37.849),(-122.117278,37.85528)]" 75254400000000000 +road name="Colony Ct ",thepath="[(-122.061894,37.27773),(-122.061805,37.27497)]" 75340800000000000 +road name="Colorados Dr ",thepath="[(-122.1757,37.281),(-122.1748,37.301)]" 75427200000000000 +road name="Columbia Dr ",thepath="[(-122.0574,37.168),(-122.0568,37.183)]" 75513600000000000 +road name="Columbia Dr ",thepath="[(-122.057463,37.28811),(-122.057463,37.28593)]" 75600000000000000 +road name="Columbian Dr ",thepath="[(-122.1635,37.727),(-122.1627,37.734)]" 75686400000000000 +road name="Columbine Pl ",thepath="[(-122.0122,37.321),(-122.013,37.33)]" 75772800000000000 +road name="Columbus Ave ",thepath="[(-121.776,37.679),(-121.7753,37.682)]" 75859200000000000 +road name="Columbus Ave ",thepath="[(-121.7786,37.68),(-121.7777,37.681)]" 75945600000000000 +road name="Colusa Ave ",thepath="[(-122.2786,37.835),(-122.2784,37.831)]" 76032000000000000 +road name="Colusa Ave ",thepath="[(-122.2794,37.922),(-122.2793,37.916)]" 76118400000000000 +road name="Colusa Ave ",thepath="[(-122.2812,37.943),(-122.2805,37.939)]" 76204800000000000 +road name="Colusa Ave ",thepath="[(-122.2847,37.973),(-122.2846,37.967)]" 76291200000000000 +road name="Colville Pl ",thepath="[(-122.0419,37.709),(-122.0402,37.702)]" 76377600000000000 +road name="Concannon Blvd",thepath="[(-121.7804,37.608),(-121.779,37.608)]" 76464000000000000 +road name="Concord St ",thepath="[(-121.8551,37.602),(-121.856,37.593)]" 76550400000000000 +road name="Constitution Dr ",thepath="[(-121.816179,37.01178),(-121.816179,37.01023)]" 76636800000000000 +road name="Contra Costa Ave ",thepath="[(-122.0153,37.551),(-122.0141,37.545)]" 76723200000000000 +road name="Contra Costa Ave ",thepath="[(-122.2754,37.944),(-122.2754,37.918)]" 76809600000000000 +road name="Contreras Pl ",thepath="[(-122.0386,37.553),(-122.0387,37.55)]" 76896000000000000 +road name="Conway Ter ",thepath="[(-122.044884,37.64441),(-122.04466,37.64514)]" 76982400000000000 +road name="Coolidge Ave ",thepath="[(-122.2007,37.058),(-122.1992,37.06)]" 77068800000000000 +road name="Coolidge Ave ",thepath="[(-122.2104,37.957),(-122.2099,37.962)]" 77155200000000000 +road name="Coolidge Ave ",thepath="[(-122.2171,37.872),(-122.2169,37.875)]" 77241600000000000 +road name="Coral road",thepath="[(-122.1907,37.34),(-122.1902,37.334)]" 77328000000000000 +road name="Core Ter ",thepath="[(-122.047353,37.65391),(-122.047303,37.65185)]" 77414400000000000 +road name="Corey Way ",thepath="[(-122.0699,37.054),(-122.0698,37.046)]" 77500800000000000 +road name="Cormorant Ter ",thepath="[(-122.045468,37.80753),(-122.044829,37.80392)]" 77587200000000000 +road name="Cornell Ave ",thepath="[(-122.2956,37.925),(-122.2949,37.906),(-122.2939,37.875)]" 77673600000000000 +road name="Corning Ct ",thepath="[(-122.0689,37.688),(-122.0685,37.68)]" 77760000000000000 +road name="Cornish Dr ",thepath="[(-122.0228,37.75),(-122.0225,37.754)]" 77846400000000000 +road name="Coronado Lane",thepath="[(-121.9026,37.843),(-121.9028,37.843)]" 77932800000000000 +road name="Corral Hollow Creek ",thepath="[(-121.590572,37.01116),(-121.599735,37.10676)]" 78019200000000000 +road name="Corriea Way ",thepath="[(-121.9501,37.402),(-121.9505,37.398)]" 78105600000000000 +road name="Corte de Flores ",thepath="[(-121.908126,37.71073),(-121.90924,37.71391)]" 78192000000000000 +road name="Corte Eulalia ",thepath="[(-122.1142,37.78),(-122.1154,37.776)]" 78278400000000000 +road name="Corte Munras ",thepath="[(-121.900576,37.74452),(-121.900804,37.74889)]" 78364800000000000 +road name="Corte Vera Cruz ",thepath="[(-121.9036,37.639),(-121.9038,37.642)]" 78451200000000000 +road name="Corte Yolanda ",thepath="[(-122.1426,37.753),(-122.1423,37.749)]" 78537600000000000 +road name="Cortland Way ",thepath="[(-121.7892,37.934),(-121.7885,37.939)]" 78624000000000000 +road name="Corvair St ",thepath="[(-122.2126,37.364),(-122.2132,37.36)]" 78710400000000000 +road name="Corvallis St ",thepath="[(-122.1527,37.974),(-122.1521,37.97)]" 78796800000000000 +road name="Cosgrave Ave ",thepath="[(-122.1621,37.62),(-122.1616,37.626)]" 78883200000000000 +road name="Cosmic Way ",thepath="[(-121.9659,37.423),(-121.9666,37.414)]" 78969600000000000 +road name="Cottage St ",thepath="[(-122.2593,37.713),(-122.258931,37.71803)]" 79056000000000000 +road name="Cotter Way ",thepath="[(-122.0904,37.818),(-122.0882,37.829)]" 79142400000000000 +road name="Cotton Ct ",thepath="[(-122.0462,37.123),(-122.0469,37.117)]" 79228800000000000 +road name="Cottonwood St ",thepath="[(-121.9116,37.732),(-121.9115,37.725)]" 79315200000000000 +road name="Cottonwood St ",thepath="[(-121.912,37.74),(-121.9118,37.735)]" 79401600000000000 +road name="Country Dr ",thepath="[(-121.9903,37.52),(-121.9916,37.506)]" 79488000000000000 +road name="Court St ",thepath="[(-122.2331,37.583),(-122.2324,37.589),(-122.2314,37.598)]" 79574400000000000 +road name="Courtland Ave ",thepath="[(-122.2041,37.801),(-122.2032,37.815)]" 79660800000000000 +road name="Courtland Ave ",thepath="[(-122.2084,37.76),(-122.2068,37.772)]" 79747200000000000 +road name="Cove road",thepath="[(-122.2468,37.425),(-122.2474,37.408)]" 79833600000000000 +road name="Covington Way ",thepath="[(-121.7935,37.936),(-121.7911,37.942)]" 79920000000000000 +road name="Cowing road",thepath="[(-122.0002,37.934),(-121.9772,37.782)]" 80006400000000000 +road name="Cowper St ",thepath="[(-122.2908,37.673),(-122.2894,37.675)]" 80092800000000000 +road name="Coyote Hills Slough ",thepath="[(-122.0904,37.85),(-122.0953,37.829)]" 80179200000000000 +road name="Coyote Hills Slough ",thepath="[(-122.1075,37.687),(-122.1285,37.643)]" 80265600000000000 +road name="Coyote River ",thepath="[(-121.931582,37.60707),(-121.932309,37.60824)]" 80352000000000000 +road name="Coyote River ",thepath="[(-121.9505,37.629),(-121.9582,37.646)]" 80438400000000000 +road name="Coyote River ",thepath="[(-121.9746,37.617),(-121.9863,37.648)]" 80524800000000000 +road name="Cragmont Ave ",thepath="[(-122.2616,37.921),(-122.2603,37.911)]" 80611200000000000 +road name="Cragmont Ave ",thepath="[(-122.266,37.95),(-122.2656,37.943)]" 80697600000000000 +road name="Craig St ",thepath="[(-121.9869,37.61),(-121.9864,37.601)]" 80784000000000000 +road name="Crane Ave ",thepath="[(-122.0578,37.103),(-122.058,37.086)]" 80870400000000000 +road name="Creed road",thepath="[(-122.2249,37.094),(-122.2256,37.101)]" 80956800000000000 +road name="Creekside Dr ",thepath="[(-121.924308,37.89385),(-121.925368,37.89008)]" 81043200000000000 +road name="Creekside Dr ",thepath="[(-121.926024,37.88774),(-121.926337,37.88663)]" 81129600000000000 +road name="Creekside Ter ",thepath="[(-121.997958,37.64593),(-121.998047,37.63504)]" 81216000000000000 +road name="Creekwood Dr ",thepath="[(-122.043309,37.66911),(-122.041422,37.66099)]" 81302400000000000 +road name="Crellin road",thepath="[(-121.846446,37.59189),(-121.846,37.591),(-121.845775,37.59073)]" 81388800000000000 +road name="Crest Ave ",thepath="[(-122.1039,37.067),(-122.1038,37.066)]" 81475200000000000 +road name="Crest Ave ",thepath="[(-122.162,37.699),(-122.1568,37.664)]" 81561600000000000 +road name="Crest Ct ",thepath="[(-122.0566,37.049),(-122.0571,37.05)]" 81648000000000000 +road name="Crest Lane",thepath="[(-122.0558,37.047),(-122.0546,37.047)]" 81734400000000000 +road name="Crest road",thepath="[(-122.2149,37.216),(-122.2153,37.221)]" 81820800000000000 +road name="Crestline road",thepath="[(-121.887,37.789),(-121.8846,37.793)]" 81907200000000000 +road name="Crestmont Dr ",thepath="[(-122.1775,37.029),(-122.1798,37.044)]" 81993600000000000 +road name="Creston road",thepath="[(-122.2639,37.002),(-122.2613,37.986),(-122.2602,37.978),(-122.2598,37.973)]" 82080000000000000 +road name="Crestwood St ",thepath="[(-121.9589,37.159),(-121.961,37.156)]" 82166400000000000 +road name="Crisfield Lane",thepath="[(-121.871,37.814),(-121.8718,37.813)]" 82252800000000000 +road name="Crocker Ave ",thepath="[(-122.2242,37.186),(-122.2243,37.171)]" 82339200000000000 +road name="Crockwood Ter ",thepath="[(-122.045255,37.66569),(-122.045487,37.66262)]" 82425600000000000 +road name="Cromwell Way ",thepath="[(-121.7723,37.932),(-121.7713,37.933)]" 82512000000000000 +road name="Crosby St ",thepath="[(-122.146,37.96),(-122.145,37.953)]" 82598400000000000 +road name="Cross road",thepath="[(-121.666843,37.7387),(-121.664768,37.7474)]" 82684800000000000 +road name="Crow Ct ",thepath="[(-121.8797,37.911),(-121.8801,37.91)]" 82771200000000000 +road name="Crow Canyon road",thepath="[(-122.0106,37.674),(-122.0102,37.675)]" 82857600000000000 +road name="Crow Canyon road",thepath="[(-122.0497,37.029),(-122.0479,37.028)]" 82944000000000000 +road name="Crow Canyon road",thepath="[(-122.0552,37.938),(-122.0545,37.967)]" 83030400000000000 +road name="Crow Canyon Creek ",thepath="[(-122.0425,37.051),(-122.0426,37.049)]" 83116800000000000 +road name="Crow Canyon Creek ",thepath="[(-122.043,37.905),(-122.0368,37.71)]" 83203200000000000 +road name="Crow Canyon Creek ",thepath="[(-122.046308,37.0015),(-122.046833,37.00133)]" 83289600000000000 +road name="Croxton Ave ",thepath="[(-122.2591,37.219),(-122.2584,37.211)]" 83376000000000000 +road name="Cryer St ",thepath="[(-122.1024,37.357),(-122.1035,37.351)]" 83462400000000000 +road name="Crystal Lane",thepath="[(-121.868866,37.50763),(-121.870709,37.51024)]" 83548800000000000 +road name="Crystaline Dr ",thepath="[(-121.925856,37),(-121.925869,37.00527)]" 83635200000000000 +road name="Cull Canyon road",thepath="[(-122.0536,37.435),(-122.0499,37.315)]" 83721600000000000 +road name="Cull Canyon Reservoir ",thepath="[(-122.0546,37.039),(-122.0553,37.089)]" 83808000000000000 +road name="Cull Creek ",thepath="[(-122.0624,37.875),(-122.0582,37.527)]" 83894400000000000 +road name="Culver St ",thepath="[(-122.1998,37.865),(-122.1996,37.862)]" 83980800000000000 +road name="Cumberland Ave ",thepath="[(-122.1467,37.945),(-122.1507,37.944)]" 84067200000000000 +road name="Curran Way ",thepath="[(-122.2074,37.96),(-122.207,37.966)]" 84153600000000000 +road name="Curtis St ",thepath="[(-121.9765,37.246),(-121.9778,37.229)]" 84240000000000000 +road name="Curtis St ",thepath="[(-122.2866,37.981),(-122.2866,37.968),(-122.2867,37.949)]" 84326400000000000 +road name="Curtis St ",thepath="[(-122.2877,37.65),(-122.2877,37.639)]" 84412800000000000 +road name="Curtis St ",thepath="[(-122.2881,37.848),(-122.2883,37.831)]" 84499200000000000 +road name="Curtner road",thepath="[(-121.909,37.928),(-121.9084,37.928)]" 84585600000000000 +road name="Curtner road",thepath="[(-121.9117,37.939),(-121.9105,37.93)]" 84672000000000000 +road name="Cutler Ave ",thepath="[(-122.013942,37.74913),(-122.0142,37.745)]" 84758400000000000 +road name="Cypress St ",thepath="[(-122.2883,37.177),(-122.2884,37.184)]" 84844800000000000 +road name="Cypress St ",thepath="[(-122.2886,37.241),(-122.2883,37.247)]" 84931200000000000 +road name="Cypress St ",thepath="[(-122.2899,37.142),(-122.2894,37.156)]" 85017600000000000 +road name="Cypress St ",thepath="[(-122.2908,37.104),(-122.2905,37.113)]" 85104000000000000 +road name="Cypress St ",thepath="[(-122.2931,37.047),(-122.2928,37.055)]" 85190400000000000 +road name="Cypress Point Dr ",thepath="[(-121.7251,37.24),(-121.724,37.24)]" 85276800000000000 +road name="D St ",thepath="[(-122.0239,37.017),(-122.0242,37.015)]" 85363200000000000 +road name="D St ",thepath="[(-122.0529,37.421),(-122.0534,37.42)]" 85449600000000000 +road name="D St ",thepath="[(-122.055,37.798),(-122.0541,37.796),(-122.0529,37.794)]" 85536000000000000 +road name="D St ",thepath="[(-122.056892,37.79896),(-122.0564,37.8)]" 85622400000000000 +road name="D St ",thepath="[(-122.0746,37.745),(-122.0741,37.749)]" 85708800000000000 +road name="D St ",thepath="[(-122.179,37.476),(-122.1785,37.47)]" 85795200000000000 +road name="D St ",thepath="[(-122.1811,37.505),(-122.1805,37.497)]" 85881600000000000 +road name="Dagnino road",thepath="[(-121.7462,37.306),(-121.7461,37.379)]" 85968000000000000 +road name="Daisy St ",thepath="[(-122.1817,37.843),(-122.18,37.848),(-122.179,37.851)]" 86054400000000000 +road name="Daisy St ",thepath="[(-122.1857,37.858),(-122.185,37.851)]" 86140800000000000 +road name="Dalgo road",thepath="[(-121.947,37.529),(-121.9475,37.524)]" 86227200000000000 +road name="Dalton Way ",thepath="[(-122.0293,37.927),(-122.0297,37.915)]" 86313600000000000 +road name="Dalton Com ",thepath="[(-121.994,37.555),(-121.9944,37.556)]" 86400000000000000 +road name="Damon Slough ",thepath="[(-122.2057,37.533),(-122.2063,37.531)]" 86486400000000000 +road name="Dana St ",thepath="[(-122.2578,37.501),(-122.2579,37.507)]" 86572800000000000 +road name="Dana St ",thepath="[(-122.2583,37.548),(-122.2582,37.541)]" 86659200000000000 +road name="Daniels Dr ",thepath="[(-122.1346,37.317),(-122.1335,37.323)]" 86745600000000000 +road name="Darius Way ",thepath="[(-122.1272,37.18),(-122.1267,37.164)]" 86832000000000000 +road name="Darwin Dr ",thepath="[(-122.0335,37.776),(-122.0349,37.767)]" 86918400000000000 +road name="Darwin Dr ",thepath="[(-122.0359,37.763),(-122.0366,37.755)]" 87004800000000000 +road name="Darwin St ",thepath="[(-122.0996,37.317),(-122.1024,37.311)]" 87091200000000000 +road name="Daryl Ave ",thepath="[(-122.115,37.883),(-122.1149,37.866)]" 87177600000000000 +road name="Dashwood Ave ",thepath="[(-122.177,37.618),(-122.1755,37.627)]" 87264000000000000 +road name="Davenport Ave ",thepath="[(-122.1827,37.892),(-122.1823,37.872)]" 87350400000000000 +road name="David St ",thepath="[(-122.0637,37.958),(-122.0608,37.958)]" 87436800000000000 +road name="Davis St ",thepath="[(-122.1624,37.225),(-122.1632,37.222),(-122.1647,37.218)]" 87523200000000000 +road name="Davis St ",thepath="[(-122.1702,37.203),(-122.171,37.201)]" 87609600000000000 +road name="Davis St ",thepath="[(-122.1719,37.199),(-122.1725,37.198)]" 87696000000000000 +road name="Davis St ",thepath="[(-122.1831,37.165),(-122.1835,37.165)]" 87782400000000000 +road name="Davis St ",thepath="[(-122.1857,37.158),(-122.1921,37.139)]" 87868800000000000 +road name="Davis St ",thepath="[(-122.217903,37.89337),(-122.216,37.885)]" 87955200000000000 +road name="Davona Dr ",thepath="[(-121.9261,37.222),(-121.9278,37.218)]" 88041600000000000 +road name="Davy Ct ",thepath="[(-121.9902,37.629),(-121.99,37.623)]" 88128000000000000 +road name="Dawe Ave ",thepath="[(-122.0783,37.927),(-122.0783,37.912)]" 88214400000000000 +road name="Dawes St ",thepath="[(-122.2122,37.24),(-122.2112,37.226)]" 88300800000000000 +road name="Dawn View Ct ",thepath="[(-122.041,37.144),(-122.0403,37.143)]" 88387200000000000 +road name="Dayle Ct ",thepath="[(-121.943,37.37),(-121.9421,37.369)]" 88473600000000000 +road name="De Brum Commons ",thepath="[(-121.924934,37.30872),(-121.924728,37.30014)]" 88560000000000000 +road name="De la Cruz road",thepath="[(-122.0554,37.305),(-122.055,37.301)]" 88646400000000000 +road name="Dearborn St ",thepath="[(-122.0274,37.107),(-122.0275,37.101)]" 88732800000000000 +road name="Decatur Way ",thepath="[(-122.0868,37.296),(-122.0863,37.267)]" 88819200000000000 +road name="Decoto road",thepath="[(-122.0159,37.006),(-122.016,37.002),(-122.0164,37.993)]" 88905600000000000 +road name="Decoto road",thepath="[(-122.0175,37.961),(-122.0177,37.955)]" 88992000000000000 +road name="Decoto road",thepath="[(-122.0189,37.925),(-122.019,37.921)]" 89078400000000000 +road name="Decoto road",thepath="[(-122.0292,37.733),(-122.0315,37.707)]" 89164800000000000 +road name="Decoto road",thepath="[(-122.0361,37.656),(-122.0364,37.652)]" 89251200000000000 +road name="Deep Creek road",thepath="[(-122.049391,37.64053),(-122.04928,37.63888)]" 89337600000000000 +road name="Deep Creek road",thepath="[(-122.0533,37.749),(-122.053709,37.74218)]" 89424000000000000 +road name="Deep Creek road",thepath="[(-122.0536,37.697),(-122.0517,37.674),(-122.0513,37.668)]" 89510400000000000 +road name="Deer Oaks Dr ",thepath="[(-121.909133,37.54092),(-121.907389,37.54544)]" 89596800000000000 +road name="Deer Park Way ",thepath="[(-122.0279,37.526),(-122.0266,37.524)]" 89683200000000000 +road name="Deer Trail Pl ",thepath="[(-122.0455,37.669),(-122.044472,37.66938)]" 89769600000000000 +road name="Deering St ",thepath="[(-122.2146,37.904),(-122.2126,37.897)]" 89856000000000000 +road name="Deervale road",thepath="[(-121.9376,37.178),(-121.9374,37.184)]" 89942400000000000 +road name="Deerwood St ",thepath="[(-122.1775,37.623),(-122.177,37.618)]" 90028800000000000 +road name="Del Valle Pkwy",thepath="[(-121.875441,37.66004),(-121.874759,37.65728)]" 90115200000000000 +road name="Del Valle road",thepath="[(-121.688828,37.70896),(-121.691152,37.7458)]" 90201600000000000 +road name="Delaware Dr ",thepath="[(-121.951,37.203),(-121.9517,37.201)]" 90288000000000000 +road name="Delaware St ",thepath="[(-122.2016,37.926),(-122.2015,37.925)]" 90374400000000000 +road name="Delaware Way ",thepath="[(-121.786362,37.92959),(-121.7863,37.93)]" 90460800000000000 +road name="Delmar Ave ",thepath="[(-121.7889,37.693),(-121.787,37.704)]" 90547200000000000 +road name="Delmar Ave ",thepath="[(-122.2453,37.545),(-122.2444,37.556)]" 90633600000000000 +road name="Delores Dr ",thepath="[(-122.0742,37.735),(-122.0752,37.727)]" 90720000000000000 +road name="Delta Ter ",thepath="[(-121.9592,37.113),(-121.959,37.111)]" 90806400000000000 +road name="Delta Mendota Canal ",thepath="[(-121.562031,37.5571),(-121.573749,37.57374)]" 90892800000000000 +road name="Delta Mendota Canal ",thepath="[(-121.57819,37.7187),(-121.578403,37.71976)]" 90979200000000000 +road name="Delta Mendota Canal ",thepath="[(-121.589243,37.84355),(-121.589222,37.84389)]" 91065600000000000 +road name="Denise Ct ",thepath="[(-121.9418,37.142),(-121.9414,37.127)]" 91152000000000000 +road name="Denise St ",thepath="[(-121.9469,37.37),(-121.945,37.359)]" 91238400000000000 +road name="Denker Dr ",thepath="[(-121.9086,37.861),(-121.9082,37.863),(-121.9079,37.864)]" 91324800000000000 +road name="Dennison St ",thepath="[(-122.2379,37.796),(-122.2374,37.796)]" 91411200000000000 +road name="Dennison St ",thepath="[(-122.2428,37.791),(-122.2412,37.793),(-122.239,37.795)]" 91497600000000000 +road name="Denslowe St ",thepath="[(-122.1851,37.336),(-122.1847,37.332)]" 91584000000000000 +road name="Denton Ave ",thepath="[(-122.1118,37.467),(-122.108659,37.47689)]" 91670400000000000 +road name="Denton Ave ",thepath="[(-122.1118,37.467),(-122.112277,37.46666)]" 91756800000000000 +road name="Depot road",thepath="[(-122.127518,37.3808),(-122.1284,37.38)]" 91843200000000000 +road name="Depot road",thepath="[(-122.1302,37.38),(-122.1323,37.379)]" 91929600000000000 +road name="Derby St ",thepath="[(-122.246,37.628),(-122.2451,37.629)]" 92016000000000000 +road name="Derby St ",thepath="[(-122.2617,37.612),(-122.2595,37.615)]" 92102400000000000 +road name="Derby St ",thepath="[(-122.2688,37.602),(-122.2663,37.606)]" 92188800000000000 +road name="Dering Pl ",thepath="[(-122.0192,37.701),(-122.0183,37.693)]" 92275200000000000 +road name="Devonshire Ave ",thepath="[(-122.1466,37.926),(-122.1498,37.924)]" 92361600000000000 +road name="Devonshire Ave ",thepath="[(-122.1507,37.924),(-122.1517,37.924)]" 92448000000000000 +road name="Dewey St ",thepath="[(-122.1483,37.862),(-122.1482,37.857)]" 92534400000000000 +road name="Diablo Ave ",thepath="[(-122.1186,37.358),(-122.1236,37.358)]" 92620800000000000 +road name="Diablo Pl ",thepath="[(-122.0543,37.973),(-122.0534,37.974)]" 92707200000000000 +road name="Diamond Dr ",thepath="[(-121.8008,37.669),(-121.7988,37.682)]" 92793600000000000 +road name="Diana Common ",thepath="[(-122.056116,37.61386),(-122.056337,37.62065)]" 92880000000000000 +road name="Dichondra Pl ",thepath="[(-122.009872,37.31128),(-122.009205,37.31438)]" 92966400000000000 +road name="Dillo St ",thepath="[(-122.1303,37.024),(-122.1303,37.016)]" 93052800000000000 +road name="Dimond Ave ",thepath="[(-122.2167,37.994),(-122.2162,37.006)]" 93139200000000000 +road name="Dixon St ",thepath="[(-122.0524,37.32),(-122.0514,37.311)]" 93225600000000000 +road name="Doane St ",thepath="[(-121.9531,37.149),(-121.9562,37.14)]" 93312000000000000 +road name="Doane St ",thepath="[(-121.9581,37.135),(-121.9597,37.13)]" 93398400000000000 +road name="Dobbel Ave ",thepath="[(-122.0319,37.46),(-122.0328,37.463)]" 93484800000000000 +road name="Dobbel Ave ",thepath="[(-122.0417,37.52),(-122.0408,37.515)]" 93571200000000000 +road name="Dohr St ",thepath="[(-122.2805,37.56),(-122.2804,37.548)]" 93657600000000000 +road name="Dolores Ave ",thepath="[(-122.1517,37.224),(-122.1498,37.229)]" 93744000000000000 +road name="Dolores Dr ",thepath="[(-121.8732,37.524),(-121.8724,37.519)]" 93830400000000000 +road name="Dolores Dr ",thepath="[(-121.875651,37.52705),(-121.87384,37.52324)]" 93916800000000000 +road name="Dolores St ",thepath="[(-122.078,37.842),(-122.0779,37.833)]" 94003200000000000 +road name="Dominici Dr ",thepath="[(-122.0149,37.756),(-122.0151,37.75)]" 94089600000000000 +road name="Donalban Cir ",thepath="[(-122.0464,37.71),(-122.0475,37.709)]" 94176000000000000 +road name="Donegal Ct ",thepath="[(-122.0433,37.549),(-122.0421,37.543)]" 94262400000000000 +road name="Donlan Canyon Creek ",thepath="[(-121.9687,37.097),(-121.9584,37.101)]" 94348800000000000 +road name="Donna Way ",thepath="[(-122.1333,37.606),(-122.1316,37.599)]" 94435200000000000 +road name="Donner Way ",thepath="[(-121.9969,37.37),(-121.9945,37.357)]" 94521600000000000 +road name="Donohue Dr ",thepath="[(-121.932,37.091),(-121.9327,37.106)]" 94608000000000000 +road name="Doolittle Dr ",thepath="[(-122.174643,37.98341),(-122.1735,37.965)]" 94694400000000000 +road name="Doolittle Dr ",thepath="[(-122.1793,37.052),(-122.1787,37.043)]" 94780800000000000 +road name="Doolittle Dr ",thepath="[(-122.193162,37.21747),(-122.193,37.216)]" 94867200000000000 +road name="Doolittle Dr ",thepath="[(-122.224088,37.448),(-122.2226,37.448)]" 94953600000000000 +road name="Dorisa Ave ",thepath="[(-122.1462,37.555),(-122.1448,37.572)]" 95040000000000000 +road name="Dorman road",thepath="[(-121.9061,37.834),(-121.9063,37.841)]" 95126400000000000 +road name="Dorne Pl ",thepath="[(-121.9455,37.397),(-121.9456,37.392)]" 95212800000000000 +road name="Dorothy Pl ",thepath="[(-122.2301,37.566),(-122.2302,37.571)]" 95299200000000000 +road name="Dorsey Ave ",thepath="[(-121.9992,37.495),(-121.9997,37.489)]" 95385600000000000 +road name="Dorthea Ct ",thepath="[(-121.9064,37.519),(-121.908617,37.52369)]" 95472000000000000 +road name="Dougherty road",thepath="[(-121.908447,37.2552),(-121.90838,37.2379)]" 95558400000000000 +road name="Dougherty road",thepath="[(-121.9093,37.127),(-121.9093,37.15418)]" 95644800000000000 +road name="Dougherty road",thepath="[(-121.909939,37.28669),(-121.909373,37.30234),(-121.9092,37.305)]" 95731200000000000 +road name="Douglas Dr ",thepath="[(-122.1705,37.227),(-122.1698,37.214)]" 95817600000000000 +road name="Dover Way ",thepath="[(-121.7929,37.906),(-121.7917,37.906)]" 95904000000000000 +road name="Dowe Ave ",thepath="[(-122.0439,37.903),(-122.04363,37.91098)]" 95990400000000000 +road name="Dowling Blvd",thepath="[(-122.1467,37.359),(-122.1447,37.359)]" 96076800000000000 +road name="Dowling Blvd",thepath="[(-122.1552,37.323),(-122.1542,37.335)]" 96163200000000000 +road name="Downing Pl ",thepath="[(-122.0549,37.035),(-122.0546,37.041)]" 96249600000000000 +road name="Doyle St ",thepath="[(-122.2835,37.337),(-122.2836,37.344)]" 96336000000000000 +road name="Drake Dr ",thepath="[(-122.2056,37.311),(-122.2043,37.302)]" 96422400000000000 +road name="Drew St ",thepath="[(-122.1288,37.938),(-122.1281,37.939)]" 96508800000000000 +road name="Drew Ter ",thepath="[(-121.956729,37.21923),(-121.956991,37.21808)]" 96595200000000000 +road name="Driftwood Dr ",thepath="[(-122.0109,37.482),(-122.0113,37.477)]" 96681600000000000 +road name="Driftwood Way ",thepath="[(-121.919,37.794),(-121.92,37.795)]" 96768000000000000 +road name="Driftwood Way ",thepath="[(-122.1726,37.924),(-122.1734,37.924)]" 96854400000000000 +road name="Driscoll road",thepath="[(-121.9482,37.403),(-121.948451,37.39995)]" 96940800000000000 +road name="Dry Creek ",thepath="[(-121.706461,37.12006),(-121.708998,37.15525)]" 97027200000000000 +road name="Dry Creek ",thepath="[(-122.0367,37.88386),(-122.038,37.877)]" 97113600000000000 +road name="Dublin Blvd",thepath="[(-121.9096,37.047),(-121.9115,37.034)]" 97200000000000000 +road name="Dublin Blvd",thepath="[(-121.945852,37.98712),(-121.944625,37.99187)]" 97286400000000000 +road name="Dublin road",thepath="[(-121.955087,37.97529),(-121.946646,37.94858)]" 97372800000000000 +road name="Dublin Way ",thepath="[(-122.251,37.425),(-122.2513,37.43)]" 97459200000000000 +road name="Dublin Canyon road",thepath="[(-121.94428,37.95399),(-121.943721,37.95527)]" 97545600000000000 +road name="Dublin Creek ",thepath="[(-121.9422,37.974),(-121.955,37.984)]" 97632000000000000 +road name="Dublin Green Dr ",thepath="[(-121.939669,37.10516),(-121.9384,37.097)]" 97718400000000000 +road name="Dudley Ave ",thepath="[(-122.222,37.241),(-122.2221,37.234)]" 97804800000000000 +road name="Duffel Pl ",thepath="[(-122.0641,37.434),(-122.0637,37.429)]" 97891200000000000 +road name="Dunbar Pl ",thepath="[(-122.011,37.632),(-122.0121,37.621)]" 97977600000000000 +road name="Dundee Ct ",thepath="[(-122.1458,37.166),(-122.1451,37.16)]" 98064000000000000 +road name="Dunkirk Ave ",thepath="[(-122.1254,37.526),(-122.1228,37.531)]" 98150400000000000 +road name="Dunn road",thepath="[(-122.1195,37.452),(-122.1211,37.451)]" 98236800000000000 +road name="Durant Ave ",thepath="[(-122.2603,37.678),(-122.2584,37.68)]" 98323200000000000 +road name="Durant Ave ",thepath="[(-122.2671,37.669),(-122.2652,37.67)]" 98409600000000000 +road name="Durham road",thepath="[(-121.9216,37.146),(-121.9234,37.149)]" 98496000000000000 +road name="Durham road",thepath="[(-121.957278,37.10033),(-121.957885,37.09857)]" 98582400000000000 +road name="Durham road",thepath="[(-121.9605,37.091),(-121.9616,37.087)]" 98668800000000000 +road name="Durham road",thepath="[(-121.9634,37.081),(-121.9642,37.078)]" 98755200000000000 +road name="Durham Way ",thepath="[(-122.0321,37.656),(-122.0311,37.642)]" 98841600000000000 +road name="Durillo Dr ",thepath="[(-121.9464,37.446),(-121.9457,37.441)]" 98928000000000000 +road name="Durk Way ",thepath="[(-122.097393,37.57955),(-122.097541,37.58144)]" 99014400000000000 +road name="Dusterberry Way ",thepath="[(-122.0141,37.565),(-122.0135,37.562)]" 99100800000000000 +road name="Dutton Ave ",thepath="[(-122.1403,37.339),(-122.1394,37.34)]" 99187200000000000 +road name="Dutton Ave ",thepath="[(-122.155,37.319),(-122.1534,37.323)]" 99273600000000000 +road name="Dwight Way ",thepath="[(-122.2483,37.662),(-122.2472,37.661)]" 99360000000000000 +road name="Dwight Way ",thepath="[(-122.2546,37.657),(-122.2533,37.659)]" 99446400000000000 +road name="Dwight Way ",thepath="[(-122.2573,37.654),(-122.256,37.656)]" 99532800000000000 +road name="Dwight Way ",thepath="[(-122.286,37.616),(-122.2851,37.617)]" 99619200000000000 +road name="Dwight Way ",thepath="[(-122.2933,37.602),(-122.292,37.605),(-122.291,37.607)]" 99705600000000000 +road name="Dyer St ",thepath="[(-122.0684,37.028),(-122.0691,37.005)]" 99792000000000000 +road name="Dyer St ",thepath="[(-122.0701,37.969),(-122.0703,37.965)]" 99878400000000000 +road name="E St ",thepath="[(-122.019,37.037),(-122.0195,37.032),(-122.0203,37.027),(-122.0208,37.022)]" 99964800000000000 +road name="E St ",thepath="[(-122.1832,37.505),(-122.1826,37.498),(-122.182,37.49)]" 100051200000000000 +road name="Eagle Ave ",thepath="[(-122.2342,37.668),(-122.2335,37.664)]" 100137600000000000 +road name="Eagle Ave ",thepath="[(-122.2539,37.76),(-122.253215,37.75657)]" 100224000000000000 +road name="Earhart road",thepath="[(-122.2004,37.256),(-122.2004,37.259)]" 100310400000000000 +road name="Earhart road",thepath="[(-122.2086,37.296),(-122.2012,37.255)]" 100396800000000000 +road name="Earhart road",thepath="[(-122.2186,37.394),(-122.2181,37.389)]" 100483200000000000 +road name="Earl St ",thepath="[(-122.1564,37.709),(-122.1552,37.697)]" 100569600000000000 +road name="East Ave ",thepath="[(-121.7203,37.799),(-121.7176,37.801)]" 100656000000000000 +road name="East Ave ",thepath="[(-121.7296,37.8),(-121.7251,37.8)]" 100742400000000000 +road name="East Ave ",thepath="[(-121.7424,37.799),(-121.7416,37.799)]" 100828800000000000 +road name="East Ave ",thepath="[(-121.7597,37.798),(-121.7558,37.8)]" 100915200000000000 +road name="East Ave ",thepath="[(-121.7641,37.8),(-121.763,37.8)]" 101001600000000000 +road name="East Ave ",thepath="[(-122.0361,37.719),(-122.0352,37.733)]" 101088000000000000 +road name="Easterday Way ",thepath="[(-121.9916,37.829),(-121.9899,37.814)]" 101174400000000000 +road name="Eastlawn St ",thepath="[(-122.1989,37.629),(-122.1982,37.623)]" 101260800000000000 +road name="Eastlawn St ",thepath="[(-122.2005,37.644),(-122.2,37.638)]" 101347200000000000 +road name="Eastman Ave ",thepath="[(-122.20024,37.86217),(-122.1998,37.865)]" 101433600000000000 +road name="Eastman Ave ",thepath="[(-122.2028,37.845),(-122.2012,37.856)]" 101520000000000000 +road name="Eastman Ct ",thepath="[(-122.0732,37.492),(-122.0722,37.486)]" 101606400000000000 +road name="Eastpark Ter ",thepath="[(-122.041182,37.77686),(-122.042271,37.78226)]" 101692800000000000 +road name="Eastshore Hwy ",thepath="[(-122.3057,37.785),(-122.3051,37.755)]" 101779200000000000 +road name="Ebbetts St ",thepath="[(-122.0061,37.205),(-122.005,37.203)]" 101865600000000000 +road name="Eden Ave ",thepath="[(-122.1143,37.505),(-122.1142,37.491)]" 101952000000000000 +road name="Eden Creek ",thepath="[(-122.0218,37.996),(-122.0222,37.961)]" 102038400000000000 +road name="Eden Creek ",thepath="[(-122.022037,37.00675),(-122.0221,37.998)]" 102124800000000000 +road name="Eden Landing road",thepath="[(-122.1204,37.268),(-122.1204,37.267)]" 102211200000000000 +road name="Eden Landing road",thepath="[(-122.1213,37.226),(-122.1213,37.223)]" 102297600000000000 +road name="Edenberry St ",thepath="[(-121.9347,37.23),(-121.9349,37.235)]" 102384000000000000 +road name="Edes Ave ",thepath="[(-122.1833,37.363),(-122.1821,37.359)]" 102470400000000000 +road name="Edes Ave ",thepath="[(-122.1948,37.444),(-122.1941,37.444)]" 102556800000000000 +road name="Edgebrook Dr ",thepath="[(-122.057639,37.71523),(-122.057506,37.72472)]" 102643200000000000 +road name="Edgehill Ct ",thepath="[(-122.1305,37.239),(-122.1304,37.232)]" 102729600000000000 +road name="Edgemoor St ",thepath="[(-122.1492,37.918),(-122.1492,37.91)]" 102816000000000000 +road name="Edgewater Dr ",thepath="[(-122.0285,37.526),(-122.028611,37.52295)]" 102902400000000000 +road name="Edgewater Dr ",thepath="[(-122.0306,37.542),(-122.0298,37.538)]" 102988800000000000 +road name="Edgewater Dr ",thepath="[(-122.0327,37.552),(-122.0315,37.546)]" 103075200000000000 +road name="Edgewater Dr ",thepath="[(-122.0387,37.579),(-122.038315,37.57785)]" 103161600000000000 +road name="Edgewater Dr ",thepath="[(-122.0401,37.57),(-122.0405,37.565)]" 103248000000000000 +road name="Edgewater Dr ",thepath="[(-122.201,37.379),(-122.2042,37.41)]" 103334400000000000 +road name="Edison Way ",thepath="[(-121.9443,37.098),(-121.9473,37.084)]" 103420800000000000 +road name="Edith St ",thepath="[(-122.02,37.43),(-122.0197,37.429)]" 103507200000000000 +road name="Edith St ",thepath="[(-122.077,37.638),(-122.0764,37.631)]" 103593600000000000 +road name="Edith St ",thepath="[(-122.2764,37.774),(-122.2763,37.765)]" 103680000000000000 +road name="Edith Way ",thepath="[(-122.0733,37.825),(-122.0716,37.804)]" 103766400000000000 +road name="Edwards Ave ",thepath="[(-122.1652,37.749),(-122.1638,37.759)]" 103852800000000000 +road name="Edwards Lane",thepath="[(-122.0599,37.016),(-122.058514,37.01551)]" 103939200000000000 +road name="Eggers Ct ",thepath="[(-121.9924,37.585),(-121.991,37.576)]" 104025600000000000 +road name="Eggers Dr ",thepath="[(-122.0002,37.465),(-122.0017,37.451)]" 104112000000000000 +road name="Ehle St ",thepath="[(-122.103,37.973),(-122.1017,37.959)]" 104198400000000000 +road name="Eilene Dr ",thepath="[(-121.869254,37.87019),(-121.869113,37.87253)]" 104284800000000000 +road name="Eilene Dr ",thepath="[(-121.869618,37.86592),(-121.869389,37.86861)]" 104371200000000000 +road name="El Caminito ",thepath="[(-121.7883,37.673),(-121.7852,37.67)]" 104457600000000000 +road name="El Caminito ",thepath="[(-121.7922,37.696),(-121.7907,37.685),(-121.7898,37.681)]" 104544000000000000 +road name="El Camino Real ",thepath="[(-122.2409,37.559),(-122.2407,37.556)]" 104630400000000000 +road name="El Centro Ave ",thepath="[(-122.2191,37.116),(-122.2185,37.118)]" 104716800000000000 +road name="El Dorado Dr ",thepath="[(-121.7803,37.659),(-121.7801,37.647)]" 104803200000000000 +road name="El Monte Ave ",thepath="[(-122.1594,37.624),(-122.1591,37.63)]" 104889600000000000 +road name="El Paseo ",thepath="[(-122.244718,37.33016),(-122.2454,37.333)]" 104976000000000000 +road name="El Portal ",thepath="[(-122.2429,37.359),(-122.2434,37.361)]" 105062400000000000 +road name="El Portal Ave ",thepath="[(-121.9993,37.83),(-121.9997,37.817)]" 105148800000000000 +road name="El Portal Ct ",thepath="[(-122.2554,37.844),(-122.2552,37.85)]" 105235200000000000 +road name="El Rey Ave ",thepath="[(-122.0219,37.536),(-122.0225,37.53)]" 105321600000000000 +road name="Elba Way ",thepath="[(-121.9223,37.143),(-121.923,37.139)]" 105408000000000000 +road name="Elbert St ",thepath="[(-122.2205,37.107),(-122.2195,37.095)]" 105494400000000000 +road name="Elder Way ",thepath="[(-122.0819,37.229),(-122.0827,37.229)]" 105580800000000000 +road name="Eldridge Ave ",thepath="[(-122.0883,37.402),(-122.0878,37.395)]" 105667200000000000 +road name="Eldridge Ave ",thepath="[(-122.0896,37.423),(-122.0888,37.408)]" 105753600000000000 +road name="Elgin St ",thepath="[(-122.1106,37.911),(-122.1102,37.911)]" 105840000000000000 +road name="Elgin St ",thepath="[(-122.113,37.911),(-122.1119,37.911)]" 105926400000000000 +road name="Elgin St ",thepath="[(-122.1222,37.95),(-122.1213,37.945)]" 106012800000000000 +road name="Elk Ct ",thepath="[(-121.912463,37.08667),(-121.913575,37.09125)]" 106099200000000000 +road name="Elko Ct ",thepath="[(-122.1499,37.778),(-122.1496,37.773)]" 106185600000000000 +road name="Ellen Way ",thepath="[(-122.0685,37.83),(-122.0687,37.828)]" 106272000000000000 +road name="Ellen Way ",thepath="[(-122.0711,37.801),(-122.0716,37.796)]" 106358400000000000 +road name="Ellis St ",thepath="[(-122.2726,37.542),(-122.2723,37.524)]" 106444800000000000 +road name="Ellsworth St ",thepath="[(-122.2611,37.575),(-122.2608,37.57)]" 106531200000000000 +road name="Elm St ",thepath="[(-121.7815,37.865),(-121.7807,37.865)]" 106617600000000000 +road name="Elm St ",thepath="[(-122.04,37.27),(-122.0392,37.254)]" 106704000000000000 +road name="Elmhurst St ",thepath="[(-122.0916,37.568),(-122.0918,37.564)]" 106790400000000000 +road name="Elmridge Ct ",thepath="[(-121.8867,37.707),(-121.8871,37.702)]" 106876800000000000 +road name="Elsie Ave ",thepath="[(-122.1497,37.21),(-122.1447,37.223)]" 106963200000000000 +road name="Elverton Dr ",thepath="[(-122.2028,37.487),(-122.2017,37.471)]" 107049600000000000 +road name="Elvessa St ",thepath="[(-122.1296,37.528),(-122.129,37.522)]" 107136000000000000 +road name="Elysian Fields Dr ",thepath="[(-122.1275,37.646),(-122.1275,37.649)]" 107222400000000000 +road name="Elysian Fields Dr ",thepath="[(-122.1336,37.595),(-122.133,37.594)]" 107308800000000000 +road name="Elysian Fields Dr ",thepath="[(-122.1369,37.589),(-122.1361,37.595)]" 107395200000000000 +road name="Embarcadero ",thepath="[(-122.2527,37.894),(-122.246486,37.86908)]" 107481600000000000 +road name="Embarcadero ",thepath="[(-122.276,37.961),(-122.2747,37.956)]" 107568000000000000 +road name="Embarcadero ",thepath="[(-122.2836,37.99),(-122.283,37.989)]" 107654400000000000 +road name="Emerald Ave ",thepath="[(-121.9247,37.13),(-121.925,37.136)]" 107740800000000000 +road name="Emerald St ",thepath="[(-122.2557,37.309),(-122.2557,37.315)]" 107827200000000000 +road name="Emerson St ",thepath="[(-121.9276,37.345),(-121.9284,37.347)]" 107913600000000000 +road name="Emerson St ",thepath="[(-122.2688,37.543),(-122.2678,37.544)]" 108000000000000000 +road name="Emily Ct ",thepath="[(-122.0726,37.121),(-122.0712,37.124)]" 108086400000000000 +road name="Empire road",thepath="[(-122.1873,37.278),(-122.1858,37.277)]" 108172800000000000 +road name="Encinitas Way ",thepath="[(-122.0759,37.917),(-122.0756,37.911)]" 108259200000000000 +road name="Encino Dr ",thepath="[(-121.7959,37.688),(-121.7947,37.688)]" 108345600000000000 +road name="Endeavour Way ",thepath="[(-122.0655,37.842),(-122.0647,37.84)]" 108432000000000000 +road name="Endicott St ",thepath="[(-122.1436,37.931),(-122.1435,37.911)]" 108518400000000000 +road name="Enfield Dr ",thepath="[(-122.0273,37.519),(-122.0277,37.507)]" 108604800000000000 +road name="Enos Way ",thepath="[(-121.7677,37.896),(-121.7673,37.91)]" 108691200000000000 +road name="Ensenada Ave ",thepath="[(-122.2833,37.933),(-122.2825,37.928)]" 108777600000000000 +road name="Enterprise Pl ",thepath="[(-121.9568,37.009),(-121.9558,37.002)]" 108864000000000000 +road name="Erica Pl ",thepath="[(-122.0299,37.165),(-122.0293,37.169)]" 108950400000000000 +road name="Erie St ",thepath="[(-122.2419,37.122),(-122.2408,37.134)]" 109036800000000000 +road name="Escher Dr ",thepath="[(-122.1962,37.258),(-122.1988,37.302)]" 109123200000000000 +road name="Essex St ",thepath="[(-122.2677,37.537),(-122.2657,37.539)]" 109209600000000000 +road name="Essex Way ",thepath="[(-121.9735,37.257),(-121.9749,37.249)]" 109296000000000000 +road name="Estabrook St ",thepath="[(-122.1527,37.164),(-122.1535,37.161)]" 109382400000000000 +road name="Estabrook St ",thepath="[(-122.1539,37.16),(-122.1547,37.156)]" 109468800000000000 +road name="Estates Dr ",thepath="[(-122.2136,37.158),(-122.2126,37.169)]" 109555200000000000 +road name="Estates Dr ",thepath="[(-122.2139,37.272),(-122.2135,37.26)]" 109641600000000000 +road name="Estates Dr ",thepath="[(-122.2178,37.33),(-122.2183,37.325)]" 109728000000000000 +road name="Estates Dr ",thepath="[(-122.2225,37.37),(-122.218617,37.34167)]" 109814400000000000 +road name="Estudillo Ave ",thepath="[(-122.1446,37.274),(-122.1425,37.28)]" 109900800000000000 +road name="Estudillo Ave ",thepath="[(-122.1509,37.256),(-122.1498,37.26)]" 109987200000000000 +road name="Estudillo Ave ",thepath="[(-122.1547,37.245),(-122.1551,37.244)]" 110073600000000000 +road name="Estudillo Ave ",thepath="[(-122.1584,37.229),(-122.1595,37.225)]" 110160000000000000 +road name="Estudillo Ave ",thepath="[(-122.1608,37.22),(-122.1621,37.214)]" 110246400000000000 +road name="Estudillo Canal ",thepath="[(-122.1282,37.969),(-122.1288,37.964)]" 110332800000000000 +road name="Estudillo Canal ",thepath="[(-122.1323,37.929),(-122.1363,37.924),(-122.1369,37.924)]" 110419200000000000 +road name="Estudillo Canal ",thepath="[(-122.1397,37.923),(-122.14066,37.92204)]" 110505600000000000 +road name="Estudillo Canal ",thepath="[(-122.1569,37.861),(-122.1587,37.858)]" 110592000000000000 +road name="Eucalyptus Ct ",thepath="[(-122.064324,37.37425),(-122.064548,37.37733)]" 110678400000000000 +road name="Euclid Ave ",thepath="[(-122.2618,37.893),(-122.2612,37.887)]" 110764800000000000 +road name="Euclid Ave ",thepath="[(-122.2627,37.907),(-122.2621,37.902)]" 110851200000000000 +road name="Euclid Ave ",thepath="[(-122.2632,37.942),(-122.2644,37.93)]" 110937600000000000 +road name="Euclid Ave ",thepath="[(-122.2671,37.009),(-122.2666,37.987)]" 111024000000000000 +road name="Eugene St ",thepath="[(-121.963937,37.38628),(-121.9642,37.383)]" 111110400000000000 +road name="Eugene St ",thepath="[(-121.9659,37.364),(-121.9664,37.358)]" 111196800000000000 +road name="Evans St ",thepath="[(-121.7778,37.607),(-121.7777,37.602)]" 111283200000000000 +road name="Evelyn Ave ",thepath="[(-122.2906,37.814),(-122.2903,37.807)]" 111369600000000000 +road name="Evelyn Ave ",thepath="[(-122.2919,37.843),(-122.2909,37.83)]" 111456000000000000 +road name="Everett Ave ",thepath="[(-122.2182,37.02),(-122.2172,37.05)]" 111542400000000000 +road name="Everett Ave ",thepath="[(-122.219,37.094),(-122.218,37.087)]" 111628800000000000 +road name="Everett St ",thepath="[(-122.236,37.678),(-122.2353,37.687)]" 111715200000000000 +road name="Everett St ",thepath="[(-122.2385,37.647),(-122.238,37.653)]" 111801600000000000 +road name="Everglade St ",thepath="[(-122.0822,37.275),(-122.083,37.272)]" 111888000000000000 +road name="Everglades Lane",thepath="[(-121.8005,37.87),(-121.800259,37.87469)]" 111974400000000000 +road name="Everglades Park Dr ",thepath="[(-121.9703,37.175),(-121.9718,37.164)]" 112060800000000000 +road name="Evergreen Ave ",thepath="[(-122.1367,37.234),(-122.1361,37.224)]" 112147200000000000 +road name="Evergreen St ",thepath="[(-122.0877,37.458),(-122.087,37.455)]" 112233600000000000 +road name="Excelsior Ave ",thepath="[(-122.2224,37.019),(-122.2215,37.016)]" 112320000000000000 +road name="Excelsior Ave ",thepath="[(-122.2338,37.059),(-122.2312,37.051)]" 112406400000000000 +road name="F St ",thepath="[(-122.0191,37.017),(-122.0198,37.013)]" 112492800000000000 +road name="F St ",thepath="[(-122.0223,37.993),(-122.0225,37.993)]" 112579200000000000 +road name="F St ",thepath="[(-122.0246,37.976),(-122.0247,37.974)]" 112665600000000000 +road name="F Bay ",thepath="[(-122.152,37.358),(-122.150473,37.24998)]" 112752000000000000 +road name="F Bay ",thepath="[(-122.2842,37.681),(-122.2841,37.68)]" 112838400000000000 +road name="F Bay ",thepath="[(-122.3138,37.645),(-122.3154,37.643)]" 112924800000000000 +road name="Faber St ",thepath="[(-122.0694,37.105),(-122.075,37.106)]" 113011200000000000 +road name="Fabian Way ",thepath="[(-122.0703,37.27),(-122.0684,37.269)]" 113097600000000000 +road name="Fabian Com ",thepath="[(-121.9951,37.537),(-121.9947,37.534)]" 113184000000000000 +road name="Fair Ave ",thepath="[(-122.0298,37.395),(-122.0304,37.386)]" 113270400000000000 +road name="Fairbrook Ct ",thepath="[(-121.9207,37.829),(-121.9218,37.826)]" 113356800000000000 +road name="Fairfax Ave ",thepath="[(-122.1997,37.733),(-122.1997,37.724)]" 113443200000000000 +road name="Fairfax Ave ",thepath="[(-122.2022,37.784),(-122.2015,37.778)]" 113529600000000000 +road name="Fairlands Dr ",thepath="[(-121.871,37.976),(-121.8719,37.961)]" 113616000000000000 +road name="Fairlands Dr ",thepath="[(-121.8731,37.956),(-121.8738,37.952)]" 113702400000000000 +road name="Fairlands road",thepath="[(-122.0583,37.784),(-122.059,37.781)]" 113788800000000000 +road name="Fairmont Dr ",thepath="[(-122.1135,37.144),(-122.1109,37.143)]" 113875200000000000 +road name="Fairmount Ave ",thepath="[(-122.2525,37.23),(-122.2511,37.234)]" 113961600000000000 +road name="Fairmount Ave ",thepath="[(-122.2561,37.194),(-122.2553,37.202)]" 114048000000000000 +road name="Fairview Ave ",thepath="[(-121.999,37.428),(-121.9863,37.351)]" 114134400000000000 +road name="Fairview Ave ",thepath="[(-122.0165,37.549),(-122.016,37.525)]" 114220800000000000 +road name="Fairview Ave ",thepath="[(-122.02765,37.68521),(-122.0274,37.669),(-122.0267,37.646)]" 114307200000000000 +road name="Fairview Ave ",thepath="[(-122.038562,37.76258),(-122.0379,37.762)]" 114393600000000000 +road name="Fairview Ave ",thepath="[(-122.0418,37.748),(-122.0402,37.764)]" 114480000000000000 +road name="Fairview Ave ",thepath="[(-122.0432,37.752),(-122.0428,37.751)]" 114566400000000000 +road name="Fairview Ave ",thepath="[(-122.049,37.788),(-122.0482,37.775)]" 114652800000000000 +road name="Fairview Ave ",thepath="[(-122.2404,37.22),(-122.2401,37.227)]" 114739200000000000 +road name="Fairview St ",thepath="[(-122.2792,37.495),(-122.2776,37.498)]" 114825600000000000 +road name="Fairway Ct ",thepath="[(-122.0536,37.334),(-122.0539,37.33)]" 114912000000000000 +road name="Fairway Dr ",thepath="[(-122.1753,37.994),(-122.176433,37.98933)]" 114998400000000000 +road name="Fairway St ",thepath="[(-122.0353,37.237),(-122.0343,37.238)]" 115084800000000000 +road name="Fairway St ",thepath="[(-122.0375,37.221),(-122.0368,37.226)]" 115171200000000000 +road name="Fairwood St ",thepath="[(-121.9539,37.183),(-121.9573,37.178)]" 115257600000000000 +road name="Fall Creek road",thepath="[(-121.910898,37.2702),(-121.909729,37.25584)]" 115344000000000000 +road name="Fallbrook Way ",thepath="[(-122.1285,37.533),(-122.1278,37.522)]" 115430400000000000 +road name="Fallon St ",thepath="[(-122.2637,37.969),(-122.2633,37.977)]" 115516800000000000 +road name="Fallon St ",thepath="[(-122.2661,37.931),(-122.2658,37.935)]" 115603200000000000 +road name="Falls Ter ",thepath="[(-122.048735,37.61624),(-122.048402,37.60954)]" 115689600000000000 +road name="Falmouth Pl ",thepath="[(-122.0301,37.513),(-122.031,37.502)]" 115776000000000000 +road name="Farallon Dr ",thepath="[(-122.1681,37.938),(-122.1698,37.937)]" 115862400000000000 +road name="Fargo Ave ",thepath="[(-122.1468,37.881),(-122.1476,37.887)]" 115948800000000000 +road name="Farm Hill Dr ",thepath="[(-122.0328,37.523),(-122.0333,37.511)]" 116035200000000000 +road name="Farnsworth St ",thepath="[(-122.1507,37.952),(-122.1507,37.944)]" 116121600000000000 +road name="Farwell Dr ",thepath="[(-121.9867,37.255),(-121.9841,37.264)]" 116208000000000000 +road name="Farwell Dr ",thepath="[(-121.996,37.291),(-121.9952,37.287)]" 116294400000000000 +road name="Farwell Dr ",thepath="[(-121.9966,37.316),(-121.9962,37.314)]" 116380800000000000 +road name="Farwell Dr ",thepath="[(-122.0133,37.392),(-122.0125,37.389),(-122.01186,37.3858)]" 116467200000000000 +road name="Faulkner Dr ",thepath="[(-122.0034,37.53),(-122.0049,37.515)]" 116553600000000000 +road name="Feldspar Ct ",thepath="[(-122.0722,37.874),(-122.0734,37.87)]" 116640000000000000 +road name="Fellows St ",thepath="[(-122.0652,37.814),(-122.066,37.805)]" 116726400000000000 +road name="Fellows St ",thepath="[(-122.0682,37.78),(-122.0687,37.775)]" 116812800000000000 +road name="Fenico Ter ",thepath="[(-122.0166,37.562),(-122.0168,37.559)]" 116899200000000000 +road name="Fenwick Way ",thepath="[(-121.947144,37.20116),(-121.9451,37.202)]" 116985600000000000 +road name="Fenwick Way ",thepath="[(-121.9473,37.192),(-121.9472,37.199)]" 117072000000000000 +road name="Fernside Ave ",thepath="[(-122.2337,37.514),(-122.2343,37.509)]" 117158400000000000 +road name="Fernside Blvd",thepath="[(-122.2256,37.575),(-122.2249,37.581)]" 117244800000000000 +road name="Fernside Blvd",thepath="[(-122.2271,37.645),(-122.2265,37.64)]" 117331200000000000 +road name="Ferro St ",thepath="[(-122.2996,37.975),(-122.3025,37.968)]" 117417600000000000 +road name="Ferry St ",thepath="[(-122.3128,37.147),(-122.3113,37.159)]" 117504000000000000 +road name="Ferry St ",thepath="[(-122.3185,37.097),(-122.3155,37.122)]" 117590400000000000 +road name="Field St ",thepath="[(-122.1604,37.721),(-122.1596,37.728)]" 117676800000000000 +road name="Fielding Ct ",thepath="[(-122.0393,37.689),(-122.0384,37.688)]" 117763200000000000 +road name="Fiji Way ",thepath="[(-122.1747,37.968),(-122.1753,37.965)]" 117849600000000000 +road name="Filbert St ",thepath="[(-122.036,37.259),(-122.0356,37.252)]" 117936000000000000 +road name="Filbert St ",thepath="[(-122.2779,37.215),(-122.2772,37.233)]" 118022400000000000 +road name="Filbert St ",thepath="[(-122.2802,37.151),(-122.2796,37.168)]" 118108800000000000 +road name="Finback Way ",thepath="[(-122.1783,37.934),(-122.1776,37.936)]" 118195200000000000 +road name="Findlay Way ",thepath="[(-121.7463,37.753),(-121.7454,37.753)]" 118281600000000000 +road name="Fir Ave ",thepath="[(-122.2385,37.318),(-122.2379,37.314)]" 118368000000000000 +road name="Firestone Ct ",thepath="[(-122.1246,37.671),(-122.1246,37.666)]" 118454400000000000 +road name="First St ",thepath="[(-121.7572,37.875),(-121.7576,37.863)]" 118540800000000000 +road name="First St ",thepath="[(-121.7636,37.843),(-121.7644,37.84)]" 118627200000000000 +road name="Firth Ct ",thepath="[(-122.1359,37.93),(-122.1363,37.924)]" 118713600000000000 +road name="Fisk Ct ",thepath="[(-122.155,37.972),(-122.1545,37.968)]" 118800000000000000 +road name="Fitzerald St ",thepath="[(-122.28185,37.26208),(-122.282237,37.26273)]" 118886400000000000 +road name="Flagg St ",thepath="[(-122.0921,37.71),(-122.0914,37.7)]" 118972800000000000 +road name="Fleet road",thepath="[(-122.2235,37.085),(-122.2229,37.078)]" 119059200000000000 +road name="Fleming Ave ",thepath="[(-122.1949,37.791),(-122.1948,37.783)]" 119145600000000000 +road name="Fletcher Lane",thepath="[(-122.0779,37.668),(-122.0762,37.683)]" 119232000000000000 +road name="Flint Ct ",thepath="[(-122.1074,37.711),(-122.1085,37.704)]" 119318400000000000 +road name="Flint River Ter ",thepath="[(-122.054,37.78),(-122.0536,37.778)]" 119404800000000000 +road name="Flora St ",thepath="[(-122.1882,37.625),(-122.1879,37.622)]" 119491200000000000 +road name="Florence Ave ",thepath="[(-122.2253,37.376),(-122.225,37.373)]" 119577600000000000 +road name="Florence road",thepath="[(-121.7743,37.711),(-121.7743,37.687)]" 119664000000000000 +road name="Floresta Blvd",thepath="[(-122.146,37.994),(-122.1478,37.98)]" 119750400000000000 +road name="Florio St ",thepath="[(-122.2504,37.502),(-122.2494,37.504)]" 119836800000000000 +road name="Flynn road",thepath="[(-121.657764,37.18891),(-121.657276,37.18952)]" 119923200000000000 +road name="Folsom Ave ",thepath="[(-122.0587,37.271),(-122.0596,37.269)]" 120009600000000000 +road name="Folsom Ave ",thepath="[(-122.0628,37.259),(-122.062855,37.25882)]" 120096000000000000 +road name="Fontaine Ct ",thepath="[(-122.1525,37.685),(-122.1517,37.688)]" 120182400000000000 +road name="Fontana Dr ",thepath="[(-122.2458,37.36),(-122.2463,37.354)]" 120268800000000000 +road name="Fontes Dr ",thepath="[(-121.933352,37.40768),(-121.93251,37.40887)]" 120355200000000000 +road name="Fontonett Ave ",thepath="[(-121.795158,37.619),(-121.7947,37.619)]" 120441600000000000 +road name="Foothill Blvd",thepath="[(-122.0798,37.709),(-122.0798,37.688)]" 120528000000000000 +road name="Foothill Blvd",thepath="[(-122.0882,37.829),(-122.0869,37.822)]" 120614400000000000 +road name="Foothill Blvd",thepath="[(-122.0926,37.862),(-122.0918,37.857)]" 120700800000000000 +road name="Foothill Blvd",thepath="[(-122.0983,37.907),(-122.0981,37.905)]" 120787200000000000 +road name="Foothill Blvd",thepath="[(-122.1455,37.421),(-122.145202,37.41752)]" 120873600000000000 +road name="Foothill Blvd",thepath="[(-122.1775,37.697),(-122.1764,37.696)]" 120960000000000000 +road name="Foothill Blvd",thepath="[(-122.1948,37.725),(-122.1928,37.721)]" 121046400000000000 +road name="Foothill Blvd",thepath="[(-122.2018,37.724),(-122.2008,37.724)]" 121132800000000000 +road name="Foothill Blvd",thepath="[(-122.2136,37.77),(-122.2129,37.763)]" 121219200000000000 +road name="Foothill Blvd",thepath="[(-122.2216,37.837),(-122.2206,37.833)]" 121305600000000000 +road name="Foothill Blvd",thepath="[(-122.2289,37.846),(-122.2278,37.845)]" 121392000000000000 +road name="Foothill Blvd",thepath="[(-122.2414,37.9),(-122.2403,37.893)]" 121478400000000000 +road name="Foothill Blvd",thepath="[(-122.2454,37.921),(-122.2442,37.91)]" 121564800000000000 +road name="Foothill Lane",thepath="[(-121.905417,37.52303),(-121.905087,37.51659)]" 121651200000000000 +road name="Foothill road",thepath="[(-121.8956,37.413),(-121.8967,37.419)]" 121737600000000000 +road name="Foothill road",thepath="[(-121.9075,37.547),(-121.907696,37.55141)]" 121824000000000000 +road name="Foothill road",thepath="[(-121.923245,37.81689),(-121.9236,37.82)]" 121910400000000000 +road name="Foothill road",thepath="[(-121.932,37.93),(-121.9335,37.958)]" 121996800000000000 +road name="Foothill Knolls Dr ",thepath="[(-121.909407,37.65999),(-121.9094,37.657)]" 122083200000000000 +road name="Fordham Way ",thepath="[(-121.7488,37.869),(-121.7481,37.869),(-121.7472,37.868)]" 122169600000000000 +road name="Forest Pl ",thepath="[(-122.0672,37.051),(-122.0673,37.044)]" 122256000000000000 +road name="Forest St ",thepath="[(-122.2541,37.443),(-122.2547,37.445)]" 122342400000000000 +road name="Forest Glen Pl ",thepath="[(-122.067707,37.01875),(-122.068338,37.01945),(-122.068308,37.0263)]" 122428800000000000 +road name="Forest Hill Ave ",thepath="[(-122.2118,37.034),(-122.2086,37.069)]" 122515200000000000 +road name="Forestland Way ",thepath="[(-122.1886,37.334),(-122.1901,37.329)]" 122601600000000000 +road name="Fortune Way ",thepath="[(-122.1877,37.693),(-122.187,37.688)]" 122688000000000000 +road name="Foster Ct ",thepath="[(-122.0745,37.396),(-122.074447,37.39388)]" 122774400000000000 +road name="Foster St ",thepath="[(-121.9683,37.367),(-121.9664,37.358)]" 122860800000000000 +road name="Fountain St ",thepath="[(-122.2306,37.593),(-122.2293,37.605)]" 122947200000000000 +road name="Foxfire Pl ",thepath="[(-122.063987,37.27349),(-122.064027,37.27459)]" 123033600000000000 +road name="Foxswallow road",thepath="[(-121.8776,37.793),(-121.8796,37.794)]" 123120000000000000 +road name="Fraga road",thepath="[(-122.0397,37.975),(-122.0393,37.987)]" 123206400000000000 +road name="France road",thepath="[(-122.045563,37.6829),(-122.045452,37.68292)]" 123292800000000000 +road name="Francisco St ",thepath="[(-121.8687,37.749),(-121.8696,37.75)]" 123379200000000000 +road name="Francisco St ",thepath="[(-122.286,37.733),(-122.285,37.735),(-122.2839,37.737)]" 123465600000000000 +road name="Franklin Ave ",thepath="[(-122.0605,37.028),(-122.0614,37.039)]" 123552000000000000 +road name="Franklin Dr ",thepath="[(-121.9049,37.954),(-121.9084,37.934)]" 123638400000000000 +road name="Franklin St ",thepath="[(-122.2687,37.055),(-122.2679,37.068)]" 123724800000000000 +road name="Franklin St ",thepath="[(-122.2702,37.03),(-122.2698,37.037)]" 123811200000000000 +road name="Franklin St ",thepath="[(-122.2719,37.003),(-122.2715,37.009)]" 123897600000000000 +road name="Franklin St ",thepath="[(-122.2744,37.961),(-122.2741,37.968)]" 123984000000000000 +road name="Frederick road",thepath="[(-122.174,37.244),(-122.1735,37.225)]" 124070400000000000 +road name="Frederiksen Lane",thepath="[(-121.9251,37.162),(-121.9256,37.162)]" 124156800000000000 +road name="Fredi St ",thepath="[(-122.0764,37.934),(-122.0767,37.93)]" 124243200000000000 +road name="Freedom Ave ",thepath="[(-122.1219,37.081),(-122.1215,37.075)]" 124329600000000000 +road name="Freeman Pl ",thepath="[(-122.0375,37.866),(-122.037548,37.86536)]" 124416000000000000 +road name="Fremont Ave ",thepath="[(-122.1429,37.008),(-122.145652,37.04405)]" 124502400000000000 +road name="Fremont Blvd",thepath="[(-121.9347,37.663),(-121.9324,37.65)]" 124588800000000000 +road name="Fremont Blvd",thepath="[(-121.955914,37.22071),(-121.9556,37.213)]" 124675200000000000 +road name="Fremont Blvd",thepath="[(-121.960056,37.3392),(-121.9584,37.33)]" 124761600000000000 +road name="Fremont Blvd",thepath="[(-121.964,37.362),(-121.9632,37.357)]" 124848000000000000 +road name="Fremont Blvd",thepath="[(-122.0043,37.573),(-122.0038,37.57)]" 124934400000000000 +road name="Fremont Blvd",thepath="[(-122.006647,37.58506),(-122.0071,37.587)]" 125020800000000000 +road name="Fremont Blvd",thepath="[(-122.02826,37.6908),(-122.02694,37.6842)]" 125107200000000000 +road name="Fremont Blvd",thepath="[(-122.0348,37.724),(-122.0315,37.707)]" 125193600000000000 +road name="Fremont Blvd",thepath="[(-122.0373,37.736),(-122.0361,37.73)]" 125280000000000000 +road name="Fremont Blvd",thepath="[(-122.0392,37.746),(-122.039154,37.74569)]" 125366400000000000 +road name="Fremont St ",thepath="[(-122.284,37.403),(-122.2841,37.407)]" 125452800000000000 +road name="Frontage road",thepath="[(-122.3051,37.664),(-122.2994,37.5)]" 125539200000000000 +road name="Frontage road",thepath="[(-122.3074,37.781),(-122.3048,37.71)]" 125625600000000000 +road name="Fruitvale Ave ",thepath="[(-122.2158,37.985),(-122.2157,37.987)]" 125712000000000000 +road name="Fruitvale Ave ",thepath="[(-122.2166,37.966),(-122.2163,37.97)]" 125798400000000000 +road name="Fruitvale Ave ",thepath="[(-122.2182,37.923),(-122.218,37.929)]" 125884800000000000 +road name="Fruitvale Ave ",thepath="[(-122.2257,37.754),(-122.2256,37.756)]" 125971200000000000 +road name="Fruitvale Ave ",thepath="[(-122.2272,37.719),(-122.2269,37.725)]" 126057600000000000 +road name="Fruitvale Ave ",thepath="[(-122.2285,37.693),(-122.227522,37.71256)]" 126144000000000000 +road name="Fulmar Ter ",thepath="[(-122.045623,37.80299),(-122.045824,37.80101)]" 126230400000000000 +road name="Funston Gate Ct ",thepath="[(-121.8824,37.847),(-121.883,37.842)]" 126316800000000000 +road name="Fuschia Ct ",thepath="[(-122.0204,37.325),(-122.0199,37.323)]" 126403200000000000 +road name="G St ",thepath="[(-122.0167,37.018),(-122.0174,37.013)]" 126489600000000000 +road name="Gable Dr ",thepath="[(-121.9178,37.798),(-121.9175,37.799)]" 126576000000000000 +road name="Gading road",thepath="[(-122.0801,37.343),(-122.08,37.336)]" 126662400000000000 +road name="Gading road",thepath="[(-122.0802,37.388),(-122.0802,37.38)]" 126748800000000000 +road name="Gail Dr ",thepath="[(-122.0853,37.858),(-122.0854,37.853)]" 126835200000000000 +road name="Gainsborough Ct ",thepath="[(-122.2448,37.473),(-122.2447,37.461)]" 126921600000000000 +road name="Gainsborough Ter ",thepath="[(-122.0369,37.764),(-122.0369,37.756)]" 127008000000000000 +road name="Galaxy Dr ",thepath="[(-122.0675,37.866),(-122.068,37.86)]" 127094400000000000 +road name="Galindo Dr ",thepath="[(-121.9071,37.895),(-121.9041,37.891)]" 127180800000000000 +road name="Galindo St ",thepath="[(-122.2158,37.84),(-122.2149,37.837)]" 127267200000000000 +road name="Gallegos Ave ",thepath="[(-121.9286,37.324),(-121.9285,37.318)]" 127353600000000000 +road name="Galleon Pl ",thepath="[(-122.178053,37.9223),(-122.177578,37.92252)]" 127440000000000000 +road name="Galloway St ",thepath="[(-121.7473,37.177),(-121.7459,37.18)]" 127526400000000000 +road name="Galloway Common ",thepath="[(-121.7459,37.18),(-121.745647,37.17049)]" 127612800000000000 +road name="Galsworthy Ct ",thepath="[(-121.995,37.586),(-121.9955,37.585)]" 127699200000000000 +road name="Galt St ",thepath="[(-122.1507,37.886),(-122.1507,37.88)]" 127785600000000000 +road name="Galway Bay ",thepath="[(-122.2473,37.389),(-122.2475,37.384)]" 127872000000000000 +road name="Gamay Dr ",thepath="[(-121.9093,37.676),(-121.909,37.67)]" 127958400000000000 +road name="Ganet Ter ",thepath="[(-122.045424,37.79478),(-122.04533,37.79418)]" 128044800000000000 +road name="Ganton Ct ",thepath="[(-122.0379,37.146),(-122.038,37.152)]" 128131200000000000 +road name="Garden Ave ",thepath="[(-122.1077,37.626),(-122.1075,37.61)]" 128217600000000000 +road name="Garfield Ave ",thepath="[(-122.1718,37.638),(-122.1713,37.632)]" 128304000000000000 +road name="Garfield Ave ",thepath="[(-122.1746,37.664),(-122.174,37.66)]" 128390400000000000 +road name="Garin Ave ",thepath="[(-122.033003,37.2842),(-122.032,37.282)]" 128476800000000000 +road name="Garland Ct ",thepath="[(-122.0924,37.192),(-122.0926,37.177)]" 128563200000000000 +road name="Garrison Ave ",thepath="[(-122.0785,37.075),(-122.0785,37.051)]" 128649600000000000 +road name="Garrone Ave ",thepath="[(-122.0498,37.437),(-122.0513,37.434)]" 128736000000000000 +road name="Garwood Glenn Dr ",thepath="[(-122.06406,37.68946),(-122.064269,37.68336)]" 128822400000000000 +road name="Gateview Ave ",thepath="[(-122.3047,37.921),(-122.3033,37.9)]" 128908800000000000 +road name="Gatewood St ",thepath="[(-121.9574,37.185),(-121.9573,37.178)]" 128995200000000000 +road name="Gawain Ct ",thepath="[(-122.0251,37.745),(-122.02374,37.7382)]" 129081600000000000 +road name="Geary road",thepath="[(-121.770923,37.99805),(-121.770222,37.9976)]" 129168000000000000 +road name="Geary road",thepath="[(-121.7784,37.014),(-121.7986,37.06)]" 129254400000000000 +road name="Geary road",thepath="[(-121.8277,37.073),(-121.8279,37.082)]" 129340800000000000 +road name="Gem Ave ",thepath="[(-122.0167,37.823),(-122.0171,37.809)]" 129427200000000000 +road name="Genoa St ",thepath="[(-122.2725,37.46),(-122.2727,37.467)]" 129513600000000000 +road name="Georgean St ",thepath="[(-122.1024,37.877),(-122.1006,37.892)]" 129600000000000000 +road name="Gertrude Dr ",thepath="[(-121.996,37.398),(-121.9966,37.39)]" 129686400000000000 +road name="Gettysburg Ave ",thepath="[(-122.1089,37.366),(-122.1089,37.357)]" 129772800000000000 +road name="Giannini Ct ",thepath="[(-122.0254,37.16),(-122.0256,37.157)]" 129859200000000000 +road name="Gibbons Dr ",thepath="[(-122.2289,37.633),(-122.2283,37.633)]" 129945600000000000 +road name="Gibbons Dr ",thepath="[(-122.2325,37.625),(-122.2317,37.629)]" 130032000000000000 +road name="Gibraltar Dr ",thepath="[(-121.9025,37.96),(-121.9008,37.96)]" 130118400000000000 +road name="Gibraltar Dr ",thepath="[(-122.0202,37.624),(-122.0207,37.619)]" 130204800000000000 +road name="Gibraltar Dr ",thepath="[(-122.0242,37.603),(-122.0252,37.608)]" 130291200000000000 +road name="Gibraltar Dr ",thepath="[(-122.026,37.613),(-122.026476,37.61522)]" 130377600000000000 +road name="Gilbert Pl ",thepath="[(-121.9823,37.655),(-121.9836,37.653)]" 130464000000000000 +road name="Gilman St ",thepath="[(-122.2883,37.813),(-122.2877,37.812)]" 130550400000000000 +road name="Gilman St ",thepath="[(-122.2942,37.808),(-122.2933,37.81)]" 130636800000000000 +road name="Gilman St ",thepath="[(-122.2962,37.803),(-122.2951,37.806)]" 130723200000000000 +road name="Girvin Dr ",thepath="[(-122.1957,37.291),(-122.1904,37.299)]" 130809600000000000 +road name="Gisler Way ",thepath="[(-122.042,37.285),(-122.0392,37.298)]" 130896000000000000 +road name="Glacier Dr ",thepath="[(-121.8016,37.804),(-121.8017,37.809)]" 130982400000000000 +road name="Glade St ",thepath="[(-122.0819,37.592),(-122.08171,37.5977)]" 131068800000000000 +road name="Glen Ave ",thepath="[(-122.2514,37.257),(-122.2505,37.258)]" 131155200000000000 +road name="Glen Dr ",thepath="[(-122.1459,37.316),(-122.1422,37.315)]" 131241600000000000 +road name="Glen Alpine road",thepath="[(-122.2198,37.223),(-122.2185,37.239),(-122.217349,37.236)]" 131328000000000000 +road name="Glen Ellen Dr ",thepath="[(-122.0479,37.85),(-122.0475,37.851)]" 131414400000000000 +road name="Glendale Dr ",thepath="[(-122.0074,37.46),(-122.0067,37.456)]" 131500800000000000 +road name="Glenmoor Dr ",thepath="[(-122.0046,37.466),(-122.0038,37.461)]" 131587200000000000 +road name="Glenora Way ",thepath="[(-121.9143,37.317),(-121.9146,37.316)]" 131673600000000000 +road name="Glenview Dr ",thepath="[(-122.001,37.413),(-122.0002,37.409)]" 131760000000000000 +road name="Glenwood St ",thepath="[(-121.7799,37.771),(-121.7794,37.771)]" 131846400000000000 +road name="Gliddon St ",thepath="[(-122.0575,37.066),(-122.058,37.045)]" 131932800000000000 +road name="Godwit Ct ",thepath="[(-122.0141,37.84),(-122.0141,37.845)]" 132019200000000000 +road name="Gold Creek ",thepath="[(-121.922096,37.88859),(-121.920744,37.88463)]" 132105600000000000 +road name="Goldcrest Cir ",thepath="[(-121.8909,37.725),(-121.8917,37.73)]" 132192000000000000 +road name="Golden Gate Way ",thepath="[(-122.2378,37.497),(-122.238055,37.49522)]" 132278400000000000 +road name="Goldengate Ave ",thepath="[(-122.2324,37.451),(-122.232584,37.45192)]" 132364800000000000 +road name="Golf Dr ",thepath="[(-121.7449,37.136),(-121.7443,37.142)]" 132451200000000000 +road name="Golf Links road",thepath="[(-122.1425,37.565),(-122.1415,37.569)]" 132537600000000000 +road name="Golf Links road",thepath="[(-122.1491,37.533),(-122.1482,37.536)]" 132624000000000000 +road name="Gomes road",thepath="[(-121.949156,37.42192),(-121.9493,37.42)]" 132710400000000000 +road name="Gordon St ",thepath="[(-122.0405,37.752),(-122.0408,37.748)]" 132796800000000000 +road name="Gordon St ",thepath="[(-122.2001,37.788),(-122.1998,37.785)]" 132883200000000000 +road name="Gotubin Common ",thepath="[(-122.053546,37.59037),(-122.054013,37.58887)]" 132969600000000000 +road name="Grace Ave ",thepath="[(-122.276,37.431),(-122.2764,37.43)]" 133056000000000000 +road name="Graffian St ",thepath="[(-122.16774,37.3758),(-122.1677,37.375)]" 133142400000000000 +road name="Graham Ave ",thepath="[(-122.0311,37.321),(-122.032,37.31)]" 133228800000000000 +road name="Graham Way ",thepath="[(-122.1328,37.128),(-122.1321,37.134)]" 133315200000000000 +road name="Granada Cir ",thepath="[(-122.0734,37.229),(-122.0736,37.228)]" 133401600000000000 +road name="Granada Cir ",thepath="[(-122.0741,37.234),(-122.0742,37.23)]" 133488000000000000 +road name="Granada Dr ",thepath="[(-122.0734,37.212),(-122.0734,37.207)]" 133574400000000000 +road name="Granada Dr ",thepath="[(-122.0738,37.22),(-122.0736,37.216)]" 133660800000000000 +road name="Grand Ave ",thepath="[(-122.2442,37.18),(-122.244,37.184)]" 133747200000000000 +road name="Grand Ave ",thepath="[(-122.2479,37.111),(-122.2478,37.115)]" 133833600000000000 +road name="Grand Ave ",thepath="[(-122.2684,37.123),(-122.269233,37.12388)]" 133920000000000000 +road name="Grand Ave ",thepath="[(-122.2722,37.128),(-122.2729,37.129)]" 134006400000000000 +road name="Grand Ave ",thepath="[(-122.2812,37.154),(-122.2823,37.156),(-122.2834,37.159)]" 134092800000000000 +road name="Grand St ",thepath="[(-122.2612,37.637),(-122.2609,37.643)]" 134179200000000000 +road name="Grand Lake Dr ",thepath="[(-122.0553,37.89),(-122.056,37.894)]" 134265600000000000 +road name="Grand Lake Dr ",thepath="[(-122.0591,37.864),(-122.0587,37.861)]" 134352000000000000 +road name="Grandbrook Park Ct ",thepath="[(-121.9661,37.136),(-121.9658,37.14)]" 134438400000000000 +road name="Grandview Dr ",thepath="[(-122.229712,37.58234),(-122.230071,37.57618)]" 134524800000000000 +road name="Grange Ter ",thepath="[(-122.04547,37.62805),(-122.045749,37.62695)]" 134611200000000000 +road name="Granger Ave ",thepath="[(-122.0778,37.984),(-122.0784,37.985)]" 134697600000000000 +road name="Grant Ave ",thepath="[(-122.1491,37.732),(-122.1512,37.722)]" 134784000000000000 +road name="Grant Ave ",thepath="[(-122.1523,37.717),(-122.1535,37.712)]" 134870400000000000 +road name="Grant Ave ",thepath="[(-122.1545,37.703),(-122.1567,37.683)]" 134956800000000000 +road name="Grant St ",thepath="[(-122.2725,37.579),(-122.2723,37.57)]" 135043200000000000 +road name="Grant St ",thepath="[(-122.2729,37.597),(-122.2727,37.588)]" 135129600000000000 +road name="Grant St ",thepath="[(-122.2738,37.632),(-122.2735,37.623)]" 135216000000000000 +road name="Grant Line road",thepath="[(-121.583469,37.45746),(-121.583118,37.4641)]" 135302400000000000 +road name="Granville Dr ",thepath="[(-122.0105,37.357),(-122.01,37.354)]" 135388800000000000 +road name="Grass Valley Ct ",thepath="[(-122.1194,37.518),(-122.1187,37.516)]" 135475200000000000 +road name="Grass Valley road",thepath="[(-122.1246,37.764),(-122.1176,37.634)]" 135561600000000000 +road name="Gray Fox Cir ",thepath="[(-121.84122,37.60072),(-121.841235,37.60161)]" 135648000000000000 +road name="Grayson St ",thepath="[(-122.2883,37.56),(-122.2871,37.563)]" 135734400000000000 +road name="Grayson St ",thepath="[(-122.2916,37.553),(-122.2906,37.556)]" 135820800000000000 +road name="Greenhills ",thepath="[(-122.082437,37.05551),(-122.08375,37.05557)]" 135907200000000000 +road name="Greenly Dr ",thepath="[(-122.1595,37.704),(-122.1578,37.696)]" 135993600000000000 +road name="Greenly Dr ",thepath="[(-122.1635,37.727),(-122.161,37.716)]" 136080000000000000 +road name="Greenridge road",thepath="[(-122.0454,37.151),(-122.043982,37.1588),(-122.0441,37.178)]" 136166400000000000 +road name="Greens Lane",thepath="[(-121.8938,37.339),(-121.894,37.311)]" 136252800000000000 +road name="Greentree Ct ",thepath="[(-121.8851,37.696),(-121.8855,37.692)]" 136339200000000000 +road name="Greenview Dr ",thepath="[(-122.0652,37.907),(-122.064379,37.90817)]" 136425600000000000 +road name="Greenview Dr ",thepath="[(-122.0688,37.905),(-122.0683,37.905),(-122.0663,37.907)]" 136512000000000000 +road name="Greenville road",thepath="[(-121.6957,37.798),(-121.6956,37.778)]" 136598400000000000 +road name="Greenville road",thepath="[(-121.6959,37.044),(-121.6959,37.034)]" 136684800000000000 +road name="Greenville road",thepath="[(-121.6999,37.175),(-121.6993,37.169)]" 136771200000000000 +road name="Greenwood road",thepath="[(-121.8795,37.705),(-121.8795,37.721)]" 136857600000000000 +road name="Greenwood road",thepath="[(-121.8795,37.745),(-121.8796,37.766)]" 136944000000000000 +road name="Greenwood road",thepath="[(-121.8796,37.801),(-121.8796,37.802)]" 137030400000000000 +road name="Greer Ave ",thepath="[(-122.1393,37.889),(-122.1401,37.889)]" 137116800000000000 +road name="Gresel St ",thepath="[(-122.0345,37.178),(-122.0338,37.182)]" 137203200000000000 +road name="Gresham Ct ",thepath="[(-121.8752,37.943),(-121.8754,37.946)]" 137289600000000000 +road name="Grimmer Blvd",thepath="[(-121.9555,37.054),(-121.9534,37.05)]" 137376000000000000 +road name="Grimmer Blvd",thepath="[(-121.9625,37.394),(-121.9633,37.383)]" 137462400000000000 +road name="Grimmer Blvd",thepath="[(-121.9636,37.133),(-121.962341,37.11577)]" 137548800000000000 +road name="Grimmer Blvd",thepath="[(-121.966619,37.178),(-121.966,37.165)]" 137635200000000000 +road name="Grimmer Blvd",thepath="[(-121.967,37.332),(-121.9682,37.315)]" 137721600000000000 +road name="Grizzly Peak Blvd",thepath="[(-122.2112,37.568),(-122.2105,37.561)]" 137808000000000000 +road name="Grizzly Peak Blvd",thepath="[(-122.2213,37.638),(-122.2127,37.581)]" 137894400000000000 +road name="Grizzly Peak Blvd",thepath="[(-122.254,37.915),(-122.2536,37.912)]" 137980800000000000 +road name="Grizzly Peak Blvd",thepath="[(-122.26,37.965),(-122.259,37.952)]" 138067200000000000 +road name="Grizzly Peak Blvd",thepath="[(-122.2689,37.035),(-122.2667,37.02)]" 138153600000000000 +road name="Grouse Way ",thepath="[(-122.0136,37.821),(-122.013412,37.83099)]" 138240000000000000 +road name="Grove St ",thepath="[(-122.2364,37.582),(-122.2357,37.59)]" 138326400000000000 +road name="Grove Way ",thepath="[(-122.0643,37.884),(-122.062679,37.89162),(-122.061796,37.89578),(-122.0609,37.9)]" 138412800000000000 +road name="Grove Way ",thepath="[(-122.078,37.842),(-122.0759,37.843)]" 138499200000000000 +road name="Grove Way ",thepath="[(-122.1041,37.76),(-122.102947,37.76318)]" 138585600000000000 +road name="Grovenor Dr ",thepath="[(-122.0893,37.224),(-122.0887,37.209)]" 138672000000000000 +road name="Gulfstream St ",thepath="[(-121.8645,37.976),(-121.8645,37.993)]" 138758400000000000 +road name="Gull Ct ",thepath="[(-122.0594,37.775),(-122.0595,37.782)]" 138844800000000000 +road name="Gull Way ",thepath="[(-121.8004,37.846),(-121.7996,37.845)]" 138931200000000000 +road name="Gunn Dr ",thepath="[(-122.1902,37.347),(-122.190933,37.35637),(-122.192,37.357)]" 139017600000000000 +road name="Guthrie St ",thepath="[(-121.861539,37.97796),(-121.860503,37.97781)]" 139104000000000000 +road name="H St ",thepath="[(-121.7625,37.766),(-121.7621,37.756)]" 139190400000000000 +road name="H St ",thepath="[(-122.0204,37.974),(-122.0207,37.972)]" 139276800000000000 +road name="Hacienda Ave ",thepath="[(-122.1192,37.754),(-122.1214,37.746)]" 139363200000000000 +road name="Hacienda Ave ",thepath="[(-122.1225,37.742),(-122.1235,37.738)]" 139449600000000000 +road name="Hacienda Ave ",thepath="[(-122.125,37.729),(-122.1259,37.719)]" 139536000000000000 +road name="Hackamore Lane",thepath="[(-121.922474,37.86233),(-121.9223,37.863)]" 139622400000000000 +road name="Hackamore Lane",thepath="[(-121.924324,37.85594),(-121.9239,37.857)]" 139708800000000000 +road name="Hackamore Com ",thepath="[(-121.9233,37.864),(-121.922542,37.86411)]" 139795200000000000 +road name="Haddon Pl ",thepath="[(-122.2416,37.099),(-122.2411,37.103)]" 139881600000000000 +road name="Hagemann Dr ",thepath="[(-121.79953,37.88118),(-121.7995,37.883)]" 139968000000000000 +road name="Haight Ave ",thepath="[(-122.2881,37.767),(-122.2883,37.756)]" 140054400000000000 +road name="Haley St ",thepath="[(-122.0444,37.367),(-122.042309,37.35074)]" 140140800000000000 +road name="Haley St ",thepath="[(-122.0585,37.436),(-122.0579,37.432)]" 140227200000000000 +road name="Halkin Lane",thepath="[(-122.2684,37.983),(-122.2677,37.985)]" 140313600000000000 +road name="Halliday Ave ",thepath="[(-122.175147,37.63369),(-122.1747,37.629)]" 140400000000000000 +road name="Hamilton Pl ",thepath="[(-122.2592,37.151),(-122.2604,37.16)]" 140486400000000000 +road name="Hamilton St ",thepath="[(-122.188,37.549),(-122.1875,37.544)]" 140572800000000000 +road name="Hamlin St ",thepath="[(-122.009871,37.36805),(-122.0092,37.365)]" 140659200000000000 +road name="Hampel St ",thepath="[(-122.2248,37.078),(-122.2244,37.073)]" 140745600000000000 +road name="Hampton road",thepath="[(-122.1086,37.838),(-122.1073,37.84)]" 140832000000000000 +road name="Hampton road",thepath="[(-122.2146,37.189),(-122.2139,37.183)]" 140918400000000000 +road name="Hampton road",thepath="[(-122.222,37.177),(-122.2209,37.179)]" 141004800000000000 +road name="Hamrick Lane",thepath="[(-122.0831,37.344),(-122.0839,37.342)]" 141091200000000000 +road name="Hancock Dr ",thepath="[(-121.9569,37.419),(-121.957,37.413)]" 141177600000000000 +road name="Hanly road",thepath="[(-122.2137,37.067),(-122.2135,37.075)]" 141264000000000000 +road name="Hannah St ",thepath="[(-122.2854,37.216),(-122.2861,37.237)]" 141350400000000000 +road name="Hanover Ave ",thepath="[(-122.2488,37.034),(-122.2477,37.037)]" 141436800000000000 +road name="Hanover Ave ",thepath="[(-122.2536,37.031),(-122.253,37.031)]" 141523200000000000 +road name="Hanover St ",thepath="[(-121.789629,37.92481),(-121.7892,37.934)]" 141609600000000000 +road name="Hanover St ",thepath="[(-121.7911,37.942),(-121.7923,37.95)]" 141696000000000000 +road name="Hanover St ",thepath="[(-121.7939,37.918),(-121.7928,37.918)]" 141782400000000000 +road name="Hansen Ave ",thepath="[(-122.0121,37.523),(-122.0124,37.519)]" 141868800000000000 +road name="Hansen Dr ",thepath="[(-121.8984,37.7),(-121.898897,37.69774)]" 141955200000000000 +road name="Hansen road",thepath="[(-122.0551,37.706),(-122.055,37.712)]" 142041600000000000 +road name="Hansom Dr ",thepath="[(-122.1369,37.75),(-122.1354,37.726)]" 142128000000000000 +road name="Happy Valley road",thepath="[(-121.877541,37.35652),(-121.871788,37.33636)]" 142214400000000000 +road name="Happy Valley road",thepath="[(-121.879849,37.36461),(-121.877975,37.35804)]" 142300800000000000 +road name="Happyland Ave ",thepath="[(-122.1044,37.666),(-122.104441,37.66152)]" 142387200000000000 +road name="Harbor Bay Pkwy",thepath="[(-122.233076,37.25225),(-122.236357,37.2515),(-122.2385,37.251)]" 142473600000000000 +road name="Harbor Light road",thepath="[(-122.2667,37.606),(-122.2651,37.631)]" 142560000000000000 +road name="Harbor View Ave ",thepath="[(-122.1872,37.927),(-122.1866,37.921)]" 142646400000000000 +road name="Harder road",thepath="[(-122.0693,37.506),(-122.0688,37.506)]" 142732800000000000 +road name="Harder road",thepath="[(-122.0793,37.489),(-122.0802,37.488)]" 142819200000000000 +road name="Harlan St ",thepath="[(-122.1477,37.195),(-122.151,37.182)]" 142905600000000000 +road name="Harlon Ct ",thepath="[(-122.0223,37.447),(-122.0229,37.445)]" 142992000000000000 +road name="Harmon Ave ",thepath="[(-122.194,37.68),(-122.1924,37.664),(-122.1911,37.652)]" 143078400000000000 +road name="Harpers Ferry Ct ",thepath="[(-121.9019,37.758),(-121.902271,37.7633)]" 143164800000000000 +road name="Harrington Ave ",thepath="[(-122.2115,37.847),(-122.2108,37.851)]" 143251200000000000 +road name="Harris road",thepath="[(-122.0659,37.372),(-122.0675,37.363)]" 143337600000000000 +road name="Harris road",thepath="[(-122.0681,37.36),(-122.0705,37.347)]" 143424000000000000 +road name="Harrisburg Ave ",thepath="[(-122.011,37.776),(-122.0113,37.773)]" 143510400000000000 +road name="Harrison St ",thepath="[(-122.1539,37.268),(-122.1535,37.259)]" 143596800000000000 +road name="Harrison St ",thepath="[(-122.2544,37.197),(-122.2542,37.199)]" 143683200000000000 +road name="Harrison St ",thepath="[(-122.2577,37.172),(-122.2569,37.176)]" 143769600000000000 +road name="Harrison St ",thepath="[(-122.2621,37.108),(-122.262,37.11)]" 143856000000000000 +road name="Harrison St ",thepath="[(-122.2722,37.952),(-122.2717,37.958)]" 143942400000000000 +road name="Harrison St Ramp",thepath="[(-122.262,37.11),(-122.2613,37.114)]" 144028800000000000 +road name="Hartford Dr ",thepath="[(-122.0297,37.94),(-122.0295,37.944)]" 144115200000000000 +road name="Hartley Gate Ct ",thepath="[(-121.8803,37.863),(-121.8812,37.871)]" 144201600000000000 +road name="Hartman road",thepath="[(-121.7876,37.217),(-121.7953,37.211)]" 144288000000000000 +road name="Harvard Way ",thepath="[(-121.754,37.805),(-121.7508,37.806)]" 144374400000000000 +road name="Harvest road",thepath="[(-121.8797,37.687),(-121.8807,37.691)]" 144460800000000000 +road name="Harwood Ave ",thepath="[(-122.2471,37.497),(-122.2466,37.498)]" 144547200000000000 +road name="Harwood Ave ",thepath="[(-122.25,37.489),(-122.2475,37.495)]" 144633600000000000 +road name="Haskell St ",thepath="[(-122.2825,37.512),(-122.2805,37.516)]" 144720000000000000 +road name="Hathaway Ave ",thepath="[(-122.1109,37.742),(-122.1105,37.739)]" 144806400000000000 +road name="Havasu St ",thepath="[(-121.9209,37.887),(-121.9204,37.878)]" 144892800000000000 +road name="Havenscourt Blvd",thepath="[(-122.1891,37.634),(-122.1888,37.638),(-122.1882,37.643)]" 144979200000000000 +road name="Haverhill Dr ",thepath="[(-122.1938,37.246),(-122.1915,37.242)]" 145065600000000000 +road name="Hawkins St ",thepath="[(-121.969533,37.36702),(-121.9703,37.358)]" 145152000000000000 +road name="Hawley St ",thepath="[(-122.1921,37.531),(-122.1915,37.526)]" 145238400000000000 +road name="Hawthorne Ter ",thepath="[(-122.261,37.825),(-122.262,37.823)]" 145324800000000000 +road name="Hayfield road",thepath="[(-121.8292,37.314),(-121.8281,37.295)]" 145411200000000000 +road name="Hays St ",thepath="[(-122.1538,37.203),(-122.1533,37.194)]" 145497600000000000 +road name="Hayward Blvd",thepath="[(-122.0224,37.563),(-122.0179,37.544)]" 145584000000000000 +road name="Hayward Blvd",thepath="[(-122.0335,37.552),(-122.032996,37.55094)]" 145670400000000000 +road name="Hayward Blvd",thepath="[(-122.03757,37.5596),(-122.033997,37.55449)]" 145756800000000000 +road name="Hayward Blvd",thepath="[(-122.0383,37.556),(-122.0381,37.557)]" 145843200000000000 +road name="Hayward Blvd",thepath="[(-122.050043,37.58583),(-122.0484,37.574),(-122.047,37.556)]" 145929600000000000 +road name="Hearst Ave ",thepath="[(-122.2551,37.757),(-122.2545,37.758)]" 146016000000000000 +road name="Hearst Ave ",thepath="[(-122.2691,37.738),(-122.268,37.74)]" 146102400000000000 +road name="Hearst Ave ",thepath="[(-122.2726,37.734),(-122.2715,37.735)]" 146188800000000000 +road name="Hearst Ave ",thepath="[(-122.277,37.727),(-122.2748,37.731)]" 146275200000000000 +road name="Hearst Ave ",thepath="[(-122.2858,37.714),(-122.2847,37.715)]" 146361600000000000 +road name="Hearst Ave ",thepath="[(-122.2918,37.704),(-122.2887,37.709)]" 146448000000000000 +road name="Hearst Ave ",thepath="[(-122.3027,37.682),(-122.3019,37.685)]" 146534400000000000 +road name="Heartwood Dr ",thepath="[(-122.2006,37.341),(-122.1992,37.338)]" 146620800000000000 +road name="Heathrow Ter ",thepath="[(-122.057185,37.55699),(-122.056911,37.55223)]" 146707200000000000 +road name="Hebrides Ct ",thepath="[(-122.0343,37.529),(-122.034,37.531)]" 146793600000000000 +road name="Hegenberger Exwy",thepath="[(-122.1874,37.572),(-122.1891,37.56)]" 146880000000000000 +road name="Hegenberger Exwy",thepath="[(-122.1946,37.52),(-122.1947,37.497)]" 146966400000000000 +road name="Hegenberger road",thepath="[(-122.1953,37.401),(-122.1953,37.404)]" 147052800000000000 +road name="Hegenberger road",thepath="[(-122.1955,37.378),(-122.1954,37.385)]" 147139200000000000 +road name="Heidelberg Dr ",thepath="[(-121.7692,37.638),(-121.7714,37.645)]" 147225600000000000 +road name="Heidelberg Dr ",thepath="[(-121.7761,37.614),(-121.7751,37.614)]" 147312000000000000 +road name="Heinz Ave ",thepath="[(-122.2953,37.527),(-122.2912,37.536)]" 147398400000000000 +road name="Hellman St ",thepath="[(-122.1403,37.471),(-122.1406,37.464)]" 147484800000000000 +road name="Helsinki Way ",thepath="[(-121.7753,37.659),(-121.7744,37.658)]" 147571200000000000 +road name="Hemlock Ter ",thepath="[(-121.986875,37.25649),(-121.986744,37.25571)]" 147657600000000000 +road name="Henry St ",thepath="[(-122.2706,37.857),(-122.2704,37.843)]" 147744000000000000 +road name="Heritage Ter ",thepath="[(-121.997217,37.55076),(-121.997913,37.54319)]" 147830400000000000 +road name="Herman Ave ",thepath="[(-121.7163,37.123),(-121.7164,37.142)]" 147916800000000000 +road name="Hermes Ct ",thepath="[(-122.0786,37.516),(-122.0784,37.514)]" 148003200000000000 +road name="Hermitage Ave ",thepath="[(-122.0542,37.384),(-122.0566,37.368)]" 148089600000000000 +road name="Hermitage Ct ",thepath="[(-121.7295,37.263),(-121.729426,37.26819)]" 148176000000000000 +road name="Hermitage Lane",thepath="[(-122.0362,37.137),(-122.0354,37.136)]" 148262400000000000 +road name="Hermosa Ave ",thepath="[(-122.2309,37.415),(-122.231,37.404),(-122.2301,37.404)]" 148348800000000000 +road name="Herrier St ",thepath="[(-122.1943,37.006),(-122.1936,37.998)]" 148435200000000000 +road name="Herrin Way ",thepath="[(-121.9098,37.888),(-121.91,37.893)]" 148521600000000000 +road name="Hesperian Blvd",thepath="[(-122.0878,37.182),(-122.0873,37.174)]" 148608000000000000 +road name="Hesperian Blvd",thepath="[(-122.088064,37.18684),(-122.087886,37.18358)]" 148694400000000000 +road name="Hesperian Blvd",thepath="[(-122.0916,37.245),(-122.0896,37.214)]" 148780800000000000 +road name="Hesperian Blvd",thepath="[(-122.097,37.333),(-122.0956,37.31),(-122.0946,37.293)]" 148867200000000000 +road name="Hesperian Blvd",thepath="[(-122.1079,37.513),(-122.1076,37.507)]" 148953600000000000 +road name="Hesperian Blvd",thepath="[(-122.1102,37.551),(-122.1091,37.534)]" 149040000000000000 +road name="Hesperian Blvd",thepath="[(-122.1132,37.6),(-122.1123,37.586)]" 149126400000000000 +road name="Hesperian Blvd",thepath="[(-122.1257,37.792),(-122.1251,37.781)]" 149212800000000000 +road name="Hesperian Blvd",thepath="[(-122.1287,37.989),(-122.1287,37.984)]" 149299200000000000 +road name="Hesperian Blvd",thepath="[(-122.1288,37.922),(-122.1288,37.913)]" 149385600000000000 +road name="Hesse Dr ",thepath="[(-122.0782,37.208),(-122.0782,37.204)]" 149472000000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-121.635378,37.0634),(-121.630012,37.07482)]" 149558400000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-121.687586,37.92102),(-121.686938,37.92241)]" 149644800000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-121.74008,37.81072),(-121.739425,37.81211)]" 149731200000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-121.9355,37.477),(-121.9169,37.53)]" 149817600000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-121.9465,37.448),(-121.945888,37.4496)]" 149904000000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-121.94968,37.4388),(-121.9488,37.441)]" 149990400000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-121.9615,37.407),(-121.960853,37.40854)]" 150076800000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-122.0007,37.313),(-122.0005,37.313)]" 150163200000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-122.0233,37.291),(-122.020432,37.29388)]" 150249600000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-122.0255,37.283),(-122.0245,37.286)]" 150336000000000000 +road name="Hetch Hetchy Aqueduct ",thepath="[(-122.039,37.25),(-122.0404,37.247)]" 150422400000000000 +road name="Heyer Ave ",thepath="[(-122.0673,37.044),(-122.0657,37.044)]" 150508800000000000 +road name="Hibiscus Ave ",thepath="[(-121.999801,37.80223),(-121.9993,37.8)]" 150595200000000000 +road name="Hickory Lane",thepath="[(-121.9163,37.102),(-121.91604,37.1072)]" 150681600000000000 +road name="Hickory St ",thepath="[(-122.0524,37.214),(-122.0523,37.211)]" 150768000000000000 +road name="Hidalgo Ct ",thepath="[(-121.9505,37.614),(-121.9512,37.608)]" 150854400000000000 +road name="Hidden Lane",thepath="[(-122.0553,37.757),(-122.05301,37.75242),(-122.0503,37.747)]" 150940800000000000 +road name="Higgins Way ",thepath="[(-121.9433,37.392),(-121.9424,37.392)]" 151027200000000000 +road name="High St ",thepath="[(-121.9601,37.381),(-121.95938,37.3774)]" 151113600000000000 +road name="High St ",thepath="[(-122.1901,37.889),(-122.1899,37.891)]" 151200000000000000 +road name="High St ",thepath="[(-122.199,37.845),(-122.1983,37.849)]" 151286400000000000 +road name="High St ",thepath="[(-122.2007,37.837),(-122.1997,37.842)]" 151372800000000000 +road name="High St ",thepath="[(-122.2151,37.712),(-122.2145,37.716)]" 151459200000000000 +road name="High St ",thepath="[(-122.2233,37.647),(-122.2226,37.652)]" 151545600000000000 +road name="High St ",thepath="[(-122.2281,37.605),(-122.2273,37.611),(-122.2267,37.618)]" 151632000000000000 +road name="High St ",thepath="[(-122.2295,37.592),(-122.2288,37.597)]" 151718400000000000 +road name="High St ",thepath="[(-122.2379,37.514),(-122.2367,37.526)]" 151804800000000000 +road name="Highland Ave ",thepath="[(-122.2286,37.21),(-122.2285,37.2)]" 151891200000000000 +road name="Hilgard Ave ",thepath="[(-122.2603,37.787),(-122.2585,37.789)]" 151977600000000000 +road name="Hilgard Ave ",thepath="[(-122.2638,37.782),(-122.2624,37.783)]" 152064000000000000 +road name="Hill road",thepath="[(-122.2498,37.881),(-122.2486,37.868)]" 152150400000000000 +road name="Hillcrest Ave ",thepath="[(-121.7472,37.839),(-121.7473,37.834)]" 152236800000000000 +road name="Hillcrest Ave ",thepath="[(-122.0492,37.591),(-122.0485,37.587)]" 152323200000000000 +road name="Hillcroft Cir ",thepath="[(-122.2304,37.089),(-122.2301,37.093)]" 152409600000000000 +road name="Hilldale Ave ",thepath="[(-122.2629,37.96),(-122.2624,37.956)]" 152496000000000000 +road name="Hillegass Ave ",thepath="[(-122.2541,37.503),(-122.2543,37.513)]" 152582400000000000 +road name="Hillegass Ave ",thepath="[(-122.2545,37.561),(-122.2541,37.539)]" 152668800000000000 +road name="Hillegass Ave ",thepath="[(-122.2557,37.619),(-122.2554,37.601)]" 152755200000000000 +road name="Hiller Dr ",thepath="[(-122.2275,37.551),(-122.2263,37.542)]" 152841600000000000 +road name="Hiller Dr ",thepath="[(-122.228415,37.50849),(-122.2284,37.508)]" 152928000000000000 +road name="Hillgirt Cir ",thepath="[(-122.2429,37.079),(-122.2424,37.076)]" 153014400000000000 +road name="Hillside Ave ",thepath="[(-121.997183,37.84571),(-121.998118,37.83759),(-121.9983,37.836)]" 153100800000000000 +road name="Hillside Ct ",thepath="[(-122.2345,37.231),(-122.2342,37.225)]" 153187200000000000 +road name="Hillside St ",thepath="[(-122.1628,37.561),(-122.1625,37.553)]" 153273600000000000 +road name="Hilltop Cres",thepath="[(-122.2256,37.329),(-122.2246,37.319)]" 153360000000000000 +road name="Hillview Ct ",thepath="[(-121.9178,37.841),(-121.9191,37.838)]" 153446400000000000 +road name="Hillview road",thepath="[(-122.253,37.934),(-122.25,37.92)]" 153532800000000000 +road name="Hilsadne Ter ",thepath="[(-122.046919,37.64183),(-122.04699,37.6443)]" 153619200000000000 +road name="Hilton St ",thepath="[(-122.03,37.877),(-122.0305,37.864)]" 153705600000000000 +road name="Hobart Ct ",thepath="[(-121.9108,37.709),(-121.9102,37.711)]" 153792000000000000 +road name="Hochler Dr ",thepath="[(-121.9111,37.317),(-121.9099,37.305)]" 153878400000000000 +road name="Hogan Pl ",thepath="[(-121.7696,37.507),(-121.7689,37.502)]" 153964800000000000 +road name="Holiday St ",thepath="[(-122.0421,37.306),(-122.0418,37.304)]" 154051200000000000 +road name="Holladay Ct ",thepath="[(-121.7773,37.842),(-121.778,37.841)]" 154137600000000000 +road name="Holland Dr ",thepath="[(-121.9115,37.798),(-121.9118,37.801)]" 154224000000000000 +road name="Holland Dr ",thepath="[(-121.9124,37.814),(-121.9126,37.821)]" 154310400000000000 +road name="Holland St ",thepath="[(-122.2038,37.688),(-122.2016,37.677)]" 154396800000000000 +road name="Hollis St ",thepath="[(-122.2851,37.314),(-122.2857,37.332)]" 154483200000000000 +road name="Hollis St ",thepath="[(-122.2866,37.355),(-122.2869,37.362)]" 154569600000000000 +road name="Hollis St ",thepath="[(-122.2885,37.397),(-122.289,37.414)]" 154656000000000000 +road name="Hollis St ",thepath="[(-122.2894,37.428),(-122.2895,37.433)]" 154742400000000000 +road name="Hollis St ",thepath="[(-122.2901,37.45),(-122.2903,37.458)]" 154828800000000000 +road name="Hollis St ",thepath="[(-122.291,37.48),(-122.2913,37.49)]" 154915200000000000 +road name="Holly St ",thepath="[(-122.1715,37.488),(-122.1704,37.472)]" 155001600000000000 +road name="Holly St ",thepath="[(-122.1742,37.532),(-122.1737,37.526)]" 155088000000000000 +road name="Holly St ",thepath="[(-122.2393,37.3),(-122.2395,37.297)]" 155174400000000000 +road name="Hollyhock Dr ",thepath="[(-122.131813,37.99633),(-122.1306,37.997)]" 155260800000000000 +road name="Holmes St ",thepath="[(-121.7784,37.776),(-121.778512,37.7704)]" 155347200000000000 +road name="Holmes St ",thepath="[(-121.7789,37.751),(-121.7789,37.747)]" 155433600000000000 +road name="Holmes St ",thepath="[(-121.7794,37.697),(-121.7794,37.67)]" 155520000000000000 +road name="Holmes St ",thepath="[(-121.7816,37.566),(-121.7818,37.56)]" 155606400000000000 +road name="Holt St ",thepath="[(-122.063,37.813),(-122.063508,37.80257)]" 155692800000000000 +road name="Honeysuckle road",thepath="[(-121.7458,37.102),(-121.745,37.096)]" 155779200000000000 +road name="Hooper St ",thepath="[(-121.955964,37.28079),(-121.95582,37.27507)]" 155865600000000000 +road name="Hoover Ave ",thepath="[(-122.2088,37.116),(-122.2086,37.115)]" 155952000000000000 +road name="Hop Ranch road",thepath="[(-122.0461,37.942),(-122.045974,37.92945)]" 156038400000000000 +road name="Hopkins Ct ",thepath="[(-122.2829,37.819),(-122.2822,37.822)]" 156124800000000000 +road name="Hopkins St ",thepath="[(-122.0778,37.184),(-122.0775,37.159)]" 156211200000000000 +road name="Hopkins St ",thepath="[(-122.284,37.802),(-122.2834,37.805)]" 156297600000000000 +road name="Hopyard road",thepath="[(-121.8828,37.674),(-121.8833,37.678)]" 156384000000000000 +road name="Hopyard road",thepath="[(-121.9026,37.975),(-121.9033,37.985)]" 156470400000000000 +road name="Horatio Way ",thepath="[(-122.0499,37.781),(-122.0505,37.774)]" 156556800000000000 +road name="Hospital Dr ",thepath="[(-122.257,37.548),(-122.2559,37.549)]" 156643200000000000 +road name="Hotchkiss St ",thepath="[(-121.9283,37.947),(-121.9287,37.958)]" 156729600000000000 +road name="Howe Ct ",thepath="[(-121.9514,37.252),(-121.9544,37.25)]" 156816000000000000 +road name="Howe St ",thepath="[(-122.2541,37.265),(-122.2537,37.267)]" 156902400000000000 +road name="Hoyt St ",thepath="[(-121.9195,37.842),(-121.9184,37.824)]" 156988800000000000 +road name="Hubbard Ave ",thepath="[(-122.1585,37.914),(-122.1602,37.914)]" 157075200000000000 +road name="Huber Dr ",thepath="[(-122.0904,37.09),(-122.09042,37.0804),(-122.0901,37.074)]" 157161600000000000 +road name="Hudson Lane",thepath="[(-122.1483,37.14),(-122.149,37.137)]" 157248000000000000 +road name="Hugh Way ",thepath="[(-122.0322,37.185),(-122.0317,37.18)]" 157334400000000000 +road name="Hula Cir ",thepath="[(-122.0465,37.869),(-122.0468,37.875)]" 157420800000000000 +road name="Humboldt Ave ",thepath="[(-122.2145,37.872),(-122.2133,37.879)]" 157507200000000000 +road name="Hummingbird road",thepath="[(-121.8824,37.777),(-121.8853,37.773)]" 157593600000000000 +road name="Hummingbird road",thepath="[(-121.8862,37.774),(-121.8871,37.774)]" 157680000000000000 +road name="Hunter Ave ",thepath="[(-122.1824,37.312),(-122.1816,37.339)]" 157766400000000000 +road name="Huntington St ",thepath="[(-122.1866,37.895),(-122.186,37.899)]" 157852800000000000 +road name="Huntwood Ave ",thepath="[(-122.0531,37.093),(-122.0531,37.078)]" 157939200000000000 +road name="Huntwood Ave ",thepath="[(-122.06,37.279),(-122.0598,37.273)]" 158025600000000000 +road name="Huntwood Ave ",thepath="[(-122.0641,37.336),(-122.063367,37.32585),(-122.0628,37.318)]" 158112000000000000 +road name="Huntwood Ave ",thepath="[(-122.0781,37.48),(-122.0774,37.473)]" 158198400000000000 +road name="Hutton Ct ",thepath="[(-121.9826,37.274),(-121.9822,37.272)]" 158284800000000000 +road name="Hyde St ",thepath="[(-122.2198,37.883),(-122.2171,37.872)]" 158371200000000000 +road name="I St ",thepath="[(-121.7655,37.798),(-121.7652,37.791)]" 158457600000000000 +road name="I St ",thepath="[(-121.7675,37.848),(-121.7682,37.857)]" 158544000000000000 +road name="I- 205 ",thepath="((-121.573292,37.41726),(-121.571644,37.42),(-121.563557,37.42641))" 158630400000000000 +road name="I- 205 ",thepath="[(-121.572819,37.42107),(-121.571705,37.42168),(-121.563557,37.42641),(-121.560856,37.42885),(-121.559467,37.42946),(-121.559055,37.42939),(-121.558781,37.42992),(-121.556644,37.43214),(-121.5559,37.434)]" 158716800000000000 +road name="I- 580 ",thepath="((-121.628147,37.33089),(-121.605091,37.3605),(-121.589344,37.3946),(-121.58118,37.41062),(-121.573292,37.41726),(-121.571644,37.41779),(-121.55843,37.40406))" 158803200000000000 +road name="I- 580 ",thepath="((-121.628147,37.33089),(-121.629246,37.32464),(-121.644337,37.2411),(-121.654377,37.20798),(-121.654356,37.20723),(-121.654926,37.20531),(-121.658827,37.19552))" 158889600000000000 +road name="I- 580 ",thepath="((-121.727,37.074),(-121.7255,37.083),(-121.7234,37.092),(-121.723,37.095),(-121.721995,37.09859),(-121.7216,37.1),(-121.7211,37.102),(-121.7188,37.109))" 158976000000000000 +road name="I- 580 ",thepath="((-122.1752,37.826),(-122.177,37.833))" 159062400000000000 +road name="I- 580 ",thepath="((-122.2029,37.928),(-122.2036,37.933),(-122.2043,37.938))" 159148800000000000 +road name="I- 580 ",thepath="((-122.2535,37.196),(-122.2539,37.2))" 159235200000000000 +road name="I- 580 ",thepath="((-122.2744,37.262),(-122.2746,37.263),(-122.2774,37.27),(-122.278,37.271),(-122.2792,37.274),(-122.2806,37.275),(-122.2817,37.276),(-122.2828,37.276),(-122.2837,37.276))" 159321600000000000 +road name="I- 580 ",thepath="((-122.2837,37.276),(-122.2849,37.273),(-122.286,37.27),(-122.2868,37.269),(-122.2871,37.266),(-122.2882,37.265),(-122.2893,37.266))" 159408000000000000 +road name="I- 580 ",thepath="[(-121.560856,37.42885),(-121.55843,37.40406),(-121.557655,37.39926),(-121.556,37.389)]" 159494400000000000 +road name="I- 580 ",thepath="[(-121.628757,37.34287),(-121.600742,37.38407),(-121.588856,37.40124),(-121.580494,37.41451),(-121.572819,37.42107)]" 159580800000000000 +road name="I- 580 ",thepath="[(-121.628757,37.34287),(-121.630009,37.33791),(-121.657688,37.20089),(-121.658827,37.19552),(-121.659626,37.19326),(-121.660816,37.18952)]" 159667200000000000 +road name="I- 580 ",thepath="[(-121.664341,37.1822),(-121.662081,37.18693),(-121.661812,37.18746),(-121.660816,37.18952)]" 159753600000000000 +road name="I- 580 ",thepath="[(-121.664341,37.1822),(-121.666965,37.18166),(-121.6697,37.185)]" 159840000000000000 +road name="I- 580 ",thepath="[(-121.727,37.074),(-121.7229,37.093),(-121.722301,37.09522),(-121.721001,37.10005),(-121.7194,37.106),(-121.7188,37.109),(-121.7168,37.12),(-121.7163,37.123),(-121.7145,37.127),(-121.7096,37.148),(-121.707731,37.1568),(-121.7058,37.166),(-121.7055,37.168),(-121.7044,37.174),(-121.7038,37.172),(-121.7037,37.172),(-121.7027,37.175),(-121.7001,37.181),(-121.6957,37.191),(-121.6948,37.192),(-121.6897,37.204),(-121.6697,37.185)]" 159926400000000000 +road name="I- 580 ",thepath="[(-121.727,37.074),(-121.7275,37.072),(-121.7331,37.046)]" 160012800000000000 +road name="I- 580 ",thepath="[(-121.7705,37.013),(-121.769039,37.01504),(-121.7583,37.03),(-121.7557,37.03),(-121.754805,37.02966),(-121.750803,37.02812),(-121.75,37.02738),(-121.7489,37.026),(-121.7453,37.024),(-121.7438,37.024),(-121.7411,37.024),(-121.740416,37.02505),(-121.739035,37.02719),(-121.7379,37.028),(-121.736275,37.03278),(-121.7362,37.033),(-121.7358,37.034),(-121.7331,37.046)]" 160099200000000000 +road name="I- 580 ",thepath="[(-121.8585,37.013),(-121.8521,37.011),(-121.8485,37.011),(-121.8463,37.011),(-121.8455,37.011),(-121.8416,37.011),(-121.8414,37.011),(-121.834001,37.0104),(-121.8292,37.01),(-121.8288,37.009),(-121.82332,37.00833),(-121.8206,37.008)]" 160185600000000000 +road name="I- 580 ",thepath="[(-121.8585,37.013),(-121.863393,37.01213),(-121.8641,37.012)]" 160272000000000000 +road name="I- 580 ",thepath="[(-121.9214,37.015),(-121.9189,37.02),(-121.918,37.02),(-121.9087,37.017),(-121.90609,37.01797),(-121.906,37.018)]" 160358400000000000 +road name="I- 580 ",thepath="[(-121.9214,37.015),(-121.9217,37.014)]" 160444800000000000 +road name="I- 580 ",thepath="[(-121.9322,37.989),(-121.9243,37.006),(-121.9217,37.014)]" 160531200000000000 +road name="I- 580 ",thepath="[(-122.018,37.019),(-122.0009,37.032),(-121.9787,37.983),(-121.958,37.984),(-121.9571,37.986)]" 160617600000000000 +road name="I- 580 ",thepath="[(-122.0911,37.906),(-122.09,37.908),(-122.0882,37.908),(-122.0856,37.909),(-122.078489,37.909),(-122.0726,37.909),(-122.0711,37.91),(-122.068287,37.91137),(-122.0649,37.914)]" 160704000000000000 +road name="I- 580 ",thepath="[(-122.098,37.908),(-122.0965,37.904),(-122.095586,37.903),(-122.0953,37.903),(-122.0943,37.902),(-122.0938,37.903),(-122.093241,37.90351)]" 160790400000000000 +road name="I- 580 ",thepath="[(-122.1108,37.023),(-122.1101,37.02),(-122.108103,37.00764),(-122.108,37.007),(-122.1069,37.998),(-122.1064,37.994),(-122.1053,37.982),(-122.1048,37.977),(-122.1032,37.958),(-122.1026,37.953),(-122.1013,37.938),(-122.0989,37.911),(-122.0984,37.91),(-122.098,37.908)]" 160876800000000000 +road name="I- 580 ",thepath="[(-122.1306,37.157),(-122.1298,37.147),(-122.1277,37.122),(-122.126709,37.11468),(-122.1254,37.105),(-122.125,37.103),(-122.1237,37.096),(-122.1231,37.093),(-122.1214,37.082),(-122.1183,37.066),(-122.116,37.052),(-122.1153,37.048),(-122.1108,37.023)]" 160963200000000000 +road name="I- 580 ",thepath="[(-122.1543,37.703),(-122.1535,37.694),(-122.1512,37.655),(-122.1475,37.603),(-122.1468,37.583),(-122.1472,37.569),(-122.149044,37.54874),(-122.1493,37.546),(-122.1501,37.532),(-122.1506,37.509),(-122.1495,37.482),(-122.1487,37.467),(-122.1477,37.447),(-122.1414,37.383),(-122.1404,37.376),(-122.1398,37.372),(-122.139,37.356),(-122.1388,37.353),(-122.1385,37.34),(-122.1382,37.33),(-122.1378,37.316)]" 161049600000000000 +road name="I- 580 ",thepath="[(-122.1716,37.805),(-122.1703,37.799),(-122.170042,37.79758),(-122.169413,37.79411),(-122.167295,37.78244),(-122.166339,37.77717),(-122.165224,37.77112),(-122.1648,37.769)]" 161136000000000000 +road name="I- 580 ",thepath="[(-122.1716,37.805),(-122.1728,37.811),(-122.1742,37.817)]" 161222400000000000 +road name="I- 580 ",thepath="[(-122.177,37.833),(-122.1789,37.838)]" 161308800000000000 +road name="I- 580 ",thepath="[(-122.2043,37.938),(-122.204734,37.94074),(-122.2062,37.95),(-122.207492,37.95608),(-122.2079,37.958),(-122.2085,37.962)]" 161395200000000000 +road name="I- 580 ",thepath="[(-122.2197,37.99),(-122.22,37.99),(-122.222092,37.99523),(-122.2232,37.998),(-122.224146,37.99963),(-122.2261,37.003),(-122.2278,37.007),(-122.2302,37.026),(-122.2323,37.043),(-122.2344,37.059),(-122.235405,37.06427),(-122.2365,37.07)]" 161481600000000000 +road name="I- 580 ",thepath="[(-122.2535,37.196),(-122.2533,37.196)]" 161568000000000000 +road name="I- 580 ",thepath="[(-122.2539,37.2),(-122.2541,37.201)]" 161654400000000000 +road name="I- 580 ",thepath="[(-122.2613,37.23),(-122.2601,37.22833),(-122.2611,37.231),(-122.2639,37.238),(-122.2646,37.241),(-122.2654,37.242)]" 161740800000000000 +road name="I- 580 ",thepath="[(-122.2613,37.23),(-122.263448,37.23307),(-122.2647,37.23486),(-122.2655,37.236),(-122.2664,37.238)]" 161827200000000000 +road name="I- 580 ",thepath="[(-122.2664,37.238),(-122.2675,37.243)]" 161913600000000000 +road name="I- 580 ",thepath="[(-122.2675,37.243),(-122.2677,37.243),(-122.2681,37.244)]" 162000000000000000 +road name="I- 580 ",thepath="[(-122.2679,37.248),(-122.2681,37.248)]" 162086400000000000 +road name="I- 580 ",thepath="[(-122.2744,37.262),(-122.2734,37.259),(-122.2695,37.247),(-122.268532,37.2449),(-122.268237,37.24426),(-122.2681,37.244)]" 162172800000000000 +road name="I- 580 ",thepath="[(-122.2893,37.266),(-122.2904,37.27),(-122.2909,37.273)]" 162259200000000000 +road name="I- 580 ",thepath="[(-122.2901,37.274),(-122.2905,37.278),(-122.2921,37.286),(-122.2927,37.299)]" 162345600000000000 +road name="I- 580 ",thepath="[(-122.2909,37.273),(-122.2918,37.279),(-122.2923,37.282)]" 162432000000000000 +road name="I- 580 ",thepath="[(-122.2928,37.293),(-122.2931,37.301)]" 162518400000000000 +road name="I- 580 Ramp",thepath="((-121.74,37.036),(-121.7393,37.033),(-121.7384,37.032))" 162604800000000000 +road name="I- 580 Ramp",thepath="((-121.7843,37.996),(-121.784294,37.99539),(-121.7842,37.985))" 162691200000000000 +road name="I- 580 Ramp",thepath="((-121.818,37.011),(-121.8187,37.014))" 162777600000000000 +road name="I- 580 Ramp",thepath="((-121.8185,37.008),(-121.8187,37.001))" 162864000000000000 +road name="I- 580 Ramp",thepath="((-121.9025,37.018),(-121.9037,37.022),(-121.9059,37.029))" 162950400000000000 +road name="I- 580 Ramp",thepath="((-121.9335,37.987),(-121.9331,37.979))" 163036800000000000 +road name="I- 580 Ramp",thepath="((-122.0206,37.007),(-122.0203,37.015))" 163123200000000000 +road name="I- 580 Ramp",thepath="((-122.1202,37.085),(-122.1203,37.083))" 163209600000000000 +road name="I- 580 Ramp",thepath="((-122.1522,37.526),(-122.1514,37.524))" 163296000000000000 +road name="I- 580 Ramp",thepath="((-122.2541,37.201),(-122.254,37.205))" 163382400000000000 +road name="I- 580 Ramp",thepath="((-122.2646,37.241),(-122.2653,37.244),(-122.266,37.245))" 163468800000000000 +road name="I- 580 Ramp",thepath="((-122.2654,37.242),(-122.266,37.245),(-122.2671,37.245))" 163555200000000000 +road name="I- 580 Ramp",thepath="((-122.2786,37.288),(-122.2798,37.286),(-122.2804,37.285),(-122.2814,37.282),(-122.2818,37.28))" 163641600000000000 +road name="I- 580 Ramp",thepath="((-122.2796,37.289),(-122.2818,37.283),(-122.2822,37.281))" 163728000000000000 +road name="I- 580 Ramp",thepath="[(-121.657688,37.20089),(-121.658176,37.20089),(-121.659977,37.19715),(-121.660232,37.1965),(-121.661524,37.18996),(-121.662081,37.18693)]" 163814400000000000 +road name="I- 580 Ramp",thepath="[(-121.660816,37.18952),(-121.659428,37.19105),(-121.658115,37.19272),(-121.657078,37.19639),(-121.654926,37.20531)]" 163900800000000000 +road name="I- 580 Ramp",thepath="[(-121.7218,37.088),(-121.722301,37.09522)]" 163987200000000000 +road name="I- 580 Ramp",thepath="[(-121.7231,37.108),(-121.7211,37.102)]" 164073600000000000 +road name="I- 580 Ramp",thepath="[(-121.7232,37.103),(-121.7222,37.103),(-121.721995,37.09859)]" 164160000000000000 +road name="I- 580 Ramp",thepath="[(-121.7232,37.103),(-121.7234,37.092)]" 164246400000000000 +road name="I- 580 Ramp",thepath="[(-121.7255,37.083),(-121.7232,37.114)]" 164332800000000000 +road name="I- 580 Ramp",thepath="[(-121.727,37.074),(-121.7237,37.084),(-121.723311,37.0823),(-121.7221,37.077),(-121.7219,37.081),(-121.720744,37.09257),(-121.7194,37.106)]" 164419200000000000 +road name="I- 580 Ramp",thepath="[(-121.739,37.02),(-121.738298,37.02506),(-121.737988,37.02686),(-121.7379,37.028)]" 164505600000000000 +road name="I- 580 Ramp",thepath="[(-121.739,37.02),(-121.7402,37.015)]" 164592000000000000 +road name="I- 580 Ramp",thepath="[(-121.74,37.034),(-121.7409,37.034),(-121.7401,37.029),(-121.7384,37.032),(-121.7358,37.034)]" 164678400000000000 +road name="I- 580 Ramp",thepath="[(-121.7411,37.024),(-121.7401,37.018),(-121.7401,37.024)]" 164764800000000000 +road name="I- 580 Ramp",thepath="[(-121.7438,37.024),(-121.742961,37.02896),(-121.7416,37.037),(-121.74,37.039)]" 164851200000000000 +road name="I- 580 Ramp",thepath="[(-121.7743,37.006),(-121.7729,37.006),(-121.7705,37.013)]" 164937600000000000 +road name="I- 580 Ramp",thepath="[(-121.7743,37.006),(-121.7729,37.013),(-121.7705,37.013)]" 165024000000000000 +road name="I- 580 Ramp",thepath="[(-121.7865,37.995),(-121.7852,37.992),(-121.7842,37.985),(-121.7838,37.966),(-121.7834,37.957)]" 165110400000000000 +road name="I- 580 Ramp",thepath="[(-121.7891,37.998),(-121.7854,37.999),(-121.78441,37.9963),(-121.7843,37.996)]" 165196800000000000 +road name="I- 580 Ramp",thepath="[(-121.8195,37.007),(-121.8187,37.014),(-121.8179,37.015)]" 165283200000000000 +road name="I- 580 Ramp",thepath="[(-121.8206,37.008),(-121.8187,37.001),(-121.8179,37.005)]" 165369600000000000 +road name="I- 580 Ramp",thepath="[(-121.8454,37.01),(-121.8455,37.011)]" 165456000000000000 +road name="I- 580 Ramp",thepath="[(-121.8463,37.011),(-121.8496,37.025)]" 165542400000000000 +road name="I- 580 Ramp",thepath="[(-121.8521,37.011),(-121.8479,37.999),(-121.8476,37.999),(-121.8456,37.01),(-121.8455,37.011)]" 165628800000000000 +road name="I- 580 Ramp",thepath="[(-121.8521,37.011),(-121.8496,37.025)]" 165715200000000000 +road name="I- 580 Ramp",thepath="[(-121.866951,37.01385),(-121.871381,37.02608)]" 165801600000000000 +road name="I- 580 Ramp",thepath="[(-121.8695,37.013),(-121.8712,37.011),(-121.8717,37.001),(-121.8714,37.001)]" 165888000000000000 +road name="I- 580 Ramp",thepath="[(-121.8713,37.014),(-121.871352,37.02321)]" 165974400000000000 +road name="I- 580 Ramp",thepath="[(-121.8743,37.014),(-121.8722,37.999),(-121.8714,37.999)]" 166060800000000000 +road name="I- 580 Ramp",thepath="[(-121.9043,37.998),(-121.9036,37.013),(-121.902632,37.0174),(-121.9025,37.018)]" 166147200000000000 +road name="I- 580 Ramp",thepath="[(-121.906,37.018),(-121.9056,37.011)]" 166233600000000000 +road name="I- 580 Ramp",thepath="[(-121.906,37.018),(-121.905635,37.0239),(-121.9065,37.023)]" 166320000000000000 +road name="I- 580 Ramp",thepath="[(-121.906,37.018),(-121.906044,37.02416),(-121.906177,37.02331),(-121.906315,37.02115)]" 166406400000000000 +road name="I- 580 Ramp",thepath="[(-121.9068,37.027),(-121.9059,37.029),(-121.9078,37.04)]" 166492800000000000 +road name="I- 580 Ramp",thepath="[(-121.9087,37.017),(-121.9056,37.003),(-121.905,37.004)]" 166579200000000000 +road name="I- 580 Ramp",thepath="[(-121.9087,37.017),(-121.907194,37.02619),(-121.9071,37.029),(-121.9072,37.033)]" 166665600000000000 +road name="I- 580 Ramp",thepath="[(-121.9335,37.987),(-121.9341,37.991),(-121.9345,37.985)]" 166752000000000000 +road name="I- 580 Ramp",thepath="[(-121.9345,37.985),(-121.9341,37.978)]" 166838400000000000 +road name="I- 580 Ramp",thepath="[(-121.9364,37.986),(-121.9338,37.971),(-121.9331,37.979),(-121.9322,37.989)]" 166924800000000000 +road name="I- 580 Ramp",thepath="[(-121.9368,37.986),(-121.936483,37.98832),(-121.9353,37.997),(-121.93504,37.00035),(-121.9346,37.006),(-121.933764,37.00031),(-121.9333,37.997),(-121.9322,37.989)]" 167011200000000000 +road name="I- 580 Ramp",thepath="[(-121.9562,37.984),(-121.9565,37.98)]" 167097600000000000 +road name="I- 580 Ramp",thepath="[(-121.9571,37.986),(-121.9565,37.98)]" 167184000000000000 +road name="I- 580 Ramp",thepath="[(-121.958,37.984),(-121.9565,37.98)]" 167270400000000000 +road name="I- 580 Ramp",thepath="[(-122.0195,37.012),(-122.0184,37.009),(-122.018,37.019)]" 167356800000000000 +road name="I- 580 Ramp",thepath="[(-122.0195,37.012),(-122.0203,37.015),(-122.0212,37.02)]" 167443200000000000 +road name="I- 580 Ramp",thepath="[(-122.0531,37.932),(-122.0544,37.941)]" 167529600000000000 +road name="I- 580 Ramp",thepath="[(-122.0649,37.914),(-122.0618,37.916),(-122.0604,37.92)]" 167616000000000000 +road name="I- 580 Ramp",thepath="[(-122.0649,37.914),(-122.0639,37.92),(-122.063,37.923)]" 167702400000000000 +road name="I- 580 Ramp",thepath="[(-122.0884,37.911),(-122.0856,37.909)]" 167788800000000000 +road name="I- 580 Ramp",thepath="[(-122.093241,37.90351),(-122.09364,37.89634),(-122.093788,37.89212)]" 167875200000000000 +road name="I- 580 Ramp",thepath="[(-122.0934,37.896),(-122.09257,37.89961),(-122.0911,37.906)]" 167961600000000000 +road name="I- 580 Ramp",thepath="[(-122.0941,37.897),(-122.0943,37.902)]" 168048000000000000 +road name="I- 580 Ramp",thepath="[(-122.0953,37.903),(-122.0971,37.911),(-122.0943,37.902)]" 168134400000000000 +road name="I- 580 Ramp",thepath="[(-122.096,37.888),(-122.0962,37.891),(-122.0964,37.9)]" 168220800000000000 +road name="I- 580 Ramp",thepath="[(-122.101,37.898),(-122.1005,37.902),(-122.0989,37.911)]" 168307200000000000 +road name="I- 580 Ramp",thepath="[(-122.108,37.007),(-122.1093,37.02)]" 168393600000000000 +road name="I- 580 Ramp",thepath="[(-122.1086,37.003),(-122.1068,37.993),(-122.1066,37.992),(-122.1053,37.982)]" 168480000000000000 +road name="I- 580 Ramp",thepath="[(-122.1086,37.003),(-122.1103,37.018),(-122.1108,37.023),(-122.1093,37.02)]" 168566400000000000 +road name="I- 580 Ramp",thepath="[(-122.1206,37.088),(-122.1203,37.083),(-122.1183,37.066)]" 168652800000000000 +road name="I- 580 Ramp",thepath="[(-122.1215,37.075),(-122.1183,37.066)]" 168739200000000000 +road name="I- 580 Ramp",thepath="[(-122.1226,37.099),(-122.1238,37.102),(-122.1254,37.105)]" 168825600000000000 +road name="I- 580 Ramp",thepath="[(-122.1237,37.096),(-122.1234,37.09)]" 168912000000000000 +road name="I- 580 Ramp",thepath="[(-122.1311,37.177),(-122.1306,37.157)]" 168998400000000000 +road name="I- 580 Ramp",thepath="[(-122.1338,37.222),(-122.135,37.227)]" 169084800000000000 +road name="I- 580 Ramp",thepath="[(-122.1362,37.248),(-122.1374,37.249)]" 169171200000000000 +road name="I- 580 Ramp",thepath="[(-122.1371,37.279),(-122.1367,37.264)]" 169257600000000000 +road name="I- 580 Ramp",thepath="[(-122.1371,37.279),(-122.1381,37.262)]" 169344000000000000 +road name="I- 580 Ramp",thepath="[(-122.1378,37.316),(-122.1374,37.311),(-122.1373,37.307),(-122.1367,37.296)]" 169430400000000000 +road name="I- 580 Ramp",thepath="[(-122.1379,37.282),(-122.1371,37.279)]" 169516800000000000 +road name="I- 580 Ramp",thepath="[(-122.1391,37.367),(-122.1388,37.353)]" 169603200000000000 +road name="I- 580 Ramp",thepath="[(-122.1414,37.383),(-122.1407,37.376),(-122.1403,37.372),(-122.139,37.356)]" 169689600000000000 +road name="I- 580 Ramp",thepath="[(-122.1487,37.467),(-122.1476,37.454)]" 169776000000000000 +road name="I- 580 Ramp",thepath="[(-122.1493,37.546),(-122.1508,37.535)]" 169862400000000000 +road name="I- 580 Ramp",thepath="[(-122.1495,37.482),(-122.1489,37.452)]" 169948800000000000 +road name="I- 580 Ramp",thepath="[(-122.1521,37.529),(-122.1514,37.524),(-122.1506,37.509)]" 170035200000000000 +road name="I- 580 Ramp",thepath="[(-122.1521,37.682),(-122.151,37.659),(-122.1512,37.655)]" 170121600000000000 +road name="I- 580 Ramp",thepath="[(-122.1539,37.707),(-122.1535,37.694)]" 170208000000000000 +road name="I- 580 Ramp",thepath="[(-122.1553,37.706),(-122.1543,37.703)]" 170294400000000000 +road name="I- 580 Ramp",thepath="[(-122.1567,37.727),(-122.156,37.71)]" 170380800000000000 +road name="I- 580 Ramp",thepath="[(-122.1648,37.769),(-122.16472,37.7682),(-122.1638,37.759)]" 170467200000000000 +road name="I- 580 Ramp",thepath="[(-122.1716,37.805),(-122.1725,37.816)]" 170553600000000000 +road name="I- 580 Ramp",thepath="[(-122.1729,37.803),(-122.1716,37.801),(-122.1703,37.799)]" 170640000000000000 +road name="I- 580 Ramp",thepath="[(-122.1742,37.817),(-122.1752,37.822),(-122.177,37.833)]" 170726400000000000 +road name="I- 580 Ramp",thepath="[(-122.1764,37.839),(-122.1756,37.838),(-122.1743,37.833)]" 170812800000000000 +road name="I- 580 Ramp",thepath="[(-122.1773,37.839),(-122.1764,37.839)]" 170899200000000000 +road name="I- 580 Ramp",thepath="[(-122.1789,37.838),(-122.1773,37.839)]" 170985600000000000 +road name="I- 580 Ramp",thepath="[(-122.1823,37.838),(-122.182011,37.83754),(-122.180678,37.83541),(-122.1798,37.834),(-122.1798,37.838)]" 171072000000000000 +road name="I- 580 Ramp",thepath="[(-122.1873,37.838),(-122.1868,37.841),(-122.1866,37.844),(-122.1854,37.841),(-122.1847,37.84)]" 171158400000000000 +road name="I- 580 Ramp",thepath="[(-122.1895,37.844),(-122.1886,37.845)]" 171244800000000000 +road name="I- 580 Ramp",thepath="[(-122.1909,37.85),(-122.1892,37.848),(-122.1879,37.844)]" 171331200000000000 +road name="I- 580 Ramp",thepath="[(-122.1917,37.853),(-122.1927,37.863)]" 171417600000000000 +road name="I- 580 Ramp",thepath="[(-122.1924,37.854),(-122.189775,37.84425),(-122.1889,37.841)]" 171504000000000000 +road name="I- 580 Ramp",thepath="[(-122.1975,37.878),(-122.196458,37.87516),(-122.1964,37.875),(-122.1951,37.871),(-122.1942,37.869)]" 171590400000000000 +road name="I- 580 Ramp",thepath="[(-122.2017,37.923),(-122.2029,37.928)]" 171676800000000000 +road name="I- 580 Ramp",thepath="[(-122.2027,37.918),(-122.2037,37.93),(-122.2043,37.938)]" 171763200000000000 +road name="I- 580 Ramp",thepath="[(-122.2079,37.958),(-122.2099,37.962)]" 171849600000000000 +road name="I- 580 Ramp",thepath="[(-122.2085,37.962),(-122.209,37.966)]" 171936000000000000 +road name="I- 580 Ramp",thepath="[(-122.2158,37.985),(-122.2173,37.989),(-122.2178,37.991),(-122.218357,37.99071),(-122.219392,37.99016),(-122.2197,37.99)]" 172022400000000000 +road name="I- 580 Ramp",thepath="[(-122.2161,37.976),(-122.218,37.982),(-122.218481,37.98426),(-122.2197,37.99)]" 172108800000000000 +road name="I- 580 Ramp",thepath="[(-122.2271,37.001),(-122.2261,37.003)]" 172195200000000000 +road name="I- 580 Ramp",thepath="[(-122.2278,37.013),(-122.2261,37.003)]" 172281600000000000 +road name="I- 580 Ramp",thepath="[(-122.2365,37.07),(-122.2346,37.052),(-122.2338,37.044)]" 172368000000000000 +road name="I- 580 Ramp",thepath="[(-122.2428,37.096),(-122.2414,37.091),(-122.241182,37.09018),(-122.2406,37.088)]" 172454400000000000 +road name="I- 580 Ramp",thepath="[(-122.2453,37.095),(-122.2414,37.089)]" 172540800000000000 +road name="I- 580 Ramp",thepath="[(-122.249,37.121),(-122.2476,37.12)]" 172627200000000000 +road name="I- 580 Ramp",thepath="[(-122.2491,37.115),(-122.2489,37.113)]" 172713600000000000 +road name="I- 580 Ramp",thepath="[(-122.2494,37.125),(-122.2489,37.113)]" 172800000000000000 +road name="I- 580 Ramp",thepath="[(-122.2501,37.148),(-122.249485,37.14041),(-122.2484,37.127)]" 172886400000000000 +road name="I- 580 Ramp",thepath="[(-122.2529,37.197),(-122.2525,37.192),(-122.2517,37.174)]" 172972800000000000 +road name="I- 580 Ramp",thepath="[(-122.2535,37.192),(-122.253,37.182)]" 173059200000000000 +road name="I- 580 Ramp",thepath="[(-122.2535,37.192),(-122.2539,37.2)]" 173145600000000000 +road name="I- 580 Ramp",thepath="[(-122.2547,37.205),(-122.254,37.205),(-122.2538,37.202),(-122.2535,37.196)]" 173232000000000000 +road name="I- 580 Ramp",thepath="[(-122.2564,37.213),(-122.2542,37.199),(-122.2538,37.19)]" 173318400000000000 +road name="I- 580 Ramp",thepath="[(-122.2564,37.213),(-122.2544,37.197),(-122.2538,37.19)]" 173404800000000000 +road name="I- 580 Ramp",thepath="[(-122.2604,37.222),(-122.2613,37.23)]" 173491200000000000 +road name="I- 580 Ramp",thepath="[(-122.2639,37.238),(-122.2659,37.239),(-122.2664,37.238),(-122.2676,37.231),(-122.268,37.227)]" 173577600000000000 +road name="I- 580 Ramp",thepath="[(-122.267,37.261),(-122.2671,37.263)]" 173664000000000000 +road name="I- 580 Ramp",thepath="[(-122.2671,37.245),(-122.2673,37.248)]" 173750400000000000 +road name="I- 580 Ramp",thepath="[(-122.2671,37.245),(-122.2675,37.243)]" 173836800000000000 +road name="I- 580 Ramp",thepath="[(-122.2673,37.248),(-122.2676,37.25),(-122.2677,37.252)]" 173923200000000000 +road name="I- 580 Ramp",thepath="[(-122.2676,37.273),(-122.267231,37.28349),(-122.266927,37.29214)]" 174009600000000000 +road name="I- 580 Ramp",thepath="[(-122.2676,37.273),(-122.2679,37.264),(-122.2677,37.252)]" 174096000000000000 +road name="I- 580 Ramp",thepath="[(-122.2677,37.242),(-122.2675,37.243)]" 174182400000000000 +road name="I- 580 Ramp",thepath="[(-122.2677,37.242),(-122.2681,37.238),(-122.2678,37.233)]" 174268800000000000 +road name="I- 580 Ramp",thepath="[(-122.2677,37.242),(-122.2681,37.244)]" 174355200000000000 +road name="I- 580 Ramp",thepath="[(-122.2677,37.242),(-122.2683,37.243)]" 174441600000000000 +road name="I- 580 Ramp",thepath="[(-122.2677,37.252),(-122.267508,37.25368),(-122.267,37.261)]" 174528000000000000 +road name="I- 580 Ramp",thepath="[(-122.2683,37.243),(-122.2685,37.243)]" 174614400000000000 +road name="I- 580 Ramp",thepath="[(-122.268532,37.2449),(-122.2685,37.243)]" 174700800000000000 +road name="I- 580 Ramp",thepath="[(-122.2686,37.249),(-122.2682,37.245),(-122.2681,37.244)]" 174787200000000000 +road name="I- 580 Ramp",thepath="[(-122.2686,37.249),(-122.268532,37.2449)]" 174873600000000000 +road name="I- 580 Ramp",thepath="[(-122.2686,37.249),(-122.2701,37.255)]" 174960000000000000 +road name="I- 580 Ramp",thepath="[(-122.2695,37.247),(-122.2686,37.249),(-122.2677,37.252)]" 175046400000000000 +road name="I- 580 Ramp",thepath="[(-122.2695,37.247),(-122.2692,37.244),(-122.2684,37.234)]" 175132800000000000 +road name="I- 580 Ramp",thepath="[(-122.2716,37.259),(-122.2734,37.259)]" 175219200000000000 +road name="I- 580 Ramp",thepath="[(-122.2806,37.275),(-122.2818,37.28),(-122.2822,37.281),(-122.2837,37.276)]" 175305600000000000 +road name="I- 580 Ramp",thepath="[(-122.2913,37.278),(-122.2917,37.282)]" 175392000000000000 +road name="I- 580 Ramp",thepath="[(-122.2917,37.282),(-122.2921,37.286)]" 175478400000000000 +road name="I- 580/I-680 Ramp",thepath="((-121.9207,37.988),(-121.9192,37.016))" 175564800000000000 +road name="I- 580/I-680 Ramp",thepath="((-121.9218,37.021),(-121.9237,37.017))" 175651200000000000 +road name="I- 580/I-680 Ramp",thepath="[(-121.9213,37.005),(-121.9203,37.013),(-121.9192,37.016),(-121.918,37.02)]" 175737600000000000 +road name="I- 580/I-680 Ramp",thepath="[(-121.922017,37.02317),(-121.9212,37.021)]" 175824000000000000 +road name="I- 580/I-680 Ramp",thepath="[(-121.9225,37.034),(-121.9218,37.031),(-121.9213,37.026),(-121.919443,37.02043),(-121.921326,37.01739)]" 175910400000000000 +road name="I- 580/I-680 Ramp",thepath="[(-121.9243,37.006),(-121.9238,37.005),(-121.9225,37.008),(-121.92154,37.0104)]" 175996800000000000 +road name="I- 580/I-680 Ramp",thepath="[(-121.9243,37.006),(-121.924389,37.00779),(-121.9237,37.017),(-121.9231,37.022),(-121.9227,37.029),(-121.9229,37.039)]" 176083200000000000 +road name="I- 680 ",thepath="((-121.8706,37.038),(-121.8709,37.047))" 176169600000000000 +road name="I- 680 ",thepath="((-121.939,37.15),(-121.9387,37.145),(-121.9373,37.125),(-121.934242,37.07643),(-121.933886,37.0709),(-121.9337,37.068),(-121.933122,37.06139),(-121.932736,37.05698),(-121.93222,37.05108),(-121.931844,37.04678),(-121.930113,37.027),(-121.926829,37),(-121.9265,37.998),(-121.9217,37.96),(-121.9203,37.949),(-121.9184,37.934))" 176256000000000000 +road name="I- 680 ",thepath="[(-121.8709,37.047),(-121.8831,37.366),(-121.8833,37.376)]" 176342400000000000 +road name="I- 680 ",thepath="[(-121.8852,37.422),(-121.8874,37.444),(-121.8902,37.47),(-121.8905,37.472),(-121.8907,37.474),(-121.8985,37.545),(-121.8994,37.553),(-121.9007,37.565)]" 176428800000000000 +road name="I- 680 ",thepath="[(-121.8867,37.732),(-121.8845,37.744),(-121.8818,37.756),(-121.8761,37.781),(-121.8712,37.857)]" 176515200000000000 +road name="I- 680 ",thepath="[(-121.902447,37.64695),(-121.903435,37.65882)]" 176601600000000000 +road name="I- 680 ",thepath="[(-121.9101,37.715),(-121.909801,37.70519),(-121.909562,37.69734),(-121.909493,37.69507),(-121.9094,37.692),(-121.909295,37.68862),(-121.909145,37.6838),(-121.909103,37.68245),(-121.908715,37.66995),(-121.908524,37.6638),(-121.9082,37.653)]" 176688000000000000 +road name="I- 680 ",thepath="[(-121.9101,37.715),(-121.911269,37.74682),(-121.9119,37.764),(-121.9124,37.776),(-121.9174,37.905),(-121.9194,37.957),(-121.9207,37.988)]" 176774400000000000 +road name="I- 680 ",thepath="[(-121.9139,37.562),(-121.9077,37.609)]" 176860800000000000 +road name="I- 680 ",thepath="[(-121.9139,37.562),(-121.915,37.54),(-121.9156,37.532),(-121.9165,37.519),(-121.9174,37.504),(-121.918,37.493),(-121.92,37.438),(-121.9202,37.435),(-121.9233,37.404),(-121.9238,37.402)]" 176947200000000000 +road name="I- 680 ",thepath="[(-121.9184,37.934),(-121.917,37.913),(-121.9122,37.83),(-121.9052,37.702)]" 177033600000000000 +road name="I- 680 ",thepath="[(-121.92154,37.0104),(-121.9217,37.014)]" 177120000000000000 +road name="I- 680 ",thepath="[(-121.9217,37.014),(-121.9218,37.021)]" 177206400000000000 +road name="I- 680 ",thepath="[(-121.9229,37.039),(-121.9243,37.057),(-121.9286,37.106),(-121.929195,37.11329),(-121.929661,37.119),(-121.932027,37.148),(-121.93391,37.17107),(-121.9357,37.193),(-121.936421,37.20193),(-121.9378,37.219)]" 177292800000000000 +road name="I- 680 ",thepath="[(-121.939,37.15),(-121.9418,37.195)]" 177379200000000000 +road name="I- 680 Ramp",thepath="((-121.9007,37.565),(-121.9008,37.558))" 177465600000000000 +road name="I- 680 Ramp",thepath="((-121.921,37.965),(-121.9198,37.96),(-121.9208,37.957),(-121.9199,37.951),(-121.9187,37.941))" 177552000000000000 +road name="I- 680 Ramp",thepath="((-121.9247,37.932),(-121.9211,37.944),(-121.9201,37.944))" 177638400000000000 +road name="I- 680 Ramp",thepath="((-121.9368,37.149),(-121.937,37.144))" 177724800000000000 +road name="I- 680 Ramp",thepath="((-121.9372,37.335),(-121.938,37.32))" 177811200000000000 +road name="I- 680 Ramp",thepath="((-121.9402,37.143),(-121.94,37.139))" 177897600000000000 +road name="I- 680 Ramp",thepath="((-121.9418,37.314),(-121.9414,37.32))" 177984000000000000 +road name="I- 680 Ramp",thepath="((-121.9422,37.314),(-121.9423,37.318))" 178070400000000000 +road name="I- 680 Ramp",thepath="[(-121.8698,37.01),(-121.8706,37.038)]" 178156800000000000 +road name="I- 680 Ramp",thepath="[(-121.8701,37.878),(-121.8681,37.881)]" 178243200000000000 +road name="I- 680 Ramp",thepath="[(-121.8703,37.891),(-121.8712,37.857),(-121.8678,37.875)]" 178329600000000000 +road name="I- 680 Ramp",thepath="[(-121.8709,37.924),(-121.8686,37.925)]" 178416000000000000 +road name="I- 680 Ramp",thepath="[(-121.8712,37.01),(-121.8709,37.047)]" 178502400000000000 +road name="I- 680 Ramp",thepath="[(-121.8818,37.756),(-121.8842,37.741),(-121.8867,37.732)]" 178588800000000000 +road name="I- 680 Ramp",thepath="[(-121.8833,37.376),(-121.8833,37.392),(-121.883,37.4),(-121.8835,37.402),(-121.8852,37.422)]" 178675200000000000 +road name="I- 680 Ramp",thepath="[(-121.8839,37.397),(-121.8847,37.394),(-121.884,37.399)]" 178761600000000000 +road name="I- 680 Ramp",thepath="[(-121.8985,37.545),(-121.9001,37.565),(-121.8999,37.571),(-121.9008,37.572),(-121.903,37.586)]" 178848000000000000 +road name="I- 680 Ramp",thepath="[(-121.8994,37.553),(-121.9008,37.558),(-121.9014,37.565)]" 178934400000000000 +road name="I- 680 Ramp",thepath="[(-121.9027,37.672),(-121.902847,37.6715),(-121.90161,37.64898)]" 179020800000000000 +road name="I- 680 Ramp",thepath="[(-121.905,37.699),(-121.9004,37.677),(-121.90161,37.64898)]" 179107200000000000 +road name="I- 680 Ramp",thepath="[(-121.9052,37.702),(-121.9047,37.667),(-121.903435,37.65882)]" 179193600000000000 +road name="I- 680 Ramp",thepath="[(-121.9077,37.609),(-121.9036,37.614)]" 179280000000000000 +road name="I- 680 Ramp",thepath="[(-121.9077,37.609),(-121.9053,37.625)]" 179366400000000000 +road name="I- 680 Ramp",thepath="[(-121.9167,37.5),(-121.9174,37.504)]" 179452800000000000 +road name="I- 680 Ramp",thepath="[(-121.92,37.438),(-121.9218,37.424),(-121.9238,37.408),(-121.9252,37.392)]" 179539200000000000 +road name="I- 680 Ramp",thepath="[(-121.921,37.965),(-121.922,37.966),(-121.9214,37.961)]" 179625600000000000 +road name="I- 680 Ramp",thepath="[(-121.9226,37.394),(-121.9232,37.392),(-121.9252,37.392)]" 179712000000000000 +road name="I- 680 Ramp",thepath="[(-121.9238,37.402),(-121.9234,37.395),(-121.923,37.399)]" 179798400000000000 +road name="I- 680 Ramp",thepath="[(-121.9265,37.998),(-121.9242,37.983),(-121.922383,37.9786),(-121.9198,37.975),(-121.9195,37.954),(-121.9187,37.941),(-121.9184,37.934)]" 179884800000000000 +road name="I- 680 Ramp",thepath="[(-121.9265,37.998),(-121.9249,37.98),(-121.9227,37.963),(-121.9221,37.959),(-121.9214,37.954),(-121.9206,37.947),(-121.9201,37.944),(-121.9184,37.934)]" 179971200000000000 +road name="I- 680 Ramp",thepath="[(-121.9373,37.148),(-121.937,37.144),(-121.9373,37.125)]" 180057600000000000 +road name="I- 680 Ramp",thepath="[(-121.9387,37.145),(-121.9376,37.147)]" 180144000000000000 +road name="I- 680 Ramp",thepath="[(-121.9394,37.144),(-121.9387,37.145)]" 180230400000000000 +road name="I- 680 Ramp",thepath="[(-121.9401,37.233),(-121.9378,37.219),(-121.937899,37.22791),(-121.938,37.237)]" 180316800000000000 +road name="I- 680 Ramp",thepath="[(-121.9406,37.142),(-121.94,37.139),(-121.9373,37.125)]" 180403200000000000 +road name="I- 680 Ramp",thepath="[(-121.9426,37.315),(-121.9423,37.318),(-121.9414,37.32),(-121.9394,37.324),(-121.938,37.32),(-121.9368,37.313)]" 180489600000000000 +road name="I- 80 ",thepath="((-122.2927,37.299),(-122.2928,37.293),(-122.2932,37.284))" 180576000000000000 +road name="I- 80 ",thepath="((-122.2931,37.301),(-122.2949,37.279))" 180662400000000000 +road name="I- 80 ",thepath="((-122.2937,37.277),(-122.3016,37.262))" 180748800000000000 +road name="I- 80 ",thepath="((-122.2949,37.279),(-122.2962,37.273))" 180835200000000000 +road name="I- 80 ",thepath="((-122.2962,37.273),(-122.3004,37.264))" 180921600000000000 +road name="I- 80 ",thepath="((-122.3004,37.264),(-122.3016,37.262),(-122.3051,37.254),(-122.3083,37.249))" 181008000000000000 +road name="I- 80 ",thepath="((-122.307,37.902),(-122.3074,37.896),(-122.307512,37.89327),(-122.3081,37.879),(-122.3077,37.861))" 181094400000000000 +road name="I- 80 ",thepath="[(-122.2932,37.284),(-122.2934,37.28)]" 181180800000000000 +road name="I- 80 ",thepath="[(-122.2981,37.492),(-122.2978,37.48),(-122.2976,37.473),(-122.2971,37.452),(-122.2962,37.413)]" 181267200000000000 +road name="I- 80 ",thepath="[(-122.3023,37.644),(-122.2988,37.518)]" 181353600000000000 +road name="I- 80 ",thepath="[(-122.3062,37.774),(-122.3038,37.695)]" 181440000000000000 +road name="I- 80 ",thepath="[(-122.3065,37.935),(-122.3065,37.913),(-122.3067,37.905),(-122.307,37.902)]" 181526400000000000 +road name="I- 80 ",thepath="[(-122.3075,37.828),(-122.3076,37.831)]" 181612800000000000 +road name="I- 80 ",thepath="[(-122.3075,37.828),(-122.3077,37.822),(-122.3074,37.817),(-122.3069,37.801),(-122.3068,37.795)]" 181699200000000000 +road name="I- 80 ",thepath="[(-122.308,37.98),(-122.3066,37.943),(-122.3056,37.912),(-122.3057,37.908),(-122.305805,37.90511),(-122.3061,37.897),(-122.3064,37.893),(-122.3073,37.881),(-122.3073,37.877),(-122.3077,37.861),(-122.3076,37.831)]" 181785600000000000 +road name="I- 80 ",thepath="[(-122.3083,37.249),(-122.3281,37.216),(-122.348,37.175)]" 181872000000000000 +road name="I- 80 Ramp",thepath="((-122.2944,37.491),(-122.2956,37.484),(-122.2965,37.478))" 181958400000000000 +road name="I- 80 Ramp",thepath="((-122.2983,37.501),(-122.2979,37.499))" 182044800000000000 +road name="I- 80 Ramp",thepath="((-122.3017,37.67),(-122.3022,37.662))" 182131200000000000 +road name="I- 80 Ramp",thepath="[(-122.2871,37.266),(-122.2901,37.274)]" 182217600000000000 +road name="I- 80 Ramp",thepath="[(-122.2883,37.247),(-122.2904,37.267),(-122.2909,37.273),(-122.2918,37.275),(-122.2937,37.277)]" 182304000000000000 +road name="I- 80 Ramp",thepath="[(-122.2885,37.254),(-122.2883,37.247)]" 182390400000000000 +road name="I- 80 Ramp",thepath="[(-122.2885,37.254),(-122.2893,37.266)]" 182476800000000000 +road name="I- 80 Ramp",thepath="[(-122.2918,37.279),(-122.2926,37.281)]" 182563200000000000 +road name="I- 80 Ramp",thepath="[(-122.2923,37.282),(-122.2926,37.283),(-122.2932,37.284)]" 182649600000000000 +road name="I- 80 Ramp",thepath="[(-122.2934,37.28),(-122.2926,37.281)]" 182736000000000000 +road name="I- 80 Ramp",thepath="[(-122.2934,37.28),(-122.2962,37.273)]" 182822400000000000 +road name="I- 80 Ramp",thepath="[(-122.2957,37.396),(-122.2946,37.384),(-122.2948,37.367)]" 182908800000000000 +road name="I- 80 Ramp",thepath="[(-122.2962,37.413),(-122.2959,37.382),(-122.2951,37.372)]" 182995200000000000 +road name="I- 80 Ramp",thepath="[(-122.2984,37.506),(-122.2977,37.502),(-122.2979,37.499),(-122.2956,37.489),(-122.2962,37.483),(-122.2965,37.478),(-122.2971,37.452)]" 183081600000000000 +road name="I- 80 Ramp",thepath="[(-122.2988,37.518),(-122.299,37.5),(-122.2994,37.488),(-122.2995,37.477),(-122.2971,37.452)]" 183168000000000000 +road name="I- 80 Ramp",thepath="[(-122.3038,37.695),(-122.3021,37.67),(-122.3022,37.662),(-122.3023,37.644)]" 183254400000000000 +road name="I- 80 Ramp",thepath="[(-122.3038,37.695),(-122.3036,37.674),(-122.3034,37.667),(-122.3033,37.661),(-122.3023,37.644)]" 183340800000000000 +road name="I- 80 Ramp",thepath="[(-122.3044,37.25),(-122.3051,37.254)]" 183427200000000000 +road name="I- 80 Ramp",thepath="[(-122.3044,37.25),(-122.3083,37.249)]" 183513600000000000 +road name="I- 80 Ramp",thepath="[(-122.3051,37.254),(-122.3083,37.249)]" 183600000000000000 +road name="I- 80 Ramp",thepath="[(-122.3051,37.91),(-122.3056,37.912)]" 183686400000000000 +road name="I- 80 Ramp",thepath="[(-122.3051,37.91),(-122.3057,37.908)]" 183772800000000000 +road name="I- 80 Ramp",thepath="[(-122.306,37.876),(-122.3066,37.869),(-122.3067,37.843),(-122.3069,37.818)]" 183859200000000000 +road name="I- 80 Ramp",thepath="[(-122.3068,37.795),(-122.306,37.783),(-122.3062,37.774)]" 183945600000000000 +road name="I- 80 Ramp",thepath="[(-122.3068,37.795),(-122.3069,37.782),(-122.3062,37.774)]" 184032000000000000 +road name="I- 80 Ramp",thepath="[(-122.3069,37.925),(-122.3065,37.935)]" 184118400000000000 +road name="I- 80 Ramp",thepath="[(-122.307,37.902),(-122.3073,37.881)]" 184204800000000000 +road name="I- 80 Ramp",thepath="[(-122.3072,37.916),(-122.3074,37.896)]" 184291200000000000 +road name="I- 80 Ramp",thepath="[(-122.307624,37.87781),(-122.307512,37.89327)]" 184377600000000000 +road name="I- 80 Ramp",thepath="[(-122.3078,37.93),(-122.3081,37.879)]" 184464000000000000 +road name="I- 80 Ramp",thepath="[(-122.3088,37.885),(-122.3076,37.831)]" 184550400000000000 +road name="I- 880 ",thepath="((-121.9669,37.075),(-121.9663,37.071),(-121.9656,37.065),(-121.9618,37.037),(-121.95689,37),(-121.948,37.933))" 184636800000000000 +road name="I- 880 ",thepath="[(-121.9357,37.83),(-121.9356,37.826),(-121.9351,37.819),(-121.9349,37.813),(-121.9337,37.788),(-121.9327,37.767),(-121.9232,37.57),(-121.9229,37.563),(-121.9229,37.561),(-121.922487,37.55412)]" 184723200000000000 +road name="I- 880 ",thepath="[(-121.937,37.852),(-121.9368,37.848)]" 184809600000000000 +road name="I- 880 ",thepath="[(-121.948,37.933),(-121.9471,37.925),(-121.9467,37.923),(-121.946,37.918),(-121.9452,37.912),(-121.937,37.852)]" 184896000000000000 +road name="I- 880 ",thepath="[(-121.9995,37.289),(-121.998758,37.28558),(-121.998013,37.282),(-121.996913,37.27613),(-121.9929,37.255),(-121.9919,37.252),(-121.991111,37.24795),(-121.990277,37.24367),(-121.989597,37.24018),(-121.9882,37.233),(-121.9871,37.229),(-121.9865,37.226),(-121.9848,37.216),(-121.982,37.196),(-121.9805,37.186),(-121.975936,37.14723),(-121.9712,37.107)]" 184982400000000000 +road name="I- 880 ",thepath="[(-122.0219,37.466),(-122.0205,37.447),(-122.020331,37.44447),(-122.020008,37.43962),(-122.0195,37.432),(-122.0193,37.429),(-122.0164,37.393),(-122.010219,37.34771),(-122.0041,37.313)]" 185068800000000000 +road name="I- 880 ",thepath="[(-122.0375,37.632),(-122.0359,37.619),(-122.0358,37.616),(-122.034514,37.60409),(-122.031876,37.57965),(-122.031193,37.57332),(-122.03016,37.56375),(-122.02943,37.55698),(-122.028689,37.54929),(-122.027833,37.53908),(-122.025979,37.51698),(-122.0238,37.491)]" 185155200000000000 +road name="I- 880 ",thepath="[(-122.0469,37.774),(-122.0466,37.765),(-122.0465,37.761),(-122.045041,37.72234),(-122.0445,37.708),(-122.0426,37.686),(-122.041515,37.67425),(-122.0414,37.673),(-122.0398,37.656)]" 185241600000000000 +road name="I- 880 ",thepath="[(-122.0612,37.003),(-122.0604,37.991),(-122.0596,37.982),(-122.0585,37.967),(-122.0583,37.961),(-122.0553,37.918),(-122.053635,37.89475),(-122.050759,37.8546),(-122.05,37.844),(-122.0485,37.817),(-122.0483,37.813),(-122.0482,37.811)]" 185328000000000000 +road name="I- 880 ",thepath="[(-122.0666,37.085),(-122.0656,37.067),(-122.0653,37.062),(-122.0644,37.049),(-122.0635,37.036),(-122.0618,37.011)]" 185414400000000000 +road name="I- 880 ",thepath="[(-122.0831,37.312),(-122.0819,37.296),(-122.081,37.285),(-122.0786,37.248),(-122.078,37.24),(-122.077642,37.23496),(-122.076983,37.22567),(-122.076599,37.22026),(-122.076229,37.21505),(-122.0758,37.209)]" 185500800000000000 +road name="I- 880 ",thepath="[(-122.0978,37.528),(-122.096,37.496),(-122.0931,37.453),(-122.09277,37.4496),(-122.090189,37.41442),(-122.0896,37.405),(-122.085,37.34)]" 185587200000000000 +road name="I- 880 ",thepath="[(-122.1048,37.638),(-122.1045,37.633),(-122.1042,37.63),(-122.1033,37.617),(-122.1029,37.61)]" 185673600000000000 +road name="I- 880 ",thepath="[(-122.1365,37.902),(-122.1358,37.898),(-122.1333,37.881),(-122.1323,37.874),(-122.1311,37.866),(-122.1308,37.865),(-122.1307,37.864),(-122.1289,37.851),(-122.1277,37.843),(-122.1264,37.834),(-122.1231,37.812),(-122.1165,37.766),(-122.1104,37.72),(-122.109695,37.71094),(-122.109,37.702),(-122.108312,37.69168),(-122.1076,37.681)]" 185760000000000000 +road name="I- 880 ",thepath="[(-122.1365,37.902),(-122.1376,37.91)]" 185846400000000000 +road name="I- 880 ",thepath="[(-122.1755,37.185),(-122.1747,37.178),(-122.1742,37.173),(-122.1692,37.126),(-122.167792,37.11594),(-122.16757,37.11435),(-122.1671,37.111),(-122.1655,37.1),(-122.165169,37.09811),(-122.1641,37.092),(-122.1596,37.061),(-122.158381,37.05275),(-122.155991,37.03657),(-122.1531,37.017),(-122.1478,37.98),(-122.1407,37.932),(-122.1394,37.924),(-122.1389,37.92),(-122.1376,37.91)]" 185932800000000000 +road name="I- 880 ",thepath="[(-122.1761,37.191),(-122.1757,37.187)]" 186019200000000000 +road name="I- 880 ",thepath="[(-122.1947,37.394),(-122.194,37.385),(-122.1933,37.378),(-122.1882,37.32),(-122.1879,37.317),(-122.1877,37.315),(-122.1876,37.312),(-122.1873,37.309),(-122.1829,37.26),(-122.1818,37.249),(-122.1804,37.234),(-122.1802,37.231),(-122.1776,37.206),(-122.1768,37.197)]" 186105600000000000 +road name="I- 880 ",thepath="[(-122.2068,37.534),(-122.2066,37.53),(-122.206,37.522),(-122.2005,37.46),(-122.1967,37.418),(-122.1959,37.407)]" 186192000000000000 +road name="I- 880 ",thepath="[(-122.2214,37.711),(-122.2202,37.699),(-122.2199,37.695),(-122.219,37.682),(-122.2184,37.672),(-122.2173,37.652),(-122.2159,37.638),(-122.2144,37.616),(-122.2138,37.612),(-122.2135,37.609),(-122.212,37.592),(-122.2116,37.586),(-122.2111,37.581)]" 186278400000000000 +road name="I- 880 ",thepath="[(-122.236,37.783),(-122.2352,37.767),(-122.2348,37.764),(-122.2339,37.758),(-122.2329,37.752),(-122.2323,37.748),(-122.2319,37.746),(-122.2316,37.746),(-122.2312,37.744),(-122.2301,37.743),(-122.2269,37.73),(-122.2267,37.73),(-122.222,37.713)]" 186364800000000000 +road name="I- 880 ",thepath="[(-122.2707,37.975),(-122.2693,37.972),(-122.2681,37.966),(-122.267,37.962),(-122.2659,37.957),(-122.2648,37.952),(-122.2636,37.946),(-122.2625,37.935),(-122.2617,37.927),(-122.2607,37.921),(-122.2593,37.916),(-122.258,37.911),(-122.2536,37.898),(-122.2432,37.858),(-122.2408,37.845),(-122.2386,37.827),(-122.2374,37.811)]" 186451200000000000 +road name="I- 880 ",thepath="[(-122.291,37.052),(-122.2898,37.042),(-122.2888,37.038),(-122.2878,37.036),(-122.2863,37.032)]" 186537600000000000 +road name="I- 880 Ramp",thepath="((-121.9349,37.813),(-121.935,37.828))" 186624000000000000 +road name="I- 880 Ramp",thepath="((-121.9351,37.819),(-121.935,37.828),(-121.9339,37.847))" 186710400000000000 +road name="I- 880 Ramp",thepath="((-121.936,37.837),(-121.9351,37.835))" 186796800000000000 +road name="I- 880 Ramp",thepath="((-121.9368,37.848),(-121.9362,37.835))" 186883200000000000 +road name="I- 880 Ramp",thepath="((-121.9376,37.834),(-121.937,37.836))" 186969600000000000 +road name="I- 880 Ramp",thepath="((-121.9477,37.91),(-121.9469,37.911),(-121.9463,37.911))" 187056000000000000 +road name="I- 880 Ramp",thepath="((-121.9682,37.065),(-121.9686,37.066))" 187142400000000000 +road name="I- 880 Ramp",thepath="((-122.0008,37.31),(-122.0002,37.308))" 187228800000000000 +road name="I- 880 Ramp",thepath="((-122.0013,37.298),(-122.0013,37.287))" 187315200000000000 +road name="I- 880 Ramp",thepath="((-122.0369,37.645),(-122.0364,37.646))" 187401600000000000 +road name="I- 880 Ramp",thepath="((-122.0477,37.798),(-122.0466,37.789),(-122.0461,37.785))" 187488000000000000 +road name="I- 880 Ramp",thepath="((-122.0477,37.798),(-122.0482,37.8))" 187574400000000000 +road name="I- 880 Ramp",thepath="((-122.0585,37.967),(-122.0577,37.974),(-122.0548,37.966),(-122.055168,37.96828),(-122.0577,37.984))" 187660800000000000 +road name="I- 880 Ramp",thepath="((-122.0919,37.465),(-122.0931,37.461))" 187747200000000000 +road name="I- 880 Ramp",thepath="((-122.0932,37.439),(-122.0922,37.437),(-122.0915,37.427))" 187833600000000000 +road name="I- 880 Ramp",thepath="((-122.1005,37.571),(-122.1003,37.565),(-122.0997,37.548))" 187920000000000000 +road name="I- 880 Ramp",thepath="((-122.1286,37.836),(-122.1283,37.839))" 188006400000000000 +road name="I- 880 Ramp",thepath="((-122.1335,37.901),(-122.1358,37.905))" 188092800000000000 +road name="I- 880 Ramp",thepath="((-122.1378,37.923),(-122.1374,37.925))" 188179200000000000 +road name="I- 880 Ramp",thepath="((-122.1757,37.187),(-122.1754,37.191))" 188265600000000000 +road name="I- 880 Ramp",thepath="((-122.1863,37.322),(-122.187,37.322))" 188352000000000000 +road name="I- 880 Ramp",thepath="((-122.1876,37.312),(-122.1877,37.309))" 188438400000000000 +road name="I- 880 Ramp",thepath="((-122.2054,37.542),(-122.2057,37.533),(-122.2059,37.526))" 188524800000000000 +road name="I- 880 Ramp",thepath="((-122.2091,37.532),(-122.2089,37.535),(-122.2072,37.535))" 188611200000000000 +road name="I- 880 Ramp",thepath="((-122.2187,37.684),(-122.219,37.688),(-122.2194,37.697))" 188697600000000000 +road name="I- 880 Ramp",thepath="((-122.2301,37.743),(-122.2316,37.751))" 188784000000000000 +road name="I- 880 Ramp",thepath="((-122.2352,37.767),(-122.2356,37.768),(-122.236,37.768))" 188870400000000000 +road name="I- 880 Ramp",thepath="[(-121.9215,37.556),(-121.92179,37.55745),(-121.9229,37.563)]" 188956800000000000 +road name="I- 880 Ramp",thepath="[(-121.9232,37.57),(-121.9234,37.559),(-121.9229,37.561)]" 189043200000000000 +road name="I- 880 Ramp",thepath="[(-121.9335,37.851),(-121.9339,37.847),(-121.9351,37.835),(-121.9357,37.83)]" 189129600000000000 +road name="I- 880 Ramp",thepath="[(-121.9343,37.85),(-121.937,37.852),(-121.937,37.836),(-121.9362,37.835),(-121.9359,37.826),(-121.9349,37.813)]" 189216000000000000 +road name="I- 880 Ramp",thepath="[(-121.946,37.918),(-121.9463,37.911),(-121.9452,37.912)]" 189302400000000000 +road name="I- 880 Ramp",thepath="[(-121.9612,37.099),(-121.9615,37.09),(-121.9616,37.087)]" 189388800000000000 +road name="I- 880 Ramp",thepath="[(-121.9618,37.037),(-121.961998,37.05205),(-121.962212,37.06831),(-121.9623,37.075),(-121.9616,37.087)]" 189475200000000000 +road name="I- 880 Ramp",thepath="[(-121.9656,37.065),(-121.9678,37.061),(-121.9676,37.065)]" 189561600000000000 +road name="I- 880 Ramp",thepath="[(-121.9688,37.061),(-121.9686,37.066),(-121.9669,37.075)]" 189648000000000000 +road name="I- 880 Ramp",thepath="[(-121.9712,37.107),(-121.9643,37.087),(-121.9623,37.085)]" 189734400000000000 +road name="I- 880 Ramp",thepath="[(-121.986,37.239),(-121.9865,37.236),(-121.9861,37.234)]" 189820800000000000 +road name="I- 880 Ramp",thepath="[(-121.9865,37.226),(-121.9872,37.22)]" 189907200000000000 +road name="I- 880 Ramp",thepath="[(-121.9871,37.229),(-121.9863,37.232)]" 189993600000000000 +road name="I- 880 Ramp",thepath="[(-121.9885,37.211),(-121.9848,37.216)]" 190080000000000000 +road name="I- 880 Ramp",thepath="[(-122.0019,37.301),(-122.002,37.293)]" 190166400000000000 +road name="I- 880 Ramp",thepath="[(-122.0041,37.313),(-122.0018,37.315),(-122.0007,37.315),(-122.0005,37.313),(-122.0002,37.308),(-121.9995,37.289)]" 190252800000000000 +road name="I- 880 Ramp",thepath="[(-122.0041,37.313),(-122.0038,37.308),(-122.0039,37.284),(-122.0013,37.287),(-121.9995,37.289)]" 190339200000000000 +road name="I- 880 Ramp",thepath="[(-122.0226,37.474),(-122.0214,37.473),(-122.0219,37.466)]" 190425600000000000 +road name="I- 880 Ramp",thepath="[(-122.0236,37.488),(-122.0231,37.458),(-122.0227,37.458),(-122.0223,37.452),(-122.0205,37.447)]" 190512000000000000 +road name="I- 880 Ramp",thepath="[(-122.0238,37.491),(-122.0215,37.483),(-122.0211,37.477),(-122.0205,37.447)]" 190598400000000000 +road name="I- 880 Ramp",thepath="[(-122.0364,37.652),(-122.0364,37.646),(-122.03618,37.63412),(-122.036027,37.62586),(-122.0359,37.619)]" 190684800000000000 +road name="I- 880 Ramp",thepath="[(-122.0374,37.639),(-122.0375,37.632)]" 190771200000000000 +road name="I- 880 Ramp",thepath="[(-122.0383,37.64),(-122.0387,37.636),(-122.0387,37.633),(-122.038,37.632)]" 190857600000000000 +road name="I- 880 Ramp",thepath="[(-122.0392,37.65),(-122.0389,37.625),(-122.0391,37.617),(-122.036099,37.6161),(-122.0358,37.616)]" 190944000000000000 +road name="I- 880 Ramp",thepath="[(-122.0398,37.656),(-122.0361,37.656)]" 191030400000000000 +road name="I- 880 Ramp",thepath="[(-122.0482,37.811),(-122.0461,37.785),(-122.0453,37.778),(-122.045,37.775)]" 191116800000000000 +road name="I- 880 Ramp",thepath="[(-122.0485,37.817),(-122.0484,37.813),(-122.0482,37.8),(-122.0481,37.794),(-122.0478,37.781),(-122.0469,37.774)]" 191203200000000000 +road name="I- 880 Ramp",thepath="[(-122.059,37.982),(-122.0577,37.984),(-122.0612,37.003)]" 191289600000000000 +road name="I- 880 Ramp",thepath="[(-122.0604,37.991),(-122.06,37.983),(-122.0605,37.983)]" 191376000000000000 +road name="I- 880 Ramp",thepath="[(-122.0618,37.011),(-122.0631,37.982),(-122.0585,37.967)]" 191462400000000000 +road name="I- 880 Ramp",thepath="[(-122.0635,37.036),(-122.064,37.049),(-122.0648,37.069)]" 191548800000000000 +road name="I- 880 Ramp",thepath="[(-122.0642,37.073),(-122.0648,37.076),(-122.0666,37.085)]" 191635200000000000 +road name="I- 880 Ramp",thepath="[(-122.0653,37.062),(-122.0663,37.064)]" 191721600000000000 +road name="I- 880 Ramp",thepath="[(-122.0758,37.209),(-122.073269,37.18911),(-122.073,37.187),(-122.0723,37.183)]" 191808000000000000 +road name="I- 880 Ramp",thepath="[(-122.0758,37.209),(-122.075697,37.2063),(-122.075,37.188),(-122.0749,37.184)]" 191894400000000000 +road name="I- 880 Ramp",thepath="[(-122.0837,37.322),(-122.0822,37.316),(-122.0831,37.312)]" 191980800000000000 +road name="I- 880 Ramp",thepath="[(-122.0837,37.322),(-122.0843,37.316)]" 192067200000000000 +road name="I- 880 Ramp",thepath="[(-122.085,37.34),(-122.0801,37.316),(-122.081,37.285)]" 192153600000000000 +road name="I- 880 Ramp",thepath="[(-122.085,37.34),(-122.0866,37.316),(-122.0819,37.296)]" 192240000000000000 +road name="I- 880 Ramp",thepath="[(-122.0918,37.466),(-122.0896,37.405)]" 192326400000000000 +road name="I- 880 Ramp",thepath="[(-122.092,37.461),(-122.0923,37.457)]" 192412800000000000 +road name="I- 880 Ramp",thepath="[(-122.0931,37.453),(-122.0937,37.469),(-122.0931,37.461),(-122.0923,37.457)]" 192499200000000000 +road name="I- 880 Ramp",thepath="[(-122.096,37.496),(-122.0941,37.464),(-122.0943,37.421),(-122.0915,37.427),(-122.0896,37.405)]" 192585600000000000 +road name="I- 880 Ramp",thepath="[(-122.0985,37.574),(-122.0986,37.567),(-122.0978,37.528)]" 192672000000000000 +road name="I- 880 Ramp",thepath="[(-122.0993,37.571),(-122.0999,37.569)]" 192758400000000000 +road name="I- 880 Ramp",thepath="[(-122.1005,37.571),(-122.1009,37.568)]" 192844800000000000 +road name="I- 880 Ramp",thepath="[(-122.1022,37.597),(-122.102055,37.59178),(-122.1019,37.562)]" 192931200000000000 +road name="I- 880 Ramp",thepath="[(-122.1029,37.61),(-122.1013,37.587),(-122.0999,37.569)]" 193017600000000000 +road name="I- 880 Ramp",thepath="[(-122.1032,37.557),(-122.0997,37.548),(-122.0978,37.528)]" 193104000000000000 +road name="I- 880 Ramp",thepath="[(-122.1076,37.681),(-122.106243,37.66549),(-122.1062,37.665),(-122.106043,37.66186),(-122.105869,37.65838),(-122.1048,37.638)]" 193190400000000000 +road name="I- 880 Ramp",thepath="[(-122.1076,37.681),(-122.107021,37.6646),(-122.107,37.664),(-122.106808,37.66184),(-122.1048,37.638)]" 193276800000000000 +road name="I- 880 Ramp",thepath="[(-122.1287,37.842),(-122.1283,37.839),(-122.1264,37.834)]" 193363200000000000 +road name="I- 880 Ramp",thepath="[(-122.1289,37.861),(-122.1284,37.855),(-122.1277,37.843)]" 193449600000000000 +road name="I- 880 Ramp",thepath="[(-122.1296,37.865),(-122.1299,37.866),(-122.1323,37.874)]" 193536000000000000 +road name="I- 880 Ramp",thepath="[(-122.1318,37.865),(-122.1319,37.866),(-122.1333,37.881)]" 193622400000000000 +road name="I- 880 Ramp",thepath="[(-122.1376,37.91),(-122.1379,37.909),(-122.1376,37.907),(-122.1365,37.902)]" 193708800000000000 +road name="I- 880 Ramp",thepath="[(-122.1379,37.891),(-122.1383,37.897),(-122.1377,37.902)]" 193795200000000000 +road name="I- 880 Ramp",thepath="[(-122.1379,37.931),(-122.137597,37.92736),(-122.1374,37.925),(-122.1373,37.924),(-122.1369,37.914),(-122.1358,37.905),(-122.1365,37.908),(-122.1358,37.898)]" 193881600000000000 +road name="I- 880 Ramp",thepath="[(-122.1407,37.932),(-122.1397,37.923),(-122.1389,37.917),(-122.1383,37.913)]" 193968000000000000 +road name="I- 880 Ramp",thepath="[(-122.164,37.106),(-122.1653,37.113),(-122.1651,37.101)]" 194054400000000000 +road name="I- 880 Ramp",thepath="[(-122.164188,37.10514),(-122.1641,37.092)]" 194140800000000000 +road name="I- 880 Ramp",thepath="[(-122.1646,37.113),(-122.163,37.111)]" 194227200000000000 +road name="I- 880 Ramp",thepath="[(-122.1646,37.113),(-122.165458,37.11379),(-122.167792,37.11594)]" 194313600000000000 +road name="I- 880 Ramp",thepath="[(-122.165757,37.09059),(-122.165169,37.09811)]" 194400000000000000 +road name="I- 880 Ramp",thepath="[(-122.165757,37.09059),(-122.16635,37.09559)]" 194486400000000000 +road name="I- 880 Ramp",thepath="[(-122.1675,37.09),(-122.1666,37.089),(-122.165804,37.08972),(-122.1655,37.09),(-122.1641,37.092)]" 194572800000000000 +road name="I- 880 Ramp",thepath="[(-122.1675,37.09),(-122.16757,37.11435)]" 194659200000000000 +road name="I- 880 Ramp",thepath="[(-122.173,37.194),(-122.1742,37.173)]" 194745600000000000 +road name="I- 880 Ramp",thepath="[(-122.1763,37.184),(-122.1761,37.191)]" 194832000000000000 +road name="I- 880 Ramp",thepath="[(-122.1763,37.193),(-122.1754,37.191),(-122.1745,37.194),(-122.1743,37.192),(-122.1737,37.196),(-122.1725,37.198)]" 194918400000000000 +road name="I- 880 Ramp",thepath="[(-122.1768,37.197),(-122.1774,37.182),(-122.1769,37.18),(-122.1758,37.181),(-122.1747,37.178)]" 195004800000000000 +road name="I- 880 Ramp",thepath="[(-122.1868,37.32),(-122.187,37.322),(-122.1873,37.321),(-122.1877,37.319),(-122.1879,37.317)]" 195091200000000000 +road name="I- 880 Ramp",thepath="[(-122.1893,37.303),(-122.1888,37.305),(-122.1885,37.307),(-122.1877,37.309),(-122.1873,37.309)]" 195177600000000000 +road name="I- 880 Ramp",thepath="[(-122.1946,37.405),(-122.1942,37.411),(-122.1951,37.411)]" 195264000000000000 +road name="I- 880 Ramp",thepath="[(-122.1946,37.405),(-122.1947,37.394)]" 195350400000000000 +road name="I- 880 Ramp",thepath="[(-122.1952,37.418),(-122.1967,37.418)]" 195436800000000000 +road name="I- 880 Ramp",thepath="[(-122.1954,37.372),(-122.1957,37.378)]" 195523200000000000 +road name="I- 880 Ramp",thepath="[(-122.1959,37.407),(-122.1958,37.396),(-122.1953,37.396),(-122.1947,37.394)]" 195609600000000000 +road name="I- 880 Ramp",thepath="[(-122.2065,37.54),(-122.2066,37.535),(-122.2063,37.531),(-122.2059,37.526),(-122.206,37.522)]" 195696000000000000 +road name="I- 880 Ramp",thepath="[(-122.2092,37.535),(-122.2074,37.536),(-122.2072,37.535),(-122.2066,37.53)]" 195782400000000000 +road name="I- 880 Ramp",thepath="[(-122.2096,37.565),(-122.2079,37.549),(-122.2061,37.541)]" 195868800000000000 +road name="I- 880 Ramp",thepath="[(-122.2111,37.581),(-122.2108,37.535)]" 195955200000000000 +road name="I- 880 Ramp",thepath="[(-122.2176,37.65),(-122.2173,37.652)]" 196041600000000000 +road name="I- 880 Ramp",thepath="[(-122.2177,37.668),(-122.2168,37.653),(-122.2159,37.638)]" 196128000000000000 +road name="I- 880 Ramp",thepath="[(-122.218,37.659),(-122.2173,37.652)]" 196214400000000000 +road name="I- 880 Ramp",thepath="[(-122.2199,37.695),(-122.2194,37.697),(-122.2197,37.7),(-122.2202,37.699)]" 196300800000000000 +road name="I- 880 Ramp",thepath="[(-122.222,37.713),(-122.2212,37.705),(-122.2207,37.697),(-122.2208,37.694),(-122.2192,37.68),(-122.2184,37.672)]" 196387200000000000 +road name="I- 880 Ramp",thepath="[(-122.2301,37.743),(-122.2294,37.735)]" 196473600000000000 +road name="I- 880 Ramp",thepath="[(-122.2316,37.746),(-122.2316,37.751),(-122.2321,37.752),(-122.2329,37.752)]" 196560000000000000 +road name="I- 880 Ramp",thepath="[(-122.2325,37.743),(-122.2319,37.746)]" 196646400000000000 +road name="I- 880 Ramp",thepath="[(-122.2361,37.785),(-122.2356,37.781)]" 196732800000000000 +road name="I- 880 Ramp",thepath="[(-122.237,37.799),(-122.236,37.777),(-122.236,37.768),(-122.2357,37.764),(-122.235,37.754)]" 196819200000000000 +road name="I- 880 Ramp",thepath="[(-122.2372,37.802),(-122.23638,37.7996),(-122.2361,37.801),(-122.2357,37.801)]" 196905600000000000 +road name="I- 880 Ramp",thepath="[(-122.2374,37.811),(-122.2374,37.796)]" 196992000000000000 +road name="I- 880 Ramp",thepath="[(-122.2536,37.898),(-122.254,37.902)]" 197078400000000000 +road name="I- 880 Ramp",thepath="[(-122.2577,37.914),(-122.258,37.911)]" 197164800000000000 +road name="I- 880 Ramp",thepath="[(-122.2636,37.946),(-122.2646,37.954)]" 197251200000000000 +road name="I- 880 Ramp",thepath="[(-122.2636,37.946),(-122.2649,37.95),(-122.2662,37.954)]" 197337600000000000 +road name="I- 880 Ramp",thepath="[(-122.268,37.969),(-122.2693,37.972)]" 197424000000000000 +road name="I- 880 Ramp",thepath="[(-122.2685,37.962),(-122.2695,37.969),(-122.2707,37.975)]" 197510400000000000 +road name="I- 880 Ramp",thepath="[(-122.2729,37.986),(-122.2744,37.986)]" 197596800000000000 +road name="I- 880 Ramp",thepath="[(-122.274,37.993),(-122.2729,37.986)]" 197683200000000000 +road name="I- 880 Ramp",thepath="[(-122.2771,37.002),(-122.278,37)]" 197769600000000000 +road name="I- 880 Ramp",thepath="[(-122.2775,37.007),(-122.2769,37.001)]" 197856000000000000 +road name="I- 880 Ramp",thepath="[(-122.2849,37.028),(-122.2845,37.026),(-122.2837,37.021)]" 197942400000000000 +road name="I- 880 Ramp",thepath="[(-122.2863,37.032),(-122.285451,37.03094),(-122.284429,37.02966),(-122.2831,37.028),(-122.2823,37.031)]" 198028800000000000 +road name="I- 880 Ramp",thepath="[(-122.291454,37.064),(-122.291088,37.06103),(-122.2903,37.05),(-122.2897,37.044),(-122.2888,37.038)]" 198115200000000000 +road name="I- 880 Ramp",thepath="[(-122.2916,37.052),(-122.2898,37.04),(-122.2888,37.038)]" 198201600000000000 +road name="I- 980 ",thepath="((-122.268,37.227),(-122.2678,37.233),(-122.2675,37.243))" 198288000000000000 +road name="I- 980 ",thepath="((-122.2688,37.2),(-122.2684,37.215),(-122.268,37.227))" 198374400000000000 +road name="I- 980 ",thepath="[(-122.2675,37.243),(-122.2674,37.246)]" 198460800000000000 +road name="I- 980 ",thepath="[(-122.2681,37.248),(-122.2677,37.252)]" 198547200000000000 +road name="I- 980 ",thepath="[(-122.268237,37.24426),(-122.2682,37.245)]" 198633600000000000 +road name="I- 980 ",thepath="[(-122.2684,37.236),(-122.2683,37.243),(-122.268237,37.24426)]" 198720000000000000 +road name="I- 980 ",thepath="[(-122.2684,37.236),(-122.2684,37.234),(-122.268817,37.22458),(-122.269027,37.21557),(-122.2691,37.213),(-122.2694,37.199),(-122.2693,37.194)]" 198806400000000000 +road name="I- 980 ",thepath="[(-122.2688,37.2),(-122.2688,37.197),(-122.2689,37.191)]" 198892800000000000 +road name="I- 980 ",thepath="[(-122.2699,37.159),(-122.2697,37.165),(-122.2695,37.17),(-122.2693,37.18),(-122.2689,37.191)]" 198979200000000000 +road name="I- 980 ",thepath="[(-122.2701,37.163),(-122.2699,37.172),(-122.2693,37.192),(-122.2693,37.194)]" 199065600000000000 +road name="I- 980 ",thepath="[(-122.2783,37.006),(-122.2787,37.014),(-122.2791,37.024),(-122.279124,37.0254),(-122.2782,37.053),(-122.2778,37.061),(-122.2773,37.068)]" 199152000000000000 +road name="I- 980 ",thepath="[(-122.2789,37.009),(-122.2795,37.022),(-122.279648,37.02711),(-122.2787,37.055),(-122.2782,37.062),(-122.2775,37.075),(-122.2773,37.078),(-122.2763,37.094),(-122.2758,37.1),(-122.274904,37.11235),(-122.274857,37.1131),(-122.2748,37.114)]" 199238400000000000 +road name="I- 980 Ramp",thepath="[(-122.2688,37.197),(-122.2691,37.191),(-122.2693,37.18)]" 199324800000000000 +road name="I- 980 Ramp",thepath="[(-122.2688,37.206),(-122.2688,37.203),(-122.2684,37.215)]" 199411200000000000 +road name="I- 980 Ramp",thepath="[(-122.2691,37.213),(-122.269438,37.20709),(-122.2699,37.199),(-122.27,37.194),(-122.270194,37.18382),(-122.270352,37.17552),(-122.2704,37.173)]" 199497600000000000 +road name="I- 980 Ramp",thepath="[(-122.2693,37.194),(-122.2691,37.198)]" 199584000000000000 +road name="I- 980 Ramp",thepath="[(-122.2699,37.159),(-122.2701,37.163)]" 199670400000000000 +road name="I- 980 Ramp",thepath="[(-122.2739,37.117),(-122.2745,37.119),(-122.2733,37.129)]" 199756800000000000 +road name="I- 980 Ramp",thepath="[(-122.2773,37.068),(-122.2772,37.061)]" 199843200000000000 +road name="I- 980 Ramp",thepath="[(-122.2773,37.078),(-122.2766,37.095)]" 199929600000000000 +road name="Idaho St ",thepath="[(-122.28,37.437),(-122.2801,37.446)]" 200016000000000000 +road name="Iglesia Dr ",thepath="[(-121.946443,37.09438),(-121.946833,37.09285)]" 200102400000000000 +road name="Independence Ave ",thepath="[(-121.865283,37.46138),(-121.8634,37.446)]" 200188800000000000 +road name="Independence Dr ",thepath="[(-121.8683,37.521),(-121.868866,37.50763)]" 200275200000000000 +road name="Independence road",thepath="[(-121.9474,37.172),(-121.9508,37.163)]" 200361600000000000 +road name="Indian road",thepath="[(-122.2209,37.153),(-122.2216,37.142)]" 200448000000000000 +road name="Indian Way ",thepath="[(-122.2066,37.398),(-122.2045,37.411)]" 200534400000000000 +road name="Indian Creek ",thepath="[(-121.7642,37.246),(-121.7655,37.244)]" 200620800000000000 +road name="Indian Creek road",thepath="[(-121.7751,37.798),(-121.7646,37.799)]" 200707200000000000 +road name="Indian Creek road",thepath="[(-121.7889,37.843),(-121.8,37.791)]" 200793600000000000 +road name="Indian Creek road",thepath="[(-121.863754,37.77499),(-121.8644,37.782)]" 200880000000000000 +road name="Indian Joe Creek ",thepath="[(-121.8273,37.142),(-121.806,37.295)]" 200966400000000000 +road name="Indian Rock Path",thepath="[(-122.2717,37.919),(-122.2727,37.922)]" 201052800000000000 +road name="Industrial Blvd",thepath="[(-122.1091,37.328),(-122.1085,37.326)]" 201139200000000000 +road name="Industrial Pkwy",thepath="[(-122.055708,37.21892),(-122.0559,37.217)]" 201225600000000000 +road name="Industrial Pkwy",thepath="[(-122.0723,37.183),(-122.0731,37.184)]" 201312000000000000 +road name="Industrial St ",thepath="[(-122.1834,37.424),(-122.1833,37.425)]" 201398400000000000 +road name="Inglewood Dr ",thepath="[(-121.9086,37.877),(-121.9088,37.877)]" 201484800000000000 +road name="Inglewood Dr ",thepath="[(-121.909484,37.87762),(-121.9099,37.878)]" 201571200000000000 +road name="Inglewood St ",thepath="[(-122.0802,37.397),(-122.0823,37.397)]" 201657600000000000 +road name="Inglewood Common ",thepath="[(-121.955843,37.36729),(-121.955147,37.36923)]" 201744000000000000 +road name="Innsbruck St ",thepath="[(-121.7706,37.68),(-121.7708,37.668)]" 201830400000000000 +road name="Inverness St ",thepath="[(-122.1521,37.882),(-122.1523,37.877)]" 201916800000000000 +road name="Inverness Way ",thepath="[(-121.752134,37.92412),(-121.751744,37.92413)]" 202003200000000000 +road name="Iroquois Ave ",thepath="[(-121.7876,37.891),(-121.7876,37.899)]" 202089600000000000 +road name="Irvington Ave ",thepath="[(-121.9624,37.308),(-121.9661,37.307)]" 202176000000000000 +road name="Isabel Ave ",thepath="[(-121.8047,37.63301),(-121.8047,37.63248)]" 202262400000000000 +road name="Isherwood Way ",thepath="[(-122.0138,37.733),(-122.0156,37.702)]" 202348800000000000 +road name="Island Dr ",thepath="[(-122.2329,37.463),(-122.2336,37.455)]" 202435200000000000 +road name="Island Dr ",thepath="[(-122.2399,37.334),(-122.2394,37.34),(-122.2383,37.352)]" 202521600000000000 +road name="Island Dr ",thepath="[(-122.2411,37.318),(-122.2406,37.325)]" 202608000000000000 +road name="Island Pine Ct ",thepath="[(-122.069,37.31),(-122.0697,37.31)]" 202694400000000000 +road name="Isle Royal St ",thepath="[(-121.9695,37.178),(-121.9686,37.15),(-121.9683,37.149)]" 202780800000000000 +road name="Isola Ct ",thepath="[(-122.0551,37.815),(-122.0555,37.811)]" 202867200000000000 +road name="Ithaca St ",thepath="[(-122.0318,37.09),(-122.0317,37.087)]" 202953600000000000 +road name="Ivy Dr ",thepath="[(-122.2434,37.01),(-122.2413,37.015)]" 203040000000000000 +road name="J St ",thepath="[(-121.9762,37.754),(-121.9767,37.743)]" 203126400000000000 +road name="Jacaranda Ct ",thepath="[(-121.9431,37.49),(-121.9426,37.486)]" 203212800000000000 +road name="Jacaranda Dr ",thepath="[(-122.0147,37.288),(-122.013,37.287)]" 203299200000000000 +road name="Jackson Ave ",thepath="[(-121.7416,37.868),(-121.7416,37.862)]" 203385600000000000 +road name="Jackson Ct ",thepath="[(-121.9377,37.336),(-121.9383,37.337)]" 203472000000000000 +road name="Jackson St ",thepath="[(-122.0809,37.669),(-122.0804,37.677)]" 203558400000000000 +road name="Jackson St ",thepath="[(-122.0838,37.614),(-122.0832,37.624)]" 203644800000000000 +road name="Jackson St ",thepath="[(-122.0845,37.6),(-122.0842,37.606)]" 203731200000000000 +road name="Jackson St ",thepath="[(-122.0981,37.368),(-122.0988,37.365)]" 203817600000000000 +road name="Jackson St ",thepath="[(-122.2646,37.025),(-122.2641,37.034)]" 203904000000000000 +road name="Jackson St ",thepath="[(-122.2668,37.991),(-122.2664,37.997)]" 203990400000000000 +road name="Jackson St ",thepath="[(-122.2689,37.955),(-122.2685,37.962)]" 204076800000000000 +road name="Jade Cir ",thepath="[(-121.919585,37.25699),(-121.918784,37.24417)]" 204163200000000000 +road name="Jamaica Way ",thepath="[(-122.1785,37.971),(-122.1792,37.969)]" 204249600000000000 +road name="James Ave ",thepath="[(-122.0634,37.055),(-122.0598,37.052)]" 204336000000000000 +road name="Jamestown road",thepath="[(-121.947,37.165),(-121.9476,37.163)]" 204422400000000000 +road name="Jamison Way ",thepath="[(-122.075555,37.98023),(-122.073719,37.98074)]" 204508800000000000 +road name="Jaques Ct ",thepath="[(-122.052072,37.68998),(-122.050458,37.69474)]" 204595200000000000 +road name="Jaquiline St ",thepath="[(-121.725054,37.80597),(-121.723604,37.80449)]" 204681600000000000 +road name="Jarvis Ave ",thepath="[(-122.053935,37.43593),(-122.054359,37.43078)]" 204768000000000000 +road name="Jarvis Ave ",thepath="[(-122.055,37.423),(-122.0552,37.42)]" 204854400000000000 +road name="Jason Way ",thepath="[(-122.0044,37.584),(-122.0033,37.577)]" 204940800000000000 +road name="Jayar Pl ",thepath="[(-122.0345,37.206),(-122.0337,37.209)]" 205027200000000000 +road name="Jayne Ave ",thepath="[(-122.2566,37.13),(-122.2549,37.142)]" 205113600000000000 +road name="Jaynes St ",thepath="[(-122.2789,37.779),(-122.2781,37.781)]" 205200000000000000 +road name="Jean Ct ",thepath="[(-122.0755,37.809),(-122.0766,37.798)]" 205286400000000000 +road name="Jean Dr ",thepath="[(-122.0739,37.78),(-122.0734,37.774)]" 205372800000000000 +road name="Jean Dr ",thepath="[(-122.0766,37.798),(-122.0759,37.794)]" 205459200000000000 +road name="Jean St ",thepath="[(-122.2477,37.18),(-122.2468,37.187),(-122.2459,37.196)]" 205545600000000000 +road name="Jeffer St ",thepath="[(-122.0746,37.856),(-122.0739,37.86)]" 205632000000000000 +road name="Jefferson Ave ",thepath="[(-122.2775,37.663),(-122.2774,37.645),(-122.2771,37.627)]" 205718400000000000 +road name="Jefferson St ",thepath="[(-122.2749,37.049),(-122.2745,37.055)]" 205804800000000000 +road name="Jensen road",thepath="[(-122.03781,37.03891),(-122.0377,37.04)]" 205891200000000000 +road name="Jensen St ",thepath="[(-121.754,37.805),(-121.754,37.8)]" 205977600000000000 +road name="Jerome Ave ",thepath="[(-121.9239,37.294),(-121.9239,37.287)]" 206064000000000000 +road name="Jerome Ave ",thepath="[(-121.9247,37.314),(-121.9244,37.309)]" 206150400000000000 +road name="Jerrold road",thepath="[(-121.6907,37.681),(-121.6908,37.653)]" 206236800000000000 +road name="Jessica Cir ",thepath="[(-122.0472,37.76),(-122.0488,37.748)]" 206323200000000000 +road name="Jewell Ct ",thepath="[(-122.2048,37.467),(-122.2043,37.452)]" 206409600000000000 +road name="Joaquin Miller road",thepath="[(-122.1797,37.083),(-122.1778,37.051)]" 206496000000000000 +road name="Joaquin Miller road",thepath="[(-122.1914,37.128),(-122.1862,37.119),(-122.1842,37.106)]" 206582400000000000 +road name="Joaquin Murieta Ave ",thepath="[(-121.9958,37.208),(-121.9962,37.201)]" 206668800000000000 +road name="John Dr ",thepath="[(-122.0939,37.925),(-122.0934,37.919)]" 206755200000000000 +road name="Johnson Dr ",thepath="[(-121.9145,37.901),(-121.915,37.877)]" 206841600000000000 +road name="Johnson Industrial Dr ",thepath="[(-121.9096,37.014),(-121.9172,37.016)]" 206928000000000000 +road name="Jones St ",thepath="[(-122.2982,37.755),(-122.2971,37.757)]" 207014400000000000 +road name="Jones St ",thepath="[(-122.301984,37.74755),(-122.3015,37.749)]" 207100800000000000 +road name="Joseph Dr ",thepath="[(-122.0742,37.12),(-122.0732,37.109)]" 207187200000000000 +road name="Joshua St ",thepath="[(-122.0686,37.455),(-122.0686,37.449)]" 207273600000000000 +road name="Jovan Ter ",thepath="[(-122.046671,37.62206),(-122.046466,37.6181)]" 207360000000000000 +road name="Joyce St ",thepath="[(-122.0792,37.604),(-122.0774,37.581)]" 207446400000000000 +road name="Juana Ave ",thepath="[(-122.1417,37.262),(-122.1396,37.267)]" 207532800000000000 +road name="Juana Ave ",thepath="[(-122.1481,37.243),(-122.1459,37.249)]" 207619200000000000 +road name="June Ct ",thepath="[(-122.1041,37.76),(-122.1045,37.769)]" 207705600000000000 +road name="June Ct ",thepath="[(-122.1786,37.316),(-122.178,37.314)]" 207792000000000000 +road name="Juneau St ",thepath="[(-122.1814,37.068),(-122.1801,37.049)]" 207878400000000000 +road name="Juniper Ave ",thepath="[(-122.0464,37.255),(-122.0476,37.251)]" 207964800000000000 +road name="Juniper St ",thepath="[(-121.7823,37.897),(-121.7815,37.9)]" 208051200000000000 +road name="Juniper St ",thepath="[(-122.1592,37.961),(-122.1591,37.955)]" 208137600000000000 +road name="Junipero Com ",thepath="[(-121.9919,37.796),(-121.992,37.791)]" 208224000000000000 +road name="Jupiter Ct ",thepath="[(-122.064459,37.84741),(-122.064255,37.84626)]" 208310400000000000 +road name="Kains Ave ",thepath="[(-122.2923,37.758),(-122.2922,37.754)]" 208396800000000000 +road name="Kains Ave ",thepath="[(-122.2949,37.828),(-122.2948,37.825)]" 208483200000000000 +road name="Kains Ave ",thepath="[(-122.2992,37.983),(-122.2989,37.97),(-122.2984,37.953)]" 208569600000000000 +road name="Kaiser Dr ",thepath="[(-122.067163,37.47821),(-122.060402,37.51961)]" 208656000000000000 +road name="Kaiser Creek road",thepath="[(-122.0928,37.885),(-122.0918,37.802)]" 208742400000000000 +road name="Kamp Dr ",thepath="[(-121.867789,37.82326),(-121.867753,37.8292)]" 208828800000000000 +road name="Kansas Way ",thepath="[(-121.9115,37.71),(-121.912,37.706)]" 208915200000000000 +road name="Kathy Way ",thepath="[(-121.7292,37.825),(-121.729061,37.82514)]" 209001600000000000 +road name="Kato road",thepath="[(-121.9185,37.626),(-121.9181,37.627)]" 209088000000000000 +road name="Kay Ave ",thepath="[(-122.0968,37.433),(-122.0968,37.427)]" 209174400000000000 +road name="Kay Ave ",thepath="[(-122.0969,37.398),(-122.0971,37.389)]" 209260800000000000 +road name="Kay Ave ",thepath="[(-122.097,37.461),(-122.0969,37.457)]" 209347200000000000 +road name="Kay Ct ",thepath="[(-121.953,37.277),(-121.9535,37.277)]" 209433600000000000 +road name="Kearney Ave ",thepath="[(-122.1981,37.124),(-122.1963,37.135)]" 209520000000000000 +road name="Keeler Ave ",thepath="[(-122.2552,37.892),(-122.2549,37.882)]" 209606400000000000 +road name="Keeler Ave ",thepath="[(-122.2578,37.906),(-122.2579,37.899)]" 209692800000000000 +road name="Keith Ave ",thepath="[(-122.2603,37.894),(-122.26,37.893)]" 209779200000000000 +road name="Keller Ave ",thepath="[(-122.1353,37.702),(-122.1345,37.705)]" 209865600000000000 +road name="Keller Ave ",thepath="[(-122.154,37.723),(-122.1531,37.722)]" 209952000000000000 +road name="Kelly St ",thepath="[(-122.0519,37.852),(-122.0503,37.856)]" 210038400000000000 +road name="Kelly St ",thepath="[(-122.0583,37.842),(-122.058,37.842)]" 210124800000000000 +road name="Kelso road",thepath="[(-121.584782,37.94979),(-121.585132,37.94971)]" 210211200000000000 +road name="Kenilworth Ave ",thepath="[(-122.1501,37.376),(-122.1498,37.371)]" 210297600000000000 +road name="Kenilworth Ave ",thepath="[(-122.151,37.393),(-122.1505,37.383)]" 210384000000000000 +road name="Kenita Way ",thepath="[(-122.0508,37.944),(-122.0503,37.944)]" 210470400000000000 +road name="Kenmore Ave ",thepath="[(-122.2378,37.173),(-122.2386,37.162)]" 210556800000000000 +road name="Kenmore Ct ",thepath="[(-122.0713,37.965),(-122.0706,37.967)]" 210643200000000000 +road name="Kennedy Ave ",thepath="[(-122.0201,37.832),(-122.0203,37.824)]" 210729600000000000 +road name="Kennet St ",thepath="[(-122.0309,37.129),(-122.031,37.115)]" 210816000000000000 +road name="Kent Ave ",thepath="[(-122.113,37.891),(-122.1131,37.887)]" 210902400000000000 +road name="Kent Ave ",thepath="[(-122.113,37.937),(-122.113,37.929)]" 210988800000000000 +road name="Kentucky Ave ",thepath="[(-122.2719,37.026),(-122.2706,37.013)]" 211075200000000000 +road name="Kentwood Way ",thepath="[(-121.9235,37.841),(-121.926,37.838)]" 211161600000000000 +road name="Kenwood Dr ",thepath="[(-122.054303,37.63614),(-122.054133,37.62981)]" 211248000000000000 +road name="Keoncrest Dr ",thepath="[(-122.2842,37.77),(-122.2835,37.771)]" 211334400000000000 +road name="Kerlin St ",thepath="[(-121.9986,37.469),(-121.9979,37.465)]" 211420800000000000 +road name="Kerwin Ave ",thepath="[(-122.181,37.296),(-122.1807,37.295)]" 211507200000000000 +road name="Key Ct ",thepath="[(-122.1246,37.545),(-122.1244,37.553)]" 211593600000000000 +road name="Key Route Blvd",thepath="[(-122.2921,37.91),(-122.292,37.908)]" 211680000000000000 +road name="Keys Pl ",thepath="[(-122.0871,37.253),(-122.0875,37.252)]" 211766400000000000 +road name="Kildare road",thepath="[(-122.0968,37.016),(-122.0959,37)]" 211852800000000000 +road name="Kilkenny Pl ",thepath="[(-122.251002,37.40535),(-122.2508,37.403)]" 211939200000000000 +road name="Kimberly Commons ",thepath="[(-121.737774,37.88769),(-121.737673,37.89024)]" 212025600000000000 +road name="King St ",thepath="[(-122.2733,37.504),(-122.2732,37.496)]" 212112000000000000 +road name="King St ",thepath="[(-122.2738,37.558),(-122.2737,37.55)]" 212198400000000000 +road name="King Way ",thepath="[(-121.9176,37.133),(-121.9185,37.13)]" 212284800000000000 +road name="Kings Ct ",thepath="[(-122.0695,37.764),(-122.0689,37.756)]" 212371200000000000 +road name="Kingsland Ave ",thepath="[(-122.1957,37.743),(-122.1956,37.753)]" 212457600000000000 +road name="Kingsley St ",thepath="[(-122.2311,37.042),(-122.2306,37.046)]" 212544000000000000 +road name="Kirkcaldy St ",thepath="[(-121.859937,37.97443),(-121.8601,37.97441)]" 212630400000000000 +road name="Kirkham St ",thepath="[(-122.289,37.122),(-122.2887,37.129)]" 212716800000000000 +road name="Kit Lane",thepath="[(-122.0237,37.124),(-122.0236,37.132)]" 212803200000000000 +road name="Kitty Hawk road",thepath="[(-121.8048,37.797),(-121.8049,37.867)]" 212889600000000000 +road name="Klamath St ",thepath="[(-121.9142,37.982),(-121.9145,37.978)]" 212976000000000000 +road name="Klamath St ",thepath="[(-122.1832,37.035),(-122.1815,37.023)]" 213062400000000000 +road name="Knapp St ",thepath="[(-122.0594,37.062),(-122.0593,37.049)]" 213148800000000000 +road name="Knight Dr ",thepath="[(-122.089468,37.17681),(-122.089434,37.17337)]" 213235200000000000 +road name="Knight St ",thepath="[(-122.18,37.291),(-122.1794,37.288)]" 213321600000000000 +road name="Knoll Way ",thepath="[(-122.0864,37.848),(-122.0839,37.836)]" 213408000000000000 +road name="Knowland Ave ",thepath="[(-122.1957,37.816),(-122.1948,37.823)]" 213494400000000000 +road name="Kofman Ct ",thepath="[(-122.2498,37.422),(-122.2497,37.417)]" 213580800000000000 +road name="Koford road",thepath="[(-122.1903,37.296),(-122.1884,37.286)]" 213667200000000000 +road name="Kolln St ",thepath="[(-121.87,37.792),(-121.8705,37.796)]" 213753600000000000 +road name="Koopmann Creek ",thepath="[(-121.9442,37.181),(-121.943465,37.17671)]" 213840000000000000 +road name="Korbel St ",thepath="[(-122.0648,37.742),(-122.0655,37.723)]" 213926400000000000 +road name="Kottinger Dr ",thepath="[(-121.8596,37.58),(-121.859,37.57)]" 214012800000000000 +road name="Kramer St ",thepath="[(-122.1406,37.834),(-122.1416,37.826)]" 214099200000000000 +road name="Kramer St ",thepath="[(-122.143,37.819),(-122.1435,37.812)]" 214185600000000000 +road name="Krause St ",thepath="[(-121.8731,37.863),(-121.8719,37.865)]" 214272000000000000 +road name="L St ",thepath="[(-121.7684,37.772),(-121.768,37.762)]" 214358400000000000 +road name="L St ",thepath="[(-121.7694,37.795),(-121.7692,37.788)]" 214444800000000000 +road name="La Cresta ",thepath="[(-122.2433,37.353),(-122.2425,37.349)]" 214531200000000000 +road name="La Cresta Ave ",thepath="[(-122.2175,37.06),(-122.217,37.073)]" 214617600000000000 +road name="La Loma Ave ",thepath="[(-122.2554,37.844),(-122.2559,37.841)]" 214704000000000000 +road name="La Playa Dr ",thepath="[(-122.1039,37.545),(-122.101,37.493)]" 214790400000000000 +road name="La Salle Ave ",thepath="[(-122.2191,37.176),(-122.2206,37.158)]" 214876800000000000 +road name="La Salle Ave ",thepath="[(-122.2242,37.153),(-122.2255,37.155)]" 214963200000000000 +road name="La Vereda road",thepath="[(-122.2562,37.801),(-122.2558,37.792)]" 215049600000000000 +road name="Ladera Ct ",thepath="[(-121.9444,37.068),(-121.9429,37.07)]" 215136000000000000 +road name="Lafayette Ave ",thepath="[(-122.0309,37.474),(-122.0328,37.458)]" 215222400000000000 +road name="Lafayette Ave ",thepath="[(-122.0336,37.451),(-122.0352,37.438)]" 215308800000000000 +road name="Lafayette Ave ",thepath="[(-122.0395,37.411),(-122.0418,37.398)]" 215395200000000000 +road name="Lafayette Ave ",thepath="[(-122.1602,37.293),(-122.1597,37.287)]" 215481600000000000 +road name="Lafayette St ",thepath="[(-122.2559,37.646),(-122.2553,37.654)]" 215568000000000000 +road name="Laguna Ave ",thepath="[(-122.2062,37.027),(-122.2058,37.03)]" 215654400000000000 +road name="Laguna Ave ",thepath="[(-122.2099,37.989),(-122.2089,37)]" 215740800000000000 +road name="Laguna Dr ",thepath="[(-122.1128,37.418),(-122.1132,37.418)]" 215827200000000000 +road name="Laiolo road",thepath="[(-121.9715,37.322),(-121.9707,37.318)]" 215913600000000000 +road name="Lake Blvd",thepath="[(-122.0381,37.533),(-122.0371,37.53)]" 216000000000000000 +road name="Lake Blvd",thepath="[(-122.0393,37.539),(-122.0387,37.537)]" 216086400000000000 +road name="Lake Chabot ",thepath="[(-122.0753,37.378),(-122.0762,37.367)]" 216172800000000000 +road name="Lake Chabot road",thepath="[(-122.0988,37.133),(-122.0977,37.13)]" 216259200000000000 +road name="Lake Chabot road",thepath="[(-122.1061,37.171),(-122.1047,37.155)]" 216345600000000000 +road name="Lake Chabot road",thepath="[(-122.1323,37.308),(-122.132,37.307)]" 216432000000000000 +road name="Lake Mead Dr ",thepath="[(-122.0533,37.873),(-122.0523,37.858),(-122.0524,37.853)]" 216518400000000000 +road name="Lake Ontario Dr ",thepath="[(-122.0554,37.863),(-122.0557,37.859)]" 216604800000000000 +road name="Lake Ontario Dr ",thepath="[(-122.0562,37.852),(-122.0567,37.847)]" 216691200000000000 +road name="Lake Pillsbury Dr ",thepath="[(-122.0561,37.906),(-122.0573,37.901)]" 216777600000000000 +road name="Lakecrest Ct ",thepath="[(-122.0947,37.107),(-122.0939,37.103)]" 216864000000000000 +road name="Lakehurst Cir ",thepath="[(-122.284729,37.89025),(-122.286096,37.90364)]" 216950400000000000 +road name="Lakeridge Ave ",thepath="[(-122.048299,37.84349),(-122.048127,37.83401)]" 217036800000000000 +road name="Lakeshore Ave ",thepath="[(-122.2586,37.99),(-122.2556,37.006)]" 217123200000000000 +road name="Lakeview Ave ",thepath="[(-122.2225,37.219),(-122.2237,37.221)]" 217209600000000000 +road name="Lakeview Blvd",thepath="[(-121.9313,37.702),(-121.936,37.784)]" 217296000000000000 +road name="Lakewood Ct ",thepath="[(-122.0261,37.472),(-122.0263,37.469)]" 217382400000000000 +road name="Lakewood Dr ",thepath="[(-122.0288,37.48),(-122.0269,37.477)]" 217468800000000000 +road name="Lakewood St ",thepath="[(-121.9189,37.763),(-121.9191,37.772)]" 217555200000000000 +road name="Lakewood Way ",thepath="[(-122.0795,37.389),(-122.0793,37.366)]" 217641600000000000 +road name="Lambaren Ave ",thepath="[(-121.7825,37.822),(-121.7816,37.821)]" 217728000000000000 +road name="Lambeth road",thepath="[(-121.7686,37.942),(-121.7684,37.947)]" 217814400000000000 +road name="Lanai Ct ",thepath="[(-122.0768,37.269),(-122.0768,37.26)]" 217900800000000000 +road name="Landing road",thepath="[(-121.947,37.809),(-121.9444,37.82)]" 217987200000000000 +road name="Landon Ave ",thepath="[(-121.9785,37.258),(-121.978,37.255)]" 218073600000000000 +road name="Langmuir Lane",thepath="[(-121.9199,37.19),(-121.9215,37.197)]" 218160000000000000 +road name="Lansdown Ct ",thepath="[(-121.8659,37.949),(-121.8661,37.96)]" 218246400000000000 +road name="Larchmont Isle ",thepath="[(-122.2667,37.654),(-122.2671,37.647)]" 218332800000000000 +road name="Lark Way ",thepath="[(-122.0563,37.8),(-122.0553,37.797)]" 218419200000000000 +road name="Larkspur Dr ",thepath="[(-121.7431,37.084),(-121.7435,37.09)]" 218505600000000000 +road name="Larkspur St ",thepath="[(-122.0118,37.231),(-122.011,37.227)]" 218592000000000000 +road name="Larmer Ct ",thepath="[(-122.2371,37.215),(-122.2365,37.212)]" 218678400000000000 +road name="Las Palmas Ave ",thepath="[(-121.9521,37.547),(-121.9513,37.539)]" 218764800000000000 +road name="Las Palmas Ct ",thepath="[(-121.944,37.502),(-121.9443,37.513)]" 218851200000000000 +road name="Las Palmas Ct ",thepath="[(-121.950103,37.00582),(-121.949498,37.00835)]" 218937600000000000 +road name="Las Positas Blvd",thepath="[(-121.7988,37.889),(-121.7984,37.889)]" 219024000000000000 +road name="Las Positas Blvd",thepath="[(-121.8642,37.957),(-121.8645,37.955)]" 219110400000000000 +road name="Las Positas Blvd",thepath="[(-121.907779,37.79734),(-121.908481,37.79416)]" 219196800000000000 +road name="Las Positas Blvd",thepath="[(-121.9094,37.79),(-121.9099,37.787)]" 219283200000000000 +road name="Las Positas Blvd",thepath="[(-121.915,37.769),(-121.9187,37.759)]" 219369600000000000 +road name="Las Positas road",thepath="[(-121.7548,37.025),(-121.75,37.01778)]" 219456000000000000 +road name="Las Positas road",thepath="[(-121.764488,37.99199),(-121.75569,37.02022)]" 219542400000000000 +road name="Las Positas road",thepath="[(-121.7726,37.976),(-121.76841,37.98426)]" 219628800000000000 +road name="Lassen road",thepath="[(-121.7428,37.05),(-121.742211,37.05687)]" 219715200000000000 +road name="Latham Lane",thepath="[(-122.2572,37.943),(-122.2565,37.947)]" 219801600000000000 +road name="Latham Walk",thepath="[(-122.2575,37.941),(-122.2572,37.943)]" 219888000000000000 +road name="Lauderdale Ave ",thepath="[(-122.0983,37.344),(-122.0977,37.334)]" 219974400000000000 +road name="Laurel St ",thepath="[(-122.0483,37.265),(-122.0476,37.251)]" 220060800000000000 +road name="Laurette Pl ",thepath="[(-122.0651,37.476),(-122.0646,37.479)]" 220147200000000000 +road name="Lauriston Ct ",thepath="[(-122.2032,37.45),(-122.2034,37.46)]" 220233600000000000 +road name="Laverne Ave ",thepath="[(-122.1938,37.731),(-122.1928,37.721)]" 220320000000000000 +road name="Laverne Dr ",thepath="[(-122.1533,37.821),(-122.1532,37.814)]" 220406400000000000 +road name="Laverne Dr ",thepath="[(-122.1564,37.852),(-122.1549,37.847)]" 220492800000000000 +road name="Lawlor St ",thepath="[(-122.1573,37.533),(-122.1567,37.517)]" 220579200000000000 +road name="Lawrence Dr ",thepath="[(-122.0779,37.133),(-122.0756,37.141)]" 220665600000000000 +road name="Lawton Ave ",thepath="[(-122.2563,37.36),(-122.256,37.366)]" 220752000000000000 +road name="Lee Ave ",thepath="[(-121.7614,37.878),(-121.7615,37.898)]" 220838400000000000 +road name="Lee Ave ",thepath="[(-122.1507,37.298),(-122.1506,37.291)]" 220924800000000000 +road name="Lee St ",thepath="[(-122.2561,37.115),(-122.2569,37.097)]" 221011200000000000 +road name="Leigh St ",thepath="[(-121.9154,37.776),(-121.9153,37.774)]" 221097600000000000 +road name="Leighton St ",thepath="[(-122.0805,37.628),(-122.0797,37.632)]" 221184000000000000 +road name="Leimert Blvd",thepath="[(-122.2059,37.169),(-122.2048,37.169)]" 221270400000000000 +road name="Leland Way ",thepath="[(-121.7867,37.655),(-121.7859,37.656)]" 221356800000000000 +road name="Lemke Pl ",thepath="[(-121.9882,37.261),(-121.98835,37.2595)]" 221443200000000000 +road name="Leon Ct ",thepath="[(-122.0249,37.525),(-122.0255,37.521)]" 221529600000000000 +road name="Leona St ",thepath="[(-122.1751,37.84),(-122.1739,37.836)]" 221616000000000000 +road name="Leonard Dr ",thepath="[(-122.1731,37.185),(-122.1731,37.172),(-122.1725,37.165)]" 221702400000000000 +road name="Leonardo Way ",thepath="[(-122.1073,37.577),(-122.108,37.575)]" 221788800000000000 +road name="Leroy Ave ",thepath="[(-122.2598,37.819),(-122.259792,37.8182)]" 221875200000000000 +road name="Leslie St ",thepath="[(-121.9639,37.412),(-121.9634,37.405)]" 221961600000000000 +road name="Leslie St ",thepath="[(-121.9729,37.438),(-121.971866,37.43847)]" 222048000000000000 +road name="Lessley Ave ",thepath="[(-122.0727,37.866),(-122.0718,37.867)]" 222134400000000000 +road name="Levine Ct ",thepath="[(-122.0836,37.75),(-122.0831,37.753)]" 222220800000000000 +road name="Lewelling Blvd",thepath="[(-122.1118,37.868),(-122.1112,37.869)]" 222307200000000000 +road name="Lewelling Blvd",thepath="[(-122.1219,37.865),(-122.1178,37.866)]" 222393600000000000 +road name="Lewelling Blvd",thepath="[(-122.1555,37.793),(-122.1572,37.787)]" 222480000000000000 +road name="Lewis Ave ",thepath="[(-122.143,37.359),(-122.1433,37.339)]" 222566400000000000 +road name="Liberty St ",thepath="[(-121.9795,37.499),(-121.9785,37.495)]" 222652800000000000 +road name="Liberty St ",thepath="[(-122.1019,37.934),(-122.1009,37.924)]" 222739200000000000 +road name="Libra Ct ",thepath="[(-121.7389,37.179),(-121.7391,37.187)]" 222825600000000000 +road name="Lilac Loop",thepath="[(-122.0182,37.805),(-122.0184,37.798)]" 222912000000000000 +road name="Lilac St ",thepath="[(-122.2014,37.799),(-122.2008,37.804)]" 222998400000000000 +road name="Lillian Ave ",thepath="[(-122.1358,37.044),(-122.1337,37.063)]" 223084800000000000 +road name="Lillian St ",thepath="[(-121.7308,37.829),(-121.7307,37.824)]" 223171200000000000 +road name="Lilly St ",thepath="[(-122.078139,37.64103),(-122.0775,37.643)]" 223257600000000000 +road name="Lincoln Ave ",thepath="[(-121.7449,37.849),(-121.745,37.832)]" 223344000000000000 +road name="Lincoln Ave ",thepath="[(-122.1321,37.499),(-122.1349,37.499)]" 223430400000000000 +road name="Lincoln Ave ",thepath="[(-122.2064,37.063),(-122.2059,37.065)]" 223516800000000000 +road name="Lincoln Ave ",thepath="[(-122.2093,37.034),(-122.2087,37.041)]" 223603200000000000 +road name="Lincoln Ave ",thepath="[(-122.251,37.712),(-122.25,37.707)]" 223689600000000000 +road name="Lincoln Ave ",thepath="[(-122.2549,37.729),(-122.2541,37.726)]" 223776000000000000 +road name="Lincoln Ave ",thepath="[(-122.2628,37.751),(-122.2615,37.751)]" 223862400000000000 +road name="Lincoln Ave ",thepath="[(-122.2674,37.752),(-122.2667,37.753)]" 223948800000000000 +road name="Lincoln Ave ",thepath="[(-122.2721,37.754),(-122.2699,37.753)]" 224035200000000000 +road name="Lincoln Ave ",thepath="[(-122.2786,37.756),(-122.276,37.755)]" 224121600000000000 +road name="Lincoln Way ",thepath="[(-122.1987,37.117),(-122.198,37.101)]" 224208000000000000 +road name="Linda Way ",thepath="[(-121.8657,37.573),(-121.866,37.566)]" 224294400000000000 +road name="Lindbergh Ave ",thepath="[(-121.8089,37.973),(-121.8072,37.973)]" 224380800000000000 +road name="Lindbergh Ave ",thepath="[(-121.8151,37.972),(-121.8118,37.971),(-121.8098,37.973)]" 224467200000000000 +road name="Lindemann road",thepath="[(-121.558002,37.00213),(-121.558002,37.00663)]" 224553600000000000 +road name="Linden St ",thepath="[(-121.7733,37.876),(-121.772,37.879)]" 224640000000000000 +road name="Linden St ",thepath="[(-121.7782,37.861),(-121.777,37.865),(-121.7757,37.868)]" 224726400000000000 +road name="Linden St ",thepath="[(-122.0692,37.83),(-122.0678,37.833)]" 224812800000000000 +road name="Linden St ",thepath="[(-122.2751,37.344),(-122.275,37.35)]" 224899200000000000 +road name="Linden St ",thepath="[(-122.2832,37.096),(-122.2827,37.112)]" 224985600000000000 +road name="Linden St ",thepath="[(-122.2842,37.067),(-122.2837,37.082)]" 225072000000000000 +road name="Linden St ",thepath="[(-122.2854,37.035),(-122.2853,37.038)]" 225158400000000000 +road name="Linden St ",thepath="[(-122.2867,37.998),(-122.2864,37.008)]" 225244800000000000 +road name="Linmore Dr ",thepath="[(-121.9202,37.39),(-121.9191,37.388)]" 225331200000000000 +road name="Lisbon Ave ",thepath="[(-121.7818,37.71),(-121.7808,37.71)]" 225417600000000000 +road name="Little Foot Dr ",thepath="[(-121.9223,37.064),(-121.9228,37.064)]" 225504000000000000 +road name="Livermore Ave ",thepath="[(-121.7509,37.715),(-121.750474,37.71229)]" 225590400000000000 +road name="Livermore Ave ",thepath="[(-121.7553,37.744),(-121.7539,37.737)]" 225676800000000000 +road name="Livermore Ave ",thepath="[(-121.7589,37.765),(-121.7584,37.763)]" 225763200000000000 +road name="Livermore Ave ",thepath="[(-121.7662,37.811),(-121.7656,37.808)]" 225849600000000000 +road name="Livermore Ave ",thepath="[(-121.7687,37.448),(-121.769,37.375)]" 225936000000000000 +road name="Livermore Ave ",thepath="[(-121.7699,37.863),(-121.7703,37.874)]" 226022400000000000 +road name="Livermore Ave ",thepath="[(-121.772719,37.99085),(-121.7728,37.001)]" 226108800000000000 +road name="Livermore Commons ",thepath="[(-121.926632,37.3099),(-121.926508,37.30113)]" 226195200000000000 +road name="Locksley Ave ",thepath="[(-122.2547,37.422),(-122.2534,37.438)]" 226281600000000000 +road name="Lockwood Ave ",thepath="[(-121.9401,37.366),(-121.9408,37.364)]" 226368000000000000 +road name="Lockwood St ",thepath="[(-122.1802,37.628),(-122.1778,37.601)]" 226454400000000000 +road name="Locust St ",thepath="[(-121.7815,37.876),(-121.7791,37.881)]" 226540800000000000 +road name="Locust St ",thepath="[(-122.0435,37.315),(-122.0435,37.312)]" 226627200000000000 +road name="Locust St ",thepath="[(-122.1606,37.007),(-122.1593,37.987)]" 226713600000000000 +road name="Locust St ",thepath="[(-122.1813,37.578),(-122.1807,37.572)]" 226800000000000000 +road name="Logan Ct ",thepath="[(-122.0053,37.492),(-122.0061,37.484)]" 226886400000000000 +road name="Logan Dr ",thepath="[(-121.9862,37.39),(-121.9856,37.384)]" 226972800000000000 +road name="Logan Dr ",thepath="[(-121.9913,37.423),(-121.990341,37.41763)]" 227059200000000000 +road name="Loma Dr ",thepath="[(-121.9202,37.39),(-121.9204,37.394)]" 227145600000000000 +road name="Loma Vista Ave ",thepath="[(-122.1952,37.942),(-122.1933,37.952)]" 227232000000000000 +road name="Lomitas Ave ",thepath="[(-121.773262,37.59041),(-121.77308,37.59042),(-121.772998,37.59043)]" 227318400000000000 +road name="Lomitas Ave ",thepath="[(-121.7807,37.574),(-121.7804,37.586)]" 227404800000000000 +road name="Longridge road",thepath="[(-122.2345,37.096),(-122.2317,37.099)]" 227491200000000000 +road name="Longview Dr ",thepath="[(-121.904,37.486),(-121.9047,37.482)]" 227577600000000000 +road name="Longview Dr ",thepath="[(-122.1277,37.257),(-122.1277,37.252)]" 227664000000000000 +road name="Longwood Ct ",thepath="[(-122.1036,37.606),(-122.1038,37.603)]" 227750400000000000 +road name="Lori Way ",thepath="[(-122.0446,37.845),(-122.0441,37.835)]" 227836800000000000 +road name="Loro Pl ",thepath="[(-121.9447,37.577),(-121.9458,37.582)]" 227923200000000000 +road name="Lorren Dr ",thepath="[(-121.9911,37.491),(-121.9926,37.473)]" 228009600000000000 +road name="Los Banos St ",thepath="[(-122.102,37.914),(-122.1013,37.91)]" 228096000000000000 +road name="Los Banos St ",thepath="[(-122.1064,37.965),(-122.1057,37.956)]" 228182400000000000 +road name="Louise Lane",thepath="[(-122.0749,37.764),(-122.0754,37.758)]" 228268800000000000 +road name="Lowell St ",thepath="[(-122.275,37.384),(-122.2752,37.389)]" 228355200000000000 +road name="Lowell St ",thepath="[(-122.2757,37.41),(-122.2759,37.417)]" 228441600000000000 +road name="Lowry road",thepath="[(-122.052627,37.83339),(-122.0531,37.827),(-122.0538,37.818)]" 228528000000000000 +road name="Lucot St ",thepath="[(-122.1091,37.746),(-122.1096,37.743)]" 228614400000000000 +road name="Luna Ave ",thepath="[(-122.1238,37.117),(-122.123,37.124)]" 228700800000000000 +road name="Lunar Way ",thepath="[(-122.0668,37.883),(-122.0669,37.877)]" 228787200000000000 +road name="Lurene Dr ",thepath="[(-121.918603,37.24972),(-121.919428,37.24785)]" 228873600000000000 +road name="Luzon Ct ",thepath="[(-121.9328,37.28),(-121.9321,37.279)]" 228960000000000000 +road name="Lyman road",thepath="[(-122.2124,37.068),(-122.2105,37.093)]" 229046400000000000 +road name="Lynde St ",thepath="[(-122.2195,37.912),(-122.2187,37.91),(-122.2173,37.908)]" 229132800000000000 +road name="Lyndhurst St ",thepath="[(-122.1823,37.354),(-122.1807,37.348)]" 229219200000000000 +road name="Lyra St ",thepath="[(-121.9186,37.766),(-121.9184,37.762)]" 229305600000000000 +road name="M St ",thepath="[(-121.7731,37.842),(-121.7736,37.853)]" 229392000000000000 +road name="M St ",thepath="[(-122.0851,37.754),(-122.0845,37.742)]" 229478400000000000 +road name="Maar Ave ",thepath="[(-121.9573,37.693),(-121.9565,37.701)]" 229564800000000000 +road name="Mabel Ave ",thepath="[(-122.0774,37.029),(-122.0728,37.029)]" 229651200000000000 +road name="Mabel St ",thepath="[(-122.2841,37.591),(-122.284,37.583)]" 229737600000000000 +road name="Mac Arthur Blvd",thepath="[(-122.139,37.34),(-122.138812,37.34)]" 229824000000000000 +road name="Mac Arthur Blvd",thepath="[(-122.1394,37.356),(-122.139376,37.35503)]" 229910400000000000 +road name="Mac Arthur Blvd",thepath="[(-122.1407,37.372),(-122.14,37.364)]" 229996800000000000 +road name="Mac Arthur Blvd",thepath="[(-122.1495,37.412),(-122.1487,37.408)]" 230083200000000000 +road name="Mac Arthur Blvd",thepath="[(-122.1552,37.454),(-122.1541,37.446)]" 230169600000000000 +road name="Mac Arthur Blvd",thepath="[(-122.1605,37.553),(-122.1596,37.525)]" 230256000000000000 +road name="Mac Arthur Blvd",thepath="[(-122.1636,37.618),(-122.1629,37.612)]" 230342400000000000 +road name="Mac Arthur Blvd",thepath="[(-122.1697,37.68),(-122.1696,37.679)]" 230428800000000000 +road name="Mac Arthur Blvd",thepath="[(-122.185,37.757),(-122.1843,37.753)]" 230515200000000000 +road name="Mac Arthur Blvd",thepath="[(-122.1868,37.773),(-122.1861,37.767)]" 230601600000000000 +road name="Mac Arthur Blvd",thepath="[(-122.188,37.837),(-122.1871,37.833)]" 230688000000000000 +road name="Mac Arthur Blvd",thepath="[(-122.207,37.985),(-122.204,37.973)]" 230774400000000000 +road name="Mac Arthur Blvd",thepath="[(-122.2239,37.007),(-122.2229,37.005)]" 230860800000000000 +road name="Mac Arthur Blvd",thepath="[(-122.2258,37.01),(-122.2251,37.008)]" 230947200000000000 +road name="Mac Arthur Blvd",thepath="[(-122.2281,37.014),(-122.2278,37.013)]" 231033600000000000 +road name="Mac Arthur Blvd",thepath="[(-122.2328,37.039),(-122.2307,37.022)]" 231120000000000000 +road name="Mac Arthur Blvd",thepath="[(-122.2353,37.054),(-122.2338,37.044)]" 231206400000000000 +road name="Mac Arthur Blvd",thepath="[(-122.2405,37.072),(-122.2402,37.07)]" 231292800000000000 +road name="Mac Arthur Blvd",thepath="[(-122.252491,37.17473),(-122.253,37.182)]" 231379200000000000 +road name="Mac Arthur Blvd",thepath="[(-122.262,37.258),(-122.2631,37.26)]" 231465600000000000 +road name="Mac Arthur Blvd",thepath="[(-122.2673,37.272),(-122.2676,37.273)]" 231552000000000000 +road name="Mackenzie Pl ",thepath="[(-122.0125,37.698),(-122.0115,37.715)]" 231638400000000000 +road name="Maddux Dr ",thepath="[(-122.1829,37.343),(-122.1823,37.341)]" 231724800000000000 +road name="Maddux Dr ",thepath="[(-122.1848,37.366),(-122.1848,37.36)]" 231811200000000000 +road name="Madelaine Pl ",thepath="[(-122.0401,37.448),(-122.0395,37.448)]" 231897600000000000 +road name="Madera Ave ",thepath="[(-122.19,37.814),(-122.1914,37.824)]" 231984000000000000 +road name="Madison Ave ",thepath="[(-121.7414,37.777),(-121.7415,37.77)]" 232070400000000000 +road name="Madison Ave ",thepath="[(-122.0628,37.078),(-122.063,37.071)]" 232156800000000000 +road name="Madison St ",thepath="[(-122.267,37.962),(-122.2668,37.965)]" 232243200000000000 +road name="Madison St ",thepath="[(-122.2686,37.937),(-122.2682,37.945)]" 232329600000000000 +road name="Magee Ave ",thepath="[(-122.1991,37.928),(-122.1977,37.937)]" 232416000000000000 +road name="Magnolia Cir ",thepath="[(-121.868186,37.81015),(-121.866849,37.80683)]" 232502400000000000 +road name="Magnolia Dr ",thepath="[(-122.2313,37.296),(-122.2317,37.285)]" 232588800000000000 +road name="Magnolia St ",thepath="[(-122.0361,37.306),(-122.0354,37.303)]" 232675200000000000 +road name="Magnolia St ",thepath="[(-122.0409,37.333),(-122.0394,37.325)]" 232761600000000000 +road name="Magnolia St ",thepath="[(-122.0971,37.5),(-122.0962,37.484)]" 232848000000000000 +road name="Magnolia St ",thepath="[(-122.2864,37.104),(-122.286,37.115)]" 232934400000000000 +road name="Magnolia St ",thepath="[(-122.2899,37.005),(-122.2894,37.019)]" 233020800000000000 +road name="Main St ",thepath="[(-121.8743,37.615),(-121.8739,37.624)]" 233107200000000000 +road name="Main St ",thepath="[(-121.8754,37.595),(-121.875,37.604)]" 233193600000000000 +road name="Main St ",thepath="[(-121.8769,37.571),(-121.876403,37.57907)]" 233280000000000000 +road name="Main St ",thepath="[(-121.8875,37.939),(-121.8907,37.936)]" 233366400000000000 +road name="Main St ",thepath="[(-122.0817,37.729),(-122.0807,37.719)]" 233452800000000000 +road name="Main St ",thepath="[(-122.0844,37.758),(-122.0836,37.75)]" 233539200000000000 +road name="Main St ",thepath="[(-122.2907,37.832),(-122.2907,37.839)]" 233625600000000000 +road name="Mairmont Dr ",thepath="[(-121.8725,37.8),(-121.8734,37.8)]" 233712000000000000 +road name="Maitland Dr ",thepath="[(-122.2286,37.273),(-122.2277,37.265)]" 233798400000000000 +road name="Majestic Ave ",thepath="[(-122.1784,37.793),(-122.1789,37.788)]" 233884800000000000 +road name="Majestic Way ",thepath="[(-122.142593,37.98723),(-122.1423,37.98485)]" 233971200000000000 +road name="Malabar Ave ",thepath="[(-122.0727,37.103),(-122.0711,37.103)]" 234057600000000000 +road name="Malcolm Ave ",thepath="[(-122.1269,37.516),(-122.125,37.514)]" 234144000000000000 +road name="Malcolm Ave ",thepath="[(-122.1366,37.469),(-122.1359,37.483)]" 234230400000000000 +road name="Mallard Ct ",thepath="[(-122.0358,37.486),(-122.0367,37.492)]" 234316800000000000 +road name="Malta Ct ",thepath="[(-122.1832,37.273),(-122.1823,37.278)]" 234403200000000000 +road name="Manchester road",thepath="[(-122.1125,37.071),(-122.1116,37.071)]" 234489600000000000 +road name="Manchester St ",thepath="[(-121.866725,37.98973),(-121.866734,37.98255)]" 234576000000000000 +road name="Mandalay road",thepath="[(-122.2322,37.397),(-122.2321,37.403)]" 234662400000000000 +road name="Manila Ave ",thepath="[(-122.2448,37.425),(-122.2437,37.428)]" 234748800000000000 +road name="Mann Ave ",thepath="[(-122.0165,37.844),(-122.0171,37.83)]" 234835200000000000 +road name="Manor Blvd",thepath="[(-122.1402,37.912),(-122.1409,37.913)]" 234921600000000000 +road name="Manor Blvd",thepath="[(-122.1421,37.912),(-122.1426,37.912)]" 235008000000000000 +road name="Manor Blvd",thepath="[(-122.1452,37.911),(-122.1461,37.91)]" 235094400000000000 +road name="Manor Blvd",thepath="[(-122.1584,37.906),(-122.1597,37.905)]" 235180800000000000 +road name="Manor Way ",thepath="[(-122.2853,37.857),(-122.2844,37.855)]" 235267200000000000 +road name="Manter road",thepath="[(-122.0531,37.984),(-122.0522,37.98)]" 235353600000000000 +road name="Mantilla Ave ",thepath="[(-122.0781,37.31),(-122.079,37.309)]" 235440000000000000 +road name="Manzanita St ",thepath="[(-122.0188,37.263),(-122.0182,37.258)]" 235526400000000000 +road name="Maple Ave ",thepath="[(-122.1987,37.024),(-122.197,37.035)]" 235612800000000000 +road name="Maple Ave ",thepath="[(-122.2051,37.962),(-122.2047,37.965)]" 235699200000000000 +road name="Maple Ave ",thepath="[(-122.21,37.909),(-122.2096,37.915)]" 235785600000000000 +road name="Maple St ",thepath="[(-121.7638,37.824),(-121.7627,37.82)]" 235872000000000000 +road name="Maple St ",thepath="[(-122.2888,37.796),(-122.2872,37.795)]" 235958400000000000 +road name="Maple Leaf Dr ",thepath="[(-121.864615,37.81276),(-121.863868,37.79283)]" 236044800000000000 +road name="Marabu Way ",thepath="[(-121.9503,37.454),(-121.9508,37.45)]" 236131200000000000 +road name="Maraschino Ct ",thepath="[(-122.0249,37.842),(-122.0252,37.833)]" 236217600000000000 +road name="Margery Dr ",thepath="[(-121.9766,37.338),(-121.9772,37.33)]" 236304000000000000 +road name="Marianas ",thepath="[(-122.2426,37.344),(-122.243,37.339)]" 236390400000000000 +road name="Marianas ",thepath="[(-122.244,37.327),(-122.244408,37.32305)]" 236476800000000000 +road name="Marigold Ct ",thepath="[(-121.9177,37.748),(-121.9187,37.746)]" 236563200000000000 +road name="Marigold road",thepath="[(-121.7383,37.123),(-121.7393,37.128)]" 236649600000000000 +road name="Marin Ave ",thepath="[(-122.1044,37.614),(-122.1055,37.613)]" 236736000000000000 +road name="Marin Ave ",thepath="[(-122.1101,37.608),(-122.1107,37.607)]" 236822400000000000 +road name="Marin Ave ",thepath="[(-122.258,37.969),(-122.258,37.966)]" 236908800000000000 +road name="Marin Ave ",thepath="[(-122.2741,37.894),(-122.272,37.901)]" 236995200000000000 +road name="Marin Ave ",thepath="[(-122.2865,37.891),(-122.2856,37.895)]" 237081600000000000 +road name="Marin Ave ",thepath="[(-122.2928,37.877),(-122.2925,37.877)]" 237168000000000000 +road name="Marin Ave ",thepath="[(-122.2956,37.871),(-122.2948,37.873)]" 237254400000000000 +road name="Marin Way ",thepath="[(-122.2443,37.898),(-122.2436,37.893)]" 237340800000000000 +road name="Marina Blvd",thepath="[(-122.163,37.111),(-122.164,37.106)]" 237427200000000000 +road name="Marina Blvd",thepath="[(-122.164188,37.10514),(-122.1651,37.101)]" 237513600000000000 +road name="Marineview Dr ",thepath="[(-122.1261,37.21),(-122.1254,37.205)]" 237600000000000000 +road name="Marineview Dr ",thepath="[(-122.1318,37.241),(-122.1305,37.239)]" 237686400000000000 +road name="Maritime St ",thepath="[(-122.3072,37.156),(-122.3084,37.142)]" 237772800000000000 +road name="Market Ave ",thepath="[(-122.0229,37.328),(-122.0244,37.312)]" 237859200000000000 +road name="Market St ",thepath="[(-122.2727,37.333),(-122.2725,37.34)]" 237945600000000000 +road name="Market St ",thepath="[(-122.2738,37.292),(-122.2736,37.301)]" 238032000000000000 +road name="Market St ",thepath="[(-122.2741,37.426),(-122.2742,37.433)]" 238118400000000000 +road name="Market St ",thepath="[(-122.2754,37.227),(-122.2751,37.235)]" 238204800000000000 +road name="Market St ",thepath="[(-122.2794,37.109),(-122.2793,37.114)]" 238291200000000000 +road name="Market St ",thepath="[(-122.2826,37.021),(-122.2825,37.023)]" 238377600000000000 +road name="Marlboro Way ",thepath="[(-121.86612,37.9994),(-121.866,37.999)]" 238464000000000000 +road name="Marlin Ct ",thepath="[(-122.044157,37.30406),(-122.044602,37.30052)]" 238550400000000000 +road name="Marlow Dr ",thepath="[(-122.1375,37.346),(-122.1374,37.351)]" 238636800000000000 +road name="Marne St ",thepath="[(-122.148,37.811),(-122.1476,37.805)]" 238723200000000000 +road name="Mars road",thepath="[(-121.7834,37.586),(-121.7827,37.575)]" 238809600000000000 +road name="Marsala Ct ",thepath="[(-121.848563,37.64116),(-121.847736,37.63501),(-121.847146,37.63392)]" 238896000000000000 +road name="Marshall St ",thepath="[(-122.0637,37.99),(-122.0638,37.982)]" 238982400000000000 +road name="Marshall Ter ",thepath="[(-122.026173,37.67648),(-122.026375,37.67346)]" 239068800000000000 +road name="Martin Ave ",thepath="[(-121.8618,37.818),(-121.8618,37.82696),(-121.8618,37.848)]" 239155200000000000 +road name="Martin Luther King Jr Way ",thepath="[(-122.2667,37.353),(-122.2666,37.357)]" 239241600000000000 +road name="Martin Luther King Jr Way ",thepath="[(-122.2698,37.223),(-122.2697,37.229)]" 239328000000000000 +road name="Martin Luther King Jr Way ",thepath="[(-122.2703,37.527),(-122.2702,37.517)]" 239414400000000000 +road name="Martin Luther King Jr Way ",thepath="[(-122.2705,37.194),(-122.2704,37.199)]" 239500800000000000 +road name="Martin Luther King Jr Way ",thepath="[(-122.2707,37.563),(-122.2706,37.545)]" 239587200000000000 +road name="Martin Luther King Jr Way ",thepath="[(-122.2709,37.489),(-122.2708,37.481)]" 239673600000000000 +road name="Martin Luther King Jr Way ",thepath="[(-122.2712,37.608),(-122.2711,37.599)]" 239760000000000000 +road name="Martin Luther King Jr Way ",thepath="[(-122.272,37.146),(-122.2715,37.153)]" 239846400000000000 +road name="Martin Luther King Jr Way ",thepath="[(-122.2787,37.014),(-122.2784,37.02),(-122.2779,37.027)]" 239932800000000000 +road name="Martinez Dr ",thepath="[(-121.984,37.793),(-121.984,37.796)]" 240019200000000000 +road name="Martinez St ",thepath="[(-122.159,37.191),(-122.1582,37.185)]" 240105600000000000 +road name="Maryland Ave ",thepath="[(-122.2734,37.031),(-122.272,37.032)]" 240192000000000000 +road name="Marylin Ave ",thepath="[(-121.7857,37.838),(-121.7833,37.837)]" 240278400000000000 +road name="Masonic Ter ",thepath="[(-121.9512,37.123),(-121.9508,37.124)]" 240364800000000000 +road name="Massachusetts St ",thepath="[(-122.0925,37.051),(-122.0909,37.056)]" 240451200000000000 +road name="Mateo Ct ",thepath="[(-122.0266,37.659),(-122.0273,37.65)]" 240537600000000000 +road name="Matthew Ct ",thepath="[(-121.8807,37.394),(-121.8783,37.395)]" 240624000000000000 +road name="Mattos Dr ",thepath="[(-121.9983,37.542),(-121.9992,37.53)]" 240710400000000000 +road name="Mattos Dr ",thepath="[(-122.0002,37.52),(-122.0005,37.513)]" 240796800000000000 +road name="Mattos Dr ",thepath="[(-122.0005,37.502),(-122.000898,37.49683)]" 240883200000000000 +road name="Mattox road",thepath="[(-122.0958,37.872),(-122.0957,37.876)]" 240969600000000000 +road name="Maubert Ave ",thepath="[(-122.1114,37.009),(-122.1096,37.995)]" 241056000000000000 +road name="Maud Ave ",thepath="[(-122.1387,37.25),(-122.1379,37.252)]" 241142400000000000 +road name="Mauna Loa Park Dr ",thepath="[(-121.9723,37.191),(-121.972,37.196)]" 241228800000000000 +road name="Mavis Ct ",thepath="[(-121.8584,37.606),(-121.8577,37.603)]" 241315200000000000 +road name="Mavis Dr ",thepath="[(-121.86,37.628),(-121.8598,37.606)]" 241401600000000000 +road name="Maxwelton road",thepath="[(-122.2248,37.31),(-122.2252,37.32)]" 241488000000000000 +road name="May Ct ",thepath="[(-122.0589,37.323),(-122.0577,37.331)]" 241574400000000000 +road name="May road",thepath="[(-122.0168,37.083),(-122.015,37.095)]" 241660800000000000 +road name="Maya St ",thepath="[(-121.9148,37.792),(-121.9143,37.784)]" 241747200000000000 +road name="Maybelle Ave ",thepath="[(-122.1957,37.878),(-122.1948,37.883)]" 241833600000000000 +road name="Maybelle Way ",thepath="[(-122.1974,37.873),(-122.1971,37.874)]" 241920000000000000 +road name="Mayfair Park Ave ",thepath="[(-121.9631,37.148),(-121.9629,37.143)]" 242006400000000000 +road name="Mayhews Landing road",thepath="[(-122.0417,37.346),(-122.0424,37.341)]" 242092800000000000 +road name="Mayhews Landing road",thepath="[(-122.0458,37.318),(-122.0468,37.309)]" 242179200000000000 +road name="Mayhews Landing road",thepath="[(-122.0482,37.299),(-122.0489,37.295)]" 242265600000000000 +road name="Mayport Cir ",thepath="[(-122.283588,37.88064),(-122.284724,37.87992)]" 242352000000000000 +road name="Mayview Way ",thepath="[(-121.7869,37.637),(-121.7848,37.636)]" 242438400000000000 +road name="Mc Clary Ave ",thepath="[(-122.1924,37.443),(-122.1917,37.448)]" 242524800000000000 +road name="Mc Farlane Lane",thepath="[(-122.0823,37.377),(-122.0863,37.374)]" 242611200000000000 +road name="Mc Gee Ave ",thepath="[(-122.2755,37.611),(-122.2754,37.603)]" 242697600000000000 +road name="Mc Gee Ave ",thepath="[(-122.2768,37.709),(-122.2768,37.702)]" 242784000000000000 +road name="Mc Gee Ave ",thepath="[(-122.2772,37.746),(-122.2771,37.736)]" 242870400000000000 +road name="Mc Millan St ",thepath="[(-122.2479,37.454),(-122.248,37.457)]" 242956800000000000 +road name="McClure Ave ",thepath="[(-122.1431,37.001),(-122.1436,37.998)]" 243043200000000000 +road name="McGlinchey Dr ",thepath="[(-121.7721,37.745),(-121.7722,37.729)]" 243129600000000000 +road name="McKeown Ct ",thepath="[(-122.0676,37.681),(-122.0671,37.674)]" 243216000000000000 +road name="McKeown Ter ",thepath="[(-121.992,37.825),(-121.992203,37.82275)]" 243302400000000000 +road name="McSherry Way ",thepath="[(-122.235166,37.29199),(-122.234053,37.27635)]" 243388800000000000 +road name="Meadowbrook Ave ",thepath="[(-122.0406,37.198),(-122.0389,37.183)]" 243475200000000000 +road name="Meadowbrook Com ",thepath="[(-122.0043,37.608),(-122.0036,37.609)]" 243561600000000000 +road name="Meadowlark Dr ",thepath="[(-122.0692,37.985),(-122.0692,37.973)]" 243648000000000000 +road name="Mecartney road",thepath="[(-122.2473,37.374),(-122.2455,37.369)]" 243734400000000000 +road name="Mecartney road",thepath="[(-122.24835,37.37769),(-122.247665,37.3761)]" 243820800000000000 +road name="Medacino Ter ",thepath="[(-122.043321,37.65121),(-122.043914,37.64881)]" 243907200000000000 +road name="Medallion Dr ",thepath="[(-122.0502,37.08),(-122.0502,37.059)]" 243993600000000000 +road name="Medallion Dr ",thepath="[(-122.0502,37.929),(-122.0502,37.936)]" 244080000000000000 +road name="Medellion Dr ",thepath="[(-122.050194,37.95738),(-122.050187,37.96407)]" 244166400000000000 +road name="Medford Ave ",thepath="[(-122.1017,37.828),(-122.1015,37.829),(-122.1002,37.832)]" 244252800000000000 +road name="Medlar Dr ",thepath="[(-122.0627,37.378),(-122.0625,37.375)]" 244339200000000000 +road name="Meek Ave ",thepath="[(-122.0919,37.641),(-122.0897,37.642)]" 244425600000000000 +road name="Meekland Ave ",thepath="[(-122.113,37.812),(-122.1128,37.809)]" 244512000000000000 +road name="Meiggs St ",thepath="[(-121.9596,37.267),(-121.9593,37.255)]" 244598400000000000 +road name="Melbourne Ave ",thepath="[(-122.0842,37.285),(-122.0837,37.269)]" 244684800000000000 +road name="Melcher St ",thepath="[(-122.1792,37.21),(-122.1778,37.198)]" 244771200000000000 +road name="Mellow Way ",thepath="[(-122.0387,37.846),(-122.0377,37.841)]" 244857600000000000 +road name="Melrose Ave ",thepath="[(-122.2032,37.736),(-122.2029,37.733)]" 244944000000000000 +road name="Melrose Ave ",thepath="[(-122.2075,37.756),(-122.2072,37.754)]" 245030400000000000 +road name="Melrose Ave ",thepath="[(-122.2328,37.331),(-122.2319,37.335)]" 245116800000000000 +road name="Mendenhall road",thepath="[(-121.681342,37.03354),(-121.684794,37.0443)]" 245203200000000000 +road name="Mendenhall road",thepath="[(-122.134,37.677),(-122.1324,37.685)]" 245289600000000000 +road name="Merced St ",thepath="[(-122.1708,37.102),(-122.1707,37.099)]" 245376000000000000 +road name="Mercury St ",thepath="[(-122.0598,37.291),(-122.0595,37.284)]" 245462400000000000 +road name="Merle Ct ",thepath="[(-122.1467,37.373),(-122.1467,37.366)]" 245548800000000000 +road name="Merle Ct ",thepath="[(-122.1482,37.368),(-122.1479,37.358)]" 245635200000000000 +road name="Merol Ave ",thepath="[(-121.9924,37.453),(-121.9918,37.45)]" 245721600000000000 +road name="Merriewood Dr ",thepath="[(-122.2136,37.373),(-122.2128,37.389)]" 245808000000000000 +road name="Merrill Ave ",thepath="[(-121.9205,37.807),(-121.9196,37.811)]" 245894400000000000 +road name="Merrimac River St ",thepath="[(-122.032907,37.70666),(-122.0332,37.703)]" 245980800000000000 +road name="Merritt Ave ",thepath="[(-122.2471,37.078),(-122.2446,37.078)]" 246067200000000000 +road name="Merritt Ave ",thepath="[(-122.2495,37.053),(-122.2487,37.066)]" 246153600000000000 +road name="Merritt Channel ",thepath="[(-122.2591,37.968),(-122.2606,37.942)]" 246240000000000000 +road name="Mesa Ave ",thepath="[(-122.233,37.304),(-122.2322,37.291)]" 246326400000000000 +road name="Meteor Dr ",thepath="[(-122.0713,37.868),(-122.0702,37.862)]" 246412800000000000 +road name="Miami Ave ",thepath="[(-122.0812,37.234),(-122.0812,37.229)]" 246499200000000000 +road name="Michael Ave ",thepath="[(-121.9605,37.208),(-121.961,37.206)]" 246585600000000000 +road name="Michell Ct ",thepath="[(-121.7588,37.897),(-121.7583,37.893)]" 246672000000000000 +road name="Michelle St ",thepath="[(-121.9691,37.461),(-121.968214,37.45771)]" 246758400000000000 +road name="Middlefield Ave ",thepath="[(-121.9442,37.309),(-121.9426,37.311)]" 246844800000000000 +road name="Midvale Ave ",thepath="[(-122.2016,37.933),(-122.2009,37.938)]" 246931200000000000 +road name="Midway road",thepath="[(-121.572056,37.50049),(-121.574787,37.51247)]" 247017600000000000 +road name="Milani Ave ",thepath="[(-122.0235,37.438),(-122.024,37.432)]" 247104000000000000 +road name="Milburn Ter ",thepath="[(-122.058937,37.54931),(-122.058337,37.5373)]" 247190400000000000 +road name="Mildred Ct ",thepath="[(-122.0002,37.388),(-121.9998,37.386)]" 247276800000000000 +road name="Mildred Dr ",thepath="[(-121.9958,37.44),(-121.9964,37.433)]" 247363200000000000 +road name="Mildred Dr ",thepath="[(-121.9973,37.421),(-121.9977,37.417)]" 247449600000000000 +road name="Miles Ave ",thepath="[(-122.2599,37.373),(-122.2589,37.382)]" 247536000000000000 +road name="Miller Ave ",thepath="[(-122.2322,37.844),(-122.2319,37.848)]" 247622400000000000 +road name="Miller Ave ",thepath="[(-122.2353,37.806),(-122.235,37.809)]" 247708800000000000 +road name="Miller road",thepath="[(-122.0902,37.645),(-122.0865,37.545)]" 247795200000000000 +road name="Miller St ",thepath="[(-122.1627,37.048),(-122.1614,37.032)]" 247881600000000000 +road name="Mills Ave ",thepath="[(-122.1222,37.917),(-122.1222,37.908)]" 247968000000000000 +road name="Milmar Blvd",thepath="[(-122.0785,37.108),(-122.0783,37.101)]" 248054400000000000 +road name="Milvia St ",thepath="[(-122.2689,37.593),(-122.2687,37.585)]" 248140800000000000 +road name="Milvia St ",thepath="[(-122.2692,37.637),(-122.2691,37.629)]" 248227200000000000 +road name="Milvia St ",thepath="[(-122.2707,37.772),(-122.2707,37.763)]" 248313600000000000 +road name="Milvia St ",thepath="[(-122.2711,37.817),(-122.2708,37.8),(-122.2707,37.781)]" 248400000000000000 +road name="Minerva St ",thepath="[(-122.0652,37.282),(-122.066,37.28)]" 248486400000000000 +road name="Mines road",thepath="[(-121.531666,37.83219),(-121.534092,37.94366)]" 248572800000000000 +road name="Mines road",thepath="[(-121.536341,37),(-121.536966,37.00198)]" 248659200000000000 +road name="Mines road",thepath="[(-121.570515,37.78068),(-121.568708,37.80183)]" 248745600000000000 +road name="Mines road",thepath="[(-121.633014,37.95741),(-121.642288,37.98874)]" 248832000000000000 +road name="Minivet Ct ",thepath="[(-121.8834,37.805),(-121.8838,37.811)]" 248918400000000000 +road name="Minturn Ct ",thepath="[(-122.0545,37.944),(-122.0538,37.946)]" 249004800000000000 +road name="Mira Vista Dr ",thepath="[(-122.0829,37.22),(-122.0827,37.213)]" 249091200000000000 +road name="Mirador Ct ",thepath="[(-121.8644,37.556),(-121.8633,37.552)]" 249177600000000000 +road name="Miramar Ave ",thepath="[(-122.1009,37.025),(-122.099089,37.03209)]" 249264000000000000 +road name="Miramonte Ave ",thepath="[(-122.1052,37.986),(-122.1042,37.997)]" 249350400000000000 +road name="Miranda St ",thepath="[(-122.0715,37.211),(-122.0717,37.206)]" 249436800000000000 +road name="Miranda Way ",thepath="[(-121.7837,37.649),(-121.7807,37.648)]" 249523200000000000 +road name="Mission Blvd",thepath="[(-121.918886,37),(-121.9194,37.976),(-121.9198,37.975)]" 249609600000000000 +road name="Mission Blvd",thepath="[(-121.920783,37.37168),(-121.9204,37.367)]" 249696000000000000 +road name="Mission Blvd",thepath="[(-121.9214,37.961),(-121.9217,37.96)]" 249782400000000000 +road name="Mission Blvd",thepath="[(-121.924901,37.92912),(-121.9254,37.922)]" 249868800000000000 +road name="Mission Blvd",thepath="[(-121.928695,37.43767),(-121.925,37.417)]" 249955200000000000 +road name="Mission Blvd",thepath="[(-121.937204,37.48803),(-121.936483,37.48336)]" 250041600000000000 +road name="Mission Blvd",thepath="[(-121.9418,37.517),(-121.9389,37.499)]" 250128000000000000 +road name="Mission Blvd",thepath="[(-121.9449,37.536),(-121.9438,37.53)]" 250214400000000000 +road name="Mission Blvd",thepath="[(-121.949133,37.56339),(-121.948176,37.5572)]" 250300800000000000 +road name="Mission Blvd",thepath="[(-121.9562,37.607),(-121.9548,37.598)]" 250387200000000000 +road name="Mission Blvd",thepath="[(-121.9632,37.683),(-121.96315,37.6825)]" 250473600000000000 +road name="Mission Blvd",thepath="[(-121.971801,37.77041),(-121.9706,37.762)]" 250560000000000000 +road name="Mission Blvd",thepath="[(-121.9823,37.791),(-121.9765,37.788),(-121.9751,37.786)]" 250646400000000000 +road name="Mission Blvd",thepath="[(-122.0006,37.896),(-121.9989,37.88)]" 250732800000000000 +road name="Mission Blvd",thepath="[(-122.0221,37.084),(-122.021325,37.07762)]" 250819200000000000 +road name="Mission Blvd",thepath="[(-122.0641,37.491),(-122.062,37.464)]" 250905600000000000 +road name="Mission Blvd",thepath="[(-122.07,37.567),(-122.0692,37.555)]" 250992000000000000 +road name="Mission Blvd",thepath="[(-122.0798,37.688),(-122.0779,37.668)]" 251078400000000000 +road name="Mission Blvd",thepath="[(-122.0928,37.802),(-122.0919,37.796),(-122.0916,37.793)]" 251164800000000000 +road name="Mission Blvd",thepath="[(-122.0955,37.824),(-122.0947,37.817)]" 251251200000000000 +road name="Mission Blvd",thepath="[(-122.1031,37.882),(-122.1024,37.877)]" 251337600000000000 +road name="Mission Ct ",thepath="[(-121.929057,37.90595),(-121.929602,37.90063)]" 251424000000000000 +road name="Mission Dr ",thepath="[(-121.879,37.526),(-121.8788,37.526)]" 251510400000000000 +road name="Mission Creek ",thepath="[(-121.9244,37.614),(-121.9238,37.608)]" 251596800000000000 +road name="Mistflower Ave ",thepath="[(-122.0195,37.329),(-122.0199,37.323)]" 251683200000000000 +road name="Mitchell Ave ",thepath="[(-122.1438,37.376),(-122.1439,37.374)]" 251769600000000000 +road name="Mitchell St ",thepath="[(-122.2257,37.844),(-122.2249,37.852)]" 251856000000000000 +road name="Moccasin St ",thepath="[(-122.0302,37.085),(-122.0297,37.078)]" 251942400000000000 +road name="Mocine Ave ",thepath="[(-122.0751,37.497),(-122.0748,37.476)]" 252028800000000000 +road name="Mockingbird Lane",thepath="[(-122.0862,37.419),(-122.0861,37.412)]" 252115200000000000 +road name="Mohr Ave ",thepath="[(-121.8495,37.819),(-121.8618,37.818)]" 252201600000000000 +road name="Mohr Ave ",thepath="[(-121.877,37.819),(-121.8793,37.816),(-121.8799,37.819)]" 252288000000000000 +road name="Mohr Dr ",thepath="[(-122.1132,37.466),(-122.113,37.46)]" 252374400000000000 +road name="Molaka Cir ",thepath="[(-122.0476,37.863),(-122.0479,37.871)]" 252460800000000000 +road name="Monaco Ave ",thepath="[(-122.0024,37.966),(-122.0023,37.967)]" 252547200000000000 +road name="Monaco Ct ",thepath="[(-121.8762,37.544),(-121.8766,37.538)]" 252633600000000000 +road name="Monika Lane",thepath="[(-122.051987,37.88553),(-122.052536,37.88171)]" 252720000000000000 +road name="Montcalm Ave ",thepath="[(-122.0394,37.373),(-122.04,37.369)]" 252806400000000000 +road name="Monte Vista Dr ",thepath="[(-122.1127,37.4),(-122.1126,37.388)]" 252892800000000000 +road name="Montecito Ave ",thepath="[(-122.2602,37.114),(-122.2589,37.122)]" 252979200000000000 +road name="Montecito Cir ",thepath="[(-121.789,37.97),(-121.7883,37.967),(-121.7867,37.962)]" 253065600000000000 +road name="Montecito Cir ",thepath="[(-121.789,37.97),(-121.78927,37.9709)]" 253152000000000000 +road name="Montecito Dr ",thepath="[(-121.9899,37.743),(-121.9892,37.762)]" 253238400000000000 +road name="Montego Bay ",thepath="[(-122.2491,37.389),(-122.2485,37.396)]" 253324800000000000 +road name="Monterey Ave ",thepath="[(-122.2793,37.863),(-122.2799,37.857)]" 253411200000000000 +road name="Monterey Blvd",thepath="[(-122.1494,37.018),(-122.1486,37.013)]" 253497600000000000 +road name="Monterey Blvd",thepath="[(-122.189,37.987),(-122.1891,37.971)]" 253584000000000000 +road name="Monterey Blvd",thepath="[(-122.1931,37.068),(-122.1918,37.051)]" 253670400000000000 +road name="Monterey Blvd",thepath="[(-122.1971,37.103),(-122.1961,37.096)]" 253756800000000000 +road name="Monterey Blvd",thepath="[(-122.2029,37.167),(-122.2012,37.146)]" 253843200000000000 +road name="Monterey Dr ",thepath="[(-121.909595,37.12732),(-121.910168,37.15444)]" 253929600000000000 +road name="Montgomery Ave ",thepath="[(-122.0971,37.824),(-122.0955,37.811)]" 254016000000000000 +road name="Montgomery Ave ",thepath="[(-122.0989,37.838),(-122.0977,37.829)]" 254102400000000000 +road name="Montgomery St ",thepath="[(-122.0882,37.738),(-122.0875,37.727)]" 254188800000000000 +road name="Montgomery St ",thepath="[(-122.2489,37.316),(-122.2471,37.33)]" 254275200000000000 +road name="Montgomery St ",thepath="[(-122.2518,37.292),(-122.2504,37.305)]" 254361600000000000 +road name="Monticello Ave ",thepath="[(-122.2,37.771),(-122.199,37.778)]" 254448000000000000 +road name="Monticello St ",thepath="[(-122.0561,37.37),(-122.0554,37.374)]" 254534400000000000 +road name="Mooney Ave ",thepath="[(-122.1234,37.972),(-122.1234,37.978)]" 254620800000000000 +road name="Moonflower Way ",thepath="[(-121.7297,37.075),(-121.7322,37.071)]" 254707200000000000 +road name="Moore Dr ",thepath="[(-122.1901,37.335),(-122.1884,37.351)]" 254793600000000000 +road name="Moores Ave ",thepath="[(-122.0087,37.301),(-122.0094,37.292)]" 254880000000000000 +road name="Moores Ave ",thepath="[(-122.0098,37.287),(-122.0102,37.281)]" 254966400000000000 +road name="Moores Ave ",thepath="[(-122.0138,37.237),(-122.014,37.233)]" 255052800000000000 +road name="Morada Ct ",thepath="[(-121.93541,37.49248),(-121.935229,37.49155)]" 255139200000000000 +road name="Moraga Ave ",thepath="[(-122.2096,37.265),(-122.2088,37.254)]" 255225600000000000 +road name="Moraga Ave ",thepath="[(-122.225,37.3),(-122.2243,37.3)]" 255312000000000000 +road name="Moraga Ave ",thepath="[(-122.2447,37.288),(-122.2423,37.302)]" 255398400000000000 +road name="Moraga Dr ",thepath="[(-121.7915,37.701),(-121.7906,37.705)]" 255484800000000000 +road name="Morcom Pl ",thepath="[(-122.1901,37.826),(-122.1897,37.829)]" 255571200000000000 +road name="Moreland Dr ",thepath="[(-122.0802,37.11),(-122.0793,37.109)]" 255657600000000000 +road name="Morengo Way ",thepath="[(-121.9209,37.837),(-121.9203,37.84)]" 255744000000000000 +road name="Mound St ",thepath="[(-122.2346,37.582),(-122.2339,37.588)]" 255830400000000000 +road name="Mound St ",thepath="[(-122.2402,37.531),(-122.2395,37.537)]" 255916800000000000 +road name="Mount Hamilton Ct ",thepath="[(-122.030097,37.11348),(-122.030412,37.11049)]" 256003200000000000 +road name="Mountain Ave ",thepath="[(-122.2267,37.24),(-122.2261,37.231)]" 256089600000000000 +road name="Mountain Ave ",thepath="[(-122.2291,37.256),(-122.2288,37.257)]" 256176000000000000 +road name="Mountain Blvd",thepath="[(-122.151,37.659),(-122.1484,37.64)]" 256262400000000000 +road name="Mountain Blvd",thepath="[(-122.1535,37.702),(-122.153,37.696)]" 256348800000000000 +road name="Mountain Blvd",thepath="[(-122.1765,37.857),(-122.177,37.85)]" 256435200000000000 +road name="Mountain Blvd",thepath="[(-122.1774,37.889),(-122.1771,37.887)]" 256521600000000000 +road name="Mountain Blvd",thepath="[(-122.1789,37.934),(-122.1787,37.93)]" 256608000000000000 +road name="Mountain Blvd",thepath="[(-122.2013,37.164),(-122.2004,37.15)]" 256694400000000000 +road name="Mountain Blvd",thepath="[(-122.2085,37.261),(-122.2088,37.254)]" 256780800000000000 +road name="Mountain Blvd",thepath="[(-122.211,37.308),(-122.2102,37.297)]" 256867200000000000 +road name="Mountain Blvd",thepath="[(-122.222,37.435),(-122.2204,37.436)]" 256953600000000000 +road name="Mountain Blvd",thepath="[(-122.2261,37.465),(-122.2241,37.451)]" 257040000000000000 +road name="Mountaingate Way ",thepath="[(-122.1999,37.198),(-122.1994,37.193)]" 257126400000000000 +road name="Mowry Ave ",thepath="[(-121.9745,37.659),(-121.975803,37.65155)]" 257212800000000000 +road name="Mowry Ave ",thepath="[(-121.976381,37.64822),(-121.9769,37.646)]" 257299200000000000 +road name="Mowry Ave ",thepath="[(-121.9807,37.567),(-121.9809,37.565)]" 257385600000000000 +road name="Mowry Ave ",thepath="[(-121.9825,37.547),(-121.9838,37.532)]" 257472000000000000 +road name="Mowry Ave ",thepath="[(-121.9896,37.459),(-121.9904,37.449)]" 257558400000000000 +road name="Mowry Ave ",thepath="[(-122.0074,37.245),(-122.008,37.236)]" 257644800000000000 +road name="Mowry Ave ",thepath="[(-122.0113,37.158),(-122.0129,37.124)]" 257731200000000000 +road name="Mowry Slough ",thepath="[(-122.0393,37.918),(-122.0552,37.908)]" 257817600000000000 +road name="Msn Creek Dr ",thepath="[(-121.9354,37.428),(-121.9344,37.427)]" 257904000000000000 +road name="Mtn House road",thepath="[(-121.576862,37.78355),(-121.576389,37.80422)]" 257990400000000000 +road name="Mtn House road",thepath="[(-121.579578,37.73807),(-121.578037,37.75356)]" 258076800000000000 +road name="Mtn House Creek ",thepath="[(-121.558979,37.69672),(-121.558765,37.69123),(-121.564396,37.65095)]" 258163200000000000 +road name="Mtn House Creek ",thepath="[(-121.570759,37.60189),(-121.566196,37.63889)]" 258249600000000000 +road name="Mtn House Creek ",thepath="[(-121.577,37.50431),(-121.578144,37.49554)]" 258336000000000000 +road name="Muir St ",thepath="[(-122.0761,37.529),(-122.0756,37.524)]" 258422400000000000 +road name="Muir St ",thepath="[(-122.0787,37.562),(-122.0779,37.553)]" 258508800000000000 +road name="Muirwood Dr ",thepath="[(-121.9162,37.824),(-121.9168,37.831)]" 258595200000000000 +road name="Mulberry Pl ",thepath="[(-121.9221,37.234),(-121.9225,37.232)]" 258681600000000000 +road name="Mulberry Pl ",thepath="[(-121.9238,37.249),(-121.9249,37.261)]" 258768000000000000 +road name="Mulberry St ",thepath="[(-122.0363,37.332),(-122.034,37.32)]" 258854400000000000 +road name="Murcia St ",thepath="[(-122.076,37.235),(-122.0758,37.23)]" 258940800000000000 +road name="Murdell Lane",thepath="[(-121.7977,37.619),(-121.797719,37.60774)]" 259027200000000000 +road name="Murdell Lane",thepath="[(-121.8001,37.746),(-121.7998,37.741)]" 259113600000000000 +road name="Murdock Ct ",thepath="[(-122.1828,37.753),(-122.1832,37.756)]" 259200000000000000 +road name="Murray St ",thepath="[(-122.2885,37.513),(-122.288,37.514)]" 259286400000000000 +road name="Murrieta Blvd",thepath="[(-121.7825,37.758),(-121.7816,37.758)]" 259372800000000000 +road name="Murrieta Blvd",thepath="[(-121.7847,37.94),(-121.7842,37.942)]" 259459200000000000 +road name="Murrieta Blvd",thepath="[(-121.7864,37.791),(-121.7866,37.797)]" 259545600000000000 +road name="Murrieta Blvd",thepath="[(-121.7865,37.934),(-121.7858,37.936)]" 259632000000000000 +road name="Murrieta Blvd",thepath="[(-121.788409,37.80906),(-121.7885,37.815)]" 259718400000000000 +road name="Myers St ",thepath="[(-122.1511,37.423),(-122.151,37.415)]" 259804800000000000 +road name="Myra Ct ",thepath="[(-122.108083,37.47375),(-122.108278,37.47677)]" 259891200000000000 +road name="Myrtle St ",thepath="[(-122.0924,37.685),(-122.0919,37.676)]" 259977600000000000 +road name="Myrtle St ",thepath="[(-122.2812,37.092),(-122.2805,37.108)]" 260064000000000000 +road name="N St ",thepath="[(-121.7737,37.824),(-121.7739,37.829)]" 260150400000000000 +road name="Nandina Ct ",thepath="[(-121.9274,37.299),(-121.9281,37.297)]" 260236800000000000 +road name="Nansa Ct ",thepath="[(-121.9188,37.259),(-121.918711,37.25453)]" 260323200000000000 +road name="Natalie Ave ",thepath="[(-121.9792,37.307),(-121.9799,37.296)]" 260409600000000000 +road name="National Ave ",thepath="[(-122.1192,37.5),(-122.1281,37.489)]" 260496000000000000 +road name="Navajo Ct ",thepath="[(-121.8779,37.901),(-121.8783,37.9)]" 260582400000000000 +road name="Navy roadway ",thepath="[(-122.3093,37.092),(-122.3123,37.109)]" 260668800000000000 +road name="Neal St ",thepath="[(-121.8692,37.577),(-121.8683,37.574)]" 260755200000000000 +road name="Nelson Ct ",thepath="[(-121.864163,37.4684),(-121.86436,37.4745)]" 260841600000000000 +road name="Nelson Pl ",thepath="[(-122.0366,37.522),(-122.0368,37.519)]" 260928000000000000 +road name="Nelson St ",thepath="[(-121.9822,37.362),(-121.9846,37.348)]" 261014400000000000 +road name="Neptune Dr ",thepath="[(-122.1878,37.989),(-122.1853,37.958)]" 261100800000000000 +road name="Neptune Dr ",thepath="[(-122.1881,37.032),(-122.1875,37.007)]" 261187200000000000 +road name="Neptune road",thepath="[(-121.7885,37.607),(-121.7885,37.599)]" 261273600000000000 +road name="Nevada St ",thepath="[(-122.0313,37.891),(-122.0317,37.882)]" 261360000000000000 +road name="Nevada St ",thepath="[(-122.1821,37.37),(-122.1815,37.376)]" 261446400000000000 +road name="New England Village Dr ",thepath="[(-122.058,37.237),(-122.0585,37.235)]" 261532800000000000 +road name="Newark Blvd",thepath="[(-122.0329,37.398),(-122.032,37.382)]" 261619200000000000 +road name="Newark Blvd",thepath="[(-122.0352,37.438),(-122.0341,37.423)]" 261705600000000000 +road name="Newberry St ",thepath="[(-122.2671,37.568),(-122.2668,37.554)]" 261792000000000000 +road name="Newcastle Lane",thepath="[(-121.918,37.167),(-121.9191,37.182)]" 261878400000000000 +road name="Newport St ",thepath="[(-122.1059,37.328),(-122.1054,37.315)]" 261964800000000000 +road name="Nicol Ave ",thepath="[(-122.2174,37.943),(-122.2164,37.94)]" 262051200000000000 +road name="Nicolet Ave ",thepath="[(-122.0174,37.696),(-122.0183,37.693)]" 262137600000000000 +road name="Nicolet Ave ",thepath="[(-122.0238,37.615),(-122.0238,37.61)]" 262224000000000000 +road name="Nicolet Ave ",thepath="[(-122.0264,37.574),(-122.0269,37.567)]" 262310400000000000 +road name="Nicolet Ct ",thepath="[(-122.0242,37.641),(-122.0236,37.638)]" 262396800000000000 +road name="Nielsen Lane",thepath="[(-121.744,37.777),(-121.744,37.77)]" 262483200000000000 +road name="Niles Blvd",thepath="[(-121.9933,37.803),(-121.9929,37.803)]" 262569600000000000 +road name="Niles Canyon road",thepath="[(-121.881448,37.92865),(-121.8812,37.929)]" 262656000000000000 +road name="Niles Canyon road",thepath="[(-121.8954,37.94),(-121.89496,37.93963)]" 262742400000000000 +road name="Niles Canyon road",thepath="[(-121.909,37.94),(-121.9034,37.957)]" 262828800000000000 +road name="Niles Canyon road",thepath="[(-121.9292,37.955),(-121.925931,37.9815)]" 262915200000000000 +road name="Niles Canyon road",thepath="[(-121.9333,37.913),(-121.9317,37.919)]" 263001600000000000 +road name="Niles Canyon road",thepath="[(-121.9352,37.912),(-121.9346,37.91)]" 263088000000000000 +road name="Nobhill Ct ",thepath="[(-122.0354,37.523),(-122.0353,37.517)]" 263174400000000000 +road name="Norbridge Ave ",thepath="[(-122.084,37.911),(-122.0829,37.911)]" 263260800000000000 +road name="Norene Way ",thepath="[(-122.1365,37.286),(-122.136,37.287)]" 263347200000000000 +road name="Norfolk road",thepath="[(-122.2936,37.877),(-122.2937,37.859)]" 263433600000000000 +road name="Norfolk road",thepath="[(-122.2937,37.848),(-122.2941,37.845)]" 263520000000000000 +road name="Noria Ct ",thepath="[(-121.9319,37.288),(-121.9324,37.286)]" 263606400000000000 +road name="Norissa Cir ",thepath="[(-122.0486,37.763),(-122.0484,37.77)]" 263692800000000000 +road name="Normandie Ave ",thepath="[(-122.1902,37.783),(-122.1886,37.768)]" 263779200000000000 +road name="Normandy Ct ",thepath="[(-122.0629,37.971),(-122.063,37.968)]" 263865600000000000 +road name="Normandy Dr ",thepath="[(-122.0501,37.457),(-122.0506,37.451)]" 263952000000000000 +road name="Norris Canyon road",thepath="[(-122.015,37.545),(-122.0103,37.541)]" 264038400000000000 +road name="Norris Canyon road",thepath="[(-122.0329,37.332),(-122.0278,37.371)]" 264124800000000000 +road name="North Blvd",thepath="[(-122.1768,37.243),(-122.1775,37.242)]" 264211200000000000 +road name="North Hill Ct ",thepath="[(-122.231,37.533),(-122.2325,37.541)]" 264297600000000000 +road name="Northland Ter ",thepath="[(-122.059106,37.55559),(-122.05922,37.55498)]" 264384000000000000 +road name="Northrup St ",thepath="[(-122.2141,37.371),(-122.215,37.381)]" 264470400000000000 +road name="Northvale road",thepath="[(-122.2361,37.088),(-122.2335,37.083)]" 264556800000000000 +road name="Northview Dr ",thepath="[(-122.0504,37.887),(-122.0511,37.892)]" 264643200000000000 +road name="Northway road",thepath="[(-121.8857,37.748),(-121.8871,37.75)]" 264729600000000000 +road name="Northwood Dr ",thepath="[(-122.2299,37.64),(-122.2291,37.638)]" 264816000000000000 +road name="Northwood Dr ",thepath="[(-122.2317,37.629),(-122.2311,37.637)]" 264902400000000000 +road name="Northwood Com ",thepath="[(-121.7885,37.815),(-121.788231,37.80962)]" 264988800000000000 +road name="Norton Ave ",thepath="[(-122.1977,37.967),(-122.196855,37.97165)]" 265075200000000000 +road name="Norwood Pl ",thepath="[(-121.7807,37.534),(-121.7811,37.534)]" 265161600000000000 +road name="Nottingham Ct ",thepath="[(-122.0297,37.528),(-122.0303,37.522)]" 265248000000000000 +road name="Nova Dr ",thepath="[(-122.2397,37.213),(-122.2394,37.214)]" 265334400000000000 +road name="Novara road",thepath="[(-122.2377,37.47),(-122.2368,37.472)]" 265420800000000000 +road name="Novato St ",thepath="[(-122.0628,37.731),(-122.0633,37.723)]" 265507200000000000 +road name="Nula Way ",thepath="[(-122.0553,37.865),(-122.0552,37.855)]" 265593600000000000 +road name="Nursery Ave ",thepath="[(-121.9897,37.802),(-121.9901,37.795)]" 265680000000000000 +road name="O Connell Lane",thepath="[(-121.9941,37.985),(-121.9917,37.974)]" 265766400000000000 +road name="O Connell Lane",thepath="[(-122.00235,37.9875),(-121.9964,37.995)]" 265852800000000000 +road name="O Connell Lane",thepath="[(-122.0038,37.972),(-122.0036,37.975)]" 265939200000000000 +road name="Oak St ",thepath="[(-122.2383,37.713),(-122.238,37.719)]" 266025600000000000 +road name="Oak St ",thepath="[(-122.2437,37.636),(-122.2431,37.644)]" 266112000000000000 +road name="Oak St ",thepath="[(-122.265,37.877),(-122.264,37.879)]" 266198400000000000 +road name="Oak St ",thepath="[(-122.2653,37.967),(-122.2649,37.974)]" 266284800000000000 +road name="Oak St ",thepath="[(-122.2666,37.947),(-122.2664,37.95)]" 266371200000000000 +road name="Oak Creek Ct ",thepath="[(-121.9153,37.737),(-121.9171,37.735)]" 266457600000000000 +road name="Oak Hill road",thepath="[(-122.1409,37.647),(-122.1382,37.658)]" 266544000000000000 +road name="Oak Knoll Blvd",thepath="[(-122.151,37.559),(-122.1504,37.556)]" 266630400000000000 +road name="Oakbrook Ct ",thepath="[(-121.865488,37.96653),(-121.8661,37.965)]" 266716800000000000 +road name="Oakdale St ",thepath="[(-122.0648,37.767),(-122.0654,37.761)]" 266803200000000000 +road name="Oakes Blvd",thepath="[(-122.1523,37.316),(-122.1511,37.318)]" 266889600000000000 +road name="Oakes Dr ",thepath="[(-122.034734,37.62423),(-122.0329,37.618)]" 266976000000000000 +road name="Oakland Ave ",thepath="[(-121.8703,37.85305),(-121.8703,37.866)]" 267062400000000000 +road name="Oakland Ave ",thepath="[(-122.2332,37.258),(-122.2319,37.262)]" 267148800000000000 +road name="Oakland Ave ",thepath="[(-122.24,37.235),(-122.2393,37.237),(-122.2387,37.24)]" 267235200000000000 +road name="Oakland Ave ",thepath="[(-122.2529,37.197),(-122.2521,37.203)]" 267321600000000000 +road name="Oakland Ave ",thepath="[(-122.2583,37.162),(-122.2569,37.167)]" 267408000000000000 +road name="Oakland Inner Harbor ",thepath="[(-122.2625,37.913),(-122.260016,37.89484)]" 267494400000000000 +road name="Oakmont Ave ",thepath="[(-122.231698,37.17113),(-122.2321,37.168)]" 267580800000000000 +road name="Oakport St ",thepath="[(-122.1975,37.422),(-122.1963,37.386)]" 267667200000000000 +road name="Oakport St ",thepath="[(-122.2123,37.59),(-122.2117,37.585)]" 267753600000000000 +road name="Oakridge road",thepath="[(-121.7646,37.841),(-121.768787,37.84142)]" 267840000000000000 +road name="Oakridge road",thepath="[(-121.8182,37.93),(-121.8207,37.931)]" 267926400000000000 +road name="Oakridge road",thepath="[(-121.8316,37.049),(-121.828382,37)]" 268012800000000000 +road name="Oakview Dr ",thepath="[(-122.2079,37.123),(-122.2074,37.116)]" 268099200000000000 +road name="Oakwood Dr ",thepath="[(-122.1989,37.424),(-122.198,37.437)]" 268185600000000000 +road name="Ocaso Camino ",thepath="[(-121.9293,37.261),(-121.9303,37.252)]" 268272000000000000 +road name="Occidental road",thepath="[(-122.1102,37.403),(-122.110496,37.40277)]" 268358400000000000 +road name="Ocie Way ",thepath="[(-122.0966,37.605),(-122.097,37.603)]" 268444800000000000 +road name="Octavia St ",thepath="[(-122.2026,37.906),(-122.2013,37.906)]" 268531200000000000 +road name="Ogden Dr ",thepath="[(-121.978963,37.36863),(-121.9808,37.368)]" 268617600000000000 +road name="Olazaba Ter ",thepath="[(-121.9176,37.247),(-121.917664,37.24323)]" 268704000000000000 +road name="Old Bernal Ave ",thepath="[(-121.879084,37.58027),(-121.878944,37.57993)]" 268790400000000000 +road name="Old Canyon road",thepath="[(-121.965,37.794),(-121.963,37.8)]" 268876800000000000 +road name="Old Santa Rita road",thepath="[(-121.877505,37.9429),(-121.8776,37.96)]" 268963200000000000 +road name="Old Tower road",thepath="[(-121.7722,37.729),(-121.7704,37.729)]" 269049600000000000 +road name="Old Warm Springs Blvd",thepath="[(-121.9482,37.092),(-121.9473,37.084)]" 269136000000000000 +road name="Oleander Ave ",thepath="[(-122.2338,37.296),(-122.2346,37.295)]" 269222400000000000 +road name="Oleander Ave ",thepath="[(-122.2358,37.302),(-122.236192,37.30424)]" 269308800000000000 +road name="Oleander St ",thepath="[(-121.7471,37.126),(-121.7459,37.129)]" 269395200000000000 +road name="Olive Ave ",thepath="[(-121.9326,37.36),(-121.9333,37.356)]" 269481600000000000 +road name="Olive Ave ",thepath="[(-121.9458,37.34),(-121.9493,37.337)]" 269568000000000000 +road name="Olive Ave ",thepath="[(-122.2462,37.219),(-122.2451,37.202)]" 269654400000000000 +road name="Oliver Way ",thepath="[(-121.9665,37.739),(-121.966295,37.73644)]" 269740800000000000 +road name="Olivina Ave ",thepath="[(-121.7791,37.829),(-121.7787,37.829)]" 269827200000000000 +road name="Olympic Ct ",thepath="[(-122.0509,37.321),(-122.0518,37.31)]" 269913600000000000 +road name="Olympus Ave ",thepath="[(-122.2512,37.834),(-122.2502,37.818)]" 270000000000000000 +road name="Omak St ",thepath="[(-121.9209,37.064),(-121.9209,37.071)]" 270086400000000000 +road name="Omar St ",thepath="[(-121.9719,37.221),(-121.9724,37.222)]" 270172800000000000 +road name="Omar St ",thepath="[(-121.9825,37.255),(-121.9831,37.259)]" 270259200000000000 +road name="Omega Ave ",thepath="[(-122.0678,37.988),(-122.0664,37.989)]" 270345600000000000 +road name="Oneil Ave ",thepath="[(-122.073989,37.5886),(-122.073631,37.58413)]" 270432000000000000 +road name="Oneil Ave ",thepath="[(-122.076754,37.62476),(-122.0745,37.595)]" 270518400000000000 +road name="Onondaga Dr ",thepath="[(-121.9288,37.054),(-121.9282,37.048)]" 270604800000000000 +road name="Onondaga Dr ",thepath="[(-121.9312,37.054),(-121.93,37.058)]" 270691200000000000 +road name="Opal Way ",thepath="[(-121.7984,37.679),(-121.7975,37.679)]" 270777600000000000 +road name="Orange Ave ",thepath="[(-122.0787,37.867),(-122.0789,37.842)]" 270864000000000000 +road name="Orchard Ave ",thepath="[(-122.0858,37.555),(-122.0833,37.551)]" 270950400000000000 +road name="Orchard Lane",thepath="[(-122.2475,37.694),(-122.2467,37.692)]" 271036800000000000 +road name="Orchid Dr ",thepath="[(-122.1416,37.098),(-122.1397,37.085)]" 271123200000000000 +road name="Oregon St ",thepath="[(-122.2589,37.588),(-122.2565,37.591)]" 271209600000000000 +road name="Oregon St ",thepath="[(-122.2794,37.561),(-122.2789,37.562)]" 271296000000000000 +road name="Orin Dr ",thepath="[(-122.2623,37.133),(-122.2626,37.142)]" 271382400000000000 +road name="Oriole Ave ",thepath="[(-121.7879,37.827),(-121.7879,37.851)]" 271468800000000000 +road name="Oriole Ave ",thepath="[(-122.1209,37.051),(-122.1205,37.071)]" 271555200000000000 +road name="Orleans Dr ",thepath="[(-122.046,37.393),(-122.0464,37.383)]" 271641600000000000 +road name="Orleans Dr ",thepath="[(-122.0473,37.438),(-122.0463,37.412)]" 271728000000000000 +road name="Orloff Dr ",thepath="[(-121.8659,37.767),(-121.865,37.765)]" 271814400000000000 +road name="Orloff Dr ",thepath="[(-121.8677,37.768),(-121.8669,37.768)]" 271900800000000000 +road name="Osgood road",thepath="[(-121.9371,37.071),(-121.9363,37.06)]" 271987200000000000 +road name="Osgood road",thepath="[(-121.949,37.262),(-121.946,37.208)]" 272073600000000000 +road name="Ostrander road",thepath="[(-122.2364,37.413),(-122.2356,37.429)]" 272160000000000000 +road name="Otis Dr ",thepath="[(-122.2564,37.619),(-122.256,37.618)]" 272246400000000000 +road name="Otis Dr ",thepath="[(-122.2605,37.627),(-122.2593,37.625)]" 272332800000000000 +road name="Outlook Ave ",thepath="[(-122.1616,37.636),(-122.1612,37.632)]" 272419200000000000 +road name="Outlook Ave ",thepath="[(-122.168,37.698),(-122.1678,37.697)]" 272505600000000000 +road name="Outlook Ave ",thepath="[(-122.1743,37.75),(-122.1736,37.746)]" 272592000000000000 +road name="Outlook Ave ",thepath="[(-122.1789,37.788),(-122.1786,37.787)]" 272678400000000000 +road name="Outrigger Dr ",thepath="[(-122.1802,37.95),(-122.178449,37.9197)]" 272764800000000000 +road name="Overacker Ave ",thepath="[(-121.9617,37.652),(-121.9614,37.648),(-121.9607,37.643)]" 272851200000000000 +road name="Owl Ct ",thepath="[(-121.91654,37.19636),(-121.915693,37.19031)]" 272937600000000000 +road name="Oxford Pl ",thepath="[(-121.7752,37.532),(-121.7747,37.535)]" 273024000000000000 +road name="Oxford St ",thepath="[(-122.2651,37.702),(-122.2651,37.699)]" 273110400000000000 +road name="Oxford St ",thepath="[(-122.2657,37.742),(-122.2656,37.734)]" 273196800000000000 +road name="Oyster Pond road",thepath="[(-122.2408,37.407),(-122.2404,37.403)]" 273283200000000000 +road name="Oyster Shoals ",thepath="[(-122.2372,37.394),(-122.2365,37.393)]" 273369600000000000 +road name="Pacific Ave ",thepath="[(-121.754552,37.76177),(-121.753824,37.76164)]" 273456000000000000 +road name="Pacific Ave ",thepath="[(-122.1632,37.171),(-122.1621,37.156),(-122.1613,37.15)]" 273542400000000000 +road name="Pacific Ave ",thepath="[(-122.1661,37.214),(-122.1654,37.204)]" 273628800000000000 +road name="Pacific Ave ",thepath="[(-122.2419,37.683),(-122.2408,37.678)]" 273715200000000000 +road name="Pacific Ave ",thepath="[(-122.2535,37.735),(-122.2527,37.731)]" 273801600000000000 +road name="Pacific St ",thepath="[(-122.0342,37.962),(-122.0371,37.962)]" 273888000000000000 +road name="Pacific St ",thepath="[(-122.0544,37.294),(-122.0548,37.297)]" 273974400000000000 +road name="Packet Landing road",thepath="[(-122.2376,37.471),(-122.2372,37.458)]" 274060800000000000 +road name="Pagano Ct ",thepath="[(-122.1371,37.959),(-122.1379,37.954)]" 274147200000000000 +road name="Pala Ave ",thepath="[(-122.2328,37.28),(-122.2319,37.283)]" 274233600000000000 +road name="Palatka Lane",thepath="[(-122.0915,37.35),(-122.0927,37.354)]" 274320000000000000 +road name="Palm Ave ",thepath="[(-121.932,37.329),(-121.9319,37.319)]" 274406400000000000 +road name="Palm Dr ",thepath="[(-122.0503,37.898),(-122.0501,37.897)]" 274492800000000000 +road name="Palm Dr ",thepath="[(-122.052051,37.88751),(-122.0519,37.885)]" 274579200000000000 +road name="Palmer Dr ",thepath="[(-121.86601,37.85873),(-121.865793,37.84778)]" 274665600000000000 +road name="Palmer Dr ",thepath="[(-122.003005,37.52852),(-122.0026,37.527)]" 274752000000000000 +road name="Palmetto Dr ",thepath="[(-122.0189,37.111),(-122.018,37.106)]" 274838400000000000 +road name="Palo Verde road",thepath="[(-122.0242,37.959),(-122.023,37.955),(-122.0222,37.961)]" 274924800000000000 +road name="Paloma Ave ",thepath="[(-122.2347,37.126),(-122.2353,37.136)]" 275011200000000000 +road name="Palomares road",thepath="[(-121.9404,37.123),(-121.9407,37.11)]" 275097600000000000 +road name="Palomares road",thepath="[(-121.9501,37.318),(-121.948,37.304)]" 275184000000000000 +road name="Palomares road",thepath="[(-121.9683,37.439),(-121.9686,37.436)]" 275270400000000000 +road name="Palomares road",thepath="[(-121.9976,37.676),(-121.997,37.674)]" 275356800000000000 +road name="Palomares road",thepath="[(-122.0191,37.873),(-122.0056,37.744)]" 275443200000000000 +road name="Palomino Dr ",thepath="[(-121.8536,37.59),(-121.852,37.589)]" 275529600000000000 +road name="Pampas Ave ",thepath="[(-122.188335,37.87635),(-122.1878,37.872)]" 275616000000000000 +road name="Panda Way ",thepath="[(-122.0668,37.773),(-122.0662,37.762)]" 275702400000000000 +road name="Panitz St ",thepath="[(-122.0553,37.686),(-122.0553,37.679)]" 275788800000000000 +road name="Panorama Trl ",thepath="[(-121.8996,37.291),(-121.9098,37.262)]" 275875200000000000 +road name="Panorama Trl ",thepath="[(-121.9023,37.342),(-121.8995,37.303)]" 275961600000000000 +road name="Panorama Trl ",thepath="[(-121.9096,37.37),(-121.9098,37.371)]" 276048000000000000 +road name="Panorama Trl ",thepath="[(-121.9148,37.366),(-121.9141,37.356)]" 276134400000000000 +road name="Panoramic Way ",thepath="[(-122.2454,37.695),(-122.2436,37.688)]" 276220800000000000 +road name="Papago St ",thepath="[(-121.9155,37.826),(-121.9147,37.811)]" 276307200000000000 +road name="Parada St ",thepath="[(-121.9949,37.166),(-121.9931,37.153)]" 276393600000000000 +road name="Pardee Ave ",thepath="[(-121.9885,37.367),(-121.9893,37.359)]" 276480000000000000 +road name="Pardee Dr ",thepath="[(-122.1991,37.286),(-122.1974,37.27)]" 276566400000000000 +road name="Parish Ct ",thepath="[(-122.236048,37.33387),(-122.235406,37.3307)]" 276652800000000000 +road name="Park Ave ",thepath="[(-122.2407,37.634),(-122.2404,37.638)]" 276739200000000000 +road name="Park Ave ",thepath="[(-122.242,37.616),(-122.2416,37.621)]" 276825600000000000 +road name="Park Ave ",thepath="[(-122.2461,37.565),(-122.2443,37.589)]" 276912000000000000 +road name="Park Ave ",thepath="[(-122.2841,37.316),(-122.2851,37.314)]" 276998400000000000 +road name="Park Blvd",thepath="[(-122.2058,37.222),(-122.2047,37.23)]" 277084800000000000 +road name="Park Blvd",thepath="[(-122.218,37.087),(-122.2173,37.091)]" 277171200000000000 +road name="Park Blvd",thepath="[(-122.2312,37.051),(-122.2303,37.049)]" 277257600000000000 +road name="Park Blvd",thepath="[(-122.2387,37.027),(-122.2377,37.028),(-122.2362,37.031)]" 277344000000000000 +road name="Park Blvd",thepath="[(-122.2461,37.013),(-122.2457,37.013)]" 277430400000000000 +road name="Park Lane",thepath="[(-122.2309,37.163),(-122.2313,37.166)]" 277516800000000000 +road name="Park St ",thepath="[(-121.7711,37.86),(-121.7699,37.863)]" 277603200000000000 +road name="Park St ",thepath="[(-122.2377,37.686),(-122.237,37.695)]" 277689600000000000 +road name="Park St ",thepath="[(-122.2491,37.541),(-122.247562,37.56407)]" 277776000000000000 +road name="Park St ",thepath="[(-122.2825,37.544),(-122.282424,37.5421)]" 277862400000000000 +road name="Park Way ",thepath="[(-122.0875,37.97),(-122.087418,37.96824)]" 277948800000000000 +road name="Park Way ",thepath="[(-122.2339,37.288),(-122.2332,37.288)]" 278035200000000000 +road name="Park Way ",thepath="[(-122.2366,37.289),(-122.2357,37.288)]" 278121600000000000 +road name="Park Way ",thepath="[(-122.3038,37.798),(-122.3031,37.8)]" 278208000000000000 +road name="Park Blvd Way ",thepath="[(-122.2303,37.049),(-122.2287,37.049)]" 278294400000000000 +road name="Park Center Lane",thepath="[(-121.9793,37.431),(-121.9798,37.425)]" 278380800000000000 +road name="Parker Ave ",thepath="[(-122.1647,37.685),(-122.1643,37.686)]" 278467200000000000 +road name="Parker road",thepath="[(-122.0876,37.181),(-122.0859,37.17)]" 278553600000000000 +road name="Parker St ",thepath="[(-122.2664,37.623),(-122.2643,37.626)]" 278640000000000000 +road name="Parkmeadow Dr ",thepath="[(-121.9319,37.062),(-121.9322,37.066)]" 278726400000000000 +road name="Parkmeadow Dr ",thepath="[(-121.9324,37.099),(-121.9317,37.104)]" 278812800000000000 +road name="Parkridge Dr ",thepath="[(-122.1438,37.884),(-122.1428,37.9)]" 278899200000000000 +road name="Parkside Dr ",thepath="[(-121.886474,37.83325),(-121.8863,37.834)]" 278985600000000000 +road name="Parkside Dr ",thepath="[(-121.8925,37.806),(-121.8916,37.809)]" 279072000000000000 +road name="Parkside Dr ",thepath="[(-121.895065,37.79588),(-121.8949,37.797)]" 279158400000000000 +road name="Parkside Dr ",thepath="[(-121.9836,37.598),(-121.9851,37.594),(-121.9861,37.592)]" 279244800000000000 +road name="Parkside Dr ",thepath="[(-122.0475,37.603),(-122.0443,37.596)]" 279331200000000000 +road name="Parkside Dr ",thepath="[(-122.0595,37.008),(-122.0592,37.012)]" 279417600000000000 +road name="Parkview road",thepath="[(-122.0548,37.023),(-122.0548,37.02)]" 279504000000000000 +road name="Parnassus road",thepath="[(-122.2525,37.814),(-122.2518,37.814)]" 279590400000000000 +road name="Parsons Ct ",thepath="[(-122.082,37.056),(-122.0812,37.053)]" 279676800000000000 +road name="Partridge Ave ",thepath="[(-122.1597,37.655),(-122.1584,37.652)]" 279763200000000000 +road name="Partridge Com ",thepath="[(-121.7876,37.877),(-121.7876,37.882)]" 279849600000000000 +road name="Paru St ",thepath="[(-122.2583,37.712),(-122.2574,37.725)]" 279936000000000000 +road name="Paru St ",thepath="[(-122.2601,37.687),(-122.2594,37.695)]" 280022400000000000 +road name="Pasatiempo St ",thepath="[(-121.7252,37.262),(-121.7252,37.27)]" 280108800000000000 +road name="Paseo del Cajon ",thepath="[(-121.8901,37.699),(-121.889101,37.68411)]" 280195200000000000 +road name="Paseo del Rio ",thepath="[(-122.1309,37.842),(-122.1332,37.836),(-122.134,37.835)]" 280281600000000000 +road name="Paseo Grande ",thepath="[(-122.1197,37.83),(-122.1204,37.826)]" 280368000000000000 +road name="Paseo Grande ",thepath="[(-122.1231,37.812),(-122.1234,37.809)]" 280454400000000000 +road name="Paseo Largavista ",thepath="[(-122.1287,37.822),(-122.1281,37.811)]" 280540800000000000 +road name="Paseo Padre Pkwy",thepath="[(-121.9143,37.005),(-121.913522,37)]" 280627200000000000 +road name="Paseo Padre Pkwy",thepath="[(-121.9188,37.004),(-121.9177,37.004)]" 280713600000000000 +road name="Paseo Padre Pkwy",thepath="[(-121.9292,37.083),(-121.9295,37.088)]" 280800000000000000 +road name="Paseo Padre Pkwy",thepath="[(-121.9302,37.137),(-121.9298,37.146)]" 280886400000000000 +road name="Paseo Padre Pkwy",thepath="[(-121.9357,37.342),(-121.9327,37.318)]" 280972800000000000 +road name="Paseo Padre Pkwy",thepath="[(-121.9594,37.433),(-121.9569,37.419)]" 281059200000000000 +road name="Paseo Padre Pkwy",thepath="[(-121.960768,37.44248),(-121.9599,37.437)]" 281145600000000000 +road name="Paseo Padre Pkwy",thepath="[(-121.9643,37.462),(-121.9618,37.449)]" 281232000000000000 +road name="Paseo Padre Pkwy",thepath="[(-121.9885,37.578),(-121.9877,37.574)]" 281318400000000000 +road name="Paseo Padre Pkwy",thepath="[(-122.0021,37.639),(-121.996,37.628)]" 281404800000000000 +road name="Paseo Padre Pkwy",thepath="[(-122.0332,37.819),(-122.0307,37.809)]" 281491200000000000 +road name="Paseo Padre Pkwy",thepath="[(-122.0414,37.734),(-122.0445,37.708)]" 281577600000000000 +road name="Paseo Padre Pkwy",thepath="[(-122.045898,37.70023),(-122.047,37.695)]" 281664000000000000 +road name="Paseo Padre Pkwy",thepath="[(-122.049,37.684),(-122.05,37.67999)]" 281750400000000000 +road name="Paseo Padre Pkwy",thepath="[(-122.051153,37.67586),(-122.0517,37.674)]" 281836800000000000 +road name="Paseo Santa Cruz ",thepath="[(-121.9052,37.65),(-121.904,37.65)]" 281923200000000000 +road name="Paseo Santa Cruz ",thepath="[(-121.906145,37.66172),(-121.905945,37.65817)]" 282009600000000000 +road name="Patterson Pass road",thepath="[(-121.556654,37.14753),(-121.556,37.148)]" 282096000000000000 +road name="Patterson Pass road",thepath="[(-121.574131,37.07538),(-121.573093,37.09003)]" 282182400000000000 +road name="Patterson Ranch road",thepath="[(-122.0702,37.545),(-122.0855,37.509),(-122.0902,37.515)]" 282268800000000000 +road name="Paxton Ct ",thepath="[(-122.0092,37.388),(-122.0101,37.378)]" 282355200000000000 +road name="Payne Ct ",thepath="[(-121.9133,37.841),(-121.9139,37.84)]" 282441600000000000 +road name="Peach Ct ",thepath="[(-122.0477,37.295),(-122.0473,37.293)]" 282528000000000000 +road name="Peach St ",thepath="[(-122.2339,37.527),(-122.2334,37.532),(-122.2328,37.537)]" 282614400000000000 +road name="Peach St ",thepath="[(-122.2352,37.502),(-122.2354,37.514)]" 282700800000000000 +road name="Peachtree Ave ",thepath="[(-122.0511,37.277),(-122.0517,37.275)]" 282787200000000000 +road name="Peachtree Dr ",thepath="[(-122.091,37.209),(-122.0913,37.199)]" 282873600000000000 +road name="Pearl St ",thepath="[(-122.2319,37.672),(-122.2316,37.676)]" 282960000000000000 +road name="Pearl St ",thepath="[(-122.2337,37.651),(-122.2329,37.661)]" 283046400000000000 +road name="Pearl St ",thepath="[(-122.2383,37.594),(-122.2366,37.615)]" 283132800000000000 +road name="Pearl St ",thepath="[(-122.2551,37.179),(-122.2546,37.174)]" 283219200000000000 +road name="Peary Ct ",thepath="[(-121.769,37.711),(-121.7686,37.706)]" 283305600000000000 +road name="Pecan Ct ",thepath="[(-121.9126,37.743),(-121.9142,37.739)]" 283392000000000000 +road name="Peladeau St ",thepath="[(-122.2888,37.383),(-122.2889,37.386)]" 283478400000000000 +road name="Pelican Ct ",thepath="[(-121.7907,37.839),(-121.7902,37.832)]" 283564800000000000 +road name="Penniman Ave ",thepath="[(-122.2018,37.863),(-122.2012,37.856)]" 283651200000000000 +road name="Pennsylvania Ave ",thepath="[(-121.9854,37.532),(-121.9862,37.523)]" 283737600000000000 +road name="Peony Ct ",thepath="[(-121.9798,37.204),(-121.9804,37.198)]" 283824000000000000 +road name="Pepperdine St ",thepath="[(-122.1501,37.989),(-122.1488,37.98)]" 283910400000000000 +road name="Peppertree Ct ",thepath="[(-121.9416,37.16),(-121.9412,37.163)]" 283996800000000000 +road name="Peppertree road",thepath="[(-121.9421,37.127),(-121.94222,37.1302)]" 284083200000000000 +road name="Peralta Ave ",thepath="[(-122.1585,37.293),(-122.1592,37.29)]" 284169600000000000 +road name="Peralta Ave ",thepath="[(-122.1639,37.267),(-122.1653,37.27)]" 284256000000000000 +road name="Peralta Blvd",thepath="[(-121.9856,37.63),(-121.9867,37.627)]" 284342400000000000 +road name="Peralta Blvd",thepath="[(-122.0022,37.595),(-122.0045,37.591)]" 284428800000000000 +road name="Peralta Blvd",thepath="[(-122.0073,37.573),(-122.0082,37.562)]" 284515200000000000 +road name="Peralta St ",thepath="[(-122.2832,37.243),(-122.2829,37.246)]" 284601600000000000 +road name="Peralta St ",thepath="[(-122.2933,37.113),(-122.2926,37.116)]" 284688000000000000 +road name="Peralta St ",thepath="[(-122.2943,37.103),(-122.2937,37.111)]" 284774400000000000 +road name="Peralta St ",thepath="[(-122.2974,37.061),(-122.2973,37.063)]" 284860800000000000 +road name="Peridot Dr ",thepath="[(-121.8024,37.648),(-121.8024,37.645)]" 284947200000000000 +road name="Periwinkle road",thepath="[(-122.0451,37.301),(-122.044758,37.29844)]" 285033600000000000 +road name="Perkins St ",thepath="[(-122.0185,37.617),(-122.0177,37.613)]" 285120000000000000 +road name="Perkins St ",thepath="[(-122.2553,37.105),(-122.2557,37.096)]" 285206400000000000 +road name="Perlata Creek ",thepath="[(-122.2027,37.941),(-122.2031,37.936)]" 285292800000000000 +road name="Perlata Creek ",thepath="[(-122.2059,37.92),(-122.2092,37.906)]" 285379200000000000 +road name="Perlata Creek ",thepath="[(-122.2133,37.891),(-122.214,37.885)]" 285465600000000000 +road name="Perlata Creek ",thepath="[(-122.2158,37.753),(-122.2155,37.739)]" 285552000000000000 +road name="Perlata Creek ",thepath="[(-122.21853,37.83163),(-122.2188,37.826)]" 285638400000000000 +road name="Perry road",thepath="[(-122.0265,37.846),(-122.0256,37.844)]" 285724800000000000 +road name="Pershing Dr ",thepath="[(-122.1618,37.278),(-122.1613,37.271),(-122.1609,37.266)]" 285811200000000000 +road name="Pershing Dr ",thepath="[(-122.1633,37.299),(-122.1628,37.291)]" 285897600000000000 +road name="Pershing Dr ",thepath="[(-122.165,37.321),(-122.1645,37.315)]" 285984000000000000 +road name="Pershing Dr ",thepath="[(-122.1662,37.339),(-122.1658,37.333)]" 286070400000000000 +road name="Pestana Pl ",thepath="[(-121.7578,37.84),(-121.757776,37.84644)]" 286156800000000000 +road name="Peterman Ave ",thepath="[(-122.0945,37.392),(-122.0918,37.421)]" 286243200000000000 +road name="Peters Ave ",thepath="[(-121.8769,37.6),(-121.8763,37.608)]" 286329600000000000 +road name="Peters St ",thepath="[(-122.1287,37.068),(-122.128,37.073)]" 286416000000000000 +road name="Peterson St ",thepath="[(-122.232,37.733),(-122.2316,37.739)]" 286502400000000000 +road name="Peterson Way ",thepath="[(-122.0967,37.162),(-122.0952,37.159)]" 286588800000000000 +road name="Petroleum St ",thepath="[(-122.3168,37.13),(-122.3177,37.13)]" 286675200000000000 +road name="Petronave Dr ",thepath="[(-121.8344,37.469),(-121.83751,37.55738)]" 286761600000000000 +road name="Pickering Ave ",thepath="[(-121.9596,37.722),(-121.958868,37.72618)]" 286848000000000000 +road name="Pickering Ave ",thepath="[(-121.964,37.698),(-121.9637,37.7)]" 286934400000000000 +road name="Pico road",thepath="[(-121.9165,37.524),(-121.9177,37.505)]" 287020800000000000 +road name="Piedmont Ave ",thepath="[(-122.2511,37.644),(-122.251,37.624)]" 287107200000000000 +road name="Piedmont Ave ",thepath="[(-122.2527,37.263),(-122.2521,37.268)]" 287193600000000000 +road name="Piedmont Cres",thepath="[(-122.2513,37.671),(-122.2503,37.661)]" 287280000000000000 +road name="Pierce Ave ",thepath="[(-122.1683,37.186),(-122.1672,37.168)]" 287366400000000000 +road name="Pierce St ",thepath="[(-122.3045,37.891),(-122.3042,37.884)]" 287452800000000000 +road name="Pike Ct ",thepath="[(-121.9219,37.08),(-121.9224,37.079)]" 287539200000000000 +road name="Pimlico Dr ",thepath="[(-121.8616,37.998),(-121.8618,37.008)]" 287625600000000000 +road name="Pine St ",thepath="[(-121.7758,37.902),(-121.7746,37.906)]" 287712000000000000 +road name="Pine St ",thepath="[(-121.7784,37.894),(-121.7776,37.897)]" 287798400000000000 +road name="Pine St ",thepath="[(-121.7869,37.882),(-121.7864,37.883)]" 287884800000000000 +road name="Pine St ",thepath="[(-121.9216,37.243),(-121.9226,37.235)]" 287971200000000000 +road name="Pine St ",thepath="[(-122.303,37.074),(-122.3026,37.084)]" 288057600000000000 +road name="Pine St ",thepath="[(-122.3034,37.063),(-122.3032,37.069)]" 288144000000000000 +road name="Pine Needle Dr ",thepath="[(-122.2127,37.478),(-122.2125,37.473)]" 288230400000000000 +road name="Pinewood road",thepath="[(-122.2219,37.424),(-122.2211,37.429)]" 288316800000000000 +road name="Pinto Ct ",thepath="[(-122.0228,37.08),(-122.0224,37.073)]" 288403200000000000 +road name="Piper St ",thepath="[(-122.216,37.39),(-122.2155,37.385)]" 288489600000000000 +road name="Pippin St ",thepath="[(-122.1747,37.344),(-122.1734,37.332)]" 288576000000000000 +road name="Pizarro Dr ",thepath="[(-122.025,37.556),(-122.026,37.544)]" 288662400000000000 +road name="Placer Way ",thepath="[(-121.9789,37.415),(-121.9769,37.407)]" 288748800000000000 +road name="Plata Way ",thepath="[(-121.9402,37.066),(-121.9394,37.069)]" 288835200000000000 +road name="Pleasant Way ",thepath="[(-122.1653,37.311),(-122.1646,37.302)]" 288921600000000000 +road name="Pleasant Hill road",thepath="[(-121.9264,37.854),(-121.9268,37.86)]" 289008000000000000 +road name="Pleasant Valley Ct ",thepath="[(-122.2455,37.298),(-122.2439,37.305)]" 289094400000000000 +road name="Pleasanton Ave ",thepath="[(-121.8782,37.636),(-121.8784,37.63)]" 289180800000000000 +road name="Pleasanton Ave ",thepath="[(-121.8819,37.586),(-121.882761,37.5753)]" 289267200000000000 +road name="Pleasanton Canal ",thepath="[(-121.886052,37.82228),(-121.8833,37.835)]" 289353600000000000 +road name="Pleasanton Sunol road",thepath="[(-121.8765,37.987),(-121.8775,37.982)]" 289440000000000000 +road name="Pleasanton Sunol road",thepath="[(-121.8851,37.39),(-121.8858,37.387)]" 289526400000000000 +road name="Pleitner Ave ",thepath="[(-122.2098,37.946),(-122.2094,37.953)]" 289612800000000000 +road name="Plomosa road",thepath="[(-121.9106,37.703),(-121.9102,37.696)]" 289699200000000000 +road name="Plummer Creek ",thepath="[(-122.0778,37.095),(-122.0852,37.069)]" 289785600000000000 +road name="Plymouth Ave ",thepath="[(-121.9369,37.422),(-121.9378,37.424)]" 289872000000000000 +road name="Plymouth Dr ",thepath="[(-122.0798,37.132),(-122.0802,37.11)]" 289958400000000000 +road name="Plymouth St ",thepath="[(-122.1643,37.425),(-122.1641,37.418)]" 290044800000000000 +road name="Plymouth St ",thepath="[(-122.1661,37.454),(-122.1652,37.44)]" 290131200000000000 +road name="Plymouth St ",thepath="[(-122.1763,37.593),(-122.1758,37.586)]" 290217600000000000 +road name="Poda Ct ",thepath="[(-121.9321,37.308),(-121.9315,37.312)]" 290304000000000000 +road name="Poinciana Pl ",thepath="[(-121.9946,37.341),(-121.994,37.337)]" 290390400000000000 +road name="Point Eden Way ",thepath="[(-122.1208,37.255),(-122.1262,37.256)]" 290476800000000000 +road name="Polaris Ave ",thepath="[(-122.064185,37.84562),(-122.0647,37.84)]" 290563200000000000 +road name="Polk Way ",thepath="[(-121.745,37.867),(-121.745,37.858)]" 290649600000000000 +road name="Polvorosa Ct ",thepath="[(-122.0178,37.594),(-122.0174,37.591)]" 290736000000000000 +road name="Pomar Vista Ave ",thepath="[(-122.0989,37.958),(-122.0973,37.969)]" 290822400000000000 +road name="Pomona Way ",thepath="[(-121.743614,37.84357),(-121.7427,37.839)]" 290908800000000000 +road name="Ponderosa Dr ",thepath="[(-121.749629,37.12363),(-121.74967,37.11779)]" 290995200000000000 +road name="Pontiac St ",thepath="[(-122.165,37.365),(-122.1647,37.359),(-122.1643,37.354)]" 291081600000000000 +road name="Pontiac St ",thepath="[(-122.1665,37.383),(-122.166309,37.3779)]" 291168000000000000 +road name="Poplar Ave ",thepath="[(-122.1018,37.704),(-122.098,37.721)]" 291254400000000000 +road name="Poplar Path",thepath="[(-122.2678,37.968),(-122.2687,37.967)]" 291340800000000000 +road name="Port Sailwood Dr ",thepath="[(-122.0261,37.467),(-122.0265,37.463)]" 291427200000000000 +road name="Portage road",thepath="[(-121.9241,37.092),(-121.9257,37.109)]" 291513600000000000 +road name="Portal Ave ",thepath="[(-122.2281,37.148),(-122.2282,37.157)]" 291600000000000000 +road name="Portland Ave ",thepath="[(-122.2861,37.949),(-122.2858,37.949)]" 291686400000000000 +road name="Portland Ave ",thepath="[(-122.2945,37.945),(-122.2937,37.946)]" 291772800000000000 +road name="Portofino Cir ",thepath="[(-122.123984,37.08583),(-122.124375,37.08809)]" 291859200000000000 +road name="Portola Ave ",thepath="[(-121.7822,37.948),(-121.7806,37.94),(-121.7794,37.935)]" 291945600000000000 +road name="Portola Ave ",thepath="[(-122.2723,37.696),(-122.2713,37.691)]" 292032000000000000 +road name="Portola Dr ",thepath="[(-122.019284,37.56839),(-122.0199,37.563)]" 292118400000000000 +road name="Portola Dr ",thepath="[(-122.1482,37.024),(-122.1488,37.021)]" 292204800000000000 +road name="Portola Dr ",thepath="[(-122.1505,37.019),(-122.1516,37.016)]" 292291200000000000 +road name="Portsmouth Ave ",thepath="[(-122.1023,37.262),(-122.1013,37.254)]" 292377600000000000 +road name="Portsmouth Ave ",thepath="[(-122.1064,37.315),(-122.1064,37.308)]" 292464000000000000 +road name="Portwood Ave ",thepath="[(-122.2322,37.76),(-122.2317,37.765)]" 292550400000000000 +road name="Posen Ave ",thepath="[(-122.2828,37.848),(-122.2822,37.85)]" 292636800000000000 +road name="Posey Loop",thepath="[(-122.276,37.854),(-122.276,37.859)]" 292723200000000000 +road name="Potawatami Dr ",thepath="[(-121.9238,37.063),(-121.924,37.056)]" 292809600000000000 +road name="Powell St ",thepath="[(-122.2926,37.388),(-122.2937,37.387)]" 292896000000000000 +road name="Powell St ",thepath="[(-122.3101,37.375),(-122.3108,37.375)]" 292982400000000000 +road name="Prairie Dr ",thepath="[(-121.9124,37.667),(-121.9123,37.664)]" 293068800000000000 +road name="Prarie Dr ",thepath="[(-121.9102,37.652),(-121.910115,37.65226)]" 293155200000000000 +road name="Preda St ",thepath="[(-122.1686,37.244),(-122.1691,37.255)]" 293241600000000000 +road name="Presley Way ",thepath="[(-122.2461,37.462),(-122.2462,37.465)]" 293328000000000000 +road name="Preston Ct ",thepath="[(-121.733536,37.01447),(-121.733204,37.00955)]" 293414400000000000 +road name="Preston Ct ",thepath="[(-121.9666,37.659),(-121.9652,37.668)]" 293500800000000000 +road name="Prestwick Ave ",thepath="[(-122.0369,37.208),(-122.0363,37.202)]" 293587200000000000 +road name="Prince Dr ",thepath="[(-121.9164,37.155),(-121.9185,37.145)]" 293673600000000000 +road name="Prince St ",thepath="[(-122.2582,37.541),(-122.2568,37.543)]" 293760000000000000 +road name="Prince St ",thepath="[(-122.2723,37.524),(-122.2713,37.525)]" 293846400000000000 +road name="Prince St ",thepath="[(-122.2802,37.512),(-122.2794,37.514)]" 293932800000000000 +road name="Princeton Ter ",thepath="[(-121.977476,37.61102),(-121.977871,37.61066)]" 294019200000000000 +road name="Princeton Way ",thepath="[(-121.75,37.814),(-121.7472,37.814)]" 294105600000000000 +road name="Proctor Ave ",thepath="[(-122.2222,37.364),(-122.2217,37.36)]" 294192000000000000 +road name="Proctor Ave ",thepath="[(-122.2267,37.406),(-122.2251,37.386)]" 294278400000000000 +road name="Proctor road",thepath="[(-122.0671,37.192),(-122.067,37.2)]" 294364800000000000 +road name="Proctor road",thepath="[(-122.0761,37.177),(-122.073739,37.1724)]" 294451200000000000 +road name="Prospect St ",thepath="[(-122.2492,37.699),(-122.249,37.695)]" 294537600000000000 +road name="Prosperity Way ",thepath="[(-122.1033,37.031),(-122.1044,37.042)]" 294624000000000000 +road name="Pueblo Dr ",thepath="[(-122.1748,37.269),(-122.1743,37.269)]" 294710400000000000 +road name="Pueblo Creek ",thepath="[(-122.0958,37.203),(-122.0965,37.205)]" 294796800000000000 +road name="Pueblo Serena ",thepath="[(-122.0958,37.222),(-122.0958,37.203)]" 294883200000000000 +road name="Pueblo Spring ",thepath="[(-122.0964,37.238),(-122.0965,37.222)]" 294969600000000000 +road name="Puerto Vallarta ",thepath="[(-121.8719,37.54),(-121.8728,37.528)]" 295056000000000000 +road name="Pulaski Dr ",thepath="[(-122.0262,37.107),(-122.0254,37.1)]" 295142400000000000 +road name="Pulsar Ave ",thepath="[(-121.7892,37.58955),(-121.7892,37.60011)]" 295228800000000000 +road name="Purcell Pl ",thepath="[(-122.0249,37.718),(-122.0224,37.699)]" 295315200000000000 +road name="Purdue St ",thepath="[(-122.1555,37.95),(-122.1565,37.949)]" 295401600000000000 +road name="Pyramid St ",thepath="[(-121.768592,37.56164),(-121.768329,37.56198)]" 295488000000000000 +road name="Quail Run road",thepath="[(-122.0448,37.808),(-122.0439,37.805)]" 295574400000000000 +road name="Quebec Ave ",thepath="[(-122.1528,37.786),(-122.1535,37.785)]" 295660800000000000 +road name="Quebec Common ",thepath="[(-122.051368,37.60756),(-122.05282,37.60102)]" 295747200000000000 +road name="Queen Anne Dr ",thepath="[(-122.0751,37.883),(-122.077,37.865)]" 295833600000000000 +road name="Quercus Ct ",thepath="[(-122.0267,37.59),(-122.0269,37.572)]" 295920000000000000 +road name="Quigley Pl ",thepath="[(-122.1962,37.867),(-122.1957,37.861)]" 296006400000000000 +road name="Quinn Lane",thepath="[(-122.066405,37.74794),(-122.066039,37.73557)]" 296092800000000000 +road name="Quintana Ct ",thepath="[(-121.9516,37.464),(-121.9522,37.463)]" 296179200000000000 +road name="Quintana Way ",thepath="[(-121.9504,37.49),(-121.9508,37.489)]" 296265600000000000 +road name="Rachelle St ",thepath="[(-121.7257,37.945),(-121.7257,37.932)]" 296352000000000000 +road name="Racine St ",thepath="[(-122.2622,37.494),(-122.2624,37.501)]" 296438400000000000 +road name="Racoon Hallow Ct ",thepath="[(-121.914577,37.63603),(-121.913452,37.63738)]" 296524800000000000 +road name="Radele Ct ",thepath="[(-122.0101,37.363),(-122.0105,37.357)]" 296611200000000000 +road name="Ragland St ",thepath="[(-122.109,37.877),(-122.1089,37.872)]" 296697600000000000 +road name="Railroad Ave ",thepath="[(-121.7661,37.841),(-121.7654,37.842)]" 296784000000000000 +road name="Railroad Ave ",thepath="[(-121.771533,37.82472),(-121.771,37.826)]" 296870400000000000 +road name="Railroad Ave ",thepath="[(-121.779215,37.79798),(-121.779265,37.79635)]" 296956800000000000 +road name="Railroad Ave ",thepath="[(-121.891,37.94),(-121.8924,37.941)]" 297043200000000000 +road name="Railroad Ave ",thepath="[(-122.0245,37.013),(-122.0234,37.003),(-122.0223,37.993)]" 297129600000000000 +road name="Railroad Ave ",thepath="[(-122.1835,37.394),(-122.1828,37.388)]" 297216000000000000 +road name="Rainier Ave ",thepath="[(-121.8009,37.803),(-121.7999,37.804)]" 297302400000000000 +road name="Ralston Com ",thepath="[(-121.9775,37.428),(-121.9771,37.432)]" 297388800000000000 +road name="Ramona Ave ",thepath="[(-122.2391,37.291),(-122.2373,37.293)]" 297475200000000000 +road name="Ramona Ave ",thepath="[(-122.244153,37.31499),(-122.243523,37.31109)]" 297561600000000000 +road name="Rancho Arroyo Pkwy",thepath="[(-121.9932,37.785),(-121.9929,37.774),(-121.9926,37.769)]" 297648000000000000 +road name="Rancho Higuera road",thepath="[(-121.9112,37.96),(-121.9105,37.959)]" 297734400000000000 +road name="Randall Ct ",thepath="[(-122.0749,37.976),(-122.0756,37.968)]" 297820800000000000 +road name="Randicik Ct ",thepath="[(-121.863424,37.95818),(-121.863445,37.9654)]" 297907200000000000 +road name="Randy St ",thepath="[(-122.1517,37.809),(-122.1523,37.807)]" 297993600000000000 +road name="Ranker Pl ",thepath="[(-122.0725,37.4),(-122.0737,37.395)]" 298080000000000000 +road name="Ranspot Dr ",thepath="[(-122.0972,37.999),(-122.0959,37)]" 298166400000000000 +road name="Raymond road",thepath="[(-121.7462,37.306),(-121.7326,37.305)]" 298252800000000000 +road name="Reading Ave ",thepath="[(-122.0779,37.874),(-122.0735,37.875)]" 298339200000000000 +road name="Redbud Lane",thepath="[(-122.0969,37.627),(-122.0978,37.627)]" 298425600000000000 +road name="Redding Pl ",thepath="[(-122.1919,37.843),(-122.1921,37.841)]" 298512000000000000 +road name="Redding St ",thepath="[(-122.191432,37.84242),(-122.1911,37.842)]" 298598400000000000 +road name="Redding St ",thepath="[(-122.1943,37.858),(-122.1934,37.854)]" 298684800000000000 +road name="Redding St ",thepath="[(-122.1978,37.901),(-122.1975,37.895)]" 298771200000000000 +road name="Redwood Ct ",thepath="[(-121.9142,37.69),(-121.9144,37.696)]" 298857600000000000 +road name="Redwood road",thepath="[(-122.0726,37.155),(-122.0726,37.139)]" 298944000000000000 +road name="Redwood road",thepath="[(-122.0726,37.18079),(-122.0726,37.179)]" 299030400000000000 +road name="Redwood road",thepath="[(-122.0726,37.909),(-122.0727,37.906)]" 299116800000000000 +road name="Redwood road",thepath="[(-122.0727,37.955),(-122.0727,37.948)]" 299203200000000000 +road name="Redwood road",thepath="[(-122.0736,37.393),(-122.075736,37.37634)]" 299289600000000000 +road name="Redwood road",thepath="[(-122.1493,37.98),(-122.1437,37.001)]" 299376000000000000 +road name="Redwood road",thepath="[(-122.174191,37.96191),(-122.174,37.966)]" 299462400000000000 +road name="Redwood road",thepath="[(-122.1819,37.978),(-122.1811,37.968)]" 299548800000000000 +road name="Redwood road",thepath="[(-122.1882,37.986),(-122.1877,37.986)]" 299635200000000000 +road name="Redwood Creek ",thepath="[(-122.1366,37.968),(-122.1302,37.918)]" 299721600000000000 +road name="Reed Ave ",thepath="[(-121.7581,37.516),(-121.7559,37.516)]" 299808000000000000 +road name="Regailia Ave ",thepath="[(-121.86701,37.62944),(-121.867052,37.62182)]" 299894400000000000 +road name="Regal Ave ",thepath="[(-122.0839,37.468),(-122.0857,37.449)]" 299980800000000000 +road name="Regents Blvd",thepath="[(-122.0662,37.779),(-122.066625,37.77216)]" 300067200000000000 +road name="Regents Blvd",thepath="[(-122.0673,37.759),(-122.0677,37.751)]" 300153600000000000 +road name="Regents Blvd",thepath="[(-122.0681,37.74),(-122.068,37.73)]" 300240000000000000 +road name="Regents Blvd",thepath="[(-122.068594,37.80778),(-122.0681,37.805)]" 300326400000000000 +road name="Regents Blvd",thepath="[(-122.077,37.865),(-122.0761,37.862)]" 300412800000000000 +road name="Regional St ",thepath="[(-121.9328,37.029),(-121.9347,37.072)]" 300499200000000000 +road name="Reinhardt Dr ",thepath="[(-122.1831,37.922),(-122.1828,37.918)]" 300585600000000000 +road name="Renwick St ",thepath="[(-122.1989,37.797),(-122.1982,37.802)]" 300672000000000000 +road name="Republic Ave ",thepath="[(-122.1688,37.046),(-122.1721,37.032)]" 300758400000000000 +road name="Requa road",thepath="[(-122.2323,37.199),(-122.2293,37.21)]" 300844800000000000 +road name="Revere Ave ",thepath="[(-122.03,37.129),(-122.0287,37.129)]" 300931200000000000 +road name="Revere Ave ",thepath="[(-122.1347,37.359),(-122.134,37.362)]" 301017600000000000 +road name="Reyes Dr ",thepath="[(-122.0791,37.873),(-122.0787,37.873)]" 301104000000000000 +road name="Reynolds Dr ",thepath="[(-122.0036,37.671),(-122.002954,37.66809)]" 301190400000000000 +road name="Rhine Way ",thepath="[(-121.84112,37.58518),(-121.840944,37.56363)]" 301276800000000000 +road name="Rhododendron Dr ",thepath="[(-121.74419,37.09645),(-121.7445,37.105)]" 301363200000000000 +road name="Ribera Ct ",thepath="[(-122.0292,37.644),(-122.0286,37.641)]" 301449600000000000 +road name="Ricardo Ave ",thepath="[(-122.1176,37.761),(-122.1148,37.745)]" 301536000000000000 +road name="Rich Ave ",thepath="[(-122.0351,37.309),(-122.0354,37.303)]" 301622400000000000 +road name="Richardson Way ",thepath="[(-122.2263,37.224),(-122.225,37.22)]" 301708800000000000 +road name="Richmond Ave ",thepath="[(-121.9969,37.452),(-121.9975,37.442)]" 301795200000000000 +road name="Richmond Blvd",thepath="[(-122.2584,37.211),(-122.2573,37.218)]" 301881600000000000 +road name="Richmond Blvd",thepath="[(-122.2592,37.195),(-122.2587,37.201)]" 301968000000000000 +road name="Ridge Trl ",thepath="[(-121.8615,37.438),(-121.859211,37.42899)]" 302054400000000000 +road name="Ridge Top road",thepath="[(-122.1538,37.164),(-122.1566,37.179)]" 302140800000000000 +road name="Ridgeview Ter ",thepath="[(-121.970517,37.63559),(-121.970862,37.63332)]" 302227200000000000 +road name="Ridgeway Ave ",thepath="[(-122.2513,37.286),(-122.2518,37.292)]" 302313600000000000 +road name="Ridgeway Ave ",thepath="[(-122.2539,37.299),(-122.2548,37.302)]" 302400000000000000 +road name="Ridgewood Dr ",thepath="[(-122.051305,37.59386),(-122.053772,37.58263)]" 302486400000000000 +road name="Ridley Dr ",thepath="[(-121.9794,37.65),(-121.979,37.644)]" 302572800000000000 +road name="Riley Dr ",thepath="[(-122.2999,37.858),(-122.299,37.86)]" 302659200000000000 +road name="Rincon Ave ",thepath="[(-121.7824,37.828),(-121.7824,37.837)]" 302745600000000000 +road name="Rispen Dr ",thepath="[(-122.2342,37.621),(-122.2326,37.634)]" 302832000000000000 +road name="Riverdale Ct ",thepath="[(-121.9198,37.891),(-121.9201,37.893)]" 302918400000000000 +road name="Riverside Ave ",thepath="[(-121.9758,37.74),(-121.9764,37.725)]" 303004800000000000 +road name="Riviera Dr ",thepath="[(-122.0003,37.954),(-122.0003,37.957)]" 303091200000000000 +road name="Riviera Dr ",thepath="[(-122.0003,37.96),(-122.0003,37.968)]" 303177600000000000 +road name="Roberts Ave ",thepath="[(-121.9554,37.299),(-121.955,37.282)]" 303264000000000000 +road name="Robertson Ave ",thepath="[(-122.0164,37.33),(-122.0173,37.318)]" 303350400000000000 +road name="Robertson Ave ",thepath="[(-122.021,37.275),(-122.0213,37.27)]" 303436800000000000 +road name="Robin St ",thepath="[(-121.9701,37.297),(-121.9698,37.287)]" 303523200000000000 +road name="Robinson Dr ",thepath="[(-122.1825,37.096),(-122.1807,37.054)]" 303609600000000000 +road name="Robledo Dr ",thepath="[(-122.1734,37.304),(-122.1706,37.281)]" 303696000000000000 +road name="Roca Dr ",thepath="[(-122.0335,37.609),(-122.0314,37.599)]" 303782400000000000 +road name="Rochelle Ave ",thepath="[(-122.0603,37.347),(-122.0594,37.329)]" 303868800000000000 +road name="Rockford road",thepath="[(-122.0848,37.819),(-122.0842,37.814)]" 303955200000000000 +road name="Rockingham Dr ",thepath="[(-121.8681,37.948),(-121.8689,37.944)]" 304041600000000000 +road name="Rocklin Dr ",thepath="[(-122.070801,37.71701),(-122.0712,37.713)]" 304128000000000000 +road name="Rocklin Dr ",thepath="[(-122.0719,37.698),(-122.0722,37.689)]" 304214400000000000 +road name="Rockridge Blvd",thepath="[(-122.242,37.457),(-122.2416,37.464)]" 304300800000000000 +road name="Rockridge Blvd",thepath="[(-122.2424,37.454),(-122.2417,37.453)]" 304387200000000000 +road name="Rockrose Dr ",thepath="[(-122.0105,37.248),(-122.0114,37.252)]" 304473600000000000 +road name="Rockwood Dr ",thepath="[(-122.0128,37.492),(-122.0109,37.482)]" 304560000000000000 +road name="Rodney Com ",thepath="[(-121.9562,37.385),(-121.9555,37.382)]" 304646400000000000 +road name="Rogers Ave ",thepath="[(-122.0044,37.43),(-122.0061,37.409)]" 304732800000000000 +road name="Rolling Hills Dr ",thepath="[(-121.948386,37.07126),(-121.947082,37.07103)]" 304819200000000000 +road name="Rolling Hills Dr ",thepath="[(-121.950806,37.10304),(-121.950378,37.11376)]" 304905600000000000 +road name="Rollinghills Cir ",thepath="[(-121.945273,37.06404),(-121.945249,37.0671)]" 304992000000000000 +road name="Romeo Pl ",thepath="[(-122.0562,37.692),(-122.0571,37.694)]" 305078400000000000 +road name="Romey Lane",thepath="[(-122.0603,37.825),(-122.0587,37.825)]" 305164800000000000 +road name="Ronald Ct ",thepath="[(-121.9528,37.259),(-121.9537,37.259)]" 305251200000000000 +road name="Ronda St ",thepath="[(-122.125,37.865),(-122.1251,37.856)]" 305337600000000000 +road name="Roosevelt Pl ",thepath="[(-121.9918,37.267),(-121.9923,37.263)]" 305424000000000000 +road name="Rosario Ct ",thepath="[(-122.110662,37.79847),(-122.109931,37.78596)]" 305510400000000000 +road name="Rose Ave ",thepath="[(-121.8792,37.616),(-121.8838,37.656)]" 305596800000000000 +road name="Rose Ave ",thepath="[(-122.244329,37.28237),(-122.2441,37.284),(-122.2438,37.287)]" 305683200000000000 +road name="Rose Ave ",thepath="[(-122.2476,37.256),(-122.2469,37.268)]" 305769600000000000 +road name="Rose Dr ",thepath="[(-122.1451,37.142),(-122.1445,37.138)]" 305856000000000000 +road name="Rose St ",thepath="[(-121.757,37.84),(-121.757,37.831)]" 305942400000000000 +road name="Rose St ",thepath="[(-122.2586,37.834),(-122.2575,37.836)]" 306028800000000000 +road name="Rose St ",thepath="[(-122.2644,37.83),(-122.263462,37.83335)]" 306115200000000000 +road name="Rose St ",thepath="[(-122.2696,37.82),(-122.2689,37.82)]" 306201600000000000 +road name="Rose St ",thepath="[(-122.2843,37.782),(-122.2829,37.787)]" 306288000000000000 +road name="Rose St ",thepath="[(-122.2882,37.769),(-122.287,37.771)]" 306374400000000000 +road name="Rosedale Ct ",thepath="[(-121.9232,37.9),(-121.924,37.897)]" 306460800000000000 +road name="Rosegate Ter ",thepath="[(-121.969628,37.63263),(-121.970152,37.638)]" 306547200000000000 +road name="Roselli Dr ",thepath="[(-121.7848,37.636),(-121.7848,37.628)]" 306633600000000000 +road name="Rosemary Ct ",thepath="[(-121.9314,37.088),(-121.9314,37.085)]" 306720000000000000 +road name="Rosewood Ct ",thepath="[(-122.0622,37.37),(-122.0618,37.372)]" 306806400000000000 +road name="Rosewood Common ",thepath="[(-121.964615,37.21789),(-121.964292,37.213)]" 306892800000000000 +road name="Ross Cir ",thepath="[(-122.2466,37.502),(-122.2474,37.514)]" 306979200000000000 +road name="Ross Gate Way ",thepath="[(-121.8794,37.845),(-121.8818,37.836)]" 307065600000000000 +road name="Rothchild Ct ",thepath="[(-121.950257,37.08452),(-121.951086,37.08115)]" 307152000000000000 +road name="Roundhill Dr ",thepath="[(-122.0376,37.542),(-122.0377,37.536)]" 307238400000000000 +road name="Rousillon Ave ",thepath="[(-122.046,37.672),(-122.0451,37.674)]" 307324800000000000 +road name="Roxanne St ",thepath="[(-121.7288,37.853),(-121.7287,37.849)]" 307411200000000000 +road name="Roxbury Ave ",thepath="[(-122.1354,37.339),(-122.1346,37.336)]" 307497600000000000 +road name="Roxbury Lane",thepath="[(-122.0333,37.615),(-122.0329,37.618)]" 307584000000000000 +road name="Roxbury Lane",thepath="[(-122.0359,37.623),(-122.0356,37.619)]" 307670400000000000 +road name="Royal Ann Dr ",thepath="[(-122.0267,37.889),(-122.0268,37.88)]" 307756800000000000 +road name="Royal Ann Dr ",thepath="[(-122.0273,37.871),(-122.0278,37.862)]" 307843200000000000 +road name="Royal Ann St ",thepath="[(-122.1696,37.367),(-122.1691,37.362)]" 307929600000000000 +road name="Royal Ann St ",thepath="[(-122.1705,37.38),(-122.1702,37.376)]" 308016000000000000 +road name="Royal Palm Dr ",thepath="[(-121.9945,37.315),(-121.9922,37.303)]" 308102400000000000 +road name="Ruby road",thepath="[(-121.8029,37.688),(-121.8023,37.68)]" 308188800000000000 +road name="Ruby St ",thepath="[(-122.0765,37.815),(-122.0751,37.802)]" 308275200000000000 +road name="Rudsdale St ",thepath="[(-122.1855,37.552),(-122.1849,37.547)]" 308361600000000000 +road name="Rugby Ave ",thepath="[(-122.274,37.045),(-122.2738,37.037)]" 308448000000000000 +road name="Running Hills Ave ",thepath="[(-121.7262,37.22),(-121.7238,37.213)]" 308534400000000000 +road name="Ruschin Dr ",thepath="[(-122.0397,37.459),(-122.0393,37.465)]" 308620800000000000 +road name="Russell Ave ",thepath="[(-122.1694,37.819),(-122.1687,37.845)]" 308707200000000000 +road name="Russell St ",thepath="[(-122.2661,37.569),(-122.2652,37.571)]" 308793600000000000 +road name="Russell St ",thepath="[(-122.2695,37.564),(-122.2684,37.566)]" 308880000000000000 +road name="Russell Way ",thepath="[(-122.08,37.771),(-122.0781,37.783)]" 308966400000000000 +road name="Russet St ",thepath="[(-122.1758,37.361),(-122.1753,37.355)]" 309052800000000000 +road name="Rutgers Way ",thepath="[(-121.7421,37.744),(-121.742,37.739)]" 309139200000000000 +road name="Ruth Ct ",thepath="[(-122.1301,37.004),(-122.1288,37.002)]" 309225600000000000 +road name="Ruth Way ",thepath="[(-121.7928,37.766),(-121.792,37.767)]" 309312000000000000 +road name="Ruth Glen ",thepath="[(-121.9121,37.281),(-121.9124,37.278)]" 309398400000000000 +road name="Ruus road",thepath="[(-122.0667,37.296),(-122.066,37.28)]" 309484800000000000 +road name="Sabercat road",thepath="[(-121.9396,37.176),(-121.9388,37.165),(-121.937,37.159)]" 309571200000000000 +road name="Sabercat road",thepath="[(-121.9453,37.266),(-121.944385,37.25156),(-121.9408,37.195)]" 309657600000000000 +road name="Sable Pointe ",thepath="[(-122.2393,37.439),(-122.24,37.434)]" 309744000000000000 +road name="Sable Pointe ",thepath="[(-122.241,37.424),(-122.2416,37.418)]" 309830400000000000 +road name="Sacramento Ave ",thepath="[(-121.9861,37.44),(-121.9865,37.436)]" 309916800000000000 +road name="Sacramento St ",thepath="[(-122.277606,37.50815),(-122.277616,37.50591)]" 310003200000000000 +road name="Sacramento St ",thepath="[(-122.2799,37.606),(-122.2797,37.597)]" 310089600000000000 +road name="Sacramento St ",thepath="[(-122.2813,37.703),(-122.2811,37.695)]" 310176000000000000 +road name="Saddle Brook Dr ",thepath="[(-122.1478,37.909),(-122.1454,37.904),(-122.1451,37.888)]" 310262400000000000 +road name="Saginaw Ct ",thepath="[(-121.8803,37.898),(-121.8806,37.901)]" 310348800000000000 +road name="Saguare Com ",thepath="[(-121.9049,37.022),(-121.9043,37.017)]" 310435200000000000 +road name="Sailway Dr ",thepath="[(-121.9673,37.495),(-121.9686,37.502)]" 310521600000000000 +road name="Salem St ",thepath="[(-122.2794,37.361),(-122.2796,37.368)]" 310608000000000000 +road name="Salem St ",thepath="[(-122.2832,37.474),(-122.2835,37.479)]" 310694400000000000 +road name="Salinas Pl ",thepath="[(-122.041,37.689),(-122.0404,37.686)]" 310780800000000000 +road name="Salisbury St ",thepath="[(-122.2162,37.863),(-122.2146,37.848)]" 310867200000000000 +road name="Salton Sea Lane",thepath="[(-122.0597,37.88),(-122.0591,37.869)]" 310953600000000000 +road name="San Andreas Dr ",thepath="[(-122.0592,37.957),(-122.0585,37.954)]" 311040000000000000 +road name="San Andreas Dr ",thepath="[(-122.0609,37.9),(-122.0614,37.895)]" 311126400000000000 +road name="San Andreas Dr ",thepath="[(-122.0621,37.973),(-122.0614,37.972)]" 311212800000000000 +road name="San Andreas Dr ",thepath="[(-122.0635,37.878),(-122.0648,37.891)]" 311299200000000000 +road name="San Andreas Dr ",thepath="[(-122.0658,37.907),(-122.0661,37.914)]" 311385600000000000 +road name="San Andreas Dr ",thepath="[(-122.0668,37.926),(-122.0672,37.931)]" 311472000000000000 +road name="San Antonio Ave ",thepath="[(-122.2585,37.679),(-122.2566,37.672)]" 311558400000000000 +road name="San Antonio St ",thepath="[(-122.0472,37.155),(-122.0477,37.108)]" 311644800000000000 +road name="San Antonio Way ",thepath="[(-122.2323,37.891),(-122.2314,37.886)]" 311731200000000000 +road name="San Antonio Creek ",thepath="[(-121.8722,37.759),(-121.8641,37.771)]" 311817600000000000 +road name="San Antonio Reservoir ",thepath="[(-121.8487,37.728),(-121.8359,37.67)]" 311904000000000000 +road name="San Bernardino Way ",thepath="[(-122.0621,37.936),(-122.0628,37.933)]" 311990400000000000 +road name="San Carlos Ave ",thepath="[(-122.0912,37.941),(-122.0899,37.94)]" 312076800000000000 +road name="San Carlos Ave ",thepath="[(-122.2886,37.931),(-122.2885,37.91)]" 312163200000000000 +road name="San Carlos Walk",thepath="[(-122.2087,37.795),(-122.208,37.789)]" 312249600000000000 +road name="San Clemente St ",thepath="[(-122.0511,37.188),(-122.051,37.177)]" 312336000000000000 +road name="San Franciscan Dr ",thepath="[(-122.0589,37.24),(-122.0582,37.246)]" 312422400000000000 +road name="San Francisco Bay ",thepath="[(-122.108,37.032),(-122.1048,37.001)]" 312508800000000000 +road name="San Francisco Bay ",thepath="[(-122.3115,37.814),(-122.3096,37.777)]" 312595200000000000 +road name="San Francisco Bay ",thepath="[(-122.3176,37.669),(-122.3108,37.652)]" 312681600000000000 +road name="San Jose Ave ",thepath="[(-122.2423,37.594),(-122.2409,37.586)]" 312768000000000000 +road name="San Jose Ave ",thepath="[(-122.2455,37.609),(-122.2445,37.605)]" 312854400000000000 +road name="San Jose Ave ",thepath="[(-122.2543,37.65),(-122.251,37.635)]" 312940800000000000 +road name="San Jose Ct ",thepath="[(-122.0563,37.922),(-122.055864,37.91921)]" 313027200000000000 +road name="San Juan St ",thepath="[(-122.2158,37.803),(-122.2149,37.795)]" 313113600000000000 +road name="San Leandro Blvd",thepath="[(-122.1557,37.174),(-122.1545,37.168)]" 313200000000000000 +road name="San Leandro St ",thepath="[(-122.1703,37.323),(-122.1689,37.312)]" 313286400000000000 +road name="San Leandro St ",thepath="[(-122.1717,37.335),(-122.1709,37.329)]" 313372800000000000 +road name="San Leandro St ",thepath="[(-122.2195,37.721),(-122.2186,37.716)]" 313459200000000000 +road name="San Leandro St ",thepath="[(-122.2251,37.748),(-122.2242,37.743)]" 313545600000000000 +road name="San Leandro Bay ",thepath="[(-122.2241,37.553),(-122.2253,37.542)]" 313632000000000000 +road name="San Leandro Creek ",thepath="[(-122.154489,37.27978),(-122.155,37.281)]" 313718400000000000 +road name="San Leandro Creek ",thepath="[(-122.175792,37.24864),(-122.1807,37.247)]" 313804800000000000 +road name="San Leandro Creek Canal ",thepath="[(-122.2081,37.409),(-122.2076,37.401)]" 313891200000000000 +road name="San Lorenzo Ave ",thepath="[(-122.2861,37.93),(-122.2857,37.929)]" 313977600000000000 +road name="San Lorenzo Creek ",thepath="[(-122.0544,37.907),(-122.0547,37.908)]" 314064000000000000 +road name="San Lorenzo Creek ",thepath="[(-122.063257,37.85966),(-122.064271,37.85339)]" 314150400000000000 +road name="San Lorenzo Creek ",thepath="[(-122.0741,37.799),(-122.0757,37.789)]" 314236800000000000 +road name="San Lorenzo Creek ",thepath="[(-122.117293,37.85868),(-122.120139,37.85739)]" 314323200000000000 +road name="San Lorenzo Creek ",thepath="[(-122.124957,37.853),(-122.1271,37.849)]" 314409600000000000 +road name="San Lorenzo Creek ",thepath="[(-122.1539,37.747),(-122.1616,37.703)]" 314496000000000000 +road name="San Luces Way ",thepath="[(-122.0672,37.963),(-122.0695,37.954)]" 314582400000000000 +road name="San Luis Ct ",thepath="[(-121.8768,37.483),(-121.8766,37.474)]" 314668800000000000 +road name="San Luis Ct ",thepath="[(-122.065,37.975),(-122.0657,37.973)]" 314755200000000000 +road name="San Luis road",thepath="[(-122.271,37.959),(-122.2701,37.933)]" 314841600000000000 +road name="San Marco Way ",thepath="[(-122.0666,37.95),(-122.0687,37.942)]" 314928000000000000 +road name="San Mateo road",thepath="[(-122.2724,37.925),(-122.2728,37.928)]" 315014400000000000 +road name="San Mateo Way ",thepath="[(-122.0609,37.926),(-122.061842,37.92391)]" 315100800000000000 +road name="San Miguel Ave ",thepath="[(-122.0793,37.052),(-122.079224,37.0254)]" 315187200000000000 +road name="San Miguel Ave ",thepath="[(-122.0801,37.927),(-122.08,37.911)]" 315273600000000000 +road name="San Moreno Ct ",thepath="[(-121.954,37.576),(-121.9532,37.558)]" 315360000000000000 +road name="San Pablo Ave ",thepath="[(-122.2718,37.084),(-122.2721,37.093)]" 315446400000000000 +road name="San Pablo Ave ",thepath="[(-122.2797,37.326),(-122.2798,37.332)]" 315532800000000000 +road name="San Pablo Ave ",thepath="[(-122.2822,37.405),(-122.2824,37.411)]" 315619200000000000 +road name="San Pablo Ave ",thepath="[(-122.2834,37.442),(-122.2838,37.45)]" 315705600000000000 +road name="San Pablo Ave ",thepath="[(-122.2859,37.518),(-122.2857,37.515)]" 315792000000000000 +road name="San Pablo Ave ",thepath="[(-122.2864,37.537),(-122.2862,37.532)]" 315878400000000000 +road name="San Pablo Ave ",thepath="[(-122.2922,37.725),(-122.2922,37.716),(-122.2918,37.704)]" 315964800000000000 +road name="San Pablo Ave ",thepath="[(-122.2961,37.84),(-122.2959,37.832)]" 316051200000000000 +road name="San Rafael St ",thepath="[(-122.1398,37.225),(-122.1395,37.219)]" 316137600000000000 +road name="San Ramon road",thepath="[(-121.937288,37.09164),(-121.937307,37.0922)]" 316224000000000000 +road name="San Sabana road",thepath="[(-121.9402,37.066),(-121.9402,37.095)]" 316310400000000000 +road name="Sandalwood St ",thepath="[(-122.0347,37.493),(-122.0327,37.483)]" 316396800000000000 +road name="Sandburg Way ",thepath="[(-122.0625,37.226),(-122.0625,37.203)]" 316483200000000000 +road name="Sandelin Ave ",thepath="[(-122.1351,37.294),(-122.1343,37.298)]" 316569600000000000 +road name="Sandringham road",thepath="[(-122.2139,37.183),(-122.2142,37.179)]" 316656000000000000 +road name="Sandringham road",thepath="[(-122.2155,37.175),(-122.2163,37.165)]" 316742400000000000 +road name="Sandy road",thepath="[(-122.0643,37.089),(-122.0645,37.086)]" 316828800000000000 +road name="Sandy Hook Dr ",thepath="[(-122.0615,37.22),(-122.062,37.221)]" 316915200000000000 +road name="Sanford St ",thepath="[(-122.1546,37.737),(-122.1543,37.728)]" 317001600000000000 +road name="Sangamore St ",thepath="[(-122.1069,37.471),(-122.1076,37.468)]" 317088000000000000 +road name="Santa Barbara road",thepath="[(-122.2679,37.928),(-122.2666,37.92)]" 317174400000000000 +road name="Santa Clara Ave ",thepath="[(-122.2509,37.695),(-122.2479,37.682)]" 317260800000000000 +road name="Santa Clara Ave ",thepath="[(-122.254714,37.71317),(-122.254,37.71)]" 317347200000000000 +road name="Santa Clara Ave ",thepath="[(-122.2551,37.211),(-122.254,37.205)]" 317433600000000000 +road name="Santa Clara Ave ",thepath="[(-122.2787,37.736),(-122.2761,37.736)]" 317520000000000000 +road name="Santa Clara Ave ",thepath="[(-122.2791,37.994),(-122.2798,37.989)]" 317606400000000000 +road name="Santa Clara St ",thepath="[(-122.0901,37.496),(-122.0885,37.485)]" 317692800000000000 +road name="Santa Clara St ",thepath="[(-122.0923,37.51),(-122.0919,37.504)]" 317779200000000000 +road name="Santa Clara St ",thepath="[(-122.1009,37.618),(-122.1006,37.613)]" 317865600000000000 +road name="Santa Clara St ",thepath="[(-122.1012,37.667),(-122.1012,37.66389),(-122.1012,37.65718)]" 317952000000000000 +road name="Santa Clara Way ",thepath="[(-121.7539,37.854),(-121.7508,37.856),(-121.75,37.856)]" 318038400000000000 +road name="Santa Fe Ave ",thepath="[(-122.2899,37.817),(-122.2899,37.815)]" 318124800000000000 +road name="Santa Maria Ave ",thepath="[(-122.0773,37),(-122.0773,37.98)]" 318211200000000000 +road name="Santa Maria Dr ",thepath="[(-122.0633,37.965),(-122.0624,37.961)]" 318297600000000000 +road name="Santa Paula ",thepath="[(-122.1607,37.848),(-122.1596,37.834)]" 318384000000000000 +road name="Santa Ray Ave ",thepath="[(-122.2393,37.122),(-122.2381,37.113)]" 318470400000000000 +road name="Santa Rita road",thepath="[(-121.872608,37.75282),(-121.8731,37.766)]" 318556800000000000 +road name="Santa Rita road",thepath="[(-121.877461,37.9142),(-121.8775,37.922)]" 318643200000000000 +road name="Santa Rita St ",thepath="[(-122.2065,37.804),(-122.2058,37.796)]" 318729600000000000 +road name="Santa Rita St ",thepath="[(-122.2129,37.832),(-122.2104,37.839)]" 318816000000000000 +road name="Santa Rosa St ",thepath="[(-122.1506,37.247),(-122.1502,37.238)]" 318902400000000000 +road name="Santa Rosa St ",thepath="[(-122.1513,37.265),(-122.1509,37.256)]" 318988800000000000 +road name="Santa Teresa ",thepath="[(-122.1576,37.826),(-122.1565,37.812),(-122.1553,37.797)]" 319075200000000000 +road name="Santa Teresa Com ",thepath="[(-121.9505,37.564),(-121.9496,37.559)]" 319161600000000000 +road name="Santee road",thepath="[(-122.0371,37.691),(-122.0376,37.685)]" 319248000000000000 +road name="Santiago road",thepath="[(-122.176,37.962),(-122.1756,37.956)]" 319334400000000000 +road name="Santo Ct ",thepath="[(-121.946172,37.10869),(-121.947136,37.10367)]" 319420800000000000 +road name="Saratoga St ",thepath="[(-122.1024,37.997),(-122.1019,37.997)]" 319507200000000000 +road name="Sarazen Ave ",thepath="[(-122.1539,37.58),(-122.1532,37.585)]" 319593600000000000 +road name="Saroni Dr ",thepath="[(-122.1954,37.345),(-122.1944,37.347)]" 319680000000000000 +road name="Saturn Dr ",thepath="[(-122.1283,37.145),(-122.1238,37.117)]" 319766400000000000 +road name="Sausal Creek ",thepath="[(-122.2126,37.122),(-122.213944,37.10691)]" 319852800000000000 +road name="Sausal Creek ",thepath="[(-122.215521,37.03532),(-122.216544,37.01827)]" 319939200000000000 +road name="Sausal Creek ",thepath="[(-122.2175,37.985),(-122.218,37.982)]" 320025600000000000 +road name="Sausal Creek ",thepath="[(-122.218,37.982),(-122.218834,37.9583)]" 320112000000000000 +road name="Sausal Creek ",thepath="[(-122.219108,37.9487),(-122.2193,37.942),(-122.219513,37.93313)]" 320198400000000000 +road name="Sausal Creek ",thepath="[(-122.2217,37.893),(-122.2221,37.884)]" 320284800000000000 +road name="Sausal Creek ",thepath="[(-122.2228,37.862),(-122.2232,37.856)]" 320371200000000000 +road name="Scarborough Dr ",thepath="[(-122.0362,37.568),(-122.0362,37.556)]" 320457600000000000 +road name="Scarborough Dr ",thepath="[(-122.1993,37.214),(-122.1999,37.24),(-122.1994,37.241)]" 320544000000000000 +road name="Scenic Ave ",thepath="[(-121.7262,37.171),(-121.7232,37.171)]" 320630400000000000 +road name="Scenic Ave ",thepath="[(-121.7314,37.171),(-121.7305,37.17)]" 320716800000000000 +road name="Scenic Ave ",thepath="[(-121.7414,37.166),(-121.73802,37.16978)]" 320803200000000000 +road name="Scenic Ave ",thepath="[(-122.2282,37.278),(-122.2284,37.296)]" 320889600000000000 +road name="Scenic Ave ",thepath="[(-122.2619,37.762),(-122.2617,37.749)]" 320976000000000000 +road name="Scenicview Dr ",thepath="[(-122.1354,37.26),(-122.1325,37.252)]" 321062400000000000 +road name="School St ",thepath="[(-122.1378,37.209),(-122.1369,37.199),(-122.1364,37.197)]" 321148800000000000 +road name="School St ",thepath="[(-122.2116,37.945),(-122.2103,37.94)]" 321235200000000000 +road name="School Way ",thepath="[(-122.0838,37.18),(-122.0833,37.177)]" 321321600000000000 +road name="Schooner Hill ",thepath="[(-122.2263,37.56),(-122.2269,37.564)]" 321408000000000000 +road name="Schuster Ave ",thepath="[(-122.0854,37.081),(-122.0854,37.074)]" 321494400000000000 +road name="Scott Pl ",thepath="[(-122.0802,37.38),(-122.0815,37.381)]" 321580800000000000 +road name="Scott Creek ",thepath="[(-121.8694,37.814),(-121.8694,37.803)]" 321667200000000000 +road name="Scott Creek road",thepath="[(-121.8999,37.678),(-121.8975,37.685)]" 321753600000000000 +road name="Scott Creek road",thepath="[(-121.9047,37.667),(-121.9034,37.67)]" 321840000000000000 +road name="Scott Creek road",thepath="[(-121.9098,37.651),(-121.9086,37.655)]" 321926400000000000 +road name="Sea Bridge Way ",thepath="[(-122.2364,37.426),(-122.2359,37.417)]" 322012800000000000 +road name="Sea View Pkwy",thepath="[(-122.242913,37.47248),(-122.2421,37.472),(-122.2411,37.471)]" 322099200000000000 +road name="Sea View Pkwy",thepath="[(-122.2499,37.466),(-122.2496,37.468)]" 322185600000000000 +road name="Sea View Pkwy",thepath="[(-122.253,37.455),(-122.2519,37.457)]" 322272000000000000 +road name="Sea View Pkwy",thepath="[(-122.2547,37.434),(-122.255,37.439)]" 322358400000000000 +road name="Seal Rock Ter ",thepath="[(-122.033374,37.69186),(-122.0335,37.692),(-122.0338,37.694)]" 322444800000000000 +road name="Seaver St ",thepath="[(-122.1016,37.427),(-122.1016,37.419)]" 322531200000000000 +road name="Seaview Ave ",thepath="[(-122.0623,37.113),(-122.0599,37.111)]" 322617600000000000 +road name="Seawall Dr ",thepath="[(-122.316154,37.63126),(-122.315489,37.60045)]" 322704000000000000 +road name="Segovia Pl ",thepath="[(-121.9478,37.596),(-121.9489,37.585)]" 322790400000000000 +road name="Selkirk St ",thepath="[(-121.9798,37.336),(-121.9796,37.331)]" 322876800000000000 +road name="Seminary Ave ",thepath="[(-122.1772,37.796),(-122.1756,37.798)]" 322963200000000000 +road name="Seminary Ave ",thepath="[(-122.1814,37.772),(-122.1807,37.778)]" 323049600000000000 +road name="Seneca St ",thepath="[(-122.03,37.122),(-122.03,37.115)]" 323136000000000000 +road name="Seneca Park Ave ",thepath="[(-121.9649,37.17),(-121.9653,37.167)]" 323222400000000000 +road name="Senior Ave ",thepath="[(-122.2487,37.826),(-122.2473,37.827)]" 323308800000000000 +road name="Sequoia road",thepath="[(-122.0013,37.617),(-122.001192,37.61346)]" 323395200000000000 +road name="Sequoia Ter ",thepath="[(-121.997978,37.6571),(-121.997403,37.66696)]" 323481600000000000 +road name="Seven Hills road",thepath="[(-122.0876,37.1),(-122.086344,37.1012),(-122.0855,37.102)]" 323568000000000000 +road name="Severn Dr ",thepath="[(-122.0359,37.584),(-122.0368,37.571)]" 323654400000000000 +road name="Severn Pl ",thepath="[(-122.0363,37.586),(-122.0367,37.581)]" 323740800000000000 +road name="Sevilla road",thepath="[(-122.0829,37.809),(-122.0831,37.81)]" 323827200000000000 +road name="Seville Pl ",thepath="[(-121.9514,37.522),(-121.9522,37.518)]" 323913600000000000 +road name="Sextus road",thepath="[(-122.1938,37.33),(-122.1896,37.327)]" 324000000000000000 +road name="Seymour Pl ",thepath="[(-122.0357,37.84),(-122.0367,37.837)]" 324086400000000000 +road name="Shadow Ridge Dr ",thepath="[(-122.041,37.144),(-122.0411,37.162)]" 324172800000000000 +road name="Shady Creek road",thepath="[(-121.913106,37.24701),(-121.914087,37.24475)]" 324259200000000000 +road name="Shafer Creek ",thepath="[(-121.681036,37.12545),(-121.694801,37.25112)]" 324345600000000000 +road name="Shafter Ave ",thepath="[(-122.2539,37.418),(-122.2527,37.434)]" 324432000000000000 +road name="Shafter Ave ",thepath="[(-122.2569,37.383),(-122.2556,37.399)]" 324518400000000000 +road name="Shafter Ave ",thepath="[(-122.2586,37.313),(-122.2583,37.323)]" 324604800000000000 +road name="Shamrock Pl ",thepath="[(-121.929,37.24),(-121.9295,37.247)]" 324691200000000000 +road name="Shannon Ave ",thepath="[(-121.94218,37.14137),(-121.9418,37.142)]" 324777600000000000 +road name="Shasta St ",thepath="[(-121.802842,37.889),(-121.802801,37.8826)]" 324864000000000000 +road name="Shattuck Ave ",thepath="[(-122.053676,37.61223),(-122.052619,37.61591)]" 324950400000000000 +road name="Shattuck Ave ",thepath="[(-122.2633,37.339),(-122.2634,37.347)]" 325036800000000000 +road name="Shattuck Ave ",thepath="[(-122.2648,37.468),(-122.2648,37.474)]" 325123200000000000 +road name="Shattuck Ave ",thepath="[(-122.2675,37.712),(-122.2674,37.704)]" 325209600000000000 +road name="Shattuck Ave ",thepath="[(-122.2683,37.776),(-122.2683,37.766)]" 325296000000000000 +road name="Shattuck Ave ",thepath="[(-122.2686,37.904),(-122.2686,37.897)]" 325382400000000000 +road name="Shaw St ",thepath="[(-122.1518,37.459),(-122.1511,37.455)]" 325468800000000000 +road name="Sheffield Lane",thepath="[(-122.0511,37.006),(-122.051292,37.00178)]" 325555200000000000 +road name="Sheffield road",thepath="[(-122.1032,37.097),(-122.1026,37.095)]" 325641600000000000 +road name="Sheffield road",thepath="[(-122.241,37.45),(-122.2413,37.446)]" 325728000000000000 +road name="Sheffield road",thepath="[(-122.2421,37.44),(-122.2427,37.437)]" 325814400000000000 +road name="Sheffield road",thepath="[(-122.2457,37.441),(-122.2448,37.44)]" 325900800000000000 +road name="Sheila St ",thepath="[(-122.0453,37.852),(-122.045,37.847)]" 325987200000000000 +road name="Sheldon St ",thepath="[(-122.146,37.455),(-122.1454,37.451)]" 326073600000000000 +road name="Shepherd Ave ",thepath="[(-122.0707,37.383),(-122.0737,37.367)]" 326160000000000000 +road name="Shepherd Canyon road",thepath="[(-122.1845,37.355),(-122.1835,37.355)]" 326246400000000000 +road name="Shepherd Canyon road",thepath="[(-122.1988,37.302),(-122.196132,37.31137)]" 326332800000000000 +road name="Shepherd Canyon road",thepath="[(-122.2052,37.245),(-122.2027,37.236)]" 326419200000000000 +road name="Sheridan road",thepath="[(-121.901114,37.58914),(-121.899,37.574)]" 326505600000000000 +road name="Sheridan road",thepath="[(-122.2279,37.425),(-122.2253,37.411),(-122.2223,37.377)]" 326592000000000000 +road name="Sherman St ",thepath="[(-122.2628,37.781),(-122.2627,37.787)]" 326678400000000000 +road name="Sherman St ",thepath="[(-122.263,37.695),(-122.262932,37.70799)]" 326764800000000000 +road name="Sherman St ",thepath="[(-122.2631,37.667),(-122.2631,37.674)]" 326851200000000000 +road name="Sherry Ct ",thepath="[(-121.7642,37.736),(-121.76437,37.73958)]" 326937600000000000 +road name="Sherwood Lane",thepath="[(-122.2474,37.467),(-122.246514,37.45985)]" 327024000000000000 +road name="Shiela Way ",thepath="[(-122.0734,37.757),(-122.073,37.75)]" 327110400000000000 +road name="Shinn St ",thepath="[(-121.9818,37.64),(-121.9817,37.636)]" 327196800000000000 +road name="Shirley Ave ",thepath="[(-122.1157,37.717),(-122.117,37.712)]" 327283200000000000 +road name="Shoreline Dr ",thepath="[(-122.2638,37.596),(-122.2607,37.584)]" 327369600000000000 +road name="Shoreline Dr ",thepath="[(-122.2657,37.603),(-122.2648,37.6)]" 327456000000000000 +road name="Shoreline Dr ",thepath="[(-122.2714,37.626),(-122.2691,37.616)]" 327542400000000000 +road name="Shylock Dr ",thepath="[(-122.0488,37.748),(-122.0486,37.74)]" 327628800000000000 +road name="Sidney Ave ",thepath="[(-122.1279,37.096),(-122.1274,37.1)]" 327715200000000000 +road name="Sigourney Elysian Fields Dr ",thepath="[(-122.127563,37.66495),(-122.1275,37.649)]" 327801600000000000 +road name="Sigourney Elysian Fields Dr ",thepath="[(-122.128,37.674),(-122.1277,37.667)]" 327888000000000000 +road name="Silva Lane",thepath="[(-122.237019,37.28132),(-122.235461,37.27888)]" 327974400000000000 +road name="Silvergate Dr ",thepath="[(-121.941,37.097),(-121.9402,37.095)]" 328060800000000000 +road name="Simm Ct ",thepath="[(-121.9757,37.15),(-121.9748,37.153)]" 328147200000000000 +road name="Simmons St ",thepath="[(-122.1881,37.803),(-122.1874,37.805)]" 328233600000000000 +road name="Sims Dr ",thepath="[(-122.21,37.207),(-122.2101,37.237)]" 328320000000000000 +road name="Simson St ",thepath="[(-122.1693,37.737),(-122.1687,37.74)]" 328406400000000000 +road name="Sinbad Creek ",thepath="[(-121.9177,37.343),(-121.9202,37.366)]" 328492800000000000 +road name="Sinbad Creek ",thepath="[(-121.9498,37.613),(-121.9556,37.643)]" 328579200000000000 +road name="Singing Hills Ave ",thepath="[(-121.7262,37.199),(-121.7237,37.206)]" 328665600000000000 +road name="Singleton Ave ",thepath="[(-122.2896,37.87397),(-122.288161,37.87394)]" 328752000000000000 +road name="Sioux Ct ",thepath="[(-121.926147,37.14374),(-121.9248,37.122)]" 328838400000000000 +road name="Sioux Dr ",thepath="[(-121.928,37.142),(-121.926147,37.14374)]" 328924800000000000 +road name="Siward Dr ",thepath="[(-122.043286,37.63282),(-122.043581,37.63639)]" 329011200000000000 +road name="Siward Dr ",thepath="[(-122.044259,37.64617),(-122.044499,37.6493)]" 329097600000000000 +road name="Siward Dr ",thepath="[(-122.046199,37.68158),(-122.046,37.672)]" 329184000000000000 +road name="Siward Dr ",thepath="[(-122.047527,37.71764),(-122.0475,37.716)]" 329270400000000000 +road name="Skylark Dr ",thepath="[(-122.0117,37.839),(-122.011,37.835)]" 329356800000000000 +road name="Skylark Dr ",thepath="[(-122.0192,37.85),(-122.0186,37.848)]" 329443200000000000 +road name="Skyline Blvd",thepath="[(-122.1409,37.819),(-122.1307,37.73)]" 329529600000000000 +road name="Skyline Blvd",thepath="[(-122.144,37.851),(-122.1409,37.829)]" 329616000000000000 +road name="Skyline Blvd",thepath="[(-122.1701,37.988),(-122.167,37.982)]" 329702400000000000 +road name="Skyline Blvd",thepath="[(-122.1738,37.01),(-122.1714,37.996)]" 329788800000000000 +road name="Skyline Blvd",thepath="[(-122.1772,37.039),(-122.1774,37.037)]" 329875200000000000 +road name="Skyline Blvd",thepath="[(-122.1865,37.25),(-122.186,37.247)]" 329961600000000000 +road name="Skyline Blvd",thepath="[(-122.1885,37.275),(-122.1873,37.266)]" 330048000000000000 +road name="Skyline Blvd",thepath="[(-122.1965,37.405),(-122.190866,37.38122)]" 330134400000000000 +road name="Skyline Blvd",thepath="[(-122.2091,37.506),(-122.2076,37.506)]" 330220800000000000 +road name="Skyline Dr ",thepath="[(-122.0277,37.5),(-122.0284,37.498)]" 330307200000000000 +road name="Skyview Dr ",thepath="[(-122.1276,37.242),(-122.1274,37.244)]" 330393600000000000 +road name="Skywest Dr ",thepath="[(-122.1161,37.62),(-122.1123,37.586)]" 330480000000000000 +road name="Sleepy Hollow Ave ",thepath="[(-122.093,37.35),(-122.0927,37.343)]" 330566400000000000 +road name="Sleepy Hollow Ave ",thepath="[(-122.1003,37.335),(-122.1008,37.332)]" 330652800000000000 +road name="Sleepy Hollow Ave ",thepath="[(-122.1045,37.316),(-122.1054,37.315)]" 330739200000000000 +road name="Slender Ct ",thepath="[(-122.0565,37.73),(-122.055,37.735)]" 330825600000000000 +road name="Smalley Ave ",thepath="[(-122.095194,37.69714),(-122.0945,37.7)]" 330912000000000000 +road name="Smith St ",thepath="[(-122.0727,37.965),(-122.0742,37.964)]" 330998400000000000 +road name="Smith St ",thepath="[(-122.0759,37.963),(-122.0778,37.964)]" 331084800000000000 +road name="Snake road",thepath="[(-122.206567,37.27603),(-122.2062,37.281),(-122.2057,37.292)]" 331171200000000000 +road name="Snake road",thepath="[(-122.2066,37.331),(-122.2048,37.345)]" 331257600000000000 +road name="Sodaville Ct ",thepath="[(-121.9266,37.029),(-121.9278,37.033)]" 331344000000000000 +road name="Solano Ave ",thepath="[(-122.1131,37.735),(-122.1161,37.724)]" 331430400000000000 +road name="Solano Ave ",thepath="[(-122.2829,37.912),(-122.2819,37.913)]" 331516800000000000 +road name="Solano Ave ",thepath="[(-122.2871,37.91),(-122.2867,37.91)]" 331603200000000000 +road name="Solano Ave ",thepath="[(-122.289,37.909),(-122.2885,37.91)]" 331689600000000000 +road name="Solano Way ",thepath="[(-122.0773,37.921),(-122.0785,37.921)]" 331776000000000000 +road name="Solano Way ",thepath="[(-122.2451,37.889),(-122.2443,37.885)]" 331862400000000000 +road name="Solomon Lane",thepath="[(-122.2372,37.299),(-122.2374,37.3)]" 331948800000000000 +road name="Somerset Ave ",thepath="[(-122.0827,37.016),(-122.0811,37.016)]" 332035200000000000 +road name="Somerset Ave ",thepath="[(-122.0893,37.006),(-122.0885,37.008)]" 332121600000000000 +road name="Somerset Ave ",thepath="[(-122.0907,37.003),(-122.0899,37.005)]" 332208000000000000 +road name="Somerset Ave ",thepath="[(-122.0936,37.994),(-122.0922,37.998)]" 332294400000000000 +road name="Somerset Pl ",thepath="[(-122.0295,37.49),(-122.0299,37.485)]" 332380800000000000 +road name="Somerset Pl ",thepath="[(-122.2732,37.949),(-122.27246,37.94689)]" 332467200000000000 +road name="Sonoma Ave ",thepath="[(-122.2776,37.858),(-122.2765,37.856)]" 332553600000000000 +road name="Sonoma Dr ",thepath="[(-121.8796,37.487),(-121.8799,37.488)]" 332640000000000000 +road name="Soquel St ",thepath="[(-122.0664,37.711),(-122.0657,37.707)]" 332726400000000000 +road name="Sora Com ",thepath="[(-122.043,37.743),(-122.0428,37.746)]" 332812800000000000 +road name="Sorani Way ",thepath="[(-122.0785,37.172),(-122.0782,37.171)]" 332899200000000000 +road name="Soto road",thepath="[(-122.0812,37.561),(-122.0798,37.545)]" 332985600000000000 +road name="South road",thepath="[(-121.8941,37.283),(-121.894,37.279)]" 333072000000000000 +road name="South Bay Aqueduct ",thepath="[(-121.6786,37.942),(-121.676067,37.8981)]" 333158400000000000 +road name="South Dry Creek Branch ",thepath="[(-122.0168,37.083),(-122.0173,37.084)]" 333244800000000000 +road name="South Fork Trout Creek ",thepath="[(-121.658085,37.99874),(-121.657591,37.02423)]" 333331200000000000 +road name="South Front road",thepath="[(-121.7116,37.134),(-121.7092,37.145)]" 333417600000000000 +road name="South Front road",thepath="[(-121.723953,37.0797),(-121.722,37.062)]" 333504000000000000 +road name="South Front road",thepath="[(-121.738379,37.02183),(-121.737947,37.02335)]" 333590400000000000 +road name="Southampton Ave ",thepath="[(-122.2745,37.948),(-122.2742,37.962)]" 333676800000000000 +road name="Southern Pacific Railroad ",thepath="[(-121.558002,37.00663),(-121.576,37.136)]" 333763200000000000 +road name="Southern Pacific Railroad ",thepath="[(-121.6695,37.391),(-121.666889,37.41337)]" 333849600000000000 +road name="Southern Pacific Railroad ",thepath="[(-121.7674,37.843),(-121.7686,37.84)]" 333936000000000000 +road name="Southern Pacific Railroad ",thepath="[(-122.3002,37.674),(-122.2999,37.661)]" 334022400000000000 +road name="Southlake Com ",thepath="[(-121.9572,37.113),(-121.9565,37.116)]" 334108800000000000 +road name="Southwick Ct ",thepath="[(-121.9441,37.185),(-121.9436,37.18)]" 334195200000000000 +road name="Sp Railroad ",thepath="[(-121.7182,37.017),(-121.7162,37.025)]" 334281600000000000 +road name="Sp Railroad ",thepath="[(-121.8204,37.746),(-121.8139,37.753)]" 334368000000000000 +road name="Sp Railroad ",thepath="[(-121.8591,37.701),(-121.8586,37.705)]" 334454400000000000 +road name="Sp Railroad ",thepath="[(-121.8699,37.631),(-121.8678,37.651)]" 334540800000000000 +road name="Sp Railroad ",thepath="[(-121.87958,37.88603),(-121.880675,37.89396)]" 334627200000000000 +road name="Sp Railroad ",thepath="[(-121.893564,37.99009),(-121.897,37.016)]" 334713600000000000 +road name="Sp Railroad ",thepath="[(-121.8977,37.022),(-121.9022,37.054)]" 334800000000000000 +road name="Sp Railroad ",thepath="[(-121.9271,37.788),(-121.9185,37.626)]" 334886400000000000 +road name="Sp Railroad ",thepath="[(-121.950757,37.25243),(-121.9506,37.25)]" 334972800000000000 +road name="Sp Railroad ",thepath="[(-121.9565,37.898),(-121.9562,37.9)]" 335059200000000000 +road name="Sp Railroad ",thepath="[(-121.9684,37.715),(-121.9669,37.701),(-121.9655,37.69)]" 335145600000000000 +road name="Sp Railroad ",thepath="[(-121.9736,37.616),(-121.9737,37.608)]" 335232000000000000 +road name="Sp Railroad ",thepath="[(-121.993831,37.81669),(-121.992146,37.8107)]" 335318400000000000 +road name="Sp Railroad ",thepath="[(-122.0257,37.349),(-122.0289,37.31)]" 335404800000000000 +road name="Sp Railroad ",thepath="[(-122.0315,37.251),(-122.0292,37.24)]" 335491200000000000 +road name="Sp Railroad ",thepath="[(-122.0321,37.271),(-122.0347,37.265)]" 335577600000000000 +road name="Sp Railroad ",thepath="[(-122.0386,37.133),(-122.0335,37.089)]" 335664000000000000 +road name="Sp Railroad ",thepath="[(-122.0414,37.268),(-122.042509,37.26338)]" 335750400000000000 +road name="Sp Railroad ",thepath="[(-122.0553,37.212),(-122.0652,37.134),(-122.0654,37.131)]" 335836800000000000 +road name="Sp Railroad ",thepath="[(-122.0594,37.75),(-122.0593,37.743)]" 335923200000000000 +road name="Sp Railroad ",thepath="[(-122.0626,37.857),(-122.0616,37.845)]" 336009600000000000 +road name="Sp Railroad ",thepath="[(-122.0734,37.001),(-122.0734,37.997)]" 336096000000000000 +road name="Sp Railroad ",thepath="[(-122.076691,37.99914),(-122.075907,37.99243)]" 336182400000000000 +road name="Sp Railroad ",thepath="[(-122.086,37.079),(-122.081,37.036)]" 336268800000000000 +road name="Sp Railroad ",thepath="[(-122.0914,37.601),(-122.087,37.56),(-122.086408,37.5551)]" 336355200000000000 +road name="Sp Railroad ",thepath="[(-122.10629,37.73042),(-122.1054,37.723)]" 336441600000000000 +road name="Sp Railroad ",thepath="[(-122.1129,37.315),(-122.1125,37.311)]" 336528000000000000 +road name="Sp Railroad ",thepath="[(-122.121,37.857),(-122.1187,37.837)]" 336614400000000000 +road name="Sp Railroad ",thepath="[(-122.137,37.576),(-122.1327,37.53)]" 336700800000000000 +road name="Sp Railroad ",thepath="[(-122.137792,37.003),(-122.1365,37.992),(-122.131257,37.94612)]" 336787200000000000 +road name="Sp Railroad ",thepath="[(-122.172213,37.03399),(-122.1678,37.059)]" 336873600000000000 +road name="Sp Railroad ",thepath="[(-122.1748,37.322),(-122.174,37.315)]" 336960000000000000 +road name="Sp Railroad ",thepath="[(-122.1785,37.355),(-122.178,37.351)]" 337046400000000000 +road name="Sp Railroad ",thepath="[(-122.17894,37.32386),(-122.179281,37.31827),(-122.1807,37.295)]" 337132800000000000 +road name="Sp Railroad ",thepath="[(-122.1801,37.115),(-122.178,37.088)]" 337219200000000000 +road name="Sp Railroad ",thepath="[(-122.1947,37.497),(-122.193328,37.4848)]" 337305600000000000 +road name="Sp Railroad ",thepath="[(-122.2269,37.73),(-122.2272,37.726)]" 337392000000000000 +road name="Sp Railroad ",thepath="[(-122.2281,37.761),(-122.2268,37.753)]" 337478400000000000 +road name="Sp Railroad ",thepath="[(-122.2346,37.727),(-122.2343,37.726)]" 337564800000000000 +road name="Sp Railroad ",thepath="[(-122.2411,37.85),(-122.2359,37.814)]" 337651200000000000 +road name="Sp Railroad ",thepath="[(-122.2506,37.891),(-122.2501,37.889)]" 337737600000000000 +road name="Sp Railroad ",thepath="[(-122.2724,37.946),(-122.2713,37.942)]" 337824000000000000 +road name="Sp Railroad ",thepath="[(-122.2737,37.774),(-122.2731,37.765)]" 337910400000000000 +road name="Sp Railroad ",thepath="[(-122.2744,37.802),(-122.2743,37.795)]" 337996800000000000 +road name="Sp Railroad ",thepath="[(-122.275429,37.88474),(-122.2754,37.883)]" 338083200000000000 +road name="Sp Railroad ",thepath="[(-122.2853,37.355),(-122.2847,37.334)]" 338169600000000000 +road name="Sp Railroad ",thepath="[(-122.2864,37.393),(-122.2881,37.387)]" 338256000000000000 +road name="Sp Railroad ",thepath="[(-122.2888,37.383),(-122.2893,37.38)]" 338342400000000000 +road name="Sp Railroad ",thepath="[(-122.2898,37.349),(-122.2887,37.319),(-122.2883,37.307)]" 338428800000000000 +road name="Sp Railroad ",thepath="[(-122.2939,37.484),(-122.2936,37.475)]" 338515200000000000 +road name="Sp Railroad ",thepath="[(-122.2965,37.56),(-122.2959,37.545)]" 338601600000000000 +road name="Sp Railroad ",thepath="[(-122.305229,37.83926),(-122.3049,37.822)]" 338688000000000000 +road name="Sp Railroad ",thepath="[(-122.3086,37.087),(-122.31,37.085)]" 338774400000000000 +road name="Spady St ",thepath="[(-121.9689,37.424),(-121.969174,37.41761)]" 338860800000000000 +road name="Sparrow Dr ",thepath="[(-121.9331,37.139),(-121.9328,37.134)]" 338947200000000000 +road name="Sparrow road",thepath="[(-122.0827,37.209),(-122.0826,37.203)]" 339033600000000000 +road name="Spence Ave ",thepath="[(-121.9733,37.616),(-121.9728,37.619)]" 339120000000000000 +road name="Spetti Dr ",thepath="[(-121.9684,37.665),(-121.9696,37.658)]" 339206400000000000 +road name="Spinnaker Way ",thepath="[(-122.3138,37.694),(-122.3171,37.687)]" 339292800000000000 +road name="Spoonbill Common ",thepath="[(-122.043662,37.66522),(-122.043425,37.66065)]" 339379200000000000 +road name="Spring St ",thepath="[(-121.8702,37.62),(-121.871,37.621)]" 339465600000000000 +road name="Springbrook Lane",thepath="[(-122.057162,37.29952),(-122.056705,37.29151)]" 339552000000000000 +road name="Springdale Ave ",thepath="[(-121.9196,37.845),(-121.92,37.854)]" 339638400000000000 +road name="Springdale Ave ",thepath="[(-121.9229,37.884),(-121.9233,37.888)]" 339724800000000000 +road name="Springfield St ",thepath="[(-122.1598,37.485),(-122.1597,37.477)]" 339811200000000000 +road name="Springhouse Dr ",thepath="[(-121.883683,37.89587),(-121.880871,37.89125)]" 339897600000000000 +road name="Springlake Dr ",thepath="[(-122.133113,37.93134),(-122.134,37.93)]" 339984000000000000 +road name="Springtown Blvd",thepath="[(-121.74,37.039),(-121.7407,37.059)]" 340070400000000000 +road name="Springtown Blvd",thepath="[(-121.743242,37.07568),(-121.745,37.088)]" 340156800000000000 +road name="Spruce St ",thepath="[(-122.0506,37.327),(-122.0496,37.322)]" 340243200000000000 +road name="Spruce St ",thepath="[(-122.0566,37.368),(-122.0565,37.361)]" 340329600000000000 +road name="Spruce St ",thepath="[(-122.1578,37.994),(-122.1586,37.991)]" 340416000000000000 +road name="Spruce St ",thepath="[(-122.2398,37.048),(-122.2393,37.056)]" 340502400000000000 +road name="Spruce St ",thepath="[(-122.2659,37.849),(-122.2655,37.839)]" 340588800000000000 +road name="Spruce St ",thepath="[(-122.2698,37.99),(-122.2693,37.981)]" 340675200000000000 +road name="St Anthony Dr ",thepath="[(-121.939,37.474),(-121.9385,37.471)]" 340761600000000000 +road name="St Charles St ",thepath="[(-122.2654,37.763),(-122.2653,37.773)]" 340848000000000000 +road name="St Johns St ",thepath="[(-121.8764,37.643),(-121.8777,37.646)]" 340934400000000000 +road name="St Matthew Dr ",thepath="[(-122.024,37.394),(-122.0234,37.391)]" 341020800000000000 +road name="St Michael Cir ",thepath="[(-121.853648,37.6251),(-121.853779,37.61796)]" 341107200000000000 +road name="Stacy St ",thepath="[(-122.1218,37.544),(-122.1199,37.532)]" 341193600000000000 +road name="Stadium Way ",thepath="[(-121.758155,37.66715),(-121.757912,37.66728)]" 341280000000000000 +road name="Stagecoach road",thepath="[(-121.921401,37.27049),(-121.9218,37.277)]" 341366400000000000 +road name="Stalker Way ",thepath="[(-122.264,37.807),(-122.2672,37.816)]" 341452800000000000 +road name="Stanford Ave ",thepath="[(-122.2764,37.438),(-122.2773,37.433)]" 341539200000000000 +road name="Stanford Ave ",thepath="[(-122.2781,37.43),(-122.2802,37.42)]" 341625600000000000 +road name="Stanford Way ",thepath="[(-121.7451,37.826),(-121.743925,37.82264)]" 341712000000000000 +road name="Stanford Way ",thepath="[(-121.7473,37.828),(-121.7459,37.826)]" 341798400000000000 +road name="Stanley Ave ",thepath="[(-121.9621,37.242),(-121.9632,37.24)]" 341884800000000000 +road name="Stanley Ave ",thepath="[(-122.1504,37.485),(-122.15,37.478),(-122.1498,37.469)]" 341971200000000000 +road name="Stanley Blvd",thepath="[(-121.7971,37.769),(-121.7948,37.772)]" 342057600000000000 +road name="Stanley Blvd",thepath="[(-121.8705,37.659),(-121.871,37.66)]" 342144000000000000 +road name="Stannage Ave ",thepath="[(-122.2939,37.844),(-122.2939,37.828)]" 342230400000000000 +road name="Stannage Ave ",thepath="[(-122.297,37.939),(-122.2965,37.923)]" 342316800000000000 +road name="Stanton Ave ",thepath="[(-122.0889,37.939),(-122.0885,37.928)]" 342403200000000000 +road name="Stanton Ave ",thepath="[(-122.0953,37.027),(-122.0944,37.022)]" 342489600000000000 +road name="Stanton Ave ",thepath="[(-122.100392,37.0697),(-122.099513,37.06052)]" 342576000000000000 +road name="Stanton Hill road",thepath="[(-122.0935,37.963),(-122.0929,37.964)]" 342662400000000000 +road name="Stanwood Ave ",thepath="[(-122.0839,37.416),(-122.0839,37.409)]" 342748800000000000 +road name="Star View Ct ",thepath="[(-122.2251,37.516),(-122.2248,37.511)]" 342835200000000000 +road name="Starflower Way ",thepath="[(-121.7298,37.099),(-121.7323,37.095)]" 342921600000000000 +road name="Starling Dr ",thepath="[(-122.015929,37.82489),(-122.0171,37.83)]" 343008000000000000 +road name="Starlite Way ",thepath="[(-121.9167,37.738),(-121.9162,37.745)]" 343094400000000000 +road name="Starr Ct ",thepath="[(-121.9238,37.371),(-121.9246,37.373)]" 343180800000000000 +road name="Starr Ct ",thepath="[(-121.9249,37.373),(-121.92514,37.3722)]" 343267200000000000 +road name="Starr St ",thepath="[(-121.9213,37.378),(-121.9216,37.376)]" 343353600000000000 +road name="Starview Dr ",thepath="[(-122.1248,37.197),(-122.1231,37.201)]" 343440000000000000 +road name="Starward Dr ",thepath="[(-121.9356,37.103),(-121.936,37.109)]" 343526400000000000 +road name="Starward Dr ",thepath="[(-121.9361,37.115),(-121.9363,37.128)]" 343612800000000000 +road name="State Hwy 123 ",thepath="[(-122.3004,37.986),(-122.2998,37.969),(-122.2995,37.962),(-122.2992,37.952),(-122.299,37.942),(-122.2987,37.935),(-122.2984,37.924),(-122.2982,37.92),(-122.2976,37.904),(-122.297,37.88),(-122.2966,37.869),(-122.2959,37.848),(-122.2961,37.843)]" 343699200000000000 +road name="State Hwy 13 ",thepath="[(-122.1797,37.943),(-122.179871,37.91849),(-122.18,37.9),(-122.179023,37.86615),(-122.1787,37.862),(-122.1781,37.851),(-122.1777,37.845),(-122.1773,37.839),(-122.177,37.833)]" 343785600000000000 +road name="State Hwy 13 ",thepath="[(-122.1828,37.974),(-122.1799,37.948)]" 343872000000000000 +road name="State Hwy 13 ",thepath="[(-122.2049,37.2),(-122.20328,37.17975),(-122.1989,37.125),(-122.198078,37.11641),(-122.1975,37.11)]" 343958400000000000 +road name="State Hwy 13 ",thepath="[(-122.2213,37.388),(-122.218753,37.36402),(-122.2168,37.336),(-122.2163,37.328),(-122.2144,37.313),(-122.211744,37.28221),(-122.21,37.262),(-122.2087,37.244),(-122.207,37.224),(-122.2065,37.218),(-122.2058,37.209)]" 344044800000000000 +road name="State Hwy 13 ",thepath="[(-122.2319,37.515),(-122.2316,37.511),(-122.2305,37.498),(-122.2296,37.489),(-122.2286,37.478),(-122.2244,37.427)]" 344131200000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.1781,37.851),(-122.1782,37.847),(-122.1777,37.845)]" 344217600000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.1799,37.948),(-122.1797,37.943)]" 344304000000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.1819,37.978),(-122.1828,37.974)]" 344390400000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.1835,37.98),(-122.1852,37.985)]" 344476800000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.1854,37.996),(-122.1861,37.986)]" 344563200000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.1937,37.078),(-122.1943,37.08)]" 344649600000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.1942,37.084),(-122.1964,37.107)]" 344736000000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.1975,37.11),(-122.1964,37.107)]" 344822400000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.1989,37.125),(-122.1984,37.117),(-122.1981,37.112)]" 344908800000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2054,37.205),(-122.2048,37.209)]" 344995200000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2055,37.197),(-122.2049,37.2)]" 345081600000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2058,37.209),(-122.2049,37.211)]" 345168000000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2069,37.213),(-122.2072,37.216),(-122.2065,37.218)]" 345254400000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2073,37.221),(-122.207,37.224)]" 345340800000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2163,37.328),(-122.2149,37.321),(-122.2144,37.313)]" 345427200000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2168,37.336),(-122.2168,37.328)]" 345513600000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2232,37.41),(-122.2247,37.422)]" 345600000000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2244,37.427),(-122.223,37.414),(-122.2214,37.396),(-122.2213,37.388)]" 345686400000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2244,37.427),(-122.2247,37.422)]" 345772800000000000 +road name="State Hwy 13 Ramp",thepath="[(-122.2307,37.487),(-122.2286,37.478)]" 345859200000000000 +road name="State Hwy 17 ",thepath="[(-122.3107,37.976),(-122.3078,37.93),(-122.3072,37.916),(-122.307,37.902)]" 345945600000000000 +road name="State Hwy 17 Ramp",thepath="((-122.2877,37.234),(-122.2881,37.237))" 346032000000000000 +road name="State Hwy 17 Ramp",thepath="[(-122.2882,37.233),(-122.2881,37.237),(-122.2882,37.242),(-122.2883,37.247),(-122.2885,37.254)]" 346118400000000000 +road name="State Hwy 17 Ramp",thepath="[(-122.2899,37.128),(-122.2898,37.132),(-122.2897,37.142)]" 346204800000000000 +road name="State Hwy 17 Ramp",thepath="[(-122.291,37.113),(-122.2906,37.118)]" 346291200000000000 +road name="State Hwy 17 Ramp",thepath="[(-122.2915,37.083),(-122.29137,37.07065),(-122.290561,37.06224)]" 346377600000000000 +road name="State Hwy 238 ",thepath="((-122.098,37.908),(-122.0983,37.907),(-122.099,37.905),(-122.101,37.898),(-122.101535,37.89711),(-122.103173,37.89438),(-122.1046,37.892),(-122.106,37.89))" 346464000000000000 +road name="State Hwy 238 ",thepath="[(-122.106,37.89),(-122.1061,37.89),(-122.1064,37.89),(-122.1073,37.889)]" 346550400000000000 +road name="State Hwy 238 Ramp",thepath="((-122.1064,37.89),(-122.1067,37.899))" 346636800000000000 +road name="State Hwy 238 Ramp",thepath="((-122.1288,37.892),(-122.1293,37.895))" 346723200000000000 +road name="State Hwy 238 Ramp",thepath="((-122.1288,37.913),(-122.1294,37.917))" 346809600000000000 +road name="State Hwy 238 Ramp",thepath="[(-122.1073,37.889),(-122.1067,37.899),(-122.1056,37.899)]" 346896000000000000 +road name="State Hwy 238 Ramp",thepath="[(-122.1073,37.889),(-122.1068,37.881),(-122.106574,37.88354),(-122.106,37.89)]" 346982400000000000 +road name="State Hwy 238 Ramp",thepath="[(-122.1288,37.9),(-122.1293,37.895),(-122.1296,37.906)]" 347068800000000000 +road name="State Hwy 238 Ramp",thepath="[(-122.1288,37.922),(-122.1294,37.917),(-122.1296,37.906)]" 347155200000000000 +road name="State Hwy 24 ",thepath="[(-122.2206,37.531),(-122.2204,37.536),(-122.2194,37.541),(-122.217,37.546),(-122.2151,37.551),(-122.2139,37.561),(-122.2121,37.577)]" 347241600000000000 +road name="State Hwy 24 ",thepath="[(-122.2674,37.246),(-122.2673,37.248),(-122.267,37.261),(-122.2668,37.271),(-122.2663,37.298),(-122.2659,37.315),(-122.2655,37.336),(-122.265007,37.35882),(-122.264443,37.37286),(-122.2641,37.381),(-122.2638,37.388),(-122.2631,37.396),(-122.2617,37.405),(-122.2615,37.407),(-122.2605,37.412)]" 347328000000000000 +road name="State Hwy 24 ",thepath="[(-122.2681,37.244),(-122.2679,37.248),(-122.2677,37.252)]" 347414400000000000 +road name="State Hwy 24 Ramp",thepath="((-122.2191,37.537),(-122.2197,37.535))" 347500800000000000 +road name="State Hwy 24 Ramp",thepath="((-122.2204,37.536),(-122.2211,37.533))" 347587200000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2194,37.541),(-122.2197,37.535),(-122.2197,37.531)]" 347673600000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2211,37.542),(-122.2211,37.533),(-122.2209,37.526)]" 347760000000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2218,37.517),(-122.2214,37.507)]" 347846400000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2224,37.497),(-122.2219,37.494),(-122.2215,37.492)]" 347932800000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2279,37.486),(-122.2284,37.485)]" 348019200000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2279,37.486),(-122.2305,37.498)]" 348105600000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2286,37.478),(-122.2284,37.485)]" 348192000000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2551,37.435),(-122.2568,37.436),(-122.2585,37.428),(-122.259722,37.42438),(-122.260592,37.4218),(-122.2612,37.42)]" 348278400000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.257,37.433),(-122.258,37.427)]" 348364800000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2605,37.412),(-122.2601,37.412),(-122.2599,37.412),(-122.2586,37.413)]" 348451200000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2623,37.409),(-122.2614,37.411),(-122.260282,37.41626),(-122.258,37.427)]" 348537600000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2657,37.351),(-122.2665,37.36)]" 348624000000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.266,37.348),(-122.2661,37.35),(-122.2668,37.35)]" 348710400000000000 +road name="State Hwy 24 Ramp",thepath="[(-122.2677,37.252),(-122.2674,37.258),(-122.2671,37.263),(-122.2672,37.267),(-122.2673,37.272)]" 348796800000000000 +road name="State Hwy 84 ",thepath="[(-121.7673,37.82),(-121.7664,37.828),(-121.7654,37.835),(-121.765,37.837)]" 348883200000000000 +road name="State Hwy 84 ",thepath="[(-121.9565,37.898),(-121.956589,37.89911),(-121.9569,37.903),(-121.956,37.91),(-121.9553,37.919)]" 348969600000000000 +road name="State Hwy 84 ",thepath="[(-121.9725,37.749),(-121.972151,37.75144),(-121.9715,37.756),(-121.9706,37.762),(-121.9692,37.778),(-121.9673,37.793),(-121.9637,37.813),(-121.9637,37.854),(-121.9576,37.891)]" 349056000000000000 +road name="State Hwy 84 ",thepath="[(-122.0484,37.539),(-122.0443,37.564),(-122.0423,37.577)]" 349142400000000000 +road name="State Hwy 84 ",thepath="[(-122.0484,37.539),(-122.0514,37.52),(-122.051557,37.51906),(-122.0544,37.502)]" 349228800000000000 +road name="State Hwy 84 ",thepath="[(-122.0671,37.426),(-122.0658,37.432)]" 349315200000000000 +road name="State Hwy 84 ",thepath="[(-122.0671,37.426),(-122.07,37.402),(-122.074,37.37),(-122.0773,37.338)]" 349401600000000000 +road name="State Hwy 84 Ramp",thepath="[(-122.0544,37.502),(-122.052622,37.50902),(-122.0506,37.517),(-122.0484,37.539)]" 349488000000000000 +road name="State Hwy 92 ",thepath="[(-122.1085,37.326),(-122.1095,37.322),(-122.1111,37.316),(-122.1119,37.313),(-122.1125,37.311),(-122.1131,37.308),(-122.1167,37.292),(-122.1187,37.285),(-122.12,37.28)]" 349574400000000000 +road name="State Hwy 92 Ramp",thepath="((-122.1091,37.328),(-122.1101,37.332))" 349660800000000000 +road name="State Hwy 92 Ramp",thepath="[(-122.099,37.368),(-122.0994,37.363)]" 349747200000000000 +road name="State Hwy 92 Ramp",thepath="[(-122.1086,37.321),(-122.1089,37.315),(-122.1111,37.316)]" 349833600000000000 +road name="State Hwy 92 Ramp",thepath="[(-122.1091,37.328),(-122.1101,37.332),(-122.1101,37.327),(-122.1095,37.322)]" 349920000000000000 +road name="State Hwy 92 Ramp",thepath="[(-122.1167,37.292),(-122.1185,37.295),(-122.1191,37.298)]" 350006400000000000 +road name="State Hwy 92 Ramp",thepath="[(-122.1187,37.285),(-122.1186,37.292),(-122.1193,37.29)]" 350092800000000000 +road name="State Hwy 92 Ramp",thepath="[(-122.12,37.28),(-122.1207,37.269),(-122.1204,37.27)]" 350179200000000000 +road name="State Hwy 92 Ramp",thepath="[(-122.1204,37.267),(-122.123,37.271)]" 350265600000000000 +road name="Staten Ave ",thepath="[(-122.2533,37.103),(-122.2534,37.094)]" 350352000000000000 +road name="Stearns Ave ",thepath="[(-122.1564,37.533),(-122.1533,37.512)]" 350438400000000000 +road name="Steele St ",thepath="[(-122.188,37.892),(-122.1874,37.886)]" 350524800000000000 +road name="Steinmetz Way ",thepath="[(-122.1979,37.061),(-122.1976,37.051)]" 350611200000000000 +road name="Stella St ",thepath="[(-122.14272,37.4824),(-122.1418,37.469)]" 350697600000000000 +road name="Stenhammer Dr ",thepath="[(-121.9612,37.84),(-121.9607,37.826)]" 350784000000000000 +road name="Sterne Pl ",thepath="[(-122.0318,37.838),(-122.0327,37.835)]" 350870400000000000 +road name="Steuben Ct ",thepath="[(-121.9547,37.227),(-121.9553,37.225)]" 350956800000000000 +road name="Stevens St ",thepath="[(-122.0718,37.999),(-122.0707,37.999)]" 351043200000000000 +road name="Stevenson Blvd",thepath="[(-121.9758,37.367),(-121.9782,37.334)]" 351129600000000000 +road name="Stevenson Blvd",thepath="[(-121.982964,37.27715),(-121.983567,37.27017)]" 351216000000000000 +road name="Stewart Ave ",thepath="[(-121.9797,37.174),(-121.9821,37.149)]" 351302400000000000 +road name="Stoakes Ave ",thepath="[(-122.161722,37.31574),(-122.16195,37.31467)]" 351388800000000000 +road name="Stonedale Dr ",thepath="[(-121.9171,37.877),(-121.9173,37.882)]" 351475200000000000 +road name="Stonehenge road",thepath="[(-122.037162,37.84679),(-122.0377,37.841)]" 351561600000000000 +road name="Stoneridge Dr ",thepath="[(-121.894,37.919),(-121.8902,37.925)]" 351648000000000000 +road name="Stoneridge Dr ",thepath="[(-121.9082,37.905),(-121.9089,37.904)]" 351734400000000000 +road name="Stoneridge Mall road",thepath="[(-121.9274,37.926),(-121.925,37.925)]" 351820800000000000 +road name="Stoneridge Mall road",thepath="[(-121.9287,37.963),(-121.9283,37.941)]" 351907200000000000 +road name="Stonewall Ave ",thepath="[(-122.1076,37.568),(-122.1067,37.554)]" 351993600000000000 +road name="Stony Brook ",thepath="[(-121.9429,37.244),(-121.9432,37.21)]" 352080000000000000 +road name="Storer Ave ",thepath="[(-122.1944,37.852),(-122.1934,37.854)]" 352166400000000000 +road name="Stow Ave ",thepath="[(-122.2508,37.042),(-122.2491,37.043)]" 352252800000000000 +road name="Strang Ave ",thepath="[(-122.1087,37.034),(-122.1076,37.037)]" 352339200000000000 +road name="Stratford Ave ",thepath="[(-121.9696,37.271),(-121.9732,37.254)]" 352425600000000000 +road name="Stratton Common ",thepath="[(-121.983399,37.43226),(-121.983217,37.43097)]" 352512000000000000 +road name="Stream ",thepath="[(-121.574573,37.54948),(-121.574039,37.57213)]" 352598400000000000 +road name="Stream ",thepath="[(-121.648853,37.05723),(-121.651539,37.14924)]" 352684800000000000 +road name="Strobridge Ave ",thepath="[(-122.0884,37.911),(-122.0882,37.908)]" 352771200000000000 +road name="Strong Way ",thepath="[(-122.102446,37.04885),(-122.101424,37.05337)]" 352857600000000000 +road name="Stuart St ",thepath="[(-122.2518,37.6),(-122.2507,37.601),(-122.2491,37.606)]" 352944000000000000 +road name="Stuart St ",thepath="[(-122.2554,37.601),(-122.2541,37.602)]" 353030400000000000 +road name="Suddard Ct ",thepath="[(-121.9057,37.823),(-121.9064,37.822)]" 353116800000000000 +road name="Sueirro St ",thepath="[(-122.1113,37.628),(-122.1121,37.627)]" 353203200000000000 +road name="Suffolk Way ",thepath="[(-121.8699,37.932),(-121.8732,37.92)]" 353289600000000000 +road name="Sulphur Dr ",thepath="[(-122.0517,37.719),(-122.0506,37.715)]" 353376000000000000 +road name="Sulphur Creek ",thepath="[(-122.058701,37.76216),(-122.0609,37.772)]" 353462400000000000 +road name="Sulphur Creek ",thepath="[(-122.0655,37.766),(-122.0659,37.764)]" 353548800000000000 +road name="Sumatra St ",thepath="[(-122.0743,37.277),(-122.0751,37.276)]" 353635200000000000 +road name="Summit road",thepath="[(-122.2464,37.816),(-122.2447,37.82)]" 353721600000000000 +road name="Summit road",thepath="[(-122.2479,37.874),(-122.2478,37.87)]" 353808000000000000 +road name="Sun Valley Dr ",thepath="[(-122.1174,37.493),(-122.1173,37.488)]" 353894400000000000 +road name="Sun Valley Dr ",thepath="[(-122.1191,37.47),(-122.1201,37.465)]" 353980800000000000 +road name="Sundale Dr ",thepath="[(-121.976,37.481),(-121.9776,37.464)]" 354067200000000000 +road name="Sundale Dr ",thepath="[(-121.982028,37.41595),(-121.98231,37.41254)]" 354153600000000000 +road name="Sundale Dr ",thepath="[(-121.9836,37.315),(-121.9809,37.301)]" 354240000000000000 +road name="Sundale Dr ",thepath="[(-121.9868,37.342),(-121.9867,37.338)]" 354326400000000000 +road name="Sundance Dr ",thepath="[(-121.9113,37.988),(-121.9097,37.992)]" 354412800000000000 +road name="Sundberg Ave ",thepath="[(-122.1667,37.119),(-122.1659,37.116)]" 354499200000000000 +road name="Sunnybank Pl ",thepath="[(-122.051879,37.78503),(-122.052,37.782)]" 354585600000000000 +road name="Sunnydale Ct ",thepath="[(-122.0429,37.203),(-122.0429,37.2)]" 354672000000000000 +road name="Sunnyhills road",thepath="[(-122.2257,37.111),(-122.2246,37.114)]" 354758400000000000 +road name="Sunnymere Ave ",thepath="[(-122.1681,37.776),(-122.1672,37.77)]" 354844800000000000 +road name="Sunnymere Ave ",thepath="[(-122.1707,37.791),(-122.1699,37.786)]" 354931200000000000 +road name="Sunnymere Ave ",thepath="[(-122.1729,37.803),(-122.1718,37.795)]" 355017600000000000 +road name="Sunnyside Ave ",thepath="[(-122.2469,37.232),(-122.2453,37.221)]" 355104000000000000 +road name="Sunnyside St ",thepath="[(-122.1564,37.386),(-122.1559,37.38)]" 355190400000000000 +road name="Sunnyside St ",thepath="[(-122.1611,37.462),(-122.1604,37.453)]" 355276800000000000 +road name="Sunol Blvd",thepath="[(-121.8805,37.447),(-121.8807,37.422)]" 355363200000000000 +road name="Sunol road",thepath="[(-122.1254,37.671),(-122.1254,37.666)]" 355449600000000000 +road name="Sunol Ridge Trl ",thepath="[(-121.9419,37.455),(-121.9345,37.38)]" 355536000000000000 +road name="Sunrise Dr ",thepath="[(-121.7347,37.066),(-121.7343,37.069)]" 355622400000000000 +road name="Sunset Ave ",thepath="[(-122.2176,37.901),(-122.2173,37.908)]" 355708800000000000 +road name="Sunset Blvd",thepath="[(-122.0899,37.779),(-122.0888,37.788)]" 355795200000000000 +road name="Sunset Blvd",thepath="[(-122.0932,37.755),(-122.0921,37.761)]" 355881600000000000 +road name="Sunset Blvd",thepath="[(-122.0944,37.75),(-122.0941,37.751)]" 355968000000000000 +road name="Sunset Trl ",thepath="[(-122.2375,37.574),(-122.2372,37.571)]" 356054400000000000 +road name="Sunshine Pl ",thepath="[(-122.097403,37.11209),(-122.096541,37.11436)]" 356140800000000000 +road name="Sunstream Lane",thepath="[(-121.7345,37.059),(-121.7347,37.066)]" 356227200000000000 +road name="Sunwood Dr ",thepath="[(-121.9332,37.113),(-121.9335,37.132)]" 356313600000000000 +road name="Superior Ave ",thepath="[(-122.142,37.324),(-122.1422,37.315)]" 356400000000000000 +road name="Superior Dr ",thepath="[(-121.7724,37.543),(-121.7727,37.543)]" 356486400000000000 +road name="Surry Pl ",thepath="[(-122.0052,37.685),(-122.006,37.679)]" 356572800000000000 +road name="Sussex Way ",thepath="[(-122.0657,37.227),(-122.0669,37.222),(-122.0673,37.219)]" 356659200000000000 +road name="Suter St ",thepath="[(-122.2009,37.89),(-122.2007,37.888)]" 356745600000000000 +road name="Suter St ",thepath="[(-122.2072,37.94),(-122.2061,37.931)]" 356832000000000000 +road name="Sutter Dr ",thepath="[(-121.9893,37.359),(-121.987,37.35)]" 356918400000000000 +road name="Sutter Dr ",thepath="[(-121.9951,37.377),(-121.9943,37.373)]" 357004800000000000 +road name="Sutter Gate Ave ",thepath="[(-121.8838,37.866),(-121.8845,37.864)]" 357091200000000000 +road name="Sutton Loop",thepath="[(-121.9994,37.586),(-121.9981,37.576)]" 357177600000000000 +road name="Swan Dr ",thepath="[(-121.7996,37.845),(-121.7991,37.834)]" 357264000000000000 +road name="Sybil Ave ",thepath="[(-122.1443,37.213),(-122.1435,37.215)]" 357350400000000000 +road name="Sycamore Ave ",thepath="[(-122.0759,37.633),(-122.0752,37.636)]" 357436800000000000 +road name="Sycamore Ave ",thepath="[(-122.0826,37.609),(-122.0818,37.606)]" 357523200000000000 +road name="Sycamore St ",thepath="[(-122.0361,37.294),(-122.0354,37.291)]" 357609600000000000 +road name="Sycamore St ",thepath="[(-122.2715,37.16),(-122.2739,37.163)]" 357696000000000000 +road name="Sydney Ave ",thepath="[(-121.7678,37.636),(-121.7669,37.636)]" 357782400000000000 +road name="Sydney Cir ",thepath="[(-122.098211,37.07652),(-122.09723,37.06547)]" 357868800000000000 +road name="Sylvan Glen ",thepath="[(-122.065238,37.685),(-122.065615,37.67879)]" 357955200000000000 +road name="Sylvaner Dr ",thepath="[(-121.8475,37.61),(-121.8482,37.607)]" 358041600000000000 +road name="Sylvaner Way ",thepath="[(-121.907301,37.67596),(-121.908111,37.67419)]" 358128000000000000 +road name="Sylvester Dr ",thepath="[(-122.041,37.815),(-122.0405,37.812)]" 358214400000000000 +road name="Sylvia Cir ",thepath="[(-121.860125,37.6435),(-121.8603,37.64325)]" 358300800000000000 +road name="Tacchella Way ",thepath="[(-121.994785,37.62496),(-121.994311,37.61417)]" 358387200000000000 +road name="Tahiti Lane",thepath="[(-122.2411,37.343),(-122.240607,37.3499),(-122.2401,37.357)]" 358473600000000000 +road name="Talbot Ave ",thepath="[(-122.2925,37.847),(-122.2925,37.843)]" 358560000000000000 +road name="Talbot Ave ",thepath="[(-122.2967,37.989),(-122.2964,37.975),(-122.2959,37.959)]" 358646400000000000 +road name="Tallahassee St ",thepath="[(-122.0989,37.352),(-122.1012,37.345)]" 358732800000000000 +road name="Tamalpais Path",thepath="[(-122.2596,37.866),(-122.2599,37.872)]" 358819200000000000 +road name="Tamalpais road",thepath="[(-122.2593,37.836),(-122.2588,37.842)]" 358905600000000000 +road name="Tamarack Dr ",thepath="[(-121.9207,37.159),(-121.922,37.155)]" 358992000000000000 +road name="Tamarack Dr ",thepath="[(-121.9255,37.155),(-121.9266,37.156)]" 359078400000000000 +road name="Tamarack Dr ",thepath="[(-121.9304,37.16),(-121.9313,37.163)]" 359164800000000000 +road name="Tamarack Dr ",thepath="[(-121.932412,37.17516),(-121.9327,37.179)]" 359251200000000000 +road name="Tamayo St ",thepath="[(-122.0184,37.732),(-122.019,37.729)]" 359337600000000000 +road name="Tamayo St ",thepath="[(-122.0201,37.723),(-122.0204,37.72)]" 359424000000000000 +road name="Tampa Ave ",thepath="[(-122.0747,37.327),(-122.0747,37.314),(-122.0746,37.308)]" 359510400000000000 +road name="Tanager Dr ",thepath="[(-121.8775,37.831),(-121.8778,37.838)]" 359596800000000000 +road name="Tanglewood Path",thepath="[(-122.2431,37.628),(-122.2427,37.626)]" 359683200000000000 +road name="Tarraville Creek ",thepath="[(-121.52544,37.95569),(-121.525089,37.948)]" 359769600000000000 +road name="Tarraville Creek ",thepath="[(-121.528505,37.9837),(-121.528147,37.97997)]" 359856000000000000 +road name="Tarraville Creek ",thepath="[(-121.53429,37.98943),(-121.532627,37.98722)]" 359942400000000000 +road name="Tarraville Creek ",thepath="[(-121.536091,37.99721),(-121.536763,37)]" 360028800000000000 +road name="Tarraville Creek road",thepath="[(-121.52582,37.96459),(-121.525715,37.96296)]" 360115200000000000 +road name="Tarraville Creek road",thepath="[(-121.530642,37.9828),(-121.530608,37.98278)]" 360201600000000000 +road name="Tartarian St ",thepath="[(-122.1774,37.35),(-122.1768,37.352)]" 360288000000000000 +road name="Tassajara road",thepath="[(-121.8709,37.099),(-121.8713,37.048)]" 360374400000000000 +road name="Tassajara Creek ",thepath="[(-121.87866,37.98898),(-121.8782,37.015)]" 360460800000000000 +road name="Tassajara Creek ",thepath="[(-121.8862,37.901),(-121.8847,37.924)]" 360547200000000000 +road name="Taurus Ave ",thepath="[(-122.2159,37.416),(-122.2128,37.389)]" 360633600000000000 +road name="Taylor Ave ",thepath="[(-122.0547,37.245),(-122.0541,37.241),(-122.0535,37.237)]" 360720000000000000 +road name="Taylor Ave ",thepath="[(-122.280873,37.72975),(-122.280388,37.72958)]" 360806400000000000 +road name="Teakwood St ",thepath="[(-122.1109,37.58),(-122.1104,37.574)]" 360892800000000000 +road name="Technology Dr ",thepath="[(-121.9539,37.109),(-121.9536,37.099)]" 360979200000000000 +road name="Telegraph Ave ",thepath="[(-122.2581,37.635),(-122.2583,37.625)]" 361065600000000000 +road name="Telegraph Ave ",thepath="[(-122.2585,37.616),(-122.2586,37.607)]" 361152000000000000 +road name="Telegraph Ave ",thepath="[(-122.2589,37.588),(-122.2591,37.578)]" 361238400000000000 +road name="Telegraph Ave ",thepath="[(-122.2594,37.547),(-122.2596,37.541)]" 361324800000000000 +road name="Telegraph Ave ",thepath="[(-122.2614,37.411),(-122.2613,37.414)]" 361411200000000000 +road name="Telegraph Ave ",thepath="[(-122.2618,37.384),(-122.261742,37.38806)]" 361497600000000000 +road name="Telegraph Ave ",thepath="[(-122.2625,37.353),(-122.2623,37.361)]" 361584000000000000 +road name="Telegraph Ave ",thepath="[(-122.2647,37.266),(-122.2647,37.274)]" 361670400000000000 +road name="Telegraph Ave ",thepath="[(-122.2679,37.147),(-122.2678,37.149)]" 361756800000000000 +road name="Telegraph Ave ",thepath="[(-122.2688,37.109),(-122.2686,37.114)]" 361843200000000000 +road name="Telegraph Ave ",thepath="[(-122.2693,37.089),(-122.2691,37.096)]" 361929600000000000 +road name="Telegraph Ave ",thepath="[(-122.2699,37.067),(-122.2697,37.074)]" 362016000000000000 +road name="Temescal Cir ",thepath="[(-122.282639,37.36326),(-122.28206,37.3665)]" 362102400000000000 +road name="Temescal Creek ",thepath="[(-122.284945,37.36017),(-122.2855,37.359)]" 362188800000000000 +road name="Temescal Creek ",thepath="[(-122.2922,37.344),(-122.2937,37.341)]" 362275200000000000 +road name="Tennyson road",thepath="[(-122.056941,37.35835),(-122.0562,37.36)]" 362361600000000000 +road name="Tennyson road",thepath="[(-122.0605,37.352),(-122.0602,37.354)]" 362448000000000000 +road name="Tennyson road",thepath="[(-122.062,37.345),(-122.0625,37.343)]" 362534400000000000 +road name="Tennyson road",thepath="[(-122.0682,37.318),(-122.0685,37.317)]" 362620800000000000 +road name="Tennyson road",thepath="[(-122.0891,37.317),(-122.0927,37.317)]" 362707200000000000 +road name="Tennyson road",thepath="[(-122.1035,37.272),(-122.1041,37.268)]" 362793600000000000 +road name="Terrace St ",thepath="[(-122.2539,37.299),(-122.2523,37.321)]" 362880000000000000 +road name="Terrace Walk",thepath="[(-122.2719,37.89),(-122.2705,37.884)]" 362966400000000000 +road name="Tesla road",thepath="[(-121.570042,37.38752),(-121.573978,37.37661)]" 363052800000000000 +road name="Tesla road",thepath="[(-121.588398,37.4085),(-121.596897,37.4397)]" 363139200000000000 +road name="Tesla road",thepath="[(-121.613819,37.51806),(-121.62334,37.46389)]" 363225600000000000 +road name="Tesla road",thepath="[(-121.646458,37.4545),(-121.646946,37.45847)]" 363312000000000000 +road name="Tesla road",thepath="[(-121.6705,37.607),(-121.667684,37.55608)]" 363398400000000000 +road name="Tesla road",thepath="[(-121.6774,37.632),(-121.675,37.633)]" 363484800000000000 +road name="Tevis St ",thepath="[(-122.2011,37.621),(-122.2007,37.616)]" 363571200000000000 +road name="Tevlin St ",thepath="[(-122.2866,37.83),(-122.2871,37.819)]" 363657600000000000 +road name="Texas St ",thepath="[(-122.2087,37.942),(-122.2076,37.937)]" 363744000000000000 +road name="Thackeray Ave ",thepath="[(-122.072,37.305),(-122.0715,37.298)]" 363830400000000000 +road name="The Cir ",thepath="[(-122.2721,37.904),(-122.2718,37.905)]" 363916800000000000 +road name="The Cres",thepath="[(-122.2534,37.945),(-122.254,37.941)]" 364003200000000000 +road name="The Alameda ",thepath="[(-122.2749,37.863),(-122.2744,37.855)]" 364089600000000000 +road name="The Alameda ",thepath="[(-122.276,37.89),(-122.2759,37.882)]" 364176000000000000 +road name="The Alameda ",thepath="[(-122.2765,37.916),(-122.2762,37.902)]" 364262400000000000 +road name="The Alameda ",thepath="[(-122.2805,37.996),(-122.2808,37.988)]" 364348800000000000 +road name="The South Crossways ",thepath="[(-122.2442,37.529),(-122.2443,37.522)]" 364435200000000000 +road name="The Uplands ",thepath="[(-122.2477,37.545),(-122.246,37.543),(-122.245,37.538)]" 364521600000000000 +road name="Theresa Way ",thepath="[(-121.7273,37.877),(-121.7272,37.868)]" 364608000000000000 +road name="Theresa Way ",thepath="[(-121.7289,37.906),(-121.728,37.899)]" 364694400000000000 +road name="Theta St ",thepath="[(-122.0181,37.565),(-122.018394,37.56324)]" 364780800000000000 +road name="Theta St ",thepath="[(-122.0197,37.553),(-122.02,37.55)]" 364867200000000000 +road name="Thomas Ave ",thepath="[(-122.2487,37.375),(-122.2479,37.39)]" 364953600000000000 +road name="Thornhill Dr ",thepath="[(-122.204,37.39),(-122.201,37.389)]" 365040000000000000 +road name="Thornhill Dr ",thepath="[(-122.2131,37.335),(-122.2112,37.35)]" 365126400000000000 +road name="Thornton Ave ",thepath="[(-122.0036,37.671),(-122.0048,37.66)]" 365212800000000000 +road name="Thornton Ave ",thepath="[(-122.0068,37.644),(-122.0083,37.63)]" 365299200000000000 +road name="Thornton Ave ",thepath="[(-122.0127,37.583),(-122.0132,37.575)]" 365385600000000000 +road name="Thornton Ave ",thepath="[(-122.0164,37.537),(-122.0175,37.523)]" 365472000000000000 +road name="Thornton Ave ",thepath="[(-122.0211,37.477),(-122.0214,37.473)]" 365558400000000000 +road name="Thornton Ave ",thepath="[(-122.0291,37.379),(-122.03,37.37)]" 365644800000000000 +road name="Thornton Ave ",thepath="[(-122.0636,37.335),(-122.0626,37.303)]" 365731200000000000 +road name="Thornton St ",thepath="[(-122.1505,37.215),(-122.1526,37.206)]" 365817600000000000 +road name="Thornton St ",thepath="[(-122.1572,37.189),(-122.1576,37.188)]" 365904000000000000 +road name="Thousand Oaks Blvd",thepath="[(-122.2799,37.975),(-122.2779,37.972)]" 365990400000000000 +road name="Thousand Oaks Blvd",thepath="[(-122.283,37.972),(-122.2824,37.974)]" 366076800000000000 +road name="Tidal Canal ",thepath="[(-122.2302,37.697),(-122.229,37.694)]" 366163200000000000 +road name="Tidal Canal ",thepath="[(-122.2428,37.791),(-122.2386,37.745)]" 366249600000000000 +road name="Tidewater Ave ",thepath="[(-122.2193,37.625),(-122.2174,37.609)]" 366336000000000000 +road name="Tideway Dr ",thepath="[(-122.2877,37.692),(-122.2854,37.704)]" 366422400000000000 +road name="Tiffin road",thepath="[(-122.2086,37.069),(-122.2076,37.07)]" 366508800000000000 +road name="Tilgrim Way ",thepath="[(-122.0831,37.211),(-122.084,37.211)]" 366595200000000000 +road name="Timber St ",thepath="[(-122.0175,37.38),(-122.0139,37.362)]" 366681600000000000 +road name="Timbercreek Ter ",thepath="[(-121.9527,37.351),(-121.952496,37.35039)]" 366768000000000000 +road name="Timpanogas Cir ",thepath="[(-121.963,37.752),(-121.962723,37.74924)]" 366854400000000000 +road name="Tina Way ",thepath="[(-122.0322,37.185),(-122.0305,37.196)]" 366940800000000000 +road name="Tinder Ct ",thepath="[(-122.0496,37.109),(-122.0488,37.12)]" 367027200000000000 +road name="Tioga Ct ",thepath="[(-121.847804,37.6667),(-121.848197,37.66978)]" 367113600000000000 +road name="Tissiack Way ",thepath="[(-121.920364,37),(-121.9208,37.995)]" 367200000000000000 +road name="Toler Ave ",thepath="[(-122.1575,37.269),(-122.1593,37.261)]" 367286400000000000 +road name="Tonopah Ct ",thepath="[(-121.914,37.684),(-121.9138,37.682)]" 367372800000000000 +road name="Topawa Dr ",thepath="[(-121.9204,37.878),(-121.9197,37.88)]" 367459200000000000 +road name="Toroges Creek ",thepath="[(-121.9217,37.808),(-121.922457,37.80485)]" 367545600000000000 +road name="Toroges Creek ",thepath="[(-121.925,37.795),(-121.9268,37.789)]" 367632000000000000 +road name="Torrano Ave ",thepath="[(-122.0685,37.547),(-122.0679,37.551)]" 367718400000000000 +road name="Tory Way ",thepath="[(-121.9162,37.139),(-121.917,37.132)]" 367804800000000000 +road name="Totterdell St ",thepath="[(-122.187,37.228),(-122.1864,37.224)]" 367891200000000000 +road name="Touriga Dr ",thepath="[(-121.8512,37.611),(-121.851283,37.60893)]" 367977600000000000 +road name="Touriga Dr ",thepath="[(-121.8512,37.644),(-121.8511,37.648)]" 368064000000000000 +road name="Touriga Dr ",thepath="[(-121.8521,37.566),(-121.8523,37.559)]" 368150400000000000 +road name="Towers St ",thepath="[(-122.1296,37.096),(-122.1286,37.089)]" 368236800000000000 +road name="Toyon Pl ",thepath="[(-122.0469,37.951),(-122.0464,37.953)]" 368323200000000000 +road name="Tozier St ",thepath="[(-122.0502,37.394),(-122.0497,37.39)]" 368409600000000000 +road name="Trade Wind Lane",thepath="[(-121.9887,37.294),(-121.9891,37.288)]" 368496000000000000 +road name="Trafalgar Ave ",thepath="[(-122.1036,37.369),(-122.1043,37.375)]" 368582400000000000 +road name="Treeview St ",thepath="[(-122.0379,37.267),(-122.0375,37.262)]" 368668800000000000 +road name="Treeview St ",thepath="[(-122.039,37.282),(-122.0387,37.278)]" 368755200000000000 +road name="Tremont St ",thepath="[(-122.267,37.503),(-122.2672,37.514)]" 368841600000000000 +road name="Trenery Dr ",thepath="[(-121.866449,37.88045),(-121.866515,37.88044)]" 368928000000000000 +road name="Trenton Dr ",thepath="[(-122.0655,37.155),(-122.0647,37.142)]" 369014400000000000 +road name="Trestle Glen road",thepath="[(-122.221239,37.12059),(-122.2207,37.125),(-122.2201,37.133)]" 369100800000000000 +road name="Trimingham Dr ",thepath="[(-121.871338,37.76396),(-121.872239,37.76736)]" 369187200000000000 +road name="Trojan Ave ",thepath="[(-122.144,37.868),(-122.1446,37.867)]" 369273600000000000 +road name="Trojan Ave ",thepath="[(-122.1467,37.864),(-122.1483,37.862)]" 369360000000000000 +road name="Trojan Ave ",thepath="[(-122.1514,37.858),(-122.1522,37.857)]" 369446400000000000 +road name="Trombas Ave ",thepath="[(-122.1428,37.217),(-122.1425,37.211)]" 369532800000000000 +road name="Tropicana Way ",thepath="[(-122.0492,37.892),(-122.050057,37.88256),(-122.0513,37.874)]" 369619200000000000 +road name="Truman Pl ",thepath="[(-121.9933,37.285),(-121.9938,37.279)]" 369705600000000000 +road name="Tudor road",thepath="[(-122.1808,37.216),(-122.1801,37.216)]" 369792000000000000 +road name="Tulare Ave ",thepath="[(-122.2811,37.889),(-122.2816,37.868)]" 369878400000000000 +road name="Tule Lake Lane",thepath="[(-122.0568,37.871),(-122.0559,37.866)]" 369964800000000000 +road name="Tulip Ave ",thepath="[(-122.1901,37.881),(-122.1898,37.877)]" 370051200000000000 +road name="Tumbleweed Ct ",thepath="[(-122.0715,37.906),(-122.0718,37.908)]" 370137600000000000 +road name="Tunnel road",thepath="[(-122.2382,37.555),(-122.2374,37.553)]" 370224000000000000 +road name="Tunnel road",thepath="[(-122.2405,37.574),(-122.2402,37.57)]" 370310400000000000 +road name="Tunnel road",thepath="[(-122.2427,37.581),(-122.2414,37.579)]" 370396800000000000 +road name="Tunnel Creek ",thepath="[(-121.610752,37.58239),(-121.624698,37.83019)]" 370483200000000000 +road name="Tupelo Ter ",thepath="[(-122.059087,37.6113),(-122.057021,37.59942)]" 370569600000000000 +road name="Tupelo Ter ",thepath="[(-122.061851,37.62675),(-122.0606,37.62)]" 370656000000000000 +road name="Turban Ct ",thepath="[(-121.9737,37.141),(-121.9729,37.143)]" 370742400000000000 +road name="Turnstone Ct ",thepath="[(-121.7967,37.812),(-121.7967,37.814)]" 370828800000000000 +road name="Turquoise St ",thepath="[(-121.918671,37.20347),(-121.918562,37.20173)]" 370915200000000000 +road name="Twain Ave ",thepath="[(-122.2574,37.904),(-122.2563,37.907)]" 371001600000000000 +road name="Twin Peaks Ter ",thepath="[(-121.9785,37.427),(-121.9783,37.431)]" 371088000000000000 +road name="Tyee Ct ",thepath="[(-122.084,37.918),(-122.084,37.913)]" 371174400000000000 +road name="Tyler Lane",thepath="[(-122.0674,37.157),(-122.066,37.146)]" 371260800000000000 +road name="Tyler Pl ",thepath="[(-121.9973,37.293),(-121.9986,37.289)]" 371347200000000000 +road name="Tyler St ",thepath="[(-122.2782,37.525),(-122.278041,37.52523)]" 371433600000000000 +road name="Tyrrell Ave ",thepath="[(-122.0709,37.334),(-122.0708,37.329)]" 371520000000000000 +road name="Tyrrell Ave ",thepath="[(-122.0751,37.441),(-122.0759,37.428)]" 371606400000000000 +road name="Ulmeca Pl ",thepath="[(-121.9129,37.786),(-121.9125,37.779)]" 371692800000000000 +road name="Underwood Ave ",thepath="[(-122.0823,37.477),(-122.0822,37.469)]" 371779200000000000 +road name="Underwood Ave ",thepath="[(-122.1852,37.828),(-122.1846,37.809)]" 371865600000000000 +road name="Union St ",thepath="[(-121.9578,37.334),(-121.9584,37.33)]" 371952000000000000 +road name="Union St ",thepath="[(-122.2527,37.731),(-122.2521,37.739)]" 372038400000000000 +road name="Union St ",thepath="[(-122.2555,37.689),(-122.2549,37.698)]" 372124800000000000 +road name="Union St ",thepath="[(-122.2579,37.654),(-122.2573,37.663)]" 372211200000000000 +road name="Union St ",thepath="[(-122.2839,37.21),(-122.2833,37.227)]" 372297600000000000 +road name="Union St ",thepath="[(-122.2854,37.164),(-122.2852,37.178),(-122.2844,37.195)]" 372384000000000000 +road name="Union St ",thepath="[(-122.2862,37.14),(-122.2858,37.152)]" 372470400000000000 +road name="Union St ",thepath="[(-122.2881,37.092),(-122.2876,37.107)]" 372556800000000000 +road name="Union St ",thepath="[(-122.2898,37.042),(-122.2897,37.044)]" 372643200000000000 +road name="Union City Blvd",thepath="[(-122.0674,37.657),(-122.0669,37.654)]" 372729600000000000 +road name="Union City Blvd",thepath="[(-122.078284,37.74531),(-122.078001,37.74022)]" 372816000000000000 +road name="Union City Blvd",thepath="[(-122.0791,37.76),(-122.0786,37.751)]" 372902400000000000 +road name="Union City Blvd",thepath="[(-122.0795,37.923),(-122.0797,37.907)]" 372988800000000000 +road name="Union City Blvd",thepath="[(-122.0797,37.883),(-122.0797,37.878)]" 373075200000000000 +road name="Union City Blvd",thepath="[(-122.0797,37.964),(-122.0797,37.959)]" 373161600000000000 +road name="Union City Blvd",thepath="[(-122.0805,37.986),(-122.0804,37.972)]" 373248000000000000 +road name="University Ave ",thepath="[(-122.2711,37.718),(-122.27,37.719)]" 373334400000000000 +road name="University Dr ",thepath="[(-122.0275,37.971),(-122.0264,37.97)]" 373420800000000000 +road name="Upton Ave ",thepath="[(-122.1298,37.99),(-122.1297,37.984)]" 373507200000000000 +road name="Urban St ",thepath="[(-121.9714,37.412),(-121.971,37.41)]" 373593600000000000 +road name="Usher St ",thepath="[(-122.1276,37.885),(-122.1275,37.865)]" 373680000000000000 +road name="Utah St ",thepath="[(-121.8591,37.68),(-121.8584,37.682)]" 373766400000000000 +road name="Vaca Dr ",thepath="[(-121.9531,37.448),(-121.9531,37.442)]" 373852800000000000 +road name="Val St ",thepath="[(-121.9739,37.325),(-121.9746,37.324)]" 373939200000000000 +road name="Valita Dr ",thepath="[(-122.1417,37.192),(-122.141,37.195)]" 374025600000000000 +road name="Valle Vista Ave ",thepath="[(-122.246,37.162),(-122.2461,37.168)]" 374112000000000000 +road name="Vallecitos road",thepath="[(-121.7875,37.454),(-121.7856,37.463),(-121.7822,37.482)]" 374198400000000000 +road name="Vallecitos road",thepath="[(-121.8177,37.142),(-121.836,37.053)]" 374284800000000000 +road name="Vallecitos road",thepath="[(-121.8631,37.951),(-121.868,37.93)]" 374371200000000000 +road name="Vallecitos road",thepath="[(-121.8699,37.916),(-121.8703,37.891)]" 374457600000000000 +road name="Vallecitos Creek ",thepath="[(-121.8423,37.033),(-121.8379,37.094)]" 374544000000000000 +road name="Vallejo St ",thepath="[(-121.9718,37.765),(-121.9719,37.769)]" 374630400000000000 +road name="Vallejo St ",thepath="[(-122.2869,37.46),(-122.2872,37.466)]" 374716800000000000 +road name="Valley Ave ",thepath="[(-121.8591,37.733),(-121.8628,37.76)]" 374803200000000000 +road name="Valley Ave ",thepath="[(-121.8673,37.761),(-121.8677,37.76)]" 374889600000000000 +road name="Valley Ave ",thepath="[(-121.887,37.767),(-121.8878,37.767),(-121.8888,37.767)]" 374976000000000000 +road name="Valley Ave ",thepath="[(-121.8962,37.644),(-121.89632,37.6086),(-121.896359,37.59716)]" 375062400000000000 +road name="Valley Dr ",thepath="[(-121.863815,37.76063),(-121.8644,37.761)]" 375148800000000000 +road name="Valley Dr ",thepath="[(-121.8967,37.761),(-121.8982,37.746)]" 375235200000000000 +road name="Valley Dr ",thepath="[(-121.897701,37.6866),(-121.8972,37.677),(-121.89692,37.66207)]" 375321600000000000 +road name="Valley St ",thepath="[(-122.17,37.16),(-122.1707,37.158)]" 375408000000000000 +road name="Valley Brook Ct ",thepath="[(-122.0479,37.871),(-122.0478,37.867)]" 375494400000000000 +road name="Valley Trails Dr ",thepath="[(-121.9038,37.75),(-121.9029,37.754)]" 375580800000000000 +road name="Valley Trails Dr ",thepath="[(-121.9066,37.776),(-121.9075,37.775),(-121.9084,37.774)]" 375667200000000000 +road name="Valley Trails Dr ",thepath="[(-121.908,37.739),(-121.9075,37.739)]" 375753600000000000 +road name="Valley Trails Dr ",thepath="[(-121.9098,37.756),(-121.91,37.753)]" 375840000000000000 +road name="Valpey Park Ave ",thepath="[(-121.9748,37.188),(-121.9756,37.186)]" 375926400000000000 +road name="Van Ave ",thepath="[(-122.1212,37.142),(-122.1206,37.128)]" 376012800000000000 +road name="Van Buren Ave ",thepath="[(-122.2521,37.111),(-122.2512,37.113)]" 376099200000000000 +road name="Van Mourik Ave ",thepath="[(-122.1718,37.795),(-122.1716,37.801)]" 376185600000000000 +road name="Vancouver Way ",thepath="[(-121.7753,37.665),(-121.7742,37.666)]" 376272000000000000 +road name="Vancouver Way ",thepath="[(-121.7775,37.667),(-121.7768,37.666)]" 376358400000000000 +road name="Vanda Way ",thepath="[(-121.9989,37.807),(-121.9993,37.8)]" 376444800000000000 +road name="Vanderbilt St ",thepath="[(-122.039,37.254),(-122.0386,37.243)]" 376531200000000000 +road name="Vane Common ",thepath="[(-122.056732,37.54797),(-122.056633,37.54543)]" 376617600000000000 +road name="Vargas road",thepath="[(-121.9161,37.512),(-121.9165,37.504)]" 376704000000000000 +road name="Vasco road",thepath="[(-121.717311,37.99316),(-121.7174,37.971)]" 376790400000000000 +road name="Vasco road",thepath="[(-121.7177,37.70674),(-121.7177,37.68228)]" 376876800000000000 +road name="Vasco road",thepath="[(-121.7217,37.062),(-121.72,37.039)]" 376963200000000000 +road name="Vasco road",thepath="[(-121.7229,37.093),(-121.7228,37.089)]" 377049600000000000 +road name="Vasco road",thepath="[(-121.7231,37.108),(-121.7232,37.114)]" 377136000000000000 +road name="Vasco road",thepath="[(-121.737,37.725),(-121.7282,37.489)]" 377222400000000000 +road name="Vasquez Ct ",thepath="[(-122.0252,37.029),(-122.025392,37.02756)]" 377308800000000000 +road name="Vassar Ave ",thepath="[(-122.1245,37.952),(-122.1246,37.945)]" 377395200000000000 +road name="Vaughn Ave ",thepath="[(-121.7118,37.061),(-121.7074,37.08)]" 377481600000000000 +road name="Vaughn Ave ",thepath="[(-122.0802,37.053),(-122.0801,37.026)]" 377568000000000000 +road name="Vegas Ave ",thepath="[(-122.075906,37.8929),(-122.0726,37.894)]" 377654400000000000 +road name="Ventura Ave ",thepath="[(-122.2832,37.864),(-122.283509,37.8555)]" 377740800000000000 +road name="Vera Ave ",thepath="[(-122.1318,37.984),(-122.1317,37.977)]" 377827200000000000 +road name="Verdemar Dr ",thepath="[(-122.2454,37.333),(-122.2453,37.335)]" 377913600000000000 +road name="Vergil St ",thepath="[(-122.0685,37.886),(-122.0681,37.88)]" 378000000000000000 +road name="Vermont St ",thepath="[(-122.2424,37.16),(-122.2415,37.168)]" 378086400000000000 +road name="Vernetti Way ",thepath="[(-122.064379,37.90817),(-122.063821,37.90117)]" 378172800000000000 +road name="Vernon Ave ",thepath="[(-122.0039,37.383),(-122.006,37.358)]" 378259200000000000 +road name="Vernon St ",thepath="[(-122.2509,37.179),(-122.2503,37.184)]" 378345600000000000 +road name="Verona Ave ",thepath="[(-121.7808,37.721),(-121.7801,37.721)]" 378432000000000000 +road name="Versailles Ave ",thepath="[(-122.2383,37.577),(-122.2374,37.589)]" 378518400000000000 +road name="Via Alamitos ",thepath="[(-122.1302,37.675),(-122.13,37.668)]" 378604800000000000 +road name="Via Alamitos ",thepath="[(-122.1302,37.704),(-122.1303,37.697)]" 378691200000000000 +road name="Via Amigos ",thepath="[(-122.1406,37.731),(-122.1424,37.722)]" 378777600000000000 +road name="Via Annette ",thepath="[(-122.1389,37.65),(-122.1388,37.631)]" 378864000000000000 +road name="Via Arriba ",thepath="[(-122.122,37.712),(-122.1216,37.702)]" 378950400000000000 +road name="Via Arroyo ",thepath="[(-122.1256,37.835),(-122.1236,37.823)]" 379036800000000000 +road name="Via Barrett ",thepath="[(-122.1495,37.736),(-122.1503,37.733)]" 379123200000000000 +road name="Via Bellita ",thepath="[(-122.121893,37.82393),(-122.12257,37.81959)]" 379209600000000000 +road name="Via Buena Vista ",thepath="[(-122.1366,37.652),(-122.1374,37.651)]" 379296000000000000 +road name="Via Carmen ",thepath="[(-122.1401,37.674),(-122.1397,37.65)]" 379382400000000000 +road name="Via Chiquita ",thepath="[(-122.1321,37.693),(-122.1319,37.681)]" 379468800000000000 +road name="Via Chiquita ",thepath="[(-122.1322,37.708),(-122.1321,37.702)]" 379555200000000000 +road name="Via Chiquita ",thepath="[(-122.1337,37.731),(-122.1333,37.724)]" 379641600000000000 +road name="Via Cordoba ",thepath="[(-122.1246,37.853),(-122.1239,37.853)]" 379728000000000000 +road name="Via de Los Cerros ",thepath="[(-121.901117,37.7212),(-121.900094,37.71647)]" 379814400000000000 +road name="Via de Los Milagros ",thepath="[(-121.8982,37.746),(-121.8975,37.743)]" 379900800000000000 +road name="Via del Prado ",thepath="[(-122.135,37.797),(-122.1339,37.78)]" 379987200000000000 +road name="Via del Sol ",thepath="[(-121.7899,37.624),(-121.7901,37.615)]" 380073600000000000 +road name="Via Diego ",thepath="[(-122.118617,37.81903),(-122.1194,37.814)]" 380160000000000000 +road name="Via el Cerrito ",thepath="[(-122.1337,37.691),(-122.1336,37.676)]" 380246400000000000 +road name="Via Enrico ",thepath="[(-122.1379,37.82),(-122.1389,37.818)]" 380332800000000000 +road name="Via Enrico ",thepath="[(-122.139846,37.81379),(-122.1407,37.81)]" 380419200000000000 +road name="Via Escondido ",thepath="[(-122.1409,37.747),(-122.141278,37.74521)]" 380505600000000000 +road name="Via Escondido ",thepath="[(-122.142774,37.73812),(-122.143583,37.73429)]" 380592000000000000 +road name="Via Esperanza ",thepath="[(-122.1273,37.676),(-122.1302,37.675)]" 380678400000000000 +road name="Via Frances ",thepath="[(-122.1387,37.68),(-122.1386,37.666)]" 380764800000000000 +road name="Via Granada ",thepath="[(-122.121893,37.82393),(-122.1217,37.822)]" 380851200000000000 +road name="Via Harriet ",thepath="[(-122.1474,37.709),(-122.1473,37.691),(-122.1456,37.674)]" 380937600000000000 +road name="Via Hermana ",thepath="[(-122.1433,37.791),(-122.1442,37.786)]" 381024000000000000 +road name="Via la Jolla ",thepath="[(-122.1346,37.699),(-122.1345,37.691)]" 381110400000000000 +road name="Via Lacqua ",thepath="[(-122.1463,37.734),(-122.1471,37.73)]" 381196800000000000 +road name="Via Lucas ",thepath="[(-122.1381,37.71),(-122.1396,37.71)]" 381283200000000000 +road name="Via Manzanas ",thepath="[(-122.1248,37.761),(-122.1265,37.753)]" 381369600000000000 +road name="Via Matero ",thepath="[(-122.116,37.806),(-122.1175,37.797)]" 381456000000000000 +road name="Via Montalvo ",thepath="[(-121.7867,37.962),(-121.7861,37.967)]" 381542400000000000 +road name="Via Natal ",thepath="[(-122.1434,37.684),(-122.1441,37.68)]" 381628800000000000 +road name="Via Natal ",thepath="[(-122.1449,37.677),(-122.1456,37.674)]" 381715200000000000 +road name="Via Nueva ",thepath="[(-122.1461,37.743),(-122.1456,37.738)]" 381801600000000000 +road name="Via Paro ",thepath="[(-122.129,37.78),(-122.1276,37.757)]" 381888000000000000 +road name="Via Peralta ",thepath="[(-121.8941,37.729),(-121.8938,37.726)]" 381974400000000000 +road name="Via Perdido ",thepath="[(-122.1295,37.741),(-122.1281,37.727)]" 382060800000000000 +road name="Via Pinale ",thepath="[(-122.1333,37.793),(-122.1315,37.773)]" 382147200000000000 +road name="Via Primero ",thepath="[(-122.1223,37.774),(-122.1211,37.755)]" 382233600000000000 +road name="Via Redondo ",thepath="[(-122.141,37.7),(-122.1423,37.707)]" 382320000000000000 +road name="Via Rodriguez ",thepath="[(-122.1234,37.809),(-122.1233,37.806)]" 382406400000000000 +road name="Via Segundo ",thepath="[(-122.1207,37.778),(-122.1189,37.765)]" 382492800000000000 +road name="Via Tovita ",thepath="[(-122.1336,37.64),(-122.1356,37.638)]" 382579200000000000 +road name="Via Vega ",thepath="[(-122.1388,37.837),(-122.1389,37.818)]" 382665600000000000 +road name="Via Verde ",thepath="[(-122.1165,37.788),(-122.1175,37.782)]" 382752000000000000 +road name="Via Vista ",thepath="[(-122.1364,37.745),(-122.1391,37.735)]" 382838400000000000 +road name="Via Zapata ",thepath="[(-121.9434,37.147),(-121.9441,37.161)]" 382924800000000000 +road name="Vicente Pl ",thepath="[(-122.2329,37.572),(-122.232,37.578)]" 383011200000000000 +road name="Vicente St ",thepath="[(-122.2598,37.427),(-122.2598,37.432)]" 383097600000000000 +road name="Victor Ave ",thepath="[(-122.1914,37.972),(-122.1901,37.964)]" 383184000000000000 +road name="Victor Ave ",thepath="[(-122.1922,37.987),(-122.1918,37.981)]" 383270400000000000 +road name="Victoria Ave ",thepath="[(-122.0739,37.905),(-122.0759,37.903)]" 383356800000000000 +road name="Victoria Lane",thepath="[(-121.663807,37.54316),(-121.663944,37.56139)]" 383443200000000000 +road name="Victoria Bay ",thepath="[(-122.2363,37.399),(-122.2365,37.393)]" 383529600000000000 +road name="Victory Dr ",thepath="[(-122.1091,37.635),(-122.109281,37.6426)]" 383616000000000000 +road name="View Dr ",thepath="[(-122.1364,37.276),(-122.1295,37.271)]" 383702400000000000 +road name="View Crest Ct ",thepath="[(-122.165164,37.82551),(-122.164162,37.826)]" 383788800000000000 +road name="Village Dr ",thepath="[(-122.0773,37.967),(-122.0766,37.967)]" 383875200000000000 +road name="Village Pkwy",thepath="[(-121.9256,37.098),(-121.9267,37.113)]" 383961600000000000 +road name="Villareal Dr ",thepath="[(-122.019699,37.15004),(-122.018295,37.15912)]" 384048000000000000 +road name="Villareal Dr ",thepath="[(-122.0204,37.147),(-122.0217,37.142)]" 384134400000000000 +road name="Villareal Dr ",thepath="[(-122.022433,37.10266),(-122.023425,37.09294)]" 384220800000000000 +road name="Vine St ",thepath="[(-121.8603,37.64036),(-121.8601,37.64044)]" 384307200000000000 +road name="Vine St ",thepath="[(-122.2755,37.793),(-122.2743,37.794)]" 384393600000000000 +road name="Vineyard Ave ",thepath="[(-121.8463,37.647),(-121.846448,37.64711)]" 384480000000000000 +road name="Vineyard Ave ",thepath="[(-121.8524,37.648),(-121.8511,37.648)]" 384566400000000000 +road name="Vineyard Ave ",thepath="[(-121.853754,37.648),(-121.853805,37.648)]" 384652800000000000 +road name="Vineyard road",thepath="[(-121.919,37.056),(-121.9128,37.069)]" 384739200000000000 +road name="Vineyard road",thepath="[(-122.0878,37.2),(-122.0877,37.191)]" 384825600000000000 +road name="Virginia St ",thepath="[(-122.0748,37.47),(-122.0697,37.477)]" 384912000000000000 +road name="Virginia St ",thepath="[(-122.2582,37.78),(-122.2565,37.782),(-122.2557,37.784)]" 384998400000000000 +road name="Virginia St ",thepath="[(-122.2751,37.756),(-122.2739,37.759)]" 385084800000000000 +road name="Virgo road",thepath="[(-122.2152,37.415),(-122.2146,37.435)]" 385171200000000000 +road name="Vista Ct ",thepath="[(-121.755,37.84),(-121.7551,37.838)]" 385257600000000000 +road name="Vista del Plaza Lane",thepath="[(-122.0834,37.809),(-122.0829,37.804)]" 385344000000000000 +road name="Vistamont Ave ",thepath="[(-122.265432,37.0356),(-122.2643,37.029)]" 385430400000000000 +road name="Vivian St ",thepath="[(-122.0831,37.895),(-122.082,37.895)]" 385516800000000000 +road name="Vomac road",thepath="[(-121.9367,37.166),(-121.937,37.173)]" 385603200000000000 +road name="Wadsworth Ct ",thepath="[(-121.97,37.249),(-121.9708,37.241)]" 385689600000000000 +road name="Wagner St ",thepath="[(-122.1254,37.959),(-122.1245,37.952)]" 385776000000000000 +road name="Wagoner Dr ",thepath="[(-121.784,37.67),(-121.784,37.663)]" 385862400000000000 +road name="Walker Ave ",thepath="[(-122.2437,37.153),(-122.2433,37.161)]" 385948800000000000 +road name="Walker Pl ",thepath="[(-121.7692,37.537),(-121.7693,37.544)]" 386035200000000000 +road name="Wall St ",thepath="[(-121.7904,37.776),(-121.7893,37.767)]" 386121600000000000 +road name="Walnut Ave ",thepath="[(-121.9689,37.601),(-121.969899,37.59434)]" 386208000000000000 +road name="Walnut Ave ",thepath="[(-121.9804,37.471),(-121.9817,37.456)]" 386294400000000000 +road name="Walnut Ave ",thepath="[(-121.983083,37.44159),(-121.983361,37.43869)]" 386380800000000000 +road name="Walnut St ",thepath="[(-121.769,37.877),(-121.7683,37.88)]" 386467200000000000 +road name="Walnut St ",thepath="[(-121.774,37.863),(-121.7728,37.866)]" 386553600000000000 +road name="Walnut St ",thepath="[(-122.0425,37.262),(-122.0417,37.246)]" 386640000000000000 +road name="Walnut St ",thepath="[(-122.1913,37.734),(-122.1909,37.729)]" 386726400000000000 +road name="Walnut St ",thepath="[(-122.1948,37.763),(-122.1923,37.742)]" 386812800000000000 +road name="Walnut St ",thepath="[(-122.2442,37.682),(-122.2437,37.69)]" 386899200000000000 +road name="Walnut St ",thepath="[(-122.2465,37.648),(-122.2459,37.658)]" 386985600000000000 +road name="Walnut St ",thepath="[(-122.2489,37.613),(-122.2483,37.622)]" 387072000000000000 +road name="Walnut St ",thepath="[(-122.2675,37.804),(-122.2672,37.785)]" 387158400000000000 +road name="Walpert St ",thepath="[(-122.07476,37.6893),(-122.073488,37.69487)]" 387244800000000000 +road name="Warbler Loop",thepath="[(-122.0601,37.813),(-122.0597,37.793)]" 387331200000000000 +road name="Ward St ",thepath="[(-122.2838,37.575),(-122.2827,37.575)]" 387417600000000000 +road name="Ward Creek ",thepath="[(-122.0568,37.644),(-122.058701,37.64815)]" 387504000000000000 +road name="Ward Creek ",thepath="[(-122.0717,37.679),(-122.077,37.657)]" 387590400000000000 +road name="Ward Creek Branch ",thepath="[(-122.0615,37.62),(-122.069914,37.64417)]" 387676800000000000 +road name="Warfield Ave ",thepath="[(-122.2403,37.16),(-122.2382,37.178)]" 387763200000000000 +road name="Warfield Ave ",thepath="[(-122.2404,37.153),(-122.2402,37.157)]" 387849600000000000 +road name="Warfield Ave ",thepath="[(-122.244,37.124),(-122.2435,37.13)]" 387936000000000000 +road name="Warm Springs Blvd",thepath="[(-121.9184,37.728),(-121.9168,37.703)]" 388022400000000000 +road name="Warm Springs Blvd",thepath="[(-121.9209,37.769),(-121.9198,37.751)]" 388108800000000000 +road name="Warm Springs Blvd",thepath="[(-121.9258,37.851),(-121.9247,37.833)]" 388195200000000000 +road name="Warm Springs Blvd",thepath="[(-121.933956,37),(-121.9343,37.97)]" 388281600000000000 +road name="Warner Ave ",thepath="[(-122.0249,37.096),(-122.024,37.103)]" 388368000000000000 +road name="Warner Ave ",thepath="[(-122.1579,37.477),(-122.1571,37.482)]" 388454400000000000 +road name="Warren Ave ",thepath="[(-121.9285,37.866),(-121.9302,37.859)]" 388540800000000000 +road name="Warren Ave ",thepath="[(-121.9314,37.855),(-121.933,37.849)]" 388627200000000000 +road name="Warsaw Ave ",thepath="[(-121.7714,37.623),(-121.77064,37.6268)]" 388713600000000000 +road name="Warwick Pl ",thepath="[(-122.0498,37.647),(-122.0487,37.634)]" 388800000000000000 +road name="Warwick road",thepath="[(-122.0279,37.791),(-122.0282,37.787)]" 388886400000000000 +road name="Warwick road",thepath="[(-122.029,37.777),(-122.0298,37.768)]" 388972800000000000 +road name="Wasatch Dr ",thepath="[(-121.962,37.752),(-121.9623,37.756)]" 389059200000000000 +road name="Washburn Dr ",thepath="[(-121.9877,37.739),(-121.9881,37.728)]" 389145600000000000 +road name="Washington Ave ",thepath="[(-122.1378,37.897),(-122.1379,37.891)]" 389232000000000000 +road name="Washington Ave ",thepath="[(-122.1379,37.959),(-122.1379,37.954)]" 389318400000000000 +road name="Washington Ave ",thepath="[(-122.1491,37.154),(-122.149,37.151),(-122.1485,37.144)]" 389404800000000000 +road name="Washington Ave ",thepath="[(-122.1536,37.222),(-122.1534,37.217)]" 389491200000000000 +road name="Washington Ave ",thepath="[(-122.2912,37.932),(-122.2903,37.931)]" 389577600000000000 +road name="Washington Ave ",thepath="[(-122.301,37.919),(-122.3001,37.921)]" 389664000000000000 +road name="Washington Ave ",thepath="[(-122.3033,37.9),(-122.3023,37.905)]" 389750400000000000 +road name="Washington Blvd",thepath="[(-121.9418,37.314),(-121.9422,37.314)]" 389836800000000000 +road name="Washington Blvd",thepath="[(-121.9512,37.335),(-121.9522,37.335)]" 389923200000000000 +road name="Washington Blvd",thepath="[(-121.9557,37.328),(-121.9584,37.33)]" 390009600000000000 +road name="Washington St ",thepath="[(-121.8615,37.684),(-121.8596,37.694)]" 390096000000000000 +road name="Washington St ",thepath="[(-122.2355,37.537),(-122.2347,37.532)]" 390182400000000000 +road name="Washington St ",thepath="[(-122.2378,37.553),(-122.237,37.548)]" 390268800000000000 +road name="Washington St ",thepath="[(-122.2405,37.568),(-122.24,37.566)]" 390355200000000000 +road name="Washington St ",thepath="[(-122.2772,37.965),(-122.2769,37.97)]" 390441600000000000 +road name="Washo Dr ",thepath="[(-121.9213,37.117),(-121.9204,37.114)]" 390528000000000000 +road name="Waterfall Isle ",thepath="[(-122.2699,37.668),(-122.2694,37.677)]" 390614400000000000 +road name="Waterford Pl ",thepath="[(-122.0472,37.026),(-122.0473,37.021)]" 390700800000000000 +road name="Watts St ",thepath="[(-122.2805,37.28),(-122.2804,37.285)]" 390787200000000000 +road name="Waverly Way ",thepath="[(-121.7634,37.94),(-121.762632,37.94055)]" 390873600000000000 +road name="Webb Ave ",thepath="[(-122.0975,37.89),(-122.0971,37.894)]" 390960000000000000 +road name="Webster St ",thepath="[(-122.0593,37.39),(-122.0587,37.393)]" 391046400000000000 +road name="Webster St ",thepath="[(-122.2474,37.563),(-122.2461,37.562)]" 391132800000000000 +road name="Webster St ",thepath="[(-122.2595,37.33),(-122.2596,37.337)]" 391219200000000000 +road name="Webster St ",thepath="[(-122.2599,37.305),(-122.2596,37.313)]" 391305600000000000 +road name="Webster St ",thepath="[(-122.2643,37.145),(-122.2642,37.152)]" 391392000000000000 +road name="Webster St ",thepath="[(-122.2691,37.026),(-122.2687,37.033)]" 391478400000000000 +road name="Webster St ",thepath="[(-122.2703,37.005),(-122.2699,37.011)]" 391564800000000000 +road name="Webster St ",thepath="[(-122.2724,37.97),(-122.272,37.977)]" 391651200000000000 +road name="Webster St ",thepath="[(-122.2752,37.925),(-122.2746,37.936)]" 391737600000000000 +road name="Webster St ",thepath="[(-122.276,37.775),(-122.276,37.785)]" 391824000000000000 +road name="Webster St ",thepath="[(-122.276,37.809),(-122.276,37.841)]" 391910400000000000 +road name="Webster St ",thepath="[(-122.276,37.903),(-122.276,37.913)]" 391996800000000000 +road name="Welch Creek ",thepath="[(-121.8107,37.349),(-121.8012,37.397)]" 392083200000000000 +road name="Welch Creek road",thepath="[(-121.7695,37.386),(-121.7737,37.413)]" 392169600000000000 +road name="Welch Creek road",thepath="[(-121.7895,37.36),(-121.7717,37.218)]" 392256000000000000 +road name="Welch Creek road",thepath="[(-121.844,37.37),(-121.8289,37.315)]" 392342400000000000 +road name="Weld St ",thepath="[(-122.1827,37.64),(-122.181,37.623)]" 392428800000000000 +road name="Welk Com ",thepath="[(-122.036356,37.86914),(-122.036265,37.8618)]" 392515200000000000 +road name="Wellington Pl ",thepath="[(-122.0242,37.628),(-122.0227,37.632)]" 392601600000000000 +road name="Wente St ",thepath="[(-121.7486,37.661),(-121.7486,37.65715)]" 392688000000000000 +road name="Wentworth Ave ",thepath="[(-122.1997,37.698),(-122.1986,37.698)]" 392774400000000000 +road name="Wesley Ave ",thepath="[(-122.2457,37.068),(-122.2446,37.078)]" 392860800000000000 +road name="Wesley Ave ",thepath="[(-122.2482,37.056),(-122.2476,37.059)]" 392947200000000000 +road name="West St ",thepath="[(-122.1066,37.48),(-122.108083,37.47375)]" 393033600000000000 +road name="West St ",thepath="[(-122.2719,37.243),(-122.2717,37.251)]" 393120000000000000 +road name="West St ",thepath="[(-122.2754,37.136),(-122.2751,37.141)]" 393206400000000000 +road name="West St ",thepath="[(-122.276,37.124),(-122.2756,37.131)]" 393292800000000000 +road name="West Loop road",thepath="[(-122.0576,37.604),(-122.0602,37.586)]" 393379200000000000 +road name="Westbrook Pl ",thepath="[(-121.7787,37.565),(-121.7784,37.564)]" 393465600000000000 +road name="Westchester St ",thepath="[(-122.031,37.135),(-122.0293,37.136)]" 393552000000000000 +road name="Western Ave ",thepath="[(-122.1365,37.049),(-122.1358,37.044)]" 393638400000000000 +road name="Western Blvd",thepath="[(-122.1004,37.792),(-122.0983,37.778)]" 393724800000000000 +road name="Western Blvd",thepath="[(-122.1043,37.819),(-122.1023,37.805)]" 393811200000000000 +road name="Western Pacific Railroad ",thepath="[(-121.628112,37.31406),(-121.628315,37.31524)]" 393897600000000000 +road name="Western Pacific Railroad ",thepath="[(-121.6953,37.215),(-121.6955,37.223)]" 393984000000000000 +road name="Western Pacific Railroad ",thepath="[(-121.95686,37.6508),(-121.9548,37.598)]" 394070400000000000 +road name="Western Pacific Railroad ",thepath="[(-122.0302,37.963),(-122.0302,37.99)]" 394156800000000000 +road name="Western Pacific Railroad Spur ",thepath="[(-122.0394,37.018),(-122.0394,37.961)]" 394243200000000000 +road name="Westminster Dr ",thepath="[(-122.2409,37.406),(-122.2391,37.413)]" 394329600000000000 +road name="Westover Dr ",thepath="[(-122.1985,37.286),(-122.1959,37.302)]" 394416000000000000 +road name="Westview Pl ",thepath="[(-122.2309,37.588),(-122.2303,37.585)]" 394502400000000000 +road name="Westwood Ave ",thepath="[(-122.0079,37.454),(-122.008033,37.45)]" 394588800000000000 +road name="Westwood Pl ",thepath="[(-122.0773,37.36),(-122.078,37.362)]" 394675200000000000 +road name="Whalebone Way ",thepath="[(-122.0592,37.244),(-122.059,37.242)]" 394761600000000000 +road name="Whimbrel road",thepath="[(-122.0439,37.832),(-122.0432,37.828)]" 394848000000000000 +road name="Whimbrel road",thepath="[(-122.045,37.842),(-122.0447,37.839)]" 394934400000000000 +road name="Whipple road",thepath="[(-122.0532,37.059),(-122.0576,37.059)]" 395020800000000000 +road name="Whipple road",thepath="[(-122.0676,37.055),(-122.0678,37.057),(-122.0752,37.057)]" 395107200000000000 +road name="Whispering Pine Ct ",thepath="[(-122.06,37.222),(-122.0608,37.226)]" 395193600000000000 +road name="Whitaker Ave ",thepath="[(-122.2555,37.909),(-122.2554,37.912)]" 395280000000000000 +road name="Whitecap Way ",thepath="[(-121.991567,37.28508),(-121.99096,37.28222)]" 395366400000000000 +road name="Whitlock Creek ",thepath="[(-121.74683,37.91276),(-121.733107,37)]" 395452800000000000 +road name="Whitman St ",thepath="[(-122.0633,37.399),(-122.063,37.392)]" 395539200000000000 +road name="Whitman St ",thepath="[(-122.072,37.54),(-122.0712,37.53)]" 395625600000000000 +road name="Whitney Pl ",thepath="[(-121.9168,37.703),(-121.9188,37.695)]" 395712000000000000 +road name="Wicks Blvd",thepath="[(-122.1596,37.856),(-122.1578,37.833)]" 395798400000000000 +road name="Wicks Blvd",thepath="[(-122.163486,37.97094),(-122.1632,37.966),(-122.1624,37.936)]" 395884800000000000 +road name="Wilbeam Ave ",thepath="[(-122.0759,37.936),(-122.076,37.932)]" 395971200000000000 +road name="Wilbur St ",thepath="[(-122.21,37.039),(-122.2093,37.034)]" 396057600000000000 +road name="Wild Current Way ",thepath="[(-122.1987,37.395),(-122.1993,37.402)]" 396144000000000000 +road name="Wildcat Ct ",thepath="[(-121.94693,37.08767),(-121.947193,37.08295)]" 396230400000000000 +road name="Wildcat Canyon road",thepath="[(-122.2628,37.035),(-122.264,37.041)]" 396316800000000000 +road name="Wildcat Canyon road",thepath="[(-122.2658,37.046),(-122.264,37.041)]" 396403200000000000 +road name="Wildwood Ave ",thepath="[(-122.2341,37.194),(-122.2328,37.199)]" 396489600000000000 +road name="Wiley St ",thepath="[(-122.1553,37.93),(-122.1548,37.921),(-122.1546,37.916)]" 396576000000000000 +road name="Willard Way ",thepath="[(-122.0871,37.169),(-122.0843,37.177)]" 396662400000000000 +road name="Williams St ",thepath="[(-122.1568,37.179),(-122.1577,37.175)]" 396748800000000000 +road name="Williams St ",thepath="[(-122.1634,37.151),(-122.164,37.148)]" 396835200000000000 +road name="Williams St ",thepath="[(-122.1649,37.143),(-122.1655,37.141)]" 396921600000000000 +road name="Willimet Way ",thepath="[(-122.0964,37.517),(-122.0949,37.493)]" 397008000000000000 +road name="Willow Ave ",thepath="[(-122.1012,37.748),(-122.1002,37.754)]" 397094400000000000 +road name="Willow Ave ",thepath="[(-122.16,37.961),(-122.1608,37.96)]" 397180800000000000 +road name="Willow St ",thepath="[(-122.0519,37.279),(-122.0517,37.275)]" 397267200000000000 +road name="Willow St ",thepath="[(-122.2459,37.711),(-122.2453,37.72)]" 397353600000000000 +road name="Willow St ",thepath="[(-122.2494,37.661),(-122.2487,37.67)]" 397440000000000000 +road name="Willow St ",thepath="[(-122.2516,37.627),(-122.251,37.635)]" 397526400000000000 +road name="Willow St ",thepath="[(-122.2559,37.567),(-122.2551,37.58)]" 397612800000000000 +road name="Willow St ",thepath="[(-122.2913,37.184),(-122.2901,37.198),(-122.2891,37.212)]" 397699200000000000 +road name="Willow St ",thepath="[(-122.2998,37.077),(-122.2996,37.081)]" 397785600000000000 +road name="Willow Walk",thepath="[(-122.2364,37.572),(-122.23664,37.5678)]" 397872000000000000 +road name="Willowood Dr ",thepath="[(-122.0126,37.498),(-122.0096,37.483)]" 397958400000000000 +road name="Wilson Ave ",thepath="[(-122.0751,37.073),(-122.0727,37.07)]" 398044800000000000 +road name="Wilson Cir ",thepath="[(-122.246849,37.81463),(-122.2468,37.815)]" 398131200000000000 +road name="Winding Lane",thepath="[(-121.931438,37.07849),(-121.9306,37.078)]" 398217600000000000 +road name="Windmill Ct ",thepath="[(-121.9163,37.948),(-121.9167,37.944)]" 398304000000000000 +road name="Windmill Lane",thepath="[(-121.8688,37.531),(-121.8678,37.532)]" 398390400000000000 +road name="Windsor Dr ",thepath="[(-122.1125,37.071),(-122.1105,37.048)]" 398476800000000000 +road name="Windsor Dr ",thepath="[(-122.2303,37.673),(-122.2289,37.665)]" 398563200000000000 +road name="Windsor Pl ",thepath="[(-121.7781,37.521),(-121.7781,37.525)]" 398649600000000000 +road name="Windsor Way ",thepath="[(-121.7772,37.521),(-121.7762,37.521)]" 398736000000000000 +road name="Wingate Way ",thepath="[(-122.0652,37.838),(-122.0643,37.846)]" 398822400000000000 +road name="Winslow Ter ",thepath="[(-122.059185,37.53928),(-122.058347,37.5363)]" 398908800000000000 +road name="Winsor Ave ",thepath="[(-122.2356,37.203),(-122.2351,37.203)]" 398995200000000000 +road name="Winthrope St ",thepath="[(-122.1559,37.694),(-122.1548,37.678)]" 399081600000000000 +road name="Winton Ave ",thepath="[(-122.1151,37.533),(-122.1165,37.532)]" 399168000000000000 +road name="Winton Ave ",thepath="[(-122.1231,37.533),(-122.1231,37.53)]" 399254400000000000 +road name="Wisconsin St ",thepath="[(-122.1927,37.945),(-122.1921,37.94)]" 399340800000000000 +road name="Wisconsin St ",thepath="[(-122.1945,37.965),(-122.1939,37.959)]" 399427200000000000 +road name="Wisconsin St ",thepath="[(-122.1994,37.017),(-122.1975,37.998),(-122.1971,37.994)]" 399513600000000000 +road name="Wistaria Way ",thepath="[(-122.2251,37.182),(-122.2249,37.188)]" 399600000000000000 +road name="Wisteria Dr ",thepath="[(-121.9362,37.373),(-121.9363,37.367)]" 399686400000000000 +road name="Wisteria Dr ",thepath="[(-121.9369,37.398),(-121.9369,37.391)]" 399772800000000000 +road name="Wisteria Way ",thepath="[(-121.7322,37.118),(-121.7332,37.114)]" 399859200000000000 +road name="Wixon Dr ",thepath="[(-121.9613,37.199),(-121.9604,37.18)]" 399945600000000000 +road name="Wolcott Dr ",thepath="[(-121.9568,37.393),(-121.9564,37.389)]" 400032000000000000 +road name="Wood Dr ",thepath="[(-122.2194,37.28),(-122.2174,37.266)]" 400118400000000000 +road name="Wood St ",thepath="[(-121.762,37.839),(-121.7611,37.834)]" 400204800000000000 +road name="Wood St ",thepath="[(-122.2993,37.107),(-122.2988,37.113)]" 400291200000000000 +road name="Wood St ",thepath="[(-122.302,37.06),(-122.3019,37.066)]" 400377600000000000 +road name="Woodcrest Dr ",thepath="[(-121.9579,37.225),(-121.9589,37.224)]" 400464000000000000 +road name="Woodhaven Way ",thepath="[(-122.208,37.417),(-122.2045,37.411)]" 400550400000000000 +road name="Woodhue Ter ",thepath="[(-122.046987,37.6207),(-122.047212,37.62529)]" 400636800000000000 +road name="Woodridge Dr ",thepath="[(-122.0631,37.836),(-122.0616,37.82)]" 400723200000000000 +road name="Woodroe Ave ",thepath="[(-122.0536,37.855),(-122.0534,37.847)]" 400809600000000000 +road name="Woodroe Ave ",thepath="[(-122.0539,37.888),(-122.054,37.891)]" 400896000000000000 +road name="Woodruff Ave ",thepath="[(-122.2214,37.03),(-122.2206,37.057)]" 400982400000000000 +road name="Woolsey St ",thepath="[(-122.2553,37.538),(-122.2545,37.538)]" 401068800000000000 +road name="Wooster Ct ",thepath="[(-122.023499,37.15118),(-122.0237,37.147)]" 401155200000000000 +road name="Worth St ",thepath="[(-122.1903,37.362),(-122.1903,37.365)]" 401241600000000000 +road name="Worth St ",thepath="[(-122.1915,37.378),(-122.1916,37.379)]" 401328000000000000 +road name="Wp Railroad ",thepath="[(-121.7675,37.848),(-121.765632,37.85375),(-121.7636,37.86)]" 401414400000000000 +road name="Wp Railroad ",thepath="[(-121.7864,37.791),(-121.7761,37.822)]" 401500800000000000 +road name="Wp Railroad ",thepath="[(-121.813721,37.75618),(-121.8049,37.765)]" 401587200000000000 +road name="Wp Railroad ",thepath="[(-121.8346,37.733),(-121.8259,37.743)]" 401673600000000000 +road name="Wp Railroad ",thepath="[(-121.874759,37.65728),(-121.8727,37.665)]" 401760000000000000 +road name="Wp Railroad ",thepath="[(-121.8804,37.27),(-121.8806,37.272),(-121.88678,37.36528)]" 401846400000000000 +road name="Wp Railroad ",thepath="[(-121.882149,37.57458),(-121.8813,37.585)]" 401932800000000000 +road name="Wp Railroad ",thepath="[(-121.8861,37.94),(-121.8847,37.952)]" 402019200000000000 +road name="Wp Railroad ",thepath="[(-121.9304,37.856),(-121.9268,37.789)]" 402105600000000000 +road name="Wp Railroad ",thepath="[(-121.958612,37.67823),(-121.9581,37.67)]" 402192000000000000 +road name="Wp Railroad ",thepath="[(-122.0223,37.959),(-122.0211,37.949)]" 402278400000000000 +road name="Wp Railroad ",thepath="[(-122.0476,37.214),(-122.0473,37.196)]" 402364800000000000 +road name="Wp Railroad ",thepath="[(-122.0755,37.589),(-122.0731,37.56)]" 402451200000000000 +road name="Wp Railroad ",thepath="[(-122.1877,37.466),(-122.1834,37.43)]" 402537600000000000 +road name="Wp Railroad ",thepath="[(-122.2043,37.608),(-122.203628,37.60237)]" 402624000000000000 +road name="Wp Railroad ",thepath="[(-122.2145,37.694),(-122.2137,37.688)]" 402710400000000000 +road name="Wp Railroad ",thepath="[(-122.2342,37.806),(-122.2295,37.777)]" 402796800000000000 +road name="Wp Railroad ",thepath="[(-122.2434,37.865),(-122.241,37.851)]" 402883200000000000 +road name="Wp Railroad ",thepath="[(-122.254,37.902),(-122.2506,37.891)]" 402969600000000000 +road name="Wp Railroad ",thepath="[(-122.262,37.923),(-122.2607,37.921)]" 403056000000000000 +road name="Wp Railroad ",thepath="[(-122.2693,37.949),(-122.2682,37.945)]" 403142400000000000 +road name="Wrenn St ",thepath="[(-122.2063,37.117),(-122.2056,37.117)]" 403228800000000000 +road name="Wyndham Pl ",thepath="[(-122.027,37.724),(-122.0286,37.73)]" 403315200000000000 +road name="Xavier Way ",thepath="[(-121.7458,37.778),(-121.7459,37.77)]" 403401600000000000 +road name="Xavier Common ",thepath="[(-122.049697,37.64509),(-122.050346,37.64313)]" 403488000000000000 +road name="Yale Ave ",thepath="[(-122.1205,37.913),(-122.1205,37.907)]" 403574400000000000 +road name="Yale Way ",thepath="[(-121.9443,37.098),(-121.9482,37.092)]" 403660800000000000 +road name="Yampa Way ",thepath="[(-121.9117,37.641),(-121.9109,37.644)]" 403747200000000000 +road name="Yellowstone Park Dr ",thepath="[(-121.9686,37.111),(-121.9705,37.117)]" 403833600000000000 +road name="Yerba Buena Ave ",thepath="[(-122.2789,37.301),(-122.2843,37.29)]" 403920000000000000 +road name="Yerba Buena Pl ",thepath="[(-121.9602,37.678),(-121.9595,37.683)]" 404006400000000000 +road name="Yerba Buena St ",thepath="[(-121.960541,37.6819),(-121.9602,37.678)]" 404092800000000000 +road name="Ygnacio Ave ",thepath="[(-122.2103,37.756),(-122.2098,37.754)]" 404179200000000000 +road name="Yolo Ave ",thepath="[(-122.274,37.85),(-122.273,37.855)]" 404265600000000000 +road name="York Dr ",thepath="[(-121.9212,37.098),(-121.9227,37.104)]" 404352000000000000 +road name="York Dr ",thepath="[(-122.2415,37.283),(-122.2406,37.261)]" 404438400000000000 +road name="Yorktown road",thepath="[(-121.9507,37.173),(-121.9513,37.172)]" 404524800000000000 +road name="Yosemite Pl ",thepath="[(-121.8019,37.853),(-121.8024,37.855)]" 404611200000000000 +road name="Yosemite road",thepath="[(-122.2767,37.968),(-122.2757,37.958)]" 404697600000000000 +road name="Yosemite Way ",thepath="[(-122.1108,37.4803),(-122.109445,37.48415)]" 404784000000000000 +road name="Zacate Ave ",thepath="[(-121.9575,37.646),(-121.9567,37.64)]" 404870400000000000 +road name="Zacate Ave ",thepath="[(-121.9594,37.662),(-121.9589,37.654)]" 404956800000000000 +road name="Zapata Ct ",thepath="[(-121.9456,37.171),(-121.94565,37.1705)]" 405043200000000000 +road name="Zapotec Dr ",thepath="[(-121.9108,37.899),(-121.9097,37.898)]" 405129600000000000 +road name="Zephyr Ave ",thepath="[(-122.0572,37.107),(-122.0556,37.107)]" 405216000000000000 +road name="Zephyr Ave ",thepath="[(-122.0584,37.107),(-122.0609,37.107)]" 405302400000000000 +road name="Ziegler Ave ",thepath="[(-122.1258,37.483),(-122.125,37.499)]" 405388800000000000 +road name="Zircon Ter ",thepath="[(-122.051254,37.64038),(-122.051126,37.63696)]" 405475200000000000 +road name="100th Ave ",thepath="[(-122.1657,37.429),(-122.1647,37.432)]" 405561600000000000 +road name="100th Ave ",thepath="[(-122.1789,37.364),(-122.1785,37.367)]" 405648000000000000 +road name="101st Ave ",thepath="[(-122.1595,37.438),(-122.1583,37.441)]" 405734400000000000 +road name="104th Ave ",thepath="[(-122.1583,37.417),(-122.1573,37.423)]" 405820800000000000 +road name="104th Ave ",thepath="[(-122.1612,37.411),(-122.1587,37.417)]" 405907200000000000 +road name="104th Ave ",thepath="[(-122.1697,37.375),(-122.1681,37.383)]" 405993600000000000 +road name="105th Ave ",thepath="[(-122.1774,37.325),(-122.1771,37.327)]" 406080000000000000 +road name="106th Ave ",thepath="[(-122.158,37.404),(-122.156,37.409)]" 406166400000000000 +road name="107th Ave ",thepath="[(-122.1555,37.403),(-122.1531,37.41)]" 406252800000000000 +road name="108th Ave ",thepath="[(-122.1474,37.419),(-122.1468,37.423)]" 406339200000000000 +road name="10th St ",thepath="[(-122.0211,37.969),(-122.0198,37.958)]" 406425600000000000 +road name="10th St ",thepath="[(-122.0603,37.402),(-122.0593,37.39)]" 406512000000000000 +road name="10th St ",thepath="[(-122.2541,37.924),(-122.2537,37.92)]" 406598400000000000 +road name="10th St ",thepath="[(-122.2553,37.935),(-122.2545,37.927)]" 406684800000000000 +road name="10th St ",thepath="[(-122.2675,37.002),(-122.2687,37.007)]" 406771200000000000 +road name="10th St ",thepath="[(-122.2886,37.57),(-122.2883,37.56)]" 406857600000000000 +road name="10th St ",thepath="[(-122.2916,37.662),(-122.291,37.644)]" 406944000000000000 +road name="10th St ",thepath="[(-122.2918,37.084),(-122.292,37.085)]" 407030400000000000 +road name="10th St ",thepath="[(-122.2945,37.75),(-122.2939,37.732)]" 407116800000000000 +road name="11th Ave ",thepath="[(-122.2493,37.91),(-122.2483,37.916)]" 407203200000000000 +road name="11th St ",thepath="[(-122.0206,37.952),(-122.0192,37.941),(-122.0185,37.934)]" 407289600000000000 +road name="120 Canal ",thepath="[(-121.587482,37.88204),(-121.587833,37.8825)]" 407376000000000000 +road name="12th Ave ",thepath="[(-122.2396,37.958),(-122.2385,37.965)]" 407462400000000000 +road name="12th St ",thepath="[(-121.896,37.194),(-121.8932,37.194)]" 407548800000000000 +road name="12th St ",thepath="[(-121.9026,37.204),(-121.900288,37.19771),(-121.896959,37.19973)]" 407635200000000000 +road name="12th St ",thepath="[(-122.2163,37.718),(-122.2151,37.712)]" 407721600000000000 +road name="12th St ",thepath="[(-122.2469,37.891),(-122.2459,37.882)]" 407808000000000000 +road name="12th St ",thepath="[(-122.2566,37.974),(-122.256,37.971)]" 407894400000000000 +road name="12th St ",thepath="[(-122.2611,37.996),(-122.262,37.998)]" 407980800000000000 +road name="12th St ",thepath="[(-122.2644,37.006),(-122.2655,37.011)]" 408067200000000000 +road name="12th St ",thepath="[(-122.2807,37.073),(-122.2796,37.068)]" 408153600000000000 +road name="12th St ",thepath="[(-122.2889,37.094),(-122.29,37.094)]" 408240000000000000 +road name="12th St ",thepath="[(-122.2926,37.103),(-122.2937,37.102)]" 408326400000000000 +road name="12th St ",thepath="[(-122.2943,37.103),(-122.2955,37.109),(-122.2964,37.113)]" 408412800000000000 +road name="136th Ave ",thepath="[(-122.1399,37.158),(-122.1371,37.18)]" 408499200000000000 +road name="137th Ave ",thepath="[(-122.1366,37.176),(-122.1351,37.18)]" 408585600000000000 +road name="13th Ave ",thepath="[(-122.235,37.984),(-122.2345,37.99)]" 408672000000000000 +road name="13th Ave ",thepath="[(-122.2396,37.944),(-122.2387,37.95)]" 408758400000000000 +road name="13th St ",thepath="[(-122.0242,37.962),(-122.0231,37.954)]" 408844800000000000 +road name="13th St ",thepath="[(-122.0565,37.386),(-122.0554,37.374)]" 408931200000000000 +road name="13th St ",thepath="[(-122.2628,37.009),(-122.2639,37.014)]" 409017600000000000 +road name="140th Ave ",thepath="[(-122.1386,37.13),(-122.1374,37.14)]" 409104000000000000 +road name="141st Ave ",thepath="[(-122.1368,37.136),(-122.1355,37.147)]" 409190400000000000 +road name="142nd Ave ",thepath="[(-122.1348,37.142),(-122.1336,37.153)]" 409276800000000000 +road name="143rd Ave ",thepath="[(-122.1408,37.077),(-122.1397,37.085)]" 409363200000000000 +road name="145th Ave ",thepath="[(-122.1368,37.082),(-122.1359,37.09)]" 409449600000000000 +road name="148th Ave ",thepath="[(-122.1284,37.119),(-122.1277,37.122)]" 409536000000000000 +road name="14th Ave ",thepath="[(-122.2244,37.028),(-122.2242,37.036)]" 409622400000000000 +road name="14th Ave ",thepath="[(-122.2245,37.036),(-122.2238,37.062)]" 409708800000000000 +road name="14th Ave ",thepath="[(-122.2285,37.981),(-122.2283,37.988)]" 409795200000000000 +road name="14th Ave ",thepath="[(-122.232,37.965),(-122.2293,37.975)]" 409881600000000000 +road name="14th Ave ",thepath="[(-122.2342,37.957),(-122.2332,37.961)]" 409968000000000000 +road name="14th Ave ",thepath="[(-122.2357,37.953),(-122.2354,37.953)]" 410054400000000000 +road name="14th Ave ",thepath="[(-122.2408,37.923),(-122.2407,37.925)]" 410140800000000000 +road name="14th Ave ",thepath="[(-122.2426,37.911),(-122.2419,37.916)]" 410227200000000000 +road name="14th St ",thepath="[(-122.0238,37.949),(-122.0226,37.938)]" 410313600000000000 +road name="14th St ",thepath="[(-122.1178,37.983),(-122.116,37.971)]" 410400000000000000 +road name="14th St ",thepath="[(-122.1212,37.007),(-122.1206,37.002)]" 410486400000000000 +road name="14th St ",thepath="[(-122.1241,37.027),(-122.1235,37.023),(-122.1226,37.017)]" 410572800000000000 +road name="14th St ",thepath="[(-122.1316,37.081),(-122.1287,37.06)]" 410659200000000000 +road name="14th St ",thepath="[(-122.1378,37.124),(-122.1376,37.123)]" 410745600000000000 +road name="14th St ",thepath="[(-122.141,37.147),(-122.1397,37.138)]" 410832000000000000 +road name="14th St ",thepath="[(-122.1457,37.181),(-122.145,37.176)]" 410918400000000000 +road name="14th St ",thepath="[(-122.1562,37.262),(-122.1557,37.253)]" 411004800000000000 +road name="14th St ",thepath="[(-122.1626,37.348),(-122.1621,37.344)]" 411091200000000000 +road name="14th St ",thepath="[(-122.1655,37.387),(-122.165101,37.38001)]" 411177600000000000 +road name="14th St ",thepath="[(-122.1682,37.422),(-122.168,37.419)]" 411264000000000000 +road name="14th St ",thepath="[(-122.1709,37.459),(-122.1704,37.453)]" 411350400000000000 +road name="14th St ",thepath="[(-122.1761,37.529),(-122.1757,37.524),(-122.1754,37.52)]" 411436800000000000 +road name="14th St ",thepath="[(-122.1771,37.544),(-122.1768,37.54)]" 411523200000000000 +road name="14th St ",thepath="[(-122.1845,37.581),(-122.1839,37.579)]" 411609600000000000 +road name="14th St ",thepath="[(-122.1945,37.629),(-122.1936,37.625)]" 411696000000000000 +road name="14th St ",thepath="[(-122.2128,37.717),(-122.2118,37.713)]" 411782400000000000 +road name="14th St ",thepath="[(-122.2288,37.798),(-122.228,37.792)]" 411868800000000000 +road name="14th St ",thepath="[(-122.2419,37.877),(-122.2408,37.871)]" 411955200000000000 +road name="14th St ",thepath="[(-122.2659,37.03),(-122.2671,37.035)]" 412041600000000000 +road name="14th St ",thepath="[(-122.2755,37.068),(-122.2741,37.063)]" 412128000000000000 +road name="14th St ",thepath="[(-122.277,37.073),(-122.2765,37.071)]" 412214400000000000 +road name="14th St ",thepath="[(-122.299,37.147),(-122.3,37.148)]" 412300800000000000 +road name="150th Ave ",thepath="[(-122.1241,37.085),(-122.123984,37.08583)]" 412387200000000000 +road name="150th Ave ",thepath="[(-122.1266,37.065),(-122.1258,37.071)]" 412473600000000000 +road name="152nd Ave ",thepath="[(-122.1218,37.072),(-122.1215,37.075)]" 412560000000000000 +road name="15th St ",thepath="[(-122.0564,37.416),(-122.056,37.411)]" 412646400000000000 +road name="15th St ",thepath="[(-122.2264,37.794),(-122.2258,37.791),(-122.2251,37.789)]" 412732800000000000 +road name="15th St ",thepath="[(-122.241,37.885),(-122.2401,37.879)]" 412819200000000000 +road name="15th St ",thepath="[(-122.2472,37.923),(-122.2464,37.915)]" 412905600000000000 +road name="15th St ",thepath="[(-122.2534,37.976),(-122.2525,37.969)]" 412992000000000000 +road name="163rd Ave ",thepath="[(-122.1108,37.985),(-122.1096,37.995)]" 413078400000000000 +road name="164th Ave ",thepath="[(-122.1068,37.993),(-122.1069,37.998)]" 413164800000000000 +road name="164th Ave ",thepath="[(-122.1101,37.964),(-122.1096,37.968)]" 413251200000000000 +road name="166th Ave ",thepath="[(-122.1008,37.99),(-122.1006,37.997)]" 413337600000000000 +road name="167th Ave ",thepath="[(-122.1012,37.966),(-122.1006,37.973)]" 413424000000000000 +road name="168th Ave ",thepath="[(-122.1046,37.934),(-122.1041,37.938)]" 413510400000000000 +road name="16th Ave ",thepath="[(-122.2391,37.924),(-122.2387,37.928)]" 413596800000000000 +road name="16th Ave ",thepath="[(-122.2422,37.892),(-122.2418,37.896)]" 413683200000000000 +road name="16th Ave ",thepath="[(-122.2438,37.874),(-122.2438,37.876)]" 413769600000000000 +road name="16th St ",thepath="[(-122.054,37.414),(-122.0534,37.405)]" 413856000000000000 +road name="16th St ",thepath="[(-122.231,37.837),(-122.2306,37.834)]" 413942400000000000 +road name="16th St ",thepath="[(-122.2699,37.067),(-122.2713,37.069)]" 414028800000000000 +road name="16th St ",thepath="[(-122.2923,37.129),(-122.2926,37.132)]" 414115200000000000 +road name="170th Ave ",thepath="[(-122.1029,37.924),(-122.1025,37.93)]" 414201600000000000 +road name="170th Ave ",thepath="[(-122.1083,37.891),(-122.1075,37.893)]" 414288000000000000 +road name="171st Ave ",thepath="[(-122.1042,37.908),(-122.1031,37.916)]" 414374400000000000 +road name="173rd Ave ",thepath="[(-122.0984,37.935),(-122.0976,37.936)]" 414460800000000000 +road name="17th Ave ",thepath="[(-122.238,37.918),(-122.2377,37.921)]" 414547200000000000 +road name="17th St ",thepath="[(-122.1947,37.648),(-122.1934,37.637)]" 414633600000000000 +road name="17th St ",thepath="[(-122.2385,37.895),(-122.2375,37.889)]" 414720000000000000 +road name="17th St ",thepath="[(-122.2514,37.99),(-122.2507,37.982)]" 414806400000000000 +road name="17th St ",thepath="[(-122.2607,37.043),(-122.2619,37.047)]" 414892800000000000 +road name="17th St ",thepath="[(-122.2642,37.057),(-122.2655,37.059)]" 414979200000000000 +road name="17th St ",thepath="[(-122.2743,37.087),(-122.2729,37.082)]" 415065600000000000 +road name="17th St ",thepath="[(-122.2898,37.132),(-122.29,37.132)]" 415152000000000000 +road name="17th St ",thepath="[(-122.2938,37.149),(-122.295,37.155)]" 415238400000000000 +road name="18th Ave ",thepath="[(-122.2385,37.895),(-122.2381,37.899)]" 415324800000000000 +road name="18th St ",thepath="[(-122.2205,37.811),(-122.219,37.806)]" 415411200000000000 +road name="18th St ",thepath="[(-122.2424,37.924),(-122.2416,37.918)]" 415497600000000000 +road name="18th St ",thepath="[(-122.2461,37.957),(-122.2453,37.95)]" 415584000000000000 +road name="18th St ",thepath="[(-122.254,37.012),(-122.2535,37.01)]" 415670400000000000 +road name="18th St ",thepath="[(-122.2775,37.106),(-122.2762,37.101)]" 415756800000000000 +road name="18th St ",thepath="[(-122.2775,37.106),(-122.2794,37.109)]" 415843200000000000 +road name="18th St ",thepath="[(-122.2803,37.116),(-122.2814,37.119)]" 415929600000000000 +road name="19th Ave ",thepath="[(-122.2355,37.91),(-122.2351,37.914),(-122.2344,37.922)]" 416016000000000000 +road name="19th Ave ",thepath="[(-122.2366,37.897),(-122.2359,37.905)]" 416102400000000000 +road name="19th Ave ",thepath="[(-122.2386,37.877),(-122.2382,37.881)]" 416188800000000000 +road name="19th Ave ",thepath="[(-122.2394,37.868),(-122.239,37.873)]" 416275200000000000 +road name="19th Ave ",thepath="[(-122.2408,37.854),(-122.2406,37.856)]" 416361600000000000 +road name="19th St ",thepath="[(-122.2488,37.994),(-122.2479,37.986)]" 416448000000000000 +road name="19th St ",thepath="[(-122.2672,37.079),(-122.2685,37.084)]" 416534400000000000 +road name="1st Ave ",thepath="[(-122.2567,37.992),(-122.2558,37.999)]" 416620800000000000 +road name="1st St ",thepath="[(-121.7401,37.018),(-121.7401,37.024)]" 416707200000000000 +road name="1st St ",thepath="[(-121.7402,37.015),(-121.7401,37.018)]" 416793600000000000 +road name="1st St ",thepath="[(-121.7425,37.976),(-121.7417,37.986)]" 416880000000000000 +road name="1st St ",thepath="[(-121.75508,37.89294),(-121.753581,37.90031)]" 416966400000000000 +road name="1st St ",thepath="[(-121.7716,37.805),(-121.7702,37.809)]" 417052800000000000 +road name="1st St ",thepath="[(-121.8728,37.596),(-121.8738,37.587)]" 417139200000000000 +road name="20th Ave ",thepath="[(-122.238,37.867),(-122.2376,37.871)]" 417225600000000000 +road name="20th St ",thepath="[(-122.2327,37.887),(-122.2308,37.876)]" 417312000000000000 +road name="20th St ",thepath="[(-122.2433,37.963),(-122.2424,37.955)]" 417398400000000000 +road name="20th St ",thepath="[(-122.2468,37.994),(-122.2459,37.985)]" 417484800000000000 +road name="20th St ",thepath="[(-122.2912,37.163),(-122.2926,37.17)]" 417571200000000000 +road name="21st Ave ",thepath="[(-122.2341,37.89),(-122.2337,37.893)]" 417657600000000000 +road name="21st Ave ",thepath="[(-122.2368,37.859),(-122.2365,37.865)]" 417744000000000000 +road name="21st Ave ",thepath="[(-122.2385,37.843),(-122.238,37.847)]" 417830400000000000 +road name="21st St ",thepath="[(-122.243,37.975),(-122.2423,37.97)]" 417916800000000000 +road name="21st St ",thepath="[(-122.2624,37.099),(-122.2643,37.102)]" 418003200000000000 +road name="21st St ",thepath="[(-122.2688,37.109),(-122.2719,37.114)]" 418089600000000000 +road name="22nd Ave ",thepath="[(-122.2343,37.871),(-122.2338,37.875)]" 418176000000000000 +road name="22nd St ",thepath="[(-122.2227,37.854),(-122.222,37.851)]" 418262400000000000 +road name="22nd St ",thepath="[(-122.265,37.114),(-122.2655,37.114)]" 418348800000000000 +road name="22nd St ",thepath="[(-122.2756,37.131),(-122.2769,37.136)]" 418435200000000000 +road name="23rd Ave ",thepath="[(-122.2272,37.914),(-122.2266,37.92)]" 418521600000000000 +road name="23rd Ave ",thepath="[(-122.2298,37.892),(-122.2298,37.894)]" 418608000000000000 +road name="23rd Ave ",thepath="[(-122.2339,37.841),(-122.233,37.849)]" 418694400000000000 +road name="23rd Ave ",thepath="[(-122.2357,37.824),(-122.2356,37.825)]" 418780800000000000 +road name="23rd Ave ",thepath="[(-122.2359,37.817),(-122.236,37.82)]" 418867200000000000 +road name="23rd St ",thepath="[(-122.2258,37.878),(-122.2252,37.875)]" 418953600000000000 +road name="23rd St ",thepath="[(-122.228,37.896),(-122.2271,37.89)]" 419040000000000000 +road name="23rd St ",thepath="[(-122.2404,37.982),(-122.2395,37.974)]" 419126400000000000 +road name="23rd St ",thepath="[(-122.2648,37.124),(-122.2658,37.125)]" 419212800000000000 +road name="23rd Av Ovps",thepath="[(-122.2356,37.768),(-122.235,37.754)]" 419299200000000000 +road name="23rd Av Ovps",thepath="[(-122.236,37.783),(-122.2356,37.768)]" 419385600000000000 +road name="24th Ave ",thepath="[(-122.2285,37.873),(-122.2277,37.88),(-122.2271,37.89)]" 419472000000000000 +road name="24th St ",thepath="[(-122.233,37.936),(-122.2309,37.923)]" 419558400000000000 +road name="24th St ",thepath="[(-122.2352,37.95),(-122.235,37.948)]" 419644800000000000 +road name="24th St ",thepath="[(-122.2868,37.183),(-122.2877,37.186)]" 419731200000000000 +road name="24th St ",thepath="[(-122.2901,37.198),(-122.2914,37.204)]" 419817600000000000 +road name="25th Ave ",thepath="[(-122.2222,37.94),(-122.222,37.942)]" 419904000000000000 +road name="26th Ave ",thepath="[(-122.2252,37.875),(-122.2244,37.884)]" 419990400000000000 +road name="26th St ",thepath="[(-122.2294,37.939),(-122.2289,37.936)]" 420076800000000000 +road name="26th St ",thepath="[(-122.2739,37.171),(-122.2749,37.172)]" 420163200000000000 +road name="26th St ",thepath="[(-122.2791,37.183),(-122.28,37.185)]" 420249600000000000 +road name="27th Ave ",thepath="[(-122.234,37.773),(-122.2335,37.778)]" 420336000000000000 +road name="27th St ",thepath="[(-122.2224,37.918),(-122.2216,37.912)]" 420422400000000000 +road name="27th St ",thepath="[(-122.2243,37.928),(-122.2231,37.921)]" 420508800000000000 +road name="27th St ",thepath="[(-122.2287,37.945),(-122.2278,37.939)]" 420595200000000000 +road name="27th St ",thepath="[(-122.2625,37.151),(-122.2626,37.154)]" 420681600000000000 +road name="27th St ",thepath="[(-122.2751,37.181),(-122.276,37.18)]" 420768000000000000 +road name="28th St ",thepath="[(-122.2356,37.999),(-122.235,37.994)]" 420854400000000000 +road name="28th St ",thepath="[(-122.2671,37.176),(-122.2684,37.179)]" 420940800000000000 +road name="28th St ",thepath="[(-122.2754,37.192),(-122.2764,37.193)]" 421027200000000000 +road name="29th St ",thepath="[(-122.2633,37.179),(-122.264,37.181)]" 421113600000000000 +road name="29th St ",thepath="[(-122.266,37.183),(-122.2668,37.184)]" 421200000000000000 +road name="29th St ",thepath="[(-122.2693,37.192),(-122.27,37.194)]" 421286400000000000 +road name="29th St ",thepath="[(-122.2707,37.189),(-122.2733,37.194)]" 421372800000000000 +road name="29th Av Ovps",thepath="[(-122.2323,37.748),(-122.2321,37.752)]" 421459200000000000 +road name="2nd St ",thepath="[(-121.9787,37.76),(-121.9775,37.757)]" 421545600000000000 +road name="2nd St ",thepath="[(-121.9825,37.768),(-121.9806,37.763)]" 421632000000000000 +road name="2nd St ",thepath="[(-121.986342,37.77609),(-121.9854,37.774),(-121.9842,37.772)]" 421718400000000000 +road name="2nd St ",thepath="[(-122.0522,37.685),(-122.05205,37.6854)]" 421804800000000000 +road name="2nd St ",thepath="[(-122.0553,37.679),(-122.0539,37.682)]" 421891200000000000 +road name="2nd St ",thepath="[(-122.0697,37.696),(-122.0674,37.688)]" 421977600000000000 +road name="2nd St ",thepath="[(-122.2781,37.975),(-122.2792,37.979)]" 422064000000000000 +road name="30th St ",thepath="[(-122.2789,37.218),(-122.2801,37.22)]" 422150400000000000 +road name="31st Ave ",thepath="[(-122.2259,37.771),(-122.2254,37.779)]" 422236800000000000 +road name="31st St ",thepath="[(-122.2252,37.982),(-122.224,37.979)]" 422323200000000000 +road name="31st St ",thepath="[(-122.2323,37.995),(-122.2303,37.992)]" 422409600000000000 +road name="31st St ",thepath="[(-122.2728,37.212),(-122.2756,37.217)]" 422496000000000000 +road name="32nd St ",thepath="[(-122.225,37.99),(-122.2244,37.988)]" 422582400000000000 +road name="32nd St ",thepath="[(-122.2754,37.227),(-122.2765,37.228)]" 422668800000000000 +road name="32nd St ",thepath="[(-122.2839,37.242),(-122.285,37.239)]" 422755200000000000 +road name="32nd St ",thepath="[(-122.2893,37.23),(-122.2901,37.229)]" 422841600000000000 +road name="33rd Ave ",thepath="[(-122.2235,37.776),(-122.2225,37.798)]" 422928000000000000 +road name="34th Ave ",thepath="[(-122.2205,37.811),(-122.2196,37.829)]" 423014400000000000 +road name="34th Ave ",thepath="[(-122.2232,37.755),(-122.2225,37.765)]" 423100800000000000 +road name="34th Ave ",thepath="[(-122.2251,37.728),(-122.2246,37.737)]" 423187200000000000 +road name="34th St ",thepath="[(-122.2637,37.223),(-122.2647,37.225)]" 423273600000000000 +road name="35th Ave ",thepath="[(-122.1914,37.983),(-122.1909,37.988)]" 423360000000000000 +road name="35th Ave ",thepath="[(-122.2005,37.929),(-122.1996,37.935)]" 423446400000000000 +road name="35th Ave ",thepath="[(-122.214,37.85),(-122.2138,37.852)]" 423532800000000000 +road name="35th Ave ",thepath="[(-122.2243,37.724),(-122.2238,37.731)]" 423619200000000000 +road name="35th St ",thepath="[(-122.2685,37.243),(-122.2692,37.244)]" 423705600000000000 +road name="35th St ",thepath="[(-122.2746,37.257),(-122.2779,37.266)]" 423792000000000000 +road name="35th St ",thepath="[(-122.2783,37.266),(-122.2792,37.269)]" 423878400000000000 +road name="36th Ave ",thepath="[(-122.2196,37.778),(-122.218,37.802)]" 423964800000000000 +road name="36th Ave ",thepath="[(-122.2214,37.746),(-122.2206,37.755)]" 424051200000000000 +road name="36th Ave ",thepath="[(-122.2221,37.737),(-122.222,37.738)]" 424137600000000000 +road name="36th Ave ",thepath="[(-122.2233,37.721),(-122.223,37.725)]" 424224000000000000 +road name="36th Ave ",thepath="[(-122.22414,37.70988),(-122.2238,37.716)]" 424310400000000000 +road name="36th St ",thepath="[(-122.228,37.022),(-122.227,37.02)]" 424396800000000000 +road name="36th St ",thepath="[(-122.2779,37.273),(-122.279,37.277)]" 424483200000000000 +road name="37th Ave ",thepath="[(-122.2211,37.732),(-122.221,37.733)]" 424569600000000000 +road name="37th St ",thepath="[(-122.2613,37.249),(-122.265,37.257)]" 424656000000000000 +road name="37th St ",thepath="[(-122.265,37.26),(-122.2663,37.271)]" 424742400000000000 +road name="37th St ",thepath="[(-122.2743,37.274),(-122.2768,37.278)]" 424828800000000000 +road name="38th Ave ",thepath="[(-122.1963,37.907),(-122.1954,37.912)]" 424915200000000000 +road name="38th Ave ",thepath="[(-122.2202,37.729),(-122.2197,37.734)]" 425001600000000000 +road name="38th St ",thepath="[(-122.2204,37.029),(-122.2199,37.028)]" 425088000000000000 +road name="38th St ",thepath="[(-122.2571,37.266),(-122.2583,37.268)]" 425174400000000000 +road name="38th St ",thepath="[(-122.2587,37.268),(-122.2597,37.269)]" 425260800000000000 +road name="39th Ave ",thepath="[(-122.2054,37.85),(-122.205,37.852)]" 425347200000000000 +road name="39th Ave ",thepath="[(-122.2163,37.763),(-122.216,37.768)]" 425433600000000000 +road name="3rd St ",thepath="[(-121.892355,37.95759),(-121.8908,37.957)]" 425520000000000000 +road name="3rd St ",thepath="[(-122.2872,37.803),(-122.287191,37.8084)]" 425606400000000000 +road name="3rd St ",thepath="[(-122.2873,37.767),(-122.2873,37.775)]" 425692800000000000 +road name="3rd St ",thepath="[(-122.2874,37.739),(-122.2874,37.748)]" 425779200000000000 +road name="3rd St ",thepath="[(-122.2894,37.019),(-122.2905,37.021)]" 425865600000000000 +road name="3rd St ",thepath="[(-122.2972,37.034),(-122.2982,37.036)]" 425952000000000000 +road name="40th Ave ",thepath="[(-122.2156,37.76),(-122.2152,37.764)]" 426038400000000000 +road name="40th St ",thepath="[(-122.2585,37.286),(-122.2594,37.288)]" 426124800000000000 +road name="41st Ave ",thepath="[(-122.214,37.75),(-122.2135,37.756)]" 426211200000000000 +road name="41st Ave ",thepath="[(-122.2153,37.735),(-122.2151,37.738)]" 426297600000000000 +road name="41st Ave ",thepath="[(-122.217,37.719),(-122.2169,37.721)]" 426384000000000000 +road name="41st St ",thepath="[(-122.2562,37.29),(-122.2571,37.291)]" 426470400000000000 +road name="41st St ",thepath="[(-122.2655,37.305),(-122.2653,37.314)]" 426556800000000000 +road name="41st St ",thepath="[(-122.2671,37.308),(-122.2677,37.308)]" 426643200000000000 +road name="41st St ",thepath="[(-122.2768,37.324),(-122.2773,37.325)]" 426729600000000000 +road name="42nd Ave ",thepath="[(-122.2104,37.767),(-122.2097,37.773)]" 426816000000000000 +road name="42nd St ",thepath="[(-122.2755,37.33),(-122.2765,37.332)]" 426902400000000000 +road name="43rd St ",thepath="[(-122.2673,37.325),(-122.2698,37.329)]" 426988800000000000 +road name="43rd St ",thepath="[(-122.2763,37.338),(-122.2768,37.339)]" 427075200000000000 +road name="45th Ave ",thepath="[(-122.2088,37.749),(-122.208,37.758)]" 427161600000000000 +road name="45th Ave ",thepath="[(-122.2118,37.713),(-122.2109,37.724)]" 427248000000000000 +road name="45th St ",thepath="[(-122.2814,37.341),(-122.2825,37.339)]" 427334400000000000 +road name="46th Ave ",thepath="[(-122.214,37.685),(-122.2137,37.688)]" 427420800000000000 +road name="46th St ",thepath="[(-122.2669,37.345),(-122.2694,37.349)]" 427507200000000000 +road name="47th Ave ",thepath="[(-122.2086,37.719),(-122.2082,37.723)]" 427593600000000000 +road name="48th Ave ",thepath="[(-122.2059,37.736),(-122.2052,37.745)]" 427680000000000000 +road name="48th St ",thepath="[(-122.2633,37.354),(-122.2643,37.356)]" 427766400000000000 +road name="48th St ",thepath="[(-122.2782,37.373),(-122.2782,37.37224)]" 427852800000000000 +road name="49th St ",thepath="[(-122.2545,37.348),(-122.2552,37.349)]" 427939200000000000 +road name="4th Ave ",thepath="[(-122.2534,37.976),(-122.2524,37.983)]" 428025600000000000 +road name="4th St ",thepath="[(-121.7778,37.76),(-121.7753,37.769),(-121.7741,37.772)]" 428112000000000000 +road name="4th St ",thepath="[(-122.0775,37.831),(-122.0772,37.824)]" 428198400000000000 +road name="4th St ",thepath="[(-122.2773,37.988),(-122.2784,37.993)]" 428284800000000000 +road name="4th St ",thepath="[(-122.2853,37.738),(-122.2854,37.742)]" 428371200000000000 +road name="4th St ",thepath="[(-122.3005,37.885),(-122.3006,37.871)]" 428457600000000000 +road name="50th Ave ",thepath="[(-122.2059,37.718),(-122.2054,37.724)]" 428544000000000000 +road name="50th Ave ",thepath="[(-122.2108,37.663),(-122.2096,37.675)]" 428630400000000000 +road name="50th Ave ",thepath="[(-122.2135,37.638),(-122.2123,37.65)]" 428716800000000000 +road name="51st Ave ",thepath="[(-122.2103,37.658),(-122.21,37.661)]" 428803200000000000 +road name="52nd Ave ",thepath="[(-122.2096,37.653),(-122.2092,37.657)]" 428889600000000000 +road name="52nd St ",thepath="[(-122.268,37.376),(-122.2683,37.376)]" 428976000000000000 +road name="52nd St ",thepath="[(-122.2706,37.372),(-122.2728,37.369)]" 429062400000000000 +road name="53rd Ave ",thepath="[(-122.2075,37.659),(-122.205,37.679)]" 429148800000000000 +road name="54th Ave ",thepath="[(-122.2076,37.649),(-122.2068,37.654)]" 429235200000000000 +road name="54th St ",thepath="[(-122.2733,37.386),(-122.275,37.384)]" 429321600000000000 +road name="55th Ave ",thepath="[(-122.1886,37.768),(-122.1883,37.77)]" 429408000000000000 +road name="55th Ave ",thepath="[(-122.197,37.709),(-122.1963,37.714)]" 429494400000000000 +road name="55th Ave ",thepath="[(-122.1996,37.689),(-122.1991,37.695)]" 429580800000000000 +road name="55th St ",thepath="[(-122.2641,37.408),(-122.2667,37.404)]" 429667200000000000 +road name="55th St ",thepath="[(-122.2824,37.386),(-122.2834,37.384)]" 429753600000000000 +road name="56th St ",thepath="[(-122.2692,37.409),(-122.2695,37.409)]" 429840000000000000 +road name="56th St ",thepath="[(-122.2735,37.404),(-122.2743,37.403)]" 429926400000000000 +road name="57th Ave ",thepath="[(-122.1933,37.711),(-122.1928,37.721)]" 430012800000000000 +road name="57th Ave ",thepath="[(-122.1969,37.686),(-122.1964,37.689)]" 430099200000000000 +road name="57th St ",thepath="[(-122.2609,37.433),(-122.262,37.435)]" 430185600000000000 +road name="57th St ",thepath="[(-122.2661,37.428),(-122.2671,37.426)]" 430272000000000000 +road name="57th St ",thepath="[(-122.274,37.418),(-122.2759,37.417)]" 430358400000000000 +road name="57th St ",thepath="[(-122.2798,37.409),(-122.2822,37.405)]" 430444800000000000 +road name="58th Ave ",thepath="[(-122.1876,37.749),(-122.1867,37.755)]" 430531200000000000 +road name="58th St ",thepath="[(-122.2663,37.437),(-122.2673,37.435)]" 430617600000000000 +road name="58th St ",thepath="[(-122.2701,37.437),(-122.272,37.435)]" 430704000000000000 +road name="59th St ",thepath="[(-122.2587,37.456),(-122.2608,37.454)]" 430790400000000000 +road name="59th St ",thepath="[(-122.2665,37.445),(-122.2675,37.445)]" 430876800000000000 +road name="59th St ",thepath="[(-122.2863,37.42),(-122.2872,37.418)]" 430963200000000000 +road name="5th Ave ",thepath="[(-122.2516,37.975),(-122.2507,37.982)]" 431049600000000000 +road name="5th St ",thepath="[(-121.7638,37.795),(-121.7633,37.795)]" 431136000000000000 +road name="5th St ",thepath="[(-121.7713,37.772),(-121.7701,37.775)]" 431222400000000000 +road name="5th St ",thepath="[(-121.7737,37.765),(-121.7727,37.769)]" 431308800000000000 +road name="5th St ",thepath="[(-121.7766,37.757),(-121.7751,37.761)]" 431395200000000000 +road name="5th St ",thepath="[(-121.9082,37.114),(-121.9045,37.113)]" 431481600000000000 +road name="5th St ",thepath="[(-122.0235,37.054),(-122.0224,37.045)]" 431568000000000000 +road name="5th St ",thepath="[(-122.071,37.754),(-122.0707,37.749)]" 431654400000000000 +road name="5th St ",thepath="[(-122.0732,37.8),(-122.0725,37.789)]" 431740800000000000 +road name="5th St ",thepath="[(-122.2732,37.981),(-122.2744,37.986)]" 431827200000000000 +road name="5th St ",thepath="[(-122.2756,37.991),(-122.2768,37.995)]" 431913600000000000 +road name="5th St ",thepath="[(-122.278,37),(-122.2792,37.005),(-122.2803,37.009)]" 432000000000000000 +road name="5th St ",thepath="[(-122.2815,37.766),(-122.2814,37.777)]" 432086400000000000 +road name="5th St ",thepath="[(-122.2816,37.747),(-122.2816,37.757)]" 432172800000000000 +road name="5th St ",thepath="[(-122.2901,37.036),(-122.292,37.04)]" 432259200000000000 +road name="5th St ",thepath="[(-122.2933,37.041),(-122.2946,37.045)]" 432345600000000000 +road name="5th St ",thepath="[(-122.296,37.615),(-122.2953,37.598)]" 432432000000000000 +road name="5th St ",thepath="[(-122.2977,37.665),(-122.2972,37.651),(-122.2966,37.633)]" 432518400000000000 +road name="5th St ",thepath="[(-122.2979,37.866),(-122.2979,37.87)]" 432604800000000000 +road name="5th St ",thepath="[(-122.3011,37.775),(-122.3008,37.763)]" 432691200000000000 +road name="60th Ave ",thepath="[(-122.1881,37.712),(-122.1868,37.722)]" 432777600000000000 +road name="60th St ",thepath="[(-122.2606,37.469),(-122.2615,37.466)]" 432864000000000000 +road name="60th St ",thepath="[(-122.2816,37.435),(-122.2831,37.432)]" 432950400000000000 +road name="61st Ave ",thepath="[(-122.1973,37.643),(-122.1962,37.65)]" 433036800000000000 +road name="61st St ",thepath="[(-122.2861,37.436),(-122.2877,37.433)]" 433123200000000000 +road name="62nd Ave ",thepath="[(-122.1794,37.751),(-122.1787,37.755)]" 433209600000000000 +road name="62nd Ave ",thepath="[(-122.1916,37.67),(-122.1911,37.673)]" 433296000000000000 +road name="62nd Ave ",thepath="[(-122.1992,37.617),(-122.1982,37.623)]" 433382400000000000 +road name="62nd St ",thepath="[(-122.254,37.494),(-122.2563,37.491)]" 433468800000000000 +road name="62nd St ",thepath="[(-122.268,37.477),(-122.2685,37.476)]" 433555200000000000 +road name="62nd St ",thepath="[(-122.2755,37.466),(-122.2749,37.467)]" 433641600000000000 +road name="62nd St ",thepath="[(-122.2761,37.465),(-122.276639,37.4632),(-122.2767,37.463)]" 433728000000000000 +road name="63rd Ave ",thepath="[(-122.1853,37.7),(-122.1844,37.706)]" 433814400000000000 +road name="63rd St ",thepath="[(-122.2563,37.495),(-122.2576,37.493),(-122.2596,37.49)]" 433900800000000000 +road name="63rd St ",thepath="[(-122.2604,37.49),(-122.2621,37.487)]" 433987200000000000 +road name="63rd St ",thepath="[(-122.2622,37.492),(-122.2651,37.489)]" 434073600000000000 +road name="63rd St ",thepath="[(-122.2708,37.481),(-122.269,37.484)]" 434160000000000000 +road name="64th Ave ",thepath="[(-122.1758,37.76),(-122.1753,37.767)]" 434246400000000000 +road name="64th Ave ",thepath="[(-122.188,37.673),(-122.1852,37.691)]" 434332800000000000 +road name="64th Ave ",thepath="[(-122.1921,37.645),(-122.1911,37.652)]" 434419200000000000 +road name="64th St ",thepath="[(-122.2869,37.46),(-122.2884,37.455)]" 434505600000000000 +road name="64th St ",thepath="[(-122.2945,37.441),(-122.2962,37.439)]" 434592000000000000 +road name="64th Av Pl ",thepath="[(-122.1784,37.734),(-122.1767,37.744)]" 434678400000000000 +road name="65th St ",thepath="[(-122.2653,37.505),(-122.2661,37.504)]" 434764800000000000 +road name="65th St ",thepath="[(-122.2847,37.481),(-122.2874,37.476)]" 434851200000000000 +road name="66th Ave ",thepath="[(-122.2013,37.556),(-122.1997,37.564)]" 434937600000000000 +road name="66th Ave ",thepath="[(-122.2054,37.542),(-122.2042,37.546)]" 435024000000000000 +road name="67th St ",thepath="[(-122.2828,37.504),(-122.283232,37.5031)]" 435110400000000000 +road name="67th St ",thepath="[(-122.28407,37.50135),(-122.2852,37.499)]" 435196800000000000 +road name="67th St ",thepath="[(-122.2887,37.495),(-122.2913,37.49)]" 435283200000000000 +road name="69th Ave ",thepath="[(-122.1927,37.582),(-122.1919,37.587)]" 435369600000000000 +road name="69th Ave ",thepath="[(-122.1959,37.56),(-122.1954,37.563)]" 435456000000000000 +road name="6th St ",thepath="[(-121.7634,37.785),(-121.7624,37.789)]" 435542400000000000 +road name="6th St ",thepath="[(-122.0219,37.032),(-122.0208,37.022)]" 435628800000000000 +road name="6th St ",thepath="[(-122.2691,37.975),(-122.2704,37.98)]" 435715200000000000 +road name="6th St ",thepath="[(-122.274,37.993),(-122.2752,37.998)]" 435801600000000000 +road name="6th St ",thepath="[(-122.2965,37.668),(-122.296,37.653)]" 435888000000000000 +road name="6th St ",thepath="[(-122.2982,37.724),(-122.2977,37.705)]" 435974400000000000 +road name="6th St ",thepath="[(-122.3012,37.813),(-122.3006,37.795)]" 436060800000000000 +road name="6th St ",thepath="[(-122.3016,37.831),(-122.3016,37.826)]" 436147200000000000 +road name="70 Canal ",thepath="[(-121.576176,37.91958),(-121.57645,37.91996)]" 436233600000000000 +road name="70th Ave ",thepath="[(-122.187,37.611),(-122.1862,37.616)]" 436320000000000000 +road name="71st Ave ",thepath="[(-122.1908,37.576),(-122.189,37.588)]" 436406400000000000 +road name="71st Ave ",thepath="[(-122.195,37.548),(-122.1944,37.553)]" 436492800000000000 +road name="73rd Ave ",thepath="[(-122.1746,37.664),(-122.1724,37.68)]" 436579200000000000 +road name="73rd Ave ",thepath="[(-122.1768,37.651),(-122.1761,37.655)]" 436665600000000000 +road name="73rd Ave ",thepath="[(-122.1802,37.628),(-122.1794,37.633)]" 436752000000000000 +road name="73rd Ave ",thepath="[(-122.1837,37.606),(-122.1829,37.611)]" 436838400000000000 +road name="73rd Ave ",thepath="[(-122.1915,37.554),(-122.1897,37.565)]" 436924800000000000 +road name="74th Ave ",thepath="[(-122.175,37.653),(-122.174,37.66)]" 437011200000000000 +road name="77th Ave ",thepath="[(-122.17,37.656),(-122.1682,37.668)]" 437097600000000000 +road name="78th Ave ",thepath="[(-122.1697,37.652),(-122.1674,37.663)]" 437184000000000000 +road name="78th Ave ",thepath="[(-122.1791,37.593),(-122.1784,37.597)]" 437270400000000000 +road name="79th Ave ",thepath="[(-122.1686,37.639),(-122.1662,37.65)]" 437356800000000000 +road name="7th Ave ",thepath="[(-122.2413,37.015),(-122.2406,37.021)]" 437443200000000000 +road name="7th Ave ",thepath="[(-122.2459,37.985),(-122.2449,37.991)]" 437529600000000000 +road name="7th Ave ",thepath="[(-122.2528,37.94),(-122.2518,37.947)]" 437616000000000000 +road name="7th St ",thepath="[(-121.7606,37.79),(-121.7597,37.798)]" 437702400000000000 +road name="7th St ",thepath="[(-121.7618,37.779),(-121.7615,37.783)]" 437788800000000000 +road name="7th St ",thepath="[(-122.0047,37.916),(-122.0041,37.92)]" 437875200000000000 +road name="7th St ",thepath="[(-122.0168,37.978),(-122.0149,37.974)]" 437961600000000000 +road name="7th St ",thepath="[(-122.0674,37.771),(-122.0667,37.761)]" 438048000000000000 +road name="7th St ",thepath="[(-122.0693,37.803),(-122.0687,37.793)]" 438134400000000000 +road name="7th St ",thepath="[(-122.2362,37.753),(-122.235,37.754)]" 438220800000000000 +road name="7th St ",thepath="[(-122.2759,37.009),(-122.2771,37.014)]" 438307200000000000 +road name="7th St ",thepath="[(-122.2864,37.041),(-122.2875,37.043)]" 438393600000000000 +road name="7th St ",thepath="[(-122.2903,37.511),(-122.2902,37.508)]" 438480000000000000 +road name="7th St ",thepath="[(-122.2916,37.052),(-122.2926,37.055)]" 438566400000000000 +road name="7th St ",thepath="[(-122.2918,37.562),(-122.2916,37.553)]" 438652800000000000 +road name="7th St ",thepath="[(-122.2945,37.635),(-122.2938,37.62)]" 438739200000000000 +road name="7th St ",thepath="[(-122.2996,37.797),(-122.299,37.779),(-122.2985,37.767)]" 438825600000000000 +road name="7th St ",thepath="[(-122.3215,37.099),(-122.326,37.102)]" 438912000000000000 +road name="80th Ave ",thepath="[(-122.1807,37.563),(-122.1793,37.57)]" 438998400000000000 +road name="81st Ave ",thepath="[(-122.1912,37.493),(-122.191,37.495)]" 439084800000000000 +road name="82nd Ave ",thepath="[(-122.1659,37.614),(-122.1653,37.619)]" 439171200000000000 +road name="82nd Ave ",thepath="[(-122.1695,37.596),(-122.1681,37.603)]" 439257600000000000 +road name="82nd Ave ",thepath="[(-122.1764,37.562),(-122.1747,37.57)]" 439344000000000000 +road name="83rd Ave ",thepath="[(-122.1741,37.563),(-122.1724,37.571)]" 439430400000000000 +road name="83rd Ave ",thepath="[(-122.1799,37.531),(-122.179,37.535)]" 439516800000000000 +road name="84th Ave ",thepath="[(-122.1683,37.58),(-122.1665,37.589)]" 439603200000000000 +road name="85th Ave ",thepath="[(-122.1677,37.573),(-122.166,37.581)]" 439689600000000000 +road name="85th Ave ",thepath="[(-122.173,37.548),(-122.1713,37.556)]" 439776000000000000 +road name="85th Ave ",thepath="[(-122.1763,37.533),(-122.1748,37.54)]" 439862400000000000 +road name="85th Ave ",thepath="[(-122.1877,37.466),(-122.186,37.476)]" 439948800000000000 +road name="87th Ave ",thepath="[(-122.1646,37.561),(-122.1643,37.563)]" 440035200000000000 +road name="87th Ave ",thepath="[(-122.1698,37.536),(-122.1681,37.544)]" 440121600000000000 +road name="87th Ave ",thepath="[(-122.1834,37.474),(-122.1814,37.484)]" 440208000000000000 +road name="88th Ave ",thepath="[(-122.1728,37.514),(-122.1711,37.521)]" 440294400000000000 +road name="89th Ave ",thepath="[(-122.1822,37.459),(-122.1803,37.471)]" 440380800000000000 +road name="8th Ave ",thepath="[(-122.2489,37.952),(-122.248,37.958)]" 440467200000000000 +road name="8th St ",thepath="[(-121.9083,37.161),(-121.9081,37.16)]" 440553600000000000 +road name="8th St ",thepath="[(-122.2459,37.882),(-122.2456,37.879)]" 440640000000000000 +road name="8th St ",thepath="[(-122.2546,37.914),(-122.2533,37.909)]" 440726400000000000 +road name="8th St ",thepath="[(-122.2572,37.935),(-122.256523,37.92898)]" 440812800000000000 +road name="8th St ",thepath="[(-122.2755,37.017),(-122.2766,37.022)]" 440899200000000000 +road name="8th St ",thepath="[(-122.2955,37.709),(-122.2952,37.698)]" 440985600000000000 +road name="8th St ",thepath="[(-122.296,37.748),(-122.296,37.733)]" 441072000000000000 +road name="8th St ",thepath="[(-122.2969,37.751),(-122.2967,37.746)]" 441158400000000000 +road name="90th Ave ",thepath="[(-122.1769,37.477),(-122.1753,37.485)]" 441244800000000000 +road name="90th Ave ",thepath="[(-122.1798,37.464),(-122.1785,37.47)]" 441331200000000000 +road name="92nd Ave ",thepath="[(-122.1759,37.464),(-122.1742,37.472)]" 441417600000000000 +road name="94th Ave ",thepath="[(-122.1714,37.466),(-122.1704,37.472)]" 441504000000000000 +road name="96th Ave ",thepath="[(-122.1621,37.493),(-122.161,37.498)]" 441590400000000000 +road name="98th Ave ",thepath="[(-122.1568,37.498),(-122.1558,37.502)]" 441676800000000000 +road name="98th Ave ",thepath="[(-122.1693,37.438),(-122.1682,37.444)]" 441763200000000000 +road name="98th Ave ",thepath="[(-122.1767,37.401),(-122.1758,37.408)]" 441849600000000000 +road name="98th Ave ",thepath="[(-122.1783,37.388),(-122.1773,37.396)]" 441936000000000000 +road name="98th Ave ",thepath="[(-122.1791,37.382),(-122.1788,37.384)]" 442022400000000000 +road name="98th Ave ",thepath="[(-122.1914,37.294),(-122.1904,37.298)]" 442108800000000000 +road name="98th Ave ",thepath="[(-122.2001,37.258),(-122.1974,37.27)]" 442195200000000000 +road name="99th Av Ct ",thepath="[(-122.1698,37.427),(-122.1694,37.422)]" 442281600000000000 +road name="9th Ave ",thepath="[(-122.2491,37.938),(-122.248,37.945)]" 442368000000000000 +road name="9th Ave ",thepath="[(-122.2516,37.922),(-122.2511,37.925)]" 442454400000000000 +road name="9th St ",thepath="[(-122.2349,37.779),(-122.234,37.773)]" 442540800000000000 +road name="9th St ",thepath="[(-122.27,37.725),(-122.27,37.734)]" 442627200000000000 +road name="9th St ",thepath="[(-122.2899,37.576),(-122.2897,37.567)]" 442713600000000000 diff --git a/init_v2/stud_emp.txt b/init_v2/stud_emp.txt new file mode 100644 index 0000000..8e7d84f --- /dev/null +++ b/init_v2/stud_emp.txt @@ -0,0 +1,6 @@ +# DML +# CONTEXT-DATABASE: coredb + +stud_emp name="jeff",age=23i,location="(8,7.7)",salary=600i,manager="sharon",gpa=3.50000000000000000e+00,percent=0i 4360000000000000 +stud_emp name="cim",age=30i,location="(10.5,4.7)",salary=400i,manager="",gpa=3.39999999999999990e+00,percent=0i 4370000000000000 +stud_emp name="linda",age=19i,location="(0.9,6.1)",salary=100i,manager="",gpa=2.89999999999999990e+00,percent=0i 4380000000000000 diff --git a/init_v2/student.txt b/init_v2/student.txt new file mode 100644 index 0000000..04fd5cd --- /dev/null +++ b/init_v2/student.txt @@ -0,0 +1,5 @@ +# DML +# CONTEXT-DATABASE: coredb + +student name="fred",age=28i,location="(3.1,-1.5)",gpa=3.70000000000000020e+00 86400000000000 +student name="larry",age=60i,location="(21.8,4.9)",gpa=3.10000000000000010e+00 172800000000000 diff --git a/init_v2/tag_add_1.txt b/init_v2/tag_add_1.txt new file mode 100644 index 0000000..69aa4a4 --- /dev/null +++ b/init_v2/tag_add_1.txt @@ -0,0 +1,12 @@ +# DML +# CONTEXT-DATABASE: schemalessdb + +sctbl4,sid=id1 sig1=12120i,sig2="aoaowejf",sig3=4098219035,sig4=true 5235 +sctbl4,sid=id2 sig1=2120i,sig2="BAEFOAWJ#AWEK",sig3=1023108589,sig4=false 525245 +sctbl4,sid=id3 sig1=-230i,sig2="C)@maEFJAe=3kake",sig3=0,sig4=false 43546 +sctbl4,sid=id4 sig1=-340i,sig2="装置開発機能仕",sig3=9384972,sig4=true 52566 +sctbl4,sid=id1 sig1=1250i,sig2="システムGUIソフトウエア",sig3=-10000,sig4=false 8578 +sctbl4,sid=id3 sig1=9260i,sig2="インターフェース設計検討資料",sig3=-24,sig4=false 986 +sctbl4,sid=id2 sig1=370i,sig2="g029012",sig3=109489057,sig4=true 99 +sctbl4,sid=id4 sig1=480i,sig2="+!2-3-12030_!@#!)~_#@%)",sig3=9826357635,sig4=false 12431 +sctbl4,sid=id1 sig1=190i,sig2="012002'akewo02",sig3=3452697758,sig4=false 2425 diff --git a/init_v2/tag_add_20.txt b/init_v2/tag_add_20.txt new file mode 100644 index 0000000..5657dc8 --- /dev/null +++ b/init_v2/tag_add_20.txt @@ -0,0 +1,8 @@ +# DML +# CONTEXT-DATABASE: schemalessdb + +sctbl4,sid1=bNq9sRC3qfxY99a,sid2=5061715,sid3=8578,sid4=yZuKWGiQOFXDNAJm,sid5=TRUE,sid6=false,sid7=attract,sid8=$%^&*,sid9=辛辣仇恨挫败悲观情绪,sid10="1\ vợ",sid11=t,sid12=13653,sid13=154581.27841,sid14=id1,sid15=true,sid16=id1,sid17=那就是他如何赢得100万美元,sid18=id1,sid19=彼は豚が,sid20=14681764 sig1=12120i,sig2="aoaowejf",sig3=10.1,sig4=true 2342354 +sctbl4,sid1=bMBOphOey0kXMun,sid2=9655923,sid3=3646,sid4=BOQGiWddylrRFmKs,sid5=FALSE,sid6=true,sid7=constraint,sid8=!@#$%^,sid9=讨厌生活,sid10="1\ vợ\ 2\ vợ\ 3\ vợ",sid11=t,sid12=13167,sid13=9883.4341,sid14=id2,sid15=true,sid16=id2,sid17=明天将带来新的事物,所以今天就留下美好的回忆,sid18=id2,sid19=誰が作ったのか誰も質問しません,sid20=1232 sig1=2120i,sig2="BAEFOAWJ#AWEK",sig3=10.2,sig4=false 14215345 +sctbl4,sid1=3W9awb6DnWDGOGr,sid2=4830959,sid3=0038,sid4=epzhtqukYCyZNZbI,sid5=FALSE,sid6=true,sid7=freighter,sid8=$%^&*,sid9=爱情不幸福,sid10="4\ vợ\ 5\ vợ\ 6\ v",sid11=f,sid12=10781647619,sid13=4988.9871,sid14=id3,sid15=false,sid16=id3,sid17=当他等待淋浴温暖时,他注意到他能听到水的变化温度,sid18=id3,sid19=彼はなぜ18歳で彼が,sid20=31246 sig1=-230i,sig2="C)@maEFJAe=3kake",sig3=10.3,sig4=false 635786 +sctbl4,sid1=1wBi4XmD6vOCRM7,sid2=2462190,sid3=4366,sid4=SOlGbhjGOauCvZrK,sid5=FALSE,sid6=true,sid7=cooperation,sid8=@&*$%^&,sid9=生活无聊,sid10="1\ chồng\ 2\ ck\ ",sid11=f,sid12=361645187500,sid13=178617.7,sid14=id4,sid15=false,sid16=id4,sid17=黎明起床是为了鸟,sid18=id4,sid19=彼はなぜ18歳で彼がHHJAHJGYJB,sid20=12315475 sig1=-340i,sig2="装置開発機能仕",sig3=20.4,sig4=true 8678574 +sctbl4,sid1=FaQLQ3WFGnMYWIe,sid2=5637128,sid3=7663,sid4=bafdZoYyqSgiklyQ,sid5=TRUE,sid6=false,sid7=average,sid8=&^%&^%$#,sid9=悲观失望希望美丽,sid10="3ck4",sid11=f,sid12=6146714,sid13=657898.01,sid14=id1,sid15=true,sid16=id1,sid17=生活中没有什么比一块馅饼好,sid18=id1,sid19=lを着た豚は誰も好きではない,sid20=8888888 sig1=1250i,sig2="システム",sig3=20.5,sig4=false 745134 diff --git a/init_v2/tag_original.txt b/init_v2/tag_original.txt new file mode 100644 index 0000000..23307f2 --- /dev/null +++ b/init_v2/tag_original.txt @@ -0,0 +1,26 @@ +# DDL +# DROP DATABASE schemalessdb +# CREATE DATABASE schemalessdb + +# DML +# CONTEXT-DATABASE: schemalessdb + +sctbl4 sig1=12120i,sig2="aoao wejf",sig3=-101,sig4=True 23442 +sctbl4 sig1=2120i,sig2="BAEFOAWJ#AWEK",sig3=102,sig4=false 631983 +sctbl4 sig1=-230i,sig2="C)@maEFJAe=3kake",sig3=103,sig4=f 25978752 +sctbl4 sig1=-340i,sig2="装置開発機能仕",sig3=0,sig4=true 142 +sctbl4 sig1=1250i,sig2="システム",sig3=205,sig4=false 54628 +sctbl4 sig1=9260i,sig2="設計 検討資料",sig3=206,sig4=false 5927 +sctbl4 sig1=370i,sig2="g029012",sig3=307,sig4=t 42351 +sctbl4 sig1=480i,sig2="+!2-3-12030_!@#!)~_#@%)",sig3=308,sig4=false 8678 +sctbl4 sig1=190i,sig2="012002'akewo02",sig3=309,sig4=FALSE 98542 + +sctbl9,sid=id1,sname=rapviet sig1=12120i,sig2="制御装置が正常に稼働していません",sig3=10.1,sig4=true 0 +sctbl9,sid=id2,sname=kingofrap sig1=2120i,sig2="BAEFOAWJ#AWEK",sig3=10.2,sig4=false 0 +sctbl9,sid=id3,sname=rapviet sig1=-230i,sig2="C)@ma EFJAe=3kake",sig3=10.3,sig4=false 0 +sctbl9,sid=id4,sname=kingofrap sig1=-340i,sig2="装置開111発機能仕",sig3=20.4,sig4=true 1 +sctbl9,sid=id5,sname=kingofrap sig1=1250i,sig2="システム",sig3=20.5,sig4=false 1 +sctbl9,sid=id6,sname=rapviet sig1=9260i,sig2="設計検討資料",sig3=20.6,sig4=false 1 +sctbl9,sid=id7,sname=rapviet sig1=370i,sig2="XINChaoTOIyeUcaCbaN",sig3=30.7,sig4=true 2 +sctbl9,sid=id8,sname=kingofrap sig1=480i,sig2="+!2-3-12030_!@#!)~_#@%)",sig3=30.8,sig4=false 2 +sctbl9,sid=id9,sname=kingofrap sig1=190i,sig2="0113 113'JXJOo02",sig3=30.9,sig4=false 2 diff --git a/init_v2/tenk.txt b/init_v2/tenk.txt new file mode 100644 index 0000000..061e33d --- /dev/null +++ b/init_v2/tenk.txt @@ -0,0 +1,10003 @@ +# DML +# CONTEXT-DATABASE: coredb + +tenk unique1=8800i,unique2=0i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=800i,twothousand=800i,fivethous=3800i,tenthous=8800i,odd=0i,even=1i,stringu1="MAAAAA",stringu2="AAAAAA",string4="AAAAxx" 86400000000000 +tenk unique1=1891i,unique2=1i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=891i,twothousand=1891i,fivethous=1891i,tenthous=1891i,odd=182i,even=183i,stringu1="TUAAAA",stringu2="BAAAAA",string4="HHHHxx" 172800000000000 +tenk unique1=3420i,unique2=2i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=420i,twothousand=1420i,fivethous=3420i,tenthous=3420i,odd=40i,even=41i,stringu1="OBAAAA",stringu2="CAAAAA",string4="OOOOxx" 259200000000000 +tenk unique1=9850i,unique2=3i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=850i,twothousand=1850i,fivethous=4850i,tenthous=9850i,odd=100i,even=101i,stringu1="WOAAAA",stringu2="DAAAAA",string4="VVVVxx" 345600000000000 +tenk unique1=7164i,unique2=4i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=164i,twothousand=1164i,fivethous=2164i,tenthous=7164i,odd=128i,even=129i,stringu1="OPAAAA",stringu2="EAAAAA",string4="AAAAxx" 432000000000000 +tenk unique1=8009i,unique2=5i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=9i,fivethous=3009i,tenthous=8009i,odd=18i,even=19i,stringu1="BWAAAA",stringu2="FAAAAA",string4="HHHHxx" 518400000000000 +tenk unique1=5057i,unique2=6i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=57i,twothousand=1057i,fivethous=57i,tenthous=5057i,odd=114i,even=115i,stringu1="NMAAAA",stringu2="GAAAAA",string4="OOOOxx" 604800000000000 +tenk unique1=6701i,unique2=7i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=701i,twothousand=701i,fivethous=1701i,tenthous=6701i,odd=2i,even=3i,stringu1="TXAAAA",stringu2="HAAAAA",string4="VVVVxx" 691200000000000 +tenk unique1=4321i,unique2=8i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=321i,twothousand=321i,fivethous=4321i,tenthous=4321i,odd=42i,even=43i,stringu1="FKAAAA",stringu2="IAAAAA",string4="AAAAxx" 777600000000000 +tenk unique1=3043i,unique2=9i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=43i,twothousand=1043i,fivethous=3043i,tenthous=3043i,odd=86i,even=87i,stringu1="BNAAAA",stringu2="JAAAAA",string4="HHHHxx" 864000000000000 +tenk unique1=1314i,unique2=10i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=314i,twothousand=1314i,fivethous=1314i,tenthous=1314i,odd=28i,even=29i,stringu1="OYAAAA",stringu2="KAAAAA",string4="OOOOxx" 950400000000000 +tenk unique1=1504i,unique2=11i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=504i,twothousand=1504i,fivethous=1504i,tenthous=1504i,odd=8i,even=9i,stringu1="WFAAAA",stringu2="LAAAAA",string4="VVVVxx" 1036800000000000 +tenk unique1=5222i,unique2=12i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=222i,twothousand=1222i,fivethous=222i,tenthous=5222i,odd=44i,even=45i,stringu1="WSAAAA",stringu2="MAAAAA",string4="AAAAxx" 1123200000000000 +tenk unique1=6243i,unique2=13i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=243i,twothousand=243i,fivethous=1243i,tenthous=6243i,odd=86i,even=87i,stringu1="DGAAAA",stringu2="NAAAAA",string4="HHHHxx" 1209600000000000 +tenk unique1=5471i,unique2=14i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=471i,twothousand=1471i,fivethous=471i,tenthous=5471i,odd=142i,even=143i,stringu1="LCAAAA",stringu2="OAAAAA",string4="OOOOxx" 1296000000000000 +tenk unique1=5006i,unique2=15i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=1006i,fivethous=6i,tenthous=5006i,odd=12i,even=13i,stringu1="OKAAAA",stringu2="PAAAAA",string4="VVVVxx" 1382400000000000 +tenk unique1=5387i,unique2=16i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=387i,twothousand=1387i,fivethous=387i,tenthous=5387i,odd=174i,even=175i,stringu1="FZAAAA",stringu2="QAAAAA",string4="AAAAxx" 1468800000000000 +tenk unique1=5785i,unique2=17i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=785i,twothousand=1785i,fivethous=785i,tenthous=5785i,odd=170i,even=171i,stringu1="NOAAAA",stringu2="RAAAAA",string4="HHHHxx" 1555200000000000 +tenk unique1=6621i,unique2=18i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=621i,twothousand=621i,fivethous=1621i,tenthous=6621i,odd=42i,even=43i,stringu1="RUAAAA",stringu2="SAAAAA",string4="OOOOxx" 1641600000000000 +tenk unique1=6969i,unique2=19i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=969i,twothousand=969i,fivethous=1969i,tenthous=6969i,odd=138i,even=139i,stringu1="BIAAAA",stringu2="TAAAAA",string4="VVVVxx" 1728000000000000 +tenk unique1=9460i,unique2=20i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=460i,twothousand=1460i,fivethous=4460i,tenthous=9460i,odd=120i,even=121i,stringu1="WZAAAA",stringu2="UAAAAA",string4="AAAAxx" 1814400000000000 +tenk unique1=59i,unique2=21i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=59i,twothousand=59i,fivethous=59i,tenthous=59i,odd=118i,even=119i,stringu1="HCAAAA",stringu2="VAAAAA",string4="HHHHxx" 1900800000000000 +tenk unique1=8020i,unique2=22i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=20i,twothousand=20i,fivethous=3020i,tenthous=8020i,odd=40i,even=41i,stringu1="MWAAAA",stringu2="WAAAAA",string4="OOOOxx" 1987200000000000 +tenk unique1=7695i,unique2=23i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=695i,twothousand=1695i,fivethous=2695i,tenthous=7695i,odd=190i,even=191i,stringu1="ZJAAAA",stringu2="XAAAAA",string4="VVVVxx" 2073600000000000 +tenk unique1=3442i,unique2=24i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=442i,twothousand=1442i,fivethous=3442i,tenthous=3442i,odd=84i,even=85i,stringu1="KCAAAA",stringu2="YAAAAA",string4="AAAAxx" 2160000000000000 +tenk unique1=5119i,unique2=25i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=119i,twothousand=1119i,fivethous=119i,tenthous=5119i,odd=38i,even=39i,stringu1="XOAAAA",stringu2="ZAAAAA",string4="HHHHxx" 2246400000000000 +tenk unique1=646i,unique2=26i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=646i,twothousand=646i,fivethous=646i,tenthous=646i,odd=92i,even=93i,stringu1="WYAAAA",stringu2="ABAAAA",string4="OOOOxx" 2332800000000000 +tenk unique1=9605i,unique2=27i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=605i,twothousand=1605i,fivethous=4605i,tenthous=9605i,odd=10i,even=11i,stringu1="LFAAAA",stringu2="BBAAAA",string4="VVVVxx" 2419200000000000 +tenk unique1=263i,unique2=28i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=263i,twothousand=263i,fivethous=263i,tenthous=263i,odd=126i,even=127i,stringu1="DKAAAA",stringu2="CBAAAA",string4="AAAAxx" 2505600000000000 +tenk unique1=3269i,unique2=29i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=269i,twothousand=1269i,fivethous=3269i,tenthous=3269i,odd=138i,even=139i,stringu1="TVAAAA",stringu2="DBAAAA",string4="HHHHxx" 2592000000000000 +tenk unique1=1839i,unique2=30i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=839i,twothousand=1839i,fivethous=1839i,tenthous=1839i,odd=78i,even=79i,stringu1="TSAAAA",stringu2="EBAAAA",string4="OOOOxx" 2678400000000000 +tenk unique1=9144i,unique2=31i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=144i,twothousand=1144i,fivethous=4144i,tenthous=9144i,odd=88i,even=89i,stringu1="SNAAAA",stringu2="FBAAAA",string4="VVVVxx" 2764800000000000 +tenk unique1=2513i,unique2=32i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=513i,twothousand=513i,fivethous=2513i,tenthous=2513i,odd=26i,even=27i,stringu1="RSAAAA",stringu2="GBAAAA",string4="AAAAxx" 2851200000000000 +tenk unique1=8850i,unique2=33i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=850i,twothousand=850i,fivethous=3850i,tenthous=8850i,odd=100i,even=101i,stringu1="KCAAAA",stringu2="HBAAAA",string4="HHHHxx" 2937600000000000 +tenk unique1=236i,unique2=34i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=236i,twothousand=236i,fivethous=236i,tenthous=236i,odd=72i,even=73i,stringu1="CJAAAA",stringu2="IBAAAA",string4="OOOOxx" 3024000000000000 +tenk unique1=3162i,unique2=35i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=162i,twothousand=1162i,fivethous=3162i,tenthous=3162i,odd=124i,even=125i,stringu1="QRAAAA",stringu2="JBAAAA",string4="VVVVxx" 3110400000000000 +tenk unique1=4380i,unique2=36i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=380i,twothousand=380i,fivethous=4380i,tenthous=4380i,odd=160i,even=161i,stringu1="MMAAAA",stringu2="KBAAAA",string4="AAAAxx" 3196800000000000 +tenk unique1=8095i,unique2=37i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=95i,twothousand=95i,fivethous=3095i,tenthous=8095i,odd=190i,even=191i,stringu1="JZAAAA",stringu2="LBAAAA",string4="HHHHxx" 3283200000000000 +tenk unique1=209i,unique2=38i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=209i,twothousand=209i,fivethous=209i,tenthous=209i,odd=18i,even=19i,stringu1="BIAAAA",stringu2="MBAAAA",string4="OOOOxx" 3369600000000000 +tenk unique1=3055i,unique2=39i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=55i,twothousand=1055i,fivethous=3055i,tenthous=3055i,odd=110i,even=111i,stringu1="NNAAAA",stringu2="NBAAAA",string4="VVVVxx" 3456000000000000 +tenk unique1=6921i,unique2=40i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=921i,twothousand=921i,fivethous=1921i,tenthous=6921i,odd=42i,even=43i,stringu1="FGAAAA",stringu2="OBAAAA",string4="AAAAxx" 3542400000000000 +tenk unique1=7046i,unique2=41i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=46i,twothousand=1046i,fivethous=2046i,tenthous=7046i,odd=92i,even=93i,stringu1="ALAAAA",stringu2="PBAAAA",string4="HHHHxx" 3628800000000000 +tenk unique1=7912i,unique2=42i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=912i,twothousand=1912i,fivethous=2912i,tenthous=7912i,odd=24i,even=25i,stringu1="ISAAAA",stringu2="QBAAAA",string4="OOOOxx" 3715200000000000 +tenk unique1=7267i,unique2=43i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=267i,twothousand=1267i,fivethous=2267i,tenthous=7267i,odd=134i,even=135i,stringu1="NTAAAA",stringu2="RBAAAA",string4="VVVVxx" 3801600000000000 +tenk unique1=3599i,unique2=44i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=599i,twothousand=1599i,fivethous=3599i,tenthous=3599i,odd=198i,even=199i,stringu1="LIAAAA",stringu2="SBAAAA",string4="AAAAxx" 3888000000000000 +tenk unique1=923i,unique2=45i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=923i,twothousand=923i,fivethous=923i,tenthous=923i,odd=46i,even=47i,stringu1="NJAAAA",stringu2="TBAAAA",string4="HHHHxx" 3974400000000000 +tenk unique1=1437i,unique2=46i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=437i,twothousand=1437i,fivethous=1437i,tenthous=1437i,odd=74i,even=75i,stringu1="HDAAAA",stringu2="UBAAAA",string4="OOOOxx" 4060800000000000 +tenk unique1=6439i,unique2=47i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=439i,twothousand=439i,fivethous=1439i,tenthous=6439i,odd=78i,even=79i,stringu1="RNAAAA",stringu2="VBAAAA",string4="VVVVxx" 4147200000000000 +tenk unique1=6989i,unique2=48i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=989i,twothousand=989i,fivethous=1989i,tenthous=6989i,odd=178i,even=179i,stringu1="VIAAAA",stringu2="WBAAAA",string4="AAAAxx" 4233600000000000 +tenk unique1=8798i,unique2=49i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=798i,twothousand=798i,fivethous=3798i,tenthous=8798i,odd=196i,even=197i,stringu1="KAAAAA",stringu2="XBAAAA",string4="HHHHxx" 4320000000000000 +tenk unique1=5960i,unique2=50i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=960i,twothousand=1960i,fivethous=960i,tenthous=5960i,odd=120i,even=121i,stringu1="GVAAAA",stringu2="YBAAAA",string4="OOOOxx" 4406400000000000 +tenk unique1=5832i,unique2=51i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=832i,twothousand=1832i,fivethous=832i,tenthous=5832i,odd=64i,even=65i,stringu1="IQAAAA",stringu2="ZBAAAA",string4="VVVVxx" 4492800000000000 +tenk unique1=6066i,unique2=52i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=66i,twothousand=66i,fivethous=1066i,tenthous=6066i,odd=132i,even=133i,stringu1="IZAAAA",stringu2="ACAAAA",string4="AAAAxx" 4579200000000000 +tenk unique1=322i,unique2=53i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=322i,twothousand=322i,fivethous=322i,tenthous=322i,odd=44i,even=45i,stringu1="KMAAAA",stringu2="BCAAAA",string4="HHHHxx" 4665600000000000 +tenk unique1=8321i,unique2=54i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=321i,twothousand=321i,fivethous=3321i,tenthous=8321i,odd=42i,even=43i,stringu1="BIAAAA",stringu2="CCAAAA",string4="OOOOxx" 4752000000000000 +tenk unique1=734i,unique2=55i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=734i,twothousand=734i,fivethous=734i,tenthous=734i,odd=68i,even=69i,stringu1="GCAAAA",stringu2="DCAAAA",string4="VVVVxx" 4838400000000000 +tenk unique1=688i,unique2=56i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=688i,twothousand=688i,fivethous=688i,tenthous=688i,odd=176i,even=177i,stringu1="MAAAAA",stringu2="ECAAAA",string4="AAAAxx" 4924800000000000 +tenk unique1=4212i,unique2=57i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=212i,twothousand=212i,fivethous=4212i,tenthous=4212i,odd=24i,even=25i,stringu1="AGAAAA",stringu2="FCAAAA",string4="HHHHxx" 5011200000000000 +tenk unique1=9653i,unique2=58i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=653i,twothousand=1653i,fivethous=4653i,tenthous=9653i,odd=106i,even=107i,stringu1="HHAAAA",stringu2="GCAAAA",string4="OOOOxx" 5097600000000000 +tenk unique1=2677i,unique2=59i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=677i,twothousand=677i,fivethous=2677i,tenthous=2677i,odd=154i,even=155i,stringu1="ZYAAAA",stringu2="HCAAAA",string4="VVVVxx" 5184000000000000 +tenk unique1=5423i,unique2=60i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=423i,twothousand=1423i,fivethous=423i,tenthous=5423i,odd=46i,even=47i,stringu1="PAAAAA",stringu2="ICAAAA",string4="AAAAxx" 5270400000000000 +tenk unique1=2592i,unique2=61i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=592i,twothousand=592i,fivethous=2592i,tenthous=2592i,odd=184i,even=185i,stringu1="SVAAAA",stringu2="JCAAAA",string4="HHHHxx" 5356800000000000 +tenk unique1=3233i,unique2=62i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=233i,twothousand=1233i,fivethous=3233i,tenthous=3233i,odd=66i,even=67i,stringu1="JUAAAA",stringu2="KCAAAA",string4="OOOOxx" 5443200000000000 +tenk unique1=5032i,unique2=63i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=32i,twothousand=1032i,fivethous=32i,tenthous=5032i,odd=64i,even=65i,stringu1="OLAAAA",stringu2="LCAAAA",string4="VVVVxx" 5529600000000000 +tenk unique1=2525i,unique2=64i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=525i,twothousand=525i,fivethous=2525i,tenthous=2525i,odd=50i,even=51i,stringu1="DTAAAA",stringu2="MCAAAA",string4="AAAAxx" 5616000000000000 +tenk unique1=4450i,unique2=65i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=450i,twothousand=450i,fivethous=4450i,tenthous=4450i,odd=100i,even=101i,stringu1="EPAAAA",stringu2="NCAAAA",string4="HHHHxx" 5702400000000000 +tenk unique1=5778i,unique2=66i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=778i,twothousand=1778i,fivethous=778i,tenthous=5778i,odd=156i,even=157i,stringu1="GOAAAA",stringu2="OCAAAA",string4="OOOOxx" 5788800000000000 +tenk unique1=5852i,unique2=67i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=852i,twothousand=1852i,fivethous=852i,tenthous=5852i,odd=104i,even=105i,stringu1="CRAAAA",stringu2="PCAAAA",string4="VVVVxx" 5875200000000000 +tenk unique1=5404i,unique2=68i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=404i,twothousand=1404i,fivethous=404i,tenthous=5404i,odd=8i,even=9i,stringu1="WZAAAA",stringu2="QCAAAA",string4="AAAAxx" 5961600000000000 +tenk unique1=6223i,unique2=69i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=223i,twothousand=223i,fivethous=1223i,tenthous=6223i,odd=46i,even=47i,stringu1="JFAAAA",stringu2="RCAAAA",string4="HHHHxx" 6048000000000000 +tenk unique1=6133i,unique2=70i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=133i,twothousand=133i,fivethous=1133i,tenthous=6133i,odd=66i,even=67i,stringu1="XBAAAA",stringu2="SCAAAA",string4="OOOOxx" 6134400000000000 +tenk unique1=9112i,unique2=71i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=112i,twothousand=1112i,fivethous=4112i,tenthous=9112i,odd=24i,even=25i,stringu1="MMAAAA",stringu2="TCAAAA",string4="VVVVxx" 6220800000000000 +tenk unique1=7575i,unique2=72i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=575i,twothousand=1575i,fivethous=2575i,tenthous=7575i,odd=150i,even=151i,stringu1="JFAAAA",stringu2="UCAAAA",string4="AAAAxx" 6307200000000000 +tenk unique1=7414i,unique2=73i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=414i,twothousand=1414i,fivethous=2414i,tenthous=7414i,odd=28i,even=29i,stringu1="EZAAAA",stringu2="VCAAAA",string4="HHHHxx" 6393600000000000 +tenk unique1=9741i,unique2=74i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=741i,twothousand=1741i,fivethous=4741i,tenthous=9741i,odd=82i,even=83i,stringu1="RKAAAA",stringu2="WCAAAA",string4="OOOOxx" 6480000000000000 +tenk unique1=3767i,unique2=75i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=767i,twothousand=1767i,fivethous=3767i,tenthous=3767i,odd=134i,even=135i,stringu1="XOAAAA",stringu2="XCAAAA",string4="VVVVxx" 6566400000000000 +tenk unique1=9372i,unique2=76i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=372i,twothousand=1372i,fivethous=4372i,tenthous=9372i,odd=144i,even=145i,stringu1="MWAAAA",stringu2="YCAAAA",string4="AAAAxx" 6652800000000000 +tenk unique1=8976i,unique2=77i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=976i,twothousand=976i,fivethous=3976i,tenthous=8976i,odd=152i,even=153i,stringu1="GHAAAA",stringu2="ZCAAAA",string4="HHHHxx" 6739200000000000 +tenk unique1=4071i,unique2=78i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=71i,twothousand=71i,fivethous=4071i,tenthous=4071i,odd=142i,even=143i,stringu1="PAAAAA",stringu2="ADAAAA",string4="OOOOxx" 6825600000000000 +tenk unique1=1311i,unique2=79i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=311i,twothousand=1311i,fivethous=1311i,tenthous=1311i,odd=22i,even=23i,stringu1="LYAAAA",stringu2="BDAAAA",string4="VVVVxx" 6912000000000000 +tenk unique1=2604i,unique2=80i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=604i,twothousand=604i,fivethous=2604i,tenthous=2604i,odd=8i,even=9i,stringu1="EWAAAA",stringu2="CDAAAA",string4="AAAAxx" 6998400000000000 +tenk unique1=8840i,unique2=81i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=840i,twothousand=840i,fivethous=3840i,tenthous=8840i,odd=80i,even=81i,stringu1="ACAAAA",stringu2="DDAAAA",string4="HHHHxx" 7084800000000000 +tenk unique1=567i,unique2=82i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=567i,twothousand=567i,fivethous=567i,tenthous=567i,odd=134i,even=135i,stringu1="VVAAAA",stringu2="EDAAAA",string4="OOOOxx" 7171200000000000 +tenk unique1=5215i,unique2=83i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=215i,twothousand=1215i,fivethous=215i,tenthous=5215i,odd=30i,even=31i,stringu1="PSAAAA",stringu2="FDAAAA",string4="VVVVxx" 7257600000000000 +tenk unique1=5474i,unique2=84i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=474i,twothousand=1474i,fivethous=474i,tenthous=5474i,odd=148i,even=149i,stringu1="OCAAAA",stringu2="GDAAAA",string4="AAAAxx" 7344000000000000 +tenk unique1=3906i,unique2=85i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=906i,twothousand=1906i,fivethous=3906i,tenthous=3906i,odd=12i,even=13i,stringu1="GUAAAA",stringu2="HDAAAA",string4="HHHHxx" 7430400000000000 +tenk unique1=1769i,unique2=86i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=769i,twothousand=1769i,fivethous=1769i,tenthous=1769i,odd=138i,even=139i,stringu1="BQAAAA",stringu2="IDAAAA",string4="OOOOxx" 7516800000000000 +tenk unique1=1454i,unique2=87i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=454i,twothousand=1454i,fivethous=1454i,tenthous=1454i,odd=108i,even=109i,stringu1="YDAAAA",stringu2="JDAAAA",string4="VVVVxx" 7603200000000000 +tenk unique1=6877i,unique2=88i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=877i,twothousand=877i,fivethous=1877i,tenthous=6877i,odd=154i,even=155i,stringu1="NEAAAA",stringu2="KDAAAA",string4="AAAAxx" 7689600000000000 +tenk unique1=6501i,unique2=89i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=501i,twothousand=501i,fivethous=1501i,tenthous=6501i,odd=2i,even=3i,stringu1="BQAAAA",stringu2="LDAAAA",string4="HHHHxx" 7776000000000000 +tenk unique1=934i,unique2=90i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=934i,twothousand=934i,fivethous=934i,tenthous=934i,odd=68i,even=69i,stringu1="YJAAAA",stringu2="MDAAAA",string4="OOOOxx" 7862400000000000 +tenk unique1=4075i,unique2=91i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=75i,twothousand=75i,fivethous=4075i,tenthous=4075i,odd=150i,even=151i,stringu1="TAAAAA",stringu2="NDAAAA",string4="VVVVxx" 7948800000000000 +tenk unique1=3180i,unique2=92i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=180i,twothousand=1180i,fivethous=3180i,tenthous=3180i,odd=160i,even=161i,stringu1="ISAAAA",stringu2="ODAAAA",string4="AAAAxx" 8035200000000000 +tenk unique1=7787i,unique2=93i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=787i,twothousand=1787i,fivethous=2787i,tenthous=7787i,odd=174i,even=175i,stringu1="NNAAAA",stringu2="PDAAAA",string4="HHHHxx" 8121600000000000 +tenk unique1=6401i,unique2=94i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=401i,twothousand=401i,fivethous=1401i,tenthous=6401i,odd=2i,even=3i,stringu1="FMAAAA",stringu2="QDAAAA",string4="OOOOxx" 8208000000000000 +tenk unique1=4244i,unique2=95i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=244i,twothousand=244i,fivethous=4244i,tenthous=4244i,odd=88i,even=89i,stringu1="GHAAAA",stringu2="RDAAAA",string4="VVVVxx" 8294400000000000 +tenk unique1=4591i,unique2=96i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=591i,twothousand=591i,fivethous=4591i,tenthous=4591i,odd=182i,even=183i,stringu1="PUAAAA",stringu2="SDAAAA",string4="AAAAxx" 8380800000000000 +tenk unique1=4113i,unique2=97i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=113i,twothousand=113i,fivethous=4113i,tenthous=4113i,odd=26i,even=27i,stringu1="FCAAAA",stringu2="TDAAAA",string4="HHHHxx" 8467200000000000 +tenk unique1=5925i,unique2=98i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=925i,twothousand=1925i,fivethous=925i,tenthous=5925i,odd=50i,even=51i,stringu1="XTAAAA",stringu2="UDAAAA",string4="OOOOxx" 8553600000000000 +tenk unique1=1987i,unique2=99i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=987i,twothousand=1987i,fivethous=1987i,tenthous=1987i,odd=174i,even=175i,stringu1="LYAAAA",stringu2="VDAAAA",string4="VVVVxx" 8640000000000000 +tenk unique1=8248i,unique2=100i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=248i,twothousand=248i,fivethous=3248i,tenthous=8248i,odd=96i,even=97i,stringu1="GFAAAA",stringu2="WDAAAA",string4="AAAAxx" 8726400000000000 +tenk unique1=4151i,unique2=101i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=151i,twothousand=151i,fivethous=4151i,tenthous=4151i,odd=102i,even=103i,stringu1="RDAAAA",stringu2="XDAAAA",string4="HHHHxx" 8812800000000000 +tenk unique1=8670i,unique2=102i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=670i,twothousand=670i,fivethous=3670i,tenthous=8670i,odd=140i,even=141i,stringu1="MVAAAA",stringu2="YDAAAA",string4="OOOOxx" 8899200000000000 +tenk unique1=6194i,unique2=103i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=194i,twothousand=194i,fivethous=1194i,tenthous=6194i,odd=188i,even=189i,stringu1="GEAAAA",stringu2="ZDAAAA",string4="VVVVxx" 8985600000000000 +tenk unique1=88i,unique2=104i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=88i,twothousand=88i,fivethous=88i,tenthous=88i,odd=176i,even=177i,stringu1="KDAAAA",stringu2="AEAAAA",string4="AAAAxx" 9072000000000000 +tenk unique1=4058i,unique2=105i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=58i,twothousand=58i,fivethous=4058i,tenthous=4058i,odd=116i,even=117i,stringu1="CAAAAA",stringu2="BEAAAA",string4="HHHHxx" 9158400000000000 +tenk unique1=2742i,unique2=106i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=742i,twothousand=742i,fivethous=2742i,tenthous=2742i,odd=84i,even=85i,stringu1="MBAAAA",stringu2="CEAAAA",string4="OOOOxx" 9244800000000000 +tenk unique1=8275i,unique2=107i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=275i,twothousand=275i,fivethous=3275i,tenthous=8275i,odd=150i,even=151i,stringu1="HGAAAA",stringu2="DEAAAA",string4="VVVVxx" 9331200000000000 +tenk unique1=4258i,unique2=108i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=258i,twothousand=258i,fivethous=4258i,tenthous=4258i,odd=116i,even=117i,stringu1="UHAAAA",stringu2="EEAAAA",string4="AAAAxx" 9417600000000000 +tenk unique1=6129i,unique2=109i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=129i,twothousand=129i,fivethous=1129i,tenthous=6129i,odd=58i,even=59i,stringu1="TBAAAA",stringu2="FEAAAA",string4="HHHHxx" 9504000000000000 +tenk unique1=7243i,unique2=110i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=243i,twothousand=1243i,fivethous=2243i,tenthous=7243i,odd=86i,even=87i,stringu1="PSAAAA",stringu2="GEAAAA",string4="OOOOxx" 9590400000000000 +tenk unique1=2392i,unique2=111i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=392i,twothousand=392i,fivethous=2392i,tenthous=2392i,odd=184i,even=185i,stringu1="AOAAAA",stringu2="HEAAAA",string4="VVVVxx" 9676800000000000 +tenk unique1=9853i,unique2=112i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=853i,twothousand=1853i,fivethous=4853i,tenthous=9853i,odd=106i,even=107i,stringu1="ZOAAAA",stringu2="IEAAAA",string4="AAAAxx" 9763200000000000 +tenk unique1=6064i,unique2=113i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=64i,twothousand=64i,fivethous=1064i,tenthous=6064i,odd=128i,even=129i,stringu1="GZAAAA",stringu2="JEAAAA",string4="HHHHxx" 9849600000000000 +tenk unique1=4391i,unique2=114i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=391i,twothousand=391i,fivethous=4391i,tenthous=4391i,odd=182i,even=183i,stringu1="XMAAAA",stringu2="KEAAAA",string4="OOOOxx" 9936000000000000 +tenk unique1=726i,unique2=115i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=726i,twothousand=726i,fivethous=726i,tenthous=726i,odd=52i,even=53i,stringu1="YBAAAA",stringu2="LEAAAA",string4="VVVVxx" 10022400000000000 +tenk unique1=6957i,unique2=116i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=957i,twothousand=957i,fivethous=1957i,tenthous=6957i,odd=114i,even=115i,stringu1="PHAAAA",stringu2="MEAAAA",string4="AAAAxx" 10108800000000000 +tenk unique1=3853i,unique2=117i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=853i,twothousand=1853i,fivethous=3853i,tenthous=3853i,odd=106i,even=107i,stringu1="FSAAAA",stringu2="NEAAAA",string4="HHHHxx" 10195200000000000 +tenk unique1=4524i,unique2=118i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=524i,twothousand=524i,fivethous=4524i,tenthous=4524i,odd=48i,even=49i,stringu1="ASAAAA",stringu2="OEAAAA",string4="OOOOxx" 10281600000000000 +tenk unique1=5330i,unique2=119i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=330i,twothousand=1330i,fivethous=330i,tenthous=5330i,odd=60i,even=61i,stringu1="AXAAAA",stringu2="PEAAAA",string4="VVVVxx" 10368000000000000 +tenk unique1=6671i,unique2=120i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=671i,twothousand=671i,fivethous=1671i,tenthous=6671i,odd=142i,even=143i,stringu1="PWAAAA",stringu2="QEAAAA",string4="AAAAxx" 10454400000000000 +tenk unique1=5314i,unique2=121i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=314i,twothousand=1314i,fivethous=314i,tenthous=5314i,odd=28i,even=29i,stringu1="KWAAAA",stringu2="REAAAA",string4="HHHHxx" 10540800000000000 +tenk unique1=9202i,unique2=122i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=202i,twothousand=1202i,fivethous=4202i,tenthous=9202i,odd=4i,even=5i,stringu1="YPAAAA",stringu2="SEAAAA",string4="OOOOxx" 10627200000000000 +tenk unique1=4596i,unique2=123i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=596i,twothousand=596i,fivethous=4596i,tenthous=4596i,odd=192i,even=193i,stringu1="UUAAAA",stringu2="TEAAAA",string4="VVVVxx" 10713600000000000 +tenk unique1=8951i,unique2=124i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=951i,twothousand=951i,fivethous=3951i,tenthous=8951i,odd=102i,even=103i,stringu1="HGAAAA",stringu2="UEAAAA",string4="AAAAxx" 10800000000000000 +tenk unique1=9902i,unique2=125i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=902i,twothousand=1902i,fivethous=4902i,tenthous=9902i,odd=4i,even=5i,stringu1="WQAAAA",stringu2="VEAAAA",string4="HHHHxx" 10886400000000000 +tenk unique1=1440i,unique2=126i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=440i,twothousand=1440i,fivethous=1440i,tenthous=1440i,odd=80i,even=81i,stringu1="KDAAAA",stringu2="WEAAAA",string4="OOOOxx" 10972800000000000 +tenk unique1=5339i,unique2=127i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=339i,twothousand=1339i,fivethous=339i,tenthous=5339i,odd=78i,even=79i,stringu1="JXAAAA",stringu2="XEAAAA",string4="VVVVxx" 11059200000000000 +tenk unique1=3371i,unique2=128i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=371i,twothousand=1371i,fivethous=3371i,tenthous=3371i,odd=142i,even=143i,stringu1="RZAAAA",stringu2="YEAAAA",string4="AAAAxx" 11145600000000000 +tenk unique1=4467i,unique2=129i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=467i,twothousand=467i,fivethous=4467i,tenthous=4467i,odd=134i,even=135i,stringu1="VPAAAA",stringu2="ZEAAAA",string4="HHHHxx" 11232000000000000 +tenk unique1=6216i,unique2=130i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=216i,twothousand=216i,fivethous=1216i,tenthous=6216i,odd=32i,even=33i,stringu1="CFAAAA",stringu2="AFAAAA",string4="OOOOxx" 11318400000000000 +tenk unique1=5364i,unique2=131i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=364i,twothousand=1364i,fivethous=364i,tenthous=5364i,odd=128i,even=129i,stringu1="IYAAAA",stringu2="BFAAAA",string4="VVVVxx" 11404800000000000 +tenk unique1=7547i,unique2=132i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=547i,twothousand=1547i,fivethous=2547i,tenthous=7547i,odd=94i,even=95i,stringu1="HEAAAA",stringu2="CFAAAA",string4="AAAAxx" 11491200000000000 +tenk unique1=4338i,unique2=133i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=338i,twothousand=338i,fivethous=4338i,tenthous=4338i,odd=76i,even=77i,stringu1="WKAAAA",stringu2="DFAAAA",string4="HHHHxx" 11577600000000000 +tenk unique1=3481i,unique2=134i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=481i,twothousand=1481i,fivethous=3481i,tenthous=3481i,odd=162i,even=163i,stringu1="XDAAAA",stringu2="EFAAAA",string4="OOOOxx" 11664000000000000 +tenk unique1=826i,unique2=135i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=826i,twothousand=826i,fivethous=826i,tenthous=826i,odd=52i,even=53i,stringu1="UFAAAA",stringu2="FFAAAA",string4="VVVVxx" 11750400000000000 +tenk unique1=3647i,unique2=136i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=647i,twothousand=1647i,fivethous=3647i,tenthous=3647i,odd=94i,even=95i,stringu1="HKAAAA",stringu2="GFAAAA",string4="AAAAxx" 11836800000000000 +tenk unique1=3337i,unique2=137i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=337i,twothousand=1337i,fivethous=3337i,tenthous=3337i,odd=74i,even=75i,stringu1="JYAAAA",stringu2="HFAAAA",string4="HHHHxx" 11923200000000000 +tenk unique1=3591i,unique2=138i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=591i,twothousand=1591i,fivethous=3591i,tenthous=3591i,odd=182i,even=183i,stringu1="DIAAAA",stringu2="IFAAAA",string4="OOOOxx" 12009600000000000 +tenk unique1=7192i,unique2=139i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=192i,twothousand=1192i,fivethous=2192i,tenthous=7192i,odd=184i,even=185i,stringu1="QQAAAA",stringu2="JFAAAA",string4="VVVVxx" 12096000000000000 +tenk unique1=1078i,unique2=140i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=78i,twothousand=1078i,fivethous=1078i,tenthous=1078i,odd=156i,even=157i,stringu1="MPAAAA",stringu2="KFAAAA",string4="AAAAxx" 12182400000000000 +tenk unique1=1310i,unique2=141i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=310i,twothousand=1310i,fivethous=1310i,tenthous=1310i,odd=20i,even=21i,stringu1="KYAAAA",stringu2="LFAAAA",string4="HHHHxx" 12268800000000000 +tenk unique1=9642i,unique2=142i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=642i,twothousand=1642i,fivethous=4642i,tenthous=9642i,odd=84i,even=85i,stringu1="WGAAAA",stringu2="MFAAAA",string4="OOOOxx" 12355200000000000 +tenk unique1=39i,unique2=143i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=39i,twothousand=39i,fivethous=39i,tenthous=39i,odd=78i,even=79i,stringu1="NBAAAA",stringu2="NFAAAA",string4="VVVVxx" 12441600000000000 +tenk unique1=8682i,unique2=144i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=682i,twothousand=682i,fivethous=3682i,tenthous=8682i,odd=164i,even=165i,stringu1="YVAAAA",stringu2="OFAAAA",string4="AAAAxx" 12528000000000000 +tenk unique1=1794i,unique2=145i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=794i,twothousand=1794i,fivethous=1794i,tenthous=1794i,odd=188i,even=189i,stringu1="ARAAAA",stringu2="PFAAAA",string4="HHHHxx" 12614400000000000 +tenk unique1=5630i,unique2=146i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=630i,twothousand=1630i,fivethous=630i,tenthous=5630i,odd=60i,even=61i,stringu1="OIAAAA",stringu2="QFAAAA",string4="OOOOxx" 12700800000000000 +tenk unique1=6748i,unique2=147i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=748i,twothousand=748i,fivethous=1748i,tenthous=6748i,odd=96i,even=97i,stringu1="OZAAAA",stringu2="RFAAAA",string4="VVVVxx" 12787200000000000 +tenk unique1=3766i,unique2=148i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=766i,twothousand=1766i,fivethous=3766i,tenthous=3766i,odd=132i,even=133i,stringu1="WOAAAA",stringu2="SFAAAA",string4="AAAAxx" 12873600000000000 +tenk unique1=6403i,unique2=149i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=403i,twothousand=403i,fivethous=1403i,tenthous=6403i,odd=6i,even=7i,stringu1="HMAAAA",stringu2="TFAAAA",string4="HHHHxx" 12960000000000000 +tenk unique1=175i,unique2=150i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=175i,twothousand=175i,fivethous=175i,tenthous=175i,odd=150i,even=151i,stringu1="TGAAAA",stringu2="UFAAAA",string4="OOOOxx" 13046400000000000 +tenk unique1=2179i,unique2=151i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=179i,twothousand=179i,fivethous=2179i,tenthous=2179i,odd=158i,even=159i,stringu1="VFAAAA",stringu2="VFAAAA",string4="VVVVxx" 13132800000000000 +tenk unique1=7897i,unique2=152i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=897i,twothousand=1897i,fivethous=2897i,tenthous=7897i,odd=194i,even=195i,stringu1="TRAAAA",stringu2="WFAAAA",string4="AAAAxx" 13219200000000000 +tenk unique1=2760i,unique2=153i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=760i,twothousand=760i,fivethous=2760i,tenthous=2760i,odd=120i,even=121i,stringu1="ECAAAA",stringu2="XFAAAA",string4="HHHHxx" 13305600000000000 +tenk unique1=1675i,unique2=154i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=675i,twothousand=1675i,fivethous=1675i,tenthous=1675i,odd=150i,even=151i,stringu1="LMAAAA",stringu2="YFAAAA",string4="OOOOxx" 13392000000000000 +tenk unique1=2564i,unique2=155i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=564i,twothousand=564i,fivethous=2564i,tenthous=2564i,odd=128i,even=129i,stringu1="QUAAAA",stringu2="ZFAAAA",string4="VVVVxx" 13478400000000000 +tenk unique1=157i,unique2=156i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=157i,twothousand=157i,fivethous=157i,tenthous=157i,odd=114i,even=115i,stringu1="BGAAAA",stringu2="AGAAAA",string4="AAAAxx" 13564800000000000 +tenk unique1=8779i,unique2=157i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=779i,twothousand=779i,fivethous=3779i,tenthous=8779i,odd=158i,even=159i,stringu1="RZAAAA",stringu2="BGAAAA",string4="HHHHxx" 13651200000000000 +tenk unique1=9591i,unique2=158i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=591i,twothousand=1591i,fivethous=4591i,tenthous=9591i,odd=182i,even=183i,stringu1="XEAAAA",stringu2="CGAAAA",string4="OOOOxx" 13737600000000000 +tenk unique1=8732i,unique2=159i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=732i,twothousand=732i,fivethous=3732i,tenthous=8732i,odd=64i,even=65i,stringu1="WXAAAA",stringu2="DGAAAA",string4="VVVVxx" 13824000000000000 +tenk unique1=139i,unique2=160i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=139i,twothousand=139i,fivethous=139i,tenthous=139i,odd=78i,even=79i,stringu1="JFAAAA",stringu2="EGAAAA",string4="AAAAxx" 13910400000000000 +tenk unique1=5372i,unique2=161i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=372i,twothousand=1372i,fivethous=372i,tenthous=5372i,odd=144i,even=145i,stringu1="QYAAAA",stringu2="FGAAAA",string4="HHHHxx" 13996800000000000 +tenk unique1=1278i,unique2=162i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=278i,twothousand=1278i,fivethous=1278i,tenthous=1278i,odd=156i,even=157i,stringu1="EXAAAA",stringu2="GGAAAA",string4="OOOOxx" 14083200000000000 +tenk unique1=4697i,unique2=163i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=697i,twothousand=697i,fivethous=4697i,tenthous=4697i,odd=194i,even=195i,stringu1="RYAAAA",stringu2="HGAAAA",string4="VVVVxx" 14169600000000000 +tenk unique1=8610i,unique2=164i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=610i,twothousand=610i,fivethous=3610i,tenthous=8610i,odd=20i,even=21i,stringu1="ETAAAA",stringu2="IGAAAA",string4="AAAAxx" 14256000000000000 +tenk unique1=8180i,unique2=165i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=180i,twothousand=180i,fivethous=3180i,tenthous=8180i,odd=160i,even=161i,stringu1="QCAAAA",stringu2="JGAAAA",string4="HHHHxx" 14342400000000000 +tenk unique1=2399i,unique2=166i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=399i,twothousand=399i,fivethous=2399i,tenthous=2399i,odd=198i,even=199i,stringu1="HOAAAA",stringu2="KGAAAA",string4="OOOOxx" 14428800000000000 +tenk unique1=615i,unique2=167i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=615i,twothousand=615i,fivethous=615i,tenthous=615i,odd=30i,even=31i,stringu1="RXAAAA",stringu2="LGAAAA",string4="VVVVxx" 14515200000000000 +tenk unique1=7629i,unique2=168i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=629i,twothousand=1629i,fivethous=2629i,tenthous=7629i,odd=58i,even=59i,stringu1="LHAAAA",stringu2="MGAAAA",string4="AAAAxx" 14601600000000000 +tenk unique1=7628i,unique2=169i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=628i,twothousand=1628i,fivethous=2628i,tenthous=7628i,odd=56i,even=57i,stringu1="KHAAAA",stringu2="NGAAAA",string4="HHHHxx" 14688000000000000 +tenk unique1=4659i,unique2=170i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=659i,twothousand=659i,fivethous=4659i,tenthous=4659i,odd=118i,even=119i,stringu1="FXAAAA",stringu2="OGAAAA",string4="OOOOxx" 14774400000000000 +tenk unique1=5865i,unique2=171i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=865i,twothousand=1865i,fivethous=865i,tenthous=5865i,odd=130i,even=131i,stringu1="PRAAAA",stringu2="PGAAAA",string4="VVVVxx" 14860800000000000 +tenk unique1=3973i,unique2=172i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=973i,twothousand=1973i,fivethous=3973i,tenthous=3973i,odd=146i,even=147i,stringu1="VWAAAA",stringu2="QGAAAA",string4="AAAAxx" 14947200000000000 +tenk unique1=552i,unique2=173i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=552i,twothousand=552i,fivethous=552i,tenthous=552i,odd=104i,even=105i,stringu1="GVAAAA",stringu2="RGAAAA",string4="HHHHxx" 15033600000000000 +tenk unique1=708i,unique2=174i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=708i,twothousand=708i,fivethous=708i,tenthous=708i,odd=16i,even=17i,stringu1="GBAAAA",stringu2="SGAAAA",string4="OOOOxx" 15120000000000000 +tenk unique1=3550i,unique2=175i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=550i,twothousand=1550i,fivethous=3550i,tenthous=3550i,odd=100i,even=101i,stringu1="OGAAAA",stringu2="TGAAAA",string4="VVVVxx" 15206400000000000 +tenk unique1=5547i,unique2=176i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=547i,twothousand=1547i,fivethous=547i,tenthous=5547i,odd=94i,even=95i,stringu1="JFAAAA",stringu2="UGAAAA",string4="AAAAxx" 15292800000000000 +tenk unique1=489i,unique2=177i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=489i,twothousand=489i,fivethous=489i,tenthous=489i,odd=178i,even=179i,stringu1="VSAAAA",stringu2="VGAAAA",string4="HHHHxx" 15379200000000000 +tenk unique1=3794i,unique2=178i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=794i,twothousand=1794i,fivethous=3794i,tenthous=3794i,odd=188i,even=189i,stringu1="YPAAAA",stringu2="WGAAAA",string4="OOOOxx" 15465600000000000 +tenk unique1=9479i,unique2=179i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=479i,twothousand=1479i,fivethous=4479i,tenthous=9479i,odd=158i,even=159i,stringu1="PAAAAA",stringu2="XGAAAA",string4="VVVVxx" 15552000000000000 +tenk unique1=6435i,unique2=180i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=435i,twothousand=435i,fivethous=1435i,tenthous=6435i,odd=70i,even=71i,stringu1="NNAAAA",stringu2="YGAAAA",string4="AAAAxx" 15638400000000000 +tenk unique1=5120i,unique2=181i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=120i,twothousand=1120i,fivethous=120i,tenthous=5120i,odd=40i,even=41i,stringu1="YOAAAA",stringu2="ZGAAAA",string4="HHHHxx" 15724800000000000 +tenk unique1=3615i,unique2=182i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=615i,twothousand=1615i,fivethous=3615i,tenthous=3615i,odd=30i,even=31i,stringu1="BJAAAA",stringu2="AHAAAA",string4="OOOOxx" 15811200000000000 +tenk unique1=8399i,unique2=183i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=399i,twothousand=399i,fivethous=3399i,tenthous=8399i,odd=198i,even=199i,stringu1="BLAAAA",stringu2="BHAAAA",string4="VVVVxx" 15897600000000000 +tenk unique1=2155i,unique2=184i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=155i,twothousand=155i,fivethous=2155i,tenthous=2155i,odd=110i,even=111i,stringu1="XEAAAA",stringu2="CHAAAA",string4="AAAAxx" 15984000000000000 +tenk unique1=6690i,unique2=185i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=690i,twothousand=690i,fivethous=1690i,tenthous=6690i,odd=180i,even=181i,stringu1="IXAAAA",stringu2="DHAAAA",string4="HHHHxx" 16070400000000000 +tenk unique1=1683i,unique2=186i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=683i,twothousand=1683i,fivethous=1683i,tenthous=1683i,odd=166i,even=167i,stringu1="TMAAAA",stringu2="EHAAAA",string4="OOOOxx" 16156800000000000 +tenk unique1=6302i,unique2=187i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=302i,twothousand=302i,fivethous=1302i,tenthous=6302i,odd=4i,even=5i,stringu1="KIAAAA",stringu2="FHAAAA",string4="VVVVxx" 16243200000000000 +tenk unique1=516i,unique2=188i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=516i,twothousand=516i,fivethous=516i,tenthous=516i,odd=32i,even=33i,stringu1="WTAAAA",stringu2="GHAAAA",string4="AAAAxx" 16329600000000000 +tenk unique1=3901i,unique2=189i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=901i,twothousand=1901i,fivethous=3901i,tenthous=3901i,odd=2i,even=3i,stringu1="BUAAAA",stringu2="HHAAAA",string4="HHHHxx" 16416000000000000 +tenk unique1=6938i,unique2=190i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=938i,twothousand=938i,fivethous=1938i,tenthous=6938i,odd=76i,even=77i,stringu1="WGAAAA",stringu2="IHAAAA",string4="OOOOxx" 16502400000000000 +tenk unique1=7484i,unique2=191i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=484i,twothousand=1484i,fivethous=2484i,tenthous=7484i,odd=168i,even=169i,stringu1="WBAAAA",stringu2="JHAAAA",string4="VVVVxx" 16588800000000000 +tenk unique1=7424i,unique2=192i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=424i,twothousand=1424i,fivethous=2424i,tenthous=7424i,odd=48i,even=49i,stringu1="OZAAAA",stringu2="KHAAAA",string4="AAAAxx" 16675200000000000 +tenk unique1=9410i,unique2=193i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=410i,twothousand=1410i,fivethous=4410i,tenthous=9410i,odd=20i,even=21i,stringu1="YXAAAA",stringu2="LHAAAA",string4="HHHHxx" 16761600000000000 +tenk unique1=1714i,unique2=194i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=714i,twothousand=1714i,fivethous=1714i,tenthous=1714i,odd=28i,even=29i,stringu1="YNAAAA",stringu2="MHAAAA",string4="OOOOxx" 16848000000000000 +tenk unique1=8278i,unique2=195i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=278i,twothousand=278i,fivethous=3278i,tenthous=8278i,odd=156i,even=157i,stringu1="KGAAAA",stringu2="NHAAAA",string4="VVVVxx" 16934400000000000 +tenk unique1=3158i,unique2=196i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=158i,twothousand=1158i,fivethous=3158i,tenthous=3158i,odd=116i,even=117i,stringu1="MRAAAA",stringu2="OHAAAA",string4="AAAAxx" 17020800000000000 +tenk unique1=2511i,unique2=197i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=511i,twothousand=511i,fivethous=2511i,tenthous=2511i,odd=22i,even=23i,stringu1="PSAAAA",stringu2="PHAAAA",string4="HHHHxx" 17107200000000000 +tenk unique1=2912i,unique2=198i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=912i,twothousand=912i,fivethous=2912i,tenthous=2912i,odd=24i,even=25i,stringu1="AIAAAA",stringu2="QHAAAA",string4="OOOOxx" 17193600000000000 +tenk unique1=2648i,unique2=199i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=648i,twothousand=648i,fivethous=2648i,tenthous=2648i,odd=96i,even=97i,stringu1="WXAAAA",stringu2="RHAAAA",string4="VVVVxx" 17280000000000000 +tenk unique1=9385i,unique2=200i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=385i,twothousand=1385i,fivethous=4385i,tenthous=9385i,odd=170i,even=171i,stringu1="ZWAAAA",stringu2="SHAAAA",string4="AAAAxx" 17366400000000000 +tenk unique1=7545i,unique2=201i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=545i,twothousand=1545i,fivethous=2545i,tenthous=7545i,odd=90i,even=91i,stringu1="FEAAAA",stringu2="THAAAA",string4="HHHHxx" 17452800000000000 +tenk unique1=8407i,unique2=202i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=407i,twothousand=407i,fivethous=3407i,tenthous=8407i,odd=14i,even=15i,stringu1="JLAAAA",stringu2="UHAAAA",string4="OOOOxx" 17539200000000000 +tenk unique1=5893i,unique2=203i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=893i,twothousand=1893i,fivethous=893i,tenthous=5893i,odd=186i,even=187i,stringu1="RSAAAA",stringu2="VHAAAA",string4="VVVVxx" 17625600000000000 +tenk unique1=7049i,unique2=204i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=49i,twothousand=1049i,fivethous=2049i,tenthous=7049i,odd=98i,even=99i,stringu1="DLAAAA",stringu2="WHAAAA",string4="AAAAxx" 17712000000000000 +tenk unique1=6812i,unique2=205i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=812i,twothousand=812i,fivethous=1812i,tenthous=6812i,odd=24i,even=25i,stringu1="ACAAAA",stringu2="XHAAAA",string4="HHHHxx" 17798400000000000 +tenk unique1=3649i,unique2=206i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=649i,twothousand=1649i,fivethous=3649i,tenthous=3649i,odd=98i,even=99i,stringu1="JKAAAA",stringu2="YHAAAA",string4="OOOOxx" 17884800000000000 +tenk unique1=9275i,unique2=207i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=275i,twothousand=1275i,fivethous=4275i,tenthous=9275i,odd=150i,even=151i,stringu1="TSAAAA",stringu2="ZHAAAA",string4="VVVVxx" 17971200000000000 +tenk unique1=1179i,unique2=208i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=179i,twothousand=1179i,fivethous=1179i,tenthous=1179i,odd=158i,even=159i,stringu1="JTAAAA",stringu2="AIAAAA",string4="AAAAxx" 18057600000000000 +tenk unique1=969i,unique2=209i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=969i,twothousand=969i,fivethous=969i,tenthous=969i,odd=138i,even=139i,stringu1="HLAAAA",stringu2="BIAAAA",string4="HHHHxx" 18144000000000000 +tenk unique1=7920i,unique2=210i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=920i,twothousand=1920i,fivethous=2920i,tenthous=7920i,odd=40i,even=41i,stringu1="QSAAAA",stringu2="CIAAAA",string4="OOOOxx" 18230400000000000 +tenk unique1=998i,unique2=211i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=998i,twothousand=998i,fivethous=998i,tenthous=998i,odd=196i,even=197i,stringu1="KMAAAA",stringu2="DIAAAA",string4="VVVVxx" 18316800000000000 +tenk unique1=3958i,unique2=212i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=958i,twothousand=1958i,fivethous=3958i,tenthous=3958i,odd=116i,even=117i,stringu1="GWAAAA",stringu2="EIAAAA",string4="AAAAxx" 18403200000000000 +tenk unique1=6052i,unique2=213i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=52i,twothousand=52i,fivethous=1052i,tenthous=6052i,odd=104i,even=105i,stringu1="UYAAAA",stringu2="FIAAAA",string4="HHHHxx" 18489600000000000 +tenk unique1=8791i,unique2=214i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=791i,twothousand=791i,fivethous=3791i,tenthous=8791i,odd=182i,even=183i,stringu1="DAAAAA",stringu2="GIAAAA",string4="OOOOxx" 18576000000000000 +tenk unique1=5191i,unique2=215i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=191i,twothousand=1191i,fivethous=191i,tenthous=5191i,odd=182i,even=183i,stringu1="RRAAAA",stringu2="HIAAAA",string4="VVVVxx" 18662400000000000 +tenk unique1=4267i,unique2=216i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=267i,twothousand=267i,fivethous=4267i,tenthous=4267i,odd=134i,even=135i,stringu1="DIAAAA",stringu2="IIAAAA",string4="AAAAxx" 18748800000000000 +tenk unique1=2829i,unique2=217i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=829i,twothousand=829i,fivethous=2829i,tenthous=2829i,odd=58i,even=59i,stringu1="VEAAAA",stringu2="JIAAAA",string4="HHHHxx" 18835200000000000 +tenk unique1=6396i,unique2=218i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=396i,twothousand=396i,fivethous=1396i,tenthous=6396i,odd=192i,even=193i,stringu1="AMAAAA",stringu2="KIAAAA",string4="OOOOxx" 18921600000000000 +tenk unique1=9413i,unique2=219i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=413i,twothousand=1413i,fivethous=4413i,tenthous=9413i,odd=26i,even=27i,stringu1="BYAAAA",stringu2="LIAAAA",string4="VVVVxx" 19008000000000000 +tenk unique1=614i,unique2=220i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=614i,twothousand=614i,fivethous=614i,tenthous=614i,odd=28i,even=29i,stringu1="QXAAAA",stringu2="MIAAAA",string4="AAAAxx" 19094400000000000 +tenk unique1=4660i,unique2=221i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=660i,twothousand=660i,fivethous=4660i,tenthous=4660i,odd=120i,even=121i,stringu1="GXAAAA",stringu2="NIAAAA",string4="HHHHxx" 19180800000000000 +tenk unique1=8834i,unique2=222i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=834i,twothousand=834i,fivethous=3834i,tenthous=8834i,odd=68i,even=69i,stringu1="UBAAAA",stringu2="OIAAAA",string4="OOOOxx" 19267200000000000 +tenk unique1=2767i,unique2=223i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=767i,twothousand=767i,fivethous=2767i,tenthous=2767i,odd=134i,even=135i,stringu1="LCAAAA",stringu2="PIAAAA",string4="VVVVxx" 19353600000000000 +tenk unique1=2444i,unique2=224i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=444i,twothousand=444i,fivethous=2444i,tenthous=2444i,odd=88i,even=89i,stringu1="AQAAAA",stringu2="QIAAAA",string4="AAAAxx" 19440000000000000 +tenk unique1=4129i,unique2=225i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=129i,twothousand=129i,fivethous=4129i,tenthous=4129i,odd=58i,even=59i,stringu1="VCAAAA",stringu2="RIAAAA",string4="HHHHxx" 19526400000000000 +tenk unique1=3394i,unique2=226i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=394i,twothousand=1394i,fivethous=3394i,tenthous=3394i,odd=188i,even=189i,stringu1="OAAAAA",stringu2="SIAAAA",string4="OOOOxx" 19612800000000000 +tenk unique1=2705i,unique2=227i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=705i,twothousand=705i,fivethous=2705i,tenthous=2705i,odd=10i,even=11i,stringu1="BAAAAA",stringu2="TIAAAA",string4="VVVVxx" 19699200000000000 +tenk unique1=8499i,unique2=228i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=499i,twothousand=499i,fivethous=3499i,tenthous=8499i,odd=198i,even=199i,stringu1="XOAAAA",stringu2="UIAAAA",string4="AAAAxx" 19785600000000000 +tenk unique1=8852i,unique2=229i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=852i,twothousand=852i,fivethous=3852i,tenthous=8852i,odd=104i,even=105i,stringu1="MCAAAA",stringu2="VIAAAA",string4="HHHHxx" 19872000000000000 +tenk unique1=6174i,unique2=230i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=174i,twothousand=174i,fivethous=1174i,tenthous=6174i,odd=148i,even=149i,stringu1="MDAAAA",stringu2="WIAAAA",string4="OOOOxx" 19958400000000000 +tenk unique1=750i,unique2=231i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=750i,twothousand=750i,fivethous=750i,tenthous=750i,odd=100i,even=101i,stringu1="WCAAAA",stringu2="XIAAAA",string4="VVVVxx" 20044800000000000 +tenk unique1=8164i,unique2=232i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=164i,twothousand=164i,fivethous=3164i,tenthous=8164i,odd=128i,even=129i,stringu1="ACAAAA",stringu2="YIAAAA",string4="AAAAxx" 20131200000000000 +tenk unique1=4930i,unique2=233i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=930i,twothousand=930i,fivethous=4930i,tenthous=4930i,odd=60i,even=61i,stringu1="QHAAAA",stringu2="ZIAAAA",string4="HHHHxx" 20217600000000000 +tenk unique1=9904i,unique2=234i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=904i,twothousand=1904i,fivethous=4904i,tenthous=9904i,odd=8i,even=9i,stringu1="YQAAAA",stringu2="AJAAAA",string4="OOOOxx" 20304000000000000 +tenk unique1=7378i,unique2=235i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=378i,twothousand=1378i,fivethous=2378i,tenthous=7378i,odd=156i,even=157i,stringu1="UXAAAA",stringu2="BJAAAA",string4="VVVVxx" 20390400000000000 +tenk unique1=2927i,unique2=236i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=927i,twothousand=927i,fivethous=2927i,tenthous=2927i,odd=54i,even=55i,stringu1="PIAAAA",stringu2="CJAAAA",string4="AAAAxx" 20476800000000000 +tenk unique1=7155i,unique2=237i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=155i,twothousand=1155i,fivethous=2155i,tenthous=7155i,odd=110i,even=111i,stringu1="FPAAAA",stringu2="DJAAAA",string4="HHHHxx" 20563200000000000 +tenk unique1=1302i,unique2=238i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=302i,twothousand=1302i,fivethous=1302i,tenthous=1302i,odd=4i,even=5i,stringu1="CYAAAA",stringu2="EJAAAA",string4="OOOOxx" 20649600000000000 +tenk unique1=5904i,unique2=239i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=904i,twothousand=1904i,fivethous=904i,tenthous=5904i,odd=8i,even=9i,stringu1="CTAAAA",stringu2="FJAAAA",string4="VVVVxx" 20736000000000000 +tenk unique1=9687i,unique2=240i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=687i,twothousand=1687i,fivethous=4687i,tenthous=9687i,odd=174i,even=175i,stringu1="PIAAAA",stringu2="GJAAAA",string4="AAAAxx" 20822400000000000 +tenk unique1=3553i,unique2=241i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=553i,twothousand=1553i,fivethous=3553i,tenthous=3553i,odd=106i,even=107i,stringu1="RGAAAA",stringu2="HJAAAA",string4="HHHHxx" 20908800000000000 +tenk unique1=4447i,unique2=242i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=447i,twothousand=447i,fivethous=4447i,tenthous=4447i,odd=94i,even=95i,stringu1="BPAAAA",stringu2="IJAAAA",string4="OOOOxx" 20995200000000000 +tenk unique1=6878i,unique2=243i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=878i,twothousand=878i,fivethous=1878i,tenthous=6878i,odd=156i,even=157i,stringu1="OEAAAA",stringu2="JJAAAA",string4="VVVVxx" 21081600000000000 +tenk unique1=9470i,unique2=244i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=470i,twothousand=1470i,fivethous=4470i,tenthous=9470i,odd=140i,even=141i,stringu1="GAAAAA",stringu2="KJAAAA",string4="AAAAxx" 21168000000000000 +tenk unique1=9735i,unique2=245i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=735i,twothousand=1735i,fivethous=4735i,tenthous=9735i,odd=70i,even=71i,stringu1="LKAAAA",stringu2="LJAAAA",string4="HHHHxx" 21254400000000000 +tenk unique1=5967i,unique2=246i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=967i,twothousand=1967i,fivethous=967i,tenthous=5967i,odd=134i,even=135i,stringu1="NVAAAA",stringu2="MJAAAA",string4="OOOOxx" 21340800000000000 +tenk unique1=6601i,unique2=247i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=601i,twothousand=601i,fivethous=1601i,tenthous=6601i,odd=2i,even=3i,stringu1="XTAAAA",stringu2="NJAAAA",string4="VVVVxx" 21427200000000000 +tenk unique1=7631i,unique2=248i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=631i,twothousand=1631i,fivethous=2631i,tenthous=7631i,odd=62i,even=63i,stringu1="NHAAAA",stringu2="OJAAAA",string4="AAAAxx" 21513600000000000 +tenk unique1=3559i,unique2=249i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=559i,twothousand=1559i,fivethous=3559i,tenthous=3559i,odd=118i,even=119i,stringu1="XGAAAA",stringu2="PJAAAA",string4="HHHHxx" 21600000000000000 +tenk unique1=2247i,unique2=250i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=247i,twothousand=247i,fivethous=2247i,tenthous=2247i,odd=94i,even=95i,stringu1="LIAAAA",stringu2="QJAAAA",string4="OOOOxx" 21686400000000000 +tenk unique1=9649i,unique2=251i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=649i,twothousand=1649i,fivethous=4649i,tenthous=9649i,odd=98i,even=99i,stringu1="DHAAAA",stringu2="RJAAAA",string4="VVVVxx" 21772800000000000 +tenk unique1=808i,unique2=252i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=808i,twothousand=808i,fivethous=808i,tenthous=808i,odd=16i,even=17i,stringu1="CFAAAA",stringu2="SJAAAA",string4="AAAAxx" 21859200000000000 +tenk unique1=240i,unique2=253i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=240i,twothousand=240i,fivethous=240i,tenthous=240i,odd=80i,even=81i,stringu1="GJAAAA",stringu2="TJAAAA",string4="HHHHxx" 21945600000000000 +tenk unique1=5031i,unique2=254i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=31i,twothousand=1031i,fivethous=31i,tenthous=5031i,odd=62i,even=63i,stringu1="NLAAAA",stringu2="UJAAAA",string4="OOOOxx" 22032000000000000 +tenk unique1=9563i,unique2=255i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=563i,twothousand=1563i,fivethous=4563i,tenthous=9563i,odd=126i,even=127i,stringu1="VDAAAA",stringu2="VJAAAA",string4="VVVVxx" 22118400000000000 +tenk unique1=5656i,unique2=256i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=656i,twothousand=1656i,fivethous=656i,tenthous=5656i,odd=112i,even=113i,stringu1="OJAAAA",stringu2="WJAAAA",string4="AAAAxx" 22204800000000000 +tenk unique1=3886i,unique2=257i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=886i,twothousand=1886i,fivethous=3886i,tenthous=3886i,odd=172i,even=173i,stringu1="MTAAAA",stringu2="XJAAAA",string4="HHHHxx" 22291200000000000 +tenk unique1=2431i,unique2=258i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=431i,twothousand=431i,fivethous=2431i,tenthous=2431i,odd=62i,even=63i,stringu1="NPAAAA",stringu2="YJAAAA",string4="OOOOxx" 22377600000000000 +tenk unique1=5560i,unique2=259i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=560i,twothousand=1560i,fivethous=560i,tenthous=5560i,odd=120i,even=121i,stringu1="WFAAAA",stringu2="ZJAAAA",string4="VVVVxx" 22464000000000000 +tenk unique1=9065i,unique2=260i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=65i,twothousand=1065i,fivethous=4065i,tenthous=9065i,odd=130i,even=131i,stringu1="RKAAAA",stringu2="AKAAAA",string4="AAAAxx" 22550400000000000 +tenk unique1=8130i,unique2=261i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=130i,twothousand=130i,fivethous=3130i,tenthous=8130i,odd=60i,even=61i,stringu1="SAAAAA",stringu2="BKAAAA",string4="HHHHxx" 22636800000000000 +tenk unique1=4054i,unique2=262i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=54i,twothousand=54i,fivethous=4054i,tenthous=4054i,odd=108i,even=109i,stringu1="YZAAAA",stringu2="CKAAAA",string4="OOOOxx" 22723200000000000 +tenk unique1=873i,unique2=263i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=873i,twothousand=873i,fivethous=873i,tenthous=873i,odd=146i,even=147i,stringu1="PHAAAA",stringu2="DKAAAA",string4="VVVVxx" 22809600000000000 +tenk unique1=3092i,unique2=264i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=92i,twothousand=1092i,fivethous=3092i,tenthous=3092i,odd=184i,even=185i,stringu1="YOAAAA",stringu2="EKAAAA",string4="AAAAxx" 22896000000000000 +tenk unique1=6697i,unique2=265i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=697i,twothousand=697i,fivethous=1697i,tenthous=6697i,odd=194i,even=195i,stringu1="PXAAAA",stringu2="FKAAAA",string4="HHHHxx" 22982400000000000 +tenk unique1=2452i,unique2=266i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=452i,twothousand=452i,fivethous=2452i,tenthous=2452i,odd=104i,even=105i,stringu1="IQAAAA",stringu2="GKAAAA",string4="OOOOxx" 23068800000000000 +tenk unique1=7867i,unique2=267i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=867i,twothousand=1867i,fivethous=2867i,tenthous=7867i,odd=134i,even=135i,stringu1="PQAAAA",stringu2="HKAAAA",string4="VVVVxx" 23155200000000000 +tenk unique1=3753i,unique2=268i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=753i,twothousand=1753i,fivethous=3753i,tenthous=3753i,odd=106i,even=107i,stringu1="JOAAAA",stringu2="IKAAAA",string4="AAAAxx" 23241600000000000 +tenk unique1=7834i,unique2=269i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=834i,twothousand=1834i,fivethous=2834i,tenthous=7834i,odd=68i,even=69i,stringu1="IPAAAA",stringu2="JKAAAA",string4="HHHHxx" 23328000000000000 +tenk unique1=5846i,unique2=270i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=846i,twothousand=1846i,fivethous=846i,tenthous=5846i,odd=92i,even=93i,stringu1="WQAAAA",stringu2="KKAAAA",string4="OOOOxx" 23414400000000000 +tenk unique1=7604i,unique2=271i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=604i,twothousand=1604i,fivethous=2604i,tenthous=7604i,odd=8i,even=9i,stringu1="MGAAAA",stringu2="LKAAAA",string4="VVVVxx" 23500800000000000 +tenk unique1=3452i,unique2=272i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=452i,twothousand=1452i,fivethous=3452i,tenthous=3452i,odd=104i,even=105i,stringu1="UCAAAA",stringu2="MKAAAA",string4="AAAAxx" 23587200000000000 +tenk unique1=4788i,unique2=273i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=788i,twothousand=788i,fivethous=4788i,tenthous=4788i,odd=176i,even=177i,stringu1="ECAAAA",stringu2="NKAAAA",string4="HHHHxx" 23673600000000000 +tenk unique1=8600i,unique2=274i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=600i,twothousand=600i,fivethous=3600i,tenthous=8600i,odd=0i,even=1i,stringu1="USAAAA",stringu2="OKAAAA",string4="OOOOxx" 23760000000000000 +tenk unique1=8511i,unique2=275i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=511i,twothousand=511i,fivethous=3511i,tenthous=8511i,odd=22i,even=23i,stringu1="JPAAAA",stringu2="PKAAAA",string4="VVVVxx" 23846400000000000 +tenk unique1=4452i,unique2=276i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=452i,twothousand=452i,fivethous=4452i,tenthous=4452i,odd=104i,even=105i,stringu1="GPAAAA",stringu2="QKAAAA",string4="AAAAxx" 23932800000000000 +tenk unique1=1709i,unique2=277i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=709i,twothousand=1709i,fivethous=1709i,tenthous=1709i,odd=18i,even=19i,stringu1="TNAAAA",stringu2="RKAAAA",string4="HHHHxx" 24019200000000000 +tenk unique1=3440i,unique2=278i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=440i,twothousand=1440i,fivethous=3440i,tenthous=3440i,odd=80i,even=81i,stringu1="ICAAAA",stringu2="SKAAAA",string4="OOOOxx" 24105600000000000 +tenk unique1=9188i,unique2=279i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=188i,twothousand=1188i,fivethous=4188i,tenthous=9188i,odd=176i,even=177i,stringu1="KPAAAA",stringu2="TKAAAA",string4="VVVVxx" 24192000000000000 +tenk unique1=3058i,unique2=280i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=58i,twothousand=1058i,fivethous=3058i,tenthous=3058i,odd=116i,even=117i,stringu1="QNAAAA",stringu2="UKAAAA",string4="AAAAxx" 24278400000000000 +tenk unique1=5821i,unique2=281i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=821i,twothousand=1821i,fivethous=821i,tenthous=5821i,odd=42i,even=43i,stringu1="XPAAAA",stringu2="VKAAAA",string4="HHHHxx" 24364800000000000 +tenk unique1=3428i,unique2=282i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=428i,twothousand=1428i,fivethous=3428i,tenthous=3428i,odd=56i,even=57i,stringu1="WBAAAA",stringu2="WKAAAA",string4="OOOOxx" 24451200000000000 +tenk unique1=3581i,unique2=283i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=581i,twothousand=1581i,fivethous=3581i,tenthous=3581i,odd=162i,even=163i,stringu1="THAAAA",stringu2="XKAAAA",string4="VVVVxx" 24537600000000000 +tenk unique1=7523i,unique2=284i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=523i,twothousand=1523i,fivethous=2523i,tenthous=7523i,odd=46i,even=47i,stringu1="JDAAAA",stringu2="YKAAAA",string4="AAAAxx" 24624000000000000 +tenk unique1=3131i,unique2=285i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=131i,twothousand=1131i,fivethous=3131i,tenthous=3131i,odd=62i,even=63i,stringu1="LQAAAA",stringu2="ZKAAAA",string4="HHHHxx" 24710400000000000 +tenk unique1=2404i,unique2=286i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=404i,twothousand=404i,fivethous=2404i,tenthous=2404i,odd=8i,even=9i,stringu1="MOAAAA",stringu2="ALAAAA",string4="OOOOxx" 24796800000000000 +tenk unique1=5453i,unique2=287i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=453i,twothousand=1453i,fivethous=453i,tenthous=5453i,odd=106i,even=107i,stringu1="TBAAAA",stringu2="BLAAAA",string4="VVVVxx" 24883200000000000 +tenk unique1=1599i,unique2=288i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=599i,twothousand=1599i,fivethous=1599i,tenthous=1599i,odd=198i,even=199i,stringu1="NJAAAA",stringu2="CLAAAA",string4="AAAAxx" 24969600000000000 +tenk unique1=7081i,unique2=289i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=81i,twothousand=1081i,fivethous=2081i,tenthous=7081i,odd=162i,even=163i,stringu1="JMAAAA",stringu2="DLAAAA",string4="HHHHxx" 25056000000000000 +tenk unique1=1750i,unique2=290i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=750i,twothousand=1750i,fivethous=1750i,tenthous=1750i,odd=100i,even=101i,stringu1="IPAAAA",stringu2="ELAAAA",string4="OOOOxx" 25142400000000000 +tenk unique1=5085i,unique2=291i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=85i,twothousand=1085i,fivethous=85i,tenthous=5085i,odd=170i,even=171i,stringu1="PNAAAA",stringu2="FLAAAA",string4="VVVVxx" 25228800000000000 +tenk unique1=9777i,unique2=292i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=777i,twothousand=1777i,fivethous=4777i,tenthous=9777i,odd=154i,even=155i,stringu1="BMAAAA",stringu2="GLAAAA",string4="AAAAxx" 25315200000000000 +tenk unique1=574i,unique2=293i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=574i,twothousand=574i,fivethous=574i,tenthous=574i,odd=148i,even=149i,stringu1="CWAAAA",stringu2="HLAAAA",string4="HHHHxx" 25401600000000000 +tenk unique1=5984i,unique2=294i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=984i,twothousand=1984i,fivethous=984i,tenthous=5984i,odd=168i,even=169i,stringu1="EWAAAA",stringu2="ILAAAA",string4="OOOOxx" 25488000000000000 +tenk unique1=7039i,unique2=295i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=39i,twothousand=1039i,fivethous=2039i,tenthous=7039i,odd=78i,even=79i,stringu1="TKAAAA",stringu2="JLAAAA",string4="VVVVxx" 25574400000000000 +tenk unique1=7143i,unique2=296i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=143i,twothousand=1143i,fivethous=2143i,tenthous=7143i,odd=86i,even=87i,stringu1="TOAAAA",stringu2="KLAAAA",string4="AAAAxx" 25660800000000000 +tenk unique1=5702i,unique2=297i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=702i,twothousand=1702i,fivethous=702i,tenthous=5702i,odd=4i,even=5i,stringu1="ILAAAA",stringu2="LLAAAA",string4="HHHHxx" 25747200000000000 +tenk unique1=362i,unique2=298i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=362i,twothousand=362i,fivethous=362i,tenthous=362i,odd=124i,even=125i,stringu1="YNAAAA",stringu2="MLAAAA",string4="OOOOxx" 25833600000000000 +tenk unique1=6997i,unique2=299i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=997i,twothousand=997i,fivethous=1997i,tenthous=6997i,odd=194i,even=195i,stringu1="DJAAAA",stringu2="NLAAAA",string4="VVVVxx" 25920000000000000 +tenk unique1=2529i,unique2=300i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=529i,twothousand=529i,fivethous=2529i,tenthous=2529i,odd=58i,even=59i,stringu1="HTAAAA",stringu2="OLAAAA",string4="AAAAxx" 26006400000000000 +tenk unique1=6319i,unique2=301i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=319i,twothousand=319i,fivethous=1319i,tenthous=6319i,odd=38i,even=39i,stringu1="BJAAAA",stringu2="PLAAAA",string4="HHHHxx" 26092800000000000 +tenk unique1=954i,unique2=302i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=954i,twothousand=954i,fivethous=954i,tenthous=954i,odd=108i,even=109i,stringu1="SKAAAA",stringu2="QLAAAA",string4="OOOOxx" 26179200000000000 +tenk unique1=3413i,unique2=303i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=413i,twothousand=1413i,fivethous=3413i,tenthous=3413i,odd=26i,even=27i,stringu1="HBAAAA",stringu2="RLAAAA",string4="VVVVxx" 26265600000000000 +tenk unique1=9081i,unique2=304i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=81i,twothousand=1081i,fivethous=4081i,tenthous=9081i,odd=162i,even=163i,stringu1="HLAAAA",stringu2="SLAAAA",string4="AAAAxx" 26352000000000000 +tenk unique1=5599i,unique2=305i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=599i,twothousand=1599i,fivethous=599i,tenthous=5599i,odd=198i,even=199i,stringu1="JHAAAA",stringu2="TLAAAA",string4="HHHHxx" 26438400000000000 +tenk unique1=4772i,unique2=306i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=772i,twothousand=772i,fivethous=4772i,tenthous=4772i,odd=144i,even=145i,stringu1="OBAAAA",stringu2="ULAAAA",string4="OOOOxx" 26524800000000000 +tenk unique1=1124i,unique2=307i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=124i,twothousand=1124i,fivethous=1124i,tenthous=1124i,odd=48i,even=49i,stringu1="GRAAAA",stringu2="VLAAAA",string4="VVVVxx" 26611200000000000 +tenk unique1=7793i,unique2=308i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=793i,twothousand=1793i,fivethous=2793i,tenthous=7793i,odd=186i,even=187i,stringu1="TNAAAA",stringu2="WLAAAA",string4="AAAAxx" 26697600000000000 +tenk unique1=4201i,unique2=309i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=201i,twothousand=201i,fivethous=4201i,tenthous=4201i,odd=2i,even=3i,stringu1="PFAAAA",stringu2="XLAAAA",string4="HHHHxx" 26784000000000000 +tenk unique1=7015i,unique2=310i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=15i,twothousand=1015i,fivethous=2015i,tenthous=7015i,odd=30i,even=31i,stringu1="VJAAAA",stringu2="YLAAAA",string4="OOOOxx" 26870400000000000 +tenk unique1=5936i,unique2=311i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=936i,twothousand=1936i,fivethous=936i,tenthous=5936i,odd=72i,even=73i,stringu1="IUAAAA",stringu2="ZLAAAA",string4="VVVVxx" 26956800000000000 +tenk unique1=4625i,unique2=312i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=625i,twothousand=625i,fivethous=4625i,tenthous=4625i,odd=50i,even=51i,stringu1="XVAAAA",stringu2="AMAAAA",string4="AAAAxx" 27043200000000000 +tenk unique1=4989i,unique2=313i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=989i,twothousand=989i,fivethous=4989i,tenthous=4989i,odd=178i,even=179i,stringu1="XJAAAA",stringu2="BMAAAA",string4="HHHHxx" 27129600000000000 +tenk unique1=4949i,unique2=314i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=949i,twothousand=949i,fivethous=4949i,tenthous=4949i,odd=98i,even=99i,stringu1="JIAAAA",stringu2="CMAAAA",string4="OOOOxx" 27216000000000000 +tenk unique1=6273i,unique2=315i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=273i,twothousand=273i,fivethous=1273i,tenthous=6273i,odd=146i,even=147i,stringu1="HHAAAA",stringu2="DMAAAA",string4="VVVVxx" 27302400000000000 +tenk unique1=4478i,unique2=316i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=478i,twothousand=478i,fivethous=4478i,tenthous=4478i,odd=156i,even=157i,stringu1="GQAAAA",stringu2="EMAAAA",string4="AAAAxx" 27388800000000000 +tenk unique1=8854i,unique2=317i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=854i,twothousand=854i,fivethous=3854i,tenthous=8854i,odd=108i,even=109i,stringu1="OCAAAA",stringu2="FMAAAA",string4="HHHHxx" 27475200000000000 +tenk unique1=2105i,unique2=318i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=105i,twothousand=105i,fivethous=2105i,tenthous=2105i,odd=10i,even=11i,stringu1="ZCAAAA",stringu2="GMAAAA",string4="OOOOxx" 27561600000000000 +tenk unique1=8345i,unique2=319i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=345i,twothousand=345i,fivethous=3345i,tenthous=8345i,odd=90i,even=91i,stringu1="ZIAAAA",stringu2="HMAAAA",string4="VVVVxx" 27648000000000000 +tenk unique1=1941i,unique2=320i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=941i,twothousand=1941i,fivethous=1941i,tenthous=1941i,odd=82i,even=83i,stringu1="RWAAAA",stringu2="IMAAAA",string4="AAAAxx" 27734400000000000 +tenk unique1=1765i,unique2=321i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=765i,twothousand=1765i,fivethous=1765i,tenthous=1765i,odd=130i,even=131i,stringu1="XPAAAA",stringu2="JMAAAA",string4="HHHHxx" 27820800000000000 +tenk unique1=9592i,unique2=322i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=592i,twothousand=1592i,fivethous=4592i,tenthous=9592i,odd=184i,even=185i,stringu1="YEAAAA",stringu2="KMAAAA",string4="OOOOxx" 27907200000000000 +tenk unique1=1694i,unique2=323i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=694i,twothousand=1694i,fivethous=1694i,tenthous=1694i,odd=188i,even=189i,stringu1="ENAAAA",stringu2="LMAAAA",string4="VVVVxx" 27993600000000000 +tenk unique1=8940i,unique2=324i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=940i,twothousand=940i,fivethous=3940i,tenthous=8940i,odd=80i,even=81i,stringu1="WFAAAA",stringu2="MMAAAA",string4="AAAAxx" 28080000000000000 +tenk unique1=7264i,unique2=325i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=264i,twothousand=1264i,fivethous=2264i,tenthous=7264i,odd=128i,even=129i,stringu1="KTAAAA",stringu2="NMAAAA",string4="HHHHxx" 28166400000000000 +tenk unique1=4699i,unique2=326i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=699i,twothousand=699i,fivethous=4699i,tenthous=4699i,odd=198i,even=199i,stringu1="TYAAAA",stringu2="OMAAAA",string4="OOOOxx" 28252800000000000 +tenk unique1=4541i,unique2=327i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=541i,twothousand=541i,fivethous=4541i,tenthous=4541i,odd=82i,even=83i,stringu1="RSAAAA",stringu2="PMAAAA",string4="VVVVxx" 28339200000000000 +tenk unique1=5768i,unique2=328i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=768i,twothousand=1768i,fivethous=768i,tenthous=5768i,odd=136i,even=137i,stringu1="WNAAAA",stringu2="QMAAAA",string4="AAAAxx" 28425600000000000 +tenk unique1=6183i,unique2=329i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=183i,twothousand=183i,fivethous=1183i,tenthous=6183i,odd=166i,even=167i,stringu1="VDAAAA",stringu2="RMAAAA",string4="HHHHxx" 28512000000000000 +tenk unique1=7457i,unique2=330i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=457i,twothousand=1457i,fivethous=2457i,tenthous=7457i,odd=114i,even=115i,stringu1="VAAAAA",stringu2="SMAAAA",string4="OOOOxx" 28598400000000000 +tenk unique1=7317i,unique2=331i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=317i,twothousand=1317i,fivethous=2317i,tenthous=7317i,odd=34i,even=35i,stringu1="LVAAAA",stringu2="TMAAAA",string4="VVVVxx" 28684800000000000 +tenk unique1=1944i,unique2=332i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=944i,twothousand=1944i,fivethous=1944i,tenthous=1944i,odd=88i,even=89i,stringu1="UWAAAA",stringu2="UMAAAA",string4="AAAAxx" 28771200000000000 +tenk unique1=665i,unique2=333i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=665i,twothousand=665i,fivethous=665i,tenthous=665i,odd=130i,even=131i,stringu1="PZAAAA",stringu2="VMAAAA",string4="HHHHxx" 28857600000000000 +tenk unique1=5974i,unique2=334i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=974i,twothousand=1974i,fivethous=974i,tenthous=5974i,odd=148i,even=149i,stringu1="UVAAAA",stringu2="WMAAAA",string4="OOOOxx" 28944000000000000 +tenk unique1=7370i,unique2=335i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=370i,twothousand=1370i,fivethous=2370i,tenthous=7370i,odd=140i,even=141i,stringu1="MXAAAA",stringu2="XMAAAA",string4="VVVVxx" 29030400000000000 +tenk unique1=9196i,unique2=336i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=196i,twothousand=1196i,fivethous=4196i,tenthous=9196i,odd=192i,even=193i,stringu1="SPAAAA",stringu2="YMAAAA",string4="AAAAxx" 29116800000000000 +tenk unique1=6796i,unique2=337i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=796i,twothousand=796i,fivethous=1796i,tenthous=6796i,odd=192i,even=193i,stringu1="KBAAAA",stringu2="ZMAAAA",string4="HHHHxx" 29203200000000000 +tenk unique1=6180i,unique2=338i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=180i,twothousand=180i,fivethous=1180i,tenthous=6180i,odd=160i,even=161i,stringu1="SDAAAA",stringu2="ANAAAA",string4="OOOOxx" 29289600000000000 +tenk unique1=8557i,unique2=339i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=557i,twothousand=557i,fivethous=3557i,tenthous=8557i,odd=114i,even=115i,stringu1="DRAAAA",stringu2="BNAAAA",string4="VVVVxx" 29376000000000000 +tenk unique1=928i,unique2=340i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=928i,twothousand=928i,fivethous=928i,tenthous=928i,odd=56i,even=57i,stringu1="SJAAAA",stringu2="CNAAAA",string4="AAAAxx" 29462400000000000 +tenk unique1=6275i,unique2=341i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=275i,twothousand=275i,fivethous=1275i,tenthous=6275i,odd=150i,even=151i,stringu1="JHAAAA",stringu2="DNAAAA",string4="HHHHxx" 29548800000000000 +tenk unique1=409i,unique2=342i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=409i,twothousand=409i,fivethous=409i,tenthous=409i,odd=18i,even=19i,stringu1="TPAAAA",stringu2="ENAAAA",string4="OOOOxx" 29635200000000000 +tenk unique1=6442i,unique2=343i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=442i,twothousand=442i,fivethous=1442i,tenthous=6442i,odd=84i,even=85i,stringu1="UNAAAA",stringu2="FNAAAA",string4="VVVVxx" 29721600000000000 +tenk unique1=5889i,unique2=344i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=889i,twothousand=1889i,fivethous=889i,tenthous=5889i,odd=178i,even=179i,stringu1="NSAAAA",stringu2="GNAAAA",string4="AAAAxx" 29808000000000000 +tenk unique1=5180i,unique2=345i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=180i,twothousand=1180i,fivethous=180i,tenthous=5180i,odd=160i,even=161i,stringu1="GRAAAA",stringu2="HNAAAA",string4="HHHHxx" 29894400000000000 +tenk unique1=1629i,unique2=346i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=629i,twothousand=1629i,fivethous=1629i,tenthous=1629i,odd=58i,even=59i,stringu1="RKAAAA",stringu2="INAAAA",string4="OOOOxx" 29980800000000000 +tenk unique1=6088i,unique2=347i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=88i,twothousand=88i,fivethous=1088i,tenthous=6088i,odd=176i,even=177i,stringu1="EAAAAA",stringu2="JNAAAA",string4="VVVVxx" 30067200000000000 +tenk unique1=5598i,unique2=348i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=598i,twothousand=1598i,fivethous=598i,tenthous=5598i,odd=196i,even=197i,stringu1="IHAAAA",stringu2="KNAAAA",string4="AAAAxx" 30153600000000000 +tenk unique1=1803i,unique2=349i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=803i,twothousand=1803i,fivethous=1803i,tenthous=1803i,odd=6i,even=7i,stringu1="JRAAAA",stringu2="LNAAAA",string4="HHHHxx" 30240000000000000 +tenk unique1=2330i,unique2=350i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=330i,twothousand=330i,fivethous=2330i,tenthous=2330i,odd=60i,even=61i,stringu1="QLAAAA",stringu2="MNAAAA",string4="OOOOxx" 30326400000000000 +tenk unique1=5901i,unique2=351i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=901i,twothousand=1901i,fivethous=901i,tenthous=5901i,odd=2i,even=3i,stringu1="ZSAAAA",stringu2="NNAAAA",string4="VVVVxx" 30412800000000000 +tenk unique1=780i,unique2=352i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=780i,twothousand=780i,fivethous=780i,tenthous=780i,odd=160i,even=161i,stringu1="AEAAAA",stringu2="ONAAAA",string4="AAAAxx" 30499200000000000 +tenk unique1=7171i,unique2=353i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=171i,twothousand=1171i,fivethous=2171i,tenthous=7171i,odd=142i,even=143i,stringu1="VPAAAA",stringu2="PNAAAA",string4="HHHHxx" 30585600000000000 +tenk unique1=8778i,unique2=354i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=778i,twothousand=778i,fivethous=3778i,tenthous=8778i,odd=156i,even=157i,stringu1="QZAAAA",stringu2="QNAAAA",string4="OOOOxx" 30672000000000000 +tenk unique1=6622i,unique2=355i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=622i,twothousand=622i,fivethous=1622i,tenthous=6622i,odd=44i,even=45i,stringu1="SUAAAA",stringu2="RNAAAA",string4="VVVVxx" 30758400000000000 +tenk unique1=9938i,unique2=356i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=938i,twothousand=1938i,fivethous=4938i,tenthous=9938i,odd=76i,even=77i,stringu1="GSAAAA",stringu2="SNAAAA",string4="AAAAxx" 30844800000000000 +tenk unique1=8254i,unique2=357i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=254i,twothousand=254i,fivethous=3254i,tenthous=8254i,odd=108i,even=109i,stringu1="MFAAAA",stringu2="TNAAAA",string4="HHHHxx" 30931200000000000 +tenk unique1=1951i,unique2=358i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=951i,twothousand=1951i,fivethous=1951i,tenthous=1951i,odd=102i,even=103i,stringu1="BXAAAA",stringu2="UNAAAA",string4="OOOOxx" 31017600000000000 +tenk unique1=1434i,unique2=359i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=434i,twothousand=1434i,fivethous=1434i,tenthous=1434i,odd=68i,even=69i,stringu1="EDAAAA",stringu2="VNAAAA",string4="VVVVxx" 31104000000000000 +tenk unique1=7539i,unique2=360i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=539i,twothousand=1539i,fivethous=2539i,tenthous=7539i,odd=78i,even=79i,stringu1="ZDAAAA",stringu2="WNAAAA",string4="AAAAxx" 31190400000000000 +tenk unique1=600i,unique2=361i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=600i,twothousand=600i,fivethous=600i,tenthous=600i,odd=0i,even=1i,stringu1="CXAAAA",stringu2="XNAAAA",string4="HHHHxx" 31276800000000000 +tenk unique1=3122i,unique2=362i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=122i,twothousand=1122i,fivethous=3122i,tenthous=3122i,odd=44i,even=45i,stringu1="CQAAAA",stringu2="YNAAAA",string4="OOOOxx" 31363200000000000 +tenk unique1=5704i,unique2=363i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=704i,twothousand=1704i,fivethous=704i,tenthous=5704i,odd=8i,even=9i,stringu1="KLAAAA",stringu2="ZNAAAA",string4="VVVVxx" 31449600000000000 +tenk unique1=6300i,unique2=364i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=300i,twothousand=300i,fivethous=1300i,tenthous=6300i,odd=0i,even=1i,stringu1="IIAAAA",stringu2="AOAAAA",string4="AAAAxx" 31536000000000000 +tenk unique1=4585i,unique2=365i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=585i,twothousand=585i,fivethous=4585i,tenthous=4585i,odd=170i,even=171i,stringu1="JUAAAA",stringu2="BOAAAA",string4="HHHHxx" 31622400000000000 +tenk unique1=6313i,unique2=366i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=313i,twothousand=313i,fivethous=1313i,tenthous=6313i,odd=26i,even=27i,stringu1="VIAAAA",stringu2="COAAAA",string4="OOOOxx" 31708800000000000 +tenk unique1=3154i,unique2=367i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=154i,twothousand=1154i,fivethous=3154i,tenthous=3154i,odd=108i,even=109i,stringu1="IRAAAA",stringu2="DOAAAA",string4="VVVVxx" 31795200000000000 +tenk unique1=642i,unique2=368i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=642i,twothousand=642i,fivethous=642i,tenthous=642i,odd=84i,even=85i,stringu1="SYAAAA",stringu2="EOAAAA",string4="AAAAxx" 31881600000000000 +tenk unique1=7736i,unique2=369i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=736i,twothousand=1736i,fivethous=2736i,tenthous=7736i,odd=72i,even=73i,stringu1="OLAAAA",stringu2="FOAAAA",string4="HHHHxx" 31968000000000000 +tenk unique1=5087i,unique2=370i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=87i,twothousand=1087i,fivethous=87i,tenthous=5087i,odd=174i,even=175i,stringu1="RNAAAA",stringu2="GOAAAA",string4="OOOOxx" 32054400000000000 +tenk unique1=5708i,unique2=371i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=708i,twothousand=1708i,fivethous=708i,tenthous=5708i,odd=16i,even=17i,stringu1="OLAAAA",stringu2="HOAAAA",string4="VVVVxx" 32140800000000000 +tenk unique1=8169i,unique2=372i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=169i,twothousand=169i,fivethous=3169i,tenthous=8169i,odd=138i,even=139i,stringu1="FCAAAA",stringu2="IOAAAA",string4="AAAAxx" 32227200000000000 +tenk unique1=9768i,unique2=373i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=768i,twothousand=1768i,fivethous=4768i,tenthous=9768i,odd=136i,even=137i,stringu1="SLAAAA",stringu2="JOAAAA",string4="HHHHxx" 32313600000000000 +tenk unique1=3874i,unique2=374i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=874i,twothousand=1874i,fivethous=3874i,tenthous=3874i,odd=148i,even=149i,stringu1="ATAAAA",stringu2="KOAAAA",string4="OOOOxx" 32400000000000000 +tenk unique1=6831i,unique2=375i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=831i,twothousand=831i,fivethous=1831i,tenthous=6831i,odd=62i,even=63i,stringu1="TCAAAA",stringu2="LOAAAA",string4="VVVVxx" 32486400000000000 +tenk unique1=18i,unique2=376i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=18i,twothousand=18i,fivethous=18i,tenthous=18i,odd=36i,even=37i,stringu1="SAAAAA",stringu2="MOAAAA",string4="AAAAxx" 32572800000000000 +tenk unique1=6375i,unique2=377i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=375i,twothousand=375i,fivethous=1375i,tenthous=6375i,odd=150i,even=151i,stringu1="FLAAAA",stringu2="NOAAAA",string4="HHHHxx" 32659200000000000 +tenk unique1=7106i,unique2=378i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=106i,twothousand=1106i,fivethous=2106i,tenthous=7106i,odd=12i,even=13i,stringu1="INAAAA",stringu2="OOAAAA",string4="OOOOxx" 32745600000000000 +tenk unique1=5926i,unique2=379i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=926i,twothousand=1926i,fivethous=926i,tenthous=5926i,odd=52i,even=53i,stringu1="YTAAAA",stringu2="POAAAA",string4="VVVVxx" 32832000000000000 +tenk unique1=4956i,unique2=380i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=956i,twothousand=956i,fivethous=4956i,tenthous=4956i,odd=112i,even=113i,stringu1="QIAAAA",stringu2="QOAAAA",string4="AAAAxx" 32918400000000000 +tenk unique1=7042i,unique2=381i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=42i,twothousand=1042i,fivethous=2042i,tenthous=7042i,odd=84i,even=85i,stringu1="WKAAAA",stringu2="ROAAAA",string4="HHHHxx" 33004800000000000 +tenk unique1=6043i,unique2=382i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=43i,twothousand=43i,fivethous=1043i,tenthous=6043i,odd=86i,even=87i,stringu1="LYAAAA",stringu2="SOAAAA",string4="OOOOxx" 33091200000000000 +tenk unique1=2084i,unique2=383i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=84i,twothousand=84i,fivethous=2084i,tenthous=2084i,odd=168i,even=169i,stringu1="ECAAAA",stringu2="TOAAAA",string4="VVVVxx" 33177600000000000 +tenk unique1=6038i,unique2=384i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=38i,twothousand=38i,fivethous=1038i,tenthous=6038i,odd=76i,even=77i,stringu1="GYAAAA",stringu2="UOAAAA",string4="AAAAxx" 33264000000000000 +tenk unique1=7253i,unique2=385i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=253i,twothousand=1253i,fivethous=2253i,tenthous=7253i,odd=106i,even=107i,stringu1="ZSAAAA",stringu2="VOAAAA",string4="HHHHxx" 33350400000000000 +tenk unique1=2061i,unique2=386i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=61i,twothousand=61i,fivethous=2061i,tenthous=2061i,odd=122i,even=123i,stringu1="HBAAAA",stringu2="WOAAAA",string4="OOOOxx" 33436800000000000 +tenk unique1=7800i,unique2=387i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=800i,twothousand=1800i,fivethous=2800i,tenthous=7800i,odd=0i,even=1i,stringu1="AOAAAA",stringu2="XOAAAA",string4="VVVVxx" 33523200000000000 +tenk unique1=4970i,unique2=388i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=970i,twothousand=970i,fivethous=4970i,tenthous=4970i,odd=140i,even=141i,stringu1="EJAAAA",stringu2="YOAAAA",string4="AAAAxx" 33609600000000000 +tenk unique1=8580i,unique2=389i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=580i,twothousand=580i,fivethous=3580i,tenthous=8580i,odd=160i,even=161i,stringu1="ASAAAA",stringu2="ZOAAAA",string4="HHHHxx" 33696000000000000 +tenk unique1=9173i,unique2=390i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=173i,twothousand=1173i,fivethous=4173i,tenthous=9173i,odd=146i,even=147i,stringu1="VOAAAA",stringu2="APAAAA",string4="OOOOxx" 33782400000000000 +tenk unique1=8558i,unique2=391i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=558i,twothousand=558i,fivethous=3558i,tenthous=8558i,odd=116i,even=117i,stringu1="ERAAAA",stringu2="BPAAAA",string4="VVVVxx" 33868800000000000 +tenk unique1=3897i,unique2=392i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=897i,twothousand=1897i,fivethous=3897i,tenthous=3897i,odd=194i,even=195i,stringu1="XTAAAA",stringu2="CPAAAA",string4="AAAAxx" 33955200000000000 +tenk unique1=5069i,unique2=393i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=69i,twothousand=1069i,fivethous=69i,tenthous=5069i,odd=138i,even=139i,stringu1="ZMAAAA",stringu2="DPAAAA",string4="HHHHxx" 34041600000000000 +tenk unique1=2301i,unique2=394i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=301i,twothousand=301i,fivethous=2301i,tenthous=2301i,odd=2i,even=3i,stringu1="NKAAAA",stringu2="EPAAAA",string4="OOOOxx" 34128000000000000 +tenk unique1=9863i,unique2=395i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=863i,twothousand=1863i,fivethous=4863i,tenthous=9863i,odd=126i,even=127i,stringu1="JPAAAA",stringu2="FPAAAA",string4="VVVVxx" 34214400000000000 +tenk unique1=5733i,unique2=396i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=733i,twothousand=1733i,fivethous=733i,tenthous=5733i,odd=66i,even=67i,stringu1="NMAAAA",stringu2="GPAAAA",string4="AAAAxx" 34300800000000000 +tenk unique1=2338i,unique2=397i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=338i,twothousand=338i,fivethous=2338i,tenthous=2338i,odd=76i,even=77i,stringu1="YLAAAA",stringu2="HPAAAA",string4="HHHHxx" 34387200000000000 +tenk unique1=9639i,unique2=398i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=639i,twothousand=1639i,fivethous=4639i,tenthous=9639i,odd=78i,even=79i,stringu1="TGAAAA",stringu2="IPAAAA",string4="OOOOxx" 34473600000000000 +tenk unique1=1139i,unique2=399i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=139i,twothousand=1139i,fivethous=1139i,tenthous=1139i,odd=78i,even=79i,stringu1="VRAAAA",stringu2="JPAAAA",string4="VVVVxx" 34560000000000000 +tenk unique1=2293i,unique2=400i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=293i,twothousand=293i,fivethous=2293i,tenthous=2293i,odd=186i,even=187i,stringu1="FKAAAA",stringu2="KPAAAA",string4="AAAAxx" 34646400000000000 +tenk unique1=6125i,unique2=401i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=125i,twothousand=125i,fivethous=1125i,tenthous=6125i,odd=50i,even=51i,stringu1="PBAAAA",stringu2="LPAAAA",string4="HHHHxx" 34732800000000000 +tenk unique1=5374i,unique2=402i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=374i,twothousand=1374i,fivethous=374i,tenthous=5374i,odd=148i,even=149i,stringu1="SYAAAA",stringu2="MPAAAA",string4="OOOOxx" 34819200000000000 +tenk unique1=7216i,unique2=403i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=216i,twothousand=1216i,fivethous=2216i,tenthous=7216i,odd=32i,even=33i,stringu1="ORAAAA",stringu2="NPAAAA",string4="VVVVxx" 34905600000000000 +tenk unique1=2285i,unique2=404i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=285i,twothousand=285i,fivethous=2285i,tenthous=2285i,odd=170i,even=171i,stringu1="XJAAAA",stringu2="OPAAAA",string4="AAAAxx" 34992000000000000 +tenk unique1=2387i,unique2=405i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=387i,twothousand=387i,fivethous=2387i,tenthous=2387i,odd=174i,even=175i,stringu1="VNAAAA",stringu2="PPAAAA",string4="HHHHxx" 35078400000000000 +tenk unique1=5015i,unique2=406i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=15i,twothousand=1015i,fivethous=15i,tenthous=5015i,odd=30i,even=31i,stringu1="XKAAAA",stringu2="QPAAAA",string4="OOOOxx" 35164800000000000 +tenk unique1=2087i,unique2=407i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=87i,twothousand=87i,fivethous=2087i,tenthous=2087i,odd=174i,even=175i,stringu1="HCAAAA",stringu2="RPAAAA",string4="VVVVxx" 35251200000000000 +tenk unique1=4938i,unique2=408i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=938i,twothousand=938i,fivethous=4938i,tenthous=4938i,odd=76i,even=77i,stringu1="YHAAAA",stringu2="SPAAAA",string4="AAAAxx" 35337600000000000 +tenk unique1=3635i,unique2=409i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=635i,twothousand=1635i,fivethous=3635i,tenthous=3635i,odd=70i,even=71i,stringu1="VJAAAA",stringu2="TPAAAA",string4="HHHHxx" 35424000000000000 +tenk unique1=7737i,unique2=410i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=737i,twothousand=1737i,fivethous=2737i,tenthous=7737i,odd=74i,even=75i,stringu1="PLAAAA",stringu2="UPAAAA",string4="OOOOxx" 35510400000000000 +tenk unique1=8056i,unique2=411i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=56i,twothousand=56i,fivethous=3056i,tenthous=8056i,odd=112i,even=113i,stringu1="WXAAAA",stringu2="VPAAAA",string4="VVVVxx" 35596800000000000 +tenk unique1=4502i,unique2=412i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=502i,twothousand=502i,fivethous=4502i,tenthous=4502i,odd=4i,even=5i,stringu1="ERAAAA",stringu2="WPAAAA",string4="AAAAxx" 35683200000000000 +tenk unique1=54i,unique2=413i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=54i,twothousand=54i,fivethous=54i,tenthous=54i,odd=108i,even=109i,stringu1="CCAAAA",stringu2="XPAAAA",string4="HHHHxx" 35769600000000000 +tenk unique1=3182i,unique2=414i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=182i,twothousand=1182i,fivethous=3182i,tenthous=3182i,odd=164i,even=165i,stringu1="KSAAAA",stringu2="YPAAAA",string4="OOOOxx" 35856000000000000 +tenk unique1=3718i,unique2=415i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=718i,twothousand=1718i,fivethous=3718i,tenthous=3718i,odd=36i,even=37i,stringu1="ANAAAA",stringu2="ZPAAAA",string4="VVVVxx" 35942400000000000 +tenk unique1=3989i,unique2=416i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=989i,twothousand=1989i,fivethous=3989i,tenthous=3989i,odd=178i,even=179i,stringu1="LXAAAA",stringu2="AQAAAA",string4="AAAAxx" 36028800000000000 +tenk unique1=8028i,unique2=417i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=28i,twothousand=28i,fivethous=3028i,tenthous=8028i,odd=56i,even=57i,stringu1="UWAAAA",stringu2="BQAAAA",string4="HHHHxx" 36115200000000000 +tenk unique1=1426i,unique2=418i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=426i,twothousand=1426i,fivethous=1426i,tenthous=1426i,odd=52i,even=53i,stringu1="WCAAAA",stringu2="CQAAAA",string4="OOOOxx" 36201600000000000 +tenk unique1=3801i,unique2=419i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=801i,twothousand=1801i,fivethous=3801i,tenthous=3801i,odd=2i,even=3i,stringu1="FQAAAA",stringu2="DQAAAA",string4="VVVVxx" 36288000000000000 +tenk unique1=241i,unique2=420i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=241i,twothousand=241i,fivethous=241i,tenthous=241i,odd=82i,even=83i,stringu1="HJAAAA",stringu2="EQAAAA",string4="AAAAxx" 36374400000000000 +tenk unique1=8000i,unique2=421i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=0i,fivethous=3000i,tenthous=8000i,odd=0i,even=1i,stringu1="SVAAAA",stringu2="FQAAAA",string4="HHHHxx" 36460800000000000 +tenk unique1=8357i,unique2=422i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=357i,twothousand=357i,fivethous=3357i,tenthous=8357i,odd=114i,even=115i,stringu1="LJAAAA",stringu2="GQAAAA",string4="OOOOxx" 36547200000000000 +tenk unique1=7548i,unique2=423i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=548i,twothousand=1548i,fivethous=2548i,tenthous=7548i,odd=96i,even=97i,stringu1="IEAAAA",stringu2="HQAAAA",string4="VVVVxx" 36633600000000000 +tenk unique1=7307i,unique2=424i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=307i,twothousand=1307i,fivethous=2307i,tenthous=7307i,odd=14i,even=15i,stringu1="BVAAAA",stringu2="IQAAAA",string4="AAAAxx" 36720000000000000 +tenk unique1=2275i,unique2=425i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=275i,twothousand=275i,fivethous=2275i,tenthous=2275i,odd=150i,even=151i,stringu1="NJAAAA",stringu2="JQAAAA",string4="HHHHxx" 36806400000000000 +tenk unique1=2718i,unique2=426i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=718i,twothousand=718i,fivethous=2718i,tenthous=2718i,odd=36i,even=37i,stringu1="OAAAAA",stringu2="KQAAAA",string4="OOOOxx" 36892800000000000 +tenk unique1=7068i,unique2=427i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=68i,twothousand=1068i,fivethous=2068i,tenthous=7068i,odd=136i,even=137i,stringu1="WLAAAA",stringu2="LQAAAA",string4="VVVVxx" 36979200000000000 +tenk unique1=3181i,unique2=428i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=181i,twothousand=1181i,fivethous=3181i,tenthous=3181i,odd=162i,even=163i,stringu1="JSAAAA",stringu2="MQAAAA",string4="AAAAxx" 37065600000000000 +tenk unique1=749i,unique2=429i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=749i,twothousand=749i,fivethous=749i,tenthous=749i,odd=98i,even=99i,stringu1="VCAAAA",stringu2="NQAAAA",string4="HHHHxx" 37152000000000000 +tenk unique1=5195i,unique2=430i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=195i,twothousand=1195i,fivethous=195i,tenthous=5195i,odd=190i,even=191i,stringu1="VRAAAA",stringu2="OQAAAA",string4="OOOOxx" 37238400000000000 +tenk unique1=6136i,unique2=431i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=136i,twothousand=136i,fivethous=1136i,tenthous=6136i,odd=72i,even=73i,stringu1="ACAAAA",stringu2="PQAAAA",string4="VVVVxx" 37324800000000000 +tenk unique1=8012i,unique2=432i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=12i,twothousand=12i,fivethous=3012i,tenthous=8012i,odd=24i,even=25i,stringu1="EWAAAA",stringu2="QQAAAA",string4="AAAAxx" 37411200000000000 +tenk unique1=3957i,unique2=433i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=957i,twothousand=1957i,fivethous=3957i,tenthous=3957i,odd=114i,even=115i,stringu1="FWAAAA",stringu2="RQAAAA",string4="HHHHxx" 37497600000000000 +tenk unique1=3083i,unique2=434i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=83i,twothousand=1083i,fivethous=3083i,tenthous=3083i,odd=166i,even=167i,stringu1="POAAAA",stringu2="SQAAAA",string4="OOOOxx" 37584000000000000 +tenk unique1=9997i,unique2=435i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=997i,twothousand=1997i,fivethous=4997i,tenthous=9997i,odd=194i,even=195i,stringu1="NUAAAA",stringu2="TQAAAA",string4="VVVVxx" 37670400000000000 +tenk unique1=3299i,unique2=436i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=299i,twothousand=1299i,fivethous=3299i,tenthous=3299i,odd=198i,even=199i,stringu1="XWAAAA",stringu2="UQAAAA",string4="AAAAxx" 37756800000000000 +tenk unique1=846i,unique2=437i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=846i,twothousand=846i,fivethous=846i,tenthous=846i,odd=92i,even=93i,stringu1="OGAAAA",stringu2="VQAAAA",string4="HHHHxx" 37843200000000000 +tenk unique1=2985i,unique2=438i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=985i,twothousand=985i,fivethous=2985i,tenthous=2985i,odd=170i,even=171i,stringu1="VKAAAA",stringu2="WQAAAA",string4="OOOOxx" 37929600000000000 +tenk unique1=9238i,unique2=439i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=238i,twothousand=1238i,fivethous=4238i,tenthous=9238i,odd=76i,even=77i,stringu1="IRAAAA",stringu2="XQAAAA",string4="VVVVxx" 38016000000000000 +tenk unique1=1403i,unique2=440i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=403i,twothousand=1403i,fivethous=1403i,tenthous=1403i,odd=6i,even=7i,stringu1="ZBAAAA",stringu2="YQAAAA",string4="AAAAxx" 38102400000000000 +tenk unique1=5563i,unique2=441i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=563i,twothousand=1563i,fivethous=563i,tenthous=5563i,odd=126i,even=127i,stringu1="ZFAAAA",stringu2="ZQAAAA",string4="HHHHxx" 38188800000000000 +tenk unique1=7965i,unique2=442i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=965i,twothousand=1965i,fivethous=2965i,tenthous=7965i,odd=130i,even=131i,stringu1="JUAAAA",stringu2="ARAAAA",string4="OOOOxx" 38275200000000000 +tenk unique1=4512i,unique2=443i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=512i,twothousand=512i,fivethous=4512i,tenthous=4512i,odd=24i,even=25i,stringu1="ORAAAA",stringu2="BRAAAA",string4="VVVVxx" 38361600000000000 +tenk unique1=9730i,unique2=444i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=730i,twothousand=1730i,fivethous=4730i,tenthous=9730i,odd=60i,even=61i,stringu1="GKAAAA",stringu2="CRAAAA",string4="AAAAxx" 38448000000000000 +tenk unique1=1129i,unique2=445i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=129i,twothousand=1129i,fivethous=1129i,tenthous=1129i,odd=58i,even=59i,stringu1="LRAAAA",stringu2="DRAAAA",string4="HHHHxx" 38534400000000000 +tenk unique1=2624i,unique2=446i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=624i,twothousand=624i,fivethous=2624i,tenthous=2624i,odd=48i,even=49i,stringu1="YWAAAA",stringu2="ERAAAA",string4="OOOOxx" 38620800000000000 +tenk unique1=8178i,unique2=447i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=178i,twothousand=178i,fivethous=3178i,tenthous=8178i,odd=156i,even=157i,stringu1="OCAAAA",stringu2="FRAAAA",string4="VVVVxx" 38707200000000000 +tenk unique1=6468i,unique2=448i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=468i,twothousand=468i,fivethous=1468i,tenthous=6468i,odd=136i,even=137i,stringu1="UOAAAA",stringu2="GRAAAA",string4="AAAAxx" 38793600000000000 +tenk unique1=3027i,unique2=449i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=27i,twothousand=1027i,fivethous=3027i,tenthous=3027i,odd=54i,even=55i,stringu1="LMAAAA",stringu2="HRAAAA",string4="HHHHxx" 38880000000000000 +tenk unique1=3845i,unique2=450i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=845i,twothousand=1845i,fivethous=3845i,tenthous=3845i,odd=90i,even=91i,stringu1="XRAAAA",stringu2="IRAAAA",string4="OOOOxx" 38966400000000000 +tenk unique1=786i,unique2=451i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=786i,twothousand=786i,fivethous=786i,tenthous=786i,odd=172i,even=173i,stringu1="GEAAAA",stringu2="JRAAAA",string4="VVVVxx" 39052800000000000 +tenk unique1=4971i,unique2=452i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=971i,twothousand=971i,fivethous=4971i,tenthous=4971i,odd=142i,even=143i,stringu1="FJAAAA",stringu2="KRAAAA",string4="AAAAxx" 39139200000000000 +tenk unique1=1542i,unique2=453i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=542i,twothousand=1542i,fivethous=1542i,tenthous=1542i,odd=84i,even=85i,stringu1="IHAAAA",stringu2="LRAAAA",string4="HHHHxx" 39225600000000000 +tenk unique1=7967i,unique2=454i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=967i,twothousand=1967i,fivethous=2967i,tenthous=7967i,odd=134i,even=135i,stringu1="LUAAAA",stringu2="MRAAAA",string4="OOOOxx" 39312000000000000 +tenk unique1=443i,unique2=455i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=443i,twothousand=443i,fivethous=443i,tenthous=443i,odd=86i,even=87i,stringu1="BRAAAA",stringu2="NRAAAA",string4="VVVVxx" 39398400000000000 +tenk unique1=7318i,unique2=456i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=318i,twothousand=1318i,fivethous=2318i,tenthous=7318i,odd=36i,even=37i,stringu1="MVAAAA",stringu2="ORAAAA",string4="AAAAxx" 39484800000000000 +tenk unique1=4913i,unique2=457i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=913i,twothousand=913i,fivethous=4913i,tenthous=4913i,odd=26i,even=27i,stringu1="ZGAAAA",stringu2="PRAAAA",string4="HHHHxx" 39571200000000000 +tenk unique1=9466i,unique2=458i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=466i,twothousand=1466i,fivethous=4466i,tenthous=9466i,odd=132i,even=133i,stringu1="CAAAAA",stringu2="QRAAAA",string4="OOOOxx" 39657600000000000 +tenk unique1=7866i,unique2=459i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=866i,twothousand=1866i,fivethous=2866i,tenthous=7866i,odd=132i,even=133i,stringu1="OQAAAA",stringu2="RRAAAA",string4="VVVVxx" 39744000000000000 +tenk unique1=784i,unique2=460i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=784i,twothousand=784i,fivethous=784i,tenthous=784i,odd=168i,even=169i,stringu1="EEAAAA",stringu2="SRAAAA",string4="AAAAxx" 39830400000000000 +tenk unique1=9040i,unique2=461i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=40i,twothousand=1040i,fivethous=4040i,tenthous=9040i,odd=80i,even=81i,stringu1="SJAAAA",stringu2="TRAAAA",string4="HHHHxx" 39916800000000000 +tenk unique1=3954i,unique2=462i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=954i,twothousand=1954i,fivethous=3954i,tenthous=3954i,odd=108i,even=109i,stringu1="CWAAAA",stringu2="URAAAA",string4="OOOOxx" 40003200000000000 +tenk unique1=4183i,unique2=463i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=183i,twothousand=183i,fivethous=4183i,tenthous=4183i,odd=166i,even=167i,stringu1="XEAAAA",stringu2="VRAAAA",string4="VVVVxx" 40089600000000000 +tenk unique1=3608i,unique2=464i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=608i,twothousand=1608i,fivethous=3608i,tenthous=3608i,odd=16i,even=17i,stringu1="UIAAAA",stringu2="WRAAAA",string4="AAAAxx" 40176000000000000 +tenk unique1=7630i,unique2=465i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=630i,twothousand=1630i,fivethous=2630i,tenthous=7630i,odd=60i,even=61i,stringu1="MHAAAA",stringu2="XRAAAA",string4="HHHHxx" 40262400000000000 +tenk unique1=590i,unique2=466i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=590i,twothousand=590i,fivethous=590i,tenthous=590i,odd=180i,even=181i,stringu1="SWAAAA",stringu2="YRAAAA",string4="OOOOxx" 40348800000000000 +tenk unique1=3453i,unique2=467i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=453i,twothousand=1453i,fivethous=3453i,tenthous=3453i,odd=106i,even=107i,stringu1="VCAAAA",stringu2="ZRAAAA",string4="VVVVxx" 40435200000000000 +tenk unique1=7757i,unique2=468i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=757i,twothousand=1757i,fivethous=2757i,tenthous=7757i,odd=114i,even=115i,stringu1="JMAAAA",stringu2="ASAAAA",string4="AAAAxx" 40521600000000000 +tenk unique1=7394i,unique2=469i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=394i,twothousand=1394i,fivethous=2394i,tenthous=7394i,odd=188i,even=189i,stringu1="KYAAAA",stringu2="BSAAAA",string4="HHHHxx" 40608000000000000 +tenk unique1=396i,unique2=470i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=396i,twothousand=396i,fivethous=396i,tenthous=396i,odd=192i,even=193i,stringu1="GPAAAA",stringu2="CSAAAA",string4="OOOOxx" 40694400000000000 +tenk unique1=7873i,unique2=471i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=873i,twothousand=1873i,fivethous=2873i,tenthous=7873i,odd=146i,even=147i,stringu1="VQAAAA",stringu2="DSAAAA",string4="VVVVxx" 40780800000000000 +tenk unique1=1553i,unique2=472i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=553i,twothousand=1553i,fivethous=1553i,tenthous=1553i,odd=106i,even=107i,stringu1="THAAAA",stringu2="ESAAAA",string4="AAAAxx" 40867200000000000 +tenk unique1=598i,unique2=473i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=598i,twothousand=598i,fivethous=598i,tenthous=598i,odd=196i,even=197i,stringu1="AXAAAA",stringu2="FSAAAA",string4="HHHHxx" 40953600000000000 +tenk unique1=7191i,unique2=474i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=191i,twothousand=1191i,fivethous=2191i,tenthous=7191i,odd=182i,even=183i,stringu1="PQAAAA",stringu2="GSAAAA",string4="OOOOxx" 41040000000000000 +tenk unique1=8116i,unique2=475i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=116i,twothousand=116i,fivethous=3116i,tenthous=8116i,odd=32i,even=33i,stringu1="EAAAAA",stringu2="HSAAAA",string4="VVVVxx" 41126400000000000 +tenk unique1=2516i,unique2=476i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=516i,twothousand=516i,fivethous=2516i,tenthous=2516i,odd=32i,even=33i,stringu1="USAAAA",stringu2="ISAAAA",string4="AAAAxx" 41212800000000000 +tenk unique1=7750i,unique2=477i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=750i,twothousand=1750i,fivethous=2750i,tenthous=7750i,odd=100i,even=101i,stringu1="CMAAAA",stringu2="JSAAAA",string4="HHHHxx" 41299200000000000 +tenk unique1=6625i,unique2=478i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=625i,twothousand=625i,fivethous=1625i,tenthous=6625i,odd=50i,even=51i,stringu1="VUAAAA",stringu2="KSAAAA",string4="OOOOxx" 41385600000000000 +tenk unique1=8838i,unique2=479i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=838i,twothousand=838i,fivethous=3838i,tenthous=8838i,odd=76i,even=77i,stringu1="YBAAAA",stringu2="LSAAAA",string4="VVVVxx" 41472000000000000 +tenk unique1=4636i,unique2=480i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=636i,twothousand=636i,fivethous=4636i,tenthous=4636i,odd=72i,even=73i,stringu1="IWAAAA",stringu2="MSAAAA",string4="AAAAxx" 41558400000000000 +tenk unique1=7627i,unique2=481i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=627i,twothousand=1627i,fivethous=2627i,tenthous=7627i,odd=54i,even=55i,stringu1="JHAAAA",stringu2="NSAAAA",string4="HHHHxx" 41644800000000000 +tenk unique1=1690i,unique2=482i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=690i,twothousand=1690i,fivethous=1690i,tenthous=1690i,odd=180i,even=181i,stringu1="ANAAAA",stringu2="OSAAAA",string4="OOOOxx" 41731200000000000 +tenk unique1=7071i,unique2=483i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=71i,twothousand=1071i,fivethous=2071i,tenthous=7071i,odd=142i,even=143i,stringu1="ZLAAAA",stringu2="PSAAAA",string4="VVVVxx" 41817600000000000 +tenk unique1=2081i,unique2=484i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=81i,twothousand=81i,fivethous=2081i,tenthous=2081i,odd=162i,even=163i,stringu1="BCAAAA",stringu2="QSAAAA",string4="AAAAxx" 41904000000000000 +tenk unique1=7138i,unique2=485i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=138i,twothousand=1138i,fivethous=2138i,tenthous=7138i,odd=76i,even=77i,stringu1="OOAAAA",stringu2="RSAAAA",string4="HHHHxx" 41990400000000000 +tenk unique1=864i,unique2=486i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=864i,twothousand=864i,fivethous=864i,tenthous=864i,odd=128i,even=129i,stringu1="GHAAAA",stringu2="SSAAAA",string4="OOOOxx" 42076800000000000 +tenk unique1=6392i,unique2=487i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=392i,twothousand=392i,fivethous=1392i,tenthous=6392i,odd=184i,even=185i,stringu1="WLAAAA",stringu2="TSAAAA",string4="VVVVxx" 42163200000000000 +tenk unique1=7544i,unique2=488i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=544i,twothousand=1544i,fivethous=2544i,tenthous=7544i,odd=88i,even=89i,stringu1="EEAAAA",stringu2="USAAAA",string4="AAAAxx" 42249600000000000 +tenk unique1=5438i,unique2=489i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=438i,twothousand=1438i,fivethous=438i,tenthous=5438i,odd=76i,even=77i,stringu1="EBAAAA",stringu2="VSAAAA",string4="HHHHxx" 42336000000000000 +tenk unique1=7099i,unique2=490i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=99i,twothousand=1099i,fivethous=2099i,tenthous=7099i,odd=198i,even=199i,stringu1="BNAAAA",stringu2="WSAAAA",string4="OOOOxx" 42422400000000000 +tenk unique1=5157i,unique2=491i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=157i,twothousand=1157i,fivethous=157i,tenthous=5157i,odd=114i,even=115i,stringu1="JQAAAA",stringu2="XSAAAA",string4="VVVVxx" 42508800000000000 +tenk unique1=3391i,unique2=492i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=391i,twothousand=1391i,fivethous=3391i,tenthous=3391i,odd=182i,even=183i,stringu1="LAAAAA",stringu2="YSAAAA",string4="AAAAxx" 42595200000000000 +tenk unique1=3805i,unique2=493i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=805i,twothousand=1805i,fivethous=3805i,tenthous=3805i,odd=10i,even=11i,stringu1="JQAAAA",stringu2="ZSAAAA",string4="HHHHxx" 42681600000000000 +tenk unique1=2110i,unique2=494i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=110i,twothousand=110i,fivethous=2110i,tenthous=2110i,odd=20i,even=21i,stringu1="EDAAAA",stringu2="ATAAAA",string4="OOOOxx" 42768000000000000 +tenk unique1=3176i,unique2=495i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=176i,twothousand=1176i,fivethous=3176i,tenthous=3176i,odd=152i,even=153i,stringu1="ESAAAA",stringu2="BTAAAA",string4="VVVVxx" 42854400000000000 +tenk unique1=5918i,unique2=496i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=918i,twothousand=1918i,fivethous=918i,tenthous=5918i,odd=36i,even=37i,stringu1="QTAAAA",stringu2="CTAAAA",string4="AAAAxx" 42940800000000000 +tenk unique1=1218i,unique2=497i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=218i,twothousand=1218i,fivethous=1218i,tenthous=1218i,odd=36i,even=37i,stringu1="WUAAAA",stringu2="DTAAAA",string4="HHHHxx" 43027200000000000 +tenk unique1=6683i,unique2=498i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=683i,twothousand=683i,fivethous=1683i,tenthous=6683i,odd=166i,even=167i,stringu1="BXAAAA",stringu2="ETAAAA",string4="OOOOxx" 43113600000000000 +tenk unique1=914i,unique2=499i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=914i,twothousand=914i,fivethous=914i,tenthous=914i,odd=28i,even=29i,stringu1="EJAAAA",stringu2="FTAAAA",string4="VVVVxx" 43200000000000000 +tenk unique1=4737i,unique2=500i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=737i,twothousand=737i,fivethous=4737i,tenthous=4737i,odd=74i,even=75i,stringu1="FAAAAA",stringu2="GTAAAA",string4="AAAAxx" 43286400000000000 +tenk unique1=7286i,unique2=501i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=286i,twothousand=1286i,fivethous=2286i,tenthous=7286i,odd=172i,even=173i,stringu1="GUAAAA",stringu2="HTAAAA",string4="HHHHxx" 43372800000000000 +tenk unique1=9975i,unique2=502i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=975i,twothousand=1975i,fivethous=4975i,tenthous=9975i,odd=150i,even=151i,stringu1="RTAAAA",stringu2="ITAAAA",string4="OOOOxx" 43459200000000000 +tenk unique1=8030i,unique2=503i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=30i,twothousand=30i,fivethous=3030i,tenthous=8030i,odd=60i,even=61i,stringu1="WWAAAA",stringu2="JTAAAA",string4="VVVVxx" 43545600000000000 +tenk unique1=7364i,unique2=504i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=364i,twothousand=1364i,fivethous=2364i,tenthous=7364i,odd=128i,even=129i,stringu1="GXAAAA",stringu2="KTAAAA",string4="AAAAxx" 43632000000000000 +tenk unique1=1389i,unique2=505i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=389i,twothousand=1389i,fivethous=1389i,tenthous=1389i,odd=178i,even=179i,stringu1="LBAAAA",stringu2="LTAAAA",string4="HHHHxx" 43718400000000000 +tenk unique1=4025i,unique2=506i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=25i,twothousand=25i,fivethous=4025i,tenthous=4025i,odd=50i,even=51i,stringu1="VYAAAA",stringu2="MTAAAA",string4="OOOOxx" 43804800000000000 +tenk unique1=4835i,unique2=507i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=835i,twothousand=835i,fivethous=4835i,tenthous=4835i,odd=70i,even=71i,stringu1="ZDAAAA",stringu2="NTAAAA",string4="VVVVxx" 43891200000000000 +tenk unique1=8045i,unique2=508i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=45i,twothousand=45i,fivethous=3045i,tenthous=8045i,odd=90i,even=91i,stringu1="LXAAAA",stringu2="OTAAAA",string4="AAAAxx" 43977600000000000 +tenk unique1=1864i,unique2=509i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=864i,twothousand=1864i,fivethous=1864i,tenthous=1864i,odd=128i,even=129i,stringu1="STAAAA",stringu2="PTAAAA",string4="HHHHxx" 44064000000000000 +tenk unique1=3313i,unique2=510i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=313i,twothousand=1313i,fivethous=3313i,tenthous=3313i,odd=26i,even=27i,stringu1="LXAAAA",stringu2="QTAAAA",string4="OOOOxx" 44150400000000000 +tenk unique1=2384i,unique2=511i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=384i,twothousand=384i,fivethous=2384i,tenthous=2384i,odd=168i,even=169i,stringu1="SNAAAA",stringu2="RTAAAA",string4="VVVVxx" 44236800000000000 +tenk unique1=6115i,unique2=512i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=115i,twothousand=115i,fivethous=1115i,tenthous=6115i,odd=30i,even=31i,stringu1="FBAAAA",stringu2="STAAAA",string4="AAAAxx" 44323200000000000 +tenk unique1=5705i,unique2=513i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=705i,twothousand=1705i,fivethous=705i,tenthous=5705i,odd=10i,even=11i,stringu1="LLAAAA",stringu2="TTAAAA",string4="HHHHxx" 44409600000000000 +tenk unique1=9269i,unique2=514i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=269i,twothousand=1269i,fivethous=4269i,tenthous=9269i,odd=138i,even=139i,stringu1="NSAAAA",stringu2="UTAAAA",string4="OOOOxx" 44496000000000000 +tenk unique1=3379i,unique2=515i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=379i,twothousand=1379i,fivethous=3379i,tenthous=3379i,odd=158i,even=159i,stringu1="ZZAAAA",stringu2="VTAAAA",string4="VVVVxx" 44582400000000000 +tenk unique1=8205i,unique2=516i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=205i,twothousand=205i,fivethous=3205i,tenthous=8205i,odd=10i,even=11i,stringu1="PDAAAA",stringu2="WTAAAA",string4="AAAAxx" 44668800000000000 +tenk unique1=6575i,unique2=517i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=575i,twothousand=575i,fivethous=1575i,tenthous=6575i,odd=150i,even=151i,stringu1="XSAAAA",stringu2="XTAAAA",string4="HHHHxx" 44755200000000000 +tenk unique1=486i,unique2=518i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=486i,twothousand=486i,fivethous=486i,tenthous=486i,odd=172i,even=173i,stringu1="SSAAAA",stringu2="YTAAAA",string4="OOOOxx" 44841600000000000 +tenk unique1=4894i,unique2=519i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=894i,twothousand=894i,fivethous=4894i,tenthous=4894i,odd=188i,even=189i,stringu1="GGAAAA",stringu2="ZTAAAA",string4="VVVVxx" 44928000000000000 +tenk unique1=3090i,unique2=520i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=90i,twothousand=1090i,fivethous=3090i,tenthous=3090i,odd=180i,even=181i,stringu1="WOAAAA",stringu2="AUAAAA",string4="AAAAxx" 45014400000000000 +tenk unique1=759i,unique2=521i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=759i,twothousand=759i,fivethous=759i,tenthous=759i,odd=118i,even=119i,stringu1="FDAAAA",stringu2="BUAAAA",string4="HHHHxx" 45100800000000000 +tenk unique1=4864i,unique2=522i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=864i,twothousand=864i,fivethous=4864i,tenthous=4864i,odd=128i,even=129i,stringu1="CFAAAA",stringu2="CUAAAA",string4="OOOOxx" 45187200000000000 +tenk unique1=4083i,unique2=523i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=83i,twothousand=83i,fivethous=4083i,tenthous=4083i,odd=166i,even=167i,stringu1="BBAAAA",stringu2="DUAAAA",string4="VVVVxx" 45273600000000000 +tenk unique1=6918i,unique2=524i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=918i,twothousand=918i,fivethous=1918i,tenthous=6918i,odd=36i,even=37i,stringu1="CGAAAA",stringu2="EUAAAA",string4="AAAAxx" 45360000000000000 +tenk unique1=8146i,unique2=525i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=146i,twothousand=146i,fivethous=3146i,tenthous=8146i,odd=92i,even=93i,stringu1="IBAAAA",stringu2="FUAAAA",string4="HHHHxx" 45446400000000000 +tenk unique1=1523i,unique2=526i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=523i,twothousand=1523i,fivethous=1523i,tenthous=1523i,odd=46i,even=47i,stringu1="PGAAAA",stringu2="GUAAAA",string4="OOOOxx" 45532800000000000 +tenk unique1=1591i,unique2=527i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=591i,twothousand=1591i,fivethous=1591i,tenthous=1591i,odd=182i,even=183i,stringu1="FJAAAA",stringu2="HUAAAA",string4="VVVVxx" 45619200000000000 +tenk unique1=3343i,unique2=528i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=343i,twothousand=1343i,fivethous=3343i,tenthous=3343i,odd=86i,even=87i,stringu1="PYAAAA",stringu2="IUAAAA",string4="AAAAxx" 45705600000000000 +tenk unique1=1391i,unique2=529i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=391i,twothousand=1391i,fivethous=1391i,tenthous=1391i,odd=182i,even=183i,stringu1="NBAAAA",stringu2="JUAAAA",string4="HHHHxx" 45792000000000000 +tenk unique1=9963i,unique2=530i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=963i,twothousand=1963i,fivethous=4963i,tenthous=9963i,odd=126i,even=127i,stringu1="FTAAAA",stringu2="KUAAAA",string4="OOOOxx" 45878400000000000 +tenk unique1=2423i,unique2=531i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=423i,twothousand=423i,fivethous=2423i,tenthous=2423i,odd=46i,even=47i,stringu1="FPAAAA",stringu2="LUAAAA",string4="VVVVxx" 45964800000000000 +tenk unique1=1822i,unique2=532i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=822i,twothousand=1822i,fivethous=1822i,tenthous=1822i,odd=44i,even=45i,stringu1="CSAAAA",stringu2="MUAAAA",string4="AAAAxx" 46051200000000000 +tenk unique1=8706i,unique2=533i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=706i,twothousand=706i,fivethous=3706i,tenthous=8706i,odd=12i,even=13i,stringu1="WWAAAA",stringu2="NUAAAA",string4="HHHHxx" 46137600000000000 +tenk unique1=3001i,unique2=534i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1001i,fivethous=3001i,tenthous=3001i,odd=2i,even=3i,stringu1="LLAAAA",stringu2="OUAAAA",string4="OOOOxx" 46224000000000000 +tenk unique1=6707i,unique2=535i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=707i,twothousand=707i,fivethous=1707i,tenthous=6707i,odd=14i,even=15i,stringu1="ZXAAAA",stringu2="PUAAAA",string4="VVVVxx" 46310400000000000 +tenk unique1=2121i,unique2=536i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=121i,twothousand=121i,fivethous=2121i,tenthous=2121i,odd=42i,even=43i,stringu1="PDAAAA",stringu2="QUAAAA",string4="AAAAxx" 46396800000000000 +tenk unique1=5814i,unique2=537i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=814i,twothousand=1814i,fivethous=814i,tenthous=5814i,odd=28i,even=29i,stringu1="QPAAAA",stringu2="RUAAAA",string4="HHHHxx" 46483200000000000 +tenk unique1=2659i,unique2=538i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=659i,twothousand=659i,fivethous=2659i,tenthous=2659i,odd=118i,even=119i,stringu1="HYAAAA",stringu2="SUAAAA",string4="OOOOxx" 46569600000000000 +tenk unique1=2016i,unique2=539i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=16i,twothousand=16i,fivethous=2016i,tenthous=2016i,odd=32i,even=33i,stringu1="OZAAAA",stringu2="TUAAAA",string4="VVVVxx" 46656000000000000 +tenk unique1=4286i,unique2=540i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=286i,twothousand=286i,fivethous=4286i,tenthous=4286i,odd=172i,even=173i,stringu1="WIAAAA",stringu2="UUAAAA",string4="AAAAxx" 46742400000000000 +tenk unique1=9205i,unique2=541i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=205i,twothousand=1205i,fivethous=4205i,tenthous=9205i,odd=10i,even=11i,stringu1="BQAAAA",stringu2="VUAAAA",string4="HHHHxx" 46828800000000000 +tenk unique1=3496i,unique2=542i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=496i,twothousand=1496i,fivethous=3496i,tenthous=3496i,odd=192i,even=193i,stringu1="MEAAAA",stringu2="WUAAAA",string4="OOOOxx" 46915200000000000 +tenk unique1=5333i,unique2=543i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=333i,twothousand=1333i,fivethous=333i,tenthous=5333i,odd=66i,even=67i,stringu1="DXAAAA",stringu2="XUAAAA",string4="VVVVxx" 47001600000000000 +tenk unique1=5571i,unique2=544i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=571i,twothousand=1571i,fivethous=571i,tenthous=5571i,odd=142i,even=143i,stringu1="HGAAAA",stringu2="YUAAAA",string4="AAAAxx" 47088000000000000 +tenk unique1=1696i,unique2=545i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=696i,twothousand=1696i,fivethous=1696i,tenthous=1696i,odd=192i,even=193i,stringu1="GNAAAA",stringu2="ZUAAAA",string4="HHHHxx" 47174400000000000 +tenk unique1=4871i,unique2=546i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=871i,twothousand=871i,fivethous=4871i,tenthous=4871i,odd=142i,even=143i,stringu1="JFAAAA",stringu2="AVAAAA",string4="OOOOxx" 47260800000000000 +tenk unique1=4852i,unique2=547i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=852i,twothousand=852i,fivethous=4852i,tenthous=4852i,odd=104i,even=105i,stringu1="QEAAAA",stringu2="BVAAAA",string4="VVVVxx" 47347200000000000 +tenk unique1=8483i,unique2=548i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=483i,twothousand=483i,fivethous=3483i,tenthous=8483i,odd=166i,even=167i,stringu1="HOAAAA",stringu2="CVAAAA",string4="AAAAxx" 47433600000000000 +tenk unique1=1376i,unique2=549i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=376i,twothousand=1376i,fivethous=1376i,tenthous=1376i,odd=152i,even=153i,stringu1="YAAAAA",stringu2="DVAAAA",string4="HHHHxx" 47520000000000000 +tenk unique1=5456i,unique2=550i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=456i,twothousand=1456i,fivethous=456i,tenthous=5456i,odd=112i,even=113i,stringu1="WBAAAA",stringu2="EVAAAA",string4="OOOOxx" 47606400000000000 +tenk unique1=499i,unique2=551i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=499i,twothousand=499i,fivethous=499i,tenthous=499i,odd=198i,even=199i,stringu1="FTAAAA",stringu2="FVAAAA",string4="VVVVxx" 47692800000000000 +tenk unique1=3463i,unique2=552i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=463i,twothousand=1463i,fivethous=3463i,tenthous=3463i,odd=126i,even=127i,stringu1="FDAAAA",stringu2="GVAAAA",string4="AAAAxx" 47779200000000000 +tenk unique1=7426i,unique2=553i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=426i,twothousand=1426i,fivethous=2426i,tenthous=7426i,odd=52i,even=53i,stringu1="QZAAAA",stringu2="HVAAAA",string4="HHHHxx" 47865600000000000 +tenk unique1=5341i,unique2=554i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=341i,twothousand=1341i,fivethous=341i,tenthous=5341i,odd=82i,even=83i,stringu1="LXAAAA",stringu2="IVAAAA",string4="OOOOxx" 47952000000000000 +tenk unique1=9309i,unique2=555i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=309i,twothousand=1309i,fivethous=4309i,tenthous=9309i,odd=18i,even=19i,stringu1="BUAAAA",stringu2="JVAAAA",string4="VVVVxx" 48038400000000000 +tenk unique1=2055i,unique2=556i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=55i,twothousand=55i,fivethous=2055i,tenthous=2055i,odd=110i,even=111i,stringu1="BBAAAA",stringu2="KVAAAA",string4="AAAAxx" 48124800000000000 +tenk unique1=2199i,unique2=557i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=199i,twothousand=199i,fivethous=2199i,tenthous=2199i,odd=198i,even=199i,stringu1="PGAAAA",stringu2="LVAAAA",string4="HHHHxx" 48211200000000000 +tenk unique1=7235i,unique2=558i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=235i,twothousand=1235i,fivethous=2235i,tenthous=7235i,odd=70i,even=71i,stringu1="HSAAAA",stringu2="MVAAAA",string4="OOOOxx" 48297600000000000 +tenk unique1=8661i,unique2=559i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=661i,twothousand=661i,fivethous=3661i,tenthous=8661i,odd=122i,even=123i,stringu1="DVAAAA",stringu2="NVAAAA",string4="VVVVxx" 48384000000000000 +tenk unique1=9494i,unique2=560i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=494i,twothousand=1494i,fivethous=4494i,tenthous=9494i,odd=188i,even=189i,stringu1="EBAAAA",stringu2="OVAAAA",string4="AAAAxx" 48470400000000000 +tenk unique1=935i,unique2=561i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=935i,twothousand=935i,fivethous=935i,tenthous=935i,odd=70i,even=71i,stringu1="ZJAAAA",stringu2="PVAAAA",string4="HHHHxx" 48556800000000000 +tenk unique1=7044i,unique2=562i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=44i,twothousand=1044i,fivethous=2044i,tenthous=7044i,odd=88i,even=89i,stringu1="YKAAAA",stringu2="QVAAAA",string4="OOOOxx" 48643200000000000 +tenk unique1=1974i,unique2=563i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=974i,twothousand=1974i,fivethous=1974i,tenthous=1974i,odd=148i,even=149i,stringu1="YXAAAA",stringu2="RVAAAA",string4="VVVVxx" 48729600000000000 +tenk unique1=9679i,unique2=564i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=679i,twothousand=1679i,fivethous=4679i,tenthous=9679i,odd=158i,even=159i,stringu1="HIAAAA",stringu2="SVAAAA",string4="AAAAxx" 48816000000000000 +tenk unique1=9822i,unique2=565i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=822i,twothousand=1822i,fivethous=4822i,tenthous=9822i,odd=44i,even=45i,stringu1="UNAAAA",stringu2="TVAAAA",string4="HHHHxx" 48902400000000000 +tenk unique1=4088i,unique2=566i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=88i,twothousand=88i,fivethous=4088i,tenthous=4088i,odd=176i,even=177i,stringu1="GBAAAA",stringu2="UVAAAA",string4="OOOOxx" 48988800000000000 +tenk unique1=1749i,unique2=567i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=749i,twothousand=1749i,fivethous=1749i,tenthous=1749i,odd=98i,even=99i,stringu1="HPAAAA",stringu2="VVAAAA",string4="VVVVxx" 49075200000000000 +tenk unique1=2116i,unique2=568i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=116i,twothousand=116i,fivethous=2116i,tenthous=2116i,odd=32i,even=33i,stringu1="KDAAAA",stringu2="WVAAAA",string4="AAAAxx" 49161600000000000 +tenk unique1=976i,unique2=569i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=976i,twothousand=976i,fivethous=976i,tenthous=976i,odd=152i,even=153i,stringu1="OLAAAA",stringu2="XVAAAA",string4="HHHHxx" 49248000000000000 +tenk unique1=8689i,unique2=570i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=689i,twothousand=689i,fivethous=3689i,tenthous=8689i,odd=178i,even=179i,stringu1="FWAAAA",stringu2="YVAAAA",string4="OOOOxx" 49334400000000000 +tenk unique1=2563i,unique2=571i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=563i,twothousand=563i,fivethous=2563i,tenthous=2563i,odd=126i,even=127i,stringu1="PUAAAA",stringu2="ZVAAAA",string4="VVVVxx" 49420800000000000 +tenk unique1=7195i,unique2=572i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=195i,twothousand=1195i,fivethous=2195i,tenthous=7195i,odd=190i,even=191i,stringu1="TQAAAA",stringu2="AWAAAA",string4="AAAAxx" 49507200000000000 +tenk unique1=9985i,unique2=573i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=985i,twothousand=1985i,fivethous=4985i,tenthous=9985i,odd=170i,even=171i,stringu1="BUAAAA",stringu2="BWAAAA",string4="HHHHxx" 49593600000000000 +tenk unique1=7699i,unique2=574i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=699i,twothousand=1699i,fivethous=2699i,tenthous=7699i,odd=198i,even=199i,stringu1="DKAAAA",stringu2="CWAAAA",string4="OOOOxx" 49680000000000000 +tenk unique1=5311i,unique2=575i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=311i,twothousand=1311i,fivethous=311i,tenthous=5311i,odd=22i,even=23i,stringu1="HWAAAA",stringu2="DWAAAA",string4="VVVVxx" 49766400000000000 +tenk unique1=295i,unique2=576i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=295i,twothousand=295i,fivethous=295i,tenthous=295i,odd=190i,even=191i,stringu1="JLAAAA",stringu2="EWAAAA",string4="AAAAxx" 49852800000000000 +tenk unique1=8214i,unique2=577i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=214i,twothousand=214i,fivethous=3214i,tenthous=8214i,odd=28i,even=29i,stringu1="YDAAAA",stringu2="FWAAAA",string4="HHHHxx" 49939200000000000 +tenk unique1=3275i,unique2=578i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=275i,twothousand=1275i,fivethous=3275i,tenthous=3275i,odd=150i,even=151i,stringu1="ZVAAAA",stringu2="GWAAAA",string4="OOOOxx" 50025600000000000 +tenk unique1=9646i,unique2=579i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=646i,twothousand=1646i,fivethous=4646i,tenthous=9646i,odd=92i,even=93i,stringu1="AHAAAA",stringu2="HWAAAA",string4="VVVVxx" 50112000000000000 +tenk unique1=1908i,unique2=580i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=908i,twothousand=1908i,fivethous=1908i,tenthous=1908i,odd=16i,even=17i,stringu1="KVAAAA",stringu2="IWAAAA",string4="AAAAxx" 50198400000000000 +tenk unique1=3858i,unique2=581i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=858i,twothousand=1858i,fivethous=3858i,tenthous=3858i,odd=116i,even=117i,stringu1="KSAAAA",stringu2="JWAAAA",string4="HHHHxx" 50284800000000000 +tenk unique1=9362i,unique2=582i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=362i,twothousand=1362i,fivethous=4362i,tenthous=9362i,odd=124i,even=125i,stringu1="CWAAAA",stringu2="KWAAAA",string4="OOOOxx" 50371200000000000 +tenk unique1=9307i,unique2=583i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=307i,twothousand=1307i,fivethous=4307i,tenthous=9307i,odd=14i,even=15i,stringu1="ZTAAAA",stringu2="LWAAAA",string4="VVVVxx" 50457600000000000 +tenk unique1=6124i,unique2=584i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=124i,twothousand=124i,fivethous=1124i,tenthous=6124i,odd=48i,even=49i,stringu1="OBAAAA",stringu2="MWAAAA",string4="AAAAxx" 50544000000000000 +tenk unique1=2405i,unique2=585i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=405i,twothousand=405i,fivethous=2405i,tenthous=2405i,odd=10i,even=11i,stringu1="NOAAAA",stringu2="NWAAAA",string4="HHHHxx" 50630400000000000 +tenk unique1=8422i,unique2=586i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=422i,twothousand=422i,fivethous=3422i,tenthous=8422i,odd=44i,even=45i,stringu1="YLAAAA",stringu2="OWAAAA",string4="OOOOxx" 50716800000000000 +tenk unique1=393i,unique2=587i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=393i,twothousand=393i,fivethous=393i,tenthous=393i,odd=186i,even=187i,stringu1="DPAAAA",stringu2="PWAAAA",string4="VVVVxx" 50803200000000000 +tenk unique1=8973i,unique2=588i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=973i,twothousand=973i,fivethous=3973i,tenthous=8973i,odd=146i,even=147i,stringu1="DHAAAA",stringu2="QWAAAA",string4="AAAAxx" 50889600000000000 +tenk unique1=5171i,unique2=589i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=171i,twothousand=1171i,fivethous=171i,tenthous=5171i,odd=142i,even=143i,stringu1="XQAAAA",stringu2="RWAAAA",string4="HHHHxx" 50976000000000000 +tenk unique1=4929i,unique2=590i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=929i,twothousand=929i,fivethous=4929i,tenthous=4929i,odd=58i,even=59i,stringu1="PHAAAA",stringu2="SWAAAA",string4="OOOOxx" 51062400000000000 +tenk unique1=6935i,unique2=591i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=935i,twothousand=935i,fivethous=1935i,tenthous=6935i,odd=70i,even=71i,stringu1="TGAAAA",stringu2="TWAAAA",string4="VVVVxx" 51148800000000000 +tenk unique1=8584i,unique2=592i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=584i,twothousand=584i,fivethous=3584i,tenthous=8584i,odd=168i,even=169i,stringu1="ESAAAA",stringu2="UWAAAA",string4="AAAAxx" 51235200000000000 +tenk unique1=1035i,unique2=593i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=35i,twothousand=1035i,fivethous=1035i,tenthous=1035i,odd=70i,even=71i,stringu1="VNAAAA",stringu2="VWAAAA",string4="HHHHxx" 51321600000000000 +tenk unique1=3734i,unique2=594i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=734i,twothousand=1734i,fivethous=3734i,tenthous=3734i,odd=68i,even=69i,stringu1="QNAAAA",stringu2="WWAAAA",string4="OOOOxx" 51408000000000000 +tenk unique1=1458i,unique2=595i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=458i,twothousand=1458i,fivethous=1458i,tenthous=1458i,odd=116i,even=117i,stringu1="CEAAAA",stringu2="XWAAAA",string4="VVVVxx" 51494400000000000 +tenk unique1=8746i,unique2=596i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=746i,twothousand=746i,fivethous=3746i,tenthous=8746i,odd=92i,even=93i,stringu1="KYAAAA",stringu2="YWAAAA",string4="AAAAxx" 51580800000000000 +tenk unique1=1677i,unique2=597i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=677i,twothousand=1677i,fivethous=1677i,tenthous=1677i,odd=154i,even=155i,stringu1="NMAAAA",stringu2="ZWAAAA",string4="HHHHxx" 51667200000000000 +tenk unique1=8502i,unique2=598i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=502i,twothousand=502i,fivethous=3502i,tenthous=8502i,odd=4i,even=5i,stringu1="APAAAA",stringu2="AXAAAA",string4="OOOOxx" 51753600000000000 +tenk unique1=7752i,unique2=599i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=752i,twothousand=1752i,fivethous=2752i,tenthous=7752i,odd=104i,even=105i,stringu1="EMAAAA",stringu2="BXAAAA",string4="VVVVxx" 51840000000000000 +tenk unique1=2556i,unique2=600i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=556i,twothousand=556i,fivethous=2556i,tenthous=2556i,odd=112i,even=113i,stringu1="IUAAAA",stringu2="CXAAAA",string4="AAAAxx" 51926400000000000 +tenk unique1=6426i,unique2=601i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=426i,twothousand=426i,fivethous=1426i,tenthous=6426i,odd=52i,even=53i,stringu1="ENAAAA",stringu2="DXAAAA",string4="HHHHxx" 52012800000000000 +tenk unique1=8420i,unique2=602i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=420i,twothousand=420i,fivethous=3420i,tenthous=8420i,odd=40i,even=41i,stringu1="WLAAAA",stringu2="EXAAAA",string4="OOOOxx" 52099200000000000 +tenk unique1=4462i,unique2=603i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=462i,twothousand=462i,fivethous=4462i,tenthous=4462i,odd=124i,even=125i,stringu1="QPAAAA",stringu2="FXAAAA",string4="VVVVxx" 52185600000000000 +tenk unique1=1378i,unique2=604i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=378i,twothousand=1378i,fivethous=1378i,tenthous=1378i,odd=156i,even=157i,stringu1="ABAAAA",stringu2="GXAAAA",string4="AAAAxx" 52272000000000000 +tenk unique1=1387i,unique2=605i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=387i,twothousand=1387i,fivethous=1387i,tenthous=1387i,odd=174i,even=175i,stringu1="JBAAAA",stringu2="HXAAAA",string4="HHHHxx" 52358400000000000 +tenk unique1=8094i,unique2=606i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=94i,twothousand=94i,fivethous=3094i,tenthous=8094i,odd=188i,even=189i,stringu1="IZAAAA",stringu2="IXAAAA",string4="OOOOxx" 52444800000000000 +tenk unique1=7247i,unique2=607i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=247i,twothousand=1247i,fivethous=2247i,tenthous=7247i,odd=94i,even=95i,stringu1="TSAAAA",stringu2="JXAAAA",string4="VVVVxx" 52531200000000000 +tenk unique1=4261i,unique2=608i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=261i,twothousand=261i,fivethous=4261i,tenthous=4261i,odd=122i,even=123i,stringu1="XHAAAA",stringu2="KXAAAA",string4="AAAAxx" 52617600000000000 +tenk unique1=5029i,unique2=609i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=29i,twothousand=1029i,fivethous=29i,tenthous=5029i,odd=58i,even=59i,stringu1="LLAAAA",stringu2="LXAAAA",string4="HHHHxx" 52704000000000000 +tenk unique1=3625i,unique2=610i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=625i,twothousand=1625i,fivethous=3625i,tenthous=3625i,odd=50i,even=51i,stringu1="LJAAAA",stringu2="MXAAAA",string4="OOOOxx" 52790400000000000 +tenk unique1=8068i,unique2=611i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=68i,twothousand=68i,fivethous=3068i,tenthous=8068i,odd=136i,even=137i,stringu1="IYAAAA",stringu2="NXAAAA",string4="VVVVxx" 52876800000000000 +tenk unique1=102i,unique2=612i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=102i,twothousand=102i,fivethous=102i,tenthous=102i,odd=4i,even=5i,stringu1="YDAAAA",stringu2="OXAAAA",string4="AAAAxx" 52963200000000000 +tenk unique1=5596i,unique2=613i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=596i,twothousand=1596i,fivethous=596i,tenthous=5596i,odd=192i,even=193i,stringu1="GHAAAA",stringu2="PXAAAA",string4="HHHHxx" 53049600000000000 +tenk unique1=5872i,unique2=614i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=872i,twothousand=1872i,fivethous=872i,tenthous=5872i,odd=144i,even=145i,stringu1="WRAAAA",stringu2="QXAAAA",string4="OOOOxx" 53136000000000000 +tenk unique1=4742i,unique2=615i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=742i,twothousand=742i,fivethous=4742i,tenthous=4742i,odd=84i,even=85i,stringu1="KAAAAA",stringu2="RXAAAA",string4="VVVVxx" 53222400000000000 +tenk unique1=2117i,unique2=616i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=117i,twothousand=117i,fivethous=2117i,tenthous=2117i,odd=34i,even=35i,stringu1="LDAAAA",stringu2="SXAAAA",string4="AAAAxx" 53308800000000000 +tenk unique1=3945i,unique2=617i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=945i,twothousand=1945i,fivethous=3945i,tenthous=3945i,odd=90i,even=91i,stringu1="TVAAAA",stringu2="TXAAAA",string4="HHHHxx" 53395200000000000 +tenk unique1=7483i,unique2=618i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=483i,twothousand=1483i,fivethous=2483i,tenthous=7483i,odd=166i,even=167i,stringu1="VBAAAA",stringu2="UXAAAA",string4="OOOOxx" 53481600000000000 +tenk unique1=4455i,unique2=619i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=455i,twothousand=455i,fivethous=4455i,tenthous=4455i,odd=110i,even=111i,stringu1="JPAAAA",stringu2="VXAAAA",string4="VVVVxx" 53568000000000000 +tenk unique1=609i,unique2=620i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=609i,twothousand=609i,fivethous=609i,tenthous=609i,odd=18i,even=19i,stringu1="LXAAAA",stringu2="WXAAAA",string4="AAAAxx" 53654400000000000 +tenk unique1=9829i,unique2=621i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=829i,twothousand=1829i,fivethous=4829i,tenthous=9829i,odd=58i,even=59i,stringu1="BOAAAA",stringu2="XXAAAA",string4="HHHHxx" 53740800000000000 +tenk unique1=4857i,unique2=622i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=857i,twothousand=857i,fivethous=4857i,tenthous=4857i,odd=114i,even=115i,stringu1="VEAAAA",stringu2="YXAAAA",string4="OOOOxx" 53827200000000000 +tenk unique1=3314i,unique2=623i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=314i,twothousand=1314i,fivethous=3314i,tenthous=3314i,odd=28i,even=29i,stringu1="MXAAAA",stringu2="ZXAAAA",string4="VVVVxx" 53913600000000000 +tenk unique1=5353i,unique2=624i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=353i,twothousand=1353i,fivethous=353i,tenthous=5353i,odd=106i,even=107i,stringu1="XXAAAA",stringu2="AYAAAA",string4="AAAAxx" 54000000000000000 +tenk unique1=4909i,unique2=625i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=909i,twothousand=909i,fivethous=4909i,tenthous=4909i,odd=18i,even=19i,stringu1="VGAAAA",stringu2="BYAAAA",string4="HHHHxx" 54086400000000000 +tenk unique1=7597i,unique2=626i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=597i,twothousand=1597i,fivethous=2597i,tenthous=7597i,odd=194i,even=195i,stringu1="FGAAAA",stringu2="CYAAAA",string4="OOOOxx" 54172800000000000 +tenk unique1=2683i,unique2=627i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=683i,twothousand=683i,fivethous=2683i,tenthous=2683i,odd=166i,even=167i,stringu1="FZAAAA",stringu2="DYAAAA",string4="VVVVxx" 54259200000000000 +tenk unique1=3223i,unique2=628i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=223i,twothousand=1223i,fivethous=3223i,tenthous=3223i,odd=46i,even=47i,stringu1="ZTAAAA",stringu2="EYAAAA",string4="AAAAxx" 54345600000000000 +tenk unique1=5363i,unique2=629i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=363i,twothousand=1363i,fivethous=363i,tenthous=5363i,odd=126i,even=127i,stringu1="HYAAAA",stringu2="FYAAAA",string4="HHHHxx" 54432000000000000 +tenk unique1=4578i,unique2=630i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=578i,twothousand=578i,fivethous=4578i,tenthous=4578i,odd=156i,even=157i,stringu1="CUAAAA",stringu2="GYAAAA",string4="OOOOxx" 54518400000000000 +tenk unique1=5544i,unique2=631i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=544i,twothousand=1544i,fivethous=544i,tenthous=5544i,odd=88i,even=89i,stringu1="GFAAAA",stringu2="HYAAAA",string4="VVVVxx" 54604800000000000 +tenk unique1=1589i,unique2=632i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=589i,twothousand=1589i,fivethous=1589i,tenthous=1589i,odd=178i,even=179i,stringu1="DJAAAA",stringu2="IYAAAA",string4="AAAAxx" 54691200000000000 +tenk unique1=7412i,unique2=633i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=412i,twothousand=1412i,fivethous=2412i,tenthous=7412i,odd=24i,even=25i,stringu1="CZAAAA",stringu2="JYAAAA",string4="HHHHxx" 54777600000000000 +tenk unique1=3803i,unique2=634i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=803i,twothousand=1803i,fivethous=3803i,tenthous=3803i,odd=6i,even=7i,stringu1="HQAAAA",stringu2="KYAAAA",string4="OOOOxx" 54864000000000000 +tenk unique1=6179i,unique2=635i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=179i,twothousand=179i,fivethous=1179i,tenthous=6179i,odd=158i,even=159i,stringu1="RDAAAA",stringu2="LYAAAA",string4="VVVVxx" 54950400000000000 +tenk unique1=5588i,unique2=636i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=588i,twothousand=1588i,fivethous=588i,tenthous=5588i,odd=176i,even=177i,stringu1="YGAAAA",stringu2="MYAAAA",string4="AAAAxx" 55036800000000000 +tenk unique1=2134i,unique2=637i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=134i,twothousand=134i,fivethous=2134i,tenthous=2134i,odd=68i,even=69i,stringu1="CEAAAA",stringu2="NYAAAA",string4="HHHHxx" 55123200000000000 +tenk unique1=4383i,unique2=638i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=383i,twothousand=383i,fivethous=4383i,tenthous=4383i,odd=166i,even=167i,stringu1="PMAAAA",stringu2="OYAAAA",string4="OOOOxx" 55209600000000000 +tenk unique1=6995i,unique2=639i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=995i,twothousand=995i,fivethous=1995i,tenthous=6995i,odd=190i,even=191i,stringu1="BJAAAA",stringu2="PYAAAA",string4="VVVVxx" 55296000000000000 +tenk unique1=6598i,unique2=640i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=598i,twothousand=598i,fivethous=1598i,tenthous=6598i,odd=196i,even=197i,stringu1="UTAAAA",stringu2="QYAAAA",string4="AAAAxx" 55382400000000000 +tenk unique1=8731i,unique2=641i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=731i,twothousand=731i,fivethous=3731i,tenthous=8731i,odd=62i,even=63i,stringu1="VXAAAA",stringu2="RYAAAA",string4="HHHHxx" 55468800000000000 +tenk unique1=7177i,unique2=642i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=177i,twothousand=1177i,fivethous=2177i,tenthous=7177i,odd=154i,even=155i,stringu1="BQAAAA",stringu2="SYAAAA",string4="OOOOxx" 55555200000000000 +tenk unique1=6578i,unique2=643i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=578i,twothousand=578i,fivethous=1578i,tenthous=6578i,odd=156i,even=157i,stringu1="ATAAAA",stringu2="TYAAAA",string4="VVVVxx" 55641600000000000 +tenk unique1=9393i,unique2=644i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=393i,twothousand=1393i,fivethous=4393i,tenthous=9393i,odd=186i,even=187i,stringu1="HXAAAA",stringu2="UYAAAA",string4="AAAAxx" 55728000000000000 +tenk unique1=1276i,unique2=645i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=276i,twothousand=1276i,fivethous=1276i,tenthous=1276i,odd=152i,even=153i,stringu1="CXAAAA",stringu2="VYAAAA",string4="HHHHxx" 55814400000000000 +tenk unique1=8766i,unique2=646i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=766i,twothousand=766i,fivethous=3766i,tenthous=8766i,odd=132i,even=133i,stringu1="EZAAAA",stringu2="WYAAAA",string4="OOOOxx" 55900800000000000 +tenk unique1=1015i,unique2=647i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=15i,twothousand=1015i,fivethous=1015i,tenthous=1015i,odd=30i,even=31i,stringu1="BNAAAA",stringu2="XYAAAA",string4="VVVVxx" 55987200000000000 +tenk unique1=4396i,unique2=648i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=396i,twothousand=396i,fivethous=4396i,tenthous=4396i,odd=192i,even=193i,stringu1="CNAAAA",stringu2="YYAAAA",string4="AAAAxx" 56073600000000000 +tenk unique1=5564i,unique2=649i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=564i,twothousand=1564i,fivethous=564i,tenthous=5564i,odd=128i,even=129i,stringu1="AGAAAA",stringu2="ZYAAAA",string4="HHHHxx" 56160000000000000 +tenk unique1=927i,unique2=650i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=927i,twothousand=927i,fivethous=927i,tenthous=927i,odd=54i,even=55i,stringu1="RJAAAA",stringu2="AZAAAA",string4="OOOOxx" 56246400000000000 +tenk unique1=3306i,unique2=651i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=306i,twothousand=1306i,fivethous=3306i,tenthous=3306i,odd=12i,even=13i,stringu1="EXAAAA",stringu2="BZAAAA",string4="VVVVxx" 56332800000000000 +tenk unique1=1615i,unique2=652i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=615i,twothousand=1615i,fivethous=1615i,tenthous=1615i,odd=30i,even=31i,stringu1="DKAAAA",stringu2="CZAAAA",string4="AAAAxx" 56419200000000000 +tenk unique1=4550i,unique2=653i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=550i,twothousand=550i,fivethous=4550i,tenthous=4550i,odd=100i,even=101i,stringu1="ATAAAA",stringu2="DZAAAA",string4="HHHHxx" 56505600000000000 +tenk unique1=2468i,unique2=654i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=468i,twothousand=468i,fivethous=2468i,tenthous=2468i,odd=136i,even=137i,stringu1="YQAAAA",stringu2="EZAAAA",string4="OOOOxx" 56592000000000000 +tenk unique1=5336i,unique2=655i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=336i,twothousand=1336i,fivethous=336i,tenthous=5336i,odd=72i,even=73i,stringu1="GXAAAA",stringu2="FZAAAA",string4="VVVVxx" 56678400000000000 +tenk unique1=4471i,unique2=656i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=471i,twothousand=471i,fivethous=4471i,tenthous=4471i,odd=142i,even=143i,stringu1="ZPAAAA",stringu2="GZAAAA",string4="AAAAxx" 56764800000000000 +tenk unique1=8085i,unique2=657i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=85i,twothousand=85i,fivethous=3085i,tenthous=8085i,odd=170i,even=171i,stringu1="ZYAAAA",stringu2="HZAAAA",string4="HHHHxx" 56851200000000000 +tenk unique1=540i,unique2=658i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=540i,twothousand=540i,fivethous=540i,tenthous=540i,odd=80i,even=81i,stringu1="UUAAAA",stringu2="IZAAAA",string4="OOOOxx" 56937600000000000 +tenk unique1=5108i,unique2=659i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=108i,twothousand=1108i,fivethous=108i,tenthous=5108i,odd=16i,even=17i,stringu1="MOAAAA",stringu2="JZAAAA",string4="VVVVxx" 57024000000000000 +tenk unique1=8015i,unique2=660i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=15i,twothousand=15i,fivethous=3015i,tenthous=8015i,odd=30i,even=31i,stringu1="HWAAAA",stringu2="KZAAAA",string4="AAAAxx" 57110400000000000 +tenk unique1=2857i,unique2=661i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=857i,twothousand=857i,fivethous=2857i,tenthous=2857i,odd=114i,even=115i,stringu1="XFAAAA",stringu2="LZAAAA",string4="HHHHxx" 57196800000000000 +tenk unique1=9472i,unique2=662i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=472i,twothousand=1472i,fivethous=4472i,tenthous=9472i,odd=144i,even=145i,stringu1="IAAAAA",stringu2="MZAAAA",string4="OOOOxx" 57283200000000000 +tenk unique1=5666i,unique2=663i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=666i,twothousand=1666i,fivethous=666i,tenthous=5666i,odd=132i,even=133i,stringu1="YJAAAA",stringu2="NZAAAA",string4="VVVVxx" 57369600000000000 +tenk unique1=3555i,unique2=664i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=555i,twothousand=1555i,fivethous=3555i,tenthous=3555i,odd=110i,even=111i,stringu1="TGAAAA",stringu2="OZAAAA",string4="AAAAxx" 57456000000000000 +tenk unique1=378i,unique2=665i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=378i,twothousand=378i,fivethous=378i,tenthous=378i,odd=156i,even=157i,stringu1="OOAAAA",stringu2="PZAAAA",string4="HHHHxx" 57542400000000000 +tenk unique1=4466i,unique2=666i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=466i,twothousand=466i,fivethous=4466i,tenthous=4466i,odd=132i,even=133i,stringu1="UPAAAA",stringu2="QZAAAA",string4="OOOOxx" 57628800000000000 +tenk unique1=3247i,unique2=667i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=247i,twothousand=1247i,fivethous=3247i,tenthous=3247i,odd=94i,even=95i,stringu1="XUAAAA",stringu2="RZAAAA",string4="VVVVxx" 57715200000000000 +tenk unique1=6570i,unique2=668i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=570i,twothousand=570i,fivethous=1570i,tenthous=6570i,odd=140i,even=141i,stringu1="SSAAAA",stringu2="SZAAAA",string4="AAAAxx" 57801600000000000 +tenk unique1=5655i,unique2=669i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=655i,twothousand=1655i,fivethous=655i,tenthous=5655i,odd=110i,even=111i,stringu1="NJAAAA",stringu2="TZAAAA",string4="HHHHxx" 57888000000000000 +tenk unique1=917i,unique2=670i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=917i,twothousand=917i,fivethous=917i,tenthous=917i,odd=34i,even=35i,stringu1="HJAAAA",stringu2="UZAAAA",string4="OOOOxx" 57974400000000000 +tenk unique1=3637i,unique2=671i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=637i,twothousand=1637i,fivethous=3637i,tenthous=3637i,odd=74i,even=75i,stringu1="XJAAAA",stringu2="VZAAAA",string4="VVVVxx" 58060800000000000 +tenk unique1=3668i,unique2=672i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=668i,twothousand=1668i,fivethous=3668i,tenthous=3668i,odd=136i,even=137i,stringu1="CLAAAA",stringu2="WZAAAA",string4="AAAAxx" 58147200000000000 +tenk unique1=5644i,unique2=673i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=644i,twothousand=1644i,fivethous=644i,tenthous=5644i,odd=88i,even=89i,stringu1="CJAAAA",stringu2="XZAAAA",string4="HHHHxx" 58233600000000000 +tenk unique1=8286i,unique2=674i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=286i,twothousand=286i,fivethous=3286i,tenthous=8286i,odd=172i,even=173i,stringu1="SGAAAA",stringu2="YZAAAA",string4="OOOOxx" 58320000000000000 +tenk unique1=6896i,unique2=675i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=896i,twothousand=896i,fivethous=1896i,tenthous=6896i,odd=192i,even=193i,stringu1="GFAAAA",stringu2="ZZAAAA",string4="VVVVxx" 58406400000000000 +tenk unique1=2870i,unique2=676i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=870i,twothousand=870i,fivethous=2870i,tenthous=2870i,odd=140i,even=141i,stringu1="KGAAAA",stringu2="AABAAA",string4="AAAAxx" 58492800000000000 +tenk unique1=8041i,unique2=677i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=41i,twothousand=41i,fivethous=3041i,tenthous=8041i,odd=82i,even=83i,stringu1="HXAAAA",stringu2="BABAAA",string4="HHHHxx" 58579200000000000 +tenk unique1=8137i,unique2=678i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=137i,twothousand=137i,fivethous=3137i,tenthous=8137i,odd=74i,even=75i,stringu1="ZAAAAA",stringu2="CABAAA",string4="OOOOxx" 58665600000000000 +tenk unique1=4823i,unique2=679i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=823i,twothousand=823i,fivethous=4823i,tenthous=4823i,odd=46i,even=47i,stringu1="NDAAAA",stringu2="DABAAA",string4="VVVVxx" 58752000000000000 +tenk unique1=2438i,unique2=680i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=438i,twothousand=438i,fivethous=2438i,tenthous=2438i,odd=76i,even=77i,stringu1="UPAAAA",stringu2="EABAAA",string4="AAAAxx" 58838400000000000 +tenk unique1=6329i,unique2=681i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=329i,twothousand=329i,fivethous=1329i,tenthous=6329i,odd=58i,even=59i,stringu1="LJAAAA",stringu2="FABAAA",string4="HHHHxx" 58924800000000000 +tenk unique1=623i,unique2=682i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=623i,twothousand=623i,fivethous=623i,tenthous=623i,odd=46i,even=47i,stringu1="ZXAAAA",stringu2="GABAAA",string4="OOOOxx" 59011200000000000 +tenk unique1=1360i,unique2=683i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=360i,twothousand=1360i,fivethous=1360i,tenthous=1360i,odd=120i,even=121i,stringu1="IAAAAA",stringu2="HABAAA",string4="VVVVxx" 59097600000000000 +tenk unique1=7987i,unique2=684i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=987i,twothousand=1987i,fivethous=2987i,tenthous=7987i,odd=174i,even=175i,stringu1="FVAAAA",stringu2="IABAAA",string4="AAAAxx" 59184000000000000 +tenk unique1=9788i,unique2=685i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=788i,twothousand=1788i,fivethous=4788i,tenthous=9788i,odd=176i,even=177i,stringu1="MMAAAA",stringu2="JABAAA",string4="HHHHxx" 59270400000000000 +tenk unique1=3212i,unique2=686i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=212i,twothousand=1212i,fivethous=3212i,tenthous=3212i,odd=24i,even=25i,stringu1="OTAAAA",stringu2="KABAAA",string4="OOOOxx" 59356800000000000 +tenk unique1=2725i,unique2=687i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=725i,twothousand=725i,fivethous=2725i,tenthous=2725i,odd=50i,even=51i,stringu1="VAAAAA",stringu2="LABAAA",string4="VVVVxx" 59443200000000000 +tenk unique1=7837i,unique2=688i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=837i,twothousand=1837i,fivethous=2837i,tenthous=7837i,odd=74i,even=75i,stringu1="LPAAAA",stringu2="MABAAA",string4="AAAAxx" 59529600000000000 +tenk unique1=4746i,unique2=689i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=746i,twothousand=746i,fivethous=4746i,tenthous=4746i,odd=92i,even=93i,stringu1="OAAAAA",stringu2="NABAAA",string4="HHHHxx" 59616000000000000 +tenk unique1=3986i,unique2=690i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=986i,twothousand=1986i,fivethous=3986i,tenthous=3986i,odd=172i,even=173i,stringu1="IXAAAA",stringu2="OABAAA",string4="OOOOxx" 59702400000000000 +tenk unique1=9128i,unique2=691i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=128i,twothousand=1128i,fivethous=4128i,tenthous=9128i,odd=56i,even=57i,stringu1="CNAAAA",stringu2="PABAAA",string4="VVVVxx" 59788800000000000 +tenk unique1=5044i,unique2=692i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=44i,twothousand=1044i,fivethous=44i,tenthous=5044i,odd=88i,even=89i,stringu1="AMAAAA",stringu2="QABAAA",string4="AAAAxx" 59875200000000000 +tenk unique1=8132i,unique2=693i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=132i,twothousand=132i,fivethous=3132i,tenthous=8132i,odd=64i,even=65i,stringu1="UAAAAA",stringu2="RABAAA",string4="HHHHxx" 59961600000000000 +tenk unique1=9992i,unique2=694i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=992i,twothousand=1992i,fivethous=4992i,tenthous=9992i,odd=184i,even=185i,stringu1="IUAAAA",stringu2="SABAAA",string4="OOOOxx" 60048000000000000 +tenk unique1=8468i,unique2=695i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=468i,twothousand=468i,fivethous=3468i,tenthous=8468i,odd=136i,even=137i,stringu1="SNAAAA",stringu2="TABAAA",string4="VVVVxx" 60134400000000000 +tenk unique1=6876i,unique2=696i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=876i,twothousand=876i,fivethous=1876i,tenthous=6876i,odd=152i,even=153i,stringu1="MEAAAA",stringu2="UABAAA",string4="AAAAxx" 60220800000000000 +tenk unique1=3532i,unique2=697i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=532i,twothousand=1532i,fivethous=3532i,tenthous=3532i,odd=64i,even=65i,stringu1="WFAAAA",stringu2="VABAAA",string4="HHHHxx" 60307200000000000 +tenk unique1=2140i,unique2=698i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=140i,twothousand=140i,fivethous=2140i,tenthous=2140i,odd=80i,even=81i,stringu1="IEAAAA",stringu2="WABAAA",string4="OOOOxx" 60393600000000000 +tenk unique1=2183i,unique2=699i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=183i,twothousand=183i,fivethous=2183i,tenthous=2183i,odd=166i,even=167i,stringu1="ZFAAAA",stringu2="XABAAA",string4="VVVVxx" 60480000000000000 +tenk unique1=9766i,unique2=700i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=766i,twothousand=1766i,fivethous=4766i,tenthous=9766i,odd=132i,even=133i,stringu1="QLAAAA",stringu2="YABAAA",string4="AAAAxx" 60566400000000000 +tenk unique1=7943i,unique2=701i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=943i,twothousand=1943i,fivethous=2943i,tenthous=7943i,odd=86i,even=87i,stringu1="NTAAAA",stringu2="ZABAAA",string4="HHHHxx" 60652800000000000 +tenk unique1=9243i,unique2=702i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=243i,twothousand=1243i,fivethous=4243i,tenthous=9243i,odd=86i,even=87i,stringu1="NRAAAA",stringu2="ABBAAA",string4="OOOOxx" 60739200000000000 +tenk unique1=6241i,unique2=703i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=241i,twothousand=241i,fivethous=1241i,tenthous=6241i,odd=82i,even=83i,stringu1="BGAAAA",stringu2="BBBAAA",string4="VVVVxx" 60825600000000000 +tenk unique1=9540i,unique2=704i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=540i,twothousand=1540i,fivethous=4540i,tenthous=9540i,odd=80i,even=81i,stringu1="YCAAAA",stringu2="CBBAAA",string4="AAAAxx" 60912000000000000 +tenk unique1=7418i,unique2=705i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=418i,twothousand=1418i,fivethous=2418i,tenthous=7418i,odd=36i,even=37i,stringu1="IZAAAA",stringu2="DBBAAA",string4="HHHHxx" 60998400000000000 +tenk unique1=1603i,unique2=706i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=603i,twothousand=1603i,fivethous=1603i,tenthous=1603i,odd=6i,even=7i,stringu1="RJAAAA",stringu2="EBBAAA",string4="OOOOxx" 61084800000000000 +tenk unique1=8950i,unique2=707i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=950i,twothousand=950i,fivethous=3950i,tenthous=8950i,odd=100i,even=101i,stringu1="GGAAAA",stringu2="FBBAAA",string4="VVVVxx" 61171200000000000 +tenk unique1=6933i,unique2=708i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=933i,twothousand=933i,fivethous=1933i,tenthous=6933i,odd=66i,even=67i,stringu1="RGAAAA",stringu2="GBBAAA",string4="AAAAxx" 61257600000000000 +tenk unique1=2646i,unique2=709i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=646i,twothousand=646i,fivethous=2646i,tenthous=2646i,odd=92i,even=93i,stringu1="UXAAAA",stringu2="HBBAAA",string4="HHHHxx" 61344000000000000 +tenk unique1=3447i,unique2=710i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=447i,twothousand=1447i,fivethous=3447i,tenthous=3447i,odd=94i,even=95i,stringu1="PCAAAA",stringu2="IBBAAA",string4="OOOOxx" 61430400000000000 +tenk unique1=9957i,unique2=711i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=957i,twothousand=1957i,fivethous=4957i,tenthous=9957i,odd=114i,even=115i,stringu1="ZSAAAA",stringu2="JBBAAA",string4="VVVVxx" 61516800000000000 +tenk unique1=4623i,unique2=712i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=623i,twothousand=623i,fivethous=4623i,tenthous=4623i,odd=46i,even=47i,stringu1="VVAAAA",stringu2="KBBAAA",string4="AAAAxx" 61603200000000000 +tenk unique1=9058i,unique2=713i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=58i,twothousand=1058i,fivethous=4058i,tenthous=9058i,odd=116i,even=117i,stringu1="KKAAAA",stringu2="LBBAAA",string4="HHHHxx" 61689600000000000 +tenk unique1=7361i,unique2=714i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=361i,twothousand=1361i,fivethous=2361i,tenthous=7361i,odd=122i,even=123i,stringu1="DXAAAA",stringu2="MBBAAA",string4="OOOOxx" 61776000000000000 +tenk unique1=2489i,unique2=715i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=489i,twothousand=489i,fivethous=2489i,tenthous=2489i,odd=178i,even=179i,stringu1="TRAAAA",stringu2="NBBAAA",string4="VVVVxx" 61862400000000000 +tenk unique1=7643i,unique2=716i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=643i,twothousand=1643i,fivethous=2643i,tenthous=7643i,odd=86i,even=87i,stringu1="ZHAAAA",stringu2="OBBAAA",string4="AAAAxx" 61948800000000000 +tenk unique1=9166i,unique2=717i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=166i,twothousand=1166i,fivethous=4166i,tenthous=9166i,odd=132i,even=133i,stringu1="OOAAAA",stringu2="PBBAAA",string4="HHHHxx" 62035200000000000 +tenk unique1=7789i,unique2=718i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=789i,twothousand=1789i,fivethous=2789i,tenthous=7789i,odd=178i,even=179i,stringu1="PNAAAA",stringu2="QBBAAA",string4="OOOOxx" 62121600000000000 +tenk unique1=2332i,unique2=719i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=332i,twothousand=332i,fivethous=2332i,tenthous=2332i,odd=64i,even=65i,stringu1="SLAAAA",stringu2="RBBAAA",string4="VVVVxx" 62208000000000000 +tenk unique1=1832i,unique2=720i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=832i,twothousand=1832i,fivethous=1832i,tenthous=1832i,odd=64i,even=65i,stringu1="MSAAAA",stringu2="SBBAAA",string4="AAAAxx" 62294400000000000 +tenk unique1=8375i,unique2=721i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=375i,twothousand=375i,fivethous=3375i,tenthous=8375i,odd=150i,even=151i,stringu1="DKAAAA",stringu2="TBBAAA",string4="HHHHxx" 62380800000000000 +tenk unique1=948i,unique2=722i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=948i,twothousand=948i,fivethous=948i,tenthous=948i,odd=96i,even=97i,stringu1="MKAAAA",stringu2="UBBAAA",string4="OOOOxx" 62467200000000000 +tenk unique1=5613i,unique2=723i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=613i,twothousand=1613i,fivethous=613i,tenthous=5613i,odd=26i,even=27i,stringu1="XHAAAA",stringu2="VBBAAA",string4="VVVVxx" 62553600000000000 +tenk unique1=6310i,unique2=724i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=310i,twothousand=310i,fivethous=1310i,tenthous=6310i,odd=20i,even=21i,stringu1="SIAAAA",stringu2="WBBAAA",string4="AAAAxx" 62640000000000000 +tenk unique1=4254i,unique2=725i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=254i,twothousand=254i,fivethous=4254i,tenthous=4254i,odd=108i,even=109i,stringu1="QHAAAA",stringu2="XBBAAA",string4="HHHHxx" 62726400000000000 +tenk unique1=4260i,unique2=726i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=260i,twothousand=260i,fivethous=4260i,tenthous=4260i,odd=120i,even=121i,stringu1="WHAAAA",stringu2="YBBAAA",string4="OOOOxx" 62812800000000000 +tenk unique1=2060i,unique2=727i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=60i,twothousand=60i,fivethous=2060i,tenthous=2060i,odd=120i,even=121i,stringu1="GBAAAA",stringu2="ZBBAAA",string4="VVVVxx" 62899200000000000 +tenk unique1=4831i,unique2=728i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=831i,twothousand=831i,fivethous=4831i,tenthous=4831i,odd=62i,even=63i,stringu1="VDAAAA",stringu2="ACBAAA",string4="AAAAxx" 62985600000000000 +tenk unique1=6176i,unique2=729i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=176i,twothousand=176i,fivethous=1176i,tenthous=6176i,odd=152i,even=153i,stringu1="ODAAAA",stringu2="BCBAAA",string4="HHHHxx" 63072000000000000 +tenk unique1=6688i,unique2=730i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=688i,twothousand=688i,fivethous=1688i,tenthous=6688i,odd=176i,even=177i,stringu1="GXAAAA",stringu2="CCBAAA",string4="OOOOxx" 63158400000000000 +tenk unique1=5752i,unique2=731i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=752i,twothousand=1752i,fivethous=752i,tenthous=5752i,odd=104i,even=105i,stringu1="GNAAAA",stringu2="DCBAAA",string4="VVVVxx" 63244800000000000 +tenk unique1=8714i,unique2=732i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=714i,twothousand=714i,fivethous=3714i,tenthous=8714i,odd=28i,even=29i,stringu1="EXAAAA",stringu2="ECBAAA",string4="AAAAxx" 63331200000000000 +tenk unique1=6739i,unique2=733i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=739i,twothousand=739i,fivethous=1739i,tenthous=6739i,odd=78i,even=79i,stringu1="FZAAAA",stringu2="FCBAAA",string4="HHHHxx" 63417600000000000 +tenk unique1=7066i,unique2=734i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=66i,twothousand=1066i,fivethous=2066i,tenthous=7066i,odd=132i,even=133i,stringu1="ULAAAA",stringu2="GCBAAA",string4="OOOOxx" 63504000000000000 +tenk unique1=7250i,unique2=735i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=250i,twothousand=1250i,fivethous=2250i,tenthous=7250i,odd=100i,even=101i,stringu1="WSAAAA",stringu2="HCBAAA",string4="VVVVxx" 63590400000000000 +tenk unique1=3161i,unique2=736i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=161i,twothousand=1161i,fivethous=3161i,tenthous=3161i,odd=122i,even=123i,stringu1="PRAAAA",stringu2="ICBAAA",string4="AAAAxx" 63676800000000000 +tenk unique1=1411i,unique2=737i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=411i,twothousand=1411i,fivethous=1411i,tenthous=1411i,odd=22i,even=23i,stringu1="HCAAAA",stringu2="JCBAAA",string4="HHHHxx" 63763200000000000 +tenk unique1=9301i,unique2=738i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=301i,twothousand=1301i,fivethous=4301i,tenthous=9301i,odd=2i,even=3i,stringu1="TTAAAA",stringu2="KCBAAA",string4="OOOOxx" 63849600000000000 +tenk unique1=8324i,unique2=739i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=324i,twothousand=324i,fivethous=3324i,tenthous=8324i,odd=48i,even=49i,stringu1="EIAAAA",stringu2="LCBAAA",string4="VVVVxx" 63936000000000000 +tenk unique1=9641i,unique2=740i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=641i,twothousand=1641i,fivethous=4641i,tenthous=9641i,odd=82i,even=83i,stringu1="VGAAAA",stringu2="MCBAAA",string4="AAAAxx" 64022400000000000 +tenk unique1=7077i,unique2=741i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=77i,twothousand=1077i,fivethous=2077i,tenthous=7077i,odd=154i,even=155i,stringu1="FMAAAA",stringu2="NCBAAA",string4="HHHHxx" 64108800000000000 +tenk unique1=9888i,unique2=742i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=888i,twothousand=1888i,fivethous=4888i,tenthous=9888i,odd=176i,even=177i,stringu1="IQAAAA",stringu2="OCBAAA",string4="OOOOxx" 64195200000000000 +tenk unique1=9909i,unique2=743i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=909i,twothousand=1909i,fivethous=4909i,tenthous=9909i,odd=18i,even=19i,stringu1="DRAAAA",stringu2="PCBAAA",string4="VVVVxx" 64281600000000000 +tenk unique1=2209i,unique2=744i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=209i,twothousand=209i,fivethous=2209i,tenthous=2209i,odd=18i,even=19i,stringu1="ZGAAAA",stringu2="QCBAAA",string4="AAAAxx" 64368000000000000 +tenk unique1=6904i,unique2=745i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=904i,twothousand=904i,fivethous=1904i,tenthous=6904i,odd=8i,even=9i,stringu1="OFAAAA",stringu2="RCBAAA",string4="HHHHxx" 64454400000000000 +tenk unique1=6608i,unique2=746i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=608i,twothousand=608i,fivethous=1608i,tenthous=6608i,odd=16i,even=17i,stringu1="EUAAAA",stringu2="SCBAAA",string4="OOOOxx" 64540800000000000 +tenk unique1=8400i,unique2=747i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=400i,twothousand=400i,fivethous=3400i,tenthous=8400i,odd=0i,even=1i,stringu1="CLAAAA",stringu2="TCBAAA",string4="VVVVxx" 64627200000000000 +tenk unique1=5124i,unique2=748i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=124i,twothousand=1124i,fivethous=124i,tenthous=5124i,odd=48i,even=49i,stringu1="CPAAAA",stringu2="UCBAAA",string4="AAAAxx" 64713600000000000 +tenk unique1=5484i,unique2=749i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=484i,twothousand=1484i,fivethous=484i,tenthous=5484i,odd=168i,even=169i,stringu1="YCAAAA",stringu2="VCBAAA",string4="HHHHxx" 64800000000000000 +tenk unique1=3575i,unique2=750i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=575i,twothousand=1575i,fivethous=3575i,tenthous=3575i,odd=150i,even=151i,stringu1="NHAAAA",stringu2="WCBAAA",string4="OOOOxx" 64886400000000000 +tenk unique1=9723i,unique2=751i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=723i,twothousand=1723i,fivethous=4723i,tenthous=9723i,odd=46i,even=47i,stringu1="ZJAAAA",stringu2="XCBAAA",string4="VVVVxx" 64972800000000000 +tenk unique1=360i,unique2=752i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=360i,twothousand=360i,fivethous=360i,tenthous=360i,odd=120i,even=121i,stringu1="WNAAAA",stringu2="YCBAAA",string4="AAAAxx" 65059200000000000 +tenk unique1=1059i,unique2=753i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=59i,twothousand=1059i,fivethous=1059i,tenthous=1059i,odd=118i,even=119i,stringu1="TOAAAA",stringu2="ZCBAAA",string4="HHHHxx" 65145600000000000 +tenk unique1=4941i,unique2=754i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=941i,twothousand=941i,fivethous=4941i,tenthous=4941i,odd=82i,even=83i,stringu1="BIAAAA",stringu2="ADBAAA",string4="OOOOxx" 65232000000000000 +tenk unique1=2535i,unique2=755i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=535i,twothousand=535i,fivethous=2535i,tenthous=2535i,odd=70i,even=71i,stringu1="NTAAAA",stringu2="BDBAAA",string4="VVVVxx" 65318400000000000 +tenk unique1=4119i,unique2=756i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=119i,twothousand=119i,fivethous=4119i,tenthous=4119i,odd=38i,even=39i,stringu1="LCAAAA",stringu2="CDBAAA",string4="AAAAxx" 65404800000000000 +tenk unique1=3725i,unique2=757i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=725i,twothousand=1725i,fivethous=3725i,tenthous=3725i,odd=50i,even=51i,stringu1="HNAAAA",stringu2="DDBAAA",string4="HHHHxx" 65491200000000000 +tenk unique1=4758i,unique2=758i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=758i,twothousand=758i,fivethous=4758i,tenthous=4758i,odd=116i,even=117i,stringu1="ABAAAA",stringu2="EDBAAA",string4="OOOOxx" 65577600000000000 +tenk unique1=9593i,unique2=759i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=593i,twothousand=1593i,fivethous=4593i,tenthous=9593i,odd=186i,even=187i,stringu1="ZEAAAA",stringu2="FDBAAA",string4="VVVVxx" 65664000000000000 +tenk unique1=4663i,unique2=760i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=663i,twothousand=663i,fivethous=4663i,tenthous=4663i,odd=126i,even=127i,stringu1="JXAAAA",stringu2="GDBAAA",string4="AAAAxx" 65750400000000000 +tenk unique1=7734i,unique2=761i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=734i,twothousand=1734i,fivethous=2734i,tenthous=7734i,odd=68i,even=69i,stringu1="MLAAAA",stringu2="HDBAAA",string4="HHHHxx" 65836800000000000 +tenk unique1=9156i,unique2=762i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=156i,twothousand=1156i,fivethous=4156i,tenthous=9156i,odd=112i,even=113i,stringu1="EOAAAA",stringu2="IDBAAA",string4="OOOOxx" 65923200000000000 +tenk unique1=8120i,unique2=763i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=120i,twothousand=120i,fivethous=3120i,tenthous=8120i,odd=40i,even=41i,stringu1="IAAAAA",stringu2="JDBAAA",string4="VVVVxx" 66009600000000000 +tenk unique1=4385i,unique2=764i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=385i,twothousand=385i,fivethous=4385i,tenthous=4385i,odd=170i,even=171i,stringu1="RMAAAA",stringu2="KDBAAA",string4="AAAAxx" 66096000000000000 +tenk unique1=2926i,unique2=765i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=926i,twothousand=926i,fivethous=2926i,tenthous=2926i,odd=52i,even=53i,stringu1="OIAAAA",stringu2="LDBAAA",string4="HHHHxx" 66182400000000000 +tenk unique1=4186i,unique2=766i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=186i,twothousand=186i,fivethous=4186i,tenthous=4186i,odd=172i,even=173i,stringu1="AFAAAA",stringu2="MDBAAA",string4="OOOOxx" 66268800000000000 +tenk unique1=2508i,unique2=767i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=508i,twothousand=508i,fivethous=2508i,tenthous=2508i,odd=16i,even=17i,stringu1="MSAAAA",stringu2="NDBAAA",string4="VVVVxx" 66355200000000000 +tenk unique1=4012i,unique2=768i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=12i,twothousand=12i,fivethous=4012i,tenthous=4012i,odd=24i,even=25i,stringu1="IYAAAA",stringu2="ODBAAA",string4="AAAAxx" 66441600000000000 +tenk unique1=6266i,unique2=769i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=266i,twothousand=266i,fivethous=1266i,tenthous=6266i,odd=132i,even=133i,stringu1="AHAAAA",stringu2="PDBAAA",string4="HHHHxx" 66528000000000000 +tenk unique1=3709i,unique2=770i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=709i,twothousand=1709i,fivethous=3709i,tenthous=3709i,odd=18i,even=19i,stringu1="RMAAAA",stringu2="QDBAAA",string4="OOOOxx" 66614400000000000 +tenk unique1=7289i,unique2=771i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=289i,twothousand=1289i,fivethous=2289i,tenthous=7289i,odd=178i,even=179i,stringu1="JUAAAA",stringu2="RDBAAA",string4="VVVVxx" 66700800000000000 +tenk unique1=8875i,unique2=772i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=875i,twothousand=875i,fivethous=3875i,tenthous=8875i,odd=150i,even=151i,stringu1="JDAAAA",stringu2="SDBAAA",string4="AAAAxx" 66787200000000000 +tenk unique1=4412i,unique2=773i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=412i,twothousand=412i,fivethous=4412i,tenthous=4412i,odd=24i,even=25i,stringu1="SNAAAA",stringu2="TDBAAA",string4="HHHHxx" 66873600000000000 +tenk unique1=3033i,unique2=774i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=33i,twothousand=1033i,fivethous=3033i,tenthous=3033i,odd=66i,even=67i,stringu1="RMAAAA",stringu2="UDBAAA",string4="OOOOxx" 66960000000000000 +tenk unique1=1645i,unique2=775i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=645i,twothousand=1645i,fivethous=1645i,tenthous=1645i,odd=90i,even=91i,stringu1="HLAAAA",stringu2="VDBAAA",string4="VVVVxx" 67046400000000000 +tenk unique1=3557i,unique2=776i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=557i,twothousand=1557i,fivethous=3557i,tenthous=3557i,odd=114i,even=115i,stringu1="VGAAAA",stringu2="WDBAAA",string4="AAAAxx" 67132800000000000 +tenk unique1=6316i,unique2=777i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=316i,twothousand=316i,fivethous=1316i,tenthous=6316i,odd=32i,even=33i,stringu1="YIAAAA",stringu2="XDBAAA",string4="HHHHxx" 67219200000000000 +tenk unique1=2054i,unique2=778i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=54i,twothousand=54i,fivethous=2054i,tenthous=2054i,odd=108i,even=109i,stringu1="ABAAAA",stringu2="YDBAAA",string4="OOOOxx" 67305600000000000 +tenk unique1=7031i,unique2=779i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=31i,twothousand=1031i,fivethous=2031i,tenthous=7031i,odd=62i,even=63i,stringu1="LKAAAA",stringu2="ZDBAAA",string4="VVVVxx" 67392000000000000 +tenk unique1=3405i,unique2=780i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=405i,twothousand=1405i,fivethous=3405i,tenthous=3405i,odd=10i,even=11i,stringu1="ZAAAAA",stringu2="AEBAAA",string4="AAAAxx" 67478400000000000 +tenk unique1=5343i,unique2=781i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=343i,twothousand=1343i,fivethous=343i,tenthous=5343i,odd=86i,even=87i,stringu1="NXAAAA",stringu2="BEBAAA",string4="HHHHxx" 67564800000000000 +tenk unique1=5240i,unique2=782i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=240i,twothousand=1240i,fivethous=240i,tenthous=5240i,odd=80i,even=81i,stringu1="OTAAAA",stringu2="CEBAAA",string4="OOOOxx" 67651200000000000 +tenk unique1=9650i,unique2=783i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=650i,twothousand=1650i,fivethous=4650i,tenthous=9650i,odd=100i,even=101i,stringu1="EHAAAA",stringu2="DEBAAA",string4="VVVVxx" 67737600000000000 +tenk unique1=3777i,unique2=784i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=777i,twothousand=1777i,fivethous=3777i,tenthous=3777i,odd=154i,even=155i,stringu1="HPAAAA",stringu2="EEBAAA",string4="AAAAxx" 67824000000000000 +tenk unique1=9041i,unique2=785i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=41i,twothousand=1041i,fivethous=4041i,tenthous=9041i,odd=82i,even=83i,stringu1="TJAAAA",stringu2="FEBAAA",string4="HHHHxx" 67910400000000000 +tenk unique1=6923i,unique2=786i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=923i,twothousand=923i,fivethous=1923i,tenthous=6923i,odd=46i,even=47i,stringu1="HGAAAA",stringu2="GEBAAA",string4="OOOOxx" 67996800000000000 +tenk unique1=2977i,unique2=787i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=977i,twothousand=977i,fivethous=2977i,tenthous=2977i,odd=154i,even=155i,stringu1="NKAAAA",stringu2="HEBAAA",string4="VVVVxx" 68083200000000000 +tenk unique1=5500i,unique2=788i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=500i,twothousand=1500i,fivethous=500i,tenthous=5500i,odd=0i,even=1i,stringu1="ODAAAA",stringu2="IEBAAA",string4="AAAAxx" 68169600000000000 +tenk unique1=1044i,unique2=789i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=44i,twothousand=1044i,fivethous=1044i,tenthous=1044i,odd=88i,even=89i,stringu1="EOAAAA",stringu2="JEBAAA",string4="HHHHxx" 68256000000000000 +tenk unique1=434i,unique2=790i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=434i,twothousand=434i,fivethous=434i,tenthous=434i,odd=68i,even=69i,stringu1="SQAAAA",stringu2="KEBAAA",string4="OOOOxx" 68342400000000000 +tenk unique1=611i,unique2=791i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=611i,twothousand=611i,fivethous=611i,tenthous=611i,odd=22i,even=23i,stringu1="NXAAAA",stringu2="LEBAAA",string4="VVVVxx" 68428800000000000 +tenk unique1=5760i,unique2=792i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=760i,twothousand=1760i,fivethous=760i,tenthous=5760i,odd=120i,even=121i,stringu1="ONAAAA",stringu2="MEBAAA",string4="AAAAxx" 68515200000000000 +tenk unique1=2445i,unique2=793i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=445i,twothousand=445i,fivethous=2445i,tenthous=2445i,odd=90i,even=91i,stringu1="BQAAAA",stringu2="NEBAAA",string4="HHHHxx" 68601600000000000 +tenk unique1=7098i,unique2=794i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=98i,twothousand=1098i,fivethous=2098i,tenthous=7098i,odd=196i,even=197i,stringu1="ANAAAA",stringu2="OEBAAA",string4="OOOOxx" 68688000000000000 +tenk unique1=2188i,unique2=795i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=188i,twothousand=188i,fivethous=2188i,tenthous=2188i,odd=176i,even=177i,stringu1="EGAAAA",stringu2="PEBAAA",string4="VVVVxx" 68774400000000000 +tenk unique1=4597i,unique2=796i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=597i,twothousand=597i,fivethous=4597i,tenthous=4597i,odd=194i,even=195i,stringu1="VUAAAA",stringu2="QEBAAA",string4="AAAAxx" 68860800000000000 +tenk unique1=1913i,unique2=797i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=913i,twothousand=1913i,fivethous=1913i,tenthous=1913i,odd=26i,even=27i,stringu1="PVAAAA",stringu2="REBAAA",string4="HHHHxx" 68947200000000000 +tenk unique1=8696i,unique2=798i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=696i,twothousand=696i,fivethous=3696i,tenthous=8696i,odd=192i,even=193i,stringu1="MWAAAA",stringu2="SEBAAA",string4="OOOOxx" 69033600000000000 +tenk unique1=3332i,unique2=799i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=332i,twothousand=1332i,fivethous=3332i,tenthous=3332i,odd=64i,even=65i,stringu1="EYAAAA",stringu2="TEBAAA",string4="VVVVxx" 69120000000000000 +tenk unique1=8760i,unique2=800i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=760i,twothousand=760i,fivethous=3760i,tenthous=8760i,odd=120i,even=121i,stringu1="YYAAAA",stringu2="UEBAAA",string4="AAAAxx" 69206400000000000 +tenk unique1=3215i,unique2=801i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=215i,twothousand=1215i,fivethous=3215i,tenthous=3215i,odd=30i,even=31i,stringu1="RTAAAA",stringu2="VEBAAA",string4="HHHHxx" 69292800000000000 +tenk unique1=1625i,unique2=802i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=625i,twothousand=1625i,fivethous=1625i,tenthous=1625i,odd=50i,even=51i,stringu1="NKAAAA",stringu2="WEBAAA",string4="OOOOxx" 69379200000000000 +tenk unique1=4219i,unique2=803i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=219i,twothousand=219i,fivethous=4219i,tenthous=4219i,odd=38i,even=39i,stringu1="HGAAAA",stringu2="XEBAAA",string4="VVVVxx" 69465600000000000 +tenk unique1=415i,unique2=804i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=415i,twothousand=415i,fivethous=415i,tenthous=415i,odd=30i,even=31i,stringu1="ZPAAAA",stringu2="YEBAAA",string4="AAAAxx" 69552000000000000 +tenk unique1=4242i,unique2=805i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=242i,twothousand=242i,fivethous=4242i,tenthous=4242i,odd=84i,even=85i,stringu1="EHAAAA",stringu2="ZEBAAA",string4="HHHHxx" 69638400000000000 +tenk unique1=8660i,unique2=806i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=660i,twothousand=660i,fivethous=3660i,tenthous=8660i,odd=120i,even=121i,stringu1="CVAAAA",stringu2="AFBAAA",string4="OOOOxx" 69724800000000000 +tenk unique1=6525i,unique2=807i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=525i,twothousand=525i,fivethous=1525i,tenthous=6525i,odd=50i,even=51i,stringu1="ZQAAAA",stringu2="BFBAAA",string4="VVVVxx" 69811200000000000 +tenk unique1=2141i,unique2=808i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=141i,twothousand=141i,fivethous=2141i,tenthous=2141i,odd=82i,even=83i,stringu1="JEAAAA",stringu2="CFBAAA",string4="AAAAxx" 69897600000000000 +tenk unique1=5152i,unique2=809i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=152i,twothousand=1152i,fivethous=152i,tenthous=5152i,odd=104i,even=105i,stringu1="EQAAAA",stringu2="DFBAAA",string4="HHHHxx" 69984000000000000 +tenk unique1=8560i,unique2=810i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=560i,twothousand=560i,fivethous=3560i,tenthous=8560i,odd=120i,even=121i,stringu1="GRAAAA",stringu2="EFBAAA",string4="OOOOxx" 70070400000000000 +tenk unique1=9835i,unique2=811i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=835i,twothousand=1835i,fivethous=4835i,tenthous=9835i,odd=70i,even=71i,stringu1="HOAAAA",stringu2="FFBAAA",string4="VVVVxx" 70156800000000000 +tenk unique1=2657i,unique2=812i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=657i,twothousand=657i,fivethous=2657i,tenthous=2657i,odd=114i,even=115i,stringu1="FYAAAA",stringu2="GFBAAA",string4="AAAAxx" 70243200000000000 +tenk unique1=6085i,unique2=813i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=85i,twothousand=85i,fivethous=1085i,tenthous=6085i,odd=170i,even=171i,stringu1="BAAAAA",stringu2="HFBAAA",string4="HHHHxx" 70329600000000000 +tenk unique1=6698i,unique2=814i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=698i,twothousand=698i,fivethous=1698i,tenthous=6698i,odd=196i,even=197i,stringu1="QXAAAA",stringu2="IFBAAA",string4="OOOOxx" 70416000000000000 +tenk unique1=5421i,unique2=815i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=421i,twothousand=1421i,fivethous=421i,tenthous=5421i,odd=42i,even=43i,stringu1="NAAAAA",stringu2="JFBAAA",string4="VVVVxx" 70502400000000000 +tenk unique1=6661i,unique2=816i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=661i,twothousand=661i,fivethous=1661i,tenthous=6661i,odd=122i,even=123i,stringu1="FWAAAA",stringu2="KFBAAA",string4="AAAAxx" 70588800000000000 +tenk unique1=5645i,unique2=817i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=645i,twothousand=1645i,fivethous=645i,tenthous=5645i,odd=90i,even=91i,stringu1="DJAAAA",stringu2="LFBAAA",string4="HHHHxx" 70675200000000000 +tenk unique1=1248i,unique2=818i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=248i,twothousand=1248i,fivethous=1248i,tenthous=1248i,odd=96i,even=97i,stringu1="AWAAAA",stringu2="MFBAAA",string4="OOOOxx" 70761600000000000 +tenk unique1=5690i,unique2=819i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=690i,twothousand=1690i,fivethous=690i,tenthous=5690i,odd=180i,even=181i,stringu1="WKAAAA",stringu2="NFBAAA",string4="VVVVxx" 70848000000000000 +tenk unique1=4762i,unique2=820i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=762i,twothousand=762i,fivethous=4762i,tenthous=4762i,odd=124i,even=125i,stringu1="EBAAAA",stringu2="OFBAAA",string4="AAAAxx" 70934400000000000 +tenk unique1=1455i,unique2=821i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=455i,twothousand=1455i,fivethous=1455i,tenthous=1455i,odd=110i,even=111i,stringu1="ZDAAAA",stringu2="PFBAAA",string4="HHHHxx" 71020800000000000 +tenk unique1=9846i,unique2=822i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=846i,twothousand=1846i,fivethous=4846i,tenthous=9846i,odd=92i,even=93i,stringu1="SOAAAA",stringu2="QFBAAA",string4="OOOOxx" 71107200000000000 +tenk unique1=5295i,unique2=823i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=295i,twothousand=1295i,fivethous=295i,tenthous=5295i,odd=190i,even=191i,stringu1="RVAAAA",stringu2="RFBAAA",string4="VVVVxx" 71193600000000000 +tenk unique1=2826i,unique2=824i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=826i,twothousand=826i,fivethous=2826i,tenthous=2826i,odd=52i,even=53i,stringu1="SEAAAA",stringu2="SFBAAA",string4="AAAAxx" 71280000000000000 +tenk unique1=7496i,unique2=825i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=496i,twothousand=1496i,fivethous=2496i,tenthous=7496i,odd=192i,even=193i,stringu1="ICAAAA",stringu2="TFBAAA",string4="HHHHxx" 71366400000000000 +tenk unique1=3024i,unique2=826i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=24i,twothousand=1024i,fivethous=3024i,tenthous=3024i,odd=48i,even=49i,stringu1="IMAAAA",stringu2="UFBAAA",string4="OOOOxx" 71452800000000000 +tenk unique1=4945i,unique2=827i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=945i,twothousand=945i,fivethous=4945i,tenthous=4945i,odd=90i,even=91i,stringu1="FIAAAA",stringu2="VFBAAA",string4="VVVVxx" 71539200000000000 +tenk unique1=4404i,unique2=828i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=404i,twothousand=404i,fivethous=4404i,tenthous=4404i,odd=8i,even=9i,stringu1="KNAAAA",stringu2="WFBAAA",string4="AAAAxx" 71625600000000000 +tenk unique1=9302i,unique2=829i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=302i,twothousand=1302i,fivethous=4302i,tenthous=9302i,odd=4i,even=5i,stringu1="UTAAAA",stringu2="XFBAAA",string4="HHHHxx" 71712000000000000 +tenk unique1=1286i,unique2=830i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=286i,twothousand=1286i,fivethous=1286i,tenthous=1286i,odd=172i,even=173i,stringu1="MXAAAA",stringu2="YFBAAA",string4="OOOOxx" 71798400000000000 +tenk unique1=8435i,unique2=831i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=435i,twothousand=435i,fivethous=3435i,tenthous=8435i,odd=70i,even=71i,stringu1="LMAAAA",stringu2="ZFBAAA",string4="VVVVxx" 71884800000000000 +tenk unique1=8969i,unique2=832i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=969i,twothousand=969i,fivethous=3969i,tenthous=8969i,odd=138i,even=139i,stringu1="ZGAAAA",stringu2="AGBAAA",string4="AAAAxx" 71971200000000000 +tenk unique1=3302i,unique2=833i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=302i,twothousand=1302i,fivethous=3302i,tenthous=3302i,odd=4i,even=5i,stringu1="AXAAAA",stringu2="BGBAAA",string4="HHHHxx" 72057600000000000 +tenk unique1=9753i,unique2=834i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=753i,twothousand=1753i,fivethous=4753i,tenthous=9753i,odd=106i,even=107i,stringu1="DLAAAA",stringu2="CGBAAA",string4="OOOOxx" 72144000000000000 +tenk unique1=9374i,unique2=835i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=374i,twothousand=1374i,fivethous=4374i,tenthous=9374i,odd=148i,even=149i,stringu1="OWAAAA",stringu2="DGBAAA",string4="VVVVxx" 72230400000000000 +tenk unique1=4907i,unique2=836i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=907i,twothousand=907i,fivethous=4907i,tenthous=4907i,odd=14i,even=15i,stringu1="TGAAAA",stringu2="EGBAAA",string4="AAAAxx" 72316800000000000 +tenk unique1=1659i,unique2=837i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=659i,twothousand=1659i,fivethous=1659i,tenthous=1659i,odd=118i,even=119i,stringu1="VLAAAA",stringu2="FGBAAA",string4="HHHHxx" 72403200000000000 +tenk unique1=5095i,unique2=838i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=95i,twothousand=1095i,fivethous=95i,tenthous=5095i,odd=190i,even=191i,stringu1="ZNAAAA",stringu2="GGBAAA",string4="OOOOxx" 72489600000000000 +tenk unique1=9446i,unique2=839i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=446i,twothousand=1446i,fivethous=4446i,tenthous=9446i,odd=92i,even=93i,stringu1="IZAAAA",stringu2="HGBAAA",string4="VVVVxx" 72576000000000000 +tenk unique1=8528i,unique2=840i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=528i,twothousand=528i,fivethous=3528i,tenthous=8528i,odd=56i,even=57i,stringu1="AQAAAA",stringu2="IGBAAA",string4="AAAAxx" 72662400000000000 +tenk unique1=4890i,unique2=841i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=890i,twothousand=890i,fivethous=4890i,tenthous=4890i,odd=180i,even=181i,stringu1="CGAAAA",stringu2="JGBAAA",string4="HHHHxx" 72748800000000000 +tenk unique1=1221i,unique2=842i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=221i,twothousand=1221i,fivethous=1221i,tenthous=1221i,odd=42i,even=43i,stringu1="ZUAAAA",stringu2="KGBAAA",string4="OOOOxx" 72835200000000000 +tenk unique1=5583i,unique2=843i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=583i,twothousand=1583i,fivethous=583i,tenthous=5583i,odd=166i,even=167i,stringu1="TGAAAA",stringu2="LGBAAA",string4="VVVVxx" 72921600000000000 +tenk unique1=7303i,unique2=844i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=303i,twothousand=1303i,fivethous=2303i,tenthous=7303i,odd=6i,even=7i,stringu1="XUAAAA",stringu2="MGBAAA",string4="AAAAxx" 73008000000000000 +tenk unique1=406i,unique2=845i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=406i,twothousand=406i,fivethous=406i,tenthous=406i,odd=12i,even=13i,stringu1="QPAAAA",stringu2="NGBAAA",string4="HHHHxx" 73094400000000000 +tenk unique1=7542i,unique2=846i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=542i,twothousand=1542i,fivethous=2542i,tenthous=7542i,odd=84i,even=85i,stringu1="CEAAAA",stringu2="OGBAAA",string4="OOOOxx" 73180800000000000 +tenk unique1=9507i,unique2=847i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=507i,twothousand=1507i,fivethous=4507i,tenthous=9507i,odd=14i,even=15i,stringu1="RBAAAA",stringu2="PGBAAA",string4="VVVVxx" 73267200000000000 +tenk unique1=9511i,unique2=848i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=511i,twothousand=1511i,fivethous=4511i,tenthous=9511i,odd=22i,even=23i,stringu1="VBAAAA",stringu2="QGBAAA",string4="AAAAxx" 73353600000000000 +tenk unique1=1373i,unique2=849i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=373i,twothousand=1373i,fivethous=1373i,tenthous=1373i,odd=146i,even=147i,stringu1="VAAAAA",stringu2="RGBAAA",string4="HHHHxx" 73440000000000000 +tenk unique1=6556i,unique2=850i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=556i,twothousand=556i,fivethous=1556i,tenthous=6556i,odd=112i,even=113i,stringu1="ESAAAA",stringu2="SGBAAA",string4="OOOOxx" 73526400000000000 +tenk unique1=4117i,unique2=851i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=117i,twothousand=117i,fivethous=4117i,tenthous=4117i,odd=34i,even=35i,stringu1="JCAAAA",stringu2="TGBAAA",string4="VVVVxx" 73612800000000000 +tenk unique1=7794i,unique2=852i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=794i,twothousand=1794i,fivethous=2794i,tenthous=7794i,odd=188i,even=189i,stringu1="UNAAAA",stringu2="UGBAAA",string4="AAAAxx" 73699200000000000 +tenk unique1=7170i,unique2=853i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=170i,twothousand=1170i,fivethous=2170i,tenthous=7170i,odd=140i,even=141i,stringu1="UPAAAA",stringu2="VGBAAA",string4="HHHHxx" 73785600000000000 +tenk unique1=5809i,unique2=854i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=809i,twothousand=1809i,fivethous=809i,tenthous=5809i,odd=18i,even=19i,stringu1="LPAAAA",stringu2="WGBAAA",string4="OOOOxx" 73872000000000000 +tenk unique1=7828i,unique2=855i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=828i,twothousand=1828i,fivethous=2828i,tenthous=7828i,odd=56i,even=57i,stringu1="CPAAAA",stringu2="XGBAAA",string4="VVVVxx" 73958400000000000 +tenk unique1=8046i,unique2=856i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=46i,twothousand=46i,fivethous=3046i,tenthous=8046i,odd=92i,even=93i,stringu1="MXAAAA",stringu2="YGBAAA",string4="AAAAxx" 74044800000000000 +tenk unique1=4833i,unique2=857i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=833i,twothousand=833i,fivethous=4833i,tenthous=4833i,odd=66i,even=67i,stringu1="XDAAAA",stringu2="ZGBAAA",string4="HHHHxx" 74131200000000000 +tenk unique1=2107i,unique2=858i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=107i,twothousand=107i,fivethous=2107i,tenthous=2107i,odd=14i,even=15i,stringu1="BDAAAA",stringu2="AHBAAA",string4="OOOOxx" 74217600000000000 +tenk unique1=4276i,unique2=859i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=276i,twothousand=276i,fivethous=4276i,tenthous=4276i,odd=152i,even=153i,stringu1="MIAAAA",stringu2="BHBAAA",string4="VVVVxx" 74304000000000000 +tenk unique1=9536i,unique2=860i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=536i,twothousand=1536i,fivethous=4536i,tenthous=9536i,odd=72i,even=73i,stringu1="UCAAAA",stringu2="CHBAAA",string4="AAAAxx" 74390400000000000 +tenk unique1=5549i,unique2=861i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=549i,twothousand=1549i,fivethous=549i,tenthous=5549i,odd=98i,even=99i,stringu1="LFAAAA",stringu2="DHBAAA",string4="HHHHxx" 74476800000000000 +tenk unique1=6427i,unique2=862i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=427i,twothousand=427i,fivethous=1427i,tenthous=6427i,odd=54i,even=55i,stringu1="FNAAAA",stringu2="EHBAAA",string4="OOOOxx" 74563200000000000 +tenk unique1=1382i,unique2=863i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=382i,twothousand=1382i,fivethous=1382i,tenthous=1382i,odd=164i,even=165i,stringu1="EBAAAA",stringu2="FHBAAA",string4="VVVVxx" 74649600000000000 +tenk unique1=3256i,unique2=864i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=256i,twothousand=1256i,fivethous=3256i,tenthous=3256i,odd=112i,even=113i,stringu1="GVAAAA",stringu2="GHBAAA",string4="AAAAxx" 74736000000000000 +tenk unique1=3270i,unique2=865i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=270i,twothousand=1270i,fivethous=3270i,tenthous=3270i,odd=140i,even=141i,stringu1="UVAAAA",stringu2="HHBAAA",string4="HHHHxx" 74822400000000000 +tenk unique1=4808i,unique2=866i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=808i,twothousand=808i,fivethous=4808i,tenthous=4808i,odd=16i,even=17i,stringu1="YCAAAA",stringu2="IHBAAA",string4="OOOOxx" 74908800000000000 +tenk unique1=7938i,unique2=867i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=938i,twothousand=1938i,fivethous=2938i,tenthous=7938i,odd=76i,even=77i,stringu1="ITAAAA",stringu2="JHBAAA",string4="VVVVxx" 74995200000000000 +tenk unique1=4405i,unique2=868i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=405i,twothousand=405i,fivethous=4405i,tenthous=4405i,odd=10i,even=11i,stringu1="LNAAAA",stringu2="KHBAAA",string4="AAAAxx" 75081600000000000 +tenk unique1=2264i,unique2=869i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=264i,twothousand=264i,fivethous=2264i,tenthous=2264i,odd=128i,even=129i,stringu1="CJAAAA",stringu2="LHBAAA",string4="HHHHxx" 75168000000000000 +tenk unique1=80i,unique2=870i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=80i,twothousand=80i,fivethous=80i,tenthous=80i,odd=160i,even=161i,stringu1="CDAAAA",stringu2="MHBAAA",string4="OOOOxx" 75254400000000000 +tenk unique1=320i,unique2=871i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=320i,twothousand=320i,fivethous=320i,tenthous=320i,odd=40i,even=41i,stringu1="IMAAAA",stringu2="NHBAAA",string4="VVVVxx" 75340800000000000 +tenk unique1=2383i,unique2=872i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=383i,twothousand=383i,fivethous=2383i,tenthous=2383i,odd=166i,even=167i,stringu1="RNAAAA",stringu2="OHBAAA",string4="AAAAxx" 75427200000000000 +tenk unique1=3146i,unique2=873i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=146i,twothousand=1146i,fivethous=3146i,tenthous=3146i,odd=92i,even=93i,stringu1="ARAAAA",stringu2="PHBAAA",string4="HHHHxx" 75513600000000000 +tenk unique1=6911i,unique2=874i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=911i,twothousand=911i,fivethous=1911i,tenthous=6911i,odd=22i,even=23i,stringu1="VFAAAA",stringu2="QHBAAA",string4="OOOOxx" 75600000000000000 +tenk unique1=7377i,unique2=875i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=377i,twothousand=1377i,fivethous=2377i,tenthous=7377i,odd=154i,even=155i,stringu1="TXAAAA",stringu2="RHBAAA",string4="VVVVxx" 75686400000000000 +tenk unique1=9965i,unique2=876i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=965i,twothousand=1965i,fivethous=4965i,tenthous=9965i,odd=130i,even=131i,stringu1="HTAAAA",stringu2="SHBAAA",string4="AAAAxx" 75772800000000000 +tenk unique1=8361i,unique2=877i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=361i,twothousand=361i,fivethous=3361i,tenthous=8361i,odd=122i,even=123i,stringu1="PJAAAA",stringu2="THBAAA",string4="HHHHxx" 75859200000000000 +tenk unique1=9417i,unique2=878i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=417i,twothousand=1417i,fivethous=4417i,tenthous=9417i,odd=34i,even=35i,stringu1="FYAAAA",stringu2="UHBAAA",string4="OOOOxx" 75945600000000000 +tenk unique1=2483i,unique2=879i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=483i,twothousand=483i,fivethous=2483i,tenthous=2483i,odd=166i,even=167i,stringu1="NRAAAA",stringu2="VHBAAA",string4="VVVVxx" 76032000000000000 +tenk unique1=9843i,unique2=880i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=843i,twothousand=1843i,fivethous=4843i,tenthous=9843i,odd=86i,even=87i,stringu1="POAAAA",stringu2="WHBAAA",string4="AAAAxx" 76118400000000000 +tenk unique1=6395i,unique2=881i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=395i,twothousand=395i,fivethous=1395i,tenthous=6395i,odd=190i,even=191i,stringu1="ZLAAAA",stringu2="XHBAAA",string4="HHHHxx" 76204800000000000 +tenk unique1=6444i,unique2=882i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=444i,twothousand=444i,fivethous=1444i,tenthous=6444i,odd=88i,even=89i,stringu1="WNAAAA",stringu2="YHBAAA",string4="OOOOxx" 76291200000000000 +tenk unique1=1820i,unique2=883i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=820i,twothousand=1820i,fivethous=1820i,tenthous=1820i,odd=40i,even=41i,stringu1="ASAAAA",stringu2="ZHBAAA",string4="VVVVxx" 76377600000000000 +tenk unique1=2768i,unique2=884i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=768i,twothousand=768i,fivethous=2768i,tenthous=2768i,odd=136i,even=137i,stringu1="MCAAAA",stringu2="AIBAAA",string4="AAAAxx" 76464000000000000 +tenk unique1=5413i,unique2=885i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=413i,twothousand=1413i,fivethous=413i,tenthous=5413i,odd=26i,even=27i,stringu1="FAAAAA",stringu2="BIBAAA",string4="HHHHxx" 76550400000000000 +tenk unique1=2923i,unique2=886i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=923i,twothousand=923i,fivethous=2923i,tenthous=2923i,odd=46i,even=47i,stringu1="LIAAAA",stringu2="CIBAAA",string4="OOOOxx" 76636800000000000 +tenk unique1=5286i,unique2=887i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=286i,twothousand=1286i,fivethous=286i,tenthous=5286i,odd=172i,even=173i,stringu1="IVAAAA",stringu2="DIBAAA",string4="VVVVxx" 76723200000000000 +tenk unique1=6126i,unique2=888i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=126i,twothousand=126i,fivethous=1126i,tenthous=6126i,odd=52i,even=53i,stringu1="QBAAAA",stringu2="EIBAAA",string4="AAAAxx" 76809600000000000 +tenk unique1=8343i,unique2=889i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=343i,twothousand=343i,fivethous=3343i,tenthous=8343i,odd=86i,even=87i,stringu1="XIAAAA",stringu2="FIBAAA",string4="HHHHxx" 76896000000000000 +tenk unique1=6010i,unique2=890i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=10i,twothousand=10i,fivethous=1010i,tenthous=6010i,odd=20i,even=21i,stringu1="EXAAAA",stringu2="GIBAAA",string4="OOOOxx" 76982400000000000 +tenk unique1=4177i,unique2=891i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=177i,twothousand=177i,fivethous=4177i,tenthous=4177i,odd=154i,even=155i,stringu1="REAAAA",stringu2="HIBAAA",string4="VVVVxx" 77068800000000000 +tenk unique1=5808i,unique2=892i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=808i,twothousand=1808i,fivethous=808i,tenthous=5808i,odd=16i,even=17i,stringu1="KPAAAA",stringu2="IIBAAA",string4="AAAAxx" 77155200000000000 +tenk unique1=4859i,unique2=893i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=859i,twothousand=859i,fivethous=4859i,tenthous=4859i,odd=118i,even=119i,stringu1="XEAAAA",stringu2="JIBAAA",string4="HHHHxx" 77241600000000000 +tenk unique1=9252i,unique2=894i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=252i,twothousand=1252i,fivethous=4252i,tenthous=9252i,odd=104i,even=105i,stringu1="WRAAAA",stringu2="KIBAAA",string4="OOOOxx" 77328000000000000 +tenk unique1=2941i,unique2=895i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=941i,twothousand=941i,fivethous=2941i,tenthous=2941i,odd=82i,even=83i,stringu1="DJAAAA",stringu2="LIBAAA",string4="VVVVxx" 77414400000000000 +tenk unique1=8693i,unique2=896i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=693i,twothousand=693i,fivethous=3693i,tenthous=8693i,odd=186i,even=187i,stringu1="JWAAAA",stringu2="MIBAAA",string4="AAAAxx" 77500800000000000 +tenk unique1=4432i,unique2=897i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=432i,twothousand=432i,fivethous=4432i,tenthous=4432i,odd=64i,even=65i,stringu1="MOAAAA",stringu2="NIBAAA",string4="HHHHxx" 77587200000000000 +tenk unique1=2371i,unique2=898i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=371i,twothousand=371i,fivethous=2371i,tenthous=2371i,odd=142i,even=143i,stringu1="FNAAAA",stringu2="OIBAAA",string4="OOOOxx" 77673600000000000 +tenk unique1=7546i,unique2=899i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=546i,twothousand=1546i,fivethous=2546i,tenthous=7546i,odd=92i,even=93i,stringu1="GEAAAA",stringu2="PIBAAA",string4="VVVVxx" 77760000000000000 +tenk unique1=1369i,unique2=900i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=369i,twothousand=1369i,fivethous=1369i,tenthous=1369i,odd=138i,even=139i,stringu1="RAAAAA",stringu2="QIBAAA",string4="AAAAxx" 77846400000000000 +tenk unique1=4687i,unique2=901i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=687i,twothousand=687i,fivethous=4687i,tenthous=4687i,odd=174i,even=175i,stringu1="HYAAAA",stringu2="RIBAAA",string4="HHHHxx" 77932800000000000 +tenk unique1=8941i,unique2=902i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=941i,twothousand=941i,fivethous=3941i,tenthous=8941i,odd=82i,even=83i,stringu1="XFAAAA",stringu2="SIBAAA",string4="OOOOxx" 78019200000000000 +tenk unique1=226i,unique2=903i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=226i,twothousand=226i,fivethous=226i,tenthous=226i,odd=52i,even=53i,stringu1="SIAAAA",stringu2="TIBAAA",string4="VVVVxx" 78105600000000000 +tenk unique1=3493i,unique2=904i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=493i,twothousand=1493i,fivethous=3493i,tenthous=3493i,odd=186i,even=187i,stringu1="JEAAAA",stringu2="UIBAAA",string4="AAAAxx" 78192000000000000 +tenk unique1=6433i,unique2=905i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=433i,twothousand=433i,fivethous=1433i,tenthous=6433i,odd=66i,even=67i,stringu1="LNAAAA",stringu2="VIBAAA",string4="HHHHxx" 78278400000000000 +tenk unique1=9189i,unique2=906i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=189i,twothousand=1189i,fivethous=4189i,tenthous=9189i,odd=178i,even=179i,stringu1="LPAAAA",stringu2="WIBAAA",string4="OOOOxx" 78364800000000000 +tenk unique1=6027i,unique2=907i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=27i,twothousand=27i,fivethous=1027i,tenthous=6027i,odd=54i,even=55i,stringu1="VXAAAA",stringu2="XIBAAA",string4="VVVVxx" 78451200000000000 +tenk unique1=4615i,unique2=908i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=615i,twothousand=615i,fivethous=4615i,tenthous=4615i,odd=30i,even=31i,stringu1="NVAAAA",stringu2="YIBAAA",string4="AAAAxx" 78537600000000000 +tenk unique1=5320i,unique2=909i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=320i,twothousand=1320i,fivethous=320i,tenthous=5320i,odd=40i,even=41i,stringu1="QWAAAA",stringu2="ZIBAAA",string4="HHHHxx" 78624000000000000 +tenk unique1=7002i,unique2=910i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=1002i,fivethous=2002i,tenthous=7002i,odd=4i,even=5i,stringu1="IJAAAA",stringu2="AJBAAA",string4="OOOOxx" 78710400000000000 +tenk unique1=7367i,unique2=911i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=367i,twothousand=1367i,fivethous=2367i,tenthous=7367i,odd=134i,even=135i,stringu1="JXAAAA",stringu2="BJBAAA",string4="VVVVxx" 78796800000000000 +tenk unique1=289i,unique2=912i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=289i,twothousand=289i,fivethous=289i,tenthous=289i,odd=178i,even=179i,stringu1="DLAAAA",stringu2="CJBAAA",string4="AAAAxx" 78883200000000000 +tenk unique1=407i,unique2=913i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=407i,twothousand=407i,fivethous=407i,tenthous=407i,odd=14i,even=15i,stringu1="RPAAAA",stringu2="DJBAAA",string4="HHHHxx" 78969600000000000 +tenk unique1=504i,unique2=914i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=504i,twothousand=504i,fivethous=504i,tenthous=504i,odd=8i,even=9i,stringu1="KTAAAA",stringu2="EJBAAA",string4="OOOOxx" 79056000000000000 +tenk unique1=8301i,unique2=915i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=301i,twothousand=301i,fivethous=3301i,tenthous=8301i,odd=2i,even=3i,stringu1="HHAAAA",stringu2="FJBAAA",string4="VVVVxx" 79142400000000000 +tenk unique1=1396i,unique2=916i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=396i,twothousand=1396i,fivethous=1396i,tenthous=1396i,odd=192i,even=193i,stringu1="SBAAAA",stringu2="GJBAAA",string4="AAAAxx" 79228800000000000 +tenk unique1=4794i,unique2=917i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=794i,twothousand=794i,fivethous=4794i,tenthous=4794i,odd=188i,even=189i,stringu1="KCAAAA",stringu2="HJBAAA",string4="HHHHxx" 79315200000000000 +tenk unique1=6400i,unique2=918i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=400i,twothousand=400i,fivethous=1400i,tenthous=6400i,odd=0i,even=1i,stringu1="EMAAAA",stringu2="IJBAAA",string4="OOOOxx" 79401600000000000 +tenk unique1=1275i,unique2=919i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=275i,twothousand=1275i,fivethous=1275i,tenthous=1275i,odd=150i,even=151i,stringu1="BXAAAA",stringu2="JJBAAA",string4="VVVVxx" 79488000000000000 +tenk unique1=5797i,unique2=920i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=797i,twothousand=1797i,fivethous=797i,tenthous=5797i,odd=194i,even=195i,stringu1="ZOAAAA",stringu2="KJBAAA",string4="AAAAxx" 79574400000000000 +tenk unique1=2221i,unique2=921i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=221i,twothousand=221i,fivethous=2221i,tenthous=2221i,odd=42i,even=43i,stringu1="LHAAAA",stringu2="LJBAAA",string4="HHHHxx" 79660800000000000 +tenk unique1=2504i,unique2=922i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=504i,twothousand=504i,fivethous=2504i,tenthous=2504i,odd=8i,even=9i,stringu1="ISAAAA",stringu2="MJBAAA",string4="OOOOxx" 79747200000000000 +tenk unique1=2143i,unique2=923i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=143i,twothousand=143i,fivethous=2143i,tenthous=2143i,odd=86i,even=87i,stringu1="LEAAAA",stringu2="NJBAAA",string4="VVVVxx" 79833600000000000 +tenk unique1=1083i,unique2=924i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=83i,twothousand=1083i,fivethous=1083i,tenthous=1083i,odd=166i,even=167i,stringu1="RPAAAA",stringu2="OJBAAA",string4="AAAAxx" 79920000000000000 +tenk unique1=6148i,unique2=925i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=148i,twothousand=148i,fivethous=1148i,tenthous=6148i,odd=96i,even=97i,stringu1="MCAAAA",stringu2="PJBAAA",string4="HHHHxx" 80006400000000000 +tenk unique1=3612i,unique2=926i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=612i,twothousand=1612i,fivethous=3612i,tenthous=3612i,odd=24i,even=25i,stringu1="YIAAAA",stringu2="QJBAAA",string4="OOOOxx" 80092800000000000 +tenk unique1=9499i,unique2=927i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=499i,twothousand=1499i,fivethous=4499i,tenthous=9499i,odd=198i,even=199i,stringu1="JBAAAA",stringu2="RJBAAA",string4="VVVVxx" 80179200000000000 +tenk unique1=5773i,unique2=928i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=773i,twothousand=1773i,fivethous=773i,tenthous=5773i,odd=146i,even=147i,stringu1="BOAAAA",stringu2="SJBAAA",string4="AAAAxx" 80265600000000000 +tenk unique1=1014i,unique2=929i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=14i,twothousand=1014i,fivethous=1014i,tenthous=1014i,odd=28i,even=29i,stringu1="ANAAAA",stringu2="TJBAAA",string4="HHHHxx" 80352000000000000 +tenk unique1=1427i,unique2=930i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=427i,twothousand=1427i,fivethous=1427i,tenthous=1427i,odd=54i,even=55i,stringu1="XCAAAA",stringu2="UJBAAA",string4="OOOOxx" 80438400000000000 +tenk unique1=6770i,unique2=931i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=770i,twothousand=770i,fivethous=1770i,tenthous=6770i,odd=140i,even=141i,stringu1="KAAAAA",stringu2="VJBAAA",string4="VVVVxx" 80524800000000000 +tenk unique1=9042i,unique2=932i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=42i,twothousand=1042i,fivethous=4042i,tenthous=9042i,odd=84i,even=85i,stringu1="UJAAAA",stringu2="WJBAAA",string4="AAAAxx" 80611200000000000 +tenk unique1=9892i,unique2=933i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=892i,twothousand=1892i,fivethous=4892i,tenthous=9892i,odd=184i,even=185i,stringu1="MQAAAA",stringu2="XJBAAA",string4="HHHHxx" 80697600000000000 +tenk unique1=1771i,unique2=934i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=771i,twothousand=1771i,fivethous=1771i,tenthous=1771i,odd=142i,even=143i,stringu1="DQAAAA",stringu2="YJBAAA",string4="OOOOxx" 80784000000000000 +tenk unique1=7392i,unique2=935i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=392i,twothousand=1392i,fivethous=2392i,tenthous=7392i,odd=184i,even=185i,stringu1="IYAAAA",stringu2="ZJBAAA",string4="VVVVxx" 80870400000000000 +tenk unique1=4465i,unique2=936i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=465i,twothousand=465i,fivethous=4465i,tenthous=4465i,odd=130i,even=131i,stringu1="TPAAAA",stringu2="AKBAAA",string4="AAAAxx" 80956800000000000 +tenk unique1=278i,unique2=937i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=278i,twothousand=278i,fivethous=278i,tenthous=278i,odd=156i,even=157i,stringu1="SKAAAA",stringu2="BKBAAA",string4="HHHHxx" 81043200000000000 +tenk unique1=7776i,unique2=938i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=776i,twothousand=1776i,fivethous=2776i,tenthous=7776i,odd=152i,even=153i,stringu1="CNAAAA",stringu2="CKBAAA",string4="OOOOxx" 81129600000000000 +tenk unique1=3763i,unique2=939i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=763i,twothousand=1763i,fivethous=3763i,tenthous=3763i,odd=126i,even=127i,stringu1="TOAAAA",stringu2="DKBAAA",string4="VVVVxx" 81216000000000000 +tenk unique1=7503i,unique2=940i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=503i,twothousand=1503i,fivethous=2503i,tenthous=7503i,odd=6i,even=7i,stringu1="PCAAAA",stringu2="EKBAAA",string4="AAAAxx" 81302400000000000 +tenk unique1=3793i,unique2=941i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=793i,twothousand=1793i,fivethous=3793i,tenthous=3793i,odd=186i,even=187i,stringu1="XPAAAA",stringu2="FKBAAA",string4="HHHHxx" 81388800000000000 +tenk unique1=6510i,unique2=942i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=510i,twothousand=510i,fivethous=1510i,tenthous=6510i,odd=20i,even=21i,stringu1="KQAAAA",stringu2="GKBAAA",string4="OOOOxx" 81475200000000000 +tenk unique1=7641i,unique2=943i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=641i,twothousand=1641i,fivethous=2641i,tenthous=7641i,odd=82i,even=83i,stringu1="XHAAAA",stringu2="HKBAAA",string4="VVVVxx" 81561600000000000 +tenk unique1=3228i,unique2=944i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=228i,twothousand=1228i,fivethous=3228i,tenthous=3228i,odd=56i,even=57i,stringu1="EUAAAA",stringu2="IKBAAA",string4="AAAAxx" 81648000000000000 +tenk unique1=194i,unique2=945i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=194i,twothousand=194i,fivethous=194i,tenthous=194i,odd=188i,even=189i,stringu1="MHAAAA",stringu2="JKBAAA",string4="HHHHxx" 81734400000000000 +tenk unique1=8555i,unique2=946i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=555i,twothousand=555i,fivethous=3555i,tenthous=8555i,odd=110i,even=111i,stringu1="BRAAAA",stringu2="KKBAAA",string4="OOOOxx" 81820800000000000 +tenk unique1=4997i,unique2=947i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=997i,twothousand=997i,fivethous=4997i,tenthous=4997i,odd=194i,even=195i,stringu1="FKAAAA",stringu2="LKBAAA",string4="VVVVxx" 81907200000000000 +tenk unique1=8687i,unique2=948i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=687i,twothousand=687i,fivethous=3687i,tenthous=8687i,odd=174i,even=175i,stringu1="DWAAAA",stringu2="MKBAAA",string4="AAAAxx" 81993600000000000 +tenk unique1=6632i,unique2=949i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=632i,twothousand=632i,fivethous=1632i,tenthous=6632i,odd=64i,even=65i,stringu1="CVAAAA",stringu2="NKBAAA",string4="HHHHxx" 82080000000000000 +tenk unique1=9607i,unique2=950i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=607i,twothousand=1607i,fivethous=4607i,tenthous=9607i,odd=14i,even=15i,stringu1="NFAAAA",stringu2="OKBAAA",string4="OOOOxx" 82166400000000000 +tenk unique1=6201i,unique2=951i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=201i,twothousand=201i,fivethous=1201i,tenthous=6201i,odd=2i,even=3i,stringu1="NEAAAA",stringu2="PKBAAA",string4="VVVVxx" 82252800000000000 +tenk unique1=857i,unique2=952i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=857i,twothousand=857i,fivethous=857i,tenthous=857i,odd=114i,even=115i,stringu1="ZGAAAA",stringu2="QKBAAA",string4="AAAAxx" 82339200000000000 +tenk unique1=5623i,unique2=953i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=623i,twothousand=1623i,fivethous=623i,tenthous=5623i,odd=46i,even=47i,stringu1="HIAAAA",stringu2="RKBAAA",string4="HHHHxx" 82425600000000000 +tenk unique1=5979i,unique2=954i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=979i,twothousand=1979i,fivethous=979i,tenthous=5979i,odd=158i,even=159i,stringu1="ZVAAAA",stringu2="SKBAAA",string4="OOOOxx" 82512000000000000 +tenk unique1=2201i,unique2=955i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=201i,twothousand=201i,fivethous=2201i,tenthous=2201i,odd=2i,even=3i,stringu1="RGAAAA",stringu2="TKBAAA",string4="VVVVxx" 82598400000000000 +tenk unique1=3166i,unique2=956i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=166i,twothousand=1166i,fivethous=3166i,tenthous=3166i,odd=132i,even=133i,stringu1="URAAAA",stringu2="UKBAAA",string4="AAAAxx" 82684800000000000 +tenk unique1=6249i,unique2=957i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=249i,twothousand=249i,fivethous=1249i,tenthous=6249i,odd=98i,even=99i,stringu1="JGAAAA",stringu2="VKBAAA",string4="HHHHxx" 82771200000000000 +tenk unique1=3271i,unique2=958i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=271i,twothousand=1271i,fivethous=3271i,tenthous=3271i,odd=142i,even=143i,stringu1="VVAAAA",stringu2="WKBAAA",string4="OOOOxx" 82857600000000000 +tenk unique1=7777i,unique2=959i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=777i,twothousand=1777i,fivethous=2777i,tenthous=7777i,odd=154i,even=155i,stringu1="DNAAAA",stringu2="XKBAAA",string4="VVVVxx" 82944000000000000 +tenk unique1=6732i,unique2=960i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=732i,twothousand=732i,fivethous=1732i,tenthous=6732i,odd=64i,even=65i,stringu1="YYAAAA",stringu2="YKBAAA",string4="AAAAxx" 83030400000000000 +tenk unique1=6297i,unique2=961i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=297i,twothousand=297i,fivethous=1297i,tenthous=6297i,odd=194i,even=195i,stringu1="FIAAAA",stringu2="ZKBAAA",string4="HHHHxx" 83116800000000000 +tenk unique1=5685i,unique2=962i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=685i,twothousand=1685i,fivethous=685i,tenthous=5685i,odd=170i,even=171i,stringu1="RKAAAA",stringu2="ALBAAA",string4="OOOOxx" 83203200000000000 +tenk unique1=9931i,unique2=963i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=931i,twothousand=1931i,fivethous=4931i,tenthous=9931i,odd=62i,even=63i,stringu1="ZRAAAA",stringu2="BLBAAA",string4="VVVVxx" 83289600000000000 +tenk unique1=7485i,unique2=964i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=485i,twothousand=1485i,fivethous=2485i,tenthous=7485i,odd=170i,even=171i,stringu1="XBAAAA",stringu2="CLBAAA",string4="AAAAxx" 83376000000000000 +tenk unique1=386i,unique2=965i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=386i,twothousand=386i,fivethous=386i,tenthous=386i,odd=172i,even=173i,stringu1="WOAAAA",stringu2="DLBAAA",string4="HHHHxx" 83462400000000000 +tenk unique1=8204i,unique2=966i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=204i,twothousand=204i,fivethous=3204i,tenthous=8204i,odd=8i,even=9i,stringu1="ODAAAA",stringu2="ELBAAA",string4="OOOOxx" 83548800000000000 +tenk unique1=3606i,unique2=967i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=606i,twothousand=1606i,fivethous=3606i,tenthous=3606i,odd=12i,even=13i,stringu1="SIAAAA",stringu2="FLBAAA",string4="VVVVxx" 83635200000000000 +tenk unique1=1692i,unique2=968i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=692i,twothousand=1692i,fivethous=1692i,tenthous=1692i,odd=184i,even=185i,stringu1="CNAAAA",stringu2="GLBAAA",string4="AAAAxx" 83721600000000000 +tenk unique1=3002i,unique2=969i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=1002i,fivethous=3002i,tenthous=3002i,odd=4i,even=5i,stringu1="MLAAAA",stringu2="HLBAAA",string4="HHHHxx" 83808000000000000 +tenk unique1=9676i,unique2=970i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=676i,twothousand=1676i,fivethous=4676i,tenthous=9676i,odd=152i,even=153i,stringu1="EIAAAA",stringu2="ILBAAA",string4="OOOOxx" 83894400000000000 +tenk unique1=915i,unique2=971i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=915i,twothousand=915i,fivethous=915i,tenthous=915i,odd=30i,even=31i,stringu1="FJAAAA",stringu2="JLBAAA",string4="VVVVxx" 83980800000000000 +tenk unique1=7706i,unique2=972i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=706i,twothousand=1706i,fivethous=2706i,tenthous=7706i,odd=12i,even=13i,stringu1="KKAAAA",stringu2="KLBAAA",string4="AAAAxx" 84067200000000000 +tenk unique1=6080i,unique2=973i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=80i,twothousand=80i,fivethous=1080i,tenthous=6080i,odd=160i,even=161i,stringu1="WZAAAA",stringu2="LLBAAA",string4="HHHHxx" 84153600000000000 +tenk unique1=1860i,unique2=974i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=860i,twothousand=1860i,fivethous=1860i,tenthous=1860i,odd=120i,even=121i,stringu1="OTAAAA",stringu2="MLBAAA",string4="OOOOxx" 84240000000000000 +tenk unique1=1444i,unique2=975i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=444i,twothousand=1444i,fivethous=1444i,tenthous=1444i,odd=88i,even=89i,stringu1="ODAAAA",stringu2="NLBAAA",string4="VVVVxx" 84326400000000000 +tenk unique1=7208i,unique2=976i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=208i,twothousand=1208i,fivethous=2208i,tenthous=7208i,odd=16i,even=17i,stringu1="GRAAAA",stringu2="OLBAAA",string4="AAAAxx" 84412800000000000 +tenk unique1=8554i,unique2=977i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=554i,twothousand=554i,fivethous=3554i,tenthous=8554i,odd=108i,even=109i,stringu1="ARAAAA",stringu2="PLBAAA",string4="HHHHxx" 84499200000000000 +tenk unique1=2028i,unique2=978i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=28i,twothousand=28i,fivethous=2028i,tenthous=2028i,odd=56i,even=57i,stringu1="AAAAAA",stringu2="QLBAAA",string4="OOOOxx" 84585600000000000 +tenk unique1=9893i,unique2=979i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=893i,twothousand=1893i,fivethous=4893i,tenthous=9893i,odd=186i,even=187i,stringu1="NQAAAA",stringu2="RLBAAA",string4="VVVVxx" 84672000000000000 +tenk unique1=4740i,unique2=980i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=740i,twothousand=740i,fivethous=4740i,tenthous=4740i,odd=80i,even=81i,stringu1="IAAAAA",stringu2="SLBAAA",string4="AAAAxx" 84758400000000000 +tenk unique1=6186i,unique2=981i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=186i,twothousand=186i,fivethous=1186i,tenthous=6186i,odd=172i,even=173i,stringu1="YDAAAA",stringu2="TLBAAA",string4="HHHHxx" 84844800000000000 +tenk unique1=6357i,unique2=982i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=357i,twothousand=357i,fivethous=1357i,tenthous=6357i,odd=114i,even=115i,stringu1="NKAAAA",stringu2="ULBAAA",string4="OOOOxx" 84931200000000000 +tenk unique1=3699i,unique2=983i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=699i,twothousand=1699i,fivethous=3699i,tenthous=3699i,odd=198i,even=199i,stringu1="HMAAAA",stringu2="VLBAAA",string4="VVVVxx" 85017600000000000 +tenk unique1=7620i,unique2=984i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=620i,twothousand=1620i,fivethous=2620i,tenthous=7620i,odd=40i,even=41i,stringu1="CHAAAA",stringu2="WLBAAA",string4="AAAAxx" 85104000000000000 +tenk unique1=921i,unique2=985i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=921i,twothousand=921i,fivethous=921i,tenthous=921i,odd=42i,even=43i,stringu1="LJAAAA",stringu2="XLBAAA",string4="HHHHxx" 85190400000000000 +tenk unique1=5506i,unique2=986i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=506i,twothousand=1506i,fivethous=506i,tenthous=5506i,odd=12i,even=13i,stringu1="UDAAAA",stringu2="YLBAAA",string4="OOOOxx" 85276800000000000 +tenk unique1=8851i,unique2=987i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=851i,twothousand=851i,fivethous=3851i,tenthous=8851i,odd=102i,even=103i,stringu1="LCAAAA",stringu2="ZLBAAA",string4="VVVVxx" 85363200000000000 +tenk unique1=3205i,unique2=988i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=205i,twothousand=1205i,fivethous=3205i,tenthous=3205i,odd=10i,even=11i,stringu1="HTAAAA",stringu2="AMBAAA",string4="AAAAxx" 85449600000000000 +tenk unique1=1956i,unique2=989i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=956i,twothousand=1956i,fivethous=1956i,tenthous=1956i,odd=112i,even=113i,stringu1="GXAAAA",stringu2="BMBAAA",string4="HHHHxx" 85536000000000000 +tenk unique1=6272i,unique2=990i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=272i,twothousand=272i,fivethous=1272i,tenthous=6272i,odd=144i,even=145i,stringu1="GHAAAA",stringu2="CMBAAA",string4="OOOOxx" 85622400000000000 +tenk unique1=1509i,unique2=991i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=509i,twothousand=1509i,fivethous=1509i,tenthous=1509i,odd=18i,even=19i,stringu1="BGAAAA",stringu2="DMBAAA",string4="VVVVxx" 85708800000000000 +tenk unique1=53i,unique2=992i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=53i,twothousand=53i,fivethous=53i,tenthous=53i,odd=106i,even=107i,stringu1="BCAAAA",stringu2="EMBAAA",string4="AAAAxx" 85795200000000000 +tenk unique1=213i,unique2=993i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=213i,twothousand=213i,fivethous=213i,tenthous=213i,odd=26i,even=27i,stringu1="FIAAAA",stringu2="FMBAAA",string4="HHHHxx" 85881600000000000 +tenk unique1=4924i,unique2=994i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=924i,twothousand=924i,fivethous=4924i,tenthous=4924i,odd=48i,even=49i,stringu1="KHAAAA",stringu2="GMBAAA",string4="OOOOxx" 85968000000000000 +tenk unique1=2097i,unique2=995i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=97i,twothousand=97i,fivethous=2097i,tenthous=2097i,odd=194i,even=195i,stringu1="RCAAAA",stringu2="HMBAAA",string4="VVVVxx" 86054400000000000 +tenk unique1=4607i,unique2=996i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=607i,twothousand=607i,fivethous=4607i,tenthous=4607i,odd=14i,even=15i,stringu1="FVAAAA",stringu2="IMBAAA",string4="AAAAxx" 86140800000000000 +tenk unique1=1582i,unique2=997i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=582i,twothousand=1582i,fivethous=1582i,tenthous=1582i,odd=164i,even=165i,stringu1="WIAAAA",stringu2="JMBAAA",string4="HHHHxx" 86227200000000000 +tenk unique1=6643i,unique2=998i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=643i,twothousand=643i,fivethous=1643i,tenthous=6643i,odd=86i,even=87i,stringu1="NVAAAA",stringu2="KMBAAA",string4="OOOOxx" 86313600000000000 +tenk unique1=2238i,unique2=999i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=238i,twothousand=238i,fivethous=2238i,tenthous=2238i,odd=76i,even=77i,stringu1="CIAAAA",stringu2="LMBAAA",string4="VVVVxx" 86400000000000000 +tenk unique1=2942i,unique2=1000i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=942i,twothousand=942i,fivethous=2942i,tenthous=2942i,odd=84i,even=85i,stringu1="EJAAAA",stringu2="MMBAAA",string4="AAAAxx" 86486400000000000 +tenk unique1=1655i,unique2=1001i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=655i,twothousand=1655i,fivethous=1655i,tenthous=1655i,odd=110i,even=111i,stringu1="RLAAAA",stringu2="NMBAAA",string4="HHHHxx" 86572800000000000 +tenk unique1=3226i,unique2=1002i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=226i,twothousand=1226i,fivethous=3226i,tenthous=3226i,odd=52i,even=53i,stringu1="CUAAAA",stringu2="OMBAAA",string4="OOOOxx" 86659200000000000 +tenk unique1=4263i,unique2=1003i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=263i,twothousand=263i,fivethous=4263i,tenthous=4263i,odd=126i,even=127i,stringu1="ZHAAAA",stringu2="PMBAAA",string4="VVVVxx" 86745600000000000 +tenk unique1=960i,unique2=1004i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=960i,twothousand=960i,fivethous=960i,tenthous=960i,odd=120i,even=121i,stringu1="YKAAAA",stringu2="QMBAAA",string4="AAAAxx" 86832000000000000 +tenk unique1=1213i,unique2=1005i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=213i,twothousand=1213i,fivethous=1213i,tenthous=1213i,odd=26i,even=27i,stringu1="RUAAAA",stringu2="RMBAAA",string4="HHHHxx" 86918400000000000 +tenk unique1=1845i,unique2=1006i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=845i,twothousand=1845i,fivethous=1845i,tenthous=1845i,odd=90i,even=91i,stringu1="ZSAAAA",stringu2="SMBAAA",string4="OOOOxx" 87004800000000000 +tenk unique1=6944i,unique2=1007i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=944i,twothousand=944i,fivethous=1944i,tenthous=6944i,odd=88i,even=89i,stringu1="CHAAAA",stringu2="TMBAAA",string4="VVVVxx" 87091200000000000 +tenk unique1=5284i,unique2=1008i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=284i,twothousand=1284i,fivethous=284i,tenthous=5284i,odd=168i,even=169i,stringu1="GVAAAA",stringu2="UMBAAA",string4="AAAAxx" 87177600000000000 +tenk unique1=188i,unique2=1009i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=188i,twothousand=188i,fivethous=188i,tenthous=188i,odd=176i,even=177i,stringu1="GHAAAA",stringu2="VMBAAA",string4="HHHHxx" 87264000000000000 +tenk unique1=748i,unique2=1010i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=748i,twothousand=748i,fivethous=748i,tenthous=748i,odd=96i,even=97i,stringu1="UCAAAA",stringu2="WMBAAA",string4="OOOOxx" 87350400000000000 +tenk unique1=2226i,unique2=1011i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=226i,twothousand=226i,fivethous=2226i,tenthous=2226i,odd=52i,even=53i,stringu1="QHAAAA",stringu2="XMBAAA",string4="VVVVxx" 87436800000000000 +tenk unique1=7342i,unique2=1012i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=342i,twothousand=1342i,fivethous=2342i,tenthous=7342i,odd=84i,even=85i,stringu1="KWAAAA",stringu2="YMBAAA",string4="AAAAxx" 87523200000000000 +tenk unique1=6120i,unique2=1013i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=120i,twothousand=120i,fivethous=1120i,tenthous=6120i,odd=40i,even=41i,stringu1="KBAAAA",stringu2="ZMBAAA",string4="HHHHxx" 87609600000000000 +tenk unique1=536i,unique2=1014i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=536i,twothousand=536i,fivethous=536i,tenthous=536i,odd=72i,even=73i,stringu1="QUAAAA",stringu2="ANBAAA",string4="OOOOxx" 87696000000000000 +tenk unique1=3239i,unique2=1015i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=239i,twothousand=1239i,fivethous=3239i,tenthous=3239i,odd=78i,even=79i,stringu1="PUAAAA",stringu2="BNBAAA",string4="VVVVxx" 87782400000000000 +tenk unique1=2832i,unique2=1016i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=832i,twothousand=832i,fivethous=2832i,tenthous=2832i,odd=64i,even=65i,stringu1="YEAAAA",stringu2="CNBAAA",string4="AAAAxx" 87868800000000000 +tenk unique1=5296i,unique2=1017i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=296i,twothousand=1296i,fivethous=296i,tenthous=5296i,odd=192i,even=193i,stringu1="SVAAAA",stringu2="DNBAAA",string4="HHHHxx" 87955200000000000 +tenk unique1=5795i,unique2=1018i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=795i,twothousand=1795i,fivethous=795i,tenthous=5795i,odd=190i,even=191i,stringu1="XOAAAA",stringu2="ENBAAA",string4="OOOOxx" 88041600000000000 +tenk unique1=6290i,unique2=1019i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=290i,twothousand=290i,fivethous=1290i,tenthous=6290i,odd=180i,even=181i,stringu1="YHAAAA",stringu2="FNBAAA",string4="VVVVxx" 88128000000000000 +tenk unique1=4916i,unique2=1020i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=916i,twothousand=916i,fivethous=4916i,tenthous=4916i,odd=32i,even=33i,stringu1="CHAAAA",stringu2="GNBAAA",string4="AAAAxx" 88214400000000000 +tenk unique1=8366i,unique2=1021i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=366i,twothousand=366i,fivethous=3366i,tenthous=8366i,odd=132i,even=133i,stringu1="UJAAAA",stringu2="HNBAAA",string4="HHHHxx" 88300800000000000 +tenk unique1=4248i,unique2=1022i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=248i,twothousand=248i,fivethous=4248i,tenthous=4248i,odd=96i,even=97i,stringu1="KHAAAA",stringu2="INBAAA",string4="OOOOxx" 88387200000000000 +tenk unique1=6460i,unique2=1023i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=460i,twothousand=460i,fivethous=1460i,tenthous=6460i,odd=120i,even=121i,stringu1="MOAAAA",stringu2="JNBAAA",string4="VVVVxx" 88473600000000000 +tenk unique1=9296i,unique2=1024i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=296i,twothousand=1296i,fivethous=4296i,tenthous=9296i,odd=192i,even=193i,stringu1="OTAAAA",stringu2="KNBAAA",string4="AAAAxx" 88560000000000000 +tenk unique1=3486i,unique2=1025i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=486i,twothousand=1486i,fivethous=3486i,tenthous=3486i,odd=172i,even=173i,stringu1="CEAAAA",stringu2="LNBAAA",string4="HHHHxx" 88646400000000000 +tenk unique1=5664i,unique2=1026i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=664i,twothousand=1664i,fivethous=664i,tenthous=5664i,odd=128i,even=129i,stringu1="WJAAAA",stringu2="MNBAAA",string4="OOOOxx" 88732800000000000 +tenk unique1=7624i,unique2=1027i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=624i,twothousand=1624i,fivethous=2624i,tenthous=7624i,odd=48i,even=49i,stringu1="GHAAAA",stringu2="NNBAAA",string4="VVVVxx" 88819200000000000 +tenk unique1=2790i,unique2=1028i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=790i,twothousand=790i,fivethous=2790i,tenthous=2790i,odd=180i,even=181i,stringu1="IDAAAA",stringu2="ONBAAA",string4="AAAAxx" 88905600000000000 +tenk unique1=682i,unique2=1029i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=682i,twothousand=682i,fivethous=682i,tenthous=682i,odd=164i,even=165i,stringu1="GAAAAA",stringu2="PNBAAA",string4="HHHHxx" 88992000000000000 +tenk unique1=6412i,unique2=1030i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=412i,twothousand=412i,fivethous=1412i,tenthous=6412i,odd=24i,even=25i,stringu1="QMAAAA",stringu2="QNBAAA",string4="OOOOxx" 89078400000000000 +tenk unique1=6882i,unique2=1031i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=882i,twothousand=882i,fivethous=1882i,tenthous=6882i,odd=164i,even=165i,stringu1="SEAAAA",stringu2="RNBAAA",string4="VVVVxx" 89164800000000000 +tenk unique1=1332i,unique2=1032i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=332i,twothousand=1332i,fivethous=1332i,tenthous=1332i,odd=64i,even=65i,stringu1="GZAAAA",stringu2="SNBAAA",string4="AAAAxx" 89251200000000000 +tenk unique1=4911i,unique2=1033i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=911i,twothousand=911i,fivethous=4911i,tenthous=4911i,odd=22i,even=23i,stringu1="XGAAAA",stringu2="TNBAAA",string4="HHHHxx" 89337600000000000 +tenk unique1=3528i,unique2=1034i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=528i,twothousand=1528i,fivethous=3528i,tenthous=3528i,odd=56i,even=57i,stringu1="SFAAAA",stringu2="UNBAAA",string4="OOOOxx" 89424000000000000 +tenk unique1=271i,unique2=1035i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=271i,twothousand=271i,fivethous=271i,tenthous=271i,odd=142i,even=143i,stringu1="LKAAAA",stringu2="VNBAAA",string4="VVVVxx" 89510400000000000 +tenk unique1=7007i,unique2=1036i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=1007i,fivethous=2007i,tenthous=7007i,odd=14i,even=15i,stringu1="NJAAAA",stringu2="WNBAAA",string4="AAAAxx" 89596800000000000 +tenk unique1=2198i,unique2=1037i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=198i,twothousand=198i,fivethous=2198i,tenthous=2198i,odd=196i,even=197i,stringu1="OGAAAA",stringu2="XNBAAA",string4="HHHHxx" 89683200000000000 +tenk unique1=4266i,unique2=1038i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=266i,twothousand=266i,fivethous=4266i,tenthous=4266i,odd=132i,even=133i,stringu1="CIAAAA",stringu2="YNBAAA",string4="OOOOxx" 89769600000000000 +tenk unique1=9867i,unique2=1039i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=867i,twothousand=1867i,fivethous=4867i,tenthous=9867i,odd=134i,even=135i,stringu1="NPAAAA",stringu2="ZNBAAA",string4="VVVVxx" 89856000000000000 +tenk unique1=7602i,unique2=1040i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=602i,twothousand=1602i,fivethous=2602i,tenthous=7602i,odd=4i,even=5i,stringu1="KGAAAA",stringu2="AOBAAA",string4="AAAAxx" 89942400000000000 +tenk unique1=7521i,unique2=1041i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=521i,twothousand=1521i,fivethous=2521i,tenthous=7521i,odd=42i,even=43i,stringu1="HDAAAA",stringu2="BOBAAA",string4="HHHHxx" 90028800000000000 +tenk unique1=7200i,unique2=1042i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=200i,twothousand=1200i,fivethous=2200i,tenthous=7200i,odd=0i,even=1i,stringu1="YQAAAA",stringu2="COBAAA",string4="OOOOxx" 90115200000000000 +tenk unique1=4816i,unique2=1043i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=816i,twothousand=816i,fivethous=4816i,tenthous=4816i,odd=32i,even=33i,stringu1="GDAAAA",stringu2="DOBAAA",string4="VVVVxx" 90201600000000000 +tenk unique1=1669i,unique2=1044i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=669i,twothousand=1669i,fivethous=1669i,tenthous=1669i,odd=138i,even=139i,stringu1="FMAAAA",stringu2="EOBAAA",string4="AAAAxx" 90288000000000000 +tenk unique1=4764i,unique2=1045i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=764i,twothousand=764i,fivethous=4764i,tenthous=4764i,odd=128i,even=129i,stringu1="GBAAAA",stringu2="FOBAAA",string4="HHHHxx" 90374400000000000 +tenk unique1=7393i,unique2=1046i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=393i,twothousand=1393i,fivethous=2393i,tenthous=7393i,odd=186i,even=187i,stringu1="JYAAAA",stringu2="GOBAAA",string4="OOOOxx" 90460800000000000 +tenk unique1=7434i,unique2=1047i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=434i,twothousand=1434i,fivethous=2434i,tenthous=7434i,odd=68i,even=69i,stringu1="YZAAAA",stringu2="HOBAAA",string4="VVVVxx" 90547200000000000 +tenk unique1=9079i,unique2=1048i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=79i,twothousand=1079i,fivethous=4079i,tenthous=9079i,odd=158i,even=159i,stringu1="FLAAAA",stringu2="IOBAAA",string4="AAAAxx" 90633600000000000 +tenk unique1=9668i,unique2=1049i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=668i,twothousand=1668i,fivethous=4668i,tenthous=9668i,odd=136i,even=137i,stringu1="WHAAAA",stringu2="JOBAAA",string4="HHHHxx" 90720000000000000 +tenk unique1=7184i,unique2=1050i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=184i,twothousand=1184i,fivethous=2184i,tenthous=7184i,odd=168i,even=169i,stringu1="IQAAAA",stringu2="KOBAAA",string4="OOOOxx" 90806400000000000 +tenk unique1=7347i,unique2=1051i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=347i,twothousand=1347i,fivethous=2347i,tenthous=7347i,odd=94i,even=95i,stringu1="PWAAAA",stringu2="LOBAAA",string4="VVVVxx" 90892800000000000 +tenk unique1=951i,unique2=1052i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=951i,twothousand=951i,fivethous=951i,tenthous=951i,odd=102i,even=103i,stringu1="PKAAAA",stringu2="MOBAAA",string4="AAAAxx" 90979200000000000 +tenk unique1=4513i,unique2=1053i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=513i,twothousand=513i,fivethous=4513i,tenthous=4513i,odd=26i,even=27i,stringu1="PRAAAA",stringu2="NOBAAA",string4="HHHHxx" 91065600000000000 +tenk unique1=2692i,unique2=1054i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=692i,twothousand=692i,fivethous=2692i,tenthous=2692i,odd=184i,even=185i,stringu1="OZAAAA",stringu2="OOBAAA",string4="OOOOxx" 91152000000000000 +tenk unique1=9930i,unique2=1055i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=930i,twothousand=1930i,fivethous=4930i,tenthous=9930i,odd=60i,even=61i,stringu1="YRAAAA",stringu2="POBAAA",string4="VVVVxx" 91238400000000000 +tenk unique1=4516i,unique2=1056i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=516i,twothousand=516i,fivethous=4516i,tenthous=4516i,odd=32i,even=33i,stringu1="SRAAAA",stringu2="QOBAAA",string4="AAAAxx" 91324800000000000 +tenk unique1=1592i,unique2=1057i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=592i,twothousand=1592i,fivethous=1592i,tenthous=1592i,odd=184i,even=185i,stringu1="GJAAAA",stringu2="ROBAAA",string4="HHHHxx" 91411200000000000 +tenk unique1=6312i,unique2=1058i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=312i,twothousand=312i,fivethous=1312i,tenthous=6312i,odd=24i,even=25i,stringu1="UIAAAA",stringu2="SOBAAA",string4="OOOOxx" 91497600000000000 +tenk unique1=185i,unique2=1059i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=185i,twothousand=185i,fivethous=185i,tenthous=185i,odd=170i,even=171i,stringu1="DHAAAA",stringu2="TOBAAA",string4="VVVVxx" 91584000000000000 +tenk unique1=1848i,unique2=1060i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=848i,twothousand=1848i,fivethous=1848i,tenthous=1848i,odd=96i,even=97i,stringu1="CTAAAA",stringu2="UOBAAA",string4="AAAAxx" 91670400000000000 +tenk unique1=5844i,unique2=1061i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=844i,twothousand=1844i,fivethous=844i,tenthous=5844i,odd=88i,even=89i,stringu1="UQAAAA",stringu2="VOBAAA",string4="HHHHxx" 91756800000000000 +tenk unique1=1666i,unique2=1062i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=666i,twothousand=1666i,fivethous=1666i,tenthous=1666i,odd=132i,even=133i,stringu1="CMAAAA",stringu2="WOBAAA",string4="OOOOxx" 91843200000000000 +tenk unique1=5864i,unique2=1063i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=864i,twothousand=1864i,fivethous=864i,tenthous=5864i,odd=128i,even=129i,stringu1="ORAAAA",stringu2="XOBAAA",string4="VVVVxx" 91929600000000000 +tenk unique1=1004i,unique2=1064i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=1004i,fivethous=1004i,tenthous=1004i,odd=8i,even=9i,stringu1="QMAAAA",stringu2="YOBAAA",string4="AAAAxx" 92016000000000000 +tenk unique1=1758i,unique2=1065i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=758i,twothousand=1758i,fivethous=1758i,tenthous=1758i,odd=116i,even=117i,stringu1="QPAAAA",stringu2="ZOBAAA",string4="HHHHxx" 92102400000000000 +tenk unique1=8823i,unique2=1066i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=823i,twothousand=823i,fivethous=3823i,tenthous=8823i,odd=46i,even=47i,stringu1="JBAAAA",stringu2="APBAAA",string4="OOOOxx" 92188800000000000 +tenk unique1=129i,unique2=1067i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=129i,twothousand=129i,fivethous=129i,tenthous=129i,odd=58i,even=59i,stringu1="ZEAAAA",stringu2="BPBAAA",string4="VVVVxx" 92275200000000000 +tenk unique1=5703i,unique2=1068i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=703i,twothousand=1703i,fivethous=703i,tenthous=5703i,odd=6i,even=7i,stringu1="JLAAAA",stringu2="CPBAAA",string4="AAAAxx" 92361600000000000 +tenk unique1=3331i,unique2=1069i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=331i,twothousand=1331i,fivethous=3331i,tenthous=3331i,odd=62i,even=63i,stringu1="DYAAAA",stringu2="DPBAAA",string4="HHHHxx" 92448000000000000 +tenk unique1=5791i,unique2=1070i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=791i,twothousand=1791i,fivethous=791i,tenthous=5791i,odd=182i,even=183i,stringu1="TOAAAA",stringu2="EPBAAA",string4="OOOOxx" 92534400000000000 +tenk unique1=4421i,unique2=1071i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=421i,twothousand=421i,fivethous=4421i,tenthous=4421i,odd=42i,even=43i,stringu1="BOAAAA",stringu2="FPBAAA",string4="VVVVxx" 92620800000000000 +tenk unique1=9740i,unique2=1072i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=740i,twothousand=1740i,fivethous=4740i,tenthous=9740i,odd=80i,even=81i,stringu1="QKAAAA",stringu2="GPBAAA",string4="AAAAxx" 92707200000000000 +tenk unique1=798i,unique2=1073i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=798i,twothousand=798i,fivethous=798i,tenthous=798i,odd=196i,even=197i,stringu1="SEAAAA",stringu2="HPBAAA",string4="HHHHxx" 92793600000000000 +tenk unique1=571i,unique2=1074i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=571i,twothousand=571i,fivethous=571i,tenthous=571i,odd=142i,even=143i,stringu1="ZVAAAA",stringu2="IPBAAA",string4="OOOOxx" 92880000000000000 +tenk unique1=7084i,unique2=1075i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=84i,twothousand=1084i,fivethous=2084i,tenthous=7084i,odd=168i,even=169i,stringu1="MMAAAA",stringu2="JPBAAA",string4="VVVVxx" 92966400000000000 +tenk unique1=650i,unique2=1076i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=650i,twothousand=650i,fivethous=650i,tenthous=650i,odd=100i,even=101i,stringu1="AZAAAA",stringu2="KPBAAA",string4="AAAAxx" 93052800000000000 +tenk unique1=1467i,unique2=1077i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=467i,twothousand=1467i,fivethous=1467i,tenthous=1467i,odd=134i,even=135i,stringu1="LEAAAA",stringu2="LPBAAA",string4="HHHHxx" 93139200000000000 +tenk unique1=5446i,unique2=1078i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=446i,twothousand=1446i,fivethous=446i,tenthous=5446i,odd=92i,even=93i,stringu1="MBAAAA",stringu2="MPBAAA",string4="OOOOxx" 93225600000000000 +tenk unique1=830i,unique2=1079i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=830i,twothousand=830i,fivethous=830i,tenthous=830i,odd=60i,even=61i,stringu1="YFAAAA",stringu2="NPBAAA",string4="VVVVxx" 93312000000000000 +tenk unique1=5516i,unique2=1080i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=516i,twothousand=1516i,fivethous=516i,tenthous=5516i,odd=32i,even=33i,stringu1="EEAAAA",stringu2="OPBAAA",string4="AAAAxx" 93398400000000000 +tenk unique1=8520i,unique2=1081i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=520i,twothousand=520i,fivethous=3520i,tenthous=8520i,odd=40i,even=41i,stringu1="SPAAAA",stringu2="PPBAAA",string4="HHHHxx" 93484800000000000 +tenk unique1=1152i,unique2=1082i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=152i,twothousand=1152i,fivethous=1152i,tenthous=1152i,odd=104i,even=105i,stringu1="ISAAAA",stringu2="QPBAAA",string4="OOOOxx" 93571200000000000 +tenk unique1=862i,unique2=1083i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=862i,twothousand=862i,fivethous=862i,tenthous=862i,odd=124i,even=125i,stringu1="EHAAAA",stringu2="RPBAAA",string4="VVVVxx" 93657600000000000 +tenk unique1=454i,unique2=1084i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=454i,twothousand=454i,fivethous=454i,tenthous=454i,odd=108i,even=109i,stringu1="MRAAAA",stringu2="SPBAAA",string4="AAAAxx" 93744000000000000 +tenk unique1=9956i,unique2=1085i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=956i,twothousand=1956i,fivethous=4956i,tenthous=9956i,odd=112i,even=113i,stringu1="YSAAAA",stringu2="TPBAAA",string4="HHHHxx" 93830400000000000 +tenk unique1=1654i,unique2=1086i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=654i,twothousand=1654i,fivethous=1654i,tenthous=1654i,odd=108i,even=109i,stringu1="QLAAAA",stringu2="UPBAAA",string4="OOOOxx" 93916800000000000 +tenk unique1=257i,unique2=1087i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=257i,twothousand=257i,fivethous=257i,tenthous=257i,odd=114i,even=115i,stringu1="XJAAAA",stringu2="VPBAAA",string4="VVVVxx" 94003200000000000 +tenk unique1=5469i,unique2=1088i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=469i,twothousand=1469i,fivethous=469i,tenthous=5469i,odd=138i,even=139i,stringu1="JCAAAA",stringu2="WPBAAA",string4="AAAAxx" 94089600000000000 +tenk unique1=9075i,unique2=1089i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=75i,twothousand=1075i,fivethous=4075i,tenthous=9075i,odd=150i,even=151i,stringu1="BLAAAA",stringu2="XPBAAA",string4="HHHHxx" 94176000000000000 +tenk unique1=7799i,unique2=1090i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=799i,twothousand=1799i,fivethous=2799i,tenthous=7799i,odd=198i,even=199i,stringu1="ZNAAAA",stringu2="YPBAAA",string4="OOOOxx" 94262400000000000 +tenk unique1=2001i,unique2=1091i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1i,fivethous=2001i,tenthous=2001i,odd=2i,even=3i,stringu1="ZYAAAA",stringu2="ZPBAAA",string4="VVVVxx" 94348800000000000 +tenk unique1=9786i,unique2=1092i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=786i,twothousand=1786i,fivethous=4786i,tenthous=9786i,odd=172i,even=173i,stringu1="KMAAAA",stringu2="AQBAAA",string4="AAAAxx" 94435200000000000 +tenk unique1=7281i,unique2=1093i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=281i,twothousand=1281i,fivethous=2281i,tenthous=7281i,odd=162i,even=163i,stringu1="BUAAAA",stringu2="BQBAAA",string4="HHHHxx" 94521600000000000 +tenk unique1=5137i,unique2=1094i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=137i,twothousand=1137i,fivethous=137i,tenthous=5137i,odd=74i,even=75i,stringu1="PPAAAA",stringu2="CQBAAA",string4="OOOOxx" 94608000000000000 +tenk unique1=4053i,unique2=1095i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=53i,twothousand=53i,fivethous=4053i,tenthous=4053i,odd=106i,even=107i,stringu1="XZAAAA",stringu2="DQBAAA",string4="VVVVxx" 94694400000000000 +tenk unique1=7911i,unique2=1096i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=911i,twothousand=1911i,fivethous=2911i,tenthous=7911i,odd=22i,even=23i,stringu1="HSAAAA",stringu2="EQBAAA",string4="AAAAxx" 94780800000000000 +tenk unique1=4298i,unique2=1097i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=298i,twothousand=298i,fivethous=4298i,tenthous=4298i,odd=196i,even=197i,stringu1="IJAAAA",stringu2="FQBAAA",string4="HHHHxx" 94867200000000000 +tenk unique1=4805i,unique2=1098i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=805i,twothousand=805i,fivethous=4805i,tenthous=4805i,odd=10i,even=11i,stringu1="VCAAAA",stringu2="GQBAAA",string4="OOOOxx" 94953600000000000 +tenk unique1=9038i,unique2=1099i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=38i,twothousand=1038i,fivethous=4038i,tenthous=9038i,odd=76i,even=77i,stringu1="QJAAAA",stringu2="HQBAAA",string4="VVVVxx" 95040000000000000 +tenk unique1=8023i,unique2=1100i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=23i,twothousand=23i,fivethous=3023i,tenthous=8023i,odd=46i,even=47i,stringu1="PWAAAA",stringu2="IQBAAA",string4="AAAAxx" 95126400000000000 +tenk unique1=6595i,unique2=1101i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=595i,twothousand=595i,fivethous=1595i,tenthous=6595i,odd=190i,even=191i,stringu1="RTAAAA",stringu2="JQBAAA",string4="HHHHxx" 95212800000000000 +tenk unique1=9831i,unique2=1102i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=831i,twothousand=1831i,fivethous=4831i,tenthous=9831i,odd=62i,even=63i,stringu1="DOAAAA",stringu2="KQBAAA",string4="OOOOxx" 95299200000000000 +tenk unique1=788i,unique2=1103i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=788i,twothousand=788i,fivethous=788i,tenthous=788i,odd=176i,even=177i,stringu1="IEAAAA",stringu2="LQBAAA",string4="VVVVxx" 95385600000000000 +tenk unique1=902i,unique2=1104i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=902i,twothousand=902i,fivethous=902i,tenthous=902i,odd=4i,even=5i,stringu1="SIAAAA",stringu2="MQBAAA",string4="AAAAxx" 95472000000000000 +tenk unique1=9137i,unique2=1105i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=137i,twothousand=1137i,fivethous=4137i,tenthous=9137i,odd=74i,even=75i,stringu1="LNAAAA",stringu2="NQBAAA",string4="HHHHxx" 95558400000000000 +tenk unique1=1744i,unique2=1106i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=744i,twothousand=1744i,fivethous=1744i,tenthous=1744i,odd=88i,even=89i,stringu1="CPAAAA",stringu2="OQBAAA",string4="OOOOxx" 95644800000000000 +tenk unique1=7285i,unique2=1107i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=285i,twothousand=1285i,fivethous=2285i,tenthous=7285i,odd=170i,even=171i,stringu1="FUAAAA",stringu2="PQBAAA",string4="VVVVxx" 95731200000000000 +tenk unique1=7006i,unique2=1108i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=1006i,fivethous=2006i,tenthous=7006i,odd=12i,even=13i,stringu1="MJAAAA",stringu2="QQBAAA",string4="AAAAxx" 95817600000000000 +tenk unique1=9236i,unique2=1109i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=236i,twothousand=1236i,fivethous=4236i,tenthous=9236i,odd=72i,even=73i,stringu1="GRAAAA",stringu2="RQBAAA",string4="HHHHxx" 95904000000000000 +tenk unique1=5472i,unique2=1110i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=472i,twothousand=1472i,fivethous=472i,tenthous=5472i,odd=144i,even=145i,stringu1="MCAAAA",stringu2="SQBAAA",string4="OOOOxx" 95990400000000000 +tenk unique1=7975i,unique2=1111i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=975i,twothousand=1975i,fivethous=2975i,tenthous=7975i,odd=150i,even=151i,stringu1="TUAAAA",stringu2="TQBAAA",string4="VVVVxx" 96076800000000000 +tenk unique1=4181i,unique2=1112i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=181i,twothousand=181i,fivethous=4181i,tenthous=4181i,odd=162i,even=163i,stringu1="VEAAAA",stringu2="UQBAAA",string4="AAAAxx" 96163200000000000 +tenk unique1=7677i,unique2=1113i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=677i,twothousand=1677i,fivethous=2677i,tenthous=7677i,odd=154i,even=155i,stringu1="HJAAAA",stringu2="VQBAAA",string4="HHHHxx" 96249600000000000 +tenk unique1=35i,unique2=1114i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=35i,twothousand=35i,fivethous=35i,tenthous=35i,odd=70i,even=71i,stringu1="JBAAAA",stringu2="WQBAAA",string4="OOOOxx" 96336000000000000 +tenk unique1=6813i,unique2=1115i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=813i,twothousand=813i,fivethous=1813i,tenthous=6813i,odd=26i,even=27i,stringu1="BCAAAA",stringu2="XQBAAA",string4="VVVVxx" 96422400000000000 +tenk unique1=6618i,unique2=1116i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=618i,twothousand=618i,fivethous=1618i,tenthous=6618i,odd=36i,even=37i,stringu1="OUAAAA",stringu2="YQBAAA",string4="AAAAxx" 96508800000000000 +tenk unique1=8069i,unique2=1117i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=69i,twothousand=69i,fivethous=3069i,tenthous=8069i,odd=138i,even=139i,stringu1="JYAAAA",stringu2="ZQBAAA",string4="HHHHxx" 96595200000000000 +tenk unique1=3071i,unique2=1118i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=71i,twothousand=1071i,fivethous=3071i,tenthous=3071i,odd=142i,even=143i,stringu1="DOAAAA",stringu2="ARBAAA",string4="OOOOxx" 96681600000000000 +tenk unique1=4390i,unique2=1119i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=390i,twothousand=390i,fivethous=4390i,tenthous=4390i,odd=180i,even=181i,stringu1="WMAAAA",stringu2="BRBAAA",string4="VVVVxx" 96768000000000000 +tenk unique1=7764i,unique2=1120i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=764i,twothousand=1764i,fivethous=2764i,tenthous=7764i,odd=128i,even=129i,stringu1="QMAAAA",stringu2="CRBAAA",string4="AAAAxx" 96854400000000000 +tenk unique1=8163i,unique2=1121i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=163i,twothousand=163i,fivethous=3163i,tenthous=8163i,odd=126i,even=127i,stringu1="ZBAAAA",stringu2="DRBAAA",string4="HHHHxx" 96940800000000000 +tenk unique1=1961i,unique2=1122i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=961i,twothousand=1961i,fivethous=1961i,tenthous=1961i,odd=122i,even=123i,stringu1="LXAAAA",stringu2="ERBAAA",string4="OOOOxx" 97027200000000000 +tenk unique1=1103i,unique2=1123i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=103i,twothousand=1103i,fivethous=1103i,tenthous=1103i,odd=6i,even=7i,stringu1="LQAAAA",stringu2="FRBAAA",string4="VVVVxx" 97113600000000000 +tenk unique1=5486i,unique2=1124i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=486i,twothousand=1486i,fivethous=486i,tenthous=5486i,odd=172i,even=173i,stringu1="ADAAAA",stringu2="GRBAAA",string4="AAAAxx" 97200000000000000 +tenk unique1=9513i,unique2=1125i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=513i,twothousand=1513i,fivethous=4513i,tenthous=9513i,odd=26i,even=27i,stringu1="XBAAAA",stringu2="HRBAAA",string4="HHHHxx" 97286400000000000 +tenk unique1=7311i,unique2=1126i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=311i,twothousand=1311i,fivethous=2311i,tenthous=7311i,odd=22i,even=23i,stringu1="FVAAAA",stringu2="IRBAAA",string4="OOOOxx" 97372800000000000 +tenk unique1=4144i,unique2=1127i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=144i,twothousand=144i,fivethous=4144i,tenthous=4144i,odd=88i,even=89i,stringu1="KDAAAA",stringu2="JRBAAA",string4="VVVVxx" 97459200000000000 +tenk unique1=7901i,unique2=1128i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=901i,twothousand=1901i,fivethous=2901i,tenthous=7901i,odd=2i,even=3i,stringu1="XRAAAA",stringu2="KRBAAA",string4="AAAAxx" 97545600000000000 +tenk unique1=4629i,unique2=1129i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=629i,twothousand=629i,fivethous=4629i,tenthous=4629i,odd=58i,even=59i,stringu1="BWAAAA",stringu2="LRBAAA",string4="HHHHxx" 97632000000000000 +tenk unique1=6858i,unique2=1130i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=858i,twothousand=858i,fivethous=1858i,tenthous=6858i,odd=116i,even=117i,stringu1="UDAAAA",stringu2="MRBAAA",string4="OOOOxx" 97718400000000000 +tenk unique1=125i,unique2=1131i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=125i,twothousand=125i,fivethous=125i,tenthous=125i,odd=50i,even=51i,stringu1="VEAAAA",stringu2="NRBAAA",string4="VVVVxx" 97804800000000000 +tenk unique1=3834i,unique2=1132i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=834i,twothousand=1834i,fivethous=3834i,tenthous=3834i,odd=68i,even=69i,stringu1="MRAAAA",stringu2="ORBAAA",string4="AAAAxx" 97891200000000000 +tenk unique1=8155i,unique2=1133i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=155i,twothousand=155i,fivethous=3155i,tenthous=8155i,odd=110i,even=111i,stringu1="RBAAAA",stringu2="PRBAAA",string4="HHHHxx" 97977600000000000 +tenk unique1=8230i,unique2=1134i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=230i,twothousand=230i,fivethous=3230i,tenthous=8230i,odd=60i,even=61i,stringu1="OEAAAA",stringu2="QRBAAA",string4="OOOOxx" 98064000000000000 +tenk unique1=744i,unique2=1135i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=744i,twothousand=744i,fivethous=744i,tenthous=744i,odd=88i,even=89i,stringu1="QCAAAA",stringu2="RRBAAA",string4="VVVVxx" 98150400000000000 +tenk unique1=357i,unique2=1136i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=357i,twothousand=357i,fivethous=357i,tenthous=357i,odd=114i,even=115i,stringu1="TNAAAA",stringu2="SRBAAA",string4="AAAAxx" 98236800000000000 +tenk unique1=2159i,unique2=1137i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=159i,twothousand=159i,fivethous=2159i,tenthous=2159i,odd=118i,even=119i,stringu1="BFAAAA",stringu2="TRBAAA",string4="HHHHxx" 98323200000000000 +tenk unique1=8559i,unique2=1138i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=559i,twothousand=559i,fivethous=3559i,tenthous=8559i,odd=118i,even=119i,stringu1="FRAAAA",stringu2="URBAAA",string4="OOOOxx" 98409600000000000 +tenk unique1=6866i,unique2=1139i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=866i,twothousand=866i,fivethous=1866i,tenthous=6866i,odd=132i,even=133i,stringu1="CEAAAA",stringu2="VRBAAA",string4="VVVVxx" 98496000000000000 +tenk unique1=3863i,unique2=1140i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=863i,twothousand=1863i,fivethous=3863i,tenthous=3863i,odd=126i,even=127i,stringu1="PSAAAA",stringu2="WRBAAA",string4="AAAAxx" 98582400000000000 +tenk unique1=4193i,unique2=1141i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=193i,twothousand=193i,fivethous=4193i,tenthous=4193i,odd=186i,even=187i,stringu1="HFAAAA",stringu2="XRBAAA",string4="HHHHxx" 98668800000000000 +tenk unique1=3277i,unique2=1142i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=277i,twothousand=1277i,fivethous=3277i,tenthous=3277i,odd=154i,even=155i,stringu1="BWAAAA",stringu2="YRBAAA",string4="OOOOxx" 98755200000000000 +tenk unique1=5577i,unique2=1143i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=577i,twothousand=1577i,fivethous=577i,tenthous=5577i,odd=154i,even=155i,stringu1="NGAAAA",stringu2="ZRBAAA",string4="VVVVxx" 98841600000000000 +tenk unique1=9503i,unique2=1144i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=503i,twothousand=1503i,fivethous=4503i,tenthous=9503i,odd=6i,even=7i,stringu1="NBAAAA",stringu2="ASBAAA",string4="AAAAxx" 98928000000000000 +tenk unique1=7642i,unique2=1145i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=642i,twothousand=1642i,fivethous=2642i,tenthous=7642i,odd=84i,even=85i,stringu1="YHAAAA",stringu2="BSBAAA",string4="HHHHxx" 99014400000000000 +tenk unique1=6197i,unique2=1146i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=197i,twothousand=197i,fivethous=1197i,tenthous=6197i,odd=194i,even=195i,stringu1="JEAAAA",stringu2="CSBAAA",string4="OOOOxx" 99100800000000000 +tenk unique1=8995i,unique2=1147i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=995i,twothousand=995i,fivethous=3995i,tenthous=8995i,odd=190i,even=191i,stringu1="ZHAAAA",stringu2="DSBAAA",string4="VVVVxx" 99187200000000000 +tenk unique1=440i,unique2=1148i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=440i,twothousand=440i,fivethous=440i,tenthous=440i,odd=80i,even=81i,stringu1="YQAAAA",stringu2="ESBAAA",string4="AAAAxx" 99273600000000000 +tenk unique1=8418i,unique2=1149i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=418i,twothousand=418i,fivethous=3418i,tenthous=8418i,odd=36i,even=37i,stringu1="ULAAAA",stringu2="FSBAAA",string4="HHHHxx" 99360000000000000 +tenk unique1=8531i,unique2=1150i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=531i,twothousand=531i,fivethous=3531i,tenthous=8531i,odd=62i,even=63i,stringu1="DQAAAA",stringu2="GSBAAA",string4="OOOOxx" 99446400000000000 +tenk unique1=3790i,unique2=1151i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=790i,twothousand=1790i,fivethous=3790i,tenthous=3790i,odd=180i,even=181i,stringu1="UPAAAA",stringu2="HSBAAA",string4="VVVVxx" 99532800000000000 +tenk unique1=7610i,unique2=1152i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=610i,twothousand=1610i,fivethous=2610i,tenthous=7610i,odd=20i,even=21i,stringu1="SGAAAA",stringu2="ISBAAA",string4="AAAAxx" 99619200000000000 +tenk unique1=1252i,unique2=1153i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=252i,twothousand=1252i,fivethous=1252i,tenthous=1252i,odd=104i,even=105i,stringu1="EWAAAA",stringu2="JSBAAA",string4="HHHHxx" 99705600000000000 +tenk unique1=7559i,unique2=1154i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=559i,twothousand=1559i,fivethous=2559i,tenthous=7559i,odd=118i,even=119i,stringu1="TEAAAA",stringu2="KSBAAA",string4="OOOOxx" 99792000000000000 +tenk unique1=9945i,unique2=1155i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=945i,twothousand=1945i,fivethous=4945i,tenthous=9945i,odd=90i,even=91i,stringu1="NSAAAA",stringu2="LSBAAA",string4="VVVVxx" 99878400000000000 +tenk unique1=9023i,unique2=1156i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=23i,twothousand=1023i,fivethous=4023i,tenthous=9023i,odd=46i,even=47i,stringu1="BJAAAA",stringu2="MSBAAA",string4="AAAAxx" 99964800000000000 +tenk unique1=3516i,unique2=1157i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=516i,twothousand=1516i,fivethous=3516i,tenthous=3516i,odd=32i,even=33i,stringu1="GFAAAA",stringu2="NSBAAA",string4="HHHHxx" 100051200000000000 +tenk unique1=4671i,unique2=1158i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=671i,twothousand=671i,fivethous=4671i,tenthous=4671i,odd=142i,even=143i,stringu1="RXAAAA",stringu2="OSBAAA",string4="OOOOxx" 100137600000000000 +tenk unique1=1465i,unique2=1159i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=465i,twothousand=1465i,fivethous=1465i,tenthous=1465i,odd=130i,even=131i,stringu1="JEAAAA",stringu2="PSBAAA",string4="VVVVxx" 100224000000000000 +tenk unique1=9515i,unique2=1160i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=515i,twothousand=1515i,fivethous=4515i,tenthous=9515i,odd=30i,even=31i,stringu1="ZBAAAA",stringu2="QSBAAA",string4="AAAAxx" 100310400000000000 +tenk unique1=3242i,unique2=1161i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=242i,twothousand=1242i,fivethous=3242i,tenthous=3242i,odd=84i,even=85i,stringu1="SUAAAA",stringu2="RSBAAA",string4="HHHHxx" 100396800000000000 +tenk unique1=1732i,unique2=1162i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=732i,twothousand=1732i,fivethous=1732i,tenthous=1732i,odd=64i,even=65i,stringu1="QOAAAA",stringu2="SSBAAA",string4="OOOOxx" 100483200000000000 +tenk unique1=1678i,unique2=1163i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=678i,twothousand=1678i,fivethous=1678i,tenthous=1678i,odd=156i,even=157i,stringu1="OMAAAA",stringu2="TSBAAA",string4="VVVVxx" 100569600000000000 +tenk unique1=1464i,unique2=1164i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=464i,twothousand=1464i,fivethous=1464i,tenthous=1464i,odd=128i,even=129i,stringu1="IEAAAA",stringu2="USBAAA",string4="AAAAxx" 100656000000000000 +tenk unique1=6546i,unique2=1165i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=546i,twothousand=546i,fivethous=1546i,tenthous=6546i,odd=92i,even=93i,stringu1="URAAAA",stringu2="VSBAAA",string4="HHHHxx" 100742400000000000 +tenk unique1=4448i,unique2=1166i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=448i,twothousand=448i,fivethous=4448i,tenthous=4448i,odd=96i,even=97i,stringu1="CPAAAA",stringu2="WSBAAA",string4="OOOOxx" 100828800000000000 +tenk unique1=9847i,unique2=1167i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=847i,twothousand=1847i,fivethous=4847i,tenthous=9847i,odd=94i,even=95i,stringu1="TOAAAA",stringu2="XSBAAA",string4="VVVVxx" 100915200000000000 +tenk unique1=8264i,unique2=1168i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=264i,twothousand=264i,fivethous=3264i,tenthous=8264i,odd=128i,even=129i,stringu1="WFAAAA",stringu2="YSBAAA",string4="AAAAxx" 101001600000000000 +tenk unique1=1620i,unique2=1169i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=620i,twothousand=1620i,fivethous=1620i,tenthous=1620i,odd=40i,even=41i,stringu1="IKAAAA",stringu2="ZSBAAA",string4="HHHHxx" 101088000000000000 +tenk unique1=9388i,unique2=1170i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=388i,twothousand=1388i,fivethous=4388i,tenthous=9388i,odd=176i,even=177i,stringu1="CXAAAA",stringu2="ATBAAA",string4="OOOOxx" 101174400000000000 +tenk unique1=6445i,unique2=1171i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=445i,twothousand=445i,fivethous=1445i,tenthous=6445i,odd=90i,even=91i,stringu1="XNAAAA",stringu2="BTBAAA",string4="VVVVxx" 101260800000000000 +tenk unique1=4789i,unique2=1172i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=789i,twothousand=789i,fivethous=4789i,tenthous=4789i,odd=178i,even=179i,stringu1="FCAAAA",stringu2="CTBAAA",string4="AAAAxx" 101347200000000000 +tenk unique1=1562i,unique2=1173i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=562i,twothousand=1562i,fivethous=1562i,tenthous=1562i,odd=124i,even=125i,stringu1="CIAAAA",stringu2="DTBAAA",string4="HHHHxx" 101433600000000000 +tenk unique1=7305i,unique2=1174i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=305i,twothousand=1305i,fivethous=2305i,tenthous=7305i,odd=10i,even=11i,stringu1="ZUAAAA",stringu2="ETBAAA",string4="OOOOxx" 101520000000000000 +tenk unique1=6344i,unique2=1175i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=344i,twothousand=344i,fivethous=1344i,tenthous=6344i,odd=88i,even=89i,stringu1="AKAAAA",stringu2="FTBAAA",string4="VVVVxx" 101606400000000000 +tenk unique1=5130i,unique2=1176i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=130i,twothousand=1130i,fivethous=130i,tenthous=5130i,odd=60i,even=61i,stringu1="IPAAAA",stringu2="GTBAAA",string4="AAAAxx" 101692800000000000 +tenk unique1=3284i,unique2=1177i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=284i,twothousand=1284i,fivethous=3284i,tenthous=3284i,odd=168i,even=169i,stringu1="IWAAAA",stringu2="HTBAAA",string4="HHHHxx" 101779200000000000 +tenk unique1=6346i,unique2=1178i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=346i,twothousand=346i,fivethous=1346i,tenthous=6346i,odd=92i,even=93i,stringu1="CKAAAA",stringu2="ITBAAA",string4="OOOOxx" 101865600000000000 +tenk unique1=1061i,unique2=1179i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=61i,twothousand=1061i,fivethous=1061i,tenthous=1061i,odd=122i,even=123i,stringu1="VOAAAA",stringu2="JTBAAA",string4="VVVVxx" 101952000000000000 +tenk unique1=872i,unique2=1180i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=872i,twothousand=872i,fivethous=872i,tenthous=872i,odd=144i,even=145i,stringu1="OHAAAA",stringu2="KTBAAA",string4="AAAAxx" 102038400000000000 +tenk unique1=123i,unique2=1181i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=123i,twothousand=123i,fivethous=123i,tenthous=123i,odd=46i,even=47i,stringu1="TEAAAA",stringu2="LTBAAA",string4="HHHHxx" 102124800000000000 +tenk unique1=7903i,unique2=1182i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=903i,twothousand=1903i,fivethous=2903i,tenthous=7903i,odd=6i,even=7i,stringu1="ZRAAAA",stringu2="MTBAAA",string4="OOOOxx" 102211200000000000 +tenk unique1=560i,unique2=1183i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=560i,twothousand=560i,fivethous=560i,tenthous=560i,odd=120i,even=121i,stringu1="OVAAAA",stringu2="NTBAAA",string4="VVVVxx" 102297600000000000 +tenk unique1=4446i,unique2=1184i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=446i,twothousand=446i,fivethous=4446i,tenthous=4446i,odd=92i,even=93i,stringu1="APAAAA",stringu2="OTBAAA",string4="AAAAxx" 102384000000000000 +tenk unique1=3909i,unique2=1185i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=909i,twothousand=1909i,fivethous=3909i,tenthous=3909i,odd=18i,even=19i,stringu1="JUAAAA",stringu2="PTBAAA",string4="HHHHxx" 102470400000000000 +tenk unique1=669i,unique2=1186i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=669i,twothousand=669i,fivethous=669i,tenthous=669i,odd=138i,even=139i,stringu1="TZAAAA",stringu2="QTBAAA",string4="OOOOxx" 102556800000000000 +tenk unique1=7843i,unique2=1187i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=843i,twothousand=1843i,fivethous=2843i,tenthous=7843i,odd=86i,even=87i,stringu1="RPAAAA",stringu2="RTBAAA",string4="VVVVxx" 102643200000000000 +tenk unique1=2546i,unique2=1188i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=546i,twothousand=546i,fivethous=2546i,tenthous=2546i,odd=92i,even=93i,stringu1="YTAAAA",stringu2="STBAAA",string4="AAAAxx" 102729600000000000 +tenk unique1=6757i,unique2=1189i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=757i,twothousand=757i,fivethous=1757i,tenthous=6757i,odd=114i,even=115i,stringu1="XZAAAA",stringu2="TTBAAA",string4="HHHHxx" 102816000000000000 +tenk unique1=466i,unique2=1190i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=466i,twothousand=466i,fivethous=466i,tenthous=466i,odd=132i,even=133i,stringu1="YRAAAA",stringu2="UTBAAA",string4="OOOOxx" 102902400000000000 +tenk unique1=5556i,unique2=1191i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=556i,twothousand=1556i,fivethous=556i,tenthous=5556i,odd=112i,even=113i,stringu1="SFAAAA",stringu2="VTBAAA",string4="VVVVxx" 102988800000000000 +tenk unique1=7196i,unique2=1192i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=196i,twothousand=1196i,fivethous=2196i,tenthous=7196i,odd=192i,even=193i,stringu1="UQAAAA",stringu2="WTBAAA",string4="AAAAxx" 103075200000000000 +tenk unique1=2947i,unique2=1193i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=947i,twothousand=947i,fivethous=2947i,tenthous=2947i,odd=94i,even=95i,stringu1="JJAAAA",stringu2="XTBAAA",string4="HHHHxx" 103161600000000000 +tenk unique1=6493i,unique2=1194i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=493i,twothousand=493i,fivethous=1493i,tenthous=6493i,odd=186i,even=187i,stringu1="TPAAAA",stringu2="YTBAAA",string4="OOOOxx" 103248000000000000 +tenk unique1=7203i,unique2=1195i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=203i,twothousand=1203i,fivethous=2203i,tenthous=7203i,odd=6i,even=7i,stringu1="BRAAAA",stringu2="ZTBAAA",string4="VVVVxx" 103334400000000000 +tenk unique1=3716i,unique2=1196i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=716i,twothousand=1716i,fivethous=3716i,tenthous=3716i,odd=32i,even=33i,stringu1="YMAAAA",stringu2="AUBAAA",string4="AAAAxx" 103420800000000000 +tenk unique1=8058i,unique2=1197i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=58i,twothousand=58i,fivethous=3058i,tenthous=8058i,odd=116i,even=117i,stringu1="YXAAAA",stringu2="BUBAAA",string4="HHHHxx" 103507200000000000 +tenk unique1=433i,unique2=1198i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=433i,twothousand=433i,fivethous=433i,tenthous=433i,odd=66i,even=67i,stringu1="RQAAAA",stringu2="CUBAAA",string4="OOOOxx" 103593600000000000 +tenk unique1=7649i,unique2=1199i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=649i,twothousand=1649i,fivethous=2649i,tenthous=7649i,odd=98i,even=99i,stringu1="FIAAAA",stringu2="DUBAAA",string4="VVVVxx" 103680000000000000 +tenk unique1=6966i,unique2=1200i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=966i,twothousand=966i,fivethous=1966i,tenthous=6966i,odd=132i,even=133i,stringu1="YHAAAA",stringu2="EUBAAA",string4="AAAAxx" 103766400000000000 +tenk unique1=553i,unique2=1201i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=553i,twothousand=553i,fivethous=553i,tenthous=553i,odd=106i,even=107i,stringu1="HVAAAA",stringu2="FUBAAA",string4="HHHHxx" 103852800000000000 +tenk unique1=3677i,unique2=1202i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=677i,twothousand=1677i,fivethous=3677i,tenthous=3677i,odd=154i,even=155i,stringu1="LLAAAA",stringu2="GUBAAA",string4="OOOOxx" 103939200000000000 +tenk unique1=2344i,unique2=1203i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=344i,twothousand=344i,fivethous=2344i,tenthous=2344i,odd=88i,even=89i,stringu1="EMAAAA",stringu2="HUBAAA",string4="VVVVxx" 104025600000000000 +tenk unique1=7439i,unique2=1204i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=439i,twothousand=1439i,fivethous=2439i,tenthous=7439i,odd=78i,even=79i,stringu1="DAAAAA",stringu2="IUBAAA",string4="AAAAxx" 104112000000000000 +tenk unique1=3910i,unique2=1205i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=910i,twothousand=1910i,fivethous=3910i,tenthous=3910i,odd=20i,even=21i,stringu1="KUAAAA",stringu2="JUBAAA",string4="HHHHxx" 104198400000000000 +tenk unique1=3638i,unique2=1206i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=638i,twothousand=1638i,fivethous=3638i,tenthous=3638i,odd=76i,even=77i,stringu1="YJAAAA",stringu2="KUBAAA",string4="OOOOxx" 104284800000000000 +tenk unique1=6637i,unique2=1207i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=637i,twothousand=637i,fivethous=1637i,tenthous=6637i,odd=74i,even=75i,stringu1="HVAAAA",stringu2="LUBAAA",string4="VVVVxx" 104371200000000000 +tenk unique1=4438i,unique2=1208i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=438i,twothousand=438i,fivethous=4438i,tenthous=4438i,odd=76i,even=77i,stringu1="SOAAAA",stringu2="MUBAAA",string4="AAAAxx" 104457600000000000 +tenk unique1=171i,unique2=1209i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=171i,twothousand=171i,fivethous=171i,tenthous=171i,odd=142i,even=143i,stringu1="PGAAAA",stringu2="NUBAAA",string4="HHHHxx" 104544000000000000 +tenk unique1=310i,unique2=1210i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=310i,twothousand=310i,fivethous=310i,tenthous=310i,odd=20i,even=21i,stringu1="YLAAAA",stringu2="OUBAAA",string4="OOOOxx" 104630400000000000 +tenk unique1=2714i,unique2=1211i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=714i,twothousand=714i,fivethous=2714i,tenthous=2714i,odd=28i,even=29i,stringu1="KAAAAA",stringu2="PUBAAA",string4="VVVVxx" 104716800000000000 +tenk unique1=5199i,unique2=1212i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=199i,twothousand=1199i,fivethous=199i,tenthous=5199i,odd=198i,even=199i,stringu1="ZRAAAA",stringu2="QUBAAA",string4="AAAAxx" 104803200000000000 +tenk unique1=8005i,unique2=1213i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=5i,fivethous=3005i,tenthous=8005i,odd=10i,even=11i,stringu1="XVAAAA",stringu2="RUBAAA",string4="HHHHxx" 104889600000000000 +tenk unique1=3188i,unique2=1214i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=188i,twothousand=1188i,fivethous=3188i,tenthous=3188i,odd=176i,even=177i,stringu1="QSAAAA",stringu2="SUBAAA",string4="OOOOxx" 104976000000000000 +tenk unique1=1518i,unique2=1215i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=518i,twothousand=1518i,fivethous=1518i,tenthous=1518i,odd=36i,even=37i,stringu1="KGAAAA",stringu2="TUBAAA",string4="VVVVxx" 105062400000000000 +tenk unique1=6760i,unique2=1216i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=760i,twothousand=760i,fivethous=1760i,tenthous=6760i,odd=120i,even=121i,stringu1="AAAAAA",stringu2="UUBAAA",string4="AAAAxx" 105148800000000000 +tenk unique1=9373i,unique2=1217i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=373i,twothousand=1373i,fivethous=4373i,tenthous=9373i,odd=146i,even=147i,stringu1="NWAAAA",stringu2="VUBAAA",string4="HHHHxx" 105235200000000000 +tenk unique1=1938i,unique2=1218i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=938i,twothousand=1938i,fivethous=1938i,tenthous=1938i,odd=76i,even=77i,stringu1="OWAAAA",stringu2="WUBAAA",string4="OOOOxx" 105321600000000000 +tenk unique1=2865i,unique2=1219i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=865i,twothousand=865i,fivethous=2865i,tenthous=2865i,odd=130i,even=131i,stringu1="FGAAAA",stringu2="XUBAAA",string4="VVVVxx" 105408000000000000 +tenk unique1=3203i,unique2=1220i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=203i,twothousand=1203i,fivethous=3203i,tenthous=3203i,odd=6i,even=7i,stringu1="FTAAAA",stringu2="YUBAAA",string4="AAAAxx" 105494400000000000 +tenk unique1=6025i,unique2=1221i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=25i,twothousand=25i,fivethous=1025i,tenthous=6025i,odd=50i,even=51i,stringu1="TXAAAA",stringu2="ZUBAAA",string4="HHHHxx" 105580800000000000 +tenk unique1=8684i,unique2=1222i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=684i,twothousand=684i,fivethous=3684i,tenthous=8684i,odd=168i,even=169i,stringu1="AWAAAA",stringu2="AVBAAA",string4="OOOOxx" 105667200000000000 +tenk unique1=7732i,unique2=1223i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=732i,twothousand=1732i,fivethous=2732i,tenthous=7732i,odd=64i,even=65i,stringu1="KLAAAA",stringu2="BVBAAA",string4="VVVVxx" 105753600000000000 +tenk unique1=3218i,unique2=1224i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=218i,twothousand=1218i,fivethous=3218i,tenthous=3218i,odd=36i,even=37i,stringu1="UTAAAA",stringu2="CVBAAA",string4="AAAAxx" 105840000000000000 +tenk unique1=525i,unique2=1225i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=525i,twothousand=525i,fivethous=525i,tenthous=525i,odd=50i,even=51i,stringu1="FUAAAA",stringu2="DVBAAA",string4="HHHHxx" 105926400000000000 +tenk unique1=601i,unique2=1226i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=601i,twothousand=601i,fivethous=601i,tenthous=601i,odd=2i,even=3i,stringu1="DXAAAA",stringu2="EVBAAA",string4="OOOOxx" 106012800000000000 +tenk unique1=6091i,unique2=1227i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=91i,twothousand=91i,fivethous=1091i,tenthous=6091i,odd=182i,even=183i,stringu1="HAAAAA",stringu2="FVBAAA",string4="VVVVxx" 106099200000000000 +tenk unique1=4498i,unique2=1228i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=498i,twothousand=498i,fivethous=4498i,tenthous=4498i,odd=196i,even=197i,stringu1="ARAAAA",stringu2="GVBAAA",string4="AAAAxx" 106185600000000000 +tenk unique1=8192i,unique2=1229i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=192i,twothousand=192i,fivethous=3192i,tenthous=8192i,odd=184i,even=185i,stringu1="CDAAAA",stringu2="HVBAAA",string4="HHHHxx" 106272000000000000 +tenk unique1=8006i,unique2=1230i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=6i,fivethous=3006i,tenthous=8006i,odd=12i,even=13i,stringu1="YVAAAA",stringu2="IVBAAA",string4="OOOOxx" 106358400000000000 +tenk unique1=6157i,unique2=1231i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=157i,twothousand=157i,fivethous=1157i,tenthous=6157i,odd=114i,even=115i,stringu1="VCAAAA",stringu2="JVBAAA",string4="VVVVxx" 106444800000000000 +tenk unique1=312i,unique2=1232i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=312i,twothousand=312i,fivethous=312i,tenthous=312i,odd=24i,even=25i,stringu1="AMAAAA",stringu2="KVBAAA",string4="AAAAxx" 106531200000000000 +tenk unique1=8652i,unique2=1233i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=652i,twothousand=652i,fivethous=3652i,tenthous=8652i,odd=104i,even=105i,stringu1="UUAAAA",stringu2="LVBAAA",string4="HHHHxx" 106617600000000000 +tenk unique1=2787i,unique2=1234i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=787i,twothousand=787i,fivethous=2787i,tenthous=2787i,odd=174i,even=175i,stringu1="FDAAAA",stringu2="MVBAAA",string4="OOOOxx" 106704000000000000 +tenk unique1=1782i,unique2=1235i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=782i,twothousand=1782i,fivethous=1782i,tenthous=1782i,odd=164i,even=165i,stringu1="OQAAAA",stringu2="NVBAAA",string4="VVVVxx" 106790400000000000 +tenk unique1=23i,unique2=1236i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=23i,twothousand=23i,fivethous=23i,tenthous=23i,odd=46i,even=47i,stringu1="XAAAAA",stringu2="OVBAAA",string4="AAAAxx" 106876800000000000 +tenk unique1=1206i,unique2=1237i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=206i,twothousand=1206i,fivethous=1206i,tenthous=1206i,odd=12i,even=13i,stringu1="KUAAAA",stringu2="PVBAAA",string4="HHHHxx" 106963200000000000 +tenk unique1=1076i,unique2=1238i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=76i,twothousand=1076i,fivethous=1076i,tenthous=1076i,odd=152i,even=153i,stringu1="KPAAAA",stringu2="QVBAAA",string4="OOOOxx" 107049600000000000 +tenk unique1=5379i,unique2=1239i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=379i,twothousand=1379i,fivethous=379i,tenthous=5379i,odd=158i,even=159i,stringu1="XYAAAA",stringu2="RVBAAA",string4="VVVVxx" 107136000000000000 +tenk unique1=2047i,unique2=1240i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=47i,twothousand=47i,fivethous=2047i,tenthous=2047i,odd=94i,even=95i,stringu1="TAAAAA",stringu2="SVBAAA",string4="AAAAxx" 107222400000000000 +tenk unique1=6262i,unique2=1241i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=262i,twothousand=262i,fivethous=1262i,tenthous=6262i,odd=124i,even=125i,stringu1="WGAAAA",stringu2="TVBAAA",string4="HHHHxx" 107308800000000000 +tenk unique1=1840i,unique2=1242i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=840i,twothousand=1840i,fivethous=1840i,tenthous=1840i,odd=80i,even=81i,stringu1="USAAAA",stringu2="UVBAAA",string4="OOOOxx" 107395200000000000 +tenk unique1=2106i,unique2=1243i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=106i,twothousand=106i,fivethous=2106i,tenthous=2106i,odd=12i,even=13i,stringu1="ADAAAA",stringu2="VVBAAA",string4="VVVVxx" 107481600000000000 +tenk unique1=1307i,unique2=1244i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=307i,twothousand=1307i,fivethous=1307i,tenthous=1307i,odd=14i,even=15i,stringu1="HYAAAA",stringu2="WVBAAA",string4="AAAAxx" 107568000000000000 +tenk unique1=735i,unique2=1245i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=735i,twothousand=735i,fivethous=735i,tenthous=735i,odd=70i,even=71i,stringu1="HCAAAA",stringu2="XVBAAA",string4="HHHHxx" 107654400000000000 +tenk unique1=3657i,unique2=1246i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=657i,twothousand=1657i,fivethous=3657i,tenthous=3657i,odd=114i,even=115i,stringu1="RKAAAA",stringu2="YVBAAA",string4="OOOOxx" 107740800000000000 +tenk unique1=3006i,unique2=1247i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=1006i,fivethous=3006i,tenthous=3006i,odd=12i,even=13i,stringu1="QLAAAA",stringu2="ZVBAAA",string4="VVVVxx" 107827200000000000 +tenk unique1=1538i,unique2=1248i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=538i,twothousand=1538i,fivethous=1538i,tenthous=1538i,odd=76i,even=77i,stringu1="EHAAAA",stringu2="AWBAAA",string4="AAAAxx" 107913600000000000 +tenk unique1=6098i,unique2=1249i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=98i,twothousand=98i,fivethous=1098i,tenthous=6098i,odd=196i,even=197i,stringu1="OAAAAA",stringu2="BWBAAA",string4="HHHHxx" 108000000000000000 +tenk unique1=5267i,unique2=1250i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=267i,twothousand=1267i,fivethous=267i,tenthous=5267i,odd=134i,even=135i,stringu1="PUAAAA",stringu2="CWBAAA",string4="OOOOxx" 108086400000000000 +tenk unique1=9757i,unique2=1251i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=757i,twothousand=1757i,fivethous=4757i,tenthous=9757i,odd=114i,even=115i,stringu1="HLAAAA",stringu2="DWBAAA",string4="VVVVxx" 108172800000000000 +tenk unique1=1236i,unique2=1252i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=236i,twothousand=1236i,fivethous=1236i,tenthous=1236i,odd=72i,even=73i,stringu1="OVAAAA",stringu2="EWBAAA",string4="AAAAxx" 108259200000000000 +tenk unique1=83i,unique2=1253i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=83i,twothousand=83i,fivethous=83i,tenthous=83i,odd=166i,even=167i,stringu1="FDAAAA",stringu2="FWBAAA",string4="HHHHxx" 108345600000000000 +tenk unique1=9227i,unique2=1254i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=227i,twothousand=1227i,fivethous=4227i,tenthous=9227i,odd=54i,even=55i,stringu1="XQAAAA",stringu2="GWBAAA",string4="OOOOxx" 108432000000000000 +tenk unique1=8772i,unique2=1255i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=772i,twothousand=772i,fivethous=3772i,tenthous=8772i,odd=144i,even=145i,stringu1="KZAAAA",stringu2="HWBAAA",string4="VVVVxx" 108518400000000000 +tenk unique1=8822i,unique2=1256i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=822i,twothousand=822i,fivethous=3822i,tenthous=8822i,odd=44i,even=45i,stringu1="IBAAAA",stringu2="IWBAAA",string4="AAAAxx" 108604800000000000 +tenk unique1=7167i,unique2=1257i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=167i,twothousand=1167i,fivethous=2167i,tenthous=7167i,odd=134i,even=135i,stringu1="RPAAAA",stringu2="JWBAAA",string4="HHHHxx" 108691200000000000 +tenk unique1=6909i,unique2=1258i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=909i,twothousand=909i,fivethous=1909i,tenthous=6909i,odd=18i,even=19i,stringu1="TFAAAA",stringu2="KWBAAA",string4="OOOOxx" 108777600000000000 +tenk unique1=1439i,unique2=1259i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=439i,twothousand=1439i,fivethous=1439i,tenthous=1439i,odd=78i,even=79i,stringu1="JDAAAA",stringu2="LWBAAA",string4="VVVVxx" 108864000000000000 +tenk unique1=2370i,unique2=1260i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=370i,twothousand=370i,fivethous=2370i,tenthous=2370i,odd=140i,even=141i,stringu1="ENAAAA",stringu2="MWBAAA",string4="AAAAxx" 108950400000000000 +tenk unique1=4577i,unique2=1261i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=577i,twothousand=577i,fivethous=4577i,tenthous=4577i,odd=154i,even=155i,stringu1="BUAAAA",stringu2="NWBAAA",string4="HHHHxx" 109036800000000000 +tenk unique1=2575i,unique2=1262i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=575i,twothousand=575i,fivethous=2575i,tenthous=2575i,odd=150i,even=151i,stringu1="BVAAAA",stringu2="OWBAAA",string4="OOOOxx" 109123200000000000 +tenk unique1=2795i,unique2=1263i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=795i,twothousand=795i,fivethous=2795i,tenthous=2795i,odd=190i,even=191i,stringu1="NDAAAA",stringu2="PWBAAA",string4="VVVVxx" 109209600000000000 +tenk unique1=5520i,unique2=1264i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=520i,twothousand=1520i,fivethous=520i,tenthous=5520i,odd=40i,even=41i,stringu1="IEAAAA",stringu2="QWBAAA",string4="AAAAxx" 109296000000000000 +tenk unique1=382i,unique2=1265i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=382i,twothousand=382i,fivethous=382i,tenthous=382i,odd=164i,even=165i,stringu1="SOAAAA",stringu2="RWBAAA",string4="HHHHxx" 109382400000000000 +tenk unique1=6335i,unique2=1266i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=335i,twothousand=335i,fivethous=1335i,tenthous=6335i,odd=70i,even=71i,stringu1="RJAAAA",stringu2="SWBAAA",string4="OOOOxx" 109468800000000000 +tenk unique1=8430i,unique2=1267i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=430i,twothousand=430i,fivethous=3430i,tenthous=8430i,odd=60i,even=61i,stringu1="GMAAAA",stringu2="TWBAAA",string4="VVVVxx" 109555200000000000 +tenk unique1=4131i,unique2=1268i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=131i,twothousand=131i,fivethous=4131i,tenthous=4131i,odd=62i,even=63i,stringu1="XCAAAA",stringu2="UWBAAA",string4="AAAAxx" 109641600000000000 +tenk unique1=9332i,unique2=1269i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=332i,twothousand=1332i,fivethous=4332i,tenthous=9332i,odd=64i,even=65i,stringu1="YUAAAA",stringu2="VWBAAA",string4="HHHHxx" 109728000000000000 +tenk unique1=293i,unique2=1270i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=293i,twothousand=293i,fivethous=293i,tenthous=293i,odd=186i,even=187i,stringu1="HLAAAA",stringu2="WWBAAA",string4="OOOOxx" 109814400000000000 +tenk unique1=2276i,unique2=1271i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=276i,twothousand=276i,fivethous=2276i,tenthous=2276i,odd=152i,even=153i,stringu1="OJAAAA",stringu2="XWBAAA",string4="VVVVxx" 109900800000000000 +tenk unique1=5687i,unique2=1272i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=687i,twothousand=1687i,fivethous=687i,tenthous=5687i,odd=174i,even=175i,stringu1="TKAAAA",stringu2="YWBAAA",string4="AAAAxx" 109987200000000000 +tenk unique1=5862i,unique2=1273i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=862i,twothousand=1862i,fivethous=862i,tenthous=5862i,odd=124i,even=125i,stringu1="MRAAAA",stringu2="ZWBAAA",string4="HHHHxx" 110073600000000000 +tenk unique1=5073i,unique2=1274i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=73i,twothousand=1073i,fivethous=73i,tenthous=5073i,odd=146i,even=147i,stringu1="DNAAAA",stringu2="AXBAAA",string4="OOOOxx" 110160000000000000 +tenk unique1=4170i,unique2=1275i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=170i,twothousand=170i,fivethous=4170i,tenthous=4170i,odd=140i,even=141i,stringu1="KEAAAA",stringu2="BXBAAA",string4="VVVVxx" 110246400000000000 +tenk unique1=5039i,unique2=1276i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=39i,twothousand=1039i,fivethous=39i,tenthous=5039i,odd=78i,even=79i,stringu1="VLAAAA",stringu2="CXBAAA",string4="AAAAxx" 110332800000000000 +tenk unique1=3294i,unique2=1277i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=294i,twothousand=1294i,fivethous=3294i,tenthous=3294i,odd=188i,even=189i,stringu1="SWAAAA",stringu2="DXBAAA",string4="HHHHxx" 110419200000000000 +tenk unique1=6015i,unique2=1278i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=15i,twothousand=15i,fivethous=1015i,tenthous=6015i,odd=30i,even=31i,stringu1="JXAAAA",stringu2="EXBAAA",string4="OOOOxx" 110505600000000000 +tenk unique1=9015i,unique2=1279i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=15i,twothousand=1015i,fivethous=4015i,tenthous=9015i,odd=30i,even=31i,stringu1="TIAAAA",stringu2="FXBAAA",string4="VVVVxx" 110592000000000000 +tenk unique1=9785i,unique2=1280i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=785i,twothousand=1785i,fivethous=4785i,tenthous=9785i,odd=170i,even=171i,stringu1="JMAAAA",stringu2="GXBAAA",string4="AAAAxx" 110678400000000000 +tenk unique1=4312i,unique2=1281i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=312i,twothousand=312i,fivethous=4312i,tenthous=4312i,odd=24i,even=25i,stringu1="WJAAAA",stringu2="HXBAAA",string4="HHHHxx" 110764800000000000 +tenk unique1=6343i,unique2=1282i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=343i,twothousand=343i,fivethous=1343i,tenthous=6343i,odd=86i,even=87i,stringu1="ZJAAAA",stringu2="IXBAAA",string4="OOOOxx" 110851200000000000 +tenk unique1=2161i,unique2=1283i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=161i,twothousand=161i,fivethous=2161i,tenthous=2161i,odd=122i,even=123i,stringu1="DFAAAA",stringu2="JXBAAA",string4="VVVVxx" 110937600000000000 +tenk unique1=4490i,unique2=1284i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=490i,twothousand=490i,fivethous=4490i,tenthous=4490i,odd=180i,even=181i,stringu1="SQAAAA",stringu2="KXBAAA",string4="AAAAxx" 111024000000000000 +tenk unique1=4454i,unique2=1285i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=454i,twothousand=454i,fivethous=4454i,tenthous=4454i,odd=108i,even=109i,stringu1="IPAAAA",stringu2="LXBAAA",string4="HHHHxx" 111110400000000000 +tenk unique1=7647i,unique2=1286i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=647i,twothousand=1647i,fivethous=2647i,tenthous=7647i,odd=94i,even=95i,stringu1="DIAAAA",stringu2="MXBAAA",string4="OOOOxx" 111196800000000000 +tenk unique1=1028i,unique2=1287i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=28i,twothousand=1028i,fivethous=1028i,tenthous=1028i,odd=56i,even=57i,stringu1="ONAAAA",stringu2="NXBAAA",string4="VVVVxx" 111283200000000000 +tenk unique1=2965i,unique2=1288i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=965i,twothousand=965i,fivethous=2965i,tenthous=2965i,odd=130i,even=131i,stringu1="BKAAAA",stringu2="OXBAAA",string4="AAAAxx" 111369600000000000 +tenk unique1=9900i,unique2=1289i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=900i,twothousand=1900i,fivethous=4900i,tenthous=9900i,odd=0i,even=1i,stringu1="UQAAAA",stringu2="PXBAAA",string4="HHHHxx" 111456000000000000 +tenk unique1=5509i,unique2=1290i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=509i,twothousand=1509i,fivethous=509i,tenthous=5509i,odd=18i,even=19i,stringu1="XDAAAA",stringu2="QXBAAA",string4="OOOOxx" 111542400000000000 +tenk unique1=7751i,unique2=1291i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=751i,twothousand=1751i,fivethous=2751i,tenthous=7751i,odd=102i,even=103i,stringu1="DMAAAA",stringu2="RXBAAA",string4="VVVVxx" 111628800000000000 +tenk unique1=9594i,unique2=1292i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=594i,twothousand=1594i,fivethous=4594i,tenthous=9594i,odd=188i,even=189i,stringu1="AFAAAA",stringu2="SXBAAA",string4="AAAAxx" 111715200000000000 +tenk unique1=7632i,unique2=1293i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=632i,twothousand=1632i,fivethous=2632i,tenthous=7632i,odd=64i,even=65i,stringu1="OHAAAA",stringu2="TXBAAA",string4="HHHHxx" 111801600000000000 +tenk unique1=6528i,unique2=1294i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=528i,twothousand=528i,fivethous=1528i,tenthous=6528i,odd=56i,even=57i,stringu1="CRAAAA",stringu2="UXBAAA",string4="OOOOxx" 111888000000000000 +tenk unique1=1041i,unique2=1295i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=41i,twothousand=1041i,fivethous=1041i,tenthous=1041i,odd=82i,even=83i,stringu1="BOAAAA",stringu2="VXBAAA",string4="VVVVxx" 111974400000000000 +tenk unique1=1534i,unique2=1296i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=534i,twothousand=1534i,fivethous=1534i,tenthous=1534i,odd=68i,even=69i,stringu1="AHAAAA",stringu2="WXBAAA",string4="AAAAxx" 112060800000000000 +tenk unique1=4229i,unique2=1297i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=229i,twothousand=229i,fivethous=4229i,tenthous=4229i,odd=58i,even=59i,stringu1="RGAAAA",stringu2="XXBAAA",string4="HHHHxx" 112147200000000000 +tenk unique1=84i,unique2=1298i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=84i,twothousand=84i,fivethous=84i,tenthous=84i,odd=168i,even=169i,stringu1="GDAAAA",stringu2="YXBAAA",string4="OOOOxx" 112233600000000000 +tenk unique1=2189i,unique2=1299i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=189i,twothousand=189i,fivethous=2189i,tenthous=2189i,odd=178i,even=179i,stringu1="FGAAAA",stringu2="ZXBAAA",string4="VVVVxx" 112320000000000000 +tenk unique1=7566i,unique2=1300i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=566i,twothousand=1566i,fivethous=2566i,tenthous=7566i,odd=132i,even=133i,stringu1="AFAAAA",stringu2="AYBAAA",string4="AAAAxx" 112406400000000000 +tenk unique1=707i,unique2=1301i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=707i,twothousand=707i,fivethous=707i,tenthous=707i,odd=14i,even=15i,stringu1="FBAAAA",stringu2="BYBAAA",string4="HHHHxx" 112492800000000000 +tenk unique1=581i,unique2=1302i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=581i,twothousand=581i,fivethous=581i,tenthous=581i,odd=162i,even=163i,stringu1="JWAAAA",stringu2="CYBAAA",string4="OOOOxx" 112579200000000000 +tenk unique1=6753i,unique2=1303i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=753i,twothousand=753i,fivethous=1753i,tenthous=6753i,odd=106i,even=107i,stringu1="TZAAAA",stringu2="DYBAAA",string4="VVVVxx" 112665600000000000 +tenk unique1=8604i,unique2=1304i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=604i,twothousand=604i,fivethous=3604i,tenthous=8604i,odd=8i,even=9i,stringu1="YSAAAA",stringu2="EYBAAA",string4="AAAAxx" 112752000000000000 +tenk unique1=373i,unique2=1305i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=373i,twothousand=373i,fivethous=373i,tenthous=373i,odd=146i,even=147i,stringu1="JOAAAA",stringu2="FYBAAA",string4="HHHHxx" 112838400000000000 +tenk unique1=9635i,unique2=1306i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=635i,twothousand=1635i,fivethous=4635i,tenthous=9635i,odd=70i,even=71i,stringu1="PGAAAA",stringu2="GYBAAA",string4="OOOOxx" 112924800000000000 +tenk unique1=9277i,unique2=1307i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=277i,twothousand=1277i,fivethous=4277i,tenthous=9277i,odd=154i,even=155i,stringu1="VSAAAA",stringu2="HYBAAA",string4="VVVVxx" 113011200000000000 +tenk unique1=7117i,unique2=1308i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=117i,twothousand=1117i,fivethous=2117i,tenthous=7117i,odd=34i,even=35i,stringu1="TNAAAA",stringu2="IYBAAA",string4="AAAAxx" 113097600000000000 +tenk unique1=8564i,unique2=1309i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=564i,twothousand=564i,fivethous=3564i,tenthous=8564i,odd=128i,even=129i,stringu1="KRAAAA",stringu2="JYBAAA",string4="HHHHxx" 113184000000000000 +tenk unique1=1697i,unique2=1310i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=697i,twothousand=1697i,fivethous=1697i,tenthous=1697i,odd=194i,even=195i,stringu1="HNAAAA",stringu2="KYBAAA",string4="OOOOxx" 113270400000000000 +tenk unique1=7840i,unique2=1311i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=840i,twothousand=1840i,fivethous=2840i,tenthous=7840i,odd=80i,even=81i,stringu1="OPAAAA",stringu2="LYBAAA",string4="VVVVxx" 113356800000000000 +tenk unique1=3646i,unique2=1312i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=646i,twothousand=1646i,fivethous=3646i,tenthous=3646i,odd=92i,even=93i,stringu1="GKAAAA",stringu2="MYBAAA",string4="AAAAxx" 113443200000000000 +tenk unique1=368i,unique2=1313i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=368i,twothousand=368i,fivethous=368i,tenthous=368i,odd=136i,even=137i,stringu1="EOAAAA",stringu2="NYBAAA",string4="HHHHxx" 113529600000000000 +tenk unique1=4797i,unique2=1314i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=797i,twothousand=797i,fivethous=4797i,tenthous=4797i,odd=194i,even=195i,stringu1="NCAAAA",stringu2="OYBAAA",string4="OOOOxx" 113616000000000000 +tenk unique1=5300i,unique2=1315i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=300i,twothousand=1300i,fivethous=300i,tenthous=5300i,odd=0i,even=1i,stringu1="WVAAAA",stringu2="PYBAAA",string4="VVVVxx" 113702400000000000 +tenk unique1=7664i,unique2=1316i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=664i,twothousand=1664i,fivethous=2664i,tenthous=7664i,odd=128i,even=129i,stringu1="UIAAAA",stringu2="QYBAAA",string4="AAAAxx" 113788800000000000 +tenk unique1=1466i,unique2=1317i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=466i,twothousand=1466i,fivethous=1466i,tenthous=1466i,odd=132i,even=133i,stringu1="KEAAAA",stringu2="RYBAAA",string4="HHHHxx" 113875200000000000 +tenk unique1=2477i,unique2=1318i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=477i,twothousand=477i,fivethous=2477i,tenthous=2477i,odd=154i,even=155i,stringu1="HRAAAA",stringu2="SYBAAA",string4="OOOOxx" 113961600000000000 +tenk unique1=2036i,unique2=1319i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=36i,twothousand=36i,fivethous=2036i,tenthous=2036i,odd=72i,even=73i,stringu1="IAAAAA",stringu2="TYBAAA",string4="VVVVxx" 114048000000000000 +tenk unique1=3624i,unique2=1320i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=624i,twothousand=1624i,fivethous=3624i,tenthous=3624i,odd=48i,even=49i,stringu1="KJAAAA",stringu2="UYBAAA",string4="AAAAxx" 114134400000000000 +tenk unique1=5099i,unique2=1321i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=99i,twothousand=1099i,fivethous=99i,tenthous=5099i,odd=198i,even=199i,stringu1="DOAAAA",stringu2="VYBAAA",string4="HHHHxx" 114220800000000000 +tenk unique1=1308i,unique2=1322i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=308i,twothousand=1308i,fivethous=1308i,tenthous=1308i,odd=16i,even=17i,stringu1="IYAAAA",stringu2="WYBAAA",string4="OOOOxx" 114307200000000000 +tenk unique1=3704i,unique2=1323i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=704i,twothousand=1704i,fivethous=3704i,tenthous=3704i,odd=8i,even=9i,stringu1="MMAAAA",stringu2="XYBAAA",string4="VVVVxx" 114393600000000000 +tenk unique1=2451i,unique2=1324i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=451i,twothousand=451i,fivethous=2451i,tenthous=2451i,odd=102i,even=103i,stringu1="HQAAAA",stringu2="YYBAAA",string4="AAAAxx" 114480000000000000 +tenk unique1=4898i,unique2=1325i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=898i,twothousand=898i,fivethous=4898i,tenthous=4898i,odd=196i,even=197i,stringu1="KGAAAA",stringu2="ZYBAAA",string4="HHHHxx" 114566400000000000 +tenk unique1=4959i,unique2=1326i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=959i,twothousand=959i,fivethous=4959i,tenthous=4959i,odd=118i,even=119i,stringu1="TIAAAA",stringu2="AZBAAA",string4="OOOOxx" 114652800000000000 +tenk unique1=5942i,unique2=1327i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=942i,twothousand=1942i,fivethous=942i,tenthous=5942i,odd=84i,even=85i,stringu1="OUAAAA",stringu2="BZBAAA",string4="VVVVxx" 114739200000000000 +tenk unique1=2425i,unique2=1328i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=425i,twothousand=425i,fivethous=2425i,tenthous=2425i,odd=50i,even=51i,stringu1="HPAAAA",stringu2="CZBAAA",string4="AAAAxx" 114825600000000000 +tenk unique1=7760i,unique2=1329i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=760i,twothousand=1760i,fivethous=2760i,tenthous=7760i,odd=120i,even=121i,stringu1="MMAAAA",stringu2="DZBAAA",string4="HHHHxx" 114912000000000000 +tenk unique1=6294i,unique2=1330i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=294i,twothousand=294i,fivethous=1294i,tenthous=6294i,odd=188i,even=189i,stringu1="CIAAAA",stringu2="EZBAAA",string4="OOOOxx" 114998400000000000 +tenk unique1=6785i,unique2=1331i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=785i,twothousand=785i,fivethous=1785i,tenthous=6785i,odd=170i,even=171i,stringu1="ZAAAAA",stringu2="FZBAAA",string4="VVVVxx" 115084800000000000 +tenk unique1=3542i,unique2=1332i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=542i,twothousand=1542i,fivethous=3542i,tenthous=3542i,odd=84i,even=85i,stringu1="GGAAAA",stringu2="GZBAAA",string4="AAAAxx" 115171200000000000 +tenk unique1=1809i,unique2=1333i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=809i,twothousand=1809i,fivethous=1809i,tenthous=1809i,odd=18i,even=19i,stringu1="PRAAAA",stringu2="HZBAAA",string4="HHHHxx" 115257600000000000 +tenk unique1=130i,unique2=1334i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=130i,twothousand=130i,fivethous=130i,tenthous=130i,odd=60i,even=61i,stringu1="AFAAAA",stringu2="IZBAAA",string4="OOOOxx" 115344000000000000 +tenk unique1=8672i,unique2=1335i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=672i,twothousand=672i,fivethous=3672i,tenthous=8672i,odd=144i,even=145i,stringu1="OVAAAA",stringu2="JZBAAA",string4="VVVVxx" 115430400000000000 +tenk unique1=2125i,unique2=1336i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=125i,twothousand=125i,fivethous=2125i,tenthous=2125i,odd=50i,even=51i,stringu1="TDAAAA",stringu2="KZBAAA",string4="AAAAxx" 115516800000000000 +tenk unique1=7683i,unique2=1337i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=683i,twothousand=1683i,fivethous=2683i,tenthous=7683i,odd=166i,even=167i,stringu1="NJAAAA",stringu2="LZBAAA",string4="HHHHxx" 115603200000000000 +tenk unique1=7842i,unique2=1338i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=842i,twothousand=1842i,fivethous=2842i,tenthous=7842i,odd=84i,even=85i,stringu1="QPAAAA",stringu2="MZBAAA",string4="OOOOxx" 115689600000000000 +tenk unique1=9584i,unique2=1339i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=584i,twothousand=1584i,fivethous=4584i,tenthous=9584i,odd=168i,even=169i,stringu1="QEAAAA",stringu2="NZBAAA",string4="VVVVxx" 115776000000000000 +tenk unique1=7963i,unique2=1340i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=963i,twothousand=1963i,fivethous=2963i,tenthous=7963i,odd=126i,even=127i,stringu1="HUAAAA",stringu2="OZBAAA",string4="AAAAxx" 115862400000000000 +tenk unique1=8581i,unique2=1341i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=581i,twothousand=581i,fivethous=3581i,tenthous=8581i,odd=162i,even=163i,stringu1="BSAAAA",stringu2="PZBAAA",string4="HHHHxx" 115948800000000000 +tenk unique1=2135i,unique2=1342i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=135i,twothousand=135i,fivethous=2135i,tenthous=2135i,odd=70i,even=71i,stringu1="DEAAAA",stringu2="QZBAAA",string4="OOOOxx" 116035200000000000 +tenk unique1=7352i,unique2=1343i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=352i,twothousand=1352i,fivethous=2352i,tenthous=7352i,odd=104i,even=105i,stringu1="UWAAAA",stringu2="RZBAAA",string4="VVVVxx" 116121600000000000 +tenk unique1=5789i,unique2=1344i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=789i,twothousand=1789i,fivethous=789i,tenthous=5789i,odd=178i,even=179i,stringu1="ROAAAA",stringu2="SZBAAA",string4="AAAAxx" 116208000000000000 +tenk unique1=8490i,unique2=1345i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=490i,twothousand=490i,fivethous=3490i,tenthous=8490i,odd=180i,even=181i,stringu1="OOAAAA",stringu2="TZBAAA",string4="HHHHxx" 116294400000000000 +tenk unique1=2145i,unique2=1346i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=145i,twothousand=145i,fivethous=2145i,tenthous=2145i,odd=90i,even=91i,stringu1="NEAAAA",stringu2="UZBAAA",string4="OOOOxx" 116380800000000000 +tenk unique1=7021i,unique2=1347i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=21i,twothousand=1021i,fivethous=2021i,tenthous=7021i,odd=42i,even=43i,stringu1="BKAAAA",stringu2="VZBAAA",string4="VVVVxx" 116467200000000000 +tenk unique1=3736i,unique2=1348i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=736i,twothousand=1736i,fivethous=3736i,tenthous=3736i,odd=72i,even=73i,stringu1="SNAAAA",stringu2="WZBAAA",string4="AAAAxx" 116553600000000000 +tenk unique1=7396i,unique2=1349i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=396i,twothousand=1396i,fivethous=2396i,tenthous=7396i,odd=192i,even=193i,stringu1="MYAAAA",stringu2="XZBAAA",string4="HHHHxx" 116640000000000000 +tenk unique1=6334i,unique2=1350i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=334i,twothousand=334i,fivethous=1334i,tenthous=6334i,odd=68i,even=69i,stringu1="QJAAAA",stringu2="YZBAAA",string4="OOOOxx" 116726400000000000 +tenk unique1=5461i,unique2=1351i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=461i,twothousand=1461i,fivethous=461i,tenthous=5461i,odd=122i,even=123i,stringu1="BCAAAA",stringu2="ZZBAAA",string4="VVVVxx" 116812800000000000 +tenk unique1=5337i,unique2=1352i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=337i,twothousand=1337i,fivethous=337i,tenthous=5337i,odd=74i,even=75i,stringu1="HXAAAA",stringu2="AACAAA",string4="AAAAxx" 116899200000000000 +tenk unique1=7440i,unique2=1353i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=440i,twothousand=1440i,fivethous=2440i,tenthous=7440i,odd=80i,even=81i,stringu1="EAAAAA",stringu2="BACAAA",string4="HHHHxx" 116985600000000000 +tenk unique1=6879i,unique2=1354i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=879i,twothousand=879i,fivethous=1879i,tenthous=6879i,odd=158i,even=159i,stringu1="PEAAAA",stringu2="CACAAA",string4="OOOOxx" 117072000000000000 +tenk unique1=2432i,unique2=1355i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=432i,twothousand=432i,fivethous=2432i,tenthous=2432i,odd=64i,even=65i,stringu1="OPAAAA",stringu2="DACAAA",string4="VVVVxx" 117158400000000000 +tenk unique1=8529i,unique2=1356i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=529i,twothousand=529i,fivethous=3529i,tenthous=8529i,odd=58i,even=59i,stringu1="BQAAAA",stringu2="EACAAA",string4="AAAAxx" 117244800000000000 +tenk unique1=7859i,unique2=1357i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=859i,twothousand=1859i,fivethous=2859i,tenthous=7859i,odd=118i,even=119i,stringu1="HQAAAA",stringu2="FACAAA",string4="HHHHxx" 117331200000000000 +tenk unique1=15i,unique2=1358i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=15i,twothousand=15i,fivethous=15i,tenthous=15i,odd=30i,even=31i,stringu1="PAAAAA",stringu2="GACAAA",string4="OOOOxx" 117417600000000000 +tenk unique1=7475i,unique2=1359i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=475i,twothousand=1475i,fivethous=2475i,tenthous=7475i,odd=150i,even=151i,stringu1="NBAAAA",stringu2="HACAAA",string4="VVVVxx" 117504000000000000 +tenk unique1=717i,unique2=1360i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=717i,twothousand=717i,fivethous=717i,tenthous=717i,odd=34i,even=35i,stringu1="PBAAAA",stringu2="IACAAA",string4="AAAAxx" 117590400000000000 +tenk unique1=250i,unique2=1361i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=250i,twothousand=250i,fivethous=250i,tenthous=250i,odd=100i,even=101i,stringu1="QJAAAA",stringu2="JACAAA",string4="HHHHxx" 117676800000000000 +tenk unique1=4700i,unique2=1362i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=700i,twothousand=700i,fivethous=4700i,tenthous=4700i,odd=0i,even=1i,stringu1="UYAAAA",stringu2="KACAAA",string4="OOOOxx" 117763200000000000 +tenk unique1=7510i,unique2=1363i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=510i,twothousand=1510i,fivethous=2510i,tenthous=7510i,odd=20i,even=21i,stringu1="WCAAAA",stringu2="LACAAA",string4="VVVVxx" 117849600000000000 +tenk unique1=4562i,unique2=1364i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=562i,twothousand=562i,fivethous=4562i,tenthous=4562i,odd=124i,even=125i,stringu1="MTAAAA",stringu2="MACAAA",string4="AAAAxx" 117936000000000000 +tenk unique1=8075i,unique2=1365i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=75i,twothousand=75i,fivethous=3075i,tenthous=8075i,odd=150i,even=151i,stringu1="PYAAAA",stringu2="NACAAA",string4="HHHHxx" 118022400000000000 +tenk unique1=871i,unique2=1366i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=871i,twothousand=871i,fivethous=871i,tenthous=871i,odd=142i,even=143i,stringu1="NHAAAA",stringu2="OACAAA",string4="OOOOxx" 118108800000000000 +tenk unique1=7161i,unique2=1367i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=161i,twothousand=1161i,fivethous=2161i,tenthous=7161i,odd=122i,even=123i,stringu1="LPAAAA",stringu2="PACAAA",string4="VVVVxx" 118195200000000000 +tenk unique1=9109i,unique2=1368i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=109i,twothousand=1109i,fivethous=4109i,tenthous=9109i,odd=18i,even=19i,stringu1="JMAAAA",stringu2="QACAAA",string4="AAAAxx" 118281600000000000 +tenk unique1=8675i,unique2=1369i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=675i,twothousand=675i,fivethous=3675i,tenthous=8675i,odd=150i,even=151i,stringu1="RVAAAA",stringu2="RACAAA",string4="HHHHxx" 118368000000000000 +tenk unique1=1025i,unique2=1370i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=25i,twothousand=1025i,fivethous=1025i,tenthous=1025i,odd=50i,even=51i,stringu1="LNAAAA",stringu2="SACAAA",string4="OOOOxx" 118454400000000000 +tenk unique1=4065i,unique2=1371i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=65i,twothousand=65i,fivethous=4065i,tenthous=4065i,odd=130i,even=131i,stringu1="JAAAAA",stringu2="TACAAA",string4="VVVVxx" 118540800000000000 +tenk unique1=3511i,unique2=1372i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=511i,twothousand=1511i,fivethous=3511i,tenthous=3511i,odd=22i,even=23i,stringu1="BFAAAA",stringu2="UACAAA",string4="AAAAxx" 118627200000000000 +tenk unique1=9840i,unique2=1373i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=840i,twothousand=1840i,fivethous=4840i,tenthous=9840i,odd=80i,even=81i,stringu1="MOAAAA",stringu2="VACAAA",string4="HHHHxx" 118713600000000000 +tenk unique1=7495i,unique2=1374i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=495i,twothousand=1495i,fivethous=2495i,tenthous=7495i,odd=190i,even=191i,stringu1="HCAAAA",stringu2="WACAAA",string4="OOOOxx" 118800000000000000 +tenk unique1=55i,unique2=1375i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=55i,twothousand=55i,fivethous=55i,tenthous=55i,odd=110i,even=111i,stringu1="DCAAAA",stringu2="XACAAA",string4="VVVVxx" 118886400000000000 +tenk unique1=6151i,unique2=1376i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=151i,twothousand=151i,fivethous=1151i,tenthous=6151i,odd=102i,even=103i,stringu1="PCAAAA",stringu2="YACAAA",string4="AAAAxx" 118972800000000000 +tenk unique1=2512i,unique2=1377i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=512i,twothousand=512i,fivethous=2512i,tenthous=2512i,odd=24i,even=25i,stringu1="QSAAAA",stringu2="ZACAAA",string4="HHHHxx" 119059200000000000 +tenk unique1=5881i,unique2=1378i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=881i,twothousand=1881i,fivethous=881i,tenthous=5881i,odd=162i,even=163i,stringu1="FSAAAA",stringu2="ABCAAA",string4="OOOOxx" 119145600000000000 +tenk unique1=1442i,unique2=1379i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=442i,twothousand=1442i,fivethous=1442i,tenthous=1442i,odd=84i,even=85i,stringu1="MDAAAA",stringu2="BBCAAA",string4="VVVVxx" 119232000000000000 +tenk unique1=1270i,unique2=1380i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=270i,twothousand=1270i,fivethous=1270i,tenthous=1270i,odd=140i,even=141i,stringu1="WWAAAA",stringu2="CBCAAA",string4="AAAAxx" 119318400000000000 +tenk unique1=959i,unique2=1381i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=959i,twothousand=959i,fivethous=959i,tenthous=959i,odd=118i,even=119i,stringu1="XKAAAA",stringu2="DBCAAA",string4="HHHHxx" 119404800000000000 +tenk unique1=8251i,unique2=1382i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=251i,twothousand=251i,fivethous=3251i,tenthous=8251i,odd=102i,even=103i,stringu1="JFAAAA",stringu2="EBCAAA",string4="OOOOxx" 119491200000000000 +tenk unique1=3051i,unique2=1383i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=51i,twothousand=1051i,fivethous=3051i,tenthous=3051i,odd=102i,even=103i,stringu1="JNAAAA",stringu2="FBCAAA",string4="VVVVxx" 119577600000000000 +tenk unique1=5052i,unique2=1384i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=52i,twothousand=1052i,fivethous=52i,tenthous=5052i,odd=104i,even=105i,stringu1="IMAAAA",stringu2="GBCAAA",string4="AAAAxx" 119664000000000000 +tenk unique1=1863i,unique2=1385i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=863i,twothousand=1863i,fivethous=1863i,tenthous=1863i,odd=126i,even=127i,stringu1="RTAAAA",stringu2="HBCAAA",string4="HHHHxx" 119750400000000000 +tenk unique1=344i,unique2=1386i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=344i,twothousand=344i,fivethous=344i,tenthous=344i,odd=88i,even=89i,stringu1="GNAAAA",stringu2="IBCAAA",string4="OOOOxx" 119836800000000000 +tenk unique1=3590i,unique2=1387i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=590i,twothousand=1590i,fivethous=3590i,tenthous=3590i,odd=180i,even=181i,stringu1="CIAAAA",stringu2="JBCAAA",string4="VVVVxx" 119923200000000000 +tenk unique1=4223i,unique2=1388i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=223i,twothousand=223i,fivethous=4223i,tenthous=4223i,odd=46i,even=47i,stringu1="LGAAAA",stringu2="KBCAAA",string4="AAAAxx" 120009600000000000 +tenk unique1=2284i,unique2=1389i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=284i,twothousand=284i,fivethous=2284i,tenthous=2284i,odd=168i,even=169i,stringu1="WJAAAA",stringu2="LBCAAA",string4="HHHHxx" 120096000000000000 +tenk unique1=9425i,unique2=1390i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=425i,twothousand=1425i,fivethous=4425i,tenthous=9425i,odd=50i,even=51i,stringu1="NYAAAA",stringu2="MBCAAA",string4="OOOOxx" 120182400000000000 +tenk unique1=6221i,unique2=1391i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=221i,twothousand=221i,fivethous=1221i,tenthous=6221i,odd=42i,even=43i,stringu1="HFAAAA",stringu2="NBCAAA",string4="VVVVxx" 120268800000000000 +tenk unique1=195i,unique2=1392i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=195i,twothousand=195i,fivethous=195i,tenthous=195i,odd=190i,even=191i,stringu1="NHAAAA",stringu2="OBCAAA",string4="AAAAxx" 120355200000000000 +tenk unique1=1517i,unique2=1393i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=517i,twothousand=1517i,fivethous=1517i,tenthous=1517i,odd=34i,even=35i,stringu1="JGAAAA",stringu2="PBCAAA",string4="HHHHxx" 120441600000000000 +tenk unique1=3791i,unique2=1394i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=791i,twothousand=1791i,fivethous=3791i,tenthous=3791i,odd=182i,even=183i,stringu1="VPAAAA",stringu2="QBCAAA",string4="OOOOxx" 120528000000000000 +tenk unique1=572i,unique2=1395i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=572i,twothousand=572i,fivethous=572i,tenthous=572i,odd=144i,even=145i,stringu1="AWAAAA",stringu2="RBCAAA",string4="VVVVxx" 120614400000000000 +tenk unique1=46i,unique2=1396i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=46i,twothousand=46i,fivethous=46i,tenthous=46i,odd=92i,even=93i,stringu1="UBAAAA",stringu2="SBCAAA",string4="AAAAxx" 120700800000000000 +tenk unique1=9451i,unique2=1397i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=451i,twothousand=1451i,fivethous=4451i,tenthous=9451i,odd=102i,even=103i,stringu1="NZAAAA",stringu2="TBCAAA",string4="HHHHxx" 120787200000000000 +tenk unique1=3359i,unique2=1398i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=359i,twothousand=1359i,fivethous=3359i,tenthous=3359i,odd=118i,even=119i,stringu1="FZAAAA",stringu2="UBCAAA",string4="OOOOxx" 120873600000000000 +tenk unique1=8867i,unique2=1399i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=867i,twothousand=867i,fivethous=3867i,tenthous=8867i,odd=134i,even=135i,stringu1="BDAAAA",stringu2="VBCAAA",string4="VVVVxx" 120960000000000000 +tenk unique1=674i,unique2=1400i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=674i,twothousand=674i,fivethous=674i,tenthous=674i,odd=148i,even=149i,stringu1="YZAAAA",stringu2="WBCAAA",string4="AAAAxx" 121046400000000000 +tenk unique1=2674i,unique2=1401i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=674i,twothousand=674i,fivethous=2674i,tenthous=2674i,odd=148i,even=149i,stringu1="WYAAAA",stringu2="XBCAAA",string4="HHHHxx" 121132800000000000 +tenk unique1=6523i,unique2=1402i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=523i,twothousand=523i,fivethous=1523i,tenthous=6523i,odd=46i,even=47i,stringu1="XQAAAA",stringu2="YBCAAA",string4="OOOOxx" 121219200000000000 +tenk unique1=6210i,unique2=1403i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=210i,twothousand=210i,fivethous=1210i,tenthous=6210i,odd=20i,even=21i,stringu1="WEAAAA",stringu2="ZBCAAA",string4="VVVVxx" 121305600000000000 +tenk unique1=7564i,unique2=1404i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=564i,twothousand=1564i,fivethous=2564i,tenthous=7564i,odd=128i,even=129i,stringu1="YEAAAA",stringu2="ACCAAA",string4="AAAAxx" 121392000000000000 +tenk unique1=4776i,unique2=1405i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=776i,twothousand=776i,fivethous=4776i,tenthous=4776i,odd=152i,even=153i,stringu1="SBAAAA",stringu2="BCCAAA",string4="HHHHxx" 121478400000000000 +tenk unique1=2993i,unique2=1406i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=993i,twothousand=993i,fivethous=2993i,tenthous=2993i,odd=186i,even=187i,stringu1="DLAAAA",stringu2="CCCAAA",string4="OOOOxx" 121564800000000000 +tenk unique1=2969i,unique2=1407i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=969i,twothousand=969i,fivethous=2969i,tenthous=2969i,odd=138i,even=139i,stringu1="FKAAAA",stringu2="DCCAAA",string4="VVVVxx" 121651200000000000 +tenk unique1=1762i,unique2=1408i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=762i,twothousand=1762i,fivethous=1762i,tenthous=1762i,odd=124i,even=125i,stringu1="UPAAAA",stringu2="ECCAAA",string4="AAAAxx" 121737600000000000 +tenk unique1=685i,unique2=1409i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=685i,twothousand=685i,fivethous=685i,tenthous=685i,odd=170i,even=171i,stringu1="JAAAAA",stringu2="FCCAAA",string4="HHHHxx" 121824000000000000 +tenk unique1=5312i,unique2=1410i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=312i,twothousand=1312i,fivethous=312i,tenthous=5312i,odd=24i,even=25i,stringu1="IWAAAA",stringu2="GCCAAA",string4="OOOOxx" 121910400000000000 +tenk unique1=3264i,unique2=1411i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=264i,twothousand=1264i,fivethous=3264i,tenthous=3264i,odd=128i,even=129i,stringu1="OVAAAA",stringu2="HCCAAA",string4="VVVVxx" 121996800000000000 +tenk unique1=7008i,unique2=1412i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=1008i,fivethous=2008i,tenthous=7008i,odd=16i,even=17i,stringu1="OJAAAA",stringu2="ICCAAA",string4="AAAAxx" 122083200000000000 +tenk unique1=5167i,unique2=1413i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=167i,twothousand=1167i,fivethous=167i,tenthous=5167i,odd=134i,even=135i,stringu1="TQAAAA",stringu2="JCCAAA",string4="HHHHxx" 122169600000000000 +tenk unique1=3060i,unique2=1414i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=60i,twothousand=1060i,fivethous=3060i,tenthous=3060i,odd=120i,even=121i,stringu1="SNAAAA",stringu2="KCCAAA",string4="OOOOxx" 122256000000000000 +tenk unique1=1752i,unique2=1415i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=752i,twothousand=1752i,fivethous=1752i,tenthous=1752i,odd=104i,even=105i,stringu1="KPAAAA",stringu2="LCCAAA",string4="VVVVxx" 122342400000000000 +tenk unique1=1016i,unique2=1416i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=16i,twothousand=1016i,fivethous=1016i,tenthous=1016i,odd=32i,even=33i,stringu1="CNAAAA",stringu2="MCCAAA",string4="AAAAxx" 122428800000000000 +tenk unique1=7365i,unique2=1417i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=365i,twothousand=1365i,fivethous=2365i,tenthous=7365i,odd=130i,even=131i,stringu1="HXAAAA",stringu2="NCCAAA",string4="HHHHxx" 122515200000000000 +tenk unique1=4358i,unique2=1418i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=358i,twothousand=358i,fivethous=4358i,tenthous=4358i,odd=116i,even=117i,stringu1="QLAAAA",stringu2="OCCAAA",string4="OOOOxx" 122601600000000000 +tenk unique1=2819i,unique2=1419i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=819i,twothousand=819i,fivethous=2819i,tenthous=2819i,odd=38i,even=39i,stringu1="LEAAAA",stringu2="PCCAAA",string4="VVVVxx" 122688000000000000 +tenk unique1=6727i,unique2=1420i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=727i,twothousand=727i,fivethous=1727i,tenthous=6727i,odd=54i,even=55i,stringu1="TYAAAA",stringu2="QCCAAA",string4="AAAAxx" 122774400000000000 +tenk unique1=1459i,unique2=1421i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=459i,twothousand=1459i,fivethous=1459i,tenthous=1459i,odd=118i,even=119i,stringu1="DEAAAA",stringu2="RCCAAA",string4="HHHHxx" 122860800000000000 +tenk unique1=1708i,unique2=1422i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=708i,twothousand=1708i,fivethous=1708i,tenthous=1708i,odd=16i,even=17i,stringu1="SNAAAA",stringu2="SCCAAA",string4="OOOOxx" 122947200000000000 +tenk unique1=471i,unique2=1423i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=471i,twothousand=471i,fivethous=471i,tenthous=471i,odd=142i,even=143i,stringu1="DSAAAA",stringu2="TCCAAA",string4="VVVVxx" 123033600000000000 +tenk unique1=387i,unique2=1424i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=387i,twothousand=387i,fivethous=387i,tenthous=387i,odd=174i,even=175i,stringu1="XOAAAA",stringu2="UCCAAA",string4="AAAAxx" 123120000000000000 +tenk unique1=1166i,unique2=1425i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=166i,twothousand=1166i,fivethous=1166i,tenthous=1166i,odd=132i,even=133i,stringu1="WSAAAA",stringu2="VCCAAA",string4="HHHHxx" 123206400000000000 +tenk unique1=2400i,unique2=1426i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=400i,twothousand=400i,fivethous=2400i,tenthous=2400i,odd=0i,even=1i,stringu1="IOAAAA",stringu2="WCCAAA",string4="OOOOxx" 123292800000000000 +tenk unique1=3584i,unique2=1427i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=584i,twothousand=1584i,fivethous=3584i,tenthous=3584i,odd=168i,even=169i,stringu1="WHAAAA",stringu2="XCCAAA",string4="VVVVxx" 123379200000000000 +tenk unique1=6423i,unique2=1428i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=423i,twothousand=423i,fivethous=1423i,tenthous=6423i,odd=46i,even=47i,stringu1="BNAAAA",stringu2="YCCAAA",string4="AAAAxx" 123465600000000000 +tenk unique1=9520i,unique2=1429i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=520i,twothousand=1520i,fivethous=4520i,tenthous=9520i,odd=40i,even=41i,stringu1="ECAAAA",stringu2="ZCCAAA",string4="HHHHxx" 123552000000000000 +tenk unique1=8080i,unique2=1430i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=80i,twothousand=80i,fivethous=3080i,tenthous=8080i,odd=160i,even=161i,stringu1="UYAAAA",stringu2="ADCAAA",string4="OOOOxx" 123638400000000000 +tenk unique1=5709i,unique2=1431i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=709i,twothousand=1709i,fivethous=709i,tenthous=5709i,odd=18i,even=19i,stringu1="PLAAAA",stringu2="BDCAAA",string4="VVVVxx" 123724800000000000 +tenk unique1=1131i,unique2=1432i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=131i,twothousand=1131i,fivethous=1131i,tenthous=1131i,odd=62i,even=63i,stringu1="NRAAAA",stringu2="CDCAAA",string4="AAAAxx" 123811200000000000 +tenk unique1=8562i,unique2=1433i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=562i,twothousand=562i,fivethous=3562i,tenthous=8562i,odd=124i,even=125i,stringu1="IRAAAA",stringu2="DDCAAA",string4="HHHHxx" 123897600000000000 +tenk unique1=5766i,unique2=1434i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=766i,twothousand=1766i,fivethous=766i,tenthous=5766i,odd=132i,even=133i,stringu1="UNAAAA",stringu2="EDCAAA",string4="OOOOxx" 123984000000000000 +tenk unique1=245i,unique2=1435i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=245i,twothousand=245i,fivethous=245i,tenthous=245i,odd=90i,even=91i,stringu1="LJAAAA",stringu2="FDCAAA",string4="VVVVxx" 124070400000000000 +tenk unique1=9869i,unique2=1436i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=869i,twothousand=1869i,fivethous=4869i,tenthous=9869i,odd=138i,even=139i,stringu1="PPAAAA",stringu2="GDCAAA",string4="AAAAxx" 124156800000000000 +tenk unique1=3533i,unique2=1437i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=533i,twothousand=1533i,fivethous=3533i,tenthous=3533i,odd=66i,even=67i,stringu1="XFAAAA",stringu2="HDCAAA",string4="HHHHxx" 124243200000000000 +tenk unique1=5109i,unique2=1438i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=109i,twothousand=1109i,fivethous=109i,tenthous=5109i,odd=18i,even=19i,stringu1="NOAAAA",stringu2="IDCAAA",string4="OOOOxx" 124329600000000000 +tenk unique1=977i,unique2=1439i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=977i,twothousand=977i,fivethous=977i,tenthous=977i,odd=154i,even=155i,stringu1="PLAAAA",stringu2="JDCAAA",string4="VVVVxx" 124416000000000000 +tenk unique1=1651i,unique2=1440i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=651i,twothousand=1651i,fivethous=1651i,tenthous=1651i,odd=102i,even=103i,stringu1="NLAAAA",stringu2="KDCAAA",string4="AAAAxx" 124502400000000000 +tenk unique1=1357i,unique2=1441i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=357i,twothousand=1357i,fivethous=1357i,tenthous=1357i,odd=114i,even=115i,stringu1="FAAAAA",stringu2="LDCAAA",string4="HHHHxx" 124588800000000000 +tenk unique1=9087i,unique2=1442i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=87i,twothousand=1087i,fivethous=4087i,tenthous=9087i,odd=174i,even=175i,stringu1="NLAAAA",stringu2="MDCAAA",string4="OOOOxx" 124675200000000000 +tenk unique1=3399i,unique2=1443i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=399i,twothousand=1399i,fivethous=3399i,tenthous=3399i,odd=198i,even=199i,stringu1="TAAAAA",stringu2="NDCAAA",string4="VVVVxx" 124761600000000000 +tenk unique1=7543i,unique2=1444i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=543i,twothousand=1543i,fivethous=2543i,tenthous=7543i,odd=86i,even=87i,stringu1="DEAAAA",stringu2="ODCAAA",string4="AAAAxx" 124848000000000000 +tenk unique1=2469i,unique2=1445i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=469i,twothousand=469i,fivethous=2469i,tenthous=2469i,odd=138i,even=139i,stringu1="ZQAAAA",stringu2="PDCAAA",string4="HHHHxx" 124934400000000000 +tenk unique1=8305i,unique2=1446i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=305i,twothousand=305i,fivethous=3305i,tenthous=8305i,odd=10i,even=11i,stringu1="LHAAAA",stringu2="QDCAAA",string4="OOOOxx" 125020800000000000 +tenk unique1=3265i,unique2=1447i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=265i,twothousand=1265i,fivethous=3265i,tenthous=3265i,odd=130i,even=131i,stringu1="PVAAAA",stringu2="RDCAAA",string4="VVVVxx" 125107200000000000 +tenk unique1=9977i,unique2=1448i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=977i,twothousand=1977i,fivethous=4977i,tenthous=9977i,odd=154i,even=155i,stringu1="TTAAAA",stringu2="SDCAAA",string4="AAAAxx" 125193600000000000 +tenk unique1=3961i,unique2=1449i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=961i,twothousand=1961i,fivethous=3961i,tenthous=3961i,odd=122i,even=123i,stringu1="JWAAAA",stringu2="TDCAAA",string4="HHHHxx" 125280000000000000 +tenk unique1=4952i,unique2=1450i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=952i,twothousand=952i,fivethous=4952i,tenthous=4952i,odd=104i,even=105i,stringu1="MIAAAA",stringu2="UDCAAA",string4="OOOOxx" 125366400000000000 +tenk unique1=5173i,unique2=1451i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=173i,twothousand=1173i,fivethous=173i,tenthous=5173i,odd=146i,even=147i,stringu1="ZQAAAA",stringu2="VDCAAA",string4="VVVVxx" 125452800000000000 +tenk unique1=860i,unique2=1452i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=860i,twothousand=860i,fivethous=860i,tenthous=860i,odd=120i,even=121i,stringu1="CHAAAA",stringu2="WDCAAA",string4="AAAAxx" 125539200000000000 +tenk unique1=4523i,unique2=1453i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=523i,twothousand=523i,fivethous=4523i,tenthous=4523i,odd=46i,even=47i,stringu1="ZRAAAA",stringu2="XDCAAA",string4="HHHHxx" 125625600000000000 +tenk unique1=2361i,unique2=1454i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=361i,twothousand=361i,fivethous=2361i,tenthous=2361i,odd=122i,even=123i,stringu1="VMAAAA",stringu2="YDCAAA",string4="OOOOxx" 125712000000000000 +tenk unique1=7877i,unique2=1455i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=877i,twothousand=1877i,fivethous=2877i,tenthous=7877i,odd=154i,even=155i,stringu1="ZQAAAA",stringu2="ZDCAAA",string4="VVVVxx" 125798400000000000 +tenk unique1=3422i,unique2=1456i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=422i,twothousand=1422i,fivethous=3422i,tenthous=3422i,odd=44i,even=45i,stringu1="QBAAAA",stringu2="AECAAA",string4="AAAAxx" 125884800000000000 +tenk unique1=5781i,unique2=1457i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=781i,twothousand=1781i,fivethous=781i,tenthous=5781i,odd=162i,even=163i,stringu1="JOAAAA",stringu2="BECAAA",string4="HHHHxx" 125971200000000000 +tenk unique1=4752i,unique2=1458i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=752i,twothousand=752i,fivethous=4752i,tenthous=4752i,odd=104i,even=105i,stringu1="UAAAAA",stringu2="CECAAA",string4="OOOOxx" 126057600000000000 +tenk unique1=1786i,unique2=1459i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=786i,twothousand=1786i,fivethous=1786i,tenthous=1786i,odd=172i,even=173i,stringu1="SQAAAA",stringu2="DECAAA",string4="VVVVxx" 126144000000000000 +tenk unique1=1892i,unique2=1460i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=892i,twothousand=1892i,fivethous=1892i,tenthous=1892i,odd=184i,even=185i,stringu1="UUAAAA",stringu2="EECAAA",string4="AAAAxx" 126230400000000000 +tenk unique1=6389i,unique2=1461i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=389i,twothousand=389i,fivethous=1389i,tenthous=6389i,odd=178i,even=179i,stringu1="TLAAAA",stringu2="FECAAA",string4="HHHHxx" 126316800000000000 +tenk unique1=8644i,unique2=1462i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=644i,twothousand=644i,fivethous=3644i,tenthous=8644i,odd=88i,even=89i,stringu1="MUAAAA",stringu2="GECAAA",string4="OOOOxx" 126403200000000000 +tenk unique1=9056i,unique2=1463i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=56i,twothousand=1056i,fivethous=4056i,tenthous=9056i,odd=112i,even=113i,stringu1="IKAAAA",stringu2="HECAAA",string4="VVVVxx" 126489600000000000 +tenk unique1=1423i,unique2=1464i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=423i,twothousand=1423i,fivethous=1423i,tenthous=1423i,odd=46i,even=47i,stringu1="TCAAAA",stringu2="IECAAA",string4="AAAAxx" 126576000000000000 +tenk unique1=4901i,unique2=1465i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=901i,twothousand=901i,fivethous=4901i,tenthous=4901i,odd=2i,even=3i,stringu1="NGAAAA",stringu2="JECAAA",string4="HHHHxx" 126662400000000000 +tenk unique1=3859i,unique2=1466i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=859i,twothousand=1859i,fivethous=3859i,tenthous=3859i,odd=118i,even=119i,stringu1="LSAAAA",stringu2="KECAAA",string4="OOOOxx" 126748800000000000 +tenk unique1=2324i,unique2=1467i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=324i,twothousand=324i,fivethous=2324i,tenthous=2324i,odd=48i,even=49i,stringu1="KLAAAA",stringu2="LECAAA",string4="VVVVxx" 126835200000000000 +tenk unique1=8101i,unique2=1468i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=101i,twothousand=101i,fivethous=3101i,tenthous=8101i,odd=2i,even=3i,stringu1="PZAAAA",stringu2="MECAAA",string4="AAAAxx" 126921600000000000 +tenk unique1=8016i,unique2=1469i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=16i,twothousand=16i,fivethous=3016i,tenthous=8016i,odd=32i,even=33i,stringu1="IWAAAA",stringu2="NECAAA",string4="HHHHxx" 127008000000000000 +tenk unique1=5826i,unique2=1470i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=826i,twothousand=1826i,fivethous=826i,tenthous=5826i,odd=52i,even=53i,stringu1="CQAAAA",stringu2="OECAAA",string4="OOOOxx" 127094400000000000 +tenk unique1=8266i,unique2=1471i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=266i,twothousand=266i,fivethous=3266i,tenthous=8266i,odd=132i,even=133i,stringu1="YFAAAA",stringu2="PECAAA",string4="VVVVxx" 127180800000000000 +tenk unique1=7558i,unique2=1472i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=558i,twothousand=1558i,fivethous=2558i,tenthous=7558i,odd=116i,even=117i,stringu1="SEAAAA",stringu2="QECAAA",string4="AAAAxx" 127267200000000000 +tenk unique1=6976i,unique2=1473i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=976i,twothousand=976i,fivethous=1976i,tenthous=6976i,odd=152i,even=153i,stringu1="IIAAAA",stringu2="RECAAA",string4="HHHHxx" 127353600000000000 +tenk unique1=222i,unique2=1474i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=222i,twothousand=222i,fivethous=222i,tenthous=222i,odd=44i,even=45i,stringu1="OIAAAA",stringu2="SECAAA",string4="OOOOxx" 127440000000000000 +tenk unique1=1624i,unique2=1475i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=624i,twothousand=1624i,fivethous=1624i,tenthous=1624i,odd=48i,even=49i,stringu1="MKAAAA",stringu2="TECAAA",string4="VVVVxx" 127526400000000000 +tenk unique1=1250i,unique2=1476i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=250i,twothousand=1250i,fivethous=1250i,tenthous=1250i,odd=100i,even=101i,stringu1="CWAAAA",stringu2="UECAAA",string4="AAAAxx" 127612800000000000 +tenk unique1=1621i,unique2=1477i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=621i,twothousand=1621i,fivethous=1621i,tenthous=1621i,odd=42i,even=43i,stringu1="JKAAAA",stringu2="VECAAA",string4="HHHHxx" 127699200000000000 +tenk unique1=2350i,unique2=1478i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=350i,twothousand=350i,fivethous=2350i,tenthous=2350i,odd=100i,even=101i,stringu1="KMAAAA",stringu2="WECAAA",string4="OOOOxx" 127785600000000000 +tenk unique1=5239i,unique2=1479i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=239i,twothousand=1239i,fivethous=239i,tenthous=5239i,odd=78i,even=79i,stringu1="NTAAAA",stringu2="XECAAA",string4="VVVVxx" 127872000000000000 +tenk unique1=6681i,unique2=1480i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=681i,twothousand=681i,fivethous=1681i,tenthous=6681i,odd=162i,even=163i,stringu1="ZWAAAA",stringu2="YECAAA",string4="AAAAxx" 127958400000000000 +tenk unique1=4983i,unique2=1481i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=983i,twothousand=983i,fivethous=4983i,tenthous=4983i,odd=166i,even=167i,stringu1="RJAAAA",stringu2="ZECAAA",string4="HHHHxx" 128044800000000000 +tenk unique1=7149i,unique2=1482i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=149i,twothousand=1149i,fivethous=2149i,tenthous=7149i,odd=98i,even=99i,stringu1="ZOAAAA",stringu2="AFCAAA",string4="OOOOxx" 128131200000000000 +tenk unique1=3502i,unique2=1483i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=502i,twothousand=1502i,fivethous=3502i,tenthous=3502i,odd=4i,even=5i,stringu1="SEAAAA",stringu2="BFCAAA",string4="VVVVxx" 128217600000000000 +tenk unique1=3133i,unique2=1484i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=133i,twothousand=1133i,fivethous=3133i,tenthous=3133i,odd=66i,even=67i,stringu1="NQAAAA",stringu2="CFCAAA",string4="AAAAxx" 128304000000000000 +tenk unique1=8342i,unique2=1485i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=342i,twothousand=342i,fivethous=3342i,tenthous=8342i,odd=84i,even=85i,stringu1="WIAAAA",stringu2="DFCAAA",string4="HHHHxx" 128390400000000000 +tenk unique1=3041i,unique2=1486i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=41i,twothousand=1041i,fivethous=3041i,tenthous=3041i,odd=82i,even=83i,stringu1="ZMAAAA",stringu2="EFCAAA",string4="OOOOxx" 128476800000000000 +tenk unique1=5383i,unique2=1487i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=383i,twothousand=1383i,fivethous=383i,tenthous=5383i,odd=166i,even=167i,stringu1="BZAAAA",stringu2="FFCAAA",string4="VVVVxx" 128563200000000000 +tenk unique1=3916i,unique2=1488i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=916i,twothousand=1916i,fivethous=3916i,tenthous=3916i,odd=32i,even=33i,stringu1="QUAAAA",stringu2="GFCAAA",string4="AAAAxx" 128649600000000000 +tenk unique1=1438i,unique2=1489i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=438i,twothousand=1438i,fivethous=1438i,tenthous=1438i,odd=76i,even=77i,stringu1="IDAAAA",stringu2="HFCAAA",string4="HHHHxx" 128736000000000000 +tenk unique1=9408i,unique2=1490i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=408i,twothousand=1408i,fivethous=4408i,tenthous=9408i,odd=16i,even=17i,stringu1="WXAAAA",stringu2="IFCAAA",string4="OOOOxx" 128822400000000000 +tenk unique1=5783i,unique2=1491i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=783i,twothousand=1783i,fivethous=783i,tenthous=5783i,odd=166i,even=167i,stringu1="LOAAAA",stringu2="JFCAAA",string4="VVVVxx" 128908800000000000 +tenk unique1=683i,unique2=1492i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=683i,twothousand=683i,fivethous=683i,tenthous=683i,odd=166i,even=167i,stringu1="HAAAAA",stringu2="KFCAAA",string4="AAAAxx" 128995200000000000 +tenk unique1=9381i,unique2=1493i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=381i,twothousand=1381i,fivethous=4381i,tenthous=9381i,odd=162i,even=163i,stringu1="VWAAAA",stringu2="LFCAAA",string4="HHHHxx" 129081600000000000 +tenk unique1=5676i,unique2=1494i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=676i,twothousand=1676i,fivethous=676i,tenthous=5676i,odd=152i,even=153i,stringu1="IKAAAA",stringu2="MFCAAA",string4="OOOOxx" 129168000000000000 +tenk unique1=3224i,unique2=1495i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=224i,twothousand=1224i,fivethous=3224i,tenthous=3224i,odd=48i,even=49i,stringu1="AUAAAA",stringu2="NFCAAA",string4="VVVVxx" 129254400000000000 +tenk unique1=8332i,unique2=1496i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=332i,twothousand=332i,fivethous=3332i,tenthous=8332i,odd=64i,even=65i,stringu1="MIAAAA",stringu2="OFCAAA",string4="AAAAxx" 129340800000000000 +tenk unique1=3372i,unique2=1497i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=372i,twothousand=1372i,fivethous=3372i,tenthous=3372i,odd=144i,even=145i,stringu1="SZAAAA",stringu2="PFCAAA",string4="HHHHxx" 129427200000000000 +tenk unique1=7436i,unique2=1498i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=436i,twothousand=1436i,fivethous=2436i,tenthous=7436i,odd=72i,even=73i,stringu1="AAAAAA",stringu2="QFCAAA",string4="OOOOxx" 129513600000000000 +tenk unique1=5010i,unique2=1499i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=10i,twothousand=1010i,fivethous=10i,tenthous=5010i,odd=20i,even=21i,stringu1="SKAAAA",stringu2="RFCAAA",string4="VVVVxx" 129600000000000000 +tenk unique1=7256i,unique2=1500i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=256i,twothousand=1256i,fivethous=2256i,tenthous=7256i,odd=112i,even=113i,stringu1="CTAAAA",stringu2="SFCAAA",string4="AAAAxx" 129686400000000000 +tenk unique1=961i,unique2=1501i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=961i,twothousand=961i,fivethous=961i,tenthous=961i,odd=122i,even=123i,stringu1="ZKAAAA",stringu2="TFCAAA",string4="HHHHxx" 129772800000000000 +tenk unique1=4182i,unique2=1502i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=182i,twothousand=182i,fivethous=4182i,tenthous=4182i,odd=164i,even=165i,stringu1="WEAAAA",stringu2="UFCAAA",string4="OOOOxx" 129859200000000000 +tenk unique1=639i,unique2=1503i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=639i,twothousand=639i,fivethous=639i,tenthous=639i,odd=78i,even=79i,stringu1="PYAAAA",stringu2="VFCAAA",string4="VVVVxx" 129945600000000000 +tenk unique1=8836i,unique2=1504i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=836i,twothousand=836i,fivethous=3836i,tenthous=8836i,odd=72i,even=73i,stringu1="WBAAAA",stringu2="WFCAAA",string4="AAAAxx" 130032000000000000 +tenk unique1=8705i,unique2=1505i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=705i,twothousand=705i,fivethous=3705i,tenthous=8705i,odd=10i,even=11i,stringu1="VWAAAA",stringu2="XFCAAA",string4="HHHHxx" 130118400000000000 +tenk unique1=32i,unique2=1506i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=32i,twothousand=32i,fivethous=32i,tenthous=32i,odd=64i,even=65i,stringu1="GBAAAA",stringu2="YFCAAA",string4="OOOOxx" 130204800000000000 +tenk unique1=7913i,unique2=1507i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=913i,twothousand=1913i,fivethous=2913i,tenthous=7913i,odd=26i,even=27i,stringu1="JSAAAA",stringu2="ZFCAAA",string4="VVVVxx" 130291200000000000 +tenk unique1=229i,unique2=1508i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=229i,twothousand=229i,fivethous=229i,tenthous=229i,odd=58i,even=59i,stringu1="VIAAAA",stringu2="AGCAAA",string4="AAAAxx" 130377600000000000 +tenk unique1=2393i,unique2=1509i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=393i,twothousand=393i,fivethous=2393i,tenthous=2393i,odd=186i,even=187i,stringu1="BOAAAA",stringu2="BGCAAA",string4="HHHHxx" 130464000000000000 +tenk unique1=2815i,unique2=1510i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=815i,twothousand=815i,fivethous=2815i,tenthous=2815i,odd=30i,even=31i,stringu1="HEAAAA",stringu2="CGCAAA",string4="OOOOxx" 130550400000000000 +tenk unique1=4858i,unique2=1511i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=858i,twothousand=858i,fivethous=4858i,tenthous=4858i,odd=116i,even=117i,stringu1="WEAAAA",stringu2="DGCAAA",string4="VVVVxx" 130636800000000000 +tenk unique1=6283i,unique2=1512i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=283i,twothousand=283i,fivethous=1283i,tenthous=6283i,odd=166i,even=167i,stringu1="RHAAAA",stringu2="EGCAAA",string4="AAAAxx" 130723200000000000 +tenk unique1=4147i,unique2=1513i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=147i,twothousand=147i,fivethous=4147i,tenthous=4147i,odd=94i,even=95i,stringu1="NDAAAA",stringu2="FGCAAA",string4="HHHHxx" 130809600000000000 +tenk unique1=6801i,unique2=1514i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=801i,twothousand=801i,fivethous=1801i,tenthous=6801i,odd=2i,even=3i,stringu1="PBAAAA",stringu2="GGCAAA",string4="OOOOxx" 130896000000000000 +tenk unique1=1011i,unique2=1515i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=11i,twothousand=1011i,fivethous=1011i,tenthous=1011i,odd=22i,even=23i,stringu1="XMAAAA",stringu2="HGCAAA",string4="VVVVxx" 130982400000000000 +tenk unique1=2527i,unique2=1516i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=527i,twothousand=527i,fivethous=2527i,tenthous=2527i,odd=54i,even=55i,stringu1="FTAAAA",stringu2="IGCAAA",string4="AAAAxx" 131068800000000000 +tenk unique1=381i,unique2=1517i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=381i,twothousand=381i,fivethous=381i,tenthous=381i,odd=162i,even=163i,stringu1="ROAAAA",stringu2="JGCAAA",string4="HHHHxx" 131155200000000000 +tenk unique1=3366i,unique2=1518i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=366i,twothousand=1366i,fivethous=3366i,tenthous=3366i,odd=132i,even=133i,stringu1="MZAAAA",stringu2="KGCAAA",string4="OOOOxx" 131241600000000000 +tenk unique1=9636i,unique2=1519i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=636i,twothousand=1636i,fivethous=4636i,tenthous=9636i,odd=72i,even=73i,stringu1="QGAAAA",stringu2="LGCAAA",string4="VVVVxx" 131328000000000000 +tenk unique1=2239i,unique2=1520i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=239i,twothousand=239i,fivethous=2239i,tenthous=2239i,odd=78i,even=79i,stringu1="DIAAAA",stringu2="MGCAAA",string4="AAAAxx" 131414400000000000 +tenk unique1=5911i,unique2=1521i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=911i,twothousand=1911i,fivethous=911i,tenthous=5911i,odd=22i,even=23i,stringu1="JTAAAA",stringu2="NGCAAA",string4="HHHHxx" 131500800000000000 +tenk unique1=449i,unique2=1522i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=449i,twothousand=449i,fivethous=449i,tenthous=449i,odd=98i,even=99i,stringu1="HRAAAA",stringu2="OGCAAA",string4="OOOOxx" 131587200000000000 +tenk unique1=5118i,unique2=1523i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=118i,twothousand=1118i,fivethous=118i,tenthous=5118i,odd=36i,even=37i,stringu1="WOAAAA",stringu2="PGCAAA",string4="VVVVxx" 131673600000000000 +tenk unique1=7684i,unique2=1524i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=684i,twothousand=1684i,fivethous=2684i,tenthous=7684i,odd=168i,even=169i,stringu1="OJAAAA",stringu2="QGCAAA",string4="AAAAxx" 131760000000000000 +tenk unique1=804i,unique2=1525i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=804i,twothousand=804i,fivethous=804i,tenthous=804i,odd=8i,even=9i,stringu1="YEAAAA",stringu2="RGCAAA",string4="HHHHxx" 131846400000000000 +tenk unique1=8378i,unique2=1526i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=378i,twothousand=378i,fivethous=3378i,tenthous=8378i,odd=156i,even=157i,stringu1="GKAAAA",stringu2="SGCAAA",string4="OOOOxx" 131932800000000000 +tenk unique1=9855i,unique2=1527i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=855i,twothousand=1855i,fivethous=4855i,tenthous=9855i,odd=110i,even=111i,stringu1="BPAAAA",stringu2="TGCAAA",string4="VVVVxx" 132019200000000000 +tenk unique1=1995i,unique2=1528i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=995i,twothousand=1995i,fivethous=1995i,tenthous=1995i,odd=190i,even=191i,stringu1="TYAAAA",stringu2="UGCAAA",string4="AAAAxx" 132105600000000000 +tenk unique1=1979i,unique2=1529i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=979i,twothousand=1979i,fivethous=1979i,tenthous=1979i,odd=158i,even=159i,stringu1="DYAAAA",stringu2="VGCAAA",string4="HHHHxx" 132192000000000000 +tenk unique1=4510i,unique2=1530i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=510i,twothousand=510i,fivethous=4510i,tenthous=4510i,odd=20i,even=21i,stringu1="MRAAAA",stringu2="WGCAAA",string4="OOOOxx" 132278400000000000 +tenk unique1=3792i,unique2=1531i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=792i,twothousand=1792i,fivethous=3792i,tenthous=3792i,odd=184i,even=185i,stringu1="WPAAAA",stringu2="XGCAAA",string4="VVVVxx" 132364800000000000 +tenk unique1=3541i,unique2=1532i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=541i,twothousand=1541i,fivethous=3541i,tenthous=3541i,odd=82i,even=83i,stringu1="FGAAAA",stringu2="YGCAAA",string4="AAAAxx" 132451200000000000 +tenk unique1=8847i,unique2=1533i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=847i,twothousand=847i,fivethous=3847i,tenthous=8847i,odd=94i,even=95i,stringu1="HCAAAA",stringu2="ZGCAAA",string4="HHHHxx" 132537600000000000 +tenk unique1=1336i,unique2=1534i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=336i,twothousand=1336i,fivethous=1336i,tenthous=1336i,odd=72i,even=73i,stringu1="KZAAAA",stringu2="AHCAAA",string4="OOOOxx" 132624000000000000 +tenk unique1=6780i,unique2=1535i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=780i,twothousand=780i,fivethous=1780i,tenthous=6780i,odd=160i,even=161i,stringu1="UAAAAA",stringu2="BHCAAA",string4="VVVVxx" 132710400000000000 +tenk unique1=8711i,unique2=1536i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=711i,twothousand=711i,fivethous=3711i,tenthous=8711i,odd=22i,even=23i,stringu1="BXAAAA",stringu2="CHCAAA",string4="AAAAxx" 132796800000000000 +tenk unique1=7839i,unique2=1537i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=839i,twothousand=1839i,fivethous=2839i,tenthous=7839i,odd=78i,even=79i,stringu1="NPAAAA",stringu2="DHCAAA",string4="HHHHxx" 132883200000000000 +tenk unique1=677i,unique2=1538i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=677i,twothousand=677i,fivethous=677i,tenthous=677i,odd=154i,even=155i,stringu1="BAAAAA",stringu2="EHCAAA",string4="OOOOxx" 132969600000000000 +tenk unique1=1574i,unique2=1539i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=574i,twothousand=1574i,fivethous=1574i,tenthous=1574i,odd=148i,even=149i,stringu1="OIAAAA",stringu2="FHCAAA",string4="VVVVxx" 133056000000000000 +tenk unique1=2905i,unique2=1540i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=905i,twothousand=905i,fivethous=2905i,tenthous=2905i,odd=10i,even=11i,stringu1="THAAAA",stringu2="GHCAAA",string4="AAAAxx" 133142400000000000 +tenk unique1=1879i,unique2=1541i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=879i,twothousand=1879i,fivethous=1879i,tenthous=1879i,odd=158i,even=159i,stringu1="HUAAAA",stringu2="HHCAAA",string4="HHHHxx" 133228800000000000 +tenk unique1=7820i,unique2=1542i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=820i,twothousand=1820i,fivethous=2820i,tenthous=7820i,odd=40i,even=41i,stringu1="UOAAAA",stringu2="IHCAAA",string4="OOOOxx" 133315200000000000 +tenk unique1=4308i,unique2=1543i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=308i,twothousand=308i,fivethous=4308i,tenthous=4308i,odd=16i,even=17i,stringu1="SJAAAA",stringu2="JHCAAA",string4="VVVVxx" 133401600000000000 +tenk unique1=4474i,unique2=1544i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=474i,twothousand=474i,fivethous=4474i,tenthous=4474i,odd=148i,even=149i,stringu1="CQAAAA",stringu2="KHCAAA",string4="AAAAxx" 133488000000000000 +tenk unique1=6985i,unique2=1545i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=985i,twothousand=985i,fivethous=1985i,tenthous=6985i,odd=170i,even=171i,stringu1="RIAAAA",stringu2="LHCAAA",string4="HHHHxx" 133574400000000000 +tenk unique1=6929i,unique2=1546i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=929i,twothousand=929i,fivethous=1929i,tenthous=6929i,odd=58i,even=59i,stringu1="NGAAAA",stringu2="MHCAAA",string4="OOOOxx" 133660800000000000 +tenk unique1=777i,unique2=1547i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=777i,twothousand=777i,fivethous=777i,tenthous=777i,odd=154i,even=155i,stringu1="XDAAAA",stringu2="NHCAAA",string4="VVVVxx" 133747200000000000 +tenk unique1=8271i,unique2=1548i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=271i,twothousand=271i,fivethous=3271i,tenthous=8271i,odd=142i,even=143i,stringu1="DGAAAA",stringu2="OHCAAA",string4="AAAAxx" 133833600000000000 +tenk unique1=2389i,unique2=1549i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=389i,twothousand=389i,fivethous=2389i,tenthous=2389i,odd=178i,even=179i,stringu1="XNAAAA",stringu2="PHCAAA",string4="HHHHxx" 133920000000000000 +tenk unique1=946i,unique2=1550i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=946i,twothousand=946i,fivethous=946i,tenthous=946i,odd=92i,even=93i,stringu1="KKAAAA",stringu2="QHCAAA",string4="OOOOxx" 134006400000000000 +tenk unique1=9682i,unique2=1551i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=682i,twothousand=1682i,fivethous=4682i,tenthous=9682i,odd=164i,even=165i,stringu1="KIAAAA",stringu2="RHCAAA",string4="VVVVxx" 134092800000000000 +tenk unique1=8722i,unique2=1552i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=722i,twothousand=722i,fivethous=3722i,tenthous=8722i,odd=44i,even=45i,stringu1="MXAAAA",stringu2="SHCAAA",string4="AAAAxx" 134179200000000000 +tenk unique1=470i,unique2=1553i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=470i,twothousand=470i,fivethous=470i,tenthous=470i,odd=140i,even=141i,stringu1="CSAAAA",stringu2="THCAAA",string4="HHHHxx" 134265600000000000 +tenk unique1=7425i,unique2=1554i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=425i,twothousand=1425i,fivethous=2425i,tenthous=7425i,odd=50i,even=51i,stringu1="PZAAAA",stringu2="UHCAAA",string4="OOOOxx" 134352000000000000 +tenk unique1=2372i,unique2=1555i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=372i,twothousand=372i,fivethous=2372i,tenthous=2372i,odd=144i,even=145i,stringu1="GNAAAA",stringu2="VHCAAA",string4="VVVVxx" 134438400000000000 +tenk unique1=508i,unique2=1556i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=508i,twothousand=508i,fivethous=508i,tenthous=508i,odd=16i,even=17i,stringu1="OTAAAA",stringu2="WHCAAA",string4="AAAAxx" 134524800000000000 +tenk unique1=163i,unique2=1557i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=163i,twothousand=163i,fivethous=163i,tenthous=163i,odd=126i,even=127i,stringu1="HGAAAA",stringu2="XHCAAA",string4="HHHHxx" 134611200000000000 +tenk unique1=6579i,unique2=1558i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=579i,twothousand=579i,fivethous=1579i,tenthous=6579i,odd=158i,even=159i,stringu1="BTAAAA",stringu2="YHCAAA",string4="OOOOxx" 134697600000000000 +tenk unique1=2355i,unique2=1559i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=355i,twothousand=355i,fivethous=2355i,tenthous=2355i,odd=110i,even=111i,stringu1="PMAAAA",stringu2="ZHCAAA",string4="VVVVxx" 134784000000000000 +tenk unique1=70i,unique2=1560i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=70i,twothousand=70i,fivethous=70i,tenthous=70i,odd=140i,even=141i,stringu1="SCAAAA",stringu2="AICAAA",string4="AAAAxx" 134870400000000000 +tenk unique1=651i,unique2=1561i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=651i,twothousand=651i,fivethous=651i,tenthous=651i,odd=102i,even=103i,stringu1="BZAAAA",stringu2="BICAAA",string4="HHHHxx" 134956800000000000 +tenk unique1=4436i,unique2=1562i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=436i,twothousand=436i,fivethous=4436i,tenthous=4436i,odd=72i,even=73i,stringu1="QOAAAA",stringu2="CICAAA",string4="OOOOxx" 135043200000000000 +tenk unique1=4240i,unique2=1563i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=240i,twothousand=240i,fivethous=4240i,tenthous=4240i,odd=80i,even=81i,stringu1="CHAAAA",stringu2="DICAAA",string4="VVVVxx" 135129600000000000 +tenk unique1=2722i,unique2=1564i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=722i,twothousand=722i,fivethous=2722i,tenthous=2722i,odd=44i,even=45i,stringu1="SAAAAA",stringu2="EICAAA",string4="AAAAxx" 135216000000000000 +tenk unique1=8937i,unique2=1565i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=937i,twothousand=937i,fivethous=3937i,tenthous=8937i,odd=74i,even=75i,stringu1="TFAAAA",stringu2="FICAAA",string4="HHHHxx" 135302400000000000 +tenk unique1=8364i,unique2=1566i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=364i,twothousand=364i,fivethous=3364i,tenthous=8364i,odd=128i,even=129i,stringu1="SJAAAA",stringu2="GICAAA",string4="OOOOxx" 135388800000000000 +tenk unique1=8317i,unique2=1567i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=317i,twothousand=317i,fivethous=3317i,tenthous=8317i,odd=34i,even=35i,stringu1="XHAAAA",stringu2="HICAAA",string4="VVVVxx" 135475200000000000 +tenk unique1=8872i,unique2=1568i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=872i,twothousand=872i,fivethous=3872i,tenthous=8872i,odd=144i,even=145i,stringu1="GDAAAA",stringu2="IICAAA",string4="AAAAxx" 135561600000000000 +tenk unique1=5512i,unique2=1569i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=512i,twothousand=1512i,fivethous=512i,tenthous=5512i,odd=24i,even=25i,stringu1="AEAAAA",stringu2="JICAAA",string4="HHHHxx" 135648000000000000 +tenk unique1=6651i,unique2=1570i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=651i,twothousand=651i,fivethous=1651i,tenthous=6651i,odd=102i,even=103i,stringu1="VVAAAA",stringu2="KICAAA",string4="OOOOxx" 135734400000000000 +tenk unique1=5976i,unique2=1571i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=976i,twothousand=1976i,fivethous=976i,tenthous=5976i,odd=152i,even=153i,stringu1="WVAAAA",stringu2="LICAAA",string4="VVVVxx" 135820800000000000 +tenk unique1=3301i,unique2=1572i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=301i,twothousand=1301i,fivethous=3301i,tenthous=3301i,odd=2i,even=3i,stringu1="ZWAAAA",stringu2="MICAAA",string4="AAAAxx" 135907200000000000 +tenk unique1=6784i,unique2=1573i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=784i,twothousand=784i,fivethous=1784i,tenthous=6784i,odd=168i,even=169i,stringu1="YAAAAA",stringu2="NICAAA",string4="HHHHxx" 135993600000000000 +tenk unique1=573i,unique2=1574i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=573i,twothousand=573i,fivethous=573i,tenthous=573i,odd=146i,even=147i,stringu1="BWAAAA",stringu2="OICAAA",string4="OOOOxx" 136080000000000000 +tenk unique1=3015i,unique2=1575i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=15i,twothousand=1015i,fivethous=3015i,tenthous=3015i,odd=30i,even=31i,stringu1="ZLAAAA",stringu2="PICAAA",string4="VVVVxx" 136166400000000000 +tenk unique1=8245i,unique2=1576i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=245i,twothousand=245i,fivethous=3245i,tenthous=8245i,odd=90i,even=91i,stringu1="DFAAAA",stringu2="QICAAA",string4="AAAAxx" 136252800000000000 +tenk unique1=5251i,unique2=1577i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=251i,twothousand=1251i,fivethous=251i,tenthous=5251i,odd=102i,even=103i,stringu1="ZTAAAA",stringu2="RICAAA",string4="HHHHxx" 136339200000000000 +tenk unique1=2281i,unique2=1578i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=281i,twothousand=281i,fivethous=2281i,tenthous=2281i,odd=162i,even=163i,stringu1="TJAAAA",stringu2="SICAAA",string4="OOOOxx" 136425600000000000 +tenk unique1=518i,unique2=1579i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=518i,twothousand=518i,fivethous=518i,tenthous=518i,odd=36i,even=37i,stringu1="YTAAAA",stringu2="TICAAA",string4="VVVVxx" 136512000000000000 +tenk unique1=9839i,unique2=1580i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=839i,twothousand=1839i,fivethous=4839i,tenthous=9839i,odd=78i,even=79i,stringu1="LOAAAA",stringu2="UICAAA",string4="AAAAxx" 136598400000000000 +tenk unique1=4526i,unique2=1581i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=526i,twothousand=526i,fivethous=4526i,tenthous=4526i,odd=52i,even=53i,stringu1="CSAAAA",stringu2="VICAAA",string4="HHHHxx" 136684800000000000 +tenk unique1=1261i,unique2=1582i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=261i,twothousand=1261i,fivethous=1261i,tenthous=1261i,odd=122i,even=123i,stringu1="NWAAAA",stringu2="WICAAA",string4="OOOOxx" 136771200000000000 +tenk unique1=4259i,unique2=1583i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=259i,twothousand=259i,fivethous=4259i,tenthous=4259i,odd=118i,even=119i,stringu1="VHAAAA",stringu2="XICAAA",string4="VVVVxx" 136857600000000000 +tenk unique1=9098i,unique2=1584i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=98i,twothousand=1098i,fivethous=4098i,tenthous=9098i,odd=196i,even=197i,stringu1="YLAAAA",stringu2="YICAAA",string4="AAAAxx" 136944000000000000 +tenk unique1=6037i,unique2=1585i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=37i,twothousand=37i,fivethous=1037i,tenthous=6037i,odd=74i,even=75i,stringu1="FYAAAA",stringu2="ZICAAA",string4="HHHHxx" 137030400000000000 +tenk unique1=4284i,unique2=1586i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=284i,twothousand=284i,fivethous=4284i,tenthous=4284i,odd=168i,even=169i,stringu1="UIAAAA",stringu2="AJCAAA",string4="OOOOxx" 137116800000000000 +tenk unique1=3267i,unique2=1587i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=267i,twothousand=1267i,fivethous=3267i,tenthous=3267i,odd=134i,even=135i,stringu1="RVAAAA",stringu2="BJCAAA",string4="VVVVxx" 137203200000000000 +tenk unique1=5908i,unique2=1588i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=908i,twothousand=1908i,fivethous=908i,tenthous=5908i,odd=16i,even=17i,stringu1="GTAAAA",stringu2="CJCAAA",string4="AAAAxx" 137289600000000000 +tenk unique1=1549i,unique2=1589i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=549i,twothousand=1549i,fivethous=1549i,tenthous=1549i,odd=98i,even=99i,stringu1="PHAAAA",stringu2="DJCAAA",string4="HHHHxx" 137376000000000000 +tenk unique1=8736i,unique2=1590i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=736i,twothousand=736i,fivethous=3736i,tenthous=8736i,odd=72i,even=73i,stringu1="AYAAAA",stringu2="EJCAAA",string4="OOOOxx" 137462400000000000 +tenk unique1=2008i,unique2=1591i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=8i,fivethous=2008i,tenthous=2008i,odd=16i,even=17i,stringu1="GZAAAA",stringu2="FJCAAA",string4="VVVVxx" 137548800000000000 +tenk unique1=548i,unique2=1592i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=548i,twothousand=548i,fivethous=548i,tenthous=548i,odd=96i,even=97i,stringu1="CVAAAA",stringu2="GJCAAA",string4="AAAAxx" 137635200000000000 +tenk unique1=8846i,unique2=1593i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=846i,twothousand=846i,fivethous=3846i,tenthous=8846i,odd=92i,even=93i,stringu1="GCAAAA",stringu2="HJCAAA",string4="HHHHxx" 137721600000000000 +tenk unique1=8374i,unique2=1594i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=374i,twothousand=374i,fivethous=3374i,tenthous=8374i,odd=148i,even=149i,stringu1="CKAAAA",stringu2="IJCAAA",string4="OOOOxx" 137808000000000000 +tenk unique1=7986i,unique2=1595i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=986i,twothousand=1986i,fivethous=2986i,tenthous=7986i,odd=172i,even=173i,stringu1="EVAAAA",stringu2="JJCAAA",string4="VVVVxx" 137894400000000000 +tenk unique1=6819i,unique2=1596i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=819i,twothousand=819i,fivethous=1819i,tenthous=6819i,odd=38i,even=39i,stringu1="HCAAAA",stringu2="KJCAAA",string4="AAAAxx" 137980800000000000 +tenk unique1=4418i,unique2=1597i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=418i,twothousand=418i,fivethous=4418i,tenthous=4418i,odd=36i,even=37i,stringu1="YNAAAA",stringu2="LJCAAA",string4="HHHHxx" 138067200000000000 +tenk unique1=833i,unique2=1598i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=833i,twothousand=833i,fivethous=833i,tenthous=833i,odd=66i,even=67i,stringu1="BGAAAA",stringu2="MJCAAA",string4="OOOOxx" 138153600000000000 +tenk unique1=4416i,unique2=1599i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=416i,twothousand=416i,fivethous=4416i,tenthous=4416i,odd=32i,even=33i,stringu1="WNAAAA",stringu2="NJCAAA",string4="VVVVxx" 138240000000000000 +tenk unique1=4902i,unique2=1600i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=902i,twothousand=902i,fivethous=4902i,tenthous=4902i,odd=4i,even=5i,stringu1="OGAAAA",stringu2="OJCAAA",string4="AAAAxx" 138326400000000000 +tenk unique1=6828i,unique2=1601i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=828i,twothousand=828i,fivethous=1828i,tenthous=6828i,odd=56i,even=57i,stringu1="QCAAAA",stringu2="PJCAAA",string4="HHHHxx" 138412800000000000 +tenk unique1=1118i,unique2=1602i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=118i,twothousand=1118i,fivethous=1118i,tenthous=1118i,odd=36i,even=37i,stringu1="ARAAAA",stringu2="QJCAAA",string4="OOOOxx" 138499200000000000 +tenk unique1=9993i,unique2=1603i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=993i,twothousand=1993i,fivethous=4993i,tenthous=9993i,odd=186i,even=187i,stringu1="JUAAAA",stringu2="RJCAAA",string4="VVVVxx" 138585600000000000 +tenk unique1=1430i,unique2=1604i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=430i,twothousand=1430i,fivethous=1430i,tenthous=1430i,odd=60i,even=61i,stringu1="ADAAAA",stringu2="SJCAAA",string4="AAAAxx" 138672000000000000 +tenk unique1=5670i,unique2=1605i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=670i,twothousand=1670i,fivethous=670i,tenthous=5670i,odd=140i,even=141i,stringu1="CKAAAA",stringu2="TJCAAA",string4="HHHHxx" 138758400000000000 +tenk unique1=5424i,unique2=1606i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=424i,twothousand=1424i,fivethous=424i,tenthous=5424i,odd=48i,even=49i,stringu1="QAAAAA",stringu2="UJCAAA",string4="OOOOxx" 138844800000000000 +tenk unique1=5561i,unique2=1607i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=561i,twothousand=1561i,fivethous=561i,tenthous=5561i,odd=122i,even=123i,stringu1="XFAAAA",stringu2="VJCAAA",string4="VVVVxx" 138931200000000000 +tenk unique1=2027i,unique2=1608i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=27i,twothousand=27i,fivethous=2027i,tenthous=2027i,odd=54i,even=55i,stringu1="ZZAAAA",stringu2="WJCAAA",string4="AAAAxx" 139017600000000000 +tenk unique1=6924i,unique2=1609i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=924i,twothousand=924i,fivethous=1924i,tenthous=6924i,odd=48i,even=49i,stringu1="IGAAAA",stringu2="XJCAAA",string4="HHHHxx" 139104000000000000 +tenk unique1=5946i,unique2=1610i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=946i,twothousand=1946i,fivethous=946i,tenthous=5946i,odd=92i,even=93i,stringu1="SUAAAA",stringu2="YJCAAA",string4="OOOOxx" 139190400000000000 +tenk unique1=4294i,unique2=1611i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=294i,twothousand=294i,fivethous=4294i,tenthous=4294i,odd=188i,even=189i,stringu1="EJAAAA",stringu2="ZJCAAA",string4="VVVVxx" 139276800000000000 +tenk unique1=2936i,unique2=1612i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=936i,twothousand=936i,fivethous=2936i,tenthous=2936i,odd=72i,even=73i,stringu1="YIAAAA",stringu2="AKCAAA",string4="AAAAxx" 139363200000000000 +tenk unique1=3855i,unique2=1613i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=855i,twothousand=1855i,fivethous=3855i,tenthous=3855i,odd=110i,even=111i,stringu1="HSAAAA",stringu2="BKCAAA",string4="HHHHxx" 139449600000000000 +tenk unique1=455i,unique2=1614i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=455i,twothousand=455i,fivethous=455i,tenthous=455i,odd=110i,even=111i,stringu1="NRAAAA",stringu2="CKCAAA",string4="OOOOxx" 139536000000000000 +tenk unique1=2918i,unique2=1615i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=918i,twothousand=918i,fivethous=2918i,tenthous=2918i,odd=36i,even=37i,stringu1="GIAAAA",stringu2="DKCAAA",string4="VVVVxx" 139622400000000000 +tenk unique1=448i,unique2=1616i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=448i,twothousand=448i,fivethous=448i,tenthous=448i,odd=96i,even=97i,stringu1="GRAAAA",stringu2="EKCAAA",string4="AAAAxx" 139708800000000000 +tenk unique1=2149i,unique2=1617i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=149i,twothousand=149i,fivethous=2149i,tenthous=2149i,odd=98i,even=99i,stringu1="REAAAA",stringu2="FKCAAA",string4="HHHHxx" 139795200000000000 +tenk unique1=8890i,unique2=1618i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=890i,twothousand=890i,fivethous=3890i,tenthous=8890i,odd=180i,even=181i,stringu1="YDAAAA",stringu2="GKCAAA",string4="OOOOxx" 139881600000000000 +tenk unique1=8919i,unique2=1619i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=919i,twothousand=919i,fivethous=3919i,tenthous=8919i,odd=38i,even=39i,stringu1="BFAAAA",stringu2="HKCAAA",string4="VVVVxx" 139968000000000000 +tenk unique1=4957i,unique2=1620i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=957i,twothousand=957i,fivethous=4957i,tenthous=4957i,odd=114i,even=115i,stringu1="RIAAAA",stringu2="IKCAAA",string4="AAAAxx" 140054400000000000 +tenk unique1=4i,unique2=1621i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=4i,fivethous=4i,tenthous=4i,odd=8i,even=9i,stringu1="EAAAAA",stringu2="JKCAAA",string4="HHHHxx" 140140800000000000 +tenk unique1=4837i,unique2=1622i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=837i,twothousand=837i,fivethous=4837i,tenthous=4837i,odd=74i,even=75i,stringu1="BEAAAA",stringu2="KKCAAA",string4="OOOOxx" 140227200000000000 +tenk unique1=3976i,unique2=1623i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=976i,twothousand=1976i,fivethous=3976i,tenthous=3976i,odd=152i,even=153i,stringu1="YWAAAA",stringu2="LKCAAA",string4="VVVVxx" 140313600000000000 +tenk unique1=9459i,unique2=1624i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=459i,twothousand=1459i,fivethous=4459i,tenthous=9459i,odd=118i,even=119i,stringu1="VZAAAA",stringu2="MKCAAA",string4="AAAAxx" 140400000000000000 +tenk unique1=7097i,unique2=1625i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=97i,twothousand=1097i,fivethous=2097i,tenthous=7097i,odd=194i,even=195i,stringu1="ZMAAAA",stringu2="NKCAAA",string4="HHHHxx" 140486400000000000 +tenk unique1=9226i,unique2=1626i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=226i,twothousand=1226i,fivethous=4226i,tenthous=9226i,odd=52i,even=53i,stringu1="WQAAAA",stringu2="OKCAAA",string4="OOOOxx" 140572800000000000 +tenk unique1=5803i,unique2=1627i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=803i,twothousand=1803i,fivethous=803i,tenthous=5803i,odd=6i,even=7i,stringu1="FPAAAA",stringu2="PKCAAA",string4="VVVVxx" 140659200000000000 +tenk unique1=21i,unique2=1628i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=21i,twothousand=21i,fivethous=21i,tenthous=21i,odd=42i,even=43i,stringu1="VAAAAA",stringu2="QKCAAA",string4="AAAAxx" 140745600000000000 +tenk unique1=5275i,unique2=1629i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=275i,twothousand=1275i,fivethous=275i,tenthous=5275i,odd=150i,even=151i,stringu1="XUAAAA",stringu2="RKCAAA",string4="HHHHxx" 140832000000000000 +tenk unique1=3488i,unique2=1630i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=488i,twothousand=1488i,fivethous=3488i,tenthous=3488i,odd=176i,even=177i,stringu1="EEAAAA",stringu2="SKCAAA",string4="OOOOxx" 140918400000000000 +tenk unique1=1595i,unique2=1631i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=595i,twothousand=1595i,fivethous=1595i,tenthous=1595i,odd=190i,even=191i,stringu1="JJAAAA",stringu2="TKCAAA",string4="VVVVxx" 141004800000000000 +tenk unique1=5212i,unique2=1632i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=212i,twothousand=1212i,fivethous=212i,tenthous=5212i,odd=24i,even=25i,stringu1="MSAAAA",stringu2="UKCAAA",string4="AAAAxx" 141091200000000000 +tenk unique1=6574i,unique2=1633i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=574i,twothousand=574i,fivethous=1574i,tenthous=6574i,odd=148i,even=149i,stringu1="WSAAAA",stringu2="VKCAAA",string4="HHHHxx" 141177600000000000 +tenk unique1=7524i,unique2=1634i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=524i,twothousand=1524i,fivethous=2524i,tenthous=7524i,odd=48i,even=49i,stringu1="KDAAAA",stringu2="WKCAAA",string4="OOOOxx" 141264000000000000 +tenk unique1=6100i,unique2=1635i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=100i,twothousand=100i,fivethous=1100i,tenthous=6100i,odd=0i,even=1i,stringu1="QAAAAA",stringu2="XKCAAA",string4="VVVVxx" 141350400000000000 +tenk unique1=1198i,unique2=1636i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=198i,twothousand=1198i,fivethous=1198i,tenthous=1198i,odd=196i,even=197i,stringu1="CUAAAA",stringu2="YKCAAA",string4="AAAAxx" 141436800000000000 +tenk unique1=7345i,unique2=1637i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=345i,twothousand=1345i,fivethous=2345i,tenthous=7345i,odd=90i,even=91i,stringu1="NWAAAA",stringu2="ZKCAAA",string4="HHHHxx" 141523200000000000 +tenk unique1=5020i,unique2=1638i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=20i,twothousand=1020i,fivethous=20i,tenthous=5020i,odd=40i,even=41i,stringu1="CLAAAA",stringu2="ALCAAA",string4="OOOOxx" 141609600000000000 +tenk unique1=6925i,unique2=1639i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=925i,twothousand=925i,fivethous=1925i,tenthous=6925i,odd=50i,even=51i,stringu1="JGAAAA",stringu2="BLCAAA",string4="VVVVxx" 141696000000000000 +tenk unique1=8915i,unique2=1640i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=915i,twothousand=915i,fivethous=3915i,tenthous=8915i,odd=30i,even=31i,stringu1="XEAAAA",stringu2="CLCAAA",string4="AAAAxx" 141782400000000000 +tenk unique1=3088i,unique2=1641i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=88i,twothousand=1088i,fivethous=3088i,tenthous=3088i,odd=176i,even=177i,stringu1="UOAAAA",stringu2="DLCAAA",string4="HHHHxx" 141868800000000000 +tenk unique1=4828i,unique2=1642i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=828i,twothousand=828i,fivethous=4828i,tenthous=4828i,odd=56i,even=57i,stringu1="SDAAAA",stringu2="ELCAAA",string4="OOOOxx" 141955200000000000 +tenk unique1=7276i,unique2=1643i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=276i,twothousand=1276i,fivethous=2276i,tenthous=7276i,odd=152i,even=153i,stringu1="WTAAAA",stringu2="FLCAAA",string4="VVVVxx" 142041600000000000 +tenk unique1=299i,unique2=1644i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=299i,twothousand=299i,fivethous=299i,tenthous=299i,odd=198i,even=199i,stringu1="NLAAAA",stringu2="GLCAAA",string4="AAAAxx" 142128000000000000 +tenk unique1=76i,unique2=1645i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=76i,twothousand=76i,fivethous=76i,tenthous=76i,odd=152i,even=153i,stringu1="YCAAAA",stringu2="HLCAAA",string4="HHHHxx" 142214400000000000 +tenk unique1=8458i,unique2=1646i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=458i,twothousand=458i,fivethous=3458i,tenthous=8458i,odd=116i,even=117i,stringu1="INAAAA",stringu2="ILCAAA",string4="OOOOxx" 142300800000000000 +tenk unique1=7207i,unique2=1647i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=207i,twothousand=1207i,fivethous=2207i,tenthous=7207i,odd=14i,even=15i,stringu1="FRAAAA",stringu2="JLCAAA",string4="VVVVxx" 142387200000000000 +tenk unique1=5585i,unique2=1648i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=585i,twothousand=1585i,fivethous=585i,tenthous=5585i,odd=170i,even=171i,stringu1="VGAAAA",stringu2="KLCAAA",string4="AAAAxx" 142473600000000000 +tenk unique1=3234i,unique2=1649i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=234i,twothousand=1234i,fivethous=3234i,tenthous=3234i,odd=68i,even=69i,stringu1="KUAAAA",stringu2="LLCAAA",string4="HHHHxx" 142560000000000000 +tenk unique1=8001i,unique2=1650i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1i,fivethous=3001i,tenthous=8001i,odd=2i,even=3i,stringu1="TVAAAA",stringu2="MLCAAA",string4="OOOOxx" 142646400000000000 +tenk unique1=1319i,unique2=1651i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=319i,twothousand=1319i,fivethous=1319i,tenthous=1319i,odd=38i,even=39i,stringu1="TYAAAA",stringu2="NLCAAA",string4="VVVVxx" 142732800000000000 +tenk unique1=6342i,unique2=1652i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=342i,twothousand=342i,fivethous=1342i,tenthous=6342i,odd=84i,even=85i,stringu1="YJAAAA",stringu2="OLCAAA",string4="AAAAxx" 142819200000000000 +tenk unique1=9199i,unique2=1653i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=199i,twothousand=1199i,fivethous=4199i,tenthous=9199i,odd=198i,even=199i,stringu1="VPAAAA",stringu2="PLCAAA",string4="HHHHxx" 142905600000000000 +tenk unique1=5696i,unique2=1654i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=696i,twothousand=1696i,fivethous=696i,tenthous=5696i,odd=192i,even=193i,stringu1="CLAAAA",stringu2="QLCAAA",string4="OOOOxx" 142992000000000000 +tenk unique1=2562i,unique2=1655i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=562i,twothousand=562i,fivethous=2562i,tenthous=2562i,odd=124i,even=125i,stringu1="OUAAAA",stringu2="RLCAAA",string4="VVVVxx" 143078400000000000 +tenk unique1=4226i,unique2=1656i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=226i,twothousand=226i,fivethous=4226i,tenthous=4226i,odd=52i,even=53i,stringu1="OGAAAA",stringu2="SLCAAA",string4="AAAAxx" 143164800000000000 +tenk unique1=1184i,unique2=1657i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=184i,twothousand=1184i,fivethous=1184i,tenthous=1184i,odd=168i,even=169i,stringu1="OTAAAA",stringu2="TLCAAA",string4="HHHHxx" 143251200000000000 +tenk unique1=5807i,unique2=1658i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=807i,twothousand=1807i,fivethous=807i,tenthous=5807i,odd=14i,even=15i,stringu1="JPAAAA",stringu2="ULCAAA",string4="OOOOxx" 143337600000000000 +tenk unique1=1890i,unique2=1659i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=890i,twothousand=1890i,fivethous=1890i,tenthous=1890i,odd=180i,even=181i,stringu1="SUAAAA",stringu2="VLCAAA",string4="VVVVxx" 143424000000000000 +tenk unique1=451i,unique2=1660i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=451i,twothousand=451i,fivethous=451i,tenthous=451i,odd=102i,even=103i,stringu1="JRAAAA",stringu2="WLCAAA",string4="AAAAxx" 143510400000000000 +tenk unique1=1049i,unique2=1661i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=49i,twothousand=1049i,fivethous=1049i,tenthous=1049i,odd=98i,even=99i,stringu1="JOAAAA",stringu2="XLCAAA",string4="HHHHxx" 143596800000000000 +tenk unique1=5272i,unique2=1662i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=272i,twothousand=1272i,fivethous=272i,tenthous=5272i,odd=144i,even=145i,stringu1="UUAAAA",stringu2="YLCAAA",string4="OOOOxx" 143683200000000000 +tenk unique1=4588i,unique2=1663i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=588i,twothousand=588i,fivethous=4588i,tenthous=4588i,odd=176i,even=177i,stringu1="MUAAAA",stringu2="ZLCAAA",string4="VVVVxx" 143769600000000000 +tenk unique1=5213i,unique2=1664i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=213i,twothousand=1213i,fivethous=213i,tenthous=5213i,odd=26i,even=27i,stringu1="NSAAAA",stringu2="AMCAAA",string4="AAAAxx" 143856000000000000 +tenk unique1=9543i,unique2=1665i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=543i,twothousand=1543i,fivethous=4543i,tenthous=9543i,odd=86i,even=87i,stringu1="BDAAAA",stringu2="BMCAAA",string4="HHHHxx" 143942400000000000 +tenk unique1=6318i,unique2=1666i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=318i,twothousand=318i,fivethous=1318i,tenthous=6318i,odd=36i,even=37i,stringu1="AJAAAA",stringu2="CMCAAA",string4="OOOOxx" 144028800000000000 +tenk unique1=7992i,unique2=1667i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=992i,twothousand=1992i,fivethous=2992i,tenthous=7992i,odd=184i,even=185i,stringu1="KVAAAA",stringu2="DMCAAA",string4="VVVVxx" 144115200000000000 +tenk unique1=4619i,unique2=1668i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=619i,twothousand=619i,fivethous=4619i,tenthous=4619i,odd=38i,even=39i,stringu1="RVAAAA",stringu2="EMCAAA",string4="AAAAxx" 144201600000000000 +tenk unique1=7189i,unique2=1669i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=189i,twothousand=1189i,fivethous=2189i,tenthous=7189i,odd=178i,even=179i,stringu1="NQAAAA",stringu2="FMCAAA",string4="HHHHxx" 144288000000000000 +tenk unique1=2178i,unique2=1670i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=178i,twothousand=178i,fivethous=2178i,tenthous=2178i,odd=156i,even=157i,stringu1="UFAAAA",stringu2="GMCAAA",string4="OOOOxx" 144374400000000000 +tenk unique1=4928i,unique2=1671i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=928i,twothousand=928i,fivethous=4928i,tenthous=4928i,odd=56i,even=57i,stringu1="OHAAAA",stringu2="HMCAAA",string4="VVVVxx" 144460800000000000 +tenk unique1=3966i,unique2=1672i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=966i,twothousand=1966i,fivethous=3966i,tenthous=3966i,odd=132i,even=133i,stringu1="OWAAAA",stringu2="IMCAAA",string4="AAAAxx" 144547200000000000 +tenk unique1=9790i,unique2=1673i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=790i,twothousand=1790i,fivethous=4790i,tenthous=9790i,odd=180i,even=181i,stringu1="OMAAAA",stringu2="JMCAAA",string4="HHHHxx" 144633600000000000 +tenk unique1=9150i,unique2=1674i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=150i,twothousand=1150i,fivethous=4150i,tenthous=9150i,odd=100i,even=101i,stringu1="YNAAAA",stringu2="KMCAAA",string4="OOOOxx" 144720000000000000 +tenk unique1=313i,unique2=1675i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=313i,twothousand=313i,fivethous=313i,tenthous=313i,odd=26i,even=27i,stringu1="BMAAAA",stringu2="LMCAAA",string4="VVVVxx" 144806400000000000 +tenk unique1=1614i,unique2=1676i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=614i,twothousand=1614i,fivethous=1614i,tenthous=1614i,odd=28i,even=29i,stringu1="CKAAAA",stringu2="MMCAAA",string4="AAAAxx" 144892800000000000 +tenk unique1=1581i,unique2=1677i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=581i,twothousand=1581i,fivethous=1581i,tenthous=1581i,odd=162i,even=163i,stringu1="VIAAAA",stringu2="NMCAAA",string4="HHHHxx" 144979200000000000 +tenk unique1=3674i,unique2=1678i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=674i,twothousand=1674i,fivethous=3674i,tenthous=3674i,odd=148i,even=149i,stringu1="ILAAAA",stringu2="OMCAAA",string4="OOOOxx" 145065600000000000 +tenk unique1=3444i,unique2=1679i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=444i,twothousand=1444i,fivethous=3444i,tenthous=3444i,odd=88i,even=89i,stringu1="MCAAAA",stringu2="PMCAAA",string4="VVVVxx" 145152000000000000 +tenk unique1=1050i,unique2=1680i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=50i,twothousand=1050i,fivethous=1050i,tenthous=1050i,odd=100i,even=101i,stringu1="KOAAAA",stringu2="QMCAAA",string4="AAAAxx" 145238400000000000 +tenk unique1=8241i,unique2=1681i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=241i,twothousand=241i,fivethous=3241i,tenthous=8241i,odd=82i,even=83i,stringu1="ZEAAAA",stringu2="RMCAAA",string4="HHHHxx" 145324800000000000 +tenk unique1=3382i,unique2=1682i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=382i,twothousand=1382i,fivethous=3382i,tenthous=3382i,odd=164i,even=165i,stringu1="CAAAAA",stringu2="SMCAAA",string4="OOOOxx" 145411200000000000 +tenk unique1=7105i,unique2=1683i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=105i,twothousand=1105i,fivethous=2105i,tenthous=7105i,odd=10i,even=11i,stringu1="HNAAAA",stringu2="TMCAAA",string4="VVVVxx" 145497600000000000 +tenk unique1=2957i,unique2=1684i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=957i,twothousand=957i,fivethous=2957i,tenthous=2957i,odd=114i,even=115i,stringu1="TJAAAA",stringu2="UMCAAA",string4="AAAAxx" 145584000000000000 +tenk unique1=6162i,unique2=1685i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=162i,twothousand=162i,fivethous=1162i,tenthous=6162i,odd=124i,even=125i,stringu1="ADAAAA",stringu2="VMCAAA",string4="HHHHxx" 145670400000000000 +tenk unique1=5150i,unique2=1686i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=150i,twothousand=1150i,fivethous=150i,tenthous=5150i,odd=100i,even=101i,stringu1="CQAAAA",stringu2="WMCAAA",string4="OOOOxx" 145756800000000000 +tenk unique1=2622i,unique2=1687i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=622i,twothousand=622i,fivethous=2622i,tenthous=2622i,odd=44i,even=45i,stringu1="WWAAAA",stringu2="XMCAAA",string4="VVVVxx" 145843200000000000 +tenk unique1=2240i,unique2=1688i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=240i,twothousand=240i,fivethous=2240i,tenthous=2240i,odd=80i,even=81i,stringu1="EIAAAA",stringu2="YMCAAA",string4="AAAAxx" 145929600000000000 +tenk unique1=8880i,unique2=1689i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=880i,twothousand=880i,fivethous=3880i,tenthous=8880i,odd=160i,even=161i,stringu1="ODAAAA",stringu2="ZMCAAA",string4="HHHHxx" 146016000000000000 +tenk unique1=9250i,unique2=1690i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=250i,twothousand=1250i,fivethous=4250i,tenthous=9250i,odd=100i,even=101i,stringu1="URAAAA",stringu2="ANCAAA",string4="OOOOxx" 146102400000000000 +tenk unique1=7010i,unique2=1691i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=10i,twothousand=1010i,fivethous=2010i,tenthous=7010i,odd=20i,even=21i,stringu1="QJAAAA",stringu2="BNCAAA",string4="VVVVxx" 146188800000000000 +tenk unique1=1098i,unique2=1692i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=98i,twothousand=1098i,fivethous=1098i,tenthous=1098i,odd=196i,even=197i,stringu1="GQAAAA",stringu2="CNCAAA",string4="AAAAxx" 146275200000000000 +tenk unique1=648i,unique2=1693i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=648i,twothousand=648i,fivethous=648i,tenthous=648i,odd=96i,even=97i,stringu1="YYAAAA",stringu2="DNCAAA",string4="HHHHxx" 146361600000000000 +tenk unique1=5536i,unique2=1694i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=536i,twothousand=1536i,fivethous=536i,tenthous=5536i,odd=72i,even=73i,stringu1="YEAAAA",stringu2="ENCAAA",string4="OOOOxx" 146448000000000000 +tenk unique1=7858i,unique2=1695i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=858i,twothousand=1858i,fivethous=2858i,tenthous=7858i,odd=116i,even=117i,stringu1="GQAAAA",stringu2="FNCAAA",string4="VVVVxx" 146534400000000000 +tenk unique1=7053i,unique2=1696i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=53i,twothousand=1053i,fivethous=2053i,tenthous=7053i,odd=106i,even=107i,stringu1="HLAAAA",stringu2="GNCAAA",string4="AAAAxx" 146620800000000000 +tenk unique1=8681i,unique2=1697i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=681i,twothousand=681i,fivethous=3681i,tenthous=8681i,odd=162i,even=163i,stringu1="XVAAAA",stringu2="HNCAAA",string4="HHHHxx" 146707200000000000 +tenk unique1=8832i,unique2=1698i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=832i,twothousand=832i,fivethous=3832i,tenthous=8832i,odd=64i,even=65i,stringu1="SBAAAA",stringu2="INCAAA",string4="OOOOxx" 146793600000000000 +tenk unique1=6836i,unique2=1699i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=836i,twothousand=836i,fivethous=1836i,tenthous=6836i,odd=72i,even=73i,stringu1="YCAAAA",stringu2="JNCAAA",string4="VVVVxx" 146880000000000000 +tenk unique1=4856i,unique2=1700i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=856i,twothousand=856i,fivethous=4856i,tenthous=4856i,odd=112i,even=113i,stringu1="UEAAAA",stringu2="KNCAAA",string4="AAAAxx" 146966400000000000 +tenk unique1=345i,unique2=1701i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=345i,twothousand=345i,fivethous=345i,tenthous=345i,odd=90i,even=91i,stringu1="HNAAAA",stringu2="LNCAAA",string4="HHHHxx" 147052800000000000 +tenk unique1=6559i,unique2=1702i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=559i,twothousand=559i,fivethous=1559i,tenthous=6559i,odd=118i,even=119i,stringu1="HSAAAA",stringu2="MNCAAA",string4="OOOOxx" 147139200000000000 +tenk unique1=3017i,unique2=1703i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=17i,twothousand=1017i,fivethous=3017i,tenthous=3017i,odd=34i,even=35i,stringu1="BMAAAA",stringu2="NNCAAA",string4="VVVVxx" 147225600000000000 +tenk unique1=4176i,unique2=1704i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=176i,twothousand=176i,fivethous=4176i,tenthous=4176i,odd=152i,even=153i,stringu1="QEAAAA",stringu2="ONCAAA",string4="AAAAxx" 147312000000000000 +tenk unique1=2839i,unique2=1705i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=839i,twothousand=839i,fivethous=2839i,tenthous=2839i,odd=78i,even=79i,stringu1="FFAAAA",stringu2="PNCAAA",string4="HHHHxx" 147398400000000000 +tenk unique1=6065i,unique2=1706i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=65i,twothousand=65i,fivethous=1065i,tenthous=6065i,odd=130i,even=131i,stringu1="HZAAAA",stringu2="QNCAAA",string4="OOOOxx" 147484800000000000 +tenk unique1=7360i,unique2=1707i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=360i,twothousand=1360i,fivethous=2360i,tenthous=7360i,odd=120i,even=121i,stringu1="CXAAAA",stringu2="RNCAAA",string4="VVVVxx" 147571200000000000 +tenk unique1=9527i,unique2=1708i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=527i,twothousand=1527i,fivethous=4527i,tenthous=9527i,odd=54i,even=55i,stringu1="LCAAAA",stringu2="SNCAAA",string4="AAAAxx" 147657600000000000 +tenk unique1=8849i,unique2=1709i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=849i,twothousand=849i,fivethous=3849i,tenthous=8849i,odd=98i,even=99i,stringu1="JCAAAA",stringu2="TNCAAA",string4="HHHHxx" 147744000000000000 +tenk unique1=7274i,unique2=1710i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=274i,twothousand=1274i,fivethous=2274i,tenthous=7274i,odd=148i,even=149i,stringu1="UTAAAA",stringu2="UNCAAA",string4="OOOOxx" 147830400000000000 +tenk unique1=4368i,unique2=1711i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=368i,twothousand=368i,fivethous=4368i,tenthous=4368i,odd=136i,even=137i,stringu1="AMAAAA",stringu2="VNCAAA",string4="VVVVxx" 147916800000000000 +tenk unique1=2488i,unique2=1712i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=488i,twothousand=488i,fivethous=2488i,tenthous=2488i,odd=176i,even=177i,stringu1="SRAAAA",stringu2="WNCAAA",string4="AAAAxx" 148003200000000000 +tenk unique1=4674i,unique2=1713i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=674i,twothousand=674i,fivethous=4674i,tenthous=4674i,odd=148i,even=149i,stringu1="UXAAAA",stringu2="XNCAAA",string4="HHHHxx" 148089600000000000 +tenk unique1=365i,unique2=1714i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=365i,twothousand=365i,fivethous=365i,tenthous=365i,odd=130i,even=131i,stringu1="BOAAAA",stringu2="YNCAAA",string4="OOOOxx" 148176000000000000 +tenk unique1=5897i,unique2=1715i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=897i,twothousand=1897i,fivethous=897i,tenthous=5897i,odd=194i,even=195i,stringu1="VSAAAA",stringu2="ZNCAAA",string4="VVVVxx" 148262400000000000 +tenk unique1=8918i,unique2=1716i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=918i,twothousand=918i,fivethous=3918i,tenthous=8918i,odd=36i,even=37i,stringu1="AFAAAA",stringu2="AOCAAA",string4="AAAAxx" 148348800000000000 +tenk unique1=1988i,unique2=1717i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=988i,twothousand=1988i,fivethous=1988i,tenthous=1988i,odd=176i,even=177i,stringu1="MYAAAA",stringu2="BOCAAA",string4="HHHHxx" 148435200000000000 +tenk unique1=1210i,unique2=1718i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=210i,twothousand=1210i,fivethous=1210i,tenthous=1210i,odd=20i,even=21i,stringu1="OUAAAA",stringu2="COCAAA",string4="OOOOxx" 148521600000000000 +tenk unique1=2945i,unique2=1719i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=945i,twothousand=945i,fivethous=2945i,tenthous=2945i,odd=90i,even=91i,stringu1="HJAAAA",stringu2="DOCAAA",string4="VVVVxx" 148608000000000000 +tenk unique1=555i,unique2=1720i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=555i,twothousand=555i,fivethous=555i,tenthous=555i,odd=110i,even=111i,stringu1="JVAAAA",stringu2="EOCAAA",string4="AAAAxx" 148694400000000000 +tenk unique1=9615i,unique2=1721i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=615i,twothousand=1615i,fivethous=4615i,tenthous=9615i,odd=30i,even=31i,stringu1="VFAAAA",stringu2="FOCAAA",string4="HHHHxx" 148780800000000000 +tenk unique1=9939i,unique2=1722i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=939i,twothousand=1939i,fivethous=4939i,tenthous=9939i,odd=78i,even=79i,stringu1="HSAAAA",stringu2="GOCAAA",string4="OOOOxx" 148867200000000000 +tenk unique1=1216i,unique2=1723i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=216i,twothousand=1216i,fivethous=1216i,tenthous=1216i,odd=32i,even=33i,stringu1="UUAAAA",stringu2="HOCAAA",string4="VVVVxx" 148953600000000000 +tenk unique1=745i,unique2=1724i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=745i,twothousand=745i,fivethous=745i,tenthous=745i,odd=90i,even=91i,stringu1="RCAAAA",stringu2="IOCAAA",string4="AAAAxx" 149040000000000000 +tenk unique1=3326i,unique2=1725i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=326i,twothousand=1326i,fivethous=3326i,tenthous=3326i,odd=52i,even=53i,stringu1="YXAAAA",stringu2="JOCAAA",string4="HHHHxx" 149126400000000000 +tenk unique1=953i,unique2=1726i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=953i,twothousand=953i,fivethous=953i,tenthous=953i,odd=106i,even=107i,stringu1="RKAAAA",stringu2="KOCAAA",string4="OOOOxx" 149212800000000000 +tenk unique1=444i,unique2=1727i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=444i,twothousand=444i,fivethous=444i,tenthous=444i,odd=88i,even=89i,stringu1="CRAAAA",stringu2="LOCAAA",string4="VVVVxx" 149299200000000000 +tenk unique1=280i,unique2=1728i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=280i,twothousand=280i,fivethous=280i,tenthous=280i,odd=160i,even=161i,stringu1="UKAAAA",stringu2="MOCAAA",string4="AAAAxx" 149385600000000000 +tenk unique1=3707i,unique2=1729i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=707i,twothousand=1707i,fivethous=3707i,tenthous=3707i,odd=14i,even=15i,stringu1="PMAAAA",stringu2="NOCAAA",string4="HHHHxx" 149472000000000000 +tenk unique1=1351i,unique2=1730i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=351i,twothousand=1351i,fivethous=1351i,tenthous=1351i,odd=102i,even=103i,stringu1="ZZAAAA",stringu2="OOCAAA",string4="OOOOxx" 149558400000000000 +tenk unique1=1280i,unique2=1731i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=280i,twothousand=1280i,fivethous=1280i,tenthous=1280i,odd=160i,even=161i,stringu1="GXAAAA",stringu2="POCAAA",string4="VVVVxx" 149644800000000000 +tenk unique1=628i,unique2=1732i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=628i,twothousand=628i,fivethous=628i,tenthous=628i,odd=56i,even=57i,stringu1="EYAAAA",stringu2="QOCAAA",string4="AAAAxx" 149731200000000000 +tenk unique1=6198i,unique2=1733i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=198i,twothousand=198i,fivethous=1198i,tenthous=6198i,odd=196i,even=197i,stringu1="KEAAAA",stringu2="ROCAAA",string4="HHHHxx" 149817600000000000 +tenk unique1=1957i,unique2=1734i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=957i,twothousand=1957i,fivethous=1957i,tenthous=1957i,odd=114i,even=115i,stringu1="HXAAAA",stringu2="SOCAAA",string4="OOOOxx" 149904000000000000 +tenk unique1=9241i,unique2=1735i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=241i,twothousand=1241i,fivethous=4241i,tenthous=9241i,odd=82i,even=83i,stringu1="LRAAAA",stringu2="TOCAAA",string4="VVVVxx" 149990400000000000 +tenk unique1=303i,unique2=1736i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=303i,twothousand=303i,fivethous=303i,tenthous=303i,odd=6i,even=7i,stringu1="RLAAAA",stringu2="UOCAAA",string4="AAAAxx" 150076800000000000 +tenk unique1=1945i,unique2=1737i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=945i,twothousand=1945i,fivethous=1945i,tenthous=1945i,odd=90i,even=91i,stringu1="VWAAAA",stringu2="VOCAAA",string4="HHHHxx" 150163200000000000 +tenk unique1=3634i,unique2=1738i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=634i,twothousand=1634i,fivethous=3634i,tenthous=3634i,odd=68i,even=69i,stringu1="UJAAAA",stringu2="WOCAAA",string4="OOOOxx" 150249600000000000 +tenk unique1=4768i,unique2=1739i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=768i,twothousand=768i,fivethous=4768i,tenthous=4768i,odd=136i,even=137i,stringu1="KBAAAA",stringu2="XOCAAA",string4="VVVVxx" 150336000000000000 +tenk unique1=9262i,unique2=1740i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=262i,twothousand=1262i,fivethous=4262i,tenthous=9262i,odd=124i,even=125i,stringu1="GSAAAA",stringu2="YOCAAA",string4="AAAAxx" 150422400000000000 +tenk unique1=2610i,unique2=1741i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=610i,twothousand=610i,fivethous=2610i,tenthous=2610i,odd=20i,even=21i,stringu1="KWAAAA",stringu2="ZOCAAA",string4="HHHHxx" 150508800000000000 +tenk unique1=6640i,unique2=1742i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=640i,twothousand=640i,fivethous=1640i,tenthous=6640i,odd=80i,even=81i,stringu1="KVAAAA",stringu2="APCAAA",string4="OOOOxx" 150595200000000000 +tenk unique1=3338i,unique2=1743i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=338i,twothousand=1338i,fivethous=3338i,tenthous=3338i,odd=76i,even=77i,stringu1="KYAAAA",stringu2="BPCAAA",string4="VVVVxx" 150681600000000000 +tenk unique1=6560i,unique2=1744i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=560i,twothousand=560i,fivethous=1560i,tenthous=6560i,odd=120i,even=121i,stringu1="ISAAAA",stringu2="CPCAAA",string4="AAAAxx" 150768000000000000 +tenk unique1=5986i,unique2=1745i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=986i,twothousand=1986i,fivethous=986i,tenthous=5986i,odd=172i,even=173i,stringu1="GWAAAA",stringu2="DPCAAA",string4="HHHHxx" 150854400000000000 +tenk unique1=2970i,unique2=1746i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=970i,twothousand=970i,fivethous=2970i,tenthous=2970i,odd=140i,even=141i,stringu1="GKAAAA",stringu2="EPCAAA",string4="OOOOxx" 150940800000000000 +tenk unique1=4731i,unique2=1747i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=731i,twothousand=731i,fivethous=4731i,tenthous=4731i,odd=62i,even=63i,stringu1="ZZAAAA",stringu2="FPCAAA",string4="VVVVxx" 151027200000000000 +tenk unique1=9486i,unique2=1748i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=486i,twothousand=1486i,fivethous=4486i,tenthous=9486i,odd=172i,even=173i,stringu1="WAAAAA",stringu2="GPCAAA",string4="AAAAxx" 151113600000000000 +tenk unique1=7204i,unique2=1749i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=204i,twothousand=1204i,fivethous=2204i,tenthous=7204i,odd=8i,even=9i,stringu1="CRAAAA",stringu2="HPCAAA",string4="HHHHxx" 151200000000000000 +tenk unique1=6685i,unique2=1750i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=685i,twothousand=685i,fivethous=1685i,tenthous=6685i,odd=170i,even=171i,stringu1="DXAAAA",stringu2="IPCAAA",string4="OOOOxx" 151286400000000000 +tenk unique1=6852i,unique2=1751i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=852i,twothousand=852i,fivethous=1852i,tenthous=6852i,odd=104i,even=105i,stringu1="ODAAAA",stringu2="JPCAAA",string4="VVVVxx" 151372800000000000 +tenk unique1=2325i,unique2=1752i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=325i,twothousand=325i,fivethous=2325i,tenthous=2325i,odd=50i,even=51i,stringu1="LLAAAA",stringu2="KPCAAA",string4="AAAAxx" 151459200000000000 +tenk unique1=1063i,unique2=1753i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=63i,twothousand=1063i,fivethous=1063i,tenthous=1063i,odd=126i,even=127i,stringu1="XOAAAA",stringu2="LPCAAA",string4="HHHHxx" 151545600000000000 +tenk unique1=6810i,unique2=1754i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=810i,twothousand=810i,fivethous=1810i,tenthous=6810i,odd=20i,even=21i,stringu1="YBAAAA",stringu2="MPCAAA",string4="OOOOxx" 151632000000000000 +tenk unique1=7718i,unique2=1755i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=718i,twothousand=1718i,fivethous=2718i,tenthous=7718i,odd=36i,even=37i,stringu1="WKAAAA",stringu2="NPCAAA",string4="VVVVxx" 151718400000000000 +tenk unique1=1680i,unique2=1756i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=680i,twothousand=1680i,fivethous=1680i,tenthous=1680i,odd=160i,even=161i,stringu1="QMAAAA",stringu2="OPCAAA",string4="AAAAxx" 151804800000000000 +tenk unique1=7402i,unique2=1757i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=402i,twothousand=1402i,fivethous=2402i,tenthous=7402i,odd=4i,even=5i,stringu1="SYAAAA",stringu2="PPCAAA",string4="HHHHxx" 151891200000000000 +tenk unique1=4134i,unique2=1758i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=134i,twothousand=134i,fivethous=4134i,tenthous=4134i,odd=68i,even=69i,stringu1="ADAAAA",stringu2="QPCAAA",string4="OOOOxx" 151977600000000000 +tenk unique1=8232i,unique2=1759i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=232i,twothousand=232i,fivethous=3232i,tenthous=8232i,odd=64i,even=65i,stringu1="QEAAAA",stringu2="RPCAAA",string4="VVVVxx" 152064000000000000 +tenk unique1=6682i,unique2=1760i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=682i,twothousand=682i,fivethous=1682i,tenthous=6682i,odd=164i,even=165i,stringu1="AXAAAA",stringu2="SPCAAA",string4="AAAAxx" 152150400000000000 +tenk unique1=7952i,unique2=1761i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=952i,twothousand=1952i,fivethous=2952i,tenthous=7952i,odd=104i,even=105i,stringu1="WTAAAA",stringu2="TPCAAA",string4="HHHHxx" 152236800000000000 +tenk unique1=5943i,unique2=1762i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=943i,twothousand=1943i,fivethous=943i,tenthous=5943i,odd=86i,even=87i,stringu1="PUAAAA",stringu2="UPCAAA",string4="OOOOxx" 152323200000000000 +tenk unique1=5394i,unique2=1763i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=394i,twothousand=1394i,fivethous=394i,tenthous=5394i,odd=188i,even=189i,stringu1="MZAAAA",stringu2="VPCAAA",string4="VVVVxx" 152409600000000000 +tenk unique1=6554i,unique2=1764i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=554i,twothousand=554i,fivethous=1554i,tenthous=6554i,odd=108i,even=109i,stringu1="CSAAAA",stringu2="WPCAAA",string4="AAAAxx" 152496000000000000 +tenk unique1=8186i,unique2=1765i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=186i,twothousand=186i,fivethous=3186i,tenthous=8186i,odd=172i,even=173i,stringu1="WCAAAA",stringu2="XPCAAA",string4="HHHHxx" 152582400000000000 +tenk unique1=199i,unique2=1766i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=199i,twothousand=199i,fivethous=199i,tenthous=199i,odd=198i,even=199i,stringu1="RHAAAA",stringu2="YPCAAA",string4="OOOOxx" 152668800000000000 +tenk unique1=3386i,unique2=1767i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=386i,twothousand=1386i,fivethous=3386i,tenthous=3386i,odd=172i,even=173i,stringu1="GAAAAA",stringu2="ZPCAAA",string4="VVVVxx" 152755200000000000 +tenk unique1=8974i,unique2=1768i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=974i,twothousand=974i,fivethous=3974i,tenthous=8974i,odd=148i,even=149i,stringu1="EHAAAA",stringu2="AQCAAA",string4="AAAAxx" 152841600000000000 +tenk unique1=8140i,unique2=1769i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=140i,twothousand=140i,fivethous=3140i,tenthous=8140i,odd=80i,even=81i,stringu1="CBAAAA",stringu2="BQCAAA",string4="HHHHxx" 152928000000000000 +tenk unique1=3723i,unique2=1770i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=723i,twothousand=1723i,fivethous=3723i,tenthous=3723i,odd=46i,even=47i,stringu1="FNAAAA",stringu2="CQCAAA",string4="OOOOxx" 153014400000000000 +tenk unique1=8827i,unique2=1771i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=827i,twothousand=827i,fivethous=3827i,tenthous=8827i,odd=54i,even=55i,stringu1="NBAAAA",stringu2="DQCAAA",string4="VVVVxx" 153100800000000000 +tenk unique1=1998i,unique2=1772i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=998i,twothousand=1998i,fivethous=1998i,tenthous=1998i,odd=196i,even=197i,stringu1="WYAAAA",stringu2="EQCAAA",string4="AAAAxx" 153187200000000000 +tenk unique1=879i,unique2=1773i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=879i,twothousand=879i,fivethous=879i,tenthous=879i,odd=158i,even=159i,stringu1="VHAAAA",stringu2="FQCAAA",string4="HHHHxx" 153273600000000000 +tenk unique1=892i,unique2=1774i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=892i,twothousand=892i,fivethous=892i,tenthous=892i,odd=184i,even=185i,stringu1="IIAAAA",stringu2="GQCAAA",string4="OOOOxx" 153360000000000000 +tenk unique1=9468i,unique2=1775i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=468i,twothousand=1468i,fivethous=4468i,tenthous=9468i,odd=136i,even=137i,stringu1="EAAAAA",stringu2="HQCAAA",string4="VVVVxx" 153446400000000000 +tenk unique1=3797i,unique2=1776i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=797i,twothousand=1797i,fivethous=3797i,tenthous=3797i,odd=194i,even=195i,stringu1="BQAAAA",stringu2="IQCAAA",string4="AAAAxx" 153532800000000000 +tenk unique1=8379i,unique2=1777i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=379i,twothousand=379i,fivethous=3379i,tenthous=8379i,odd=158i,even=159i,stringu1="HKAAAA",stringu2="JQCAAA",string4="HHHHxx" 153619200000000000 +tenk unique1=2817i,unique2=1778i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=817i,twothousand=817i,fivethous=2817i,tenthous=2817i,odd=34i,even=35i,stringu1="JEAAAA",stringu2="KQCAAA",string4="OOOOxx" 153705600000000000 +tenk unique1=789i,unique2=1779i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=789i,twothousand=789i,fivethous=789i,tenthous=789i,odd=178i,even=179i,stringu1="JEAAAA",stringu2="LQCAAA",string4="VVVVxx" 153792000000000000 +tenk unique1=3871i,unique2=1780i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=871i,twothousand=1871i,fivethous=3871i,tenthous=3871i,odd=142i,even=143i,stringu1="XSAAAA",stringu2="MQCAAA",string4="AAAAxx" 153878400000000000 +tenk unique1=7931i,unique2=1781i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=931i,twothousand=1931i,fivethous=2931i,tenthous=7931i,odd=62i,even=63i,stringu1="BTAAAA",stringu2="NQCAAA",string4="HHHHxx" 153964800000000000 +tenk unique1=3636i,unique2=1782i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=636i,twothousand=1636i,fivethous=3636i,tenthous=3636i,odd=72i,even=73i,stringu1="WJAAAA",stringu2="OQCAAA",string4="OOOOxx" 154051200000000000 +tenk unique1=699i,unique2=1783i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=699i,twothousand=699i,fivethous=699i,tenthous=699i,odd=198i,even=199i,stringu1="XAAAAA",stringu2="PQCAAA",string4="VVVVxx" 154137600000000000 +tenk unique1=6850i,unique2=1784i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=850i,twothousand=850i,fivethous=1850i,tenthous=6850i,odd=100i,even=101i,stringu1="MDAAAA",stringu2="QQCAAA",string4="AAAAxx" 154224000000000000 +tenk unique1=6394i,unique2=1785i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=394i,twothousand=394i,fivethous=1394i,tenthous=6394i,odd=188i,even=189i,stringu1="YLAAAA",stringu2="RQCAAA",string4="HHHHxx" 154310400000000000 +tenk unique1=3475i,unique2=1786i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=475i,twothousand=1475i,fivethous=3475i,tenthous=3475i,odd=150i,even=151i,stringu1="RDAAAA",stringu2="SQCAAA",string4="OOOOxx" 154396800000000000 +tenk unique1=3026i,unique2=1787i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=26i,twothousand=1026i,fivethous=3026i,tenthous=3026i,odd=52i,even=53i,stringu1="KMAAAA",stringu2="TQCAAA",string4="VVVVxx" 154483200000000000 +tenk unique1=876i,unique2=1788i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=876i,twothousand=876i,fivethous=876i,tenthous=876i,odd=152i,even=153i,stringu1="SHAAAA",stringu2="UQCAAA",string4="AAAAxx" 154569600000000000 +tenk unique1=1992i,unique2=1789i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=992i,twothousand=1992i,fivethous=1992i,tenthous=1992i,odd=184i,even=185i,stringu1="QYAAAA",stringu2="VQCAAA",string4="HHHHxx" 154656000000000000 +tenk unique1=3079i,unique2=1790i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=79i,twothousand=1079i,fivethous=3079i,tenthous=3079i,odd=158i,even=159i,stringu1="LOAAAA",stringu2="WQCAAA",string4="OOOOxx" 154742400000000000 +tenk unique1=8128i,unique2=1791i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=128i,twothousand=128i,fivethous=3128i,tenthous=8128i,odd=56i,even=57i,stringu1="QAAAAA",stringu2="XQCAAA",string4="VVVVxx" 154828800000000000 +tenk unique1=8123i,unique2=1792i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=123i,twothousand=123i,fivethous=3123i,tenthous=8123i,odd=46i,even=47i,stringu1="LAAAAA",stringu2="YQCAAA",string4="AAAAxx" 154915200000000000 +tenk unique1=3285i,unique2=1793i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=285i,twothousand=1285i,fivethous=3285i,tenthous=3285i,odd=170i,even=171i,stringu1="JWAAAA",stringu2="ZQCAAA",string4="HHHHxx" 155001600000000000 +tenk unique1=9315i,unique2=1794i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=315i,twothousand=1315i,fivethous=4315i,tenthous=9315i,odd=30i,even=31i,stringu1="HUAAAA",stringu2="ARCAAA",string4="OOOOxx" 155088000000000000 +tenk unique1=9862i,unique2=1795i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=862i,twothousand=1862i,fivethous=4862i,tenthous=9862i,odd=124i,even=125i,stringu1="IPAAAA",stringu2="BRCAAA",string4="VVVVxx" 155174400000000000 +tenk unique1=2764i,unique2=1796i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=764i,twothousand=764i,fivethous=2764i,tenthous=2764i,odd=128i,even=129i,stringu1="ICAAAA",stringu2="CRCAAA",string4="AAAAxx" 155260800000000000 +tenk unique1=3544i,unique2=1797i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=544i,twothousand=1544i,fivethous=3544i,tenthous=3544i,odd=88i,even=89i,stringu1="IGAAAA",stringu2="DRCAAA",string4="HHHHxx" 155347200000000000 +tenk unique1=7747i,unique2=1798i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=747i,twothousand=1747i,fivethous=2747i,tenthous=7747i,odd=94i,even=95i,stringu1="ZLAAAA",stringu2="ERCAAA",string4="OOOOxx" 155433600000000000 +tenk unique1=7725i,unique2=1799i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=725i,twothousand=1725i,fivethous=2725i,tenthous=7725i,odd=50i,even=51i,stringu1="DLAAAA",stringu2="FRCAAA",string4="VVVVxx" 155520000000000000 +tenk unique1=2449i,unique2=1800i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=449i,twothousand=449i,fivethous=2449i,tenthous=2449i,odd=98i,even=99i,stringu1="FQAAAA",stringu2="GRCAAA",string4="AAAAxx" 155606400000000000 +tenk unique1=8967i,unique2=1801i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=967i,twothousand=967i,fivethous=3967i,tenthous=8967i,odd=134i,even=135i,stringu1="XGAAAA",stringu2="HRCAAA",string4="HHHHxx" 155692800000000000 +tenk unique1=7371i,unique2=1802i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=371i,twothousand=1371i,fivethous=2371i,tenthous=7371i,odd=142i,even=143i,stringu1="NXAAAA",stringu2="IRCAAA",string4="OOOOxx" 155779200000000000 +tenk unique1=2158i,unique2=1803i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=158i,twothousand=158i,fivethous=2158i,tenthous=2158i,odd=116i,even=117i,stringu1="AFAAAA",stringu2="JRCAAA",string4="VVVVxx" 155865600000000000 +tenk unique1=5590i,unique2=1804i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=590i,twothousand=1590i,fivethous=590i,tenthous=5590i,odd=180i,even=181i,stringu1="AHAAAA",stringu2="KRCAAA",string4="AAAAxx" 155952000000000000 +tenk unique1=8072i,unique2=1805i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=72i,twothousand=72i,fivethous=3072i,tenthous=8072i,odd=144i,even=145i,stringu1="MYAAAA",stringu2="LRCAAA",string4="HHHHxx" 156038400000000000 +tenk unique1=1971i,unique2=1806i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=971i,twothousand=1971i,fivethous=1971i,tenthous=1971i,odd=142i,even=143i,stringu1="VXAAAA",stringu2="MRCAAA",string4="OOOOxx" 156124800000000000 +tenk unique1=772i,unique2=1807i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=772i,twothousand=772i,fivethous=772i,tenthous=772i,odd=144i,even=145i,stringu1="SDAAAA",stringu2="NRCAAA",string4="VVVVxx" 156211200000000000 +tenk unique1=3433i,unique2=1808i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=433i,twothousand=1433i,fivethous=3433i,tenthous=3433i,odd=66i,even=67i,stringu1="BCAAAA",stringu2="ORCAAA",string4="AAAAxx" 156297600000000000 +tenk unique1=8419i,unique2=1809i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=419i,twothousand=419i,fivethous=3419i,tenthous=8419i,odd=38i,even=39i,stringu1="VLAAAA",stringu2="PRCAAA",string4="HHHHxx" 156384000000000000 +tenk unique1=1493i,unique2=1810i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=493i,twothousand=1493i,fivethous=1493i,tenthous=1493i,odd=186i,even=187i,stringu1="LFAAAA",stringu2="QRCAAA",string4="OOOOxx" 156470400000000000 +tenk unique1=2584i,unique2=1811i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=584i,twothousand=584i,fivethous=2584i,tenthous=2584i,odd=168i,even=169i,stringu1="KVAAAA",stringu2="RRCAAA",string4="VVVVxx" 156556800000000000 +tenk unique1=9502i,unique2=1812i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=502i,twothousand=1502i,fivethous=4502i,tenthous=9502i,odd=4i,even=5i,stringu1="MBAAAA",stringu2="SRCAAA",string4="AAAAxx" 156643200000000000 +tenk unique1=4673i,unique2=1813i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=673i,twothousand=673i,fivethous=4673i,tenthous=4673i,odd=146i,even=147i,stringu1="TXAAAA",stringu2="TRCAAA",string4="HHHHxx" 156729600000000000 +tenk unique1=7403i,unique2=1814i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=403i,twothousand=1403i,fivethous=2403i,tenthous=7403i,odd=6i,even=7i,stringu1="TYAAAA",stringu2="URCAAA",string4="OOOOxx" 156816000000000000 +tenk unique1=7103i,unique2=1815i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=103i,twothousand=1103i,fivethous=2103i,tenthous=7103i,odd=6i,even=7i,stringu1="FNAAAA",stringu2="VRCAAA",string4="VVVVxx" 156902400000000000 +tenk unique1=7026i,unique2=1816i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=26i,twothousand=1026i,fivethous=2026i,tenthous=7026i,odd=52i,even=53i,stringu1="GKAAAA",stringu2="WRCAAA",string4="AAAAxx" 156988800000000000 +tenk unique1=8574i,unique2=1817i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=574i,twothousand=574i,fivethous=3574i,tenthous=8574i,odd=148i,even=149i,stringu1="URAAAA",stringu2="XRCAAA",string4="HHHHxx" 157075200000000000 +tenk unique1=1366i,unique2=1818i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=366i,twothousand=1366i,fivethous=1366i,tenthous=1366i,odd=132i,even=133i,stringu1="OAAAAA",stringu2="YRCAAA",string4="OOOOxx" 157161600000000000 +tenk unique1=5787i,unique2=1819i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=787i,twothousand=1787i,fivethous=787i,tenthous=5787i,odd=174i,even=175i,stringu1="POAAAA",stringu2="ZRCAAA",string4="VVVVxx" 157248000000000000 +tenk unique1=2552i,unique2=1820i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=552i,twothousand=552i,fivethous=2552i,tenthous=2552i,odd=104i,even=105i,stringu1="EUAAAA",stringu2="ASCAAA",string4="AAAAxx" 157334400000000000 +tenk unique1=4557i,unique2=1821i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=557i,twothousand=557i,fivethous=4557i,tenthous=4557i,odd=114i,even=115i,stringu1="HTAAAA",stringu2="BSCAAA",string4="HHHHxx" 157420800000000000 +tenk unique1=3237i,unique2=1822i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=237i,twothousand=1237i,fivethous=3237i,tenthous=3237i,odd=74i,even=75i,stringu1="NUAAAA",stringu2="CSCAAA",string4="OOOOxx" 157507200000000000 +tenk unique1=6901i,unique2=1823i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=901i,twothousand=901i,fivethous=1901i,tenthous=6901i,odd=2i,even=3i,stringu1="LFAAAA",stringu2="DSCAAA",string4="VVVVxx" 157593600000000000 +tenk unique1=7708i,unique2=1824i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=708i,twothousand=1708i,fivethous=2708i,tenthous=7708i,odd=16i,even=17i,stringu1="MKAAAA",stringu2="ESCAAA",string4="AAAAxx" 157680000000000000 +tenk unique1=2011i,unique2=1825i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=11i,twothousand=11i,fivethous=2011i,tenthous=2011i,odd=22i,even=23i,stringu1="JZAAAA",stringu2="FSCAAA",string4="HHHHxx" 157766400000000000 +tenk unique1=9455i,unique2=1826i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=455i,twothousand=1455i,fivethous=4455i,tenthous=9455i,odd=110i,even=111i,stringu1="RZAAAA",stringu2="GSCAAA",string4="OOOOxx" 157852800000000000 +tenk unique1=5228i,unique2=1827i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=228i,twothousand=1228i,fivethous=228i,tenthous=5228i,odd=56i,even=57i,stringu1="CTAAAA",stringu2="HSCAAA",string4="VVVVxx" 157939200000000000 +tenk unique1=4043i,unique2=1828i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=43i,twothousand=43i,fivethous=4043i,tenthous=4043i,odd=86i,even=87i,stringu1="NZAAAA",stringu2="ISCAAA",string4="AAAAxx" 158025600000000000 +tenk unique1=8242i,unique2=1829i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=242i,twothousand=242i,fivethous=3242i,tenthous=8242i,odd=84i,even=85i,stringu1="AFAAAA",stringu2="JSCAAA",string4="HHHHxx" 158112000000000000 +tenk unique1=6351i,unique2=1830i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=351i,twothousand=351i,fivethous=1351i,tenthous=6351i,odd=102i,even=103i,stringu1="HKAAAA",stringu2="KSCAAA",string4="OOOOxx" 158198400000000000 +tenk unique1=5899i,unique2=1831i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=899i,twothousand=1899i,fivethous=899i,tenthous=5899i,odd=198i,even=199i,stringu1="XSAAAA",stringu2="LSCAAA",string4="VVVVxx" 158284800000000000 +tenk unique1=4849i,unique2=1832i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=849i,twothousand=849i,fivethous=4849i,tenthous=4849i,odd=98i,even=99i,stringu1="NEAAAA",stringu2="MSCAAA",string4="AAAAxx" 158371200000000000 +tenk unique1=9583i,unique2=1833i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=583i,twothousand=1583i,fivethous=4583i,tenthous=9583i,odd=166i,even=167i,stringu1="PEAAAA",stringu2="NSCAAA",string4="HHHHxx" 158457600000000000 +tenk unique1=4994i,unique2=1834i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=994i,twothousand=994i,fivethous=4994i,tenthous=4994i,odd=188i,even=189i,stringu1="CKAAAA",stringu2="OSCAAA",string4="OOOOxx" 158544000000000000 +tenk unique1=9787i,unique2=1835i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=787i,twothousand=1787i,fivethous=4787i,tenthous=9787i,odd=174i,even=175i,stringu1="LMAAAA",stringu2="PSCAAA",string4="VVVVxx" 158630400000000000 +tenk unique1=243i,unique2=1836i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=243i,twothousand=243i,fivethous=243i,tenthous=243i,odd=86i,even=87i,stringu1="JJAAAA",stringu2="QSCAAA",string4="AAAAxx" 158716800000000000 +tenk unique1=3931i,unique2=1837i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=931i,twothousand=1931i,fivethous=3931i,tenthous=3931i,odd=62i,even=63i,stringu1="FVAAAA",stringu2="RSCAAA",string4="HHHHxx" 158803200000000000 +tenk unique1=5945i,unique2=1838i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=945i,twothousand=1945i,fivethous=945i,tenthous=5945i,odd=90i,even=91i,stringu1="RUAAAA",stringu2="SSCAAA",string4="OOOOxx" 158889600000000000 +tenk unique1=1325i,unique2=1839i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=325i,twothousand=1325i,fivethous=1325i,tenthous=1325i,odd=50i,even=51i,stringu1="ZYAAAA",stringu2="TSCAAA",string4="VVVVxx" 158976000000000000 +tenk unique1=4142i,unique2=1840i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=142i,twothousand=142i,fivethous=4142i,tenthous=4142i,odd=84i,even=85i,stringu1="IDAAAA",stringu2="USCAAA",string4="AAAAxx" 159062400000000000 +tenk unique1=1963i,unique2=1841i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=963i,twothousand=1963i,fivethous=1963i,tenthous=1963i,odd=126i,even=127i,stringu1="NXAAAA",stringu2="VSCAAA",string4="HHHHxx" 159148800000000000 +tenk unique1=7041i,unique2=1842i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=41i,twothousand=1041i,fivethous=2041i,tenthous=7041i,odd=82i,even=83i,stringu1="VKAAAA",stringu2="WSCAAA",string4="OOOOxx" 159235200000000000 +tenk unique1=3074i,unique2=1843i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=74i,twothousand=1074i,fivethous=3074i,tenthous=3074i,odd=148i,even=149i,stringu1="GOAAAA",stringu2="XSCAAA",string4="VVVVxx" 159321600000000000 +tenk unique1=3290i,unique2=1844i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=290i,twothousand=1290i,fivethous=3290i,tenthous=3290i,odd=180i,even=181i,stringu1="OWAAAA",stringu2="YSCAAA",string4="AAAAxx" 159408000000000000 +tenk unique1=4146i,unique2=1845i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=146i,twothousand=146i,fivethous=4146i,tenthous=4146i,odd=92i,even=93i,stringu1="MDAAAA",stringu2="ZSCAAA",string4="HHHHxx" 159494400000000000 +tenk unique1=3832i,unique2=1846i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=832i,twothousand=1832i,fivethous=3832i,tenthous=3832i,odd=64i,even=65i,stringu1="KRAAAA",stringu2="ATCAAA",string4="OOOOxx" 159580800000000000 +tenk unique1=2217i,unique2=1847i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=217i,twothousand=217i,fivethous=2217i,tenthous=2217i,odd=34i,even=35i,stringu1="HHAAAA",stringu2="BTCAAA",string4="VVVVxx" 159667200000000000 +tenk unique1=635i,unique2=1848i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=635i,twothousand=635i,fivethous=635i,tenthous=635i,odd=70i,even=71i,stringu1="LYAAAA",stringu2="CTCAAA",string4="AAAAxx" 159753600000000000 +tenk unique1=6967i,unique2=1849i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=967i,twothousand=967i,fivethous=1967i,tenthous=6967i,odd=134i,even=135i,stringu1="ZHAAAA",stringu2="DTCAAA",string4="HHHHxx" 159840000000000000 +tenk unique1=3522i,unique2=1850i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=522i,twothousand=1522i,fivethous=3522i,tenthous=3522i,odd=44i,even=45i,stringu1="MFAAAA",stringu2="ETCAAA",string4="OOOOxx" 159926400000000000 +tenk unique1=2471i,unique2=1851i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=471i,twothousand=471i,fivethous=2471i,tenthous=2471i,odd=142i,even=143i,stringu1="BRAAAA",stringu2="FTCAAA",string4="VVVVxx" 160012800000000000 +tenk unique1=4236i,unique2=1852i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=236i,twothousand=236i,fivethous=4236i,tenthous=4236i,odd=72i,even=73i,stringu1="YGAAAA",stringu2="GTCAAA",string4="AAAAxx" 160099200000000000 +tenk unique1=853i,unique2=1853i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=853i,twothousand=853i,fivethous=853i,tenthous=853i,odd=106i,even=107i,stringu1="VGAAAA",stringu2="HTCAAA",string4="HHHHxx" 160185600000000000 +tenk unique1=3754i,unique2=1854i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=754i,twothousand=1754i,fivethous=3754i,tenthous=3754i,odd=108i,even=109i,stringu1="KOAAAA",stringu2="ITCAAA",string4="OOOOxx" 160272000000000000 +tenk unique1=796i,unique2=1855i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=796i,twothousand=796i,fivethous=796i,tenthous=796i,odd=192i,even=193i,stringu1="QEAAAA",stringu2="JTCAAA",string4="VVVVxx" 160358400000000000 +tenk unique1=4640i,unique2=1856i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=640i,twothousand=640i,fivethous=4640i,tenthous=4640i,odd=80i,even=81i,stringu1="MWAAAA",stringu2="KTCAAA",string4="AAAAxx" 160444800000000000 +tenk unique1=9496i,unique2=1857i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=496i,twothousand=1496i,fivethous=4496i,tenthous=9496i,odd=192i,even=193i,stringu1="GBAAAA",stringu2="LTCAAA",string4="HHHHxx" 160531200000000000 +tenk unique1=6873i,unique2=1858i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=873i,twothousand=873i,fivethous=1873i,tenthous=6873i,odd=146i,even=147i,stringu1="JEAAAA",stringu2="MTCAAA",string4="OOOOxx" 160617600000000000 +tenk unique1=4632i,unique2=1859i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=632i,twothousand=632i,fivethous=4632i,tenthous=4632i,odd=64i,even=65i,stringu1="EWAAAA",stringu2="NTCAAA",string4="VVVVxx" 160704000000000000 +tenk unique1=5758i,unique2=1860i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=758i,twothousand=1758i,fivethous=758i,tenthous=5758i,odd=116i,even=117i,stringu1="MNAAAA",stringu2="OTCAAA",string4="AAAAxx" 160790400000000000 +tenk unique1=6514i,unique2=1861i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=514i,twothousand=514i,fivethous=1514i,tenthous=6514i,odd=28i,even=29i,stringu1="OQAAAA",stringu2="PTCAAA",string4="HHHHxx" 160876800000000000 +tenk unique1=9510i,unique2=1862i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=510i,twothousand=1510i,fivethous=4510i,tenthous=9510i,odd=20i,even=21i,stringu1="UBAAAA",stringu2="QTCAAA",string4="OOOOxx" 160963200000000000 +tenk unique1=8411i,unique2=1863i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=411i,twothousand=411i,fivethous=3411i,tenthous=8411i,odd=22i,even=23i,stringu1="NLAAAA",stringu2="RTCAAA",string4="VVVVxx" 161049600000000000 +tenk unique1=7762i,unique2=1864i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=762i,twothousand=1762i,fivethous=2762i,tenthous=7762i,odd=124i,even=125i,stringu1="OMAAAA",stringu2="STCAAA",string4="AAAAxx" 161136000000000000 +tenk unique1=2225i,unique2=1865i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=225i,twothousand=225i,fivethous=2225i,tenthous=2225i,odd=50i,even=51i,stringu1="PHAAAA",stringu2="TTCAAA",string4="HHHHxx" 161222400000000000 +tenk unique1=4373i,unique2=1866i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=373i,twothousand=373i,fivethous=4373i,tenthous=4373i,odd=146i,even=147i,stringu1="FMAAAA",stringu2="UTCAAA",string4="OOOOxx" 161308800000000000 +tenk unique1=7326i,unique2=1867i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=326i,twothousand=1326i,fivethous=2326i,tenthous=7326i,odd=52i,even=53i,stringu1="UVAAAA",stringu2="VTCAAA",string4="VVVVxx" 161395200000000000 +tenk unique1=8651i,unique2=1868i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=651i,twothousand=651i,fivethous=3651i,tenthous=8651i,odd=102i,even=103i,stringu1="TUAAAA",stringu2="WTCAAA",string4="AAAAxx" 161481600000000000 +tenk unique1=9825i,unique2=1869i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=825i,twothousand=1825i,fivethous=4825i,tenthous=9825i,odd=50i,even=51i,stringu1="XNAAAA",stringu2="XTCAAA",string4="HHHHxx" 161568000000000000 +tenk unique1=2988i,unique2=1870i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=988i,twothousand=988i,fivethous=2988i,tenthous=2988i,odd=176i,even=177i,stringu1="YKAAAA",stringu2="YTCAAA",string4="OOOOxx" 161654400000000000 +tenk unique1=8138i,unique2=1871i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=138i,twothousand=138i,fivethous=3138i,tenthous=8138i,odd=76i,even=77i,stringu1="ABAAAA",stringu2="ZTCAAA",string4="VVVVxx" 161740800000000000 +tenk unique1=7792i,unique2=1872i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=792i,twothousand=1792i,fivethous=2792i,tenthous=7792i,odd=184i,even=185i,stringu1="SNAAAA",stringu2="AUCAAA",string4="AAAAxx" 161827200000000000 +tenk unique1=1232i,unique2=1873i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=232i,twothousand=1232i,fivethous=1232i,tenthous=1232i,odd=64i,even=65i,stringu1="KVAAAA",stringu2="BUCAAA",string4="HHHHxx" 161913600000000000 +tenk unique1=8221i,unique2=1874i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=221i,twothousand=221i,fivethous=3221i,tenthous=8221i,odd=42i,even=43i,stringu1="FEAAAA",stringu2="CUCAAA",string4="OOOOxx" 162000000000000000 +tenk unique1=4044i,unique2=1875i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=44i,twothousand=44i,fivethous=4044i,tenthous=4044i,odd=88i,even=89i,stringu1="OZAAAA",stringu2="DUCAAA",string4="VVVVxx" 162086400000000000 +tenk unique1=1204i,unique2=1876i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=204i,twothousand=1204i,fivethous=1204i,tenthous=1204i,odd=8i,even=9i,stringu1="IUAAAA",stringu2="EUCAAA",string4="AAAAxx" 162172800000000000 +tenk unique1=5145i,unique2=1877i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=145i,twothousand=1145i,fivethous=145i,tenthous=5145i,odd=90i,even=91i,stringu1="XPAAAA",stringu2="FUCAAA",string4="HHHHxx" 162259200000000000 +tenk unique1=7791i,unique2=1878i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=791i,twothousand=1791i,fivethous=2791i,tenthous=7791i,odd=182i,even=183i,stringu1="RNAAAA",stringu2="GUCAAA",string4="OOOOxx" 162345600000000000 +tenk unique1=8270i,unique2=1879i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=270i,twothousand=270i,fivethous=3270i,tenthous=8270i,odd=140i,even=141i,stringu1="CGAAAA",stringu2="HUCAAA",string4="VVVVxx" 162432000000000000 +tenk unique1=9427i,unique2=1880i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=427i,twothousand=1427i,fivethous=4427i,tenthous=9427i,odd=54i,even=55i,stringu1="PYAAAA",stringu2="IUCAAA",string4="AAAAxx" 162518400000000000 +tenk unique1=2152i,unique2=1881i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=152i,twothousand=152i,fivethous=2152i,tenthous=2152i,odd=104i,even=105i,stringu1="UEAAAA",stringu2="JUCAAA",string4="HHHHxx" 162604800000000000 +tenk unique1=7790i,unique2=1882i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=790i,twothousand=1790i,fivethous=2790i,tenthous=7790i,odd=180i,even=181i,stringu1="QNAAAA",stringu2="KUCAAA",string4="OOOOxx" 162691200000000000 +tenk unique1=5301i,unique2=1883i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=301i,twothousand=1301i,fivethous=301i,tenthous=5301i,odd=2i,even=3i,stringu1="XVAAAA",stringu2="LUCAAA",string4="VVVVxx" 162777600000000000 +tenk unique1=626i,unique2=1884i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=626i,twothousand=626i,fivethous=626i,tenthous=626i,odd=52i,even=53i,stringu1="CYAAAA",stringu2="MUCAAA",string4="AAAAxx" 162864000000000000 +tenk unique1=260i,unique2=1885i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=260i,twothousand=260i,fivethous=260i,tenthous=260i,odd=120i,even=121i,stringu1="AKAAAA",stringu2="NUCAAA",string4="HHHHxx" 162950400000000000 +tenk unique1=4369i,unique2=1886i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=369i,twothousand=369i,fivethous=4369i,tenthous=4369i,odd=138i,even=139i,stringu1="BMAAAA",stringu2="OUCAAA",string4="OOOOxx" 163036800000000000 +tenk unique1=5457i,unique2=1887i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=457i,twothousand=1457i,fivethous=457i,tenthous=5457i,odd=114i,even=115i,stringu1="XBAAAA",stringu2="PUCAAA",string4="VVVVxx" 163123200000000000 +tenk unique1=3468i,unique2=1888i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=468i,twothousand=1468i,fivethous=3468i,tenthous=3468i,odd=136i,even=137i,stringu1="KDAAAA",stringu2="QUCAAA",string4="AAAAxx" 163209600000000000 +tenk unique1=2257i,unique2=1889i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=257i,twothousand=257i,fivethous=2257i,tenthous=2257i,odd=114i,even=115i,stringu1="VIAAAA",stringu2="RUCAAA",string4="HHHHxx" 163296000000000000 +tenk unique1=9318i,unique2=1890i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=318i,twothousand=1318i,fivethous=4318i,tenthous=9318i,odd=36i,even=37i,stringu1="KUAAAA",stringu2="SUCAAA",string4="OOOOxx" 163382400000000000 +tenk unique1=8762i,unique2=1891i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=762i,twothousand=762i,fivethous=3762i,tenthous=8762i,odd=124i,even=125i,stringu1="AZAAAA",stringu2="TUCAAA",string4="VVVVxx" 163468800000000000 +tenk unique1=9153i,unique2=1892i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=153i,twothousand=1153i,fivethous=4153i,tenthous=9153i,odd=106i,even=107i,stringu1="BOAAAA",stringu2="UUCAAA",string4="AAAAxx" 163555200000000000 +tenk unique1=9220i,unique2=1893i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=220i,twothousand=1220i,fivethous=4220i,tenthous=9220i,odd=40i,even=41i,stringu1="QQAAAA",stringu2="VUCAAA",string4="HHHHxx" 163641600000000000 +tenk unique1=8003i,unique2=1894i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=3i,fivethous=3003i,tenthous=8003i,odd=6i,even=7i,stringu1="VVAAAA",stringu2="WUCAAA",string4="OOOOxx" 163728000000000000 +tenk unique1=7257i,unique2=1895i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=257i,twothousand=1257i,fivethous=2257i,tenthous=7257i,odd=114i,even=115i,stringu1="DTAAAA",stringu2="XUCAAA",string4="VVVVxx" 163814400000000000 +tenk unique1=3930i,unique2=1896i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=930i,twothousand=1930i,fivethous=3930i,tenthous=3930i,odd=60i,even=61i,stringu1="EVAAAA",stringu2="YUCAAA",string4="AAAAxx" 163900800000000000 +tenk unique1=2976i,unique2=1897i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=976i,twothousand=976i,fivethous=2976i,tenthous=2976i,odd=152i,even=153i,stringu1="MKAAAA",stringu2="ZUCAAA",string4="HHHHxx" 163987200000000000 +tenk unique1=2531i,unique2=1898i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=531i,twothousand=531i,fivethous=2531i,tenthous=2531i,odd=62i,even=63i,stringu1="JTAAAA",stringu2="AVCAAA",string4="OOOOxx" 164073600000000000 +tenk unique1=2250i,unique2=1899i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=250i,twothousand=250i,fivethous=2250i,tenthous=2250i,odd=100i,even=101i,stringu1="OIAAAA",stringu2="BVCAAA",string4="VVVVxx" 164160000000000000 +tenk unique1=8549i,unique2=1900i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=549i,twothousand=549i,fivethous=3549i,tenthous=8549i,odd=98i,even=99i,stringu1="VQAAAA",stringu2="CVCAAA",string4="AAAAxx" 164246400000000000 +tenk unique1=7197i,unique2=1901i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=197i,twothousand=1197i,fivethous=2197i,tenthous=7197i,odd=194i,even=195i,stringu1="VQAAAA",stringu2="DVCAAA",string4="HHHHxx" 164332800000000000 +tenk unique1=5916i,unique2=1902i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=916i,twothousand=1916i,fivethous=916i,tenthous=5916i,odd=32i,even=33i,stringu1="OTAAAA",stringu2="EVCAAA",string4="OOOOxx" 164419200000000000 +tenk unique1=5287i,unique2=1903i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=287i,twothousand=1287i,fivethous=287i,tenthous=5287i,odd=174i,even=175i,stringu1="JVAAAA",stringu2="FVCAAA",string4="VVVVxx" 164505600000000000 +tenk unique1=9095i,unique2=1904i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=95i,twothousand=1095i,fivethous=4095i,tenthous=9095i,odd=190i,even=191i,stringu1="VLAAAA",stringu2="GVCAAA",string4="AAAAxx" 164592000000000000 +tenk unique1=7137i,unique2=1905i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=137i,twothousand=1137i,fivethous=2137i,tenthous=7137i,odd=74i,even=75i,stringu1="NOAAAA",stringu2="HVCAAA",string4="HHHHxx" 164678400000000000 +tenk unique1=7902i,unique2=1906i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=902i,twothousand=1902i,fivethous=2902i,tenthous=7902i,odd=4i,even=5i,stringu1="YRAAAA",stringu2="IVCAAA",string4="OOOOxx" 164764800000000000 +tenk unique1=7598i,unique2=1907i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=598i,twothousand=1598i,fivethous=2598i,tenthous=7598i,odd=196i,even=197i,stringu1="GGAAAA",stringu2="JVCAAA",string4="VVVVxx" 164851200000000000 +tenk unique1=5652i,unique2=1908i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=652i,twothousand=1652i,fivethous=652i,tenthous=5652i,odd=104i,even=105i,stringu1="KJAAAA",stringu2="KVCAAA",string4="AAAAxx" 164937600000000000 +tenk unique1=2017i,unique2=1909i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=17i,twothousand=17i,fivethous=2017i,tenthous=2017i,odd=34i,even=35i,stringu1="PZAAAA",stringu2="LVCAAA",string4="HHHHxx" 165024000000000000 +tenk unique1=7255i,unique2=1910i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=255i,twothousand=1255i,fivethous=2255i,tenthous=7255i,odd=110i,even=111i,stringu1="BTAAAA",stringu2="MVCAAA",string4="OOOOxx" 165110400000000000 +tenk unique1=7999i,unique2=1911i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=999i,twothousand=1999i,fivethous=2999i,tenthous=7999i,odd=198i,even=199i,stringu1="RVAAAA",stringu2="NVCAAA",string4="VVVVxx" 165196800000000000 +tenk unique1=5388i,unique2=1912i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=388i,twothousand=1388i,fivethous=388i,tenthous=5388i,odd=176i,even=177i,stringu1="GZAAAA",stringu2="OVCAAA",string4="AAAAxx" 165283200000000000 +tenk unique1=8754i,unique2=1913i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=754i,twothousand=754i,fivethous=3754i,tenthous=8754i,odd=108i,even=109i,stringu1="SYAAAA",stringu2="PVCAAA",string4="HHHHxx" 165369600000000000 +tenk unique1=5415i,unique2=1914i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=415i,twothousand=1415i,fivethous=415i,tenthous=5415i,odd=30i,even=31i,stringu1="HAAAAA",stringu2="QVCAAA",string4="OOOOxx" 165456000000000000 +tenk unique1=8861i,unique2=1915i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=861i,twothousand=861i,fivethous=3861i,tenthous=8861i,odd=122i,even=123i,stringu1="VCAAAA",stringu2="RVCAAA",string4="VVVVxx" 165542400000000000 +tenk unique1=2874i,unique2=1916i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=874i,twothousand=874i,fivethous=2874i,tenthous=2874i,odd=148i,even=149i,stringu1="OGAAAA",stringu2="SVCAAA",string4="AAAAxx" 165628800000000000 +tenk unique1=9910i,unique2=1917i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=910i,twothousand=1910i,fivethous=4910i,tenthous=9910i,odd=20i,even=21i,stringu1="ERAAAA",stringu2="TVCAAA",string4="HHHHxx" 165715200000000000 +tenk unique1=5178i,unique2=1918i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=178i,twothousand=1178i,fivethous=178i,tenthous=5178i,odd=156i,even=157i,stringu1="ERAAAA",stringu2="UVCAAA",string4="OOOOxx" 165801600000000000 +tenk unique1=5698i,unique2=1919i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=698i,twothousand=1698i,fivethous=698i,tenthous=5698i,odd=196i,even=197i,stringu1="ELAAAA",stringu2="VVCAAA",string4="VVVVxx" 165888000000000000 +tenk unique1=8500i,unique2=1920i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=500i,twothousand=500i,fivethous=3500i,tenthous=8500i,odd=0i,even=1i,stringu1="YOAAAA",stringu2="WVCAAA",string4="AAAAxx" 165974400000000000 +tenk unique1=1814i,unique2=1921i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=814i,twothousand=1814i,fivethous=1814i,tenthous=1814i,odd=28i,even=29i,stringu1="URAAAA",stringu2="XVCAAA",string4="HHHHxx" 166060800000000000 +tenk unique1=4968i,unique2=1922i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=968i,twothousand=968i,fivethous=4968i,tenthous=4968i,odd=136i,even=137i,stringu1="CJAAAA",stringu2="YVCAAA",string4="OOOOxx" 166147200000000000 +tenk unique1=2642i,unique2=1923i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=642i,twothousand=642i,fivethous=2642i,tenthous=2642i,odd=84i,even=85i,stringu1="QXAAAA",stringu2="ZVCAAA",string4="VVVVxx" 166233600000000000 +tenk unique1=1578i,unique2=1924i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=578i,twothousand=1578i,fivethous=1578i,tenthous=1578i,odd=156i,even=157i,stringu1="SIAAAA",stringu2="AWCAAA",string4="AAAAxx" 166320000000000000 +tenk unique1=4774i,unique2=1925i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=774i,twothousand=774i,fivethous=4774i,tenthous=4774i,odd=148i,even=149i,stringu1="QBAAAA",stringu2="BWCAAA",string4="HHHHxx" 166406400000000000 +tenk unique1=7062i,unique2=1926i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=62i,twothousand=1062i,fivethous=2062i,tenthous=7062i,odd=124i,even=125i,stringu1="QLAAAA",stringu2="CWCAAA",string4="OOOOxx" 166492800000000000 +tenk unique1=5381i,unique2=1927i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=381i,twothousand=1381i,fivethous=381i,tenthous=5381i,odd=162i,even=163i,stringu1="ZYAAAA",stringu2="DWCAAA",string4="VVVVxx" 166579200000000000 +tenk unique1=7985i,unique2=1928i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=985i,twothousand=1985i,fivethous=2985i,tenthous=7985i,odd=170i,even=171i,stringu1="DVAAAA",stringu2="EWCAAA",string4="AAAAxx" 166665600000000000 +tenk unique1=3850i,unique2=1929i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=850i,twothousand=1850i,fivethous=3850i,tenthous=3850i,odd=100i,even=101i,stringu1="CSAAAA",stringu2="FWCAAA",string4="HHHHxx" 166752000000000000 +tenk unique1=5624i,unique2=1930i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=624i,twothousand=1624i,fivethous=624i,tenthous=5624i,odd=48i,even=49i,stringu1="IIAAAA",stringu2="GWCAAA",string4="OOOOxx" 166838400000000000 +tenk unique1=8948i,unique2=1931i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=948i,twothousand=948i,fivethous=3948i,tenthous=8948i,odd=96i,even=97i,stringu1="EGAAAA",stringu2="HWCAAA",string4="VVVVxx" 166924800000000000 +tenk unique1=995i,unique2=1932i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=995i,twothousand=995i,fivethous=995i,tenthous=995i,odd=190i,even=191i,stringu1="HMAAAA",stringu2="IWCAAA",string4="AAAAxx" 167011200000000000 +tenk unique1=5058i,unique2=1933i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=58i,twothousand=1058i,fivethous=58i,tenthous=5058i,odd=116i,even=117i,stringu1="OMAAAA",stringu2="JWCAAA",string4="HHHHxx" 167097600000000000 +tenk unique1=9670i,unique2=1934i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=670i,twothousand=1670i,fivethous=4670i,tenthous=9670i,odd=140i,even=141i,stringu1="YHAAAA",stringu2="KWCAAA",string4="OOOOxx" 167184000000000000 +tenk unique1=3115i,unique2=1935i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=115i,twothousand=1115i,fivethous=3115i,tenthous=3115i,odd=30i,even=31i,stringu1="VPAAAA",stringu2="LWCAAA",string4="VVVVxx" 167270400000000000 +tenk unique1=4935i,unique2=1936i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=935i,twothousand=935i,fivethous=4935i,tenthous=4935i,odd=70i,even=71i,stringu1="VHAAAA",stringu2="MWCAAA",string4="AAAAxx" 167356800000000000 +tenk unique1=4735i,unique2=1937i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=735i,twothousand=735i,fivethous=4735i,tenthous=4735i,odd=70i,even=71i,stringu1="DAAAAA",stringu2="NWCAAA",string4="HHHHxx" 167443200000000000 +tenk unique1=1348i,unique2=1938i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=348i,twothousand=1348i,fivethous=1348i,tenthous=1348i,odd=96i,even=97i,stringu1="WZAAAA",stringu2="OWCAAA",string4="OOOOxx" 167529600000000000 +tenk unique1=2380i,unique2=1939i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=380i,twothousand=380i,fivethous=2380i,tenthous=2380i,odd=160i,even=161i,stringu1="ONAAAA",stringu2="PWCAAA",string4="VVVVxx" 167616000000000000 +tenk unique1=4246i,unique2=1940i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=246i,twothousand=246i,fivethous=4246i,tenthous=4246i,odd=92i,even=93i,stringu1="IHAAAA",stringu2="QWCAAA",string4="AAAAxx" 167702400000000000 +tenk unique1=522i,unique2=1941i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=522i,twothousand=522i,fivethous=522i,tenthous=522i,odd=44i,even=45i,stringu1="CUAAAA",stringu2="RWCAAA",string4="HHHHxx" 167788800000000000 +tenk unique1=1701i,unique2=1942i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=701i,twothousand=1701i,fivethous=1701i,tenthous=1701i,odd=2i,even=3i,stringu1="LNAAAA",stringu2="SWCAAA",string4="OOOOxx" 167875200000000000 +tenk unique1=9709i,unique2=1943i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=709i,twothousand=1709i,fivethous=4709i,tenthous=9709i,odd=18i,even=19i,stringu1="LJAAAA",stringu2="TWCAAA",string4="VVVVxx" 167961600000000000 +tenk unique1=8829i,unique2=1944i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=829i,twothousand=829i,fivethous=3829i,tenthous=8829i,odd=58i,even=59i,stringu1="PBAAAA",stringu2="UWCAAA",string4="AAAAxx" 168048000000000000 +tenk unique1=7936i,unique2=1945i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=936i,twothousand=1936i,fivethous=2936i,tenthous=7936i,odd=72i,even=73i,stringu1="GTAAAA",stringu2="VWCAAA",string4="HHHHxx" 168134400000000000 +tenk unique1=8474i,unique2=1946i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=474i,twothousand=474i,fivethous=3474i,tenthous=8474i,odd=148i,even=149i,stringu1="YNAAAA",stringu2="WWCAAA",string4="OOOOxx" 168220800000000000 +tenk unique1=4676i,unique2=1947i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=676i,twothousand=676i,fivethous=4676i,tenthous=4676i,odd=152i,even=153i,stringu1="WXAAAA",stringu2="XWCAAA",string4="VVVVxx" 168307200000000000 +tenk unique1=6303i,unique2=1948i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=303i,twothousand=303i,fivethous=1303i,tenthous=6303i,odd=6i,even=7i,stringu1="LIAAAA",stringu2="YWCAAA",string4="AAAAxx" 168393600000000000 +tenk unique1=3485i,unique2=1949i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=485i,twothousand=1485i,fivethous=3485i,tenthous=3485i,odd=170i,even=171i,stringu1="BEAAAA",stringu2="ZWCAAA",string4="HHHHxx" 168480000000000000 +tenk unique1=2695i,unique2=1950i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=695i,twothousand=695i,fivethous=2695i,tenthous=2695i,odd=190i,even=191i,stringu1="RZAAAA",stringu2="AXCAAA",string4="OOOOxx" 168566400000000000 +tenk unique1=8830i,unique2=1951i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=830i,twothousand=830i,fivethous=3830i,tenthous=8830i,odd=60i,even=61i,stringu1="QBAAAA",stringu2="BXCAAA",string4="VVVVxx" 168652800000000000 +tenk unique1=898i,unique2=1952i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=898i,twothousand=898i,fivethous=898i,tenthous=898i,odd=196i,even=197i,stringu1="OIAAAA",stringu2="CXCAAA",string4="AAAAxx" 168739200000000000 +tenk unique1=7268i,unique2=1953i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=268i,twothousand=1268i,fivethous=2268i,tenthous=7268i,odd=136i,even=137i,stringu1="OTAAAA",stringu2="DXCAAA",string4="HHHHxx" 168825600000000000 +tenk unique1=6568i,unique2=1954i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=568i,twothousand=568i,fivethous=1568i,tenthous=6568i,odd=136i,even=137i,stringu1="QSAAAA",stringu2="EXCAAA",string4="OOOOxx" 168912000000000000 +tenk unique1=9724i,unique2=1955i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=724i,twothousand=1724i,fivethous=4724i,tenthous=9724i,odd=48i,even=49i,stringu1="AKAAAA",stringu2="FXCAAA",string4="VVVVxx" 168998400000000000 +tenk unique1=3329i,unique2=1956i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=329i,twothousand=1329i,fivethous=3329i,tenthous=3329i,odd=58i,even=59i,stringu1="BYAAAA",stringu2="GXCAAA",string4="AAAAxx" 169084800000000000 +tenk unique1=9860i,unique2=1957i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=860i,twothousand=1860i,fivethous=4860i,tenthous=9860i,odd=120i,even=121i,stringu1="GPAAAA",stringu2="HXCAAA",string4="HHHHxx" 169171200000000000 +tenk unique1=6833i,unique2=1958i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=833i,twothousand=833i,fivethous=1833i,tenthous=6833i,odd=66i,even=67i,stringu1="VCAAAA",stringu2="IXCAAA",string4="OOOOxx" 169257600000000000 +tenk unique1=5956i,unique2=1959i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=956i,twothousand=1956i,fivethous=956i,tenthous=5956i,odd=112i,even=113i,stringu1="CVAAAA",stringu2="JXCAAA",string4="VVVVxx" 169344000000000000 +tenk unique1=3963i,unique2=1960i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=963i,twothousand=1963i,fivethous=3963i,tenthous=3963i,odd=126i,even=127i,stringu1="LWAAAA",stringu2="KXCAAA",string4="AAAAxx" 169430400000000000 +tenk unique1=883i,unique2=1961i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=883i,twothousand=883i,fivethous=883i,tenthous=883i,odd=166i,even=167i,stringu1="ZHAAAA",stringu2="LXCAAA",string4="HHHHxx" 169516800000000000 +tenk unique1=2761i,unique2=1962i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=761i,twothousand=761i,fivethous=2761i,tenthous=2761i,odd=122i,even=123i,stringu1="FCAAAA",stringu2="MXCAAA",string4="OOOOxx" 169603200000000000 +tenk unique1=4644i,unique2=1963i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=644i,twothousand=644i,fivethous=4644i,tenthous=4644i,odd=88i,even=89i,stringu1="QWAAAA",stringu2="NXCAAA",string4="VVVVxx" 169689600000000000 +tenk unique1=1358i,unique2=1964i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=358i,twothousand=1358i,fivethous=1358i,tenthous=1358i,odd=116i,even=117i,stringu1="GAAAAA",stringu2="OXCAAA",string4="AAAAxx" 169776000000000000 +tenk unique1=2049i,unique2=1965i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=49i,twothousand=49i,fivethous=2049i,tenthous=2049i,odd=98i,even=99i,stringu1="VAAAAA",stringu2="PXCAAA",string4="HHHHxx" 169862400000000000 +tenk unique1=2193i,unique2=1966i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=193i,twothousand=193i,fivethous=2193i,tenthous=2193i,odd=186i,even=187i,stringu1="JGAAAA",stringu2="QXCAAA",string4="OOOOxx" 169948800000000000 +tenk unique1=9435i,unique2=1967i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=435i,twothousand=1435i,fivethous=4435i,tenthous=9435i,odd=70i,even=71i,stringu1="XYAAAA",stringu2="RXCAAA",string4="VVVVxx" 170035200000000000 +tenk unique1=5890i,unique2=1968i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=890i,twothousand=1890i,fivethous=890i,tenthous=5890i,odd=180i,even=181i,stringu1="OSAAAA",stringu2="SXCAAA",string4="AAAAxx" 170121600000000000 +tenk unique1=8149i,unique2=1969i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=149i,twothousand=149i,fivethous=3149i,tenthous=8149i,odd=98i,even=99i,stringu1="LBAAAA",stringu2="TXCAAA",string4="HHHHxx" 170208000000000000 +tenk unique1=423i,unique2=1970i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=423i,twothousand=423i,fivethous=423i,tenthous=423i,odd=46i,even=47i,stringu1="HQAAAA",stringu2="UXCAAA",string4="OOOOxx" 170294400000000000 +tenk unique1=7980i,unique2=1971i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=980i,twothousand=1980i,fivethous=2980i,tenthous=7980i,odd=160i,even=161i,stringu1="YUAAAA",stringu2="VXCAAA",string4="VVVVxx" 170380800000000000 +tenk unique1=9019i,unique2=1972i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=19i,twothousand=1019i,fivethous=4019i,tenthous=9019i,odd=38i,even=39i,stringu1="XIAAAA",stringu2="WXCAAA",string4="AAAAxx" 170467200000000000 +tenk unique1=1647i,unique2=1973i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=647i,twothousand=1647i,fivethous=1647i,tenthous=1647i,odd=94i,even=95i,stringu1="JLAAAA",stringu2="XXCAAA",string4="HHHHxx" 170553600000000000 +tenk unique1=9495i,unique2=1974i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=495i,twothousand=1495i,fivethous=4495i,tenthous=9495i,odd=190i,even=191i,stringu1="FBAAAA",stringu2="YXCAAA",string4="OOOOxx" 170640000000000000 +tenk unique1=3904i,unique2=1975i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=904i,twothousand=1904i,fivethous=3904i,tenthous=3904i,odd=8i,even=9i,stringu1="EUAAAA",stringu2="ZXCAAA",string4="VVVVxx" 170726400000000000 +tenk unique1=5838i,unique2=1976i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=838i,twothousand=1838i,fivethous=838i,tenthous=5838i,odd=76i,even=77i,stringu1="OQAAAA",stringu2="AYCAAA",string4="AAAAxx" 170812800000000000 +tenk unique1=3866i,unique2=1977i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=866i,twothousand=1866i,fivethous=3866i,tenthous=3866i,odd=132i,even=133i,stringu1="SSAAAA",stringu2="BYCAAA",string4="HHHHxx" 170899200000000000 +tenk unique1=3093i,unique2=1978i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=93i,twothousand=1093i,fivethous=3093i,tenthous=3093i,odd=186i,even=187i,stringu1="ZOAAAA",stringu2="CYCAAA",string4="OOOOxx" 170985600000000000 +tenk unique1=9666i,unique2=1979i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=666i,twothousand=1666i,fivethous=4666i,tenthous=9666i,odd=132i,even=133i,stringu1="UHAAAA",stringu2="DYCAAA",string4="VVVVxx" 171072000000000000 +tenk unique1=1246i,unique2=1980i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=246i,twothousand=1246i,fivethous=1246i,tenthous=1246i,odd=92i,even=93i,stringu1="YVAAAA",stringu2="EYCAAA",string4="AAAAxx" 171158400000000000 +tenk unique1=9759i,unique2=1981i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=759i,twothousand=1759i,fivethous=4759i,tenthous=9759i,odd=118i,even=119i,stringu1="JLAAAA",stringu2="FYCAAA",string4="HHHHxx" 171244800000000000 +tenk unique1=7174i,unique2=1982i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=174i,twothousand=1174i,fivethous=2174i,tenthous=7174i,odd=148i,even=149i,stringu1="YPAAAA",stringu2="GYCAAA",string4="OOOOxx" 171331200000000000 +tenk unique1=7678i,unique2=1983i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=678i,twothousand=1678i,fivethous=2678i,tenthous=7678i,odd=156i,even=157i,stringu1="IJAAAA",stringu2="HYCAAA",string4="VVVVxx" 171417600000000000 +tenk unique1=3004i,unique2=1984i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=1004i,fivethous=3004i,tenthous=3004i,odd=8i,even=9i,stringu1="OLAAAA",stringu2="IYCAAA",string4="AAAAxx" 171504000000000000 +tenk unique1=5607i,unique2=1985i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=607i,twothousand=1607i,fivethous=607i,tenthous=5607i,odd=14i,even=15i,stringu1="RHAAAA",stringu2="JYCAAA",string4="HHHHxx" 171590400000000000 +tenk unique1=8510i,unique2=1986i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=510i,twothousand=510i,fivethous=3510i,tenthous=8510i,odd=20i,even=21i,stringu1="IPAAAA",stringu2="KYCAAA",string4="OOOOxx" 171676800000000000 +tenk unique1=1483i,unique2=1987i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=483i,twothousand=1483i,fivethous=1483i,tenthous=1483i,odd=166i,even=167i,stringu1="BFAAAA",stringu2="LYCAAA",string4="VVVVxx" 171763200000000000 +tenk unique1=2915i,unique2=1988i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=915i,twothousand=915i,fivethous=2915i,tenthous=2915i,odd=30i,even=31i,stringu1="DIAAAA",stringu2="MYCAAA",string4="AAAAxx" 171849600000000000 +tenk unique1=1548i,unique2=1989i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=548i,twothousand=1548i,fivethous=1548i,tenthous=1548i,odd=96i,even=97i,stringu1="OHAAAA",stringu2="NYCAAA",string4="HHHHxx" 171936000000000000 +tenk unique1=5767i,unique2=1990i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=767i,twothousand=1767i,fivethous=767i,tenthous=5767i,odd=134i,even=135i,stringu1="VNAAAA",stringu2="OYCAAA",string4="OOOOxx" 172022400000000000 +tenk unique1=3214i,unique2=1991i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=214i,twothousand=1214i,fivethous=3214i,tenthous=3214i,odd=28i,even=29i,stringu1="QTAAAA",stringu2="PYCAAA",string4="VVVVxx" 172108800000000000 +tenk unique1=8663i,unique2=1992i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=663i,twothousand=663i,fivethous=3663i,tenthous=8663i,odd=126i,even=127i,stringu1="FVAAAA",stringu2="QYCAAA",string4="AAAAxx" 172195200000000000 +tenk unique1=5425i,unique2=1993i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=425i,twothousand=1425i,fivethous=425i,tenthous=5425i,odd=50i,even=51i,stringu1="RAAAAA",stringu2="RYCAAA",string4="HHHHxx" 172281600000000000 +tenk unique1=8530i,unique2=1994i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=530i,twothousand=530i,fivethous=3530i,tenthous=8530i,odd=60i,even=61i,stringu1="CQAAAA",stringu2="SYCAAA",string4="OOOOxx" 172368000000000000 +tenk unique1=821i,unique2=1995i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=821i,twothousand=821i,fivethous=821i,tenthous=821i,odd=42i,even=43i,stringu1="PFAAAA",stringu2="TYCAAA",string4="VVVVxx" 172454400000000000 +tenk unique1=8816i,unique2=1996i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=816i,twothousand=816i,fivethous=3816i,tenthous=8816i,odd=32i,even=33i,stringu1="CBAAAA",stringu2="UYCAAA",string4="AAAAxx" 172540800000000000 +tenk unique1=9367i,unique2=1997i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=367i,twothousand=1367i,fivethous=4367i,tenthous=9367i,odd=134i,even=135i,stringu1="HWAAAA",stringu2="VYCAAA",string4="HHHHxx" 172627200000000000 +tenk unique1=4138i,unique2=1998i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=138i,twothousand=138i,fivethous=4138i,tenthous=4138i,odd=76i,even=77i,stringu1="EDAAAA",stringu2="WYCAAA",string4="OOOOxx" 172713600000000000 +tenk unique1=94i,unique2=1999i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=94i,twothousand=94i,fivethous=94i,tenthous=94i,odd=188i,even=189i,stringu1="QDAAAA",stringu2="XYCAAA",string4="VVVVxx" 172800000000000000 +tenk unique1=1858i,unique2=2000i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=858i,twothousand=1858i,fivethous=1858i,tenthous=1858i,odd=116i,even=117i,stringu1="MTAAAA",stringu2="YYCAAA",string4="AAAAxx" 172886400000000000 +tenk unique1=5513i,unique2=2001i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=513i,twothousand=1513i,fivethous=513i,tenthous=5513i,odd=26i,even=27i,stringu1="BEAAAA",stringu2="ZYCAAA",string4="HHHHxx" 172972800000000000 +tenk unique1=9620i,unique2=2002i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=620i,twothousand=1620i,fivethous=4620i,tenthous=9620i,odd=40i,even=41i,stringu1="AGAAAA",stringu2="AZCAAA",string4="OOOOxx" 173059200000000000 +tenk unique1=4770i,unique2=2003i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=770i,twothousand=770i,fivethous=4770i,tenthous=4770i,odd=140i,even=141i,stringu1="MBAAAA",stringu2="BZCAAA",string4="VVVVxx" 173145600000000000 +tenk unique1=5193i,unique2=2004i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=193i,twothousand=1193i,fivethous=193i,tenthous=5193i,odd=186i,even=187i,stringu1="TRAAAA",stringu2="CZCAAA",string4="AAAAxx" 173232000000000000 +tenk unique1=198i,unique2=2005i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=198i,twothousand=198i,fivethous=198i,tenthous=198i,odd=196i,even=197i,stringu1="QHAAAA",stringu2="DZCAAA",string4="HHHHxx" 173318400000000000 +tenk unique1=417i,unique2=2006i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=417i,twothousand=417i,fivethous=417i,tenthous=417i,odd=34i,even=35i,stringu1="BQAAAA",stringu2="EZCAAA",string4="OOOOxx" 173404800000000000 +tenk unique1=173i,unique2=2007i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=173i,twothousand=173i,fivethous=173i,tenthous=173i,odd=146i,even=147i,stringu1="RGAAAA",stringu2="FZCAAA",string4="VVVVxx" 173491200000000000 +tenk unique1=6248i,unique2=2008i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=248i,twothousand=248i,fivethous=1248i,tenthous=6248i,odd=96i,even=97i,stringu1="IGAAAA",stringu2="GZCAAA",string4="AAAAxx" 173577600000000000 +tenk unique1=302i,unique2=2009i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=302i,twothousand=302i,fivethous=302i,tenthous=302i,odd=4i,even=5i,stringu1="QLAAAA",stringu2="HZCAAA",string4="HHHHxx" 173664000000000000 +tenk unique1=8983i,unique2=2010i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=983i,twothousand=983i,fivethous=3983i,tenthous=8983i,odd=166i,even=167i,stringu1="NHAAAA",stringu2="IZCAAA",string4="OOOOxx" 173750400000000000 +tenk unique1=4840i,unique2=2011i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=840i,twothousand=840i,fivethous=4840i,tenthous=4840i,odd=80i,even=81i,stringu1="EEAAAA",stringu2="JZCAAA",string4="VVVVxx" 173836800000000000 +tenk unique1=2876i,unique2=2012i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=876i,twothousand=876i,fivethous=2876i,tenthous=2876i,odd=152i,even=153i,stringu1="QGAAAA",stringu2="KZCAAA",string4="AAAAxx" 173923200000000000 +tenk unique1=5841i,unique2=2013i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=841i,twothousand=1841i,fivethous=841i,tenthous=5841i,odd=82i,even=83i,stringu1="RQAAAA",stringu2="LZCAAA",string4="HHHHxx" 174009600000000000 +tenk unique1=2766i,unique2=2014i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=766i,twothousand=766i,fivethous=2766i,tenthous=2766i,odd=132i,even=133i,stringu1="KCAAAA",stringu2="MZCAAA",string4="OOOOxx" 174096000000000000 +tenk unique1=9482i,unique2=2015i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=482i,twothousand=1482i,fivethous=4482i,tenthous=9482i,odd=164i,even=165i,stringu1="SAAAAA",stringu2="NZCAAA",string4="VVVVxx" 174182400000000000 +tenk unique1=5335i,unique2=2016i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=335i,twothousand=1335i,fivethous=335i,tenthous=5335i,odd=70i,even=71i,stringu1="FXAAAA",stringu2="OZCAAA",string4="AAAAxx" 174268800000000000 +tenk unique1=1502i,unique2=2017i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=502i,twothousand=1502i,fivethous=1502i,tenthous=1502i,odd=4i,even=5i,stringu1="UFAAAA",stringu2="PZCAAA",string4="HHHHxx" 174355200000000000 +tenk unique1=9291i,unique2=2018i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=291i,twothousand=1291i,fivethous=4291i,tenthous=9291i,odd=182i,even=183i,stringu1="JTAAAA",stringu2="QZCAAA",string4="OOOOxx" 174441600000000000 +tenk unique1=8655i,unique2=2019i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=655i,twothousand=655i,fivethous=3655i,tenthous=8655i,odd=110i,even=111i,stringu1="XUAAAA",stringu2="RZCAAA",string4="VVVVxx" 174528000000000000 +tenk unique1=1687i,unique2=2020i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=687i,twothousand=1687i,fivethous=1687i,tenthous=1687i,odd=174i,even=175i,stringu1="XMAAAA",stringu2="SZCAAA",string4="AAAAxx" 174614400000000000 +tenk unique1=8171i,unique2=2021i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=171i,twothousand=171i,fivethous=3171i,tenthous=8171i,odd=142i,even=143i,stringu1="HCAAAA",stringu2="TZCAAA",string4="HHHHxx" 174700800000000000 +tenk unique1=5699i,unique2=2022i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=699i,twothousand=1699i,fivethous=699i,tenthous=5699i,odd=198i,even=199i,stringu1="FLAAAA",stringu2="UZCAAA",string4="OOOOxx" 174787200000000000 +tenk unique1=1462i,unique2=2023i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=462i,twothousand=1462i,fivethous=1462i,tenthous=1462i,odd=124i,even=125i,stringu1="GEAAAA",stringu2="VZCAAA",string4="VVVVxx" 174873600000000000 +tenk unique1=608i,unique2=2024i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=608i,twothousand=608i,fivethous=608i,tenthous=608i,odd=16i,even=17i,stringu1="KXAAAA",stringu2="WZCAAA",string4="AAAAxx" 174960000000000000 +tenk unique1=6860i,unique2=2025i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=860i,twothousand=860i,fivethous=1860i,tenthous=6860i,odd=120i,even=121i,stringu1="WDAAAA",stringu2="XZCAAA",string4="HHHHxx" 175046400000000000 +tenk unique1=6063i,unique2=2026i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=63i,twothousand=63i,fivethous=1063i,tenthous=6063i,odd=126i,even=127i,stringu1="FZAAAA",stringu2="YZCAAA",string4="OOOOxx" 175132800000000000 +tenk unique1=1422i,unique2=2027i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=422i,twothousand=1422i,fivethous=1422i,tenthous=1422i,odd=44i,even=45i,stringu1="SCAAAA",stringu2="ZZCAAA",string4="VVVVxx" 175219200000000000 +tenk unique1=1932i,unique2=2028i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=932i,twothousand=1932i,fivethous=1932i,tenthous=1932i,odd=64i,even=65i,stringu1="IWAAAA",stringu2="AADAAA",string4="AAAAxx" 175305600000000000 +tenk unique1=5065i,unique2=2029i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=65i,twothousand=1065i,fivethous=65i,tenthous=5065i,odd=130i,even=131i,stringu1="VMAAAA",stringu2="BADAAA",string4="HHHHxx" 175392000000000000 +tenk unique1=432i,unique2=2030i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=432i,twothousand=432i,fivethous=432i,tenthous=432i,odd=64i,even=65i,stringu1="QQAAAA",stringu2="CADAAA",string4="OOOOxx" 175478400000000000 +tenk unique1=4680i,unique2=2031i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=680i,twothousand=680i,fivethous=4680i,tenthous=4680i,odd=160i,even=161i,stringu1="AYAAAA",stringu2="DADAAA",string4="VVVVxx" 175564800000000000 +tenk unique1=8172i,unique2=2032i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=172i,twothousand=172i,fivethous=3172i,tenthous=8172i,odd=144i,even=145i,stringu1="ICAAAA",stringu2="EADAAA",string4="AAAAxx" 175651200000000000 +tenk unique1=8668i,unique2=2033i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=668i,twothousand=668i,fivethous=3668i,tenthous=8668i,odd=136i,even=137i,stringu1="KVAAAA",stringu2="FADAAA",string4="HHHHxx" 175737600000000000 +tenk unique1=256i,unique2=2034i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=256i,twothousand=256i,fivethous=256i,tenthous=256i,odd=112i,even=113i,stringu1="WJAAAA",stringu2="GADAAA",string4="OOOOxx" 175824000000000000 +tenk unique1=2500i,unique2=2035i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=500i,twothousand=500i,fivethous=2500i,tenthous=2500i,odd=0i,even=1i,stringu1="ESAAAA",stringu2="HADAAA",string4="VVVVxx" 175910400000000000 +tenk unique1=274i,unique2=2036i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=274i,twothousand=274i,fivethous=274i,tenthous=274i,odd=148i,even=149i,stringu1="OKAAAA",stringu2="IADAAA",string4="AAAAxx" 175996800000000000 +tenk unique1=5907i,unique2=2037i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=907i,twothousand=1907i,fivethous=907i,tenthous=5907i,odd=14i,even=15i,stringu1="FTAAAA",stringu2="JADAAA",string4="HHHHxx" 176083200000000000 +tenk unique1=8587i,unique2=2038i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=587i,twothousand=587i,fivethous=3587i,tenthous=8587i,odd=174i,even=175i,stringu1="HSAAAA",stringu2="KADAAA",string4="OOOOxx" 176169600000000000 +tenk unique1=9942i,unique2=2039i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=942i,twothousand=1942i,fivethous=4942i,tenthous=9942i,odd=84i,even=85i,stringu1="KSAAAA",stringu2="LADAAA",string4="VVVVxx" 176256000000000000 +tenk unique1=116i,unique2=2040i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=116i,twothousand=116i,fivethous=116i,tenthous=116i,odd=32i,even=33i,stringu1="MEAAAA",stringu2="MADAAA",string4="AAAAxx" 176342400000000000 +tenk unique1=7134i,unique2=2041i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=134i,twothousand=1134i,fivethous=2134i,tenthous=7134i,odd=68i,even=69i,stringu1="KOAAAA",stringu2="NADAAA",string4="HHHHxx" 176428800000000000 +tenk unique1=9002i,unique2=2042i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=1002i,fivethous=4002i,tenthous=9002i,odd=4i,even=5i,stringu1="GIAAAA",stringu2="OADAAA",string4="OOOOxx" 176515200000000000 +tenk unique1=1209i,unique2=2043i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=209i,twothousand=1209i,fivethous=1209i,tenthous=1209i,odd=18i,even=19i,stringu1="NUAAAA",stringu2="PADAAA",string4="VVVVxx" 176601600000000000 +tenk unique1=9983i,unique2=2044i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=983i,twothousand=1983i,fivethous=4983i,tenthous=9983i,odd=166i,even=167i,stringu1="ZTAAAA",stringu2="QADAAA",string4="AAAAxx" 176688000000000000 +tenk unique1=1761i,unique2=2045i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=761i,twothousand=1761i,fivethous=1761i,tenthous=1761i,odd=122i,even=123i,stringu1="TPAAAA",stringu2="RADAAA",string4="HHHHxx" 176774400000000000 +tenk unique1=7723i,unique2=2046i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=723i,twothousand=1723i,fivethous=2723i,tenthous=7723i,odd=46i,even=47i,stringu1="BLAAAA",stringu2="SADAAA",string4="OOOOxx" 176860800000000000 +tenk unique1=6518i,unique2=2047i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=518i,twothousand=518i,fivethous=1518i,tenthous=6518i,odd=36i,even=37i,stringu1="SQAAAA",stringu2="TADAAA",string4="VVVVxx" 176947200000000000 +tenk unique1=1372i,unique2=2048i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=372i,twothousand=1372i,fivethous=1372i,tenthous=1372i,odd=144i,even=145i,stringu1="UAAAAA",stringu2="UADAAA",string4="AAAAxx" 177033600000000000 +tenk unique1=3587i,unique2=2049i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=587i,twothousand=1587i,fivethous=3587i,tenthous=3587i,odd=174i,even=175i,stringu1="ZHAAAA",stringu2="VADAAA",string4="HHHHxx" 177120000000000000 +tenk unique1=5323i,unique2=2050i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=323i,twothousand=1323i,fivethous=323i,tenthous=5323i,odd=46i,even=47i,stringu1="TWAAAA",stringu2="WADAAA",string4="OOOOxx" 177206400000000000 +tenk unique1=5902i,unique2=2051i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=902i,twothousand=1902i,fivethous=902i,tenthous=5902i,odd=4i,even=5i,stringu1="ATAAAA",stringu2="XADAAA",string4="VVVVxx" 177292800000000000 +tenk unique1=3749i,unique2=2052i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=749i,twothousand=1749i,fivethous=3749i,tenthous=3749i,odd=98i,even=99i,stringu1="FOAAAA",stringu2="YADAAA",string4="AAAAxx" 177379200000000000 +tenk unique1=5965i,unique2=2053i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=965i,twothousand=1965i,fivethous=965i,tenthous=5965i,odd=130i,even=131i,stringu1="LVAAAA",stringu2="ZADAAA",string4="HHHHxx" 177465600000000000 +tenk unique1=663i,unique2=2054i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=663i,twothousand=663i,fivethous=663i,tenthous=663i,odd=126i,even=127i,stringu1="NZAAAA",stringu2="ABDAAA",string4="OOOOxx" 177552000000000000 +tenk unique1=36i,unique2=2055i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=36i,twothousand=36i,fivethous=36i,tenthous=36i,odd=72i,even=73i,stringu1="KBAAAA",stringu2="BBDAAA",string4="VVVVxx" 177638400000000000 +tenk unique1=9782i,unique2=2056i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=782i,twothousand=1782i,fivethous=4782i,tenthous=9782i,odd=164i,even=165i,stringu1="GMAAAA",stringu2="CBDAAA",string4="AAAAxx" 177724800000000000 +tenk unique1=5412i,unique2=2057i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=412i,twothousand=1412i,fivethous=412i,tenthous=5412i,odd=24i,even=25i,stringu1="EAAAAA",stringu2="DBDAAA",string4="HHHHxx" 177811200000000000 +tenk unique1=9961i,unique2=2058i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=961i,twothousand=1961i,fivethous=4961i,tenthous=9961i,odd=122i,even=123i,stringu1="DTAAAA",stringu2="EBDAAA",string4="OOOOxx" 177897600000000000 +tenk unique1=6492i,unique2=2059i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=492i,twothousand=492i,fivethous=1492i,tenthous=6492i,odd=184i,even=185i,stringu1="SPAAAA",stringu2="FBDAAA",string4="VVVVxx" 177984000000000000 +tenk unique1=4234i,unique2=2060i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=234i,twothousand=234i,fivethous=4234i,tenthous=4234i,odd=68i,even=69i,stringu1="WGAAAA",stringu2="GBDAAA",string4="AAAAxx" 178070400000000000 +tenk unique1=4922i,unique2=2061i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=922i,twothousand=922i,fivethous=4922i,tenthous=4922i,odd=44i,even=45i,stringu1="IHAAAA",stringu2="HBDAAA",string4="HHHHxx" 178156800000000000 +tenk unique1=6166i,unique2=2062i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=166i,twothousand=166i,fivethous=1166i,tenthous=6166i,odd=132i,even=133i,stringu1="EDAAAA",stringu2="IBDAAA",string4="OOOOxx" 178243200000000000 +tenk unique1=7019i,unique2=2063i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=19i,twothousand=1019i,fivethous=2019i,tenthous=7019i,odd=38i,even=39i,stringu1="ZJAAAA",stringu2="JBDAAA",string4="VVVVxx" 178329600000000000 +tenk unique1=7805i,unique2=2064i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=805i,twothousand=1805i,fivethous=2805i,tenthous=7805i,odd=10i,even=11i,stringu1="FOAAAA",stringu2="KBDAAA",string4="AAAAxx" 178416000000000000 +tenk unique1=9808i,unique2=2065i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=808i,twothousand=1808i,fivethous=4808i,tenthous=9808i,odd=16i,even=17i,stringu1="GNAAAA",stringu2="LBDAAA",string4="HHHHxx" 178502400000000000 +tenk unique1=2550i,unique2=2066i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=550i,twothousand=550i,fivethous=2550i,tenthous=2550i,odd=100i,even=101i,stringu1="CUAAAA",stringu2="MBDAAA",string4="OOOOxx" 178588800000000000 +tenk unique1=8626i,unique2=2067i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=626i,twothousand=626i,fivethous=3626i,tenthous=8626i,odd=52i,even=53i,stringu1="UTAAAA",stringu2="NBDAAA",string4="VVVVxx" 178675200000000000 +tenk unique1=5649i,unique2=2068i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=649i,twothousand=1649i,fivethous=649i,tenthous=5649i,odd=98i,even=99i,stringu1="HJAAAA",stringu2="OBDAAA",string4="AAAAxx" 178761600000000000 +tenk unique1=3117i,unique2=2069i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=117i,twothousand=1117i,fivethous=3117i,tenthous=3117i,odd=34i,even=35i,stringu1="XPAAAA",stringu2="PBDAAA",string4="HHHHxx" 178848000000000000 +tenk unique1=866i,unique2=2070i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=866i,twothousand=866i,fivethous=866i,tenthous=866i,odd=132i,even=133i,stringu1="IHAAAA",stringu2="QBDAAA",string4="OOOOxx" 178934400000000000 +tenk unique1=2323i,unique2=2071i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=323i,twothousand=323i,fivethous=2323i,tenthous=2323i,odd=46i,even=47i,stringu1="JLAAAA",stringu2="RBDAAA",string4="VVVVxx" 179020800000000000 +tenk unique1=5132i,unique2=2072i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=132i,twothousand=1132i,fivethous=132i,tenthous=5132i,odd=64i,even=65i,stringu1="KPAAAA",stringu2="SBDAAA",string4="AAAAxx" 179107200000000000 +tenk unique1=9222i,unique2=2073i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=222i,twothousand=1222i,fivethous=4222i,tenthous=9222i,odd=44i,even=45i,stringu1="SQAAAA",stringu2="TBDAAA",string4="HHHHxx" 179193600000000000 +tenk unique1=3934i,unique2=2074i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=934i,twothousand=1934i,fivethous=3934i,tenthous=3934i,odd=68i,even=69i,stringu1="IVAAAA",stringu2="UBDAAA",string4="OOOOxx" 179280000000000000 +tenk unique1=4845i,unique2=2075i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=845i,twothousand=845i,fivethous=4845i,tenthous=4845i,odd=90i,even=91i,stringu1="JEAAAA",stringu2="VBDAAA",string4="VVVVxx" 179366400000000000 +tenk unique1=7714i,unique2=2076i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=714i,twothousand=1714i,fivethous=2714i,tenthous=7714i,odd=28i,even=29i,stringu1="SKAAAA",stringu2="WBDAAA",string4="AAAAxx" 179452800000000000 +tenk unique1=9818i,unique2=2077i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=818i,twothousand=1818i,fivethous=4818i,tenthous=9818i,odd=36i,even=37i,stringu1="QNAAAA",stringu2="XBDAAA",string4="HHHHxx" 179539200000000000 +tenk unique1=2219i,unique2=2078i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=219i,twothousand=219i,fivethous=2219i,tenthous=2219i,odd=38i,even=39i,stringu1="JHAAAA",stringu2="YBDAAA",string4="OOOOxx" 179625600000000000 +tenk unique1=6573i,unique2=2079i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=573i,twothousand=573i,fivethous=1573i,tenthous=6573i,odd=146i,even=147i,stringu1="VSAAAA",stringu2="ZBDAAA",string4="VVVVxx" 179712000000000000 +tenk unique1=4555i,unique2=2080i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=555i,twothousand=555i,fivethous=4555i,tenthous=4555i,odd=110i,even=111i,stringu1="FTAAAA",stringu2="ACDAAA",string4="AAAAxx" 179798400000000000 +tenk unique1=7306i,unique2=2081i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=306i,twothousand=1306i,fivethous=2306i,tenthous=7306i,odd=12i,even=13i,stringu1="AVAAAA",stringu2="BCDAAA",string4="HHHHxx" 179884800000000000 +tenk unique1=9313i,unique2=2082i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=313i,twothousand=1313i,fivethous=4313i,tenthous=9313i,odd=26i,even=27i,stringu1="FUAAAA",stringu2="CCDAAA",string4="OOOOxx" 179971200000000000 +tenk unique1=3924i,unique2=2083i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=924i,twothousand=1924i,fivethous=3924i,tenthous=3924i,odd=48i,even=49i,stringu1="YUAAAA",stringu2="DCDAAA",string4="VVVVxx" 180057600000000000 +tenk unique1=5176i,unique2=2084i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=176i,twothousand=1176i,fivethous=176i,tenthous=5176i,odd=152i,even=153i,stringu1="CRAAAA",stringu2="ECDAAA",string4="AAAAxx" 180144000000000000 +tenk unique1=9767i,unique2=2085i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=767i,twothousand=1767i,fivethous=4767i,tenthous=9767i,odd=134i,even=135i,stringu1="RLAAAA",stringu2="FCDAAA",string4="HHHHxx" 180230400000000000 +tenk unique1=905i,unique2=2086i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=905i,twothousand=905i,fivethous=905i,tenthous=905i,odd=10i,even=11i,stringu1="VIAAAA",stringu2="GCDAAA",string4="OOOOxx" 180316800000000000 +tenk unique1=8037i,unique2=2087i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=37i,twothousand=37i,fivethous=3037i,tenthous=8037i,odd=74i,even=75i,stringu1="DXAAAA",stringu2="HCDAAA",string4="VVVVxx" 180403200000000000 +tenk unique1=8133i,unique2=2088i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=133i,twothousand=133i,fivethous=3133i,tenthous=8133i,odd=66i,even=67i,stringu1="VAAAAA",stringu2="ICDAAA",string4="AAAAxx" 180489600000000000 +tenk unique1=2954i,unique2=2089i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=954i,twothousand=954i,fivethous=2954i,tenthous=2954i,odd=108i,even=109i,stringu1="QJAAAA",stringu2="JCDAAA",string4="HHHHxx" 180576000000000000 +tenk unique1=7262i,unique2=2090i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=262i,twothousand=1262i,fivethous=2262i,tenthous=7262i,odd=124i,even=125i,stringu1="ITAAAA",stringu2="KCDAAA",string4="OOOOxx" 180662400000000000 +tenk unique1=8768i,unique2=2091i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=768i,twothousand=768i,fivethous=3768i,tenthous=8768i,odd=136i,even=137i,stringu1="GZAAAA",stringu2="LCDAAA",string4="VVVVxx" 180748800000000000 +tenk unique1=6953i,unique2=2092i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=953i,twothousand=953i,fivethous=1953i,tenthous=6953i,odd=106i,even=107i,stringu1="LHAAAA",stringu2="MCDAAA",string4="AAAAxx" 180835200000000000 +tenk unique1=1984i,unique2=2093i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=984i,twothousand=1984i,fivethous=1984i,tenthous=1984i,odd=168i,even=169i,stringu1="IYAAAA",stringu2="NCDAAA",string4="HHHHxx" 180921600000000000 +tenk unique1=9348i,unique2=2094i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=348i,twothousand=1348i,fivethous=4348i,tenthous=9348i,odd=96i,even=97i,stringu1="OVAAAA",stringu2="OCDAAA",string4="OOOOxx" 181008000000000000 +tenk unique1=7769i,unique2=2095i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=769i,twothousand=1769i,fivethous=2769i,tenthous=7769i,odd=138i,even=139i,stringu1="VMAAAA",stringu2="PCDAAA",string4="VVVVxx" 181094400000000000 +tenk unique1=2994i,unique2=2096i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=994i,twothousand=994i,fivethous=2994i,tenthous=2994i,odd=188i,even=189i,stringu1="ELAAAA",stringu2="QCDAAA",string4="AAAAxx" 181180800000000000 +tenk unique1=5938i,unique2=2097i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=938i,twothousand=1938i,fivethous=938i,tenthous=5938i,odd=76i,even=77i,stringu1="KUAAAA",stringu2="RCDAAA",string4="HHHHxx" 181267200000000000 +tenk unique1=556i,unique2=2098i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=556i,twothousand=556i,fivethous=556i,tenthous=556i,odd=112i,even=113i,stringu1="KVAAAA",stringu2="SCDAAA",string4="OOOOxx" 181353600000000000 +tenk unique1=2577i,unique2=2099i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=577i,twothousand=577i,fivethous=2577i,tenthous=2577i,odd=154i,even=155i,stringu1="DVAAAA",stringu2="TCDAAA",string4="VVVVxx" 181440000000000000 +tenk unique1=8733i,unique2=2100i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=733i,twothousand=733i,fivethous=3733i,tenthous=8733i,odd=66i,even=67i,stringu1="XXAAAA",stringu2="UCDAAA",string4="AAAAxx" 181526400000000000 +tenk unique1=3108i,unique2=2101i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=108i,twothousand=1108i,fivethous=3108i,tenthous=3108i,odd=16i,even=17i,stringu1="OPAAAA",stringu2="VCDAAA",string4="HHHHxx" 181612800000000000 +tenk unique1=4166i,unique2=2102i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=166i,twothousand=166i,fivethous=4166i,tenthous=4166i,odd=132i,even=133i,stringu1="GEAAAA",stringu2="WCDAAA",string4="OOOOxx" 181699200000000000 +tenk unique1=3170i,unique2=2103i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=170i,twothousand=1170i,fivethous=3170i,tenthous=3170i,odd=140i,even=141i,stringu1="YRAAAA",stringu2="XCDAAA",string4="VVVVxx" 181785600000000000 +tenk unique1=8118i,unique2=2104i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=118i,twothousand=118i,fivethous=3118i,tenthous=8118i,odd=36i,even=37i,stringu1="GAAAAA",stringu2="YCDAAA",string4="AAAAxx" 181872000000000000 +tenk unique1=8454i,unique2=2105i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=454i,twothousand=454i,fivethous=3454i,tenthous=8454i,odd=108i,even=109i,stringu1="ENAAAA",stringu2="ZCDAAA",string4="HHHHxx" 181958400000000000 +tenk unique1=5338i,unique2=2106i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=338i,twothousand=1338i,fivethous=338i,tenthous=5338i,odd=76i,even=77i,stringu1="IXAAAA",stringu2="ADDAAA",string4="OOOOxx" 182044800000000000 +tenk unique1=402i,unique2=2107i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=402i,twothousand=402i,fivethous=402i,tenthous=402i,odd=4i,even=5i,stringu1="MPAAAA",stringu2="BDDAAA",string4="VVVVxx" 182131200000000000 +tenk unique1=5673i,unique2=2108i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=673i,twothousand=1673i,fivethous=673i,tenthous=5673i,odd=146i,even=147i,stringu1="FKAAAA",stringu2="CDDAAA",string4="AAAAxx" 182217600000000000 +tenk unique1=4324i,unique2=2109i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=324i,twothousand=324i,fivethous=4324i,tenthous=4324i,odd=48i,even=49i,stringu1="IKAAAA",stringu2="DDDAAA",string4="HHHHxx" 182304000000000000 +tenk unique1=1943i,unique2=2110i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=943i,twothousand=1943i,fivethous=1943i,tenthous=1943i,odd=86i,even=87i,stringu1="TWAAAA",stringu2="EDDAAA",string4="OOOOxx" 182390400000000000 +tenk unique1=7703i,unique2=2111i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=703i,twothousand=1703i,fivethous=2703i,tenthous=7703i,odd=6i,even=7i,stringu1="HKAAAA",stringu2="FDDAAA",string4="VVVVxx" 182476800000000000 +tenk unique1=7180i,unique2=2112i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=180i,twothousand=1180i,fivethous=2180i,tenthous=7180i,odd=160i,even=161i,stringu1="EQAAAA",stringu2="GDDAAA",string4="AAAAxx" 182563200000000000 +tenk unique1=5478i,unique2=2113i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=478i,twothousand=1478i,fivethous=478i,tenthous=5478i,odd=156i,even=157i,stringu1="SCAAAA",stringu2="HDDAAA",string4="HHHHxx" 182649600000000000 +tenk unique1=5775i,unique2=2114i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=775i,twothousand=1775i,fivethous=775i,tenthous=5775i,odd=150i,even=151i,stringu1="DOAAAA",stringu2="IDDAAA",string4="OOOOxx" 182736000000000000 +tenk unique1=6952i,unique2=2115i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=952i,twothousand=952i,fivethous=1952i,tenthous=6952i,odd=104i,even=105i,stringu1="KHAAAA",stringu2="JDDAAA",string4="VVVVxx" 182822400000000000 +tenk unique1=9022i,unique2=2116i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=22i,twothousand=1022i,fivethous=4022i,tenthous=9022i,odd=44i,even=45i,stringu1="AJAAAA",stringu2="KDDAAA",string4="AAAAxx" 182908800000000000 +tenk unique1=547i,unique2=2117i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=547i,twothousand=547i,fivethous=547i,tenthous=547i,odd=94i,even=95i,stringu1="BVAAAA",stringu2="LDDAAA",string4="HHHHxx" 182995200000000000 +tenk unique1=5877i,unique2=2118i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=877i,twothousand=1877i,fivethous=877i,tenthous=5877i,odd=154i,even=155i,stringu1="BSAAAA",stringu2="MDDAAA",string4="OOOOxx" 183081600000000000 +tenk unique1=9580i,unique2=2119i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=580i,twothousand=1580i,fivethous=4580i,tenthous=9580i,odd=160i,even=161i,stringu1="MEAAAA",stringu2="NDDAAA",string4="VVVVxx" 183168000000000000 +tenk unique1=6094i,unique2=2120i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=94i,twothousand=94i,fivethous=1094i,tenthous=6094i,odd=188i,even=189i,stringu1="KAAAAA",stringu2="ODDAAA",string4="AAAAxx" 183254400000000000 +tenk unique1=3398i,unique2=2121i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=398i,twothousand=1398i,fivethous=3398i,tenthous=3398i,odd=196i,even=197i,stringu1="SAAAAA",stringu2="PDDAAA",string4="HHHHxx" 183340800000000000 +tenk unique1=4574i,unique2=2122i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=574i,twothousand=574i,fivethous=4574i,tenthous=4574i,odd=148i,even=149i,stringu1="YTAAAA",stringu2="QDDAAA",string4="OOOOxx" 183427200000000000 +tenk unique1=3675i,unique2=2123i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=675i,twothousand=1675i,fivethous=3675i,tenthous=3675i,odd=150i,even=151i,stringu1="JLAAAA",stringu2="RDDAAA",string4="VVVVxx" 183513600000000000 +tenk unique1=6413i,unique2=2124i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=413i,twothousand=413i,fivethous=1413i,tenthous=6413i,odd=26i,even=27i,stringu1="RMAAAA",stringu2="SDDAAA",string4="AAAAxx" 183600000000000000 +tenk unique1=9851i,unique2=2125i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=851i,twothousand=1851i,fivethous=4851i,tenthous=9851i,odd=102i,even=103i,stringu1="XOAAAA",stringu2="TDDAAA",string4="HHHHxx" 183686400000000000 +tenk unique1=126i,unique2=2126i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=126i,twothousand=126i,fivethous=126i,tenthous=126i,odd=52i,even=53i,stringu1="WEAAAA",stringu2="UDDAAA",string4="OOOOxx" 183772800000000000 +tenk unique1=6803i,unique2=2127i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=803i,twothousand=803i,fivethous=1803i,tenthous=6803i,odd=6i,even=7i,stringu1="RBAAAA",stringu2="VDDAAA",string4="VVVVxx" 183859200000000000 +tenk unique1=6949i,unique2=2128i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=949i,twothousand=949i,fivethous=1949i,tenthous=6949i,odd=98i,even=99i,stringu1="HHAAAA",stringu2="WDDAAA",string4="AAAAxx" 183945600000000000 +tenk unique1=115i,unique2=2129i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=115i,twothousand=115i,fivethous=115i,tenthous=115i,odd=30i,even=31i,stringu1="LEAAAA",stringu2="XDDAAA",string4="HHHHxx" 184032000000000000 +tenk unique1=4165i,unique2=2130i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=165i,twothousand=165i,fivethous=4165i,tenthous=4165i,odd=130i,even=131i,stringu1="FEAAAA",stringu2="YDDAAA",string4="OOOOxx" 184118400000000000 +tenk unique1=201i,unique2=2131i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=201i,twothousand=201i,fivethous=201i,tenthous=201i,odd=2i,even=3i,stringu1="THAAAA",stringu2="ZDDAAA",string4="VVVVxx" 184204800000000000 +tenk unique1=9324i,unique2=2132i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=324i,twothousand=1324i,fivethous=4324i,tenthous=9324i,odd=48i,even=49i,stringu1="QUAAAA",stringu2="AEDAAA",string4="AAAAxx" 184291200000000000 +tenk unique1=6562i,unique2=2133i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=562i,twothousand=562i,fivethous=1562i,tenthous=6562i,odd=124i,even=125i,stringu1="KSAAAA",stringu2="BEDAAA",string4="HHHHxx" 184377600000000000 +tenk unique1=1917i,unique2=2134i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=917i,twothousand=1917i,fivethous=1917i,tenthous=1917i,odd=34i,even=35i,stringu1="TVAAAA",stringu2="CEDAAA",string4="OOOOxx" 184464000000000000 +tenk unique1=558i,unique2=2135i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=558i,twothousand=558i,fivethous=558i,tenthous=558i,odd=116i,even=117i,stringu1="MVAAAA",stringu2="DEDAAA",string4="VVVVxx" 184550400000000000 +tenk unique1=8515i,unique2=2136i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=515i,twothousand=515i,fivethous=3515i,tenthous=8515i,odd=30i,even=31i,stringu1="NPAAAA",stringu2="EEDAAA",string4="AAAAxx" 184636800000000000 +tenk unique1=6321i,unique2=2137i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=321i,twothousand=321i,fivethous=1321i,tenthous=6321i,odd=42i,even=43i,stringu1="DJAAAA",stringu2="FEDAAA",string4="HHHHxx" 184723200000000000 +tenk unique1=6892i,unique2=2138i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=892i,twothousand=892i,fivethous=1892i,tenthous=6892i,odd=184i,even=185i,stringu1="CFAAAA",stringu2="GEDAAA",string4="OOOOxx" 184809600000000000 +tenk unique1=1001i,unique2=2139i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1001i,fivethous=1001i,tenthous=1001i,odd=2i,even=3i,stringu1="NMAAAA",stringu2="HEDAAA",string4="VVVVxx" 184896000000000000 +tenk unique1=2858i,unique2=2140i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=858i,twothousand=858i,fivethous=2858i,tenthous=2858i,odd=116i,even=117i,stringu1="YFAAAA",stringu2="IEDAAA",string4="AAAAxx" 184982400000000000 +tenk unique1=2434i,unique2=2141i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=434i,twothousand=434i,fivethous=2434i,tenthous=2434i,odd=68i,even=69i,stringu1="QPAAAA",stringu2="JEDAAA",string4="HHHHxx" 185068800000000000 +tenk unique1=4460i,unique2=2142i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=460i,twothousand=460i,fivethous=4460i,tenthous=4460i,odd=120i,even=121i,stringu1="OPAAAA",stringu2="KEDAAA",string4="OOOOxx" 185155200000000000 +tenk unique1=5447i,unique2=2143i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=447i,twothousand=1447i,fivethous=447i,tenthous=5447i,odd=94i,even=95i,stringu1="NBAAAA",stringu2="LEDAAA",string4="VVVVxx" 185241600000000000 +tenk unique1=3799i,unique2=2144i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=799i,twothousand=1799i,fivethous=3799i,tenthous=3799i,odd=198i,even=199i,stringu1="DQAAAA",stringu2="MEDAAA",string4="AAAAxx" 185328000000000000 +tenk unique1=4310i,unique2=2145i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=310i,twothousand=310i,fivethous=4310i,tenthous=4310i,odd=20i,even=21i,stringu1="UJAAAA",stringu2="NEDAAA",string4="HHHHxx" 185414400000000000 +tenk unique1=405i,unique2=2146i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=405i,twothousand=405i,fivethous=405i,tenthous=405i,odd=10i,even=11i,stringu1="PPAAAA",stringu2="OEDAAA",string4="OOOOxx" 185500800000000000 +tenk unique1=4573i,unique2=2147i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=573i,twothousand=573i,fivethous=4573i,tenthous=4573i,odd=146i,even=147i,stringu1="XTAAAA",stringu2="PEDAAA",string4="VVVVxx" 185587200000000000 +tenk unique1=706i,unique2=2148i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=706i,twothousand=706i,fivethous=706i,tenthous=706i,odd=12i,even=13i,stringu1="EBAAAA",stringu2="QEDAAA",string4="AAAAxx" 185673600000000000 +tenk unique1=7619i,unique2=2149i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=619i,twothousand=1619i,fivethous=2619i,tenthous=7619i,odd=38i,even=39i,stringu1="BHAAAA",stringu2="REDAAA",string4="HHHHxx" 185760000000000000 +tenk unique1=7959i,unique2=2150i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=959i,twothousand=1959i,fivethous=2959i,tenthous=7959i,odd=118i,even=119i,stringu1="DUAAAA",stringu2="SEDAAA",string4="OOOOxx" 185846400000000000 +tenk unique1=6712i,unique2=2151i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=712i,twothousand=712i,fivethous=1712i,tenthous=6712i,odd=24i,even=25i,stringu1="EYAAAA",stringu2="TEDAAA",string4="VVVVxx" 185932800000000000 +tenk unique1=6959i,unique2=2152i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=959i,twothousand=959i,fivethous=1959i,tenthous=6959i,odd=118i,even=119i,stringu1="RHAAAA",stringu2="UEDAAA",string4="AAAAxx" 186019200000000000 +tenk unique1=9791i,unique2=2153i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=791i,twothousand=1791i,fivethous=4791i,tenthous=9791i,odd=182i,even=183i,stringu1="PMAAAA",stringu2="VEDAAA",string4="HHHHxx" 186105600000000000 +tenk unique1=2112i,unique2=2154i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=112i,twothousand=112i,fivethous=2112i,tenthous=2112i,odd=24i,even=25i,stringu1="GDAAAA",stringu2="WEDAAA",string4="OOOOxx" 186192000000000000 +tenk unique1=9114i,unique2=2155i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=114i,twothousand=1114i,fivethous=4114i,tenthous=9114i,odd=28i,even=29i,stringu1="OMAAAA",stringu2="XEDAAA",string4="VVVVxx" 186278400000000000 +tenk unique1=3506i,unique2=2156i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=506i,twothousand=1506i,fivethous=3506i,tenthous=3506i,odd=12i,even=13i,stringu1="WEAAAA",stringu2="YEDAAA",string4="AAAAxx" 186364800000000000 +tenk unique1=5002i,unique2=2157i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=1002i,fivethous=2i,tenthous=5002i,odd=4i,even=5i,stringu1="KKAAAA",stringu2="ZEDAAA",string4="HHHHxx" 186451200000000000 +tenk unique1=3518i,unique2=2158i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=518i,twothousand=1518i,fivethous=3518i,tenthous=3518i,odd=36i,even=37i,stringu1="IFAAAA",stringu2="AFDAAA",string4="OOOOxx" 186537600000000000 +tenk unique1=602i,unique2=2159i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=602i,twothousand=602i,fivethous=602i,tenthous=602i,odd=4i,even=5i,stringu1="EXAAAA",stringu2="BFDAAA",string4="VVVVxx" 186624000000000000 +tenk unique1=9060i,unique2=2160i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=60i,twothousand=1060i,fivethous=4060i,tenthous=9060i,odd=120i,even=121i,stringu1="MKAAAA",stringu2="CFDAAA",string4="AAAAxx" 186710400000000000 +tenk unique1=3292i,unique2=2161i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=292i,twothousand=1292i,fivethous=3292i,tenthous=3292i,odd=184i,even=185i,stringu1="QWAAAA",stringu2="DFDAAA",string4="HHHHxx" 186796800000000000 +tenk unique1=77i,unique2=2162i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=77i,twothousand=77i,fivethous=77i,tenthous=77i,odd=154i,even=155i,stringu1="ZCAAAA",stringu2="EFDAAA",string4="OOOOxx" 186883200000000000 +tenk unique1=1420i,unique2=2163i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=420i,twothousand=1420i,fivethous=1420i,tenthous=1420i,odd=40i,even=41i,stringu1="QCAAAA",stringu2="FFDAAA",string4="VVVVxx" 186969600000000000 +tenk unique1=6001i,unique2=2164i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1i,fivethous=1001i,tenthous=6001i,odd=2i,even=3i,stringu1="VWAAAA",stringu2="GFDAAA",string4="AAAAxx" 187056000000000000 +tenk unique1=7477i,unique2=2165i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=477i,twothousand=1477i,fivethous=2477i,tenthous=7477i,odd=154i,even=155i,stringu1="PBAAAA",stringu2="HFDAAA",string4="HHHHxx" 187142400000000000 +tenk unique1=6655i,unique2=2166i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=655i,twothousand=655i,fivethous=1655i,tenthous=6655i,odd=110i,even=111i,stringu1="ZVAAAA",stringu2="IFDAAA",string4="OOOOxx" 187228800000000000 +tenk unique1=7845i,unique2=2167i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=845i,twothousand=1845i,fivethous=2845i,tenthous=7845i,odd=90i,even=91i,stringu1="TPAAAA",stringu2="JFDAAA",string4="VVVVxx" 187315200000000000 +tenk unique1=8484i,unique2=2168i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=484i,twothousand=484i,fivethous=3484i,tenthous=8484i,odd=168i,even=169i,stringu1="IOAAAA",stringu2="KFDAAA",string4="AAAAxx" 187401600000000000 +tenk unique1=4345i,unique2=2169i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=345i,twothousand=345i,fivethous=4345i,tenthous=4345i,odd=90i,even=91i,stringu1="DLAAAA",stringu2="LFDAAA",string4="HHHHxx" 187488000000000000 +tenk unique1=4250i,unique2=2170i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=250i,twothousand=250i,fivethous=4250i,tenthous=4250i,odd=100i,even=101i,stringu1="MHAAAA",stringu2="MFDAAA",string4="OOOOxx" 187574400000000000 +tenk unique1=2391i,unique2=2171i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=391i,twothousand=391i,fivethous=2391i,tenthous=2391i,odd=182i,even=183i,stringu1="ZNAAAA",stringu2="NFDAAA",string4="VVVVxx" 187660800000000000 +tenk unique1=6884i,unique2=2172i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=884i,twothousand=884i,fivethous=1884i,tenthous=6884i,odd=168i,even=169i,stringu1="UEAAAA",stringu2="OFDAAA",string4="AAAAxx" 187747200000000000 +tenk unique1=7270i,unique2=2173i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=270i,twothousand=1270i,fivethous=2270i,tenthous=7270i,odd=140i,even=141i,stringu1="QTAAAA",stringu2="PFDAAA",string4="HHHHxx" 187833600000000000 +tenk unique1=2499i,unique2=2174i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=499i,twothousand=499i,fivethous=2499i,tenthous=2499i,odd=198i,even=199i,stringu1="DSAAAA",stringu2="QFDAAA",string4="OOOOxx" 187920000000000000 +tenk unique1=7312i,unique2=2175i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=312i,twothousand=1312i,fivethous=2312i,tenthous=7312i,odd=24i,even=25i,stringu1="GVAAAA",stringu2="RFDAAA",string4="VVVVxx" 188006400000000000 +tenk unique1=7113i,unique2=2176i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=113i,twothousand=1113i,fivethous=2113i,tenthous=7113i,odd=26i,even=27i,stringu1="PNAAAA",stringu2="SFDAAA",string4="AAAAxx" 188092800000000000 +tenk unique1=6695i,unique2=2177i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=695i,twothousand=695i,fivethous=1695i,tenthous=6695i,odd=190i,even=191i,stringu1="NXAAAA",stringu2="TFDAAA",string4="HHHHxx" 188179200000000000 +tenk unique1=6521i,unique2=2178i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=521i,twothousand=521i,fivethous=1521i,tenthous=6521i,odd=42i,even=43i,stringu1="VQAAAA",stringu2="UFDAAA",string4="OOOOxx" 188265600000000000 +tenk unique1=272i,unique2=2179i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=272i,twothousand=272i,fivethous=272i,tenthous=272i,odd=144i,even=145i,stringu1="MKAAAA",stringu2="VFDAAA",string4="VVVVxx" 188352000000000000 +tenk unique1=9976i,unique2=2180i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=976i,twothousand=1976i,fivethous=4976i,tenthous=9976i,odd=152i,even=153i,stringu1="STAAAA",stringu2="WFDAAA",string4="AAAAxx" 188438400000000000 +tenk unique1=992i,unique2=2181i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=992i,twothousand=992i,fivethous=992i,tenthous=992i,odd=184i,even=185i,stringu1="EMAAAA",stringu2="XFDAAA",string4="HHHHxx" 188524800000000000 +tenk unique1=6158i,unique2=2182i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=158i,twothousand=158i,fivethous=1158i,tenthous=6158i,odd=116i,even=117i,stringu1="WCAAAA",stringu2="YFDAAA",string4="OOOOxx" 188611200000000000 +tenk unique1=3281i,unique2=2183i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=281i,twothousand=1281i,fivethous=3281i,tenthous=3281i,odd=162i,even=163i,stringu1="FWAAAA",stringu2="ZFDAAA",string4="VVVVxx" 188697600000000000 +tenk unique1=7446i,unique2=2184i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=446i,twothousand=1446i,fivethous=2446i,tenthous=7446i,odd=92i,even=93i,stringu1="KAAAAA",stringu2="AGDAAA",string4="AAAAxx" 188784000000000000 +tenk unique1=4679i,unique2=2185i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=679i,twothousand=679i,fivethous=4679i,tenthous=4679i,odd=158i,even=159i,stringu1="ZXAAAA",stringu2="BGDAAA",string4="HHHHxx" 188870400000000000 +tenk unique1=5203i,unique2=2186i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=203i,twothousand=1203i,fivethous=203i,tenthous=5203i,odd=6i,even=7i,stringu1="DSAAAA",stringu2="CGDAAA",string4="OOOOxx" 188956800000000000 +tenk unique1=9874i,unique2=2187i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=874i,twothousand=1874i,fivethous=4874i,tenthous=9874i,odd=148i,even=149i,stringu1="UPAAAA",stringu2="DGDAAA",string4="VVVVxx" 189043200000000000 +tenk unique1=8371i,unique2=2188i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=371i,twothousand=371i,fivethous=3371i,tenthous=8371i,odd=142i,even=143i,stringu1="ZJAAAA",stringu2="EGDAAA",string4="AAAAxx" 189129600000000000 +tenk unique1=9086i,unique2=2189i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=86i,twothousand=1086i,fivethous=4086i,tenthous=9086i,odd=172i,even=173i,stringu1="MLAAAA",stringu2="FGDAAA",string4="HHHHxx" 189216000000000000 +tenk unique1=430i,unique2=2190i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=430i,twothousand=430i,fivethous=430i,tenthous=430i,odd=60i,even=61i,stringu1="OQAAAA",stringu2="GGDAAA",string4="OOOOxx" 189302400000000000 +tenk unique1=8749i,unique2=2191i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=749i,twothousand=749i,fivethous=3749i,tenthous=8749i,odd=98i,even=99i,stringu1="NYAAAA",stringu2="HGDAAA",string4="VVVVxx" 189388800000000000 +tenk unique1=577i,unique2=2192i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=577i,twothousand=577i,fivethous=577i,tenthous=577i,odd=154i,even=155i,stringu1="FWAAAA",stringu2="IGDAAA",string4="AAAAxx" 189475200000000000 +tenk unique1=4884i,unique2=2193i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=884i,twothousand=884i,fivethous=4884i,tenthous=4884i,odd=168i,even=169i,stringu1="WFAAAA",stringu2="JGDAAA",string4="HHHHxx" 189561600000000000 +tenk unique1=3421i,unique2=2194i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=421i,twothousand=1421i,fivethous=3421i,tenthous=3421i,odd=42i,even=43i,stringu1="PBAAAA",stringu2="KGDAAA",string4="OOOOxx" 189648000000000000 +tenk unique1=2812i,unique2=2195i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=812i,twothousand=812i,fivethous=2812i,tenthous=2812i,odd=24i,even=25i,stringu1="EEAAAA",stringu2="LGDAAA",string4="VVVVxx" 189734400000000000 +tenk unique1=5958i,unique2=2196i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=958i,twothousand=1958i,fivethous=958i,tenthous=5958i,odd=116i,even=117i,stringu1="EVAAAA",stringu2="MGDAAA",string4="AAAAxx" 189820800000000000 +tenk unique1=9901i,unique2=2197i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=901i,twothousand=1901i,fivethous=4901i,tenthous=9901i,odd=2i,even=3i,stringu1="VQAAAA",stringu2="NGDAAA",string4="HHHHxx" 189907200000000000 +tenk unique1=8478i,unique2=2198i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=478i,twothousand=478i,fivethous=3478i,tenthous=8478i,odd=156i,even=157i,stringu1="COAAAA",stringu2="OGDAAA",string4="OOOOxx" 189993600000000000 +tenk unique1=6545i,unique2=2199i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=545i,twothousand=545i,fivethous=1545i,tenthous=6545i,odd=90i,even=91i,stringu1="TRAAAA",stringu2="PGDAAA",string4="VVVVxx" 190080000000000000 +tenk unique1=1479i,unique2=2200i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=479i,twothousand=1479i,fivethous=1479i,tenthous=1479i,odd=158i,even=159i,stringu1="XEAAAA",stringu2="QGDAAA",string4="AAAAxx" 190166400000000000 +tenk unique1=1046i,unique2=2201i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=46i,twothousand=1046i,fivethous=1046i,tenthous=1046i,odd=92i,even=93i,stringu1="GOAAAA",stringu2="RGDAAA",string4="HHHHxx" 190252800000000000 +tenk unique1=6372i,unique2=2202i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=372i,twothousand=372i,fivethous=1372i,tenthous=6372i,odd=144i,even=145i,stringu1="CLAAAA",stringu2="SGDAAA",string4="OOOOxx" 190339200000000000 +tenk unique1=8206i,unique2=2203i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=206i,twothousand=206i,fivethous=3206i,tenthous=8206i,odd=12i,even=13i,stringu1="QDAAAA",stringu2="TGDAAA",string4="VVVVxx" 190425600000000000 +tenk unique1=9544i,unique2=2204i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=544i,twothousand=1544i,fivethous=4544i,tenthous=9544i,odd=88i,even=89i,stringu1="CDAAAA",stringu2="UGDAAA",string4="AAAAxx" 190512000000000000 +tenk unique1=9287i,unique2=2205i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=287i,twothousand=1287i,fivethous=4287i,tenthous=9287i,odd=174i,even=175i,stringu1="FTAAAA",stringu2="VGDAAA",string4="HHHHxx" 190598400000000000 +tenk unique1=6786i,unique2=2206i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=786i,twothousand=786i,fivethous=1786i,tenthous=6786i,odd=172i,even=173i,stringu1="ABAAAA",stringu2="WGDAAA",string4="OOOOxx" 190684800000000000 +tenk unique1=6511i,unique2=2207i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=511i,twothousand=511i,fivethous=1511i,tenthous=6511i,odd=22i,even=23i,stringu1="LQAAAA",stringu2="XGDAAA",string4="VVVVxx" 190771200000000000 +tenk unique1=603i,unique2=2208i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=603i,twothousand=603i,fivethous=603i,tenthous=603i,odd=6i,even=7i,stringu1="FXAAAA",stringu2="YGDAAA",string4="AAAAxx" 190857600000000000 +tenk unique1=2022i,unique2=2209i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=22i,twothousand=22i,fivethous=2022i,tenthous=2022i,odd=44i,even=45i,stringu1="UZAAAA",stringu2="ZGDAAA",string4="HHHHxx" 190944000000000000 +tenk unique1=2086i,unique2=2210i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=86i,twothousand=86i,fivethous=2086i,tenthous=2086i,odd=172i,even=173i,stringu1="GCAAAA",stringu2="AHDAAA",string4="OOOOxx" 191030400000000000 +tenk unique1=1969i,unique2=2211i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=969i,twothousand=1969i,fivethous=1969i,tenthous=1969i,odd=138i,even=139i,stringu1="TXAAAA",stringu2="BHDAAA",string4="VVVVxx" 191116800000000000 +tenk unique1=4841i,unique2=2212i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=841i,twothousand=841i,fivethous=4841i,tenthous=4841i,odd=82i,even=83i,stringu1="FEAAAA",stringu2="CHDAAA",string4="AAAAxx" 191203200000000000 +tenk unique1=5845i,unique2=2213i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=845i,twothousand=1845i,fivethous=845i,tenthous=5845i,odd=90i,even=91i,stringu1="VQAAAA",stringu2="DHDAAA",string4="HHHHxx" 191289600000000000 +tenk unique1=4635i,unique2=2214i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=635i,twothousand=635i,fivethous=4635i,tenthous=4635i,odd=70i,even=71i,stringu1="HWAAAA",stringu2="EHDAAA",string4="OOOOxx" 191376000000000000 +tenk unique1=4658i,unique2=2215i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=658i,twothousand=658i,fivethous=4658i,tenthous=4658i,odd=116i,even=117i,stringu1="EXAAAA",stringu2="FHDAAA",string4="VVVVxx" 191462400000000000 +tenk unique1=2896i,unique2=2216i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=896i,twothousand=896i,fivethous=2896i,tenthous=2896i,odd=192i,even=193i,stringu1="KHAAAA",stringu2="GHDAAA",string4="AAAAxx" 191548800000000000 +tenk unique1=5179i,unique2=2217i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=179i,twothousand=1179i,fivethous=179i,tenthous=5179i,odd=158i,even=159i,stringu1="FRAAAA",stringu2="HHDAAA",string4="HHHHxx" 191635200000000000 +tenk unique1=8667i,unique2=2218i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=667i,twothousand=667i,fivethous=3667i,tenthous=8667i,odd=134i,even=135i,stringu1="JVAAAA",stringu2="IHDAAA",string4="OOOOxx" 191721600000000000 +tenk unique1=7294i,unique2=2219i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=294i,twothousand=1294i,fivethous=2294i,tenthous=7294i,odd=188i,even=189i,stringu1="OUAAAA",stringu2="JHDAAA",string4="VVVVxx" 191808000000000000 +tenk unique1=3706i,unique2=2220i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=706i,twothousand=1706i,fivethous=3706i,tenthous=3706i,odd=12i,even=13i,stringu1="OMAAAA",stringu2="KHDAAA",string4="AAAAxx" 191894400000000000 +tenk unique1=8389i,unique2=2221i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=389i,twothousand=389i,fivethous=3389i,tenthous=8389i,odd=178i,even=179i,stringu1="RKAAAA",stringu2="LHDAAA",string4="HHHHxx" 191980800000000000 +tenk unique1=2486i,unique2=2222i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=486i,twothousand=486i,fivethous=2486i,tenthous=2486i,odd=172i,even=173i,stringu1="QRAAAA",stringu2="MHDAAA",string4="OOOOxx" 192067200000000000 +tenk unique1=8743i,unique2=2223i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=743i,twothousand=743i,fivethous=3743i,tenthous=8743i,odd=86i,even=87i,stringu1="HYAAAA",stringu2="NHDAAA",string4="VVVVxx" 192153600000000000 +tenk unique1=2777i,unique2=2224i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=777i,twothousand=777i,fivethous=2777i,tenthous=2777i,odd=154i,even=155i,stringu1="VCAAAA",stringu2="OHDAAA",string4="AAAAxx" 192240000000000000 +tenk unique1=2113i,unique2=2225i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=113i,twothousand=113i,fivethous=2113i,tenthous=2113i,odd=26i,even=27i,stringu1="HDAAAA",stringu2="PHDAAA",string4="HHHHxx" 192326400000000000 +tenk unique1=2076i,unique2=2226i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=76i,twothousand=76i,fivethous=2076i,tenthous=2076i,odd=152i,even=153i,stringu1="WBAAAA",stringu2="QHDAAA",string4="OOOOxx" 192412800000000000 +tenk unique1=2300i,unique2=2227i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=300i,twothousand=300i,fivethous=2300i,tenthous=2300i,odd=0i,even=1i,stringu1="MKAAAA",stringu2="RHDAAA",string4="VVVVxx" 192499200000000000 +tenk unique1=6894i,unique2=2228i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=894i,twothousand=894i,fivethous=1894i,tenthous=6894i,odd=188i,even=189i,stringu1="EFAAAA",stringu2="SHDAAA",string4="AAAAxx" 192585600000000000 +tenk unique1=6939i,unique2=2229i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=939i,twothousand=939i,fivethous=1939i,tenthous=6939i,odd=78i,even=79i,stringu1="XGAAAA",stringu2="THDAAA",string4="HHHHxx" 192672000000000000 +tenk unique1=446i,unique2=2230i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=446i,twothousand=446i,fivethous=446i,tenthous=446i,odd=92i,even=93i,stringu1="ERAAAA",stringu2="UHDAAA",string4="OOOOxx" 192758400000000000 +tenk unique1=6218i,unique2=2231i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=218i,twothousand=218i,fivethous=1218i,tenthous=6218i,odd=36i,even=37i,stringu1="EFAAAA",stringu2="VHDAAA",string4="VVVVxx" 192844800000000000 +tenk unique1=1295i,unique2=2232i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=295i,twothousand=1295i,fivethous=1295i,tenthous=1295i,odd=190i,even=191i,stringu1="VXAAAA",stringu2="WHDAAA",string4="AAAAxx" 192931200000000000 +tenk unique1=5135i,unique2=2233i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=135i,twothousand=1135i,fivethous=135i,tenthous=5135i,odd=70i,even=71i,stringu1="NPAAAA",stringu2="XHDAAA",string4="HHHHxx" 193017600000000000 +tenk unique1=8122i,unique2=2234i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=122i,twothousand=122i,fivethous=3122i,tenthous=8122i,odd=44i,even=45i,stringu1="KAAAAA",stringu2="YHDAAA",string4="OOOOxx" 193104000000000000 +tenk unique1=316i,unique2=2235i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=316i,twothousand=316i,fivethous=316i,tenthous=316i,odd=32i,even=33i,stringu1="EMAAAA",stringu2="ZHDAAA",string4="VVVVxx" 193190400000000000 +tenk unique1=514i,unique2=2236i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=514i,twothousand=514i,fivethous=514i,tenthous=514i,odd=28i,even=29i,stringu1="UTAAAA",stringu2="AIDAAA",string4="AAAAxx" 193276800000000000 +tenk unique1=7970i,unique2=2237i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=970i,twothousand=1970i,fivethous=2970i,tenthous=7970i,odd=140i,even=141i,stringu1="OUAAAA",stringu2="BIDAAA",string4="HHHHxx" 193363200000000000 +tenk unique1=9350i,unique2=2238i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=350i,twothousand=1350i,fivethous=4350i,tenthous=9350i,odd=100i,even=101i,stringu1="QVAAAA",stringu2="CIDAAA",string4="OOOOxx" 193449600000000000 +tenk unique1=3700i,unique2=2239i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=700i,twothousand=1700i,fivethous=3700i,tenthous=3700i,odd=0i,even=1i,stringu1="IMAAAA",stringu2="DIDAAA",string4="VVVVxx" 193536000000000000 +tenk unique1=582i,unique2=2240i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=582i,twothousand=582i,fivethous=582i,tenthous=582i,odd=164i,even=165i,stringu1="KWAAAA",stringu2="EIDAAA",string4="AAAAxx" 193622400000000000 +tenk unique1=9722i,unique2=2241i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=722i,twothousand=1722i,fivethous=4722i,tenthous=9722i,odd=44i,even=45i,stringu1="YJAAAA",stringu2="FIDAAA",string4="HHHHxx" 193708800000000000 +tenk unique1=7398i,unique2=2242i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=398i,twothousand=1398i,fivethous=2398i,tenthous=7398i,odd=196i,even=197i,stringu1="OYAAAA",stringu2="GIDAAA",string4="OOOOxx" 193795200000000000 +tenk unique1=2265i,unique2=2243i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=265i,twothousand=265i,fivethous=2265i,tenthous=2265i,odd=130i,even=131i,stringu1="DJAAAA",stringu2="HIDAAA",string4="VVVVxx" 193881600000000000 +tenk unique1=3049i,unique2=2244i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=49i,twothousand=1049i,fivethous=3049i,tenthous=3049i,odd=98i,even=99i,stringu1="HNAAAA",stringu2="IIDAAA",string4="AAAAxx" 193968000000000000 +tenk unique1=9121i,unique2=2245i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=121i,twothousand=1121i,fivethous=4121i,tenthous=9121i,odd=42i,even=43i,stringu1="VMAAAA",stringu2="JIDAAA",string4="HHHHxx" 194054400000000000 +tenk unique1=4275i,unique2=2246i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=275i,twothousand=275i,fivethous=4275i,tenthous=4275i,odd=150i,even=151i,stringu1="LIAAAA",stringu2="KIDAAA",string4="OOOOxx" 194140800000000000 +tenk unique1=6567i,unique2=2247i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=567i,twothousand=567i,fivethous=1567i,tenthous=6567i,odd=134i,even=135i,stringu1="PSAAAA",stringu2="LIDAAA",string4="VVVVxx" 194227200000000000 +tenk unique1=6755i,unique2=2248i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=755i,twothousand=755i,fivethous=1755i,tenthous=6755i,odd=110i,even=111i,stringu1="VZAAAA",stringu2="MIDAAA",string4="AAAAxx" 194313600000000000 +tenk unique1=4535i,unique2=2249i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=535i,twothousand=535i,fivethous=4535i,tenthous=4535i,odd=70i,even=71i,stringu1="LSAAAA",stringu2="NIDAAA",string4="HHHHxx" 194400000000000000 +tenk unique1=7968i,unique2=2250i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=968i,twothousand=1968i,fivethous=2968i,tenthous=7968i,odd=136i,even=137i,stringu1="MUAAAA",stringu2="OIDAAA",string4="OOOOxx" 194486400000000000 +tenk unique1=3412i,unique2=2251i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=412i,twothousand=1412i,fivethous=3412i,tenthous=3412i,odd=24i,even=25i,stringu1="GBAAAA",stringu2="PIDAAA",string4="VVVVxx" 194572800000000000 +tenk unique1=6112i,unique2=2252i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=112i,twothousand=112i,fivethous=1112i,tenthous=6112i,odd=24i,even=25i,stringu1="CBAAAA",stringu2="QIDAAA",string4="AAAAxx" 194659200000000000 +tenk unique1=6805i,unique2=2253i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=805i,twothousand=805i,fivethous=1805i,tenthous=6805i,odd=10i,even=11i,stringu1="TBAAAA",stringu2="RIDAAA",string4="HHHHxx" 194745600000000000 +tenk unique1=2880i,unique2=2254i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=880i,twothousand=880i,fivethous=2880i,tenthous=2880i,odd=160i,even=161i,stringu1="UGAAAA",stringu2="SIDAAA",string4="OOOOxx" 194832000000000000 +tenk unique1=7710i,unique2=2255i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=710i,twothousand=1710i,fivethous=2710i,tenthous=7710i,odd=20i,even=21i,stringu1="OKAAAA",stringu2="TIDAAA",string4="VVVVxx" 194918400000000000 +tenk unique1=7949i,unique2=2256i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=949i,twothousand=1949i,fivethous=2949i,tenthous=7949i,odd=98i,even=99i,stringu1="TTAAAA",stringu2="UIDAAA",string4="AAAAxx" 195004800000000000 +tenk unique1=7043i,unique2=2257i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=43i,twothousand=1043i,fivethous=2043i,tenthous=7043i,odd=86i,even=87i,stringu1="XKAAAA",stringu2="VIDAAA",string4="HHHHxx" 195091200000000000 +tenk unique1=9012i,unique2=2258i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=12i,twothousand=1012i,fivethous=4012i,tenthous=9012i,odd=24i,even=25i,stringu1="QIAAAA",stringu2="WIDAAA",string4="OOOOxx" 195177600000000000 +tenk unique1=878i,unique2=2259i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=878i,twothousand=878i,fivethous=878i,tenthous=878i,odd=156i,even=157i,stringu1="UHAAAA",stringu2="XIDAAA",string4="VVVVxx" 195264000000000000 +tenk unique1=7930i,unique2=2260i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=930i,twothousand=1930i,fivethous=2930i,tenthous=7930i,odd=60i,even=61i,stringu1="ATAAAA",stringu2="YIDAAA",string4="AAAAxx" 195350400000000000 +tenk unique1=667i,unique2=2261i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=667i,twothousand=667i,fivethous=667i,tenthous=667i,odd=134i,even=135i,stringu1="RZAAAA",stringu2="ZIDAAA",string4="HHHHxx" 195436800000000000 +tenk unique1=1905i,unique2=2262i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=905i,twothousand=1905i,fivethous=1905i,tenthous=1905i,odd=10i,even=11i,stringu1="HVAAAA",stringu2="AJDAAA",string4="OOOOxx" 195523200000000000 +tenk unique1=4958i,unique2=2263i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=958i,twothousand=958i,fivethous=4958i,tenthous=4958i,odd=116i,even=117i,stringu1="SIAAAA",stringu2="BJDAAA",string4="VVVVxx" 195609600000000000 +tenk unique1=2973i,unique2=2264i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=973i,twothousand=973i,fivethous=2973i,tenthous=2973i,odd=146i,even=147i,stringu1="JKAAAA",stringu2="CJDAAA",string4="AAAAxx" 195696000000000000 +tenk unique1=3631i,unique2=2265i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=631i,twothousand=1631i,fivethous=3631i,tenthous=3631i,odd=62i,even=63i,stringu1="RJAAAA",stringu2="DJDAAA",string4="HHHHxx" 195782400000000000 +tenk unique1=5868i,unique2=2266i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=868i,twothousand=1868i,fivethous=868i,tenthous=5868i,odd=136i,even=137i,stringu1="SRAAAA",stringu2="EJDAAA",string4="OOOOxx" 195868800000000000 +tenk unique1=2873i,unique2=2267i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=873i,twothousand=873i,fivethous=2873i,tenthous=2873i,odd=146i,even=147i,stringu1="NGAAAA",stringu2="FJDAAA",string4="VVVVxx" 195955200000000000 +tenk unique1=6941i,unique2=2268i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=941i,twothousand=941i,fivethous=1941i,tenthous=6941i,odd=82i,even=83i,stringu1="ZGAAAA",stringu2="GJDAAA",string4="AAAAxx" 196041600000000000 +tenk unique1=6384i,unique2=2269i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=384i,twothousand=384i,fivethous=1384i,tenthous=6384i,odd=168i,even=169i,stringu1="OLAAAA",stringu2="HJDAAA",string4="HHHHxx" 196128000000000000 +tenk unique1=3806i,unique2=2270i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=806i,twothousand=1806i,fivethous=3806i,tenthous=3806i,odd=12i,even=13i,stringu1="KQAAAA",stringu2="IJDAAA",string4="OOOOxx" 196214400000000000 +tenk unique1=5079i,unique2=2271i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=79i,twothousand=1079i,fivethous=79i,tenthous=5079i,odd=158i,even=159i,stringu1="JNAAAA",stringu2="JJDAAA",string4="VVVVxx" 196300800000000000 +tenk unique1=1970i,unique2=2272i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=970i,twothousand=1970i,fivethous=1970i,tenthous=1970i,odd=140i,even=141i,stringu1="UXAAAA",stringu2="KJDAAA",string4="AAAAxx" 196387200000000000 +tenk unique1=7810i,unique2=2273i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=810i,twothousand=1810i,fivethous=2810i,tenthous=7810i,odd=20i,even=21i,stringu1="KOAAAA",stringu2="LJDAAA",string4="HHHHxx" 196473600000000000 +tenk unique1=4639i,unique2=2274i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=639i,twothousand=639i,fivethous=4639i,tenthous=4639i,odd=78i,even=79i,stringu1="LWAAAA",stringu2="MJDAAA",string4="OOOOxx" 196560000000000000 +tenk unique1=6527i,unique2=2275i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=527i,twothousand=527i,fivethous=1527i,tenthous=6527i,odd=54i,even=55i,stringu1="BRAAAA",stringu2="NJDAAA",string4="VVVVxx" 196646400000000000 +tenk unique1=8079i,unique2=2276i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=79i,twothousand=79i,fivethous=3079i,tenthous=8079i,odd=158i,even=159i,stringu1="TYAAAA",stringu2="OJDAAA",string4="AAAAxx" 196732800000000000 +tenk unique1=2740i,unique2=2277i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=740i,twothousand=740i,fivethous=2740i,tenthous=2740i,odd=80i,even=81i,stringu1="KBAAAA",stringu2="PJDAAA",string4="HHHHxx" 196819200000000000 +tenk unique1=2337i,unique2=2278i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=337i,twothousand=337i,fivethous=2337i,tenthous=2337i,odd=74i,even=75i,stringu1="XLAAAA",stringu2="QJDAAA",string4="OOOOxx" 196905600000000000 +tenk unique1=6670i,unique2=2279i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=670i,twothousand=670i,fivethous=1670i,tenthous=6670i,odd=140i,even=141i,stringu1="OWAAAA",stringu2="RJDAAA",string4="VVVVxx" 196992000000000000 +tenk unique1=2345i,unique2=2280i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=345i,twothousand=345i,fivethous=2345i,tenthous=2345i,odd=90i,even=91i,stringu1="FMAAAA",stringu2="SJDAAA",string4="AAAAxx" 197078400000000000 +tenk unique1=401i,unique2=2281i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=401i,twothousand=401i,fivethous=401i,tenthous=401i,odd=2i,even=3i,stringu1="LPAAAA",stringu2="TJDAAA",string4="HHHHxx" 197164800000000000 +tenk unique1=2704i,unique2=2282i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=704i,twothousand=704i,fivethous=2704i,tenthous=2704i,odd=8i,even=9i,stringu1="AAAAAA",stringu2="UJDAAA",string4="OOOOxx" 197251200000000000 +tenk unique1=5530i,unique2=2283i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=530i,twothousand=1530i,fivethous=530i,tenthous=5530i,odd=60i,even=61i,stringu1="SEAAAA",stringu2="VJDAAA",string4="VVVVxx" 197337600000000000 +tenk unique1=51i,unique2=2284i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=51i,twothousand=51i,fivethous=51i,tenthous=51i,odd=102i,even=103i,stringu1="ZBAAAA",stringu2="WJDAAA",string4="AAAAxx" 197424000000000000 +tenk unique1=4282i,unique2=2285i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=282i,twothousand=282i,fivethous=4282i,tenthous=4282i,odd=164i,even=165i,stringu1="SIAAAA",stringu2="XJDAAA",string4="HHHHxx" 197510400000000000 +tenk unique1=7336i,unique2=2286i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=336i,twothousand=1336i,fivethous=2336i,tenthous=7336i,odd=72i,even=73i,stringu1="EWAAAA",stringu2="YJDAAA",string4="OOOOxx" 197596800000000000 +tenk unique1=8320i,unique2=2287i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=320i,twothousand=320i,fivethous=3320i,tenthous=8320i,odd=40i,even=41i,stringu1="AIAAAA",stringu2="ZJDAAA",string4="VVVVxx" 197683200000000000 +tenk unique1=7772i,unique2=2288i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=772i,twothousand=1772i,fivethous=2772i,tenthous=7772i,odd=144i,even=145i,stringu1="YMAAAA",stringu2="AKDAAA",string4="AAAAxx" 197769600000000000 +tenk unique1=1894i,unique2=2289i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=894i,twothousand=1894i,fivethous=1894i,tenthous=1894i,odd=188i,even=189i,stringu1="WUAAAA",stringu2="BKDAAA",string4="HHHHxx" 197856000000000000 +tenk unique1=2320i,unique2=2290i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=320i,twothousand=320i,fivethous=2320i,tenthous=2320i,odd=40i,even=41i,stringu1="GLAAAA",stringu2="CKDAAA",string4="OOOOxx" 197942400000000000 +tenk unique1=6232i,unique2=2291i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=232i,twothousand=232i,fivethous=1232i,tenthous=6232i,odd=64i,even=65i,stringu1="SFAAAA",stringu2="DKDAAA",string4="VVVVxx" 198028800000000000 +tenk unique1=2833i,unique2=2292i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=833i,twothousand=833i,fivethous=2833i,tenthous=2833i,odd=66i,even=67i,stringu1="ZEAAAA",stringu2="EKDAAA",string4="AAAAxx" 198115200000000000 +tenk unique1=8265i,unique2=2293i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=265i,twothousand=265i,fivethous=3265i,tenthous=8265i,odd=130i,even=131i,stringu1="XFAAAA",stringu2="FKDAAA",string4="HHHHxx" 198201600000000000 +tenk unique1=4589i,unique2=2294i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=589i,twothousand=589i,fivethous=4589i,tenthous=4589i,odd=178i,even=179i,stringu1="NUAAAA",stringu2="GKDAAA",string4="OOOOxx" 198288000000000000 +tenk unique1=8182i,unique2=2295i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=182i,twothousand=182i,fivethous=3182i,tenthous=8182i,odd=164i,even=165i,stringu1="SCAAAA",stringu2="HKDAAA",string4="VVVVxx" 198374400000000000 +tenk unique1=8337i,unique2=2296i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=337i,twothousand=337i,fivethous=3337i,tenthous=8337i,odd=74i,even=75i,stringu1="RIAAAA",stringu2="IKDAAA",string4="AAAAxx" 198460800000000000 +tenk unique1=8210i,unique2=2297i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=210i,twothousand=210i,fivethous=3210i,tenthous=8210i,odd=20i,even=21i,stringu1="UDAAAA",stringu2="JKDAAA",string4="HHHHxx" 198547200000000000 +tenk unique1=1406i,unique2=2298i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=406i,twothousand=1406i,fivethous=1406i,tenthous=1406i,odd=12i,even=13i,stringu1="CCAAAA",stringu2="KKDAAA",string4="OOOOxx" 198633600000000000 +tenk unique1=4463i,unique2=2299i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=463i,twothousand=463i,fivethous=4463i,tenthous=4463i,odd=126i,even=127i,stringu1="RPAAAA",stringu2="LKDAAA",string4="VVVVxx" 198720000000000000 +tenk unique1=4347i,unique2=2300i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=347i,twothousand=347i,fivethous=4347i,tenthous=4347i,odd=94i,even=95i,stringu1="FLAAAA",stringu2="MKDAAA",string4="AAAAxx" 198806400000000000 +tenk unique1=181i,unique2=2301i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=181i,twothousand=181i,fivethous=181i,tenthous=181i,odd=162i,even=163i,stringu1="ZGAAAA",stringu2="NKDAAA",string4="HHHHxx" 198892800000000000 +tenk unique1=9986i,unique2=2302i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=986i,twothousand=1986i,fivethous=4986i,tenthous=9986i,odd=172i,even=173i,stringu1="CUAAAA",stringu2="OKDAAA",string4="OOOOxx" 198979200000000000 +tenk unique1=661i,unique2=2303i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=661i,twothousand=661i,fivethous=661i,tenthous=661i,odd=122i,even=123i,stringu1="LZAAAA",stringu2="PKDAAA",string4="VVVVxx" 199065600000000000 +tenk unique1=4105i,unique2=2304i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=105i,twothousand=105i,fivethous=4105i,tenthous=4105i,odd=10i,even=11i,stringu1="XBAAAA",stringu2="QKDAAA",string4="AAAAxx" 199152000000000000 +tenk unique1=2187i,unique2=2305i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=187i,twothousand=187i,fivethous=2187i,tenthous=2187i,odd=174i,even=175i,stringu1="DGAAAA",stringu2="RKDAAA",string4="HHHHxx" 199238400000000000 +tenk unique1=1628i,unique2=2306i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=628i,twothousand=1628i,fivethous=1628i,tenthous=1628i,odd=56i,even=57i,stringu1="QKAAAA",stringu2="SKDAAA",string4="OOOOxx" 199324800000000000 +tenk unique1=3119i,unique2=2307i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=119i,twothousand=1119i,fivethous=3119i,tenthous=3119i,odd=38i,even=39i,stringu1="ZPAAAA",stringu2="TKDAAA",string4="VVVVxx" 199411200000000000 +tenk unique1=6804i,unique2=2308i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=804i,twothousand=804i,fivethous=1804i,tenthous=6804i,odd=8i,even=9i,stringu1="SBAAAA",stringu2="UKDAAA",string4="AAAAxx" 199497600000000000 +tenk unique1=9918i,unique2=2309i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=918i,twothousand=1918i,fivethous=4918i,tenthous=9918i,odd=36i,even=37i,stringu1="MRAAAA",stringu2="VKDAAA",string4="HHHHxx" 199584000000000000 +tenk unique1=8916i,unique2=2310i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=916i,twothousand=916i,fivethous=3916i,tenthous=8916i,odd=32i,even=33i,stringu1="YEAAAA",stringu2="WKDAAA",string4="OOOOxx" 199670400000000000 +tenk unique1=6057i,unique2=2311i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=57i,twothousand=57i,fivethous=1057i,tenthous=6057i,odd=114i,even=115i,stringu1="ZYAAAA",stringu2="XKDAAA",string4="VVVVxx" 199756800000000000 +tenk unique1=3622i,unique2=2312i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=622i,twothousand=1622i,fivethous=3622i,tenthous=3622i,odd=44i,even=45i,stringu1="IJAAAA",stringu2="YKDAAA",string4="AAAAxx" 199843200000000000 +tenk unique1=9168i,unique2=2313i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=168i,twothousand=1168i,fivethous=4168i,tenthous=9168i,odd=136i,even=137i,stringu1="QOAAAA",stringu2="ZKDAAA",string4="HHHHxx" 199929600000000000 +tenk unique1=3720i,unique2=2314i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=720i,twothousand=1720i,fivethous=3720i,tenthous=3720i,odd=40i,even=41i,stringu1="CNAAAA",stringu2="ALDAAA",string4="OOOOxx" 200016000000000000 +tenk unique1=9927i,unique2=2315i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=927i,twothousand=1927i,fivethous=4927i,tenthous=9927i,odd=54i,even=55i,stringu1="VRAAAA",stringu2="BLDAAA",string4="VVVVxx" 200102400000000000 +tenk unique1=5616i,unique2=2316i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=616i,twothousand=1616i,fivethous=616i,tenthous=5616i,odd=32i,even=33i,stringu1="AIAAAA",stringu2="CLDAAA",string4="AAAAxx" 200188800000000000 +tenk unique1=5210i,unique2=2317i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=210i,twothousand=1210i,fivethous=210i,tenthous=5210i,odd=20i,even=21i,stringu1="KSAAAA",stringu2="DLDAAA",string4="HHHHxx" 200275200000000000 +tenk unique1=636i,unique2=2318i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=636i,twothousand=636i,fivethous=636i,tenthous=636i,odd=72i,even=73i,stringu1="MYAAAA",stringu2="ELDAAA",string4="OOOOxx" 200361600000000000 +tenk unique1=9936i,unique2=2319i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=936i,twothousand=1936i,fivethous=4936i,tenthous=9936i,odd=72i,even=73i,stringu1="ESAAAA",stringu2="FLDAAA",string4="VVVVxx" 200448000000000000 +tenk unique1=2316i,unique2=2320i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=316i,twothousand=316i,fivethous=2316i,tenthous=2316i,odd=32i,even=33i,stringu1="CLAAAA",stringu2="GLDAAA",string4="AAAAxx" 200534400000000000 +tenk unique1=4363i,unique2=2321i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=363i,twothousand=363i,fivethous=4363i,tenthous=4363i,odd=126i,even=127i,stringu1="VLAAAA",stringu2="HLDAAA",string4="HHHHxx" 200620800000000000 +tenk unique1=7657i,unique2=2322i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=657i,twothousand=1657i,fivethous=2657i,tenthous=7657i,odd=114i,even=115i,stringu1="NIAAAA",stringu2="ILDAAA",string4="OOOOxx" 200707200000000000 +tenk unique1=697i,unique2=2323i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=697i,twothousand=697i,fivethous=697i,tenthous=697i,odd=194i,even=195i,stringu1="VAAAAA",stringu2="JLDAAA",string4="VVVVxx" 200793600000000000 +tenk unique1=912i,unique2=2324i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=912i,twothousand=912i,fivethous=912i,tenthous=912i,odd=24i,even=25i,stringu1="CJAAAA",stringu2="KLDAAA",string4="AAAAxx" 200880000000000000 +tenk unique1=8806i,unique2=2325i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=806i,twothousand=806i,fivethous=3806i,tenthous=8806i,odd=12i,even=13i,stringu1="SAAAAA",stringu2="LLDAAA",string4="HHHHxx" 200966400000000000 +tenk unique1=9698i,unique2=2326i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=698i,twothousand=1698i,fivethous=4698i,tenthous=9698i,odd=196i,even=197i,stringu1="AJAAAA",stringu2="MLDAAA",string4="OOOOxx" 201052800000000000 +tenk unique1=6191i,unique2=2327i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=191i,twothousand=191i,fivethous=1191i,tenthous=6191i,odd=182i,even=183i,stringu1="DEAAAA",stringu2="NLDAAA",string4="VVVVxx" 201139200000000000 +tenk unique1=1188i,unique2=2328i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=188i,twothousand=1188i,fivethous=1188i,tenthous=1188i,odd=176i,even=177i,stringu1="STAAAA",stringu2="OLDAAA",string4="AAAAxx" 201225600000000000 +tenk unique1=7676i,unique2=2329i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=676i,twothousand=1676i,fivethous=2676i,tenthous=7676i,odd=152i,even=153i,stringu1="GJAAAA",stringu2="PLDAAA",string4="HHHHxx" 201312000000000000 +tenk unique1=7073i,unique2=2330i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=73i,twothousand=1073i,fivethous=2073i,tenthous=7073i,odd=146i,even=147i,stringu1="BMAAAA",stringu2="QLDAAA",string4="OOOOxx" 201398400000000000 +tenk unique1=8019i,unique2=2331i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=19i,twothousand=19i,fivethous=3019i,tenthous=8019i,odd=38i,even=39i,stringu1="LWAAAA",stringu2="RLDAAA",string4="VVVVxx" 201484800000000000 +tenk unique1=4726i,unique2=2332i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=726i,twothousand=726i,fivethous=4726i,tenthous=4726i,odd=52i,even=53i,stringu1="UZAAAA",stringu2="SLDAAA",string4="AAAAxx" 201571200000000000 +tenk unique1=4648i,unique2=2333i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=648i,twothousand=648i,fivethous=4648i,tenthous=4648i,odd=96i,even=97i,stringu1="UWAAAA",stringu2="TLDAAA",string4="HHHHxx" 201657600000000000 +tenk unique1=3227i,unique2=2334i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=227i,twothousand=1227i,fivethous=3227i,tenthous=3227i,odd=54i,even=55i,stringu1="DUAAAA",stringu2="ULDAAA",string4="OOOOxx" 201744000000000000 +tenk unique1=7232i,unique2=2335i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=232i,twothousand=1232i,fivethous=2232i,tenthous=7232i,odd=64i,even=65i,stringu1="ESAAAA",stringu2="VLDAAA",string4="VVVVxx" 201830400000000000 +tenk unique1=9761i,unique2=2336i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=761i,twothousand=1761i,fivethous=4761i,tenthous=9761i,odd=122i,even=123i,stringu1="LLAAAA",stringu2="WLDAAA",string4="AAAAxx" 201916800000000000 +tenk unique1=3105i,unique2=2337i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=105i,twothousand=1105i,fivethous=3105i,tenthous=3105i,odd=10i,even=11i,stringu1="LPAAAA",stringu2="XLDAAA",string4="HHHHxx" 202003200000000000 +tenk unique1=5266i,unique2=2338i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=266i,twothousand=1266i,fivethous=266i,tenthous=5266i,odd=132i,even=133i,stringu1="OUAAAA",stringu2="YLDAAA",string4="OOOOxx" 202089600000000000 +tenk unique1=6788i,unique2=2339i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=788i,twothousand=788i,fivethous=1788i,tenthous=6788i,odd=176i,even=177i,stringu1="CBAAAA",stringu2="ZLDAAA",string4="VVVVxx" 202176000000000000 +tenk unique1=2442i,unique2=2340i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=442i,twothousand=442i,fivethous=2442i,tenthous=2442i,odd=84i,even=85i,stringu1="YPAAAA",stringu2="AMDAAA",string4="AAAAxx" 202262400000000000 +tenk unique1=8198i,unique2=2341i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=198i,twothousand=198i,fivethous=3198i,tenthous=8198i,odd=196i,even=197i,stringu1="IDAAAA",stringu2="BMDAAA",string4="HHHHxx" 202348800000000000 +tenk unique1=5806i,unique2=2342i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=806i,twothousand=1806i,fivethous=806i,tenthous=5806i,odd=12i,even=13i,stringu1="IPAAAA",stringu2="CMDAAA",string4="OOOOxx" 202435200000000000 +tenk unique1=8928i,unique2=2343i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=928i,twothousand=928i,fivethous=3928i,tenthous=8928i,odd=56i,even=57i,stringu1="KFAAAA",stringu2="DMDAAA",string4="VVVVxx" 202521600000000000 +tenk unique1=1657i,unique2=2344i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=657i,twothousand=1657i,fivethous=1657i,tenthous=1657i,odd=114i,even=115i,stringu1="TLAAAA",stringu2="EMDAAA",string4="AAAAxx" 202608000000000000 +tenk unique1=9164i,unique2=2345i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=164i,twothousand=1164i,fivethous=4164i,tenthous=9164i,odd=128i,even=129i,stringu1="MOAAAA",stringu2="FMDAAA",string4="HHHHxx" 202694400000000000 +tenk unique1=1851i,unique2=2346i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=851i,twothousand=1851i,fivethous=1851i,tenthous=1851i,odd=102i,even=103i,stringu1="FTAAAA",stringu2="GMDAAA",string4="OOOOxx" 202780800000000000 +tenk unique1=4744i,unique2=2347i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=744i,twothousand=744i,fivethous=4744i,tenthous=4744i,odd=88i,even=89i,stringu1="MAAAAA",stringu2="HMDAAA",string4="VVVVxx" 202867200000000000 +tenk unique1=8055i,unique2=2348i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=55i,twothousand=55i,fivethous=3055i,tenthous=8055i,odd=110i,even=111i,stringu1="VXAAAA",stringu2="IMDAAA",string4="AAAAxx" 202953600000000000 +tenk unique1=1533i,unique2=2349i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=533i,twothousand=1533i,fivethous=1533i,tenthous=1533i,odd=66i,even=67i,stringu1="ZGAAAA",stringu2="JMDAAA",string4="HHHHxx" 203040000000000000 +tenk unique1=1260i,unique2=2350i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=260i,twothousand=1260i,fivethous=1260i,tenthous=1260i,odd=120i,even=121i,stringu1="MWAAAA",stringu2="KMDAAA",string4="OOOOxx" 203126400000000000 +tenk unique1=1290i,unique2=2351i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=290i,twothousand=1290i,fivethous=1290i,tenthous=1290i,odd=180i,even=181i,stringu1="QXAAAA",stringu2="LMDAAA",string4="VVVVxx" 203212800000000000 +tenk unique1=297i,unique2=2352i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=297i,twothousand=297i,fivethous=297i,tenthous=297i,odd=194i,even=195i,stringu1="LLAAAA",stringu2="MMDAAA",string4="AAAAxx" 203299200000000000 +tenk unique1=4145i,unique2=2353i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=145i,twothousand=145i,fivethous=4145i,tenthous=4145i,odd=90i,even=91i,stringu1="LDAAAA",stringu2="NMDAAA",string4="HHHHxx" 203385600000000000 +tenk unique1=863i,unique2=2354i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=863i,twothousand=863i,fivethous=863i,tenthous=863i,odd=126i,even=127i,stringu1="FHAAAA",stringu2="OMDAAA",string4="OOOOxx" 203472000000000000 +tenk unique1=3423i,unique2=2355i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=423i,twothousand=1423i,fivethous=3423i,tenthous=3423i,odd=46i,even=47i,stringu1="RBAAAA",stringu2="PMDAAA",string4="VVVVxx" 203558400000000000 +tenk unique1=8750i,unique2=2356i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=750i,twothousand=750i,fivethous=3750i,tenthous=8750i,odd=100i,even=101i,stringu1="OYAAAA",stringu2="QMDAAA",string4="AAAAxx" 203644800000000000 +tenk unique1=3546i,unique2=2357i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=546i,twothousand=1546i,fivethous=3546i,tenthous=3546i,odd=92i,even=93i,stringu1="KGAAAA",stringu2="RMDAAA",string4="HHHHxx" 203731200000000000 +tenk unique1=3678i,unique2=2358i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=678i,twothousand=1678i,fivethous=3678i,tenthous=3678i,odd=156i,even=157i,stringu1="MLAAAA",stringu2="SMDAAA",string4="OOOOxx" 203817600000000000 +tenk unique1=5313i,unique2=2359i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=313i,twothousand=1313i,fivethous=313i,tenthous=5313i,odd=26i,even=27i,stringu1="JWAAAA",stringu2="TMDAAA",string4="VVVVxx" 203904000000000000 +tenk unique1=6233i,unique2=2360i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=233i,twothousand=233i,fivethous=1233i,tenthous=6233i,odd=66i,even=67i,stringu1="TFAAAA",stringu2="UMDAAA",string4="AAAAxx" 203990400000000000 +tenk unique1=5802i,unique2=2361i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=802i,twothousand=1802i,fivethous=802i,tenthous=5802i,odd=4i,even=5i,stringu1="EPAAAA",stringu2="VMDAAA",string4="HHHHxx" 204076800000000000 +tenk unique1=7059i,unique2=2362i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=59i,twothousand=1059i,fivethous=2059i,tenthous=7059i,odd=118i,even=119i,stringu1="NLAAAA",stringu2="WMDAAA",string4="OOOOxx" 204163200000000000 +tenk unique1=6481i,unique2=2363i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=481i,twothousand=481i,fivethous=1481i,tenthous=6481i,odd=162i,even=163i,stringu1="HPAAAA",stringu2="XMDAAA",string4="VVVVxx" 204249600000000000 +tenk unique1=1596i,unique2=2364i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=596i,twothousand=1596i,fivethous=1596i,tenthous=1596i,odd=192i,even=193i,stringu1="KJAAAA",stringu2="YMDAAA",string4="AAAAxx" 204336000000000000 +tenk unique1=8181i,unique2=2365i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=181i,twothousand=181i,fivethous=3181i,tenthous=8181i,odd=162i,even=163i,stringu1="RCAAAA",stringu2="ZMDAAA",string4="HHHHxx" 204422400000000000 +tenk unique1=5368i,unique2=2366i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=368i,twothousand=1368i,fivethous=368i,tenthous=5368i,odd=136i,even=137i,stringu1="MYAAAA",stringu2="ANDAAA",string4="OOOOxx" 204508800000000000 +tenk unique1=9416i,unique2=2367i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=416i,twothousand=1416i,fivethous=4416i,tenthous=9416i,odd=32i,even=33i,stringu1="EYAAAA",stringu2="BNDAAA",string4="VVVVxx" 204595200000000000 +tenk unique1=9521i,unique2=2368i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=521i,twothousand=1521i,fivethous=4521i,tenthous=9521i,odd=42i,even=43i,stringu1="FCAAAA",stringu2="CNDAAA",string4="AAAAxx" 204681600000000000 +tenk unique1=1042i,unique2=2369i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=42i,twothousand=1042i,fivethous=1042i,tenthous=1042i,odd=84i,even=85i,stringu1="COAAAA",stringu2="DNDAAA",string4="HHHHxx" 204768000000000000 +tenk unique1=4503i,unique2=2370i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=503i,twothousand=503i,fivethous=4503i,tenthous=4503i,odd=6i,even=7i,stringu1="FRAAAA",stringu2="ENDAAA",string4="OOOOxx" 204854400000000000 +tenk unique1=3023i,unique2=2371i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=23i,twothousand=1023i,fivethous=3023i,tenthous=3023i,odd=46i,even=47i,stringu1="HMAAAA",stringu2="FNDAAA",string4="VVVVxx" 204940800000000000 +tenk unique1=1976i,unique2=2372i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=976i,twothousand=1976i,fivethous=1976i,tenthous=1976i,odd=152i,even=153i,stringu1="AYAAAA",stringu2="GNDAAA",string4="AAAAxx" 205027200000000000 +tenk unique1=5610i,unique2=2373i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=610i,twothousand=1610i,fivethous=610i,tenthous=5610i,odd=20i,even=21i,stringu1="UHAAAA",stringu2="HNDAAA",string4="HHHHxx" 205113600000000000 +tenk unique1=7410i,unique2=2374i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=410i,twothousand=1410i,fivethous=2410i,tenthous=7410i,odd=20i,even=21i,stringu1="AZAAAA",stringu2="INDAAA",string4="OOOOxx" 205200000000000000 +tenk unique1=7872i,unique2=2375i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=872i,twothousand=1872i,fivethous=2872i,tenthous=7872i,odd=144i,even=145i,stringu1="UQAAAA",stringu2="JNDAAA",string4="VVVVxx" 205286400000000000 +tenk unique1=8591i,unique2=2376i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=591i,twothousand=591i,fivethous=3591i,tenthous=8591i,odd=182i,even=183i,stringu1="LSAAAA",stringu2="KNDAAA",string4="AAAAxx" 205372800000000000 +tenk unique1=1804i,unique2=2377i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=804i,twothousand=1804i,fivethous=1804i,tenthous=1804i,odd=8i,even=9i,stringu1="KRAAAA",stringu2="LNDAAA",string4="HHHHxx" 205459200000000000 +tenk unique1=5299i,unique2=2378i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=299i,twothousand=1299i,fivethous=299i,tenthous=5299i,odd=198i,even=199i,stringu1="VVAAAA",stringu2="MNDAAA",string4="OOOOxx" 205545600000000000 +tenk unique1=4695i,unique2=2379i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=695i,twothousand=695i,fivethous=4695i,tenthous=4695i,odd=190i,even=191i,stringu1="PYAAAA",stringu2="NNDAAA",string4="VVVVxx" 205632000000000000 +tenk unique1=2672i,unique2=2380i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=672i,twothousand=672i,fivethous=2672i,tenthous=2672i,odd=144i,even=145i,stringu1="UYAAAA",stringu2="ONDAAA",string4="AAAAxx" 205718400000000000 +tenk unique1=585i,unique2=2381i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=585i,twothousand=585i,fivethous=585i,tenthous=585i,odd=170i,even=171i,stringu1="NWAAAA",stringu2="PNDAAA",string4="HHHHxx" 205804800000000000 +tenk unique1=8622i,unique2=2382i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=622i,twothousand=622i,fivethous=3622i,tenthous=8622i,odd=44i,even=45i,stringu1="QTAAAA",stringu2="QNDAAA",string4="OOOOxx" 205891200000000000 +tenk unique1=3780i,unique2=2383i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=780i,twothousand=1780i,fivethous=3780i,tenthous=3780i,odd=160i,even=161i,stringu1="KPAAAA",stringu2="RNDAAA",string4="VVVVxx" 205977600000000000 +tenk unique1=7941i,unique2=2384i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=941i,twothousand=1941i,fivethous=2941i,tenthous=7941i,odd=82i,even=83i,stringu1="LTAAAA",stringu2="SNDAAA",string4="AAAAxx" 206064000000000000 +tenk unique1=3305i,unique2=2385i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=305i,twothousand=1305i,fivethous=3305i,tenthous=3305i,odd=10i,even=11i,stringu1="DXAAAA",stringu2="TNDAAA",string4="HHHHxx" 206150400000000000 +tenk unique1=8653i,unique2=2386i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=653i,twothousand=653i,fivethous=3653i,tenthous=8653i,odd=106i,even=107i,stringu1="VUAAAA",stringu2="UNDAAA",string4="OOOOxx" 206236800000000000 +tenk unique1=5756i,unique2=2387i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=756i,twothousand=1756i,fivethous=756i,tenthous=5756i,odd=112i,even=113i,stringu1="KNAAAA",stringu2="VNDAAA",string4="VVVVxx" 206323200000000000 +tenk unique1=576i,unique2=2388i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=576i,twothousand=576i,fivethous=576i,tenthous=576i,odd=152i,even=153i,stringu1="EWAAAA",stringu2="WNDAAA",string4="AAAAxx" 206409600000000000 +tenk unique1=1915i,unique2=2389i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=915i,twothousand=1915i,fivethous=1915i,tenthous=1915i,odd=30i,even=31i,stringu1="RVAAAA",stringu2="XNDAAA",string4="HHHHxx" 206496000000000000 +tenk unique1=4627i,unique2=2390i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=627i,twothousand=627i,fivethous=4627i,tenthous=4627i,odd=54i,even=55i,stringu1="ZVAAAA",stringu2="YNDAAA",string4="OOOOxx" 206582400000000000 +tenk unique1=920i,unique2=2391i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=920i,twothousand=920i,fivethous=920i,tenthous=920i,odd=40i,even=41i,stringu1="KJAAAA",stringu2="ZNDAAA",string4="VVVVxx" 206668800000000000 +tenk unique1=2537i,unique2=2392i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=537i,twothousand=537i,fivethous=2537i,tenthous=2537i,odd=74i,even=75i,stringu1="PTAAAA",stringu2="AODAAA",string4="AAAAxx" 206755200000000000 +tenk unique1=50i,unique2=2393i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=50i,twothousand=50i,fivethous=50i,tenthous=50i,odd=100i,even=101i,stringu1="YBAAAA",stringu2="BODAAA",string4="HHHHxx" 206841600000000000 +tenk unique1=1313i,unique2=2394i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=313i,twothousand=1313i,fivethous=1313i,tenthous=1313i,odd=26i,even=27i,stringu1="NYAAAA",stringu2="CODAAA",string4="OOOOxx" 206928000000000000 +tenk unique1=8542i,unique2=2395i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=542i,twothousand=542i,fivethous=3542i,tenthous=8542i,odd=84i,even=85i,stringu1="OQAAAA",stringu2="DODAAA",string4="VVVVxx" 207014400000000000 +tenk unique1=6428i,unique2=2396i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=428i,twothousand=428i,fivethous=1428i,tenthous=6428i,odd=56i,even=57i,stringu1="GNAAAA",stringu2="EODAAA",string4="AAAAxx" 207100800000000000 +tenk unique1=4351i,unique2=2397i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=351i,twothousand=351i,fivethous=4351i,tenthous=4351i,odd=102i,even=103i,stringu1="JLAAAA",stringu2="FODAAA",string4="HHHHxx" 207187200000000000 +tenk unique1=2050i,unique2=2398i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=50i,twothousand=50i,fivethous=2050i,tenthous=2050i,odd=100i,even=101i,stringu1="WAAAAA",stringu2="GODAAA",string4="OOOOxx" 207273600000000000 +tenk unique1=5162i,unique2=2399i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=162i,twothousand=1162i,fivethous=162i,tenthous=5162i,odd=124i,even=125i,stringu1="OQAAAA",stringu2="HODAAA",string4="VVVVxx" 207360000000000000 +tenk unique1=8229i,unique2=2400i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=229i,twothousand=229i,fivethous=3229i,tenthous=8229i,odd=58i,even=59i,stringu1="NEAAAA",stringu2="IODAAA",string4="AAAAxx" 207446400000000000 +tenk unique1=7782i,unique2=2401i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=782i,twothousand=1782i,fivethous=2782i,tenthous=7782i,odd=164i,even=165i,stringu1="INAAAA",stringu2="JODAAA",string4="HHHHxx" 207532800000000000 +tenk unique1=1563i,unique2=2402i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=563i,twothousand=1563i,fivethous=1563i,tenthous=1563i,odd=126i,even=127i,stringu1="DIAAAA",stringu2="KODAAA",string4="OOOOxx" 207619200000000000 +tenk unique1=267i,unique2=2403i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=267i,twothousand=267i,fivethous=267i,tenthous=267i,odd=134i,even=135i,stringu1="HKAAAA",stringu2="LODAAA",string4="VVVVxx" 207705600000000000 +tenk unique1=5138i,unique2=2404i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=138i,twothousand=1138i,fivethous=138i,tenthous=5138i,odd=76i,even=77i,stringu1="QPAAAA",stringu2="MODAAA",string4="AAAAxx" 207792000000000000 +tenk unique1=7022i,unique2=2405i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=22i,twothousand=1022i,fivethous=2022i,tenthous=7022i,odd=44i,even=45i,stringu1="CKAAAA",stringu2="NODAAA",string4="HHHHxx" 207878400000000000 +tenk unique1=6705i,unique2=2406i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=705i,twothousand=705i,fivethous=1705i,tenthous=6705i,odd=10i,even=11i,stringu1="XXAAAA",stringu2="OODAAA",string4="OOOOxx" 207964800000000000 +tenk unique1=6190i,unique2=2407i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=190i,twothousand=190i,fivethous=1190i,tenthous=6190i,odd=180i,even=181i,stringu1="CEAAAA",stringu2="PODAAA",string4="VVVVxx" 208051200000000000 +tenk unique1=8226i,unique2=2408i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=226i,twothousand=226i,fivethous=3226i,tenthous=8226i,odd=52i,even=53i,stringu1="KEAAAA",stringu2="QODAAA",string4="AAAAxx" 208137600000000000 +tenk unique1=8882i,unique2=2409i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=882i,twothousand=882i,fivethous=3882i,tenthous=8882i,odd=164i,even=165i,stringu1="QDAAAA",stringu2="RODAAA",string4="HHHHxx" 208224000000000000 +tenk unique1=5181i,unique2=2410i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=181i,twothousand=1181i,fivethous=181i,tenthous=5181i,odd=162i,even=163i,stringu1="HRAAAA",stringu2="SODAAA",string4="OOOOxx" 208310400000000000 +tenk unique1=4598i,unique2=2411i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=598i,twothousand=598i,fivethous=4598i,tenthous=4598i,odd=196i,even=197i,stringu1="WUAAAA",stringu2="TODAAA",string4="VVVVxx" 208396800000000000 +tenk unique1=4882i,unique2=2412i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=882i,twothousand=882i,fivethous=4882i,tenthous=4882i,odd=164i,even=165i,stringu1="UFAAAA",stringu2="UODAAA",string4="AAAAxx" 208483200000000000 +tenk unique1=7490i,unique2=2413i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=490i,twothousand=1490i,fivethous=2490i,tenthous=7490i,odd=180i,even=181i,stringu1="CCAAAA",stringu2="VODAAA",string4="HHHHxx" 208569600000000000 +tenk unique1=5224i,unique2=2414i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=224i,twothousand=1224i,fivethous=224i,tenthous=5224i,odd=48i,even=49i,stringu1="YSAAAA",stringu2="WODAAA",string4="OOOOxx" 208656000000000000 +tenk unique1=2174i,unique2=2415i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=174i,twothousand=174i,fivethous=2174i,tenthous=2174i,odd=148i,even=149i,stringu1="QFAAAA",stringu2="XODAAA",string4="VVVVxx" 208742400000000000 +tenk unique1=3059i,unique2=2416i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=59i,twothousand=1059i,fivethous=3059i,tenthous=3059i,odd=118i,even=119i,stringu1="RNAAAA",stringu2="YODAAA",string4="AAAAxx" 208828800000000000 +tenk unique1=8790i,unique2=2417i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=790i,twothousand=790i,fivethous=3790i,tenthous=8790i,odd=180i,even=181i,stringu1="CAAAAA",stringu2="ZODAAA",string4="HHHHxx" 208915200000000000 +tenk unique1=2222i,unique2=2418i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=222i,twothousand=222i,fivethous=2222i,tenthous=2222i,odd=44i,even=45i,stringu1="MHAAAA",stringu2="APDAAA",string4="OOOOxx" 209001600000000000 +tenk unique1=5473i,unique2=2419i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=473i,twothousand=1473i,fivethous=473i,tenthous=5473i,odd=146i,even=147i,stringu1="NCAAAA",stringu2="BPDAAA",string4="VVVVxx" 209088000000000000 +tenk unique1=937i,unique2=2420i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=937i,twothousand=937i,fivethous=937i,tenthous=937i,odd=74i,even=75i,stringu1="BKAAAA",stringu2="CPDAAA",string4="AAAAxx" 209174400000000000 +tenk unique1=2975i,unique2=2421i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=975i,twothousand=975i,fivethous=2975i,tenthous=2975i,odd=150i,even=151i,stringu1="LKAAAA",stringu2="DPDAAA",string4="HHHHxx" 209260800000000000 +tenk unique1=9569i,unique2=2422i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=569i,twothousand=1569i,fivethous=4569i,tenthous=9569i,odd=138i,even=139i,stringu1="BEAAAA",stringu2="EPDAAA",string4="OOOOxx" 209347200000000000 +tenk unique1=3456i,unique2=2423i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=456i,twothousand=1456i,fivethous=3456i,tenthous=3456i,odd=112i,even=113i,stringu1="YCAAAA",stringu2="FPDAAA",string4="VVVVxx" 209433600000000000 +tenk unique1=6657i,unique2=2424i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=657i,twothousand=657i,fivethous=1657i,tenthous=6657i,odd=114i,even=115i,stringu1="BWAAAA",stringu2="GPDAAA",string4="AAAAxx" 209520000000000000 +tenk unique1=3776i,unique2=2425i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=776i,twothousand=1776i,fivethous=3776i,tenthous=3776i,odd=152i,even=153i,stringu1="GPAAAA",stringu2="HPDAAA",string4="HHHHxx" 209606400000000000 +tenk unique1=6072i,unique2=2426i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=72i,twothousand=72i,fivethous=1072i,tenthous=6072i,odd=144i,even=145i,stringu1="OZAAAA",stringu2="IPDAAA",string4="OOOOxx" 209692800000000000 +tenk unique1=8129i,unique2=2427i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=129i,twothousand=129i,fivethous=3129i,tenthous=8129i,odd=58i,even=59i,stringu1="RAAAAA",stringu2="JPDAAA",string4="VVVVxx" 209779200000000000 +tenk unique1=1085i,unique2=2428i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=85i,twothousand=1085i,fivethous=1085i,tenthous=1085i,odd=170i,even=171i,stringu1="TPAAAA",stringu2="KPDAAA",string4="AAAAxx" 209865600000000000 +tenk unique1=2079i,unique2=2429i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=79i,twothousand=79i,fivethous=2079i,tenthous=2079i,odd=158i,even=159i,stringu1="ZBAAAA",stringu2="LPDAAA",string4="HHHHxx" 209952000000000000 +tenk unique1=1200i,unique2=2430i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=200i,twothousand=1200i,fivethous=1200i,tenthous=1200i,odd=0i,even=1i,stringu1="EUAAAA",stringu2="MPDAAA",string4="OOOOxx" 210038400000000000 +tenk unique1=3276i,unique2=2431i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=276i,twothousand=1276i,fivethous=3276i,tenthous=3276i,odd=152i,even=153i,stringu1="AWAAAA",stringu2="NPDAAA",string4="VVVVxx" 210124800000000000 +tenk unique1=2608i,unique2=2432i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=608i,twothousand=608i,fivethous=2608i,tenthous=2608i,odd=16i,even=17i,stringu1="IWAAAA",stringu2="OPDAAA",string4="AAAAxx" 210211200000000000 +tenk unique1=702i,unique2=2433i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=702i,twothousand=702i,fivethous=702i,tenthous=702i,odd=4i,even=5i,stringu1="ABAAAA",stringu2="PPDAAA",string4="HHHHxx" 210297600000000000 +tenk unique1=5750i,unique2=2434i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=750i,twothousand=1750i,fivethous=750i,tenthous=5750i,odd=100i,even=101i,stringu1="ENAAAA",stringu2="QPDAAA",string4="OOOOxx" 210384000000000000 +tenk unique1=2776i,unique2=2435i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=776i,twothousand=776i,fivethous=2776i,tenthous=2776i,odd=152i,even=153i,stringu1="UCAAAA",stringu2="RPDAAA",string4="VVVVxx" 210470400000000000 +tenk unique1=9151i,unique2=2436i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=151i,twothousand=1151i,fivethous=4151i,tenthous=9151i,odd=102i,even=103i,stringu1="ZNAAAA",stringu2="SPDAAA",string4="AAAAxx" 210556800000000000 +tenk unique1=3282i,unique2=2437i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=282i,twothousand=1282i,fivethous=3282i,tenthous=3282i,odd=164i,even=165i,stringu1="GWAAAA",stringu2="TPDAAA",string4="HHHHxx" 210643200000000000 +tenk unique1=408i,unique2=2438i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=408i,twothousand=408i,fivethous=408i,tenthous=408i,odd=16i,even=17i,stringu1="SPAAAA",stringu2="UPDAAA",string4="OOOOxx" 210729600000000000 +tenk unique1=3473i,unique2=2439i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=473i,twothousand=1473i,fivethous=3473i,tenthous=3473i,odd=146i,even=147i,stringu1="PDAAAA",stringu2="VPDAAA",string4="VVVVxx" 210816000000000000 +tenk unique1=7095i,unique2=2440i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=95i,twothousand=1095i,fivethous=2095i,tenthous=7095i,odd=190i,even=191i,stringu1="XMAAAA",stringu2="WPDAAA",string4="AAAAxx" 210902400000000000 +tenk unique1=3288i,unique2=2441i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=288i,twothousand=1288i,fivethous=3288i,tenthous=3288i,odd=176i,even=177i,stringu1="MWAAAA",stringu2="XPDAAA",string4="HHHHxx" 210988800000000000 +tenk unique1=8215i,unique2=2442i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=215i,twothousand=215i,fivethous=3215i,tenthous=8215i,odd=30i,even=31i,stringu1="ZDAAAA",stringu2="YPDAAA",string4="OOOOxx" 211075200000000000 +tenk unique1=6244i,unique2=2443i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=244i,twothousand=244i,fivethous=1244i,tenthous=6244i,odd=88i,even=89i,stringu1="EGAAAA",stringu2="ZPDAAA",string4="VVVVxx" 211161600000000000 +tenk unique1=8440i,unique2=2444i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=440i,twothousand=440i,fivethous=3440i,tenthous=8440i,odd=80i,even=81i,stringu1="QMAAAA",stringu2="AQDAAA",string4="AAAAxx" 211248000000000000 +tenk unique1=3800i,unique2=2445i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=800i,twothousand=1800i,fivethous=3800i,tenthous=3800i,odd=0i,even=1i,stringu1="EQAAAA",stringu2="BQDAAA",string4="HHHHxx" 211334400000000000 +tenk unique1=7279i,unique2=2446i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=279i,twothousand=1279i,fivethous=2279i,tenthous=7279i,odd=158i,even=159i,stringu1="ZTAAAA",stringu2="CQDAAA",string4="OOOOxx" 211420800000000000 +tenk unique1=9206i,unique2=2447i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=206i,twothousand=1206i,fivethous=4206i,tenthous=9206i,odd=12i,even=13i,stringu1="CQAAAA",stringu2="DQDAAA",string4="VVVVxx" 211507200000000000 +tenk unique1=6465i,unique2=2448i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=465i,twothousand=465i,fivethous=1465i,tenthous=6465i,odd=130i,even=131i,stringu1="ROAAAA",stringu2="EQDAAA",string4="AAAAxx" 211593600000000000 +tenk unique1=4127i,unique2=2449i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=127i,twothousand=127i,fivethous=4127i,tenthous=4127i,odd=54i,even=55i,stringu1="TCAAAA",stringu2="FQDAAA",string4="HHHHxx" 211680000000000000 +tenk unique1=7463i,unique2=2450i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=463i,twothousand=1463i,fivethous=2463i,tenthous=7463i,odd=126i,even=127i,stringu1="BBAAAA",stringu2="GQDAAA",string4="OOOOxx" 211766400000000000 +tenk unique1=5117i,unique2=2451i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=117i,twothousand=1117i,fivethous=117i,tenthous=5117i,odd=34i,even=35i,stringu1="VOAAAA",stringu2="HQDAAA",string4="VVVVxx" 211852800000000000 +tenk unique1=4715i,unique2=2452i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=715i,twothousand=715i,fivethous=4715i,tenthous=4715i,odd=30i,even=31i,stringu1="JZAAAA",stringu2="IQDAAA",string4="AAAAxx" 211939200000000000 +tenk unique1=2010i,unique2=2453i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=10i,twothousand=10i,fivethous=2010i,tenthous=2010i,odd=20i,even=21i,stringu1="IZAAAA",stringu2="JQDAAA",string4="HHHHxx" 212025600000000000 +tenk unique1=6486i,unique2=2454i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=486i,twothousand=486i,fivethous=1486i,tenthous=6486i,odd=172i,even=173i,stringu1="MPAAAA",stringu2="KQDAAA",string4="OOOOxx" 212112000000000000 +tenk unique1=6434i,unique2=2455i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=434i,twothousand=434i,fivethous=1434i,tenthous=6434i,odd=68i,even=69i,stringu1="MNAAAA",stringu2="LQDAAA",string4="VVVVxx" 212198400000000000 +tenk unique1=2151i,unique2=2456i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=151i,twothousand=151i,fivethous=2151i,tenthous=2151i,odd=102i,even=103i,stringu1="TEAAAA",stringu2="MQDAAA",string4="AAAAxx" 212284800000000000 +tenk unique1=4821i,unique2=2457i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=821i,twothousand=821i,fivethous=4821i,tenthous=4821i,odd=42i,even=43i,stringu1="LDAAAA",stringu2="NQDAAA",string4="HHHHxx" 212371200000000000 +tenk unique1=6507i,unique2=2458i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=507i,twothousand=507i,fivethous=1507i,tenthous=6507i,odd=14i,even=15i,stringu1="HQAAAA",stringu2="OQDAAA",string4="OOOOxx" 212457600000000000 +tenk unique1=8741i,unique2=2459i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=741i,twothousand=741i,fivethous=3741i,tenthous=8741i,odd=82i,even=83i,stringu1="FYAAAA",stringu2="PQDAAA",string4="VVVVxx" 212544000000000000 +tenk unique1=6846i,unique2=2460i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=846i,twothousand=846i,fivethous=1846i,tenthous=6846i,odd=92i,even=93i,stringu1="IDAAAA",stringu2="QQDAAA",string4="AAAAxx" 212630400000000000 +tenk unique1=4525i,unique2=2461i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=525i,twothousand=525i,fivethous=4525i,tenthous=4525i,odd=50i,even=51i,stringu1="BSAAAA",stringu2="RQDAAA",string4="HHHHxx" 212716800000000000 +tenk unique1=8299i,unique2=2462i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=299i,twothousand=299i,fivethous=3299i,tenthous=8299i,odd=198i,even=199i,stringu1="FHAAAA",stringu2="SQDAAA",string4="OOOOxx" 212803200000000000 +tenk unique1=5465i,unique2=2463i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=465i,twothousand=1465i,fivethous=465i,tenthous=5465i,odd=130i,even=131i,stringu1="FCAAAA",stringu2="TQDAAA",string4="VVVVxx" 212889600000000000 +tenk unique1=7206i,unique2=2464i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=206i,twothousand=1206i,fivethous=2206i,tenthous=7206i,odd=12i,even=13i,stringu1="ERAAAA",stringu2="UQDAAA",string4="AAAAxx" 212976000000000000 +tenk unique1=2616i,unique2=2465i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=616i,twothousand=616i,fivethous=2616i,tenthous=2616i,odd=32i,even=33i,stringu1="QWAAAA",stringu2="VQDAAA",string4="HHHHxx" 213062400000000000 +tenk unique1=4440i,unique2=2466i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=440i,twothousand=440i,fivethous=4440i,tenthous=4440i,odd=80i,even=81i,stringu1="UOAAAA",stringu2="WQDAAA",string4="OOOOxx" 213148800000000000 +tenk unique1=6109i,unique2=2467i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=109i,twothousand=109i,fivethous=1109i,tenthous=6109i,odd=18i,even=19i,stringu1="ZAAAAA",stringu2="XQDAAA",string4="VVVVxx" 213235200000000000 +tenk unique1=7905i,unique2=2468i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=905i,twothousand=1905i,fivethous=2905i,tenthous=7905i,odd=10i,even=11i,stringu1="BSAAAA",stringu2="YQDAAA",string4="AAAAxx" 213321600000000000 +tenk unique1=6498i,unique2=2469i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=498i,twothousand=498i,fivethous=1498i,tenthous=6498i,odd=196i,even=197i,stringu1="YPAAAA",stringu2="ZQDAAA",string4="HHHHxx" 213408000000000000 +tenk unique1=2034i,unique2=2470i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=34i,twothousand=34i,fivethous=2034i,tenthous=2034i,odd=68i,even=69i,stringu1="GAAAAA",stringu2="ARDAAA",string4="OOOOxx" 213494400000000000 +tenk unique1=7693i,unique2=2471i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=693i,twothousand=1693i,fivethous=2693i,tenthous=7693i,odd=186i,even=187i,stringu1="XJAAAA",stringu2="BRDAAA",string4="VVVVxx" 213580800000000000 +tenk unique1=7511i,unique2=2472i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=511i,twothousand=1511i,fivethous=2511i,tenthous=7511i,odd=22i,even=23i,stringu1="XCAAAA",stringu2="CRDAAA",string4="AAAAxx" 213667200000000000 +tenk unique1=7531i,unique2=2473i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=531i,twothousand=1531i,fivethous=2531i,tenthous=7531i,odd=62i,even=63i,stringu1="RDAAAA",stringu2="DRDAAA",string4="HHHHxx" 213753600000000000 +tenk unique1=6869i,unique2=2474i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=869i,twothousand=869i,fivethous=1869i,tenthous=6869i,odd=138i,even=139i,stringu1="FEAAAA",stringu2="ERDAAA",string4="OOOOxx" 213840000000000000 +tenk unique1=2763i,unique2=2475i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=763i,twothousand=763i,fivethous=2763i,tenthous=2763i,odd=126i,even=127i,stringu1="HCAAAA",stringu2="FRDAAA",string4="VVVVxx" 213926400000000000 +tenk unique1=575i,unique2=2476i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=575i,twothousand=575i,fivethous=575i,tenthous=575i,odd=150i,even=151i,stringu1="DWAAAA",stringu2="GRDAAA",string4="AAAAxx" 214012800000000000 +tenk unique1=8953i,unique2=2477i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=953i,twothousand=953i,fivethous=3953i,tenthous=8953i,odd=106i,even=107i,stringu1="JGAAAA",stringu2="HRDAAA",string4="HHHHxx" 214099200000000000 +tenk unique1=5833i,unique2=2478i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=833i,twothousand=1833i,fivethous=833i,tenthous=5833i,odd=66i,even=67i,stringu1="JQAAAA",stringu2="IRDAAA",string4="OOOOxx" 214185600000000000 +tenk unique1=9035i,unique2=2479i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=35i,twothousand=1035i,fivethous=4035i,tenthous=9035i,odd=70i,even=71i,stringu1="NJAAAA",stringu2="JRDAAA",string4="VVVVxx" 214272000000000000 +tenk unique1=9123i,unique2=2480i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=123i,twothousand=1123i,fivethous=4123i,tenthous=9123i,odd=46i,even=47i,stringu1="XMAAAA",stringu2="KRDAAA",string4="AAAAxx" 214358400000000000 +tenk unique1=206i,unique2=2481i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=206i,twothousand=206i,fivethous=206i,tenthous=206i,odd=12i,even=13i,stringu1="YHAAAA",stringu2="LRDAAA",string4="HHHHxx" 214444800000000000 +tenk unique1=4155i,unique2=2482i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=155i,twothousand=155i,fivethous=4155i,tenthous=4155i,odd=110i,even=111i,stringu1="VDAAAA",stringu2="MRDAAA",string4="OOOOxx" 214531200000000000 +tenk unique1=532i,unique2=2483i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=532i,twothousand=532i,fivethous=532i,tenthous=532i,odd=64i,even=65i,stringu1="MUAAAA",stringu2="NRDAAA",string4="VVVVxx" 214617600000000000 +tenk unique1=1370i,unique2=2484i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=370i,twothousand=1370i,fivethous=1370i,tenthous=1370i,odd=140i,even=141i,stringu1="SAAAAA",stringu2="ORDAAA",string4="AAAAxx" 214704000000000000 +tenk unique1=7656i,unique2=2485i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=656i,twothousand=1656i,fivethous=2656i,tenthous=7656i,odd=112i,even=113i,stringu1="MIAAAA",stringu2="PRDAAA",string4="HHHHxx" 214790400000000000 +tenk unique1=7735i,unique2=2486i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=735i,twothousand=1735i,fivethous=2735i,tenthous=7735i,odd=70i,even=71i,stringu1="NLAAAA",stringu2="QRDAAA",string4="OOOOxx" 214876800000000000 +tenk unique1=2118i,unique2=2487i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=118i,twothousand=118i,fivethous=2118i,tenthous=2118i,odd=36i,even=37i,stringu1="MDAAAA",stringu2="RRDAAA",string4="VVVVxx" 214963200000000000 +tenk unique1=6914i,unique2=2488i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=914i,twothousand=914i,fivethous=1914i,tenthous=6914i,odd=28i,even=29i,stringu1="YFAAAA",stringu2="SRDAAA",string4="AAAAxx" 215049600000000000 +tenk unique1=6277i,unique2=2489i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=277i,twothousand=277i,fivethous=1277i,tenthous=6277i,odd=154i,even=155i,stringu1="LHAAAA",stringu2="TRDAAA",string4="HHHHxx" 215136000000000000 +tenk unique1=6347i,unique2=2490i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=347i,twothousand=347i,fivethous=1347i,tenthous=6347i,odd=94i,even=95i,stringu1="DKAAAA",stringu2="URDAAA",string4="OOOOxx" 215222400000000000 +tenk unique1=4030i,unique2=2491i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=30i,twothousand=30i,fivethous=4030i,tenthous=4030i,odd=60i,even=61i,stringu1="AZAAAA",stringu2="VRDAAA",string4="VVVVxx" 215308800000000000 +tenk unique1=9673i,unique2=2492i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=673i,twothousand=1673i,fivethous=4673i,tenthous=9673i,odd=146i,even=147i,stringu1="BIAAAA",stringu2="WRDAAA",string4="AAAAxx" 215395200000000000 +tenk unique1=2015i,unique2=2493i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=15i,twothousand=15i,fivethous=2015i,tenthous=2015i,odd=30i,even=31i,stringu1="NZAAAA",stringu2="XRDAAA",string4="HHHHxx" 215481600000000000 +tenk unique1=1317i,unique2=2494i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=317i,twothousand=1317i,fivethous=1317i,tenthous=1317i,odd=34i,even=35i,stringu1="RYAAAA",stringu2="YRDAAA",string4="OOOOxx" 215568000000000000 +tenk unique1=404i,unique2=2495i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=404i,twothousand=404i,fivethous=404i,tenthous=404i,odd=8i,even=9i,stringu1="OPAAAA",stringu2="ZRDAAA",string4="VVVVxx" 215654400000000000 +tenk unique1=1604i,unique2=2496i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=604i,twothousand=1604i,fivethous=1604i,tenthous=1604i,odd=8i,even=9i,stringu1="SJAAAA",stringu2="ASDAAA",string4="AAAAxx" 215740800000000000 +tenk unique1=1912i,unique2=2497i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=912i,twothousand=1912i,fivethous=1912i,tenthous=1912i,odd=24i,even=25i,stringu1="OVAAAA",stringu2="BSDAAA",string4="HHHHxx" 215827200000000000 +tenk unique1=5727i,unique2=2498i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=727i,twothousand=1727i,fivethous=727i,tenthous=5727i,odd=54i,even=55i,stringu1="HMAAAA",stringu2="CSDAAA",string4="OOOOxx" 215913600000000000 +tenk unique1=4538i,unique2=2499i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=538i,twothousand=538i,fivethous=4538i,tenthous=4538i,odd=76i,even=77i,stringu1="OSAAAA",stringu2="DSDAAA",string4="VVVVxx" 216000000000000000 +tenk unique1=6868i,unique2=2500i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=868i,twothousand=868i,fivethous=1868i,tenthous=6868i,odd=136i,even=137i,stringu1="EEAAAA",stringu2="ESDAAA",string4="AAAAxx" 216086400000000000 +tenk unique1=9801i,unique2=2501i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=801i,twothousand=1801i,fivethous=4801i,tenthous=9801i,odd=2i,even=3i,stringu1="ZMAAAA",stringu2="FSDAAA",string4="HHHHxx" 216172800000000000 +tenk unique1=1781i,unique2=2502i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=781i,twothousand=1781i,fivethous=1781i,tenthous=1781i,odd=162i,even=163i,stringu1="NQAAAA",stringu2="GSDAAA",string4="OOOOxx" 216259200000000000 +tenk unique1=7061i,unique2=2503i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=61i,twothousand=1061i,fivethous=2061i,tenthous=7061i,odd=122i,even=123i,stringu1="PLAAAA",stringu2="HSDAAA",string4="VVVVxx" 216345600000000000 +tenk unique1=2412i,unique2=2504i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=412i,twothousand=412i,fivethous=2412i,tenthous=2412i,odd=24i,even=25i,stringu1="UOAAAA",stringu2="ISDAAA",string4="AAAAxx" 216432000000000000 +tenk unique1=9191i,unique2=2505i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=191i,twothousand=1191i,fivethous=4191i,tenthous=9191i,odd=182i,even=183i,stringu1="NPAAAA",stringu2="JSDAAA",string4="HHHHxx" 216518400000000000 +tenk unique1=1958i,unique2=2506i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=958i,twothousand=1958i,fivethous=1958i,tenthous=1958i,odd=116i,even=117i,stringu1="IXAAAA",stringu2="KSDAAA",string4="OOOOxx" 216604800000000000 +tenk unique1=2203i,unique2=2507i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=203i,twothousand=203i,fivethous=2203i,tenthous=2203i,odd=6i,even=7i,stringu1="TGAAAA",stringu2="LSDAAA",string4="VVVVxx" 216691200000000000 +tenk unique1=9104i,unique2=2508i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=104i,twothousand=1104i,fivethous=4104i,tenthous=9104i,odd=8i,even=9i,stringu1="EMAAAA",stringu2="MSDAAA",string4="AAAAxx" 216777600000000000 +tenk unique1=3837i,unique2=2509i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=837i,twothousand=1837i,fivethous=3837i,tenthous=3837i,odd=74i,even=75i,stringu1="PRAAAA",stringu2="NSDAAA",string4="HHHHxx" 216864000000000000 +tenk unique1=7055i,unique2=2510i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=55i,twothousand=1055i,fivethous=2055i,tenthous=7055i,odd=110i,even=111i,stringu1="JLAAAA",stringu2="OSDAAA",string4="OOOOxx" 216950400000000000 +tenk unique1=4612i,unique2=2511i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=612i,twothousand=612i,fivethous=4612i,tenthous=4612i,odd=24i,even=25i,stringu1="KVAAAA",stringu2="PSDAAA",string4="VVVVxx" 217036800000000000 +tenk unique1=6420i,unique2=2512i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=420i,twothousand=420i,fivethous=1420i,tenthous=6420i,odd=40i,even=41i,stringu1="YMAAAA",stringu2="QSDAAA",string4="AAAAxx" 217123200000000000 +tenk unique1=613i,unique2=2513i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=613i,twothousand=613i,fivethous=613i,tenthous=613i,odd=26i,even=27i,stringu1="PXAAAA",stringu2="RSDAAA",string4="HHHHxx" 217209600000000000 +tenk unique1=1691i,unique2=2514i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=691i,twothousand=1691i,fivethous=1691i,tenthous=1691i,odd=182i,even=183i,stringu1="BNAAAA",stringu2="SSDAAA",string4="OOOOxx" 217296000000000000 +tenk unique1=33i,unique2=2515i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=33i,twothousand=33i,fivethous=33i,tenthous=33i,odd=66i,even=67i,stringu1="HBAAAA",stringu2="TSDAAA",string4="VVVVxx" 217382400000000000 +tenk unique1=875i,unique2=2516i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=875i,twothousand=875i,fivethous=875i,tenthous=875i,odd=150i,even=151i,stringu1="RHAAAA",stringu2="USDAAA",string4="AAAAxx" 217468800000000000 +tenk unique1=9030i,unique2=2517i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=30i,twothousand=1030i,fivethous=4030i,tenthous=9030i,odd=60i,even=61i,stringu1="IJAAAA",stringu2="VSDAAA",string4="HHHHxx" 217555200000000000 +tenk unique1=4285i,unique2=2518i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=285i,twothousand=285i,fivethous=4285i,tenthous=4285i,odd=170i,even=171i,stringu1="VIAAAA",stringu2="WSDAAA",string4="OOOOxx" 217641600000000000 +tenk unique1=6236i,unique2=2519i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=236i,twothousand=236i,fivethous=1236i,tenthous=6236i,odd=72i,even=73i,stringu1="WFAAAA",stringu2="XSDAAA",string4="VVVVxx" 217728000000000000 +tenk unique1=4702i,unique2=2520i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=702i,twothousand=702i,fivethous=4702i,tenthous=4702i,odd=4i,even=5i,stringu1="WYAAAA",stringu2="YSDAAA",string4="AAAAxx" 217814400000000000 +tenk unique1=3441i,unique2=2521i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=441i,twothousand=1441i,fivethous=3441i,tenthous=3441i,odd=82i,even=83i,stringu1="JCAAAA",stringu2="ZSDAAA",string4="HHHHxx" 217900800000000000 +tenk unique1=2150i,unique2=2522i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=150i,twothousand=150i,fivethous=2150i,tenthous=2150i,odd=100i,even=101i,stringu1="SEAAAA",stringu2="ATDAAA",string4="OOOOxx" 217987200000000000 +tenk unique1=1852i,unique2=2523i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=852i,twothousand=1852i,fivethous=1852i,tenthous=1852i,odd=104i,even=105i,stringu1="GTAAAA",stringu2="BTDAAA",string4="VVVVxx" 218073600000000000 +tenk unique1=7713i,unique2=2524i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=713i,twothousand=1713i,fivethous=2713i,tenthous=7713i,odd=26i,even=27i,stringu1="RKAAAA",stringu2="CTDAAA",string4="AAAAxx" 218160000000000000 +tenk unique1=6849i,unique2=2525i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=849i,twothousand=849i,fivethous=1849i,tenthous=6849i,odd=98i,even=99i,stringu1="LDAAAA",stringu2="DTDAAA",string4="HHHHxx" 218246400000000000 +tenk unique1=3425i,unique2=2526i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=425i,twothousand=1425i,fivethous=3425i,tenthous=3425i,odd=50i,even=51i,stringu1="TBAAAA",stringu2="ETDAAA",string4="OOOOxx" 218332800000000000 +tenk unique1=4681i,unique2=2527i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=681i,twothousand=681i,fivethous=4681i,tenthous=4681i,odd=162i,even=163i,stringu1="BYAAAA",stringu2="FTDAAA",string4="VVVVxx" 218419200000000000 +tenk unique1=1134i,unique2=2528i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=134i,twothousand=1134i,fivethous=1134i,tenthous=1134i,odd=68i,even=69i,stringu1="QRAAAA",stringu2="GTDAAA",string4="AAAAxx" 218505600000000000 +tenk unique1=7462i,unique2=2529i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=462i,twothousand=1462i,fivethous=2462i,tenthous=7462i,odd=124i,even=125i,stringu1="ABAAAA",stringu2="HTDAAA",string4="HHHHxx" 218592000000000000 +tenk unique1=2148i,unique2=2530i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=148i,twothousand=148i,fivethous=2148i,tenthous=2148i,odd=96i,even=97i,stringu1="QEAAAA",stringu2="ITDAAA",string4="OOOOxx" 218678400000000000 +tenk unique1=5921i,unique2=2531i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=921i,twothousand=1921i,fivethous=921i,tenthous=5921i,odd=42i,even=43i,stringu1="TTAAAA",stringu2="JTDAAA",string4="VVVVxx" 218764800000000000 +tenk unique1=118i,unique2=2532i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=118i,twothousand=118i,fivethous=118i,tenthous=118i,odd=36i,even=37i,stringu1="OEAAAA",stringu2="KTDAAA",string4="AAAAxx" 218851200000000000 +tenk unique1=3065i,unique2=2533i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=65i,twothousand=1065i,fivethous=3065i,tenthous=3065i,odd=130i,even=131i,stringu1="XNAAAA",stringu2="LTDAAA",string4="HHHHxx" 218937600000000000 +tenk unique1=6590i,unique2=2534i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=590i,twothousand=590i,fivethous=1590i,tenthous=6590i,odd=180i,even=181i,stringu1="MTAAAA",stringu2="MTDAAA",string4="OOOOxx" 219024000000000000 +tenk unique1=4993i,unique2=2535i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=993i,twothousand=993i,fivethous=4993i,tenthous=4993i,odd=186i,even=187i,stringu1="BKAAAA",stringu2="NTDAAA",string4="VVVVxx" 219110400000000000 +tenk unique1=6818i,unique2=2536i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=818i,twothousand=818i,fivethous=1818i,tenthous=6818i,odd=36i,even=37i,stringu1="GCAAAA",stringu2="OTDAAA",string4="AAAAxx" 219196800000000000 +tenk unique1=1449i,unique2=2537i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=449i,twothousand=1449i,fivethous=1449i,tenthous=1449i,odd=98i,even=99i,stringu1="TDAAAA",stringu2="PTDAAA",string4="HHHHxx" 219283200000000000 +tenk unique1=2039i,unique2=2538i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=39i,twothousand=39i,fivethous=2039i,tenthous=2039i,odd=78i,even=79i,stringu1="LAAAAA",stringu2="QTDAAA",string4="OOOOxx" 219369600000000000 +tenk unique1=2524i,unique2=2539i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=524i,twothousand=524i,fivethous=2524i,tenthous=2524i,odd=48i,even=49i,stringu1="CTAAAA",stringu2="RTDAAA",string4="VVVVxx" 219456000000000000 +tenk unique1=1481i,unique2=2540i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=481i,twothousand=1481i,fivethous=1481i,tenthous=1481i,odd=162i,even=163i,stringu1="ZEAAAA",stringu2="STDAAA",string4="AAAAxx" 219542400000000000 +tenk unique1=6984i,unique2=2541i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=984i,twothousand=984i,fivethous=1984i,tenthous=6984i,odd=168i,even=169i,stringu1="QIAAAA",stringu2="TTDAAA",string4="HHHHxx" 219628800000000000 +tenk unique1=3960i,unique2=2542i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=960i,twothousand=1960i,fivethous=3960i,tenthous=3960i,odd=120i,even=121i,stringu1="IWAAAA",stringu2="UTDAAA",string4="OOOOxx" 219715200000000000 +tenk unique1=1983i,unique2=2543i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=983i,twothousand=1983i,fivethous=1983i,tenthous=1983i,odd=166i,even=167i,stringu1="HYAAAA",stringu2="VTDAAA",string4="VVVVxx" 219801600000000000 +tenk unique1=6379i,unique2=2544i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=379i,twothousand=379i,fivethous=1379i,tenthous=6379i,odd=158i,even=159i,stringu1="JLAAAA",stringu2="WTDAAA",string4="AAAAxx" 219888000000000000 +tenk unique1=8975i,unique2=2545i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=975i,twothousand=975i,fivethous=3975i,tenthous=8975i,odd=150i,even=151i,stringu1="FHAAAA",stringu2="XTDAAA",string4="HHHHxx" 219974400000000000 +tenk unique1=1102i,unique2=2546i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=102i,twothousand=1102i,fivethous=1102i,tenthous=1102i,odd=4i,even=5i,stringu1="KQAAAA",stringu2="YTDAAA",string4="OOOOxx" 220060800000000000 +tenk unique1=2517i,unique2=2547i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=517i,twothousand=517i,fivethous=2517i,tenthous=2517i,odd=34i,even=35i,stringu1="VSAAAA",stringu2="ZTDAAA",string4="VVVVxx" 220147200000000000 +tenk unique1=712i,unique2=2548i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=712i,twothousand=712i,fivethous=712i,tenthous=712i,odd=24i,even=25i,stringu1="KBAAAA",stringu2="AUDAAA",string4="AAAAxx" 220233600000000000 +tenk unique1=5419i,unique2=2549i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=419i,twothousand=1419i,fivethous=419i,tenthous=5419i,odd=38i,even=39i,stringu1="LAAAAA",stringu2="BUDAAA",string4="HHHHxx" 220320000000000000 +tenk unique1=723i,unique2=2550i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=723i,twothousand=723i,fivethous=723i,tenthous=723i,odd=46i,even=47i,stringu1="VBAAAA",stringu2="CUDAAA",string4="OOOOxx" 220406400000000000 +tenk unique1=8057i,unique2=2551i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=57i,twothousand=57i,fivethous=3057i,tenthous=8057i,odd=114i,even=115i,stringu1="XXAAAA",stringu2="DUDAAA",string4="VVVVxx" 220492800000000000 +tenk unique1=7471i,unique2=2552i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=471i,twothousand=1471i,fivethous=2471i,tenthous=7471i,odd=142i,even=143i,stringu1="JBAAAA",stringu2="EUDAAA",string4="AAAAxx" 220579200000000000 +tenk unique1=8855i,unique2=2553i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=855i,twothousand=855i,fivethous=3855i,tenthous=8855i,odd=110i,even=111i,stringu1="PCAAAA",stringu2="FUDAAA",string4="HHHHxx" 220665600000000000 +tenk unique1=5074i,unique2=2554i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=74i,twothousand=1074i,fivethous=74i,tenthous=5074i,odd=148i,even=149i,stringu1="ENAAAA",stringu2="GUDAAA",string4="OOOOxx" 220752000000000000 +tenk unique1=7139i,unique2=2555i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=139i,twothousand=1139i,fivethous=2139i,tenthous=7139i,odd=78i,even=79i,stringu1="POAAAA",stringu2="HUDAAA",string4="VVVVxx" 220838400000000000 +tenk unique1=3833i,unique2=2556i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=833i,twothousand=1833i,fivethous=3833i,tenthous=3833i,odd=66i,even=67i,stringu1="LRAAAA",stringu2="IUDAAA",string4="AAAAxx" 220924800000000000 +tenk unique1=5186i,unique2=2557i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=186i,twothousand=1186i,fivethous=186i,tenthous=5186i,odd=172i,even=173i,stringu1="MRAAAA",stringu2="JUDAAA",string4="HHHHxx" 221011200000000000 +tenk unique1=9436i,unique2=2558i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=436i,twothousand=1436i,fivethous=4436i,tenthous=9436i,odd=72i,even=73i,stringu1="YYAAAA",stringu2="KUDAAA",string4="OOOOxx" 221097600000000000 +tenk unique1=8859i,unique2=2559i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=859i,twothousand=859i,fivethous=3859i,tenthous=8859i,odd=118i,even=119i,stringu1="TCAAAA",stringu2="LUDAAA",string4="VVVVxx" 221184000000000000 +tenk unique1=6943i,unique2=2560i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=943i,twothousand=943i,fivethous=1943i,tenthous=6943i,odd=86i,even=87i,stringu1="BHAAAA",stringu2="MUDAAA",string4="AAAAxx" 221270400000000000 +tenk unique1=2315i,unique2=2561i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=315i,twothousand=315i,fivethous=2315i,tenthous=2315i,odd=30i,even=31i,stringu1="BLAAAA",stringu2="NUDAAA",string4="HHHHxx" 221356800000000000 +tenk unique1=1394i,unique2=2562i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=394i,twothousand=1394i,fivethous=1394i,tenthous=1394i,odd=188i,even=189i,stringu1="QBAAAA",stringu2="OUDAAA",string4="OOOOxx" 221443200000000000 +tenk unique1=8863i,unique2=2563i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=863i,twothousand=863i,fivethous=3863i,tenthous=8863i,odd=126i,even=127i,stringu1="XCAAAA",stringu2="PUDAAA",string4="VVVVxx" 221529600000000000 +tenk unique1=8812i,unique2=2564i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=812i,twothousand=812i,fivethous=3812i,tenthous=8812i,odd=24i,even=25i,stringu1="YAAAAA",stringu2="QUDAAA",string4="AAAAxx" 221616000000000000 +tenk unique1=7498i,unique2=2565i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=498i,twothousand=1498i,fivethous=2498i,tenthous=7498i,odd=196i,even=197i,stringu1="KCAAAA",stringu2="RUDAAA",string4="HHHHxx" 221702400000000000 +tenk unique1=8962i,unique2=2566i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=962i,twothousand=962i,fivethous=3962i,tenthous=8962i,odd=124i,even=125i,stringu1="SGAAAA",stringu2="SUDAAA",string4="OOOOxx" 221788800000000000 +tenk unique1=2533i,unique2=2567i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=533i,twothousand=533i,fivethous=2533i,tenthous=2533i,odd=66i,even=67i,stringu1="LTAAAA",stringu2="TUDAAA",string4="VVVVxx" 221875200000000000 +tenk unique1=8188i,unique2=2568i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=188i,twothousand=188i,fivethous=3188i,tenthous=8188i,odd=176i,even=177i,stringu1="YCAAAA",stringu2="UUDAAA",string4="AAAAxx" 221961600000000000 +tenk unique1=6137i,unique2=2569i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=137i,twothousand=137i,fivethous=1137i,tenthous=6137i,odd=74i,even=75i,stringu1="BCAAAA",stringu2="VUDAAA",string4="HHHHxx" 222048000000000000 +tenk unique1=974i,unique2=2570i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=974i,twothousand=974i,fivethous=974i,tenthous=974i,odd=148i,even=149i,stringu1="MLAAAA",stringu2="WUDAAA",string4="OOOOxx" 222134400000000000 +tenk unique1=2751i,unique2=2571i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=751i,twothousand=751i,fivethous=2751i,tenthous=2751i,odd=102i,even=103i,stringu1="VBAAAA",stringu2="XUDAAA",string4="VVVVxx" 222220800000000000 +tenk unique1=4975i,unique2=2572i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=975i,twothousand=975i,fivethous=4975i,tenthous=4975i,odd=150i,even=151i,stringu1="JJAAAA",stringu2="YUDAAA",string4="AAAAxx" 222307200000000000 +tenk unique1=3411i,unique2=2573i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=411i,twothousand=1411i,fivethous=3411i,tenthous=3411i,odd=22i,even=23i,stringu1="FBAAAA",stringu2="ZUDAAA",string4="HHHHxx" 222393600000000000 +tenk unique1=3143i,unique2=2574i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=143i,twothousand=1143i,fivethous=3143i,tenthous=3143i,odd=86i,even=87i,stringu1="XQAAAA",stringu2="AVDAAA",string4="OOOOxx" 222480000000000000 +tenk unique1=8011i,unique2=2575i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=11i,twothousand=11i,fivethous=3011i,tenthous=8011i,odd=22i,even=23i,stringu1="DWAAAA",stringu2="BVDAAA",string4="VVVVxx" 222566400000000000 +tenk unique1=988i,unique2=2576i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=988i,twothousand=988i,fivethous=988i,tenthous=988i,odd=176i,even=177i,stringu1="AMAAAA",stringu2="CVDAAA",string4="AAAAxx" 222652800000000000 +tenk unique1=4289i,unique2=2577i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=289i,twothousand=289i,fivethous=4289i,tenthous=4289i,odd=178i,even=179i,stringu1="ZIAAAA",stringu2="DVDAAA",string4="HHHHxx" 222739200000000000 +tenk unique1=8105i,unique2=2578i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=105i,twothousand=105i,fivethous=3105i,tenthous=8105i,odd=10i,even=11i,stringu1="TZAAAA",stringu2="EVDAAA",string4="OOOOxx" 222825600000000000 +tenk unique1=9885i,unique2=2579i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=885i,twothousand=1885i,fivethous=4885i,tenthous=9885i,odd=170i,even=171i,stringu1="FQAAAA",stringu2="FVDAAA",string4="VVVVxx" 222912000000000000 +tenk unique1=1002i,unique2=2580i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=1002i,fivethous=1002i,tenthous=1002i,odd=4i,even=5i,stringu1="OMAAAA",stringu2="GVDAAA",string4="AAAAxx" 222998400000000000 +tenk unique1=5827i,unique2=2581i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=827i,twothousand=1827i,fivethous=827i,tenthous=5827i,odd=54i,even=55i,stringu1="DQAAAA",stringu2="HVDAAA",string4="HHHHxx" 223084800000000000 +tenk unique1=1228i,unique2=2582i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=228i,twothousand=1228i,fivethous=1228i,tenthous=1228i,odd=56i,even=57i,stringu1="GVAAAA",stringu2="IVDAAA",string4="OOOOxx" 223171200000000000 +tenk unique1=6352i,unique2=2583i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=352i,twothousand=352i,fivethous=1352i,tenthous=6352i,odd=104i,even=105i,stringu1="IKAAAA",stringu2="JVDAAA",string4="VVVVxx" 223257600000000000 +tenk unique1=8868i,unique2=2584i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=868i,twothousand=868i,fivethous=3868i,tenthous=8868i,odd=136i,even=137i,stringu1="CDAAAA",stringu2="KVDAAA",string4="AAAAxx" 223344000000000000 +tenk unique1=3643i,unique2=2585i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=643i,twothousand=1643i,fivethous=3643i,tenthous=3643i,odd=86i,even=87i,stringu1="DKAAAA",stringu2="LVDAAA",string4="HHHHxx" 223430400000000000 +tenk unique1=1468i,unique2=2586i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=468i,twothousand=1468i,fivethous=1468i,tenthous=1468i,odd=136i,even=137i,stringu1="MEAAAA",stringu2="MVDAAA",string4="OOOOxx" 223516800000000000 +tenk unique1=8415i,unique2=2587i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=415i,twothousand=415i,fivethous=3415i,tenthous=8415i,odd=30i,even=31i,stringu1="RLAAAA",stringu2="NVDAAA",string4="VVVVxx" 223603200000000000 +tenk unique1=9631i,unique2=2588i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=631i,twothousand=1631i,fivethous=4631i,tenthous=9631i,odd=62i,even=63i,stringu1="LGAAAA",stringu2="OVDAAA",string4="AAAAxx" 223689600000000000 +tenk unique1=7408i,unique2=2589i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=408i,twothousand=1408i,fivethous=2408i,tenthous=7408i,odd=16i,even=17i,stringu1="YYAAAA",stringu2="PVDAAA",string4="HHHHxx" 223776000000000000 +tenk unique1=1934i,unique2=2590i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=934i,twothousand=1934i,fivethous=1934i,tenthous=1934i,odd=68i,even=69i,stringu1="KWAAAA",stringu2="QVDAAA",string4="OOOOxx" 223862400000000000 +tenk unique1=996i,unique2=2591i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=996i,twothousand=996i,fivethous=996i,tenthous=996i,odd=192i,even=193i,stringu1="IMAAAA",stringu2="RVDAAA",string4="VVVVxx" 223948800000000000 +tenk unique1=8027i,unique2=2592i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=27i,twothousand=27i,fivethous=3027i,tenthous=8027i,odd=54i,even=55i,stringu1="TWAAAA",stringu2="SVDAAA",string4="AAAAxx" 224035200000000000 +tenk unique1=8464i,unique2=2593i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=464i,twothousand=464i,fivethous=3464i,tenthous=8464i,odd=128i,even=129i,stringu1="ONAAAA",stringu2="TVDAAA",string4="HHHHxx" 224121600000000000 +tenk unique1=5007i,unique2=2594i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=1007i,fivethous=7i,tenthous=5007i,odd=14i,even=15i,stringu1="PKAAAA",stringu2="UVDAAA",string4="OOOOxx" 224208000000000000 +tenk unique1=8356i,unique2=2595i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=356i,twothousand=356i,fivethous=3356i,tenthous=8356i,odd=112i,even=113i,stringu1="KJAAAA",stringu2="VVDAAA",string4="VVVVxx" 224294400000000000 +tenk unique1=4579i,unique2=2596i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=579i,twothousand=579i,fivethous=4579i,tenthous=4579i,odd=158i,even=159i,stringu1="DUAAAA",stringu2="WVDAAA",string4="AAAAxx" 224380800000000000 +tenk unique1=8513i,unique2=2597i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=513i,twothousand=513i,fivethous=3513i,tenthous=8513i,odd=26i,even=27i,stringu1="LPAAAA",stringu2="XVDAAA",string4="HHHHxx" 224467200000000000 +tenk unique1=383i,unique2=2598i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=383i,twothousand=383i,fivethous=383i,tenthous=383i,odd=166i,even=167i,stringu1="TOAAAA",stringu2="YVDAAA",string4="OOOOxx" 224553600000000000 +tenk unique1=9304i,unique2=2599i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=304i,twothousand=1304i,fivethous=4304i,tenthous=9304i,odd=8i,even=9i,stringu1="WTAAAA",stringu2="ZVDAAA",string4="VVVVxx" 224640000000000000 +tenk unique1=7224i,unique2=2600i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=224i,twothousand=1224i,fivethous=2224i,tenthous=7224i,odd=48i,even=49i,stringu1="WRAAAA",stringu2="AWDAAA",string4="AAAAxx" 224726400000000000 +tenk unique1=6023i,unique2=2601i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=23i,twothousand=23i,fivethous=1023i,tenthous=6023i,odd=46i,even=47i,stringu1="RXAAAA",stringu2="BWDAAA",string4="HHHHxx" 224812800000000000 +tenk unique1=2746i,unique2=2602i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=746i,twothousand=746i,fivethous=2746i,tenthous=2746i,odd=92i,even=93i,stringu1="QBAAAA",stringu2="CWDAAA",string4="OOOOxx" 224899200000000000 +tenk unique1=137i,unique2=2603i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=137i,twothousand=137i,fivethous=137i,tenthous=137i,odd=74i,even=75i,stringu1="HFAAAA",stringu2="DWDAAA",string4="VVVVxx" 224985600000000000 +tenk unique1=9441i,unique2=2604i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=441i,twothousand=1441i,fivethous=4441i,tenthous=9441i,odd=82i,even=83i,stringu1="DZAAAA",stringu2="EWDAAA",string4="AAAAxx" 225072000000000000 +tenk unique1=3690i,unique2=2605i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=690i,twothousand=1690i,fivethous=3690i,tenthous=3690i,odd=180i,even=181i,stringu1="YLAAAA",stringu2="FWDAAA",string4="HHHHxx" 225158400000000000 +tenk unique1=913i,unique2=2606i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=913i,twothousand=913i,fivethous=913i,tenthous=913i,odd=26i,even=27i,stringu1="DJAAAA",stringu2="GWDAAA",string4="OOOOxx" 225244800000000000 +tenk unique1=1768i,unique2=2607i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=768i,twothousand=1768i,fivethous=1768i,tenthous=1768i,odd=136i,even=137i,stringu1="AQAAAA",stringu2="HWDAAA",string4="VVVVxx" 225331200000000000 +tenk unique1=8492i,unique2=2608i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=492i,twothousand=492i,fivethous=3492i,tenthous=8492i,odd=184i,even=185i,stringu1="QOAAAA",stringu2="IWDAAA",string4="AAAAxx" 225417600000000000 +tenk unique1=8083i,unique2=2609i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=83i,twothousand=83i,fivethous=3083i,tenthous=8083i,odd=166i,even=167i,stringu1="XYAAAA",stringu2="JWDAAA",string4="HHHHxx" 225504000000000000 +tenk unique1=4609i,unique2=2610i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=609i,twothousand=609i,fivethous=4609i,tenthous=4609i,odd=18i,even=19i,stringu1="HVAAAA",stringu2="KWDAAA",string4="OOOOxx" 225590400000000000 +tenk unique1=7520i,unique2=2611i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=520i,twothousand=1520i,fivethous=2520i,tenthous=7520i,odd=40i,even=41i,stringu1="GDAAAA",stringu2="LWDAAA",string4="VVVVxx" 225676800000000000 +tenk unique1=4231i,unique2=2612i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=231i,twothousand=231i,fivethous=4231i,tenthous=4231i,odd=62i,even=63i,stringu1="TGAAAA",stringu2="MWDAAA",string4="AAAAxx" 225763200000000000 +tenk unique1=6022i,unique2=2613i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=22i,twothousand=22i,fivethous=1022i,tenthous=6022i,odd=44i,even=45i,stringu1="QXAAAA",stringu2="NWDAAA",string4="HHHHxx" 225849600000000000 +tenk unique1=9784i,unique2=2614i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=784i,twothousand=1784i,fivethous=4784i,tenthous=9784i,odd=168i,even=169i,stringu1="IMAAAA",stringu2="OWDAAA",string4="OOOOxx" 225936000000000000 +tenk unique1=1343i,unique2=2615i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=343i,twothousand=1343i,fivethous=1343i,tenthous=1343i,odd=86i,even=87i,stringu1="RZAAAA",stringu2="PWDAAA",string4="VVVVxx" 226022400000000000 +tenk unique1=7549i,unique2=2616i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=549i,twothousand=1549i,fivethous=2549i,tenthous=7549i,odd=98i,even=99i,stringu1="JEAAAA",stringu2="QWDAAA",string4="AAAAxx" 226108800000000000 +tenk unique1=269i,unique2=2617i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=269i,twothousand=269i,fivethous=269i,tenthous=269i,odd=138i,even=139i,stringu1="JKAAAA",stringu2="RWDAAA",string4="HHHHxx" 226195200000000000 +tenk unique1=1069i,unique2=2618i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=69i,twothousand=1069i,fivethous=1069i,tenthous=1069i,odd=138i,even=139i,stringu1="DPAAAA",stringu2="SWDAAA",string4="OOOOxx" 226281600000000000 +tenk unique1=4610i,unique2=2619i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=610i,twothousand=610i,fivethous=4610i,tenthous=4610i,odd=20i,even=21i,stringu1="IVAAAA",stringu2="TWDAAA",string4="VVVVxx" 226368000000000000 +tenk unique1=482i,unique2=2620i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=482i,twothousand=482i,fivethous=482i,tenthous=482i,odd=164i,even=165i,stringu1="OSAAAA",stringu2="UWDAAA",string4="AAAAxx" 226454400000000000 +tenk unique1=3025i,unique2=2621i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=25i,twothousand=1025i,fivethous=3025i,tenthous=3025i,odd=50i,even=51i,stringu1="JMAAAA",stringu2="VWDAAA",string4="HHHHxx" 226540800000000000 +tenk unique1=7914i,unique2=2622i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=914i,twothousand=1914i,fivethous=2914i,tenthous=7914i,odd=28i,even=29i,stringu1="KSAAAA",stringu2="WWDAAA",string4="OOOOxx" 226627200000000000 +tenk unique1=3198i,unique2=2623i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=198i,twothousand=1198i,fivethous=3198i,tenthous=3198i,odd=196i,even=197i,stringu1="ATAAAA",stringu2="XWDAAA",string4="VVVVxx" 226713600000000000 +tenk unique1=1187i,unique2=2624i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=187i,twothousand=1187i,fivethous=1187i,tenthous=1187i,odd=174i,even=175i,stringu1="RTAAAA",stringu2="YWDAAA",string4="AAAAxx" 226800000000000000 +tenk unique1=4707i,unique2=2625i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=707i,twothousand=707i,fivethous=4707i,tenthous=4707i,odd=14i,even=15i,stringu1="BZAAAA",stringu2="ZWDAAA",string4="HHHHxx" 226886400000000000 +tenk unique1=8279i,unique2=2626i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=279i,twothousand=279i,fivethous=3279i,tenthous=8279i,odd=158i,even=159i,stringu1="LGAAAA",stringu2="AXDAAA",string4="OOOOxx" 226972800000000000 +tenk unique1=6127i,unique2=2627i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=127i,twothousand=127i,fivethous=1127i,tenthous=6127i,odd=54i,even=55i,stringu1="RBAAAA",stringu2="BXDAAA",string4="VVVVxx" 227059200000000000 +tenk unique1=1305i,unique2=2628i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=305i,twothousand=1305i,fivethous=1305i,tenthous=1305i,odd=10i,even=11i,stringu1="FYAAAA",stringu2="CXDAAA",string4="AAAAxx" 227145600000000000 +tenk unique1=4804i,unique2=2629i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=804i,twothousand=804i,fivethous=4804i,tenthous=4804i,odd=8i,even=9i,stringu1="UCAAAA",stringu2="DXDAAA",string4="HHHHxx" 227232000000000000 +tenk unique1=6069i,unique2=2630i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=69i,twothousand=69i,fivethous=1069i,tenthous=6069i,odd=138i,even=139i,stringu1="LZAAAA",stringu2="EXDAAA",string4="OOOOxx" 227318400000000000 +tenk unique1=9229i,unique2=2631i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=229i,twothousand=1229i,fivethous=4229i,tenthous=9229i,odd=58i,even=59i,stringu1="ZQAAAA",stringu2="FXDAAA",string4="VVVVxx" 227404800000000000 +tenk unique1=4703i,unique2=2632i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=703i,twothousand=703i,fivethous=4703i,tenthous=4703i,odd=6i,even=7i,stringu1="XYAAAA",stringu2="GXDAAA",string4="AAAAxx" 227491200000000000 +tenk unique1=6410i,unique2=2633i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=410i,twothousand=410i,fivethous=1410i,tenthous=6410i,odd=20i,even=21i,stringu1="OMAAAA",stringu2="HXDAAA",string4="HHHHxx" 227577600000000000 +tenk unique1=944i,unique2=2634i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=944i,twothousand=944i,fivethous=944i,tenthous=944i,odd=88i,even=89i,stringu1="IKAAAA",stringu2="IXDAAA",string4="OOOOxx" 227664000000000000 +tenk unique1=3744i,unique2=2635i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=744i,twothousand=1744i,fivethous=3744i,tenthous=3744i,odd=88i,even=89i,stringu1="AOAAAA",stringu2="JXDAAA",string4="VVVVxx" 227750400000000000 +tenk unique1=1127i,unique2=2636i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=127i,twothousand=1127i,fivethous=1127i,tenthous=1127i,odd=54i,even=55i,stringu1="JRAAAA",stringu2="KXDAAA",string4="AAAAxx" 227836800000000000 +tenk unique1=6693i,unique2=2637i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=693i,twothousand=693i,fivethous=1693i,tenthous=6693i,odd=186i,even=187i,stringu1="LXAAAA",stringu2="LXDAAA",string4="HHHHxx" 227923200000000000 +tenk unique1=583i,unique2=2638i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=583i,twothousand=583i,fivethous=583i,tenthous=583i,odd=166i,even=167i,stringu1="LWAAAA",stringu2="MXDAAA",string4="OOOOxx" 228009600000000000 +tenk unique1=2684i,unique2=2639i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=684i,twothousand=684i,fivethous=2684i,tenthous=2684i,odd=168i,even=169i,stringu1="GZAAAA",stringu2="NXDAAA",string4="VVVVxx" 228096000000000000 +tenk unique1=6192i,unique2=2640i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=192i,twothousand=192i,fivethous=1192i,tenthous=6192i,odd=184i,even=185i,stringu1="EEAAAA",stringu2="OXDAAA",string4="AAAAxx" 228182400000000000 +tenk unique1=4157i,unique2=2641i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=157i,twothousand=157i,fivethous=4157i,tenthous=4157i,odd=114i,even=115i,stringu1="XDAAAA",stringu2="PXDAAA",string4="HHHHxx" 228268800000000000 +tenk unique1=6470i,unique2=2642i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=470i,twothousand=470i,fivethous=1470i,tenthous=6470i,odd=140i,even=141i,stringu1="WOAAAA",stringu2="QXDAAA",string4="OOOOxx" 228355200000000000 +tenk unique1=8965i,unique2=2643i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=965i,twothousand=965i,fivethous=3965i,tenthous=8965i,odd=130i,even=131i,stringu1="VGAAAA",stringu2="RXDAAA",string4="VVVVxx" 228441600000000000 +tenk unique1=1433i,unique2=2644i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=433i,twothousand=1433i,fivethous=1433i,tenthous=1433i,odd=66i,even=67i,stringu1="DDAAAA",stringu2="SXDAAA",string4="AAAAxx" 228528000000000000 +tenk unique1=4570i,unique2=2645i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=570i,twothousand=570i,fivethous=4570i,tenthous=4570i,odd=140i,even=141i,stringu1="UTAAAA",stringu2="TXDAAA",string4="HHHHxx" 228614400000000000 +tenk unique1=1806i,unique2=2646i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=806i,twothousand=1806i,fivethous=1806i,tenthous=1806i,odd=12i,even=13i,stringu1="MRAAAA",stringu2="UXDAAA",string4="OOOOxx" 228700800000000000 +tenk unique1=1230i,unique2=2647i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=230i,twothousand=1230i,fivethous=1230i,tenthous=1230i,odd=60i,even=61i,stringu1="IVAAAA",stringu2="VXDAAA",string4="VVVVxx" 228787200000000000 +tenk unique1=2283i,unique2=2648i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=283i,twothousand=283i,fivethous=2283i,tenthous=2283i,odd=166i,even=167i,stringu1="VJAAAA",stringu2="WXDAAA",string4="AAAAxx" 228873600000000000 +tenk unique1=6456i,unique2=2649i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=456i,twothousand=456i,fivethous=1456i,tenthous=6456i,odd=112i,even=113i,stringu1="IOAAAA",stringu2="XXDAAA",string4="HHHHxx" 228960000000000000 +tenk unique1=7427i,unique2=2650i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=427i,twothousand=1427i,fivethous=2427i,tenthous=7427i,odd=54i,even=55i,stringu1="RZAAAA",stringu2="YXDAAA",string4="OOOOxx" 229046400000000000 +tenk unique1=8310i,unique2=2651i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=310i,twothousand=310i,fivethous=3310i,tenthous=8310i,odd=20i,even=21i,stringu1="QHAAAA",stringu2="ZXDAAA",string4="VVVVxx" 229132800000000000 +tenk unique1=8103i,unique2=2652i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=103i,twothousand=103i,fivethous=3103i,tenthous=8103i,odd=6i,even=7i,stringu1="RZAAAA",stringu2="AYDAAA",string4="AAAAxx" 229219200000000000 +tenk unique1=3947i,unique2=2653i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=947i,twothousand=1947i,fivethous=3947i,tenthous=3947i,odd=94i,even=95i,stringu1="VVAAAA",stringu2="BYDAAA",string4="HHHHxx" 229305600000000000 +tenk unique1=3414i,unique2=2654i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=414i,twothousand=1414i,fivethous=3414i,tenthous=3414i,odd=28i,even=29i,stringu1="IBAAAA",stringu2="CYDAAA",string4="OOOOxx" 229392000000000000 +tenk unique1=2043i,unique2=2655i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=43i,twothousand=43i,fivethous=2043i,tenthous=2043i,odd=86i,even=87i,stringu1="PAAAAA",stringu2="DYDAAA",string4="VVVVxx" 229478400000000000 +tenk unique1=4393i,unique2=2656i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=393i,twothousand=393i,fivethous=4393i,tenthous=4393i,odd=186i,even=187i,stringu1="ZMAAAA",stringu2="EYDAAA",string4="AAAAxx" 229564800000000000 +tenk unique1=6664i,unique2=2657i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=664i,twothousand=664i,fivethous=1664i,tenthous=6664i,odd=128i,even=129i,stringu1="IWAAAA",stringu2="FYDAAA",string4="HHHHxx" 229651200000000000 +tenk unique1=4545i,unique2=2658i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=545i,twothousand=545i,fivethous=4545i,tenthous=4545i,odd=90i,even=91i,stringu1="VSAAAA",stringu2="GYDAAA",string4="OOOOxx" 229737600000000000 +tenk unique1=7637i,unique2=2659i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=637i,twothousand=1637i,fivethous=2637i,tenthous=7637i,odd=74i,even=75i,stringu1="THAAAA",stringu2="HYDAAA",string4="VVVVxx" 229824000000000000 +tenk unique1=1359i,unique2=2660i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=359i,twothousand=1359i,fivethous=1359i,tenthous=1359i,odd=118i,even=119i,stringu1="HAAAAA",stringu2="IYDAAA",string4="AAAAxx" 229910400000000000 +tenk unique1=5018i,unique2=2661i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=18i,twothousand=1018i,fivethous=18i,tenthous=5018i,odd=36i,even=37i,stringu1="ALAAAA",stringu2="JYDAAA",string4="HHHHxx" 229996800000000000 +tenk unique1=987i,unique2=2662i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=987i,twothousand=987i,fivethous=987i,tenthous=987i,odd=174i,even=175i,stringu1="ZLAAAA",stringu2="KYDAAA",string4="OOOOxx" 230083200000000000 +tenk unique1=1320i,unique2=2663i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=320i,twothousand=1320i,fivethous=1320i,tenthous=1320i,odd=40i,even=41i,stringu1="UYAAAA",stringu2="LYDAAA",string4="VVVVxx" 230169600000000000 +tenk unique1=9311i,unique2=2664i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=311i,twothousand=1311i,fivethous=4311i,tenthous=9311i,odd=22i,even=23i,stringu1="DUAAAA",stringu2="MYDAAA",string4="AAAAxx" 230256000000000000 +tenk unique1=7993i,unique2=2665i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=993i,twothousand=1993i,fivethous=2993i,tenthous=7993i,odd=186i,even=187i,stringu1="LVAAAA",stringu2="NYDAAA",string4="HHHHxx" 230342400000000000 +tenk unique1=7588i,unique2=2666i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=588i,twothousand=1588i,fivethous=2588i,tenthous=7588i,odd=176i,even=177i,stringu1="WFAAAA",stringu2="OYDAAA",string4="OOOOxx" 230428800000000000 +tenk unique1=5983i,unique2=2667i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=983i,twothousand=1983i,fivethous=983i,tenthous=5983i,odd=166i,even=167i,stringu1="DWAAAA",stringu2="PYDAAA",string4="VVVVxx" 230515200000000000 +tenk unique1=4070i,unique2=2668i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=70i,twothousand=70i,fivethous=4070i,tenthous=4070i,odd=140i,even=141i,stringu1="OAAAAA",stringu2="QYDAAA",string4="AAAAxx" 230601600000000000 +tenk unique1=8349i,unique2=2669i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=349i,twothousand=349i,fivethous=3349i,tenthous=8349i,odd=98i,even=99i,stringu1="DJAAAA",stringu2="RYDAAA",string4="HHHHxx" 230688000000000000 +tenk unique1=3810i,unique2=2670i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=810i,twothousand=1810i,fivethous=3810i,tenthous=3810i,odd=20i,even=21i,stringu1="OQAAAA",stringu2="SYDAAA",string4="OOOOxx" 230774400000000000 +tenk unique1=6948i,unique2=2671i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=948i,twothousand=948i,fivethous=1948i,tenthous=6948i,odd=96i,even=97i,stringu1="GHAAAA",stringu2="TYDAAA",string4="VVVVxx" 230860800000000000 +tenk unique1=7153i,unique2=2672i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=153i,twothousand=1153i,fivethous=2153i,tenthous=7153i,odd=106i,even=107i,stringu1="DPAAAA",stringu2="UYDAAA",string4="AAAAxx" 230947200000000000 +tenk unique1=5371i,unique2=2673i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=371i,twothousand=1371i,fivethous=371i,tenthous=5371i,odd=142i,even=143i,stringu1="PYAAAA",stringu2="VYDAAA",string4="HHHHxx" 231033600000000000 +tenk unique1=8316i,unique2=2674i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=316i,twothousand=316i,fivethous=3316i,tenthous=8316i,odd=32i,even=33i,stringu1="WHAAAA",stringu2="WYDAAA",string4="OOOOxx" 231120000000000000 +tenk unique1=5903i,unique2=2675i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=903i,twothousand=1903i,fivethous=903i,tenthous=5903i,odd=6i,even=7i,stringu1="BTAAAA",stringu2="XYDAAA",string4="VVVVxx" 231206400000000000 +tenk unique1=6718i,unique2=2676i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=718i,twothousand=718i,fivethous=1718i,tenthous=6718i,odd=36i,even=37i,stringu1="KYAAAA",stringu2="YYDAAA",string4="AAAAxx" 231292800000000000 +tenk unique1=4759i,unique2=2677i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=759i,twothousand=759i,fivethous=4759i,tenthous=4759i,odd=118i,even=119i,stringu1="BBAAAA",stringu2="ZYDAAA",string4="HHHHxx" 231379200000000000 +tenk unique1=2555i,unique2=2678i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=555i,twothousand=555i,fivethous=2555i,tenthous=2555i,odd=110i,even=111i,stringu1="HUAAAA",stringu2="AZDAAA",string4="OOOOxx" 231465600000000000 +tenk unique1=3457i,unique2=2679i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=457i,twothousand=1457i,fivethous=3457i,tenthous=3457i,odd=114i,even=115i,stringu1="ZCAAAA",stringu2="BZDAAA",string4="VVVVxx" 231552000000000000 +tenk unique1=9626i,unique2=2680i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=626i,twothousand=1626i,fivethous=4626i,tenthous=9626i,odd=52i,even=53i,stringu1="GGAAAA",stringu2="CZDAAA",string4="AAAAxx" 231638400000000000 +tenk unique1=2570i,unique2=2681i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=570i,twothousand=570i,fivethous=2570i,tenthous=2570i,odd=140i,even=141i,stringu1="WUAAAA",stringu2="DZDAAA",string4="HHHHxx" 231724800000000000 +tenk unique1=7964i,unique2=2682i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=964i,twothousand=1964i,fivethous=2964i,tenthous=7964i,odd=128i,even=129i,stringu1="IUAAAA",stringu2="EZDAAA",string4="OOOOxx" 231811200000000000 +tenk unique1=1543i,unique2=2683i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=543i,twothousand=1543i,fivethous=1543i,tenthous=1543i,odd=86i,even=87i,stringu1="JHAAAA",stringu2="FZDAAA",string4="VVVVxx" 231897600000000000 +tenk unique1=929i,unique2=2684i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=929i,twothousand=929i,fivethous=929i,tenthous=929i,odd=58i,even=59i,stringu1="TJAAAA",stringu2="GZDAAA",string4="AAAAxx" 231984000000000000 +tenk unique1=9244i,unique2=2685i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=244i,twothousand=1244i,fivethous=4244i,tenthous=9244i,odd=88i,even=89i,stringu1="ORAAAA",stringu2="HZDAAA",string4="HHHHxx" 232070400000000000 +tenk unique1=9210i,unique2=2686i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=210i,twothousand=1210i,fivethous=4210i,tenthous=9210i,odd=20i,even=21i,stringu1="GQAAAA",stringu2="IZDAAA",string4="OOOOxx" 232156800000000000 +tenk unique1=8334i,unique2=2687i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=334i,twothousand=334i,fivethous=3334i,tenthous=8334i,odd=68i,even=69i,stringu1="OIAAAA",stringu2="JZDAAA",string4="VVVVxx" 232243200000000000 +tenk unique1=9310i,unique2=2688i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=310i,twothousand=1310i,fivethous=4310i,tenthous=9310i,odd=20i,even=21i,stringu1="CUAAAA",stringu2="KZDAAA",string4="AAAAxx" 232329600000000000 +tenk unique1=5024i,unique2=2689i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=24i,twothousand=1024i,fivethous=24i,tenthous=5024i,odd=48i,even=49i,stringu1="GLAAAA",stringu2="LZDAAA",string4="HHHHxx" 232416000000000000 +tenk unique1=8794i,unique2=2690i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=794i,twothousand=794i,fivethous=3794i,tenthous=8794i,odd=188i,even=189i,stringu1="GAAAAA",stringu2="MZDAAA",string4="OOOOxx" 232502400000000000 +tenk unique1=4091i,unique2=2691i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=91i,twothousand=91i,fivethous=4091i,tenthous=4091i,odd=182i,even=183i,stringu1="JBAAAA",stringu2="NZDAAA",string4="VVVVxx" 232588800000000000 +tenk unique1=649i,unique2=2692i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=649i,twothousand=649i,fivethous=649i,tenthous=649i,odd=98i,even=99i,stringu1="ZYAAAA",stringu2="OZDAAA",string4="AAAAxx" 232675200000000000 +tenk unique1=8505i,unique2=2693i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=505i,twothousand=505i,fivethous=3505i,tenthous=8505i,odd=10i,even=11i,stringu1="DPAAAA",stringu2="PZDAAA",string4="HHHHxx" 232761600000000000 +tenk unique1=6652i,unique2=2694i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=652i,twothousand=652i,fivethous=1652i,tenthous=6652i,odd=104i,even=105i,stringu1="WVAAAA",stringu2="QZDAAA",string4="OOOOxx" 232848000000000000 +tenk unique1=8945i,unique2=2695i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=945i,twothousand=945i,fivethous=3945i,tenthous=8945i,odd=90i,even=91i,stringu1="BGAAAA",stringu2="RZDAAA",string4="VVVVxx" 232934400000000000 +tenk unique1=2095i,unique2=2696i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=95i,twothousand=95i,fivethous=2095i,tenthous=2095i,odd=190i,even=191i,stringu1="PCAAAA",stringu2="SZDAAA",string4="AAAAxx" 233020800000000000 +tenk unique1=8676i,unique2=2697i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=676i,twothousand=676i,fivethous=3676i,tenthous=8676i,odd=152i,even=153i,stringu1="SVAAAA",stringu2="TZDAAA",string4="HHHHxx" 233107200000000000 +tenk unique1=3994i,unique2=2698i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=994i,twothousand=1994i,fivethous=3994i,tenthous=3994i,odd=188i,even=189i,stringu1="QXAAAA",stringu2="UZDAAA",string4="OOOOxx" 233193600000000000 +tenk unique1=2859i,unique2=2699i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=859i,twothousand=859i,fivethous=2859i,tenthous=2859i,odd=118i,even=119i,stringu1="ZFAAAA",stringu2="VZDAAA",string4="VVVVxx" 233280000000000000 +tenk unique1=5403i,unique2=2700i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=403i,twothousand=1403i,fivethous=403i,tenthous=5403i,odd=6i,even=7i,stringu1="VZAAAA",stringu2="WZDAAA",string4="AAAAxx" 233366400000000000 +tenk unique1=3254i,unique2=2701i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=254i,twothousand=1254i,fivethous=3254i,tenthous=3254i,odd=108i,even=109i,stringu1="EVAAAA",stringu2="XZDAAA",string4="HHHHxx" 233452800000000000 +tenk unique1=7339i,unique2=2702i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=339i,twothousand=1339i,fivethous=2339i,tenthous=7339i,odd=78i,even=79i,stringu1="HWAAAA",stringu2="YZDAAA",string4="OOOOxx" 233539200000000000 +tenk unique1=7220i,unique2=2703i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=220i,twothousand=1220i,fivethous=2220i,tenthous=7220i,odd=40i,even=41i,stringu1="SRAAAA",stringu2="ZZDAAA",string4="VVVVxx" 233625600000000000 +tenk unique1=4154i,unique2=2704i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=154i,twothousand=154i,fivethous=4154i,tenthous=4154i,odd=108i,even=109i,stringu1="UDAAAA",stringu2="AAEAAA",string4="AAAAxx" 233712000000000000 +tenk unique1=7570i,unique2=2705i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=570i,twothousand=1570i,fivethous=2570i,tenthous=7570i,odd=140i,even=141i,stringu1="EFAAAA",stringu2="BAEAAA",string4="HHHHxx" 233798400000000000 +tenk unique1=2576i,unique2=2706i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=576i,twothousand=576i,fivethous=2576i,tenthous=2576i,odd=152i,even=153i,stringu1="CVAAAA",stringu2="CAEAAA",string4="OOOOxx" 233884800000000000 +tenk unique1=5764i,unique2=2707i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=764i,twothousand=1764i,fivethous=764i,tenthous=5764i,odd=128i,even=129i,stringu1="SNAAAA",stringu2="DAEAAA",string4="VVVVxx" 233971200000000000 +tenk unique1=4314i,unique2=2708i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=314i,twothousand=314i,fivethous=4314i,tenthous=4314i,odd=28i,even=29i,stringu1="YJAAAA",stringu2="EAEAAA",string4="AAAAxx" 234057600000000000 +tenk unique1=2274i,unique2=2709i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=274i,twothousand=274i,fivethous=2274i,tenthous=2274i,odd=148i,even=149i,stringu1="MJAAAA",stringu2="FAEAAA",string4="HHHHxx" 234144000000000000 +tenk unique1=9756i,unique2=2710i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=756i,twothousand=1756i,fivethous=4756i,tenthous=9756i,odd=112i,even=113i,stringu1="GLAAAA",stringu2="GAEAAA",string4="OOOOxx" 234230400000000000 +tenk unique1=8274i,unique2=2711i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=274i,twothousand=274i,fivethous=3274i,tenthous=8274i,odd=148i,even=149i,stringu1="GGAAAA",stringu2="HAEAAA",string4="VVVVxx" 234316800000000000 +tenk unique1=1289i,unique2=2712i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=289i,twothousand=1289i,fivethous=1289i,tenthous=1289i,odd=178i,even=179i,stringu1="PXAAAA",stringu2="IAEAAA",string4="AAAAxx" 234403200000000000 +tenk unique1=7335i,unique2=2713i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=335i,twothousand=1335i,fivethous=2335i,tenthous=7335i,odd=70i,even=71i,stringu1="DWAAAA",stringu2="JAEAAA",string4="HHHHxx" 234489600000000000 +tenk unique1=5351i,unique2=2714i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=351i,twothousand=1351i,fivethous=351i,tenthous=5351i,odd=102i,even=103i,stringu1="VXAAAA",stringu2="KAEAAA",string4="OOOOxx" 234576000000000000 +tenk unique1=8978i,unique2=2715i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=978i,twothousand=978i,fivethous=3978i,tenthous=8978i,odd=156i,even=157i,stringu1="IHAAAA",stringu2="LAEAAA",string4="VVVVxx" 234662400000000000 +tenk unique1=2i,unique2=2716i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=2i,fivethous=2i,tenthous=2i,odd=4i,even=5i,stringu1="CAAAAA",stringu2="MAEAAA",string4="AAAAxx" 234748800000000000 +tenk unique1=8906i,unique2=2717i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=906i,twothousand=906i,fivethous=3906i,tenthous=8906i,odd=12i,even=13i,stringu1="OEAAAA",stringu2="NAEAAA",string4="HHHHxx" 234835200000000000 +tenk unique1=6388i,unique2=2718i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=388i,twothousand=388i,fivethous=1388i,tenthous=6388i,odd=176i,even=177i,stringu1="SLAAAA",stringu2="OAEAAA",string4="OOOOxx" 234921600000000000 +tenk unique1=5675i,unique2=2719i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=675i,twothousand=1675i,fivethous=675i,tenthous=5675i,odd=150i,even=151i,stringu1="HKAAAA",stringu2="PAEAAA",string4="VVVVxx" 235008000000000000 +tenk unique1=255i,unique2=2720i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=255i,twothousand=255i,fivethous=255i,tenthous=255i,odd=110i,even=111i,stringu1="VJAAAA",stringu2="QAEAAA",string4="AAAAxx" 235094400000000000 +tenk unique1=9538i,unique2=2721i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=538i,twothousand=1538i,fivethous=4538i,tenthous=9538i,odd=76i,even=77i,stringu1="WCAAAA",stringu2="RAEAAA",string4="HHHHxx" 235180800000000000 +tenk unique1=1480i,unique2=2722i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=480i,twothousand=1480i,fivethous=1480i,tenthous=1480i,odd=160i,even=161i,stringu1="YEAAAA",stringu2="SAEAAA",string4="OOOOxx" 235267200000000000 +tenk unique1=4015i,unique2=2723i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=15i,twothousand=15i,fivethous=4015i,tenthous=4015i,odd=30i,even=31i,stringu1="LYAAAA",stringu2="TAEAAA",string4="VVVVxx" 235353600000000000 +tenk unique1=5166i,unique2=2724i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=166i,twothousand=1166i,fivethous=166i,tenthous=5166i,odd=132i,even=133i,stringu1="SQAAAA",stringu2="UAEAAA",string4="AAAAxx" 235440000000000000 +tenk unique1=91i,unique2=2725i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=91i,twothousand=91i,fivethous=91i,tenthous=91i,odd=182i,even=183i,stringu1="NDAAAA",stringu2="VAEAAA",string4="HHHHxx" 235526400000000000 +tenk unique1=2958i,unique2=2726i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=958i,twothousand=958i,fivethous=2958i,tenthous=2958i,odd=116i,even=117i,stringu1="UJAAAA",stringu2="WAEAAA",string4="OOOOxx" 235612800000000000 +tenk unique1=9131i,unique2=2727i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=131i,twothousand=1131i,fivethous=4131i,tenthous=9131i,odd=62i,even=63i,stringu1="FNAAAA",stringu2="XAEAAA",string4="VVVVxx" 235699200000000000 +tenk unique1=3944i,unique2=2728i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=944i,twothousand=1944i,fivethous=3944i,tenthous=3944i,odd=88i,even=89i,stringu1="SVAAAA",stringu2="YAEAAA",string4="AAAAxx" 235785600000000000 +tenk unique1=4514i,unique2=2729i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=514i,twothousand=514i,fivethous=4514i,tenthous=4514i,odd=28i,even=29i,stringu1="QRAAAA",stringu2="ZAEAAA",string4="HHHHxx" 235872000000000000 +tenk unique1=5661i,unique2=2730i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=661i,twothousand=1661i,fivethous=661i,tenthous=5661i,odd=122i,even=123i,stringu1="TJAAAA",stringu2="ABEAAA",string4="OOOOxx" 235958400000000000 +tenk unique1=8724i,unique2=2731i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=724i,twothousand=724i,fivethous=3724i,tenthous=8724i,odd=48i,even=49i,stringu1="OXAAAA",stringu2="BBEAAA",string4="VVVVxx" 236044800000000000 +tenk unique1=6408i,unique2=2732i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=408i,twothousand=408i,fivethous=1408i,tenthous=6408i,odd=16i,even=17i,stringu1="MMAAAA",stringu2="CBEAAA",string4="AAAAxx" 236131200000000000 +tenk unique1=5013i,unique2=2733i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=13i,twothousand=1013i,fivethous=13i,tenthous=5013i,odd=26i,even=27i,stringu1="VKAAAA",stringu2="DBEAAA",string4="HHHHxx" 236217600000000000 +tenk unique1=6156i,unique2=2734i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=156i,twothousand=156i,fivethous=1156i,tenthous=6156i,odd=112i,even=113i,stringu1="UCAAAA",stringu2="EBEAAA",string4="OOOOxx" 236304000000000000 +tenk unique1=7350i,unique2=2735i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=350i,twothousand=1350i,fivethous=2350i,tenthous=7350i,odd=100i,even=101i,stringu1="SWAAAA",stringu2="FBEAAA",string4="VVVVxx" 236390400000000000 +tenk unique1=9858i,unique2=2736i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=858i,twothousand=1858i,fivethous=4858i,tenthous=9858i,odd=116i,even=117i,stringu1="EPAAAA",stringu2="GBEAAA",string4="AAAAxx" 236476800000000000 +tenk unique1=895i,unique2=2737i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=895i,twothousand=895i,fivethous=895i,tenthous=895i,odd=190i,even=191i,stringu1="LIAAAA",stringu2="HBEAAA",string4="HHHHxx" 236563200000000000 +tenk unique1=8368i,unique2=2738i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=368i,twothousand=368i,fivethous=3368i,tenthous=8368i,odd=136i,even=137i,stringu1="WJAAAA",stringu2="IBEAAA",string4="OOOOxx" 236649600000000000 +tenk unique1=179i,unique2=2739i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=179i,twothousand=179i,fivethous=179i,tenthous=179i,odd=158i,even=159i,stringu1="XGAAAA",stringu2="JBEAAA",string4="VVVVxx" 236736000000000000 +tenk unique1=4048i,unique2=2740i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=48i,twothousand=48i,fivethous=4048i,tenthous=4048i,odd=96i,even=97i,stringu1="SZAAAA",stringu2="KBEAAA",string4="AAAAxx" 236822400000000000 +tenk unique1=3073i,unique2=2741i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=73i,twothousand=1073i,fivethous=3073i,tenthous=3073i,odd=146i,even=147i,stringu1="FOAAAA",stringu2="LBEAAA",string4="HHHHxx" 236908800000000000 +tenk unique1=321i,unique2=2742i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=321i,twothousand=321i,fivethous=321i,tenthous=321i,odd=42i,even=43i,stringu1="JMAAAA",stringu2="MBEAAA",string4="OOOOxx" 236995200000000000 +tenk unique1=5352i,unique2=2743i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=352i,twothousand=1352i,fivethous=352i,tenthous=5352i,odd=104i,even=105i,stringu1="WXAAAA",stringu2="NBEAAA",string4="VVVVxx" 237081600000000000 +tenk unique1=1940i,unique2=2744i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=940i,twothousand=1940i,fivethous=1940i,tenthous=1940i,odd=80i,even=81i,stringu1="QWAAAA",stringu2="OBEAAA",string4="AAAAxx" 237168000000000000 +tenk unique1=8803i,unique2=2745i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=803i,twothousand=803i,fivethous=3803i,tenthous=8803i,odd=6i,even=7i,stringu1="PAAAAA",stringu2="PBEAAA",string4="HHHHxx" 237254400000000000 +tenk unique1=791i,unique2=2746i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=791i,twothousand=791i,fivethous=791i,tenthous=791i,odd=182i,even=183i,stringu1="LEAAAA",stringu2="QBEAAA",string4="OOOOxx" 237340800000000000 +tenk unique1=9809i,unique2=2747i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=809i,twothousand=1809i,fivethous=4809i,tenthous=9809i,odd=18i,even=19i,stringu1="HNAAAA",stringu2="RBEAAA",string4="VVVVxx" 237427200000000000 +tenk unique1=5519i,unique2=2748i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=519i,twothousand=1519i,fivethous=519i,tenthous=5519i,odd=38i,even=39i,stringu1="HEAAAA",stringu2="SBEAAA",string4="AAAAxx" 237513600000000000 +tenk unique1=7420i,unique2=2749i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=420i,twothousand=1420i,fivethous=2420i,tenthous=7420i,odd=40i,even=41i,stringu1="KZAAAA",stringu2="TBEAAA",string4="HHHHxx" 237600000000000000 +tenk unique1=7541i,unique2=2750i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=541i,twothousand=1541i,fivethous=2541i,tenthous=7541i,odd=82i,even=83i,stringu1="BEAAAA",stringu2="UBEAAA",string4="OOOOxx" 237686400000000000 +tenk unique1=6538i,unique2=2751i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=538i,twothousand=538i,fivethous=1538i,tenthous=6538i,odd=76i,even=77i,stringu1="MRAAAA",stringu2="VBEAAA",string4="VVVVxx" 237772800000000000 +tenk unique1=710i,unique2=2752i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=710i,twothousand=710i,fivethous=710i,tenthous=710i,odd=20i,even=21i,stringu1="IBAAAA",stringu2="WBEAAA",string4="AAAAxx" 237859200000000000 +tenk unique1=9488i,unique2=2753i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=488i,twothousand=1488i,fivethous=4488i,tenthous=9488i,odd=176i,even=177i,stringu1="YAAAAA",stringu2="XBEAAA",string4="HHHHxx" 237945600000000000 +tenk unique1=3135i,unique2=2754i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=135i,twothousand=1135i,fivethous=3135i,tenthous=3135i,odd=70i,even=71i,stringu1="PQAAAA",stringu2="YBEAAA",string4="OOOOxx" 238032000000000000 +tenk unique1=4273i,unique2=2755i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=273i,twothousand=273i,fivethous=4273i,tenthous=4273i,odd=146i,even=147i,stringu1="JIAAAA",stringu2="ZBEAAA",string4="VVVVxx" 238118400000000000 +tenk unique1=629i,unique2=2756i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=629i,twothousand=629i,fivethous=629i,tenthous=629i,odd=58i,even=59i,stringu1="FYAAAA",stringu2="ACEAAA",string4="AAAAxx" 238204800000000000 +tenk unique1=9167i,unique2=2757i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=167i,twothousand=1167i,fivethous=4167i,tenthous=9167i,odd=134i,even=135i,stringu1="POAAAA",stringu2="BCEAAA",string4="HHHHxx" 238291200000000000 +tenk unique1=751i,unique2=2758i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=751i,twothousand=751i,fivethous=751i,tenthous=751i,odd=102i,even=103i,stringu1="XCAAAA",stringu2="CCEAAA",string4="OOOOxx" 238377600000000000 +tenk unique1=1126i,unique2=2759i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=126i,twothousand=1126i,fivethous=1126i,tenthous=1126i,odd=52i,even=53i,stringu1="IRAAAA",stringu2="DCEAAA",string4="VVVVxx" 238464000000000000 +tenk unique1=3724i,unique2=2760i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=724i,twothousand=1724i,fivethous=3724i,tenthous=3724i,odd=48i,even=49i,stringu1="GNAAAA",stringu2="ECEAAA",string4="AAAAxx" 238550400000000000 +tenk unique1=1789i,unique2=2761i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=789i,twothousand=1789i,fivethous=1789i,tenthous=1789i,odd=178i,even=179i,stringu1="VQAAAA",stringu2="FCEAAA",string4="HHHHxx" 238636800000000000 +tenk unique1=792i,unique2=2762i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=792i,twothousand=792i,fivethous=792i,tenthous=792i,odd=184i,even=185i,stringu1="MEAAAA",stringu2="GCEAAA",string4="OOOOxx" 238723200000000000 +tenk unique1=2771i,unique2=2763i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=771i,twothousand=771i,fivethous=2771i,tenthous=2771i,odd=142i,even=143i,stringu1="PCAAAA",stringu2="HCEAAA",string4="VVVVxx" 238809600000000000 +tenk unique1=4313i,unique2=2764i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=313i,twothousand=313i,fivethous=4313i,tenthous=4313i,odd=26i,even=27i,stringu1="XJAAAA",stringu2="ICEAAA",string4="AAAAxx" 238896000000000000 +tenk unique1=9312i,unique2=2765i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=312i,twothousand=1312i,fivethous=4312i,tenthous=9312i,odd=24i,even=25i,stringu1="EUAAAA",stringu2="JCEAAA",string4="HHHHxx" 238982400000000000 +tenk unique1=955i,unique2=2766i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=955i,twothousand=955i,fivethous=955i,tenthous=955i,odd=110i,even=111i,stringu1="TKAAAA",stringu2="KCEAAA",string4="OOOOxx" 239068800000000000 +tenk unique1=6382i,unique2=2767i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=382i,twothousand=382i,fivethous=1382i,tenthous=6382i,odd=164i,even=165i,stringu1="MLAAAA",stringu2="LCEAAA",string4="VVVVxx" 239155200000000000 +tenk unique1=7875i,unique2=2768i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=875i,twothousand=1875i,fivethous=2875i,tenthous=7875i,odd=150i,even=151i,stringu1="XQAAAA",stringu2="MCEAAA",string4="AAAAxx" 239241600000000000 +tenk unique1=7491i,unique2=2769i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=491i,twothousand=1491i,fivethous=2491i,tenthous=7491i,odd=182i,even=183i,stringu1="DCAAAA",stringu2="NCEAAA",string4="HHHHxx" 239328000000000000 +tenk unique1=8193i,unique2=2770i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=193i,twothousand=193i,fivethous=3193i,tenthous=8193i,odd=186i,even=187i,stringu1="DDAAAA",stringu2="OCEAAA",string4="OOOOxx" 239414400000000000 +tenk unique1=968i,unique2=2771i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=968i,twothousand=968i,fivethous=968i,tenthous=968i,odd=136i,even=137i,stringu1="GLAAAA",stringu2="PCEAAA",string4="VVVVxx" 239500800000000000 +tenk unique1=4951i,unique2=2772i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=951i,twothousand=951i,fivethous=4951i,tenthous=4951i,odd=102i,even=103i,stringu1="LIAAAA",stringu2="QCEAAA",string4="AAAAxx" 239587200000000000 +tenk unique1=2204i,unique2=2773i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=204i,twothousand=204i,fivethous=2204i,tenthous=2204i,odd=8i,even=9i,stringu1="UGAAAA",stringu2="RCEAAA",string4="HHHHxx" 239673600000000000 +tenk unique1=2066i,unique2=2774i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=66i,twothousand=66i,fivethous=2066i,tenthous=2066i,odd=132i,even=133i,stringu1="MBAAAA",stringu2="SCEAAA",string4="OOOOxx" 239760000000000000 +tenk unique1=2631i,unique2=2775i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=631i,twothousand=631i,fivethous=2631i,tenthous=2631i,odd=62i,even=63i,stringu1="FXAAAA",stringu2="TCEAAA",string4="VVVVxx" 239846400000000000 +tenk unique1=8947i,unique2=2776i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=947i,twothousand=947i,fivethous=3947i,tenthous=8947i,odd=94i,even=95i,stringu1="DGAAAA",stringu2="UCEAAA",string4="AAAAxx" 239932800000000000 +tenk unique1=8033i,unique2=2777i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=33i,twothousand=33i,fivethous=3033i,tenthous=8033i,odd=66i,even=67i,stringu1="ZWAAAA",stringu2="VCEAAA",string4="HHHHxx" 240019200000000000 +tenk unique1=6264i,unique2=2778i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=264i,twothousand=264i,fivethous=1264i,tenthous=6264i,odd=128i,even=129i,stringu1="YGAAAA",stringu2="WCEAAA",string4="OOOOxx" 240105600000000000 +tenk unique1=7778i,unique2=2779i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=778i,twothousand=1778i,fivethous=2778i,tenthous=7778i,odd=156i,even=157i,stringu1="ENAAAA",stringu2="XCEAAA",string4="VVVVxx" 240192000000000000 +tenk unique1=9701i,unique2=2780i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=701i,twothousand=1701i,fivethous=4701i,tenthous=9701i,odd=2i,even=3i,stringu1="DJAAAA",stringu2="YCEAAA",string4="AAAAxx" 240278400000000000 +tenk unique1=5091i,unique2=2781i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=91i,twothousand=1091i,fivethous=91i,tenthous=5091i,odd=182i,even=183i,stringu1="VNAAAA",stringu2="ZCEAAA",string4="HHHHxx" 240364800000000000 +tenk unique1=7577i,unique2=2782i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=577i,twothousand=1577i,fivethous=2577i,tenthous=7577i,odd=154i,even=155i,stringu1="LFAAAA",stringu2="ADEAAA",string4="OOOOxx" 240451200000000000 +tenk unique1=3345i,unique2=2783i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=345i,twothousand=1345i,fivethous=3345i,tenthous=3345i,odd=90i,even=91i,stringu1="RYAAAA",stringu2="BDEAAA",string4="VVVVxx" 240537600000000000 +tenk unique1=7329i,unique2=2784i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=329i,twothousand=1329i,fivethous=2329i,tenthous=7329i,odd=58i,even=59i,stringu1="XVAAAA",stringu2="CDEAAA",string4="AAAAxx" 240624000000000000 +tenk unique1=7551i,unique2=2785i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=551i,twothousand=1551i,fivethous=2551i,tenthous=7551i,odd=102i,even=103i,stringu1="LEAAAA",stringu2="DDEAAA",string4="HHHHxx" 240710400000000000 +tenk unique1=6207i,unique2=2786i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=207i,twothousand=207i,fivethous=1207i,tenthous=6207i,odd=14i,even=15i,stringu1="TEAAAA",stringu2="EDEAAA",string4="OOOOxx" 240796800000000000 +tenk unique1=8664i,unique2=2787i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=664i,twothousand=664i,fivethous=3664i,tenthous=8664i,odd=128i,even=129i,stringu1="GVAAAA",stringu2="FDEAAA",string4="VVVVxx" 240883200000000000 +tenk unique1=8394i,unique2=2788i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=394i,twothousand=394i,fivethous=3394i,tenthous=8394i,odd=188i,even=189i,stringu1="WKAAAA",stringu2="GDEAAA",string4="AAAAxx" 240969600000000000 +tenk unique1=7324i,unique2=2789i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=324i,twothousand=1324i,fivethous=2324i,tenthous=7324i,odd=48i,even=49i,stringu1="SVAAAA",stringu2="HDEAAA",string4="HHHHxx" 241056000000000000 +tenk unique1=2713i,unique2=2790i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=713i,twothousand=713i,fivethous=2713i,tenthous=2713i,odd=26i,even=27i,stringu1="JAAAAA",stringu2="IDEAAA",string4="OOOOxx" 241142400000000000 +tenk unique1=2230i,unique2=2791i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=230i,twothousand=230i,fivethous=2230i,tenthous=2230i,odd=60i,even=61i,stringu1="UHAAAA",stringu2="JDEAAA",string4="VVVVxx" 241228800000000000 +tenk unique1=9211i,unique2=2792i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=211i,twothousand=1211i,fivethous=4211i,tenthous=9211i,odd=22i,even=23i,stringu1="HQAAAA",stringu2="KDEAAA",string4="AAAAxx" 241315200000000000 +tenk unique1=1296i,unique2=2793i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=296i,twothousand=1296i,fivethous=1296i,tenthous=1296i,odd=192i,even=193i,stringu1="WXAAAA",stringu2="LDEAAA",string4="HHHHxx" 241401600000000000 +tenk unique1=8104i,unique2=2794i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=104i,twothousand=104i,fivethous=3104i,tenthous=8104i,odd=8i,even=9i,stringu1="SZAAAA",stringu2="MDEAAA",string4="OOOOxx" 241488000000000000 +tenk unique1=6916i,unique2=2795i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=916i,twothousand=916i,fivethous=1916i,tenthous=6916i,odd=32i,even=33i,stringu1="AGAAAA",stringu2="NDEAAA",string4="VVVVxx" 241574400000000000 +tenk unique1=2208i,unique2=2796i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=208i,twothousand=208i,fivethous=2208i,tenthous=2208i,odd=16i,even=17i,stringu1="YGAAAA",stringu2="ODEAAA",string4="AAAAxx" 241660800000000000 +tenk unique1=3935i,unique2=2797i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=935i,twothousand=1935i,fivethous=3935i,tenthous=3935i,odd=70i,even=71i,stringu1="JVAAAA",stringu2="PDEAAA",string4="HHHHxx" 241747200000000000 +tenk unique1=7814i,unique2=2798i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=814i,twothousand=1814i,fivethous=2814i,tenthous=7814i,odd=28i,even=29i,stringu1="OOAAAA",stringu2="QDEAAA",string4="OOOOxx" 241833600000000000 +tenk unique1=6508i,unique2=2799i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=508i,twothousand=508i,fivethous=1508i,tenthous=6508i,odd=16i,even=17i,stringu1="IQAAAA",stringu2="RDEAAA",string4="VVVVxx" 241920000000000000 +tenk unique1=1703i,unique2=2800i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=703i,twothousand=1703i,fivethous=1703i,tenthous=1703i,odd=6i,even=7i,stringu1="NNAAAA",stringu2="SDEAAA",string4="AAAAxx" 242006400000000000 +tenk unique1=5640i,unique2=2801i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=640i,twothousand=1640i,fivethous=640i,tenthous=5640i,odd=80i,even=81i,stringu1="YIAAAA",stringu2="TDEAAA",string4="HHHHxx" 242092800000000000 +tenk unique1=6417i,unique2=2802i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=417i,twothousand=417i,fivethous=1417i,tenthous=6417i,odd=34i,even=35i,stringu1="VMAAAA",stringu2="UDEAAA",string4="OOOOxx" 242179200000000000 +tenk unique1=1713i,unique2=2803i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=713i,twothousand=1713i,fivethous=1713i,tenthous=1713i,odd=26i,even=27i,stringu1="XNAAAA",stringu2="VDEAAA",string4="VVVVxx" 242265600000000000 +tenk unique1=5309i,unique2=2804i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=309i,twothousand=1309i,fivethous=309i,tenthous=5309i,odd=18i,even=19i,stringu1="FWAAAA",stringu2="WDEAAA",string4="AAAAxx" 242352000000000000 +tenk unique1=4364i,unique2=2805i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=364i,twothousand=364i,fivethous=4364i,tenthous=4364i,odd=128i,even=129i,stringu1="WLAAAA",stringu2="XDEAAA",string4="HHHHxx" 242438400000000000 +tenk unique1=619i,unique2=2806i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=619i,twothousand=619i,fivethous=619i,tenthous=619i,odd=38i,even=39i,stringu1="VXAAAA",stringu2="YDEAAA",string4="OOOOxx" 242524800000000000 +tenk unique1=9498i,unique2=2807i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=498i,twothousand=1498i,fivethous=4498i,tenthous=9498i,odd=196i,even=197i,stringu1="IBAAAA",stringu2="ZDEAAA",string4="VVVVxx" 242611200000000000 +tenk unique1=2804i,unique2=2808i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=804i,twothousand=804i,fivethous=2804i,tenthous=2804i,odd=8i,even=9i,stringu1="WDAAAA",stringu2="AEEAAA",string4="AAAAxx" 242697600000000000 +tenk unique1=2220i,unique2=2809i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=220i,twothousand=220i,fivethous=2220i,tenthous=2220i,odd=40i,even=41i,stringu1="KHAAAA",stringu2="BEEAAA",string4="HHHHxx" 242784000000000000 +tenk unique1=9542i,unique2=2810i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=542i,twothousand=1542i,fivethous=4542i,tenthous=9542i,odd=84i,even=85i,stringu1="ADAAAA",stringu2="CEEAAA",string4="OOOOxx" 242870400000000000 +tenk unique1=3349i,unique2=2811i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=349i,twothousand=1349i,fivethous=3349i,tenthous=3349i,odd=98i,even=99i,stringu1="VYAAAA",stringu2="DEEAAA",string4="VVVVxx" 242956800000000000 +tenk unique1=9198i,unique2=2812i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=198i,twothousand=1198i,fivethous=4198i,tenthous=9198i,odd=196i,even=197i,stringu1="UPAAAA",stringu2="EEEAAA",string4="AAAAxx" 243043200000000000 +tenk unique1=2727i,unique2=2813i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=727i,twothousand=727i,fivethous=2727i,tenthous=2727i,odd=54i,even=55i,stringu1="XAAAAA",stringu2="FEEAAA",string4="HHHHxx" 243129600000000000 +tenk unique1=3768i,unique2=2814i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=768i,twothousand=1768i,fivethous=3768i,tenthous=3768i,odd=136i,even=137i,stringu1="YOAAAA",stringu2="GEEAAA",string4="OOOOxx" 243216000000000000 +tenk unique1=2334i,unique2=2815i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=334i,twothousand=334i,fivethous=2334i,tenthous=2334i,odd=68i,even=69i,stringu1="ULAAAA",stringu2="HEEAAA",string4="VVVVxx" 243302400000000000 +tenk unique1=7770i,unique2=2816i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=770i,twothousand=1770i,fivethous=2770i,tenthous=7770i,odd=140i,even=141i,stringu1="WMAAAA",stringu2="IEEAAA",string4="AAAAxx" 243388800000000000 +tenk unique1=5963i,unique2=2817i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=963i,twothousand=1963i,fivethous=963i,tenthous=5963i,odd=126i,even=127i,stringu1="JVAAAA",stringu2="JEEAAA",string4="HHHHxx" 243475200000000000 +tenk unique1=4732i,unique2=2818i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=732i,twothousand=732i,fivethous=4732i,tenthous=4732i,odd=64i,even=65i,stringu1="AAAAAA",stringu2="KEEAAA",string4="OOOOxx" 243561600000000000 +tenk unique1=2448i,unique2=2819i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=448i,twothousand=448i,fivethous=2448i,tenthous=2448i,odd=96i,even=97i,stringu1="EQAAAA",stringu2="LEEAAA",string4="VVVVxx" 243648000000000000 +tenk unique1=5998i,unique2=2820i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=998i,twothousand=1998i,fivethous=998i,tenthous=5998i,odd=196i,even=197i,stringu1="SWAAAA",stringu2="MEEAAA",string4="AAAAxx" 243734400000000000 +tenk unique1=8577i,unique2=2821i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=577i,twothousand=577i,fivethous=3577i,tenthous=8577i,odd=154i,even=155i,stringu1="XRAAAA",stringu2="NEEAAA",string4="HHHHxx" 243820800000000000 +tenk unique1=266i,unique2=2822i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=266i,twothousand=266i,fivethous=266i,tenthous=266i,odd=132i,even=133i,stringu1="GKAAAA",stringu2="OEEAAA",string4="OOOOxx" 243907200000000000 +tenk unique1=2169i,unique2=2823i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=169i,twothousand=169i,fivethous=2169i,tenthous=2169i,odd=138i,even=139i,stringu1="LFAAAA",stringu2="PEEAAA",string4="VVVVxx" 243993600000000000 +tenk unique1=8228i,unique2=2824i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=228i,twothousand=228i,fivethous=3228i,tenthous=8228i,odd=56i,even=57i,stringu1="MEAAAA",stringu2="QEEAAA",string4="AAAAxx" 244080000000000000 +tenk unique1=4813i,unique2=2825i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=813i,twothousand=813i,fivethous=4813i,tenthous=4813i,odd=26i,even=27i,stringu1="DDAAAA",stringu2="REEAAA",string4="HHHHxx" 244166400000000000 +tenk unique1=2769i,unique2=2826i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=769i,twothousand=769i,fivethous=2769i,tenthous=2769i,odd=138i,even=139i,stringu1="NCAAAA",stringu2="SEEAAA",string4="OOOOxx" 244252800000000000 +tenk unique1=8382i,unique2=2827i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=382i,twothousand=382i,fivethous=3382i,tenthous=8382i,odd=164i,even=165i,stringu1="KKAAAA",stringu2="TEEAAA",string4="VVVVxx" 244339200000000000 +tenk unique1=1717i,unique2=2828i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=717i,twothousand=1717i,fivethous=1717i,tenthous=1717i,odd=34i,even=35i,stringu1="BOAAAA",stringu2="UEEAAA",string4="AAAAxx" 244425600000000000 +tenk unique1=7178i,unique2=2829i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=178i,twothousand=1178i,fivethous=2178i,tenthous=7178i,odd=156i,even=157i,stringu1="CQAAAA",stringu2="VEEAAA",string4="HHHHxx" 244512000000000000 +tenk unique1=9547i,unique2=2830i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=547i,twothousand=1547i,fivethous=4547i,tenthous=9547i,odd=94i,even=95i,stringu1="FDAAAA",stringu2="WEEAAA",string4="OOOOxx" 244598400000000000 +tenk unique1=8187i,unique2=2831i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=187i,twothousand=187i,fivethous=3187i,tenthous=8187i,odd=174i,even=175i,stringu1="XCAAAA",stringu2="XEEAAA",string4="VVVVxx" 244684800000000000 +tenk unique1=3168i,unique2=2832i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=168i,twothousand=1168i,fivethous=3168i,tenthous=3168i,odd=136i,even=137i,stringu1="WRAAAA",stringu2="YEEAAA",string4="AAAAxx" 244771200000000000 +tenk unique1=2180i,unique2=2833i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=180i,twothousand=180i,fivethous=2180i,tenthous=2180i,odd=160i,even=161i,stringu1="WFAAAA",stringu2="ZEEAAA",string4="HHHHxx" 244857600000000000 +tenk unique1=859i,unique2=2834i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=859i,twothousand=859i,fivethous=859i,tenthous=859i,odd=118i,even=119i,stringu1="BHAAAA",stringu2="AFEAAA",string4="OOOOxx" 244944000000000000 +tenk unique1=1554i,unique2=2835i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=554i,twothousand=1554i,fivethous=1554i,tenthous=1554i,odd=108i,even=109i,stringu1="UHAAAA",stringu2="BFEAAA",string4="VVVVxx" 245030400000000000 +tenk unique1=3567i,unique2=2836i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=567i,twothousand=1567i,fivethous=3567i,tenthous=3567i,odd=134i,even=135i,stringu1="FHAAAA",stringu2="CFEAAA",string4="AAAAxx" 245116800000000000 +tenk unique1=5985i,unique2=2837i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=985i,twothousand=1985i,fivethous=985i,tenthous=5985i,odd=170i,even=171i,stringu1="FWAAAA",stringu2="DFEAAA",string4="HHHHxx" 245203200000000000 +tenk unique1=1i,unique2=2838i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1i,fivethous=1i,tenthous=1i,odd=2i,even=3i,stringu1="BAAAAA",stringu2="EFEAAA",string4="OOOOxx" 245289600000000000 +tenk unique1=5937i,unique2=2839i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=937i,twothousand=1937i,fivethous=937i,tenthous=5937i,odd=74i,even=75i,stringu1="JUAAAA",stringu2="FFEAAA",string4="VVVVxx" 245376000000000000 +tenk unique1=7594i,unique2=2840i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=594i,twothousand=1594i,fivethous=2594i,tenthous=7594i,odd=188i,even=189i,stringu1="CGAAAA",stringu2="GFEAAA",string4="AAAAxx" 245462400000000000 +tenk unique1=3783i,unique2=2841i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=783i,twothousand=1783i,fivethous=3783i,tenthous=3783i,odd=166i,even=167i,stringu1="NPAAAA",stringu2="HFEAAA",string4="HHHHxx" 245548800000000000 +tenk unique1=6841i,unique2=2842i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=841i,twothousand=841i,fivethous=1841i,tenthous=6841i,odd=82i,even=83i,stringu1="DDAAAA",stringu2="IFEAAA",string4="OOOOxx" 245635200000000000 +tenk unique1=9694i,unique2=2843i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=694i,twothousand=1694i,fivethous=4694i,tenthous=9694i,odd=188i,even=189i,stringu1="WIAAAA",stringu2="JFEAAA",string4="VVVVxx" 245721600000000000 +tenk unique1=4322i,unique2=2844i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=322i,twothousand=322i,fivethous=4322i,tenthous=4322i,odd=44i,even=45i,stringu1="GKAAAA",stringu2="KFEAAA",string4="AAAAxx" 245808000000000000 +tenk unique1=6012i,unique2=2845i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=12i,twothousand=12i,fivethous=1012i,tenthous=6012i,odd=24i,even=25i,stringu1="GXAAAA",stringu2="LFEAAA",string4="HHHHxx" 245894400000000000 +tenk unique1=108i,unique2=2846i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=108i,twothousand=108i,fivethous=108i,tenthous=108i,odd=16i,even=17i,stringu1="EEAAAA",stringu2="MFEAAA",string4="OOOOxx" 245980800000000000 +tenk unique1=3396i,unique2=2847i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=396i,twothousand=1396i,fivethous=3396i,tenthous=3396i,odd=192i,even=193i,stringu1="QAAAAA",stringu2="NFEAAA",string4="VVVVxx" 246067200000000000 +tenk unique1=8643i,unique2=2848i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=643i,twothousand=643i,fivethous=3643i,tenthous=8643i,odd=86i,even=87i,stringu1="LUAAAA",stringu2="OFEAAA",string4="AAAAxx" 246153600000000000 +tenk unique1=6087i,unique2=2849i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=87i,twothousand=87i,fivethous=1087i,tenthous=6087i,odd=174i,even=175i,stringu1="DAAAAA",stringu2="PFEAAA",string4="HHHHxx" 246240000000000000 +tenk unique1=2629i,unique2=2850i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=629i,twothousand=629i,fivethous=2629i,tenthous=2629i,odd=58i,even=59i,stringu1="DXAAAA",stringu2="QFEAAA",string4="OOOOxx" 246326400000000000 +tenk unique1=3009i,unique2=2851i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=1009i,fivethous=3009i,tenthous=3009i,odd=18i,even=19i,stringu1="TLAAAA",stringu2="RFEAAA",string4="VVVVxx" 246412800000000000 +tenk unique1=438i,unique2=2852i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=438i,twothousand=438i,fivethous=438i,tenthous=438i,odd=76i,even=77i,stringu1="WQAAAA",stringu2="SFEAAA",string4="AAAAxx" 246499200000000000 +tenk unique1=2480i,unique2=2853i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=480i,twothousand=480i,fivethous=2480i,tenthous=2480i,odd=160i,even=161i,stringu1="KRAAAA",stringu2="TFEAAA",string4="HHHHxx" 246585600000000000 +tenk unique1=936i,unique2=2854i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=936i,twothousand=936i,fivethous=936i,tenthous=936i,odd=72i,even=73i,stringu1="AKAAAA",stringu2="UFEAAA",string4="OOOOxx" 246672000000000000 +tenk unique1=6i,unique2=2855i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=6i,fivethous=6i,tenthous=6i,odd=12i,even=13i,stringu1="GAAAAA",stringu2="VFEAAA",string4="VVVVxx" 246758400000000000 +tenk unique1=768i,unique2=2856i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=768i,twothousand=768i,fivethous=768i,tenthous=768i,odd=136i,even=137i,stringu1="ODAAAA",stringu2="WFEAAA",string4="AAAAxx" 246844800000000000 +tenk unique1=1564i,unique2=2857i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=564i,twothousand=1564i,fivethous=1564i,tenthous=1564i,odd=128i,even=129i,stringu1="EIAAAA",stringu2="XFEAAA",string4="HHHHxx" 246931200000000000 +tenk unique1=3236i,unique2=2858i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=236i,twothousand=1236i,fivethous=3236i,tenthous=3236i,odd=72i,even=73i,stringu1="MUAAAA",stringu2="YFEAAA",string4="OOOOxx" 247017600000000000 +tenk unique1=3932i,unique2=2859i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=932i,twothousand=1932i,fivethous=3932i,tenthous=3932i,odd=64i,even=65i,stringu1="GVAAAA",stringu2="ZFEAAA",string4="VVVVxx" 247104000000000000 +tenk unique1=8914i,unique2=2860i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=914i,twothousand=914i,fivethous=3914i,tenthous=8914i,odd=28i,even=29i,stringu1="WEAAAA",stringu2="AGEAAA",string4="AAAAxx" 247190400000000000 +tenk unique1=119i,unique2=2861i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=119i,twothousand=119i,fivethous=119i,tenthous=119i,odd=38i,even=39i,stringu1="PEAAAA",stringu2="BGEAAA",string4="HHHHxx" 247276800000000000 +tenk unique1=6034i,unique2=2862i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=34i,twothousand=34i,fivethous=1034i,tenthous=6034i,odd=68i,even=69i,stringu1="CYAAAA",stringu2="CGEAAA",string4="OOOOxx" 247363200000000000 +tenk unique1=5384i,unique2=2863i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=384i,twothousand=1384i,fivethous=384i,tenthous=5384i,odd=168i,even=169i,stringu1="CZAAAA",stringu2="DGEAAA",string4="VVVVxx" 247449600000000000 +tenk unique1=6885i,unique2=2864i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=885i,twothousand=885i,fivethous=1885i,tenthous=6885i,odd=170i,even=171i,stringu1="VEAAAA",stringu2="EGEAAA",string4="AAAAxx" 247536000000000000 +tenk unique1=232i,unique2=2865i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=232i,twothousand=232i,fivethous=232i,tenthous=232i,odd=64i,even=65i,stringu1="YIAAAA",stringu2="FGEAAA",string4="HHHHxx" 247622400000000000 +tenk unique1=1293i,unique2=2866i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=293i,twothousand=1293i,fivethous=1293i,tenthous=1293i,odd=186i,even=187i,stringu1="TXAAAA",stringu2="GGEAAA",string4="OOOOxx" 247708800000000000 +tenk unique1=9204i,unique2=2867i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=204i,twothousand=1204i,fivethous=4204i,tenthous=9204i,odd=8i,even=9i,stringu1="AQAAAA",stringu2="HGEAAA",string4="VVVVxx" 247795200000000000 +tenk unique1=527i,unique2=2868i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=527i,twothousand=527i,fivethous=527i,tenthous=527i,odd=54i,even=55i,stringu1="HUAAAA",stringu2="IGEAAA",string4="AAAAxx" 247881600000000000 +tenk unique1=6539i,unique2=2869i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=539i,twothousand=539i,fivethous=1539i,tenthous=6539i,odd=78i,even=79i,stringu1="NRAAAA",stringu2="JGEAAA",string4="HHHHxx" 247968000000000000 +tenk unique1=3679i,unique2=2870i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=679i,twothousand=1679i,fivethous=3679i,tenthous=3679i,odd=158i,even=159i,stringu1="NLAAAA",stringu2="KGEAAA",string4="OOOOxx" 248054400000000000 +tenk unique1=8282i,unique2=2871i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=282i,twothousand=282i,fivethous=3282i,tenthous=8282i,odd=164i,even=165i,stringu1="OGAAAA",stringu2="LGEAAA",string4="VVVVxx" 248140800000000000 +tenk unique1=5027i,unique2=2872i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=27i,twothousand=1027i,fivethous=27i,tenthous=5027i,odd=54i,even=55i,stringu1="JLAAAA",stringu2="MGEAAA",string4="AAAAxx" 248227200000000000 +tenk unique1=7694i,unique2=2873i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=694i,twothousand=1694i,fivethous=2694i,tenthous=7694i,odd=188i,even=189i,stringu1="YJAAAA",stringu2="NGEAAA",string4="HHHHxx" 248313600000000000 +tenk unique1=473i,unique2=2874i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=473i,twothousand=473i,fivethous=473i,tenthous=473i,odd=146i,even=147i,stringu1="FSAAAA",stringu2="OGEAAA",string4="OOOOxx" 248400000000000000 +tenk unique1=6325i,unique2=2875i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=325i,twothousand=325i,fivethous=1325i,tenthous=6325i,odd=50i,even=51i,stringu1="HJAAAA",stringu2="PGEAAA",string4="VVVVxx" 248486400000000000 +tenk unique1=8761i,unique2=2876i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=761i,twothousand=761i,fivethous=3761i,tenthous=8761i,odd=122i,even=123i,stringu1="ZYAAAA",stringu2="QGEAAA",string4="AAAAxx" 248572800000000000 +tenk unique1=6184i,unique2=2877i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=184i,twothousand=184i,fivethous=1184i,tenthous=6184i,odd=168i,even=169i,stringu1="WDAAAA",stringu2="RGEAAA",string4="HHHHxx" 248659200000000000 +tenk unique1=419i,unique2=2878i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=419i,twothousand=419i,fivethous=419i,tenthous=419i,odd=38i,even=39i,stringu1="DQAAAA",stringu2="SGEAAA",string4="OOOOxx" 248745600000000000 +tenk unique1=6111i,unique2=2879i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=111i,twothousand=111i,fivethous=1111i,tenthous=6111i,odd=22i,even=23i,stringu1="BBAAAA",stringu2="TGEAAA",string4="VVVVxx" 248832000000000000 +tenk unique1=3836i,unique2=2880i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=836i,twothousand=1836i,fivethous=3836i,tenthous=3836i,odd=72i,even=73i,stringu1="ORAAAA",stringu2="UGEAAA",string4="AAAAxx" 248918400000000000 +tenk unique1=4086i,unique2=2881i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=86i,twothousand=86i,fivethous=4086i,tenthous=4086i,odd=172i,even=173i,stringu1="EBAAAA",stringu2="VGEAAA",string4="HHHHxx" 249004800000000000 +tenk unique1=5818i,unique2=2882i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=818i,twothousand=1818i,fivethous=818i,tenthous=5818i,odd=36i,even=37i,stringu1="UPAAAA",stringu2="WGEAAA",string4="OOOOxx" 249091200000000000 +tenk unique1=4528i,unique2=2883i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=528i,twothousand=528i,fivethous=4528i,tenthous=4528i,odd=56i,even=57i,stringu1="ESAAAA",stringu2="XGEAAA",string4="VVVVxx" 249177600000000000 +tenk unique1=7199i,unique2=2884i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=199i,twothousand=1199i,fivethous=2199i,tenthous=7199i,odd=198i,even=199i,stringu1="XQAAAA",stringu2="YGEAAA",string4="AAAAxx" 249264000000000000 +tenk unique1=1847i,unique2=2885i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=847i,twothousand=1847i,fivethous=1847i,tenthous=1847i,odd=94i,even=95i,stringu1="BTAAAA",stringu2="ZGEAAA",string4="HHHHxx" 249350400000000000 +tenk unique1=2875i,unique2=2886i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=875i,twothousand=875i,fivethous=2875i,tenthous=2875i,odd=150i,even=151i,stringu1="PGAAAA",stringu2="AHEAAA",string4="OOOOxx" 249436800000000000 +tenk unique1=2872i,unique2=2887i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=872i,twothousand=872i,fivethous=2872i,tenthous=2872i,odd=144i,even=145i,stringu1="MGAAAA",stringu2="BHEAAA",string4="VVVVxx" 249523200000000000 +tenk unique1=3972i,unique2=2888i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=972i,twothousand=1972i,fivethous=3972i,tenthous=3972i,odd=144i,even=145i,stringu1="UWAAAA",stringu2="CHEAAA",string4="AAAAxx" 249609600000000000 +tenk unique1=7590i,unique2=2889i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=590i,twothousand=1590i,fivethous=2590i,tenthous=7590i,odd=180i,even=181i,stringu1="YFAAAA",stringu2="DHEAAA",string4="HHHHxx" 249696000000000000 +tenk unique1=1914i,unique2=2890i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=914i,twothousand=1914i,fivethous=1914i,tenthous=1914i,odd=28i,even=29i,stringu1="QVAAAA",stringu2="EHEAAA",string4="OOOOxx" 249782400000000000 +tenk unique1=1658i,unique2=2891i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=658i,twothousand=1658i,fivethous=1658i,tenthous=1658i,odd=116i,even=117i,stringu1="ULAAAA",stringu2="FHEAAA",string4="VVVVxx" 249868800000000000 +tenk unique1=2126i,unique2=2892i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=126i,twothousand=126i,fivethous=2126i,tenthous=2126i,odd=52i,even=53i,stringu1="UDAAAA",stringu2="GHEAAA",string4="AAAAxx" 249955200000000000 +tenk unique1=645i,unique2=2893i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=645i,twothousand=645i,fivethous=645i,tenthous=645i,odd=90i,even=91i,stringu1="VYAAAA",stringu2="HHEAAA",string4="HHHHxx" 250041600000000000 +tenk unique1=6636i,unique2=2894i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=636i,twothousand=636i,fivethous=1636i,tenthous=6636i,odd=72i,even=73i,stringu1="GVAAAA",stringu2="IHEAAA",string4="OOOOxx" 250128000000000000 +tenk unique1=1469i,unique2=2895i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=469i,twothousand=1469i,fivethous=1469i,tenthous=1469i,odd=138i,even=139i,stringu1="NEAAAA",stringu2="JHEAAA",string4="VVVVxx" 250214400000000000 +tenk unique1=1377i,unique2=2896i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=377i,twothousand=1377i,fivethous=1377i,tenthous=1377i,odd=154i,even=155i,stringu1="ZAAAAA",stringu2="KHEAAA",string4="AAAAxx" 250300800000000000 +tenk unique1=8425i,unique2=2897i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=425i,twothousand=425i,fivethous=3425i,tenthous=8425i,odd=50i,even=51i,stringu1="BMAAAA",stringu2="LHEAAA",string4="HHHHxx" 250387200000000000 +tenk unique1=9300i,unique2=2898i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=300i,twothousand=1300i,fivethous=4300i,tenthous=9300i,odd=0i,even=1i,stringu1="STAAAA",stringu2="MHEAAA",string4="OOOOxx" 250473600000000000 +tenk unique1=5355i,unique2=2899i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=355i,twothousand=1355i,fivethous=355i,tenthous=5355i,odd=110i,even=111i,stringu1="ZXAAAA",stringu2="NHEAAA",string4="VVVVxx" 250560000000000000 +tenk unique1=840i,unique2=2900i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=840i,twothousand=840i,fivethous=840i,tenthous=840i,odd=80i,even=81i,stringu1="IGAAAA",stringu2="OHEAAA",string4="AAAAxx" 250646400000000000 +tenk unique1=5185i,unique2=2901i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=185i,twothousand=1185i,fivethous=185i,tenthous=5185i,odd=170i,even=171i,stringu1="LRAAAA",stringu2="PHEAAA",string4="HHHHxx" 250732800000000000 +tenk unique1=6467i,unique2=2902i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=467i,twothousand=467i,fivethous=1467i,tenthous=6467i,odd=134i,even=135i,stringu1="TOAAAA",stringu2="QHEAAA",string4="OOOOxx" 250819200000000000 +tenk unique1=58i,unique2=2903i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=58i,twothousand=58i,fivethous=58i,tenthous=58i,odd=116i,even=117i,stringu1="GCAAAA",stringu2="RHEAAA",string4="VVVVxx" 250905600000000000 +tenk unique1=5051i,unique2=2904i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=51i,twothousand=1051i,fivethous=51i,tenthous=5051i,odd=102i,even=103i,stringu1="HMAAAA",stringu2="SHEAAA",string4="AAAAxx" 250992000000000000 +tenk unique1=8901i,unique2=2905i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=901i,twothousand=901i,fivethous=3901i,tenthous=8901i,odd=2i,even=3i,stringu1="JEAAAA",stringu2="THEAAA",string4="HHHHxx" 251078400000000000 +tenk unique1=1550i,unique2=2906i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=550i,twothousand=1550i,fivethous=1550i,tenthous=1550i,odd=100i,even=101i,stringu1="QHAAAA",stringu2="UHEAAA",string4="OOOOxx" 251164800000000000 +tenk unique1=1698i,unique2=2907i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=698i,twothousand=1698i,fivethous=1698i,tenthous=1698i,odd=196i,even=197i,stringu1="INAAAA",stringu2="VHEAAA",string4="VVVVxx" 251251200000000000 +tenk unique1=802i,unique2=2908i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=802i,twothousand=802i,fivethous=802i,tenthous=802i,odd=4i,even=5i,stringu1="WEAAAA",stringu2="WHEAAA",string4="AAAAxx" 251337600000000000 +tenk unique1=2440i,unique2=2909i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=440i,twothousand=440i,fivethous=2440i,tenthous=2440i,odd=80i,even=81i,stringu1="WPAAAA",stringu2="XHEAAA",string4="HHHHxx" 251424000000000000 +tenk unique1=2260i,unique2=2910i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=260i,twothousand=260i,fivethous=2260i,tenthous=2260i,odd=120i,even=121i,stringu1="YIAAAA",stringu2="YHEAAA",string4="OOOOxx" 251510400000000000 +tenk unique1=8218i,unique2=2911i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=218i,twothousand=218i,fivethous=3218i,tenthous=8218i,odd=36i,even=37i,stringu1="CEAAAA",stringu2="ZHEAAA",string4="VVVVxx" 251596800000000000 +tenk unique1=5144i,unique2=2912i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=144i,twothousand=1144i,fivethous=144i,tenthous=5144i,odd=88i,even=89i,stringu1="WPAAAA",stringu2="AIEAAA",string4="AAAAxx" 251683200000000000 +tenk unique1=4822i,unique2=2913i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=822i,twothousand=822i,fivethous=4822i,tenthous=4822i,odd=44i,even=45i,stringu1="MDAAAA",stringu2="BIEAAA",string4="HHHHxx" 251769600000000000 +tenk unique1=9476i,unique2=2914i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=476i,twothousand=1476i,fivethous=4476i,tenthous=9476i,odd=152i,even=153i,stringu1="MAAAAA",stringu2="CIEAAA",string4="OOOOxx" 251856000000000000 +tenk unique1=7535i,unique2=2915i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=535i,twothousand=1535i,fivethous=2535i,tenthous=7535i,odd=70i,even=71i,stringu1="VDAAAA",stringu2="DIEAAA",string4="VVVVxx" 251942400000000000 +tenk unique1=8738i,unique2=2916i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=738i,twothousand=738i,fivethous=3738i,tenthous=8738i,odd=76i,even=77i,stringu1="CYAAAA",stringu2="EIEAAA",string4="AAAAxx" 252028800000000000 +tenk unique1=7946i,unique2=2917i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=946i,twothousand=1946i,fivethous=2946i,tenthous=7946i,odd=92i,even=93i,stringu1="QTAAAA",stringu2="FIEAAA",string4="HHHHxx" 252115200000000000 +tenk unique1=8143i,unique2=2918i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=143i,twothousand=143i,fivethous=3143i,tenthous=8143i,odd=86i,even=87i,stringu1="FBAAAA",stringu2="GIEAAA",string4="OOOOxx" 252201600000000000 +tenk unique1=2623i,unique2=2919i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=623i,twothousand=623i,fivethous=2623i,tenthous=2623i,odd=46i,even=47i,stringu1="XWAAAA",stringu2="HIEAAA",string4="VVVVxx" 252288000000000000 +tenk unique1=5209i,unique2=2920i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=209i,twothousand=1209i,fivethous=209i,tenthous=5209i,odd=18i,even=19i,stringu1="JSAAAA",stringu2="IIEAAA",string4="AAAAxx" 252374400000000000 +tenk unique1=7674i,unique2=2921i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=674i,twothousand=1674i,fivethous=2674i,tenthous=7674i,odd=148i,even=149i,stringu1="EJAAAA",stringu2="JIEAAA",string4="HHHHxx" 252460800000000000 +tenk unique1=1135i,unique2=2922i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=135i,twothousand=1135i,fivethous=1135i,tenthous=1135i,odd=70i,even=71i,stringu1="RRAAAA",stringu2="KIEAAA",string4="OOOOxx" 252547200000000000 +tenk unique1=424i,unique2=2923i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=424i,twothousand=424i,fivethous=424i,tenthous=424i,odd=48i,even=49i,stringu1="IQAAAA",stringu2="LIEAAA",string4="VVVVxx" 252633600000000000 +tenk unique1=942i,unique2=2924i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=942i,twothousand=942i,fivethous=942i,tenthous=942i,odd=84i,even=85i,stringu1="GKAAAA",stringu2="MIEAAA",string4="AAAAxx" 252720000000000000 +tenk unique1=7813i,unique2=2925i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=813i,twothousand=1813i,fivethous=2813i,tenthous=7813i,odd=26i,even=27i,stringu1="NOAAAA",stringu2="NIEAAA",string4="HHHHxx" 252806400000000000 +tenk unique1=3539i,unique2=2926i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=539i,twothousand=1539i,fivethous=3539i,tenthous=3539i,odd=78i,even=79i,stringu1="DGAAAA",stringu2="OIEAAA",string4="OOOOxx" 252892800000000000 +tenk unique1=2909i,unique2=2927i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=909i,twothousand=909i,fivethous=2909i,tenthous=2909i,odd=18i,even=19i,stringu1="XHAAAA",stringu2="PIEAAA",string4="VVVVxx" 252979200000000000 +tenk unique1=3748i,unique2=2928i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=748i,twothousand=1748i,fivethous=3748i,tenthous=3748i,odd=96i,even=97i,stringu1="EOAAAA",stringu2="QIEAAA",string4="AAAAxx" 253065600000000000 +tenk unique1=2996i,unique2=2929i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=996i,twothousand=996i,fivethous=2996i,tenthous=2996i,odd=192i,even=193i,stringu1="GLAAAA",stringu2="RIEAAA",string4="HHHHxx" 253152000000000000 +tenk unique1=1869i,unique2=2930i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=869i,twothousand=1869i,fivethous=1869i,tenthous=1869i,odd=138i,even=139i,stringu1="XTAAAA",stringu2="SIEAAA",string4="OOOOxx" 253238400000000000 +tenk unique1=8151i,unique2=2931i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=151i,twothousand=151i,fivethous=3151i,tenthous=8151i,odd=102i,even=103i,stringu1="NBAAAA",stringu2="TIEAAA",string4="VVVVxx" 253324800000000000 +tenk unique1=6361i,unique2=2932i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=361i,twothousand=361i,fivethous=1361i,tenthous=6361i,odd=122i,even=123i,stringu1="RKAAAA",stringu2="UIEAAA",string4="AAAAxx" 253411200000000000 +tenk unique1=5568i,unique2=2933i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=568i,twothousand=1568i,fivethous=568i,tenthous=5568i,odd=136i,even=137i,stringu1="EGAAAA",stringu2="VIEAAA",string4="HHHHxx" 253497600000000000 +tenk unique1=2796i,unique2=2934i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=796i,twothousand=796i,fivethous=2796i,tenthous=2796i,odd=192i,even=193i,stringu1="ODAAAA",stringu2="WIEAAA",string4="OOOOxx" 253584000000000000 +tenk unique1=8489i,unique2=2935i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=489i,twothousand=489i,fivethous=3489i,tenthous=8489i,odd=178i,even=179i,stringu1="NOAAAA",stringu2="XIEAAA",string4="VVVVxx" 253670400000000000 +tenk unique1=9183i,unique2=2936i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=183i,twothousand=1183i,fivethous=4183i,tenthous=9183i,odd=166i,even=167i,stringu1="FPAAAA",stringu2="YIEAAA",string4="AAAAxx" 253756800000000000 +tenk unique1=8227i,unique2=2937i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=227i,twothousand=227i,fivethous=3227i,tenthous=8227i,odd=54i,even=55i,stringu1="LEAAAA",stringu2="ZIEAAA",string4="HHHHxx" 253843200000000000 +tenk unique1=1844i,unique2=2938i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=844i,twothousand=1844i,fivethous=1844i,tenthous=1844i,odd=88i,even=89i,stringu1="YSAAAA",stringu2="AJEAAA",string4="OOOOxx" 253929600000000000 +tenk unique1=3975i,unique2=2939i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=975i,twothousand=1975i,fivethous=3975i,tenthous=3975i,odd=150i,even=151i,stringu1="XWAAAA",stringu2="BJEAAA",string4="VVVVxx" 254016000000000000 +tenk unique1=6490i,unique2=2940i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=490i,twothousand=490i,fivethous=1490i,tenthous=6490i,odd=180i,even=181i,stringu1="QPAAAA",stringu2="CJEAAA",string4="AAAAxx" 254102400000000000 +tenk unique1=8303i,unique2=2941i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=303i,twothousand=303i,fivethous=3303i,tenthous=8303i,odd=6i,even=7i,stringu1="JHAAAA",stringu2="DJEAAA",string4="HHHHxx" 254188800000000000 +tenk unique1=7334i,unique2=2942i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=334i,twothousand=1334i,fivethous=2334i,tenthous=7334i,odd=68i,even=69i,stringu1="CWAAAA",stringu2="EJEAAA",string4="OOOOxx" 254275200000000000 +tenk unique1=2382i,unique2=2943i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=382i,twothousand=382i,fivethous=2382i,tenthous=2382i,odd=164i,even=165i,stringu1="QNAAAA",stringu2="FJEAAA",string4="VVVVxx" 254361600000000000 +tenk unique1=177i,unique2=2944i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=177i,twothousand=177i,fivethous=177i,tenthous=177i,odd=154i,even=155i,stringu1="VGAAAA",stringu2="GJEAAA",string4="AAAAxx" 254448000000000000 +tenk unique1=8117i,unique2=2945i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=117i,twothousand=117i,fivethous=3117i,tenthous=8117i,odd=34i,even=35i,stringu1="FAAAAA",stringu2="HJEAAA",string4="HHHHxx" 254534400000000000 +tenk unique1=5485i,unique2=2946i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=485i,twothousand=1485i,fivethous=485i,tenthous=5485i,odd=170i,even=171i,stringu1="ZCAAAA",stringu2="IJEAAA",string4="OOOOxx" 254620800000000000 +tenk unique1=6544i,unique2=2947i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=544i,twothousand=544i,fivethous=1544i,tenthous=6544i,odd=88i,even=89i,stringu1="SRAAAA",stringu2="JJEAAA",string4="VVVVxx" 254707200000000000 +tenk unique1=8517i,unique2=2948i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=517i,twothousand=517i,fivethous=3517i,tenthous=8517i,odd=34i,even=35i,stringu1="PPAAAA",stringu2="KJEAAA",string4="AAAAxx" 254793600000000000 +tenk unique1=2252i,unique2=2949i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=252i,twothousand=252i,fivethous=2252i,tenthous=2252i,odd=104i,even=105i,stringu1="QIAAAA",stringu2="LJEAAA",string4="HHHHxx" 254880000000000000 +tenk unique1=4480i,unique2=2950i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=480i,twothousand=480i,fivethous=4480i,tenthous=4480i,odd=160i,even=161i,stringu1="IQAAAA",stringu2="MJEAAA",string4="OOOOxx" 254966400000000000 +tenk unique1=4785i,unique2=2951i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=785i,twothousand=785i,fivethous=4785i,tenthous=4785i,odd=170i,even=171i,stringu1="BCAAAA",stringu2="NJEAAA",string4="VVVVxx" 255052800000000000 +tenk unique1=9700i,unique2=2952i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=700i,twothousand=1700i,fivethous=4700i,tenthous=9700i,odd=0i,even=1i,stringu1="CJAAAA",stringu2="OJEAAA",string4="AAAAxx" 255139200000000000 +tenk unique1=2122i,unique2=2953i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=122i,twothousand=122i,fivethous=2122i,tenthous=2122i,odd=44i,even=45i,stringu1="QDAAAA",stringu2="PJEAAA",string4="HHHHxx" 255225600000000000 +tenk unique1=8783i,unique2=2954i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=783i,twothousand=783i,fivethous=3783i,tenthous=8783i,odd=166i,even=167i,stringu1="VZAAAA",stringu2="QJEAAA",string4="OOOOxx" 255312000000000000 +tenk unique1=1453i,unique2=2955i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=453i,twothousand=1453i,fivethous=1453i,tenthous=1453i,odd=106i,even=107i,stringu1="XDAAAA",stringu2="RJEAAA",string4="VVVVxx" 255398400000000000 +tenk unique1=3908i,unique2=2956i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=908i,twothousand=1908i,fivethous=3908i,tenthous=3908i,odd=16i,even=17i,stringu1="IUAAAA",stringu2="SJEAAA",string4="AAAAxx" 255484800000000000 +tenk unique1=7707i,unique2=2957i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=707i,twothousand=1707i,fivethous=2707i,tenthous=7707i,odd=14i,even=15i,stringu1="LKAAAA",stringu2="TJEAAA",string4="HHHHxx" 255571200000000000 +tenk unique1=9049i,unique2=2958i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=49i,twothousand=1049i,fivethous=4049i,tenthous=9049i,odd=98i,even=99i,stringu1="BKAAAA",stringu2="UJEAAA",string4="OOOOxx" 255657600000000000 +tenk unique1=654i,unique2=2959i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=654i,twothousand=654i,fivethous=654i,tenthous=654i,odd=108i,even=109i,stringu1="EZAAAA",stringu2="VJEAAA",string4="VVVVxx" 255744000000000000 +tenk unique1=3336i,unique2=2960i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=336i,twothousand=1336i,fivethous=3336i,tenthous=3336i,odd=72i,even=73i,stringu1="IYAAAA",stringu2="WJEAAA",string4="AAAAxx" 255830400000000000 +tenk unique1=622i,unique2=2961i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=622i,twothousand=622i,fivethous=622i,tenthous=622i,odd=44i,even=45i,stringu1="YXAAAA",stringu2="XJEAAA",string4="HHHHxx" 255916800000000000 +tenk unique1=8398i,unique2=2962i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=398i,twothousand=398i,fivethous=3398i,tenthous=8398i,odd=196i,even=197i,stringu1="ALAAAA",stringu2="YJEAAA",string4="OOOOxx" 256003200000000000 +tenk unique1=9193i,unique2=2963i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=193i,twothousand=1193i,fivethous=4193i,tenthous=9193i,odd=186i,even=187i,stringu1="PPAAAA",stringu2="ZJEAAA",string4="VVVVxx" 256089600000000000 +tenk unique1=7896i,unique2=2964i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=896i,twothousand=1896i,fivethous=2896i,tenthous=7896i,odd=192i,even=193i,stringu1="SRAAAA",stringu2="AKEAAA",string4="AAAAxx" 256176000000000000 +tenk unique1=9798i,unique2=2965i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=798i,twothousand=1798i,fivethous=4798i,tenthous=9798i,odd=196i,even=197i,stringu1="WMAAAA",stringu2="BKEAAA",string4="HHHHxx" 256262400000000000 +tenk unique1=2881i,unique2=2966i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=881i,twothousand=881i,fivethous=2881i,tenthous=2881i,odd=162i,even=163i,stringu1="VGAAAA",stringu2="CKEAAA",string4="OOOOxx" 256348800000000000 +tenk unique1=672i,unique2=2967i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=672i,twothousand=672i,fivethous=672i,tenthous=672i,odd=144i,even=145i,stringu1="WZAAAA",stringu2="DKEAAA",string4="VVVVxx" 256435200000000000 +tenk unique1=6743i,unique2=2968i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=743i,twothousand=743i,fivethous=1743i,tenthous=6743i,odd=86i,even=87i,stringu1="JZAAAA",stringu2="EKEAAA",string4="AAAAxx" 256521600000000000 +tenk unique1=8935i,unique2=2969i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=935i,twothousand=935i,fivethous=3935i,tenthous=8935i,odd=70i,even=71i,stringu1="RFAAAA",stringu2="FKEAAA",string4="HHHHxx" 256608000000000000 +tenk unique1=2426i,unique2=2970i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=426i,twothousand=426i,fivethous=2426i,tenthous=2426i,odd=52i,even=53i,stringu1="IPAAAA",stringu2="GKEAAA",string4="OOOOxx" 256694400000000000 +tenk unique1=722i,unique2=2971i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=722i,twothousand=722i,fivethous=722i,tenthous=722i,odd=44i,even=45i,stringu1="UBAAAA",stringu2="HKEAAA",string4="VVVVxx" 256780800000000000 +tenk unique1=5088i,unique2=2972i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=88i,twothousand=1088i,fivethous=88i,tenthous=5088i,odd=176i,even=177i,stringu1="SNAAAA",stringu2="IKEAAA",string4="AAAAxx" 256867200000000000 +tenk unique1=8677i,unique2=2973i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=677i,twothousand=677i,fivethous=3677i,tenthous=8677i,odd=154i,even=155i,stringu1="TVAAAA",stringu2="JKEAAA",string4="HHHHxx" 256953600000000000 +tenk unique1=6963i,unique2=2974i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=963i,twothousand=963i,fivethous=1963i,tenthous=6963i,odd=126i,even=127i,stringu1="VHAAAA",stringu2="KKEAAA",string4="OOOOxx" 257040000000000000 +tenk unique1=1653i,unique2=2975i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=653i,twothousand=1653i,fivethous=1653i,tenthous=1653i,odd=106i,even=107i,stringu1="PLAAAA",stringu2="LKEAAA",string4="VVVVxx" 257126400000000000 +tenk unique1=7295i,unique2=2976i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=295i,twothousand=1295i,fivethous=2295i,tenthous=7295i,odd=190i,even=191i,stringu1="PUAAAA",stringu2="MKEAAA",string4="AAAAxx" 257212800000000000 +tenk unique1=6675i,unique2=2977i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=675i,twothousand=675i,fivethous=1675i,tenthous=6675i,odd=150i,even=151i,stringu1="TWAAAA",stringu2="NKEAAA",string4="HHHHxx" 257299200000000000 +tenk unique1=7183i,unique2=2978i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=183i,twothousand=1183i,fivethous=2183i,tenthous=7183i,odd=166i,even=167i,stringu1="HQAAAA",stringu2="OKEAAA",string4="OOOOxx" 257385600000000000 +tenk unique1=4378i,unique2=2979i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=378i,twothousand=378i,fivethous=4378i,tenthous=4378i,odd=156i,even=157i,stringu1="KMAAAA",stringu2="PKEAAA",string4="VVVVxx" 257472000000000000 +tenk unique1=2157i,unique2=2980i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=157i,twothousand=157i,fivethous=2157i,tenthous=2157i,odd=114i,even=115i,stringu1="ZEAAAA",stringu2="QKEAAA",string4="AAAAxx" 257558400000000000 +tenk unique1=2621i,unique2=2981i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=621i,twothousand=621i,fivethous=2621i,tenthous=2621i,odd=42i,even=43i,stringu1="VWAAAA",stringu2="RKEAAA",string4="HHHHxx" 257644800000000000 +tenk unique1=9278i,unique2=2982i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=278i,twothousand=1278i,fivethous=4278i,tenthous=9278i,odd=156i,even=157i,stringu1="WSAAAA",stringu2="SKEAAA",string4="OOOOxx" 257731200000000000 +tenk unique1=79i,unique2=2983i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=79i,twothousand=79i,fivethous=79i,tenthous=79i,odd=158i,even=159i,stringu1="BDAAAA",stringu2="TKEAAA",string4="VVVVxx" 257817600000000000 +tenk unique1=7358i,unique2=2984i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=358i,twothousand=1358i,fivethous=2358i,tenthous=7358i,odd=116i,even=117i,stringu1="AXAAAA",stringu2="UKEAAA",string4="AAAAxx" 257904000000000000 +tenk unique1=3589i,unique2=2985i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=589i,twothousand=1589i,fivethous=3589i,tenthous=3589i,odd=178i,even=179i,stringu1="BIAAAA",stringu2="VKEAAA",string4="HHHHxx" 257990400000000000 +tenk unique1=1254i,unique2=2986i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=254i,twothousand=1254i,fivethous=1254i,tenthous=1254i,odd=108i,even=109i,stringu1="GWAAAA",stringu2="WKEAAA",string4="OOOOxx" 258076800000000000 +tenk unique1=3490i,unique2=2987i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=490i,twothousand=1490i,fivethous=3490i,tenthous=3490i,odd=180i,even=181i,stringu1="GEAAAA",stringu2="XKEAAA",string4="VVVVxx" 258163200000000000 +tenk unique1=7533i,unique2=2988i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=533i,twothousand=1533i,fivethous=2533i,tenthous=7533i,odd=66i,even=67i,stringu1="TDAAAA",stringu2="YKEAAA",string4="AAAAxx" 258249600000000000 +tenk unique1=2800i,unique2=2989i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=800i,twothousand=800i,fivethous=2800i,tenthous=2800i,odd=0i,even=1i,stringu1="SDAAAA",stringu2="ZKEAAA",string4="HHHHxx" 258336000000000000 +tenk unique1=351i,unique2=2990i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=351i,twothousand=351i,fivethous=351i,tenthous=351i,odd=102i,even=103i,stringu1="NNAAAA",stringu2="ALEAAA",string4="OOOOxx" 258422400000000000 +tenk unique1=4359i,unique2=2991i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=359i,twothousand=359i,fivethous=4359i,tenthous=4359i,odd=118i,even=119i,stringu1="RLAAAA",stringu2="BLEAAA",string4="VVVVxx" 258508800000000000 +tenk unique1=5788i,unique2=2992i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=788i,twothousand=1788i,fivethous=788i,tenthous=5788i,odd=176i,even=177i,stringu1="QOAAAA",stringu2="CLEAAA",string4="AAAAxx" 258595200000000000 +tenk unique1=5521i,unique2=2993i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=521i,twothousand=1521i,fivethous=521i,tenthous=5521i,odd=42i,even=43i,stringu1="JEAAAA",stringu2="DLEAAA",string4="HHHHxx" 258681600000000000 +tenk unique1=3351i,unique2=2994i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=351i,twothousand=1351i,fivethous=3351i,tenthous=3351i,odd=102i,even=103i,stringu1="XYAAAA",stringu2="ELEAAA",string4="OOOOxx" 258768000000000000 +tenk unique1=5129i,unique2=2995i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=129i,twothousand=1129i,fivethous=129i,tenthous=5129i,odd=58i,even=59i,stringu1="HPAAAA",stringu2="FLEAAA",string4="VVVVxx" 258854400000000000 +tenk unique1=315i,unique2=2996i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=315i,twothousand=315i,fivethous=315i,tenthous=315i,odd=30i,even=31i,stringu1="DMAAAA",stringu2="GLEAAA",string4="AAAAxx" 258940800000000000 +tenk unique1=7552i,unique2=2997i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=552i,twothousand=1552i,fivethous=2552i,tenthous=7552i,odd=104i,even=105i,stringu1="MEAAAA",stringu2="HLEAAA",string4="HHHHxx" 259027200000000000 +tenk unique1=9176i,unique2=2998i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=176i,twothousand=1176i,fivethous=4176i,tenthous=9176i,odd=152i,even=153i,stringu1="YOAAAA",stringu2="ILEAAA",string4="OOOOxx" 259113600000000000 +tenk unique1=7458i,unique2=2999i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=458i,twothousand=1458i,fivethous=2458i,tenthous=7458i,odd=116i,even=117i,stringu1="WAAAAA",stringu2="JLEAAA",string4="VVVVxx" 259200000000000000 +tenk unique1=279i,unique2=3000i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=279i,twothousand=279i,fivethous=279i,tenthous=279i,odd=158i,even=159i,stringu1="TKAAAA",stringu2="KLEAAA",string4="AAAAxx" 259286400000000000 +tenk unique1=738i,unique2=3001i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=738i,twothousand=738i,fivethous=738i,tenthous=738i,odd=76i,even=77i,stringu1="KCAAAA",stringu2="LLEAAA",string4="HHHHxx" 259372800000000000 +tenk unique1=2557i,unique2=3002i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=557i,twothousand=557i,fivethous=2557i,tenthous=2557i,odd=114i,even=115i,stringu1="JUAAAA",stringu2="MLEAAA",string4="OOOOxx" 259459200000000000 +tenk unique1=9395i,unique2=3003i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=395i,twothousand=1395i,fivethous=4395i,tenthous=9395i,odd=190i,even=191i,stringu1="JXAAAA",stringu2="NLEAAA",string4="VVVVxx" 259545600000000000 +tenk unique1=7214i,unique2=3004i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=214i,twothousand=1214i,fivethous=2214i,tenthous=7214i,odd=28i,even=29i,stringu1="MRAAAA",stringu2="OLEAAA",string4="AAAAxx" 259632000000000000 +tenk unique1=6354i,unique2=3005i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=354i,twothousand=354i,fivethous=1354i,tenthous=6354i,odd=108i,even=109i,stringu1="KKAAAA",stringu2="PLEAAA",string4="HHHHxx" 259718400000000000 +tenk unique1=4799i,unique2=3006i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=799i,twothousand=799i,fivethous=4799i,tenthous=4799i,odd=198i,even=199i,stringu1="PCAAAA",stringu2="QLEAAA",string4="OOOOxx" 259804800000000000 +tenk unique1=1231i,unique2=3007i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=231i,twothousand=1231i,fivethous=1231i,tenthous=1231i,odd=62i,even=63i,stringu1="JVAAAA",stringu2="RLEAAA",string4="VVVVxx" 259891200000000000 +tenk unique1=5252i,unique2=3008i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=252i,twothousand=1252i,fivethous=252i,tenthous=5252i,odd=104i,even=105i,stringu1="AUAAAA",stringu2="SLEAAA",string4="AAAAxx" 259977600000000000 +tenk unique1=5250i,unique2=3009i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=250i,twothousand=1250i,fivethous=250i,tenthous=5250i,odd=100i,even=101i,stringu1="YTAAAA",stringu2="TLEAAA",string4="HHHHxx" 260064000000000000 +tenk unique1=9319i,unique2=3010i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=319i,twothousand=1319i,fivethous=4319i,tenthous=9319i,odd=38i,even=39i,stringu1="LUAAAA",stringu2="ULEAAA",string4="OOOOxx" 260150400000000000 +tenk unique1=1724i,unique2=3011i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=724i,twothousand=1724i,fivethous=1724i,tenthous=1724i,odd=48i,even=49i,stringu1="IOAAAA",stringu2="VLEAAA",string4="VVVVxx" 260236800000000000 +tenk unique1=7947i,unique2=3012i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=947i,twothousand=1947i,fivethous=2947i,tenthous=7947i,odd=94i,even=95i,stringu1="RTAAAA",stringu2="WLEAAA",string4="AAAAxx" 260323200000000000 +tenk unique1=1105i,unique2=3013i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=105i,twothousand=1105i,fivethous=1105i,tenthous=1105i,odd=10i,even=11i,stringu1="NQAAAA",stringu2="XLEAAA",string4="HHHHxx" 260409600000000000 +tenk unique1=1417i,unique2=3014i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=417i,twothousand=1417i,fivethous=1417i,tenthous=1417i,odd=34i,even=35i,stringu1="NCAAAA",stringu2="YLEAAA",string4="OOOOxx" 260496000000000000 +tenk unique1=7101i,unique2=3015i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=101i,twothousand=1101i,fivethous=2101i,tenthous=7101i,odd=2i,even=3i,stringu1="DNAAAA",stringu2="ZLEAAA",string4="VVVVxx" 260582400000000000 +tenk unique1=1088i,unique2=3016i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=88i,twothousand=1088i,fivethous=1088i,tenthous=1088i,odd=176i,even=177i,stringu1="WPAAAA",stringu2="AMEAAA",string4="AAAAxx" 260668800000000000 +tenk unique1=979i,unique2=3017i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=979i,twothousand=979i,fivethous=979i,tenthous=979i,odd=158i,even=159i,stringu1="RLAAAA",stringu2="BMEAAA",string4="HHHHxx" 260755200000000000 +tenk unique1=7589i,unique2=3018i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=589i,twothousand=1589i,fivethous=2589i,tenthous=7589i,odd=178i,even=179i,stringu1="XFAAAA",stringu2="CMEAAA",string4="OOOOxx" 260841600000000000 +tenk unique1=8952i,unique2=3019i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=952i,twothousand=952i,fivethous=3952i,tenthous=8952i,odd=104i,even=105i,stringu1="IGAAAA",stringu2="DMEAAA",string4="VVVVxx" 260928000000000000 +tenk unique1=2864i,unique2=3020i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=864i,twothousand=864i,fivethous=2864i,tenthous=2864i,odd=128i,even=129i,stringu1="EGAAAA",stringu2="EMEAAA",string4="AAAAxx" 261014400000000000 +tenk unique1=234i,unique2=3021i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=234i,twothousand=234i,fivethous=234i,tenthous=234i,odd=68i,even=69i,stringu1="AJAAAA",stringu2="FMEAAA",string4="HHHHxx" 261100800000000000 +tenk unique1=7231i,unique2=3022i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=231i,twothousand=1231i,fivethous=2231i,tenthous=7231i,odd=62i,even=63i,stringu1="DSAAAA",stringu2="GMEAAA",string4="OOOOxx" 261187200000000000 +tenk unique1=6792i,unique2=3023i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=792i,twothousand=792i,fivethous=1792i,tenthous=6792i,odd=184i,even=185i,stringu1="GBAAAA",stringu2="HMEAAA",string4="VVVVxx" 261273600000000000 +tenk unique1=4311i,unique2=3024i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=311i,twothousand=311i,fivethous=4311i,tenthous=4311i,odd=22i,even=23i,stringu1="VJAAAA",stringu2="IMEAAA",string4="AAAAxx" 261360000000000000 +tenk unique1=3374i,unique2=3025i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=374i,twothousand=1374i,fivethous=3374i,tenthous=3374i,odd=148i,even=149i,stringu1="UZAAAA",stringu2="JMEAAA",string4="HHHHxx" 261446400000000000 +tenk unique1=3367i,unique2=3026i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=367i,twothousand=1367i,fivethous=3367i,tenthous=3367i,odd=134i,even=135i,stringu1="NZAAAA",stringu2="KMEAAA",string4="OOOOxx" 261532800000000000 +tenk unique1=2598i,unique2=3027i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=598i,twothousand=598i,fivethous=2598i,tenthous=2598i,odd=196i,even=197i,stringu1="YVAAAA",stringu2="LMEAAA",string4="VVVVxx" 261619200000000000 +tenk unique1=1033i,unique2=3028i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=33i,twothousand=1033i,fivethous=1033i,tenthous=1033i,odd=66i,even=67i,stringu1="TNAAAA",stringu2="MMEAAA",string4="AAAAxx" 261705600000000000 +tenk unique1=7803i,unique2=3029i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=803i,twothousand=1803i,fivethous=2803i,tenthous=7803i,odd=6i,even=7i,stringu1="DOAAAA",stringu2="NMEAAA",string4="HHHHxx" 261792000000000000 +tenk unique1=3870i,unique2=3030i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=870i,twothousand=1870i,fivethous=3870i,tenthous=3870i,odd=140i,even=141i,stringu1="WSAAAA",stringu2="OMEAAA",string4="OOOOxx" 261878400000000000 +tenk unique1=4962i,unique2=3031i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=962i,twothousand=962i,fivethous=4962i,tenthous=4962i,odd=124i,even=125i,stringu1="WIAAAA",stringu2="PMEAAA",string4="VVVVxx" 261964800000000000 +tenk unique1=4842i,unique2=3032i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=842i,twothousand=842i,fivethous=4842i,tenthous=4842i,odd=84i,even=85i,stringu1="GEAAAA",stringu2="QMEAAA",string4="AAAAxx" 262051200000000000 +tenk unique1=8814i,unique2=3033i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=814i,twothousand=814i,fivethous=3814i,tenthous=8814i,odd=28i,even=29i,stringu1="ABAAAA",stringu2="RMEAAA",string4="HHHHxx" 262137600000000000 +tenk unique1=3429i,unique2=3034i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=429i,twothousand=1429i,fivethous=3429i,tenthous=3429i,odd=58i,even=59i,stringu1="XBAAAA",stringu2="SMEAAA",string4="OOOOxx" 262224000000000000 +tenk unique1=6550i,unique2=3035i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=550i,twothousand=550i,fivethous=1550i,tenthous=6550i,odd=100i,even=101i,stringu1="YRAAAA",stringu2="TMEAAA",string4="VVVVxx" 262310400000000000 +tenk unique1=6317i,unique2=3036i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=317i,twothousand=317i,fivethous=1317i,tenthous=6317i,odd=34i,even=35i,stringu1="ZIAAAA",stringu2="UMEAAA",string4="AAAAxx" 262396800000000000 +tenk unique1=5023i,unique2=3037i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=23i,twothousand=1023i,fivethous=23i,tenthous=5023i,odd=46i,even=47i,stringu1="FLAAAA",stringu2="VMEAAA",string4="HHHHxx" 262483200000000000 +tenk unique1=5825i,unique2=3038i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=825i,twothousand=1825i,fivethous=825i,tenthous=5825i,odd=50i,even=51i,stringu1="BQAAAA",stringu2="WMEAAA",string4="OOOOxx" 262569600000000000 +tenk unique1=5297i,unique2=3039i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=297i,twothousand=1297i,fivethous=297i,tenthous=5297i,odd=194i,even=195i,stringu1="TVAAAA",stringu2="XMEAAA",string4="VVVVxx" 262656000000000000 +tenk unique1=8764i,unique2=3040i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=764i,twothousand=764i,fivethous=3764i,tenthous=8764i,odd=128i,even=129i,stringu1="CZAAAA",stringu2="YMEAAA",string4="AAAAxx" 262742400000000000 +tenk unique1=5084i,unique2=3041i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=84i,twothousand=1084i,fivethous=84i,tenthous=5084i,odd=168i,even=169i,stringu1="ONAAAA",stringu2="ZMEAAA",string4="HHHHxx" 262828800000000000 +tenk unique1=6808i,unique2=3042i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=808i,twothousand=808i,fivethous=1808i,tenthous=6808i,odd=16i,even=17i,stringu1="WBAAAA",stringu2="ANEAAA",string4="OOOOxx" 262915200000000000 +tenk unique1=1780i,unique2=3043i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=780i,twothousand=1780i,fivethous=1780i,tenthous=1780i,odd=160i,even=161i,stringu1="MQAAAA",stringu2="BNEAAA",string4="VVVVxx" 263001600000000000 +tenk unique1=4092i,unique2=3044i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=92i,twothousand=92i,fivethous=4092i,tenthous=4092i,odd=184i,even=185i,stringu1="KBAAAA",stringu2="CNEAAA",string4="AAAAxx" 263088000000000000 +tenk unique1=3618i,unique2=3045i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=618i,twothousand=1618i,fivethous=3618i,tenthous=3618i,odd=36i,even=37i,stringu1="EJAAAA",stringu2="DNEAAA",string4="HHHHxx" 263174400000000000 +tenk unique1=7299i,unique2=3046i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=299i,twothousand=1299i,fivethous=2299i,tenthous=7299i,odd=198i,even=199i,stringu1="TUAAAA",stringu2="ENEAAA",string4="OOOOxx" 263260800000000000 +tenk unique1=8544i,unique2=3047i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=544i,twothousand=544i,fivethous=3544i,tenthous=8544i,odd=88i,even=89i,stringu1="QQAAAA",stringu2="FNEAAA",string4="VVVVxx" 263347200000000000 +tenk unique1=2359i,unique2=3048i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=359i,twothousand=359i,fivethous=2359i,tenthous=2359i,odd=118i,even=119i,stringu1="TMAAAA",stringu2="GNEAAA",string4="AAAAxx" 263433600000000000 +tenk unique1=1939i,unique2=3049i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=939i,twothousand=1939i,fivethous=1939i,tenthous=1939i,odd=78i,even=79i,stringu1="PWAAAA",stringu2="HNEAAA",string4="HHHHxx" 263520000000000000 +tenk unique1=5834i,unique2=3050i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=834i,twothousand=1834i,fivethous=834i,tenthous=5834i,odd=68i,even=69i,stringu1="KQAAAA",stringu2="INEAAA",string4="OOOOxx" 263606400000000000 +tenk unique1=1997i,unique2=3051i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=997i,twothousand=1997i,fivethous=1997i,tenthous=1997i,odd=194i,even=195i,stringu1="VYAAAA",stringu2="JNEAAA",string4="VVVVxx" 263692800000000000 +tenk unique1=7917i,unique2=3052i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=917i,twothousand=1917i,fivethous=2917i,tenthous=7917i,odd=34i,even=35i,stringu1="NSAAAA",stringu2="KNEAAA",string4="AAAAxx" 263779200000000000 +tenk unique1=2098i,unique2=3053i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=98i,twothousand=98i,fivethous=2098i,tenthous=2098i,odd=196i,even=197i,stringu1="SCAAAA",stringu2="LNEAAA",string4="HHHHxx" 263865600000000000 +tenk unique1=7576i,unique2=3054i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=576i,twothousand=1576i,fivethous=2576i,tenthous=7576i,odd=152i,even=153i,stringu1="KFAAAA",stringu2="MNEAAA",string4="OOOOxx" 263952000000000000 +tenk unique1=376i,unique2=3055i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=376i,twothousand=376i,fivethous=376i,tenthous=376i,odd=152i,even=153i,stringu1="MOAAAA",stringu2="NNEAAA",string4="VVVVxx" 264038400000000000 +tenk unique1=8535i,unique2=3056i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=535i,twothousand=535i,fivethous=3535i,tenthous=8535i,odd=70i,even=71i,stringu1="HQAAAA",stringu2="ONEAAA",string4="AAAAxx" 264124800000000000 +tenk unique1=5659i,unique2=3057i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=659i,twothousand=1659i,fivethous=659i,tenthous=5659i,odd=118i,even=119i,stringu1="RJAAAA",stringu2="PNEAAA",string4="HHHHxx" 264211200000000000 +tenk unique1=2786i,unique2=3058i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=786i,twothousand=786i,fivethous=2786i,tenthous=2786i,odd=172i,even=173i,stringu1="EDAAAA",stringu2="QNEAAA",string4="OOOOxx" 264297600000000000 +tenk unique1=8820i,unique2=3059i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=820i,twothousand=820i,fivethous=3820i,tenthous=8820i,odd=40i,even=41i,stringu1="GBAAAA",stringu2="RNEAAA",string4="VVVVxx" 264384000000000000 +tenk unique1=1229i,unique2=3060i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=229i,twothousand=1229i,fivethous=1229i,tenthous=1229i,odd=58i,even=59i,stringu1="HVAAAA",stringu2="SNEAAA",string4="AAAAxx" 264470400000000000 +tenk unique1=9321i,unique2=3061i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=321i,twothousand=1321i,fivethous=4321i,tenthous=9321i,odd=42i,even=43i,stringu1="NUAAAA",stringu2="TNEAAA",string4="HHHHxx" 264556800000000000 +tenk unique1=7662i,unique2=3062i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=662i,twothousand=1662i,fivethous=2662i,tenthous=7662i,odd=124i,even=125i,stringu1="SIAAAA",stringu2="UNEAAA",string4="OOOOxx" 264643200000000000 +tenk unique1=5535i,unique2=3063i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=535i,twothousand=1535i,fivethous=535i,tenthous=5535i,odd=70i,even=71i,stringu1="XEAAAA",stringu2="VNEAAA",string4="VVVVxx" 264729600000000000 +tenk unique1=4889i,unique2=3064i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=889i,twothousand=889i,fivethous=4889i,tenthous=4889i,odd=178i,even=179i,stringu1="BGAAAA",stringu2="WNEAAA",string4="AAAAxx" 264816000000000000 +tenk unique1=8259i,unique2=3065i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=259i,twothousand=259i,fivethous=3259i,tenthous=8259i,odd=118i,even=119i,stringu1="RFAAAA",stringu2="XNEAAA",string4="HHHHxx" 264902400000000000 +tenk unique1=6789i,unique2=3066i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=789i,twothousand=789i,fivethous=1789i,tenthous=6789i,odd=178i,even=179i,stringu1="DBAAAA",stringu2="YNEAAA",string4="OOOOxx" 264988800000000000 +tenk unique1=5411i,unique2=3067i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=411i,twothousand=1411i,fivethous=411i,tenthous=5411i,odd=22i,even=23i,stringu1="DAAAAA",stringu2="ZNEAAA",string4="VVVVxx" 265075200000000000 +tenk unique1=6992i,unique2=3068i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=992i,twothousand=992i,fivethous=1992i,tenthous=6992i,odd=184i,even=185i,stringu1="YIAAAA",stringu2="AOEAAA",string4="AAAAxx" 265161600000000000 +tenk unique1=7698i,unique2=3069i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=698i,twothousand=1698i,fivethous=2698i,tenthous=7698i,odd=196i,even=197i,stringu1="CKAAAA",stringu2="BOEAAA",string4="HHHHxx" 265248000000000000 +tenk unique1=2342i,unique2=3070i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=342i,twothousand=342i,fivethous=2342i,tenthous=2342i,odd=84i,even=85i,stringu1="CMAAAA",stringu2="COEAAA",string4="OOOOxx" 265334400000000000 +tenk unique1=1501i,unique2=3071i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=501i,twothousand=1501i,fivethous=1501i,tenthous=1501i,odd=2i,even=3i,stringu1="TFAAAA",stringu2="DOEAAA",string4="VVVVxx" 265420800000000000 +tenk unique1=6322i,unique2=3072i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=322i,twothousand=322i,fivethous=1322i,tenthous=6322i,odd=44i,even=45i,stringu1="EJAAAA",stringu2="EOEAAA",string4="AAAAxx" 265507200000000000 +tenk unique1=9861i,unique2=3073i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=861i,twothousand=1861i,fivethous=4861i,tenthous=9861i,odd=122i,even=123i,stringu1="HPAAAA",stringu2="FOEAAA",string4="HHHHxx" 265593600000000000 +tenk unique1=9802i,unique2=3074i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=802i,twothousand=1802i,fivethous=4802i,tenthous=9802i,odd=4i,even=5i,stringu1="ANAAAA",stringu2="GOEAAA",string4="OOOOxx" 265680000000000000 +tenk unique1=4750i,unique2=3075i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=750i,twothousand=750i,fivethous=4750i,tenthous=4750i,odd=100i,even=101i,stringu1="SAAAAA",stringu2="HOEAAA",string4="VVVVxx" 265766400000000000 +tenk unique1=5855i,unique2=3076i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=855i,twothousand=1855i,fivethous=855i,tenthous=5855i,odd=110i,even=111i,stringu1="FRAAAA",stringu2="IOEAAA",string4="AAAAxx" 265852800000000000 +tenk unique1=4304i,unique2=3077i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=304i,twothousand=304i,fivethous=4304i,tenthous=4304i,odd=8i,even=9i,stringu1="OJAAAA",stringu2="JOEAAA",string4="HHHHxx" 265939200000000000 +tenk unique1=2605i,unique2=3078i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=605i,twothousand=605i,fivethous=2605i,tenthous=2605i,odd=10i,even=11i,stringu1="FWAAAA",stringu2="KOEAAA",string4="OOOOxx" 266025600000000000 +tenk unique1=1802i,unique2=3079i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=802i,twothousand=1802i,fivethous=1802i,tenthous=1802i,odd=4i,even=5i,stringu1="IRAAAA",stringu2="LOEAAA",string4="VVVVxx" 266112000000000000 +tenk unique1=9368i,unique2=3080i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=368i,twothousand=1368i,fivethous=4368i,tenthous=9368i,odd=136i,even=137i,stringu1="IWAAAA",stringu2="MOEAAA",string4="AAAAxx" 266198400000000000 +tenk unique1=7107i,unique2=3081i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=107i,twothousand=1107i,fivethous=2107i,tenthous=7107i,odd=14i,even=15i,stringu1="JNAAAA",stringu2="NOEAAA",string4="HHHHxx" 266284800000000000 +tenk unique1=8895i,unique2=3082i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=895i,twothousand=895i,fivethous=3895i,tenthous=8895i,odd=190i,even=191i,stringu1="DEAAAA",stringu2="OOEAAA",string4="OOOOxx" 266371200000000000 +tenk unique1=3750i,unique2=3083i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=750i,twothousand=1750i,fivethous=3750i,tenthous=3750i,odd=100i,even=101i,stringu1="GOAAAA",stringu2="POEAAA",string4="VVVVxx" 266457600000000000 +tenk unique1=8934i,unique2=3084i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=934i,twothousand=934i,fivethous=3934i,tenthous=8934i,odd=68i,even=69i,stringu1="QFAAAA",stringu2="QOEAAA",string4="AAAAxx" 266544000000000000 +tenk unique1=9464i,unique2=3085i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=464i,twothousand=1464i,fivethous=4464i,tenthous=9464i,odd=128i,even=129i,stringu1="AAAAAA",stringu2="ROEAAA",string4="HHHHxx" 266630400000000000 +tenk unique1=1928i,unique2=3086i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=928i,twothousand=1928i,fivethous=1928i,tenthous=1928i,odd=56i,even=57i,stringu1="EWAAAA",stringu2="SOEAAA",string4="OOOOxx" 266716800000000000 +tenk unique1=3196i,unique2=3087i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=196i,twothousand=1196i,fivethous=3196i,tenthous=3196i,odd=192i,even=193i,stringu1="YSAAAA",stringu2="TOEAAA",string4="VVVVxx" 266803200000000000 +tenk unique1=5256i,unique2=3088i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=256i,twothousand=1256i,fivethous=256i,tenthous=5256i,odd=112i,even=113i,stringu1="EUAAAA",stringu2="UOEAAA",string4="AAAAxx" 266889600000000000 +tenk unique1=7119i,unique2=3089i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=119i,twothousand=1119i,fivethous=2119i,tenthous=7119i,odd=38i,even=39i,stringu1="VNAAAA",stringu2="VOEAAA",string4="HHHHxx" 266976000000000000 +tenk unique1=4495i,unique2=3090i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=495i,twothousand=495i,fivethous=4495i,tenthous=4495i,odd=190i,even=191i,stringu1="XQAAAA",stringu2="WOEAAA",string4="OOOOxx" 267062400000000000 +tenk unique1=9292i,unique2=3091i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=292i,twothousand=1292i,fivethous=4292i,tenthous=9292i,odd=184i,even=185i,stringu1="KTAAAA",stringu2="XOEAAA",string4="VVVVxx" 267148800000000000 +tenk unique1=1617i,unique2=3092i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=617i,twothousand=1617i,fivethous=1617i,tenthous=1617i,odd=34i,even=35i,stringu1="FKAAAA",stringu2="YOEAAA",string4="AAAAxx" 267235200000000000 +tenk unique1=481i,unique2=3093i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=481i,twothousand=481i,fivethous=481i,tenthous=481i,odd=162i,even=163i,stringu1="NSAAAA",stringu2="ZOEAAA",string4="HHHHxx" 267321600000000000 +tenk unique1=56i,unique2=3094i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=56i,twothousand=56i,fivethous=56i,tenthous=56i,odd=112i,even=113i,stringu1="ECAAAA",stringu2="APEAAA",string4="OOOOxx" 267408000000000000 +tenk unique1=9120i,unique2=3095i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=120i,twothousand=1120i,fivethous=4120i,tenthous=9120i,odd=40i,even=41i,stringu1="UMAAAA",stringu2="BPEAAA",string4="VVVVxx" 267494400000000000 +tenk unique1=1306i,unique2=3096i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=306i,twothousand=1306i,fivethous=1306i,tenthous=1306i,odd=12i,even=13i,stringu1="GYAAAA",stringu2="CPEAAA",string4="AAAAxx" 267580800000000000 +tenk unique1=7773i,unique2=3097i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=773i,twothousand=1773i,fivethous=2773i,tenthous=7773i,odd=146i,even=147i,stringu1="ZMAAAA",stringu2="DPEAAA",string4="HHHHxx" 267667200000000000 +tenk unique1=4863i,unique2=3098i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=863i,twothousand=863i,fivethous=4863i,tenthous=4863i,odd=126i,even=127i,stringu1="BFAAAA",stringu2="EPEAAA",string4="OOOOxx" 267753600000000000 +tenk unique1=1114i,unique2=3099i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=114i,twothousand=1114i,fivethous=1114i,tenthous=1114i,odd=28i,even=29i,stringu1="WQAAAA",stringu2="FPEAAA",string4="VVVVxx" 267840000000000000 +tenk unique1=8124i,unique2=3100i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=124i,twothousand=124i,fivethous=3124i,tenthous=8124i,odd=48i,even=49i,stringu1="MAAAAA",stringu2="GPEAAA",string4="AAAAxx" 267926400000000000 +tenk unique1=6254i,unique2=3101i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=254i,twothousand=254i,fivethous=1254i,tenthous=6254i,odd=108i,even=109i,stringu1="OGAAAA",stringu2="HPEAAA",string4="HHHHxx" 268012800000000000 +tenk unique1=8109i,unique2=3102i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=109i,twothousand=109i,fivethous=3109i,tenthous=8109i,odd=18i,even=19i,stringu1="XZAAAA",stringu2="IPEAAA",string4="OOOOxx" 268099200000000000 +tenk unique1=1747i,unique2=3103i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=747i,twothousand=1747i,fivethous=1747i,tenthous=1747i,odd=94i,even=95i,stringu1="FPAAAA",stringu2="JPEAAA",string4="VVVVxx" 268185600000000000 +tenk unique1=6185i,unique2=3104i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=185i,twothousand=185i,fivethous=1185i,tenthous=6185i,odd=170i,even=171i,stringu1="XDAAAA",stringu2="KPEAAA",string4="AAAAxx" 268272000000000000 +tenk unique1=3388i,unique2=3105i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=388i,twothousand=1388i,fivethous=3388i,tenthous=3388i,odd=176i,even=177i,stringu1="IAAAAA",stringu2="LPEAAA",string4="HHHHxx" 268358400000000000 +tenk unique1=4905i,unique2=3106i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=905i,twothousand=905i,fivethous=4905i,tenthous=4905i,odd=10i,even=11i,stringu1="RGAAAA",stringu2="MPEAAA",string4="OOOOxx" 268444800000000000 +tenk unique1=5728i,unique2=3107i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=728i,twothousand=1728i,fivethous=728i,tenthous=5728i,odd=56i,even=57i,stringu1="IMAAAA",stringu2="NPEAAA",string4="VVVVxx" 268531200000000000 +tenk unique1=7507i,unique2=3108i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=507i,twothousand=1507i,fivethous=2507i,tenthous=7507i,odd=14i,even=15i,stringu1="TCAAAA",stringu2="OPEAAA",string4="AAAAxx" 268617600000000000 +tenk unique1=5662i,unique2=3109i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=662i,twothousand=1662i,fivethous=662i,tenthous=5662i,odd=124i,even=125i,stringu1="UJAAAA",stringu2="PPEAAA",string4="HHHHxx" 268704000000000000 +tenk unique1=1686i,unique2=3110i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=686i,twothousand=1686i,fivethous=1686i,tenthous=1686i,odd=172i,even=173i,stringu1="WMAAAA",stringu2="QPEAAA",string4="OOOOxx" 268790400000000000 +tenk unique1=5202i,unique2=3111i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=202i,twothousand=1202i,fivethous=202i,tenthous=5202i,odd=4i,even=5i,stringu1="CSAAAA",stringu2="RPEAAA",string4="VVVVxx" 268876800000000000 +tenk unique1=6905i,unique2=3112i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=905i,twothousand=905i,fivethous=1905i,tenthous=6905i,odd=10i,even=11i,stringu1="PFAAAA",stringu2="SPEAAA",string4="AAAAxx" 268963200000000000 +tenk unique1=9577i,unique2=3113i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=577i,twothousand=1577i,fivethous=4577i,tenthous=9577i,odd=154i,even=155i,stringu1="JEAAAA",stringu2="TPEAAA",string4="HHHHxx" 269049600000000000 +tenk unique1=7194i,unique2=3114i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=194i,twothousand=1194i,fivethous=2194i,tenthous=7194i,odd=188i,even=189i,stringu1="SQAAAA",stringu2="UPEAAA",string4="OOOOxx" 269136000000000000 +tenk unique1=7016i,unique2=3115i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=16i,twothousand=1016i,fivethous=2016i,tenthous=7016i,odd=32i,even=33i,stringu1="WJAAAA",stringu2="VPEAAA",string4="VVVVxx" 269222400000000000 +tenk unique1=8905i,unique2=3116i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=905i,twothousand=905i,fivethous=3905i,tenthous=8905i,odd=10i,even=11i,stringu1="NEAAAA",stringu2="WPEAAA",string4="AAAAxx" 269308800000000000 +tenk unique1=3419i,unique2=3117i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=419i,twothousand=1419i,fivethous=3419i,tenthous=3419i,odd=38i,even=39i,stringu1="NBAAAA",stringu2="XPEAAA",string4="HHHHxx" 269395200000000000 +tenk unique1=6881i,unique2=3118i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=881i,twothousand=881i,fivethous=1881i,tenthous=6881i,odd=162i,even=163i,stringu1="REAAAA",stringu2="YPEAAA",string4="OOOOxx" 269481600000000000 +tenk unique1=8370i,unique2=3119i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=370i,twothousand=370i,fivethous=3370i,tenthous=8370i,odd=140i,even=141i,stringu1="YJAAAA",stringu2="ZPEAAA",string4="VVVVxx" 269568000000000000 +tenk unique1=6117i,unique2=3120i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=117i,twothousand=117i,fivethous=1117i,tenthous=6117i,odd=34i,even=35i,stringu1="HBAAAA",stringu2="AQEAAA",string4="AAAAxx" 269654400000000000 +tenk unique1=1636i,unique2=3121i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=636i,twothousand=1636i,fivethous=1636i,tenthous=1636i,odd=72i,even=73i,stringu1="YKAAAA",stringu2="BQEAAA",string4="HHHHxx" 269740800000000000 +tenk unique1=6857i,unique2=3122i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=857i,twothousand=857i,fivethous=1857i,tenthous=6857i,odd=114i,even=115i,stringu1="TDAAAA",stringu2="CQEAAA",string4="OOOOxx" 269827200000000000 +tenk unique1=7163i,unique2=3123i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=163i,twothousand=1163i,fivethous=2163i,tenthous=7163i,odd=126i,even=127i,stringu1="NPAAAA",stringu2="DQEAAA",string4="VVVVxx" 269913600000000000 +tenk unique1=5040i,unique2=3124i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=40i,twothousand=1040i,fivethous=40i,tenthous=5040i,odd=80i,even=81i,stringu1="WLAAAA",stringu2="EQEAAA",string4="AAAAxx" 270000000000000000 +tenk unique1=6263i,unique2=3125i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=263i,twothousand=263i,fivethous=1263i,tenthous=6263i,odd=126i,even=127i,stringu1="XGAAAA",stringu2="FQEAAA",string4="HHHHxx" 270086400000000000 +tenk unique1=4809i,unique2=3126i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=809i,twothousand=809i,fivethous=4809i,tenthous=4809i,odd=18i,even=19i,stringu1="ZCAAAA",stringu2="GQEAAA",string4="OOOOxx" 270172800000000000 +tenk unique1=900i,unique2=3127i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=900i,twothousand=900i,fivethous=900i,tenthous=900i,odd=0i,even=1i,stringu1="QIAAAA",stringu2="HQEAAA",string4="VVVVxx" 270259200000000000 +tenk unique1=3199i,unique2=3128i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=199i,twothousand=1199i,fivethous=3199i,tenthous=3199i,odd=198i,even=199i,stringu1="BTAAAA",stringu2="IQEAAA",string4="AAAAxx" 270345600000000000 +tenk unique1=4156i,unique2=3129i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=156i,twothousand=156i,fivethous=4156i,tenthous=4156i,odd=112i,even=113i,stringu1="WDAAAA",stringu2="JQEAAA",string4="HHHHxx" 270432000000000000 +tenk unique1=3501i,unique2=3130i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=501i,twothousand=1501i,fivethous=3501i,tenthous=3501i,odd=2i,even=3i,stringu1="REAAAA",stringu2="KQEAAA",string4="OOOOxx" 270518400000000000 +tenk unique1=164i,unique2=3131i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=164i,twothousand=164i,fivethous=164i,tenthous=164i,odd=128i,even=129i,stringu1="IGAAAA",stringu2="LQEAAA",string4="VVVVxx" 270604800000000000 +tenk unique1=9548i,unique2=3132i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=548i,twothousand=1548i,fivethous=4548i,tenthous=9548i,odd=96i,even=97i,stringu1="GDAAAA",stringu2="MQEAAA",string4="AAAAxx" 270691200000000000 +tenk unique1=1149i,unique2=3133i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=149i,twothousand=1149i,fivethous=1149i,tenthous=1149i,odd=98i,even=99i,stringu1="FSAAAA",stringu2="NQEAAA",string4="HHHHxx" 270777600000000000 +tenk unique1=1962i,unique2=3134i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=962i,twothousand=1962i,fivethous=1962i,tenthous=1962i,odd=124i,even=125i,stringu1="MXAAAA",stringu2="OQEAAA",string4="OOOOxx" 270864000000000000 +tenk unique1=4072i,unique2=3135i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=72i,twothousand=72i,fivethous=4072i,tenthous=4072i,odd=144i,even=145i,stringu1="QAAAAA",stringu2="PQEAAA",string4="VVVVxx" 270950400000000000 +tenk unique1=4280i,unique2=3136i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=280i,twothousand=280i,fivethous=4280i,tenthous=4280i,odd=160i,even=161i,stringu1="QIAAAA",stringu2="QQEAAA",string4="AAAAxx" 271036800000000000 +tenk unique1=1398i,unique2=3137i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=398i,twothousand=1398i,fivethous=1398i,tenthous=1398i,odd=196i,even=197i,stringu1="UBAAAA",stringu2="RQEAAA",string4="HHHHxx" 271123200000000000 +tenk unique1=725i,unique2=3138i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=725i,twothousand=725i,fivethous=725i,tenthous=725i,odd=50i,even=51i,stringu1="XBAAAA",stringu2="SQEAAA",string4="OOOOxx" 271209600000000000 +tenk unique1=3988i,unique2=3139i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=988i,twothousand=1988i,fivethous=3988i,tenthous=3988i,odd=176i,even=177i,stringu1="KXAAAA",stringu2="TQEAAA",string4="VVVVxx" 271296000000000000 +tenk unique1=5059i,unique2=3140i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=59i,twothousand=1059i,fivethous=59i,tenthous=5059i,odd=118i,even=119i,stringu1="PMAAAA",stringu2="UQEAAA",string4="AAAAxx" 271382400000000000 +tenk unique1=2632i,unique2=3141i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=632i,twothousand=632i,fivethous=2632i,tenthous=2632i,odd=64i,even=65i,stringu1="GXAAAA",stringu2="VQEAAA",string4="HHHHxx" 271468800000000000 +tenk unique1=1909i,unique2=3142i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=909i,twothousand=1909i,fivethous=1909i,tenthous=1909i,odd=18i,even=19i,stringu1="LVAAAA",stringu2="WQEAAA",string4="OOOOxx" 271555200000000000 +tenk unique1=6827i,unique2=3143i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=827i,twothousand=827i,fivethous=1827i,tenthous=6827i,odd=54i,even=55i,stringu1="PCAAAA",stringu2="XQEAAA",string4="VVVVxx" 271641600000000000 +tenk unique1=8156i,unique2=3144i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=156i,twothousand=156i,fivethous=3156i,tenthous=8156i,odd=112i,even=113i,stringu1="SBAAAA",stringu2="YQEAAA",string4="AAAAxx" 271728000000000000 +tenk unique1=1192i,unique2=3145i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=192i,twothousand=1192i,fivethous=1192i,tenthous=1192i,odd=184i,even=185i,stringu1="WTAAAA",stringu2="ZQEAAA",string4="HHHHxx" 271814400000000000 +tenk unique1=9545i,unique2=3146i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=545i,twothousand=1545i,fivethous=4545i,tenthous=9545i,odd=90i,even=91i,stringu1="DDAAAA",stringu2="AREAAA",string4="OOOOxx" 271900800000000000 +tenk unique1=2249i,unique2=3147i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=249i,twothousand=249i,fivethous=2249i,tenthous=2249i,odd=98i,even=99i,stringu1="NIAAAA",stringu2="BREAAA",string4="VVVVxx" 271987200000000000 +tenk unique1=5580i,unique2=3148i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=580i,twothousand=1580i,fivethous=580i,tenthous=5580i,odd=160i,even=161i,stringu1="QGAAAA",stringu2="CREAAA",string4="AAAAxx" 272073600000000000 +tenk unique1=8403i,unique2=3149i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=403i,twothousand=403i,fivethous=3403i,tenthous=8403i,odd=6i,even=7i,stringu1="FLAAAA",stringu2="DREAAA",string4="HHHHxx" 272160000000000000 +tenk unique1=4024i,unique2=3150i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=24i,twothousand=24i,fivethous=4024i,tenthous=4024i,odd=48i,even=49i,stringu1="UYAAAA",stringu2="EREAAA",string4="OOOOxx" 272246400000000000 +tenk unique1=1866i,unique2=3151i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=866i,twothousand=1866i,fivethous=1866i,tenthous=1866i,odd=132i,even=133i,stringu1="UTAAAA",stringu2="FREAAA",string4="VVVVxx" 272332800000000000 +tenk unique1=9251i,unique2=3152i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=251i,twothousand=1251i,fivethous=4251i,tenthous=9251i,odd=102i,even=103i,stringu1="VRAAAA",stringu2="GREAAA",string4="AAAAxx" 272419200000000000 +tenk unique1=9979i,unique2=3153i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=979i,twothousand=1979i,fivethous=4979i,tenthous=9979i,odd=158i,even=159i,stringu1="VTAAAA",stringu2="HREAAA",string4="HHHHxx" 272505600000000000 +tenk unique1=9899i,unique2=3154i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=899i,twothousand=1899i,fivethous=4899i,tenthous=9899i,odd=198i,even=199i,stringu1="TQAAAA",stringu2="IREAAA",string4="OOOOxx" 272592000000000000 +tenk unique1=2540i,unique2=3155i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=540i,twothousand=540i,fivethous=2540i,tenthous=2540i,odd=80i,even=81i,stringu1="STAAAA",stringu2="JREAAA",string4="VVVVxx" 272678400000000000 +tenk unique1=8957i,unique2=3156i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=957i,twothousand=957i,fivethous=3957i,tenthous=8957i,odd=114i,even=115i,stringu1="NGAAAA",stringu2="KREAAA",string4="AAAAxx" 272764800000000000 +tenk unique1=7702i,unique2=3157i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=702i,twothousand=1702i,fivethous=2702i,tenthous=7702i,odd=4i,even=5i,stringu1="GKAAAA",stringu2="LREAAA",string4="HHHHxx" 272851200000000000 +tenk unique1=4211i,unique2=3158i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=211i,twothousand=211i,fivethous=4211i,tenthous=4211i,odd=22i,even=23i,stringu1="ZFAAAA",stringu2="MREAAA",string4="OOOOxx" 272937600000000000 +tenk unique1=6684i,unique2=3159i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=684i,twothousand=684i,fivethous=1684i,tenthous=6684i,odd=168i,even=169i,stringu1="CXAAAA",stringu2="NREAAA",string4="VVVVxx" 273024000000000000 +tenk unique1=3883i,unique2=3160i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=883i,twothousand=1883i,fivethous=3883i,tenthous=3883i,odd=166i,even=167i,stringu1="JTAAAA",stringu2="OREAAA",string4="AAAAxx" 273110400000000000 +tenk unique1=3531i,unique2=3161i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=531i,twothousand=1531i,fivethous=3531i,tenthous=3531i,odd=62i,even=63i,stringu1="VFAAAA",stringu2="PREAAA",string4="HHHHxx" 273196800000000000 +tenk unique1=9178i,unique2=3162i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=178i,twothousand=1178i,fivethous=4178i,tenthous=9178i,odd=156i,even=157i,stringu1="APAAAA",stringu2="QREAAA",string4="OOOOxx" 273283200000000000 +tenk unique1=3389i,unique2=3163i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=389i,twothousand=1389i,fivethous=3389i,tenthous=3389i,odd=178i,even=179i,stringu1="JAAAAA",stringu2="RREAAA",string4="VVVVxx" 273369600000000000 +tenk unique1=7874i,unique2=3164i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=874i,twothousand=1874i,fivethous=2874i,tenthous=7874i,odd=148i,even=149i,stringu1="WQAAAA",stringu2="SREAAA",string4="AAAAxx" 273456000000000000 +tenk unique1=4522i,unique2=3165i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=522i,twothousand=522i,fivethous=4522i,tenthous=4522i,odd=44i,even=45i,stringu1="YRAAAA",stringu2="TREAAA",string4="HHHHxx" 273542400000000000 +tenk unique1=9399i,unique2=3166i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=399i,twothousand=1399i,fivethous=4399i,tenthous=9399i,odd=198i,even=199i,stringu1="NXAAAA",stringu2="UREAAA",string4="OOOOxx" 273628800000000000 +tenk unique1=9083i,unique2=3167i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=83i,twothousand=1083i,fivethous=4083i,tenthous=9083i,odd=166i,even=167i,stringu1="JLAAAA",stringu2="VREAAA",string4="VVVVxx" 273715200000000000 +tenk unique1=1530i,unique2=3168i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=530i,twothousand=1530i,fivethous=1530i,tenthous=1530i,odd=60i,even=61i,stringu1="WGAAAA",stringu2="WREAAA",string4="AAAAxx" 273801600000000000 +tenk unique1=2360i,unique2=3169i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=360i,twothousand=360i,fivethous=2360i,tenthous=2360i,odd=120i,even=121i,stringu1="UMAAAA",stringu2="XREAAA",string4="HHHHxx" 273888000000000000 +tenk unique1=4908i,unique2=3170i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=908i,twothousand=908i,fivethous=4908i,tenthous=4908i,odd=16i,even=17i,stringu1="UGAAAA",stringu2="YREAAA",string4="OOOOxx" 273974400000000000 +tenk unique1=4628i,unique2=3171i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=628i,twothousand=628i,fivethous=4628i,tenthous=4628i,odd=56i,even=57i,stringu1="AWAAAA",stringu2="ZREAAA",string4="VVVVxx" 274060800000000000 +tenk unique1=3889i,unique2=3172i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=889i,twothousand=1889i,fivethous=3889i,tenthous=3889i,odd=178i,even=179i,stringu1="PTAAAA",stringu2="ASEAAA",string4="AAAAxx" 274147200000000000 +tenk unique1=1331i,unique2=3173i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=331i,twothousand=1331i,fivethous=1331i,tenthous=1331i,odd=62i,even=63i,stringu1="FZAAAA",stringu2="BSEAAA",string4="HHHHxx" 274233600000000000 +tenk unique1=1942i,unique2=3174i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=942i,twothousand=1942i,fivethous=1942i,tenthous=1942i,odd=84i,even=85i,stringu1="SWAAAA",stringu2="CSEAAA",string4="OOOOxx" 274320000000000000 +tenk unique1=4734i,unique2=3175i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=734i,twothousand=734i,fivethous=4734i,tenthous=4734i,odd=68i,even=69i,stringu1="CAAAAA",stringu2="DSEAAA",string4="VVVVxx" 274406400000000000 +tenk unique1=8386i,unique2=3176i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=386i,twothousand=386i,fivethous=3386i,tenthous=8386i,odd=172i,even=173i,stringu1="OKAAAA",stringu2="ESEAAA",string4="AAAAxx" 274492800000000000 +tenk unique1=3586i,unique2=3177i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=586i,twothousand=1586i,fivethous=3586i,tenthous=3586i,odd=172i,even=173i,stringu1="YHAAAA",stringu2="FSEAAA",string4="HHHHxx" 274579200000000000 +tenk unique1=2354i,unique2=3178i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=354i,twothousand=354i,fivethous=2354i,tenthous=2354i,odd=108i,even=109i,stringu1="OMAAAA",stringu2="GSEAAA",string4="OOOOxx" 274665600000000000 +tenk unique1=7108i,unique2=3179i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=108i,twothousand=1108i,fivethous=2108i,tenthous=7108i,odd=16i,even=17i,stringu1="KNAAAA",stringu2="HSEAAA",string4="VVVVxx" 274752000000000000 +tenk unique1=1857i,unique2=3180i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=857i,twothousand=1857i,fivethous=1857i,tenthous=1857i,odd=114i,even=115i,stringu1="LTAAAA",stringu2="ISEAAA",string4="AAAAxx" 274838400000000000 +tenk unique1=2544i,unique2=3181i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=544i,twothousand=544i,fivethous=2544i,tenthous=2544i,odd=88i,even=89i,stringu1="WTAAAA",stringu2="JSEAAA",string4="HHHHxx" 274924800000000000 +tenk unique1=819i,unique2=3182i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=819i,twothousand=819i,fivethous=819i,tenthous=819i,odd=38i,even=39i,stringu1="NFAAAA",stringu2="KSEAAA",string4="OOOOxx" 275011200000000000 +tenk unique1=2878i,unique2=3183i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=878i,twothousand=878i,fivethous=2878i,tenthous=2878i,odd=156i,even=157i,stringu1="SGAAAA",stringu2="LSEAAA",string4="VVVVxx" 275097600000000000 +tenk unique1=1772i,unique2=3184i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=772i,twothousand=1772i,fivethous=1772i,tenthous=1772i,odd=144i,even=145i,stringu1="EQAAAA",stringu2="MSEAAA",string4="AAAAxx" 275184000000000000 +tenk unique1=354i,unique2=3185i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=354i,twothousand=354i,fivethous=354i,tenthous=354i,odd=108i,even=109i,stringu1="QNAAAA",stringu2="NSEAAA",string4="HHHHxx" 275270400000000000 +tenk unique1=3259i,unique2=3186i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=259i,twothousand=1259i,fivethous=3259i,tenthous=3259i,odd=118i,even=119i,stringu1="JVAAAA",stringu2="OSEAAA",string4="OOOOxx" 275356800000000000 +tenk unique1=2170i,unique2=3187i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=170i,twothousand=170i,fivethous=2170i,tenthous=2170i,odd=140i,even=141i,stringu1="MFAAAA",stringu2="PSEAAA",string4="VVVVxx" 275443200000000000 +tenk unique1=1190i,unique2=3188i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=190i,twothousand=1190i,fivethous=1190i,tenthous=1190i,odd=180i,even=181i,stringu1="UTAAAA",stringu2="QSEAAA",string4="AAAAxx" 275529600000000000 +tenk unique1=3607i,unique2=3189i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=607i,twothousand=1607i,fivethous=3607i,tenthous=3607i,odd=14i,even=15i,stringu1="TIAAAA",stringu2="RSEAAA",string4="HHHHxx" 275616000000000000 +tenk unique1=4661i,unique2=3190i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=661i,twothousand=661i,fivethous=4661i,tenthous=4661i,odd=122i,even=123i,stringu1="HXAAAA",stringu2="SSEAAA",string4="OOOOxx" 275702400000000000 +tenk unique1=1796i,unique2=3191i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=796i,twothousand=1796i,fivethous=1796i,tenthous=1796i,odd=192i,even=193i,stringu1="CRAAAA",stringu2="TSEAAA",string4="VVVVxx" 275788800000000000 +tenk unique1=1561i,unique2=3192i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=561i,twothousand=1561i,fivethous=1561i,tenthous=1561i,odd=122i,even=123i,stringu1="BIAAAA",stringu2="USEAAA",string4="AAAAxx" 275875200000000000 +tenk unique1=4336i,unique2=3193i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=336i,twothousand=336i,fivethous=4336i,tenthous=4336i,odd=72i,even=73i,stringu1="UKAAAA",stringu2="VSEAAA",string4="HHHHxx" 275961600000000000 +tenk unique1=7550i,unique2=3194i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=550i,twothousand=1550i,fivethous=2550i,tenthous=7550i,odd=100i,even=101i,stringu1="KEAAAA",stringu2="WSEAAA",string4="OOOOxx" 276048000000000000 +tenk unique1=3238i,unique2=3195i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=238i,twothousand=1238i,fivethous=3238i,tenthous=3238i,odd=76i,even=77i,stringu1="OUAAAA",stringu2="XSEAAA",string4="VVVVxx" 276134400000000000 +tenk unique1=9870i,unique2=3196i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=870i,twothousand=1870i,fivethous=4870i,tenthous=9870i,odd=140i,even=141i,stringu1="QPAAAA",stringu2="YSEAAA",string4="AAAAxx" 276220800000000000 +tenk unique1=6502i,unique2=3197i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=502i,twothousand=502i,fivethous=1502i,tenthous=6502i,odd=4i,even=5i,stringu1="CQAAAA",stringu2="ZSEAAA",string4="HHHHxx" 276307200000000000 +tenk unique1=3903i,unique2=3198i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=903i,twothousand=1903i,fivethous=3903i,tenthous=3903i,odd=6i,even=7i,stringu1="DUAAAA",stringu2="ATEAAA",string4="OOOOxx" 276393600000000000 +tenk unique1=2869i,unique2=3199i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=869i,twothousand=869i,fivethous=2869i,tenthous=2869i,odd=138i,even=139i,stringu1="JGAAAA",stringu2="BTEAAA",string4="VVVVxx" 276480000000000000 +tenk unique1=5072i,unique2=3200i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=72i,twothousand=1072i,fivethous=72i,tenthous=5072i,odd=144i,even=145i,stringu1="CNAAAA",stringu2="CTEAAA",string4="AAAAxx" 276566400000000000 +tenk unique1=1201i,unique2=3201i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=201i,twothousand=1201i,fivethous=1201i,tenthous=1201i,odd=2i,even=3i,stringu1="FUAAAA",stringu2="DTEAAA",string4="HHHHxx" 276652800000000000 +tenk unique1=6245i,unique2=3202i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=245i,twothousand=245i,fivethous=1245i,tenthous=6245i,odd=90i,even=91i,stringu1="FGAAAA",stringu2="ETEAAA",string4="OOOOxx" 276739200000000000 +tenk unique1=1402i,unique2=3203i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=402i,twothousand=1402i,fivethous=1402i,tenthous=1402i,odd=4i,even=5i,stringu1="YBAAAA",stringu2="FTEAAA",string4="VVVVxx" 276825600000000000 +tenk unique1=2594i,unique2=3204i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=594i,twothousand=594i,fivethous=2594i,tenthous=2594i,odd=188i,even=189i,stringu1="UVAAAA",stringu2="GTEAAA",string4="AAAAxx" 276912000000000000 +tenk unique1=9171i,unique2=3205i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=171i,twothousand=1171i,fivethous=4171i,tenthous=9171i,odd=142i,even=143i,stringu1="TOAAAA",stringu2="HTEAAA",string4="HHHHxx" 276998400000000000 +tenk unique1=2620i,unique2=3206i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=620i,twothousand=620i,fivethous=2620i,tenthous=2620i,odd=40i,even=41i,stringu1="UWAAAA",stringu2="ITEAAA",string4="OOOOxx" 277084800000000000 +tenk unique1=6309i,unique2=3207i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=309i,twothousand=309i,fivethous=1309i,tenthous=6309i,odd=18i,even=19i,stringu1="RIAAAA",stringu2="JTEAAA",string4="VVVVxx" 277171200000000000 +tenk unique1=1285i,unique2=3208i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=285i,twothousand=1285i,fivethous=1285i,tenthous=1285i,odd=170i,even=171i,stringu1="LXAAAA",stringu2="KTEAAA",string4="AAAAxx" 277257600000000000 +tenk unique1=5466i,unique2=3209i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=466i,twothousand=1466i,fivethous=466i,tenthous=5466i,odd=132i,even=133i,stringu1="GCAAAA",stringu2="LTEAAA",string4="HHHHxx" 277344000000000000 +tenk unique1=168i,unique2=3210i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=168i,twothousand=168i,fivethous=168i,tenthous=168i,odd=136i,even=137i,stringu1="MGAAAA",stringu2="MTEAAA",string4="OOOOxx" 277430400000000000 +tenk unique1=1410i,unique2=3211i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=410i,twothousand=1410i,fivethous=1410i,tenthous=1410i,odd=20i,even=21i,stringu1="GCAAAA",stringu2="NTEAAA",string4="VVVVxx" 277516800000000000 +tenk unique1=6332i,unique2=3212i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=332i,twothousand=332i,fivethous=1332i,tenthous=6332i,odd=64i,even=65i,stringu1="OJAAAA",stringu2="OTEAAA",string4="AAAAxx" 277603200000000000 +tenk unique1=9530i,unique2=3213i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=530i,twothousand=1530i,fivethous=4530i,tenthous=9530i,odd=60i,even=61i,stringu1="OCAAAA",stringu2="PTEAAA",string4="HHHHxx" 277689600000000000 +tenk unique1=7749i,unique2=3214i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=749i,twothousand=1749i,fivethous=2749i,tenthous=7749i,odd=98i,even=99i,stringu1="BMAAAA",stringu2="QTEAAA",string4="OOOOxx" 277776000000000000 +tenk unique1=3656i,unique2=3215i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=656i,twothousand=1656i,fivethous=3656i,tenthous=3656i,odd=112i,even=113i,stringu1="QKAAAA",stringu2="RTEAAA",string4="VVVVxx" 277862400000000000 +tenk unique1=37i,unique2=3216i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=37i,twothousand=37i,fivethous=37i,tenthous=37i,odd=74i,even=75i,stringu1="LBAAAA",stringu2="STEAAA",string4="AAAAxx" 277948800000000000 +tenk unique1=2744i,unique2=3217i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=744i,twothousand=744i,fivethous=2744i,tenthous=2744i,odd=88i,even=89i,stringu1="OBAAAA",stringu2="TTEAAA",string4="HHHHxx" 278035200000000000 +tenk unique1=4206i,unique2=3218i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=206i,twothousand=206i,fivethous=4206i,tenthous=4206i,odd=12i,even=13i,stringu1="UFAAAA",stringu2="UTEAAA",string4="OOOOxx" 278121600000000000 +tenk unique1=1846i,unique2=3219i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=846i,twothousand=1846i,fivethous=1846i,tenthous=1846i,odd=92i,even=93i,stringu1="ATAAAA",stringu2="VTEAAA",string4="VVVVxx" 278208000000000000 +tenk unique1=9913i,unique2=3220i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=913i,twothousand=1913i,fivethous=4913i,tenthous=9913i,odd=26i,even=27i,stringu1="HRAAAA",stringu2="WTEAAA",string4="AAAAxx" 278294400000000000 +tenk unique1=4078i,unique2=3221i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=78i,twothousand=78i,fivethous=4078i,tenthous=4078i,odd=156i,even=157i,stringu1="WAAAAA",stringu2="XTEAAA",string4="HHHHxx" 278380800000000000 +tenk unique1=2080i,unique2=3222i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=80i,twothousand=80i,fivethous=2080i,tenthous=2080i,odd=160i,even=161i,stringu1="ACAAAA",stringu2="YTEAAA",string4="OOOOxx" 278467200000000000 +tenk unique1=4169i,unique2=3223i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=169i,twothousand=169i,fivethous=4169i,tenthous=4169i,odd=138i,even=139i,stringu1="JEAAAA",stringu2="ZTEAAA",string4="VVVVxx" 278553600000000000 +tenk unique1=2070i,unique2=3224i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=70i,twothousand=70i,fivethous=2070i,tenthous=2070i,odd=140i,even=141i,stringu1="QBAAAA",stringu2="AUEAAA",string4="AAAAxx" 278640000000000000 +tenk unique1=4500i,unique2=3225i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=500i,twothousand=500i,fivethous=4500i,tenthous=4500i,odd=0i,even=1i,stringu1="CRAAAA",stringu2="BUEAAA",string4="HHHHxx" 278726400000000000 +tenk unique1=4123i,unique2=3226i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=123i,twothousand=123i,fivethous=4123i,tenthous=4123i,odd=46i,even=47i,stringu1="PCAAAA",stringu2="CUEAAA",string4="OOOOxx" 278812800000000000 +tenk unique1=5594i,unique2=3227i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=594i,twothousand=1594i,fivethous=594i,tenthous=5594i,odd=188i,even=189i,stringu1="EHAAAA",stringu2="DUEAAA",string4="VVVVxx" 278899200000000000 +tenk unique1=9941i,unique2=3228i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=941i,twothousand=1941i,fivethous=4941i,tenthous=9941i,odd=82i,even=83i,stringu1="JSAAAA",stringu2="EUEAAA",string4="AAAAxx" 278985600000000000 +tenk unique1=7154i,unique2=3229i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=154i,twothousand=1154i,fivethous=2154i,tenthous=7154i,odd=108i,even=109i,stringu1="EPAAAA",stringu2="FUEAAA",string4="HHHHxx" 279072000000000000 +tenk unique1=8340i,unique2=3230i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=340i,twothousand=340i,fivethous=3340i,tenthous=8340i,odd=80i,even=81i,stringu1="UIAAAA",stringu2="GUEAAA",string4="OOOOxx" 279158400000000000 +tenk unique1=7110i,unique2=3231i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=110i,twothousand=1110i,fivethous=2110i,tenthous=7110i,odd=20i,even=21i,stringu1="MNAAAA",stringu2="HUEAAA",string4="VVVVxx" 279244800000000000 +tenk unique1=7795i,unique2=3232i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=795i,twothousand=1795i,fivethous=2795i,tenthous=7795i,odd=190i,even=191i,stringu1="VNAAAA",stringu2="IUEAAA",string4="AAAAxx" 279331200000000000 +tenk unique1=132i,unique2=3233i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=132i,twothousand=132i,fivethous=132i,tenthous=132i,odd=64i,even=65i,stringu1="CFAAAA",stringu2="JUEAAA",string4="HHHHxx" 279417600000000000 +tenk unique1=4603i,unique2=3234i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=603i,twothousand=603i,fivethous=4603i,tenthous=4603i,odd=6i,even=7i,stringu1="BVAAAA",stringu2="KUEAAA",string4="OOOOxx" 279504000000000000 +tenk unique1=9720i,unique2=3235i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=720i,twothousand=1720i,fivethous=4720i,tenthous=9720i,odd=40i,even=41i,stringu1="WJAAAA",stringu2="LUEAAA",string4="VVVVxx" 279590400000000000 +tenk unique1=1460i,unique2=3236i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=460i,twothousand=1460i,fivethous=1460i,tenthous=1460i,odd=120i,even=121i,stringu1="EEAAAA",stringu2="MUEAAA",string4="AAAAxx" 279676800000000000 +tenk unique1=4677i,unique2=3237i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=677i,twothousand=677i,fivethous=4677i,tenthous=4677i,odd=154i,even=155i,stringu1="XXAAAA",stringu2="NUEAAA",string4="HHHHxx" 279763200000000000 +tenk unique1=9272i,unique2=3238i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=272i,twothousand=1272i,fivethous=4272i,tenthous=9272i,odd=144i,even=145i,stringu1="QSAAAA",stringu2="OUEAAA",string4="OOOOxx" 279849600000000000 +tenk unique1=2279i,unique2=3239i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=279i,twothousand=279i,fivethous=2279i,tenthous=2279i,odd=158i,even=159i,stringu1="RJAAAA",stringu2="PUEAAA",string4="VVVVxx" 279936000000000000 +tenk unique1=4587i,unique2=3240i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=587i,twothousand=587i,fivethous=4587i,tenthous=4587i,odd=174i,even=175i,stringu1="LUAAAA",stringu2="QUEAAA",string4="AAAAxx" 280022400000000000 +tenk unique1=2244i,unique2=3241i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=244i,twothousand=244i,fivethous=2244i,tenthous=2244i,odd=88i,even=89i,stringu1="IIAAAA",stringu2="RUEAAA",string4="HHHHxx" 280108800000000000 +tenk unique1=742i,unique2=3242i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=742i,twothousand=742i,fivethous=742i,tenthous=742i,odd=84i,even=85i,stringu1="OCAAAA",stringu2="SUEAAA",string4="OOOOxx" 280195200000000000 +tenk unique1=4426i,unique2=3243i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=426i,twothousand=426i,fivethous=4426i,tenthous=4426i,odd=52i,even=53i,stringu1="GOAAAA",stringu2="TUEAAA",string4="VVVVxx" 280281600000000000 +tenk unique1=4571i,unique2=3244i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=571i,twothousand=571i,fivethous=4571i,tenthous=4571i,odd=142i,even=143i,stringu1="VTAAAA",stringu2="UUEAAA",string4="AAAAxx" 280368000000000000 +tenk unique1=4775i,unique2=3245i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=775i,twothousand=775i,fivethous=4775i,tenthous=4775i,odd=150i,even=151i,stringu1="RBAAAA",stringu2="VUEAAA",string4="HHHHxx" 280454400000000000 +tenk unique1=24i,unique2=3246i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=24i,twothousand=24i,fivethous=24i,tenthous=24i,odd=48i,even=49i,stringu1="YAAAAA",stringu2="WUEAAA",string4="OOOOxx" 280540800000000000 +tenk unique1=4175i,unique2=3247i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=175i,twothousand=175i,fivethous=4175i,tenthous=4175i,odd=150i,even=151i,stringu1="PEAAAA",stringu2="XUEAAA",string4="VVVVxx" 280627200000000000 +tenk unique1=9877i,unique2=3248i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=877i,twothousand=1877i,fivethous=4877i,tenthous=9877i,odd=154i,even=155i,stringu1="XPAAAA",stringu2="YUEAAA",string4="AAAAxx" 280713600000000000 +tenk unique1=7271i,unique2=3249i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=271i,twothousand=1271i,fivethous=2271i,tenthous=7271i,odd=142i,even=143i,stringu1="RTAAAA",stringu2="ZUEAAA",string4="HHHHxx" 280800000000000000 +tenk unique1=5468i,unique2=3250i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=468i,twothousand=1468i,fivethous=468i,tenthous=5468i,odd=136i,even=137i,stringu1="ICAAAA",stringu2="AVEAAA",string4="OOOOxx" 280886400000000000 +tenk unique1=6106i,unique2=3251i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=106i,twothousand=106i,fivethous=1106i,tenthous=6106i,odd=12i,even=13i,stringu1="WAAAAA",stringu2="BVEAAA",string4="VVVVxx" 280972800000000000 +tenk unique1=9005i,unique2=3252i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=1005i,fivethous=4005i,tenthous=9005i,odd=10i,even=11i,stringu1="JIAAAA",stringu2="CVEAAA",string4="AAAAxx" 281059200000000000 +tenk unique1=109i,unique2=3253i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=109i,twothousand=109i,fivethous=109i,tenthous=109i,odd=18i,even=19i,stringu1="FEAAAA",stringu2="DVEAAA",string4="HHHHxx" 281145600000000000 +tenk unique1=6365i,unique2=3254i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=365i,twothousand=365i,fivethous=1365i,tenthous=6365i,odd=130i,even=131i,stringu1="VKAAAA",stringu2="EVEAAA",string4="OOOOxx" 281232000000000000 +tenk unique1=7437i,unique2=3255i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=437i,twothousand=1437i,fivethous=2437i,tenthous=7437i,odd=74i,even=75i,stringu1="BAAAAA",stringu2="FVEAAA",string4="VVVVxx" 281318400000000000 +tenk unique1=7979i,unique2=3256i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=979i,twothousand=1979i,fivethous=2979i,tenthous=7979i,odd=158i,even=159i,stringu1="XUAAAA",stringu2="GVEAAA",string4="AAAAxx" 281404800000000000 +tenk unique1=6050i,unique2=3257i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=50i,twothousand=50i,fivethous=1050i,tenthous=6050i,odd=100i,even=101i,stringu1="SYAAAA",stringu2="HVEAAA",string4="HHHHxx" 281491200000000000 +tenk unique1=2853i,unique2=3258i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=853i,twothousand=853i,fivethous=2853i,tenthous=2853i,odd=106i,even=107i,stringu1="TFAAAA",stringu2="IVEAAA",string4="OOOOxx" 281577600000000000 +tenk unique1=7603i,unique2=3259i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=603i,twothousand=1603i,fivethous=2603i,tenthous=7603i,odd=6i,even=7i,stringu1="LGAAAA",stringu2="JVEAAA",string4="VVVVxx" 281664000000000000 +tenk unique1=483i,unique2=3260i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=483i,twothousand=483i,fivethous=483i,tenthous=483i,odd=166i,even=167i,stringu1="PSAAAA",stringu2="KVEAAA",string4="AAAAxx" 281750400000000000 +tenk unique1=5994i,unique2=3261i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=994i,twothousand=1994i,fivethous=994i,tenthous=5994i,odd=188i,even=189i,stringu1="OWAAAA",stringu2="LVEAAA",string4="HHHHxx" 281836800000000000 +tenk unique1=6708i,unique2=3262i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=708i,twothousand=708i,fivethous=1708i,tenthous=6708i,odd=16i,even=17i,stringu1="AYAAAA",stringu2="MVEAAA",string4="OOOOxx" 281923200000000000 +tenk unique1=5090i,unique2=3263i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=90i,twothousand=1090i,fivethous=90i,tenthous=5090i,odd=180i,even=181i,stringu1="UNAAAA",stringu2="NVEAAA",string4="VVVVxx" 282009600000000000 +tenk unique1=4608i,unique2=3264i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=608i,twothousand=608i,fivethous=4608i,tenthous=4608i,odd=16i,even=17i,stringu1="GVAAAA",stringu2="OVEAAA",string4="AAAAxx" 282096000000000000 +tenk unique1=4551i,unique2=3265i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=551i,twothousand=551i,fivethous=4551i,tenthous=4551i,odd=102i,even=103i,stringu1="BTAAAA",stringu2="PVEAAA",string4="HHHHxx" 282182400000000000 +tenk unique1=5437i,unique2=3266i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=437i,twothousand=1437i,fivethous=437i,tenthous=5437i,odd=74i,even=75i,stringu1="DBAAAA",stringu2="QVEAAA",string4="OOOOxx" 282268800000000000 +tenk unique1=4130i,unique2=3267i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=130i,twothousand=130i,fivethous=4130i,tenthous=4130i,odd=60i,even=61i,stringu1="WCAAAA",stringu2="RVEAAA",string4="VVVVxx" 282355200000000000 +tenk unique1=6363i,unique2=3268i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=363i,twothousand=363i,fivethous=1363i,tenthous=6363i,odd=126i,even=127i,stringu1="TKAAAA",stringu2="SVEAAA",string4="AAAAxx" 282441600000000000 +tenk unique1=1499i,unique2=3269i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=499i,twothousand=1499i,fivethous=1499i,tenthous=1499i,odd=198i,even=199i,stringu1="RFAAAA",stringu2="TVEAAA",string4="HHHHxx" 282528000000000000 +tenk unique1=384i,unique2=3270i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=384i,twothousand=384i,fivethous=384i,tenthous=384i,odd=168i,even=169i,stringu1="UOAAAA",stringu2="UVEAAA",string4="OOOOxx" 282614400000000000 +tenk unique1=2266i,unique2=3271i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=266i,twothousand=266i,fivethous=2266i,tenthous=2266i,odd=132i,even=133i,stringu1="EJAAAA",stringu2="VVEAAA",string4="VVVVxx" 282700800000000000 +tenk unique1=6018i,unique2=3272i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=18i,twothousand=18i,fivethous=1018i,tenthous=6018i,odd=36i,even=37i,stringu1="MXAAAA",stringu2="WVEAAA",string4="AAAAxx" 282787200000000000 +tenk unique1=7915i,unique2=3273i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=915i,twothousand=1915i,fivethous=2915i,tenthous=7915i,odd=30i,even=31i,stringu1="LSAAAA",stringu2="XVEAAA",string4="HHHHxx" 282873600000000000 +tenk unique1=6167i,unique2=3274i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=167i,twothousand=167i,fivethous=1167i,tenthous=6167i,odd=134i,even=135i,stringu1="FDAAAA",stringu2="YVEAAA",string4="OOOOxx" 282960000000000000 +tenk unique1=9988i,unique2=3275i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=988i,twothousand=1988i,fivethous=4988i,tenthous=9988i,odd=176i,even=177i,stringu1="EUAAAA",stringu2="ZVEAAA",string4="VVVVxx" 283046400000000000 +tenk unique1=6599i,unique2=3276i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=599i,twothousand=599i,fivethous=1599i,tenthous=6599i,odd=198i,even=199i,stringu1="VTAAAA",stringu2="AWEAAA",string4="AAAAxx" 283132800000000000 +tenk unique1=1693i,unique2=3277i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=693i,twothousand=1693i,fivethous=1693i,tenthous=1693i,odd=186i,even=187i,stringu1="DNAAAA",stringu2="BWEAAA",string4="HHHHxx" 283219200000000000 +tenk unique1=5971i,unique2=3278i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=971i,twothousand=1971i,fivethous=971i,tenthous=5971i,odd=142i,even=143i,stringu1="RVAAAA",stringu2="CWEAAA",string4="OOOOxx" 283305600000000000 +tenk unique1=8470i,unique2=3279i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=470i,twothousand=470i,fivethous=3470i,tenthous=8470i,odd=140i,even=141i,stringu1="UNAAAA",stringu2="DWEAAA",string4="VVVVxx" 283392000000000000 +tenk unique1=2807i,unique2=3280i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=807i,twothousand=807i,fivethous=2807i,tenthous=2807i,odd=14i,even=15i,stringu1="ZDAAAA",stringu2="EWEAAA",string4="AAAAxx" 283478400000000000 +tenk unique1=1120i,unique2=3281i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=120i,twothousand=1120i,fivethous=1120i,tenthous=1120i,odd=40i,even=41i,stringu1="CRAAAA",stringu2="FWEAAA",string4="HHHHxx" 283564800000000000 +tenk unique1=5924i,unique2=3282i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=924i,twothousand=1924i,fivethous=924i,tenthous=5924i,odd=48i,even=49i,stringu1="WTAAAA",stringu2="GWEAAA",string4="OOOOxx" 283651200000000000 +tenk unique1=9025i,unique2=3283i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=25i,twothousand=1025i,fivethous=4025i,tenthous=9025i,odd=50i,even=51i,stringu1="DJAAAA",stringu2="HWEAAA",string4="VVVVxx" 283737600000000000 +tenk unique1=9454i,unique2=3284i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=454i,twothousand=1454i,fivethous=4454i,tenthous=9454i,odd=108i,even=109i,stringu1="QZAAAA",stringu2="IWEAAA",string4="AAAAxx" 283824000000000000 +tenk unique1=2259i,unique2=3285i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=259i,twothousand=259i,fivethous=2259i,tenthous=2259i,odd=118i,even=119i,stringu1="XIAAAA",stringu2="JWEAAA",string4="HHHHxx" 283910400000000000 +tenk unique1=5249i,unique2=3286i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=249i,twothousand=1249i,fivethous=249i,tenthous=5249i,odd=98i,even=99i,stringu1="XTAAAA",stringu2="KWEAAA",string4="OOOOxx" 283996800000000000 +tenk unique1=6350i,unique2=3287i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=350i,twothousand=350i,fivethous=1350i,tenthous=6350i,odd=100i,even=101i,stringu1="GKAAAA",stringu2="LWEAAA",string4="VVVVxx" 284083200000000000 +tenk unique1=2930i,unique2=3288i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=930i,twothousand=930i,fivethous=2930i,tenthous=2930i,odd=60i,even=61i,stringu1="SIAAAA",stringu2="MWEAAA",string4="AAAAxx" 284169600000000000 +tenk unique1=6055i,unique2=3289i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=55i,twothousand=55i,fivethous=1055i,tenthous=6055i,odd=110i,even=111i,stringu1="XYAAAA",stringu2="NWEAAA",string4="HHHHxx" 284256000000000000 +tenk unique1=7691i,unique2=3290i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=691i,twothousand=1691i,fivethous=2691i,tenthous=7691i,odd=182i,even=183i,stringu1="VJAAAA",stringu2="OWEAAA",string4="OOOOxx" 284342400000000000 +tenk unique1=1573i,unique2=3291i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=573i,twothousand=1573i,fivethous=1573i,tenthous=1573i,odd=146i,even=147i,stringu1="NIAAAA",stringu2="PWEAAA",string4="VVVVxx" 284428800000000000 +tenk unique1=9943i,unique2=3292i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=943i,twothousand=1943i,fivethous=4943i,tenthous=9943i,odd=86i,even=87i,stringu1="LSAAAA",stringu2="QWEAAA",string4="AAAAxx" 284515200000000000 +tenk unique1=3085i,unique2=3293i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=85i,twothousand=1085i,fivethous=3085i,tenthous=3085i,odd=170i,even=171i,stringu1="ROAAAA",stringu2="RWEAAA",string4="HHHHxx" 284601600000000000 +tenk unique1=5928i,unique2=3294i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=928i,twothousand=1928i,fivethous=928i,tenthous=5928i,odd=56i,even=57i,stringu1="AUAAAA",stringu2="SWEAAA",string4="OOOOxx" 284688000000000000 +tenk unique1=887i,unique2=3295i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=887i,twothousand=887i,fivethous=887i,tenthous=887i,odd=174i,even=175i,stringu1="DIAAAA",stringu2="TWEAAA",string4="VVVVxx" 284774400000000000 +tenk unique1=4630i,unique2=3296i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=630i,twothousand=630i,fivethous=4630i,tenthous=4630i,odd=60i,even=61i,stringu1="CWAAAA",stringu2="UWEAAA",string4="AAAAxx" 284860800000000000 +tenk unique1=9827i,unique2=3297i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=827i,twothousand=1827i,fivethous=4827i,tenthous=9827i,odd=54i,even=55i,stringu1="ZNAAAA",stringu2="VWEAAA",string4="HHHHxx" 284947200000000000 +tenk unique1=8926i,unique2=3298i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=926i,twothousand=926i,fivethous=3926i,tenthous=8926i,odd=52i,even=53i,stringu1="IFAAAA",stringu2="WWEAAA",string4="OOOOxx" 285033600000000000 +tenk unique1=5726i,unique2=3299i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=726i,twothousand=1726i,fivethous=726i,tenthous=5726i,odd=52i,even=53i,stringu1="GMAAAA",stringu2="XWEAAA",string4="VVVVxx" 285120000000000000 +tenk unique1=1569i,unique2=3300i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=569i,twothousand=1569i,fivethous=1569i,tenthous=1569i,odd=138i,even=139i,stringu1="JIAAAA",stringu2="YWEAAA",string4="AAAAxx" 285206400000000000 +tenk unique1=8074i,unique2=3301i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=74i,twothousand=74i,fivethous=3074i,tenthous=8074i,odd=148i,even=149i,stringu1="OYAAAA",stringu2="ZWEAAA",string4="HHHHxx" 285292800000000000 +tenk unique1=7909i,unique2=3302i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=909i,twothousand=1909i,fivethous=2909i,tenthous=7909i,odd=18i,even=19i,stringu1="FSAAAA",stringu2="AXEAAA",string4="OOOOxx" 285379200000000000 +tenk unique1=8367i,unique2=3303i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=367i,twothousand=367i,fivethous=3367i,tenthous=8367i,odd=134i,even=135i,stringu1="VJAAAA",stringu2="BXEAAA",string4="VVVVxx" 285465600000000000 +tenk unique1=7217i,unique2=3304i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=217i,twothousand=1217i,fivethous=2217i,tenthous=7217i,odd=34i,even=35i,stringu1="PRAAAA",stringu2="CXEAAA",string4="AAAAxx" 285552000000000000 +tenk unique1=5254i,unique2=3305i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=254i,twothousand=1254i,fivethous=254i,tenthous=5254i,odd=108i,even=109i,stringu1="CUAAAA",stringu2="DXEAAA",string4="HHHHxx" 285638400000000000 +tenk unique1=1181i,unique2=3306i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=181i,twothousand=1181i,fivethous=1181i,tenthous=1181i,odd=162i,even=163i,stringu1="LTAAAA",stringu2="EXEAAA",string4="OOOOxx" 285724800000000000 +tenk unique1=6907i,unique2=3307i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=907i,twothousand=907i,fivethous=1907i,tenthous=6907i,odd=14i,even=15i,stringu1="RFAAAA",stringu2="FXEAAA",string4="VVVVxx" 285811200000000000 +tenk unique1=5508i,unique2=3308i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=508i,twothousand=1508i,fivethous=508i,tenthous=5508i,odd=16i,even=17i,stringu1="WDAAAA",stringu2="GXEAAA",string4="AAAAxx" 285897600000000000 +tenk unique1=4782i,unique2=3309i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=782i,twothousand=782i,fivethous=4782i,tenthous=4782i,odd=164i,even=165i,stringu1="YBAAAA",stringu2="HXEAAA",string4="HHHHxx" 285984000000000000 +tenk unique1=793i,unique2=3310i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=793i,twothousand=793i,fivethous=793i,tenthous=793i,odd=186i,even=187i,stringu1="NEAAAA",stringu2="IXEAAA",string4="OOOOxx" 286070400000000000 +tenk unique1=5740i,unique2=3311i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=740i,twothousand=1740i,fivethous=740i,tenthous=5740i,odd=80i,even=81i,stringu1="UMAAAA",stringu2="JXEAAA",string4="VVVVxx" 286156800000000000 +tenk unique1=3107i,unique2=3312i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=107i,twothousand=1107i,fivethous=3107i,tenthous=3107i,odd=14i,even=15i,stringu1="NPAAAA",stringu2="KXEAAA",string4="AAAAxx" 286243200000000000 +tenk unique1=1197i,unique2=3313i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=197i,twothousand=1197i,fivethous=1197i,tenthous=1197i,odd=194i,even=195i,stringu1="BUAAAA",stringu2="LXEAAA",string4="HHHHxx" 286329600000000000 +tenk unique1=4376i,unique2=3314i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=376i,twothousand=376i,fivethous=4376i,tenthous=4376i,odd=152i,even=153i,stringu1="IMAAAA",stringu2="MXEAAA",string4="OOOOxx" 286416000000000000 +tenk unique1=6226i,unique2=3315i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=226i,twothousand=226i,fivethous=1226i,tenthous=6226i,odd=52i,even=53i,stringu1="MFAAAA",stringu2="NXEAAA",string4="VVVVxx" 286502400000000000 +tenk unique1=5033i,unique2=3316i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=33i,twothousand=1033i,fivethous=33i,tenthous=5033i,odd=66i,even=67i,stringu1="PLAAAA",stringu2="OXEAAA",string4="AAAAxx" 286588800000000000 +tenk unique1=5494i,unique2=3317i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=494i,twothousand=1494i,fivethous=494i,tenthous=5494i,odd=188i,even=189i,stringu1="IDAAAA",stringu2="PXEAAA",string4="HHHHxx" 286675200000000000 +tenk unique1=3244i,unique2=3318i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=244i,twothousand=1244i,fivethous=3244i,tenthous=3244i,odd=88i,even=89i,stringu1="UUAAAA",stringu2="QXEAAA",string4="OOOOxx" 286761600000000000 +tenk unique1=7670i,unique2=3319i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=670i,twothousand=1670i,fivethous=2670i,tenthous=7670i,odd=140i,even=141i,stringu1="AJAAAA",stringu2="RXEAAA",string4="VVVVxx" 286848000000000000 +tenk unique1=9273i,unique2=3320i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=273i,twothousand=1273i,fivethous=4273i,tenthous=9273i,odd=146i,even=147i,stringu1="RSAAAA",stringu2="SXEAAA",string4="AAAAxx" 286934400000000000 +tenk unique1=5248i,unique2=3321i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=248i,twothousand=1248i,fivethous=248i,tenthous=5248i,odd=96i,even=97i,stringu1="WTAAAA",stringu2="TXEAAA",string4="HHHHxx" 287020800000000000 +tenk unique1=3381i,unique2=3322i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=381i,twothousand=1381i,fivethous=3381i,tenthous=3381i,odd=162i,even=163i,stringu1="BAAAAA",stringu2="UXEAAA",string4="OOOOxx" 287107200000000000 +tenk unique1=4136i,unique2=3323i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=136i,twothousand=136i,fivethous=4136i,tenthous=4136i,odd=72i,even=73i,stringu1="CDAAAA",stringu2="VXEAAA",string4="VVVVxx" 287193600000000000 +tenk unique1=4163i,unique2=3324i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=163i,twothousand=163i,fivethous=4163i,tenthous=4163i,odd=126i,even=127i,stringu1="DEAAAA",stringu2="WXEAAA",string4="AAAAxx" 287280000000000000 +tenk unique1=4270i,unique2=3325i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=270i,twothousand=270i,fivethous=4270i,tenthous=4270i,odd=140i,even=141i,stringu1="GIAAAA",stringu2="XXEAAA",string4="HHHHxx" 287366400000000000 +tenk unique1=1729i,unique2=3326i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=729i,twothousand=1729i,fivethous=1729i,tenthous=1729i,odd=58i,even=59i,stringu1="NOAAAA",stringu2="YXEAAA",string4="OOOOxx" 287452800000000000 +tenk unique1=2778i,unique2=3327i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=778i,twothousand=778i,fivethous=2778i,tenthous=2778i,odd=156i,even=157i,stringu1="WCAAAA",stringu2="ZXEAAA",string4="VVVVxx" 287539200000000000 +tenk unique1=5082i,unique2=3328i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=82i,twothousand=1082i,fivethous=82i,tenthous=5082i,odd=164i,even=165i,stringu1="MNAAAA",stringu2="AYEAAA",string4="AAAAxx" 287625600000000000 +tenk unique1=870i,unique2=3329i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=870i,twothousand=870i,fivethous=870i,tenthous=870i,odd=140i,even=141i,stringu1="MHAAAA",stringu2="BYEAAA",string4="HHHHxx" 287712000000000000 +tenk unique1=4192i,unique2=3330i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=192i,twothousand=192i,fivethous=4192i,tenthous=4192i,odd=184i,even=185i,stringu1="GFAAAA",stringu2="CYEAAA",string4="OOOOxx" 287798400000000000 +tenk unique1=308i,unique2=3331i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=308i,twothousand=308i,fivethous=308i,tenthous=308i,odd=16i,even=17i,stringu1="WLAAAA",stringu2="DYEAAA",string4="VVVVxx" 287884800000000000 +tenk unique1=6783i,unique2=3332i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=783i,twothousand=783i,fivethous=1783i,tenthous=6783i,odd=166i,even=167i,stringu1="XAAAAA",stringu2="EYEAAA",string4="AAAAxx" 287971200000000000 +tenk unique1=7611i,unique2=3333i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=611i,twothousand=1611i,fivethous=2611i,tenthous=7611i,odd=22i,even=23i,stringu1="TGAAAA",stringu2="FYEAAA",string4="HHHHxx" 288057600000000000 +tenk unique1=4221i,unique2=3334i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=221i,twothousand=221i,fivethous=4221i,tenthous=4221i,odd=42i,even=43i,stringu1="JGAAAA",stringu2="GYEAAA",string4="OOOOxx" 288144000000000000 +tenk unique1=6353i,unique2=3335i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=353i,twothousand=353i,fivethous=1353i,tenthous=6353i,odd=106i,even=107i,stringu1="JKAAAA",stringu2="HYEAAA",string4="VVVVxx" 288230400000000000 +tenk unique1=1830i,unique2=3336i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=830i,twothousand=1830i,fivethous=1830i,tenthous=1830i,odd=60i,even=61i,stringu1="KSAAAA",stringu2="IYEAAA",string4="AAAAxx" 288316800000000000 +tenk unique1=2437i,unique2=3337i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=437i,twothousand=437i,fivethous=2437i,tenthous=2437i,odd=74i,even=75i,stringu1="TPAAAA",stringu2="JYEAAA",string4="HHHHxx" 288403200000000000 +tenk unique1=3360i,unique2=3338i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=360i,twothousand=1360i,fivethous=3360i,tenthous=3360i,odd=120i,even=121i,stringu1="GZAAAA",stringu2="KYEAAA",string4="OOOOxx" 288489600000000000 +tenk unique1=1829i,unique2=3339i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=829i,twothousand=1829i,fivethous=1829i,tenthous=1829i,odd=58i,even=59i,stringu1="JSAAAA",stringu2="LYEAAA",string4="VVVVxx" 288576000000000000 +tenk unique1=9475i,unique2=3340i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=475i,twothousand=1475i,fivethous=4475i,tenthous=9475i,odd=150i,even=151i,stringu1="LAAAAA",stringu2="MYEAAA",string4="AAAAxx" 288662400000000000 +tenk unique1=4566i,unique2=3341i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=566i,twothousand=566i,fivethous=4566i,tenthous=4566i,odd=132i,even=133i,stringu1="QTAAAA",stringu2="NYEAAA",string4="HHHHxx" 288748800000000000 +tenk unique1=9944i,unique2=3342i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=944i,twothousand=1944i,fivethous=4944i,tenthous=9944i,odd=88i,even=89i,stringu1="MSAAAA",stringu2="OYEAAA",string4="OOOOxx" 288835200000000000 +tenk unique1=6054i,unique2=3343i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=54i,twothousand=54i,fivethous=1054i,tenthous=6054i,odd=108i,even=109i,stringu1="WYAAAA",stringu2="PYEAAA",string4="VVVVxx" 288921600000000000 +tenk unique1=4722i,unique2=3344i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=722i,twothousand=722i,fivethous=4722i,tenthous=4722i,odd=44i,even=45i,stringu1="QZAAAA",stringu2="QYEAAA",string4="AAAAxx" 289008000000000000 +tenk unique1=2779i,unique2=3345i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=779i,twothousand=779i,fivethous=2779i,tenthous=2779i,odd=158i,even=159i,stringu1="XCAAAA",stringu2="RYEAAA",string4="HHHHxx" 289094400000000000 +tenk unique1=8051i,unique2=3346i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=51i,twothousand=51i,fivethous=3051i,tenthous=8051i,odd=102i,even=103i,stringu1="RXAAAA",stringu2="SYEAAA",string4="OOOOxx" 289180800000000000 +tenk unique1=9671i,unique2=3347i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=671i,twothousand=1671i,fivethous=4671i,tenthous=9671i,odd=142i,even=143i,stringu1="ZHAAAA",stringu2="TYEAAA",string4="VVVVxx" 289267200000000000 +tenk unique1=6084i,unique2=3348i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=84i,twothousand=84i,fivethous=1084i,tenthous=6084i,odd=168i,even=169i,stringu1="AAAAAA",stringu2="UYEAAA",string4="AAAAxx" 289353600000000000 +tenk unique1=3729i,unique2=3349i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=729i,twothousand=1729i,fivethous=3729i,tenthous=3729i,odd=58i,even=59i,stringu1="LNAAAA",stringu2="VYEAAA",string4="HHHHxx" 289440000000000000 +tenk unique1=6627i,unique2=3350i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=627i,twothousand=627i,fivethous=1627i,tenthous=6627i,odd=54i,even=55i,stringu1="XUAAAA",stringu2="WYEAAA",string4="OOOOxx" 289526400000000000 +tenk unique1=4769i,unique2=3351i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=769i,twothousand=769i,fivethous=4769i,tenthous=4769i,odd=138i,even=139i,stringu1="LBAAAA",stringu2="XYEAAA",string4="VVVVxx" 289612800000000000 +tenk unique1=2224i,unique2=3352i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=224i,twothousand=224i,fivethous=2224i,tenthous=2224i,odd=48i,even=49i,stringu1="OHAAAA",stringu2="YYEAAA",string4="AAAAxx" 289699200000000000 +tenk unique1=1404i,unique2=3353i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=404i,twothousand=1404i,fivethous=1404i,tenthous=1404i,odd=8i,even=9i,stringu1="ACAAAA",stringu2="ZYEAAA",string4="HHHHxx" 289785600000000000 +tenk unique1=8532i,unique2=3354i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=532i,twothousand=532i,fivethous=3532i,tenthous=8532i,odd=64i,even=65i,stringu1="EQAAAA",stringu2="AZEAAA",string4="OOOOxx" 289872000000000000 +tenk unique1=6759i,unique2=3355i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=759i,twothousand=759i,fivethous=1759i,tenthous=6759i,odd=118i,even=119i,stringu1="ZZAAAA",stringu2="BZEAAA",string4="VVVVxx" 289958400000000000 +tenk unique1=6404i,unique2=3356i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=404i,twothousand=404i,fivethous=1404i,tenthous=6404i,odd=8i,even=9i,stringu1="IMAAAA",stringu2="CZEAAA",string4="AAAAxx" 290044800000000000 +tenk unique1=3144i,unique2=3357i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=144i,twothousand=1144i,fivethous=3144i,tenthous=3144i,odd=88i,even=89i,stringu1="YQAAAA",stringu2="DZEAAA",string4="HHHHxx" 290131200000000000 +tenk unique1=973i,unique2=3358i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=973i,twothousand=973i,fivethous=973i,tenthous=973i,odd=146i,even=147i,stringu1="LLAAAA",stringu2="EZEAAA",string4="OOOOxx" 290217600000000000 +tenk unique1=9789i,unique2=3359i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=789i,twothousand=1789i,fivethous=4789i,tenthous=9789i,odd=178i,even=179i,stringu1="NMAAAA",stringu2="FZEAAA",string4="VVVVxx" 290304000000000000 +tenk unique1=6181i,unique2=3360i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=181i,twothousand=181i,fivethous=1181i,tenthous=6181i,odd=162i,even=163i,stringu1="TDAAAA",stringu2="GZEAAA",string4="AAAAxx" 290390400000000000 +tenk unique1=1519i,unique2=3361i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=519i,twothousand=1519i,fivethous=1519i,tenthous=1519i,odd=38i,even=39i,stringu1="LGAAAA",stringu2="HZEAAA",string4="HHHHxx" 290476800000000000 +tenk unique1=9729i,unique2=3362i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=729i,twothousand=1729i,fivethous=4729i,tenthous=9729i,odd=58i,even=59i,stringu1="FKAAAA",stringu2="IZEAAA",string4="OOOOxx" 290563200000000000 +tenk unique1=8167i,unique2=3363i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=167i,twothousand=167i,fivethous=3167i,tenthous=8167i,odd=134i,even=135i,stringu1="DCAAAA",stringu2="JZEAAA",string4="VVVVxx" 290649600000000000 +tenk unique1=3830i,unique2=3364i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=830i,twothousand=1830i,fivethous=3830i,tenthous=3830i,odd=60i,even=61i,stringu1="IRAAAA",stringu2="KZEAAA",string4="AAAAxx" 290736000000000000 +tenk unique1=6286i,unique2=3365i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=286i,twothousand=286i,fivethous=1286i,tenthous=6286i,odd=172i,even=173i,stringu1="UHAAAA",stringu2="LZEAAA",string4="HHHHxx" 290822400000000000 +tenk unique1=3047i,unique2=3366i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=47i,twothousand=1047i,fivethous=3047i,tenthous=3047i,odd=94i,even=95i,stringu1="FNAAAA",stringu2="MZEAAA",string4="OOOOxx" 290908800000000000 +tenk unique1=3183i,unique2=3367i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=183i,twothousand=1183i,fivethous=3183i,tenthous=3183i,odd=166i,even=167i,stringu1="LSAAAA",stringu2="NZEAAA",string4="VVVVxx" 290995200000000000 +tenk unique1=6687i,unique2=3368i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=687i,twothousand=687i,fivethous=1687i,tenthous=6687i,odd=174i,even=175i,stringu1="FXAAAA",stringu2="OZEAAA",string4="AAAAxx" 291081600000000000 +tenk unique1=2783i,unique2=3369i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=783i,twothousand=783i,fivethous=2783i,tenthous=2783i,odd=166i,even=167i,stringu1="BDAAAA",stringu2="PZEAAA",string4="HHHHxx" 291168000000000000 +tenk unique1=9920i,unique2=3370i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=920i,twothousand=1920i,fivethous=4920i,tenthous=9920i,odd=40i,even=41i,stringu1="ORAAAA",stringu2="QZEAAA",string4="OOOOxx" 291254400000000000 +tenk unique1=4847i,unique2=3371i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=847i,twothousand=847i,fivethous=4847i,tenthous=4847i,odd=94i,even=95i,stringu1="LEAAAA",stringu2="RZEAAA",string4="VVVVxx" 291340800000000000 +tenk unique1=3645i,unique2=3372i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=645i,twothousand=1645i,fivethous=3645i,tenthous=3645i,odd=90i,even=91i,stringu1="FKAAAA",stringu2="SZEAAA",string4="AAAAxx" 291427200000000000 +tenk unique1=7406i,unique2=3373i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=406i,twothousand=1406i,fivethous=2406i,tenthous=7406i,odd=12i,even=13i,stringu1="WYAAAA",stringu2="TZEAAA",string4="HHHHxx" 291513600000000000 +tenk unique1=6003i,unique2=3374i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=3i,fivethous=1003i,tenthous=6003i,odd=6i,even=7i,stringu1="XWAAAA",stringu2="UZEAAA",string4="OOOOxx" 291600000000000000 +tenk unique1=3408i,unique2=3375i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=408i,twothousand=1408i,fivethous=3408i,tenthous=3408i,odd=16i,even=17i,stringu1="CBAAAA",stringu2="VZEAAA",string4="VVVVxx" 291686400000000000 +tenk unique1=4243i,unique2=3376i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=243i,twothousand=243i,fivethous=4243i,tenthous=4243i,odd=86i,even=87i,stringu1="FHAAAA",stringu2="WZEAAA",string4="AAAAxx" 291772800000000000 +tenk unique1=1622i,unique2=3377i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=622i,twothousand=1622i,fivethous=1622i,tenthous=1622i,odd=44i,even=45i,stringu1="KKAAAA",stringu2="XZEAAA",string4="HHHHxx" 291859200000000000 +tenk unique1=5319i,unique2=3378i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=319i,twothousand=1319i,fivethous=319i,tenthous=5319i,odd=38i,even=39i,stringu1="PWAAAA",stringu2="YZEAAA",string4="OOOOxx" 291945600000000000 +tenk unique1=4033i,unique2=3379i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=33i,twothousand=33i,fivethous=4033i,tenthous=4033i,odd=66i,even=67i,stringu1="DZAAAA",stringu2="ZZEAAA",string4="VVVVxx" 292032000000000000 +tenk unique1=8573i,unique2=3380i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=573i,twothousand=573i,fivethous=3573i,tenthous=8573i,odd=146i,even=147i,stringu1="TRAAAA",stringu2="AAFAAA",string4="AAAAxx" 292118400000000000 +tenk unique1=8404i,unique2=3381i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=404i,twothousand=404i,fivethous=3404i,tenthous=8404i,odd=8i,even=9i,stringu1="GLAAAA",stringu2="BAFAAA",string4="HHHHxx" 292204800000000000 +tenk unique1=6993i,unique2=3382i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=993i,twothousand=993i,fivethous=1993i,tenthous=6993i,odd=186i,even=187i,stringu1="ZIAAAA",stringu2="CAFAAA",string4="OOOOxx" 292291200000000000 +tenk unique1=660i,unique2=3383i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=660i,twothousand=660i,fivethous=660i,tenthous=660i,odd=120i,even=121i,stringu1="KZAAAA",stringu2="DAFAAA",string4="VVVVxx" 292377600000000000 +tenk unique1=1136i,unique2=3384i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=136i,twothousand=1136i,fivethous=1136i,tenthous=1136i,odd=72i,even=73i,stringu1="SRAAAA",stringu2="EAFAAA",string4="AAAAxx" 292464000000000000 +tenk unique1=3393i,unique2=3385i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=393i,twothousand=1393i,fivethous=3393i,tenthous=3393i,odd=186i,even=187i,stringu1="NAAAAA",stringu2="FAFAAA",string4="HHHHxx" 292550400000000000 +tenk unique1=9743i,unique2=3386i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=743i,twothousand=1743i,fivethous=4743i,tenthous=9743i,odd=86i,even=87i,stringu1="TKAAAA",stringu2="GAFAAA",string4="OOOOxx" 292636800000000000 +tenk unique1=9705i,unique2=3387i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=705i,twothousand=1705i,fivethous=4705i,tenthous=9705i,odd=10i,even=11i,stringu1="HJAAAA",stringu2="HAFAAA",string4="VVVVxx" 292723200000000000 +tenk unique1=6960i,unique2=3388i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=960i,twothousand=960i,fivethous=1960i,tenthous=6960i,odd=120i,even=121i,stringu1="SHAAAA",stringu2="IAFAAA",string4="AAAAxx" 292809600000000000 +tenk unique1=2753i,unique2=3389i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=753i,twothousand=753i,fivethous=2753i,tenthous=2753i,odd=106i,even=107i,stringu1="XBAAAA",stringu2="JAFAAA",string4="HHHHxx" 292896000000000000 +tenk unique1=906i,unique2=3390i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=906i,twothousand=906i,fivethous=906i,tenthous=906i,odd=12i,even=13i,stringu1="WIAAAA",stringu2="KAFAAA",string4="OOOOxx" 292982400000000000 +tenk unique1=999i,unique2=3391i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=999i,twothousand=999i,fivethous=999i,tenthous=999i,odd=198i,even=199i,stringu1="LMAAAA",stringu2="LAFAAA",string4="VVVVxx" 293068800000000000 +tenk unique1=6927i,unique2=3392i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=927i,twothousand=927i,fivethous=1927i,tenthous=6927i,odd=54i,even=55i,stringu1="LGAAAA",stringu2="MAFAAA",string4="AAAAxx" 293155200000000000 +tenk unique1=4846i,unique2=3393i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=846i,twothousand=846i,fivethous=4846i,tenthous=4846i,odd=92i,even=93i,stringu1="KEAAAA",stringu2="NAFAAA",string4="HHHHxx" 293241600000000000 +tenk unique1=676i,unique2=3394i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=676i,twothousand=676i,fivethous=676i,tenthous=676i,odd=152i,even=153i,stringu1="AAAAAA",stringu2="OAFAAA",string4="OOOOxx" 293328000000000000 +tenk unique1=8612i,unique2=3395i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=612i,twothousand=612i,fivethous=3612i,tenthous=8612i,odd=24i,even=25i,stringu1="GTAAAA",stringu2="PAFAAA",string4="VVVVxx" 293414400000000000 +tenk unique1=4111i,unique2=3396i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=111i,twothousand=111i,fivethous=4111i,tenthous=4111i,odd=22i,even=23i,stringu1="DCAAAA",stringu2="QAFAAA",string4="AAAAxx" 293500800000000000 +tenk unique1=9994i,unique2=3397i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=994i,twothousand=1994i,fivethous=4994i,tenthous=9994i,odd=188i,even=189i,stringu1="KUAAAA",stringu2="RAFAAA",string4="HHHHxx" 293587200000000000 +tenk unique1=4399i,unique2=3398i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=399i,twothousand=399i,fivethous=4399i,tenthous=4399i,odd=198i,even=199i,stringu1="FNAAAA",stringu2="SAFAAA",string4="OOOOxx" 293673600000000000 +tenk unique1=4464i,unique2=3399i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=464i,twothousand=464i,fivethous=4464i,tenthous=4464i,odd=128i,even=129i,stringu1="SPAAAA",stringu2="TAFAAA",string4="VVVVxx" 293760000000000000 +tenk unique1=7316i,unique2=3400i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=316i,twothousand=1316i,fivethous=2316i,tenthous=7316i,odd=32i,even=33i,stringu1="KVAAAA",stringu2="UAFAAA",string4="AAAAxx" 293846400000000000 +tenk unique1=8982i,unique2=3401i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=982i,twothousand=982i,fivethous=3982i,tenthous=8982i,odd=164i,even=165i,stringu1="MHAAAA",stringu2="VAFAAA",string4="HHHHxx" 293932800000000000 +tenk unique1=1871i,unique2=3402i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=871i,twothousand=1871i,fivethous=1871i,tenthous=1871i,odd=142i,even=143i,stringu1="ZTAAAA",stringu2="WAFAAA",string4="OOOOxx" 294019200000000000 +tenk unique1=4082i,unique2=3403i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=82i,twothousand=82i,fivethous=4082i,tenthous=4082i,odd=164i,even=165i,stringu1="ABAAAA",stringu2="XAFAAA",string4="VVVVxx" 294105600000000000 +tenk unique1=3949i,unique2=3404i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=949i,twothousand=1949i,fivethous=3949i,tenthous=3949i,odd=98i,even=99i,stringu1="XVAAAA",stringu2="YAFAAA",string4="AAAAxx" 294192000000000000 +tenk unique1=9352i,unique2=3405i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=352i,twothousand=1352i,fivethous=4352i,tenthous=9352i,odd=104i,even=105i,stringu1="SVAAAA",stringu2="ZAFAAA",string4="HHHHxx" 294278400000000000 +tenk unique1=9638i,unique2=3406i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=638i,twothousand=1638i,fivethous=4638i,tenthous=9638i,odd=76i,even=77i,stringu1="SGAAAA",stringu2="ABFAAA",string4="OOOOxx" 294364800000000000 +tenk unique1=8177i,unique2=3407i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=177i,twothousand=177i,fivethous=3177i,tenthous=8177i,odd=154i,even=155i,stringu1="NCAAAA",stringu2="BBFAAA",string4="VVVVxx" 294451200000000000 +tenk unique1=3499i,unique2=3408i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=499i,twothousand=1499i,fivethous=3499i,tenthous=3499i,odd=198i,even=199i,stringu1="PEAAAA",stringu2="CBFAAA",string4="AAAAxx" 294537600000000000 +tenk unique1=4233i,unique2=3409i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=233i,twothousand=233i,fivethous=4233i,tenthous=4233i,odd=66i,even=67i,stringu1="VGAAAA",stringu2="DBFAAA",string4="HHHHxx" 294624000000000000 +tenk unique1=1953i,unique2=3410i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=953i,twothousand=1953i,fivethous=1953i,tenthous=1953i,odd=106i,even=107i,stringu1="DXAAAA",stringu2="EBFAAA",string4="OOOOxx" 294710400000000000 +tenk unique1=7372i,unique2=3411i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=372i,twothousand=1372i,fivethous=2372i,tenthous=7372i,odd=144i,even=145i,stringu1="OXAAAA",stringu2="FBFAAA",string4="VVVVxx" 294796800000000000 +tenk unique1=5127i,unique2=3412i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=127i,twothousand=1127i,fivethous=127i,tenthous=5127i,odd=54i,even=55i,stringu1="FPAAAA",stringu2="GBFAAA",string4="AAAAxx" 294883200000000000 +tenk unique1=4384i,unique2=3413i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=384i,twothousand=384i,fivethous=4384i,tenthous=4384i,odd=168i,even=169i,stringu1="QMAAAA",stringu2="HBFAAA",string4="HHHHxx" 294969600000000000 +tenk unique1=9964i,unique2=3414i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=964i,twothousand=1964i,fivethous=4964i,tenthous=9964i,odd=128i,even=129i,stringu1="GTAAAA",stringu2="IBFAAA",string4="OOOOxx" 295056000000000000 +tenk unique1=5392i,unique2=3415i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=392i,twothousand=1392i,fivethous=392i,tenthous=5392i,odd=184i,even=185i,stringu1="KZAAAA",stringu2="JBFAAA",string4="VVVVxx" 295142400000000000 +tenk unique1=616i,unique2=3416i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=616i,twothousand=616i,fivethous=616i,tenthous=616i,odd=32i,even=33i,stringu1="SXAAAA",stringu2="KBFAAA",string4="AAAAxx" 295228800000000000 +tenk unique1=591i,unique2=3417i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=591i,twothousand=591i,fivethous=591i,tenthous=591i,odd=182i,even=183i,stringu1="TWAAAA",stringu2="LBFAAA",string4="HHHHxx" 295315200000000000 +tenk unique1=6422i,unique2=3418i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=422i,twothousand=422i,fivethous=1422i,tenthous=6422i,odd=44i,even=45i,stringu1="ANAAAA",stringu2="MBFAAA",string4="OOOOxx" 295401600000000000 +tenk unique1=6551i,unique2=3419i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=551i,twothousand=551i,fivethous=1551i,tenthous=6551i,odd=102i,even=103i,stringu1="ZRAAAA",stringu2="NBFAAA",string4="VVVVxx" 295488000000000000 +tenk unique1=9286i,unique2=3420i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=286i,twothousand=1286i,fivethous=4286i,tenthous=9286i,odd=172i,even=173i,stringu1="ETAAAA",stringu2="OBFAAA",string4="AAAAxx" 295574400000000000 +tenk unique1=3817i,unique2=3421i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=817i,twothousand=1817i,fivethous=3817i,tenthous=3817i,odd=34i,even=35i,stringu1="VQAAAA",stringu2="PBFAAA",string4="HHHHxx" 295660800000000000 +tenk unique1=7717i,unique2=3422i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=717i,twothousand=1717i,fivethous=2717i,tenthous=7717i,odd=34i,even=35i,stringu1="VKAAAA",stringu2="QBFAAA",string4="OOOOxx" 295747200000000000 +tenk unique1=8718i,unique2=3423i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=718i,twothousand=718i,fivethous=3718i,tenthous=8718i,odd=36i,even=37i,stringu1="IXAAAA",stringu2="RBFAAA",string4="VVVVxx" 295833600000000000 +tenk unique1=8608i,unique2=3424i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=608i,twothousand=608i,fivethous=3608i,tenthous=8608i,odd=16i,even=17i,stringu1="CTAAAA",stringu2="SBFAAA",string4="AAAAxx" 295920000000000000 +tenk unique1=2242i,unique2=3425i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=242i,twothousand=242i,fivethous=2242i,tenthous=2242i,odd=84i,even=85i,stringu1="GIAAAA",stringu2="TBFAAA",string4="HHHHxx" 296006400000000000 +tenk unique1=4811i,unique2=3426i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=811i,twothousand=811i,fivethous=4811i,tenthous=4811i,odd=22i,even=23i,stringu1="BDAAAA",stringu2="UBFAAA",string4="OOOOxx" 296092800000000000 +tenk unique1=6838i,unique2=3427i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=838i,twothousand=838i,fivethous=1838i,tenthous=6838i,odd=76i,even=77i,stringu1="ADAAAA",stringu2="VBFAAA",string4="VVVVxx" 296179200000000000 +tenk unique1=787i,unique2=3428i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=787i,twothousand=787i,fivethous=787i,tenthous=787i,odd=174i,even=175i,stringu1="HEAAAA",stringu2="WBFAAA",string4="AAAAxx" 296265600000000000 +tenk unique1=7940i,unique2=3429i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=940i,twothousand=1940i,fivethous=2940i,tenthous=7940i,odd=80i,even=81i,stringu1="KTAAAA",stringu2="XBFAAA",string4="HHHHxx" 296352000000000000 +tenk unique1=336i,unique2=3430i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=336i,twothousand=336i,fivethous=336i,tenthous=336i,odd=72i,even=73i,stringu1="YMAAAA",stringu2="YBFAAA",string4="OOOOxx" 296438400000000000 +tenk unique1=9859i,unique2=3431i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=859i,twothousand=1859i,fivethous=4859i,tenthous=9859i,odd=118i,even=119i,stringu1="FPAAAA",stringu2="ZBFAAA",string4="VVVVxx" 296524800000000000 +tenk unique1=3864i,unique2=3432i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=864i,twothousand=1864i,fivethous=3864i,tenthous=3864i,odd=128i,even=129i,stringu1="QSAAAA",stringu2="ACFAAA",string4="AAAAxx" 296611200000000000 +tenk unique1=7162i,unique2=3433i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=162i,twothousand=1162i,fivethous=2162i,tenthous=7162i,odd=124i,even=125i,stringu1="MPAAAA",stringu2="BCFAAA",string4="HHHHxx" 296697600000000000 +tenk unique1=2071i,unique2=3434i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=71i,twothousand=71i,fivethous=2071i,tenthous=2071i,odd=142i,even=143i,stringu1="RBAAAA",stringu2="CCFAAA",string4="OOOOxx" 296784000000000000 +tenk unique1=7469i,unique2=3435i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=469i,twothousand=1469i,fivethous=2469i,tenthous=7469i,odd=138i,even=139i,stringu1="HBAAAA",stringu2="DCFAAA",string4="VVVVxx" 296870400000000000 +tenk unique1=2917i,unique2=3436i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=917i,twothousand=917i,fivethous=2917i,tenthous=2917i,odd=34i,even=35i,stringu1="FIAAAA",stringu2="ECFAAA",string4="AAAAxx" 296956800000000000 +tenk unique1=7486i,unique2=3437i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=486i,twothousand=1486i,fivethous=2486i,tenthous=7486i,odd=172i,even=173i,stringu1="YBAAAA",stringu2="FCFAAA",string4="HHHHxx" 297043200000000000 +tenk unique1=3355i,unique2=3438i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=355i,twothousand=1355i,fivethous=3355i,tenthous=3355i,odd=110i,even=111i,stringu1="BZAAAA",stringu2="GCFAAA",string4="OOOOxx" 297129600000000000 +tenk unique1=6998i,unique2=3439i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=998i,twothousand=998i,fivethous=1998i,tenthous=6998i,odd=196i,even=197i,stringu1="EJAAAA",stringu2="HCFAAA",string4="VVVVxx" 297216000000000000 +tenk unique1=5498i,unique2=3440i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=498i,twothousand=1498i,fivethous=498i,tenthous=5498i,odd=196i,even=197i,stringu1="MDAAAA",stringu2="ICFAAA",string4="AAAAxx" 297302400000000000 +tenk unique1=5113i,unique2=3441i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=113i,twothousand=1113i,fivethous=113i,tenthous=5113i,odd=26i,even=27i,stringu1="ROAAAA",stringu2="JCFAAA",string4="HHHHxx" 297388800000000000 +tenk unique1=2846i,unique2=3442i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=846i,twothousand=846i,fivethous=2846i,tenthous=2846i,odd=92i,even=93i,stringu1="MFAAAA",stringu2="KCFAAA",string4="OOOOxx" 297475200000000000 +tenk unique1=6834i,unique2=3443i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=834i,twothousand=834i,fivethous=1834i,tenthous=6834i,odd=68i,even=69i,stringu1="WCAAAA",stringu2="LCFAAA",string4="VVVVxx" 297561600000000000 +tenk unique1=8925i,unique2=3444i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=925i,twothousand=925i,fivethous=3925i,tenthous=8925i,odd=50i,even=51i,stringu1="HFAAAA",stringu2="MCFAAA",string4="AAAAxx" 297648000000000000 +tenk unique1=2757i,unique2=3445i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=757i,twothousand=757i,fivethous=2757i,tenthous=2757i,odd=114i,even=115i,stringu1="BCAAAA",stringu2="NCFAAA",string4="HHHHxx" 297734400000000000 +tenk unique1=2775i,unique2=3446i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=775i,twothousand=775i,fivethous=2775i,tenthous=2775i,odd=150i,even=151i,stringu1="TCAAAA",stringu2="OCFAAA",string4="OOOOxx" 297820800000000000 +tenk unique1=6182i,unique2=3447i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=182i,twothousand=182i,fivethous=1182i,tenthous=6182i,odd=164i,even=165i,stringu1="UDAAAA",stringu2="PCFAAA",string4="VVVVxx" 297907200000000000 +tenk unique1=4488i,unique2=3448i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=488i,twothousand=488i,fivethous=4488i,tenthous=4488i,odd=176i,even=177i,stringu1="QQAAAA",stringu2="QCFAAA",string4="AAAAxx" 297993600000000000 +tenk unique1=8523i,unique2=3449i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=523i,twothousand=523i,fivethous=3523i,tenthous=8523i,odd=46i,even=47i,stringu1="VPAAAA",stringu2="RCFAAA",string4="HHHHxx" 298080000000000000 +tenk unique1=52i,unique2=3450i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=52i,twothousand=52i,fivethous=52i,tenthous=52i,odd=104i,even=105i,stringu1="ACAAAA",stringu2="SCFAAA",string4="OOOOxx" 298166400000000000 +tenk unique1=7251i,unique2=3451i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=251i,twothousand=1251i,fivethous=2251i,tenthous=7251i,odd=102i,even=103i,stringu1="XSAAAA",stringu2="TCFAAA",string4="VVVVxx" 298252800000000000 +tenk unique1=6130i,unique2=3452i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=130i,twothousand=130i,fivethous=1130i,tenthous=6130i,odd=60i,even=61i,stringu1="UBAAAA",stringu2="UCFAAA",string4="AAAAxx" 298339200000000000 +tenk unique1=205i,unique2=3453i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=205i,twothousand=205i,fivethous=205i,tenthous=205i,odd=10i,even=11i,stringu1="XHAAAA",stringu2="VCFAAA",string4="HHHHxx" 298425600000000000 +tenk unique1=1186i,unique2=3454i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=186i,twothousand=1186i,fivethous=1186i,tenthous=1186i,odd=172i,even=173i,stringu1="QTAAAA",stringu2="WCFAAA",string4="OOOOxx" 298512000000000000 +tenk unique1=1738i,unique2=3455i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=738i,twothousand=1738i,fivethous=1738i,tenthous=1738i,odd=76i,even=77i,stringu1="WOAAAA",stringu2="XCFAAA",string4="VVVVxx" 298598400000000000 +tenk unique1=9485i,unique2=3456i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=485i,twothousand=1485i,fivethous=4485i,tenthous=9485i,odd=170i,even=171i,stringu1="VAAAAA",stringu2="YCFAAA",string4="AAAAxx" 298684800000000000 +tenk unique1=4235i,unique2=3457i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=235i,twothousand=235i,fivethous=4235i,tenthous=4235i,odd=70i,even=71i,stringu1="XGAAAA",stringu2="ZCFAAA",string4="HHHHxx" 298771200000000000 +tenk unique1=7891i,unique2=3458i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=891i,twothousand=1891i,fivethous=2891i,tenthous=7891i,odd=182i,even=183i,stringu1="NRAAAA",stringu2="ADFAAA",string4="OOOOxx" 298857600000000000 +tenk unique1=4960i,unique2=3459i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=960i,twothousand=960i,fivethous=4960i,tenthous=4960i,odd=120i,even=121i,stringu1="UIAAAA",stringu2="BDFAAA",string4="VVVVxx" 298944000000000000 +tenk unique1=8911i,unique2=3460i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=911i,twothousand=911i,fivethous=3911i,tenthous=8911i,odd=22i,even=23i,stringu1="TEAAAA",stringu2="CDFAAA",string4="AAAAxx" 299030400000000000 +tenk unique1=1219i,unique2=3461i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=219i,twothousand=1219i,fivethous=1219i,tenthous=1219i,odd=38i,even=39i,stringu1="XUAAAA",stringu2="DDFAAA",string4="HHHHxx" 299116800000000000 +tenk unique1=9652i,unique2=3462i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=652i,twothousand=1652i,fivethous=4652i,tenthous=9652i,odd=104i,even=105i,stringu1="GHAAAA",stringu2="EDFAAA",string4="OOOOxx" 299203200000000000 +tenk unique1=9715i,unique2=3463i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=715i,twothousand=1715i,fivethous=4715i,tenthous=9715i,odd=30i,even=31i,stringu1="RJAAAA",stringu2="FDFAAA",string4="VVVVxx" 299289600000000000 +tenk unique1=6629i,unique2=3464i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=629i,twothousand=629i,fivethous=1629i,tenthous=6629i,odd=58i,even=59i,stringu1="ZUAAAA",stringu2="GDFAAA",string4="AAAAxx" 299376000000000000 +tenk unique1=700i,unique2=3465i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=700i,twothousand=700i,fivethous=700i,tenthous=700i,odd=0i,even=1i,stringu1="YAAAAA",stringu2="HDFAAA",string4="HHHHxx" 299462400000000000 +tenk unique1=9819i,unique2=3466i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=819i,twothousand=1819i,fivethous=4819i,tenthous=9819i,odd=38i,even=39i,stringu1="RNAAAA",stringu2="IDFAAA",string4="OOOOxx" 299548800000000000 +tenk unique1=5188i,unique2=3467i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=188i,twothousand=1188i,fivethous=188i,tenthous=5188i,odd=176i,even=177i,stringu1="ORAAAA",stringu2="JDFAAA",string4="VVVVxx" 299635200000000000 +tenk unique1=5367i,unique2=3468i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=367i,twothousand=1367i,fivethous=367i,tenthous=5367i,odd=134i,even=135i,stringu1="LYAAAA",stringu2="KDFAAA",string4="AAAAxx" 299721600000000000 +tenk unique1=6447i,unique2=3469i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=447i,twothousand=447i,fivethous=1447i,tenthous=6447i,odd=94i,even=95i,stringu1="ZNAAAA",stringu2="LDFAAA",string4="HHHHxx" 299808000000000000 +tenk unique1=720i,unique2=3470i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=720i,twothousand=720i,fivethous=720i,tenthous=720i,odd=40i,even=41i,stringu1="SBAAAA",stringu2="MDFAAA",string4="OOOOxx" 299894400000000000 +tenk unique1=9157i,unique2=3471i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=157i,twothousand=1157i,fivethous=4157i,tenthous=9157i,odd=114i,even=115i,stringu1="FOAAAA",stringu2="NDFAAA",string4="VVVVxx" 299980800000000000 +tenk unique1=1082i,unique2=3472i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=82i,twothousand=1082i,fivethous=1082i,tenthous=1082i,odd=164i,even=165i,stringu1="QPAAAA",stringu2="ODFAAA",string4="AAAAxx" 300067200000000000 +tenk unique1=3179i,unique2=3473i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=179i,twothousand=1179i,fivethous=3179i,tenthous=3179i,odd=158i,even=159i,stringu1="HSAAAA",stringu2="PDFAAA",string4="HHHHxx" 300153600000000000 +tenk unique1=4818i,unique2=3474i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=818i,twothousand=818i,fivethous=4818i,tenthous=4818i,odd=36i,even=37i,stringu1="IDAAAA",stringu2="QDFAAA",string4="OOOOxx" 300240000000000000 +tenk unique1=7607i,unique2=3475i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=607i,twothousand=1607i,fivethous=2607i,tenthous=7607i,odd=14i,even=15i,stringu1="PGAAAA",stringu2="RDFAAA",string4="VVVVxx" 300326400000000000 +tenk unique1=2352i,unique2=3476i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=352i,twothousand=352i,fivethous=2352i,tenthous=2352i,odd=104i,even=105i,stringu1="MMAAAA",stringu2="SDFAAA",string4="AAAAxx" 300412800000000000 +tenk unique1=1170i,unique2=3477i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=170i,twothousand=1170i,fivethous=1170i,tenthous=1170i,odd=140i,even=141i,stringu1="ATAAAA",stringu2="TDFAAA",string4="HHHHxx" 300499200000000000 +tenk unique1=4269i,unique2=3478i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=269i,twothousand=269i,fivethous=4269i,tenthous=4269i,odd=138i,even=139i,stringu1="FIAAAA",stringu2="UDFAAA",string4="OOOOxx" 300585600000000000 +tenk unique1=8767i,unique2=3479i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=767i,twothousand=767i,fivethous=3767i,tenthous=8767i,odd=134i,even=135i,stringu1="FZAAAA",stringu2="VDFAAA",string4="VVVVxx" 300672000000000000 +tenk unique1=3984i,unique2=3480i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=984i,twothousand=1984i,fivethous=3984i,tenthous=3984i,odd=168i,even=169i,stringu1="GXAAAA",stringu2="WDFAAA",string4="AAAAxx" 300758400000000000 +tenk unique1=3190i,unique2=3481i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=190i,twothousand=1190i,fivethous=3190i,tenthous=3190i,odd=180i,even=181i,stringu1="SSAAAA",stringu2="XDFAAA",string4="HHHHxx" 300844800000000000 +tenk unique1=7456i,unique2=3482i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=456i,twothousand=1456i,fivethous=2456i,tenthous=7456i,odd=112i,even=113i,stringu1="UAAAAA",stringu2="YDFAAA",string4="OOOOxx" 300931200000000000 +tenk unique1=4348i,unique2=3483i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=348i,twothousand=348i,fivethous=4348i,tenthous=4348i,odd=96i,even=97i,stringu1="GLAAAA",stringu2="ZDFAAA",string4="VVVVxx" 301017600000000000 +tenk unique1=3150i,unique2=3484i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=150i,twothousand=1150i,fivethous=3150i,tenthous=3150i,odd=100i,even=101i,stringu1="ERAAAA",stringu2="AEFAAA",string4="AAAAxx" 301104000000000000 +tenk unique1=8780i,unique2=3485i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=780i,twothousand=780i,fivethous=3780i,tenthous=8780i,odd=160i,even=161i,stringu1="SZAAAA",stringu2="BEFAAA",string4="HHHHxx" 301190400000000000 +tenk unique1=2553i,unique2=3486i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=553i,twothousand=553i,fivethous=2553i,tenthous=2553i,odd=106i,even=107i,stringu1="FUAAAA",stringu2="CEFAAA",string4="OOOOxx" 301276800000000000 +tenk unique1=7526i,unique2=3487i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=526i,twothousand=1526i,fivethous=2526i,tenthous=7526i,odd=52i,even=53i,stringu1="MDAAAA",stringu2="DEFAAA",string4="VVVVxx" 301363200000000000 +tenk unique1=2031i,unique2=3488i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=31i,twothousand=31i,fivethous=2031i,tenthous=2031i,odd=62i,even=63i,stringu1="DAAAAA",stringu2="EEFAAA",string4="AAAAxx" 301449600000000000 +tenk unique1=8793i,unique2=3489i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=793i,twothousand=793i,fivethous=3793i,tenthous=8793i,odd=186i,even=187i,stringu1="FAAAAA",stringu2="FEFAAA",string4="HHHHxx" 301536000000000000 +tenk unique1=1122i,unique2=3490i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=122i,twothousand=1122i,fivethous=1122i,tenthous=1122i,odd=44i,even=45i,stringu1="ERAAAA",stringu2="GEFAAA",string4="OOOOxx" 301622400000000000 +tenk unique1=1855i,unique2=3491i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=855i,twothousand=1855i,fivethous=1855i,tenthous=1855i,odd=110i,even=111i,stringu1="JTAAAA",stringu2="HEFAAA",string4="VVVVxx" 301708800000000000 +tenk unique1=6613i,unique2=3492i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=613i,twothousand=613i,fivethous=1613i,tenthous=6613i,odd=26i,even=27i,stringu1="JUAAAA",stringu2="IEFAAA",string4="AAAAxx" 301795200000000000 +tenk unique1=3231i,unique2=3493i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=231i,twothousand=1231i,fivethous=3231i,tenthous=3231i,odd=62i,even=63i,stringu1="HUAAAA",stringu2="JEFAAA",string4="HHHHxx" 301881600000000000 +tenk unique1=9101i,unique2=3494i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=101i,twothousand=1101i,fivethous=4101i,tenthous=9101i,odd=2i,even=3i,stringu1="BMAAAA",stringu2="KEFAAA",string4="OOOOxx" 301968000000000000 +tenk unique1=4937i,unique2=3495i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=937i,twothousand=937i,fivethous=4937i,tenthous=4937i,odd=74i,even=75i,stringu1="XHAAAA",stringu2="LEFAAA",string4="VVVVxx" 302054400000000000 +tenk unique1=666i,unique2=3496i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=666i,twothousand=666i,fivethous=666i,tenthous=666i,odd=132i,even=133i,stringu1="QZAAAA",stringu2="MEFAAA",string4="AAAAxx" 302140800000000000 +tenk unique1=8943i,unique2=3497i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=943i,twothousand=943i,fivethous=3943i,tenthous=8943i,odd=86i,even=87i,stringu1="ZFAAAA",stringu2="NEFAAA",string4="HHHHxx" 302227200000000000 +tenk unique1=6164i,unique2=3498i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=164i,twothousand=164i,fivethous=1164i,tenthous=6164i,odd=128i,even=129i,stringu1="CDAAAA",stringu2="OEFAAA",string4="OOOOxx" 302313600000000000 +tenk unique1=1081i,unique2=3499i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=81i,twothousand=1081i,fivethous=1081i,tenthous=1081i,odd=162i,even=163i,stringu1="PPAAAA",stringu2="PEFAAA",string4="VVVVxx" 302400000000000000 +tenk unique1=210i,unique2=3500i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=210i,twothousand=210i,fivethous=210i,tenthous=210i,odd=20i,even=21i,stringu1="CIAAAA",stringu2="QEFAAA",string4="AAAAxx" 302486400000000000 +tenk unique1=6024i,unique2=3501i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=24i,twothousand=24i,fivethous=1024i,tenthous=6024i,odd=48i,even=49i,stringu1="SXAAAA",stringu2="REFAAA",string4="HHHHxx" 302572800000000000 +tenk unique1=5715i,unique2=3502i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=715i,twothousand=1715i,fivethous=715i,tenthous=5715i,odd=30i,even=31i,stringu1="VLAAAA",stringu2="SEFAAA",string4="OOOOxx" 302659200000000000 +tenk unique1=8938i,unique2=3503i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=938i,twothousand=938i,fivethous=3938i,tenthous=8938i,odd=76i,even=77i,stringu1="UFAAAA",stringu2="TEFAAA",string4="VVVVxx" 302745600000000000 +tenk unique1=1326i,unique2=3504i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=326i,twothousand=1326i,fivethous=1326i,tenthous=1326i,odd=52i,even=53i,stringu1="AZAAAA",stringu2="UEFAAA",string4="AAAAxx" 302832000000000000 +tenk unique1=7111i,unique2=3505i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=111i,twothousand=1111i,fivethous=2111i,tenthous=7111i,odd=22i,even=23i,stringu1="NNAAAA",stringu2="VEFAAA",string4="HHHHxx" 302918400000000000 +tenk unique1=757i,unique2=3506i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=757i,twothousand=757i,fivethous=757i,tenthous=757i,odd=114i,even=115i,stringu1="DDAAAA",stringu2="WEFAAA",string4="OOOOxx" 303004800000000000 +tenk unique1=8933i,unique2=3507i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=933i,twothousand=933i,fivethous=3933i,tenthous=8933i,odd=66i,even=67i,stringu1="PFAAAA",stringu2="XEFAAA",string4="VVVVxx" 303091200000000000 +tenk unique1=6495i,unique2=3508i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=495i,twothousand=495i,fivethous=1495i,tenthous=6495i,odd=190i,even=191i,stringu1="VPAAAA",stringu2="YEFAAA",string4="AAAAxx" 303177600000000000 +tenk unique1=3134i,unique2=3509i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=134i,twothousand=1134i,fivethous=3134i,tenthous=3134i,odd=68i,even=69i,stringu1="OQAAAA",stringu2="ZEFAAA",string4="HHHHxx" 303264000000000000 +tenk unique1=1304i,unique2=3510i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=304i,twothousand=1304i,fivethous=1304i,tenthous=1304i,odd=8i,even=9i,stringu1="EYAAAA",stringu2="AFFAAA",string4="OOOOxx" 303350400000000000 +tenk unique1=1835i,unique2=3511i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=835i,twothousand=1835i,fivethous=1835i,tenthous=1835i,odd=70i,even=71i,stringu1="PSAAAA",stringu2="BFFAAA",string4="VVVVxx" 303436800000000000 +tenk unique1=7275i,unique2=3512i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=275i,twothousand=1275i,fivethous=2275i,tenthous=7275i,odd=150i,even=151i,stringu1="VTAAAA",stringu2="CFFAAA",string4="AAAAxx" 303523200000000000 +tenk unique1=7337i,unique2=3513i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=337i,twothousand=1337i,fivethous=2337i,tenthous=7337i,odd=74i,even=75i,stringu1="FWAAAA",stringu2="DFFAAA",string4="HHHHxx" 303609600000000000 +tenk unique1=1282i,unique2=3514i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=282i,twothousand=1282i,fivethous=1282i,tenthous=1282i,odd=164i,even=165i,stringu1="IXAAAA",stringu2="EFFAAA",string4="OOOOxx" 303696000000000000 +tenk unique1=6566i,unique2=3515i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=566i,twothousand=566i,fivethous=1566i,tenthous=6566i,odd=132i,even=133i,stringu1="OSAAAA",stringu2="FFFAAA",string4="VVVVxx" 303782400000000000 +tenk unique1=3786i,unique2=3516i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=786i,twothousand=1786i,fivethous=3786i,tenthous=3786i,odd=172i,even=173i,stringu1="QPAAAA",stringu2="GFFAAA",string4="AAAAxx" 303868800000000000 +tenk unique1=5741i,unique2=3517i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=741i,twothousand=1741i,fivethous=741i,tenthous=5741i,odd=82i,even=83i,stringu1="VMAAAA",stringu2="HFFAAA",string4="HHHHxx" 303955200000000000 +tenk unique1=6076i,unique2=3518i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=76i,twothousand=76i,fivethous=1076i,tenthous=6076i,odd=152i,even=153i,stringu1="SZAAAA",stringu2="IFFAAA",string4="OOOOxx" 304041600000000000 +tenk unique1=9998i,unique2=3519i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=998i,twothousand=1998i,fivethous=4998i,tenthous=9998i,odd=196i,even=197i,stringu1="OUAAAA",stringu2="JFFAAA",string4="VVVVxx" 304128000000000000 +tenk unique1=6268i,unique2=3520i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=268i,twothousand=268i,fivethous=1268i,tenthous=6268i,odd=136i,even=137i,stringu1="CHAAAA",stringu2="KFFAAA",string4="AAAAxx" 304214400000000000 +tenk unique1=9647i,unique2=3521i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=647i,twothousand=1647i,fivethous=4647i,tenthous=9647i,odd=94i,even=95i,stringu1="BHAAAA",stringu2="LFFAAA",string4="HHHHxx" 304300800000000000 +tenk unique1=4877i,unique2=3522i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=877i,twothousand=877i,fivethous=4877i,tenthous=4877i,odd=154i,even=155i,stringu1="PFAAAA",stringu2="MFFAAA",string4="OOOOxx" 304387200000000000 +tenk unique1=2652i,unique2=3523i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=652i,twothousand=652i,fivethous=2652i,tenthous=2652i,odd=104i,even=105i,stringu1="AYAAAA",stringu2="NFFAAA",string4="VVVVxx" 304473600000000000 +tenk unique1=1247i,unique2=3524i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=247i,twothousand=1247i,fivethous=1247i,tenthous=1247i,odd=94i,even=95i,stringu1="ZVAAAA",stringu2="OFFAAA",string4="AAAAxx" 304560000000000000 +tenk unique1=2721i,unique2=3525i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=721i,twothousand=721i,fivethous=2721i,tenthous=2721i,odd=42i,even=43i,stringu1="RAAAAA",stringu2="PFFAAA",string4="HHHHxx" 304646400000000000 +tenk unique1=5968i,unique2=3526i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=968i,twothousand=1968i,fivethous=968i,tenthous=5968i,odd=136i,even=137i,stringu1="OVAAAA",stringu2="QFFAAA",string4="OOOOxx" 304732800000000000 +tenk unique1=9570i,unique2=3527i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=570i,twothousand=1570i,fivethous=4570i,tenthous=9570i,odd=140i,even=141i,stringu1="CEAAAA",stringu2="RFFAAA",string4="VVVVxx" 304819200000000000 +tenk unique1=6425i,unique2=3528i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=425i,twothousand=425i,fivethous=1425i,tenthous=6425i,odd=50i,even=51i,stringu1="DNAAAA",stringu2="SFFAAA",string4="AAAAxx" 304905600000000000 +tenk unique1=5451i,unique2=3529i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=451i,twothousand=1451i,fivethous=451i,tenthous=5451i,odd=102i,even=103i,stringu1="RBAAAA",stringu2="TFFAAA",string4="HHHHxx" 304992000000000000 +tenk unique1=5668i,unique2=3530i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=668i,twothousand=1668i,fivethous=668i,tenthous=5668i,odd=136i,even=137i,stringu1="AKAAAA",stringu2="UFFAAA",string4="OOOOxx" 305078400000000000 +tenk unique1=9493i,unique2=3531i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=493i,twothousand=1493i,fivethous=4493i,tenthous=9493i,odd=186i,even=187i,stringu1="DBAAAA",stringu2="VFFAAA",string4="VVVVxx" 305164800000000000 +tenk unique1=7973i,unique2=3532i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=973i,twothousand=1973i,fivethous=2973i,tenthous=7973i,odd=146i,even=147i,stringu1="RUAAAA",stringu2="WFFAAA",string4="AAAAxx" 305251200000000000 +tenk unique1=8250i,unique2=3533i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=250i,twothousand=250i,fivethous=3250i,tenthous=8250i,odd=100i,even=101i,stringu1="IFAAAA",stringu2="XFFAAA",string4="HHHHxx" 305337600000000000 +tenk unique1=82i,unique2=3534i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=82i,twothousand=82i,fivethous=82i,tenthous=82i,odd=164i,even=165i,stringu1="EDAAAA",stringu2="YFFAAA",string4="OOOOxx" 305424000000000000 +tenk unique1=6258i,unique2=3535i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=258i,twothousand=258i,fivethous=1258i,tenthous=6258i,odd=116i,even=117i,stringu1="SGAAAA",stringu2="ZFFAAA",string4="VVVVxx" 305510400000000000 +tenk unique1=9978i,unique2=3536i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=978i,twothousand=1978i,fivethous=4978i,tenthous=9978i,odd=156i,even=157i,stringu1="UTAAAA",stringu2="AGFAAA",string4="AAAAxx" 305596800000000000 +tenk unique1=6930i,unique2=3537i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=930i,twothousand=930i,fivethous=1930i,tenthous=6930i,odd=60i,even=61i,stringu1="OGAAAA",stringu2="BGFAAA",string4="HHHHxx" 305683200000000000 +tenk unique1=3746i,unique2=3538i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=746i,twothousand=1746i,fivethous=3746i,tenthous=3746i,odd=92i,even=93i,stringu1="COAAAA",stringu2="CGFAAA",string4="OOOOxx" 305769600000000000 +tenk unique1=7065i,unique2=3539i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=65i,twothousand=1065i,fivethous=2065i,tenthous=7065i,odd=130i,even=131i,stringu1="TLAAAA",stringu2="DGFAAA",string4="VVVVxx" 305856000000000000 +tenk unique1=4281i,unique2=3540i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=281i,twothousand=281i,fivethous=4281i,tenthous=4281i,odd=162i,even=163i,stringu1="RIAAAA",stringu2="EGFAAA",string4="AAAAxx" 305942400000000000 +tenk unique1=4367i,unique2=3541i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=367i,twothousand=367i,fivethous=4367i,tenthous=4367i,odd=134i,even=135i,stringu1="ZLAAAA",stringu2="FGFAAA",string4="HHHHxx" 306028800000000000 +tenk unique1=9526i,unique2=3542i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=526i,twothousand=1526i,fivethous=4526i,tenthous=9526i,odd=52i,even=53i,stringu1="KCAAAA",stringu2="GGFAAA",string4="OOOOxx" 306115200000000000 +tenk unique1=5880i,unique2=3543i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=880i,twothousand=1880i,fivethous=880i,tenthous=5880i,odd=160i,even=161i,stringu1="ESAAAA",stringu2="HGFAAA",string4="VVVVxx" 306201600000000000 +tenk unique1=8480i,unique2=3544i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=480i,twothousand=480i,fivethous=3480i,tenthous=8480i,odd=160i,even=161i,stringu1="EOAAAA",stringu2="IGFAAA",string4="AAAAxx" 306288000000000000 +tenk unique1=2476i,unique2=3545i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=476i,twothousand=476i,fivethous=2476i,tenthous=2476i,odd=152i,even=153i,stringu1="GRAAAA",stringu2="JGFAAA",string4="HHHHxx" 306374400000000000 +tenk unique1=9074i,unique2=3546i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=74i,twothousand=1074i,fivethous=4074i,tenthous=9074i,odd=148i,even=149i,stringu1="ALAAAA",stringu2="KGFAAA",string4="OOOOxx" 306460800000000000 +tenk unique1=4830i,unique2=3547i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=830i,twothousand=830i,fivethous=4830i,tenthous=4830i,odd=60i,even=61i,stringu1="UDAAAA",stringu2="LGFAAA",string4="VVVVxx" 306547200000000000 +tenk unique1=3207i,unique2=3548i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=207i,twothousand=1207i,fivethous=3207i,tenthous=3207i,odd=14i,even=15i,stringu1="JTAAAA",stringu2="MGFAAA",string4="AAAAxx" 306633600000000000 +tenk unique1=7894i,unique2=3549i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=894i,twothousand=1894i,fivethous=2894i,tenthous=7894i,odd=188i,even=189i,stringu1="QRAAAA",stringu2="NGFAAA",string4="HHHHxx" 306720000000000000 +tenk unique1=3860i,unique2=3550i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=860i,twothousand=1860i,fivethous=3860i,tenthous=3860i,odd=120i,even=121i,stringu1="MSAAAA",stringu2="OGFAAA",string4="OOOOxx" 306806400000000000 +tenk unique1=5293i,unique2=3551i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=293i,twothousand=1293i,fivethous=293i,tenthous=5293i,odd=186i,even=187i,stringu1="PVAAAA",stringu2="PGFAAA",string4="VVVVxx" 306892800000000000 +tenk unique1=6895i,unique2=3552i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=895i,twothousand=895i,fivethous=1895i,tenthous=6895i,odd=190i,even=191i,stringu1="FFAAAA",stringu2="QGFAAA",string4="AAAAxx" 306979200000000000 +tenk unique1=9908i,unique2=3553i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=908i,twothousand=1908i,fivethous=4908i,tenthous=9908i,odd=16i,even=17i,stringu1="CRAAAA",stringu2="RGFAAA",string4="HHHHxx" 307065600000000000 +tenk unique1=9247i,unique2=3554i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=247i,twothousand=1247i,fivethous=4247i,tenthous=9247i,odd=94i,even=95i,stringu1="RRAAAA",stringu2="SGFAAA",string4="OOOOxx" 307152000000000000 +tenk unique1=8110i,unique2=3555i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=110i,twothousand=110i,fivethous=3110i,tenthous=8110i,odd=20i,even=21i,stringu1="YZAAAA",stringu2="TGFAAA",string4="VVVVxx" 307238400000000000 +tenk unique1=4716i,unique2=3556i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=716i,twothousand=716i,fivethous=4716i,tenthous=4716i,odd=32i,even=33i,stringu1="KZAAAA",stringu2="UGFAAA",string4="AAAAxx" 307324800000000000 +tenk unique1=4979i,unique2=3557i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=979i,twothousand=979i,fivethous=4979i,tenthous=4979i,odd=158i,even=159i,stringu1="NJAAAA",stringu2="VGFAAA",string4="HHHHxx" 307411200000000000 +tenk unique1=5280i,unique2=3558i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=280i,twothousand=1280i,fivethous=280i,tenthous=5280i,odd=160i,even=161i,stringu1="CVAAAA",stringu2="WGFAAA",string4="OOOOxx" 307497600000000000 +tenk unique1=8326i,unique2=3559i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=326i,twothousand=326i,fivethous=3326i,tenthous=8326i,odd=52i,even=53i,stringu1="GIAAAA",stringu2="XGFAAA",string4="VVVVxx" 307584000000000000 +tenk unique1=5572i,unique2=3560i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=572i,twothousand=1572i,fivethous=572i,tenthous=5572i,odd=144i,even=145i,stringu1="IGAAAA",stringu2="YGFAAA",string4="AAAAxx" 307670400000000000 +tenk unique1=4665i,unique2=3561i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=665i,twothousand=665i,fivethous=4665i,tenthous=4665i,odd=130i,even=131i,stringu1="LXAAAA",stringu2="ZGFAAA",string4="HHHHxx" 307756800000000000 +tenk unique1=3665i,unique2=3562i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=665i,twothousand=1665i,fivethous=3665i,tenthous=3665i,odd=130i,even=131i,stringu1="ZKAAAA",stringu2="AHFAAA",string4="OOOOxx" 307843200000000000 +tenk unique1=6744i,unique2=3563i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=744i,twothousand=744i,fivethous=1744i,tenthous=6744i,odd=88i,even=89i,stringu1="KZAAAA",stringu2="BHFAAA",string4="VVVVxx" 307929600000000000 +tenk unique1=1897i,unique2=3564i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=897i,twothousand=1897i,fivethous=1897i,tenthous=1897i,odd=194i,even=195i,stringu1="ZUAAAA",stringu2="CHFAAA",string4="AAAAxx" 308016000000000000 +tenk unique1=1220i,unique2=3565i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=220i,twothousand=1220i,fivethous=1220i,tenthous=1220i,odd=40i,even=41i,stringu1="YUAAAA",stringu2="DHFAAA",string4="HHHHxx" 308102400000000000 +tenk unique1=2614i,unique2=3566i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=614i,twothousand=614i,fivethous=2614i,tenthous=2614i,odd=28i,even=29i,stringu1="OWAAAA",stringu2="EHFAAA",string4="OOOOxx" 308188800000000000 +tenk unique1=8509i,unique2=3567i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=509i,twothousand=509i,fivethous=3509i,tenthous=8509i,odd=18i,even=19i,stringu1="HPAAAA",stringu2="FHFAAA",string4="VVVVxx" 308275200000000000 +tenk unique1=8521i,unique2=3568i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=521i,twothousand=521i,fivethous=3521i,tenthous=8521i,odd=42i,even=43i,stringu1="TPAAAA",stringu2="GHFAAA",string4="AAAAxx" 308361600000000000 +tenk unique1=4121i,unique2=3569i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=121i,twothousand=121i,fivethous=4121i,tenthous=4121i,odd=42i,even=43i,stringu1="NCAAAA",stringu2="HHFAAA",string4="HHHHxx" 308448000000000000 +tenk unique1=9663i,unique2=3570i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=663i,twothousand=1663i,fivethous=4663i,tenthous=9663i,odd=126i,even=127i,stringu1="RHAAAA",stringu2="IHFAAA",string4="OOOOxx" 308534400000000000 +tenk unique1=2346i,unique2=3571i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=346i,twothousand=346i,fivethous=2346i,tenthous=2346i,odd=92i,even=93i,stringu1="GMAAAA",stringu2="JHFAAA",string4="VVVVxx" 308620800000000000 +tenk unique1=3370i,unique2=3572i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=370i,twothousand=1370i,fivethous=3370i,tenthous=3370i,odd=140i,even=141i,stringu1="QZAAAA",stringu2="KHFAAA",string4="AAAAxx" 308707200000000000 +tenk unique1=1498i,unique2=3573i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=498i,twothousand=1498i,fivethous=1498i,tenthous=1498i,odd=196i,even=197i,stringu1="QFAAAA",stringu2="LHFAAA",string4="HHHHxx" 308793600000000000 +tenk unique1=7422i,unique2=3574i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=422i,twothousand=1422i,fivethous=2422i,tenthous=7422i,odd=44i,even=45i,stringu1="MZAAAA",stringu2="MHFAAA",string4="OOOOxx" 308880000000000000 +tenk unique1=3472i,unique2=3575i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=472i,twothousand=1472i,fivethous=3472i,tenthous=3472i,odd=144i,even=145i,stringu1="ODAAAA",stringu2="NHFAAA",string4="VVVVxx" 308966400000000000 +tenk unique1=4126i,unique2=3576i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=126i,twothousand=126i,fivethous=4126i,tenthous=4126i,odd=52i,even=53i,stringu1="SCAAAA",stringu2="OHFAAA",string4="AAAAxx" 309052800000000000 +tenk unique1=4494i,unique2=3577i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=494i,twothousand=494i,fivethous=4494i,tenthous=4494i,odd=188i,even=189i,stringu1="WQAAAA",stringu2="PHFAAA",string4="HHHHxx" 309139200000000000 +tenk unique1=6323i,unique2=3578i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=323i,twothousand=323i,fivethous=1323i,tenthous=6323i,odd=46i,even=47i,stringu1="FJAAAA",stringu2="QHFAAA",string4="OOOOxx" 309225600000000000 +tenk unique1=2823i,unique2=3579i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=823i,twothousand=823i,fivethous=2823i,tenthous=2823i,odd=46i,even=47i,stringu1="PEAAAA",stringu2="RHFAAA",string4="VVVVxx" 309312000000000000 +tenk unique1=8596i,unique2=3580i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=596i,twothousand=596i,fivethous=3596i,tenthous=8596i,odd=192i,even=193i,stringu1="QSAAAA",stringu2="SHFAAA",string4="AAAAxx" 309398400000000000 +tenk unique1=6642i,unique2=3581i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=642i,twothousand=642i,fivethous=1642i,tenthous=6642i,odd=84i,even=85i,stringu1="MVAAAA",stringu2="THFAAA",string4="HHHHxx" 309484800000000000 +tenk unique1=9276i,unique2=3582i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=276i,twothousand=1276i,fivethous=4276i,tenthous=9276i,odd=152i,even=153i,stringu1="USAAAA",stringu2="UHFAAA",string4="OOOOxx" 309571200000000000 +tenk unique1=4148i,unique2=3583i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=148i,twothousand=148i,fivethous=4148i,tenthous=4148i,odd=96i,even=97i,stringu1="ODAAAA",stringu2="VHFAAA",string4="VVVVxx" 309657600000000000 +tenk unique1=9770i,unique2=3584i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=770i,twothousand=1770i,fivethous=4770i,tenthous=9770i,odd=140i,even=141i,stringu1="ULAAAA",stringu2="WHFAAA",string4="AAAAxx" 309744000000000000 +tenk unique1=9812i,unique2=3585i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=812i,twothousand=1812i,fivethous=4812i,tenthous=9812i,odd=24i,even=25i,stringu1="KNAAAA",stringu2="XHFAAA",string4="HHHHxx" 309830400000000000 +tenk unique1=4419i,unique2=3586i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=419i,twothousand=419i,fivethous=4419i,tenthous=4419i,odd=38i,even=39i,stringu1="ZNAAAA",stringu2="YHFAAA",string4="OOOOxx" 309916800000000000 +tenk unique1=3802i,unique2=3587i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=802i,twothousand=1802i,fivethous=3802i,tenthous=3802i,odd=4i,even=5i,stringu1="GQAAAA",stringu2="ZHFAAA",string4="VVVVxx" 310003200000000000 +tenk unique1=3210i,unique2=3588i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=210i,twothousand=1210i,fivethous=3210i,tenthous=3210i,odd=20i,even=21i,stringu1="MTAAAA",stringu2="AIFAAA",string4="AAAAxx" 310089600000000000 +tenk unique1=6794i,unique2=3589i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=794i,twothousand=794i,fivethous=1794i,tenthous=6794i,odd=188i,even=189i,stringu1="IBAAAA",stringu2="BIFAAA",string4="HHHHxx" 310176000000000000 +tenk unique1=242i,unique2=3590i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=242i,twothousand=242i,fivethous=242i,tenthous=242i,odd=84i,even=85i,stringu1="IJAAAA",stringu2="CIFAAA",string4="OOOOxx" 310262400000000000 +tenk unique1=962i,unique2=3591i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=962i,twothousand=962i,fivethous=962i,tenthous=962i,odd=124i,even=125i,stringu1="ALAAAA",stringu2="DIFAAA",string4="VVVVxx" 310348800000000000 +tenk unique1=7151i,unique2=3592i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=151i,twothousand=1151i,fivethous=2151i,tenthous=7151i,odd=102i,even=103i,stringu1="BPAAAA",stringu2="EIFAAA",string4="AAAAxx" 310435200000000000 +tenk unique1=9440i,unique2=3593i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=440i,twothousand=1440i,fivethous=4440i,tenthous=9440i,odd=80i,even=81i,stringu1="CZAAAA",stringu2="FIFAAA",string4="HHHHxx" 310521600000000000 +tenk unique1=721i,unique2=3594i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=721i,twothousand=721i,fivethous=721i,tenthous=721i,odd=42i,even=43i,stringu1="TBAAAA",stringu2="GIFAAA",string4="OOOOxx" 310608000000000000 +tenk unique1=2119i,unique2=3595i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=119i,twothousand=119i,fivethous=2119i,tenthous=2119i,odd=38i,even=39i,stringu1="NDAAAA",stringu2="HIFAAA",string4="VVVVxx" 310694400000000000 +tenk unique1=9883i,unique2=3596i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=883i,twothousand=1883i,fivethous=4883i,tenthous=9883i,odd=166i,even=167i,stringu1="DQAAAA",stringu2="IIFAAA",string4="AAAAxx" 310780800000000000 +tenk unique1=5071i,unique2=3597i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=71i,twothousand=1071i,fivethous=71i,tenthous=5071i,odd=142i,even=143i,stringu1="BNAAAA",stringu2="JIFAAA",string4="HHHHxx" 310867200000000000 +tenk unique1=8239i,unique2=3598i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=239i,twothousand=239i,fivethous=3239i,tenthous=8239i,odd=78i,even=79i,stringu1="XEAAAA",stringu2="KIFAAA",string4="OOOOxx" 310953600000000000 +tenk unique1=7451i,unique2=3599i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=451i,twothousand=1451i,fivethous=2451i,tenthous=7451i,odd=102i,even=103i,stringu1="PAAAAA",stringu2="LIFAAA",string4="VVVVxx" 311040000000000000 +tenk unique1=9517i,unique2=3600i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=517i,twothousand=1517i,fivethous=4517i,tenthous=9517i,odd=34i,even=35i,stringu1="BCAAAA",stringu2="MIFAAA",string4="AAAAxx" 311126400000000000 +tenk unique1=9180i,unique2=3601i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=180i,twothousand=1180i,fivethous=4180i,tenthous=9180i,odd=160i,even=161i,stringu1="CPAAAA",stringu2="NIFAAA",string4="HHHHxx" 311212800000000000 +tenk unique1=9327i,unique2=3602i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=327i,twothousand=1327i,fivethous=4327i,tenthous=9327i,odd=54i,even=55i,stringu1="TUAAAA",stringu2="OIFAAA",string4="OOOOxx" 311299200000000000 +tenk unique1=5462i,unique2=3603i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=462i,twothousand=1462i,fivethous=462i,tenthous=5462i,odd=124i,even=125i,stringu1="CCAAAA",stringu2="PIFAAA",string4="VVVVxx" 311385600000000000 +tenk unique1=8306i,unique2=3604i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=306i,twothousand=306i,fivethous=3306i,tenthous=8306i,odd=12i,even=13i,stringu1="MHAAAA",stringu2="QIFAAA",string4="AAAAxx" 311472000000000000 +tenk unique1=6234i,unique2=3605i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=234i,twothousand=234i,fivethous=1234i,tenthous=6234i,odd=68i,even=69i,stringu1="UFAAAA",stringu2="RIFAAA",string4="HHHHxx" 311558400000000000 +tenk unique1=8771i,unique2=3606i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=771i,twothousand=771i,fivethous=3771i,tenthous=8771i,odd=142i,even=143i,stringu1="JZAAAA",stringu2="SIFAAA",string4="OOOOxx" 311644800000000000 +tenk unique1=5853i,unique2=3607i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=853i,twothousand=1853i,fivethous=853i,tenthous=5853i,odd=106i,even=107i,stringu1="DRAAAA",stringu2="TIFAAA",string4="VVVVxx" 311731200000000000 +tenk unique1=8373i,unique2=3608i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=373i,twothousand=373i,fivethous=3373i,tenthous=8373i,odd=146i,even=147i,stringu1="BKAAAA",stringu2="UIFAAA",string4="AAAAxx" 311817600000000000 +tenk unique1=5017i,unique2=3609i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=17i,twothousand=1017i,fivethous=17i,tenthous=5017i,odd=34i,even=35i,stringu1="ZKAAAA",stringu2="VIFAAA",string4="HHHHxx" 311904000000000000 +tenk unique1=8025i,unique2=3610i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=25i,twothousand=25i,fivethous=3025i,tenthous=8025i,odd=50i,even=51i,stringu1="RWAAAA",stringu2="WIFAAA",string4="OOOOxx" 311990400000000000 +tenk unique1=2526i,unique2=3611i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=526i,twothousand=526i,fivethous=2526i,tenthous=2526i,odd=52i,even=53i,stringu1="ETAAAA",stringu2="XIFAAA",string4="VVVVxx" 312076800000000000 +tenk unique1=7419i,unique2=3612i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=419i,twothousand=1419i,fivethous=2419i,tenthous=7419i,odd=38i,even=39i,stringu1="JZAAAA",stringu2="YIFAAA",string4="AAAAxx" 312163200000000000 +tenk unique1=4572i,unique2=3613i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=572i,twothousand=572i,fivethous=4572i,tenthous=4572i,odd=144i,even=145i,stringu1="WTAAAA",stringu2="ZIFAAA",string4="HHHHxx" 312249600000000000 +tenk unique1=7744i,unique2=3614i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=744i,twothousand=1744i,fivethous=2744i,tenthous=7744i,odd=88i,even=89i,stringu1="WLAAAA",stringu2="AJFAAA",string4="OOOOxx" 312336000000000000 +tenk unique1=8825i,unique2=3615i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=825i,twothousand=825i,fivethous=3825i,tenthous=8825i,odd=50i,even=51i,stringu1="LBAAAA",stringu2="BJFAAA",string4="VVVVxx" 312422400000000000 +tenk unique1=6067i,unique2=3616i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=67i,twothousand=67i,fivethous=1067i,tenthous=6067i,odd=134i,even=135i,stringu1="JZAAAA",stringu2="CJFAAA",string4="AAAAxx" 312508800000000000 +tenk unique1=3291i,unique2=3617i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=291i,twothousand=1291i,fivethous=3291i,tenthous=3291i,odd=182i,even=183i,stringu1="PWAAAA",stringu2="DJFAAA",string4="HHHHxx" 312595200000000000 +tenk unique1=7115i,unique2=3618i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=115i,twothousand=1115i,fivethous=2115i,tenthous=7115i,odd=30i,even=31i,stringu1="RNAAAA",stringu2="EJFAAA",string4="OOOOxx" 312681600000000000 +tenk unique1=2626i,unique2=3619i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=626i,twothousand=626i,fivethous=2626i,tenthous=2626i,odd=52i,even=53i,stringu1="AXAAAA",stringu2="FJFAAA",string4="VVVVxx" 312768000000000000 +tenk unique1=4109i,unique2=3620i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=109i,twothousand=109i,fivethous=4109i,tenthous=4109i,odd=18i,even=19i,stringu1="BCAAAA",stringu2="GJFAAA",string4="AAAAxx" 312854400000000000 +tenk unique1=4056i,unique2=3621i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=56i,twothousand=56i,fivethous=4056i,tenthous=4056i,odd=112i,even=113i,stringu1="AAAAAA",stringu2="HJFAAA",string4="HHHHxx" 312940800000000000 +tenk unique1=6811i,unique2=3622i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=811i,twothousand=811i,fivethous=1811i,tenthous=6811i,odd=22i,even=23i,stringu1="ZBAAAA",stringu2="IJFAAA",string4="OOOOxx" 313027200000000000 +tenk unique1=680i,unique2=3623i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=680i,twothousand=680i,fivethous=680i,tenthous=680i,odd=160i,even=161i,stringu1="EAAAAA",stringu2="JJFAAA",string4="VVVVxx" 313113600000000000 +tenk unique1=474i,unique2=3624i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=474i,twothousand=474i,fivethous=474i,tenthous=474i,odd=148i,even=149i,stringu1="GSAAAA",stringu2="KJFAAA",string4="AAAAxx" 313200000000000000 +tenk unique1=9294i,unique2=3625i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=294i,twothousand=1294i,fivethous=4294i,tenthous=9294i,odd=188i,even=189i,stringu1="MTAAAA",stringu2="LJFAAA",string4="HHHHxx" 313286400000000000 +tenk unique1=7555i,unique2=3626i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=555i,twothousand=1555i,fivethous=2555i,tenthous=7555i,odd=110i,even=111i,stringu1="PEAAAA",stringu2="MJFAAA",string4="OOOOxx" 313372800000000000 +tenk unique1=8076i,unique2=3627i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=76i,twothousand=76i,fivethous=3076i,tenthous=8076i,odd=152i,even=153i,stringu1="QYAAAA",stringu2="NJFAAA",string4="VVVVxx" 313459200000000000 +tenk unique1=3840i,unique2=3628i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=840i,twothousand=1840i,fivethous=3840i,tenthous=3840i,odd=80i,even=81i,stringu1="SRAAAA",stringu2="OJFAAA",string4="AAAAxx" 313545600000000000 +tenk unique1=5955i,unique2=3629i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=955i,twothousand=1955i,fivethous=955i,tenthous=5955i,odd=110i,even=111i,stringu1="BVAAAA",stringu2="PJFAAA",string4="HHHHxx" 313632000000000000 +tenk unique1=994i,unique2=3630i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=994i,twothousand=994i,fivethous=994i,tenthous=994i,odd=188i,even=189i,stringu1="GMAAAA",stringu2="QJFAAA",string4="OOOOxx" 313718400000000000 +tenk unique1=2089i,unique2=3631i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=89i,twothousand=89i,fivethous=2089i,tenthous=2089i,odd=178i,even=179i,stringu1="JCAAAA",stringu2="RJFAAA",string4="VVVVxx" 313804800000000000 +tenk unique1=869i,unique2=3632i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=869i,twothousand=869i,fivethous=869i,tenthous=869i,odd=138i,even=139i,stringu1="LHAAAA",stringu2="SJFAAA",string4="AAAAxx" 313891200000000000 +tenk unique1=1223i,unique2=3633i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=223i,twothousand=1223i,fivethous=1223i,tenthous=1223i,odd=46i,even=47i,stringu1="BVAAAA",stringu2="TJFAAA",string4="HHHHxx" 313977600000000000 +tenk unique1=1514i,unique2=3634i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=514i,twothousand=1514i,fivethous=1514i,tenthous=1514i,odd=28i,even=29i,stringu1="GGAAAA",stringu2="UJFAAA",string4="OOOOxx" 314064000000000000 +tenk unique1=4891i,unique2=3635i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=891i,twothousand=891i,fivethous=4891i,tenthous=4891i,odd=182i,even=183i,stringu1="DGAAAA",stringu2="VJFAAA",string4="VVVVxx" 314150400000000000 +tenk unique1=4190i,unique2=3636i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=190i,twothousand=190i,fivethous=4190i,tenthous=4190i,odd=180i,even=181i,stringu1="EFAAAA",stringu2="WJFAAA",string4="AAAAxx" 314236800000000000 +tenk unique1=4377i,unique2=3637i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=377i,twothousand=377i,fivethous=4377i,tenthous=4377i,odd=154i,even=155i,stringu1="JMAAAA",stringu2="XJFAAA",string4="HHHHxx" 314323200000000000 +tenk unique1=9195i,unique2=3638i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=195i,twothousand=1195i,fivethous=4195i,tenthous=9195i,odd=190i,even=191i,stringu1="RPAAAA",stringu2="YJFAAA",string4="OOOOxx" 314409600000000000 +tenk unique1=3827i,unique2=3639i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=827i,twothousand=1827i,fivethous=3827i,tenthous=3827i,odd=54i,even=55i,stringu1="FRAAAA",stringu2="ZJFAAA",string4="VVVVxx" 314496000000000000 +tenk unique1=7386i,unique2=3640i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=386i,twothousand=1386i,fivethous=2386i,tenthous=7386i,odd=172i,even=173i,stringu1="CYAAAA",stringu2="AKFAAA",string4="AAAAxx" 314582400000000000 +tenk unique1=6665i,unique2=3641i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=665i,twothousand=665i,fivethous=1665i,tenthous=6665i,odd=130i,even=131i,stringu1="JWAAAA",stringu2="BKFAAA",string4="HHHHxx" 314668800000000000 +tenk unique1=7514i,unique2=3642i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=514i,twothousand=1514i,fivethous=2514i,tenthous=7514i,odd=28i,even=29i,stringu1="ADAAAA",stringu2="CKFAAA",string4="OOOOxx" 314755200000000000 +tenk unique1=6431i,unique2=3643i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=431i,twothousand=431i,fivethous=1431i,tenthous=6431i,odd=62i,even=63i,stringu1="JNAAAA",stringu2="DKFAAA",string4="VVVVxx" 314841600000000000 +tenk unique1=3251i,unique2=3644i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=251i,twothousand=1251i,fivethous=3251i,tenthous=3251i,odd=102i,even=103i,stringu1="BVAAAA",stringu2="EKFAAA",string4="AAAAxx" 314928000000000000 +tenk unique1=8439i,unique2=3645i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=439i,twothousand=439i,fivethous=3439i,tenthous=8439i,odd=78i,even=79i,stringu1="PMAAAA",stringu2="FKFAAA",string4="HHHHxx" 315014400000000000 +tenk unique1=831i,unique2=3646i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=831i,twothousand=831i,fivethous=831i,tenthous=831i,odd=62i,even=63i,stringu1="ZFAAAA",stringu2="GKFAAA",string4="OOOOxx" 315100800000000000 +tenk unique1=8485i,unique2=3647i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=485i,twothousand=485i,fivethous=3485i,tenthous=8485i,odd=170i,even=171i,stringu1="JOAAAA",stringu2="HKFAAA",string4="VVVVxx" 315187200000000000 +tenk unique1=7314i,unique2=3648i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=314i,twothousand=1314i,fivethous=2314i,tenthous=7314i,odd=28i,even=29i,stringu1="IVAAAA",stringu2="IKFAAA",string4="AAAAxx" 315273600000000000 +tenk unique1=3044i,unique2=3649i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=44i,twothousand=1044i,fivethous=3044i,tenthous=3044i,odd=88i,even=89i,stringu1="CNAAAA",stringu2="JKFAAA",string4="HHHHxx" 315360000000000000 +tenk unique1=4283i,unique2=3650i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=283i,twothousand=283i,fivethous=4283i,tenthous=4283i,odd=166i,even=167i,stringu1="TIAAAA",stringu2="KKFAAA",string4="OOOOxx" 315446400000000000 +tenk unique1=298i,unique2=3651i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=298i,twothousand=298i,fivethous=298i,tenthous=298i,odd=196i,even=197i,stringu1="MLAAAA",stringu2="LKFAAA",string4="VVVVxx" 315532800000000000 +tenk unique1=7114i,unique2=3652i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=114i,twothousand=1114i,fivethous=2114i,tenthous=7114i,odd=28i,even=29i,stringu1="QNAAAA",stringu2="MKFAAA",string4="AAAAxx" 315619200000000000 +tenk unique1=9664i,unique2=3653i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=664i,twothousand=1664i,fivethous=4664i,tenthous=9664i,odd=128i,even=129i,stringu1="SHAAAA",stringu2="NKFAAA",string4="HHHHxx" 315705600000000000 +tenk unique1=5315i,unique2=3654i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=315i,twothousand=1315i,fivethous=315i,tenthous=5315i,odd=30i,even=31i,stringu1="LWAAAA",stringu2="OKFAAA",string4="OOOOxx" 315792000000000000 +tenk unique1=2164i,unique2=3655i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=164i,twothousand=164i,fivethous=2164i,tenthous=2164i,odd=128i,even=129i,stringu1="GFAAAA",stringu2="PKFAAA",string4="VVVVxx" 315878400000000000 +tenk unique1=3390i,unique2=3656i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=390i,twothousand=1390i,fivethous=3390i,tenthous=3390i,odd=180i,even=181i,stringu1="KAAAAA",stringu2="QKFAAA",string4="AAAAxx" 315964800000000000 +tenk unique1=836i,unique2=3657i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=836i,twothousand=836i,fivethous=836i,tenthous=836i,odd=72i,even=73i,stringu1="EGAAAA",stringu2="RKFAAA",string4="HHHHxx" 316051200000000000 +tenk unique1=3316i,unique2=3658i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=316i,twothousand=1316i,fivethous=3316i,tenthous=3316i,odd=32i,even=33i,stringu1="OXAAAA",stringu2="SKFAAA",string4="OOOOxx" 316137600000000000 +tenk unique1=1284i,unique2=3659i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=284i,twothousand=1284i,fivethous=1284i,tenthous=1284i,odd=168i,even=169i,stringu1="KXAAAA",stringu2="TKFAAA",string4="VVVVxx" 316224000000000000 +tenk unique1=2497i,unique2=3660i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=497i,twothousand=497i,fivethous=2497i,tenthous=2497i,odd=194i,even=195i,stringu1="BSAAAA",stringu2="UKFAAA",string4="AAAAxx" 316310400000000000 +tenk unique1=1374i,unique2=3661i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=374i,twothousand=1374i,fivethous=1374i,tenthous=1374i,odd=148i,even=149i,stringu1="WAAAAA",stringu2="VKFAAA",string4="HHHHxx" 316396800000000000 +tenk unique1=9525i,unique2=3662i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=525i,twothousand=1525i,fivethous=4525i,tenthous=9525i,odd=50i,even=51i,stringu1="JCAAAA",stringu2="WKFAAA",string4="OOOOxx" 316483200000000000 +tenk unique1=2911i,unique2=3663i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=911i,twothousand=911i,fivethous=2911i,tenthous=2911i,odd=22i,even=23i,stringu1="ZHAAAA",stringu2="XKFAAA",string4="VVVVxx" 316569600000000000 +tenk unique1=9686i,unique2=3664i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=686i,twothousand=1686i,fivethous=4686i,tenthous=9686i,odd=172i,even=173i,stringu1="OIAAAA",stringu2="YKFAAA",string4="AAAAxx" 316656000000000000 +tenk unique1=584i,unique2=3665i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=584i,twothousand=584i,fivethous=584i,tenthous=584i,odd=168i,even=169i,stringu1="MWAAAA",stringu2="ZKFAAA",string4="HHHHxx" 316742400000000000 +tenk unique1=5653i,unique2=3666i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=653i,twothousand=1653i,fivethous=653i,tenthous=5653i,odd=106i,even=107i,stringu1="LJAAAA",stringu2="ALFAAA",string4="OOOOxx" 316828800000000000 +tenk unique1=4986i,unique2=3667i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=986i,twothousand=986i,fivethous=4986i,tenthous=4986i,odd=172i,even=173i,stringu1="UJAAAA",stringu2="BLFAAA",string4="VVVVxx" 316915200000000000 +tenk unique1=6049i,unique2=3668i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=49i,twothousand=49i,fivethous=1049i,tenthous=6049i,odd=98i,even=99i,stringu1="RYAAAA",stringu2="CLFAAA",string4="AAAAxx" 317001600000000000 +tenk unique1=9891i,unique2=3669i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=891i,twothousand=1891i,fivethous=4891i,tenthous=9891i,odd=182i,even=183i,stringu1="LQAAAA",stringu2="DLFAAA",string4="HHHHxx" 317088000000000000 +tenk unique1=8809i,unique2=3670i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=809i,twothousand=809i,fivethous=3809i,tenthous=8809i,odd=18i,even=19i,stringu1="VAAAAA",stringu2="ELFAAA",string4="OOOOxx" 317174400000000000 +tenk unique1=8598i,unique2=3671i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=598i,twothousand=598i,fivethous=3598i,tenthous=8598i,odd=196i,even=197i,stringu1="SSAAAA",stringu2="FLFAAA",string4="VVVVxx" 317260800000000000 +tenk unique1=2573i,unique2=3672i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=573i,twothousand=573i,fivethous=2573i,tenthous=2573i,odd=146i,even=147i,stringu1="ZUAAAA",stringu2="GLFAAA",string4="AAAAxx" 317347200000000000 +tenk unique1=6864i,unique2=3673i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=864i,twothousand=864i,fivethous=1864i,tenthous=6864i,odd=128i,even=129i,stringu1="AEAAAA",stringu2="HLFAAA",string4="HHHHxx" 317433600000000000 +tenk unique1=7932i,unique2=3674i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=932i,twothousand=1932i,fivethous=2932i,tenthous=7932i,odd=64i,even=65i,stringu1="CTAAAA",stringu2="ILFAAA",string4="OOOOxx" 317520000000000000 +tenk unique1=6605i,unique2=3675i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=605i,twothousand=605i,fivethous=1605i,tenthous=6605i,odd=10i,even=11i,stringu1="BUAAAA",stringu2="JLFAAA",string4="VVVVxx" 317606400000000000 +tenk unique1=9500i,unique2=3676i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=500i,twothousand=1500i,fivethous=4500i,tenthous=9500i,odd=0i,even=1i,stringu1="KBAAAA",stringu2="KLFAAA",string4="AAAAxx" 317692800000000000 +tenk unique1=8742i,unique2=3677i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=742i,twothousand=742i,fivethous=3742i,tenthous=8742i,odd=84i,even=85i,stringu1="GYAAAA",stringu2="LLFAAA",string4="HHHHxx" 317779200000000000 +tenk unique1=9815i,unique2=3678i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=815i,twothousand=1815i,fivethous=4815i,tenthous=9815i,odd=30i,even=31i,stringu1="NNAAAA",stringu2="MLFAAA",string4="OOOOxx" 317865600000000000 +tenk unique1=3319i,unique2=3679i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=319i,twothousand=1319i,fivethous=3319i,tenthous=3319i,odd=38i,even=39i,stringu1="RXAAAA",stringu2="NLFAAA",string4="VVVVxx" 317952000000000000 +tenk unique1=184i,unique2=3680i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=184i,twothousand=184i,fivethous=184i,tenthous=184i,odd=168i,even=169i,stringu1="CHAAAA",stringu2="OLFAAA",string4="AAAAxx" 318038400000000000 +tenk unique1=8886i,unique2=3681i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=886i,twothousand=886i,fivethous=3886i,tenthous=8886i,odd=172i,even=173i,stringu1="UDAAAA",stringu2="PLFAAA",string4="HHHHxx" 318124800000000000 +tenk unique1=7050i,unique2=3682i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=50i,twothousand=1050i,fivethous=2050i,tenthous=7050i,odd=100i,even=101i,stringu1="ELAAAA",stringu2="QLFAAA",string4="OOOOxx" 318211200000000000 +tenk unique1=9781i,unique2=3683i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=781i,twothousand=1781i,fivethous=4781i,tenthous=9781i,odd=162i,even=163i,stringu1="FMAAAA",stringu2="RLFAAA",string4="VVVVxx" 318297600000000000 +tenk unique1=2443i,unique2=3684i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=443i,twothousand=443i,fivethous=2443i,tenthous=2443i,odd=86i,even=87i,stringu1="ZPAAAA",stringu2="SLFAAA",string4="AAAAxx" 318384000000000000 +tenk unique1=1160i,unique2=3685i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=160i,twothousand=1160i,fivethous=1160i,tenthous=1160i,odd=120i,even=121i,stringu1="QSAAAA",stringu2="TLFAAA",string4="HHHHxx" 318470400000000000 +tenk unique1=4600i,unique2=3686i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=600i,twothousand=600i,fivethous=4600i,tenthous=4600i,odd=0i,even=1i,stringu1="YUAAAA",stringu2="ULFAAA",string4="OOOOxx" 318556800000000000 +tenk unique1=813i,unique2=3687i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=813i,twothousand=813i,fivethous=813i,tenthous=813i,odd=26i,even=27i,stringu1="HFAAAA",stringu2="VLFAAA",string4="VVVVxx" 318643200000000000 +tenk unique1=5078i,unique2=3688i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=78i,twothousand=1078i,fivethous=78i,tenthous=5078i,odd=156i,even=157i,stringu1="INAAAA",stringu2="WLFAAA",string4="AAAAxx" 318729600000000000 +tenk unique1=9008i,unique2=3689i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=1008i,fivethous=4008i,tenthous=9008i,odd=16i,even=17i,stringu1="MIAAAA",stringu2="XLFAAA",string4="HHHHxx" 318816000000000000 +tenk unique1=9016i,unique2=3690i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=16i,twothousand=1016i,fivethous=4016i,tenthous=9016i,odd=32i,even=33i,stringu1="UIAAAA",stringu2="YLFAAA",string4="OOOOxx" 318902400000000000 +tenk unique1=2747i,unique2=3691i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=747i,twothousand=747i,fivethous=2747i,tenthous=2747i,odd=94i,even=95i,stringu1="RBAAAA",stringu2="ZLFAAA",string4="VVVVxx" 318988800000000000 +tenk unique1=3106i,unique2=3692i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=106i,twothousand=1106i,fivethous=3106i,tenthous=3106i,odd=12i,even=13i,stringu1="MPAAAA",stringu2="AMFAAA",string4="AAAAxx" 319075200000000000 +tenk unique1=8235i,unique2=3693i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=235i,twothousand=235i,fivethous=3235i,tenthous=8235i,odd=70i,even=71i,stringu1="TEAAAA",stringu2="BMFAAA",string4="HHHHxx" 319161600000000000 +tenk unique1=5582i,unique2=3694i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=582i,twothousand=1582i,fivethous=582i,tenthous=5582i,odd=164i,even=165i,stringu1="SGAAAA",stringu2="CMFAAA",string4="OOOOxx" 319248000000000000 +tenk unique1=4334i,unique2=3695i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=334i,twothousand=334i,fivethous=4334i,tenthous=4334i,odd=68i,even=69i,stringu1="SKAAAA",stringu2="DMFAAA",string4="VVVVxx" 319334400000000000 +tenk unique1=1612i,unique2=3696i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=612i,twothousand=1612i,fivethous=1612i,tenthous=1612i,odd=24i,even=25i,stringu1="AKAAAA",stringu2="EMFAAA",string4="AAAAxx" 319420800000000000 +tenk unique1=5650i,unique2=3697i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=650i,twothousand=1650i,fivethous=650i,tenthous=5650i,odd=100i,even=101i,stringu1="IJAAAA",stringu2="FMFAAA",string4="HHHHxx" 319507200000000000 +tenk unique1=6086i,unique2=3698i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=86i,twothousand=86i,fivethous=1086i,tenthous=6086i,odd=172i,even=173i,stringu1="CAAAAA",stringu2="GMFAAA",string4="OOOOxx" 319593600000000000 +tenk unique1=9667i,unique2=3699i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=667i,twothousand=1667i,fivethous=4667i,tenthous=9667i,odd=134i,even=135i,stringu1="VHAAAA",stringu2="HMFAAA",string4="VVVVxx" 319680000000000000 +tenk unique1=4215i,unique2=3700i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=215i,twothousand=215i,fivethous=4215i,tenthous=4215i,odd=30i,even=31i,stringu1="DGAAAA",stringu2="IMFAAA",string4="AAAAxx" 319766400000000000 +tenk unique1=8553i,unique2=3701i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=553i,twothousand=553i,fivethous=3553i,tenthous=8553i,odd=106i,even=107i,stringu1="ZQAAAA",stringu2="JMFAAA",string4="HHHHxx" 319852800000000000 +tenk unique1=9066i,unique2=3702i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=66i,twothousand=1066i,fivethous=4066i,tenthous=9066i,odd=132i,even=133i,stringu1="SKAAAA",stringu2="KMFAAA",string4="OOOOxx" 319939200000000000 +tenk unique1=1092i,unique2=3703i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=92i,twothousand=1092i,fivethous=1092i,tenthous=1092i,odd=184i,even=185i,stringu1="AQAAAA",stringu2="LMFAAA",string4="VVVVxx" 320025600000000000 +tenk unique1=2848i,unique2=3704i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=848i,twothousand=848i,fivethous=2848i,tenthous=2848i,odd=96i,even=97i,stringu1="OFAAAA",stringu2="MMFAAA",string4="AAAAxx" 320112000000000000 +tenk unique1=2765i,unique2=3705i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=765i,twothousand=765i,fivethous=2765i,tenthous=2765i,odd=130i,even=131i,stringu1="JCAAAA",stringu2="NMFAAA",string4="HHHHxx" 320198400000000000 +tenk unique1=6513i,unique2=3706i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=513i,twothousand=513i,fivethous=1513i,tenthous=6513i,odd=26i,even=27i,stringu1="NQAAAA",stringu2="OMFAAA",string4="OOOOxx" 320284800000000000 +tenk unique1=6541i,unique2=3707i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=541i,twothousand=541i,fivethous=1541i,tenthous=6541i,odd=82i,even=83i,stringu1="PRAAAA",stringu2="PMFAAA",string4="VVVVxx" 320371200000000000 +tenk unique1=9617i,unique2=3708i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=617i,twothousand=1617i,fivethous=4617i,tenthous=9617i,odd=34i,even=35i,stringu1="XFAAAA",stringu2="QMFAAA",string4="AAAAxx" 320457600000000000 +tenk unique1=5870i,unique2=3709i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=870i,twothousand=1870i,fivethous=870i,tenthous=5870i,odd=140i,even=141i,stringu1="URAAAA",stringu2="RMFAAA",string4="HHHHxx" 320544000000000000 +tenk unique1=8811i,unique2=3710i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=811i,twothousand=811i,fivethous=3811i,tenthous=8811i,odd=22i,even=23i,stringu1="XAAAAA",stringu2="SMFAAA",string4="OOOOxx" 320630400000000000 +tenk unique1=4529i,unique2=3711i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=529i,twothousand=529i,fivethous=4529i,tenthous=4529i,odd=58i,even=59i,stringu1="FSAAAA",stringu2="TMFAAA",string4="VVVVxx" 320716800000000000 +tenk unique1=161i,unique2=3712i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=161i,twothousand=161i,fivethous=161i,tenthous=161i,odd=122i,even=123i,stringu1="FGAAAA",stringu2="UMFAAA",string4="AAAAxx" 320803200000000000 +tenk unique1=641i,unique2=3713i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=641i,twothousand=641i,fivethous=641i,tenthous=641i,odd=82i,even=83i,stringu1="RYAAAA",stringu2="VMFAAA",string4="HHHHxx" 320889600000000000 +tenk unique1=4767i,unique2=3714i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=767i,twothousand=767i,fivethous=4767i,tenthous=4767i,odd=134i,even=135i,stringu1="JBAAAA",stringu2="WMFAAA",string4="OOOOxx" 320976000000000000 +tenk unique1=6293i,unique2=3715i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=293i,twothousand=293i,fivethous=1293i,tenthous=6293i,odd=186i,even=187i,stringu1="BIAAAA",stringu2="XMFAAA",string4="VVVVxx" 321062400000000000 +tenk unique1=3816i,unique2=3716i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=816i,twothousand=1816i,fivethous=3816i,tenthous=3816i,odd=32i,even=33i,stringu1="UQAAAA",stringu2="YMFAAA",string4="AAAAxx" 321148800000000000 +tenk unique1=4748i,unique2=3717i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=748i,twothousand=748i,fivethous=4748i,tenthous=4748i,odd=96i,even=97i,stringu1="QAAAAA",stringu2="ZMFAAA",string4="HHHHxx" 321235200000000000 +tenk unique1=9924i,unique2=3718i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=924i,twothousand=1924i,fivethous=4924i,tenthous=9924i,odd=48i,even=49i,stringu1="SRAAAA",stringu2="ANFAAA",string4="OOOOxx" 321321600000000000 +tenk unique1=6716i,unique2=3719i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=716i,twothousand=716i,fivethous=1716i,tenthous=6716i,odd=32i,even=33i,stringu1="IYAAAA",stringu2="BNFAAA",string4="VVVVxx" 321408000000000000 +tenk unique1=8828i,unique2=3720i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=828i,twothousand=828i,fivethous=3828i,tenthous=8828i,odd=56i,even=57i,stringu1="OBAAAA",stringu2="CNFAAA",string4="AAAAxx" 321494400000000000 +tenk unique1=4967i,unique2=3721i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=967i,twothousand=967i,fivethous=4967i,tenthous=4967i,odd=134i,even=135i,stringu1="BJAAAA",stringu2="DNFAAA",string4="HHHHxx" 321580800000000000 +tenk unique1=9680i,unique2=3722i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=680i,twothousand=1680i,fivethous=4680i,tenthous=9680i,odd=160i,even=161i,stringu1="IIAAAA",stringu2="ENFAAA",string4="OOOOxx" 321667200000000000 +tenk unique1=2784i,unique2=3723i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=784i,twothousand=784i,fivethous=2784i,tenthous=2784i,odd=168i,even=169i,stringu1="CDAAAA",stringu2="FNFAAA",string4="VVVVxx" 321753600000000000 +tenk unique1=2882i,unique2=3724i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=882i,twothousand=882i,fivethous=2882i,tenthous=2882i,odd=164i,even=165i,stringu1="WGAAAA",stringu2="GNFAAA",string4="AAAAxx" 321840000000000000 +tenk unique1=3641i,unique2=3725i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=641i,twothousand=1641i,fivethous=3641i,tenthous=3641i,odd=82i,even=83i,stringu1="BKAAAA",stringu2="HNFAAA",string4="HHHHxx" 321926400000000000 +tenk unique1=5537i,unique2=3726i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=537i,twothousand=1537i,fivethous=537i,tenthous=5537i,odd=74i,even=75i,stringu1="ZEAAAA",stringu2="INFAAA",string4="OOOOxx" 322012800000000000 +tenk unique1=820i,unique2=3727i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=820i,twothousand=820i,fivethous=820i,tenthous=820i,odd=40i,even=41i,stringu1="OFAAAA",stringu2="JNFAAA",string4="VVVVxx" 322099200000000000 +tenk unique1=5847i,unique2=3728i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=847i,twothousand=1847i,fivethous=847i,tenthous=5847i,odd=94i,even=95i,stringu1="XQAAAA",stringu2="KNFAAA",string4="AAAAxx" 322185600000000000 +tenk unique1=566i,unique2=3729i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=566i,twothousand=566i,fivethous=566i,tenthous=566i,odd=132i,even=133i,stringu1="UVAAAA",stringu2="LNFAAA",string4="HHHHxx" 322272000000000000 +tenk unique1=2246i,unique2=3730i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=246i,twothousand=246i,fivethous=2246i,tenthous=2246i,odd=92i,even=93i,stringu1="KIAAAA",stringu2="MNFAAA",string4="OOOOxx" 322358400000000000 +tenk unique1=6680i,unique2=3731i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=680i,twothousand=680i,fivethous=1680i,tenthous=6680i,odd=160i,even=161i,stringu1="YWAAAA",stringu2="NNFAAA",string4="VVVVxx" 322444800000000000 +tenk unique1=2014i,unique2=3732i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=14i,twothousand=14i,fivethous=2014i,tenthous=2014i,odd=28i,even=29i,stringu1="MZAAAA",stringu2="ONFAAA",string4="AAAAxx" 322531200000000000 +tenk unique1=8355i,unique2=3733i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=355i,twothousand=355i,fivethous=3355i,tenthous=8355i,odd=110i,even=111i,stringu1="JJAAAA",stringu2="PNFAAA",string4="HHHHxx" 322617600000000000 +tenk unique1=1610i,unique2=3734i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=610i,twothousand=1610i,fivethous=1610i,tenthous=1610i,odd=20i,even=21i,stringu1="YJAAAA",stringu2="QNFAAA",string4="OOOOxx" 322704000000000000 +tenk unique1=9719i,unique2=3735i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=719i,twothousand=1719i,fivethous=4719i,tenthous=9719i,odd=38i,even=39i,stringu1="VJAAAA",stringu2="RNFAAA",string4="VVVVxx" 322790400000000000 +tenk unique1=8498i,unique2=3736i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=498i,twothousand=498i,fivethous=3498i,tenthous=8498i,odd=196i,even=197i,stringu1="WOAAAA",stringu2="SNFAAA",string4="AAAAxx" 322876800000000000 +tenk unique1=5883i,unique2=3737i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=883i,twothousand=1883i,fivethous=883i,tenthous=5883i,odd=166i,even=167i,stringu1="HSAAAA",stringu2="TNFAAA",string4="HHHHxx" 322963200000000000 +tenk unique1=7380i,unique2=3738i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=380i,twothousand=1380i,fivethous=2380i,tenthous=7380i,odd=160i,even=161i,stringu1="WXAAAA",stringu2="UNFAAA",string4="OOOOxx" 323049600000000000 +tenk unique1=8865i,unique2=3739i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=865i,twothousand=865i,fivethous=3865i,tenthous=8865i,odd=130i,even=131i,stringu1="ZCAAAA",stringu2="VNFAAA",string4="VVVVxx" 323136000000000000 +tenk unique1=4743i,unique2=3740i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=743i,twothousand=743i,fivethous=4743i,tenthous=4743i,odd=86i,even=87i,stringu1="LAAAAA",stringu2="WNFAAA",string4="AAAAxx" 323222400000000000 +tenk unique1=5086i,unique2=3741i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=86i,twothousand=1086i,fivethous=86i,tenthous=5086i,odd=172i,even=173i,stringu1="QNAAAA",stringu2="XNFAAA",string4="HHHHxx" 323308800000000000 +tenk unique1=2739i,unique2=3742i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=739i,twothousand=739i,fivethous=2739i,tenthous=2739i,odd=78i,even=79i,stringu1="JBAAAA",stringu2="YNFAAA",string4="OOOOxx" 323395200000000000 +tenk unique1=9375i,unique2=3743i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=375i,twothousand=1375i,fivethous=4375i,tenthous=9375i,odd=150i,even=151i,stringu1="PWAAAA",stringu2="ZNFAAA",string4="VVVVxx" 323481600000000000 +tenk unique1=7876i,unique2=3744i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=876i,twothousand=1876i,fivethous=2876i,tenthous=7876i,odd=152i,even=153i,stringu1="YQAAAA",stringu2="AOFAAA",string4="AAAAxx" 323568000000000000 +tenk unique1=453i,unique2=3745i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=453i,twothousand=453i,fivethous=453i,tenthous=453i,odd=106i,even=107i,stringu1="LRAAAA",stringu2="BOFAAA",string4="HHHHxx" 323654400000000000 +tenk unique1=6987i,unique2=3746i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=987i,twothousand=987i,fivethous=1987i,tenthous=6987i,odd=174i,even=175i,stringu1="TIAAAA",stringu2="COFAAA",string4="OOOOxx" 323740800000000000 +tenk unique1=2860i,unique2=3747i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=860i,twothousand=860i,fivethous=2860i,tenthous=2860i,odd=120i,even=121i,stringu1="AGAAAA",stringu2="DOFAAA",string4="VVVVxx" 323827200000000000 +tenk unique1=8372i,unique2=3748i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=372i,twothousand=372i,fivethous=3372i,tenthous=8372i,odd=144i,even=145i,stringu1="AKAAAA",stringu2="EOFAAA",string4="AAAAxx" 323913600000000000 +tenk unique1=2048i,unique2=3749i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=48i,twothousand=48i,fivethous=2048i,tenthous=2048i,odd=96i,even=97i,stringu1="UAAAAA",stringu2="FOFAAA",string4="HHHHxx" 324000000000000000 +tenk unique1=9231i,unique2=3750i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=231i,twothousand=1231i,fivethous=4231i,tenthous=9231i,odd=62i,even=63i,stringu1="BRAAAA",stringu2="GOFAAA",string4="OOOOxx" 324086400000000000 +tenk unique1=634i,unique2=3751i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=634i,twothousand=634i,fivethous=634i,tenthous=634i,odd=68i,even=69i,stringu1="KYAAAA",stringu2="HOFAAA",string4="VVVVxx" 324172800000000000 +tenk unique1=3998i,unique2=3752i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=998i,twothousand=1998i,fivethous=3998i,tenthous=3998i,odd=196i,even=197i,stringu1="UXAAAA",stringu2="IOFAAA",string4="AAAAxx" 324259200000000000 +tenk unique1=4728i,unique2=3753i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=728i,twothousand=728i,fivethous=4728i,tenthous=4728i,odd=56i,even=57i,stringu1="WZAAAA",stringu2="JOFAAA",string4="HHHHxx" 324345600000000000 +tenk unique1=579i,unique2=3754i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=579i,twothousand=579i,fivethous=579i,tenthous=579i,odd=158i,even=159i,stringu1="HWAAAA",stringu2="KOFAAA",string4="OOOOxx" 324432000000000000 +tenk unique1=815i,unique2=3755i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=815i,twothousand=815i,fivethous=815i,tenthous=815i,odd=30i,even=31i,stringu1="JFAAAA",stringu2="LOFAAA",string4="VVVVxx" 324518400000000000 +tenk unique1=1009i,unique2=3756i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=1009i,fivethous=1009i,tenthous=1009i,odd=18i,even=19i,stringu1="VMAAAA",stringu2="MOFAAA",string4="AAAAxx" 324604800000000000 +tenk unique1=6596i,unique2=3757i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=596i,twothousand=596i,fivethous=1596i,tenthous=6596i,odd=192i,even=193i,stringu1="STAAAA",stringu2="NOFAAA",string4="HHHHxx" 324691200000000000 +tenk unique1=2793i,unique2=3758i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=793i,twothousand=793i,fivethous=2793i,tenthous=2793i,odd=186i,even=187i,stringu1="LDAAAA",stringu2="OOFAAA",string4="OOOOxx" 324777600000000000 +tenk unique1=9589i,unique2=3759i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=589i,twothousand=1589i,fivethous=4589i,tenthous=9589i,odd=178i,even=179i,stringu1="VEAAAA",stringu2="POFAAA",string4="VVVVxx" 324864000000000000 +tenk unique1=2794i,unique2=3760i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=794i,twothousand=794i,fivethous=2794i,tenthous=2794i,odd=188i,even=189i,stringu1="MDAAAA",stringu2="QOFAAA",string4="AAAAxx" 324950400000000000 +tenk unique1=2551i,unique2=3761i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=551i,twothousand=551i,fivethous=2551i,tenthous=2551i,odd=102i,even=103i,stringu1="DUAAAA",stringu2="ROFAAA",string4="HHHHxx" 325036800000000000 +tenk unique1=1588i,unique2=3762i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=588i,twothousand=1588i,fivethous=1588i,tenthous=1588i,odd=176i,even=177i,stringu1="CJAAAA",stringu2="SOFAAA",string4="OOOOxx" 325123200000000000 +tenk unique1=4443i,unique2=3763i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=443i,twothousand=443i,fivethous=4443i,tenthous=4443i,odd=86i,even=87i,stringu1="XOAAAA",stringu2="TOFAAA",string4="VVVVxx" 325209600000000000 +tenk unique1=5009i,unique2=3764i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=1009i,fivethous=9i,tenthous=5009i,odd=18i,even=19i,stringu1="RKAAAA",stringu2="UOFAAA",string4="AAAAxx" 325296000000000000 +tenk unique1=4287i,unique2=3765i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=287i,twothousand=287i,fivethous=4287i,tenthous=4287i,odd=174i,even=175i,stringu1="XIAAAA",stringu2="VOFAAA",string4="HHHHxx" 325382400000000000 +tenk unique1=2167i,unique2=3766i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=167i,twothousand=167i,fivethous=2167i,tenthous=2167i,odd=134i,even=135i,stringu1="JFAAAA",stringu2="WOFAAA",string4="OOOOxx" 325468800000000000 +tenk unique1=2290i,unique2=3767i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=290i,twothousand=290i,fivethous=2290i,tenthous=2290i,odd=180i,even=181i,stringu1="CKAAAA",stringu2="XOFAAA",string4="VVVVxx" 325555200000000000 +tenk unique1=7225i,unique2=3768i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=225i,twothousand=1225i,fivethous=2225i,tenthous=7225i,odd=50i,even=51i,stringu1="XRAAAA",stringu2="YOFAAA",string4="AAAAxx" 325641600000000000 +tenk unique1=8992i,unique2=3769i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=992i,twothousand=992i,fivethous=3992i,tenthous=8992i,odd=184i,even=185i,stringu1="WHAAAA",stringu2="ZOFAAA",string4="HHHHxx" 325728000000000000 +tenk unique1=1540i,unique2=3770i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=540i,twothousand=1540i,fivethous=1540i,tenthous=1540i,odd=80i,even=81i,stringu1="GHAAAA",stringu2="APFAAA",string4="OOOOxx" 325814400000000000 +tenk unique1=2029i,unique2=3771i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=29i,twothousand=29i,fivethous=2029i,tenthous=2029i,odd=58i,even=59i,stringu1="BAAAAA",stringu2="BPFAAA",string4="VVVVxx" 325900800000000000 +tenk unique1=2855i,unique2=3772i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=855i,twothousand=855i,fivethous=2855i,tenthous=2855i,odd=110i,even=111i,stringu1="VFAAAA",stringu2="CPFAAA",string4="AAAAxx" 325987200000000000 +tenk unique1=3534i,unique2=3773i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=534i,twothousand=1534i,fivethous=3534i,tenthous=3534i,odd=68i,even=69i,stringu1="YFAAAA",stringu2="DPFAAA",string4="HHHHxx" 326073600000000000 +tenk unique1=8078i,unique2=3774i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=78i,twothousand=78i,fivethous=3078i,tenthous=8078i,odd=156i,even=157i,stringu1="SYAAAA",stringu2="EPFAAA",string4="OOOOxx" 326160000000000000 +tenk unique1=9778i,unique2=3775i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=778i,twothousand=1778i,fivethous=4778i,tenthous=9778i,odd=156i,even=157i,stringu1="CMAAAA",stringu2="FPFAAA",string4="VVVVxx" 326246400000000000 +tenk unique1=3543i,unique2=3776i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=543i,twothousand=1543i,fivethous=3543i,tenthous=3543i,odd=86i,even=87i,stringu1="HGAAAA",stringu2="GPFAAA",string4="AAAAxx" 326332800000000000 +tenk unique1=4778i,unique2=3777i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=778i,twothousand=778i,fivethous=4778i,tenthous=4778i,odd=156i,even=157i,stringu1="UBAAAA",stringu2="HPFAAA",string4="HHHHxx" 326419200000000000 +tenk unique1=8931i,unique2=3778i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=931i,twothousand=931i,fivethous=3931i,tenthous=8931i,odd=62i,even=63i,stringu1="NFAAAA",stringu2="IPFAAA",string4="OOOOxx" 326505600000000000 +tenk unique1=557i,unique2=3779i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=557i,twothousand=557i,fivethous=557i,tenthous=557i,odd=114i,even=115i,stringu1="LVAAAA",stringu2="JPFAAA",string4="VVVVxx" 326592000000000000 +tenk unique1=5546i,unique2=3780i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=546i,twothousand=1546i,fivethous=546i,tenthous=5546i,odd=92i,even=93i,stringu1="IFAAAA",stringu2="KPFAAA",string4="AAAAxx" 326678400000000000 +tenk unique1=7527i,unique2=3781i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=527i,twothousand=1527i,fivethous=2527i,tenthous=7527i,odd=54i,even=55i,stringu1="NDAAAA",stringu2="LPFAAA",string4="HHHHxx" 326764800000000000 +tenk unique1=5000i,unique2=3782i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=1000i,fivethous=0i,tenthous=5000i,odd=0i,even=1i,stringu1="IKAAAA",stringu2="MPFAAA",string4="OOOOxx" 326851200000000000 +tenk unique1=7587i,unique2=3783i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=587i,twothousand=1587i,fivethous=2587i,tenthous=7587i,odd=174i,even=175i,stringu1="VFAAAA",stringu2="NPFAAA",string4="VVVVxx" 326937600000000000 +tenk unique1=3014i,unique2=3784i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=14i,twothousand=1014i,fivethous=3014i,tenthous=3014i,odd=28i,even=29i,stringu1="YLAAAA",stringu2="OPFAAA",string4="AAAAxx" 327024000000000000 +tenk unique1=5276i,unique2=3785i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=276i,twothousand=1276i,fivethous=276i,tenthous=5276i,odd=152i,even=153i,stringu1="YUAAAA",stringu2="PPFAAA",string4="HHHHxx" 327110400000000000 +tenk unique1=6457i,unique2=3786i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=457i,twothousand=457i,fivethous=1457i,tenthous=6457i,odd=114i,even=115i,stringu1="JOAAAA",stringu2="QPFAAA",string4="OOOOxx" 327196800000000000 +tenk unique1=389i,unique2=3787i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=389i,twothousand=389i,fivethous=389i,tenthous=389i,odd=178i,even=179i,stringu1="ZOAAAA",stringu2="RPFAAA",string4="VVVVxx" 327283200000000000 +tenk unique1=7104i,unique2=3788i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=104i,twothousand=1104i,fivethous=2104i,tenthous=7104i,odd=8i,even=9i,stringu1="GNAAAA",stringu2="SPFAAA",string4="AAAAxx" 327369600000000000 +tenk unique1=9995i,unique2=3789i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=995i,twothousand=1995i,fivethous=4995i,tenthous=9995i,odd=190i,even=191i,stringu1="LUAAAA",stringu2="TPFAAA",string4="HHHHxx" 327456000000000000 +tenk unique1=7368i,unique2=3790i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=368i,twothousand=1368i,fivethous=2368i,tenthous=7368i,odd=136i,even=137i,stringu1="KXAAAA",stringu2="UPFAAA",string4="OOOOxx" 327542400000000000 +tenk unique1=3258i,unique2=3791i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=258i,twothousand=1258i,fivethous=3258i,tenthous=3258i,odd=116i,even=117i,stringu1="IVAAAA",stringu2="VPFAAA",string4="VVVVxx" 327628800000000000 +tenk unique1=9208i,unique2=3792i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=208i,twothousand=1208i,fivethous=4208i,tenthous=9208i,odd=16i,even=17i,stringu1="EQAAAA",stringu2="WPFAAA",string4="AAAAxx" 327715200000000000 +tenk unique1=2396i,unique2=3793i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=396i,twothousand=396i,fivethous=2396i,tenthous=2396i,odd=192i,even=193i,stringu1="EOAAAA",stringu2="XPFAAA",string4="HHHHxx" 327801600000000000 +tenk unique1=1715i,unique2=3794i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=715i,twothousand=1715i,fivethous=1715i,tenthous=1715i,odd=30i,even=31i,stringu1="ZNAAAA",stringu2="YPFAAA",string4="OOOOxx" 327888000000000000 +tenk unique1=1240i,unique2=3795i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=240i,twothousand=1240i,fivethous=1240i,tenthous=1240i,odd=80i,even=81i,stringu1="SVAAAA",stringu2="ZPFAAA",string4="VVVVxx" 327974400000000000 +tenk unique1=1952i,unique2=3796i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=952i,twothousand=1952i,fivethous=1952i,tenthous=1952i,odd=104i,even=105i,stringu1="CXAAAA",stringu2="AQFAAA",string4="AAAAxx" 328060800000000000 +tenk unique1=4403i,unique2=3797i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=403i,twothousand=403i,fivethous=4403i,tenthous=4403i,odd=6i,even=7i,stringu1="JNAAAA",stringu2="BQFAAA",string4="HHHHxx" 328147200000000000 +tenk unique1=6333i,unique2=3798i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=333i,twothousand=333i,fivethous=1333i,tenthous=6333i,odd=66i,even=67i,stringu1="PJAAAA",stringu2="CQFAAA",string4="OOOOxx" 328233600000000000 +tenk unique1=2492i,unique2=3799i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=492i,twothousand=492i,fivethous=2492i,tenthous=2492i,odd=184i,even=185i,stringu1="WRAAAA",stringu2="DQFAAA",string4="VVVVxx" 328320000000000000 +tenk unique1=6543i,unique2=3800i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=543i,twothousand=543i,fivethous=1543i,tenthous=6543i,odd=86i,even=87i,stringu1="RRAAAA",stringu2="EQFAAA",string4="AAAAxx" 328406400000000000 +tenk unique1=5548i,unique2=3801i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=548i,twothousand=1548i,fivethous=548i,tenthous=5548i,odd=96i,even=97i,stringu1="KFAAAA",stringu2="FQFAAA",string4="HHHHxx" 328492800000000000 +tenk unique1=3458i,unique2=3802i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=458i,twothousand=1458i,fivethous=3458i,tenthous=3458i,odd=116i,even=117i,stringu1="ADAAAA",stringu2="GQFAAA",string4="OOOOxx" 328579200000000000 +tenk unique1=2588i,unique2=3803i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=588i,twothousand=588i,fivethous=2588i,tenthous=2588i,odd=176i,even=177i,stringu1="OVAAAA",stringu2="HQFAAA",string4="VVVVxx" 328665600000000000 +tenk unique1=1364i,unique2=3804i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=364i,twothousand=1364i,fivethous=1364i,tenthous=1364i,odd=128i,even=129i,stringu1="MAAAAA",stringu2="IQFAAA",string4="AAAAxx" 328752000000000000 +tenk unique1=9856i,unique2=3805i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=856i,twothousand=1856i,fivethous=4856i,tenthous=9856i,odd=112i,even=113i,stringu1="CPAAAA",stringu2="JQFAAA",string4="HHHHxx" 328838400000000000 +tenk unique1=4964i,unique2=3806i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=964i,twothousand=964i,fivethous=4964i,tenthous=4964i,odd=128i,even=129i,stringu1="YIAAAA",stringu2="KQFAAA",string4="OOOOxx" 328924800000000000 +tenk unique1=773i,unique2=3807i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=773i,twothousand=773i,fivethous=773i,tenthous=773i,odd=146i,even=147i,stringu1="TDAAAA",stringu2="LQFAAA",string4="VVVVxx" 329011200000000000 +tenk unique1=6402i,unique2=3808i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=402i,twothousand=402i,fivethous=1402i,tenthous=6402i,odd=4i,even=5i,stringu1="GMAAAA",stringu2="MQFAAA",string4="AAAAxx" 329097600000000000 +tenk unique1=7213i,unique2=3809i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=213i,twothousand=1213i,fivethous=2213i,tenthous=7213i,odd=26i,even=27i,stringu1="LRAAAA",stringu2="NQFAAA",string4="HHHHxx" 329184000000000000 +tenk unique1=3385i,unique2=3810i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=385i,twothousand=1385i,fivethous=3385i,tenthous=3385i,odd=170i,even=171i,stringu1="FAAAAA",stringu2="OQFAAA",string4="OOOOxx" 329270400000000000 +tenk unique1=6005i,unique2=3811i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=5i,fivethous=1005i,tenthous=6005i,odd=10i,even=11i,stringu1="ZWAAAA",stringu2="PQFAAA",string4="VVVVxx" 329356800000000000 +tenk unique1=9346i,unique2=3812i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=346i,twothousand=1346i,fivethous=4346i,tenthous=9346i,odd=92i,even=93i,stringu1="MVAAAA",stringu2="QQFAAA",string4="AAAAxx" 329443200000000000 +tenk unique1=1831i,unique2=3813i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=831i,twothousand=1831i,fivethous=1831i,tenthous=1831i,odd=62i,even=63i,stringu1="LSAAAA",stringu2="RQFAAA",string4="HHHHxx" 329529600000000000 +tenk unique1=5406i,unique2=3814i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=406i,twothousand=1406i,fivethous=406i,tenthous=5406i,odd=12i,even=13i,stringu1="YZAAAA",stringu2="SQFAAA",string4="OOOOxx" 329616000000000000 +tenk unique1=2154i,unique2=3815i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=154i,twothousand=154i,fivethous=2154i,tenthous=2154i,odd=108i,even=109i,stringu1="WEAAAA",stringu2="TQFAAA",string4="VVVVxx" 329702400000000000 +tenk unique1=3721i,unique2=3816i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=721i,twothousand=1721i,fivethous=3721i,tenthous=3721i,odd=42i,even=43i,stringu1="DNAAAA",stringu2="UQFAAA",string4="AAAAxx" 329788800000000000 +tenk unique1=2889i,unique2=3817i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=889i,twothousand=889i,fivethous=2889i,tenthous=2889i,odd=178i,even=179i,stringu1="DHAAAA",stringu2="VQFAAA",string4="HHHHxx" 329875200000000000 +tenk unique1=4410i,unique2=3818i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=410i,twothousand=410i,fivethous=4410i,tenthous=4410i,odd=20i,even=21i,stringu1="QNAAAA",stringu2="WQFAAA",string4="OOOOxx" 329961600000000000 +tenk unique1=7102i,unique2=3819i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=102i,twothousand=1102i,fivethous=2102i,tenthous=7102i,odd=4i,even=5i,stringu1="ENAAAA",stringu2="XQFAAA",string4="VVVVxx" 330048000000000000 +tenk unique1=4057i,unique2=3820i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=57i,twothousand=57i,fivethous=4057i,tenthous=4057i,odd=114i,even=115i,stringu1="BAAAAA",stringu2="YQFAAA",string4="AAAAxx" 330134400000000000 +tenk unique1=9780i,unique2=3821i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=780i,twothousand=1780i,fivethous=4780i,tenthous=9780i,odd=160i,even=161i,stringu1="EMAAAA",stringu2="ZQFAAA",string4="HHHHxx" 330220800000000000 +tenk unique1=9481i,unique2=3822i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=481i,twothousand=1481i,fivethous=4481i,tenthous=9481i,odd=162i,even=163i,stringu1="RAAAAA",stringu2="ARFAAA",string4="OOOOxx" 330307200000000000 +tenk unique1=2366i,unique2=3823i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=366i,twothousand=366i,fivethous=2366i,tenthous=2366i,odd=132i,even=133i,stringu1="ANAAAA",stringu2="BRFAAA",string4="VVVVxx" 330393600000000000 +tenk unique1=2708i,unique2=3824i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=708i,twothousand=708i,fivethous=2708i,tenthous=2708i,odd=16i,even=17i,stringu1="EAAAAA",stringu2="CRFAAA",string4="AAAAxx" 330480000000000000 +tenk unique1=7399i,unique2=3825i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=399i,twothousand=1399i,fivethous=2399i,tenthous=7399i,odd=198i,even=199i,stringu1="PYAAAA",stringu2="DRFAAA",string4="HHHHxx" 330566400000000000 +tenk unique1=5234i,unique2=3826i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=234i,twothousand=1234i,fivethous=234i,tenthous=5234i,odd=68i,even=69i,stringu1="ITAAAA",stringu2="ERFAAA",string4="OOOOxx" 330652800000000000 +tenk unique1=1843i,unique2=3827i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=843i,twothousand=1843i,fivethous=1843i,tenthous=1843i,odd=86i,even=87i,stringu1="XSAAAA",stringu2="FRFAAA",string4="VVVVxx" 330739200000000000 +tenk unique1=1006i,unique2=3828i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=1006i,fivethous=1006i,tenthous=1006i,odd=12i,even=13i,stringu1="SMAAAA",stringu2="GRFAAA",string4="AAAAxx" 330825600000000000 +tenk unique1=7696i,unique2=3829i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=696i,twothousand=1696i,fivethous=2696i,tenthous=7696i,odd=192i,even=193i,stringu1="AKAAAA",stringu2="HRFAAA",string4="HHHHxx" 330912000000000000 +tenk unique1=6411i,unique2=3830i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=411i,twothousand=411i,fivethous=1411i,tenthous=6411i,odd=22i,even=23i,stringu1="PMAAAA",stringu2="IRFAAA",string4="OOOOxx" 330998400000000000 +tenk unique1=3913i,unique2=3831i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=913i,twothousand=1913i,fivethous=3913i,tenthous=3913i,odd=26i,even=27i,stringu1="NUAAAA",stringu2="JRFAAA",string4="VVVVxx" 331084800000000000 +tenk unique1=2538i,unique2=3832i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=538i,twothousand=538i,fivethous=2538i,tenthous=2538i,odd=76i,even=77i,stringu1="QTAAAA",stringu2="KRFAAA",string4="AAAAxx" 331171200000000000 +tenk unique1=3019i,unique2=3833i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=19i,twothousand=1019i,fivethous=3019i,tenthous=3019i,odd=38i,even=39i,stringu1="DMAAAA",stringu2="LRFAAA",string4="HHHHxx" 331257600000000000 +tenk unique1=107i,unique2=3834i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=107i,twothousand=107i,fivethous=107i,tenthous=107i,odd=14i,even=15i,stringu1="DEAAAA",stringu2="MRFAAA",string4="OOOOxx" 331344000000000000 +tenk unique1=427i,unique2=3835i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=427i,twothousand=427i,fivethous=427i,tenthous=427i,odd=54i,even=55i,stringu1="LQAAAA",stringu2="NRFAAA",string4="VVVVxx" 331430400000000000 +tenk unique1=9849i,unique2=3836i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=849i,twothousand=1849i,fivethous=4849i,tenthous=9849i,odd=98i,even=99i,stringu1="VOAAAA",stringu2="ORFAAA",string4="AAAAxx" 331516800000000000 +tenk unique1=4195i,unique2=3837i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=195i,twothousand=195i,fivethous=4195i,tenthous=4195i,odd=190i,even=191i,stringu1="JFAAAA",stringu2="PRFAAA",string4="HHHHxx" 331603200000000000 +tenk unique1=9215i,unique2=3838i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=215i,twothousand=1215i,fivethous=4215i,tenthous=9215i,odd=30i,even=31i,stringu1="LQAAAA",stringu2="QRFAAA",string4="OOOOxx" 331689600000000000 +tenk unique1=3165i,unique2=3839i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=165i,twothousand=1165i,fivethous=3165i,tenthous=3165i,odd=130i,even=131i,stringu1="TRAAAA",stringu2="RRFAAA",string4="VVVVxx" 331776000000000000 +tenk unique1=3280i,unique2=3840i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=280i,twothousand=1280i,fivethous=3280i,tenthous=3280i,odd=160i,even=161i,stringu1="EWAAAA",stringu2="SRFAAA",string4="AAAAxx" 331862400000000000 +tenk unique1=4477i,unique2=3841i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=477i,twothousand=477i,fivethous=4477i,tenthous=4477i,odd=154i,even=155i,stringu1="FQAAAA",stringu2="TRFAAA",string4="HHHHxx" 331948800000000000 +tenk unique1=5885i,unique2=3842i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=885i,twothousand=1885i,fivethous=885i,tenthous=5885i,odd=170i,even=171i,stringu1="JSAAAA",stringu2="URFAAA",string4="OOOOxx" 332035200000000000 +tenk unique1=3311i,unique2=3843i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=311i,twothousand=1311i,fivethous=3311i,tenthous=3311i,odd=22i,even=23i,stringu1="JXAAAA",stringu2="VRFAAA",string4="VVVVxx" 332121600000000000 +tenk unique1=6453i,unique2=3844i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=453i,twothousand=453i,fivethous=1453i,tenthous=6453i,odd=106i,even=107i,stringu1="FOAAAA",stringu2="WRFAAA",string4="AAAAxx" 332208000000000000 +tenk unique1=8527i,unique2=3845i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=527i,twothousand=527i,fivethous=3527i,tenthous=8527i,odd=54i,even=55i,stringu1="ZPAAAA",stringu2="XRFAAA",string4="HHHHxx" 332294400000000000 +tenk unique1=1921i,unique2=3846i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=921i,twothousand=1921i,fivethous=1921i,tenthous=1921i,odd=42i,even=43i,stringu1="XVAAAA",stringu2="YRFAAA",string4="OOOOxx" 332380800000000000 +tenk unique1=2427i,unique2=3847i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=427i,twothousand=427i,fivethous=2427i,tenthous=2427i,odd=54i,even=55i,stringu1="JPAAAA",stringu2="ZRFAAA",string4="VVVVxx" 332467200000000000 +tenk unique1=3691i,unique2=3848i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=691i,twothousand=1691i,fivethous=3691i,tenthous=3691i,odd=182i,even=183i,stringu1="ZLAAAA",stringu2="ASFAAA",string4="AAAAxx" 332553600000000000 +tenk unique1=3882i,unique2=3849i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=882i,twothousand=1882i,fivethous=3882i,tenthous=3882i,odd=164i,even=165i,stringu1="ITAAAA",stringu2="BSFAAA",string4="HHHHxx" 332640000000000000 +tenk unique1=562i,unique2=3850i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=562i,twothousand=562i,fivethous=562i,tenthous=562i,odd=124i,even=125i,stringu1="QVAAAA",stringu2="CSFAAA",string4="OOOOxx" 332726400000000000 +tenk unique1=377i,unique2=3851i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=377i,twothousand=377i,fivethous=377i,tenthous=377i,odd=154i,even=155i,stringu1="NOAAAA",stringu2="DSFAAA",string4="VVVVxx" 332812800000000000 +tenk unique1=1497i,unique2=3852i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=497i,twothousand=1497i,fivethous=1497i,tenthous=1497i,odd=194i,even=195i,stringu1="PFAAAA",stringu2="ESFAAA",string4="AAAAxx" 332899200000000000 +tenk unique1=4453i,unique2=3853i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=453i,twothousand=453i,fivethous=4453i,tenthous=4453i,odd=106i,even=107i,stringu1="HPAAAA",stringu2="FSFAAA",string4="HHHHxx" 332985600000000000 +tenk unique1=4678i,unique2=3854i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=678i,twothousand=678i,fivethous=4678i,tenthous=4678i,odd=156i,even=157i,stringu1="YXAAAA",stringu2="GSFAAA",string4="OOOOxx" 333072000000000000 +tenk unique1=2234i,unique2=3855i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=234i,twothousand=234i,fivethous=2234i,tenthous=2234i,odd=68i,even=69i,stringu1="YHAAAA",stringu2="HSFAAA",string4="VVVVxx" 333158400000000000 +tenk unique1=1073i,unique2=3856i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=73i,twothousand=1073i,fivethous=1073i,tenthous=1073i,odd=146i,even=147i,stringu1="HPAAAA",stringu2="ISFAAA",string4="AAAAxx" 333244800000000000 +tenk unique1=6479i,unique2=3857i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=479i,twothousand=479i,fivethous=1479i,tenthous=6479i,odd=158i,even=159i,stringu1="FPAAAA",stringu2="JSFAAA",string4="HHHHxx" 333331200000000000 +tenk unique1=5665i,unique2=3858i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=665i,twothousand=1665i,fivethous=665i,tenthous=5665i,odd=130i,even=131i,stringu1="XJAAAA",stringu2="KSFAAA",string4="OOOOxx" 333417600000000000 +tenk unique1=586i,unique2=3859i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=586i,twothousand=586i,fivethous=586i,tenthous=586i,odd=172i,even=173i,stringu1="OWAAAA",stringu2="LSFAAA",string4="VVVVxx" 333504000000000000 +tenk unique1=1584i,unique2=3860i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=584i,twothousand=1584i,fivethous=1584i,tenthous=1584i,odd=168i,even=169i,stringu1="YIAAAA",stringu2="MSFAAA",string4="AAAAxx" 333590400000000000 +tenk unique1=2574i,unique2=3861i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=574i,twothousand=574i,fivethous=2574i,tenthous=2574i,odd=148i,even=149i,stringu1="AVAAAA",stringu2="NSFAAA",string4="HHHHxx" 333676800000000000 +tenk unique1=9833i,unique2=3862i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=833i,twothousand=1833i,fivethous=4833i,tenthous=9833i,odd=66i,even=67i,stringu1="FOAAAA",stringu2="OSFAAA",string4="OOOOxx" 333763200000000000 +tenk unique1=6726i,unique2=3863i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=726i,twothousand=726i,fivethous=1726i,tenthous=6726i,odd=52i,even=53i,stringu1="SYAAAA",stringu2="PSFAAA",string4="VVVVxx" 333849600000000000 +tenk unique1=8497i,unique2=3864i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=497i,twothousand=497i,fivethous=3497i,tenthous=8497i,odd=194i,even=195i,stringu1="VOAAAA",stringu2="QSFAAA",string4="AAAAxx" 333936000000000000 +tenk unique1=2914i,unique2=3865i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=914i,twothousand=914i,fivethous=2914i,tenthous=2914i,odd=28i,even=29i,stringu1="CIAAAA",stringu2="RSFAAA",string4="HHHHxx" 334022400000000000 +tenk unique1=8586i,unique2=3866i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=586i,twothousand=586i,fivethous=3586i,tenthous=8586i,odd=172i,even=173i,stringu1="GSAAAA",stringu2="SSFAAA",string4="OOOOxx" 334108800000000000 +tenk unique1=6973i,unique2=3867i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=973i,twothousand=973i,fivethous=1973i,tenthous=6973i,odd=146i,even=147i,stringu1="FIAAAA",stringu2="TSFAAA",string4="VVVVxx" 334195200000000000 +tenk unique1=1322i,unique2=3868i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=322i,twothousand=1322i,fivethous=1322i,tenthous=1322i,odd=44i,even=45i,stringu1="WYAAAA",stringu2="USFAAA",string4="AAAAxx" 334281600000000000 +tenk unique1=5242i,unique2=3869i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=242i,twothousand=1242i,fivethous=242i,tenthous=5242i,odd=84i,even=85i,stringu1="QTAAAA",stringu2="VSFAAA",string4="HHHHxx" 334368000000000000 +tenk unique1=5581i,unique2=3870i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=581i,twothousand=1581i,fivethous=581i,tenthous=5581i,odd=162i,even=163i,stringu1="RGAAAA",stringu2="WSFAAA",string4="OOOOxx" 334454400000000000 +tenk unique1=1365i,unique2=3871i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=365i,twothousand=1365i,fivethous=1365i,tenthous=1365i,odd=130i,even=131i,stringu1="NAAAAA",stringu2="XSFAAA",string4="VVVVxx" 334540800000000000 +tenk unique1=2818i,unique2=3872i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=818i,twothousand=818i,fivethous=2818i,tenthous=2818i,odd=36i,even=37i,stringu1="KEAAAA",stringu2="YSFAAA",string4="AAAAxx" 334627200000000000 +tenk unique1=3758i,unique2=3873i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=758i,twothousand=1758i,fivethous=3758i,tenthous=3758i,odd=116i,even=117i,stringu1="OOAAAA",stringu2="ZSFAAA",string4="HHHHxx" 334713600000000000 +tenk unique1=2665i,unique2=3874i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=665i,twothousand=665i,fivethous=2665i,tenthous=2665i,odd=130i,even=131i,stringu1="NYAAAA",stringu2="ATFAAA",string4="OOOOxx" 334800000000000000 +tenk unique1=9823i,unique2=3875i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=823i,twothousand=1823i,fivethous=4823i,tenthous=9823i,odd=46i,even=47i,stringu1="VNAAAA",stringu2="BTFAAA",string4="VVVVxx" 334886400000000000 +tenk unique1=7057i,unique2=3876i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=57i,twothousand=1057i,fivethous=2057i,tenthous=7057i,odd=114i,even=115i,stringu1="LLAAAA",stringu2="CTFAAA",string4="AAAAxx" 334972800000000000 +tenk unique1=543i,unique2=3877i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=543i,twothousand=543i,fivethous=543i,tenthous=543i,odd=86i,even=87i,stringu1="XUAAAA",stringu2="DTFAAA",string4="HHHHxx" 335059200000000000 +tenk unique1=4008i,unique2=3878i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=8i,fivethous=4008i,tenthous=4008i,odd=16i,even=17i,stringu1="EYAAAA",stringu2="ETFAAA",string4="OOOOxx" 335145600000000000 +tenk unique1=4397i,unique2=3879i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=397i,twothousand=397i,fivethous=4397i,tenthous=4397i,odd=194i,even=195i,stringu1="DNAAAA",stringu2="FTFAAA",string4="VVVVxx" 335232000000000000 +tenk unique1=8533i,unique2=3880i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=533i,twothousand=533i,fivethous=3533i,tenthous=8533i,odd=66i,even=67i,stringu1="FQAAAA",stringu2="GTFAAA",string4="AAAAxx" 335318400000000000 +tenk unique1=9728i,unique2=3881i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=728i,twothousand=1728i,fivethous=4728i,tenthous=9728i,odd=56i,even=57i,stringu1="EKAAAA",stringu2="HTFAAA",string4="HHHHxx" 335404800000000000 +tenk unique1=5198i,unique2=3882i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=198i,twothousand=1198i,fivethous=198i,tenthous=5198i,odd=196i,even=197i,stringu1="YRAAAA",stringu2="ITFAAA",string4="OOOOxx" 335491200000000000 +tenk unique1=5036i,unique2=3883i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=36i,twothousand=1036i,fivethous=36i,tenthous=5036i,odd=72i,even=73i,stringu1="SLAAAA",stringu2="JTFAAA",string4="VVVVxx" 335577600000000000 +tenk unique1=4394i,unique2=3884i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=394i,twothousand=394i,fivethous=4394i,tenthous=4394i,odd=188i,even=189i,stringu1="ANAAAA",stringu2="KTFAAA",string4="AAAAxx" 335664000000000000 +tenk unique1=9633i,unique2=3885i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=633i,twothousand=1633i,fivethous=4633i,tenthous=9633i,odd=66i,even=67i,stringu1="NGAAAA",stringu2="LTFAAA",string4="HHHHxx" 335750400000000000 +tenk unique1=3339i,unique2=3886i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=339i,twothousand=1339i,fivethous=3339i,tenthous=3339i,odd=78i,even=79i,stringu1="LYAAAA",stringu2="MTFAAA",string4="OOOOxx" 335836800000000000 +tenk unique1=9529i,unique2=3887i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=529i,twothousand=1529i,fivethous=4529i,tenthous=9529i,odd=58i,even=59i,stringu1="NCAAAA",stringu2="NTFAAA",string4="VVVVxx" 335923200000000000 +tenk unique1=4780i,unique2=3888i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=780i,twothousand=780i,fivethous=4780i,tenthous=4780i,odd=160i,even=161i,stringu1="WBAAAA",stringu2="OTFAAA",string4="AAAAxx" 336009600000000000 +tenk unique1=4862i,unique2=3889i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=862i,twothousand=862i,fivethous=4862i,tenthous=4862i,odd=124i,even=125i,stringu1="AFAAAA",stringu2="PTFAAA",string4="HHHHxx" 336096000000000000 +tenk unique1=8152i,unique2=3890i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=152i,twothousand=152i,fivethous=3152i,tenthous=8152i,odd=104i,even=105i,stringu1="OBAAAA",stringu2="QTFAAA",string4="OOOOxx" 336182400000000000 +tenk unique1=9330i,unique2=3891i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=330i,twothousand=1330i,fivethous=4330i,tenthous=9330i,odd=60i,even=61i,stringu1="WUAAAA",stringu2="RTFAAA",string4="VVVVxx" 336268800000000000 +tenk unique1=4362i,unique2=3892i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=362i,twothousand=362i,fivethous=4362i,tenthous=4362i,odd=124i,even=125i,stringu1="ULAAAA",stringu2="STFAAA",string4="AAAAxx" 336355200000000000 +tenk unique1=4688i,unique2=3893i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=688i,twothousand=688i,fivethous=4688i,tenthous=4688i,odd=176i,even=177i,stringu1="IYAAAA",stringu2="TTFAAA",string4="HHHHxx" 336441600000000000 +tenk unique1=1903i,unique2=3894i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=903i,twothousand=1903i,fivethous=1903i,tenthous=1903i,odd=6i,even=7i,stringu1="FVAAAA",stringu2="UTFAAA",string4="OOOOxx" 336528000000000000 +tenk unique1=9027i,unique2=3895i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=27i,twothousand=1027i,fivethous=4027i,tenthous=9027i,odd=54i,even=55i,stringu1="FJAAAA",stringu2="VTFAAA",string4="VVVVxx" 336614400000000000 +tenk unique1=5385i,unique2=3896i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=385i,twothousand=1385i,fivethous=385i,tenthous=5385i,odd=170i,even=171i,stringu1="DZAAAA",stringu2="WTFAAA",string4="AAAAxx" 336700800000000000 +tenk unique1=9854i,unique2=3897i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=854i,twothousand=1854i,fivethous=4854i,tenthous=9854i,odd=108i,even=109i,stringu1="APAAAA",stringu2="XTFAAA",string4="HHHHxx" 336787200000000000 +tenk unique1=9033i,unique2=3898i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=33i,twothousand=1033i,fivethous=4033i,tenthous=9033i,odd=66i,even=67i,stringu1="LJAAAA",stringu2="YTFAAA",string4="OOOOxx" 336873600000000000 +tenk unique1=3185i,unique2=3899i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=185i,twothousand=1185i,fivethous=3185i,tenthous=3185i,odd=170i,even=171i,stringu1="NSAAAA",stringu2="ZTFAAA",string4="VVVVxx" 336960000000000000 +tenk unique1=2618i,unique2=3900i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=618i,twothousand=618i,fivethous=2618i,tenthous=2618i,odd=36i,even=37i,stringu1="SWAAAA",stringu2="AUFAAA",string4="AAAAxx" 337046400000000000 +tenk unique1=371i,unique2=3901i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=371i,twothousand=371i,fivethous=371i,tenthous=371i,odd=142i,even=143i,stringu1="HOAAAA",stringu2="BUFAAA",string4="HHHHxx" 337132800000000000 +tenk unique1=3697i,unique2=3902i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=697i,twothousand=1697i,fivethous=3697i,tenthous=3697i,odd=194i,even=195i,stringu1="FMAAAA",stringu2="CUFAAA",string4="OOOOxx" 337219200000000000 +tenk unique1=1682i,unique2=3903i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=682i,twothousand=1682i,fivethous=1682i,tenthous=1682i,odd=164i,even=165i,stringu1="SMAAAA",stringu2="DUFAAA",string4="VVVVxx" 337305600000000000 +tenk unique1=3333i,unique2=3904i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=333i,twothousand=1333i,fivethous=3333i,tenthous=3333i,odd=66i,even=67i,stringu1="FYAAAA",stringu2="EUFAAA",string4="AAAAxx" 337392000000000000 +tenk unique1=1722i,unique2=3905i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=722i,twothousand=1722i,fivethous=1722i,tenthous=1722i,odd=44i,even=45i,stringu1="GOAAAA",stringu2="FUFAAA",string4="HHHHxx" 337478400000000000 +tenk unique1=2009i,unique2=3906i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=9i,fivethous=2009i,tenthous=2009i,odd=18i,even=19i,stringu1="HZAAAA",stringu2="GUFAAA",string4="OOOOxx" 337564800000000000 +tenk unique1=3517i,unique2=3907i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=517i,twothousand=1517i,fivethous=3517i,tenthous=3517i,odd=34i,even=35i,stringu1="HFAAAA",stringu2="HUFAAA",string4="VVVVxx" 337651200000000000 +tenk unique1=7640i,unique2=3908i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=640i,twothousand=1640i,fivethous=2640i,tenthous=7640i,odd=80i,even=81i,stringu1="WHAAAA",stringu2="IUFAAA",string4="AAAAxx" 337737600000000000 +tenk unique1=259i,unique2=3909i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=259i,twothousand=259i,fivethous=259i,tenthous=259i,odd=118i,even=119i,stringu1="ZJAAAA",stringu2="JUFAAA",string4="HHHHxx" 337824000000000000 +tenk unique1=1400i,unique2=3910i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=400i,twothousand=1400i,fivethous=1400i,tenthous=1400i,odd=0i,even=1i,stringu1="WBAAAA",stringu2="KUFAAA",string4="OOOOxx" 337910400000000000 +tenk unique1=6663i,unique2=3911i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=663i,twothousand=663i,fivethous=1663i,tenthous=6663i,odd=126i,even=127i,stringu1="HWAAAA",stringu2="LUFAAA",string4="VVVVxx" 337996800000000000 +tenk unique1=1576i,unique2=3912i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=576i,twothousand=1576i,fivethous=1576i,tenthous=1576i,odd=152i,even=153i,stringu1="QIAAAA",stringu2="MUFAAA",string4="AAAAxx" 338083200000000000 +tenk unique1=8843i,unique2=3913i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=843i,twothousand=843i,fivethous=3843i,tenthous=8843i,odd=86i,even=87i,stringu1="DCAAAA",stringu2="NUFAAA",string4="HHHHxx" 338169600000000000 +tenk unique1=9474i,unique2=3914i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=474i,twothousand=1474i,fivethous=4474i,tenthous=9474i,odd=148i,even=149i,stringu1="KAAAAA",stringu2="OUFAAA",string4="OOOOxx" 338256000000000000 +tenk unique1=1597i,unique2=3915i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=597i,twothousand=1597i,fivethous=1597i,tenthous=1597i,odd=194i,even=195i,stringu1="LJAAAA",stringu2="PUFAAA",string4="VVVVxx" 338342400000000000 +tenk unique1=1143i,unique2=3916i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=143i,twothousand=1143i,fivethous=1143i,tenthous=1143i,odd=86i,even=87i,stringu1="ZRAAAA",stringu2="QUFAAA",string4="AAAAxx" 338428800000000000 +tenk unique1=4162i,unique2=3917i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=162i,twothousand=162i,fivethous=4162i,tenthous=4162i,odd=124i,even=125i,stringu1="CEAAAA",stringu2="RUFAAA",string4="HHHHxx" 338515200000000000 +tenk unique1=1301i,unique2=3918i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=301i,twothousand=1301i,fivethous=1301i,tenthous=1301i,odd=2i,even=3i,stringu1="BYAAAA",stringu2="SUFAAA",string4="OOOOxx" 338601600000000000 +tenk unique1=2935i,unique2=3919i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=935i,twothousand=935i,fivethous=2935i,tenthous=2935i,odd=70i,even=71i,stringu1="XIAAAA",stringu2="TUFAAA",string4="VVVVxx" 338688000000000000 +tenk unique1=886i,unique2=3920i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=886i,twothousand=886i,fivethous=886i,tenthous=886i,odd=172i,even=173i,stringu1="CIAAAA",stringu2="UUFAAA",string4="AAAAxx" 338774400000000000 +tenk unique1=1661i,unique2=3921i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=661i,twothousand=1661i,fivethous=1661i,tenthous=1661i,odd=122i,even=123i,stringu1="XLAAAA",stringu2="VUFAAA",string4="HHHHxx" 338860800000000000 +tenk unique1=1026i,unique2=3922i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=26i,twothousand=1026i,fivethous=1026i,tenthous=1026i,odd=52i,even=53i,stringu1="MNAAAA",stringu2="WUFAAA",string4="OOOOxx" 338947200000000000 +tenk unique1=7034i,unique2=3923i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=34i,twothousand=1034i,fivethous=2034i,tenthous=7034i,odd=68i,even=69i,stringu1="OKAAAA",stringu2="XUFAAA",string4="VVVVxx" 339033600000000000 +tenk unique1=2305i,unique2=3924i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=305i,twothousand=305i,fivethous=2305i,tenthous=2305i,odd=10i,even=11i,stringu1="RKAAAA",stringu2="YUFAAA",string4="AAAAxx" 339120000000000000 +tenk unique1=1725i,unique2=3925i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=725i,twothousand=1725i,fivethous=1725i,tenthous=1725i,odd=50i,even=51i,stringu1="JOAAAA",stringu2="ZUFAAA",string4="HHHHxx" 339206400000000000 +tenk unique1=909i,unique2=3926i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=909i,twothousand=909i,fivethous=909i,tenthous=909i,odd=18i,even=19i,stringu1="ZIAAAA",stringu2="AVFAAA",string4="OOOOxx" 339292800000000000 +tenk unique1=9906i,unique2=3927i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=906i,twothousand=1906i,fivethous=4906i,tenthous=9906i,odd=12i,even=13i,stringu1="ARAAAA",stringu2="BVFAAA",string4="VVVVxx" 339379200000000000 +tenk unique1=3309i,unique2=3928i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=309i,twothousand=1309i,fivethous=3309i,tenthous=3309i,odd=18i,even=19i,stringu1="HXAAAA",stringu2="CVFAAA",string4="AAAAxx" 339465600000000000 +tenk unique1=515i,unique2=3929i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=515i,twothousand=515i,fivethous=515i,tenthous=515i,odd=30i,even=31i,stringu1="VTAAAA",stringu2="DVFAAA",string4="HHHHxx" 339552000000000000 +tenk unique1=932i,unique2=3930i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=932i,twothousand=932i,fivethous=932i,tenthous=932i,odd=64i,even=65i,stringu1="WJAAAA",stringu2="EVFAAA",string4="OOOOxx" 339638400000000000 +tenk unique1=8144i,unique2=3931i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=144i,twothousand=144i,fivethous=3144i,tenthous=8144i,odd=88i,even=89i,stringu1="GBAAAA",stringu2="FVFAAA",string4="VVVVxx" 339724800000000000 +tenk unique1=5592i,unique2=3932i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=592i,twothousand=1592i,fivethous=592i,tenthous=5592i,odd=184i,even=185i,stringu1="CHAAAA",stringu2="GVFAAA",string4="AAAAxx" 339811200000000000 +tenk unique1=4003i,unique2=3933i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=3i,fivethous=4003i,tenthous=4003i,odd=6i,even=7i,stringu1="ZXAAAA",stringu2="HVFAAA",string4="HHHHxx" 339897600000000000 +tenk unique1=9566i,unique2=3934i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=566i,twothousand=1566i,fivethous=4566i,tenthous=9566i,odd=132i,even=133i,stringu1="YDAAAA",stringu2="IVFAAA",string4="OOOOxx" 339984000000000000 +tenk unique1=4556i,unique2=3935i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=556i,twothousand=556i,fivethous=4556i,tenthous=4556i,odd=112i,even=113i,stringu1="GTAAAA",stringu2="JVFAAA",string4="VVVVxx" 340070400000000000 +tenk unique1=268i,unique2=3936i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=268i,twothousand=268i,fivethous=268i,tenthous=268i,odd=136i,even=137i,stringu1="IKAAAA",stringu2="KVFAAA",string4="AAAAxx" 340156800000000000 +tenk unique1=8107i,unique2=3937i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=107i,twothousand=107i,fivethous=3107i,tenthous=8107i,odd=14i,even=15i,stringu1="VZAAAA",stringu2="LVFAAA",string4="HHHHxx" 340243200000000000 +tenk unique1=5816i,unique2=3938i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=816i,twothousand=1816i,fivethous=816i,tenthous=5816i,odd=32i,even=33i,stringu1="SPAAAA",stringu2="MVFAAA",string4="OOOOxx" 340329600000000000 +tenk unique1=8597i,unique2=3939i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=597i,twothousand=597i,fivethous=3597i,tenthous=8597i,odd=194i,even=195i,stringu1="RSAAAA",stringu2="NVFAAA",string4="VVVVxx" 340416000000000000 +tenk unique1=9611i,unique2=3940i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=611i,twothousand=1611i,fivethous=4611i,tenthous=9611i,odd=22i,even=23i,stringu1="RFAAAA",stringu2="OVFAAA",string4="AAAAxx" 340502400000000000 +tenk unique1=8070i,unique2=3941i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=70i,twothousand=70i,fivethous=3070i,tenthous=8070i,odd=140i,even=141i,stringu1="KYAAAA",stringu2="PVFAAA",string4="HHHHxx" 340588800000000000 +tenk unique1=6040i,unique2=3942i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=40i,twothousand=40i,fivethous=1040i,tenthous=6040i,odd=80i,even=81i,stringu1="IYAAAA",stringu2="QVFAAA",string4="OOOOxx" 340675200000000000 +tenk unique1=3184i,unique2=3943i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=184i,twothousand=1184i,fivethous=3184i,tenthous=3184i,odd=168i,even=169i,stringu1="MSAAAA",stringu2="RVFAAA",string4="VVVVxx" 340761600000000000 +tenk unique1=9656i,unique2=3944i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=656i,twothousand=1656i,fivethous=4656i,tenthous=9656i,odd=112i,even=113i,stringu1="KHAAAA",stringu2="SVFAAA",string4="AAAAxx" 340848000000000000 +tenk unique1=1577i,unique2=3945i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=577i,twothousand=1577i,fivethous=1577i,tenthous=1577i,odd=154i,even=155i,stringu1="RIAAAA",stringu2="TVFAAA",string4="HHHHxx" 340934400000000000 +tenk unique1=1805i,unique2=3946i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=805i,twothousand=1805i,fivethous=1805i,tenthous=1805i,odd=10i,even=11i,stringu1="LRAAAA",stringu2="UVFAAA",string4="OOOOxx" 341020800000000000 +tenk unique1=8268i,unique2=3947i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=268i,twothousand=268i,fivethous=3268i,tenthous=8268i,odd=136i,even=137i,stringu1="AGAAAA",stringu2="VVFAAA",string4="VVVVxx" 341107200000000000 +tenk unique1=3489i,unique2=3948i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=489i,twothousand=1489i,fivethous=3489i,tenthous=3489i,odd=178i,even=179i,stringu1="FEAAAA",stringu2="WVFAAA",string4="AAAAxx" 341193600000000000 +tenk unique1=4564i,unique2=3949i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=564i,twothousand=564i,fivethous=4564i,tenthous=4564i,odd=128i,even=129i,stringu1="OTAAAA",stringu2="XVFAAA",string4="HHHHxx" 341280000000000000 +tenk unique1=4006i,unique2=3950i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=6i,fivethous=4006i,tenthous=4006i,odd=12i,even=13i,stringu1="CYAAAA",stringu2="YVFAAA",string4="OOOOxx" 341366400000000000 +tenk unique1=8466i,unique2=3951i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=466i,twothousand=466i,fivethous=3466i,tenthous=8466i,odd=132i,even=133i,stringu1="QNAAAA",stringu2="ZVFAAA",string4="VVVVxx" 341452800000000000 +tenk unique1=938i,unique2=3952i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=938i,twothousand=938i,fivethous=938i,tenthous=938i,odd=76i,even=77i,stringu1="CKAAAA",stringu2="AWFAAA",string4="AAAAxx" 341539200000000000 +tenk unique1=5944i,unique2=3953i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=944i,twothousand=1944i,fivethous=944i,tenthous=5944i,odd=88i,even=89i,stringu1="QUAAAA",stringu2="BWFAAA",string4="HHHHxx" 341625600000000000 +tenk unique1=8363i,unique2=3954i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=363i,twothousand=363i,fivethous=3363i,tenthous=8363i,odd=126i,even=127i,stringu1="RJAAAA",stringu2="CWFAAA",string4="OOOOxx" 341712000000000000 +tenk unique1=5348i,unique2=3955i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=348i,twothousand=1348i,fivethous=348i,tenthous=5348i,odd=96i,even=97i,stringu1="SXAAAA",stringu2="DWFAAA",string4="VVVVxx" 341798400000000000 +tenk unique1=71i,unique2=3956i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=71i,twothousand=71i,fivethous=71i,tenthous=71i,odd=142i,even=143i,stringu1="TCAAAA",stringu2="EWFAAA",string4="AAAAxx" 341884800000000000 +tenk unique1=3620i,unique2=3957i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=620i,twothousand=1620i,fivethous=3620i,tenthous=3620i,odd=40i,even=41i,stringu1="GJAAAA",stringu2="FWFAAA",string4="HHHHxx" 341971200000000000 +tenk unique1=3230i,unique2=3958i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=230i,twothousand=1230i,fivethous=3230i,tenthous=3230i,odd=60i,even=61i,stringu1="GUAAAA",stringu2="GWFAAA",string4="OOOOxx" 342057600000000000 +tenk unique1=6132i,unique2=3959i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=132i,twothousand=132i,fivethous=1132i,tenthous=6132i,odd=64i,even=65i,stringu1="WBAAAA",stringu2="HWFAAA",string4="VVVVxx" 342144000000000000 +tenk unique1=6143i,unique2=3960i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=143i,twothousand=143i,fivethous=1143i,tenthous=6143i,odd=86i,even=87i,stringu1="HCAAAA",stringu2="IWFAAA",string4="AAAAxx" 342230400000000000 +tenk unique1=8781i,unique2=3961i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=781i,twothousand=781i,fivethous=3781i,tenthous=8781i,odd=162i,even=163i,stringu1="TZAAAA",stringu2="JWFAAA",string4="HHHHxx" 342316800000000000 +tenk unique1=5522i,unique2=3962i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=522i,twothousand=1522i,fivethous=522i,tenthous=5522i,odd=44i,even=45i,stringu1="KEAAAA",stringu2="KWFAAA",string4="OOOOxx" 342403200000000000 +tenk unique1=6320i,unique2=3963i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=320i,twothousand=320i,fivethous=1320i,tenthous=6320i,odd=40i,even=41i,stringu1="CJAAAA",stringu2="LWFAAA",string4="VVVVxx" 342489600000000000 +tenk unique1=3923i,unique2=3964i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=923i,twothousand=1923i,fivethous=3923i,tenthous=3923i,odd=46i,even=47i,stringu1="XUAAAA",stringu2="MWFAAA",string4="AAAAxx" 342576000000000000 +tenk unique1=2207i,unique2=3965i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=207i,twothousand=207i,fivethous=2207i,tenthous=2207i,odd=14i,even=15i,stringu1="XGAAAA",stringu2="NWFAAA",string4="HHHHxx" 342662400000000000 +tenk unique1=966i,unique2=3966i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=966i,twothousand=966i,fivethous=966i,tenthous=966i,odd=132i,even=133i,stringu1="ELAAAA",stringu2="OWFAAA",string4="OOOOxx" 342748800000000000 +tenk unique1=9020i,unique2=3967i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=20i,twothousand=1020i,fivethous=4020i,tenthous=9020i,odd=40i,even=41i,stringu1="YIAAAA",stringu2="PWFAAA",string4="VVVVxx" 342835200000000000 +tenk unique1=4616i,unique2=3968i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=616i,twothousand=616i,fivethous=4616i,tenthous=4616i,odd=32i,even=33i,stringu1="OVAAAA",stringu2="QWFAAA",string4="AAAAxx" 342921600000000000 +tenk unique1=8289i,unique2=3969i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=289i,twothousand=289i,fivethous=3289i,tenthous=8289i,odd=178i,even=179i,stringu1="VGAAAA",stringu2="RWFAAA",string4="HHHHxx" 343008000000000000 +tenk unique1=5796i,unique2=3970i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=796i,twothousand=1796i,fivethous=796i,tenthous=5796i,odd=192i,even=193i,stringu1="YOAAAA",stringu2="SWFAAA",string4="OOOOxx" 343094400000000000 +tenk unique1=9259i,unique2=3971i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=259i,twothousand=1259i,fivethous=4259i,tenthous=9259i,odd=118i,even=119i,stringu1="DSAAAA",stringu2="TWFAAA",string4="VVVVxx" 343180800000000000 +tenk unique1=3710i,unique2=3972i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=710i,twothousand=1710i,fivethous=3710i,tenthous=3710i,odd=20i,even=21i,stringu1="SMAAAA",stringu2="UWFAAA",string4="AAAAxx" 343267200000000000 +tenk unique1=251i,unique2=3973i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=251i,twothousand=251i,fivethous=251i,tenthous=251i,odd=102i,even=103i,stringu1="RJAAAA",stringu2="VWFAAA",string4="HHHHxx" 343353600000000000 +tenk unique1=7669i,unique2=3974i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=669i,twothousand=1669i,fivethous=2669i,tenthous=7669i,odd=138i,even=139i,stringu1="ZIAAAA",stringu2="WWFAAA",string4="OOOOxx" 343440000000000000 +tenk unique1=6304i,unique2=3975i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=304i,twothousand=304i,fivethous=1304i,tenthous=6304i,odd=8i,even=9i,stringu1="MIAAAA",stringu2="XWFAAA",string4="VVVVxx" 343526400000000000 +tenk unique1=6454i,unique2=3976i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=454i,twothousand=454i,fivethous=1454i,tenthous=6454i,odd=108i,even=109i,stringu1="GOAAAA",stringu2="YWFAAA",string4="AAAAxx" 343612800000000000 +tenk unique1=1489i,unique2=3977i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=489i,twothousand=1489i,fivethous=1489i,tenthous=1489i,odd=178i,even=179i,stringu1="HFAAAA",stringu2="ZWFAAA",string4="HHHHxx" 343699200000000000 +tenk unique1=715i,unique2=3978i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=715i,twothousand=715i,fivethous=715i,tenthous=715i,odd=30i,even=31i,stringu1="NBAAAA",stringu2="AXFAAA",string4="OOOOxx" 343785600000000000 +tenk unique1=4319i,unique2=3979i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=319i,twothousand=319i,fivethous=4319i,tenthous=4319i,odd=38i,even=39i,stringu1="DKAAAA",stringu2="BXFAAA",string4="VVVVxx" 343872000000000000 +tenk unique1=7112i,unique2=3980i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=112i,twothousand=1112i,fivethous=2112i,tenthous=7112i,odd=24i,even=25i,stringu1="ONAAAA",stringu2="CXFAAA",string4="AAAAxx" 343958400000000000 +tenk unique1=3726i,unique2=3981i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=726i,twothousand=1726i,fivethous=3726i,tenthous=3726i,odd=52i,even=53i,stringu1="INAAAA",stringu2="DXFAAA",string4="HHHHxx" 344044800000000000 +tenk unique1=7727i,unique2=3982i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=727i,twothousand=1727i,fivethous=2727i,tenthous=7727i,odd=54i,even=55i,stringu1="FLAAAA",stringu2="EXFAAA",string4="OOOOxx" 344131200000000000 +tenk unique1=8387i,unique2=3983i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=387i,twothousand=387i,fivethous=3387i,tenthous=8387i,odd=174i,even=175i,stringu1="PKAAAA",stringu2="FXFAAA",string4="VVVVxx" 344217600000000000 +tenk unique1=6555i,unique2=3984i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=555i,twothousand=555i,fivethous=1555i,tenthous=6555i,odd=110i,even=111i,stringu1="DSAAAA",stringu2="GXFAAA",string4="AAAAxx" 344304000000000000 +tenk unique1=1148i,unique2=3985i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=148i,twothousand=1148i,fivethous=1148i,tenthous=1148i,odd=96i,even=97i,stringu1="ESAAAA",stringu2="HXFAAA",string4="HHHHxx" 344390400000000000 +tenk unique1=9000i,unique2=3986i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=1000i,fivethous=4000i,tenthous=9000i,odd=0i,even=1i,stringu1="EIAAAA",stringu2="IXFAAA",string4="OOOOxx" 344476800000000000 +tenk unique1=5278i,unique2=3987i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=278i,twothousand=1278i,fivethous=278i,tenthous=5278i,odd=156i,even=157i,stringu1="AVAAAA",stringu2="JXFAAA",string4="VVVVxx" 344563200000000000 +tenk unique1=2388i,unique2=3988i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=388i,twothousand=388i,fivethous=2388i,tenthous=2388i,odd=176i,even=177i,stringu1="WNAAAA",stringu2="KXFAAA",string4="AAAAxx" 344649600000000000 +tenk unique1=7984i,unique2=3989i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=984i,twothousand=1984i,fivethous=2984i,tenthous=7984i,odd=168i,even=169i,stringu1="CVAAAA",stringu2="LXFAAA",string4="HHHHxx" 344736000000000000 +tenk unique1=881i,unique2=3990i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=881i,twothousand=881i,fivethous=881i,tenthous=881i,odd=162i,even=163i,stringu1="XHAAAA",stringu2="MXFAAA",string4="OOOOxx" 344822400000000000 +tenk unique1=6830i,unique2=3991i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=830i,twothousand=830i,fivethous=1830i,tenthous=6830i,odd=60i,even=61i,stringu1="SCAAAA",stringu2="NXFAAA",string4="VVVVxx" 344908800000000000 +tenk unique1=7056i,unique2=3992i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=56i,twothousand=1056i,fivethous=2056i,tenthous=7056i,odd=112i,even=113i,stringu1="KLAAAA",stringu2="OXFAAA",string4="AAAAxx" 344995200000000000 +tenk unique1=7581i,unique2=3993i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=581i,twothousand=1581i,fivethous=2581i,tenthous=7581i,odd=162i,even=163i,stringu1="PFAAAA",stringu2="PXFAAA",string4="HHHHxx" 345081600000000000 +tenk unique1=5214i,unique2=3994i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=214i,twothousand=1214i,fivethous=214i,tenthous=5214i,odd=28i,even=29i,stringu1="OSAAAA",stringu2="QXFAAA",string4="OOOOxx" 345168000000000000 +tenk unique1=2505i,unique2=3995i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=505i,twothousand=505i,fivethous=2505i,tenthous=2505i,odd=10i,even=11i,stringu1="JSAAAA",stringu2="RXFAAA",string4="VVVVxx" 345254400000000000 +tenk unique1=5112i,unique2=3996i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=112i,twothousand=1112i,fivethous=112i,tenthous=5112i,odd=24i,even=25i,stringu1="QOAAAA",stringu2="SXFAAA",string4="AAAAxx" 345340800000000000 +tenk unique1=9884i,unique2=3997i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=884i,twothousand=1884i,fivethous=4884i,tenthous=9884i,odd=168i,even=169i,stringu1="EQAAAA",stringu2="TXFAAA",string4="HHHHxx" 345427200000000000 +tenk unique1=8040i,unique2=3998i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=40i,twothousand=40i,fivethous=3040i,tenthous=8040i,odd=80i,even=81i,stringu1="GXAAAA",stringu2="UXFAAA",string4="OOOOxx" 345513600000000000 +tenk unique1=7033i,unique2=3999i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=33i,twothousand=1033i,fivethous=2033i,tenthous=7033i,odd=66i,even=67i,stringu1="NKAAAA",stringu2="VXFAAA",string4="VVVVxx" 345600000000000000 +tenk unique1=9343i,unique2=4000i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=343i,twothousand=1343i,fivethous=4343i,tenthous=9343i,odd=86i,even=87i,stringu1="JVAAAA",stringu2="WXFAAA",string4="AAAAxx" 345686400000000000 +tenk unique1=2931i,unique2=4001i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=931i,twothousand=931i,fivethous=2931i,tenthous=2931i,odd=62i,even=63i,stringu1="TIAAAA",stringu2="XXFAAA",string4="HHHHxx" 345772800000000000 +tenk unique1=9024i,unique2=4002i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=24i,twothousand=1024i,fivethous=4024i,tenthous=9024i,odd=48i,even=49i,stringu1="CJAAAA",stringu2="YXFAAA",string4="OOOOxx" 345859200000000000 +tenk unique1=6485i,unique2=4003i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=485i,twothousand=485i,fivethous=1485i,tenthous=6485i,odd=170i,even=171i,stringu1="LPAAAA",stringu2="ZXFAAA",string4="VVVVxx" 345945600000000000 +tenk unique1=3465i,unique2=4004i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=465i,twothousand=1465i,fivethous=3465i,tenthous=3465i,odd=130i,even=131i,stringu1="HDAAAA",stringu2="AYFAAA",string4="AAAAxx" 346032000000000000 +tenk unique1=3357i,unique2=4005i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=357i,twothousand=1357i,fivethous=3357i,tenthous=3357i,odd=114i,even=115i,stringu1="DZAAAA",stringu2="BYFAAA",string4="HHHHxx" 346118400000000000 +tenk unique1=2929i,unique2=4006i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=929i,twothousand=929i,fivethous=2929i,tenthous=2929i,odd=58i,even=59i,stringu1="RIAAAA",stringu2="CYFAAA",string4="OOOOxx" 346204800000000000 +tenk unique1=3086i,unique2=4007i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=86i,twothousand=1086i,fivethous=3086i,tenthous=3086i,odd=172i,even=173i,stringu1="SOAAAA",stringu2="DYFAAA",string4="VVVVxx" 346291200000000000 +tenk unique1=8897i,unique2=4008i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=897i,twothousand=897i,fivethous=3897i,tenthous=8897i,odd=194i,even=195i,stringu1="FEAAAA",stringu2="EYFAAA",string4="AAAAxx" 346377600000000000 +tenk unique1=9688i,unique2=4009i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=688i,twothousand=1688i,fivethous=4688i,tenthous=9688i,odd=176i,even=177i,stringu1="QIAAAA",stringu2="FYFAAA",string4="HHHHxx" 346464000000000000 +tenk unique1=6522i,unique2=4010i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=522i,twothousand=522i,fivethous=1522i,tenthous=6522i,odd=44i,even=45i,stringu1="WQAAAA",stringu2="GYFAAA",string4="OOOOxx" 346550400000000000 +tenk unique1=3241i,unique2=4011i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=241i,twothousand=1241i,fivethous=3241i,tenthous=3241i,odd=82i,even=83i,stringu1="RUAAAA",stringu2="HYFAAA",string4="VVVVxx" 346636800000000000 +tenk unique1=8770i,unique2=4012i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=770i,twothousand=770i,fivethous=3770i,tenthous=8770i,odd=140i,even=141i,stringu1="IZAAAA",stringu2="IYFAAA",string4="AAAAxx" 346723200000000000 +tenk unique1=2884i,unique2=4013i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=884i,twothousand=884i,fivethous=2884i,tenthous=2884i,odd=168i,even=169i,stringu1="YGAAAA",stringu2="JYFAAA",string4="HHHHxx" 346809600000000000 +tenk unique1=9579i,unique2=4014i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=579i,twothousand=1579i,fivethous=4579i,tenthous=9579i,odd=158i,even=159i,stringu1="LEAAAA",stringu2="KYFAAA",string4="OOOOxx" 346896000000000000 +tenk unique1=3125i,unique2=4015i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=125i,twothousand=1125i,fivethous=3125i,tenthous=3125i,odd=50i,even=51i,stringu1="FQAAAA",stringu2="LYFAAA",string4="VVVVxx" 346982400000000000 +tenk unique1=4604i,unique2=4016i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=604i,twothousand=604i,fivethous=4604i,tenthous=4604i,odd=8i,even=9i,stringu1="CVAAAA",stringu2="MYFAAA",string4="AAAAxx" 347068800000000000 +tenk unique1=2682i,unique2=4017i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=682i,twothousand=682i,fivethous=2682i,tenthous=2682i,odd=164i,even=165i,stringu1="EZAAAA",stringu2="NYFAAA",string4="HHHHxx" 347155200000000000 +tenk unique1=254i,unique2=4018i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=254i,twothousand=254i,fivethous=254i,tenthous=254i,odd=108i,even=109i,stringu1="UJAAAA",stringu2="OYFAAA",string4="OOOOxx" 347241600000000000 +tenk unique1=6569i,unique2=4019i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=569i,twothousand=569i,fivethous=1569i,tenthous=6569i,odd=138i,even=139i,stringu1="RSAAAA",stringu2="PYFAAA",string4="VVVVxx" 347328000000000000 +tenk unique1=2686i,unique2=4020i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=686i,twothousand=686i,fivethous=2686i,tenthous=2686i,odd=172i,even=173i,stringu1="IZAAAA",stringu2="QYFAAA",string4="AAAAxx" 347414400000000000 +tenk unique1=2123i,unique2=4021i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=123i,twothousand=123i,fivethous=2123i,tenthous=2123i,odd=46i,even=47i,stringu1="RDAAAA",stringu2="RYFAAA",string4="HHHHxx" 347500800000000000 +tenk unique1=1745i,unique2=4022i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=745i,twothousand=1745i,fivethous=1745i,tenthous=1745i,odd=90i,even=91i,stringu1="DPAAAA",stringu2="SYFAAA",string4="OOOOxx" 347587200000000000 +tenk unique1=247i,unique2=4023i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=247i,twothousand=247i,fivethous=247i,tenthous=247i,odd=94i,even=95i,stringu1="NJAAAA",stringu2="TYFAAA",string4="VVVVxx" 347673600000000000 +tenk unique1=5800i,unique2=4024i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=800i,twothousand=1800i,fivethous=800i,tenthous=5800i,odd=0i,even=1i,stringu1="CPAAAA",stringu2="UYFAAA",string4="AAAAxx" 347760000000000000 +tenk unique1=1121i,unique2=4025i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=121i,twothousand=1121i,fivethous=1121i,tenthous=1121i,odd=42i,even=43i,stringu1="DRAAAA",stringu2="VYFAAA",string4="HHHHxx" 347846400000000000 +tenk unique1=8893i,unique2=4026i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=893i,twothousand=893i,fivethous=3893i,tenthous=8893i,odd=186i,even=187i,stringu1="BEAAAA",stringu2="WYFAAA",string4="OOOOxx" 347932800000000000 +tenk unique1=7819i,unique2=4027i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=819i,twothousand=1819i,fivethous=2819i,tenthous=7819i,odd=38i,even=39i,stringu1="TOAAAA",stringu2="XYFAAA",string4="VVVVxx" 348019200000000000 +tenk unique1=1339i,unique2=4028i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=339i,twothousand=1339i,fivethous=1339i,tenthous=1339i,odd=78i,even=79i,stringu1="NZAAAA",stringu2="YYFAAA",string4="AAAAxx" 348105600000000000 +tenk unique1=5680i,unique2=4029i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=680i,twothousand=1680i,fivethous=680i,tenthous=5680i,odd=160i,even=161i,stringu1="MKAAAA",stringu2="ZYFAAA",string4="HHHHxx" 348192000000000000 +tenk unique1=5093i,unique2=4030i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=93i,twothousand=1093i,fivethous=93i,tenthous=5093i,odd=186i,even=187i,stringu1="XNAAAA",stringu2="AZFAAA",string4="OOOOxx" 348278400000000000 +tenk unique1=3508i,unique2=4031i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=508i,twothousand=1508i,fivethous=3508i,tenthous=3508i,odd=16i,even=17i,stringu1="YEAAAA",stringu2="BZFAAA",string4="VVVVxx" 348364800000000000 +tenk unique1=933i,unique2=4032i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=933i,twothousand=933i,fivethous=933i,tenthous=933i,odd=66i,even=67i,stringu1="XJAAAA",stringu2="CZFAAA",string4="AAAAxx" 348451200000000000 +tenk unique1=1106i,unique2=4033i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=106i,twothousand=1106i,fivethous=1106i,tenthous=1106i,odd=12i,even=13i,stringu1="OQAAAA",stringu2="DZFAAA",string4="HHHHxx" 348537600000000000 +tenk unique1=4386i,unique2=4034i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=386i,twothousand=386i,fivethous=4386i,tenthous=4386i,odd=172i,even=173i,stringu1="SMAAAA",stringu2="EZFAAA",string4="OOOOxx" 348624000000000000 +tenk unique1=5895i,unique2=4035i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=895i,twothousand=1895i,fivethous=895i,tenthous=5895i,odd=190i,even=191i,stringu1="TSAAAA",stringu2="FZFAAA",string4="VVVVxx" 348710400000000000 +tenk unique1=2980i,unique2=4036i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=980i,twothousand=980i,fivethous=2980i,tenthous=2980i,odd=160i,even=161i,stringu1="QKAAAA",stringu2="GZFAAA",string4="AAAAxx" 348796800000000000 +tenk unique1=4400i,unique2=4037i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=400i,twothousand=400i,fivethous=4400i,tenthous=4400i,odd=0i,even=1i,stringu1="GNAAAA",stringu2="HZFAAA",string4="HHHHxx" 348883200000000000 +tenk unique1=7433i,unique2=4038i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=433i,twothousand=1433i,fivethous=2433i,tenthous=7433i,odd=66i,even=67i,stringu1="XZAAAA",stringu2="IZFAAA",string4="OOOOxx" 348969600000000000 +tenk unique1=6110i,unique2=4039i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=110i,twothousand=110i,fivethous=1110i,tenthous=6110i,odd=20i,even=21i,stringu1="ABAAAA",stringu2="JZFAAA",string4="VVVVxx" 349056000000000000 +tenk unique1=867i,unique2=4040i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=867i,twothousand=867i,fivethous=867i,tenthous=867i,odd=134i,even=135i,stringu1="JHAAAA",stringu2="KZFAAA",string4="AAAAxx" 349142400000000000 +tenk unique1=5292i,unique2=4041i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=292i,twothousand=1292i,fivethous=292i,tenthous=5292i,odd=184i,even=185i,stringu1="OVAAAA",stringu2="LZFAAA",string4="HHHHxx" 349228800000000000 +tenk unique1=3926i,unique2=4042i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=926i,twothousand=1926i,fivethous=3926i,tenthous=3926i,odd=52i,even=53i,stringu1="AVAAAA",stringu2="MZFAAA",string4="OOOOxx" 349315200000000000 +tenk unique1=1107i,unique2=4043i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=107i,twothousand=1107i,fivethous=1107i,tenthous=1107i,odd=14i,even=15i,stringu1="PQAAAA",stringu2="NZFAAA",string4="VVVVxx" 349401600000000000 +tenk unique1=7355i,unique2=4044i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=355i,twothousand=1355i,fivethous=2355i,tenthous=7355i,odd=110i,even=111i,stringu1="XWAAAA",stringu2="OZFAAA",string4="AAAAxx" 349488000000000000 +tenk unique1=4689i,unique2=4045i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=689i,twothousand=689i,fivethous=4689i,tenthous=4689i,odd=178i,even=179i,stringu1="JYAAAA",stringu2="PZFAAA",string4="HHHHxx" 349574400000000000 +tenk unique1=4872i,unique2=4046i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=872i,twothousand=872i,fivethous=4872i,tenthous=4872i,odd=144i,even=145i,stringu1="KFAAAA",stringu2="QZFAAA",string4="OOOOxx" 349660800000000000 +tenk unique1=7821i,unique2=4047i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=821i,twothousand=1821i,fivethous=2821i,tenthous=7821i,odd=42i,even=43i,stringu1="VOAAAA",stringu2="RZFAAA",string4="VVVVxx" 349747200000000000 +tenk unique1=7277i,unique2=4048i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=277i,twothousand=1277i,fivethous=2277i,tenthous=7277i,odd=154i,even=155i,stringu1="XTAAAA",stringu2="SZFAAA",string4="AAAAxx" 349833600000000000 +tenk unique1=3268i,unique2=4049i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=268i,twothousand=1268i,fivethous=3268i,tenthous=3268i,odd=136i,even=137i,stringu1="SVAAAA",stringu2="TZFAAA",string4="HHHHxx" 349920000000000000 +tenk unique1=8877i,unique2=4050i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=877i,twothousand=877i,fivethous=3877i,tenthous=8877i,odd=154i,even=155i,stringu1="LDAAAA",stringu2="UZFAAA",string4="OOOOxx" 350006400000000000 +tenk unique1=343i,unique2=4051i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=343i,twothousand=343i,fivethous=343i,tenthous=343i,odd=86i,even=87i,stringu1="FNAAAA",stringu2="VZFAAA",string4="VVVVxx" 350092800000000000 +tenk unique1=621i,unique2=4052i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=621i,twothousand=621i,fivethous=621i,tenthous=621i,odd=42i,even=43i,stringu1="XXAAAA",stringu2="WZFAAA",string4="AAAAxx" 350179200000000000 +tenk unique1=5429i,unique2=4053i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=429i,twothousand=1429i,fivethous=429i,tenthous=5429i,odd=58i,even=59i,stringu1="VAAAAA",stringu2="XZFAAA",string4="HHHHxx" 350265600000000000 +tenk unique1=392i,unique2=4054i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=392i,twothousand=392i,fivethous=392i,tenthous=392i,odd=184i,even=185i,stringu1="CPAAAA",stringu2="YZFAAA",string4="OOOOxx" 350352000000000000 +tenk unique1=6004i,unique2=4055i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=4i,fivethous=1004i,tenthous=6004i,odd=8i,even=9i,stringu1="YWAAAA",stringu2="ZZFAAA",string4="VVVVxx" 350438400000000000 +tenk unique1=6377i,unique2=4056i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=377i,twothousand=377i,fivethous=1377i,tenthous=6377i,odd=154i,even=155i,stringu1="HLAAAA",stringu2="AAGAAA",string4="AAAAxx" 350524800000000000 +tenk unique1=3037i,unique2=4057i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=37i,twothousand=1037i,fivethous=3037i,tenthous=3037i,odd=74i,even=75i,stringu1="VMAAAA",stringu2="BAGAAA",string4="HHHHxx" 350611200000000000 +tenk unique1=3514i,unique2=4058i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=514i,twothousand=1514i,fivethous=3514i,tenthous=3514i,odd=28i,even=29i,stringu1="EFAAAA",stringu2="CAGAAA",string4="OOOOxx" 350697600000000000 +tenk unique1=8740i,unique2=4059i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=740i,twothousand=740i,fivethous=3740i,tenthous=8740i,odd=80i,even=81i,stringu1="EYAAAA",stringu2="DAGAAA",string4="VVVVxx" 350784000000000000 +tenk unique1=3877i,unique2=4060i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=877i,twothousand=1877i,fivethous=3877i,tenthous=3877i,odd=154i,even=155i,stringu1="DTAAAA",stringu2="EAGAAA",string4="AAAAxx" 350870400000000000 +tenk unique1=5731i,unique2=4061i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=731i,twothousand=1731i,fivethous=731i,tenthous=5731i,odd=62i,even=63i,stringu1="LMAAAA",stringu2="FAGAAA",string4="HHHHxx" 350956800000000000 +tenk unique1=6407i,unique2=4062i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=407i,twothousand=407i,fivethous=1407i,tenthous=6407i,odd=14i,even=15i,stringu1="LMAAAA",stringu2="GAGAAA",string4="OOOOxx" 351043200000000000 +tenk unique1=2044i,unique2=4063i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=44i,twothousand=44i,fivethous=2044i,tenthous=2044i,odd=88i,even=89i,stringu1="QAAAAA",stringu2="HAGAAA",string4="VVVVxx" 351129600000000000 +tenk unique1=7362i,unique2=4064i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=362i,twothousand=1362i,fivethous=2362i,tenthous=7362i,odd=124i,even=125i,stringu1="EXAAAA",stringu2="IAGAAA",string4="AAAAxx" 351216000000000000 +tenk unique1=5458i,unique2=4065i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=458i,twothousand=1458i,fivethous=458i,tenthous=5458i,odd=116i,even=117i,stringu1="YBAAAA",stringu2="JAGAAA",string4="HHHHxx" 351302400000000000 +tenk unique1=6437i,unique2=4066i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=437i,twothousand=437i,fivethous=1437i,tenthous=6437i,odd=74i,even=75i,stringu1="PNAAAA",stringu2="KAGAAA",string4="OOOOxx" 351388800000000000 +tenk unique1=1051i,unique2=4067i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=51i,twothousand=1051i,fivethous=1051i,tenthous=1051i,odd=102i,even=103i,stringu1="LOAAAA",stringu2="LAGAAA",string4="VVVVxx" 351475200000000000 +tenk unique1=1203i,unique2=4068i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=203i,twothousand=1203i,fivethous=1203i,tenthous=1203i,odd=6i,even=7i,stringu1="HUAAAA",stringu2="MAGAAA",string4="AAAAxx" 351561600000000000 +tenk unique1=2176i,unique2=4069i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=176i,twothousand=176i,fivethous=2176i,tenthous=2176i,odd=152i,even=153i,stringu1="SFAAAA",stringu2="NAGAAA",string4="HHHHxx" 351648000000000000 +tenk unique1=8997i,unique2=4070i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=997i,twothousand=997i,fivethous=3997i,tenthous=8997i,odd=194i,even=195i,stringu1="BIAAAA",stringu2="OAGAAA",string4="OOOOxx" 351734400000000000 +tenk unique1=6378i,unique2=4071i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=378i,twothousand=378i,fivethous=1378i,tenthous=6378i,odd=156i,even=157i,stringu1="ILAAAA",stringu2="PAGAAA",string4="VVVVxx" 351820800000000000 +tenk unique1=6006i,unique2=4072i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=6i,fivethous=1006i,tenthous=6006i,odd=12i,even=13i,stringu1="AXAAAA",stringu2="QAGAAA",string4="AAAAxx" 351907200000000000 +tenk unique1=2308i,unique2=4073i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=308i,twothousand=308i,fivethous=2308i,tenthous=2308i,odd=16i,even=17i,stringu1="UKAAAA",stringu2="RAGAAA",string4="HHHHxx" 351993600000000000 +tenk unique1=625i,unique2=4074i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=625i,twothousand=625i,fivethous=625i,tenthous=625i,odd=50i,even=51i,stringu1="BYAAAA",stringu2="SAGAAA",string4="OOOOxx" 352080000000000000 +tenk unique1=7298i,unique2=4075i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=298i,twothousand=1298i,fivethous=2298i,tenthous=7298i,odd=196i,even=197i,stringu1="SUAAAA",stringu2="TAGAAA",string4="VVVVxx" 352166400000000000 +tenk unique1=5575i,unique2=4076i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=575i,twothousand=1575i,fivethous=575i,tenthous=5575i,odd=150i,even=151i,stringu1="LGAAAA",stringu2="UAGAAA",string4="AAAAxx" 352252800000000000 +tenk unique1=3565i,unique2=4077i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=565i,twothousand=1565i,fivethous=3565i,tenthous=3565i,odd=130i,even=131i,stringu1="DHAAAA",stringu2="VAGAAA",string4="HHHHxx" 352339200000000000 +tenk unique1=47i,unique2=4078i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=47i,twothousand=47i,fivethous=47i,tenthous=47i,odd=94i,even=95i,stringu1="VBAAAA",stringu2="WAGAAA",string4="OOOOxx" 352425600000000000 +tenk unique1=2413i,unique2=4079i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=413i,twothousand=413i,fivethous=2413i,tenthous=2413i,odd=26i,even=27i,stringu1="VOAAAA",stringu2="XAGAAA",string4="VVVVxx" 352512000000000000 +tenk unique1=2153i,unique2=4080i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=153i,twothousand=153i,fivethous=2153i,tenthous=2153i,odd=106i,even=107i,stringu1="VEAAAA",stringu2="YAGAAA",string4="AAAAxx" 352598400000000000 +tenk unique1=752i,unique2=4081i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=752i,twothousand=752i,fivethous=752i,tenthous=752i,odd=104i,even=105i,stringu1="YCAAAA",stringu2="ZAGAAA",string4="HHHHxx" 352684800000000000 +tenk unique1=4095i,unique2=4082i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=95i,twothousand=95i,fivethous=4095i,tenthous=4095i,odd=190i,even=191i,stringu1="NBAAAA",stringu2="ABGAAA",string4="OOOOxx" 352771200000000000 +tenk unique1=2518i,unique2=4083i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=518i,twothousand=518i,fivethous=2518i,tenthous=2518i,odd=36i,even=37i,stringu1="WSAAAA",stringu2="BBGAAA",string4="VVVVxx" 352857600000000000 +tenk unique1=3681i,unique2=4084i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=681i,twothousand=1681i,fivethous=3681i,tenthous=3681i,odd=162i,even=163i,stringu1="PLAAAA",stringu2="CBGAAA",string4="AAAAxx" 352944000000000000 +tenk unique1=4213i,unique2=4085i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=213i,twothousand=213i,fivethous=4213i,tenthous=4213i,odd=26i,even=27i,stringu1="BGAAAA",stringu2="DBGAAA",string4="HHHHxx" 353030400000000000 +tenk unique1=2615i,unique2=4086i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=615i,twothousand=615i,fivethous=2615i,tenthous=2615i,odd=30i,even=31i,stringu1="PWAAAA",stringu2="EBGAAA",string4="OOOOxx" 353116800000000000 +tenk unique1=1471i,unique2=4087i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=471i,twothousand=1471i,fivethous=1471i,tenthous=1471i,odd=142i,even=143i,stringu1="PEAAAA",stringu2="FBGAAA",string4="VVVVxx" 353203200000000000 +tenk unique1=7315i,unique2=4088i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=315i,twothousand=1315i,fivethous=2315i,tenthous=7315i,odd=30i,even=31i,stringu1="JVAAAA",stringu2="GBGAAA",string4="AAAAxx" 353289600000000000 +tenk unique1=6013i,unique2=4089i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=13i,twothousand=13i,fivethous=1013i,tenthous=6013i,odd=26i,even=27i,stringu1="HXAAAA",stringu2="HBGAAA",string4="HHHHxx" 353376000000000000 +tenk unique1=3077i,unique2=4090i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=77i,twothousand=1077i,fivethous=3077i,tenthous=3077i,odd=154i,even=155i,stringu1="JOAAAA",stringu2="IBGAAA",string4="OOOOxx" 353462400000000000 +tenk unique1=2190i,unique2=4091i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=190i,twothousand=190i,fivethous=2190i,tenthous=2190i,odd=180i,even=181i,stringu1="GGAAAA",stringu2="JBGAAA",string4="VVVVxx" 353548800000000000 +tenk unique1=528i,unique2=4092i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=528i,twothousand=528i,fivethous=528i,tenthous=528i,odd=56i,even=57i,stringu1="IUAAAA",stringu2="KBGAAA",string4="AAAAxx" 353635200000000000 +tenk unique1=9508i,unique2=4093i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=508i,twothousand=1508i,fivethous=4508i,tenthous=9508i,odd=16i,even=17i,stringu1="SBAAAA",stringu2="LBGAAA",string4="HHHHxx" 353721600000000000 +tenk unique1=2473i,unique2=4094i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=473i,twothousand=473i,fivethous=2473i,tenthous=2473i,odd=146i,even=147i,stringu1="DRAAAA",stringu2="MBGAAA",string4="OOOOxx" 353808000000000000 +tenk unique1=167i,unique2=4095i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=167i,twothousand=167i,fivethous=167i,tenthous=167i,odd=134i,even=135i,stringu1="LGAAAA",stringu2="NBGAAA",string4="VVVVxx" 353894400000000000 +tenk unique1=8448i,unique2=4096i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=448i,twothousand=448i,fivethous=3448i,tenthous=8448i,odd=96i,even=97i,stringu1="YMAAAA",stringu2="OBGAAA",string4="AAAAxx" 353980800000000000 +tenk unique1=7538i,unique2=4097i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=538i,twothousand=1538i,fivethous=2538i,tenthous=7538i,odd=76i,even=77i,stringu1="YDAAAA",stringu2="PBGAAA",string4="HHHHxx" 354067200000000000 +tenk unique1=7638i,unique2=4098i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=638i,twothousand=1638i,fivethous=2638i,tenthous=7638i,odd=76i,even=77i,stringu1="UHAAAA",stringu2="QBGAAA",string4="OOOOxx" 354153600000000000 +tenk unique1=4328i,unique2=4099i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=328i,twothousand=328i,fivethous=4328i,tenthous=4328i,odd=56i,even=57i,stringu1="MKAAAA",stringu2="RBGAAA",string4="VVVVxx" 354240000000000000 +tenk unique1=3812i,unique2=4100i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=812i,twothousand=1812i,fivethous=3812i,tenthous=3812i,odd=24i,even=25i,stringu1="QQAAAA",stringu2="SBGAAA",string4="AAAAxx" 354326400000000000 +tenk unique1=2879i,unique2=4101i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=879i,twothousand=879i,fivethous=2879i,tenthous=2879i,odd=158i,even=159i,stringu1="TGAAAA",stringu2="TBGAAA",string4="HHHHxx" 354412800000000000 +tenk unique1=4741i,unique2=4102i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=741i,twothousand=741i,fivethous=4741i,tenthous=4741i,odd=82i,even=83i,stringu1="JAAAAA",stringu2="UBGAAA",string4="OOOOxx" 354499200000000000 +tenk unique1=9155i,unique2=4103i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=155i,twothousand=1155i,fivethous=4155i,tenthous=9155i,odd=110i,even=111i,stringu1="DOAAAA",stringu2="VBGAAA",string4="VVVVxx" 354585600000000000 +tenk unique1=5151i,unique2=4104i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=151i,twothousand=1151i,fivethous=151i,tenthous=5151i,odd=102i,even=103i,stringu1="DQAAAA",stringu2="WBGAAA",string4="AAAAxx" 354672000000000000 +tenk unique1=5591i,unique2=4105i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=591i,twothousand=1591i,fivethous=591i,tenthous=5591i,odd=182i,even=183i,stringu1="BHAAAA",stringu2="XBGAAA",string4="HHHHxx" 354758400000000000 +tenk unique1=1034i,unique2=4106i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=34i,twothousand=1034i,fivethous=1034i,tenthous=1034i,odd=68i,even=69i,stringu1="UNAAAA",stringu2="YBGAAA",string4="OOOOxx" 354844800000000000 +tenk unique1=765i,unique2=4107i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=765i,twothousand=765i,fivethous=765i,tenthous=765i,odd=130i,even=131i,stringu1="LDAAAA",stringu2="ZBGAAA",string4="VVVVxx" 354931200000000000 +tenk unique1=2664i,unique2=4108i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=664i,twothousand=664i,fivethous=2664i,tenthous=2664i,odd=128i,even=129i,stringu1="MYAAAA",stringu2="ACGAAA",string4="AAAAxx" 355017600000000000 +tenk unique1=6854i,unique2=4109i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=854i,twothousand=854i,fivethous=1854i,tenthous=6854i,odd=108i,even=109i,stringu1="QDAAAA",stringu2="BCGAAA",string4="HHHHxx" 355104000000000000 +tenk unique1=8263i,unique2=4110i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=263i,twothousand=263i,fivethous=3263i,tenthous=8263i,odd=126i,even=127i,stringu1="VFAAAA",stringu2="CCGAAA",string4="OOOOxx" 355190400000000000 +tenk unique1=8658i,unique2=4111i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=658i,twothousand=658i,fivethous=3658i,tenthous=8658i,odd=116i,even=117i,stringu1="AVAAAA",stringu2="DCGAAA",string4="VVVVxx" 355276800000000000 +tenk unique1=587i,unique2=4112i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=587i,twothousand=587i,fivethous=587i,tenthous=587i,odd=174i,even=175i,stringu1="PWAAAA",stringu2="ECGAAA",string4="AAAAxx" 355363200000000000 +tenk unique1=4553i,unique2=4113i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=553i,twothousand=553i,fivethous=4553i,tenthous=4553i,odd=106i,even=107i,stringu1="DTAAAA",stringu2="FCGAAA",string4="HHHHxx" 355449600000000000 +tenk unique1=1368i,unique2=4114i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=368i,twothousand=1368i,fivethous=1368i,tenthous=1368i,odd=136i,even=137i,stringu1="QAAAAA",stringu2="GCGAAA",string4="OOOOxx" 355536000000000000 +tenk unique1=1718i,unique2=4115i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=718i,twothousand=1718i,fivethous=1718i,tenthous=1718i,odd=36i,even=37i,stringu1="COAAAA",stringu2="HCGAAA",string4="VVVVxx" 355622400000000000 +tenk unique1=140i,unique2=4116i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=140i,twothousand=140i,fivethous=140i,tenthous=140i,odd=80i,even=81i,stringu1="KFAAAA",stringu2="ICGAAA",string4="AAAAxx" 355708800000000000 +tenk unique1=8341i,unique2=4117i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=341i,twothousand=341i,fivethous=3341i,tenthous=8341i,odd=82i,even=83i,stringu1="VIAAAA",stringu2="JCGAAA",string4="HHHHxx" 355795200000000000 +tenk unique1=72i,unique2=4118i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=72i,twothousand=72i,fivethous=72i,tenthous=72i,odd=144i,even=145i,stringu1="UCAAAA",stringu2="KCGAAA",string4="OOOOxx" 355881600000000000 +tenk unique1=6589i,unique2=4119i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=589i,twothousand=589i,fivethous=1589i,tenthous=6589i,odd=178i,even=179i,stringu1="LTAAAA",stringu2="LCGAAA",string4="VVVVxx" 355968000000000000 +tenk unique1=2024i,unique2=4120i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=24i,twothousand=24i,fivethous=2024i,tenthous=2024i,odd=48i,even=49i,stringu1="WZAAAA",stringu2="MCGAAA",string4="AAAAxx" 356054400000000000 +tenk unique1=8024i,unique2=4121i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=24i,twothousand=24i,fivethous=3024i,tenthous=8024i,odd=48i,even=49i,stringu1="QWAAAA",stringu2="NCGAAA",string4="HHHHxx" 356140800000000000 +tenk unique1=9564i,unique2=4122i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=564i,twothousand=1564i,fivethous=4564i,tenthous=9564i,odd=128i,even=129i,stringu1="WDAAAA",stringu2="OCGAAA",string4="OOOOxx" 356227200000000000 +tenk unique1=8625i,unique2=4123i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=625i,twothousand=625i,fivethous=3625i,tenthous=8625i,odd=50i,even=51i,stringu1="TTAAAA",stringu2="PCGAAA",string4="VVVVxx" 356313600000000000 +tenk unique1=2680i,unique2=4124i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=680i,twothousand=680i,fivethous=2680i,tenthous=2680i,odd=160i,even=161i,stringu1="CZAAAA",stringu2="QCGAAA",string4="AAAAxx" 356400000000000000 +tenk unique1=4323i,unique2=4125i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=323i,twothousand=323i,fivethous=4323i,tenthous=4323i,odd=46i,even=47i,stringu1="HKAAAA",stringu2="RCGAAA",string4="HHHHxx" 356486400000000000 +tenk unique1=8981i,unique2=4126i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=981i,twothousand=981i,fivethous=3981i,tenthous=8981i,odd=162i,even=163i,stringu1="LHAAAA",stringu2="SCGAAA",string4="OOOOxx" 356572800000000000 +tenk unique1=8909i,unique2=4127i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=909i,twothousand=909i,fivethous=3909i,tenthous=8909i,odd=18i,even=19i,stringu1="REAAAA",stringu2="TCGAAA",string4="VVVVxx" 356659200000000000 +tenk unique1=5288i,unique2=4128i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=288i,twothousand=1288i,fivethous=288i,tenthous=5288i,odd=176i,even=177i,stringu1="KVAAAA",stringu2="UCGAAA",string4="AAAAxx" 356745600000000000 +tenk unique1=2057i,unique2=4129i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=57i,twothousand=57i,fivethous=2057i,tenthous=2057i,odd=114i,even=115i,stringu1="DBAAAA",stringu2="VCGAAA",string4="HHHHxx" 356832000000000000 +tenk unique1=5931i,unique2=4130i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=931i,twothousand=1931i,fivethous=931i,tenthous=5931i,odd=62i,even=63i,stringu1="DUAAAA",stringu2="WCGAAA",string4="OOOOxx" 356918400000000000 +tenk unique1=9794i,unique2=4131i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=794i,twothousand=1794i,fivethous=4794i,tenthous=9794i,odd=188i,even=189i,stringu1="SMAAAA",stringu2="XCGAAA",string4="VVVVxx" 357004800000000000 +tenk unique1=1012i,unique2=4132i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=12i,twothousand=1012i,fivethous=1012i,tenthous=1012i,odd=24i,even=25i,stringu1="YMAAAA",stringu2="YCGAAA",string4="AAAAxx" 357091200000000000 +tenk unique1=5496i,unique2=4133i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=496i,twothousand=1496i,fivethous=496i,tenthous=5496i,odd=192i,even=193i,stringu1="KDAAAA",stringu2="ZCGAAA",string4="HHHHxx" 357177600000000000 +tenk unique1=9182i,unique2=4134i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=182i,twothousand=1182i,fivethous=4182i,tenthous=9182i,odd=164i,even=165i,stringu1="EPAAAA",stringu2="ADGAAA",string4="OOOOxx" 357264000000000000 +tenk unique1=5258i,unique2=4135i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=258i,twothousand=1258i,fivethous=258i,tenthous=5258i,odd=116i,even=117i,stringu1="GUAAAA",stringu2="BDGAAA",string4="VVVVxx" 357350400000000000 +tenk unique1=3050i,unique2=4136i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=50i,twothousand=1050i,fivethous=3050i,tenthous=3050i,odd=100i,even=101i,stringu1="INAAAA",stringu2="CDGAAA",string4="AAAAxx" 357436800000000000 +tenk unique1=2083i,unique2=4137i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=83i,twothousand=83i,fivethous=2083i,tenthous=2083i,odd=166i,even=167i,stringu1="DCAAAA",stringu2="DDGAAA",string4="HHHHxx" 357523200000000000 +tenk unique1=3069i,unique2=4138i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=69i,twothousand=1069i,fivethous=3069i,tenthous=3069i,odd=138i,even=139i,stringu1="BOAAAA",stringu2="EDGAAA",string4="OOOOxx" 357609600000000000 +tenk unique1=8459i,unique2=4139i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=459i,twothousand=459i,fivethous=3459i,tenthous=8459i,odd=118i,even=119i,stringu1="JNAAAA",stringu2="FDGAAA",string4="VVVVxx" 357696000000000000 +tenk unique1=169i,unique2=4140i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=169i,twothousand=169i,fivethous=169i,tenthous=169i,odd=138i,even=139i,stringu1="NGAAAA",stringu2="GDGAAA",string4="AAAAxx" 357782400000000000 +tenk unique1=4379i,unique2=4141i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=379i,twothousand=379i,fivethous=4379i,tenthous=4379i,odd=158i,even=159i,stringu1="LMAAAA",stringu2="HDGAAA",string4="HHHHxx" 357868800000000000 +tenk unique1=5126i,unique2=4142i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=126i,twothousand=1126i,fivethous=126i,tenthous=5126i,odd=52i,even=53i,stringu1="EPAAAA",stringu2="IDGAAA",string4="OOOOxx" 357955200000000000 +tenk unique1=1415i,unique2=4143i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=415i,twothousand=1415i,fivethous=1415i,tenthous=1415i,odd=30i,even=31i,stringu1="LCAAAA",stringu2="JDGAAA",string4="VVVVxx" 358041600000000000 +tenk unique1=1163i,unique2=4144i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=163i,twothousand=1163i,fivethous=1163i,tenthous=1163i,odd=126i,even=127i,stringu1="TSAAAA",stringu2="KDGAAA",string4="AAAAxx" 358128000000000000 +tenk unique1=3500i,unique2=4145i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=500i,twothousand=1500i,fivethous=3500i,tenthous=3500i,odd=0i,even=1i,stringu1="QEAAAA",stringu2="LDGAAA",string4="HHHHxx" 358214400000000000 +tenk unique1=7202i,unique2=4146i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=202i,twothousand=1202i,fivethous=2202i,tenthous=7202i,odd=4i,even=5i,stringu1="ARAAAA",stringu2="MDGAAA",string4="OOOOxx" 358300800000000000 +tenk unique1=747i,unique2=4147i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=747i,twothousand=747i,fivethous=747i,tenthous=747i,odd=94i,even=95i,stringu1="TCAAAA",stringu2="NDGAAA",string4="VVVVxx" 358387200000000000 +tenk unique1=9264i,unique2=4148i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=264i,twothousand=1264i,fivethous=4264i,tenthous=9264i,odd=128i,even=129i,stringu1="ISAAAA",stringu2="ODGAAA",string4="AAAAxx" 358473600000000000 +tenk unique1=8548i,unique2=4149i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=548i,twothousand=548i,fivethous=3548i,tenthous=8548i,odd=96i,even=97i,stringu1="UQAAAA",stringu2="PDGAAA",string4="HHHHxx" 358560000000000000 +tenk unique1=4228i,unique2=4150i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=228i,twothousand=228i,fivethous=4228i,tenthous=4228i,odd=56i,even=57i,stringu1="QGAAAA",stringu2="QDGAAA",string4="OOOOxx" 358646400000000000 +tenk unique1=7122i,unique2=4151i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=122i,twothousand=1122i,fivethous=2122i,tenthous=7122i,odd=44i,even=45i,stringu1="YNAAAA",stringu2="RDGAAA",string4="VVVVxx" 358732800000000000 +tenk unique1=3395i,unique2=4152i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=395i,twothousand=1395i,fivethous=3395i,tenthous=3395i,odd=190i,even=191i,stringu1="PAAAAA",stringu2="SDGAAA",string4="AAAAxx" 358819200000000000 +tenk unique1=5674i,unique2=4153i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=674i,twothousand=1674i,fivethous=674i,tenthous=5674i,odd=148i,even=149i,stringu1="GKAAAA",stringu2="TDGAAA",string4="HHHHxx" 358905600000000000 +tenk unique1=7293i,unique2=4154i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=293i,twothousand=1293i,fivethous=2293i,tenthous=7293i,odd=186i,even=187i,stringu1="NUAAAA",stringu2="UDGAAA",string4="OOOOxx" 358992000000000000 +tenk unique1=737i,unique2=4155i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=737i,twothousand=737i,fivethous=737i,tenthous=737i,odd=74i,even=75i,stringu1="JCAAAA",stringu2="VDGAAA",string4="VVVVxx" 359078400000000000 +tenk unique1=9595i,unique2=4156i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=595i,twothousand=1595i,fivethous=4595i,tenthous=9595i,odd=190i,even=191i,stringu1="BFAAAA",stringu2="WDGAAA",string4="AAAAxx" 359164800000000000 +tenk unique1=594i,unique2=4157i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=594i,twothousand=594i,fivethous=594i,tenthous=594i,odd=188i,even=189i,stringu1="WWAAAA",stringu2="XDGAAA",string4="HHHHxx" 359251200000000000 +tenk unique1=5322i,unique2=4158i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=322i,twothousand=1322i,fivethous=322i,tenthous=5322i,odd=44i,even=45i,stringu1="SWAAAA",stringu2="YDGAAA",string4="OOOOxx" 359337600000000000 +tenk unique1=2933i,unique2=4159i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=933i,twothousand=933i,fivethous=2933i,tenthous=2933i,odd=66i,even=67i,stringu1="VIAAAA",stringu2="ZDGAAA",string4="VVVVxx" 359424000000000000 +tenk unique1=4955i,unique2=4160i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=955i,twothousand=955i,fivethous=4955i,tenthous=4955i,odd=110i,even=111i,stringu1="PIAAAA",stringu2="AEGAAA",string4="AAAAxx" 359510400000000000 +tenk unique1=4073i,unique2=4161i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=73i,twothousand=73i,fivethous=4073i,tenthous=4073i,odd=146i,even=147i,stringu1="RAAAAA",stringu2="BEGAAA",string4="HHHHxx" 359596800000000000 +tenk unique1=7249i,unique2=4162i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=249i,twothousand=1249i,fivethous=2249i,tenthous=7249i,odd=98i,even=99i,stringu1="VSAAAA",stringu2="CEGAAA",string4="OOOOxx" 359683200000000000 +tenk unique1=192i,unique2=4163i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=192i,twothousand=192i,fivethous=192i,tenthous=192i,odd=184i,even=185i,stringu1="KHAAAA",stringu2="DEGAAA",string4="VVVVxx" 359769600000000000 +tenk unique1=2617i,unique2=4164i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=617i,twothousand=617i,fivethous=2617i,tenthous=2617i,odd=34i,even=35i,stringu1="RWAAAA",stringu2="EEGAAA",string4="AAAAxx" 359856000000000000 +tenk unique1=7409i,unique2=4165i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=409i,twothousand=1409i,fivethous=2409i,tenthous=7409i,odd=18i,even=19i,stringu1="ZYAAAA",stringu2="FEGAAA",string4="HHHHxx" 359942400000000000 +tenk unique1=4903i,unique2=4166i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=903i,twothousand=903i,fivethous=4903i,tenthous=4903i,odd=6i,even=7i,stringu1="PGAAAA",stringu2="GEGAAA",string4="OOOOxx" 360028800000000000 +tenk unique1=9797i,unique2=4167i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=797i,twothousand=1797i,fivethous=4797i,tenthous=9797i,odd=194i,even=195i,stringu1="VMAAAA",stringu2="HEGAAA",string4="VVVVxx" 360115200000000000 +tenk unique1=9919i,unique2=4168i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=919i,twothousand=1919i,fivethous=4919i,tenthous=9919i,odd=38i,even=39i,stringu1="NRAAAA",stringu2="IEGAAA",string4="AAAAxx" 360201600000000000 +tenk unique1=1878i,unique2=4169i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=878i,twothousand=1878i,fivethous=1878i,tenthous=1878i,odd=156i,even=157i,stringu1="GUAAAA",stringu2="JEGAAA",string4="HHHHxx" 360288000000000000 +tenk unique1=4851i,unique2=4170i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=851i,twothousand=851i,fivethous=4851i,tenthous=4851i,odd=102i,even=103i,stringu1="PEAAAA",stringu2="KEGAAA",string4="OOOOxx" 360374400000000000 +tenk unique1=5514i,unique2=4171i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=514i,twothousand=1514i,fivethous=514i,tenthous=5514i,odd=28i,even=29i,stringu1="CEAAAA",stringu2="LEGAAA",string4="VVVVxx" 360460800000000000 +tenk unique1=2582i,unique2=4172i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=582i,twothousand=582i,fivethous=2582i,tenthous=2582i,odd=164i,even=165i,stringu1="IVAAAA",stringu2="MEGAAA",string4="AAAAxx" 360547200000000000 +tenk unique1=3564i,unique2=4173i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=564i,twothousand=1564i,fivethous=3564i,tenthous=3564i,odd=128i,even=129i,stringu1="CHAAAA",stringu2="NEGAAA",string4="HHHHxx" 360633600000000000 +tenk unique1=7085i,unique2=4174i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=85i,twothousand=1085i,fivethous=2085i,tenthous=7085i,odd=170i,even=171i,stringu1="NMAAAA",stringu2="OEGAAA",string4="OOOOxx" 360720000000000000 +tenk unique1=3619i,unique2=4175i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=619i,twothousand=1619i,fivethous=3619i,tenthous=3619i,odd=38i,even=39i,stringu1="FJAAAA",stringu2="PEGAAA",string4="VVVVxx" 360806400000000000 +tenk unique1=261i,unique2=4176i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=261i,twothousand=261i,fivethous=261i,tenthous=261i,odd=122i,even=123i,stringu1="BKAAAA",stringu2="QEGAAA",string4="AAAAxx" 360892800000000000 +tenk unique1=7338i,unique2=4177i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=338i,twothousand=1338i,fivethous=2338i,tenthous=7338i,odd=76i,even=77i,stringu1="GWAAAA",stringu2="REGAAA",string4="HHHHxx" 360979200000000000 +tenk unique1=4251i,unique2=4178i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=251i,twothousand=251i,fivethous=4251i,tenthous=4251i,odd=102i,even=103i,stringu1="NHAAAA",stringu2="SEGAAA",string4="OOOOxx" 361065600000000000 +tenk unique1=5360i,unique2=4179i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=360i,twothousand=1360i,fivethous=360i,tenthous=5360i,odd=120i,even=121i,stringu1="EYAAAA",stringu2="TEGAAA",string4="VVVVxx" 361152000000000000 +tenk unique1=5678i,unique2=4180i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=678i,twothousand=1678i,fivethous=678i,tenthous=5678i,odd=156i,even=157i,stringu1="KKAAAA",stringu2="UEGAAA",string4="AAAAxx" 361238400000000000 +tenk unique1=9162i,unique2=4181i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=162i,twothousand=1162i,fivethous=4162i,tenthous=9162i,odd=124i,even=125i,stringu1="KOAAAA",stringu2="VEGAAA",string4="HHHHxx" 361324800000000000 +tenk unique1=5920i,unique2=4182i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=920i,twothousand=1920i,fivethous=920i,tenthous=5920i,odd=40i,even=41i,stringu1="STAAAA",stringu2="WEGAAA",string4="OOOOxx" 361411200000000000 +tenk unique1=7156i,unique2=4183i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=156i,twothousand=1156i,fivethous=2156i,tenthous=7156i,odd=112i,even=113i,stringu1="GPAAAA",stringu2="XEGAAA",string4="VVVVxx" 361497600000000000 +tenk unique1=4271i,unique2=4184i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=271i,twothousand=271i,fivethous=4271i,tenthous=4271i,odd=142i,even=143i,stringu1="HIAAAA",stringu2="YEGAAA",string4="AAAAxx" 361584000000000000 +tenk unique1=4698i,unique2=4185i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=698i,twothousand=698i,fivethous=4698i,tenthous=4698i,odd=196i,even=197i,stringu1="SYAAAA",stringu2="ZEGAAA",string4="HHHHxx" 361670400000000000 +tenk unique1=1572i,unique2=4186i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=572i,twothousand=1572i,fivethous=1572i,tenthous=1572i,odd=144i,even=145i,stringu1="MIAAAA",stringu2="AFGAAA",string4="OOOOxx" 361756800000000000 +tenk unique1=6974i,unique2=4187i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=974i,twothousand=974i,fivethous=1974i,tenthous=6974i,odd=148i,even=149i,stringu1="GIAAAA",stringu2="BFGAAA",string4="VVVVxx" 361843200000000000 +tenk unique1=4291i,unique2=4188i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=291i,twothousand=291i,fivethous=4291i,tenthous=4291i,odd=182i,even=183i,stringu1="BJAAAA",stringu2="CFGAAA",string4="AAAAxx" 361929600000000000 +tenk unique1=4036i,unique2=4189i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=36i,twothousand=36i,fivethous=4036i,tenthous=4036i,odd=72i,even=73i,stringu1="GZAAAA",stringu2="DFGAAA",string4="HHHHxx" 362016000000000000 +tenk unique1=7473i,unique2=4190i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=473i,twothousand=1473i,fivethous=2473i,tenthous=7473i,odd=146i,even=147i,stringu1="LBAAAA",stringu2="EFGAAA",string4="OOOOxx" 362102400000000000 +tenk unique1=4786i,unique2=4191i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=786i,twothousand=786i,fivethous=4786i,tenthous=4786i,odd=172i,even=173i,stringu1="CCAAAA",stringu2="FFGAAA",string4="VVVVxx" 362188800000000000 +tenk unique1=2662i,unique2=4192i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=662i,twothousand=662i,fivethous=2662i,tenthous=2662i,odd=124i,even=125i,stringu1="KYAAAA",stringu2="GFGAAA",string4="AAAAxx" 362275200000000000 +tenk unique1=916i,unique2=4193i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=916i,twothousand=916i,fivethous=916i,tenthous=916i,odd=32i,even=33i,stringu1="GJAAAA",stringu2="HFGAAA",string4="HHHHxx" 362361600000000000 +tenk unique1=668i,unique2=4194i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=668i,twothousand=668i,fivethous=668i,tenthous=668i,odd=136i,even=137i,stringu1="SZAAAA",stringu2="IFGAAA",string4="OOOOxx" 362448000000000000 +tenk unique1=4874i,unique2=4195i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=874i,twothousand=874i,fivethous=4874i,tenthous=4874i,odd=148i,even=149i,stringu1="MFAAAA",stringu2="JFGAAA",string4="VVVVxx" 362534400000000000 +tenk unique1=3752i,unique2=4196i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=752i,twothousand=1752i,fivethous=3752i,tenthous=3752i,odd=104i,even=105i,stringu1="IOAAAA",stringu2="KFGAAA",string4="AAAAxx" 362620800000000000 +tenk unique1=4865i,unique2=4197i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=865i,twothousand=865i,fivethous=4865i,tenthous=4865i,odd=130i,even=131i,stringu1="DFAAAA",stringu2="LFGAAA",string4="HHHHxx" 362707200000000000 +tenk unique1=7052i,unique2=4198i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=52i,twothousand=1052i,fivethous=2052i,tenthous=7052i,odd=104i,even=105i,stringu1="GLAAAA",stringu2="MFGAAA",string4="OOOOxx" 362793600000000000 +tenk unique1=5712i,unique2=4199i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=712i,twothousand=1712i,fivethous=712i,tenthous=5712i,odd=24i,even=25i,stringu1="SLAAAA",stringu2="NFGAAA",string4="VVVVxx" 362880000000000000 +tenk unique1=31i,unique2=4200i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=31i,twothousand=31i,fivethous=31i,tenthous=31i,odd=62i,even=63i,stringu1="FBAAAA",stringu2="OFGAAA",string4="AAAAxx" 362966400000000000 +tenk unique1=4944i,unique2=4201i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=944i,twothousand=944i,fivethous=4944i,tenthous=4944i,odd=88i,even=89i,stringu1="EIAAAA",stringu2="PFGAAA",string4="HHHHxx" 363052800000000000 +tenk unique1=1435i,unique2=4202i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=435i,twothousand=1435i,fivethous=1435i,tenthous=1435i,odd=70i,even=71i,stringu1="FDAAAA",stringu2="QFGAAA",string4="OOOOxx" 363139200000000000 +tenk unique1=501i,unique2=4203i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=501i,twothousand=501i,fivethous=501i,tenthous=501i,odd=2i,even=3i,stringu1="HTAAAA",stringu2="RFGAAA",string4="VVVVxx" 363225600000000000 +tenk unique1=9401i,unique2=4204i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=401i,twothousand=1401i,fivethous=4401i,tenthous=9401i,odd=2i,even=3i,stringu1="PXAAAA",stringu2="SFGAAA",string4="AAAAxx" 363312000000000000 +tenk unique1=5014i,unique2=4205i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=14i,twothousand=1014i,fivethous=14i,tenthous=5014i,odd=28i,even=29i,stringu1="WKAAAA",stringu2="TFGAAA",string4="HHHHxx" 363398400000000000 +tenk unique1=9125i,unique2=4206i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=125i,twothousand=1125i,fivethous=4125i,tenthous=9125i,odd=50i,even=51i,stringu1="ZMAAAA",stringu2="UFGAAA",string4="OOOOxx" 363484800000000000 +tenk unique1=6144i,unique2=4207i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=144i,twothousand=144i,fivethous=1144i,tenthous=6144i,odd=88i,even=89i,stringu1="ICAAAA",stringu2="VFGAAA",string4="VVVVxx" 363571200000000000 +tenk unique1=1743i,unique2=4208i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=743i,twothousand=1743i,fivethous=1743i,tenthous=1743i,odd=86i,even=87i,stringu1="BPAAAA",stringu2="WFGAAA",string4="AAAAxx" 363657600000000000 +tenk unique1=4316i,unique2=4209i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=316i,twothousand=316i,fivethous=4316i,tenthous=4316i,odd=32i,even=33i,stringu1="AKAAAA",stringu2="XFGAAA",string4="HHHHxx" 363744000000000000 +tenk unique1=8212i,unique2=4210i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=212i,twothousand=212i,fivethous=3212i,tenthous=8212i,odd=24i,even=25i,stringu1="WDAAAA",stringu2="YFGAAA",string4="OOOOxx" 363830400000000000 +tenk unique1=7344i,unique2=4211i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=344i,twothousand=1344i,fivethous=2344i,tenthous=7344i,odd=88i,even=89i,stringu1="MWAAAA",stringu2="ZFGAAA",string4="VVVVxx" 363916800000000000 +tenk unique1=2051i,unique2=4212i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=51i,twothousand=51i,fivethous=2051i,tenthous=2051i,odd=102i,even=103i,stringu1="XAAAAA",stringu2="AGGAAA",string4="AAAAxx" 364003200000000000 +tenk unique1=8131i,unique2=4213i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=131i,twothousand=131i,fivethous=3131i,tenthous=8131i,odd=62i,even=63i,stringu1="TAAAAA",stringu2="BGGAAA",string4="HHHHxx" 364089600000000000 +tenk unique1=7023i,unique2=4214i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=23i,twothousand=1023i,fivethous=2023i,tenthous=7023i,odd=46i,even=47i,stringu1="DKAAAA",stringu2="CGGAAA",string4="OOOOxx" 364176000000000000 +tenk unique1=9674i,unique2=4215i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=674i,twothousand=1674i,fivethous=4674i,tenthous=9674i,odd=148i,even=149i,stringu1="CIAAAA",stringu2="DGGAAA",string4="VVVVxx" 364262400000000000 +tenk unique1=4984i,unique2=4216i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=984i,twothousand=984i,fivethous=4984i,tenthous=4984i,odd=168i,even=169i,stringu1="SJAAAA",stringu2="EGGAAA",string4="AAAAxx" 364348800000000000 +tenk unique1=111i,unique2=4217i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=111i,twothousand=111i,fivethous=111i,tenthous=111i,odd=22i,even=23i,stringu1="HEAAAA",stringu2="FGGAAA",string4="HHHHxx" 364435200000000000 +tenk unique1=2296i,unique2=4218i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=296i,twothousand=296i,fivethous=2296i,tenthous=2296i,odd=192i,even=193i,stringu1="IKAAAA",stringu2="GGGAAA",string4="OOOOxx" 364521600000000000 +tenk unique1=5025i,unique2=4219i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=25i,twothousand=1025i,fivethous=25i,tenthous=5025i,odd=50i,even=51i,stringu1="HLAAAA",stringu2="HGGAAA",string4="VVVVxx" 364608000000000000 +tenk unique1=1756i,unique2=4220i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=756i,twothousand=1756i,fivethous=1756i,tenthous=1756i,odd=112i,even=113i,stringu1="OPAAAA",stringu2="IGGAAA",string4="AAAAxx" 364694400000000000 +tenk unique1=2885i,unique2=4221i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=885i,twothousand=885i,fivethous=2885i,tenthous=2885i,odd=170i,even=171i,stringu1="ZGAAAA",stringu2="JGGAAA",string4="HHHHxx" 364780800000000000 +tenk unique1=2541i,unique2=4222i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=541i,twothousand=541i,fivethous=2541i,tenthous=2541i,odd=82i,even=83i,stringu1="TTAAAA",stringu2="KGGAAA",string4="OOOOxx" 364867200000000000 +tenk unique1=1919i,unique2=4223i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=919i,twothousand=1919i,fivethous=1919i,tenthous=1919i,odd=38i,even=39i,stringu1="VVAAAA",stringu2="LGGAAA",string4="VVVVxx" 364953600000000000 +tenk unique1=6496i,unique2=4224i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=496i,twothousand=496i,fivethous=1496i,tenthous=6496i,odd=192i,even=193i,stringu1="WPAAAA",stringu2="MGGAAA",string4="AAAAxx" 365040000000000000 +tenk unique1=6103i,unique2=4225i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=103i,twothousand=103i,fivethous=1103i,tenthous=6103i,odd=6i,even=7i,stringu1="TAAAAA",stringu2="NGGAAA",string4="HHHHxx" 365126400000000000 +tenk unique1=98i,unique2=4226i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=98i,twothousand=98i,fivethous=98i,tenthous=98i,odd=196i,even=197i,stringu1="UDAAAA",stringu2="OGGAAA",string4="OOOOxx" 365212800000000000 +tenk unique1=3727i,unique2=4227i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=727i,twothousand=1727i,fivethous=3727i,tenthous=3727i,odd=54i,even=55i,stringu1="JNAAAA",stringu2="PGGAAA",string4="VVVVxx" 365299200000000000 +tenk unique1=689i,unique2=4228i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=689i,twothousand=689i,fivethous=689i,tenthous=689i,odd=178i,even=179i,stringu1="NAAAAA",stringu2="QGGAAA",string4="AAAAxx" 365385600000000000 +tenk unique1=7181i,unique2=4229i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=181i,twothousand=1181i,fivethous=2181i,tenthous=7181i,odd=162i,even=163i,stringu1="FQAAAA",stringu2="RGGAAA",string4="HHHHxx" 365472000000000000 +tenk unique1=8447i,unique2=4230i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=447i,twothousand=447i,fivethous=3447i,tenthous=8447i,odd=94i,even=95i,stringu1="XMAAAA",stringu2="SGGAAA",string4="OOOOxx" 365558400000000000 +tenk unique1=4569i,unique2=4231i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=569i,twothousand=569i,fivethous=4569i,tenthous=4569i,odd=138i,even=139i,stringu1="TTAAAA",stringu2="TGGAAA",string4="VVVVxx" 365644800000000000 +tenk unique1=8844i,unique2=4232i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=844i,twothousand=844i,fivethous=3844i,tenthous=8844i,odd=88i,even=89i,stringu1="ECAAAA",stringu2="UGGAAA",string4="AAAAxx" 365731200000000000 +tenk unique1=2436i,unique2=4233i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=436i,twothousand=436i,fivethous=2436i,tenthous=2436i,odd=72i,even=73i,stringu1="SPAAAA",stringu2="VGGAAA",string4="HHHHxx" 365817600000000000 +tenk unique1=391i,unique2=4234i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=391i,twothousand=391i,fivethous=391i,tenthous=391i,odd=182i,even=183i,stringu1="BPAAAA",stringu2="WGGAAA",string4="OOOOxx" 365904000000000000 +tenk unique1=3035i,unique2=4235i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=35i,twothousand=1035i,fivethous=3035i,tenthous=3035i,odd=70i,even=71i,stringu1="TMAAAA",stringu2="XGGAAA",string4="VVVVxx" 365990400000000000 +tenk unique1=7583i,unique2=4236i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=583i,twothousand=1583i,fivethous=2583i,tenthous=7583i,odd=166i,even=167i,stringu1="RFAAAA",stringu2="YGGAAA",string4="AAAAxx" 366076800000000000 +tenk unique1=1145i,unique2=4237i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=145i,twothousand=1145i,fivethous=1145i,tenthous=1145i,odd=90i,even=91i,stringu1="BSAAAA",stringu2="ZGGAAA",string4="HHHHxx" 366163200000000000 +tenk unique1=93i,unique2=4238i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=93i,twothousand=93i,fivethous=93i,tenthous=93i,odd=186i,even=187i,stringu1="PDAAAA",stringu2="AHGAAA",string4="OOOOxx" 366249600000000000 +tenk unique1=8896i,unique2=4239i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=896i,twothousand=896i,fivethous=3896i,tenthous=8896i,odd=192i,even=193i,stringu1="EEAAAA",stringu2="BHGAAA",string4="VVVVxx" 366336000000000000 +tenk unique1=6719i,unique2=4240i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=719i,twothousand=719i,fivethous=1719i,tenthous=6719i,odd=38i,even=39i,stringu1="LYAAAA",stringu2="CHGAAA",string4="AAAAxx" 366422400000000000 +tenk unique1=7728i,unique2=4241i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=728i,twothousand=1728i,fivethous=2728i,tenthous=7728i,odd=56i,even=57i,stringu1="GLAAAA",stringu2="DHGAAA",string4="HHHHxx" 366508800000000000 +tenk unique1=1349i,unique2=4242i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=349i,twothousand=1349i,fivethous=1349i,tenthous=1349i,odd=98i,even=99i,stringu1="XZAAAA",stringu2="EHGAAA",string4="OOOOxx" 366595200000000000 +tenk unique1=5349i,unique2=4243i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=349i,twothousand=1349i,fivethous=349i,tenthous=5349i,odd=98i,even=99i,stringu1="TXAAAA",stringu2="FHGAAA",string4="VVVVxx" 366681600000000000 +tenk unique1=3040i,unique2=4244i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=40i,twothousand=1040i,fivethous=3040i,tenthous=3040i,odd=80i,even=81i,stringu1="YMAAAA",stringu2="GHGAAA",string4="AAAAxx" 366768000000000000 +tenk unique1=2414i,unique2=4245i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=414i,twothousand=414i,fivethous=2414i,tenthous=2414i,odd=28i,even=29i,stringu1="WOAAAA",stringu2="HHGAAA",string4="HHHHxx" 366854400000000000 +tenk unique1=5122i,unique2=4246i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=122i,twothousand=1122i,fivethous=122i,tenthous=5122i,odd=44i,even=45i,stringu1="APAAAA",stringu2="IHGAAA",string4="OOOOxx" 366940800000000000 +tenk unique1=9553i,unique2=4247i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=553i,twothousand=1553i,fivethous=4553i,tenthous=9553i,odd=106i,even=107i,stringu1="LDAAAA",stringu2="JHGAAA",string4="VVVVxx" 367027200000000000 +tenk unique1=5987i,unique2=4248i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=987i,twothousand=1987i,fivethous=987i,tenthous=5987i,odd=174i,even=175i,stringu1="HWAAAA",stringu2="KHGAAA",string4="AAAAxx" 367113600000000000 +tenk unique1=5939i,unique2=4249i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=939i,twothousand=1939i,fivethous=939i,tenthous=5939i,odd=78i,even=79i,stringu1="LUAAAA",stringu2="LHGAAA",string4="HHHHxx" 367200000000000000 +tenk unique1=3525i,unique2=4250i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=525i,twothousand=1525i,fivethous=3525i,tenthous=3525i,odd=50i,even=51i,stringu1="PFAAAA",stringu2="MHGAAA",string4="OOOOxx" 367286400000000000 +tenk unique1=1371i,unique2=4251i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=371i,twothousand=1371i,fivethous=1371i,tenthous=1371i,odd=142i,even=143i,stringu1="TAAAAA",stringu2="NHGAAA",string4="VVVVxx" 367372800000000000 +tenk unique1=618i,unique2=4252i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=618i,twothousand=618i,fivethous=618i,tenthous=618i,odd=36i,even=37i,stringu1="UXAAAA",stringu2="OHGAAA",string4="AAAAxx" 367459200000000000 +tenk unique1=6529i,unique2=4253i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=529i,twothousand=529i,fivethous=1529i,tenthous=6529i,odd=58i,even=59i,stringu1="DRAAAA",stringu2="PHGAAA",string4="HHHHxx" 367545600000000000 +tenk unique1=4010i,unique2=4254i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=10i,twothousand=10i,fivethous=4010i,tenthous=4010i,odd=20i,even=21i,stringu1="GYAAAA",stringu2="QHGAAA",string4="OOOOxx" 367632000000000000 +tenk unique1=328i,unique2=4255i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=328i,twothousand=328i,fivethous=328i,tenthous=328i,odd=56i,even=57i,stringu1="QMAAAA",stringu2="RHGAAA",string4="VVVVxx" 367718400000000000 +tenk unique1=6121i,unique2=4256i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=121i,twothousand=121i,fivethous=1121i,tenthous=6121i,odd=42i,even=43i,stringu1="LBAAAA",stringu2="SHGAAA",string4="AAAAxx" 367804800000000000 +tenk unique1=3505i,unique2=4257i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=505i,twothousand=1505i,fivethous=3505i,tenthous=3505i,odd=10i,even=11i,stringu1="VEAAAA",stringu2="THGAAA",string4="HHHHxx" 367891200000000000 +tenk unique1=2033i,unique2=4258i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=33i,twothousand=33i,fivethous=2033i,tenthous=2033i,odd=66i,even=67i,stringu1="FAAAAA",stringu2="UHGAAA",string4="OOOOxx" 367977600000000000 +tenk unique1=4724i,unique2=4259i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=724i,twothousand=724i,fivethous=4724i,tenthous=4724i,odd=48i,even=49i,stringu1="SZAAAA",stringu2="VHGAAA",string4="VVVVxx" 368064000000000000 +tenk unique1=8717i,unique2=4260i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=717i,twothousand=717i,fivethous=3717i,tenthous=8717i,odd=34i,even=35i,stringu1="HXAAAA",stringu2="WHGAAA",string4="AAAAxx" 368150400000000000 +tenk unique1=5639i,unique2=4261i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=639i,twothousand=1639i,fivethous=639i,tenthous=5639i,odd=78i,even=79i,stringu1="XIAAAA",stringu2="XHGAAA",string4="HHHHxx" 368236800000000000 +tenk unique1=3448i,unique2=4262i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=448i,twothousand=1448i,fivethous=3448i,tenthous=3448i,odd=96i,even=97i,stringu1="QCAAAA",stringu2="YHGAAA",string4="OOOOxx" 368323200000000000 +tenk unique1=2919i,unique2=4263i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=919i,twothousand=919i,fivethous=2919i,tenthous=2919i,odd=38i,even=39i,stringu1="HIAAAA",stringu2="ZHGAAA",string4="VVVVxx" 368409600000000000 +tenk unique1=3417i,unique2=4264i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=417i,twothousand=1417i,fivethous=3417i,tenthous=3417i,odd=34i,even=35i,stringu1="LBAAAA",stringu2="AIGAAA",string4="AAAAxx" 368496000000000000 +tenk unique1=943i,unique2=4265i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=943i,twothousand=943i,fivethous=943i,tenthous=943i,odd=86i,even=87i,stringu1="HKAAAA",stringu2="BIGAAA",string4="HHHHxx" 368582400000000000 +tenk unique1=775i,unique2=4266i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=775i,twothousand=775i,fivethous=775i,tenthous=775i,odd=150i,even=151i,stringu1="VDAAAA",stringu2="CIGAAA",string4="OOOOxx" 368668800000000000 +tenk unique1=2333i,unique2=4267i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=333i,twothousand=333i,fivethous=2333i,tenthous=2333i,odd=66i,even=67i,stringu1="TLAAAA",stringu2="DIGAAA",string4="VVVVxx" 368755200000000000 +tenk unique1=4801i,unique2=4268i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=801i,twothousand=801i,fivethous=4801i,tenthous=4801i,odd=2i,even=3i,stringu1="RCAAAA",stringu2="EIGAAA",string4="AAAAxx" 368841600000000000 +tenk unique1=7169i,unique2=4269i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=169i,twothousand=1169i,fivethous=2169i,tenthous=7169i,odd=138i,even=139i,stringu1="TPAAAA",stringu2="FIGAAA",string4="HHHHxx" 368928000000000000 +tenk unique1=2840i,unique2=4270i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=840i,twothousand=840i,fivethous=2840i,tenthous=2840i,odd=80i,even=81i,stringu1="GFAAAA",stringu2="GIGAAA",string4="OOOOxx" 369014400000000000 +tenk unique1=9034i,unique2=4271i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=34i,twothousand=1034i,fivethous=4034i,tenthous=9034i,odd=68i,even=69i,stringu1="MJAAAA",stringu2="HIGAAA",string4="VVVVxx" 369100800000000000 +tenk unique1=6154i,unique2=4272i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=154i,twothousand=154i,fivethous=1154i,tenthous=6154i,odd=108i,even=109i,stringu1="SCAAAA",stringu2="IIGAAA",string4="AAAAxx" 369187200000000000 +tenk unique1=1412i,unique2=4273i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=412i,twothousand=1412i,fivethous=1412i,tenthous=1412i,odd=24i,even=25i,stringu1="ICAAAA",stringu2="JIGAAA",string4="HHHHxx" 369273600000000000 +tenk unique1=2263i,unique2=4274i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=263i,twothousand=263i,fivethous=2263i,tenthous=2263i,odd=126i,even=127i,stringu1="BJAAAA",stringu2="KIGAAA",string4="OOOOxx" 369360000000000000 +tenk unique1=7118i,unique2=4275i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=118i,twothousand=1118i,fivethous=2118i,tenthous=7118i,odd=36i,even=37i,stringu1="UNAAAA",stringu2="LIGAAA",string4="VVVVxx" 369446400000000000 +tenk unique1=1526i,unique2=4276i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=526i,twothousand=1526i,fivethous=1526i,tenthous=1526i,odd=52i,even=53i,stringu1="SGAAAA",stringu2="MIGAAA",string4="AAAAxx" 369532800000000000 +tenk unique1=491i,unique2=4277i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=491i,twothousand=491i,fivethous=491i,tenthous=491i,odd=182i,even=183i,stringu1="XSAAAA",stringu2="NIGAAA",string4="HHHHxx" 369619200000000000 +tenk unique1=9732i,unique2=4278i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=732i,twothousand=1732i,fivethous=4732i,tenthous=9732i,odd=64i,even=65i,stringu1="IKAAAA",stringu2="OIGAAA",string4="OOOOxx" 369705600000000000 +tenk unique1=7067i,unique2=4279i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=67i,twothousand=1067i,fivethous=2067i,tenthous=7067i,odd=134i,even=135i,stringu1="VLAAAA",stringu2="PIGAAA",string4="VVVVxx" 369792000000000000 +tenk unique1=212i,unique2=4280i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=212i,twothousand=212i,fivethous=212i,tenthous=212i,odd=24i,even=25i,stringu1="EIAAAA",stringu2="QIGAAA",string4="AAAAxx" 369878400000000000 +tenk unique1=1955i,unique2=4281i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=955i,twothousand=1955i,fivethous=1955i,tenthous=1955i,odd=110i,even=111i,stringu1="FXAAAA",stringu2="RIGAAA",string4="HHHHxx" 369964800000000000 +tenk unique1=3303i,unique2=4282i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=303i,twothousand=1303i,fivethous=3303i,tenthous=3303i,odd=6i,even=7i,stringu1="BXAAAA",stringu2="SIGAAA",string4="OOOOxx" 370051200000000000 +tenk unique1=2715i,unique2=4283i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=715i,twothousand=715i,fivethous=2715i,tenthous=2715i,odd=30i,even=31i,stringu1="LAAAAA",stringu2="TIGAAA",string4="VVVVxx" 370137600000000000 +tenk unique1=8168i,unique2=4284i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=168i,twothousand=168i,fivethous=3168i,tenthous=8168i,odd=136i,even=137i,stringu1="ECAAAA",stringu2="UIGAAA",string4="AAAAxx" 370224000000000000 +tenk unique1=6799i,unique2=4285i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=799i,twothousand=799i,fivethous=1799i,tenthous=6799i,odd=198i,even=199i,stringu1="NBAAAA",stringu2="VIGAAA",string4="HHHHxx" 370310400000000000 +tenk unique1=5080i,unique2=4286i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=80i,twothousand=1080i,fivethous=80i,tenthous=5080i,odd=160i,even=161i,stringu1="KNAAAA",stringu2="WIGAAA",string4="OOOOxx" 370396800000000000 +tenk unique1=4939i,unique2=4287i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=939i,twothousand=939i,fivethous=4939i,tenthous=4939i,odd=78i,even=79i,stringu1="ZHAAAA",stringu2="XIGAAA",string4="VVVVxx" 370483200000000000 +tenk unique1=6604i,unique2=4288i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=604i,twothousand=604i,fivethous=1604i,tenthous=6604i,odd=8i,even=9i,stringu1="AUAAAA",stringu2="YIGAAA",string4="AAAAxx" 370569600000000000 +tenk unique1=6531i,unique2=4289i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=531i,twothousand=531i,fivethous=1531i,tenthous=6531i,odd=62i,even=63i,stringu1="FRAAAA",stringu2="ZIGAAA",string4="HHHHxx" 370656000000000000 +tenk unique1=9948i,unique2=4290i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=948i,twothousand=1948i,fivethous=4948i,tenthous=9948i,odd=96i,even=97i,stringu1="QSAAAA",stringu2="AJGAAA",string4="OOOOxx" 370742400000000000 +tenk unique1=7923i,unique2=4291i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=923i,twothousand=1923i,fivethous=2923i,tenthous=7923i,odd=46i,even=47i,stringu1="TSAAAA",stringu2="BJGAAA",string4="VVVVxx" 370828800000000000 +tenk unique1=9905i,unique2=4292i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=905i,twothousand=1905i,fivethous=4905i,tenthous=9905i,odd=10i,even=11i,stringu1="ZQAAAA",stringu2="CJGAAA",string4="AAAAxx" 370915200000000000 +tenk unique1=340i,unique2=4293i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=340i,twothousand=340i,fivethous=340i,tenthous=340i,odd=80i,even=81i,stringu1="CNAAAA",stringu2="DJGAAA",string4="HHHHxx" 371001600000000000 +tenk unique1=1721i,unique2=4294i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=721i,twothousand=1721i,fivethous=1721i,tenthous=1721i,odd=42i,even=43i,stringu1="FOAAAA",stringu2="EJGAAA",string4="OOOOxx" 371088000000000000 +tenk unique1=9047i,unique2=4295i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=47i,twothousand=1047i,fivethous=4047i,tenthous=9047i,odd=94i,even=95i,stringu1="ZJAAAA",stringu2="FJGAAA",string4="VVVVxx" 371174400000000000 +tenk unique1=4723i,unique2=4296i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=723i,twothousand=723i,fivethous=4723i,tenthous=4723i,odd=46i,even=47i,stringu1="RZAAAA",stringu2="GJGAAA",string4="AAAAxx" 371260800000000000 +tenk unique1=5748i,unique2=4297i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=748i,twothousand=1748i,fivethous=748i,tenthous=5748i,odd=96i,even=97i,stringu1="CNAAAA",stringu2="HJGAAA",string4="HHHHxx" 371347200000000000 +tenk unique1=6845i,unique2=4298i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=845i,twothousand=845i,fivethous=1845i,tenthous=6845i,odd=90i,even=91i,stringu1="HDAAAA",stringu2="IJGAAA",string4="OOOOxx" 371433600000000000 +tenk unique1=1556i,unique2=4299i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=556i,twothousand=1556i,fivethous=1556i,tenthous=1556i,odd=112i,even=113i,stringu1="WHAAAA",stringu2="JJGAAA",string4="VVVVxx" 371520000000000000 +tenk unique1=9505i,unique2=4300i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=505i,twothousand=1505i,fivethous=4505i,tenthous=9505i,odd=10i,even=11i,stringu1="PBAAAA",stringu2="KJGAAA",string4="AAAAxx" 371606400000000000 +tenk unique1=3573i,unique2=4301i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=573i,twothousand=1573i,fivethous=3573i,tenthous=3573i,odd=146i,even=147i,stringu1="LHAAAA",stringu2="LJGAAA",string4="HHHHxx" 371692800000000000 +tenk unique1=3785i,unique2=4302i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=785i,twothousand=1785i,fivethous=3785i,tenthous=3785i,odd=170i,even=171i,stringu1="PPAAAA",stringu2="MJGAAA",string4="OOOOxx" 371779200000000000 +tenk unique1=2772i,unique2=4303i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=772i,twothousand=772i,fivethous=2772i,tenthous=2772i,odd=144i,even=145i,stringu1="QCAAAA",stringu2="NJGAAA",string4="VVVVxx" 371865600000000000 +tenk unique1=7282i,unique2=4304i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=282i,twothousand=1282i,fivethous=2282i,tenthous=7282i,odd=164i,even=165i,stringu1="CUAAAA",stringu2="OJGAAA",string4="AAAAxx" 371952000000000000 +tenk unique1=8106i,unique2=4305i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=106i,twothousand=106i,fivethous=3106i,tenthous=8106i,odd=12i,even=13i,stringu1="UZAAAA",stringu2="PJGAAA",string4="HHHHxx" 372038400000000000 +tenk unique1=2847i,unique2=4306i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=847i,twothousand=847i,fivethous=2847i,tenthous=2847i,odd=94i,even=95i,stringu1="NFAAAA",stringu2="QJGAAA",string4="OOOOxx" 372124800000000000 +tenk unique1=9803i,unique2=4307i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=803i,twothousand=1803i,fivethous=4803i,tenthous=9803i,odd=6i,even=7i,stringu1="BNAAAA",stringu2="RJGAAA",string4="VVVVxx" 372211200000000000 +tenk unique1=7719i,unique2=4308i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=719i,twothousand=1719i,fivethous=2719i,tenthous=7719i,odd=38i,even=39i,stringu1="XKAAAA",stringu2="SJGAAA",string4="AAAAxx" 372297600000000000 +tenk unique1=4649i,unique2=4309i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=649i,twothousand=649i,fivethous=4649i,tenthous=4649i,odd=98i,even=99i,stringu1="VWAAAA",stringu2="TJGAAA",string4="HHHHxx" 372384000000000000 +tenk unique1=6196i,unique2=4310i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=196i,twothousand=196i,fivethous=1196i,tenthous=6196i,odd=192i,even=193i,stringu1="IEAAAA",stringu2="UJGAAA",string4="OOOOxx" 372470400000000000 +tenk unique1=6026i,unique2=4311i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=26i,twothousand=26i,fivethous=1026i,tenthous=6026i,odd=52i,even=53i,stringu1="UXAAAA",stringu2="VJGAAA",string4="VVVVxx" 372556800000000000 +tenk unique1=1646i,unique2=4312i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=646i,twothousand=1646i,fivethous=1646i,tenthous=1646i,odd=92i,even=93i,stringu1="ILAAAA",stringu2="WJGAAA",string4="AAAAxx" 372643200000000000 +tenk unique1=6526i,unique2=4313i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=526i,twothousand=526i,fivethous=1526i,tenthous=6526i,odd=52i,even=53i,stringu1="ARAAAA",stringu2="XJGAAA",string4="HHHHxx" 372729600000000000 +tenk unique1=5110i,unique2=4314i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=110i,twothousand=1110i,fivethous=110i,tenthous=5110i,odd=20i,even=21i,stringu1="OOAAAA",stringu2="YJGAAA",string4="OOOOxx" 372816000000000000 +tenk unique1=3946i,unique2=4315i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=946i,twothousand=1946i,fivethous=3946i,tenthous=3946i,odd=92i,even=93i,stringu1="UVAAAA",stringu2="ZJGAAA",string4="VVVVxx" 372902400000000000 +tenk unique1=445i,unique2=4316i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=445i,twothousand=445i,fivethous=445i,tenthous=445i,odd=90i,even=91i,stringu1="DRAAAA",stringu2="AKGAAA",string4="AAAAxx" 372988800000000000 +tenk unique1=3249i,unique2=4317i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=249i,twothousand=1249i,fivethous=3249i,tenthous=3249i,odd=98i,even=99i,stringu1="ZUAAAA",stringu2="BKGAAA",string4="HHHHxx" 373075200000000000 +tenk unique1=2501i,unique2=4318i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=501i,twothousand=501i,fivethous=2501i,tenthous=2501i,odd=2i,even=3i,stringu1="FSAAAA",stringu2="CKGAAA",string4="OOOOxx" 373161600000000000 +tenk unique1=3243i,unique2=4319i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=243i,twothousand=1243i,fivethous=3243i,tenthous=3243i,odd=86i,even=87i,stringu1="TUAAAA",stringu2="DKGAAA",string4="VVVVxx" 373248000000000000 +tenk unique1=4701i,unique2=4320i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=701i,twothousand=701i,fivethous=4701i,tenthous=4701i,odd=2i,even=3i,stringu1="VYAAAA",stringu2="EKGAAA",string4="AAAAxx" 373334400000000000 +tenk unique1=472i,unique2=4321i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=472i,twothousand=472i,fivethous=472i,tenthous=472i,odd=144i,even=145i,stringu1="ESAAAA",stringu2="FKGAAA",string4="HHHHxx" 373420800000000000 +tenk unique1=3356i,unique2=4322i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=356i,twothousand=1356i,fivethous=3356i,tenthous=3356i,odd=112i,even=113i,stringu1="CZAAAA",stringu2="GKGAAA",string4="OOOOxx" 373507200000000000 +tenk unique1=9967i,unique2=4323i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=967i,twothousand=1967i,fivethous=4967i,tenthous=9967i,odd=134i,even=135i,stringu1="JTAAAA",stringu2="HKGAAA",string4="VVVVxx" 373593600000000000 +tenk unique1=4292i,unique2=4324i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=292i,twothousand=292i,fivethous=4292i,tenthous=4292i,odd=184i,even=185i,stringu1="CJAAAA",stringu2="IKGAAA",string4="AAAAxx" 373680000000000000 +tenk unique1=7005i,unique2=4325i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=1005i,fivethous=2005i,tenthous=7005i,odd=10i,even=11i,stringu1="LJAAAA",stringu2="JKGAAA",string4="HHHHxx" 373766400000000000 +tenk unique1=6267i,unique2=4326i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=267i,twothousand=267i,fivethous=1267i,tenthous=6267i,odd=134i,even=135i,stringu1="BHAAAA",stringu2="KKGAAA",string4="OOOOxx" 373852800000000000 +tenk unique1=6678i,unique2=4327i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=678i,twothousand=678i,fivethous=1678i,tenthous=6678i,odd=156i,even=157i,stringu1="WWAAAA",stringu2="LKGAAA",string4="VVVVxx" 373939200000000000 +tenk unique1=6083i,unique2=4328i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=83i,twothousand=83i,fivethous=1083i,tenthous=6083i,odd=166i,even=167i,stringu1="ZZAAAA",stringu2="MKGAAA",string4="AAAAxx" 374025600000000000 +tenk unique1=760i,unique2=4329i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=760i,twothousand=760i,fivethous=760i,tenthous=760i,odd=120i,even=121i,stringu1="GDAAAA",stringu2="NKGAAA",string4="HHHHxx" 374112000000000000 +tenk unique1=7833i,unique2=4330i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=833i,twothousand=1833i,fivethous=2833i,tenthous=7833i,odd=66i,even=67i,stringu1="HPAAAA",stringu2="OKGAAA",string4="OOOOxx" 374198400000000000 +tenk unique1=2877i,unique2=4331i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=877i,twothousand=877i,fivethous=2877i,tenthous=2877i,odd=154i,even=155i,stringu1="RGAAAA",stringu2="PKGAAA",string4="VVVVxx" 374284800000000000 +tenk unique1=8810i,unique2=4332i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=810i,twothousand=810i,fivethous=3810i,tenthous=8810i,odd=20i,even=21i,stringu1="WAAAAA",stringu2="QKGAAA",string4="AAAAxx" 374371200000000000 +tenk unique1=1560i,unique2=4333i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=560i,twothousand=1560i,fivethous=1560i,tenthous=1560i,odd=120i,even=121i,stringu1="AIAAAA",stringu2="RKGAAA",string4="HHHHxx" 374457600000000000 +tenk unique1=1367i,unique2=4334i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=367i,twothousand=1367i,fivethous=1367i,tenthous=1367i,odd=134i,even=135i,stringu1="PAAAAA",stringu2="SKGAAA",string4="OOOOxx" 374544000000000000 +tenk unique1=8756i,unique2=4335i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=756i,twothousand=756i,fivethous=3756i,tenthous=8756i,odd=112i,even=113i,stringu1="UYAAAA",stringu2="TKGAAA",string4="VVVVxx" 374630400000000000 +tenk unique1=1346i,unique2=4336i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=346i,twothousand=1346i,fivethous=1346i,tenthous=1346i,odd=92i,even=93i,stringu1="UZAAAA",stringu2="UKGAAA",string4="AAAAxx" 374716800000000000 +tenk unique1=6449i,unique2=4337i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=449i,twothousand=449i,fivethous=1449i,tenthous=6449i,odd=98i,even=99i,stringu1="BOAAAA",stringu2="VKGAAA",string4="HHHHxx" 374803200000000000 +tenk unique1=6658i,unique2=4338i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=658i,twothousand=658i,fivethous=1658i,tenthous=6658i,odd=116i,even=117i,stringu1="CWAAAA",stringu2="WKGAAA",string4="OOOOxx" 374889600000000000 +tenk unique1=6745i,unique2=4339i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=745i,twothousand=745i,fivethous=1745i,tenthous=6745i,odd=90i,even=91i,stringu1="LZAAAA",stringu2="XKGAAA",string4="VVVVxx" 374976000000000000 +tenk unique1=4866i,unique2=4340i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=866i,twothousand=866i,fivethous=4866i,tenthous=4866i,odd=132i,even=133i,stringu1="EFAAAA",stringu2="YKGAAA",string4="AAAAxx" 375062400000000000 +tenk unique1=14i,unique2=4341i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=14i,twothousand=14i,fivethous=14i,tenthous=14i,odd=28i,even=29i,stringu1="OAAAAA",stringu2="ZKGAAA",string4="HHHHxx" 375148800000000000 +tenk unique1=4506i,unique2=4342i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=506i,twothousand=506i,fivethous=4506i,tenthous=4506i,odd=12i,even=13i,stringu1="IRAAAA",stringu2="ALGAAA",string4="OOOOxx" 375235200000000000 +tenk unique1=1923i,unique2=4343i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=923i,twothousand=1923i,fivethous=1923i,tenthous=1923i,odd=46i,even=47i,stringu1="ZVAAAA",stringu2="BLGAAA",string4="VVVVxx" 375321600000000000 +tenk unique1=8365i,unique2=4344i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=365i,twothousand=365i,fivethous=3365i,tenthous=8365i,odd=130i,even=131i,stringu1="TJAAAA",stringu2="CLGAAA",string4="AAAAxx" 375408000000000000 +tenk unique1=1279i,unique2=4345i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=279i,twothousand=1279i,fivethous=1279i,tenthous=1279i,odd=158i,even=159i,stringu1="FXAAAA",stringu2="DLGAAA",string4="HHHHxx" 375494400000000000 +tenk unique1=7666i,unique2=4346i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=666i,twothousand=1666i,fivethous=2666i,tenthous=7666i,odd=132i,even=133i,stringu1="WIAAAA",stringu2="ELGAAA",string4="OOOOxx" 375580800000000000 +tenk unique1=7404i,unique2=4347i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=404i,twothousand=1404i,fivethous=2404i,tenthous=7404i,odd=8i,even=9i,stringu1="UYAAAA",stringu2="FLGAAA",string4="VVVVxx" 375667200000000000 +tenk unique1=65i,unique2=4348i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=65i,twothousand=65i,fivethous=65i,tenthous=65i,odd=130i,even=131i,stringu1="NCAAAA",stringu2="GLGAAA",string4="AAAAxx" 375753600000000000 +tenk unique1=5820i,unique2=4349i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=820i,twothousand=1820i,fivethous=820i,tenthous=5820i,odd=40i,even=41i,stringu1="WPAAAA",stringu2="HLGAAA",string4="HHHHxx" 375840000000000000 +tenk unique1=459i,unique2=4350i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=459i,twothousand=459i,fivethous=459i,tenthous=459i,odd=118i,even=119i,stringu1="RRAAAA",stringu2="ILGAAA",string4="OOOOxx" 375926400000000000 +tenk unique1=4787i,unique2=4351i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=787i,twothousand=787i,fivethous=4787i,tenthous=4787i,odd=174i,even=175i,stringu1="DCAAAA",stringu2="JLGAAA",string4="VVVVxx" 376012800000000000 +tenk unique1=5631i,unique2=4352i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=631i,twothousand=1631i,fivethous=631i,tenthous=5631i,odd=62i,even=63i,stringu1="PIAAAA",stringu2="KLGAAA",string4="AAAAxx" 376099200000000000 +tenk unique1=9717i,unique2=4353i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=717i,twothousand=1717i,fivethous=4717i,tenthous=9717i,odd=34i,even=35i,stringu1="TJAAAA",stringu2="LLGAAA",string4="HHHHxx" 376185600000000000 +tenk unique1=2560i,unique2=4354i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=560i,twothousand=560i,fivethous=2560i,tenthous=2560i,odd=120i,even=121i,stringu1="MUAAAA",stringu2="MLGAAA",string4="OOOOxx" 376272000000000000 +tenk unique1=8295i,unique2=4355i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=295i,twothousand=295i,fivethous=3295i,tenthous=8295i,odd=190i,even=191i,stringu1="BHAAAA",stringu2="NLGAAA",string4="VVVVxx" 376358400000000000 +tenk unique1=3596i,unique2=4356i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=596i,twothousand=1596i,fivethous=3596i,tenthous=3596i,odd=192i,even=193i,stringu1="IIAAAA",stringu2="OLGAAA",string4="AAAAxx" 376444800000000000 +tenk unique1=2023i,unique2=4357i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=23i,twothousand=23i,fivethous=2023i,tenthous=2023i,odd=46i,even=47i,stringu1="VZAAAA",stringu2="PLGAAA",string4="HHHHxx" 376531200000000000 +tenk unique1=5055i,unique2=4358i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=55i,twothousand=1055i,fivethous=55i,tenthous=5055i,odd=110i,even=111i,stringu1="LMAAAA",stringu2="QLGAAA",string4="OOOOxx" 376617600000000000 +tenk unique1=763i,unique2=4359i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=763i,twothousand=763i,fivethous=763i,tenthous=763i,odd=126i,even=127i,stringu1="JDAAAA",stringu2="RLGAAA",string4="VVVVxx" 376704000000000000 +tenk unique1=6733i,unique2=4360i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=733i,twothousand=733i,fivethous=1733i,tenthous=6733i,odd=66i,even=67i,stringu1="ZYAAAA",stringu2="SLGAAA",string4="AAAAxx" 376790400000000000 +tenk unique1=9266i,unique2=4361i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=266i,twothousand=1266i,fivethous=4266i,tenthous=9266i,odd=132i,even=133i,stringu1="KSAAAA",stringu2="TLGAAA",string4="HHHHxx" 376876800000000000 +tenk unique1=4479i,unique2=4362i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=479i,twothousand=479i,fivethous=4479i,tenthous=4479i,odd=158i,even=159i,stringu1="HQAAAA",stringu2="ULGAAA",string4="OOOOxx" 376963200000000000 +tenk unique1=1816i,unique2=4363i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=816i,twothousand=1816i,fivethous=1816i,tenthous=1816i,odd=32i,even=33i,stringu1="WRAAAA",stringu2="VLGAAA",string4="VVVVxx" 377049600000000000 +tenk unique1=899i,unique2=4364i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=899i,twothousand=899i,fivethous=899i,tenthous=899i,odd=198i,even=199i,stringu1="PIAAAA",stringu2="WLGAAA",string4="AAAAxx" 377136000000000000 +tenk unique1=230i,unique2=4365i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=230i,twothousand=230i,fivethous=230i,tenthous=230i,odd=60i,even=61i,stringu1="WIAAAA",stringu2="XLGAAA",string4="HHHHxx" 377222400000000000 +tenk unique1=5362i,unique2=4366i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=362i,twothousand=1362i,fivethous=362i,tenthous=5362i,odd=124i,even=125i,stringu1="GYAAAA",stringu2="YLGAAA",string4="OOOOxx" 377308800000000000 +tenk unique1=1609i,unique2=4367i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=609i,twothousand=1609i,fivethous=1609i,tenthous=1609i,odd=18i,even=19i,stringu1="XJAAAA",stringu2="ZLGAAA",string4="VVVVxx" 377395200000000000 +tenk unique1=6750i,unique2=4368i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=750i,twothousand=750i,fivethous=1750i,tenthous=6750i,odd=100i,even=101i,stringu1="QZAAAA",stringu2="AMGAAA",string4="AAAAxx" 377481600000000000 +tenk unique1=9704i,unique2=4369i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=704i,twothousand=1704i,fivethous=4704i,tenthous=9704i,odd=8i,even=9i,stringu1="GJAAAA",stringu2="BMGAAA",string4="HHHHxx" 377568000000000000 +tenk unique1=3991i,unique2=4370i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=991i,twothousand=1991i,fivethous=3991i,tenthous=3991i,odd=182i,even=183i,stringu1="NXAAAA",stringu2="CMGAAA",string4="OOOOxx" 377654400000000000 +tenk unique1=3959i,unique2=4371i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=959i,twothousand=1959i,fivethous=3959i,tenthous=3959i,odd=118i,even=119i,stringu1="HWAAAA",stringu2="DMGAAA",string4="VVVVxx" 377740800000000000 +tenk unique1=9021i,unique2=4372i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=21i,twothousand=1021i,fivethous=4021i,tenthous=9021i,odd=42i,even=43i,stringu1="ZIAAAA",stringu2="EMGAAA",string4="AAAAxx" 377827200000000000 +tenk unique1=7585i,unique2=4373i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=585i,twothousand=1585i,fivethous=2585i,tenthous=7585i,odd=170i,even=171i,stringu1="TFAAAA",stringu2="FMGAAA",string4="HHHHxx" 377913600000000000 +tenk unique1=7083i,unique2=4374i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=83i,twothousand=1083i,fivethous=2083i,tenthous=7083i,odd=166i,even=167i,stringu1="LMAAAA",stringu2="GMGAAA",string4="OOOOxx" 378000000000000000 +tenk unique1=7688i,unique2=4375i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=688i,twothousand=1688i,fivethous=2688i,tenthous=7688i,odd=176i,even=177i,stringu1="SJAAAA",stringu2="HMGAAA",string4="VVVVxx" 378086400000000000 +tenk unique1=2673i,unique2=4376i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=673i,twothousand=673i,fivethous=2673i,tenthous=2673i,odd=146i,even=147i,stringu1="VYAAAA",stringu2="IMGAAA",string4="AAAAxx" 378172800000000000 +tenk unique1=3554i,unique2=4377i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=554i,twothousand=1554i,fivethous=3554i,tenthous=3554i,odd=108i,even=109i,stringu1="SGAAAA",stringu2="JMGAAA",string4="HHHHxx" 378259200000000000 +tenk unique1=7416i,unique2=4378i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=416i,twothousand=1416i,fivethous=2416i,tenthous=7416i,odd=32i,even=33i,stringu1="GZAAAA",stringu2="KMGAAA",string4="OOOOxx" 378345600000000000 +tenk unique1=5672i,unique2=4379i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=672i,twothousand=1672i,fivethous=672i,tenthous=5672i,odd=144i,even=145i,stringu1="EKAAAA",stringu2="LMGAAA",string4="VVVVxx" 378432000000000000 +tenk unique1=1355i,unique2=4380i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=355i,twothousand=1355i,fivethous=1355i,tenthous=1355i,odd=110i,even=111i,stringu1="DAAAAA",stringu2="MMGAAA",string4="AAAAxx" 378518400000000000 +tenk unique1=3149i,unique2=4381i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=149i,twothousand=1149i,fivethous=3149i,tenthous=3149i,odd=98i,even=99i,stringu1="DRAAAA",stringu2="NMGAAA",string4="HHHHxx" 378604800000000000 +tenk unique1=5811i,unique2=4382i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=811i,twothousand=1811i,fivethous=811i,tenthous=5811i,odd=22i,even=23i,stringu1="NPAAAA",stringu2="OMGAAA",string4="OOOOxx" 378691200000000000 +tenk unique1=3759i,unique2=4383i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=759i,twothousand=1759i,fivethous=3759i,tenthous=3759i,odd=118i,even=119i,stringu1="POAAAA",stringu2="PMGAAA",string4="VVVVxx" 378777600000000000 +tenk unique1=5634i,unique2=4384i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=634i,twothousand=1634i,fivethous=634i,tenthous=5634i,odd=68i,even=69i,stringu1="SIAAAA",stringu2="QMGAAA",string4="AAAAxx" 378864000000000000 +tenk unique1=8617i,unique2=4385i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=617i,twothousand=617i,fivethous=3617i,tenthous=8617i,odd=34i,even=35i,stringu1="LTAAAA",stringu2="RMGAAA",string4="HHHHxx" 378950400000000000 +tenk unique1=8949i,unique2=4386i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=949i,twothousand=949i,fivethous=3949i,tenthous=8949i,odd=98i,even=99i,stringu1="FGAAAA",stringu2="SMGAAA",string4="OOOOxx" 379036800000000000 +tenk unique1=3964i,unique2=4387i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=964i,twothousand=1964i,fivethous=3964i,tenthous=3964i,odd=128i,even=129i,stringu1="MWAAAA",stringu2="TMGAAA",string4="VVVVxx" 379123200000000000 +tenk unique1=3852i,unique2=4388i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=852i,twothousand=1852i,fivethous=3852i,tenthous=3852i,odd=104i,even=105i,stringu1="ESAAAA",stringu2="UMGAAA",string4="AAAAxx" 379209600000000000 +tenk unique1=1555i,unique2=4389i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=555i,twothousand=1555i,fivethous=1555i,tenthous=1555i,odd=110i,even=111i,stringu1="VHAAAA",stringu2="VMGAAA",string4="HHHHxx" 379296000000000000 +tenk unique1=6536i,unique2=4390i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=536i,twothousand=536i,fivethous=1536i,tenthous=6536i,odd=72i,even=73i,stringu1="KRAAAA",stringu2="WMGAAA",string4="OOOOxx" 379382400000000000 +tenk unique1=4779i,unique2=4391i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=779i,twothousand=779i,fivethous=4779i,tenthous=4779i,odd=158i,even=159i,stringu1="VBAAAA",stringu2="XMGAAA",string4="VVVVxx" 379468800000000000 +tenk unique1=1893i,unique2=4392i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=893i,twothousand=1893i,fivethous=1893i,tenthous=1893i,odd=186i,even=187i,stringu1="VUAAAA",stringu2="YMGAAA",string4="AAAAxx" 379555200000000000 +tenk unique1=9358i,unique2=4393i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=358i,twothousand=1358i,fivethous=4358i,tenthous=9358i,odd=116i,even=117i,stringu1="YVAAAA",stringu2="ZMGAAA",string4="HHHHxx" 379641600000000000 +tenk unique1=7438i,unique2=4394i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=438i,twothousand=1438i,fivethous=2438i,tenthous=7438i,odd=76i,even=77i,stringu1="CAAAAA",stringu2="ANGAAA",string4="OOOOxx" 379728000000000000 +tenk unique1=941i,unique2=4395i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=941i,twothousand=941i,fivethous=941i,tenthous=941i,odd=82i,even=83i,stringu1="FKAAAA",stringu2="BNGAAA",string4="VVVVxx" 379814400000000000 +tenk unique1=4844i,unique2=4396i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=844i,twothousand=844i,fivethous=4844i,tenthous=4844i,odd=88i,even=89i,stringu1="IEAAAA",stringu2="CNGAAA",string4="AAAAxx" 379900800000000000 +tenk unique1=4745i,unique2=4397i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=745i,twothousand=745i,fivethous=4745i,tenthous=4745i,odd=90i,even=91i,stringu1="NAAAAA",stringu2="DNGAAA",string4="HHHHxx" 379987200000000000 +tenk unique1=1017i,unique2=4398i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=17i,twothousand=1017i,fivethous=1017i,tenthous=1017i,odd=34i,even=35i,stringu1="DNAAAA",stringu2="ENGAAA",string4="OOOOxx" 380073600000000000 +tenk unique1=327i,unique2=4399i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=327i,twothousand=327i,fivethous=327i,tenthous=327i,odd=54i,even=55i,stringu1="PMAAAA",stringu2="FNGAAA",string4="VVVVxx" 380160000000000000 +tenk unique1=3152i,unique2=4400i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=152i,twothousand=1152i,fivethous=3152i,tenthous=3152i,odd=104i,even=105i,stringu1="GRAAAA",stringu2="GNGAAA",string4="AAAAxx" 380246400000000000 +tenk unique1=4711i,unique2=4401i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=711i,twothousand=711i,fivethous=4711i,tenthous=4711i,odd=22i,even=23i,stringu1="FZAAAA",stringu2="HNGAAA",string4="HHHHxx" 380332800000000000 +tenk unique1=141i,unique2=4402i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=141i,twothousand=141i,fivethous=141i,tenthous=141i,odd=82i,even=83i,stringu1="LFAAAA",stringu2="INGAAA",string4="OOOOxx" 380419200000000000 +tenk unique1=1303i,unique2=4403i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=303i,twothousand=1303i,fivethous=1303i,tenthous=1303i,odd=6i,even=7i,stringu1="DYAAAA",stringu2="JNGAAA",string4="VVVVxx" 380505600000000000 +tenk unique1=8873i,unique2=4404i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=873i,twothousand=873i,fivethous=3873i,tenthous=8873i,odd=146i,even=147i,stringu1="HDAAAA",stringu2="KNGAAA",string4="AAAAxx" 380592000000000000 +tenk unique1=8481i,unique2=4405i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=481i,twothousand=481i,fivethous=3481i,tenthous=8481i,odd=162i,even=163i,stringu1="FOAAAA",stringu2="LNGAAA",string4="HHHHxx" 380678400000000000 +tenk unique1=5445i,unique2=4406i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=445i,twothousand=1445i,fivethous=445i,tenthous=5445i,odd=90i,even=91i,stringu1="LBAAAA",stringu2="MNGAAA",string4="OOOOxx" 380764800000000000 +tenk unique1=7868i,unique2=4407i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=868i,twothousand=1868i,fivethous=2868i,tenthous=7868i,odd=136i,even=137i,stringu1="QQAAAA",stringu2="NNGAAA",string4="VVVVxx" 380851200000000000 +tenk unique1=6722i,unique2=4408i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=722i,twothousand=722i,fivethous=1722i,tenthous=6722i,odd=44i,even=45i,stringu1="OYAAAA",stringu2="ONGAAA",string4="AAAAxx" 380937600000000000 +tenk unique1=6628i,unique2=4409i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=628i,twothousand=628i,fivethous=1628i,tenthous=6628i,odd=56i,even=57i,stringu1="YUAAAA",stringu2="PNGAAA",string4="HHHHxx" 381024000000000000 +tenk unique1=7738i,unique2=4410i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=738i,twothousand=1738i,fivethous=2738i,tenthous=7738i,odd=76i,even=77i,stringu1="QLAAAA",stringu2="QNGAAA",string4="OOOOxx" 381110400000000000 +tenk unique1=1018i,unique2=4411i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=18i,twothousand=1018i,fivethous=1018i,tenthous=1018i,odd=36i,even=37i,stringu1="ENAAAA",stringu2="RNGAAA",string4="VVVVxx" 381196800000000000 +tenk unique1=3296i,unique2=4412i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=296i,twothousand=1296i,fivethous=3296i,tenthous=3296i,odd=192i,even=193i,stringu1="UWAAAA",stringu2="SNGAAA",string4="AAAAxx" 381283200000000000 +tenk unique1=1946i,unique2=4413i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=946i,twothousand=1946i,fivethous=1946i,tenthous=1946i,odd=92i,even=93i,stringu1="WWAAAA",stringu2="TNGAAA",string4="HHHHxx" 381369600000000000 +tenk unique1=6603i,unique2=4414i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=603i,twothousand=603i,fivethous=1603i,tenthous=6603i,odd=6i,even=7i,stringu1="ZTAAAA",stringu2="UNGAAA",string4="OOOOxx" 381456000000000000 +tenk unique1=3562i,unique2=4415i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=562i,twothousand=1562i,fivethous=3562i,tenthous=3562i,odd=124i,even=125i,stringu1="AHAAAA",stringu2="VNGAAA",string4="VVVVxx" 381542400000000000 +tenk unique1=1147i,unique2=4416i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=147i,twothousand=1147i,fivethous=1147i,tenthous=1147i,odd=94i,even=95i,stringu1="DSAAAA",stringu2="WNGAAA",string4="AAAAxx" 381628800000000000 +tenk unique1=6031i,unique2=4417i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=31i,twothousand=31i,fivethous=1031i,tenthous=6031i,odd=62i,even=63i,stringu1="ZXAAAA",stringu2="XNGAAA",string4="HHHHxx" 381715200000000000 +tenk unique1=6484i,unique2=4418i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=484i,twothousand=484i,fivethous=1484i,tenthous=6484i,odd=168i,even=169i,stringu1="KPAAAA",stringu2="YNGAAA",string4="OOOOxx" 381801600000000000 +tenk unique1=496i,unique2=4419i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=496i,twothousand=496i,fivethous=496i,tenthous=496i,odd=192i,even=193i,stringu1="CTAAAA",stringu2="ZNGAAA",string4="VVVVxx" 381888000000000000 +tenk unique1=4563i,unique2=4420i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=563i,twothousand=563i,fivethous=4563i,tenthous=4563i,odd=126i,even=127i,stringu1="NTAAAA",stringu2="AOGAAA",string4="AAAAxx" 381974400000000000 +tenk unique1=1037i,unique2=4421i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=37i,twothousand=1037i,fivethous=1037i,tenthous=1037i,odd=74i,even=75i,stringu1="XNAAAA",stringu2="BOGAAA",string4="HHHHxx" 382060800000000000 +tenk unique1=9672i,unique2=4422i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=672i,twothousand=1672i,fivethous=4672i,tenthous=9672i,odd=144i,even=145i,stringu1="AIAAAA",stringu2="COGAAA",string4="OOOOxx" 382147200000000000 +tenk unique1=9053i,unique2=4423i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=53i,twothousand=1053i,fivethous=4053i,tenthous=9053i,odd=106i,even=107i,stringu1="FKAAAA",stringu2="DOGAAA",string4="VVVVxx" 382233600000000000 +tenk unique1=2523i,unique2=4424i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=523i,twothousand=523i,fivethous=2523i,tenthous=2523i,odd=46i,even=47i,stringu1="BTAAAA",stringu2="EOGAAA",string4="AAAAxx" 382320000000000000 +tenk unique1=8519i,unique2=4425i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=519i,twothousand=519i,fivethous=3519i,tenthous=8519i,odd=38i,even=39i,stringu1="RPAAAA",stringu2="FOGAAA",string4="HHHHxx" 382406400000000000 +tenk unique1=8190i,unique2=4426i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=190i,twothousand=190i,fivethous=3190i,tenthous=8190i,odd=180i,even=181i,stringu1="ADAAAA",stringu2="GOGAAA",string4="OOOOxx" 382492800000000000 +tenk unique1=2068i,unique2=4427i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=68i,twothousand=68i,fivethous=2068i,tenthous=2068i,odd=136i,even=137i,stringu1="OBAAAA",stringu2="HOGAAA",string4="VVVVxx" 382579200000000000 +tenk unique1=8569i,unique2=4428i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=569i,twothousand=569i,fivethous=3569i,tenthous=8569i,odd=138i,even=139i,stringu1="PRAAAA",stringu2="IOGAAA",string4="AAAAxx" 382665600000000000 +tenk unique1=6535i,unique2=4429i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=535i,twothousand=535i,fivethous=1535i,tenthous=6535i,odd=70i,even=71i,stringu1="JRAAAA",stringu2="JOGAAA",string4="HHHHxx" 382752000000000000 +tenk unique1=1810i,unique2=4430i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=810i,twothousand=1810i,fivethous=1810i,tenthous=1810i,odd=20i,even=21i,stringu1="QRAAAA",stringu2="KOGAAA",string4="OOOOxx" 382838400000000000 +tenk unique1=3099i,unique2=4431i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=99i,twothousand=1099i,fivethous=3099i,tenthous=3099i,odd=198i,even=199i,stringu1="FPAAAA",stringu2="LOGAAA",string4="VVVVxx" 382924800000000000 +tenk unique1=7466i,unique2=4432i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=466i,twothousand=1466i,fivethous=2466i,tenthous=7466i,odd=132i,even=133i,stringu1="EBAAAA",stringu2="MOGAAA",string4="AAAAxx" 383011200000000000 +tenk unique1=4017i,unique2=4433i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=17i,twothousand=17i,fivethous=4017i,tenthous=4017i,odd=34i,even=35i,stringu1="NYAAAA",stringu2="NOGAAA",string4="HHHHxx" 383097600000000000 +tenk unique1=1097i,unique2=4434i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=97i,twothousand=1097i,fivethous=1097i,tenthous=1097i,odd=194i,even=195i,stringu1="FQAAAA",stringu2="OOGAAA",string4="OOOOxx" 383184000000000000 +tenk unique1=7686i,unique2=4435i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=686i,twothousand=1686i,fivethous=2686i,tenthous=7686i,odd=172i,even=173i,stringu1="QJAAAA",stringu2="POGAAA",string4="VVVVxx" 383270400000000000 +tenk unique1=6742i,unique2=4436i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=742i,twothousand=742i,fivethous=1742i,tenthous=6742i,odd=84i,even=85i,stringu1="IZAAAA",stringu2="QOGAAA",string4="AAAAxx" 383356800000000000 +tenk unique1=5966i,unique2=4437i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=966i,twothousand=1966i,fivethous=966i,tenthous=5966i,odd=132i,even=133i,stringu1="MVAAAA",stringu2="ROGAAA",string4="HHHHxx" 383443200000000000 +tenk unique1=3632i,unique2=4438i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=632i,twothousand=1632i,fivethous=3632i,tenthous=3632i,odd=64i,even=65i,stringu1="SJAAAA",stringu2="SOGAAA",string4="OOOOxx" 383529600000000000 +tenk unique1=8837i,unique2=4439i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=837i,twothousand=837i,fivethous=3837i,tenthous=8837i,odd=74i,even=75i,stringu1="XBAAAA",stringu2="TOGAAA",string4="VVVVxx" 383616000000000000 +tenk unique1=1667i,unique2=4440i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=667i,twothousand=1667i,fivethous=1667i,tenthous=1667i,odd=134i,even=135i,stringu1="DMAAAA",stringu2="UOGAAA",string4="AAAAxx" 383702400000000000 +tenk unique1=8833i,unique2=4441i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=833i,twothousand=833i,fivethous=3833i,tenthous=8833i,odd=66i,even=67i,stringu1="TBAAAA",stringu2="VOGAAA",string4="HHHHxx" 383788800000000000 +tenk unique1=9805i,unique2=4442i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=805i,twothousand=1805i,fivethous=4805i,tenthous=9805i,odd=10i,even=11i,stringu1="DNAAAA",stringu2="WOGAAA",string4="OOOOxx" 383875200000000000 +tenk unique1=3650i,unique2=4443i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=650i,twothousand=1650i,fivethous=3650i,tenthous=3650i,odd=100i,even=101i,stringu1="KKAAAA",stringu2="XOGAAA",string4="VVVVxx" 383961600000000000 +tenk unique1=2237i,unique2=4444i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=237i,twothousand=237i,fivethous=2237i,tenthous=2237i,odd=74i,even=75i,stringu1="BIAAAA",stringu2="YOGAAA",string4="AAAAxx" 384048000000000000 +tenk unique1=9980i,unique2=4445i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=980i,twothousand=1980i,fivethous=4980i,tenthous=9980i,odd=160i,even=161i,stringu1="WTAAAA",stringu2="ZOGAAA",string4="HHHHxx" 384134400000000000 +tenk unique1=2861i,unique2=4446i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=861i,twothousand=861i,fivethous=2861i,tenthous=2861i,odd=122i,even=123i,stringu1="BGAAAA",stringu2="APGAAA",string4="OOOOxx" 384220800000000000 +tenk unique1=1334i,unique2=4447i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=334i,twothousand=1334i,fivethous=1334i,tenthous=1334i,odd=68i,even=69i,stringu1="IZAAAA",stringu2="BPGAAA",string4="VVVVxx" 384307200000000000 +tenk unique1=842i,unique2=4448i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=842i,twothousand=842i,fivethous=842i,tenthous=842i,odd=84i,even=85i,stringu1="KGAAAA",stringu2="CPGAAA",string4="AAAAxx" 384393600000000000 +tenk unique1=1116i,unique2=4449i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=116i,twothousand=1116i,fivethous=1116i,tenthous=1116i,odd=32i,even=33i,stringu1="YQAAAA",stringu2="DPGAAA",string4="HHHHxx" 384480000000000000 +tenk unique1=4055i,unique2=4450i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=55i,twothousand=55i,fivethous=4055i,tenthous=4055i,odd=110i,even=111i,stringu1="ZZAAAA",stringu2="EPGAAA",string4="OOOOxx" 384566400000000000 +tenk unique1=3842i,unique2=4451i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=842i,twothousand=1842i,fivethous=3842i,tenthous=3842i,odd=84i,even=85i,stringu1="URAAAA",stringu2="FPGAAA",string4="VVVVxx" 384652800000000000 +tenk unique1=1886i,unique2=4452i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=886i,twothousand=1886i,fivethous=1886i,tenthous=1886i,odd=172i,even=173i,stringu1="OUAAAA",stringu2="GPGAAA",string4="AAAAxx" 384739200000000000 +tenk unique1=8589i,unique2=4453i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=589i,twothousand=589i,fivethous=3589i,tenthous=8589i,odd=178i,even=179i,stringu1="JSAAAA",stringu2="HPGAAA",string4="HHHHxx" 384825600000000000 +tenk unique1=5873i,unique2=4454i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=873i,twothousand=1873i,fivethous=873i,tenthous=5873i,odd=146i,even=147i,stringu1="XRAAAA",stringu2="IPGAAA",string4="OOOOxx" 384912000000000000 +tenk unique1=7711i,unique2=4455i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=711i,twothousand=1711i,fivethous=2711i,tenthous=7711i,odd=22i,even=23i,stringu1="PKAAAA",stringu2="JPGAAA",string4="VVVVxx" 384998400000000000 +tenk unique1=911i,unique2=4456i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=911i,twothousand=911i,fivethous=911i,tenthous=911i,odd=22i,even=23i,stringu1="BJAAAA",stringu2="KPGAAA",string4="AAAAxx" 385084800000000000 +tenk unique1=5837i,unique2=4457i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=837i,twothousand=1837i,fivethous=837i,tenthous=5837i,odd=74i,even=75i,stringu1="NQAAAA",stringu2="LPGAAA",string4="HHHHxx" 385171200000000000 +tenk unique1=897i,unique2=4458i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=897i,twothousand=897i,fivethous=897i,tenthous=897i,odd=194i,even=195i,stringu1="NIAAAA",stringu2="MPGAAA",string4="OOOOxx" 385257600000000000 +tenk unique1=4299i,unique2=4459i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=299i,twothousand=299i,fivethous=4299i,tenthous=4299i,odd=198i,even=199i,stringu1="JJAAAA",stringu2="NPGAAA",string4="VVVVxx" 385344000000000000 +tenk unique1=7774i,unique2=4460i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=774i,twothousand=1774i,fivethous=2774i,tenthous=7774i,odd=148i,even=149i,stringu1="ANAAAA",stringu2="OPGAAA",string4="AAAAxx" 385430400000000000 +tenk unique1=7832i,unique2=4461i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=832i,twothousand=1832i,fivethous=2832i,tenthous=7832i,odd=64i,even=65i,stringu1="GPAAAA",stringu2="PPGAAA",string4="HHHHxx" 385516800000000000 +tenk unique1=9915i,unique2=4462i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=915i,twothousand=1915i,fivethous=4915i,tenthous=9915i,odd=30i,even=31i,stringu1="JRAAAA",stringu2="QPGAAA",string4="OOOOxx" 385603200000000000 +tenk unique1=9i,unique2=4463i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=9i,fivethous=9i,tenthous=9i,odd=18i,even=19i,stringu1="JAAAAA",stringu2="RPGAAA",string4="VVVVxx" 385689600000000000 +tenk unique1=9675i,unique2=4464i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=675i,twothousand=1675i,fivethous=4675i,tenthous=9675i,odd=150i,even=151i,stringu1="DIAAAA",stringu2="SPGAAA",string4="AAAAxx" 385776000000000000 +tenk unique1=7953i,unique2=4465i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=953i,twothousand=1953i,fivethous=2953i,tenthous=7953i,odd=106i,even=107i,stringu1="XTAAAA",stringu2="TPGAAA",string4="HHHHxx" 385862400000000000 +tenk unique1=8912i,unique2=4466i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=912i,twothousand=912i,fivethous=3912i,tenthous=8912i,odd=24i,even=25i,stringu1="UEAAAA",stringu2="UPGAAA",string4="OOOOxx" 385948800000000000 +tenk unique1=4188i,unique2=4467i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=188i,twothousand=188i,fivethous=4188i,tenthous=4188i,odd=176i,even=177i,stringu1="CFAAAA",stringu2="VPGAAA",string4="VVVVxx" 386035200000000000 +tenk unique1=8446i,unique2=4468i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=446i,twothousand=446i,fivethous=3446i,tenthous=8446i,odd=92i,even=93i,stringu1="WMAAAA",stringu2="WPGAAA",string4="AAAAxx" 386121600000000000 +tenk unique1=1600i,unique2=4469i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=600i,twothousand=1600i,fivethous=1600i,tenthous=1600i,odd=0i,even=1i,stringu1="OJAAAA",stringu2="XPGAAA",string4="HHHHxx" 386208000000000000 +tenk unique1=43i,unique2=4470i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=43i,twothousand=43i,fivethous=43i,tenthous=43i,odd=86i,even=87i,stringu1="RBAAAA",stringu2="YPGAAA",string4="OOOOxx" 386294400000000000 +tenk unique1=544i,unique2=4471i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=544i,twothousand=544i,fivethous=544i,tenthous=544i,odd=88i,even=89i,stringu1="YUAAAA",stringu2="ZPGAAA",string4="VVVVxx" 386380800000000000 +tenk unique1=6977i,unique2=4472i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=977i,twothousand=977i,fivethous=1977i,tenthous=6977i,odd=154i,even=155i,stringu1="JIAAAA",stringu2="AQGAAA",string4="AAAAxx" 386467200000000000 +tenk unique1=3191i,unique2=4473i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=191i,twothousand=1191i,fivethous=3191i,tenthous=3191i,odd=182i,even=183i,stringu1="TSAAAA",stringu2="BQGAAA",string4="HHHHxx" 386553600000000000 +tenk unique1=418i,unique2=4474i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=418i,twothousand=418i,fivethous=418i,tenthous=418i,odd=36i,even=37i,stringu1="CQAAAA",stringu2="CQGAAA",string4="OOOOxx" 386640000000000000 +tenk unique1=3142i,unique2=4475i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=142i,twothousand=1142i,fivethous=3142i,tenthous=3142i,odd=84i,even=85i,stringu1="WQAAAA",stringu2="DQGAAA",string4="VVVVxx" 386726400000000000 +tenk unique1=5042i,unique2=4476i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=42i,twothousand=1042i,fivethous=42i,tenthous=5042i,odd=84i,even=85i,stringu1="YLAAAA",stringu2="EQGAAA",string4="AAAAxx" 386812800000000000 +tenk unique1=2194i,unique2=4477i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=194i,twothousand=194i,fivethous=2194i,tenthous=2194i,odd=188i,even=189i,stringu1="KGAAAA",stringu2="FQGAAA",string4="HHHHxx" 386899200000000000 +tenk unique1=2397i,unique2=4478i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=397i,twothousand=397i,fivethous=2397i,tenthous=2397i,odd=194i,even=195i,stringu1="FOAAAA",stringu2="GQGAAA",string4="OOOOxx" 386985600000000000 +tenk unique1=4684i,unique2=4479i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=684i,twothousand=684i,fivethous=4684i,tenthous=4684i,odd=168i,even=169i,stringu1="EYAAAA",stringu2="HQGAAA",string4="VVVVxx" 387072000000000000 +tenk unique1=34i,unique2=4480i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=34i,twothousand=34i,fivethous=34i,tenthous=34i,odd=68i,even=69i,stringu1="IBAAAA",stringu2="IQGAAA",string4="AAAAxx" 387158400000000000 +tenk unique1=3844i,unique2=4481i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=844i,twothousand=1844i,fivethous=3844i,tenthous=3844i,odd=88i,even=89i,stringu1="WRAAAA",stringu2="JQGAAA",string4="HHHHxx" 387244800000000000 +tenk unique1=7824i,unique2=4482i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=824i,twothousand=1824i,fivethous=2824i,tenthous=7824i,odd=48i,even=49i,stringu1="YOAAAA",stringu2="KQGAAA",string4="OOOOxx" 387331200000000000 +tenk unique1=6177i,unique2=4483i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=177i,twothousand=177i,fivethous=1177i,tenthous=6177i,odd=154i,even=155i,stringu1="PDAAAA",stringu2="LQGAAA",string4="VVVVxx" 387417600000000000 +tenk unique1=9657i,unique2=4484i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=657i,twothousand=1657i,fivethous=4657i,tenthous=9657i,odd=114i,even=115i,stringu1="LHAAAA",stringu2="MQGAAA",string4="AAAAxx" 387504000000000000 +tenk unique1=4546i,unique2=4485i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=546i,twothousand=546i,fivethous=4546i,tenthous=4546i,odd=92i,even=93i,stringu1="WSAAAA",stringu2="NQGAAA",string4="HHHHxx" 387590400000000000 +tenk unique1=599i,unique2=4486i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=599i,twothousand=599i,fivethous=599i,tenthous=599i,odd=198i,even=199i,stringu1="BXAAAA",stringu2="OQGAAA",string4="OOOOxx" 387676800000000000 +tenk unique1=153i,unique2=4487i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=153i,twothousand=153i,fivethous=153i,tenthous=153i,odd=106i,even=107i,stringu1="XFAAAA",stringu2="PQGAAA",string4="VVVVxx" 387763200000000000 +tenk unique1=6910i,unique2=4488i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=910i,twothousand=910i,fivethous=1910i,tenthous=6910i,odd=20i,even=21i,stringu1="UFAAAA",stringu2="QQGAAA",string4="AAAAxx" 387849600000000000 +tenk unique1=4408i,unique2=4489i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=408i,twothousand=408i,fivethous=4408i,tenthous=4408i,odd=16i,even=17i,stringu1="ONAAAA",stringu2="RQGAAA",string4="HHHHxx" 387936000000000000 +tenk unique1=1164i,unique2=4490i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=164i,twothousand=1164i,fivethous=1164i,tenthous=1164i,odd=128i,even=129i,stringu1="USAAAA",stringu2="SQGAAA",string4="OOOOxx" 388022400000000000 +tenk unique1=6469i,unique2=4491i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=469i,twothousand=469i,fivethous=1469i,tenthous=6469i,odd=138i,even=139i,stringu1="VOAAAA",stringu2="TQGAAA",string4="VVVVxx" 388108800000000000 +tenk unique1=5996i,unique2=4492i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=996i,twothousand=1996i,fivethous=996i,tenthous=5996i,odd=192i,even=193i,stringu1="QWAAAA",stringu2="UQGAAA",string4="AAAAxx" 388195200000000000 +tenk unique1=2639i,unique2=4493i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=639i,twothousand=639i,fivethous=2639i,tenthous=2639i,odd=78i,even=79i,stringu1="NXAAAA",stringu2="VQGAAA",string4="HHHHxx" 388281600000000000 +tenk unique1=2678i,unique2=4494i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=678i,twothousand=678i,fivethous=2678i,tenthous=2678i,odd=156i,even=157i,stringu1="AZAAAA",stringu2="WQGAAA",string4="OOOOxx" 388368000000000000 +tenk unique1=8392i,unique2=4495i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=392i,twothousand=392i,fivethous=3392i,tenthous=8392i,odd=184i,even=185i,stringu1="UKAAAA",stringu2="XQGAAA",string4="VVVVxx" 388454400000000000 +tenk unique1=1386i,unique2=4496i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=386i,twothousand=1386i,fivethous=1386i,tenthous=1386i,odd=172i,even=173i,stringu1="IBAAAA",stringu2="YQGAAA",string4="AAAAxx" 388540800000000000 +tenk unique1=5125i,unique2=4497i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=125i,twothousand=1125i,fivethous=125i,tenthous=5125i,odd=50i,even=51i,stringu1="DPAAAA",stringu2="ZQGAAA",string4="HHHHxx" 388627200000000000 +tenk unique1=8453i,unique2=4498i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=453i,twothousand=453i,fivethous=3453i,tenthous=8453i,odd=106i,even=107i,stringu1="DNAAAA",stringu2="ARGAAA",string4="OOOOxx" 388713600000000000 +tenk unique1=2369i,unique2=4499i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=369i,twothousand=369i,fivethous=2369i,tenthous=2369i,odd=138i,even=139i,stringu1="DNAAAA",stringu2="BRGAAA",string4="VVVVxx" 388800000000000000 +tenk unique1=1608i,unique2=4500i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=608i,twothousand=1608i,fivethous=1608i,tenthous=1608i,odd=16i,even=17i,stringu1="WJAAAA",stringu2="CRGAAA",string4="AAAAxx" 388886400000000000 +tenk unique1=3781i,unique2=4501i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=781i,twothousand=1781i,fivethous=3781i,tenthous=3781i,odd=162i,even=163i,stringu1="LPAAAA",stringu2="DRGAAA",string4="HHHHxx" 388972800000000000 +tenk unique1=903i,unique2=4502i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=903i,twothousand=903i,fivethous=903i,tenthous=903i,odd=6i,even=7i,stringu1="TIAAAA",stringu2="ERGAAA",string4="OOOOxx" 389059200000000000 +tenk unique1=2099i,unique2=4503i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=99i,twothousand=99i,fivethous=2099i,tenthous=2099i,odd=198i,even=199i,stringu1="TCAAAA",stringu2="FRGAAA",string4="VVVVxx" 389145600000000000 +tenk unique1=538i,unique2=4504i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=538i,twothousand=538i,fivethous=538i,tenthous=538i,odd=76i,even=77i,stringu1="SUAAAA",stringu2="GRGAAA",string4="AAAAxx" 389232000000000000 +tenk unique1=9177i,unique2=4505i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=177i,twothousand=1177i,fivethous=4177i,tenthous=9177i,odd=154i,even=155i,stringu1="ZOAAAA",stringu2="HRGAAA",string4="HHHHxx" 389318400000000000 +tenk unique1=420i,unique2=4506i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=420i,twothousand=420i,fivethous=420i,tenthous=420i,odd=40i,even=41i,stringu1="EQAAAA",stringu2="IRGAAA",string4="OOOOxx" 389404800000000000 +tenk unique1=9080i,unique2=4507i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=80i,twothousand=1080i,fivethous=4080i,tenthous=9080i,odd=160i,even=161i,stringu1="GLAAAA",stringu2="JRGAAA",string4="VVVVxx" 389491200000000000 +tenk unique1=2630i,unique2=4508i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=630i,twothousand=630i,fivethous=2630i,tenthous=2630i,odd=60i,even=61i,stringu1="EXAAAA",stringu2="KRGAAA",string4="AAAAxx" 389577600000000000 +tenk unique1=5978i,unique2=4509i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=978i,twothousand=1978i,fivethous=978i,tenthous=5978i,odd=156i,even=157i,stringu1="YVAAAA",stringu2="LRGAAA",string4="HHHHxx" 389664000000000000 +tenk unique1=9239i,unique2=4510i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=239i,twothousand=1239i,fivethous=4239i,tenthous=9239i,odd=78i,even=79i,stringu1="JRAAAA",stringu2="MRGAAA",string4="OOOOxx" 389750400000000000 +tenk unique1=4372i,unique2=4511i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=372i,twothousand=372i,fivethous=4372i,tenthous=4372i,odd=144i,even=145i,stringu1="EMAAAA",stringu2="NRGAAA",string4="VVVVxx" 389836800000000000 +tenk unique1=4357i,unique2=4512i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=357i,twothousand=357i,fivethous=4357i,tenthous=4357i,odd=114i,even=115i,stringu1="PLAAAA",stringu2="ORGAAA",string4="AAAAxx" 389923200000000000 +tenk unique1=9857i,unique2=4513i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=857i,twothousand=1857i,fivethous=4857i,tenthous=9857i,odd=114i,even=115i,stringu1="DPAAAA",stringu2="PRGAAA",string4="HHHHxx" 390009600000000000 +tenk unique1=7933i,unique2=4514i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=933i,twothousand=1933i,fivethous=2933i,tenthous=7933i,odd=66i,even=67i,stringu1="DTAAAA",stringu2="QRGAAA",string4="OOOOxx" 390096000000000000 +tenk unique1=9574i,unique2=4515i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=574i,twothousand=1574i,fivethous=4574i,tenthous=9574i,odd=148i,even=149i,stringu1="GEAAAA",stringu2="RRGAAA",string4="VVVVxx" 390182400000000000 +tenk unique1=8294i,unique2=4516i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=294i,twothousand=294i,fivethous=3294i,tenthous=8294i,odd=188i,even=189i,stringu1="AHAAAA",stringu2="SRGAAA",string4="AAAAxx" 390268800000000000 +tenk unique1=627i,unique2=4517i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=627i,twothousand=627i,fivethous=627i,tenthous=627i,odd=54i,even=55i,stringu1="DYAAAA",stringu2="TRGAAA",string4="HHHHxx" 390355200000000000 +tenk unique1=3229i,unique2=4518i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=229i,twothousand=1229i,fivethous=3229i,tenthous=3229i,odd=58i,even=59i,stringu1="FUAAAA",stringu2="URGAAA",string4="OOOOxx" 390441600000000000 +tenk unique1=3163i,unique2=4519i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=163i,twothousand=1163i,fivethous=3163i,tenthous=3163i,odd=126i,even=127i,stringu1="RRAAAA",stringu2="VRGAAA",string4="VVVVxx" 390528000000000000 +tenk unique1=7349i,unique2=4520i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=349i,twothousand=1349i,fivethous=2349i,tenthous=7349i,odd=98i,even=99i,stringu1="RWAAAA",stringu2="WRGAAA",string4="AAAAxx" 390614400000000000 +tenk unique1=6889i,unique2=4521i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=889i,twothousand=889i,fivethous=1889i,tenthous=6889i,odd=178i,even=179i,stringu1="ZEAAAA",stringu2="XRGAAA",string4="HHHHxx" 390700800000000000 +tenk unique1=2101i,unique2=4522i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=101i,twothousand=101i,fivethous=2101i,tenthous=2101i,odd=2i,even=3i,stringu1="VCAAAA",stringu2="YRGAAA",string4="OOOOxx" 390787200000000000 +tenk unique1=6476i,unique2=4523i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=476i,twothousand=476i,fivethous=1476i,tenthous=6476i,odd=152i,even=153i,stringu1="CPAAAA",stringu2="ZRGAAA",string4="VVVVxx" 390873600000000000 +tenk unique1=6765i,unique2=4524i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=765i,twothousand=765i,fivethous=1765i,tenthous=6765i,odd=130i,even=131i,stringu1="FAAAAA",stringu2="ASGAAA",string4="AAAAxx" 390960000000000000 +tenk unique1=4204i,unique2=4525i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=204i,twothousand=204i,fivethous=4204i,tenthous=4204i,odd=8i,even=9i,stringu1="SFAAAA",stringu2="BSGAAA",string4="HHHHxx" 391046400000000000 +tenk unique1=5915i,unique2=4526i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=915i,twothousand=1915i,fivethous=915i,tenthous=5915i,odd=30i,even=31i,stringu1="NTAAAA",stringu2="CSGAAA",string4="OOOOxx" 391132800000000000 +tenk unique1=2318i,unique2=4527i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=318i,twothousand=318i,fivethous=2318i,tenthous=2318i,odd=36i,even=37i,stringu1="ELAAAA",stringu2="DSGAAA",string4="VVVVxx" 391219200000000000 +tenk unique1=294i,unique2=4528i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=294i,twothousand=294i,fivethous=294i,tenthous=294i,odd=188i,even=189i,stringu1="ILAAAA",stringu2="ESGAAA",string4="AAAAxx" 391305600000000000 +tenk unique1=5245i,unique2=4529i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=245i,twothousand=1245i,fivethous=245i,tenthous=5245i,odd=90i,even=91i,stringu1="TTAAAA",stringu2="FSGAAA",string4="HHHHxx" 391392000000000000 +tenk unique1=4481i,unique2=4530i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=481i,twothousand=481i,fivethous=4481i,tenthous=4481i,odd=162i,even=163i,stringu1="JQAAAA",stringu2="GSGAAA",string4="OOOOxx" 391478400000000000 +tenk unique1=7754i,unique2=4531i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=754i,twothousand=1754i,fivethous=2754i,tenthous=7754i,odd=108i,even=109i,stringu1="GMAAAA",stringu2="HSGAAA",string4="VVVVxx" 391564800000000000 +tenk unique1=8494i,unique2=4532i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=494i,twothousand=494i,fivethous=3494i,tenthous=8494i,odd=188i,even=189i,stringu1="SOAAAA",stringu2="ISGAAA",string4="AAAAxx" 391651200000000000 +tenk unique1=4014i,unique2=4533i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=14i,twothousand=14i,fivethous=4014i,tenthous=4014i,odd=28i,even=29i,stringu1="KYAAAA",stringu2="JSGAAA",string4="HHHHxx" 391737600000000000 +tenk unique1=2197i,unique2=4534i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=197i,twothousand=197i,fivethous=2197i,tenthous=2197i,odd=194i,even=195i,stringu1="NGAAAA",stringu2="KSGAAA",string4="OOOOxx" 391824000000000000 +tenk unique1=1297i,unique2=4535i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=297i,twothousand=1297i,fivethous=1297i,tenthous=1297i,odd=194i,even=195i,stringu1="XXAAAA",stringu2="LSGAAA",string4="VVVVxx" 391910400000000000 +tenk unique1=1066i,unique2=4536i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=66i,twothousand=1066i,fivethous=1066i,tenthous=1066i,odd=132i,even=133i,stringu1="APAAAA",stringu2="MSGAAA",string4="AAAAxx" 391996800000000000 +tenk unique1=5710i,unique2=4537i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=710i,twothousand=1710i,fivethous=710i,tenthous=5710i,odd=20i,even=21i,stringu1="QLAAAA",stringu2="NSGAAA",string4="HHHHxx" 392083200000000000 +tenk unique1=4100i,unique2=4538i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=100i,twothousand=100i,fivethous=4100i,tenthous=4100i,odd=0i,even=1i,stringu1="SBAAAA",stringu2="OSGAAA",string4="OOOOxx" 392169600000000000 +tenk unique1=7356i,unique2=4539i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=356i,twothousand=1356i,fivethous=2356i,tenthous=7356i,odd=112i,even=113i,stringu1="YWAAAA",stringu2="PSGAAA",string4="VVVVxx" 392256000000000000 +tenk unique1=7658i,unique2=4540i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=658i,twothousand=1658i,fivethous=2658i,tenthous=7658i,odd=116i,even=117i,stringu1="OIAAAA",stringu2="QSGAAA",string4="AAAAxx" 392342400000000000 +tenk unique1=3666i,unique2=4541i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=666i,twothousand=1666i,fivethous=3666i,tenthous=3666i,odd=132i,even=133i,stringu1="ALAAAA",stringu2="RSGAAA",string4="HHHHxx" 392428800000000000 +tenk unique1=9713i,unique2=4542i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=713i,twothousand=1713i,fivethous=4713i,tenthous=9713i,odd=26i,even=27i,stringu1="PJAAAA",stringu2="SSGAAA",string4="OOOOxx" 392515200000000000 +tenk unique1=691i,unique2=4543i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=691i,twothousand=691i,fivethous=691i,tenthous=691i,odd=182i,even=183i,stringu1="PAAAAA",stringu2="TSGAAA",string4="VVVVxx" 392601600000000000 +tenk unique1=3112i,unique2=4544i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=112i,twothousand=1112i,fivethous=3112i,tenthous=3112i,odd=24i,even=25i,stringu1="SPAAAA",stringu2="USGAAA",string4="AAAAxx" 392688000000000000 +tenk unique1=6035i,unique2=4545i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=35i,twothousand=35i,fivethous=1035i,tenthous=6035i,odd=70i,even=71i,stringu1="DYAAAA",stringu2="VSGAAA",string4="HHHHxx" 392774400000000000 +tenk unique1=8353i,unique2=4546i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=353i,twothousand=353i,fivethous=3353i,tenthous=8353i,odd=106i,even=107i,stringu1="HJAAAA",stringu2="WSGAAA",string4="OOOOxx" 392860800000000000 +tenk unique1=5679i,unique2=4547i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=679i,twothousand=1679i,fivethous=679i,tenthous=5679i,odd=158i,even=159i,stringu1="LKAAAA",stringu2="XSGAAA",string4="VVVVxx" 392947200000000000 +tenk unique1=2124i,unique2=4548i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=124i,twothousand=124i,fivethous=2124i,tenthous=2124i,odd=48i,even=49i,stringu1="SDAAAA",stringu2="YSGAAA",string4="AAAAxx" 393033600000000000 +tenk unique1=4714i,unique2=4549i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=714i,twothousand=714i,fivethous=4714i,tenthous=4714i,odd=28i,even=29i,stringu1="IZAAAA",stringu2="ZSGAAA",string4="HHHHxx" 393120000000000000 +tenk unique1=9048i,unique2=4550i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=48i,twothousand=1048i,fivethous=4048i,tenthous=9048i,odd=96i,even=97i,stringu1="AKAAAA",stringu2="ATGAAA",string4="OOOOxx" 393206400000000000 +tenk unique1=7692i,unique2=4551i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=692i,twothousand=1692i,fivethous=2692i,tenthous=7692i,odd=184i,even=185i,stringu1="WJAAAA",stringu2="BTGAAA",string4="VVVVxx" 393292800000000000 +tenk unique1=4542i,unique2=4552i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=542i,twothousand=542i,fivethous=4542i,tenthous=4542i,odd=84i,even=85i,stringu1="SSAAAA",stringu2="CTGAAA",string4="AAAAxx" 393379200000000000 +tenk unique1=8737i,unique2=4553i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=737i,twothousand=737i,fivethous=3737i,tenthous=8737i,odd=74i,even=75i,stringu1="BYAAAA",stringu2="DTGAAA",string4="HHHHxx" 393465600000000000 +tenk unique1=4977i,unique2=4554i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=977i,twothousand=977i,fivethous=4977i,tenthous=4977i,odd=154i,even=155i,stringu1="LJAAAA",stringu2="ETGAAA",string4="OOOOxx" 393552000000000000 +tenk unique1=9349i,unique2=4555i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=349i,twothousand=1349i,fivethous=4349i,tenthous=9349i,odd=98i,even=99i,stringu1="PVAAAA",stringu2="FTGAAA",string4="VVVVxx" 393638400000000000 +tenk unique1=731i,unique2=4556i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=731i,twothousand=731i,fivethous=731i,tenthous=731i,odd=62i,even=63i,stringu1="DCAAAA",stringu2="GTGAAA",string4="AAAAxx" 393724800000000000 +tenk unique1=1788i,unique2=4557i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=788i,twothousand=1788i,fivethous=1788i,tenthous=1788i,odd=176i,even=177i,stringu1="UQAAAA",stringu2="HTGAAA",string4="HHHHxx" 393811200000000000 +tenk unique1=7830i,unique2=4558i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=830i,twothousand=1830i,fivethous=2830i,tenthous=7830i,odd=60i,even=61i,stringu1="EPAAAA",stringu2="ITGAAA",string4="OOOOxx" 393897600000000000 +tenk unique1=3977i,unique2=4559i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=977i,twothousand=1977i,fivethous=3977i,tenthous=3977i,odd=154i,even=155i,stringu1="ZWAAAA",stringu2="JTGAAA",string4="VVVVxx" 393984000000000000 +tenk unique1=2421i,unique2=4560i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=421i,twothousand=421i,fivethous=2421i,tenthous=2421i,odd=42i,even=43i,stringu1="DPAAAA",stringu2="KTGAAA",string4="AAAAxx" 394070400000000000 +tenk unique1=5891i,unique2=4561i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=891i,twothousand=1891i,fivethous=891i,tenthous=5891i,odd=182i,even=183i,stringu1="PSAAAA",stringu2="LTGAAA",string4="HHHHxx" 394156800000000000 +tenk unique1=1111i,unique2=4562i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=111i,twothousand=1111i,fivethous=1111i,tenthous=1111i,odd=22i,even=23i,stringu1="TQAAAA",stringu2="MTGAAA",string4="OOOOxx" 394243200000000000 +tenk unique1=9224i,unique2=4563i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=224i,twothousand=1224i,fivethous=4224i,tenthous=9224i,odd=48i,even=49i,stringu1="UQAAAA",stringu2="NTGAAA",string4="VVVVxx" 394329600000000000 +tenk unique1=9872i,unique2=4564i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=872i,twothousand=1872i,fivethous=4872i,tenthous=9872i,odd=144i,even=145i,stringu1="SPAAAA",stringu2="OTGAAA",string4="AAAAxx" 394416000000000000 +tenk unique1=2433i,unique2=4565i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=433i,twothousand=433i,fivethous=2433i,tenthous=2433i,odd=66i,even=67i,stringu1="PPAAAA",stringu2="PTGAAA",string4="HHHHxx" 394502400000000000 +tenk unique1=1491i,unique2=4566i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=491i,twothousand=1491i,fivethous=1491i,tenthous=1491i,odd=182i,even=183i,stringu1="JFAAAA",stringu2="QTGAAA",string4="OOOOxx" 394588800000000000 +tenk unique1=6653i,unique2=4567i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=653i,twothousand=653i,fivethous=1653i,tenthous=6653i,odd=106i,even=107i,stringu1="XVAAAA",stringu2="RTGAAA",string4="VVVVxx" 394675200000000000 +tenk unique1=1907i,unique2=4568i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=907i,twothousand=1907i,fivethous=1907i,tenthous=1907i,odd=14i,even=15i,stringu1="JVAAAA",stringu2="STGAAA",string4="AAAAxx" 394761600000000000 +tenk unique1=889i,unique2=4569i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=889i,twothousand=889i,fivethous=889i,tenthous=889i,odd=178i,even=179i,stringu1="FIAAAA",stringu2="TTGAAA",string4="HHHHxx" 394848000000000000 +tenk unique1=561i,unique2=4570i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=561i,twothousand=561i,fivethous=561i,tenthous=561i,odd=122i,even=123i,stringu1="PVAAAA",stringu2="UTGAAA",string4="OOOOxx" 394934400000000000 +tenk unique1=7415i,unique2=4571i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=415i,twothousand=1415i,fivethous=2415i,tenthous=7415i,odd=30i,even=31i,stringu1="FZAAAA",stringu2="VTGAAA",string4="VVVVxx" 395020800000000000 +tenk unique1=2703i,unique2=4572i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=703i,twothousand=703i,fivethous=2703i,tenthous=2703i,odd=6i,even=7i,stringu1="ZZAAAA",stringu2="WTGAAA",string4="AAAAxx" 395107200000000000 +tenk unique1=2561i,unique2=4573i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=561i,twothousand=561i,fivethous=2561i,tenthous=2561i,odd=122i,even=123i,stringu1="NUAAAA",stringu2="XTGAAA",string4="HHHHxx" 395193600000000000 +tenk unique1=1257i,unique2=4574i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=257i,twothousand=1257i,fivethous=1257i,tenthous=1257i,odd=114i,even=115i,stringu1="JWAAAA",stringu2="YTGAAA",string4="OOOOxx" 395280000000000000 +tenk unique1=2390i,unique2=4575i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=390i,twothousand=390i,fivethous=2390i,tenthous=2390i,odd=180i,even=181i,stringu1="YNAAAA",stringu2="ZTGAAA",string4="VVVVxx" 395366400000000000 +tenk unique1=3915i,unique2=4576i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=915i,twothousand=1915i,fivethous=3915i,tenthous=3915i,odd=30i,even=31i,stringu1="PUAAAA",stringu2="AUGAAA",string4="AAAAxx" 395452800000000000 +tenk unique1=8476i,unique2=4577i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=476i,twothousand=476i,fivethous=3476i,tenthous=8476i,odd=152i,even=153i,stringu1="AOAAAA",stringu2="BUGAAA",string4="HHHHxx" 395539200000000000 +tenk unique1=607i,unique2=4578i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=607i,twothousand=607i,fivethous=607i,tenthous=607i,odd=14i,even=15i,stringu1="JXAAAA",stringu2="CUGAAA",string4="OOOOxx" 395625600000000000 +tenk unique1=3891i,unique2=4579i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=891i,twothousand=1891i,fivethous=3891i,tenthous=3891i,odd=182i,even=183i,stringu1="RTAAAA",stringu2="DUGAAA",string4="VVVVxx" 395712000000000000 +tenk unique1=7269i,unique2=4580i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=269i,twothousand=1269i,fivethous=2269i,tenthous=7269i,odd=138i,even=139i,stringu1="PTAAAA",stringu2="EUGAAA",string4="AAAAxx" 395798400000000000 +tenk unique1=9537i,unique2=4581i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=537i,twothousand=1537i,fivethous=4537i,tenthous=9537i,odd=74i,even=75i,stringu1="VCAAAA",stringu2="FUGAAA",string4="HHHHxx" 395884800000000000 +tenk unique1=8518i,unique2=4582i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=518i,twothousand=518i,fivethous=3518i,tenthous=8518i,odd=36i,even=37i,stringu1="QPAAAA",stringu2="GUGAAA",string4="OOOOxx" 395971200000000000 +tenk unique1=5221i,unique2=4583i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=221i,twothousand=1221i,fivethous=221i,tenthous=5221i,odd=42i,even=43i,stringu1="VSAAAA",stringu2="HUGAAA",string4="VVVVxx" 396057600000000000 +tenk unique1=3274i,unique2=4584i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=274i,twothousand=1274i,fivethous=3274i,tenthous=3274i,odd=148i,even=149i,stringu1="YVAAAA",stringu2="IUGAAA",string4="AAAAxx" 396144000000000000 +tenk unique1=6677i,unique2=4585i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=677i,twothousand=677i,fivethous=1677i,tenthous=6677i,odd=154i,even=155i,stringu1="VWAAAA",stringu2="JUGAAA",string4="HHHHxx" 396230400000000000 +tenk unique1=3114i,unique2=4586i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=114i,twothousand=1114i,fivethous=3114i,tenthous=3114i,odd=28i,even=29i,stringu1="UPAAAA",stringu2="KUGAAA",string4="OOOOxx" 396316800000000000 +tenk unique1=1966i,unique2=4587i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=966i,twothousand=1966i,fivethous=1966i,tenthous=1966i,odd=132i,even=133i,stringu1="QXAAAA",stringu2="LUGAAA",string4="VVVVxx" 396403200000000000 +tenk unique1=5941i,unique2=4588i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=941i,twothousand=1941i,fivethous=941i,tenthous=5941i,odd=82i,even=83i,stringu1="NUAAAA",stringu2="MUGAAA",string4="AAAAxx" 396489600000000000 +tenk unique1=9463i,unique2=4589i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=463i,twothousand=1463i,fivethous=4463i,tenthous=9463i,odd=126i,even=127i,stringu1="ZZAAAA",stringu2="NUGAAA",string4="HHHHxx" 396576000000000000 +tenk unique1=8966i,unique2=4590i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=966i,twothousand=966i,fivethous=3966i,tenthous=8966i,odd=132i,even=133i,stringu1="WGAAAA",stringu2="OUGAAA",string4="OOOOxx" 396662400000000000 +tenk unique1=4402i,unique2=4591i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=402i,twothousand=402i,fivethous=4402i,tenthous=4402i,odd=4i,even=5i,stringu1="INAAAA",stringu2="PUGAAA",string4="VVVVxx" 396748800000000000 +tenk unique1=3364i,unique2=4592i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=364i,twothousand=1364i,fivethous=3364i,tenthous=3364i,odd=128i,even=129i,stringu1="KZAAAA",stringu2="QUGAAA",string4="AAAAxx" 396835200000000000 +tenk unique1=3698i,unique2=4593i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=698i,twothousand=1698i,fivethous=3698i,tenthous=3698i,odd=196i,even=197i,stringu1="GMAAAA",stringu2="RUGAAA",string4="HHHHxx" 396921600000000000 +tenk unique1=4651i,unique2=4594i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=651i,twothousand=651i,fivethous=4651i,tenthous=4651i,odd=102i,even=103i,stringu1="XWAAAA",stringu2="SUGAAA",string4="OOOOxx" 397008000000000000 +tenk unique1=2127i,unique2=4595i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=127i,twothousand=127i,fivethous=2127i,tenthous=2127i,odd=54i,even=55i,stringu1="VDAAAA",stringu2="TUGAAA",string4="VVVVxx" 397094400000000000 +tenk unique1=3614i,unique2=4596i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=614i,twothousand=1614i,fivethous=3614i,tenthous=3614i,odd=28i,even=29i,stringu1="AJAAAA",stringu2="UUGAAA",string4="AAAAxx" 397180800000000000 +tenk unique1=5430i,unique2=4597i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=430i,twothousand=1430i,fivethous=430i,tenthous=5430i,odd=60i,even=61i,stringu1="WAAAAA",stringu2="VUGAAA",string4="HHHHxx" 397267200000000000 +tenk unique1=3361i,unique2=4598i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=361i,twothousand=1361i,fivethous=3361i,tenthous=3361i,odd=122i,even=123i,stringu1="HZAAAA",stringu2="WUGAAA",string4="OOOOxx" 397353600000000000 +tenk unique1=4798i,unique2=4599i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=798i,twothousand=798i,fivethous=4798i,tenthous=4798i,odd=196i,even=197i,stringu1="OCAAAA",stringu2="XUGAAA",string4="VVVVxx" 397440000000000000 +tenk unique1=8269i,unique2=4600i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=269i,twothousand=269i,fivethous=3269i,tenthous=8269i,odd=138i,even=139i,stringu1="BGAAAA",stringu2="YUGAAA",string4="AAAAxx" 397526400000000000 +tenk unique1=6458i,unique2=4601i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=458i,twothousand=458i,fivethous=1458i,tenthous=6458i,odd=116i,even=117i,stringu1="KOAAAA",stringu2="ZUGAAA",string4="HHHHxx" 397612800000000000 +tenk unique1=3358i,unique2=4602i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=358i,twothousand=1358i,fivethous=3358i,tenthous=3358i,odd=116i,even=117i,stringu1="EZAAAA",stringu2="AVGAAA",string4="OOOOxx" 397699200000000000 +tenk unique1=5898i,unique2=4603i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=898i,twothousand=1898i,fivethous=898i,tenthous=5898i,odd=196i,even=197i,stringu1="WSAAAA",stringu2="BVGAAA",string4="VVVVxx" 397785600000000000 +tenk unique1=1880i,unique2=4604i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=880i,twothousand=1880i,fivethous=1880i,tenthous=1880i,odd=160i,even=161i,stringu1="IUAAAA",stringu2="CVGAAA",string4="AAAAxx" 397872000000000000 +tenk unique1=782i,unique2=4605i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=782i,twothousand=782i,fivethous=782i,tenthous=782i,odd=164i,even=165i,stringu1="CEAAAA",stringu2="DVGAAA",string4="HHHHxx" 397958400000000000 +tenk unique1=3102i,unique2=4606i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=102i,twothousand=1102i,fivethous=3102i,tenthous=3102i,odd=4i,even=5i,stringu1="IPAAAA",stringu2="EVGAAA",string4="OOOOxx" 398044800000000000 +tenk unique1=6366i,unique2=4607i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=366i,twothousand=366i,fivethous=1366i,tenthous=6366i,odd=132i,even=133i,stringu1="WKAAAA",stringu2="FVGAAA",string4="VVVVxx" 398131200000000000 +tenk unique1=399i,unique2=4608i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=399i,twothousand=399i,fivethous=399i,tenthous=399i,odd=198i,even=199i,stringu1="JPAAAA",stringu2="GVGAAA",string4="AAAAxx" 398217600000000000 +tenk unique1=6773i,unique2=4609i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=773i,twothousand=773i,fivethous=1773i,tenthous=6773i,odd=146i,even=147i,stringu1="NAAAAA",stringu2="HVGAAA",string4="HHHHxx" 398304000000000000 +tenk unique1=7942i,unique2=4610i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=942i,twothousand=1942i,fivethous=2942i,tenthous=7942i,odd=84i,even=85i,stringu1="MTAAAA",stringu2="IVGAAA",string4="OOOOxx" 398390400000000000 +tenk unique1=6274i,unique2=4611i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=274i,twothousand=274i,fivethous=1274i,tenthous=6274i,odd=148i,even=149i,stringu1="IHAAAA",stringu2="JVGAAA",string4="VVVVxx" 398476800000000000 +tenk unique1=7447i,unique2=4612i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=447i,twothousand=1447i,fivethous=2447i,tenthous=7447i,odd=94i,even=95i,stringu1="LAAAAA",stringu2="KVGAAA",string4="AAAAxx" 398563200000000000 +tenk unique1=7648i,unique2=4613i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=648i,twothousand=1648i,fivethous=2648i,tenthous=7648i,odd=96i,even=97i,stringu1="EIAAAA",stringu2="LVGAAA",string4="HHHHxx" 398649600000000000 +tenk unique1=3997i,unique2=4614i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=997i,twothousand=1997i,fivethous=3997i,tenthous=3997i,odd=194i,even=195i,stringu1="TXAAAA",stringu2="MVGAAA",string4="OOOOxx" 398736000000000000 +tenk unique1=1759i,unique2=4615i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=759i,twothousand=1759i,fivethous=1759i,tenthous=1759i,odd=118i,even=119i,stringu1="RPAAAA",stringu2="NVGAAA",string4="VVVVxx" 398822400000000000 +tenk unique1=1785i,unique2=4616i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=785i,twothousand=1785i,fivethous=1785i,tenthous=1785i,odd=170i,even=171i,stringu1="RQAAAA",stringu2="OVGAAA",string4="AAAAxx" 398908800000000000 +tenk unique1=8930i,unique2=4617i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=930i,twothousand=930i,fivethous=3930i,tenthous=8930i,odd=60i,even=61i,stringu1="MFAAAA",stringu2="PVGAAA",string4="HHHHxx" 398995200000000000 +tenk unique1=7595i,unique2=4618i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=595i,twothousand=1595i,fivethous=2595i,tenthous=7595i,odd=190i,even=191i,stringu1="DGAAAA",stringu2="QVGAAA",string4="OOOOxx" 399081600000000000 +tenk unique1=6752i,unique2=4619i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=752i,twothousand=752i,fivethous=1752i,tenthous=6752i,odd=104i,even=105i,stringu1="SZAAAA",stringu2="RVGAAA",string4="VVVVxx" 399168000000000000 +tenk unique1=5635i,unique2=4620i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=635i,twothousand=1635i,fivethous=635i,tenthous=5635i,odd=70i,even=71i,stringu1="TIAAAA",stringu2="SVGAAA",string4="AAAAxx" 399254400000000000 +tenk unique1=1579i,unique2=4621i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=579i,twothousand=1579i,fivethous=1579i,tenthous=1579i,odd=158i,even=159i,stringu1="TIAAAA",stringu2="TVGAAA",string4="HHHHxx" 399340800000000000 +tenk unique1=7743i,unique2=4622i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=743i,twothousand=1743i,fivethous=2743i,tenthous=7743i,odd=86i,even=87i,stringu1="VLAAAA",stringu2="UVGAAA",string4="OOOOxx" 399427200000000000 +tenk unique1=5856i,unique2=4623i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=856i,twothousand=1856i,fivethous=856i,tenthous=5856i,odd=112i,even=113i,stringu1="GRAAAA",stringu2="VVGAAA",string4="VVVVxx" 399513600000000000 +tenk unique1=7273i,unique2=4624i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=273i,twothousand=1273i,fivethous=2273i,tenthous=7273i,odd=146i,even=147i,stringu1="TTAAAA",stringu2="WVGAAA",string4="AAAAxx" 399600000000000000 +tenk unique1=1399i,unique2=4625i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=399i,twothousand=1399i,fivethous=1399i,tenthous=1399i,odd=198i,even=199i,stringu1="VBAAAA",stringu2="XVGAAA",string4="HHHHxx" 399686400000000000 +tenk unique1=3694i,unique2=4626i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=694i,twothousand=1694i,fivethous=3694i,tenthous=3694i,odd=188i,even=189i,stringu1="CMAAAA",stringu2="YVGAAA",string4="OOOOxx" 399772800000000000 +tenk unique1=2782i,unique2=4627i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=782i,twothousand=782i,fivethous=2782i,tenthous=2782i,odd=164i,even=165i,stringu1="ADAAAA",stringu2="ZVGAAA",string4="VVVVxx" 399859200000000000 +tenk unique1=6951i,unique2=4628i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=951i,twothousand=951i,fivethous=1951i,tenthous=6951i,odd=102i,even=103i,stringu1="JHAAAA",stringu2="AWGAAA",string4="AAAAxx" 399945600000000000 +tenk unique1=6053i,unique2=4629i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=53i,twothousand=53i,fivethous=1053i,tenthous=6053i,odd=106i,even=107i,stringu1="VYAAAA",stringu2="BWGAAA",string4="HHHHxx" 400032000000000000 +tenk unique1=1753i,unique2=4630i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=753i,twothousand=1753i,fivethous=1753i,tenthous=1753i,odd=106i,even=107i,stringu1="LPAAAA",stringu2="CWGAAA",string4="OOOOxx" 400118400000000000 +tenk unique1=3985i,unique2=4631i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=985i,twothousand=1985i,fivethous=3985i,tenthous=3985i,odd=170i,even=171i,stringu1="HXAAAA",stringu2="DWGAAA",string4="VVVVxx" 400204800000000000 +tenk unique1=6159i,unique2=4632i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=159i,twothousand=159i,fivethous=1159i,tenthous=6159i,odd=118i,even=119i,stringu1="XCAAAA",stringu2="EWGAAA",string4="AAAAxx" 400291200000000000 +tenk unique1=6250i,unique2=4633i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=250i,twothousand=250i,fivethous=1250i,tenthous=6250i,odd=100i,even=101i,stringu1="KGAAAA",stringu2="FWGAAA",string4="HHHHxx" 400377600000000000 +tenk unique1=6240i,unique2=4634i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=240i,twothousand=240i,fivethous=1240i,tenthous=6240i,odd=80i,even=81i,stringu1="AGAAAA",stringu2="GWGAAA",string4="OOOOxx" 400464000000000000 +tenk unique1=6571i,unique2=4635i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=571i,twothousand=571i,fivethous=1571i,tenthous=6571i,odd=142i,even=143i,stringu1="TSAAAA",stringu2="HWGAAA",string4="VVVVxx" 400550400000000000 +tenk unique1=8624i,unique2=4636i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=624i,twothousand=624i,fivethous=3624i,tenthous=8624i,odd=48i,even=49i,stringu1="STAAAA",stringu2="IWGAAA",string4="AAAAxx" 400636800000000000 +tenk unique1=9718i,unique2=4637i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=718i,twothousand=1718i,fivethous=4718i,tenthous=9718i,odd=36i,even=37i,stringu1="UJAAAA",stringu2="JWGAAA",string4="HHHHxx" 400723200000000000 +tenk unique1=5529i,unique2=4638i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=529i,twothousand=1529i,fivethous=529i,tenthous=5529i,odd=58i,even=59i,stringu1="REAAAA",stringu2="KWGAAA",string4="OOOOxx" 400809600000000000 +tenk unique1=7089i,unique2=4639i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=89i,twothousand=1089i,fivethous=2089i,tenthous=7089i,odd=178i,even=179i,stringu1="RMAAAA",stringu2="LWGAAA",string4="VVVVxx" 400896000000000000 +tenk unique1=5488i,unique2=4640i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=488i,twothousand=1488i,fivethous=488i,tenthous=5488i,odd=176i,even=177i,stringu1="CDAAAA",stringu2="MWGAAA",string4="AAAAxx" 400982400000000000 +tenk unique1=5444i,unique2=4641i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=444i,twothousand=1444i,fivethous=444i,tenthous=5444i,odd=88i,even=89i,stringu1="KBAAAA",stringu2="NWGAAA",string4="HHHHxx" 401068800000000000 +tenk unique1=4899i,unique2=4642i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=899i,twothousand=899i,fivethous=4899i,tenthous=4899i,odd=198i,even=199i,stringu1="LGAAAA",stringu2="OWGAAA",string4="OOOOxx" 401155200000000000 +tenk unique1=7928i,unique2=4643i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=928i,twothousand=1928i,fivethous=2928i,tenthous=7928i,odd=56i,even=57i,stringu1="YSAAAA",stringu2="PWGAAA",string4="VVVVxx" 401241600000000000 +tenk unique1=4736i,unique2=4644i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=736i,twothousand=736i,fivethous=4736i,tenthous=4736i,odd=72i,even=73i,stringu1="EAAAAA",stringu2="QWGAAA",string4="AAAAxx" 401328000000000000 +tenk unique1=4317i,unique2=4645i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=317i,twothousand=317i,fivethous=4317i,tenthous=4317i,odd=34i,even=35i,stringu1="BKAAAA",stringu2="RWGAAA",string4="HHHHxx" 401414400000000000 +tenk unique1=1174i,unique2=4646i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=174i,twothousand=1174i,fivethous=1174i,tenthous=1174i,odd=148i,even=149i,stringu1="ETAAAA",stringu2="SWGAAA",string4="OOOOxx" 401500800000000000 +tenk unique1=6138i,unique2=4647i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=138i,twothousand=138i,fivethous=1138i,tenthous=6138i,odd=76i,even=77i,stringu1="CCAAAA",stringu2="TWGAAA",string4="VVVVxx" 401587200000000000 +tenk unique1=3943i,unique2=4648i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=943i,twothousand=1943i,fivethous=3943i,tenthous=3943i,odd=86i,even=87i,stringu1="RVAAAA",stringu2="UWGAAA",string4="AAAAxx" 401673600000000000 +tenk unique1=1545i,unique2=4649i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=545i,twothousand=1545i,fivethous=1545i,tenthous=1545i,odd=90i,even=91i,stringu1="LHAAAA",stringu2="VWGAAA",string4="HHHHxx" 401760000000000000 +tenk unique1=6867i,unique2=4650i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=867i,twothousand=867i,fivethous=1867i,tenthous=6867i,odd=134i,even=135i,stringu1="DEAAAA",stringu2="WWGAAA",string4="OOOOxx" 401846400000000000 +tenk unique1=6832i,unique2=4651i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=832i,twothousand=832i,fivethous=1832i,tenthous=6832i,odd=64i,even=65i,stringu1="UCAAAA",stringu2="XWGAAA",string4="VVVVxx" 401932800000000000 +tenk unique1=2987i,unique2=4652i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=987i,twothousand=987i,fivethous=2987i,tenthous=2987i,odd=174i,even=175i,stringu1="XKAAAA",stringu2="YWGAAA",string4="AAAAxx" 402019200000000000 +tenk unique1=5169i,unique2=4653i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=169i,twothousand=1169i,fivethous=169i,tenthous=5169i,odd=138i,even=139i,stringu1="VQAAAA",stringu2="ZWGAAA",string4="HHHHxx" 402105600000000000 +tenk unique1=8998i,unique2=4654i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=998i,twothousand=998i,fivethous=3998i,tenthous=8998i,odd=196i,even=197i,stringu1="CIAAAA",stringu2="AXGAAA",string4="OOOOxx" 402192000000000000 +tenk unique1=9347i,unique2=4655i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=347i,twothousand=1347i,fivethous=4347i,tenthous=9347i,odd=94i,even=95i,stringu1="NVAAAA",stringu2="BXGAAA",string4="VVVVxx" 402278400000000000 +tenk unique1=4800i,unique2=4656i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=800i,twothousand=800i,fivethous=4800i,tenthous=4800i,odd=0i,even=1i,stringu1="QCAAAA",stringu2="CXGAAA",string4="AAAAxx" 402364800000000000 +tenk unique1=4200i,unique2=4657i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=200i,twothousand=200i,fivethous=4200i,tenthous=4200i,odd=0i,even=1i,stringu1="OFAAAA",stringu2="DXGAAA",string4="HHHHxx" 402451200000000000 +tenk unique1=4046i,unique2=4658i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=46i,twothousand=46i,fivethous=4046i,tenthous=4046i,odd=92i,even=93i,stringu1="QZAAAA",stringu2="EXGAAA",string4="OOOOxx" 402537600000000000 +tenk unique1=7142i,unique2=4659i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=142i,twothousand=1142i,fivethous=2142i,tenthous=7142i,odd=84i,even=85i,stringu1="SOAAAA",stringu2="FXGAAA",string4="VVVVxx" 402624000000000000 +tenk unique1=2733i,unique2=4660i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=733i,twothousand=733i,fivethous=2733i,tenthous=2733i,odd=66i,even=67i,stringu1="DBAAAA",stringu2="GXGAAA",string4="AAAAxx" 402710400000000000 +tenk unique1=1568i,unique2=4661i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=568i,twothousand=1568i,fivethous=1568i,tenthous=1568i,odd=136i,even=137i,stringu1="IIAAAA",stringu2="HXGAAA",string4="HHHHxx" 402796800000000000 +tenk unique1=5105i,unique2=4662i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=105i,twothousand=1105i,fivethous=105i,tenthous=5105i,odd=10i,even=11i,stringu1="JOAAAA",stringu2="IXGAAA",string4="OOOOxx" 402883200000000000 +tenk unique1=9115i,unique2=4663i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=115i,twothousand=1115i,fivethous=4115i,tenthous=9115i,odd=30i,even=31i,stringu1="PMAAAA",stringu2="JXGAAA",string4="VVVVxx" 402969600000000000 +tenk unique1=6475i,unique2=4664i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=475i,twothousand=475i,fivethous=1475i,tenthous=6475i,odd=150i,even=151i,stringu1="BPAAAA",stringu2="KXGAAA",string4="AAAAxx" 403056000000000000 +tenk unique1=3796i,unique2=4665i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=796i,twothousand=1796i,fivethous=3796i,tenthous=3796i,odd=192i,even=193i,stringu1="AQAAAA",stringu2="LXGAAA",string4="HHHHxx" 403142400000000000 +tenk unique1=5410i,unique2=4666i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=410i,twothousand=1410i,fivethous=410i,tenthous=5410i,odd=20i,even=21i,stringu1="CAAAAA",stringu2="MXGAAA",string4="OOOOxx" 403228800000000000 +tenk unique1=4023i,unique2=4667i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=23i,twothousand=23i,fivethous=4023i,tenthous=4023i,odd=46i,even=47i,stringu1="TYAAAA",stringu2="NXGAAA",string4="VVVVxx" 403315200000000000 +tenk unique1=8904i,unique2=4668i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=904i,twothousand=904i,fivethous=3904i,tenthous=8904i,odd=8i,even=9i,stringu1="MEAAAA",stringu2="OXGAAA",string4="AAAAxx" 403401600000000000 +tenk unique1=450i,unique2=4669i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=450i,twothousand=450i,fivethous=450i,tenthous=450i,odd=100i,even=101i,stringu1="IRAAAA",stringu2="PXGAAA",string4="HHHHxx" 403488000000000000 +tenk unique1=8087i,unique2=4670i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=87i,twothousand=87i,fivethous=3087i,tenthous=8087i,odd=174i,even=175i,stringu1="BZAAAA",stringu2="QXGAAA",string4="OOOOxx" 403574400000000000 +tenk unique1=6478i,unique2=4671i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=478i,twothousand=478i,fivethous=1478i,tenthous=6478i,odd=156i,even=157i,stringu1="EPAAAA",stringu2="RXGAAA",string4="VVVVxx" 403660800000000000 +tenk unique1=2696i,unique2=4672i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=696i,twothousand=696i,fivethous=2696i,tenthous=2696i,odd=192i,even=193i,stringu1="SZAAAA",stringu2="SXGAAA",string4="AAAAxx" 403747200000000000 +tenk unique1=1792i,unique2=4673i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=792i,twothousand=1792i,fivethous=1792i,tenthous=1792i,odd=184i,even=185i,stringu1="YQAAAA",stringu2="TXGAAA",string4="HHHHxx" 403833600000000000 +tenk unique1=9699i,unique2=4674i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=699i,twothousand=1699i,fivethous=4699i,tenthous=9699i,odd=198i,even=199i,stringu1="BJAAAA",stringu2="UXGAAA",string4="OOOOxx" 403920000000000000 +tenk unique1=9160i,unique2=4675i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=160i,twothousand=1160i,fivethous=4160i,tenthous=9160i,odd=120i,even=121i,stringu1="IOAAAA",stringu2="VXGAAA",string4="VVVVxx" 404006400000000000 +tenk unique1=9989i,unique2=4676i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=989i,twothousand=1989i,fivethous=4989i,tenthous=9989i,odd=178i,even=179i,stringu1="FUAAAA",stringu2="WXGAAA",string4="AAAAxx" 404092800000000000 +tenk unique1=9568i,unique2=4677i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=568i,twothousand=1568i,fivethous=4568i,tenthous=9568i,odd=136i,even=137i,stringu1="AEAAAA",stringu2="XXGAAA",string4="HHHHxx" 404179200000000000 +tenk unique1=487i,unique2=4678i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=487i,twothousand=487i,fivethous=487i,tenthous=487i,odd=174i,even=175i,stringu1="TSAAAA",stringu2="YXGAAA",string4="OOOOxx" 404265600000000000 +tenk unique1=7863i,unique2=4679i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=863i,twothousand=1863i,fivethous=2863i,tenthous=7863i,odd=126i,even=127i,stringu1="LQAAAA",stringu2="ZXGAAA",string4="VVVVxx" 404352000000000000 +tenk unique1=1884i,unique2=4680i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=884i,twothousand=1884i,fivethous=1884i,tenthous=1884i,odd=168i,even=169i,stringu1="MUAAAA",stringu2="AYGAAA",string4="AAAAxx" 404438400000000000 +tenk unique1=2651i,unique2=4681i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=651i,twothousand=651i,fivethous=2651i,tenthous=2651i,odd=102i,even=103i,stringu1="ZXAAAA",stringu2="BYGAAA",string4="HHHHxx" 404524800000000000 +tenk unique1=8285i,unique2=4682i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=285i,twothousand=285i,fivethous=3285i,tenthous=8285i,odd=170i,even=171i,stringu1="RGAAAA",stringu2="CYGAAA",string4="OOOOxx" 404611200000000000 +tenk unique1=3927i,unique2=4683i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=927i,twothousand=1927i,fivethous=3927i,tenthous=3927i,odd=54i,even=55i,stringu1="BVAAAA",stringu2="DYGAAA",string4="VVVVxx" 404697600000000000 +tenk unique1=4076i,unique2=4684i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=76i,twothousand=76i,fivethous=4076i,tenthous=4076i,odd=152i,even=153i,stringu1="UAAAAA",stringu2="EYGAAA",string4="AAAAxx" 404784000000000000 +tenk unique1=6149i,unique2=4685i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=149i,twothousand=149i,fivethous=1149i,tenthous=6149i,odd=98i,even=99i,stringu1="NCAAAA",stringu2="FYGAAA",string4="HHHHxx" 404870400000000000 +tenk unique1=6581i,unique2=4686i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=581i,twothousand=581i,fivethous=1581i,tenthous=6581i,odd=162i,even=163i,stringu1="DTAAAA",stringu2="GYGAAA",string4="OOOOxx" 404956800000000000 +tenk unique1=8293i,unique2=4687i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=293i,twothousand=293i,fivethous=3293i,tenthous=8293i,odd=186i,even=187i,stringu1="ZGAAAA",stringu2="HYGAAA",string4="VVVVxx" 405043200000000000 +tenk unique1=7665i,unique2=4688i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=665i,twothousand=1665i,fivethous=2665i,tenthous=7665i,odd=130i,even=131i,stringu1="VIAAAA",stringu2="IYGAAA",string4="AAAAxx" 405129600000000000 +tenk unique1=4435i,unique2=4689i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=435i,twothousand=435i,fivethous=4435i,tenthous=4435i,odd=70i,even=71i,stringu1="POAAAA",stringu2="JYGAAA",string4="HHHHxx" 405216000000000000 +tenk unique1=1271i,unique2=4690i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=271i,twothousand=1271i,fivethous=1271i,tenthous=1271i,odd=142i,even=143i,stringu1="XWAAAA",stringu2="KYGAAA",string4="OOOOxx" 405302400000000000 +tenk unique1=3928i,unique2=4691i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=928i,twothousand=1928i,fivethous=3928i,tenthous=3928i,odd=56i,even=57i,stringu1="CVAAAA",stringu2="LYGAAA",string4="VVVVxx" 405388800000000000 +tenk unique1=7045i,unique2=4692i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=45i,twothousand=1045i,fivethous=2045i,tenthous=7045i,odd=90i,even=91i,stringu1="ZKAAAA",stringu2="MYGAAA",string4="AAAAxx" 405475200000000000 +tenk unique1=4943i,unique2=4693i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=943i,twothousand=943i,fivethous=4943i,tenthous=4943i,odd=86i,even=87i,stringu1="DIAAAA",stringu2="NYGAAA",string4="HHHHxx" 405561600000000000 +tenk unique1=8473i,unique2=4694i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=473i,twothousand=473i,fivethous=3473i,tenthous=8473i,odd=146i,even=147i,stringu1="XNAAAA",stringu2="OYGAAA",string4="OOOOxx" 405648000000000000 +tenk unique1=1707i,unique2=4695i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=707i,twothousand=1707i,fivethous=1707i,tenthous=1707i,odd=14i,even=15i,stringu1="RNAAAA",stringu2="PYGAAA",string4="VVVVxx" 405734400000000000 +tenk unique1=7509i,unique2=4696i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=509i,twothousand=1509i,fivethous=2509i,tenthous=7509i,odd=18i,even=19i,stringu1="VCAAAA",stringu2="QYGAAA",string4="AAAAxx" 405820800000000000 +tenk unique1=1593i,unique2=4697i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=593i,twothousand=1593i,fivethous=1593i,tenthous=1593i,odd=186i,even=187i,stringu1="HJAAAA",stringu2="RYGAAA",string4="HHHHxx" 405907200000000000 +tenk unique1=9281i,unique2=4698i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=281i,twothousand=1281i,fivethous=4281i,tenthous=9281i,odd=162i,even=163i,stringu1="ZSAAAA",stringu2="SYGAAA",string4="OOOOxx" 405993600000000000 +tenk unique1=8986i,unique2=4699i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=986i,twothousand=986i,fivethous=3986i,tenthous=8986i,odd=172i,even=173i,stringu1="QHAAAA",stringu2="TYGAAA",string4="VVVVxx" 406080000000000000 +tenk unique1=3740i,unique2=4700i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=740i,twothousand=1740i,fivethous=3740i,tenthous=3740i,odd=80i,even=81i,stringu1="WNAAAA",stringu2="UYGAAA",string4="AAAAxx" 406166400000000000 +tenk unique1=9265i,unique2=4701i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=265i,twothousand=1265i,fivethous=4265i,tenthous=9265i,odd=130i,even=131i,stringu1="JSAAAA",stringu2="VYGAAA",string4="HHHHxx" 406252800000000000 +tenk unique1=1510i,unique2=4702i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=510i,twothousand=1510i,fivethous=1510i,tenthous=1510i,odd=20i,even=21i,stringu1="CGAAAA",stringu2="WYGAAA",string4="OOOOxx" 406339200000000000 +tenk unique1=3022i,unique2=4703i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=22i,twothousand=1022i,fivethous=3022i,tenthous=3022i,odd=44i,even=45i,stringu1="GMAAAA",stringu2="XYGAAA",string4="VVVVxx" 406425600000000000 +tenk unique1=9014i,unique2=4704i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=14i,twothousand=1014i,fivethous=4014i,tenthous=9014i,odd=28i,even=29i,stringu1="SIAAAA",stringu2="YYGAAA",string4="AAAAxx" 406512000000000000 +tenk unique1=6816i,unique2=4705i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=816i,twothousand=816i,fivethous=1816i,tenthous=6816i,odd=32i,even=33i,stringu1="ECAAAA",stringu2="ZYGAAA",string4="HHHHxx" 406598400000000000 +tenk unique1=5518i,unique2=4706i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=518i,twothousand=1518i,fivethous=518i,tenthous=5518i,odd=36i,even=37i,stringu1="GEAAAA",stringu2="AZGAAA",string4="OOOOxx" 406684800000000000 +tenk unique1=4451i,unique2=4707i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=451i,twothousand=451i,fivethous=4451i,tenthous=4451i,odd=102i,even=103i,stringu1="FPAAAA",stringu2="BZGAAA",string4="VVVVxx" 406771200000000000 +tenk unique1=8747i,unique2=4708i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=747i,twothousand=747i,fivethous=3747i,tenthous=8747i,odd=94i,even=95i,stringu1="LYAAAA",stringu2="CZGAAA",string4="AAAAxx" 406857600000000000 +tenk unique1=4646i,unique2=4709i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=646i,twothousand=646i,fivethous=4646i,tenthous=4646i,odd=92i,even=93i,stringu1="SWAAAA",stringu2="DZGAAA",string4="HHHHxx" 406944000000000000 +tenk unique1=7296i,unique2=4710i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=296i,twothousand=1296i,fivethous=2296i,tenthous=7296i,odd=192i,even=193i,stringu1="QUAAAA",stringu2="EZGAAA",string4="OOOOxx" 407030400000000000 +tenk unique1=9644i,unique2=4711i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=644i,twothousand=1644i,fivethous=4644i,tenthous=9644i,odd=88i,even=89i,stringu1="YGAAAA",stringu2="FZGAAA",string4="VVVVxx" 407116800000000000 +tenk unique1=5977i,unique2=4712i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=977i,twothousand=1977i,fivethous=977i,tenthous=5977i,odd=154i,even=155i,stringu1="XVAAAA",stringu2="GZGAAA",string4="AAAAxx" 407203200000000000 +tenk unique1=6270i,unique2=4713i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=270i,twothousand=270i,fivethous=1270i,tenthous=6270i,odd=140i,even=141i,stringu1="EHAAAA",stringu2="HZGAAA",string4="HHHHxx" 407289600000000000 +tenk unique1=5578i,unique2=4714i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=578i,twothousand=1578i,fivethous=578i,tenthous=5578i,odd=156i,even=157i,stringu1="OGAAAA",stringu2="IZGAAA",string4="OOOOxx" 407376000000000000 +tenk unique1=2465i,unique2=4715i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=465i,twothousand=465i,fivethous=2465i,tenthous=2465i,odd=130i,even=131i,stringu1="VQAAAA",stringu2="JZGAAA",string4="VVVVxx" 407462400000000000 +tenk unique1=6436i,unique2=4716i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=436i,twothousand=436i,fivethous=1436i,tenthous=6436i,odd=72i,even=73i,stringu1="ONAAAA",stringu2="KZGAAA",string4="AAAAxx" 407548800000000000 +tenk unique1=8089i,unique2=4717i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=89i,twothousand=89i,fivethous=3089i,tenthous=8089i,odd=178i,even=179i,stringu1="DZAAAA",stringu2="LZGAAA",string4="HHHHxx" 407635200000000000 +tenk unique1=2409i,unique2=4718i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=409i,twothousand=409i,fivethous=2409i,tenthous=2409i,odd=18i,even=19i,stringu1="ROAAAA",stringu2="MZGAAA",string4="OOOOxx" 407721600000000000 +tenk unique1=284i,unique2=4719i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=284i,twothousand=284i,fivethous=284i,tenthous=284i,odd=168i,even=169i,stringu1="YKAAAA",stringu2="NZGAAA",string4="VVVVxx" 407808000000000000 +tenk unique1=5576i,unique2=4720i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=576i,twothousand=1576i,fivethous=576i,tenthous=5576i,odd=152i,even=153i,stringu1="MGAAAA",stringu2="OZGAAA",string4="AAAAxx" 407894400000000000 +tenk unique1=6534i,unique2=4721i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=534i,twothousand=534i,fivethous=1534i,tenthous=6534i,odd=68i,even=69i,stringu1="IRAAAA",stringu2="PZGAAA",string4="HHHHxx" 407980800000000000 +tenk unique1=8848i,unique2=4722i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=848i,twothousand=848i,fivethous=3848i,tenthous=8848i,odd=96i,even=97i,stringu1="ICAAAA",stringu2="QZGAAA",string4="OOOOxx" 408067200000000000 +tenk unique1=4305i,unique2=4723i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=305i,twothousand=305i,fivethous=4305i,tenthous=4305i,odd=10i,even=11i,stringu1="PJAAAA",stringu2="RZGAAA",string4="VVVVxx" 408153600000000000 +tenk unique1=5574i,unique2=4724i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=574i,twothousand=1574i,fivethous=574i,tenthous=5574i,odd=148i,even=149i,stringu1="KGAAAA",stringu2="SZGAAA",string4="AAAAxx" 408240000000000000 +tenk unique1=596i,unique2=4725i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=596i,twothousand=596i,fivethous=596i,tenthous=596i,odd=192i,even=193i,stringu1="YWAAAA",stringu2="TZGAAA",string4="HHHHxx" 408326400000000000 +tenk unique1=1253i,unique2=4726i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=253i,twothousand=1253i,fivethous=1253i,tenthous=1253i,odd=106i,even=107i,stringu1="FWAAAA",stringu2="UZGAAA",string4="OOOOxx" 408412800000000000 +tenk unique1=521i,unique2=4727i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=521i,twothousand=521i,fivethous=521i,tenthous=521i,odd=42i,even=43i,stringu1="BUAAAA",stringu2="VZGAAA",string4="VVVVxx" 408499200000000000 +tenk unique1=8739i,unique2=4728i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=739i,twothousand=739i,fivethous=3739i,tenthous=8739i,odd=78i,even=79i,stringu1="DYAAAA",stringu2="WZGAAA",string4="AAAAxx" 408585600000000000 +tenk unique1=908i,unique2=4729i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=908i,twothousand=908i,fivethous=908i,tenthous=908i,odd=16i,even=17i,stringu1="YIAAAA",stringu2="XZGAAA",string4="HHHHxx" 408672000000000000 +tenk unique1=6937i,unique2=4730i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=937i,twothousand=937i,fivethous=1937i,tenthous=6937i,odd=74i,even=75i,stringu1="VGAAAA",stringu2="YZGAAA",string4="OOOOxx" 408758400000000000 +tenk unique1=4515i,unique2=4731i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=515i,twothousand=515i,fivethous=4515i,tenthous=4515i,odd=30i,even=31i,stringu1="RRAAAA",stringu2="ZZGAAA",string4="VVVVxx" 408844800000000000 +tenk unique1=8630i,unique2=4732i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=630i,twothousand=630i,fivethous=3630i,tenthous=8630i,odd=60i,even=61i,stringu1="YTAAAA",stringu2="AAHAAA",string4="AAAAxx" 408931200000000000 +tenk unique1=7518i,unique2=4733i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=518i,twothousand=1518i,fivethous=2518i,tenthous=7518i,odd=36i,even=37i,stringu1="EDAAAA",stringu2="BAHAAA",string4="HHHHxx" 409017600000000000 +tenk unique1=8300i,unique2=4734i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=300i,twothousand=300i,fivethous=3300i,tenthous=8300i,odd=0i,even=1i,stringu1="GHAAAA",stringu2="CAHAAA",string4="OOOOxx" 409104000000000000 +tenk unique1=8434i,unique2=4735i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=434i,twothousand=434i,fivethous=3434i,tenthous=8434i,odd=68i,even=69i,stringu1="KMAAAA",stringu2="DAHAAA",string4="VVVVxx" 409190400000000000 +tenk unique1=6000i,unique2=4736i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=0i,fivethous=1000i,tenthous=6000i,odd=0i,even=1i,stringu1="UWAAAA",stringu2="EAHAAA",string4="AAAAxx" 409276800000000000 +tenk unique1=4508i,unique2=4737i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=508i,twothousand=508i,fivethous=4508i,tenthous=4508i,odd=16i,even=17i,stringu1="KRAAAA",stringu2="FAHAAA",string4="HHHHxx" 409363200000000000 +tenk unique1=7861i,unique2=4738i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=861i,twothousand=1861i,fivethous=2861i,tenthous=7861i,odd=122i,even=123i,stringu1="JQAAAA",stringu2="GAHAAA",string4="OOOOxx" 409449600000000000 +tenk unique1=5953i,unique2=4739i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=953i,twothousand=1953i,fivethous=953i,tenthous=5953i,odd=106i,even=107i,stringu1="ZUAAAA",stringu2="HAHAAA",string4="VVVVxx" 409536000000000000 +tenk unique1=5063i,unique2=4740i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=63i,twothousand=1063i,fivethous=63i,tenthous=5063i,odd=126i,even=127i,stringu1="TMAAAA",stringu2="IAHAAA",string4="AAAAxx" 409622400000000000 +tenk unique1=4501i,unique2=4741i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=501i,twothousand=501i,fivethous=4501i,tenthous=4501i,odd=2i,even=3i,stringu1="DRAAAA",stringu2="JAHAAA",string4="HHHHxx" 409708800000000000 +tenk unique1=7092i,unique2=4742i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=92i,twothousand=1092i,fivethous=2092i,tenthous=7092i,odd=184i,even=185i,stringu1="UMAAAA",stringu2="KAHAAA",string4="OOOOxx" 409795200000000000 +tenk unique1=4388i,unique2=4743i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=388i,twothousand=388i,fivethous=4388i,tenthous=4388i,odd=176i,even=177i,stringu1="UMAAAA",stringu2="LAHAAA",string4="VVVVxx" 409881600000000000 +tenk unique1=1826i,unique2=4744i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=826i,twothousand=1826i,fivethous=1826i,tenthous=1826i,odd=52i,even=53i,stringu1="GSAAAA",stringu2="MAHAAA",string4="AAAAxx" 409968000000000000 +tenk unique1=568i,unique2=4745i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=568i,twothousand=568i,fivethous=568i,tenthous=568i,odd=136i,even=137i,stringu1="WVAAAA",stringu2="NAHAAA",string4="HHHHxx" 410054400000000000 +tenk unique1=8184i,unique2=4746i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=184i,twothousand=184i,fivethous=3184i,tenthous=8184i,odd=168i,even=169i,stringu1="UCAAAA",stringu2="OAHAAA",string4="OOOOxx" 410140800000000000 +tenk unique1=4268i,unique2=4747i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=268i,twothousand=268i,fivethous=4268i,tenthous=4268i,odd=136i,even=137i,stringu1="EIAAAA",stringu2="PAHAAA",string4="VVVVxx" 410227200000000000 +tenk unique1=5798i,unique2=4748i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=798i,twothousand=1798i,fivethous=798i,tenthous=5798i,odd=196i,even=197i,stringu1="APAAAA",stringu2="QAHAAA",string4="AAAAxx" 410313600000000000 +tenk unique1=5190i,unique2=4749i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=190i,twothousand=1190i,fivethous=190i,tenthous=5190i,odd=180i,even=181i,stringu1="QRAAAA",stringu2="RAHAAA",string4="HHHHxx" 410400000000000000 +tenk unique1=1298i,unique2=4750i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=298i,twothousand=1298i,fivethous=1298i,tenthous=1298i,odd=196i,even=197i,stringu1="YXAAAA",stringu2="SAHAAA",string4="OOOOxx" 410486400000000000 +tenk unique1=4035i,unique2=4751i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=35i,twothousand=35i,fivethous=4035i,tenthous=4035i,odd=70i,even=71i,stringu1="FZAAAA",stringu2="TAHAAA",string4="VVVVxx" 410572800000000000 +tenk unique1=4504i,unique2=4752i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=504i,twothousand=504i,fivethous=4504i,tenthous=4504i,odd=8i,even=9i,stringu1="GRAAAA",stringu2="UAHAAA",string4="AAAAxx" 410659200000000000 +tenk unique1=5992i,unique2=4753i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=992i,twothousand=1992i,fivethous=992i,tenthous=5992i,odd=184i,even=185i,stringu1="MWAAAA",stringu2="VAHAAA",string4="HHHHxx" 410745600000000000 +tenk unique1=770i,unique2=4754i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=770i,twothousand=770i,fivethous=770i,tenthous=770i,odd=140i,even=141i,stringu1="QDAAAA",stringu2="WAHAAA",string4="OOOOxx" 410832000000000000 +tenk unique1=7502i,unique2=4755i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=502i,twothousand=1502i,fivethous=2502i,tenthous=7502i,odd=4i,even=5i,stringu1="OCAAAA",stringu2="XAHAAA",string4="VVVVxx" 410918400000000000 +tenk unique1=824i,unique2=4756i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=824i,twothousand=824i,fivethous=824i,tenthous=824i,odd=48i,even=49i,stringu1="SFAAAA",stringu2="YAHAAA",string4="AAAAxx" 411004800000000000 +tenk unique1=7716i,unique2=4757i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=716i,twothousand=1716i,fivethous=2716i,tenthous=7716i,odd=32i,even=33i,stringu1="UKAAAA",stringu2="ZAHAAA",string4="HHHHxx" 411091200000000000 +tenk unique1=5749i,unique2=4758i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=749i,twothousand=1749i,fivethous=749i,tenthous=5749i,odd=98i,even=99i,stringu1="DNAAAA",stringu2="ABHAAA",string4="OOOOxx" 411177600000000000 +tenk unique1=9814i,unique2=4759i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=814i,twothousand=1814i,fivethous=4814i,tenthous=9814i,odd=28i,even=29i,stringu1="MNAAAA",stringu2="BBHAAA",string4="VVVVxx" 411264000000000000 +tenk unique1=350i,unique2=4760i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=350i,twothousand=350i,fivethous=350i,tenthous=350i,odd=100i,even=101i,stringu1="MNAAAA",stringu2="CBHAAA",string4="AAAAxx" 411350400000000000 +tenk unique1=1390i,unique2=4761i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=390i,twothousand=1390i,fivethous=1390i,tenthous=1390i,odd=180i,even=181i,stringu1="MBAAAA",stringu2="DBHAAA",string4="HHHHxx" 411436800000000000 +tenk unique1=6994i,unique2=4762i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=994i,twothousand=994i,fivethous=1994i,tenthous=6994i,odd=188i,even=189i,stringu1="AJAAAA",stringu2="EBHAAA",string4="OOOOxx" 411523200000000000 +tenk unique1=3629i,unique2=4763i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=629i,twothousand=1629i,fivethous=3629i,tenthous=3629i,odd=58i,even=59i,stringu1="PJAAAA",stringu2="FBHAAA",string4="VVVVxx" 411609600000000000 +tenk unique1=9937i,unique2=4764i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=937i,twothousand=1937i,fivethous=4937i,tenthous=9937i,odd=74i,even=75i,stringu1="FSAAAA",stringu2="GBHAAA",string4="AAAAxx" 411696000000000000 +tenk unique1=5285i,unique2=4765i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=285i,twothousand=1285i,fivethous=285i,tenthous=5285i,odd=170i,even=171i,stringu1="HVAAAA",stringu2="HBHAAA",string4="HHHHxx" 411782400000000000 +tenk unique1=3157i,unique2=4766i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=157i,twothousand=1157i,fivethous=3157i,tenthous=3157i,odd=114i,even=115i,stringu1="LRAAAA",stringu2="IBHAAA",string4="OOOOxx" 411868800000000000 +tenk unique1=9549i,unique2=4767i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=549i,twothousand=1549i,fivethous=4549i,tenthous=9549i,odd=98i,even=99i,stringu1="HDAAAA",stringu2="JBHAAA",string4="VVVVxx" 411955200000000000 +tenk unique1=4118i,unique2=4768i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=118i,twothousand=118i,fivethous=4118i,tenthous=4118i,odd=36i,even=37i,stringu1="KCAAAA",stringu2="KBHAAA",string4="AAAAxx" 412041600000000000 +tenk unique1=756i,unique2=4769i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=756i,twothousand=756i,fivethous=756i,tenthous=756i,odd=112i,even=113i,stringu1="CDAAAA",stringu2="LBHAAA",string4="HHHHxx" 412128000000000000 +tenk unique1=5964i,unique2=4770i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=964i,twothousand=1964i,fivethous=964i,tenthous=5964i,odd=128i,even=129i,stringu1="KVAAAA",stringu2="MBHAAA",string4="OOOOxx" 412214400000000000 +tenk unique1=7701i,unique2=4771i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=701i,twothousand=1701i,fivethous=2701i,tenthous=7701i,odd=2i,even=3i,stringu1="FKAAAA",stringu2="NBHAAA",string4="VVVVxx" 412300800000000000 +tenk unique1=1242i,unique2=4772i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=242i,twothousand=1242i,fivethous=1242i,tenthous=1242i,odd=84i,even=85i,stringu1="UVAAAA",stringu2="OBHAAA",string4="AAAAxx" 412387200000000000 +tenk unique1=7890i,unique2=4773i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=890i,twothousand=1890i,fivethous=2890i,tenthous=7890i,odd=180i,even=181i,stringu1="MRAAAA",stringu2="PBHAAA",string4="HHHHxx" 412473600000000000 +tenk unique1=1991i,unique2=4774i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=991i,twothousand=1991i,fivethous=1991i,tenthous=1991i,odd=182i,even=183i,stringu1="PYAAAA",stringu2="QBHAAA",string4="OOOOxx" 412560000000000000 +tenk unique1=110i,unique2=4775i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=110i,twothousand=110i,fivethous=110i,tenthous=110i,odd=20i,even=21i,stringu1="GEAAAA",stringu2="RBHAAA",string4="VVVVxx" 412646400000000000 +tenk unique1=9334i,unique2=4776i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=334i,twothousand=1334i,fivethous=4334i,tenthous=9334i,odd=68i,even=69i,stringu1="AVAAAA",stringu2="SBHAAA",string4="AAAAxx" 412732800000000000 +tenk unique1=6231i,unique2=4777i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=231i,twothousand=231i,fivethous=1231i,tenthous=6231i,odd=62i,even=63i,stringu1="RFAAAA",stringu2="TBHAAA",string4="HHHHxx" 412819200000000000 +tenk unique1=9871i,unique2=4778i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=871i,twothousand=1871i,fivethous=4871i,tenthous=9871i,odd=142i,even=143i,stringu1="RPAAAA",stringu2="UBHAAA",string4="OOOOxx" 412905600000000000 +tenk unique1=9471i,unique2=4779i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=471i,twothousand=1471i,fivethous=4471i,tenthous=9471i,odd=142i,even=143i,stringu1="HAAAAA",stringu2="VBHAAA",string4="VVVVxx" 412992000000000000 +tenk unique1=2697i,unique2=4780i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=697i,twothousand=697i,fivethous=2697i,tenthous=2697i,odd=194i,even=195i,stringu1="TZAAAA",stringu2="WBHAAA",string4="AAAAxx" 413078400000000000 +tenk unique1=4761i,unique2=4781i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=761i,twothousand=761i,fivethous=4761i,tenthous=4761i,odd=122i,even=123i,stringu1="DBAAAA",stringu2="XBHAAA",string4="HHHHxx" 413164800000000000 +tenk unique1=8493i,unique2=4782i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=493i,twothousand=493i,fivethous=3493i,tenthous=8493i,odd=186i,even=187i,stringu1="ROAAAA",stringu2="YBHAAA",string4="OOOOxx" 413251200000000000 +tenk unique1=1045i,unique2=4783i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=45i,twothousand=1045i,fivethous=1045i,tenthous=1045i,odd=90i,even=91i,stringu1="FOAAAA",stringu2="ZBHAAA",string4="VVVVxx" 413337600000000000 +tenk unique1=3403i,unique2=4784i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=403i,twothousand=1403i,fivethous=3403i,tenthous=3403i,odd=6i,even=7i,stringu1="XAAAAA",stringu2="ACHAAA",string4="AAAAxx" 413424000000000000 +tenk unique1=9412i,unique2=4785i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=412i,twothousand=1412i,fivethous=4412i,tenthous=9412i,odd=24i,even=25i,stringu1="AYAAAA",stringu2="BCHAAA",string4="HHHHxx" 413510400000000000 +tenk unique1=7652i,unique2=4786i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=652i,twothousand=1652i,fivethous=2652i,tenthous=7652i,odd=104i,even=105i,stringu1="IIAAAA",stringu2="CCHAAA",string4="OOOOxx" 413596800000000000 +tenk unique1=5866i,unique2=4787i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=866i,twothousand=1866i,fivethous=866i,tenthous=5866i,odd=132i,even=133i,stringu1="QRAAAA",stringu2="DCHAAA",string4="VVVVxx" 413683200000000000 +tenk unique1=6942i,unique2=4788i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=942i,twothousand=942i,fivethous=1942i,tenthous=6942i,odd=84i,even=85i,stringu1="AHAAAA",stringu2="ECHAAA",string4="AAAAxx" 413769600000000000 +tenk unique1=9353i,unique2=4789i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=353i,twothousand=1353i,fivethous=4353i,tenthous=9353i,odd=106i,even=107i,stringu1="TVAAAA",stringu2="FCHAAA",string4="HHHHxx" 413856000000000000 +tenk unique1=2600i,unique2=4790i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=600i,twothousand=600i,fivethous=2600i,tenthous=2600i,odd=0i,even=1i,stringu1="AWAAAA",stringu2="GCHAAA",string4="OOOOxx" 413942400000000000 +tenk unique1=6971i,unique2=4791i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=971i,twothousand=971i,fivethous=1971i,tenthous=6971i,odd=142i,even=143i,stringu1="DIAAAA",stringu2="HCHAAA",string4="VVVVxx" 414028800000000000 +tenk unique1=5391i,unique2=4792i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=391i,twothousand=1391i,fivethous=391i,tenthous=5391i,odd=182i,even=183i,stringu1="JZAAAA",stringu2="ICHAAA",string4="AAAAxx" 414115200000000000 +tenk unique1=7654i,unique2=4793i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=654i,twothousand=1654i,fivethous=2654i,tenthous=7654i,odd=108i,even=109i,stringu1="KIAAAA",stringu2="JCHAAA",string4="HHHHxx" 414201600000000000 +tenk unique1=1797i,unique2=4794i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=797i,twothousand=1797i,fivethous=1797i,tenthous=1797i,odd=194i,even=195i,stringu1="DRAAAA",stringu2="KCHAAA",string4="OOOOxx" 414288000000000000 +tenk unique1=4530i,unique2=4795i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=530i,twothousand=530i,fivethous=4530i,tenthous=4530i,odd=60i,even=61i,stringu1="GSAAAA",stringu2="LCHAAA",string4="VVVVxx" 414374400000000000 +tenk unique1=3130i,unique2=4796i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=130i,twothousand=1130i,fivethous=3130i,tenthous=3130i,odd=60i,even=61i,stringu1="KQAAAA",stringu2="MCHAAA",string4="AAAAxx" 414460800000000000 +tenk unique1=9442i,unique2=4797i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=442i,twothousand=1442i,fivethous=4442i,tenthous=9442i,odd=84i,even=85i,stringu1="EZAAAA",stringu2="NCHAAA",string4="HHHHxx" 414547200000000000 +tenk unique1=6659i,unique2=4798i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=659i,twothousand=659i,fivethous=1659i,tenthous=6659i,odd=118i,even=119i,stringu1="DWAAAA",stringu2="OCHAAA",string4="OOOOxx" 414633600000000000 +tenk unique1=9714i,unique2=4799i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=714i,twothousand=1714i,fivethous=4714i,tenthous=9714i,odd=28i,even=29i,stringu1="QJAAAA",stringu2="PCHAAA",string4="VVVVxx" 414720000000000000 +tenk unique1=3660i,unique2=4800i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=660i,twothousand=1660i,fivethous=3660i,tenthous=3660i,odd=120i,even=121i,stringu1="UKAAAA",stringu2="QCHAAA",string4="AAAAxx" 414806400000000000 +tenk unique1=1906i,unique2=4801i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=906i,twothousand=1906i,fivethous=1906i,tenthous=1906i,odd=12i,even=13i,stringu1="IVAAAA",stringu2="RCHAAA",string4="HHHHxx" 414892800000000000 +tenk unique1=7927i,unique2=4802i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=927i,twothousand=1927i,fivethous=2927i,tenthous=7927i,odd=54i,even=55i,stringu1="XSAAAA",stringu2="SCHAAA",string4="OOOOxx" 414979200000000000 +tenk unique1=1767i,unique2=4803i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=767i,twothousand=1767i,fivethous=1767i,tenthous=1767i,odd=134i,even=135i,stringu1="ZPAAAA",stringu2="TCHAAA",string4="VVVVxx" 415065600000000000 +tenk unique1=5523i,unique2=4804i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=523i,twothousand=1523i,fivethous=523i,tenthous=5523i,odd=46i,even=47i,stringu1="LEAAAA",stringu2="UCHAAA",string4="AAAAxx" 415152000000000000 +tenk unique1=9289i,unique2=4805i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=289i,twothousand=1289i,fivethous=4289i,tenthous=9289i,odd=178i,even=179i,stringu1="HTAAAA",stringu2="VCHAAA",string4="HHHHxx" 415238400000000000 +tenk unique1=2717i,unique2=4806i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=717i,twothousand=717i,fivethous=2717i,tenthous=2717i,odd=34i,even=35i,stringu1="NAAAAA",stringu2="WCHAAA",string4="OOOOxx" 415324800000000000 +tenk unique1=4099i,unique2=4807i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=99i,twothousand=99i,fivethous=4099i,tenthous=4099i,odd=198i,even=199i,stringu1="RBAAAA",stringu2="XCHAAA",string4="VVVVxx" 415411200000000000 +tenk unique1=4387i,unique2=4808i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=387i,twothousand=387i,fivethous=4387i,tenthous=4387i,odd=174i,even=175i,stringu1="TMAAAA",stringu2="YCHAAA",string4="AAAAxx" 415497600000000000 +tenk unique1=8864i,unique2=4809i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=864i,twothousand=864i,fivethous=3864i,tenthous=8864i,odd=128i,even=129i,stringu1="YCAAAA",stringu2="ZCHAAA",string4="HHHHxx" 415584000000000000 +tenk unique1=1774i,unique2=4810i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=774i,twothousand=1774i,fivethous=1774i,tenthous=1774i,odd=148i,even=149i,stringu1="GQAAAA",stringu2="ADHAAA",string4="OOOOxx" 415670400000000000 +tenk unique1=6292i,unique2=4811i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=292i,twothousand=292i,fivethous=1292i,tenthous=6292i,odd=184i,even=185i,stringu1="AIAAAA",stringu2="BDHAAA",string4="VVVVxx" 415756800000000000 +tenk unique1=847i,unique2=4812i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=847i,twothousand=847i,fivethous=847i,tenthous=847i,odd=94i,even=95i,stringu1="PGAAAA",stringu2="CDHAAA",string4="AAAAxx" 415843200000000000 +tenk unique1=5954i,unique2=4813i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=954i,twothousand=1954i,fivethous=954i,tenthous=5954i,odd=108i,even=109i,stringu1="AVAAAA",stringu2="DDHAAA",string4="HHHHxx" 415929600000000000 +tenk unique1=8032i,unique2=4814i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=32i,twothousand=32i,fivethous=3032i,tenthous=8032i,odd=64i,even=65i,stringu1="YWAAAA",stringu2="EDHAAA",string4="OOOOxx" 416016000000000000 +tenk unique1=3295i,unique2=4815i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=295i,twothousand=1295i,fivethous=3295i,tenthous=3295i,odd=190i,even=191i,stringu1="TWAAAA",stringu2="FDHAAA",string4="VVVVxx" 416102400000000000 +tenk unique1=8984i,unique2=4816i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=984i,twothousand=984i,fivethous=3984i,tenthous=8984i,odd=168i,even=169i,stringu1="OHAAAA",stringu2="GDHAAA",string4="AAAAxx" 416188800000000000 +tenk unique1=7809i,unique2=4817i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=809i,twothousand=1809i,fivethous=2809i,tenthous=7809i,odd=18i,even=19i,stringu1="JOAAAA",stringu2="HDHAAA",string4="HHHHxx" 416275200000000000 +tenk unique1=1670i,unique2=4818i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=670i,twothousand=1670i,fivethous=1670i,tenthous=1670i,odd=140i,even=141i,stringu1="GMAAAA",stringu2="IDHAAA",string4="OOOOxx" 416361600000000000 +tenk unique1=7733i,unique2=4819i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=733i,twothousand=1733i,fivethous=2733i,tenthous=7733i,odd=66i,even=67i,stringu1="LLAAAA",stringu2="JDHAAA",string4="VVVVxx" 416448000000000000 +tenk unique1=6187i,unique2=4820i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=187i,twothousand=187i,fivethous=1187i,tenthous=6187i,odd=174i,even=175i,stringu1="ZDAAAA",stringu2="KDHAAA",string4="AAAAxx" 416534400000000000 +tenk unique1=9326i,unique2=4821i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=326i,twothousand=1326i,fivethous=4326i,tenthous=9326i,odd=52i,even=53i,stringu1="SUAAAA",stringu2="LDHAAA",string4="HHHHxx" 416620800000000000 +tenk unique1=2493i,unique2=4822i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=493i,twothousand=493i,fivethous=2493i,tenthous=2493i,odd=186i,even=187i,stringu1="XRAAAA",stringu2="MDHAAA",string4="OOOOxx" 416707200000000000 +tenk unique1=9512i,unique2=4823i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=512i,twothousand=1512i,fivethous=4512i,tenthous=9512i,odd=24i,even=25i,stringu1="WBAAAA",stringu2="NDHAAA",string4="VVVVxx" 416793600000000000 +tenk unique1=4342i,unique2=4824i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=342i,twothousand=342i,fivethous=4342i,tenthous=4342i,odd=84i,even=85i,stringu1="ALAAAA",stringu2="ODHAAA",string4="AAAAxx" 416880000000000000 +tenk unique1=5350i,unique2=4825i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=350i,twothousand=1350i,fivethous=350i,tenthous=5350i,odd=100i,even=101i,stringu1="UXAAAA",stringu2="PDHAAA",string4="HHHHxx" 416966400000000000 +tenk unique1=6009i,unique2=4826i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=9i,fivethous=1009i,tenthous=6009i,odd=18i,even=19i,stringu1="DXAAAA",stringu2="QDHAAA",string4="OOOOxx" 417052800000000000 +tenk unique1=1208i,unique2=4827i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=208i,twothousand=1208i,fivethous=1208i,tenthous=1208i,odd=16i,even=17i,stringu1="MUAAAA",stringu2="RDHAAA",string4="VVVVxx" 417139200000000000 +tenk unique1=7014i,unique2=4828i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=14i,twothousand=1014i,fivethous=2014i,tenthous=7014i,odd=28i,even=29i,stringu1="UJAAAA",stringu2="SDHAAA",string4="AAAAxx" 417225600000000000 +tenk unique1=2967i,unique2=4829i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=967i,twothousand=967i,fivethous=2967i,tenthous=2967i,odd=134i,even=135i,stringu1="DKAAAA",stringu2="TDHAAA",string4="HHHHxx" 417312000000000000 +tenk unique1=5831i,unique2=4830i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=831i,twothousand=1831i,fivethous=831i,tenthous=5831i,odd=62i,even=63i,stringu1="HQAAAA",stringu2="UDHAAA",string4="OOOOxx" 417398400000000000 +tenk unique1=3097i,unique2=4831i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=97i,twothousand=1097i,fivethous=3097i,tenthous=3097i,odd=194i,even=195i,stringu1="DPAAAA",stringu2="VDHAAA",string4="VVVVxx" 417484800000000000 +tenk unique1=1528i,unique2=4832i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=528i,twothousand=1528i,fivethous=1528i,tenthous=1528i,odd=56i,even=57i,stringu1="UGAAAA",stringu2="WDHAAA",string4="AAAAxx" 417571200000000000 +tenk unique1=6429i,unique2=4833i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=429i,twothousand=429i,fivethous=1429i,tenthous=6429i,odd=58i,even=59i,stringu1="HNAAAA",stringu2="XDHAAA",string4="HHHHxx" 417657600000000000 +tenk unique1=7320i,unique2=4834i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=320i,twothousand=1320i,fivethous=2320i,tenthous=7320i,odd=40i,even=41i,stringu1="OVAAAA",stringu2="YDHAAA",string4="OOOOxx" 417744000000000000 +tenk unique1=844i,unique2=4835i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=844i,twothousand=844i,fivethous=844i,tenthous=844i,odd=88i,even=89i,stringu1="MGAAAA",stringu2="ZDHAAA",string4="VVVVxx" 417830400000000000 +tenk unique1=7054i,unique2=4836i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=54i,twothousand=1054i,fivethous=2054i,tenthous=7054i,odd=108i,even=109i,stringu1="ILAAAA",stringu2="AEHAAA",string4="AAAAxx" 417916800000000000 +tenk unique1=1643i,unique2=4837i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=643i,twothousand=1643i,fivethous=1643i,tenthous=1643i,odd=86i,even=87i,stringu1="FLAAAA",stringu2="BEHAAA",string4="HHHHxx" 418003200000000000 +tenk unique1=7626i,unique2=4838i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=626i,twothousand=1626i,fivethous=2626i,tenthous=7626i,odd=52i,even=53i,stringu1="IHAAAA",stringu2="CEHAAA",string4="OOOOxx" 418089600000000000 +tenk unique1=8728i,unique2=4839i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=728i,twothousand=728i,fivethous=3728i,tenthous=8728i,odd=56i,even=57i,stringu1="SXAAAA",stringu2="DEHAAA",string4="VVVVxx" 418176000000000000 +tenk unique1=8277i,unique2=4840i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=277i,twothousand=277i,fivethous=3277i,tenthous=8277i,odd=154i,even=155i,stringu1="JGAAAA",stringu2="EEHAAA",string4="AAAAxx" 418262400000000000 +tenk unique1=189i,unique2=4841i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=189i,twothousand=189i,fivethous=189i,tenthous=189i,odd=178i,even=179i,stringu1="HHAAAA",stringu2="FEHAAA",string4="HHHHxx" 418348800000000000 +tenk unique1=3717i,unique2=4842i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=717i,twothousand=1717i,fivethous=3717i,tenthous=3717i,odd=34i,even=35i,stringu1="ZMAAAA",stringu2="GEHAAA",string4="OOOOxx" 418435200000000000 +tenk unique1=1020i,unique2=4843i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=20i,twothousand=1020i,fivethous=1020i,tenthous=1020i,odd=40i,even=41i,stringu1="GNAAAA",stringu2="HEHAAA",string4="VVVVxx" 418521600000000000 +tenk unique1=9234i,unique2=4844i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=234i,twothousand=1234i,fivethous=4234i,tenthous=9234i,odd=68i,even=69i,stringu1="ERAAAA",stringu2="IEHAAA",string4="AAAAxx" 418608000000000000 +tenk unique1=9541i,unique2=4845i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=541i,twothousand=1541i,fivethous=4541i,tenthous=9541i,odd=82i,even=83i,stringu1="ZCAAAA",stringu2="JEHAAA",string4="HHHHxx" 418694400000000000 +tenk unique1=380i,unique2=4846i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=380i,twothousand=380i,fivethous=380i,tenthous=380i,odd=160i,even=161i,stringu1="QOAAAA",stringu2="KEHAAA",string4="OOOOxx" 418780800000000000 +tenk unique1=397i,unique2=4847i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=397i,twothousand=397i,fivethous=397i,tenthous=397i,odd=194i,even=195i,stringu1="HPAAAA",stringu2="LEHAAA",string4="VVVVxx" 418867200000000000 +tenk unique1=835i,unique2=4848i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=835i,twothousand=835i,fivethous=835i,tenthous=835i,odd=70i,even=71i,stringu1="DGAAAA",stringu2="MEHAAA",string4="AAAAxx" 418953600000000000 +tenk unique1=347i,unique2=4849i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=347i,twothousand=347i,fivethous=347i,tenthous=347i,odd=94i,even=95i,stringu1="JNAAAA",stringu2="NEHAAA",string4="HHHHxx" 419040000000000000 +tenk unique1=2490i,unique2=4850i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=490i,twothousand=490i,fivethous=2490i,tenthous=2490i,odd=180i,even=181i,stringu1="URAAAA",stringu2="OEHAAA",string4="OOOOxx" 419126400000000000 +tenk unique1=605i,unique2=4851i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=605i,twothousand=605i,fivethous=605i,tenthous=605i,odd=10i,even=11i,stringu1="HXAAAA",stringu2="PEHAAA",string4="VVVVxx" 419212800000000000 +tenk unique1=7960i,unique2=4852i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=960i,twothousand=1960i,fivethous=2960i,tenthous=7960i,odd=120i,even=121i,stringu1="EUAAAA",stringu2="QEHAAA",string4="AAAAxx" 419299200000000000 +tenk unique1=9681i,unique2=4853i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=681i,twothousand=1681i,fivethous=4681i,tenthous=9681i,odd=162i,even=163i,stringu1="JIAAAA",stringu2="REHAAA",string4="HHHHxx" 419385600000000000 +tenk unique1=5753i,unique2=4854i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=753i,twothousand=1753i,fivethous=753i,tenthous=5753i,odd=106i,even=107i,stringu1="HNAAAA",stringu2="SEHAAA",string4="OOOOxx" 419472000000000000 +tenk unique1=1676i,unique2=4855i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=676i,twothousand=1676i,fivethous=1676i,tenthous=1676i,odd=152i,even=153i,stringu1="MMAAAA",stringu2="TEHAAA",string4="VVVVxx" 419558400000000000 +tenk unique1=5533i,unique2=4856i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=533i,twothousand=1533i,fivethous=533i,tenthous=5533i,odd=66i,even=67i,stringu1="VEAAAA",stringu2="UEHAAA",string4="AAAAxx" 419644800000000000 +tenk unique1=8958i,unique2=4857i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=958i,twothousand=958i,fivethous=3958i,tenthous=8958i,odd=116i,even=117i,stringu1="OGAAAA",stringu2="VEHAAA",string4="HHHHxx" 419731200000000000 +tenk unique1=664i,unique2=4858i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=664i,twothousand=664i,fivethous=664i,tenthous=664i,odd=128i,even=129i,stringu1="OZAAAA",stringu2="WEHAAA",string4="OOOOxx" 419817600000000000 +tenk unique1=3005i,unique2=4859i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=1005i,fivethous=3005i,tenthous=3005i,odd=10i,even=11i,stringu1="PLAAAA",stringu2="XEHAAA",string4="VVVVxx" 419904000000000000 +tenk unique1=8576i,unique2=4860i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=576i,twothousand=576i,fivethous=3576i,tenthous=8576i,odd=152i,even=153i,stringu1="WRAAAA",stringu2="YEHAAA",string4="AAAAxx" 419990400000000000 +tenk unique1=7304i,unique2=4861i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=304i,twothousand=1304i,fivethous=2304i,tenthous=7304i,odd=8i,even=9i,stringu1="YUAAAA",stringu2="ZEHAAA",string4="HHHHxx" 420076800000000000 +tenk unique1=3375i,unique2=4862i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=375i,twothousand=1375i,fivethous=3375i,tenthous=3375i,odd=150i,even=151i,stringu1="VZAAAA",stringu2="AFHAAA",string4="OOOOxx" 420163200000000000 +tenk unique1=6336i,unique2=4863i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=336i,twothousand=336i,fivethous=1336i,tenthous=6336i,odd=72i,even=73i,stringu1="SJAAAA",stringu2="BFHAAA",string4="VVVVxx" 420249600000000000 +tenk unique1=1392i,unique2=4864i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=392i,twothousand=1392i,fivethous=1392i,tenthous=1392i,odd=184i,even=185i,stringu1="OBAAAA",stringu2="CFHAAA",string4="AAAAxx" 420336000000000000 +tenk unique1=2925i,unique2=4865i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=925i,twothousand=925i,fivethous=2925i,tenthous=2925i,odd=50i,even=51i,stringu1="NIAAAA",stringu2="DFHAAA",string4="HHHHxx" 420422400000000000 +tenk unique1=1217i,unique2=4866i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=217i,twothousand=1217i,fivethous=1217i,tenthous=1217i,odd=34i,even=35i,stringu1="VUAAAA",stringu2="EFHAAA",string4="OOOOxx" 420508800000000000 +tenk unique1=3714i,unique2=4867i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=714i,twothousand=1714i,fivethous=3714i,tenthous=3714i,odd=28i,even=29i,stringu1="WMAAAA",stringu2="FFHAAA",string4="VVVVxx" 420595200000000000 +tenk unique1=2120i,unique2=4868i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=120i,twothousand=120i,fivethous=2120i,tenthous=2120i,odd=40i,even=41i,stringu1="ODAAAA",stringu2="GFHAAA",string4="AAAAxx" 420681600000000000 +tenk unique1=2845i,unique2=4869i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=845i,twothousand=845i,fivethous=2845i,tenthous=2845i,odd=90i,even=91i,stringu1="LFAAAA",stringu2="HFHAAA",string4="HHHHxx" 420768000000000000 +tenk unique1=3865i,unique2=4870i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=865i,twothousand=1865i,fivethous=3865i,tenthous=3865i,odd=130i,even=131i,stringu1="RSAAAA",stringu2="IFHAAA",string4="OOOOxx" 420854400000000000 +tenk unique1=124i,unique2=4871i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=124i,twothousand=124i,fivethous=124i,tenthous=124i,odd=48i,even=49i,stringu1="UEAAAA",stringu2="JFHAAA",string4="VVVVxx" 420940800000000000 +tenk unique1=865i,unique2=4872i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=865i,twothousand=865i,fivethous=865i,tenthous=865i,odd=130i,even=131i,stringu1="HHAAAA",stringu2="KFHAAA",string4="AAAAxx" 421027200000000000 +tenk unique1=9361i,unique2=4873i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=361i,twothousand=1361i,fivethous=4361i,tenthous=9361i,odd=122i,even=123i,stringu1="BWAAAA",stringu2="LFHAAA",string4="HHHHxx" 421113600000000000 +tenk unique1=6338i,unique2=4874i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=338i,twothousand=338i,fivethous=1338i,tenthous=6338i,odd=76i,even=77i,stringu1="UJAAAA",stringu2="MFHAAA",string4="OOOOxx" 421200000000000000 +tenk unique1=7330i,unique2=4875i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=330i,twothousand=1330i,fivethous=2330i,tenthous=7330i,odd=60i,even=61i,stringu1="YVAAAA",stringu2="NFHAAA",string4="VVVVxx" 421286400000000000 +tenk unique1=513i,unique2=4876i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=513i,twothousand=513i,fivethous=513i,tenthous=513i,odd=26i,even=27i,stringu1="TTAAAA",stringu2="OFHAAA",string4="AAAAxx" 421372800000000000 +tenk unique1=5001i,unique2=4877i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1001i,fivethous=1i,tenthous=5001i,odd=2i,even=3i,stringu1="JKAAAA",stringu2="PFHAAA",string4="HHHHxx" 421459200000000000 +tenk unique1=549i,unique2=4878i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=549i,twothousand=549i,fivethous=549i,tenthous=549i,odd=98i,even=99i,stringu1="DVAAAA",stringu2="QFHAAA",string4="OOOOxx" 421545600000000000 +tenk unique1=1808i,unique2=4879i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=808i,twothousand=1808i,fivethous=1808i,tenthous=1808i,odd=16i,even=17i,stringu1="ORAAAA",stringu2="RFHAAA",string4="VVVVxx" 421632000000000000 +tenk unique1=7168i,unique2=4880i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=168i,twothousand=1168i,fivethous=2168i,tenthous=7168i,odd=136i,even=137i,stringu1="SPAAAA",stringu2="SFHAAA",string4="AAAAxx" 421718400000000000 +tenk unique1=9878i,unique2=4881i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=878i,twothousand=1878i,fivethous=4878i,tenthous=9878i,odd=156i,even=157i,stringu1="YPAAAA",stringu2="TFHAAA",string4="HHHHxx" 421804800000000000 +tenk unique1=233i,unique2=4882i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=233i,twothousand=233i,fivethous=233i,tenthous=233i,odd=66i,even=67i,stringu1="ZIAAAA",stringu2="UFHAAA",string4="OOOOxx" 421891200000000000 +tenk unique1=4262i,unique2=4883i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=262i,twothousand=262i,fivethous=4262i,tenthous=4262i,odd=124i,even=125i,stringu1="YHAAAA",stringu2="VFHAAA",string4="VVVVxx" 421977600000000000 +tenk unique1=7998i,unique2=4884i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=998i,twothousand=1998i,fivethous=2998i,tenthous=7998i,odd=196i,even=197i,stringu1="QVAAAA",stringu2="WFHAAA",string4="AAAAxx" 422064000000000000 +tenk unique1=2419i,unique2=4885i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=419i,twothousand=419i,fivethous=2419i,tenthous=2419i,odd=38i,even=39i,stringu1="BPAAAA",stringu2="XFHAAA",string4="HHHHxx" 422150400000000000 +tenk unique1=9960i,unique2=4886i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=960i,twothousand=1960i,fivethous=4960i,tenthous=9960i,odd=120i,even=121i,stringu1="CTAAAA",stringu2="YFHAAA",string4="OOOOxx" 422236800000000000 +tenk unique1=3523i,unique2=4887i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=523i,twothousand=1523i,fivethous=3523i,tenthous=3523i,odd=46i,even=47i,stringu1="NFAAAA",stringu2="ZFHAAA",string4="VVVVxx" 422323200000000000 +tenk unique1=5440i,unique2=4888i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=440i,twothousand=1440i,fivethous=440i,tenthous=5440i,odd=80i,even=81i,stringu1="GBAAAA",stringu2="AGHAAA",string4="AAAAxx" 422409600000000000 +tenk unique1=3030i,unique2=4889i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=30i,twothousand=1030i,fivethous=3030i,tenthous=3030i,odd=60i,even=61i,stringu1="OMAAAA",stringu2="BGHAAA",string4="HHHHxx" 422496000000000000 +tenk unique1=2745i,unique2=4890i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=745i,twothousand=745i,fivethous=2745i,tenthous=2745i,odd=90i,even=91i,stringu1="PBAAAA",stringu2="CGHAAA",string4="OOOOxx" 422582400000000000 +tenk unique1=7175i,unique2=4891i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=175i,twothousand=1175i,fivethous=2175i,tenthous=7175i,odd=150i,even=151i,stringu1="ZPAAAA",stringu2="DGHAAA",string4="VVVVxx" 422668800000000000 +tenk unique1=640i,unique2=4892i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=640i,twothousand=640i,fivethous=640i,tenthous=640i,odd=80i,even=81i,stringu1="QYAAAA",stringu2="EGHAAA",string4="AAAAxx" 422755200000000000 +tenk unique1=1798i,unique2=4893i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=798i,twothousand=1798i,fivethous=1798i,tenthous=1798i,odd=196i,even=197i,stringu1="ERAAAA",stringu2="FGHAAA",string4="HHHHxx" 422841600000000000 +tenk unique1=7499i,unique2=4894i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=499i,twothousand=1499i,fivethous=2499i,tenthous=7499i,odd=198i,even=199i,stringu1="LCAAAA",stringu2="GGHAAA",string4="OOOOxx" 422928000000000000 +tenk unique1=1924i,unique2=4895i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=924i,twothousand=1924i,fivethous=1924i,tenthous=1924i,odd=48i,even=49i,stringu1="AWAAAA",stringu2="HGHAAA",string4="VVVVxx" 423014400000000000 +tenk unique1=1327i,unique2=4896i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=327i,twothousand=1327i,fivethous=1327i,tenthous=1327i,odd=54i,even=55i,stringu1="BZAAAA",stringu2="IGHAAA",string4="AAAAxx" 423100800000000000 +tenk unique1=73i,unique2=4897i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=73i,twothousand=73i,fivethous=73i,tenthous=73i,odd=146i,even=147i,stringu1="VCAAAA",stringu2="JGHAAA",string4="HHHHxx" 423187200000000000 +tenk unique1=9558i,unique2=4898i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=558i,twothousand=1558i,fivethous=4558i,tenthous=9558i,odd=116i,even=117i,stringu1="QDAAAA",stringu2="KGHAAA",string4="OOOOxx" 423273600000000000 +tenk unique1=818i,unique2=4899i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=818i,twothousand=818i,fivethous=818i,tenthous=818i,odd=36i,even=37i,stringu1="MFAAAA",stringu2="LGHAAA",string4="VVVVxx" 423360000000000000 +tenk unique1=9916i,unique2=4900i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=916i,twothousand=1916i,fivethous=4916i,tenthous=9916i,odd=32i,even=33i,stringu1="KRAAAA",stringu2="MGHAAA",string4="AAAAxx" 423446400000000000 +tenk unique1=2978i,unique2=4901i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=978i,twothousand=978i,fivethous=2978i,tenthous=2978i,odd=156i,even=157i,stringu1="OKAAAA",stringu2="NGHAAA",string4="HHHHxx" 423532800000000000 +tenk unique1=8469i,unique2=4902i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=469i,twothousand=469i,fivethous=3469i,tenthous=8469i,odd=138i,even=139i,stringu1="TNAAAA",stringu2="OGHAAA",string4="OOOOxx" 423619200000000000 +tenk unique1=9845i,unique2=4903i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=845i,twothousand=1845i,fivethous=4845i,tenthous=9845i,odd=90i,even=91i,stringu1="ROAAAA",stringu2="PGHAAA",string4="VVVVxx" 423705600000000000 +tenk unique1=2326i,unique2=4904i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=326i,twothousand=326i,fivethous=2326i,tenthous=2326i,odd=52i,even=53i,stringu1="MLAAAA",stringu2="QGHAAA",string4="AAAAxx" 423792000000000000 +tenk unique1=4032i,unique2=4905i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=32i,twothousand=32i,fivethous=4032i,tenthous=4032i,odd=64i,even=65i,stringu1="CZAAAA",stringu2="RGHAAA",string4="HHHHxx" 423878400000000000 +tenk unique1=5604i,unique2=4906i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=604i,twothousand=1604i,fivethous=604i,tenthous=5604i,odd=8i,even=9i,stringu1="OHAAAA",stringu2="SGHAAA",string4="OOOOxx" 423964800000000000 +tenk unique1=9610i,unique2=4907i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=610i,twothousand=1610i,fivethous=4610i,tenthous=9610i,odd=20i,even=21i,stringu1="QFAAAA",stringu2="TGHAAA",string4="VVVVxx" 424051200000000000 +tenk unique1=5101i,unique2=4908i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=101i,twothousand=1101i,fivethous=101i,tenthous=5101i,odd=2i,even=3i,stringu1="FOAAAA",stringu2="UGHAAA",string4="AAAAxx" 424137600000000000 +tenk unique1=7246i,unique2=4909i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=246i,twothousand=1246i,fivethous=2246i,tenthous=7246i,odd=92i,even=93i,stringu1="SSAAAA",stringu2="VGHAAA",string4="HHHHxx" 424224000000000000 +tenk unique1=1292i,unique2=4910i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=292i,twothousand=1292i,fivethous=1292i,tenthous=1292i,odd=184i,even=185i,stringu1="SXAAAA",stringu2="WGHAAA",string4="OOOOxx" 424310400000000000 +tenk unique1=6235i,unique2=4911i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=235i,twothousand=235i,fivethous=1235i,tenthous=6235i,odd=70i,even=71i,stringu1="VFAAAA",stringu2="XGHAAA",string4="VVVVxx" 424396800000000000 +tenk unique1=1733i,unique2=4912i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=733i,twothousand=1733i,fivethous=1733i,tenthous=1733i,odd=66i,even=67i,stringu1="ROAAAA",stringu2="YGHAAA",string4="AAAAxx" 424483200000000000 +tenk unique1=4647i,unique2=4913i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=647i,twothousand=647i,fivethous=4647i,tenthous=4647i,odd=94i,even=95i,stringu1="TWAAAA",stringu2="ZGHAAA",string4="HHHHxx" 424569600000000000 +tenk unique1=258i,unique2=4914i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=258i,twothousand=258i,fivethous=258i,tenthous=258i,odd=116i,even=117i,stringu1="YJAAAA",stringu2="AHHAAA",string4="OOOOxx" 424656000000000000 +tenk unique1=8438i,unique2=4915i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=438i,twothousand=438i,fivethous=3438i,tenthous=8438i,odd=76i,even=77i,stringu1="OMAAAA",stringu2="BHHAAA",string4="VVVVxx" 424742400000000000 +tenk unique1=7869i,unique2=4916i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=869i,twothousand=1869i,fivethous=2869i,tenthous=7869i,odd=138i,even=139i,stringu1="RQAAAA",stringu2="CHHAAA",string4="AAAAxx" 424828800000000000 +tenk unique1=9691i,unique2=4917i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=691i,twothousand=1691i,fivethous=4691i,tenthous=9691i,odd=182i,even=183i,stringu1="TIAAAA",stringu2="DHHAAA",string4="HHHHxx" 424915200000000000 +tenk unique1=5422i,unique2=4918i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=422i,twothousand=1422i,fivethous=422i,tenthous=5422i,odd=44i,even=45i,stringu1="OAAAAA",stringu2="EHHAAA",string4="OOOOxx" 425001600000000000 +tenk unique1=9630i,unique2=4919i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=630i,twothousand=1630i,fivethous=4630i,tenthous=9630i,odd=60i,even=61i,stringu1="KGAAAA",stringu2="FHHAAA",string4="VVVVxx" 425088000000000000 +tenk unique1=4439i,unique2=4920i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=439i,twothousand=439i,fivethous=4439i,tenthous=4439i,odd=78i,even=79i,stringu1="TOAAAA",stringu2="GHHAAA",string4="AAAAxx" 425174400000000000 +tenk unique1=3140i,unique2=4921i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=140i,twothousand=1140i,fivethous=3140i,tenthous=3140i,odd=80i,even=81i,stringu1="UQAAAA",stringu2="HHHAAA",string4="HHHHxx" 425260800000000000 +tenk unique1=9111i,unique2=4922i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=111i,twothousand=1111i,fivethous=4111i,tenthous=9111i,odd=22i,even=23i,stringu1="LMAAAA",stringu2="IHHAAA",string4="OOOOxx" 425347200000000000 +tenk unique1=4606i,unique2=4923i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=606i,twothousand=606i,fivethous=4606i,tenthous=4606i,odd=12i,even=13i,stringu1="EVAAAA",stringu2="JHHAAA",string4="VVVVxx" 425433600000000000 +tenk unique1=8620i,unique2=4924i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=620i,twothousand=620i,fivethous=3620i,tenthous=8620i,odd=40i,even=41i,stringu1="OTAAAA",stringu2="KHHAAA",string4="AAAAxx" 425520000000000000 +tenk unique1=7849i,unique2=4925i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=849i,twothousand=1849i,fivethous=2849i,tenthous=7849i,odd=98i,even=99i,stringu1="XPAAAA",stringu2="LHHAAA",string4="HHHHxx" 425606400000000000 +tenk unique1=346i,unique2=4926i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=346i,twothousand=346i,fivethous=346i,tenthous=346i,odd=92i,even=93i,stringu1="INAAAA",stringu2="MHHAAA",string4="OOOOxx" 425692800000000000 +tenk unique1=9528i,unique2=4927i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=528i,twothousand=1528i,fivethous=4528i,tenthous=9528i,odd=56i,even=57i,stringu1="MCAAAA",stringu2="NHHAAA",string4="VVVVxx" 425779200000000000 +tenk unique1=1811i,unique2=4928i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=811i,twothousand=1811i,fivethous=1811i,tenthous=1811i,odd=22i,even=23i,stringu1="RRAAAA",stringu2="OHHAAA",string4="AAAAxx" 425865600000000000 +tenk unique1=6068i,unique2=4929i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=68i,twothousand=68i,fivethous=1068i,tenthous=6068i,odd=136i,even=137i,stringu1="KZAAAA",stringu2="PHHAAA",string4="HHHHxx" 425952000000000000 +tenk unique1=6260i,unique2=4930i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=260i,twothousand=260i,fivethous=1260i,tenthous=6260i,odd=120i,even=121i,stringu1="UGAAAA",stringu2="QHHAAA",string4="OOOOxx" 426038400000000000 +tenk unique1=5909i,unique2=4931i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=909i,twothousand=1909i,fivethous=909i,tenthous=5909i,odd=18i,even=19i,stringu1="HTAAAA",stringu2="RHHAAA",string4="VVVVxx" 426124800000000000 +tenk unique1=4518i,unique2=4932i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=518i,twothousand=518i,fivethous=4518i,tenthous=4518i,odd=36i,even=37i,stringu1="URAAAA",stringu2="SHHAAA",string4="AAAAxx" 426211200000000000 +tenk unique1=7530i,unique2=4933i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=530i,twothousand=1530i,fivethous=2530i,tenthous=7530i,odd=60i,even=61i,stringu1="QDAAAA",stringu2="THHAAA",string4="HHHHxx" 426297600000000000 +tenk unique1=3900i,unique2=4934i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=900i,twothousand=1900i,fivethous=3900i,tenthous=3900i,odd=0i,even=1i,stringu1="AUAAAA",stringu2="UHHAAA",string4="OOOOxx" 426384000000000000 +tenk unique1=3969i,unique2=4935i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=969i,twothousand=1969i,fivethous=3969i,tenthous=3969i,odd=138i,even=139i,stringu1="RWAAAA",stringu2="VHHAAA",string4="VVVVxx" 426470400000000000 +tenk unique1=8690i,unique2=4936i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=690i,twothousand=690i,fivethous=3690i,tenthous=8690i,odd=180i,even=181i,stringu1="GWAAAA",stringu2="WHHAAA",string4="AAAAxx" 426556800000000000 +tenk unique1=5532i,unique2=4937i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=532i,twothousand=1532i,fivethous=532i,tenthous=5532i,odd=64i,even=65i,stringu1="UEAAAA",stringu2="XHHAAA",string4="HHHHxx" 426643200000000000 +tenk unique1=5989i,unique2=4938i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=989i,twothousand=1989i,fivethous=989i,tenthous=5989i,odd=178i,even=179i,stringu1="JWAAAA",stringu2="YHHAAA",string4="OOOOxx" 426729600000000000 +tenk unique1=1870i,unique2=4939i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=870i,twothousand=1870i,fivethous=1870i,tenthous=1870i,odd=140i,even=141i,stringu1="YTAAAA",stringu2="ZHHAAA",string4="VVVVxx" 426816000000000000 +tenk unique1=1113i,unique2=4940i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=113i,twothousand=1113i,fivethous=1113i,tenthous=1113i,odd=26i,even=27i,stringu1="VQAAAA",stringu2="AIHAAA",string4="AAAAxx" 426902400000000000 +tenk unique1=5155i,unique2=4941i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=155i,twothousand=1155i,fivethous=155i,tenthous=5155i,odd=110i,even=111i,stringu1="HQAAAA",stringu2="BIHAAA",string4="HHHHxx" 426988800000000000 +tenk unique1=7460i,unique2=4942i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=460i,twothousand=1460i,fivethous=2460i,tenthous=7460i,odd=120i,even=121i,stringu1="YAAAAA",stringu2="CIHAAA",string4="OOOOxx" 427075200000000000 +tenk unique1=6217i,unique2=4943i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=217i,twothousand=217i,fivethous=1217i,tenthous=6217i,odd=34i,even=35i,stringu1="DFAAAA",stringu2="DIHAAA",string4="VVVVxx" 427161600000000000 +tenk unique1=8333i,unique2=4944i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=333i,twothousand=333i,fivethous=3333i,tenthous=8333i,odd=66i,even=67i,stringu1="NIAAAA",stringu2="EIHAAA",string4="AAAAxx" 427248000000000000 +tenk unique1=6341i,unique2=4945i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=341i,twothousand=341i,fivethous=1341i,tenthous=6341i,odd=82i,even=83i,stringu1="XJAAAA",stringu2="FIHAAA",string4="HHHHxx" 427334400000000000 +tenk unique1=6230i,unique2=4946i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=230i,twothousand=230i,fivethous=1230i,tenthous=6230i,odd=60i,even=61i,stringu1="QFAAAA",stringu2="GIHAAA",string4="OOOOxx" 427420800000000000 +tenk unique1=6902i,unique2=4947i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=902i,twothousand=902i,fivethous=1902i,tenthous=6902i,odd=4i,even=5i,stringu1="MFAAAA",stringu2="HIHAAA",string4="VVVVxx" 427507200000000000 +tenk unique1=670i,unique2=4948i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=670i,twothousand=670i,fivethous=670i,tenthous=670i,odd=140i,even=141i,stringu1="UZAAAA",stringu2="IIHAAA",string4="AAAAxx" 427593600000000000 +tenk unique1=805i,unique2=4949i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=805i,twothousand=805i,fivethous=805i,tenthous=805i,odd=10i,even=11i,stringu1="ZEAAAA",stringu2="JIHAAA",string4="HHHHxx" 427680000000000000 +tenk unique1=1340i,unique2=4950i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=340i,twothousand=1340i,fivethous=1340i,tenthous=1340i,odd=80i,even=81i,stringu1="OZAAAA",stringu2="KIHAAA",string4="OOOOxx" 427766400000000000 +tenk unique1=8649i,unique2=4951i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=649i,twothousand=649i,fivethous=3649i,tenthous=8649i,odd=98i,even=99i,stringu1="RUAAAA",stringu2="LIHAAA",string4="VVVVxx" 427852800000000000 +tenk unique1=3887i,unique2=4952i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=887i,twothousand=1887i,fivethous=3887i,tenthous=3887i,odd=174i,even=175i,stringu1="NTAAAA",stringu2="MIHAAA",string4="AAAAxx" 427939200000000000 +tenk unique1=5400i,unique2=4953i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=400i,twothousand=1400i,fivethous=400i,tenthous=5400i,odd=0i,even=1i,stringu1="SZAAAA",stringu2="NIHAAA",string4="HHHHxx" 428025600000000000 +tenk unique1=4354i,unique2=4954i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=354i,twothousand=354i,fivethous=4354i,tenthous=4354i,odd=108i,even=109i,stringu1="MLAAAA",stringu2="OIHAAA",string4="OOOOxx" 428112000000000000 +tenk unique1=950i,unique2=4955i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=950i,twothousand=950i,fivethous=950i,tenthous=950i,odd=100i,even=101i,stringu1="OKAAAA",stringu2="PIHAAA",string4="VVVVxx" 428198400000000000 +tenk unique1=1544i,unique2=4956i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=544i,twothousand=1544i,fivethous=1544i,tenthous=1544i,odd=88i,even=89i,stringu1="KHAAAA",stringu2="QIHAAA",string4="AAAAxx" 428284800000000000 +tenk unique1=3898i,unique2=4957i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=898i,twothousand=1898i,fivethous=3898i,tenthous=3898i,odd=196i,even=197i,stringu1="YTAAAA",stringu2="RIHAAA",string4="HHHHxx" 428371200000000000 +tenk unique1=8038i,unique2=4958i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=38i,twothousand=38i,fivethous=3038i,tenthous=8038i,odd=76i,even=77i,stringu1="EXAAAA",stringu2="SIHAAA",string4="OOOOxx" 428457600000000000 +tenk unique1=1095i,unique2=4959i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=95i,twothousand=1095i,fivethous=1095i,tenthous=1095i,odd=190i,even=191i,stringu1="DQAAAA",stringu2="TIHAAA",string4="VVVVxx" 428544000000000000 +tenk unique1=1748i,unique2=4960i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=748i,twothousand=1748i,fivethous=1748i,tenthous=1748i,odd=96i,even=97i,stringu1="GPAAAA",stringu2="UIHAAA",string4="AAAAxx" 428630400000000000 +tenk unique1=9154i,unique2=4961i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=154i,twothousand=1154i,fivethous=4154i,tenthous=9154i,odd=108i,even=109i,stringu1="COAAAA",stringu2="VIHAAA",string4="HHHHxx" 428716800000000000 +tenk unique1=2182i,unique2=4962i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=182i,twothousand=182i,fivethous=2182i,tenthous=2182i,odd=164i,even=165i,stringu1="YFAAAA",stringu2="WIHAAA",string4="OOOOxx" 428803200000000000 +tenk unique1=6797i,unique2=4963i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=797i,twothousand=797i,fivethous=1797i,tenthous=6797i,odd=194i,even=195i,stringu1="LBAAAA",stringu2="XIHAAA",string4="VVVVxx" 428889600000000000 +tenk unique1=9149i,unique2=4964i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=149i,twothousand=1149i,fivethous=4149i,tenthous=9149i,odd=98i,even=99i,stringu1="XNAAAA",stringu2="YIHAAA",string4="AAAAxx" 428976000000000000 +tenk unique1=7351i,unique2=4965i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=351i,twothousand=1351i,fivethous=2351i,tenthous=7351i,odd=102i,even=103i,stringu1="TWAAAA",stringu2="ZIHAAA",string4="HHHHxx" 429062400000000000 +tenk unique1=2820i,unique2=4966i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=820i,twothousand=820i,fivethous=2820i,tenthous=2820i,odd=40i,even=41i,stringu1="MEAAAA",stringu2="AJHAAA",string4="OOOOxx" 429148800000000000 +tenk unique1=9696i,unique2=4967i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=696i,twothousand=1696i,fivethous=4696i,tenthous=9696i,odd=192i,even=193i,stringu1="YIAAAA",stringu2="BJHAAA",string4="VVVVxx" 429235200000000000 +tenk unique1=253i,unique2=4968i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=253i,twothousand=253i,fivethous=253i,tenthous=253i,odd=106i,even=107i,stringu1="TJAAAA",stringu2="CJHAAA",string4="AAAAxx" 429321600000000000 +tenk unique1=3600i,unique2=4969i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=600i,twothousand=1600i,fivethous=3600i,tenthous=3600i,odd=0i,even=1i,stringu1="MIAAAA",stringu2="DJHAAA",string4="HHHHxx" 429408000000000000 +tenk unique1=3892i,unique2=4970i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=892i,twothousand=1892i,fivethous=3892i,tenthous=3892i,odd=184i,even=185i,stringu1="STAAAA",stringu2="EJHAAA",string4="OOOOxx" 429494400000000000 +tenk unique1=231i,unique2=4971i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=231i,twothousand=231i,fivethous=231i,tenthous=231i,odd=62i,even=63i,stringu1="XIAAAA",stringu2="FJHAAA",string4="VVVVxx" 429580800000000000 +tenk unique1=8331i,unique2=4972i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=331i,twothousand=331i,fivethous=3331i,tenthous=8331i,odd=62i,even=63i,stringu1="LIAAAA",stringu2="GJHAAA",string4="AAAAxx" 429667200000000000 +tenk unique1=403i,unique2=4973i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=403i,twothousand=403i,fivethous=403i,tenthous=403i,odd=6i,even=7i,stringu1="NPAAAA",stringu2="HJHAAA",string4="HHHHxx" 429753600000000000 +tenk unique1=8642i,unique2=4974i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=642i,twothousand=642i,fivethous=3642i,tenthous=8642i,odd=84i,even=85i,stringu1="KUAAAA",stringu2="IJHAAA",string4="OOOOxx" 429840000000000000 +tenk unique1=3118i,unique2=4975i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=118i,twothousand=1118i,fivethous=3118i,tenthous=3118i,odd=36i,even=37i,stringu1="YPAAAA",stringu2="JJHAAA",string4="VVVVxx" 429926400000000000 +tenk unique1=3835i,unique2=4976i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=835i,twothousand=1835i,fivethous=3835i,tenthous=3835i,odd=70i,even=71i,stringu1="NRAAAA",stringu2="KJHAAA",string4="AAAAxx" 430012800000000000 +tenk unique1=1117i,unique2=4977i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=117i,twothousand=1117i,fivethous=1117i,tenthous=1117i,odd=34i,even=35i,stringu1="ZQAAAA",stringu2="LJHAAA",string4="HHHHxx" 430099200000000000 +tenk unique1=7024i,unique2=4978i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=24i,twothousand=1024i,fivethous=2024i,tenthous=7024i,odd=48i,even=49i,stringu1="EKAAAA",stringu2="MJHAAA",string4="OOOOxx" 430185600000000000 +tenk unique1=2636i,unique2=4979i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=636i,twothousand=636i,fivethous=2636i,tenthous=2636i,odd=72i,even=73i,stringu1="KXAAAA",stringu2="NJHAAA",string4="VVVVxx" 430272000000000000 +tenk unique1=3778i,unique2=4980i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=778i,twothousand=1778i,fivethous=3778i,tenthous=3778i,odd=156i,even=157i,stringu1="IPAAAA",stringu2="OJHAAA",string4="AAAAxx" 430358400000000000 +tenk unique1=2003i,unique2=4981i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=3i,fivethous=2003i,tenthous=2003i,odd=6i,even=7i,stringu1="BZAAAA",stringu2="PJHAAA",string4="HHHHxx" 430444800000000000 +tenk unique1=5717i,unique2=4982i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=717i,twothousand=1717i,fivethous=717i,tenthous=5717i,odd=34i,even=35i,stringu1="XLAAAA",stringu2="QJHAAA",string4="OOOOxx" 430531200000000000 +tenk unique1=4869i,unique2=4983i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=869i,twothousand=869i,fivethous=4869i,tenthous=4869i,odd=138i,even=139i,stringu1="HFAAAA",stringu2="RJHAAA",string4="VVVVxx" 430617600000000000 +tenk unique1=8921i,unique2=4984i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=921i,twothousand=921i,fivethous=3921i,tenthous=8921i,odd=42i,even=43i,stringu1="DFAAAA",stringu2="SJHAAA",string4="AAAAxx" 430704000000000000 +tenk unique1=888i,unique2=4985i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=888i,twothousand=888i,fivethous=888i,tenthous=888i,odd=176i,even=177i,stringu1="EIAAAA",stringu2="TJHAAA",string4="HHHHxx" 430790400000000000 +tenk unique1=7599i,unique2=4986i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=599i,twothousand=1599i,fivethous=2599i,tenthous=7599i,odd=198i,even=199i,stringu1="HGAAAA",stringu2="UJHAAA",string4="OOOOxx" 430876800000000000 +tenk unique1=8621i,unique2=4987i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=621i,twothousand=621i,fivethous=3621i,tenthous=8621i,odd=42i,even=43i,stringu1="PTAAAA",stringu2="VJHAAA",string4="VVVVxx" 430963200000000000 +tenk unique1=811i,unique2=4988i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=811i,twothousand=811i,fivethous=811i,tenthous=811i,odd=22i,even=23i,stringu1="FFAAAA",stringu2="WJHAAA",string4="AAAAxx" 431049600000000000 +tenk unique1=9147i,unique2=4989i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=147i,twothousand=1147i,fivethous=4147i,tenthous=9147i,odd=94i,even=95i,stringu1="VNAAAA",stringu2="XJHAAA",string4="HHHHxx" 431136000000000000 +tenk unique1=1413i,unique2=4990i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=413i,twothousand=1413i,fivethous=1413i,tenthous=1413i,odd=26i,even=27i,stringu1="JCAAAA",stringu2="YJHAAA",string4="OOOOxx" 431222400000000000 +tenk unique1=5232i,unique2=4991i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=232i,twothousand=1232i,fivethous=232i,tenthous=5232i,odd=64i,even=65i,stringu1="GTAAAA",stringu2="ZJHAAA",string4="VVVVxx" 431308800000000000 +tenk unique1=5912i,unique2=4992i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=912i,twothousand=1912i,fivethous=912i,tenthous=5912i,odd=24i,even=25i,stringu1="KTAAAA",stringu2="AKHAAA",string4="AAAAxx" 431395200000000000 +tenk unique1=3418i,unique2=4993i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=418i,twothousand=1418i,fivethous=3418i,tenthous=3418i,odd=36i,even=37i,stringu1="MBAAAA",stringu2="BKHAAA",string4="HHHHxx" 431481600000000000 +tenk unique1=3912i,unique2=4994i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=912i,twothousand=1912i,fivethous=3912i,tenthous=3912i,odd=24i,even=25i,stringu1="MUAAAA",stringu2="CKHAAA",string4="OOOOxx" 431568000000000000 +tenk unique1=9576i,unique2=4995i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=576i,twothousand=1576i,fivethous=4576i,tenthous=9576i,odd=152i,even=153i,stringu1="IEAAAA",stringu2="DKHAAA",string4="VVVVxx" 431654400000000000 +tenk unique1=4225i,unique2=4996i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=225i,twothousand=225i,fivethous=4225i,tenthous=4225i,odd=50i,even=51i,stringu1="NGAAAA",stringu2="EKHAAA",string4="AAAAxx" 431740800000000000 +tenk unique1=8222i,unique2=4997i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=222i,twothousand=222i,fivethous=3222i,tenthous=8222i,odd=44i,even=45i,stringu1="GEAAAA",stringu2="FKHAAA",string4="HHHHxx" 431827200000000000 +tenk unique1=7013i,unique2=4998i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=13i,twothousand=1013i,fivethous=2013i,tenthous=7013i,odd=26i,even=27i,stringu1="TJAAAA",stringu2="GKHAAA",string4="OOOOxx" 431913600000000000 +tenk unique1=7037i,unique2=4999i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=37i,twothousand=1037i,fivethous=2037i,tenthous=7037i,odd=74i,even=75i,stringu1="RKAAAA",stringu2="HKHAAA",string4="VVVVxx" 432000000000000000 +tenk unique1=1205i,unique2=5000i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=205i,twothousand=1205i,fivethous=1205i,tenthous=1205i,odd=10i,even=11i,stringu1="JUAAAA",stringu2="IKHAAA",string4="AAAAxx" 432086400000000000 +tenk unique1=8114i,unique2=5001i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=114i,twothousand=114i,fivethous=3114i,tenthous=8114i,odd=28i,even=29i,stringu1="CAAAAA",stringu2="JKHAAA",string4="HHHHxx" 432172800000000000 +tenk unique1=6585i,unique2=5002i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=585i,twothousand=585i,fivethous=1585i,tenthous=6585i,odd=170i,even=171i,stringu1="HTAAAA",stringu2="KKHAAA",string4="OOOOxx" 432259200000000000 +tenk unique1=155i,unique2=5003i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=155i,twothousand=155i,fivethous=155i,tenthous=155i,odd=110i,even=111i,stringu1="ZFAAAA",stringu2="LKHAAA",string4="VVVVxx" 432345600000000000 +tenk unique1=2841i,unique2=5004i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=841i,twothousand=841i,fivethous=2841i,tenthous=2841i,odd=82i,even=83i,stringu1="HFAAAA",stringu2="MKHAAA",string4="AAAAxx" 432432000000000000 +tenk unique1=1996i,unique2=5005i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=996i,twothousand=1996i,fivethous=1996i,tenthous=1996i,odd=192i,even=193i,stringu1="UYAAAA",stringu2="NKHAAA",string4="HHHHxx" 432518400000000000 +tenk unique1=4948i,unique2=5006i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=948i,twothousand=948i,fivethous=4948i,tenthous=4948i,odd=96i,even=97i,stringu1="IIAAAA",stringu2="OKHAAA",string4="OOOOxx" 432604800000000000 +tenk unique1=3304i,unique2=5007i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=304i,twothousand=1304i,fivethous=3304i,tenthous=3304i,odd=8i,even=9i,stringu1="CXAAAA",stringu2="PKHAAA",string4="VVVVxx" 432691200000000000 +tenk unique1=5684i,unique2=5008i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=684i,twothousand=1684i,fivethous=684i,tenthous=5684i,odd=168i,even=169i,stringu1="QKAAAA",stringu2="QKHAAA",string4="AAAAxx" 432777600000000000 +tenk unique1=6962i,unique2=5009i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=962i,twothousand=962i,fivethous=1962i,tenthous=6962i,odd=124i,even=125i,stringu1="UHAAAA",stringu2="RKHAAA",string4="HHHHxx" 432864000000000000 +tenk unique1=8691i,unique2=5010i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=691i,twothousand=691i,fivethous=3691i,tenthous=8691i,odd=182i,even=183i,stringu1="HWAAAA",stringu2="SKHAAA",string4="OOOOxx" 432950400000000000 +tenk unique1=8501i,unique2=5011i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=501i,twothousand=501i,fivethous=3501i,tenthous=8501i,odd=2i,even=3i,stringu1="ZOAAAA",stringu2="TKHAAA",string4="VVVVxx" 433036800000000000 +tenk unique1=4783i,unique2=5012i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=783i,twothousand=783i,fivethous=4783i,tenthous=4783i,odd=166i,even=167i,stringu1="ZBAAAA",stringu2="UKHAAA",string4="AAAAxx" 433123200000000000 +tenk unique1=3762i,unique2=5013i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=762i,twothousand=1762i,fivethous=3762i,tenthous=3762i,odd=124i,even=125i,stringu1="SOAAAA",stringu2="VKHAAA",string4="HHHHxx" 433209600000000000 +tenk unique1=4534i,unique2=5014i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=534i,twothousand=534i,fivethous=4534i,tenthous=4534i,odd=68i,even=69i,stringu1="KSAAAA",stringu2="WKHAAA",string4="OOOOxx" 433296000000000000 +tenk unique1=4999i,unique2=5015i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=999i,twothousand=999i,fivethous=4999i,tenthous=4999i,odd=198i,even=199i,stringu1="HKAAAA",stringu2="XKHAAA",string4="VVVVxx" 433382400000000000 +tenk unique1=4618i,unique2=5016i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=618i,twothousand=618i,fivethous=4618i,tenthous=4618i,odd=36i,even=37i,stringu1="QVAAAA",stringu2="YKHAAA",string4="AAAAxx" 433468800000000000 +tenk unique1=4220i,unique2=5017i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=220i,twothousand=220i,fivethous=4220i,tenthous=4220i,odd=40i,even=41i,stringu1="IGAAAA",stringu2="ZKHAAA",string4="HHHHxx" 433555200000000000 +tenk unique1=3384i,unique2=5018i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=384i,twothousand=1384i,fivethous=3384i,tenthous=3384i,odd=168i,even=169i,stringu1="EAAAAA",stringu2="ALHAAA",string4="OOOOxx" 433641600000000000 +tenk unique1=3036i,unique2=5019i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=36i,twothousand=1036i,fivethous=3036i,tenthous=3036i,odd=72i,even=73i,stringu1="UMAAAA",stringu2="BLHAAA",string4="VVVVxx" 433728000000000000 +tenk unique1=545i,unique2=5020i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=545i,twothousand=545i,fivethous=545i,tenthous=545i,odd=90i,even=91i,stringu1="ZUAAAA",stringu2="CLHAAA",string4="AAAAxx" 433814400000000000 +tenk unique1=9946i,unique2=5021i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=946i,twothousand=1946i,fivethous=4946i,tenthous=9946i,odd=92i,even=93i,stringu1="OSAAAA",stringu2="DLHAAA",string4="HHHHxx" 433900800000000000 +tenk unique1=1985i,unique2=5022i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=985i,twothousand=1985i,fivethous=1985i,tenthous=1985i,odd=170i,even=171i,stringu1="JYAAAA",stringu2="ELHAAA",string4="OOOOxx" 433987200000000000 +tenk unique1=2310i,unique2=5023i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=310i,twothousand=310i,fivethous=2310i,tenthous=2310i,odd=20i,even=21i,stringu1="WKAAAA",stringu2="FLHAAA",string4="VVVVxx" 434073600000000000 +tenk unique1=6563i,unique2=5024i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=563i,twothousand=563i,fivethous=1563i,tenthous=6563i,odd=126i,even=127i,stringu1="LSAAAA",stringu2="GLHAAA",string4="AAAAxx" 434160000000000000 +tenk unique1=4886i,unique2=5025i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=886i,twothousand=886i,fivethous=4886i,tenthous=4886i,odd=172i,even=173i,stringu1="YFAAAA",stringu2="HLHAAA",string4="HHHHxx" 434246400000000000 +tenk unique1=9359i,unique2=5026i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=359i,twothousand=1359i,fivethous=4359i,tenthous=9359i,odd=118i,even=119i,stringu1="ZVAAAA",stringu2="ILHAAA",string4="OOOOxx" 434332800000000000 +tenk unique1=400i,unique2=5027i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=400i,twothousand=400i,fivethous=400i,tenthous=400i,odd=0i,even=1i,stringu1="KPAAAA",stringu2="JLHAAA",string4="VVVVxx" 434419200000000000 +tenk unique1=9742i,unique2=5028i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=742i,twothousand=1742i,fivethous=4742i,tenthous=9742i,odd=84i,even=85i,stringu1="SKAAAA",stringu2="KLHAAA",string4="AAAAxx" 434505600000000000 +tenk unique1=6736i,unique2=5029i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=736i,twothousand=736i,fivethous=1736i,tenthous=6736i,odd=72i,even=73i,stringu1="CZAAAA",stringu2="LLHAAA",string4="HHHHxx" 434592000000000000 +tenk unique1=8166i,unique2=5030i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=166i,twothousand=166i,fivethous=3166i,tenthous=8166i,odd=132i,even=133i,stringu1="CCAAAA",stringu2="MLHAAA",string4="OOOOxx" 434678400000000000 +tenk unique1=861i,unique2=5031i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=861i,twothousand=861i,fivethous=861i,tenthous=861i,odd=122i,even=123i,stringu1="DHAAAA",stringu2="NLHAAA",string4="VVVVxx" 434764800000000000 +tenk unique1=7492i,unique2=5032i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=492i,twothousand=1492i,fivethous=2492i,tenthous=7492i,odd=184i,even=185i,stringu1="ECAAAA",stringu2="OLHAAA",string4="AAAAxx" 434851200000000000 +tenk unique1=1155i,unique2=5033i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=155i,twothousand=1155i,fivethous=1155i,tenthous=1155i,odd=110i,even=111i,stringu1="LSAAAA",stringu2="PLHAAA",string4="HHHHxx" 434937600000000000 +tenk unique1=9769i,unique2=5034i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=769i,twothousand=1769i,fivethous=4769i,tenthous=9769i,odd=138i,even=139i,stringu1="TLAAAA",stringu2="QLHAAA",string4="OOOOxx" 435024000000000000 +tenk unique1=6843i,unique2=5035i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=843i,twothousand=843i,fivethous=1843i,tenthous=6843i,odd=86i,even=87i,stringu1="FDAAAA",stringu2="RLHAAA",string4="VVVVxx" 435110400000000000 +tenk unique1=5625i,unique2=5036i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=625i,twothousand=1625i,fivethous=625i,tenthous=5625i,odd=50i,even=51i,stringu1="JIAAAA",stringu2="SLHAAA",string4="AAAAxx" 435196800000000000 +tenk unique1=1910i,unique2=5037i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=910i,twothousand=1910i,fivethous=1910i,tenthous=1910i,odd=20i,even=21i,stringu1="MVAAAA",stringu2="TLHAAA",string4="HHHHxx" 435283200000000000 +tenk unique1=9796i,unique2=5038i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=796i,twothousand=1796i,fivethous=4796i,tenthous=9796i,odd=192i,even=193i,stringu1="UMAAAA",stringu2="ULHAAA",string4="OOOOxx" 435369600000000000 +tenk unique1=6950i,unique2=5039i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=950i,twothousand=950i,fivethous=1950i,tenthous=6950i,odd=100i,even=101i,stringu1="IHAAAA",stringu2="VLHAAA",string4="VVVVxx" 435456000000000000 +tenk unique1=3084i,unique2=5040i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=84i,twothousand=1084i,fivethous=3084i,tenthous=3084i,odd=168i,even=169i,stringu1="QOAAAA",stringu2="WLHAAA",string4="AAAAxx" 435542400000000000 +tenk unique1=2959i,unique2=5041i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=959i,twothousand=959i,fivethous=2959i,tenthous=2959i,odd=118i,even=119i,stringu1="VJAAAA",stringu2="XLHAAA",string4="HHHHxx" 435628800000000000 +tenk unique1=2093i,unique2=5042i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=93i,twothousand=93i,fivethous=2093i,tenthous=2093i,odd=186i,even=187i,stringu1="NCAAAA",stringu2="YLHAAA",string4="OOOOxx" 435715200000000000 +tenk unique1=2738i,unique2=5043i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=738i,twothousand=738i,fivethous=2738i,tenthous=2738i,odd=76i,even=77i,stringu1="IBAAAA",stringu2="ZLHAAA",string4="VVVVxx" 435801600000000000 +tenk unique1=6406i,unique2=5044i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=406i,twothousand=406i,fivethous=1406i,tenthous=6406i,odd=12i,even=13i,stringu1="KMAAAA",stringu2="AMHAAA",string4="AAAAxx" 435888000000000000 +tenk unique1=9082i,unique2=5045i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=82i,twothousand=1082i,fivethous=4082i,tenthous=9082i,odd=164i,even=165i,stringu1="ILAAAA",stringu2="BMHAAA",string4="HHHHxx" 435974400000000000 +tenk unique1=8568i,unique2=5046i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=568i,twothousand=568i,fivethous=3568i,tenthous=8568i,odd=136i,even=137i,stringu1="ORAAAA",stringu2="CMHAAA",string4="OOOOxx" 436060800000000000 +tenk unique1=3566i,unique2=5047i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=566i,twothousand=1566i,fivethous=3566i,tenthous=3566i,odd=132i,even=133i,stringu1="EHAAAA",stringu2="DMHAAA",string4="VVVVxx" 436147200000000000 +tenk unique1=3016i,unique2=5048i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=16i,twothousand=1016i,fivethous=3016i,tenthous=3016i,odd=32i,even=33i,stringu1="AMAAAA",stringu2="EMHAAA",string4="AAAAxx" 436233600000000000 +tenk unique1=1207i,unique2=5049i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=207i,twothousand=1207i,fivethous=1207i,tenthous=1207i,odd=14i,even=15i,stringu1="LUAAAA",stringu2="FMHAAA",string4="HHHHxx" 436320000000000000 +tenk unique1=4045i,unique2=5050i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=45i,twothousand=45i,fivethous=4045i,tenthous=4045i,odd=90i,even=91i,stringu1="PZAAAA",stringu2="GMHAAA",string4="OOOOxx" 436406400000000000 +tenk unique1=4173i,unique2=5051i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=173i,twothousand=173i,fivethous=4173i,tenthous=4173i,odd=146i,even=147i,stringu1="NEAAAA",stringu2="HMHAAA",string4="VVVVxx" 436492800000000000 +tenk unique1=3939i,unique2=5052i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=939i,twothousand=1939i,fivethous=3939i,tenthous=3939i,odd=78i,even=79i,stringu1="NVAAAA",stringu2="IMHAAA",string4="AAAAxx" 436579200000000000 +tenk unique1=9683i,unique2=5053i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=683i,twothousand=1683i,fivethous=4683i,tenthous=9683i,odd=166i,even=167i,stringu1="LIAAAA",stringu2="JMHAAA",string4="HHHHxx" 436665600000000000 +tenk unique1=1684i,unique2=5054i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=684i,twothousand=1684i,fivethous=1684i,tenthous=1684i,odd=168i,even=169i,stringu1="UMAAAA",stringu2="KMHAAA",string4="OOOOxx" 436752000000000000 +tenk unique1=9271i,unique2=5055i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=271i,twothousand=1271i,fivethous=4271i,tenthous=9271i,odd=142i,even=143i,stringu1="PSAAAA",stringu2="LMHAAA",string4="VVVVxx" 436838400000000000 +tenk unique1=9317i,unique2=5056i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=317i,twothousand=1317i,fivethous=4317i,tenthous=9317i,odd=34i,even=35i,stringu1="JUAAAA",stringu2="MMHAAA",string4="AAAAxx" 436924800000000000 +tenk unique1=5793i,unique2=5057i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=793i,twothousand=1793i,fivethous=793i,tenthous=5793i,odd=186i,even=187i,stringu1="VOAAAA",stringu2="NMHAAA",string4="HHHHxx" 437011200000000000 +tenk unique1=352i,unique2=5058i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=352i,twothousand=352i,fivethous=352i,tenthous=352i,odd=104i,even=105i,stringu1="ONAAAA",stringu2="OMHAAA",string4="OOOOxx" 437097600000000000 +tenk unique1=7328i,unique2=5059i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=328i,twothousand=1328i,fivethous=2328i,tenthous=7328i,odd=56i,even=57i,stringu1="WVAAAA",stringu2="PMHAAA",string4="VVVVxx" 437184000000000000 +tenk unique1=4582i,unique2=5060i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=582i,twothousand=582i,fivethous=4582i,tenthous=4582i,odd=164i,even=165i,stringu1="GUAAAA",stringu2="QMHAAA",string4="AAAAxx" 437270400000000000 +tenk unique1=7413i,unique2=5061i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=413i,twothousand=1413i,fivethous=2413i,tenthous=7413i,odd=26i,even=27i,stringu1="DZAAAA",stringu2="RMHAAA",string4="HHHHxx" 437356800000000000 +tenk unique1=6772i,unique2=5062i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=772i,twothousand=772i,fivethous=1772i,tenthous=6772i,odd=144i,even=145i,stringu1="MAAAAA",stringu2="SMHAAA",string4="OOOOxx" 437443200000000000 +tenk unique1=4973i,unique2=5063i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=973i,twothousand=973i,fivethous=4973i,tenthous=4973i,odd=146i,even=147i,stringu1="HJAAAA",stringu2="TMHAAA",string4="VVVVxx" 437529600000000000 +tenk unique1=7480i,unique2=5064i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=480i,twothousand=1480i,fivethous=2480i,tenthous=7480i,odd=160i,even=161i,stringu1="SBAAAA",stringu2="UMHAAA",string4="AAAAxx" 437616000000000000 +tenk unique1=5555i,unique2=5065i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=555i,twothousand=1555i,fivethous=555i,tenthous=5555i,odd=110i,even=111i,stringu1="RFAAAA",stringu2="VMHAAA",string4="HHHHxx" 437702400000000000 +tenk unique1=4227i,unique2=5066i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=227i,twothousand=227i,fivethous=4227i,tenthous=4227i,odd=54i,even=55i,stringu1="PGAAAA",stringu2="WMHAAA",string4="OOOOxx" 437788800000000000 +tenk unique1=4153i,unique2=5067i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=153i,twothousand=153i,fivethous=4153i,tenthous=4153i,odd=106i,even=107i,stringu1="TDAAAA",stringu2="XMHAAA",string4="VVVVxx" 437875200000000000 +tenk unique1=4601i,unique2=5068i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=601i,twothousand=601i,fivethous=4601i,tenthous=4601i,odd=2i,even=3i,stringu1="ZUAAAA",stringu2="YMHAAA",string4="AAAAxx" 437961600000000000 +tenk unique1=3782i,unique2=5069i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=782i,twothousand=1782i,fivethous=3782i,tenthous=3782i,odd=164i,even=165i,stringu1="MPAAAA",stringu2="ZMHAAA",string4="HHHHxx" 438048000000000000 +tenk unique1=3872i,unique2=5070i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=872i,twothousand=1872i,fivethous=3872i,tenthous=3872i,odd=144i,even=145i,stringu1="YSAAAA",stringu2="ANHAAA",string4="OOOOxx" 438134400000000000 +tenk unique1=893i,unique2=5071i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=893i,twothousand=893i,fivethous=893i,tenthous=893i,odd=186i,even=187i,stringu1="JIAAAA",stringu2="BNHAAA",string4="VVVVxx" 438220800000000000 +tenk unique1=2430i,unique2=5072i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=430i,twothousand=430i,fivethous=2430i,tenthous=2430i,odd=60i,even=61i,stringu1="MPAAAA",stringu2="CNHAAA",string4="AAAAxx" 438307200000000000 +tenk unique1=2591i,unique2=5073i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=591i,twothousand=591i,fivethous=2591i,tenthous=2591i,odd=182i,even=183i,stringu1="RVAAAA",stringu2="DNHAAA",string4="HHHHxx" 438393600000000000 +tenk unique1=264i,unique2=5074i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=264i,twothousand=264i,fivethous=264i,tenthous=264i,odd=128i,even=129i,stringu1="EKAAAA",stringu2="ENHAAA",string4="OOOOxx" 438480000000000000 +tenk unique1=6238i,unique2=5075i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=238i,twothousand=238i,fivethous=1238i,tenthous=6238i,odd=76i,even=77i,stringu1="YFAAAA",stringu2="FNHAAA",string4="VVVVxx" 438566400000000000 +tenk unique1=633i,unique2=5076i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=633i,twothousand=633i,fivethous=633i,tenthous=633i,odd=66i,even=67i,stringu1="JYAAAA",stringu2="GNHAAA",string4="AAAAxx" 438652800000000000 +tenk unique1=1029i,unique2=5077i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=29i,twothousand=1029i,fivethous=1029i,tenthous=1029i,odd=58i,even=59i,stringu1="PNAAAA",stringu2="HNHAAA",string4="HHHHxx" 438739200000000000 +tenk unique1=5934i,unique2=5078i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=934i,twothousand=1934i,fivethous=934i,tenthous=5934i,odd=68i,even=69i,stringu1="GUAAAA",stringu2="INHAAA",string4="OOOOxx" 438825600000000000 +tenk unique1=8694i,unique2=5079i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=694i,twothousand=694i,fivethous=3694i,tenthous=8694i,odd=188i,even=189i,stringu1="KWAAAA",stringu2="JNHAAA",string4="VVVVxx" 438912000000000000 +tenk unique1=7401i,unique2=5080i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=401i,twothousand=1401i,fivethous=2401i,tenthous=7401i,odd=2i,even=3i,stringu1="RYAAAA",stringu2="KNHAAA",string4="AAAAxx" 438998400000000000 +tenk unique1=1165i,unique2=5081i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=165i,twothousand=1165i,fivethous=1165i,tenthous=1165i,odd=130i,even=131i,stringu1="VSAAAA",stringu2="LNHAAA",string4="HHHHxx" 439084800000000000 +tenk unique1=9438i,unique2=5082i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=438i,twothousand=1438i,fivethous=4438i,tenthous=9438i,odd=76i,even=77i,stringu1="AZAAAA",stringu2="MNHAAA",string4="OOOOxx" 439171200000000000 +tenk unique1=4790i,unique2=5083i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=790i,twothousand=790i,fivethous=4790i,tenthous=4790i,odd=180i,even=181i,stringu1="GCAAAA",stringu2="NNHAAA",string4="VVVVxx" 439257600000000000 +tenk unique1=4531i,unique2=5084i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=531i,twothousand=531i,fivethous=4531i,tenthous=4531i,odd=62i,even=63i,stringu1="HSAAAA",stringu2="ONHAAA",string4="AAAAxx" 439344000000000000 +tenk unique1=6099i,unique2=5085i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=99i,twothousand=99i,fivethous=1099i,tenthous=6099i,odd=198i,even=199i,stringu1="PAAAAA",stringu2="PNHAAA",string4="HHHHxx" 439430400000000000 +tenk unique1=8236i,unique2=5086i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=236i,twothousand=236i,fivethous=3236i,tenthous=8236i,odd=72i,even=73i,stringu1="UEAAAA",stringu2="QNHAAA",string4="OOOOxx" 439516800000000000 +tenk unique1=8551i,unique2=5087i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=551i,twothousand=551i,fivethous=3551i,tenthous=8551i,odd=102i,even=103i,stringu1="XQAAAA",stringu2="RNHAAA",string4="VVVVxx" 439603200000000000 +tenk unique1=3128i,unique2=5088i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=128i,twothousand=1128i,fivethous=3128i,tenthous=3128i,odd=56i,even=57i,stringu1="IQAAAA",stringu2="SNHAAA",string4="AAAAxx" 439689600000000000 +tenk unique1=3504i,unique2=5089i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=504i,twothousand=1504i,fivethous=3504i,tenthous=3504i,odd=8i,even=9i,stringu1="UEAAAA",stringu2="TNHAAA",string4="HHHHxx" 439776000000000000 +tenk unique1=9071i,unique2=5090i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=71i,twothousand=1071i,fivethous=4071i,tenthous=9071i,odd=142i,even=143i,stringu1="XKAAAA",stringu2="UNHAAA",string4="OOOOxx" 439862400000000000 +tenk unique1=5930i,unique2=5091i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=930i,twothousand=1930i,fivethous=930i,tenthous=5930i,odd=60i,even=61i,stringu1="CUAAAA",stringu2="VNHAAA",string4="VVVVxx" 439948800000000000 +tenk unique1=6825i,unique2=5092i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=825i,twothousand=825i,fivethous=1825i,tenthous=6825i,odd=50i,even=51i,stringu1="NCAAAA",stringu2="WNHAAA",string4="AAAAxx" 440035200000000000 +tenk unique1=2218i,unique2=5093i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=218i,twothousand=218i,fivethous=2218i,tenthous=2218i,odd=36i,even=37i,stringu1="IHAAAA",stringu2="XNHAAA",string4="HHHHxx" 440121600000000000 +tenk unique1=3604i,unique2=5094i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=604i,twothousand=1604i,fivethous=3604i,tenthous=3604i,odd=8i,even=9i,stringu1="QIAAAA",stringu2="YNHAAA",string4="OOOOxx" 440208000000000000 +tenk unique1=5761i,unique2=5095i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=761i,twothousand=1761i,fivethous=761i,tenthous=5761i,odd=122i,even=123i,stringu1="PNAAAA",stringu2="ZNHAAA",string4="VVVVxx" 440294400000000000 +tenk unique1=5414i,unique2=5096i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=414i,twothousand=1414i,fivethous=414i,tenthous=5414i,odd=28i,even=29i,stringu1="GAAAAA",stringu2="AOHAAA",string4="AAAAxx" 440380800000000000 +tenk unique1=5892i,unique2=5097i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=892i,twothousand=1892i,fivethous=892i,tenthous=5892i,odd=184i,even=185i,stringu1="QSAAAA",stringu2="BOHAAA",string4="HHHHxx" 440467200000000000 +tenk unique1=4080i,unique2=5098i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=80i,twothousand=80i,fivethous=4080i,tenthous=4080i,odd=160i,even=161i,stringu1="YAAAAA",stringu2="COHAAA",string4="OOOOxx" 440553600000000000 +tenk unique1=8018i,unique2=5099i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=18i,twothousand=18i,fivethous=3018i,tenthous=8018i,odd=36i,even=37i,stringu1="KWAAAA",stringu2="DOHAAA",string4="VVVVxx" 440640000000000000 +tenk unique1=1757i,unique2=5100i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=757i,twothousand=1757i,fivethous=1757i,tenthous=1757i,odd=114i,even=115i,stringu1="PPAAAA",stringu2="EOHAAA",string4="AAAAxx" 440726400000000000 +tenk unique1=5854i,unique2=5101i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=854i,twothousand=1854i,fivethous=854i,tenthous=5854i,odd=108i,even=109i,stringu1="ERAAAA",stringu2="FOHAAA",string4="HHHHxx" 440812800000000000 +tenk unique1=1335i,unique2=5102i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=335i,twothousand=1335i,fivethous=1335i,tenthous=1335i,odd=70i,even=71i,stringu1="JZAAAA",stringu2="GOHAAA",string4="OOOOxx" 440899200000000000 +tenk unique1=3811i,unique2=5103i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=811i,twothousand=1811i,fivethous=3811i,tenthous=3811i,odd=22i,even=23i,stringu1="PQAAAA",stringu2="HOHAAA",string4="VVVVxx" 440985600000000000 +tenk unique1=9917i,unique2=5104i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=917i,twothousand=1917i,fivethous=4917i,tenthous=9917i,odd=34i,even=35i,stringu1="LRAAAA",stringu2="IOHAAA",string4="AAAAxx" 441072000000000000 +tenk unique1=5947i,unique2=5105i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=947i,twothousand=1947i,fivethous=947i,tenthous=5947i,odd=94i,even=95i,stringu1="TUAAAA",stringu2="JOHAAA",string4="HHHHxx" 441158400000000000 +tenk unique1=7263i,unique2=5106i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=263i,twothousand=1263i,fivethous=2263i,tenthous=7263i,odd=126i,even=127i,stringu1="JTAAAA",stringu2="KOHAAA",string4="OOOOxx" 441244800000000000 +tenk unique1=1730i,unique2=5107i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=730i,twothousand=1730i,fivethous=1730i,tenthous=1730i,odd=60i,even=61i,stringu1="OOAAAA",stringu2="LOHAAA",string4="VVVVxx" 441331200000000000 +tenk unique1=5747i,unique2=5108i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=747i,twothousand=1747i,fivethous=747i,tenthous=5747i,odd=94i,even=95i,stringu1="BNAAAA",stringu2="MOHAAA",string4="AAAAxx" 441417600000000000 +tenk unique1=3876i,unique2=5109i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=876i,twothousand=1876i,fivethous=3876i,tenthous=3876i,odd=152i,even=153i,stringu1="CTAAAA",stringu2="NOHAAA",string4="HHHHxx" 441504000000000000 +tenk unique1=2762i,unique2=5110i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=762i,twothousand=762i,fivethous=2762i,tenthous=2762i,odd=124i,even=125i,stringu1="GCAAAA",stringu2="OOHAAA",string4="OOOOxx" 441590400000000000 +tenk unique1=7613i,unique2=5111i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=613i,twothousand=1613i,fivethous=2613i,tenthous=7613i,odd=26i,even=27i,stringu1="VGAAAA",stringu2="POHAAA",string4="VVVVxx" 441676800000000000 +tenk unique1=152i,unique2=5112i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=152i,twothousand=152i,fivethous=152i,tenthous=152i,odd=104i,even=105i,stringu1="WFAAAA",stringu2="QOHAAA",string4="AAAAxx" 441763200000000000 +tenk unique1=3941i,unique2=5113i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=941i,twothousand=1941i,fivethous=3941i,tenthous=3941i,odd=82i,even=83i,stringu1="PVAAAA",stringu2="ROHAAA",string4="HHHHxx" 441849600000000000 +tenk unique1=5614i,unique2=5114i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=614i,twothousand=1614i,fivethous=614i,tenthous=5614i,odd=28i,even=29i,stringu1="YHAAAA",stringu2="SOHAAA",string4="OOOOxx" 441936000000000000 +tenk unique1=9279i,unique2=5115i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=279i,twothousand=1279i,fivethous=4279i,tenthous=9279i,odd=158i,even=159i,stringu1="XSAAAA",stringu2="TOHAAA",string4="VVVVxx" 442022400000000000 +tenk unique1=3048i,unique2=5116i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=48i,twothousand=1048i,fivethous=3048i,tenthous=3048i,odd=96i,even=97i,stringu1="GNAAAA",stringu2="UOHAAA",string4="AAAAxx" 442108800000000000 +tenk unique1=6152i,unique2=5117i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=152i,twothousand=152i,fivethous=1152i,tenthous=6152i,odd=104i,even=105i,stringu1="QCAAAA",stringu2="VOHAAA",string4="HHHHxx" 442195200000000000 +tenk unique1=5481i,unique2=5118i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=481i,twothousand=1481i,fivethous=481i,tenthous=5481i,odd=162i,even=163i,stringu1="VCAAAA",stringu2="WOHAAA",string4="OOOOxx" 442281600000000000 +tenk unique1=4675i,unique2=5119i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=675i,twothousand=675i,fivethous=4675i,tenthous=4675i,odd=150i,even=151i,stringu1="VXAAAA",stringu2="XOHAAA",string4="VVVVxx" 442368000000000000 +tenk unique1=3334i,unique2=5120i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=334i,twothousand=1334i,fivethous=3334i,tenthous=3334i,odd=68i,even=69i,stringu1="GYAAAA",stringu2="YOHAAA",string4="AAAAxx" 442454400000000000 +tenk unique1=4691i,unique2=5121i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=691i,twothousand=691i,fivethous=4691i,tenthous=4691i,odd=182i,even=183i,stringu1="LYAAAA",stringu2="ZOHAAA",string4="HHHHxx" 442540800000000000 +tenk unique1=803i,unique2=5122i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=803i,twothousand=803i,fivethous=803i,tenthous=803i,odd=6i,even=7i,stringu1="XEAAAA",stringu2="APHAAA",string4="OOOOxx" 442627200000000000 +tenk unique1=5409i,unique2=5123i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=409i,twothousand=1409i,fivethous=409i,tenthous=5409i,odd=18i,even=19i,stringu1="BAAAAA",stringu2="BPHAAA",string4="VVVVxx" 442713600000000000 +tenk unique1=1054i,unique2=5124i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=54i,twothousand=1054i,fivethous=1054i,tenthous=1054i,odd=108i,even=109i,stringu1="OOAAAA",stringu2="CPHAAA",string4="AAAAxx" 442800000000000000 +tenk unique1=103i,unique2=5125i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=103i,twothousand=103i,fivethous=103i,tenthous=103i,odd=6i,even=7i,stringu1="ZDAAAA",stringu2="DPHAAA",string4="HHHHxx" 442886400000000000 +tenk unique1=8565i,unique2=5126i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=565i,twothousand=565i,fivethous=3565i,tenthous=8565i,odd=130i,even=131i,stringu1="LRAAAA",stringu2="EPHAAA",string4="OOOOxx" 442972800000000000 +tenk unique1=4666i,unique2=5127i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=666i,twothousand=666i,fivethous=4666i,tenthous=4666i,odd=132i,even=133i,stringu1="MXAAAA",stringu2="FPHAAA",string4="VVVVxx" 443059200000000000 +tenk unique1=6634i,unique2=5128i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=634i,twothousand=634i,fivethous=1634i,tenthous=6634i,odd=68i,even=69i,stringu1="EVAAAA",stringu2="GPHAAA",string4="AAAAxx" 443145600000000000 +tenk unique1=5538i,unique2=5129i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=538i,twothousand=1538i,fivethous=538i,tenthous=5538i,odd=76i,even=77i,stringu1="AFAAAA",stringu2="HPHAAA",string4="HHHHxx" 443232000000000000 +tenk unique1=3789i,unique2=5130i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=789i,twothousand=1789i,fivethous=3789i,tenthous=3789i,odd=178i,even=179i,stringu1="TPAAAA",stringu2="IPHAAA",string4="OOOOxx" 443318400000000000 +tenk unique1=4641i,unique2=5131i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=641i,twothousand=641i,fivethous=4641i,tenthous=4641i,odd=82i,even=83i,stringu1="NWAAAA",stringu2="JPHAAA",string4="VVVVxx" 443404800000000000 +tenk unique1=2458i,unique2=5132i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=458i,twothousand=458i,fivethous=2458i,tenthous=2458i,odd=116i,even=117i,stringu1="OQAAAA",stringu2="KPHAAA",string4="AAAAxx" 443491200000000000 +tenk unique1=5667i,unique2=5133i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=667i,twothousand=1667i,fivethous=667i,tenthous=5667i,odd=134i,even=135i,stringu1="ZJAAAA",stringu2="LPHAAA",string4="HHHHxx" 443577600000000000 +tenk unique1=6524i,unique2=5134i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=524i,twothousand=524i,fivethous=1524i,tenthous=6524i,odd=48i,even=49i,stringu1="YQAAAA",stringu2="MPHAAA",string4="OOOOxx" 443664000000000000 +tenk unique1=9179i,unique2=5135i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=179i,twothousand=1179i,fivethous=4179i,tenthous=9179i,odd=158i,even=159i,stringu1="BPAAAA",stringu2="NPHAAA",string4="VVVVxx" 443750400000000000 +tenk unique1=6358i,unique2=5136i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=358i,twothousand=358i,fivethous=1358i,tenthous=6358i,odd=116i,even=117i,stringu1="OKAAAA",stringu2="OPHAAA",string4="AAAAxx" 443836800000000000 +tenk unique1=6668i,unique2=5137i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=668i,twothousand=668i,fivethous=1668i,tenthous=6668i,odd=136i,even=137i,stringu1="MWAAAA",stringu2="PPHAAA",string4="HHHHxx" 443923200000000000 +tenk unique1=6414i,unique2=5138i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=414i,twothousand=414i,fivethous=1414i,tenthous=6414i,odd=28i,even=29i,stringu1="SMAAAA",stringu2="QPHAAA",string4="OOOOxx" 444009600000000000 +tenk unique1=2813i,unique2=5139i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=813i,twothousand=813i,fivethous=2813i,tenthous=2813i,odd=26i,even=27i,stringu1="FEAAAA",stringu2="RPHAAA",string4="VVVVxx" 444096000000000000 +tenk unique1=8927i,unique2=5140i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=927i,twothousand=927i,fivethous=3927i,tenthous=8927i,odd=54i,even=55i,stringu1="JFAAAA",stringu2="SPHAAA",string4="AAAAxx" 444182400000000000 +tenk unique1=8695i,unique2=5141i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=695i,twothousand=695i,fivethous=3695i,tenthous=8695i,odd=190i,even=191i,stringu1="LWAAAA",stringu2="TPHAAA",string4="HHHHxx" 444268800000000000 +tenk unique1=363i,unique2=5142i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=363i,twothousand=363i,fivethous=363i,tenthous=363i,odd=126i,even=127i,stringu1="ZNAAAA",stringu2="UPHAAA",string4="OOOOxx" 444355200000000000 +tenk unique1=9966i,unique2=5143i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=966i,twothousand=1966i,fivethous=4966i,tenthous=9966i,odd=132i,even=133i,stringu1="ITAAAA",stringu2="VPHAAA",string4="VVVVxx" 444441600000000000 +tenk unique1=1323i,unique2=5144i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=323i,twothousand=1323i,fivethous=1323i,tenthous=1323i,odd=46i,even=47i,stringu1="XYAAAA",stringu2="WPHAAA",string4="AAAAxx" 444528000000000000 +tenk unique1=8211i,unique2=5145i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=211i,twothousand=211i,fivethous=3211i,tenthous=8211i,odd=22i,even=23i,stringu1="VDAAAA",stringu2="XPHAAA",string4="HHHHxx" 444614400000000000 +tenk unique1=4375i,unique2=5146i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=375i,twothousand=375i,fivethous=4375i,tenthous=4375i,odd=150i,even=151i,stringu1="HMAAAA",stringu2="YPHAAA",string4="OOOOxx" 444700800000000000 +tenk unique1=3257i,unique2=5147i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=257i,twothousand=1257i,fivethous=3257i,tenthous=3257i,odd=114i,even=115i,stringu1="HVAAAA",stringu2="ZPHAAA",string4="VVVVxx" 444787200000000000 +tenk unique1=6239i,unique2=5148i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=239i,twothousand=239i,fivethous=1239i,tenthous=6239i,odd=78i,even=79i,stringu1="ZFAAAA",stringu2="AQHAAA",string4="AAAAxx" 444873600000000000 +tenk unique1=3602i,unique2=5149i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=602i,twothousand=1602i,fivethous=3602i,tenthous=3602i,odd=4i,even=5i,stringu1="OIAAAA",stringu2="BQHAAA",string4="HHHHxx" 444960000000000000 +tenk unique1=9830i,unique2=5150i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=830i,twothousand=1830i,fivethous=4830i,tenthous=9830i,odd=60i,even=61i,stringu1="COAAAA",stringu2="CQHAAA",string4="OOOOxx" 445046400000000000 +tenk unique1=7826i,unique2=5151i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=826i,twothousand=1826i,fivethous=2826i,tenthous=7826i,odd=52i,even=53i,stringu1="APAAAA",stringu2="DQHAAA",string4="VVVVxx" 445132800000000000 +tenk unique1=2108i,unique2=5152i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=108i,twothousand=108i,fivethous=2108i,tenthous=2108i,odd=16i,even=17i,stringu1="CDAAAA",stringu2="EQHAAA",string4="AAAAxx" 445219200000000000 +tenk unique1=7245i,unique2=5153i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=245i,twothousand=1245i,fivethous=2245i,tenthous=7245i,odd=90i,even=91i,stringu1="RSAAAA",stringu2="FQHAAA",string4="HHHHxx" 445305600000000000 +tenk unique1=8330i,unique2=5154i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=330i,twothousand=330i,fivethous=3330i,tenthous=8330i,odd=60i,even=61i,stringu1="KIAAAA",stringu2="GQHAAA",string4="OOOOxx" 445392000000000000 +tenk unique1=7441i,unique2=5155i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=441i,twothousand=1441i,fivethous=2441i,tenthous=7441i,odd=82i,even=83i,stringu1="FAAAAA",stringu2="HQHAAA",string4="VVVVxx" 445478400000000000 +tenk unique1=9848i,unique2=5156i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=848i,twothousand=1848i,fivethous=4848i,tenthous=9848i,odd=96i,even=97i,stringu1="UOAAAA",stringu2="IQHAAA",string4="AAAAxx" 445564800000000000 +tenk unique1=1226i,unique2=5157i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=226i,twothousand=1226i,fivethous=1226i,tenthous=1226i,odd=52i,even=53i,stringu1="EVAAAA",stringu2="JQHAAA",string4="HHHHxx" 445651200000000000 +tenk unique1=414i,unique2=5158i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=414i,twothousand=414i,fivethous=414i,tenthous=414i,odd=28i,even=29i,stringu1="YPAAAA",stringu2="KQHAAA",string4="OOOOxx" 445737600000000000 +tenk unique1=1273i,unique2=5159i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=273i,twothousand=1273i,fivethous=1273i,tenthous=1273i,odd=146i,even=147i,stringu1="ZWAAAA",stringu2="LQHAAA",string4="VVVVxx" 445824000000000000 +tenk unique1=9866i,unique2=5160i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=866i,twothousand=1866i,fivethous=4866i,tenthous=9866i,odd=132i,even=133i,stringu1="MPAAAA",stringu2="MQHAAA",string4="AAAAxx" 445910400000000000 +tenk unique1=4633i,unique2=5161i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=633i,twothousand=633i,fivethous=4633i,tenthous=4633i,odd=66i,even=67i,stringu1="FWAAAA",stringu2="NQHAAA",string4="HHHHxx" 445996800000000000 +tenk unique1=8727i,unique2=5162i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=727i,twothousand=727i,fivethous=3727i,tenthous=8727i,odd=54i,even=55i,stringu1="RXAAAA",stringu2="OQHAAA",string4="OOOOxx" 446083200000000000 +tenk unique1=5308i,unique2=5163i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=308i,twothousand=1308i,fivethous=308i,tenthous=5308i,odd=16i,even=17i,stringu1="EWAAAA",stringu2="PQHAAA",string4="VVVVxx" 446169600000000000 +tenk unique1=1395i,unique2=5164i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=395i,twothousand=1395i,fivethous=1395i,tenthous=1395i,odd=190i,even=191i,stringu1="RBAAAA",stringu2="QQHAAA",string4="AAAAxx" 446256000000000000 +tenk unique1=1825i,unique2=5165i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=825i,twothousand=1825i,fivethous=1825i,tenthous=1825i,odd=50i,even=51i,stringu1="FSAAAA",stringu2="RQHAAA",string4="HHHHxx" 446342400000000000 +tenk unique1=7606i,unique2=5166i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=606i,twothousand=1606i,fivethous=2606i,tenthous=7606i,odd=12i,even=13i,stringu1="OGAAAA",stringu2="SQHAAA",string4="OOOOxx" 446428800000000000 +tenk unique1=9390i,unique2=5167i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=390i,twothousand=1390i,fivethous=4390i,tenthous=9390i,odd=180i,even=181i,stringu1="EXAAAA",stringu2="TQHAAA",string4="VVVVxx" 446515200000000000 +tenk unique1=2376i,unique2=5168i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=376i,twothousand=376i,fivethous=2376i,tenthous=2376i,odd=152i,even=153i,stringu1="KNAAAA",stringu2="UQHAAA",string4="AAAAxx" 446601600000000000 +tenk unique1=2377i,unique2=5169i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=377i,twothousand=377i,fivethous=2377i,tenthous=2377i,odd=154i,even=155i,stringu1="LNAAAA",stringu2="VQHAAA",string4="HHHHxx" 446688000000000000 +tenk unique1=5346i,unique2=5170i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=346i,twothousand=1346i,fivethous=346i,tenthous=5346i,odd=92i,even=93i,stringu1="QXAAAA",stringu2="WQHAAA",string4="OOOOxx" 446774400000000000 +tenk unique1=4140i,unique2=5171i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=140i,twothousand=140i,fivethous=4140i,tenthous=4140i,odd=80i,even=81i,stringu1="GDAAAA",stringu2="XQHAAA",string4="VVVVxx" 446860800000000000 +tenk unique1=6032i,unique2=5172i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=32i,twothousand=32i,fivethous=1032i,tenthous=6032i,odd=64i,even=65i,stringu1="AYAAAA",stringu2="YQHAAA",string4="AAAAxx" 446947200000000000 +tenk unique1=9453i,unique2=5173i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=453i,twothousand=1453i,fivethous=4453i,tenthous=9453i,odd=106i,even=107i,stringu1="PZAAAA",stringu2="ZQHAAA",string4="HHHHxx" 447033600000000000 +tenk unique1=9297i,unique2=5174i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=297i,twothousand=1297i,fivethous=4297i,tenthous=9297i,odd=194i,even=195i,stringu1="PTAAAA",stringu2="ARHAAA",string4="OOOOxx" 447120000000000000 +tenk unique1=6455i,unique2=5175i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=455i,twothousand=455i,fivethous=1455i,tenthous=6455i,odd=110i,even=111i,stringu1="HOAAAA",stringu2="BRHAAA",string4="VVVVxx" 447206400000000000 +tenk unique1=4458i,unique2=5176i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=458i,twothousand=458i,fivethous=4458i,tenthous=4458i,odd=116i,even=117i,stringu1="MPAAAA",stringu2="CRHAAA",string4="AAAAxx" 447292800000000000 +tenk unique1=9516i,unique2=5177i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=516i,twothousand=1516i,fivethous=4516i,tenthous=9516i,odd=32i,even=33i,stringu1="ACAAAA",stringu2="DRHAAA",string4="HHHHxx" 447379200000000000 +tenk unique1=6211i,unique2=5178i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=211i,twothousand=211i,fivethous=1211i,tenthous=6211i,odd=22i,even=23i,stringu1="XEAAAA",stringu2="ERHAAA",string4="OOOOxx" 447465600000000000 +tenk unique1=526i,unique2=5179i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=526i,twothousand=526i,fivethous=526i,tenthous=526i,odd=52i,even=53i,stringu1="GUAAAA",stringu2="FRHAAA",string4="VVVVxx" 447552000000000000 +tenk unique1=3570i,unique2=5180i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=570i,twothousand=1570i,fivethous=3570i,tenthous=3570i,odd=140i,even=141i,stringu1="IHAAAA",stringu2="GRHAAA",string4="AAAAxx" 447638400000000000 +tenk unique1=4885i,unique2=5181i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=885i,twothousand=885i,fivethous=4885i,tenthous=4885i,odd=170i,even=171i,stringu1="XFAAAA",stringu2="HRHAAA",string4="HHHHxx" 447724800000000000 +tenk unique1=6390i,unique2=5182i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=390i,twothousand=390i,fivethous=1390i,tenthous=6390i,odd=180i,even=181i,stringu1="ULAAAA",stringu2="IRHAAA",string4="OOOOxx" 447811200000000000 +tenk unique1=1606i,unique2=5183i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=606i,twothousand=1606i,fivethous=1606i,tenthous=1606i,odd=12i,even=13i,stringu1="UJAAAA",stringu2="JRHAAA",string4="VVVVxx" 447897600000000000 +tenk unique1=7850i,unique2=5184i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=850i,twothousand=1850i,fivethous=2850i,tenthous=7850i,odd=100i,even=101i,stringu1="YPAAAA",stringu2="KRHAAA",string4="AAAAxx" 447984000000000000 +tenk unique1=3315i,unique2=5185i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=315i,twothousand=1315i,fivethous=3315i,tenthous=3315i,odd=30i,even=31i,stringu1="NXAAAA",stringu2="LRHAAA",string4="HHHHxx" 448070400000000000 +tenk unique1=8322i,unique2=5186i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=322i,twothousand=322i,fivethous=3322i,tenthous=8322i,odd=44i,even=45i,stringu1="CIAAAA",stringu2="MRHAAA",string4="OOOOxx" 448156800000000000 +tenk unique1=3703i,unique2=5187i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=703i,twothousand=1703i,fivethous=3703i,tenthous=3703i,odd=6i,even=7i,stringu1="LMAAAA",stringu2="NRHAAA",string4="VVVVxx" 448243200000000000 +tenk unique1=9489i,unique2=5188i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=489i,twothousand=1489i,fivethous=4489i,tenthous=9489i,odd=178i,even=179i,stringu1="ZAAAAA",stringu2="ORHAAA",string4="AAAAxx" 448329600000000000 +tenk unique1=6104i,unique2=5189i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=104i,twothousand=104i,fivethous=1104i,tenthous=6104i,odd=8i,even=9i,stringu1="UAAAAA",stringu2="PRHAAA",string4="HHHHxx" 448416000000000000 +tenk unique1=3067i,unique2=5190i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=67i,twothousand=1067i,fivethous=3067i,tenthous=3067i,odd=134i,even=135i,stringu1="ZNAAAA",stringu2="QRHAAA",string4="OOOOxx" 448502400000000000 +tenk unique1=2521i,unique2=5191i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=521i,twothousand=521i,fivethous=2521i,tenthous=2521i,odd=42i,even=43i,stringu1="ZSAAAA",stringu2="RRHAAA",string4="VVVVxx" 448588800000000000 +tenk unique1=2581i,unique2=5192i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=581i,twothousand=581i,fivethous=2581i,tenthous=2581i,odd=162i,even=163i,stringu1="HVAAAA",stringu2="SRHAAA",string4="AAAAxx" 448675200000000000 +tenk unique1=595i,unique2=5193i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=595i,twothousand=595i,fivethous=595i,tenthous=595i,odd=190i,even=191i,stringu1="XWAAAA",stringu2="TRHAAA",string4="HHHHxx" 448761600000000000 +tenk unique1=8291i,unique2=5194i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=291i,twothousand=291i,fivethous=3291i,tenthous=8291i,odd=182i,even=183i,stringu1="XGAAAA",stringu2="URHAAA",string4="OOOOxx" 448848000000000000 +tenk unique1=1727i,unique2=5195i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=727i,twothousand=1727i,fivethous=1727i,tenthous=1727i,odd=54i,even=55i,stringu1="LOAAAA",stringu2="VRHAAA",string4="VVVVxx" 448934400000000000 +tenk unique1=6847i,unique2=5196i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=847i,twothousand=847i,fivethous=1847i,tenthous=6847i,odd=94i,even=95i,stringu1="JDAAAA",stringu2="WRHAAA",string4="AAAAxx" 449020800000000000 +tenk unique1=7494i,unique2=5197i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=494i,twothousand=1494i,fivethous=2494i,tenthous=7494i,odd=188i,even=189i,stringu1="GCAAAA",stringu2="XRHAAA",string4="HHHHxx" 449107200000000000 +tenk unique1=7093i,unique2=5198i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=93i,twothousand=1093i,fivethous=2093i,tenthous=7093i,odd=186i,even=187i,stringu1="VMAAAA",stringu2="YRHAAA",string4="OOOOxx" 449193600000000000 +tenk unique1=7357i,unique2=5199i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=357i,twothousand=1357i,fivethous=2357i,tenthous=7357i,odd=114i,even=115i,stringu1="ZWAAAA",stringu2="ZRHAAA",string4="VVVVxx" 449280000000000000 +tenk unique1=620i,unique2=5200i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=620i,twothousand=620i,fivethous=620i,tenthous=620i,odd=40i,even=41i,stringu1="WXAAAA",stringu2="ASHAAA",string4="AAAAxx" 449366400000000000 +tenk unique1=2460i,unique2=5201i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=460i,twothousand=460i,fivethous=2460i,tenthous=2460i,odd=120i,even=121i,stringu1="QQAAAA",stringu2="BSHAAA",string4="HHHHxx" 449452800000000000 +tenk unique1=1598i,unique2=5202i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=598i,twothousand=1598i,fivethous=1598i,tenthous=1598i,odd=196i,even=197i,stringu1="MJAAAA",stringu2="CSHAAA",string4="OOOOxx" 449539200000000000 +tenk unique1=4112i,unique2=5203i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=112i,twothousand=112i,fivethous=4112i,tenthous=4112i,odd=24i,even=25i,stringu1="ECAAAA",stringu2="DSHAAA",string4="VVVVxx" 449625600000000000 +tenk unique1=2956i,unique2=5204i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=956i,twothousand=956i,fivethous=2956i,tenthous=2956i,odd=112i,even=113i,stringu1="SJAAAA",stringu2="ESHAAA",string4="AAAAxx" 449712000000000000 +tenk unique1=3193i,unique2=5205i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=193i,twothousand=1193i,fivethous=3193i,tenthous=3193i,odd=186i,even=187i,stringu1="VSAAAA",stringu2="FSHAAA",string4="HHHHxx" 449798400000000000 +tenk unique1=6356i,unique2=5206i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=356i,twothousand=356i,fivethous=1356i,tenthous=6356i,odd=112i,even=113i,stringu1="MKAAAA",stringu2="GSHAAA",string4="OOOOxx" 449884800000000000 +tenk unique1=730i,unique2=5207i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=730i,twothousand=730i,fivethous=730i,tenthous=730i,odd=60i,even=61i,stringu1="CCAAAA",stringu2="HSHAAA",string4="VVVVxx" 449971200000000000 +tenk unique1=8826i,unique2=5208i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=826i,twothousand=826i,fivethous=3826i,tenthous=8826i,odd=52i,even=53i,stringu1="MBAAAA",stringu2="ISHAAA",string4="AAAAxx" 450057600000000000 +tenk unique1=9036i,unique2=5209i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=36i,twothousand=1036i,fivethous=4036i,tenthous=9036i,odd=72i,even=73i,stringu1="OJAAAA",stringu2="JSHAAA",string4="HHHHxx" 450144000000000000 +tenk unique1=2085i,unique2=5210i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=85i,twothousand=85i,fivethous=2085i,tenthous=2085i,odd=170i,even=171i,stringu1="FCAAAA",stringu2="KSHAAA",string4="OOOOxx" 450230400000000000 +tenk unique1=9007i,unique2=5211i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=1007i,fivethous=4007i,tenthous=9007i,odd=14i,even=15i,stringu1="LIAAAA",stringu2="LSHAAA",string4="VVVVxx" 450316800000000000 +tenk unique1=6047i,unique2=5212i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=47i,twothousand=47i,fivethous=1047i,tenthous=6047i,odd=94i,even=95i,stringu1="PYAAAA",stringu2="MSHAAA",string4="AAAAxx" 450403200000000000 +tenk unique1=3953i,unique2=5213i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=953i,twothousand=1953i,fivethous=3953i,tenthous=3953i,odd=106i,even=107i,stringu1="BWAAAA",stringu2="NSHAAA",string4="HHHHxx" 450489600000000000 +tenk unique1=1214i,unique2=5214i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=214i,twothousand=1214i,fivethous=1214i,tenthous=1214i,odd=28i,even=29i,stringu1="SUAAAA",stringu2="OSHAAA",string4="OOOOxx" 450576000000000000 +tenk unique1=4814i,unique2=5215i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=814i,twothousand=814i,fivethous=4814i,tenthous=4814i,odd=28i,even=29i,stringu1="EDAAAA",stringu2="PSHAAA",string4="VVVVxx" 450662400000000000 +tenk unique1=5738i,unique2=5216i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=738i,twothousand=1738i,fivethous=738i,tenthous=5738i,odd=76i,even=77i,stringu1="SMAAAA",stringu2="QSHAAA",string4="AAAAxx" 450748800000000000 +tenk unique1=7176i,unique2=5217i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=176i,twothousand=1176i,fivethous=2176i,tenthous=7176i,odd=152i,even=153i,stringu1="AQAAAA",stringu2="RSHAAA",string4="HHHHxx" 450835200000000000 +tenk unique1=3609i,unique2=5218i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=609i,twothousand=1609i,fivethous=3609i,tenthous=3609i,odd=18i,even=19i,stringu1="VIAAAA",stringu2="SSHAAA",string4="OOOOxx" 450921600000000000 +tenk unique1=592i,unique2=5219i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=592i,twothousand=592i,fivethous=592i,tenthous=592i,odd=184i,even=185i,stringu1="UWAAAA",stringu2="TSHAAA",string4="VVVVxx" 451008000000000000 +tenk unique1=9391i,unique2=5220i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=391i,twothousand=1391i,fivethous=4391i,tenthous=9391i,odd=182i,even=183i,stringu1="FXAAAA",stringu2="USHAAA",string4="AAAAxx" 451094400000000000 +tenk unique1=5345i,unique2=5221i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=345i,twothousand=1345i,fivethous=345i,tenthous=5345i,odd=90i,even=91i,stringu1="PXAAAA",stringu2="VSHAAA",string4="HHHHxx" 451180800000000000 +tenk unique1=1171i,unique2=5222i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=171i,twothousand=1171i,fivethous=1171i,tenthous=1171i,odd=142i,even=143i,stringu1="BTAAAA",stringu2="WSHAAA",string4="OOOOxx" 451267200000000000 +tenk unique1=7238i,unique2=5223i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=238i,twothousand=1238i,fivethous=2238i,tenthous=7238i,odd=76i,even=77i,stringu1="KSAAAA",stringu2="XSHAAA",string4="VVVVxx" 451353600000000000 +tenk unique1=7561i,unique2=5224i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=561i,twothousand=1561i,fivethous=2561i,tenthous=7561i,odd=122i,even=123i,stringu1="VEAAAA",stringu2="YSHAAA",string4="AAAAxx" 451440000000000000 +tenk unique1=5876i,unique2=5225i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=876i,twothousand=1876i,fivethous=876i,tenthous=5876i,odd=152i,even=153i,stringu1="ASAAAA",stringu2="ZSHAAA",string4="HHHHxx" 451526400000000000 +tenk unique1=6611i,unique2=5226i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=611i,twothousand=611i,fivethous=1611i,tenthous=6611i,odd=22i,even=23i,stringu1="HUAAAA",stringu2="ATHAAA",string4="OOOOxx" 451612800000000000 +tenk unique1=7300i,unique2=5227i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=300i,twothousand=1300i,fivethous=2300i,tenthous=7300i,odd=0i,even=1i,stringu1="UUAAAA",stringu2="BTHAAA",string4="VVVVxx" 451699200000000000 +tenk unique1=1506i,unique2=5228i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=506i,twothousand=1506i,fivethous=1506i,tenthous=1506i,odd=12i,even=13i,stringu1="YFAAAA",stringu2="CTHAAA",string4="AAAAxx" 451785600000000000 +tenk unique1=1153i,unique2=5229i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=153i,twothousand=1153i,fivethous=1153i,tenthous=1153i,odd=106i,even=107i,stringu1="JSAAAA",stringu2="DTHAAA",string4="HHHHxx" 451872000000000000 +tenk unique1=3831i,unique2=5230i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=831i,twothousand=1831i,fivethous=3831i,tenthous=3831i,odd=62i,even=63i,stringu1="JRAAAA",stringu2="ETHAAA",string4="OOOOxx" 451958400000000000 +tenk unique1=9255i,unique2=5231i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=255i,twothousand=1255i,fivethous=4255i,tenthous=9255i,odd=110i,even=111i,stringu1="ZRAAAA",stringu2="FTHAAA",string4="VVVVxx" 452044800000000000 +tenk unique1=1841i,unique2=5232i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=841i,twothousand=1841i,fivethous=1841i,tenthous=1841i,odd=82i,even=83i,stringu1="VSAAAA",stringu2="GTHAAA",string4="AAAAxx" 452131200000000000 +tenk unique1=5075i,unique2=5233i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=75i,twothousand=1075i,fivethous=75i,tenthous=5075i,odd=150i,even=151i,stringu1="FNAAAA",stringu2="HTHAAA",string4="HHHHxx" 452217600000000000 +tenk unique1=101i,unique2=5234i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=101i,twothousand=101i,fivethous=101i,tenthous=101i,odd=2i,even=3i,stringu1="XDAAAA",stringu2="ITHAAA",string4="OOOOxx" 452304000000000000 +tenk unique1=2627i,unique2=5235i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=627i,twothousand=627i,fivethous=2627i,tenthous=2627i,odd=54i,even=55i,stringu1="BXAAAA",stringu2="JTHAAA",string4="VVVVxx" 452390400000000000 +tenk unique1=7078i,unique2=5236i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=78i,twothousand=1078i,fivethous=2078i,tenthous=7078i,odd=156i,even=157i,stringu1="GMAAAA",stringu2="KTHAAA",string4="AAAAxx" 452476800000000000 +tenk unique1=2850i,unique2=5237i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=850i,twothousand=850i,fivethous=2850i,tenthous=2850i,odd=100i,even=101i,stringu1="QFAAAA",stringu2="LTHAAA",string4="HHHHxx" 452563200000000000 +tenk unique1=8703i,unique2=5238i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=703i,twothousand=703i,fivethous=3703i,tenthous=8703i,odd=6i,even=7i,stringu1="TWAAAA",stringu2="MTHAAA",string4="OOOOxx" 452649600000000000 +tenk unique1=4101i,unique2=5239i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=101i,twothousand=101i,fivethous=4101i,tenthous=4101i,odd=2i,even=3i,stringu1="TBAAAA",stringu2="NTHAAA",string4="VVVVxx" 452736000000000000 +tenk unique1=318i,unique2=5240i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=318i,twothousand=318i,fivethous=318i,tenthous=318i,odd=36i,even=37i,stringu1="GMAAAA",stringu2="OTHAAA",string4="AAAAxx" 452822400000000000 +tenk unique1=6452i,unique2=5241i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=452i,twothousand=452i,fivethous=1452i,tenthous=6452i,odd=104i,even=105i,stringu1="EOAAAA",stringu2="PTHAAA",string4="HHHHxx" 452908800000000000 +tenk unique1=5558i,unique2=5242i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=558i,twothousand=1558i,fivethous=558i,tenthous=5558i,odd=116i,even=117i,stringu1="UFAAAA",stringu2="QTHAAA",string4="OOOOxx" 452995200000000000 +tenk unique1=3127i,unique2=5243i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=127i,twothousand=1127i,fivethous=3127i,tenthous=3127i,odd=54i,even=55i,stringu1="HQAAAA",stringu2="RTHAAA",string4="VVVVxx" 453081600000000000 +tenk unique1=535i,unique2=5244i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=535i,twothousand=535i,fivethous=535i,tenthous=535i,odd=70i,even=71i,stringu1="PUAAAA",stringu2="STHAAA",string4="AAAAxx" 453168000000000000 +tenk unique1=270i,unique2=5245i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=270i,twothousand=270i,fivethous=270i,tenthous=270i,odd=140i,even=141i,stringu1="KKAAAA",stringu2="TTHAAA",string4="HHHHxx" 453254400000000000 +tenk unique1=4038i,unique2=5246i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=38i,twothousand=38i,fivethous=4038i,tenthous=4038i,odd=76i,even=77i,stringu1="IZAAAA",stringu2="UTHAAA",string4="OOOOxx" 453340800000000000 +tenk unique1=3404i,unique2=5247i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=404i,twothousand=1404i,fivethous=3404i,tenthous=3404i,odd=8i,even=9i,stringu1="YAAAAA",stringu2="VTHAAA",string4="VVVVxx" 453427200000000000 +tenk unique1=2374i,unique2=5248i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=374i,twothousand=374i,fivethous=2374i,tenthous=2374i,odd=148i,even=149i,stringu1="INAAAA",stringu2="WTHAAA",string4="AAAAxx" 453513600000000000 +tenk unique1=6446i,unique2=5249i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=446i,twothousand=446i,fivethous=1446i,tenthous=6446i,odd=92i,even=93i,stringu1="YNAAAA",stringu2="XTHAAA",string4="HHHHxx" 453600000000000000 +tenk unique1=7758i,unique2=5250i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=758i,twothousand=1758i,fivethous=2758i,tenthous=7758i,odd=116i,even=117i,stringu1="KMAAAA",stringu2="YTHAAA",string4="OOOOxx" 453686400000000000 +tenk unique1=356i,unique2=5251i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=356i,twothousand=356i,fivethous=356i,tenthous=356i,odd=112i,even=113i,stringu1="SNAAAA",stringu2="ZTHAAA",string4="VVVVxx" 453772800000000000 +tenk unique1=9197i,unique2=5252i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=197i,twothousand=1197i,fivethous=4197i,tenthous=9197i,odd=194i,even=195i,stringu1="TPAAAA",stringu2="AUHAAA",string4="AAAAxx" 453859200000000000 +tenk unique1=9765i,unique2=5253i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=765i,twothousand=1765i,fivethous=4765i,tenthous=9765i,odd=130i,even=131i,stringu1="PLAAAA",stringu2="BUHAAA",string4="HHHHxx" 453945600000000000 +tenk unique1=4974i,unique2=5254i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=974i,twothousand=974i,fivethous=4974i,tenthous=4974i,odd=148i,even=149i,stringu1="IJAAAA",stringu2="CUHAAA",string4="OOOOxx" 454032000000000000 +tenk unique1=442i,unique2=5255i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=442i,twothousand=442i,fivethous=442i,tenthous=442i,odd=84i,even=85i,stringu1="ARAAAA",stringu2="DUHAAA",string4="VVVVxx" 454118400000000000 +tenk unique1=4349i,unique2=5256i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=349i,twothousand=349i,fivethous=4349i,tenthous=4349i,odd=98i,even=99i,stringu1="HLAAAA",stringu2="EUHAAA",string4="AAAAxx" 454204800000000000 +tenk unique1=6119i,unique2=5257i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=119i,twothousand=119i,fivethous=1119i,tenthous=6119i,odd=38i,even=39i,stringu1="JBAAAA",stringu2="FUHAAA",string4="HHHHxx" 454291200000000000 +tenk unique1=7574i,unique2=5258i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=574i,twothousand=1574i,fivethous=2574i,tenthous=7574i,odd=148i,even=149i,stringu1="IFAAAA",stringu2="GUHAAA",string4="OOOOxx" 454377600000000000 +tenk unique1=4445i,unique2=5259i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=445i,twothousand=445i,fivethous=4445i,tenthous=4445i,odd=90i,even=91i,stringu1="ZOAAAA",stringu2="HUHAAA",string4="VVVVxx" 454464000000000000 +tenk unique1=940i,unique2=5260i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=940i,twothousand=940i,fivethous=940i,tenthous=940i,odd=80i,even=81i,stringu1="EKAAAA",stringu2="IUHAAA",string4="AAAAxx" 454550400000000000 +tenk unique1=1875i,unique2=5261i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=875i,twothousand=1875i,fivethous=1875i,tenthous=1875i,odd=150i,even=151i,stringu1="DUAAAA",stringu2="JUHAAA",string4="HHHHxx" 454636800000000000 +tenk unique1=5951i,unique2=5262i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=951i,twothousand=1951i,fivethous=951i,tenthous=5951i,odd=102i,even=103i,stringu1="XUAAAA",stringu2="KUHAAA",string4="OOOOxx" 454723200000000000 +tenk unique1=9132i,unique2=5263i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=132i,twothousand=1132i,fivethous=4132i,tenthous=9132i,odd=64i,even=65i,stringu1="GNAAAA",stringu2="LUHAAA",string4="VVVVxx" 454809600000000000 +tenk unique1=6913i,unique2=5264i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=913i,twothousand=913i,fivethous=1913i,tenthous=6913i,odd=26i,even=27i,stringu1="XFAAAA",stringu2="MUHAAA",string4="AAAAxx" 454896000000000000 +tenk unique1=3308i,unique2=5265i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=308i,twothousand=1308i,fivethous=3308i,tenthous=3308i,odd=16i,even=17i,stringu1="GXAAAA",stringu2="NUHAAA",string4="HHHHxx" 454982400000000000 +tenk unique1=7553i,unique2=5266i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=553i,twothousand=1553i,fivethous=2553i,tenthous=7553i,odd=106i,even=107i,stringu1="NEAAAA",stringu2="OUHAAA",string4="OOOOxx" 455068800000000000 +tenk unique1=2138i,unique2=5267i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=138i,twothousand=138i,fivethous=2138i,tenthous=2138i,odd=76i,even=77i,stringu1="GEAAAA",stringu2="PUHAAA",string4="VVVVxx" 455155200000000000 +tenk unique1=6252i,unique2=5268i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=252i,twothousand=252i,fivethous=1252i,tenthous=6252i,odd=104i,even=105i,stringu1="MGAAAA",stringu2="QUHAAA",string4="AAAAxx" 455241600000000000 +tenk unique1=2171i,unique2=5269i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=171i,twothousand=171i,fivethous=2171i,tenthous=2171i,odd=142i,even=143i,stringu1="NFAAAA",stringu2="RUHAAA",string4="HHHHxx" 455328000000000000 +tenk unique1=4159i,unique2=5270i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=159i,twothousand=159i,fivethous=4159i,tenthous=4159i,odd=118i,even=119i,stringu1="ZDAAAA",stringu2="SUHAAA",string4="OOOOxx" 455414400000000000 +tenk unique1=2401i,unique2=5271i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=401i,twothousand=401i,fivethous=2401i,tenthous=2401i,odd=2i,even=3i,stringu1="JOAAAA",stringu2="TUHAAA",string4="VVVVxx" 455500800000000000 +tenk unique1=6553i,unique2=5272i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=553i,twothousand=553i,fivethous=1553i,tenthous=6553i,odd=106i,even=107i,stringu1="BSAAAA",stringu2="UUHAAA",string4="AAAAxx" 455587200000000000 +tenk unique1=5217i,unique2=5273i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=217i,twothousand=1217i,fivethous=217i,tenthous=5217i,odd=34i,even=35i,stringu1="RSAAAA",stringu2="VUHAAA",string4="HHHHxx" 455673600000000000 +tenk unique1=1405i,unique2=5274i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=405i,twothousand=1405i,fivethous=1405i,tenthous=1405i,odd=10i,even=11i,stringu1="BCAAAA",stringu2="WUHAAA",string4="OOOOxx" 455760000000000000 +tenk unique1=1494i,unique2=5275i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=494i,twothousand=1494i,fivethous=1494i,tenthous=1494i,odd=188i,even=189i,stringu1="MFAAAA",stringu2="XUHAAA",string4="VVVVxx" 455846400000000000 +tenk unique1=5553i,unique2=5276i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=553i,twothousand=1553i,fivethous=553i,tenthous=5553i,odd=106i,even=107i,stringu1="PFAAAA",stringu2="YUHAAA",string4="AAAAxx" 455932800000000000 +tenk unique1=8296i,unique2=5277i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=296i,twothousand=296i,fivethous=3296i,tenthous=8296i,odd=192i,even=193i,stringu1="CHAAAA",stringu2="ZUHAAA",string4="HHHHxx" 456019200000000000 +tenk unique1=6565i,unique2=5278i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=565i,twothousand=565i,fivethous=1565i,tenthous=6565i,odd=130i,even=131i,stringu1="NSAAAA",stringu2="AVHAAA",string4="OOOOxx" 456105600000000000 +tenk unique1=817i,unique2=5279i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=817i,twothousand=817i,fivethous=817i,tenthous=817i,odd=34i,even=35i,stringu1="LFAAAA",stringu2="BVHAAA",string4="VVVVxx" 456192000000000000 +tenk unique1=6947i,unique2=5280i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=947i,twothousand=947i,fivethous=1947i,tenthous=6947i,odd=94i,even=95i,stringu1="FHAAAA",stringu2="CVHAAA",string4="AAAAxx" 456278400000000000 +tenk unique1=4184i,unique2=5281i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=184i,twothousand=184i,fivethous=4184i,tenthous=4184i,odd=168i,even=169i,stringu1="YEAAAA",stringu2="DVHAAA",string4="HHHHxx" 456364800000000000 +tenk unique1=6577i,unique2=5282i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=577i,twothousand=577i,fivethous=1577i,tenthous=6577i,odd=154i,even=155i,stringu1="ZSAAAA",stringu2="EVHAAA",string4="OOOOxx" 456451200000000000 +tenk unique1=6424i,unique2=5283i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=424i,twothousand=424i,fivethous=1424i,tenthous=6424i,odd=48i,even=49i,stringu1="CNAAAA",stringu2="FVHAAA",string4="VVVVxx" 456537600000000000 +tenk unique1=2482i,unique2=5284i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=482i,twothousand=482i,fivethous=2482i,tenthous=2482i,odd=164i,even=165i,stringu1="MRAAAA",stringu2="GVHAAA",string4="AAAAxx" 456624000000000000 +tenk unique1=6874i,unique2=5285i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=874i,twothousand=874i,fivethous=1874i,tenthous=6874i,odd=148i,even=149i,stringu1="KEAAAA",stringu2="HVHAAA",string4="HHHHxx" 456710400000000000 +tenk unique1=7601i,unique2=5286i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=601i,twothousand=1601i,fivethous=2601i,tenthous=7601i,odd=2i,even=3i,stringu1="JGAAAA",stringu2="IVHAAA",string4="OOOOxx" 456796800000000000 +tenk unique1=4552i,unique2=5287i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=552i,twothousand=552i,fivethous=4552i,tenthous=4552i,odd=104i,even=105i,stringu1="CTAAAA",stringu2="JVHAAA",string4="VVVVxx" 456883200000000000 +tenk unique1=8406i,unique2=5288i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=406i,twothousand=406i,fivethous=3406i,tenthous=8406i,odd=12i,even=13i,stringu1="ILAAAA",stringu2="KVHAAA",string4="AAAAxx" 456969600000000000 +tenk unique1=2924i,unique2=5289i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=924i,twothousand=924i,fivethous=2924i,tenthous=2924i,odd=48i,even=49i,stringu1="MIAAAA",stringu2="LVHAAA",string4="HHHHxx" 457056000000000000 +tenk unique1=8255i,unique2=5290i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=255i,twothousand=255i,fivethous=3255i,tenthous=8255i,odd=110i,even=111i,stringu1="NFAAAA",stringu2="MVHAAA",string4="OOOOxx" 457142400000000000 +tenk unique1=4920i,unique2=5291i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=920i,twothousand=920i,fivethous=4920i,tenthous=4920i,odd=40i,even=41i,stringu1="GHAAAA",stringu2="NVHAAA",string4="VVVVxx" 457228800000000000 +tenk unique1=228i,unique2=5292i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=228i,twothousand=228i,fivethous=228i,tenthous=228i,odd=56i,even=57i,stringu1="UIAAAA",stringu2="OVHAAA",string4="AAAAxx" 457315200000000000 +tenk unique1=9431i,unique2=5293i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=431i,twothousand=1431i,fivethous=4431i,tenthous=9431i,odd=62i,even=63i,stringu1="TYAAAA",stringu2="PVHAAA",string4="HHHHxx" 457401600000000000 +tenk unique1=4021i,unique2=5294i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=21i,twothousand=21i,fivethous=4021i,tenthous=4021i,odd=42i,even=43i,stringu1="RYAAAA",stringu2="QVHAAA",string4="OOOOxx" 457488000000000000 +tenk unique1=2966i,unique2=5295i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=966i,twothousand=966i,fivethous=2966i,tenthous=2966i,odd=132i,even=133i,stringu1="CKAAAA",stringu2="RVHAAA",string4="VVVVxx" 457574400000000000 +tenk unique1=2862i,unique2=5296i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=862i,twothousand=862i,fivethous=2862i,tenthous=2862i,odd=124i,even=125i,stringu1="CGAAAA",stringu2="SVHAAA",string4="AAAAxx" 457660800000000000 +tenk unique1=4303i,unique2=5297i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=303i,twothousand=303i,fivethous=4303i,tenthous=4303i,odd=6i,even=7i,stringu1="NJAAAA",stringu2="TVHAAA",string4="HHHHxx" 457747200000000000 +tenk unique1=9643i,unique2=5298i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=643i,twothousand=1643i,fivethous=4643i,tenthous=9643i,odd=86i,even=87i,stringu1="XGAAAA",stringu2="UVHAAA",string4="OOOOxx" 457833600000000000 +tenk unique1=3008i,unique2=5299i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=1008i,fivethous=3008i,tenthous=3008i,odd=16i,even=17i,stringu1="SLAAAA",stringu2="VVHAAA",string4="VVVVxx" 457920000000000000 +tenk unique1=7476i,unique2=5300i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=476i,twothousand=1476i,fivethous=2476i,tenthous=7476i,odd=152i,even=153i,stringu1="OBAAAA",stringu2="WVHAAA",string4="AAAAxx" 458006400000000000 +tenk unique1=3686i,unique2=5301i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=686i,twothousand=1686i,fivethous=3686i,tenthous=3686i,odd=172i,even=173i,stringu1="ULAAAA",stringu2="XVHAAA",string4="HHHHxx" 458092800000000000 +tenk unique1=9051i,unique2=5302i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=51i,twothousand=1051i,fivethous=4051i,tenthous=9051i,odd=102i,even=103i,stringu1="DKAAAA",stringu2="YVHAAA",string4="OOOOxx" 458179200000000000 +tenk unique1=6592i,unique2=5303i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=592i,twothousand=592i,fivethous=1592i,tenthous=6592i,odd=184i,even=185i,stringu1="OTAAAA",stringu2="ZVHAAA",string4="VVVVxx" 458265600000000000 +tenk unique1=924i,unique2=5304i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=924i,twothousand=924i,fivethous=924i,tenthous=924i,odd=48i,even=49i,stringu1="OJAAAA",stringu2="AWHAAA",string4="AAAAxx" 458352000000000000 +tenk unique1=4406i,unique2=5305i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=406i,twothousand=406i,fivethous=4406i,tenthous=4406i,odd=12i,even=13i,stringu1="MNAAAA",stringu2="BWHAAA",string4="HHHHxx" 458438400000000000 +tenk unique1=5233i,unique2=5306i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=233i,twothousand=1233i,fivethous=233i,tenthous=5233i,odd=66i,even=67i,stringu1="HTAAAA",stringu2="CWHAAA",string4="OOOOxx" 458524800000000000 +tenk unique1=8881i,unique2=5307i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=881i,twothousand=881i,fivethous=3881i,tenthous=8881i,odd=162i,even=163i,stringu1="PDAAAA",stringu2="DWHAAA",string4="VVVVxx" 458611200000000000 +tenk unique1=2212i,unique2=5308i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=212i,twothousand=212i,fivethous=2212i,tenthous=2212i,odd=24i,even=25i,stringu1="CHAAAA",stringu2="EWHAAA",string4="AAAAxx" 458697600000000000 +tenk unique1=5804i,unique2=5309i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=804i,twothousand=1804i,fivethous=804i,tenthous=5804i,odd=8i,even=9i,stringu1="GPAAAA",stringu2="FWHAAA",string4="HHHHxx" 458784000000000000 +tenk unique1=2990i,unique2=5310i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=990i,twothousand=990i,fivethous=2990i,tenthous=2990i,odd=180i,even=181i,stringu1="ALAAAA",stringu2="GWHAAA",string4="OOOOxx" 458870400000000000 +tenk unique1=4069i,unique2=5311i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=69i,twothousand=69i,fivethous=4069i,tenthous=4069i,odd=138i,even=139i,stringu1="NAAAAA",stringu2="HWHAAA",string4="VVVVxx" 458956800000000000 +tenk unique1=5380i,unique2=5312i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=380i,twothousand=1380i,fivethous=380i,tenthous=5380i,odd=160i,even=161i,stringu1="YYAAAA",stringu2="IWHAAA",string4="AAAAxx" 459043200000000000 +tenk unique1=5016i,unique2=5313i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=16i,twothousand=1016i,fivethous=16i,tenthous=5016i,odd=32i,even=33i,stringu1="YKAAAA",stringu2="JWHAAA",string4="HHHHxx" 459129600000000000 +tenk unique1=5056i,unique2=5314i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=56i,twothousand=1056i,fivethous=56i,tenthous=5056i,odd=112i,even=113i,stringu1="MMAAAA",stringu2="KWHAAA",string4="OOOOxx" 459216000000000000 +tenk unique1=3732i,unique2=5315i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=732i,twothousand=1732i,fivethous=3732i,tenthous=3732i,odd=64i,even=65i,stringu1="ONAAAA",stringu2="LWHAAA",string4="VVVVxx" 459302400000000000 +tenk unique1=5527i,unique2=5316i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=527i,twothousand=1527i,fivethous=527i,tenthous=5527i,odd=54i,even=55i,stringu1="PEAAAA",stringu2="MWHAAA",string4="AAAAxx" 459388800000000000 +tenk unique1=1151i,unique2=5317i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=151i,twothousand=1151i,fivethous=1151i,tenthous=1151i,odd=102i,even=103i,stringu1="HSAAAA",stringu2="NWHAAA",string4="HHHHxx" 459475200000000000 +tenk unique1=7900i,unique2=5318i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=900i,twothousand=1900i,fivethous=2900i,tenthous=7900i,odd=0i,even=1i,stringu1="WRAAAA",stringu2="OWHAAA",string4="OOOOxx" 459561600000000000 +tenk unique1=1660i,unique2=5319i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=660i,twothousand=1660i,fivethous=1660i,tenthous=1660i,odd=120i,even=121i,stringu1="WLAAAA",stringu2="PWHAAA",string4="VVVVxx" 459648000000000000 +tenk unique1=8064i,unique2=5320i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=64i,twothousand=64i,fivethous=3064i,tenthous=8064i,odd=128i,even=129i,stringu1="EYAAAA",stringu2="QWHAAA",string4="AAAAxx" 459734400000000000 +tenk unique1=8240i,unique2=5321i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=240i,twothousand=240i,fivethous=3240i,tenthous=8240i,odd=80i,even=81i,stringu1="YEAAAA",stringu2="RWHAAA",string4="HHHHxx" 459820800000000000 +tenk unique1=413i,unique2=5322i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=413i,twothousand=413i,fivethous=413i,tenthous=413i,odd=26i,even=27i,stringu1="XPAAAA",stringu2="SWHAAA",string4="OOOOxx" 459907200000000000 +tenk unique1=8311i,unique2=5323i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=311i,twothousand=311i,fivethous=3311i,tenthous=8311i,odd=22i,even=23i,stringu1="RHAAAA",stringu2="TWHAAA",string4="VVVVxx" 459993600000000000 +tenk unique1=1065i,unique2=5324i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=65i,twothousand=1065i,fivethous=1065i,tenthous=1065i,odd=130i,even=131i,stringu1="ZOAAAA",stringu2="UWHAAA",string4="AAAAxx" 460080000000000000 +tenk unique1=2741i,unique2=5325i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=741i,twothousand=741i,fivethous=2741i,tenthous=2741i,odd=82i,even=83i,stringu1="LBAAAA",stringu2="VWHAAA",string4="HHHHxx" 460166400000000000 +tenk unique1=5306i,unique2=5326i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=306i,twothousand=1306i,fivethous=306i,tenthous=5306i,odd=12i,even=13i,stringu1="CWAAAA",stringu2="WWHAAA",string4="OOOOxx" 460252800000000000 +tenk unique1=5464i,unique2=5327i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=464i,twothousand=1464i,fivethous=464i,tenthous=5464i,odd=128i,even=129i,stringu1="ECAAAA",stringu2="XWHAAA",string4="VVVVxx" 460339200000000000 +tenk unique1=4237i,unique2=5328i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=237i,twothousand=237i,fivethous=4237i,tenthous=4237i,odd=74i,even=75i,stringu1="ZGAAAA",stringu2="YWHAAA",string4="AAAAxx" 460425600000000000 +tenk unique1=3822i,unique2=5329i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=822i,twothousand=1822i,fivethous=3822i,tenthous=3822i,odd=44i,even=45i,stringu1="ARAAAA",stringu2="ZWHAAA",string4="HHHHxx" 460512000000000000 +tenk unique1=2548i,unique2=5330i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=548i,twothousand=548i,fivethous=2548i,tenthous=2548i,odd=96i,even=97i,stringu1="AUAAAA",stringu2="AXHAAA",string4="OOOOxx" 460598400000000000 +tenk unique1=2688i,unique2=5331i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=688i,twothousand=688i,fivethous=2688i,tenthous=2688i,odd=176i,even=177i,stringu1="KZAAAA",stringu2="BXHAAA",string4="VVVVxx" 460684800000000000 +tenk unique1=8061i,unique2=5332i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=61i,twothousand=61i,fivethous=3061i,tenthous=8061i,odd=122i,even=123i,stringu1="BYAAAA",stringu2="CXHAAA",string4="AAAAxx" 460771200000000000 +tenk unique1=9340i,unique2=5333i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=340i,twothousand=1340i,fivethous=4340i,tenthous=9340i,odd=80i,even=81i,stringu1="GVAAAA",stringu2="DXHAAA",string4="HHHHxx" 460857600000000000 +tenk unique1=4031i,unique2=5334i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=31i,twothousand=31i,fivethous=4031i,tenthous=4031i,odd=62i,even=63i,stringu1="BZAAAA",stringu2="EXHAAA",string4="OOOOxx" 460944000000000000 +tenk unique1=2635i,unique2=5335i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=635i,twothousand=635i,fivethous=2635i,tenthous=2635i,odd=70i,even=71i,stringu1="JXAAAA",stringu2="FXHAAA",string4="VVVVxx" 461030400000000000 +tenk unique1=809i,unique2=5336i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=809i,twothousand=809i,fivethous=809i,tenthous=809i,odd=18i,even=19i,stringu1="DFAAAA",stringu2="GXHAAA",string4="AAAAxx" 461116800000000000 +tenk unique1=3209i,unique2=5337i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=209i,twothousand=1209i,fivethous=3209i,tenthous=3209i,odd=18i,even=19i,stringu1="LTAAAA",stringu2="HXHAAA",string4="HHHHxx" 461203200000000000 +tenk unique1=3825i,unique2=5338i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=825i,twothousand=1825i,fivethous=3825i,tenthous=3825i,odd=50i,even=51i,stringu1="DRAAAA",stringu2="IXHAAA",string4="OOOOxx" 461289600000000000 +tenk unique1=1448i,unique2=5339i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=448i,twothousand=1448i,fivethous=1448i,tenthous=1448i,odd=96i,even=97i,stringu1="SDAAAA",stringu2="JXHAAA",string4="VVVVxx" 461376000000000000 +tenk unique1=9077i,unique2=5340i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=77i,twothousand=1077i,fivethous=4077i,tenthous=9077i,odd=154i,even=155i,stringu1="DLAAAA",stringu2="KXHAAA",string4="AAAAxx" 461462400000000000 +tenk unique1=3730i,unique2=5341i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=730i,twothousand=1730i,fivethous=3730i,tenthous=3730i,odd=60i,even=61i,stringu1="MNAAAA",stringu2="LXHAAA",string4="HHHHxx" 461548800000000000 +tenk unique1=9596i,unique2=5342i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=596i,twothousand=1596i,fivethous=4596i,tenthous=9596i,odd=192i,even=193i,stringu1="CFAAAA",stringu2="MXHAAA",string4="OOOOxx" 461635200000000000 +tenk unique1=3563i,unique2=5343i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=563i,twothousand=1563i,fivethous=3563i,tenthous=3563i,odd=126i,even=127i,stringu1="BHAAAA",stringu2="NXHAAA",string4="VVVVxx" 461721600000000000 +tenk unique1=4116i,unique2=5344i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=116i,twothousand=116i,fivethous=4116i,tenthous=4116i,odd=32i,even=33i,stringu1="ICAAAA",stringu2="OXHAAA",string4="AAAAxx" 461808000000000000 +tenk unique1=4825i,unique2=5345i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=825i,twothousand=825i,fivethous=4825i,tenthous=4825i,odd=50i,even=51i,stringu1="PDAAAA",stringu2="PXHAAA",string4="HHHHxx" 461894400000000000 +tenk unique1=8376i,unique2=5346i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=376i,twothousand=376i,fivethous=3376i,tenthous=8376i,odd=152i,even=153i,stringu1="EKAAAA",stringu2="QXHAAA",string4="OOOOxx" 461980800000000000 +tenk unique1=3917i,unique2=5347i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=917i,twothousand=1917i,fivethous=3917i,tenthous=3917i,odd=34i,even=35i,stringu1="RUAAAA",stringu2="RXHAAA",string4="VVVVxx" 462067200000000000 +tenk unique1=4407i,unique2=5348i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=407i,twothousand=407i,fivethous=4407i,tenthous=4407i,odd=14i,even=15i,stringu1="NNAAAA",stringu2="SXHAAA",string4="AAAAxx" 462153600000000000 +tenk unique1=8202i,unique2=5349i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=202i,twothousand=202i,fivethous=3202i,tenthous=8202i,odd=4i,even=5i,stringu1="MDAAAA",stringu2="TXHAAA",string4="HHHHxx" 462240000000000000 +tenk unique1=7675i,unique2=5350i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=675i,twothousand=1675i,fivethous=2675i,tenthous=7675i,odd=150i,even=151i,stringu1="FJAAAA",stringu2="UXHAAA",string4="OOOOxx" 462326400000000000 +tenk unique1=4104i,unique2=5351i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=104i,twothousand=104i,fivethous=4104i,tenthous=4104i,odd=8i,even=9i,stringu1="WBAAAA",stringu2="VXHAAA",string4="VVVVxx" 462412800000000000 +tenk unique1=9225i,unique2=5352i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=225i,twothousand=1225i,fivethous=4225i,tenthous=9225i,odd=50i,even=51i,stringu1="VQAAAA",stringu2="WXHAAA",string4="AAAAxx" 462499200000000000 +tenk unique1=2834i,unique2=5353i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=834i,twothousand=834i,fivethous=2834i,tenthous=2834i,odd=68i,even=69i,stringu1="AFAAAA",stringu2="XXHAAA",string4="HHHHxx" 462585600000000000 +tenk unique1=1227i,unique2=5354i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=227i,twothousand=1227i,fivethous=1227i,tenthous=1227i,odd=54i,even=55i,stringu1="FVAAAA",stringu2="YXHAAA",string4="OOOOxx" 462672000000000000 +tenk unique1=3383i,unique2=5355i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=383i,twothousand=1383i,fivethous=3383i,tenthous=3383i,odd=166i,even=167i,stringu1="DAAAAA",stringu2="ZXHAAA",string4="VVVVxx" 462758400000000000 +tenk unique1=67i,unique2=5356i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=67i,twothousand=67i,fivethous=67i,tenthous=67i,odd=134i,even=135i,stringu1="PCAAAA",stringu2="AYHAAA",string4="AAAAxx" 462844800000000000 +tenk unique1=1751i,unique2=5357i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=751i,twothousand=1751i,fivethous=1751i,tenthous=1751i,odd=102i,even=103i,stringu1="JPAAAA",stringu2="BYHAAA",string4="HHHHxx" 462931200000000000 +tenk unique1=8054i,unique2=5358i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=54i,twothousand=54i,fivethous=3054i,tenthous=8054i,odd=108i,even=109i,stringu1="UXAAAA",stringu2="CYHAAA",string4="OOOOxx" 463017600000000000 +tenk unique1=8571i,unique2=5359i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=571i,twothousand=571i,fivethous=3571i,tenthous=8571i,odd=142i,even=143i,stringu1="RRAAAA",stringu2="DYHAAA",string4="VVVVxx" 463104000000000000 +tenk unique1=2466i,unique2=5360i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=466i,twothousand=466i,fivethous=2466i,tenthous=2466i,odd=132i,even=133i,stringu1="WQAAAA",stringu2="EYHAAA",string4="AAAAxx" 463190400000000000 +tenk unique1=9405i,unique2=5361i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=405i,twothousand=1405i,fivethous=4405i,tenthous=9405i,odd=10i,even=11i,stringu1="TXAAAA",stringu2="FYHAAA",string4="HHHHxx" 463276800000000000 +tenk unique1=6883i,unique2=5362i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=883i,twothousand=883i,fivethous=1883i,tenthous=6883i,odd=166i,even=167i,stringu1="TEAAAA",stringu2="GYHAAA",string4="OOOOxx" 463363200000000000 +tenk unique1=4301i,unique2=5363i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=301i,twothousand=301i,fivethous=4301i,tenthous=4301i,odd=2i,even=3i,stringu1="LJAAAA",stringu2="HYHAAA",string4="VVVVxx" 463449600000000000 +tenk unique1=3705i,unique2=5364i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=705i,twothousand=1705i,fivethous=3705i,tenthous=3705i,odd=10i,even=11i,stringu1="NMAAAA",stringu2="IYHAAA",string4="AAAAxx" 463536000000000000 +tenk unique1=5420i,unique2=5365i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=420i,twothousand=1420i,fivethous=420i,tenthous=5420i,odd=40i,even=41i,stringu1="MAAAAA",stringu2="JYHAAA",string4="HHHHxx" 463622400000000000 +tenk unique1=3692i,unique2=5366i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=692i,twothousand=1692i,fivethous=3692i,tenthous=3692i,odd=184i,even=185i,stringu1="AMAAAA",stringu2="KYHAAA",string4="OOOOxx" 463708800000000000 +tenk unique1=6851i,unique2=5367i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=851i,twothousand=851i,fivethous=1851i,tenthous=6851i,odd=102i,even=103i,stringu1="NDAAAA",stringu2="LYHAAA",string4="VVVVxx" 463795200000000000 +tenk unique1=9363i,unique2=5368i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=363i,twothousand=1363i,fivethous=4363i,tenthous=9363i,odd=126i,even=127i,stringu1="DWAAAA",stringu2="MYHAAA",string4="AAAAxx" 463881600000000000 +tenk unique1=2269i,unique2=5369i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=269i,twothousand=269i,fivethous=2269i,tenthous=2269i,odd=138i,even=139i,stringu1="HJAAAA",stringu2="NYHAAA",string4="HHHHxx" 463968000000000000 +tenk unique1=4918i,unique2=5370i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=918i,twothousand=918i,fivethous=4918i,tenthous=4918i,odd=36i,even=37i,stringu1="EHAAAA",stringu2="OYHAAA",string4="OOOOxx" 464054400000000000 +tenk unique1=4297i,unique2=5371i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=297i,twothousand=297i,fivethous=4297i,tenthous=4297i,odd=194i,even=195i,stringu1="HJAAAA",stringu2="PYHAAA",string4="VVVVxx" 464140800000000000 +tenk unique1=1836i,unique2=5372i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=836i,twothousand=1836i,fivethous=1836i,tenthous=1836i,odd=72i,even=73i,stringu1="QSAAAA",stringu2="QYHAAA",string4="AAAAxx" 464227200000000000 +tenk unique1=237i,unique2=5373i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=237i,twothousand=237i,fivethous=237i,tenthous=237i,odd=74i,even=75i,stringu1="DJAAAA",stringu2="RYHAAA",string4="HHHHxx" 464313600000000000 +tenk unique1=6131i,unique2=5374i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=131i,twothousand=131i,fivethous=1131i,tenthous=6131i,odd=62i,even=63i,stringu1="VBAAAA",stringu2="SYHAAA",string4="OOOOxx" 464400000000000000 +tenk unique1=3174i,unique2=5375i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=174i,twothousand=1174i,fivethous=3174i,tenthous=3174i,odd=148i,even=149i,stringu1="CSAAAA",stringu2="TYHAAA",string4="VVVVxx" 464486400000000000 +tenk unique1=9987i,unique2=5376i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=987i,twothousand=1987i,fivethous=4987i,tenthous=9987i,odd=174i,even=175i,stringu1="DUAAAA",stringu2="UYHAAA",string4="AAAAxx" 464572800000000000 +tenk unique1=3630i,unique2=5377i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=630i,twothousand=1630i,fivethous=3630i,tenthous=3630i,odd=60i,even=61i,stringu1="QJAAAA",stringu2="VYHAAA",string4="HHHHxx" 464659200000000000 +tenk unique1=2899i,unique2=5378i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=899i,twothousand=899i,fivethous=2899i,tenthous=2899i,odd=198i,even=199i,stringu1="NHAAAA",stringu2="WYHAAA",string4="OOOOxx" 464745600000000000 +tenk unique1=4079i,unique2=5379i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=79i,twothousand=79i,fivethous=4079i,tenthous=4079i,odd=158i,even=159i,stringu1="XAAAAA",stringu2="XYHAAA",string4="VVVVxx" 464832000000000000 +tenk unique1=5049i,unique2=5380i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=49i,twothousand=1049i,fivethous=49i,tenthous=5049i,odd=98i,even=99i,stringu1="FMAAAA",stringu2="YYHAAA",string4="AAAAxx" 464918400000000000 +tenk unique1=2963i,unique2=5381i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=963i,twothousand=963i,fivethous=2963i,tenthous=2963i,odd=126i,even=127i,stringu1="ZJAAAA",stringu2="ZYHAAA",string4="HHHHxx" 465004800000000000 +tenk unique1=3962i,unique2=5382i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=962i,twothousand=1962i,fivethous=3962i,tenthous=3962i,odd=124i,even=125i,stringu1="KWAAAA",stringu2="AZHAAA",string4="OOOOxx" 465091200000000000 +tenk unique1=7921i,unique2=5383i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=921i,twothousand=1921i,fivethous=2921i,tenthous=7921i,odd=42i,even=43i,stringu1="RSAAAA",stringu2="BZHAAA",string4="VVVVxx" 465177600000000000 +tenk unique1=3967i,unique2=5384i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=967i,twothousand=1967i,fivethous=3967i,tenthous=3967i,odd=134i,even=135i,stringu1="PWAAAA",stringu2="CZHAAA",string4="AAAAxx" 465264000000000000 +tenk unique1=2752i,unique2=5385i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=752i,twothousand=752i,fivethous=2752i,tenthous=2752i,odd=104i,even=105i,stringu1="WBAAAA",stringu2="DZHAAA",string4="HHHHxx" 465350400000000000 +tenk unique1=7944i,unique2=5386i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=944i,twothousand=1944i,fivethous=2944i,tenthous=7944i,odd=88i,even=89i,stringu1="OTAAAA",stringu2="EZHAAA",string4="OOOOxx" 465436800000000000 +tenk unique1=2205i,unique2=5387i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=205i,twothousand=205i,fivethous=2205i,tenthous=2205i,odd=10i,even=11i,stringu1="VGAAAA",stringu2="FZHAAA",string4="VVVVxx" 465523200000000000 +tenk unique1=5035i,unique2=5388i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=35i,twothousand=1035i,fivethous=35i,tenthous=5035i,odd=70i,even=71i,stringu1="RLAAAA",stringu2="GZHAAA",string4="AAAAxx" 465609600000000000 +tenk unique1=1425i,unique2=5389i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=425i,twothousand=1425i,fivethous=1425i,tenthous=1425i,odd=50i,even=51i,stringu1="VCAAAA",stringu2="HZHAAA",string4="HHHHxx" 465696000000000000 +tenk unique1=832i,unique2=5390i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=832i,twothousand=832i,fivethous=832i,tenthous=832i,odd=64i,even=65i,stringu1="AGAAAA",stringu2="IZHAAA",string4="OOOOxx" 465782400000000000 +tenk unique1=1447i,unique2=5391i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=447i,twothousand=1447i,fivethous=1447i,tenthous=1447i,odd=94i,even=95i,stringu1="RDAAAA",stringu2="JZHAAA",string4="VVVVxx" 465868800000000000 +tenk unique1=6108i,unique2=5392i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=108i,twothousand=108i,fivethous=1108i,tenthous=6108i,odd=16i,even=17i,stringu1="YAAAAA",stringu2="KZHAAA",string4="AAAAxx" 465955200000000000 +tenk unique1=4936i,unique2=5393i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=936i,twothousand=936i,fivethous=4936i,tenthous=4936i,odd=72i,even=73i,stringu1="WHAAAA",stringu2="LZHAAA",string4="HHHHxx" 466041600000000000 +tenk unique1=7704i,unique2=5394i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=704i,twothousand=1704i,fivethous=2704i,tenthous=7704i,odd=8i,even=9i,stringu1="IKAAAA",stringu2="MZHAAA",string4="OOOOxx" 466128000000000000 +tenk unique1=142i,unique2=5395i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=142i,twothousand=142i,fivethous=142i,tenthous=142i,odd=84i,even=85i,stringu1="MFAAAA",stringu2="NZHAAA",string4="VVVVxx" 466214400000000000 +tenk unique1=4272i,unique2=5396i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=272i,twothousand=272i,fivethous=4272i,tenthous=4272i,odd=144i,even=145i,stringu1="IIAAAA",stringu2="OZHAAA",string4="AAAAxx" 466300800000000000 +tenk unique1=7667i,unique2=5397i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=667i,twothousand=1667i,fivethous=2667i,tenthous=7667i,odd=134i,even=135i,stringu1="XIAAAA",stringu2="PZHAAA",string4="HHHHxx" 466387200000000000 +tenk unique1=366i,unique2=5398i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=366i,twothousand=366i,fivethous=366i,tenthous=366i,odd=132i,even=133i,stringu1="COAAAA",stringu2="QZHAAA",string4="OOOOxx" 466473600000000000 +tenk unique1=8866i,unique2=5399i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=866i,twothousand=866i,fivethous=3866i,tenthous=8866i,odd=132i,even=133i,stringu1="ADAAAA",stringu2="RZHAAA",string4="VVVVxx" 466560000000000000 +tenk unique1=7712i,unique2=5400i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=712i,twothousand=1712i,fivethous=2712i,tenthous=7712i,odd=24i,even=25i,stringu1="QKAAAA",stringu2="SZHAAA",string4="AAAAxx" 466646400000000000 +tenk unique1=3880i,unique2=5401i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=880i,twothousand=1880i,fivethous=3880i,tenthous=3880i,odd=160i,even=161i,stringu1="GTAAAA",stringu2="TZHAAA",string4="HHHHxx" 466732800000000000 +tenk unique1=4631i,unique2=5402i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=631i,twothousand=631i,fivethous=4631i,tenthous=4631i,odd=62i,even=63i,stringu1="DWAAAA",stringu2="UZHAAA",string4="OOOOxx" 466819200000000000 +tenk unique1=2789i,unique2=5403i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=789i,twothousand=789i,fivethous=2789i,tenthous=2789i,odd=178i,even=179i,stringu1="HDAAAA",stringu2="VZHAAA",string4="VVVVxx" 466905600000000000 +tenk unique1=7720i,unique2=5404i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=720i,twothousand=1720i,fivethous=2720i,tenthous=7720i,odd=40i,even=41i,stringu1="YKAAAA",stringu2="WZHAAA",string4="AAAAxx" 466992000000000000 +tenk unique1=7618i,unique2=5405i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=618i,twothousand=1618i,fivethous=2618i,tenthous=7618i,odd=36i,even=37i,stringu1="AHAAAA",stringu2="XZHAAA",string4="HHHHxx" 467078400000000000 +tenk unique1=4990i,unique2=5406i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=990i,twothousand=990i,fivethous=4990i,tenthous=4990i,odd=180i,even=181i,stringu1="YJAAAA",stringu2="YZHAAA",string4="OOOOxx" 467164800000000000 +tenk unique1=7918i,unique2=5407i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=918i,twothousand=1918i,fivethous=2918i,tenthous=7918i,odd=36i,even=37i,stringu1="OSAAAA",stringu2="ZZHAAA",string4="VVVVxx" 467251200000000000 +tenk unique1=5067i,unique2=5408i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=67i,twothousand=1067i,fivethous=67i,tenthous=5067i,odd=134i,even=135i,stringu1="XMAAAA",stringu2="AAIAAA",string4="AAAAxx" 467337600000000000 +tenk unique1=6370i,unique2=5409i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=370i,twothousand=370i,fivethous=1370i,tenthous=6370i,odd=140i,even=141i,stringu1="ALAAAA",stringu2="BAIAAA",string4="HHHHxx" 467424000000000000 +tenk unique1=2268i,unique2=5410i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=268i,twothousand=268i,fivethous=2268i,tenthous=2268i,odd=136i,even=137i,stringu1="GJAAAA",stringu2="CAIAAA",string4="OOOOxx" 467510400000000000 +tenk unique1=1949i,unique2=5411i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=949i,twothousand=1949i,fivethous=1949i,tenthous=1949i,odd=98i,even=99i,stringu1="ZWAAAA",stringu2="DAIAAA",string4="VVVVxx" 467596800000000000 +tenk unique1=5503i,unique2=5412i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=503i,twothousand=1503i,fivethous=503i,tenthous=5503i,odd=6i,even=7i,stringu1="RDAAAA",stringu2="EAIAAA",string4="AAAAxx" 467683200000000000 +tenk unique1=9951i,unique2=5413i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=951i,twothousand=1951i,fivethous=4951i,tenthous=9951i,odd=102i,even=103i,stringu1="TSAAAA",stringu2="FAIAAA",string4="HHHHxx" 467769600000000000 +tenk unique1=6823i,unique2=5414i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=823i,twothousand=823i,fivethous=1823i,tenthous=6823i,odd=46i,even=47i,stringu1="LCAAAA",stringu2="GAIAAA",string4="OOOOxx" 467856000000000000 +tenk unique1=6287i,unique2=5415i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=287i,twothousand=287i,fivethous=1287i,tenthous=6287i,odd=174i,even=175i,stringu1="VHAAAA",stringu2="HAIAAA",string4="VVVVxx" 467942400000000000 +tenk unique1=6016i,unique2=5416i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=16i,twothousand=16i,fivethous=1016i,tenthous=6016i,odd=32i,even=33i,stringu1="KXAAAA",stringu2="IAIAAA",string4="AAAAxx" 468028800000000000 +tenk unique1=1977i,unique2=5417i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=977i,twothousand=1977i,fivethous=1977i,tenthous=1977i,odd=154i,even=155i,stringu1="BYAAAA",stringu2="JAIAAA",string4="HHHHxx" 468115200000000000 +tenk unique1=8579i,unique2=5418i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=579i,twothousand=579i,fivethous=3579i,tenthous=8579i,odd=158i,even=159i,stringu1="ZRAAAA",stringu2="KAIAAA",string4="OOOOxx" 468201600000000000 +tenk unique1=6204i,unique2=5419i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=204i,twothousand=204i,fivethous=1204i,tenthous=6204i,odd=8i,even=9i,stringu1="QEAAAA",stringu2="LAIAAA",string4="VVVVxx" 468288000000000000 +tenk unique1=9764i,unique2=5420i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=764i,twothousand=1764i,fivethous=4764i,tenthous=9764i,odd=128i,even=129i,stringu1="OLAAAA",stringu2="MAIAAA",string4="AAAAxx" 468374400000000000 +tenk unique1=2005i,unique2=5421i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=5i,fivethous=2005i,tenthous=2005i,odd=10i,even=11i,stringu1="DZAAAA",stringu2="NAIAAA",string4="HHHHxx" 468460800000000000 +tenk unique1=1648i,unique2=5422i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=648i,twothousand=1648i,fivethous=1648i,tenthous=1648i,odd=96i,even=97i,stringu1="KLAAAA",stringu2="OAIAAA",string4="OOOOxx" 468547200000000000 +tenk unique1=2457i,unique2=5423i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=457i,twothousand=457i,fivethous=2457i,tenthous=2457i,odd=114i,even=115i,stringu1="NQAAAA",stringu2="PAIAAA",string4="VVVVxx" 468633600000000000 +tenk unique1=2698i,unique2=5424i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=698i,twothousand=698i,fivethous=2698i,tenthous=2698i,odd=196i,even=197i,stringu1="UZAAAA",stringu2="QAIAAA",string4="AAAAxx" 468720000000000000 +tenk unique1=7730i,unique2=5425i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=730i,twothousand=1730i,fivethous=2730i,tenthous=7730i,odd=60i,even=61i,stringu1="ILAAAA",stringu2="RAIAAA",string4="HHHHxx" 468806400000000000 +tenk unique1=7287i,unique2=5426i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=287i,twothousand=1287i,fivethous=2287i,tenthous=7287i,odd=174i,even=175i,stringu1="HUAAAA",stringu2="SAIAAA",string4="OOOOxx" 468892800000000000 +tenk unique1=2937i,unique2=5427i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=937i,twothousand=937i,fivethous=2937i,tenthous=2937i,odd=74i,even=75i,stringu1="ZIAAAA",stringu2="TAIAAA",string4="VVVVxx" 468979200000000000 +tenk unique1=6824i,unique2=5428i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=824i,twothousand=824i,fivethous=1824i,tenthous=6824i,odd=48i,even=49i,stringu1="MCAAAA",stringu2="UAIAAA",string4="AAAAxx" 469065600000000000 +tenk unique1=9256i,unique2=5429i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=256i,twothousand=1256i,fivethous=4256i,tenthous=9256i,odd=112i,even=113i,stringu1="ASAAAA",stringu2="VAIAAA",string4="HHHHxx" 469152000000000000 +tenk unique1=4810i,unique2=5430i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=810i,twothousand=810i,fivethous=4810i,tenthous=4810i,odd=20i,even=21i,stringu1="ADAAAA",stringu2="WAIAAA",string4="OOOOxx" 469238400000000000 +tenk unique1=3869i,unique2=5431i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=869i,twothousand=1869i,fivethous=3869i,tenthous=3869i,odd=138i,even=139i,stringu1="VSAAAA",stringu2="XAIAAA",string4="VVVVxx" 469324800000000000 +tenk unique1=1993i,unique2=5432i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=993i,twothousand=1993i,fivethous=1993i,tenthous=1993i,odd=186i,even=187i,stringu1="RYAAAA",stringu2="YAIAAA",string4="AAAAxx" 469411200000000000 +tenk unique1=6048i,unique2=5433i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=48i,twothousand=48i,fivethous=1048i,tenthous=6048i,odd=96i,even=97i,stringu1="QYAAAA",stringu2="ZAIAAA",string4="HHHHxx" 469497600000000000 +tenk unique1=6922i,unique2=5434i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=922i,twothousand=922i,fivethous=1922i,tenthous=6922i,odd=44i,even=45i,stringu1="GGAAAA",stringu2="ABIAAA",string4="OOOOxx" 469584000000000000 +tenk unique1=8i,unique2=5435i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=8i,fivethous=8i,tenthous=8i,odd=16i,even=17i,stringu1="IAAAAA",stringu2="BBIAAA",string4="VVVVxx" 469670400000000000 +tenk unique1=6706i,unique2=5436i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=706i,twothousand=706i,fivethous=1706i,tenthous=6706i,odd=12i,even=13i,stringu1="YXAAAA",stringu2="CBIAAA",string4="AAAAxx" 469756800000000000 +tenk unique1=9159i,unique2=5437i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=159i,twothousand=1159i,fivethous=4159i,tenthous=9159i,odd=118i,even=119i,stringu1="HOAAAA",stringu2="DBIAAA",string4="HHHHxx" 469843200000000000 +tenk unique1=7020i,unique2=5438i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=20i,twothousand=1020i,fivethous=2020i,tenthous=7020i,odd=40i,even=41i,stringu1="AKAAAA",stringu2="EBIAAA",string4="OOOOxx" 469929600000000000 +tenk unique1=767i,unique2=5439i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=767i,twothousand=767i,fivethous=767i,tenthous=767i,odd=134i,even=135i,stringu1="NDAAAA",stringu2="FBIAAA",string4="VVVVxx" 470016000000000000 +tenk unique1=8602i,unique2=5440i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=602i,twothousand=602i,fivethous=3602i,tenthous=8602i,odd=4i,even=5i,stringu1="WSAAAA",stringu2="GBIAAA",string4="AAAAxx" 470102400000000000 +tenk unique1=4442i,unique2=5441i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=442i,twothousand=442i,fivethous=4442i,tenthous=4442i,odd=84i,even=85i,stringu1="WOAAAA",stringu2="HBIAAA",string4="HHHHxx" 470188800000000000 +tenk unique1=2040i,unique2=5442i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=40i,twothousand=40i,fivethous=2040i,tenthous=2040i,odd=80i,even=81i,stringu1="MAAAAA",stringu2="IBIAAA",string4="OOOOxx" 470275200000000000 +tenk unique1=5493i,unique2=5443i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=493i,twothousand=1493i,fivethous=493i,tenthous=5493i,odd=186i,even=187i,stringu1="HDAAAA",stringu2="JBIAAA",string4="VVVVxx" 470361600000000000 +tenk unique1=275i,unique2=5444i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=275i,twothousand=275i,fivethous=275i,tenthous=275i,odd=150i,even=151i,stringu1="PKAAAA",stringu2="KBIAAA",string4="AAAAxx" 470448000000000000 +tenk unique1=8876i,unique2=5445i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=876i,twothousand=876i,fivethous=3876i,tenthous=8876i,odd=152i,even=153i,stringu1="KDAAAA",stringu2="LBIAAA",string4="HHHHxx" 470534400000000000 +tenk unique1=7381i,unique2=5446i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=381i,twothousand=1381i,fivethous=2381i,tenthous=7381i,odd=162i,even=163i,stringu1="XXAAAA",stringu2="MBIAAA",string4="OOOOxx" 470620800000000000 +tenk unique1=1827i,unique2=5447i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=827i,twothousand=1827i,fivethous=1827i,tenthous=1827i,odd=54i,even=55i,stringu1="HSAAAA",stringu2="NBIAAA",string4="VVVVxx" 470707200000000000 +tenk unique1=3537i,unique2=5448i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=537i,twothousand=1537i,fivethous=3537i,tenthous=3537i,odd=74i,even=75i,stringu1="BGAAAA",stringu2="OBIAAA",string4="AAAAxx" 470793600000000000 +tenk unique1=6978i,unique2=5449i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=978i,twothousand=978i,fivethous=1978i,tenthous=6978i,odd=156i,even=157i,stringu1="KIAAAA",stringu2="PBIAAA",string4="HHHHxx" 470880000000000000 +tenk unique1=6160i,unique2=5450i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=160i,twothousand=160i,fivethous=1160i,tenthous=6160i,odd=120i,even=121i,stringu1="YCAAAA",stringu2="QBIAAA",string4="OOOOxx" 470966400000000000 +tenk unique1=9219i,unique2=5451i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=219i,twothousand=1219i,fivethous=4219i,tenthous=9219i,odd=38i,even=39i,stringu1="PQAAAA",stringu2="RBIAAA",string4="VVVVxx" 471052800000000000 +tenk unique1=5034i,unique2=5452i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=34i,twothousand=1034i,fivethous=34i,tenthous=5034i,odd=68i,even=69i,stringu1="QLAAAA",stringu2="SBIAAA",string4="AAAAxx" 471139200000000000 +tenk unique1=8463i,unique2=5453i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=463i,twothousand=463i,fivethous=3463i,tenthous=8463i,odd=126i,even=127i,stringu1="NNAAAA",stringu2="TBIAAA",string4="HHHHxx" 471225600000000000 +tenk unique1=2038i,unique2=5454i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=38i,twothousand=38i,fivethous=2038i,tenthous=2038i,odd=76i,even=77i,stringu1="KAAAAA",stringu2="UBIAAA",string4="OOOOxx" 471312000000000000 +tenk unique1=9562i,unique2=5455i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=562i,twothousand=1562i,fivethous=4562i,tenthous=9562i,odd=124i,even=125i,stringu1="UDAAAA",stringu2="VBIAAA",string4="VVVVxx" 471398400000000000 +tenk unique1=2687i,unique2=5456i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=687i,twothousand=687i,fivethous=2687i,tenthous=2687i,odd=174i,even=175i,stringu1="JZAAAA",stringu2="WBIAAA",string4="AAAAxx" 471484800000000000 +tenk unique1=5092i,unique2=5457i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=92i,twothousand=1092i,fivethous=92i,tenthous=5092i,odd=184i,even=185i,stringu1="WNAAAA",stringu2="XBIAAA",string4="HHHHxx" 471571200000000000 +tenk unique1=539i,unique2=5458i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=539i,twothousand=539i,fivethous=539i,tenthous=539i,odd=78i,even=79i,stringu1="TUAAAA",stringu2="YBIAAA",string4="OOOOxx" 471657600000000000 +tenk unique1=2139i,unique2=5459i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=139i,twothousand=139i,fivethous=2139i,tenthous=2139i,odd=78i,even=79i,stringu1="HEAAAA",stringu2="ZBIAAA",string4="VVVVxx" 471744000000000000 +tenk unique1=9221i,unique2=5460i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=221i,twothousand=1221i,fivethous=4221i,tenthous=9221i,odd=42i,even=43i,stringu1="RQAAAA",stringu2="ACIAAA",string4="AAAAxx" 471830400000000000 +tenk unique1=965i,unique2=5461i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=965i,twothousand=965i,fivethous=965i,tenthous=965i,odd=130i,even=131i,stringu1="DLAAAA",stringu2="BCIAAA",string4="HHHHxx" 471916800000000000 +tenk unique1=6051i,unique2=5462i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=51i,twothousand=51i,fivethous=1051i,tenthous=6051i,odd=102i,even=103i,stringu1="TYAAAA",stringu2="CCIAAA",string4="OOOOxx" 472003200000000000 +tenk unique1=5822i,unique2=5463i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=822i,twothousand=1822i,fivethous=822i,tenthous=5822i,odd=44i,even=45i,stringu1="YPAAAA",stringu2="DCIAAA",string4="VVVVxx" 472089600000000000 +tenk unique1=6397i,unique2=5464i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=397i,twothousand=397i,fivethous=1397i,tenthous=6397i,odd=194i,even=195i,stringu1="BMAAAA",stringu2="ECIAAA",string4="AAAAxx" 472176000000000000 +tenk unique1=2375i,unique2=5465i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=375i,twothousand=375i,fivethous=2375i,tenthous=2375i,odd=150i,even=151i,stringu1="JNAAAA",stringu2="FCIAAA",string4="HHHHxx" 472262400000000000 +tenk unique1=9415i,unique2=5466i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=415i,twothousand=1415i,fivethous=4415i,tenthous=9415i,odd=30i,even=31i,stringu1="DYAAAA",stringu2="GCIAAA",string4="OOOOxx" 472348800000000000 +tenk unique1=6552i,unique2=5467i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=552i,twothousand=552i,fivethous=1552i,tenthous=6552i,odd=104i,even=105i,stringu1="ASAAAA",stringu2="HCIAAA",string4="VVVVxx" 472435200000000000 +tenk unique1=2248i,unique2=5468i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=248i,twothousand=248i,fivethous=2248i,tenthous=2248i,odd=96i,even=97i,stringu1="MIAAAA",stringu2="ICIAAA",string4="AAAAxx" 472521600000000000 +tenk unique1=2611i,unique2=5469i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=611i,twothousand=611i,fivethous=2611i,tenthous=2611i,odd=22i,even=23i,stringu1="LWAAAA",stringu2="JCIAAA",string4="HHHHxx" 472608000000000000 +tenk unique1=9609i,unique2=5470i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=609i,twothousand=1609i,fivethous=4609i,tenthous=9609i,odd=18i,even=19i,stringu1="PFAAAA",stringu2="KCIAAA",string4="OOOOxx" 472694400000000000 +tenk unique1=2132i,unique2=5471i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=132i,twothousand=132i,fivethous=2132i,tenthous=2132i,odd=64i,even=65i,stringu1="AEAAAA",stringu2="LCIAAA",string4="VVVVxx" 472780800000000000 +tenk unique1=8452i,unique2=5472i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=452i,twothousand=452i,fivethous=3452i,tenthous=8452i,odd=104i,even=105i,stringu1="CNAAAA",stringu2="MCIAAA",string4="AAAAxx" 472867200000000000 +tenk unique1=9407i,unique2=5473i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=407i,twothousand=1407i,fivethous=4407i,tenthous=9407i,odd=14i,even=15i,stringu1="VXAAAA",stringu2="NCIAAA",string4="HHHHxx" 472953600000000000 +tenk unique1=2814i,unique2=5474i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=814i,twothousand=814i,fivethous=2814i,tenthous=2814i,odd=28i,even=29i,stringu1="GEAAAA",stringu2="OCIAAA",string4="OOOOxx" 473040000000000000 +tenk unique1=1889i,unique2=5475i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=889i,twothousand=1889i,fivethous=1889i,tenthous=1889i,odd=178i,even=179i,stringu1="RUAAAA",stringu2="PCIAAA",string4="VVVVxx" 473126400000000000 +tenk unique1=7489i,unique2=5476i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=489i,twothousand=1489i,fivethous=2489i,tenthous=7489i,odd=178i,even=179i,stringu1="BCAAAA",stringu2="QCIAAA",string4="AAAAxx" 473212800000000000 +tenk unique1=2255i,unique2=5477i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=255i,twothousand=255i,fivethous=2255i,tenthous=2255i,odd=110i,even=111i,stringu1="TIAAAA",stringu2="RCIAAA",string4="HHHHxx" 473299200000000000 +tenk unique1=3380i,unique2=5478i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=380i,twothousand=1380i,fivethous=3380i,tenthous=3380i,odd=160i,even=161i,stringu1="AAAAAA",stringu2="SCIAAA",string4="OOOOxx" 473385600000000000 +tenk unique1=1167i,unique2=5479i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=167i,twothousand=1167i,fivethous=1167i,tenthous=1167i,odd=134i,even=135i,stringu1="XSAAAA",stringu2="TCIAAA",string4="VVVVxx" 473472000000000000 +tenk unique1=5369i,unique2=5480i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=369i,twothousand=1369i,fivethous=369i,tenthous=5369i,odd=138i,even=139i,stringu1="NYAAAA",stringu2="UCIAAA",string4="AAAAxx" 473558400000000000 +tenk unique1=2378i,unique2=5481i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=378i,twothousand=378i,fivethous=2378i,tenthous=2378i,odd=156i,even=157i,stringu1="MNAAAA",stringu2="VCIAAA",string4="HHHHxx" 473644800000000000 +tenk unique1=8315i,unique2=5482i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=315i,twothousand=315i,fivethous=3315i,tenthous=8315i,odd=30i,even=31i,stringu1="VHAAAA",stringu2="WCIAAA",string4="OOOOxx" 473731200000000000 +tenk unique1=2934i,unique2=5483i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=934i,twothousand=934i,fivethous=2934i,tenthous=2934i,odd=68i,even=69i,stringu1="WIAAAA",stringu2="XCIAAA",string4="VVVVxx" 473817600000000000 +tenk unique1=7924i,unique2=5484i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=924i,twothousand=1924i,fivethous=2924i,tenthous=7924i,odd=48i,even=49i,stringu1="USAAAA",stringu2="YCIAAA",string4="AAAAxx" 473904000000000000 +tenk unique1=2867i,unique2=5485i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=867i,twothousand=867i,fivethous=2867i,tenthous=2867i,odd=134i,even=135i,stringu1="HGAAAA",stringu2="ZCIAAA",string4="HHHHxx" 473990400000000000 +tenk unique1=9141i,unique2=5486i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=141i,twothousand=1141i,fivethous=4141i,tenthous=9141i,odd=82i,even=83i,stringu1="PNAAAA",stringu2="ADIAAA",string4="OOOOxx" 474076800000000000 +tenk unique1=3613i,unique2=5487i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=613i,twothousand=1613i,fivethous=3613i,tenthous=3613i,odd=26i,even=27i,stringu1="ZIAAAA",stringu2="BDIAAA",string4="VVVVxx" 474163200000000000 +tenk unique1=2461i,unique2=5488i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=461i,twothousand=461i,fivethous=2461i,tenthous=2461i,odd=122i,even=123i,stringu1="RQAAAA",stringu2="CDIAAA",string4="AAAAxx" 474249600000000000 +tenk unique1=4567i,unique2=5489i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=567i,twothousand=567i,fivethous=4567i,tenthous=4567i,odd=134i,even=135i,stringu1="RTAAAA",stringu2="DDIAAA",string4="HHHHxx" 474336000000000000 +tenk unique1=2906i,unique2=5490i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=906i,twothousand=906i,fivethous=2906i,tenthous=2906i,odd=12i,even=13i,stringu1="UHAAAA",stringu2="EDIAAA",string4="OOOOxx" 474422400000000000 +tenk unique1=4848i,unique2=5491i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=848i,twothousand=848i,fivethous=4848i,tenthous=4848i,odd=96i,even=97i,stringu1="MEAAAA",stringu2="FDIAAA",string4="VVVVxx" 474508800000000000 +tenk unique1=6614i,unique2=5492i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=614i,twothousand=614i,fivethous=1614i,tenthous=6614i,odd=28i,even=29i,stringu1="KUAAAA",stringu2="GDIAAA",string4="AAAAxx" 474595200000000000 +tenk unique1=6200i,unique2=5493i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=200i,twothousand=200i,fivethous=1200i,tenthous=6200i,odd=0i,even=1i,stringu1="MEAAAA",stringu2="HDIAAA",string4="HHHHxx" 474681600000000000 +tenk unique1=7895i,unique2=5494i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=895i,twothousand=1895i,fivethous=2895i,tenthous=7895i,odd=190i,even=191i,stringu1="RRAAAA",stringu2="IDIAAA",string4="OOOOxx" 474768000000000000 +tenk unique1=6829i,unique2=5495i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=829i,twothousand=829i,fivethous=1829i,tenthous=6829i,odd=58i,even=59i,stringu1="RCAAAA",stringu2="JDIAAA",string4="VVVVxx" 474854400000000000 +tenk unique1=4087i,unique2=5496i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=87i,twothousand=87i,fivethous=4087i,tenthous=4087i,odd=174i,even=175i,stringu1="FBAAAA",stringu2="KDIAAA",string4="AAAAxx" 474940800000000000 +tenk unique1=8787i,unique2=5497i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=787i,twothousand=787i,fivethous=3787i,tenthous=8787i,odd=174i,even=175i,stringu1="ZZAAAA",stringu2="LDIAAA",string4="HHHHxx" 475027200000000000 +tenk unique1=3322i,unique2=5498i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=322i,twothousand=1322i,fivethous=3322i,tenthous=3322i,odd=44i,even=45i,stringu1="UXAAAA",stringu2="MDIAAA",string4="OOOOxx" 475113600000000000 +tenk unique1=9091i,unique2=5499i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=91i,twothousand=1091i,fivethous=4091i,tenthous=9091i,odd=182i,even=183i,stringu1="RLAAAA",stringu2="NDIAAA",string4="VVVVxx" 475200000000000000 +tenk unique1=5268i,unique2=5500i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=268i,twothousand=1268i,fivethous=268i,tenthous=5268i,odd=136i,even=137i,stringu1="QUAAAA",stringu2="ODIAAA",string4="AAAAxx" 475286400000000000 +tenk unique1=2719i,unique2=5501i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=719i,twothousand=719i,fivethous=2719i,tenthous=2719i,odd=38i,even=39i,stringu1="PAAAAA",stringu2="PDIAAA",string4="HHHHxx" 475372800000000000 +tenk unique1=30i,unique2=5502i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=30i,twothousand=30i,fivethous=30i,tenthous=30i,odd=60i,even=61i,stringu1="EBAAAA",stringu2="QDIAAA",string4="OOOOxx" 475459200000000000 +tenk unique1=1975i,unique2=5503i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=975i,twothousand=1975i,fivethous=1975i,tenthous=1975i,odd=150i,even=151i,stringu1="ZXAAAA",stringu2="RDIAAA",string4="VVVVxx" 475545600000000000 +tenk unique1=2641i,unique2=5504i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=641i,twothousand=641i,fivethous=2641i,tenthous=2641i,odd=82i,even=83i,stringu1="PXAAAA",stringu2="SDIAAA",string4="AAAAxx" 475632000000000000 +tenk unique1=8616i,unique2=5505i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=616i,twothousand=616i,fivethous=3616i,tenthous=8616i,odd=32i,even=33i,stringu1="KTAAAA",stringu2="TDIAAA",string4="HHHHxx" 475718400000000000 +tenk unique1=5980i,unique2=5506i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=980i,twothousand=1980i,fivethous=980i,tenthous=5980i,odd=160i,even=161i,stringu1="AWAAAA",stringu2="UDIAAA",string4="OOOOxx" 475804800000000000 +tenk unique1=5170i,unique2=5507i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=170i,twothousand=1170i,fivethous=170i,tenthous=5170i,odd=140i,even=141i,stringu1="WQAAAA",stringu2="VDIAAA",string4="VVVVxx" 475891200000000000 +tenk unique1=1960i,unique2=5508i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=960i,twothousand=1960i,fivethous=1960i,tenthous=1960i,odd=120i,even=121i,stringu1="KXAAAA",stringu2="WDIAAA",string4="AAAAxx" 475977600000000000 +tenk unique1=8141i,unique2=5509i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=141i,twothousand=141i,fivethous=3141i,tenthous=8141i,odd=82i,even=83i,stringu1="DBAAAA",stringu2="XDIAAA",string4="HHHHxx" 476064000000000000 +tenk unique1=6692i,unique2=5510i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=692i,twothousand=692i,fivethous=1692i,tenthous=6692i,odd=184i,even=185i,stringu1="KXAAAA",stringu2="YDIAAA",string4="OOOOxx" 476150400000000000 +tenk unique1=7621i,unique2=5511i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=621i,twothousand=1621i,fivethous=2621i,tenthous=7621i,odd=42i,even=43i,stringu1="DHAAAA",stringu2="ZDIAAA",string4="VVVVxx" 476236800000000000 +tenk unique1=3890i,unique2=5512i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=890i,twothousand=1890i,fivethous=3890i,tenthous=3890i,odd=180i,even=181i,stringu1="QTAAAA",stringu2="AEIAAA",string4="AAAAxx" 476323200000000000 +tenk unique1=4300i,unique2=5513i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=300i,twothousand=300i,fivethous=4300i,tenthous=4300i,odd=0i,even=1i,stringu1="KJAAAA",stringu2="BEIAAA",string4="HHHHxx" 476409600000000000 +tenk unique1=736i,unique2=5514i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=736i,twothousand=736i,fivethous=736i,tenthous=736i,odd=72i,even=73i,stringu1="ICAAAA",stringu2="CEIAAA",string4="OOOOxx" 476496000000000000 +tenk unique1=6626i,unique2=5515i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=626i,twothousand=626i,fivethous=1626i,tenthous=6626i,odd=52i,even=53i,stringu1="WUAAAA",stringu2="DEIAAA",string4="VVVVxx" 476582400000000000 +tenk unique1=1800i,unique2=5516i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=800i,twothousand=1800i,fivethous=1800i,tenthous=1800i,odd=0i,even=1i,stringu1="GRAAAA",stringu2="EEIAAA",string4="AAAAxx" 476668800000000000 +tenk unique1=3430i,unique2=5517i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=430i,twothousand=1430i,fivethous=3430i,tenthous=3430i,odd=60i,even=61i,stringu1="YBAAAA",stringu2="FEIAAA",string4="HHHHxx" 476755200000000000 +tenk unique1=9519i,unique2=5518i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=519i,twothousand=1519i,fivethous=4519i,tenthous=9519i,odd=38i,even=39i,stringu1="DCAAAA",stringu2="GEIAAA",string4="OOOOxx" 476841600000000000 +tenk unique1=5111i,unique2=5519i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=111i,twothousand=1111i,fivethous=111i,tenthous=5111i,odd=22i,even=23i,stringu1="POAAAA",stringu2="HEIAAA",string4="VVVVxx" 476928000000000000 +tenk unique1=6915i,unique2=5520i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=915i,twothousand=915i,fivethous=1915i,tenthous=6915i,odd=30i,even=31i,stringu1="ZFAAAA",stringu2="IEIAAA",string4="AAAAxx" 477014400000000000 +tenk unique1=9246i,unique2=5521i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=246i,twothousand=1246i,fivethous=4246i,tenthous=9246i,odd=92i,even=93i,stringu1="QRAAAA",stringu2="JEIAAA",string4="HHHHxx" 477100800000000000 +tenk unique1=5141i,unique2=5522i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=141i,twothousand=1141i,fivethous=141i,tenthous=5141i,odd=82i,even=83i,stringu1="TPAAAA",stringu2="KEIAAA",string4="OOOOxx" 477187200000000000 +tenk unique1=5922i,unique2=5523i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=922i,twothousand=1922i,fivethous=922i,tenthous=5922i,odd=44i,even=45i,stringu1="UTAAAA",stringu2="LEIAAA",string4="VVVVxx" 477273600000000000 +tenk unique1=3087i,unique2=5524i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=87i,twothousand=1087i,fivethous=3087i,tenthous=3087i,odd=174i,even=175i,stringu1="TOAAAA",stringu2="MEIAAA",string4="AAAAxx" 477360000000000000 +tenk unique1=1859i,unique2=5525i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=859i,twothousand=1859i,fivethous=1859i,tenthous=1859i,odd=118i,even=119i,stringu1="NTAAAA",stringu2="NEIAAA",string4="HHHHxx" 477446400000000000 +tenk unique1=8482i,unique2=5526i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=482i,twothousand=482i,fivethous=3482i,tenthous=8482i,odd=164i,even=165i,stringu1="GOAAAA",stringu2="OEIAAA",string4="OOOOxx" 477532800000000000 +tenk unique1=8414i,unique2=5527i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=414i,twothousand=414i,fivethous=3414i,tenthous=8414i,odd=28i,even=29i,stringu1="QLAAAA",stringu2="PEIAAA",string4="VVVVxx" 477619200000000000 +tenk unique1=6662i,unique2=5528i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=662i,twothousand=662i,fivethous=1662i,tenthous=6662i,odd=124i,even=125i,stringu1="GWAAAA",stringu2="QEIAAA",string4="AAAAxx" 477705600000000000 +tenk unique1=8614i,unique2=5529i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=614i,twothousand=614i,fivethous=3614i,tenthous=8614i,odd=28i,even=29i,stringu1="ITAAAA",stringu2="REIAAA",string4="HHHHxx" 477792000000000000 +tenk unique1=42i,unique2=5530i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=42i,twothousand=42i,fivethous=42i,tenthous=42i,odd=84i,even=85i,stringu1="QBAAAA",stringu2="SEIAAA",string4="OOOOxx" 477878400000000000 +tenk unique1=7582i,unique2=5531i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=582i,twothousand=1582i,fivethous=2582i,tenthous=7582i,odd=164i,even=165i,stringu1="QFAAAA",stringu2="TEIAAA",string4="VVVVxx" 477964800000000000 +tenk unique1=8183i,unique2=5532i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=183i,twothousand=183i,fivethous=3183i,tenthous=8183i,odd=166i,even=167i,stringu1="TCAAAA",stringu2="UEIAAA",string4="AAAAxx" 478051200000000000 +tenk unique1=1299i,unique2=5533i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=299i,twothousand=1299i,fivethous=1299i,tenthous=1299i,odd=198i,even=199i,stringu1="ZXAAAA",stringu2="VEIAAA",string4="HHHHxx" 478137600000000000 +tenk unique1=7004i,unique2=5534i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=1004i,fivethous=2004i,tenthous=7004i,odd=8i,even=9i,stringu1="KJAAAA",stringu2="WEIAAA",string4="OOOOxx" 478224000000000000 +tenk unique1=3298i,unique2=5535i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=298i,twothousand=1298i,fivethous=3298i,tenthous=3298i,odd=196i,even=197i,stringu1="WWAAAA",stringu2="XEIAAA",string4="VVVVxx" 478310400000000000 +tenk unique1=7884i,unique2=5536i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=884i,twothousand=1884i,fivethous=2884i,tenthous=7884i,odd=168i,even=169i,stringu1="GRAAAA",stringu2="YEIAAA",string4="AAAAxx" 478396800000000000 +tenk unique1=4191i,unique2=5537i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=191i,twothousand=191i,fivethous=4191i,tenthous=4191i,odd=182i,even=183i,stringu1="FFAAAA",stringu2="ZEIAAA",string4="HHHHxx" 478483200000000000 +tenk unique1=7346i,unique2=5538i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=346i,twothousand=1346i,fivethous=2346i,tenthous=7346i,odd=92i,even=93i,stringu1="OWAAAA",stringu2="AFIAAA",string4="OOOOxx" 478569600000000000 +tenk unique1=7989i,unique2=5539i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=989i,twothousand=1989i,fivethous=2989i,tenthous=7989i,odd=178i,even=179i,stringu1="HVAAAA",stringu2="BFIAAA",string4="VVVVxx" 478656000000000000 +tenk unique1=5719i,unique2=5540i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=719i,twothousand=1719i,fivethous=719i,tenthous=5719i,odd=38i,even=39i,stringu1="ZLAAAA",stringu2="CFIAAA",string4="AAAAxx" 478742400000000000 +tenk unique1=800i,unique2=5541i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=800i,twothousand=800i,fivethous=800i,tenthous=800i,odd=0i,even=1i,stringu1="UEAAAA",stringu2="DFIAAA",string4="HHHHxx" 478828800000000000 +tenk unique1=6509i,unique2=5542i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=509i,twothousand=509i,fivethous=1509i,tenthous=6509i,odd=18i,even=19i,stringu1="JQAAAA",stringu2="EFIAAA",string4="OOOOxx" 478915200000000000 +tenk unique1=4672i,unique2=5543i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=672i,twothousand=672i,fivethous=4672i,tenthous=4672i,odd=144i,even=145i,stringu1="SXAAAA",stringu2="FFIAAA",string4="VVVVxx" 479001600000000000 +tenk unique1=4434i,unique2=5544i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=434i,twothousand=434i,fivethous=4434i,tenthous=4434i,odd=68i,even=69i,stringu1="OOAAAA",stringu2="GFIAAA",string4="AAAAxx" 479088000000000000 +tenk unique1=8309i,unique2=5545i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=309i,twothousand=309i,fivethous=3309i,tenthous=8309i,odd=18i,even=19i,stringu1="PHAAAA",stringu2="HFIAAA",string4="HHHHxx" 479174400000000000 +tenk unique1=5134i,unique2=5546i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=134i,twothousand=1134i,fivethous=134i,tenthous=5134i,odd=68i,even=69i,stringu1="MPAAAA",stringu2="IFIAAA",string4="OOOOxx" 479260800000000000 +tenk unique1=5153i,unique2=5547i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=153i,twothousand=1153i,fivethous=153i,tenthous=5153i,odd=106i,even=107i,stringu1="FQAAAA",stringu2="JFIAAA",string4="VVVVxx" 479347200000000000 +tenk unique1=1522i,unique2=5548i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=522i,twothousand=1522i,fivethous=1522i,tenthous=1522i,odd=44i,even=45i,stringu1="OGAAAA",stringu2="KFIAAA",string4="AAAAxx" 479433600000000000 +tenk unique1=8629i,unique2=5549i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=629i,twothousand=629i,fivethous=3629i,tenthous=8629i,odd=58i,even=59i,stringu1="XTAAAA",stringu2="LFIAAA",string4="HHHHxx" 479520000000000000 +tenk unique1=4549i,unique2=5550i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=549i,twothousand=549i,fivethous=4549i,tenthous=4549i,odd=98i,even=99i,stringu1="ZSAAAA",stringu2="MFIAAA",string4="OOOOxx" 479606400000000000 +tenk unique1=9506i,unique2=5551i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=506i,twothousand=1506i,fivethous=4506i,tenthous=9506i,odd=12i,even=13i,stringu1="QBAAAA",stringu2="NFIAAA",string4="VVVVxx" 479692800000000000 +tenk unique1=6542i,unique2=5552i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=542i,twothousand=542i,fivethous=1542i,tenthous=6542i,odd=84i,even=85i,stringu1="QRAAAA",stringu2="OFIAAA",string4="AAAAxx" 479779200000000000 +tenk unique1=2579i,unique2=5553i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=579i,twothousand=579i,fivethous=2579i,tenthous=2579i,odd=158i,even=159i,stringu1="FVAAAA",stringu2="PFIAAA",string4="HHHHxx" 479865600000000000 +tenk unique1=4664i,unique2=5554i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=664i,twothousand=664i,fivethous=4664i,tenthous=4664i,odd=128i,even=129i,stringu1="KXAAAA",stringu2="QFIAAA",string4="OOOOxx" 479952000000000000 +tenk unique1=696i,unique2=5555i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=696i,twothousand=696i,fivethous=696i,tenthous=696i,odd=192i,even=193i,stringu1="UAAAAA",stringu2="RFIAAA",string4="VVVVxx" 480038400000000000 +tenk unique1=7950i,unique2=5556i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=950i,twothousand=1950i,fivethous=2950i,tenthous=7950i,odd=100i,even=101i,stringu1="UTAAAA",stringu2="SFIAAA",string4="AAAAxx" 480124800000000000 +tenk unique1=5i,unique2=5557i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=5i,fivethous=5i,tenthous=5i,odd=10i,even=11i,stringu1="FAAAAA",stringu2="TFIAAA",string4="HHHHxx" 480211200000000000 +tenk unique1=7806i,unique2=5558i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=806i,twothousand=1806i,fivethous=2806i,tenthous=7806i,odd=12i,even=13i,stringu1="GOAAAA",stringu2="UFIAAA",string4="OOOOxx" 480297600000000000 +tenk unique1=2770i,unique2=5559i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=770i,twothousand=770i,fivethous=2770i,tenthous=2770i,odd=140i,even=141i,stringu1="OCAAAA",stringu2="VFIAAA",string4="VVVVxx" 480384000000000000 +tenk unique1=1344i,unique2=5560i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=344i,twothousand=1344i,fivethous=1344i,tenthous=1344i,odd=88i,even=89i,stringu1="SZAAAA",stringu2="WFIAAA",string4="AAAAxx" 480470400000000000 +tenk unique1=511i,unique2=5561i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=511i,twothousand=511i,fivethous=511i,tenthous=511i,odd=22i,even=23i,stringu1="RTAAAA",stringu2="XFIAAA",string4="HHHHxx" 480556800000000000 +tenk unique1=9070i,unique2=5562i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=70i,twothousand=1070i,fivethous=4070i,tenthous=9070i,odd=140i,even=141i,stringu1="WKAAAA",stringu2="YFIAAA",string4="OOOOxx" 480643200000000000 +tenk unique1=2961i,unique2=5563i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=961i,twothousand=961i,fivethous=2961i,tenthous=2961i,odd=122i,even=123i,stringu1="XJAAAA",stringu2="ZFIAAA",string4="VVVVxx" 480729600000000000 +tenk unique1=8031i,unique2=5564i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=31i,twothousand=31i,fivethous=3031i,tenthous=8031i,odd=62i,even=63i,stringu1="XWAAAA",stringu2="AGIAAA",string4="AAAAxx" 480816000000000000 +tenk unique1=326i,unique2=5565i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=326i,twothousand=326i,fivethous=326i,tenthous=326i,odd=52i,even=53i,stringu1="OMAAAA",stringu2="BGIAAA",string4="HHHHxx" 480902400000000000 +tenk unique1=183i,unique2=5566i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=183i,twothousand=183i,fivethous=183i,tenthous=183i,odd=166i,even=167i,stringu1="BHAAAA",stringu2="CGIAAA",string4="OOOOxx" 480988800000000000 +tenk unique1=5917i,unique2=5567i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=917i,twothousand=1917i,fivethous=917i,tenthous=5917i,odd=34i,even=35i,stringu1="PTAAAA",stringu2="DGIAAA",string4="VVVVxx" 481075200000000000 +tenk unique1=8256i,unique2=5568i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=256i,twothousand=256i,fivethous=3256i,tenthous=8256i,odd=112i,even=113i,stringu1="OFAAAA",stringu2="EGIAAA",string4="AAAAxx" 481161600000000000 +tenk unique1=7889i,unique2=5569i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=889i,twothousand=1889i,fivethous=2889i,tenthous=7889i,odd=178i,even=179i,stringu1="LRAAAA",stringu2="FGIAAA",string4="HHHHxx" 481248000000000000 +tenk unique1=9029i,unique2=5570i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=29i,twothousand=1029i,fivethous=4029i,tenthous=9029i,odd=58i,even=59i,stringu1="HJAAAA",stringu2="GGIAAA",string4="OOOOxx" 481334400000000000 +tenk unique1=1316i,unique2=5571i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=316i,twothousand=1316i,fivethous=1316i,tenthous=1316i,odd=32i,even=33i,stringu1="QYAAAA",stringu2="HGIAAA",string4="VVVVxx" 481420800000000000 +tenk unique1=7442i,unique2=5572i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=442i,twothousand=1442i,fivethous=2442i,tenthous=7442i,odd=84i,even=85i,stringu1="GAAAAA",stringu2="IGIAAA",string4="AAAAxx" 481507200000000000 +tenk unique1=2810i,unique2=5573i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=810i,twothousand=810i,fivethous=2810i,tenthous=2810i,odd=20i,even=21i,stringu1="CEAAAA",stringu2="JGIAAA",string4="HHHHxx" 481593600000000000 +tenk unique1=20i,unique2=5574i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=20i,twothousand=20i,fivethous=20i,tenthous=20i,odd=40i,even=41i,stringu1="UAAAAA",stringu2="KGIAAA",string4="OOOOxx" 481680000000000000 +tenk unique1=2306i,unique2=5575i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=306i,twothousand=306i,fivethous=2306i,tenthous=2306i,odd=12i,even=13i,stringu1="SKAAAA",stringu2="LGIAAA",string4="VVVVxx" 481766400000000000 +tenk unique1=4694i,unique2=5576i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=694i,twothousand=694i,fivethous=4694i,tenthous=4694i,odd=188i,even=189i,stringu1="OYAAAA",stringu2="MGIAAA",string4="AAAAxx" 481852800000000000 +tenk unique1=9710i,unique2=5577i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=710i,twothousand=1710i,fivethous=4710i,tenthous=9710i,odd=20i,even=21i,stringu1="MJAAAA",stringu2="NGIAAA",string4="HHHHxx" 481939200000000000 +tenk unique1=1791i,unique2=5578i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=791i,twothousand=1791i,fivethous=1791i,tenthous=1791i,odd=182i,even=183i,stringu1="XQAAAA",stringu2="OGIAAA",string4="OOOOxx" 482025600000000000 +tenk unique1=6730i,unique2=5579i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=730i,twothousand=730i,fivethous=1730i,tenthous=6730i,odd=60i,even=61i,stringu1="WYAAAA",stringu2="PGIAAA",string4="VVVVxx" 482112000000000000 +tenk unique1=359i,unique2=5580i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=359i,twothousand=359i,fivethous=359i,tenthous=359i,odd=118i,even=119i,stringu1="VNAAAA",stringu2="QGIAAA",string4="AAAAxx" 482198400000000000 +tenk unique1=8097i,unique2=5581i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=97i,twothousand=97i,fivethous=3097i,tenthous=8097i,odd=194i,even=195i,stringu1="LZAAAA",stringu2="RGIAAA",string4="HHHHxx" 482284800000000000 +tenk unique1=6147i,unique2=5582i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=147i,twothousand=147i,fivethous=1147i,tenthous=6147i,odd=94i,even=95i,stringu1="LCAAAA",stringu2="SGIAAA",string4="OOOOxx" 482371200000000000 +tenk unique1=643i,unique2=5583i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=643i,twothousand=643i,fivethous=643i,tenthous=643i,odd=86i,even=87i,stringu1="TYAAAA",stringu2="TGIAAA",string4="VVVVxx" 482457600000000000 +tenk unique1=698i,unique2=5584i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=698i,twothousand=698i,fivethous=698i,tenthous=698i,odd=196i,even=197i,stringu1="WAAAAA",stringu2="UGIAAA",string4="AAAAxx" 482544000000000000 +tenk unique1=3881i,unique2=5585i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=881i,twothousand=1881i,fivethous=3881i,tenthous=3881i,odd=162i,even=163i,stringu1="HTAAAA",stringu2="VGIAAA",string4="HHHHxx" 482630400000000000 +tenk unique1=7600i,unique2=5586i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=600i,twothousand=1600i,fivethous=2600i,tenthous=7600i,odd=0i,even=1i,stringu1="IGAAAA",stringu2="WGIAAA",string4="OOOOxx" 482716800000000000 +tenk unique1=1583i,unique2=5587i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=583i,twothousand=1583i,fivethous=1583i,tenthous=1583i,odd=166i,even=167i,stringu1="XIAAAA",stringu2="XGIAAA",string4="VVVVxx" 482803200000000000 +tenk unique1=9612i,unique2=5588i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=612i,twothousand=1612i,fivethous=4612i,tenthous=9612i,odd=24i,even=25i,stringu1="SFAAAA",stringu2="YGIAAA",string4="AAAAxx" 482889600000000000 +tenk unique1=1032i,unique2=5589i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=32i,twothousand=1032i,fivethous=1032i,tenthous=1032i,odd=64i,even=65i,stringu1="SNAAAA",stringu2="ZGIAAA",string4="HHHHxx" 482976000000000000 +tenk unique1=4834i,unique2=5590i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=834i,twothousand=834i,fivethous=4834i,tenthous=4834i,odd=68i,even=69i,stringu1="YDAAAA",stringu2="AHIAAA",string4="OOOOxx" 483062400000000000 +tenk unique1=5076i,unique2=5591i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=76i,twothousand=1076i,fivethous=76i,tenthous=5076i,odd=152i,even=153i,stringu1="GNAAAA",stringu2="BHIAAA",string4="VVVVxx" 483148800000000000 +tenk unique1=3070i,unique2=5592i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=70i,twothousand=1070i,fivethous=3070i,tenthous=3070i,odd=140i,even=141i,stringu1="COAAAA",stringu2="CHIAAA",string4="AAAAxx" 483235200000000000 +tenk unique1=1421i,unique2=5593i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=421i,twothousand=1421i,fivethous=1421i,tenthous=1421i,odd=42i,even=43i,stringu1="RCAAAA",stringu2="DHIAAA",string4="HHHHxx" 483321600000000000 +tenk unique1=8970i,unique2=5594i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=970i,twothousand=970i,fivethous=3970i,tenthous=8970i,odd=140i,even=141i,stringu1="AHAAAA",stringu2="EHIAAA",string4="OOOOxx" 483408000000000000 +tenk unique1=6271i,unique2=5595i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=271i,twothousand=271i,fivethous=1271i,tenthous=6271i,odd=142i,even=143i,stringu1="FHAAAA",stringu2="FHIAAA",string4="VVVVxx" 483494400000000000 +tenk unique1=8547i,unique2=5596i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=547i,twothousand=547i,fivethous=3547i,tenthous=8547i,odd=94i,even=95i,stringu1="TQAAAA",stringu2="GHIAAA",string4="AAAAxx" 483580800000000000 +tenk unique1=1259i,unique2=5597i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=259i,twothousand=1259i,fivethous=1259i,tenthous=1259i,odd=118i,even=119i,stringu1="LWAAAA",stringu2="HHIAAA",string4="HHHHxx" 483667200000000000 +tenk unique1=8328i,unique2=5598i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=328i,twothousand=328i,fivethous=3328i,tenthous=8328i,odd=56i,even=57i,stringu1="IIAAAA",stringu2="IHIAAA",string4="OOOOxx" 483753600000000000 +tenk unique1=1503i,unique2=5599i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=503i,twothousand=1503i,fivethous=1503i,tenthous=1503i,odd=6i,even=7i,stringu1="VFAAAA",stringu2="JHIAAA",string4="VVVVxx" 483840000000000000 +tenk unique1=2253i,unique2=5600i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=253i,twothousand=253i,fivethous=2253i,tenthous=2253i,odd=106i,even=107i,stringu1="RIAAAA",stringu2="KHIAAA",string4="AAAAxx" 483926400000000000 +tenk unique1=7449i,unique2=5601i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=449i,twothousand=1449i,fivethous=2449i,tenthous=7449i,odd=98i,even=99i,stringu1="NAAAAA",stringu2="LHIAAA",string4="HHHHxx" 484012800000000000 +tenk unique1=3579i,unique2=5602i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=579i,twothousand=1579i,fivethous=3579i,tenthous=3579i,odd=158i,even=159i,stringu1="RHAAAA",stringu2="MHIAAA",string4="OOOOxx" 484099200000000000 +tenk unique1=1585i,unique2=5603i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=585i,twothousand=1585i,fivethous=1585i,tenthous=1585i,odd=170i,even=171i,stringu1="ZIAAAA",stringu2="NHIAAA",string4="VVVVxx" 484185600000000000 +tenk unique1=5543i,unique2=5604i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=543i,twothousand=1543i,fivethous=543i,tenthous=5543i,odd=86i,even=87i,stringu1="FFAAAA",stringu2="OHIAAA",string4="AAAAxx" 484272000000000000 +tenk unique1=8627i,unique2=5605i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=627i,twothousand=627i,fivethous=3627i,tenthous=8627i,odd=54i,even=55i,stringu1="VTAAAA",stringu2="PHIAAA",string4="HHHHxx" 484358400000000000 +tenk unique1=8618i,unique2=5606i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=618i,twothousand=618i,fivethous=3618i,tenthous=8618i,odd=36i,even=37i,stringu1="MTAAAA",stringu2="QHIAAA",string4="OOOOxx" 484444800000000000 +tenk unique1=1911i,unique2=5607i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=911i,twothousand=1911i,fivethous=1911i,tenthous=1911i,odd=22i,even=23i,stringu1="NVAAAA",stringu2="RHIAAA",string4="VVVVxx" 484531200000000000 +tenk unique1=2758i,unique2=5608i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=758i,twothousand=758i,fivethous=2758i,tenthous=2758i,odd=116i,even=117i,stringu1="CCAAAA",stringu2="SHIAAA",string4="AAAAxx" 484617600000000000 +tenk unique1=5744i,unique2=5609i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=744i,twothousand=1744i,fivethous=744i,tenthous=5744i,odd=88i,even=89i,stringu1="YMAAAA",stringu2="THIAAA",string4="HHHHxx" 484704000000000000 +tenk unique1=4976i,unique2=5610i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=976i,twothousand=976i,fivethous=4976i,tenthous=4976i,odd=152i,even=153i,stringu1="KJAAAA",stringu2="UHIAAA",string4="OOOOxx" 484790400000000000 +tenk unique1=6380i,unique2=5611i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=380i,twothousand=380i,fivethous=1380i,tenthous=6380i,odd=160i,even=161i,stringu1="KLAAAA",stringu2="VHIAAA",string4="VVVVxx" 484876800000000000 +tenk unique1=1937i,unique2=5612i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=937i,twothousand=1937i,fivethous=1937i,tenthous=1937i,odd=74i,even=75i,stringu1="NWAAAA",stringu2="WHIAAA",string4="AAAAxx" 484963200000000000 +tenk unique1=9903i,unique2=5613i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=903i,twothousand=1903i,fivethous=4903i,tenthous=9903i,odd=6i,even=7i,stringu1="XQAAAA",stringu2="XHIAAA",string4="HHHHxx" 485049600000000000 +tenk unique1=4409i,unique2=5614i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=409i,twothousand=409i,fivethous=4409i,tenthous=4409i,odd=18i,even=19i,stringu1="PNAAAA",stringu2="YHIAAA",string4="OOOOxx" 485136000000000000 +tenk unique1=4133i,unique2=5615i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=133i,twothousand=133i,fivethous=4133i,tenthous=4133i,odd=66i,even=67i,stringu1="ZCAAAA",stringu2="ZHIAAA",string4="VVVVxx" 485222400000000000 +tenk unique1=5263i,unique2=5616i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=263i,twothousand=1263i,fivethous=263i,tenthous=5263i,odd=126i,even=127i,stringu1="LUAAAA",stringu2="AIIAAA",string4="AAAAxx" 485308800000000000 +tenk unique1=7888i,unique2=5617i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=888i,twothousand=1888i,fivethous=2888i,tenthous=7888i,odd=176i,even=177i,stringu1="KRAAAA",stringu2="BIIAAA",string4="HHHHxx" 485395200000000000 +tenk unique1=6060i,unique2=5618i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=60i,twothousand=60i,fivethous=1060i,tenthous=6060i,odd=120i,even=121i,stringu1="CZAAAA",stringu2="CIIAAA",string4="OOOOxx" 485481600000000000 +tenk unique1=2522i,unique2=5619i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=522i,twothousand=522i,fivethous=2522i,tenthous=2522i,odd=44i,even=45i,stringu1="ATAAAA",stringu2="DIIAAA",string4="VVVVxx" 485568000000000000 +tenk unique1=5550i,unique2=5620i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=550i,twothousand=1550i,fivethous=550i,tenthous=5550i,odd=100i,even=101i,stringu1="MFAAAA",stringu2="EIIAAA",string4="AAAAxx" 485654400000000000 +tenk unique1=9396i,unique2=5621i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=396i,twothousand=1396i,fivethous=4396i,tenthous=9396i,odd=192i,even=193i,stringu1="KXAAAA",stringu2="FIIAAA",string4="HHHHxx" 485740800000000000 +tenk unique1=176i,unique2=5622i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=176i,twothousand=176i,fivethous=176i,tenthous=176i,odd=152i,even=153i,stringu1="UGAAAA",stringu2="GIIAAA",string4="OOOOxx" 485827200000000000 +tenk unique1=5148i,unique2=5623i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=148i,twothousand=1148i,fivethous=148i,tenthous=5148i,odd=96i,even=97i,stringu1="AQAAAA",stringu2="HIIAAA",string4="VVVVxx" 485913600000000000 +tenk unique1=6691i,unique2=5624i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=691i,twothousand=691i,fivethous=1691i,tenthous=6691i,odd=182i,even=183i,stringu1="JXAAAA",stringu2="IIIAAA",string4="AAAAxx" 486000000000000000 +tenk unique1=4652i,unique2=5625i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=652i,twothousand=652i,fivethous=4652i,tenthous=4652i,odd=104i,even=105i,stringu1="YWAAAA",stringu2="JIIAAA",string4="HHHHxx" 486086400000000000 +tenk unique1=5096i,unique2=5626i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=96i,twothousand=1096i,fivethous=96i,tenthous=5096i,odd=192i,even=193i,stringu1="AOAAAA",stringu2="KIIAAA",string4="OOOOxx" 486172800000000000 +tenk unique1=2408i,unique2=5627i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=408i,twothousand=408i,fivethous=2408i,tenthous=2408i,odd=16i,even=17i,stringu1="QOAAAA",stringu2="LIIAAA",string4="VVVVxx" 486259200000000000 +tenk unique1=7322i,unique2=5628i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=322i,twothousand=1322i,fivethous=2322i,tenthous=7322i,odd=44i,even=45i,stringu1="QVAAAA",stringu2="MIIAAA",string4="AAAAxx" 486345600000000000 +tenk unique1=6782i,unique2=5629i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=782i,twothousand=782i,fivethous=1782i,tenthous=6782i,odd=164i,even=165i,stringu1="WAAAAA",stringu2="NIIAAA",string4="HHHHxx" 486432000000000000 +tenk unique1=4642i,unique2=5630i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=642i,twothousand=642i,fivethous=4642i,tenthous=4642i,odd=84i,even=85i,stringu1="OWAAAA",stringu2="OIIAAA",string4="OOOOxx" 486518400000000000 +tenk unique1=5427i,unique2=5631i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=427i,twothousand=1427i,fivethous=427i,tenthous=5427i,odd=54i,even=55i,stringu1="TAAAAA",stringu2="PIIAAA",string4="VVVVxx" 486604800000000000 +tenk unique1=4461i,unique2=5632i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=461i,twothousand=461i,fivethous=4461i,tenthous=4461i,odd=122i,even=123i,stringu1="PPAAAA",stringu2="QIIAAA",string4="AAAAxx" 486691200000000000 +tenk unique1=8416i,unique2=5633i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=416i,twothousand=416i,fivethous=3416i,tenthous=8416i,odd=32i,even=33i,stringu1="SLAAAA",stringu2="RIIAAA",string4="HHHHxx" 486777600000000000 +tenk unique1=2593i,unique2=5634i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=593i,twothousand=593i,fivethous=2593i,tenthous=2593i,odd=186i,even=187i,stringu1="TVAAAA",stringu2="SIIAAA",string4="OOOOxx" 486864000000000000 +tenk unique1=6202i,unique2=5635i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=202i,twothousand=202i,fivethous=1202i,tenthous=6202i,odd=4i,even=5i,stringu1="OEAAAA",stringu2="TIIAAA",string4="VVVVxx" 486950400000000000 +tenk unique1=3826i,unique2=5636i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=826i,twothousand=1826i,fivethous=3826i,tenthous=3826i,odd=52i,even=53i,stringu1="ERAAAA",stringu2="UIIAAA",string4="AAAAxx" 487036800000000000 +tenk unique1=4417i,unique2=5637i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=417i,twothousand=417i,fivethous=4417i,tenthous=4417i,odd=34i,even=35i,stringu1="XNAAAA",stringu2="VIIAAA",string4="HHHHxx" 487123200000000000 +tenk unique1=7871i,unique2=5638i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=871i,twothousand=1871i,fivethous=2871i,tenthous=7871i,odd=142i,even=143i,stringu1="TQAAAA",stringu2="WIIAAA",string4="OOOOxx" 487209600000000000 +tenk unique1=5622i,unique2=5639i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=622i,twothousand=1622i,fivethous=622i,tenthous=5622i,odd=44i,even=45i,stringu1="GIAAAA",stringu2="XIIAAA",string4="VVVVxx" 487296000000000000 +tenk unique1=3010i,unique2=5640i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=10i,twothousand=1010i,fivethous=3010i,tenthous=3010i,odd=20i,even=21i,stringu1="ULAAAA",stringu2="YIIAAA",string4="AAAAxx" 487382400000000000 +tenk unique1=3407i,unique2=5641i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=407i,twothousand=1407i,fivethous=3407i,tenthous=3407i,odd=14i,even=15i,stringu1="BBAAAA",stringu2="ZIIAAA",string4="HHHHxx" 487468800000000000 +tenk unique1=1274i,unique2=5642i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=274i,twothousand=1274i,fivethous=1274i,tenthous=1274i,odd=148i,even=149i,stringu1="AXAAAA",stringu2="AJIAAA",string4="OOOOxx" 487555200000000000 +tenk unique1=2828i,unique2=5643i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=828i,twothousand=828i,fivethous=2828i,tenthous=2828i,odd=56i,even=57i,stringu1="UEAAAA",stringu2="BJIAAA",string4="VVVVxx" 487641600000000000 +tenk unique1=3427i,unique2=5644i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=427i,twothousand=1427i,fivethous=3427i,tenthous=3427i,odd=54i,even=55i,stringu1="VBAAAA",stringu2="CJIAAA",string4="AAAAxx" 487728000000000000 +tenk unique1=612i,unique2=5645i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=612i,twothousand=612i,fivethous=612i,tenthous=612i,odd=24i,even=25i,stringu1="OXAAAA",stringu2="DJIAAA",string4="HHHHxx" 487814400000000000 +tenk unique1=8729i,unique2=5646i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=729i,twothousand=729i,fivethous=3729i,tenthous=8729i,odd=58i,even=59i,stringu1="TXAAAA",stringu2="EJIAAA",string4="OOOOxx" 487900800000000000 +tenk unique1=1239i,unique2=5647i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=239i,twothousand=1239i,fivethous=1239i,tenthous=1239i,odd=78i,even=79i,stringu1="RVAAAA",stringu2="FJIAAA",string4="VVVVxx" 487987200000000000 +tenk unique1=8990i,unique2=5648i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=990i,twothousand=990i,fivethous=3990i,tenthous=8990i,odd=180i,even=181i,stringu1="UHAAAA",stringu2="GJIAAA",string4="AAAAxx" 488073600000000000 +tenk unique1=5609i,unique2=5649i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=609i,twothousand=1609i,fivethous=609i,tenthous=5609i,odd=18i,even=19i,stringu1="THAAAA",stringu2="HJIAAA",string4="HHHHxx" 488160000000000000 +tenk unique1=4441i,unique2=5650i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=441i,twothousand=441i,fivethous=4441i,tenthous=4441i,odd=82i,even=83i,stringu1="VOAAAA",stringu2="IJIAAA",string4="OOOOxx" 488246400000000000 +tenk unique1=9078i,unique2=5651i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=78i,twothousand=1078i,fivethous=4078i,tenthous=9078i,odd=156i,even=157i,stringu1="ELAAAA",stringu2="JJIAAA",string4="VVVVxx" 488332800000000000 +tenk unique1=6699i,unique2=5652i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=699i,twothousand=699i,fivethous=1699i,tenthous=6699i,odd=198i,even=199i,stringu1="RXAAAA",stringu2="KJIAAA",string4="AAAAxx" 488419200000000000 +tenk unique1=8390i,unique2=5653i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=390i,twothousand=390i,fivethous=3390i,tenthous=8390i,odd=180i,even=181i,stringu1="SKAAAA",stringu2="LJIAAA",string4="HHHHxx" 488505600000000000 +tenk unique1=5455i,unique2=5654i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=455i,twothousand=1455i,fivethous=455i,tenthous=5455i,odd=110i,even=111i,stringu1="VBAAAA",stringu2="MJIAAA",string4="OOOOxx" 488592000000000000 +tenk unique1=7537i,unique2=5655i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=537i,twothousand=1537i,fivethous=2537i,tenthous=7537i,odd=74i,even=75i,stringu1="XDAAAA",stringu2="NJIAAA",string4="VVVVxx" 488678400000000000 +tenk unique1=4669i,unique2=5656i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=669i,twothousand=669i,fivethous=4669i,tenthous=4669i,odd=138i,even=139i,stringu1="PXAAAA",stringu2="OJIAAA",string4="AAAAxx" 488764800000000000 +tenk unique1=5534i,unique2=5657i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=534i,twothousand=1534i,fivethous=534i,tenthous=5534i,odd=68i,even=69i,stringu1="WEAAAA",stringu2="PJIAAA",string4="HHHHxx" 488851200000000000 +tenk unique1=1920i,unique2=5658i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=920i,twothousand=1920i,fivethous=1920i,tenthous=1920i,odd=40i,even=41i,stringu1="WVAAAA",stringu2="QJIAAA",string4="OOOOxx" 488937600000000000 +tenk unique1=9465i,unique2=5659i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=465i,twothousand=1465i,fivethous=4465i,tenthous=9465i,odd=130i,even=131i,stringu1="BAAAAA",stringu2="RJIAAA",string4="VVVVxx" 489024000000000000 +tenk unique1=4897i,unique2=5660i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=897i,twothousand=897i,fivethous=4897i,tenthous=4897i,odd=194i,even=195i,stringu1="JGAAAA",stringu2="SJIAAA",string4="AAAAxx" 489110400000000000 +tenk unique1=1990i,unique2=5661i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=990i,twothousand=1990i,fivethous=1990i,tenthous=1990i,odd=180i,even=181i,stringu1="OYAAAA",stringu2="TJIAAA",string4="HHHHxx" 489196800000000000 +tenk unique1=7148i,unique2=5662i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=148i,twothousand=1148i,fivethous=2148i,tenthous=7148i,odd=96i,even=97i,stringu1="YOAAAA",stringu2="UJIAAA",string4="OOOOxx" 489283200000000000 +tenk unique1=533i,unique2=5663i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=533i,twothousand=533i,fivethous=533i,tenthous=533i,odd=66i,even=67i,stringu1="NUAAAA",stringu2="VJIAAA",string4="VVVVxx" 489369600000000000 +tenk unique1=4339i,unique2=5664i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=339i,twothousand=339i,fivethous=4339i,tenthous=4339i,odd=78i,even=79i,stringu1="XKAAAA",stringu2="WJIAAA",string4="AAAAxx" 489456000000000000 +tenk unique1=6450i,unique2=5665i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=450i,twothousand=450i,fivethous=1450i,tenthous=6450i,odd=100i,even=101i,stringu1="COAAAA",stringu2="XJIAAA",string4="HHHHxx" 489542400000000000 +tenk unique1=9627i,unique2=5666i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=627i,twothousand=1627i,fivethous=4627i,tenthous=9627i,odd=54i,even=55i,stringu1="HGAAAA",stringu2="YJIAAA",string4="OOOOxx" 489628800000000000 +tenk unique1=5539i,unique2=5667i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=539i,twothousand=1539i,fivethous=539i,tenthous=5539i,odd=78i,even=79i,stringu1="BFAAAA",stringu2="ZJIAAA",string4="VVVVxx" 489715200000000000 +tenk unique1=6758i,unique2=5668i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=758i,twothousand=758i,fivethous=1758i,tenthous=6758i,odd=116i,even=117i,stringu1="YZAAAA",stringu2="AKIAAA",string4="AAAAxx" 489801600000000000 +tenk unique1=3435i,unique2=5669i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=435i,twothousand=1435i,fivethous=3435i,tenthous=3435i,odd=70i,even=71i,stringu1="DCAAAA",stringu2="BKIAAA",string4="HHHHxx" 489888000000000000 +tenk unique1=4350i,unique2=5670i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=350i,twothousand=350i,fivethous=4350i,tenthous=4350i,odd=100i,even=101i,stringu1="ILAAAA",stringu2="CKIAAA",string4="OOOOxx" 489974400000000000 +tenk unique1=9088i,unique2=5671i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=88i,twothousand=1088i,fivethous=4088i,tenthous=9088i,odd=176i,even=177i,stringu1="OLAAAA",stringu2="DKIAAA",string4="VVVVxx" 490060800000000000 +tenk unique1=6368i,unique2=5672i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=368i,twothousand=368i,fivethous=1368i,tenthous=6368i,odd=136i,even=137i,stringu1="YKAAAA",stringu2="EKIAAA",string4="AAAAxx" 490147200000000000 +tenk unique1=6337i,unique2=5673i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=337i,twothousand=337i,fivethous=1337i,tenthous=6337i,odd=74i,even=75i,stringu1="TJAAAA",stringu2="FKIAAA",string4="HHHHxx" 490233600000000000 +tenk unique1=4361i,unique2=5674i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=361i,twothousand=361i,fivethous=4361i,tenthous=4361i,odd=122i,even=123i,stringu1="TLAAAA",stringu2="GKIAAA",string4="OOOOxx" 490320000000000000 +tenk unique1=1719i,unique2=5675i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=719i,twothousand=1719i,fivethous=1719i,tenthous=1719i,odd=38i,even=39i,stringu1="DOAAAA",stringu2="HKIAAA",string4="VVVVxx" 490406400000000000 +tenk unique1=3109i,unique2=5676i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=109i,twothousand=1109i,fivethous=3109i,tenthous=3109i,odd=18i,even=19i,stringu1="PPAAAA",stringu2="IKIAAA",string4="AAAAxx" 490492800000000000 +tenk unique1=7135i,unique2=5677i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=135i,twothousand=1135i,fivethous=2135i,tenthous=7135i,odd=70i,even=71i,stringu1="LOAAAA",stringu2="JKIAAA",string4="HHHHxx" 490579200000000000 +tenk unique1=1964i,unique2=5678i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=964i,twothousand=1964i,fivethous=1964i,tenthous=1964i,odd=128i,even=129i,stringu1="OXAAAA",stringu2="KKIAAA",string4="OOOOxx" 490665600000000000 +tenk unique1=3i,unique2=5679i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=3i,fivethous=3i,tenthous=3i,odd=6i,even=7i,stringu1="DAAAAA",stringu2="LKIAAA",string4="VVVVxx" 490752000000000000 +tenk unique1=1868i,unique2=5680i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=868i,twothousand=1868i,fivethous=1868i,tenthous=1868i,odd=136i,even=137i,stringu1="WTAAAA",stringu2="MKIAAA",string4="AAAAxx" 490838400000000000 +tenk unique1=5182i,unique2=5681i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=182i,twothousand=1182i,fivethous=182i,tenthous=5182i,odd=164i,even=165i,stringu1="IRAAAA",stringu2="NKIAAA",string4="HHHHxx" 490924800000000000 +tenk unique1=7567i,unique2=5682i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=567i,twothousand=1567i,fivethous=2567i,tenthous=7567i,odd=134i,even=135i,stringu1="BFAAAA",stringu2="OKIAAA",string4="OOOOxx" 491011200000000000 +tenk unique1=3676i,unique2=5683i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=676i,twothousand=1676i,fivethous=3676i,tenthous=3676i,odd=152i,even=153i,stringu1="KLAAAA",stringu2="PKIAAA",string4="VVVVxx" 491097600000000000 +tenk unique1=9382i,unique2=5684i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=382i,twothousand=1382i,fivethous=4382i,tenthous=9382i,odd=164i,even=165i,stringu1="WWAAAA",stringu2="QKIAAA",string4="AAAAxx" 491184000000000000 +tenk unique1=8645i,unique2=5685i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=645i,twothousand=645i,fivethous=3645i,tenthous=8645i,odd=90i,even=91i,stringu1="NUAAAA",stringu2="RKIAAA",string4="HHHHxx" 491270400000000000 +tenk unique1=2018i,unique2=5686i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=18i,twothousand=18i,fivethous=2018i,tenthous=2018i,odd=36i,even=37i,stringu1="QZAAAA",stringu2="SKIAAA",string4="OOOOxx" 491356800000000000 +tenk unique1=217i,unique2=5687i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=217i,twothousand=217i,fivethous=217i,tenthous=217i,odd=34i,even=35i,stringu1="JIAAAA",stringu2="TKIAAA",string4="VVVVxx" 491443200000000000 +tenk unique1=6793i,unique2=5688i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=793i,twothousand=793i,fivethous=1793i,tenthous=6793i,odd=186i,even=187i,stringu1="HBAAAA",stringu2="UKIAAA",string4="AAAAxx" 491529600000000000 +tenk unique1=7280i,unique2=5689i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=280i,twothousand=1280i,fivethous=2280i,tenthous=7280i,odd=160i,even=161i,stringu1="AUAAAA",stringu2="VKIAAA",string4="HHHHxx" 491616000000000000 +tenk unique1=2168i,unique2=5690i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=168i,twothousand=168i,fivethous=2168i,tenthous=2168i,odd=136i,even=137i,stringu1="KFAAAA",stringu2="WKIAAA",string4="OOOOxx" 491702400000000000 +tenk unique1=5259i,unique2=5691i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=259i,twothousand=1259i,fivethous=259i,tenthous=5259i,odd=118i,even=119i,stringu1="HUAAAA",stringu2="XKIAAA",string4="VVVVxx" 491788800000000000 +tenk unique1=6019i,unique2=5692i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=19i,twothousand=19i,fivethous=1019i,tenthous=6019i,odd=38i,even=39i,stringu1="NXAAAA",stringu2="YKIAAA",string4="AAAAxx" 491875200000000000 +tenk unique1=877i,unique2=5693i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=877i,twothousand=877i,fivethous=877i,tenthous=877i,odd=154i,even=155i,stringu1="THAAAA",stringu2="ZKIAAA",string4="HHHHxx" 491961600000000000 +tenk unique1=4961i,unique2=5694i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=961i,twothousand=961i,fivethous=4961i,tenthous=4961i,odd=122i,even=123i,stringu1="VIAAAA",stringu2="ALIAAA",string4="OOOOxx" 492048000000000000 +tenk unique1=1873i,unique2=5695i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=873i,twothousand=1873i,fivethous=1873i,tenthous=1873i,odd=146i,even=147i,stringu1="BUAAAA",stringu2="BLIAAA",string4="VVVVxx" 492134400000000000 +tenk unique1=13i,unique2=5696i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=13i,twothousand=13i,fivethous=13i,tenthous=13i,odd=26i,even=27i,stringu1="NAAAAA",stringu2="CLIAAA",string4="AAAAxx" 492220800000000000 +tenk unique1=1537i,unique2=5697i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=537i,twothousand=1537i,fivethous=1537i,tenthous=1537i,odd=74i,even=75i,stringu1="DHAAAA",stringu2="DLIAAA",string4="HHHHxx" 492307200000000000 +tenk unique1=3129i,unique2=5698i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=129i,twothousand=1129i,fivethous=3129i,tenthous=3129i,odd=58i,even=59i,stringu1="JQAAAA",stringu2="ELIAAA",string4="OOOOxx" 492393600000000000 +tenk unique1=6473i,unique2=5699i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=473i,twothousand=473i,fivethous=1473i,tenthous=6473i,odd=146i,even=147i,stringu1="ZOAAAA",stringu2="FLIAAA",string4="VVVVxx" 492480000000000000 +tenk unique1=7865i,unique2=5700i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=865i,twothousand=1865i,fivethous=2865i,tenthous=7865i,odd=130i,even=131i,stringu1="NQAAAA",stringu2="GLIAAA",string4="AAAAxx" 492566400000000000 +tenk unique1=7822i,unique2=5701i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=822i,twothousand=1822i,fivethous=2822i,tenthous=7822i,odd=44i,even=45i,stringu1="WOAAAA",stringu2="HLIAAA",string4="HHHHxx" 492652800000000000 +tenk unique1=239i,unique2=5702i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=239i,twothousand=239i,fivethous=239i,tenthous=239i,odd=78i,even=79i,stringu1="FJAAAA",stringu2="ILIAAA",string4="OOOOxx" 492739200000000000 +tenk unique1=2062i,unique2=5703i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=62i,twothousand=62i,fivethous=2062i,tenthous=2062i,odd=124i,even=125i,stringu1="IBAAAA",stringu2="JLIAAA",string4="VVVVxx" 492825600000000000 +tenk unique1=762i,unique2=5704i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=762i,twothousand=762i,fivethous=762i,tenthous=762i,odd=124i,even=125i,stringu1="IDAAAA",stringu2="KLIAAA",string4="AAAAxx" 492912000000000000 +tenk unique1=3764i,unique2=5705i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=764i,twothousand=1764i,fivethous=3764i,tenthous=3764i,odd=128i,even=129i,stringu1="UOAAAA",stringu2="LLIAAA",string4="HHHHxx" 492998400000000000 +tenk unique1=465i,unique2=5706i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=465i,twothousand=465i,fivethous=465i,tenthous=465i,odd=130i,even=131i,stringu1="XRAAAA",stringu2="MLIAAA",string4="OOOOxx" 493084800000000000 +tenk unique1=2587i,unique2=5707i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=587i,twothousand=587i,fivethous=2587i,tenthous=2587i,odd=174i,even=175i,stringu1="NVAAAA",stringu2="NLIAAA",string4="VVVVxx" 493171200000000000 +tenk unique1=8402i,unique2=5708i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=402i,twothousand=402i,fivethous=3402i,tenthous=8402i,odd=4i,even=5i,stringu1="ELAAAA",stringu2="OLIAAA",string4="AAAAxx" 493257600000000000 +tenk unique1=1055i,unique2=5709i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=55i,twothousand=1055i,fivethous=1055i,tenthous=1055i,odd=110i,even=111i,stringu1="POAAAA",stringu2="PLIAAA",string4="HHHHxx" 493344000000000000 +tenk unique1=3072i,unique2=5710i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=72i,twothousand=1072i,fivethous=3072i,tenthous=3072i,odd=144i,even=145i,stringu1="EOAAAA",stringu2="QLIAAA",string4="OOOOxx" 493430400000000000 +tenk unique1=7359i,unique2=5711i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=359i,twothousand=1359i,fivethous=2359i,tenthous=7359i,odd=118i,even=119i,stringu1="BXAAAA",stringu2="RLIAAA",string4="VVVVxx" 493516800000000000 +tenk unique1=6558i,unique2=5712i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=558i,twothousand=558i,fivethous=1558i,tenthous=6558i,odd=116i,even=117i,stringu1="GSAAAA",stringu2="SLIAAA",string4="AAAAxx" 493603200000000000 +tenk unique1=48i,unique2=5713i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=48i,twothousand=48i,fivethous=48i,tenthous=48i,odd=96i,even=97i,stringu1="WBAAAA",stringu2="TLIAAA",string4="HHHHxx" 493689600000000000 +tenk unique1=5382i,unique2=5714i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=382i,twothousand=1382i,fivethous=382i,tenthous=5382i,odd=164i,even=165i,stringu1="AZAAAA",stringu2="ULIAAA",string4="OOOOxx" 493776000000000000 +tenk unique1=947i,unique2=5715i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=947i,twothousand=947i,fivethous=947i,tenthous=947i,odd=94i,even=95i,stringu1="LKAAAA",stringu2="VLIAAA",string4="VVVVxx" 493862400000000000 +tenk unique1=2644i,unique2=5716i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=644i,twothousand=644i,fivethous=2644i,tenthous=2644i,odd=88i,even=89i,stringu1="SXAAAA",stringu2="WLIAAA",string4="AAAAxx" 493948800000000000 +tenk unique1=7516i,unique2=5717i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=516i,twothousand=1516i,fivethous=2516i,tenthous=7516i,odd=32i,even=33i,stringu1="CDAAAA",stringu2="XLIAAA",string4="HHHHxx" 494035200000000000 +tenk unique1=2362i,unique2=5718i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=362i,twothousand=362i,fivethous=2362i,tenthous=2362i,odd=124i,even=125i,stringu1="WMAAAA",stringu2="YLIAAA",string4="OOOOxx" 494121600000000000 +tenk unique1=839i,unique2=5719i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=839i,twothousand=839i,fivethous=839i,tenthous=839i,odd=78i,even=79i,stringu1="HGAAAA",stringu2="ZLIAAA",string4="VVVVxx" 494208000000000000 +tenk unique1=2216i,unique2=5720i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=216i,twothousand=216i,fivethous=2216i,tenthous=2216i,odd=32i,even=33i,stringu1="GHAAAA",stringu2="AMIAAA",string4="AAAAxx" 494294400000000000 +tenk unique1=7673i,unique2=5721i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=673i,twothousand=1673i,fivethous=2673i,tenthous=7673i,odd=146i,even=147i,stringu1="DJAAAA",stringu2="BMIAAA",string4="HHHHxx" 494380800000000000 +tenk unique1=8173i,unique2=5722i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=173i,twothousand=173i,fivethous=3173i,tenthous=8173i,odd=146i,even=147i,stringu1="JCAAAA",stringu2="CMIAAA",string4="OOOOxx" 494467200000000000 +tenk unique1=1630i,unique2=5723i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=630i,twothousand=1630i,fivethous=1630i,tenthous=1630i,odd=60i,even=61i,stringu1="SKAAAA",stringu2="DMIAAA",string4="VVVVxx" 494553600000000000 +tenk unique1=9057i,unique2=5724i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=57i,twothousand=1057i,fivethous=4057i,tenthous=9057i,odd=114i,even=115i,stringu1="JKAAAA",stringu2="EMIAAA",string4="AAAAxx" 494640000000000000 +tenk unique1=4392i,unique2=5725i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=392i,twothousand=392i,fivethous=4392i,tenthous=4392i,odd=184i,even=185i,stringu1="YMAAAA",stringu2="FMIAAA",string4="HHHHxx" 494726400000000000 +tenk unique1=3695i,unique2=5726i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=695i,twothousand=1695i,fivethous=3695i,tenthous=3695i,odd=190i,even=191i,stringu1="DMAAAA",stringu2="GMIAAA",string4="OOOOxx" 494812800000000000 +tenk unique1=5751i,unique2=5727i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=751i,twothousand=1751i,fivethous=751i,tenthous=5751i,odd=102i,even=103i,stringu1="FNAAAA",stringu2="HMIAAA",string4="VVVVxx" 494899200000000000 +tenk unique1=5745i,unique2=5728i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=745i,twothousand=1745i,fivethous=745i,tenthous=5745i,odd=90i,even=91i,stringu1="ZMAAAA",stringu2="IMIAAA",string4="AAAAxx" 494985600000000000 +tenk unique1=7945i,unique2=5729i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=945i,twothousand=1945i,fivethous=2945i,tenthous=7945i,odd=90i,even=91i,stringu1="PTAAAA",stringu2="JMIAAA",string4="HHHHxx" 495072000000000000 +tenk unique1=5174i,unique2=5730i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=174i,twothousand=1174i,fivethous=174i,tenthous=5174i,odd=148i,even=149i,stringu1="ARAAAA",stringu2="KMIAAA",string4="OOOOxx" 495158400000000000 +tenk unique1=3829i,unique2=5731i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=829i,twothousand=1829i,fivethous=3829i,tenthous=3829i,odd=58i,even=59i,stringu1="HRAAAA",stringu2="LMIAAA",string4="VVVVxx" 495244800000000000 +tenk unique1=3317i,unique2=5732i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=317i,twothousand=1317i,fivethous=3317i,tenthous=3317i,odd=34i,even=35i,stringu1="PXAAAA",stringu2="MMIAAA",string4="AAAAxx" 495331200000000000 +tenk unique1=4253i,unique2=5733i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=253i,twothousand=253i,fivethous=4253i,tenthous=4253i,odd=106i,even=107i,stringu1="PHAAAA",stringu2="NMIAAA",string4="HHHHxx" 495417600000000000 +tenk unique1=1291i,unique2=5734i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=291i,twothousand=1291i,fivethous=1291i,tenthous=1291i,odd=182i,even=183i,stringu1="RXAAAA",stringu2="OMIAAA",string4="OOOOxx" 495504000000000000 +tenk unique1=3266i,unique2=5735i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=266i,twothousand=1266i,fivethous=3266i,tenthous=3266i,odd=132i,even=133i,stringu1="QVAAAA",stringu2="PMIAAA",string4="VVVVxx" 495590400000000000 +tenk unique1=2939i,unique2=5736i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=939i,twothousand=939i,fivethous=2939i,tenthous=2939i,odd=78i,even=79i,stringu1="BJAAAA",stringu2="QMIAAA",string4="AAAAxx" 495676800000000000 +tenk unique1=2755i,unique2=5737i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=755i,twothousand=755i,fivethous=2755i,tenthous=2755i,odd=110i,even=111i,stringu1="ZBAAAA",stringu2="RMIAAA",string4="HHHHxx" 495763200000000000 +tenk unique1=6844i,unique2=5738i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=844i,twothousand=844i,fivethous=1844i,tenthous=6844i,odd=88i,even=89i,stringu1="GDAAAA",stringu2="SMIAAA",string4="OOOOxx" 495849600000000000 +tenk unique1=8594i,unique2=5739i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=594i,twothousand=594i,fivethous=3594i,tenthous=8594i,odd=188i,even=189i,stringu1="OSAAAA",stringu2="TMIAAA",string4="VVVVxx" 495936000000000000 +tenk unique1=704i,unique2=5740i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=704i,twothousand=704i,fivethous=704i,tenthous=704i,odd=8i,even=9i,stringu1="CBAAAA",stringu2="UMIAAA",string4="AAAAxx" 496022400000000000 +tenk unique1=1681i,unique2=5741i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=681i,twothousand=1681i,fivethous=1681i,tenthous=1681i,odd=162i,even=163i,stringu1="RMAAAA",stringu2="VMIAAA",string4="HHHHxx" 496108800000000000 +tenk unique1=364i,unique2=5742i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=364i,twothousand=364i,fivethous=364i,tenthous=364i,odd=128i,even=129i,stringu1="AOAAAA",stringu2="WMIAAA",string4="OOOOxx" 496195200000000000 +tenk unique1=2928i,unique2=5743i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=928i,twothousand=928i,fivethous=2928i,tenthous=2928i,odd=56i,even=57i,stringu1="QIAAAA",stringu2="XMIAAA",string4="VVVVxx" 496281600000000000 +tenk unique1=117i,unique2=5744i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=117i,twothousand=117i,fivethous=117i,tenthous=117i,odd=34i,even=35i,stringu1="NEAAAA",stringu2="YMIAAA",string4="AAAAxx" 496368000000000000 +tenk unique1=96i,unique2=5745i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=96i,twothousand=96i,fivethous=96i,tenthous=96i,odd=192i,even=193i,stringu1="SDAAAA",stringu2="ZMIAAA",string4="HHHHxx" 496454400000000000 +tenk unique1=7796i,unique2=5746i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=796i,twothousand=1796i,fivethous=2796i,tenthous=7796i,odd=192i,even=193i,stringu1="WNAAAA",stringu2="ANIAAA",string4="OOOOxx" 496540800000000000 +tenk unique1=3101i,unique2=5747i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=101i,twothousand=1101i,fivethous=3101i,tenthous=3101i,odd=2i,even=3i,stringu1="HPAAAA",stringu2="BNIAAA",string4="VVVVxx" 496627200000000000 +tenk unique1=3397i,unique2=5748i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=397i,twothousand=1397i,fivethous=3397i,tenthous=3397i,odd=194i,even=195i,stringu1="RAAAAA",stringu2="CNIAAA",string4="AAAAxx" 496713600000000000 +tenk unique1=1605i,unique2=5749i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=605i,twothousand=1605i,fivethous=1605i,tenthous=1605i,odd=10i,even=11i,stringu1="TJAAAA",stringu2="DNIAAA",string4="HHHHxx" 496800000000000000 +tenk unique1=4881i,unique2=5750i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=881i,twothousand=881i,fivethous=4881i,tenthous=4881i,odd=162i,even=163i,stringu1="TFAAAA",stringu2="ENIAAA",string4="OOOOxx" 496886400000000000 +tenk unique1=4521i,unique2=5751i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=521i,twothousand=521i,fivethous=4521i,tenthous=4521i,odd=42i,even=43i,stringu1="XRAAAA",stringu2="FNIAAA",string4="VVVVxx" 496972800000000000 +tenk unique1=6430i,unique2=5752i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=430i,twothousand=430i,fivethous=1430i,tenthous=6430i,odd=60i,even=61i,stringu1="INAAAA",stringu2="GNIAAA",string4="AAAAxx" 497059200000000000 +tenk unique1=282i,unique2=5753i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=282i,twothousand=282i,fivethous=282i,tenthous=282i,odd=164i,even=165i,stringu1="WKAAAA",stringu2="HNIAAA",string4="HHHHxx" 497145600000000000 +tenk unique1=9645i,unique2=5754i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=645i,twothousand=1645i,fivethous=4645i,tenthous=9645i,odd=90i,even=91i,stringu1="ZGAAAA",stringu2="INIAAA",string4="OOOOxx" 497232000000000000 +tenk unique1=8946i,unique2=5755i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=946i,twothousand=946i,fivethous=3946i,tenthous=8946i,odd=92i,even=93i,stringu1="CGAAAA",stringu2="JNIAAA",string4="VVVVxx" 497318400000000000 +tenk unique1=5064i,unique2=5756i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=64i,twothousand=1064i,fivethous=64i,tenthous=5064i,odd=128i,even=129i,stringu1="UMAAAA",stringu2="KNIAAA",string4="AAAAxx" 497404800000000000 +tenk unique1=7470i,unique2=5757i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=470i,twothousand=1470i,fivethous=2470i,tenthous=7470i,odd=140i,even=141i,stringu1="IBAAAA",stringu2="LNIAAA",string4="HHHHxx" 497491200000000000 +tenk unique1=5886i,unique2=5758i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=886i,twothousand=1886i,fivethous=886i,tenthous=5886i,odd=172i,even=173i,stringu1="KSAAAA",stringu2="MNIAAA",string4="OOOOxx" 497577600000000000 +tenk unique1=6280i,unique2=5759i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=280i,twothousand=280i,fivethous=1280i,tenthous=6280i,odd=160i,even=161i,stringu1="OHAAAA",stringu2="NNIAAA",string4="VVVVxx" 497664000000000000 +tenk unique1=5247i,unique2=5760i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=247i,twothousand=1247i,fivethous=247i,tenthous=5247i,odd=94i,even=95i,stringu1="VTAAAA",stringu2="ONIAAA",string4="AAAAxx" 497750400000000000 +tenk unique1=412i,unique2=5761i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=412i,twothousand=412i,fivethous=412i,tenthous=412i,odd=24i,even=25i,stringu1="WPAAAA",stringu2="PNIAAA",string4="HHHHxx" 497836800000000000 +tenk unique1=5342i,unique2=5762i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=342i,twothousand=1342i,fivethous=342i,tenthous=5342i,odd=84i,even=85i,stringu1="MXAAAA",stringu2="QNIAAA",string4="OOOOxx" 497923200000000000 +tenk unique1=2271i,unique2=5763i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=271i,twothousand=271i,fivethous=2271i,tenthous=2271i,odd=142i,even=143i,stringu1="JJAAAA",stringu2="RNIAAA",string4="VVVVxx" 498009600000000000 +tenk unique1=849i,unique2=5764i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=849i,twothousand=849i,fivethous=849i,tenthous=849i,odd=98i,even=99i,stringu1="RGAAAA",stringu2="SNIAAA",string4="AAAAxx" 498096000000000000 +tenk unique1=1885i,unique2=5765i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=885i,twothousand=1885i,fivethous=1885i,tenthous=1885i,odd=170i,even=171i,stringu1="NUAAAA",stringu2="TNIAAA",string4="HHHHxx" 498182400000000000 +tenk unique1=5620i,unique2=5766i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=620i,twothousand=1620i,fivethous=620i,tenthous=5620i,odd=40i,even=41i,stringu1="EIAAAA",stringu2="UNIAAA",string4="OOOOxx" 498268800000000000 +tenk unique1=7079i,unique2=5767i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=79i,twothousand=1079i,fivethous=2079i,tenthous=7079i,odd=158i,even=159i,stringu1="HMAAAA",stringu2="VNIAAA",string4="VVVVxx" 498355200000000000 +tenk unique1=5819i,unique2=5768i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=819i,twothousand=1819i,fivethous=819i,tenthous=5819i,odd=38i,even=39i,stringu1="VPAAAA",stringu2="WNIAAA",string4="AAAAxx" 498441600000000000 +tenk unique1=7497i,unique2=5769i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=497i,twothousand=1497i,fivethous=2497i,tenthous=7497i,odd=194i,even=195i,stringu1="JCAAAA",stringu2="XNIAAA",string4="HHHHxx" 498528000000000000 +tenk unique1=5993i,unique2=5770i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=993i,twothousand=1993i,fivethous=993i,tenthous=5993i,odd=186i,even=187i,stringu1="NWAAAA",stringu2="YNIAAA",string4="OOOOxx" 498614400000000000 +tenk unique1=3739i,unique2=5771i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=739i,twothousand=1739i,fivethous=3739i,tenthous=3739i,odd=78i,even=79i,stringu1="VNAAAA",stringu2="ZNIAAA",string4="VVVVxx" 498700800000000000 +tenk unique1=6296i,unique2=5772i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=296i,twothousand=296i,fivethous=1296i,tenthous=6296i,odd=192i,even=193i,stringu1="EIAAAA",stringu2="AOIAAA",string4="AAAAxx" 498787200000000000 +tenk unique1=2716i,unique2=5773i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=716i,twothousand=716i,fivethous=2716i,tenthous=2716i,odd=32i,even=33i,stringu1="MAAAAA",stringu2="BOIAAA",string4="HHHHxx" 498873600000000000 +tenk unique1=1130i,unique2=5774i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=130i,twothousand=1130i,fivethous=1130i,tenthous=1130i,odd=60i,even=61i,stringu1="MRAAAA",stringu2="COIAAA",string4="OOOOxx" 498960000000000000 +tenk unique1=5593i,unique2=5775i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=593i,twothousand=1593i,fivethous=593i,tenthous=5593i,odd=186i,even=187i,stringu1="DHAAAA",stringu2="DOIAAA",string4="VVVVxx" 499046400000000000 +tenk unique1=6972i,unique2=5776i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=972i,twothousand=972i,fivethous=1972i,tenthous=6972i,odd=144i,even=145i,stringu1="EIAAAA",stringu2="EOIAAA",string4="AAAAxx" 499132800000000000 +tenk unique1=8360i,unique2=5777i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=360i,twothousand=360i,fivethous=3360i,tenthous=8360i,odd=120i,even=121i,stringu1="OJAAAA",stringu2="FOIAAA",string4="HHHHxx" 499219200000000000 +tenk unique1=6448i,unique2=5778i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=448i,twothousand=448i,fivethous=1448i,tenthous=6448i,odd=96i,even=97i,stringu1="AOAAAA",stringu2="GOIAAA",string4="OOOOxx" 499305600000000000 +tenk unique1=3689i,unique2=5779i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=689i,twothousand=1689i,fivethous=3689i,tenthous=3689i,odd=178i,even=179i,stringu1="XLAAAA",stringu2="HOIAAA",string4="VVVVxx" 499392000000000000 +tenk unique1=7951i,unique2=5780i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=951i,twothousand=1951i,fivethous=2951i,tenthous=7951i,odd=102i,even=103i,stringu1="VTAAAA",stringu2="IOIAAA",string4="AAAAxx" 499478400000000000 +tenk unique1=2974i,unique2=5781i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=974i,twothousand=974i,fivethous=2974i,tenthous=2974i,odd=148i,even=149i,stringu1="KKAAAA",stringu2="JOIAAA",string4="HHHHxx" 499564800000000000 +tenk unique1=6600i,unique2=5782i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=600i,twothousand=600i,fivethous=1600i,tenthous=6600i,odd=0i,even=1i,stringu1="WTAAAA",stringu2="KOIAAA",string4="OOOOxx" 499651200000000000 +tenk unique1=4662i,unique2=5783i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=662i,twothousand=662i,fivethous=4662i,tenthous=4662i,odd=124i,even=125i,stringu1="IXAAAA",stringu2="LOIAAA",string4="VVVVxx" 499737600000000000 +tenk unique1=4765i,unique2=5784i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=765i,twothousand=765i,fivethous=4765i,tenthous=4765i,odd=130i,even=131i,stringu1="HBAAAA",stringu2="MOIAAA",string4="AAAAxx" 499824000000000000 +tenk unique1=355i,unique2=5785i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=355i,twothousand=355i,fivethous=355i,tenthous=355i,odd=110i,even=111i,stringu1="RNAAAA",stringu2="NOIAAA",string4="HHHHxx" 499910400000000000 +tenk unique1=6228i,unique2=5786i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=228i,twothousand=228i,fivethous=1228i,tenthous=6228i,odd=56i,even=57i,stringu1="OFAAAA",stringu2="OOIAAA",string4="OOOOxx" 499996800000000000 +tenk unique1=964i,unique2=5787i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=964i,twothousand=964i,fivethous=964i,tenthous=964i,odd=128i,even=129i,stringu1="CLAAAA",stringu2="POIAAA",string4="VVVVxx" 500083200000000000 +tenk unique1=3082i,unique2=5788i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=82i,twothousand=1082i,fivethous=3082i,tenthous=3082i,odd=164i,even=165i,stringu1="OOAAAA",stringu2="QOIAAA",string4="AAAAxx" 500169600000000000 +tenk unique1=7028i,unique2=5789i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=28i,twothousand=1028i,fivethous=2028i,tenthous=7028i,odd=56i,even=57i,stringu1="IKAAAA",stringu2="ROIAAA",string4="HHHHxx" 500256000000000000 +tenk unique1=4505i,unique2=5790i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=505i,twothousand=505i,fivethous=4505i,tenthous=4505i,odd=10i,even=11i,stringu1="HRAAAA",stringu2="SOIAAA",string4="OOOOxx" 500342400000000000 +tenk unique1=8961i,unique2=5791i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=961i,twothousand=961i,fivethous=3961i,tenthous=8961i,odd=122i,even=123i,stringu1="RGAAAA",stringu2="TOIAAA",string4="VVVVxx" 500428800000000000 +tenk unique1=9571i,unique2=5792i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=571i,twothousand=1571i,fivethous=4571i,tenthous=9571i,odd=142i,even=143i,stringu1="DEAAAA",stringu2="UOIAAA",string4="AAAAxx" 500515200000000000 +tenk unique1=9394i,unique2=5793i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=394i,twothousand=1394i,fivethous=4394i,tenthous=9394i,odd=188i,even=189i,stringu1="IXAAAA",stringu2="VOIAAA",string4="HHHHxx" 500601600000000000 +tenk unique1=4245i,unique2=5794i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=245i,twothousand=245i,fivethous=4245i,tenthous=4245i,odd=90i,even=91i,stringu1="HHAAAA",stringu2="WOIAAA",string4="OOOOxx" 500688000000000000 +tenk unique1=7560i,unique2=5795i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=560i,twothousand=1560i,fivethous=2560i,tenthous=7560i,odd=120i,even=121i,stringu1="UEAAAA",stringu2="XOIAAA",string4="VVVVxx" 500774400000000000 +tenk unique1=2907i,unique2=5796i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=907i,twothousand=907i,fivethous=2907i,tenthous=2907i,odd=14i,even=15i,stringu1="VHAAAA",stringu2="YOIAAA",string4="AAAAxx" 500860800000000000 +tenk unique1=7817i,unique2=5797i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=817i,twothousand=1817i,fivethous=2817i,tenthous=7817i,odd=34i,even=35i,stringu1="ROAAAA",stringu2="ZOIAAA",string4="HHHHxx" 500947200000000000 +tenk unique1=5408i,unique2=5798i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=408i,twothousand=1408i,fivethous=408i,tenthous=5408i,odd=16i,even=17i,stringu1="AAAAAA",stringu2="APIAAA",string4="OOOOxx" 501033600000000000 +tenk unique1=8092i,unique2=5799i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=92i,twothousand=92i,fivethous=3092i,tenthous=8092i,odd=184i,even=185i,stringu1="GZAAAA",stringu2="BPIAAA",string4="VVVVxx" 501120000000000000 +tenk unique1=1309i,unique2=5800i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=309i,twothousand=1309i,fivethous=1309i,tenthous=1309i,odd=18i,even=19i,stringu1="JYAAAA",stringu2="CPIAAA",string4="AAAAxx" 501206400000000000 +tenk unique1=6673i,unique2=5801i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=673i,twothousand=673i,fivethous=1673i,tenthous=6673i,odd=146i,even=147i,stringu1="RWAAAA",stringu2="DPIAAA",string4="HHHHxx" 501292800000000000 +tenk unique1=1245i,unique2=5802i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=245i,twothousand=1245i,fivethous=1245i,tenthous=1245i,odd=90i,even=91i,stringu1="XVAAAA",stringu2="EPIAAA",string4="OOOOxx" 501379200000000000 +tenk unique1=6790i,unique2=5803i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=790i,twothousand=790i,fivethous=1790i,tenthous=6790i,odd=180i,even=181i,stringu1="EBAAAA",stringu2="FPIAAA",string4="VVVVxx" 501465600000000000 +tenk unique1=8380i,unique2=5804i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=380i,twothousand=380i,fivethous=3380i,tenthous=8380i,odd=160i,even=161i,stringu1="IKAAAA",stringu2="GPIAAA",string4="AAAAxx" 501552000000000000 +tenk unique1=5786i,unique2=5805i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=786i,twothousand=1786i,fivethous=786i,tenthous=5786i,odd=172i,even=173i,stringu1="OOAAAA",stringu2="HPIAAA",string4="HHHHxx" 501638400000000000 +tenk unique1=9590i,unique2=5806i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=590i,twothousand=1590i,fivethous=4590i,tenthous=9590i,odd=180i,even=181i,stringu1="WEAAAA",stringu2="IPIAAA",string4="OOOOxx" 501724800000000000 +tenk unique1=5763i,unique2=5807i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=763i,twothousand=1763i,fivethous=763i,tenthous=5763i,odd=126i,even=127i,stringu1="RNAAAA",stringu2="JPIAAA",string4="VVVVxx" 501811200000000000 +tenk unique1=1345i,unique2=5808i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=345i,twothousand=1345i,fivethous=1345i,tenthous=1345i,odd=90i,even=91i,stringu1="TZAAAA",stringu2="KPIAAA",string4="AAAAxx" 501897600000000000 +tenk unique1=3480i,unique2=5809i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=480i,twothousand=1480i,fivethous=3480i,tenthous=3480i,odd=160i,even=161i,stringu1="WDAAAA",stringu2="LPIAAA",string4="HHHHxx" 501984000000000000 +tenk unique1=7864i,unique2=5810i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=864i,twothousand=1864i,fivethous=2864i,tenthous=7864i,odd=128i,even=129i,stringu1="MQAAAA",stringu2="MPIAAA",string4="OOOOxx" 502070400000000000 +tenk unique1=4853i,unique2=5811i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=853i,twothousand=853i,fivethous=4853i,tenthous=4853i,odd=106i,even=107i,stringu1="REAAAA",stringu2="NPIAAA",string4="VVVVxx" 502156800000000000 +tenk unique1=1445i,unique2=5812i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=445i,twothousand=1445i,fivethous=1445i,tenthous=1445i,odd=90i,even=91i,stringu1="PDAAAA",stringu2="OPIAAA",string4="AAAAxx" 502243200000000000 +tenk unique1=170i,unique2=5813i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=170i,twothousand=170i,fivethous=170i,tenthous=170i,odd=140i,even=141i,stringu1="OGAAAA",stringu2="PPIAAA",string4="HHHHxx" 502329600000000000 +tenk unique1=7348i,unique2=5814i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=348i,twothousand=1348i,fivethous=2348i,tenthous=7348i,odd=96i,even=97i,stringu1="QWAAAA",stringu2="QPIAAA",string4="OOOOxx" 502416000000000000 +tenk unique1=3920i,unique2=5815i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=920i,twothousand=1920i,fivethous=3920i,tenthous=3920i,odd=40i,even=41i,stringu1="UUAAAA",stringu2="RPIAAA",string4="VVVVxx" 502502400000000000 +tenk unique1=3307i,unique2=5816i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=307i,twothousand=1307i,fivethous=3307i,tenthous=3307i,odd=14i,even=15i,stringu1="FXAAAA",stringu2="SPIAAA",string4="AAAAxx" 502588800000000000 +tenk unique1=4584i,unique2=5817i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=584i,twothousand=584i,fivethous=4584i,tenthous=4584i,odd=168i,even=169i,stringu1="IUAAAA",stringu2="TPIAAA",string4="HHHHxx" 502675200000000000 +tenk unique1=3344i,unique2=5818i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=344i,twothousand=1344i,fivethous=3344i,tenthous=3344i,odd=88i,even=89i,stringu1="QYAAAA",stringu2="UPIAAA",string4="OOOOxx" 502761600000000000 +tenk unique1=4360i,unique2=5819i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=360i,twothousand=360i,fivethous=4360i,tenthous=4360i,odd=120i,even=121i,stringu1="SLAAAA",stringu2="VPIAAA",string4="VVVVxx" 502848000000000000 +tenk unique1=8757i,unique2=5820i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=757i,twothousand=757i,fivethous=3757i,tenthous=8757i,odd=114i,even=115i,stringu1="VYAAAA",stringu2="WPIAAA",string4="AAAAxx" 502934400000000000 +tenk unique1=4315i,unique2=5821i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=315i,twothousand=315i,fivethous=4315i,tenthous=4315i,odd=30i,even=31i,stringu1="ZJAAAA",stringu2="XPIAAA",string4="HHHHxx" 503020800000000000 +tenk unique1=5243i,unique2=5822i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=243i,twothousand=1243i,fivethous=243i,tenthous=5243i,odd=86i,even=87i,stringu1="RTAAAA",stringu2="YPIAAA",string4="OOOOxx" 503107200000000000 +tenk unique1=8550i,unique2=5823i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=550i,twothousand=550i,fivethous=3550i,tenthous=8550i,odd=100i,even=101i,stringu1="WQAAAA",stringu2="ZPIAAA",string4="VVVVxx" 503193600000000000 +tenk unique1=159i,unique2=5824i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=159i,twothousand=159i,fivethous=159i,tenthous=159i,odd=118i,even=119i,stringu1="DGAAAA",stringu2="AQIAAA",string4="AAAAxx" 503280000000000000 +tenk unique1=4710i,unique2=5825i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=710i,twothousand=710i,fivethous=4710i,tenthous=4710i,odd=20i,even=21i,stringu1="EZAAAA",stringu2="BQIAAA",string4="HHHHxx" 503366400000000000 +tenk unique1=7179i,unique2=5826i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=179i,twothousand=1179i,fivethous=2179i,tenthous=7179i,odd=158i,even=159i,stringu1="DQAAAA",stringu2="CQIAAA",string4="OOOOxx" 503452800000000000 +tenk unique1=2509i,unique2=5827i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=509i,twothousand=509i,fivethous=2509i,tenthous=2509i,odd=18i,even=19i,stringu1="NSAAAA",stringu2="DQIAAA",string4="VVVVxx" 503539200000000000 +tenk unique1=6981i,unique2=5828i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=981i,twothousand=981i,fivethous=1981i,tenthous=6981i,odd=162i,even=163i,stringu1="NIAAAA",stringu2="EQIAAA",string4="AAAAxx" 503625600000000000 +tenk unique1=5060i,unique2=5829i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=60i,twothousand=1060i,fivethous=60i,tenthous=5060i,odd=120i,even=121i,stringu1="QMAAAA",stringu2="FQIAAA",string4="HHHHxx" 503712000000000000 +tenk unique1=5601i,unique2=5830i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=601i,twothousand=1601i,fivethous=601i,tenthous=5601i,odd=2i,even=3i,stringu1="LHAAAA",stringu2="GQIAAA",string4="OOOOxx" 503798400000000000 +tenk unique1=703i,unique2=5831i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=703i,twothousand=703i,fivethous=703i,tenthous=703i,odd=6i,even=7i,stringu1="BBAAAA",stringu2="HQIAAA",string4="VVVVxx" 503884800000000000 +tenk unique1=8719i,unique2=5832i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=719i,twothousand=719i,fivethous=3719i,tenthous=8719i,odd=38i,even=39i,stringu1="JXAAAA",stringu2="IQIAAA",string4="AAAAxx" 503971200000000000 +tenk unique1=1570i,unique2=5833i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=570i,twothousand=1570i,fivethous=1570i,tenthous=1570i,odd=140i,even=141i,stringu1="KIAAAA",stringu2="JQIAAA",string4="HHHHxx" 504057600000000000 +tenk unique1=1036i,unique2=5834i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=36i,twothousand=1036i,fivethous=1036i,tenthous=1036i,odd=72i,even=73i,stringu1="WNAAAA",stringu2="KQIAAA",string4="OOOOxx" 504144000000000000 +tenk unique1=6703i,unique2=5835i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=703i,twothousand=703i,fivethous=1703i,tenthous=6703i,odd=6i,even=7i,stringu1="VXAAAA",stringu2="LQIAAA",string4="VVVVxx" 504230400000000000 +tenk unique1=252i,unique2=5836i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=252i,twothousand=252i,fivethous=252i,tenthous=252i,odd=104i,even=105i,stringu1="SJAAAA",stringu2="MQIAAA",string4="AAAAxx" 504316800000000000 +tenk unique1=631i,unique2=5837i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=631i,twothousand=631i,fivethous=631i,tenthous=631i,odd=62i,even=63i,stringu1="HYAAAA",stringu2="NQIAAA",string4="HHHHxx" 504403200000000000 +tenk unique1=5098i,unique2=5838i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=98i,twothousand=1098i,fivethous=98i,tenthous=5098i,odd=196i,even=197i,stringu1="COAAAA",stringu2="OQIAAA",string4="OOOOxx" 504489600000000000 +tenk unique1=8346i,unique2=5839i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=346i,twothousand=346i,fivethous=3346i,tenthous=8346i,odd=92i,even=93i,stringu1="AJAAAA",stringu2="PQIAAA",string4="VVVVxx" 504576000000000000 +tenk unique1=4910i,unique2=5840i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=910i,twothousand=910i,fivethous=4910i,tenthous=4910i,odd=20i,even=21i,stringu1="WGAAAA",stringu2="QQIAAA",string4="AAAAxx" 504662400000000000 +tenk unique1=559i,unique2=5841i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=559i,twothousand=559i,fivethous=559i,tenthous=559i,odd=118i,even=119i,stringu1="NVAAAA",stringu2="RQIAAA",string4="HHHHxx" 504748800000000000 +tenk unique1=1477i,unique2=5842i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=477i,twothousand=1477i,fivethous=1477i,tenthous=1477i,odd=154i,even=155i,stringu1="VEAAAA",stringu2="SQIAAA",string4="OOOOxx" 504835200000000000 +tenk unique1=5115i,unique2=5843i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=115i,twothousand=1115i,fivethous=115i,tenthous=5115i,odd=30i,even=31i,stringu1="TOAAAA",stringu2="TQIAAA",string4="VVVVxx" 504921600000000000 +tenk unique1=8784i,unique2=5844i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=784i,twothousand=784i,fivethous=3784i,tenthous=8784i,odd=168i,even=169i,stringu1="WZAAAA",stringu2="UQIAAA",string4="AAAAxx" 505008000000000000 +tenk unique1=4422i,unique2=5845i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=422i,twothousand=422i,fivethous=4422i,tenthous=4422i,odd=44i,even=45i,stringu1="COAAAA",stringu2="VQIAAA",string4="HHHHxx" 505094400000000000 +tenk unique1=2702i,unique2=5846i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=702i,twothousand=702i,fivethous=2702i,tenthous=2702i,odd=4i,even=5i,stringu1="YZAAAA",stringu2="WQIAAA",string4="OOOOxx" 505180800000000000 +tenk unique1=9599i,unique2=5847i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=599i,twothousand=1599i,fivethous=4599i,tenthous=9599i,odd=198i,even=199i,stringu1="FFAAAA",stringu2="XQIAAA",string4="VVVVxx" 505267200000000000 +tenk unique1=2463i,unique2=5848i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=463i,twothousand=463i,fivethous=2463i,tenthous=2463i,odd=126i,even=127i,stringu1="TQAAAA",stringu2="YQIAAA",string4="AAAAxx" 505353600000000000 +tenk unique1=498i,unique2=5849i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=498i,twothousand=498i,fivethous=498i,tenthous=498i,odd=196i,even=197i,stringu1="ETAAAA",stringu2="ZQIAAA",string4="HHHHxx" 505440000000000000 +tenk unique1=494i,unique2=5850i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=494i,twothousand=494i,fivethous=494i,tenthous=494i,odd=188i,even=189i,stringu1="ATAAAA",stringu2="ARIAAA",string4="OOOOxx" 505526400000000000 +tenk unique1=8632i,unique2=5851i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=632i,twothousand=632i,fivethous=3632i,tenthous=8632i,odd=64i,even=65i,stringu1="AUAAAA",stringu2="BRIAAA",string4="VVVVxx" 505612800000000000 +tenk unique1=3449i,unique2=5852i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=449i,twothousand=1449i,fivethous=3449i,tenthous=3449i,odd=98i,even=99i,stringu1="RCAAAA",stringu2="CRIAAA",string4="AAAAxx" 505699200000000000 +tenk unique1=5888i,unique2=5853i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=888i,twothousand=1888i,fivethous=888i,tenthous=5888i,odd=176i,even=177i,stringu1="MSAAAA",stringu2="DRIAAA",string4="HHHHxx" 505785600000000000 +tenk unique1=2211i,unique2=5854i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=211i,twothousand=211i,fivethous=2211i,tenthous=2211i,odd=22i,even=23i,stringu1="BHAAAA",stringu2="ERIAAA",string4="OOOOxx" 505872000000000000 +tenk unique1=2835i,unique2=5855i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=835i,twothousand=835i,fivethous=2835i,tenthous=2835i,odd=70i,even=71i,stringu1="BFAAAA",stringu2="FRIAAA",string4="VVVVxx" 505958400000000000 +tenk unique1=4196i,unique2=5856i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=196i,twothousand=196i,fivethous=4196i,tenthous=4196i,odd=192i,even=193i,stringu1="KFAAAA",stringu2="GRIAAA",string4="AAAAxx" 506044800000000000 +tenk unique1=2177i,unique2=5857i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=177i,twothousand=177i,fivethous=2177i,tenthous=2177i,odd=154i,even=155i,stringu1="TFAAAA",stringu2="HRIAAA",string4="HHHHxx" 506131200000000000 +tenk unique1=1959i,unique2=5858i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=959i,twothousand=1959i,fivethous=1959i,tenthous=1959i,odd=118i,even=119i,stringu1="JXAAAA",stringu2="IRIAAA",string4="OOOOxx" 506217600000000000 +tenk unique1=5172i,unique2=5859i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=172i,twothousand=1172i,fivethous=172i,tenthous=5172i,odd=144i,even=145i,stringu1="YQAAAA",stringu2="JRIAAA",string4="VVVVxx" 506304000000000000 +tenk unique1=7898i,unique2=5860i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=898i,twothousand=1898i,fivethous=2898i,tenthous=7898i,odd=196i,even=197i,stringu1="URAAAA",stringu2="KRIAAA",string4="AAAAxx" 506390400000000000 +tenk unique1=5729i,unique2=5861i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=729i,twothousand=1729i,fivethous=729i,tenthous=5729i,odd=58i,even=59i,stringu1="JMAAAA",stringu2="LRIAAA",string4="HHHHxx" 506476800000000000 +tenk unique1=469i,unique2=5862i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=469i,twothousand=469i,fivethous=469i,tenthous=469i,odd=138i,even=139i,stringu1="BSAAAA",stringu2="MRIAAA",string4="OOOOxx" 506563200000000000 +tenk unique1=4456i,unique2=5863i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=456i,twothousand=456i,fivethous=4456i,tenthous=4456i,odd=112i,even=113i,stringu1="KPAAAA",stringu2="NRIAAA",string4="VVVVxx" 506649600000000000 +tenk unique1=3578i,unique2=5864i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=578i,twothousand=1578i,fivethous=3578i,tenthous=3578i,odd=156i,even=157i,stringu1="QHAAAA",stringu2="ORIAAA",string4="AAAAxx" 506736000000000000 +tenk unique1=8623i,unique2=5865i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=623i,twothousand=623i,fivethous=3623i,tenthous=8623i,odd=46i,even=47i,stringu1="RTAAAA",stringu2="PRIAAA",string4="HHHHxx" 506822400000000000 +tenk unique1=6749i,unique2=5866i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=749i,twothousand=749i,fivethous=1749i,tenthous=6749i,odd=98i,even=99i,stringu1="PZAAAA",stringu2="QRIAAA",string4="OOOOxx" 506908800000000000 +tenk unique1=6735i,unique2=5867i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=735i,twothousand=735i,fivethous=1735i,tenthous=6735i,odd=70i,even=71i,stringu1="BZAAAA",stringu2="RRIAAA",string4="VVVVxx" 506995200000000000 +tenk unique1=5197i,unique2=5868i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=197i,twothousand=1197i,fivethous=197i,tenthous=5197i,odd=194i,even=195i,stringu1="XRAAAA",stringu2="SRIAAA",string4="AAAAxx" 507081600000000000 +tenk unique1=2067i,unique2=5869i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=67i,twothousand=67i,fivethous=2067i,tenthous=2067i,odd=134i,even=135i,stringu1="NBAAAA",stringu2="TRIAAA",string4="HHHHxx" 507168000000000000 +tenk unique1=5600i,unique2=5870i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=600i,twothousand=1600i,fivethous=600i,tenthous=5600i,odd=0i,even=1i,stringu1="KHAAAA",stringu2="URIAAA",string4="OOOOxx" 507254400000000000 +tenk unique1=7741i,unique2=5871i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=741i,twothousand=1741i,fivethous=2741i,tenthous=7741i,odd=82i,even=83i,stringu1="TLAAAA",stringu2="VRIAAA",string4="VVVVxx" 507340800000000000 +tenk unique1=9925i,unique2=5872i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=925i,twothousand=1925i,fivethous=4925i,tenthous=9925i,odd=50i,even=51i,stringu1="TRAAAA",stringu2="WRIAAA",string4="AAAAxx" 507427200000000000 +tenk unique1=9685i,unique2=5873i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=685i,twothousand=1685i,fivethous=4685i,tenthous=9685i,odd=170i,even=171i,stringu1="NIAAAA",stringu2="XRIAAA",string4="HHHHxx" 507513600000000000 +tenk unique1=7622i,unique2=5874i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=622i,twothousand=1622i,fivethous=2622i,tenthous=7622i,odd=44i,even=45i,stringu1="EHAAAA",stringu2="YRIAAA",string4="OOOOxx" 507600000000000000 +tenk unique1=6859i,unique2=5875i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=859i,twothousand=859i,fivethous=1859i,tenthous=6859i,odd=118i,even=119i,stringu1="VDAAAA",stringu2="ZRIAAA",string4="VVVVxx" 507686400000000000 +tenk unique1=3094i,unique2=5876i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=94i,twothousand=1094i,fivethous=3094i,tenthous=3094i,odd=188i,even=189i,stringu1="APAAAA",stringu2="ASIAAA",string4="AAAAxx" 507772800000000000 +tenk unique1=2628i,unique2=5877i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=628i,twothousand=628i,fivethous=2628i,tenthous=2628i,odd=56i,even=57i,stringu1="CXAAAA",stringu2="BSIAAA",string4="HHHHxx" 507859200000000000 +tenk unique1=40i,unique2=5878i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=40i,twothousand=40i,fivethous=40i,tenthous=40i,odd=80i,even=81i,stringu1="OBAAAA",stringu2="CSIAAA",string4="OOOOxx" 507945600000000000 +tenk unique1=1644i,unique2=5879i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=644i,twothousand=1644i,fivethous=1644i,tenthous=1644i,odd=88i,even=89i,stringu1="GLAAAA",stringu2="DSIAAA",string4="VVVVxx" 508032000000000000 +tenk unique1=588i,unique2=5880i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=588i,twothousand=588i,fivethous=588i,tenthous=588i,odd=176i,even=177i,stringu1="QWAAAA",stringu2="ESIAAA",string4="AAAAxx" 508118400000000000 +tenk unique1=7522i,unique2=5881i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=522i,twothousand=1522i,fivethous=2522i,tenthous=7522i,odd=44i,even=45i,stringu1="IDAAAA",stringu2="FSIAAA",string4="HHHHxx" 508204800000000000 +tenk unique1=162i,unique2=5882i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=162i,twothousand=162i,fivethous=162i,tenthous=162i,odd=124i,even=125i,stringu1="GGAAAA",stringu2="GSIAAA",string4="OOOOxx" 508291200000000000 +tenk unique1=3610i,unique2=5883i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=610i,twothousand=1610i,fivethous=3610i,tenthous=3610i,odd=20i,even=21i,stringu1="WIAAAA",stringu2="HSIAAA",string4="VVVVxx" 508377600000000000 +tenk unique1=3561i,unique2=5884i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=561i,twothousand=1561i,fivethous=3561i,tenthous=3561i,odd=122i,even=123i,stringu1="ZGAAAA",stringu2="ISIAAA",string4="AAAAxx" 508464000000000000 +tenk unique1=8185i,unique2=5885i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=185i,twothousand=185i,fivethous=3185i,tenthous=8185i,odd=170i,even=171i,stringu1="VCAAAA",stringu2="JSIAAA",string4="HHHHxx" 508550400000000000 +tenk unique1=7237i,unique2=5886i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=237i,twothousand=1237i,fivethous=2237i,tenthous=7237i,odd=74i,even=75i,stringu1="JSAAAA",stringu2="KSIAAA",string4="OOOOxx" 508636800000000000 +tenk unique1=4592i,unique2=5887i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=592i,twothousand=592i,fivethous=4592i,tenthous=4592i,odd=184i,even=185i,stringu1="QUAAAA",stringu2="LSIAAA",string4="VVVVxx" 508723200000000000 +tenk unique1=7082i,unique2=5888i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=82i,twothousand=1082i,fivethous=2082i,tenthous=7082i,odd=164i,even=165i,stringu1="KMAAAA",stringu2="MSIAAA",string4="AAAAxx" 508809600000000000 +tenk unique1=4719i,unique2=5889i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=719i,twothousand=719i,fivethous=4719i,tenthous=4719i,odd=38i,even=39i,stringu1="NZAAAA",stringu2="NSIAAA",string4="HHHHxx" 508896000000000000 +tenk unique1=3879i,unique2=5890i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=879i,twothousand=1879i,fivethous=3879i,tenthous=3879i,odd=158i,even=159i,stringu1="FTAAAA",stringu2="OSIAAA",string4="OOOOxx" 508982400000000000 +tenk unique1=1662i,unique2=5891i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=662i,twothousand=1662i,fivethous=1662i,tenthous=1662i,odd=124i,even=125i,stringu1="YLAAAA",stringu2="PSIAAA",string4="VVVVxx" 509068800000000000 +tenk unique1=3995i,unique2=5892i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=995i,twothousand=1995i,fivethous=3995i,tenthous=3995i,odd=190i,even=191i,stringu1="RXAAAA",stringu2="QSIAAA",string4="AAAAxx" 509155200000000000 +tenk unique1=5828i,unique2=5893i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=828i,twothousand=1828i,fivethous=828i,tenthous=5828i,odd=56i,even=57i,stringu1="EQAAAA",stringu2="RSIAAA",string4="HHHHxx" 509241600000000000 +tenk unique1=4197i,unique2=5894i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=197i,twothousand=197i,fivethous=4197i,tenthous=4197i,odd=194i,even=195i,stringu1="LFAAAA",stringu2="SSIAAA",string4="OOOOxx" 509328000000000000 +tenk unique1=5146i,unique2=5895i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=146i,twothousand=1146i,fivethous=146i,tenthous=5146i,odd=92i,even=93i,stringu1="YPAAAA",stringu2="TSIAAA",string4="VVVVxx" 509414400000000000 +tenk unique1=753i,unique2=5896i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=753i,twothousand=753i,fivethous=753i,tenthous=753i,odd=106i,even=107i,stringu1="ZCAAAA",stringu2="USIAAA",string4="AAAAxx" 509500800000000000 +tenk unique1=7064i,unique2=5897i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=64i,twothousand=1064i,fivethous=2064i,tenthous=7064i,odd=128i,even=129i,stringu1="SLAAAA",stringu2="VSIAAA",string4="HHHHxx" 509587200000000000 +tenk unique1=1312i,unique2=5898i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=312i,twothousand=1312i,fivethous=1312i,tenthous=1312i,odd=24i,even=25i,stringu1="MYAAAA",stringu2="WSIAAA",string4="OOOOxx" 509673600000000000 +tenk unique1=5573i,unique2=5899i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=573i,twothousand=1573i,fivethous=573i,tenthous=5573i,odd=146i,even=147i,stringu1="JGAAAA",stringu2="XSIAAA",string4="VVVVxx" 509760000000000000 +tenk unique1=7634i,unique2=5900i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=634i,twothousand=1634i,fivethous=2634i,tenthous=7634i,odd=68i,even=69i,stringu1="QHAAAA",stringu2="YSIAAA",string4="AAAAxx" 509846400000000000 +tenk unique1=2459i,unique2=5901i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=459i,twothousand=459i,fivethous=2459i,tenthous=2459i,odd=118i,even=119i,stringu1="PQAAAA",stringu2="ZSIAAA",string4="HHHHxx" 509932800000000000 +tenk unique1=8636i,unique2=5902i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=636i,twothousand=636i,fivethous=3636i,tenthous=8636i,odd=72i,even=73i,stringu1="EUAAAA",stringu2="ATIAAA",string4="OOOOxx" 510019200000000000 +tenk unique1=5318i,unique2=5903i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=318i,twothousand=1318i,fivethous=318i,tenthous=5318i,odd=36i,even=37i,stringu1="OWAAAA",stringu2="BTIAAA",string4="VVVVxx" 510105600000000000 +tenk unique1=1064i,unique2=5904i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=64i,twothousand=1064i,fivethous=1064i,tenthous=1064i,odd=128i,even=129i,stringu1="YOAAAA",stringu2="CTIAAA",string4="AAAAxx" 510192000000000000 +tenk unique1=9779i,unique2=5905i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=779i,twothousand=1779i,fivethous=4779i,tenthous=9779i,odd=158i,even=159i,stringu1="DMAAAA",stringu2="DTIAAA",string4="HHHHxx" 510278400000000000 +tenk unique1=6512i,unique2=5906i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=512i,twothousand=512i,fivethous=1512i,tenthous=6512i,odd=24i,even=25i,stringu1="MQAAAA",stringu2="ETIAAA",string4="OOOOxx" 510364800000000000 +tenk unique1=3572i,unique2=5907i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=572i,twothousand=1572i,fivethous=3572i,tenthous=3572i,odd=144i,even=145i,stringu1="KHAAAA",stringu2="FTIAAA",string4="VVVVxx" 510451200000000000 +tenk unique1=816i,unique2=5908i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=816i,twothousand=816i,fivethous=816i,tenthous=816i,odd=32i,even=33i,stringu1="KFAAAA",stringu2="GTIAAA",string4="AAAAxx" 510537600000000000 +tenk unique1=3978i,unique2=5909i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=978i,twothousand=1978i,fivethous=3978i,tenthous=3978i,odd=156i,even=157i,stringu1="AXAAAA",stringu2="HTIAAA",string4="HHHHxx" 510624000000000000 +tenk unique1=5390i,unique2=5910i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=390i,twothousand=1390i,fivethous=390i,tenthous=5390i,odd=180i,even=181i,stringu1="IZAAAA",stringu2="ITIAAA",string4="OOOOxx" 510710400000000000 +tenk unique1=4685i,unique2=5911i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=685i,twothousand=685i,fivethous=4685i,tenthous=4685i,odd=170i,even=171i,stringu1="FYAAAA",stringu2="JTIAAA",string4="VVVVxx" 510796800000000000 +tenk unique1=3003i,unique2=5912i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=1003i,fivethous=3003i,tenthous=3003i,odd=6i,even=7i,stringu1="NLAAAA",stringu2="KTIAAA",string4="AAAAxx" 510883200000000000 +tenk unique1=2638i,unique2=5913i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=638i,twothousand=638i,fivethous=2638i,tenthous=2638i,odd=76i,even=77i,stringu1="MXAAAA",stringu2="LTIAAA",string4="HHHHxx" 510969600000000000 +tenk unique1=9716i,unique2=5914i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=716i,twothousand=1716i,fivethous=4716i,tenthous=9716i,odd=32i,even=33i,stringu1="SJAAAA",stringu2="MTIAAA",string4="OOOOxx" 511056000000000000 +tenk unique1=9598i,unique2=5915i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=598i,twothousand=1598i,fivethous=4598i,tenthous=9598i,odd=196i,even=197i,stringu1="EFAAAA",stringu2="NTIAAA",string4="VVVVxx" 511142400000000000 +tenk unique1=9501i,unique2=5916i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=501i,twothousand=1501i,fivethous=4501i,tenthous=9501i,odd=2i,even=3i,stringu1="LBAAAA",stringu2="OTIAAA",string4="AAAAxx" 511228800000000000 +tenk unique1=1704i,unique2=5917i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=704i,twothousand=1704i,fivethous=1704i,tenthous=1704i,odd=8i,even=9i,stringu1="ONAAAA",stringu2="PTIAAA",string4="HHHHxx" 511315200000000000 +tenk unique1=8609i,unique2=5918i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=609i,twothousand=609i,fivethous=3609i,tenthous=8609i,odd=18i,even=19i,stringu1="DTAAAA",stringu2="QTIAAA",string4="OOOOxx" 511401600000000000 +tenk unique1=5211i,unique2=5919i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=211i,twothousand=1211i,fivethous=211i,tenthous=5211i,odd=22i,even=23i,stringu1="LSAAAA",stringu2="RTIAAA",string4="VVVVxx" 511488000000000000 +tenk unique1=3605i,unique2=5920i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=605i,twothousand=1605i,fivethous=3605i,tenthous=3605i,odd=10i,even=11i,stringu1="RIAAAA",stringu2="STIAAA",string4="AAAAxx" 511574400000000000 +tenk unique1=8730i,unique2=5921i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=730i,twothousand=730i,fivethous=3730i,tenthous=8730i,odd=60i,even=61i,stringu1="UXAAAA",stringu2="TTIAAA",string4="HHHHxx" 511660800000000000 +tenk unique1=4208i,unique2=5922i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=208i,twothousand=208i,fivethous=4208i,tenthous=4208i,odd=16i,even=17i,stringu1="WFAAAA",stringu2="UTIAAA",string4="OOOOxx" 511747200000000000 +tenk unique1=7784i,unique2=5923i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=784i,twothousand=1784i,fivethous=2784i,tenthous=7784i,odd=168i,even=169i,stringu1="KNAAAA",stringu2="VTIAAA",string4="VVVVxx" 511833600000000000 +tenk unique1=7501i,unique2=5924i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=501i,twothousand=1501i,fivethous=2501i,tenthous=7501i,odd=2i,even=3i,stringu1="NCAAAA",stringu2="WTIAAA",string4="AAAAxx" 511920000000000000 +tenk unique1=7862i,unique2=5925i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=862i,twothousand=1862i,fivethous=2862i,tenthous=7862i,odd=124i,even=125i,stringu1="KQAAAA",stringu2="XTIAAA",string4="HHHHxx" 512006400000000000 +tenk unique1=8922i,unique2=5926i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=922i,twothousand=922i,fivethous=3922i,tenthous=8922i,odd=44i,even=45i,stringu1="EFAAAA",stringu2="YTIAAA",string4="OOOOxx" 512092800000000000 +tenk unique1=3857i,unique2=5927i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=857i,twothousand=1857i,fivethous=3857i,tenthous=3857i,odd=114i,even=115i,stringu1="JSAAAA",stringu2="ZTIAAA",string4="VVVVxx" 512179200000000000 +tenk unique1=6393i,unique2=5928i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=393i,twothousand=393i,fivethous=1393i,tenthous=6393i,odd=186i,even=187i,stringu1="XLAAAA",stringu2="AUIAAA",string4="AAAAxx" 512265600000000000 +tenk unique1=506i,unique2=5929i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=506i,twothousand=506i,fivethous=506i,tenthous=506i,odd=12i,even=13i,stringu1="MTAAAA",stringu2="BUIAAA",string4="HHHHxx" 512352000000000000 +tenk unique1=4232i,unique2=5930i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=232i,twothousand=232i,fivethous=4232i,tenthous=4232i,odd=64i,even=65i,stringu1="UGAAAA",stringu2="CUIAAA",string4="OOOOxx" 512438400000000000 +tenk unique1=8991i,unique2=5931i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=991i,twothousand=991i,fivethous=3991i,tenthous=8991i,odd=182i,even=183i,stringu1="VHAAAA",stringu2="DUIAAA",string4="VVVVxx" 512524800000000000 +tenk unique1=8578i,unique2=5932i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=578i,twothousand=578i,fivethous=3578i,tenthous=8578i,odd=156i,even=157i,stringu1="YRAAAA",stringu2="EUIAAA",string4="AAAAxx" 512611200000000000 +tenk unique1=3235i,unique2=5933i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=235i,twothousand=1235i,fivethous=3235i,tenthous=3235i,odd=70i,even=71i,stringu1="LUAAAA",stringu2="FUIAAA",string4="HHHHxx" 512697600000000000 +tenk unique1=963i,unique2=5934i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=963i,twothousand=963i,fivethous=963i,tenthous=963i,odd=126i,even=127i,stringu1="BLAAAA",stringu2="GUIAAA",string4="OOOOxx" 512784000000000000 +tenk unique1=113i,unique2=5935i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=113i,twothousand=113i,fivethous=113i,tenthous=113i,odd=26i,even=27i,stringu1="JEAAAA",stringu2="HUIAAA",string4="VVVVxx" 512870400000000000 +tenk unique1=8234i,unique2=5936i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=234i,twothousand=234i,fivethous=3234i,tenthous=8234i,odd=68i,even=69i,stringu1="SEAAAA",stringu2="IUIAAA",string4="AAAAxx" 512956800000000000 +tenk unique1=2613i,unique2=5937i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=613i,twothousand=613i,fivethous=2613i,tenthous=2613i,odd=26i,even=27i,stringu1="NWAAAA",stringu2="JUIAAA",string4="HHHHxx" 513043200000000000 +tenk unique1=5540i,unique2=5938i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=540i,twothousand=1540i,fivethous=540i,tenthous=5540i,odd=80i,even=81i,stringu1="CFAAAA",stringu2="KUIAAA",string4="OOOOxx" 513129600000000000 +tenk unique1=9727i,unique2=5939i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=727i,twothousand=1727i,fivethous=4727i,tenthous=9727i,odd=54i,even=55i,stringu1="DKAAAA",stringu2="LUIAAA",string4="VVVVxx" 513216000000000000 +tenk unique1=2229i,unique2=5940i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=229i,twothousand=229i,fivethous=2229i,tenthous=2229i,odd=58i,even=59i,stringu1="THAAAA",stringu2="MUIAAA",string4="AAAAxx" 513302400000000000 +tenk unique1=6242i,unique2=5941i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=242i,twothousand=242i,fivethous=1242i,tenthous=6242i,odd=84i,even=85i,stringu1="CGAAAA",stringu2="NUIAAA",string4="HHHHxx" 513388800000000000 +tenk unique1=2502i,unique2=5942i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=502i,twothousand=502i,fivethous=2502i,tenthous=2502i,odd=4i,even=5i,stringu1="GSAAAA",stringu2="OUIAAA",string4="OOOOxx" 513475200000000000 +tenk unique1=6212i,unique2=5943i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=212i,twothousand=212i,fivethous=1212i,tenthous=6212i,odd=24i,even=25i,stringu1="YEAAAA",stringu2="PUIAAA",string4="VVVVxx" 513561600000000000 +tenk unique1=3495i,unique2=5944i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=495i,twothousand=1495i,fivethous=3495i,tenthous=3495i,odd=190i,even=191i,stringu1="LEAAAA",stringu2="QUIAAA",string4="AAAAxx" 513648000000000000 +tenk unique1=2364i,unique2=5945i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=364i,twothousand=364i,fivethous=2364i,tenthous=2364i,odd=128i,even=129i,stringu1="YMAAAA",stringu2="RUIAAA",string4="HHHHxx" 513734400000000000 +tenk unique1=6777i,unique2=5946i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=777i,twothousand=777i,fivethous=1777i,tenthous=6777i,odd=154i,even=155i,stringu1="RAAAAA",stringu2="SUIAAA",string4="OOOOxx" 513820800000000000 +tenk unique1=9811i,unique2=5947i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=811i,twothousand=1811i,fivethous=4811i,tenthous=9811i,odd=22i,even=23i,stringu1="JNAAAA",stringu2="TUIAAA",string4="VVVVxx" 513907200000000000 +tenk unique1=1450i,unique2=5948i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=450i,twothousand=1450i,fivethous=1450i,tenthous=1450i,odd=100i,even=101i,stringu1="UDAAAA",stringu2="UUIAAA",string4="AAAAxx" 513993600000000000 +tenk unique1=5008i,unique2=5949i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=1008i,fivethous=8i,tenthous=5008i,odd=16i,even=17i,stringu1="QKAAAA",stringu2="VUIAAA",string4="HHHHxx" 514080000000000000 +tenk unique1=1318i,unique2=5950i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=318i,twothousand=1318i,fivethous=1318i,tenthous=1318i,odd=36i,even=37i,stringu1="SYAAAA",stringu2="WUIAAA",string4="OOOOxx" 514166400000000000 +tenk unique1=3373i,unique2=5951i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=373i,twothousand=1373i,fivethous=3373i,tenthous=3373i,odd=146i,even=147i,stringu1="TZAAAA",stringu2="XUIAAA",string4="VVVVxx" 514252800000000000 +tenk unique1=398i,unique2=5952i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=398i,twothousand=398i,fivethous=398i,tenthous=398i,odd=196i,even=197i,stringu1="IPAAAA",stringu2="YUIAAA",string4="AAAAxx" 514339200000000000 +tenk unique1=3804i,unique2=5953i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=804i,twothousand=1804i,fivethous=3804i,tenthous=3804i,odd=8i,even=9i,stringu1="IQAAAA",stringu2="ZUIAAA",string4="HHHHxx" 514425600000000000 +tenk unique1=9148i,unique2=5954i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=148i,twothousand=1148i,fivethous=4148i,tenthous=9148i,odd=96i,even=97i,stringu1="WNAAAA",stringu2="AVIAAA",string4="OOOOxx" 514512000000000000 +tenk unique1=4382i,unique2=5955i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=382i,twothousand=382i,fivethous=4382i,tenthous=4382i,odd=164i,even=165i,stringu1="OMAAAA",stringu2="BVIAAA",string4="VVVVxx" 514598400000000000 +tenk unique1=4026i,unique2=5956i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=26i,twothousand=26i,fivethous=4026i,tenthous=4026i,odd=52i,even=53i,stringu1="WYAAAA",stringu2="CVIAAA",string4="AAAAxx" 514684800000000000 +tenk unique1=7804i,unique2=5957i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=804i,twothousand=1804i,fivethous=2804i,tenthous=7804i,odd=8i,even=9i,stringu1="EOAAAA",stringu2="DVIAAA",string4="HHHHxx" 514771200000000000 +tenk unique1=6839i,unique2=5958i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=839i,twothousand=839i,fivethous=1839i,tenthous=6839i,odd=78i,even=79i,stringu1="BDAAAA",stringu2="EVIAAA",string4="OOOOxx" 514857600000000000 +tenk unique1=3756i,unique2=5959i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=756i,twothousand=1756i,fivethous=3756i,tenthous=3756i,odd=112i,even=113i,stringu1="MOAAAA",stringu2="FVIAAA",string4="VVVVxx" 514944000000000000 +tenk unique1=6734i,unique2=5960i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=734i,twothousand=734i,fivethous=1734i,tenthous=6734i,odd=68i,even=69i,stringu1="AZAAAA",stringu2="GVIAAA",string4="AAAAxx" 515030400000000000 +tenk unique1=2228i,unique2=5961i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=228i,twothousand=228i,fivethous=2228i,tenthous=2228i,odd=56i,even=57i,stringu1="SHAAAA",stringu2="HVIAAA",string4="HHHHxx" 515116800000000000 +tenk unique1=3273i,unique2=5962i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=273i,twothousand=1273i,fivethous=3273i,tenthous=3273i,odd=146i,even=147i,stringu1="XVAAAA",stringu2="IVIAAA",string4="OOOOxx" 515203200000000000 +tenk unique1=3708i,unique2=5963i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=708i,twothousand=1708i,fivethous=3708i,tenthous=3708i,odd=16i,even=17i,stringu1="QMAAAA",stringu2="JVIAAA",string4="VVVVxx" 515289600000000000 +tenk unique1=4320i,unique2=5964i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=320i,twothousand=320i,fivethous=4320i,tenthous=4320i,odd=40i,even=41i,stringu1="EKAAAA",stringu2="KVIAAA",string4="AAAAxx" 515376000000000000 +tenk unique1=74i,unique2=5965i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=74i,twothousand=74i,fivethous=74i,tenthous=74i,odd=148i,even=149i,stringu1="WCAAAA",stringu2="LVIAAA",string4="HHHHxx" 515462400000000000 +tenk unique1=2520i,unique2=5966i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=520i,twothousand=520i,fivethous=2520i,tenthous=2520i,odd=40i,even=41i,stringu1="YSAAAA",stringu2="MVIAAA",string4="OOOOxx" 515548800000000000 +tenk unique1=9619i,unique2=5967i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=619i,twothousand=1619i,fivethous=4619i,tenthous=9619i,odd=38i,even=39i,stringu1="ZFAAAA",stringu2="NVIAAA",string4="VVVVxx" 515635200000000000 +tenk unique1=1801i,unique2=5968i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=801i,twothousand=1801i,fivethous=1801i,tenthous=1801i,odd=2i,even=3i,stringu1="HRAAAA",stringu2="OVIAAA",string4="AAAAxx" 515721600000000000 +tenk unique1=6399i,unique2=5969i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=399i,twothousand=399i,fivethous=1399i,tenthous=6399i,odd=198i,even=199i,stringu1="DMAAAA",stringu2="PVIAAA",string4="HHHHxx" 515808000000000000 +tenk unique1=8313i,unique2=5970i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=313i,twothousand=313i,fivethous=3313i,tenthous=8313i,odd=26i,even=27i,stringu1="THAAAA",stringu2="QVIAAA",string4="OOOOxx" 515894400000000000 +tenk unique1=7003i,unique2=5971i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=1003i,fivethous=2003i,tenthous=7003i,odd=6i,even=7i,stringu1="JJAAAA",stringu2="RVIAAA",string4="VVVVxx" 515980800000000000 +tenk unique1=329i,unique2=5972i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=329i,twothousand=329i,fivethous=329i,tenthous=329i,odd=58i,even=59i,stringu1="RMAAAA",stringu2="SVIAAA",string4="AAAAxx" 516067200000000000 +tenk unique1=9090i,unique2=5973i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=90i,twothousand=1090i,fivethous=4090i,tenthous=9090i,odd=180i,even=181i,stringu1="QLAAAA",stringu2="TVIAAA",string4="HHHHxx" 516153600000000000 +tenk unique1=2299i,unique2=5974i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=299i,twothousand=299i,fivethous=2299i,tenthous=2299i,odd=198i,even=199i,stringu1="LKAAAA",stringu2="UVIAAA",string4="OOOOxx" 516240000000000000 +tenk unique1=3925i,unique2=5975i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=925i,twothousand=1925i,fivethous=3925i,tenthous=3925i,odd=50i,even=51i,stringu1="ZUAAAA",stringu2="VVIAAA",string4="VVVVxx" 516326400000000000 +tenk unique1=8145i,unique2=5976i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=145i,twothousand=145i,fivethous=3145i,tenthous=8145i,odd=90i,even=91i,stringu1="HBAAAA",stringu2="WVIAAA",string4="AAAAxx" 516412800000000000 +tenk unique1=8561i,unique2=5977i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=561i,twothousand=561i,fivethous=3561i,tenthous=8561i,odd=122i,even=123i,stringu1="HRAAAA",stringu2="XVIAAA",string4="HHHHxx" 516499200000000000 +tenk unique1=2797i,unique2=5978i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=797i,twothousand=797i,fivethous=2797i,tenthous=2797i,odd=194i,even=195i,stringu1="PDAAAA",stringu2="YVIAAA",string4="OOOOxx" 516585600000000000 +tenk unique1=1451i,unique2=5979i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=451i,twothousand=1451i,fivethous=1451i,tenthous=1451i,odd=102i,even=103i,stringu1="VDAAAA",stringu2="ZVIAAA",string4="VVVVxx" 516672000000000000 +tenk unique1=7977i,unique2=5980i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=977i,twothousand=1977i,fivethous=2977i,tenthous=7977i,odd=154i,even=155i,stringu1="VUAAAA",stringu2="AWIAAA",string4="AAAAxx" 516758400000000000 +tenk unique1=112i,unique2=5981i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=112i,twothousand=112i,fivethous=112i,tenthous=112i,odd=24i,even=25i,stringu1="IEAAAA",stringu2="BWIAAA",string4="HHHHxx" 516844800000000000 +tenk unique1=5265i,unique2=5982i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=265i,twothousand=1265i,fivethous=265i,tenthous=5265i,odd=130i,even=131i,stringu1="NUAAAA",stringu2="CWIAAA",string4="OOOOxx" 516931200000000000 +tenk unique1=3819i,unique2=5983i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=819i,twothousand=1819i,fivethous=3819i,tenthous=3819i,odd=38i,even=39i,stringu1="XQAAAA",stringu2="DWIAAA",string4="VVVVxx" 517017600000000000 +tenk unique1=3648i,unique2=5984i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=648i,twothousand=1648i,fivethous=3648i,tenthous=3648i,odd=96i,even=97i,stringu1="IKAAAA",stringu2="EWIAAA",string4="AAAAxx" 517104000000000000 +tenk unique1=6306i,unique2=5985i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=306i,twothousand=306i,fivethous=1306i,tenthous=6306i,odd=12i,even=13i,stringu1="OIAAAA",stringu2="FWIAAA",string4="HHHHxx" 517190400000000000 +tenk unique1=2385i,unique2=5986i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=385i,twothousand=385i,fivethous=2385i,tenthous=2385i,odd=170i,even=171i,stringu1="TNAAAA",stringu2="GWIAAA",string4="OOOOxx" 517276800000000000 +tenk unique1=9084i,unique2=5987i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=84i,twothousand=1084i,fivethous=4084i,tenthous=9084i,odd=168i,even=169i,stringu1="KLAAAA",stringu2="HWIAAA",string4="VVVVxx" 517363200000000000 +tenk unique1=4499i,unique2=5988i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=499i,twothousand=499i,fivethous=4499i,tenthous=4499i,odd=198i,even=199i,stringu1="BRAAAA",stringu2="IWIAAA",string4="AAAAxx" 517449600000000000 +tenk unique1=1154i,unique2=5989i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=154i,twothousand=1154i,fivethous=1154i,tenthous=1154i,odd=108i,even=109i,stringu1="KSAAAA",stringu2="JWIAAA",string4="HHHHxx" 517536000000000000 +tenk unique1=6800i,unique2=5990i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=800i,twothousand=800i,fivethous=1800i,tenthous=6800i,odd=0i,even=1i,stringu1="OBAAAA",stringu2="KWIAAA",string4="OOOOxx" 517622400000000000 +tenk unique1=8049i,unique2=5991i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=49i,twothousand=49i,fivethous=3049i,tenthous=8049i,odd=98i,even=99i,stringu1="PXAAAA",stringu2="LWIAAA",string4="VVVVxx" 517708800000000000 +tenk unique1=3733i,unique2=5992i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=733i,twothousand=1733i,fivethous=3733i,tenthous=3733i,odd=66i,even=67i,stringu1="PNAAAA",stringu2="MWIAAA",string4="AAAAxx" 517795200000000000 +tenk unique1=8496i,unique2=5993i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=496i,twothousand=496i,fivethous=3496i,tenthous=8496i,odd=192i,even=193i,stringu1="UOAAAA",stringu2="NWIAAA",string4="HHHHxx" 517881600000000000 +tenk unique1=9952i,unique2=5994i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=952i,twothousand=1952i,fivethous=4952i,tenthous=9952i,odd=104i,even=105i,stringu1="USAAAA",stringu2="OWIAAA",string4="OOOOxx" 517968000000000000 +tenk unique1=9792i,unique2=5995i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=792i,twothousand=1792i,fivethous=4792i,tenthous=9792i,odd=184i,even=185i,stringu1="QMAAAA",stringu2="PWIAAA",string4="VVVVxx" 518054400000000000 +tenk unique1=5081i,unique2=5996i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=81i,twothousand=1081i,fivethous=81i,tenthous=5081i,odd=162i,even=163i,stringu1="LNAAAA",stringu2="QWIAAA",string4="AAAAxx" 518140800000000000 +tenk unique1=7908i,unique2=5997i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=908i,twothousand=1908i,fivethous=2908i,tenthous=7908i,odd=16i,even=17i,stringu1="ESAAAA",stringu2="RWIAAA",string4="HHHHxx" 518227200000000000 +tenk unique1=5398i,unique2=5998i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=398i,twothousand=1398i,fivethous=398i,tenthous=5398i,odd=196i,even=197i,stringu1="QZAAAA",stringu2="SWIAAA",string4="OOOOxx" 518313600000000000 +tenk unique1=8423i,unique2=5999i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=423i,twothousand=423i,fivethous=3423i,tenthous=8423i,odd=46i,even=47i,stringu1="ZLAAAA",stringu2="TWIAAA",string4="VVVVxx" 518400000000000000 +tenk unique1=3362i,unique2=6000i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=362i,twothousand=1362i,fivethous=3362i,tenthous=3362i,odd=124i,even=125i,stringu1="IZAAAA",stringu2="UWIAAA",string4="AAAAxx" 518486400000000000 +tenk unique1=7767i,unique2=6001i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=767i,twothousand=1767i,fivethous=2767i,tenthous=7767i,odd=134i,even=135i,stringu1="TMAAAA",stringu2="VWIAAA",string4="HHHHxx" 518572800000000000 +tenk unique1=7063i,unique2=6002i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=63i,twothousand=1063i,fivethous=2063i,tenthous=7063i,odd=126i,even=127i,stringu1="RLAAAA",stringu2="WWIAAA",string4="OOOOxx" 518659200000000000 +tenk unique1=8350i,unique2=6003i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=350i,twothousand=350i,fivethous=3350i,tenthous=8350i,odd=100i,even=101i,stringu1="EJAAAA",stringu2="XWIAAA",string4="VVVVxx" 518745600000000000 +tenk unique1=6779i,unique2=6004i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=779i,twothousand=779i,fivethous=1779i,tenthous=6779i,odd=158i,even=159i,stringu1="TAAAAA",stringu2="YWIAAA",string4="AAAAxx" 518832000000000000 +tenk unique1=5742i,unique2=6005i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=742i,twothousand=1742i,fivethous=742i,tenthous=5742i,odd=84i,even=85i,stringu1="WMAAAA",stringu2="ZWIAAA",string4="HHHHxx" 518918400000000000 +tenk unique1=9045i,unique2=6006i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=45i,twothousand=1045i,fivethous=4045i,tenthous=9045i,odd=90i,even=91i,stringu1="XJAAAA",stringu2="AXIAAA",string4="OOOOxx" 519004800000000000 +tenk unique1=8792i,unique2=6007i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=792i,twothousand=792i,fivethous=3792i,tenthous=8792i,odd=184i,even=185i,stringu1="EAAAAA",stringu2="BXIAAA",string4="VVVVxx" 519091200000000000 +tenk unique1=8160i,unique2=6008i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=160i,twothousand=160i,fivethous=3160i,tenthous=8160i,odd=120i,even=121i,stringu1="WBAAAA",stringu2="CXIAAA",string4="AAAAxx" 519177600000000000 +tenk unique1=3061i,unique2=6009i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=61i,twothousand=1061i,fivethous=3061i,tenthous=3061i,odd=122i,even=123i,stringu1="TNAAAA",stringu2="DXIAAA",string4="HHHHxx" 519264000000000000 +tenk unique1=4721i,unique2=6010i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=721i,twothousand=721i,fivethous=4721i,tenthous=4721i,odd=42i,even=43i,stringu1="PZAAAA",stringu2="EXIAAA",string4="OOOOxx" 519350400000000000 +tenk unique1=9817i,unique2=6011i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=817i,twothousand=1817i,fivethous=4817i,tenthous=9817i,odd=34i,even=35i,stringu1="PNAAAA",stringu2="FXIAAA",string4="VVVVxx" 519436800000000000 +tenk unique1=9257i,unique2=6012i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=257i,twothousand=1257i,fivethous=4257i,tenthous=9257i,odd=114i,even=115i,stringu1="BSAAAA",stringu2="GXIAAA",string4="AAAAxx" 519523200000000000 +tenk unique1=7779i,unique2=6013i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=779i,twothousand=1779i,fivethous=2779i,tenthous=7779i,odd=158i,even=159i,stringu1="FNAAAA",stringu2="HXIAAA",string4="HHHHxx" 519609600000000000 +tenk unique1=2663i,unique2=6014i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=663i,twothousand=663i,fivethous=2663i,tenthous=2663i,odd=126i,even=127i,stringu1="LYAAAA",stringu2="IXIAAA",string4="OOOOxx" 519696000000000000 +tenk unique1=3885i,unique2=6015i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=885i,twothousand=1885i,fivethous=3885i,tenthous=3885i,odd=170i,even=171i,stringu1="LTAAAA",stringu2="JXIAAA",string4="VVVVxx" 519782400000000000 +tenk unique1=9469i,unique2=6016i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=469i,twothousand=1469i,fivethous=4469i,tenthous=9469i,odd=138i,even=139i,stringu1="FAAAAA",stringu2="KXIAAA",string4="AAAAxx" 519868800000000000 +tenk unique1=6766i,unique2=6017i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=766i,twothousand=766i,fivethous=1766i,tenthous=6766i,odd=132i,even=133i,stringu1="GAAAAA",stringu2="LXIAAA",string4="HHHHxx" 519955200000000000 +tenk unique1=7173i,unique2=6018i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=173i,twothousand=1173i,fivethous=2173i,tenthous=7173i,odd=146i,even=147i,stringu1="XPAAAA",stringu2="MXIAAA",string4="OOOOxx" 520041600000000000 +tenk unique1=4709i,unique2=6019i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=709i,twothousand=709i,fivethous=4709i,tenthous=4709i,odd=18i,even=19i,stringu1="DZAAAA",stringu2="NXIAAA",string4="VVVVxx" 520128000000000000 +tenk unique1=4210i,unique2=6020i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=210i,twothousand=210i,fivethous=4210i,tenthous=4210i,odd=20i,even=21i,stringu1="YFAAAA",stringu2="OXIAAA",string4="AAAAxx" 520214400000000000 +tenk unique1=3715i,unique2=6021i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=715i,twothousand=1715i,fivethous=3715i,tenthous=3715i,odd=30i,even=31i,stringu1="XMAAAA",stringu2="PXIAAA",string4="HHHHxx" 520300800000000000 +tenk unique1=5089i,unique2=6022i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=89i,twothousand=1089i,fivethous=89i,tenthous=5089i,odd=178i,even=179i,stringu1="TNAAAA",stringu2="QXIAAA",string4="OOOOxx" 520387200000000000 +tenk unique1=1639i,unique2=6023i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=639i,twothousand=1639i,fivethous=1639i,tenthous=1639i,odd=78i,even=79i,stringu1="BLAAAA",stringu2="RXIAAA",string4="VVVVxx" 520473600000000000 +tenk unique1=5757i,unique2=6024i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=757i,twothousand=1757i,fivethous=757i,tenthous=5757i,odd=114i,even=115i,stringu1="LNAAAA",stringu2="SXIAAA",string4="AAAAxx" 520560000000000000 +tenk unique1=3545i,unique2=6025i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=545i,twothousand=1545i,fivethous=3545i,tenthous=3545i,odd=90i,even=91i,stringu1="JGAAAA",stringu2="TXIAAA",string4="HHHHxx" 520646400000000000 +tenk unique1=709i,unique2=6026i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=709i,twothousand=709i,fivethous=709i,tenthous=709i,odd=18i,even=19i,stringu1="HBAAAA",stringu2="UXIAAA",string4="OOOOxx" 520732800000000000 +tenk unique1=6519i,unique2=6027i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=519i,twothousand=519i,fivethous=1519i,tenthous=6519i,odd=38i,even=39i,stringu1="TQAAAA",stringu2="VXIAAA",string4="VVVVxx" 520819200000000000 +tenk unique1=4341i,unique2=6028i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=341i,twothousand=341i,fivethous=4341i,tenthous=4341i,odd=82i,even=83i,stringu1="ZKAAAA",stringu2="WXIAAA",string4="AAAAxx" 520905600000000000 +tenk unique1=2381i,unique2=6029i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=381i,twothousand=381i,fivethous=2381i,tenthous=2381i,odd=162i,even=163i,stringu1="PNAAAA",stringu2="XXIAAA",string4="HHHHxx" 520992000000000000 +tenk unique1=7215i,unique2=6030i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=215i,twothousand=1215i,fivethous=2215i,tenthous=7215i,odd=30i,even=31i,stringu1="NRAAAA",stringu2="YXIAAA",string4="OOOOxx" 521078400000000000 +tenk unique1=9323i,unique2=6031i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=323i,twothousand=1323i,fivethous=4323i,tenthous=9323i,odd=46i,even=47i,stringu1="PUAAAA",stringu2="ZXIAAA",string4="VVVVxx" 521164800000000000 +tenk unique1=3593i,unique2=6032i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=593i,twothousand=1593i,fivethous=3593i,tenthous=3593i,odd=186i,even=187i,stringu1="FIAAAA",stringu2="AYIAAA",string4="AAAAxx" 521251200000000000 +tenk unique1=3123i,unique2=6033i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=123i,twothousand=1123i,fivethous=3123i,tenthous=3123i,odd=46i,even=47i,stringu1="DQAAAA",stringu2="BYIAAA",string4="HHHHxx" 521337600000000000 +tenk unique1=8673i,unique2=6034i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=673i,twothousand=673i,fivethous=3673i,tenthous=8673i,odd=146i,even=147i,stringu1="PVAAAA",stringu2="CYIAAA",string4="OOOOxx" 521424000000000000 +tenk unique1=5094i,unique2=6035i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=94i,twothousand=1094i,fivethous=94i,tenthous=5094i,odd=188i,even=189i,stringu1="YNAAAA",stringu2="DYIAAA",string4="VVVVxx" 521510400000000000 +tenk unique1=6477i,unique2=6036i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=477i,twothousand=477i,fivethous=1477i,tenthous=6477i,odd=154i,even=155i,stringu1="DPAAAA",stringu2="EYIAAA",string4="AAAAxx" 521596800000000000 +tenk unique1=9734i,unique2=6037i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=734i,twothousand=1734i,fivethous=4734i,tenthous=9734i,odd=68i,even=69i,stringu1="KKAAAA",stringu2="FYIAAA",string4="HHHHxx" 521683200000000000 +tenk unique1=2998i,unique2=6038i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=998i,twothousand=998i,fivethous=2998i,tenthous=2998i,odd=196i,even=197i,stringu1="ILAAAA",stringu2="GYIAAA",string4="OOOOxx" 521769600000000000 +tenk unique1=7807i,unique2=6039i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=807i,twothousand=1807i,fivethous=2807i,tenthous=7807i,odd=14i,even=15i,stringu1="HOAAAA",stringu2="HYIAAA",string4="VVVVxx" 521856000000000000 +tenk unique1=5739i,unique2=6040i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=739i,twothousand=1739i,fivethous=739i,tenthous=5739i,odd=78i,even=79i,stringu1="TMAAAA",stringu2="IYIAAA",string4="AAAAxx" 521942400000000000 +tenk unique1=138i,unique2=6041i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=138i,twothousand=138i,fivethous=138i,tenthous=138i,odd=76i,even=77i,stringu1="IFAAAA",stringu2="JYIAAA",string4="HHHHxx" 522028800000000000 +tenk unique1=2403i,unique2=6042i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=403i,twothousand=403i,fivethous=2403i,tenthous=2403i,odd=6i,even=7i,stringu1="LOAAAA",stringu2="KYIAAA",string4="OOOOxx" 522115200000000000 +tenk unique1=2484i,unique2=6043i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=484i,twothousand=484i,fivethous=2484i,tenthous=2484i,odd=168i,even=169i,stringu1="ORAAAA",stringu2="LYIAAA",string4="VVVVxx" 522201600000000000 +tenk unique1=2805i,unique2=6044i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=805i,twothousand=805i,fivethous=2805i,tenthous=2805i,odd=10i,even=11i,stringu1="XDAAAA",stringu2="MYIAAA",string4="AAAAxx" 522288000000000000 +tenk unique1=5189i,unique2=6045i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=189i,twothousand=1189i,fivethous=189i,tenthous=5189i,odd=178i,even=179i,stringu1="PRAAAA",stringu2="NYIAAA",string4="HHHHxx" 522374400000000000 +tenk unique1=8336i,unique2=6046i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=336i,twothousand=336i,fivethous=3336i,tenthous=8336i,odd=72i,even=73i,stringu1="QIAAAA",stringu2="OYIAAA",string4="OOOOxx" 522460800000000000 +tenk unique1=5241i,unique2=6047i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=241i,twothousand=1241i,fivethous=241i,tenthous=5241i,odd=82i,even=83i,stringu1="PTAAAA",stringu2="PYIAAA",string4="VVVVxx" 522547200000000000 +tenk unique1=2612i,unique2=6048i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=612i,twothousand=612i,fivethous=2612i,tenthous=2612i,odd=24i,even=25i,stringu1="MWAAAA",stringu2="QYIAAA",string4="AAAAxx" 522633600000000000 +tenk unique1=2571i,unique2=6049i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=571i,twothousand=571i,fivethous=2571i,tenthous=2571i,odd=142i,even=143i,stringu1="XUAAAA",stringu2="RYIAAA",string4="HHHHxx" 522720000000000000 +tenk unique1=926i,unique2=6050i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=926i,twothousand=926i,fivethous=926i,tenthous=926i,odd=52i,even=53i,stringu1="QJAAAA",stringu2="SYIAAA",string4="OOOOxx" 522806400000000000 +tenk unique1=337i,unique2=6051i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=337i,twothousand=337i,fivethous=337i,tenthous=337i,odd=74i,even=75i,stringu1="ZMAAAA",stringu2="TYIAAA",string4="VVVVxx" 522892800000000000 +tenk unique1=2821i,unique2=6052i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=821i,twothousand=821i,fivethous=2821i,tenthous=2821i,odd=42i,even=43i,stringu1="NEAAAA",stringu2="UYIAAA",string4="AAAAxx" 522979200000000000 +tenk unique1=2658i,unique2=6053i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=658i,twothousand=658i,fivethous=2658i,tenthous=2658i,odd=116i,even=117i,stringu1="GYAAAA",stringu2="VYIAAA",string4="HHHHxx" 523065600000000000 +tenk unique1=9054i,unique2=6054i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=54i,twothousand=1054i,fivethous=4054i,tenthous=9054i,odd=108i,even=109i,stringu1="GKAAAA",stringu2="WYIAAA",string4="OOOOxx" 523152000000000000 +tenk unique1=5492i,unique2=6055i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=492i,twothousand=1492i,fivethous=492i,tenthous=5492i,odd=184i,even=185i,stringu1="GDAAAA",stringu2="XYIAAA",string4="VVVVxx" 523238400000000000 +tenk unique1=7313i,unique2=6056i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=313i,twothousand=1313i,fivethous=2313i,tenthous=7313i,odd=26i,even=27i,stringu1="HVAAAA",stringu2="YYIAAA",string4="AAAAxx" 523324800000000000 +tenk unique1=75i,unique2=6057i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=75i,twothousand=75i,fivethous=75i,tenthous=75i,odd=150i,even=151i,stringu1="XCAAAA",stringu2="ZYIAAA",string4="HHHHxx" 523411200000000000 +tenk unique1=5489i,unique2=6058i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=489i,twothousand=1489i,fivethous=489i,tenthous=5489i,odd=178i,even=179i,stringu1="DDAAAA",stringu2="AZIAAA",string4="OOOOxx" 523497600000000000 +tenk unique1=8413i,unique2=6059i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=413i,twothousand=413i,fivethous=3413i,tenthous=8413i,odd=26i,even=27i,stringu1="PLAAAA",stringu2="BZIAAA",string4="VVVVxx" 523584000000000000 +tenk unique1=3693i,unique2=6060i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=693i,twothousand=1693i,fivethous=3693i,tenthous=3693i,odd=186i,even=187i,stringu1="BMAAAA",stringu2="CZIAAA",string4="AAAAxx" 523670400000000000 +tenk unique1=9820i,unique2=6061i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=820i,twothousand=1820i,fivethous=4820i,tenthous=9820i,odd=40i,even=41i,stringu1="SNAAAA",stringu2="DZIAAA",string4="HHHHxx" 523756800000000000 +tenk unique1=8157i,unique2=6062i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=157i,twothousand=157i,fivethous=3157i,tenthous=8157i,odd=114i,even=115i,stringu1="TBAAAA",stringu2="EZIAAA",string4="OOOOxx" 523843200000000000 +tenk unique1=4161i,unique2=6063i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=161i,twothousand=161i,fivethous=4161i,tenthous=4161i,odd=122i,even=123i,stringu1="BEAAAA",stringu2="FZIAAA",string4="VVVVxx" 523929600000000000 +tenk unique1=8339i,unique2=6064i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=339i,twothousand=339i,fivethous=3339i,tenthous=8339i,odd=78i,even=79i,stringu1="TIAAAA",stringu2="GZIAAA",string4="AAAAxx" 524016000000000000 +tenk unique1=4141i,unique2=6065i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=141i,twothousand=141i,fivethous=4141i,tenthous=4141i,odd=82i,even=83i,stringu1="HDAAAA",stringu2="HZIAAA",string4="HHHHxx" 524102400000000000 +tenk unique1=9001i,unique2=6066i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1001i,fivethous=4001i,tenthous=9001i,odd=2i,even=3i,stringu1="FIAAAA",stringu2="IZIAAA",string4="OOOOxx" 524188800000000000 +tenk unique1=8247i,unique2=6067i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=247i,twothousand=247i,fivethous=3247i,tenthous=8247i,odd=94i,even=95i,stringu1="FFAAAA",stringu2="JZIAAA",string4="VVVVxx" 524275200000000000 +tenk unique1=1182i,unique2=6068i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=182i,twothousand=1182i,fivethous=1182i,tenthous=1182i,odd=164i,even=165i,stringu1="MTAAAA",stringu2="KZIAAA",string4="AAAAxx" 524361600000000000 +tenk unique1=9876i,unique2=6069i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=876i,twothousand=1876i,fivethous=4876i,tenthous=9876i,odd=152i,even=153i,stringu1="WPAAAA",stringu2="LZIAAA",string4="HHHHxx" 524448000000000000 +tenk unique1=4302i,unique2=6070i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=302i,twothousand=302i,fivethous=4302i,tenthous=4302i,odd=4i,even=5i,stringu1="MJAAAA",stringu2="MZIAAA",string4="OOOOxx" 524534400000000000 +tenk unique1=6674i,unique2=6071i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=674i,twothousand=674i,fivethous=1674i,tenthous=6674i,odd=148i,even=149i,stringu1="SWAAAA",stringu2="NZIAAA",string4="VVVVxx" 524620800000000000 +tenk unique1=4214i,unique2=6072i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=214i,twothousand=214i,fivethous=4214i,tenthous=4214i,odd=28i,even=29i,stringu1="CGAAAA",stringu2="OZIAAA",string4="AAAAxx" 524707200000000000 +tenk unique1=5584i,unique2=6073i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=584i,twothousand=1584i,fivethous=584i,tenthous=5584i,odd=168i,even=169i,stringu1="UGAAAA",stringu2="PZIAAA",string4="HHHHxx" 524793600000000000 +tenk unique1=265i,unique2=6074i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=265i,twothousand=265i,fivethous=265i,tenthous=265i,odd=130i,even=131i,stringu1="FKAAAA",stringu2="QZIAAA",string4="OOOOxx" 524880000000000000 +tenk unique1=9207i,unique2=6075i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=207i,twothousand=1207i,fivethous=4207i,tenthous=9207i,odd=14i,even=15i,stringu1="DQAAAA",stringu2="RZIAAA",string4="VVVVxx" 524966400000000000 +tenk unique1=9434i,unique2=6076i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=434i,twothousand=1434i,fivethous=4434i,tenthous=9434i,odd=68i,even=69i,stringu1="WYAAAA",stringu2="SZIAAA",string4="AAAAxx" 525052800000000000 +tenk unique1=2921i,unique2=6077i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=921i,twothousand=921i,fivethous=2921i,tenthous=2921i,odd=42i,even=43i,stringu1="JIAAAA",stringu2="TZIAAA",string4="HHHHxx" 525139200000000000 +tenk unique1=9355i,unique2=6078i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=355i,twothousand=1355i,fivethous=4355i,tenthous=9355i,odd=110i,even=111i,stringu1="VVAAAA",stringu2="UZIAAA",string4="OOOOxx" 525225600000000000 +tenk unique1=8538i,unique2=6079i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=538i,twothousand=538i,fivethous=3538i,tenthous=8538i,odd=76i,even=77i,stringu1="KQAAAA",stringu2="VZIAAA",string4="VVVVxx" 525312000000000000 +tenk unique1=4559i,unique2=6080i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=559i,twothousand=559i,fivethous=4559i,tenthous=4559i,odd=118i,even=119i,stringu1="JTAAAA",stringu2="WZIAAA",string4="AAAAxx" 525398400000000000 +tenk unique1=9175i,unique2=6081i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=175i,twothousand=1175i,fivethous=4175i,tenthous=9175i,odd=150i,even=151i,stringu1="XOAAAA",stringu2="XZIAAA",string4="HHHHxx" 525484800000000000 +tenk unique1=4489i,unique2=6082i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=489i,twothousand=489i,fivethous=4489i,tenthous=4489i,odd=178i,even=179i,stringu1="RQAAAA",stringu2="YZIAAA",string4="OOOOxx" 525571200000000000 +tenk unique1=1485i,unique2=6083i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=485i,twothousand=1485i,fivethous=1485i,tenthous=1485i,odd=170i,even=171i,stringu1="DFAAAA",stringu2="ZZIAAA",string4="VVVVxx" 525657600000000000 +tenk unique1=8853i,unique2=6084i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=853i,twothousand=853i,fivethous=3853i,tenthous=8853i,odd=106i,even=107i,stringu1="NCAAAA",stringu2="AAJAAA",string4="AAAAxx" 525744000000000000 +tenk unique1=9143i,unique2=6085i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=143i,twothousand=1143i,fivethous=4143i,tenthous=9143i,odd=86i,even=87i,stringu1="RNAAAA",stringu2="BAJAAA",string4="HHHHxx" 525830400000000000 +tenk unique1=9551i,unique2=6086i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=551i,twothousand=1551i,fivethous=4551i,tenthous=9551i,odd=102i,even=103i,stringu1="JDAAAA",stringu2="CAJAAA",string4="OOOOxx" 525916800000000000 +tenk unique1=49i,unique2=6087i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=49i,twothousand=49i,fivethous=49i,tenthous=49i,odd=98i,even=99i,stringu1="XBAAAA",stringu2="DAJAAA",string4="VVVVxx" 526003200000000000 +tenk unique1=8351i,unique2=6088i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=351i,twothousand=351i,fivethous=3351i,tenthous=8351i,odd=102i,even=103i,stringu1="FJAAAA",stringu2="EAJAAA",string4="AAAAxx" 526089600000000000 +tenk unique1=9748i,unique2=6089i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=748i,twothousand=1748i,fivethous=4748i,tenthous=9748i,odd=96i,even=97i,stringu1="YKAAAA",stringu2="FAJAAA",string4="HHHHxx" 526176000000000000 +tenk unique1=4536i,unique2=6090i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=536i,twothousand=536i,fivethous=4536i,tenthous=4536i,odd=72i,even=73i,stringu1="MSAAAA",stringu2="GAJAAA",string4="OOOOxx" 526262400000000000 +tenk unique1=930i,unique2=6091i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=930i,twothousand=930i,fivethous=930i,tenthous=930i,odd=60i,even=61i,stringu1="UJAAAA",stringu2="HAJAAA",string4="VVVVxx" 526348800000000000 +tenk unique1=2206i,unique2=6092i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=206i,twothousand=206i,fivethous=2206i,tenthous=2206i,odd=12i,even=13i,stringu1="WGAAAA",stringu2="IAJAAA",string4="AAAAxx" 526435200000000000 +tenk unique1=8004i,unique2=6093i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=4i,fivethous=3004i,tenthous=8004i,odd=8i,even=9i,stringu1="WVAAAA",stringu2="JAJAAA",string4="HHHHxx" 526521600000000000 +tenk unique1=219i,unique2=6094i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=219i,twothousand=219i,fivethous=219i,tenthous=219i,odd=38i,even=39i,stringu1="LIAAAA",stringu2="KAJAAA",string4="OOOOxx" 526608000000000000 +tenk unique1=2724i,unique2=6095i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=724i,twothousand=724i,fivethous=2724i,tenthous=2724i,odd=48i,even=49i,stringu1="UAAAAA",stringu2="LAJAAA",string4="VVVVxx" 526694400000000000 +tenk unique1=4868i,unique2=6096i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=868i,twothousand=868i,fivethous=4868i,tenthous=4868i,odd=136i,even=137i,stringu1="GFAAAA",stringu2="MAJAAA",string4="AAAAxx" 526780800000000000 +tenk unique1=5952i,unique2=6097i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=952i,twothousand=1952i,fivethous=952i,tenthous=5952i,odd=104i,even=105i,stringu1="YUAAAA",stringu2="NAJAAA",string4="HHHHxx" 526867200000000000 +tenk unique1=2094i,unique2=6098i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=94i,twothousand=94i,fivethous=2094i,tenthous=2094i,odd=188i,even=189i,stringu1="OCAAAA",stringu2="OAJAAA",string4="OOOOxx" 526953600000000000 +tenk unique1=5707i,unique2=6099i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=707i,twothousand=1707i,fivethous=707i,tenthous=5707i,odd=14i,even=15i,stringu1="NLAAAA",stringu2="PAJAAA",string4="VVVVxx" 527040000000000000 +tenk unique1=5200i,unique2=6100i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=200i,twothousand=1200i,fivethous=200i,tenthous=5200i,odd=0i,even=1i,stringu1="ASAAAA",stringu2="QAJAAA",string4="AAAAxx" 527126400000000000 +tenk unique1=967i,unique2=6101i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=967i,twothousand=967i,fivethous=967i,tenthous=967i,odd=134i,even=135i,stringu1="FLAAAA",stringu2="RAJAAA",string4="HHHHxx" 527212800000000000 +tenk unique1=1982i,unique2=6102i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=982i,twothousand=1982i,fivethous=1982i,tenthous=1982i,odd=164i,even=165i,stringu1="GYAAAA",stringu2="SAJAAA",string4="OOOOxx" 527299200000000000 +tenk unique1=3410i,unique2=6103i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=410i,twothousand=1410i,fivethous=3410i,tenthous=3410i,odd=20i,even=21i,stringu1="EBAAAA",stringu2="TAJAAA",string4="VVVVxx" 527385600000000000 +tenk unique1=174i,unique2=6104i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=174i,twothousand=174i,fivethous=174i,tenthous=174i,odd=148i,even=149i,stringu1="SGAAAA",stringu2="UAJAAA",string4="AAAAxx" 527472000000000000 +tenk unique1=9217i,unique2=6105i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=217i,twothousand=1217i,fivethous=4217i,tenthous=9217i,odd=34i,even=35i,stringu1="NQAAAA",stringu2="VAJAAA",string4="HHHHxx" 527558400000000000 +tenk unique1=9103i,unique2=6106i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=103i,twothousand=1103i,fivethous=4103i,tenthous=9103i,odd=6i,even=7i,stringu1="DMAAAA",stringu2="WAJAAA",string4="OOOOxx" 527644800000000000 +tenk unique1=868i,unique2=6107i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=868i,twothousand=868i,fivethous=868i,tenthous=868i,odd=136i,even=137i,stringu1="KHAAAA",stringu2="XAJAAA",string4="VVVVxx" 527731200000000000 +tenk unique1=8261i,unique2=6108i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=261i,twothousand=261i,fivethous=3261i,tenthous=8261i,odd=122i,even=123i,stringu1="TFAAAA",stringu2="YAJAAA",string4="AAAAxx" 527817600000000000 +tenk unique1=2720i,unique2=6109i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=720i,twothousand=720i,fivethous=2720i,tenthous=2720i,odd=40i,even=41i,stringu1="QAAAAA",stringu2="ZAJAAA",string4="HHHHxx" 527904000000000000 +tenk unique1=2999i,unique2=6110i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=999i,twothousand=999i,fivethous=2999i,tenthous=2999i,odd=198i,even=199i,stringu1="JLAAAA",stringu2="ABJAAA",string4="OOOOxx" 527990400000000000 +tenk unique1=769i,unique2=6111i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=769i,twothousand=769i,fivethous=769i,tenthous=769i,odd=138i,even=139i,stringu1="PDAAAA",stringu2="BBJAAA",string4="VVVVxx" 528076800000000000 +tenk unique1=4533i,unique2=6112i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=533i,twothousand=533i,fivethous=4533i,tenthous=4533i,odd=66i,even=67i,stringu1="JSAAAA",stringu2="CBJAAA",string4="AAAAxx" 528163200000000000 +tenk unique1=2030i,unique2=6113i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=30i,twothousand=30i,fivethous=2030i,tenthous=2030i,odd=60i,even=61i,stringu1="CAAAAA",stringu2="DBJAAA",string4="HHHHxx" 528249600000000000 +tenk unique1=5824i,unique2=6114i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=824i,twothousand=1824i,fivethous=824i,tenthous=5824i,odd=48i,even=49i,stringu1="AQAAAA",stringu2="EBJAAA",string4="OOOOxx" 528336000000000000 +tenk unique1=2328i,unique2=6115i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=328i,twothousand=328i,fivethous=2328i,tenthous=2328i,odd=56i,even=57i,stringu1="OLAAAA",stringu2="FBJAAA",string4="VVVVxx" 528422400000000000 +tenk unique1=9970i,unique2=6116i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=970i,twothousand=1970i,fivethous=4970i,tenthous=9970i,odd=140i,even=141i,stringu1="MTAAAA",stringu2="GBJAAA",string4="AAAAxx" 528508800000000000 +tenk unique1=3192i,unique2=6117i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=192i,twothousand=1192i,fivethous=3192i,tenthous=3192i,odd=184i,even=185i,stringu1="USAAAA",stringu2="HBJAAA",string4="HHHHxx" 528595200000000000 +tenk unique1=3387i,unique2=6118i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=387i,twothousand=1387i,fivethous=3387i,tenthous=3387i,odd=174i,even=175i,stringu1="HAAAAA",stringu2="IBJAAA",string4="OOOOxx" 528681600000000000 +tenk unique1=1936i,unique2=6119i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=936i,twothousand=1936i,fivethous=1936i,tenthous=1936i,odd=72i,even=73i,stringu1="MWAAAA",stringu2="JBJAAA",string4="VVVVxx" 528768000000000000 +tenk unique1=6934i,unique2=6120i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=934i,twothousand=934i,fivethous=1934i,tenthous=6934i,odd=68i,even=69i,stringu1="SGAAAA",stringu2="KBJAAA",string4="AAAAxx" 528854400000000000 +tenk unique1=5615i,unique2=6121i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=615i,twothousand=1615i,fivethous=615i,tenthous=5615i,odd=30i,even=31i,stringu1="ZHAAAA",stringu2="LBJAAA",string4="HHHHxx" 528940800000000000 +tenk unique1=2241i,unique2=6122i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=241i,twothousand=241i,fivethous=2241i,tenthous=2241i,odd=82i,even=83i,stringu1="FIAAAA",stringu2="MBJAAA",string4="OOOOxx" 529027200000000000 +tenk unique1=1842i,unique2=6123i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=842i,twothousand=1842i,fivethous=1842i,tenthous=1842i,odd=84i,even=85i,stringu1="WSAAAA",stringu2="NBJAAA",string4="VVVVxx" 529113600000000000 +tenk unique1=8044i,unique2=6124i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=44i,twothousand=44i,fivethous=3044i,tenthous=8044i,odd=88i,even=89i,stringu1="KXAAAA",stringu2="OBJAAA",string4="AAAAxx" 529200000000000000 +tenk unique1=8902i,unique2=6125i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=902i,twothousand=902i,fivethous=3902i,tenthous=8902i,odd=4i,even=5i,stringu1="KEAAAA",stringu2="PBJAAA",string4="HHHHxx" 529286400000000000 +tenk unique1=4519i,unique2=6126i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=519i,twothousand=519i,fivethous=4519i,tenthous=4519i,odd=38i,even=39i,stringu1="VRAAAA",stringu2="QBJAAA",string4="OOOOxx" 529372800000000000 +tenk unique1=492i,unique2=6127i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=492i,twothousand=492i,fivethous=492i,tenthous=492i,odd=184i,even=185i,stringu1="YSAAAA",stringu2="RBJAAA",string4="VVVVxx" 529459200000000000 +tenk unique1=2694i,unique2=6128i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=694i,twothousand=694i,fivethous=2694i,tenthous=2694i,odd=188i,even=189i,stringu1="QZAAAA",stringu2="SBJAAA",string4="AAAAxx" 529545600000000000 +tenk unique1=5861i,unique2=6129i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=861i,twothousand=1861i,fivethous=861i,tenthous=5861i,odd=122i,even=123i,stringu1="LRAAAA",stringu2="TBJAAA",string4="HHHHxx" 529632000000000000 +tenk unique1=2104i,unique2=6130i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=104i,twothousand=104i,fivethous=2104i,tenthous=2104i,odd=8i,even=9i,stringu1="YCAAAA",stringu2="UBJAAA",string4="OOOOxx" 529718400000000000 +tenk unique1=5376i,unique2=6131i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=376i,twothousand=1376i,fivethous=376i,tenthous=5376i,odd=152i,even=153i,stringu1="UYAAAA",stringu2="VBJAAA",string4="VVVVxx" 529804800000000000 +tenk unique1=3147i,unique2=6132i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=147i,twothousand=1147i,fivethous=3147i,tenthous=3147i,odd=94i,even=95i,stringu1="BRAAAA",stringu2="WBJAAA",string4="AAAAxx" 529891200000000000 +tenk unique1=9880i,unique2=6133i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=880i,twothousand=1880i,fivethous=4880i,tenthous=9880i,odd=160i,even=161i,stringu1="AQAAAA",stringu2="XBJAAA",string4="HHHHxx" 529977600000000000 +tenk unique1=6171i,unique2=6134i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=171i,twothousand=171i,fivethous=1171i,tenthous=6171i,odd=142i,even=143i,stringu1="JDAAAA",stringu2="YBJAAA",string4="OOOOxx" 530064000000000000 +tenk unique1=1850i,unique2=6135i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=850i,twothousand=1850i,fivethous=1850i,tenthous=1850i,odd=100i,even=101i,stringu1="ETAAAA",stringu2="ZBJAAA",string4="VVVVxx" 530150400000000000 +tenk unique1=1775i,unique2=6136i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=775i,twothousand=1775i,fivethous=1775i,tenthous=1775i,odd=150i,even=151i,stringu1="HQAAAA",stringu2="ACJAAA",string4="AAAAxx" 530236800000000000 +tenk unique1=9261i,unique2=6137i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=261i,twothousand=1261i,fivethous=4261i,tenthous=9261i,odd=122i,even=123i,stringu1="FSAAAA",stringu2="BCJAAA",string4="HHHHxx" 530323200000000000 +tenk unique1=9648i,unique2=6138i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=648i,twothousand=1648i,fivethous=4648i,tenthous=9648i,odd=96i,even=97i,stringu1="CHAAAA",stringu2="CCJAAA",string4="OOOOxx" 530409600000000000 +tenk unique1=7846i,unique2=6139i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=846i,twothousand=1846i,fivethous=2846i,tenthous=7846i,odd=92i,even=93i,stringu1="UPAAAA",stringu2="DCJAAA",string4="VVVVxx" 530496000000000000 +tenk unique1=1446i,unique2=6140i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=446i,twothousand=1446i,fivethous=1446i,tenthous=1446i,odd=92i,even=93i,stringu1="QDAAAA",stringu2="ECJAAA",string4="AAAAxx" 530582400000000000 +tenk unique1=3139i,unique2=6141i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=139i,twothousand=1139i,fivethous=3139i,tenthous=3139i,odd=78i,even=79i,stringu1="TQAAAA",stringu2="FCJAAA",string4="HHHHxx" 530668800000000000 +tenk unique1=6142i,unique2=6142i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=142i,twothousand=142i,fivethous=1142i,tenthous=6142i,odd=84i,even=85i,stringu1="GCAAAA",stringu2="GCJAAA",string4="OOOOxx" 530755200000000000 +tenk unique1=5812i,unique2=6143i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=812i,twothousand=1812i,fivethous=812i,tenthous=5812i,odd=24i,even=25i,stringu1="OPAAAA",stringu2="HCJAAA",string4="VVVVxx" 530841600000000000 +tenk unique1=6728i,unique2=6144i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=728i,twothousand=728i,fivethous=1728i,tenthous=6728i,odd=56i,even=57i,stringu1="UYAAAA",stringu2="ICJAAA",string4="AAAAxx" 530928000000000000 +tenk unique1=4428i,unique2=6145i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=428i,twothousand=428i,fivethous=4428i,tenthous=4428i,odd=56i,even=57i,stringu1="IOAAAA",stringu2="JCJAAA",string4="HHHHxx" 531014400000000000 +tenk unique1=502i,unique2=6146i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=502i,twothousand=502i,fivethous=502i,tenthous=502i,odd=4i,even=5i,stringu1="ITAAAA",stringu2="KCJAAA",string4="OOOOxx" 531100800000000000 +tenk unique1=2363i,unique2=6147i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=363i,twothousand=363i,fivethous=2363i,tenthous=2363i,odd=126i,even=127i,stringu1="XMAAAA",stringu2="LCJAAA",string4="VVVVxx" 531187200000000000 +tenk unique1=3808i,unique2=6148i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=808i,twothousand=1808i,fivethous=3808i,tenthous=3808i,odd=16i,even=17i,stringu1="MQAAAA",stringu2="MCJAAA",string4="AAAAxx" 531273600000000000 +tenk unique1=1010i,unique2=6149i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=10i,twothousand=1010i,fivethous=1010i,tenthous=1010i,odd=20i,even=21i,stringu1="WMAAAA",stringu2="NCJAAA",string4="HHHHxx" 531360000000000000 +tenk unique1=9565i,unique2=6150i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=565i,twothousand=1565i,fivethous=4565i,tenthous=9565i,odd=130i,even=131i,stringu1="XDAAAA",stringu2="OCJAAA",string4="OOOOxx" 531446400000000000 +tenk unique1=1587i,unique2=6151i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=587i,twothousand=1587i,fivethous=1587i,tenthous=1587i,odd=174i,even=175i,stringu1="BJAAAA",stringu2="PCJAAA",string4="VVVVxx" 531532800000000000 +tenk unique1=1474i,unique2=6152i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=474i,twothousand=1474i,fivethous=1474i,tenthous=1474i,odd=148i,even=149i,stringu1="SEAAAA",stringu2="QCJAAA",string4="AAAAxx" 531619200000000000 +tenk unique1=6215i,unique2=6153i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=215i,twothousand=215i,fivethous=1215i,tenthous=6215i,odd=30i,even=31i,stringu1="BFAAAA",stringu2="RCJAAA",string4="HHHHxx" 531705600000000000 +tenk unique1=2395i,unique2=6154i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=395i,twothousand=395i,fivethous=2395i,tenthous=2395i,odd=190i,even=191i,stringu1="DOAAAA",stringu2="SCJAAA",string4="OOOOxx" 531792000000000000 +tenk unique1=8753i,unique2=6155i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=753i,twothousand=753i,fivethous=3753i,tenthous=8753i,odd=106i,even=107i,stringu1="RYAAAA",stringu2="TCJAAA",string4="VVVVxx" 531878400000000000 +tenk unique1=2446i,unique2=6156i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=446i,twothousand=446i,fivethous=2446i,tenthous=2446i,odd=92i,even=93i,stringu1="CQAAAA",stringu2="UCJAAA",string4="AAAAxx" 531964800000000000 +tenk unique1=60i,unique2=6157i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=60i,twothousand=60i,fivethous=60i,tenthous=60i,odd=120i,even=121i,stringu1="ICAAAA",stringu2="VCJAAA",string4="HHHHxx" 532051200000000000 +tenk unique1=982i,unique2=6158i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=982i,twothousand=982i,fivethous=982i,tenthous=982i,odd=164i,even=165i,stringu1="ULAAAA",stringu2="WCJAAA",string4="OOOOxx" 532137600000000000 +tenk unique1=6489i,unique2=6159i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=489i,twothousand=489i,fivethous=1489i,tenthous=6489i,odd=178i,even=179i,stringu1="PPAAAA",stringu2="XCJAAA",string4="VVVVxx" 532224000000000000 +tenk unique1=5334i,unique2=6160i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=334i,twothousand=1334i,fivethous=334i,tenthous=5334i,odd=68i,even=69i,stringu1="EXAAAA",stringu2="YCJAAA",string4="AAAAxx" 532310400000000000 +tenk unique1=8540i,unique2=6161i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=540i,twothousand=540i,fivethous=3540i,tenthous=8540i,odd=80i,even=81i,stringu1="MQAAAA",stringu2="ZCJAAA",string4="HHHHxx" 532396800000000000 +tenk unique1=490i,unique2=6162i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=490i,twothousand=490i,fivethous=490i,tenthous=490i,odd=180i,even=181i,stringu1="WSAAAA",stringu2="ADJAAA",string4="OOOOxx" 532483200000000000 +tenk unique1=6763i,unique2=6163i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=763i,twothousand=763i,fivethous=1763i,tenthous=6763i,odd=126i,even=127i,stringu1="DAAAAA",stringu2="BDJAAA",string4="VVVVxx" 532569600000000000 +tenk unique1=8273i,unique2=6164i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=273i,twothousand=273i,fivethous=3273i,tenthous=8273i,odd=146i,even=147i,stringu1="FGAAAA",stringu2="CDJAAA",string4="AAAAxx" 532656000000000000 +tenk unique1=8327i,unique2=6165i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=327i,twothousand=327i,fivethous=3327i,tenthous=8327i,odd=54i,even=55i,stringu1="HIAAAA",stringu2="DDJAAA",string4="HHHHxx" 532742400000000000 +tenk unique1=8541i,unique2=6166i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=541i,twothousand=541i,fivethous=3541i,tenthous=8541i,odd=82i,even=83i,stringu1="NQAAAA",stringu2="EDJAAA",string4="OOOOxx" 532828800000000000 +tenk unique1=3459i,unique2=6167i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=459i,twothousand=1459i,fivethous=3459i,tenthous=3459i,odd=118i,even=119i,stringu1="BDAAAA",stringu2="FDJAAA",string4="VVVVxx" 532915200000000000 +tenk unique1=5557i,unique2=6168i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=557i,twothousand=1557i,fivethous=557i,tenthous=5557i,odd=114i,even=115i,stringu1="TFAAAA",stringu2="GDJAAA",string4="AAAAxx" 533001600000000000 +tenk unique1=158i,unique2=6169i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=158i,twothousand=158i,fivethous=158i,tenthous=158i,odd=116i,even=117i,stringu1="CGAAAA",stringu2="HDJAAA",string4="HHHHxx" 533088000000000000 +tenk unique1=1741i,unique2=6170i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=741i,twothousand=1741i,fivethous=1741i,tenthous=1741i,odd=82i,even=83i,stringu1="ZOAAAA",stringu2="IDJAAA",string4="OOOOxx" 533174400000000000 +tenk unique1=8385i,unique2=6171i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=385i,twothousand=385i,fivethous=3385i,tenthous=8385i,odd=170i,even=171i,stringu1="NKAAAA",stringu2="JDJAAA",string4="VVVVxx" 533260800000000000 +tenk unique1=617i,unique2=6172i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=617i,twothousand=617i,fivethous=617i,tenthous=617i,odd=34i,even=35i,stringu1="TXAAAA",stringu2="KDJAAA",string4="AAAAxx" 533347200000000000 +tenk unique1=3560i,unique2=6173i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=560i,twothousand=1560i,fivethous=3560i,tenthous=3560i,odd=120i,even=121i,stringu1="YGAAAA",stringu2="LDJAAA",string4="HHHHxx" 533433600000000000 +tenk unique1=5216i,unique2=6174i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=216i,twothousand=1216i,fivethous=216i,tenthous=5216i,odd=32i,even=33i,stringu1="QSAAAA",stringu2="MDJAAA",string4="OOOOxx" 533520000000000000 +tenk unique1=8443i,unique2=6175i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=443i,twothousand=443i,fivethous=3443i,tenthous=8443i,odd=86i,even=87i,stringu1="TMAAAA",stringu2="NDJAAA",string4="VVVVxx" 533606400000000000 +tenk unique1=2700i,unique2=6176i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=700i,twothousand=700i,fivethous=2700i,tenthous=2700i,odd=0i,even=1i,stringu1="WZAAAA",stringu2="ODJAAA",string4="AAAAxx" 533692800000000000 +tenk unique1=3661i,unique2=6177i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=661i,twothousand=1661i,fivethous=3661i,tenthous=3661i,odd=122i,even=123i,stringu1="VKAAAA",stringu2="PDJAAA",string4="HHHHxx" 533779200000000000 +tenk unique1=4875i,unique2=6178i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=875i,twothousand=875i,fivethous=4875i,tenthous=4875i,odd=150i,even=151i,stringu1="NFAAAA",stringu2="QDJAAA",string4="OOOOxx" 533865600000000000 +tenk unique1=6721i,unique2=6179i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=721i,twothousand=721i,fivethous=1721i,tenthous=6721i,odd=42i,even=43i,stringu1="NYAAAA",stringu2="RDJAAA",string4="VVVVxx" 533952000000000000 +tenk unique1=3659i,unique2=6180i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=659i,twothousand=1659i,fivethous=3659i,tenthous=3659i,odd=118i,even=119i,stringu1="TKAAAA",stringu2="SDJAAA",string4="AAAAxx" 534038400000000000 +tenk unique1=8944i,unique2=6181i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=944i,twothousand=944i,fivethous=3944i,tenthous=8944i,odd=88i,even=89i,stringu1="AGAAAA",stringu2="TDJAAA",string4="HHHHxx" 534124800000000000 +tenk unique1=9133i,unique2=6182i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=133i,twothousand=1133i,fivethous=4133i,tenthous=9133i,odd=66i,even=67i,stringu1="HNAAAA",stringu2="UDJAAA",string4="OOOOxx" 534211200000000000 +tenk unique1=9882i,unique2=6183i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=882i,twothousand=1882i,fivethous=4882i,tenthous=9882i,odd=164i,even=165i,stringu1="CQAAAA",stringu2="VDJAAA",string4="VVVVxx" 534297600000000000 +tenk unique1=2102i,unique2=6184i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=102i,twothousand=102i,fivethous=2102i,tenthous=2102i,odd=4i,even=5i,stringu1="WCAAAA",stringu2="WDJAAA",string4="AAAAxx" 534384000000000000 +tenk unique1=9445i,unique2=6185i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=445i,twothousand=1445i,fivethous=4445i,tenthous=9445i,odd=90i,even=91i,stringu1="HZAAAA",stringu2="XDJAAA",string4="HHHHxx" 534470400000000000 +tenk unique1=5559i,unique2=6186i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=559i,twothousand=1559i,fivethous=559i,tenthous=5559i,odd=118i,even=119i,stringu1="VFAAAA",stringu2="YDJAAA",string4="OOOOxx" 534556800000000000 +tenk unique1=6096i,unique2=6187i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=96i,twothousand=96i,fivethous=1096i,tenthous=6096i,odd=192i,even=193i,stringu1="MAAAAA",stringu2="ZDJAAA",string4="VVVVxx" 534643200000000000 +tenk unique1=9336i,unique2=6188i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=336i,twothousand=1336i,fivethous=4336i,tenthous=9336i,odd=72i,even=73i,stringu1="CVAAAA",stringu2="AEJAAA",string4="AAAAxx" 534729600000000000 +tenk unique1=2162i,unique2=6189i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=162i,twothousand=162i,fivethous=2162i,tenthous=2162i,odd=124i,even=125i,stringu1="EFAAAA",stringu2="BEJAAA",string4="HHHHxx" 534816000000000000 +tenk unique1=7459i,unique2=6190i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=459i,twothousand=1459i,fivethous=2459i,tenthous=7459i,odd=118i,even=119i,stringu1="XAAAAA",stringu2="CEJAAA",string4="OOOOxx" 534902400000000000 +tenk unique1=3248i,unique2=6191i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=248i,twothousand=1248i,fivethous=3248i,tenthous=3248i,odd=96i,even=97i,stringu1="YUAAAA",stringu2="DEJAAA",string4="VVVVxx" 534988800000000000 +tenk unique1=9539i,unique2=6192i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=539i,twothousand=1539i,fivethous=4539i,tenthous=9539i,odd=78i,even=79i,stringu1="XCAAAA",stringu2="EEJAAA",string4="AAAAxx" 535075200000000000 +tenk unique1=4449i,unique2=6193i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=449i,twothousand=449i,fivethous=4449i,tenthous=4449i,odd=98i,even=99i,stringu1="DPAAAA",stringu2="FEJAAA",string4="HHHHxx" 535161600000000000 +tenk unique1=2809i,unique2=6194i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=809i,twothousand=809i,fivethous=2809i,tenthous=2809i,odd=18i,even=19i,stringu1="BEAAAA",stringu2="GEJAAA",string4="OOOOxx" 535248000000000000 +tenk unique1=7058i,unique2=6195i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=58i,twothousand=1058i,fivethous=2058i,tenthous=7058i,odd=116i,even=117i,stringu1="MLAAAA",stringu2="HEJAAA",string4="VVVVxx" 535334400000000000 +tenk unique1=3512i,unique2=6196i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=512i,twothousand=1512i,fivethous=3512i,tenthous=3512i,odd=24i,even=25i,stringu1="CFAAAA",stringu2="IEJAAA",string4="AAAAxx" 535420800000000000 +tenk unique1=2802i,unique2=6197i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=802i,twothousand=802i,fivethous=2802i,tenthous=2802i,odd=4i,even=5i,stringu1="UDAAAA",stringu2="JEJAAA",string4="HHHHxx" 535507200000000000 +tenk unique1=6289i,unique2=6198i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=289i,twothousand=289i,fivethous=1289i,tenthous=6289i,odd=178i,even=179i,stringu1="XHAAAA",stringu2="KEJAAA",string4="OOOOxx" 535593600000000000 +tenk unique1=1947i,unique2=6199i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=947i,twothousand=1947i,fivethous=1947i,tenthous=1947i,odd=94i,even=95i,stringu1="XWAAAA",stringu2="LEJAAA",string4="VVVVxx" 535680000000000000 +tenk unique1=9572i,unique2=6200i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=572i,twothousand=1572i,fivethous=4572i,tenthous=9572i,odd=144i,even=145i,stringu1="EEAAAA",stringu2="MEJAAA",string4="AAAAxx" 535766400000000000 +tenk unique1=2356i,unique2=6201i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=356i,twothousand=356i,fivethous=2356i,tenthous=2356i,odd=112i,even=113i,stringu1="QMAAAA",stringu2="NEJAAA",string4="HHHHxx" 535852800000000000 +tenk unique1=3039i,unique2=6202i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=39i,twothousand=1039i,fivethous=3039i,tenthous=3039i,odd=78i,even=79i,stringu1="XMAAAA",stringu2="OEJAAA",string4="OOOOxx" 535939200000000000 +tenk unique1=9452i,unique2=6203i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=452i,twothousand=1452i,fivethous=4452i,tenthous=9452i,odd=104i,even=105i,stringu1="OZAAAA",stringu2="PEJAAA",string4="VVVVxx" 536025600000000000 +tenk unique1=6328i,unique2=6204i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=328i,twothousand=328i,fivethous=1328i,tenthous=6328i,odd=56i,even=57i,stringu1="KJAAAA",stringu2="QEJAAA",string4="AAAAxx" 536112000000000000 +tenk unique1=7661i,unique2=6205i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=661i,twothousand=1661i,fivethous=2661i,tenthous=7661i,odd=122i,even=123i,stringu1="RIAAAA",stringu2="REJAAA",string4="HHHHxx" 536198400000000000 +tenk unique1=2566i,unique2=6206i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=566i,twothousand=566i,fivethous=2566i,tenthous=2566i,odd=132i,even=133i,stringu1="SUAAAA",stringu2="SEJAAA",string4="OOOOxx" 536284800000000000 +tenk unique1=6095i,unique2=6207i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=95i,twothousand=95i,fivethous=1095i,tenthous=6095i,odd=190i,even=191i,stringu1="LAAAAA",stringu2="TEJAAA",string4="VVVVxx" 536371200000000000 +tenk unique1=6367i,unique2=6208i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=367i,twothousand=367i,fivethous=1367i,tenthous=6367i,odd=134i,even=135i,stringu1="XKAAAA",stringu2="UEJAAA",string4="AAAAxx" 536457600000000000 +tenk unique1=3368i,unique2=6209i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=368i,twothousand=1368i,fivethous=3368i,tenthous=3368i,odd=136i,even=137i,stringu1="OZAAAA",stringu2="VEJAAA",string4="HHHHxx" 536544000000000000 +tenk unique1=5567i,unique2=6210i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=567i,twothousand=1567i,fivethous=567i,tenthous=5567i,odd=134i,even=135i,stringu1="DGAAAA",stringu2="WEJAAA",string4="OOOOxx" 536630400000000000 +tenk unique1=9834i,unique2=6211i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=834i,twothousand=1834i,fivethous=4834i,tenthous=9834i,odd=68i,even=69i,stringu1="GOAAAA",stringu2="XEJAAA",string4="VVVVxx" 536716800000000000 +tenk unique1=9695i,unique2=6212i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=695i,twothousand=1695i,fivethous=4695i,tenthous=9695i,odd=190i,even=191i,stringu1="XIAAAA",stringu2="YEJAAA",string4="AAAAxx" 536803200000000000 +tenk unique1=7291i,unique2=6213i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=291i,twothousand=1291i,fivethous=2291i,tenthous=7291i,odd=182i,even=183i,stringu1="LUAAAA",stringu2="ZEJAAA",string4="HHHHxx" 536889600000000000 +tenk unique1=4806i,unique2=6214i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=806i,twothousand=806i,fivethous=4806i,tenthous=4806i,odd=12i,even=13i,stringu1="WCAAAA",stringu2="AFJAAA",string4="OOOOxx" 536976000000000000 +tenk unique1=2000i,unique2=6215i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=0i,fivethous=2000i,tenthous=2000i,odd=0i,even=1i,stringu1="YYAAAA",stringu2="BFJAAA",string4="VVVVxx" 537062400000000000 +tenk unique1=6817i,unique2=6216i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=817i,twothousand=817i,fivethous=1817i,tenthous=6817i,odd=34i,even=35i,stringu1="FCAAAA",stringu2="CFJAAA",string4="AAAAxx" 537148800000000000 +tenk unique1=8487i,unique2=6217i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=487i,twothousand=487i,fivethous=3487i,tenthous=8487i,odd=174i,even=175i,stringu1="LOAAAA",stringu2="DFJAAA",string4="HHHHxx" 537235200000000000 +tenk unique1=3245i,unique2=6218i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=245i,twothousand=1245i,fivethous=3245i,tenthous=3245i,odd=90i,even=91i,stringu1="VUAAAA",stringu2="EFJAAA",string4="OOOOxx" 537321600000000000 +tenk unique1=632i,unique2=6219i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=632i,twothousand=632i,fivethous=632i,tenthous=632i,odd=64i,even=65i,stringu1="IYAAAA",stringu2="FFJAAA",string4="VVVVxx" 537408000000000000 +tenk unique1=8067i,unique2=6220i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=67i,twothousand=67i,fivethous=3067i,tenthous=8067i,odd=134i,even=135i,stringu1="HYAAAA",stringu2="GFJAAA",string4="AAAAxx" 537494400000000000 +tenk unique1=7140i,unique2=6221i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=140i,twothousand=1140i,fivethous=2140i,tenthous=7140i,odd=80i,even=81i,stringu1="QOAAAA",stringu2="HFJAAA",string4="HHHHxx" 537580800000000000 +tenk unique1=6802i,unique2=6222i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=802i,twothousand=802i,fivethous=1802i,tenthous=6802i,odd=4i,even=5i,stringu1="QBAAAA",stringu2="IFJAAA",string4="OOOOxx" 537667200000000000 +tenk unique1=3980i,unique2=6223i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=980i,twothousand=1980i,fivethous=3980i,tenthous=3980i,odd=160i,even=161i,stringu1="CXAAAA",stringu2="JFJAAA",string4="VVVVxx" 537753600000000000 +tenk unique1=1321i,unique2=6224i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=321i,twothousand=1321i,fivethous=1321i,tenthous=1321i,odd=42i,even=43i,stringu1="VYAAAA",stringu2="KFJAAA",string4="AAAAxx" 537840000000000000 +tenk unique1=2273i,unique2=6225i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=273i,twothousand=273i,fivethous=2273i,tenthous=2273i,odd=146i,even=147i,stringu1="LJAAAA",stringu2="LFJAAA",string4="HHHHxx" 537926400000000000 +tenk unique1=6787i,unique2=6226i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=787i,twothousand=787i,fivethous=1787i,tenthous=6787i,odd=174i,even=175i,stringu1="BBAAAA",stringu2="MFJAAA",string4="OOOOxx" 538012800000000000 +tenk unique1=9480i,unique2=6227i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=480i,twothousand=1480i,fivethous=4480i,tenthous=9480i,odd=160i,even=161i,stringu1="QAAAAA",stringu2="NFJAAA",string4="VVVVxx" 538099200000000000 +tenk unique1=9404i,unique2=6228i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=404i,twothousand=1404i,fivethous=4404i,tenthous=9404i,odd=8i,even=9i,stringu1="SXAAAA",stringu2="OFJAAA",string4="AAAAxx" 538185600000000000 +tenk unique1=3914i,unique2=6229i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=914i,twothousand=1914i,fivethous=3914i,tenthous=3914i,odd=28i,even=29i,stringu1="OUAAAA",stringu2="PFJAAA",string4="HHHHxx" 538272000000000000 +tenk unique1=5507i,unique2=6230i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=507i,twothousand=1507i,fivethous=507i,tenthous=5507i,odd=14i,even=15i,stringu1="VDAAAA",stringu2="QFJAAA",string4="OOOOxx" 538358400000000000 +tenk unique1=1813i,unique2=6231i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=813i,twothousand=1813i,fivethous=1813i,tenthous=1813i,odd=26i,even=27i,stringu1="TRAAAA",stringu2="RFJAAA",string4="VVVVxx" 538444800000000000 +tenk unique1=1999i,unique2=6232i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=999i,twothousand=1999i,fivethous=1999i,tenthous=1999i,odd=198i,even=199i,stringu1="XYAAAA",stringu2="SFJAAA",string4="AAAAxx" 538531200000000000 +tenk unique1=3848i,unique2=6233i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=848i,twothousand=1848i,fivethous=3848i,tenthous=3848i,odd=96i,even=97i,stringu1="ASAAAA",stringu2="TFJAAA",string4="HHHHxx" 538617600000000000 +tenk unique1=9693i,unique2=6234i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=693i,twothousand=1693i,fivethous=4693i,tenthous=9693i,odd=186i,even=187i,stringu1="VIAAAA",stringu2="UFJAAA",string4="OOOOxx" 538704000000000000 +tenk unique1=1353i,unique2=6235i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=353i,twothousand=1353i,fivethous=1353i,tenthous=1353i,odd=106i,even=107i,stringu1="BAAAAA",stringu2="VFJAAA",string4="VVVVxx" 538790400000000000 +tenk unique1=7218i,unique2=6236i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=218i,twothousand=1218i,fivethous=2218i,tenthous=7218i,odd=36i,even=37i,stringu1="QRAAAA",stringu2="WFJAAA",string4="AAAAxx" 538876800000000000 +tenk unique1=8223i,unique2=6237i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=223i,twothousand=223i,fivethous=3223i,tenthous=8223i,odd=46i,even=47i,stringu1="HEAAAA",stringu2="XFJAAA",string4="HHHHxx" 538963200000000000 +tenk unique1=9982i,unique2=6238i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=982i,twothousand=1982i,fivethous=4982i,tenthous=9982i,odd=164i,even=165i,stringu1="YTAAAA",stringu2="YFJAAA",string4="OOOOxx" 539049600000000000 +tenk unique1=8799i,unique2=6239i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=799i,twothousand=799i,fivethous=3799i,tenthous=8799i,odd=198i,even=199i,stringu1="LAAAAA",stringu2="ZFJAAA",string4="VVVVxx" 539136000000000000 +tenk unique1=8929i,unique2=6240i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=929i,twothousand=929i,fivethous=3929i,tenthous=8929i,odd=58i,even=59i,stringu1="LFAAAA",stringu2="AGJAAA",string4="AAAAxx" 539222400000000000 +tenk unique1=4626i,unique2=6241i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=626i,twothousand=626i,fivethous=4626i,tenthous=4626i,odd=52i,even=53i,stringu1="YVAAAA",stringu2="BGJAAA",string4="HHHHxx" 539308800000000000 +tenk unique1=7958i,unique2=6242i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=958i,twothousand=1958i,fivethous=2958i,tenthous=7958i,odd=116i,even=117i,stringu1="CUAAAA",stringu2="CGJAAA",string4="OOOOxx" 539395200000000000 +tenk unique1=3743i,unique2=6243i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=743i,twothousand=1743i,fivethous=3743i,tenthous=3743i,odd=86i,even=87i,stringu1="ZNAAAA",stringu2="DGJAAA",string4="VVVVxx" 539481600000000000 +tenk unique1=8165i,unique2=6244i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=165i,twothousand=165i,fivethous=3165i,tenthous=8165i,odd=130i,even=131i,stringu1="BCAAAA",stringu2="EGJAAA",string4="AAAAxx" 539568000000000000 +tenk unique1=7899i,unique2=6245i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=899i,twothousand=1899i,fivethous=2899i,tenthous=7899i,odd=198i,even=199i,stringu1="VRAAAA",stringu2="FGJAAA",string4="HHHHxx" 539654400000000000 +tenk unique1=8698i,unique2=6246i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=698i,twothousand=698i,fivethous=3698i,tenthous=8698i,odd=196i,even=197i,stringu1="OWAAAA",stringu2="GGJAAA",string4="OOOOxx" 539740800000000000 +tenk unique1=9270i,unique2=6247i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=270i,twothousand=1270i,fivethous=4270i,tenthous=9270i,odd=140i,even=141i,stringu1="OSAAAA",stringu2="HGJAAA",string4="VVVVxx" 539827200000000000 +tenk unique1=6348i,unique2=6248i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=348i,twothousand=348i,fivethous=1348i,tenthous=6348i,odd=96i,even=97i,stringu1="EKAAAA",stringu2="IGJAAA",string4="AAAAxx" 539913600000000000 +tenk unique1=6999i,unique2=6249i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=999i,twothousand=999i,fivethous=1999i,tenthous=6999i,odd=198i,even=199i,stringu1="FJAAAA",stringu2="JGJAAA",string4="HHHHxx" 540000000000000000 +tenk unique1=8467i,unique2=6250i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=467i,twothousand=467i,fivethous=3467i,tenthous=8467i,odd=134i,even=135i,stringu1="RNAAAA",stringu2="KGJAAA",string4="OOOOxx" 540086400000000000 +tenk unique1=3907i,unique2=6251i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=907i,twothousand=1907i,fivethous=3907i,tenthous=3907i,odd=14i,even=15i,stringu1="HUAAAA",stringu2="LGJAAA",string4="VVVVxx" 540172800000000000 +tenk unique1=4738i,unique2=6252i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=738i,twothousand=738i,fivethous=4738i,tenthous=4738i,odd=76i,even=77i,stringu1="GAAAAA",stringu2="MGJAAA",string4="AAAAxx" 540259200000000000 +tenk unique1=248i,unique2=6253i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=248i,twothousand=248i,fivethous=248i,tenthous=248i,odd=96i,even=97i,stringu1="OJAAAA",stringu2="NGJAAA",string4="HHHHxx" 540345600000000000 +tenk unique1=8769i,unique2=6254i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=769i,twothousand=769i,fivethous=3769i,tenthous=8769i,odd=138i,even=139i,stringu1="HZAAAA",stringu2="OGJAAA",string4="OOOOxx" 540432000000000000 +tenk unique1=9922i,unique2=6255i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=922i,twothousand=1922i,fivethous=4922i,tenthous=9922i,odd=44i,even=45i,stringu1="QRAAAA",stringu2="PGJAAA",string4="VVVVxx" 540518400000000000 +tenk unique1=778i,unique2=6256i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=778i,twothousand=778i,fivethous=778i,tenthous=778i,odd=156i,even=157i,stringu1="YDAAAA",stringu2="QGJAAA",string4="AAAAxx" 540604800000000000 +tenk unique1=1233i,unique2=6257i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=233i,twothousand=1233i,fivethous=1233i,tenthous=1233i,odd=66i,even=67i,stringu1="LVAAAA",stringu2="RGJAAA",string4="HHHHxx" 540691200000000000 +tenk unique1=1183i,unique2=6258i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=183i,twothousand=1183i,fivethous=1183i,tenthous=1183i,odd=166i,even=167i,stringu1="NTAAAA",stringu2="SGJAAA",string4="OOOOxx" 540777600000000000 +tenk unique1=2838i,unique2=6259i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=838i,twothousand=838i,fivethous=2838i,tenthous=2838i,odd=76i,even=77i,stringu1="EFAAAA",stringu2="TGJAAA",string4="VVVVxx" 540864000000000000 +tenk unique1=3096i,unique2=6260i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=96i,twothousand=1096i,fivethous=3096i,tenthous=3096i,odd=192i,even=193i,stringu1="CPAAAA",stringu2="UGJAAA",string4="AAAAxx" 540950400000000000 +tenk unique1=8566i,unique2=6261i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=566i,twothousand=566i,fivethous=3566i,tenthous=8566i,odd=132i,even=133i,stringu1="MRAAAA",stringu2="VGJAAA",string4="HHHHxx" 541036800000000000 +tenk unique1=7635i,unique2=6262i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=635i,twothousand=1635i,fivethous=2635i,tenthous=7635i,odd=70i,even=71i,stringu1="RHAAAA",stringu2="WGJAAA",string4="OOOOxx" 541123200000000000 +tenk unique1=5428i,unique2=6263i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=428i,twothousand=1428i,fivethous=428i,tenthous=5428i,odd=56i,even=57i,stringu1="UAAAAA",stringu2="XGJAAA",string4="VVVVxx" 541209600000000000 +tenk unique1=7430i,unique2=6264i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=430i,twothousand=1430i,fivethous=2430i,tenthous=7430i,odd=60i,even=61i,stringu1="UZAAAA",stringu2="YGJAAA",string4="AAAAxx" 541296000000000000 +tenk unique1=7210i,unique2=6265i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=210i,twothousand=1210i,fivethous=2210i,tenthous=7210i,odd=20i,even=21i,stringu1="IRAAAA",stringu2="ZGJAAA",string4="HHHHxx" 541382400000000000 +tenk unique1=4485i,unique2=6266i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=485i,twothousand=485i,fivethous=4485i,tenthous=4485i,odd=170i,even=171i,stringu1="NQAAAA",stringu2="AHJAAA",string4="OOOOxx" 541468800000000000 +tenk unique1=9623i,unique2=6267i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=623i,twothousand=1623i,fivethous=4623i,tenthous=9623i,odd=46i,even=47i,stringu1="DGAAAA",stringu2="BHJAAA",string4="VVVVxx" 541555200000000000 +tenk unique1=3670i,unique2=6268i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=670i,twothousand=1670i,fivethous=3670i,tenthous=3670i,odd=140i,even=141i,stringu1="ELAAAA",stringu2="CHJAAA",string4="AAAAxx" 541641600000000000 +tenk unique1=1575i,unique2=6269i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=575i,twothousand=1575i,fivethous=1575i,tenthous=1575i,odd=150i,even=151i,stringu1="PIAAAA",stringu2="DHJAAA",string4="HHHHxx" 541728000000000000 +tenk unique1=5874i,unique2=6270i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=874i,twothousand=1874i,fivethous=874i,tenthous=5874i,odd=148i,even=149i,stringu1="YRAAAA",stringu2="EHJAAA",string4="OOOOxx" 541814400000000000 +tenk unique1=673i,unique2=6271i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=673i,twothousand=673i,fivethous=673i,tenthous=673i,odd=146i,even=147i,stringu1="XZAAAA",stringu2="FHJAAA",string4="VVVVxx" 541900800000000000 +tenk unique1=9712i,unique2=6272i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=712i,twothousand=1712i,fivethous=4712i,tenthous=9712i,odd=24i,even=25i,stringu1="OJAAAA",stringu2="GHJAAA",string4="AAAAxx" 541987200000000000 +tenk unique1=7729i,unique2=6273i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=729i,twothousand=1729i,fivethous=2729i,tenthous=7729i,odd=58i,even=59i,stringu1="HLAAAA",stringu2="HHJAAA",string4="HHHHxx" 542073600000000000 +tenk unique1=4318i,unique2=6274i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=318i,twothousand=318i,fivethous=4318i,tenthous=4318i,odd=36i,even=37i,stringu1="CKAAAA",stringu2="IHJAAA",string4="OOOOxx" 542160000000000000 +tenk unique1=4143i,unique2=6275i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=143i,twothousand=143i,fivethous=4143i,tenthous=4143i,odd=86i,even=87i,stringu1="JDAAAA",stringu2="JHJAAA",string4="VVVVxx" 542246400000000000 +tenk unique1=4932i,unique2=6276i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=932i,twothousand=932i,fivethous=4932i,tenthous=4932i,odd=64i,even=65i,stringu1="SHAAAA",stringu2="KHJAAA",string4="AAAAxx" 542332800000000000 +tenk unique1=5835i,unique2=6277i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=835i,twothousand=1835i,fivethous=835i,tenthous=5835i,odd=70i,even=71i,stringu1="LQAAAA",stringu2="LHJAAA",string4="HHHHxx" 542419200000000000 +tenk unique1=4966i,unique2=6278i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=966i,twothousand=966i,fivethous=4966i,tenthous=4966i,odd=132i,even=133i,stringu1="AJAAAA",stringu2="MHJAAA",string4="OOOOxx" 542505600000000000 +tenk unique1=6711i,unique2=6279i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=711i,twothousand=711i,fivethous=1711i,tenthous=6711i,odd=22i,even=23i,stringu1="DYAAAA",stringu2="NHJAAA",string4="VVVVxx" 542592000000000000 +tenk unique1=3990i,unique2=6280i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=990i,twothousand=1990i,fivethous=3990i,tenthous=3990i,odd=180i,even=181i,stringu1="MXAAAA",stringu2="OHJAAA",string4="AAAAxx" 542678400000000000 +tenk unique1=990i,unique2=6281i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=990i,twothousand=990i,fivethous=990i,tenthous=990i,odd=180i,even=181i,stringu1="CMAAAA",stringu2="PHJAAA",string4="HHHHxx" 542764800000000000 +tenk unique1=220i,unique2=6282i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=220i,twothousand=220i,fivethous=220i,tenthous=220i,odd=40i,even=41i,stringu1="MIAAAA",stringu2="QHJAAA",string4="OOOOxx" 542851200000000000 +tenk unique1=5693i,unique2=6283i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=693i,twothousand=1693i,fivethous=693i,tenthous=5693i,odd=186i,even=187i,stringu1="ZKAAAA",stringu2="RHJAAA",string4="VVVVxx" 542937600000000000 +tenk unique1=3662i,unique2=6284i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=662i,twothousand=1662i,fivethous=3662i,tenthous=3662i,odd=124i,even=125i,stringu1="WKAAAA",stringu2="SHJAAA",string4="AAAAxx" 543024000000000000 +tenk unique1=7844i,unique2=6285i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=844i,twothousand=1844i,fivethous=2844i,tenthous=7844i,odd=88i,even=89i,stringu1="SPAAAA",stringu2="THJAAA",string4="HHHHxx" 543110400000000000 +tenk unique1=5515i,unique2=6286i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=515i,twothousand=1515i,fivethous=515i,tenthous=5515i,odd=30i,even=31i,stringu1="DEAAAA",stringu2="UHJAAA",string4="OOOOxx" 543196800000000000 +tenk unique1=5551i,unique2=6287i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=551i,twothousand=1551i,fivethous=551i,tenthous=5551i,odd=102i,even=103i,stringu1="NFAAAA",stringu2="VHJAAA",string4="VVVVxx" 543283200000000000 +tenk unique1=2358i,unique2=6288i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=358i,twothousand=358i,fivethous=2358i,tenthous=2358i,odd=116i,even=117i,stringu1="SMAAAA",stringu2="WHJAAA",string4="AAAAxx" 543369600000000000 +tenk unique1=8977i,unique2=6289i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=977i,twothousand=977i,fivethous=3977i,tenthous=8977i,odd=154i,even=155i,stringu1="HHAAAA",stringu2="XHJAAA",string4="HHHHxx" 543456000000000000 +tenk unique1=7040i,unique2=6290i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=40i,twothousand=1040i,fivethous=2040i,tenthous=7040i,odd=80i,even=81i,stringu1="UKAAAA",stringu2="YHJAAA",string4="OOOOxx" 543542400000000000 +tenk unique1=105i,unique2=6291i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=105i,twothousand=105i,fivethous=105i,tenthous=105i,odd=10i,even=11i,stringu1="BEAAAA",stringu2="ZHJAAA",string4="VVVVxx" 543628800000000000 +tenk unique1=4496i,unique2=6292i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=496i,twothousand=496i,fivethous=4496i,tenthous=4496i,odd=192i,even=193i,stringu1="YQAAAA",stringu2="AIJAAA",string4="AAAAxx" 543715200000000000 +tenk unique1=2254i,unique2=6293i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=254i,twothousand=254i,fivethous=2254i,tenthous=2254i,odd=108i,even=109i,stringu1="SIAAAA",stringu2="BIJAAA",string4="HHHHxx" 543801600000000000 +tenk unique1=411i,unique2=6294i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=411i,twothousand=411i,fivethous=411i,tenthous=411i,odd=22i,even=23i,stringu1="VPAAAA",stringu2="CIJAAA",string4="OOOOxx" 543888000000000000 +tenk unique1=2373i,unique2=6295i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=373i,twothousand=373i,fivethous=2373i,tenthous=2373i,odd=146i,even=147i,stringu1="HNAAAA",stringu2="DIJAAA",string4="VVVVxx" 543974400000000000 +tenk unique1=3477i,unique2=6296i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=477i,twothousand=1477i,fivethous=3477i,tenthous=3477i,odd=154i,even=155i,stringu1="TDAAAA",stringu2="EIJAAA",string4="AAAAxx" 544060800000000000 +tenk unique1=8964i,unique2=6297i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=964i,twothousand=964i,fivethous=3964i,tenthous=8964i,odd=128i,even=129i,stringu1="UGAAAA",stringu2="FIJAAA",string4="HHHHxx" 544147200000000000 +tenk unique1=8471i,unique2=6298i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=471i,twothousand=471i,fivethous=3471i,tenthous=8471i,odd=142i,even=143i,stringu1="VNAAAA",stringu2="GIJAAA",string4="OOOOxx" 544233600000000000 +tenk unique1=5776i,unique2=6299i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=776i,twothousand=1776i,fivethous=776i,tenthous=5776i,odd=152i,even=153i,stringu1="EOAAAA",stringu2="HIJAAA",string4="VVVVxx" 544320000000000000 +tenk unique1=9921i,unique2=6300i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=921i,twothousand=1921i,fivethous=4921i,tenthous=9921i,odd=42i,even=43i,stringu1="PRAAAA",stringu2="IIJAAA",string4="AAAAxx" 544406400000000000 +tenk unique1=7816i,unique2=6301i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=816i,twothousand=1816i,fivethous=2816i,tenthous=7816i,odd=32i,even=33i,stringu1="QOAAAA",stringu2="JIJAAA",string4="HHHHxx" 544492800000000000 +tenk unique1=2439i,unique2=6302i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=439i,twothousand=439i,fivethous=2439i,tenthous=2439i,odd=78i,even=79i,stringu1="VPAAAA",stringu2="KIJAAA",string4="OOOOxx" 544579200000000000 +tenk unique1=9298i,unique2=6303i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=298i,twothousand=1298i,fivethous=4298i,tenthous=9298i,odd=196i,even=197i,stringu1="QTAAAA",stringu2="LIJAAA",string4="VVVVxx" 544665600000000000 +tenk unique1=9424i,unique2=6304i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=424i,twothousand=1424i,fivethous=4424i,tenthous=9424i,odd=48i,even=49i,stringu1="MYAAAA",stringu2="MIJAAA",string4="AAAAxx" 544752000000000000 +tenk unique1=3252i,unique2=6305i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=252i,twothousand=1252i,fivethous=3252i,tenthous=3252i,odd=104i,even=105i,stringu1="CVAAAA",stringu2="NIJAAA",string4="HHHHxx" 544838400000000000 +tenk unique1=1401i,unique2=6306i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=401i,twothousand=1401i,fivethous=1401i,tenthous=1401i,odd=2i,even=3i,stringu1="XBAAAA",stringu2="OIJAAA",string4="OOOOxx" 544924800000000000 +tenk unique1=9632i,unique2=6307i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=632i,twothousand=1632i,fivethous=4632i,tenthous=9632i,odd=64i,even=65i,stringu1="MGAAAA",stringu2="PIJAAA",string4="VVVVxx" 545011200000000000 +tenk unique1=370i,unique2=6308i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=370i,twothousand=370i,fivethous=370i,tenthous=370i,odd=140i,even=141i,stringu1="GOAAAA",stringu2="QIJAAA",string4="AAAAxx" 545097600000000000 +tenk unique1=728i,unique2=6309i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=728i,twothousand=728i,fivethous=728i,tenthous=728i,odd=56i,even=57i,stringu1="ACAAAA",stringu2="RIJAAA",string4="HHHHxx" 545184000000000000 +tenk unique1=2888i,unique2=6310i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=888i,twothousand=888i,fivethous=2888i,tenthous=2888i,odd=176i,even=177i,stringu1="CHAAAA",stringu2="SIJAAA",string4="OOOOxx" 545270400000000000 +tenk unique1=1441i,unique2=6311i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=441i,twothousand=1441i,fivethous=1441i,tenthous=1441i,odd=82i,even=83i,stringu1="LDAAAA",stringu2="TIJAAA",string4="VVVVxx" 545356800000000000 +tenk unique1=8308i,unique2=6312i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=308i,twothousand=308i,fivethous=3308i,tenthous=8308i,odd=16i,even=17i,stringu1="OHAAAA",stringu2="UIJAAA",string4="AAAAxx" 545443200000000000 +tenk unique1=2165i,unique2=6313i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=165i,twothousand=165i,fivethous=2165i,tenthous=2165i,odd=130i,even=131i,stringu1="HFAAAA",stringu2="VIJAAA",string4="HHHHxx" 545529600000000000 +tenk unique1=6359i,unique2=6314i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=359i,twothousand=359i,fivethous=1359i,tenthous=6359i,odd=118i,even=119i,stringu1="PKAAAA",stringu2="WIJAAA",string4="OOOOxx" 545616000000000000 +tenk unique1=9637i,unique2=6315i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=637i,twothousand=1637i,fivethous=4637i,tenthous=9637i,odd=74i,even=75i,stringu1="RGAAAA",stringu2="XIJAAA",string4="VVVVxx" 545702400000000000 +tenk unique1=5208i,unique2=6316i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=208i,twothousand=1208i,fivethous=208i,tenthous=5208i,odd=16i,even=17i,stringu1="ISAAAA",stringu2="YIJAAA",string4="AAAAxx" 545788800000000000 +tenk unique1=4705i,unique2=6317i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=705i,twothousand=705i,fivethous=4705i,tenthous=4705i,odd=10i,even=11i,stringu1="ZYAAAA",stringu2="ZIJAAA",string4="HHHHxx" 545875200000000000 +tenk unique1=2341i,unique2=6318i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=341i,twothousand=341i,fivethous=2341i,tenthous=2341i,odd=82i,even=83i,stringu1="BMAAAA",stringu2="AJJAAA",string4="OOOOxx" 545961600000000000 +tenk unique1=8539i,unique2=6319i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=539i,twothousand=539i,fivethous=3539i,tenthous=8539i,odd=78i,even=79i,stringu1="LQAAAA",stringu2="BJJAAA",string4="VVVVxx" 546048000000000000 +tenk unique1=7528i,unique2=6320i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=528i,twothousand=1528i,fivethous=2528i,tenthous=7528i,odd=56i,even=57i,stringu1="ODAAAA",stringu2="CJJAAA",string4="AAAAxx" 546134400000000000 +tenk unique1=7969i,unique2=6321i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=969i,twothousand=1969i,fivethous=2969i,tenthous=7969i,odd=138i,even=139i,stringu1="NUAAAA",stringu2="DJJAAA",string4="HHHHxx" 546220800000000000 +tenk unique1=6381i,unique2=6322i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=381i,twothousand=381i,fivethous=1381i,tenthous=6381i,odd=162i,even=163i,stringu1="LLAAAA",stringu2="EJJAAA",string4="OOOOxx" 546307200000000000 +tenk unique1=4906i,unique2=6323i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=906i,twothousand=906i,fivethous=4906i,tenthous=4906i,odd=12i,even=13i,stringu1="SGAAAA",stringu2="FJJAAA",string4="VVVVxx" 546393600000000000 +tenk unique1=8697i,unique2=6324i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=697i,twothousand=697i,fivethous=3697i,tenthous=8697i,odd=194i,even=195i,stringu1="NWAAAA",stringu2="GJJAAA",string4="AAAAxx" 546480000000000000 +tenk unique1=6301i,unique2=6325i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=301i,twothousand=301i,fivethous=1301i,tenthous=6301i,odd=2i,even=3i,stringu1="JIAAAA",stringu2="HJJAAA",string4="HHHHxx" 546566400000000000 +tenk unique1=7554i,unique2=6326i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=554i,twothousand=1554i,fivethous=2554i,tenthous=7554i,odd=108i,even=109i,stringu1="OEAAAA",stringu2="IJJAAA",string4="OOOOxx" 546652800000000000 +tenk unique1=5107i,unique2=6327i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=107i,twothousand=1107i,fivethous=107i,tenthous=5107i,odd=14i,even=15i,stringu1="LOAAAA",stringu2="JJJAAA",string4="VVVVxx" 546739200000000000 +tenk unique1=5046i,unique2=6328i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=46i,twothousand=1046i,fivethous=46i,tenthous=5046i,odd=92i,even=93i,stringu1="CMAAAA",stringu2="KJJAAA",string4="AAAAxx" 546825600000000000 +tenk unique1=4063i,unique2=6329i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=63i,twothousand=63i,fivethous=4063i,tenthous=4063i,odd=126i,even=127i,stringu1="HAAAAA",stringu2="LJJAAA",string4="HHHHxx" 546912000000000000 +tenk unique1=7580i,unique2=6330i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=580i,twothousand=1580i,fivethous=2580i,tenthous=7580i,odd=160i,even=161i,stringu1="OFAAAA",stringu2="MJJAAA",string4="OOOOxx" 546998400000000000 +tenk unique1=2245i,unique2=6331i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=245i,twothousand=245i,fivethous=2245i,tenthous=2245i,odd=90i,even=91i,stringu1="JIAAAA",stringu2="NJJAAA",string4="VVVVxx" 547084800000000000 +tenk unique1=3711i,unique2=6332i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=711i,twothousand=1711i,fivethous=3711i,tenthous=3711i,odd=22i,even=23i,stringu1="TMAAAA",stringu2="OJJAAA",string4="AAAAxx" 547171200000000000 +tenk unique1=3220i,unique2=6333i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=220i,twothousand=1220i,fivethous=3220i,tenthous=3220i,odd=40i,even=41i,stringu1="WTAAAA",stringu2="PJJAAA",string4="HHHHxx" 547257600000000000 +tenk unique1=6463i,unique2=6334i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=463i,twothousand=463i,fivethous=1463i,tenthous=6463i,odd=126i,even=127i,stringu1="POAAAA",stringu2="QJJAAA",string4="OOOOxx" 547344000000000000 +tenk unique1=8196i,unique2=6335i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=196i,twothousand=196i,fivethous=3196i,tenthous=8196i,odd=192i,even=193i,stringu1="GDAAAA",stringu2="RJJAAA",string4="VVVVxx" 547430400000000000 +tenk unique1=9875i,unique2=6336i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=875i,twothousand=1875i,fivethous=4875i,tenthous=9875i,odd=150i,even=151i,stringu1="VPAAAA",stringu2="SJJAAA",string4="AAAAxx" 547516800000000000 +tenk unique1=1333i,unique2=6337i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=333i,twothousand=1333i,fivethous=1333i,tenthous=1333i,odd=66i,even=67i,stringu1="HZAAAA",stringu2="TJJAAA",string4="HHHHxx" 547603200000000000 +tenk unique1=7880i,unique2=6338i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=880i,twothousand=1880i,fivethous=2880i,tenthous=7880i,odd=160i,even=161i,stringu1="CRAAAA",stringu2="UJJAAA",string4="OOOOxx" 547689600000000000 +tenk unique1=2322i,unique2=6339i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=322i,twothousand=322i,fivethous=2322i,tenthous=2322i,odd=44i,even=45i,stringu1="ILAAAA",stringu2="VJJAAA",string4="VVVVxx" 547776000000000000 +tenk unique1=2163i,unique2=6340i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=163i,twothousand=163i,fivethous=2163i,tenthous=2163i,odd=126i,even=127i,stringu1="FFAAAA",stringu2="WJJAAA",string4="AAAAxx" 547862400000000000 +tenk unique1=421i,unique2=6341i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=421i,twothousand=421i,fivethous=421i,tenthous=421i,odd=42i,even=43i,stringu1="FQAAAA",stringu2="XJJAAA",string4="HHHHxx" 547948800000000000 +tenk unique1=2042i,unique2=6342i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=42i,twothousand=42i,fivethous=2042i,tenthous=2042i,odd=84i,even=85i,stringu1="OAAAAA",stringu2="YJJAAA",string4="OOOOxx" 548035200000000000 +tenk unique1=1424i,unique2=6343i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=424i,twothousand=1424i,fivethous=1424i,tenthous=1424i,odd=48i,even=49i,stringu1="UCAAAA",stringu2="ZJJAAA",string4="VVVVxx" 548121600000000000 +tenk unique1=7870i,unique2=6344i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=870i,twothousand=1870i,fivethous=2870i,tenthous=7870i,odd=140i,even=141i,stringu1="SQAAAA",stringu2="AKJAAA",string4="AAAAxx" 548208000000000000 +tenk unique1=2653i,unique2=6345i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=653i,twothousand=653i,fivethous=2653i,tenthous=2653i,odd=106i,even=107i,stringu1="BYAAAA",stringu2="BKJAAA",string4="HHHHxx" 548294400000000000 +tenk unique1=4216i,unique2=6346i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=216i,twothousand=216i,fivethous=4216i,tenthous=4216i,odd=32i,even=33i,stringu1="EGAAAA",stringu2="CKJAAA",string4="OOOOxx" 548380800000000000 +tenk unique1=1515i,unique2=6347i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=515i,twothousand=1515i,fivethous=1515i,tenthous=1515i,odd=30i,even=31i,stringu1="HGAAAA",stringu2="DKJAAA",string4="VVVVxx" 548467200000000000 +tenk unique1=7860i,unique2=6348i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=860i,twothousand=1860i,fivethous=2860i,tenthous=7860i,odd=120i,even=121i,stringu1="IQAAAA",stringu2="EKJAAA",string4="AAAAxx" 548553600000000000 +tenk unique1=2984i,unique2=6349i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=984i,twothousand=984i,fivethous=2984i,tenthous=2984i,odd=168i,even=169i,stringu1="UKAAAA",stringu2="FKJAAA",string4="HHHHxx" 548640000000000000 +tenk unique1=6269i,unique2=6350i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=269i,twothousand=269i,fivethous=1269i,tenthous=6269i,odd=138i,even=139i,stringu1="DHAAAA",stringu2="GKJAAA",string4="OOOOxx" 548726400000000000 +tenk unique1=2609i,unique2=6351i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=609i,twothousand=609i,fivethous=2609i,tenthous=2609i,odd=18i,even=19i,stringu1="JWAAAA",stringu2="HKJAAA",string4="VVVVxx" 548812800000000000 +tenk unique1=3671i,unique2=6352i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=671i,twothousand=1671i,fivethous=3671i,tenthous=3671i,odd=142i,even=143i,stringu1="FLAAAA",stringu2="IKJAAA",string4="AAAAxx" 548899200000000000 +tenk unique1=4544i,unique2=6353i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=544i,twothousand=544i,fivethous=4544i,tenthous=4544i,odd=88i,even=89i,stringu1="USAAAA",stringu2="JKJAAA",string4="HHHHxx" 548985600000000000 +tenk unique1=4668i,unique2=6354i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=668i,twothousand=668i,fivethous=4668i,tenthous=4668i,odd=136i,even=137i,stringu1="OXAAAA",stringu2="KKJAAA",string4="OOOOxx" 549072000000000000 +tenk unique1=2565i,unique2=6355i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=565i,twothousand=565i,fivethous=2565i,tenthous=2565i,odd=130i,even=131i,stringu1="RUAAAA",stringu2="LKJAAA",string4="VVVVxx" 549158400000000000 +tenk unique1=3126i,unique2=6356i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=126i,twothousand=1126i,fivethous=3126i,tenthous=3126i,odd=52i,even=53i,stringu1="GQAAAA",stringu2="MKJAAA",string4="AAAAxx" 549244800000000000 +tenk unique1=7573i,unique2=6357i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=573i,twothousand=1573i,fivethous=2573i,tenthous=7573i,odd=146i,even=147i,stringu1="HFAAAA",stringu2="NKJAAA",string4="HHHHxx" 549331200000000000 +tenk unique1=1476i,unique2=6358i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=476i,twothousand=1476i,fivethous=1476i,tenthous=1476i,odd=152i,even=153i,stringu1="UEAAAA",stringu2="OKJAAA",string4="OOOOxx" 549417600000000000 +tenk unique1=2146i,unique2=6359i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=146i,twothousand=146i,fivethous=2146i,tenthous=2146i,odd=92i,even=93i,stringu1="OEAAAA",stringu2="PKJAAA",string4="VVVVxx" 549504000000000000 +tenk unique1=9990i,unique2=6360i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=990i,twothousand=1990i,fivethous=4990i,tenthous=9990i,odd=180i,even=181i,stringu1="GUAAAA",stringu2="QKJAAA",string4="AAAAxx" 549590400000000000 +tenk unique1=2530i,unique2=6361i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=530i,twothousand=530i,fivethous=2530i,tenthous=2530i,odd=60i,even=61i,stringu1="ITAAAA",stringu2="RKJAAA",string4="HHHHxx" 549676800000000000 +tenk unique1=9288i,unique2=6362i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=288i,twothousand=1288i,fivethous=4288i,tenthous=9288i,odd=176i,even=177i,stringu1="GTAAAA",stringu2="SKJAAA",string4="OOOOxx" 549763200000000000 +tenk unique1=9755i,unique2=6363i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=755i,twothousand=1755i,fivethous=4755i,tenthous=9755i,odd=110i,even=111i,stringu1="FLAAAA",stringu2="TKJAAA",string4="VVVVxx" 549849600000000000 +tenk unique1=5305i,unique2=6364i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=305i,twothousand=1305i,fivethous=305i,tenthous=5305i,odd=10i,even=11i,stringu1="BWAAAA",stringu2="UKJAAA",string4="AAAAxx" 549936000000000000 +tenk unique1=2495i,unique2=6365i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=495i,twothousand=495i,fivethous=2495i,tenthous=2495i,odd=190i,even=191i,stringu1="ZRAAAA",stringu2="VKJAAA",string4="HHHHxx" 550022400000000000 +tenk unique1=5443i,unique2=6366i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=443i,twothousand=1443i,fivethous=443i,tenthous=5443i,odd=86i,even=87i,stringu1="JBAAAA",stringu2="WKJAAA",string4="OOOOxx" 550108800000000000 +tenk unique1=1930i,unique2=6367i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=930i,twothousand=1930i,fivethous=1930i,tenthous=1930i,odd=60i,even=61i,stringu1="GWAAAA",stringu2="XKJAAA",string4="VVVVxx" 550195200000000000 +tenk unique1=9134i,unique2=6368i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=134i,twothousand=1134i,fivethous=4134i,tenthous=9134i,odd=68i,even=69i,stringu1="INAAAA",stringu2="YKJAAA",string4="AAAAxx" 550281600000000000 +tenk unique1=2844i,unique2=6369i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=844i,twothousand=844i,fivethous=2844i,tenthous=2844i,odd=88i,even=89i,stringu1="KFAAAA",stringu2="ZKJAAA",string4="HHHHxx" 550368000000000000 +tenk unique1=896i,unique2=6370i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=896i,twothousand=896i,fivethous=896i,tenthous=896i,odd=192i,even=193i,stringu1="MIAAAA",stringu2="ALJAAA",string4="OOOOxx" 550454400000000000 +tenk unique1=1330i,unique2=6371i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=330i,twothousand=1330i,fivethous=1330i,tenthous=1330i,odd=60i,even=61i,stringu1="EZAAAA",stringu2="BLJAAA",string4="VVVVxx" 550540800000000000 +tenk unique1=8980i,unique2=6372i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=980i,twothousand=980i,fivethous=3980i,tenthous=8980i,odd=160i,even=161i,stringu1="KHAAAA",stringu2="CLJAAA",string4="AAAAxx" 550627200000000000 +tenk unique1=5940i,unique2=6373i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=940i,twothousand=1940i,fivethous=940i,tenthous=5940i,odd=80i,even=81i,stringu1="MUAAAA",stringu2="DLJAAA",string4="HHHHxx" 550713600000000000 +tenk unique1=6494i,unique2=6374i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=494i,twothousand=494i,fivethous=1494i,tenthous=6494i,odd=188i,even=189i,stringu1="UPAAAA",stringu2="ELJAAA",string4="OOOOxx" 550800000000000000 +tenk unique1=165i,unique2=6375i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=165i,twothousand=165i,fivethous=165i,tenthous=165i,odd=130i,even=131i,stringu1="JGAAAA",stringu2="FLJAAA",string4="VVVVxx" 550886400000000000 +tenk unique1=2510i,unique2=6376i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=510i,twothousand=510i,fivethous=2510i,tenthous=2510i,odd=20i,even=21i,stringu1="OSAAAA",stringu2="GLJAAA",string4="AAAAxx" 550972800000000000 +tenk unique1=9950i,unique2=6377i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=950i,twothousand=1950i,fivethous=4950i,tenthous=9950i,odd=100i,even=101i,stringu1="SSAAAA",stringu2="HLJAAA",string4="HHHHxx" 551059200000000000 +tenk unique1=3854i,unique2=6378i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=854i,twothousand=1854i,fivethous=3854i,tenthous=3854i,odd=108i,even=109i,stringu1="GSAAAA",stringu2="ILJAAA",string4="OOOOxx" 551145600000000000 +tenk unique1=7493i,unique2=6379i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=493i,twothousand=1493i,fivethous=2493i,tenthous=7493i,odd=186i,even=187i,stringu1="FCAAAA",stringu2="JLJAAA",string4="VVVVxx" 551232000000000000 +tenk unique1=4124i,unique2=6380i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=124i,twothousand=124i,fivethous=4124i,tenthous=4124i,odd=48i,even=49i,stringu1="QCAAAA",stringu2="KLJAAA",string4="AAAAxx" 551318400000000000 +tenk unique1=8563i,unique2=6381i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=563i,twothousand=563i,fivethous=3563i,tenthous=8563i,odd=126i,even=127i,stringu1="JRAAAA",stringu2="LLJAAA",string4="HHHHxx" 551404800000000000 +tenk unique1=8735i,unique2=6382i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=735i,twothousand=735i,fivethous=3735i,tenthous=8735i,odd=70i,even=71i,stringu1="ZXAAAA",stringu2="MLJAAA",string4="OOOOxx" 551491200000000000 +tenk unique1=9046i,unique2=6383i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=46i,twothousand=1046i,fivethous=4046i,tenthous=9046i,odd=92i,even=93i,stringu1="YJAAAA",stringu2="NLJAAA",string4="VVVVxx" 551577600000000000 +tenk unique1=1754i,unique2=6384i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=754i,twothousand=1754i,fivethous=1754i,tenthous=1754i,odd=108i,even=109i,stringu1="MPAAAA",stringu2="OLJAAA",string4="AAAAxx" 551664000000000000 +tenk unique1=6954i,unique2=6385i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=954i,twothousand=954i,fivethous=1954i,tenthous=6954i,odd=108i,even=109i,stringu1="MHAAAA",stringu2="PLJAAA",string4="HHHHxx" 551750400000000000 +tenk unique1=4953i,unique2=6386i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=953i,twothousand=953i,fivethous=4953i,tenthous=4953i,odd=106i,even=107i,stringu1="NIAAAA",stringu2="QLJAAA",string4="OOOOxx" 551836800000000000 +tenk unique1=8142i,unique2=6387i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=142i,twothousand=142i,fivethous=3142i,tenthous=8142i,odd=84i,even=85i,stringu1="EBAAAA",stringu2="RLJAAA",string4="VVVVxx" 551923200000000000 +tenk unique1=9661i,unique2=6388i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=661i,twothousand=1661i,fivethous=4661i,tenthous=9661i,odd=122i,even=123i,stringu1="PHAAAA",stringu2="SLJAAA",string4="AAAAxx" 552009600000000000 +tenk unique1=6415i,unique2=6389i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=415i,twothousand=415i,fivethous=1415i,tenthous=6415i,odd=30i,even=31i,stringu1="TMAAAA",stringu2="TLJAAA",string4="HHHHxx" 552096000000000000 +tenk unique1=5782i,unique2=6390i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=782i,twothousand=1782i,fivethous=782i,tenthous=5782i,odd=164i,even=165i,stringu1="KOAAAA",stringu2="ULJAAA",string4="OOOOxx" 552182400000000000 +tenk unique1=7721i,unique2=6391i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=721i,twothousand=1721i,fivethous=2721i,tenthous=7721i,odd=42i,even=43i,stringu1="ZKAAAA",stringu2="VLJAAA",string4="VVVVxx" 552268800000000000 +tenk unique1=580i,unique2=6392i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=580i,twothousand=580i,fivethous=580i,tenthous=580i,odd=160i,even=161i,stringu1="IWAAAA",stringu2="WLJAAA",string4="AAAAxx" 552355200000000000 +tenk unique1=3784i,unique2=6393i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=784i,twothousand=1784i,fivethous=3784i,tenthous=3784i,odd=168i,even=169i,stringu1="OPAAAA",stringu2="XLJAAA",string4="HHHHxx" 552441600000000000 +tenk unique1=9810i,unique2=6394i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=810i,twothousand=1810i,fivethous=4810i,tenthous=9810i,odd=20i,even=21i,stringu1="INAAAA",stringu2="YLJAAA",string4="OOOOxx" 552528000000000000 +tenk unique1=8488i,unique2=6395i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=488i,twothousand=488i,fivethous=3488i,tenthous=8488i,odd=176i,even=177i,stringu1="MOAAAA",stringu2="ZLJAAA",string4="VVVVxx" 552614400000000000 +tenk unique1=6214i,unique2=6396i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=214i,twothousand=214i,fivethous=1214i,tenthous=6214i,odd=28i,even=29i,stringu1="AFAAAA",stringu2="AMJAAA",string4="AAAAxx" 552700800000000000 +tenk unique1=9433i,unique2=6397i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=433i,twothousand=1433i,fivethous=4433i,tenthous=9433i,odd=66i,even=67i,stringu1="VYAAAA",stringu2="BMJAAA",string4="HHHHxx" 552787200000000000 +tenk unique1=9959i,unique2=6398i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=959i,twothousand=1959i,fivethous=4959i,tenthous=9959i,odd=118i,even=119i,stringu1="BTAAAA",stringu2="CMJAAA",string4="OOOOxx" 552873600000000000 +tenk unique1=554i,unique2=6399i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=554i,twothousand=554i,fivethous=554i,tenthous=554i,odd=108i,even=109i,stringu1="IVAAAA",stringu2="DMJAAA",string4="VVVVxx" 552960000000000000 +tenk unique1=6646i,unique2=6400i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=646i,twothousand=646i,fivethous=1646i,tenthous=6646i,odd=92i,even=93i,stringu1="QVAAAA",stringu2="EMJAAA",string4="AAAAxx" 553046400000000000 +tenk unique1=1138i,unique2=6401i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=138i,twothousand=1138i,fivethous=1138i,tenthous=1138i,odd=76i,even=77i,stringu1="URAAAA",stringu2="FMJAAA",string4="HHHHxx" 553132800000000000 +tenk unique1=9331i,unique2=6402i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=331i,twothousand=1331i,fivethous=4331i,tenthous=9331i,odd=62i,even=63i,stringu1="XUAAAA",stringu2="GMJAAA",string4="OOOOxx" 553219200000000000 +tenk unique1=7331i,unique2=6403i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=331i,twothousand=1331i,fivethous=2331i,tenthous=7331i,odd=62i,even=63i,stringu1="ZVAAAA",stringu2="HMJAAA",string4="VVVVxx" 553305600000000000 +tenk unique1=3482i,unique2=6404i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=482i,twothousand=1482i,fivethous=3482i,tenthous=3482i,odd=164i,even=165i,stringu1="YDAAAA",stringu2="IMJAAA",string4="AAAAxx" 553392000000000000 +tenk unique1=3795i,unique2=6405i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=795i,twothousand=1795i,fivethous=3795i,tenthous=3795i,odd=190i,even=191i,stringu1="ZPAAAA",stringu2="JMJAAA",string4="HHHHxx" 553478400000000000 +tenk unique1=2441i,unique2=6406i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=441i,twothousand=441i,fivethous=2441i,tenthous=2441i,odd=82i,even=83i,stringu1="XPAAAA",stringu2="KMJAAA",string4="OOOOxx" 553564800000000000 +tenk unique1=5229i,unique2=6407i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=229i,twothousand=1229i,fivethous=229i,tenthous=5229i,odd=58i,even=59i,stringu1="DTAAAA",stringu2="LMJAAA",string4="VVVVxx" 553651200000000000 +tenk unique1=7012i,unique2=6408i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=12i,twothousand=1012i,fivethous=2012i,tenthous=7012i,odd=24i,even=25i,stringu1="SJAAAA",stringu2="MMJAAA",string4="AAAAxx" 553737600000000000 +tenk unique1=7036i,unique2=6409i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=36i,twothousand=1036i,fivethous=2036i,tenthous=7036i,odd=72i,even=73i,stringu1="QKAAAA",stringu2="NMJAAA",string4="HHHHxx" 553824000000000000 +tenk unique1=8243i,unique2=6410i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=243i,twothousand=243i,fivethous=3243i,tenthous=8243i,odd=86i,even=87i,stringu1="BFAAAA",stringu2="OMJAAA",string4="OOOOxx" 553910400000000000 +tenk unique1=9320i,unique2=6411i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=320i,twothousand=1320i,fivethous=4320i,tenthous=9320i,odd=40i,even=41i,stringu1="MUAAAA",stringu2="PMJAAA",string4="VVVVxx" 553996800000000000 +tenk unique1=4693i,unique2=6412i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=693i,twothousand=693i,fivethous=4693i,tenthous=4693i,odd=186i,even=187i,stringu1="NYAAAA",stringu2="QMJAAA",string4="AAAAxx" 554083200000000000 +tenk unique1=6741i,unique2=6413i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=741i,twothousand=741i,fivethous=1741i,tenthous=6741i,odd=82i,even=83i,stringu1="HZAAAA",stringu2="RMJAAA",string4="HHHHxx" 554169600000000000 +tenk unique1=2997i,unique2=6414i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=997i,twothousand=997i,fivethous=2997i,tenthous=2997i,odd=194i,even=195i,stringu1="HLAAAA",stringu2="SMJAAA",string4="OOOOxx" 554256000000000000 +tenk unique1=4838i,unique2=6415i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=838i,twothousand=838i,fivethous=4838i,tenthous=4838i,odd=76i,even=77i,stringu1="CEAAAA",stringu2="TMJAAA",string4="VVVVxx" 554342400000000000 +tenk unique1=6945i,unique2=6416i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=945i,twothousand=945i,fivethous=1945i,tenthous=6945i,odd=90i,even=91i,stringu1="DHAAAA",stringu2="UMJAAA",string4="AAAAxx" 554428800000000000 +tenk unique1=8253i,unique2=6417i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=253i,twothousand=253i,fivethous=3253i,tenthous=8253i,odd=106i,even=107i,stringu1="LFAAAA",stringu2="VMJAAA",string4="HHHHxx" 554515200000000000 +tenk unique1=8989i,unique2=6418i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=989i,twothousand=989i,fivethous=3989i,tenthous=8989i,odd=178i,even=179i,stringu1="THAAAA",stringu2="WMJAAA",string4="OOOOxx" 554601600000000000 +tenk unique1=2640i,unique2=6419i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=640i,twothousand=640i,fivethous=2640i,tenthous=2640i,odd=80i,even=81i,stringu1="OXAAAA",stringu2="XMJAAA",string4="VVVVxx" 554688000000000000 +tenk unique1=5647i,unique2=6420i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=647i,twothousand=1647i,fivethous=647i,tenthous=5647i,odd=94i,even=95i,stringu1="FJAAAA",stringu2="YMJAAA",string4="AAAAxx" 554774400000000000 +tenk unique1=7186i,unique2=6421i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=186i,twothousand=1186i,fivethous=2186i,tenthous=7186i,odd=172i,even=173i,stringu1="KQAAAA",stringu2="ZMJAAA",string4="HHHHxx" 554860800000000000 +tenk unique1=3278i,unique2=6422i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=278i,twothousand=1278i,fivethous=3278i,tenthous=3278i,odd=156i,even=157i,stringu1="CWAAAA",stringu2="ANJAAA",string4="OOOOxx" 554947200000000000 +tenk unique1=8546i,unique2=6423i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=546i,twothousand=546i,fivethous=3546i,tenthous=8546i,odd=92i,even=93i,stringu1="SQAAAA",stringu2="BNJAAA",string4="VVVVxx" 555033600000000000 +tenk unique1=8297i,unique2=6424i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=297i,twothousand=297i,fivethous=3297i,tenthous=8297i,odd=194i,even=195i,stringu1="DHAAAA",stringu2="CNJAAA",string4="AAAAxx" 555120000000000000 +tenk unique1=9534i,unique2=6425i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=534i,twothousand=1534i,fivethous=4534i,tenthous=9534i,odd=68i,even=69i,stringu1="SCAAAA",stringu2="DNJAAA",string4="HHHHxx" 555206400000000000 +tenk unique1=9618i,unique2=6426i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=618i,twothousand=1618i,fivethous=4618i,tenthous=9618i,odd=36i,even=37i,stringu1="YFAAAA",stringu2="ENJAAA",string4="OOOOxx" 555292800000000000 +tenk unique1=8839i,unique2=6427i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=839i,twothousand=839i,fivethous=3839i,tenthous=8839i,odd=78i,even=79i,stringu1="ZBAAAA",stringu2="FNJAAA",string4="VVVVxx" 555379200000000000 +tenk unique1=7605i,unique2=6428i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=605i,twothousand=1605i,fivethous=2605i,tenthous=7605i,odd=10i,even=11i,stringu1="NGAAAA",stringu2="GNJAAA",string4="AAAAxx" 555465600000000000 +tenk unique1=6421i,unique2=6429i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=421i,twothousand=421i,fivethous=1421i,tenthous=6421i,odd=42i,even=43i,stringu1="ZMAAAA",stringu2="HNJAAA",string4="HHHHxx" 555552000000000000 +tenk unique1=3582i,unique2=6430i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=582i,twothousand=1582i,fivethous=3582i,tenthous=3582i,odd=164i,even=165i,stringu1="UHAAAA",stringu2="INJAAA",string4="OOOOxx" 555638400000000000 +tenk unique1=485i,unique2=6431i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=485i,twothousand=485i,fivethous=485i,tenthous=485i,odd=170i,even=171i,stringu1="RSAAAA",stringu2="JNJAAA",string4="VVVVxx" 555724800000000000 +tenk unique1=1925i,unique2=6432i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=925i,twothousand=1925i,fivethous=1925i,tenthous=1925i,odd=50i,even=51i,stringu1="BWAAAA",stringu2="KNJAAA",string4="AAAAxx" 555811200000000000 +tenk unique1=4296i,unique2=6433i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=296i,twothousand=296i,fivethous=4296i,tenthous=4296i,odd=192i,even=193i,stringu1="GJAAAA",stringu2="LNJAAA",string4="HHHHxx" 555897600000000000 +tenk unique1=8874i,unique2=6434i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=874i,twothousand=874i,fivethous=3874i,tenthous=8874i,odd=148i,even=149i,stringu1="IDAAAA",stringu2="MNJAAA",string4="OOOOxx" 555984000000000000 +tenk unique1=1443i,unique2=6435i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=443i,twothousand=1443i,fivethous=1443i,tenthous=1443i,odd=86i,even=87i,stringu1="NDAAAA",stringu2="NNJAAA",string4="VVVVxx" 556070400000000000 +tenk unique1=4239i,unique2=6436i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=239i,twothousand=239i,fivethous=4239i,tenthous=4239i,odd=78i,even=79i,stringu1="BHAAAA",stringu2="ONJAAA",string4="AAAAxx" 556156800000000000 +tenk unique1=9760i,unique2=6437i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=760i,twothousand=1760i,fivethous=4760i,tenthous=9760i,odd=120i,even=121i,stringu1="KLAAAA",stringu2="PNJAAA",string4="HHHHxx" 556243200000000000 +tenk unique1=136i,unique2=6438i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=136i,twothousand=136i,fivethous=136i,tenthous=136i,odd=72i,even=73i,stringu1="GFAAAA",stringu2="QNJAAA",string4="OOOOxx" 556329600000000000 +tenk unique1=6472i,unique2=6439i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=472i,twothousand=472i,fivethous=1472i,tenthous=6472i,odd=144i,even=145i,stringu1="YOAAAA",stringu2="RNJAAA",string4="VVVVxx" 556416000000000000 +tenk unique1=4896i,unique2=6440i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=896i,twothousand=896i,fivethous=4896i,tenthous=4896i,odd=192i,even=193i,stringu1="IGAAAA",stringu2="SNJAAA",string4="AAAAxx" 556502400000000000 +tenk unique1=9028i,unique2=6441i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=28i,twothousand=1028i,fivethous=4028i,tenthous=9028i,odd=56i,even=57i,stringu1="GJAAAA",stringu2="TNJAAA",string4="HHHHxx" 556588800000000000 +tenk unique1=8354i,unique2=6442i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=354i,twothousand=354i,fivethous=3354i,tenthous=8354i,odd=108i,even=109i,stringu1="IJAAAA",stringu2="UNJAAA",string4="OOOOxx" 556675200000000000 +tenk unique1=8648i,unique2=6443i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=648i,twothousand=648i,fivethous=3648i,tenthous=8648i,odd=96i,even=97i,stringu1="QUAAAA",stringu2="VNJAAA",string4="VVVVxx" 556761600000000000 +tenk unique1=918i,unique2=6444i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=918i,twothousand=918i,fivethous=918i,tenthous=918i,odd=36i,even=37i,stringu1="IJAAAA",stringu2="WNJAAA",string4="AAAAxx" 556848000000000000 +tenk unique1=6606i,unique2=6445i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=606i,twothousand=606i,fivethous=1606i,tenthous=6606i,odd=12i,even=13i,stringu1="CUAAAA",stringu2="XNJAAA",string4="HHHHxx" 556934400000000000 +tenk unique1=2462i,unique2=6446i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=462i,twothousand=462i,fivethous=2462i,tenthous=2462i,odd=124i,even=125i,stringu1="SQAAAA",stringu2="YNJAAA",string4="OOOOxx" 557020800000000000 +tenk unique1=7536i,unique2=6447i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=536i,twothousand=1536i,fivethous=2536i,tenthous=7536i,odd=72i,even=73i,stringu1="WDAAAA",stringu2="ZNJAAA",string4="VVVVxx" 557107200000000000 +tenk unique1=1700i,unique2=6448i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=700i,twothousand=1700i,fivethous=1700i,tenthous=1700i,odd=0i,even=1i,stringu1="KNAAAA",stringu2="AOJAAA",string4="AAAAxx" 557193600000000000 +tenk unique1=6740i,unique2=6449i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=740i,twothousand=740i,fivethous=1740i,tenthous=6740i,odd=80i,even=81i,stringu1="GZAAAA",stringu2="BOJAAA",string4="HHHHxx" 557280000000000000 +tenk unique1=28i,unique2=6450i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=28i,twothousand=28i,fivethous=28i,tenthous=28i,odd=56i,even=57i,stringu1="CBAAAA",stringu2="COJAAA",string4="OOOOxx" 557366400000000000 +tenk unique1=6044i,unique2=6451i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=44i,twothousand=44i,fivethous=1044i,tenthous=6044i,odd=88i,even=89i,stringu1="MYAAAA",stringu2="DOJAAA",string4="VVVVxx" 557452800000000000 +tenk unique1=5053i,unique2=6452i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=53i,twothousand=1053i,fivethous=53i,tenthous=5053i,odd=106i,even=107i,stringu1="JMAAAA",stringu2="EOJAAA",string4="AAAAxx" 557539200000000000 +tenk unique1=4832i,unique2=6453i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=832i,twothousand=832i,fivethous=4832i,tenthous=4832i,odd=64i,even=65i,stringu1="WDAAAA",stringu2="FOJAAA",string4="HHHHxx" 557625600000000000 +tenk unique1=9145i,unique2=6454i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=145i,twothousand=1145i,fivethous=4145i,tenthous=9145i,odd=90i,even=91i,stringu1="TNAAAA",stringu2="GOJAAA",string4="OOOOxx" 557712000000000000 +tenk unique1=5482i,unique2=6455i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=482i,twothousand=1482i,fivethous=482i,tenthous=5482i,odd=164i,even=165i,stringu1="WCAAAA",stringu2="HOJAAA",string4="VVVVxx" 557798400000000000 +tenk unique1=7644i,unique2=6456i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=644i,twothousand=1644i,fivethous=2644i,tenthous=7644i,odd=88i,even=89i,stringu1="AIAAAA",stringu2="IOJAAA",string4="AAAAxx" 557884800000000000 +tenk unique1=2128i,unique2=6457i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=128i,twothousand=128i,fivethous=2128i,tenthous=2128i,odd=56i,even=57i,stringu1="WDAAAA",stringu2="JOJAAA",string4="HHHHxx" 557971200000000000 +tenk unique1=6583i,unique2=6458i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=583i,twothousand=583i,fivethous=1583i,tenthous=6583i,odd=166i,even=167i,stringu1="FTAAAA",stringu2="KOJAAA",string4="OOOOxx" 558057600000000000 +tenk unique1=4224i,unique2=6459i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=224i,twothousand=224i,fivethous=4224i,tenthous=4224i,odd=48i,even=49i,stringu1="MGAAAA",stringu2="LOJAAA",string4="VVVVxx" 558144000000000000 +tenk unique1=5253i,unique2=6460i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=253i,twothousand=1253i,fivethous=253i,tenthous=5253i,odd=106i,even=107i,stringu1="BUAAAA",stringu2="MOJAAA",string4="AAAAxx" 558230400000000000 +tenk unique1=8219i,unique2=6461i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=219i,twothousand=219i,fivethous=3219i,tenthous=8219i,odd=38i,even=39i,stringu1="DEAAAA",stringu2="NOJAAA",string4="HHHHxx" 558316800000000000 +tenk unique1=8113i,unique2=6462i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=113i,twothousand=113i,fivethous=3113i,tenthous=8113i,odd=26i,even=27i,stringu1="BAAAAA",stringu2="OOJAAA",string4="OOOOxx" 558403200000000000 +tenk unique1=3616i,unique2=6463i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=616i,twothousand=1616i,fivethous=3616i,tenthous=3616i,odd=32i,even=33i,stringu1="CJAAAA",stringu2="POJAAA",string4="VVVVxx" 558489600000000000 +tenk unique1=1361i,unique2=6464i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=361i,twothousand=1361i,fivethous=1361i,tenthous=1361i,odd=122i,even=123i,stringu1="JAAAAA",stringu2="QOJAAA",string4="AAAAxx" 558576000000000000 +tenk unique1=949i,unique2=6465i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=949i,twothousand=949i,fivethous=949i,tenthous=949i,odd=98i,even=99i,stringu1="NKAAAA",stringu2="ROJAAA",string4="HHHHxx" 558662400000000000 +tenk unique1=8582i,unique2=6466i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=582i,twothousand=582i,fivethous=3582i,tenthous=8582i,odd=164i,even=165i,stringu1="CSAAAA",stringu2="SOJAAA",string4="OOOOxx" 558748800000000000 +tenk unique1=5104i,unique2=6467i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=104i,twothousand=1104i,fivethous=104i,tenthous=5104i,odd=8i,even=9i,stringu1="IOAAAA",stringu2="TOJAAA",string4="VVVVxx" 558835200000000000 +tenk unique1=6146i,unique2=6468i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=146i,twothousand=146i,fivethous=1146i,tenthous=6146i,odd=92i,even=93i,stringu1="KCAAAA",stringu2="UOJAAA",string4="AAAAxx" 558921600000000000 +tenk unique1=7681i,unique2=6469i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=681i,twothousand=1681i,fivethous=2681i,tenthous=7681i,odd=162i,even=163i,stringu1="LJAAAA",stringu2="VOJAAA",string4="HHHHxx" 559008000000000000 +tenk unique1=1904i,unique2=6470i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=904i,twothousand=1904i,fivethous=1904i,tenthous=1904i,odd=8i,even=9i,stringu1="GVAAAA",stringu2="WOJAAA",string4="OOOOxx" 559094400000000000 +tenk unique1=1989i,unique2=6471i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=989i,twothousand=1989i,fivethous=1989i,tenthous=1989i,odd=178i,even=179i,stringu1="NYAAAA",stringu2="XOJAAA",string4="VVVVxx" 559180800000000000 +tenk unique1=4179i,unique2=6472i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=179i,twothousand=179i,fivethous=4179i,tenthous=4179i,odd=158i,even=159i,stringu1="TEAAAA",stringu2="YOJAAA",string4="AAAAxx" 559267200000000000 +tenk unique1=1739i,unique2=6473i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=739i,twothousand=1739i,fivethous=1739i,tenthous=1739i,odd=78i,even=79i,stringu1="XOAAAA",stringu2="ZOJAAA",string4="HHHHxx" 559353600000000000 +tenk unique1=2447i,unique2=6474i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=447i,twothousand=447i,fivethous=2447i,tenthous=2447i,odd=94i,even=95i,stringu1="DQAAAA",stringu2="APJAAA",string4="OOOOxx" 559440000000000000 +tenk unique1=3029i,unique2=6475i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=29i,twothousand=1029i,fivethous=3029i,tenthous=3029i,odd=58i,even=59i,stringu1="NMAAAA",stringu2="BPJAAA",string4="VVVVxx" 559526400000000000 +tenk unique1=9783i,unique2=6476i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=783i,twothousand=1783i,fivethous=4783i,tenthous=9783i,odd=166i,even=167i,stringu1="HMAAAA",stringu2="CPJAAA",string4="AAAAxx" 559612800000000000 +tenk unique1=8381i,unique2=6477i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=381i,twothousand=381i,fivethous=3381i,tenthous=8381i,odd=162i,even=163i,stringu1="JKAAAA",stringu2="DPJAAA",string4="HHHHxx" 559699200000000000 +tenk unique1=8755i,unique2=6478i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=755i,twothousand=755i,fivethous=3755i,tenthous=8755i,odd=110i,even=111i,stringu1="TYAAAA",stringu2="EPJAAA",string4="OOOOxx" 559785600000000000 +tenk unique1=8384i,unique2=6479i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=384i,twothousand=384i,fivethous=3384i,tenthous=8384i,odd=168i,even=169i,stringu1="MKAAAA",stringu2="FPJAAA",string4="VVVVxx" 559872000000000000 +tenk unique1=7655i,unique2=6480i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=655i,twothousand=1655i,fivethous=2655i,tenthous=7655i,odd=110i,even=111i,stringu1="LIAAAA",stringu2="GPJAAA",string4="AAAAxx" 559958400000000000 +tenk unique1=4766i,unique2=6481i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=766i,twothousand=766i,fivethous=4766i,tenthous=4766i,odd=132i,even=133i,stringu1="IBAAAA",stringu2="HPJAAA",string4="HHHHxx" 560044800000000000 +tenk unique1=3324i,unique2=6482i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=324i,twothousand=1324i,fivethous=3324i,tenthous=3324i,odd=48i,even=49i,stringu1="WXAAAA",stringu2="IPJAAA",string4="OOOOxx" 560131200000000000 +tenk unique1=5022i,unique2=6483i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=22i,twothousand=1022i,fivethous=22i,tenthous=5022i,odd=44i,even=45i,stringu1="ELAAAA",stringu2="JPJAAA",string4="VVVVxx" 560217600000000000 +tenk unique1=2856i,unique2=6484i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=856i,twothousand=856i,fivethous=2856i,tenthous=2856i,odd=112i,even=113i,stringu1="WFAAAA",stringu2="KPJAAA",string4="AAAAxx" 560304000000000000 +tenk unique1=6503i,unique2=6485i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=503i,twothousand=503i,fivethous=1503i,tenthous=6503i,odd=6i,even=7i,stringu1="DQAAAA",stringu2="LPJAAA",string4="HHHHxx" 560390400000000000 +tenk unique1=6872i,unique2=6486i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=872i,twothousand=872i,fivethous=1872i,tenthous=6872i,odd=144i,even=145i,stringu1="IEAAAA",stringu2="MPJAAA",string4="OOOOxx" 560476800000000000 +tenk unique1=1663i,unique2=6487i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=663i,twothousand=1663i,fivethous=1663i,tenthous=1663i,odd=126i,even=127i,stringu1="ZLAAAA",stringu2="NPJAAA",string4="VVVVxx" 560563200000000000 +tenk unique1=6964i,unique2=6488i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=964i,twothousand=964i,fivethous=1964i,tenthous=6964i,odd=128i,even=129i,stringu1="WHAAAA",stringu2="OPJAAA",string4="AAAAxx" 560649600000000000 +tenk unique1=4622i,unique2=6489i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=622i,twothousand=622i,fivethous=4622i,tenthous=4622i,odd=44i,even=45i,stringu1="UVAAAA",stringu2="PPJAAA",string4="HHHHxx" 560736000000000000 +tenk unique1=6089i,unique2=6490i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=89i,twothousand=89i,fivethous=1089i,tenthous=6089i,odd=178i,even=179i,stringu1="FAAAAA",stringu2="QPJAAA",string4="OOOOxx" 560822400000000000 +tenk unique1=8567i,unique2=6491i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=567i,twothousand=567i,fivethous=3567i,tenthous=8567i,odd=134i,even=135i,stringu1="NRAAAA",stringu2="RPJAAA",string4="VVVVxx" 560908800000000000 +tenk unique1=597i,unique2=6492i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=597i,twothousand=597i,fivethous=597i,tenthous=597i,odd=194i,even=195i,stringu1="ZWAAAA",stringu2="SPJAAA",string4="AAAAxx" 560995200000000000 +tenk unique1=4222i,unique2=6493i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=222i,twothousand=222i,fivethous=4222i,tenthous=4222i,odd=44i,even=45i,stringu1="KGAAAA",stringu2="TPJAAA",string4="HHHHxx" 561081600000000000 +tenk unique1=9322i,unique2=6494i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=322i,twothousand=1322i,fivethous=4322i,tenthous=9322i,odd=44i,even=45i,stringu1="OUAAAA",stringu2="UPJAAA",string4="OOOOxx" 561168000000000000 +tenk unique1=624i,unique2=6495i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=624i,twothousand=624i,fivethous=624i,tenthous=624i,odd=48i,even=49i,stringu1="AYAAAA",stringu2="VPJAAA",string4="VVVVxx" 561254400000000000 +tenk unique1=4329i,unique2=6496i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=329i,twothousand=329i,fivethous=4329i,tenthous=4329i,odd=58i,even=59i,stringu1="NKAAAA",stringu2="WPJAAA",string4="AAAAxx" 561340800000000000 +tenk unique1=6781i,unique2=6497i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=781i,twothousand=781i,fivethous=1781i,tenthous=6781i,odd=162i,even=163i,stringu1="VAAAAA",stringu2="XPJAAA",string4="HHHHxx" 561427200000000000 +tenk unique1=1673i,unique2=6498i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=673i,twothousand=1673i,fivethous=1673i,tenthous=1673i,odd=146i,even=147i,stringu1="JMAAAA",stringu2="YPJAAA",string4="OOOOxx" 561513600000000000 +tenk unique1=6633i,unique2=6499i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=633i,twothousand=633i,fivethous=1633i,tenthous=6633i,odd=66i,even=67i,stringu1="DVAAAA",stringu2="ZPJAAA",string4="VVVVxx" 561600000000000000 +tenk unique1=2569i,unique2=6500i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=569i,twothousand=569i,fivethous=2569i,tenthous=2569i,odd=138i,even=139i,stringu1="VUAAAA",stringu2="AQJAAA",string4="AAAAxx" 561686400000000000 +tenk unique1=4995i,unique2=6501i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=995i,twothousand=995i,fivethous=4995i,tenthous=4995i,odd=190i,even=191i,stringu1="DKAAAA",stringu2="BQJAAA",string4="HHHHxx" 561772800000000000 +tenk unique1=2749i,unique2=6502i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=749i,twothousand=749i,fivethous=2749i,tenthous=2749i,odd=98i,even=99i,stringu1="TBAAAA",stringu2="CQJAAA",string4="OOOOxx" 561859200000000000 +tenk unique1=9044i,unique2=6503i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=44i,twothousand=1044i,fivethous=4044i,tenthous=9044i,odd=88i,even=89i,stringu1="WJAAAA",stringu2="DQJAAA",string4="VVVVxx" 561945600000000000 +tenk unique1=5823i,unique2=6504i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=823i,twothousand=1823i,fivethous=823i,tenthous=5823i,odd=46i,even=47i,stringu1="ZPAAAA",stringu2="EQJAAA",string4="AAAAxx" 562032000000000000 +tenk unique1=9366i,unique2=6505i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=366i,twothousand=1366i,fivethous=4366i,tenthous=9366i,odd=132i,even=133i,stringu1="GWAAAA",stringu2="FQJAAA",string4="HHHHxx" 562118400000000000 +tenk unique1=1169i,unique2=6506i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=169i,twothousand=1169i,fivethous=1169i,tenthous=1169i,odd=138i,even=139i,stringu1="ZSAAAA",stringu2="GQJAAA",string4="OOOOxx" 562204800000000000 +tenk unique1=1300i,unique2=6507i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=300i,twothousand=1300i,fivethous=1300i,tenthous=1300i,odd=0i,even=1i,stringu1="AYAAAA",stringu2="HQJAAA",string4="VVVVxx" 562291200000000000 +tenk unique1=9973i,unique2=6508i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=973i,twothousand=1973i,fivethous=4973i,tenthous=9973i,odd=146i,even=147i,stringu1="PTAAAA",stringu2="IQJAAA",string4="AAAAxx" 562377600000000000 +tenk unique1=2092i,unique2=6509i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=92i,twothousand=92i,fivethous=2092i,tenthous=2092i,odd=184i,even=185i,stringu1="MCAAAA",stringu2="JQJAAA",string4="HHHHxx" 562464000000000000 +tenk unique1=9776i,unique2=6510i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=776i,twothousand=1776i,fivethous=4776i,tenthous=9776i,odd=152i,even=153i,stringu1="AMAAAA",stringu2="KQJAAA",string4="OOOOxx" 562550400000000000 +tenk unique1=7612i,unique2=6511i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=612i,twothousand=1612i,fivethous=2612i,tenthous=7612i,odd=24i,even=25i,stringu1="UGAAAA",stringu2="LQJAAA",string4="VVVVxx" 562636800000000000 +tenk unique1=7190i,unique2=6512i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=190i,twothousand=1190i,fivethous=2190i,tenthous=7190i,odd=180i,even=181i,stringu1="OQAAAA",stringu2="MQJAAA",string4="AAAAxx" 562723200000000000 +tenk unique1=5147i,unique2=6513i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=147i,twothousand=1147i,fivethous=147i,tenthous=5147i,odd=94i,even=95i,stringu1="ZPAAAA",stringu2="NQJAAA",string4="HHHHxx" 562809600000000000 +tenk unique1=3722i,unique2=6514i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=722i,twothousand=1722i,fivethous=3722i,tenthous=3722i,odd=44i,even=45i,stringu1="ENAAAA",stringu2="OQJAAA",string4="OOOOxx" 562896000000000000 +tenk unique1=5858i,unique2=6515i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=858i,twothousand=1858i,fivethous=858i,tenthous=5858i,odd=116i,even=117i,stringu1="IRAAAA",stringu2="PQJAAA",string4="VVVVxx" 562982400000000000 +tenk unique1=3204i,unique2=6516i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=204i,twothousand=1204i,fivethous=3204i,tenthous=3204i,odd=8i,even=9i,stringu1="GTAAAA",stringu2="QQJAAA",string4="AAAAxx" 563068800000000000 +tenk unique1=8994i,unique2=6517i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=994i,twothousand=994i,fivethous=3994i,tenthous=8994i,odd=188i,even=189i,stringu1="YHAAAA",stringu2="RQJAAA",string4="HHHHxx" 563155200000000000 +tenk unique1=7478i,unique2=6518i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=478i,twothousand=1478i,fivethous=2478i,tenthous=7478i,odd=156i,even=157i,stringu1="QBAAAA",stringu2="SQJAAA",string4="OOOOxx" 563241600000000000 +tenk unique1=9624i,unique2=6519i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=624i,twothousand=1624i,fivethous=4624i,tenthous=9624i,odd=48i,even=49i,stringu1="EGAAAA",stringu2="TQJAAA",string4="VVVVxx" 563328000000000000 +tenk unique1=6639i,unique2=6520i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=639i,twothousand=639i,fivethous=1639i,tenthous=6639i,odd=78i,even=79i,stringu1="JVAAAA",stringu2="UQJAAA",string4="AAAAxx" 563414400000000000 +tenk unique1=369i,unique2=6521i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=369i,twothousand=369i,fivethous=369i,tenthous=369i,odd=138i,even=139i,stringu1="FOAAAA",stringu2="VQJAAA",string4="HHHHxx" 563500800000000000 +tenk unique1=7766i,unique2=6522i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=766i,twothousand=1766i,fivethous=2766i,tenthous=7766i,odd=132i,even=133i,stringu1="SMAAAA",stringu2="WQJAAA",string4="OOOOxx" 563587200000000000 +tenk unique1=4094i,unique2=6523i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=94i,twothousand=94i,fivethous=4094i,tenthous=4094i,odd=188i,even=189i,stringu1="MBAAAA",stringu2="XQJAAA",string4="VVVVxx" 563673600000000000 +tenk unique1=9556i,unique2=6524i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=556i,twothousand=1556i,fivethous=4556i,tenthous=9556i,odd=112i,even=113i,stringu1="ODAAAA",stringu2="YQJAAA",string4="AAAAxx" 563760000000000000 +tenk unique1=4887i,unique2=6525i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=887i,twothousand=887i,fivethous=4887i,tenthous=4887i,odd=174i,even=175i,stringu1="ZFAAAA",stringu2="ZQJAAA",string4="HHHHxx" 563846400000000000 +tenk unique1=2321i,unique2=6526i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=321i,twothousand=321i,fivethous=2321i,tenthous=2321i,odd=42i,even=43i,stringu1="HLAAAA",stringu2="ARJAAA",string4="OOOOxx" 563932800000000000 +tenk unique1=9201i,unique2=6527i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=201i,twothousand=1201i,fivethous=4201i,tenthous=9201i,odd=2i,even=3i,stringu1="XPAAAA",stringu2="BRJAAA",string4="VVVVxx" 564019200000000000 +tenk unique1=1627i,unique2=6528i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=627i,twothousand=1627i,fivethous=1627i,tenthous=1627i,odd=54i,even=55i,stringu1="PKAAAA",stringu2="CRJAAA",string4="AAAAxx" 564105600000000000 +tenk unique1=150i,unique2=6529i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=150i,twothousand=150i,fivethous=150i,tenthous=150i,odd=100i,even=101i,stringu1="UFAAAA",stringu2="DRJAAA",string4="HHHHxx" 564192000000000000 +tenk unique1=8010i,unique2=6530i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=10i,twothousand=10i,fivethous=3010i,tenthous=8010i,odd=20i,even=21i,stringu1="CWAAAA",stringu2="ERJAAA",string4="OOOOxx" 564278400000000000 +tenk unique1=8026i,unique2=6531i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=26i,twothousand=26i,fivethous=3026i,tenthous=8026i,odd=52i,even=53i,stringu1="SWAAAA",stringu2="FRJAAA",string4="VVVVxx" 564364800000000000 +tenk unique1=5495i,unique2=6532i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=495i,twothousand=1495i,fivethous=495i,tenthous=5495i,odd=190i,even=191i,stringu1="JDAAAA",stringu2="GRJAAA",string4="AAAAxx" 564451200000000000 +tenk unique1=6213i,unique2=6533i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=213i,twothousand=213i,fivethous=1213i,tenthous=6213i,odd=26i,even=27i,stringu1="ZEAAAA",stringu2="HRJAAA",string4="HHHHxx" 564537600000000000 +tenk unique1=6464i,unique2=6534i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=464i,twothousand=464i,fivethous=1464i,tenthous=6464i,odd=128i,even=129i,stringu1="QOAAAA",stringu2="IRJAAA",string4="OOOOxx" 564624000000000000 +tenk unique1=1158i,unique2=6535i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=158i,twothousand=1158i,fivethous=1158i,tenthous=1158i,odd=116i,even=117i,stringu1="OSAAAA",stringu2="JRJAAA",string4="VVVVxx" 564710400000000000 +tenk unique1=8669i,unique2=6536i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=669i,twothousand=669i,fivethous=3669i,tenthous=8669i,odd=138i,even=139i,stringu1="LVAAAA",stringu2="KRJAAA",string4="AAAAxx" 564796800000000000 +tenk unique1=3225i,unique2=6537i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=225i,twothousand=1225i,fivethous=3225i,tenthous=3225i,odd=50i,even=51i,stringu1="BUAAAA",stringu2="LRJAAA",string4="HHHHxx" 564883200000000000 +tenk unique1=1294i,unique2=6538i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=294i,twothousand=1294i,fivethous=1294i,tenthous=1294i,odd=188i,even=189i,stringu1="UXAAAA",stringu2="MRJAAA",string4="OOOOxx" 564969600000000000 +tenk unique1=2166i,unique2=6539i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=166i,twothousand=166i,fivethous=2166i,tenthous=2166i,odd=132i,even=133i,stringu1="IFAAAA",stringu2="NRJAAA",string4="VVVVxx" 565056000000000000 +tenk unique1=9328i,unique2=6540i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=328i,twothousand=1328i,fivethous=4328i,tenthous=9328i,odd=56i,even=57i,stringu1="UUAAAA",stringu2="ORJAAA",string4="AAAAxx" 565142400000000000 +tenk unique1=8431i,unique2=6541i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=431i,twothousand=431i,fivethous=3431i,tenthous=8431i,odd=62i,even=63i,stringu1="HMAAAA",stringu2="PRJAAA",string4="HHHHxx" 565228800000000000 +tenk unique1=7100i,unique2=6542i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=100i,twothousand=1100i,fivethous=2100i,tenthous=7100i,odd=0i,even=1i,stringu1="CNAAAA",stringu2="QRJAAA",string4="OOOOxx" 565315200000000000 +tenk unique1=8126i,unique2=6543i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=126i,twothousand=126i,fivethous=3126i,tenthous=8126i,odd=52i,even=53i,stringu1="OAAAAA",stringu2="RRJAAA",string4="VVVVxx" 565401600000000000 +tenk unique1=2185i,unique2=6544i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=185i,twothousand=185i,fivethous=2185i,tenthous=2185i,odd=170i,even=171i,stringu1="BGAAAA",stringu2="SRJAAA",string4="AAAAxx" 565488000000000000 +tenk unique1=5697i,unique2=6545i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=697i,twothousand=1697i,fivethous=697i,tenthous=5697i,odd=194i,even=195i,stringu1="DLAAAA",stringu2="TRJAAA",string4="HHHHxx" 565574400000000000 +tenk unique1=5531i,unique2=6546i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=531i,twothousand=1531i,fivethous=531i,tenthous=5531i,odd=62i,even=63i,stringu1="TEAAAA",stringu2="URJAAA",string4="OOOOxx" 565660800000000000 +tenk unique1=3020i,unique2=6547i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=20i,twothousand=1020i,fivethous=3020i,tenthous=3020i,odd=40i,even=41i,stringu1="EMAAAA",stringu2="VRJAAA",string4="VVVVxx" 565747200000000000 +tenk unique1=3076i,unique2=6548i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=76i,twothousand=1076i,fivethous=3076i,tenthous=3076i,odd=152i,even=153i,stringu1="IOAAAA",stringu2="WRJAAA",string4="AAAAxx" 565833600000000000 +tenk unique1=9228i,unique2=6549i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=228i,twothousand=1228i,fivethous=4228i,tenthous=9228i,odd=56i,even=57i,stringu1="YQAAAA",stringu2="XRJAAA",string4="HHHHxx" 565920000000000000 +tenk unique1=1734i,unique2=6550i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=734i,twothousand=1734i,fivethous=1734i,tenthous=1734i,odd=68i,even=69i,stringu1="SOAAAA",stringu2="YRJAAA",string4="OOOOxx" 566006400000000000 +tenk unique1=7616i,unique2=6551i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=616i,twothousand=1616i,fivethous=2616i,tenthous=7616i,odd=32i,even=33i,stringu1="YGAAAA",stringu2="ZRJAAA",string4="VVVVxx" 566092800000000000 +tenk unique1=9059i,unique2=6552i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=59i,twothousand=1059i,fivethous=4059i,tenthous=9059i,odd=118i,even=119i,stringu1="LKAAAA",stringu2="ASJAAA",string4="AAAAxx" 566179200000000000 +tenk unique1=323i,unique2=6553i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=323i,twothousand=323i,fivethous=323i,tenthous=323i,odd=46i,even=47i,stringu1="LMAAAA",stringu2="BSJAAA",string4="HHHHxx" 566265600000000000 +tenk unique1=1283i,unique2=6554i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=283i,twothousand=1283i,fivethous=1283i,tenthous=1283i,odd=166i,even=167i,stringu1="JXAAAA",stringu2="CSJAAA",string4="OOOOxx" 566352000000000000 +tenk unique1=9535i,unique2=6555i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=535i,twothousand=1535i,fivethous=4535i,tenthous=9535i,odd=70i,even=71i,stringu1="TCAAAA",stringu2="DSJAAA",string4="VVVVxx" 566438400000000000 +tenk unique1=2580i,unique2=6556i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=580i,twothousand=580i,fivethous=2580i,tenthous=2580i,odd=160i,even=161i,stringu1="GVAAAA",stringu2="ESJAAA",string4="AAAAxx" 566524800000000000 +tenk unique1=7633i,unique2=6557i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=633i,twothousand=1633i,fivethous=2633i,tenthous=7633i,odd=66i,even=67i,stringu1="PHAAAA",stringu2="FSJAAA",string4="HHHHxx" 566611200000000000 +tenk unique1=9497i,unique2=6558i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=497i,twothousand=1497i,fivethous=4497i,tenthous=9497i,odd=194i,even=195i,stringu1="HBAAAA",stringu2="GSJAAA",string4="OOOOxx" 566697600000000000 +tenk unique1=9842i,unique2=6559i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=842i,twothousand=1842i,fivethous=4842i,tenthous=9842i,odd=84i,even=85i,stringu1="OOAAAA",stringu2="HSJAAA",string4="VVVVxx" 566784000000000000 +tenk unique1=3426i,unique2=6560i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=426i,twothousand=1426i,fivethous=3426i,tenthous=3426i,odd=52i,even=53i,stringu1="UBAAAA",stringu2="ISJAAA",string4="AAAAxx" 566870400000000000 +tenk unique1=7650i,unique2=6561i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=650i,twothousand=1650i,fivethous=2650i,tenthous=7650i,odd=100i,even=101i,stringu1="GIAAAA",stringu2="JSJAAA",string4="HHHHxx" 566956800000000000 +tenk unique1=9935i,unique2=6562i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=935i,twothousand=1935i,fivethous=4935i,tenthous=9935i,odd=70i,even=71i,stringu1="DSAAAA",stringu2="KSJAAA",string4="OOOOxx" 567043200000000000 +tenk unique1=9354i,unique2=6563i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=354i,twothousand=1354i,fivethous=4354i,tenthous=9354i,odd=108i,even=109i,stringu1="UVAAAA",stringu2="LSJAAA",string4="VVVVxx" 567129600000000000 +tenk unique1=5569i,unique2=6564i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=569i,twothousand=1569i,fivethous=569i,tenthous=5569i,odd=138i,even=139i,stringu1="FGAAAA",stringu2="MSJAAA",string4="AAAAxx" 567216000000000000 +tenk unique1=5765i,unique2=6565i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=765i,twothousand=1765i,fivethous=765i,tenthous=5765i,odd=130i,even=131i,stringu1="TNAAAA",stringu2="NSJAAA",string4="HHHHxx" 567302400000000000 +tenk unique1=7283i,unique2=6566i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=283i,twothousand=1283i,fivethous=2283i,tenthous=7283i,odd=166i,even=167i,stringu1="DUAAAA",stringu2="OSJAAA",string4="OOOOxx" 567388800000000000 +tenk unique1=1068i,unique2=6567i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=68i,twothousand=1068i,fivethous=1068i,tenthous=1068i,odd=136i,even=137i,stringu1="CPAAAA",stringu2="PSJAAA",string4="VVVVxx" 567475200000000000 +tenk unique1=1641i,unique2=6568i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=641i,twothousand=1641i,fivethous=1641i,tenthous=1641i,odd=82i,even=83i,stringu1="DLAAAA",stringu2="QSJAAA",string4="AAAAxx" 567561600000000000 +tenk unique1=1688i,unique2=6569i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=688i,twothousand=1688i,fivethous=1688i,tenthous=1688i,odd=176i,even=177i,stringu1="YMAAAA",stringu2="RSJAAA",string4="HHHHxx" 567648000000000000 +tenk unique1=1133i,unique2=6570i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=133i,twothousand=1133i,fivethous=1133i,tenthous=1133i,odd=66i,even=67i,stringu1="PRAAAA",stringu2="SSJAAA",string4="OOOOxx" 567734400000000000 +tenk unique1=4493i,unique2=6571i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=493i,twothousand=493i,fivethous=4493i,tenthous=4493i,odd=186i,even=187i,stringu1="VQAAAA",stringu2="TSJAAA",string4="VVVVxx" 567820800000000000 +tenk unique1=3354i,unique2=6572i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=354i,twothousand=1354i,fivethous=3354i,tenthous=3354i,odd=108i,even=109i,stringu1="AZAAAA",stringu2="USJAAA",string4="AAAAxx" 567907200000000000 +tenk unique1=4029i,unique2=6573i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=29i,twothousand=29i,fivethous=4029i,tenthous=4029i,odd=58i,even=59i,stringu1="ZYAAAA",stringu2="VSJAAA",string4="HHHHxx" 567993600000000000 +tenk unique1=6704i,unique2=6574i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=704i,twothousand=704i,fivethous=1704i,tenthous=6704i,odd=8i,even=9i,stringu1="WXAAAA",stringu2="WSJAAA",string4="OOOOxx" 568080000000000000 +tenk unique1=3221i,unique2=6575i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=221i,twothousand=1221i,fivethous=3221i,tenthous=3221i,odd=42i,even=43i,stringu1="XTAAAA",stringu2="XSJAAA",string4="VVVVxx" 568166400000000000 +tenk unique1=9432i,unique2=6576i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=432i,twothousand=1432i,fivethous=4432i,tenthous=9432i,odd=64i,even=65i,stringu1="UYAAAA",stringu2="YSJAAA",string4="AAAAxx" 568252800000000000 +tenk unique1=6990i,unique2=6577i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=990i,twothousand=990i,fivethous=1990i,tenthous=6990i,odd=180i,even=181i,stringu1="WIAAAA",stringu2="ZSJAAA",string4="HHHHxx" 568339200000000000 +tenk unique1=1760i,unique2=6578i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=760i,twothousand=1760i,fivethous=1760i,tenthous=1760i,odd=120i,even=121i,stringu1="SPAAAA",stringu2="ATJAAA",string4="OOOOxx" 568425600000000000 +tenk unique1=4754i,unique2=6579i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=754i,twothousand=754i,fivethous=4754i,tenthous=4754i,odd=108i,even=109i,stringu1="WAAAAA",stringu2="BTJAAA",string4="VVVVxx" 568512000000000000 +tenk unique1=7724i,unique2=6580i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=724i,twothousand=1724i,fivethous=2724i,tenthous=7724i,odd=48i,even=49i,stringu1="CLAAAA",stringu2="CTJAAA",string4="AAAAxx" 568598400000000000 +tenk unique1=9487i,unique2=6581i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=487i,twothousand=1487i,fivethous=4487i,tenthous=9487i,odd=174i,even=175i,stringu1="XAAAAA",stringu2="DTJAAA",string4="HHHHxx" 568684800000000000 +tenk unique1=166i,unique2=6582i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=166i,twothousand=166i,fivethous=166i,tenthous=166i,odd=132i,even=133i,stringu1="KGAAAA",stringu2="ETJAAA",string4="OOOOxx" 568771200000000000 +tenk unique1=5479i,unique2=6583i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=479i,twothousand=1479i,fivethous=479i,tenthous=5479i,odd=158i,even=159i,stringu1="TCAAAA",stringu2="FTJAAA",string4="VVVVxx" 568857600000000000 +tenk unique1=8744i,unique2=6584i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=744i,twothousand=744i,fivethous=3744i,tenthous=8744i,odd=88i,even=89i,stringu1="IYAAAA",stringu2="GTJAAA",string4="AAAAxx" 568944000000000000 +tenk unique1=5746i,unique2=6585i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=746i,twothousand=1746i,fivethous=746i,tenthous=5746i,odd=92i,even=93i,stringu1="ANAAAA",stringu2="HTJAAA",string4="HHHHxx" 569030400000000000 +tenk unique1=907i,unique2=6586i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=907i,twothousand=907i,fivethous=907i,tenthous=907i,odd=14i,even=15i,stringu1="XIAAAA",stringu2="ITJAAA",string4="OOOOxx" 569116800000000000 +tenk unique1=3968i,unique2=6587i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=968i,twothousand=1968i,fivethous=3968i,tenthous=3968i,odd=136i,even=137i,stringu1="QWAAAA",stringu2="JTJAAA",string4="VVVVxx" 569203200000000000 +tenk unique1=5721i,unique2=6588i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=721i,twothousand=1721i,fivethous=721i,tenthous=5721i,odd=42i,even=43i,stringu1="BMAAAA",stringu2="KTJAAA",string4="AAAAxx" 569289600000000000 +tenk unique1=6738i,unique2=6589i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=738i,twothousand=738i,fivethous=1738i,tenthous=6738i,odd=76i,even=77i,stringu1="EZAAAA",stringu2="LTJAAA",string4="HHHHxx" 569376000000000000 +tenk unique1=4097i,unique2=6590i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=97i,twothousand=97i,fivethous=4097i,tenthous=4097i,odd=194i,even=195i,stringu1="PBAAAA",stringu2="MTJAAA",string4="OOOOxx" 569462400000000000 +tenk unique1=8456i,unique2=6591i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=456i,twothousand=456i,fivethous=3456i,tenthous=8456i,odd=112i,even=113i,stringu1="GNAAAA",stringu2="NTJAAA",string4="VVVVxx" 569548800000000000 +tenk unique1=1269i,unique2=6592i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=269i,twothousand=1269i,fivethous=1269i,tenthous=1269i,odd=138i,even=139i,stringu1="VWAAAA",stringu2="OTJAAA",string4="AAAAxx" 569635200000000000 +tenk unique1=7997i,unique2=6593i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=997i,twothousand=1997i,fivethous=2997i,tenthous=7997i,odd=194i,even=195i,stringu1="PVAAAA",stringu2="PTJAAA",string4="HHHHxx" 569721600000000000 +tenk unique1=9457i,unique2=6594i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=457i,twothousand=1457i,fivethous=4457i,tenthous=9457i,odd=114i,even=115i,stringu1="TZAAAA",stringu2="QTJAAA",string4="OOOOxx" 569808000000000000 +tenk unique1=1159i,unique2=6595i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=159i,twothousand=1159i,fivethous=1159i,tenthous=1159i,odd=118i,even=119i,stringu1="PSAAAA",stringu2="RTJAAA",string4="VVVVxx" 569894400000000000 +tenk unique1=1631i,unique2=6596i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=631i,twothousand=1631i,fivethous=1631i,tenthous=1631i,odd=62i,even=63i,stringu1="TKAAAA",stringu2="STJAAA",string4="AAAAxx" 569980800000000000 +tenk unique1=2019i,unique2=6597i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=19i,twothousand=19i,fivethous=2019i,tenthous=2019i,odd=38i,even=39i,stringu1="RZAAAA",stringu2="TTJAAA",string4="HHHHxx" 570067200000000000 +tenk unique1=3186i,unique2=6598i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=186i,twothousand=1186i,fivethous=3186i,tenthous=3186i,odd=172i,even=173i,stringu1="OSAAAA",stringu2="UTJAAA",string4="OOOOxx" 570153600000000000 +tenk unique1=5587i,unique2=6599i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=587i,twothousand=1587i,fivethous=587i,tenthous=5587i,odd=174i,even=175i,stringu1="XGAAAA",stringu2="VTJAAA",string4="VVVVxx" 570240000000000000 +tenk unique1=9172i,unique2=6600i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=172i,twothousand=1172i,fivethous=4172i,tenthous=9172i,odd=144i,even=145i,stringu1="UOAAAA",stringu2="WTJAAA",string4="AAAAxx" 570326400000000000 +tenk unique1=5589i,unique2=6601i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=589i,twothousand=1589i,fivethous=589i,tenthous=5589i,odd=178i,even=179i,stringu1="ZGAAAA",stringu2="XTJAAA",string4="HHHHxx" 570412800000000000 +tenk unique1=5103i,unique2=6602i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=103i,twothousand=1103i,fivethous=103i,tenthous=5103i,odd=6i,even=7i,stringu1="HOAAAA",stringu2="YTJAAA",string4="OOOOxx" 570499200000000000 +tenk unique1=3177i,unique2=6603i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=177i,twothousand=1177i,fivethous=3177i,tenthous=3177i,odd=154i,even=155i,stringu1="FSAAAA",stringu2="ZTJAAA",string4="VVVVxx" 570585600000000000 +tenk unique1=8887i,unique2=6604i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=887i,twothousand=887i,fivethous=3887i,tenthous=8887i,odd=174i,even=175i,stringu1="VDAAAA",stringu2="AUJAAA",string4="AAAAxx" 570672000000000000 +tenk unique1=12i,unique2=6605i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=12i,twothousand=12i,fivethous=12i,tenthous=12i,odd=24i,even=25i,stringu1="MAAAAA",stringu2="BUJAAA",string4="HHHHxx" 570758400000000000 +tenk unique1=8575i,unique2=6606i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=575i,twothousand=575i,fivethous=3575i,tenthous=8575i,odd=150i,even=151i,stringu1="VRAAAA",stringu2="CUJAAA",string4="OOOOxx" 570844800000000000 +tenk unique1=4335i,unique2=6607i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=335i,twothousand=335i,fivethous=4335i,tenthous=4335i,odd=70i,even=71i,stringu1="TKAAAA",stringu2="DUJAAA",string4="VVVVxx" 570931200000000000 +tenk unique1=4581i,unique2=6608i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=581i,twothousand=581i,fivethous=4581i,tenthous=4581i,odd=162i,even=163i,stringu1="FUAAAA",stringu2="EUJAAA",string4="AAAAxx" 571017600000000000 +tenk unique1=4444i,unique2=6609i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=444i,twothousand=444i,fivethous=4444i,tenthous=4444i,odd=88i,even=89i,stringu1="YOAAAA",stringu2="FUJAAA",string4="HHHHxx" 571104000000000000 +tenk unique1=7978i,unique2=6610i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=978i,twothousand=1978i,fivethous=2978i,tenthous=7978i,odd=156i,even=157i,stringu1="WUAAAA",stringu2="GUJAAA",string4="OOOOxx" 571190400000000000 +tenk unique1=3081i,unique2=6611i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=81i,twothousand=1081i,fivethous=3081i,tenthous=3081i,odd=162i,even=163i,stringu1="NOAAAA",stringu2="HUJAAA",string4="VVVVxx" 571276800000000000 +tenk unique1=4059i,unique2=6612i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=59i,twothousand=59i,fivethous=4059i,tenthous=4059i,odd=118i,even=119i,stringu1="DAAAAA",stringu2="IUJAAA",string4="AAAAxx" 571363200000000000 +tenk unique1=5711i,unique2=6613i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=711i,twothousand=1711i,fivethous=711i,tenthous=5711i,odd=22i,even=23i,stringu1="RLAAAA",stringu2="JUJAAA",string4="HHHHxx" 571449600000000000 +tenk unique1=7069i,unique2=6614i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=69i,twothousand=1069i,fivethous=2069i,tenthous=7069i,odd=138i,even=139i,stringu1="XLAAAA",stringu2="KUJAAA",string4="OOOOxx" 571536000000000000 +tenk unique1=6150i,unique2=6615i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=150i,twothousand=150i,fivethous=1150i,tenthous=6150i,odd=100i,even=101i,stringu1="OCAAAA",stringu2="LUJAAA",string4="VVVVxx" 571622400000000000 +tenk unique1=9550i,unique2=6616i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=550i,twothousand=1550i,fivethous=4550i,tenthous=9550i,odd=100i,even=101i,stringu1="IDAAAA",stringu2="MUJAAA",string4="AAAAxx" 571708800000000000 +tenk unique1=7087i,unique2=6617i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=87i,twothousand=1087i,fivethous=2087i,tenthous=7087i,odd=174i,even=175i,stringu1="PMAAAA",stringu2="NUJAAA",string4="HHHHxx" 571795200000000000 +tenk unique1=9557i,unique2=6618i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=557i,twothousand=1557i,fivethous=4557i,tenthous=9557i,odd=114i,even=115i,stringu1="PDAAAA",stringu2="OUJAAA",string4="OOOOxx" 571881600000000000 +tenk unique1=7856i,unique2=6619i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=856i,twothousand=1856i,fivethous=2856i,tenthous=7856i,odd=112i,even=113i,stringu1="EQAAAA",stringu2="PUJAAA",string4="VVVVxx" 571968000000000000 +tenk unique1=1115i,unique2=6620i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=115i,twothousand=1115i,fivethous=1115i,tenthous=1115i,odd=30i,even=31i,stringu1="XQAAAA",stringu2="QUJAAA",string4="AAAAxx" 572054400000000000 +tenk unique1=1086i,unique2=6621i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=86i,twothousand=1086i,fivethous=1086i,tenthous=1086i,odd=172i,even=173i,stringu1="UPAAAA",stringu2="RUJAAA",string4="HHHHxx" 572140800000000000 +tenk unique1=5048i,unique2=6622i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=48i,twothousand=1048i,fivethous=48i,tenthous=5048i,odd=96i,even=97i,stringu1="EMAAAA",stringu2="SUJAAA",string4="OOOOxx" 572227200000000000 +tenk unique1=5168i,unique2=6623i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=168i,twothousand=1168i,fivethous=168i,tenthous=5168i,odd=136i,even=137i,stringu1="UQAAAA",stringu2="TUJAAA",string4="VVVVxx" 572313600000000000 +tenk unique1=6029i,unique2=6624i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=29i,twothousand=29i,fivethous=1029i,tenthous=6029i,odd=58i,even=59i,stringu1="XXAAAA",stringu2="UUJAAA",string4="AAAAxx" 572400000000000000 +tenk unique1=546i,unique2=6625i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=546i,twothousand=546i,fivethous=546i,tenthous=546i,odd=92i,even=93i,stringu1="AVAAAA",stringu2="VUJAAA",string4="HHHHxx" 572486400000000000 +tenk unique1=2908i,unique2=6626i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=908i,twothousand=908i,fivethous=2908i,tenthous=2908i,odd=16i,even=17i,stringu1="WHAAAA",stringu2="WUJAAA",string4="OOOOxx" 572572800000000000 +tenk unique1=779i,unique2=6627i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=779i,twothousand=779i,fivethous=779i,tenthous=779i,odd=158i,even=159i,stringu1="ZDAAAA",stringu2="XUJAAA",string4="VVVVxx" 572659200000000000 +tenk unique1=4202i,unique2=6628i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=202i,twothousand=202i,fivethous=4202i,tenthous=4202i,odd=4i,even=5i,stringu1="QFAAAA",stringu2="YUJAAA",string4="AAAAxx" 572745600000000000 +tenk unique1=9984i,unique2=6629i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=984i,twothousand=1984i,fivethous=4984i,tenthous=9984i,odd=168i,even=169i,stringu1="AUAAAA",stringu2="ZUJAAA",string4="HHHHxx" 572832000000000000 +tenk unique1=4730i,unique2=6630i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=730i,twothousand=730i,fivethous=4730i,tenthous=4730i,odd=60i,even=61i,stringu1="YZAAAA",stringu2="AVJAAA",string4="OOOOxx" 572918400000000000 +tenk unique1=6517i,unique2=6631i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=517i,twothousand=517i,fivethous=1517i,tenthous=6517i,odd=34i,even=35i,stringu1="RQAAAA",stringu2="BVJAAA",string4="VVVVxx" 573004800000000000 +tenk unique1=8410i,unique2=6632i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=410i,twothousand=410i,fivethous=3410i,tenthous=8410i,odd=20i,even=21i,stringu1="MLAAAA",stringu2="CVJAAA",string4="AAAAxx" 573091200000000000 +tenk unique1=4793i,unique2=6633i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=793i,twothousand=793i,fivethous=4793i,tenthous=4793i,odd=186i,even=187i,stringu1="JCAAAA",stringu2="DVJAAA",string4="HHHHxx" 573177600000000000 +tenk unique1=3431i,unique2=6634i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=431i,twothousand=1431i,fivethous=3431i,tenthous=3431i,odd=62i,even=63i,stringu1="ZBAAAA",stringu2="EVJAAA",string4="OOOOxx" 573264000000000000 +tenk unique1=2481i,unique2=6635i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=481i,twothousand=481i,fivethous=2481i,tenthous=2481i,odd=162i,even=163i,stringu1="LRAAAA",stringu2="FVJAAA",string4="VVVVxx" 573350400000000000 +tenk unique1=3905i,unique2=6636i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=905i,twothousand=1905i,fivethous=3905i,tenthous=3905i,odd=10i,even=11i,stringu1="FUAAAA",stringu2="GVJAAA",string4="AAAAxx" 573436800000000000 +tenk unique1=8807i,unique2=6637i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=807i,twothousand=807i,fivethous=3807i,tenthous=8807i,odd=14i,even=15i,stringu1="TAAAAA",stringu2="HVJAAA",string4="HHHHxx" 573523200000000000 +tenk unique1=2660i,unique2=6638i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=660i,twothousand=660i,fivethous=2660i,tenthous=2660i,odd=120i,even=121i,stringu1="IYAAAA",stringu2="IVJAAA",string4="OOOOxx" 573609600000000000 +tenk unique1=4985i,unique2=6639i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=985i,twothousand=985i,fivethous=4985i,tenthous=4985i,odd=170i,even=171i,stringu1="TJAAAA",stringu2="JVJAAA",string4="VVVVxx" 573696000000000000 +tenk unique1=3080i,unique2=6640i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=80i,twothousand=1080i,fivethous=3080i,tenthous=3080i,odd=160i,even=161i,stringu1="MOAAAA",stringu2="KVJAAA",string4="AAAAxx" 573782400000000000 +tenk unique1=1090i,unique2=6641i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=90i,twothousand=1090i,fivethous=1090i,tenthous=1090i,odd=180i,even=181i,stringu1="YPAAAA",stringu2="LVJAAA",string4="HHHHxx" 573868800000000000 +tenk unique1=6917i,unique2=6642i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=917i,twothousand=917i,fivethous=1917i,tenthous=6917i,odd=34i,even=35i,stringu1="BGAAAA",stringu2="MVJAAA",string4="OOOOxx" 573955200000000000 +tenk unique1=5177i,unique2=6643i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=177i,twothousand=1177i,fivethous=177i,tenthous=5177i,odd=154i,even=155i,stringu1="DRAAAA",stringu2="NVJAAA",string4="VVVVxx" 574041600000000000 +tenk unique1=2729i,unique2=6644i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=729i,twothousand=729i,fivethous=2729i,tenthous=2729i,odd=58i,even=59i,stringu1="ZAAAAA",stringu2="OVJAAA",string4="AAAAxx" 574128000000000000 +tenk unique1=9706i,unique2=6645i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=706i,twothousand=1706i,fivethous=4706i,tenthous=9706i,odd=12i,even=13i,stringu1="IJAAAA",stringu2="PVJAAA",string4="HHHHxx" 574214400000000000 +tenk unique1=9929i,unique2=6646i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=929i,twothousand=1929i,fivethous=4929i,tenthous=9929i,odd=58i,even=59i,stringu1="XRAAAA",stringu2="QVJAAA",string4="OOOOxx" 574300800000000000 +tenk unique1=1547i,unique2=6647i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=547i,twothousand=1547i,fivethous=1547i,tenthous=1547i,odd=94i,even=95i,stringu1="NHAAAA",stringu2="RVJAAA",string4="VVVVxx" 574387200000000000 +tenk unique1=2798i,unique2=6648i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=798i,twothousand=798i,fivethous=2798i,tenthous=2798i,odd=196i,even=197i,stringu1="QDAAAA",stringu2="SVJAAA",string4="AAAAxx" 574473600000000000 +tenk unique1=4420i,unique2=6649i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=420i,twothousand=420i,fivethous=4420i,tenthous=4420i,odd=40i,even=41i,stringu1="AOAAAA",stringu2="TVJAAA",string4="HHHHxx" 574560000000000000 +tenk unique1=6771i,unique2=6650i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=771i,twothousand=771i,fivethous=1771i,tenthous=6771i,odd=142i,even=143i,stringu1="LAAAAA",stringu2="UVJAAA",string4="OOOOxx" 574646400000000000 +tenk unique1=2004i,unique2=6651i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=4i,fivethous=2004i,tenthous=2004i,odd=8i,even=9i,stringu1="CZAAAA",stringu2="VVJAAA",string4="VVVVxx" 574732800000000000 +tenk unique1=8686i,unique2=6652i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=686i,twothousand=686i,fivethous=3686i,tenthous=8686i,odd=172i,even=173i,stringu1="CWAAAA",stringu2="WVJAAA",string4="AAAAxx" 574819200000000000 +tenk unique1=3663i,unique2=6653i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=663i,twothousand=1663i,fivethous=3663i,tenthous=3663i,odd=126i,even=127i,stringu1="XKAAAA",stringu2="XVJAAA",string4="HHHHxx" 574905600000000000 +tenk unique1=806i,unique2=6654i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=806i,twothousand=806i,fivethous=806i,tenthous=806i,odd=12i,even=13i,stringu1="AFAAAA",stringu2="YVJAAA",string4="OOOOxx" 574992000000000000 +tenk unique1=4309i,unique2=6655i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=309i,twothousand=309i,fivethous=4309i,tenthous=4309i,odd=18i,even=19i,stringu1="TJAAAA",stringu2="ZVJAAA",string4="VVVVxx" 575078400000000000 +tenk unique1=7443i,unique2=6656i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=443i,twothousand=1443i,fivethous=2443i,tenthous=7443i,odd=86i,even=87i,stringu1="HAAAAA",stringu2="AWJAAA",string4="AAAAxx" 575164800000000000 +tenk unique1=5779i,unique2=6657i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=779i,twothousand=1779i,fivethous=779i,tenthous=5779i,odd=158i,even=159i,stringu1="HOAAAA",stringu2="BWJAAA",string4="HHHHxx" 575251200000000000 +tenk unique1=8821i,unique2=6658i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=821i,twothousand=821i,fivethous=3821i,tenthous=8821i,odd=42i,even=43i,stringu1="HBAAAA",stringu2="CWJAAA",string4="OOOOxx" 575337600000000000 +tenk unique1=4198i,unique2=6659i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=198i,twothousand=198i,fivethous=4198i,tenthous=4198i,odd=196i,even=197i,stringu1="MFAAAA",stringu2="DWJAAA",string4="VVVVxx" 575424000000000000 +tenk unique1=8115i,unique2=6660i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=115i,twothousand=115i,fivethous=3115i,tenthous=8115i,odd=30i,even=31i,stringu1="DAAAAA",stringu2="EWJAAA",string4="AAAAxx" 575510400000000000 +tenk unique1=9554i,unique2=6661i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=554i,twothousand=1554i,fivethous=4554i,tenthous=9554i,odd=108i,even=109i,stringu1="MDAAAA",stringu2="FWJAAA",string4="HHHHxx" 575596800000000000 +tenk unique1=8956i,unique2=6662i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=956i,twothousand=956i,fivethous=3956i,tenthous=8956i,odd=112i,even=113i,stringu1="MGAAAA",stringu2="GWJAAA",string4="OOOOxx" 575683200000000000 +tenk unique1=4733i,unique2=6663i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=733i,twothousand=733i,fivethous=4733i,tenthous=4733i,odd=66i,even=67i,stringu1="BAAAAA",stringu2="HWJAAA",string4="VVVVxx" 575769600000000000 +tenk unique1=5417i,unique2=6664i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=417i,twothousand=1417i,fivethous=417i,tenthous=5417i,odd=34i,even=35i,stringu1="JAAAAA",stringu2="IWJAAA",string4="AAAAxx" 575856000000000000 +tenk unique1=4792i,unique2=6665i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=792i,twothousand=792i,fivethous=4792i,tenthous=4792i,odd=184i,even=185i,stringu1="ICAAAA",stringu2="JWJAAA",string4="HHHHxx" 575942400000000000 +tenk unique1=462i,unique2=6666i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=462i,twothousand=462i,fivethous=462i,tenthous=462i,odd=124i,even=125i,stringu1="URAAAA",stringu2="KWJAAA",string4="OOOOxx" 576028800000000000 +tenk unique1=3687i,unique2=6667i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=687i,twothousand=1687i,fivethous=3687i,tenthous=3687i,odd=174i,even=175i,stringu1="VLAAAA",stringu2="LWJAAA",string4="VVVVxx" 576115200000000000 +tenk unique1=2013i,unique2=6668i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=13i,twothousand=13i,fivethous=2013i,tenthous=2013i,odd=26i,even=27i,stringu1="LZAAAA",stringu2="MWJAAA",string4="AAAAxx" 576201600000000000 +tenk unique1=5386i,unique2=6669i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=386i,twothousand=1386i,fivethous=386i,tenthous=5386i,odd=172i,even=173i,stringu1="EZAAAA",stringu2="NWJAAA",string4="HHHHxx" 576288000000000000 +tenk unique1=2816i,unique2=6670i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=816i,twothousand=816i,fivethous=2816i,tenthous=2816i,odd=32i,even=33i,stringu1="IEAAAA",stringu2="OWJAAA",string4="OOOOxx" 576374400000000000 +tenk unique1=7827i,unique2=6671i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=827i,twothousand=1827i,fivethous=2827i,tenthous=7827i,odd=54i,even=55i,stringu1="BPAAAA",stringu2="PWJAAA",string4="VVVVxx" 576460800000000000 +tenk unique1=5077i,unique2=6672i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=77i,twothousand=1077i,fivethous=77i,tenthous=5077i,odd=154i,even=155i,stringu1="HNAAAA",stringu2="QWJAAA",string4="AAAAxx" 576547200000000000 +tenk unique1=6039i,unique2=6673i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=39i,twothousand=39i,fivethous=1039i,tenthous=6039i,odd=78i,even=79i,stringu1="HYAAAA",stringu2="RWJAAA",string4="HHHHxx" 576633600000000000 +tenk unique1=215i,unique2=6674i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=215i,twothousand=215i,fivethous=215i,tenthous=215i,odd=30i,even=31i,stringu1="HIAAAA",stringu2="SWJAAA",string4="OOOOxx" 576720000000000000 +tenk unique1=855i,unique2=6675i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=855i,twothousand=855i,fivethous=855i,tenthous=855i,odd=110i,even=111i,stringu1="XGAAAA",stringu2="TWJAAA",string4="VVVVxx" 576806400000000000 +tenk unique1=9692i,unique2=6676i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=692i,twothousand=1692i,fivethous=4692i,tenthous=9692i,odd=184i,even=185i,stringu1="UIAAAA",stringu2="UWJAAA",string4="AAAAxx" 576892800000000000 +tenk unique1=8391i,unique2=6677i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=391i,twothousand=391i,fivethous=3391i,tenthous=8391i,odd=182i,even=183i,stringu1="TKAAAA",stringu2="VWJAAA",string4="HHHHxx" 576979200000000000 +tenk unique1=8424i,unique2=6678i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=424i,twothousand=424i,fivethous=3424i,tenthous=8424i,odd=48i,even=49i,stringu1="AMAAAA",stringu2="WWJAAA",string4="OOOOxx" 577065600000000000 +tenk unique1=6331i,unique2=6679i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=331i,twothousand=331i,fivethous=1331i,tenthous=6331i,odd=62i,even=63i,stringu1="NJAAAA",stringu2="XWJAAA",string4="VVVVxx" 577152000000000000 +tenk unique1=6561i,unique2=6680i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=561i,twothousand=561i,fivethous=1561i,tenthous=6561i,odd=122i,even=123i,stringu1="JSAAAA",stringu2="YWJAAA",string4="AAAAxx" 577238400000000000 +tenk unique1=8955i,unique2=6681i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=955i,twothousand=955i,fivethous=3955i,tenthous=8955i,odd=110i,even=111i,stringu1="LGAAAA",stringu2="ZWJAAA",string4="HHHHxx" 577324800000000000 +tenk unique1=1764i,unique2=6682i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=764i,twothousand=1764i,fivethous=1764i,tenthous=1764i,odd=128i,even=129i,stringu1="WPAAAA",stringu2="AXJAAA",string4="OOOOxx" 577411200000000000 +tenk unique1=6623i,unique2=6683i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=623i,twothousand=623i,fivethous=1623i,tenthous=6623i,odd=46i,even=47i,stringu1="TUAAAA",stringu2="BXJAAA",string4="VVVVxx" 577497600000000000 +tenk unique1=2900i,unique2=6684i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=900i,twothousand=900i,fivethous=2900i,tenthous=2900i,odd=0i,even=1i,stringu1="OHAAAA",stringu2="CXJAAA",string4="AAAAxx" 577584000000000000 +tenk unique1=7048i,unique2=6685i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=48i,twothousand=1048i,fivethous=2048i,tenthous=7048i,odd=96i,even=97i,stringu1="CLAAAA",stringu2="DXJAAA",string4="HHHHxx" 577670400000000000 +tenk unique1=3843i,unique2=6686i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=843i,twothousand=1843i,fivethous=3843i,tenthous=3843i,odd=86i,even=87i,stringu1="VRAAAA",stringu2="EXJAAA",string4="OOOOxx" 577756800000000000 +tenk unique1=4855i,unique2=6687i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=855i,twothousand=855i,fivethous=4855i,tenthous=4855i,odd=110i,even=111i,stringu1="TEAAAA",stringu2="FXJAAA",string4="VVVVxx" 577843200000000000 +tenk unique1=7383i,unique2=6688i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=383i,twothousand=1383i,fivethous=2383i,tenthous=7383i,odd=166i,even=167i,stringu1="ZXAAAA",stringu2="GXJAAA",string4="AAAAxx" 577929600000000000 +tenk unique1=7765i,unique2=6689i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=765i,twothousand=1765i,fivethous=2765i,tenthous=7765i,odd=130i,even=131i,stringu1="RMAAAA",stringu2="HXJAAA",string4="HHHHxx" 578016000000000000 +tenk unique1=1125i,unique2=6690i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=125i,twothousand=1125i,fivethous=1125i,tenthous=1125i,odd=50i,even=51i,stringu1="HRAAAA",stringu2="IXJAAA",string4="OOOOxx" 578102400000000000 +tenk unique1=755i,unique2=6691i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=755i,twothousand=755i,fivethous=755i,tenthous=755i,odd=110i,even=111i,stringu1="BDAAAA",stringu2="JXJAAA",string4="VVVVxx" 578188800000000000 +tenk unique1=2995i,unique2=6692i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=995i,twothousand=995i,fivethous=2995i,tenthous=2995i,odd=190i,even=191i,stringu1="FLAAAA",stringu2="KXJAAA",string4="AAAAxx" 578275200000000000 +tenk unique1=8907i,unique2=6693i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=907i,twothousand=907i,fivethous=3907i,tenthous=8907i,odd=14i,even=15i,stringu1="PEAAAA",stringu2="LXJAAA",string4="HHHHxx" 578361600000000000 +tenk unique1=9357i,unique2=6694i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=357i,twothousand=1357i,fivethous=4357i,tenthous=9357i,odd=114i,even=115i,stringu1="XVAAAA",stringu2="MXJAAA",string4="OOOOxx" 578448000000000000 +tenk unique1=4469i,unique2=6695i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=469i,twothousand=469i,fivethous=4469i,tenthous=4469i,odd=138i,even=139i,stringu1="XPAAAA",stringu2="NXJAAA",string4="VVVVxx" 578534400000000000 +tenk unique1=2147i,unique2=6696i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=147i,twothousand=147i,fivethous=2147i,tenthous=2147i,odd=94i,even=95i,stringu1="PEAAAA",stringu2="OXJAAA",string4="AAAAxx" 578620800000000000 +tenk unique1=2952i,unique2=6697i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=952i,twothousand=952i,fivethous=2952i,tenthous=2952i,odd=104i,even=105i,stringu1="OJAAAA",stringu2="PXJAAA",string4="HHHHxx" 578707200000000000 +tenk unique1=1324i,unique2=6698i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=324i,twothousand=1324i,fivethous=1324i,tenthous=1324i,odd=48i,even=49i,stringu1="YYAAAA",stringu2="QXJAAA",string4="OOOOxx" 578793600000000000 +tenk unique1=1173i,unique2=6699i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=173i,twothousand=1173i,fivethous=1173i,tenthous=1173i,odd=146i,even=147i,stringu1="DTAAAA",stringu2="RXJAAA",string4="VVVVxx" 578880000000000000 +tenk unique1=3169i,unique2=6700i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=169i,twothousand=1169i,fivethous=3169i,tenthous=3169i,odd=138i,even=139i,stringu1="XRAAAA",stringu2="SXJAAA",string4="AAAAxx" 578966400000000000 +tenk unique1=5149i,unique2=6701i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=149i,twothousand=1149i,fivethous=149i,tenthous=5149i,odd=98i,even=99i,stringu1="BQAAAA",stringu2="TXJAAA",string4="HHHHxx" 579052800000000000 +tenk unique1=9660i,unique2=6702i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=660i,twothousand=1660i,fivethous=4660i,tenthous=9660i,odd=120i,even=121i,stringu1="OHAAAA",stringu2="UXJAAA",string4="OOOOxx" 579139200000000000 +tenk unique1=3446i,unique2=6703i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=446i,twothousand=1446i,fivethous=3446i,tenthous=3446i,odd=92i,even=93i,stringu1="OCAAAA",stringu2="VXJAAA",string4="VVVVxx" 579225600000000000 +tenk unique1=6988i,unique2=6704i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=988i,twothousand=988i,fivethous=1988i,tenthous=6988i,odd=176i,even=177i,stringu1="UIAAAA",stringu2="WXJAAA",string4="AAAAxx" 579312000000000000 +tenk unique1=5829i,unique2=6705i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=829i,twothousand=1829i,fivethous=829i,tenthous=5829i,odd=58i,even=59i,stringu1="FQAAAA",stringu2="XXJAAA",string4="HHHHxx" 579398400000000000 +tenk unique1=7166i,unique2=6706i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=166i,twothousand=1166i,fivethous=2166i,tenthous=7166i,odd=132i,even=133i,stringu1="QPAAAA",stringu2="YXJAAA",string4="OOOOxx" 579484800000000000 +tenk unique1=3940i,unique2=6707i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=940i,twothousand=1940i,fivethous=3940i,tenthous=3940i,odd=80i,even=81i,stringu1="OVAAAA",stringu2="ZXJAAA",string4="VVVVxx" 579571200000000000 +tenk unique1=2645i,unique2=6708i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=645i,twothousand=645i,fivethous=2645i,tenthous=2645i,odd=90i,even=91i,stringu1="TXAAAA",stringu2="AYJAAA",string4="AAAAxx" 579657600000000000 +tenk unique1=478i,unique2=6709i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=478i,twothousand=478i,fivethous=478i,tenthous=478i,odd=156i,even=157i,stringu1="KSAAAA",stringu2="BYJAAA",string4="HHHHxx" 579744000000000000 +tenk unique1=1156i,unique2=6710i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=156i,twothousand=1156i,fivethous=1156i,tenthous=1156i,odd=112i,even=113i,stringu1="MSAAAA",stringu2="CYJAAA",string4="OOOOxx" 579830400000000000 +tenk unique1=2731i,unique2=6711i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=731i,twothousand=731i,fivethous=2731i,tenthous=2731i,odd=62i,even=63i,stringu1="BBAAAA",stringu2="DYJAAA",string4="VVVVxx" 579916800000000000 +tenk unique1=5637i,unique2=6712i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=637i,twothousand=1637i,fivethous=637i,tenthous=5637i,odd=74i,even=75i,stringu1="VIAAAA",stringu2="EYJAAA",string4="AAAAxx" 580003200000000000 +tenk unique1=7517i,unique2=6713i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=517i,twothousand=1517i,fivethous=2517i,tenthous=7517i,odd=34i,even=35i,stringu1="DDAAAA",stringu2="FYJAAA",string4="HHHHxx" 580089600000000000 +tenk unique1=5331i,unique2=6714i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=331i,twothousand=1331i,fivethous=331i,tenthous=5331i,odd=62i,even=63i,stringu1="BXAAAA",stringu2="GYJAAA",string4="OOOOxx" 580176000000000000 +tenk unique1=9640i,unique2=6715i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=640i,twothousand=1640i,fivethous=4640i,tenthous=9640i,odd=80i,even=81i,stringu1="UGAAAA",stringu2="HYJAAA",string4="VVVVxx" 580262400000000000 +tenk unique1=4108i,unique2=6716i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=108i,twothousand=108i,fivethous=4108i,tenthous=4108i,odd=16i,even=17i,stringu1="ACAAAA",stringu2="IYJAAA",string4="AAAAxx" 580348800000000000 +tenk unique1=1087i,unique2=6717i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=87i,twothousand=1087i,fivethous=1087i,tenthous=1087i,odd=174i,even=175i,stringu1="VPAAAA",stringu2="JYJAAA",string4="HHHHxx" 580435200000000000 +tenk unique1=8017i,unique2=6718i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=17i,twothousand=17i,fivethous=3017i,tenthous=8017i,odd=34i,even=35i,stringu1="JWAAAA",stringu2="KYJAAA",string4="OOOOxx" 580521600000000000 +tenk unique1=8795i,unique2=6719i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=795i,twothousand=795i,fivethous=3795i,tenthous=8795i,odd=190i,even=191i,stringu1="HAAAAA",stringu2="LYJAAA",string4="VVVVxx" 580608000000000000 +tenk unique1=7060i,unique2=6720i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=60i,twothousand=1060i,fivethous=2060i,tenthous=7060i,odd=120i,even=121i,stringu1="OLAAAA",stringu2="MYJAAA",string4="AAAAxx" 580694400000000000 +tenk unique1=9450i,unique2=6721i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=450i,twothousand=1450i,fivethous=4450i,tenthous=9450i,odd=100i,even=101i,stringu1="MZAAAA",stringu2="NYJAAA",string4="HHHHxx" 580780800000000000 +tenk unique1=390i,unique2=6722i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=390i,twothousand=390i,fivethous=390i,tenthous=390i,odd=180i,even=181i,stringu1="APAAAA",stringu2="OYJAAA",string4="OOOOxx" 580867200000000000 +tenk unique1=66i,unique2=6723i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=66i,twothousand=66i,fivethous=66i,tenthous=66i,odd=132i,even=133i,stringu1="OCAAAA",stringu2="PYJAAA",string4="VVVVxx" 580953600000000000 +tenk unique1=8789i,unique2=6724i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=789i,twothousand=789i,fivethous=3789i,tenthous=8789i,odd=178i,even=179i,stringu1="BAAAAA",stringu2="QYJAAA",string4="AAAAxx" 581040000000000000 +tenk unique1=9260i,unique2=6725i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=260i,twothousand=1260i,fivethous=4260i,tenthous=9260i,odd=120i,even=121i,stringu1="ESAAAA",stringu2="RYJAAA",string4="HHHHxx" 581126400000000000 +tenk unique1=6679i,unique2=6726i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=679i,twothousand=679i,fivethous=1679i,tenthous=6679i,odd=158i,even=159i,stringu1="XWAAAA",stringu2="SYJAAA",string4="OOOOxx" 581212800000000000 +tenk unique1=9052i,unique2=6727i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=52i,twothousand=1052i,fivethous=4052i,tenthous=9052i,odd=104i,even=105i,stringu1="EKAAAA",stringu2="TYJAAA",string4="VVVVxx" 581299200000000000 +tenk unique1=9561i,unique2=6728i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=561i,twothousand=1561i,fivethous=4561i,tenthous=9561i,odd=122i,even=123i,stringu1="TDAAAA",stringu2="UYJAAA",string4="AAAAxx" 581385600000000000 +tenk unique1=9725i,unique2=6729i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=725i,twothousand=1725i,fivethous=4725i,tenthous=9725i,odd=50i,even=51i,stringu1="BKAAAA",stringu2="VYJAAA",string4="HHHHxx" 581472000000000000 +tenk unique1=6298i,unique2=6730i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=298i,twothousand=298i,fivethous=1298i,tenthous=6298i,odd=196i,even=197i,stringu1="GIAAAA",stringu2="WYJAAA",string4="OOOOxx" 581558400000000000 +tenk unique1=8654i,unique2=6731i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=654i,twothousand=654i,fivethous=3654i,tenthous=8654i,odd=108i,even=109i,stringu1="WUAAAA",stringu2="XYJAAA",string4="VVVVxx" 581644800000000000 +tenk unique1=8725i,unique2=6732i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=725i,twothousand=725i,fivethous=3725i,tenthous=8725i,odd=50i,even=51i,stringu1="PXAAAA",stringu2="YYJAAA",string4="AAAAxx" 581731200000000000 +tenk unique1=9377i,unique2=6733i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=377i,twothousand=1377i,fivethous=4377i,tenthous=9377i,odd=154i,even=155i,stringu1="RWAAAA",stringu2="ZYJAAA",string4="HHHHxx" 581817600000000000 +tenk unique1=3807i,unique2=6734i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=807i,twothousand=1807i,fivethous=3807i,tenthous=3807i,odd=14i,even=15i,stringu1="LQAAAA",stringu2="AZJAAA",string4="OOOOxx" 581904000000000000 +tenk unique1=8048i,unique2=6735i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=48i,twothousand=48i,fivethous=3048i,tenthous=8048i,odd=96i,even=97i,stringu1="OXAAAA",stringu2="BZJAAA",string4="VVVVxx" 581990400000000000 +tenk unique1=764i,unique2=6736i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=764i,twothousand=764i,fivethous=764i,tenthous=764i,odd=128i,even=129i,stringu1="KDAAAA",stringu2="CZJAAA",string4="AAAAxx" 582076800000000000 +tenk unique1=9702i,unique2=6737i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=702i,twothousand=1702i,fivethous=4702i,tenthous=9702i,odd=4i,even=5i,stringu1="EJAAAA",stringu2="DZJAAA",string4="HHHHxx" 582163200000000000 +tenk unique1=8060i,unique2=6738i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=60i,twothousand=60i,fivethous=3060i,tenthous=8060i,odd=120i,even=121i,stringu1="AYAAAA",stringu2="EZJAAA",string4="OOOOxx" 582249600000000000 +tenk unique1=6371i,unique2=6739i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=371i,twothousand=371i,fivethous=1371i,tenthous=6371i,odd=142i,even=143i,stringu1="BLAAAA",stringu2="FZJAAA",string4="VVVVxx" 582336000000000000 +tenk unique1=5237i,unique2=6740i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=237i,twothousand=1237i,fivethous=237i,tenthous=5237i,odd=74i,even=75i,stringu1="LTAAAA",stringu2="GZJAAA",string4="AAAAxx" 582422400000000000 +tenk unique1=743i,unique2=6741i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=743i,twothousand=743i,fivethous=743i,tenthous=743i,odd=86i,even=87i,stringu1="PCAAAA",stringu2="HZJAAA",string4="HHHHxx" 582508800000000000 +tenk unique1=7395i,unique2=6742i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=395i,twothousand=1395i,fivethous=2395i,tenthous=7395i,odd=190i,even=191i,stringu1="LYAAAA",stringu2="IZJAAA",string4="OOOOxx" 582595200000000000 +tenk unique1=3365i,unique2=6743i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=365i,twothousand=1365i,fivethous=3365i,tenthous=3365i,odd=130i,even=131i,stringu1="LZAAAA",stringu2="JZJAAA",string4="VVVVxx" 582681600000000000 +tenk unique1=6667i,unique2=6744i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=667i,twothousand=667i,fivethous=1667i,tenthous=6667i,odd=134i,even=135i,stringu1="LWAAAA",stringu2="KZJAAA",string4="AAAAxx" 582768000000000000 +tenk unique1=3445i,unique2=6745i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=445i,twothousand=1445i,fivethous=3445i,tenthous=3445i,odd=90i,even=91i,stringu1="NCAAAA",stringu2="LZJAAA",string4="HHHHxx" 582854400000000000 +tenk unique1=4019i,unique2=6746i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=19i,twothousand=19i,fivethous=4019i,tenthous=4019i,odd=38i,even=39i,stringu1="PYAAAA",stringu2="MZJAAA",string4="OOOOxx" 582940800000000000 +tenk unique1=7035i,unique2=6747i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=35i,twothousand=1035i,fivethous=2035i,tenthous=7035i,odd=70i,even=71i,stringu1="PKAAAA",stringu2="NZJAAA",string4="VVVVxx" 583027200000000000 +tenk unique1=5274i,unique2=6748i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=274i,twothousand=1274i,fivethous=274i,tenthous=5274i,odd=148i,even=149i,stringu1="WUAAAA",stringu2="OZJAAA",string4="AAAAxx" 583113600000000000 +tenk unique1=519i,unique2=6749i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=519i,twothousand=519i,fivethous=519i,tenthous=519i,odd=38i,even=39i,stringu1="ZTAAAA",stringu2="PZJAAA",string4="HHHHxx" 583200000000000000 +tenk unique1=2801i,unique2=6750i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=801i,twothousand=801i,fivethous=2801i,tenthous=2801i,odd=2i,even=3i,stringu1="TDAAAA",stringu2="QZJAAA",string4="OOOOxx" 583286400000000000 +tenk unique1=3320i,unique2=6751i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=320i,twothousand=1320i,fivethous=3320i,tenthous=3320i,odd=40i,even=41i,stringu1="SXAAAA",stringu2="RZJAAA",string4="VVVVxx" 583372800000000000 +tenk unique1=3153i,unique2=6752i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=153i,twothousand=1153i,fivethous=3153i,tenthous=3153i,odd=106i,even=107i,stringu1="HRAAAA",stringu2="SZJAAA",string4="AAAAxx" 583459200000000000 +tenk unique1=7680i,unique2=6753i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=680i,twothousand=1680i,fivethous=2680i,tenthous=7680i,odd=160i,even=161i,stringu1="KJAAAA",stringu2="TZJAAA",string4="HHHHxx" 583545600000000000 +tenk unique1=8942i,unique2=6754i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=942i,twothousand=942i,fivethous=3942i,tenthous=8942i,odd=84i,even=85i,stringu1="YFAAAA",stringu2="UZJAAA",string4="OOOOxx" 583632000000000000 +tenk unique1=3195i,unique2=6755i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=195i,twothousand=1195i,fivethous=3195i,tenthous=3195i,odd=190i,even=191i,stringu1="XSAAAA",stringu2="VZJAAA",string4="VVVVxx" 583718400000000000 +tenk unique1=2287i,unique2=6756i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=287i,twothousand=287i,fivethous=2287i,tenthous=2287i,odd=174i,even=175i,stringu1="ZJAAAA",stringu2="WZJAAA",string4="AAAAxx" 583804800000000000 +tenk unique1=8325i,unique2=6757i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=325i,twothousand=325i,fivethous=3325i,tenthous=8325i,odd=50i,even=51i,stringu1="FIAAAA",stringu2="XZJAAA",string4="HHHHxx" 583891200000000000 +tenk unique1=2603i,unique2=6758i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=603i,twothousand=603i,fivethous=2603i,tenthous=2603i,odd=6i,even=7i,stringu1="DWAAAA",stringu2="YZJAAA",string4="OOOOxx" 583977600000000000 +tenk unique1=5871i,unique2=6759i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=871i,twothousand=1871i,fivethous=871i,tenthous=5871i,odd=142i,even=143i,stringu1="VRAAAA",stringu2="ZZJAAA",string4="VVVVxx" 584064000000000000 +tenk unique1=1773i,unique2=6760i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=773i,twothousand=1773i,fivethous=1773i,tenthous=1773i,odd=146i,even=147i,stringu1="FQAAAA",stringu2="AAKAAA",string4="AAAAxx" 584150400000000000 +tenk unique1=3323i,unique2=6761i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=323i,twothousand=1323i,fivethous=3323i,tenthous=3323i,odd=46i,even=47i,stringu1="VXAAAA",stringu2="BAKAAA",string4="HHHHxx" 584236800000000000 +tenk unique1=2053i,unique2=6762i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=53i,twothousand=53i,fivethous=2053i,tenthous=2053i,odd=106i,even=107i,stringu1="ZAAAAA",stringu2="CAKAAA",string4="OOOOxx" 584323200000000000 +tenk unique1=4062i,unique2=6763i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=62i,twothousand=62i,fivethous=4062i,tenthous=4062i,odd=124i,even=125i,stringu1="GAAAAA",stringu2="DAKAAA",string4="VVVVxx" 584409600000000000 +tenk unique1=4611i,unique2=6764i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=611i,twothousand=611i,fivethous=4611i,tenthous=4611i,odd=22i,even=23i,stringu1="JVAAAA",stringu2="EAKAAA",string4="AAAAxx" 584496000000000000 +tenk unique1=3451i,unique2=6765i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=451i,twothousand=1451i,fivethous=3451i,tenthous=3451i,odd=102i,even=103i,stringu1="TCAAAA",stringu2="FAKAAA",string4="HHHHxx" 584582400000000000 +tenk unique1=1819i,unique2=6766i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=819i,twothousand=1819i,fivethous=1819i,tenthous=1819i,odd=38i,even=39i,stringu1="ZRAAAA",stringu2="GAKAAA",string4="OOOOxx" 584668800000000000 +tenk unique1=9806i,unique2=6767i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=806i,twothousand=1806i,fivethous=4806i,tenthous=9806i,odd=12i,even=13i,stringu1="ENAAAA",stringu2="HAKAAA",string4="VVVVxx" 584755200000000000 +tenk unique1=6619i,unique2=6768i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=619i,twothousand=619i,fivethous=1619i,tenthous=6619i,odd=38i,even=39i,stringu1="PUAAAA",stringu2="IAKAAA",string4="AAAAxx" 584841600000000000 +tenk unique1=1031i,unique2=6769i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=31i,twothousand=1031i,fivethous=1031i,tenthous=1031i,odd=62i,even=63i,stringu1="RNAAAA",stringu2="JAKAAA",string4="HHHHxx" 584928000000000000 +tenk unique1=1865i,unique2=6770i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=865i,twothousand=1865i,fivethous=1865i,tenthous=1865i,odd=130i,even=131i,stringu1="TTAAAA",stringu2="KAKAAA",string4="OOOOxx" 585014400000000000 +tenk unique1=6282i,unique2=6771i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=282i,twothousand=282i,fivethous=1282i,tenthous=6282i,odd=164i,even=165i,stringu1="QHAAAA",stringu2="LAKAAA",string4="VVVVxx" 585100800000000000 +tenk unique1=1178i,unique2=6772i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=178i,twothousand=1178i,fivethous=1178i,tenthous=1178i,odd=156i,even=157i,stringu1="ITAAAA",stringu2="MAKAAA",string4="AAAAxx" 585187200000000000 +tenk unique1=8007i,unique2=6773i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=7i,fivethous=3007i,tenthous=8007i,odd=14i,even=15i,stringu1="ZVAAAA",stringu2="NAKAAA",string4="HHHHxx" 585273600000000000 +tenk unique1=9126i,unique2=6774i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=126i,twothousand=1126i,fivethous=4126i,tenthous=9126i,odd=52i,even=53i,stringu1="ANAAAA",stringu2="OAKAAA",string4="OOOOxx" 585360000000000000 +tenk unique1=9113i,unique2=6775i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=113i,twothousand=1113i,fivethous=4113i,tenthous=9113i,odd=26i,even=27i,stringu1="NMAAAA",stringu2="PAKAAA",string4="VVVVxx" 585446400000000000 +tenk unique1=537i,unique2=6776i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=537i,twothousand=537i,fivethous=537i,tenthous=537i,odd=74i,even=75i,stringu1="RUAAAA",stringu2="QAKAAA",string4="AAAAxx" 585532800000000000 +tenk unique1=6208i,unique2=6777i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=208i,twothousand=208i,fivethous=1208i,tenthous=6208i,odd=16i,even=17i,stringu1="UEAAAA",stringu2="RAKAAA",string4="HHHHxx" 585619200000000000 +tenk unique1=1626i,unique2=6778i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=626i,twothousand=1626i,fivethous=1626i,tenthous=1626i,odd=52i,even=53i,stringu1="OKAAAA",stringu2="SAKAAA",string4="OOOOxx" 585705600000000000 +tenk unique1=7188i,unique2=6779i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=188i,twothousand=1188i,fivethous=2188i,tenthous=7188i,odd=176i,even=177i,stringu1="MQAAAA",stringu2="TAKAAA",string4="VVVVxx" 585792000000000000 +tenk unique1=9216i,unique2=6780i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=216i,twothousand=1216i,fivethous=4216i,tenthous=9216i,odd=32i,even=33i,stringu1="MQAAAA",stringu2="UAKAAA",string4="AAAAxx" 585878400000000000 +tenk unique1=6134i,unique2=6781i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=134i,twothousand=134i,fivethous=1134i,tenthous=6134i,odd=68i,even=69i,stringu1="YBAAAA",stringu2="VAKAAA",string4="HHHHxx" 585964800000000000 +tenk unique1=2074i,unique2=6782i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=74i,twothousand=74i,fivethous=2074i,tenthous=2074i,odd=148i,even=149i,stringu1="UBAAAA",stringu2="WAKAAA",string4="OOOOxx" 586051200000000000 +tenk unique1=6369i,unique2=6783i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=369i,twothousand=369i,fivethous=1369i,tenthous=6369i,odd=138i,even=139i,stringu1="ZKAAAA",stringu2="XAKAAA",string4="VVVVxx" 586137600000000000 +tenk unique1=9306i,unique2=6784i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=306i,twothousand=1306i,fivethous=4306i,tenthous=9306i,odd=12i,even=13i,stringu1="YTAAAA",stringu2="YAKAAA",string4="AAAAxx" 586224000000000000 +tenk unique1=3155i,unique2=6785i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=155i,twothousand=1155i,fivethous=3155i,tenthous=3155i,odd=110i,even=111i,stringu1="JRAAAA",stringu2="ZAKAAA",string4="HHHHxx" 586310400000000000 +tenk unique1=3611i,unique2=6786i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=611i,twothousand=1611i,fivethous=3611i,tenthous=3611i,odd=22i,even=23i,stringu1="XIAAAA",stringu2="ABKAAA",string4="OOOOxx" 586396800000000000 +tenk unique1=6530i,unique2=6787i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=530i,twothousand=530i,fivethous=1530i,tenthous=6530i,odd=60i,even=61i,stringu1="ERAAAA",stringu2="BBKAAA",string4="VVVVxx" 586483200000000000 +tenk unique1=6979i,unique2=6788i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=979i,twothousand=979i,fivethous=1979i,tenthous=6979i,odd=158i,even=159i,stringu1="LIAAAA",stringu2="CBKAAA",string4="AAAAxx" 586569600000000000 +tenk unique1=9129i,unique2=6789i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=129i,twothousand=1129i,fivethous=4129i,tenthous=9129i,odd=58i,even=59i,stringu1="DNAAAA",stringu2="DBKAAA",string4="HHHHxx" 586656000000000000 +tenk unique1=8013i,unique2=6790i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=13i,twothousand=13i,fivethous=3013i,tenthous=8013i,odd=26i,even=27i,stringu1="FWAAAA",stringu2="EBKAAA",string4="OOOOxx" 586742400000000000 +tenk unique1=6926i,unique2=6791i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=926i,twothousand=926i,fivethous=1926i,tenthous=6926i,odd=52i,even=53i,stringu1="KGAAAA",stringu2="FBKAAA",string4="VVVVxx" 586828800000000000 +tenk unique1=1877i,unique2=6792i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=877i,twothousand=1877i,fivethous=1877i,tenthous=1877i,odd=154i,even=155i,stringu1="FUAAAA",stringu2="GBKAAA",string4="AAAAxx" 586915200000000000 +tenk unique1=1882i,unique2=6793i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=882i,twothousand=1882i,fivethous=1882i,tenthous=1882i,odd=164i,even=165i,stringu1="KUAAAA",stringu2="HBKAAA",string4="HHHHxx" 587001600000000000 +tenk unique1=6720i,unique2=6794i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=720i,twothousand=720i,fivethous=1720i,tenthous=6720i,odd=40i,even=41i,stringu1="MYAAAA",stringu2="IBKAAA",string4="OOOOxx" 587088000000000000 +tenk unique1=690i,unique2=6795i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=690i,twothousand=690i,fivethous=690i,tenthous=690i,odd=180i,even=181i,stringu1="OAAAAA",stringu2="JBKAAA",string4="VVVVxx" 587174400000000000 +tenk unique1=143i,unique2=6796i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=143i,twothousand=143i,fivethous=143i,tenthous=143i,odd=86i,even=87i,stringu1="NFAAAA",stringu2="KBKAAA",string4="AAAAxx" 587260800000000000 +tenk unique1=7241i,unique2=6797i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=241i,twothousand=1241i,fivethous=2241i,tenthous=7241i,odd=82i,even=83i,stringu1="NSAAAA",stringu2="LBKAAA",string4="HHHHxx" 587347200000000000 +tenk unique1=6461i,unique2=6798i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=461i,twothousand=461i,fivethous=1461i,tenthous=6461i,odd=122i,even=123i,stringu1="NOAAAA",stringu2="MBKAAA",string4="OOOOxx" 587433600000000000 +tenk unique1=2258i,unique2=6799i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=258i,twothousand=258i,fivethous=2258i,tenthous=2258i,odd=116i,even=117i,stringu1="WIAAAA",stringu2="NBKAAA",string4="VVVVxx" 587520000000000000 +tenk unique1=2280i,unique2=6800i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=280i,twothousand=280i,fivethous=2280i,tenthous=2280i,odd=160i,even=161i,stringu1="SJAAAA",stringu2="OBKAAA",string4="AAAAxx" 587606400000000000 +tenk unique1=7556i,unique2=6801i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=556i,twothousand=1556i,fivethous=2556i,tenthous=7556i,odd=112i,even=113i,stringu1="QEAAAA",stringu2="PBKAAA",string4="HHHHxx" 587692800000000000 +tenk unique1=1038i,unique2=6802i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=38i,twothousand=1038i,fivethous=1038i,tenthous=1038i,odd=76i,even=77i,stringu1="YNAAAA",stringu2="QBKAAA",string4="OOOOxx" 587779200000000000 +tenk unique1=2634i,unique2=6803i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=634i,twothousand=634i,fivethous=2634i,tenthous=2634i,odd=68i,even=69i,stringu1="IXAAAA",stringu2="RBKAAA",string4="VVVVxx" 587865600000000000 +tenk unique1=7847i,unique2=6804i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=847i,twothousand=1847i,fivethous=2847i,tenthous=7847i,odd=94i,even=95i,stringu1="VPAAAA",stringu2="SBKAAA",string4="AAAAxx" 587952000000000000 +tenk unique1=4415i,unique2=6805i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=415i,twothousand=415i,fivethous=4415i,tenthous=4415i,odd=30i,even=31i,stringu1="VNAAAA",stringu2="TBKAAA",string4="HHHHxx" 588038400000000000 +tenk unique1=1933i,unique2=6806i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=933i,twothousand=1933i,fivethous=1933i,tenthous=1933i,odd=66i,even=67i,stringu1="JWAAAA",stringu2="UBKAAA",string4="OOOOxx" 588124800000000000 +tenk unique1=8034i,unique2=6807i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=34i,twothousand=34i,fivethous=3034i,tenthous=8034i,odd=68i,even=69i,stringu1="AXAAAA",stringu2="VBKAAA",string4="VVVVxx" 588211200000000000 +tenk unique1=9233i,unique2=6808i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=233i,twothousand=1233i,fivethous=4233i,tenthous=9233i,odd=66i,even=67i,stringu1="DRAAAA",stringu2="WBKAAA",string4="AAAAxx" 588297600000000000 +tenk unique1=6572i,unique2=6809i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=572i,twothousand=572i,fivethous=1572i,tenthous=6572i,odd=144i,even=145i,stringu1="USAAAA",stringu2="XBKAAA",string4="HHHHxx" 588384000000000000 +tenk unique1=1586i,unique2=6810i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=586i,twothousand=1586i,fivethous=1586i,tenthous=1586i,odd=172i,even=173i,stringu1="AJAAAA",stringu2="YBKAAA",string4="OOOOxx" 588470400000000000 +tenk unique1=8512i,unique2=6811i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=512i,twothousand=512i,fivethous=3512i,tenthous=8512i,odd=24i,even=25i,stringu1="KPAAAA",stringu2="ZBKAAA",string4="VVVVxx" 588556800000000000 +tenk unique1=7421i,unique2=6812i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=421i,twothousand=1421i,fivethous=2421i,tenthous=7421i,odd=42i,even=43i,stringu1="LZAAAA",stringu2="ACKAAA",string4="AAAAxx" 588643200000000000 +tenk unique1=503i,unique2=6813i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=503i,twothousand=503i,fivethous=503i,tenthous=503i,odd=6i,even=7i,stringu1="JTAAAA",stringu2="BCKAAA",string4="HHHHxx" 588729600000000000 +tenk unique1=5332i,unique2=6814i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=332i,twothousand=1332i,fivethous=332i,tenthous=5332i,odd=64i,even=65i,stringu1="CXAAAA",stringu2="CCKAAA",string4="OOOOxx" 588816000000000000 +tenk unique1=2602i,unique2=6815i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=602i,twothousand=602i,fivethous=2602i,tenthous=2602i,odd=4i,even=5i,stringu1="CWAAAA",stringu2="DCKAAA",string4="VVVVxx" 588902400000000000 +tenk unique1=2902i,unique2=6816i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=902i,twothousand=902i,fivethous=2902i,tenthous=2902i,odd=4i,even=5i,stringu1="QHAAAA",stringu2="ECKAAA",string4="AAAAxx" 588988800000000000 +tenk unique1=2979i,unique2=6817i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=979i,twothousand=979i,fivethous=2979i,tenthous=2979i,odd=158i,even=159i,stringu1="PKAAAA",stringu2="FCKAAA",string4="HHHHxx" 589075200000000000 +tenk unique1=1431i,unique2=6818i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=431i,twothousand=1431i,fivethous=1431i,tenthous=1431i,odd=62i,even=63i,stringu1="BDAAAA",stringu2="GCKAAA",string4="OOOOxx" 589161600000000000 +tenk unique1=8639i,unique2=6819i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=639i,twothousand=639i,fivethous=3639i,tenthous=8639i,odd=78i,even=79i,stringu1="HUAAAA",stringu2="HCKAAA",string4="VVVVxx" 589248000000000000 +tenk unique1=4218i,unique2=6820i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=218i,twothousand=218i,fivethous=4218i,tenthous=4218i,odd=36i,even=37i,stringu1="GGAAAA",stringu2="ICKAAA",string4="AAAAxx" 589334400000000000 +tenk unique1=7453i,unique2=6821i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=453i,twothousand=1453i,fivethous=2453i,tenthous=7453i,odd=106i,even=107i,stringu1="RAAAAA",stringu2="JCKAAA",string4="HHHHxx" 589420800000000000 +tenk unique1=5448i,unique2=6822i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=448i,twothousand=1448i,fivethous=448i,tenthous=5448i,odd=96i,even=97i,stringu1="OBAAAA",stringu2="KCKAAA",string4="OOOOxx" 589507200000000000 +tenk unique1=6768i,unique2=6823i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=768i,twothousand=768i,fivethous=1768i,tenthous=6768i,odd=136i,even=137i,stringu1="IAAAAA",stringu2="LCKAAA",string4="VVVVxx" 589593600000000000 +tenk unique1=3104i,unique2=6824i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=104i,twothousand=1104i,fivethous=3104i,tenthous=3104i,odd=8i,even=9i,stringu1="KPAAAA",stringu2="MCKAAA",string4="AAAAxx" 589680000000000000 +tenk unique1=2297i,unique2=6825i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=297i,twothousand=297i,fivethous=2297i,tenthous=2297i,odd=194i,even=195i,stringu1="JKAAAA",stringu2="NCKAAA",string4="HHHHxx" 589766400000000000 +tenk unique1=7994i,unique2=6826i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=994i,twothousand=1994i,fivethous=2994i,tenthous=7994i,odd=188i,even=189i,stringu1="MVAAAA",stringu2="OCKAAA",string4="OOOOxx" 589852800000000000 +tenk unique1=550i,unique2=6827i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=550i,twothousand=550i,fivethous=550i,tenthous=550i,odd=100i,even=101i,stringu1="EVAAAA",stringu2="PCKAAA",string4="VVVVxx" 589939200000000000 +tenk unique1=4777i,unique2=6828i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=777i,twothousand=777i,fivethous=4777i,tenthous=4777i,odd=154i,even=155i,stringu1="TBAAAA",stringu2="QCKAAA",string4="AAAAxx" 590025600000000000 +tenk unique1=5962i,unique2=6829i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=962i,twothousand=1962i,fivethous=962i,tenthous=5962i,odd=124i,even=125i,stringu1="IVAAAA",stringu2="RCKAAA",string4="HHHHxx" 590112000000000000 +tenk unique1=1763i,unique2=6830i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=763i,twothousand=1763i,fivethous=1763i,tenthous=1763i,odd=126i,even=127i,stringu1="VPAAAA",stringu2="SCKAAA",string4="OOOOxx" 590198400000000000 +tenk unique1=3654i,unique2=6831i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=654i,twothousand=1654i,fivethous=3654i,tenthous=3654i,odd=108i,even=109i,stringu1="OKAAAA",stringu2="TCKAAA",string4="VVVVxx" 590284800000000000 +tenk unique1=4106i,unique2=6832i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=106i,twothousand=106i,fivethous=4106i,tenthous=4106i,odd=12i,even=13i,stringu1="YBAAAA",stringu2="UCKAAA",string4="AAAAxx" 590371200000000000 +tenk unique1=5156i,unique2=6833i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=156i,twothousand=1156i,fivethous=156i,tenthous=5156i,odd=112i,even=113i,stringu1="IQAAAA",stringu2="VCKAAA",string4="HHHHxx" 590457600000000000 +tenk unique1=422i,unique2=6834i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=422i,twothousand=422i,fivethous=422i,tenthous=422i,odd=44i,even=45i,stringu1="GQAAAA",stringu2="WCKAAA",string4="OOOOxx" 590544000000000000 +tenk unique1=5011i,unique2=6835i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=11i,twothousand=1011i,fivethous=11i,tenthous=5011i,odd=22i,even=23i,stringu1="TKAAAA",stringu2="XCKAAA",string4="VVVVxx" 590630400000000000 +tenk unique1=218i,unique2=6836i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=218i,twothousand=218i,fivethous=218i,tenthous=218i,odd=36i,even=37i,stringu1="KIAAAA",stringu2="YCKAAA",string4="AAAAxx" 590716800000000000 +tenk unique1=9762i,unique2=6837i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=762i,twothousand=1762i,fivethous=4762i,tenthous=9762i,odd=124i,even=125i,stringu1="MLAAAA",stringu2="ZCKAAA",string4="HHHHxx" 590803200000000000 +tenk unique1=6074i,unique2=6838i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=74i,twothousand=74i,fivethous=1074i,tenthous=6074i,odd=148i,even=149i,stringu1="QZAAAA",stringu2="ADKAAA",string4="OOOOxx" 590889600000000000 +tenk unique1=4060i,unique2=6839i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=60i,twothousand=60i,fivethous=4060i,tenthous=4060i,odd=120i,even=121i,stringu1="EAAAAA",stringu2="BDKAAA",string4="VVVVxx" 590976000000000000 +tenk unique1=8680i,unique2=6840i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=680i,twothousand=680i,fivethous=3680i,tenthous=8680i,odd=160i,even=161i,stringu1="WVAAAA",stringu2="CDKAAA",string4="AAAAxx" 591062400000000000 +tenk unique1=5863i,unique2=6841i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=863i,twothousand=1863i,fivethous=863i,tenthous=5863i,odd=126i,even=127i,stringu1="NRAAAA",stringu2="DDKAAA",string4="HHHHxx" 591148800000000000 +tenk unique1=8042i,unique2=6842i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=42i,twothousand=42i,fivethous=3042i,tenthous=8042i,odd=84i,even=85i,stringu1="IXAAAA",stringu2="EDKAAA",string4="OOOOxx" 591235200000000000 +tenk unique1=2964i,unique2=6843i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=964i,twothousand=964i,fivethous=2964i,tenthous=2964i,odd=128i,even=129i,stringu1="AKAAAA",stringu2="FDKAAA",string4="VVVVxx" 591321600000000000 +tenk unique1=6931i,unique2=6844i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=931i,twothousand=931i,fivethous=1931i,tenthous=6931i,odd=62i,even=63i,stringu1="PGAAAA",stringu2="GDKAAA",string4="AAAAxx" 591408000000000000 +tenk unique1=6715i,unique2=6845i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=715i,twothousand=715i,fivethous=1715i,tenthous=6715i,odd=30i,even=31i,stringu1="HYAAAA",stringu2="HDKAAA",string4="HHHHxx" 591494400000000000 +tenk unique1=5859i,unique2=6846i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=859i,twothousand=1859i,fivethous=859i,tenthous=5859i,odd=118i,even=119i,stringu1="JRAAAA",stringu2="IDKAAA",string4="OOOOxx" 591580800000000000 +tenk unique1=6173i,unique2=6847i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=173i,twothousand=173i,fivethous=1173i,tenthous=6173i,odd=146i,even=147i,stringu1="LDAAAA",stringu2="JDKAAA",string4="VVVVxx" 591667200000000000 +tenk unique1=7788i,unique2=6848i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=788i,twothousand=1788i,fivethous=2788i,tenthous=7788i,odd=176i,even=177i,stringu1="ONAAAA",stringu2="KDKAAA",string4="AAAAxx" 591753600000000000 +tenk unique1=9370i,unique2=6849i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=370i,twothousand=1370i,fivethous=4370i,tenthous=9370i,odd=140i,even=141i,stringu1="KWAAAA",stringu2="LDKAAA",string4="HHHHxx" 591840000000000000 +tenk unique1=3038i,unique2=6850i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=38i,twothousand=1038i,fivethous=3038i,tenthous=3038i,odd=76i,even=77i,stringu1="WMAAAA",stringu2="MDKAAA",string4="OOOOxx" 591926400000000000 +tenk unique1=6483i,unique2=6851i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=483i,twothousand=483i,fivethous=1483i,tenthous=6483i,odd=166i,even=167i,stringu1="JPAAAA",stringu2="NDKAAA",string4="VVVVxx" 592012800000000000 +tenk unique1=7534i,unique2=6852i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=534i,twothousand=1534i,fivethous=2534i,tenthous=7534i,odd=68i,even=69i,stringu1="UDAAAA",stringu2="ODKAAA",string4="AAAAxx" 592099200000000000 +tenk unique1=5769i,unique2=6853i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=769i,twothousand=1769i,fivethous=769i,tenthous=5769i,odd=138i,even=139i,stringu1="XNAAAA",stringu2="PDKAAA",string4="HHHHxx" 592185600000000000 +tenk unique1=9152i,unique2=6854i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=152i,twothousand=1152i,fivethous=4152i,tenthous=9152i,odd=104i,even=105i,stringu1="AOAAAA",stringu2="QDKAAA",string4="OOOOxx" 592272000000000000 +tenk unique1=6251i,unique2=6855i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=251i,twothousand=251i,fivethous=1251i,tenthous=6251i,odd=102i,even=103i,stringu1="LGAAAA",stringu2="RDKAAA",string4="VVVVxx" 592358400000000000 +tenk unique1=9209i,unique2=6856i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=209i,twothousand=1209i,fivethous=4209i,tenthous=9209i,odd=18i,even=19i,stringu1="FQAAAA",stringu2="SDKAAA",string4="AAAAxx" 592444800000000000 +tenk unique1=5365i,unique2=6857i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=365i,twothousand=1365i,fivethous=365i,tenthous=5365i,odd=130i,even=131i,stringu1="JYAAAA",stringu2="TDKAAA",string4="HHHHxx" 592531200000000000 +tenk unique1=509i,unique2=6858i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=509i,twothousand=509i,fivethous=509i,tenthous=509i,odd=18i,even=19i,stringu1="PTAAAA",stringu2="UDKAAA",string4="OOOOxx" 592617600000000000 +tenk unique1=3132i,unique2=6859i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=132i,twothousand=1132i,fivethous=3132i,tenthous=3132i,odd=64i,even=65i,stringu1="MQAAAA",stringu2="VDKAAA",string4="VVVVxx" 592704000000000000 +tenk unique1=5373i,unique2=6860i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=373i,twothousand=1373i,fivethous=373i,tenthous=5373i,odd=146i,even=147i,stringu1="RYAAAA",stringu2="WDKAAA",string4="AAAAxx" 592790400000000000 +tenk unique1=4247i,unique2=6861i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=247i,twothousand=247i,fivethous=4247i,tenthous=4247i,odd=94i,even=95i,stringu1="JHAAAA",stringu2="XDKAAA",string4="HHHHxx" 592876800000000000 +tenk unique1=3491i,unique2=6862i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=491i,twothousand=1491i,fivethous=3491i,tenthous=3491i,odd=182i,even=183i,stringu1="HEAAAA",stringu2="YDKAAA",string4="OOOOxx" 592963200000000000 +tenk unique1=495i,unique2=6863i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=495i,twothousand=495i,fivethous=495i,tenthous=495i,odd=190i,even=191i,stringu1="BTAAAA",stringu2="ZDKAAA",string4="VVVVxx" 593049600000000000 +tenk unique1=1594i,unique2=6864i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=594i,twothousand=1594i,fivethous=1594i,tenthous=1594i,odd=188i,even=189i,stringu1="IJAAAA",stringu2="AEKAAA",string4="AAAAxx" 593136000000000000 +tenk unique1=2243i,unique2=6865i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=243i,twothousand=243i,fivethous=2243i,tenthous=2243i,odd=86i,even=87i,stringu1="HIAAAA",stringu2="BEKAAA",string4="HHHHxx" 593222400000000000 +tenk unique1=7780i,unique2=6866i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=780i,twothousand=1780i,fivethous=2780i,tenthous=7780i,odd=160i,even=161i,stringu1="GNAAAA",stringu2="CEKAAA",string4="OOOOxx" 593308800000000000 +tenk unique1=5632i,unique2=6867i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=632i,twothousand=1632i,fivethous=632i,tenthous=5632i,odd=64i,even=65i,stringu1="QIAAAA",stringu2="DEKAAA",string4="VVVVxx" 593395200000000000 +tenk unique1=2679i,unique2=6868i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=679i,twothousand=679i,fivethous=2679i,tenthous=2679i,odd=158i,even=159i,stringu1="BZAAAA",stringu2="EEKAAA",string4="AAAAxx" 593481600000000000 +tenk unique1=1354i,unique2=6869i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=354i,twothousand=1354i,fivethous=1354i,tenthous=1354i,odd=108i,even=109i,stringu1="CAAAAA",stringu2="FEKAAA",string4="HHHHxx" 593568000000000000 +tenk unique1=180i,unique2=6870i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=180i,twothousand=180i,fivethous=180i,tenthous=180i,odd=160i,even=161i,stringu1="YGAAAA",stringu2="GEKAAA",string4="OOOOxx" 593654400000000000 +tenk unique1=7017i,unique2=6871i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=17i,twothousand=1017i,fivethous=2017i,tenthous=7017i,odd=34i,even=35i,stringu1="XJAAAA",stringu2="HEKAAA",string4="VVVVxx" 593740800000000000 +tenk unique1=1867i,unique2=6872i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=867i,twothousand=1867i,fivethous=1867i,tenthous=1867i,odd=134i,even=135i,stringu1="VTAAAA",stringu2="IEKAAA",string4="AAAAxx" 593827200000000000 +tenk unique1=2213i,unique2=6873i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=213i,twothousand=213i,fivethous=2213i,tenthous=2213i,odd=26i,even=27i,stringu1="DHAAAA",stringu2="JEKAAA",string4="HHHHxx" 593913600000000000 +tenk unique1=8773i,unique2=6874i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=773i,twothousand=773i,fivethous=3773i,tenthous=8773i,odd=146i,even=147i,stringu1="LZAAAA",stringu2="KEKAAA",string4="OOOOxx" 594000000000000000 +tenk unique1=1784i,unique2=6875i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=784i,twothousand=1784i,fivethous=1784i,tenthous=1784i,odd=168i,even=169i,stringu1="QQAAAA",stringu2="LEKAAA",string4="VVVVxx" 594086400000000000 +tenk unique1=5961i,unique2=6876i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=961i,twothousand=1961i,fivethous=961i,tenthous=5961i,odd=122i,even=123i,stringu1="HVAAAA",stringu2="MEKAAA",string4="AAAAxx" 594172800000000000 +tenk unique1=8801i,unique2=6877i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=801i,twothousand=801i,fivethous=3801i,tenthous=8801i,odd=2i,even=3i,stringu1="NAAAAA",stringu2="NEKAAA",string4="HHHHxx" 594259200000000000 +tenk unique1=4860i,unique2=6878i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=860i,twothousand=860i,fivethous=4860i,tenthous=4860i,odd=120i,even=121i,stringu1="YEAAAA",stringu2="OEKAAA",string4="OOOOxx" 594345600000000000 +tenk unique1=2214i,unique2=6879i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=214i,twothousand=214i,fivethous=2214i,tenthous=2214i,odd=28i,even=29i,stringu1="EHAAAA",stringu2="PEKAAA",string4="VVVVxx" 594432000000000000 +tenk unique1=1735i,unique2=6880i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=735i,twothousand=1735i,fivethous=1735i,tenthous=1735i,odd=70i,even=71i,stringu1="TOAAAA",stringu2="QEKAAA",string4="AAAAxx" 594518400000000000 +tenk unique1=578i,unique2=6881i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=578i,twothousand=578i,fivethous=578i,tenthous=578i,odd=156i,even=157i,stringu1="GWAAAA",stringu2="REKAAA",string4="HHHHxx" 594604800000000000 +tenk unique1=7853i,unique2=6882i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=853i,twothousand=1853i,fivethous=2853i,tenthous=7853i,odd=106i,even=107i,stringu1="BQAAAA",stringu2="SEKAAA",string4="OOOOxx" 594691200000000000 +tenk unique1=2215i,unique2=6883i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=215i,twothousand=215i,fivethous=2215i,tenthous=2215i,odd=30i,even=31i,stringu1="FHAAAA",stringu2="TEKAAA",string4="VVVVxx" 594777600000000000 +tenk unique1=4704i,unique2=6884i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=704i,twothousand=704i,fivethous=4704i,tenthous=4704i,odd=8i,even=9i,stringu1="YYAAAA",stringu2="UEKAAA",string4="AAAAxx" 594864000000000000 +tenk unique1=9379i,unique2=6885i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=379i,twothousand=1379i,fivethous=4379i,tenthous=9379i,odd=158i,even=159i,stringu1="TWAAAA",stringu2="VEKAAA",string4="HHHHxx" 594950400000000000 +tenk unique1=9745i,unique2=6886i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=745i,twothousand=1745i,fivethous=4745i,tenthous=9745i,odd=90i,even=91i,stringu1="VKAAAA",stringu2="WEKAAA",string4="OOOOxx" 595036800000000000 +tenk unique1=5636i,unique2=6887i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=636i,twothousand=1636i,fivethous=636i,tenthous=5636i,odd=72i,even=73i,stringu1="UIAAAA",stringu2="XEKAAA",string4="VVVVxx" 595123200000000000 +tenk unique1=4548i,unique2=6888i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=548i,twothousand=548i,fivethous=4548i,tenthous=4548i,odd=96i,even=97i,stringu1="YSAAAA",stringu2="YEKAAA",string4="AAAAxx" 595209600000000000 +tenk unique1=6537i,unique2=6889i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=537i,twothousand=537i,fivethous=1537i,tenthous=6537i,odd=74i,even=75i,stringu1="LRAAAA",stringu2="ZEKAAA",string4="HHHHxx" 595296000000000000 +tenk unique1=7748i,unique2=6890i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=748i,twothousand=1748i,fivethous=2748i,tenthous=7748i,odd=96i,even=97i,stringu1="AMAAAA",stringu2="AFKAAA",string4="OOOOxx" 595382400000000000 +tenk unique1=687i,unique2=6891i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=687i,twothousand=687i,fivethous=687i,tenthous=687i,odd=174i,even=175i,stringu1="LAAAAA",stringu2="BFKAAA",string4="VVVVxx" 595468800000000000 +tenk unique1=1243i,unique2=6892i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=243i,twothousand=1243i,fivethous=1243i,tenthous=1243i,odd=86i,even=87i,stringu1="VVAAAA",stringu2="CFKAAA",string4="AAAAxx" 595555200000000000 +tenk unique1=852i,unique2=6893i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=852i,twothousand=852i,fivethous=852i,tenthous=852i,odd=104i,even=105i,stringu1="UGAAAA",stringu2="DFKAAA",string4="HHHHxx" 595641600000000000 +tenk unique1=785i,unique2=6894i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=785i,twothousand=785i,fivethous=785i,tenthous=785i,odd=170i,even=171i,stringu1="FEAAAA",stringu2="EFKAAA",string4="OOOOxx" 595728000000000000 +tenk unique1=2002i,unique2=6895i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=2i,fivethous=2002i,tenthous=2002i,odd=4i,even=5i,stringu1="AZAAAA",stringu2="FFKAAA",string4="VVVVxx" 595814400000000000 +tenk unique1=2748i,unique2=6896i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=748i,twothousand=748i,fivethous=2748i,tenthous=2748i,odd=96i,even=97i,stringu1="SBAAAA",stringu2="GFKAAA",string4="AAAAxx" 595900800000000000 +tenk unique1=6075i,unique2=6897i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=75i,twothousand=75i,fivethous=1075i,tenthous=6075i,odd=150i,even=151i,stringu1="RZAAAA",stringu2="HFKAAA",string4="HHHHxx" 595987200000000000 +tenk unique1=7029i,unique2=6898i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=29i,twothousand=1029i,fivethous=2029i,tenthous=7029i,odd=58i,even=59i,stringu1="JKAAAA",stringu2="IFKAAA",string4="OOOOxx" 596073600000000000 +tenk unique1=7474i,unique2=6899i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=474i,twothousand=1474i,fivethous=2474i,tenthous=7474i,odd=148i,even=149i,stringu1="MBAAAA",stringu2="JFKAAA",string4="VVVVxx" 596160000000000000 +tenk unique1=7755i,unique2=6900i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=755i,twothousand=1755i,fivethous=2755i,tenthous=7755i,odd=110i,even=111i,stringu1="HMAAAA",stringu2="KFKAAA",string4="AAAAxx" 596246400000000000 +tenk unique1=1456i,unique2=6901i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=456i,twothousand=1456i,fivethous=1456i,tenthous=1456i,odd=112i,even=113i,stringu1="AEAAAA",stringu2="LFKAAA",string4="HHHHxx" 596332800000000000 +tenk unique1=2808i,unique2=6902i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=808i,twothousand=808i,fivethous=2808i,tenthous=2808i,odd=16i,even=17i,stringu1="AEAAAA",stringu2="MFKAAA",string4="OOOOxx" 596419200000000000 +tenk unique1=4089i,unique2=6903i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=89i,twothousand=89i,fivethous=4089i,tenthous=4089i,odd=178i,even=179i,stringu1="HBAAAA",stringu2="NFKAAA",string4="VVVVxx" 596505600000000000 +tenk unique1=4718i,unique2=6904i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=718i,twothousand=718i,fivethous=4718i,tenthous=4718i,odd=36i,even=37i,stringu1="MZAAAA",stringu2="OFKAAA",string4="AAAAxx" 596592000000000000 +tenk unique1=910i,unique2=6905i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=910i,twothousand=910i,fivethous=910i,tenthous=910i,odd=20i,even=21i,stringu1="AJAAAA",stringu2="PFKAAA",string4="HHHHxx" 596678400000000000 +tenk unique1=2868i,unique2=6906i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=868i,twothousand=868i,fivethous=2868i,tenthous=2868i,odd=136i,even=137i,stringu1="IGAAAA",stringu2="QFKAAA",string4="OOOOxx" 596764800000000000 +tenk unique1=2103i,unique2=6907i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=103i,twothousand=103i,fivethous=2103i,tenthous=2103i,odd=6i,even=7i,stringu1="XCAAAA",stringu2="RFKAAA",string4="VVVVxx" 596851200000000000 +tenk unique1=2407i,unique2=6908i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=407i,twothousand=407i,fivethous=2407i,tenthous=2407i,odd=14i,even=15i,stringu1="POAAAA",stringu2="SFKAAA",string4="AAAAxx" 596937600000000000 +tenk unique1=4353i,unique2=6909i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=353i,twothousand=353i,fivethous=4353i,tenthous=4353i,odd=106i,even=107i,stringu1="LLAAAA",stringu2="TFKAAA",string4="HHHHxx" 597024000000000000 +tenk unique1=7988i,unique2=6910i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=988i,twothousand=1988i,fivethous=2988i,tenthous=7988i,odd=176i,even=177i,stringu1="GVAAAA",stringu2="UFKAAA",string4="OOOOxx" 597110400000000000 +tenk unique1=2750i,unique2=6911i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=750i,twothousand=750i,fivethous=2750i,tenthous=2750i,odd=100i,even=101i,stringu1="UBAAAA",stringu2="VFKAAA",string4="VVVVxx" 597196800000000000 +tenk unique1=2006i,unique2=6912i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=6i,fivethous=2006i,tenthous=2006i,odd=12i,even=13i,stringu1="EZAAAA",stringu2="WFKAAA",string4="AAAAxx" 597283200000000000 +tenk unique1=4617i,unique2=6913i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=617i,twothousand=617i,fivethous=4617i,tenthous=4617i,odd=34i,even=35i,stringu1="PVAAAA",stringu2="XFKAAA",string4="HHHHxx" 597369600000000000 +tenk unique1=1251i,unique2=6914i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=251i,twothousand=1251i,fivethous=1251i,tenthous=1251i,odd=102i,even=103i,stringu1="DWAAAA",stringu2="YFKAAA",string4="OOOOxx" 597456000000000000 +tenk unique1=4590i,unique2=6915i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=590i,twothousand=590i,fivethous=4590i,tenthous=4590i,odd=180i,even=181i,stringu1="OUAAAA",stringu2="ZFKAAA",string4="VVVVxx" 597542400000000000 +tenk unique1=1144i,unique2=6916i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=144i,twothousand=1144i,fivethous=1144i,tenthous=1144i,odd=88i,even=89i,stringu1="ASAAAA",stringu2="AGKAAA",string4="AAAAxx" 597628800000000000 +tenk unique1=7131i,unique2=6917i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=131i,twothousand=1131i,fivethous=2131i,tenthous=7131i,odd=62i,even=63i,stringu1="HOAAAA",stringu2="BGKAAA",string4="HHHHxx" 597715200000000000 +tenk unique1=95i,unique2=6918i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=95i,twothousand=95i,fivethous=95i,tenthous=95i,odd=190i,even=191i,stringu1="RDAAAA",stringu2="CGKAAA",string4="OOOOxx" 597801600000000000 +tenk unique1=4827i,unique2=6919i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=827i,twothousand=827i,fivethous=4827i,tenthous=4827i,odd=54i,even=55i,stringu1="RDAAAA",stringu2="DGKAAA",string4="VVVVxx" 597888000000000000 +tenk unique1=4307i,unique2=6920i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=307i,twothousand=307i,fivethous=4307i,tenthous=4307i,odd=14i,even=15i,stringu1="RJAAAA",stringu2="EGKAAA",string4="AAAAxx" 597974400000000000 +tenk unique1=1505i,unique2=6921i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=505i,twothousand=1505i,fivethous=1505i,tenthous=1505i,odd=10i,even=11i,stringu1="XFAAAA",stringu2="FGKAAA",string4="HHHHxx" 598060800000000000 +tenk unique1=8191i,unique2=6922i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=191i,twothousand=191i,fivethous=3191i,tenthous=8191i,odd=182i,even=183i,stringu1="BDAAAA",stringu2="GGKAAA",string4="OOOOxx" 598147200000000000 +tenk unique1=5037i,unique2=6923i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=37i,twothousand=1037i,fivethous=37i,tenthous=5037i,odd=74i,even=75i,stringu1="TLAAAA",stringu2="HGKAAA",string4="VVVVxx" 598233600000000000 +tenk unique1=7363i,unique2=6924i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=363i,twothousand=1363i,fivethous=2363i,tenthous=7363i,odd=126i,even=127i,stringu1="FXAAAA",stringu2="IGKAAA",string4="AAAAxx" 598320000000000000 +tenk unique1=8427i,unique2=6925i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=427i,twothousand=427i,fivethous=3427i,tenthous=8427i,odd=54i,even=55i,stringu1="DMAAAA",stringu2="JGKAAA",string4="HHHHxx" 598406400000000000 +tenk unique1=5231i,unique2=6926i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=231i,twothousand=1231i,fivethous=231i,tenthous=5231i,odd=62i,even=63i,stringu1="FTAAAA",stringu2="KGKAAA",string4="OOOOxx" 598492800000000000 +tenk unique1=2943i,unique2=6927i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=943i,twothousand=943i,fivethous=2943i,tenthous=2943i,odd=86i,even=87i,stringu1="FJAAAA",stringu2="LGKAAA",string4="VVVVxx" 598579200000000000 +tenk unique1=4624i,unique2=6928i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=624i,twothousand=624i,fivethous=4624i,tenthous=4624i,odd=48i,even=49i,stringu1="WVAAAA",stringu2="MGKAAA",string4="AAAAxx" 598665600000000000 +tenk unique1=2020i,unique2=6929i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=20i,twothousand=20i,fivethous=2020i,tenthous=2020i,odd=40i,even=41i,stringu1="SZAAAA",stringu2="NGKAAA",string4="HHHHxx" 598752000000000000 +tenk unique1=6155i,unique2=6930i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=155i,twothousand=155i,fivethous=1155i,tenthous=6155i,odd=110i,even=111i,stringu1="TCAAAA",stringu2="OGKAAA",string4="OOOOxx" 598838400000000000 +tenk unique1=4381i,unique2=6931i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=381i,twothousand=381i,fivethous=4381i,tenthous=4381i,odd=162i,even=163i,stringu1="NMAAAA",stringu2="PGKAAA",string4="VVVVxx" 598924800000000000 +tenk unique1=1057i,unique2=6932i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=57i,twothousand=1057i,fivethous=1057i,tenthous=1057i,odd=114i,even=115i,stringu1="ROAAAA",stringu2="QGKAAA",string4="AAAAxx" 599011200000000000 +tenk unique1=9010i,unique2=6933i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=10i,twothousand=1010i,fivethous=4010i,tenthous=9010i,odd=20i,even=21i,stringu1="OIAAAA",stringu2="RGKAAA",string4="HHHHxx" 599097600000000000 +tenk unique1=4947i,unique2=6934i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=947i,twothousand=947i,fivethous=4947i,tenthous=4947i,odd=94i,even=95i,stringu1="HIAAAA",stringu2="SGKAAA",string4="OOOOxx" 599184000000000000 +tenk unique1=335i,unique2=6935i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=335i,twothousand=335i,fivethous=335i,tenthous=335i,odd=70i,even=71i,stringu1="XMAAAA",stringu2="TGKAAA",string4="VVVVxx" 599270400000000000 +tenk unique1=6890i,unique2=6936i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=890i,twothousand=890i,fivethous=1890i,tenthous=6890i,odd=180i,even=181i,stringu1="AFAAAA",stringu2="UGKAAA",string4="AAAAxx" 599356800000000000 +tenk unique1=5070i,unique2=6937i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=70i,twothousand=1070i,fivethous=70i,tenthous=5070i,odd=140i,even=141i,stringu1="ANAAAA",stringu2="VGKAAA",string4="HHHHxx" 599443200000000000 +tenk unique1=5270i,unique2=6938i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=270i,twothousand=1270i,fivethous=270i,tenthous=5270i,odd=140i,even=141i,stringu1="SUAAAA",stringu2="WGKAAA",string4="OOOOxx" 599529600000000000 +tenk unique1=8657i,unique2=6939i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=657i,twothousand=657i,fivethous=3657i,tenthous=8657i,odd=114i,even=115i,stringu1="ZUAAAA",stringu2="XGKAAA",string4="VVVVxx" 599616000000000000 +tenk unique1=7625i,unique2=6940i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=625i,twothousand=1625i,fivethous=2625i,tenthous=7625i,odd=50i,even=51i,stringu1="HHAAAA",stringu2="YGKAAA",string4="AAAAxx" 599702400000000000 +tenk unique1=5759i,unique2=6941i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=759i,twothousand=1759i,fivethous=759i,tenthous=5759i,odd=118i,even=119i,stringu1="NNAAAA",stringu2="ZGKAAA",string4="HHHHxx" 599788800000000000 +tenk unique1=9483i,unique2=6942i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=483i,twothousand=1483i,fivethous=4483i,tenthous=9483i,odd=166i,even=167i,stringu1="TAAAAA",stringu2="AHKAAA",string4="OOOOxx" 599875200000000000 +tenk unique1=8304i,unique2=6943i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=304i,twothousand=304i,fivethous=3304i,tenthous=8304i,odd=8i,even=9i,stringu1="KHAAAA",stringu2="BHKAAA",string4="VVVVxx" 599961600000000000 +tenk unique1=296i,unique2=6944i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=296i,twothousand=296i,fivethous=296i,tenthous=296i,odd=192i,even=193i,stringu1="KLAAAA",stringu2="CHKAAA",string4="AAAAxx" 600048000000000000 +tenk unique1=1176i,unique2=6945i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=176i,twothousand=1176i,fivethous=1176i,tenthous=1176i,odd=152i,even=153i,stringu1="GTAAAA",stringu2="DHKAAA",string4="HHHHxx" 600134400000000000 +tenk unique1=2069i,unique2=6946i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=69i,twothousand=69i,fivethous=2069i,tenthous=2069i,odd=138i,even=139i,stringu1="PBAAAA",stringu2="EHKAAA",string4="OOOOxx" 600220800000000000 +tenk unique1=1531i,unique2=6947i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=531i,twothousand=1531i,fivethous=1531i,tenthous=1531i,odd=62i,even=63i,stringu1="XGAAAA",stringu2="FHKAAA",string4="VVVVxx" 600307200000000000 +tenk unique1=5329i,unique2=6948i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=329i,twothousand=1329i,fivethous=329i,tenthous=5329i,odd=58i,even=59i,stringu1="ZWAAAA",stringu2="GHKAAA",string4="AAAAxx" 600393600000000000 +tenk unique1=3702i,unique2=6949i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=702i,twothousand=1702i,fivethous=3702i,tenthous=3702i,odd=4i,even=5i,stringu1="KMAAAA",stringu2="HHKAAA",string4="HHHHxx" 600480000000000000 +tenk unique1=6520i,unique2=6950i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=520i,twothousand=520i,fivethous=1520i,tenthous=6520i,odd=40i,even=41i,stringu1="UQAAAA",stringu2="IHKAAA",string4="OOOOxx" 600566400000000000 +tenk unique1=7310i,unique2=6951i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=310i,twothousand=1310i,fivethous=2310i,tenthous=7310i,odd=20i,even=21i,stringu1="EVAAAA",stringu2="JHKAAA",string4="VVVVxx" 600652800000000000 +tenk unique1=1175i,unique2=6952i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=175i,twothousand=1175i,fivethous=1175i,tenthous=1175i,odd=150i,even=151i,stringu1="FTAAAA",stringu2="KHKAAA",string4="AAAAxx" 600739200000000000 +tenk unique1=9107i,unique2=6953i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=107i,twothousand=1107i,fivethous=4107i,tenthous=9107i,odd=14i,even=15i,stringu1="HMAAAA",stringu2="LHKAAA",string4="HHHHxx" 600825600000000000 +tenk unique1=2737i,unique2=6954i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=737i,twothousand=737i,fivethous=2737i,tenthous=2737i,odd=74i,even=75i,stringu1="HBAAAA",stringu2="MHKAAA",string4="OOOOxx" 600912000000000000 +tenk unique1=3437i,unique2=6955i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=437i,twothousand=1437i,fivethous=3437i,tenthous=3437i,odd=74i,even=75i,stringu1="FCAAAA",stringu2="NHKAAA",string4="VVVVxx" 600998400000000000 +tenk unique1=281i,unique2=6956i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=281i,twothousand=281i,fivethous=281i,tenthous=281i,odd=162i,even=163i,stringu1="VKAAAA",stringu2="OHKAAA",string4="AAAAxx" 601084800000000000 +tenk unique1=6676i,unique2=6957i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=676i,twothousand=676i,fivethous=1676i,tenthous=6676i,odd=152i,even=153i,stringu1="UWAAAA",stringu2="PHKAAA",string4="HHHHxx" 601171200000000000 +tenk unique1=145i,unique2=6958i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=145i,twothousand=145i,fivethous=145i,tenthous=145i,odd=90i,even=91i,stringu1="PFAAAA",stringu2="QHKAAA",string4="OOOOxx" 601257600000000000 +tenk unique1=3172i,unique2=6959i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=172i,twothousand=1172i,fivethous=3172i,tenthous=3172i,odd=144i,even=145i,stringu1="ASAAAA",stringu2="RHKAAA",string4="VVVVxx" 601344000000000000 +tenk unique1=4049i,unique2=6960i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=49i,twothousand=49i,fivethous=4049i,tenthous=4049i,odd=98i,even=99i,stringu1="TZAAAA",stringu2="SHKAAA",string4="AAAAxx" 601430400000000000 +tenk unique1=6042i,unique2=6961i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=42i,twothousand=42i,fivethous=1042i,tenthous=6042i,odd=84i,even=85i,stringu1="KYAAAA",stringu2="THKAAA",string4="HHHHxx" 601516800000000000 +tenk unique1=9122i,unique2=6962i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=122i,twothousand=1122i,fivethous=4122i,tenthous=9122i,odd=44i,even=45i,stringu1="WMAAAA",stringu2="UHKAAA",string4="OOOOxx" 601603200000000000 +tenk unique1=7244i,unique2=6963i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=244i,twothousand=1244i,fivethous=2244i,tenthous=7244i,odd=88i,even=89i,stringu1="QSAAAA",stringu2="VHKAAA",string4="VVVVxx" 601689600000000000 +tenk unique1=5361i,unique2=6964i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=361i,twothousand=1361i,fivethous=361i,tenthous=5361i,odd=122i,even=123i,stringu1="FYAAAA",stringu2="WHKAAA",string4="AAAAxx" 601776000000000000 +tenk unique1=8647i,unique2=6965i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=647i,twothousand=647i,fivethous=3647i,tenthous=8647i,odd=94i,even=95i,stringu1="PUAAAA",stringu2="XHKAAA",string4="HHHHxx" 601862400000000000 +tenk unique1=7956i,unique2=6966i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=956i,twothousand=1956i,fivethous=2956i,tenthous=7956i,odd=112i,even=113i,stringu1="AUAAAA",stringu2="YHKAAA",string4="OOOOxx" 601948800000000000 +tenk unique1=7812i,unique2=6967i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=812i,twothousand=1812i,fivethous=2812i,tenthous=7812i,odd=24i,even=25i,stringu1="MOAAAA",stringu2="ZHKAAA",string4="VVVVxx" 602035200000000000 +tenk unique1=570i,unique2=6968i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=570i,twothousand=570i,fivethous=570i,tenthous=570i,odd=140i,even=141i,stringu1="YVAAAA",stringu2="AIKAAA",string4="AAAAxx" 602121600000000000 +tenk unique1=4115i,unique2=6969i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=115i,twothousand=115i,fivethous=4115i,tenthous=4115i,odd=30i,even=31i,stringu1="HCAAAA",stringu2="BIKAAA",string4="HHHHxx" 602208000000000000 +tenk unique1=1856i,unique2=6970i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=856i,twothousand=1856i,fivethous=1856i,tenthous=1856i,odd=112i,even=113i,stringu1="KTAAAA",stringu2="CIKAAA",string4="OOOOxx" 602294400000000000 +tenk unique1=9582i,unique2=6971i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=582i,twothousand=1582i,fivethous=4582i,tenthous=9582i,odd=164i,even=165i,stringu1="OEAAAA",stringu2="DIKAAA",string4="VVVVxx" 602380800000000000 +tenk unique1=2025i,unique2=6972i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=25i,twothousand=25i,fivethous=2025i,tenthous=2025i,odd=50i,even=51i,stringu1="XZAAAA",stringu2="EIKAAA",string4="AAAAxx" 602467200000000000 +tenk unique1=986i,unique2=6973i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=986i,twothousand=986i,fivethous=986i,tenthous=986i,odd=172i,even=173i,stringu1="YLAAAA",stringu2="FIKAAA",string4="HHHHxx" 602553600000000000 +tenk unique1=8358i,unique2=6974i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=358i,twothousand=358i,fivethous=3358i,tenthous=8358i,odd=116i,even=117i,stringu1="MJAAAA",stringu2="GIKAAA",string4="OOOOxx" 602640000000000000 +tenk unique1=510i,unique2=6975i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=510i,twothousand=510i,fivethous=510i,tenthous=510i,odd=20i,even=21i,stringu1="QTAAAA",stringu2="HIKAAA",string4="VVVVxx" 602726400000000000 +tenk unique1=6101i,unique2=6976i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=101i,twothousand=101i,fivethous=1101i,tenthous=6101i,odd=2i,even=3i,stringu1="RAAAAA",stringu2="IIKAAA",string4="AAAAxx" 602812800000000000 +tenk unique1=4167i,unique2=6977i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=167i,twothousand=167i,fivethous=4167i,tenthous=4167i,odd=134i,even=135i,stringu1="HEAAAA",stringu2="JIKAAA",string4="HHHHxx" 602899200000000000 +tenk unique1=6139i,unique2=6978i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=139i,twothousand=139i,fivethous=1139i,tenthous=6139i,odd=78i,even=79i,stringu1="DCAAAA",stringu2="KIKAAA",string4="OOOOxx" 602985600000000000 +tenk unique1=6912i,unique2=6979i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=912i,twothousand=912i,fivethous=1912i,tenthous=6912i,odd=24i,even=25i,stringu1="WFAAAA",stringu2="LIKAAA",string4="VVVVxx" 603072000000000000 +tenk unique1=339i,unique2=6980i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=339i,twothousand=339i,fivethous=339i,tenthous=339i,odd=78i,even=79i,stringu1="BNAAAA",stringu2="MIKAAA",string4="AAAAxx" 603158400000000000 +tenk unique1=8759i,unique2=6981i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=759i,twothousand=759i,fivethous=3759i,tenthous=8759i,odd=118i,even=119i,stringu1="XYAAAA",stringu2="NIKAAA",string4="HHHHxx" 603244800000000000 +tenk unique1=246i,unique2=6982i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=246i,twothousand=246i,fivethous=246i,tenthous=246i,odd=92i,even=93i,stringu1="MJAAAA",stringu2="OIKAAA",string4="OOOOxx" 603331200000000000 +tenk unique1=2831i,unique2=6983i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=831i,twothousand=831i,fivethous=2831i,tenthous=2831i,odd=62i,even=63i,stringu1="XEAAAA",stringu2="PIKAAA",string4="VVVVxx" 603417600000000000 +tenk unique1=2327i,unique2=6984i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=327i,twothousand=327i,fivethous=2327i,tenthous=2327i,odd=54i,even=55i,stringu1="NLAAAA",stringu2="QIKAAA",string4="AAAAxx" 603504000000000000 +tenk unique1=7001i,unique2=6985i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1001i,fivethous=2001i,tenthous=7001i,odd=2i,even=3i,stringu1="HJAAAA",stringu2="RIKAAA",string4="HHHHxx" 603590400000000000 +tenk unique1=4398i,unique2=6986i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=398i,twothousand=398i,fivethous=4398i,tenthous=4398i,odd=196i,even=197i,stringu1="ENAAAA",stringu2="SIKAAA",string4="OOOOxx" 603676800000000000 +tenk unique1=1495i,unique2=6987i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=495i,twothousand=1495i,fivethous=1495i,tenthous=1495i,odd=190i,even=191i,stringu1="NFAAAA",stringu2="TIKAAA",string4="VVVVxx" 603763200000000000 +tenk unique1=8522i,unique2=6988i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=522i,twothousand=522i,fivethous=3522i,tenthous=8522i,odd=44i,even=45i,stringu1="UPAAAA",stringu2="UIKAAA",string4="AAAAxx" 603849600000000000 +tenk unique1=7090i,unique2=6989i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=90i,twothousand=1090i,fivethous=2090i,tenthous=7090i,odd=180i,even=181i,stringu1="SMAAAA",stringu2="VIKAAA",string4="HHHHxx" 603936000000000000 +tenk unique1=8457i,unique2=6990i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=457i,twothousand=457i,fivethous=3457i,tenthous=8457i,odd=114i,even=115i,stringu1="HNAAAA",stringu2="WIKAAA",string4="OOOOxx" 604022400000000000 +tenk unique1=4238i,unique2=6991i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=238i,twothousand=238i,fivethous=4238i,tenthous=4238i,odd=76i,even=77i,stringu1="AHAAAA",stringu2="XIKAAA",string4="VVVVxx" 604108800000000000 +tenk unique1=6791i,unique2=6992i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=791i,twothousand=791i,fivethous=1791i,tenthous=6791i,odd=182i,even=183i,stringu1="FBAAAA",stringu2="YIKAAA",string4="AAAAxx" 604195200000000000 +tenk unique1=1342i,unique2=6993i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=342i,twothousand=1342i,fivethous=1342i,tenthous=1342i,odd=84i,even=85i,stringu1="QZAAAA",stringu2="ZIKAAA",string4="HHHHxx" 604281600000000000 +tenk unique1=4580i,unique2=6994i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=580i,twothousand=580i,fivethous=4580i,tenthous=4580i,odd=160i,even=161i,stringu1="EUAAAA",stringu2="AJKAAA",string4="OOOOxx" 604368000000000000 +tenk unique1=1475i,unique2=6995i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=475i,twothousand=1475i,fivethous=1475i,tenthous=1475i,odd=150i,even=151i,stringu1="TEAAAA",stringu2="BJKAAA",string4="VVVVxx" 604454400000000000 +tenk unique1=9184i,unique2=6996i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=184i,twothousand=1184i,fivethous=4184i,tenthous=9184i,odd=168i,even=169i,stringu1="GPAAAA",stringu2="CJKAAA",string4="AAAAxx" 604540800000000000 +tenk unique1=1189i,unique2=6997i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=189i,twothousand=1189i,fivethous=1189i,tenthous=1189i,odd=178i,even=179i,stringu1="TTAAAA",stringu2="DJKAAA",string4="HHHHxx" 604627200000000000 +tenk unique1=638i,unique2=6998i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=638i,twothousand=638i,fivethous=638i,tenthous=638i,odd=76i,even=77i,stringu1="OYAAAA",stringu2="EJKAAA",string4="OOOOxx" 604713600000000000 +tenk unique1=5867i,unique2=6999i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=867i,twothousand=1867i,fivethous=867i,tenthous=5867i,odd=134i,even=135i,stringu1="RRAAAA",stringu2="FJKAAA",string4="VVVVxx" 604800000000000000 +tenk unique1=9911i,unique2=7000i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=911i,twothousand=1911i,fivethous=4911i,tenthous=9911i,odd=22i,even=23i,stringu1="FRAAAA",stringu2="GJKAAA",string4="AAAAxx" 604886400000000000 +tenk unique1=8147i,unique2=7001i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=147i,twothousand=147i,fivethous=3147i,tenthous=8147i,odd=94i,even=95i,stringu1="JBAAAA",stringu2="HJKAAA",string4="HHHHxx" 604972800000000000 +tenk unique1=4492i,unique2=7002i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=492i,twothousand=492i,fivethous=4492i,tenthous=4492i,odd=184i,even=185i,stringu1="UQAAAA",stringu2="IJKAAA",string4="OOOOxx" 605059200000000000 +tenk unique1=385i,unique2=7003i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=385i,twothousand=385i,fivethous=385i,tenthous=385i,odd=170i,even=171i,stringu1="VOAAAA",stringu2="JJKAAA",string4="VVVVxx" 605145600000000000 +tenk unique1=5235i,unique2=7004i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=235i,twothousand=1235i,fivethous=235i,tenthous=5235i,odd=70i,even=71i,stringu1="JTAAAA",stringu2="KJKAAA",string4="AAAAxx" 605232000000000000 +tenk unique1=4812i,unique2=7005i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=812i,twothousand=812i,fivethous=4812i,tenthous=4812i,odd=24i,even=25i,stringu1="CDAAAA",stringu2="LJKAAA",string4="HHHHxx" 605318400000000000 +tenk unique1=9807i,unique2=7006i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=807i,twothousand=1807i,fivethous=4807i,tenthous=9807i,odd=14i,even=15i,stringu1="FNAAAA",stringu2="MJKAAA",string4="OOOOxx" 605404800000000000 +tenk unique1=9588i,unique2=7007i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=588i,twothousand=1588i,fivethous=4588i,tenthous=9588i,odd=176i,even=177i,stringu1="UEAAAA",stringu2="NJKAAA",string4="VVVVxx" 605491200000000000 +tenk unique1=9832i,unique2=7008i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=832i,twothousand=1832i,fivethous=4832i,tenthous=9832i,odd=64i,even=65i,stringu1="EOAAAA",stringu2="OJKAAA",string4="AAAAxx" 605577600000000000 +tenk unique1=3757i,unique2=7009i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=757i,twothousand=1757i,fivethous=3757i,tenthous=3757i,odd=114i,even=115i,stringu1="NOAAAA",stringu2="PJKAAA",string4="HHHHxx" 605664000000000000 +tenk unique1=9703i,unique2=7010i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=703i,twothousand=1703i,fivethous=4703i,tenthous=9703i,odd=6i,even=7i,stringu1="FJAAAA",stringu2="QJKAAA",string4="OOOOxx" 605750400000000000 +tenk unique1=1022i,unique2=7011i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=22i,twothousand=1022i,fivethous=1022i,tenthous=1022i,odd=44i,even=45i,stringu1="INAAAA",stringu2="RJKAAA",string4="VVVVxx" 605836800000000000 +tenk unique1=5165i,unique2=7012i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=165i,twothousand=1165i,fivethous=165i,tenthous=5165i,odd=130i,even=131i,stringu1="RQAAAA",stringu2="SJKAAA",string4="AAAAxx" 605923200000000000 +tenk unique1=7129i,unique2=7013i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=129i,twothousand=1129i,fivethous=2129i,tenthous=7129i,odd=58i,even=59i,stringu1="FOAAAA",stringu2="TJKAAA",string4="HHHHxx" 606009600000000000 +tenk unique1=4164i,unique2=7014i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=164i,twothousand=164i,fivethous=4164i,tenthous=4164i,odd=128i,even=129i,stringu1="EEAAAA",stringu2="UJKAAA",string4="OOOOxx" 606096000000000000 +tenk unique1=7239i,unique2=7015i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=239i,twothousand=1239i,fivethous=2239i,tenthous=7239i,odd=78i,even=79i,stringu1="LSAAAA",stringu2="VJKAAA",string4="VVVVxx" 606182400000000000 +tenk unique1=523i,unique2=7016i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=523i,twothousand=523i,fivethous=523i,tenthous=523i,odd=46i,even=47i,stringu1="DUAAAA",stringu2="WJKAAA",string4="AAAAxx" 606268800000000000 +tenk unique1=4670i,unique2=7017i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=670i,twothousand=670i,fivethous=4670i,tenthous=4670i,odd=140i,even=141i,stringu1="QXAAAA",stringu2="XJKAAA",string4="HHHHxx" 606355200000000000 +tenk unique1=8503i,unique2=7018i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=503i,twothousand=503i,fivethous=3503i,tenthous=8503i,odd=6i,even=7i,stringu1="BPAAAA",stringu2="YJKAAA",string4="OOOOxx" 606441600000000000 +tenk unique1=714i,unique2=7019i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=714i,twothousand=714i,fivethous=714i,tenthous=714i,odd=28i,even=29i,stringu1="MBAAAA",stringu2="ZJKAAA",string4="VVVVxx" 606528000000000000 +tenk unique1=1350i,unique2=7020i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=350i,twothousand=1350i,fivethous=1350i,tenthous=1350i,odd=100i,even=101i,stringu1="YZAAAA",stringu2="AKKAAA",string4="AAAAxx" 606614400000000000 +tenk unique1=8318i,unique2=7021i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=318i,twothousand=318i,fivethous=3318i,tenthous=8318i,odd=36i,even=37i,stringu1="YHAAAA",stringu2="BKKAAA",string4="HHHHxx" 606700800000000000 +tenk unique1=1834i,unique2=7022i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=834i,twothousand=1834i,fivethous=1834i,tenthous=1834i,odd=68i,even=69i,stringu1="OSAAAA",stringu2="CKKAAA",string4="OOOOxx" 606787200000000000 +tenk unique1=4306i,unique2=7023i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=306i,twothousand=306i,fivethous=4306i,tenthous=4306i,odd=12i,even=13i,stringu1="QJAAAA",stringu2="DKKAAA",string4="VVVVxx" 606873600000000000 +tenk unique1=8543i,unique2=7024i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=543i,twothousand=543i,fivethous=3543i,tenthous=8543i,odd=86i,even=87i,stringu1="PQAAAA",stringu2="EKKAAA",string4="AAAAxx" 606960000000000000 +tenk unique1=9397i,unique2=7025i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=397i,twothousand=1397i,fivethous=4397i,tenthous=9397i,odd=194i,even=195i,stringu1="LXAAAA",stringu2="FKKAAA",string4="HHHHxx" 607046400000000000 +tenk unique1=3145i,unique2=7026i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=145i,twothousand=1145i,fivethous=3145i,tenthous=3145i,odd=90i,even=91i,stringu1="ZQAAAA",stringu2="GKKAAA",string4="OOOOxx" 607132800000000000 +tenk unique1=3942i,unique2=7027i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=942i,twothousand=1942i,fivethous=3942i,tenthous=3942i,odd=84i,even=85i,stringu1="QVAAAA",stringu2="HKKAAA",string4="VVVVxx" 607219200000000000 +tenk unique1=8583i,unique2=7028i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=583i,twothousand=583i,fivethous=3583i,tenthous=8583i,odd=166i,even=167i,stringu1="DSAAAA",stringu2="IKKAAA",string4="AAAAxx" 607305600000000000 +tenk unique1=8073i,unique2=7029i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=73i,twothousand=73i,fivethous=3073i,tenthous=8073i,odd=146i,even=147i,stringu1="NYAAAA",stringu2="JKKAAA",string4="HHHHxx" 607392000000000000 +tenk unique1=4940i,unique2=7030i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=940i,twothousand=940i,fivethous=4940i,tenthous=4940i,odd=80i,even=81i,stringu1="AIAAAA",stringu2="KKKAAA",string4="OOOOxx" 607478400000000000 +tenk unique1=9573i,unique2=7031i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=573i,twothousand=1573i,fivethous=4573i,tenthous=9573i,odd=146i,even=147i,stringu1="FEAAAA",stringu2="LKKAAA",string4="VVVVxx" 607564800000000000 +tenk unique1=5325i,unique2=7032i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=325i,twothousand=1325i,fivethous=325i,tenthous=5325i,odd=50i,even=51i,stringu1="VWAAAA",stringu2="MKKAAA",string4="AAAAxx" 607651200000000000 +tenk unique1=1833i,unique2=7033i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=833i,twothousand=1833i,fivethous=1833i,tenthous=1833i,odd=66i,even=67i,stringu1="NSAAAA",stringu2="NKKAAA",string4="HHHHxx" 607737600000000000 +tenk unique1=1337i,unique2=7034i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=337i,twothousand=1337i,fivethous=1337i,tenthous=1337i,odd=74i,even=75i,stringu1="LZAAAA",stringu2="OKKAAA",string4="OOOOxx" 607824000000000000 +tenk unique1=9749i,unique2=7035i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=749i,twothousand=1749i,fivethous=4749i,tenthous=9749i,odd=98i,even=99i,stringu1="ZKAAAA",stringu2="PKKAAA",string4="VVVVxx" 607910400000000000 +tenk unique1=7505i,unique2=7036i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=505i,twothousand=1505i,fivethous=2505i,tenthous=7505i,odd=10i,even=11i,stringu1="RCAAAA",stringu2="QKKAAA",string4="AAAAxx" 607996800000000000 +tenk unique1=9731i,unique2=7037i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=731i,twothousand=1731i,fivethous=4731i,tenthous=9731i,odd=62i,even=63i,stringu1="HKAAAA",stringu2="RKKAAA",string4="HHHHxx" 608083200000000000 +tenk unique1=4098i,unique2=7038i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=98i,twothousand=98i,fivethous=4098i,tenthous=4098i,odd=196i,even=197i,stringu1="QBAAAA",stringu2="SKKAAA",string4="OOOOxx" 608169600000000000 +tenk unique1=1418i,unique2=7039i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=418i,twothousand=1418i,fivethous=1418i,tenthous=1418i,odd=36i,even=37i,stringu1="OCAAAA",stringu2="TKKAAA",string4="VVVVxx" 608256000000000000 +tenk unique1=63i,unique2=7040i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=63i,twothousand=63i,fivethous=63i,tenthous=63i,odd=126i,even=127i,stringu1="LCAAAA",stringu2="UKKAAA",string4="AAAAxx" 608342400000000000 +tenk unique1=9889i,unique2=7041i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=889i,twothousand=1889i,fivethous=4889i,tenthous=9889i,odd=178i,even=179i,stringu1="JQAAAA",stringu2="VKKAAA",string4="HHHHxx" 608428800000000000 +tenk unique1=2871i,unique2=7042i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=871i,twothousand=871i,fivethous=2871i,tenthous=2871i,odd=142i,even=143i,stringu1="LGAAAA",stringu2="WKKAAA",string4="OOOOxx" 608515200000000000 +tenk unique1=1003i,unique2=7043i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=1003i,fivethous=1003i,tenthous=1003i,odd=6i,even=7i,stringu1="PMAAAA",stringu2="XKKAAA",string4="VVVVxx" 608601600000000000 +tenk unique1=8796i,unique2=7044i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=796i,twothousand=796i,fivethous=3796i,tenthous=8796i,odd=192i,even=193i,stringu1="IAAAAA",stringu2="YKKAAA",string4="AAAAxx" 608688000000000000 +tenk unique1=22i,unique2=7045i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=22i,twothousand=22i,fivethous=22i,tenthous=22i,odd=44i,even=45i,stringu1="WAAAAA",stringu2="ZKKAAA",string4="HHHHxx" 608774400000000000 +tenk unique1=8244i,unique2=7046i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=244i,twothousand=244i,fivethous=3244i,tenthous=8244i,odd=88i,even=89i,stringu1="CFAAAA",stringu2="ALKAAA",string4="OOOOxx" 608860800000000000 +tenk unique1=2282i,unique2=7047i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=282i,twothousand=282i,fivethous=2282i,tenthous=2282i,odd=164i,even=165i,stringu1="UJAAAA",stringu2="BLKAAA",string4="VVVVxx" 608947200000000000 +tenk unique1=3487i,unique2=7048i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=487i,twothousand=1487i,fivethous=3487i,tenthous=3487i,odd=174i,even=175i,stringu1="DEAAAA",stringu2="CLKAAA",string4="AAAAxx" 609033600000000000 +tenk unique1=8633i,unique2=7049i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=633i,twothousand=633i,fivethous=3633i,tenthous=8633i,odd=66i,even=67i,stringu1="BUAAAA",stringu2="DLKAAA",string4="HHHHxx" 609120000000000000 +tenk unique1=6418i,unique2=7050i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=418i,twothousand=418i,fivethous=1418i,tenthous=6418i,odd=36i,even=37i,stringu1="WMAAAA",stringu2="ELKAAA",string4="OOOOxx" 609206400000000000 +tenk unique1=4682i,unique2=7051i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=682i,twothousand=682i,fivethous=4682i,tenthous=4682i,odd=164i,even=165i,stringu1="CYAAAA",stringu2="FLKAAA",string4="VVVVxx" 609292800000000000 +tenk unique1=4103i,unique2=7052i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=103i,twothousand=103i,fivethous=4103i,tenthous=4103i,odd=6i,even=7i,stringu1="VBAAAA",stringu2="GLKAAA",string4="AAAAxx" 609379200000000000 +tenk unique1=6256i,unique2=7053i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=256i,twothousand=256i,fivethous=1256i,tenthous=6256i,odd=112i,even=113i,stringu1="QGAAAA",stringu2="HLKAAA",string4="HHHHxx" 609465600000000000 +tenk unique1=4040i,unique2=7054i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=40i,twothousand=40i,fivethous=4040i,tenthous=4040i,odd=80i,even=81i,stringu1="KZAAAA",stringu2="ILKAAA",string4="OOOOxx" 609552000000000000 +tenk unique1=9342i,unique2=7055i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=342i,twothousand=1342i,fivethous=4342i,tenthous=9342i,odd=84i,even=85i,stringu1="IVAAAA",stringu2="JLKAAA",string4="VVVVxx" 609638400000000000 +tenk unique1=9969i,unique2=7056i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=969i,twothousand=1969i,fivethous=4969i,tenthous=9969i,odd=138i,even=139i,stringu1="LTAAAA",stringu2="KLKAAA",string4="AAAAxx" 609724800000000000 +tenk unique1=223i,unique2=7057i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=223i,twothousand=223i,fivethous=223i,tenthous=223i,odd=46i,even=47i,stringu1="PIAAAA",stringu2="LLKAAA",string4="HHHHxx" 609811200000000000 +tenk unique1=4593i,unique2=7058i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=593i,twothousand=593i,fivethous=4593i,tenthous=4593i,odd=186i,even=187i,stringu1="RUAAAA",stringu2="MLKAAA",string4="OOOOxx" 609897600000000000 +tenk unique1=44i,unique2=7059i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=44i,twothousand=44i,fivethous=44i,tenthous=44i,odd=88i,even=89i,stringu1="SBAAAA",stringu2="NLKAAA",string4="VVVVxx" 609984000000000000 +tenk unique1=3513i,unique2=7060i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=513i,twothousand=1513i,fivethous=3513i,tenthous=3513i,odd=26i,even=27i,stringu1="DFAAAA",stringu2="OLKAAA",string4="AAAAxx" 610070400000000000 +tenk unique1=5771i,unique2=7061i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=771i,twothousand=1771i,fivethous=771i,tenthous=5771i,odd=142i,even=143i,stringu1="ZNAAAA",stringu2="PLKAAA",string4="HHHHxx" 610156800000000000 +tenk unique1=5083i,unique2=7062i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=83i,twothousand=1083i,fivethous=83i,tenthous=5083i,odd=166i,even=167i,stringu1="NNAAAA",stringu2="QLKAAA",string4="OOOOxx" 610243200000000000 +tenk unique1=3839i,unique2=7063i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=839i,twothousand=1839i,fivethous=3839i,tenthous=3839i,odd=78i,even=79i,stringu1="RRAAAA",stringu2="RLKAAA",string4="VVVVxx" 610329600000000000 +tenk unique1=2986i,unique2=7064i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=986i,twothousand=986i,fivethous=2986i,tenthous=2986i,odd=172i,even=173i,stringu1="WKAAAA",stringu2="SLKAAA",string4="AAAAxx" 610416000000000000 +tenk unique1=2200i,unique2=7065i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=200i,twothousand=200i,fivethous=2200i,tenthous=2200i,odd=0i,even=1i,stringu1="QGAAAA",stringu2="TLKAAA",string4="HHHHxx" 610502400000000000 +tenk unique1=197i,unique2=7066i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=197i,twothousand=197i,fivethous=197i,tenthous=197i,odd=194i,even=195i,stringu1="PHAAAA",stringu2="ULKAAA",string4="OOOOxx" 610588800000000000 +tenk unique1=7455i,unique2=7067i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=455i,twothousand=1455i,fivethous=2455i,tenthous=7455i,odd=110i,even=111i,stringu1="TAAAAA",stringu2="VLKAAA",string4="VVVVxx" 610675200000000000 +tenk unique1=1379i,unique2=7068i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=379i,twothousand=1379i,fivethous=1379i,tenthous=1379i,odd=158i,even=159i,stringu1="BBAAAA",stringu2="WLKAAA",string4="AAAAxx" 610761600000000000 +tenk unique1=4356i,unique2=7069i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=356i,twothousand=356i,fivethous=4356i,tenthous=4356i,odd=112i,even=113i,stringu1="OLAAAA",stringu2="XLKAAA",string4="HHHHxx" 610848000000000000 +tenk unique1=6888i,unique2=7070i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=888i,twothousand=888i,fivethous=1888i,tenthous=6888i,odd=176i,even=177i,stringu1="YEAAAA",stringu2="YLKAAA",string4="OOOOxx" 610934400000000000 +tenk unique1=9139i,unique2=7071i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=139i,twothousand=1139i,fivethous=4139i,tenthous=9139i,odd=78i,even=79i,stringu1="NNAAAA",stringu2="ZLKAAA",string4="VVVVxx" 611020800000000000 +tenk unique1=7682i,unique2=7072i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=682i,twothousand=1682i,fivethous=2682i,tenthous=7682i,odd=164i,even=165i,stringu1="MJAAAA",stringu2="AMKAAA",string4="AAAAxx" 611107200000000000 +tenk unique1=4873i,unique2=7073i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=873i,twothousand=873i,fivethous=4873i,tenthous=4873i,odd=146i,even=147i,stringu1="LFAAAA",stringu2="BMKAAA",string4="HHHHxx" 611193600000000000 +tenk unique1=783i,unique2=7074i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=783i,twothousand=783i,fivethous=783i,tenthous=783i,odd=166i,even=167i,stringu1="DEAAAA",stringu2="CMKAAA",string4="OOOOxx" 611280000000000000 +tenk unique1=6071i,unique2=7075i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=71i,twothousand=71i,fivethous=1071i,tenthous=6071i,odd=142i,even=143i,stringu1="NZAAAA",stringu2="DMKAAA",string4="VVVVxx" 611366400000000000 +tenk unique1=5160i,unique2=7076i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=160i,twothousand=1160i,fivethous=160i,tenthous=5160i,odd=120i,even=121i,stringu1="MQAAAA",stringu2="EMKAAA",string4="AAAAxx" 611452800000000000 +tenk unique1=2291i,unique2=7077i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=291i,twothousand=291i,fivethous=2291i,tenthous=2291i,odd=182i,even=183i,stringu1="DKAAAA",stringu2="FMKAAA",string4="HHHHxx" 611539200000000000 +tenk unique1=187i,unique2=7078i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=187i,twothousand=187i,fivethous=187i,tenthous=187i,odd=174i,even=175i,stringu1="FHAAAA",stringu2="GMKAAA",string4="OOOOxx" 611625600000000000 +tenk unique1=7786i,unique2=7079i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=786i,twothousand=1786i,fivethous=2786i,tenthous=7786i,odd=172i,even=173i,stringu1="MNAAAA",stringu2="HMKAAA",string4="VVVVxx" 611712000000000000 +tenk unique1=3432i,unique2=7080i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=432i,twothousand=1432i,fivethous=3432i,tenthous=3432i,odd=64i,even=65i,stringu1="ACAAAA",stringu2="IMKAAA",string4="AAAAxx" 611798400000000000 +tenk unique1=5450i,unique2=7081i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=450i,twothousand=1450i,fivethous=450i,tenthous=5450i,odd=100i,even=101i,stringu1="QBAAAA",stringu2="JMKAAA",string4="HHHHxx" 611884800000000000 +tenk unique1=2699i,unique2=7082i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=699i,twothousand=699i,fivethous=2699i,tenthous=2699i,odd=198i,even=199i,stringu1="VZAAAA",stringu2="KMKAAA",string4="OOOOxx" 611971200000000000 +tenk unique1=692i,unique2=7083i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=692i,twothousand=692i,fivethous=692i,tenthous=692i,odd=184i,even=185i,stringu1="QAAAAA",stringu2="LMKAAA",string4="VVVVxx" 612057600000000000 +tenk unique1=6081i,unique2=7084i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=81i,twothousand=81i,fivethous=1081i,tenthous=6081i,odd=162i,even=163i,stringu1="XZAAAA",stringu2="MMKAAA",string4="AAAAxx" 612144000000000000 +tenk unique1=4829i,unique2=7085i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=829i,twothousand=829i,fivethous=4829i,tenthous=4829i,odd=58i,even=59i,stringu1="TDAAAA",stringu2="NMKAAA",string4="HHHHxx" 612230400000000000 +tenk unique1=238i,unique2=7086i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=238i,twothousand=238i,fivethous=238i,tenthous=238i,odd=76i,even=77i,stringu1="EJAAAA",stringu2="OMKAAA",string4="OOOOxx" 612316800000000000 +tenk unique1=9100i,unique2=7087i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=100i,twothousand=1100i,fivethous=4100i,tenthous=9100i,odd=0i,even=1i,stringu1="AMAAAA",stringu2="PMKAAA",string4="VVVVxx" 612403200000000000 +tenk unique1=1968i,unique2=7088i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=968i,twothousand=1968i,fivethous=1968i,tenthous=1968i,odd=136i,even=137i,stringu1="SXAAAA",stringu2="QMKAAA",string4="AAAAxx" 612489600000000000 +tenk unique1=1872i,unique2=7089i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=872i,twothousand=1872i,fivethous=1872i,tenthous=1872i,odd=144i,even=145i,stringu1="AUAAAA",stringu2="RMKAAA",string4="HHHHxx" 612576000000000000 +tenk unique1=7051i,unique2=7090i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=51i,twothousand=1051i,fivethous=2051i,tenthous=7051i,odd=102i,even=103i,stringu1="FLAAAA",stringu2="SMKAAA",string4="OOOOxx" 612662400000000000 +tenk unique1=2743i,unique2=7091i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=743i,twothousand=743i,fivethous=2743i,tenthous=2743i,odd=86i,even=87i,stringu1="NBAAAA",stringu2="TMKAAA",string4="VVVVxx" 612748800000000000 +tenk unique1=1237i,unique2=7092i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=237i,twothousand=1237i,fivethous=1237i,tenthous=1237i,odd=74i,even=75i,stringu1="PVAAAA",stringu2="UMKAAA",string4="AAAAxx" 612835200000000000 +tenk unique1=3052i,unique2=7093i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=52i,twothousand=1052i,fivethous=3052i,tenthous=3052i,odd=104i,even=105i,stringu1="KNAAAA",stringu2="VMKAAA",string4="HHHHxx" 612921600000000000 +tenk unique1=8021i,unique2=7094i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=21i,twothousand=21i,fivethous=3021i,tenthous=8021i,odd=42i,even=43i,stringu1="NWAAAA",stringu2="WMKAAA",string4="OOOOxx" 613008000000000000 +tenk unique1=657i,unique2=7095i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=657i,twothousand=657i,fivethous=657i,tenthous=657i,odd=114i,even=115i,stringu1="HZAAAA",stringu2="XMKAAA",string4="VVVVxx" 613094400000000000 +tenk unique1=2236i,unique2=7096i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=236i,twothousand=236i,fivethous=2236i,tenthous=2236i,odd=72i,even=73i,stringu1="AIAAAA",stringu2="YMKAAA",string4="AAAAxx" 613180800000000000 +tenk unique1=7011i,unique2=7097i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=11i,twothousand=1011i,fivethous=2011i,tenthous=7011i,odd=22i,even=23i,stringu1="RJAAAA",stringu2="ZMKAAA",string4="HHHHxx" 613267200000000000 +tenk unique1=4067i,unique2=7098i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=67i,twothousand=67i,fivethous=4067i,tenthous=4067i,odd=134i,even=135i,stringu1="LAAAAA",stringu2="ANKAAA",string4="OOOOxx" 613353600000000000 +tenk unique1=9449i,unique2=7099i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=449i,twothousand=1449i,fivethous=4449i,tenthous=9449i,odd=98i,even=99i,stringu1="LZAAAA",stringu2="BNKAAA",string4="VVVVxx" 613440000000000000 +tenk unique1=7428i,unique2=7100i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=428i,twothousand=1428i,fivethous=2428i,tenthous=7428i,odd=56i,even=57i,stringu1="SZAAAA",stringu2="CNKAAA",string4="AAAAxx" 613526400000000000 +tenk unique1=1272i,unique2=7101i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=272i,twothousand=1272i,fivethous=1272i,tenthous=1272i,odd=144i,even=145i,stringu1="YWAAAA",stringu2="DNKAAA",string4="HHHHxx" 613612800000000000 +tenk unique1=6897i,unique2=7102i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=897i,twothousand=897i,fivethous=1897i,tenthous=6897i,odd=194i,even=195i,stringu1="HFAAAA",stringu2="ENKAAA",string4="OOOOxx" 613699200000000000 +tenk unique1=5839i,unique2=7103i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=839i,twothousand=1839i,fivethous=839i,tenthous=5839i,odd=78i,even=79i,stringu1="PQAAAA",stringu2="FNKAAA",string4="VVVVxx" 613785600000000000 +tenk unique1=6835i,unique2=7104i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=835i,twothousand=835i,fivethous=1835i,tenthous=6835i,odd=70i,even=71i,stringu1="XCAAAA",stringu2="GNKAAA",string4="AAAAxx" 613872000000000000 +tenk unique1=1887i,unique2=7105i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=887i,twothousand=1887i,fivethous=1887i,tenthous=1887i,odd=174i,even=175i,stringu1="PUAAAA",stringu2="HNKAAA",string4="HHHHxx" 613958400000000000 +tenk unique1=1551i,unique2=7106i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=551i,twothousand=1551i,fivethous=1551i,tenthous=1551i,odd=102i,even=103i,stringu1="RHAAAA",stringu2="INKAAA",string4="OOOOxx" 614044800000000000 +tenk unique1=4667i,unique2=7107i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=667i,twothousand=667i,fivethous=4667i,tenthous=4667i,odd=134i,even=135i,stringu1="NXAAAA",stringu2="JNKAAA",string4="VVVVxx" 614131200000000000 +tenk unique1=9603i,unique2=7108i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=603i,twothousand=1603i,fivethous=4603i,tenthous=9603i,odd=6i,even=7i,stringu1="JFAAAA",stringu2="KNKAAA",string4="AAAAxx" 614217600000000000 +tenk unique1=4332i,unique2=7109i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=332i,twothousand=332i,fivethous=4332i,tenthous=4332i,odd=64i,even=65i,stringu1="QKAAAA",stringu2="LNKAAA",string4="HHHHxx" 614304000000000000 +tenk unique1=5681i,unique2=7110i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=681i,twothousand=1681i,fivethous=681i,tenthous=5681i,odd=162i,even=163i,stringu1="NKAAAA",stringu2="MNKAAA",string4="OOOOxx" 614390400000000000 +tenk unique1=8062i,unique2=7111i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=62i,twothousand=62i,fivethous=3062i,tenthous=8062i,odd=124i,even=125i,stringu1="CYAAAA",stringu2="NNKAAA",string4="VVVVxx" 614476800000000000 +tenk unique1=2302i,unique2=7112i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=302i,twothousand=302i,fivethous=2302i,tenthous=2302i,odd=4i,even=5i,stringu1="OKAAAA",stringu2="ONKAAA",string4="AAAAxx" 614563200000000000 +tenk unique1=2825i,unique2=7113i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=825i,twothousand=825i,fivethous=2825i,tenthous=2825i,odd=50i,even=51i,stringu1="REAAAA",stringu2="PNKAAA",string4="HHHHxx" 614649600000000000 +tenk unique1=4527i,unique2=7114i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=527i,twothousand=527i,fivethous=4527i,tenthous=4527i,odd=54i,even=55i,stringu1="DSAAAA",stringu2="QNKAAA",string4="OOOOxx" 614736000000000000 +tenk unique1=4230i,unique2=7115i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=230i,twothousand=230i,fivethous=4230i,tenthous=4230i,odd=60i,even=61i,stringu1="SGAAAA",stringu2="RNKAAA",string4="VVVVxx" 614822400000000000 +tenk unique1=3053i,unique2=7116i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=53i,twothousand=1053i,fivethous=3053i,tenthous=3053i,odd=106i,even=107i,stringu1="LNAAAA",stringu2="SNKAAA",string4="AAAAxx" 614908800000000000 +tenk unique1=983i,unique2=7117i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=983i,twothousand=983i,fivethous=983i,tenthous=983i,odd=166i,even=167i,stringu1="VLAAAA",stringu2="TNKAAA",string4="HHHHxx" 614995200000000000 +tenk unique1=9458i,unique2=7118i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=458i,twothousand=1458i,fivethous=4458i,tenthous=9458i,odd=116i,even=117i,stringu1="UZAAAA",stringu2="UNKAAA",string4="OOOOxx" 615081600000000000 +tenk unique1=4128i,unique2=7119i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=128i,twothousand=128i,fivethous=4128i,tenthous=4128i,odd=56i,even=57i,stringu1="UCAAAA",stringu2="VNKAAA",string4="VVVVxx" 615168000000000000 +tenk unique1=425i,unique2=7120i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=425i,twothousand=425i,fivethous=425i,tenthous=425i,odd=50i,even=51i,stringu1="JQAAAA",stringu2="WNKAAA",string4="AAAAxx" 615254400000000000 +tenk unique1=3911i,unique2=7121i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=911i,twothousand=1911i,fivethous=3911i,tenthous=3911i,odd=22i,even=23i,stringu1="LUAAAA",stringu2="XNKAAA",string4="HHHHxx" 615340800000000000 +tenk unique1=6607i,unique2=7122i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=607i,twothousand=607i,fivethous=1607i,tenthous=6607i,odd=14i,even=15i,stringu1="DUAAAA",stringu2="YNKAAA",string4="OOOOxx" 615427200000000000 +tenk unique1=5431i,unique2=7123i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=431i,twothousand=1431i,fivethous=431i,tenthous=5431i,odd=62i,even=63i,stringu1="XAAAAA",stringu2="ZNKAAA",string4="VVVVxx" 615513600000000000 +tenk unique1=6330i,unique2=7124i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=330i,twothousand=330i,fivethous=1330i,tenthous=6330i,odd=60i,even=61i,stringu1="MJAAAA",stringu2="AOKAAA",string4="AAAAxx" 615600000000000000 +tenk unique1=3592i,unique2=7125i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=592i,twothousand=1592i,fivethous=3592i,tenthous=3592i,odd=184i,even=185i,stringu1="EIAAAA",stringu2="BOKAAA",string4="HHHHxx" 615686400000000000 +tenk unique1=154i,unique2=7126i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=154i,twothousand=154i,fivethous=154i,tenthous=154i,odd=108i,even=109i,stringu1="YFAAAA",stringu2="COKAAA",string4="OOOOxx" 615772800000000000 +tenk unique1=9879i,unique2=7127i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=879i,twothousand=1879i,fivethous=4879i,tenthous=9879i,odd=158i,even=159i,stringu1="ZPAAAA",stringu2="DOKAAA",string4="VVVVxx" 615859200000000000 +tenk unique1=3202i,unique2=7128i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=202i,twothousand=1202i,fivethous=3202i,tenthous=3202i,odd=4i,even=5i,stringu1="ETAAAA",stringu2="EOKAAA",string4="AAAAxx" 615945600000000000 +tenk unique1=3056i,unique2=7129i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=56i,twothousand=1056i,fivethous=3056i,tenthous=3056i,odd=112i,even=113i,stringu1="ONAAAA",stringu2="FOKAAA",string4="HHHHxx" 616032000000000000 +tenk unique1=9890i,unique2=7130i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=890i,twothousand=1890i,fivethous=4890i,tenthous=9890i,odd=180i,even=181i,stringu1="KQAAAA",stringu2="GOKAAA",string4="OOOOxx" 616118400000000000 +tenk unique1=5840i,unique2=7131i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=840i,twothousand=1840i,fivethous=840i,tenthous=5840i,odd=80i,even=81i,stringu1="QQAAAA",stringu2="HOKAAA",string4="VVVVxx" 616204800000000000 +tenk unique1=9804i,unique2=7132i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=804i,twothousand=1804i,fivethous=4804i,tenthous=9804i,odd=8i,even=9i,stringu1="CNAAAA",stringu2="IOKAAA",string4="AAAAxx" 616291200000000000 +tenk unique1=681i,unique2=7133i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=681i,twothousand=681i,fivethous=681i,tenthous=681i,odd=162i,even=163i,stringu1="FAAAAA",stringu2="JOKAAA",string4="HHHHxx" 616377600000000000 +tenk unique1=3443i,unique2=7134i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=443i,twothousand=1443i,fivethous=3443i,tenthous=3443i,odd=86i,even=87i,stringu1="LCAAAA",stringu2="KOKAAA",string4="OOOOxx" 616464000000000000 +tenk unique1=8088i,unique2=7135i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=88i,twothousand=88i,fivethous=3088i,tenthous=8088i,odd=176i,even=177i,stringu1="CZAAAA",stringu2="LOKAAA",string4="VVVVxx" 616550400000000000 +tenk unique1=9447i,unique2=7136i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=447i,twothousand=1447i,fivethous=4447i,tenthous=9447i,odd=94i,even=95i,stringu1="JZAAAA",stringu2="MOKAAA",string4="AAAAxx" 616636800000000000 +tenk unique1=1490i,unique2=7137i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=490i,twothousand=1490i,fivethous=1490i,tenthous=1490i,odd=180i,even=181i,stringu1="IFAAAA",stringu2="NOKAAA",string4="HHHHxx" 616723200000000000 +tenk unique1=3684i,unique2=7138i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=684i,twothousand=1684i,fivethous=3684i,tenthous=3684i,odd=168i,even=169i,stringu1="SLAAAA",stringu2="OOKAAA",string4="OOOOxx" 616809600000000000 +tenk unique1=3113i,unique2=7139i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=113i,twothousand=1113i,fivethous=3113i,tenthous=3113i,odd=26i,even=27i,stringu1="TPAAAA",stringu2="POKAAA",string4="VVVVxx" 616896000000000000 +tenk unique1=9004i,unique2=7140i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=1004i,fivethous=4004i,tenthous=9004i,odd=8i,even=9i,stringu1="IIAAAA",stringu2="QOKAAA",string4="AAAAxx" 616982400000000000 +tenk unique1=7147i,unique2=7141i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=147i,twothousand=1147i,fivethous=2147i,tenthous=7147i,odd=94i,even=95i,stringu1="XOAAAA",stringu2="ROKAAA",string4="HHHHxx" 617068800000000000 +tenk unique1=7571i,unique2=7142i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=571i,twothousand=1571i,fivethous=2571i,tenthous=7571i,odd=142i,even=143i,stringu1="FFAAAA",stringu2="SOKAAA",string4="OOOOxx" 617155200000000000 +tenk unique1=5545i,unique2=7143i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=545i,twothousand=1545i,fivethous=545i,tenthous=5545i,odd=90i,even=91i,stringu1="HFAAAA",stringu2="TOKAAA",string4="VVVVxx" 617241600000000000 +tenk unique1=4558i,unique2=7144i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=558i,twothousand=558i,fivethous=4558i,tenthous=4558i,odd=116i,even=117i,stringu1="ITAAAA",stringu2="UOKAAA",string4="AAAAxx" 617328000000000000 +tenk unique1=6206i,unique2=7145i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=206i,twothousand=206i,fivethous=1206i,tenthous=6206i,odd=12i,even=13i,stringu1="SEAAAA",stringu2="VOKAAA",string4="HHHHxx" 617414400000000000 +tenk unique1=5695i,unique2=7146i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=695i,twothousand=1695i,fivethous=695i,tenthous=5695i,odd=190i,even=191i,stringu1="BLAAAA",stringu2="WOKAAA",string4="OOOOxx" 617500800000000000 +tenk unique1=9600i,unique2=7147i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=600i,twothousand=1600i,fivethous=4600i,tenthous=9600i,odd=0i,even=1i,stringu1="GFAAAA",stringu2="XOKAAA",string4="VVVVxx" 617587200000000000 +tenk unique1=5432i,unique2=7148i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=432i,twothousand=1432i,fivethous=432i,tenthous=5432i,odd=64i,even=65i,stringu1="YAAAAA",stringu2="YOKAAA",string4="AAAAxx" 617673600000000000 +tenk unique1=9299i,unique2=7149i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=299i,twothousand=1299i,fivethous=4299i,tenthous=9299i,odd=198i,even=199i,stringu1="RTAAAA",stringu2="ZOKAAA",string4="HHHHxx" 617760000000000000 +tenk unique1=2386i,unique2=7150i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=386i,twothousand=386i,fivethous=2386i,tenthous=2386i,odd=172i,even=173i,stringu1="UNAAAA",stringu2="APKAAA",string4="OOOOxx" 617846400000000000 +tenk unique1=2046i,unique2=7151i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=46i,twothousand=46i,fivethous=2046i,tenthous=2046i,odd=92i,even=93i,stringu1="SAAAAA",stringu2="BPKAAA",string4="VVVVxx" 617932800000000000 +tenk unique1=3293i,unique2=7152i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=293i,twothousand=1293i,fivethous=3293i,tenthous=3293i,odd=186i,even=187i,stringu1="RWAAAA",stringu2="CPKAAA",string4="AAAAxx" 618019200000000000 +tenk unique1=3046i,unique2=7153i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=46i,twothousand=1046i,fivethous=3046i,tenthous=3046i,odd=92i,even=93i,stringu1="ENAAAA",stringu2="DPKAAA",string4="HHHHxx" 618105600000000000 +tenk unique1=214i,unique2=7154i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=214i,twothousand=214i,fivethous=214i,tenthous=214i,odd=28i,even=29i,stringu1="GIAAAA",stringu2="EPKAAA",string4="OOOOxx" 618192000000000000 +tenk unique1=7893i,unique2=7155i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=893i,twothousand=1893i,fivethous=2893i,tenthous=7893i,odd=186i,even=187i,stringu1="PRAAAA",stringu2="FPKAAA",string4="VVVVxx" 618278400000000000 +tenk unique1=891i,unique2=7156i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=891i,twothousand=891i,fivethous=891i,tenthous=891i,odd=182i,even=183i,stringu1="HIAAAA",stringu2="GPKAAA",string4="AAAAxx" 618364800000000000 +tenk unique1=6499i,unique2=7157i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=499i,twothousand=499i,fivethous=1499i,tenthous=6499i,odd=198i,even=199i,stringu1="ZPAAAA",stringu2="HPKAAA",string4="HHHHxx" 618451200000000000 +tenk unique1=5003i,unique2=7158i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=1003i,fivethous=3i,tenthous=5003i,odd=6i,even=7i,stringu1="LKAAAA",stringu2="IPKAAA",string4="OOOOxx" 618537600000000000 +tenk unique1=6487i,unique2=7159i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=487i,twothousand=487i,fivethous=1487i,tenthous=6487i,odd=174i,even=175i,stringu1="NPAAAA",stringu2="JPKAAA",string4="VVVVxx" 618624000000000000 +tenk unique1=9403i,unique2=7160i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=403i,twothousand=1403i,fivethous=4403i,tenthous=9403i,odd=6i,even=7i,stringu1="RXAAAA",stringu2="KPKAAA",string4="AAAAxx" 618710400000000000 +tenk unique1=945i,unique2=7161i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=945i,twothousand=945i,fivethous=945i,tenthous=945i,odd=90i,even=91i,stringu1="JKAAAA",stringu2="LPKAAA",string4="HHHHxx" 618796800000000000 +tenk unique1=6713i,unique2=7162i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=713i,twothousand=713i,fivethous=1713i,tenthous=6713i,odd=26i,even=27i,stringu1="FYAAAA",stringu2="MPKAAA",string4="OOOOxx" 618883200000000000 +tenk unique1=9928i,unique2=7163i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=928i,twothousand=1928i,fivethous=4928i,tenthous=9928i,odd=56i,even=57i,stringu1="WRAAAA",stringu2="NPKAAA",string4="VVVVxx" 618969600000000000 +tenk unique1=8585i,unique2=7164i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=585i,twothousand=585i,fivethous=3585i,tenthous=8585i,odd=170i,even=171i,stringu1="FSAAAA",stringu2="OPKAAA",string4="AAAAxx" 619056000000000000 +tenk unique1=4004i,unique2=7165i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=4i,fivethous=4004i,tenthous=4004i,odd=8i,even=9i,stringu1="AYAAAA",stringu2="PPKAAA",string4="HHHHxx" 619142400000000000 +tenk unique1=2528i,unique2=7166i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=528i,twothousand=528i,fivethous=2528i,tenthous=2528i,odd=56i,even=57i,stringu1="GTAAAA",stringu2="QPKAAA",string4="OOOOxx" 619228800000000000 +tenk unique1=3350i,unique2=7167i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=350i,twothousand=1350i,fivethous=3350i,tenthous=3350i,odd=100i,even=101i,stringu1="WYAAAA",stringu2="RPKAAA",string4="VVVVxx" 619315200000000000 +tenk unique1=2160i,unique2=7168i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=160i,twothousand=160i,fivethous=2160i,tenthous=2160i,odd=120i,even=121i,stringu1="CFAAAA",stringu2="SPKAAA",string4="AAAAxx" 619401600000000000 +tenk unique1=1521i,unique2=7169i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=521i,twothousand=1521i,fivethous=1521i,tenthous=1521i,odd=42i,even=43i,stringu1="NGAAAA",stringu2="TPKAAA",string4="HHHHxx" 619488000000000000 +tenk unique1=5660i,unique2=7170i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=660i,twothousand=1660i,fivethous=660i,tenthous=5660i,odd=120i,even=121i,stringu1="SJAAAA",stringu2="UPKAAA",string4="OOOOxx" 619574400000000000 +tenk unique1=5755i,unique2=7171i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=755i,twothousand=1755i,fivethous=755i,tenthous=5755i,odd=110i,even=111i,stringu1="JNAAAA",stringu2="VPKAAA",string4="VVVVxx" 619660800000000000 +tenk unique1=7614i,unique2=7172i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=614i,twothousand=1614i,fivethous=2614i,tenthous=7614i,odd=28i,even=29i,stringu1="WGAAAA",stringu2="WPKAAA",string4="AAAAxx" 619747200000000000 +tenk unique1=3121i,unique2=7173i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=121i,twothousand=1121i,fivethous=3121i,tenthous=3121i,odd=42i,even=43i,stringu1="BQAAAA",stringu2="XPKAAA",string4="HHHHxx" 619833600000000000 +tenk unique1=2735i,unique2=7174i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=735i,twothousand=735i,fivethous=2735i,tenthous=2735i,odd=70i,even=71i,stringu1="FBAAAA",stringu2="YPKAAA",string4="OOOOxx" 619920000000000000 +tenk unique1=7506i,unique2=7175i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=506i,twothousand=1506i,fivethous=2506i,tenthous=7506i,odd=12i,even=13i,stringu1="SCAAAA",stringu2="ZPKAAA",string4="VVVVxx" 620006400000000000 +tenk unique1=2693i,unique2=7176i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=693i,twothousand=693i,fivethous=2693i,tenthous=2693i,odd=186i,even=187i,stringu1="PZAAAA",stringu2="AQKAAA",string4="AAAAxx" 620092800000000000 +tenk unique1=2892i,unique2=7177i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=892i,twothousand=892i,fivethous=2892i,tenthous=2892i,odd=184i,even=185i,stringu1="GHAAAA",stringu2="BQKAAA",string4="HHHHxx" 620179200000000000 +tenk unique1=3310i,unique2=7178i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=310i,twothousand=1310i,fivethous=3310i,tenthous=3310i,odd=20i,even=21i,stringu1="IXAAAA",stringu2="CQKAAA",string4="OOOOxx" 620265600000000000 +tenk unique1=3484i,unique2=7179i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=484i,twothousand=1484i,fivethous=3484i,tenthous=3484i,odd=168i,even=169i,stringu1="AEAAAA",stringu2="DQKAAA",string4="VVVVxx" 620352000000000000 +tenk unique1=9733i,unique2=7180i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=733i,twothousand=1733i,fivethous=4733i,tenthous=9733i,odd=66i,even=67i,stringu1="JKAAAA",stringu2="EQKAAA",string4="AAAAxx" 620438400000000000 +tenk unique1=29i,unique2=7181i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=29i,twothousand=29i,fivethous=29i,tenthous=29i,odd=58i,even=59i,stringu1="DBAAAA",stringu2="FQKAAA",string4="HHHHxx" 620524800000000000 +tenk unique1=9013i,unique2=7182i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=13i,twothousand=1013i,fivethous=4013i,tenthous=9013i,odd=26i,even=27i,stringu1="RIAAAA",stringu2="GQKAAA",string4="OOOOxx" 620611200000000000 +tenk unique1=3847i,unique2=7183i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=847i,twothousand=1847i,fivethous=3847i,tenthous=3847i,odd=94i,even=95i,stringu1="ZRAAAA",stringu2="HQKAAA",string4="VVVVxx" 620697600000000000 +tenk unique1=6724i,unique2=7184i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=724i,twothousand=724i,fivethous=1724i,tenthous=6724i,odd=48i,even=49i,stringu1="QYAAAA",stringu2="IQKAAA",string4="AAAAxx" 620784000000000000 +tenk unique1=2559i,unique2=7185i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=559i,twothousand=559i,fivethous=2559i,tenthous=2559i,odd=118i,even=119i,stringu1="LUAAAA",stringu2="JQKAAA",string4="HHHHxx" 620870400000000000 +tenk unique1=5326i,unique2=7186i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=326i,twothousand=1326i,fivethous=326i,tenthous=5326i,odd=52i,even=53i,stringu1="WWAAAA",stringu2="KQKAAA",string4="OOOOxx" 620956800000000000 +tenk unique1=4802i,unique2=7187i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=802i,twothousand=802i,fivethous=4802i,tenthous=4802i,odd=4i,even=5i,stringu1="SCAAAA",stringu2="LQKAAA",string4="VVVVxx" 621043200000000000 +tenk unique1=131i,unique2=7188i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=131i,twothousand=131i,fivethous=131i,tenthous=131i,odd=62i,even=63i,stringu1="BFAAAA",stringu2="MQKAAA",string4="AAAAxx" 621129600000000000 +tenk unique1=1634i,unique2=7189i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=634i,twothousand=1634i,fivethous=1634i,tenthous=1634i,odd=68i,even=69i,stringu1="WKAAAA",stringu2="NQKAAA",string4="HHHHxx" 621216000000000000 +tenk unique1=919i,unique2=7190i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=919i,twothousand=919i,fivethous=919i,tenthous=919i,odd=38i,even=39i,stringu1="JJAAAA",stringu2="OQKAAA",string4="OOOOxx" 621302400000000000 +tenk unique1=9575i,unique2=7191i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=575i,twothousand=1575i,fivethous=4575i,tenthous=9575i,odd=150i,even=151i,stringu1="HEAAAA",stringu2="PQKAAA",string4="VVVVxx" 621388800000000000 +tenk unique1=1256i,unique2=7192i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=256i,twothousand=1256i,fivethous=1256i,tenthous=1256i,odd=112i,even=113i,stringu1="IWAAAA",stringu2="QQKAAA",string4="AAAAxx" 621475200000000000 +tenk unique1=9428i,unique2=7193i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=428i,twothousand=1428i,fivethous=4428i,tenthous=9428i,odd=56i,even=57i,stringu1="QYAAAA",stringu2="RQKAAA",string4="HHHHxx" 621561600000000000 +tenk unique1=5121i,unique2=7194i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=121i,twothousand=1121i,fivethous=121i,tenthous=5121i,odd=42i,even=43i,stringu1="ZOAAAA",stringu2="SQKAAA",string4="OOOOxx" 621648000000000000 +tenk unique1=6584i,unique2=7195i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=584i,twothousand=584i,fivethous=1584i,tenthous=6584i,odd=168i,even=169i,stringu1="GTAAAA",stringu2="TQKAAA",string4="VVVVxx" 621734400000000000 +tenk unique1=7193i,unique2=7196i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=193i,twothousand=1193i,fivethous=2193i,tenthous=7193i,odd=186i,even=187i,stringu1="RQAAAA",stringu2="UQKAAA",string4="AAAAxx" 621820800000000000 +tenk unique1=4047i,unique2=7197i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=47i,twothousand=47i,fivethous=4047i,tenthous=4047i,odd=94i,even=95i,stringu1="RZAAAA",stringu2="VQKAAA",string4="HHHHxx" 621907200000000000 +tenk unique1=104i,unique2=7198i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=104i,twothousand=104i,fivethous=104i,tenthous=104i,odd=8i,even=9i,stringu1="AEAAAA",stringu2="WQKAAA",string4="OOOOxx" 621993600000000000 +tenk unique1=1527i,unique2=7199i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=527i,twothousand=1527i,fivethous=1527i,tenthous=1527i,odd=54i,even=55i,stringu1="TGAAAA",stringu2="XQKAAA",string4="VVVVxx" 622080000000000000 +tenk unique1=3460i,unique2=7200i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=460i,twothousand=1460i,fivethous=3460i,tenthous=3460i,odd=120i,even=121i,stringu1="CDAAAA",stringu2="YQKAAA",string4="AAAAxx" 622166400000000000 +tenk unique1=8526i,unique2=7201i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=526i,twothousand=526i,fivethous=3526i,tenthous=8526i,odd=52i,even=53i,stringu1="YPAAAA",stringu2="ZQKAAA",string4="HHHHxx" 622252800000000000 +tenk unique1=8959i,unique2=7202i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=959i,twothousand=959i,fivethous=3959i,tenthous=8959i,odd=118i,even=119i,stringu1="PGAAAA",stringu2="ARKAAA",string4="OOOOxx" 622339200000000000 +tenk unique1=3633i,unique2=7203i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=633i,twothousand=1633i,fivethous=3633i,tenthous=3633i,odd=66i,even=67i,stringu1="TJAAAA",stringu2="BRKAAA",string4="VVVVxx" 622425600000000000 +tenk unique1=1799i,unique2=7204i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=799i,twothousand=1799i,fivethous=1799i,tenthous=1799i,odd=198i,even=199i,stringu1="FRAAAA",stringu2="CRKAAA",string4="AAAAxx" 622512000000000000 +tenk unique1=461i,unique2=7205i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=461i,twothousand=461i,fivethous=461i,tenthous=461i,odd=122i,even=123i,stringu1="TRAAAA",stringu2="DRKAAA",string4="HHHHxx" 622598400000000000 +tenk unique1=718i,unique2=7206i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=718i,twothousand=718i,fivethous=718i,tenthous=718i,odd=36i,even=37i,stringu1="QBAAAA",stringu2="ERKAAA",string4="OOOOxx" 622684800000000000 +tenk unique1=3219i,unique2=7207i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=219i,twothousand=1219i,fivethous=3219i,tenthous=3219i,odd=38i,even=39i,stringu1="VTAAAA",stringu2="FRKAAA",string4="VVVVxx" 622771200000000000 +tenk unique1=3494i,unique2=7208i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=494i,twothousand=1494i,fivethous=3494i,tenthous=3494i,odd=188i,even=189i,stringu1="KEAAAA",stringu2="GRKAAA",string4="AAAAxx" 622857600000000000 +tenk unique1=9402i,unique2=7209i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=402i,twothousand=1402i,fivethous=4402i,tenthous=9402i,odd=4i,even=5i,stringu1="QXAAAA",stringu2="HRKAAA",string4="HHHHxx" 622944000000000000 +tenk unique1=7983i,unique2=7210i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=983i,twothousand=1983i,fivethous=2983i,tenthous=7983i,odd=166i,even=167i,stringu1="BVAAAA",stringu2="IRKAAA",string4="OOOOxx" 623030400000000000 +tenk unique1=7919i,unique2=7211i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=919i,twothousand=1919i,fivethous=2919i,tenthous=7919i,odd=38i,even=39i,stringu1="PSAAAA",stringu2="JRKAAA",string4="VVVVxx" 623116800000000000 +tenk unique1=8036i,unique2=7212i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=36i,twothousand=36i,fivethous=3036i,tenthous=8036i,odd=72i,even=73i,stringu1="CXAAAA",stringu2="KRKAAA",string4="AAAAxx" 623203200000000000 +tenk unique1=5164i,unique2=7213i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=164i,twothousand=1164i,fivethous=164i,tenthous=5164i,odd=128i,even=129i,stringu1="QQAAAA",stringu2="LRKAAA",string4="HHHHxx" 623289600000000000 +tenk unique1=4160i,unique2=7214i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=160i,twothousand=160i,fivethous=4160i,tenthous=4160i,odd=120i,even=121i,stringu1="AEAAAA",stringu2="MRKAAA",string4="OOOOxx" 623376000000000000 +tenk unique1=5370i,unique2=7215i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=370i,twothousand=1370i,fivethous=370i,tenthous=5370i,odd=140i,even=141i,stringu1="OYAAAA",stringu2="NRKAAA",string4="VVVVxx" 623462400000000000 +tenk unique1=5347i,unique2=7216i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=347i,twothousand=1347i,fivethous=347i,tenthous=5347i,odd=94i,even=95i,stringu1="RXAAAA",stringu2="ORKAAA",string4="AAAAxx" 623548800000000000 +tenk unique1=7109i,unique2=7217i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=109i,twothousand=1109i,fivethous=2109i,tenthous=7109i,odd=18i,even=19i,stringu1="LNAAAA",stringu2="PRKAAA",string4="HHHHxx" 623635200000000000 +tenk unique1=4826i,unique2=7218i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=826i,twothousand=826i,fivethous=4826i,tenthous=4826i,odd=52i,even=53i,stringu1="QDAAAA",stringu2="QRKAAA",string4="OOOOxx" 623721600000000000 +tenk unique1=1338i,unique2=7219i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=338i,twothousand=1338i,fivethous=1338i,tenthous=1338i,odd=76i,even=77i,stringu1="MZAAAA",stringu2="RRKAAA",string4="VVVVxx" 623808000000000000 +tenk unique1=2711i,unique2=7220i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=711i,twothousand=711i,fivethous=2711i,tenthous=2711i,odd=22i,even=23i,stringu1="HAAAAA",stringu2="SRKAAA",string4="AAAAxx" 623894400000000000 +tenk unique1=6299i,unique2=7221i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=299i,twothousand=299i,fivethous=1299i,tenthous=6299i,odd=198i,even=199i,stringu1="HIAAAA",stringu2="TRKAAA",string4="HHHHxx" 623980800000000000 +tenk unique1=1616i,unique2=7222i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=616i,twothousand=1616i,fivethous=1616i,tenthous=1616i,odd=32i,even=33i,stringu1="EKAAAA",stringu2="URKAAA",string4="OOOOxx" 624067200000000000 +tenk unique1=7519i,unique2=7223i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=519i,twothousand=1519i,fivethous=2519i,tenthous=7519i,odd=38i,even=39i,stringu1="FDAAAA",stringu2="VRKAAA",string4="VVVVxx" 624153600000000000 +tenk unique1=1262i,unique2=7224i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=262i,twothousand=1262i,fivethous=1262i,tenthous=1262i,odd=124i,even=125i,stringu1="OWAAAA",stringu2="WRKAAA",string4="AAAAxx" 624240000000000000 +tenk unique1=7228i,unique2=7225i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=228i,twothousand=1228i,fivethous=2228i,tenthous=7228i,odd=56i,even=57i,stringu1="ASAAAA",stringu2="XRKAAA",string4="HHHHxx" 624326400000000000 +tenk unique1=7892i,unique2=7226i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=892i,twothousand=1892i,fivethous=2892i,tenthous=7892i,odd=184i,even=185i,stringu1="ORAAAA",stringu2="YRKAAA",string4="OOOOxx" 624412800000000000 +tenk unique1=7929i,unique2=7227i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=929i,twothousand=1929i,fivethous=2929i,tenthous=7929i,odd=58i,even=59i,stringu1="ZSAAAA",stringu2="ZRKAAA",string4="VVVVxx" 624499200000000000 +tenk unique1=7705i,unique2=7228i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=705i,twothousand=1705i,fivethous=2705i,tenthous=7705i,odd=10i,even=11i,stringu1="JKAAAA",stringu2="ASKAAA",string4="AAAAxx" 624585600000000000 +tenk unique1=3111i,unique2=7229i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=111i,twothousand=1111i,fivethous=3111i,tenthous=3111i,odd=22i,even=23i,stringu1="RPAAAA",stringu2="BSKAAA",string4="HHHHxx" 624672000000000000 +tenk unique1=3066i,unique2=7230i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=66i,twothousand=1066i,fivethous=3066i,tenthous=3066i,odd=132i,even=133i,stringu1="YNAAAA",stringu2="CSKAAA",string4="OOOOxx" 624758400000000000 +tenk unique1=9559i,unique2=7231i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=559i,twothousand=1559i,fivethous=4559i,tenthous=9559i,odd=118i,even=119i,stringu1="RDAAAA",stringu2="DSKAAA",string4="VVVVxx" 624844800000000000 +tenk unique1=3787i,unique2=7232i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=787i,twothousand=1787i,fivethous=3787i,tenthous=3787i,odd=174i,even=175i,stringu1="RPAAAA",stringu2="ESKAAA",string4="AAAAxx" 624931200000000000 +tenk unique1=8710i,unique2=7233i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=710i,twothousand=710i,fivethous=3710i,tenthous=8710i,odd=20i,even=21i,stringu1="AXAAAA",stringu2="FSKAAA",string4="HHHHxx" 625017600000000000 +tenk unique1=4870i,unique2=7234i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=870i,twothousand=870i,fivethous=4870i,tenthous=4870i,odd=140i,even=141i,stringu1="IFAAAA",stringu2="GSKAAA",string4="OOOOxx" 625104000000000000 +tenk unique1=1883i,unique2=7235i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=883i,twothousand=1883i,fivethous=1883i,tenthous=1883i,odd=166i,even=167i,stringu1="LUAAAA",stringu2="HSKAAA",string4="VVVVxx" 625190400000000000 +tenk unique1=9689i,unique2=7236i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=689i,twothousand=1689i,fivethous=4689i,tenthous=9689i,odd=178i,even=179i,stringu1="RIAAAA",stringu2="ISKAAA",string4="AAAAxx" 625276800000000000 +tenk unique1=9491i,unique2=7237i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=491i,twothousand=1491i,fivethous=4491i,tenthous=9491i,odd=182i,even=183i,stringu1="BBAAAA",stringu2="JSKAAA",string4="HHHHxx" 625363200000000000 +tenk unique1=2035i,unique2=7238i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=35i,twothousand=35i,fivethous=2035i,tenthous=2035i,odd=70i,even=71i,stringu1="HAAAAA",stringu2="KSKAAA",string4="OOOOxx" 625449600000000000 +tenk unique1=655i,unique2=7239i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=655i,twothousand=655i,fivethous=655i,tenthous=655i,odd=110i,even=111i,stringu1="FZAAAA",stringu2="LSKAAA",string4="VVVVxx" 625536000000000000 +tenk unique1=6305i,unique2=7240i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=305i,twothousand=305i,fivethous=1305i,tenthous=6305i,odd=10i,even=11i,stringu1="NIAAAA",stringu2="MSKAAA",string4="AAAAxx" 625622400000000000 +tenk unique1=9423i,unique2=7241i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=423i,twothousand=1423i,fivethous=4423i,tenthous=9423i,odd=46i,even=47i,stringu1="LYAAAA",stringu2="NSKAAA",string4="HHHHxx" 625708800000000000 +tenk unique1=283i,unique2=7242i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=283i,twothousand=283i,fivethous=283i,tenthous=283i,odd=166i,even=167i,stringu1="XKAAAA",stringu2="OSKAAA",string4="OOOOxx" 625795200000000000 +tenk unique1=2607i,unique2=7243i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=607i,twothousand=607i,fivethous=2607i,tenthous=2607i,odd=14i,even=15i,stringu1="HWAAAA",stringu2="PSKAAA",string4="VVVVxx" 625881600000000000 +tenk unique1=7740i,unique2=7244i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=740i,twothousand=1740i,fivethous=2740i,tenthous=7740i,odd=80i,even=81i,stringu1="SLAAAA",stringu2="QSKAAA",string4="AAAAxx" 625968000000000000 +tenk unique1=6956i,unique2=7245i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=956i,twothousand=956i,fivethous=1956i,tenthous=6956i,odd=112i,even=113i,stringu1="OHAAAA",stringu2="RSKAAA",string4="HHHHxx" 626054400000000000 +tenk unique1=884i,unique2=7246i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=884i,twothousand=884i,fivethous=884i,tenthous=884i,odd=168i,even=169i,stringu1="AIAAAA",stringu2="SSKAAA",string4="OOOOxx" 626140800000000000 +tenk unique1=5730i,unique2=7247i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=730i,twothousand=1730i,fivethous=730i,tenthous=5730i,odd=60i,even=61i,stringu1="KMAAAA",stringu2="TSKAAA",string4="VVVVxx" 626227200000000000 +tenk unique1=3438i,unique2=7248i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=438i,twothousand=1438i,fivethous=3438i,tenthous=3438i,odd=76i,even=77i,stringu1="GCAAAA",stringu2="USKAAA",string4="AAAAxx" 626313600000000000 +tenk unique1=3250i,unique2=7249i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=250i,twothousand=1250i,fivethous=3250i,tenthous=3250i,odd=100i,even=101i,stringu1="AVAAAA",stringu2="VSKAAA",string4="HHHHxx" 626400000000000000 +tenk unique1=5470i,unique2=7250i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=470i,twothousand=1470i,fivethous=470i,tenthous=5470i,odd=140i,even=141i,stringu1="KCAAAA",stringu2="WSKAAA",string4="OOOOxx" 626486400000000000 +tenk unique1=2037i,unique2=7251i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=37i,twothousand=37i,fivethous=2037i,tenthous=2037i,odd=74i,even=75i,stringu1="JAAAAA",stringu2="XSKAAA",string4="VVVVxx" 626572800000000000 +tenk unique1=6593i,unique2=7252i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=593i,twothousand=593i,fivethous=1593i,tenthous=6593i,odd=186i,even=187i,stringu1="PTAAAA",stringu2="YSKAAA",string4="AAAAxx" 626659200000000000 +tenk unique1=3893i,unique2=7253i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=893i,twothousand=1893i,fivethous=3893i,tenthous=3893i,odd=186i,even=187i,stringu1="TTAAAA",stringu2="ZSKAAA",string4="HHHHxx" 626745600000000000 +tenk unique1=3200i,unique2=7254i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=200i,twothousand=1200i,fivethous=3200i,tenthous=3200i,odd=0i,even=1i,stringu1="CTAAAA",stringu2="ATKAAA",string4="OOOOxx" 626832000000000000 +tenk unique1=7125i,unique2=7255i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=125i,twothousand=1125i,fivethous=2125i,tenthous=7125i,odd=50i,even=51i,stringu1="BOAAAA",stringu2="BTKAAA",string4="VVVVxx" 626918400000000000 +tenk unique1=2295i,unique2=7256i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=295i,twothousand=295i,fivethous=2295i,tenthous=2295i,odd=190i,even=191i,stringu1="HKAAAA",stringu2="CTKAAA",string4="AAAAxx" 627004800000000000 +tenk unique1=2056i,unique2=7257i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=56i,twothousand=56i,fivethous=2056i,tenthous=2056i,odd=112i,even=113i,stringu1="CBAAAA",stringu2="DTKAAA",string4="HHHHxx" 627091200000000000 +tenk unique1=2962i,unique2=7258i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=962i,twothousand=962i,fivethous=2962i,tenthous=2962i,odd=124i,even=125i,stringu1="YJAAAA",stringu2="ETKAAA",string4="OOOOxx" 627177600000000000 +tenk unique1=993i,unique2=7259i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=993i,twothousand=993i,fivethous=993i,tenthous=993i,odd=186i,even=187i,stringu1="FMAAAA",stringu2="FTKAAA",string4="VVVVxx" 627264000000000000 +tenk unique1=9127i,unique2=7260i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=127i,twothousand=1127i,fivethous=4127i,tenthous=9127i,odd=54i,even=55i,stringu1="BNAAAA",stringu2="GTKAAA",string4="AAAAxx" 627350400000000000 +tenk unique1=2075i,unique2=7261i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=75i,twothousand=75i,fivethous=2075i,tenthous=2075i,odd=150i,even=151i,stringu1="VBAAAA",stringu2="HTKAAA",string4="HHHHxx" 627436800000000000 +tenk unique1=9338i,unique2=7262i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=338i,twothousand=1338i,fivethous=4338i,tenthous=9338i,odd=76i,even=77i,stringu1="EVAAAA",stringu2="ITKAAA",string4="OOOOxx" 627523200000000000 +tenk unique1=8100i,unique2=7263i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=100i,twothousand=100i,fivethous=3100i,tenthous=8100i,odd=0i,even=1i,stringu1="OZAAAA",stringu2="JTKAAA",string4="VVVVxx" 627609600000000000 +tenk unique1=5047i,unique2=7264i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=47i,twothousand=1047i,fivethous=47i,tenthous=5047i,odd=94i,even=95i,stringu1="DMAAAA",stringu2="KTKAAA",string4="AAAAxx" 627696000000000000 +tenk unique1=7032i,unique2=7265i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=32i,twothousand=1032i,fivethous=2032i,tenthous=7032i,odd=64i,even=65i,stringu1="MKAAAA",stringu2="LTKAAA",string4="HHHHxx" 627782400000000000 +tenk unique1=6374i,unique2=7266i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=374i,twothousand=374i,fivethous=1374i,tenthous=6374i,odd=148i,even=149i,stringu1="ELAAAA",stringu2="MTKAAA",string4="OOOOxx" 627868800000000000 +tenk unique1=4137i,unique2=7267i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=137i,twothousand=137i,fivethous=4137i,tenthous=4137i,odd=74i,even=75i,stringu1="DDAAAA",stringu2="NTKAAA",string4="VVVVxx" 627955200000000000 +tenk unique1=7132i,unique2=7268i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=132i,twothousand=1132i,fivethous=2132i,tenthous=7132i,odd=64i,even=65i,stringu1="IOAAAA",stringu2="OTKAAA",string4="AAAAxx" 628041600000000000 +tenk unique1=3064i,unique2=7269i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=64i,twothousand=1064i,fivethous=3064i,tenthous=3064i,odd=128i,even=129i,stringu1="WNAAAA",stringu2="PTKAAA",string4="HHHHxx" 628128000000000000 +tenk unique1=3621i,unique2=7270i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=621i,twothousand=1621i,fivethous=3621i,tenthous=3621i,odd=42i,even=43i,stringu1="HJAAAA",stringu2="QTKAAA",string4="OOOOxx" 628214400000000000 +tenk unique1=6199i,unique2=7271i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=199i,twothousand=199i,fivethous=1199i,tenthous=6199i,odd=198i,even=199i,stringu1="LEAAAA",stringu2="RTKAAA",string4="VVVVxx" 628300800000000000 +tenk unique1=4926i,unique2=7272i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=926i,twothousand=926i,fivethous=4926i,tenthous=4926i,odd=52i,even=53i,stringu1="MHAAAA",stringu2="STKAAA",string4="AAAAxx" 628387200000000000 +tenk unique1=8035i,unique2=7273i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=35i,twothousand=35i,fivethous=3035i,tenthous=8035i,odd=70i,even=71i,stringu1="BXAAAA",stringu2="TTKAAA",string4="HHHHxx" 628473600000000000 +tenk unique1=2195i,unique2=7274i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=195i,twothousand=195i,fivethous=2195i,tenthous=2195i,odd=190i,even=191i,stringu1="LGAAAA",stringu2="UTKAAA",string4="OOOOxx" 628560000000000000 +tenk unique1=5366i,unique2=7275i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=366i,twothousand=1366i,fivethous=366i,tenthous=5366i,odd=132i,even=133i,stringu1="KYAAAA",stringu2="VTKAAA",string4="VVVVxx" 628646400000000000 +tenk unique1=3478i,unique2=7276i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=478i,twothousand=1478i,fivethous=3478i,tenthous=3478i,odd=156i,even=157i,stringu1="UDAAAA",stringu2="WTKAAA",string4="AAAAxx" 628732800000000000 +tenk unique1=1926i,unique2=7277i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=926i,twothousand=1926i,fivethous=1926i,tenthous=1926i,odd=52i,even=53i,stringu1="CWAAAA",stringu2="XTKAAA",string4="HHHHxx" 628819200000000000 +tenk unique1=7265i,unique2=7278i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=265i,twothousand=1265i,fivethous=2265i,tenthous=7265i,odd=130i,even=131i,stringu1="LTAAAA",stringu2="YTKAAA",string4="OOOOxx" 628905600000000000 +tenk unique1=7668i,unique2=7279i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=668i,twothousand=1668i,fivethous=2668i,tenthous=7668i,odd=136i,even=137i,stringu1="YIAAAA",stringu2="ZTKAAA",string4="VVVVxx" 628992000000000000 +tenk unique1=3335i,unique2=7280i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=335i,twothousand=1335i,fivethous=3335i,tenthous=3335i,odd=70i,even=71i,stringu1="HYAAAA",stringu2="AUKAAA",string4="AAAAxx" 629078400000000000 +tenk unique1=7660i,unique2=7281i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=660i,twothousand=1660i,fivethous=2660i,tenthous=7660i,odd=120i,even=121i,stringu1="QIAAAA",stringu2="BUKAAA",string4="HHHHxx" 629164800000000000 +tenk unique1=9604i,unique2=7282i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=604i,twothousand=1604i,fivethous=4604i,tenthous=9604i,odd=8i,even=9i,stringu1="KFAAAA",stringu2="CUKAAA",string4="OOOOxx" 629251200000000000 +tenk unique1=7301i,unique2=7283i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=301i,twothousand=1301i,fivethous=2301i,tenthous=7301i,odd=2i,even=3i,stringu1="VUAAAA",stringu2="DUKAAA",string4="VVVVxx" 629337600000000000 +tenk unique1=4475i,unique2=7284i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=475i,twothousand=475i,fivethous=4475i,tenthous=4475i,odd=150i,even=151i,stringu1="DQAAAA",stringu2="EUKAAA",string4="AAAAxx" 629424000000000000 +tenk unique1=9954i,unique2=7285i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=954i,twothousand=1954i,fivethous=4954i,tenthous=9954i,odd=108i,even=109i,stringu1="WSAAAA",stringu2="FUKAAA",string4="HHHHxx" 629510400000000000 +tenk unique1=5723i,unique2=7286i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=723i,twothousand=1723i,fivethous=723i,tenthous=5723i,odd=46i,even=47i,stringu1="DMAAAA",stringu2="GUKAAA",string4="OOOOxx" 629596800000000000 +tenk unique1=2669i,unique2=7287i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=669i,twothousand=669i,fivethous=2669i,tenthous=2669i,odd=138i,even=139i,stringu1="RYAAAA",stringu2="HUKAAA",string4="VVVVxx" 629683200000000000 +tenk unique1=1685i,unique2=7288i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=685i,twothousand=1685i,fivethous=1685i,tenthous=1685i,odd=170i,even=171i,stringu1="VMAAAA",stringu2="IUKAAA",string4="AAAAxx" 629769600000000000 +tenk unique1=2233i,unique2=7289i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=233i,twothousand=233i,fivethous=2233i,tenthous=2233i,odd=66i,even=67i,stringu1="XHAAAA",stringu2="JUKAAA",string4="HHHHxx" 629856000000000000 +tenk unique1=8111i,unique2=7290i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=111i,twothousand=111i,fivethous=3111i,tenthous=8111i,odd=22i,even=23i,stringu1="ZZAAAA",stringu2="KUKAAA",string4="OOOOxx" 629942400000000000 +tenk unique1=7685i,unique2=7291i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=685i,twothousand=1685i,fivethous=2685i,tenthous=7685i,odd=170i,even=171i,stringu1="PJAAAA",stringu2="LUKAAA",string4="VVVVxx" 630028800000000000 +tenk unique1=3773i,unique2=7292i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=773i,twothousand=1773i,fivethous=3773i,tenthous=3773i,odd=146i,even=147i,stringu1="DPAAAA",stringu2="MUKAAA",string4="AAAAxx" 630115200000000000 +tenk unique1=7172i,unique2=7293i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=172i,twothousand=1172i,fivethous=2172i,tenthous=7172i,odd=144i,even=145i,stringu1="WPAAAA",stringu2="NUKAAA",string4="HHHHxx" 630201600000000000 +tenk unique1=1740i,unique2=7294i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=740i,twothousand=1740i,fivethous=1740i,tenthous=1740i,odd=80i,even=81i,stringu1="YOAAAA",stringu2="OUKAAA",string4="OOOOxx" 630288000000000000 +tenk unique1=5416i,unique2=7295i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=416i,twothousand=1416i,fivethous=416i,tenthous=5416i,odd=32i,even=33i,stringu1="IAAAAA",stringu2="PUKAAA",string4="VVVVxx" 630374400000000000 +tenk unique1=1823i,unique2=7296i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=823i,twothousand=1823i,fivethous=1823i,tenthous=1823i,odd=46i,even=47i,stringu1="DSAAAA",stringu2="QUKAAA",string4="AAAAxx" 630460800000000000 +tenk unique1=1668i,unique2=7297i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=668i,twothousand=1668i,fivethous=1668i,tenthous=1668i,odd=136i,even=137i,stringu1="EMAAAA",stringu2="RUKAAA",string4="HHHHxx" 630547200000000000 +tenk unique1=1795i,unique2=7298i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=795i,twothousand=1795i,fivethous=1795i,tenthous=1795i,odd=190i,even=191i,stringu1="BRAAAA",stringu2="SUKAAA",string4="OOOOxx" 630633600000000000 +tenk unique1=8599i,unique2=7299i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=599i,twothousand=599i,fivethous=3599i,tenthous=8599i,odd=198i,even=199i,stringu1="TSAAAA",stringu2="TUKAAA",string4="VVVVxx" 630720000000000000 +tenk unique1=5542i,unique2=7300i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=542i,twothousand=1542i,fivethous=542i,tenthous=5542i,odd=84i,even=85i,stringu1="EFAAAA",stringu2="UUKAAA",string4="AAAAxx" 630806400000000000 +tenk unique1=5658i,unique2=7301i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=658i,twothousand=1658i,fivethous=658i,tenthous=5658i,odd=116i,even=117i,stringu1="QJAAAA",stringu2="VUKAAA",string4="HHHHxx" 630892800000000000 +tenk unique1=9824i,unique2=7302i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=824i,twothousand=1824i,fivethous=4824i,tenthous=9824i,odd=48i,even=49i,stringu1="WNAAAA",stringu2="WUKAAA",string4="OOOOxx" 630979200000000000 +tenk unique1=19i,unique2=7303i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=19i,twothousand=19i,fivethous=19i,tenthous=19i,odd=38i,even=39i,stringu1="TAAAAA",stringu2="XUKAAA",string4="VVVVxx" 631065600000000000 +tenk unique1=9344i,unique2=7304i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=344i,twothousand=1344i,fivethous=4344i,tenthous=9344i,odd=88i,even=89i,stringu1="KVAAAA",stringu2="YUKAAA",string4="AAAAxx" 631152000000000000 +tenk unique1=5900i,unique2=7305i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=900i,twothousand=1900i,fivethous=900i,tenthous=5900i,odd=0i,even=1i,stringu1="YSAAAA",stringu2="ZUKAAA",string4="HHHHxx" 631238400000000000 +tenk unique1=7818i,unique2=7306i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=818i,twothousand=1818i,fivethous=2818i,tenthous=7818i,odd=36i,even=37i,stringu1="SOAAAA",stringu2="AVKAAA",string4="OOOOxx" 631324800000000000 +tenk unique1=8377i,unique2=7307i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=377i,twothousand=377i,fivethous=3377i,tenthous=8377i,odd=154i,even=155i,stringu1="FKAAAA",stringu2="BVKAAA",string4="VVVVxx" 631411200000000000 +tenk unique1=6886i,unique2=7308i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=886i,twothousand=886i,fivethous=1886i,tenthous=6886i,odd=172i,even=173i,stringu1="WEAAAA",stringu2="CVKAAA",string4="AAAAxx" 631497600000000000 +tenk unique1=3201i,unique2=7309i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=201i,twothousand=1201i,fivethous=3201i,tenthous=3201i,odd=2i,even=3i,stringu1="DTAAAA",stringu2="DVKAAA",string4="HHHHxx" 631584000000000000 +tenk unique1=87i,unique2=7310i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=87i,twothousand=87i,fivethous=87i,tenthous=87i,odd=174i,even=175i,stringu1="JDAAAA",stringu2="EVKAAA",string4="OOOOxx" 631670400000000000 +tenk unique1=1089i,unique2=7311i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=89i,twothousand=1089i,fivethous=1089i,tenthous=1089i,odd=178i,even=179i,stringu1="XPAAAA",stringu2="FVKAAA",string4="VVVVxx" 631756800000000000 +tenk unique1=3948i,unique2=7312i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=948i,twothousand=1948i,fivethous=3948i,tenthous=3948i,odd=96i,even=97i,stringu1="WVAAAA",stringu2="GVKAAA",string4="AAAAxx" 631843200000000000 +tenk unique1=6383i,unique2=7313i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=383i,twothousand=383i,fivethous=1383i,tenthous=6383i,odd=166i,even=167i,stringu1="NLAAAA",stringu2="HVKAAA",string4="HHHHxx" 631929600000000000 +tenk unique1=837i,unique2=7314i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=837i,twothousand=837i,fivethous=837i,tenthous=837i,odd=74i,even=75i,stringu1="FGAAAA",stringu2="IVKAAA",string4="OOOOxx" 632016000000000000 +tenk unique1=6285i,unique2=7315i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=285i,twothousand=285i,fivethous=1285i,tenthous=6285i,odd=170i,even=171i,stringu1="THAAAA",stringu2="JVKAAA",string4="VVVVxx" 632102400000000000 +tenk unique1=78i,unique2=7316i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=78i,twothousand=78i,fivethous=78i,tenthous=78i,odd=156i,even=157i,stringu1="ADAAAA",stringu2="KVKAAA",string4="AAAAxx" 632188800000000000 +tenk unique1=4389i,unique2=7317i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=389i,twothousand=389i,fivethous=4389i,tenthous=4389i,odd=178i,even=179i,stringu1="VMAAAA",stringu2="LVKAAA",string4="HHHHxx" 632275200000000000 +tenk unique1=4795i,unique2=7318i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=795i,twothousand=795i,fivethous=4795i,tenthous=4795i,odd=190i,even=191i,stringu1="LCAAAA",stringu2="MVKAAA",string4="OOOOxx" 632361600000000000 +tenk unique1=9369i,unique2=7319i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=369i,twothousand=1369i,fivethous=4369i,tenthous=9369i,odd=138i,even=139i,stringu1="JWAAAA",stringu2="NVKAAA",string4="VVVVxx" 632448000000000000 +tenk unique1=69i,unique2=7320i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=69i,twothousand=69i,fivethous=69i,tenthous=69i,odd=138i,even=139i,stringu1="RCAAAA",stringu2="OVKAAA",string4="AAAAxx" 632534400000000000 +tenk unique1=7689i,unique2=7321i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=689i,twothousand=1689i,fivethous=2689i,tenthous=7689i,odd=178i,even=179i,stringu1="TJAAAA",stringu2="PVKAAA",string4="HHHHxx" 632620800000000000 +tenk unique1=5642i,unique2=7322i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=642i,twothousand=1642i,fivethous=642i,tenthous=5642i,odd=84i,even=85i,stringu1="AJAAAA",stringu2="QVKAAA",string4="OOOOxx" 632707200000000000 +tenk unique1=2348i,unique2=7323i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=348i,twothousand=348i,fivethous=2348i,tenthous=2348i,odd=96i,even=97i,stringu1="IMAAAA",stringu2="RVKAAA",string4="VVVVxx" 632793600000000000 +tenk unique1=9308i,unique2=7324i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=308i,twothousand=1308i,fivethous=4308i,tenthous=9308i,odd=16i,even=17i,stringu1="AUAAAA",stringu2="SVKAAA",string4="AAAAxx" 632880000000000000 +tenk unique1=9093i,unique2=7325i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=93i,twothousand=1093i,fivethous=4093i,tenthous=9093i,odd=186i,even=187i,stringu1="TLAAAA",stringu2="TVKAAA",string4="HHHHxx" 632966400000000000 +tenk unique1=1199i,unique2=7326i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=199i,twothousand=1199i,fivethous=1199i,tenthous=1199i,odd=198i,even=199i,stringu1="DUAAAA",stringu2="UVKAAA",string4="OOOOxx" 633052800000000000 +tenk unique1=307i,unique2=7327i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=307i,twothousand=307i,fivethous=307i,tenthous=307i,odd=14i,even=15i,stringu1="VLAAAA",stringu2="VVKAAA",string4="VVVVxx" 633139200000000000 +tenk unique1=3814i,unique2=7328i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=814i,twothousand=1814i,fivethous=3814i,tenthous=3814i,odd=28i,even=29i,stringu1="SQAAAA",stringu2="WVKAAA",string4="AAAAxx" 633225600000000000 +tenk unique1=8817i,unique2=7329i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=817i,twothousand=817i,fivethous=3817i,tenthous=8817i,odd=34i,even=35i,stringu1="DBAAAA",stringu2="XVKAAA",string4="HHHHxx" 633312000000000000 +tenk unique1=2329i,unique2=7330i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=329i,twothousand=329i,fivethous=2329i,tenthous=2329i,odd=58i,even=59i,stringu1="PLAAAA",stringu2="YVKAAA",string4="OOOOxx" 633398400000000000 +tenk unique1=2932i,unique2=7331i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=932i,twothousand=932i,fivethous=2932i,tenthous=2932i,odd=64i,even=65i,stringu1="UIAAAA",stringu2="ZVKAAA",string4="VVVVxx" 633484800000000000 +tenk unique1=1986i,unique2=7332i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=986i,twothousand=1986i,fivethous=1986i,tenthous=1986i,odd=172i,even=173i,stringu1="KYAAAA",stringu2="AWKAAA",string4="AAAAxx" 633571200000000000 +tenk unique1=5279i,unique2=7333i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=279i,twothousand=1279i,fivethous=279i,tenthous=5279i,odd=158i,even=159i,stringu1="BVAAAA",stringu2="BWKAAA",string4="HHHHxx" 633657600000000000 +tenk unique1=5357i,unique2=7334i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=357i,twothousand=1357i,fivethous=357i,tenthous=5357i,odd=114i,even=115i,stringu1="BYAAAA",stringu2="CWKAAA",string4="OOOOxx" 633744000000000000 +tenk unique1=6778i,unique2=7335i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=778i,twothousand=778i,fivethous=1778i,tenthous=6778i,odd=156i,even=157i,stringu1="SAAAAA",stringu2="DWKAAA",string4="VVVVxx" 633830400000000000 +tenk unique1=2773i,unique2=7336i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=773i,twothousand=773i,fivethous=2773i,tenthous=2773i,odd=146i,even=147i,stringu1="RCAAAA",stringu2="EWKAAA",string4="AAAAxx" 633916800000000000 +tenk unique1=244i,unique2=7337i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=244i,twothousand=244i,fivethous=244i,tenthous=244i,odd=88i,even=89i,stringu1="KJAAAA",stringu2="FWKAAA",string4="HHHHxx" 634003200000000000 +tenk unique1=6900i,unique2=7338i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=900i,twothousand=900i,fivethous=1900i,tenthous=6900i,odd=0i,even=1i,stringu1="KFAAAA",stringu2="GWKAAA",string4="OOOOxx" 634089600000000000 +tenk unique1=4739i,unique2=7339i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=739i,twothousand=739i,fivethous=4739i,tenthous=4739i,odd=78i,even=79i,stringu1="HAAAAA",stringu2="HWKAAA",string4="VVVVxx" 634176000000000000 +tenk unique1=3217i,unique2=7340i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=217i,twothousand=1217i,fivethous=3217i,tenthous=3217i,odd=34i,even=35i,stringu1="TTAAAA",stringu2="IWKAAA",string4="AAAAxx" 634262400000000000 +tenk unique1=7563i,unique2=7341i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=563i,twothousand=1563i,fivethous=2563i,tenthous=7563i,odd=126i,even=127i,stringu1="XEAAAA",stringu2="JWKAAA",string4="HHHHxx" 634348800000000000 +tenk unique1=1807i,unique2=7342i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=807i,twothousand=1807i,fivethous=1807i,tenthous=1807i,odd=14i,even=15i,stringu1="NRAAAA",stringu2="KWKAAA",string4="OOOOxx" 634435200000000000 +tenk unique1=4199i,unique2=7343i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=199i,twothousand=199i,fivethous=4199i,tenthous=4199i,odd=198i,even=199i,stringu1="NFAAAA",stringu2="LWKAAA",string4="VVVVxx" 634521600000000000 +tenk unique1=1077i,unique2=7344i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=77i,twothousand=1077i,fivethous=1077i,tenthous=1077i,odd=154i,even=155i,stringu1="LPAAAA",stringu2="MWKAAA",string4="AAAAxx" 634608000000000000 +tenk unique1=8348i,unique2=7345i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=348i,twothousand=348i,fivethous=3348i,tenthous=8348i,odd=96i,even=97i,stringu1="CJAAAA",stringu2="NWKAAA",string4="HHHHxx" 634694400000000000 +tenk unique1=841i,unique2=7346i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=841i,twothousand=841i,fivethous=841i,tenthous=841i,odd=82i,even=83i,stringu1="JGAAAA",stringu2="OWKAAA",string4="OOOOxx" 634780800000000000 +tenk unique1=8154i,unique2=7347i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=154i,twothousand=154i,fivethous=3154i,tenthous=8154i,odd=108i,even=109i,stringu1="QBAAAA",stringu2="PWKAAA",string4="VVVVxx" 634867200000000000 +tenk unique1=5261i,unique2=7348i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=261i,twothousand=1261i,fivethous=261i,tenthous=5261i,odd=122i,even=123i,stringu1="JUAAAA",stringu2="QWKAAA",string4="AAAAxx" 634953600000000000 +tenk unique1=1950i,unique2=7349i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=950i,twothousand=1950i,fivethous=1950i,tenthous=1950i,odd=100i,even=101i,stringu1="AXAAAA",stringu2="RWKAAA",string4="HHHHxx" 635040000000000000 +tenk unique1=8472i,unique2=7350i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=472i,twothousand=472i,fivethous=3472i,tenthous=8472i,odd=144i,even=145i,stringu1="WNAAAA",stringu2="SWKAAA",string4="OOOOxx" 635126400000000000 +tenk unique1=8745i,unique2=7351i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=745i,twothousand=745i,fivethous=3745i,tenthous=8745i,odd=90i,even=91i,stringu1="JYAAAA",stringu2="TWKAAA",string4="VVVVxx" 635212800000000000 +tenk unique1=8715i,unique2=7352i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=715i,twothousand=715i,fivethous=3715i,tenthous=8715i,odd=30i,even=31i,stringu1="FXAAAA",stringu2="UWKAAA",string4="AAAAxx" 635299200000000000 +tenk unique1=9708i,unique2=7353i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=708i,twothousand=1708i,fivethous=4708i,tenthous=9708i,odd=16i,even=17i,stringu1="KJAAAA",stringu2="VWKAAA",string4="HHHHxx" 635385600000000000 +tenk unique1=5860i,unique2=7354i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=860i,twothousand=1860i,fivethous=860i,tenthous=5860i,odd=120i,even=121i,stringu1="KRAAAA",stringu2="WWKAAA",string4="OOOOxx" 635472000000000000 +tenk unique1=9142i,unique2=7355i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=142i,twothousand=1142i,fivethous=4142i,tenthous=9142i,odd=84i,even=85i,stringu1="QNAAAA",stringu2="XWKAAA",string4="VVVVxx" 635558400000000000 +tenk unique1=6582i,unique2=7356i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=582i,twothousand=582i,fivethous=1582i,tenthous=6582i,odd=164i,even=165i,stringu1="ETAAAA",stringu2="YWKAAA",string4="AAAAxx" 635644800000000000 +tenk unique1=1255i,unique2=7357i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=255i,twothousand=1255i,fivethous=1255i,tenthous=1255i,odd=110i,even=111i,stringu1="HWAAAA",stringu2="ZWKAAA",string4="HHHHxx" 635731200000000000 +tenk unique1=6459i,unique2=7358i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=459i,twothousand=459i,fivethous=1459i,tenthous=6459i,odd=118i,even=119i,stringu1="LOAAAA",stringu2="AXKAAA",string4="OOOOxx" 635817600000000000 +tenk unique1=6327i,unique2=7359i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=327i,twothousand=327i,fivethous=1327i,tenthous=6327i,odd=54i,even=55i,stringu1="JJAAAA",stringu2="BXKAAA",string4="VVVVxx" 635904000000000000 +tenk unique1=4692i,unique2=7360i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=692i,twothousand=692i,fivethous=4692i,tenthous=4692i,odd=184i,even=185i,stringu1="MYAAAA",stringu2="CXKAAA",string4="AAAAxx" 635990400000000000 +tenk unique1=3772i,unique2=7361i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=772i,twothousand=1772i,fivethous=3772i,tenthous=3772i,odd=144i,even=145i,stringu1="CPAAAA",stringu2="DXKAAA",string4="HHHHxx" 636076800000000000 +tenk unique1=4203i,unique2=7362i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=203i,twothousand=203i,fivethous=4203i,tenthous=4203i,odd=6i,even=7i,stringu1="RFAAAA",stringu2="EXKAAA",string4="OOOOxx" 636163200000000000 +tenk unique1=2946i,unique2=7363i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=946i,twothousand=946i,fivethous=2946i,tenthous=2946i,odd=92i,even=93i,stringu1="IJAAAA",stringu2="FXKAAA",string4="VVVVxx" 636249600000000000 +tenk unique1=3524i,unique2=7364i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=524i,twothousand=1524i,fivethous=3524i,tenthous=3524i,odd=48i,even=49i,stringu1="OFAAAA",stringu2="GXKAAA",string4="AAAAxx" 636336000000000000 +tenk unique1=8409i,unique2=7365i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=409i,twothousand=409i,fivethous=3409i,tenthous=8409i,odd=18i,even=19i,stringu1="LLAAAA",stringu2="HXKAAA",string4="HHHHxx" 636422400000000000 +tenk unique1=1824i,unique2=7366i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=824i,twothousand=1824i,fivethous=1824i,tenthous=1824i,odd=48i,even=49i,stringu1="ESAAAA",stringu2="IXKAAA",string4="OOOOxx" 636508800000000000 +tenk unique1=4637i,unique2=7367i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=637i,twothousand=637i,fivethous=4637i,tenthous=4637i,odd=74i,even=75i,stringu1="JWAAAA",stringu2="JXKAAA",string4="VVVVxx" 636595200000000000 +tenk unique1=589i,unique2=7368i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=589i,twothousand=589i,fivethous=589i,tenthous=589i,odd=178i,even=179i,stringu1="RWAAAA",stringu2="KXKAAA",string4="AAAAxx" 636681600000000000 +tenk unique1=484i,unique2=7369i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=484i,twothousand=484i,fivethous=484i,tenthous=484i,odd=168i,even=169i,stringu1="QSAAAA",stringu2="LXKAAA",string4="HHHHxx" 636768000000000000 +tenk unique1=8963i,unique2=7370i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=963i,twothousand=963i,fivethous=3963i,tenthous=8963i,odd=126i,even=127i,stringu1="TGAAAA",stringu2="MXKAAA",string4="OOOOxx" 636854400000000000 +tenk unique1=5502i,unique2=7371i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=502i,twothousand=1502i,fivethous=502i,tenthous=5502i,odd=4i,even=5i,stringu1="QDAAAA",stringu2="NXKAAA",string4="VVVVxx" 636940800000000000 +tenk unique1=6982i,unique2=7372i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=982i,twothousand=982i,fivethous=1982i,tenthous=6982i,odd=164i,even=165i,stringu1="OIAAAA",stringu2="OXKAAA",string4="AAAAxx" 637027200000000000 +tenk unique1=8029i,unique2=7373i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=29i,twothousand=29i,fivethous=3029i,tenthous=8029i,odd=58i,even=59i,stringu1="VWAAAA",stringu2="PXKAAA",string4="HHHHxx" 637113600000000000 +tenk unique1=4395i,unique2=7374i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=395i,twothousand=395i,fivethous=4395i,tenthous=4395i,odd=190i,even=191i,stringu1="BNAAAA",stringu2="QXKAAA",string4="OOOOxx" 637200000000000000 +tenk unique1=2595i,unique2=7375i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=595i,twothousand=595i,fivethous=2595i,tenthous=2595i,odd=190i,even=191i,stringu1="VVAAAA",stringu2="RXKAAA",string4="VVVVxx" 637286400000000000 +tenk unique1=2133i,unique2=7376i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=133i,twothousand=133i,fivethous=2133i,tenthous=2133i,odd=66i,even=67i,stringu1="BEAAAA",stringu2="SXKAAA",string4="AAAAxx" 637372800000000000 +tenk unique1=1414i,unique2=7377i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=414i,twothousand=1414i,fivethous=1414i,tenthous=1414i,odd=28i,even=29i,stringu1="KCAAAA",stringu2="TXKAAA",string4="HHHHxx" 637459200000000000 +tenk unique1=8201i,unique2=7378i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=201i,twothousand=201i,fivethous=3201i,tenthous=8201i,odd=2i,even=3i,stringu1="LDAAAA",stringu2="UXKAAA",string4="OOOOxx" 637545600000000000 +tenk unique1=4706i,unique2=7379i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=706i,twothousand=706i,fivethous=4706i,tenthous=4706i,odd=12i,even=13i,stringu1="AZAAAA",stringu2="VXKAAA",string4="VVVVxx" 637632000000000000 +tenk unique1=5310i,unique2=7380i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=310i,twothousand=1310i,fivethous=310i,tenthous=5310i,odd=20i,even=21i,stringu1="GWAAAA",stringu2="WXKAAA",string4="AAAAxx" 637718400000000000 +tenk unique1=7333i,unique2=7381i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=333i,twothousand=1333i,fivethous=2333i,tenthous=7333i,odd=66i,even=67i,stringu1="BWAAAA",stringu2="XXKAAA",string4="HHHHxx" 637804800000000000 +tenk unique1=9420i,unique2=7382i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=420i,twothousand=1420i,fivethous=4420i,tenthous=9420i,odd=40i,even=41i,stringu1="IYAAAA",stringu2="YXKAAA",string4="OOOOxx" 637891200000000000 +tenk unique1=1383i,unique2=7383i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=383i,twothousand=1383i,fivethous=1383i,tenthous=1383i,odd=166i,even=167i,stringu1="FBAAAA",stringu2="ZXKAAA",string4="VVVVxx" 637977600000000000 +tenk unique1=6225i,unique2=7384i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=225i,twothousand=225i,fivethous=1225i,tenthous=6225i,odd=50i,even=51i,stringu1="LFAAAA",stringu2="AYKAAA",string4="AAAAxx" 638064000000000000 +tenk unique1=2064i,unique2=7385i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=64i,twothousand=64i,fivethous=2064i,tenthous=2064i,odd=128i,even=129i,stringu1="KBAAAA",stringu2="BYKAAA",string4="HHHHxx" 638150400000000000 +tenk unique1=6700i,unique2=7386i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=700i,twothousand=700i,fivethous=1700i,tenthous=6700i,odd=0i,even=1i,stringu1="SXAAAA",stringu2="CYKAAA",string4="OOOOxx" 638236800000000000 +tenk unique1=1352i,unique2=7387i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=352i,twothousand=1352i,fivethous=1352i,tenthous=1352i,odd=104i,even=105i,stringu1="AAAAAA",stringu2="DYKAAA",string4="VVVVxx" 638323200000000000 +tenk unique1=4249i,unique2=7388i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=249i,twothousand=249i,fivethous=4249i,tenthous=4249i,odd=98i,even=99i,stringu1="LHAAAA",stringu2="EYKAAA",string4="AAAAxx" 638409600000000000 +tenk unique1=9429i,unique2=7389i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=429i,twothousand=1429i,fivethous=4429i,tenthous=9429i,odd=58i,even=59i,stringu1="RYAAAA",stringu2="FYKAAA",string4="HHHHxx" 638496000000000000 +tenk unique1=8090i,unique2=7390i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=90i,twothousand=90i,fivethous=3090i,tenthous=8090i,odd=180i,even=181i,stringu1="EZAAAA",stringu2="GYKAAA",string4="OOOOxx" 638582400000000000 +tenk unique1=5378i,unique2=7391i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=378i,twothousand=1378i,fivethous=378i,tenthous=5378i,odd=156i,even=157i,stringu1="WYAAAA",stringu2="HYKAAA",string4="VVVVxx" 638668800000000000 +tenk unique1=9085i,unique2=7392i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=85i,twothousand=1085i,fivethous=4085i,tenthous=9085i,odd=170i,even=171i,stringu1="LLAAAA",stringu2="IYKAAA",string4="AAAAxx" 638755200000000000 +tenk unique1=7468i,unique2=7393i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=468i,twothousand=1468i,fivethous=2468i,tenthous=7468i,odd=136i,even=137i,stringu1="GBAAAA",stringu2="JYKAAA",string4="HHHHxx" 638841600000000000 +tenk unique1=9955i,unique2=7394i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=955i,twothousand=1955i,fivethous=4955i,tenthous=9955i,odd=110i,even=111i,stringu1="XSAAAA",stringu2="KYKAAA",string4="OOOOxx" 638928000000000000 +tenk unique1=8692i,unique2=7395i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=692i,twothousand=692i,fivethous=3692i,tenthous=8692i,odd=184i,even=185i,stringu1="IWAAAA",stringu2="LYKAAA",string4="VVVVxx" 639014400000000000 +tenk unique1=1463i,unique2=7396i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=463i,twothousand=1463i,fivethous=1463i,tenthous=1463i,odd=126i,even=127i,stringu1="HEAAAA",stringu2="MYKAAA",string4="AAAAxx" 639100800000000000 +tenk unique1=3577i,unique2=7397i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=577i,twothousand=1577i,fivethous=3577i,tenthous=3577i,odd=154i,even=155i,stringu1="PHAAAA",stringu2="NYKAAA",string4="HHHHxx" 639187200000000000 +tenk unique1=5654i,unique2=7398i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=654i,twothousand=1654i,fivethous=654i,tenthous=5654i,odd=108i,even=109i,stringu1="MJAAAA",stringu2="OYKAAA",string4="OOOOxx" 639273600000000000 +tenk unique1=7955i,unique2=7399i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=955i,twothousand=1955i,fivethous=2955i,tenthous=7955i,odd=110i,even=111i,stringu1="ZTAAAA",stringu2="PYKAAA",string4="VVVVxx" 639360000000000000 +tenk unique1=4843i,unique2=7400i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=843i,twothousand=843i,fivethous=4843i,tenthous=4843i,odd=86i,even=87i,stringu1="HEAAAA",stringu2="QYKAAA",string4="AAAAxx" 639446400000000000 +tenk unique1=1776i,unique2=7401i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=776i,twothousand=1776i,fivethous=1776i,tenthous=1776i,odd=152i,even=153i,stringu1="IQAAAA",stringu2="RYKAAA",string4="HHHHxx" 639532800000000000 +tenk unique1=2223i,unique2=7402i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=223i,twothousand=223i,fivethous=2223i,tenthous=2223i,odd=46i,even=47i,stringu1="NHAAAA",stringu2="SYKAAA",string4="OOOOxx" 639619200000000000 +tenk unique1=8442i,unique2=7403i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=442i,twothousand=442i,fivethous=3442i,tenthous=8442i,odd=84i,even=85i,stringu1="SMAAAA",stringu2="TYKAAA",string4="VVVVxx" 639705600000000000 +tenk unique1=9738i,unique2=7404i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=738i,twothousand=1738i,fivethous=4738i,tenthous=9738i,odd=76i,even=77i,stringu1="OKAAAA",stringu2="UYKAAA",string4="AAAAxx" 639792000000000000 +tenk unique1=4867i,unique2=7405i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=867i,twothousand=867i,fivethous=4867i,tenthous=4867i,odd=134i,even=135i,stringu1="FFAAAA",stringu2="VYKAAA",string4="HHHHxx" 639878400000000000 +tenk unique1=2983i,unique2=7406i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=983i,twothousand=983i,fivethous=2983i,tenthous=2983i,odd=166i,even=167i,stringu1="TKAAAA",stringu2="WYKAAA",string4="OOOOxx" 639964800000000000 +tenk unique1=3300i,unique2=7407i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=300i,twothousand=1300i,fivethous=3300i,tenthous=3300i,odd=0i,even=1i,stringu1="YWAAAA",stringu2="XYKAAA",string4="VVVVxx" 640051200000000000 +tenk unique1=3815i,unique2=7408i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=815i,twothousand=1815i,fivethous=3815i,tenthous=3815i,odd=30i,even=31i,stringu1="TQAAAA",stringu2="YYKAAA",string4="AAAAxx" 640137600000000000 +tenk unique1=1779i,unique2=7409i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=779i,twothousand=1779i,fivethous=1779i,tenthous=1779i,odd=158i,even=159i,stringu1="LQAAAA",stringu2="ZYKAAA",string4="HHHHxx" 640224000000000000 +tenk unique1=1123i,unique2=7410i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=123i,twothousand=1123i,fivethous=1123i,tenthous=1123i,odd=46i,even=47i,stringu1="FRAAAA",stringu2="AZKAAA",string4="OOOOxx" 640310400000000000 +tenk unique1=4824i,unique2=7411i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=824i,twothousand=824i,fivethous=4824i,tenthous=4824i,odd=48i,even=49i,stringu1="ODAAAA",stringu2="BZKAAA",string4="VVVVxx" 640396800000000000 +tenk unique1=5407i,unique2=7412i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=407i,twothousand=1407i,fivethous=407i,tenthous=5407i,odd=14i,even=15i,stringu1="ZZAAAA",stringu2="CZKAAA",string4="AAAAxx" 640483200000000000 +tenk unique1=5123i,unique2=7413i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=123i,twothousand=1123i,fivethous=123i,tenthous=5123i,odd=46i,even=47i,stringu1="BPAAAA",stringu2="DZKAAA",string4="HHHHxx" 640569600000000000 +tenk unique1=2515i,unique2=7414i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=515i,twothousand=515i,fivethous=2515i,tenthous=2515i,odd=30i,even=31i,stringu1="TSAAAA",stringu2="EZKAAA",string4="OOOOxx" 640656000000000000 +tenk unique1=4781i,unique2=7415i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=781i,twothousand=781i,fivethous=4781i,tenthous=4781i,odd=162i,even=163i,stringu1="XBAAAA",stringu2="FZKAAA",string4="VVVVxx" 640742400000000000 +tenk unique1=7831i,unique2=7416i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=831i,twothousand=1831i,fivethous=2831i,tenthous=7831i,odd=62i,even=63i,stringu1="FPAAAA",stringu2="GZKAAA",string4="AAAAxx" 640828800000000000 +tenk unique1=6946i,unique2=7417i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=946i,twothousand=946i,fivethous=1946i,tenthous=6946i,odd=92i,even=93i,stringu1="EHAAAA",stringu2="HZKAAA",string4="HHHHxx" 640915200000000000 +tenk unique1=1215i,unique2=7418i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=215i,twothousand=1215i,fivethous=1215i,tenthous=1215i,odd=30i,even=31i,stringu1="TUAAAA",stringu2="IZKAAA",string4="OOOOxx" 641001600000000000 +tenk unique1=7783i,unique2=7419i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=783i,twothousand=1783i,fivethous=2783i,tenthous=7783i,odd=166i,even=167i,stringu1="JNAAAA",stringu2="JZKAAA",string4="VVVVxx" 641088000000000000 +tenk unique1=4532i,unique2=7420i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=532i,twothousand=532i,fivethous=4532i,tenthous=4532i,odd=64i,even=65i,stringu1="ISAAAA",stringu2="KZKAAA",string4="AAAAxx" 641174400000000000 +tenk unique1=9068i,unique2=7421i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=68i,twothousand=1068i,fivethous=4068i,tenthous=9068i,odd=136i,even=137i,stringu1="UKAAAA",stringu2="LZKAAA",string4="HHHHxx" 641260800000000000 +tenk unique1=7030i,unique2=7422i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=30i,twothousand=1030i,fivethous=2030i,tenthous=7030i,odd=60i,even=61i,stringu1="KKAAAA",stringu2="MZKAAA",string4="OOOOxx" 641347200000000000 +tenk unique1=436i,unique2=7423i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=436i,twothousand=436i,fivethous=436i,tenthous=436i,odd=72i,even=73i,stringu1="UQAAAA",stringu2="NZKAAA",string4="VVVVxx" 641433600000000000 +tenk unique1=6549i,unique2=7424i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=549i,twothousand=549i,fivethous=1549i,tenthous=6549i,odd=98i,even=99i,stringu1="XRAAAA",stringu2="OZKAAA",string4="AAAAxx" 641520000000000000 +tenk unique1=3348i,unique2=7425i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=348i,twothousand=1348i,fivethous=3348i,tenthous=3348i,odd=96i,even=97i,stringu1="UYAAAA",stringu2="PZKAAA",string4="HHHHxx" 641606400000000000 +tenk unique1=6229i,unique2=7426i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=229i,twothousand=229i,fivethous=1229i,tenthous=6229i,odd=58i,even=59i,stringu1="PFAAAA",stringu2="QZKAAA",string4="OOOOxx" 641692800000000000 +tenk unique1=3933i,unique2=7427i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=933i,twothousand=1933i,fivethous=3933i,tenthous=3933i,odd=66i,even=67i,stringu1="HVAAAA",stringu2="RZKAAA",string4="VVVVxx" 641779200000000000 +tenk unique1=1876i,unique2=7428i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=876i,twothousand=1876i,fivethous=1876i,tenthous=1876i,odd=152i,even=153i,stringu1="EUAAAA",stringu2="SZKAAA",string4="AAAAxx" 641865600000000000 +tenk unique1=8920i,unique2=7429i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=920i,twothousand=920i,fivethous=3920i,tenthous=8920i,odd=40i,even=41i,stringu1="CFAAAA",stringu2="TZKAAA",string4="HHHHxx" 641952000000000000 +tenk unique1=7926i,unique2=7430i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=926i,twothousand=1926i,fivethous=2926i,tenthous=7926i,odd=52i,even=53i,stringu1="WSAAAA",stringu2="UZKAAA",string4="OOOOxx" 642038400000000000 +tenk unique1=8805i,unique2=7431i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=805i,twothousand=805i,fivethous=3805i,tenthous=8805i,odd=10i,even=11i,stringu1="RAAAAA",stringu2="VZKAAA",string4="VVVVxx" 642124800000000000 +tenk unique1=6729i,unique2=7432i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=729i,twothousand=729i,fivethous=1729i,tenthous=6729i,odd=58i,even=59i,stringu1="VYAAAA",stringu2="WZKAAA",string4="AAAAxx" 642211200000000000 +tenk unique1=7397i,unique2=7433i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=397i,twothousand=1397i,fivethous=2397i,tenthous=7397i,odd=194i,even=195i,stringu1="NYAAAA",stringu2="XZKAAA",string4="HHHHxx" 642297600000000000 +tenk unique1=9303i,unique2=7434i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=303i,twothousand=1303i,fivethous=4303i,tenthous=9303i,odd=6i,even=7i,stringu1="VTAAAA",stringu2="YZKAAA",string4="OOOOxx" 642384000000000000 +tenk unique1=4255i,unique2=7435i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=255i,twothousand=255i,fivethous=4255i,tenthous=4255i,odd=110i,even=111i,stringu1="RHAAAA",stringu2="ZZKAAA",string4="VVVVxx" 642470400000000000 +tenk unique1=7229i,unique2=7436i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=229i,twothousand=1229i,fivethous=2229i,tenthous=7229i,odd=58i,even=59i,stringu1="BSAAAA",stringu2="AALAAA",string4="AAAAxx" 642556800000000000 +tenk unique1=854i,unique2=7437i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=854i,twothousand=854i,fivethous=854i,tenthous=854i,odd=108i,even=109i,stringu1="WGAAAA",stringu2="BALAAA",string4="HHHHxx" 642643200000000000 +tenk unique1=6723i,unique2=7438i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=723i,twothousand=723i,fivethous=1723i,tenthous=6723i,odd=46i,even=47i,stringu1="PYAAAA",stringu2="CALAAA",string4="OOOOxx" 642729600000000000 +tenk unique1=9597i,unique2=7439i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=597i,twothousand=1597i,fivethous=4597i,tenthous=9597i,odd=194i,even=195i,stringu1="DFAAAA",stringu2="DALAAA",string4="VVVVxx" 642816000000000000 +tenk unique1=6532i,unique2=7440i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=532i,twothousand=532i,fivethous=1532i,tenthous=6532i,odd=64i,even=65i,stringu1="GRAAAA",stringu2="EALAAA",string4="AAAAxx" 642902400000000000 +tenk unique1=2910i,unique2=7441i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=910i,twothousand=910i,fivethous=2910i,tenthous=2910i,odd=20i,even=21i,stringu1="YHAAAA",stringu2="FALAAA",string4="HHHHxx" 642988800000000000 +tenk unique1=6717i,unique2=7442i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=717i,twothousand=717i,fivethous=1717i,tenthous=6717i,odd=34i,even=35i,stringu1="JYAAAA",stringu2="GALAAA",string4="OOOOxx" 643075200000000000 +tenk unique1=1790i,unique2=7443i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=790i,twothousand=1790i,fivethous=1790i,tenthous=1790i,odd=180i,even=181i,stringu1="WQAAAA",stringu2="HALAAA",string4="VVVVxx" 643161600000000000 +tenk unique1=3761i,unique2=7444i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=761i,twothousand=1761i,fivethous=3761i,tenthous=3761i,odd=122i,even=123i,stringu1="ROAAAA",stringu2="IALAAA",string4="AAAAxx" 643248000000000000 +tenk unique1=1565i,unique2=7445i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=565i,twothousand=1565i,fivethous=1565i,tenthous=1565i,odd=130i,even=131i,stringu1="FIAAAA",stringu2="JALAAA",string4="HHHHxx" 643334400000000000 +tenk unique1=6205i,unique2=7446i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=205i,twothousand=205i,fivethous=1205i,tenthous=6205i,odd=10i,even=11i,stringu1="REAAAA",stringu2="KALAAA",string4="OOOOxx" 643420800000000000 +tenk unique1=2726i,unique2=7447i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=726i,twothousand=726i,fivethous=2726i,tenthous=2726i,odd=52i,even=53i,stringu1="WAAAAA",stringu2="LALAAA",string4="VVVVxx" 643507200000000000 +tenk unique1=799i,unique2=7448i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=799i,twothousand=799i,fivethous=799i,tenthous=799i,odd=198i,even=199i,stringu1="TEAAAA",stringu2="MALAAA",string4="AAAAxx" 643593600000000000 +tenk unique1=3540i,unique2=7449i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=540i,twothousand=1540i,fivethous=3540i,tenthous=3540i,odd=80i,even=81i,stringu1="EGAAAA",stringu2="NALAAA",string4="HHHHxx" 643680000000000000 +tenk unique1=5878i,unique2=7450i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=878i,twothousand=1878i,fivethous=878i,tenthous=5878i,odd=156i,even=157i,stringu1="CSAAAA",stringu2="OALAAA",string4="OOOOxx" 643766400000000000 +tenk unique1=2542i,unique2=7451i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=542i,twothousand=542i,fivethous=2542i,tenthous=2542i,odd=84i,even=85i,stringu1="UTAAAA",stringu2="PALAAA",string4="VVVVxx" 643852800000000000 +tenk unique1=4888i,unique2=7452i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=888i,twothousand=888i,fivethous=4888i,tenthous=4888i,odd=176i,even=177i,stringu1="AGAAAA",stringu2="QALAAA",string4="AAAAxx" 643939200000000000 +tenk unique1=5290i,unique2=7453i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=290i,twothousand=1290i,fivethous=290i,tenthous=5290i,odd=180i,even=181i,stringu1="MVAAAA",stringu2="RALAAA",string4="HHHHxx" 644025600000000000 +tenk unique1=7995i,unique2=7454i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=995i,twothousand=1995i,fivethous=2995i,tenthous=7995i,odd=190i,even=191i,stringu1="NVAAAA",stringu2="SALAAA",string4="OOOOxx" 644112000000000000 +tenk unique1=3519i,unique2=7455i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=519i,twothousand=1519i,fivethous=3519i,tenthous=3519i,odd=38i,even=39i,stringu1="JFAAAA",stringu2="TALAAA",string4="VVVVxx" 644198400000000000 +tenk unique1=3571i,unique2=7456i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=571i,twothousand=1571i,fivethous=3571i,tenthous=3571i,odd=142i,even=143i,stringu1="JHAAAA",stringu2="UALAAA",string4="AAAAxx" 644284800000000000 +tenk unique1=7854i,unique2=7457i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=854i,twothousand=1854i,fivethous=2854i,tenthous=7854i,odd=108i,even=109i,stringu1="CQAAAA",stringu2="VALAAA",string4="HHHHxx" 644371200000000000 +tenk unique1=5184i,unique2=7458i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=184i,twothousand=1184i,fivethous=184i,tenthous=5184i,odd=168i,even=169i,stringu1="KRAAAA",stringu2="WALAAA",string4="OOOOxx" 644457600000000000 +tenk unique1=3498i,unique2=7459i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=498i,twothousand=1498i,fivethous=3498i,tenthous=3498i,odd=196i,even=197i,stringu1="OEAAAA",stringu2="XALAAA",string4="VVVVxx" 644544000000000000 +tenk unique1=1264i,unique2=7460i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=264i,twothousand=1264i,fivethous=1264i,tenthous=1264i,odd=128i,even=129i,stringu1="QWAAAA",stringu2="YALAAA",string4="AAAAxx" 644630400000000000 +tenk unique1=3159i,unique2=7461i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=159i,twothousand=1159i,fivethous=3159i,tenthous=3159i,odd=118i,even=119i,stringu1="NRAAAA",stringu2="ZALAAA",string4="HHHHxx" 644716800000000000 +tenk unique1=5480i,unique2=7462i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=480i,twothousand=1480i,fivethous=480i,tenthous=5480i,odd=160i,even=161i,stringu1="UCAAAA",stringu2="ABLAAA",string4="OOOOxx" 644803200000000000 +tenk unique1=1706i,unique2=7463i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=706i,twothousand=1706i,fivethous=1706i,tenthous=1706i,odd=12i,even=13i,stringu1="QNAAAA",stringu2="BBLAAA",string4="VVVVxx" 644889600000000000 +tenk unique1=4540i,unique2=7464i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=540i,twothousand=540i,fivethous=4540i,tenthous=4540i,odd=80i,even=81i,stringu1="QSAAAA",stringu2="CBLAAA",string4="AAAAxx" 644976000000000000 +tenk unique1=2799i,unique2=7465i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=799i,twothousand=799i,fivethous=2799i,tenthous=2799i,odd=198i,even=199i,stringu1="RDAAAA",stringu2="DBLAAA",string4="HHHHxx" 645062400000000000 +tenk unique1=7389i,unique2=7466i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=389i,twothousand=1389i,fivethous=2389i,tenthous=7389i,odd=178i,even=179i,stringu1="FYAAAA",stringu2="EBLAAA",string4="OOOOxx" 645148800000000000 +tenk unique1=5565i,unique2=7467i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=565i,twothousand=1565i,fivethous=565i,tenthous=5565i,odd=130i,even=131i,stringu1="BGAAAA",stringu2="FBLAAA",string4="VVVVxx" 645235200000000000 +tenk unique1=3896i,unique2=7468i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=896i,twothousand=1896i,fivethous=3896i,tenthous=3896i,odd=192i,even=193i,stringu1="WTAAAA",stringu2="GBLAAA",string4="AAAAxx" 645321600000000000 +tenk unique1=2100i,unique2=7469i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=100i,twothousand=100i,fivethous=2100i,tenthous=2100i,odd=0i,even=1i,stringu1="UCAAAA",stringu2="HBLAAA",string4="HHHHxx" 645408000000000000 +tenk unique1=3507i,unique2=7470i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=507i,twothousand=1507i,fivethous=3507i,tenthous=3507i,odd=14i,even=15i,stringu1="XEAAAA",stringu2="IBLAAA",string4="OOOOxx" 645494400000000000 +tenk unique1=7971i,unique2=7471i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=971i,twothousand=1971i,fivethous=2971i,tenthous=7971i,odd=142i,even=143i,stringu1="PUAAAA",stringu2="JBLAAA",string4="VVVVxx" 645580800000000000 +tenk unique1=2312i,unique2=7472i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=312i,twothousand=312i,fivethous=2312i,tenthous=2312i,odd=24i,even=25i,stringu1="YKAAAA",stringu2="KBLAAA",string4="AAAAxx" 645667200000000000 +tenk unique1=2494i,unique2=7473i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=494i,twothousand=494i,fivethous=2494i,tenthous=2494i,odd=188i,even=189i,stringu1="YRAAAA",stringu2="LBLAAA",string4="HHHHxx" 645753600000000000 +tenk unique1=2474i,unique2=7474i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=474i,twothousand=474i,fivethous=2474i,tenthous=2474i,odd=148i,even=149i,stringu1="ERAAAA",stringu2="MBLAAA",string4="OOOOxx" 645840000000000000 +tenk unique1=3136i,unique2=7475i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=136i,twothousand=1136i,fivethous=3136i,tenthous=3136i,odd=72i,even=73i,stringu1="QQAAAA",stringu2="NBLAAA",string4="VVVVxx" 645926400000000000 +tenk unique1=7242i,unique2=7476i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=242i,twothousand=1242i,fivethous=2242i,tenthous=7242i,odd=84i,even=85i,stringu1="OSAAAA",stringu2="OBLAAA",string4="AAAAxx" 646012800000000000 +tenk unique1=9430i,unique2=7477i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=430i,twothousand=1430i,fivethous=4430i,tenthous=9430i,odd=60i,even=61i,stringu1="SYAAAA",stringu2="PBLAAA",string4="HHHHxx" 646099200000000000 +tenk unique1=1052i,unique2=7478i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=52i,twothousand=1052i,fivethous=1052i,tenthous=1052i,odd=104i,even=105i,stringu1="MOAAAA",stringu2="QBLAAA",string4="OOOOxx" 646185600000000000 +tenk unique1=4172i,unique2=7479i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=172i,twothousand=172i,fivethous=4172i,tenthous=4172i,odd=144i,even=145i,stringu1="MEAAAA",stringu2="RBLAAA",string4="VVVVxx" 646272000000000000 +tenk unique1=970i,unique2=7480i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=970i,twothousand=970i,fivethous=970i,tenthous=970i,odd=140i,even=141i,stringu1="ILAAAA",stringu2="SBLAAA",string4="AAAAxx" 646358400000000000 +tenk unique1=882i,unique2=7481i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=882i,twothousand=882i,fivethous=882i,tenthous=882i,odd=164i,even=165i,stringu1="YHAAAA",stringu2="TBLAAA",string4="HHHHxx" 646444800000000000 +tenk unique1=9799i,unique2=7482i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=799i,twothousand=1799i,fivethous=4799i,tenthous=9799i,odd=198i,even=199i,stringu1="XMAAAA",stringu2="UBLAAA",string4="OOOOxx" 646531200000000000 +tenk unique1=5850i,unique2=7483i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=850i,twothousand=1850i,fivethous=850i,tenthous=5850i,odd=100i,even=101i,stringu1="ARAAAA",stringu2="VBLAAA",string4="VVVVxx" 646617600000000000 +tenk unique1=9473i,unique2=7484i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=473i,twothousand=1473i,fivethous=4473i,tenthous=9473i,odd=146i,even=147i,stringu1="JAAAAA",stringu2="WBLAAA",string4="AAAAxx" 646704000000000000 +tenk unique1=8635i,unique2=7485i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=635i,twothousand=635i,fivethous=3635i,tenthous=8635i,odd=70i,even=71i,stringu1="DUAAAA",stringu2="XBLAAA",string4="HHHHxx" 646790400000000000 +tenk unique1=2349i,unique2=7486i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=349i,twothousand=349i,fivethous=2349i,tenthous=2349i,odd=98i,even=99i,stringu1="JMAAAA",stringu2="YBLAAA",string4="OOOOxx" 646876800000000000 +tenk unique1=2270i,unique2=7487i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=270i,twothousand=270i,fivethous=2270i,tenthous=2270i,odd=140i,even=141i,stringu1="IJAAAA",stringu2="ZBLAAA",string4="VVVVxx" 646963200000000000 +tenk unique1=7887i,unique2=7488i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=887i,twothousand=1887i,fivethous=2887i,tenthous=7887i,odd=174i,even=175i,stringu1="JRAAAA",stringu2="ACLAAA",string4="AAAAxx" 647049600000000000 +tenk unique1=3091i,unique2=7489i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=91i,twothousand=1091i,fivethous=3091i,tenthous=3091i,odd=182i,even=183i,stringu1="XOAAAA",stringu2="BCLAAA",string4="HHHHxx" 647136000000000000 +tenk unique1=3728i,unique2=7490i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=728i,twothousand=1728i,fivethous=3728i,tenthous=3728i,odd=56i,even=57i,stringu1="KNAAAA",stringu2="CCLAAA",string4="OOOOxx" 647222400000000000 +tenk unique1=3658i,unique2=7491i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=658i,twothousand=1658i,fivethous=3658i,tenthous=3658i,odd=116i,even=117i,stringu1="SKAAAA",stringu2="DCLAAA",string4="VVVVxx" 647308800000000000 +tenk unique1=5975i,unique2=7492i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=975i,twothousand=1975i,fivethous=975i,tenthous=5975i,odd=150i,even=151i,stringu1="VVAAAA",stringu2="ECLAAA",string4="AAAAxx" 647395200000000000 +tenk unique1=332i,unique2=7493i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=332i,twothousand=332i,fivethous=332i,tenthous=332i,odd=64i,even=65i,stringu1="UMAAAA",stringu2="FCLAAA",string4="HHHHxx" 647481600000000000 +tenk unique1=7990i,unique2=7494i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=990i,twothousand=1990i,fivethous=2990i,tenthous=7990i,odd=180i,even=181i,stringu1="IVAAAA",stringu2="GCLAAA",string4="OOOOxx" 647568000000000000 +tenk unique1=8688i,unique2=7495i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=688i,twothousand=688i,fivethous=3688i,tenthous=8688i,odd=176i,even=177i,stringu1="EWAAAA",stringu2="HCLAAA",string4="VVVVxx" 647654400000000000 +tenk unique1=9601i,unique2=7496i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=601i,twothousand=1601i,fivethous=4601i,tenthous=9601i,odd=2i,even=3i,stringu1="HFAAAA",stringu2="ICLAAA",string4="AAAAxx" 647740800000000000 +tenk unique1=8401i,unique2=7497i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=401i,twothousand=401i,fivethous=3401i,tenthous=8401i,odd=2i,even=3i,stringu1="DLAAAA",stringu2="JCLAAA",string4="HHHHxx" 647827200000000000 +tenk unique1=8093i,unique2=7498i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=93i,twothousand=93i,fivethous=3093i,tenthous=8093i,odd=186i,even=187i,stringu1="HZAAAA",stringu2="KCLAAA",string4="OOOOxx" 647913600000000000 +tenk unique1=4278i,unique2=7499i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=278i,twothousand=278i,fivethous=4278i,tenthous=4278i,odd=156i,even=157i,stringu1="OIAAAA",stringu2="LCLAAA",string4="VVVVxx" 648000000000000000 +tenk unique1=5467i,unique2=7500i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=467i,twothousand=1467i,fivethous=467i,tenthous=5467i,odd=134i,even=135i,stringu1="HCAAAA",stringu2="MCLAAA",string4="AAAAxx" 648086400000000000 +tenk unique1=3137i,unique2=7501i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=137i,twothousand=1137i,fivethous=3137i,tenthous=3137i,odd=74i,even=75i,stringu1="RQAAAA",stringu2="NCLAAA",string4="HHHHxx" 648172800000000000 +tenk unique1=204i,unique2=7502i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=204i,twothousand=204i,fivethous=204i,tenthous=204i,odd=8i,even=9i,stringu1="WHAAAA",stringu2="OCLAAA",string4="OOOOxx" 648259200000000000 +tenk unique1=8224i,unique2=7503i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=224i,twothousand=224i,fivethous=3224i,tenthous=8224i,odd=48i,even=49i,stringu1="IEAAAA",stringu2="PCLAAA",string4="VVVVxx" 648345600000000000 +tenk unique1=2944i,unique2=7504i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=944i,twothousand=944i,fivethous=2944i,tenthous=2944i,odd=88i,even=89i,stringu1="GJAAAA",stringu2="QCLAAA",string4="AAAAxx" 648432000000000000 +tenk unique1=7593i,unique2=7505i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=593i,twothousand=1593i,fivethous=2593i,tenthous=7593i,odd=186i,even=187i,stringu1="BGAAAA",stringu2="RCLAAA",string4="HHHHxx" 648518400000000000 +tenk unique1=814i,unique2=7506i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=814i,twothousand=814i,fivethous=814i,tenthous=814i,odd=28i,even=29i,stringu1="IFAAAA",stringu2="SCLAAA",string4="OOOOxx" 648604800000000000 +tenk unique1=8047i,unique2=7507i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=47i,twothousand=47i,fivethous=3047i,tenthous=8047i,odd=94i,even=95i,stringu1="NXAAAA",stringu2="TCLAAA",string4="VVVVxx" 648691200000000000 +tenk unique1=7802i,unique2=7508i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=802i,twothousand=1802i,fivethous=2802i,tenthous=7802i,odd=4i,even=5i,stringu1="COAAAA",stringu2="UCLAAA",string4="AAAAxx" 648777600000000000 +tenk unique1=901i,unique2=7509i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=901i,twothousand=901i,fivethous=901i,tenthous=901i,odd=2i,even=3i,stringu1="RIAAAA",stringu2="VCLAAA",string4="HHHHxx" 648864000000000000 +tenk unique1=6168i,unique2=7510i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=168i,twothousand=168i,fivethous=1168i,tenthous=6168i,odd=136i,even=137i,stringu1="GDAAAA",stringu2="WCLAAA",string4="OOOOxx" 648950400000000000 +tenk unique1=2950i,unique2=7511i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=950i,twothousand=950i,fivethous=2950i,tenthous=2950i,odd=100i,even=101i,stringu1="MJAAAA",stringu2="XCLAAA",string4="VVVVxx" 649036800000000000 +tenk unique1=5393i,unique2=7512i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=393i,twothousand=1393i,fivethous=393i,tenthous=5393i,odd=186i,even=187i,stringu1="LZAAAA",stringu2="YCLAAA",string4="AAAAxx" 649123200000000000 +tenk unique1=3585i,unique2=7513i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=585i,twothousand=1585i,fivethous=3585i,tenthous=3585i,odd=170i,even=171i,stringu1="XHAAAA",stringu2="ZCLAAA",string4="HHHHxx" 649209600000000000 +tenk unique1=9392i,unique2=7514i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=392i,twothousand=1392i,fivethous=4392i,tenthous=9392i,odd=184i,even=185i,stringu1="GXAAAA",stringu2="ADLAAA",string4="OOOOxx" 649296000000000000 +tenk unique1=8314i,unique2=7515i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=314i,twothousand=314i,fivethous=3314i,tenthous=8314i,odd=28i,even=29i,stringu1="UHAAAA",stringu2="BDLAAA",string4="VVVVxx" 649382400000000000 +tenk unique1=9972i,unique2=7516i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=972i,twothousand=1972i,fivethous=4972i,tenthous=9972i,odd=144i,even=145i,stringu1="OTAAAA",stringu2="CDLAAA",string4="AAAAxx" 649468800000000000 +tenk unique1=9130i,unique2=7517i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=130i,twothousand=1130i,fivethous=4130i,tenthous=9130i,odd=60i,even=61i,stringu1="ENAAAA",stringu2="DDLAAA",string4="HHHHxx" 649555200000000000 +tenk unique1=975i,unique2=7518i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=975i,twothousand=975i,fivethous=975i,tenthous=975i,odd=150i,even=151i,stringu1="NLAAAA",stringu2="EDLAAA",string4="OOOOxx" 649641600000000000 +tenk unique1=5720i,unique2=7519i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=720i,twothousand=1720i,fivethous=720i,tenthous=5720i,odd=40i,even=41i,stringu1="AMAAAA",stringu2="FDLAAA",string4="VVVVxx" 649728000000000000 +tenk unique1=3769i,unique2=7520i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=769i,twothousand=1769i,fivethous=3769i,tenthous=3769i,odd=138i,even=139i,stringu1="ZOAAAA",stringu2="GDLAAA",string4="AAAAxx" 649814400000000000 +tenk unique1=5303i,unique2=7521i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=303i,twothousand=1303i,fivethous=303i,tenthous=5303i,odd=6i,even=7i,stringu1="ZVAAAA",stringu2="HDLAAA",string4="HHHHxx" 649900800000000000 +tenk unique1=6564i,unique2=7522i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=564i,twothousand=564i,fivethous=1564i,tenthous=6564i,odd=128i,even=129i,stringu1="MSAAAA",stringu2="IDLAAA",string4="OOOOxx" 649987200000000000 +tenk unique1=7855i,unique2=7523i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=855i,twothousand=1855i,fivethous=2855i,tenthous=7855i,odd=110i,even=111i,stringu1="DQAAAA",stringu2="JDLAAA",string4="VVVVxx" 650073600000000000 +tenk unique1=8153i,unique2=7524i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=153i,twothousand=153i,fivethous=3153i,tenthous=8153i,odd=106i,even=107i,stringu1="PBAAAA",stringu2="KDLAAA",string4="AAAAxx" 650160000000000000 +tenk unique1=2292i,unique2=7525i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=292i,twothousand=292i,fivethous=2292i,tenthous=2292i,odd=184i,even=185i,stringu1="EKAAAA",stringu2="LDLAAA",string4="HHHHxx" 650246400000000000 +tenk unique1=3156i,unique2=7526i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=156i,twothousand=1156i,fivethous=3156i,tenthous=3156i,odd=112i,even=113i,stringu1="KRAAAA",stringu2="MDLAAA",string4="OOOOxx" 650332800000000000 +tenk unique1=6580i,unique2=7527i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=580i,twothousand=580i,fivethous=1580i,tenthous=6580i,odd=160i,even=161i,stringu1="CTAAAA",stringu2="NDLAAA",string4="VVVVxx" 650419200000000000 +tenk unique1=5324i,unique2=7528i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=324i,twothousand=1324i,fivethous=324i,tenthous=5324i,odd=48i,even=49i,stringu1="UWAAAA",stringu2="ODLAAA",string4="AAAAxx" 650505600000000000 +tenk unique1=8871i,unique2=7529i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=871i,twothousand=871i,fivethous=3871i,tenthous=8871i,odd=142i,even=143i,stringu1="FDAAAA",stringu2="PDLAAA",string4="HHHHxx" 650592000000000000 +tenk unique1=2543i,unique2=7530i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=543i,twothousand=543i,fivethous=2543i,tenthous=2543i,odd=86i,even=87i,stringu1="VTAAAA",stringu2="QDLAAA",string4="OOOOxx" 650678400000000000 +tenk unique1=7857i,unique2=7531i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=857i,twothousand=1857i,fivethous=2857i,tenthous=7857i,odd=114i,even=115i,stringu1="FQAAAA",stringu2="RDLAAA",string4="VVVVxx" 650764800000000000 +tenk unique1=4084i,unique2=7532i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=84i,twothousand=84i,fivethous=4084i,tenthous=4084i,odd=168i,even=169i,stringu1="CBAAAA",stringu2="SDLAAA",string4="AAAAxx" 650851200000000000 +tenk unique1=9887i,unique2=7533i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=887i,twothousand=1887i,fivethous=4887i,tenthous=9887i,odd=174i,even=175i,stringu1="HQAAAA",stringu2="TDLAAA",string4="HHHHxx" 650937600000000000 +tenk unique1=6940i,unique2=7534i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=940i,twothousand=940i,fivethous=1940i,tenthous=6940i,odd=80i,even=81i,stringu1="YGAAAA",stringu2="UDLAAA",string4="OOOOxx" 651024000000000000 +tenk unique1=3415i,unique2=7535i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=415i,twothousand=1415i,fivethous=3415i,tenthous=3415i,odd=30i,even=31i,stringu1="JBAAAA",stringu2="VDLAAA",string4="VVVVxx" 651110400000000000 +tenk unique1=5012i,unique2=7536i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=12i,twothousand=1012i,fivethous=12i,tenthous=5012i,odd=24i,even=25i,stringu1="UKAAAA",stringu2="WDLAAA",string4="AAAAxx" 651196800000000000 +tenk unique1=3187i,unique2=7537i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=187i,twothousand=1187i,fivethous=3187i,tenthous=3187i,odd=174i,even=175i,stringu1="PSAAAA",stringu2="XDLAAA",string4="HHHHxx" 651283200000000000 +tenk unique1=8556i,unique2=7538i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=556i,twothousand=556i,fivethous=3556i,tenthous=8556i,odd=112i,even=113i,stringu1="CRAAAA",stringu2="YDLAAA",string4="OOOOxx" 651369600000000000 +tenk unique1=7966i,unique2=7539i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=966i,twothousand=1966i,fivethous=2966i,tenthous=7966i,odd=132i,even=133i,stringu1="KUAAAA",stringu2="ZDLAAA",string4="VVVVxx" 651456000000000000 +tenk unique1=7481i,unique2=7540i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=481i,twothousand=1481i,fivethous=2481i,tenthous=7481i,odd=162i,even=163i,stringu1="TBAAAA",stringu2="AELAAA",string4="AAAAxx" 651542400000000000 +tenk unique1=8524i,unique2=7541i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=524i,twothousand=524i,fivethous=3524i,tenthous=8524i,odd=48i,even=49i,stringu1="WPAAAA",stringu2="BELAAA",string4="HHHHxx" 651628800000000000 +tenk unique1=3021i,unique2=7542i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=21i,twothousand=1021i,fivethous=3021i,tenthous=3021i,odd=42i,even=43i,stringu1="FMAAAA",stringu2="CELAAA",string4="OOOOxx" 651715200000000000 +tenk unique1=6045i,unique2=7543i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=45i,twothousand=45i,fivethous=1045i,tenthous=6045i,odd=90i,even=91i,stringu1="NYAAAA",stringu2="DELAAA",string4="VVVVxx" 651801600000000000 +tenk unique1=8022i,unique2=7544i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=22i,twothousand=22i,fivethous=3022i,tenthous=8022i,odd=44i,even=45i,stringu1="OWAAAA",stringu2="EELAAA",string4="AAAAxx" 651888000000000000 +tenk unique1=3626i,unique2=7545i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=626i,twothousand=1626i,fivethous=3626i,tenthous=3626i,odd=52i,even=53i,stringu1="MJAAAA",stringu2="FELAAA",string4="HHHHxx" 651974400000000000 +tenk unique1=1030i,unique2=7546i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=30i,twothousand=1030i,fivethous=1030i,tenthous=1030i,odd=60i,even=61i,stringu1="QNAAAA",stringu2="GELAAA",string4="OOOOxx" 652060800000000000 +tenk unique1=8903i,unique2=7547i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=903i,twothousand=903i,fivethous=3903i,tenthous=8903i,odd=6i,even=7i,stringu1="LEAAAA",stringu2="HELAAA",string4="VVVVxx" 652147200000000000 +tenk unique1=7488i,unique2=7548i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=488i,twothousand=1488i,fivethous=2488i,tenthous=7488i,odd=176i,even=177i,stringu1="ACAAAA",stringu2="IELAAA",string4="AAAAxx" 652233600000000000 +tenk unique1=9293i,unique2=7549i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=293i,twothousand=1293i,fivethous=4293i,tenthous=9293i,odd=186i,even=187i,stringu1="LTAAAA",stringu2="JELAAA",string4="HHHHxx" 652320000000000000 +tenk unique1=4586i,unique2=7550i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=586i,twothousand=586i,fivethous=4586i,tenthous=4586i,odd=172i,even=173i,stringu1="KUAAAA",stringu2="KELAAA",string4="OOOOxx" 652406400000000000 +tenk unique1=9282i,unique2=7551i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=282i,twothousand=1282i,fivethous=4282i,tenthous=9282i,odd=164i,even=165i,stringu1="ATAAAA",stringu2="LELAAA",string4="VVVVxx" 652492800000000000 +tenk unique1=1948i,unique2=7552i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=948i,twothousand=1948i,fivethous=1948i,tenthous=1948i,odd=96i,even=97i,stringu1="YWAAAA",stringu2="MELAAA",string4="AAAAxx" 652579200000000000 +tenk unique1=2534i,unique2=7553i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=534i,twothousand=534i,fivethous=2534i,tenthous=2534i,odd=68i,even=69i,stringu1="MTAAAA",stringu2="NELAAA",string4="HHHHxx" 652665600000000000 +tenk unique1=1150i,unique2=7554i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=150i,twothousand=1150i,fivethous=1150i,tenthous=1150i,odd=100i,even=101i,stringu1="GSAAAA",stringu2="OELAAA",string4="OOOOxx" 652752000000000000 +tenk unique1=4931i,unique2=7555i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=931i,twothousand=931i,fivethous=4931i,tenthous=4931i,odd=62i,even=63i,stringu1="RHAAAA",stringu2="PELAAA",string4="VVVVxx" 652838400000000000 +tenk unique1=2866i,unique2=7556i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=866i,twothousand=866i,fivethous=2866i,tenthous=2866i,odd=132i,even=133i,stringu1="GGAAAA",stringu2="QELAAA",string4="AAAAxx" 652924800000000000 +tenk unique1=6172i,unique2=7557i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=172i,twothousand=172i,fivethous=1172i,tenthous=6172i,odd=144i,even=145i,stringu1="KDAAAA",stringu2="RELAAA",string4="HHHHxx" 653011200000000000 +tenk unique1=4819i,unique2=7558i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=819i,twothousand=819i,fivethous=4819i,tenthous=4819i,odd=38i,even=39i,stringu1="JDAAAA",stringu2="SELAAA",string4="OOOOxx" 653097600000000000 +tenk unique1=569i,unique2=7559i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=569i,twothousand=569i,fivethous=569i,tenthous=569i,odd=138i,even=139i,stringu1="XVAAAA",stringu2="TELAAA",string4="VVVVxx" 653184000000000000 +tenk unique1=1146i,unique2=7560i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=146i,twothousand=1146i,fivethous=1146i,tenthous=1146i,odd=92i,even=93i,stringu1="CSAAAA",stringu2="UELAAA",string4="AAAAxx" 653270400000000000 +tenk unique1=3062i,unique2=7561i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=62i,twothousand=1062i,fivethous=3062i,tenthous=3062i,odd=124i,even=125i,stringu1="UNAAAA",stringu2="VELAAA",string4="HHHHxx" 653356800000000000 +tenk unique1=7690i,unique2=7562i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=690i,twothousand=1690i,fivethous=2690i,tenthous=7690i,odd=180i,even=181i,stringu1="UJAAAA",stringu2="WELAAA",string4="OOOOxx" 653443200000000000 +tenk unique1=8611i,unique2=7563i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=611i,twothousand=611i,fivethous=3611i,tenthous=8611i,odd=22i,even=23i,stringu1="FTAAAA",stringu2="XELAAA",string4="VVVVxx" 653529600000000000 +tenk unique1=1142i,unique2=7564i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=142i,twothousand=1142i,fivethous=1142i,tenthous=1142i,odd=84i,even=85i,stringu1="YRAAAA",stringu2="YELAAA",string4="AAAAxx" 653616000000000000 +tenk unique1=1193i,unique2=7565i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=193i,twothousand=1193i,fivethous=1193i,tenthous=1193i,odd=186i,even=187i,stringu1="XTAAAA",stringu2="ZELAAA",string4="HHHHxx" 653702400000000000 +tenk unique1=2507i,unique2=7566i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=507i,twothousand=507i,fivethous=2507i,tenthous=2507i,odd=14i,even=15i,stringu1="LSAAAA",stringu2="AFLAAA",string4="OOOOxx" 653788800000000000 +tenk unique1=1043i,unique2=7567i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=43i,twothousand=1043i,fivethous=1043i,tenthous=1043i,odd=86i,even=87i,stringu1="DOAAAA",stringu2="BFLAAA",string4="VVVVxx" 653875200000000000 +tenk unique1=7472i,unique2=7568i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=472i,twothousand=1472i,fivethous=2472i,tenthous=7472i,odd=144i,even=145i,stringu1="KBAAAA",stringu2="CFLAAA",string4="AAAAxx" 653961600000000000 +tenk unique1=1817i,unique2=7569i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=817i,twothousand=1817i,fivethous=1817i,tenthous=1817i,odd=34i,even=35i,stringu1="XRAAAA",stringu2="DFLAAA",string4="HHHHxx" 654048000000000000 +tenk unique1=3868i,unique2=7570i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=868i,twothousand=1868i,fivethous=3868i,tenthous=3868i,odd=136i,even=137i,stringu1="USAAAA",stringu2="EFLAAA",string4="OOOOxx" 654134400000000000 +tenk unique1=9031i,unique2=7571i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=31i,twothousand=1031i,fivethous=4031i,tenthous=9031i,odd=62i,even=63i,stringu1="JJAAAA",stringu2="FFLAAA",string4="VVVVxx" 654220800000000000 +tenk unique1=7254i,unique2=7572i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=254i,twothousand=1254i,fivethous=2254i,tenthous=7254i,odd=108i,even=109i,stringu1="ATAAAA",stringu2="GFLAAA",string4="AAAAxx" 654307200000000000 +tenk unique1=5030i,unique2=7573i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=30i,twothousand=1030i,fivethous=30i,tenthous=5030i,odd=60i,even=61i,stringu1="MLAAAA",stringu2="HFLAAA",string4="HHHHxx" 654393600000000000 +tenk unique1=6594i,unique2=7574i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=594i,twothousand=594i,fivethous=1594i,tenthous=6594i,odd=188i,even=189i,stringu1="QTAAAA",stringu2="IFLAAA",string4="OOOOxx" 654480000000000000 +tenk unique1=6862i,unique2=7575i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=862i,twothousand=862i,fivethous=1862i,tenthous=6862i,odd=124i,even=125i,stringu1="YDAAAA",stringu2="JFLAAA",string4="VVVVxx" 654566400000000000 +tenk unique1=1994i,unique2=7576i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=994i,twothousand=1994i,fivethous=1994i,tenthous=1994i,odd=188i,even=189i,stringu1="SYAAAA",stringu2="KFLAAA",string4="AAAAxx" 654652800000000000 +tenk unique1=9017i,unique2=7577i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=17i,twothousand=1017i,fivethous=4017i,tenthous=9017i,odd=34i,even=35i,stringu1="VIAAAA",stringu2="LFLAAA",string4="HHHHxx" 654739200000000000 +tenk unique1=5716i,unique2=7578i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=716i,twothousand=1716i,fivethous=716i,tenthous=5716i,odd=32i,even=33i,stringu1="WLAAAA",stringu2="MFLAAA",string4="OOOOxx" 654825600000000000 +tenk unique1=1900i,unique2=7579i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=900i,twothousand=1900i,fivethous=1900i,tenthous=1900i,odd=0i,even=1i,stringu1="CVAAAA",stringu2="NFLAAA",string4="VVVVxx" 654912000000000000 +tenk unique1=120i,unique2=7580i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=120i,twothousand=120i,fivethous=120i,tenthous=120i,odd=40i,even=41i,stringu1="QEAAAA",stringu2="OFLAAA",string4="AAAAxx" 654998400000000000 +tenk unique1=9003i,unique2=7581i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=3i,twothousand=1003i,fivethous=4003i,tenthous=9003i,odd=6i,even=7i,stringu1="HIAAAA",stringu2="PFLAAA",string4="HHHHxx" 655084800000000000 +tenk unique1=4178i,unique2=7582i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=178i,twothousand=178i,fivethous=4178i,tenthous=4178i,odd=156i,even=157i,stringu1="SEAAAA",stringu2="QFLAAA",string4="OOOOxx" 655171200000000000 +tenk unique1=8777i,unique2=7583i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=777i,twothousand=777i,fivethous=3777i,tenthous=8777i,odd=154i,even=155i,stringu1="PZAAAA",stringu2="RFLAAA",string4="VVVVxx" 655257600000000000 +tenk unique1=3653i,unique2=7584i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=653i,twothousand=1653i,fivethous=3653i,tenthous=3653i,odd=106i,even=107i,stringu1="NKAAAA",stringu2="SFLAAA",string4="AAAAxx" 655344000000000000 +tenk unique1=1137i,unique2=7585i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=137i,twothousand=1137i,fivethous=1137i,tenthous=1137i,odd=74i,even=75i,stringu1="TRAAAA",stringu2="TFLAAA",string4="HHHHxx" 655430400000000000 +tenk unique1=6362i,unique2=7586i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=362i,twothousand=362i,fivethous=1362i,tenthous=6362i,odd=124i,even=125i,stringu1="SKAAAA",stringu2="UFLAAA",string4="OOOOxx" 655516800000000000 +tenk unique1=8537i,unique2=7587i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=537i,twothousand=537i,fivethous=3537i,tenthous=8537i,odd=74i,even=75i,stringu1="JQAAAA",stringu2="VFLAAA",string4="VVVVxx" 655603200000000000 +tenk unique1=1590i,unique2=7588i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=590i,twothousand=1590i,fivethous=1590i,tenthous=1590i,odd=180i,even=181i,stringu1="EJAAAA",stringu2="WFLAAA",string4="AAAAxx" 655689600000000000 +tenk unique1=374i,unique2=7589i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=374i,twothousand=374i,fivethous=374i,tenthous=374i,odd=148i,even=149i,stringu1="KOAAAA",stringu2="XFLAAA",string4="HHHHxx" 655776000000000000 +tenk unique1=2597i,unique2=7590i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=597i,twothousand=597i,fivethous=2597i,tenthous=2597i,odd=194i,even=195i,stringu1="XVAAAA",stringu2="YFLAAA",string4="OOOOxx" 655862400000000000 +tenk unique1=8071i,unique2=7591i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=71i,twothousand=71i,fivethous=3071i,tenthous=8071i,odd=142i,even=143i,stringu1="LYAAAA",stringu2="ZFLAAA",string4="VVVVxx" 655948800000000000 +tenk unique1=9009i,unique2=7592i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=1009i,fivethous=4009i,tenthous=9009i,odd=18i,even=19i,stringu1="NIAAAA",stringu2="AGLAAA",string4="AAAAxx" 656035200000000000 +tenk unique1=1978i,unique2=7593i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=978i,twothousand=1978i,fivethous=1978i,tenthous=1978i,odd=156i,even=157i,stringu1="CYAAAA",stringu2="BGLAAA",string4="HHHHxx" 656121600000000000 +tenk unique1=1541i,unique2=7594i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=541i,twothousand=1541i,fivethous=1541i,tenthous=1541i,odd=82i,even=83i,stringu1="HHAAAA",stringu2="CGLAAA",string4="OOOOxx" 656208000000000000 +tenk unique1=4998i,unique2=7595i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=998i,twothousand=998i,fivethous=4998i,tenthous=4998i,odd=196i,even=197i,stringu1="GKAAAA",stringu2="DGLAAA",string4="VVVVxx" 656294400000000000 +tenk unique1=1649i,unique2=7596i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=649i,twothousand=1649i,fivethous=1649i,tenthous=1649i,odd=98i,even=99i,stringu1="LLAAAA",stringu2="EGLAAA",string4="AAAAxx" 656380800000000000 +tenk unique1=5426i,unique2=7597i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=426i,twothousand=1426i,fivethous=426i,tenthous=5426i,odd=52i,even=53i,stringu1="SAAAAA",stringu2="FGLAAA",string4="HHHHxx" 656467200000000000 +tenk unique1=1492i,unique2=7598i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=492i,twothousand=1492i,fivethous=1492i,tenthous=1492i,odd=184i,even=185i,stringu1="KFAAAA",stringu2="GGLAAA",string4="OOOOxx" 656553600000000000 +tenk unique1=9622i,unique2=7599i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=622i,twothousand=1622i,fivethous=4622i,tenthous=9622i,odd=44i,even=45i,stringu1="CGAAAA",stringu2="HGLAAA",string4="VVVVxx" 656640000000000000 +tenk unique1=701i,unique2=7600i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=701i,twothousand=701i,fivethous=701i,tenthous=701i,odd=2i,even=3i,stringu1="ZAAAAA",stringu2="IGLAAA",string4="AAAAxx" 656726400000000000 +tenk unique1=2781i,unique2=7601i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=781i,twothousand=781i,fivethous=2781i,tenthous=2781i,odd=162i,even=163i,stringu1="ZCAAAA",stringu2="JGLAAA",string4="HHHHxx" 656812800000000000 +tenk unique1=3982i,unique2=7602i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=982i,twothousand=1982i,fivethous=3982i,tenthous=3982i,odd=164i,even=165i,stringu1="EXAAAA",stringu2="KGLAAA",string4="OOOOxx" 656899200000000000 +tenk unique1=7259i,unique2=7603i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=259i,twothousand=1259i,fivethous=2259i,tenthous=7259i,odd=118i,even=119i,stringu1="FTAAAA",stringu2="LGLAAA",string4="VVVVxx" 656985600000000000 +tenk unique1=9868i,unique2=7604i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=868i,twothousand=1868i,fivethous=4868i,tenthous=9868i,odd=136i,even=137i,stringu1="OPAAAA",stringu2="MGLAAA",string4="AAAAxx" 657072000000000000 +tenk unique1=564i,unique2=7605i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=564i,twothousand=564i,fivethous=564i,tenthous=564i,odd=128i,even=129i,stringu1="SVAAAA",stringu2="NGLAAA",string4="HHHHxx" 657158400000000000 +tenk unique1=6315i,unique2=7606i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=315i,twothousand=315i,fivethous=1315i,tenthous=6315i,odd=30i,even=31i,stringu1="XIAAAA",stringu2="OGLAAA",string4="OOOOxx" 657244800000000000 +tenk unique1=9092i,unique2=7607i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=92i,twothousand=1092i,fivethous=4092i,tenthous=9092i,odd=184i,even=185i,stringu1="SLAAAA",stringu2="PGLAAA",string4="VVVVxx" 657331200000000000 +tenk unique1=8237i,unique2=7608i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=237i,twothousand=237i,fivethous=3237i,tenthous=8237i,odd=74i,even=75i,stringu1="VEAAAA",stringu2="QGLAAA",string4="AAAAxx" 657417600000000000 +tenk unique1=1513i,unique2=7609i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=513i,twothousand=1513i,fivethous=1513i,tenthous=1513i,odd=26i,even=27i,stringu1="FGAAAA",stringu2="RGLAAA",string4="HHHHxx" 657504000000000000 +tenk unique1=1922i,unique2=7610i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=922i,twothousand=1922i,fivethous=1922i,tenthous=1922i,odd=44i,even=45i,stringu1="YVAAAA",stringu2="SGLAAA",string4="OOOOxx" 657590400000000000 +tenk unique1=5396i,unique2=7611i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=396i,twothousand=1396i,fivethous=396i,tenthous=5396i,odd=192i,even=193i,stringu1="OZAAAA",stringu2="TGLAAA",string4="VVVVxx" 657676800000000000 +tenk unique1=2485i,unique2=7612i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=485i,twothousand=485i,fivethous=2485i,tenthous=2485i,odd=170i,even=171i,stringu1="PRAAAA",stringu2="UGLAAA",string4="AAAAxx" 657763200000000000 +tenk unique1=5774i,unique2=7613i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=774i,twothousand=1774i,fivethous=774i,tenthous=5774i,odd=148i,even=149i,stringu1="COAAAA",stringu2="VGLAAA",string4="HHHHxx" 657849600000000000 +tenk unique1=3983i,unique2=7614i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=983i,twothousand=1983i,fivethous=3983i,tenthous=3983i,odd=166i,even=167i,stringu1="FXAAAA",stringu2="WGLAAA",string4="OOOOxx" 657936000000000000 +tenk unique1=221i,unique2=7615i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=221i,twothousand=221i,fivethous=221i,tenthous=221i,odd=42i,even=43i,stringu1="NIAAAA",stringu2="XGLAAA",string4="VVVVxx" 658022400000000000 +tenk unique1=8662i,unique2=7616i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=662i,twothousand=662i,fivethous=3662i,tenthous=8662i,odd=124i,even=125i,stringu1="EVAAAA",stringu2="YGLAAA",string4="AAAAxx" 658108800000000000 +tenk unique1=2456i,unique2=7617i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=456i,twothousand=456i,fivethous=2456i,tenthous=2456i,odd=112i,even=113i,stringu1="MQAAAA",stringu2="ZGLAAA",string4="HHHHxx" 658195200000000000 +tenk unique1=9736i,unique2=7618i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=736i,twothousand=1736i,fivethous=4736i,tenthous=9736i,odd=72i,even=73i,stringu1="MKAAAA",stringu2="AHLAAA",string4="OOOOxx" 658281600000000000 +tenk unique1=8936i,unique2=7619i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=936i,twothousand=936i,fivethous=3936i,tenthous=8936i,odd=72i,even=73i,stringu1="SFAAAA",stringu2="BHLAAA",string4="VVVVxx" 658368000000000000 +tenk unique1=5395i,unique2=7620i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=395i,twothousand=1395i,fivethous=395i,tenthous=5395i,odd=190i,even=191i,stringu1="NZAAAA",stringu2="CHLAAA",string4="AAAAxx" 658454400000000000 +tenk unique1=9523i,unique2=7621i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=523i,twothousand=1523i,fivethous=4523i,tenthous=9523i,odd=46i,even=47i,stringu1="HCAAAA",stringu2="DHLAAA",string4="HHHHxx" 658540800000000000 +tenk unique1=6980i,unique2=7622i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=980i,twothousand=980i,fivethous=1980i,tenthous=6980i,odd=160i,even=161i,stringu1="MIAAAA",stringu2="EHLAAA",string4="OOOOxx" 658627200000000000 +tenk unique1=2091i,unique2=7623i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=91i,twothousand=91i,fivethous=2091i,tenthous=2091i,odd=182i,even=183i,stringu1="LCAAAA",stringu2="FHLAAA",string4="VVVVxx" 658713600000000000 +tenk unique1=6807i,unique2=7624i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=807i,twothousand=807i,fivethous=1807i,tenthous=6807i,odd=14i,even=15i,stringu1="VBAAAA",stringu2="GHLAAA",string4="AAAAxx" 658800000000000000 +tenk unique1=8818i,unique2=7625i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=818i,twothousand=818i,fivethous=3818i,tenthous=8818i,odd=36i,even=37i,stringu1="EBAAAA",stringu2="HHLAAA",string4="HHHHxx" 658886400000000000 +tenk unique1=5298i,unique2=7626i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=298i,twothousand=1298i,fivethous=298i,tenthous=5298i,odd=196i,even=197i,stringu1="UVAAAA",stringu2="IHLAAA",string4="OOOOxx" 658972800000000000 +tenk unique1=1726i,unique2=7627i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=726i,twothousand=1726i,fivethous=1726i,tenthous=1726i,odd=52i,even=53i,stringu1="KOAAAA",stringu2="JHLAAA",string4="VVVVxx" 659059200000000000 +tenk unique1=3878i,unique2=7628i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=878i,twothousand=1878i,fivethous=3878i,tenthous=3878i,odd=156i,even=157i,stringu1="ETAAAA",stringu2="KHLAAA",string4="AAAAxx" 659145600000000000 +tenk unique1=8700i,unique2=7629i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=700i,twothousand=700i,fivethous=3700i,tenthous=8700i,odd=0i,even=1i,stringu1="QWAAAA",stringu2="LHLAAA",string4="HHHHxx" 659232000000000000 +tenk unique1=5201i,unique2=7630i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=201i,twothousand=1201i,fivethous=201i,tenthous=5201i,odd=2i,even=3i,stringu1="BSAAAA",stringu2="MHLAAA",string4="OOOOxx" 659318400000000000 +tenk unique1=3936i,unique2=7631i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=936i,twothousand=1936i,fivethous=3936i,tenthous=3936i,odd=72i,even=73i,stringu1="KVAAAA",stringu2="NHLAAA",string4="VVVVxx" 659404800000000000 +tenk unique1=776i,unique2=7632i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=776i,twothousand=776i,fivethous=776i,tenthous=776i,odd=152i,even=153i,stringu1="WDAAAA",stringu2="OHLAAA",string4="AAAAxx" 659491200000000000 +tenk unique1=5302i,unique2=7633i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=302i,twothousand=1302i,fivethous=302i,tenthous=5302i,odd=4i,even=5i,stringu1="YVAAAA",stringu2="PHLAAA",string4="HHHHxx" 659577600000000000 +tenk unique1=3595i,unique2=7634i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=595i,twothousand=1595i,fivethous=3595i,tenthous=3595i,odd=190i,even=191i,stringu1="HIAAAA",stringu2="QHLAAA",string4="OOOOxx" 659664000000000000 +tenk unique1=9061i,unique2=7635i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=61i,twothousand=1061i,fivethous=4061i,tenthous=9061i,odd=122i,even=123i,stringu1="NKAAAA",stringu2="RHLAAA",string4="VVVVxx" 659750400000000000 +tenk unique1=6261i,unique2=7636i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=261i,twothousand=261i,fivethous=1261i,tenthous=6261i,odd=122i,even=123i,stringu1="VGAAAA",stringu2="SHLAAA",string4="AAAAxx" 659836800000000000 +tenk unique1=8878i,unique2=7637i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=878i,twothousand=878i,fivethous=3878i,tenthous=8878i,odd=156i,even=157i,stringu1="MDAAAA",stringu2="THLAAA",string4="HHHHxx" 659923200000000000 +tenk unique1=3312i,unique2=7638i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=312i,twothousand=1312i,fivethous=3312i,tenthous=3312i,odd=24i,even=25i,stringu1="KXAAAA",stringu2="UHLAAA",string4="OOOOxx" 660009600000000000 +tenk unique1=9422i,unique2=7639i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=422i,twothousand=1422i,fivethous=4422i,tenthous=9422i,odd=44i,even=45i,stringu1="KYAAAA",stringu2="VHLAAA",string4="VVVVxx" 660096000000000000 +tenk unique1=7321i,unique2=7640i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=321i,twothousand=1321i,fivethous=2321i,tenthous=7321i,odd=42i,even=43i,stringu1="PVAAAA",stringu2="WHLAAA",string4="AAAAxx" 660182400000000000 +tenk unique1=3813i,unique2=7641i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=813i,twothousand=1813i,fivethous=3813i,tenthous=3813i,odd=26i,even=27i,stringu1="RQAAAA",stringu2="XHLAAA",string4="HHHHxx" 660268800000000000 +tenk unique1=5848i,unique2=7642i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=848i,twothousand=1848i,fivethous=848i,tenthous=5848i,odd=96i,even=97i,stringu1="YQAAAA",stringu2="YHLAAA",string4="OOOOxx" 660355200000000000 +tenk unique1=3535i,unique2=7643i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=535i,twothousand=1535i,fivethous=3535i,tenthous=3535i,odd=70i,even=71i,stringu1="ZFAAAA",stringu2="ZHLAAA",string4="VVVVxx" 660441600000000000 +tenk unique1=1040i,unique2=7644i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=40i,twothousand=1040i,fivethous=1040i,tenthous=1040i,odd=80i,even=81i,stringu1="AOAAAA",stringu2="AILAAA",string4="AAAAxx" 660528000000000000 +tenk unique1=8572i,unique2=7645i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=572i,twothousand=572i,fivethous=3572i,tenthous=8572i,odd=144i,even=145i,stringu1="SRAAAA",stringu2="BILAAA",string4="HHHHxx" 660614400000000000 +tenk unique1=5435i,unique2=7646i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=435i,twothousand=1435i,fivethous=435i,tenthous=5435i,odd=70i,even=71i,stringu1="BBAAAA",stringu2="CILAAA",string4="OOOOxx" 660700800000000000 +tenk unique1=8199i,unique2=7647i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=199i,twothousand=199i,fivethous=3199i,tenthous=8199i,odd=198i,even=199i,stringu1="JDAAAA",stringu2="DILAAA",string4="VVVVxx" 660787200000000000 +tenk unique1=8775i,unique2=7648i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=775i,twothousand=775i,fivethous=3775i,tenthous=8775i,odd=150i,even=151i,stringu1="NZAAAA",stringu2="EILAAA",string4="AAAAxx" 660873600000000000 +tenk unique1=7722i,unique2=7649i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=722i,twothousand=1722i,fivethous=2722i,tenthous=7722i,odd=44i,even=45i,stringu1="ALAAAA",stringu2="FILAAA",string4="HHHHxx" 660960000000000000 +tenk unique1=3549i,unique2=7650i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=549i,twothousand=1549i,fivethous=3549i,tenthous=3549i,odd=98i,even=99i,stringu1="NGAAAA",stringu2="GILAAA",string4="OOOOxx" 661046400000000000 +tenk unique1=2578i,unique2=7651i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=578i,twothousand=578i,fivethous=2578i,tenthous=2578i,odd=156i,even=157i,stringu1="EVAAAA",stringu2="HILAAA",string4="VVVVxx" 661132800000000000 +tenk unique1=1695i,unique2=7652i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=695i,twothousand=1695i,fivethous=1695i,tenthous=1695i,odd=190i,even=191i,stringu1="FNAAAA",stringu2="IILAAA",string4="AAAAxx" 661219200000000000 +tenk unique1=1902i,unique2=7653i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=902i,twothousand=1902i,fivethous=1902i,tenthous=1902i,odd=4i,even=5i,stringu1="EVAAAA",stringu2="JILAAA",string4="HHHHxx" 661305600000000000 +tenk unique1=6058i,unique2=7654i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=58i,twothousand=58i,fivethous=1058i,tenthous=6058i,odd=116i,even=117i,stringu1="AZAAAA",stringu2="KILAAA",string4="OOOOxx" 661392000000000000 +tenk unique1=6591i,unique2=7655i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=591i,twothousand=591i,fivethous=1591i,tenthous=6591i,odd=182i,even=183i,stringu1="NTAAAA",stringu2="LILAAA",string4="VVVVxx" 661478400000000000 +tenk unique1=7962i,unique2=7656i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=962i,twothousand=1962i,fivethous=2962i,tenthous=7962i,odd=124i,even=125i,stringu1="GUAAAA",stringu2="MILAAA",string4="AAAAxx" 661564800000000000 +tenk unique1=5612i,unique2=7657i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=612i,twothousand=1612i,fivethous=612i,tenthous=5612i,odd=24i,even=25i,stringu1="WHAAAA",stringu2="NILAAA",string4="HHHHxx" 661651200000000000 +tenk unique1=3341i,unique2=7658i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=341i,twothousand=1341i,fivethous=3341i,tenthous=3341i,odd=82i,even=83i,stringu1="NYAAAA",stringu2="OILAAA",string4="OOOOxx" 661737600000000000 +tenk unique1=5460i,unique2=7659i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=460i,twothousand=1460i,fivethous=460i,tenthous=5460i,odd=120i,even=121i,stringu1="ACAAAA",stringu2="PILAAA",string4="VVVVxx" 661824000000000000 +tenk unique1=2368i,unique2=7660i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=368i,twothousand=368i,fivethous=2368i,tenthous=2368i,odd=136i,even=137i,stringu1="CNAAAA",stringu2="QILAAA",string4="AAAAxx" 661910400000000000 +tenk unique1=8646i,unique2=7661i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=646i,twothousand=646i,fivethous=3646i,tenthous=8646i,odd=92i,even=93i,stringu1="OUAAAA",stringu2="RILAAA",string4="HHHHxx" 661996800000000000 +tenk unique1=4987i,unique2=7662i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=987i,twothousand=987i,fivethous=4987i,tenthous=4987i,odd=174i,even=175i,stringu1="VJAAAA",stringu2="SILAAA",string4="OOOOxx" 662083200000000000 +tenk unique1=9018i,unique2=7663i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=18i,twothousand=1018i,fivethous=4018i,tenthous=9018i,odd=36i,even=37i,stringu1="WIAAAA",stringu2="TILAAA",string4="VVVVxx" 662169600000000000 +tenk unique1=8685i,unique2=7664i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=685i,twothousand=685i,fivethous=3685i,tenthous=8685i,odd=170i,even=171i,stringu1="BWAAAA",stringu2="UILAAA",string4="AAAAxx" 662256000000000000 +tenk unique1=694i,unique2=7665i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=694i,twothousand=694i,fivethous=694i,tenthous=694i,odd=188i,even=189i,stringu1="SAAAAA",stringu2="VILAAA",string4="HHHHxx" 662342400000000000 +tenk unique1=2012i,unique2=7666i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=12i,twothousand=12i,fivethous=2012i,tenthous=2012i,odd=24i,even=25i,stringu1="KZAAAA",stringu2="WILAAA",string4="OOOOxx" 662428800000000000 +tenk unique1=2417i,unique2=7667i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=417i,twothousand=417i,fivethous=2417i,tenthous=2417i,odd=34i,even=35i,stringu1="ZOAAAA",stringu2="XILAAA",string4="VVVVxx" 662515200000000000 +tenk unique1=4022i,unique2=7668i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=22i,twothousand=22i,fivethous=4022i,tenthous=4022i,odd=44i,even=45i,stringu1="SYAAAA",stringu2="YILAAA",string4="AAAAxx" 662601600000000000 +tenk unique1=5935i,unique2=7669i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=935i,twothousand=1935i,fivethous=935i,tenthous=5935i,odd=70i,even=71i,stringu1="HUAAAA",stringu2="ZILAAA",string4="HHHHxx" 662688000000000000 +tenk unique1=1656i,unique2=7670i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=656i,twothousand=1656i,fivethous=1656i,tenthous=1656i,odd=112i,even=113i,stringu1="SLAAAA",stringu2="AJLAAA",string4="OOOOxx" 662774400000000000 +tenk unique1=6195i,unique2=7671i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=195i,twothousand=195i,fivethous=1195i,tenthous=6195i,odd=190i,even=191i,stringu1="HEAAAA",stringu2="BJLAAA",string4="VVVVxx" 662860800000000000 +tenk unique1=3057i,unique2=7672i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=57i,twothousand=1057i,fivethous=3057i,tenthous=3057i,odd=114i,even=115i,stringu1="PNAAAA",stringu2="CJLAAA",string4="AAAAxx" 662947200000000000 +tenk unique1=2852i,unique2=7673i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=852i,twothousand=852i,fivethous=2852i,tenthous=2852i,odd=104i,even=105i,stringu1="SFAAAA",stringu2="DJLAAA",string4="HHHHxx" 663033600000000000 +tenk unique1=4634i,unique2=7674i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=634i,twothousand=634i,fivethous=4634i,tenthous=4634i,odd=68i,even=69i,stringu1="GWAAAA",stringu2="EJLAAA",string4="OOOOxx" 663120000000000000 +tenk unique1=1689i,unique2=7675i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=689i,twothousand=1689i,fivethous=1689i,tenthous=1689i,odd=178i,even=179i,stringu1="ZMAAAA",stringu2="FJLAAA",string4="VVVVxx" 663206400000000000 +tenk unique1=4102i,unique2=7676i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=102i,twothousand=102i,fivethous=4102i,tenthous=4102i,odd=4i,even=5i,stringu1="UBAAAA",stringu2="GJLAAA",string4="AAAAxx" 663292800000000000 +tenk unique1=3287i,unique2=7677i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=287i,twothousand=1287i,fivethous=3287i,tenthous=3287i,odd=174i,even=175i,stringu1="LWAAAA",stringu2="HJLAAA",string4="HHHHxx" 663379200000000000 +tenk unique1=5246i,unique2=7678i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=246i,twothousand=1246i,fivethous=246i,tenthous=5246i,odd=92i,even=93i,stringu1="UTAAAA",stringu2="IJLAAA",string4="OOOOxx" 663465600000000000 +tenk unique1=7450i,unique2=7679i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=450i,twothousand=1450i,fivethous=2450i,tenthous=7450i,odd=100i,even=101i,stringu1="OAAAAA",stringu2="JJLAAA",string4="VVVVxx" 663552000000000000 +tenk unique1=6548i,unique2=7680i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=548i,twothousand=548i,fivethous=1548i,tenthous=6548i,odd=96i,even=97i,stringu1="WRAAAA",stringu2="KJLAAA",string4="AAAAxx" 663638400000000000 +tenk unique1=379i,unique2=7681i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=379i,twothousand=379i,fivethous=379i,tenthous=379i,odd=158i,even=159i,stringu1="POAAAA",stringu2="LJLAAA",string4="HHHHxx" 663724800000000000 +tenk unique1=7435i,unique2=7682i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=435i,twothousand=1435i,fivethous=2435i,tenthous=7435i,odd=70i,even=71i,stringu1="ZZAAAA",stringu2="MJLAAA",string4="OOOOxx" 663811200000000000 +tenk unique1=2041i,unique2=7683i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=41i,twothousand=41i,fivethous=2041i,tenthous=2041i,odd=82i,even=83i,stringu1="NAAAAA",stringu2="NJLAAA",string4="VVVVxx" 663897600000000000 +tenk unique1=8462i,unique2=7684i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=462i,twothousand=462i,fivethous=3462i,tenthous=8462i,odd=124i,even=125i,stringu1="MNAAAA",stringu2="OJLAAA",string4="AAAAxx" 663984000000000000 +tenk unique1=9076i,unique2=7685i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=76i,twothousand=1076i,fivethous=4076i,tenthous=9076i,odd=152i,even=153i,stringu1="CLAAAA",stringu2="PJLAAA",string4="HHHHxx" 664070400000000000 +tenk unique1=761i,unique2=7686i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=761i,twothousand=761i,fivethous=761i,tenthous=761i,odd=122i,even=123i,stringu1="HDAAAA",stringu2="QJLAAA",string4="OOOOxx" 664156800000000000 +tenk unique1=795i,unique2=7687i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=795i,twothousand=795i,fivethous=795i,tenthous=795i,odd=190i,even=191i,stringu1="PEAAAA",stringu2="RJLAAA",string4="VVVVxx" 664243200000000000 +tenk unique1=1671i,unique2=7688i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=671i,twothousand=1671i,fivethous=1671i,tenthous=1671i,odd=142i,even=143i,stringu1="HMAAAA",stringu2="SJLAAA",string4="AAAAxx" 664329600000000000 +tenk unique1=695i,unique2=7689i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=695i,twothousand=695i,fivethous=695i,tenthous=695i,odd=190i,even=191i,stringu1="TAAAAA",stringu2="TJLAAA",string4="HHHHxx" 664416000000000000 +tenk unique1=4981i,unique2=7690i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=981i,twothousand=981i,fivethous=4981i,tenthous=4981i,odd=162i,even=163i,stringu1="PJAAAA",stringu2="UJLAAA",string4="OOOOxx" 664502400000000000 +tenk unique1=1211i,unique2=7691i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=211i,twothousand=1211i,fivethous=1211i,tenthous=1211i,odd=22i,even=23i,stringu1="PUAAAA",stringu2="VJLAAA",string4="VVVVxx" 664588800000000000 +tenk unique1=5914i,unique2=7692i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=914i,twothousand=1914i,fivethous=914i,tenthous=5914i,odd=28i,even=29i,stringu1="MTAAAA",stringu2="WJLAAA",string4="AAAAxx" 664675200000000000 +tenk unique1=9356i,unique2=7693i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=356i,twothousand=1356i,fivethous=4356i,tenthous=9356i,odd=112i,even=113i,stringu1="WVAAAA",stringu2="XJLAAA",string4="HHHHxx" 664761600000000000 +tenk unique1=1500i,unique2=7694i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=500i,twothousand=1500i,fivethous=1500i,tenthous=1500i,odd=0i,even=1i,stringu1="SFAAAA",stringu2="YJLAAA",string4="OOOOxx" 664848000000000000 +tenk unique1=3353i,unique2=7695i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=353i,twothousand=1353i,fivethous=3353i,tenthous=3353i,odd=106i,even=107i,stringu1="ZYAAAA",stringu2="ZJLAAA",string4="VVVVxx" 664934400000000000 +tenk unique1=1060i,unique2=7696i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=60i,twothousand=1060i,fivethous=1060i,tenthous=1060i,odd=120i,even=121i,stringu1="UOAAAA",stringu2="AKLAAA",string4="AAAAxx" 665020800000000000 +tenk unique1=7910i,unique2=7697i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=910i,twothousand=1910i,fivethous=2910i,tenthous=7910i,odd=20i,even=21i,stringu1="GSAAAA",stringu2="BKLAAA",string4="HHHHxx" 665107200000000000 +tenk unique1=1329i,unique2=7698i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=329i,twothousand=1329i,fivethous=1329i,tenthous=1329i,odd=58i,even=59i,stringu1="DZAAAA",stringu2="CKLAAA",string4="OOOOxx" 665193600000000000 +tenk unique1=6011i,unique2=7699i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=11i,twothousand=11i,fivethous=1011i,tenthous=6011i,odd=22i,even=23i,stringu1="FXAAAA",stringu2="DKLAAA",string4="VVVVxx" 665280000000000000 +tenk unique1=7146i,unique2=7700i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=146i,twothousand=1146i,fivethous=2146i,tenthous=7146i,odd=92i,even=93i,stringu1="WOAAAA",stringu2="EKLAAA",string4="AAAAxx" 665366400000000000 +tenk unique1=4602i,unique2=7701i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=602i,twothousand=602i,fivethous=4602i,tenthous=4602i,odd=4i,even=5i,stringu1="AVAAAA",stringu2="FKLAAA",string4="HHHHxx" 665452800000000000 +tenk unique1=6751i,unique2=7702i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=751i,twothousand=751i,fivethous=1751i,tenthous=6751i,odd=102i,even=103i,stringu1="RZAAAA",stringu2="GKLAAA",string4="OOOOxx" 665539200000000000 +tenk unique1=2666i,unique2=7703i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=666i,twothousand=666i,fivethous=2666i,tenthous=2666i,odd=132i,even=133i,stringu1="OYAAAA",stringu2="HKLAAA",string4="VVVVxx" 665625600000000000 +tenk unique1=2785i,unique2=7704i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=785i,twothousand=785i,fivethous=2785i,tenthous=2785i,odd=170i,even=171i,stringu1="DDAAAA",stringu2="IKLAAA",string4="AAAAxx" 665712000000000000 +tenk unique1=5851i,unique2=7705i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=851i,twothousand=1851i,fivethous=851i,tenthous=5851i,odd=102i,even=103i,stringu1="BRAAAA",stringu2="JKLAAA",string4="HHHHxx" 665798400000000000 +tenk unique1=2435i,unique2=7706i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=435i,twothousand=435i,fivethous=2435i,tenthous=2435i,odd=70i,even=71i,stringu1="RPAAAA",stringu2="KKLAAA",string4="OOOOxx" 665884800000000000 +tenk unique1=7429i,unique2=7707i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=429i,twothousand=1429i,fivethous=2429i,tenthous=7429i,odd=58i,even=59i,stringu1="TZAAAA",stringu2="LKLAAA",string4="VVVVxx" 665971200000000000 +tenk unique1=4241i,unique2=7708i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=241i,twothousand=241i,fivethous=4241i,tenthous=4241i,odd=82i,even=83i,stringu1="DHAAAA",stringu2="MKLAAA",string4="AAAAxx" 666057600000000000 +tenk unique1=5691i,unique2=7709i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=691i,twothousand=1691i,fivethous=691i,tenthous=5691i,odd=182i,even=183i,stringu1="XKAAAA",stringu2="NKLAAA",string4="HHHHxx" 666144000000000000 +tenk unique1=7731i,unique2=7710i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=731i,twothousand=1731i,fivethous=2731i,tenthous=7731i,odd=62i,even=63i,stringu1="JLAAAA",stringu2="OKLAAA",string4="OOOOxx" 666230400000000000 +tenk unique1=249i,unique2=7711i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=249i,twothousand=249i,fivethous=249i,tenthous=249i,odd=98i,even=99i,stringu1="PJAAAA",stringu2="PKLAAA",string4="VVVVxx" 666316800000000000 +tenk unique1=1731i,unique2=7712i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=731i,twothousand=1731i,fivethous=1731i,tenthous=1731i,odd=62i,even=63i,stringu1="POAAAA",stringu2="QKLAAA",string4="AAAAxx" 666403200000000000 +tenk unique1=8716i,unique2=7713i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=716i,twothousand=716i,fivethous=3716i,tenthous=8716i,odd=32i,even=33i,stringu1="GXAAAA",stringu2="RKLAAA",string4="HHHHxx" 666489600000000000 +tenk unique1=2670i,unique2=7714i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=670i,twothousand=670i,fivethous=2670i,tenthous=2670i,odd=140i,even=141i,stringu1="SYAAAA",stringu2="SKLAAA",string4="OOOOxx" 666576000000000000 +tenk unique1=4654i,unique2=7715i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=654i,twothousand=654i,fivethous=4654i,tenthous=4654i,odd=108i,even=109i,stringu1="AXAAAA",stringu2="TKLAAA",string4="VVVVxx" 666662400000000000 +tenk unique1=1027i,unique2=7716i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=27i,twothousand=1027i,fivethous=1027i,tenthous=1027i,odd=54i,even=55i,stringu1="NNAAAA",stringu2="UKLAAA",string4="AAAAxx" 666748800000000000 +tenk unique1=1099i,unique2=7717i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=99i,twothousand=1099i,fivethous=1099i,tenthous=1099i,odd=198i,even=199i,stringu1="HQAAAA",stringu2="VKLAAA",string4="HHHHxx" 666835200000000000 +tenk unique1=3617i,unique2=7718i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=617i,twothousand=1617i,fivethous=3617i,tenthous=3617i,odd=34i,even=35i,stringu1="DJAAAA",stringu2="WKLAAA",string4="OOOOxx" 666921600000000000 +tenk unique1=4330i,unique2=7719i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=330i,twothousand=330i,fivethous=4330i,tenthous=4330i,odd=60i,even=61i,stringu1="OKAAAA",stringu2="XKLAAA",string4="VVVVxx" 667008000000000000 +tenk unique1=9750i,unique2=7720i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=750i,twothousand=1750i,fivethous=4750i,tenthous=9750i,odd=100i,even=101i,stringu1="ALAAAA",stringu2="YKLAAA",string4="AAAAxx" 667094400000000000 +tenk unique1=467i,unique2=7721i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=467i,twothousand=467i,fivethous=467i,tenthous=467i,odd=134i,even=135i,stringu1="ZRAAAA",stringu2="ZKLAAA",string4="HHHHxx" 667180800000000000 +tenk unique1=8525i,unique2=7722i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=525i,twothousand=525i,fivethous=3525i,tenthous=8525i,odd=50i,even=51i,stringu1="XPAAAA",stringu2="ALLAAA",string4="OOOOxx" 667267200000000000 +tenk unique1=5990i,unique2=7723i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=990i,twothousand=1990i,fivethous=990i,tenthous=5990i,odd=180i,even=181i,stringu1="KWAAAA",stringu2="BLLAAA",string4="VVVVxx" 667353600000000000 +tenk unique1=4839i,unique2=7724i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=839i,twothousand=839i,fivethous=4839i,tenthous=4839i,odd=78i,even=79i,stringu1="DEAAAA",stringu2="CLLAAA",string4="AAAAxx" 667440000000000000 +tenk unique1=9914i,unique2=7725i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=914i,twothousand=1914i,fivethous=4914i,tenthous=9914i,odd=28i,even=29i,stringu1="IRAAAA",stringu2="DLLAAA",string4="HHHHxx" 667526400000000000 +tenk unique1=7047i,unique2=7726i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=47i,twothousand=1047i,fivethous=2047i,tenthous=7047i,odd=94i,even=95i,stringu1="BLAAAA",stringu2="ELLAAA",string4="OOOOxx" 667612800000000000 +tenk unique1=874i,unique2=7727i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=874i,twothousand=874i,fivethous=874i,tenthous=874i,odd=148i,even=149i,stringu1="QHAAAA",stringu2="FLLAAA",string4="VVVVxx" 667699200000000000 +tenk unique1=6061i,unique2=7728i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=61i,twothousand=61i,fivethous=1061i,tenthous=6061i,odd=122i,even=123i,stringu1="DZAAAA",stringu2="GLLAAA",string4="AAAAxx" 667785600000000000 +tenk unique1=5491i,unique2=7729i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=491i,twothousand=1491i,fivethous=491i,tenthous=5491i,odd=182i,even=183i,stringu1="FDAAAA",stringu2="HLLAAA",string4="HHHHxx" 667872000000000000 +tenk unique1=4344i,unique2=7730i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=344i,twothousand=344i,fivethous=4344i,tenthous=4344i,odd=88i,even=89i,stringu1="CLAAAA",stringu2="ILLAAA",string4="OOOOxx" 667958400000000000 +tenk unique1=1281i,unique2=7731i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=281i,twothousand=1281i,fivethous=1281i,tenthous=1281i,odd=162i,even=163i,stringu1="HXAAAA",stringu2="JLLAAA",string4="VVVVxx" 668044800000000000 +tenk unique1=3597i,unique2=7732i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=597i,twothousand=1597i,fivethous=3597i,tenthous=3597i,odd=194i,even=195i,stringu1="JIAAAA",stringu2="KLLAAA",string4="AAAAxx" 668131200000000000 +tenk unique1=4992i,unique2=7733i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=992i,twothousand=992i,fivethous=4992i,tenthous=4992i,odd=184i,even=185i,stringu1="AKAAAA",stringu2="LLLAAA",string4="HHHHxx" 668217600000000000 +tenk unique1=3849i,unique2=7734i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=849i,twothousand=1849i,fivethous=3849i,tenthous=3849i,odd=98i,even=99i,stringu1="BSAAAA",stringu2="MLLAAA",string4="OOOOxx" 668304000000000000 +tenk unique1=2655i,unique2=7735i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=655i,twothousand=655i,fivethous=2655i,tenthous=2655i,odd=110i,even=111i,stringu1="DYAAAA",stringu2="NLLAAA",string4="VVVVxx" 668390400000000000 +tenk unique1=147i,unique2=7736i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=147i,twothousand=147i,fivethous=147i,tenthous=147i,odd=94i,even=95i,stringu1="RFAAAA",stringu2="OLLAAA",string4="AAAAxx" 668476800000000000 +tenk unique1=9110i,unique2=7737i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=110i,twothousand=1110i,fivethous=4110i,tenthous=9110i,odd=20i,even=21i,stringu1="KMAAAA",stringu2="PLLAAA",string4="HHHHxx" 668563200000000000 +tenk unique1=1637i,unique2=7738i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=637i,twothousand=1637i,fivethous=1637i,tenthous=1637i,odd=74i,even=75i,stringu1="ZKAAAA",stringu2="QLLAAA",string4="OOOOxx" 668649600000000000 +tenk unique1=9826i,unique2=7739i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=826i,twothousand=1826i,fivethous=4826i,tenthous=9826i,odd=52i,even=53i,stringu1="YNAAAA",stringu2="RLLAAA",string4="VVVVxx" 668736000000000000 +tenk unique1=5957i,unique2=7740i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=957i,twothousand=1957i,fivethous=957i,tenthous=5957i,odd=114i,even=115i,stringu1="DVAAAA",stringu2="SLLAAA",string4="AAAAxx" 668822400000000000 +tenk unique1=6932i,unique2=7741i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=932i,twothousand=932i,fivethous=1932i,tenthous=6932i,odd=64i,even=65i,stringu1="QGAAAA",stringu2="TLLAAA",string4="HHHHxx" 668908800000000000 +tenk unique1=9684i,unique2=7742i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=684i,twothousand=1684i,fivethous=4684i,tenthous=9684i,odd=168i,even=169i,stringu1="MIAAAA",stringu2="ULLAAA",string4="OOOOxx" 668995200000000000 +tenk unique1=4653i,unique2=7743i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=653i,twothousand=653i,fivethous=4653i,tenthous=4653i,odd=106i,even=107i,stringu1="ZWAAAA",stringu2="VLLAAA",string4="VVVVxx" 669081600000000000 +tenk unique1=8065i,unique2=7744i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=65i,twothousand=65i,fivethous=3065i,tenthous=8065i,odd=130i,even=131i,stringu1="FYAAAA",stringu2="WLLAAA",string4="AAAAxx" 669168000000000000 +tenk unique1=1202i,unique2=7745i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=202i,twothousand=1202i,fivethous=1202i,tenthous=1202i,odd=4i,even=5i,stringu1="GUAAAA",stringu2="XLLAAA",string4="HHHHxx" 669254400000000000 +tenk unique1=9214i,unique2=7746i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=214i,twothousand=1214i,fivethous=4214i,tenthous=9214i,odd=28i,even=29i,stringu1="KQAAAA",stringu2="YLLAAA",string4="OOOOxx" 669340800000000000 +tenk unique1=196i,unique2=7747i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=196i,twothousand=196i,fivethous=196i,tenthous=196i,odd=192i,even=193i,stringu1="OHAAAA",stringu2="ZLLAAA",string4="VVVVxx" 669427200000000000 +tenk unique1=4486i,unique2=7748i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=486i,twothousand=486i,fivethous=4486i,tenthous=4486i,odd=172i,even=173i,stringu1="OQAAAA",stringu2="AMLAAA",string4="AAAAxx" 669513600000000000 +tenk unique1=2585i,unique2=7749i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=585i,twothousand=585i,fivethous=2585i,tenthous=2585i,odd=170i,even=171i,stringu1="LVAAAA",stringu2="BMLAAA",string4="HHHHxx" 669600000000000000 +tenk unique1=2464i,unique2=7750i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=464i,twothousand=464i,fivethous=2464i,tenthous=2464i,odd=128i,even=129i,stringu1="UQAAAA",stringu2="CMLAAA",string4="OOOOxx" 669686400000000000 +tenk unique1=3467i,unique2=7751i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=467i,twothousand=1467i,fivethous=3467i,tenthous=3467i,odd=134i,even=135i,stringu1="JDAAAA",stringu2="DMLAAA",string4="VVVVxx" 669772800000000000 +tenk unique1=9295i,unique2=7752i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=295i,twothousand=1295i,fivethous=4295i,tenthous=9295i,odd=190i,even=191i,stringu1="NTAAAA",stringu2="EMLAAA",string4="AAAAxx" 669859200000000000 +tenk unique1=517i,unique2=7753i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=517i,twothousand=517i,fivethous=517i,tenthous=517i,odd=34i,even=35i,stringu1="XTAAAA",stringu2="FMLAAA",string4="HHHHxx" 669945600000000000 +tenk unique1=6870i,unique2=7754i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=870i,twothousand=870i,fivethous=1870i,tenthous=6870i,odd=140i,even=141i,stringu1="GEAAAA",stringu2="GMLAAA",string4="OOOOxx" 670032000000000000 +tenk unique1=5732i,unique2=7755i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=732i,twothousand=1732i,fivethous=732i,tenthous=5732i,odd=64i,even=65i,stringu1="MMAAAA",stringu2="HMLAAA",string4="VVVVxx" 670118400000000000 +tenk unique1=9376i,unique2=7756i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=376i,twothousand=1376i,fivethous=4376i,tenthous=9376i,odd=152i,even=153i,stringu1="QWAAAA",stringu2="IMLAAA",string4="AAAAxx" 670204800000000000 +tenk unique1=838i,unique2=7757i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=838i,twothousand=838i,fivethous=838i,tenthous=838i,odd=76i,even=77i,stringu1="GGAAAA",stringu2="JMLAAA",string4="HHHHxx" 670291200000000000 +tenk unique1=9254i,unique2=7758i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=254i,twothousand=1254i,fivethous=4254i,tenthous=9254i,odd=108i,even=109i,stringu1="YRAAAA",stringu2="KMLAAA",string4="OOOOxx" 670377600000000000 +tenk unique1=8879i,unique2=7759i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=879i,twothousand=879i,fivethous=3879i,tenthous=8879i,odd=158i,even=159i,stringu1="NDAAAA",stringu2="LMLAAA",string4="VVVVxx" 670464000000000000 +tenk unique1=6281i,unique2=7760i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=281i,twothousand=281i,fivethous=1281i,tenthous=6281i,odd=162i,even=163i,stringu1="PHAAAA",stringu2="MMLAAA",string4="AAAAxx" 670550400000000000 +tenk unique1=8216i,unique2=7761i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=216i,twothousand=216i,fivethous=3216i,tenthous=8216i,odd=32i,even=33i,stringu1="AEAAAA",stringu2="NMLAAA",string4="HHHHxx" 670636800000000000 +tenk unique1=9213i,unique2=7762i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=213i,twothousand=1213i,fivethous=4213i,tenthous=9213i,odd=26i,even=27i,stringu1="JQAAAA",stringu2="OMLAAA",string4="OOOOxx" 670723200000000000 +tenk unique1=7234i,unique2=7763i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=234i,twothousand=1234i,fivethous=2234i,tenthous=7234i,odd=68i,even=69i,stringu1="GSAAAA",stringu2="PMLAAA",string4="VVVVxx" 670809600000000000 +tenk unique1=5692i,unique2=7764i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=692i,twothousand=1692i,fivethous=692i,tenthous=5692i,odd=184i,even=185i,stringu1="YKAAAA",stringu2="QMLAAA",string4="AAAAxx" 670896000000000000 +tenk unique1=693i,unique2=7765i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=693i,twothousand=693i,fivethous=693i,tenthous=693i,odd=186i,even=187i,stringu1="RAAAAA",stringu2="RMLAAA",string4="HHHHxx" 670982400000000000 +tenk unique1=9050i,unique2=7766i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=50i,twothousand=1050i,fivethous=4050i,tenthous=9050i,odd=100i,even=101i,stringu1="CKAAAA",stringu2="SMLAAA",string4="OOOOxx" 671068800000000000 +tenk unique1=3623i,unique2=7767i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=623i,twothousand=1623i,fivethous=3623i,tenthous=3623i,odd=46i,even=47i,stringu1="JJAAAA",stringu2="TMLAAA",string4="VVVVxx" 671155200000000000 +tenk unique1=2130i,unique2=7768i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=130i,twothousand=130i,fivethous=2130i,tenthous=2130i,odd=60i,even=61i,stringu1="YDAAAA",stringu2="UMLAAA",string4="AAAAxx" 671241600000000000 +tenk unique1=2514i,unique2=7769i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=514i,twothousand=514i,fivethous=2514i,tenthous=2514i,odd=28i,even=29i,stringu1="SSAAAA",stringu2="VMLAAA",string4="HHHHxx" 671328000000000000 +tenk unique1=1812i,unique2=7770i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=812i,twothousand=1812i,fivethous=1812i,tenthous=1812i,odd=24i,even=25i,stringu1="SRAAAA",stringu2="WMLAAA",string4="OOOOxx" 671414400000000000 +tenk unique1=9037i,unique2=7771i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=37i,twothousand=1037i,fivethous=4037i,tenthous=9037i,odd=74i,even=75i,stringu1="PJAAAA",stringu2="XMLAAA",string4="VVVVxx" 671500800000000000 +tenk unique1=5054i,unique2=7772i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=54i,twothousand=1054i,fivethous=54i,tenthous=5054i,odd=108i,even=109i,stringu1="KMAAAA",stringu2="YMLAAA",string4="AAAAxx" 671587200000000000 +tenk unique1=7801i,unique2=7773i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=801i,twothousand=1801i,fivethous=2801i,tenthous=7801i,odd=2i,even=3i,stringu1="BOAAAA",stringu2="ZMLAAA",string4="HHHHxx" 671673600000000000 +tenk unique1=7939i,unique2=7774i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=939i,twothousand=1939i,fivethous=2939i,tenthous=7939i,odd=78i,even=79i,stringu1="JTAAAA",stringu2="ANLAAA",string4="OOOOxx" 671760000000000000 +tenk unique1=7374i,unique2=7775i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=374i,twothousand=1374i,fivethous=2374i,tenthous=7374i,odd=148i,even=149i,stringu1="QXAAAA",stringu2="BNLAAA",string4="VVVVxx" 671846400000000000 +tenk unique1=1058i,unique2=7776i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=58i,twothousand=1058i,fivethous=1058i,tenthous=1058i,odd=116i,even=117i,stringu1="SOAAAA",stringu2="CNLAAA",string4="AAAAxx" 671932800000000000 +tenk unique1=1972i,unique2=7777i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=972i,twothousand=1972i,fivethous=1972i,tenthous=1972i,odd=144i,even=145i,stringu1="WXAAAA",stringu2="DNLAAA",string4="HHHHxx" 672019200000000000 +tenk unique1=3741i,unique2=7778i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=741i,twothousand=1741i,fivethous=3741i,tenthous=3741i,odd=82i,even=83i,stringu1="XNAAAA",stringu2="ENLAAA",string4="OOOOxx" 672105600000000000 +tenk unique1=2227i,unique2=7779i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=227i,twothousand=227i,fivethous=2227i,tenthous=2227i,odd=54i,even=55i,stringu1="RHAAAA",stringu2="FNLAAA",string4="VVVVxx" 672192000000000000 +tenk unique1=304i,unique2=7780i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=304i,twothousand=304i,fivethous=304i,tenthous=304i,odd=8i,even=9i,stringu1="SLAAAA",stringu2="GNLAAA",string4="AAAAxx" 672278400000000000 +tenk unique1=4914i,unique2=7781i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=914i,twothousand=914i,fivethous=4914i,tenthous=4914i,odd=28i,even=29i,stringu1="AHAAAA",stringu2="HNLAAA",string4="HHHHxx" 672364800000000000 +tenk unique1=2428i,unique2=7782i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=428i,twothousand=428i,fivethous=2428i,tenthous=2428i,odd=56i,even=57i,stringu1="KPAAAA",stringu2="INLAAA",string4="OOOOxx" 672451200000000000 +tenk unique1=6660i,unique2=7783i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=660i,twothousand=660i,fivethous=1660i,tenthous=6660i,odd=120i,even=121i,stringu1="EWAAAA",stringu2="JNLAAA",string4="VVVVxx" 672537600000000000 +tenk unique1=2676i,unique2=7784i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=676i,twothousand=676i,fivethous=2676i,tenthous=2676i,odd=152i,even=153i,stringu1="YYAAAA",stringu2="KNLAAA",string4="AAAAxx" 672624000000000000 +tenk unique1=2454i,unique2=7785i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=454i,twothousand=454i,fivethous=2454i,tenthous=2454i,odd=108i,even=109i,stringu1="KQAAAA",stringu2="LNLAAA",string4="HHHHxx" 672710400000000000 +tenk unique1=3798i,unique2=7786i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=798i,twothousand=1798i,fivethous=3798i,tenthous=3798i,odd=196i,even=197i,stringu1="CQAAAA",stringu2="MNLAAA",string4="OOOOxx" 672796800000000000 +tenk unique1=1341i,unique2=7787i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=341i,twothousand=1341i,fivethous=1341i,tenthous=1341i,odd=82i,even=83i,stringu1="PZAAAA",stringu2="NNLAAA",string4="VVVVxx" 672883200000000000 +tenk unique1=1611i,unique2=7788i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=611i,twothousand=1611i,fivethous=1611i,tenthous=1611i,odd=22i,even=23i,stringu1="ZJAAAA",stringu2="ONLAAA",string4="AAAAxx" 672969600000000000 +tenk unique1=2681i,unique2=7789i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=681i,twothousand=681i,fivethous=2681i,tenthous=2681i,odd=162i,even=163i,stringu1="DZAAAA",stringu2="PNLAAA",string4="HHHHxx" 673056000000000000 +tenk unique1=7292i,unique2=7790i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=292i,twothousand=1292i,fivethous=2292i,tenthous=7292i,odd=184i,even=185i,stringu1="MUAAAA",stringu2="QNLAAA",string4="OOOOxx" 673142400000000000 +tenk unique1=7775i,unique2=7791i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=775i,twothousand=1775i,fivethous=2775i,tenthous=7775i,odd=150i,even=151i,stringu1="BNAAAA",stringu2="RNLAAA",string4="VVVVxx" 673228800000000000 +tenk unique1=794i,unique2=7792i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=794i,twothousand=794i,fivethous=794i,tenthous=794i,odd=188i,even=189i,stringu1="OEAAAA",stringu2="SNLAAA",string4="AAAAxx" 673315200000000000 +tenk unique1=8709i,unique2=7793i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=709i,twothousand=709i,fivethous=3709i,tenthous=8709i,odd=18i,even=19i,stringu1="ZWAAAA",stringu2="TNLAAA",string4="HHHHxx" 673401600000000000 +tenk unique1=1901i,unique2=7794i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=901i,twothousand=1901i,fivethous=1901i,tenthous=1901i,odd=2i,even=3i,stringu1="DVAAAA",stringu2="UNLAAA",string4="OOOOxx" 673488000000000000 +tenk unique1=3089i,unique2=7795i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=89i,twothousand=1089i,fivethous=3089i,tenthous=3089i,odd=178i,even=179i,stringu1="VOAAAA",stringu2="VNLAAA",string4="VVVVxx" 673574400000000000 +tenk unique1=7797i,unique2=7796i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=797i,twothousand=1797i,fivethous=2797i,tenthous=7797i,odd=194i,even=195i,stringu1="XNAAAA",stringu2="WNLAAA",string4="AAAAxx" 673660800000000000 +tenk unique1=6070i,unique2=7797i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=70i,twothousand=70i,fivethous=1070i,tenthous=6070i,odd=140i,even=141i,stringu1="MZAAAA",stringu2="XNLAAA",string4="HHHHxx" 673747200000000000 +tenk unique1=2191i,unique2=7798i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=191i,twothousand=191i,fivethous=2191i,tenthous=2191i,odd=182i,even=183i,stringu1="HGAAAA",stringu2="YNLAAA",string4="OOOOxx" 673833600000000000 +tenk unique1=3497i,unique2=7799i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=497i,twothousand=1497i,fivethous=3497i,tenthous=3497i,odd=194i,even=195i,stringu1="NEAAAA",stringu2="ZNLAAA",string4="VVVVxx" 673920000000000000 +tenk unique1=8302i,unique2=7800i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=302i,twothousand=302i,fivethous=3302i,tenthous=8302i,odd=4i,even=5i,stringu1="IHAAAA",stringu2="AOLAAA",string4="AAAAxx" 674006400000000000 +tenk unique1=4365i,unique2=7801i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=365i,twothousand=365i,fivethous=4365i,tenthous=4365i,odd=130i,even=131i,stringu1="XLAAAA",stringu2="BOLAAA",string4="HHHHxx" 674092800000000000 +tenk unique1=3588i,unique2=7802i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=588i,twothousand=1588i,fivethous=3588i,tenthous=3588i,odd=176i,even=177i,stringu1="AIAAAA",stringu2="COLAAA",string4="OOOOxx" 674179200000000000 +tenk unique1=8292i,unique2=7803i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=292i,twothousand=292i,fivethous=3292i,tenthous=8292i,odd=184i,even=185i,stringu1="YGAAAA",stringu2="DOLAAA",string4="VVVVxx" 674265600000000000 +tenk unique1=4696i,unique2=7804i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=696i,twothousand=696i,fivethous=4696i,tenthous=4696i,odd=192i,even=193i,stringu1="QYAAAA",stringu2="EOLAAA",string4="AAAAxx" 674352000000000000 +tenk unique1=5641i,unique2=7805i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=641i,twothousand=1641i,fivethous=641i,tenthous=5641i,odd=82i,even=83i,stringu1="ZIAAAA",stringu2="FOLAAA",string4="HHHHxx" 674438400000000000 +tenk unique1=9386i,unique2=7806i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=386i,twothousand=1386i,fivethous=4386i,tenthous=9386i,odd=172i,even=173i,stringu1="AXAAAA",stringu2="GOLAAA",string4="OOOOxx" 674524800000000000 +tenk unique1=507i,unique2=7807i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=507i,twothousand=507i,fivethous=507i,tenthous=507i,odd=14i,even=15i,stringu1="NTAAAA",stringu2="HOLAAA",string4="VVVVxx" 674611200000000000 +tenk unique1=7201i,unique2=7808i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=201i,twothousand=1201i,fivethous=2201i,tenthous=7201i,odd=2i,even=3i,stringu1="ZQAAAA",stringu2="IOLAAA",string4="AAAAxx" 674697600000000000 +tenk unique1=7785i,unique2=7809i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=785i,twothousand=1785i,fivethous=2785i,tenthous=7785i,odd=170i,even=171i,stringu1="LNAAAA",stringu2="JOLAAA",string4="HHHHxx" 674784000000000000 +tenk unique1=463i,unique2=7810i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=463i,twothousand=463i,fivethous=463i,tenthous=463i,odd=126i,even=127i,stringu1="VRAAAA",stringu2="KOLAAA",string4="OOOOxx" 674870400000000000 +tenk unique1=6656i,unique2=7811i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=656i,twothousand=656i,fivethous=1656i,tenthous=6656i,odd=112i,even=113i,stringu1="AWAAAA",stringu2="LOLAAA",string4="VVVVxx" 674956800000000000 +tenk unique1=807i,unique2=7812i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=807i,twothousand=807i,fivethous=807i,tenthous=807i,odd=14i,even=15i,stringu1="BFAAAA",stringu2="MOLAAA",string4="AAAAxx" 675043200000000000 +tenk unique1=7278i,unique2=7813i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=278i,twothousand=1278i,fivethous=2278i,tenthous=7278i,odd=156i,even=157i,stringu1="YTAAAA",stringu2="NOLAAA",string4="HHHHxx" 675129600000000000 +tenk unique1=6237i,unique2=7814i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=237i,twothousand=237i,fivethous=1237i,tenthous=6237i,odd=74i,even=75i,stringu1="XFAAAA",stringu2="OOLAAA",string4="OOOOxx" 675216000000000000 +tenk unique1=7671i,unique2=7815i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=671i,twothousand=1671i,fivethous=2671i,tenthous=7671i,odd=142i,even=143i,stringu1="BJAAAA",stringu2="POLAAA",string4="VVVVxx" 675302400000000000 +tenk unique1=2235i,unique2=7816i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=235i,twothousand=235i,fivethous=2235i,tenthous=2235i,odd=70i,even=71i,stringu1="ZHAAAA",stringu2="QOLAAA",string4="AAAAxx" 675388800000000000 +tenk unique1=4042i,unique2=7817i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=42i,twothousand=42i,fivethous=4042i,tenthous=4042i,odd=84i,even=85i,stringu1="MZAAAA",stringu2="ROLAAA",string4="HHHHxx" 675475200000000000 +tenk unique1=5273i,unique2=7818i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=273i,twothousand=1273i,fivethous=273i,tenthous=5273i,odd=146i,even=147i,stringu1="VUAAAA",stringu2="SOLAAA",string4="OOOOxx" 675561600000000000 +tenk unique1=7557i,unique2=7819i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=557i,twothousand=1557i,fivethous=2557i,tenthous=7557i,odd=114i,even=115i,stringu1="REAAAA",stringu2="TOLAAA",string4="VVVVxx" 675648000000000000 +tenk unique1=4007i,unique2=7820i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=7i,fivethous=4007i,tenthous=4007i,odd=14i,even=15i,stringu1="DYAAAA",stringu2="UOLAAA",string4="AAAAxx" 675734400000000000 +tenk unique1=1428i,unique2=7821i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=428i,twothousand=1428i,fivethous=1428i,tenthous=1428i,odd=56i,even=57i,stringu1="YCAAAA",stringu2="VOLAAA",string4="HHHHxx" 675820800000000000 +tenk unique1=9739i,unique2=7822i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=739i,twothousand=1739i,fivethous=4739i,tenthous=9739i,odd=78i,even=79i,stringu1="PKAAAA",stringu2="WOLAAA",string4="OOOOxx" 675907200000000000 +tenk unique1=7836i,unique2=7823i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=836i,twothousand=1836i,fivethous=2836i,tenthous=7836i,odd=72i,even=73i,stringu1="KPAAAA",stringu2="XOLAAA",string4="VVVVxx" 675993600000000000 +tenk unique1=1777i,unique2=7824i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=777i,twothousand=1777i,fivethous=1777i,tenthous=1777i,odd=154i,even=155i,stringu1="JQAAAA",stringu2="YOLAAA",string4="AAAAxx" 676080000000000000 +tenk unique1=5192i,unique2=7825i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=192i,twothousand=1192i,fivethous=192i,tenthous=5192i,odd=184i,even=185i,stringu1="SRAAAA",stringu2="ZOLAAA",string4="HHHHxx" 676166400000000000 +tenk unique1=7236i,unique2=7826i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=236i,twothousand=1236i,fivethous=2236i,tenthous=7236i,odd=72i,even=73i,stringu1="ISAAAA",stringu2="APLAAA",string4="OOOOxx" 676252800000000000 +tenk unique1=1623i,unique2=7827i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=623i,twothousand=1623i,fivethous=1623i,tenthous=1623i,odd=46i,even=47i,stringu1="LKAAAA",stringu2="BPLAAA",string4="VVVVxx" 676339200000000000 +tenk unique1=8288i,unique2=7828i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=288i,twothousand=288i,fivethous=3288i,tenthous=8288i,odd=176i,even=177i,stringu1="UGAAAA",stringu2="CPLAAA",string4="AAAAxx" 676425600000000000 +tenk unique1=2827i,unique2=7829i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=827i,twothousand=827i,fivethous=2827i,tenthous=2827i,odd=54i,even=55i,stringu1="TEAAAA",stringu2="DPLAAA",string4="HHHHxx" 676512000000000000 +tenk unique1=458i,unique2=7830i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=458i,twothousand=458i,fivethous=458i,tenthous=458i,odd=116i,even=117i,stringu1="QRAAAA",stringu2="EPLAAA",string4="OOOOxx" 676598400000000000 +tenk unique1=1818i,unique2=7831i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=818i,twothousand=1818i,fivethous=1818i,tenthous=1818i,odd=36i,even=37i,stringu1="YRAAAA",stringu2="FPLAAA",string4="VVVVxx" 676684800000000000 +tenk unique1=6837i,unique2=7832i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=837i,twothousand=837i,fivethous=1837i,tenthous=6837i,odd=74i,even=75i,stringu1="ZCAAAA",stringu2="GPLAAA",string4="AAAAxx" 676771200000000000 +tenk unique1=7825i,unique2=7833i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=825i,twothousand=1825i,fivethous=2825i,tenthous=7825i,odd=50i,even=51i,stringu1="ZOAAAA",stringu2="HPLAAA",string4="HHHHxx" 676857600000000000 +tenk unique1=9146i,unique2=7834i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=146i,twothousand=1146i,fivethous=4146i,tenthous=9146i,odd=92i,even=93i,stringu1="UNAAAA",stringu2="IPLAAA",string4="OOOOxx" 676944000000000000 +tenk unique1=8451i,unique2=7835i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=451i,twothousand=451i,fivethous=3451i,tenthous=8451i,odd=102i,even=103i,stringu1="BNAAAA",stringu2="JPLAAA",string4="VVVVxx" 677030400000000000 +tenk unique1=6438i,unique2=7836i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=438i,twothousand=438i,fivethous=1438i,tenthous=6438i,odd=76i,even=77i,stringu1="QNAAAA",stringu2="KPLAAA",string4="AAAAxx" 677116800000000000 +tenk unique1=4020i,unique2=7837i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=20i,twothousand=20i,fivethous=4020i,tenthous=4020i,odd=40i,even=41i,stringu1="QYAAAA",stringu2="LPLAAA",string4="HHHHxx" 677203200000000000 +tenk unique1=4068i,unique2=7838i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=68i,twothousand=68i,fivethous=4068i,tenthous=4068i,odd=136i,even=137i,stringu1="MAAAAA",stringu2="MPLAAA",string4="OOOOxx" 677289600000000000 +tenk unique1=2411i,unique2=7839i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=411i,twothousand=411i,fivethous=2411i,tenthous=2411i,odd=22i,even=23i,stringu1="TOAAAA",stringu2="NPLAAA",string4="VVVVxx" 677376000000000000 +tenk unique1=6222i,unique2=7840i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=222i,twothousand=222i,fivethous=1222i,tenthous=6222i,odd=44i,even=45i,stringu1="IFAAAA",stringu2="OPLAAA",string4="AAAAxx" 677462400000000000 +tenk unique1=3164i,unique2=7841i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=164i,twothousand=1164i,fivethous=3164i,tenthous=3164i,odd=128i,even=129i,stringu1="SRAAAA",stringu2="PPLAAA",string4="HHHHxx" 677548800000000000 +tenk unique1=311i,unique2=7842i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=311i,twothousand=311i,fivethous=311i,tenthous=311i,odd=22i,even=23i,stringu1="ZLAAAA",stringu2="QPLAAA",string4="OOOOxx" 677635200000000000 +tenk unique1=5683i,unique2=7843i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=683i,twothousand=1683i,fivethous=683i,tenthous=5683i,odd=166i,even=167i,stringu1="PKAAAA",stringu2="RPLAAA",string4="VVVVxx" 677721600000000000 +tenk unique1=3993i,unique2=7844i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=993i,twothousand=1993i,fivethous=3993i,tenthous=3993i,odd=186i,even=187i,stringu1="PXAAAA",stringu2="SPLAAA",string4="AAAAxx" 677808000000000000 +tenk unique1=9897i,unique2=7845i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=897i,twothousand=1897i,fivethous=4897i,tenthous=9897i,odd=194i,even=195i,stringu1="RQAAAA",stringu2="TPLAAA",string4="HHHHxx" 677894400000000000 +tenk unique1=6609i,unique2=7846i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=609i,twothousand=609i,fivethous=1609i,tenthous=6609i,odd=18i,even=19i,stringu1="FUAAAA",stringu2="UPLAAA",string4="OOOOxx" 677980800000000000 +tenk unique1=1362i,unique2=7847i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=362i,twothousand=1362i,fivethous=1362i,tenthous=1362i,odd=124i,even=125i,stringu1="KAAAAA",stringu2="VPLAAA",string4="VVVVxx" 678067200000000000 +tenk unique1=3918i,unique2=7848i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=918i,twothousand=1918i,fivethous=3918i,tenthous=3918i,odd=36i,even=37i,stringu1="SUAAAA",stringu2="WPLAAA",string4="AAAAxx" 678153600000000000 +tenk unique1=7376i,unique2=7849i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=376i,twothousand=1376i,fivethous=2376i,tenthous=7376i,odd=152i,even=153i,stringu1="SXAAAA",stringu2="XPLAAA",string4="HHHHxx" 678240000000000000 +tenk unique1=6996i,unique2=7850i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=996i,twothousand=996i,fivethous=1996i,tenthous=6996i,odd=192i,even=193i,stringu1="CJAAAA",stringu2="YPLAAA",string4="OOOOxx" 678326400000000000 +tenk unique1=9567i,unique2=7851i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=567i,twothousand=1567i,fivethous=4567i,tenthous=9567i,odd=134i,even=135i,stringu1="ZDAAAA",stringu2="ZPLAAA",string4="VVVVxx" 678412800000000000 +tenk unique1=7525i,unique2=7852i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=525i,twothousand=1525i,fivethous=2525i,tenthous=7525i,odd=50i,even=51i,stringu1="LDAAAA",stringu2="AQLAAA",string4="AAAAxx" 678499200000000000 +tenk unique1=9069i,unique2=7853i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=69i,twothousand=1069i,fivethous=4069i,tenthous=9069i,odd=138i,even=139i,stringu1="VKAAAA",stringu2="BQLAAA",string4="HHHHxx" 678585600000000000 +tenk unique1=9999i,unique2=7854i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=999i,twothousand=1999i,fivethous=4999i,tenthous=9999i,odd=198i,even=199i,stringu1="PUAAAA",stringu2="CQLAAA",string4="OOOOxx" 678672000000000000 +tenk unique1=9237i,unique2=7855i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=237i,twothousand=1237i,fivethous=4237i,tenthous=9237i,odd=74i,even=75i,stringu1="HRAAAA",stringu2="DQLAAA",string4="VVVVxx" 678758400000000000 +tenk unique1=8441i,unique2=7856i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=441i,twothousand=441i,fivethous=3441i,tenthous=8441i,odd=82i,even=83i,stringu1="RMAAAA",stringu2="EQLAAA",string4="AAAAxx" 678844800000000000 +tenk unique1=6769i,unique2=7857i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=769i,twothousand=769i,fivethous=1769i,tenthous=6769i,odd=138i,even=139i,stringu1="JAAAAA",stringu2="FQLAAA",string4="HHHHxx" 678931200000000000 +tenk unique1=6073i,unique2=7858i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=73i,twothousand=73i,fivethous=1073i,tenthous=6073i,odd=146i,even=147i,stringu1="PZAAAA",stringu2="GQLAAA",string4="OOOOxx" 679017600000000000 +tenk unique1=1091i,unique2=7859i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=91i,twothousand=1091i,fivethous=1091i,tenthous=1091i,odd=182i,even=183i,stringu1="ZPAAAA",stringu2="HQLAAA",string4="VVVVxx" 679104000000000000 +tenk unique1=9886i,unique2=7860i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=886i,twothousand=1886i,fivethous=4886i,tenthous=9886i,odd=172i,even=173i,stringu1="GQAAAA",stringu2="IQLAAA",string4="AAAAxx" 679190400000000000 +tenk unique1=3971i,unique2=7861i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=971i,twothousand=1971i,fivethous=3971i,tenthous=3971i,odd=142i,even=143i,stringu1="TWAAAA",stringu2="JQLAAA",string4="HHHHxx" 679276800000000000 +tenk unique1=4621i,unique2=7862i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=621i,twothousand=621i,fivethous=4621i,tenthous=4621i,odd=42i,even=43i,stringu1="TVAAAA",stringu2="KQLAAA",string4="OOOOxx" 679363200000000000 +tenk unique1=3120i,unique2=7863i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=120i,twothousand=1120i,fivethous=3120i,tenthous=3120i,odd=40i,even=41i,stringu1="AQAAAA",stringu2="LQLAAA",string4="VVVVxx" 679449600000000000 +tenk unique1=9773i,unique2=7864i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=773i,twothousand=1773i,fivethous=4773i,tenthous=9773i,odd=146i,even=147i,stringu1="XLAAAA",stringu2="MQLAAA",string4="AAAAxx" 679536000000000000 +tenk unique1=8712i,unique2=7865i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=712i,twothousand=712i,fivethous=3712i,tenthous=8712i,odd=24i,even=25i,stringu1="CXAAAA",stringu2="NQLAAA",string4="HHHHxx" 679622400000000000 +tenk unique1=801i,unique2=7866i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=801i,twothousand=801i,fivethous=801i,tenthous=801i,odd=2i,even=3i,stringu1="VEAAAA",stringu2="OQLAAA",string4="OOOOxx" 679708800000000000 +tenk unique1=9478i,unique2=7867i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=478i,twothousand=1478i,fivethous=4478i,tenthous=9478i,odd=156i,even=157i,stringu1="OAAAAA",stringu2="PQLAAA",string4="VVVVxx" 679795200000000000 +tenk unique1=3466i,unique2=7868i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=466i,twothousand=1466i,fivethous=3466i,tenthous=3466i,odd=132i,even=133i,stringu1="IDAAAA",stringu2="QQLAAA",string4="AAAAxx" 679881600000000000 +tenk unique1=6326i,unique2=7869i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=326i,twothousand=326i,fivethous=1326i,tenthous=6326i,odd=52i,even=53i,stringu1="IJAAAA",stringu2="RQLAAA",string4="HHHHxx" 679968000000000000 +tenk unique1=1723i,unique2=7870i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=723i,twothousand=1723i,fivethous=1723i,tenthous=1723i,odd=46i,even=47i,stringu1="HOAAAA",stringu2="SQLAAA",string4="OOOOxx" 680054400000000000 +tenk unique1=4978i,unique2=7871i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=978i,twothousand=978i,fivethous=4978i,tenthous=4978i,odd=156i,even=157i,stringu1="MJAAAA",stringu2="TQLAAA",string4="VVVVxx" 680140800000000000 +tenk unique1=2311i,unique2=7872i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=311i,twothousand=311i,fivethous=2311i,tenthous=2311i,odd=22i,even=23i,stringu1="XKAAAA",stringu2="UQLAAA",string4="AAAAxx" 680227200000000000 +tenk unique1=9532i,unique2=7873i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=532i,twothousand=1532i,fivethous=4532i,tenthous=9532i,odd=64i,even=65i,stringu1="QCAAAA",stringu2="VQLAAA",string4="HHHHxx" 680313600000000000 +tenk unique1=3680i,unique2=7874i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=680i,twothousand=1680i,fivethous=3680i,tenthous=3680i,odd=160i,even=161i,stringu1="OLAAAA",stringu2="WQLAAA",string4="OOOOxx" 680400000000000000 +tenk unique1=1244i,unique2=7875i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=244i,twothousand=1244i,fivethous=1244i,tenthous=1244i,odd=88i,even=89i,stringu1="WVAAAA",stringu2="XQLAAA",string4="VVVVxx" 680486400000000000 +tenk unique1=3821i,unique2=7876i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=821i,twothousand=1821i,fivethous=3821i,tenthous=3821i,odd=42i,even=43i,stringu1="ZQAAAA",stringu2="YQLAAA",string4="AAAAxx" 680572800000000000 +tenk unique1=9586i,unique2=7877i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=586i,twothousand=1586i,fivethous=4586i,tenthous=9586i,odd=172i,even=173i,stringu1="SEAAAA",stringu2="ZQLAAA",string4="HHHHxx" 680659200000000000 +tenk unique1=3894i,unique2=7878i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=894i,twothousand=1894i,fivethous=3894i,tenthous=3894i,odd=188i,even=189i,stringu1="UTAAAA",stringu2="ARLAAA",string4="OOOOxx" 680745600000000000 +tenk unique1=6169i,unique2=7879i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=169i,twothousand=169i,fivethous=1169i,tenthous=6169i,odd=138i,even=139i,stringu1="HDAAAA",stringu2="BRLAAA",string4="VVVVxx" 680832000000000000 +tenk unique1=5919i,unique2=7880i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=919i,twothousand=1919i,fivethous=919i,tenthous=5919i,odd=38i,even=39i,stringu1="RTAAAA",stringu2="CRLAAA",string4="AAAAxx" 680918400000000000 +tenk unique1=4187i,unique2=7881i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=187i,twothousand=187i,fivethous=4187i,tenthous=4187i,odd=174i,even=175i,stringu1="BFAAAA",stringu2="DRLAAA",string4="HHHHxx" 681004800000000000 +tenk unique1=5477i,unique2=7882i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=477i,twothousand=1477i,fivethous=477i,tenthous=5477i,odd=154i,even=155i,stringu1="RCAAAA",stringu2="ERLAAA",string4="OOOOxx" 681091200000000000 +tenk unique1=2806i,unique2=7883i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=806i,twothousand=806i,fivethous=2806i,tenthous=2806i,odd=12i,even=13i,stringu1="YDAAAA",stringu2="FRLAAA",string4="VVVVxx" 681177600000000000 +tenk unique1=8158i,unique2=7884i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=158i,twothousand=158i,fivethous=3158i,tenthous=8158i,odd=116i,even=117i,stringu1="UBAAAA",stringu2="GRLAAA",string4="AAAAxx" 681264000000000000 +tenk unique1=7130i,unique2=7885i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=130i,twothousand=1130i,fivethous=2130i,tenthous=7130i,odd=60i,even=61i,stringu1="GOAAAA",stringu2="HRLAAA",string4="HHHHxx" 681350400000000000 +tenk unique1=7133i,unique2=7886i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=133i,twothousand=1133i,fivethous=2133i,tenthous=7133i,odd=66i,even=67i,stringu1="JOAAAA",stringu2="IRLAAA",string4="OOOOxx" 681436800000000000 +tenk unique1=6033i,unique2=7887i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=33i,twothousand=33i,fivethous=1033i,tenthous=6033i,odd=66i,even=67i,stringu1="BYAAAA",stringu2="JRLAAA",string4="VVVVxx" 681523200000000000 +tenk unique1=2415i,unique2=7888i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=415i,twothousand=415i,fivethous=2415i,tenthous=2415i,odd=30i,even=31i,stringu1="XOAAAA",stringu2="KRLAAA",string4="AAAAxx" 681609600000000000 +tenk unique1=8091i,unique2=7889i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=91i,twothousand=91i,fivethous=3091i,tenthous=8091i,odd=182i,even=183i,stringu1="FZAAAA",stringu2="LRLAAA",string4="HHHHxx" 681696000000000000 +tenk unique1=8347i,unique2=7890i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=347i,twothousand=347i,fivethous=3347i,tenthous=8347i,odd=94i,even=95i,stringu1="BJAAAA",stringu2="MRLAAA",string4="OOOOxx" 681782400000000000 +tenk unique1=7879i,unique2=7891i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=879i,twothousand=1879i,fivethous=2879i,tenthous=7879i,odd=158i,even=159i,stringu1="BRAAAA",stringu2="NRLAAA",string4="VVVVxx" 681868800000000000 +tenk unique1=9360i,unique2=7892i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=360i,twothousand=1360i,fivethous=4360i,tenthous=9360i,odd=120i,even=121i,stringu1="AWAAAA",stringu2="ORLAAA",string4="AAAAxx" 681955200000000000 +tenk unique1=3369i,unique2=7893i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=369i,twothousand=1369i,fivethous=3369i,tenthous=3369i,odd=138i,even=139i,stringu1="PZAAAA",stringu2="PRLAAA",string4="HHHHxx" 682041600000000000 +tenk unique1=8536i,unique2=7894i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=536i,twothousand=536i,fivethous=3536i,tenthous=8536i,odd=72i,even=73i,stringu1="IQAAAA",stringu2="QRLAAA",string4="OOOOxx" 682128000000000000 +tenk unique1=8628i,unique2=7895i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=628i,twothousand=628i,fivethous=3628i,tenthous=8628i,odd=56i,even=57i,stringu1="WTAAAA",stringu2="RRLAAA",string4="VVVVxx" 682214400000000000 +tenk unique1=1580i,unique2=7896i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=580i,twothousand=1580i,fivethous=1580i,tenthous=1580i,odd=160i,even=161i,stringu1="UIAAAA",stringu2="SRLAAA",string4="AAAAxx" 682300800000000000 +tenk unique1=705i,unique2=7897i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=705i,twothousand=705i,fivethous=705i,tenthous=705i,odd=10i,even=11i,stringu1="DBAAAA",stringu2="TRLAAA",string4="HHHHxx" 682387200000000000 +tenk unique1=4650i,unique2=7898i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=650i,twothousand=650i,fivethous=4650i,tenthous=4650i,odd=100i,even=101i,stringu1="WWAAAA",stringu2="URLAAA",string4="OOOOxx" 682473600000000000 +tenk unique1=9165i,unique2=7899i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=165i,twothousand=1165i,fivethous=4165i,tenthous=9165i,odd=130i,even=131i,stringu1="NOAAAA",stringu2="VRLAAA",string4="VVVVxx" 682560000000000000 +tenk unique1=4820i,unique2=7900i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=820i,twothousand=820i,fivethous=4820i,tenthous=4820i,odd=40i,even=41i,stringu1="KDAAAA",stringu2="WRLAAA",string4="AAAAxx" 682646400000000000 +tenk unique1=3538i,unique2=7901i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=538i,twothousand=1538i,fivethous=3538i,tenthous=3538i,odd=76i,even=77i,stringu1="CGAAAA",stringu2="XRLAAA",string4="HHHHxx" 682732800000000000 +tenk unique1=9947i,unique2=7902i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=947i,twothousand=1947i,fivethous=4947i,tenthous=9947i,odd=94i,even=95i,stringu1="PSAAAA",stringu2="YRLAAA",string4="OOOOxx" 682819200000000000 +tenk unique1=4954i,unique2=7903i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=954i,twothousand=954i,fivethous=4954i,tenthous=4954i,odd=108i,even=109i,stringu1="OIAAAA",stringu2="ZRLAAA",string4="VVVVxx" 682905600000000000 +tenk unique1=1104i,unique2=7904i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=104i,twothousand=1104i,fivethous=1104i,tenthous=1104i,odd=8i,even=9i,stringu1="MQAAAA",stringu2="ASLAAA",string4="AAAAxx" 682992000000000000 +tenk unique1=8455i,unique2=7905i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=455i,twothousand=455i,fivethous=3455i,tenthous=8455i,odd=110i,even=111i,stringu1="FNAAAA",stringu2="BSLAAA",string4="HHHHxx" 683078400000000000 +tenk unique1=8307i,unique2=7906i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=307i,twothousand=307i,fivethous=3307i,tenthous=8307i,odd=14i,even=15i,stringu1="NHAAAA",stringu2="CSLAAA",string4="OOOOxx" 683164800000000000 +tenk unique1=9203i,unique2=7907i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=203i,twothousand=1203i,fivethous=4203i,tenthous=9203i,odd=6i,even=7i,stringu1="ZPAAAA",stringu2="DSLAAA",string4="VVVVxx" 683251200000000000 +tenk unique1=7565i,unique2=7908i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=565i,twothousand=1565i,fivethous=2565i,tenthous=7565i,odd=130i,even=131i,stringu1="ZEAAAA",stringu2="ESLAAA",string4="AAAAxx" 683337600000000000 +tenk unique1=7745i,unique2=7909i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=745i,twothousand=1745i,fivethous=2745i,tenthous=7745i,odd=90i,even=91i,stringu1="XLAAAA",stringu2="FSLAAA",string4="HHHHxx" 683424000000000000 +tenk unique1=1787i,unique2=7910i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=787i,twothousand=1787i,fivethous=1787i,tenthous=1787i,odd=174i,even=175i,stringu1="TQAAAA",stringu2="GSLAAA",string4="OOOOxx" 683510400000000000 +tenk unique1=4861i,unique2=7911i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=861i,twothousand=861i,fivethous=4861i,tenthous=4861i,odd=122i,even=123i,stringu1="ZEAAAA",stringu2="HSLAAA",string4="VVVVxx" 683596800000000000 +tenk unique1=5183i,unique2=7912i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=183i,twothousand=1183i,fivethous=183i,tenthous=5183i,odd=166i,even=167i,stringu1="JRAAAA",stringu2="ISLAAA",string4="AAAAxx" 683683200000000000 +tenk unique1=529i,unique2=7913i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=529i,twothousand=529i,fivethous=529i,tenthous=529i,odd=58i,even=59i,stringu1="JUAAAA",stringu2="JSLAAA",string4="HHHHxx" 683769600000000000 +tenk unique1=2470i,unique2=7914i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=470i,twothousand=470i,fivethous=2470i,tenthous=2470i,odd=140i,even=141i,stringu1="ARAAAA",stringu2="KSLAAA",string4="OOOOxx" 683856000000000000 +tenk unique1=1267i,unique2=7915i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=267i,twothousand=1267i,fivethous=1267i,tenthous=1267i,odd=134i,even=135i,stringu1="TWAAAA",stringu2="LSLAAA",string4="VVVVxx" 683942400000000000 +tenk unique1=2059i,unique2=7916i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=59i,twothousand=59i,fivethous=2059i,tenthous=2059i,odd=118i,even=119i,stringu1="FBAAAA",stringu2="MSLAAA",string4="AAAAxx" 684028800000000000 +tenk unique1=1862i,unique2=7917i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=862i,twothousand=1862i,fivethous=1862i,tenthous=1862i,odd=124i,even=125i,stringu1="QTAAAA",stringu2="NSLAAA",string4="HHHHxx" 684115200000000000 +tenk unique1=7382i,unique2=7918i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=382i,twothousand=1382i,fivethous=2382i,tenthous=7382i,odd=164i,even=165i,stringu1="YXAAAA",stringu2="OSLAAA",string4="OOOOxx" 684201600000000000 +tenk unique1=4796i,unique2=7919i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=796i,twothousand=796i,fivethous=4796i,tenthous=4796i,odd=192i,even=193i,stringu1="MCAAAA",stringu2="PSLAAA",string4="VVVVxx" 684288000000000000 +tenk unique1=2331i,unique2=7920i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=331i,twothousand=331i,fivethous=2331i,tenthous=2331i,odd=62i,even=63i,stringu1="RLAAAA",stringu2="QSLAAA",string4="AAAAxx" 684374400000000000 +tenk unique1=8870i,unique2=7921i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=870i,twothousand=870i,fivethous=3870i,tenthous=8870i,odd=140i,even=141i,stringu1="EDAAAA",stringu2="RSLAAA",string4="HHHHxx" 684460800000000000 +tenk unique1=9581i,unique2=7922i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=581i,twothousand=1581i,fivethous=4581i,tenthous=9581i,odd=162i,even=163i,stringu1="NEAAAA",stringu2="SSLAAA",string4="OOOOxx" 684547200000000000 +tenk unique1=9063i,unique2=7923i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=63i,twothousand=1063i,fivethous=4063i,tenthous=9063i,odd=126i,even=127i,stringu1="PKAAAA",stringu2="TSLAAA",string4="VVVVxx" 684633600000000000 +tenk unique1=2192i,unique2=7924i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=192i,twothousand=192i,fivethous=2192i,tenthous=2192i,odd=184i,even=185i,stringu1="IGAAAA",stringu2="USLAAA",string4="AAAAxx" 684720000000000000 +tenk unique1=6466i,unique2=7925i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=466i,twothousand=466i,fivethous=1466i,tenthous=6466i,odd=132i,even=133i,stringu1="SOAAAA",stringu2="VSLAAA",string4="HHHHxx" 684806400000000000 +tenk unique1=7096i,unique2=7926i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=96i,twothousand=1096i,fivethous=2096i,tenthous=7096i,odd=192i,even=193i,stringu1="YMAAAA",stringu2="WSLAAA",string4="OOOOxx" 684892800000000000 +tenk unique1=6257i,unique2=7927i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=257i,twothousand=257i,fivethous=1257i,tenthous=6257i,odd=114i,even=115i,stringu1="RGAAAA",stringu2="XSLAAA",string4="VVVVxx" 684979200000000000 +tenk unique1=7009i,unique2=7928i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=1009i,fivethous=2009i,tenthous=7009i,odd=18i,even=19i,stringu1="PJAAAA",stringu2="YSLAAA",string4="AAAAxx" 685065600000000000 +tenk unique1=8136i,unique2=7929i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=136i,twothousand=136i,fivethous=3136i,tenthous=8136i,odd=72i,even=73i,stringu1="YAAAAA",stringu2="ZSLAAA",string4="HHHHxx" 685152000000000000 +tenk unique1=1854i,unique2=7930i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=854i,twothousand=1854i,fivethous=1854i,tenthous=1854i,odd=108i,even=109i,stringu1="ITAAAA",stringu2="ATLAAA",string4="OOOOxx" 685238400000000000 +tenk unique1=3644i,unique2=7931i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=644i,twothousand=1644i,fivethous=3644i,tenthous=3644i,odd=88i,even=89i,stringu1="EKAAAA",stringu2="BTLAAA",string4="VVVVxx" 685324800000000000 +tenk unique1=4437i,unique2=7932i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=437i,twothousand=437i,fivethous=4437i,tenthous=4437i,odd=74i,even=75i,stringu1="ROAAAA",stringu2="CTLAAA",string4="AAAAxx" 685411200000000000 +tenk unique1=7209i,unique2=7933i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=209i,twothousand=1209i,fivethous=2209i,tenthous=7209i,odd=18i,even=19i,stringu1="HRAAAA",stringu2="DTLAAA",string4="HHHHxx" 685497600000000000 +tenk unique1=1516i,unique2=7934i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=516i,twothousand=1516i,fivethous=1516i,tenthous=1516i,odd=32i,even=33i,stringu1="IGAAAA",stringu2="ETLAAA",string4="OOOOxx" 685584000000000000 +tenk unique1=822i,unique2=7935i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=822i,twothousand=822i,fivethous=822i,tenthous=822i,odd=44i,even=45i,stringu1="QFAAAA",stringu2="FTLAAA",string4="VVVVxx" 685670400000000000 +tenk unique1=1778i,unique2=7936i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=778i,twothousand=1778i,fivethous=1778i,tenthous=1778i,odd=156i,even=157i,stringu1="KQAAAA",stringu2="GTLAAA",string4="AAAAxx" 685756800000000000 +tenk unique1=8161i,unique2=7937i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=161i,twothousand=161i,fivethous=3161i,tenthous=8161i,odd=122i,even=123i,stringu1="XBAAAA",stringu2="HTLAAA",string4="HHHHxx" 685843200000000000 +tenk unique1=6030i,unique2=7938i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=30i,twothousand=30i,fivethous=1030i,tenthous=6030i,odd=60i,even=61i,stringu1="YXAAAA",stringu2="ITLAAA",string4="OOOOxx" 685929600000000000 +tenk unique1=3515i,unique2=7939i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=515i,twothousand=1515i,fivethous=3515i,tenthous=3515i,odd=30i,even=31i,stringu1="FFAAAA",stringu2="JTLAAA",string4="VVVVxx" 686016000000000000 +tenk unique1=1702i,unique2=7940i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=702i,twothousand=1702i,fivethous=1702i,tenthous=1702i,odd=4i,even=5i,stringu1="MNAAAA",stringu2="KTLAAA",string4="AAAAxx" 686102400000000000 +tenk unique1=2671i,unique2=7941i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=671i,twothousand=671i,fivethous=2671i,tenthous=2671i,odd=142i,even=143i,stringu1="TYAAAA",stringu2="LTLAAA",string4="HHHHxx" 686188800000000000 +tenk unique1=7623i,unique2=7942i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=623i,twothousand=1623i,fivethous=2623i,tenthous=7623i,odd=46i,even=47i,stringu1="FHAAAA",stringu2="MTLAAA",string4="OOOOxx" 686275200000000000 +tenk unique1=9828i,unique2=7943i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=828i,twothousand=1828i,fivethous=4828i,tenthous=9828i,odd=56i,even=57i,stringu1="AOAAAA",stringu2="NTLAAA",string4="VVVVxx" 686361600000000000 +tenk unique1=1888i,unique2=7944i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=888i,twothousand=1888i,fivethous=1888i,tenthous=1888i,odd=176i,even=177i,stringu1="QUAAAA",stringu2="OTLAAA",string4="AAAAxx" 686448000000000000 +tenk unique1=4520i,unique2=7945i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=520i,twothousand=520i,fivethous=4520i,tenthous=4520i,odd=40i,even=41i,stringu1="WRAAAA",stringu2="PTLAAA",string4="HHHHxx" 686534400000000000 +tenk unique1=3461i,unique2=7946i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=461i,twothousand=1461i,fivethous=3461i,tenthous=3461i,odd=122i,even=123i,stringu1="DDAAAA",stringu2="QTLAAA",string4="OOOOxx" 686620800000000000 +tenk unique1=1488i,unique2=7947i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=488i,twothousand=1488i,fivethous=1488i,tenthous=1488i,odd=176i,even=177i,stringu1="GFAAAA",stringu2="RTLAAA",string4="VVVVxx" 686707200000000000 +tenk unique1=7753i,unique2=7948i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=753i,twothousand=1753i,fivethous=2753i,tenthous=7753i,odd=106i,even=107i,stringu1="FMAAAA",stringu2="STLAAA",string4="AAAAxx" 686793600000000000 +tenk unique1=5525i,unique2=7949i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=525i,twothousand=1525i,fivethous=525i,tenthous=5525i,odd=50i,even=51i,stringu1="NEAAAA",stringu2="TTLAAA",string4="HHHHxx" 686880000000000000 +tenk unique1=5220i,unique2=7950i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=220i,twothousand=1220i,fivethous=220i,tenthous=5220i,odd=40i,even=41i,stringu1="USAAAA",stringu2="UTLAAA",string4="OOOOxx" 686966400000000000 +tenk unique1=305i,unique2=7951i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=305i,twothousand=305i,fivethous=305i,tenthous=305i,odd=10i,even=11i,stringu1="TLAAAA",stringu2="VTLAAA",string4="VVVVxx" 687052800000000000 +tenk unique1=7883i,unique2=7952i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=883i,twothousand=1883i,fivethous=2883i,tenthous=7883i,odd=166i,even=167i,stringu1="FRAAAA",stringu2="WTLAAA",string4="AAAAxx" 687139200000000000 +tenk unique1=1222i,unique2=7953i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=222i,twothousand=1222i,fivethous=1222i,tenthous=1222i,odd=44i,even=45i,stringu1="AVAAAA",stringu2="XTLAAA",string4="HHHHxx" 687225600000000000 +tenk unique1=8552i,unique2=7954i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=552i,twothousand=552i,fivethous=3552i,tenthous=8552i,odd=104i,even=105i,stringu1="YQAAAA",stringu2="YTLAAA",string4="OOOOxx" 687312000000000000 +tenk unique1=6097i,unique2=7955i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=97i,twothousand=97i,fivethous=1097i,tenthous=6097i,odd=194i,even=195i,stringu1="NAAAAA",stringu2="ZTLAAA",string4="VVVVxx" 687398400000000000 +tenk unique1=2298i,unique2=7956i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=298i,twothousand=298i,fivethous=2298i,tenthous=2298i,odd=196i,even=197i,stringu1="KKAAAA",stringu2="AULAAA",string4="AAAAxx" 687484800000000000 +tenk unique1=956i,unique2=7957i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=956i,twothousand=956i,fivethous=956i,tenthous=956i,odd=112i,even=113i,stringu1="UKAAAA",stringu2="BULAAA",string4="HHHHxx" 687571200000000000 +tenk unique1=9351i,unique2=7958i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=351i,twothousand=1351i,fivethous=4351i,tenthous=9351i,odd=102i,even=103i,stringu1="RVAAAA",stringu2="CULAAA",string4="OOOOxx" 687657600000000000 +tenk unique1=6669i,unique2=7959i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=669i,twothousand=669i,fivethous=1669i,tenthous=6669i,odd=138i,even=139i,stringu1="NWAAAA",stringu2="DULAAA",string4="VVVVxx" 687744000000000000 +tenk unique1=9383i,unique2=7960i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=383i,twothousand=1383i,fivethous=4383i,tenthous=9383i,odd=166i,even=167i,stringu1="XWAAAA",stringu2="EULAAA",string4="AAAAxx" 687830400000000000 +tenk unique1=1607i,unique2=7961i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=607i,twothousand=1607i,fivethous=1607i,tenthous=1607i,odd=14i,even=15i,stringu1="VJAAAA",stringu2="FULAAA",string4="HHHHxx" 687916800000000000 +tenk unique1=812i,unique2=7962i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=812i,twothousand=812i,fivethous=812i,tenthous=812i,odd=24i,even=25i,stringu1="GFAAAA",stringu2="GULAAA",string4="OOOOxx" 688003200000000000 +tenk unique1=2109i,unique2=7963i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=109i,twothousand=109i,fivethous=2109i,tenthous=2109i,odd=18i,even=19i,stringu1="DDAAAA",stringu2="HULAAA",string4="VVVVxx" 688089600000000000 +tenk unique1=207i,unique2=7964i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=207i,twothousand=207i,fivethous=207i,tenthous=207i,odd=14i,even=15i,stringu1="ZHAAAA",stringu2="IULAAA",string4="AAAAxx" 688176000000000000 +tenk unique1=7124i,unique2=7965i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=124i,twothousand=1124i,fivethous=2124i,tenthous=7124i,odd=48i,even=49i,stringu1="AOAAAA",stringu2="JULAAA",string4="HHHHxx" 688262400000000000 +tenk unique1=9333i,unique2=7966i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=333i,twothousand=1333i,fivethous=4333i,tenthous=9333i,odd=66i,even=67i,stringu1="ZUAAAA",stringu2="KULAAA",string4="OOOOxx" 688348800000000000 +tenk unique1=3262i,unique2=7967i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=262i,twothousand=1262i,fivethous=3262i,tenthous=3262i,odd=124i,even=125i,stringu1="MVAAAA",stringu2="LULAAA",string4="VVVVxx" 688435200000000000 +tenk unique1=1070i,unique2=7968i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=70i,twothousand=1070i,fivethous=1070i,tenthous=1070i,odd=140i,even=141i,stringu1="EPAAAA",stringu2="MULAAA",string4="AAAAxx" 688521600000000000 +tenk unique1=7579i,unique2=7969i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=579i,twothousand=1579i,fivethous=2579i,tenthous=7579i,odd=158i,even=159i,stringu1="NFAAAA",stringu2="NULAAA",string4="HHHHxx" 688608000000000000 +tenk unique1=9283i,unique2=7970i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=283i,twothousand=1283i,fivethous=4283i,tenthous=9283i,odd=166i,even=167i,stringu1="BTAAAA",stringu2="OULAAA",string4="OOOOxx" 688694400000000000 +tenk unique1=4917i,unique2=7971i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=917i,twothousand=917i,fivethous=4917i,tenthous=4917i,odd=34i,even=35i,stringu1="DHAAAA",stringu2="PULAAA",string4="VVVVxx" 688780800000000000 +tenk unique1=1328i,unique2=7972i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=328i,twothousand=1328i,fivethous=1328i,tenthous=1328i,odd=56i,even=57i,stringu1="CZAAAA",stringu2="QULAAA",string4="AAAAxx" 688867200000000000 +tenk unique1=3042i,unique2=7973i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=42i,twothousand=1042i,fivethous=3042i,tenthous=3042i,odd=84i,even=85i,stringu1="ANAAAA",stringu2="RULAAA",string4="HHHHxx" 688953600000000000 +tenk unique1=8352i,unique2=7974i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=352i,twothousand=352i,fivethous=3352i,tenthous=8352i,odd=104i,even=105i,stringu1="GJAAAA",stringu2="SULAAA",string4="OOOOxx" 689040000000000000 +tenk unique1=2710i,unique2=7975i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=710i,twothousand=710i,fivethous=2710i,tenthous=2710i,odd=20i,even=21i,stringu1="GAAAAA",stringu2="TULAAA",string4="VVVVxx" 689126400000000000 +tenk unique1=3330i,unique2=7976i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=330i,twothousand=1330i,fivethous=3330i,tenthous=3330i,odd=60i,even=61i,stringu1="CYAAAA",stringu2="UULAAA",string4="AAAAxx" 689212800000000000 +tenk unique1=2822i,unique2=7977i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=822i,twothousand=822i,fivethous=2822i,tenthous=2822i,odd=44i,even=45i,stringu1="OEAAAA",stringu2="VULAAA",string4="HHHHxx" 689299200000000000 +tenk unique1=5627i,unique2=7978i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=627i,twothousand=1627i,fivethous=627i,tenthous=5627i,odd=54i,even=55i,stringu1="LIAAAA",stringu2="WULAAA",string4="OOOOxx" 689385600000000000 +tenk unique1=7848i,unique2=7979i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=848i,twothousand=1848i,fivethous=2848i,tenthous=7848i,odd=96i,even=97i,stringu1="WPAAAA",stringu2="XULAAA",string4="VVVVxx" 689472000000000000 +tenk unique1=7384i,unique2=7980i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=384i,twothousand=1384i,fivethous=2384i,tenthous=7384i,odd=168i,even=169i,stringu1="AYAAAA",stringu2="YULAAA",string4="AAAAxx" 689558400000000000 +tenk unique1=727i,unique2=7981i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=727i,twothousand=727i,fivethous=727i,tenthous=727i,odd=54i,even=55i,stringu1="ZBAAAA",stringu2="ZULAAA",string4="HHHHxx" 689644800000000000 +tenk unique1=9926i,unique2=7982i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=926i,twothousand=1926i,fivethous=4926i,tenthous=9926i,odd=52i,even=53i,stringu1="URAAAA",stringu2="AVLAAA",string4="OOOOxx" 689731200000000000 +tenk unique1=2647i,unique2=7983i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=647i,twothousand=647i,fivethous=2647i,tenthous=2647i,odd=94i,even=95i,stringu1="VXAAAA",stringu2="BVLAAA",string4="VVVVxx" 689817600000000000 +tenk unique1=6416i,unique2=7984i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=416i,twothousand=416i,fivethous=1416i,tenthous=6416i,odd=32i,even=33i,stringu1="UMAAAA",stringu2="CVLAAA",string4="AAAAxx" 689904000000000000 +tenk unique1=8751i,unique2=7985i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=751i,twothousand=751i,fivethous=3751i,tenthous=8751i,odd=102i,even=103i,stringu1="PYAAAA",stringu2="DVLAAA",string4="HHHHxx" 689990400000000000 +tenk unique1=6515i,unique2=7986i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=515i,twothousand=515i,fivethous=1515i,tenthous=6515i,odd=30i,even=31i,stringu1="PQAAAA",stringu2="EVLAAA",string4="OOOOxx" 690076800000000000 +tenk unique1=2472i,unique2=7987i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=472i,twothousand=472i,fivethous=2472i,tenthous=2472i,odd=144i,even=145i,stringu1="CRAAAA",stringu2="FVLAAA",string4="VVVVxx" 690163200000000000 +tenk unique1=7205i,unique2=7988i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=205i,twothousand=1205i,fivethous=2205i,tenthous=7205i,odd=10i,even=11i,stringu1="DRAAAA",stringu2="GVLAAA",string4="AAAAxx" 690249600000000000 +tenk unique1=9654i,unique2=7989i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=654i,twothousand=1654i,fivethous=4654i,tenthous=9654i,odd=108i,even=109i,stringu1="IHAAAA",stringu2="HVLAAA",string4="HHHHxx" 690336000000000000 +tenk unique1=5646i,unique2=7990i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=646i,twothousand=1646i,fivethous=646i,tenthous=5646i,odd=92i,even=93i,stringu1="EJAAAA",stringu2="IVLAAA",string4="OOOOxx" 690422400000000000 +tenk unique1=4217i,unique2=7991i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=217i,twothousand=217i,fivethous=4217i,tenthous=4217i,odd=34i,even=35i,stringu1="FGAAAA",stringu2="JVLAAA",string4="VVVVxx" 690508800000000000 +tenk unique1=4484i,unique2=7992i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=484i,twothousand=484i,fivethous=4484i,tenthous=4484i,odd=168i,even=169i,stringu1="MQAAAA",stringu2="KVLAAA",string4="AAAAxx" 690595200000000000 +tenk unique1=6654i,unique2=7993i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=654i,twothousand=654i,fivethous=1654i,tenthous=6654i,odd=108i,even=109i,stringu1="YVAAAA",stringu2="LVLAAA",string4="HHHHxx" 690681600000000000 +tenk unique1=4876i,unique2=7994i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=876i,twothousand=876i,fivethous=4876i,tenthous=4876i,odd=152i,even=153i,stringu1="OFAAAA",stringu2="MVLAAA",string4="OOOOxx" 690768000000000000 +tenk unique1=9690i,unique2=7995i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=690i,twothousand=1690i,fivethous=4690i,tenthous=9690i,odd=180i,even=181i,stringu1="SIAAAA",stringu2="NVLAAA",string4="VVVVxx" 690854400000000000 +tenk unique1=2453i,unique2=7996i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=453i,twothousand=453i,fivethous=2453i,tenthous=2453i,odd=106i,even=107i,stringu1="JQAAAA",stringu2="OVLAAA",string4="AAAAxx" 690940800000000000 +tenk unique1=829i,unique2=7997i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=829i,twothousand=829i,fivethous=829i,tenthous=829i,odd=58i,even=59i,stringu1="XFAAAA",stringu2="PVLAAA",string4="HHHHxx" 691027200000000000 +tenk unique1=2547i,unique2=7998i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=547i,twothousand=547i,fivethous=2547i,tenthous=2547i,odd=94i,even=95i,stringu1="ZTAAAA",stringu2="QVLAAA",string4="OOOOxx" 691113600000000000 +tenk unique1=9726i,unique2=7999i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=726i,twothousand=1726i,fivethous=4726i,tenthous=9726i,odd=52i,even=53i,stringu1="CKAAAA",stringu2="RVLAAA",string4="VVVVxx" 691200000000000000 +tenk unique1=9267i,unique2=8000i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=267i,twothousand=1267i,fivethous=4267i,tenthous=9267i,odd=134i,even=135i,stringu1="LSAAAA",stringu2="SVLAAA",string4="AAAAxx" 691286400000000000 +tenk unique1=7448i,unique2=8001i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=448i,twothousand=1448i,fivethous=2448i,tenthous=7448i,odd=96i,even=97i,stringu1="MAAAAA",stringu2="TVLAAA",string4="HHHHxx" 691372800000000000 +tenk unique1=610i,unique2=8002i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=610i,twothousand=610i,fivethous=610i,tenthous=610i,odd=20i,even=21i,stringu1="MXAAAA",stringu2="UVLAAA",string4="OOOOxx" 691459200000000000 +tenk unique1=2791i,unique2=8003i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=791i,twothousand=791i,fivethous=2791i,tenthous=2791i,odd=182i,even=183i,stringu1="JDAAAA",stringu2="VVLAAA",string4="VVVVxx" 691545600000000000 +tenk unique1=3651i,unique2=8004i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=651i,twothousand=1651i,fivethous=3651i,tenthous=3651i,odd=102i,even=103i,stringu1="LKAAAA",stringu2="WVLAAA",string4="AAAAxx" 691632000000000000 +tenk unique1=5206i,unique2=8005i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=206i,twothousand=1206i,fivethous=206i,tenthous=5206i,odd=12i,even=13i,stringu1="GSAAAA",stringu2="XVLAAA",string4="HHHHxx" 691718400000000000 +tenk unique1=8774i,unique2=8006i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=774i,twothousand=774i,fivethous=3774i,tenthous=8774i,odd=148i,even=149i,stringu1="MZAAAA",stringu2="YVLAAA",string4="OOOOxx" 691804800000000000 +tenk unique1=4753i,unique2=8007i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=753i,twothousand=753i,fivethous=4753i,tenthous=4753i,odd=106i,even=107i,stringu1="VAAAAA",stringu2="ZVLAAA",string4="VVVVxx" 691891200000000000 +tenk unique1=4755i,unique2=8008i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=755i,twothousand=755i,fivethous=4755i,tenthous=4755i,odd=110i,even=111i,stringu1="XAAAAA",stringu2="AWLAAA",string4="AAAAxx" 691977600000000000 +tenk unique1=686i,unique2=8009i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=686i,twothousand=686i,fivethous=686i,tenthous=686i,odd=172i,even=173i,stringu1="KAAAAA",stringu2="BWLAAA",string4="HHHHxx" 692064000000000000 +tenk unique1=8281i,unique2=8010i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=281i,twothousand=281i,fivethous=3281i,tenthous=8281i,odd=162i,even=163i,stringu1="NGAAAA",stringu2="CWLAAA",string4="OOOOxx" 692150400000000000 +tenk unique1=2058i,unique2=8011i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=58i,twothousand=58i,fivethous=2058i,tenthous=2058i,odd=116i,even=117i,stringu1="EBAAAA",stringu2="DWLAAA",string4="VVVVxx" 692236800000000000 +tenk unique1=8900i,unique2=8012i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=900i,twothousand=900i,fivethous=3900i,tenthous=8900i,odd=0i,even=1i,stringu1="IEAAAA",stringu2="EWLAAA",string4="AAAAxx" 692323200000000000 +tenk unique1=8588i,unique2=8013i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=588i,twothousand=588i,fivethous=3588i,tenthous=8588i,odd=176i,even=177i,stringu1="ISAAAA",stringu2="FWLAAA",string4="HHHHxx" 692409600000000000 +tenk unique1=2904i,unique2=8014i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=904i,twothousand=904i,fivethous=2904i,tenthous=2904i,odd=8i,even=9i,stringu1="SHAAAA",stringu2="GWLAAA",string4="OOOOxx" 692496000000000000 +tenk unique1=8917i,unique2=8015i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=917i,twothousand=917i,fivethous=3917i,tenthous=8917i,odd=34i,even=35i,stringu1="ZEAAAA",stringu2="HWLAAA",string4="VVVVxx" 692582400000000000 +tenk unique1=9026i,unique2=8016i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=26i,twothousand=1026i,fivethous=4026i,tenthous=9026i,odd=52i,even=53i,stringu1="EJAAAA",stringu2="IWLAAA",string4="AAAAxx" 692668800000000000 +tenk unique1=2416i,unique2=8017i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=416i,twothousand=416i,fivethous=2416i,tenthous=2416i,odd=32i,even=33i,stringu1="YOAAAA",stringu2="JWLAAA",string4="HHHHxx" 692755200000000000 +tenk unique1=1053i,unique2=8018i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=53i,twothousand=1053i,fivethous=1053i,tenthous=1053i,odd=106i,even=107i,stringu1="NOAAAA",stringu2="KWLAAA",string4="OOOOxx" 692841600000000000 +tenk unique1=7141i,unique2=8019i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=141i,twothousand=1141i,fivethous=2141i,tenthous=7141i,odd=82i,even=83i,stringu1="ROAAAA",stringu2="LWLAAA",string4="VVVVxx" 692928000000000000 +tenk unique1=9771i,unique2=8020i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=771i,twothousand=1771i,fivethous=4771i,tenthous=9771i,odd=142i,even=143i,stringu1="VLAAAA",stringu2="MWLAAA",string4="AAAAxx" 693014400000000000 +tenk unique1=2774i,unique2=8021i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=774i,twothousand=774i,fivethous=2774i,tenthous=2774i,odd=148i,even=149i,stringu1="SCAAAA",stringu2="NWLAAA",string4="HHHHxx" 693100800000000000 +tenk unique1=3213i,unique2=8022i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=213i,twothousand=1213i,fivethous=3213i,tenthous=3213i,odd=26i,even=27i,stringu1="PTAAAA",stringu2="OWLAAA",string4="OOOOxx" 693187200000000000 +tenk unique1=5694i,unique2=8023i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=694i,twothousand=1694i,fivethous=694i,tenthous=5694i,odd=188i,even=189i,stringu1="ALAAAA",stringu2="PWLAAA",string4="VVVVxx" 693273600000000000 +tenk unique1=6631i,unique2=8024i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=631i,twothousand=631i,fivethous=1631i,tenthous=6631i,odd=62i,even=63i,stringu1="BVAAAA",stringu2="QWLAAA",string4="AAAAxx" 693360000000000000 +tenk unique1=6638i,unique2=8025i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=638i,twothousand=638i,fivethous=1638i,tenthous=6638i,odd=76i,even=77i,stringu1="IVAAAA",stringu2="RWLAAA",string4="HHHHxx" 693446400000000000 +tenk unique1=7407i,unique2=8026i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=407i,twothousand=1407i,fivethous=2407i,tenthous=7407i,odd=14i,even=15i,stringu1="XYAAAA",stringu2="SWLAAA",string4="OOOOxx" 693532800000000000 +tenk unique1=8972i,unique2=8027i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=972i,twothousand=972i,fivethous=3972i,tenthous=8972i,odd=144i,even=145i,stringu1="CHAAAA",stringu2="TWLAAA",string4="VVVVxx" 693619200000000000 +tenk unique1=2202i,unique2=8028i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=202i,twothousand=202i,fivethous=2202i,tenthous=2202i,odd=4i,even=5i,stringu1="SGAAAA",stringu2="UWLAAA",string4="AAAAxx" 693705600000000000 +tenk unique1=6135i,unique2=8029i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=135i,twothousand=135i,fivethous=1135i,tenthous=6135i,odd=70i,even=71i,stringu1="ZBAAAA",stringu2="VWLAAA",string4="HHHHxx" 693792000000000000 +tenk unique1=5043i,unique2=8030i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=43i,twothousand=1043i,fivethous=43i,tenthous=5043i,odd=86i,even=87i,stringu1="ZLAAAA",stringu2="WWLAAA",string4="OOOOxx" 693878400000000000 +tenk unique1=5163i,unique2=8031i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=163i,twothousand=1163i,fivethous=163i,tenthous=5163i,odd=126i,even=127i,stringu1="PQAAAA",stringu2="XWLAAA",string4="VVVVxx" 693964800000000000 +tenk unique1=1191i,unique2=8032i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=191i,twothousand=1191i,fivethous=1191i,tenthous=1191i,odd=182i,even=183i,stringu1="VTAAAA",stringu2="YWLAAA",string4="AAAAxx" 694051200000000000 +tenk unique1=6576i,unique2=8033i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=576i,twothousand=576i,fivethous=1576i,tenthous=6576i,odd=152i,even=153i,stringu1="YSAAAA",stringu2="ZWLAAA",string4="HHHHxx" 694137600000000000 +tenk unique1=3455i,unique2=8034i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=455i,twothousand=1455i,fivethous=3455i,tenthous=3455i,odd=110i,even=111i,stringu1="XCAAAA",stringu2="AXLAAA",string4="OOOOxx" 694224000000000000 +tenk unique1=3688i,unique2=8035i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=688i,twothousand=1688i,fivethous=3688i,tenthous=3688i,odd=176i,even=177i,stringu1="WLAAAA",stringu2="BXLAAA",string4="VVVVxx" 694310400000000000 +tenk unique1=4982i,unique2=8036i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=982i,twothousand=982i,fivethous=4982i,tenthous=4982i,odd=164i,even=165i,stringu1="QJAAAA",stringu2="CXLAAA",string4="AAAAxx" 694396800000000000 +tenk unique1=4180i,unique2=8037i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=180i,twothousand=180i,fivethous=4180i,tenthous=4180i,odd=160i,even=161i,stringu1="UEAAAA",stringu2="DXLAAA",string4="HHHHxx" 694483200000000000 +tenk unique1=4708i,unique2=8038i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=708i,twothousand=708i,fivethous=4708i,tenthous=4708i,odd=16i,even=17i,stringu1="CZAAAA",stringu2="EXLAAA",string4="OOOOxx" 694569600000000000 +tenk unique1=1241i,unique2=8039i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=241i,twothousand=1241i,fivethous=1241i,tenthous=1241i,odd=82i,even=83i,stringu1="TVAAAA",stringu2="FXLAAA",string4="VVVVxx" 694656000000000000 +tenk unique1=4921i,unique2=8040i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=921i,twothousand=921i,fivethous=4921i,tenthous=4921i,odd=42i,even=43i,stringu1="HHAAAA",stringu2="GXLAAA",string4="AAAAxx" 694742400000000000 +tenk unique1=3197i,unique2=8041i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=197i,twothousand=1197i,fivethous=3197i,tenthous=3197i,odd=194i,even=195i,stringu1="ZSAAAA",stringu2="HXLAAA",string4="HHHHxx" 694828800000000000 +tenk unique1=8225i,unique2=8042i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=225i,twothousand=225i,fivethous=3225i,tenthous=8225i,odd=50i,even=51i,stringu1="JEAAAA",stringu2="IXLAAA",string4="OOOOxx" 694915200000000000 +tenk unique1=5913i,unique2=8043i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=913i,twothousand=1913i,fivethous=913i,tenthous=5913i,odd=26i,even=27i,stringu1="LTAAAA",stringu2="JXLAAA",string4="VVVVxx" 695001600000000000 +tenk unique1=6387i,unique2=8044i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=387i,twothousand=387i,fivethous=1387i,tenthous=6387i,odd=174i,even=175i,stringu1="RLAAAA",stringu2="KXLAAA",string4="AAAAxx" 695088000000000000 +tenk unique1=2706i,unique2=8045i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=706i,twothousand=706i,fivethous=2706i,tenthous=2706i,odd=12i,even=13i,stringu1="CAAAAA",stringu2="LXLAAA",string4="HHHHxx" 695174400000000000 +tenk unique1=1461i,unique2=8046i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=461i,twothousand=1461i,fivethous=1461i,tenthous=1461i,odd=122i,even=123i,stringu1="FEAAAA",stringu2="MXLAAA",string4="OOOOxx" 695260800000000000 +tenk unique1=7646i,unique2=8047i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=646i,twothousand=1646i,fivethous=2646i,tenthous=7646i,odd=92i,even=93i,stringu1="CIAAAA",stringu2="NXLAAA",string4="VVVVxx" 695347200000000000 +tenk unique1=8066i,unique2=8048i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=66i,twothousand=66i,fivethous=3066i,tenthous=8066i,odd=132i,even=133i,stringu1="GYAAAA",stringu2="OXLAAA",string4="AAAAxx" 695433600000000000 +tenk unique1=4171i,unique2=8049i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=171i,twothousand=171i,fivethous=4171i,tenthous=4171i,odd=142i,even=143i,stringu1="LEAAAA",stringu2="PXLAAA",string4="HHHHxx" 695520000000000000 +tenk unique1=8008i,unique2=8050i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=8i,fivethous=3008i,tenthous=8008i,odd=16i,even=17i,stringu1="AWAAAA",stringu2="QXLAAA",string4="OOOOxx" 695606400000000000 +tenk unique1=2088i,unique2=8051i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=88i,twothousand=88i,fivethous=2088i,tenthous=2088i,odd=176i,even=177i,stringu1="ICAAAA",stringu2="RXLAAA",string4="VVVVxx" 695692800000000000 +tenk unique1=7907i,unique2=8052i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=907i,twothousand=1907i,fivethous=2907i,tenthous=7907i,odd=14i,even=15i,stringu1="DSAAAA",stringu2="SXLAAA",string4="AAAAxx" 695779200000000000 +tenk unique1=2429i,unique2=8053i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=429i,twothousand=429i,fivethous=2429i,tenthous=2429i,odd=58i,even=59i,stringu1="LPAAAA",stringu2="TXLAAA",string4="HHHHxx" 695865600000000000 +tenk unique1=9629i,unique2=8054i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=629i,twothousand=1629i,fivethous=4629i,tenthous=9629i,odd=58i,even=59i,stringu1="JGAAAA",stringu2="UXLAAA",string4="OOOOxx" 695952000000000000 +tenk unique1=1470i,unique2=8055i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=470i,twothousand=1470i,fivethous=1470i,tenthous=1470i,odd=140i,even=141i,stringu1="OEAAAA",stringu2="VXLAAA",string4="VVVVxx" 696038400000000000 +tenk unique1=4346i,unique2=8056i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=346i,twothousand=346i,fivethous=4346i,tenthous=4346i,odd=92i,even=93i,stringu1="ELAAAA",stringu2="WXLAAA",string4="AAAAxx" 696124800000000000 +tenk unique1=7219i,unique2=8057i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=219i,twothousand=1219i,fivethous=2219i,tenthous=7219i,odd=38i,even=39i,stringu1="RRAAAA",stringu2="XXLAAA",string4="HHHHxx" 696211200000000000 +tenk unique1=1185i,unique2=8058i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=185i,twothousand=1185i,fivethous=1185i,tenthous=1185i,odd=170i,even=171i,stringu1="PTAAAA",stringu2="YXLAAA",string4="OOOOxx" 696297600000000000 +tenk unique1=8776i,unique2=8059i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=776i,twothousand=776i,fivethous=3776i,tenthous=8776i,odd=152i,even=153i,stringu1="OZAAAA",stringu2="ZXLAAA",string4="VVVVxx" 696384000000000000 +tenk unique1=684i,unique2=8060i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=684i,twothousand=684i,fivethous=684i,tenthous=684i,odd=168i,even=169i,stringu1="IAAAAA",stringu2="AYLAAA",string4="AAAAxx" 696470400000000000 +tenk unique1=2343i,unique2=8061i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=343i,twothousand=343i,fivethous=2343i,tenthous=2343i,odd=86i,even=87i,stringu1="DMAAAA",stringu2="BYLAAA",string4="HHHHxx" 696556800000000000 +tenk unique1=4470i,unique2=8062i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=470i,twothousand=470i,fivethous=4470i,tenthous=4470i,odd=140i,even=141i,stringu1="YPAAAA",stringu2="CYLAAA",string4="OOOOxx" 696643200000000000 +tenk unique1=5116i,unique2=8063i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=116i,twothousand=1116i,fivethous=116i,tenthous=5116i,odd=32i,even=33i,stringu1="UOAAAA",stringu2="DYLAAA",string4="VVVVxx" 696729600000000000 +tenk unique1=1746i,unique2=8064i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=746i,twothousand=1746i,fivethous=1746i,tenthous=1746i,odd=92i,even=93i,stringu1="EPAAAA",stringu2="EYLAAA",string4="AAAAxx" 696816000000000000 +tenk unique1=3216i,unique2=8065i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=216i,twothousand=1216i,fivethous=3216i,tenthous=3216i,odd=32i,even=33i,stringu1="STAAAA",stringu2="FYLAAA",string4="HHHHxx" 696902400000000000 +tenk unique1=4594i,unique2=8066i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=594i,twothousand=594i,fivethous=4594i,tenthous=4594i,odd=188i,even=189i,stringu1="SUAAAA",stringu2="GYLAAA",string4="OOOOxx" 696988800000000000 +tenk unique1=3013i,unique2=8067i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=13i,twothousand=1013i,fivethous=3013i,tenthous=3013i,odd=26i,even=27i,stringu1="XLAAAA",stringu2="HYLAAA",string4="VVVVxx" 697075200000000000 +tenk unique1=2307i,unique2=8068i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=307i,twothousand=307i,fivethous=2307i,tenthous=2307i,odd=14i,even=15i,stringu1="TKAAAA",stringu2="IYLAAA",string4="AAAAxx" 697161600000000000 +tenk unique1=7663i,unique2=8069i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=663i,twothousand=1663i,fivethous=2663i,tenthous=7663i,odd=126i,even=127i,stringu1="TIAAAA",stringu2="JYLAAA",string4="HHHHxx" 697248000000000000 +tenk unique1=8504i,unique2=8070i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=504i,twothousand=504i,fivethous=3504i,tenthous=8504i,odd=8i,even=9i,stringu1="CPAAAA",stringu2="KYLAAA",string4="OOOOxx" 697334400000000000 +tenk unique1=3683i,unique2=8071i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=683i,twothousand=1683i,fivethous=3683i,tenthous=3683i,odd=166i,even=167i,stringu1="RLAAAA",stringu2="LYLAAA",string4="VVVVxx" 697420800000000000 +tenk unique1=144i,unique2=8072i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=144i,twothousand=144i,fivethous=144i,tenthous=144i,odd=88i,even=89i,stringu1="OFAAAA",stringu2="MYLAAA",string4="AAAAxx" 697507200000000000 +tenk unique1=203i,unique2=8073i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=203i,twothousand=203i,fivethous=203i,tenthous=203i,odd=6i,even=7i,stringu1="VHAAAA",stringu2="NYLAAA",string4="HHHHxx" 697593600000000000 +tenk unique1=5255i,unique2=8074i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=255i,twothousand=1255i,fivethous=255i,tenthous=5255i,odd=110i,even=111i,stringu1="DUAAAA",stringu2="OYLAAA",string4="OOOOxx" 697680000000000000 +tenk unique1=4150i,unique2=8075i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=150i,twothousand=150i,fivethous=4150i,tenthous=4150i,odd=100i,even=101i,stringu1="QDAAAA",stringu2="PYLAAA",string4="VVVVxx" 697766400000000000 +tenk unique1=5701i,unique2=8076i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=701i,twothousand=1701i,fivethous=701i,tenthous=5701i,odd=2i,even=3i,stringu1="HLAAAA",stringu2="QYLAAA",string4="AAAAxx" 697852800000000000 +tenk unique1=7400i,unique2=8077i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=400i,twothousand=1400i,fivethous=2400i,tenthous=7400i,odd=0i,even=1i,stringu1="QYAAAA",stringu2="RYLAAA",string4="HHHHxx" 697939200000000000 +tenk unique1=8203i,unique2=8078i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=203i,twothousand=203i,fivethous=3203i,tenthous=8203i,odd=6i,even=7i,stringu1="NDAAAA",stringu2="SYLAAA",string4="OOOOxx" 698025600000000000 +tenk unique1=637i,unique2=8079i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=637i,twothousand=637i,fivethous=637i,tenthous=637i,odd=74i,even=75i,stringu1="NYAAAA",stringu2="TYLAAA",string4="VVVVxx" 698112000000000000 +tenk unique1=2898i,unique2=8080i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=898i,twothousand=898i,fivethous=2898i,tenthous=2898i,odd=196i,even=197i,stringu1="MHAAAA",stringu2="UYLAAA",string4="AAAAxx" 698198400000000000 +tenk unique1=1110i,unique2=8081i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=110i,twothousand=1110i,fivethous=1110i,tenthous=1110i,odd=20i,even=21i,stringu1="SQAAAA",stringu2="VYLAAA",string4="HHHHxx" 698284800000000000 +tenk unique1=6255i,unique2=8082i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=255i,twothousand=255i,fivethous=1255i,tenthous=6255i,odd=110i,even=111i,stringu1="PGAAAA",stringu2="WYLAAA",string4="OOOOxx" 698371200000000000 +tenk unique1=1071i,unique2=8083i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=71i,twothousand=1071i,fivethous=1071i,tenthous=1071i,odd=142i,even=143i,stringu1="FPAAAA",stringu2="XYLAAA",string4="VVVVxx" 698457600000000000 +tenk unique1=541i,unique2=8084i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=541i,twothousand=541i,fivethous=541i,tenthous=541i,odd=82i,even=83i,stringu1="VUAAAA",stringu2="YYLAAA",string4="AAAAxx" 698544000000000000 +tenk unique1=8077i,unique2=8085i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=77i,twothousand=77i,fivethous=3077i,tenthous=8077i,odd=154i,even=155i,stringu1="RYAAAA",stringu2="ZYLAAA",string4="HHHHxx" 698630400000000000 +tenk unique1=6809i,unique2=8086i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=809i,twothousand=809i,fivethous=1809i,tenthous=6809i,odd=18i,even=19i,stringu1="XBAAAA",stringu2="AZLAAA",string4="OOOOxx" 698716800000000000 +tenk unique1=4749i,unique2=8087i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=749i,twothousand=749i,fivethous=4749i,tenthous=4749i,odd=98i,even=99i,stringu1="RAAAAA",stringu2="BZLAAA",string4="VVVVxx" 698803200000000000 +tenk unique1=2886i,unique2=8088i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=886i,twothousand=886i,fivethous=2886i,tenthous=2886i,odd=172i,even=173i,stringu1="AHAAAA",stringu2="CZLAAA",string4="AAAAxx" 698889600000000000 +tenk unique1=5510i,unique2=8089i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=510i,twothousand=1510i,fivethous=510i,tenthous=5510i,odd=20i,even=21i,stringu1="YDAAAA",stringu2="DZLAAA",string4="HHHHxx" 698976000000000000 +tenk unique1=713i,unique2=8090i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=713i,twothousand=713i,fivethous=713i,tenthous=713i,odd=26i,even=27i,stringu1="LBAAAA",stringu2="EZLAAA",string4="OOOOxx" 699062400000000000 +tenk unique1=8388i,unique2=8091i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=388i,twothousand=388i,fivethous=3388i,tenthous=8388i,odd=176i,even=177i,stringu1="QKAAAA",stringu2="FZLAAA",string4="VVVVxx" 699148800000000000 +tenk unique1=9524i,unique2=8092i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=524i,twothousand=1524i,fivethous=4524i,tenthous=9524i,odd=48i,even=49i,stringu1="ICAAAA",stringu2="GZLAAA",string4="AAAAxx" 699235200000000000 +tenk unique1=9949i,unique2=8093i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=949i,twothousand=1949i,fivethous=4949i,tenthous=9949i,odd=98i,even=99i,stringu1="RSAAAA",stringu2="HZLAAA",string4="HHHHxx" 699321600000000000 +tenk unique1=885i,unique2=8094i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=885i,twothousand=885i,fivethous=885i,tenthous=885i,odd=170i,even=171i,stringu1="BIAAAA",stringu2="IZLAAA",string4="OOOOxx" 699408000000000000 +tenk unique1=8699i,unique2=8095i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=699i,twothousand=699i,fivethous=3699i,tenthous=8699i,odd=198i,even=199i,stringu1="PWAAAA",stringu2="JZLAAA",string4="VVVVxx" 699494400000000000 +tenk unique1=2232i,unique2=8096i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=232i,twothousand=232i,fivethous=2232i,tenthous=2232i,odd=64i,even=65i,stringu1="WHAAAA",stringu2="KZLAAA",string4="AAAAxx" 699580800000000000 +tenk unique1=5142i,unique2=8097i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=142i,twothousand=1142i,fivethous=142i,tenthous=5142i,odd=84i,even=85i,stringu1="UPAAAA",stringu2="LZLAAA",string4="HHHHxx" 699667200000000000 +tenk unique1=8891i,unique2=8098i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=891i,twothousand=891i,fivethous=3891i,tenthous=8891i,odd=182i,even=183i,stringu1="ZDAAAA",stringu2="MZLAAA",string4="OOOOxx" 699753600000000000 +tenk unique1=1881i,unique2=8099i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=881i,twothousand=1881i,fivethous=1881i,tenthous=1881i,odd=162i,even=163i,stringu1="JUAAAA",stringu2="NZLAAA",string4="VVVVxx" 699840000000000000 +tenk unique1=3751i,unique2=8100i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=751i,twothousand=1751i,fivethous=3751i,tenthous=3751i,odd=102i,even=103i,stringu1="HOAAAA",stringu2="OZLAAA",string4="AAAAxx" 699926400000000000 +tenk unique1=1896i,unique2=8101i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=896i,twothousand=1896i,fivethous=1896i,tenthous=1896i,odd=192i,even=193i,stringu1="YUAAAA",stringu2="PZLAAA",string4="HHHHxx" 700012800000000000 +tenk unique1=8258i,unique2=8102i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=258i,twothousand=258i,fivethous=3258i,tenthous=8258i,odd=116i,even=117i,stringu1="QFAAAA",stringu2="QZLAAA",string4="OOOOxx" 700099200000000000 +tenk unique1=3820i,unique2=8103i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=820i,twothousand=1820i,fivethous=3820i,tenthous=3820i,odd=40i,even=41i,stringu1="YQAAAA",stringu2="RZLAAA",string4="VVVVxx" 700185600000000000 +tenk unique1=6617i,unique2=8104i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=617i,twothousand=617i,fivethous=1617i,tenthous=6617i,odd=34i,even=35i,stringu1="NUAAAA",stringu2="SZLAAA",string4="AAAAxx" 700272000000000000 +tenk unique1=5100i,unique2=8105i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=100i,twothousand=1100i,fivethous=100i,tenthous=5100i,odd=0i,even=1i,stringu1="EOAAAA",stringu2="TZLAAA",string4="HHHHxx" 700358400000000000 +tenk unique1=4277i,unique2=8106i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=277i,twothousand=277i,fivethous=4277i,tenthous=4277i,odd=154i,even=155i,stringu1="NIAAAA",stringu2="UZLAAA",string4="OOOOxx" 700444800000000000 +tenk unique1=2498i,unique2=8107i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=498i,twothousand=498i,fivethous=2498i,tenthous=2498i,odd=196i,even=197i,stringu1="CSAAAA",stringu2="VZLAAA",string4="VVVVxx" 700531200000000000 +tenk unique1=4343i,unique2=8108i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=343i,twothousand=343i,fivethous=4343i,tenthous=4343i,odd=86i,even=87i,stringu1="BLAAAA",stringu2="WZLAAA",string4="AAAAxx" 700617600000000000 +tenk unique1=8319i,unique2=8109i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=319i,twothousand=319i,fivethous=3319i,tenthous=8319i,odd=38i,even=39i,stringu1="ZHAAAA",stringu2="XZLAAA",string4="HHHHxx" 700704000000000000 +tenk unique1=4803i,unique2=8110i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=803i,twothousand=803i,fivethous=4803i,tenthous=4803i,odd=6i,even=7i,stringu1="TCAAAA",stringu2="YZLAAA",string4="OOOOxx" 700790400000000000 +tenk unique1=3100i,unique2=8111i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=100i,twothousand=1100i,fivethous=3100i,tenthous=3100i,odd=0i,even=1i,stringu1="GPAAAA",stringu2="ZZLAAA",string4="VVVVxx" 700876800000000000 +tenk unique1=428i,unique2=8112i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=428i,twothousand=428i,fivethous=428i,tenthous=428i,odd=56i,even=57i,stringu1="MQAAAA",stringu2="AAMAAA",string4="AAAAxx" 700963200000000000 +tenk unique1=2811i,unique2=8113i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=811i,twothousand=811i,fivethous=2811i,tenthous=2811i,odd=22i,even=23i,stringu1="DEAAAA",stringu2="BAMAAA",string4="HHHHxx" 701049600000000000 +tenk unique1=2989i,unique2=8114i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=989i,twothousand=989i,fivethous=2989i,tenthous=2989i,odd=178i,even=179i,stringu1="ZKAAAA",stringu2="CAMAAA",string4="OOOOxx" 701136000000000000 +tenk unique1=1100i,unique2=8115i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=100i,twothousand=1100i,fivethous=1100i,tenthous=1100i,odd=0i,even=1i,stringu1="IQAAAA",stringu2="DAMAAA",string4="VVVVxx" 701222400000000000 +tenk unique1=6586i,unique2=8116i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=586i,twothousand=586i,fivethous=1586i,tenthous=6586i,odd=172i,even=173i,stringu1="ITAAAA",stringu2="EAMAAA",string4="AAAAxx" 701308800000000000 +tenk unique1=3124i,unique2=8117i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=124i,twothousand=1124i,fivethous=3124i,tenthous=3124i,odd=48i,even=49i,stringu1="EQAAAA",stringu2="FAMAAA",string4="HHHHxx" 701395200000000000 +tenk unique1=1635i,unique2=8118i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=635i,twothousand=1635i,fivethous=1635i,tenthous=1635i,odd=70i,even=71i,stringu1="XKAAAA",stringu2="GAMAAA",string4="OOOOxx" 701481600000000000 +tenk unique1=3888i,unique2=8119i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=888i,twothousand=1888i,fivethous=3888i,tenthous=3888i,odd=176i,even=177i,stringu1="OTAAAA",stringu2="HAMAAA",string4="VVVVxx" 701568000000000000 +tenk unique1=8369i,unique2=8120i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=369i,twothousand=369i,fivethous=3369i,tenthous=8369i,odd=138i,even=139i,stringu1="XJAAAA",stringu2="IAMAAA",string4="AAAAxx" 701654400000000000 +tenk unique1=3148i,unique2=8121i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=148i,twothousand=1148i,fivethous=3148i,tenthous=3148i,odd=96i,even=97i,stringu1="CRAAAA",stringu2="JAMAAA",string4="HHHHxx" 701740800000000000 +tenk unique1=2842i,unique2=8122i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=842i,twothousand=842i,fivethous=2842i,tenthous=2842i,odd=84i,even=85i,stringu1="IFAAAA",stringu2="KAMAAA",string4="OOOOxx" 701827200000000000 +tenk unique1=4965i,unique2=8123i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=965i,twothousand=965i,fivethous=4965i,tenthous=4965i,odd=130i,even=131i,stringu1="ZIAAAA",stringu2="LAMAAA",string4="VVVVxx" 701913600000000000 +tenk unique1=3742i,unique2=8124i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=742i,twothousand=1742i,fivethous=3742i,tenthous=3742i,odd=84i,even=85i,stringu1="YNAAAA",stringu2="MAMAAA",string4="AAAAxx" 702000000000000000 +tenk unique1=5196i,unique2=8125i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=196i,twothousand=1196i,fivethous=196i,tenthous=5196i,odd=192i,even=193i,stringu1="WRAAAA",stringu2="NAMAAA",string4="HHHHxx" 702086400000000000 +tenk unique1=9105i,unique2=8126i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=105i,twothousand=1105i,fivethous=4105i,tenthous=9105i,odd=10i,even=11i,stringu1="FMAAAA",stringu2="OAMAAA",string4="OOOOxx" 702172800000000000 +tenk unique1=6806i,unique2=8127i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=806i,twothousand=806i,fivethous=1806i,tenthous=6806i,odd=12i,even=13i,stringu1="UBAAAA",stringu2="PAMAAA",string4="VVVVxx" 702259200000000000 +tenk unique1=5849i,unique2=8128i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=849i,twothousand=1849i,fivethous=849i,tenthous=5849i,odd=98i,even=99i,stringu1="ZQAAAA",stringu2="QAMAAA",string4="AAAAxx" 702345600000000000 +tenk unique1=6504i,unique2=8129i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=504i,twothousand=504i,fivethous=1504i,tenthous=6504i,odd=8i,even=9i,stringu1="EQAAAA",stringu2="RAMAAA",string4="HHHHxx" 702432000000000000 +tenk unique1=9841i,unique2=8130i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=841i,twothousand=1841i,fivethous=4841i,tenthous=9841i,odd=82i,even=83i,stringu1="NOAAAA",stringu2="SAMAAA",string4="OOOOxx" 702518400000000000 +tenk unique1=457i,unique2=8131i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=457i,twothousand=457i,fivethous=457i,tenthous=457i,odd=114i,even=115i,stringu1="PRAAAA",stringu2="TAMAAA",string4="VVVVxx" 702604800000000000 +tenk unique1=8856i,unique2=8132i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=856i,twothousand=856i,fivethous=3856i,tenthous=8856i,odd=112i,even=113i,stringu1="QCAAAA",stringu2="UAMAAA",string4="AAAAxx" 702691200000000000 +tenk unique1=8043i,unique2=8133i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=43i,twothousand=43i,fivethous=3043i,tenthous=8043i,odd=86i,even=87i,stringu1="JXAAAA",stringu2="VAMAAA",string4="HHHHxx" 702777600000000000 +tenk unique1=5933i,unique2=8134i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=933i,twothousand=1933i,fivethous=933i,tenthous=5933i,odd=66i,even=67i,stringu1="FUAAAA",stringu2="WAMAAA",string4="OOOOxx" 702864000000000000 +tenk unique1=5725i,unique2=8135i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=725i,twothousand=1725i,fivethous=725i,tenthous=5725i,odd=50i,even=51i,stringu1="FMAAAA",stringu2="XAMAAA",string4="VVVVxx" 702950400000000000 +tenk unique1=8607i,unique2=8136i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=607i,twothousand=607i,fivethous=3607i,tenthous=8607i,odd=14i,even=15i,stringu1="BTAAAA",stringu2="YAMAAA",string4="AAAAxx" 703036800000000000 +tenk unique1=9280i,unique2=8137i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=280i,twothousand=1280i,fivethous=4280i,tenthous=9280i,odd=160i,even=161i,stringu1="YSAAAA",stringu2="ZAMAAA",string4="HHHHxx" 703123200000000000 +tenk unique1=6017i,unique2=8138i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=17i,twothousand=17i,fivethous=1017i,tenthous=6017i,odd=34i,even=35i,stringu1="LXAAAA",stringu2="ABMAAA",string4="OOOOxx" 703209600000000000 +tenk unique1=4946i,unique2=8139i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=946i,twothousand=946i,fivethous=4946i,tenthous=4946i,odd=92i,even=93i,stringu1="GIAAAA",stringu2="BBMAAA",string4="VVVVxx" 703296000000000000 +tenk unique1=7373i,unique2=8140i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=373i,twothousand=1373i,fivethous=2373i,tenthous=7373i,odd=146i,even=147i,stringu1="PXAAAA",stringu2="CBMAAA",string4="AAAAxx" 703382400000000000 +tenk unique1=8096i,unique2=8141i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=96i,twothousand=96i,fivethous=3096i,tenthous=8096i,odd=192i,even=193i,stringu1="KZAAAA",stringu2="DBMAAA",string4="HHHHxx" 703468800000000000 +tenk unique1=3178i,unique2=8142i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=178i,twothousand=1178i,fivethous=3178i,tenthous=3178i,odd=156i,even=157i,stringu1="GSAAAA",stringu2="EBMAAA",string4="OOOOxx" 703555200000000000 +tenk unique1=1849i,unique2=8143i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=849i,twothousand=1849i,fivethous=1849i,tenthous=1849i,odd=98i,even=99i,stringu1="DTAAAA",stringu2="FBMAAA",string4="VVVVxx" 703641600000000000 +tenk unique1=8813i,unique2=8144i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=813i,twothousand=813i,fivethous=3813i,tenthous=8813i,odd=26i,even=27i,stringu1="ZAAAAA",stringu2="GBMAAA",string4="AAAAxx" 703728000000000000 +tenk unique1=460i,unique2=8145i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=460i,twothousand=460i,fivethous=460i,tenthous=460i,odd=120i,even=121i,stringu1="SRAAAA",stringu2="HBMAAA",string4="HHHHxx" 703814400000000000 +tenk unique1=7756i,unique2=8146i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=756i,twothousand=1756i,fivethous=2756i,tenthous=7756i,odd=112i,even=113i,stringu1="IMAAAA",stringu2="IBMAAA",string4="OOOOxx" 703900800000000000 +tenk unique1=4425i,unique2=8147i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=425i,twothousand=425i,fivethous=4425i,tenthous=4425i,odd=50i,even=51i,stringu1="FOAAAA",stringu2="JBMAAA",string4="VVVVxx" 703987200000000000 +tenk unique1=1602i,unique2=8148i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=602i,twothousand=1602i,fivethous=1602i,tenthous=1602i,odd=4i,even=5i,stringu1="QJAAAA",stringu2="KBMAAA",string4="AAAAxx" 704073600000000000 +tenk unique1=5981i,unique2=8149i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=981i,twothousand=1981i,fivethous=981i,tenthous=5981i,odd=162i,even=163i,stringu1="BWAAAA",stringu2="LBMAAA",string4="HHHHxx" 704160000000000000 +tenk unique1=8139i,unique2=8150i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=139i,twothousand=139i,fivethous=3139i,tenthous=8139i,odd=78i,even=79i,stringu1="BBAAAA",stringu2="MBMAAA",string4="OOOOxx" 704246400000000000 +tenk unique1=754i,unique2=8151i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=754i,twothousand=754i,fivethous=754i,tenthous=754i,odd=108i,even=109i,stringu1="ADAAAA",stringu2="NBMAAA",string4="VVVVxx" 704332800000000000 +tenk unique1=26i,unique2=8152i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=26i,twothousand=26i,fivethous=26i,tenthous=26i,odd=52i,even=53i,stringu1="ABAAAA",stringu2="OBMAAA",string4="AAAAxx" 704419200000000000 +tenk unique1=106i,unique2=8153i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=106i,twothousand=106i,fivethous=106i,tenthous=106i,odd=12i,even=13i,stringu1="CEAAAA",stringu2="PBMAAA",string4="HHHHxx" 704505600000000000 +tenk unique1=7465i,unique2=8154i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=465i,twothousand=1465i,fivethous=2465i,tenthous=7465i,odd=130i,even=131i,stringu1="DBAAAA",stringu2="QBMAAA",string4="OOOOxx" 704592000000000000 +tenk unique1=1048i,unique2=8155i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=48i,twothousand=1048i,fivethous=1048i,tenthous=1048i,odd=96i,even=97i,stringu1="IOAAAA",stringu2="RBMAAA",string4="VVVVxx" 704678400000000000 +tenk unique1=2303i,unique2=8156i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=303i,twothousand=303i,fivethous=2303i,tenthous=2303i,odd=6i,even=7i,stringu1="PKAAAA",stringu2="SBMAAA",string4="AAAAxx" 704764800000000000 +tenk unique1=5794i,unique2=8157i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=794i,twothousand=1794i,fivethous=794i,tenthous=5794i,odd=188i,even=189i,stringu1="WOAAAA",stringu2="TBMAAA",string4="HHHHxx" 704851200000000000 +tenk unique1=3321i,unique2=8158i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=321i,twothousand=1321i,fivethous=3321i,tenthous=3321i,odd=42i,even=43i,stringu1="TXAAAA",stringu2="UBMAAA",string4="OOOOxx" 704937600000000000 +tenk unique1=6122i,unique2=8159i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=122i,twothousand=122i,fivethous=1122i,tenthous=6122i,odd=44i,even=45i,stringu1="MBAAAA",stringu2="VBMAAA",string4="VVVVxx" 705024000000000000 +tenk unique1=6474i,unique2=8160i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=474i,twothousand=474i,fivethous=1474i,tenthous=6474i,odd=148i,even=149i,stringu1="APAAAA",stringu2="WBMAAA",string4="AAAAxx" 705110400000000000 +tenk unique1=827i,unique2=8161i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=827i,twothousand=827i,fivethous=827i,tenthous=827i,odd=54i,even=55i,stringu1="VFAAAA",stringu2="XBMAAA",string4="HHHHxx" 705196800000000000 +tenk unique1=6616i,unique2=8162i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=616i,twothousand=616i,fivethous=1616i,tenthous=6616i,odd=32i,even=33i,stringu1="MUAAAA",stringu2="YBMAAA",string4="OOOOxx" 705283200000000000 +tenk unique1=2131i,unique2=8163i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=131i,twothousand=131i,fivethous=2131i,tenthous=2131i,odd=62i,even=63i,stringu1="ZDAAAA",stringu2="ZBMAAA",string4="VVVVxx" 705369600000000000 +tenk unique1=5483i,unique2=8164i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=483i,twothousand=1483i,fivethous=483i,tenthous=5483i,odd=166i,even=167i,stringu1="XCAAAA",stringu2="ACMAAA",string4="AAAAxx" 705456000000000000 +tenk unique1=606i,unique2=8165i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=606i,twothousand=606i,fivethous=606i,tenthous=606i,odd=12i,even=13i,stringu1="IXAAAA",stringu2="BCMAAA",string4="HHHHxx" 705542400000000000 +tenk unique1=922i,unique2=8166i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=922i,twothousand=922i,fivethous=922i,tenthous=922i,odd=44i,even=45i,stringu1="MJAAAA",stringu2="CCMAAA",string4="OOOOxx" 705628800000000000 +tenk unique1=8475i,unique2=8167i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=475i,twothousand=475i,fivethous=3475i,tenthous=8475i,odd=150i,even=151i,stringu1="ZNAAAA",stringu2="DCMAAA",string4="VVVVxx" 705715200000000000 +tenk unique1=7645i,unique2=8168i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=645i,twothousand=1645i,fivethous=2645i,tenthous=7645i,odd=90i,even=91i,stringu1="BIAAAA",stringu2="ECMAAA",string4="AAAAxx" 705801600000000000 +tenk unique1=5097i,unique2=8169i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=97i,twothousand=1097i,fivethous=97i,tenthous=5097i,odd=194i,even=195i,stringu1="BOAAAA",stringu2="FCMAAA",string4="HHHHxx" 705888000000000000 +tenk unique1=5377i,unique2=8170i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=377i,twothousand=1377i,fivethous=377i,tenthous=5377i,odd=154i,even=155i,stringu1="VYAAAA",stringu2="GCMAAA",string4="OOOOxx" 705974400000000000 +tenk unique1=6116i,unique2=8171i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=116i,twothousand=116i,fivethous=1116i,tenthous=6116i,odd=32i,even=33i,stringu1="GBAAAA",stringu2="HCMAAA",string4="VVVVxx" 706060800000000000 +tenk unique1=8674i,unique2=8172i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=674i,twothousand=674i,fivethous=3674i,tenthous=8674i,odd=148i,even=149i,stringu1="QVAAAA",stringu2="ICMAAA",string4="AAAAxx" 706147200000000000 +tenk unique1=8063i,unique2=8173i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=63i,twothousand=63i,fivethous=3063i,tenthous=8063i,odd=126i,even=127i,stringu1="DYAAAA",stringu2="JCMAAA",string4="HHHHxx" 706233600000000000 +tenk unique1=5271i,unique2=8174i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=271i,twothousand=1271i,fivethous=271i,tenthous=5271i,odd=142i,even=143i,stringu1="TUAAAA",stringu2="KCMAAA",string4="OOOOxx" 706320000000000000 +tenk unique1=1619i,unique2=8175i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=619i,twothousand=1619i,fivethous=1619i,tenthous=1619i,odd=38i,even=39i,stringu1="HKAAAA",stringu2="LCMAAA",string4="VVVVxx" 706406400000000000 +tenk unique1=6419i,unique2=8176i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=419i,twothousand=419i,fivethous=1419i,tenthous=6419i,odd=38i,even=39i,stringu1="XMAAAA",stringu2="MCMAAA",string4="AAAAxx" 706492800000000000 +tenk unique1=7651i,unique2=8177i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=651i,twothousand=1651i,fivethous=2651i,tenthous=7651i,odd=102i,even=103i,stringu1="HIAAAA",stringu2="NCMAAA",string4="HHHHxx" 706579200000000000 +tenk unique1=2897i,unique2=8178i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=897i,twothousand=897i,fivethous=2897i,tenthous=2897i,odd=194i,even=195i,stringu1="LHAAAA",stringu2="OCMAAA",string4="OOOOxx" 706665600000000000 +tenk unique1=8148i,unique2=8179i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=148i,twothousand=148i,fivethous=3148i,tenthous=8148i,odd=96i,even=97i,stringu1="KBAAAA",stringu2="PCMAAA",string4="VVVVxx" 706752000000000000 +tenk unique1=7461i,unique2=8180i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=461i,twothousand=1461i,fivethous=2461i,tenthous=7461i,odd=122i,even=123i,stringu1="ZAAAAA",stringu2="QCMAAA",string4="AAAAxx" 706838400000000000 +tenk unique1=9186i,unique2=8181i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=186i,twothousand=1186i,fivethous=4186i,tenthous=9186i,odd=172i,even=173i,stringu1="IPAAAA",stringu2="RCMAAA",string4="HHHHxx" 706924800000000000 +tenk unique1=7127i,unique2=8182i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=127i,twothousand=1127i,fivethous=2127i,tenthous=7127i,odd=54i,even=55i,stringu1="DOAAAA",stringu2="SCMAAA",string4="OOOOxx" 707011200000000000 +tenk unique1=8233i,unique2=8183i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=233i,twothousand=233i,fivethous=3233i,tenthous=8233i,odd=66i,even=67i,stringu1="REAAAA",stringu2="TCMAAA",string4="VVVVxx" 707097600000000000 +tenk unique1=9651i,unique2=8184i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=651i,twothousand=1651i,fivethous=4651i,tenthous=9651i,odd=102i,even=103i,stringu1="FHAAAA",stringu2="UCMAAA",string4="AAAAxx" 707184000000000000 +tenk unique1=6746i,unique2=8185i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=746i,twothousand=746i,fivethous=1746i,tenthous=6746i,odd=92i,even=93i,stringu1="MZAAAA",stringu2="VCMAAA",string4="HHHHxx" 707270400000000000 +tenk unique1=7835i,unique2=8186i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=835i,twothousand=1835i,fivethous=2835i,tenthous=7835i,odd=70i,even=71i,stringu1="JPAAAA",stringu2="WCMAAA",string4="OOOOxx" 707356800000000000 +tenk unique1=8815i,unique2=8187i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=815i,twothousand=815i,fivethous=3815i,tenthous=8815i,odd=30i,even=31i,stringu1="BBAAAA",stringu2="XCMAAA",string4="VVVVxx" 707443200000000000 +tenk unique1=6398i,unique2=8188i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=398i,twothousand=398i,fivethous=1398i,tenthous=6398i,odd=196i,even=197i,stringu1="CMAAAA",stringu2="YCMAAA",string4="AAAAxx" 707529600000000000 +tenk unique1=5344i,unique2=8189i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=344i,twothousand=1344i,fivethous=344i,tenthous=5344i,odd=88i,even=89i,stringu1="OXAAAA",stringu2="ZCMAAA",string4="HHHHxx" 707616000000000000 +tenk unique1=8209i,unique2=8190i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=209i,twothousand=209i,fivethous=3209i,tenthous=8209i,odd=18i,even=19i,stringu1="TDAAAA",stringu2="ADMAAA",string4="OOOOxx" 707702400000000000 +tenk unique1=8444i,unique2=8191i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=444i,twothousand=444i,fivethous=3444i,tenthous=8444i,odd=88i,even=89i,stringu1="UMAAAA",stringu2="BDMAAA",string4="VVVVxx" 707788800000000000 +tenk unique1=5669i,unique2=8192i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=669i,twothousand=1669i,fivethous=669i,tenthous=5669i,odd=138i,even=139i,stringu1="BKAAAA",stringu2="CDMAAA",string4="AAAAxx" 707875200000000000 +tenk unique1=2455i,unique2=8193i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=455i,twothousand=455i,fivethous=2455i,tenthous=2455i,odd=110i,even=111i,stringu1="LQAAAA",stringu2="DDMAAA",string4="HHHHxx" 707961600000000000 +tenk unique1=6767i,unique2=8194i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=767i,twothousand=767i,fivethous=1767i,tenthous=6767i,odd=134i,even=135i,stringu1="HAAAAA",stringu2="EDMAAA",string4="OOOOxx" 708048000000000000 +tenk unique1=135i,unique2=8195i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=135i,twothousand=135i,fivethous=135i,tenthous=135i,odd=70i,even=71i,stringu1="FFAAAA",stringu2="FDMAAA",string4="VVVVxx" 708134400000000000 +tenk unique1=3503i,unique2=8196i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=503i,twothousand=1503i,fivethous=3503i,tenthous=3503i,odd=6i,even=7i,stringu1="TEAAAA",stringu2="GDMAAA",string4="AAAAxx" 708220800000000000 +tenk unique1=6102i,unique2=8197i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=102i,twothousand=102i,fivethous=1102i,tenthous=6102i,odd=4i,even=5i,stringu1="SAAAAA",stringu2="HDMAAA",string4="HHHHxx" 708307200000000000 +tenk unique1=7136i,unique2=8198i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=136i,twothousand=1136i,fivethous=2136i,tenthous=7136i,odd=72i,even=73i,stringu1="MOAAAA",stringu2="IDMAAA",string4="OOOOxx" 708393600000000000 +tenk unique1=4933i,unique2=8199i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=933i,twothousand=933i,fivethous=4933i,tenthous=4933i,odd=66i,even=67i,stringu1="THAAAA",stringu2="JDMAAA",string4="VVVVxx" 708480000000000000 +tenk unique1=8804i,unique2=8200i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=804i,twothousand=804i,fivethous=3804i,tenthous=8804i,odd=8i,even=9i,stringu1="QAAAAA",stringu2="KDMAAA",string4="AAAAxx" 708566400000000000 +tenk unique1=3760i,unique2=8201i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=760i,twothousand=1760i,fivethous=3760i,tenthous=3760i,odd=120i,even=121i,stringu1="QOAAAA",stringu2="LDMAAA",string4="HHHHxx" 708652800000000000 +tenk unique1=8603i,unique2=8202i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=603i,twothousand=603i,fivethous=3603i,tenthous=8603i,odd=6i,even=7i,stringu1="XSAAAA",stringu2="MDMAAA",string4="OOOOxx" 708739200000000000 +tenk unique1=7411i,unique2=8203i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=411i,twothousand=1411i,fivethous=2411i,tenthous=7411i,odd=22i,even=23i,stringu1="BZAAAA",stringu2="NDMAAA",string4="VVVVxx" 708825600000000000 +tenk unique1=834i,unique2=8204i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=834i,twothousand=834i,fivethous=834i,tenthous=834i,odd=68i,even=69i,stringu1="CGAAAA",stringu2="ODMAAA",string4="AAAAxx" 708912000000000000 +tenk unique1=7385i,unique2=8205i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=385i,twothousand=1385i,fivethous=2385i,tenthous=7385i,odd=170i,even=171i,stringu1="BYAAAA",stringu2="PDMAAA",string4="HHHHxx" 708998400000000000 +tenk unique1=3696i,unique2=8206i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=696i,twothousand=1696i,fivethous=3696i,tenthous=3696i,odd=192i,even=193i,stringu1="EMAAAA",stringu2="QDMAAA",string4="OOOOxx" 709084800000000000 +tenk unique1=8720i,unique2=8207i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=720i,twothousand=720i,fivethous=3720i,tenthous=8720i,odd=40i,even=41i,stringu1="KXAAAA",stringu2="RDMAAA",string4="VVVVxx" 709171200000000000 +tenk unique1=4539i,unique2=8208i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=539i,twothousand=539i,fivethous=4539i,tenthous=4539i,odd=78i,even=79i,stringu1="PSAAAA",stringu2="SDMAAA",string4="AAAAxx" 709257600000000000 +tenk unique1=9837i,unique2=8209i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=837i,twothousand=1837i,fivethous=4837i,tenthous=9837i,odd=74i,even=75i,stringu1="JOAAAA",stringu2="TDMAAA",string4="HHHHxx" 709344000000000000 +tenk unique1=8595i,unique2=8210i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=595i,twothousand=595i,fivethous=3595i,tenthous=8595i,odd=190i,even=191i,stringu1="PSAAAA",stringu2="UDMAAA",string4="OOOOxx" 709430400000000000 +tenk unique1=3673i,unique2=8211i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=673i,twothousand=1673i,fivethous=3673i,tenthous=3673i,odd=146i,even=147i,stringu1="HLAAAA",stringu2="VDMAAA",string4="VVVVxx" 709516800000000000 +tenk unique1=475i,unique2=8212i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=475i,twothousand=475i,fivethous=475i,tenthous=475i,odd=150i,even=151i,stringu1="HSAAAA",stringu2="WDMAAA",string4="AAAAxx" 709603200000000000 +tenk unique1=2256i,unique2=8213i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=256i,twothousand=256i,fivethous=2256i,tenthous=2256i,odd=112i,even=113i,stringu1="UIAAAA",stringu2="XDMAAA",string4="HHHHxx" 709689600000000000 +tenk unique1=6349i,unique2=8214i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=349i,twothousand=349i,fivethous=1349i,tenthous=6349i,odd=98i,even=99i,stringu1="FKAAAA",stringu2="YDMAAA",string4="OOOOxx" 709776000000000000 +tenk unique1=9968i,unique2=8215i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=968i,twothousand=1968i,fivethous=4968i,tenthous=9968i,odd=136i,even=137i,stringu1="KTAAAA",stringu2="ZDMAAA",string4="VVVVxx" 709862400000000000 +tenk unique1=7261i,unique2=8216i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=261i,twothousand=1261i,fivethous=2261i,tenthous=7261i,odd=122i,even=123i,stringu1="HTAAAA",stringu2="AEMAAA",string4="AAAAxx" 709948800000000000 +tenk unique1=5799i,unique2=8217i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=799i,twothousand=1799i,fivethous=799i,tenthous=5799i,odd=198i,even=199i,stringu1="BPAAAA",stringu2="BEMAAA",string4="HHHHxx" 710035200000000000 +tenk unique1=8159i,unique2=8218i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=159i,twothousand=159i,fivethous=3159i,tenthous=8159i,odd=118i,even=119i,stringu1="VBAAAA",stringu2="CEMAAA",string4="OOOOxx" 710121600000000000 +tenk unique1=92i,unique2=8219i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=92i,twothousand=92i,fivethous=92i,tenthous=92i,odd=184i,even=185i,stringu1="ODAAAA",stringu2="DEMAAA",string4="VVVVxx" 710208000000000000 +tenk unique1=5927i,unique2=8220i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=927i,twothousand=1927i,fivethous=927i,tenthous=5927i,odd=54i,even=55i,stringu1="ZTAAAA",stringu2="EEMAAA",string4="AAAAxx" 710294400000000000 +tenk unique1=7925i,unique2=8221i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=925i,twothousand=1925i,fivethous=2925i,tenthous=7925i,odd=50i,even=51i,stringu1="VSAAAA",stringu2="FEMAAA",string4="HHHHxx" 710380800000000000 +tenk unique1=5836i,unique2=8222i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=836i,twothousand=1836i,fivethous=836i,tenthous=5836i,odd=72i,even=73i,stringu1="MQAAAA",stringu2="GEMAAA",string4="OOOOxx" 710467200000000000 +tenk unique1=7935i,unique2=8223i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=935i,twothousand=1935i,fivethous=2935i,tenthous=7935i,odd=70i,even=71i,stringu1="FTAAAA",stringu2="HEMAAA",string4="VVVVxx" 710553600000000000 +tenk unique1=5505i,unique2=8224i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=505i,twothousand=1505i,fivethous=505i,tenthous=5505i,odd=10i,even=11i,stringu1="TDAAAA",stringu2="IEMAAA",string4="AAAAxx" 710640000000000000 +tenk unique1=5882i,unique2=8225i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=882i,twothousand=1882i,fivethous=882i,tenthous=5882i,odd=164i,even=165i,stringu1="GSAAAA",stringu2="JEMAAA",string4="HHHHxx" 710726400000000000 +tenk unique1=4411i,unique2=8226i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=411i,twothousand=411i,fivethous=4411i,tenthous=4411i,odd=22i,even=23i,stringu1="RNAAAA",stringu2="KEMAAA",string4="OOOOxx" 710812800000000000 +tenk unique1=64i,unique2=8227i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=64i,twothousand=64i,fivethous=64i,tenthous=64i,odd=128i,even=129i,stringu1="MCAAAA",stringu2="LEMAAA",string4="VVVVxx" 710899200000000000 +tenk unique1=2851i,unique2=8228i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=851i,twothousand=851i,fivethous=2851i,tenthous=2851i,odd=102i,even=103i,stringu1="RFAAAA",stringu2="MEMAAA",string4="AAAAxx" 710985600000000000 +tenk unique1=1665i,unique2=8229i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=665i,twothousand=1665i,fivethous=1665i,tenthous=1665i,odd=130i,even=131i,stringu1="BMAAAA",stringu2="NEMAAA",string4="HHHHxx" 711072000000000000 +tenk unique1=2895i,unique2=8230i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=895i,twothousand=895i,fivethous=2895i,tenthous=2895i,odd=190i,even=191i,stringu1="JHAAAA",stringu2="OEMAAA",string4="OOOOxx" 711158400000000000 +tenk unique1=2210i,unique2=8231i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=210i,twothousand=210i,fivethous=2210i,tenthous=2210i,odd=20i,even=21i,stringu1="AHAAAA",stringu2="PEMAAA",string4="VVVVxx" 711244800000000000 +tenk unique1=9873i,unique2=8232i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=873i,twothousand=1873i,fivethous=4873i,tenthous=9873i,odd=146i,even=147i,stringu1="TPAAAA",stringu2="QEMAAA",string4="AAAAxx" 711331200000000000 +tenk unique1=5402i,unique2=8233i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=402i,twothousand=1402i,fivethous=402i,tenthous=5402i,odd=4i,even=5i,stringu1="UZAAAA",stringu2="REMAAA",string4="HHHHxx" 711417600000000000 +tenk unique1=285i,unique2=8234i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=285i,twothousand=285i,fivethous=285i,tenthous=285i,odd=170i,even=171i,stringu1="ZKAAAA",stringu2="SEMAAA",string4="OOOOxx" 711504000000000000 +tenk unique1=8545i,unique2=8235i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=545i,twothousand=545i,fivethous=3545i,tenthous=8545i,odd=90i,even=91i,stringu1="RQAAAA",stringu2="TEMAAA",string4="VVVVxx" 711590400000000000 +tenk unique1=5328i,unique2=8236i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=328i,twothousand=1328i,fivethous=328i,tenthous=5328i,odd=56i,even=57i,stringu1="YWAAAA",stringu2="UEMAAA",string4="AAAAxx" 711676800000000000 +tenk unique1=733i,unique2=8237i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=733i,twothousand=733i,fivethous=733i,tenthous=733i,odd=66i,even=67i,stringu1="FCAAAA",stringu2="VEMAAA",string4="HHHHxx" 711763200000000000 +tenk unique1=7726i,unique2=8238i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=726i,twothousand=1726i,fivethous=2726i,tenthous=7726i,odd=52i,even=53i,stringu1="ELAAAA",stringu2="WEMAAA",string4="OOOOxx" 711849600000000000 +tenk unique1=5418i,unique2=8239i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=418i,twothousand=1418i,fivethous=418i,tenthous=5418i,odd=36i,even=37i,stringu1="KAAAAA",stringu2="XEMAAA",string4="VVVVxx" 711936000000000000 +tenk unique1=7761i,unique2=8240i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=761i,twothousand=1761i,fivethous=2761i,tenthous=7761i,odd=122i,even=123i,stringu1="NMAAAA",stringu2="YEMAAA",string4="AAAAxx" 712022400000000000 +tenk unique1=9263i,unique2=8241i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=263i,twothousand=1263i,fivethous=4263i,tenthous=9263i,odd=126i,even=127i,stringu1="HSAAAA",stringu2="ZEMAAA",string4="HHHHxx" 712108800000000000 +tenk unique1=5579i,unique2=8242i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=579i,twothousand=1579i,fivethous=579i,tenthous=5579i,odd=158i,even=159i,stringu1="PGAAAA",stringu2="AFMAAA",string4="OOOOxx" 712195200000000000 +tenk unique1=5434i,unique2=8243i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=434i,twothousand=1434i,fivethous=434i,tenthous=5434i,odd=68i,even=69i,stringu1="ABAAAA",stringu2="BFMAAA",string4="VVVVxx" 712281600000000000 +tenk unique1=5230i,unique2=8244i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=230i,twothousand=1230i,fivethous=230i,tenthous=5230i,odd=60i,even=61i,stringu1="ETAAAA",stringu2="CFMAAA",string4="AAAAxx" 712368000000000000 +tenk unique1=9981i,unique2=8245i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=981i,twothousand=1981i,fivethous=4981i,tenthous=9981i,odd=162i,even=163i,stringu1="XTAAAA",stringu2="DFMAAA",string4="HHHHxx" 712454400000000000 +tenk unique1=5830i,unique2=8246i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=830i,twothousand=1830i,fivethous=830i,tenthous=5830i,odd=60i,even=61i,stringu1="GQAAAA",stringu2="EFMAAA",string4="OOOOxx" 712540800000000000 +tenk unique1=128i,unique2=8247i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=128i,twothousand=128i,fivethous=128i,tenthous=128i,odd=56i,even=57i,stringu1="YEAAAA",stringu2="FFMAAA",string4="VVVVxx" 712627200000000000 +tenk unique1=2734i,unique2=8248i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=734i,twothousand=734i,fivethous=2734i,tenthous=2734i,odd=68i,even=69i,stringu1="EBAAAA",stringu2="GFMAAA",string4="AAAAxx" 712713600000000000 +tenk unique1=4537i,unique2=8249i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=537i,twothousand=537i,fivethous=4537i,tenthous=4537i,odd=74i,even=75i,stringu1="NSAAAA",stringu2="HFMAAA",string4="HHHHxx" 712800000000000000 +tenk unique1=3899i,unique2=8250i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=899i,twothousand=1899i,fivethous=3899i,tenthous=3899i,odd=198i,even=199i,stringu1="ZTAAAA",stringu2="IFMAAA",string4="OOOOxx" 712886400000000000 +tenk unique1=1000i,unique2=8251i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=1000i,fivethous=1000i,tenthous=1000i,odd=0i,even=1i,stringu1="MMAAAA",stringu2="JFMAAA",string4="VVVVxx" 712972800000000000 +tenk unique1=9896i,unique2=8252i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=896i,twothousand=1896i,fivethous=4896i,tenthous=9896i,odd=192i,even=193i,stringu1="QQAAAA",stringu2="KFMAAA",string4="AAAAxx" 713059200000000000 +tenk unique1=3640i,unique2=8253i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=640i,twothousand=1640i,fivethous=3640i,tenthous=3640i,odd=80i,even=81i,stringu1="AKAAAA",stringu2="LFMAAA",string4="HHHHxx" 713145600000000000 +tenk unique1=2568i,unique2=8254i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=568i,twothousand=568i,fivethous=2568i,tenthous=2568i,odd=136i,even=137i,stringu1="UUAAAA",stringu2="MFMAAA",string4="OOOOxx" 713232000000000000 +tenk unique1=2026i,unique2=8255i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=26i,twothousand=26i,fivethous=2026i,tenthous=2026i,odd=52i,even=53i,stringu1="YZAAAA",stringu2="NFMAAA",string4="VVVVxx" 713318400000000000 +tenk unique1=3955i,unique2=8256i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=955i,twothousand=1955i,fivethous=3955i,tenthous=3955i,odd=110i,even=111i,stringu1="DWAAAA",stringu2="OFMAAA",string4="AAAAxx" 713404800000000000 +tenk unique1=7152i,unique2=8257i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=152i,twothousand=1152i,fivethous=2152i,tenthous=7152i,odd=104i,even=105i,stringu1="CPAAAA",stringu2="PFMAAA",string4="HHHHxx" 713491200000000000 +tenk unique1=2402i,unique2=8258i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=402i,twothousand=402i,fivethous=2402i,tenthous=2402i,odd=4i,even=5i,stringu1="KOAAAA",stringu2="QFMAAA",string4="OOOOxx" 713577600000000000 +tenk unique1=9522i,unique2=8259i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=522i,twothousand=1522i,fivethous=4522i,tenthous=9522i,odd=44i,even=45i,stringu1="GCAAAA",stringu2="RFMAAA",string4="VVVVxx" 713664000000000000 +tenk unique1=4011i,unique2=8260i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=11i,twothousand=11i,fivethous=4011i,tenthous=4011i,odd=22i,even=23i,stringu1="HYAAAA",stringu2="SFMAAA",string4="AAAAxx" 713750400000000000 +tenk unique1=3297i,unique2=8261i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=297i,twothousand=1297i,fivethous=3297i,tenthous=3297i,odd=194i,even=195i,stringu1="VWAAAA",stringu2="TFMAAA",string4="HHHHxx" 713836800000000000 +tenk unique1=4915i,unique2=8262i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=915i,twothousand=915i,fivethous=4915i,tenthous=4915i,odd=30i,even=31i,stringu1="BHAAAA",stringu2="UFMAAA",string4="OOOOxx" 713923200000000000 +tenk unique1=5397i,unique2=8263i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=397i,twothousand=1397i,fivethous=397i,tenthous=5397i,odd=194i,even=195i,stringu1="PZAAAA",stringu2="VFMAAA",string4="VVVVxx" 714009600000000000 +tenk unique1=5454i,unique2=8264i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=454i,twothousand=1454i,fivethous=454i,tenthous=5454i,odd=108i,even=109i,stringu1="UBAAAA",stringu2="WFMAAA",string4="AAAAxx" 714096000000000000 +tenk unique1=4568i,unique2=8265i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=568i,twothousand=568i,fivethous=4568i,tenthous=4568i,odd=136i,even=137i,stringu1="STAAAA",stringu2="XFMAAA",string4="HHHHxx" 714182400000000000 +tenk unique1=5875i,unique2=8266i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=875i,twothousand=1875i,fivethous=875i,tenthous=5875i,odd=150i,even=151i,stringu1="ZRAAAA",stringu2="YFMAAA",string4="OOOOxx" 714268800000000000 +tenk unique1=3642i,unique2=8267i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=642i,twothousand=1642i,fivethous=3642i,tenthous=3642i,odd=84i,even=85i,stringu1="CKAAAA",stringu2="ZFMAAA",string4="VVVVxx" 714355200000000000 +tenk unique1=8506i,unique2=8268i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=506i,twothousand=506i,fivethous=3506i,tenthous=8506i,odd=12i,even=13i,stringu1="EPAAAA",stringu2="AGMAAA",string4="AAAAxx" 714441600000000000 +tenk unique1=9621i,unique2=8269i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=621i,twothousand=1621i,fivethous=4621i,tenthous=9621i,odd=42i,even=43i,stringu1="BGAAAA",stringu2="BGMAAA",string4="HHHHxx" 714528000000000000 +tenk unique1=7739i,unique2=8270i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=739i,twothousand=1739i,fivethous=2739i,tenthous=7739i,odd=78i,even=79i,stringu1="RLAAAA",stringu2="CGMAAA",string4="OOOOxx" 714614400000000000 +tenk unique1=3987i,unique2=8271i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=987i,twothousand=1987i,fivethous=3987i,tenthous=3987i,odd=174i,even=175i,stringu1="JXAAAA",stringu2="DGMAAA",string4="VVVVxx" 714700800000000000 +tenk unique1=2090i,unique2=8272i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=90i,twothousand=90i,fivethous=2090i,tenthous=2090i,odd=180i,even=181i,stringu1="KCAAAA",stringu2="EGMAAA",string4="AAAAxx" 714787200000000000 +tenk unique1=3838i,unique2=8273i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=838i,twothousand=1838i,fivethous=3838i,tenthous=3838i,odd=76i,even=77i,stringu1="QRAAAA",stringu2="FGMAAA",string4="HHHHxx" 714873600000000000 +tenk unique1=17i,unique2=8274i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=17i,twothousand=17i,fivethous=17i,tenthous=17i,odd=34i,even=35i,stringu1="RAAAAA",stringu2="GGMAAA",string4="OOOOxx" 714960000000000000 +tenk unique1=3406i,unique2=8275i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=406i,twothousand=1406i,fivethous=3406i,tenthous=3406i,odd=12i,even=13i,stringu1="ABAAAA",stringu2="HGMAAA",string4="VVVVxx" 715046400000000000 +tenk unique1=8312i,unique2=8276i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=312i,twothousand=312i,fivethous=3312i,tenthous=8312i,odd=24i,even=25i,stringu1="SHAAAA",stringu2="IGMAAA",string4="AAAAxx" 715132800000000000 +tenk unique1=4034i,unique2=8277i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=34i,twothousand=34i,fivethous=4034i,tenthous=4034i,odd=68i,even=69i,stringu1="EZAAAA",stringu2="JGMAAA",string4="HHHHxx" 715219200000000000 +tenk unique1=1535i,unique2=8278i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=535i,twothousand=1535i,fivethous=1535i,tenthous=1535i,odd=70i,even=71i,stringu1="BHAAAA",stringu2="KGMAAA",string4="OOOOxx" 715305600000000000 +tenk unique1=7198i,unique2=8279i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=198i,twothousand=1198i,fivethous=2198i,tenthous=7198i,odd=196i,even=197i,stringu1="WQAAAA",stringu2="LGMAAA",string4="VVVVxx" 715392000000000000 +tenk unique1=8885i,unique2=8280i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=885i,twothousand=885i,fivethous=3885i,tenthous=8885i,odd=170i,even=171i,stringu1="TDAAAA",stringu2="MGMAAA",string4="AAAAxx" 715478400000000000 +tenk unique1=4081i,unique2=8281i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=81i,twothousand=81i,fivethous=4081i,tenthous=4081i,odd=162i,even=163i,stringu1="ZAAAAA",stringu2="NGMAAA",string4="HHHHxx" 715564800000000000 +tenk unique1=980i,unique2=8282i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=980i,twothousand=980i,fivethous=980i,tenthous=980i,odd=160i,even=161i,stringu1="SLAAAA",stringu2="OGMAAA",string4="OOOOxx" 715651200000000000 +tenk unique1=551i,unique2=8283i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=551i,twothousand=551i,fivethous=551i,tenthous=551i,odd=102i,even=103i,stringu1="FVAAAA",stringu2="PGMAAA",string4="VVVVxx" 715737600000000000 +tenk unique1=7746i,unique2=8284i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=746i,twothousand=1746i,fivethous=2746i,tenthous=7746i,odd=92i,even=93i,stringu1="YLAAAA",stringu2="QGMAAA",string4="AAAAxx" 715824000000000000 +tenk unique1=4756i,unique2=8285i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=756i,twothousand=756i,fivethous=4756i,tenthous=4756i,odd=112i,even=113i,stringu1="YAAAAA",stringu2="RGMAAA",string4="HHHHxx" 715910400000000000 +tenk unique1=3655i,unique2=8286i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=655i,twothousand=1655i,fivethous=3655i,tenthous=3655i,odd=110i,even=111i,stringu1="PKAAAA",stringu2="SGMAAA",string4="OOOOxx" 715996800000000000 +tenk unique1=7075i,unique2=8287i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=75i,twothousand=1075i,fivethous=2075i,tenthous=7075i,odd=150i,even=151i,stringu1="DMAAAA",stringu2="TGMAAA",string4="VVVVxx" 716083200000000000 +tenk unique1=3950i,unique2=8288i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=950i,twothousand=1950i,fivethous=3950i,tenthous=3950i,odd=100i,even=101i,stringu1="YVAAAA",stringu2="UGMAAA",string4="AAAAxx" 716169600000000000 +tenk unique1=2314i,unique2=8289i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=314i,twothousand=314i,fivethous=2314i,tenthous=2314i,odd=28i,even=29i,stringu1="ALAAAA",stringu2="VGMAAA",string4="HHHHxx" 716256000000000000 +tenk unique1=8432i,unique2=8290i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=432i,twothousand=432i,fivethous=3432i,tenthous=8432i,odd=64i,even=65i,stringu1="IMAAAA",stringu2="WGMAAA",string4="OOOOxx" 716342400000000000 +tenk unique1=62i,unique2=8291i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=62i,twothousand=62i,fivethous=62i,tenthous=62i,odd=124i,even=125i,stringu1="KCAAAA",stringu2="XGMAAA",string4="VVVVxx" 716428800000000000 +tenk unique1=6920i,unique2=8292i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=920i,twothousand=920i,fivethous=1920i,tenthous=6920i,odd=40i,even=41i,stringu1="EGAAAA",stringu2="YGMAAA",string4="AAAAxx" 716515200000000000 +tenk unique1=4077i,unique2=8293i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=77i,twothousand=77i,fivethous=4077i,tenthous=4077i,odd=154i,even=155i,stringu1="VAAAAA",stringu2="ZGMAAA",string4="HHHHxx" 716601600000000000 +tenk unique1=9118i,unique2=8294i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=118i,twothousand=1118i,fivethous=4118i,tenthous=9118i,odd=36i,even=37i,stringu1="SMAAAA",stringu2="AHMAAA",string4="OOOOxx" 716688000000000000 +tenk unique1=5375i,unique2=8295i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=375i,twothousand=1375i,fivethous=375i,tenthous=5375i,odd=150i,even=151i,stringu1="TYAAAA",stringu2="BHMAAA",string4="VVVVxx" 716774400000000000 +tenk unique1=178i,unique2=8296i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=178i,twothousand=178i,fivethous=178i,tenthous=178i,odd=156i,even=157i,stringu1="WGAAAA",stringu2="CHMAAA",string4="AAAAxx" 716860800000000000 +tenk unique1=1079i,unique2=8297i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=79i,twothousand=1079i,fivethous=1079i,tenthous=1079i,odd=158i,even=159i,stringu1="NPAAAA",stringu2="DHMAAA",string4="HHHHxx" 716947200000000000 +tenk unique1=4279i,unique2=8298i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=279i,twothousand=279i,fivethous=4279i,tenthous=4279i,odd=158i,even=159i,stringu1="PIAAAA",stringu2="EHMAAA",string4="OOOOxx" 717033600000000000 +tenk unique1=8436i,unique2=8299i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=436i,twothousand=436i,fivethous=3436i,tenthous=8436i,odd=72i,even=73i,stringu1="MMAAAA",stringu2="FHMAAA",string4="VVVVxx" 717120000000000000 +tenk unique1=1931i,unique2=8300i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=931i,twothousand=1931i,fivethous=1931i,tenthous=1931i,odd=62i,even=63i,stringu1="HWAAAA",stringu2="GHMAAA",string4="AAAAxx" 717206400000000000 +tenk unique1=2096i,unique2=8301i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=96i,twothousand=96i,fivethous=2096i,tenthous=2096i,odd=192i,even=193i,stringu1="QCAAAA",stringu2="HHMAAA",string4="HHHHxx" 717292800000000000 +tenk unique1=1638i,unique2=8302i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=638i,twothousand=1638i,fivethous=1638i,tenthous=1638i,odd=76i,even=77i,stringu1="ALAAAA",stringu2="IHMAAA",string4="OOOOxx" 717379200000000000 +tenk unique1=2788i,unique2=8303i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=788i,twothousand=788i,fivethous=2788i,tenthous=2788i,odd=176i,even=177i,stringu1="GDAAAA",stringu2="JHMAAA",string4="VVVVxx" 717465600000000000 +tenk unique1=4751i,unique2=8304i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=751i,twothousand=751i,fivethous=4751i,tenthous=4751i,odd=102i,even=103i,stringu1="TAAAAA",stringu2="KHMAAA",string4="AAAAxx" 717552000000000000 +tenk unique1=8824i,unique2=8305i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=824i,twothousand=824i,fivethous=3824i,tenthous=8824i,odd=48i,even=49i,stringu1="KBAAAA",stringu2="LHMAAA",string4="HHHHxx" 717638400000000000 +tenk unique1=3098i,unique2=8306i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=98i,twothousand=1098i,fivethous=3098i,tenthous=3098i,odd=196i,even=197i,stringu1="EPAAAA",stringu2="MHMAAA",string4="OOOOxx" 717724800000000000 +tenk unique1=4497i,unique2=8307i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=497i,twothousand=497i,fivethous=4497i,tenthous=4497i,odd=194i,even=195i,stringu1="ZQAAAA",stringu2="NHMAAA",string4="VVVVxx" 717811200000000000 +tenk unique1=5223i,unique2=8308i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=223i,twothousand=1223i,fivethous=223i,tenthous=5223i,odd=46i,even=47i,stringu1="XSAAAA",stringu2="OHMAAA",string4="AAAAxx" 717897600000000000 +tenk unique1=9212i,unique2=8309i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=212i,twothousand=1212i,fivethous=4212i,tenthous=9212i,odd=24i,even=25i,stringu1="IQAAAA",stringu2="PHMAAA",string4="HHHHxx" 717984000000000000 +tenk unique1=4265i,unique2=8310i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=265i,twothousand=265i,fivethous=4265i,tenthous=4265i,odd=130i,even=131i,stringu1="BIAAAA",stringu2="QHMAAA",string4="OOOOxx" 718070400000000000 +tenk unique1=6898i,unique2=8311i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=898i,twothousand=898i,fivethous=1898i,tenthous=6898i,odd=196i,even=197i,stringu1="IFAAAA",stringu2="RHMAAA",string4="VVVVxx" 718156800000000000 +tenk unique1=8808i,unique2=8312i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=808i,twothousand=808i,fivethous=3808i,tenthous=8808i,odd=16i,even=17i,stringu1="UAAAAA",stringu2="SHMAAA",string4="AAAAxx" 718243200000000000 +tenk unique1=5629i,unique2=8313i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=629i,twothousand=1629i,fivethous=629i,tenthous=5629i,odd=58i,even=59i,stringu1="NIAAAA",stringu2="THMAAA",string4="HHHHxx" 718329600000000000 +tenk unique1=3779i,unique2=8314i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=779i,twothousand=1779i,fivethous=3779i,tenthous=3779i,odd=158i,even=159i,stringu1="JPAAAA",stringu2="UHMAAA",string4="OOOOxx" 718416000000000000 +tenk unique1=4972i,unique2=8315i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=972i,twothousand=972i,fivethous=4972i,tenthous=4972i,odd=144i,even=145i,stringu1="GJAAAA",stringu2="VHMAAA",string4="VVVVxx" 718502400000000000 +tenk unique1=4511i,unique2=8316i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=511i,twothousand=511i,fivethous=4511i,tenthous=4511i,odd=22i,even=23i,stringu1="NRAAAA",stringu2="WHMAAA",string4="AAAAxx" 718588800000000000 +tenk unique1=6761i,unique2=8317i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=761i,twothousand=761i,fivethous=1761i,tenthous=6761i,odd=122i,even=123i,stringu1="BAAAAA",stringu2="XHMAAA",string4="HHHHxx" 718675200000000000 +tenk unique1=2335i,unique2=8318i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=335i,twothousand=335i,fivethous=2335i,tenthous=2335i,odd=70i,even=71i,stringu1="VLAAAA",stringu2="YHMAAA",string4="OOOOxx" 718761600000000000 +tenk unique1=732i,unique2=8319i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=732i,twothousand=732i,fivethous=732i,tenthous=732i,odd=64i,even=65i,stringu1="ECAAAA",stringu2="ZHMAAA",string4="VVVVxx" 718848000000000000 +tenk unique1=4757i,unique2=8320i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=757i,twothousand=757i,fivethous=4757i,tenthous=4757i,odd=114i,even=115i,stringu1="ZAAAAA",stringu2="AIMAAA",string4="AAAAxx" 718934400000000000 +tenk unique1=6624i,unique2=8321i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=624i,twothousand=624i,fivethous=1624i,tenthous=6624i,odd=48i,even=49i,stringu1="UUAAAA",stringu2="BIMAAA",string4="HHHHxx" 719020800000000000 +tenk unique1=5869i,unique2=8322i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=869i,twothousand=1869i,fivethous=869i,tenthous=5869i,odd=138i,even=139i,stringu1="TRAAAA",stringu2="CIMAAA",string4="OOOOxx" 719107200000000000 +tenk unique1=5842i,unique2=8323i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=842i,twothousand=1842i,fivethous=842i,tenthous=5842i,odd=84i,even=85i,stringu1="SQAAAA",stringu2="DIMAAA",string4="VVVVxx" 719193600000000000 +tenk unique1=5735i,unique2=8324i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=735i,twothousand=1735i,fivethous=735i,tenthous=5735i,odd=70i,even=71i,stringu1="PMAAAA",stringu2="EIMAAA",string4="AAAAxx" 719280000000000000 +tenk unique1=8276i,unique2=8325i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=276i,twothousand=276i,fivethous=3276i,tenthous=8276i,odd=152i,even=153i,stringu1="IGAAAA",stringu2="FIMAAA",string4="HHHHxx" 719366400000000000 +tenk unique1=7227i,unique2=8326i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=227i,twothousand=1227i,fivethous=2227i,tenthous=7227i,odd=54i,even=55i,stringu1="ZRAAAA",stringu2="GIMAAA",string4="OOOOxx" 719452800000000000 +tenk unique1=4923i,unique2=8327i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=923i,twothousand=923i,fivethous=4923i,tenthous=4923i,odd=46i,even=47i,stringu1="JHAAAA",stringu2="HIMAAA",string4="VVVVxx" 719539200000000000 +tenk unique1=9135i,unique2=8328i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=135i,twothousand=1135i,fivethous=4135i,tenthous=9135i,odd=70i,even=71i,stringu1="JNAAAA",stringu2="IIMAAA",string4="AAAAxx" 719625600000000000 +tenk unique1=5813i,unique2=8329i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=813i,twothousand=1813i,fivethous=813i,tenthous=5813i,odd=26i,even=27i,stringu1="PPAAAA",stringu2="JIMAAA",string4="HHHHxx" 719712000000000000 +tenk unique1=9697i,unique2=8330i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=697i,twothousand=1697i,fivethous=4697i,tenthous=9697i,odd=194i,even=195i,stringu1="ZIAAAA",stringu2="KIMAAA",string4="OOOOxx" 719798400000000000 +tenk unique1=3222i,unique2=8331i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=222i,twothousand=1222i,fivethous=3222i,tenthous=3222i,odd=44i,even=45i,stringu1="YTAAAA",stringu2="LIMAAA",string4="VVVVxx" 719884800000000000 +tenk unique1=2394i,unique2=8332i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=394i,twothousand=394i,fivethous=2394i,tenthous=2394i,odd=188i,even=189i,stringu1="COAAAA",stringu2="MIMAAA",string4="AAAAxx" 719971200000000000 +tenk unique1=5784i,unique2=8333i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=784i,twothousand=1784i,fivethous=784i,tenthous=5784i,odd=168i,even=169i,stringu1="MOAAAA",stringu2="NIMAAA",string4="HHHHxx" 720057600000000000 +tenk unique1=3652i,unique2=8334i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=652i,twothousand=1652i,fivethous=3652i,tenthous=3652i,odd=104i,even=105i,stringu1="MKAAAA",stringu2="OIMAAA",string4="OOOOxx" 720144000000000000 +tenk unique1=8175i,unique2=8335i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=175i,twothousand=175i,fivethous=3175i,tenthous=8175i,odd=150i,even=151i,stringu1="LCAAAA",stringu2="PIMAAA",string4="VVVVxx" 720230400000000000 +tenk unique1=7568i,unique2=8336i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=568i,twothousand=1568i,fivethous=2568i,tenthous=7568i,odd=136i,even=137i,stringu1="CFAAAA",stringu2="QIMAAA",string4="AAAAxx" 720316800000000000 +tenk unique1=6645i,unique2=8337i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=645i,twothousand=645i,fivethous=1645i,tenthous=6645i,odd=90i,even=91i,stringu1="PVAAAA",stringu2="RIMAAA",string4="HHHHxx" 720403200000000000 +tenk unique1=8176i,unique2=8338i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=176i,twothousand=176i,fivethous=3176i,tenthous=8176i,odd=152i,even=153i,stringu1="MCAAAA",stringu2="SIMAAA",string4="OOOOxx" 720489600000000000 +tenk unique1=530i,unique2=8339i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=530i,twothousand=530i,fivethous=530i,tenthous=530i,odd=60i,even=61i,stringu1="KUAAAA",stringu2="TIMAAA",string4="VVVVxx" 720576000000000000 +tenk unique1=5439i,unique2=8340i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=439i,twothousand=1439i,fivethous=439i,tenthous=5439i,odd=78i,even=79i,stringu1="FBAAAA",stringu2="UIMAAA",string4="AAAAxx" 720662400000000000 +tenk unique1=61i,unique2=8341i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=61i,twothousand=61i,fivethous=61i,tenthous=61i,odd=122i,even=123i,stringu1="JCAAAA",stringu2="VIMAAA",string4="HHHHxx" 720748800000000000 +tenk unique1=3951i,unique2=8342i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=951i,twothousand=1951i,fivethous=3951i,tenthous=3951i,odd=102i,even=103i,stringu1="ZVAAAA",stringu2="WIMAAA",string4="OOOOxx" 720835200000000000 +tenk unique1=5283i,unique2=8343i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=283i,twothousand=1283i,fivethous=283i,tenthous=5283i,odd=166i,even=167i,stringu1="FVAAAA",stringu2="XIMAAA",string4="VVVVxx" 720921600000000000 +tenk unique1=7226i,unique2=8344i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=226i,twothousand=1226i,fivethous=2226i,tenthous=7226i,odd=52i,even=53i,stringu1="YRAAAA",stringu2="YIMAAA",string4="AAAAxx" 721008000000000000 +tenk unique1=1954i,unique2=8345i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=954i,twothousand=1954i,fivethous=1954i,tenthous=1954i,odd=108i,even=109i,stringu1="EXAAAA",stringu2="ZIMAAA",string4="HHHHxx" 721094400000000000 +tenk unique1=334i,unique2=8346i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=334i,twothousand=334i,fivethous=334i,tenthous=334i,odd=68i,even=69i,stringu1="WMAAAA",stringu2="AJMAAA",string4="OOOOxx" 721180800000000000 +tenk unique1=3921i,unique2=8347i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=921i,twothousand=1921i,fivethous=3921i,tenthous=3921i,odd=42i,even=43i,stringu1="VUAAAA",stringu2="BJMAAA",string4="VVVVxx" 721267200000000000 +tenk unique1=6276i,unique2=8348i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=276i,twothousand=276i,fivethous=1276i,tenthous=6276i,odd=152i,even=153i,stringu1="KHAAAA",stringu2="CJMAAA",string4="AAAAxx" 721353600000000000 +tenk unique1=3378i,unique2=8349i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=378i,twothousand=1378i,fivethous=3378i,tenthous=3378i,odd=156i,even=157i,stringu1="YZAAAA",stringu2="DJMAAA",string4="HHHHxx" 721440000000000000 +tenk unique1=5236i,unique2=8350i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=236i,twothousand=1236i,fivethous=236i,tenthous=5236i,odd=72i,even=73i,stringu1="KTAAAA",stringu2="EJMAAA",string4="OOOOxx" 721526400000000000 +tenk unique1=7781i,unique2=8351i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=781i,twothousand=1781i,fivethous=2781i,tenthous=7781i,odd=162i,even=163i,stringu1="HNAAAA",stringu2="FJMAAA",string4="VVVVxx" 721612800000000000 +tenk unique1=8601i,unique2=8352i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=601i,twothousand=601i,fivethous=3601i,tenthous=8601i,odd=2i,even=3i,stringu1="VSAAAA",stringu2="GJMAAA",string4="AAAAxx" 721699200000000000 +tenk unique1=1473i,unique2=8353i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=473i,twothousand=1473i,fivethous=1473i,tenthous=1473i,odd=146i,even=147i,stringu1="REAAAA",stringu2="HJMAAA",string4="HHHHxx" 721785600000000000 +tenk unique1=3246i,unique2=8354i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=246i,twothousand=1246i,fivethous=3246i,tenthous=3246i,odd=92i,even=93i,stringu1="WUAAAA",stringu2="IJMAAA",string4="OOOOxx" 721872000000000000 +tenk unique1=3601i,unique2=8355i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=601i,twothousand=1601i,fivethous=3601i,tenthous=3601i,odd=2i,even=3i,stringu1="NIAAAA",stringu2="JJMAAA",string4="VVVVxx" 721958400000000000 +tenk unique1=6861i,unique2=8356i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=861i,twothousand=861i,fivethous=1861i,tenthous=6861i,odd=122i,even=123i,stringu1="XDAAAA",stringu2="KJMAAA",string4="AAAAxx" 722044800000000000 +tenk unique1=9032i,unique2=8357i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=32i,twothousand=1032i,fivethous=4032i,tenthous=9032i,odd=64i,even=65i,stringu1="KJAAAA",stringu2="LJMAAA",string4="HHHHxx" 722131200000000000 +tenk unique1=216i,unique2=8358i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=216i,twothousand=216i,fivethous=216i,tenthous=216i,odd=32i,even=33i,stringu1="IIAAAA",stringu2="MJMAAA",string4="OOOOxx" 722217600000000000 +tenk unique1=3824i,unique2=8359i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=824i,twothousand=1824i,fivethous=3824i,tenthous=3824i,odd=48i,even=49i,stringu1="CRAAAA",stringu2="NJMAAA",string4="VVVVxx" 722304000000000000 +tenk unique1=8486i,unique2=8360i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=486i,twothousand=486i,fivethous=3486i,tenthous=8486i,odd=172i,even=173i,stringu1="KOAAAA",stringu2="OJMAAA",string4="AAAAxx" 722390400000000000 +tenk unique1=276i,unique2=8361i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=276i,twothousand=276i,fivethous=276i,tenthous=276i,odd=152i,even=153i,stringu1="QKAAAA",stringu2="PJMAAA",string4="HHHHxx" 722476800000000000 +tenk unique1=1838i,unique2=8362i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=838i,twothousand=1838i,fivethous=1838i,tenthous=1838i,odd=76i,even=77i,stringu1="SSAAAA",stringu2="QJMAAA",string4="OOOOxx" 722563200000000000 +tenk unique1=6175i,unique2=8363i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=175i,twothousand=175i,fivethous=1175i,tenthous=6175i,odd=150i,even=151i,stringu1="NDAAAA",stringu2="RJMAAA",string4="VVVVxx" 722649600000000000 +tenk unique1=3719i,unique2=8364i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=719i,twothousand=1719i,fivethous=3719i,tenthous=3719i,odd=38i,even=39i,stringu1="BNAAAA",stringu2="SJMAAA",string4="AAAAxx" 722736000000000000 +tenk unique1=6958i,unique2=8365i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=958i,twothousand=958i,fivethous=1958i,tenthous=6958i,odd=116i,even=117i,stringu1="QHAAAA",stringu2="TJMAAA",string4="HHHHxx" 722822400000000000 +tenk unique1=6822i,unique2=8366i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=822i,twothousand=822i,fivethous=1822i,tenthous=6822i,odd=44i,even=45i,stringu1="KCAAAA",stringu2="UJMAAA",string4="OOOOxx" 722908800000000000 +tenk unique1=3318i,unique2=8367i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=318i,twothousand=1318i,fivethous=3318i,tenthous=3318i,odd=36i,even=37i,stringu1="QXAAAA",stringu2="VJMAAA",string4="VVVVxx" 722995200000000000 +tenk unique1=7222i,unique2=8368i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=222i,twothousand=1222i,fivethous=2222i,tenthous=7222i,odd=44i,even=45i,stringu1="URAAAA",stringu2="WJMAAA",string4="AAAAxx" 723081600000000000 +tenk unique1=85i,unique2=8369i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=85i,twothousand=85i,fivethous=85i,tenthous=85i,odd=170i,even=171i,stringu1="HDAAAA",stringu2="XJMAAA",string4="HHHHxx" 723168000000000000 +tenk unique1=5158i,unique2=8370i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=158i,twothousand=1158i,fivethous=158i,tenthous=5158i,odd=116i,even=117i,stringu1="KQAAAA",stringu2="YJMAAA",string4="OOOOxx" 723254400000000000 +tenk unique1=6360i,unique2=8371i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=360i,twothousand=360i,fivethous=1360i,tenthous=6360i,odd=120i,even=121i,stringu1="QKAAAA",stringu2="ZJMAAA",string4="VVVVxx" 723340800000000000 +tenk unique1=2599i,unique2=8372i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=599i,twothousand=599i,fivethous=2599i,tenthous=2599i,odd=198i,even=199i,stringu1="ZVAAAA",stringu2="AKMAAA",string4="AAAAxx" 723427200000000000 +tenk unique1=4002i,unique2=8373i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=2i,fivethous=4002i,tenthous=4002i,odd=4i,even=5i,stringu1="YXAAAA",stringu2="BKMAAA",string4="HHHHxx" 723513600000000000 +tenk unique1=6597i,unique2=8374i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=597i,twothousand=597i,fivethous=1597i,tenthous=6597i,odd=194i,even=195i,stringu1="TTAAAA",stringu2="CKMAAA",string4="OOOOxx" 723600000000000000 +tenk unique1=5762i,unique2=8375i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=762i,twothousand=1762i,fivethous=762i,tenthous=5762i,odd=124i,even=125i,stringu1="QNAAAA",stringu2="DKMAAA",string4="VVVVxx" 723686400000000000 +tenk unique1=8383i,unique2=8376i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=383i,twothousand=383i,fivethous=3383i,tenthous=8383i,odd=166i,even=167i,stringu1="LKAAAA",stringu2="EKMAAA",string4="AAAAxx" 723772800000000000 +tenk unique1=4686i,unique2=8377i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=686i,twothousand=686i,fivethous=4686i,tenthous=4686i,odd=172i,even=173i,stringu1="GYAAAA",stringu2="FKMAAA",string4="HHHHxx" 723859200000000000 +tenk unique1=5972i,unique2=8378i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=972i,twothousand=1972i,fivethous=972i,tenthous=5972i,odd=144i,even=145i,stringu1="SVAAAA",stringu2="GKMAAA",string4="OOOOxx" 723945600000000000 +tenk unique1=1432i,unique2=8379i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=432i,twothousand=1432i,fivethous=1432i,tenthous=1432i,odd=64i,even=65i,stringu1="CDAAAA",stringu2="HKMAAA",string4="VVVVxx" 724032000000000000 +tenk unique1=1601i,unique2=8380i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=601i,twothousand=1601i,fivethous=1601i,tenthous=1601i,odd=2i,even=3i,stringu1="PJAAAA",stringu2="IKMAAA",string4="AAAAxx" 724118400000000000 +tenk unique1=3012i,unique2=8381i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=12i,twothousand=1012i,fivethous=3012i,tenthous=3012i,odd=24i,even=25i,stringu1="WLAAAA",stringu2="JKMAAA",string4="HHHHxx" 724204800000000000 +tenk unique1=9345i,unique2=8382i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=345i,twothousand=1345i,fivethous=4345i,tenthous=9345i,odd=90i,even=91i,stringu1="LVAAAA",stringu2="KKMAAA",string4="OOOOxx" 724291200000000000 +tenk unique1=8869i,unique2=8383i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=869i,twothousand=869i,fivethous=3869i,tenthous=8869i,odd=138i,even=139i,stringu1="DDAAAA",stringu2="LKMAAA",string4="VVVVxx" 724377600000000000 +tenk unique1=6612i,unique2=8384i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=612i,twothousand=612i,fivethous=1612i,tenthous=6612i,odd=24i,even=25i,stringu1="IUAAAA",stringu2="MKMAAA",string4="AAAAxx" 724464000000000000 +tenk unique1=262i,unique2=8385i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=262i,twothousand=262i,fivethous=262i,tenthous=262i,odd=124i,even=125i,stringu1="CKAAAA",stringu2="NKMAAA",string4="HHHHxx" 724550400000000000 +tenk unique1=300i,unique2=8386i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=300i,twothousand=300i,fivethous=300i,tenthous=300i,odd=0i,even=1i,stringu1="OLAAAA",stringu2="OKMAAA",string4="OOOOxx" 724636800000000000 +tenk unique1=3045i,unique2=8387i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=45i,twothousand=1045i,fivethous=3045i,tenthous=3045i,odd=90i,even=91i,stringu1="DNAAAA",stringu2="PKMAAA",string4="VVVVxx" 724723200000000000 +tenk unique1=7252i,unique2=8388i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=252i,twothousand=1252i,fivethous=2252i,tenthous=7252i,odd=104i,even=105i,stringu1="YSAAAA",stringu2="QKMAAA",string4="AAAAxx" 724809600000000000 +tenk unique1=9099i,unique2=8389i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=99i,twothousand=1099i,fivethous=4099i,tenthous=9099i,odd=198i,even=199i,stringu1="ZLAAAA",stringu2="RKMAAA",string4="HHHHxx" 724896000000000000 +tenk unique1=9006i,unique2=8390i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=6i,twothousand=1006i,fivethous=4006i,tenthous=9006i,odd=12i,even=13i,stringu1="KIAAAA",stringu2="SKMAAA",string4="OOOOxx" 724982400000000000 +tenk unique1=3078i,unique2=8391i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=78i,twothousand=1078i,fivethous=3078i,tenthous=3078i,odd=156i,even=157i,stringu1="KOAAAA",stringu2="TKMAAA",string4="VVVVxx" 725068800000000000 +tenk unique1=5159i,unique2=8392i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=159i,twothousand=1159i,fivethous=159i,tenthous=5159i,odd=118i,even=119i,stringu1="LQAAAA",stringu2="UKMAAA",string4="AAAAxx" 725155200000000000 +tenk unique1=9329i,unique2=8393i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=329i,twothousand=1329i,fivethous=4329i,tenthous=9329i,odd=58i,even=59i,stringu1="VUAAAA",stringu2="VKMAAA",string4="HHHHxx" 725241600000000000 +tenk unique1=1393i,unique2=8394i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=393i,twothousand=1393i,fivethous=1393i,tenthous=1393i,odd=186i,even=187i,stringu1="PBAAAA",stringu2="WKMAAA",string4="OOOOxx" 725328000000000000 +tenk unique1=5894i,unique2=8395i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=894i,twothousand=1894i,fivethous=894i,tenthous=5894i,odd=188i,even=189i,stringu1="SSAAAA",stringu2="XKMAAA",string4="VVVVxx" 725414400000000000 +tenk unique1=11i,unique2=8396i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=11i,twothousand=11i,fivethous=11i,tenthous=11i,odd=22i,even=23i,stringu1="LAAAAA",stringu2="YKMAAA",string4="AAAAxx" 725500800000000000 +tenk unique1=5606i,unique2=8397i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=606i,twothousand=1606i,fivethous=606i,tenthous=5606i,odd=12i,even=13i,stringu1="QHAAAA",stringu2="ZKMAAA",string4="HHHHxx" 725587200000000000 +tenk unique1=5541i,unique2=8398i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=541i,twothousand=1541i,fivethous=541i,tenthous=5541i,odd=82i,even=83i,stringu1="DFAAAA",stringu2="ALMAAA",string4="OOOOxx" 725673600000000000 +tenk unique1=2689i,unique2=8399i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=689i,twothousand=689i,fivethous=2689i,tenthous=2689i,odd=178i,even=179i,stringu1="LZAAAA",stringu2="BLMAAA",string4="VVVVxx" 725760000000000000 +tenk unique1=1023i,unique2=8400i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=23i,twothousand=1023i,fivethous=1023i,tenthous=1023i,odd=46i,even=47i,stringu1="JNAAAA",stringu2="CLMAAA",string4="AAAAxx" 725846400000000000 +tenk unique1=8134i,unique2=8401i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=134i,twothousand=134i,fivethous=3134i,tenthous=8134i,odd=68i,even=69i,stringu1="WAAAAA",stringu2="DLMAAA",string4="HHHHxx" 725932800000000000 +tenk unique1=5923i,unique2=8402i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=923i,twothousand=1923i,fivethous=923i,tenthous=5923i,odd=46i,even=47i,stringu1="VTAAAA",stringu2="ELMAAA",string4="OOOOxx" 726019200000000000 +tenk unique1=6056i,unique2=8403i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=56i,twothousand=56i,fivethous=1056i,tenthous=6056i,odd=112i,even=113i,stringu1="YYAAAA",stringu2="FLMAAA",string4="VVVVxx" 726105600000000000 +tenk unique1=653i,unique2=8404i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=653i,twothousand=653i,fivethous=653i,tenthous=653i,odd=106i,even=107i,stringu1="DZAAAA",stringu2="GLMAAA",string4="AAAAxx" 726192000000000000 +tenk unique1=367i,unique2=8405i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=367i,twothousand=367i,fivethous=367i,tenthous=367i,odd=134i,even=135i,stringu1="DOAAAA",stringu2="HLMAAA",string4="HHHHxx" 726278400000000000 +tenk unique1=1828i,unique2=8406i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=828i,twothousand=1828i,fivethous=1828i,tenthous=1828i,odd=56i,even=57i,stringu1="ISAAAA",stringu2="ILMAAA",string4="OOOOxx" 726364800000000000 +tenk unique1=6506i,unique2=8407i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=506i,twothousand=506i,fivethous=1506i,tenthous=6506i,odd=12i,even=13i,stringu1="GQAAAA",stringu2="JLMAAA",string4="VVVVxx" 726451200000000000 +tenk unique1=5772i,unique2=8408i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=772i,twothousand=1772i,fivethous=772i,tenthous=5772i,odd=144i,even=145i,stringu1="AOAAAA",stringu2="KLMAAA",string4="AAAAxx" 726537600000000000 +tenk unique1=8052i,unique2=8409i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=52i,twothousand=52i,fivethous=3052i,tenthous=8052i,odd=104i,even=105i,stringu1="SXAAAA",stringu2="LLMAAA",string4="HHHHxx" 726624000000000000 +tenk unique1=2633i,unique2=8410i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=633i,twothousand=633i,fivethous=2633i,tenthous=2633i,odd=66i,even=67i,stringu1="HXAAAA",stringu2="MLMAAA",string4="OOOOxx" 726710400000000000 +tenk unique1=4878i,unique2=8411i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=878i,twothousand=878i,fivethous=4878i,tenthous=4878i,odd=156i,even=157i,stringu1="QFAAAA",stringu2="NLMAAA",string4="VVVVxx" 726796800000000000 +tenk unique1=5621i,unique2=8412i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=621i,twothousand=1621i,fivethous=621i,tenthous=5621i,odd=42i,even=43i,stringu1="FIAAAA",stringu2="OLMAAA",string4="AAAAxx" 726883200000000000 +tenk unique1=41i,unique2=8413i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=41i,twothousand=41i,fivethous=41i,tenthous=41i,odd=82i,even=83i,stringu1="PBAAAA",stringu2="PLMAAA",string4="HHHHxx" 726969600000000000 +tenk unique1=4613i,unique2=8414i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=613i,twothousand=613i,fivethous=4613i,tenthous=4613i,odd=26i,even=27i,stringu1="LVAAAA",stringu2="QLMAAA",string4="OOOOxx" 727056000000000000 +tenk unique1=9389i,unique2=8415i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=389i,twothousand=1389i,fivethous=4389i,tenthous=9389i,odd=178i,even=179i,stringu1="DXAAAA",stringu2="RLMAAA",string4="VVVVxx" 727142400000000000 +tenk unique1=9414i,unique2=8416i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=414i,twothousand=1414i,fivethous=4414i,tenthous=9414i,odd=28i,even=29i,stringu1="CYAAAA",stringu2="SLMAAA",string4="AAAAxx" 727228800000000000 +tenk unique1=3583i,unique2=8417i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=583i,twothousand=1583i,fivethous=3583i,tenthous=3583i,odd=166i,even=167i,stringu1="VHAAAA",stringu2="TLMAAA",string4="HHHHxx" 727315200000000000 +tenk unique1=3454i,unique2=8418i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=454i,twothousand=1454i,fivethous=3454i,tenthous=3454i,odd=108i,even=109i,stringu1="WCAAAA",stringu2="ULMAAA",string4="OOOOxx" 727401600000000000 +tenk unique1=719i,unique2=8419i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=719i,twothousand=719i,fivethous=719i,tenthous=719i,odd=38i,even=39i,stringu1="RBAAAA",stringu2="VLMAAA",string4="VVVVxx" 727488000000000000 +tenk unique1=6188i,unique2=8420i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=188i,twothousand=188i,fivethous=1188i,tenthous=6188i,odd=176i,even=177i,stringu1="AEAAAA",stringu2="WLMAAA",string4="AAAAxx" 727574400000000000 +tenk unique1=2288i,unique2=8421i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=288i,twothousand=288i,fivethous=2288i,tenthous=2288i,odd=176i,even=177i,stringu1="AKAAAA",stringu2="XLMAAA",string4="HHHHxx" 727660800000000000 +tenk unique1=1287i,unique2=8422i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=287i,twothousand=1287i,fivethous=1287i,tenthous=1287i,odd=174i,even=175i,stringu1="NXAAAA",stringu2="YLMAAA",string4="OOOOxx" 727747200000000000 +tenk unique1=1397i,unique2=8423i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=397i,twothousand=1397i,fivethous=1397i,tenthous=1397i,odd=194i,even=195i,stringu1="TBAAAA",stringu2="ZLMAAA",string4="VVVVxx" 727833600000000000 +tenk unique1=7763i,unique2=8424i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=763i,twothousand=1763i,fivethous=2763i,tenthous=7763i,odd=126i,even=127i,stringu1="PMAAAA",stringu2="AMMAAA",string4="AAAAxx" 727920000000000000 +tenk unique1=5194i,unique2=8425i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=194i,twothousand=1194i,fivethous=194i,tenthous=5194i,odd=188i,even=189i,stringu1="URAAAA",stringu2="BMMAAA",string4="HHHHxx" 728006400000000000 +tenk unique1=3167i,unique2=8426i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=167i,twothousand=1167i,fivethous=3167i,tenthous=3167i,odd=134i,even=135i,stringu1="VRAAAA",stringu2="CMMAAA",string4="OOOOxx" 728092800000000000 +tenk unique1=9218i,unique2=8427i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=218i,twothousand=1218i,fivethous=4218i,tenthous=9218i,odd=36i,even=37i,stringu1="OQAAAA",stringu2="DMMAAA",string4="VVVVxx" 728179200000000000 +tenk unique1=2065i,unique2=8428i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=65i,twothousand=65i,fivethous=2065i,tenthous=2065i,odd=130i,even=131i,stringu1="LBAAAA",stringu2="EMMAAA",string4="AAAAxx" 728265600000000000 +tenk unique1=9669i,unique2=8429i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=669i,twothousand=1669i,fivethous=4669i,tenthous=9669i,odd=138i,even=139i,stringu1="XHAAAA",stringu2="FMMAAA",string4="HHHHxx" 728352000000000000 +tenk unique1=146i,unique2=8430i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=146i,twothousand=146i,fivethous=146i,tenthous=146i,odd=92i,even=93i,stringu1="QFAAAA",stringu2="GMMAAA",string4="OOOOxx" 728438400000000000 +tenk unique1=6141i,unique2=8431i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=141i,twothousand=141i,fivethous=1141i,tenthous=6141i,odd=82i,even=83i,stringu1="FCAAAA",stringu2="HMMAAA",string4="VVVVxx" 728524800000000000 +tenk unique1=2843i,unique2=8432i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=843i,twothousand=843i,fivethous=2843i,tenthous=2843i,odd=86i,even=87i,stringu1="JFAAAA",stringu2="IMMAAA",string4="AAAAxx" 728611200000000000 +tenk unique1=7934i,unique2=8433i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=934i,twothousand=1934i,fivethous=2934i,tenthous=7934i,odd=68i,even=69i,stringu1="ETAAAA",stringu2="JMMAAA",string4="HHHHxx" 728697600000000000 +tenk unique1=2536i,unique2=8434i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=536i,twothousand=536i,fivethous=2536i,tenthous=2536i,odd=72i,even=73i,stringu1="OTAAAA",stringu2="KMMAAA",string4="OOOOxx" 728784000000000000 +tenk unique1=7088i,unique2=8435i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=88i,twothousand=1088i,fivethous=2088i,tenthous=7088i,odd=176i,even=177i,stringu1="QMAAAA",stringu2="LMMAAA",string4="VVVVxx" 728870400000000000 +tenk unique1=2519i,unique2=8436i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=519i,twothousand=519i,fivethous=2519i,tenthous=2519i,odd=38i,even=39i,stringu1="XSAAAA",stringu2="MMMAAA",string4="AAAAxx" 728956800000000000 +tenk unique1=6650i,unique2=8437i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=650i,twothousand=650i,fivethous=1650i,tenthous=6650i,odd=100i,even=101i,stringu1="UVAAAA",stringu2="NMMAAA",string4="HHHHxx" 729043200000000000 +tenk unique1=3007i,unique2=8438i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=1007i,fivethous=3007i,tenthous=3007i,odd=14i,even=15i,stringu1="RLAAAA",stringu2="OMMAAA",string4="OOOOxx" 729129600000000000 +tenk unique1=4507i,unique2=8439i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=507i,twothousand=507i,fivethous=4507i,tenthous=4507i,odd=14i,even=15i,stringu1="JRAAAA",stringu2="PMMAAA",string4="VVVVxx" 729216000000000000 +tenk unique1=4892i,unique2=8440i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=892i,twothousand=892i,fivethous=4892i,tenthous=4892i,odd=184i,even=185i,stringu1="EGAAAA",stringu2="QMMAAA",string4="AAAAxx" 729302400000000000 +tenk unique1=7159i,unique2=8441i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=159i,twothousand=1159i,fivethous=2159i,tenthous=7159i,odd=118i,even=119i,stringu1="JPAAAA",stringu2="RMMAAA",string4="HHHHxx" 729388800000000000 +tenk unique1=3171i,unique2=8442i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=171i,twothousand=1171i,fivethous=3171i,tenthous=3171i,odd=142i,even=143i,stringu1="ZRAAAA",stringu2="SMMAAA",string4="OOOOxx" 729475200000000000 +tenk unique1=1080i,unique2=8443i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=80i,twothousand=1080i,fivethous=1080i,tenthous=1080i,odd=160i,even=161i,stringu1="OPAAAA",stringu2="TMMAAA",string4="VVVVxx" 729561600000000000 +tenk unique1=7248i,unique2=8444i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=248i,twothousand=1248i,fivethous=2248i,tenthous=7248i,odd=96i,even=97i,stringu1="USAAAA",stringu2="UMMAAA",string4="AAAAxx" 729648000000000000 +tenk unique1=7230i,unique2=8445i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=230i,twothousand=1230i,fivethous=2230i,tenthous=7230i,odd=60i,even=61i,stringu1="CSAAAA",stringu2="VMMAAA",string4="HHHHxx" 729734400000000000 +tenk unique1=3823i,unique2=8446i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=823i,twothousand=1823i,fivethous=3823i,tenthous=3823i,odd=46i,even=47i,stringu1="BRAAAA",stringu2="WMMAAA",string4="OOOOxx" 729820800000000000 +tenk unique1=5517i,unique2=8447i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=517i,twothousand=1517i,fivethous=517i,tenthous=5517i,odd=34i,even=35i,stringu1="FEAAAA",stringu2="XMMAAA",string4="VVVVxx" 729907200000000000 +tenk unique1=1482i,unique2=8448i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=482i,twothousand=1482i,fivethous=1482i,tenthous=1482i,odd=164i,even=165i,stringu1="AFAAAA",stringu2="YMMAAA",string4="AAAAxx" 729993600000000000 +tenk unique1=9953i,unique2=8449i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=953i,twothousand=1953i,fivethous=4953i,tenthous=9953i,odd=106i,even=107i,stringu1="VSAAAA",stringu2="ZMMAAA",string4="HHHHxx" 730080000000000000 +tenk unique1=2754i,unique2=8450i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=754i,twothousand=754i,fivethous=2754i,tenthous=2754i,odd=108i,even=109i,stringu1="YBAAAA",stringu2="ANMAAA",string4="OOOOxx" 730166400000000000 +tenk unique1=3875i,unique2=8451i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=875i,twothousand=1875i,fivethous=3875i,tenthous=3875i,odd=150i,even=151i,stringu1="BTAAAA",stringu2="BNMAAA",string4="VVVVxx" 730252800000000000 +tenk unique1=9800i,unique2=8452i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=800i,twothousand=1800i,fivethous=4800i,tenthous=9800i,odd=0i,even=1i,stringu1="YMAAAA",stringu2="CNMAAA",string4="AAAAxx" 730339200000000000 +tenk unique1=8819i,unique2=8453i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=819i,twothousand=819i,fivethous=3819i,tenthous=8819i,odd=38i,even=39i,stringu1="FBAAAA",stringu2="DNMAAA",string4="HHHHxx" 730425600000000000 +tenk unique1=8267i,unique2=8454i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=267i,twothousand=267i,fivethous=3267i,tenthous=8267i,odd=134i,even=135i,stringu1="ZFAAAA",stringu2="ENMAAA",string4="OOOOxx" 730512000000000000 +tenk unique1=520i,unique2=8455i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=520i,twothousand=520i,fivethous=520i,tenthous=520i,odd=40i,even=41i,stringu1="AUAAAA",stringu2="FNMAAA",string4="VVVVxx" 730598400000000000 +tenk unique1=5770i,unique2=8456i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=770i,twothousand=1770i,fivethous=770i,tenthous=5770i,odd=140i,even=141i,stringu1="YNAAAA",stringu2="GNMAAA",string4="AAAAxx" 730684800000000000 +tenk unique1=2114i,unique2=8457i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=114i,twothousand=114i,fivethous=2114i,tenthous=2114i,odd=28i,even=29i,stringu1="IDAAAA",stringu2="HNMAAA",string4="HHHHxx" 730771200000000000 +tenk unique1=5045i,unique2=8458i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=45i,twothousand=1045i,fivethous=45i,tenthous=5045i,odd=90i,even=91i,stringu1="BMAAAA",stringu2="INMAAA",string4="OOOOxx" 730857600000000000 +tenk unique1=1094i,unique2=8459i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=94i,twothousand=1094i,fivethous=1094i,tenthous=1094i,odd=188i,even=189i,stringu1="CQAAAA",stringu2="JNMAAA",string4="VVVVxx" 730944000000000000 +tenk unique1=8786i,unique2=8460i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=786i,twothousand=786i,fivethous=3786i,tenthous=8786i,odd=172i,even=173i,stringu1="YZAAAA",stringu2="KNMAAA",string4="AAAAxx" 731030400000000000 +tenk unique1=353i,unique2=8461i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=353i,twothousand=353i,fivethous=353i,tenthous=353i,odd=106i,even=107i,stringu1="PNAAAA",stringu2="LNMAAA",string4="HHHHxx" 731116800000000000 +tenk unique1=290i,unique2=8462i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=290i,twothousand=290i,fivethous=290i,tenthous=290i,odd=180i,even=181i,stringu1="ELAAAA",stringu2="MNMAAA",string4="OOOOxx" 731203200000000000 +tenk unique1=3376i,unique2=8463i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=376i,twothousand=1376i,fivethous=3376i,tenthous=3376i,odd=152i,even=153i,stringu1="WZAAAA",stringu2="NNMAAA",string4="VVVVxx" 731289600000000000 +tenk unique1=9305i,unique2=8464i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=305i,twothousand=1305i,fivethous=4305i,tenthous=9305i,odd=10i,even=11i,stringu1="XTAAAA",stringu2="ONMAAA",string4="AAAAxx" 731376000000000000 +tenk unique1=186i,unique2=8465i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=186i,twothousand=186i,fivethous=186i,tenthous=186i,odd=172i,even=173i,stringu1="EHAAAA",stringu2="PNMAAA",string4="HHHHxx" 731462400000000000 +tenk unique1=4817i,unique2=8466i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=817i,twothousand=817i,fivethous=4817i,tenthous=4817i,odd=34i,even=35i,stringu1="HDAAAA",stringu2="QNMAAA",string4="OOOOxx" 731548800000000000 +tenk unique1=4638i,unique2=8467i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=638i,twothousand=638i,fivethous=4638i,tenthous=4638i,odd=76i,even=77i,stringu1="KWAAAA",stringu2="RNMAAA",string4="VVVVxx" 731635200000000000 +tenk unique1=3558i,unique2=8468i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=558i,twothousand=1558i,fivethous=3558i,tenthous=3558i,odd=116i,even=117i,stringu1="WGAAAA",stringu2="SNMAAA",string4="AAAAxx" 731721600000000000 +tenk unique1=9285i,unique2=8469i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=285i,twothousand=1285i,fivethous=4285i,tenthous=9285i,odd=170i,even=171i,stringu1="DTAAAA",stringu2="TNMAAA",string4="HHHHxx" 731808000000000000 +tenk unique1=848i,unique2=8470i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=848i,twothousand=848i,fivethous=848i,tenthous=848i,odd=96i,even=97i,stringu1="QGAAAA",stringu2="UNMAAA",string4="OOOOxx" 731894400000000000 +tenk unique1=8923i,unique2=8471i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=923i,twothousand=923i,fivethous=3923i,tenthous=8923i,odd=46i,even=47i,stringu1="FFAAAA",stringu2="VNMAAA",string4="VVVVxx" 731980800000000000 +tenk unique1=6826i,unique2=8472i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=826i,twothousand=826i,fivethous=1826i,tenthous=6826i,odd=52i,even=53i,stringu1="OCAAAA",stringu2="WNMAAA",string4="AAAAxx" 732067200000000000 +tenk unique1=5187i,unique2=8473i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=187i,twothousand=1187i,fivethous=187i,tenthous=5187i,odd=174i,even=175i,stringu1="NRAAAA",stringu2="XNMAAA",string4="HHHHxx" 732153600000000000 +tenk unique1=2398i,unique2=8474i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=398i,twothousand=398i,fivethous=2398i,tenthous=2398i,odd=196i,even=197i,stringu1="GOAAAA",stringu2="YNMAAA",string4="OOOOxx" 732240000000000000 +tenk unique1=7653i,unique2=8475i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=653i,twothousand=1653i,fivethous=2653i,tenthous=7653i,odd=106i,even=107i,stringu1="JIAAAA",stringu2="ZNMAAA",string4="VVVVxx" 732326400000000000 +tenk unique1=8835i,unique2=8476i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=835i,twothousand=835i,fivethous=3835i,tenthous=8835i,odd=70i,even=71i,stringu1="VBAAAA",stringu2="AOMAAA",string4="AAAAxx" 732412800000000000 +tenk unique1=5736i,unique2=8477i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=736i,twothousand=1736i,fivethous=736i,tenthous=5736i,odd=72i,even=73i,stringu1="QMAAAA",stringu2="BOMAAA",string4="HHHHxx" 732499200000000000 +tenk unique1=1238i,unique2=8478i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=238i,twothousand=1238i,fivethous=1238i,tenthous=1238i,odd=76i,even=77i,stringu1="QVAAAA",stringu2="COMAAA",string4="OOOOxx" 732585600000000000 +tenk unique1=6021i,unique2=8479i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=21i,twothousand=21i,fivethous=1021i,tenthous=6021i,odd=42i,even=43i,stringu1="PXAAAA",stringu2="DOMAAA",string4="VVVVxx" 732672000000000000 +tenk unique1=6815i,unique2=8480i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=815i,twothousand=815i,fivethous=1815i,tenthous=6815i,odd=30i,even=31i,stringu1="DCAAAA",stringu2="EOMAAA",string4="AAAAxx" 732758400000000000 +tenk unique1=2549i,unique2=8481i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=549i,twothousand=549i,fivethous=2549i,tenthous=2549i,odd=98i,even=99i,stringu1="BUAAAA",stringu2="FOMAAA",string4="HHHHxx" 732844800000000000 +tenk unique1=5657i,unique2=8482i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=657i,twothousand=1657i,fivethous=657i,tenthous=5657i,odd=114i,even=115i,stringu1="PJAAAA",stringu2="GOMAAA",string4="OOOOxx" 732931200000000000 +tenk unique1=6855i,unique2=8483i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=855i,twothousand=855i,fivethous=1855i,tenthous=6855i,odd=110i,even=111i,stringu1="RDAAAA",stringu2="HOMAAA",string4="VVVVxx" 733017600000000000 +tenk unique1=1225i,unique2=8484i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=225i,twothousand=1225i,fivethous=1225i,tenthous=1225i,odd=50i,even=51i,stringu1="DVAAAA",stringu2="IOMAAA",string4="AAAAxx" 733104000000000000 +tenk unique1=7452i,unique2=8485i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=452i,twothousand=1452i,fivethous=2452i,tenthous=7452i,odd=104i,even=105i,stringu1="QAAAAA",stringu2="JOMAAA",string4="HHHHxx" 733190400000000000 +tenk unique1=2479i,unique2=8486i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=479i,twothousand=479i,fivethous=2479i,tenthous=2479i,odd=158i,even=159i,stringu1="JRAAAA",stringu2="KOMAAA",string4="OOOOxx" 733276800000000000 +tenk unique1=7974i,unique2=8487i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=974i,twothousand=1974i,fivethous=2974i,tenthous=7974i,odd=148i,even=149i,stringu1="SUAAAA",stringu2="LOMAAA",string4="VVVVxx" 733363200000000000 +tenk unique1=1212i,unique2=8488i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=212i,twothousand=1212i,fivethous=1212i,tenthous=1212i,odd=24i,even=25i,stringu1="QUAAAA",stringu2="MOMAAA",string4="AAAAxx" 733449600000000000 +tenk unique1=8883i,unique2=8489i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=883i,twothousand=883i,fivethous=3883i,tenthous=8883i,odd=166i,even=167i,stringu1="RDAAAA",stringu2="NOMAAA",string4="HHHHxx" 733536000000000000 +tenk unique1=8150i,unique2=8490i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=150i,twothousand=150i,fivethous=3150i,tenthous=8150i,odd=100i,even=101i,stringu1="MBAAAA",stringu2="OOMAAA",string4="OOOOxx" 733622400000000000 +tenk unique1=3392i,unique2=8491i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=392i,twothousand=1392i,fivethous=3392i,tenthous=3392i,odd=184i,even=185i,stringu1="MAAAAA",stringu2="POMAAA",string4="VVVVxx" 733708800000000000 +tenk unique1=6774i,unique2=8492i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=774i,twothousand=774i,fivethous=1774i,tenthous=6774i,odd=148i,even=149i,stringu1="OAAAAA",stringu2="QOMAAA",string4="AAAAxx" 733795200000000000 +tenk unique1=904i,unique2=8493i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=904i,twothousand=904i,fivethous=904i,tenthous=904i,odd=8i,even=9i,stringu1="UIAAAA",stringu2="ROMAAA",string4="HHHHxx" 733881600000000000 +tenk unique1=5068i,unique2=8494i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=68i,twothousand=1068i,fivethous=68i,tenthous=5068i,odd=136i,even=137i,stringu1="YMAAAA",stringu2="SOMAAA",string4="OOOOxx" 733968000000000000 +tenk unique1=9339i,unique2=8495i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=339i,twothousand=1339i,fivethous=4339i,tenthous=9339i,odd=78i,even=79i,stringu1="FVAAAA",stringu2="TOMAAA",string4="VVVVxx" 734054400000000000 +tenk unique1=1062i,unique2=8496i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=62i,twothousand=1062i,fivethous=1062i,tenthous=1062i,odd=124i,even=125i,stringu1="WOAAAA",stringu2="UOMAAA",string4="AAAAxx" 734140800000000000 +tenk unique1=3841i,unique2=8497i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=841i,twothousand=1841i,fivethous=3841i,tenthous=3841i,odd=82i,even=83i,stringu1="TRAAAA",stringu2="VOMAAA",string4="HHHHxx" 734227200000000000 +tenk unique1=8924i,unique2=8498i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=924i,twothousand=924i,fivethous=3924i,tenthous=8924i,odd=48i,even=49i,stringu1="GFAAAA",stringu2="WOMAAA",string4="OOOOxx" 734313600000000000 +tenk unique1=9795i,unique2=8499i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=795i,twothousand=1795i,fivethous=4795i,tenthous=9795i,odd=190i,even=191i,stringu1="TMAAAA",stringu2="XOMAAA",string4="VVVVxx" 734400000000000000 +tenk unique1=3981i,unique2=8500i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=981i,twothousand=1981i,fivethous=3981i,tenthous=3981i,odd=162i,even=163i,stringu1="DXAAAA",stringu2="YOMAAA",string4="AAAAxx" 734486400000000000 +tenk unique1=4290i,unique2=8501i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=290i,twothousand=290i,fivethous=4290i,tenthous=4290i,odd=180i,even=181i,stringu1="AJAAAA",stringu2="ZOMAAA",string4="HHHHxx" 734572800000000000 +tenk unique1=1067i,unique2=8502i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=67i,twothousand=1067i,fivethous=1067i,tenthous=1067i,odd=134i,even=135i,stringu1="BPAAAA",stringu2="APMAAA",string4="OOOOxx" 734659200000000000 +tenk unique1=8679i,unique2=8503i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=679i,twothousand=679i,fivethous=3679i,tenthous=8679i,odd=158i,even=159i,stringu1="VVAAAA",stringu2="BPMAAA",string4="VVVVxx" 734745600000000000 +tenk unique1=2894i,unique2=8504i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=894i,twothousand=894i,fivethous=2894i,tenthous=2894i,odd=188i,even=189i,stringu1="IHAAAA",stringu2="CPMAAA",string4="AAAAxx" 734832000000000000 +tenk unique1=9248i,unique2=8505i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=248i,twothousand=1248i,fivethous=4248i,tenthous=9248i,odd=96i,even=97i,stringu1="SRAAAA",stringu2="DPMAAA",string4="HHHHxx" 734918400000000000 +tenk unique1=1072i,unique2=8506i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=72i,twothousand=1072i,fivethous=1072i,tenthous=1072i,odd=144i,even=145i,stringu1="GPAAAA",stringu2="EPMAAA",string4="OOOOxx" 735004800000000000 +tenk unique1=3510i,unique2=8507i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=510i,twothousand=1510i,fivethous=3510i,tenthous=3510i,odd=20i,even=21i,stringu1="AFAAAA",stringu2="FPMAAA",string4="VVVVxx" 735091200000000000 +tenk unique1=6871i,unique2=8508i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=871i,twothousand=871i,fivethous=1871i,tenthous=6871i,odd=142i,even=143i,stringu1="HEAAAA",stringu2="GPMAAA",string4="AAAAxx" 735177600000000000 +tenk unique1=8701i,unique2=8509i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=701i,twothousand=701i,fivethous=3701i,tenthous=8701i,odd=2i,even=3i,stringu1="RWAAAA",stringu2="HPMAAA",string4="HHHHxx" 735264000000000000 +tenk unique1=8170i,unique2=8510i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=170i,twothousand=170i,fivethous=3170i,tenthous=8170i,odd=140i,even=141i,stringu1="GCAAAA",stringu2="IPMAAA",string4="OOOOxx" 735350400000000000 +tenk unique1=2730i,unique2=8511i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=730i,twothousand=730i,fivethous=2730i,tenthous=2730i,odd=60i,even=61i,stringu1="ABAAAA",stringu2="JPMAAA",string4="VVVVxx" 735436800000000000 +tenk unique1=2668i,unique2=8512i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=668i,twothousand=668i,fivethous=2668i,tenthous=2668i,odd=136i,even=137i,stringu1="QYAAAA",stringu2="KPMAAA",string4="AAAAxx" 735523200000000000 +tenk unique1=8723i,unique2=8513i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=723i,twothousand=723i,fivethous=3723i,tenthous=8723i,odd=46i,even=47i,stringu1="NXAAAA",stringu2="LPMAAA",string4="HHHHxx" 735609600000000000 +tenk unique1=3439i,unique2=8514i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=439i,twothousand=1439i,fivethous=3439i,tenthous=3439i,odd=78i,even=79i,stringu1="HCAAAA",stringu2="MPMAAA",string4="OOOOxx" 735696000000000000 +tenk unique1=6219i,unique2=8515i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=219i,twothousand=219i,fivethous=1219i,tenthous=6219i,odd=38i,even=39i,stringu1="FFAAAA",stringu2="NPMAAA",string4="VVVVxx" 735782400000000000 +tenk unique1=4264i,unique2=8516i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=264i,twothousand=264i,fivethous=4264i,tenthous=4264i,odd=128i,even=129i,stringu1="AIAAAA",stringu2="OPMAAA",string4="AAAAxx" 735868800000000000 +tenk unique1=3929i,unique2=8517i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=929i,twothousand=1929i,fivethous=3929i,tenthous=3929i,odd=58i,even=59i,stringu1="DVAAAA",stringu2="PPMAAA",string4="HHHHxx" 735955200000000000 +tenk unique1=7i,unique2=8518i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=7i,fivethous=7i,tenthous=7i,odd=14i,even=15i,stringu1="HAAAAA",stringu2="QPMAAA",string4="OOOOxx" 736041600000000000 +tenk unique1=3737i,unique2=8519i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=737i,twothousand=1737i,fivethous=3737i,tenthous=3737i,odd=74i,even=75i,stringu1="TNAAAA",stringu2="RPMAAA",string4="VVVVxx" 736128000000000000 +tenk unique1=358i,unique2=8520i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=358i,twothousand=358i,fivethous=358i,tenthous=358i,odd=116i,even=117i,stringu1="UNAAAA",stringu2="SPMAAA",string4="AAAAxx" 736214400000000000 +tenk unique1=5128i,unique2=8521i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=128i,twothousand=1128i,fivethous=128i,tenthous=5128i,odd=56i,even=57i,stringu1="GPAAAA",stringu2="TPMAAA",string4="HHHHxx" 736300800000000000 +tenk unique1=7353i,unique2=8522i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=353i,twothousand=1353i,fivethous=2353i,tenthous=7353i,odd=106i,even=107i,stringu1="VWAAAA",stringu2="UPMAAA",string4="OOOOxx" 736387200000000000 +tenk unique1=8758i,unique2=8523i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=758i,twothousand=758i,fivethous=3758i,tenthous=8758i,odd=116i,even=117i,stringu1="WYAAAA",stringu2="VPMAAA",string4="VVVVxx" 736473600000000000 +tenk unique1=7284i,unique2=8524i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=284i,twothousand=1284i,fivethous=2284i,tenthous=7284i,odd=168i,even=169i,stringu1="EUAAAA",stringu2="WPMAAA",string4="AAAAxx" 736560000000000000 +tenk unique1=4037i,unique2=8525i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=37i,twothousand=37i,fivethous=4037i,tenthous=4037i,odd=74i,even=75i,stringu1="HZAAAA",stringu2="XPMAAA",string4="HHHHxx" 736646400000000000 +tenk unique1=435i,unique2=8526i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=435i,twothousand=435i,fivethous=435i,tenthous=435i,odd=70i,even=71i,stringu1="TQAAAA",stringu2="YPMAAA",string4="OOOOxx" 736732800000000000 +tenk unique1=3580i,unique2=8527i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=580i,twothousand=1580i,fivethous=3580i,tenthous=3580i,odd=160i,even=161i,stringu1="SHAAAA",stringu2="ZPMAAA",string4="VVVVxx" 736819200000000000 +tenk unique1=4554i,unique2=8528i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=554i,twothousand=554i,fivethous=4554i,tenthous=4554i,odd=108i,even=109i,stringu1="ETAAAA",stringu2="AQMAAA",string4="AAAAxx" 736905600000000000 +tenk unique1=4337i,unique2=8529i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=337i,twothousand=337i,fivethous=4337i,tenthous=4337i,odd=74i,even=75i,stringu1="VKAAAA",stringu2="BQMAAA",string4="HHHHxx" 736992000000000000 +tenk unique1=512i,unique2=8530i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=512i,twothousand=512i,fivethous=512i,tenthous=512i,odd=24i,even=25i,stringu1="STAAAA",stringu2="CQMAAA",string4="OOOOxx" 737078400000000000 +tenk unique1=2032i,unique2=8531i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=32i,twothousand=32i,fivethous=2032i,tenthous=2032i,odd=64i,even=65i,stringu1="EAAAAA",stringu2="DQMAAA",string4="VVVVxx" 737164800000000000 +tenk unique1=1755i,unique2=8532i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=755i,twothousand=1755i,fivethous=1755i,tenthous=1755i,odd=110i,even=111i,stringu1="NPAAAA",stringu2="EQMAAA",string4="AAAAxx" 737251200000000000 +tenk unique1=9923i,unique2=8533i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=923i,twothousand=1923i,fivethous=4923i,tenthous=9923i,odd=46i,even=47i,stringu1="RRAAAA",stringu2="FQMAAA",string4="HHHHxx" 737337600000000000 +tenk unique1=3747i,unique2=8534i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=747i,twothousand=1747i,fivethous=3747i,tenthous=3747i,odd=94i,even=95i,stringu1="DOAAAA",stringu2="GQMAAA",string4="OOOOxx" 737424000000000000 +tenk unique1=27i,unique2=8535i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=27i,twothousand=27i,fivethous=27i,tenthous=27i,odd=54i,even=55i,stringu1="BBAAAA",stringu2="HQMAAA",string4="VVVVxx" 737510400000000000 +tenk unique1=3075i,unique2=8536i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=75i,twothousand=1075i,fivethous=3075i,tenthous=3075i,odd=150i,even=151i,stringu1="HOAAAA",stringu2="IQMAAA",string4="AAAAxx" 737596800000000000 +tenk unique1=6259i,unique2=8537i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=259i,twothousand=259i,fivethous=1259i,tenthous=6259i,odd=118i,even=119i,stringu1="TGAAAA",stringu2="JQMAAA",string4="HHHHxx" 737683200000000000 +tenk unique1=2940i,unique2=8538i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=940i,twothousand=940i,fivethous=2940i,tenthous=2940i,odd=80i,even=81i,stringu1="CJAAAA",stringu2="KQMAAA",string4="OOOOxx" 737769600000000000 +tenk unique1=5724i,unique2=8539i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=724i,twothousand=1724i,fivethous=724i,tenthous=5724i,odd=48i,even=49i,stringu1="EMAAAA",stringu2="LQMAAA",string4="VVVVxx" 737856000000000000 +tenk unique1=5638i,unique2=8540i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=638i,twothousand=1638i,fivethous=638i,tenthous=5638i,odd=76i,even=77i,stringu1="WIAAAA",stringu2="MQMAAA",string4="AAAAxx" 737942400000000000 +tenk unique1=479i,unique2=8541i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=479i,twothousand=479i,fivethous=479i,tenthous=479i,odd=158i,even=159i,stringu1="LSAAAA",stringu2="NQMAAA",string4="HHHHxx" 738028800000000000 +tenk unique1=4125i,unique2=8542i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=125i,twothousand=125i,fivethous=4125i,tenthous=4125i,odd=50i,even=51i,stringu1="RCAAAA",stringu2="OQMAAA",string4="OOOOxx" 738115200000000000 +tenk unique1=1525i,unique2=8543i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=525i,twothousand=1525i,fivethous=1525i,tenthous=1525i,odd=50i,even=51i,stringu1="RGAAAA",stringu2="PQMAAA",string4="VVVVxx" 738201600000000000 +tenk unique1=7529i,unique2=8544i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=529i,twothousand=1529i,fivethous=2529i,tenthous=7529i,odd=58i,even=59i,stringu1="PDAAAA",stringu2="QQMAAA",string4="AAAAxx" 738288000000000000 +tenk unique1=931i,unique2=8545i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=931i,twothousand=931i,fivethous=931i,tenthous=931i,odd=62i,even=63i,stringu1="VJAAAA",stringu2="RQMAAA",string4="HHHHxx" 738374400000000000 +tenk unique1=5175i,unique2=8546i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=175i,twothousand=1175i,fivethous=175i,tenthous=5175i,odd=150i,even=151i,stringu1="BRAAAA",stringu2="SQMAAA",string4="OOOOxx" 738460800000000000 +tenk unique1=6798i,unique2=8547i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=798i,twothousand=798i,fivethous=1798i,tenthous=6798i,odd=196i,even=197i,stringu1="MBAAAA",stringu2="TQMAAA",string4="VVVVxx" 738547200000000000 +tenk unique1=2111i,unique2=8548i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=111i,twothousand=111i,fivethous=2111i,tenthous=2111i,odd=22i,even=23i,stringu1="FDAAAA",stringu2="UQMAAA",string4="AAAAxx" 738633600000000000 +tenk unique1=6145i,unique2=8549i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=145i,twothousand=145i,fivethous=1145i,tenthous=6145i,odd=90i,even=91i,stringu1="JCAAAA",stringu2="VQMAAA",string4="HHHHxx" 738720000000000000 +tenk unique1=4712i,unique2=8550i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=712i,twothousand=712i,fivethous=4712i,tenthous=4712i,odd=24i,even=25i,stringu1="GZAAAA",stringu2="WQMAAA",string4="OOOOxx" 738806400000000000 +tenk unique1=3110i,unique2=8551i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=110i,twothousand=1110i,fivethous=3110i,tenthous=3110i,odd=20i,even=21i,stringu1="QPAAAA",stringu2="XQMAAA",string4="VVVVxx" 738892800000000000 +tenk unique1=97i,unique2=8552i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=97i,twothousand=97i,fivethous=97i,tenthous=97i,odd=194i,even=195i,stringu1="TDAAAA",stringu2="YQMAAA",string4="AAAAxx" 738979200000000000 +tenk unique1=758i,unique2=8553i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=758i,twothousand=758i,fivethous=758i,tenthous=758i,odd=116i,even=117i,stringu1="EDAAAA",stringu2="ZQMAAA",string4="HHHHxx" 739065600000000000 +tenk unique1=1895i,unique2=8554i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=895i,twothousand=1895i,fivethous=1895i,tenthous=1895i,odd=190i,even=191i,stringu1="XUAAAA",stringu2="ARMAAA",string4="OOOOxx" 739152000000000000 +tenk unique1=5289i,unique2=8555i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=289i,twothousand=1289i,fivethous=289i,tenthous=5289i,odd=178i,even=179i,stringu1="LVAAAA",stringu2="BRMAAA",string4="VVVVxx" 739238400000000000 +tenk unique1=5026i,unique2=8556i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=26i,twothousand=1026i,fivethous=26i,tenthous=5026i,odd=52i,even=53i,stringu1="ILAAAA",stringu2="CRMAAA",string4="AAAAxx" 739324800000000000 +tenk unique1=4725i,unique2=8557i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=725i,twothousand=725i,fivethous=4725i,tenthous=4725i,odd=50i,even=51i,stringu1="TZAAAA",stringu2="DRMAAA",string4="HHHHxx" 739411200000000000 +tenk unique1=1679i,unique2=8558i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=679i,twothousand=1679i,fivethous=1679i,tenthous=1679i,odd=158i,even=159i,stringu1="PMAAAA",stringu2="ERMAAA",string4="OOOOxx" 739497600000000000 +tenk unique1=4433i,unique2=8559i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=433i,twothousand=433i,fivethous=4433i,tenthous=4433i,odd=66i,even=67i,stringu1="NOAAAA",stringu2="FRMAAA",string4="VVVVxx" 739584000000000000 +tenk unique1=5340i,unique2=8560i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=340i,twothousand=1340i,fivethous=340i,tenthous=5340i,odd=80i,even=81i,stringu1="KXAAAA",stringu2="GRMAAA",string4="AAAAxx" 739670400000000000 +tenk unique1=6340i,unique2=8561i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=340i,twothousand=340i,fivethous=1340i,tenthous=6340i,odd=80i,even=81i,stringu1="WJAAAA",stringu2="HRMAAA",string4="HHHHxx" 739756800000000000 +tenk unique1=3261i,unique2=8562i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=261i,twothousand=1261i,fivethous=3261i,tenthous=3261i,odd=122i,even=123i,stringu1="LVAAAA",stringu2="IRMAAA",string4="OOOOxx" 739843200000000000 +tenk unique1=8108i,unique2=8563i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=108i,twothousand=108i,fivethous=3108i,tenthous=8108i,odd=16i,even=17i,stringu1="WZAAAA",stringu2="JRMAAA",string4="VVVVxx" 739929600000000000 +tenk unique1=8785i,unique2=8564i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=785i,twothousand=785i,fivethous=3785i,tenthous=8785i,odd=170i,even=171i,stringu1="XZAAAA",stringu2="KRMAAA",string4="AAAAxx" 740016000000000000 +tenk unique1=7391i,unique2=8565i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=391i,twothousand=1391i,fivethous=2391i,tenthous=7391i,odd=182i,even=183i,stringu1="HYAAAA",stringu2="LRMAAA",string4="HHHHxx" 740102400000000000 +tenk unique1=1496i,unique2=8566i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=496i,twothousand=1496i,fivethous=1496i,tenthous=1496i,odd=192i,even=193i,stringu1="OFAAAA",stringu2="MRMAAA",string4="OOOOxx" 740188800000000000 +tenk unique1=1484i,unique2=8567i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=484i,twothousand=1484i,fivethous=1484i,tenthous=1484i,odd=168i,even=169i,stringu1="CFAAAA",stringu2="NRMAAA",string4="VVVVxx" 740275200000000000 +tenk unique1=5884i,unique2=8568i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=884i,twothousand=1884i,fivethous=884i,tenthous=5884i,odd=168i,even=169i,stringu1="ISAAAA",stringu2="ORMAAA",string4="AAAAxx" 740361600000000000 +tenk unique1=342i,unique2=8569i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=342i,twothousand=342i,fivethous=342i,tenthous=342i,odd=84i,even=85i,stringu1="ENAAAA",stringu2="PRMAAA",string4="HHHHxx" 740448000000000000 +tenk unique1=7659i,unique2=8570i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=659i,twothousand=1659i,fivethous=2659i,tenthous=7659i,odd=118i,even=119i,stringu1="PIAAAA",stringu2="QRMAAA",string4="OOOOxx" 740534400000000000 +tenk unique1=6635i,unique2=8571i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=635i,twothousand=635i,fivethous=1635i,tenthous=6635i,odd=70i,even=71i,stringu1="FVAAAA",stringu2="RRMAAA",string4="VVVVxx" 740620800000000000 +tenk unique1=8507i,unique2=8572i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=507i,twothousand=507i,fivethous=3507i,tenthous=8507i,odd=14i,even=15i,stringu1="FPAAAA",stringu2="SRMAAA",string4="AAAAxx" 740707200000000000 +tenk unique1=2583i,unique2=8573i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=583i,twothousand=583i,fivethous=2583i,tenthous=2583i,odd=166i,even=167i,stringu1="JVAAAA",stringu2="TRMAAA",string4="HHHHxx" 740793600000000000 +tenk unique1=6533i,unique2=8574i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=533i,twothousand=533i,fivethous=1533i,tenthous=6533i,odd=66i,even=67i,stringu1="HRAAAA",stringu2="URMAAA",string4="OOOOxx" 740880000000000000 +tenk unique1=5879i,unique2=8575i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=879i,twothousand=1879i,fivethous=879i,tenthous=5879i,odd=158i,even=159i,stringu1="DSAAAA",stringu2="VRMAAA",string4="VVVVxx" 740966400000000000 +tenk unique1=5511i,unique2=8576i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=511i,twothousand=1511i,fivethous=511i,tenthous=5511i,odd=22i,even=23i,stringu1="ZDAAAA",stringu2="WRMAAA",string4="AAAAxx" 741052800000000000 +tenk unique1=3682i,unique2=8577i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=682i,twothousand=1682i,fivethous=3682i,tenthous=3682i,odd=164i,even=165i,stringu1="QLAAAA",stringu2="XRMAAA",string4="HHHHxx" 741139200000000000 +tenk unique1=7182i,unique2=8578i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=182i,twothousand=1182i,fivethous=2182i,tenthous=7182i,odd=164i,even=165i,stringu1="GQAAAA",stringu2="YRMAAA",string4="OOOOxx" 741225600000000000 +tenk unique1=1409i,unique2=8579i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=409i,twothousand=1409i,fivethous=1409i,tenthous=1409i,odd=18i,even=19i,stringu1="FCAAAA",stringu2="ZRMAAA",string4="VVVVxx" 741312000000000000 +tenk unique1=3363i,unique2=8580i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=363i,twothousand=1363i,fivethous=3363i,tenthous=3363i,odd=126i,even=127i,stringu1="JZAAAA",stringu2="ASMAAA",string4="AAAAxx" 741398400000000000 +tenk unique1=729i,unique2=8581i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=729i,twothousand=729i,fivethous=729i,tenthous=729i,odd=58i,even=59i,stringu1="BCAAAA",stringu2="BSMAAA",string4="HHHHxx" 741484800000000000 +tenk unique1=5857i,unique2=8582i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=857i,twothousand=1857i,fivethous=857i,tenthous=5857i,odd=114i,even=115i,stringu1="HRAAAA",stringu2="CSMAAA",string4="OOOOxx" 741571200000000000 +tenk unique1=235i,unique2=8583i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=235i,twothousand=235i,fivethous=235i,tenthous=235i,odd=70i,even=71i,stringu1="BJAAAA",stringu2="DSMAAA",string4="VVVVxx" 741657600000000000 +tenk unique1=193i,unique2=8584i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=193i,twothousand=193i,fivethous=193i,tenthous=193i,odd=186i,even=187i,stringu1="LHAAAA",stringu2="ESMAAA",string4="AAAAxx" 741744000000000000 +tenk unique1=5586i,unique2=8585i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=586i,twothousand=1586i,fivethous=586i,tenthous=5586i,odd=172i,even=173i,stringu1="WGAAAA",stringu2="FSMAAA",string4="HHHHxx" 741830400000000000 +tenk unique1=6203i,unique2=8586i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=203i,twothousand=203i,fivethous=1203i,tenthous=6203i,odd=6i,even=7i,stringu1="PEAAAA",stringu2="GSMAAA",string4="OOOOxx" 741916800000000000 +tenk unique1=6795i,unique2=8587i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=795i,twothousand=795i,fivethous=1795i,tenthous=6795i,odd=190i,even=191i,stringu1="JBAAAA",stringu2="HSMAAA",string4="VVVVxx" 742003200000000000 +tenk unique1=3211i,unique2=8588i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=211i,twothousand=1211i,fivethous=3211i,tenthous=3211i,odd=22i,even=23i,stringu1="NTAAAA",stringu2="ISMAAA",string4="AAAAxx" 742089600000000000 +tenk unique1=9763i,unique2=8589i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=763i,twothousand=1763i,fivethous=4763i,tenthous=9763i,odd=126i,even=127i,stringu1="NLAAAA",stringu2="JSMAAA",string4="HHHHxx" 742176000000000000 +tenk unique1=9043i,unique2=8590i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=43i,twothousand=1043i,fivethous=4043i,tenthous=9043i,odd=86i,even=87i,stringu1="VJAAAA",stringu2="KSMAAA",string4="OOOOxx" 742262400000000000 +tenk unique1=2854i,unique2=8591i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=854i,twothousand=854i,fivethous=2854i,tenthous=2854i,odd=108i,even=109i,stringu1="UFAAAA",stringu2="LSMAAA",string4="VVVVxx" 742348800000000000 +tenk unique1=565i,unique2=8592i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=565i,twothousand=565i,fivethous=565i,tenthous=565i,odd=130i,even=131i,stringu1="TVAAAA",stringu2="MSMAAA",string4="AAAAxx" 742435200000000000 +tenk unique1=9284i,unique2=8593i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=284i,twothousand=1284i,fivethous=4284i,tenthous=9284i,odd=168i,even=169i,stringu1="CTAAAA",stringu2="NSMAAA",string4="HHHHxx" 742521600000000000 +tenk unique1=7886i,unique2=8594i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=886i,twothousand=1886i,fivethous=2886i,tenthous=7886i,odd=172i,even=173i,stringu1="IRAAAA",stringu2="OSMAAA",string4="OOOOxx" 742608000000000000 +tenk unique1=122i,unique2=8595i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=122i,twothousand=122i,fivethous=122i,tenthous=122i,odd=44i,even=45i,stringu1="SEAAAA",stringu2="PSMAAA",string4="VVVVxx" 742694400000000000 +tenk unique1=4934i,unique2=8596i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=934i,twothousand=934i,fivethous=4934i,tenthous=4934i,odd=68i,even=69i,stringu1="UHAAAA",stringu2="QSMAAA",string4="AAAAxx" 742780800000000000 +tenk unique1=1766i,unique2=8597i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=766i,twothousand=1766i,fivethous=1766i,tenthous=1766i,odd=132i,even=133i,stringu1="YPAAAA",stringu2="RSMAAA",string4="HHHHxx" 742867200000000000 +tenk unique1=2554i,unique2=8598i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=554i,twothousand=554i,fivethous=2554i,tenthous=2554i,odd=108i,even=109i,stringu1="GUAAAA",stringu2="SSMAAA",string4="OOOOxx" 742953600000000000 +tenk unique1=488i,unique2=8599i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=488i,twothousand=488i,fivethous=488i,tenthous=488i,odd=176i,even=177i,stringu1="USAAAA",stringu2="TSMAAA",string4="VVVVxx" 743040000000000000 +tenk unique1=825i,unique2=8600i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=825i,twothousand=825i,fivethous=825i,tenthous=825i,odd=50i,even=51i,stringu1="TFAAAA",stringu2="USMAAA",string4="AAAAxx" 743126400000000000 +tenk unique1=678i,unique2=8601i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=678i,twothousand=678i,fivethous=678i,tenthous=678i,odd=156i,even=157i,stringu1="CAAAAA",stringu2="VSMAAA",string4="HHHHxx" 743212800000000000 +tenk unique1=4543i,unique2=8602i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=543i,twothousand=543i,fivethous=4543i,tenthous=4543i,odd=86i,even=87i,stringu1="TSAAAA",stringu2="WSMAAA",string4="OOOOxx" 743299200000000000 +tenk unique1=1699i,unique2=8603i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=699i,twothousand=1699i,fivethous=1699i,tenthous=1699i,odd=198i,even=199i,stringu1="JNAAAA",stringu2="XSMAAA",string4="VVVVxx" 743385600000000000 +tenk unique1=3771i,unique2=8604i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=771i,twothousand=1771i,fivethous=3771i,tenthous=3771i,odd=142i,even=143i,stringu1="BPAAAA",stringu2="YSMAAA",string4="AAAAxx" 743472000000000000 +tenk unique1=1234i,unique2=8605i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=234i,twothousand=1234i,fivethous=1234i,tenthous=1234i,odd=68i,even=69i,stringu1="MVAAAA",stringu2="ZSMAAA",string4="HHHHxx" 743558400000000000 +tenk unique1=4152i,unique2=8606i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=152i,twothousand=152i,fivethous=4152i,tenthous=4152i,odd=104i,even=105i,stringu1="SDAAAA",stringu2="ATMAAA",string4="OOOOxx" 743644800000000000 +tenk unique1=1632i,unique2=8607i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=632i,twothousand=1632i,fivethous=1632i,tenthous=1632i,odd=64i,even=65i,stringu1="UKAAAA",stringu2="BTMAAA",string4="VVVVxx" 743731200000000000 +tenk unique1=4988i,unique2=8608i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=988i,twothousand=988i,fivethous=4988i,tenthous=4988i,odd=176i,even=177i,stringu1="WJAAAA",stringu2="CTMAAA",string4="AAAAxx" 743817600000000000 +tenk unique1=1980i,unique2=8609i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=980i,twothousand=1980i,fivethous=1980i,tenthous=1980i,odd=160i,even=161i,stringu1="EYAAAA",stringu2="DTMAAA",string4="HHHHxx" 743904000000000000 +tenk unique1=7479i,unique2=8610i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=479i,twothousand=1479i,fivethous=2479i,tenthous=7479i,odd=158i,even=159i,stringu1="RBAAAA",stringu2="ETMAAA",string4="OOOOxx" 743990400000000000 +tenk unique1=2586i,unique2=8611i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=586i,twothousand=586i,fivethous=2586i,tenthous=2586i,odd=172i,even=173i,stringu1="MVAAAA",stringu2="FTMAAA",string4="VVVVxx" 744076800000000000 +tenk unique1=5433i,unique2=8612i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=433i,twothousand=1433i,fivethous=433i,tenthous=5433i,odd=66i,even=67i,stringu1="ZAAAAA",stringu2="GTMAAA",string4="AAAAxx" 744163200000000000 +tenk unique1=2261i,unique2=8613i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=261i,twothousand=261i,fivethous=2261i,tenthous=2261i,odd=122i,even=123i,stringu1="ZIAAAA",stringu2="HTMAAA",string4="HHHHxx" 744249600000000000 +tenk unique1=1180i,unique2=8614i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=180i,twothousand=1180i,fivethous=1180i,tenthous=1180i,odd=160i,even=161i,stringu1="KTAAAA",stringu2="ITMAAA",string4="OOOOxx" 744336000000000000 +tenk unique1=3938i,unique2=8615i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=938i,twothousand=1938i,fivethous=3938i,tenthous=3938i,odd=76i,even=77i,stringu1="MVAAAA",stringu2="JTMAAA",string4="VVVVxx" 744422400000000000 +tenk unique1=6714i,unique2=8616i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=714i,twothousand=714i,fivethous=1714i,tenthous=6714i,odd=28i,even=29i,stringu1="GYAAAA",stringu2="KTMAAA",string4="AAAAxx" 744508800000000000 +tenk unique1=2890i,unique2=8617i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=890i,twothousand=890i,fivethous=2890i,tenthous=2890i,odd=180i,even=181i,stringu1="EHAAAA",stringu2="LTMAAA",string4="HHHHxx" 744595200000000000 +tenk unique1=7379i,unique2=8618i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=379i,twothousand=1379i,fivethous=2379i,tenthous=7379i,odd=158i,even=159i,stringu1="VXAAAA",stringu2="MTMAAA",string4="OOOOxx" 744681600000000000 +tenk unique1=5896i,unique2=8619i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=896i,twothousand=1896i,fivethous=896i,tenthous=5896i,odd=192i,even=193i,stringu1="USAAAA",stringu2="NTMAAA",string4="VVVVxx" 744768000000000000 +tenk unique1=5949i,unique2=8620i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=949i,twothousand=1949i,fivethous=949i,tenthous=5949i,odd=98i,even=99i,stringu1="VUAAAA",stringu2="OTMAAA",string4="AAAAxx" 744854400000000000 +tenk unique1=3194i,unique2=8621i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=194i,twothousand=1194i,fivethous=3194i,tenthous=3194i,odd=188i,even=189i,stringu1="WSAAAA",stringu2="PTMAAA",string4="HHHHxx" 744940800000000000 +tenk unique1=9325i,unique2=8622i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=325i,twothousand=1325i,fivethous=4325i,tenthous=9325i,odd=50i,even=51i,stringu1="RUAAAA",stringu2="QTMAAA",string4="OOOOxx" 745027200000000000 +tenk unique1=9531i,unique2=8623i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=531i,twothousand=1531i,fivethous=4531i,tenthous=9531i,odd=62i,even=63i,stringu1="PCAAAA",stringu2="RTMAAA",string4="VVVVxx" 745113600000000000 +tenk unique1=711i,unique2=8624i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=711i,twothousand=711i,fivethous=711i,tenthous=711i,odd=22i,even=23i,stringu1="JBAAAA",stringu2="STMAAA",string4="AAAAxx" 745200000000000000 +tenk unique1=2450i,unique2=8625i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=450i,twothousand=450i,fivethous=2450i,tenthous=2450i,odd=100i,even=101i,stringu1="GQAAAA",stringu2="TTMAAA",string4="HHHHxx" 745286400000000000 +tenk unique1=1929i,unique2=8626i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=929i,twothousand=1929i,fivethous=1929i,tenthous=1929i,odd=58i,even=59i,stringu1="FWAAAA",stringu2="UTMAAA",string4="OOOOxx" 745372800000000000 +tenk unique1=6165i,unique2=8627i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=165i,twothousand=165i,fivethous=1165i,tenthous=6165i,odd=130i,even=131i,stringu1="DDAAAA",stringu2="VTMAAA",string4="VVVVxx" 745459200000000000 +tenk unique1=4050i,unique2=8628i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=50i,twothousand=50i,fivethous=4050i,tenthous=4050i,odd=100i,even=101i,stringu1="UZAAAA",stringu2="WTMAAA",string4="AAAAxx" 745545600000000000 +tenk unique1=9011i,unique2=8629i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=11i,twothousand=1011i,fivethous=4011i,tenthous=9011i,odd=22i,even=23i,stringu1="PIAAAA",stringu2="XTMAAA",string4="HHHHxx" 745632000000000000 +tenk unique1=7916i,unique2=8630i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=916i,twothousand=1916i,fivethous=2916i,tenthous=7916i,odd=32i,even=33i,stringu1="MSAAAA",stringu2="YTMAAA",string4="OOOOxx" 745718400000000000 +tenk unique1=9136i,unique2=8631i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=136i,twothousand=1136i,fivethous=4136i,tenthous=9136i,odd=72i,even=73i,stringu1="KNAAAA",stringu2="ZTMAAA",string4="VVVVxx" 745804800000000000 +tenk unique1=8782i,unique2=8632i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=782i,twothousand=782i,fivethous=3782i,tenthous=8782i,odd=164i,even=165i,stringu1="UZAAAA",stringu2="AUMAAA",string4="AAAAxx" 745891200000000000 +tenk unique1=8491i,unique2=8633i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=491i,twothousand=491i,fivethous=3491i,tenthous=8491i,odd=182i,even=183i,stringu1="POAAAA",stringu2="BUMAAA",string4="HHHHxx" 745977600000000000 +tenk unique1=5114i,unique2=8634i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=114i,twothousand=1114i,fivethous=114i,tenthous=5114i,odd=28i,even=29i,stringu1="SOAAAA",stringu2="CUMAAA",string4="OOOOxx" 746064000000000000 +tenk unique1=5815i,unique2=8635i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=815i,twothousand=1815i,fivethous=815i,tenthous=5815i,odd=30i,even=31i,stringu1="RPAAAA",stringu2="DUMAAA",string4="VVVVxx" 746150400000000000 +tenk unique1=5628i,unique2=8636i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=628i,twothousand=1628i,fivethous=628i,tenthous=5628i,odd=56i,even=57i,stringu1="MIAAAA",stringu2="EUMAAA",string4="AAAAxx" 746236800000000000 +tenk unique1=810i,unique2=8637i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=810i,twothousand=810i,fivethous=810i,tenthous=810i,odd=20i,even=21i,stringu1="EFAAAA",stringu2="FUMAAA",string4="HHHHxx" 746323200000000000 +tenk unique1=6178i,unique2=8638i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=178i,twothousand=178i,fivethous=1178i,tenthous=6178i,odd=156i,even=157i,stringu1="QDAAAA",stringu2="GUMAAA",string4="OOOOxx" 746409600000000000 +tenk unique1=2619i,unique2=8639i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=619i,twothousand=619i,fivethous=2619i,tenthous=2619i,odd=38i,even=39i,stringu1="TWAAAA",stringu2="HUMAAA",string4="VVVVxx" 746496000000000000 +tenk unique1=3340i,unique2=8640i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=340i,twothousand=1340i,fivethous=3340i,tenthous=3340i,odd=80i,even=81i,stringu1="MYAAAA",stringu2="IUMAAA",string4="AAAAxx" 746582400000000000 +tenk unique1=2491i,unique2=8641i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=491i,twothousand=491i,fivethous=2491i,tenthous=2491i,odd=182i,even=183i,stringu1="VRAAAA",stringu2="JUMAAA",string4="HHHHxx" 746668800000000000 +tenk unique1=3574i,unique2=8642i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=574i,twothousand=1574i,fivethous=3574i,tenthous=3574i,odd=148i,even=149i,stringu1="MHAAAA",stringu2="KUMAAA",string4="OOOOxx" 746755200000000000 +tenk unique1=6754i,unique2=8643i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=754i,twothousand=754i,fivethous=1754i,tenthous=6754i,odd=108i,even=109i,stringu1="UZAAAA",stringu2="LUMAAA",string4="VVVVxx" 746841600000000000 +tenk unique1=1566i,unique2=8644i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=566i,twothousand=1566i,fivethous=1566i,tenthous=1566i,odd=132i,even=133i,stringu1="GIAAAA",stringu2="MUMAAA",string4="AAAAxx" 746928000000000000 +tenk unique1=9174i,unique2=8645i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=174i,twothousand=1174i,fivethous=4174i,tenthous=9174i,odd=148i,even=149i,stringu1="WOAAAA",stringu2="NUMAAA",string4="HHHHxx" 747014400000000000 +tenk unique1=1520i,unique2=8646i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=520i,twothousand=1520i,fivethous=1520i,tenthous=1520i,odd=40i,even=41i,stringu1="MGAAAA",stringu2="OUMAAA",string4="OOOOxx" 747100800000000000 +tenk unique1=2691i,unique2=8647i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=691i,twothousand=691i,fivethous=2691i,tenthous=2691i,odd=182i,even=183i,stringu1="NZAAAA",stringu2="PUMAAA",string4="VVVVxx" 747187200000000000 +tenk unique1=6961i,unique2=8648i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=961i,twothousand=961i,fivethous=1961i,tenthous=6961i,odd=122i,even=123i,stringu1="THAAAA",stringu2="QUMAAA",string4="AAAAxx" 747273600000000000 +tenk unique1=5722i,unique2=8649i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=722i,twothousand=1722i,fivethous=722i,tenthous=5722i,odd=44i,even=45i,stringu1="CMAAAA",stringu2="RUMAAA",string4="HHHHxx" 747360000000000000 +tenk unique1=9707i,unique2=8650i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=707i,twothousand=1707i,fivethous=4707i,tenthous=9707i,odd=14i,even=15i,stringu1="JJAAAA",stringu2="SUMAAA",string4="OOOOxx" 747446400000000000 +tenk unique1=2891i,unique2=8651i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=891i,twothousand=891i,fivethous=2891i,tenthous=2891i,odd=182i,even=183i,stringu1="FHAAAA",stringu2="TUMAAA",string4="VVVVxx" 747532800000000000 +tenk unique1=341i,unique2=8652i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=341i,twothousand=341i,fivethous=341i,tenthous=341i,odd=82i,even=83i,stringu1="DNAAAA",stringu2="UUMAAA",string4="AAAAxx" 747619200000000000 +tenk unique1=4690i,unique2=8653i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=690i,twothousand=690i,fivethous=4690i,tenthous=4690i,odd=180i,even=181i,stringu1="KYAAAA",stringu2="VUMAAA",string4="HHHHxx" 747705600000000000 +tenk unique1=7841i,unique2=8654i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=841i,twothousand=1841i,fivethous=2841i,tenthous=7841i,odd=82i,even=83i,stringu1="PPAAAA",stringu2="WUMAAA",string4="OOOOxx" 747792000000000000 +tenk unique1=6615i,unique2=8655i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=615i,twothousand=615i,fivethous=1615i,tenthous=6615i,odd=30i,even=31i,stringu1="LUAAAA",stringu2="XUMAAA",string4="VVVVxx" 747878400000000000 +tenk unique1=9169i,unique2=8656i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=169i,twothousand=1169i,fivethous=4169i,tenthous=9169i,odd=138i,even=139i,stringu1="ROAAAA",stringu2="YUMAAA",string4="AAAAxx" 747964800000000000 +tenk unique1=6689i,unique2=8657i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=689i,twothousand=689i,fivethous=1689i,tenthous=6689i,odd=178i,even=179i,stringu1="HXAAAA",stringu2="ZUMAAA",string4="HHHHxx" 748051200000000000 +tenk unique1=8721i,unique2=8658i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=721i,twothousand=721i,fivethous=3721i,tenthous=8721i,odd=42i,even=43i,stringu1="LXAAAA",stringu2="AVMAAA",string4="OOOOxx" 748137600000000000 +tenk unique1=7508i,unique2=8659i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=508i,twothousand=1508i,fivethous=2508i,tenthous=7508i,odd=16i,even=17i,stringu1="UCAAAA",stringu2="BVMAAA",string4="VVVVxx" 748224000000000000 +tenk unique1=8631i,unique2=8660i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=631i,twothousand=631i,fivethous=3631i,tenthous=8631i,odd=62i,even=63i,stringu1="ZTAAAA",stringu2="CVMAAA",string4="AAAAxx" 748310400000000000 +tenk unique1=480i,unique2=8661i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=480i,twothousand=480i,fivethous=480i,tenthous=480i,odd=160i,even=161i,stringu1="MSAAAA",stringu2="DVMAAA",string4="HHHHxx" 748396800000000000 +tenk unique1=7094i,unique2=8662i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=94i,twothousand=1094i,fivethous=2094i,tenthous=7094i,odd=188i,even=189i,stringu1="WMAAAA",stringu2="EVMAAA",string4="OOOOxx" 748483200000000000 +tenk unique1=319i,unique2=8663i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=319i,twothousand=319i,fivethous=319i,tenthous=319i,odd=38i,even=39i,stringu1="HMAAAA",stringu2="FVMAAA",string4="VVVVxx" 748569600000000000 +tenk unique1=9421i,unique2=8664i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=421i,twothousand=1421i,fivethous=4421i,tenthous=9421i,odd=42i,even=43i,stringu1="JYAAAA",stringu2="GVMAAA",string4="AAAAxx" 748656000000000000 +tenk unique1=4352i,unique2=8665i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=352i,twothousand=352i,fivethous=4352i,tenthous=4352i,odd=104i,even=105i,stringu1="KLAAAA",stringu2="HVMAAA",string4="HHHHxx" 748742400000000000 +tenk unique1=5019i,unique2=8666i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=19i,twothousand=1019i,fivethous=19i,tenthous=5019i,odd=38i,even=39i,stringu1="BLAAAA",stringu2="IVMAAA",string4="OOOOxx" 748828800000000000 +tenk unique1=3956i,unique2=8667i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=956i,twothousand=1956i,fivethous=3956i,tenthous=3956i,odd=112i,even=113i,stringu1="EWAAAA",stringu2="JVMAAA",string4="VVVVxx" 748915200000000000 +tenk unique1=114i,unique2=8668i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=114i,twothousand=114i,fivethous=114i,tenthous=114i,odd=28i,even=29i,stringu1="KEAAAA",stringu2="KVMAAA",string4="AAAAxx" 749001600000000000 +tenk unique1=1196i,unique2=8669i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=196i,twothousand=1196i,fivethous=1196i,tenthous=1196i,odd=192i,even=193i,stringu1="AUAAAA",stringu2="LVMAAA",string4="HHHHxx" 749088000000000000 +tenk unique1=1407i,unique2=8670i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=407i,twothousand=1407i,fivethous=1407i,tenthous=1407i,odd=14i,even=15i,stringu1="DCAAAA",stringu2="MVMAAA",string4="OOOOxx" 749174400000000000 +tenk unique1=7432i,unique2=8671i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=432i,twothousand=1432i,fivethous=2432i,tenthous=7432i,odd=64i,even=65i,stringu1="WZAAAA",stringu2="NVMAAA",string4="VVVVxx" 749260800000000000 +tenk unique1=3141i,unique2=8672i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=141i,twothousand=1141i,fivethous=3141i,tenthous=3141i,odd=82i,even=83i,stringu1="VQAAAA",stringu2="OVMAAA",string4="AAAAxx" 749347200000000000 +tenk unique1=2073i,unique2=8673i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=73i,twothousand=73i,fivethous=2073i,tenthous=2073i,odd=146i,even=147i,stringu1="TBAAAA",stringu2="PVMAAA",string4="HHHHxx" 749433600000000000 +tenk unique1=3400i,unique2=8674i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=400i,twothousand=1400i,fivethous=3400i,tenthous=3400i,odd=0i,even=1i,stringu1="UAAAAA",stringu2="QVMAAA",string4="OOOOxx" 749520000000000000 +tenk unique1=505i,unique2=8675i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=505i,twothousand=505i,fivethous=505i,tenthous=505i,odd=10i,even=11i,stringu1="LTAAAA",stringu2="RVMAAA",string4="VVVVxx" 749606400000000000 +tenk unique1=1263i,unique2=8676i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=263i,twothousand=1263i,fivethous=1263i,tenthous=1263i,odd=126i,even=127i,stringu1="PWAAAA",stringu2="SVMAAA",string4="AAAAxx" 749692800000000000 +tenk unique1=190i,unique2=8677i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=190i,twothousand=190i,fivethous=190i,tenthous=190i,odd=180i,even=181i,stringu1="IHAAAA",stringu2="TVMAAA",string4="HHHHxx" 749779200000000000 +tenk unique1=6686i,unique2=8678i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=686i,twothousand=686i,fivethous=1686i,tenthous=6686i,odd=172i,even=173i,stringu1="EXAAAA",stringu2="UVMAAA",string4="OOOOxx" 749865600000000000 +tenk unique1=9821i,unique2=8679i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=821i,twothousand=1821i,fivethous=4821i,tenthous=9821i,odd=42i,even=43i,stringu1="TNAAAA",stringu2="VVMAAA",string4="VVVVxx" 749952000000000000 +tenk unique1=1119i,unique2=8680i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=119i,twothousand=1119i,fivethous=1119i,tenthous=1119i,odd=38i,even=39i,stringu1="BRAAAA",stringu2="WVMAAA",string4="AAAAxx" 750038400000000000 +tenk unique1=2955i,unique2=8681i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=955i,twothousand=955i,fivethous=2955i,tenthous=2955i,odd=110i,even=111i,stringu1="RJAAAA",stringu2="XVMAAA",string4="HHHHxx" 750124800000000000 +tenk unique1=224i,unique2=8682i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=224i,twothousand=224i,fivethous=224i,tenthous=224i,odd=48i,even=49i,stringu1="QIAAAA",stringu2="YVMAAA",string4="OOOOxx" 750211200000000000 +tenk unique1=7562i,unique2=8683i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=562i,twothousand=1562i,fivethous=2562i,tenthous=7562i,odd=124i,even=125i,stringu1="WEAAAA",stringu2="ZVMAAA",string4="VVVVxx" 750297600000000000 +tenk unique1=8845i,unique2=8684i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=845i,twothousand=845i,fivethous=3845i,tenthous=8845i,odd=90i,even=91i,stringu1="FCAAAA",stringu2="AWMAAA",string4="AAAAxx" 750384000000000000 +tenk unique1=5405i,unique2=8685i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=405i,twothousand=1405i,fivethous=405i,tenthous=5405i,odd=10i,even=11i,stringu1="XZAAAA",stringu2="BWMAAA",string4="HHHHxx" 750470400000000000 +tenk unique1=9192i,unique2=8686i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=192i,twothousand=1192i,fivethous=4192i,tenthous=9192i,odd=184i,even=185i,stringu1="OPAAAA",stringu2="CWMAAA",string4="OOOOxx" 750556800000000000 +tenk unique1=4927i,unique2=8687i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=927i,twothousand=927i,fivethous=4927i,tenthous=4927i,odd=54i,even=55i,stringu1="NHAAAA",stringu2="DWMAAA",string4="VVVVxx" 750643200000000000 +tenk unique1=997i,unique2=8688i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=997i,twothousand=997i,fivethous=997i,tenthous=997i,odd=194i,even=195i,stringu1="JMAAAA",stringu2="EWMAAA",string4="AAAAxx" 750729600000000000 +tenk unique1=989i,unique2=8689i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=989i,twothousand=989i,fivethous=989i,tenthous=989i,odd=178i,even=179i,stringu1="BMAAAA",stringu2="FWMAAA",string4="HHHHxx" 750816000000000000 +tenk unique1=7258i,unique2=8690i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=258i,twothousand=1258i,fivethous=2258i,tenthous=7258i,odd=116i,even=117i,stringu1="ETAAAA",stringu2="GWMAAA",string4="OOOOxx" 750902400000000000 +tenk unique1=6899i,unique2=8691i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=899i,twothousand=899i,fivethous=1899i,tenthous=6899i,odd=198i,even=199i,stringu1="JFAAAA",stringu2="HWMAAA",string4="VVVVxx" 750988800000000000 +tenk unique1=1770i,unique2=8692i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=770i,twothousand=1770i,fivethous=1770i,tenthous=1770i,odd=140i,even=141i,stringu1="CQAAAA",stringu2="IWMAAA",string4="AAAAxx" 751075200000000000 +tenk unique1=4423i,unique2=8693i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=423i,twothousand=423i,fivethous=4423i,tenthous=4423i,odd=46i,even=47i,stringu1="DOAAAA",stringu2="JWMAAA",string4="HHHHxx" 751161600000000000 +tenk unique1=5671i,unique2=8694i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=671i,twothousand=1671i,fivethous=671i,tenthous=5671i,odd=142i,even=143i,stringu1="DKAAAA",stringu2="KWMAAA",string4="OOOOxx" 751248000000000000 +tenk unique1=8393i,unique2=8695i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=393i,twothousand=393i,fivethous=3393i,tenthous=8393i,odd=186i,even=187i,stringu1="VKAAAA",stringu2="LWMAAA",string4="VVVVxx" 751334400000000000 +tenk unique1=4355i,unique2=8696i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=355i,twothousand=355i,fivethous=4355i,tenthous=4355i,odd=110i,even=111i,stringu1="NLAAAA",stringu2="MWMAAA",string4="AAAAxx" 751420800000000000 +tenk unique1=3919i,unique2=8697i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=919i,twothousand=1919i,fivethous=3919i,tenthous=3919i,odd=38i,even=39i,stringu1="TUAAAA",stringu2="NWMAAA",string4="HHHHxx" 751507200000000000 +tenk unique1=338i,unique2=8698i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=338i,twothousand=338i,fivethous=338i,tenthous=338i,odd=76i,even=77i,stringu1="ANAAAA",stringu2="OWMAAA",string4="OOOOxx" 751593600000000000 +tenk unique1=5790i,unique2=8699i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=790i,twothousand=1790i,fivethous=790i,tenthous=5790i,odd=180i,even=181i,stringu1="SOAAAA",stringu2="PWMAAA",string4="VVVVxx" 751680000000000000 +tenk unique1=1452i,unique2=8700i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=452i,twothousand=1452i,fivethous=1452i,tenthous=1452i,odd=104i,even=105i,stringu1="WDAAAA",stringu2="QWMAAA",string4="AAAAxx" 751766400000000000 +tenk unique1=939i,unique2=8701i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=939i,twothousand=939i,fivethous=939i,tenthous=939i,odd=78i,even=79i,stringu1="DKAAAA",stringu2="RWMAAA",string4="HHHHxx" 751852800000000000 +tenk unique1=8913i,unique2=8702i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=913i,twothousand=913i,fivethous=3913i,tenthous=8913i,odd=26i,even=27i,stringu1="VEAAAA",stringu2="SWMAAA",string4="OOOOxx" 751939200000000000 +tenk unique1=7157i,unique2=8703i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=157i,twothousand=1157i,fivethous=2157i,tenthous=7157i,odd=114i,even=115i,stringu1="HPAAAA",stringu2="TWMAAA",string4="VVVVxx" 752025600000000000 +tenk unique1=7240i,unique2=8704i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=240i,twothousand=1240i,fivethous=2240i,tenthous=7240i,odd=80i,even=81i,stringu1="MSAAAA",stringu2="UWMAAA",string4="AAAAxx" 752112000000000000 +tenk unique1=3492i,unique2=8705i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=492i,twothousand=1492i,fivethous=3492i,tenthous=3492i,odd=184i,even=185i,stringu1="IEAAAA",stringu2="VWMAAA",string4="HHHHxx" 752198400000000000 +tenk unique1=3464i,unique2=8706i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=464i,twothousand=1464i,fivethous=3464i,tenthous=3464i,odd=128i,even=129i,stringu1="GDAAAA",stringu2="WWMAAA",string4="OOOOxx" 752284800000000000 +tenk unique1=388i,unique2=8707i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=388i,twothousand=388i,fivethous=388i,tenthous=388i,odd=176i,even=177i,stringu1="YOAAAA",stringu2="XWMAAA",string4="VVVVxx" 752371200000000000 +tenk unique1=4135i,unique2=8708i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=135i,twothousand=135i,fivethous=4135i,tenthous=4135i,odd=70i,even=71i,stringu1="BDAAAA",stringu2="YWMAAA",string4="AAAAxx" 752457600000000000 +tenk unique1=1194i,unique2=8709i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=194i,twothousand=1194i,fivethous=1194i,tenthous=1194i,odd=188i,even=189i,stringu1="YTAAAA",stringu2="ZWMAAA",string4="HHHHxx" 752544000000000000 +tenk unique1=5476i,unique2=8710i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=476i,twothousand=1476i,fivethous=476i,tenthous=5476i,odd=152i,even=153i,stringu1="QCAAAA",stringu2="AXMAAA",string4="OOOOxx" 752630400000000000 +tenk unique1=9844i,unique2=8711i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=844i,twothousand=1844i,fivethous=4844i,tenthous=9844i,odd=88i,even=89i,stringu1="QOAAAA",stringu2="BXMAAA",string4="VVVVxx" 752716800000000000 +tenk unique1=9364i,unique2=8712i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=364i,twothousand=1364i,fivethous=4364i,tenthous=9364i,odd=128i,even=129i,stringu1="EWAAAA",stringu2="CXMAAA",string4="AAAAxx" 752803200000000000 +tenk unique1=5238i,unique2=8713i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=238i,twothousand=1238i,fivethous=238i,tenthous=5238i,odd=76i,even=77i,stringu1="MTAAAA",stringu2="DXMAAA",string4="HHHHxx" 752889600000000000 +tenk unique1=3712i,unique2=8714i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=712i,twothousand=1712i,fivethous=3712i,tenthous=3712i,odd=24i,even=25i,stringu1="UMAAAA",stringu2="EXMAAA",string4="OOOOxx" 752976000000000000 +tenk unique1=6189i,unique2=8715i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=189i,twothousand=189i,fivethous=1189i,tenthous=6189i,odd=178i,even=179i,stringu1="BEAAAA",stringu2="FXMAAA",string4="VVVVxx" 753062400000000000 +tenk unique1=5257i,unique2=8716i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=257i,twothousand=1257i,fivethous=257i,tenthous=5257i,odd=114i,even=115i,stringu1="FUAAAA",stringu2="GXMAAA",string4="AAAAxx" 753148800000000000 +tenk unique1=81i,unique2=8717i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=81i,twothousand=81i,fivethous=81i,tenthous=81i,odd=162i,even=163i,stringu1="DDAAAA",stringu2="HXMAAA",string4="HHHHxx" 753235200000000000 +tenk unique1=3289i,unique2=8718i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=289i,twothousand=1289i,fivethous=3289i,tenthous=3289i,odd=178i,even=179i,stringu1="NWAAAA",stringu2="IXMAAA",string4="OOOOxx" 753321600000000000 +tenk unique1=1177i,unique2=8719i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=177i,twothousand=1177i,fivethous=1177i,tenthous=1177i,odd=154i,even=155i,stringu1="HTAAAA",stringu2="JXMAAA",string4="VVVVxx" 753408000000000000 +tenk unique1=5038i,unique2=8720i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=38i,twothousand=1038i,fivethous=38i,tenthous=5038i,odd=76i,even=77i,stringu1="ULAAAA",stringu2="KXMAAA",string4="AAAAxx" 753494400000000000 +tenk unique1=325i,unique2=8721i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=325i,twothousand=325i,fivethous=325i,tenthous=325i,odd=50i,even=51i,stringu1="NMAAAA",stringu2="LXMAAA",string4="HHHHxx" 753580800000000000 +tenk unique1=7221i,unique2=8722i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=221i,twothousand=1221i,fivethous=2221i,tenthous=7221i,odd=42i,even=43i,stringu1="TRAAAA",stringu2="MXMAAA",string4="OOOOxx" 753667200000000000 +tenk unique1=7123i,unique2=8723i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=123i,twothousand=1123i,fivethous=2123i,tenthous=7123i,odd=46i,even=47i,stringu1="ZNAAAA",stringu2="NXMAAA",string4="VVVVxx" 753753600000000000 +tenk unique1=6364i,unique2=8724i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=364i,twothousand=364i,fivethous=1364i,tenthous=6364i,odd=128i,even=129i,stringu1="UKAAAA",stringu2="OXMAAA",string4="AAAAxx" 753840000000000000 +tenk unique1=4468i,unique2=8725i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=468i,twothousand=468i,fivethous=4468i,tenthous=4468i,odd=136i,even=137i,stringu1="WPAAAA",stringu2="PXMAAA",string4="HHHHxx" 753926400000000000 +tenk unique1=9185i,unique2=8726i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=185i,twothousand=1185i,fivethous=4185i,tenthous=9185i,odd=170i,even=171i,stringu1="HPAAAA",stringu2="QXMAAA",string4="OOOOxx" 754012800000000000 +tenk unique1=4158i,unique2=8727i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=158i,twothousand=158i,fivethous=4158i,tenthous=4158i,odd=116i,even=117i,stringu1="YDAAAA",stringu2="RXMAAA",string4="VVVVxx" 754099200000000000 +tenk unique1=9439i,unique2=8728i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=439i,twothousand=1439i,fivethous=4439i,tenthous=9439i,odd=78i,even=79i,stringu1="BZAAAA",stringu2="SXMAAA",string4="AAAAxx" 754185600000000000 +tenk unique1=7759i,unique2=8729i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=759i,twothousand=1759i,fivethous=2759i,tenthous=7759i,odd=118i,even=119i,stringu1="LMAAAA",stringu2="TXMAAA",string4="HHHHxx" 754272000000000000 +tenk unique1=3325i,unique2=8730i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=325i,twothousand=1325i,fivethous=3325i,tenthous=3325i,odd=50i,even=51i,stringu1="XXAAAA",stringu2="UXMAAA",string4="OOOOxx" 754358400000000000 +tenk unique1=7991i,unique2=8731i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=991i,twothousand=1991i,fivethous=2991i,tenthous=7991i,odd=182i,even=183i,stringu1="JVAAAA",stringu2="VXMAAA",string4="VVVVxx" 754444800000000000 +tenk unique1=1650i,unique2=8732i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=650i,twothousand=1650i,fivethous=1650i,tenthous=1650i,odd=100i,even=101i,stringu1="MLAAAA",stringu2="WXMAAA",string4="AAAAxx" 754531200000000000 +tenk unique1=8395i,unique2=8733i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=395i,twothousand=395i,fivethous=3395i,tenthous=8395i,odd=190i,even=191i,stringu1="XKAAAA",stringu2="XXMAAA",string4="HHHHxx" 754617600000000000 +tenk unique1=286i,unique2=8734i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=286i,twothousand=286i,fivethous=286i,tenthous=286i,odd=172i,even=173i,stringu1="ALAAAA",stringu2="YXMAAA",string4="OOOOxx" 754704000000000000 +tenk unique1=1507i,unique2=8735i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=507i,twothousand=1507i,fivethous=1507i,tenthous=1507i,odd=14i,even=15i,stringu1="ZFAAAA",stringu2="ZXMAAA",string4="VVVVxx" 754790400000000000 +tenk unique1=4122i,unique2=8736i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=122i,twothousand=122i,fivethous=4122i,tenthous=4122i,odd=44i,even=45i,stringu1="OCAAAA",stringu2="AYMAAA",string4="AAAAxx" 754876800000000000 +tenk unique1=2625i,unique2=8737i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=625i,twothousand=625i,fivethous=2625i,tenthous=2625i,odd=50i,even=51i,stringu1="ZWAAAA",stringu2="BYMAAA",string4="HHHHxx" 754963200000000000 +tenk unique1=1140i,unique2=8738i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=140i,twothousand=1140i,fivethous=1140i,tenthous=1140i,odd=80i,even=81i,stringu1="WRAAAA",stringu2="CYMAAA",string4="OOOOxx" 755049600000000000 +tenk unique1=5262i,unique2=8739i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=262i,twothousand=1262i,fivethous=262i,tenthous=5262i,odd=124i,even=125i,stringu1="KUAAAA",stringu2="DYMAAA",string4="VVVVxx" 755136000000000000 +tenk unique1=4919i,unique2=8740i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=919i,twothousand=919i,fivethous=4919i,tenthous=4919i,odd=38i,even=39i,stringu1="FHAAAA",stringu2="EYMAAA",string4="AAAAxx" 755222400000000000 +tenk unique1=7266i,unique2=8741i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=266i,twothousand=1266i,fivethous=2266i,tenthous=7266i,odd=132i,even=133i,stringu1="MTAAAA",stringu2="FYMAAA",string4="HHHHxx" 755308800000000000 +tenk unique1=630i,unique2=8742i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=630i,twothousand=630i,fivethous=630i,tenthous=630i,odd=60i,even=61i,stringu1="GYAAAA",stringu2="GYMAAA",string4="OOOOxx" 755395200000000000 +tenk unique1=2129i,unique2=8743i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=129i,twothousand=129i,fivethous=2129i,tenthous=2129i,odd=58i,even=59i,stringu1="XDAAAA",stringu2="HYMAAA",string4="VVVVxx" 755481600000000000 +tenk unique1=9552i,unique2=8744i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=552i,twothousand=1552i,fivethous=4552i,tenthous=9552i,odd=104i,even=105i,stringu1="KDAAAA",stringu2="IYMAAA",string4="AAAAxx" 755568000000000000 +tenk unique1=3018i,unique2=8745i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=18i,twothousand=1018i,fivethous=3018i,tenthous=3018i,odd=36i,even=37i,stringu1="CMAAAA",stringu2="JYMAAA",string4="HHHHxx" 755654400000000000 +tenk unique1=7145i,unique2=8746i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=145i,twothousand=1145i,fivethous=2145i,tenthous=7145i,odd=90i,even=91i,stringu1="VOAAAA",stringu2="KYMAAA",string4="OOOOxx" 755740800000000000 +tenk unique1=1633i,unique2=8747i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=633i,twothousand=1633i,fivethous=1633i,tenthous=1633i,odd=66i,even=67i,stringu1="VKAAAA",stringu2="LYMAAA",string4="VVVVxx" 755827200000000000 +tenk unique1=7957i,unique2=8748i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=957i,twothousand=1957i,fivethous=2957i,tenthous=7957i,odd=114i,even=115i,stringu1="BUAAAA",stringu2="MYMAAA",string4="AAAAxx" 755913600000000000 +tenk unique1=774i,unique2=8749i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=774i,twothousand=774i,fivethous=774i,tenthous=774i,odd=148i,even=149i,stringu1="UDAAAA",stringu2="NYMAAA",string4="HHHHxx" 756000000000000000 +tenk unique1=9371i,unique2=8750i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=371i,twothousand=1371i,fivethous=4371i,tenthous=9371i,odd=142i,even=143i,stringu1="LWAAAA",stringu2="OYMAAA",string4="OOOOxx" 756086400000000000 +tenk unique1=6007i,unique2=8751i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=7i,fivethous=1007i,tenthous=6007i,odd=14i,even=15i,stringu1="BXAAAA",stringu2="PYMAAA",string4="VVVVxx" 756172800000000000 +tenk unique1=5277i,unique2=8752i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=277i,twothousand=1277i,fivethous=277i,tenthous=5277i,odd=154i,even=155i,stringu1="ZUAAAA",stringu2="QYMAAA",string4="AAAAxx" 756259200000000000 +tenk unique1=9426i,unique2=8753i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=426i,twothousand=1426i,fivethous=4426i,tenthous=9426i,odd=52i,even=53i,stringu1="OYAAAA",stringu2="RYMAAA",string4="HHHHxx" 756345600000000000 +tenk unique1=9190i,unique2=8754i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=190i,twothousand=1190i,fivethous=4190i,tenthous=9190i,odd=180i,even=181i,stringu1="MPAAAA",stringu2="SYMAAA",string4="OOOOxx" 756432000000000000 +tenk unique1=8996i,unique2=8755i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=996i,twothousand=996i,fivethous=3996i,tenthous=8996i,odd=192i,even=193i,stringu1="AIAAAA",stringu2="TYMAAA",string4="VVVVxx" 756518400000000000 +tenk unique1=3409i,unique2=8756i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=409i,twothousand=1409i,fivethous=3409i,tenthous=3409i,odd=18i,even=19i,stringu1="DBAAAA",stringu2="UYMAAA",string4="AAAAxx" 756604800000000000 +tenk unique1=7212i,unique2=8757i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=212i,twothousand=1212i,fivethous=2212i,tenthous=7212i,odd=24i,even=25i,stringu1="KRAAAA",stringu2="VYMAAA",string4="HHHHxx" 756691200000000000 +tenk unique1=416i,unique2=8758i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=416i,twothousand=416i,fivethous=416i,tenthous=416i,odd=32i,even=33i,stringu1="AQAAAA",stringu2="WYMAAA",string4="OOOOxx" 756777600000000000 +tenk unique1=7211i,unique2=8759i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=211i,twothousand=1211i,fivethous=2211i,tenthous=7211i,odd=22i,even=23i,stringu1="JRAAAA",stringu2="XYMAAA",string4="VVVVxx" 756864000000000000 +tenk unique1=7454i,unique2=8760i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=454i,twothousand=1454i,fivethous=2454i,tenthous=7454i,odd=108i,even=109i,stringu1="SAAAAA",stringu2="YYMAAA",string4="AAAAxx" 756950400000000000 +tenk unique1=8417i,unique2=8761i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=417i,twothousand=417i,fivethous=3417i,tenthous=8417i,odd=34i,even=35i,stringu1="TLAAAA",stringu2="ZYMAAA",string4="HHHHxx" 757036800000000000 +tenk unique1=5562i,unique2=8762i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=562i,twothousand=1562i,fivethous=562i,tenthous=5562i,odd=124i,even=125i,stringu1="YFAAAA",stringu2="AZMAAA",string4="OOOOxx" 757123200000000000 +tenk unique1=4996i,unique2=8763i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=996i,twothousand=996i,fivethous=4996i,tenthous=4996i,odd=192i,even=193i,stringu1="EKAAAA",stringu2="BZMAAA",string4="VVVVxx" 757209600000000000 +tenk unique1=5718i,unique2=8764i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=718i,twothousand=1718i,fivethous=718i,tenthous=5718i,odd=36i,even=37i,stringu1="YLAAAA",stringu2="CZMAAA",string4="AAAAxx" 757296000000000000 +tenk unique1=7838i,unique2=8765i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=838i,twothousand=1838i,fivethous=2838i,tenthous=7838i,odd=76i,even=77i,stringu1="MPAAAA",stringu2="DZMAAA",string4="HHHHxx" 757382400000000000 +tenk unique1=7715i,unique2=8766i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=715i,twothousand=1715i,fivethous=2715i,tenthous=7715i,odd=30i,even=31i,stringu1="TKAAAA",stringu2="EZMAAA",string4="OOOOxx" 757468800000000000 +tenk unique1=2780i,unique2=8767i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=780i,twothousand=780i,fivethous=2780i,tenthous=2780i,odd=160i,even=161i,stringu1="YCAAAA",stringu2="FZMAAA",string4="VVVVxx" 757555200000000000 +tenk unique1=1013i,unique2=8768i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=13i,twothousand=1013i,fivethous=1013i,tenthous=1013i,odd=26i,even=27i,stringu1="ZMAAAA",stringu2="GZMAAA",string4="AAAAxx" 757641600000000000 +tenk unique1=8465i,unique2=8769i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=465i,twothousand=465i,fivethous=3465i,tenthous=8465i,odd=130i,even=131i,stringu1="PNAAAA",stringu2="HZMAAA",string4="HHHHxx" 757728000000000000 +tenk unique1=7976i,unique2=8770i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=976i,twothousand=1976i,fivethous=2976i,tenthous=7976i,odd=152i,even=153i,stringu1="UUAAAA",stringu2="IZMAAA",string4="OOOOxx" 757814400000000000 +tenk unique1=7150i,unique2=8771i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=150i,twothousand=1150i,fivethous=2150i,tenthous=7150i,odd=100i,even=101i,stringu1="APAAAA",stringu2="JZMAAA",string4="VVVVxx" 757900800000000000 +tenk unique1=6471i,unique2=8772i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=471i,twothousand=471i,fivethous=1471i,tenthous=6471i,odd=142i,even=143i,stringu1="XOAAAA",stringu2="KZMAAA",string4="AAAAxx" 757987200000000000 +tenk unique1=1927i,unique2=8773i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=927i,twothousand=1927i,fivethous=1927i,tenthous=1927i,odd=54i,even=55i,stringu1="DWAAAA",stringu2="LZMAAA",string4="HHHHxx" 758073600000000000 +tenk unique1=227i,unique2=8774i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=227i,twothousand=227i,fivethous=227i,tenthous=227i,odd=54i,even=55i,stringu1="TIAAAA",stringu2="MZMAAA",string4="OOOOxx" 758160000000000000 +tenk unique1=6462i,unique2=8775i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=462i,twothousand=462i,fivethous=1462i,tenthous=6462i,odd=124i,even=125i,stringu1="OOAAAA",stringu2="NZMAAA",string4="VVVVxx" 758246400000000000 +tenk unique1=5227i,unique2=8776i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=227i,twothousand=1227i,fivethous=227i,tenthous=5227i,odd=54i,even=55i,stringu1="BTAAAA",stringu2="OZMAAA",string4="AAAAxx" 758332800000000000 +tenk unique1=1074i,unique2=8777i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=74i,twothousand=1074i,fivethous=1074i,tenthous=1074i,odd=148i,even=149i,stringu1="IPAAAA",stringu2="PZMAAA",string4="HHHHxx" 758419200000000000 +tenk unique1=9448i,unique2=8778i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=448i,twothousand=1448i,fivethous=4448i,tenthous=9448i,odd=96i,even=97i,stringu1="KZAAAA",stringu2="QZMAAA",string4="OOOOxx" 758505600000000000 +tenk unique1=4459i,unique2=8779i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=459i,twothousand=459i,fivethous=4459i,tenthous=4459i,odd=118i,even=119i,stringu1="NPAAAA",stringu2="RZMAAA",string4="VVVVxx" 758592000000000000 +tenk unique1=2478i,unique2=8780i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=478i,twothousand=478i,fivethous=2478i,tenthous=2478i,odd=156i,even=157i,stringu1="IRAAAA",stringu2="SZMAAA",string4="AAAAxx" 758678400000000000 +tenk unique1=5005i,unique2=8781i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=1005i,fivethous=5i,tenthous=5005i,odd=10i,even=11i,stringu1="NKAAAA",stringu2="TZMAAA",string4="HHHHxx" 758764800000000000 +tenk unique1=2418i,unique2=8782i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=418i,twothousand=418i,fivethous=2418i,tenthous=2418i,odd=36i,even=37i,stringu1="APAAAA",stringu2="UZMAAA",string4="OOOOxx" 758851200000000000 +tenk unique1=6991i,unique2=8783i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=991i,twothousand=991i,fivethous=1991i,tenthous=6991i,odd=182i,even=183i,stringu1="XIAAAA",stringu2="VZMAAA",string4="VVVVxx" 758937600000000000 +tenk unique1=4729i,unique2=8784i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=729i,twothousand=729i,fivethous=4729i,tenthous=4729i,odd=58i,even=59i,stringu1="XZAAAA",stringu2="WZMAAA",string4="AAAAxx" 759024000000000000 +tenk unique1=3548i,unique2=8785i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=548i,twothousand=1548i,fivethous=3548i,tenthous=3548i,odd=96i,even=97i,stringu1="MGAAAA",stringu2="XZMAAA",string4="HHHHxx" 759110400000000000 +tenk unique1=9616i,unique2=8786i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=616i,twothousand=1616i,fivethous=4616i,tenthous=9616i,odd=32i,even=33i,stringu1="WFAAAA",stringu2="YZMAAA",string4="OOOOxx" 759196800000000000 +tenk unique1=2901i,unique2=8787i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=901i,twothousand=901i,fivethous=2901i,tenthous=2901i,odd=2i,even=3i,stringu1="PHAAAA",stringu2="ZZMAAA",string4="VVVVxx" 759283200000000000 +tenk unique1=10i,unique2=8788i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=10i,twothousand=10i,fivethous=10i,tenthous=10i,odd=20i,even=21i,stringu1="KAAAAA",stringu2="AANAAA",string4="AAAAxx" 759369600000000000 +tenk unique1=2637i,unique2=8789i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=637i,twothousand=637i,fivethous=2637i,tenthous=2637i,odd=74i,even=75i,stringu1="LXAAAA",stringu2="BANAAA",string4="HHHHxx" 759456000000000000 +tenk unique1=6747i,unique2=8790i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=747i,twothousand=747i,fivethous=1747i,tenthous=6747i,odd=94i,even=95i,stringu1="NZAAAA",stringu2="CANAAA",string4="OOOOxx" 759542400000000000 +tenk unique1=797i,unique2=8791i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=797i,twothousand=797i,fivethous=797i,tenthous=797i,odd=194i,even=195i,stringu1="REAAAA",stringu2="DANAAA",string4="VVVVxx" 759628800000000000 +tenk unique1=7609i,unique2=8792i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=609i,twothousand=1609i,fivethous=2609i,tenthous=7609i,odd=18i,even=19i,stringu1="RGAAAA",stringu2="EANAAA",string4="AAAAxx" 759715200000000000 +tenk unique1=8290i,unique2=8793i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=290i,twothousand=290i,fivethous=3290i,tenthous=8290i,odd=180i,even=181i,stringu1="WGAAAA",stringu2="FANAAA",string4="HHHHxx" 759801600000000000 +tenk unique1=8765i,unique2=8794i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=765i,twothousand=765i,fivethous=3765i,tenthous=8765i,odd=130i,even=131i,stringu1="DZAAAA",stringu2="GANAAA",string4="OOOOxx" 759888000000000000 +tenk unique1=8053i,unique2=8795i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=53i,twothousand=53i,fivethous=3053i,tenthous=8053i,odd=106i,even=107i,stringu1="TXAAAA",stringu2="HANAAA",string4="VVVVxx" 759974400000000000 +tenk unique1=5602i,unique2=8796i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=602i,twothousand=1602i,fivethous=602i,tenthous=5602i,odd=4i,even=5i,stringu1="MHAAAA",stringu2="IANAAA",string4="AAAAxx" 760060800000000000 +tenk unique1=3672i,unique2=8797i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=672i,twothousand=1672i,fivethous=3672i,tenthous=3672i,odd=144i,even=145i,stringu1="GLAAAA",stringu2="JANAAA",string4="HHHHxx" 760147200000000000 +tenk unique1=7513i,unique2=8798i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=513i,twothousand=1513i,fivethous=2513i,tenthous=7513i,odd=26i,even=27i,stringu1="ZCAAAA",stringu2="KANAAA",string4="OOOOxx" 760233600000000000 +tenk unique1=3462i,unique2=8799i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=462i,twothousand=1462i,fivethous=3462i,tenthous=3462i,odd=124i,even=125i,stringu1="EDAAAA",stringu2="LANAAA",string4="VVVVxx" 760320000000000000 +tenk unique1=4457i,unique2=8800i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=457i,twothousand=457i,fivethous=4457i,tenthous=4457i,odd=114i,even=115i,stringu1="LPAAAA",stringu2="MANAAA",string4="AAAAxx" 760406400000000000 +tenk unique1=6547i,unique2=8801i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=547i,twothousand=547i,fivethous=1547i,tenthous=6547i,odd=94i,even=95i,stringu1="VRAAAA",stringu2="NANAAA",string4="HHHHxx" 760492800000000000 +tenk unique1=7417i,unique2=8802i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=417i,twothousand=1417i,fivethous=2417i,tenthous=7417i,odd=34i,even=35i,stringu1="HZAAAA",stringu2="OANAAA",string4="OOOOxx" 760579200000000000 +tenk unique1=8641i,unique2=8803i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=641i,twothousand=641i,fivethous=3641i,tenthous=8641i,odd=82i,even=83i,stringu1="JUAAAA",stringu2="PANAAA",string4="VVVVxx" 760665600000000000 +tenk unique1=149i,unique2=8804i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=149i,twothousand=149i,fivethous=149i,tenthous=149i,odd=98i,even=99i,stringu1="TFAAAA",stringu2="QANAAA",string4="AAAAxx" 760752000000000000 +tenk unique1=5041i,unique2=8805i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=41i,twothousand=1041i,fivethous=41i,tenthous=5041i,odd=82i,even=83i,stringu1="XLAAAA",stringu2="RANAAA",string4="HHHHxx" 760838400000000000 +tenk unique1=9232i,unique2=8806i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=232i,twothousand=1232i,fivethous=4232i,tenthous=9232i,odd=64i,even=65i,stringu1="CRAAAA",stringu2="SANAAA",string4="OOOOxx" 760924800000000000 +tenk unique1=3603i,unique2=8807i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=603i,twothousand=1603i,fivethous=3603i,tenthous=3603i,odd=6i,even=7i,stringu1="PIAAAA",stringu2="TANAAA",string4="VVVVxx" 761011200000000000 +tenk unique1=2792i,unique2=8808i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=792i,twothousand=792i,fivethous=2792i,tenthous=2792i,odd=184i,even=185i,stringu1="KDAAAA",stringu2="UANAAA",string4="AAAAxx" 761097600000000000 +tenk unique1=6620i,unique2=8809i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=620i,twothousand=620i,fivethous=1620i,tenthous=6620i,odd=40i,even=41i,stringu1="QUAAAA",stringu2="VANAAA",string4="HHHHxx" 761184000000000000 +tenk unique1=4000i,unique2=8810i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=0i,fivethous=4000i,tenthous=4000i,odd=0i,even=1i,stringu1="WXAAAA",stringu2="WANAAA",string4="OOOOxx" 761270400000000000 +tenk unique1=659i,unique2=8811i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=659i,twothousand=659i,fivethous=659i,tenthous=659i,odd=118i,even=119i,stringu1="JZAAAA",stringu2="XANAAA",string4="VVVVxx" 761356800000000000 +tenk unique1=8174i,unique2=8812i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=174i,twothousand=174i,fivethous=3174i,tenthous=8174i,odd=148i,even=149i,stringu1="KCAAAA",stringu2="YANAAA",string4="AAAAxx" 761443200000000000 +tenk unique1=4599i,unique2=8813i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=599i,twothousand=599i,fivethous=4599i,tenthous=4599i,odd=198i,even=199i,stringu1="XUAAAA",stringu2="ZANAAA",string4="HHHHxx" 761529600000000000 +tenk unique1=7851i,unique2=8814i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=851i,twothousand=1851i,fivethous=2851i,tenthous=7851i,odd=102i,even=103i,stringu1="ZPAAAA",stringu2="ABNAAA",string4="OOOOxx" 761616000000000000 +tenk unique1=6284i,unique2=8815i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=284i,twothousand=284i,fivethous=1284i,tenthous=6284i,odd=168i,even=169i,stringu1="SHAAAA",stringu2="BBNAAA",string4="VVVVxx" 761702400000000000 +tenk unique1=7116i,unique2=8816i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=116i,twothousand=1116i,fivethous=2116i,tenthous=7116i,odd=32i,even=33i,stringu1="SNAAAA",stringu2="CBNAAA",string4="AAAAxx" 761788800000000000 +tenk unique1=5595i,unique2=8817i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=595i,twothousand=1595i,fivethous=595i,tenthous=5595i,odd=190i,even=191i,stringu1="FHAAAA",stringu2="DBNAAA",string4="HHHHxx" 761875200000000000 +tenk unique1=2903i,unique2=8818i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=903i,twothousand=903i,fivethous=2903i,tenthous=2903i,odd=6i,even=7i,stringu1="RHAAAA",stringu2="EBNAAA",string4="OOOOxx" 761961600000000000 +tenk unique1=5948i,unique2=8819i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=948i,twothousand=1948i,fivethous=948i,tenthous=5948i,odd=96i,even=97i,stringu1="UUAAAA",stringu2="FBNAAA",string4="VVVVxx" 762048000000000000 +tenk unique1=225i,unique2=8820i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=225i,twothousand=225i,fivethous=225i,tenthous=225i,odd=50i,even=51i,stringu1="RIAAAA",stringu2="GBNAAA",string4="AAAAxx" 762134400000000000 +tenk unique1=524i,unique2=8821i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=524i,twothousand=524i,fivethous=524i,tenthous=524i,odd=48i,even=49i,stringu1="EUAAAA",stringu2="HBNAAA",string4="HHHHxx" 762220800000000000 +tenk unique1=7639i,unique2=8822i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=639i,twothousand=1639i,fivethous=2639i,tenthous=7639i,odd=78i,even=79i,stringu1="VHAAAA",stringu2="IBNAAA",string4="OOOOxx" 762307200000000000 +tenk unique1=7297i,unique2=8823i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=297i,twothousand=1297i,fivethous=2297i,tenthous=7297i,odd=194i,even=195i,stringu1="RUAAAA",stringu2="JBNAAA",string4="VVVVxx" 762393600000000000 +tenk unique1=2606i,unique2=8824i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=606i,twothousand=606i,fivethous=2606i,tenthous=2606i,odd=12i,even=13i,stringu1="GWAAAA",stringu2="KBNAAA",string4="AAAAxx" 762480000000000000 +tenk unique1=4771i,unique2=8825i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=771i,twothousand=771i,fivethous=4771i,tenthous=4771i,odd=142i,even=143i,stringu1="NBAAAA",stringu2="LBNAAA",string4="HHHHxx" 762566400000000000 +tenk unique1=8162i,unique2=8826i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=162i,twothousand=162i,fivethous=3162i,tenthous=8162i,odd=124i,even=125i,stringu1="YBAAAA",stringu2="MBNAAA",string4="OOOOxx" 762652800000000000 +tenk unique1=8999i,unique2=8827i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=999i,twothousand=999i,fivethous=3999i,tenthous=8999i,odd=198i,even=199i,stringu1="DIAAAA",stringu2="NBNAAA",string4="VVVVxx" 762739200000000000 +tenk unique1=2309i,unique2=8828i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=309i,twothousand=309i,fivethous=2309i,tenthous=2309i,odd=18i,even=19i,stringu1="VKAAAA",stringu2="OBNAAA",string4="AAAAxx" 762825600000000000 +tenk unique1=3594i,unique2=8829i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=594i,twothousand=1594i,fivethous=3594i,tenthous=3594i,odd=188i,even=189i,stringu1="GIAAAA",stringu2="PBNAAA",string4="HHHHxx" 762912000000000000 +tenk unique1=6092i,unique2=8830i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=92i,twothousand=92i,fivethous=1092i,tenthous=6092i,odd=184i,even=185i,stringu1="IAAAAA",stringu2="QBNAAA",string4="OOOOxx" 762998400000000000 +tenk unique1=7467i,unique2=8831i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=467i,twothousand=1467i,fivethous=2467i,tenthous=7467i,odd=134i,even=135i,stringu1="FBAAAA",stringu2="RBNAAA",string4="VVVVxx" 763084800000000000 +tenk unique1=6986i,unique2=8832i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=986i,twothousand=986i,fivethous=1986i,tenthous=6986i,odd=172i,even=173i,stringu1="SIAAAA",stringu2="SBNAAA",string4="AAAAxx" 763171200000000000 +tenk unique1=9898i,unique2=8833i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=898i,twothousand=1898i,fivethous=4898i,tenthous=9898i,odd=196i,even=197i,stringu1="SQAAAA",stringu2="TBNAAA",string4="HHHHxx" 763257600000000000 +tenk unique1=9578i,unique2=8834i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=578i,twothousand=1578i,fivethous=4578i,tenthous=9578i,odd=156i,even=157i,stringu1="KEAAAA",stringu2="UBNAAA",string4="OOOOxx" 763344000000000000 +tenk unique1=156i,unique2=8835i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=156i,twothousand=156i,fivethous=156i,tenthous=156i,odd=112i,even=113i,stringu1="AGAAAA",stringu2="VBNAAA",string4="VVVVxx" 763430400000000000 +tenk unique1=5810i,unique2=8836i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=810i,twothousand=1810i,fivethous=810i,tenthous=5810i,odd=20i,even=21i,stringu1="MPAAAA",stringu2="WBNAAA",string4="AAAAxx" 763516800000000000 +tenk unique1=790i,unique2=8837i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=790i,twothousand=790i,fivethous=790i,tenthous=790i,odd=180i,even=181i,stringu1="KEAAAA",stringu2="XBNAAA",string4="HHHHxx" 763603200000000000 +tenk unique1=6840i,unique2=8838i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=840i,twothousand=840i,fivethous=1840i,tenthous=6840i,odd=80i,even=81i,stringu1="CDAAAA",stringu2="YBNAAA",string4="OOOOxx" 763689600000000000 +tenk unique1=6725i,unique2=8839i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=725i,twothousand=725i,fivethous=1725i,tenthous=6725i,odd=50i,even=51i,stringu1="RYAAAA",stringu2="ZBNAAA",string4="VVVVxx" 763776000000000000 +tenk unique1=5528i,unique2=8840i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=528i,twothousand=1528i,fivethous=528i,tenthous=5528i,odd=56i,even=57i,stringu1="QEAAAA",stringu2="ACNAAA",string4="AAAAxx" 763862400000000000 +tenk unique1=4120i,unique2=8841i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=120i,twothousand=120i,fivethous=4120i,tenthous=4120i,odd=40i,even=41i,stringu1="MCAAAA",stringu2="BCNAAA",string4="HHHHxx" 763948800000000000 +tenk unique1=6694i,unique2=8842i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=694i,twothousand=694i,fivethous=1694i,tenthous=6694i,odd=188i,even=189i,stringu1="MXAAAA",stringu2="CCNAAA",string4="OOOOxx" 764035200000000000 +tenk unique1=3552i,unique2=8843i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=552i,twothousand=1552i,fivethous=3552i,tenthous=3552i,odd=104i,even=105i,stringu1="QGAAAA",stringu2="DCNAAA",string4="VVVVxx" 764121600000000000 +tenk unique1=1478i,unique2=8844i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=478i,twothousand=1478i,fivethous=1478i,tenthous=1478i,odd=156i,even=157i,stringu1="WEAAAA",stringu2="ECNAAA",string4="AAAAxx" 764208000000000000 +tenk unique1=8084i,unique2=8845i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=84i,twothousand=84i,fivethous=3084i,tenthous=8084i,odd=168i,even=169i,stringu1="YYAAAA",stringu2="FCNAAA",string4="HHHHxx" 764294400000000000 +tenk unique1=7578i,unique2=8846i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=578i,twothousand=1578i,fivethous=2578i,tenthous=7578i,odd=156i,even=157i,stringu1="MFAAAA",stringu2="GCNAAA",string4="OOOOxx" 764380800000000000 +tenk unique1=6314i,unique2=8847i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=314i,twothousand=314i,fivethous=1314i,tenthous=6314i,odd=28i,even=29i,stringu1="WIAAAA",stringu2="HCNAAA",string4="VVVVxx" 764467200000000000 +tenk unique1=6123i,unique2=8848i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=123i,twothousand=123i,fivethous=1123i,tenthous=6123i,odd=46i,even=47i,stringu1="NBAAAA",stringu2="ICNAAA",string4="AAAAxx" 764553600000000000 +tenk unique1=9443i,unique2=8849i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=443i,twothousand=1443i,fivethous=4443i,tenthous=9443i,odd=86i,even=87i,stringu1="FZAAAA",stringu2="JCNAAA",string4="HHHHxx" 764640000000000000 +tenk unique1=9628i,unique2=8850i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=628i,twothousand=1628i,fivethous=4628i,tenthous=9628i,odd=56i,even=57i,stringu1="IGAAAA",stringu2="KCNAAA",string4="OOOOxx" 764726400000000000 +tenk unique1=8508i,unique2=8851i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=508i,twothousand=508i,fivethous=3508i,tenthous=8508i,odd=16i,even=17i,stringu1="GPAAAA",stringu2="LCNAAA",string4="VVVVxx" 764812800000000000 +tenk unique1=5552i,unique2=8852i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=552i,twothousand=1552i,fivethous=552i,tenthous=5552i,odd=104i,even=105i,stringu1="OFAAAA",stringu2="MCNAAA",string4="AAAAxx" 764899200000000000 +tenk unique1=5327i,unique2=8853i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=327i,twothousand=1327i,fivethous=327i,tenthous=5327i,odd=54i,even=55i,stringu1="XWAAAA",stringu2="NCNAAA",string4="HHHHxx" 764985600000000000 +tenk unique1=7771i,unique2=8854i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=771i,twothousand=1771i,fivethous=2771i,tenthous=7771i,odd=142i,even=143i,stringu1="XMAAAA",stringu2="OCNAAA",string4="OOOOxx" 765072000000000000 +tenk unique1=8932i,unique2=8855i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=932i,twothousand=932i,fivethous=3932i,tenthous=8932i,odd=64i,even=65i,stringu1="OFAAAA",stringu2="PCNAAA",string4="VVVVxx" 765158400000000000 +tenk unique1=3526i,unique2=8856i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=526i,twothousand=1526i,fivethous=3526i,tenthous=3526i,odd=52i,even=53i,stringu1="QFAAAA",stringu2="QCNAAA",string4="AAAAxx" 765244800000000000 +tenk unique1=4340i,unique2=8857i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=340i,twothousand=340i,fivethous=4340i,tenthous=4340i,odd=80i,even=81i,stringu1="YKAAAA",stringu2="RCNAAA",string4="HHHHxx" 765331200000000000 +tenk unique1=9419i,unique2=8858i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=419i,twothousand=1419i,fivethous=4419i,tenthous=9419i,odd=38i,even=39i,stringu1="HYAAAA",stringu2="SCNAAA",string4="OOOOxx" 765417600000000000 +tenk unique1=8421i,unique2=8859i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=421i,twothousand=421i,fivethous=3421i,tenthous=8421i,odd=42i,even=43i,stringu1="XLAAAA",stringu2="TCNAAA",string4="VVVVxx" 765504000000000000 +tenk unique1=7431i,unique2=8860i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=431i,twothousand=1431i,fivethous=2431i,tenthous=7431i,odd=62i,even=63i,stringu1="VZAAAA",stringu2="UCNAAA",string4="AAAAxx" 765590400000000000 +tenk unique1=172i,unique2=8861i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=172i,twothousand=172i,fivethous=172i,tenthous=172i,odd=144i,even=145i,stringu1="QGAAAA",stringu2="VCNAAA",string4="HHHHxx" 765676800000000000 +tenk unique1=3279i,unique2=8862i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=279i,twothousand=1279i,fivethous=3279i,tenthous=3279i,odd=158i,even=159i,stringu1="DWAAAA",stringu2="WCNAAA",string4="OOOOxx" 765763200000000000 +tenk unique1=1508i,unique2=8863i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=508i,twothousand=1508i,fivethous=1508i,tenthous=1508i,odd=16i,even=17i,stringu1="AGAAAA",stringu2="XCNAAA",string4="VVVVxx" 765849600000000000 +tenk unique1=7091i,unique2=8864i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=91i,twothousand=1091i,fivethous=2091i,tenthous=7091i,odd=182i,even=183i,stringu1="TMAAAA",stringu2="YCNAAA",string4="AAAAxx" 765936000000000000 +tenk unique1=1419i,unique2=8865i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=419i,twothousand=1419i,fivethous=1419i,tenthous=1419i,odd=38i,even=39i,stringu1="PCAAAA",stringu2="ZCNAAA",string4="HHHHxx" 766022400000000000 +tenk unique1=3032i,unique2=8866i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=32i,twothousand=1032i,fivethous=3032i,tenthous=3032i,odd=64i,even=65i,stringu1="QMAAAA",stringu2="ADNAAA",string4="OOOOxx" 766108800000000000 +tenk unique1=8683i,unique2=8867i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=683i,twothousand=683i,fivethous=3683i,tenthous=8683i,odd=166i,even=167i,stringu1="ZVAAAA",stringu2="BDNAAA",string4="VVVVxx" 766195200000000000 +tenk unique1=4763i,unique2=8868i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=763i,twothousand=763i,fivethous=4763i,tenthous=4763i,odd=126i,even=127i,stringu1="FBAAAA",stringu2="CDNAAA",string4="AAAAxx" 766281600000000000 +tenk unique1=4424i,unique2=8869i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=424i,twothousand=424i,fivethous=4424i,tenthous=4424i,odd=48i,even=49i,stringu1="EOAAAA",stringu2="DDNAAA",string4="HHHHxx" 766368000000000000 +tenk unique1=8640i,unique2=8870i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=640i,twothousand=640i,fivethous=3640i,tenthous=8640i,odd=80i,even=81i,stringu1="IUAAAA",stringu2="EDNAAA",string4="OOOOxx" 766454400000000000 +tenk unique1=7187i,unique2=8871i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=187i,twothousand=1187i,fivethous=2187i,tenthous=7187i,odd=174i,even=175i,stringu1="LQAAAA",stringu2="FDNAAA",string4="VVVVxx" 766540800000000000 +tenk unique1=6247i,unique2=8872i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=247i,twothousand=247i,fivethous=1247i,tenthous=6247i,odd=94i,even=95i,stringu1="HGAAAA",stringu2="GDNAAA",string4="AAAAxx" 766627200000000000 +tenk unique1=7340i,unique2=8873i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=340i,twothousand=1340i,fivethous=2340i,tenthous=7340i,odd=80i,even=81i,stringu1="IWAAAA",stringu2="HDNAAA",string4="HHHHxx" 766713600000000000 +tenk unique1=182i,unique2=8874i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=182i,twothousand=182i,fivethous=182i,tenthous=182i,odd=164i,even=165i,stringu1="AHAAAA",stringu2="IDNAAA",string4="OOOOxx" 766800000000000000 +tenk unique1=2948i,unique2=8875i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=948i,twothousand=948i,fivethous=2948i,tenthous=2948i,odd=96i,even=97i,stringu1="KJAAAA",stringu2="JDNAAA",string4="VVVVxx" 766886400000000000 +tenk unique1=9462i,unique2=8876i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=462i,twothousand=1462i,fivethous=4462i,tenthous=9462i,odd=124i,even=125i,stringu1="YZAAAA",stringu2="KDNAAA",string4="AAAAxx" 766972800000000000 +tenk unique1=5997i,unique2=8877i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=997i,twothousand=1997i,fivethous=997i,tenthous=5997i,odd=194i,even=195i,stringu1="RWAAAA",stringu2="LDNAAA",string4="HHHHxx" 767059200000000000 +tenk unique1=5608i,unique2=8878i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=608i,twothousand=1608i,fivethous=608i,tenthous=5608i,odd=16i,even=17i,stringu1="SHAAAA",stringu2="MDNAAA",string4="OOOOxx" 767145600000000000 +tenk unique1=1472i,unique2=8879i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=472i,twothousand=1472i,fivethous=1472i,tenthous=1472i,odd=144i,even=145i,stringu1="QEAAAA",stringu2="NDNAAA",string4="VVVVxx" 767232000000000000 +tenk unique1=277i,unique2=8880i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=277i,twothousand=277i,fivethous=277i,tenthous=277i,odd=154i,even=155i,stringu1="RKAAAA",stringu2="ODNAAA",string4="AAAAxx" 767318400000000000 +tenk unique1=4807i,unique2=8881i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=807i,twothousand=807i,fivethous=4807i,tenthous=4807i,odd=14i,even=15i,stringu1="XCAAAA",stringu2="PDNAAA",string4="HHHHxx" 767404800000000000 +tenk unique1=4969i,unique2=8882i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=969i,twothousand=969i,fivethous=4969i,tenthous=4969i,odd=138i,even=139i,stringu1="DJAAAA",stringu2="QDNAAA",string4="OOOOxx" 767491200000000000 +tenk unique1=5611i,unique2=8883i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=611i,twothousand=1611i,fivethous=611i,tenthous=5611i,odd=22i,even=23i,stringu1="VHAAAA",stringu2="RDNAAA",string4="VVVVxx" 767577600000000000 +tenk unique1=372i,unique2=8884i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=372i,twothousand=372i,fivethous=372i,tenthous=372i,odd=144i,even=145i,stringu1="IOAAAA",stringu2="SDNAAA",string4="AAAAxx" 767664000000000000 +tenk unique1=6666i,unique2=8885i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=666i,twothousand=666i,fivethous=1666i,tenthous=6666i,odd=132i,even=133i,stringu1="KWAAAA",stringu2="TDNAAA",string4="HHHHxx" 767750400000000000 +tenk unique1=476i,unique2=8886i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=476i,twothousand=476i,fivethous=476i,tenthous=476i,odd=152i,even=153i,stringu1="ISAAAA",stringu2="UDNAAA",string4="OOOOxx" 767836800000000000 +tenk unique1=5225i,unique2=8887i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=225i,twothousand=1225i,fivethous=225i,tenthous=5225i,odd=50i,even=51i,stringu1="ZSAAAA",stringu2="VDNAAA",string4="VVVVxx" 767923200000000000 +tenk unique1=5143i,unique2=8888i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=143i,twothousand=1143i,fivethous=143i,tenthous=5143i,odd=86i,even=87i,stringu1="VPAAAA",stringu2="WDNAAA",string4="AAAAxx" 768009600000000000 +tenk unique1=1853i,unique2=8889i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=853i,twothousand=1853i,fivethous=1853i,tenthous=1853i,odd=106i,even=107i,stringu1="HTAAAA",stringu2="XDNAAA",string4="HHHHxx" 768096000000000000 +tenk unique1=675i,unique2=8890i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=675i,twothousand=675i,fivethous=675i,tenthous=675i,odd=150i,even=151i,stringu1="ZZAAAA",stringu2="YDNAAA",string4="OOOOxx" 768182400000000000 +tenk unique1=5643i,unique2=8891i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=643i,twothousand=1643i,fivethous=643i,tenthous=5643i,odd=86i,even=87i,stringu1="BJAAAA",stringu2="ZDNAAA",string4="VVVVxx" 768268800000000000 +tenk unique1=5317i,unique2=8892i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=317i,twothousand=1317i,fivethous=317i,tenthous=5317i,odd=34i,even=35i,stringu1="NWAAAA",stringu2="AENAAA",string4="AAAAxx" 768355200000000000 +tenk unique1=8102i,unique2=8893i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=102i,twothousand=102i,fivethous=3102i,tenthous=8102i,odd=4i,even=5i,stringu1="QZAAAA",stringu2="BENAAA",string4="HHHHxx" 768441600000000000 +tenk unique1=978i,unique2=8894i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=978i,twothousand=978i,fivethous=978i,tenthous=978i,odd=156i,even=157i,stringu1="QLAAAA",stringu2="CENAAA",string4="OOOOxx" 768528000000000000 +tenk unique1=4620i,unique2=8895i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=620i,twothousand=620i,fivethous=4620i,tenthous=4620i,odd=40i,even=41i,stringu1="SVAAAA",stringu2="DENAAA",string4="VVVVxx" 768614400000000000 +tenk unique1=151i,unique2=8896i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=151i,twothousand=151i,fivethous=151i,tenthous=151i,odd=102i,even=103i,stringu1="VFAAAA",stringu2="EENAAA",string4="AAAAxx" 768700800000000000 +tenk unique1=972i,unique2=8897i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=972i,twothousand=972i,fivethous=972i,tenthous=972i,odd=144i,even=145i,stringu1="KLAAAA",stringu2="FENAAA",string4="HHHHxx" 768787200000000000 +tenk unique1=6820i,unique2=8898i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=820i,twothousand=820i,fivethous=1820i,tenthous=6820i,odd=40i,even=41i,stringu1="ICAAAA",stringu2="GENAAA",string4="OOOOxx" 768873600000000000 +tenk unique1=7387i,unique2=8899i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=387i,twothousand=1387i,fivethous=2387i,tenthous=7387i,odd=174i,even=175i,stringu1="DYAAAA",stringu2="HENAAA",string4="VVVVxx" 768960000000000000 +tenk unique1=9634i,unique2=8900i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=634i,twothousand=1634i,fivethous=4634i,tenthous=9634i,odd=68i,even=69i,stringu1="OGAAAA",stringu2="IENAAA",string4="AAAAxx" 769046400000000000 +tenk unique1=6308i,unique2=8901i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=308i,twothousand=308i,fivethous=1308i,tenthous=6308i,odd=16i,even=17i,stringu1="QIAAAA",stringu2="JENAAA",string4="HHHHxx" 769132800000000000 +tenk unique1=8323i,unique2=8902i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=323i,twothousand=323i,fivethous=3323i,tenthous=8323i,odd=46i,even=47i,stringu1="DIAAAA",stringu2="KENAAA",string4="OOOOxx" 769219200000000000 +tenk unique1=6672i,unique2=8903i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=672i,twothousand=672i,fivethous=1672i,tenthous=6672i,odd=144i,even=145i,stringu1="QWAAAA",stringu2="LENAAA",string4="VVVVxx" 769305600000000000 +tenk unique1=8283i,unique2=8904i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=283i,twothousand=283i,fivethous=3283i,tenthous=8283i,odd=166i,even=167i,stringu1="PGAAAA",stringu2="MENAAA",string4="AAAAxx" 769392000000000000 +tenk unique1=7996i,unique2=8905i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=996i,twothousand=1996i,fivethous=2996i,tenthous=7996i,odd=192i,even=193i,stringu1="OVAAAA",stringu2="NENAAA",string4="HHHHxx" 769478400000000000 +tenk unique1=6488i,unique2=8906i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=488i,twothousand=488i,fivethous=1488i,tenthous=6488i,odd=176i,even=177i,stringu1="OPAAAA",stringu2="OENAAA",string4="OOOOxx" 769564800000000000 +tenk unique1=2365i,unique2=8907i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=365i,twothousand=365i,fivethous=2365i,tenthous=2365i,odd=130i,even=131i,stringu1="ZMAAAA",stringu2="PENAAA",string4="VVVVxx" 769651200000000000 +tenk unique1=9746i,unique2=8908i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=746i,twothousand=1746i,fivethous=4746i,tenthous=9746i,odd=92i,even=93i,stringu1="WKAAAA",stringu2="QENAAA",string4="AAAAxx" 769737600000000000 +tenk unique1=8605i,unique2=8909i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=605i,twothousand=605i,fivethous=3605i,tenthous=8605i,odd=10i,even=11i,stringu1="ZSAAAA",stringu2="RENAAA",string4="HHHHxx" 769824000000000000 +tenk unique1=3342i,unique2=8910i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=342i,twothousand=1342i,fivethous=3342i,tenthous=3342i,odd=84i,even=85i,stringu1="OYAAAA",stringu2="SENAAA",string4="OOOOxx" 769910400000000000 +tenk unique1=8429i,unique2=8911i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=429i,twothousand=429i,fivethous=3429i,tenthous=8429i,odd=58i,even=59i,stringu1="FMAAAA",stringu2="TENAAA",string4="VVVVxx" 769996800000000000 +tenk unique1=1162i,unique2=8912i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=162i,twothousand=1162i,fivethous=1162i,tenthous=1162i,odd=124i,even=125i,stringu1="SSAAAA",stringu2="UENAAA",string4="AAAAxx" 770083200000000000 +tenk unique1=531i,unique2=8913i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=531i,twothousand=531i,fivethous=531i,tenthous=531i,odd=62i,even=63i,stringu1="LUAAAA",stringu2="VENAAA",string4="HHHHxx" 770169600000000000 +tenk unique1=8408i,unique2=8914i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=408i,twothousand=408i,fivethous=3408i,tenthous=8408i,odd=16i,even=17i,stringu1="KLAAAA",stringu2="WENAAA",string4="OOOOxx" 770256000000000000 +tenk unique1=8862i,unique2=8915i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=862i,twothousand=862i,fivethous=3862i,tenthous=8862i,odd=124i,even=125i,stringu1="WCAAAA",stringu2="XENAAA",string4="VVVVxx" 770342400000000000 +tenk unique1=5843i,unique2=8916i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=843i,twothousand=1843i,fivethous=843i,tenthous=5843i,odd=86i,even=87i,stringu1="TQAAAA",stringu2="YENAAA",string4="AAAAxx" 770428800000000000 +tenk unique1=8704i,unique2=8917i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=704i,twothousand=704i,fivethous=3704i,tenthous=8704i,odd=8i,even=9i,stringu1="UWAAAA",stringu2="ZENAAA",string4="HHHHxx" 770515200000000000 +tenk unique1=7070i,unique2=8918i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=70i,twothousand=1070i,fivethous=2070i,tenthous=7070i,odd=140i,even=141i,stringu1="YLAAAA",stringu2="AFNAAA",string4="OOOOxx" 770601600000000000 +tenk unique1=9119i,unique2=8919i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=119i,twothousand=1119i,fivethous=4119i,tenthous=9119i,odd=38i,even=39i,stringu1="TMAAAA",stringu2="BFNAAA",string4="VVVVxx" 770688000000000000 +tenk unique1=8344i,unique2=8920i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=344i,twothousand=344i,fivethous=3344i,tenthous=8344i,odd=88i,even=89i,stringu1="YIAAAA",stringu2="CFNAAA",string4="AAAAxx" 770774400000000000 +tenk unique1=8979i,unique2=8921i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=979i,twothousand=979i,fivethous=3979i,tenthous=8979i,odd=158i,even=159i,stringu1="JHAAAA",stringu2="DFNAAA",string4="HHHHxx" 770860800000000000 +tenk unique1=2971i,unique2=8922i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=971i,twothousand=971i,fivethous=2971i,tenthous=2971i,odd=142i,even=143i,stringu1="HKAAAA",stringu2="EFNAAA",string4="OOOOxx" 770947200000000000 +tenk unique1=7700i,unique2=8923i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=700i,twothousand=1700i,fivethous=2700i,tenthous=7700i,odd=0i,even=1i,stringu1="EKAAAA",stringu2="FFNAAA",string4="VVVVxx" 771033600000000000 +tenk unique1=8280i,unique2=8924i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=280i,twothousand=280i,fivethous=3280i,tenthous=8280i,odd=160i,even=161i,stringu1="MGAAAA",stringu2="GFNAAA",string4="AAAAxx" 771120000000000000 +tenk unique1=9096i,unique2=8925i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=96i,twothousand=1096i,fivethous=4096i,tenthous=9096i,odd=192i,even=193i,stringu1="WLAAAA",stringu2="HFNAAA",string4="HHHHxx" 771206400000000000 +tenk unique1=99i,unique2=8926i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=99i,twothousand=99i,fivethous=99i,tenthous=99i,odd=198i,even=199i,stringu1="VDAAAA",stringu2="IFNAAA",string4="OOOOxx" 771292800000000000 +tenk unique1=6696i,unique2=8927i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=696i,twothousand=696i,fivethous=1696i,tenthous=6696i,odd=192i,even=193i,stringu1="OXAAAA",stringu2="JFNAAA",string4="VVVVxx" 771379200000000000 +tenk unique1=9490i,unique2=8928i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=490i,twothousand=1490i,fivethous=4490i,tenthous=9490i,odd=180i,even=181i,stringu1="ABAAAA",stringu2="KFNAAA",string4="AAAAxx" 771465600000000000 +tenk unique1=9073i,unique2=8929i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=73i,twothousand=1073i,fivethous=4073i,tenthous=9073i,odd=146i,even=147i,stringu1="ZKAAAA",stringu2="LFNAAA",string4="HHHHxx" 771552000000000000 +tenk unique1=1861i,unique2=8930i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=861i,twothousand=1861i,fivethous=1861i,tenthous=1861i,odd=122i,even=123i,stringu1="PTAAAA",stringu2="MFNAAA",string4="OOOOxx" 771638400000000000 +tenk unique1=4413i,unique2=8931i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=413i,twothousand=413i,fivethous=4413i,tenthous=4413i,odd=26i,even=27i,stringu1="TNAAAA",stringu2="NFNAAA",string4="VVVVxx" 771724800000000000 +tenk unique1=6002i,unique2=8932i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=2i,fivethous=1002i,tenthous=6002i,odd=4i,even=5i,stringu1="WWAAAA",stringu2="OFNAAA",string4="AAAAxx" 771811200000000000 +tenk unique1=439i,unique2=8933i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=439i,twothousand=439i,fivethous=439i,tenthous=439i,odd=78i,even=79i,stringu1="XQAAAA",stringu2="PFNAAA",string4="HHHHxx" 771897600000000000 +tenk unique1=5449i,unique2=8934i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=449i,twothousand=1449i,fivethous=449i,tenthous=5449i,odd=98i,even=99i,stringu1="PBAAAA",stringu2="QFNAAA",string4="OOOOxx" 771984000000000000 +tenk unique1=9737i,unique2=8935i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=737i,twothousand=1737i,fivethous=4737i,tenthous=9737i,odd=74i,even=75i,stringu1="NKAAAA",stringu2="RFNAAA",string4="VVVVxx" 772070400000000000 +tenk unique1=1898i,unique2=8936i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=898i,twothousand=1898i,fivethous=1898i,tenthous=1898i,odd=196i,even=197i,stringu1="AVAAAA",stringu2="SFNAAA",string4="AAAAxx" 772156800000000000 +tenk unique1=4189i,unique2=8937i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=189i,twothousand=189i,fivethous=4189i,tenthous=4189i,odd=178i,even=179i,stringu1="DFAAAA",stringu2="TFNAAA",string4="HHHHxx" 772243200000000000 +tenk unique1=1408i,unique2=8938i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=408i,twothousand=1408i,fivethous=1408i,tenthous=1408i,odd=16i,even=17i,stringu1="ECAAAA",stringu2="UFNAAA",string4="OOOOxx" 772329600000000000 +tenk unique1=394i,unique2=8939i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=394i,twothousand=394i,fivethous=394i,tenthous=394i,odd=188i,even=189i,stringu1="EPAAAA",stringu2="VFNAAA",string4="VVVVxx" 772416000000000000 +tenk unique1=1935i,unique2=8940i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=935i,twothousand=1935i,fivethous=1935i,tenthous=1935i,odd=70i,even=71i,stringu1="LWAAAA",stringu2="WFNAAA",string4="AAAAxx" 772502400000000000 +tenk unique1=3965i,unique2=8941i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=965i,twothousand=1965i,fivethous=3965i,tenthous=3965i,odd=130i,even=131i,stringu1="NWAAAA",stringu2="XFNAAA",string4="HHHHxx" 772588800000000000 +tenk unique1=6821i,unique2=8942i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=821i,twothousand=821i,fivethous=1821i,tenthous=6821i,odd=42i,even=43i,stringu1="JCAAAA",stringu2="YFNAAA",string4="OOOOxx" 772675200000000000 +tenk unique1=349i,unique2=8943i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=349i,twothousand=349i,fivethous=349i,tenthous=349i,odd=98i,even=99i,stringu1="LNAAAA",stringu2="ZFNAAA",string4="VVVVxx" 772761600000000000 +tenk unique1=8428i,unique2=8944i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=428i,twothousand=428i,fivethous=3428i,tenthous=8428i,odd=56i,even=57i,stringu1="EMAAAA",stringu2="AGNAAA",string4="AAAAxx" 772848000000000000 +tenk unique1=8200i,unique2=8945i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=200i,twothousand=200i,fivethous=3200i,tenthous=8200i,odd=0i,even=1i,stringu1="KDAAAA",stringu2="BGNAAA",string4="HHHHxx" 772934400000000000 +tenk unique1=1737i,unique2=8946i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=737i,twothousand=1737i,fivethous=1737i,tenthous=1737i,odd=74i,even=75i,stringu1="VOAAAA",stringu2="CGNAAA",string4="OOOOxx" 773020800000000000 +tenk unique1=6516i,unique2=8947i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=516i,twothousand=516i,fivethous=1516i,tenthous=6516i,odd=32i,even=33i,stringu1="QQAAAA",stringu2="DGNAAA",string4="VVVVxx" 773107200000000000 +tenk unique1=5441i,unique2=8948i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=441i,twothousand=1441i,fivethous=441i,tenthous=5441i,odd=82i,even=83i,stringu1="HBAAAA",stringu2="EGNAAA",string4="AAAAxx" 773193600000000000 +tenk unique1=5999i,unique2=8949i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=999i,twothousand=1999i,fivethous=999i,tenthous=5999i,odd=198i,even=199i,stringu1="TWAAAA",stringu2="FGNAAA",string4="HHHHxx" 773280000000000000 +tenk unique1=1539i,unique2=8950i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=539i,twothousand=1539i,fivethous=1539i,tenthous=1539i,odd=78i,even=79i,stringu1="FHAAAA",stringu2="GGNAAA",string4="OOOOxx" 773366400000000000 +tenk unique1=9067i,unique2=8951i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=67i,twothousand=1067i,fivethous=4067i,tenthous=9067i,odd=134i,even=135i,stringu1="TKAAAA",stringu2="HGNAAA",string4="VVVVxx" 773452800000000000 +tenk unique1=4061i,unique2=8952i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=61i,twothousand=61i,fivethous=4061i,tenthous=4061i,odd=122i,even=123i,stringu1="FAAAAA",stringu2="IGNAAA",string4="AAAAxx" 773539200000000000 +tenk unique1=1642i,unique2=8953i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=642i,twothousand=1642i,fivethous=1642i,tenthous=1642i,odd=84i,even=85i,stringu1="ELAAAA",stringu2="JGNAAA",string4="HHHHxx" 773625600000000000 +tenk unique1=4657i,unique2=8954i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=657i,twothousand=657i,fivethous=4657i,tenthous=4657i,odd=114i,even=115i,stringu1="DXAAAA",stringu2="KGNAAA",string4="OOOOxx" 773712000000000000 +tenk unique1=9934i,unique2=8955i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=934i,twothousand=1934i,fivethous=4934i,tenthous=9934i,odd=68i,even=69i,stringu1="CSAAAA",stringu2="LGNAAA",string4="VVVVxx" 773798400000000000 +tenk unique1=6385i,unique2=8956i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=385i,twothousand=385i,fivethous=1385i,tenthous=6385i,odd=170i,even=171i,stringu1="PLAAAA",stringu2="MGNAAA",string4="AAAAxx" 773884800000000000 +tenk unique1=6775i,unique2=8957i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=775i,twothousand=775i,fivethous=1775i,tenthous=6775i,odd=150i,even=151i,stringu1="PAAAAA",stringu2="NGNAAA",string4="HHHHxx" 773971200000000000 +tenk unique1=3873i,unique2=8958i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=873i,twothousand=1873i,fivethous=3873i,tenthous=3873i,odd=146i,even=147i,stringu1="ZSAAAA",stringu2="OGNAAA",string4="OOOOxx" 774057600000000000 +tenk unique1=3862i,unique2=8959i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=862i,twothousand=1862i,fivethous=3862i,tenthous=3862i,odd=124i,even=125i,stringu1="OSAAAA",stringu2="PGNAAA",string4="VVVVxx" 774144000000000000 +tenk unique1=1224i,unique2=8960i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=224i,twothousand=1224i,fivethous=1224i,tenthous=1224i,odd=48i,even=49i,stringu1="CVAAAA",stringu2="QGNAAA",string4="AAAAxx" 774230400000000000 +tenk unique1=4483i,unique2=8961i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=483i,twothousand=483i,fivethous=4483i,tenthous=4483i,odd=166i,even=167i,stringu1="LQAAAA",stringu2="RGNAAA",string4="HHHHxx" 774316800000000000 +tenk unique1=3685i,unique2=8962i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=685i,twothousand=1685i,fivethous=3685i,tenthous=3685i,odd=170i,even=171i,stringu1="TLAAAA",stringu2="SGNAAA",string4="OOOOxx" 774403200000000000 +tenk unique1=6082i,unique2=8963i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=82i,twothousand=82i,fivethous=1082i,tenthous=6082i,odd=164i,even=165i,stringu1="YZAAAA",stringu2="TGNAAA",string4="VVVVxx" 774489600000000000 +tenk unique1=7798i,unique2=8964i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=798i,twothousand=1798i,fivethous=2798i,tenthous=7798i,odd=196i,even=197i,stringu1="YNAAAA",stringu2="UGNAAA",string4="AAAAxx" 774576000000000000 +tenk unique1=9039i,unique2=8965i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=39i,twothousand=1039i,fivethous=4039i,tenthous=9039i,odd=78i,even=79i,stringu1="RJAAAA",stringu2="VGNAAA",string4="HHHHxx" 774662400000000000 +tenk unique1=985i,unique2=8966i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=985i,twothousand=985i,fivethous=985i,tenthous=985i,odd=170i,even=171i,stringu1="XLAAAA",stringu2="WGNAAA",string4="OOOOxx" 774748800000000000 +tenk unique1=5389i,unique2=8967i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=389i,twothousand=1389i,fivethous=389i,tenthous=5389i,odd=178i,even=179i,stringu1="HZAAAA",stringu2="XGNAAA",string4="VVVVxx" 774835200000000000 +tenk unique1=1716i,unique2=8968i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=716i,twothousand=1716i,fivethous=1716i,tenthous=1716i,odd=32i,even=33i,stringu1="AOAAAA",stringu2="YGNAAA",string4="AAAAxx" 774921600000000000 +tenk unique1=4209i,unique2=8969i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=209i,twothousand=209i,fivethous=4209i,tenthous=4209i,odd=18i,even=19i,stringu1="XFAAAA",stringu2="ZGNAAA",string4="HHHHxx" 775008000000000000 +tenk unique1=746i,unique2=8970i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=746i,twothousand=746i,fivethous=746i,tenthous=746i,odd=92i,even=93i,stringu1="SCAAAA",stringu2="AHNAAA",string4="OOOOxx" 775094400000000000 +tenk unique1=6295i,unique2=8971i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=295i,twothousand=295i,fivethous=1295i,tenthous=6295i,odd=190i,even=191i,stringu1="DIAAAA",stringu2="BHNAAA",string4="VVVVxx" 775180800000000000 +tenk unique1=9754i,unique2=8972i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=754i,twothousand=1754i,fivethous=4754i,tenthous=9754i,odd=108i,even=109i,stringu1="ELAAAA",stringu2="CHNAAA",string4="AAAAxx" 775267200000000000 +tenk unique1=2336i,unique2=8973i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=336i,twothousand=336i,fivethous=2336i,tenthous=2336i,odd=72i,even=73i,stringu1="WLAAAA",stringu2="DHNAAA",string4="HHHHxx" 775353600000000000 +tenk unique1=3701i,unique2=8974i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=701i,twothousand=1701i,fivethous=3701i,tenthous=3701i,odd=2i,even=3i,stringu1="JMAAAA",stringu2="EHNAAA",string4="OOOOxx" 775440000000000000 +tenk unique1=3551i,unique2=8975i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=551i,twothousand=1551i,fivethous=3551i,tenthous=3551i,odd=102i,even=103i,stringu1="PGAAAA",stringu2="FHNAAA",string4="VVVVxx" 775526400000000000 +tenk unique1=8516i,unique2=8976i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=516i,twothousand=516i,fivethous=3516i,tenthous=8516i,odd=32i,even=33i,stringu1="OPAAAA",stringu2="GHNAAA",string4="AAAAxx" 775612800000000000 +tenk unique1=9290i,unique2=8977i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=290i,twothousand=1290i,fivethous=4290i,tenthous=9290i,odd=180i,even=181i,stringu1="ITAAAA",stringu2="HHNAAA",string4="HHHHxx" 775699200000000000 +tenk unique1=5686i,unique2=8978i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=686i,twothousand=1686i,fivethous=686i,tenthous=5686i,odd=172i,even=173i,stringu1="SKAAAA",stringu2="IHNAAA",string4="OOOOxx" 775785600000000000 +tenk unique1=2893i,unique2=8979i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=893i,twothousand=893i,fivethous=2893i,tenthous=2893i,odd=186i,even=187i,stringu1="HHAAAA",stringu2="JHNAAA",string4="VVVVxx" 775872000000000000 +tenk unique1=6279i,unique2=8980i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=279i,twothousand=279i,fivethous=1279i,tenthous=6279i,odd=158i,even=159i,stringu1="NHAAAA",stringu2="KHNAAA",string4="AAAAxx" 775958400000000000 +tenk unique1=2278i,unique2=8981i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=278i,twothousand=278i,fivethous=2278i,tenthous=2278i,odd=156i,even=157i,stringu1="QJAAAA",stringu2="LHNAAA",string4="HHHHxx" 776044800000000000 +tenk unique1=1618i,unique2=8982i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=618i,twothousand=1618i,fivethous=1618i,tenthous=1618i,odd=36i,even=37i,stringu1="GKAAAA",stringu2="MHNAAA",string4="OOOOxx" 776131200000000000 +tenk unique1=3450i,unique2=8983i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=450i,twothousand=1450i,fivethous=3450i,tenthous=3450i,odd=100i,even=101i,stringu1="SCAAAA",stringu2="NHNAAA",string4="VVVVxx" 776217600000000000 +tenk unique1=8857i,unique2=8984i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=857i,twothousand=857i,fivethous=3857i,tenthous=8857i,odd=114i,even=115i,stringu1="RCAAAA",stringu2="OHNAAA",string4="AAAAxx" 776304000000000000 +tenk unique1=1005i,unique2=8985i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=1005i,fivethous=1005i,tenthous=1005i,odd=10i,even=11i,stringu1="RMAAAA",stringu2="PHNAAA",string4="HHHHxx" 776390400000000000 +tenk unique1=4727i,unique2=8986i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=727i,twothousand=727i,fivethous=4727i,tenthous=4727i,odd=54i,even=55i,stringu1="VZAAAA",stringu2="QHNAAA",string4="OOOOxx" 776476800000000000 +tenk unique1=7617i,unique2=8987i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=617i,twothousand=1617i,fivethous=2617i,tenthous=7617i,odd=34i,even=35i,stringu1="ZGAAAA",stringu2="RHNAAA",string4="VVVVxx" 776563200000000000 +tenk unique1=2021i,unique2=8988i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=21i,twothousand=21i,fivethous=2021i,tenthous=2021i,odd=42i,even=43i,stringu1="TZAAAA",stringu2="SHNAAA",string4="AAAAxx" 776649600000000000 +tenk unique1=9124i,unique2=8989i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=124i,twothousand=1124i,fivethous=4124i,tenthous=9124i,odd=48i,even=49i,stringu1="YMAAAA",stringu2="THNAAA",string4="HHHHxx" 776736000000000000 +tenk unique1=3175i,unique2=8990i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=175i,twothousand=1175i,fivethous=3175i,tenthous=3175i,odd=150i,even=151i,stringu1="DSAAAA",stringu2="UHNAAA",string4="OOOOxx" 776822400000000000 +tenk unique1=2949i,unique2=8991i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=949i,twothousand=949i,fivethous=2949i,tenthous=2949i,odd=98i,even=99i,stringu1="LJAAAA",stringu2="VHNAAA",string4="VVVVxx" 776908800000000000 +tenk unique1=2424i,unique2=8992i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=424i,twothousand=424i,fivethous=2424i,tenthous=2424i,odd=48i,even=49i,stringu1="GPAAAA",stringu2="WHNAAA",string4="AAAAxx" 776995200000000000 +tenk unique1=4791i,unique2=8993i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=791i,twothousand=791i,fivethous=4791i,tenthous=4791i,odd=182i,even=183i,stringu1="HCAAAA",stringu2="XHNAAA",string4="HHHHxx" 777081600000000000 +tenk unique1=7500i,unique2=8994i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=500i,twothousand=1500i,fivethous=2500i,tenthous=7500i,odd=0i,even=1i,stringu1="MCAAAA",stringu2="YHNAAA",string4="OOOOxx" 777168000000000000 +tenk unique1=4893i,unique2=8995i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=893i,twothousand=893i,fivethous=4893i,tenthous=4893i,odd=186i,even=187i,stringu1="FGAAAA",stringu2="ZHNAAA",string4="VVVVxx" 777254400000000000 +tenk unique1=121i,unique2=8996i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=121i,twothousand=121i,fivethous=121i,tenthous=121i,odd=42i,even=43i,stringu1="REAAAA",stringu2="AINAAA",string4="AAAAxx" 777340800000000000 +tenk unique1=1965i,unique2=8997i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=965i,twothousand=1965i,fivethous=1965i,tenthous=1965i,odd=130i,even=131i,stringu1="PXAAAA",stringu2="BINAAA",string4="HHHHxx" 777427200000000000 +tenk unique1=2972i,unique2=8998i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=972i,twothousand=972i,fivethous=2972i,tenthous=2972i,odd=144i,even=145i,stringu1="IKAAAA",stringu2="CINAAA",string4="OOOOxx" 777513600000000000 +tenk unique1=662i,unique2=8999i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=662i,twothousand=662i,fivethous=662i,tenthous=662i,odd=124i,even=125i,stringu1="MZAAAA",stringu2="DINAAA",string4="VVVVxx" 777600000000000000 +tenk unique1=7074i,unique2=9000i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=74i,twothousand=1074i,fivethous=2074i,tenthous=7074i,odd=148i,even=149i,stringu1="CMAAAA",stringu2="EINAAA",string4="AAAAxx" 777686400000000000 +tenk unique1=981i,unique2=9001i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=981i,twothousand=981i,fivethous=981i,tenthous=981i,odd=162i,even=163i,stringu1="TLAAAA",stringu2="FINAAA",string4="HHHHxx" 777772800000000000 +tenk unique1=3520i,unique2=9002i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=520i,twothousand=1520i,fivethous=3520i,tenthous=3520i,odd=40i,even=41i,stringu1="KFAAAA",stringu2="GINAAA",string4="OOOOxx" 777859200000000000 +tenk unique1=6540i,unique2=9003i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=540i,twothousand=540i,fivethous=1540i,tenthous=6540i,odd=80i,even=81i,stringu1="ORAAAA",stringu2="HINAAA",string4="VVVVxx" 777945600000000000 +tenk unique1=6648i,unique2=9004i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=648i,twothousand=648i,fivethous=1648i,tenthous=6648i,odd=96i,even=97i,stringu1="SVAAAA",stringu2="IINAAA",string4="AAAAxx" 778032000000000000 +tenk unique1=7076i,unique2=9005i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=76i,twothousand=1076i,fivethous=2076i,tenthous=7076i,odd=152i,even=153i,stringu1="EMAAAA",stringu2="JINAAA",string4="HHHHxx" 778118400000000000 +tenk unique1=6919i,unique2=9006i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=919i,twothousand=919i,fivethous=1919i,tenthous=6919i,odd=38i,even=39i,stringu1="DGAAAA",stringu2="KINAAA",string4="OOOOxx" 778204800000000000 +tenk unique1=1108i,unique2=9007i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=108i,twothousand=1108i,fivethous=1108i,tenthous=1108i,odd=16i,even=17i,stringu1="QQAAAA",stringu2="LINAAA",string4="VVVVxx" 778291200000000000 +tenk unique1=317i,unique2=9008i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=317i,twothousand=317i,fivethous=317i,tenthous=317i,odd=34i,even=35i,stringu1="FMAAAA",stringu2="MINAAA",string4="AAAAxx" 778377600000000000 +tenk unique1=3483i,unique2=9009i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=483i,twothousand=1483i,fivethous=3483i,tenthous=3483i,odd=166i,even=167i,stringu1="ZDAAAA",stringu2="NINAAA",string4="HHHHxx" 778464000000000000 +tenk unique1=6764i,unique2=9010i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=764i,twothousand=764i,fivethous=1764i,tenthous=6764i,odd=128i,even=129i,stringu1="EAAAAA",stringu2="OINAAA",string4="OOOOxx" 778550400000000000 +tenk unique1=1235i,unique2=9011i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=235i,twothousand=1235i,fivethous=1235i,tenthous=1235i,odd=70i,even=71i,stringu1="NVAAAA",stringu2="PINAAA",string4="VVVVxx" 778636800000000000 +tenk unique1=7121i,unique2=9012i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=121i,twothousand=1121i,fivethous=2121i,tenthous=7121i,odd=42i,even=43i,stringu1="XNAAAA",stringu2="QINAAA",string4="AAAAxx" 778723200000000000 +tenk unique1=426i,unique2=9013i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=426i,twothousand=426i,fivethous=426i,tenthous=426i,odd=52i,even=53i,stringu1="KQAAAA",stringu2="RINAAA",string4="HHHHxx" 778809600000000000 +tenk unique1=6880i,unique2=9014i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=880i,twothousand=880i,fivethous=1880i,tenthous=6880i,odd=160i,even=161i,stringu1="QEAAAA",stringu2="SINAAA",string4="OOOOxx" 778896000000000000 +tenk unique1=5401i,unique2=9015i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=401i,twothousand=1401i,fivethous=401i,tenthous=5401i,odd=2i,even=3i,stringu1="TZAAAA",stringu2="TINAAA",string4="VVVVxx" 778982400000000000 +tenk unique1=7323i,unique2=9016i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=323i,twothousand=1323i,fivethous=2323i,tenthous=7323i,odd=46i,even=47i,stringu1="RVAAAA",stringu2="UINAAA",string4="AAAAxx" 779068800000000000 +tenk unique1=9751i,unique2=9017i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=751i,twothousand=1751i,fivethous=4751i,tenthous=9751i,odd=102i,even=103i,stringu1="BLAAAA",stringu2="VINAAA",string4="HHHHxx" 779155200000000000 +tenk unique1=3436i,unique2=9018i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=436i,twothousand=1436i,fivethous=3436i,tenthous=3436i,odd=72i,even=73i,stringu1="ECAAAA",stringu2="WINAAA",string4="OOOOxx" 779241600000000000 +tenk unique1=7319i,unique2=9019i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=319i,twothousand=1319i,fivethous=2319i,tenthous=7319i,odd=38i,even=39i,stringu1="NVAAAA",stringu2="XINAAA",string4="VVVVxx" 779328000000000000 +tenk unique1=7882i,unique2=9020i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=882i,twothousand=1882i,fivethous=2882i,tenthous=7882i,odd=164i,even=165i,stringu1="ERAAAA",stringu2="YINAAA",string4="AAAAxx" 779414400000000000 +tenk unique1=8260i,unique2=9021i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=260i,twothousand=260i,fivethous=3260i,tenthous=8260i,odd=120i,even=121i,stringu1="SFAAAA",stringu2="ZINAAA",string4="HHHHxx" 779500800000000000 +tenk unique1=9758i,unique2=9022i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=758i,twothousand=1758i,fivethous=4758i,tenthous=9758i,odd=116i,even=117i,stringu1="ILAAAA",stringu2="AJNAAA",string4="OOOOxx" 779587200000000000 +tenk unique1=4205i,unique2=9023i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=205i,twothousand=205i,fivethous=4205i,tenthous=4205i,odd=10i,even=11i,stringu1="TFAAAA",stringu2="BJNAAA",string4="VVVVxx" 779673600000000000 +tenk unique1=8884i,unique2=9024i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=884i,twothousand=884i,fivethous=3884i,tenthous=8884i,odd=168i,even=169i,stringu1="SDAAAA",stringu2="CJNAAA",string4="AAAAxx" 779760000000000000 +tenk unique1=1112i,unique2=9025i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=112i,twothousand=1112i,fivethous=1112i,tenthous=1112i,odd=24i,even=25i,stringu1="UQAAAA",stringu2="DJNAAA",string4="HHHHxx" 779846400000000000 +tenk unique1=2186i,unique2=9026i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=186i,twothousand=186i,fivethous=2186i,tenthous=2186i,odd=172i,even=173i,stringu1="CGAAAA",stringu2="EJNAAA",string4="OOOOxx" 779932800000000000 +tenk unique1=8666i,unique2=9027i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=666i,twothousand=666i,fivethous=3666i,tenthous=8666i,odd=132i,even=133i,stringu1="IVAAAA",stringu2="FJNAAA",string4="VVVVxx" 780019200000000000 +tenk unique1=4325i,unique2=9028i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=325i,twothousand=325i,fivethous=4325i,tenthous=4325i,odd=50i,even=51i,stringu1="JKAAAA",stringu2="GJNAAA",string4="AAAAxx" 780105600000000000 +tenk unique1=4912i,unique2=9029i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=912i,twothousand=912i,fivethous=4912i,tenthous=4912i,odd=24i,even=25i,stringu1="YGAAAA",stringu2="HJNAAA",string4="HHHHxx" 780192000000000000 +tenk unique1=6497i,unique2=9030i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=497i,twothousand=497i,fivethous=1497i,tenthous=6497i,odd=194i,even=195i,stringu1="XPAAAA",stringu2="IJNAAA",string4="OOOOxx" 780278400000000000 +tenk unique1=9072i,unique2=9031i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=72i,twothousand=1072i,fivethous=4072i,tenthous=9072i,odd=144i,even=145i,stringu1="YKAAAA",stringu2="JJNAAA",string4="VVVVxx" 780364800000000000 +tenk unique1=8899i,unique2=9032i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=899i,twothousand=899i,fivethous=3899i,tenthous=8899i,odd=198i,even=199i,stringu1="HEAAAA",stringu2="KJNAAA",string4="AAAAxx" 780451200000000000 +tenk unique1=5619i,unique2=9033i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=619i,twothousand=1619i,fivethous=619i,tenthous=5619i,odd=38i,even=39i,stringu1="DIAAAA",stringu2="LJNAAA",string4="HHHHxx" 780537600000000000 +tenk unique1=4110i,unique2=9034i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=110i,twothousand=110i,fivethous=4110i,tenthous=4110i,odd=20i,even=21i,stringu1="CCAAAA",stringu2="MJNAAA",string4="OOOOxx" 780624000000000000 +tenk unique1=7025i,unique2=9035i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=25i,twothousand=1025i,fivethous=2025i,tenthous=7025i,odd=50i,even=51i,stringu1="FKAAAA",stringu2="NJNAAA",string4="VVVVxx" 780710400000000000 +tenk unique1=5605i,unique2=9036i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=605i,twothousand=1605i,fivethous=605i,tenthous=5605i,odd=10i,even=11i,stringu1="PHAAAA",stringu2="OJNAAA",string4="AAAAxx" 780796800000000000 +tenk unique1=2572i,unique2=9037i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=572i,twothousand=572i,fivethous=2572i,tenthous=2572i,odd=144i,even=145i,stringu1="YUAAAA",stringu2="PJNAAA",string4="HHHHxx" 780883200000000000 +tenk unique1=3895i,unique2=9038i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=895i,twothousand=1895i,fivethous=3895i,tenthous=3895i,odd=190i,even=191i,stringu1="VTAAAA",stringu2="QJNAAA",string4="OOOOxx" 780969600000000000 +tenk unique1=9138i,unique2=9039i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=138i,twothousand=1138i,fivethous=4138i,tenthous=9138i,odd=76i,even=77i,stringu1="MNAAAA",stringu2="RJNAAA",string4="VVVVxx" 781056000000000000 +tenk unique1=4713i,unique2=9040i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=713i,twothousand=713i,fivethous=4713i,tenthous=4713i,odd=26i,even=27i,stringu1="HZAAAA",stringu2="SJNAAA",string4="AAAAxx" 781142400000000000 +tenk unique1=6079i,unique2=9041i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=79i,twothousand=79i,fivethous=1079i,tenthous=6079i,odd=158i,even=159i,stringu1="VZAAAA",stringu2="TJNAAA",string4="HHHHxx" 781228800000000000 +tenk unique1=8898i,unique2=9042i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=898i,twothousand=898i,fivethous=3898i,tenthous=8898i,odd=196i,even=197i,stringu1="GEAAAA",stringu2="UJNAAA",string4="OOOOxx" 781315200000000000 +tenk unique1=2650i,unique2=9043i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=650i,twothousand=650i,fivethous=2650i,tenthous=2650i,odd=100i,even=101i,stringu1="YXAAAA",stringu2="VJNAAA",string4="VVVVxx" 781401600000000000 +tenk unique1=5316i,unique2=9044i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=316i,twothousand=1316i,fivethous=316i,tenthous=5316i,odd=32i,even=33i,stringu1="MWAAAA",stringu2="WJNAAA",string4="AAAAxx" 781488000000000000 +tenk unique1=5133i,unique2=9045i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=133i,twothousand=1133i,fivethous=133i,tenthous=5133i,odd=66i,even=67i,stringu1="LPAAAA",stringu2="XJNAAA",string4="HHHHxx" 781574400000000000 +tenk unique1=2184i,unique2=9046i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=184i,twothousand=184i,fivethous=2184i,tenthous=2184i,odd=168i,even=169i,stringu1="AGAAAA",stringu2="YJNAAA",string4="OOOOxx" 781660800000000000 +tenk unique1=2728i,unique2=9047i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=728i,twothousand=728i,fivethous=2728i,tenthous=2728i,odd=56i,even=57i,stringu1="YAAAAA",stringu2="ZJNAAA",string4="VVVVxx" 781747200000000000 +tenk unique1=6737i,unique2=9048i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=737i,twothousand=737i,fivethous=1737i,tenthous=6737i,odd=74i,even=75i,stringu1="DZAAAA",stringu2="AKNAAA",string4="AAAAxx" 781833600000000000 +tenk unique1=1128i,unique2=9049i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=128i,twothousand=1128i,fivethous=1128i,tenthous=1128i,odd=56i,even=57i,stringu1="KRAAAA",stringu2="BKNAAA",string4="HHHHxx" 781920000000000000 +tenk unique1=9662i,unique2=9050i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=662i,twothousand=1662i,fivethous=4662i,tenthous=9662i,odd=124i,even=125i,stringu1="QHAAAA",stringu2="CKNAAA",string4="OOOOxx" 782006400000000000 +tenk unique1=9384i,unique2=9051i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=384i,twothousand=1384i,fivethous=4384i,tenthous=9384i,odd=168i,even=169i,stringu1="YWAAAA",stringu2="DKNAAA",string4="VVVVxx" 782092800000000000 +tenk unique1=4576i,unique2=9052i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=576i,twothousand=576i,fivethous=4576i,tenthous=4576i,odd=152i,even=153i,stringu1="AUAAAA",stringu2="EKNAAA",string4="AAAAxx" 782179200000000000 +tenk unique1=9613i,unique2=9053i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=613i,twothousand=1613i,fivethous=4613i,tenthous=9613i,odd=26i,even=27i,stringu1="TFAAAA",stringu2="FKNAAA",string4="HHHHxx" 782265600000000000 +tenk unique1=4001i,unique2=9054i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=1i,twothousand=1i,fivethous=4001i,tenthous=4001i,odd=2i,even=3i,stringu1="XXAAAA",stringu2="GKNAAA",string4="OOOOxx" 782352000000000000 +tenk unique1=3628i,unique2=9055i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=628i,twothousand=1628i,fivethous=3628i,tenthous=3628i,odd=56i,even=57i,stringu1="OJAAAA",stringu2="HKNAAA",string4="VVVVxx" 782438400000000000 +tenk unique1=6968i,unique2=9056i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=968i,twothousand=968i,fivethous=1968i,tenthous=6968i,odd=136i,even=137i,stringu1="AIAAAA",stringu2="IKNAAA",string4="AAAAxx" 782524800000000000 +tenk unique1=6491i,unique2=9057i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=491i,twothousand=491i,fivethous=1491i,tenthous=6491i,odd=182i,even=183i,stringu1="RPAAAA",stringu2="JKNAAA",string4="HHHHxx" 782611200000000000 +tenk unique1=1265i,unique2=9058i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=265i,twothousand=1265i,fivethous=1265i,tenthous=1265i,odd=130i,even=131i,stringu1="RWAAAA",stringu2="KKNAAA",string4="OOOOxx" 782697600000000000 +tenk unique1=6128i,unique2=9059i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=128i,twothousand=128i,fivethous=1128i,tenthous=6128i,odd=56i,even=57i,stringu1="SBAAAA",stringu2="LKNAAA",string4="VVVVxx" 782784000000000000 +tenk unique1=4274i,unique2=9060i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=274i,twothousand=274i,fivethous=4274i,tenthous=4274i,odd=148i,even=149i,stringu1="KIAAAA",stringu2="MKNAAA",string4="AAAAxx" 782870400000000000 +tenk unique1=3598i,unique2=9061i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=598i,twothousand=1598i,fivethous=3598i,tenthous=3598i,odd=196i,even=197i,stringu1="KIAAAA",stringu2="NKNAAA",string4="HHHHxx" 782956800000000000 +tenk unique1=7961i,unique2=9062i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=961i,twothousand=1961i,fivethous=2961i,tenthous=7961i,odd=122i,even=123i,stringu1="FUAAAA",stringu2="OKNAAA",string4="OOOOxx" 783043200000000000 +tenk unique1=2643i,unique2=9063i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=643i,twothousand=643i,fivethous=2643i,tenthous=2643i,odd=86i,even=87i,stringu1="RXAAAA",stringu2="PKNAAA",string4="VVVVxx" 783129600000000000 +tenk unique1=4547i,unique2=9064i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=547i,twothousand=547i,fivethous=4547i,tenthous=4547i,odd=94i,even=95i,stringu1="XSAAAA",stringu2="QKNAAA",string4="AAAAxx" 783216000000000000 +tenk unique1=3568i,unique2=9065i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=568i,twothousand=1568i,fivethous=3568i,tenthous=3568i,odd=136i,even=137i,stringu1="GHAAAA",stringu2="RKNAAA",string4="HHHHxx" 783302400000000000 +tenk unique1=8954i,unique2=9066i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=954i,twothousand=954i,fivethous=3954i,tenthous=8954i,odd=108i,even=109i,stringu1="KGAAAA",stringu2="SKNAAA",string4="OOOOxx" 783388800000000000 +tenk unique1=8802i,unique2=9067i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=802i,twothousand=802i,fivethous=3802i,tenthous=8802i,odd=4i,even=5i,stringu1="OAAAAA",stringu2="TKNAAA",string4="VVVVxx" 783475200000000000 +tenk unique1=7829i,unique2=9068i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=829i,twothousand=1829i,fivethous=2829i,tenthous=7829i,odd=58i,even=59i,stringu1="DPAAAA",stringu2="UKNAAA",string4="AAAAxx" 783561600000000000 +tenk unique1=1008i,unique2=9069i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=1008i,fivethous=1008i,tenthous=1008i,odd=16i,even=17i,stringu1="UMAAAA",stringu2="VKNAAA",string4="HHHHxx" 783648000000000000 +tenk unique1=3627i,unique2=9070i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=627i,twothousand=1627i,fivethous=3627i,tenthous=3627i,odd=54i,even=55i,stringu1="NJAAAA",stringu2="WKNAAA",string4="OOOOxx" 783734400000000000 +tenk unique1=3999i,unique2=9071i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=999i,twothousand=1999i,fivethous=3999i,tenthous=3999i,odd=198i,even=199i,stringu1="VXAAAA",stringu2="XKNAAA",string4="VVVVxx" 783820800000000000 +tenk unique1=7697i,unique2=9072i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=697i,twothousand=1697i,fivethous=2697i,tenthous=7697i,odd=194i,even=195i,stringu1="BKAAAA",stringu2="YKNAAA",string4="AAAAxx" 783907200000000000 +tenk unique1=9380i,unique2=9073i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=380i,twothousand=1380i,fivethous=4380i,tenthous=9380i,odd=160i,even=161i,stringu1="UWAAAA",stringu2="ZKNAAA",string4="HHHHxx" 783993600000000000 +tenk unique1=2707i,unique2=9074i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=707i,twothousand=707i,fivethous=2707i,tenthous=2707i,odd=14i,even=15i,stringu1="DAAAAA",stringu2="ALNAAA",string4="OOOOxx" 784080000000000000 +tenk unique1=4430i,unique2=9075i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=430i,twothousand=430i,fivethous=4430i,tenthous=4430i,odd=60i,even=61i,stringu1="KOAAAA",stringu2="BLNAAA",string4="VVVVxx" 784166400000000000 +tenk unique1=6440i,unique2=9076i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=440i,twothousand=440i,fivethous=1440i,tenthous=6440i,odd=80i,even=81i,stringu1="SNAAAA",stringu2="CLNAAA",string4="AAAAxx" 784252800000000000 +tenk unique1=9958i,unique2=9077i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=958i,twothousand=1958i,fivethous=4958i,tenthous=9958i,odd=116i,even=117i,stringu1="ATAAAA",stringu2="DLNAAA",string4="HHHHxx" 784339200000000000 +tenk unique1=7592i,unique2=9078i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=592i,twothousand=1592i,fivethous=2592i,tenthous=7592i,odd=184i,even=185i,stringu1="AGAAAA",stringu2="ELNAAA",string4="OOOOxx" 784425600000000000 +tenk unique1=7852i,unique2=9079i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=852i,twothousand=1852i,fivethous=2852i,tenthous=7852i,odd=104i,even=105i,stringu1="AQAAAA",stringu2="FLNAAA",string4="VVVVxx" 784512000000000000 +tenk unique1=9253i,unique2=9080i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=253i,twothousand=1253i,fivethous=4253i,tenthous=9253i,odd=106i,even=107i,stringu1="XRAAAA",stringu2="GLNAAA",string4="AAAAxx" 784598400000000000 +tenk unique1=5910i,unique2=9081i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=910i,twothousand=1910i,fivethous=910i,tenthous=5910i,odd=20i,even=21i,stringu1="ITAAAA",stringu2="HLNAAA",string4="HHHHxx" 784684800000000000 +tenk unique1=7487i,unique2=9082i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=487i,twothousand=1487i,fivethous=2487i,tenthous=7487i,odd=174i,even=175i,stringu1="ZBAAAA",stringu2="ILNAAA",string4="OOOOxx" 784771200000000000 +tenk unique1=6324i,unique2=9083i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=324i,twothousand=324i,fivethous=1324i,tenthous=6324i,odd=48i,even=49i,stringu1="GJAAAA",stringu2="JLNAAA",string4="VVVVxx" 784857600000000000 +tenk unique1=5792i,unique2=9084i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=792i,twothousand=1792i,fivethous=792i,tenthous=5792i,odd=184i,even=185i,stringu1="UOAAAA",stringu2="KLNAAA",string4="AAAAxx" 784944000000000000 +tenk unique1=7390i,unique2=9085i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=390i,twothousand=1390i,fivethous=2390i,tenthous=7390i,odd=180i,even=181i,stringu1="GYAAAA",stringu2="LLNAAA",string4="HHHHxx" 785030400000000000 +tenk unique1=8534i,unique2=9086i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=534i,twothousand=534i,fivethous=3534i,tenthous=8534i,odd=68i,even=69i,stringu1="GQAAAA",stringu2="MLNAAA",string4="OOOOxx" 785116800000000000 +tenk unique1=2690i,unique2=9087i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=690i,twothousand=690i,fivethous=2690i,tenthous=2690i,odd=180i,even=181i,stringu1="MZAAAA",stringu2="NLNAAA",string4="VVVVxx" 785203200000000000 +tenk unique1=3992i,unique2=9088i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=992i,twothousand=1992i,fivethous=3992i,tenthous=3992i,odd=184i,even=185i,stringu1="OXAAAA",stringu2="OLNAAA",string4="AAAAxx" 785289600000000000 +tenk unique1=6928i,unique2=9089i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=928i,twothousand=928i,fivethous=1928i,tenthous=6928i,odd=56i,even=57i,stringu1="MGAAAA",stringu2="PLNAAA",string4="HHHHxx" 785376000000000000 +tenk unique1=7815i,unique2=9090i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=815i,twothousand=1815i,fivethous=2815i,tenthous=7815i,odd=30i,even=31i,stringu1="POAAAA",stringu2="QLNAAA",string4="OOOOxx" 785462400000000000 +tenk unique1=9477i,unique2=9091i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=477i,twothousand=1477i,fivethous=4477i,tenthous=9477i,odd=154i,even=155i,stringu1="NAAAAA",stringu2="RLNAAA",string4="VVVVxx" 785548800000000000 +tenk unique1=497i,unique2=9092i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=497i,twothousand=497i,fivethous=497i,tenthous=497i,odd=194i,even=195i,stringu1="DTAAAA",stringu2="SLNAAA",string4="AAAAxx" 785635200000000000 +tenk unique1=7532i,unique2=9093i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=532i,twothousand=1532i,fivethous=2532i,tenthous=7532i,odd=64i,even=65i,stringu1="SDAAAA",stringu2="TLNAAA",string4="HHHHxx" 785721600000000000 +tenk unique1=9838i,unique2=9094i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=838i,twothousand=1838i,fivethous=4838i,tenthous=9838i,odd=76i,even=77i,stringu1="KOAAAA",stringu2="ULNAAA",string4="OOOOxx" 785808000000000000 +tenk unique1=1557i,unique2=9095i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=557i,twothousand=1557i,fivethous=1557i,tenthous=1557i,odd=114i,even=115i,stringu1="XHAAAA",stringu2="VLNAAA",string4="VVVVxx" 785894400000000000 +tenk unique1=2467i,unique2=9096i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=467i,twothousand=467i,fivethous=2467i,tenthous=2467i,odd=134i,even=135i,stringu1="XQAAAA",stringu2="WLNAAA",string4="AAAAxx" 785980800000000000 +tenk unique1=2367i,unique2=9097i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=367i,twothousand=367i,fivethous=2367i,tenthous=2367i,odd=134i,even=135i,stringu1="BNAAAA",stringu2="XLNAAA",string4="HHHHxx" 786067200000000000 +tenk unique1=5677i,unique2=9098i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=677i,twothousand=1677i,fivethous=677i,tenthous=5677i,odd=154i,even=155i,stringu1="JKAAAA",stringu2="YLNAAA",string4="OOOOxx" 786153600000000000 +tenk unique1=6193i,unique2=9099i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=193i,twothousand=193i,fivethous=1193i,tenthous=6193i,odd=186i,even=187i,stringu1="FEAAAA",stringu2="ZLNAAA",string4="VVVVxx" 786240000000000000 +tenk unique1=7126i,unique2=9100i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=126i,twothousand=1126i,fivethous=2126i,tenthous=7126i,odd=52i,even=53i,stringu1="COAAAA",stringu2="AMNAAA",string4="AAAAxx" 786326400000000000 +tenk unique1=5264i,unique2=9101i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=264i,twothousand=1264i,fivethous=264i,tenthous=5264i,odd=128i,even=129i,stringu1="MUAAAA",stringu2="BMNAAA",string4="HHHHxx" 786412800000000000 +tenk unique1=850i,unique2=9102i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=850i,twothousand=850i,fivethous=850i,tenthous=850i,odd=100i,even=101i,stringu1="SGAAAA",stringu2="CMNAAA",string4="OOOOxx" 786499200000000000 +tenk unique1=4854i,unique2=9103i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=854i,twothousand=854i,fivethous=4854i,tenthous=4854i,odd=108i,even=109i,stringu1="SEAAAA",stringu2="DMNAAA",string4="VVVVxx" 786585600000000000 +tenk unique1=4414i,unique2=9104i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=414i,twothousand=414i,fivethous=4414i,tenthous=4414i,odd=28i,even=29i,stringu1="UNAAAA",stringu2="EMNAAA",string4="AAAAxx" 786672000000000000 +tenk unique1=8971i,unique2=9105i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=971i,twothousand=971i,fivethous=3971i,tenthous=8971i,odd=142i,even=143i,stringu1="BHAAAA",stringu2="FMNAAA",string4="HHHHxx" 786758400000000000 +tenk unique1=9240i,unique2=9106i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=240i,twothousand=1240i,fivethous=4240i,tenthous=9240i,odd=80i,even=81i,stringu1="KRAAAA",stringu2="GMNAAA",string4="OOOOxx" 786844800000000000 +tenk unique1=7341i,unique2=9107i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=341i,twothousand=1341i,fivethous=2341i,tenthous=7341i,odd=82i,even=83i,stringu1="JWAAAA",stringu2="HMNAAA",string4="VVVVxx" 786931200000000000 +tenk unique1=3151i,unique2=9108i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=151i,twothousand=1151i,fivethous=3151i,tenthous=3151i,odd=102i,even=103i,stringu1="FRAAAA",stringu2="IMNAAA",string4="AAAAxx" 787017600000000000 +tenk unique1=1742i,unique2=9109i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=742i,twothousand=1742i,fivethous=1742i,tenthous=1742i,odd=84i,even=85i,stringu1="APAAAA",stringu2="JMNAAA",string4="HHHHxx" 787104000000000000 +tenk unique1=1347i,unique2=9110i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=347i,twothousand=1347i,fivethous=1347i,tenthous=1347i,odd=94i,even=95i,stringu1="VZAAAA",stringu2="KMNAAA",string4="OOOOxx" 787190400000000000 +tenk unique1=9418i,unique2=9111i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=418i,twothousand=1418i,fivethous=4418i,tenthous=9418i,odd=36i,even=37i,stringu1="GYAAAA",stringu2="LMNAAA",string4="VVVVxx" 787276800000000000 +tenk unique1=5452i,unique2=9112i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=452i,twothousand=1452i,fivethous=452i,tenthous=5452i,odd=104i,even=105i,stringu1="SBAAAA",stringu2="MMNAAA",string4="AAAAxx" 787363200000000000 +tenk unique1=8637i,unique2=9113i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=637i,twothousand=637i,fivethous=3637i,tenthous=8637i,odd=74i,even=75i,stringu1="FUAAAA",stringu2="NMNAAA",string4="HHHHxx" 787449600000000000 +tenk unique1=8287i,unique2=9114i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=287i,twothousand=287i,fivethous=3287i,tenthous=8287i,odd=174i,even=175i,stringu1="TGAAAA",stringu2="OMNAAA",string4="OOOOxx" 787536000000000000 +tenk unique1=9865i,unique2=9115i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=865i,twothousand=1865i,fivethous=4865i,tenthous=9865i,odd=130i,even=131i,stringu1="LPAAAA",stringu2="PMNAAA",string4="VVVVxx" 787622400000000000 +tenk unique1=1664i,unique2=9116i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=664i,twothousand=1664i,fivethous=1664i,tenthous=1664i,odd=128i,even=129i,stringu1="AMAAAA",stringu2="QMNAAA",string4="AAAAxx" 787708800000000000 +tenk unique1=9933i,unique2=9117i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=933i,twothousand=1933i,fivethous=4933i,tenthous=9933i,odd=66i,even=67i,stringu1="BSAAAA",stringu2="RMNAAA",string4="HHHHxx" 787795200000000000 +tenk unique1=3416i,unique2=9118i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=416i,twothousand=1416i,fivethous=3416i,tenthous=3416i,odd=32i,even=33i,stringu1="KBAAAA",stringu2="SMNAAA",string4="OOOOxx" 787881600000000000 +tenk unique1=7981i,unique2=9119i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=981i,twothousand=1981i,fivethous=2981i,tenthous=7981i,odd=162i,even=163i,stringu1="ZUAAAA",stringu2="TMNAAA",string4="VVVVxx" 787968000000000000 +tenk unique1=1981i,unique2=9120i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=981i,twothousand=1981i,fivethous=1981i,tenthous=1981i,odd=162i,even=163i,stringu1="FYAAAA",stringu2="UMNAAA",string4="AAAAxx" 788054400000000000 +tenk unique1=441i,unique2=9121i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=441i,twothousand=441i,fivethous=441i,tenthous=441i,odd=82i,even=83i,stringu1="ZQAAAA",stringu2="VMNAAA",string4="HHHHxx" 788140800000000000 +tenk unique1=1380i,unique2=9122i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=380i,twothousand=1380i,fivethous=1380i,tenthous=1380i,odd=160i,even=161i,stringu1="CBAAAA",stringu2="WMNAAA",string4="OOOOxx" 788227200000000000 +tenk unique1=7325i,unique2=9123i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=325i,twothousand=1325i,fivethous=2325i,tenthous=7325i,odd=50i,even=51i,stringu1="TVAAAA",stringu2="XMNAAA",string4="VVVVxx" 788313600000000000 +tenk unique1=5682i,unique2=9124i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=682i,twothousand=1682i,fivethous=682i,tenthous=5682i,odd=164i,even=165i,stringu1="OKAAAA",stringu2="YMNAAA",string4="AAAAxx" 788400000000000000 +tenk unique1=1024i,unique2=9125i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=24i,twothousand=1024i,fivethous=1024i,tenthous=1024i,odd=48i,even=49i,stringu1="KNAAAA",stringu2="ZMNAAA",string4="HHHHxx" 788486400000000000 +tenk unique1=1096i,unique2=9126i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=96i,twothousand=1096i,fivethous=1096i,tenthous=1096i,odd=192i,even=193i,stringu1="EQAAAA",stringu2="ANNAAA",string4="OOOOxx" 788572800000000000 +tenk unique1=4717i,unique2=9127i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=717i,twothousand=717i,fivethous=4717i,tenthous=4717i,odd=34i,even=35i,stringu1="LZAAAA",stringu2="BNNAAA",string4="VVVVxx" 788659200000000000 +tenk unique1=7948i,unique2=9128i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=948i,twothousand=1948i,fivethous=2948i,tenthous=7948i,odd=96i,even=97i,stringu1="STAAAA",stringu2="CNNAAA",string4="AAAAxx" 788745600000000000 +tenk unique1=4074i,unique2=9129i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=74i,twothousand=74i,fivethous=4074i,tenthous=4074i,odd=148i,even=149i,stringu1="SAAAAA",stringu2="DNNAAA",string4="HHHHxx" 788832000000000000 +tenk unique1=211i,unique2=9130i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=211i,twothousand=211i,fivethous=211i,tenthous=211i,odd=22i,even=23i,stringu1="DIAAAA",stringu2="ENNAAA",string4="OOOOxx" 788918400000000000 +tenk unique1=8993i,unique2=9131i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=993i,twothousand=993i,fivethous=3993i,tenthous=8993i,odd=186i,even=187i,stringu1="XHAAAA",stringu2="FNNAAA",string4="VVVVxx" 789004800000000000 +tenk unique1=4509i,unique2=9132i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=509i,twothousand=509i,fivethous=4509i,tenthous=4509i,odd=18i,even=19i,stringu1="LRAAAA",stringu2="GNNAAA",string4="AAAAxx" 789091200000000000 +tenk unique1=823i,unique2=9133i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=823i,twothousand=823i,fivethous=823i,tenthous=823i,odd=46i,even=47i,stringu1="RFAAAA",stringu2="HNNAAA",string4="HHHHxx" 789177600000000000 +tenk unique1=4747i,unique2=9134i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=747i,twothousand=747i,fivethous=4747i,tenthous=4747i,odd=94i,even=95i,stringu1="PAAAAA",stringu2="INNAAA",string4="OOOOxx" 789264000000000000 +tenk unique1=6955i,unique2=9135i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=955i,twothousand=955i,fivethous=1955i,tenthous=6955i,odd=110i,even=111i,stringu1="NHAAAA",stringu2="JNNAAA",string4="VVVVxx" 789350400000000000 +tenk unique1=7922i,unique2=9136i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=922i,twothousand=1922i,fivethous=2922i,tenthous=7922i,odd=44i,even=45i,stringu1="SSAAAA",stringu2="KNNAAA",string4="AAAAxx" 789436800000000000 +tenk unique1=6936i,unique2=9137i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=936i,twothousand=936i,fivethous=1936i,tenthous=6936i,odd=72i,even=73i,stringu1="UGAAAA",stringu2="LNNAAA",string4="HHHHxx" 789523200000000000 +tenk unique1=1546i,unique2=9138i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=546i,twothousand=1546i,fivethous=1546i,tenthous=1546i,odd=92i,even=93i,stringu1="MHAAAA",stringu2="MNNAAA",string4="OOOOxx" 789609600000000000 +tenk unique1=9836i,unique2=9139i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=836i,twothousand=1836i,fivethous=4836i,tenthous=9836i,odd=72i,even=73i,stringu1="IOAAAA",stringu2="NNNAAA",string4="VVVVxx" 789696000000000000 +tenk unique1=5626i,unique2=9140i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=626i,twothousand=1626i,fivethous=626i,tenthous=5626i,odd=52i,even=53i,stringu1="KIAAAA",stringu2="ONNAAA",string4="AAAAxx" 789782400000000000 +tenk unique1=4879i,unique2=9141i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=879i,twothousand=879i,fivethous=4879i,tenthous=4879i,odd=158i,even=159i,stringu1="RFAAAA",stringu2="PNNAAA",string4="HHHHxx" 789868800000000000 +tenk unique1=8590i,unique2=9142i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=590i,twothousand=590i,fivethous=3590i,tenthous=8590i,odd=180i,even=181i,stringu1="KSAAAA",stringu2="QNNAAA",string4="OOOOxx" 789955200000000000 +tenk unique1=8842i,unique2=9143i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=842i,twothousand=842i,fivethous=3842i,tenthous=8842i,odd=84i,even=85i,stringu1="CCAAAA",stringu2="RNNAAA",string4="VVVVxx" 790041600000000000 +tenk unique1=6505i,unique2=9144i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=505i,twothousand=505i,fivethous=1505i,tenthous=6505i,odd=10i,even=11i,stringu1="FQAAAA",stringu2="SNNAAA",string4="AAAAxx" 790128000000000000 +tenk unique1=2803i,unique2=9145i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=803i,twothousand=803i,fivethous=2803i,tenthous=2803i,odd=6i,even=7i,stringu1="VDAAAA",stringu2="TNNAAA",string4="HHHHxx" 790214400000000000 +tenk unique1=9258i,unique2=9146i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=258i,twothousand=1258i,fivethous=4258i,tenthous=9258i,odd=116i,even=117i,stringu1="CSAAAA",stringu2="UNNAAA",string4="OOOOxx" 790300800000000000 +tenk unique1=741i,unique2=9147i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=741i,twothousand=741i,fivethous=741i,tenthous=741i,odd=82i,even=83i,stringu1="NCAAAA",stringu2="VNNAAA",string4="VVVVxx" 790387200000000000 +tenk unique1=1457i,unique2=9148i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=457i,twothousand=1457i,fivethous=1457i,tenthous=1457i,odd=114i,even=115i,stringu1="BEAAAA",stringu2="WNNAAA",string4="AAAAxx" 790473600000000000 +tenk unique1=5777i,unique2=9149i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=777i,twothousand=1777i,fivethous=777i,tenthous=5777i,odd=154i,even=155i,stringu1="FOAAAA",stringu2="XNNAAA",string4="HHHHxx" 790560000000000000 +tenk unique1=2883i,unique2=9150i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=883i,twothousand=883i,fivethous=2883i,tenthous=2883i,odd=166i,even=167i,stringu1="XGAAAA",stringu2="YNNAAA",string4="OOOOxx" 790646400000000000 +tenk unique1=6610i,unique2=9151i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=610i,twothousand=610i,fivethous=1610i,tenthous=6610i,odd=20i,even=21i,stringu1="GUAAAA",stringu2="ZNNAAA",string4="VVVVxx" 790732800000000000 +tenk unique1=4331i,unique2=9152i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=331i,twothousand=331i,fivethous=4331i,tenthous=4331i,odd=62i,even=63i,stringu1="PKAAAA",stringu2="AONAAA",string4="AAAAxx" 790819200000000000 +tenk unique1=2712i,unique2=9153i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=712i,twothousand=712i,fivethous=2712i,tenthous=2712i,odd=24i,even=25i,stringu1="IAAAAA",stringu2="BONAAA",string4="HHHHxx" 790905600000000000 +tenk unique1=9268i,unique2=9154i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=268i,twothousand=1268i,fivethous=4268i,tenthous=9268i,odd=136i,even=137i,stringu1="MSAAAA",stringu2="CONAAA",string4="OOOOxx" 790992000000000000 +tenk unique1=410i,unique2=9155i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=410i,twothousand=410i,fivethous=410i,tenthous=410i,odd=20i,even=21i,stringu1="UPAAAA",stringu2="DONAAA",string4="VVVVxx" 791078400000000000 +tenk unique1=9411i,unique2=9156i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=411i,twothousand=1411i,fivethous=4411i,tenthous=9411i,odd=22i,even=23i,stringu1="ZXAAAA",stringu2="EONAAA",string4="AAAAxx" 791164800000000000 +tenk unique1=4683i,unique2=9157i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=683i,twothousand=683i,fivethous=4683i,tenthous=4683i,odd=166i,even=167i,stringu1="DYAAAA",stringu2="FONAAA",string4="HHHHxx" 791251200000000000 +tenk unique1=7072i,unique2=9158i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=72i,twothousand=1072i,fivethous=2072i,tenthous=7072i,odd=144i,even=145i,stringu1="AMAAAA",stringu2="GONAAA",string4="OOOOxx" 791337600000000000 +tenk unique1=5050i,unique2=9159i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=50i,twothousand=1050i,fivethous=50i,tenthous=5050i,odd=100i,even=101i,stringu1="GMAAAA",stringu2="HONAAA",string4="VVVVxx" 791424000000000000 +tenk unique1=5932i,unique2=9160i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=932i,twothousand=1932i,fivethous=932i,tenthous=5932i,odd=64i,even=65i,stringu1="EUAAAA",stringu2="IONAAA",string4="AAAAxx" 791510400000000000 +tenk unique1=2756i,unique2=9161i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=756i,twothousand=756i,fivethous=2756i,tenthous=2756i,odd=112i,even=113i,stringu1="ACAAAA",stringu2="JONAAA",string4="HHHHxx" 791596800000000000 +tenk unique1=9813i,unique2=9162i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=813i,twothousand=1813i,fivethous=4813i,tenthous=9813i,odd=26i,even=27i,stringu1="LNAAAA",stringu2="KONAAA",string4="OOOOxx" 791683200000000000 +tenk unique1=7388i,unique2=9163i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=388i,twothousand=1388i,fivethous=2388i,tenthous=7388i,odd=176i,even=177i,stringu1="EYAAAA",stringu2="LONAAA",string4="VVVVxx" 791769600000000000 +tenk unique1=2596i,unique2=9164i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=596i,twothousand=596i,fivethous=2596i,tenthous=2596i,odd=192i,even=193i,stringu1="WVAAAA",stringu2="MONAAA",string4="AAAAxx" 791856000000000000 +tenk unique1=5102i,unique2=9165i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=102i,twothousand=1102i,fivethous=102i,tenthous=5102i,odd=4i,even=5i,stringu1="GOAAAA",stringu2="NONAAA",string4="HHHHxx" 791942400000000000 +tenk unique1=208i,unique2=9166i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=208i,twothousand=208i,fivethous=208i,tenthous=208i,odd=16i,even=17i,stringu1="AIAAAA",stringu2="OONAAA",string4="OOOOxx" 792028800000000000 +tenk unique1=86i,unique2=9167i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=86i,twothousand=86i,fivethous=86i,tenthous=86i,odd=172i,even=173i,stringu1="IDAAAA",stringu2="PONAAA",string4="VVVVxx" 792115200000000000 +tenk unique1=8127i,unique2=9168i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=127i,twothousand=127i,fivethous=3127i,tenthous=8127i,odd=54i,even=55i,stringu1="PAAAAA",stringu2="QONAAA",string4="AAAAxx" 792201600000000000 +tenk unique1=5154i,unique2=9169i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=154i,twothousand=1154i,fivethous=154i,tenthous=5154i,odd=108i,even=109i,stringu1="GQAAAA",stringu2="RONAAA",string4="HHHHxx" 792288000000000000 +tenk unique1=4491i,unique2=9170i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=491i,twothousand=491i,fivethous=4491i,tenthous=4491i,odd=182i,even=183i,stringu1="TQAAAA",stringu2="SONAAA",string4="OOOOxx" 792374400000000000 +tenk unique1=7423i,unique2=9171i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=423i,twothousand=1423i,fivethous=2423i,tenthous=7423i,odd=46i,even=47i,stringu1="NZAAAA",stringu2="TONAAA",string4="VVVVxx" 792460800000000000 +tenk unique1=6441i,unique2=9172i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=441i,twothousand=441i,fivethous=1441i,tenthous=6441i,odd=82i,even=83i,stringu1="TNAAAA",stringu2="UONAAA",string4="AAAAxx" 792547200000000000 +tenk unique1=2920i,unique2=9173i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=920i,twothousand=920i,fivethous=2920i,tenthous=2920i,odd=40i,even=41i,stringu1="IIAAAA",stringu2="VONAAA",string4="HHHHxx" 792633600000000000 +tenk unique1=6386i,unique2=9174i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=386i,twothousand=386i,fivethous=1386i,tenthous=6386i,odd=172i,even=173i,stringu1="QLAAAA",stringu2="WONAAA",string4="OOOOxx" 792720000000000000 +tenk unique1=9744i,unique2=9175i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=744i,twothousand=1744i,fivethous=4744i,tenthous=9744i,odd=88i,even=89i,stringu1="UKAAAA",stringu2="XONAAA",string4="VVVVxx" 792806400000000000 +tenk unique1=2667i,unique2=9176i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=667i,twothousand=667i,fivethous=2667i,tenthous=2667i,odd=134i,even=135i,stringu1="PYAAAA",stringu2="YONAAA",string4="AAAAxx" 792892800000000000 +tenk unique1=5754i,unique2=9177i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=754i,twothousand=1754i,fivethous=754i,tenthous=5754i,odd=108i,even=109i,stringu1="INAAAA",stringu2="ZONAAA",string4="HHHHxx" 792979200000000000 +tenk unique1=4645i,unique2=9178i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=645i,twothousand=645i,fivethous=4645i,tenthous=4645i,odd=90i,even=91i,stringu1="RWAAAA",stringu2="APNAAA",string4="OOOOxx" 793065600000000000 +tenk unique1=4327i,unique2=9179i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=327i,twothousand=327i,fivethous=4327i,tenthous=4327i,odd=54i,even=55i,stringu1="LKAAAA",stringu2="BPNAAA",string4="VVVVxx" 793152000000000000 +tenk unique1=843i,unique2=9180i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=843i,twothousand=843i,fivethous=843i,tenthous=843i,odd=86i,even=87i,stringu1="LGAAAA",stringu2="CPNAAA",string4="AAAAxx" 793238400000000000 +tenk unique1=4085i,unique2=9181i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=85i,twothousand=85i,fivethous=4085i,tenthous=4085i,odd=170i,even=171i,stringu1="DBAAAA",stringu2="DPNAAA",string4="HHHHxx" 793324800000000000 +tenk unique1=2849i,unique2=9182i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=849i,twothousand=849i,fivethous=2849i,tenthous=2849i,odd=98i,even=99i,stringu1="PFAAAA",stringu2="EPNAAA",string4="OOOOxx" 793411200000000000 +tenk unique1=5734i,unique2=9183i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=734i,twothousand=1734i,fivethous=734i,tenthous=5734i,odd=68i,even=69i,stringu1="OMAAAA",stringu2="FPNAAA",string4="VVVVxx" 793497600000000000 +tenk unique1=5307i,unique2=9184i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=307i,twothousand=1307i,fivethous=307i,tenthous=5307i,odd=14i,even=15i,stringu1="DWAAAA",stringu2="GPNAAA",string4="AAAAxx" 793584000000000000 +tenk unique1=8433i,unique2=9185i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=433i,twothousand=433i,fivethous=3433i,tenthous=8433i,odd=66i,even=67i,stringu1="JMAAAA",stringu2="HPNAAA",string4="HHHHxx" 793670400000000000 +tenk unique1=3031i,unique2=9186i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=31i,twothousand=1031i,fivethous=3031i,tenthous=3031i,odd=62i,even=63i,stringu1="PMAAAA",stringu2="IPNAAA",string4="OOOOxx" 793756800000000000 +tenk unique1=5714i,unique2=9187i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=714i,twothousand=1714i,fivethous=714i,tenthous=5714i,odd=28i,even=29i,stringu1="ULAAAA",stringu2="JPNAAA",string4="VVVVxx" 793843200000000000 +tenk unique1=5969i,unique2=9188i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=969i,twothousand=1969i,fivethous=969i,tenthous=5969i,odd=138i,even=139i,stringu1="PVAAAA",stringu2="KPNAAA",string4="AAAAxx" 793929600000000000 +tenk unique1=2532i,unique2=9189i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=532i,twothousand=532i,fivethous=2532i,tenthous=2532i,odd=64i,even=65i,stringu1="KTAAAA",stringu2="LPNAAA",string4="HHHHxx" 794016000000000000 +tenk unique1=5219i,unique2=9190i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=219i,twothousand=1219i,fivethous=219i,tenthous=5219i,odd=38i,even=39i,stringu1="TSAAAA",stringu2="MPNAAA",string4="OOOOxx" 794102400000000000 +tenk unique1=7343i,unique2=9191i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=343i,twothousand=1343i,fivethous=2343i,tenthous=7343i,odd=86i,even=87i,stringu1="LWAAAA",stringu2="NPNAAA",string4="VVVVxx" 794188800000000000 +tenk unique1=9089i,unique2=9192i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=89i,twothousand=1089i,fivethous=4089i,tenthous=9089i,odd=178i,even=179i,stringu1="PLAAAA",stringu2="OPNAAA",string4="AAAAxx" 794275200000000000 +tenk unique1=9337i,unique2=9193i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=337i,twothousand=1337i,fivethous=4337i,tenthous=9337i,odd=74i,even=75i,stringu1="DVAAAA",stringu2="PPNAAA",string4="HHHHxx" 794361600000000000 +tenk unique1=5131i,unique2=9194i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=131i,twothousand=1131i,fivethous=131i,tenthous=5131i,odd=62i,even=63i,stringu1="JPAAAA",stringu2="QPNAAA",string4="OOOOxx" 794448000000000000 +tenk unique1=6253i,unique2=9195i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=253i,twothousand=253i,fivethous=1253i,tenthous=6253i,odd=106i,even=107i,stringu1="NGAAAA",stringu2="RPNAAA",string4="VVVVxx" 794534400000000000 +tenk unique1=5140i,unique2=9196i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=140i,twothousand=1140i,fivethous=140i,tenthous=5140i,odd=80i,even=81i,stringu1="SPAAAA",stringu2="SPNAAA",string4="AAAAxx" 794620800000000000 +tenk unique1=2953i,unique2=9197i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=953i,twothousand=953i,fivethous=2953i,tenthous=2953i,odd=106i,even=107i,stringu1="PJAAAA",stringu2="TPNAAA",string4="HHHHxx" 794707200000000000 +tenk unique1=4293i,unique2=9198i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=293i,twothousand=293i,fivethous=4293i,tenthous=4293i,odd=186i,even=187i,stringu1="DJAAAA",stringu2="UPNAAA",string4="OOOOxx" 794793600000000000 +tenk unique1=9974i,unique2=9199i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=974i,twothousand=1974i,fivethous=4974i,tenthous=9974i,odd=148i,even=149i,stringu1="QTAAAA",stringu2="VPNAAA",string4="VVVVxx" 794880000000000000 +tenk unique1=5061i,unique2=9200i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=61i,twothousand=1061i,fivethous=61i,tenthous=5061i,odd=122i,even=123i,stringu1="RMAAAA",stringu2="WPNAAA",string4="AAAAxx" 794966400000000000 +tenk unique1=8570i,unique2=9201i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=570i,twothousand=570i,fivethous=3570i,tenthous=8570i,odd=140i,even=141i,stringu1="QRAAAA",stringu2="XPNAAA",string4="HHHHxx" 795052800000000000 +tenk unique1=9504i,unique2=9202i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=504i,twothousand=1504i,fivethous=4504i,tenthous=9504i,odd=8i,even=9i,stringu1="OBAAAA",stringu2="YPNAAA",string4="OOOOxx" 795139200000000000 +tenk unique1=604i,unique2=9203i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=604i,twothousand=604i,fivethous=604i,tenthous=604i,odd=8i,even=9i,stringu1="GXAAAA",stringu2="ZPNAAA",string4="VVVVxx" 795225600000000000 +tenk unique1=4991i,unique2=9204i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=991i,twothousand=991i,fivethous=4991i,tenthous=4991i,odd=182i,even=183i,stringu1="ZJAAAA",stringu2="AQNAAA",string4="AAAAxx" 795312000000000000 +tenk unique1=880i,unique2=9205i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=880i,twothousand=880i,fivethous=880i,tenthous=880i,odd=160i,even=161i,stringu1="WHAAAA",stringu2="BQNAAA",string4="HHHHxx" 795398400000000000 +tenk unique1=3861i,unique2=9206i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=861i,twothousand=1861i,fivethous=3861i,tenthous=3861i,odd=122i,even=123i,stringu1="NSAAAA",stringu2="CQNAAA",string4="OOOOxx" 795484800000000000 +tenk unique1=8262i,unique2=9207i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=262i,twothousand=262i,fivethous=3262i,tenthous=8262i,odd=124i,even=125i,stringu1="UFAAAA",stringu2="DQNAAA",string4="VVVVxx" 795571200000000000 +tenk unique1=5689i,unique2=9208i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=689i,twothousand=1689i,fivethous=689i,tenthous=5689i,odd=178i,even=179i,stringu1="VKAAAA",stringu2="EQNAAA",string4="AAAAxx" 795657600000000000 +tenk unique1=1793i,unique2=9209i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=793i,twothousand=1793i,fivethous=1793i,tenthous=1793i,odd=186i,even=187i,stringu1="ZQAAAA",stringu2="FQNAAA",string4="HHHHxx" 795744000000000000 +tenk unique1=2661i,unique2=9210i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=661i,twothousand=661i,fivethous=2661i,tenthous=2661i,odd=122i,even=123i,stringu1="JYAAAA",stringu2="GQNAAA",string4="OOOOxx" 795830400000000000 +tenk unique1=7954i,unique2=9211i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=954i,twothousand=1954i,fivethous=2954i,tenthous=7954i,odd=108i,even=109i,stringu1="YTAAAA",stringu2="HQNAAA",string4="VVVVxx" 795916800000000000 +tenk unique1=1874i,unique2=9212i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=874i,twothousand=1874i,fivethous=1874i,tenthous=1874i,odd=148i,even=149i,stringu1="CUAAAA",stringu2="IQNAAA",string4="AAAAxx" 796003200000000000 +tenk unique1=2982i,unique2=9213i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=982i,twothousand=982i,fivethous=2982i,tenthous=2982i,odd=164i,even=165i,stringu1="SKAAAA",stringu2="JQNAAA",string4="HHHHxx" 796089600000000000 +tenk unique1=331i,unique2=9214i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=331i,twothousand=331i,fivethous=331i,tenthous=331i,odd=62i,even=63i,stringu1="TMAAAA",stringu2="KQNAAA",string4="OOOOxx" 796176000000000000 +tenk unique1=5021i,unique2=9215i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=21i,twothousand=1021i,fivethous=21i,tenthous=5021i,odd=42i,even=43i,stringu1="DLAAAA",stringu2="LQNAAA",string4="VVVVxx" 796262400000000000 +tenk unique1=9894i,unique2=9216i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=894i,twothousand=1894i,fivethous=4894i,tenthous=9894i,odd=188i,even=189i,stringu1="OQAAAA",stringu2="MQNAAA",string4="AAAAxx" 796348800000000000 +tenk unique1=7709i,unique2=9217i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=709i,twothousand=1709i,fivethous=2709i,tenthous=7709i,odd=18i,even=19i,stringu1="NKAAAA",stringu2="NQNAAA",string4="HHHHxx" 796435200000000000 +tenk unique1=4980i,unique2=9218i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=980i,twothousand=980i,fivethous=4980i,tenthous=4980i,odd=160i,even=161i,stringu1="OJAAAA",stringu2="OQNAAA",string4="OOOOxx" 796521600000000000 +tenk unique1=8249i,unique2=9219i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=249i,twothousand=249i,fivethous=3249i,tenthous=8249i,odd=98i,even=99i,stringu1="HFAAAA",stringu2="PQNAAA",string4="VVVVxx" 796608000000000000 +tenk unique1=7120i,unique2=9220i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=120i,twothousand=1120i,fivethous=2120i,tenthous=7120i,odd=40i,even=41i,stringu1="WNAAAA",stringu2="QQNAAA",string4="AAAAxx" 796694400000000000 +tenk unique1=7464i,unique2=9221i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=464i,twothousand=1464i,fivethous=2464i,tenthous=7464i,odd=128i,even=129i,stringu1="CBAAAA",stringu2="RQNAAA",string4="HHHHxx" 796780800000000000 +tenk unique1=8086i,unique2=9222i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=86i,twothousand=86i,fivethous=3086i,tenthous=8086i,odd=172i,even=173i,stringu1="AZAAAA",stringu2="SQNAAA",string4="OOOOxx" 796867200000000000 +tenk unique1=3509i,unique2=9223i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=509i,twothousand=1509i,fivethous=3509i,tenthous=3509i,odd=18i,even=19i,stringu1="ZEAAAA",stringu2="TQNAAA",string4="VVVVxx" 796953600000000000 +tenk unique1=3902i,unique2=9224i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=902i,twothousand=1902i,fivethous=3902i,tenthous=3902i,odd=4i,even=5i,stringu1="CUAAAA",stringu2="UQNAAA",string4="AAAAxx" 797040000000000000 +tenk unique1=9907i,unique2=9225i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=907i,twothousand=1907i,fivethous=4907i,tenthous=9907i,odd=14i,even=15i,stringu1="BRAAAA",stringu2="VQNAAA",string4="HHHHxx" 797126400000000000 +tenk unique1=6278i,unique2=9226i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=278i,twothousand=278i,fivethous=1278i,tenthous=6278i,odd=156i,even=157i,stringu1="MHAAAA",stringu2="WQNAAA",string4="OOOOxx" 797212800000000000 +tenk unique1=9316i,unique2=9227i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=316i,twothousand=1316i,fivethous=4316i,tenthous=9316i,odd=32i,even=33i,stringu1="IUAAAA",stringu2="XQNAAA",string4="VVVVxx" 797299200000000000 +tenk unique1=2824i,unique2=9228i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=824i,twothousand=824i,fivethous=2824i,tenthous=2824i,odd=48i,even=49i,stringu1="QEAAAA",stringu2="YQNAAA",string4="AAAAxx" 797385600000000000 +tenk unique1=1558i,unique2=9229i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=558i,twothousand=1558i,fivethous=1558i,tenthous=1558i,odd=116i,even=117i,stringu1="YHAAAA",stringu2="ZQNAAA",string4="HHHHxx" 797472000000000000 +tenk unique1=5436i,unique2=9230i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=436i,twothousand=1436i,fivethous=436i,tenthous=5436i,odd=72i,even=73i,stringu1="CBAAAA",stringu2="ARNAAA",string4="OOOOxx" 797558400000000000 +tenk unique1=1161i,unique2=9231i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=161i,twothousand=1161i,fivethous=1161i,tenthous=1161i,odd=122i,even=123i,stringu1="RSAAAA",stringu2="BRNAAA",string4="VVVVxx" 797644800000000000 +tenk unique1=7569i,unique2=9232i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=569i,twothousand=1569i,fivethous=2569i,tenthous=7569i,odd=138i,even=139i,stringu1="DFAAAA",stringu2="CRNAAA",string4="AAAAxx" 797731200000000000 +tenk unique1=9614i,unique2=9233i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=614i,twothousand=1614i,fivethous=4614i,tenthous=9614i,odd=28i,even=29i,stringu1="UFAAAA",stringu2="DRNAAA",string4="HHHHxx" 797817600000000000 +tenk unique1=6970i,unique2=9234i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=970i,twothousand=970i,fivethous=1970i,tenthous=6970i,odd=140i,even=141i,stringu1="CIAAAA",stringu2="ERNAAA",string4="OOOOxx" 797904000000000000 +tenk unique1=2422i,unique2=9235i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=422i,twothousand=422i,fivethous=2422i,tenthous=2422i,odd=44i,even=45i,stringu1="EPAAAA",stringu2="FRNAAA",string4="VVVVxx" 797990400000000000 +tenk unique1=8860i,unique2=9236i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=860i,twothousand=860i,fivethous=3860i,tenthous=8860i,odd=120i,even=121i,stringu1="UCAAAA",stringu2="GRNAAA",string4="AAAAxx" 798076800000000000 +tenk unique1=9912i,unique2=9237i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=912i,twothousand=1912i,fivethous=4912i,tenthous=9912i,odd=24i,even=25i,stringu1="GRAAAA",stringu2="HRNAAA",string4="HHHHxx" 798163200000000000 +tenk unique1=1109i,unique2=9238i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=109i,twothousand=1109i,fivethous=1109i,tenthous=1109i,odd=18i,even=19i,stringu1="RQAAAA",stringu2="IRNAAA",string4="OOOOxx" 798249600000000000 +tenk unique1=3286i,unique2=9239i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=286i,twothousand=1286i,fivethous=3286i,tenthous=3286i,odd=172i,even=173i,stringu1="KWAAAA",stringu2="JRNAAA",string4="VVVVxx" 798336000000000000 +tenk unique1=2277i,unique2=9240i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=277i,twothousand=277i,fivethous=2277i,tenthous=2277i,odd=154i,even=155i,stringu1="PJAAAA",stringu2="KRNAAA",string4="AAAAxx" 798422400000000000 +tenk unique1=8656i,unique2=9241i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=656i,twothousand=656i,fivethous=3656i,tenthous=8656i,odd=112i,even=113i,stringu1="YUAAAA",stringu2="LRNAAA",string4="HHHHxx" 798508800000000000 +tenk unique1=4656i,unique2=9242i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=656i,twothousand=656i,fivethous=4656i,tenthous=4656i,odd=112i,even=113i,stringu1="CXAAAA",stringu2="MRNAAA",string4="OOOOxx" 798595200000000000 +tenk unique1=6965i,unique2=9243i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=965i,twothousand=965i,fivethous=1965i,tenthous=6965i,odd=130i,even=131i,stringu1="XHAAAA",stringu2="NRNAAA",string4="VVVVxx" 798681600000000000 +tenk unique1=7591i,unique2=9244i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=591i,twothousand=1591i,fivethous=2591i,tenthous=7591i,odd=182i,even=183i,stringu1="ZFAAAA",stringu2="ORNAAA",string4="AAAAxx" 798768000000000000 +tenk unique1=4883i,unique2=9245i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=883i,twothousand=883i,fivethous=4883i,tenthous=4883i,odd=166i,even=167i,stringu1="VFAAAA",stringu2="PRNAAA",string4="HHHHxx" 798854400000000000 +tenk unique1=452i,unique2=9246i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=452i,twothousand=452i,fivethous=452i,tenthous=452i,odd=104i,even=105i,stringu1="KRAAAA",stringu2="QRNAAA",string4="OOOOxx" 798940800000000000 +tenk unique1=4018i,unique2=9247i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=18i,twothousand=18i,fivethous=4018i,tenthous=4018i,odd=36i,even=37i,stringu1="OYAAAA",stringu2="RRNAAA",string4="VVVVxx" 799027200000000000 +tenk unique1=4066i,unique2=9248i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=66i,twothousand=66i,fivethous=4066i,tenthous=4066i,odd=132i,even=133i,stringu1="KAAAAA",stringu2="SRNAAA",string4="AAAAxx" 799113600000000000 +tenk unique1=6480i,unique2=9249i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=480i,twothousand=480i,fivethous=1480i,tenthous=6480i,odd=160i,even=161i,stringu1="GPAAAA",stringu2="TRNAAA",string4="HHHHxx" 799200000000000000 +tenk unique1=8634i,unique2=9250i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=634i,twothousand=634i,fivethous=3634i,tenthous=8634i,odd=68i,even=69i,stringu1="CUAAAA",stringu2="URNAAA",string4="OOOOxx" 799286400000000000 +tenk unique1=9387i,unique2=9251i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=387i,twothousand=1387i,fivethous=4387i,tenthous=9387i,odd=174i,even=175i,stringu1="BXAAAA",stringu2="VRNAAA",string4="VVVVxx" 799372800000000000 +tenk unique1=3476i,unique2=9252i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=476i,twothousand=1476i,fivethous=3476i,tenthous=3476i,odd=152i,even=153i,stringu1="SDAAAA",stringu2="WRNAAA",string4="AAAAxx" 799459200000000000 +tenk unique1=5995i,unique2=9253i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=995i,twothousand=1995i,fivethous=995i,tenthous=5995i,odd=190i,even=191i,stringu1="PWAAAA",stringu2="XRNAAA",string4="HHHHxx" 799545600000000000 +tenk unique1=9677i,unique2=9254i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=677i,twothousand=1677i,fivethous=4677i,tenthous=9677i,odd=154i,even=155i,stringu1="FIAAAA",stringu2="YRNAAA",string4="OOOOxx" 799632000000000000 +tenk unique1=3884i,unique2=9255i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=884i,twothousand=1884i,fivethous=3884i,tenthous=3884i,odd=168i,even=169i,stringu1="KTAAAA",stringu2="ZRNAAA",string4="VVVVxx" 799718400000000000 +tenk unique1=6500i,unique2=9256i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=500i,twothousand=500i,fivethous=1500i,tenthous=6500i,odd=0i,even=1i,stringu1="AQAAAA",stringu2="ASNAAA",string4="AAAAxx" 799804800000000000 +tenk unique1=7972i,unique2=9257i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=972i,twothousand=1972i,fivethous=2972i,tenthous=7972i,odd=144i,even=145i,stringu1="QUAAAA",stringu2="BSNAAA",string4="HHHHxx" 799891200000000000 +tenk unique1=5281i,unique2=9258i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=281i,twothousand=1281i,fivethous=281i,tenthous=5281i,odd=162i,even=163i,stringu1="DVAAAA",stringu2="CSNAAA",string4="OOOOxx" 799977600000000000 +tenk unique1=1288i,unique2=9259i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=288i,twothousand=1288i,fivethous=1288i,tenthous=1288i,odd=176i,even=177i,stringu1="OXAAAA",stringu2="DSNAAA",string4="VVVVxx" 800064000000000000 +tenk unique1=4366i,unique2=9260i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=366i,twothousand=366i,fivethous=4366i,tenthous=4366i,odd=132i,even=133i,stringu1="YLAAAA",stringu2="ESNAAA",string4="AAAAxx" 800150400000000000 +tenk unique1=6557i,unique2=9261i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=557i,twothousand=557i,fivethous=1557i,tenthous=6557i,odd=114i,even=115i,stringu1="FSAAAA",stringu2="FSNAAA",string4="HHHHxx" 800236800000000000 +tenk unique1=7086i,unique2=9262i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=86i,twothousand=1086i,fivethous=2086i,tenthous=7086i,odd=172i,even=173i,stringu1="OMAAAA",stringu2="GSNAAA",string4="OOOOxx" 800323200000000000 +tenk unique1=6588i,unique2=9263i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=588i,twothousand=588i,fivethous=1588i,tenthous=6588i,odd=176i,even=177i,stringu1="KTAAAA",stringu2="HSNAAA",string4="VVVVxx" 800409600000000000 +tenk unique1=9062i,unique2=9264i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=62i,twothousand=1062i,fivethous=4062i,tenthous=9062i,odd=124i,even=125i,stringu1="OKAAAA",stringu2="ISNAAA",string4="AAAAxx" 800496000000000000 +tenk unique1=9230i,unique2=9265i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=230i,twothousand=1230i,fivethous=4230i,tenthous=9230i,odd=60i,even=61i,stringu1="ARAAAA",stringu2="JSNAAA",string4="HHHHxx" 800582400000000000 +tenk unique1=7672i,unique2=9266i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=672i,twothousand=1672i,fivethous=2672i,tenthous=7672i,odd=144i,even=145i,stringu1="CJAAAA",stringu2="KSNAAA",string4="OOOOxx" 800668800000000000 +tenk unique1=5204i,unique2=9267i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=204i,twothousand=1204i,fivethous=204i,tenthous=5204i,odd=8i,even=9i,stringu1="ESAAAA",stringu2="LSNAAA",string4="VVVVxx" 800755200000000000 +tenk unique1=2836i,unique2=9268i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=836i,twothousand=836i,fivethous=2836i,tenthous=2836i,odd=72i,even=73i,stringu1="CFAAAA",stringu2="MSNAAA",string4="AAAAxx" 800841600000000000 +tenk unique1=7165i,unique2=9269i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=165i,twothousand=1165i,fivethous=2165i,tenthous=7165i,odd=130i,even=131i,stringu1="PPAAAA",stringu2="NSNAAA",string4="HHHHxx" 800928000000000000 +tenk unique1=971i,unique2=9270i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=971i,twothousand=971i,fivethous=971i,tenthous=971i,odd=142i,even=143i,stringu1="JLAAAA",stringu2="OSNAAA",string4="OOOOxx" 801014400000000000 +tenk unique1=3851i,unique2=9271i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=851i,twothousand=1851i,fivethous=3851i,tenthous=3851i,odd=102i,even=103i,stringu1="DSAAAA",stringu2="PSNAAA",string4="VVVVxx" 801100800000000000 +tenk unique1=8593i,unique2=9272i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=593i,twothousand=593i,fivethous=3593i,tenthous=8593i,odd=186i,even=187i,stringu1="NSAAAA",stringu2="QSNAAA",string4="AAAAxx" 801187200000000000 +tenk unique1=7742i,unique2=9273i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=742i,twothousand=1742i,fivethous=2742i,tenthous=7742i,odd=84i,even=85i,stringu1="ULAAAA",stringu2="RSNAAA",string4="HHHHxx" 801273600000000000 +tenk unique1=2887i,unique2=9274i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=887i,twothousand=887i,fivethous=2887i,tenthous=2887i,odd=174i,even=175i,stringu1="BHAAAA",stringu2="SSNAAA",string4="OOOOxx" 801360000000000000 +tenk unique1=8479i,unique2=9275i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=479i,twothousand=479i,fivethous=3479i,tenthous=8479i,odd=158i,even=159i,stringu1="DOAAAA",stringu2="TSNAAA",string4="VVVVxx" 801446400000000000 +tenk unique1=9514i,unique2=9276i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=514i,twothousand=1514i,fivethous=4514i,tenthous=9514i,odd=28i,even=29i,stringu1="YBAAAA",stringu2="USNAAA",string4="AAAAxx" 801532800000000000 +tenk unique1=273i,unique2=9277i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=273i,twothousand=273i,fivethous=273i,tenthous=273i,odd=146i,even=147i,stringu1="NKAAAA",stringu2="VSNAAA",string4="HHHHxx" 801619200000000000 +tenk unique1=2938i,unique2=9278i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=938i,twothousand=938i,fivethous=2938i,tenthous=2938i,odd=76i,even=77i,stringu1="AJAAAA",stringu2="WSNAAA",string4="OOOOxx" 801705600000000000 +tenk unique1=9793i,unique2=9279i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=793i,twothousand=1793i,fivethous=4793i,tenthous=9793i,odd=186i,even=187i,stringu1="RMAAAA",stringu2="XSNAAA",string4="VVVVxx" 801792000000000000 +tenk unique1=8050i,unique2=9280i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=50i,twothousand=50i,fivethous=3050i,tenthous=8050i,odd=100i,even=101i,stringu1="QXAAAA",stringu2="YSNAAA",string4="AAAAxx" 801878400000000000 +tenk unique1=6702i,unique2=9281i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=702i,twothousand=702i,fivethous=1702i,tenthous=6702i,odd=4i,even=5i,stringu1="UXAAAA",stringu2="ZSNAAA",string4="HHHHxx" 801964800000000000 +tenk unique1=7290i,unique2=9282i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=290i,twothousand=1290i,fivethous=2290i,tenthous=7290i,odd=180i,even=181i,stringu1="KUAAAA",stringu2="ATNAAA",string4="OOOOxx" 802051200000000000 +tenk unique1=1837i,unique2=9283i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=837i,twothousand=1837i,fivethous=1837i,tenthous=1837i,odd=74i,even=75i,stringu1="RSAAAA",stringu2="BTNAAA",string4="VVVVxx" 802137600000000000 +tenk unique1=3206i,unique2=9284i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=206i,twothousand=1206i,fivethous=3206i,tenthous=3206i,odd=12i,even=13i,stringu1="ITAAAA",stringu2="CTNAAA",string4="AAAAxx" 802224000000000000 +tenk unique1=4925i,unique2=9285i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=925i,twothousand=925i,fivethous=4925i,tenthous=4925i,odd=50i,even=51i,stringu1="LHAAAA",stringu2="DTNAAA",string4="HHHHxx" 802310400000000000 +tenk unique1=5066i,unique2=9286i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=66i,twothousand=1066i,fivethous=66i,tenthous=5066i,odd=132i,even=133i,stringu1="WMAAAA",stringu2="ETNAAA",string4="OOOOxx" 802396800000000000 +tenk unique1=3401i,unique2=9287i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=401i,twothousand=1401i,fivethous=3401i,tenthous=3401i,odd=2i,even=3i,stringu1="VAAAAA",stringu2="FTNAAA",string4="VVVVxx" 802483200000000000 +tenk unique1=3474i,unique2=9288i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=474i,twothousand=1474i,fivethous=3474i,tenthous=3474i,odd=148i,even=149i,stringu1="QDAAAA",stringu2="GTNAAA",string4="AAAAxx" 802569600000000000 +tenk unique1=57i,unique2=9289i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=57i,twothousand=57i,fivethous=57i,tenthous=57i,odd=114i,even=115i,stringu1="FCAAAA",stringu2="HTNAAA",string4="HHHHxx" 802656000000000000 +tenk unique1=2082i,unique2=9290i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=82i,twothousand=82i,fivethous=2082i,tenthous=2082i,odd=164i,even=165i,stringu1="CCAAAA",stringu2="ITNAAA",string4="OOOOxx" 802742400000000000 +tenk unique1=100i,unique2=9291i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=100i,twothousand=100i,fivethous=100i,tenthous=100i,odd=0i,even=1i,stringu1="WDAAAA",stringu2="JTNAAA",string4="VVVVxx" 802828800000000000 +tenk unique1=9665i,unique2=9292i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=665i,twothousand=1665i,fivethous=4665i,tenthous=9665i,odd=130i,even=131i,stringu1="THAAAA",stringu2="KTNAAA",string4="AAAAxx" 802915200000000000 +tenk unique1=8284i,unique2=9293i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=284i,twothousand=284i,fivethous=3284i,tenthous=8284i,odd=168i,even=169i,stringu1="QGAAAA",stringu2="LTNAAA",string4="HHHHxx" 803001600000000000 +tenk unique1=958i,unique2=9294i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=958i,twothousand=958i,fivethous=958i,tenthous=958i,odd=116i,even=117i,stringu1="WKAAAA",stringu2="MTNAAA",string4="OOOOxx" 803088000000000000 +tenk unique1=5282i,unique2=9295i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=282i,twothousand=1282i,fivethous=282i,tenthous=5282i,odd=164i,even=165i,stringu1="EVAAAA",stringu2="NTNAAA",string4="VVVVxx" 803174400000000000 +tenk unique1=4257i,unique2=9296i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=257i,twothousand=257i,fivethous=4257i,tenthous=4257i,odd=114i,even=115i,stringu1="THAAAA",stringu2="OTNAAA",string4="AAAAxx" 803260800000000000 +tenk unique1=3160i,unique2=9297i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=160i,twothousand=1160i,fivethous=3160i,tenthous=3160i,odd=120i,even=121i,stringu1="ORAAAA",stringu2="PTNAAA",string4="HHHHxx" 803347200000000000 +tenk unique1=8449i,unique2=9298i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=449i,twothousand=449i,fivethous=3449i,tenthous=8449i,odd=98i,even=99i,stringu1="ZMAAAA",stringu2="QTNAAA",string4="OOOOxx" 803433600000000000 +tenk unique1=500i,unique2=9299i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=500i,twothousand=500i,fivethous=500i,tenthous=500i,odd=0i,even=1i,stringu1="GTAAAA",stringu2="RTNAAA",string4="VVVVxx" 803520000000000000 +tenk unique1=6432i,unique2=9300i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=432i,twothousand=432i,fivethous=1432i,tenthous=6432i,odd=64i,even=65i,stringu1="KNAAAA",stringu2="STNAAA",string4="AAAAxx" 803606400000000000 +tenk unique1=6220i,unique2=9301i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=220i,twothousand=220i,fivethous=1220i,tenthous=6220i,odd=40i,even=41i,stringu1="GFAAAA",stringu2="TTNAAA",string4="HHHHxx" 803692800000000000 +tenk unique1=7233i,unique2=9302i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=233i,twothousand=1233i,fivethous=2233i,tenthous=7233i,odd=66i,even=67i,stringu1="FSAAAA",stringu2="UTNAAA",string4="OOOOxx" 803779200000000000 +tenk unique1=2723i,unique2=9303i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=723i,twothousand=723i,fivethous=2723i,tenthous=2723i,odd=46i,even=47i,stringu1="TAAAAA",stringu2="VTNAAA",string4="VVVVxx" 803865600000000000 +tenk unique1=1899i,unique2=9304i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=899i,twothousand=1899i,fivethous=1899i,tenthous=1899i,odd=198i,even=199i,stringu1="BVAAAA",stringu2="WTNAAA",string4="AAAAxx" 803952000000000000 +tenk unique1=7158i,unique2=9305i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=158i,twothousand=1158i,fivethous=2158i,tenthous=7158i,odd=116i,even=117i,stringu1="IPAAAA",stringu2="XTNAAA",string4="HHHHxx" 804038400000000000 +tenk unique1=202i,unique2=9306i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=202i,twothousand=202i,fivethous=202i,tenthous=202i,odd=4i,even=5i,stringu1="UHAAAA",stringu2="YTNAAA",string4="OOOOxx" 804124800000000000 +tenk unique1=2286i,unique2=9307i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=286i,twothousand=286i,fivethous=2286i,tenthous=2286i,odd=172i,even=173i,stringu1="YJAAAA",stringu2="ZTNAAA",string4="VVVVxx" 804211200000000000 +tenk unique1=5356i,unique2=9308i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=356i,twothousand=1356i,fivethous=356i,tenthous=5356i,odd=112i,even=113i,stringu1="AYAAAA",stringu2="AUNAAA",string4="AAAAxx" 804297600000000000 +tenk unique1=3809i,unique2=9309i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=809i,twothousand=1809i,fivethous=3809i,tenthous=3809i,odd=18i,even=19i,stringu1="NQAAAA",stringu2="BUNAAA",string4="HHHHxx" 804384000000000000 +tenk unique1=3979i,unique2=9310i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=979i,twothousand=1979i,fivethous=3979i,tenthous=3979i,odd=158i,even=159i,stringu1="BXAAAA",stringu2="CUNAAA",string4="OOOOxx" 804470400000000000 +tenk unique1=8359i,unique2=9311i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=359i,twothousand=359i,fivethous=3359i,tenthous=8359i,odd=118i,even=119i,stringu1="NJAAAA",stringu2="DUNAAA",string4="VVVVxx" 804556800000000000 +tenk unique1=3479i,unique2=9312i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=479i,twothousand=1479i,fivethous=3479i,tenthous=3479i,odd=158i,even=159i,stringu1="VDAAAA",stringu2="EUNAAA",string4="AAAAxx" 804643200000000000 +tenk unique1=4895i,unique2=9313i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=895i,twothousand=895i,fivethous=4895i,tenthous=4895i,odd=190i,even=191i,stringu1="HGAAAA",stringu2="FUNAAA",string4="HHHHxx" 804729600000000000 +tenk unique1=6059i,unique2=9314i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=59i,twothousand=59i,fivethous=1059i,tenthous=6059i,odd=118i,even=119i,stringu1="BZAAAA",stringu2="GUNAAA",string4="OOOOxx" 804816000000000000 +tenk unique1=9560i,unique2=9315i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=560i,twothousand=1560i,fivethous=4560i,tenthous=9560i,odd=120i,even=121i,stringu1="SDAAAA",stringu2="HUNAAA",string4="VVVVxx" 804902400000000000 +tenk unique1=6756i,unique2=9316i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=756i,twothousand=756i,fivethous=1756i,tenthous=6756i,odd=112i,even=113i,stringu1="WZAAAA",stringu2="IUNAAA",string4="AAAAxx" 804988800000000000 +tenk unique1=7504i,unique2=9317i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=504i,twothousand=1504i,fivethous=2504i,tenthous=7504i,odd=8i,even=9i,stringu1="QCAAAA",stringu2="JUNAAA",string4="HHHHxx" 805075200000000000 +tenk unique1=6762i,unique2=9318i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=762i,twothousand=762i,fivethous=1762i,tenthous=6762i,odd=124i,even=125i,stringu1="CAAAAA",stringu2="KUNAAA",string4="OOOOxx" 805161600000000000 +tenk unique1=5304i,unique2=9319i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=304i,twothousand=1304i,fivethous=304i,tenthous=5304i,odd=8i,even=9i,stringu1="AWAAAA",stringu2="LUNAAA",string4="VVVVxx" 805248000000000000 +tenk unique1=9533i,unique2=9320i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=533i,twothousand=1533i,fivethous=4533i,tenthous=9533i,odd=66i,even=67i,stringu1="RCAAAA",stringu2="MUNAAA",string4="AAAAxx" 805334400000000000 +tenk unique1=6649i,unique2=9321i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=649i,twothousand=649i,fivethous=1649i,tenthous=6649i,odd=98i,even=99i,stringu1="TVAAAA",stringu2="NUNAAA",string4="HHHHxx" 805420800000000000 +tenk unique1=38i,unique2=9322i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=38i,twothousand=38i,fivethous=38i,tenthous=38i,odd=76i,even=77i,stringu1="MBAAAA",stringu2="OUNAAA",string4="OOOOxx" 805507200000000000 +tenk unique1=5713i,unique2=9323i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=713i,twothousand=1713i,fivethous=713i,tenthous=5713i,odd=26i,even=27i,stringu1="TLAAAA",stringu2="PUNAAA",string4="VVVVxx" 805593600000000000 +tenk unique1=3000i,unique2=9324i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=1000i,fivethous=3000i,tenthous=3000i,odd=0i,even=1i,stringu1="KLAAAA",stringu2="QUNAAA",string4="AAAAxx" 805680000000000000 +tenk unique1=3738i,unique2=9325i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=738i,twothousand=1738i,fivethous=3738i,tenthous=3738i,odd=76i,even=77i,stringu1="UNAAAA",stringu2="RUNAAA",string4="HHHHxx" 805766400000000000 +tenk unique1=3327i,unique2=9326i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=327i,twothousand=1327i,fivethous=3327i,tenthous=3327i,odd=54i,even=55i,stringu1="ZXAAAA",stringu2="SUNAAA",string4="OOOOxx" 805852800000000000 +tenk unique1=3922i,unique2=9327i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=922i,twothousand=1922i,fivethous=3922i,tenthous=3922i,odd=44i,even=45i,stringu1="WUAAAA",stringu2="TUNAAA",string4="VVVVxx" 805939200000000000 +tenk unique1=9245i,unique2=9328i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=245i,twothousand=1245i,fivethous=4245i,tenthous=9245i,odd=90i,even=91i,stringu1="PRAAAA",stringu2="UUNAAA",string4="AAAAxx" 806025600000000000 +tenk unique1=2172i,unique2=9329i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=172i,twothousand=172i,fivethous=2172i,tenthous=2172i,odd=144i,even=145i,stringu1="OFAAAA",stringu2="VUNAAA",string4="HHHHxx" 806112000000000000 +tenk unique1=7128i,unique2=9330i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=128i,twothousand=1128i,fivethous=2128i,tenthous=7128i,odd=56i,even=57i,stringu1="EOAAAA",stringu2="WUNAAA",string4="OOOOxx" 806198400000000000 +tenk unique1=1195i,unique2=9331i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=195i,twothousand=1195i,fivethous=1195i,tenthous=1195i,odd=190i,even=191i,stringu1="ZTAAAA",stringu2="XUNAAA",string4="VVVVxx" 806284800000000000 +tenk unique1=8445i,unique2=9332i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=445i,twothousand=445i,fivethous=3445i,tenthous=8445i,odd=90i,even=91i,stringu1="VMAAAA",stringu2="YUNAAA",string4="AAAAxx" 806371200000000000 +tenk unique1=8638i,unique2=9333i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=638i,twothousand=638i,fivethous=3638i,tenthous=8638i,odd=76i,even=77i,stringu1="GUAAAA",stringu2="ZUNAAA",string4="HHHHxx" 806457600000000000 +tenk unique1=1249i,unique2=9334i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=249i,twothousand=1249i,fivethous=1249i,tenthous=1249i,odd=98i,even=99i,stringu1="BWAAAA",stringu2="AVNAAA",string4="OOOOxx" 806544000000000000 +tenk unique1=8659i,unique2=9335i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=659i,twothousand=659i,fivethous=3659i,tenthous=8659i,odd=118i,even=119i,stringu1="BVAAAA",stringu2="BVNAAA",string4="VVVVxx" 806630400000000000 +tenk unique1=3556i,unique2=9336i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=556i,twothousand=1556i,fivethous=3556i,tenthous=3556i,odd=112i,even=113i,stringu1="UGAAAA",stringu2="CVNAAA",string4="AAAAxx" 806716800000000000 +tenk unique1=3347i,unique2=9337i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=347i,twothousand=1347i,fivethous=3347i,tenthous=3347i,odd=94i,even=95i,stringu1="TYAAAA",stringu2="DVNAAA",string4="HHHHxx" 806803200000000000 +tenk unique1=3260i,unique2=9338i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=260i,twothousand=1260i,fivethous=3260i,tenthous=3260i,odd=120i,even=121i,stringu1="KVAAAA",stringu2="EVNAAA",string4="OOOOxx" 806889600000000000 +tenk unique1=5139i,unique2=9339i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=139i,twothousand=1139i,fivethous=139i,tenthous=5139i,odd=78i,even=79i,stringu1="RPAAAA",stringu2="FVNAAA",string4="VVVVxx" 806976000000000000 +tenk unique1=9991i,unique2=9340i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=991i,twothousand=1991i,fivethous=4991i,tenthous=9991i,odd=182i,even=183i,stringu1="HUAAAA",stringu2="GVNAAA",string4="AAAAxx" 807062400000000000 +tenk unique1=5499i,unique2=9341i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=499i,twothousand=1499i,fivethous=499i,tenthous=5499i,odd=198i,even=199i,stringu1="NDAAAA",stringu2="HVNAAA",string4="HHHHxx" 807148800000000000 +tenk unique1=8082i,unique2=9342i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=82i,twothousand=82i,fivethous=3082i,tenthous=8082i,odd=164i,even=165i,stringu1="WYAAAA",stringu2="IVNAAA",string4="OOOOxx" 807235200000000000 +tenk unique1=1640i,unique2=9343i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=640i,twothousand=1640i,fivethous=1640i,tenthous=1640i,odd=80i,even=81i,stringu1="CLAAAA",stringu2="JVNAAA",string4="VVVVxx" 807321600000000000 +tenk unique1=8726i,unique2=9344i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=726i,twothousand=726i,fivethous=3726i,tenthous=8726i,odd=52i,even=53i,stringu1="QXAAAA",stringu2="KVNAAA",string4="AAAAxx" 807408000000000000 +tenk unique1=2339i,unique2=9345i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=339i,twothousand=339i,fivethous=2339i,tenthous=2339i,odd=78i,even=79i,stringu1="ZLAAAA",stringu2="LVNAAA",string4="HHHHxx" 807494400000000000 +tenk unique1=2601i,unique2=9346i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=601i,twothousand=601i,fivethous=2601i,tenthous=2601i,odd=2i,even=3i,stringu1="BWAAAA",stringu2="MVNAAA",string4="OOOOxx" 807580800000000000 +tenk unique1=9940i,unique2=9347i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=940i,twothousand=1940i,fivethous=4940i,tenthous=9940i,odd=80i,even=81i,stringu1="ISAAAA",stringu2="NVNAAA",string4="VVVVxx" 807667200000000000 +tenk unique1=4185i,unique2=9348i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=185i,twothousand=185i,fivethous=4185i,tenthous=4185i,odd=170i,even=171i,stringu1="ZEAAAA",stringu2="OVNAAA",string4="AAAAxx" 807753600000000000 +tenk unique1=9546i,unique2=9349i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=546i,twothousand=1546i,fivethous=4546i,tenthous=9546i,odd=92i,even=93i,stringu1="EDAAAA",stringu2="PVNAAA",string4="HHHHxx" 807840000000000000 +tenk unique1=5218i,unique2=9350i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=218i,twothousand=1218i,fivethous=218i,tenthous=5218i,odd=36i,even=37i,stringu1="SSAAAA",stringu2="QVNAAA",string4="OOOOxx" 807926400000000000 +tenk unique1=4374i,unique2=9351i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=374i,twothousand=374i,fivethous=4374i,tenthous=4374i,odd=148i,even=149i,stringu1="GMAAAA",stringu2="RVNAAA",string4="VVVVxx" 808012800000000000 +tenk unique1=288i,unique2=9352i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=288i,twothousand=288i,fivethous=288i,tenthous=288i,odd=176i,even=177i,stringu1="CLAAAA",stringu2="SVNAAA",string4="AAAAxx" 808099200000000000 +tenk unique1=7445i,unique2=9353i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=445i,twothousand=1445i,fivethous=2445i,tenthous=7445i,odd=90i,even=91i,stringu1="JAAAAA",stringu2="TVNAAA",string4="HHHHxx" 808185600000000000 +tenk unique1=1710i,unique2=9354i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=710i,twothousand=1710i,fivethous=1710i,tenthous=1710i,odd=20i,even=21i,stringu1="UNAAAA",stringu2="UVNAAA",string4="OOOOxx" 808272000000000000 +tenk unique1=6409i,unique2=9355i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=409i,twothousand=409i,fivethous=1409i,tenthous=6409i,odd=18i,even=19i,stringu1="NMAAAA",stringu2="VVNAAA",string4="VVVVxx" 808358400000000000 +tenk unique1=7982i,unique2=9356i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=982i,twothousand=1982i,fivethous=2982i,tenthous=7982i,odd=164i,even=165i,stringu1="AVAAAA",stringu2="WVNAAA",string4="AAAAxx" 808444800000000000 +tenk unique1=4950i,unique2=9357i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=950i,twothousand=950i,fivethous=4950i,tenthous=4950i,odd=100i,even=101i,stringu1="KIAAAA",stringu2="XVNAAA",string4="HHHHxx" 808531200000000000 +tenk unique1=9242i,unique2=9358i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=242i,twothousand=1242i,fivethous=4242i,tenthous=9242i,odd=84i,even=85i,stringu1="MRAAAA",stringu2="YVNAAA",string4="OOOOxx" 808617600000000000 +tenk unique1=3272i,unique2=9359i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=272i,twothousand=1272i,fivethous=3272i,tenthous=3272i,odd=144i,even=145i,stringu1="WVAAAA",stringu2="ZVNAAA",string4="VVVVxx" 808704000000000000 +tenk unique1=739i,unique2=9360i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=739i,twothousand=739i,fivethous=739i,tenthous=739i,odd=78i,even=79i,stringu1="LCAAAA",stringu2="AWNAAA",string4="AAAAxx" 808790400000000000 +tenk unique1=5526i,unique2=9361i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=526i,twothousand=1526i,fivethous=526i,tenthous=5526i,odd=52i,even=53i,stringu1="OEAAAA",stringu2="BWNAAA",string4="HHHHxx" 808876800000000000 +tenk unique1=8189i,unique2=9362i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=189i,twothousand=189i,fivethous=3189i,tenthous=8189i,odd=178i,even=179i,stringu1="ZCAAAA",stringu2="CWNAAA",string4="OOOOxx" 808963200000000000 +tenk unique1=9106i,unique2=9363i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=106i,twothousand=1106i,fivethous=4106i,tenthous=9106i,odd=12i,even=13i,stringu1="GMAAAA",stringu2="DWNAAA",string4="VVVVxx" 809049600000000000 +tenk unique1=9775i,unique2=9364i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=775i,twothousand=1775i,fivethous=4775i,tenthous=9775i,odd=150i,even=151i,stringu1="ZLAAAA",stringu2="EWNAAA",string4="AAAAxx" 809136000000000000 +tenk unique1=4643i,unique2=9365i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=643i,twothousand=643i,fivethous=4643i,tenthous=4643i,odd=86i,even=87i,stringu1="PWAAAA",stringu2="FWNAAA",string4="HHHHxx" 809222400000000000 +tenk unique1=8396i,unique2=9366i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=396i,twothousand=396i,fivethous=3396i,tenthous=8396i,odd=192i,even=193i,stringu1="YKAAAA",stringu2="GWNAAA",string4="OOOOxx" 809308800000000000 +tenk unique1=3255i,unique2=9367i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=255i,twothousand=1255i,fivethous=3255i,tenthous=3255i,odd=110i,even=111i,stringu1="FVAAAA",stringu2="HWNAAA",string4="VVVVxx" 809395200000000000 +tenk unique1=301i,unique2=9368i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=301i,twothousand=301i,fivethous=301i,tenthous=301i,odd=2i,even=3i,stringu1="PLAAAA",stringu2="IWNAAA",string4="AAAAxx" 809481600000000000 +tenk unique1=6014i,unique2=9369i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=14i,twothousand=14i,fivethous=1014i,tenthous=6014i,odd=28i,even=29i,stringu1="IXAAAA",stringu2="JWNAAA",string4="HHHHxx" 809568000000000000 +tenk unique1=6046i,unique2=9370i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=46i,twothousand=46i,fivethous=1046i,tenthous=6046i,odd=92i,even=93i,stringu1="OYAAAA",stringu2="KWNAAA",string4="OOOOxx" 809654400000000000 +tenk unique1=984i,unique2=9371i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=984i,twothousand=984i,fivethous=984i,tenthous=984i,odd=168i,even=169i,stringu1="WLAAAA",stringu2="LWNAAA",string4="VVVVxx" 809740800000000000 +tenk unique1=2420i,unique2=9372i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=420i,twothousand=420i,fivethous=2420i,tenthous=2420i,odd=40i,even=41i,stringu1="CPAAAA",stringu2="MWNAAA",string4="AAAAxx" 809827200000000000 +tenk unique1=2922i,unique2=9373i,two=0i,four=2i,ten=2i,twenty=2i,hundred=22i,thousand=922i,twothousand=922i,fivethous=2922i,tenthous=2922i,odd=44i,even=45i,stringu1="KIAAAA",stringu2="NWNAAA",string4="HHHHxx" 809913600000000000 +tenk unique1=2317i,unique2=9374i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=317i,twothousand=317i,fivethous=2317i,tenthous=2317i,odd=34i,even=35i,stringu1="DLAAAA",stringu2="OWNAAA",string4="OOOOxx" 810000000000000000 +tenk unique1=7332i,unique2=9375i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=332i,twothousand=1332i,fivethous=2332i,tenthous=7332i,odd=64i,even=65i,stringu1="AWAAAA",stringu2="PWNAAA",string4="VVVVxx" 810086400000000000 +tenk unique1=6451i,unique2=9376i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=451i,twothousand=451i,fivethous=1451i,tenthous=6451i,odd=102i,even=103i,stringu1="DOAAAA",stringu2="QWNAAA",string4="AAAAxx" 810172800000000000 +tenk unique1=2589i,unique2=9377i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=589i,twothousand=589i,fivethous=2589i,tenthous=2589i,odd=178i,even=179i,stringu1="PVAAAA",stringu2="RWNAAA",string4="HHHHxx" 810259200000000000 +tenk unique1=4333i,unique2=9378i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=333i,twothousand=333i,fivethous=4333i,tenthous=4333i,odd=66i,even=67i,stringu1="RKAAAA",stringu2="SWNAAA",string4="OOOOxx" 810345600000000000 +tenk unique1=8650i,unique2=9379i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=650i,twothousand=650i,fivethous=3650i,tenthous=8650i,odd=100i,even=101i,stringu1="SUAAAA",stringu2="TWNAAA",string4="VVVVxx" 810432000000000000 +tenk unique1=6856i,unique2=9380i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=856i,twothousand=856i,fivethous=1856i,tenthous=6856i,odd=112i,even=113i,stringu1="SDAAAA",stringu2="UWNAAA",string4="AAAAxx" 810518400000000000 +tenk unique1=4194i,unique2=9381i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=194i,twothousand=194i,fivethous=4194i,tenthous=4194i,odd=188i,even=189i,stringu1="IFAAAA",stringu2="VWNAAA",string4="HHHHxx" 810604800000000000 +tenk unique1=6246i,unique2=9382i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=246i,twothousand=246i,fivethous=1246i,tenthous=6246i,odd=92i,even=93i,stringu1="GGAAAA",stringu2="WWNAAA",string4="OOOOxx" 810691200000000000 +tenk unique1=4371i,unique2=9383i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=371i,twothousand=371i,fivethous=4371i,tenthous=4371i,odd=142i,even=143i,stringu1="DMAAAA",stringu2="XWNAAA",string4="VVVVxx" 810777600000000000 +tenk unique1=1388i,unique2=9384i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=388i,twothousand=1388i,fivethous=1388i,tenthous=1388i,odd=176i,even=177i,stringu1="KBAAAA",stringu2="YWNAAA",string4="AAAAxx" 810864000000000000 +tenk unique1=1056i,unique2=9385i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=56i,twothousand=1056i,fivethous=1056i,tenthous=1056i,odd=112i,even=113i,stringu1="QOAAAA",stringu2="ZWNAAA",string4="HHHHxx" 810950400000000000 +tenk unique1=6041i,unique2=9386i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=41i,twothousand=41i,fivethous=1041i,tenthous=6041i,odd=82i,even=83i,stringu1="JYAAAA",stringu2="AXNAAA",string4="OOOOxx" 811036800000000000 +tenk unique1=6153i,unique2=9387i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=153i,twothousand=153i,fivethous=1153i,tenthous=6153i,odd=106i,even=107i,stringu1="RCAAAA",stringu2="BXNAAA",string4="VVVVxx" 811123200000000000 +tenk unique1=8450i,unique2=9388i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=450i,twothousand=450i,fivethous=3450i,tenthous=8450i,odd=100i,even=101i,stringu1="ANAAAA",stringu2="CXNAAA",string4="AAAAxx" 811209600000000000 +tenk unique1=3469i,unique2=9389i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=469i,twothousand=1469i,fivethous=3469i,tenthous=3469i,odd=138i,even=139i,stringu1="LDAAAA",stringu2="DXNAAA",string4="HHHHxx" 811296000000000000 +tenk unique1=5226i,unique2=9390i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=226i,twothousand=1226i,fivethous=226i,tenthous=5226i,odd=52i,even=53i,stringu1="ATAAAA",stringu2="EXNAAA",string4="OOOOxx" 811382400000000000 +tenk unique1=8112i,unique2=9391i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=112i,twothousand=112i,fivethous=3112i,tenthous=8112i,odd=24i,even=25i,stringu1="AAAAAA",stringu2="FXNAAA",string4="VVVVxx" 811468800000000000 +tenk unique1=647i,unique2=9392i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=647i,twothousand=647i,fivethous=647i,tenthous=647i,odd=94i,even=95i,stringu1="XYAAAA",stringu2="GXNAAA",string4="AAAAxx" 811555200000000000 +tenk unique1=2567i,unique2=9393i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=567i,twothousand=567i,fivethous=2567i,tenthous=2567i,odd=134i,even=135i,stringu1="TUAAAA",stringu2="HXNAAA",string4="HHHHxx" 811641600000000000 +tenk unique1=9064i,unique2=9394i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=64i,twothousand=1064i,fivethous=4064i,tenthous=9064i,odd=128i,even=129i,stringu1="QKAAAA",stringu2="IXNAAA",string4="OOOOxx" 811728000000000000 +tenk unique1=5161i,unique2=9395i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=161i,twothousand=1161i,fivethous=161i,tenthous=5161i,odd=122i,even=123i,stringu1="NQAAAA",stringu2="JXNAAA",string4="VVVVxx" 811814400000000000 +tenk unique1=5260i,unique2=9396i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=260i,twothousand=1260i,fivethous=260i,tenthous=5260i,odd=120i,even=121i,stringu1="IUAAAA",stringu2="KXNAAA",string4="AAAAxx" 811900800000000000 +tenk unique1=8988i,unique2=9397i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=988i,twothousand=988i,fivethous=3988i,tenthous=8988i,odd=176i,even=177i,stringu1="SHAAAA",stringu2="LXNAAA",string4="HHHHxx" 811987200000000000 +tenk unique1=9678i,unique2=9398i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=678i,twothousand=1678i,fivethous=4678i,tenthous=9678i,odd=156i,even=157i,stringu1="GIAAAA",stringu2="MXNAAA",string4="OOOOxx" 812073600000000000 +tenk unique1=6853i,unique2=9399i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=853i,twothousand=853i,fivethous=1853i,tenthous=6853i,odd=106i,even=107i,stringu1="PDAAAA",stringu2="NXNAAA",string4="VVVVxx" 812160000000000000 +tenk unique1=5294i,unique2=9400i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=294i,twothousand=1294i,fivethous=294i,tenthous=5294i,odd=188i,even=189i,stringu1="QVAAAA",stringu2="OXNAAA",string4="AAAAxx" 812246400000000000 +tenk unique1=9864i,unique2=9401i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=864i,twothousand=1864i,fivethous=4864i,tenthous=9864i,odd=128i,even=129i,stringu1="KPAAAA",stringu2="PXNAAA",string4="HHHHxx" 812332800000000000 +tenk unique1=8702i,unique2=9402i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=702i,twothousand=702i,fivethous=3702i,tenthous=8702i,odd=4i,even=5i,stringu1="SWAAAA",stringu2="QXNAAA",string4="OOOOxx" 812419200000000000 +tenk unique1=1132i,unique2=9403i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=132i,twothousand=1132i,fivethous=1132i,tenthous=1132i,odd=64i,even=65i,stringu1="ORAAAA",stringu2="RXNAAA",string4="VVVVxx" 812505600000000000 +tenk unique1=1524i,unique2=9404i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=524i,twothousand=1524i,fivethous=1524i,tenthous=1524i,odd=48i,even=49i,stringu1="QGAAAA",stringu2="SXNAAA",string4="AAAAxx" 812592000000000000 +tenk unique1=4560i,unique2=9405i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=560i,twothousand=560i,fivethous=4560i,tenthous=4560i,odd=120i,even=121i,stringu1="KTAAAA",stringu2="TXNAAA",string4="HHHHxx" 812678400000000000 +tenk unique1=2137i,unique2=9406i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=137i,twothousand=137i,fivethous=2137i,tenthous=2137i,odd=74i,even=75i,stringu1="FEAAAA",stringu2="UXNAAA",string4="OOOOxx" 812764800000000000 +tenk unique1=3283i,unique2=9407i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=283i,twothousand=1283i,fivethous=3283i,tenthous=3283i,odd=166i,even=167i,stringu1="HWAAAA",stringu2="VXNAAA",string4="VVVVxx" 812851200000000000 +tenk unique1=3377i,unique2=9408i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=377i,twothousand=1377i,fivethous=3377i,tenthous=3377i,odd=154i,even=155i,stringu1="XZAAAA",stringu2="WXNAAA",string4="AAAAxx" 812937600000000000 +tenk unique1=2267i,unique2=9409i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=267i,twothousand=267i,fivethous=2267i,tenthous=2267i,odd=134i,even=135i,stringu1="FJAAAA",stringu2="XXNAAA",string4="HHHHxx" 813024000000000000 +tenk unique1=8987i,unique2=9410i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=987i,twothousand=987i,fivethous=3987i,tenthous=8987i,odd=174i,even=175i,stringu1="RHAAAA",stringu2="YXNAAA",string4="OOOOxx" 813110400000000000 +tenk unique1=6709i,unique2=9411i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=709i,twothousand=709i,fivethous=1709i,tenthous=6709i,odd=18i,even=19i,stringu1="BYAAAA",stringu2="ZXNAAA",string4="VVVVxx" 813196800000000000 +tenk unique1=8059i,unique2=9412i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=59i,twothousand=59i,fivethous=3059i,tenthous=8059i,odd=118i,even=119i,stringu1="ZXAAAA",stringu2="AYNAAA",string4="AAAAxx" 813283200000000000 +tenk unique1=3402i,unique2=9413i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=402i,twothousand=1402i,fivethous=3402i,tenthous=3402i,odd=4i,even=5i,stringu1="WAAAAA",stringu2="BYNAAA",string4="HHHHxx" 813369600000000000 +tenk unique1=6443i,unique2=9414i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=443i,twothousand=443i,fivethous=1443i,tenthous=6443i,odd=86i,even=87i,stringu1="VNAAAA",stringu2="CYNAAA",string4="OOOOxx" 813456000000000000 +tenk unique1=8858i,unique2=9415i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=858i,twothousand=858i,fivethous=3858i,tenthous=8858i,odd=116i,even=117i,stringu1="SCAAAA",stringu2="DYNAAA",string4="VVVVxx" 813542400000000000 +tenk unique1=3974i,unique2=9416i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=974i,twothousand=1974i,fivethous=3974i,tenthous=3974i,odd=148i,even=149i,stringu1="WWAAAA",stringu2="EYNAAA",string4="AAAAxx" 813628800000000000 +tenk unique1=3521i,unique2=9417i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=521i,twothousand=1521i,fivethous=3521i,tenthous=3521i,odd=42i,even=43i,stringu1="LFAAAA",stringu2="FYNAAA",string4="HHHHxx" 813715200000000000 +tenk unique1=9509i,unique2=9418i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=509i,twothousand=1509i,fivethous=4509i,tenthous=9509i,odd=18i,even=19i,stringu1="TBAAAA",stringu2="GYNAAA",string4="OOOOxx" 813801600000000000 +tenk unique1=5442i,unique2=9419i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=442i,twothousand=1442i,fivethous=442i,tenthous=5442i,odd=84i,even=85i,stringu1="IBAAAA",stringu2="HYNAAA",string4="VVVVxx" 813888000000000000 +tenk unique1=8968i,unique2=9420i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=968i,twothousand=968i,fivethous=3968i,tenthous=8968i,odd=136i,even=137i,stringu1="YGAAAA",stringu2="IYNAAA",string4="AAAAxx" 813974400000000000 +tenk unique1=333i,unique2=9421i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=333i,twothousand=333i,fivethous=333i,tenthous=333i,odd=66i,even=67i,stringu1="VMAAAA",stringu2="JYNAAA",string4="HHHHxx" 814060800000000000 +tenk unique1=952i,unique2=9422i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=952i,twothousand=952i,fivethous=952i,tenthous=952i,odd=104i,even=105i,stringu1="QKAAAA",stringu2="KYNAAA",string4="OOOOxx" 814147200000000000 +tenk unique1=7482i,unique2=9423i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=482i,twothousand=1482i,fivethous=2482i,tenthous=7482i,odd=164i,even=165i,stringu1="UBAAAA",stringu2="LYNAAA",string4="VVVVxx" 814233600000000000 +tenk unique1=1486i,unique2=9424i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=486i,twothousand=1486i,fivethous=1486i,tenthous=1486i,odd=172i,even=173i,stringu1="EFAAAA",stringu2="MYNAAA",string4="AAAAxx" 814320000000000000 +tenk unique1=1815i,unique2=9425i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=815i,twothousand=1815i,fivethous=1815i,tenthous=1815i,odd=30i,even=31i,stringu1="VRAAAA",stringu2="NYNAAA",string4="HHHHxx" 814406400000000000 +tenk unique1=7937i,unique2=9426i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=937i,twothousand=1937i,fivethous=2937i,tenthous=7937i,odd=74i,even=75i,stringu1="HTAAAA",stringu2="OYNAAA",string4="OOOOxx" 814492800000000000 +tenk unique1=1436i,unique2=9427i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=436i,twothousand=1436i,fivethous=1436i,tenthous=1436i,odd=72i,even=73i,stringu1="GDAAAA",stringu2="PYNAAA",string4="VVVVxx" 814579200000000000 +tenk unique1=3470i,unique2=9428i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=470i,twothousand=1470i,fivethous=3470i,tenthous=3470i,odd=140i,even=141i,stringu1="MDAAAA",stringu2="QYNAAA",string4="AAAAxx" 814665600000000000 +tenk unique1=8195i,unique2=9429i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=195i,twothousand=195i,fivethous=3195i,tenthous=8195i,odd=190i,even=191i,stringu1="FDAAAA",stringu2="RYNAAA",string4="HHHHxx" 814752000000000000 +tenk unique1=6906i,unique2=9430i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=906i,twothousand=906i,fivethous=1906i,tenthous=6906i,odd=12i,even=13i,stringu1="QFAAAA",stringu2="SYNAAA",string4="OOOOxx" 814838400000000000 +tenk unique1=2539i,unique2=9431i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=539i,twothousand=539i,fivethous=2539i,tenthous=2539i,odd=78i,even=79i,stringu1="RTAAAA",stringu2="TYNAAA",string4="VVVVxx" 814924800000000000 +tenk unique1=5988i,unique2=9432i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=988i,twothousand=1988i,fivethous=988i,tenthous=5988i,odd=176i,even=177i,stringu1="IWAAAA",stringu2="UYNAAA",string4="AAAAxx" 815011200000000000 +tenk unique1=8908i,unique2=9433i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=908i,twothousand=908i,fivethous=3908i,tenthous=8908i,odd=16i,even=17i,stringu1="QEAAAA",stringu2="VYNAAA",string4="HHHHxx" 815097600000000000 +tenk unique1=2319i,unique2=9434i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=319i,twothousand=319i,fivethous=2319i,tenthous=2319i,odd=38i,even=39i,stringu1="FLAAAA",stringu2="WYNAAA",string4="OOOOxx" 815184000000000000 +tenk unique1=3263i,unique2=9435i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=263i,twothousand=1263i,fivethous=3263i,tenthous=3263i,odd=126i,even=127i,stringu1="NVAAAA",stringu2="XYNAAA",string4="VVVVxx" 815270400000000000 +tenk unique1=4039i,unique2=9436i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=39i,twothousand=39i,fivethous=4039i,tenthous=4039i,odd=78i,even=79i,stringu1="JZAAAA",stringu2="YYNAAA",string4="AAAAxx" 815356800000000000 +tenk unique1=6373i,unique2=9437i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=373i,twothousand=373i,fivethous=1373i,tenthous=6373i,odd=146i,even=147i,stringu1="DLAAAA",stringu2="ZYNAAA",string4="HHHHxx" 815443200000000000 +tenk unique1=1168i,unique2=9438i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=168i,twothousand=1168i,fivethous=1168i,tenthous=1168i,odd=136i,even=137i,stringu1="YSAAAA",stringu2="AZNAAA",string4="OOOOxx" 815529600000000000 +tenk unique1=8338i,unique2=9439i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=338i,twothousand=338i,fivethous=3338i,tenthous=8338i,odd=76i,even=77i,stringu1="SIAAAA",stringu2="BZNAAA",string4="VVVVxx" 815616000000000000 +tenk unique1=1172i,unique2=9440i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=172i,twothousand=1172i,fivethous=1172i,tenthous=1172i,odd=144i,even=145i,stringu1="CTAAAA",stringu2="CZNAAA",string4="AAAAxx" 815702400000000000 +tenk unique1=200i,unique2=9441i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=200i,twothousand=200i,fivethous=200i,tenthous=200i,odd=0i,even=1i,stringu1="SHAAAA",stringu2="DZNAAA",string4="HHHHxx" 815788800000000000 +tenk unique1=6355i,unique2=9442i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=355i,twothousand=355i,fivethous=1355i,tenthous=6355i,odd=110i,even=111i,stringu1="LKAAAA",stringu2="EZNAAA",string4="OOOOxx" 815875200000000000 +tenk unique1=7768i,unique2=9443i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=768i,twothousand=1768i,fivethous=2768i,tenthous=7768i,odd=136i,even=137i,stringu1="UMAAAA",stringu2="FZNAAA",string4="VVVVxx" 815961600000000000 +tenk unique1=25i,unique2=9444i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=25i,twothousand=25i,fivethous=25i,tenthous=25i,odd=50i,even=51i,stringu1="ZAAAAA",stringu2="GZNAAA",string4="AAAAxx" 816048000000000000 +tenk unique1=7144i,unique2=9445i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=144i,twothousand=1144i,fivethous=2144i,tenthous=7144i,odd=88i,even=89i,stringu1="UOAAAA",stringu2="HZNAAA",string4="HHHHxx" 816134400000000000 +tenk unique1=8671i,unique2=9446i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=671i,twothousand=671i,fivethous=3671i,tenthous=8671i,odd=142i,even=143i,stringu1="NVAAAA",stringu2="IZNAAA",string4="OOOOxx" 816220800000000000 +tenk unique1=9163i,unique2=9447i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=163i,twothousand=1163i,fivethous=4163i,tenthous=9163i,odd=126i,even=127i,stringu1="LOAAAA",stringu2="JZNAAA",string4="VVVVxx" 816307200000000000 +tenk unique1=8889i,unique2=9448i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=889i,twothousand=889i,fivethous=3889i,tenthous=8889i,odd=178i,even=179i,stringu1="XDAAAA",stringu2="KZNAAA",string4="AAAAxx" 816393600000000000 +tenk unique1=5950i,unique2=9449i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=950i,twothousand=1950i,fivethous=950i,tenthous=5950i,odd=100i,even=101i,stringu1="WUAAAA",stringu2="LZNAAA",string4="HHHHxx" 816480000000000000 +tenk unique1=6163i,unique2=9450i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=163i,twothousand=163i,fivethous=1163i,tenthous=6163i,odd=126i,even=127i,stringu1="BDAAAA",stringu2="MZNAAA",string4="OOOOxx" 816566400000000000 +tenk unique1=8119i,unique2=9451i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=119i,twothousand=119i,fivethous=3119i,tenthous=8119i,odd=38i,even=39i,stringu1="HAAAAA",stringu2="NZNAAA",string4="VVVVxx" 816652800000000000 +tenk unique1=1416i,unique2=9452i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=416i,twothousand=1416i,fivethous=1416i,tenthous=1416i,odd=32i,even=33i,stringu1="MCAAAA",stringu2="OZNAAA",string4="AAAAxx" 816739200000000000 +tenk unique1=4132i,unique2=9453i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=132i,twothousand=132i,fivethous=4132i,tenthous=4132i,odd=64i,even=65i,stringu1="YCAAAA",stringu2="PZNAAA",string4="HHHHxx" 816825600000000000 +tenk unique1=2294i,unique2=9454i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=294i,twothousand=294i,fivethous=2294i,tenthous=2294i,odd=188i,even=189i,stringu1="GKAAAA",stringu2="QZNAAA",string4="OOOOxx" 816912000000000000 +tenk unique1=9094i,unique2=9455i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=94i,twothousand=1094i,fivethous=4094i,tenthous=9094i,odd=188i,even=189i,stringu1="ULAAAA",stringu2="RZNAAA",string4="VVVVxx" 816998400000000000 +tenk unique1=4168i,unique2=9456i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=168i,twothousand=168i,fivethous=4168i,tenthous=4168i,odd=136i,even=137i,stringu1="IEAAAA",stringu2="SZNAAA",string4="AAAAxx" 817084800000000000 +tenk unique1=9108i,unique2=9457i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=108i,twothousand=1108i,fivethous=4108i,tenthous=9108i,odd=16i,even=17i,stringu1="IMAAAA",stringu2="TZNAAA",string4="HHHHxx" 817171200000000000 +tenk unique1=5706i,unique2=9458i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=706i,twothousand=1706i,fivethous=706i,tenthous=5706i,odd=12i,even=13i,stringu1="MLAAAA",stringu2="UZNAAA",string4="OOOOxx" 817257600000000000 +tenk unique1=2231i,unique2=9459i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=231i,twothousand=231i,fivethous=2231i,tenthous=2231i,odd=62i,even=63i,stringu1="VHAAAA",stringu2="VZNAAA",string4="VVVVxx" 817344000000000000 +tenk unique1=2173i,unique2=9460i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=173i,twothousand=173i,fivethous=2173i,tenthous=2173i,odd=146i,even=147i,stringu1="PFAAAA",stringu2="WZNAAA",string4="AAAAxx" 817430400000000000 +tenk unique1=90i,unique2=9461i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=90i,twothousand=90i,fivethous=90i,tenthous=90i,odd=180i,even=181i,stringu1="MDAAAA",stringu2="XZNAAA",string4="HHHHxx" 817516800000000000 +tenk unique1=9996i,unique2=9462i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=996i,twothousand=1996i,fivethous=4996i,tenthous=9996i,odd=192i,even=193i,stringu1="MUAAAA",stringu2="YZNAAA",string4="OOOOxx" 817603200000000000 +tenk unique1=330i,unique2=9463i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=330i,twothousand=330i,fivethous=330i,tenthous=330i,odd=60i,even=61i,stringu1="SMAAAA",stringu2="ZZNAAA",string4="VVVVxx" 817689600000000000 +tenk unique1=2052i,unique2=9464i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=52i,twothousand=52i,fivethous=2052i,tenthous=2052i,odd=104i,even=105i,stringu1="YAAAAA",stringu2="AAOAAA",string4="AAAAxx" 817776000000000000 +tenk unique1=1093i,unique2=9465i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=93i,twothousand=1093i,fivethous=1093i,tenthous=1093i,odd=186i,even=187i,stringu1="BQAAAA",stringu2="BAOAAA",string4="HHHHxx" 817862400000000000 +tenk unique1=5817i,unique2=9466i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=817i,twothousand=1817i,fivethous=817i,tenthous=5817i,odd=34i,even=35i,stringu1="TPAAAA",stringu2="CAOAAA",string4="OOOOxx" 817948800000000000 +tenk unique1=1559i,unique2=9467i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=559i,twothousand=1559i,fivethous=1559i,tenthous=1559i,odd=118i,even=119i,stringu1="ZHAAAA",stringu2="DAOAAA",string4="VVVVxx" 818035200000000000 +tenk unique1=8405i,unique2=9468i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=405i,twothousand=405i,fivethous=3405i,tenthous=8405i,odd=10i,even=11i,stringu1="HLAAAA",stringu2="EAOAAA",string4="AAAAxx" 818121600000000000 +tenk unique1=9962i,unique2=9469i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=962i,twothousand=1962i,fivethous=4962i,tenthous=9962i,odd=124i,even=125i,stringu1="ETAAAA",stringu2="FAOAAA",string4="HHHHxx" 818208000000000000 +tenk unique1=9461i,unique2=9470i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=461i,twothousand=1461i,fivethous=4461i,tenthous=9461i,odd=122i,even=123i,stringu1="XZAAAA",stringu2="GAOAAA",string4="OOOOxx" 818294400000000000 +tenk unique1=3028i,unique2=9471i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=28i,twothousand=1028i,fivethous=3028i,tenthous=3028i,odd=56i,even=57i,stringu1="MMAAAA",stringu2="HAOAAA",string4="VVVVxx" 818380800000000000 +tenk unique1=6814i,unique2=9472i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=814i,twothousand=814i,fivethous=1814i,tenthous=6814i,odd=28i,even=29i,stringu1="CCAAAA",stringu2="IAOAAA",string4="AAAAxx" 818467200000000000 +tenk unique1=9587i,unique2=9473i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=587i,twothousand=1587i,fivethous=4587i,tenthous=9587i,odd=174i,even=175i,stringu1="TEAAAA",stringu2="JAOAAA",string4="HHHHxx" 818553600000000000 +tenk unique1=6863i,unique2=9474i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=863i,twothousand=863i,fivethous=1863i,tenthous=6863i,odd=126i,even=127i,stringu1="ZDAAAA",stringu2="KAOAAA",string4="OOOOxx" 818640000000000000 +tenk unique1=4963i,unique2=9475i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=963i,twothousand=963i,fivethous=4963i,tenthous=4963i,odd=126i,even=127i,stringu1="XIAAAA",stringu2="LAOAAA",string4="VVVVxx" 818726400000000000 +tenk unique1=7811i,unique2=9476i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=811i,twothousand=1811i,fivethous=2811i,tenthous=7811i,odd=22i,even=23i,stringu1="LOAAAA",stringu2="MAOAAA",string4="AAAAxx" 818812800000000000 +tenk unique1=7608i,unique2=9477i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=608i,twothousand=1608i,fivethous=2608i,tenthous=7608i,odd=16i,even=17i,stringu1="QGAAAA",stringu2="NAOAAA",string4="HHHHxx" 818899200000000000 +tenk unique1=5321i,unique2=9478i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=321i,twothousand=1321i,fivethous=321i,tenthous=5321i,odd=42i,even=43i,stringu1="RWAAAA",stringu2="OAOAAA",string4="OOOOxx" 818985600000000000 +tenk unique1=9971i,unique2=9479i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=971i,twothousand=1971i,fivethous=4971i,tenthous=9971i,odd=142i,even=143i,stringu1="NTAAAA",stringu2="PAOAAA",string4="VVVVxx" 819072000000000000 +tenk unique1=6161i,unique2=9480i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=161i,twothousand=161i,fivethous=1161i,tenthous=6161i,odd=122i,even=123i,stringu1="ZCAAAA",stringu2="QAOAAA",string4="AAAAxx" 819158400000000000 +tenk unique1=2181i,unique2=9481i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=181i,twothousand=181i,fivethous=2181i,tenthous=2181i,odd=162i,even=163i,stringu1="XFAAAA",stringu2="RAOAAA",string4="HHHHxx" 819244800000000000 +tenk unique1=3828i,unique2=9482i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=828i,twothousand=1828i,fivethous=3828i,tenthous=3828i,odd=56i,even=57i,stringu1="GRAAAA",stringu2="SAOAAA",string4="OOOOxx" 819331200000000000 +tenk unique1=348i,unique2=9483i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=348i,twothousand=348i,fivethous=348i,tenthous=348i,odd=96i,even=97i,stringu1="KNAAAA",stringu2="TAOAAA",string4="VVVVxx" 819417600000000000 +tenk unique1=5459i,unique2=9484i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=459i,twothousand=1459i,fivethous=459i,tenthous=5459i,odd=118i,even=119i,stringu1="ZBAAAA",stringu2="UAOAAA",string4="AAAAxx" 819504000000000000 +tenk unique1=9406i,unique2=9485i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=406i,twothousand=1406i,fivethous=4406i,tenthous=9406i,odd=12i,even=13i,stringu1="UXAAAA",stringu2="VAOAAA",string4="HHHHxx" 819590400000000000 +tenk unique1=9852i,unique2=9486i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=852i,twothousand=1852i,fivethous=4852i,tenthous=9852i,odd=104i,even=105i,stringu1="YOAAAA",stringu2="WAOAAA",string4="OOOOxx" 819676800000000000 +tenk unique1=3095i,unique2=9487i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=95i,twothousand=1095i,fivethous=3095i,tenthous=3095i,odd=190i,even=191i,stringu1="BPAAAA",stringu2="XAOAAA",string4="VVVVxx" 819763200000000000 +tenk unique1=5597i,unique2=9488i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=597i,twothousand=1597i,fivethous=597i,tenthous=5597i,odd=194i,even=195i,stringu1="HHAAAA",stringu2="YAOAAA",string4="AAAAxx" 819849600000000000 +tenk unique1=8841i,unique2=9489i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=841i,twothousand=841i,fivethous=3841i,tenthous=8841i,odd=82i,even=83i,stringu1="BCAAAA",stringu2="ZAOAAA",string4="HHHHxx" 819936000000000000 +tenk unique1=3536i,unique2=9490i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=536i,twothousand=1536i,fivethous=3536i,tenthous=3536i,odd=72i,even=73i,stringu1="AGAAAA",stringu2="ABOAAA",string4="OOOOxx" 820022400000000000 +tenk unique1=4009i,unique2=9491i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=9i,twothousand=9i,fivethous=4009i,tenthous=4009i,odd=18i,even=19i,stringu1="FYAAAA",stringu2="BBOAAA",string4="VVVVxx" 820108800000000000 +tenk unique1=7366i,unique2=9492i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=366i,twothousand=1366i,fivethous=2366i,tenthous=7366i,odd=132i,even=133i,stringu1="IXAAAA",stringu2="CBOAAA",string4="AAAAxx" 820195200000000000 +tenk unique1=7327i,unique2=9493i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=327i,twothousand=1327i,fivethous=2327i,tenthous=7327i,odd=54i,even=55i,stringu1="VVAAAA",stringu2="DBOAAA",string4="HHHHxx" 820281600000000000 +tenk unique1=1613i,unique2=9494i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=613i,twothousand=1613i,fivethous=1613i,tenthous=1613i,odd=26i,even=27i,stringu1="BKAAAA",stringu2="EBOAAA",string4="OOOOxx" 820368000000000000 +tenk unique1=8619i,unique2=9495i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=619i,twothousand=619i,fivethous=3619i,tenthous=8619i,odd=38i,even=39i,stringu1="NTAAAA",stringu2="FBOAAA",string4="VVVVxx" 820454400000000000 +tenk unique1=4880i,unique2=9496i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=880i,twothousand=880i,fivethous=4880i,tenthous=4880i,odd=160i,even=161i,stringu1="SFAAAA",stringu2="GBOAAA",string4="AAAAxx" 820540800000000000 +tenk unique1=1552i,unique2=9497i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=552i,twothousand=1552i,fivethous=1552i,tenthous=1552i,odd=104i,even=105i,stringu1="SHAAAA",stringu2="HBOAAA",string4="HHHHxx" 820627200000000000 +tenk unique1=7636i,unique2=9498i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=636i,twothousand=1636i,fivethous=2636i,tenthous=7636i,odd=72i,even=73i,stringu1="SHAAAA",stringu2="IBOAAA",string4="OOOOxx" 820713600000000000 +tenk unique1=8397i,unique2=9499i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=397i,twothousand=397i,fivethous=3397i,tenthous=8397i,odd=194i,even=195i,stringu1="ZKAAAA",stringu2="JBOAAA",string4="VVVVxx" 820800000000000000 +tenk unique1=6224i,unique2=9500i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=224i,twothousand=224i,fivethous=1224i,tenthous=6224i,odd=48i,even=49i,stringu1="KFAAAA",stringu2="KBOAAA",string4="AAAAxx" 820886400000000000 +tenk unique1=9102i,unique2=9501i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=102i,twothousand=1102i,fivethous=4102i,tenthous=9102i,odd=4i,even=5i,stringu1="CMAAAA",stringu2="LBOAAA",string4="HHHHxx" 820972800000000000 +tenk unique1=7906i,unique2=9502i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=906i,twothousand=1906i,fivethous=2906i,tenthous=7906i,odd=12i,even=13i,stringu1="CSAAAA",stringu2="MBOAAA",string4="OOOOxx" 821059200000000000 +tenk unique1=9467i,unique2=9503i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=467i,twothousand=1467i,fivethous=4467i,tenthous=9467i,odd=134i,even=135i,stringu1="DAAAAA",stringu2="NBOAAA",string4="VVVVxx" 821145600000000000 +tenk unique1=828i,unique2=9504i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=828i,twothousand=828i,fivethous=828i,tenthous=828i,odd=56i,even=57i,stringu1="WFAAAA",stringu2="OBOAAA",string4="AAAAxx" 821232000000000000 +tenk unique1=9585i,unique2=9505i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=585i,twothousand=1585i,fivethous=4585i,tenthous=9585i,odd=170i,even=171i,stringu1="REAAAA",stringu2="PBOAAA",string4="HHHHxx" 821318400000000000 +tenk unique1=925i,unique2=9506i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=925i,twothousand=925i,fivethous=925i,tenthous=925i,odd=50i,even=51i,stringu1="PJAAAA",stringu2="QBOAAA",string4="OOOOxx" 821404800000000000 +tenk unique1=7375i,unique2=9507i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=375i,twothousand=1375i,fivethous=2375i,tenthous=7375i,odd=150i,even=151i,stringu1="RXAAAA",stringu2="RBOAAA",string4="VVVVxx" 821491200000000000 +tenk unique1=4027i,unique2=9508i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=27i,twothousand=27i,fivethous=4027i,tenthous=4027i,odd=54i,even=55i,stringu1="XYAAAA",stringu2="SBOAAA",string4="AAAAxx" 821577600000000000 +tenk unique1=766i,unique2=9509i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=766i,twothousand=766i,fivethous=766i,tenthous=766i,odd=132i,even=133i,stringu1="MDAAAA",stringu2="TBOAAA",string4="HHHHxx" 821664000000000000 +tenk unique1=5633i,unique2=9510i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=633i,twothousand=1633i,fivethous=633i,tenthous=5633i,odd=66i,even=67i,stringu1="RIAAAA",stringu2="UBOAAA",string4="OOOOxx" 821750400000000000 +tenk unique1=5648i,unique2=9511i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=648i,twothousand=1648i,fivethous=648i,tenthous=5648i,odd=96i,even=97i,stringu1="GJAAAA",stringu2="VBOAAA",string4="VVVVxx" 821836800000000000 +tenk unique1=148i,unique2=9512i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=148i,twothousand=148i,fivethous=148i,tenthous=148i,odd=96i,even=97i,stringu1="SFAAAA",stringu2="WBOAAA",string4="AAAAxx" 821923200000000000 +tenk unique1=2072i,unique2=9513i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=72i,twothousand=72i,fivethous=2072i,tenthous=2072i,odd=144i,even=145i,stringu1="SBAAAA",stringu2="XBOAAA",string4="HHHHxx" 822009600000000000 +tenk unique1=431i,unique2=9514i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=431i,twothousand=431i,fivethous=431i,tenthous=431i,odd=62i,even=63i,stringu1="PQAAAA",stringu2="YBOAAA",string4="OOOOxx" 822096000000000000 +tenk unique1=1711i,unique2=9515i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=711i,twothousand=1711i,fivethous=1711i,tenthous=1711i,odd=22i,even=23i,stringu1="VNAAAA",stringu2="ZBOAAA",string4="VVVVxx" 822182400000000000 +tenk unique1=9378i,unique2=9516i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=378i,twothousand=1378i,fivethous=4378i,tenthous=9378i,odd=156i,even=157i,stringu1="SWAAAA",stringu2="ACOAAA",string4="AAAAxx" 822268800000000000 +tenk unique1=6776i,unique2=9517i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=776i,twothousand=776i,fivethous=1776i,tenthous=6776i,odd=152i,even=153i,stringu1="QAAAAA",stringu2="BCOAAA",string4="HHHHxx" 822355200000000000 +tenk unique1=6842i,unique2=9518i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=842i,twothousand=842i,fivethous=1842i,tenthous=6842i,odd=84i,even=85i,stringu1="EDAAAA",stringu2="CCOAAA",string4="OOOOxx" 822441600000000000 +tenk unique1=2656i,unique2=9519i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=656i,twothousand=656i,fivethous=2656i,tenthous=2656i,odd=112i,even=113i,stringu1="EYAAAA",stringu2="DCOAAA",string4="VVVVxx" 822528000000000000 +tenk unique1=3116i,unique2=9520i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=116i,twothousand=1116i,fivethous=3116i,tenthous=3116i,odd=32i,even=33i,stringu1="WPAAAA",stringu2="ECOAAA",string4="AAAAxx" 822614400000000000 +tenk unique1=7904i,unique2=9521i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=904i,twothousand=1904i,fivethous=2904i,tenthous=7904i,odd=8i,even=9i,stringu1="ASAAAA",stringu2="FCOAAA",string4="HHHHxx" 822700800000000000 +tenk unique1=3529i,unique2=9522i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=529i,twothousand=1529i,fivethous=3529i,tenthous=3529i,odd=58i,even=59i,stringu1="TFAAAA",stringu2="GCOAAA",string4="OOOOxx" 822787200000000000 +tenk unique1=3240i,unique2=9523i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=240i,twothousand=1240i,fivethous=3240i,tenthous=3240i,odd=80i,even=81i,stringu1="QUAAAA",stringu2="HCOAAA",string4="VVVVxx" 822873600000000000 +tenk unique1=5801i,unique2=9524i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=801i,twothousand=1801i,fivethous=801i,tenthous=5801i,odd=2i,even=3i,stringu1="DPAAAA",stringu2="ICOAAA",string4="AAAAxx" 822960000000000000 +tenk unique1=4090i,unique2=9525i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=90i,twothousand=90i,fivethous=4090i,tenthous=4090i,odd=180i,even=181i,stringu1="IBAAAA",stringu2="JCOAAA",string4="HHHHxx" 823046400000000000 +tenk unique1=7687i,unique2=9526i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=687i,twothousand=1687i,fivethous=2687i,tenthous=7687i,odd=174i,even=175i,stringu1="RJAAAA",stringu2="KCOAAA",string4="OOOOxx" 823132800000000000 +tenk unique1=9711i,unique2=9527i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=711i,twothousand=1711i,fivethous=4711i,tenthous=9711i,odd=22i,even=23i,stringu1="NJAAAA",stringu2="LCOAAA",string4="VVVVxx" 823219200000000000 +tenk unique1=4760i,unique2=9528i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=760i,twothousand=760i,fivethous=4760i,tenthous=4760i,odd=120i,even=121i,stringu1="CBAAAA",stringu2="MCOAAA",string4="AAAAxx" 823305600000000000 +tenk unique1=5524i,unique2=9529i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=524i,twothousand=1524i,fivethous=524i,tenthous=5524i,odd=48i,even=49i,stringu1="MEAAAA",stringu2="NCOAAA",string4="HHHHxx" 823392000000000000 +tenk unique1=2251i,unique2=9530i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=251i,twothousand=251i,fivethous=2251i,tenthous=2251i,odd=102i,even=103i,stringu1="PIAAAA",stringu2="OCOAAA",string4="OOOOxx" 823478400000000000 +tenk unique1=1511i,unique2=9531i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=511i,twothousand=1511i,fivethous=1511i,tenthous=1511i,odd=22i,even=23i,stringu1="DGAAAA",stringu2="PCOAAA",string4="VVVVxx" 823564800000000000 +tenk unique1=5991i,unique2=9532i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=991i,twothousand=1991i,fivethous=991i,tenthous=5991i,odd=182i,even=183i,stringu1="LWAAAA",stringu2="QCOAAA",string4="AAAAxx" 823651200000000000 +tenk unique1=7808i,unique2=9533i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=808i,twothousand=1808i,fivethous=2808i,tenthous=7808i,odd=16i,even=17i,stringu1="IOAAAA",stringu2="RCOAAA",string4="HHHHxx" 823737600000000000 +tenk unique1=8708i,unique2=9534i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=708i,twothousand=708i,fivethous=3708i,tenthous=8708i,odd=16i,even=17i,stringu1="YWAAAA",stringu2="SCOAAA",string4="OOOOxx" 823824000000000000 +tenk unique1=8939i,unique2=9535i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=939i,twothousand=939i,fivethous=3939i,tenthous=8939i,odd=78i,even=79i,stringu1="VFAAAA",stringu2="TCOAAA",string4="VVVVxx" 823910400000000000 +tenk unique1=4295i,unique2=9536i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=295i,twothousand=295i,fivethous=4295i,tenthous=4295i,odd=190i,even=191i,stringu1="FJAAAA",stringu2="UCOAAA",string4="AAAAxx" 823996800000000000 +tenk unique1=5905i,unique2=9537i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=905i,twothousand=1905i,fivethous=905i,tenthous=5905i,odd=10i,even=11i,stringu1="DTAAAA",stringu2="VCOAAA",string4="HHHHxx" 824083200000000000 +tenk unique1=2649i,unique2=9538i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=649i,twothousand=649i,fivethous=2649i,tenthous=2649i,odd=98i,even=99i,stringu1="XXAAAA",stringu2="WCOAAA",string4="OOOOxx" 824169600000000000 +tenk unique1=2347i,unique2=9539i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=347i,twothousand=347i,fivethous=2347i,tenthous=2347i,odd=94i,even=95i,stringu1="HMAAAA",stringu2="XCOAAA",string4="VVVVxx" 824256000000000000 +tenk unique1=6339i,unique2=9540i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=339i,twothousand=339i,fivethous=1339i,tenthous=6339i,odd=78i,even=79i,stringu1="VJAAAA",stringu2="YCOAAA",string4="AAAAxx" 824342400000000000 +tenk unique1=292i,unique2=9541i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=292i,twothousand=292i,fivethous=292i,tenthous=292i,odd=184i,even=185i,stringu1="GLAAAA",stringu2="ZCOAAA",string4="HHHHxx" 824428800000000000 +tenk unique1=9314i,unique2=9542i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=314i,twothousand=1314i,fivethous=4314i,tenthous=9314i,odd=28i,even=29i,stringu1="GUAAAA",stringu2="ADOAAA",string4="OOOOxx" 824515200000000000 +tenk unique1=6893i,unique2=9543i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=893i,twothousand=893i,fivethous=1893i,tenthous=6893i,odd=186i,even=187i,stringu1="DFAAAA",stringu2="BDOAAA",string4="VVVVxx" 824601600000000000 +tenk unique1=3970i,unique2=9544i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=970i,twothousand=1970i,fivethous=3970i,tenthous=3970i,odd=140i,even=141i,stringu1="SWAAAA",stringu2="CDOAAA",string4="AAAAxx" 824688000000000000 +tenk unique1=1652i,unique2=9545i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=652i,twothousand=1652i,fivethous=1652i,tenthous=1652i,odd=104i,even=105i,stringu1="OLAAAA",stringu2="DDOAAA",string4="HHHHxx" 824774400000000000 +tenk unique1=4326i,unique2=9546i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=326i,twothousand=326i,fivethous=4326i,tenthous=4326i,odd=52i,even=53i,stringu1="KKAAAA",stringu2="EDOAAA",string4="OOOOxx" 824860800000000000 +tenk unique1=7881i,unique2=9547i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=881i,twothousand=1881i,fivethous=2881i,tenthous=7881i,odd=162i,even=163i,stringu1="DRAAAA",stringu2="FDOAAA",string4="VVVVxx" 824947200000000000 +tenk unique1=5291i,unique2=9548i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=291i,twothousand=1291i,fivethous=291i,tenthous=5291i,odd=182i,even=183i,stringu1="NVAAAA",stringu2="GDOAAA",string4="AAAAxx" 825033600000000000 +tenk unique1=957i,unique2=9549i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=957i,twothousand=957i,fivethous=957i,tenthous=957i,odd=114i,even=115i,stringu1="VKAAAA",stringu2="HDOAAA",string4="HHHHxx" 825120000000000000 +tenk unique1=2313i,unique2=9550i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=313i,twothousand=313i,fivethous=2313i,tenthous=2313i,odd=26i,even=27i,stringu1="ZKAAAA",stringu2="IDOAAA",string4="OOOOxx" 825206400000000000 +tenk unique1=5463i,unique2=9551i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=463i,twothousand=1463i,fivethous=463i,tenthous=5463i,odd=126i,even=127i,stringu1="DCAAAA",stringu2="JDOAAA",string4="VVVVxx" 825292800000000000 +tenk unique1=1268i,unique2=9552i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=268i,twothousand=1268i,fivethous=1268i,tenthous=1268i,odd=136i,even=137i,stringu1="UWAAAA",stringu2="KDOAAA",string4="AAAAxx" 825379200000000000 +tenk unique1=5028i,unique2=9553i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=28i,twothousand=1028i,fivethous=28i,tenthous=5028i,odd=56i,even=57i,stringu1="KLAAAA",stringu2="LDOAAA",string4="HHHHxx" 825465600000000000 +tenk unique1=656i,unique2=9554i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=656i,twothousand=656i,fivethous=656i,tenthous=656i,odd=112i,even=113i,stringu1="GZAAAA",stringu2="MDOAAA",string4="OOOOxx" 825552000000000000 +tenk unique1=9274i,unique2=9555i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=274i,twothousand=1274i,fivethous=4274i,tenthous=9274i,odd=148i,even=149i,stringu1="SSAAAA",stringu2="NDOAAA",string4="VVVVxx" 825638400000000000 +tenk unique1=8217i,unique2=9556i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=217i,twothousand=217i,fivethous=3217i,tenthous=8217i,odd=34i,even=35i,stringu1="BEAAAA",stringu2="ODOAAA",string4="AAAAxx" 825724800000000000 +tenk unique1=2175i,unique2=9557i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=175i,twothousand=175i,fivethous=2175i,tenthous=2175i,odd=150i,even=151i,stringu1="RFAAAA",stringu2="PDOAAA",string4="HHHHxx" 825811200000000000 +tenk unique1=6028i,unique2=9558i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=28i,twothousand=28i,fivethous=1028i,tenthous=6028i,odd=56i,even=57i,stringu1="WXAAAA",stringu2="QDOAAA",string4="OOOOxx" 825897600000000000 +tenk unique1=7584i,unique2=9559i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=584i,twothousand=1584i,fivethous=2584i,tenthous=7584i,odd=168i,even=169i,stringu1="SFAAAA",stringu2="RDOAAA",string4="VVVVxx" 825984000000000000 +tenk unique1=4114i,unique2=9560i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=114i,twothousand=114i,fivethous=4114i,tenthous=4114i,odd=28i,even=29i,stringu1="GCAAAA",stringu2="SDOAAA",string4="AAAAxx" 826070400000000000 +tenk unique1=8894i,unique2=9561i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=894i,twothousand=894i,fivethous=3894i,tenthous=8894i,odd=188i,even=189i,stringu1="CEAAAA",stringu2="TDOAAA",string4="HHHHxx" 826156800000000000 +tenk unique1=781i,unique2=9562i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=781i,twothousand=781i,fivethous=781i,tenthous=781i,odd=162i,even=163i,stringu1="BEAAAA",stringu2="UDOAAA",string4="OOOOxx" 826243200000000000 +tenk unique1=133i,unique2=9563i,two=1i,four=1i,ten=3i,twenty=13i,hundred=33i,thousand=133i,twothousand=133i,fivethous=133i,tenthous=133i,odd=66i,even=67i,stringu1="DFAAAA",stringu2="VDOAAA",string4="VVVVxx" 826329600000000000 +tenk unique1=7572i,unique2=9564i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=572i,twothousand=1572i,fivethous=2572i,tenthous=7572i,odd=144i,even=145i,stringu1="GFAAAA",stringu2="WDOAAA",string4="AAAAxx" 826416000000000000 +tenk unique1=8514i,unique2=9565i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=514i,twothousand=514i,fivethous=3514i,tenthous=8514i,odd=28i,even=29i,stringu1="MPAAAA",stringu2="XDOAAA",string4="HHHHxx" 826502400000000000 +tenk unique1=3352i,unique2=9566i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=352i,twothousand=1352i,fivethous=3352i,tenthous=3352i,odd=104i,even=105i,stringu1="YYAAAA",stringu2="YDOAAA",string4="OOOOxx" 826588800000000000 +tenk unique1=8098i,unique2=9567i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=98i,twothousand=98i,fivethous=3098i,tenthous=8098i,odd=196i,even=197i,stringu1="MZAAAA",stringu2="ZDOAAA",string4="VVVVxx" 826675200000000000 +tenk unique1=9116i,unique2=9568i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=116i,twothousand=1116i,fivethous=4116i,tenthous=9116i,odd=32i,even=33i,stringu1="QMAAAA",stringu2="AEOAAA",string4="AAAAxx" 826761600000000000 +tenk unique1=9444i,unique2=9569i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=444i,twothousand=1444i,fivethous=4444i,tenthous=9444i,odd=88i,even=89i,stringu1="GZAAAA",stringu2="BEOAAA",string4="HHHHxx" 826848000000000000 +tenk unique1=2590i,unique2=9570i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=590i,twothousand=590i,fivethous=2590i,tenthous=2590i,odd=180i,even=181i,stringu1="QVAAAA",stringu2="CEOAAA",string4="OOOOxx" 826934400000000000 +tenk unique1=7302i,unique2=9571i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=302i,twothousand=1302i,fivethous=2302i,tenthous=7302i,odd=4i,even=5i,stringu1="WUAAAA",stringu2="DEOAAA",string4="VVVVxx" 827020800000000000 +tenk unique1=7444i,unique2=9572i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=444i,twothousand=1444i,fivethous=2444i,tenthous=7444i,odd=88i,even=89i,stringu1="IAAAAA",stringu2="EEOAAA",string4="AAAAxx" 827107200000000000 +tenk unique1=8748i,unique2=9573i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=748i,twothousand=748i,fivethous=3748i,tenthous=8748i,odd=96i,even=97i,stringu1="MYAAAA",stringu2="FEOAAA",string4="HHHHxx" 827193600000000000 +tenk unique1=7615i,unique2=9574i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=615i,twothousand=1615i,fivethous=2615i,tenthous=7615i,odd=30i,even=31i,stringu1="XGAAAA",stringu2="GEOAAA",string4="OOOOxx" 827280000000000000 +tenk unique1=6090i,unique2=9575i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=90i,twothousand=90i,fivethous=1090i,tenthous=6090i,odd=180i,even=181i,stringu1="GAAAAA",stringu2="HEOAAA",string4="VVVVxx" 827366400000000000 +tenk unique1=1529i,unique2=9576i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=529i,twothousand=1529i,fivethous=1529i,tenthous=1529i,odd=58i,even=59i,stringu1="VGAAAA",stringu2="IEOAAA",string4="AAAAxx" 827452800000000000 +tenk unique1=9398i,unique2=9577i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=398i,twothousand=1398i,fivethous=4398i,tenthous=9398i,odd=196i,even=197i,stringu1="MXAAAA",stringu2="JEOAAA",string4="HHHHxx" 827539200000000000 +tenk unique1=6114i,unique2=9578i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=114i,twothousand=114i,fivethous=1114i,tenthous=6114i,odd=28i,even=29i,stringu1="EBAAAA",stringu2="KEOAAA",string4="OOOOxx" 827625600000000000 +tenk unique1=2736i,unique2=9579i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=736i,twothousand=736i,fivethous=2736i,tenthous=2736i,odd=72i,even=73i,stringu1="GBAAAA",stringu2="LEOAAA",string4="VVVVxx" 827712000000000000 +tenk unique1=468i,unique2=9580i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=468i,twothousand=468i,fivethous=468i,tenthous=468i,odd=136i,even=137i,stringu1="ASAAAA",stringu2="MEOAAA",string4="AAAAxx" 827798400000000000 +tenk unique1=1487i,unique2=9581i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=487i,twothousand=1487i,fivethous=1487i,tenthous=1487i,odd=174i,even=175i,stringu1="FFAAAA",stringu2="NEOAAA",string4="HHHHxx" 827884800000000000 +tenk unique1=4784i,unique2=9582i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=784i,twothousand=784i,fivethous=4784i,tenthous=4784i,odd=168i,even=169i,stringu1="ACAAAA",stringu2="OEOAAA",string4="OOOOxx" 827971200000000000 +tenk unique1=6731i,unique2=9583i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=731i,twothousand=731i,fivethous=1731i,tenthous=6731i,odd=62i,even=63i,stringu1="XYAAAA",stringu2="PEOAAA",string4="VVVVxx" 828057600000000000 +tenk unique1=3328i,unique2=9584i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=328i,twothousand=1328i,fivethous=3328i,tenthous=3328i,odd=56i,even=57i,stringu1="AYAAAA",stringu2="QEOAAA",string4="AAAAxx" 828144000000000000 +tenk unique1=6891i,unique2=9585i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=891i,twothousand=891i,fivethous=1891i,tenthous=6891i,odd=182i,even=183i,stringu1="BFAAAA",stringu2="REOAAA",string4="HHHHxx" 828230400000000000 +tenk unique1=8039i,unique2=9586i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=39i,twothousand=39i,fivethous=3039i,tenthous=8039i,odd=78i,even=79i,stringu1="FXAAAA",stringu2="SEOAAA",string4="OOOOxx" 828316800000000000 +tenk unique1=4064i,unique2=9587i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=64i,twothousand=64i,fivethous=4064i,tenthous=4064i,odd=128i,even=129i,stringu1="IAAAAA",stringu2="TEOAAA",string4="VVVVxx" 828403200000000000 +tenk unique1=542i,unique2=9588i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=542i,twothousand=542i,fivethous=542i,tenthous=542i,odd=84i,even=85i,stringu1="WUAAAA",stringu2="UEOAAA",string4="AAAAxx" 828489600000000000 +tenk unique1=1039i,unique2=9589i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=39i,twothousand=1039i,fivethous=1039i,tenthous=1039i,odd=78i,even=79i,stringu1="ZNAAAA",stringu2="VEOAAA",string4="HHHHxx" 828576000000000000 +tenk unique1=5603i,unique2=9590i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=603i,twothousand=1603i,fivethous=603i,tenthous=5603i,odd=6i,even=7i,stringu1="NHAAAA",stringu2="WEOAAA",string4="OOOOxx" 828662400000000000 +tenk unique1=6641i,unique2=9591i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=641i,twothousand=641i,fivethous=1641i,tenthous=6641i,odd=82i,even=83i,stringu1="LVAAAA",stringu2="XEOAAA",string4="VVVVxx" 828748800000000000 +tenk unique1=6307i,unique2=9592i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=307i,twothousand=307i,fivethous=1307i,tenthous=6307i,odd=14i,even=15i,stringu1="PIAAAA",stringu2="YEOAAA",string4="AAAAxx" 828835200000000000 +tenk unique1=5354i,unique2=9593i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=354i,twothousand=1354i,fivethous=354i,tenthous=5354i,odd=108i,even=109i,stringu1="YXAAAA",stringu2="ZEOAAA",string4="HHHHxx" 828921600000000000 +tenk unique1=7878i,unique2=9594i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=878i,twothousand=1878i,fivethous=2878i,tenthous=7878i,odd=156i,even=157i,stringu1="ARAAAA",stringu2="AFOAAA",string4="OOOOxx" 829008000000000000 +tenk unique1=6391i,unique2=9595i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=391i,twothousand=391i,fivethous=1391i,tenthous=6391i,odd=182i,even=183i,stringu1="VLAAAA",stringu2="BFOAAA",string4="VVVVxx" 829094400000000000 +tenk unique1=4575i,unique2=9596i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=575i,twothousand=575i,fivethous=4575i,tenthous=4575i,odd=150i,even=151i,stringu1="ZTAAAA",stringu2="CFOAAA",string4="AAAAxx" 829180800000000000 +tenk unique1=6644i,unique2=9597i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=644i,twothousand=644i,fivethous=1644i,tenthous=6644i,odd=88i,even=89i,stringu1="OVAAAA",stringu2="DFOAAA",string4="HHHHxx" 829267200000000000 +tenk unique1=5207i,unique2=9598i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=207i,twothousand=1207i,fivethous=207i,tenthous=5207i,odd=14i,even=15i,stringu1="HSAAAA",stringu2="EFOAAA",string4="OOOOxx" 829353600000000000 +tenk unique1=1736i,unique2=9599i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=736i,twothousand=1736i,fivethous=1736i,tenthous=1736i,odd=72i,even=73i,stringu1="UOAAAA",stringu2="FFOAAA",string4="VVVVxx" 829440000000000000 +tenk unique1=3547i,unique2=9600i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=547i,twothousand=1547i,fivethous=3547i,tenthous=3547i,odd=94i,even=95i,stringu1="LGAAAA",stringu2="GFOAAA",string4="AAAAxx" 829526400000000000 +tenk unique1=6647i,unique2=9601i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=647i,twothousand=647i,fivethous=1647i,tenthous=6647i,odd=94i,even=95i,stringu1="RVAAAA",stringu2="HFOAAA",string4="HHHHxx" 829612800000000000 +tenk unique1=4107i,unique2=9602i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=107i,twothousand=107i,fivethous=4107i,tenthous=4107i,odd=14i,even=15i,stringu1="ZBAAAA",stringu2="IFOAAA",string4="OOOOxx" 829699200000000000 +tenk unique1=8125i,unique2=9603i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=125i,twothousand=125i,fivethous=3125i,tenthous=8125i,odd=50i,even=51i,stringu1="NAAAAA",stringu2="JFOAAA",string4="VVVVxx" 829785600000000000 +tenk unique1=9223i,unique2=9604i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=223i,twothousand=1223i,fivethous=4223i,tenthous=9223i,odd=46i,even=47i,stringu1="TQAAAA",stringu2="KFOAAA",string4="AAAAxx" 829872000000000000 +tenk unique1=6903i,unique2=9605i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=903i,twothousand=903i,fivethous=1903i,tenthous=6903i,odd=6i,even=7i,stringu1="NFAAAA",stringu2="LFOAAA",string4="HHHHxx" 829958400000000000 +tenk unique1=3639i,unique2=9606i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=639i,twothousand=1639i,fivethous=3639i,tenthous=3639i,odd=78i,even=79i,stringu1="ZJAAAA",stringu2="MFOAAA",string4="OOOOxx" 830044800000000000 +tenk unique1=9606i,unique2=9607i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=606i,twothousand=1606i,fivethous=4606i,tenthous=9606i,odd=12i,even=13i,stringu1="MFAAAA",stringu2="NFOAAA",string4="VVVVxx" 830131200000000000 +tenk unique1=3232i,unique2=9608i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=232i,twothousand=1232i,fivethous=3232i,tenthous=3232i,odd=64i,even=65i,stringu1="IUAAAA",stringu2="OFOAAA",string4="AAAAxx" 830217600000000000 +tenk unique1=2063i,unique2=9609i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=63i,twothousand=63i,fivethous=2063i,tenthous=2063i,odd=126i,even=127i,stringu1="JBAAAA",stringu2="PFOAAA",string4="HHHHxx" 830304000000000000 +tenk unique1=3731i,unique2=9610i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=731i,twothousand=1731i,fivethous=3731i,tenthous=3731i,odd=62i,even=63i,stringu1="NNAAAA",stringu2="QFOAAA",string4="OOOOxx" 830390400000000000 +tenk unique1=2558i,unique2=9611i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=558i,twothousand=558i,fivethous=2558i,tenthous=2558i,odd=116i,even=117i,stringu1="KUAAAA",stringu2="RFOAAA",string4="VVVVxx" 830476800000000000 +tenk unique1=2357i,unique2=9612i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=357i,twothousand=357i,fivethous=2357i,tenthous=2357i,odd=114i,even=115i,stringu1="RMAAAA",stringu2="SFOAAA",string4="AAAAxx" 830563200000000000 +tenk unique1=6008i,unique2=9613i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=8i,twothousand=8i,fivethous=1008i,tenthous=6008i,odd=16i,even=17i,stringu1="CXAAAA",stringu2="TFOAAA",string4="HHHHxx" 830649600000000000 +tenk unique1=8246i,unique2=9614i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=246i,twothousand=246i,fivethous=3246i,tenthous=8246i,odd=92i,even=93i,stringu1="EFAAAA",stringu2="UFOAAA",string4="OOOOxx" 830736000000000000 +tenk unique1=8220i,unique2=9615i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=220i,twothousand=220i,fivethous=3220i,tenthous=8220i,odd=40i,even=41i,stringu1="EEAAAA",stringu2="VFOAAA",string4="VVVVxx" 830822400000000000 +tenk unique1=1075i,unique2=9616i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=75i,twothousand=1075i,fivethous=1075i,tenthous=1075i,odd=150i,even=151i,stringu1="JPAAAA",stringu2="WFOAAA",string4="AAAAxx" 830908800000000000 +tenk unique1=2410i,unique2=9617i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=410i,twothousand=410i,fivethous=2410i,tenthous=2410i,odd=20i,even=21i,stringu1="SOAAAA",stringu2="XFOAAA",string4="HHHHxx" 830995200000000000 +tenk unique1=3253i,unique2=9618i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=253i,twothousand=1253i,fivethous=3253i,tenthous=3253i,odd=106i,even=107i,stringu1="DVAAAA",stringu2="YFOAAA",string4="OOOOxx" 831081600000000000 +tenk unique1=4370i,unique2=9619i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=370i,twothousand=370i,fivethous=4370i,tenthous=4370i,odd=140i,even=141i,stringu1="CMAAAA",stringu2="ZFOAAA",string4="VVVVxx" 831168000000000000 +tenk unique1=8426i,unique2=9620i,two=0i,four=2i,ten=6i,twenty=6i,hundred=26i,thousand=426i,twothousand=426i,fivethous=3426i,tenthous=8426i,odd=52i,even=53i,stringu1="CMAAAA",stringu2="AGOAAA",string4="AAAAxx" 831254400000000000 +tenk unique1=2262i,unique2=9621i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=262i,twothousand=262i,fivethous=2262i,tenthous=2262i,odd=124i,even=125i,stringu1="AJAAAA",stringu2="BGOAAA",string4="HHHHxx" 831340800000000000 +tenk unique1=4149i,unique2=9622i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=149i,twothousand=149i,fivethous=4149i,tenthous=4149i,odd=98i,even=99i,stringu1="PDAAAA",stringu2="CGOAAA",string4="OOOOxx" 831427200000000000 +tenk unique1=2732i,unique2=9623i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=732i,twothousand=732i,fivethous=2732i,tenthous=2732i,odd=64i,even=65i,stringu1="CBAAAA",stringu2="DGOAAA",string4="VVVVxx" 831513600000000000 +tenk unique1=8606i,unique2=9624i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=606i,twothousand=606i,fivethous=3606i,tenthous=8606i,odd=12i,even=13i,stringu1="ATAAAA",stringu2="EGOAAA",string4="AAAAxx" 831600000000000000 +tenk unique1=6311i,unique2=9625i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=311i,twothousand=311i,fivethous=1311i,tenthous=6311i,odd=22i,even=23i,stringu1="TIAAAA",stringu2="FGOAAA",string4="HHHHxx" 831686400000000000 +tenk unique1=7223i,unique2=9626i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=223i,twothousand=1223i,fivethous=2223i,tenthous=7223i,odd=46i,even=47i,stringu1="VRAAAA",stringu2="GGOAAA",string4="OOOOxx" 831772800000000000 +tenk unique1=3054i,unique2=9627i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=54i,twothousand=1054i,fivethous=3054i,tenthous=3054i,odd=108i,even=109i,stringu1="MNAAAA",stringu2="HGOAAA",string4="VVVVxx" 831859200000000000 +tenk unique1=3952i,unique2=9628i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=952i,twothousand=1952i,fivethous=3952i,tenthous=3952i,odd=104i,even=105i,stringu1="AWAAAA",stringu2="IGOAAA",string4="AAAAxx" 831945600000000000 +tenk unique1=8252i,unique2=9629i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=252i,twothousand=252i,fivethous=3252i,tenthous=8252i,odd=104i,even=105i,stringu1="KFAAAA",stringu2="JGOAAA",string4="HHHHxx" 832032000000000000 +tenk unique1=6020i,unique2=9630i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=20i,twothousand=20i,fivethous=1020i,tenthous=6020i,odd=40i,even=41i,stringu1="OXAAAA",stringu2="KGOAAA",string4="OOOOxx" 832118400000000000 +tenk unique1=3846i,unique2=9631i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=846i,twothousand=1846i,fivethous=3846i,tenthous=3846i,odd=92i,even=93i,stringu1="YRAAAA",stringu2="LGOAAA",string4="VVVVxx" 832204800000000000 +tenk unique1=3755i,unique2=9632i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=755i,twothousand=1755i,fivethous=3755i,tenthous=3755i,odd=110i,even=111i,stringu1="LOAAAA",stringu2="MGOAAA",string4="AAAAxx" 832291200000000000 +tenk unique1=3765i,unique2=9633i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=765i,twothousand=1765i,fivethous=3765i,tenthous=3765i,odd=130i,even=131i,stringu1="VOAAAA",stringu2="NGOAAA",string4="HHHHxx" 832377600000000000 +tenk unique1=3434i,unique2=9634i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=434i,twothousand=1434i,fivethous=3434i,tenthous=3434i,odd=68i,even=69i,stringu1="CCAAAA",stringu2="OGOAAA",string4="OOOOxx" 832464000000000000 +tenk unique1=1381i,unique2=9635i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=381i,twothousand=1381i,fivethous=1381i,tenthous=1381i,odd=162i,even=163i,stringu1="DBAAAA",stringu2="PGOAAA",string4="VVVVxx" 832550400000000000 +tenk unique1=287i,unique2=9636i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=287i,twothousand=287i,fivethous=287i,tenthous=287i,odd=174i,even=175i,stringu1="BLAAAA",stringu2="QGOAAA",string4="AAAAxx" 832636800000000000 +tenk unique1=4476i,unique2=9637i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=476i,twothousand=476i,fivethous=4476i,tenthous=4476i,odd=152i,even=153i,stringu1="EQAAAA",stringu2="RGOAAA",string4="HHHHxx" 832723200000000000 +tenk unique1=2916i,unique2=9638i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=916i,twothousand=916i,fivethous=2916i,tenthous=2916i,odd=32i,even=33i,stringu1="EIAAAA",stringu2="SGOAAA",string4="OOOOxx" 832809600000000000 +tenk unique1=4517i,unique2=9639i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=517i,twothousand=517i,fivethous=4517i,tenthous=4517i,odd=34i,even=35i,stringu1="TRAAAA",stringu2="TGOAAA",string4="VVVVxx" 832896000000000000 +tenk unique1=4561i,unique2=9640i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=561i,twothousand=561i,fivethous=4561i,tenthous=4561i,odd=122i,even=123i,stringu1="LTAAAA",stringu2="UGOAAA",string4="AAAAxx" 832982400000000000 +tenk unique1=5106i,unique2=9641i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=106i,twothousand=1106i,fivethous=106i,tenthous=5106i,odd=12i,even=13i,stringu1="KOAAAA",stringu2="VGOAAA",string4="HHHHxx" 833068800000000000 +tenk unique1=2077i,unique2=9642i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=77i,twothousand=77i,fivethous=2077i,tenthous=2077i,odd=154i,even=155i,stringu1="XBAAAA",stringu2="WGOAAA",string4="OOOOxx" 833155200000000000 +tenk unique1=5269i,unique2=9643i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=269i,twothousand=1269i,fivethous=269i,tenthous=5269i,odd=138i,even=139i,stringu1="RUAAAA",stringu2="XGOAAA",string4="VVVVxx" 833241600000000000 +tenk unique1=5688i,unique2=9644i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=688i,twothousand=1688i,fivethous=688i,tenthous=5688i,odd=176i,even=177i,stringu1="UKAAAA",stringu2="YGOAAA",string4="AAAAxx" 833328000000000000 +tenk unique1=8831i,unique2=9645i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=831i,twothousand=831i,fivethous=3831i,tenthous=8831i,odd=62i,even=63i,stringu1="RBAAAA",stringu2="ZGOAAA",string4="HHHHxx" 833414400000000000 +tenk unique1=3867i,unique2=9646i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=867i,twothousand=1867i,fivethous=3867i,tenthous=3867i,odd=134i,even=135i,stringu1="TSAAAA",stringu2="AHOAAA",string4="OOOOxx" 833500800000000000 +tenk unique1=6062i,unique2=9647i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=62i,twothousand=62i,fivethous=1062i,tenthous=6062i,odd=124i,even=125i,stringu1="EZAAAA",stringu2="BHOAAA",string4="VVVVxx" 833587200000000000 +tenk unique1=8460i,unique2=9648i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=460i,twothousand=460i,fivethous=3460i,tenthous=8460i,odd=120i,even=121i,stringu1="KNAAAA",stringu2="CHOAAA",string4="AAAAxx" 833673600000000000 +tenk unique1=3138i,unique2=9649i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=138i,twothousand=1138i,fivethous=3138i,tenthous=3138i,odd=76i,even=77i,stringu1="SQAAAA",stringu2="DHOAAA",string4="HHHHxx" 833760000000000000 +tenk unique1=3173i,unique2=9650i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=173i,twothousand=1173i,fivethous=3173i,tenthous=3173i,odd=146i,even=147i,stringu1="BSAAAA",stringu2="EHOAAA",string4="OOOOxx" 833846400000000000 +tenk unique1=7018i,unique2=9651i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=18i,twothousand=1018i,fivethous=2018i,tenthous=7018i,odd=36i,even=37i,stringu1="YJAAAA",stringu2="FHOAAA",string4="VVVVxx" 833932800000000000 +tenk unique1=4836i,unique2=9652i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=836i,twothousand=836i,fivethous=4836i,tenthous=4836i,odd=72i,even=73i,stringu1="AEAAAA",stringu2="GHOAAA",string4="AAAAxx" 834019200000000000 +tenk unique1=1007i,unique2=9653i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=1007i,fivethous=1007i,tenthous=1007i,odd=14i,even=15i,stringu1="TMAAAA",stringu2="HHOAAA",string4="HHHHxx" 834105600000000000 +tenk unique1=658i,unique2=9654i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=658i,twothousand=658i,fivethous=658i,tenthous=658i,odd=116i,even=117i,stringu1="IZAAAA",stringu2="IHOAAA",string4="OOOOxx" 834192000000000000 +tenk unique1=5205i,unique2=9655i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=205i,twothousand=1205i,fivethous=205i,tenthous=5205i,odd=10i,even=11i,stringu1="FSAAAA",stringu2="JHOAAA",string4="VVVVxx" 834278400000000000 +tenk unique1=5805i,unique2=9656i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=805i,twothousand=1805i,fivethous=805i,tenthous=5805i,odd=10i,even=11i,stringu1="HPAAAA",stringu2="KHOAAA",string4="AAAAxx" 834364800000000000 +tenk unique1=5959i,unique2=9657i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=959i,twothousand=1959i,fivethous=959i,tenthous=5959i,odd=118i,even=119i,stringu1="FVAAAA",stringu2="LHOAAA",string4="HHHHxx" 834451200000000000 +tenk unique1=2863i,unique2=9658i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=863i,twothousand=863i,fivethous=2863i,tenthous=2863i,odd=126i,even=127i,stringu1="DGAAAA",stringu2="MHOAAA",string4="OOOOxx" 834537600000000000 +tenk unique1=7272i,unique2=9659i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=272i,twothousand=1272i,fivethous=2272i,tenthous=7272i,odd=144i,even=145i,stringu1="STAAAA",stringu2="NHOAAA",string4="VVVVxx" 834624000000000000 +tenk unique1=8437i,unique2=9660i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=437i,twothousand=437i,fivethous=3437i,tenthous=8437i,odd=74i,even=75i,stringu1="NMAAAA",stringu2="OHOAAA",string4="AAAAxx" 834710400000000000 +tenk unique1=4900i,unique2=9661i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=900i,twothousand=900i,fivethous=4900i,tenthous=4900i,odd=0i,even=1i,stringu1="MGAAAA",stringu2="PHOAAA",string4="HHHHxx" 834796800000000000 +tenk unique1=890i,unique2=9662i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=890i,twothousand=890i,fivethous=890i,tenthous=890i,odd=180i,even=181i,stringu1="GIAAAA",stringu2="QHOAAA",string4="OOOOxx" 834883200000000000 +tenk unique1=3530i,unique2=9663i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=530i,twothousand=1530i,fivethous=3530i,tenthous=3530i,odd=60i,even=61i,stringu1="UFAAAA",stringu2="RHOAAA",string4="VVVVxx" 834969600000000000 +tenk unique1=6209i,unique2=9664i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=209i,twothousand=209i,fivethous=1209i,tenthous=6209i,odd=18i,even=19i,stringu1="VEAAAA",stringu2="SHOAAA",string4="AAAAxx" 835056000000000000 +tenk unique1=4595i,unique2=9665i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=595i,twothousand=595i,fivethous=4595i,tenthous=4595i,odd=190i,even=191i,stringu1="TUAAAA",stringu2="THOAAA",string4="HHHHxx" 835142400000000000 +tenk unique1=5982i,unique2=9666i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=982i,twothousand=1982i,fivethous=982i,tenthous=5982i,odd=164i,even=165i,stringu1="CWAAAA",stringu2="UHOAAA",string4="OOOOxx" 835228800000000000 +tenk unique1=1101i,unique2=9667i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=101i,twothousand=1101i,fivethous=1101i,tenthous=1101i,odd=2i,even=3i,stringu1="JQAAAA",stringu2="VHOAAA",string4="VVVVxx" 835315200000000000 +tenk unique1=9555i,unique2=9668i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=555i,twothousand=1555i,fivethous=4555i,tenthous=9555i,odd=110i,even=111i,stringu1="NDAAAA",stringu2="WHOAAA",string4="AAAAxx" 835401600000000000 +tenk unique1=1918i,unique2=9669i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=918i,twothousand=1918i,fivethous=1918i,tenthous=1918i,odd=36i,even=37i,stringu1="UVAAAA",stringu2="XHOAAA",string4="HHHHxx" 835488000000000000 +tenk unique1=3527i,unique2=9670i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=527i,twothousand=1527i,fivethous=3527i,tenthous=3527i,odd=54i,even=55i,stringu1="RFAAAA",stringu2="YHOAAA",string4="OOOOxx" 835574400000000000 +tenk unique1=7309i,unique2=9671i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=309i,twothousand=1309i,fivethous=2309i,tenthous=7309i,odd=18i,even=19i,stringu1="DVAAAA",stringu2="ZHOAAA",string4="VVVVxx" 835660800000000000 +tenk unique1=8213i,unique2=9672i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=213i,twothousand=213i,fivethous=3213i,tenthous=8213i,odd=26i,even=27i,stringu1="XDAAAA",stringu2="AIOAAA",string4="AAAAxx" 835747200000000000 +tenk unique1=306i,unique2=9673i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=306i,twothousand=306i,fivethous=306i,tenthous=306i,odd=12i,even=13i,stringu1="ULAAAA",stringu2="BIOAAA",string4="HHHHxx" 835833600000000000 +tenk unique1=845i,unique2=9674i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=845i,twothousand=845i,fivethous=845i,tenthous=845i,odd=90i,even=91i,stringu1="NGAAAA",stringu2="CIOAAA",string4="OOOOxx" 835920000000000000 +tenk unique1=16i,unique2=9675i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=16i,twothousand=16i,fivethous=16i,tenthous=16i,odd=32i,even=33i,stringu1="QAAAAA",stringu2="DIOAAA",string4="VVVVxx" 836006400000000000 +tenk unique1=437i,unique2=9676i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=437i,twothousand=437i,fivethous=437i,tenthous=437i,odd=74i,even=75i,stringu1="VQAAAA",stringu2="EIOAAA",string4="AAAAxx" 836092800000000000 +tenk unique1=9518i,unique2=9677i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=518i,twothousand=1518i,fivethous=4518i,tenthous=9518i,odd=36i,even=37i,stringu1="CCAAAA",stringu2="FIOAAA",string4="HHHHxx" 836179200000000000 +tenk unique1=2142i,unique2=9678i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=142i,twothousand=142i,fivethous=2142i,tenthous=2142i,odd=84i,even=85i,stringu1="KEAAAA",stringu2="GIOAAA",string4="OOOOxx" 836265600000000000 +tenk unique1=8121i,unique2=9679i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=121i,twothousand=121i,fivethous=3121i,tenthous=8121i,odd=42i,even=43i,stringu1="JAAAAA",stringu2="HIOAAA",string4="VVVVxx" 836352000000000000 +tenk unique1=7354i,unique2=9680i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=354i,twothousand=1354i,fivethous=2354i,tenthous=7354i,odd=108i,even=109i,stringu1="WWAAAA",stringu2="IIOAAA",string4="AAAAxx" 836438400000000000 +tenk unique1=1720i,unique2=9681i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=720i,twothousand=1720i,fivethous=1720i,tenthous=1720i,odd=40i,even=41i,stringu1="EOAAAA",stringu2="JIOAAA",string4="HHHHxx" 836524800000000000 +tenk unique1=6078i,unique2=9682i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=78i,twothousand=78i,fivethous=1078i,tenthous=6078i,odd=156i,even=157i,stringu1="UZAAAA",stringu2="KIOAAA",string4="OOOOxx" 836611200000000000 +tenk unique1=5929i,unique2=9683i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=929i,twothousand=1929i,fivethous=929i,tenthous=5929i,odd=58i,even=59i,stringu1="BUAAAA",stringu2="LIOAAA",string4="VVVVxx" 836697600000000000 +tenk unique1=3856i,unique2=9684i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=856i,twothousand=1856i,fivethous=3856i,tenthous=3856i,odd=112i,even=113i,stringu1="ISAAAA",stringu2="MIOAAA",string4="AAAAxx" 836784000000000000 +tenk unique1=3424i,unique2=9685i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=424i,twothousand=1424i,fivethous=3424i,tenthous=3424i,odd=48i,even=49i,stringu1="SBAAAA",stringu2="NIOAAA",string4="HHHHxx" 836870400000000000 +tenk unique1=1712i,unique2=9686i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=712i,twothousand=1712i,fivethous=1712i,tenthous=1712i,odd=24i,even=25i,stringu1="WNAAAA",stringu2="OIOAAA",string4="OOOOxx" 836956800000000000 +tenk unique1=2340i,unique2=9687i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=340i,twothousand=340i,fivethous=2340i,tenthous=2340i,odd=80i,even=81i,stringu1="AMAAAA",stringu2="PIOAAA",string4="VVVVxx" 837043200000000000 +tenk unique1=5570i,unique2=9688i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=570i,twothousand=1570i,fivethous=570i,tenthous=5570i,odd=140i,even=141i,stringu1="GGAAAA",stringu2="QIOAAA",string4="AAAAxx" 837129600000000000 +tenk unique1=8734i,unique2=9689i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=734i,twothousand=734i,fivethous=3734i,tenthous=8734i,odd=68i,even=69i,stringu1="YXAAAA",stringu2="RIOAAA",string4="HHHHxx" 837216000000000000 +tenk unique1=6077i,unique2=9690i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=77i,twothousand=77i,fivethous=1077i,tenthous=6077i,odd=154i,even=155i,stringu1="TZAAAA",stringu2="SIOAAA",string4="OOOOxx" 837302400000000000 +tenk unique1=2960i,unique2=9691i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=960i,twothousand=960i,fivethous=2960i,tenthous=2960i,odd=120i,even=121i,stringu1="WJAAAA",stringu2="TIOAAA",string4="VVVVxx" 837388800000000000 +tenk unique1=5062i,unique2=9692i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=62i,twothousand=1062i,fivethous=62i,tenthous=5062i,odd=124i,even=125i,stringu1="SMAAAA",stringu2="UIOAAA",string4="AAAAxx" 837475200000000000 +tenk unique1=1532i,unique2=9693i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=532i,twothousand=1532i,fivethous=1532i,tenthous=1532i,odd=64i,even=65i,stringu1="YGAAAA",stringu2="VIOAAA",string4="HHHHxx" 837561600000000000 +tenk unique1=8298i,unique2=9694i,two=0i,four=2i,ten=8i,twenty=18i,hundred=98i,thousand=298i,twothousand=298i,fivethous=3298i,tenthous=8298i,odd=196i,even=197i,stringu1="EHAAAA",stringu2="WIOAAA",string4="OOOOxx" 837648000000000000 +tenk unique1=2496i,unique2=9695i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=496i,twothousand=496i,fivethous=2496i,tenthous=2496i,odd=192i,even=193i,stringu1="ASAAAA",stringu2="XIOAAA",string4="VVVVxx" 837734400000000000 +tenk unique1=8412i,unique2=9696i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=412i,twothousand=412i,fivethous=3412i,tenthous=8412i,odd=24i,even=25i,stringu1="OLAAAA",stringu2="YIOAAA",string4="AAAAxx" 837820800000000000 +tenk unique1=724i,unique2=9697i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=724i,twothousand=724i,fivethous=724i,tenthous=724i,odd=48i,even=49i,stringu1="WBAAAA",stringu2="ZIOAAA",string4="HHHHxx" 837907200000000000 +tenk unique1=1019i,unique2=9698i,two=1i,four=3i,ten=9i,twenty=19i,hundred=19i,thousand=19i,twothousand=1019i,fivethous=1019i,tenthous=1019i,odd=38i,even=39i,stringu1="FNAAAA",stringu2="AJOAAA",string4="OOOOxx" 837993600000000000 +tenk unique1=6265i,unique2=9699i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=265i,twothousand=265i,fivethous=1265i,tenthous=6265i,odd=130i,even=131i,stringu1="ZGAAAA",stringu2="BJOAAA",string4="VVVVxx" 838080000000000000 +tenk unique1=740i,unique2=9700i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=740i,twothousand=740i,fivethous=740i,tenthous=740i,odd=80i,even=81i,stringu1="MCAAAA",stringu2="CJOAAA",string4="AAAAxx" 838166400000000000 +tenk unique1=8495i,unique2=9701i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=495i,twothousand=495i,fivethous=3495i,tenthous=8495i,odd=190i,even=191i,stringu1="TOAAAA",stringu2="DJOAAA",string4="HHHHxx" 838252800000000000 +tenk unique1=6983i,unique2=9702i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=983i,twothousand=983i,fivethous=1983i,tenthous=6983i,odd=166i,even=167i,stringu1="PIAAAA",stringu2="EJOAAA",string4="OOOOxx" 838339200000000000 +tenk unique1=991i,unique2=9703i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=991i,twothousand=991i,fivethous=991i,tenthous=991i,odd=182i,even=183i,stringu1="DMAAAA",stringu2="FJOAAA",string4="VVVVxx" 838425600000000000 +tenk unique1=3189i,unique2=9704i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=189i,twothousand=1189i,fivethous=3189i,tenthous=3189i,odd=178i,even=179i,stringu1="RSAAAA",stringu2="GJOAAA",string4="AAAAxx" 838512000000000000 +tenk unique1=4487i,unique2=9705i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=487i,twothousand=487i,fivethous=4487i,tenthous=4487i,odd=174i,even=175i,stringu1="PQAAAA",stringu2="HJOAAA",string4="HHHHxx" 838598400000000000 +tenk unique1=5554i,unique2=9706i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=554i,twothousand=1554i,fivethous=554i,tenthous=5554i,odd=108i,even=109i,stringu1="QFAAAA",stringu2="IJOAAA",string4="OOOOxx" 838684800000000000 +tenk unique1=1258i,unique2=9707i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=258i,twothousand=1258i,fivethous=1258i,tenthous=1258i,odd=116i,even=117i,stringu1="KWAAAA",stringu2="JJOAAA",string4="VVVVxx" 838771200000000000 +tenk unique1=5359i,unique2=9708i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=359i,twothousand=1359i,fivethous=359i,tenthous=5359i,odd=118i,even=119i,stringu1="DYAAAA",stringu2="KJOAAA",string4="AAAAxx" 838857600000000000 +tenk unique1=2709i,unique2=9709i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=709i,twothousand=709i,fivethous=2709i,tenthous=2709i,odd=18i,even=19i,stringu1="FAAAAA",stringu2="LJOAAA",string4="HHHHxx" 838944000000000000 +tenk unique1=361i,unique2=9710i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=361i,twothousand=361i,fivethous=361i,tenthous=361i,odd=122i,even=123i,stringu1="XNAAAA",stringu2="MJOAAA",string4="OOOOxx" 839030400000000000 +tenk unique1=4028i,unique2=9711i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=28i,twothousand=28i,fivethous=4028i,tenthous=4028i,odd=56i,even=57i,stringu1="YYAAAA",stringu2="NJOAAA",string4="VVVVxx" 839116800000000000 +tenk unique1=3735i,unique2=9712i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=735i,twothousand=1735i,fivethous=3735i,tenthous=3735i,odd=70i,even=71i,stringu1="RNAAAA",stringu2="OJOAAA",string4="AAAAxx" 839203200000000000 +tenk unique1=4427i,unique2=9713i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=427i,twothousand=427i,fivethous=4427i,tenthous=4427i,odd=54i,even=55i,stringu1="HOAAAA",stringu2="PJOAAA",string4="HHHHxx" 839289600000000000 +tenk unique1=7540i,unique2=9714i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=540i,twothousand=1540i,fivethous=2540i,tenthous=7540i,odd=80i,even=81i,stringu1="AEAAAA",stringu2="QJOAAA",string4="OOOOxx" 839376000000000000 +tenk unique1=3569i,unique2=9715i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=569i,twothousand=1569i,fivethous=3569i,tenthous=3569i,odd=138i,even=139i,stringu1="HHAAAA",stringu2="RJOAAA",string4="VVVVxx" 839462400000000000 +tenk unique1=1916i,unique2=9716i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=916i,twothousand=1916i,fivethous=1916i,tenthous=1916i,odd=32i,even=33i,stringu1="SVAAAA",stringu2="SJOAAA",string4="AAAAxx" 839548800000000000 +tenk unique1=7596i,unique2=9717i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=596i,twothousand=1596i,fivethous=2596i,tenthous=7596i,odd=192i,even=193i,stringu1="EGAAAA",stringu2="TJOAAA",string4="HHHHxx" 839635200000000000 +tenk unique1=9721i,unique2=9718i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=721i,twothousand=1721i,fivethous=4721i,tenthous=9721i,odd=42i,even=43i,stringu1="XJAAAA",stringu2="UJOAAA",string4="OOOOxx" 839721600000000000 +tenk unique1=4429i,unique2=9719i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=429i,twothousand=429i,fivethous=4429i,tenthous=4429i,odd=58i,even=59i,stringu1="JOAAAA",stringu2="VJOAAA",string4="VVVVxx" 839808000000000000 +tenk unique1=3471i,unique2=9720i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=471i,twothousand=1471i,fivethous=3471i,tenthous=3471i,odd=142i,even=143i,stringu1="NDAAAA",stringu2="WJOAAA",string4="AAAAxx" 839894400000000000 +tenk unique1=1157i,unique2=9721i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=157i,twothousand=1157i,fivethous=1157i,tenthous=1157i,odd=114i,even=115i,stringu1="NSAAAA",stringu2="XJOAAA",string4="HHHHxx" 839980800000000000 +tenk unique1=5700i,unique2=9722i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=700i,twothousand=1700i,fivethous=700i,tenthous=5700i,odd=0i,even=1i,stringu1="GLAAAA",stringu2="YJOAAA",string4="OOOOxx" 840067200000000000 +tenk unique1=4431i,unique2=9723i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=431i,twothousand=431i,fivethous=4431i,tenthous=4431i,odd=62i,even=63i,stringu1="LOAAAA",stringu2="ZJOAAA",string4="VVVVxx" 840153600000000000 +tenk unique1=9409i,unique2=9724i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=409i,twothousand=1409i,fivethous=4409i,tenthous=9409i,odd=18i,even=19i,stringu1="XXAAAA",stringu2="AKOAAA",string4="AAAAxx" 840240000000000000 +tenk unique1=8752i,unique2=9725i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=752i,twothousand=752i,fivethous=3752i,tenthous=8752i,odd=104i,even=105i,stringu1="QYAAAA",stringu2="BKOAAA",string4="HHHHxx" 840326400000000000 +tenk unique1=9484i,unique2=9726i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=484i,twothousand=1484i,fivethous=4484i,tenthous=9484i,odd=168i,even=169i,stringu1="UAAAAA",stringu2="CKOAAA",string4="OOOOxx" 840412800000000000 +tenk unique1=1266i,unique2=9727i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=266i,twothousand=1266i,fivethous=1266i,tenthous=1266i,odd=132i,even=133i,stringu1="SWAAAA",stringu2="DKOAAA",string4="VVVVxx" 840499200000000000 +tenk unique1=9097i,unique2=9728i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=97i,twothousand=1097i,fivethous=4097i,tenthous=9097i,odd=194i,even=195i,stringu1="XLAAAA",stringu2="EKOAAA",string4="AAAAxx" 840585600000000000 +tenk unique1=3068i,unique2=9729i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=68i,twothousand=1068i,fivethous=3068i,tenthous=3068i,odd=136i,even=137i,stringu1="AOAAAA",stringu2="FKOAAA",string4="HHHHxx" 840672000000000000 +tenk unique1=5490i,unique2=9730i,two=0i,four=2i,ten=0i,twenty=10i,hundred=90i,thousand=490i,twothousand=1490i,fivethous=490i,tenthous=5490i,odd=180i,even=181i,stringu1="EDAAAA",stringu2="GKOAAA",string4="OOOOxx" 840758400000000000 +tenk unique1=1375i,unique2=9731i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=375i,twothousand=1375i,fivethous=1375i,tenthous=1375i,odd=150i,even=151i,stringu1="XAAAAA",stringu2="HKOAAA",string4="VVVVxx" 840844800000000000 +tenk unique1=2487i,unique2=9732i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=487i,twothousand=487i,fivethous=2487i,tenthous=2487i,odd=174i,even=175i,stringu1="RRAAAA",stringu2="IKOAAA",string4="AAAAxx" 840931200000000000 +tenk unique1=1705i,unique2=9733i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=705i,twothousand=1705i,fivethous=1705i,tenthous=1705i,odd=10i,even=11i,stringu1="PNAAAA",stringu2="JKOAAA",string4="HHHHxx" 841017600000000000 +tenk unique1=1571i,unique2=9734i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=571i,twothousand=1571i,fivethous=1571i,tenthous=1571i,odd=142i,even=143i,stringu1="LIAAAA",stringu2="KKOAAA",string4="OOOOxx" 841104000000000000 +tenk unique1=4005i,unique2=9735i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=5i,twothousand=5i,fivethous=4005i,tenthous=4005i,odd=10i,even=11i,stringu1="BYAAAA",stringu2="LKOAAA",string4="VVVVxx" 841190400000000000 +tenk unique1=5497i,unique2=9736i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=497i,twothousand=1497i,fivethous=497i,tenthous=5497i,odd=194i,even=195i,stringu1="LDAAAA",stringu2="MKOAAA",string4="AAAAxx" 841276800000000000 +tenk unique1=2144i,unique2=9737i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=144i,twothousand=144i,fivethous=2144i,tenthous=2144i,odd=88i,even=89i,stringu1="MEAAAA",stringu2="NKOAAA",string4="HHHHxx" 841363200000000000 +tenk unique1=4052i,unique2=9738i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=52i,twothousand=52i,fivethous=4052i,tenthous=4052i,odd=104i,even=105i,stringu1="WZAAAA",stringu2="OKOAAA",string4="OOOOxx" 841449600000000000 +tenk unique1=4942i,unique2=9739i,two=0i,four=2i,ten=2i,twenty=2i,hundred=42i,thousand=942i,twothousand=942i,fivethous=4942i,tenthous=4942i,odd=84i,even=85i,stringu1="CIAAAA",stringu2="PKOAAA",string4="VVVVxx" 841536000000000000 +tenk unique1=5504i,unique2=9740i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=504i,twothousand=1504i,fivethous=504i,tenthous=5504i,odd=8i,even=9i,stringu1="SDAAAA",stringu2="QKOAAA",string4="AAAAxx" 841622400000000000 +tenk unique1=2913i,unique2=9741i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=913i,twothousand=913i,fivethous=2913i,tenthous=2913i,odd=26i,even=27i,stringu1="BIAAAA",stringu2="RKOAAA",string4="HHHHxx" 841708800000000000 +tenk unique1=5617i,unique2=9742i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=617i,twothousand=1617i,fivethous=617i,tenthous=5617i,odd=34i,even=35i,stringu1="BIAAAA",stringu2="SKOAAA",string4="OOOOxx" 841795200000000000 +tenk unique1=8179i,unique2=9743i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=179i,twothousand=179i,fivethous=3179i,tenthous=8179i,odd=158i,even=159i,stringu1="PCAAAA",stringu2="TKOAAA",string4="VVVVxx" 841881600000000000 +tenk unique1=9437i,unique2=9744i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=437i,twothousand=1437i,fivethous=4437i,tenthous=9437i,odd=74i,even=75i,stringu1="ZYAAAA",stringu2="UKOAAA",string4="AAAAxx" 841968000000000000 +tenk unique1=1821i,unique2=9745i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=821i,twothousand=1821i,fivethous=1821i,tenthous=1821i,odd=42i,even=43i,stringu1="BSAAAA",stringu2="VKOAAA",string4="HHHHxx" 842054400000000000 +tenk unique1=5737i,unique2=9746i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=737i,twothousand=1737i,fivethous=737i,tenthous=5737i,odd=74i,even=75i,stringu1="RMAAAA",stringu2="WKOAAA",string4="OOOOxx" 842140800000000000 +tenk unique1=4207i,unique2=9747i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=207i,twothousand=207i,fivethous=4207i,tenthous=4207i,odd=14i,even=15i,stringu1="VFAAAA",stringu2="XKOAAA",string4="VVVVxx" 842227200000000000 +tenk unique1=4815i,unique2=9748i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=815i,twothousand=815i,fivethous=4815i,tenthous=4815i,odd=30i,even=31i,stringu1="FDAAAA",stringu2="YKOAAA",string4="AAAAxx" 842313600000000000 +tenk unique1=8707i,unique2=9749i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=707i,twothousand=707i,fivethous=3707i,tenthous=8707i,odd=14i,even=15i,stringu1="XWAAAA",stringu2="ZKOAAA",string4="HHHHxx" 842400000000000000 +tenk unique1=5970i,unique2=9750i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=970i,twothousand=1970i,fivethous=970i,tenthous=5970i,odd=140i,even=141i,stringu1="QVAAAA",stringu2="ALOAAA",string4="OOOOxx" 842486400000000000 +tenk unique1=5501i,unique2=9751i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=501i,twothousand=1501i,fivethous=501i,tenthous=5501i,odd=2i,even=3i,stringu1="PDAAAA",stringu2="BLOAAA",string4="VVVVxx" 842572800000000000 +tenk unique1=4013i,unique2=9752i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=13i,twothousand=13i,fivethous=4013i,tenthous=4013i,odd=26i,even=27i,stringu1="JYAAAA",stringu2="CLOAAA",string4="AAAAxx" 842659200000000000 +tenk unique1=9235i,unique2=9753i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=235i,twothousand=1235i,fivethous=4235i,tenthous=9235i,odd=70i,even=71i,stringu1="FRAAAA",stringu2="DLOAAA",string4="HHHHxx" 842745600000000000 +tenk unique1=2503i,unique2=9754i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=503i,twothousand=503i,fivethous=2503i,tenthous=2503i,odd=6i,even=7i,stringu1="HSAAAA",stringu2="ELOAAA",string4="OOOOxx" 842832000000000000 +tenk unique1=9181i,unique2=9755i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=181i,twothousand=1181i,fivethous=4181i,tenthous=9181i,odd=162i,even=163i,stringu1="DPAAAA",stringu2="FLOAAA",string4="VVVVxx" 842918400000000000 +tenk unique1=2289i,unique2=9756i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=289i,twothousand=289i,fivethous=2289i,tenthous=2289i,odd=178i,even=179i,stringu1="BKAAAA",stringu2="GLOAAA",string4="AAAAxx" 843004800000000000 +tenk unique1=4256i,unique2=9757i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=256i,twothousand=256i,fivethous=4256i,tenthous=4256i,odd=112i,even=113i,stringu1="SHAAAA",stringu2="HLOAAA",string4="HHHHxx" 843091200000000000 +tenk unique1=191i,unique2=9758i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=191i,twothousand=191i,fivethous=191i,tenthous=191i,odd=182i,even=183i,stringu1="JHAAAA",stringu2="ILOAAA",string4="OOOOxx" 843177600000000000 +tenk unique1=9655i,unique2=9759i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=655i,twothousand=1655i,fivethous=4655i,tenthous=9655i,odd=110i,even=111i,stringu1="JHAAAA",stringu2="JLOAAA",string4="VVVVxx" 843264000000000000 +tenk unique1=8615i,unique2=9760i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=615i,twothousand=615i,fivethous=3615i,tenthous=8615i,odd=30i,even=31i,stringu1="JTAAAA",stringu2="KLOAAA",string4="AAAAxx" 843350400000000000 +tenk unique1=3011i,unique2=9761i,two=1i,four=3i,ten=1i,twenty=11i,hundred=11i,thousand=11i,twothousand=1011i,fivethous=3011i,tenthous=3011i,odd=22i,even=23i,stringu1="VLAAAA",stringu2="LLOAAA",string4="HHHHxx" 843436800000000000 +tenk unique1=6376i,unique2=9762i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=376i,twothousand=376i,fivethous=1376i,tenthous=6376i,odd=152i,even=153i,stringu1="GLAAAA",stringu2="MLOAAA",string4="OOOOxx" 843523200000000000 +tenk unique1=68i,unique2=9763i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=68i,twothousand=68i,fivethous=68i,tenthous=68i,odd=136i,even=137i,stringu1="QCAAAA",stringu2="NLOAAA",string4="VVVVxx" 843609600000000000 +tenk unique1=4720i,unique2=9764i,two=0i,four=0i,ten=0i,twenty=0i,hundred=20i,thousand=720i,twothousand=720i,fivethous=4720i,tenthous=4720i,odd=40i,even=41i,stringu1="OZAAAA",stringu2="OLOAAA",string4="AAAAxx" 843696000000000000 +tenk unique1=6848i,unique2=9765i,two=0i,four=0i,ten=8i,twenty=8i,hundred=48i,thousand=848i,twothousand=848i,fivethous=1848i,tenthous=6848i,odd=96i,even=97i,stringu1="KDAAAA",stringu2="PLOAAA",string4="HHHHxx" 843782400000000000 +tenk unique1=456i,unique2=9766i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=456i,twothousand=456i,fivethous=456i,tenthous=456i,odd=112i,even=113i,stringu1="ORAAAA",stringu2="QLOAAA",string4="OOOOxx" 843868800000000000 +tenk unique1=5887i,unique2=9767i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=887i,twothousand=1887i,fivethous=887i,tenthous=5887i,odd=174i,even=175i,stringu1="LSAAAA",stringu2="RLOAAA",string4="VVVVxx" 843955200000000000 +tenk unique1=9249i,unique2=9768i,two=1i,four=1i,ten=9i,twenty=9i,hundred=49i,thousand=249i,twothousand=1249i,fivethous=4249i,tenthous=9249i,odd=98i,even=99i,stringu1="TRAAAA",stringu2="SLOAAA",string4="AAAAxx" 844041600000000000 +tenk unique1=4041i,unique2=9769i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=41i,twothousand=41i,fivethous=4041i,tenthous=4041i,odd=82i,even=83i,stringu1="LZAAAA",stringu2="TLOAAA",string4="HHHHxx" 844128000000000000 +tenk unique1=2304i,unique2=9770i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=304i,twothousand=304i,fivethous=2304i,tenthous=2304i,odd=8i,even=9i,stringu1="QKAAAA",stringu2="ULOAAA",string4="OOOOxx" 844214400000000000 +tenk unique1=8763i,unique2=9771i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=763i,twothousand=763i,fivethous=3763i,tenthous=8763i,odd=126i,even=127i,stringu1="BZAAAA",stringu2="VLOAAA",string4="VVVVxx" 844300800000000000 +tenk unique1=2115i,unique2=9772i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=115i,twothousand=115i,fivethous=2115i,tenthous=2115i,odd=30i,even=31i,stringu1="JDAAAA",stringu2="WLOAAA",string4="AAAAxx" 844387200000000000 +tenk unique1=8014i,unique2=9773i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=14i,twothousand=14i,fivethous=3014i,tenthous=8014i,odd=28i,even=29i,stringu1="GWAAAA",stringu2="XLOAAA",string4="HHHHxx" 844473600000000000 +tenk unique1=9895i,unique2=9774i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=895i,twothousand=1895i,fivethous=4895i,tenthous=9895i,odd=190i,even=191i,stringu1="PQAAAA",stringu2="YLOAAA",string4="OOOOxx" 844560000000000000 +tenk unique1=671i,unique2=9775i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=671i,twothousand=671i,fivethous=671i,tenthous=671i,odd=142i,even=143i,stringu1="VZAAAA",stringu2="ZLOAAA",string4="VVVVxx" 844646400000000000 +tenk unique1=3774i,unique2=9776i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=774i,twothousand=1774i,fivethous=3774i,tenthous=3774i,odd=148i,even=149i,stringu1="EPAAAA",stringu2="AMOAAA",string4="AAAAxx" 844732800000000000 +tenk unique1=134i,unique2=9777i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=134i,twothousand=134i,fivethous=134i,tenthous=134i,odd=68i,even=69i,stringu1="EFAAAA",stringu2="BMOAAA",string4="HHHHxx" 844819200000000000 +tenk unique1=534i,unique2=9778i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=534i,twothousand=534i,fivethous=534i,tenthous=534i,odd=68i,even=69i,stringu1="OUAAAA",stringu2="CMOAAA",string4="OOOOxx" 844905600000000000 +tenk unique1=7308i,unique2=9779i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=308i,twothousand=1308i,fivethous=2308i,tenthous=7308i,odd=16i,even=17i,stringu1="CVAAAA",stringu2="DMOAAA",string4="VVVVxx" 844992000000000000 +tenk unique1=5244i,unique2=9780i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=244i,twothousand=1244i,fivethous=244i,tenthous=5244i,odd=88i,even=89i,stringu1="STAAAA",stringu2="EMOAAA",string4="AAAAxx" 845078400000000000 +tenk unique1=1512i,unique2=9781i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=512i,twothousand=1512i,fivethous=1512i,tenthous=1512i,odd=24i,even=25i,stringu1="EGAAAA",stringu2="FMOAAA",string4="HHHHxx" 845164800000000000 +tenk unique1=8960i,unique2=9782i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=960i,twothousand=960i,fivethous=3960i,tenthous=8960i,odd=120i,even=121i,stringu1="QGAAAA",stringu2="GMOAAA",string4="OOOOxx" 845251200000000000 +tenk unique1=6602i,unique2=9783i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=602i,twothousand=602i,fivethous=1602i,tenthous=6602i,odd=4i,even=5i,stringu1="YTAAAA",stringu2="HMOAAA",string4="VVVVxx" 845337600000000000 +tenk unique1=593i,unique2=9784i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=593i,twothousand=593i,fivethous=593i,tenthous=593i,odd=186i,even=187i,stringu1="VWAAAA",stringu2="IMOAAA",string4="AAAAxx" 845424000000000000 +tenk unique1=2353i,unique2=9785i,two=1i,four=1i,ten=3i,twenty=13i,hundred=53i,thousand=353i,twothousand=353i,fivethous=2353i,tenthous=2353i,odd=106i,even=107i,stringu1="NMAAAA",stringu2="JMOAAA",string4="HHHHxx" 845510400000000000 +tenk unique1=4139i,unique2=9786i,two=1i,four=3i,ten=9i,twenty=19i,hundred=39i,thousand=139i,twothousand=139i,fivethous=4139i,tenthous=4139i,odd=78i,even=79i,stringu1="FDAAAA",stringu2="KMOAAA",string4="OOOOxx" 845596800000000000 +tenk unique1=3063i,unique2=9787i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=63i,twothousand=1063i,fivethous=3063i,tenthous=3063i,odd=126i,even=127i,stringu1="VNAAAA",stringu2="LMOAAA",string4="VVVVxx" 845683200000000000 +tenk unique1=652i,unique2=9788i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=652i,twothousand=652i,fivethous=652i,tenthous=652i,odd=104i,even=105i,stringu1="CZAAAA",stringu2="MMOAAA",string4="AAAAxx" 845769600000000000 +tenk unique1=7405i,unique2=9789i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=405i,twothousand=1405i,fivethous=2405i,tenthous=7405i,odd=10i,even=11i,stringu1="VYAAAA",stringu2="NMOAAA",string4="HHHHxx" 845856000000000000 +tenk unique1=3034i,unique2=9790i,two=0i,four=2i,ten=4i,twenty=14i,hundred=34i,thousand=34i,twothousand=1034i,fivethous=3034i,tenthous=3034i,odd=68i,even=69i,stringu1="SMAAAA",stringu2="OMOAAA",string4="OOOOxx" 845942400000000000 +tenk unique1=4614i,unique2=9791i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=614i,twothousand=614i,fivethous=4614i,tenthous=4614i,odd=28i,even=29i,stringu1="MVAAAA",stringu2="PMOAAA",string4="VVVVxx" 846028800000000000 +tenk unique1=2351i,unique2=9792i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=351i,twothousand=351i,fivethous=2351i,tenthous=2351i,odd=102i,even=103i,stringu1="LMAAAA",stringu2="QMOAAA",string4="AAAAxx" 846115200000000000 +tenk unique1=8208i,unique2=9793i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=208i,twothousand=208i,fivethous=3208i,tenthous=8208i,odd=16i,even=17i,stringu1="SDAAAA",stringu2="RMOAAA",string4="HHHHxx" 846201600000000000 +tenk unique1=5475i,unique2=9794i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=475i,twothousand=1475i,fivethous=475i,tenthous=5475i,odd=150i,even=151i,stringu1="PCAAAA",stringu2="SMOAAA",string4="OOOOxx" 846288000000000000 +tenk unique1=6875i,unique2=9795i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=875i,twothousand=875i,fivethous=1875i,tenthous=6875i,odd=150i,even=151i,stringu1="LEAAAA",stringu2="TMOAAA",string4="VVVVxx" 846374400000000000 +tenk unique1=563i,unique2=9796i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=563i,twothousand=563i,fivethous=563i,tenthous=563i,odd=126i,even=127i,stringu1="RVAAAA",stringu2="UMOAAA",string4="AAAAxx" 846460800000000000 +tenk unique1=3346i,unique2=9797i,two=0i,four=2i,ten=6i,twenty=6i,hundred=46i,thousand=346i,twothousand=1346i,fivethous=3346i,tenthous=3346i,odd=92i,even=93i,stringu1="SYAAAA",stringu2="VMOAAA",string4="HHHHxx" 846547200000000000 +tenk unique1=291i,unique2=9798i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=291i,twothousand=291i,fivethous=291i,tenthous=291i,odd=182i,even=183i,stringu1="FLAAAA",stringu2="WMOAAA",string4="OOOOxx" 846633600000000000 +tenk unique1=6345i,unique2=9799i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=345i,twothousand=345i,fivethous=1345i,tenthous=6345i,odd=90i,even=91i,stringu1="BKAAAA",stringu2="XMOAAA",string4="VVVVxx" 846720000000000000 +tenk unique1=8099i,unique2=9800i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=99i,twothousand=99i,fivethous=3099i,tenthous=8099i,odd=198i,even=199i,stringu1="NZAAAA",stringu2="YMOAAA",string4="AAAAxx" 846806400000000000 +tenk unique1=2078i,unique2=9801i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=78i,twothousand=78i,fivethous=2078i,tenthous=2078i,odd=156i,even=157i,stringu1="YBAAAA",stringu2="ZMOAAA",string4="HHHHxx" 846892800000000000 +tenk unique1=8238i,unique2=9802i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=238i,twothousand=238i,fivethous=3238i,tenthous=8238i,odd=76i,even=77i,stringu1="WEAAAA",stringu2="ANOAAA",string4="OOOOxx" 846979200000000000 +tenk unique1=4482i,unique2=9803i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=482i,twothousand=482i,fivethous=4482i,tenthous=4482i,odd=164i,even=165i,stringu1="KQAAAA",stringu2="BNOAAA",string4="VVVVxx" 847065600000000000 +tenk unique1=716i,unique2=9804i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=716i,twothousand=716i,fivethous=716i,tenthous=716i,odd=32i,even=33i,stringu1="OBAAAA",stringu2="CNOAAA",string4="AAAAxx" 847152000000000000 +tenk unique1=7288i,unique2=9805i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=288i,twothousand=1288i,fivethous=2288i,tenthous=7288i,odd=176i,even=177i,stringu1="IUAAAA",stringu2="DNOAAA",string4="HHHHxx" 847238400000000000 +tenk unique1=5906i,unique2=9806i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=906i,twothousand=1906i,fivethous=906i,tenthous=5906i,odd=12i,even=13i,stringu1="ETAAAA",stringu2="ENOAAA",string4="OOOOxx" 847324800000000000 +tenk unique1=5618i,unique2=9807i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=618i,twothousand=1618i,fivethous=618i,tenthous=5618i,odd=36i,even=37i,stringu1="CIAAAA",stringu2="FNOAAA",string4="VVVVxx" 847411200000000000 +tenk unique1=1141i,unique2=9808i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=141i,twothousand=1141i,fivethous=1141i,tenthous=1141i,odd=82i,even=83i,stringu1="XRAAAA",stringu2="GNOAAA",string4="AAAAxx" 847497600000000000 +tenk unique1=8231i,unique2=9809i,two=1i,four=3i,ten=1i,twenty=11i,hundred=31i,thousand=231i,twothousand=231i,fivethous=3231i,tenthous=8231i,odd=62i,even=63i,stringu1="PEAAAA",stringu2="HNOAAA",string4="HHHHxx" 847584000000000000 +tenk unique1=3713i,unique2=9810i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=713i,twothousand=1713i,fivethous=3713i,tenthous=3713i,odd=26i,even=27i,stringu1="VMAAAA",stringu2="INOAAA",string4="OOOOxx" 847670400000000000 +tenk unique1=9158i,unique2=9811i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=158i,twothousand=1158i,fivethous=4158i,tenthous=9158i,odd=116i,even=117i,stringu1="GOAAAA",stringu2="JNOAAA",string4="VVVVxx" 847756800000000000 +tenk unique1=4051i,unique2=9812i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=51i,twothousand=51i,fivethous=4051i,tenthous=4051i,odd=102i,even=103i,stringu1="VZAAAA",stringu2="KNOAAA",string4="AAAAxx" 847843200000000000 +tenk unique1=1973i,unique2=9813i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=973i,twothousand=1973i,fivethous=1973i,tenthous=1973i,odd=146i,even=147i,stringu1="XXAAAA",stringu2="LNOAAA",string4="HHHHxx" 847929600000000000 +tenk unique1=6710i,unique2=9814i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=710i,twothousand=710i,fivethous=1710i,tenthous=6710i,odd=20i,even=21i,stringu1="CYAAAA",stringu2="MNOAAA",string4="OOOOxx" 848016000000000000 +tenk unique1=1021i,unique2=9815i,two=1i,four=1i,ten=1i,twenty=1i,hundred=21i,thousand=21i,twothousand=1021i,fivethous=1021i,tenthous=1021i,odd=42i,even=43i,stringu1="HNAAAA",stringu2="NNOAAA",string4="VVVVxx" 848102400000000000 +tenk unique1=2196i,unique2=9816i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=196i,twothousand=196i,fivethous=2196i,tenthous=2196i,odd=192i,even=193i,stringu1="MGAAAA",stringu2="ONOAAA",string4="AAAAxx" 848188800000000000 +tenk unique1=8335i,unique2=9817i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=335i,twothousand=335i,fivethous=3335i,tenthous=8335i,odd=70i,even=71i,stringu1="PIAAAA",stringu2="PNOAAA",string4="HHHHxx" 848275200000000000 +tenk unique1=2272i,unique2=9818i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=272i,twothousand=272i,fivethous=2272i,tenthous=2272i,odd=144i,even=145i,stringu1="KJAAAA",stringu2="QNOAAA",string4="OOOOxx" 848361600000000000 +tenk unique1=3818i,unique2=9819i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=818i,twothousand=1818i,fivethous=3818i,tenthous=3818i,odd=36i,even=37i,stringu1="WQAAAA",stringu2="RNOAAA",string4="VVVVxx" 848448000000000000 +tenk unique1=679i,unique2=9820i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=679i,twothousand=679i,fivethous=679i,tenthous=679i,odd=158i,even=159i,stringu1="DAAAAA",stringu2="SNOAAA",string4="AAAAxx" 848534400000000000 +tenk unique1=7512i,unique2=9821i,two=0i,four=0i,ten=2i,twenty=12i,hundred=12i,thousand=512i,twothousand=1512i,fivethous=2512i,tenthous=7512i,odd=24i,even=25i,stringu1="YCAAAA",stringu2="TNOAAA",string4="HHHHxx" 848620800000000000 +tenk unique1=493i,unique2=9822i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=493i,twothousand=493i,fivethous=493i,tenthous=493i,odd=186i,even=187i,stringu1="ZSAAAA",stringu2="UNOAAA",string4="OOOOxx" 848707200000000000 +tenk unique1=5663i,unique2=9823i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=663i,twothousand=1663i,fivethous=663i,tenthous=5663i,odd=126i,even=127i,stringu1="VJAAAA",stringu2="VNOAAA",string4="VVVVxx" 848793600000000000 +tenk unique1=4655i,unique2=9824i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=655i,twothousand=655i,fivethous=4655i,tenthous=4655i,odd=110i,even=111i,stringu1="BXAAAA",stringu2="WNOAAA",string4="AAAAxx" 848880000000000000 +tenk unique1=3996i,unique2=9825i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=996i,twothousand=1996i,fivethous=3996i,tenthous=3996i,odd=192i,even=193i,stringu1="SXAAAA",stringu2="XNOAAA",string4="HHHHxx" 848966400000000000 +tenk unique1=8797i,unique2=9826i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=797i,twothousand=797i,fivethous=3797i,tenthous=8797i,odd=194i,even=195i,stringu1="JAAAAA",stringu2="YNOAAA",string4="OOOOxx" 849052800000000000 +tenk unique1=2991i,unique2=9827i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=991i,twothousand=991i,fivethous=2991i,tenthous=2991i,odd=182i,even=183i,stringu1="BLAAAA",stringu2="ZNOAAA",string4="VVVVxx" 849139200000000000 +tenk unique1=7038i,unique2=9828i,two=0i,four=2i,ten=8i,twenty=18i,hundred=38i,thousand=38i,twothousand=1038i,fivethous=2038i,tenthous=7038i,odd=76i,even=77i,stringu1="SKAAAA",stringu2="AOOAAA",string4="AAAAxx" 849225600000000000 +tenk unique1=4174i,unique2=9829i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=174i,twothousand=174i,fivethous=4174i,tenthous=4174i,odd=148i,even=149i,stringu1="OEAAAA",stringu2="BOOAAA",string4="HHHHxx" 849312000000000000 +tenk unique1=6908i,unique2=9830i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=908i,twothousand=908i,fivethous=1908i,tenthous=6908i,odd=16i,even=17i,stringu1="SFAAAA",stringu2="COOAAA",string4="OOOOxx" 849398400000000000 +tenk unique1=8477i,unique2=9831i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=477i,twothousand=477i,fivethous=3477i,tenthous=8477i,odd=154i,even=155i,stringu1="BOAAAA",stringu2="DOOAAA",string4="VVVVxx" 849484800000000000 +tenk unique1=3576i,unique2=9832i,two=0i,four=0i,ten=6i,twenty=16i,hundred=76i,thousand=576i,twothousand=1576i,fivethous=3576i,tenthous=3576i,odd=152i,even=153i,stringu1="OHAAAA",stringu2="EOOAAA",string4="AAAAxx" 849571200000000000 +tenk unique1=2685i,unique2=9833i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=685i,twothousand=685i,fivethous=2685i,tenthous=2685i,odd=170i,even=171i,stringu1="HZAAAA",stringu2="FOOAAA",string4="HHHHxx" 849657600000000000 +tenk unique1=9161i,unique2=9834i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=161i,twothousand=1161i,fivethous=4161i,tenthous=9161i,odd=122i,even=123i,stringu1="JOAAAA",stringu2="GOOAAA",string4="OOOOxx" 849744000000000000 +tenk unique1=2951i,unique2=9835i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=951i,twothousand=951i,fivethous=2951i,tenthous=2951i,odd=102i,even=103i,stringu1="NJAAAA",stringu2="HOOAAA",string4="VVVVxx" 849830400000000000 +tenk unique1=8362i,unique2=9836i,two=0i,four=2i,ten=2i,twenty=2i,hundred=62i,thousand=362i,twothousand=362i,fivethous=3362i,tenthous=8362i,odd=124i,even=125i,stringu1="QJAAAA",stringu2="IOOAAA",string4="AAAAxx" 849916800000000000 +tenk unique1=2379i,unique2=9837i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=379i,twothousand=379i,fivethous=2379i,tenthous=2379i,odd=158i,even=159i,stringu1="NNAAAA",stringu2="JOOAAA",string4="HHHHxx" 850003200000000000 +tenk unique1=1277i,unique2=9838i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=277i,twothousand=1277i,fivethous=1277i,tenthous=1277i,odd=154i,even=155i,stringu1="DXAAAA",stringu2="KOOAAA",string4="OOOOxx" 850089600000000000 +tenk unique1=1728i,unique2=9839i,two=0i,four=0i,ten=8i,twenty=8i,hundred=28i,thousand=728i,twothousand=1728i,fivethous=1728i,tenthous=1728i,odd=56i,even=57i,stringu1="MOAAAA",stringu2="LOOAAA",string4="VVVVxx" 850176000000000000 +tenk unique1=9816i,unique2=9840i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=816i,twothousand=1816i,fivethous=4816i,tenthous=9816i,odd=32i,even=33i,stringu1="ONAAAA",stringu2="MOOAAA",string4="AAAAxx" 850262400000000000 +tenk unique1=6288i,unique2=9841i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=288i,twothousand=288i,fivethous=1288i,tenthous=6288i,odd=176i,even=177i,stringu1="WHAAAA",stringu2="NOOAAA",string4="HHHHxx" 850348800000000000 +tenk unique1=8985i,unique2=9842i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=985i,twothousand=985i,fivethous=3985i,tenthous=8985i,odd=170i,even=171i,stringu1="PHAAAA",stringu2="OOOAAA",string4="OOOOxx" 850435200000000000 +tenk unique1=771i,unique2=9843i,two=1i,four=3i,ten=1i,twenty=11i,hundred=71i,thousand=771i,twothousand=771i,fivethous=771i,tenthous=771i,odd=142i,even=143i,stringu1="RDAAAA",stringu2="POOAAA",string4="VVVVxx" 850521600000000000 +tenk unique1=464i,unique2=9844i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=464i,twothousand=464i,fivethous=464i,tenthous=464i,odd=128i,even=129i,stringu1="WRAAAA",stringu2="QOOAAA",string4="AAAAxx" 850608000000000000 +tenk unique1=9625i,unique2=9845i,two=1i,four=1i,ten=5i,twenty=5i,hundred=25i,thousand=625i,twothousand=1625i,fivethous=4625i,tenthous=9625i,odd=50i,even=51i,stringu1="FGAAAA",stringu2="ROOAAA",string4="HHHHxx" 850694400000000000 +tenk unique1=9608i,unique2=9846i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=608i,twothousand=1608i,fivethous=4608i,tenthous=9608i,odd=16i,even=17i,stringu1="OFAAAA",stringu2="SOOAAA",string4="OOOOxx" 850780800000000000 +tenk unique1=9170i,unique2=9847i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=170i,twothousand=1170i,fivethous=4170i,tenthous=9170i,odd=140i,even=141i,stringu1="SOAAAA",stringu2="TOOAAA",string4="VVVVxx" 850867200000000000 +tenk unique1=9658i,unique2=9848i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=658i,twothousand=1658i,fivethous=4658i,tenthous=9658i,odd=116i,even=117i,stringu1="MHAAAA",stringu2="UOOAAA",string4="AAAAxx" 850953600000000000 +tenk unique1=7515i,unique2=9849i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=515i,twothousand=1515i,fivethous=2515i,tenthous=7515i,odd=30i,even=31i,stringu1="BDAAAA",stringu2="VOOAAA",string4="HHHHxx" 851040000000000000 +tenk unique1=9400i,unique2=9850i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=400i,twothousand=1400i,fivethous=4400i,tenthous=9400i,odd=0i,even=1i,stringu1="OXAAAA",stringu2="WOOAAA",string4="OOOOxx" 851126400000000000 +tenk unique1=2045i,unique2=9851i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=45i,twothousand=45i,fivethous=2045i,tenthous=2045i,odd=90i,even=91i,stringu1="RAAAAA",stringu2="XOOAAA",string4="VVVVxx" 851212800000000000 +tenk unique1=324i,unique2=9852i,two=0i,four=0i,ten=4i,twenty=4i,hundred=24i,thousand=324i,twothousand=324i,fivethous=324i,tenthous=324i,odd=48i,even=49i,stringu1="MMAAAA",stringu2="YOOAAA",string4="AAAAxx" 851299200000000000 +tenk unique1=4252i,unique2=9853i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=252i,twothousand=252i,fivethous=4252i,tenthous=4252i,odd=104i,even=105i,stringu1="OHAAAA",stringu2="ZOOAAA",string4="HHHHxx" 851385600000000000 +tenk unique1=8329i,unique2=9854i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=329i,twothousand=329i,fivethous=3329i,tenthous=8329i,odd=58i,even=59i,stringu1="JIAAAA",stringu2="APOAAA",string4="OOOOxx" 851472000000000000 +tenk unique1=4472i,unique2=9855i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=472i,twothousand=472i,fivethous=4472i,tenthous=4472i,odd=144i,even=145i,stringu1="AQAAAA",stringu2="BPOAAA",string4="VVVVxx" 851558400000000000 +tenk unique1=1047i,unique2=9856i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=47i,twothousand=1047i,fivethous=1047i,tenthous=1047i,odd=94i,even=95i,stringu1="HOAAAA",stringu2="CPOAAA",string4="AAAAxx" 851644800000000000 +tenk unique1=9341i,unique2=9857i,two=1i,four=1i,ten=1i,twenty=1i,hundred=41i,thousand=341i,twothousand=1341i,fivethous=4341i,tenthous=9341i,odd=82i,even=83i,stringu1="HVAAAA",stringu2="DPOAAA",string4="HHHHxx" 851731200000000000 +tenk unique1=7000i,unique2=9858i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=1000i,fivethous=2000i,tenthous=7000i,odd=0i,even=1i,stringu1="GJAAAA",stringu2="EPOAAA",string4="OOOOxx" 851817600000000000 +tenk unique1=1429i,unique2=9859i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=429i,twothousand=1429i,fivethous=1429i,tenthous=1429i,odd=58i,even=59i,stringu1="ZCAAAA",stringu2="FPOAAA",string4="VVVVxx" 851904000000000000 +tenk unique1=2701i,unique2=9860i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=701i,twothousand=701i,fivethous=2701i,tenthous=2701i,odd=2i,even=3i,stringu1="XZAAAA",stringu2="GPOAAA",string4="AAAAxx" 851990400000000000 +tenk unique1=6630i,unique2=9861i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=630i,twothousand=630i,fivethous=1630i,tenthous=6630i,odd=60i,even=61i,stringu1="AVAAAA",stringu2="HPOAAA",string4="HHHHxx" 852076800000000000 +tenk unique1=3669i,unique2=9862i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=669i,twothousand=1669i,fivethous=3669i,tenthous=3669i,odd=138i,even=139i,stringu1="DLAAAA",stringu2="IPOAAA",string4="OOOOxx" 852163200000000000 +tenk unique1=8613i,unique2=9863i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=613i,twothousand=613i,fivethous=3613i,tenthous=8613i,odd=26i,even=27i,stringu1="HTAAAA",stringu2="JPOAAA",string4="VVVVxx" 852249600000000000 +tenk unique1=7080i,unique2=9864i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=80i,twothousand=1080i,fivethous=2080i,tenthous=7080i,odd=160i,even=161i,stringu1="IMAAAA",stringu2="KPOAAA",string4="AAAAxx" 852336000000000000 +tenk unique1=8788i,unique2=9865i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=788i,twothousand=788i,fivethous=3788i,tenthous=8788i,odd=176i,even=177i,stringu1="AAAAAA",stringu2="LPOAAA",string4="HHHHxx" 852422400000000000 +tenk unique1=6291i,unique2=9866i,two=1i,four=3i,ten=1i,twenty=11i,hundred=91i,thousand=291i,twothousand=291i,fivethous=1291i,tenthous=6291i,odd=182i,even=183i,stringu1="ZHAAAA",stringu2="MPOAAA",string4="OOOOxx" 852508800000000000 +tenk unique1=7885i,unique2=9867i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=885i,twothousand=1885i,fivethous=2885i,tenthous=7885i,odd=170i,even=171i,stringu1="HRAAAA",stringu2="NPOAAA",string4="VVVVxx" 852595200000000000 +tenk unique1=7160i,unique2=9868i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=160i,twothousand=1160i,fivethous=2160i,tenthous=7160i,odd=120i,even=121i,stringu1="KPAAAA",stringu2="OPOAAA",string4="AAAAxx" 852681600000000000 +tenk unique1=6140i,unique2=9869i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=140i,twothousand=140i,fivethous=1140i,tenthous=6140i,odd=80i,even=81i,stringu1="ECAAAA",stringu2="PPOAAA",string4="HHHHxx" 852768000000000000 +tenk unique1=9881i,unique2=9870i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=881i,twothousand=1881i,fivethous=4881i,tenthous=9881i,odd=162i,even=163i,stringu1="BQAAAA",stringu2="QPOAAA",string4="OOOOxx" 852854400000000000 +tenk unique1=9140i,unique2=9871i,two=0i,four=0i,ten=0i,twenty=0i,hundred=40i,thousand=140i,twothousand=1140i,fivethous=4140i,tenthous=9140i,odd=80i,even=81i,stringu1="ONAAAA",stringu2="RPOAAA",string4="VVVVxx" 852940800000000000 +tenk unique1=644i,unique2=9872i,two=0i,four=0i,ten=4i,twenty=4i,hundred=44i,thousand=644i,twothousand=644i,fivethous=644i,tenthous=644i,odd=88i,even=89i,stringu1="UYAAAA",stringu2="SPOAAA",string4="AAAAxx" 853027200000000000 +tenk unique1=3667i,unique2=9873i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=667i,twothousand=1667i,fivethous=3667i,tenthous=3667i,odd=134i,even=135i,stringu1="BLAAAA",stringu2="TPOAAA",string4="HHHHxx" 853113600000000000 +tenk unique1=2675i,unique2=9874i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=675i,twothousand=675i,fivethous=2675i,tenthous=2675i,odd=150i,even=151i,stringu1="XYAAAA",stringu2="UPOAAA",string4="OOOOxx" 853200000000000000 +tenk unique1=9492i,unique2=9875i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=492i,twothousand=1492i,fivethous=4492i,tenthous=9492i,odd=184i,even=185i,stringu1="CBAAAA",stringu2="VPOAAA",string4="VVVVxx" 853286400000000000 +tenk unique1=5004i,unique2=9876i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=4i,twothousand=1004i,fivethous=4i,tenthous=5004i,odd=8i,even=9i,stringu1="MKAAAA",stringu2="WPOAAA",string4="AAAAxx" 853372800000000000 +tenk unique1=9456i,unique2=9877i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=456i,twothousand=1456i,fivethous=4456i,tenthous=9456i,odd=112i,even=113i,stringu1="SZAAAA",stringu2="XPOAAA",string4="HHHHxx" 853459200000000000 +tenk unique1=8197i,unique2=9878i,two=1i,four=1i,ten=7i,twenty=17i,hundred=97i,thousand=197i,twothousand=197i,fivethous=3197i,tenthous=8197i,odd=194i,even=195i,stringu1="HDAAAA",stringu2="YPOAAA",string4="OOOOxx" 853545600000000000 +tenk unique1=2837i,unique2=9879i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=837i,twothousand=837i,fivethous=2837i,tenthous=2837i,odd=74i,even=75i,stringu1="DFAAAA",stringu2="ZPOAAA",string4="VVVVxx" 853632000000000000 +tenk unique1=127i,unique2=9880i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=127i,twothousand=127i,fivethous=127i,tenthous=127i,odd=54i,even=55i,stringu1="XEAAAA",stringu2="AQOAAA",string4="AAAAxx" 853718400000000000 +tenk unique1=9772i,unique2=9881i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=772i,twothousand=1772i,fivethous=4772i,tenthous=9772i,odd=144i,even=145i,stringu1="WLAAAA",stringu2="BQOAAA",string4="HHHHxx" 853804800000000000 +tenk unique1=5743i,unique2=9882i,two=1i,four=3i,ten=3i,twenty=3i,hundred=43i,thousand=743i,twothousand=1743i,fivethous=743i,tenthous=5743i,odd=86i,even=87i,stringu1="XMAAAA",stringu2="CQOAAA",string4="OOOOxx" 853891200000000000 +tenk unique1=2007i,unique2=9883i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=7i,twothousand=7i,fivethous=2007i,tenthous=2007i,odd=14i,even=15i,stringu1="FZAAAA",stringu2="DQOAAA",string4="VVVVxx" 853977600000000000 +tenk unique1=7586i,unique2=9884i,two=0i,four=2i,ten=6i,twenty=6i,hundred=86i,thousand=586i,twothousand=1586i,fivethous=2586i,tenthous=7586i,odd=172i,even=173i,stringu1="UFAAAA",stringu2="EQOAAA",string4="AAAAxx" 854064000000000000 +tenk unique1=45i,unique2=9885i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=45i,twothousand=45i,fivethous=45i,tenthous=45i,odd=90i,even=91i,stringu1="TBAAAA",stringu2="FQOAAA",string4="HHHHxx" 854150400000000000 +tenk unique1=6482i,unique2=9886i,two=0i,four=2i,ten=2i,twenty=2i,hundred=82i,thousand=482i,twothousand=482i,fivethous=1482i,tenthous=6482i,odd=164i,even=165i,stringu1="IPAAAA",stringu2="GQOAAA",string4="OOOOxx" 854236800000000000 +tenk unique1=4565i,unique2=9887i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=565i,twothousand=565i,fivethous=4565i,tenthous=4565i,odd=130i,even=131i,stringu1="PTAAAA",stringu2="HQOAAA",string4="VVVVxx" 854323200000000000 +tenk unique1=6975i,unique2=9888i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=975i,twothousand=975i,fivethous=1975i,tenthous=6975i,odd=150i,even=151i,stringu1="HIAAAA",stringu2="IQOAAA",string4="AAAAxx" 854409600000000000 +tenk unique1=7260i,unique2=9889i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=260i,twothousand=1260i,fivethous=2260i,tenthous=7260i,odd=120i,even=121i,stringu1="GTAAAA",stringu2="JQOAAA",string4="HHHHxx" 854496000000000000 +tenk unique1=2830i,unique2=9890i,two=0i,four=2i,ten=0i,twenty=10i,hundred=30i,thousand=830i,twothousand=830i,fivethous=2830i,tenthous=2830i,odd=60i,even=61i,stringu1="WEAAAA",stringu2="KQOAAA",string4="OOOOxx" 854582400000000000 +tenk unique1=9365i,unique2=9891i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=365i,twothousand=1365i,fivethous=4365i,tenthous=9365i,odd=130i,even=131i,stringu1="FWAAAA",stringu2="LQOAAA",string4="VVVVxx" 854668800000000000 +tenk unique1=8207i,unique2=9892i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=207i,twothousand=207i,fivethous=3207i,tenthous=8207i,odd=14i,even=15i,stringu1="RDAAAA",stringu2="MQOAAA",string4="AAAAxx" 854755200000000000 +tenk unique1=2506i,unique2=9893i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=506i,twothousand=506i,fivethous=2506i,tenthous=2506i,odd=12i,even=13i,stringu1="KSAAAA",stringu2="NQOAAA",string4="HHHHxx" 854841600000000000 +tenk unique1=8081i,unique2=9894i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=81i,twothousand=81i,fivethous=3081i,tenthous=8081i,odd=162i,even=163i,stringu1="VYAAAA",stringu2="OQOAAA",string4="OOOOxx" 854928000000000000 +tenk unique1=8678i,unique2=9895i,two=0i,four=2i,ten=8i,twenty=18i,hundred=78i,thousand=678i,twothousand=678i,fivethous=3678i,tenthous=8678i,odd=156i,even=157i,stringu1="UVAAAA",stringu2="PQOAAA",string4="VVVVxx" 855014400000000000 +tenk unique1=9932i,unique2=9896i,two=0i,four=0i,ten=2i,twenty=12i,hundred=32i,thousand=932i,twothousand=1932i,fivethous=4932i,tenthous=9932i,odd=64i,even=65i,stringu1="ASAAAA",stringu2="QQOAAA",string4="AAAAxx" 855100800000000000 +tenk unique1=447i,unique2=9897i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=447i,twothousand=447i,fivethous=447i,tenthous=447i,odd=94i,even=95i,stringu1="FRAAAA",stringu2="RQOAAA",string4="HHHHxx" 855187200000000000 +tenk unique1=9187i,unique2=9898i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=187i,twothousand=1187i,fivethous=4187i,tenthous=9187i,odd=174i,even=175i,stringu1="JPAAAA",stringu2="SQOAAA",string4="OOOOxx" 855273600000000000 +tenk unique1=89i,unique2=9899i,two=1i,four=1i,ten=9i,twenty=9i,hundred=89i,thousand=89i,twothousand=89i,fivethous=89i,tenthous=89i,odd=178i,even=179i,stringu1="LDAAAA",stringu2="TQOAAA",string4="VVVVxx" 855360000000000000 +tenk unique1=7027i,unique2=9900i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=27i,twothousand=1027i,fivethous=2027i,tenthous=7027i,odd=54i,even=55i,stringu1="HKAAAA",stringu2="UQOAAA",string4="AAAAxx" 855446400000000000 +tenk unique1=1536i,unique2=9901i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=536i,twothousand=1536i,fivethous=1536i,tenthous=1536i,odd=72i,even=73i,stringu1="CHAAAA",stringu2="VQOAAA",string4="HHHHxx" 855532800000000000 +tenk unique1=160i,unique2=9902i,two=0i,four=0i,ten=0i,twenty=0i,hundred=60i,thousand=160i,twothousand=160i,fivethous=160i,tenthous=160i,odd=120i,even=121i,stringu1="EGAAAA",stringu2="WQOAAA",string4="OOOOxx" 855619200000000000 +tenk unique1=7679i,unique2=9903i,two=1i,four=3i,ten=9i,twenty=19i,hundred=79i,thousand=679i,twothousand=1679i,fivethous=2679i,tenthous=7679i,odd=158i,even=159i,stringu1="JJAAAA",stringu2="XQOAAA",string4="VVVVxx" 855705600000000000 +tenk unique1=5973i,unique2=9904i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=973i,twothousand=1973i,fivethous=973i,tenthous=5973i,odd=146i,even=147i,stringu1="TVAAAA",stringu2="YQOAAA",string4="AAAAxx" 855792000000000000 +tenk unique1=4401i,unique2=9905i,two=1i,four=1i,ten=1i,twenty=1i,hundred=1i,thousand=401i,twothousand=401i,fivethous=4401i,tenthous=4401i,odd=2i,even=3i,stringu1="HNAAAA",stringu2="ZQOAAA",string4="HHHHxx" 855878400000000000 +tenk unique1=395i,unique2=9906i,two=1i,four=3i,ten=5i,twenty=15i,hundred=95i,thousand=395i,twothousand=395i,fivethous=395i,tenthous=395i,odd=190i,even=191i,stringu1="FPAAAA",stringu2="AROAAA",string4="OOOOxx" 855964800000000000 +tenk unique1=4904i,unique2=9907i,two=0i,four=0i,ten=4i,twenty=4i,hundred=4i,thousand=904i,twothousand=904i,fivethous=4904i,tenthous=4904i,odd=8i,even=9i,stringu1="QGAAAA",stringu2="BROAAA",string4="VVVVxx" 856051200000000000 +tenk unique1=2759i,unique2=9908i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=759i,twothousand=759i,fivethous=2759i,tenthous=2759i,odd=118i,even=119i,stringu1="DCAAAA",stringu2="CROAAA",string4="AAAAxx" 856137600000000000 +tenk unique1=8713i,unique2=9909i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=713i,twothousand=713i,fivethous=3713i,tenthous=8713i,odd=26i,even=27i,stringu1="DXAAAA",stringu2="DROAAA",string4="HHHHxx" 856224000000000000 +tenk unique1=3770i,unique2=9910i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=770i,twothousand=1770i,fivethous=3770i,tenthous=3770i,odd=140i,even=141i,stringu1="APAAAA",stringu2="EROAAA",string4="OOOOxx" 856310400000000000 +tenk unique1=8272i,unique2=9911i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=272i,twothousand=272i,fivethous=3272i,tenthous=8272i,odd=144i,even=145i,stringu1="EGAAAA",stringu2="FROAAA",string4="VVVVxx" 856396800000000000 +tenk unique1=5358i,unique2=9912i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=358i,twothousand=1358i,fivethous=358i,tenthous=5358i,odd=116i,even=117i,stringu1="CYAAAA",stringu2="GROAAA",string4="AAAAxx" 856483200000000000 +tenk unique1=9747i,unique2=9913i,two=1i,four=3i,ten=7i,twenty=7i,hundred=47i,thousand=747i,twothousand=1747i,fivethous=4747i,tenthous=9747i,odd=94i,even=95i,stringu1="XKAAAA",stringu2="HROAAA",string4="HHHHxx" 856569600000000000 +tenk unique1=1567i,unique2=9914i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=567i,twothousand=1567i,fivethous=1567i,tenthous=1567i,odd=134i,even=135i,stringu1="HIAAAA",stringu2="IROAAA",string4="OOOOxx" 856656000000000000 +tenk unique1=2136i,unique2=9915i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=136i,twothousand=136i,fivethous=2136i,tenthous=2136i,odd=72i,even=73i,stringu1="EEAAAA",stringu2="JROAAA",string4="VVVVxx" 856742400000000000 +tenk unique1=314i,unique2=9916i,two=0i,four=2i,ten=4i,twenty=14i,hundred=14i,thousand=314i,twothousand=314i,fivethous=314i,tenthous=314i,odd=28i,even=29i,stringu1="CMAAAA",stringu2="KROAAA",string4="AAAAxx" 856828800000000000 +tenk unique1=4583i,unique2=9917i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=583i,twothousand=583i,fivethous=4583i,tenthous=4583i,odd=166i,even=167i,stringu1="HUAAAA",stringu2="LROAAA",string4="HHHHxx" 856915200000000000 +tenk unique1=375i,unique2=9918i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=375i,twothousand=375i,fivethous=375i,tenthous=375i,odd=150i,even=151i,stringu1="LOAAAA",stringu2="MROAAA",string4="OOOOxx" 857001600000000000 +tenk unique1=5566i,unique2=9919i,two=0i,four=2i,ten=6i,twenty=6i,hundred=66i,thousand=566i,twothousand=1566i,fivethous=566i,tenthous=5566i,odd=132i,even=133i,stringu1="CGAAAA",stringu2="NROAAA",string4="VVVVxx" 857088000000000000 +tenk unique1=6865i,unique2=9920i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=865i,twothousand=865i,fivethous=1865i,tenthous=6865i,odd=130i,even=131i,stringu1="BEAAAA",stringu2="OROAAA",string4="AAAAxx" 857174400000000000 +tenk unique1=894i,unique2=9921i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=894i,twothousand=894i,fivethous=894i,tenthous=894i,odd=188i,even=189i,stringu1="KIAAAA",stringu2="PROAAA",string4="HHHHxx" 857260800000000000 +tenk unique1=5399i,unique2=9922i,two=1i,four=3i,ten=9i,twenty=19i,hundred=99i,thousand=399i,twothousand=1399i,fivethous=399i,tenthous=5399i,odd=198i,even=199i,stringu1="RZAAAA",stringu2="QROAAA",string4="OOOOxx" 857347200000000000 +tenk unique1=1385i,unique2=9923i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=385i,twothousand=1385i,fivethous=1385i,tenthous=1385i,odd=170i,even=171i,stringu1="HBAAAA",stringu2="RROAAA",string4="VVVVxx" 857433600000000000 +tenk unique1=2156i,unique2=9924i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=156i,twothousand=156i,fivethous=2156i,tenthous=2156i,odd=112i,even=113i,stringu1="YEAAAA",stringu2="SROAAA",string4="AAAAxx" 857520000000000000 +tenk unique1=9659i,unique2=9925i,two=1i,four=3i,ten=9i,twenty=19i,hundred=59i,thousand=659i,twothousand=1659i,fivethous=4659i,tenthous=9659i,odd=118i,even=119i,stringu1="NHAAAA",stringu2="TROAAA",string4="HHHHxx" 857606400000000000 +tenk unique1=477i,unique2=9926i,two=1i,four=1i,ten=7i,twenty=17i,hundred=77i,thousand=477i,twothousand=477i,fivethous=477i,tenthous=477i,odd=154i,even=155i,stringu1="JSAAAA",stringu2="UROAAA",string4="OOOOxx" 857692800000000000 +tenk unique1=8194i,unique2=9927i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=194i,twothousand=194i,fivethous=3194i,tenthous=8194i,odd=188i,even=189i,stringu1="EDAAAA",stringu2="VROAAA",string4="VVVVxx" 857779200000000000 +tenk unique1=3937i,unique2=9928i,two=1i,four=1i,ten=7i,twenty=17i,hundred=37i,thousand=937i,twothousand=1937i,fivethous=3937i,tenthous=3937i,odd=74i,even=75i,stringu1="LVAAAA",stringu2="WROAAA",string4="AAAAxx" 857865600000000000 +tenk unique1=3745i,unique2=9929i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=745i,twothousand=1745i,fivethous=3745i,tenthous=3745i,odd=90i,even=91i,stringu1="BOAAAA",stringu2="XROAAA",string4="HHHHxx" 857952000000000000 +tenk unique1=4096i,unique2=9930i,two=0i,four=0i,ten=6i,twenty=16i,hundred=96i,thousand=96i,twothousand=96i,fivethous=4096i,tenthous=4096i,odd=192i,even=193i,stringu1="OBAAAA",stringu2="YROAAA",string4="OOOOxx" 858038400000000000 +tenk unique1=5487i,unique2=9931i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=487i,twothousand=1487i,fivethous=487i,tenthous=5487i,odd=174i,even=175i,stringu1="BDAAAA",stringu2="ZROAAA",string4="VVVVxx" 858124800000000000 +tenk unique1=2475i,unique2=9932i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=475i,twothousand=475i,fivethous=2475i,tenthous=2475i,odd=150i,even=151i,stringu1="FRAAAA",stringu2="ASOAAA",string4="AAAAxx" 858211200000000000 +tenk unique1=6105i,unique2=9933i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=105i,twothousand=105i,fivethous=1105i,tenthous=6105i,odd=10i,even=11i,stringu1="VAAAAA",stringu2="BSOAAA",string4="HHHHxx" 858297600000000000 +tenk unique1=6036i,unique2=9934i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=36i,twothousand=36i,fivethous=1036i,tenthous=6036i,odd=72i,even=73i,stringu1="EYAAAA",stringu2="CSOAAA",string4="OOOOxx" 858384000000000000 +tenk unique1=1315i,unique2=9935i,two=1i,four=3i,ten=5i,twenty=15i,hundred=15i,thousand=315i,twothousand=1315i,fivethous=1315i,tenthous=1315i,odd=30i,even=31i,stringu1="PYAAAA",stringu2="DSOAAA",string4="VVVVxx" 858470400000000000 +tenk unique1=4473i,unique2=9936i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=473i,twothousand=473i,fivethous=4473i,tenthous=4473i,odd=146i,even=147i,stringu1="BQAAAA",stringu2="ESOAAA",string4="AAAAxx" 858556800000000000 +tenk unique1=4016i,unique2=9937i,two=0i,four=0i,ten=6i,twenty=16i,hundred=16i,thousand=16i,twothousand=16i,fivethous=4016i,tenthous=4016i,odd=32i,even=33i,stringu1="MYAAAA",stringu2="FSOAAA",string4="HHHHxx" 858643200000000000 +tenk unique1=8135i,unique2=9938i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=135i,twothousand=135i,fivethous=3135i,tenthous=8135i,odd=70i,even=71i,stringu1="XAAAAA",stringu2="GSOAAA",string4="OOOOxx" 858729600000000000 +tenk unique1=8892i,unique2=9939i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=892i,twothousand=892i,fivethous=3892i,tenthous=8892i,odd=184i,even=185i,stringu1="AEAAAA",stringu2="HSOAAA",string4="VVVVxx" 858816000000000000 +tenk unique1=4850i,unique2=9940i,two=0i,four=2i,ten=0i,twenty=10i,hundred=50i,thousand=850i,twothousand=850i,fivethous=4850i,tenthous=4850i,odd=100i,even=101i,stringu1="OEAAAA",stringu2="ISOAAA",string4="AAAAxx" 858902400000000000 +tenk unique1=2545i,unique2=9941i,two=1i,four=1i,ten=5i,twenty=5i,hundred=45i,thousand=545i,twothousand=545i,fivethous=2545i,tenthous=2545i,odd=90i,even=91i,stringu1="XTAAAA",stringu2="JSOAAA",string4="HHHHxx" 858988800000000000 +tenk unique1=3788i,unique2=9942i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=788i,twothousand=1788i,fivethous=3788i,tenthous=3788i,odd=176i,even=177i,stringu1="SPAAAA",stringu2="KSOAAA",string4="OOOOxx" 859075200000000000 +tenk unique1=1672i,unique2=9943i,two=0i,four=0i,ten=2i,twenty=12i,hundred=72i,thousand=672i,twothousand=1672i,fivethous=1672i,tenthous=1672i,odd=144i,even=145i,stringu1="IMAAAA",stringu2="LSOAAA",string4="VVVVxx" 859161600000000000 +tenk unique1=3664i,unique2=9944i,two=0i,four=0i,ten=4i,twenty=4i,hundred=64i,thousand=664i,twothousand=1664i,fivethous=3664i,tenthous=3664i,odd=128i,even=129i,stringu1="YKAAAA",stringu2="MSOAAA",string4="AAAAxx" 859248000000000000 +tenk unique1=3775i,unique2=9945i,two=1i,four=3i,ten=5i,twenty=15i,hundred=75i,thousand=775i,twothousand=1775i,fivethous=3775i,tenthous=3775i,odd=150i,even=151i,stringu1="FPAAAA",stringu2="NSOAAA",string4="HHHHxx" 859334400000000000 +tenk unique1=3103i,unique2=9946i,two=1i,four=3i,ten=3i,twenty=3i,hundred=3i,thousand=103i,twothousand=1103i,fivethous=3103i,tenthous=3103i,odd=6i,even=7i,stringu1="JPAAAA",stringu2="OSOAAA",string4="OOOOxx" 859420800000000000 +tenk unique1=9335i,unique2=9947i,two=1i,four=3i,ten=5i,twenty=15i,hundred=35i,thousand=335i,twothousand=1335i,fivethous=4335i,tenthous=9335i,odd=70i,even=71i,stringu1="BVAAAA",stringu2="PSOAAA",string4="VVVVxx" 859507200000000000 +tenk unique1=9200i,unique2=9948i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=200i,twothousand=1200i,fivethous=4200i,tenthous=9200i,odd=0i,even=1i,stringu1="WPAAAA",stringu2="QSOAAA",string4="AAAAxx" 859593600000000000 +tenk unique1=8665i,unique2=9949i,two=1i,four=1i,ten=5i,twenty=5i,hundred=65i,thousand=665i,twothousand=665i,fivethous=3665i,tenthous=8665i,odd=130i,even=131i,stringu1="HVAAAA",stringu2="RSOAAA",string4="HHHHxx" 859680000000000000 +tenk unique1=1356i,unique2=9950i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=356i,twothousand=1356i,fivethous=1356i,tenthous=1356i,odd=112i,even=113i,stringu1="EAAAAA",stringu2="SSOAAA",string4="OOOOxx" 859766400000000000 +tenk unique1=6118i,unique2=9951i,two=0i,four=2i,ten=8i,twenty=18i,hundred=18i,thousand=118i,twothousand=118i,fivethous=1118i,tenthous=6118i,odd=36i,even=37i,stringu1="IBAAAA",stringu2="TSOAAA",string4="VVVVxx" 859852800000000000 +tenk unique1=4605i,unique2=9952i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=605i,twothousand=605i,fivethous=4605i,tenthous=4605i,odd=10i,even=11i,stringu1="DVAAAA",stringu2="USOAAA",string4="AAAAxx" 859939200000000000 +tenk unique1=5651i,unique2=9953i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=651i,twothousand=1651i,fivethous=651i,tenthous=5651i,odd=102i,even=103i,stringu1="JJAAAA",stringu2="VSOAAA",string4="HHHHxx" 860025600000000000 +tenk unique1=9055i,unique2=9954i,two=1i,four=3i,ten=5i,twenty=15i,hundred=55i,thousand=55i,twothousand=1055i,fivethous=4055i,tenthous=9055i,odd=110i,even=111i,stringu1="HKAAAA",stringu2="WSOAAA",string4="OOOOxx" 860112000000000000 +tenk unique1=8461i,unique2=9955i,two=1i,four=1i,ten=1i,twenty=1i,hundred=61i,thousand=461i,twothousand=461i,fivethous=3461i,tenthous=8461i,odd=122i,even=123i,stringu1="LNAAAA",stringu2="XSOAAA",string4="VVVVxx" 860198400000000000 +tenk unique1=6107i,unique2=9956i,two=1i,four=3i,ten=7i,twenty=7i,hundred=7i,thousand=107i,twothousand=107i,fivethous=1107i,tenthous=6107i,odd=14i,even=15i,stringu1="XAAAAA",stringu2="YSOAAA",string4="AAAAxx" 860284800000000000 +tenk unique1=1967i,unique2=9957i,two=1i,four=3i,ten=7i,twenty=7i,hundred=67i,thousand=967i,twothousand=1967i,fivethous=1967i,tenthous=1967i,odd=134i,even=135i,stringu1="RXAAAA",stringu2="ZSOAAA",string4="HHHHxx" 860371200000000000 +tenk unique1=8910i,unique2=9958i,two=0i,four=2i,ten=0i,twenty=10i,hundred=10i,thousand=910i,twothousand=910i,fivethous=3910i,tenthous=8910i,odd=20i,even=21i,stringu1="SEAAAA",stringu2="ATOAAA",string4="OOOOxx" 860457600000000000 +tenk unique1=8257i,unique2=9959i,two=1i,four=1i,ten=7i,twenty=17i,hundred=57i,thousand=257i,twothousand=257i,fivethous=3257i,tenthous=8257i,odd=114i,even=115i,stringu1="PFAAAA",stringu2="BTOAAA",string4="VVVVxx" 860544000000000000 +tenk unique1=851i,unique2=9960i,two=1i,four=3i,ten=1i,twenty=11i,hundred=51i,thousand=851i,twothousand=851i,fivethous=851i,tenthous=851i,odd=102i,even=103i,stringu1="TGAAAA",stringu2="CTOAAA",string4="AAAAxx" 860630400000000000 +tenk unique1=7823i,unique2=9961i,two=1i,four=3i,ten=3i,twenty=3i,hundred=23i,thousand=823i,twothousand=1823i,fivethous=2823i,tenthous=7823i,odd=46i,even=47i,stringu1="XOAAAA",stringu2="DTOAAA",string4="HHHHxx" 860716800000000000 +tenk unique1=3208i,unique2=9962i,two=0i,four=0i,ten=8i,twenty=8i,hundred=8i,thousand=208i,twothousand=1208i,fivethous=3208i,tenthous=3208i,odd=16i,even=17i,stringu1="KTAAAA",stringu2="ETOAAA",string4="OOOOxx" 860803200000000000 +tenk unique1=856i,unique2=9963i,two=0i,four=0i,ten=6i,twenty=16i,hundred=56i,thousand=856i,twothousand=856i,fivethous=856i,tenthous=856i,odd=112i,even=113i,stringu1="YGAAAA",stringu2="FTOAAA",string4="VVVVxx" 860889600000000000 +tenk unique1=2654i,unique2=9964i,two=0i,four=2i,ten=4i,twenty=14i,hundred=54i,thousand=654i,twothousand=654i,fivethous=2654i,tenthous=2654i,odd=108i,even=109i,stringu1="CYAAAA",stringu2="GTOAAA",string4="AAAAxx" 860976000000000000 +tenk unique1=7185i,unique2=9965i,two=1i,four=1i,ten=5i,twenty=5i,hundred=85i,thousand=185i,twothousand=1185i,fivethous=2185i,tenthous=7185i,odd=170i,even=171i,stringu1="JQAAAA",stringu2="HTOAAA",string4="HHHHxx" 861062400000000000 +tenk unique1=309i,unique2=9966i,two=1i,four=1i,ten=9i,twenty=9i,hundred=9i,thousand=309i,twothousand=309i,fivethous=309i,tenthous=309i,odd=18i,even=19i,stringu1="XLAAAA",stringu2="ITOAAA",string4="OOOOxx" 861148800000000000 +tenk unique1=9752i,unique2=9967i,two=0i,four=0i,ten=2i,twenty=12i,hundred=52i,thousand=752i,twothousand=1752i,fivethous=4752i,tenthous=9752i,odd=104i,even=105i,stringu1="CLAAAA",stringu2="JTOAAA",string4="VVVVxx" 861235200000000000 +tenk unique1=6405i,unique2=9968i,two=1i,four=1i,ten=5i,twenty=5i,hundred=5i,thousand=405i,twothousand=405i,fivethous=1405i,tenthous=6405i,odd=10i,even=11i,stringu1="JMAAAA",stringu2="KTOAAA",string4="AAAAxx" 861321600000000000 +tenk unique1=6113i,unique2=9969i,two=1i,four=1i,ten=3i,twenty=13i,hundred=13i,thousand=113i,twothousand=113i,fivethous=1113i,tenthous=6113i,odd=26i,even=27i,stringu1="DBAAAA",stringu2="LTOAAA",string4="HHHHxx" 861408000000000000 +tenk unique1=9774i,unique2=9970i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=774i,twothousand=1774i,fivethous=4774i,tenthous=9774i,odd=148i,even=149i,stringu1="YLAAAA",stringu2="MTOAAA",string4="OOOOxx" 861494400000000000 +tenk unique1=1674i,unique2=9971i,two=0i,four=2i,ten=4i,twenty=14i,hundred=74i,thousand=674i,twothousand=1674i,fivethous=1674i,tenthous=1674i,odd=148i,even=149i,stringu1="KMAAAA",stringu2="NTOAAA",string4="VVVVxx" 861580800000000000 +tenk unique1=9602i,unique2=9972i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=602i,twothousand=1602i,fivethous=4602i,tenthous=9602i,odd=4i,even=5i,stringu1="IFAAAA",stringu2="OTOAAA",string4="AAAAxx" 861667200000000000 +tenk unique1=1363i,unique2=9973i,two=1i,four=3i,ten=3i,twenty=3i,hundred=63i,thousand=363i,twothousand=1363i,fivethous=1363i,tenthous=1363i,odd=126i,even=127i,stringu1="LAAAAA",stringu2="PTOAAA",string4="HHHHxx" 861753600000000000 +tenk unique1=6887i,unique2=9974i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=887i,twothousand=887i,fivethous=1887i,tenthous=6887i,odd=174i,even=175i,stringu1="XEAAAA",stringu2="QTOAAA",string4="OOOOxx" 861840000000000000 +tenk unique1=6170i,unique2=9975i,two=0i,four=2i,ten=0i,twenty=10i,hundred=70i,thousand=170i,twothousand=170i,fivethous=1170i,tenthous=6170i,odd=140i,even=141i,stringu1="IDAAAA",stringu2="RTOAAA",string4="VVVVxx" 861926400000000000 +tenk unique1=8888i,unique2=9976i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=888i,twothousand=888i,fivethous=3888i,tenthous=8888i,odd=176i,even=177i,stringu1="WDAAAA",stringu2="STOAAA",string4="AAAAxx" 862012800000000000 +tenk unique1=2981i,unique2=9977i,two=1i,four=1i,ten=1i,twenty=1i,hundred=81i,thousand=981i,twothousand=981i,fivethous=2981i,tenthous=2981i,odd=162i,even=163i,stringu1="RKAAAA",stringu2="TTOAAA",string4="HHHHxx" 862099200000000000 +tenk unique1=7369i,unique2=9978i,two=1i,four=1i,ten=9i,twenty=9i,hundred=69i,thousand=369i,twothousand=1369i,fivethous=2369i,tenthous=7369i,odd=138i,even=139i,stringu1="LXAAAA",stringu2="UTOAAA",string4="OOOOxx" 862185600000000000 +tenk unique1=6227i,unique2=9979i,two=1i,four=3i,ten=7i,twenty=7i,hundred=27i,thousand=227i,twothousand=227i,fivethous=1227i,tenthous=6227i,odd=54i,even=55i,stringu1="NFAAAA",stringu2="VTOAAA",string4="VVVVxx" 862272000000000000 +tenk unique1=8002i,unique2=9980i,two=0i,four=2i,ten=2i,twenty=2i,hundred=2i,thousand=2i,twothousand=2i,fivethous=3002i,tenthous=8002i,odd=4i,even=5i,stringu1="UVAAAA",stringu2="WTOAAA",string4="AAAAxx" 862358400000000000 +tenk unique1=4288i,unique2=9981i,two=0i,four=0i,ten=8i,twenty=8i,hundred=88i,thousand=288i,twothousand=288i,fivethous=4288i,tenthous=4288i,odd=176i,even=177i,stringu1="YIAAAA",stringu2="XTOAAA",string4="HHHHxx" 862444800000000000 +tenk unique1=5136i,unique2=9982i,two=0i,four=0i,ten=6i,twenty=16i,hundred=36i,thousand=136i,twothousand=1136i,fivethous=136i,tenthous=5136i,odd=72i,even=73i,stringu1="OPAAAA",stringu2="YTOAAA",string4="OOOOxx" 862531200000000000 +tenk unique1=1084i,unique2=9983i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=84i,twothousand=1084i,fivethous=1084i,tenthous=1084i,odd=168i,even=169i,stringu1="SPAAAA",stringu2="ZTOAAA",string4="VVVVxx" 862617600000000000 +tenk unique1=9117i,unique2=9984i,two=1i,four=1i,ten=7i,twenty=17i,hundred=17i,thousand=117i,twothousand=1117i,fivethous=4117i,tenthous=9117i,odd=34i,even=35i,stringu1="RMAAAA",stringu2="AUOAAA",string4="AAAAxx" 862704000000000000 +tenk unique1=2406i,unique2=9985i,two=0i,four=2i,ten=6i,twenty=6i,hundred=6i,thousand=406i,twothousand=406i,fivethous=2406i,tenthous=2406i,odd=12i,even=13i,stringu1="OOAAAA",stringu2="BUOAAA",string4="HHHHxx" 862790400000000000 +tenk unique1=1384i,unique2=9986i,two=0i,four=0i,ten=4i,twenty=4i,hundred=84i,thousand=384i,twothousand=1384i,fivethous=1384i,tenthous=1384i,odd=168i,even=169i,stringu1="GBAAAA",stringu2="CUOAAA",string4="OOOOxx" 862876800000000000 +tenk unique1=9194i,unique2=9987i,two=0i,four=2i,ten=4i,twenty=14i,hundred=94i,thousand=194i,twothousand=1194i,fivethous=4194i,tenthous=9194i,odd=188i,even=189i,stringu1="QPAAAA",stringu2="DUOAAA",string4="VVVVxx" 862963200000000000 +tenk unique1=858i,unique2=9988i,two=0i,four=2i,ten=8i,twenty=18i,hundred=58i,thousand=858i,twothousand=858i,fivethous=858i,tenthous=858i,odd=116i,even=117i,stringu1="AHAAAA",stringu2="EUOAAA",string4="AAAAxx" 863049600000000000 +tenk unique1=8592i,unique2=9989i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=592i,twothousand=592i,fivethous=3592i,tenthous=8592i,odd=184i,even=185i,stringu1="MSAAAA",stringu2="FUOAAA",string4="HHHHxx" 863136000000000000 +tenk unique1=4773i,unique2=9990i,two=1i,four=1i,ten=3i,twenty=13i,hundred=73i,thousand=773i,twothousand=773i,fivethous=4773i,tenthous=4773i,odd=146i,even=147i,stringu1="PBAAAA",stringu2="GUOAAA",string4="OOOOxx" 863222400000000000 +tenk unique1=4093i,unique2=9991i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=93i,twothousand=93i,fivethous=4093i,tenthous=4093i,odd=186i,even=187i,stringu1="LBAAAA",stringu2="HUOAAA",string4="VVVVxx" 863308800000000000 +tenk unique1=6587i,unique2=9992i,two=1i,four=3i,ten=7i,twenty=7i,hundred=87i,thousand=587i,twothousand=587i,fivethous=1587i,tenthous=6587i,odd=174i,even=175i,stringu1="JTAAAA",stringu2="IUOAAA",string4="AAAAxx" 863395200000000000 +tenk unique1=6093i,unique2=9993i,two=1i,four=1i,ten=3i,twenty=13i,hundred=93i,thousand=93i,twothousand=93i,fivethous=1093i,tenthous=6093i,odd=186i,even=187i,stringu1="JAAAAA",stringu2="JUOAAA",string4="HHHHxx" 863481600000000000 +tenk unique1=429i,unique2=9994i,two=1i,four=1i,ten=9i,twenty=9i,hundred=29i,thousand=429i,twothousand=429i,fivethous=429i,tenthous=429i,odd=58i,even=59i,stringu1="NQAAAA",stringu2="KUOAAA",string4="OOOOxx" 863568000000000000 +tenk unique1=5780i,unique2=9995i,two=0i,four=0i,ten=0i,twenty=0i,hundred=80i,thousand=780i,twothousand=1780i,fivethous=780i,tenthous=5780i,odd=160i,even=161i,stringu1="IOAAAA",stringu2="LUOAAA",string4="VVVVxx" 863654400000000000 +tenk unique1=1783i,unique2=9996i,two=1i,four=3i,ten=3i,twenty=3i,hundred=83i,thousand=783i,twothousand=1783i,fivethous=1783i,tenthous=1783i,odd=166i,even=167i,stringu1="PQAAAA",stringu2="MUOAAA",string4="AAAAxx" 863740800000000000 +tenk unique1=2992i,unique2=9997i,two=0i,four=0i,ten=2i,twenty=12i,hundred=92i,thousand=992i,twothousand=992i,fivethous=2992i,tenthous=2992i,odd=184i,even=185i,stringu1="CLAAAA",stringu2="NUOAAA",string4="HHHHxx" 863827200000000000 +tenk unique1=0i,unique2=9998i,two=0i,four=0i,ten=0i,twenty=0i,hundred=0i,thousand=0i,twothousand=0i,fivethous=0i,tenthous=0i,odd=0i,even=1i,stringu1="AAAAAA",stringu2="OUOAAA",string4="OOOOxx" 863913600000000000 +tenk unique1=2968i,unique2=9999i,two=0i,four=0i,ten=8i,twenty=8i,hundred=68i,thousand=968i,twothousand=968i,fivethous=2968i,tenthous=2968i,odd=136i,even=137i,stringu1="EKAAAA",stringu2="PUOAAA",string4="VVVVxx" 864000000000000000 diff --git a/option.c b/option.c index ae14a29..b2ab305 100644 --- a/option.c +++ b/option.c @@ -2,7 +2,7 @@ * * InfluxDB Foreign Data Wrapper for PostgreSQL * - * Portions Copyright (c) 2018-2021, TOSHIBA CORPORATION + * Portions Copyright (c) 2018, TOSHIBA CORPORATION * * IDENTIFICATION * option.c @@ -42,6 +42,10 @@ #include "optimizer/planmain.h" #include "utils/varlena.h" +#ifdef CXX_CLIENT +#include "query_cxx.h" +#endif + /* * Describes the valid options for objects that use this wrapper. */ @@ -60,6 +64,11 @@ static struct InfluxDBFdwOption valid_options[] = {"host", ForeignServerRelationId}, {"port", ForeignServerRelationId}, {"dbname", ForeignServerRelationId}, +#ifdef CXX_CLIENT + {"version", ForeignServerRelationId}, + {"retention_policy", ForeignServerRelationId}, + {"auth_token", UserMappingRelationId}, +#endif {"user", UserMappingRelationId}, {"password", UserMappingRelationId}, @@ -90,7 +99,7 @@ bool influxdb_is_valid_option(const char *option, Oid context); /* * Validate the generic options given to a FOREIGN DATA WRAPPER, SERVER, - * USER MAPPING or FOREIGN TABLE that uses file_fdw. + * USER MAPPING or FOREIGN TABLE that uses influxdb_fdw. * * Raise an ERROR if the option or its value is considered invalid. */ @@ -129,8 +138,10 @@ influxdb_fdw_validator(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_FDW_INVALID_OPTION_NAME), errmsg("invalid option \"%s\"", def->defname), - errhint("Valid options in this context are: %s", buf.len ? buf.data : "") - )); + buf.len > 0 + ? errhint("Valid options in this context are: %s", + buf.data) + : errhint("There are no valid options in this context."))); } /* @@ -159,6 +170,20 @@ influxdb_fdw_validator(PG_FUNCTION_ARGS) def->defname))); } #endif + +#ifdef CXX_CLIENT + if(strcmp(def->defname, "version") == 0) + { + int int_val; + + int_val = atoi(defGetString(def)); + + if(int_val != INFLUXDB_VERSION_1 && int_val !=INFLUXDB_VERSION_2) + ereport(ERROR, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("InfluxDB only support versions from v1.x to 2.x. \"%s\" must be 1 or 2.", def->defname))); + } +#endif } PG_RETURN_VOID(); } @@ -186,12 +211,12 @@ influxdb_is_valid_option(const char *option, Oid context) influxdb_opt * influxdb_get_options(Oid foreignoid) { - ForeignTable *f_table = NULL; - ForeignServer *f_server = NULL; - UserMapping *f_mapping; - List *options; - ListCell *lc; - influxdb_opt *opt; + ForeignTable *f_table = NULL; + ForeignServer *f_server = NULL; + UserMapping *f_mapping; + List *options; + ListCell *lc; + influxdb_opt *opt; opt = (influxdb_opt *) palloc(sizeof(influxdb_opt)); memset(opt, 0, sizeof(influxdb_opt)); @@ -250,14 +275,59 @@ influxdb_get_options(Oid foreignoid) if (strcmp(def->defname, "schemaless") == 0) opt->schemaless = defGetBoolean(def); + +#ifdef CXX_CLIENT + if (strcmp(def->defname, "auth_token") == 0) + opt->svr_token = defGetString(def); + + if (strcmp(def->defname, "version") == 0) + opt->svr_version = atoi(defGetString(def)); + + if (strcmp(def->defname, "retention_policy") == 0) + opt->svr_retention_policy = defGetString(def); +#endif } if (!opt->svr_table && f_table) opt->svr_table = get_rel_name(foreignoid); +#ifdef CXX_CLIENT + /* When using the influxdb-cxx API client, c++ not allow std::string(NULL). */ + if (opt->svr_address == NULL || strcmp(opt->svr_address, "") == 0) + elog(ERROR, "influxdb_fdw: Server Host not specified"); + + if (opt->svr_database == NULL || strcmp(opt->svr_database, "") == 0) + elog(ERROR, "influxdb_fdw: Database not specified"); + + if (opt->svr_username == NULL) + opt->svr_username = ""; + + if (opt->svr_password == NULL) + opt->svr_password = ""; + + if (opt->svr_token == NULL) + opt->svr_token = ""; + + if (opt->svr_retention_policy == NULL) + opt->svr_retention_policy = ""; +#endif + return opt; } +#ifdef CXX_CLIENT +/* + * Fetch the version options for a influxdb_fdw foreign table. + */ +int +influxdb_get_version_option(influxdb_opt *opt) +{ + /* determine which version is connected to */ + return check_connected_influxdb_version(opt->svr_address, opt->svr_port, opt->svr_username, opt->svr_password, opt->svr_database, + opt->svr_token, opt->svr_retention_policy); +} +#endif + /* * Parse a comma-separated string and return a list of tag keys of a foreign table. */ diff --git a/query.cpp b/query.cpp new file mode 100644 index 0000000..1a54cce --- /dev/null +++ b/query.cpp @@ -0,0 +1,515 @@ +/*------------------------------------------------------------------------- + * + * InfluxDB Foreign Data Wrapper for PostgreSQL + * + * Portions Copyright (c) 2022, TOSHIBA CORPORATION + * + * IDENTIFICATION + * query.cpp + * + *------------------------------------------------------------------------- + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "date/date.h" +#include "date/tz.h" +#include "connection.hpp" + +extern "C" +{ +#include "query_cxx.h" +} + +std::vector timestampFormats = +{ + "%FT%TZ", /* RFC3399: 1997-12-17T07:37:16Z */ + "%F %T", /* ISO: 1997-12-17 07:37:16 */ + "%m/%d/%Y %T %Z", /* SQL: 12/17/1997 07:37:16.00 PST8PDT */ + "%m/%d/%Y %T", /* SQL: 12/17/1997 07:37:16.00 */ + "%a %b %d %T %Y %Z", /* Postgres: Wed Dec 17 07:37:16 1997 PST8PDT */ + "%a %b %d %T %Y", /* Postgres: Wed Dec 17 07:37:16 1997 */ + "%m.%d.%Y %T %Z", /* German: 17.12.1997 07:37:16.00 PST8PDT */ + "%m.%d.%Y %T" /* German: 17.12.1997 07:37:16.00 */ +}; + +static size_t InfluxDBSeries_get_total_row(std::vector &series); + +std::chrono::system_clock::time_point parseTimeStamp(const std::string& value); + +/* + * InfluxDBSchemaInfo + * Returns information of table if success + */ +extern "C" struct InfluxDBSchemaInfo_return +InfluxDBSchemaInfo(UserMapping *user, influxdb_opt *opts) +{ + struct InfluxDBSchemaInfo_return res; + std::string query; + TableInfo *tables_info; + int table_idx; + size_t table_count; + char *db = opts->svr_database; + + try + { + auto influx = influxdb_get_connection(user, opts); + + query = "SHOW MEASUREMENTS ON " + std::string(db); + + auto measurements = influx->query(query).at(0); + + if (measurements.error.length() > 0) + elog(ERROR, "influxdb_fdw: %s",measurements.error.c_str()); + + table_count = InfluxDBSeries_get_total_row(measurements.series); + + if (table_count == 0) + elog(ERROR, "influxdb_fdw: No table in remote server"); + + tables_info = (TableInfo *) palloc0(sizeof(TableInfo) * table_count); + + table_idx = 0; + for (auto &measurements_series_iter: measurements.series) + { + for (auto &mesurements_row: measurements_series_iter.rows) + { + size_t tags_idx, field_idx; + + tables_info[table_idx].measurement = pstrdup(mesurements_row.tuple.at(0).c_str()); + + /* + * Get tagkeys for each foreign table + */ + query = "SHOW TAG KEYS ON " + std::string(db) + " FROM " + tables_info[table_idx].measurement; + auto tagkeys = influx->query(query).at(0); + if (tagkeys.error.length() > 0) + elog(ERROR, "influxdb_fdw: %s",tagkeys.error.c_str()); + + tables_info[table_idx].tag_len = InfluxDBSeries_get_total_row(tagkeys.series); + if (tables_info[table_idx].tag_len > 0) + { + tables_info[table_idx].tag = (char **) palloc0(sizeof(char *) * tables_info[table_idx].tag_len); + tags_idx = 0; + for (auto &tagkeys_series_iter: tagkeys.series) + { + for (auto &tagkeys_row: tagkeys_series_iter.rows) + { + tables_info[table_idx].tag[tags_idx] = pstrdup(tagkeys_row.tuple.at(0).c_str()); + tags_idx++; + } + } + } + + /* + * Get fieldkeys for each foreign table + */ + query = "SHOW FIELD KEYS ON " + std::string(db) + " FROM " + tables_info[table_idx].measurement; + auto fieldkeys = influx->query(query).at(0); + if (fieldkeys.error.length() > 0) + elog(ERROR, "influxdb_fdw: %s",fieldkeys.error.c_str()); + + tables_info[table_idx].field_len = InfluxDBSeries_get_total_row(fieldkeys.series); + tables_info[table_idx].field = (char **) palloc0(sizeof(char *) * tables_info[table_idx].field_len); + tables_info[table_idx].field_type = (char **) palloc0(sizeof(char *) * tables_info[table_idx].field_len); + field_idx = 0; + for (auto &fieldkeys_series_iter: fieldkeys.series) + { + for (auto &fieldkeys_row: fieldkeys_series_iter.rows) + { + tables_info[table_idx].field[field_idx] = pstrdup(fieldkeys_row.tuple.at(0).c_str()); + tables_info[table_idx].field_type[field_idx] = pstrdup(fieldkeys_row.tuple.at(1).c_str()); + field_idx++; + } + } + + table_idx++; + } + } + } + catch (const std::exception& e) + { + res.r2 = pstrdup(e.what()); + return res; + } + + /* return interface of go-client */ + res.r0 = tables_info; + res.r1 = table_count; + res.r2 = NULL; + + return res; +} + +/* + * InfluxDBFreeSchemaInfo + * Not implement but keep this interface for consistency with go client + */ +extern "C" void +InfluxDBFreeSchemaInfo(struct TableInfo* tableInfo, long long length) +{ + /* Not implement but keep this interface for consistency with go client */ +} + +/* + * bindParameter + * bind parameter to prepare for query exection + */ +static influxdb::InfluxDBParams +bindParameter(InfluxDBType *param_type, InfluxDBValue *param_val, int param_num) +{ + influxdb::InfluxDBParams params; + + if (param_num > 0) + { + for (int i = 0; i < param_num; i++) + { + /* Each placeholder is "$1", "$2",...,so set "1","2",... to map key */ + switch (param_type[i]) + { + case INFLUXDB_STRING: + params.addParam(std::to_string(i + 1), std::string(param_val[i].s)); + break; + case INFLUXDB_INT64: + case INFLUXDB_TIME: + params.addParam(std::to_string(i + 1), param_val[i].i); + break; + case INFLUXDB_BOOLEAN: + params.addParam(std::to_string(i + 1), (bool) param_val[i].b); + break; + case INFLUXDB_DOUBLE: + params.addParam(std::to_string(i + 1), param_val[i].d); + break; + case INFLUXDB_NULL: + params.addParam(std::to_string(i + 1), "\"\""); + break; + default: + elog(ERROR, "Unexpected type: %d", param_type[i]); + } + } + } + + return params; +} + +/* + * InfluxDBSeries_get_total_row + * Get total number of row in a series + */ +static size_t +InfluxDBSeries_get_total_row(std::vector &series) +{ + size_t res = 0; + + for (auto &serie: series) + { + res += serie.rows.size(); + } + + return res; +} + +/* + * InfluxDBSeries_to_InfluxDBResult + * Convert result from series to table format + */ +static struct InfluxDBResult * +InfluxDBSeries_to_InfluxDBResult(std::vector &series) +{ + size_t total_row = InfluxDBSeries_get_total_row(series); + size_t current_row_idx = 0; + struct InfluxDBResult *res = (struct InfluxDBResult *)palloc0(sizeof(struct InfluxDBResult)); + + if (series.size() < 1) + return res; + + /* get tags key from first serie only */ + res->ntag = series.at(0).tagKeys.size(); + if (res->ntag != 0) + { + res->tagkeys = (char **)palloc0(sizeof(char*) * res->ntag); + for (int i = 0; i < res->ntag; i++) + res->tagkeys[i] = pstrdup(series.at(0).tagKeys.at(i).c_str()); + } + + /* get column name from first serie only */ + res->ncol = series.at(0).columnNames.size() + res->ntag; + + res->columns = (char **)palloc0(sizeof(char *) * series.at(0).columnNames.size()); + for (size_t i = 0; i < series.at(0).columnNames.size(); i++) + res->columns[i] = pstrdup(series.at(0).columnNames.at(i).c_str()); + + res->nrow = total_row; + res->rows = (InfluxDBRow *)palloc0(sizeof(InfluxDBRow) * res->nrow); + + for (auto &serie: series) + { + for (auto &influx_row: serie.rows) + { + InfluxDBRow row; + size_t tuple_len = res->ncol; + + row.tuple = (char **)palloc0(sizeof(char *) * tuple_len); + for (size_t col_idx = 0; col_idx < serie.columnNames.size(); col_idx++) + { + if (influx_row.tuple.at(col_idx).length() > 0) + row.tuple[col_idx] = pstrdup(influx_row.tuple.at(col_idx).c_str()); + else + row.tuple[col_idx] = NULL; + } + + /* add tag value to tuple */ + for (size_t tag_idx = serie.columnNames.size(); tag_idx < tuple_len; tag_idx++) + { + std::string tag_value = serie.tagValues.at(tag_idx - serie.columnNames.size()); + + if (tag_value.length() > 0) + row.tuple[tag_idx] = pstrdup(tag_value.c_str()); + else + row.tuple[tag_idx] = NULL; + } + res->rows[current_row_idx++] = row; + } + } + + return res; +} + +/* + * InfluxDBQuery + * execute single InfluxQL query + */ +extern "C" struct InfluxDBQuery_return +InfluxDBQuery(char* cquery, UserMapping *user, influxdb_opt *opts, InfluxDBType* ctypes, InfluxDBValue* cvalues, int cparamNum) +{ + InfluxDBQuery_return *res = (InfluxDBQuery_return *) palloc0(sizeof(InfluxDBQuery_return)); + auto influx = influxdb_get_connection(user, opts); + auto params = bindParameter(ctypes, cvalues, cparamNum); + + try + { + auto result_set = influx->query(std::string(cquery), params); + + /* Use first statement result */ + if (result_set.size() > 0) + { + auto query_result = result_set.at(0); + if (query_result.error.length() > 0) + { + res->r1 = (char *) palloc0(sizeof(char) * (query_result.error.length()) + 1); + strcpy(res->r1, query_result.error.c_str()); + } + else + res->r0 = InfluxDBSeries_to_InfluxDBResult(query_result.series); + } + } + catch (const std::exception& e) + { + res->r1 = (char *) palloc0(sizeof(char) * (strlen(e.what()) + 1)); + strcpy(res->r1, e.what()); + } + + return *res; +} + +/* + * InfluxDBFreeResult + * InfluxDBFreeResult does not implement yet + */ +extern "C" void +InfluxDBFreeResult(InfluxDBResult* result) +{ + /* Not implement but keep this interface for consistency with go client */ +} + +/* + * getCurrentMicroSecond + * Get current timestamp with micro second precision + */ +static long long +getCurrentMicroSecond() +{ + auto now = std::chrono::high_resolution_clock::now(); + auto tp = std::chrono::time_point_cast(now); + auto epoch = tp.time_since_epoch(); + return std::chrono::duration_cast(epoch).count(); +} + +/* + * makeRecord + * Prepare record to insert + */ +static void +makeRecord(influxdb::Point& record, struct InfluxDBColumnInfo* pColInfo, InfluxDBType dataType, InfluxDBValue value) +{ + switch (dataType) + { + case INFLUXDB_INT64: + record.addField(pColInfo->column_name, value.i); + break; + case INFLUXDB_DOUBLE: + record.addField(pColInfo->column_name, value.d); + break; + case INFLUXDB_BOOLEAN: + record.addField(pColInfo->column_name, value.b == 0 ? false : true); + break; + case INFLUXDB_STRING: + { + switch (pColInfo->column_type) + { + case INFLUXDB_TIME_KEY: + { + /* time_text column */ + record.setTimestamp(parseTimeStamp(std::string{value.s})); + break; + } + case INFLUXDB_TAG_KEY: + record.addTag(pColInfo->column_name, value.s); + break; + case INFLUXDB_FIELD_KEY: + record.addField(pColInfo->column_name, std::string{value.s}); + break; + } + } + case INFLUXDB_NULL: + /* Do not need to append null value when execute INSERT */ + break; + case INFLUXDB_TIME: + record.setTimestamp(value.i); + break; + default: + elog(ERROR, "Unexpected type: %d", dataType); + } +} + +/* + * InfluxDBInsert + * Insert record to influxdb + */ +extern "C" char * +InfluxDBInsert(char *tablename, UserMapping *user, influxdb_opt *opts, struct InfluxDBColumnInfo* ccolumns, InfluxDBType* ctypes, InfluxDBValue* cvalues, int cparamNum, int cnumSlots) +{ + char* retMsg = NULL; + + /* Create a new HTTPClient */ + auto influxdb = influxdb_get_connection(user, opts); + try + { + influxdb->batchOf(cnumSlots); + /* Write batches of cnumSlots points */ + for (size_t idx = 0; idx < (size_t)cnumSlots; idx++) + { + influxdb::Point record(tablename); + + /* + * InfluxDB does not accept two points with the same timestamp value, + * so, wait a microsecond to ensure that all inserted points have different timestamps + */ + pg_usleep(1); + + /* set current time in micro second as default */ + record.setTimestamp(getCurrentMicroSecond() * 1000); + for (size_t pos = 0; pos < (size_t)cparamNum; pos++) + makeRecord(record, ccolumns + pos, ctypes[idx * cparamNum + pos], cvalues[idx * cparamNum + pos]); + influxdb->write(std::move(record)); + } + } + catch (const std::exception& e) + { + retMsg = (char *) palloc0(sizeof(char) * (strlen(e.what()) + 1)); + strcpy(retMsg, e.what()); + return retMsg; + } + influxdb->flushBatch(); + return retMsg; +} + +/* + * parseTimeStamp + * Parse timestamp string to nanosecond time_point + */ +std::chrono::system_clock::time_point parseTimeStamp(const std::string& value) +{ + std::string tzname; + date::local_time local_tp; + std::chrono::system_clock::time_point tp; + + for (auto &format: timestampFormats) + { + std::istringstream timeString{value}; + timeString >> date::parse(format, local_tp, tzname); + if (!timeString.fail() && timeString.peek() == EOF) + { + if (tzname.size() > 0) + tp = date::locate_zone(tzname)->to_sys(local_tp); + else + tp = std::chrono::system_clock::time_point(local_tp.time_since_epoch()); + return tp; + } + } + + { + /* parse ISO timestamp format: "%F %T%z", ISO: 1997-12-17 07:37:16-08 */ + std::istringstream timeString{value}; + timeString >> date::parse("%F %T%z", tp); + if (!timeString.fail() && timeString.peek() == EOF) + { + return tp; + } + } + + throw std::runtime_error("Unsupported timestamp format: " + value); +} + +/* If version not set, check to which version can be connected */ +extern "C" int +check_connected_influxdb_version(char* addr, int port, char* user, char* pass, char* db, char* auth_token, char* retention_policy) +{ + std::unique_ptr influx; + std::string query; + + query = "SHOW MEASUREMENTS ON " + std::string(db); + + influx = influxdb::InfluxDBFactory::GetV2(std::string(addr), port, std::string(db), std::string(auth_token), std::string(retention_policy)); + + try + { + auto measurements = influx->query(query); + return INFLUXDB_VERSION_2; + } + catch(const std::exception& e) + { + /* do nothing */ + } + + influx = influxdb::InfluxDBFactory::GetV1(std::string(addr), port, std::string(db), std::string(user), std::string(pass)); + + try + { + auto measurements = influx->query(query); + return INFLUXDB_VERSION_1; + } + catch(const std::exception& e) + { + elog(ERROR, "Could not connect to InfluxDB."); + } + + elog(ERROR, "Could not connect to InfluxDB."); +} + +/* + * Clean up all open cxx client connection. + * C interface wrapper function for influx_cleanup_connection in connection.cpp + */ +extern "C" void +cleanup_cxx_client_connection(void) +{ + influx_cleanup_connection(); +} diff --git a/query_cxx.h b/query_cxx.h new file mode 100644 index 0000000..b9f1b72 --- /dev/null +++ b/query_cxx.h @@ -0,0 +1,91 @@ +/*------------------------------------------------------------------------- + * + * InfluxDB Foreign Data Wrapper for PostgreSQL + * + * Portions Copyright (c) 2022, TOSHIBA CORPORATION + * + * IDENTIFICATION + * query_cxx.h + * C interface for query.cpp + * This file content is unified with obj/_cgo_export.h + * + *------------------------------------------------------------------------- + */ + +#ifndef QUERY_CXX_H +#define QUERY_CXX_H + +#include "postgres.h" +#include "influxdb_fdw.h" + +/* Represents information of data type */ +typedef enum InfluxDBType{ + INFLUXDB_INT64, + INFLUXDB_DOUBLE, + INFLUXDB_BOOLEAN, + INFLUXDB_STRING, + INFLUXDB_TIME, + INFLUXDB_NULL +} InfluxDBType; + +/* Represents information of values in influxdb */ +typedef union InfluxDBValue{ + long long int i; + double d; + int b; + char *s; +} InfluxDBValue; + +/* Represents schema of one measurement(table) */ +typedef struct TableInfo { + char *measurement; /* name */ + char **tag; /* array of tag name */ + char **field; /* array of field name */ + char **field_type; /* array of field type */ + int tag_len; /* the number of tags */ + int field_len; /* the number of fields */ +} TableInfo; + +/* Represents information of a row */ +typedef struct InfluxDBRow { + char **tuple; +} InfluxDBRow; + +/* Represents information of influxdb's result set */ +typedef struct InfluxDBResult { + InfluxDBRow *rows; + int ncol; + int nrow; + char **columns; + char **tagkeys; + int ntag; +} InfluxDBResult; + +/* Represents information of a table's column type */ +typedef enum InfluxDBColumnType{ + INFLUXDB_TIME_KEY, + INFLUXDB_TAG_KEY, + INFLUXDB_FIELD_KEY +} InfluxDBColumnType; + +/* Represents information of a table's column */ +typedef struct InfluxDBColumnInfo { + char *column_name; /* name of column */ + InfluxDBColumnType column_type; /* type of column */ +} InfluxDBColumnInfo; + + +/* Return type for InfluxDBSchemaInfo */ +struct InfluxDBSchemaInfo_return { + struct TableInfo* r0; /* retinfo */ + long long r1; /* length */ + char* r2; /* errret */ +}; + +/* Return type for InfluxDBQuery */ +struct InfluxDBQuery_return { + InfluxDBResult *r0; + char* r1; +}; + +#endif /* QUERY_CXX_H */ diff --git a/sql/11.13/schemaless/extra/join.sql b/sql/11.13/schemaless/extra/join.sql deleted file mode 100644 index 8f2859e..0000000 --- a/sql/11.13/schemaless/extra/join.sql +++ /dev/null @@ -1,2962 +0,0 @@ -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 1: -CREATE EXTENSION influxdb_fdw; - ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - --- import time column as timestamp and text type --- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; - --- --- JOIN --- Test JOIN clauses --- - ---Testcase 4: -CREATE FOREIGN TABLE J1_TBL ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE j1_tbl_nsc ( - i integer, - j integer, - t text -) SERVER influxdb_svr OPTIONS (table 'j1_tbl'); ---Testcase 5: -CREATE FOREIGN TABLE J2_TBL ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE j2_tbl_nsc ( - i integer, - k integer -) SERVER influxdb_svr OPTIONS (table 'j2_tbl'); ---Testcase 6: -INSERT INTO j1_tbl_nsc VALUES (1, 4, 'one'); ---Testcase 7: -INSERT INTO j1_tbl_nsc VALUES (2, 3, 'two'); ---Testcase 8: -INSERT INTO j1_tbl_nsc VALUES (3, 2, 'three'); ---Testcase 9: -INSERT INTO j1_tbl_nsc VALUES (4, 1, 'four'); ---Testcase 10: -INSERT INTO j1_tbl_nsc VALUES (5, 0, 'five'); ---Testcase 11: -INSERT INTO j1_tbl_nsc VALUES (6, 6, 'six'); ---Testcase 12: -INSERT INTO j1_tbl_nsc VALUES (7, 7, 'seven'); ---Testcase 13: -INSERT INTO j1_tbl_nsc VALUES (8, 8, 'eight'); ---Testcase 14: -INSERT INTO j1_tbl_nsc VALUES (0, NULL, 'zero'); ---Testcase 15: -INSERT INTO j1_tbl_nsc VALUES (NULL, NULL, 'null'); ---Testcase 16: -INSERT INTO j1_tbl_nsc VALUES (NULL, 0, 'zero'); ---Testcase 17: -INSERT INTO j2_tbl_nsc VALUES (1, -1); ---Testcase 18: -INSERT INTO j2_tbl_nsc VALUES (2, 2); ---Testcase 19: -INSERT INTO j2_tbl_nsc VALUES (3, -3); ---Testcase 20: -INSERT INTO j2_tbl_nsc VALUES (2, 4); ---Testcase 21: -INSERT INTO j2_tbl_nsc VALUES (5, -5); ---Testcase 22: -INSERT INTO j2_tbl_nsc VALUES (5, -5); ---Testcase 23: -INSERT INTO j2_tbl_nsc VALUES (0, NULL); ---InfluxDB does not accept NULL value ---INSERT INTO J2_TBL VALUES (NULL, NULL); ---Testcase 24: -INSERT INTO j2_tbl_nsc VALUES (NULL, 0); ---Testcase 25: -CREATE FOREIGN TABLE tenk1 ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); ---Does not support on Postgres 12 ---ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 26: -CREATE FOREIGN TABLE tenk2 ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); - ---Testcase 27: -CREATE FOREIGN TABLE INT4_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 28: -CREATE FOREIGN TABLE FLOAT8_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 29: -CREATE FOREIGN TABLE INT8_TBL( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 30: -CREATE FOREIGN TABLE INT2_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); - --- useful in some tests below ---Testcase 31: -create temp table onerow(); ---Testcase 32: -insert into onerow default values; -analyze onerow; - - --- --- CORRELATION NAMES --- Make sure that table/column aliases are supported --- before diving into more complex join syntax. --- - ---Testcase 33: -SELECT * - FROM J1_TBL AS tx; - ---Testcase 34: -SELECT * - FROM J1_TBL tx; - ---Testcase 35: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) AS t1 (a, b, c); - ---Testcase 36: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c); - ---Testcase 37: -SELECT * - FROM (SELECT (fields->>'i')::int, (fields->>'j')::int,fields->>'t' FROM J1_TBL) t1 (a, b, c), (SELECT (fields->>'i')::int ,(fields->>'k')::int FROM J2_TBL) t2 (d, e) ORDER BY t1.a, t1.b, t1.c, t2.d, t2.e; - ---Testcase 38: -SELECT t1.a, t2.e - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c), (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, e) - WHERE t1.a = t2.d; - - --- --- CROSS JOIN --- Qualifications are not allowed on cross joins, --- which degenerate into a standard unqualified inner join. --- - ---Testcase 39: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; - --- ambiguous column ---Testcase 40: -SELECT i, k, t - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; - --- resolve previous ambiguity by specifying the table name ---Testcase 41: -SELECT t1.i, k, t - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 ORDER BY t1.i, t1.j, t1.t, t2.i, t2.k; - ---Testcase 42: -SELECT ii, tt, kk - FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL) - AS tx (ii, jj, tt, ii2, kk) ORDER BY ii, tt, kk; - ---Testcase 43: -SELECT tx.ii, tx.jj, tx.kk - FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, e)) - AS tx (ii, jj, tt, ii2, kk) ORDER BY tx.ii, tx.jj, tx.kk; - ---Testcase 44: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) a CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) b ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, a.i, a.k, b.i, b.k; - - --- --- --- Inner joins (equi-joins) --- --- - --- --- Inner joins (equi-joins) with USING clause --- The USING syntax changes the shape of the resulting table --- by including a column in the USING clause only once in the result. --- - --- Inner equi-join on specified column ---Testcase 45: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL INNER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); - --- Same as above, slightly different syntax ---Testcase 46: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); - ---Testcase 47: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, d) USING (a) - ORDER BY a, d; - ---Testcase 48: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, b) USING (b) - ORDER BY b, t1.a; - --- --- NATURAL JOIN --- Inner equi-join on all columns with the same name --- - ---Testcase 49: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL NATURAL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL; - ---Testcase 50: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) NATURAL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, d); - ---Testcase 51: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) NATURAL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, a); - --- mismatch number of columns --- currently, Postgres will fill in with underlying names ---Testcase 52: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) t1 (a, b) NATURAL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) t2 (a); - - --- --- Inner joins (equi-joins) --- - ---Testcase 53: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint = (J2_TBL.i)::bigint); - ---Testcase 54: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint = (J2_TBL.k)::bigint); - - --- --- Non-equi-joins --- - ---Testcase 55: -SELECT * - FROM (select (fields->>'i')::int i, (fields->>'j')::int j,fields->>'t' t from J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint <= (J2_TBL.k)::bigint) ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; - - --- --- Outer joins --- Note that OUTER is a noise word --- - ---Testcase 56: -SELECT * - FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j ,fields->>'t' t FROM J1_TBL) J1_TBL LEFT OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) - ORDER BY i, k, t; - ---Testcase 57: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) - ORDER BY i::int, k, t; - ---Testcase 58: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL RIGHT OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); - ---Testcase 59: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL RIGHT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); - ---Testcase 60: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL FULL OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) - ORDER BY i::int, k, t; - ---Testcase 61: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL FULL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) - ORDER BY i::int, k, t; - ---Testcase 62: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) WHERE (k)::int = 1; - ---Testcase 63: -SELECT * - FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) WHERE (i)::int = 1; - --- --- semijoin selectivity for <> --- ---Testcase 64: -explain (costs off) -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4, (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a -where exists(select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b - where (a.twothousand)::int4 = (b.twothousand)::int4 and (a.fivethous)::int4 <> (b.fivethous)::int4) - and (i4.f1)::int4 = (a.tenthous)::int4; - - --- --- More complicated constructs --- - --- --- Multiway full join --- - ---Testcase 65: -CREATE FOREIGN TABLE t1 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t1_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't1'); ---Testcase 66: -CREATE FOREIGN TABLE t2 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t2_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't2'); ---Testcase 67: -CREATE FOREIGN TABLE t3 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t3_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't3'); ---Testcase 68: -INSERT INTO t1_nsc VALUES ( 'bb', 11 ); ---Testcase 69: -INSERT INTO t2_nsc VALUES ( 'bb', 12 ); ---Testcase 70: -INSERT INTO t2_nsc VALUES ( 'cc', 22 ); ---Testcase 71: -INSERT INTO t2_nsc VALUES ( 'ee', 42 ); ---Testcase 72: -INSERT INTO t3_nsc VALUES ( 'bb', 13 ); ---Testcase 73: -INSERT INTO t3_nsc VALUES ( 'cc', 23 ); ---Testcase 74: -INSERT INTO t3_nsc VALUES ( 'dd', 33 ); ---Testcase 75: -SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t1) t1 FULL JOIN (select fields->>'name' "name", (fields->>'n')::int n from t2) t2 USING (name) FULL JOIN (select fields->>'name' "name", (fields->>'n')::int n from t3) t3 USING (name); - --- --- Test interactions of join syntax and subqueries --- - --- Basic cases (we expect planner to pull up the subquery here) ---Testcase 76: -SELECT * FROM -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 -INNER JOIN -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 -USING (name); - ---Testcase 77: -SELECT * FROM -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 -LEFT JOIN -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 -USING (name); - ---Testcase 78: -SELECT * FROM -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 -FULL JOIN -(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 -USING (name); - --- Cases with non-nullable expressions in subquery results; --- make sure these go to null as expected ---Testcase 79: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL INNER JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; - ---Testcase 80: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL LEFT JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; - ---Testcase 81: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL FULL JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; - ---Testcase 82: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n, 1 as s1_1 FROM t1) as s1 -NATURAL INNER JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL INNER JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; - ---Testcase 83: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n, 1 as s1_1 FROM t1) as s1 -NATURAL FULL JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL FULL JOIN -(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; - ---Testcase 84: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 -NATURAL FULL JOIN - (SELECT * FROM - (SELECT fields->>'name' "name", (fields->>'n')::int as s2_n FROM t2) as s2 - NATURAL FULL JOIN - (SELECT fields->>'name' "name", (fields->>'n')::int as s3_n FROM t3) as s3 - ) ss2; - ---Testcase 85: -SELECT * FROM -(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 -NATURAL FULL JOIN - (SELECT * FROM - (SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 - NATURAL FULL JOIN - (SELECT fields->>'name' "name", (fields->>'n')::int as s3_n FROM t3) as s3 - ) ss2; - --- Constants as join keys can also be problematic ---Testcase 86: -SELECT * FROM - (SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 -FULL JOIN - (SELECT fields->>'name' "name", 2 as s2_n FROM t2) as s2 -ON ((s1_n)::int = (s2_n)::int); - - --- Test for propagation of nullability constraints into sub-joins - ---Testcase 87: -create foreign table x (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table x_nsc (x1 int, x2 int) server influxdb_svr OPTIONS (table 'x'); ---Testcase 88: -insert into x_nsc values (1,11); ---Testcase 89: -insert into x_nsc values (2,22); ---Testcase 90: -insert into x_nsc values (3,null); ---Testcase 91: -insert into x_nsc values (4,44); ---Testcase 92: -insert into x_nsc values (5,null); ---Testcase 93: -create foreign table y (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table y_nsc (y1 int, y2 int) server influxdb_svr OPTIONS (table 'y'); ---Testcase 94: -insert into y_nsc values (1,111); ---Testcase 95: -insert into y_nsc values (2,222); ---Testcase 96: -insert into y_nsc values (3,333); ---Testcase 97: -insert into y_nsc values (4,null); ---Testcase 98: -select * from x; ---Testcase 99: -select * from y; - ---Testcase 100: -select * from (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int and x2 is not null); ---Testcase 101: -select * from (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int and y2 is not null); - ---Testcase 102: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int); ---Testcase 103: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int and x2 is not null); ---Testcase 104: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int and y2 is not null); ---Testcase 105: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int and xx2 is not null); --- these should NOT give the same answers as above ---Testcase 106: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int) where (x2 is not null); ---Testcase 107: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int) where (y2 is not null); ---Testcase 108: -select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) -on (x1::int = xx1::int) where (xx2 is not null); - --- --- regression test: check for bug with propagation of implied equality --- to outside an IN --- ---Testcase 109: -select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a where unique1 in - (select unique1 from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) c using (unique1) - where b.unique2::int4 = 42); - --- --- regression test: check for failure to generate a plan with multiple --- degenerate IN clauses --- ---Testcase 110: -select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) x where - (x.unique1)::int4 in (select (a.fields->>'f1')::int4 from int4_tbl a,float8_tbl b where (a.fields->>'f1')::int4=(b.fields->>'f1')::float8) and - (x.unique1)::int4 = 0 and - (x.unique1)::int4 in (select (aa.fields->>'f1')::int4 from int4_tbl aa,float8_tbl bb where (aa.fields->>'f1')::int4=(bb.fields->>'f1')::float8); - --- try that with GEQO too -begin; ---Testcase 111: -set geqo = on; ---Testcase 112: -set geqo_threshold = 2; ---Testcase 113: -select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) x where - (x.unique1)::int4 in (select a.f1 from (select (fields->>'f1')::int4 f1 from INT4_TBL) a,(select (fields->>'f1')::float8 f1 from FLOAT8_TBL) b where a.f1::int4=b.f1::float8) and - (x.unique1)::int4 = 0 and - (x.unique1)::int4 in (select aa.f1 from (select (fields->>'f1')::int4 f1 from INT4_TBL) aa,(select (fields->>'f1')::float8 f1 from FLOAT8_TBL) bb where aa.f1::int4=bb.f1::float8); -rollback; - --- --- regression test: be sure we cope with proven-dummy append rels --- ---Testcase 114: -create table b (aa int, bb int); - ---Testcase 115: -explain (costs off) -select aa, bb, tenk1.unique1::int, tenk1.unique1::int - from (select (fields->>'unique1')::int unique1, fields->>'unique2' unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1) tenk1 right join b on aa = tenk1.unique1::int - where bb < bb and bb is null; - ---Testcase 116: -select aa, bb, tenk1.unique1::int, tenk1.unique1::int - from (select (fields->>'unique1')::int unique1, fields->>'unique2' unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1) tenk1 right join b on aa = tenk1.unique1::int - where bb < bb and bb is null; - ---Testcase 117: -drop table b; --- --- regression test: check handling of empty-FROM subquery underneath outer join --- ---Testcase 118: -explain (costs off) -select (i1.fields->>'q1')::int8 q1, (i1.fields->>'q2')::int8 q2, (i2.fields->>'q1')::int8 q1, (i2.fields->>'q2')::int8 q2, x from int8_tbl i1 left join (int8_tbl i2 join - (select 123 as x) ss on (i2.fields->>'q1')::int8 = x) on (i1.fields->>'q2')::int8 = (i2.fields->>'q2')::int8 -order by 1, 2; - ---Testcase 119: -select (i1.fields->>'q1')::int8 q1, (i1.fields->>'q2')::int8 q2, (i2.fields->>'q1')::int8 q1, (i2.fields->>'q2')::int8 q2, x from int8_tbl i1 left join (int8_tbl i2 join - (select 123 as x) ss on (i2.fields->>'q1')::int8 = x) on (i1.fields->>'q2')::int8= (i2.fields->>'q2')::int8 -order by 1, 2; - --- --- regression test: check a case where join_clause_is_movable_into() gives --- an imprecise result, causing an assertion failure --- ---Testcase 120: -select count(*) -from - (select (t3.fields->>'tenthous')::int4 as x1, coalesce((t1.fields->>'stringu1')::name, (t2.fields->>'stringu1')::name) as x2 - from tenk1 t1 - left join tenk1 t2 on (t1.fields->>'unique1')::int4 = (t2.fields->>'unique1')::int4 - join tenk1 t3 on (t1.fields->>'unique2')::int4 = (t3.fields->>'unique2')::int4) ss, - tenk1 t4, - tenk1 t5 -where (t4.fields->>'thousand')::int4 = (t5.fields->>'unique1')::int4 and ss.x1 = (t4.fields->>'tenthous')::int4 and ss.x2 = (t5.fields->>'stringu1')::name; - --- --- regression test: check a case where we formerly missed including an EC --- enforcement clause because it was expected to be handled at scan level --- ---Testcase 121: -explain (costs off) -select a.f1, b.f1, (t.fields->>'thousand')::int4 thousand, (t.fields->>'tenhous')::int4 tenthous from - tenk1 t, - (select sum((fields->>'f1')::int4)+1 as f1 from int4_tbl i4a) a, - (select sum((fields->>'f1')::int4) as f1 from int4_tbl i4b) b -where b.f1 = (t.fields->>'thousand')::int4 and a.f1 = b.f1 and (a.f1+b.f1+999) = (t.fields->>'tenthous')::int4; - ---Testcase 122: -select a.f1, b.f1, (t.fields->>'thousand')::int4 thousand, (t.fields->>'tenhous')::int4 tenthous from - tenk1 t, - (select sum((fields->>'f1')::int4)+1 as f1 from int4_tbl i4a) a, - (select sum((fields->>'f1')::int4) as f1 from int4_tbl i4b) b -where b.f1 = (t.fields->>'thousand')::int4 and a.f1 = b.f1 and (a.f1+b.f1+999) = (t.fields->>'tenthous')::int4; - --- --- check a case where we formerly got confused by conflicting sort orders --- in redundant merge join path keys --- ---Testcase 123: -explain (costs off) -select * from - (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL j1_tbl) j1_tbl full join - (select * from (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL j2_tbl) j2_tbl order by (j2_tbl.i)::int desc, (j2_tbl.k)::int asc) j2_tbl - on (j1_tbl.i)::int = (j2_tbl.i)::int and (j1_tbl.i)::int = (j2_tbl.k)::int; - ---Testcase 124: -select * from - (select (fields->>'i')::int i, (fields->>'j')::int j,fields->>'t' t from J1_TBL j1_tbl) j1_tbl full join - (select * from (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL j2_tbl) j2_tbl order by (j2_tbl.i)::int desc, (j2_tbl.k)::int asc) j2_tbl - on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; - --- --- a different check for handling of redundant sort keys in merge joins --- ---Testcase 125: -explain (costs off) -select count(*) from - (select * from tenk1 x order by (x.fields->>'thousand')::int4, (x.fields->>'twothousand')::int4, (x.fields->>'fivethous')::int4) x - left join - (select * from tenk1 y order by (y.fields->>'unique2')::int4) y - on (x.fields->>'thousand')::int4 = (y.fields->>'unique2')::int4 and (x.fields->>'twothousand')::int4 = (y.fields->>'hundred')::int4 and (x.fields->>'fivethous')::int4 = (y.fields->>'unique2')::int4; - ---Testcase 126: -select count(*) from - (select * from tenk1 x order by (x.fields->>'thousand')::int4, (x.fields->>'twothousand')::int4, (x.fields->>'fivethous')::int4) x - left join - (select * from tenk1 y order by (y.fields->>'unique2')::int4) y - on (x.fields->>'thousand')::int4 = (y.fields->>'unique2')::int4 and (x.fields->>'twothousand')::int4 = (y.fields->>'hundred')::int4 and (x.fields->>'fivethous')::int4 = (y.fields->>'unique2')::int4; - - --- --- Clean up --- - ---Testcase 127: -DELETE FROM t1_nsc; ---Testcase 128: -DELETE FROM t2_nsc; ---Testcase 129: -DELETE FROM t3_nsc; ---Testcase 130: -DROP FOREIGN TABLE t1; -DROP FOREIGN TABLE t1_nsc; ---Testcase 131: -DROP FOREIGN TABLE t2; -DROP FOREIGN TABLE t2_nsc; ---Testcase 132: -DROP FOREIGN TABLE t3; -DROP FOREIGN TABLE t3_nsc; ---Testcase 133: -DELETE FROM j1_tbl_nsc; -DROP FOREIGN TABLE J1_TBL; -DROP FOREIGN TABLE j1_tbl_nsc; ---Testcase 134: -DELETE FROM j2_tbl_nsc; -DROP FOREIGN TABLE J2_TBL; -DROP FOREIGN TABLE j2_tbl_nsc; - -DELETE FROM x_nsc; -DELETE FROM y_nsc; -DROP FOREIGN TABLE x_nsc; -DROP FOREIGN TABLE y_nsc; - --- Both DELETE and UPDATE allow the specification of additional tables --- to "join" against to determine which rows should be modified. - ---Testcase 135: -CREATE FOREIGN TABLE t1 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t1_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 't1'); ---Testcase 136: -CREATE FOREIGN TABLE t2 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t2_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 't2'); ---Testcase 137: -CREATE FOREIGN TABLE t3 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE t3_nsc (x int, y int) SERVER influxdb_svr OPTIONS (table 't3'); ---Testcase 138: -INSERT INTO t1_nsc VALUES (5, 10); ---Testcase 139: -INSERT INTO t1_nsc VALUES (15, 20); ---Testcase 140: -INSERT INTO t1_nsc VALUES (100, 100); ---Testcase 141: -INSERT INTO t1_nsc VALUES (200, 1000); ---Testcase 142: -INSERT INTO t2_nsc VALUES (200, 2000); ---Testcase 143: -INSERT INTO t3_nsc VALUES (5, 20); ---Testcase 144: -INSERT INTO t3_nsc VALUES (6, 7); ---Testcase 145: -INSERT INTO t3_nsc VALUES (7, 8); ---Testcase 146: -INSERT INTO t3_nsc VALUES (500, 100); ---Testcase 147: -ALTER TABLE t3 ADD time timestamp; -ALTER TABLE t3_nsc ADD time timestamp; ---Testcase 148: -SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; ---Testcase 149: -DELETE FROM t3_nsc USING t1_nsc table1 WHERE t3_nsc.x = table1.a; ---Testcase 150: -SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; ---Testcase 151: -DELETE FROM t3_nsc USING t1_nsc JOIN t2_nsc USING (a) WHERE t3_nsc.x > t1_nsc.a; ---Testcase 152: -SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; ---Testcase 153: -DELETE FROM t3_nsc USING t3_nsc t3_other WHERE t3_nsc.x = t3_other.x AND t3_nsc.y = t3_other.y; ---Testcase 154: -SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; - --- Test join against inheritance tree - ---Testcase 155: -create temp table t2a () inherits (t2); - ---Testcase 156: -insert into t2a values ('{"a": "200", "b": "2001"}'); - ---Testcase 157: -select * from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 left join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int); - --- Test matching of column name with wrong alias - ---Testcase 158: -select t1.x from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'x')::int x, (fields->>'y')::int y from t3) t3 on (t1.a::int = t3.x::int); - --- --- regression test for 8.1 merge right join bug --- - ---Testcase 159: -CREATE FOREIGN TABLE tt1 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE tt1_nsc ( tt1_id int4, joincol int4 ) SERVER influxdb_svr OPTIONS (table 'tt1'); ---Testcase 160: -INSERT INTO tt1_nsc VALUES (1, 11); ---Testcase 161: -INSERT INTO tt1_nsc VALUES (2, NULL); ---Testcase 162: -CREATE FOREIGN TABLE tt2 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE tt2_nsc ( tt2_id int4, joincol int4 ) SERVER influxdb_svr OPTIONS (table 'tt2'); ---Testcase 163: -INSERT INTO tt2_nsc VALUES (21, 11); ---Testcase 164: -INSERT INTO tt2_nsc VALUES (22, 11); ---Testcase 165: -set enable_hashjoin to off; ---Testcase 166: -set enable_nestloop to off; - --- these should give the same results - ---Testcase 167: -select tt1.*, tt2.* from (select (fields->>'tt1_id')::int4 tt1_id, (fields->>'joincol')::int4 joincol from tt1) tt1 left join (select (fields->>'tt2_id')::int4 tt2_id, (fields->>'joincol')::int4 joincol from tt2) tt2 on tt1.joincol::int4 = tt2.joincol::int4; - ---Testcase 168: -select tt1.*, tt2.* from (select (fields->>'tt2_id')::int4 tt2_id, (fields->>'joincol')::int4 joincol from tt2) tt2 right join (select (fields->>'tt1_id')::int4 tt1_id, (fields->>'joincol')::int4 joincol from tt1) tt1 on tt1.joincol::int4 = tt2.joincol::int4; - ---Testcase 169: -reset enable_hashjoin; ---Testcase 170: -reset enable_nestloop; - --- --- regression test for bug #13908 (hash join with skew tuples & nbatch increase) --- - ---Testcase 171: -set work_mem to '64kB'; ---Testcase 172: -set enable_mergejoin to off; - ---Testcase 173: -explain (costs off) -select count(*) from tenk1 a, tenk1 b - where ((a.fields->>'hundred')::int4 = (b.fields->>'thousand')::int4) and ((b.fields->>'fivethous')::int4 % 10) < 10; ---Testcase 174: -select count(*) from tenk1 a, tenk1 b - where ((a.fields->>'hundred')::int4 = (b.fields->>'thousand')::int4) and ((b.fields->>'fivethous')::int4 % 10) < 10; - ---Testcase 175: -reset work_mem; ---Testcase 176: -reset enable_mergejoin; - --- --- regression test for 8.2 bug with improper re-ordering of left joins --- - ---Testcase 177: -create foreign table tt3(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table tt3_nsc(f1 int, f2 text) server influxdb_svr OPTIONS (table 'tt3'); ---Testcase 178: -insert into tt3_nsc select x, repeat('xyzzy', 100) from generate_series(1,10000) x; ---Testcase 179: -create foreign table tt4(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table tt4_nsc(f1 int) server influxdb_svr OPTIONS (table 'tt4'); ---Testcase 180: -insert into tt4_nsc values (0),(1),(9999); ---Testcase 181: -SELECT (a.fields->>'f1')::int f1 -FROM tt4 a -LEFT JOIN ( - SELECT (b.fields->>'f1')::int f1 - FROM tt3 b LEFT JOIN tt3 c ON ((b.fields->>'f1')::int = (c.fields->>'f1')::int) - WHERE c.fields->>'f1' IS NULL -) AS d ON ((a.fields->>'f1')::int = (d.f1)::int) -WHERE d.f1 IS NULL; - --- --- regression test for proper handling of outer joins within antijoins --- - ---Testcase 182: -create foreign table tt4x(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); - ---Testcase 183: -explain (costs off) -select * from tt4x t1 -where not exists ( - select 1 from tt4x t2 - left join tt4x t3 on (t2.fields->>'c3')::int = (t3.fields->>'c1')::int - left join ( select (t5.fields->>'c1')::int as c1 - from tt4x t4 left join tt4x t5 on (t4.fields->>'c2')::int = (t5.fields->>'c1')::int - ) a1 on (t3.fields->>'c2')::int = a1.c1 - where (t1.fields->>'c1')::int = (t2.fields->>'c2')::int -); - --- --- regression test for problems of the sort depicted in bug #3494 --- - ---Testcase 184: -create foreign table tt5(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table tt5_nsc(f1 int, f2 int) server influxdb_svr OPTIONS (table 'tt5'); ---Testcase 185: -create foreign table tt6(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table tt6_nsc(f1 int, f2 int) server influxdb_svr OPTIONS (table 'tt6'); ---Testcase 186: -insert into tt5_nsc values(1, 10); ---Testcase 187: -insert into tt5_nsc values(1, 11); ---Testcase 188: -insert into tt6_nsc values(1, 9); ---Testcase 189: -insert into tt6_nsc values(1, 2); ---Testcase 190: -insert into tt6_nsc values(2, 9); ---Testcase 191: -select * from (select (fields->>'f1')::int f1, (fields->>'f2')::int f2 from tt5) tt5,(select (fields->>'f1')::int f1, (fields->>'f2')::int f2 from tt6) tt6 where (tt5.f1)::int = (tt6.f1)::int and (tt5.f1)::int = (tt5.f2)::int - (tt6.f2)::int; - --- --- regression test for problems of the sort depicted in bug #3588 --- - ---Testcase 192: -create foreign table xx (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table xx_nsc (pkxx int) server influxdb_svr OPTIONS (table 'xx'); ---Testcase 193: -create foreign table yy (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table yy_nsc (pkyy int, pkxx int) server influxdb_svr OPTIONS (table 'yy'); ---Testcase 194: -insert into xx_nsc values (1); ---Testcase 195: -insert into xx_nsc values (2); ---Testcase 196: -insert into xx_nsc values (3); ---Testcase 197: -insert into yy_nsc values (101, 1); ---Testcase 198: -insert into yy_nsc values (201, 2); ---Testcase 199: -insert into yy_nsc values (301, NULL); ---Testcase 200: -select (yy.fields->>'pkyy')::int as yy_pkyy, (yy.fields->>'pkxx')::int as yy_pkxx, (yya.fields->>'pkyy')::int as yya_pkyy, - (xxa.fields->>'pkxx')::int as xxa_pkxx, (xxb.fields->>'pkxx')::int as xxb_pkxx -from yy - left join (SELECT * FROM yy where (fields->>'pkyy')::int = 101) as yya ON (yy.fields->>'pkyy')::int = (yya.fields->>'pkyy')::int - left join xx xxa on (yya.fields->>'pkxx')::int = (xxa.fields->>'pkxx')::int - left join xx xxb on coalesce ((xxa.fields->>'pkxx')::int, 1) = (xxb.fields->>'pkxx')::int ORDER BY yy_pkyy, yy_pkxx, yya_pkyy, xxa_pkxx, xxb_pkxx; - --- --- regression test for improper pushing of constants across outer-join clauses --- (as seen in early 8.2.x releases) --- - ---Testcase 201: -create foreign table zt1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table zt1_nsc (f1 int) server influxdb_svr OPTIONS (table 'zt1'); ---Testcase 202: -create foreign table zt2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table zt2_nsc (f2 int) server influxdb_svr OPTIONS (table 'zt2'); ---Testcase 203: -create foreign table zt3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 204: -insert into zt1_nsc values(53); ---Testcase 205: -insert into zt2_nsc values(53); ---Testcase 206: -select * from - (select (fields->>'f2')::int f2 from zt2) zt2 left join (select (fields->>'f3')::int f3 from zt3) zt3 on (f2::int = f3::int) - left join (select (fields->>'f1')::int f1 from zt1) zt1 on (f3::int = f1::int) -where (f2)::int = 53; - ---Testcase 207: -create temp view zv1 as select *,'dummy'::text AS junk from zt1; - ---Testcase 208: -select * from - (select (fields->>'f2')::int f2 from zt2) zt2 left join (select (fields->>'f3')::int f3 from zt3) zt3 on (f2::int = f3::int) - left join zv1 on (f3::int = (zv1.fields->>'f1')::int) -where (f2)::int = 53; - --- --- regression test for improper extraction of OR indexqual conditions --- (as seen in early 8.3.x releases) --- - ---Testcase 209: -select a.unique2, a.ten, b.tenthous, b.unique2, b.hundred -from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b on a.unique2 = b.tenthous -where (a.unique1)::int4 = 42 and - ((b.unique2 is null and (a.ten)::int4 = 2) or (b.hundred)::int4 = 3); - --- --- test proper positioning of one-time quals in EXISTS (8.4devel bug) --- ---Testcase 210: -prepare foo(bool) as - select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b - on ((a.unique2)::int4 = (b.unique1)::int4 and exists - (select 1 from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) c where (c.thousand)::int4 = (b.unique2)::int4 and $1)); ---Testcase 211: -execute foo(true); ---Testcase 212: -execute foo(false); - --- --- test for sane behavior with noncanonical merge clauses, per bug #4926 --- - -begin; - ---Testcase 213: -set enable_mergejoin = 1; ---Testcase 214: -set enable_hashjoin = 0; ---Testcase 215: -set enable_nestloop = 0; - ---Testcase 216: -create foreign table a (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 217: -create foreign table b (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); - ---Testcase 218: -select * from (select (fields->>'i')::int i from a) a left join (select (fields->>'x')::int x, (fields->>'y')::int y from b) b on i::int = x::int and i::int = y::int and x::int = i::int; - ---Testcase 219: -DROP FOREIGN TABLE a; ---Testcase 220: -DROP FOREIGN TABLE b; -rollback; - --- --- test handling of merge clauses using record_ops --- -begin; - ---Testcase 221: -create type mycomptype as (id int, v bigint); - ---Testcase 222: -create temp table tidv (idv mycomptype); ---Testcase 223: -create index on tidv (idv); - ---Testcase 224: -explain (costs off) -select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; - ---Testcase 225: -set enable_mergejoin = 0; ---Testcase 226: -set enable_hashjoin = 0; - ---Testcase 227: -explain (costs off) -select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; - -rollback; - --- --- test NULL behavior of whole-row Vars, per bug #5025 --- ---Testcase 228: -select t1.q2, count(t2.*) -from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1 left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 on (t1.q2 = t2.q1) -group by t1.q2 order by 1; - ---Testcase 229: -select (t1.fields->>'q2')::int8 q2, count(t2.*) -from int8_tbl t1 left join (select * from int8_tbl) t2 on ((t1.fields->>'q2')::int8 = (t2.fields->>'q1')::int8) -group by t1.fields->>'q2' order by 1; - ---Testcase 230: -select (t1.fields->>'q2')::int8 q2, count(t2.*) -from int8_tbl t1 left join (select * from int8_tbl offset 0) t2 on ((t1.fields->>'q2')::int8 = (t2.fields->>'q1')::int8) -group by t1.fields->>'q2' order by 1; - ---Testcase 231: -select (t1.fields->>'q2')::int8 q2, count(t2.*) -from int8_tbl t1 left join - (select (fields->>'q1')::int8 q1, case when (fields->>'q2')::int8=1 then 1 else (fields->>'q2')::int8 end as q2 from int8_tbl) t2 - on ((t1.fields->>'q2')::int8 = t2.q1) -group by t1.fields->>'q2' order by 1; - --- --- test incorrect failure to NULL pulled-up subexpressions --- -begin; - ---Testcase 232: -create foreign table a ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table a_nsc ( - code char -) server influxdb_svr OPTIONS (table 'a'); ---Testcase 233: -create foreign table b ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table b_nsc ( - a char, - num integer -) server influxdb_svr OPTIONS (table 'b'); ---Testcase 234: -create foreign table c ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table c_nsc ( - name char, - a char -) server influxdb_svr OPTIONS (table 'c'); ---Testcase 235: -insert into a_nsc (code) values ('p'); ---Testcase 236: -insert into a_nsc (code) values ('q'); ---Testcase 237: -insert into b_nsc (a, num) values ('p', 1); ---Testcase 238: -insert into b_nsc (a, num) values ('p', 2); ---Testcase 239: -insert into c_nsc (name, a) values ('A', 'p'); ---Testcase 240: -insert into c_nsc (name, a) values ('B', 'q'); ---Testcase 241: -insert into c_nsc (name, a) values ('C', null); ---Testcase 242: -select c.name, ss.code, ss.b_cnt, ss.const -from (select fields->>'name' "name", fields->>'a' a from c) c left join - (select a.code, coalesce(b_grp.cnt, 0) as b_cnt, -1 as const - from (select fields->>'code' code from a) a left join - (select count(1) as cnt, b.fields->>'a' a from b group by b.fields->>'a') as b_grp - on a.code = b_grp.a - ) as ss - on (c.a = ss.code) -order by c.name; - ---Testcase 243: -DELETE FROM a_nsc; ---Testcase 244: -DELETE FROM b_nsc; ---Testcase 245: -DELETE FROM c_nsc; ---Testcase 246: -DROP FOREIGN TABLE a; -DROP FOREIGN TABLE a_nsc; ---Testcase 247: -DROP FOREIGN TABLE b; -DROP FOREIGN TABLE b_nsc; ---Testcase 248: -DROP FOREIGN TABLE c; -DROP FOREIGN TABLE c_nsc; -rollback; - --- --- test incorrect handling of placeholders that only appear in targetlists, --- per bug #6154 --- ---Testcase 249: -SELECT * FROM -( SELECT 1 as key1 ) sub1 -LEFT JOIN -( SELECT sub3.key3, sub4.value2, COALESCE(sub4.value2, 66) as value3 FROM - ( SELECT 1 as key3 ) sub3 - LEFT JOIN - ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM - ( SELECT 1 as key5 ) sub5 - LEFT JOIN - ( SELECT 2 as key6, 42 as value1 ) sub6 - ON sub5.key5 = sub6.key6 - ) sub4 - ON sub4.key5 = sub3.key3 -) sub2 -ON sub1.key1 = sub2.key3; - --- test the path using join aliases, too ---Testcase 250: -SELECT * FROM -( SELECT 1 as key1 ) sub1 -LEFT JOIN -( SELECT sub3.key3, value2, COALESCE(value2, 66) as value3 FROM - ( SELECT 1 as key3 ) sub3 - LEFT JOIN - ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM - ( SELECT 1 as key5 ) sub5 - LEFT JOIN - ( SELECT 2 as key6, 42 as value1 ) sub6 - ON sub5.key5 = sub6.key6 - ) sub4 - ON sub4.key5 = sub3.key3 -) sub2 -ON sub1.key1 = sub2.key3; - --- --- test case where a PlaceHolderVar is used as a nestloop parameter --- - ---Testcase 251: -EXPLAIN (COSTS OFF) -SELECT qq, (fields->>'unique1')::int4 unique1 - FROM - ( SELECT COALESCE((fields->>'q1')::int8, 0) AS qq FROM int8_tbl a ) AS ss1 - FULL OUTER JOIN - ( SELECT COALESCE((fields->>'q2')::int8, -1) AS qq FROM int8_tbl b ) AS ss2 - USING (qq) - INNER JOIN tenk1 c ON qq = (fields->>'unique2')::int4; - ---Testcase 252: -SELECT qq, (fields->>'unique1')::int4 unique1 - FROM - ( SELECT COALESCE((fields->>'q1')::int8, 0) AS qq FROM int8_tbl a ) AS ss1 - FULL OUTER JOIN - ( SELECT COALESCE((fields->>'q2')::int8, -1) AS qq FROM int8_tbl b ) AS ss2 - USING (qq) - INNER JOIN tenk1 c ON qq = (fields->>'unique2')::int4; - --- --- nested nestloops can require nested PlaceHolderVars --- - ---Testcase 253: -create foreign table nt1 ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table nt1_nsc ( - id int, - a1 boolean, - a2 boolean -) server influxdb_svr OPTIONS (table 'nt1'); ---Testcase 254: -create foreign table nt2 ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table nt2_nsc ( - id int, - nt1_id int, - b1 boolean, - b2 boolean -) server influxdb_svr OPTIONS (table 'nt2'); ---Testcase 255: -create foreign table nt3 ( - fields jsonb OPTIONS (fields 'true') -) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table nt3_nsc ( - id int, - nt2_id int, - c1 boolean -) server influxdb_svr OPTIONS (table 'nt3'); ---Testcase 256: -insert into nt1_nsc values (1,true,true); ---Testcase 257: -insert into nt1_nsc values (2,true,false); ---Testcase 258: -insert into nt1_nsc values (3,false,false); ---Testcase 259: -insert into nt2_nsc values (1,1,true,true); ---Testcase 260: -insert into nt2_nsc values (2,2,true,false); ---Testcase 261: -insert into nt2_nsc values (3,3,false,false); ---Testcase 262: -insert into nt3_nsc values (1,1,true); ---Testcase 263: -insert into nt3_nsc values (2,2,false); ---Testcase 264: -insert into nt3_nsc values (3,3,true); ---Testcase 265: -explain (costs off) -select (nt3.fields->>'id')::int id -from nt3 as nt3 - left join - (select (nt2.fields->>'id')::int id, (nt2.fields->>'nt1_id')::int nt1_id, (nt2.fields->>'b1')::boolean b1, (nt2.fields->>'b2')::boolean b2, ((nt2.fields->>'b1')::boolean and ss1.a3) AS b3 - from nt2 as nt2 - left join - (select (nt1.fields->>'id')::int id, (nt1.fields->>'a1')::boolean a1, (nt1.fields->>'a2')::boolean a2, ((nt1.fields->>'id')::int is not null) as a3 from nt1) as ss1 - on ss1.id = (nt2.fields->>'nt1_id')::int - ) as ss2 - on ss2.id = (nt3.fields->>'nt2_id')::int -where (nt3.fields->>'id')::int = 1 and ss2.b3; - ---Testcase 266: -select (nt3.fields->>'id')::int id -from nt3 as nt3 - left join - (select (nt2.fields->>'id')::int id, (nt2.fields->>'nt1_id')::int nt1_id, (nt2.fields->>'b1')::boolean b1, (nt2.fields->>'b2')::boolean b2, ((nt2.fields->>'b1')::boolean and ss1.a3) AS b3 - from nt2 as nt2 - left join - (select (nt1.fields->>'id')::int id, (nt1.fields->>'a1')::boolean a1, (nt1.fields->>'a2')::boolean a2, ((nt1.fields->>'id')::int is not null) as a3 from nt1) as ss1 - on ss1.id = (nt2.fields->>'nt1_id')::int - ) as ss2 - on ss2.id = (nt3.fields->>'nt2_id')::int -where (nt3.fields->>'id')::int = 1 and ss2.b3; - --- --- test case where a PlaceHolderVar is propagated into a subquery --- - ---Testcase 267: -explain (costs off) -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t1) t1 left join - (select q1 as x, 42 as y from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t2) t2) ss - on (t1.q2)::int8 = (ss.x)::int8 -where - 1 = (select 1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t3) t3 where ss.y is not null limit 1) -order by 1,2; - ---Testcase 268: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t1) t1 left join - (select q1 as x, 42 as y from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t2) t2) ss - on (t1.q2)::int8 = (ss.x)::int8 -where - 1 = (select 1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t3) t3 where ss.y is not null limit 1) -order by 1,2; - --- --- variant where a PlaceHolderVar is needed at a join, but not above the join --- - ---Testcase 269: -explain (costs off) -select * from - (select (fields->>'f1')::int4 f1 from INT4_TBL i41) as i41, - lateral - (select 1 as x from - (select i41.f1 as lat, - i42.f1 as loc from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i81) as i81, (select (fields->>'f1')::int4 f1 from INT4_TBL i42) as i42) as ss1 - right join (select (fields->>'f1')::int4 f1 from INT4_TBL i43) as i43 on (i43.f1 > 1) - where ss1.loc = ss1.lat) as ss2 -where i41.f1 > 0; - ---Testcase 270: -select * from - (select (fields->>'f1')::int4 f1 from INT4_TBL i41) as i41, - lateral - (select 1 as x from - (select i41.f1 as lat, - i42.f1 as loc from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i81) as i81, (select (fields->>'f1')::int4 f1 from INT4_TBL i42) as i42) as ss1 - right join (select (fields->>'f1')::int4 f1 from INT4_TBL i43) as i43 on (i43.f1 > 1) - where ss1.loc = ss1.lat) as ss2 -where i41.f1 > 0; - --- --- test the corner cases FULL JOIN ON TRUE and FULL JOIN ON FALSE --- ---Testcase 271: -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) a full join (select (fields->>'f1')::int4 f1 from INT4_TBL) b on true; ---Testcase 272: -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) a full join (select (fields->>'f1')::int4 f1 from INT4_TBL) b on false; - --- --- test for ability to use a cartesian join when necessary --- - ---Testcase 273: -create foreign table q1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); ---Testcase 274: -create foreign table q2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); - ---Testcase 275: -explain (costs off) -select * from - (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (f1)::int = (twothousand)::int, - (select (fields->>'q1')::int q1 from q1) q1, (select (fields->>'q2')::int q2 from q2) q2 -where (q1)::int = thousand::int or (q2)::int = thousand::int; - ---Testcase 276: -explain (costs off) -select * from - (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (f1)::int = (twothousand)::int, - (select (fields->>'q1')::int q1 from q1) q1, (select (fields->>'q2')::int q2 from q2) q2 -where (thousand)::int = ((q1)::int + (q2)::int); - --- --- test ability to generate a suitable plan for a star-schema query --- - ---Testcase 277: -explain (costs off) -select * from - (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 tenk1) tenk1, (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b -where thousand::int4 = a.q1::int8 and tenthous::int4 = b.q1::int8 and a.q2::int8 = 1 and b.q2::int8 = 2; - --- --- test a corner case in which we shouldn't apply the star-schema optimization --- - ---Testcase 278: -explain (costs off) -select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (select 1,0 from onerow) v1(x1,x2) - left join (select 3,1 from onerow) v2(y1,y2) - on (v1.x1)::int4 = (v2.y2)::int4) subq1 - on ((i1.fields->>'f1')::int4 = (subq1.x2)::int4) - on ((t1.fields->>'unique2')::int4 = (subq1.d1)::int4) - left join tenk1 t2 - on ((subq1.y1)::int4 = (t2.fields->>'unique1')::int4) -where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > t2.fields->>'stringu2'; - ---Testcase 279: -select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (select 1,0 from onerow) v1(x1,x2) - left join (select 3,1 from onerow) v2(y1,y2) - on (v1.x1)::int4 = (v2.y2)::int4) subq1 - on ((i1.fields->>'f1')::int4 = (subq1.x2)::int4) - on ((t1.fields->>'unique2')::int4 = (subq1.d1)::int4) - left join tenk1 t2 - on ((subq1.y1)::int4 = (t2.fields->>'unique1')::int4) -where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > t2.fields->>'stringu2'; - --- variant that isn't quite a star-schema case - ---Testcase 280: -select ss1.d1 from - tenk1 as t1 - inner join tenk1 as t2 - on (t1.fields->>'tenthous')::int4 = (t2.fields->>'ten')::int4 - inner join - int8_tbl as i8 - left join int4_tbl as i4 - inner join (select 64::information_schema.cardinal_number as d1 - from tenk1 t3, - lateral (select abs((t3.fields->>'unique1')::int4) + random()) ss0(x) - where (t3.fields->>'fivethous')::int4 < 0) as ss1 - on (i4.fields->>'f1')::int4 = ss1.d1 - on (i8.fields->>'q1')::int8 = (i4.fields->>'f1')::int4 - on (t1.fields->>'tenthous')::int4 = ss1.d1 -where (t1.fields->>'unique1')::int4 < (i4.fields->>'f1')::int4; - --- this variant is foldable by the remove-useless-RESULT-RTEs code - ---Testcase 281: -explain (costs off) -select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (values(1,0)) v1(x1,x2) - left join (values(3,1)) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on ((i1.fields->>'f1')::int4 = subq1.x2) - on ((t1.fields->>'unique2')::int4 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = (t2.fields->>'unique1')::int4) -where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > (t2.fields->>'stringu2')::name; - ---Testcase 282: -select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (values(1,0)) v1(x1,x2) - left join (values(3,1)) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on ((i1.fields->>'f1')::int4 = subq1.x2) - on ((t1.fields->>'unique2')::int4 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = (t2.fields->>'unique1')::int4) -where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > (t2.fields->>'stringu2')::name; - --- Here's a variant that we can't fold too aggressively, though, --- or we end up with noplace to evaluate the lateral PHV ---Testcase 283: -explain (verbose, costs off) -select * from - (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), - lateral (select ss2.y as z limit 1) ss3; ---Testcase 284: -select * from - (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), - lateral (select ss2.y as z limit 1) ss3; - --- Test proper handling of appendrel PHVs during useless-RTE removal ---Testcase 285: -explain (costs off) -select * from - (select 0 as z) as t1 - left join - (select true as a) as t2 - on true, - lateral (select true as b - union all - select a as b) as t3 -where b; - ---Testcase 286: -select * from - (select 0 as z) as t1 - left join - (select true as a) as t2 - on true, - lateral (select true as b - union all - select a as b) as t3 -where b; - --- --- test inlining of immutable functions --- ---Testcase 287: -create function f_immutable_int4(i integer) returns integer as -$$ begin return i; end; $$ language plpgsql immutable; - --- check optimization of function scan with join ---Testcase 288: -explain (costs off) -select (fields->>'unique1')::int4 unique1 from tenk1, (select * from f_immutable_int4(1) x) x -where x = (fields->>'unique1')::int4; - ---Testcase 289: -explain (verbose, costs off) -select (fields->>'unique1')::int4 unique1, x.* -from tenk1, (select *, random() from f_immutable_int4(1) x) x -where x = (fields->>'unique1')::int4; - ---Testcase 290: -explain (costs off) -select (fields->>'unique1')::int4 unique1 from tenk1, f_immutable_int4(1) x where x = (fields->>'unique1')::int4; - ---Testcase 291: -explain (costs off) -select (fields->>'unique1')::int4 unique1 from tenk1, lateral f_immutable_int4(1) x where x = (fields->>'unique1')::int4; - ---Testcase 292: -explain (costs off) -select (fields->>'unique1')::int4 unique1, x from tenk1 join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; - ---Testcase 293: -explain (costs off) -select (fields->>'unique1')::int4 unique1, x from tenk1 left join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; - ---Testcase 294: -explain (costs off) -select (fields->>'unique1')::int4 unique1, x from tenk1 right join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; - ---Testcase 295: -explain (costs off) -select (fields->>'unique1')::int4 unique1, x from tenk1 full join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; - --- check that pullup of a const function allows further const-folding ---Testcase 296: -explain (costs off) -select (fields->>'unique1')::int4 unique1 from tenk1, f_immutable_int4(1) x where x = 42; - --- test inlining of immutable functions with PlaceHolderVars ---Testcase 297: -explain (costs off) -select (nt3.fields->>'id')::int id -from nt3 as nt3 - left join - (select nt2.*, ((nt2.fields->>'b1')::boolean or i4 = 42) AS b3 - from nt2 as nt2 - left join - f_immutable_int4(0) i4 - on i4 = (nt2.fields->>'nt1_id')::int - ) as ss2 - on (ss2.fields->>'id')::int = (nt3.fields->>'nt2_id')::int -where (nt3.fields->>'id')::int = 1 and (ss2.b3)::boolean; - ---Testcase 298: -drop function f_immutable_int4(int); - --- test inlining when function returns composite - ---Testcase 299: -create function mki8(bigint, bigint) returns int8_tbl as -$$select row('{"q1" : ' || cast($1 as text) || ', "q2" : ' || cast($2 as text) || '}')::int8_tbl$$ language sql; - ---Testcase 300: -create function mki4(int) returns int4_tbl as -$$select row('{"f1" : ' || cast($1 as text) || '}')::int4_tbl$$ language sql; - ---Testcase 301: -explain (verbose, costs off) -select * from mki8(1, 2); ---Testcase 302: -select * from mki8(1, 2); - ---Testcase 303: -explain (verbose, costs off) -select * from mki4(42); ---Testcase 304: -select * from mki4(42); - ---Testcase 305: -drop function mki8(bigint, bigint); ---Testcase 306: -drop function mki4(int); - --- --- test extraction of restriction OR clauses from join OR clause --- (we used to only do this for indexable clauses) --- - ---Testcase 307: -explain (costs off) -select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on - ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or ((a.unique2)::int4 = 3 and (b.hundred)::int4 = 4); ---Testcase 308: -explain (costs off) -select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on - ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or ((a.unique2)::int4 = 3 and (b.ten)::int4 = 4); ---Testcase 309: -explain (costs off) -select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on - ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or - (((a.unique2)::int4 = 3 or (a.unique2)::int4 = 7) and (b.hundred)::int4 = 4); - --- --- test placement of movable quals in a parameterized join tree --- - ---Testcase 310: -explain (costs off) -select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t1) t1 left join - ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t2) t2 join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t3) t3 on (t2.thousand)::int4 = (t3.unique2)::int4) - on (t1.hundred)::int4 = (t2.hundred)::int4 and (t1.ten)::int4 = (t3.ten)::int4 -where (t1.unique1)::int4 = 1; - ---Testcase 311: -explain (costs off) -select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t1) t1 left join - ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t2) t2 join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t3) t3 on (t2.thousand)::int4 = (t3.unique2)::int4) - on (t1.hundred)::int4 = (t2.hundred)::int4 and (t1.ten)::int4 + (t2.ten)::int4 = (t3.ten)::int4 -where (t1.unique1)::int4 = 1; - ---Testcase 312: -explain (costs off) -select count(*) from - (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (a.unique1)::int4 = (b.unique2)::int4 - left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 c) c on (a.unique2)::int4 = (b.unique1)::int4 and (c.thousand)::int4 = (a.thousand)::int4 - join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (b.thousand)::int4 = (f1)::int4; - ---Testcase 313: -select count(*) from - (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (a.unique1)::int4 = (b.unique2)::int4 - left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 c) c on (a.unique2)::int4 = (b.unique1)::int4 and (c.thousand)::int4 = (a.thousand)::int4 - join int4_tbl on (b.thousand)::int4 = (fields->>'f1')::int4; - ---Testcase 314: -explain (costs off) -select (b.fields->>'unique1')::int4 unique1 from - tenk1 a join tenk1 b on (a.fields->>'unique1')::int4 = (b.fields->>'unique2')::int4 - left join tenk1 c on (b.fields->>'unique1')::int4 = 42 and (c.fields->>'thousand')::int4 = (a.fields->>'thousand')::int4 - join (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1 on (b.fields->>'thousand')::int4 = (f1)::int4 - right join int4_tbl i2 on (i2.fields->>'f1')::int4 = (b.fields->>'tenthous')::int4 - order by 1; - ---Testcase 315: -select (b.fields->>'unique1')::int4 unique1 from - tenk1 a join tenk1 b on (a.fields->>'unique1')::int4 = (b.fields->>'unique2')::int4 - left join tenk1 c on (b.fields->>'unique1')::int4 = 42 and (c.fields->>'thousand')::int4 = (a.fields->>'thousand')::int4 - join (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1 on (b.fields->>'thousand')::int4 = (f1)::int4 - right join int4_tbl i2 on (i2.fields->>'f1')::int4 = (b.fields->>'tenthous')::int4 - order by 1; - ---Testcase 316: -explain (costs off) -select * from -( - select unique1, q1, coalesce((unique1)::int4, -1) + (q1)::int8 as fault - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 on ((q2)::int8 = (unique2)::int4) -) ss -where fault = 122 -order by fault; - ---Testcase 317: -select * from -( - select unique1, q1, coalesce((unique1)::int4, -1) + (q1)::int8 as fault - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 on ((q2)::int8 = (unique2)::int4) -) ss -where fault = 122 -order by fault; - ---Testcase 318: -explain (costs off) -select * from -(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) -left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x -left join unnest(v1ys) as u1(u1y) on u1y = v2y; - ---Testcase 319: -select * from -(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) -left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x -left join unnest(v1ys) as u1(u1y) on u1y = v2y; - --- --- test handling of potential equivalence clauses above outer joins --- - ---Testcase 320: -explain (costs off) -select q1, unique2, thousand, hundred - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (q1)::int8 = (unique2)::int4 - where coalesce((thousand)::int4,123) = (q1)::int8 and (q1)::int8 = coalesce((hundred)::int4,123); - ---Testcase 321: -select q1, unique2, thousand, hundred - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (q1)::int8 = (unique2)::int4 - where coalesce((thousand)::int4,123) = (q1)::int8 and (q1)::int8 = coalesce((hundred)::int4,123); - ---Testcase 322: -explain (costs off) -select f1, unique2, case when (unique2)::int4 is null then (f1)::int4 else 0 end - from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 - where (case when (unique2)::int4 is null then (f1)::int4 else 0 end) = 0; - ---Testcase 323: -select f1, unique2, case when (unique2)::int4 is null then (f1)::int4 else 0 end - from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 - where (case when (unique2)::int4 is null then (f1)::int4 else 0 end) = 0; - --- --- another case with equivalence clauses above outer joins (bug #8591) --- - ---Testcase 324: -explain (costs off) -select (a.fields->>'unique1')::int4 unique1, (b.fields->>'unique1')::int4 unique1, (c.fields->>'unique1')::int4 unique1, coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) - from tenk1 a left join tenk1 b on (b.fields->>'thousand')::int4 = (a.fields->>'unique1')::int4 left join tenk1 c on (c.fields->>'unique2')::int4 = coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) - where (a.fields->>'unique2')::int4 < 10 and coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) = 44; - ---Testcase 325: -select (a.fields->>'unique1')::int4 unique1, (b.fields->>'unique1')::int4 unique1, (c.fields->>'unique1')::int4 unique1, coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) - from tenk1 a left join tenk1 b on (b.fields->>'thousand')::int4 = (a.fields->>'unique1')::int4 left join tenk1 c on (c.fields->>'unique2')::int4 = coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) - where (a.fields->>'unique2')::int4 < 10 and coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) = 44; - --- --- check handling of join aliases when flattening multiple levels of subquery --- - ---Testcase 326: -explain (verbose, costs off) -select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from - (values (0),(1)) foo1(join_key) -left join - (select join_key, bug_field from - (select ss1.join_key, ss1.bug_field from - (select (fields->>'f1')::int4 as join_key, 666 as bug_field from int4_tbl i1) ss1 - ) foo2 - left join - (select (fields->>'unique2')::int4 as join_key from tenk1 i2) ss2 - using (join_key) - ) foo3 -using (join_key); - ---Testcase 327: -select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from - (values (0),(1)) foo1(join_key) -left join - (select join_key, bug_field from - (select ss1.join_key, ss1.bug_field from - (select (fields->>'f1')::int4 as join_key, 666 as bug_field from int4_tbl i1) ss1 - ) foo2 - left join - (select (fields->>'unique2')::int4 as join_key from tenk1 i2) ss2 - using (join_key) - ) foo3 -using (join_key); - --- --- test successful handling of nested outer joins with degenerate join quals --- ---Testcase 328: -create foreign table text_tbl(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); - ---Testcase 329: -explain (verbose, costs off) -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2) b2 - on ((i8.fields->>'q1')::int8 = (b2.fields->>'q1')::int8) - on ((b2.d2)::int8 = (b1.fields->>'q2')::int8) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on ((i8.fields->>'q2')::int8 = (i4.fields->>'f1')::int4); - ---Testcase 330: -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2) b2 - on ((i8.fields->>'q1')::int8 = (b2.fields->>'q1')::int8) - on ((b2.d2)::int8 = (b1.fields->>'q2')::int8) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on ((i8.fields->>'q2')::int8 = (i4.fields->>'f1')::int4); - ---Testcase 331: -explain (verbose, costs off) -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2) b2 - on ((i8.q1)::int8 = (b2.q1)::int8) - on ((b2.d2)::int8 = (b1.q2)::int8) - on (t1.f1 = b1.d1) - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on ((i8.q2)::int8 = (i4.f1)::int4); - ---Testcase 332: -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2) b2 - on ((i8.q1)::int8 = (b2.q1)::int8) - on ((b2.d2)::int8 = (b1.q2)::int8) - on (t1.f1 = b1.d1) - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on ((i8.q2)::int8 = (i4.f1)::int4); - ---Testcase 333: -explain (verbose, costs off) -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2 - where (q1)::int8 = (f1)::int8) b2 - on ((i8.q1)::int8 = (b2.q1)::int8) - on ((b2.d2)::int8 = (b1.q2)::int8) - on (t1.f1 = b1.d1) - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on ((i8.q2)::int8 = (i4.f1)::int4); - ---Testcase 334: -select t1.* from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2 - where (q1)::int8 = (f1)::int8) b2 - on ((i8.q1)::int8 = (b2.q1)::int8) - on ((b2.d2)::int8 = (b1.q2)::int8) - on (t1.f1 = b1.d1) - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on ((i8.q2)::int8 = (i4.f1)::int4); - ---Testcase 335: -explain (verbose, costs off) -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - inner join (select (fields->>'q1')::int8 q1, fields->>'q2' q2 from INT8_TBL i8) i8 - on (i8.q2)::bigint = 456 - right join (select fields->>'f1' f1 from text_tbl t2) t2 - on t1.f1 = 'doh!' - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on i8.q1 = i4.f1; - ---Testcase 336: -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - inner join (select (fields->>'q1')::int8 q1, fields->>'q2' q2 from INT8_TBL i8) i8 - on (i8.q2)::bigint = 456 - right join (select fields->>'f1' f1 from text_tbl t2) t2 - on t1.f1 = 'doh!' - left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 - on i8.q1 = i4.f1; - --- --- test for appropriate join order in the presence of lateral references --- - ---Testcase 337: -explain (verbose, costs off) -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - on (i8.q2)::int8 = 123, - lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss -where t1.f1 = ss.f1; - ---Testcase 338: -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - on (i8.q2)::int8 = 123, - lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss -where t1.f1 = ss.f1; - ---Testcase 339: -explain (verbose, costs off) -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - on (i8.q2)::bigint = 123, - lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss1, - lateral (select ss1.* from text_tbl t3 limit 1) as ss2 -where t1.f1 = ss2.f1; - ---Testcase 340: -select * from - (select fields->>'f1' f1 from text_tbl t1) t1 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - on (i8.q2)::bigint = 123, - lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss1, - lateral (select ss1.* from text_tbl t3 limit 1) as ss2 -where t1.f1 = ss2.f1; - ---Testcase 341: -explain (verbose, costs off) -select 1 from - text_tbl as tt1 - inner join text_tbl as tt2 on (tt1.fields->>'f1' = 'foo') - left join text_tbl as tt3 on (tt3.fields->>'f1' = 'foo') - left join text_tbl as tt4 on (tt3.fields->>'f1' = tt4.fields->>'f1'), - lateral (select tt4.fields->>'f1' as c0 from text_tbl as tt5 limit 1) as ss1 -where tt1.fields->>'f1' = ss1.c0; - ---Testcase 342: -select 1 from - text_tbl as tt1 - inner join text_tbl as tt2 on (tt1.fields->>'f1' = 'foo') - left join text_tbl as tt3 on (tt3.fields->>'f1' = 'foo') - left join text_tbl as tt4 on (tt3.fields->>'f1' = tt4.fields->>'f1'), - lateral (select tt4.fields->>'f1' as c0 from text_tbl as tt5 limit 1) as ss1 -where tt1.fields->>'f1' = ss1.c0; - --- --- check a case in which a PlaceHolderVar forces join order --- - ---Testcase 343: -explain (verbose, costs off) -select ss2.* from - (select (fields->>'f1')::int4 f1 from INT4_TBL) i41 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) i8 - join (select i42.fields->>'f1' as c1, i43.fields->>'f1' as c2, 42 as c3 - from int4_tbl i42, int4_tbl i43) ss1 - on (i8.q1)::int8 = (ss1.c2)::int8 - on (i41.f1)::int4 = (ss1.c1)::int4, - lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 -where (ss1.c2)::int8 = 0; - ---Testcase 344: -select ss2.* from - (select (fields->>'f1')::int4 f1 from INT4_TBL) i41 - left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) i8 - join (select i42.fields->>'f1' as c1, i43.fields->>'f1' as c2, 42 as c3 - from int4_tbl i42, int4_tbl i43) ss1 - on (i8.q1)::int8 = (ss1.c2)::int8 - on (i41.f1)::int4 = (ss1.c1)::int4, - lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 -where (ss1.c2)::int8 = 0; - --- --- test successful handling of full join underneath left join (bug #14105) --- - ---Testcase 345: -explain (costs off) -select * from - (select 1 as id) as xx - left join - ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a1) as a1 full join (select 1 as id) as yy on ((a1.unique1)::int4 = yy.id)) - on (xx.id = coalesce(yy.id)); - ---Testcase 346: -select * from - (select 1 as id) as xx - left join - ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) as a1 full join (select 1 as id) as yy on ((a1.unique1)::int4 = yy.id)) - on (xx.id = coalesce(yy.id)); - --- --- test ability to push constants through outer join clauses --- - ---Testcase 347: -explain (costs off) - select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 where (f1)::int4 = 0; - ---Testcase 348: -explain (costs off) - select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a full join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b using(unique2) where (unique2)::int4 = 42; - --- --- test that quals attached to an outer join have correct semantics, --- specifically that they don't re-use expressions computed below the join; --- we force a mergejoin so that coalesce(b.q1, 1) appears as a join input --- - ---Testcase 349: -set enable_hashjoin to off; ---Testcase 350: -set enable_nestloop to off; - ---Testcase 351: -explain (verbose, costs off) - select (a.fields->>'q2')::int8 q2, (b.fields->>'q1')::int8 q1 - from int8_tbl a left join int8_tbl b on (a.fields->>'q2')::int8 = coalesce((b.fields->>'q1')::int8, 1) - where coalesce((b.fields->>'q1')::int8, 1) > 0; ---Testcase 352: -select (a.fields->>'q2')::int8 q2, (b.fields->>'q1')::int8 q1 - from int8_tbl a left join int8_tbl b on (a.fields->>'q2')::int8 = coalesce((b.fields->>'q1')::int8, 1) - where coalesce((b.fields->>'q1')::int8, 1) > 0; - ---Testcase 353: -reset enable_hashjoin; ---Testcase 354: -reset enable_nestloop; - --- --- test join removal --- - -begin; - ---Testcase 355: -CREATE FOREIGN TABLE a (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE a_nsc (id int, b_id int) SERVER influxdb_svr OPTIONS (table 'a'); ---Testcase 356: -CREATE FOREIGN TABLE b (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE b_nsc (id int, c_id int) SERVER influxdb_svr OPTIONS (table 'b'); ---Testcase 357: -CREATE FOREIGN TABLE c (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE c_nsc (id int) SERVER influxdb_svr OPTIONS (table 'c'); ---Testcase 358: -CREATE FOREIGN TABLE d (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE d_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 'd'); ---Testcase 359: -INSERT INTO a_nsc VALUES (0, 0), (1, NULL); ---Testcase 360: -INSERT INTO b_nsc VALUES (0, 0), (1, NULL); ---Testcase 361: -INSERT INTO c_nsc VALUES (0), (1); ---Testcase 362: -INSERT INTO d_nsc VALUES (1,3), (2,2), (3,1); --- all three cases should be optimizable into a simple seqscan ---Testcase 363: -explain (costs off) SELECT a.* FROM (select (fields->>'id')::int id, (fields->>'b_id')::int b_id from a) a LEFT JOIN (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b ON a.b_id = b.id; ---Testcase 364: -explain (costs off) SELECT b.* FROM (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b LEFT JOIN (select (fields->>'id')::int id from c) c ON b.c_id = c.id; ---Testcase 365: -explain (costs off) - SELECT a.* FROM (select (fields->>'id')::int id, (fields->>'b_id')::int b_id from a) a LEFT JOIN ((select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b left join (select (fields->>'id')::int id from c) c on b.c_id = c.id) - ON (a.b_id = b.id); - --- check optimization of outer join within another special join ---Testcase 366: -explain (costs off) -select (fields->>'id')::int id from a where (fields->>'id')::int in ( - select (b.fields->>'id')::int from b left join c on (b.fields->>'id')::int = (c.fields->>'id')::int -); - --- check that join removal works for a left join when joining a subquery --- that is guaranteed to be unique by its GROUP BY clause ---Testcase 367: -explain (costs off) -select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b group by b.id, b.c_id) s - on (d.a)::int = (s.id)::int and (d.b)::int = (s.c_id)::int; - --- similarly, but keying off a DISTINCT clause ---Testcase 368: -explain (costs off) -select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select distinct * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b) s - on (d.a)::int = (s.id)::int and (d.b)::int = (s.c_id)::int; - --- join removal is not possible when the GROUP BY contains a column that is --- not in the join condition. (Note: as of 9.6, we notice that b.id is a --- primary key and so drop b.c_id from the GROUP BY of the resulting plan; --- but this happens too late for join removal in the outer plan level.) ---Testcase 369: -explain (costs off) -select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b group by b.id, b.c_id) s - on (d.a)::int = (s.id)::int; - --- similarly, but keying off a DISTINCT clause ---Testcase 370: -explain (costs off) -select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select distinct * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b) s - on (d.a)::int = (s.id)::int; - --- check join removal works when uniqueness of the join condition is enforced --- by a UNION ---Testcase 371: -explain (costs off) -select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select (fields->>'id')::int id from a union select (fields->>'id')::int id from b) s - on (d.a)::int = (s.id)::int; - --- check join removal with a cross-type comparison operator ---Testcase 372: -explain (costs off) -select i8.* from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join (select (fields->>'f1')::int f1 from int4_tbl group by (fields->>'f1')::int) i4 - on (i8.q1)::int8 = (i4.f1)::int4; - --- check join removal with lateral references ---Testcase 373: -explain (costs off) -select 1 from (select (a.fields->>'id')::int id FROM a left join b on (a.fields->>'b_id')::int = (b.fields->>'id')::int) q, - lateral generate_series(1, (q.id)::int) gs(i) where (q.id)::int = (gs.i)::int; - ---Testcase 374: -DELETE FROM a_nsc; ---Testcase 375: -DELETE FROM b_nsc; ---Testcase 376: -DELETE FROM c_nsc; ---Testcase 377: -DELETE FROM d_nsc; ---Testcase 378: -DROP FOREIGN TABLE a; -DROP FOREIGN TABLE a_nsc; ---Testcase 379: -DROP FOREIGN TABLE b; -DROP FOREIGN TABLE b_nsc; ---Testcase 380: -DROP FOREIGN TABLE c; -DROP FOREIGN TABLE c_nsc; ---Testcase 381: -DROP FOREIGN TABLE d; -DROP FOREIGN TABLE d_nsc; -rollback; - ---Testcase 382: -create foreign table parent (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table parent_nsc (k int, pd int) server influxdb_svr OPTIONS (table 'parent'); ---Testcase 383: -create foreign table child (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table child_nsc (k int, cd int) server influxdb_svr OPTIONS (table 'child'); ---Testcase 384: -insert into parent_nsc values (1, 10), (2, 20), (3, 30); ---Testcase 385: -insert into child_nsc values (1, 100), (4, 400); --- this case is optimizable ---Testcase 386: -select p.* from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c on ((p.k)::int = (c.k)::int); ---Testcase 387: -explain (costs off) - select p.* from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c on ((p.k)::int = (c.k)::int); - --- this case is not ---Testcase 388: -select p.*, linked from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p - left join (select c.*, true as linked from (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c) as ss - on (p.k = ss.k); ---Testcase 389: -explain (costs off) - select p.*, linked from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p - left join (select c.*, true as linked from (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c) as ss - on (p.k = ss.k); - --- check for a 9.0rc1 bug: join removal breaks pseudoconstant qual handling ---Testcase 390: -select p.* from - (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int) - where (p.k)::int = 1 and (p.k)::int = 2; ---Testcase 391: -explain (costs off) -select p.* from - (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int) - where (p.k)::int = 1 and (p.k)::int = 2; - ---Testcase 392: -select p.* from - ((select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int)) join (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) x on (p.k)::int = (x.k)::int - where (p.k)::int = 1 and (p.k)::int = 2; ---Testcase 393: -explain (costs off) -select p.* from - ((select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int)) join (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) x on (p.k)::int = (x.k)::int - where (p.k)::int = 1 and (p.k)::int = 2; - --- bug 5255: this is not optimizable by join removal -begin; - ---Testcase 394: -CREATE FOREIGN TABLE a (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE a_nsc (id int) SERVER influxdb_svr OPTIONS (table 'a'); ---Testcase 395: -CREATE FOREIGN TABLE b (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); -CREATE FOREIGN TABLE b_nsc (id int, a_id int) SERVER influxdb_svr OPTIONS (table 'b'); ---Testcase 396: -INSERT INTO a_nsc VALUES (0), (1); ---Testcase 397: -INSERT INTO b_nsc VALUES (0, 0), (1, NULL); ---Testcase 398: -SELECT * FROM (select (fields->>'id')::int id, (fields->>'a_id')::int a_id from b) b LEFT JOIN (select (fields->>'id')::int id from a) a ON ((b.a_id)::int = (a.id)::int) WHERE ((a.id)::int IS NULL OR (a.id)::int > 0); ---Testcase 399: -SELECT b.* FROM (select (fields->>'id')::int id, (fields->>'a_id')::int a_id from b) b LEFT JOIN (select (fields->>'id')::int id from a) a ON ((b.a_id)::int = (a.id)::int) WHERE ((a.id)::int IS NULL OR (a.id)::int > 0); - ---Testcase 400: -DELETE FROM a_nsc; ---Testcase 401: -DELETE FROM b_nsc; ---Testcase 402: -DROP FOREIGN TABLE a; -DROP FOREIGN TABLE a_nsc; ---Testcase 403: -DROP FOREIGN TABLE b; -DROP FOREIGN TABLE b_nsc; -rollback; - --- another join removal bug: this is not optimizable, either -begin; - ---Testcase 404: -create foreign table innertab (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table innertab_nsc (id int8, dat1 int8) server influxdb_svr OPTIONS (table 'innertab'); ---Testcase 405: -insert into innertab_nsc values(123, 42); ---Testcase 406: -SELECT * FROM - (SELECT 1 AS x) ss1 - LEFT JOIN - (SELECT q1, q2, COALESCE(dat1, q1) AS y - FROM (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl LEFT JOIN (select (fields->>'id')::int id, (fields->>'dat1')::int dat1 from innertab) innertab ON (q2)::int8 = (id)::int) ss2 - ON true; - --- Clean up -DELETE FROM innertab_nsc; -DROP FOREIGN TABLE innertab; -DROP FOREIGN TABLE innertab_nsc; - -rollback; - --- another join removal bug: we must clean up correctly when removing a PHV -begin; - ---Testcase 407: -create foreign table uniquetbl (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); - ---Testcase 408: -explain (costs off) -select t1.* from - (select fields->>'f1' f1 from uniquetbl t1) as t1 - left join (select *, '***'::text as d1 from (select fields->>'f1' f1 from uniquetbl uniquetbl) uniquetbl) t2 - on t1.f1 = t2.f1 - left join (select fields->>'f1' f1 from uniquetbl t3) t3 - on t2.d1 = t3.f1; - ---Testcase 409: -explain (costs off) -select t0.* -from - (select fields->>'f1' f1 from text_tbl t0) t0 - left join - (select case (t1.fields->>'ten')::int4 when 0 then 'doh!'::text else null::text end as case1, - t1.fields->>'stringu2' stringu2 - from tenk1 t1 - join int4_tbl i4 ON (i4.fields->>'f1')::int4 = (t1.fields->>'unique2')::int4 - left join uniquetbl u1 ON u1.fields->>'f1' = (t1.fields->>'string4')::name) ss - on t0.f1 = ss.case1 -where ss.stringu2 !~* ss.case1; - ---Testcase 410: -select t0.* -from - (select fields->>'f1' f1 from text_tbl t0) t0 - left join - (select case (t1.fields->>'ten')::int4 when 0 then 'doh!'::text else null::text end as case1, - t1.fields->>'stringu2' stringu2 - from tenk1 t1 - join int4_tbl i4 ON (i4.fields->>'f1')::int4 = (t1.fields->>'unique2')::int4 - left join uniquetbl u1 ON u1.fields->>'f1' = (t1.fields->>'string4')::name) ss - on t0.f1 = ss.case1 -where ss.stringu2 !~* ss.case1; - -rollback; - --- test case to expose miscomputation of required relid set for a PHV ---Testcase 411: -explain (verbose, costs off) -select i8.*, ss.v, (t.fields->>'unique2')::int4 unique2 - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join int4_tbl i4 on (i4.fields->>'f1')::int4 = 1 - left join lateral (select (i4.fields->>'f1')::int4 + 1 as v) as ss on true - left join tenk1 t on (t.fields->>'unique2')::int4 = (ss.v)::int4 -where q2::int8 = 456; - ---Testcase 412: -select i8.*, ss.v, (t.fields->>'unique2')::int4 unique2 - from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 - left join int4_tbl i4 on (i4.fields->>'f1')::int4 = 1 - left join lateral (select (i4.fields->>'f1')::int4 + 1 as v) as ss on true - left join tenk1 t on (t.fields->>'unique2')::int4 = (ss.v)::int4 -where q2::int8 = 456; - --- bug #8444: we've historically allowed duplicate aliases within aliased JOINs - ---Testcase 413: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = f1; -- error ---Testcase 414: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = y.f1; -- error ---Testcase 415: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y(ff)) j on q1 = f1; -- ok - --- --- Test hints given on incorrect column references are useful --- - ---Testcase 416: -select( t1.ffields->>'unique1')::int4 unique1 from - tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, prefer "t1" suggestion ---Testcase 417: -select (t2.ffields->>'unique1')::int4 unique1 from - tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, prefer "t2" suggestion ---Testcase 418: -select (ffields->>'unique1')::int4 unique1 from - tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, suggest both at once - --- --- Take care to reference the correct RTE --- - ---Testcase 556: -select atts.relid::regclass, s.* from pg_stats s join - pg_attribute a on s.attname = a.attname and s.tablename = - a.attrelid::regclass::text join (select unnest(indkey) attnum, - indexrelid from pg_index i) atts on atts.attnum = a.attnum where - schemaname != 'pg_catalog'; - --- --- Test LATERAL --- - ---Testcase 419: -select unique2, x.* -from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1 a) a, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b where f1 = a.unique1) x; ---Testcase 420: -explain (costs off) - select unique2, x.* - from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1 a) a, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b where f1 = a.unique1) x; ---Testcase 421: -select unique2, x.* -from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x, lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; ---Testcase 422: -explain (costs off) - select unique2, x.* - from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x, lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; ---Testcase 423: -explain (costs off) - select unique2, x.* - from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x cross join lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; ---Testcase 424: -select unique2, x.* -from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x left join lateral (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss on true; ---Testcase 425: -explain (costs off) - select unique2, x.* - from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x left join lateral (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss on true; - --- check scoping of lateral versus parent references --- the first of these should return int8_tbl.q2, the second int8_tbl.q1 ---Testcase 426: -select *, (select r from (select q1 as q2) x, (select q2 as r) y) from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl; ---Testcase 427: -select *, (select r from (select q1 as q2) x, lateral (select q2 as r) y) from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl; - --- lateral with function in FROM ---Testcase 428: -select count(*) from tenk1 a, lateral generate_series(1, (fields->>'two')::int4) g; ---Testcase 429: -explain (costs off) - select count(*) from tenk1 a, lateral generate_series(1, (fields->>'two')::int4) g; ---Testcase 430: -explain (costs off) - select count(*) from tenk1 a cross join lateral generate_series(1,(fields->>'two')::int4) g; --- don't need the explicit LATERAL keyword for functions ---Testcase 431: -explain (costs off) - select count(*) from tenk1 a, generate_series(1,(fields->>'two')::int4) g; - --- lateral with UNION ALL subselect ---Testcase 432: -explain (costs off) - select * from generate_series(100,200) g, - lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a where g = (q1)::int8 union all - select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b where g = (q2)::int8) ss; ---Testcase 433: -select * from generate_series(100,200) g, - lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a where g = (q1)::int8 union all - select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b where g = (q2)::int8) ss; - --- lateral with VALUES ---Testcase 434: -explain (costs off) - select count(*) from tenk1 a, - tenk1 b join lateral (values(a.fields->>'unique1')) ss(x) on b.fields->>'unique2' = ss.x; ---Testcase 435: -select count(*) from tenk1 a, - tenk1 b join lateral (values(a.fields->>'unique1')) ss(x) on b.fields->>'unique2' = ss.x; - --- lateral with VALUES, no flattening possible ---Testcase 436: -explain (costs off) - select count(*) from tenk1 a, - tenk1 b join lateral (values((a.fields->>'unique1')::int4),(-1)) ss(x) on (b.fields->>'unique2')::int4 = (ss.x)::int; ---Testcase 437: -select count(*) from tenk1 a, - tenk1 b join lateral (values((a.fields->>'unique1')::int4),(-1)) ss(x) on (b.fields->>'unique2')::int4 = (ss.x)::int; - --- lateral injecting a strange outer join condition ---Testcase 438: -explain (costs off) - select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL x) x left join lateral (select a.q1 from (select (fields->>'f1')::int4 f1 from INT4_TBL y) y) ss(z) - on x.q2 = ss.z - order by (a.q1)::int8, (a.q2)::int8, (x.q1)::int8, (x.q2)::int8, (ss.z)::int8; ---Testcase 439: -select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL x) x left join lateral (select a.q1 from (select (fields->>'f1')::int4 f1 from INT4_TBL y) y) ss(z) - on x.q2 = ss.z - order by (a.q1)::int8, (a.q2)::int8, (x.q1)::int8, (x.q2)::int8, (ss.z)::int8; - --- lateral reference to a join alias variable ---Testcase 440: -select * from (select (fields->>'f1')::int4/2 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4, - lateral (select x) ss2(y); ---Testcase 441: -select * from (select (fields->>'f1')::int4 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4, - lateral (values(x)) ss2(y); ---Testcase 442: -select * from ((select (fields->>'f1')::int4/2 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4) j, - lateral (select x) ss2(y); - --- lateral references requiring pullup ---Testcase 443: -select * from (values(1)) x(lb), - lateral generate_series(lb,4) x4; ---Testcase 444: -select * from (select (fields->>'f1')::int4/1000000000 from int4_tbl) x(lb), - lateral generate_series(lb,4) x4; ---Testcase 445: -select * from (values(1)) x(lb), - lateral (values(lb)) y(lbcopy); ---Testcase 446: -select * from (values(1)) x(lb), - lateral (select lb from int4_tbl) y(lbcopy); ---Testcase 447: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (values(x.q1,y.q1,y.q2)) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; ---Testcase 448: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; ---Testcase 449: -select x.* from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; ---Testcase 450: -select v.* from - (int8_tbl x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) - left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, - lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 union all select (x.fields->>'q2')::int8,(y.q2)::int8) v(vx,vy); ---Testcase 451: -select v.* from - (int8_tbl x left join (select (fields->>'q1')::int8 q1,(select coalesce((fields->>'q2')::int8,0)) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) - left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, - lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 union all select (x.fields->>'q2')::int8,(y.q2)::int8) v(vx,vy); ---Testcase 452: -select v.* from - (int8_tbl x left join (select (fields->>'q1')::int8 q1,(select coalesce((fields->>'q2')::int8,0)) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) - left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, - lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 from onerow union all select (x.fields->>'q2')::int8,(y.q2)::int8 from onerow) v(vx,vy); - ---Testcase 453: -explain (verbose, costs off) -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join - lateral (select *, a.q2 as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; ---Testcase 454: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join - lateral (select *, a.q2 as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; ---Testcase 455: -explain (verbose, costs off) -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join - lateral (select *, coalesce((a.q2)::int8, 42) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; ---Testcase 456: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join - lateral (select *, coalesce((a.q2)::int8, 42) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; - --- lateral can result in join conditions appearing below their --- real semantic level ---Testcase 457: -explain (verbose, costs off) -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join - lateral (select * from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; ---Testcase 458: -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join - lateral (select * from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; ---Testcase 459: -explain (verbose, costs off) -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join - lateral (select coalesce(i) from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; ---Testcase 460: -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join - lateral (select coalesce(i) from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; ---Testcase 461: -explain (verbose, costs off) -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a, - lateral ( - select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c on (b.f1 = q1 and a.f1 = q2) - ) ss; ---Testcase 462: -select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a, - lateral ( - select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c on (b.f1 = q1 and a.f1 = q2) - ) ss; - --- lateral reference in a PlaceHolderVar evaluated at join level ---Testcase 463: -explain (verbose, costs off) -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join lateral - (select (b.fields->>'q1')::int8 as bq1, (c.fields->>'q1')::int8 as cq1, least(a.q1,(b.fields->>'q1')::int8,(c.fields->>'q1')::int8) from - int8_tbl b cross join int8_tbl c) ss - on a.q2 = ss.bq1; ---Testcase 464: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join lateral - (select (b.fields->>'q1')::int8 as bq1, (c.fields->>'q1')::int8 as cq1, least(a.q1,(b.fields->>'q1')::int8,(c.fields->>'q1')::int8) from - int8_tbl b cross join int8_tbl c) ss - on a.q2 = ss.bq1; - --- case requiring nested PlaceHolderVars ---Testcase 465: -explain (verbose, costs off) -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c left join ( - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'q1')::int8 q1, coalesce((fields->>'q2')::int8,42) as x from int8_tbl b) ss1 - on a.q2 = ss1.q1 - cross join - lateral (select (fields->>'q1')::int8 q1, coalesce(ss1.x,(fields->>'q2')::int8) as y from int8_tbl d) ss2 - ) on c.q2 = ss2.q1, - lateral (select ss2.y offset 0) ss3; - --- case that breaks the old ph_may_need optimization ---Testcase 466: -explain (verbose, costs off) -select c.*,a.*,ss1.q1,ss2.q1,ss3.* from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c left join ( - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join - (select q1, coalesce(q2,f1) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b, (select (fields->>'f1')::int4 f1 from INT4_TBL b2) b2 - where (q1)::int8 < (f1)::int4) ss1 - on a.q2 = ss1.q1 - cross join - lateral (select (fields->>'q1')::int8 q1, coalesce(ss1.x,(fields->>'q2')::int8) as y from int8_tbl d) ss2 - ) on c.q2 = ss2.q1, - lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i where (ss2.y)::int8 > (f1)::int4) ss3; - --- check processing of postponed quals (bug #9041) ---Testcase 467: -explain (verbose, costs off) -select * from - (select 1 as x offset 0) x cross join (select 2 as y offset 0) y - left join lateral ( - select * from (select 3 as z offset 0) z where z.z = x.x - ) zz on zz.z = y.y; - --- check dummy rels with lateral references (bug #15694) ---Testcase 468: -explain (verbose, costs off) -select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join lateral - (select *, i8.q2 from (select (fields->>'f1')::int4 f1 from INT4_TBL int4_tbl) int4_tbl where false) ss on true; ---Testcase 469: -explain (verbose, costs off) -select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join lateral - (select *, i8.q2 from (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1, (select (fields->>'f1')::int4 f1 from INT4_TBL i2) i2 where false) ss on true; - --- check handling of nested appendrels inside LATERAL ---Testcase 470: -select * from - ((select 2 as v) union all (select 3 as v)) as q1 - cross join lateral - ((select * from - ((select 4 as v) union all (select 5 as v)) as q3) - union all - (select q1.v) - ) as q2; - --- check we don't try to do a unique-ified semijoin with LATERAL ---Testcase 471: -explain (verbose, costs off) -select * from - (values (0,9998), (1,1000)) v(id,x), - lateral (select (fields->>'f1')::int4 f1 from INT4_TBL - where (fields->>'f1')::int4 = any (select (fields->>'unique1')::int4 from tenk1 - where (fields->>'unique2')::int4 = v.x offset 0)) ss; ---Testcase 472: -select * from - (values (0,9998), (1,1000)) v(id,x), - lateral (select (fields->>'f1')::int4 f1 from INT4_TBL - where (fields->>'f1')::int4 = any (select (fields->>'unique1')::int4 from tenk1 - where (fields->>'unique2')::int4 = v.x offset 0)) ss; - --- check proper extParam/allParam handling (this isn't exactly a LATERAL issue, --- but we can make the test case much more compact with LATERAL) ---Testcase 473: -explain (verbose, costs off) -select * from (values (0), (1)) v(id), -lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1, - lateral (select * from - (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 - where q1 = any (select (fields->>'q2')::int8 from int8_tbl t3 - where (fields->>'q2')::int8 = (select greatest(t1.q1,t2.q2)) - and (select v.id=0)) offset 0) ss2) ss - where (t1.q1)::int8 = (ss.q2)::int8) ss0; - ---Testcase 474: -select * from (values (0), (1)) v(id), -lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1, - lateral (select * from - (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 - where q1 = any (select (fields->>'q2')::int8 from int8_tbl t3 - where (fields->>'q2')::int8 = (select greatest(t1.q1,t2.q2)) - and (select v.id=0)) offset 0) ss2) ss - where t1.q1 = ss.q2) ss0; - --- test some error cases where LATERAL should have been used but wasn't ---Testcase 475: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a, (select fields->>'f1' as g) ss; ---Testcase 476: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a, (select a.fields->>'f1' as g) ss; ---Testcase 477: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a cross join (select fields->>'f1' as g) ss; ---Testcase 478: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a cross join (select a.fields->>'f1' as g) ss; --- SQL:2008 says the left table is in scope but illegal to access here ---Testcase 479: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a right join lateral generate_series(0, (a.fields->>'f1')::int4) g on true; ---Testcase 480: -select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a full join lateral generate_series(0, (a.fields->>'f1')::int4) g on true; --- check we complain about ambiguous table references ---Testcase 481: -select * from - (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x cross join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join lateral (select x.f1) ss); --- LATERAL can be used to put an aggregate into the FROM clause of its query ---Testcase 482: -select 1 from tenk1 a, lateral (select max((a.fields->>'unique1')::int4) from int4_tbl b) ss; - --- check behavior of LATERAL in UPDATE/DELETE - ---Testcase 483: -create temp table xx1 as select fields->>'f1' as x1, -(fields->>'f1')::int4 as x2 from int4_tbl; - --- error, can't do this: ---Testcase 484: -update xx1 set x2 = f1 from (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; ---Testcase 485: -update xx1 set x2 = f1 from (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss; --- can't do it even with LATERAL: ---Testcase 486: -update xx1 set x2 = f1 from lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; --- we might in future allow something like this, but for now it's an error: ---Testcase 487: -update xx1 set x2 = f1 from xx1, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; - --- also errors: ---Testcase 488: -delete from xx1 using (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; ---Testcase 489: -delete from xx1 using (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss; ---Testcase 490: -delete from xx1 using lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; - -/* --- Influx does not support partition table --- --- test LATERAL reference propagation down a multi-level inheritance hierarchy --- produced for a multi-level partitioned table hierarchy. --- -create table join_pt1 (a int, b int, c varchar) partition by range(a); -create table join_pt1p1 partition of join_pt1 for values from (0) to (100) partition by range(b); -create table join_pt1p2 partition of join_pt1 for values from (100) to (200); -create table join_pt1p1p1 partition of join_pt1p1 for values from (0) to (100); -insert into join_pt1 values (1, 1, 'x'), (101, 101, 'y'); -create table join_ut1 (a int, b int, c varchar); -insert into join_ut1 values (101, 101, 'y'), (2, 2, 'z'); -explain (verbose, costs off) -select t1.b, ss.phv from join_ut1 t1 left join lateral - (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv - from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss - on t1.a = ss.t2a order by t1.a; -select t1.b, ss.phv from join_ut1 t1 left join lateral - (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv - from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss - on t1.a = ss.t2a order by t1.a; - -drop table join_pt1; -drop table join_ut1; - --- --- test estimation behavior with multi-column foreign key and constant qual --- - -begin; - -create table fkest (x integer, x10 integer, x10b integer, x100 integer); -insert into fkest select x, x/10, x/10, x/100 from generate_series(1,1000) x; -create unique index on fkest(x, x10, x100); -analyze fkest; - -explain (costs off) -select * from fkest f1 - join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) - join fkest f3 on f1.x = f3.x - where f1.x100 = 2; - -alter table fkest add constraint fk - foreign key (x, x10b, x100) references fkest (x, x10, x100); - -explain (costs off) -select * from fkest f1 - join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) - join fkest f3 on f1.x = f3.x - where f1.x100 = 2; - -rollback; -*/ - --- --- test that foreign key join estimation performs sanely for outer joins --- - -begin; - ---Testcase 491: -create foreign table fkest (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table fkest_nsc (a int, b int, c int) server influxdb_svr OPTIONS (table 'fkest'); ---Testcase 492: -create foreign table fkest1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table fkest1_nsc (a int, b int) server influxdb_svr OPTIONS (table 'fkest1'); ---Testcase 493: -insert into fkest_nsc select x/10, x%10, x from generate_series(1,1000) x; ---Testcase 494: -insert into fkest1_nsc select x/10, x%10 from generate_series(1,1000) x; ---Testcase 495: -explain (costs off) -select * -from (select (fields->>'a')::int a, (fields->>'b')::int b, (fields->>'c')::int c from fkest f) f - left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f1) f1 on (f.a)::int = (f1.a)::int and (f.b)::int = (f1.b)::int - left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f2) f2 on (f.a)::int = (f2.a)::int and (f.b)::int = (f2.b)::int - left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f3) f3 on (f.a)::int = (f3.a)::int and (f.b)::int = (f3.b)::int -where (f.c)::bigint = 1; - -rollback; - --- --- test planner's ability to mark joins as unique --- - ---Testcase 496: -create foreign table j1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j1_nsc (id int) server influxdb_svr OPTIONS (table 'j1'); ---Testcase 497: -create foreign table j2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j2_nsc (id int) server influxdb_svr OPTIONS (table 'j2'); ---Testcase 498: -create foreign table j3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j3_nsc (id int) server influxdb_svr OPTIONS (table 'j3'); ---Testcase 499: -insert into j1_nsc values(1),(2),(3); ---Testcase 500: -insert into j2_nsc values(1),(2),(3); ---Testcase 501: -insert into j3_nsc values(1),(1); --- ensure join is properly marked as unique ---Testcase 502: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; - --- ensure join is not unique when not an equi-join ---Testcase 503: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int > (j2.id)::int; - --- ensure non-unique rel is not chosen as inner ---Testcase 504: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j3) j3 on (j1.id)::int = (j3.id)::int; - --- ensure left join is marked as unique ---Testcase 505: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 left join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; - --- ensure right join is marked as unique ---Testcase 506: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 right join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; - --- ensure full join is marked as unique ---Testcase 507: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 full join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; - --- a clauseless (cross) join can't be unique ---Testcase 508: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 cross join (select (fields->>'id')::int id from j2) j2; - --- ensure a natural join is marked as unique ---Testcase 509: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1) j1 natural join (select (fields->>'id')::int id from j2) j2; - --- ensure a distinct clause allows the inner to become unique ---Testcase 510: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1 j1) j1 -inner join (select distinct (fields->>'id')::int id from j3 j3) j3 on (j1.id)::int = (j3.id)::int; - --- ensure group by clause allows the inner to become unique ---Testcase 511: -explain (verbose, costs off) -select * from (select (fields->>'id')::int id from j1 j1) j1 -inner join (select (fields->>'id')::int id from j3 j3 group by fields->>'id') j3 on (j1.id)::int = (j3.id)::int; - ---Testcase 512: -delete from j1_nsc; ---Testcase 513: -delete from j2_nsc; ---Testcase 514: -delete from j3_nsc; ---Testcase 515: -drop foreign table j1; -drop foreign table j1_nsc; ---Testcase 516: -drop foreign table j2; -drop foreign table j2_nsc; ---Testcase 517: -drop foreign table j3; -drop foreign table j3_nsc; - --- test more complex permutations of unique joins - ---Testcase 518: -create foreign table j1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j1_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j1'); ---Testcase 519: -create foreign table j2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j2_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j2'); ---Testcase 520: -create foreign table j3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); -create foreign table j3_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j3'); ---Testcase 521: -insert into j1_nsc values(1,1),(1,2); ---Testcase 522: -insert into j2_nsc values(1,1); ---Testcase 523: -insert into j3_nsc values(1,1); --- ensure there's no unique join when not all columns which are part of the --- unique index are seen in the join clause ---Testcase 524: -explain (verbose, costs off) -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int; - --- ensure proper unique detection with multiple join quals ---Testcase 525: -explain (verbose, costs off) -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int and (j1.id2)::int = (j2.id2)::int; - --- ensure we don't detect the join to be unique when quals are not part of the --- join condition ---Testcase 526: -explain (verbose, costs off) -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int where (j1.id2)::int = 1; - --- as above, but for left joins. ---Testcase 527: -explain (verbose, costs off) -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -left join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int where (j1.id2)::int = 1; - --- validate logic in merge joins which skips mark and restore. --- it should only do this if all quals which were used to detect the unique --- are present as join quals, and not plain quals. ---Testcase 528: -set enable_nestloop to 0; ---Testcase 529: -set enable_hashjoin to 0; ---Testcase 530: -set enable_sort to 0; - --- create indexes that will be preferred over the PKs to perform the join ---create index j1_id1_idx on j1 (id1) where id1 % 1000 = 1; ---create index j2_id1_idx on j2 (id1) where id1 % 1000 = 1; - --- need an additional row in j2, if we want j2_id1_idx to be preferred ---Testcase 531: -insert into j2_nsc values(1,2); ---analyze j2; - ---Testcase 532: -explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1; - ---Testcase 533: -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1; - --- Exercise array keys mark/restore B-Tree code ---Testcase 534: -explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int = any (array[1]); - ---Testcase 535: -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int = any (array[1]); - --- Exercise array keys "find extreme element" B-Tree code ---Testcase 536: -explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int >= any (array[1,5]); - ---Testcase 537: -select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 -inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int >= any (array[1,5]); - ---Testcase 538: -reset enable_nestloop; ---Testcase 539: -reset enable_hashjoin; ---Testcase 540: -reset enable_sort; - ---Testcase 541: -delete from j1_nsc; ---Testcase 542: -delete from j2_nsc; ---Testcase 543: -delete from j3_nsc; ---Testcase 544: -drop foreign table j1; -drop foreign table j1_nsc; ---Testcase 545: -drop foreign table j2; -drop foreign table j2_nsc; ---Testcase 546: -drop foreign table j3; -drop foreign table j3_nsc; - --- check that semijoin inner is not seen as unique for a portion of the outerrel ---Testcase 547: -CREATE FOREIGN TABLE onek ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS(schemaless 'true'); - --- check that semijoin inner is not seen as unique for a portion of the outerrel ---Testcase 548: -explain (verbose, costs off) -select (t1.fields->>'unique1')::int4 unique1, (t2.fields->>'hundred')::int4 hundred -from onek t1, tenk1 t2 -where exists (select 1 from tenk1 t3 - where (t3.fields->>'thousand')::int4 = (t1.fields->>'unique1')::int4 and (t3.fields->>'tenthous')::int4 = (t2.fields->>'hundred')::int4) - and (t1.fields->>'unique1')::int4 < 1; - --- ... unless it actually is unique ---Testcase 549: -create table j3 as select (fields->>'unique1')::int4 unique1, (fields->>'tenthous')::int4 tenthous from onek; -vacuum analyze j3; ---Testcase 550: -create unique index on j3(unique1, tenthous); - ---Testcase 551: -explain (verbose, costs off) -select (t1.fields->>'unique1')::int4 unique1, (t2.fields->>'hundred')::int4 hundred -from onek t1, tenk1 t2 -where exists (select 1 from j3 - where j3.unique1 = (t1.fields->>'unique1')::int4 and j3.tenthous = (t2.fields->>'hundred')::int4) - and (t1.fields->>'unique1')::int4 < 1; - ---Testcase 552: -drop table j3; - --- Clean up -DELETE FROM t1_nsc; -DELETE FROM t2_nsc; -DELETE FROM t3_nsc; -DELETE FROM tt1_nsc; -DELETE FROM tt2_nsc; -DELETE FROM tt3_nsc; -DELETE FROM tt4_nsc; -DELETE FROM tt5_nsc; -DELETE FROM tt6_nsc; -DELETE FROM xx_nsc; -DELETE FROM yy_nsc; -DELETE FROM zt1_nsc; -DELETE FROM zt2_nsc; -DELETE FROM nt1_nsc; -DELETE FROM nt2_nsc; -DELETE FROM nt3_nsc; -DELETE FROM parent_nsc; -DELETE FROM child_nsc; - -DO $d$ -declare - l_rec record; -begin - for l_rec in (select foreign_table_schema, foreign_table_name - from information_schema.foreign_tables) loop - execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); - end loop; -end; -$d$; - ---Testcase 553: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 554: -DROP SERVER influxdb_svr CASCADE; ---Testcase 555: -DROP EXTENSION influxdb_fdw; diff --git a/sql/11.13/aggregate.sql b/sql/11.17/aggregate.sql similarity index 98% rename from sql/11.13/aggregate.sql rename to sql/11.17/aggregate.sql index 4368c6d..da4875a 100644 --- a/sql/11.13/aggregate.sql +++ b/sql/11.17/aggregate.sql @@ -15,9 +15,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); diff --git a/sql/11.13/extra/aggregates.sql b/sql/11.17/extra/aggregates.sql similarity index 99% rename from sql/11.13/extra/aggregates.sql rename to sql/11.17/extra/aggregates.sql index 53ef0aa..6e6cae8 100644 --- a/sql/11.13/extra/aggregates.sql +++ b/sql/11.17/extra/aggregates.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( diff --git a/sql/11.13/extra/influxdb_fdw_post.sql b/sql/11.17/extra/influxdb_fdw_post.sql similarity index 99% rename from sql/11.13/extra/influxdb_fdw_post.sql rename to sql/11.17/extra/influxdb_fdw_post.sql index 6f507b6..65ff3b8 100644 --- a/sql/11.13/extra/influxdb_fdw_post.sql +++ b/sql/11.17/extra/influxdb_fdw_post.sql @@ -12,17 +12,17 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server @@ -764,7 +764,7 @@ DROP FOREIGN TABLE local_tbl; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; diff --git a/sql/10.18/extra/init.sql b/sql/11.17/extra/init.sql similarity index 100% rename from sql/10.18/extra/init.sql rename to sql/11.17/extra/init.sql diff --git a/sql/10.18/extra/insert.sql b/sql/11.17/extra/insert.sql similarity index 99% rename from sql/10.18/extra/insert.sql rename to sql/11.17/extra/insert.sql index 6003590..785e0ef 100644 --- a/sql/10.18/extra/insert.sql +++ b/sql/11.17/extra/insert.sql @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list diff --git a/sql/12.8/extra/join.sql b/sql/11.17/extra/join.sql similarity index 99% rename from sql/12.8/extra/join.sql rename to sql/11.17/extra/join.sql index 368a813..4737d00 100644 --- a/sql/12.8/extra/join.sql +++ b/sql/11.17/extra/join.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; @@ -2516,6 +2516,9 @@ select * from (select q1.v) ) as q2; +-- check the number of columns specified +SELECT * FROM (int8_tbl i cross join int4_tbl j) ss(a,b,c,d); + -- check we don't try to do a unique-ified semijoin with LATERAL --Testcase 471: explain (verbose, costs off) diff --git a/sql/10.18/extra/limit.sql b/sql/11.17/extra/limit.sql similarity index 98% rename from sql/10.18/extra/limit.sql rename to sql/11.17/extra/limit.sql index 94d233f..eb907d3 100644 --- a/sql/10.18/extra/limit.sql +++ b/sql/11.17/extra/limit.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; diff --git a/sql/10.18/extra/prepare.sql b/sql/11.17/extra/prepare.sql similarity index 96% rename from sql/10.18/extra/prepare.sql rename to sql/11.17/extra/prepare.sql index f7d2710..13c7439 100644 --- a/sql/10.18/extra/prepare.sql +++ b/sql/11.17/extra/prepare.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 30: CREATE FOREIGN TABLE tenk1 ( diff --git a/sql/11.13/extra/select.sql b/sql/11.17/extra/select.sql similarity index 98% rename from sql/11.13/extra/select.sql rename to sql/11.17/extra/select.sql index 3cb4fc5..db8bf84 100644 --- a/sql/11.13/extra/select.sql +++ b/sql/11.17/extra/select.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( diff --git a/sql/10.18/extra/select_having.sql b/sql/11.17/extra/select_having.sql similarity index 95% rename from sql/10.18/extra/select_having.sql rename to sql/11.17/extra/select_having.sql index c912bed..4e2b933 100644 --- a/sql/10.18/extra/select_having.sql +++ b/sql/11.17/extra/select_having.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; diff --git a/sql/11.13/influxdb_fdw.sql b/sql/11.17/influxdb_fdw.sql similarity index 92% rename from sql/11.13/influxdb_fdw.sql rename to sql/11.17/influxdb_fdw.sql index ef62790..c7f5e2a 100644 --- a/sql/11.13/influxdb_fdw.sql +++ b/sql/11.17/influxdb_fdw.sql @@ -14,9 +14,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --Testcase 6: @@ -584,8 +584,38 @@ DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05: --Testcase 200: SELECT * FROM cpu; +-- InfluxDB_FDW will store time data for Field values as a strings +--Testcase 204: +CREATE FOREIGN TABLE tmp_time ( +time timestamp, +c1 time, +c2 timestamp, +c3 timestamp with time zone +) SERVER server1 OPTIONS (table 'tmp_time'); +--Testcase 205: +SELECT * FROM tmp_time; +--Testcase 206: +INSERT INTO tmp_time (time, c1) VALUES ('1900-01-01 01:01:01', '01:02:03'); +--Testcase 207: +INSERT INTO tmp_time (time, c1) VALUES ('2100-01-01 01:01:01', '04:05:06'); +--Testcase 208: +INSERT INTO tmp_time (time, c1) VALUES ('1990-01-01 01:01:01', '07:08:09'); +--Testcase 209: +INSERT INTO tmp_time (time, c2) VALUES ('2020-12-27 03:02:56.634467', '1950-02-02 02:02:02'); +--Testcase 210: +INSERT INTO tmp_time (time, c3) VALUES ('2021-12-27 03:02:56.668301', '1800-02-02 02:02:02+9'); +--Testcase 210: +INSERT INTO tmp_time (time, c1, c2, c3) VALUES ('2022-05-06 07:08:09', '07:08:09', '2022-05-06 07:08:09', '2022-05-06 07:08:09+9'); +--Testcase 211: +-- 1800-02-02 02:02:02+9 is Daylight Saving Time (DST) changes in Japan. +-- Timezone setting Japan so it will plus 18s:59 +-- https://www.timeanddate.com/time/zone/japan/tokyo?syear=1850 +SELECT * FROM tmp_time; + -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP USER MAPPING FOR CURRENT_USER SERVER server1; diff --git a/sql/10.18/init.sql b/sql/11.17/init.sql similarity index 100% rename from sql/10.18/init.sql rename to sql/11.17/init.sql diff --git a/sql/11.17/option.sql b/sql/11.17/option.sql new file mode 100644 index 0000000..35e344b --- /dev/null +++ b/sql/11.17/option.sql @@ -0,0 +1,214 @@ +--Testcase 1: +SET datestyle=ISO; + +--Testcase 2: +CREATE EXTENSION influxdb_fdw; + +-- version not valid +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '9999', retention_policy ''); +--Testcase 4: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version 'dummy', retention_policy ''); +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '-1', retention_policy ''); + +-- host must be not NULL or not empty +--Testcase 6: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', port '38086', version '2', retention_policy ''); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 8: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 9: +SELECT * FROM optiontbl; +--Testcase 10: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 11: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host '', port '38086', version '2', retention_policy ''); +--Testcase 12: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 13: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 14: +SELECT * FROM optiontbl; +--Testcase 15: +DROP SERVER influxdb_svr CASCADE; + +-- dbname must be not NULL or not empty +--Testcase 16: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 17: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 18: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 19: +SELECT * FROM optiontbl; +--Testcase 20: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 21: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname '', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 22: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 23: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 24: +SELECT * FROM optiontbl; +--Testcase 25: +DROP SERVER influxdb_svr CASCADE; + + +-- retention_policy can be NULL +--Testcase 26: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2'); +--Testcase 27: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 28: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 29: +SELECT * FROM optiontbl; +--Testcase 30: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 31: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 32: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 33: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 34: +SELECT * FROM optiontbl; +--Testcase 35: +DROP SERVER influxdb_svr CASCADE; + +-- auth_token can be NULL +--Testcase 36: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 37: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 38: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 39: +SELECT * FROM optiontbl; +--Testcase 40: +DROP SERVER influxdb_svr CASCADE; + +-- auth_token invalid +--Testcase 41: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 42: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'wrong_token'); +--Testcase 43: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 44: +SELECT * FROM optiontbl; +--Testcase 45: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 46: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 47: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token ''); +--Testcase 48: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 49: +SELECT * FROM optiontbl; +--Testcase 50: +DROP SERVER influxdb_svr CASCADE; + +-- user must can be NULL +--Testcase 51: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 52: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (password 'pass'); +--Testcase 53: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 54: +SELECT * FROM optiontbl; +--Testcase 55: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 56: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 57: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password 'pass'); +--Testcase 58: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 59: +SELECT * FROM optiontbl; +--Testcase 60: +DROP SERVER influxdb_svr CASCADE; + +-- password can be NULL +--Testcase 61: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 62: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user'); +--Testcase 63: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 65: +SELECT * FROM optiontbl; +--Testcase 65: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 66: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 67: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password ''); +--Testcase 68: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 69: +SELECT * FROM optiontbl; +--Testcase 70: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 71: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 72: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password ''); +--Testcase 73: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 74: +SELECT * FROM optiontbl; +--Testcase 75: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 76: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 77: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 78: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 79: +SELECT * FROM optiontbl; +--Testcase 80: +DROP SERVER influxdb_svr CASCADE; + +-- Test if version option is not set +-- Connect to InfluxDB version 1 +--Testcase 81: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086'); +--Testcase 82: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 83: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 84: +SELECT * FROM optiontbl; +--Testcase 85: +DROP SERVER influxdb_svr CASCADE; + +-- Connect to InfluxDB version 2 +--Testcase 86: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', retention_policy ''); +--Testcase 87: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 88: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 89: +SELECT * FROM optiontbl; +--Testcase 90: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 91: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/10.18/schemaless/add_fields.sql b/sql/11.17/schemaless/add_fields.sql similarity index 99% rename from sql/10.18/schemaless/add_fields.sql rename to sql/11.17/schemaless/add_fields.sql index 555ff53..503b4d9 100644 --- a/sql/10.18/schemaless/add_fields.sql +++ b/sql/11.17/schemaless/add_fields.sql @@ -7,15 +7,15 @@ SET timezone='UTC'; \set ECHO all -- Init data -\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null +:INIT_FIELDS_ORIGINAL; --Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); @@ -42,7 +42,7 @@ SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), l -------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_1; --Testcase 13: DROP FOREIGN TABLE sctbl1; @@ -156,7 +156,7 @@ SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fiel -------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_20; --Testcase 64: DROP FOREIGN TABLE sctbl1; diff --git a/sql/11.13/schemaless/add_multi_key.sql b/sql/11.17/schemaless/add_multi_key.sql similarity index 99% rename from sql/11.13/schemaless/add_multi_key.sql rename to sql/11.17/schemaless/add_multi_key.sql index b297a54..2575cf5 100644 --- a/sql/11.13/schemaless/add_multi_key.sql +++ b/sql/11.17/schemaless/add_multi_key.sql @@ -7,14 +7,14 @@ SET timezone='UTC'; \set ECHO all -- Init data original -\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null +:INIT_MULTILEY_ORIGINAL; -- Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); @@ -211,7 +211,7 @@ SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3 ---------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; @@ -346,7 +346,7 @@ SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint -- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; diff --git a/sql/12.8/schemaless/add_tags.sql b/sql/11.17/schemaless/add_tags.sql similarity index 99% rename from sql/12.8/schemaless/add_tags.sql rename to sql/11.17/schemaless/add_tags.sql index 1c58358..14e453c 100644 --- a/sql/12.8/schemaless/add_tags.sql +++ b/sql/11.17/schemaless/add_tags.sql @@ -7,14 +7,14 @@ SET timezone='UTC'; \set ECHO all -- Init data original -\! influx -import -path=init/tag_original.txt -precision=s > /dev/null +:INIT_TAG_ORIGINAL; -- Before update data -- Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); @@ -39,7 +39,7 @@ select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::big --------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_1; --Testcase 12: DROP FOREIGN TABLE sctbl4; @@ -114,7 +114,7 @@ select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (se --------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_20; --Testcase 41: DROP FOREIGN TABLE sctbl4; --Testcase 42: diff --git a/sql/12.8/schemaless/aggregate.sql b/sql/11.17/schemaless/aggregate.sql similarity index 98% rename from sql/12.8/schemaless/aggregate.sql rename to sql/11.17/schemaless/aggregate.sql index 812a2a1..92e9dcb 100644 --- a/sql/12.8/schemaless/aggregate.sql +++ b/sql/11.17/schemaless/aggregate.sql @@ -15,9 +15,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); diff --git a/sql/13.4/schemaless/extra/aggregates.sql b/sql/11.17/schemaless/extra/aggregates.sql similarity index 99% rename from sql/13.4/schemaless/extra/aggregates.sql rename to sql/11.17/schemaless/extra/aggregates.sql index 878f2cd..367fe93 100644 --- a/sql/13.4/schemaless/extra/aggregates.sql +++ b/sql/11.17/schemaless/extra/aggregates.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); diff --git a/sql/11.13/schemaless/extra/influxdb_fdw_post.sql b/sql/11.17/schemaless/extra/influxdb_fdw_post.sql similarity index 99% rename from sql/11.13/schemaless/extra/influxdb_fdw_post.sql rename to sql/11.17/schemaless/extra/influxdb_fdw_post.sql index 5fe6fa8..7160ed6 100644 --- a/sql/11.13/schemaless/extra/influxdb_fdw_post.sql +++ b/sql/11.17/schemaless/extra/influxdb_fdw_post.sql @@ -12,17 +12,17 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server @@ -465,6 +465,17 @@ EXPLAIN (VERBOSE, COSTS OFF) --Testcase 95: SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; +-- This test case drop configuration when execute non-schemaless before +DROP TEXT SEARCH CONFIGURATION IF EXISTS public.custom_search; +-- check schema-qualification of regconfig constant +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + -- =================================================================== -- JOIN queries -- =================================================================== @@ -768,7 +779,7 @@ DROP FOREIGN TABLE local_tbl_nsc; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; diff --git a/sql/12.8/schemaless/extra/insert.sql b/sql/11.17/schemaless/extra/insert.sql similarity index 99% rename from sql/12.8/schemaless/extra/insert.sql rename to sql/11.17/schemaless/extra/insert.sql index 67c0557..c124911 100644 --- a/sql/12.8/schemaless/extra/insert.sql +++ b/sql/11.17/schemaless/extra/insert.sql @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list diff --git a/sql/13.4/schemaless/extra/join.sql b/sql/11.17/schemaless/extra/join.sql similarity index 99% rename from sql/13.4/schemaless/extra/join.sql rename to sql/11.17/schemaless/extra/join.sql index 8f2859e..f35384f 100644 --- a/sql/13.4/schemaless/extra/join.sql +++ b/sql/11.17/schemaless/extra/join.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; @@ -719,6 +719,12 @@ select * from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 l --Testcase 158: select t1.x from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'x')::int x, (fields->>'y')::int y from t3) t3 on (t1.a::int = t3.x::int); +-- Test matching of locking clause with wrong alias + +select t1.*, t2.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int), t3 as unnamed_join + for update of unnamed_join; + -- -- regression test for 8.1 merge right join bug -- @@ -2519,6 +2525,9 @@ select * from (select q1.v) ) as q2; +-- check the number of columns specified +SELECT * FROM ((SELECT fields->>'q1', fields->>'q2' FROM int8_tbl) i cross join (SELECT fields->>'f1' FROM int4_tbl) j) ss(a,b,c,d); + -- check we don't try to do a unique-ified semijoin with LATERAL --Testcase 471: explain (verbose, costs off) diff --git a/sql/12.8/schemaless/extra/limit.sql b/sql/11.17/schemaless/extra/limit.sql similarity index 98% rename from sql/12.8/schemaless/extra/limit.sql rename to sql/11.17/schemaless/extra/limit.sql index 941a25c..38ed4d2 100644 --- a/sql/12.8/schemaless/extra/limit.sql +++ b/sql/11.17/schemaless/extra/limit.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; diff --git a/sql/12.8/schemaless/extra/prepare.sql b/sql/11.17/schemaless/extra/prepare.sql similarity index 96% rename from sql/12.8/schemaless/extra/prepare.sql rename to sql/11.17/schemaless/extra/prepare.sql index fbbf92b..e27524d 100644 --- a/sql/12.8/schemaless/extra/prepare.sql +++ b/sql/11.17/schemaless/extra/prepare.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 30: CREATE FOREIGN TABLE tenk1 ( diff --git a/sql/12.8/schemaless/extra/select.sql b/sql/11.17/schemaless/extra/select.sql similarity index 99% rename from sql/12.8/schemaless/extra/select.sql rename to sql/11.17/schemaless/extra/select.sql index 7fed70a..fa7029b 100644 --- a/sql/12.8/schemaless/extra/select.sql +++ b/sql/11.17/schemaless/extra/select.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( diff --git a/sql/10.18/schemaless/extra/select_having.sql b/sql/11.17/schemaless/extra/select_having.sql similarity index 96% rename from sql/10.18/schemaless/extra/select_having.sql rename to sql/11.17/schemaless/extra/select_having.sql index 538049e..8cef2e2 100644 --- a/sql/10.18/schemaless/extra/select_having.sql +++ b/sql/11.17/schemaless/extra/select_having.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); diff --git a/sql/11.13/schemaless/influxdb_fdw.sql b/sql/11.17/schemaless/influxdb_fdw.sql similarity index 99% rename from sql/11.13/schemaless/influxdb_fdw.sql rename to sql/11.17/schemaless/influxdb_fdw.sql index 738636d..03c1399 100644 --- a/sql/11.13/schemaless/influxdb_fdw.sql +++ b/sql/11.17/schemaless/influxdb_fdw.sql @@ -14,9 +14,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --Testcase 6: @@ -586,7 +586,9 @@ DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 SELECT * FROM cpu; -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP FOREIGN TABLE cpu_nsc; diff --git a/sql/10.18/schemaless/init.sql b/sql/11.17/schemaless/init.sql similarity index 100% rename from sql/10.18/schemaless/init.sql rename to sql/11.17/schemaless/init.sql diff --git a/sql/12.8/schemaless/schemaless.sql b/sql/11.17/schemaless/schemaless.sql similarity index 99% rename from sql/12.8/schemaless/schemaless.sql rename to sql/11.17/schemaless/schemaless.sql index e9f49bf..26172a4 100644 --- a/sql/12.8/schemaless/schemaless.sql +++ b/sql/11.17/schemaless/schemaless.sql @@ -15,10 +15,10 @@ DROP EXTENSION IF EXISTS influxdb_fdw CASCADE; CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 5: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- create foreign table --Testcase 7: diff --git a/sql/10.18/schemaless/selectfunc.sql b/sql/11.17/schemaless/selectfunc.sql similarity index 99% rename from sql/10.18/schemaless/selectfunc.sql rename to sql/11.17/schemaless/selectfunc.sql index 4a157e2..8ce5f91 100644 --- a/sql/10.18/schemaless/selectfunc.sql +++ b/sql/11.17/schemaless/selectfunc.sql @@ -11,9 +11,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: diff --git a/sql/12.8/selectfunc.sql b/sql/11.17/selectfunc.sql similarity index 99% rename from sql/12.8/selectfunc.sql rename to sql/11.17/selectfunc.sql index 038ca1d..36789fa 100644 --- a/sql/12.8/selectfunc.sql +++ b/sql/11.17/selectfunc.sql @@ -11,9 +11,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: diff --git a/sql/12.8/aggregate.sql b/sql/12.12/aggregate.sql similarity index 98% rename from sql/12.8/aggregate.sql rename to sql/12.12/aggregate.sql index 4368c6d..da4875a 100644 --- a/sql/12.8/aggregate.sql +++ b/sql/12.12/aggregate.sql @@ -15,9 +15,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); diff --git a/sql/13.4/extra/aggregates.sql b/sql/12.12/extra/aggregates.sql similarity index 99% rename from sql/13.4/extra/aggregates.sql rename to sql/12.12/extra/aggregates.sql index 53ef0aa..6e6cae8 100644 --- a/sql/13.4/extra/aggregates.sql +++ b/sql/12.12/extra/aggregates.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( diff --git a/sql/12.8/extra/influxdb_fdw_post.sql b/sql/12.12/extra/influxdb_fdw_post.sql similarity index 99% rename from sql/12.8/extra/influxdb_fdw_post.sql rename to sql/12.12/extra/influxdb_fdw_post.sql index 6f507b6..65ff3b8 100644 --- a/sql/12.8/extra/influxdb_fdw_post.sql +++ b/sql/12.12/extra/influxdb_fdw_post.sql @@ -12,17 +12,17 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server @@ -764,7 +764,7 @@ DROP FOREIGN TABLE local_tbl; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; diff --git a/sql/11.13/extra/init.sql b/sql/12.12/extra/init.sql similarity index 100% rename from sql/11.13/extra/init.sql rename to sql/12.12/extra/init.sql diff --git a/sql/12.8/extra/insert.sql b/sql/12.12/extra/insert.sql similarity index 99% rename from sql/12.8/extra/insert.sql rename to sql/12.12/extra/insert.sql index 6003590..785e0ef 100644 --- a/sql/12.8/extra/insert.sql +++ b/sql/12.12/extra/insert.sql @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list diff --git a/sql/10.18/extra/join.sql b/sql/12.12/extra/join.sql similarity index 99% rename from sql/10.18/extra/join.sql rename to sql/12.12/extra/join.sql index 368a813..a8bb88a 100644 --- a/sql/10.18/extra/join.sql +++ b/sql/12.12/extra/join.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; diff --git a/sql/12.8/extra/limit.sql b/sql/12.12/extra/limit.sql similarity index 98% rename from sql/12.8/extra/limit.sql rename to sql/12.12/extra/limit.sql index 94d233f..eb907d3 100644 --- a/sql/12.8/extra/limit.sql +++ b/sql/12.12/extra/limit.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; diff --git a/sql/12.8/extra/prepare.sql b/sql/12.12/extra/prepare.sql similarity index 96% rename from sql/12.8/extra/prepare.sql rename to sql/12.12/extra/prepare.sql index f7d2710..13c7439 100644 --- a/sql/12.8/extra/prepare.sql +++ b/sql/12.12/extra/prepare.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 30: CREATE FOREIGN TABLE tenk1 ( diff --git a/sql/10.18/extra/select.sql b/sql/12.12/extra/select.sql similarity index 98% rename from sql/10.18/extra/select.sql rename to sql/12.12/extra/select.sql index 3cb4fc5..db8bf84 100644 --- a/sql/10.18/extra/select.sql +++ b/sql/12.12/extra/select.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( diff --git a/sql/11.13/extra/select_having.sql b/sql/12.12/extra/select_having.sql similarity index 95% rename from sql/11.13/extra/select_having.sql rename to sql/12.12/extra/select_having.sql index c912bed..4e2b933 100644 --- a/sql/11.13/extra/select_having.sql +++ b/sql/12.12/extra/select_having.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; diff --git a/sql/12.8/influxdb_fdw.sql b/sql/12.12/influxdb_fdw.sql similarity index 92% rename from sql/12.8/influxdb_fdw.sql rename to sql/12.12/influxdb_fdw.sql index ef62790..c7f5e2a 100644 --- a/sql/12.8/influxdb_fdw.sql +++ b/sql/12.12/influxdb_fdw.sql @@ -14,9 +14,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --Testcase 6: @@ -584,8 +584,38 @@ DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05: --Testcase 200: SELECT * FROM cpu; +-- InfluxDB_FDW will store time data for Field values as a strings +--Testcase 204: +CREATE FOREIGN TABLE tmp_time ( +time timestamp, +c1 time, +c2 timestamp, +c3 timestamp with time zone +) SERVER server1 OPTIONS (table 'tmp_time'); +--Testcase 205: +SELECT * FROM tmp_time; +--Testcase 206: +INSERT INTO tmp_time (time, c1) VALUES ('1900-01-01 01:01:01', '01:02:03'); +--Testcase 207: +INSERT INTO tmp_time (time, c1) VALUES ('2100-01-01 01:01:01', '04:05:06'); +--Testcase 208: +INSERT INTO tmp_time (time, c1) VALUES ('1990-01-01 01:01:01', '07:08:09'); +--Testcase 209: +INSERT INTO tmp_time (time, c2) VALUES ('2020-12-27 03:02:56.634467', '1950-02-02 02:02:02'); +--Testcase 210: +INSERT INTO tmp_time (time, c3) VALUES ('2021-12-27 03:02:56.668301', '1800-02-02 02:02:02+9'); +--Testcase 210: +INSERT INTO tmp_time (time, c1, c2, c3) VALUES ('2022-05-06 07:08:09', '07:08:09', '2022-05-06 07:08:09', '2022-05-06 07:08:09+9'); +--Testcase 211: +-- 1800-02-02 02:02:02+9 is Daylight Saving Time (DST) changes in Japan. +-- Timezone setting Japan so it will plus 18s:59 +-- https://www.timeanddate.com/time/zone/japan/tokyo?syear=1850 +SELECT * FROM tmp_time; + -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP USER MAPPING FOR CURRENT_USER SERVER server1; diff --git a/sql/11.13/init.sql b/sql/12.12/init.sql similarity index 100% rename from sql/11.13/init.sql rename to sql/12.12/init.sql diff --git a/sql/12.12/option.sql b/sql/12.12/option.sql new file mode 100644 index 0000000..35e344b --- /dev/null +++ b/sql/12.12/option.sql @@ -0,0 +1,214 @@ +--Testcase 1: +SET datestyle=ISO; + +--Testcase 2: +CREATE EXTENSION influxdb_fdw; + +-- version not valid +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '9999', retention_policy ''); +--Testcase 4: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version 'dummy', retention_policy ''); +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '-1', retention_policy ''); + +-- host must be not NULL or not empty +--Testcase 6: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', port '38086', version '2', retention_policy ''); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 8: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 9: +SELECT * FROM optiontbl; +--Testcase 10: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 11: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host '', port '38086', version '2', retention_policy ''); +--Testcase 12: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 13: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 14: +SELECT * FROM optiontbl; +--Testcase 15: +DROP SERVER influxdb_svr CASCADE; + +-- dbname must be not NULL or not empty +--Testcase 16: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 17: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 18: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 19: +SELECT * FROM optiontbl; +--Testcase 20: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 21: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname '', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 22: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 23: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 24: +SELECT * FROM optiontbl; +--Testcase 25: +DROP SERVER influxdb_svr CASCADE; + + +-- retention_policy can be NULL +--Testcase 26: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2'); +--Testcase 27: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 28: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 29: +SELECT * FROM optiontbl; +--Testcase 30: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 31: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 32: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 33: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 34: +SELECT * FROM optiontbl; +--Testcase 35: +DROP SERVER influxdb_svr CASCADE; + +-- auth_token can be NULL +--Testcase 36: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 37: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 38: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 39: +SELECT * FROM optiontbl; +--Testcase 40: +DROP SERVER influxdb_svr CASCADE; + +-- auth_token invalid +--Testcase 41: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 42: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'wrong_token'); +--Testcase 43: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 44: +SELECT * FROM optiontbl; +--Testcase 45: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 46: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 47: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token ''); +--Testcase 48: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 49: +SELECT * FROM optiontbl; +--Testcase 50: +DROP SERVER influxdb_svr CASCADE; + +-- user must can be NULL +--Testcase 51: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 52: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (password 'pass'); +--Testcase 53: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 54: +SELECT * FROM optiontbl; +--Testcase 55: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 56: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 57: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password 'pass'); +--Testcase 58: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 59: +SELECT * FROM optiontbl; +--Testcase 60: +DROP SERVER influxdb_svr CASCADE; + +-- password can be NULL +--Testcase 61: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 62: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user'); +--Testcase 63: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 65: +SELECT * FROM optiontbl; +--Testcase 65: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 66: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 67: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password ''); +--Testcase 68: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 69: +SELECT * FROM optiontbl; +--Testcase 70: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 71: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 72: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password ''); +--Testcase 73: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 74: +SELECT * FROM optiontbl; +--Testcase 75: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 76: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 77: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 78: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 79: +SELECT * FROM optiontbl; +--Testcase 80: +DROP SERVER influxdb_svr CASCADE; + +-- Test if version option is not set +-- Connect to InfluxDB version 1 +--Testcase 81: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086'); +--Testcase 82: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 83: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 84: +SELECT * FROM optiontbl; +--Testcase 85: +DROP SERVER influxdb_svr CASCADE; + +-- Connect to InfluxDB version 2 +--Testcase 86: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', retention_policy ''); +--Testcase 87: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 88: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 89: +SELECT * FROM optiontbl; +--Testcase 90: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 91: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/11.13/schemaless/add_fields.sql b/sql/12.12/schemaless/add_fields.sql similarity index 99% rename from sql/11.13/schemaless/add_fields.sql rename to sql/12.12/schemaless/add_fields.sql index 555ff53..503b4d9 100644 --- a/sql/11.13/schemaless/add_fields.sql +++ b/sql/12.12/schemaless/add_fields.sql @@ -7,15 +7,15 @@ SET timezone='UTC'; \set ECHO all -- Init data -\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null +:INIT_FIELDS_ORIGINAL; --Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); @@ -42,7 +42,7 @@ SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), l -------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_1; --Testcase 13: DROP FOREIGN TABLE sctbl1; @@ -156,7 +156,7 @@ SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fiel -------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_20; --Testcase 64: DROP FOREIGN TABLE sctbl1; diff --git a/sql/12.8/schemaless/add_multi_key.sql b/sql/12.12/schemaless/add_multi_key.sql similarity index 99% rename from sql/12.8/schemaless/add_multi_key.sql rename to sql/12.12/schemaless/add_multi_key.sql index b297a54..2575cf5 100644 --- a/sql/12.8/schemaless/add_multi_key.sql +++ b/sql/12.12/schemaless/add_multi_key.sql @@ -7,14 +7,14 @@ SET timezone='UTC'; \set ECHO all -- Init data original -\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null +:INIT_MULTILEY_ORIGINAL; -- Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); @@ -211,7 +211,7 @@ SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3 ---------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; @@ -346,7 +346,7 @@ SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint -- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; diff --git a/sql/10.18/schemaless/add_tags.sql b/sql/12.12/schemaless/add_tags.sql similarity index 99% rename from sql/10.18/schemaless/add_tags.sql rename to sql/12.12/schemaless/add_tags.sql index 1c58358..14e453c 100644 --- a/sql/10.18/schemaless/add_tags.sql +++ b/sql/12.12/schemaless/add_tags.sql @@ -7,14 +7,14 @@ SET timezone='UTC'; \set ECHO all -- Init data original -\! influx -import -path=init/tag_original.txt -precision=s > /dev/null +:INIT_TAG_ORIGINAL; -- Before update data -- Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); @@ -39,7 +39,7 @@ select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::big --------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_1; --Testcase 12: DROP FOREIGN TABLE sctbl4; @@ -114,7 +114,7 @@ select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (se --------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_20; --Testcase 41: DROP FOREIGN TABLE sctbl4; --Testcase 42: diff --git a/sql/10.18/schemaless/aggregate.sql b/sql/12.12/schemaless/aggregate.sql similarity index 98% rename from sql/10.18/schemaless/aggregate.sql rename to sql/12.12/schemaless/aggregate.sql index 812a2a1..92e9dcb 100644 --- a/sql/10.18/schemaless/aggregate.sql +++ b/sql/12.12/schemaless/aggregate.sql @@ -15,9 +15,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); diff --git a/sql/12.8/schemaless/extra/aggregates.sql b/sql/12.12/schemaless/extra/aggregates.sql similarity index 99% rename from sql/12.8/schemaless/extra/aggregates.sql rename to sql/12.12/schemaless/extra/aggregates.sql index 878f2cd..367fe93 100644 --- a/sql/12.8/schemaless/extra/aggregates.sql +++ b/sql/12.12/schemaless/extra/aggregates.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); diff --git a/sql/12.8/schemaless/extra/influxdb_fdw_post.sql b/sql/12.12/schemaless/extra/influxdb_fdw_post.sql similarity index 99% rename from sql/12.8/schemaless/extra/influxdb_fdw_post.sql rename to sql/12.12/schemaless/extra/influxdb_fdw_post.sql index 5fe6fa8..7160ed6 100644 --- a/sql/12.8/schemaless/extra/influxdb_fdw_post.sql +++ b/sql/12.12/schemaless/extra/influxdb_fdw_post.sql @@ -12,17 +12,17 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server @@ -465,6 +465,17 @@ EXPLAIN (VERBOSE, COSTS OFF) --Testcase 95: SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; +-- This test case drop configuration when execute non-schemaless before +DROP TEXT SEARCH CONFIGURATION IF EXISTS public.custom_search; +-- check schema-qualification of regconfig constant +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + -- =================================================================== -- JOIN queries -- =================================================================== @@ -768,7 +779,7 @@ DROP FOREIGN TABLE local_tbl_nsc; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; diff --git a/sql/10.18/schemaless/extra/insert.sql b/sql/12.12/schemaless/extra/insert.sql similarity index 99% rename from sql/10.18/schemaless/extra/insert.sql rename to sql/12.12/schemaless/extra/insert.sql index 67c0557..c124911 100644 --- a/sql/10.18/schemaless/extra/insert.sql +++ b/sql/12.12/schemaless/extra/insert.sql @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list diff --git a/sql/12.8/schemaless/extra/join.sql b/sql/12.12/schemaless/extra/join.sql similarity index 99% rename from sql/12.8/schemaless/extra/join.sql rename to sql/12.12/schemaless/extra/join.sql index 8f2859e..d1a8029 100644 --- a/sql/12.8/schemaless/extra/join.sql +++ b/sql/12.12/schemaless/extra/join.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; @@ -719,6 +719,12 @@ select * from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 l --Testcase 158: select t1.x from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'x')::int x, (fields->>'y')::int y from t3) t3 on (t1.a::int = t3.x::int); +-- Test matching of locking clause with wrong alias + +select t1.*, t2.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int), t3 as unnamed_join + for update of unnamed_join; + -- -- regression test for 8.1 merge right join bug -- diff --git a/sql/13.4/schemaless/extra/limit.sql b/sql/12.12/schemaless/extra/limit.sql similarity index 98% rename from sql/13.4/schemaless/extra/limit.sql rename to sql/12.12/schemaless/extra/limit.sql index 941a25c..38ed4d2 100644 --- a/sql/13.4/schemaless/extra/limit.sql +++ b/sql/12.12/schemaless/extra/limit.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; diff --git a/sql/13.4/schemaless/extra/prepare.sql b/sql/12.12/schemaless/extra/prepare.sql similarity index 96% rename from sql/13.4/schemaless/extra/prepare.sql rename to sql/12.12/schemaless/extra/prepare.sql index fbbf92b..e27524d 100644 --- a/sql/13.4/schemaless/extra/prepare.sql +++ b/sql/12.12/schemaless/extra/prepare.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 30: CREATE FOREIGN TABLE tenk1 ( diff --git a/sql/13.4/schemaless/extra/select.sql b/sql/12.12/schemaless/extra/select.sql similarity index 99% rename from sql/13.4/schemaless/extra/select.sql rename to sql/12.12/schemaless/extra/select.sql index 7fed70a..fa7029b 100644 --- a/sql/13.4/schemaless/extra/select.sql +++ b/sql/12.12/schemaless/extra/select.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( diff --git a/sql/11.13/schemaless/extra/select_having.sql b/sql/12.12/schemaless/extra/select_having.sql similarity index 96% rename from sql/11.13/schemaless/extra/select_having.sql rename to sql/12.12/schemaless/extra/select_having.sql index 538049e..8cef2e2 100644 --- a/sql/11.13/schemaless/extra/select_having.sql +++ b/sql/12.12/schemaless/extra/select_having.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); diff --git a/sql/12.8/schemaless/influxdb_fdw.sql b/sql/12.12/schemaless/influxdb_fdw.sql similarity index 99% rename from sql/12.8/schemaless/influxdb_fdw.sql rename to sql/12.12/schemaless/influxdb_fdw.sql index 738636d..03c1399 100644 --- a/sql/12.8/schemaless/influxdb_fdw.sql +++ b/sql/12.12/schemaless/influxdb_fdw.sql @@ -14,9 +14,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --Testcase 6: @@ -586,7 +586,9 @@ DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 SELECT * FROM cpu; -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP FOREIGN TABLE cpu_nsc; diff --git a/sql/11.13/schemaless/init.sql b/sql/12.12/schemaless/init.sql similarity index 100% rename from sql/11.13/schemaless/init.sql rename to sql/12.12/schemaless/init.sql diff --git a/sql/11.13/schemaless/schemaless.sql b/sql/12.12/schemaless/schemaless.sql similarity index 99% rename from sql/11.13/schemaless/schemaless.sql rename to sql/12.12/schemaless/schemaless.sql index e9f49bf..26172a4 100644 --- a/sql/11.13/schemaless/schemaless.sql +++ b/sql/12.12/schemaless/schemaless.sql @@ -15,10 +15,10 @@ DROP EXTENSION IF EXISTS influxdb_fdw CASCADE; CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 5: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- create foreign table --Testcase 7: diff --git a/sql/11.13/schemaless/selectfunc.sql b/sql/12.12/schemaless/selectfunc.sql similarity index 99% rename from sql/11.13/schemaless/selectfunc.sql rename to sql/12.12/schemaless/selectfunc.sql index 4a157e2..8ce5f91 100644 --- a/sql/11.13/schemaless/selectfunc.sql +++ b/sql/12.12/schemaless/selectfunc.sql @@ -11,9 +11,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: diff --git a/sql/13.4/selectfunc.sql b/sql/12.12/selectfunc.sql similarity index 99% rename from sql/13.4/selectfunc.sql rename to sql/12.12/selectfunc.sql index 038ca1d..36789fa 100644 --- a/sql/13.4/selectfunc.sql +++ b/sql/12.12/selectfunc.sql @@ -11,9 +11,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: diff --git a/sql/10.18/aggregate.sql b/sql/13.8/aggregate.sql similarity index 98% rename from sql/10.18/aggregate.sql rename to sql/13.8/aggregate.sql index 4368c6d..da4875a 100644 --- a/sql/10.18/aggregate.sql +++ b/sql/13.8/aggregate.sql @@ -15,9 +15,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); diff --git a/sql/10.18/extra/aggregates.sql b/sql/13.8/extra/aggregates.sql similarity index 99% rename from sql/10.18/extra/aggregates.sql rename to sql/13.8/extra/aggregates.sql index 53ef0aa..6e6cae8 100644 --- a/sql/10.18/extra/aggregates.sql +++ b/sql/13.8/extra/aggregates.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( diff --git a/sql/10.18/extra/influxdb_fdw_post.sql b/sql/13.8/extra/influxdb_fdw_post.sql similarity index 99% rename from sql/10.18/extra/influxdb_fdw_post.sql rename to sql/13.8/extra/influxdb_fdw_post.sql index 6f507b6..65ff3b8 100644 --- a/sql/10.18/extra/influxdb_fdw_post.sql +++ b/sql/13.8/extra/influxdb_fdw_post.sql @@ -12,17 +12,17 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server @@ -764,7 +764,7 @@ DROP FOREIGN TABLE local_tbl; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; diff --git a/sql/12.8/extra/init.sql b/sql/13.8/extra/init.sql similarity index 100% rename from sql/12.8/extra/init.sql rename to sql/13.8/extra/init.sql diff --git a/sql/11.13/extra/insert.sql b/sql/13.8/extra/insert.sql similarity index 99% rename from sql/11.13/extra/insert.sql rename to sql/13.8/extra/insert.sql index 6003590..785e0ef 100644 --- a/sql/11.13/extra/insert.sql +++ b/sql/13.8/extra/insert.sql @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list diff --git a/sql/11.13/extra/join.sql b/sql/13.8/extra/join.sql similarity index 99% rename from sql/11.13/extra/join.sql rename to sql/13.8/extra/join.sql index 368a813..a8bb88a 100644 --- a/sql/11.13/extra/join.sql +++ b/sql/13.8/extra/join.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; diff --git a/sql/13.4/extra/limit.sql b/sql/13.8/extra/limit.sql similarity index 98% rename from sql/13.4/extra/limit.sql rename to sql/13.8/extra/limit.sql index 94d233f..eb907d3 100644 --- a/sql/13.4/extra/limit.sql +++ b/sql/13.8/extra/limit.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; diff --git a/sql/13.4/extra/prepare.sql b/sql/13.8/extra/prepare.sql similarity index 96% rename from sql/13.4/extra/prepare.sql rename to sql/13.8/extra/prepare.sql index f7d2710..13c7439 100644 --- a/sql/13.4/extra/prepare.sql +++ b/sql/13.8/extra/prepare.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 30: CREATE FOREIGN TABLE tenk1 ( diff --git a/sql/12.8/extra/select.sql b/sql/13.8/extra/select.sql similarity index 98% rename from sql/12.8/extra/select.sql rename to sql/13.8/extra/select.sql index 3cb4fc5..db8bf84 100644 --- a/sql/12.8/extra/select.sql +++ b/sql/13.8/extra/select.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( diff --git a/sql/12.8/extra/select_having.sql b/sql/13.8/extra/select_having.sql similarity index 95% rename from sql/12.8/extra/select_having.sql rename to sql/13.8/extra/select_having.sql index c912bed..4e2b933 100644 --- a/sql/12.8/extra/select_having.sql +++ b/sql/13.8/extra/select_having.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; diff --git a/sql/10.18/influxdb_fdw.sql b/sql/13.8/influxdb_fdw.sql similarity index 92% rename from sql/10.18/influxdb_fdw.sql rename to sql/13.8/influxdb_fdw.sql index ef62790..c7f5e2a 100644 --- a/sql/10.18/influxdb_fdw.sql +++ b/sql/13.8/influxdb_fdw.sql @@ -14,9 +14,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --Testcase 6: @@ -584,8 +584,38 @@ DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05: --Testcase 200: SELECT * FROM cpu; +-- InfluxDB_FDW will store time data for Field values as a strings +--Testcase 204: +CREATE FOREIGN TABLE tmp_time ( +time timestamp, +c1 time, +c2 timestamp, +c3 timestamp with time zone +) SERVER server1 OPTIONS (table 'tmp_time'); +--Testcase 205: +SELECT * FROM tmp_time; +--Testcase 206: +INSERT INTO tmp_time (time, c1) VALUES ('1900-01-01 01:01:01', '01:02:03'); +--Testcase 207: +INSERT INTO tmp_time (time, c1) VALUES ('2100-01-01 01:01:01', '04:05:06'); +--Testcase 208: +INSERT INTO tmp_time (time, c1) VALUES ('1990-01-01 01:01:01', '07:08:09'); +--Testcase 209: +INSERT INTO tmp_time (time, c2) VALUES ('2020-12-27 03:02:56.634467', '1950-02-02 02:02:02'); +--Testcase 210: +INSERT INTO tmp_time (time, c3) VALUES ('2021-12-27 03:02:56.668301', '1800-02-02 02:02:02+9'); +--Testcase 210: +INSERT INTO tmp_time (time, c1, c2, c3) VALUES ('2022-05-06 07:08:09', '07:08:09', '2022-05-06 07:08:09', '2022-05-06 07:08:09+9'); +--Testcase 211: +-- 1800-02-02 02:02:02+9 is Daylight Saving Time (DST) changes in Japan. +-- Timezone setting Japan so it will plus 18s:59 +-- https://www.timeanddate.com/time/zone/japan/tokyo?syear=1850 +SELECT * FROM tmp_time; + -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP USER MAPPING FOR CURRENT_USER SERVER server1; diff --git a/sql/12.8/init.sql b/sql/13.8/init.sql similarity index 100% rename from sql/12.8/init.sql rename to sql/13.8/init.sql diff --git a/sql/13.8/option.sql b/sql/13.8/option.sql new file mode 100644 index 0000000..35e344b --- /dev/null +++ b/sql/13.8/option.sql @@ -0,0 +1,214 @@ +--Testcase 1: +SET datestyle=ISO; + +--Testcase 2: +CREATE EXTENSION influxdb_fdw; + +-- version not valid +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '9999', retention_policy ''); +--Testcase 4: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version 'dummy', retention_policy ''); +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '-1', retention_policy ''); + +-- host must be not NULL or not empty +--Testcase 6: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', port '38086', version '2', retention_policy ''); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 8: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 9: +SELECT * FROM optiontbl; +--Testcase 10: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 11: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host '', port '38086', version '2', retention_policy ''); +--Testcase 12: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 13: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 14: +SELECT * FROM optiontbl; +--Testcase 15: +DROP SERVER influxdb_svr CASCADE; + +-- dbname must be not NULL or not empty +--Testcase 16: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 17: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 18: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 19: +SELECT * FROM optiontbl; +--Testcase 20: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 21: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname '', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 22: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 23: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 24: +SELECT * FROM optiontbl; +--Testcase 25: +DROP SERVER influxdb_svr CASCADE; + + +-- retention_policy can be NULL +--Testcase 26: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2'); +--Testcase 27: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 28: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 29: +SELECT * FROM optiontbl; +--Testcase 30: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 31: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 32: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 33: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 34: +SELECT * FROM optiontbl; +--Testcase 35: +DROP SERVER influxdb_svr CASCADE; + +-- auth_token can be NULL +--Testcase 36: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 37: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 38: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 39: +SELECT * FROM optiontbl; +--Testcase 40: +DROP SERVER influxdb_svr CASCADE; + +-- auth_token invalid +--Testcase 41: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 42: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'wrong_token'); +--Testcase 43: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 44: +SELECT * FROM optiontbl; +--Testcase 45: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 46: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 47: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token ''); +--Testcase 48: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 49: +SELECT * FROM optiontbl; +--Testcase 50: +DROP SERVER influxdb_svr CASCADE; + +-- user must can be NULL +--Testcase 51: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 52: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (password 'pass'); +--Testcase 53: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 54: +SELECT * FROM optiontbl; +--Testcase 55: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 56: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 57: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password 'pass'); +--Testcase 58: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 59: +SELECT * FROM optiontbl; +--Testcase 60: +DROP SERVER influxdb_svr CASCADE; + +-- password can be NULL +--Testcase 61: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 62: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user'); +--Testcase 63: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 65: +SELECT * FROM optiontbl; +--Testcase 65: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 66: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 67: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password ''); +--Testcase 68: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 69: +SELECT * FROM optiontbl; +--Testcase 70: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 71: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 72: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password ''); +--Testcase 73: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 74: +SELECT * FROM optiontbl; +--Testcase 75: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 76: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 77: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 78: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 79: +SELECT * FROM optiontbl; +--Testcase 80: +DROP SERVER influxdb_svr CASCADE; + +-- Test if version option is not set +-- Connect to InfluxDB version 1 +--Testcase 81: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086'); +--Testcase 82: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 83: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 84: +SELECT * FROM optiontbl; +--Testcase 85: +DROP SERVER influxdb_svr CASCADE; + +-- Connect to InfluxDB version 2 +--Testcase 86: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', retention_policy ''); +--Testcase 87: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 88: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 89: +SELECT * FROM optiontbl; +--Testcase 90: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 91: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/12.8/schemaless/add_fields.sql b/sql/13.8/schemaless/add_fields.sql similarity index 99% rename from sql/12.8/schemaless/add_fields.sql rename to sql/13.8/schemaless/add_fields.sql index 555ff53..503b4d9 100644 --- a/sql/12.8/schemaless/add_fields.sql +++ b/sql/13.8/schemaless/add_fields.sql @@ -7,15 +7,15 @@ SET timezone='UTC'; \set ECHO all -- Init data -\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null +:INIT_FIELDS_ORIGINAL; --Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); @@ -42,7 +42,7 @@ SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), l -------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_1; --Testcase 13: DROP FOREIGN TABLE sctbl1; @@ -156,7 +156,7 @@ SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fiel -------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_20; --Testcase 64: DROP FOREIGN TABLE sctbl1; diff --git a/sql/10.18/schemaless/add_multi_key.sql b/sql/13.8/schemaless/add_multi_key.sql similarity index 99% rename from sql/10.18/schemaless/add_multi_key.sql rename to sql/13.8/schemaless/add_multi_key.sql index b297a54..2575cf5 100644 --- a/sql/10.18/schemaless/add_multi_key.sql +++ b/sql/13.8/schemaless/add_multi_key.sql @@ -7,14 +7,14 @@ SET timezone='UTC'; \set ECHO all -- Init data original -\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null +:INIT_MULTILEY_ORIGINAL; -- Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); @@ -211,7 +211,7 @@ SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3 ---------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; @@ -346,7 +346,7 @@ SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint -- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; diff --git a/sql/13.4/schemaless/add_tags.sql b/sql/13.8/schemaless/add_tags.sql similarity index 99% rename from sql/13.4/schemaless/add_tags.sql rename to sql/13.8/schemaless/add_tags.sql index 1c58358..14e453c 100644 --- a/sql/13.4/schemaless/add_tags.sql +++ b/sql/13.8/schemaless/add_tags.sql @@ -7,14 +7,14 @@ SET timezone='UTC'; \set ECHO all -- Init data original -\! influx -import -path=init/tag_original.txt -precision=s > /dev/null +:INIT_TAG_ORIGINAL; -- Before update data -- Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); @@ -39,7 +39,7 @@ select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::big --------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_1; --Testcase 12: DROP FOREIGN TABLE sctbl4; @@ -114,7 +114,7 @@ select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (se --------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_20; --Testcase 41: DROP FOREIGN TABLE sctbl4; --Testcase 42: diff --git a/sql/11.13/schemaless/aggregate.sql b/sql/13.8/schemaless/aggregate.sql similarity index 98% rename from sql/11.13/schemaless/aggregate.sql rename to sql/13.8/schemaless/aggregate.sql index 812a2a1..92e9dcb 100644 --- a/sql/11.13/schemaless/aggregate.sql +++ b/sql/13.8/schemaless/aggregate.sql @@ -15,9 +15,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); diff --git a/sql/11.13/schemaless/extra/aggregates.sql b/sql/13.8/schemaless/extra/aggregates.sql similarity index 99% rename from sql/11.13/schemaless/extra/aggregates.sql rename to sql/13.8/schemaless/extra/aggregates.sql index 878f2cd..367fe93 100644 --- a/sql/11.13/schemaless/extra/aggregates.sql +++ b/sql/13.8/schemaless/extra/aggregates.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); diff --git a/sql/10.18/schemaless/extra/influxdb_fdw_post.sql b/sql/13.8/schemaless/extra/influxdb_fdw_post.sql similarity index 99% rename from sql/10.18/schemaless/extra/influxdb_fdw_post.sql rename to sql/13.8/schemaless/extra/influxdb_fdw_post.sql index 5fe6fa8..7160ed6 100644 --- a/sql/10.18/schemaless/extra/influxdb_fdw_post.sql +++ b/sql/13.8/schemaless/extra/influxdb_fdw_post.sql @@ -12,17 +12,17 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server @@ -465,6 +465,17 @@ EXPLAIN (VERBOSE, COSTS OFF) --Testcase 95: SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; +-- This test case drop configuration when execute non-schemaless before +DROP TEXT SEARCH CONFIGURATION IF EXISTS public.custom_search; +-- check schema-qualification of regconfig constant +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + -- =================================================================== -- JOIN queries -- =================================================================== @@ -768,7 +779,7 @@ DROP FOREIGN TABLE local_tbl_nsc; --Testcase 183: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; diff --git a/sql/13.4/schemaless/extra/insert.sql b/sql/13.8/schemaless/extra/insert.sql similarity index 99% rename from sql/13.4/schemaless/extra/insert.sql rename to sql/13.8/schemaless/extra/insert.sql index 67c0557..c124911 100644 --- a/sql/13.4/schemaless/extra/insert.sql +++ b/sql/13.8/schemaless/extra/insert.sql @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list diff --git a/sql/10.18/schemaless/extra/join.sql b/sql/13.8/schemaless/extra/join.sql similarity index 99% rename from sql/10.18/schemaless/extra/join.sql rename to sql/13.8/schemaless/extra/join.sql index 8f2859e..d1a8029 100644 --- a/sql/10.18/schemaless/extra/join.sql +++ b/sql/13.8/schemaless/extra/join.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; @@ -719,6 +719,12 @@ select * from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 l --Testcase 158: select t1.x from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'x')::int x, (fields->>'y')::int y from t3) t3 on (t1.a::int = t3.x::int); +-- Test matching of locking clause with wrong alias + +select t1.*, t2.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int), t3 as unnamed_join + for update of unnamed_join; + -- -- regression test for 8.1 merge right join bug -- diff --git a/sql/10.18/schemaless/extra/limit.sql b/sql/13.8/schemaless/extra/limit.sql similarity index 98% rename from sql/10.18/schemaless/extra/limit.sql rename to sql/13.8/schemaless/extra/limit.sql index 941a25c..38ed4d2 100644 --- a/sql/10.18/schemaless/extra/limit.sql +++ b/sql/13.8/schemaless/extra/limit.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 52: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; diff --git a/sql/10.18/schemaless/extra/prepare.sql b/sql/13.8/schemaless/extra/prepare.sql similarity index 96% rename from sql/10.18/schemaless/extra/prepare.sql rename to sql/13.8/schemaless/extra/prepare.sql index fbbf92b..e27524d 100644 --- a/sql/10.18/schemaless/extra/prepare.sql +++ b/sql/13.8/schemaless/extra/prepare.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 28: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 30: CREATE FOREIGN TABLE tenk1 ( diff --git a/sql/11.13/schemaless/extra/select.sql b/sql/13.8/schemaless/extra/select.sql similarity index 99% rename from sql/11.13/schemaless/extra/select.sql rename to sql/13.8/schemaless/extra/select.sql index 7fed70a..fa7029b 100644 --- a/sql/11.13/schemaless/extra/select.sql +++ b/sql/13.8/schemaless/extra/select.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 53: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 55: CREATE FOREIGN TABLE onek ( diff --git a/sql/12.8/schemaless/extra/select_having.sql b/sql/13.8/schemaless/extra/select_having.sql similarity index 96% rename from sql/12.8/schemaless/extra/select_having.sql rename to sql/13.8/schemaless/extra/select_having.sql index 538049e..8cef2e2 100644 --- a/sql/12.8/schemaless/extra/select_having.sql +++ b/sql/13.8/schemaless/extra/select_having.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); diff --git a/sql/13.4/schemaless/influxdb_fdw.sql b/sql/13.8/schemaless/influxdb_fdw.sql similarity index 99% rename from sql/13.4/schemaless/influxdb_fdw.sql rename to sql/13.8/schemaless/influxdb_fdw.sql index 738636d..03c1399 100644 --- a/sql/13.4/schemaless/influxdb_fdw.sql +++ b/sql/13.8/schemaless/influxdb_fdw.sql @@ -14,9 +14,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --Testcase 6: @@ -586,7 +586,9 @@ DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 SELECT * FROM cpu; -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP FOREIGN TABLE cpu_nsc; diff --git a/sql/12.8/schemaless/init.sql b/sql/13.8/schemaless/init.sql similarity index 100% rename from sql/12.8/schemaless/init.sql rename to sql/13.8/schemaless/init.sql diff --git a/sql/13.4/schemaless/schemaless.sql b/sql/13.8/schemaless/schemaless.sql similarity index 99% rename from sql/13.4/schemaless/schemaless.sql rename to sql/13.8/schemaless/schemaless.sql index e9f49bf..26172a4 100644 --- a/sql/13.4/schemaless/schemaless.sql +++ b/sql/13.8/schemaless/schemaless.sql @@ -15,10 +15,10 @@ DROP EXTENSION IF EXISTS influxdb_fdw CASCADE; CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 5: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- create foreign table --Testcase 7: diff --git a/sql/12.8/schemaless/selectfunc.sql b/sql/13.8/schemaless/selectfunc.sql similarity index 99% rename from sql/12.8/schemaless/selectfunc.sql rename to sql/13.8/schemaless/selectfunc.sql index 4a157e2..8ce5f91 100644 --- a/sql/12.8/schemaless/selectfunc.sql +++ b/sql/13.8/schemaless/selectfunc.sql @@ -11,9 +11,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: diff --git a/sql/10.18/selectfunc.sql b/sql/13.8/selectfunc.sql similarity index 99% rename from sql/10.18/selectfunc.sql rename to sql/13.8/selectfunc.sql index 038ca1d..36789fa 100644 --- a/sql/10.18/selectfunc.sql +++ b/sql/13.8/selectfunc.sql @@ -11,9 +11,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: diff --git a/sql/14.0/aggregate.sql b/sql/14.0/aggregate.sql deleted file mode 100644 index 4368c6d..0000000 --- a/sql/14.0/aggregate.sql +++ /dev/null @@ -1,308 +0,0 @@ - ---SET log_min_messages=debug1; ---SET client_min_messages=debug1; ---Testcase 1: -SET datestyle=ISO; --- timestamp with time zone differs based on this ---Testcase 2: -SET timezone='UTC'; - -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - --- import time column as timestamp and text type -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); - ---ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); ---ALTER SERVER server1 OPTIONS (ADD extensions 'influxdb_fdw'); - ---Testcase 6: -SELECT * FROM t4; - ---Testcase 7: -EXPLAIN (verbose) -SELECT sum("value1"),influx_time(time,interval '1s', interval '0.00001s'),tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tag1; ---Testcase 8: -SELECT sum("value1"),influx_time(time,interval '1s', interval '0.00001s'),tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tag1; - ---Testcase 9: -EXPLAIN (verbose) -SELECT tag1,sum("value1"),tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY tag2, tag1; ---Testcase 10: -SELECT tag1,sum("value1"),tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY tag2, tag1; - ---Testcase 11: -SELECT tag1,sum("value1"), count(value1), tag2 FROM "t4" group by tag1, tag2; ---Testcase 12: -EXPLAIN (verbose) SELECT tag1,sum("value1"), count(value1), tag2 FROM "t4" group by tag1, tag2; - ---Testcase 13: -SELECT influx_time(time,interval '5s',interval '0s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY influx_time(time,interval '5s', interval '0s'), tag1; - ---Testcase 14: -EXPLAIN (VERBOSE) -SELECT influx_time(time,interval '5s',interval '0s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '5s', interval '0s'), tag1; - --- no offset ---Testcase 15: -SELECT influx_time(time,interval '5s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '5s'), tag1; - ---Testcase 16: -EXPLAIN (verbose) -SELECT last(time, value1),last(time, value2) FROM t4 GROUP BY tag1; ---Testcase 17: -SELECT last(time, value1),last(time, value2) FROM t4 GROUP BY tag1; - --- GROUP BY time intervals and fill() ---Testcase 18: -SELECT * FROM tx; - ---Testcase 19: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); - ---Testcase 20: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); - ---Testcase 21: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); - ---Testcase 22: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); - ---Testcase 23: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); - ---Testcase 24: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); - ---Testcase 25: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); - ---Testcase 26: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); - ---Testcase 27: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); - ---Testcase 28: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); - ---Testcase 29: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); - ---Testcase 30: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); - --- with offset interval '0.00001s' ---Testcase 31: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); - ---Testcase 32: -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); - ---Testcase 33: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1; - ---Testcase 34: -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1; - ---Testcase 35: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2; - ---Testcase 36: -SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2; - ---with tag1 ---Testcase 37: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1; - ---Testcase 38: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1; - ---Testcase 39: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1; - ---Testcase 40: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1; - ---Testcase 41: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('null')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tag1; - ---Testcase 42: -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('null')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tag1; - ---Testcase 43: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('none')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tag1; - ---Testcase 44: -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('none')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tag1; - ---Testcase 45: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('previous')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tag1; - ---Testcase 46: -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('previous')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tag1; - ---Testcase 47: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('linear')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tag1; - ---Testcase 48: -SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('linear')), tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tag1; - ---with tag1,tag2 - ---Testcase 49: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2; - ---Testcase 50: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2; - ---Testcase 51: -EXPLAIN (verbose) -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2; - ---Testcase 52: -SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2; - --- unsupport syntax ---Testcase 53: -EXPLAIN (verbose) -SELECT influx_fill_numeric(100) FROM "tx"; ---Testcase 54: -SELECT influx_fill_numeric(100) FROM "tx"; - ---Testcase 55: -SELECT * FROM "tx" WHERE influx_fill_numeric(100) > 0; - ---Testcase 56: -EXPLAIN (verbose) -SELECT influx_fill_option('linear') FROM "tx"; ---Testcase 57: -SELECT influx_fill_option('linear') FROM "tx"; - ---Testcase 58: -SELECT * FROM "tx" WHERE influx_fill_option('linear') > 0; - - --- InfluxDB does not return error for the following query ---SELECT sum(value1) FROM t4 GROUP BY value1; - --- not allowed ---Testcase 59: -SELECT sum(value1) FROM t4 GROUP BY time; - ---last returns NULL for tag ---SELECT last(time, value1),last(time, value2),last(time, tag1) FROM t4 GROUP BY tag1; - ---Testcase 60: -DROP FOREIGN TABLE t3; ---Testcase 61: -DROP FOREIGN TABLE t4; ---Testcase 62: -DROP FOREIGN TABLE cpu; ---Testcase 63: -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 64: -DROP SERVER server1 CASCADE; ---Testcase 65: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/14.0/extra/insert.sql b/sql/14.0/extra/insert.sql deleted file mode 100644 index 6003590..0000000 --- a/sql/14.0/extra/insert.sql +++ /dev/null @@ -1,685 +0,0 @@ -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - --- --- insert with DEFAULT in the target_list --- ---Testcase 4: -CREATE FOREIGN TABLE inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 'testing') SERVER influxdb_svr OPTIONS(table 'inserttest'); ---Testcase 5: -insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT); ---Testcase 6: -insert into inserttest (col2, col3) values (3, DEFAULT); ---Testcase 7: -insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT); ---Testcase 8: -insert into inserttest values (DEFAULT, 5, 'test'); ---Testcase 9: -insert into inserttest values (DEFAULT, 7); - ---Testcase 10: -select * from inserttest; - --- --- insert with similar expression / target_list values (all fail) --- ---Testcase 11: -insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT); ---Testcase 12: -insert into inserttest (col1, col2, col3) values (1, 2); ---Testcase 13: -insert into inserttest (col1) values (1, 2); ---Testcase 14: -insert into inserttest (col1) values (DEFAULT, DEFAULT); - ---Testcase 15: -select * from inserttest; - --- --- VALUES test --- ---Testcase 16: -insert into inserttest values(10, 20, '40'), (-1, 2, DEFAULT), - ((select 2), (select i from (values(3)) as foo (i)), 'values are fun!'); - ---Testcase 17: -select * from inserttest; - --- --- TOASTed value test --- ---Testcase 18: -insert into inserttest values(30, 50, repeat('x', 10000)); - ---Testcase 19: -select col1, col2, char_length(col3) from inserttest; - ---Testcase 20: --- Clean up: -delete from inserttest; -drop foreign table inserttest; - -/* --- skip, influxdb does not support create table with WITH option --- --- tuple larger than fillfactor --- -CREATE TABLE large_tuple_test (a int, b text) WITH (fillfactor = 10); -ALTER TABLE large_tuple_test ALTER COLUMN b SET STORAGE plain; - --- create page w/ free space in range [nearlyEmptyFreeSpace, MaxHeapTupleSize) -INSERT INTO large_tuple_test (select 1, NULL); - --- should still fit on the page -INSERT INTO large_tuple_test (select 2, repeat('a', 1000)); -SELECT pg_size_pretty(pg_relation_size('large_tuple_test'::regclass, 'main')); - --- add small record to the second page -INSERT INTO large_tuple_test (select 3, NULL); - --- now this tuple won't fit on the second page, but the insert should --- still succeed by extending the relation -INSERT INTO large_tuple_test (select 4, repeat('a', 8126)); - -DROP TABLE large_tuple_test; -*/ - -/* --- skip, influxdb does not support create type --- --- check indirection (field/array assignment), cf bug #14265 --- --- these tests are aware that transformInsertStmt has 3 separate code paths --- - -create type insert_test_type as (if1 int, if2 text[]); - -create table inserttest (f1 int, f2 int[], - f3 insert_test_type, f4 insert_test_type[]); - -insert into inserttest (f2[1], f2[2]) values (1,2); -insert into inserttest (f2[1], f2[2]) values (3,4), (5,6); -insert into inserttest (f2[1], f2[2]) select 7,8; -insert into inserttest (f2[1], f2[2]) values (1,default); -- not supported - -insert into inserttest (f3.if1, f3.if2) values (1,array['foo']); -insert into inserttest (f3.if1, f3.if2) values (1,'{foo}'), (2,'{bar}'); -insert into inserttest (f3.if1, f3.if2) select 3, '{baz,quux}'; -insert into inserttest (f3.if1, f3.if2) values (1,default); -- not supported - -insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'); -insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'), ('baz', 'quux'); -insert into inserttest (f3.if2[1], f3.if2[2]) select 'bear', 'beer'; - -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'); -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'), ('baz', 'quux'); -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) select 'bear', 'beer'; - -select * from inserttest; - --- also check reverse-listing -create table inserttest2 (f1 bigint, f2 text); -create rule irule1 as on insert to inserttest2 do also - insert into inserttest (f3.if2[1], f3.if2[2]) - values (new.f1,new.f2); -create rule irule2 as on insert to inserttest2 do also - insert into inserttest (f4[1].if1, f4[1].if2[2]) - values (1,'fool'),(new.f1,new.f2); -create rule irule3 as on insert to inserttest2 do also - insert into inserttest (f4[1].if1, f4[1].if2[2]) - select new.f1, new.f2; -\d+ inserttest2 - -drop table inserttest2; -drop table inserttest; -drop type insert_test_type; -*/ - -/* --- skip, influxdb does not support partition table --- direct partition inserts should check partition bound constraint -create table range_parted ( - a text, - b int -) partition by range (a, (b+0)); - --- no partitions, so fail -insert into range_parted values ('a', 11); - -create table part1 partition of range_parted for values from ('a', 1) to ('a', 10); -create table part2 partition of range_parted for values from ('a', 10) to ('a', 20); -create table part3 partition of range_parted for values from ('b', 1) to ('b', 10); -create table part4 partition of range_parted for values from ('b', 10) to ('b', 20); - --- fail -insert into part1 values ('a', 11); -insert into part1 values ('b', 1); --- ok -insert into part1 values ('a', 1); --- fail -insert into part4 values ('b', 21); -insert into part4 values ('a', 10); --- ok -insert into part4 values ('b', 10); - --- fail (partition key a has a NOT NULL constraint) -insert into part1 values (null); --- fail (expression key (b+0) cannot be null either) -insert into part1 values (1); - -create table list_parted ( - a text, - b int -) partition by list (lower(a)); -create table part_aa_bb partition of list_parted FOR VALUES IN ('aa', 'bb'); -create table part_cc_dd partition of list_parted FOR VALUES IN ('cc', 'dd'); -create table part_null partition of list_parted FOR VALUES IN (null); - --- fail -insert into part_aa_bb values ('cc', 1); -insert into part_aa_bb values ('AAa', 1); -insert into part_aa_bb values (null); --- ok -insert into part_cc_dd values ('cC', 1); -insert into part_null values (null, 0); - --- check in case of multi-level partitioned table -create table part_ee_ff partition of list_parted for values in ('ee', 'ff') partition by range (b); -create table part_ee_ff1 partition of part_ee_ff for values from (1) to (10); -create table part_ee_ff2 partition of part_ee_ff for values from (10) to (20); - --- test default partition -create table part_default partition of list_parted default; --- Negative test: a row, which would fit in other partition, does not fit --- default partition, even when inserted directly -insert into part_default values ('aa', 2); -insert into part_default values (null, 2); --- ok -insert into part_default values ('Zz', 2); --- test if default partition works as expected for multi-level partitioned --- table as well as when default partition itself is further partitioned -drop table part_default; -create table part_xx_yy partition of list_parted for values in ('xx', 'yy') partition by list (a); -create table part_xx_yy_p1 partition of part_xx_yy for values in ('xx'); -create table part_xx_yy_defpart partition of part_xx_yy default; -create table part_default partition of list_parted default partition by range(b); -create table part_default_p1 partition of part_default for values from (20) to (30); -create table part_default_p2 partition of part_default for values from (30) to (40); - --- fail -insert into part_ee_ff1 values ('EE', 11); -insert into part_default_p2 values ('gg', 43); --- fail (even the parent's, ie, part_ee_ff's partition constraint applies) -insert into part_ee_ff1 values ('cc', 1); -insert into part_default values ('gg', 43); --- ok -insert into part_ee_ff1 values ('ff', 1); -insert into part_ee_ff2 values ('ff', 11); -insert into part_default_p1 values ('cd', 25); -insert into part_default_p2 values ('de', 35); -insert into list_parted values ('ab', 21); -insert into list_parted values ('xx', 1); -insert into list_parted values ('yy', 2); -select tableoid::regclass, * from list_parted; - --- Check tuple routing for partitioned tables - --- fail -insert into range_parted values ('a', 0); --- ok -insert into range_parted values ('a', 1); -insert into range_parted values ('a', 10); --- fail -insert into range_parted values ('a', 20); --- ok -insert into range_parted values ('b', 1); -insert into range_parted values ('b', 10); --- fail (partition key (b+0) is null) -insert into range_parted values ('a'); - --- Check default partition -create table part_def partition of range_parted default; --- fail -insert into part_def values ('b', 10); --- ok -insert into part_def values ('c', 10); -insert into range_parted values (null, null); -insert into range_parted values ('a', null); -insert into range_parted values (null, 19); -insert into range_parted values ('b', 20); - -select tableoid::regclass, * from range_parted; --- ok -insert into list_parted values (null, 1); -insert into list_parted (a) values ('aA'); --- fail (partition of part_ee_ff not found in both cases) -insert into list_parted values ('EE', 0); -insert into part_ee_ff values ('EE', 0); --- ok -insert into list_parted values ('EE', 1); -insert into part_ee_ff values ('EE', 10); -select tableoid::regclass, * from list_parted; - --- some more tests to exercise tuple-routing with multi-level partitioning -create table part_gg partition of list_parted for values in ('gg') partition by range (b); -create table part_gg1 partition of part_gg for values from (minvalue) to (1); -create table part_gg2 partition of part_gg for values from (1) to (10) partition by range (b); -create table part_gg2_1 partition of part_gg2 for values from (1) to (5); -create table part_gg2_2 partition of part_gg2 for values from (5) to (10); - -create table part_ee_ff3 partition of part_ee_ff for values from (20) to (30) partition by range (b); -create table part_ee_ff3_1 partition of part_ee_ff3 for values from (20) to (25); -create table part_ee_ff3_2 partition of part_ee_ff3 for values from (25) to (30); - -truncate list_parted; -insert into list_parted values ('aa'), ('cc'); -insert into list_parted select 'Ff', s.a from generate_series(1, 29) s(a); -insert into list_parted select 'gg', s.a from generate_series(1, 9) s(a); -insert into list_parted (b) values (1); -select tableoid::regclass::text, a, min(b) as min_b, max(b) as max_b from list_parted group by 1, 2 order by 1; - --- direct partition inserts should check hash partition bound constraint - --- Use hand-rolled hash functions and operator classes to get predictable --- result on different machines. The hash function for int4 simply returns --- the sum of the values passed to it and the one for text returns the length --- of the non-empty string value passed to it or 0. - -create or replace function part_hashint4_noop(value int4, seed int8) -returns int8 as $$ -select value + seed; -$$ language sql immutable; - -create operator class part_test_int4_ops -for type int4 -using hash as -operator 1 =, -function 2 part_hashint4_noop(int4, int8); - -create or replace function part_hashtext_length(value text, seed int8) -RETURNS int8 AS $$ -select length(coalesce(value, ''))::int8 -$$ language sql immutable; - -create operator class part_test_text_ops -for type text -using hash as -operator 1 =, -function 2 part_hashtext_length(text, int8); - -create table hash_parted ( - a int -) partition by hash (a part_test_int4_ops); -create table hpart0 partition of hash_parted for values with (modulus 4, remainder 0); -create table hpart1 partition of hash_parted for values with (modulus 4, remainder 1); -create table hpart2 partition of hash_parted for values with (modulus 4, remainder 2); -create table hpart3 partition of hash_parted for values with (modulus 4, remainder 3); - -insert into hash_parted values(generate_series(1,10)); - --- direct insert of values divisible by 4 - ok; -insert into hpart0 values(12),(16); --- fail; -insert into hpart0 values(11); --- 11 % 4 -> 3 remainder i.e. valid data for hpart3 partition -insert into hpart3 values(11); - --- view data -select tableoid::regclass as part, a, a%4 as "remainder = a % 4" -from hash_parted order by part; - --- test \d+ output on a table which has both partitioned and unpartitioned --- partitions -\d+ list_parted - --- cleanup -drop table range_parted, list_parted; -drop table hash_parted; - --- test that a default partition added as the first partition accepts any value --- including null -create table list_parted (a int) partition by list (a); -create table part_default partition of list_parted default; -\d+ part_default -insert into part_default values (null); -insert into part_default values (1); -insert into part_default values (-1); -select tableoid::regclass, a from list_parted; --- cleanup -drop table list_parted; - --- more tests for certain multi-level partitioning scenarios -create table mlparted (a int, b int) partition by range (a, b); -create table mlparted1 (b int not null, a int not null) partition by range ((b+0)); -create table mlparted11 (like mlparted1); -alter table mlparted11 drop a; -alter table mlparted11 add a int; -alter table mlparted11 drop a; -alter table mlparted11 add a int not null; --- attnum for key attribute 'a' is different in mlparted, mlparted1, and mlparted11 -select attrelid::regclass, attname, attnum -from pg_attribute -where attname = 'a' - and (attrelid = 'mlparted'::regclass - or attrelid = 'mlparted1'::regclass - or attrelid = 'mlparted11'::regclass) -order by attrelid::regclass::text; - -alter table mlparted1 attach partition mlparted11 for values from (2) to (5); -alter table mlparted attach partition mlparted1 for values from (1, 2) to (1, 10); - --- check that "(1, 2)" is correctly routed to mlparted11. -insert into mlparted values (1, 2); -select tableoid::regclass, * from mlparted; - --- check that proper message is shown after failure to route through mlparted1 -insert into mlparted (a, b) values (1, 5); - -truncate mlparted; -alter table mlparted add constraint check_b check (b = 3); - --- have a BR trigger modify the row such that the check_b is violated -create function mlparted11_trig_fn() -returns trigger AS -$$ -begin - NEW.b := 4; - return NEW; -end; -$$ -language plpgsql; -create trigger mlparted11_trig before insert ON mlparted11 - for each row execute procedure mlparted11_trig_fn(); - --- check that the correct row is shown when constraint check_b fails after --- "(1, 2)" is routed to mlparted11 (actually "(1, 4)" would be shown due --- to the BR trigger mlparted11_trig_fn) -insert into mlparted values (1, 2); -drop trigger mlparted11_trig on mlparted11; -drop function mlparted11_trig_fn(); - --- check that inserting into an internal partition successfully results in --- checking its partition constraint before inserting into the leaf partition --- selected by tuple-routing -insert into mlparted1 (a, b) values (2, 3); - --- check routing error through a list partitioned table when the key is null -create table lparted_nonullpart (a int, b char) partition by list (b); -create table lparted_nonullpart_a partition of lparted_nonullpart for values in ('a'); -insert into lparted_nonullpart values (1); -drop table lparted_nonullpart; - --- check that RETURNING works correctly with tuple-routing -alter table mlparted drop constraint check_b; -create table mlparted12 partition of mlparted1 for values from (5) to (10); -create table mlparted2 (b int not null, a int not null); -alter table mlparted attach partition mlparted2 for values from (1, 10) to (1, 20); -create table mlparted3 partition of mlparted for values from (1, 20) to (1, 30); -create table mlparted4 (like mlparted); -alter table mlparted4 drop a; -alter table mlparted4 add a int not null; -alter table mlparted attach partition mlparted4 for values from (1, 30) to (1, 40); -with ins (a, b, c) as - (insert into mlparted (b, a) select s.a, 1 from generate_series(2, 39) s(a) returning tableoid::regclass, *) - select a, b, min(c), max(c) from ins group by a, b order by 1; - -alter table mlparted add c text; -create table mlparted5 (c text, a int not null, b int not null) partition by list (c); -create table mlparted5a (a int not null, c text, b int not null); -alter table mlparted5 attach partition mlparted5a for values in ('a'); -alter table mlparted attach partition mlparted5 for values from (1, 40) to (1, 50); -alter table mlparted add constraint check_b check (a = 1 and b < 45); -insert into mlparted values (1, 45, 'a'); -create function mlparted5abrtrig_func() returns trigger as $$ begin new.c = 'b'; return new; end; $$ language plpgsql; -create trigger mlparted5abrtrig before insert on mlparted5a for each row execute procedure mlparted5abrtrig_func(); -insert into mlparted5 (a, b, c) values (1, 40, 'a'); -drop table mlparted5; -alter table mlparted drop constraint check_b; - --- Check multi-level default partition -create table mlparted_def partition of mlparted default partition by range(a); -create table mlparted_def1 partition of mlparted_def for values from (40) to (50); -create table mlparted_def2 partition of mlparted_def for values from (50) to (60); -insert into mlparted values (40, 100); -insert into mlparted_def1 values (42, 100); -insert into mlparted_def2 values (54, 50); --- fail -insert into mlparted values (70, 100); -insert into mlparted_def1 values (52, 50); -insert into mlparted_def2 values (34, 50); --- ok -create table mlparted_defd partition of mlparted_def default; -insert into mlparted values (70, 100); - -select tableoid::regclass, * from mlparted_def; - --- Check multi-level tuple routing with attributes dropped from the --- top-most parent. First remove the last attribute. -alter table mlparted add d int, add e int; -alter table mlparted drop e; -create table mlparted5 partition of mlparted - for values from (1, 40) to (1, 50) partition by range (c); -create table mlparted5_ab partition of mlparted5 - for values from ('a') to ('c') partition by list (c); --- This partitioned table should remain with no partitions. -create table mlparted5_cd partition of mlparted5 - for values from ('c') to ('e') partition by list (c); -create table mlparted5_a partition of mlparted5_ab for values in ('a'); -create table mlparted5_b (d int, b int, c text, a int); -alter table mlparted5_ab attach partition mlparted5_b for values in ('b'); -truncate mlparted; -insert into mlparted values (1, 2, 'a', 1); -insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a -insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b -insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails -insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails -select tableoid::regclass, * from mlparted order by a, b, c, d; -alter table mlparted drop d; -truncate mlparted; --- Remove the before last attribute. -alter table mlparted add e int, add d int; -alter table mlparted drop e; -insert into mlparted values (1, 2, 'a', 1); -insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a -insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b -insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails -insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails -select tableoid::regclass, * from mlparted order by a, b, c, d; -alter table mlparted drop d; -drop table mlparted5; - --- check that message shown after failure to find a partition shows the --- appropriate key description (or none) in various situations -create table key_desc (a int, b int) partition by list ((a+0)); -create table key_desc_1 partition of key_desc for values in (1) partition by range (b); - -create user regress_insert_other_user; -grant select (a) on key_desc_1 to regress_insert_other_user; -grant insert on key_desc to regress_insert_other_user; - -set role regress_insert_other_user; --- no key description is shown -insert into key_desc values (1, 1); - -reset role; -grant select (b) on key_desc_1 to regress_insert_other_user; -set role regress_insert_other_user; --- key description (b)=(1) is now shown -insert into key_desc values (1, 1); - --- key description is not shown if key contains expression -insert into key_desc values (2, 1); -reset role; -revoke all on key_desc from regress_insert_other_user; -revoke all on key_desc_1 from regress_insert_other_user; -drop role regress_insert_other_user; -drop table key_desc, key_desc_1; - --- test minvalue/maxvalue restrictions -create table mcrparted (a int, b int, c int) partition by range (a, abs(b), c); -create table mcrparted0 partition of mcrparted for values from (minvalue, 0, 0) to (1, maxvalue, maxvalue); -create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, minvalue); -create table mcrparted4 partition of mcrparted for values from (21, minvalue, 0) to (30, 20, minvalue); - --- check multi-column range partitioning expression enforces the same --- constraint as what tuple-routing would determine it to be -create table mcrparted0 partition of mcrparted for values from (minvalue, minvalue, minvalue) to (1, maxvalue, maxvalue); -create table mcrparted1 partition of mcrparted for values from (2, 1, minvalue) to (10, 5, 10); -create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, maxvalue); -create table mcrparted3 partition of mcrparted for values from (11, 1, 1) to (20, 10, 10); -create table mcrparted4 partition of mcrparted for values from (21, minvalue, minvalue) to (30, 20, maxvalue); -create table mcrparted5 partition of mcrparted for values from (30, 21, 20) to (maxvalue, maxvalue, maxvalue); - --- null not allowed in range partition -insert into mcrparted values (null, null, null); - --- routed to mcrparted0 -insert into mcrparted values (0, 1, 1); -insert into mcrparted0 values (0, 1, 1); - --- routed to mcparted1 -insert into mcrparted values (9, 1000, 1); -insert into mcrparted1 values (9, 1000, 1); -insert into mcrparted values (10, 5, -1); -insert into mcrparted1 values (10, 5, -1); -insert into mcrparted values (2, 1, 0); -insert into mcrparted1 values (2, 1, 0); - --- routed to mcparted2 -insert into mcrparted values (10, 6, 1000); -insert into mcrparted2 values (10, 6, 1000); -insert into mcrparted values (10, 1000, 1000); -insert into mcrparted2 values (10, 1000, 1000); - --- no partition exists, nor does mcrparted3 accept it -insert into mcrparted values (11, 1, -1); -insert into mcrparted3 values (11, 1, -1); - --- routed to mcrparted5 -insert into mcrparted values (30, 21, 20); -insert into mcrparted5 values (30, 21, 20); -insert into mcrparted4 values (30, 21, 20); -- error - --- check rows -select tableoid::regclass::text, * from mcrparted order by 1; - --- cleanup -drop table mcrparted; - --- check that a BR constraint can't make partition contain violating rows -create table brtrigpartcon (a int, b text) partition by list (a); -create table brtrigpartcon1 partition of brtrigpartcon for values in (1); -create or replace function brtrigpartcon1trigf() returns trigger as $$begin new.a := 2; return new; end$$ language plpgsql; -create trigger brtrigpartcon1trig before insert on brtrigpartcon1 for each row execute procedure brtrigpartcon1trigf(); -insert into brtrigpartcon values (1, 'hi there'); -insert into brtrigpartcon1 values (1, 'hi there'); - --- check that the message shows the appropriate column description in a --- situation where the partitioned table is not the primary ModifyTable node -create table inserttest3 (f1 text default 'foo', f2 text default 'bar', f3 int); -create role regress_coldesc_role; -grant insert on inserttest3 to regress_coldesc_role; -grant insert on brtrigpartcon to regress_coldesc_role; -revoke select on brtrigpartcon from regress_coldesc_role; -set role regress_coldesc_role; -with result as (insert into brtrigpartcon values (1, 'hi there') returning 1) - insert into inserttest3 (f3) select * from result; -reset role; - --- cleanup -revoke all on inserttest3 from regress_coldesc_role; -revoke all on brtrigpartcon from regress_coldesc_role; -drop role regress_coldesc_role; -drop table inserttest3; -drop table brtrigpartcon; -drop function brtrigpartcon1trigf(); - --- check that "do nothing" BR triggers work with tuple-routing -create table donothingbrtrig_test (a int, b text) partition by list (a); -create table donothingbrtrig_test1 (b text, a int); -create table donothingbrtrig_test2 (c text, b text, a int); -alter table donothingbrtrig_test2 drop column c; -create or replace function donothingbrtrig_func() returns trigger as $$begin raise notice 'b: %', new.b; return NULL; end$$ language plpgsql; -create trigger donothingbrtrig1 before insert on donothingbrtrig_test1 for each row execute procedure donothingbrtrig_func(); -create trigger donothingbrtrig2 before insert on donothingbrtrig_test2 for each row execute procedure donothingbrtrig_func(); -alter table donothingbrtrig_test attach partition donothingbrtrig_test1 for values in (1); -alter table donothingbrtrig_test attach partition donothingbrtrig_test2 for values in (2); -insert into donothingbrtrig_test values (1, 'foo'), (2, 'bar'); -copy donothingbrtrig_test from stdout; -1 baz -2 qux -\. -select tableoid::regclass, * from donothingbrtrig_test; - --- cleanup -drop table donothingbrtrig_test; -drop function donothingbrtrig_func(); - --- check multi-column range partitioning with minvalue/maxvalue constraints -create table mcrparted (a text, b int) partition by range(a, b); -create table mcrparted1_lt_b partition of mcrparted for values from (minvalue, minvalue) to ('b', minvalue); -create table mcrparted2_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue); -create table mcrparted3_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue); -create table mcrparted4_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0); -create table mcrparted5_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10); -create table mcrparted6_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue); -create table mcrparted7_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue); -create table mcrparted8_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, maxvalue); - -\d+ mcrparted -\d+ mcrparted1_lt_b -\d+ mcrparted2_b -\d+ mcrparted3_c_to_common -\d+ mcrparted4_common_lt_0 -\d+ mcrparted5_common_0_to_10 -\d+ mcrparted6_common_ge_10 -\d+ mcrparted7_gt_common_lt_d -\d+ mcrparted8_ge_d - -insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10), - ('comm', -10), ('common', -10), ('common', 0), ('common', 10), - ('commons', 0), ('d', -10), ('e', 0); -select tableoid::regclass, * from mcrparted order by a, b; -drop table mcrparted; - --- check that wholerow vars in the RETURNING list work with partitioned tables -create table returningwrtest (a int) partition by list (a); -create table returningwrtest1 partition of returningwrtest for values in (1); -insert into returningwrtest values (1) returning returningwrtest; - --- check also that the wholerow vars in RETURNING list are converted as needed -alter table returningwrtest add b text; -create table returningwrtest2 (b text, c int, a int); -alter table returningwrtest2 drop c; -alter table returningwrtest attach partition returningwrtest2 for values in (2); -insert into returningwrtest values (2, 'foo') returning returningwrtest; -drop table returningwrtest; -*/ - --- Clean up -DO $d$ -declare - l_rec record; -begin - for l_rec in (select foreign_table_schema, foreign_table_name - from information_schema.foreign_tables) loop - execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); - end loop; -end; -$d$; - ---Testcase 21: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 22: -DROP SERVER influxdb_svr CASCADE; ---Testcase 23: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/14.0/extra/prepare.sql b/sql/14.0/extra/prepare.sql deleted file mode 100644 index 597c259..0000000 --- a/sql/14.0/extra/prepare.sql +++ /dev/null @@ -1,159 +0,0 @@ --- Regression tests for prepareable statements. We query the content --- of the pg_prepared_statements view as prepared statements are --- created and removed. -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 1: -CREATE EXTENSION influxdb_fdw; - ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - ---Testcase 4: -CREATE FOREIGN TABLE tenk1 ( - unique1 int4, - unique2 int4, - two int4, - four int4, - ten int4, - twenty int4, - hundred int4, - thousand int4, - twothousand int4, - fivethous int4, - tenthous int4, - odd int4, - even int4, - stringu1 name, - stringu2 name, - string4 name -) SERVER influxdb_svr OPTIONS (table 'tenk'); - --- Does not support this command --- ALTER TABLE tenk1 SET WITH OIDS; - ---Testcase 5: -CREATE FOREIGN TABLE road ( - name text, - thepath path -) SERVER influxdb_svr; - ---Testcase 6: -CREATE FOREIGN TABLE road_tmp (a int, b int) SERVER influxdb_svr; - ---Testcase 7: -SELECT name, statement, parameter_types FROM pg_prepared_statements; - ---Testcase 8: -PREPARE q1 AS SELECT a AS a FROM road_tmp; ---Testcase 9: -EXECUTE q1; - ---Testcase 10: -SELECT name, statement, parameter_types FROM pg_prepared_statements; - --- should fail ---Testcase 11: -PREPARE q1 AS SELECT b FROM road_tmp; - --- should succeed -DEALLOCATE q1; ---Testcase 12: -PREPARE q1 AS SELECT b FROM road_tmp; ---Testcase 13: -EXECUTE q1; - ---Testcase 14: -PREPARE q2 AS SELECT b AS b FROM road_tmp; ---Testcase 15: -SELECT name, statement, parameter_types FROM pg_prepared_statements; - --- sql92 syntax -DEALLOCATE PREPARE q1; - ---Testcase 16: -SELECT name, statement, parameter_types FROM pg_prepared_statements; - -DEALLOCATE PREPARE q2; --- the view should return the empty set again ---Testcase 17: -SELECT name, statement, parameter_types FROM pg_prepared_statements; - --- parameterized queries ---Testcase 18: -PREPARE q2(text) AS - SELECT datname, datistemplate, datallowconn - FROM pg_database WHERE datname = $1; - ---Testcase 19: -EXECUTE q2('postgres'); - ---Testcase 20: -PREPARE q3(text, int, float, boolean, smallint) AS - SELECT * FROM tenk1 WHERE string4 = $1 AND (four = $2 OR - ten = $3::bigint OR true = $4 OR odd = $5::int) - ORDER BY unique1; - ---Testcase 21: -EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); - --- too few params ---Testcase 22: -EXECUTE q3('bool'); - --- too many params ---Testcase 23: -EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); - --- wrong param types ---Testcase 24: -EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); - --- invalid type ---Testcase 25: -PREPARE q4(nonexistenttype) AS SELECT $1; - --- create table as execute ---Testcase 26: -PREPARE q5(int, text) AS - SELECT * FROM tenk1 WHERE unique1 = $1 OR stringu1 = $2 - ORDER BY unique1; ---Testcase 27: -CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); ---Testcase 28: -SELECT * FROM q5_prep_results; ---Testcase 29: -CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') - WITH NO DATA; ---Testcase 30: -SELECT * FROM q5_prep_nodata; - --- unknown or unspecified parameter types: should succeed ---Testcase 31: -PREPARE q6 AS - SELECT * FROM tenk1 WHERE unique1 = $1 AND stringu1 = $2; ---Testcase 32: -PREPARE q7(unknown) AS - SELECT * FROM road WHERE thepath = $1; - ---Testcase 33: -SELECT name, statement, parameter_types FROM pg_prepared_statements - ORDER BY name; - --- test DEALLOCATE ALL; -DEALLOCATE ALL; ---Testcase 34: -SELECT name, statement, parameter_types FROM pg_prepared_statements - ORDER BY name; - ---Testcase 35: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 36: -DROP SERVER influxdb_svr CASCADE; ---Testcase 37: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/14.0/extra/select_having.sql b/sql/14.0/extra/select_having.sql deleted file mode 100644 index c912bed..0000000 --- a/sql/14.0/extra/select_having.sql +++ /dev/null @@ -1,93 +0,0 @@ --- --- SELECT_HAVING --- -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 1: -CREATE EXTENSION influxdb_fdw; - ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - ---Testcase 4: -CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; - ---Testcase 5: -INSERT INTO test_having VALUES (0, 1, 'XXXX', 'A'); ---Testcase 6: -INSERT INTO test_having VALUES (1, 2, 'AAAA', 'b'); ---Testcase 7: -INSERT INTO test_having VALUES (2, 2, 'AAAA', 'c'); ---Testcase 8: -INSERT INTO test_having VALUES (3, 3, 'BBBB', 'D'); ---Testcase 9: -INSERT INTO test_having VALUES (4, 3, 'BBBB', 'e'); ---Testcase 10: -INSERT INTO test_having VALUES (5, 3, 'bbbb', 'F'); ---Testcase 11: -INSERT INTO test_having VALUES (6, 4, 'cccc', 'g'); ---Testcase 12: -INSERT INTO test_having VALUES (7, 4, 'cccc', 'h'); ---Testcase 13: -INSERT INTO test_having VALUES (8, 4, 'CCCC', 'I'); ---Testcase 14: -INSERT INTO test_having VALUES (9, 4, 'CCCC', 'j'); - ---Testcase 15: -SELECT b, c FROM test_having - GROUP BY b, c HAVING count(*) = 1 ORDER BY b, c; - --- HAVING is effectively equivalent to WHERE in this case ---Testcase 16: -SELECT b, c FROM test_having - GROUP BY b, c HAVING b = 3 ORDER BY b, c; - ---Testcase 17: -SELECT lower(c), count(c) FROM test_having - GROUP BY lower(c) HAVING count(*) > 2 OR min(a) = max(a) - ORDER BY lower(c); - ---Testcase 18: -SELECT c, max(a) FROM test_having - GROUP BY c HAVING count(*) > 2 OR min(a) = max(a) - ORDER BY c; - --- test degenerate cases involving HAVING without GROUP BY --- Per SQL spec, these should generate 0 or 1 row, even without aggregates - ---Testcase 19: -SELECT min(a), max(a) FROM test_having HAVING min(a) = max(a); ---Testcase 20: -SELECT min(a), max(a) FROM test_having HAVING min(a) < max(a); - --- errors: ungrouped column references ---Testcase 21: -SELECT a FROM test_having HAVING min(a) < max(a); ---Testcase 22: -SELECT 1 AS one FROM test_having HAVING a > 1; - --- the really degenerate case: need not scan table at all ---Testcase 23: -SELECT 1 AS one FROM test_having HAVING 1 > 2; ---Testcase 24: -SELECT 1 AS one FROM test_having HAVING 1 < 2; - --- and just to prove that we aren't scanning the table: ---Testcase 25: -SELECT 1 AS one FROM test_having WHERE 1/a = 1 HAVING 1 < 2; - ---Testcase 26: --- Clean up: -DELETE FROM test_having; -DROP FOREIGN TABLE test_having; ---Testcase 27: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 28: -DROP SERVER influxdb_svr CASCADE; ---Testcase 29: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/14.0/influxdb_fdw.sql b/sql/14.0/influxdb_fdw.sql deleted file mode 100644 index ef62790..0000000 --- a/sql/14.0/influxdb_fdw.sql +++ /dev/null @@ -1,595 +0,0 @@ ---SET log_min_messages=debug1; ---SET client_min_messages=debug1; ---Testcase 1: -SET datestyle=ISO; --- timestamp with time zone differs based on this ---Testcase 2: -SET timezone='Japan'; - -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- import time column as timestamp and text type -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); ---Testcase 6: -SELECT * FROM cpu; ---Testcase 7: -SELECT tag1, value1 FROM cpu; ---Testcase 8: -SELECT value1, time, value2 FROM cpu; ---Testcase 9: -SELECT value1, time_text, value2 FROM cpu; - ---Testcase 10: -DROP FOREIGN TABLE cpu; ---Testcase 11: -DROP FOREIGN TABLE t3; ---Testcase 12: -DROP FOREIGN TABLE t4; ---Testcase 13: -DROP FOREIGN TABLE tx; ---Testcase 14: -DROP FOREIGN TABLE numbers; - --- test EXECPT -IMPORT FOREIGN SCHEMA public EXCEPT (cpu, t3, t4, tx, numbers) FROM SERVER server1 INTO public; ---Testcase 15: -SELECT ftoptions FROM pg_foreign_table; - --- test LIMIT TO -IMPORT FOREIGN SCHEMA public LIMIT TO (cpu) FROM SERVER server1 INTO public; ---Testcase 16: -SELECT ftoptions FROM pg_foreign_table; ---Testcase 17: -DROP FOREIGN TABLE cpu; - -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); - ---Testcase 18: -SELECT * FROM cpu; ---Testcase 19: -SELECT tag1, value1 FROM cpu; ---Testcase 20: -SELECT value1, time, value2 FROM cpu; ---Testcase 21: -SELECT tag1 FROM cpu; ---Testcase 22: -SELECT * FROM numbers; - ---Testcase 23: -\d cpu; - ---Testcase 24: -SELECT * FROM cpu WHERE value1=100; ---Testcase 25: -SELECT * FROM cpu WHERE value2=0.5; ---Testcase 26: -SELECT * FROM cpu WHERE value3='str'; ---Testcase 27: -SELECT * FROM cpu WHERE value4=true; ---Testcase 28: -SELECT * FROM cpu WHERE NOT (value4 AND value1=100); ---Testcase 29: -SELECT * FROM cpu WHERE tag1='tag1_A'; - ---Testcase 30: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE value3 IS NULL; ---Testcase 31: -SELECT * FROM cpu WHERE value3 IS NULL; ---Testcase 32: -SELECT * FROM cpu WHERE tag2 IS NULL; ---Testcase 33: -SELECT * FROM cpu WHERE value3 IS NOT NULL; ---Testcase 34: -SELECT * FROM cpu WHERE tag2 IS NOT NULL; - --- InfluxDB not support compare timestamp with OR condition ---Testcase 35: -SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR value2 = 0.5; - --- InfluxDB not support compare timestamp with != or <> ---Testcase 36: -SELECT * FROM cpu WHERE time != '2015-08-18 09:48:08+09'; ---Testcase 37: -SELECT * FROM cpu WHERE time <> '2015-08-18 09:48:08+09'; - ---Testcase 38: -SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR value2 = 0.5; - --- There is inconsitency for search of missing values between tag and field ---Testcase 39: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE value3 = ''; ---Testcase 40: -SELECT * FROM cpu WHERE value3 = ''; - ---Testcase 41: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE tag2 = ''; ---Testcase 42: -SELECT * FROM cpu WHERE tag2 = ''; - ---Testcase 43: -SELECT * FROM cpu WHERE tag1 IN ('tag1_A', 'tag1_B'); ---Testcase 44: -EXPLAIN VERBOSE -SELECT * FROM cpu WHERE tag1 IN ('tag1_A', 'tag1_B'); - --- Rows which have no tag are considered to have empty string ---Testcase 45: -SELECT * FROM cpu WHERE tag1 NOT IN ('tag1_A', 'tag1_B'); ---Testcase 46: -EXPLAIN VERBOSE -SELECT * FROM cpu WHERE tag1 NOT IN ('tag1_A', 'tag1_B'); - --- test IN/NOT IN ---Testcase 47: -SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); ---Testcase 48: -SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); ---Testcase 49: -SELECT * FROM cpu WHERE value1 NOT IN (100, 97); ---Testcase 50: -SELECT * FROM cpu WHERE value1 IN (100, 97); ---Testcase 51: -SELECT * FROM cpu WHERE value2 IN (0.5, 10.9); ---Testcase 52: -SELECT * FROM cpu WHERE value2 NOT IN (2, 9.7); ---Testcase 53: -SELECT * FROM cpu WHERE value4 NOT IN ('true', 'true'); ---Testcase 54: -SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); ---Testcase 55: -SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); ---Testcase 56: -SELECT * FROM cpu WHERE value1 NOT IN (100, 97); ---Testcase 57: -SELECT * FROM cpu WHERE value1 IN (100, 97); ---Testcase 58: -SELECT * FROM cpu WHERE value2 IN (0.5, 10.9); ---Testcase 59: -SELECT * FROM cpu WHERE value2 NOT IN (2, 9.7); ---Testcase 60: -SELECT * FROM cpu WHERE value4 NOT IN ('true', 'true'); ---Testcase 61: -SELECT * FROM cpu WHERE value4 IN ('f', 't'); - ---Testcase 62: -CREATE FOREIGN TABLE t1(time timestamp with time zone , tag1 text, value1 integer) SERVER server1 OPTIONS (table 'cpu'); ---Testcase 63: -CREATE FOREIGN TABLE t2(time timestamp , tag1 text, value1 integer) SERVER server1 OPTIONS (table 'cpu'); - ---Testcase 64: -SELECT * FROM t1; ---Testcase 65: -SELECT * FROM t2; --- In following four queries, timestamp condition is added to InfluxQL as "time = '2015-08-18 00:00:00'" ---Testcase 66: -SELECT * FROM t1 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; ---Testcase 67: -SELECT * FROM t1 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; - ---Testcase 68: -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; ---Testcase 69: -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; - --- pushdown now() ---Testcase 70: -SELECT * FROM t2 WHERE now() > time; ---Testcase 71: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE now() > time; - ---Testcase 72: -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; ---Testcase 73: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; - --- InfluxDB does not seem to support time column + interval, so below query returns empty result --- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; --- EXPLAIN (VERBOSE, COSTS OFF) --- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; - --- InfluxDB does not support month or year interval, so not push down ---Testcase 74: -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; ---Testcase 75: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; - ---Testcase 76: -SELECT * FROM t2 WHERE value1 = ANY (ARRAY(SELECT value1 FROM t1 WHERE value1 < 1000)); - --- ANY with ARRAY expression ---Testcase 77: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, a + 1]); ---Testcase 78: -SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, a + 1]); - ---Testcase 79: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, a + 1]); ---Testcase 80: -SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, a + 1]); - ---Testcase 81: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, a + 1]); ---Testcase 82: -SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, a + 1]); - ---Testcase 83: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, a + 1]); ---Testcase 84: -SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, a + 1]); - ---Testcase 85: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, a + 1]); ---Testcase 86: -SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, a + 1]); - ---Testcase 87: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, a + 1]); ---Testcase 88: -SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, a + 1]); - --- ANY with ARRAY const ---Testcase 89: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, 2]); ---Testcase 90: -SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, 2]); - ---Testcase 91: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, 2]); ---Testcase 92: -SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, 2]); - ---Testcase 93: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, 2]); ---Testcase 94: -SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, 2]); - ---Testcase 95: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, 2]); ---Testcase 96: -SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, 2]); - ---Testcase 97: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, 2]); ---Testcase 98: -SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, 2]); - ---Testcase 99: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, 2]); ---Testcase 100: -SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, 2]); - ---Testcase 101: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a = ANY('{1, 2, 3}'); ---Testcase 102: -SELECT a, b FROM numbers WHERE a = ANY('{1, 2, 3}'); ---Testcase 103: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <> ANY('{1, 2, 3}'); ---Testcase 104: -SELECT a, b FROM numbers WHERE a <> ANY('{1, 2, 3}'); - --- ALL with ARRAY expression ---Testcase 105: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, a * 1]); ---Testcase 106: -SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, a * 1]); - ---Testcase 107: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, a + 1]); ---Testcase 108: -SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, a + 1]); - ---Testcase 109: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, a / 1]); ---Testcase 110: -SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, a / 1]); - ---Testcase 111: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, a + 1]); ---Testcase 112: -SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, a + 1]); - ---Testcase 113: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a > ALL(ARRAY[1, a - 1]); ---Testcase 114: -SELECT a, b FROM numbers WHERE a > ALL(ARRAY[1, a - 1]); - ---Testcase 115: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, a + 1]); ---Testcase 116: -SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, a + 1]); - --- ALL with ARRAY const ---Testcase 117: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, 1]); ---Testcase 118: -SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, 1]); - ---Testcase 119: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, 3]); ---Testcase 120: -SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, 3]); - ---Testcase 121: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, 2]); ---Testcase 122: -SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, 2]); - ---Testcase 123: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, 2]); ---Testcase 124: -SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, 2]); - ---Testcase 125: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a > ALL(ARRAY[0, 1]); ---Testcase 126: -SELECT a, b FROM numbers WHERE a > ALL(ARRAY[0, 1]); - ---Testcase 127: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, 3]); ---Testcase 128: -SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, 3]); - --- ANY/ALL with TEXT ARRAY const ---Testcase 129: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE b = ANY(ARRAY['One', 'Two']); ---Testcase 130: -SELECT a, b FROM numbers WHERE b = ANY(ARRAY['One', 'Two']); - ---Testcase 131: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE b <> ALL(ARRAY['One', 'Four']); ---Testcase 132: -SELECT a, b FROM numbers WHERE b <> ALL(ARRAY['One', 'Four']); - ---Testcase 133: -EXPLAIN VERBOSE -SELECT a, b FROM numbers WHERE b > ANY(ARRAY['One', 'Two']); ---Testcase 134: -SELECT a, b FROM numbers WHERE b > ANY(ARRAY['One', 'Two']); - ---Testcase 135: -EXPLAIN VERBOSE -SELECT * FROM numbers WHERE b > ALL(ARRAY['Four', 'Five']); ---Testcase 136: -SELECT a, b FROM numbers WHERE b > ALL(ARRAY['Four', 'Five']); - ---Testcase 137: -DROP FOREIGN TABLE numbers; - ---Testcase 138: -ALTER SERVER server1 OPTIONS (SET dbname 'no such database'); ---Testcase 139: -SELECT * FROM t1; ---Testcase 140: -ALTER SERVER server1 OPTIONS (SET dbname 'mydb'); ---Testcase 141: -SELECT * FROM t1; - --- map time column to both timestamp and text ---Testcase 142: -CREATE FOREIGN TABLE t5(t timestamp OPTIONS (column_name 'time'), tag1 text OPTIONS (column_name 'time'), v1 integer OPTIONS (column_name 'value1')) SERVER server1 OPTIONS (table 'cpu'); ---Testcase 143: -SELECT * FROM t5; - ---get version ---Testcase 144: -\df influxdb_fdw* ---Testcase 145: -SELECT * FROM public.influxdb_fdw_version(); ---Testcase 146: -SELECT influxdb_fdw_version(); ---Test pushdown LIMIT...OFFSET ---Testcase 147: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; - ---Testcase 148: -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; - ---Testcase 149: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; - ---Testcase 150: -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; - ---Testcase 151: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; - ---Testcase 152: -SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; - ---Testcase 153: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; - ---Testcase 154: -SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; - ---Testcase 155: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM - t1 - LEFT JOIN t2 - ON t2.value1 = 123, - LATERAL (SELECT t2.value1, t1.tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss -WHERE t1.value1 = ss.value1; - ---Testcase 156: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM - t1 - LEFT JOIN t2 - ON t2.value1 = 123, - LATERAL (SELECT t2.value1, t1.tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss1, - LATERAL (SELECT ss1.* from t3 LIMIT 1 OFFSET 20) AS ss2 -WHERE t1.value1 = ss2.value1; - ---Testcase 157: -DROP FOREIGN TABLE cpu; ---Testcase 158: -DROP FOREIGN TABLE t1; ---Testcase 159: -DROP FOREIGN TABLE t2; ---Testcase 160: -DROP FOREIGN TABLE t3; ---Testcase 161: -DROP FOREIGN TABLE t4; ---Testcase 162: -DROP FOREIGN TABLE t5; ---Testcase 163: -DROP FOREIGN TABLE tx; - --- test INSERT, DELETE -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); ---Testcase 164: -SELECT * FROM cpu; ---Testcase 165: -EXPLAIN VERBOSE -INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test1', true); ---Testcase 166: -INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test', true); ---Testcase 167: -SELECT * FROM cpu; - ---Testcase 168: -EXPLAIN VERBOSE -INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), - ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); ---Testcase 169: -INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), - ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); ---Testcase 170: -SELECT * FROM cpu; - ---Testcase 171: -INSERT INTO cpu(tag2, value1) VALUES('tag2_KH', 400); ---Testcase 172: -SELECT tag1, tag2, value1, value2, value3, value4 FROM cpu; - ---Testcase 173: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE tag2 = 'tag2_KH'; ---Testcase 174: -DELETE FROM cpu WHERE tag2 = 'tag2_KH'; ---Testcase 175: -SELECT tag1, tag2, value1, value2, value3, value4 FROM cpu; - ---Testcase 176: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; ---Testcase 177: -DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; ---Testcase 178: -SELECT * FROM cpu; - ---Testcase 179: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; ---Testcase 180: -DELETE FROM cpu WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; ---Testcase 181: -SELECT * FROM cpu; - --- Test INSERT, DELETE with time_text column ---Testcase 182: -INSERT INTO cpu(time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02T00:00:00Z', 'tag1_D', 'tag2_E', 600, 20.2, 'test3', true); ---Testcase 183: -SELECT * FROM cpu; - ---Testcase 184: -INSERT INTO cpu(time_text, tag1, value2) VALUES('2021-02-02T00:00:00.123456789Z', 'tag1_P', 25.8); ---Testcase 185: -SELECT * FROM cpu; - ---Testcase 186: -INSERT INTO cpu(time_text, tag1, value2) VALUES('2021-02-02 00:00:01', 'tag1_J', 37.1); ---Testcase 187: -SELECT * FROM cpu; - ---Testcase 188: -INSERT INTO cpu(time, time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02 00:00:01+05', '2021-02-02T00:00:02.123456789Z', 'tag1_A', 'tag2_B', 200, 5.5, 'test', true); ---Testcase 189: -SELECT * FROM cpu; - ---Testcase 190: -INSERT INTO cpu(time_text, time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-03T00:00:03.123456789Z', '2021-03-03 00:00:01+07', 'tag1_C', 'tag2_D', 200, 5.5, 'test', true); ---Testcase 191: -SELECT * FROM cpu; - ---Testcase 192: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:00.123456789Z'; ---Testcase 193: -DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:00.123456789Z'; ---Testcase 194: -SELECT * FROM cpu; - ---Testcase 195: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; ---Testcase 196: -DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; ---Testcase 197: -SELECT * FROM cpu; - ---Testcase 198: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; ---Testcase 199: -DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; ---Testcase 200: -SELECT * FROM cpu; - --- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null - ---Testcase 201: -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 202: -DROP SERVER server1 CASCADE; ---Testcase 203: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/14.0/schemaless/add_fields.sql b/sql/14.0/schemaless/add_fields.sql deleted file mode 100644 index 555ff53..0000000 --- a/sql/14.0/schemaless/add_fields.sql +++ /dev/null @@ -1,285 +0,0 @@ -SET datestyle=ISO; --- timestamp with time zone differs based on this -SET timezone='UTC'; - -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - --- Init data -\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null ---Before update data - ---Testcase 1: -CREATE EXTENSION influxdb_fdw CASCADE; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - ---Testcase 4: -CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); - ---Testcase 5: -CREATE FOREIGN TABLE sctbl2 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); - - ---Before update data ---Testcase 6: -SELECT * FROM sctbl1; ---Testcase 7: -SELECT max(time), max((fields->>'sig1')::bigint), max((fields->>'sig1')::bigint)+10, max((fields->>'sig1')::bigint)-10, max((fields->>'sig3')::float8), max((fields->>'sig3')::float8)/2 FROM sctbl1 GROUP BY time,(fields->>'sig1')::bigint; ---Testcase 8: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4 from sctbl1 ORDER BY tags->>'device_id'; ---Testcase 9: -SELECT bool_or((fields->>'sig1')::bigint <> 10) AND true, bool_and(fields->>'sig2' != 'aghsjfh'), bool_or((fields->>'sig1')::bigint+(fields->>'sig3')::float8 <=5.5) OR false from sctbl1 GROUP BY (fields->>'sig1')::bigint,fields->>'sig2'; ---Testcase 10: -SELECT sqrt(abs((fields->>'sig1')::float8)), sqrt(abs((fields->>'sig3')::float8)) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint > -1000 AND (fields->>'sig3')::float8 < 1000 ) AS sctbl1 ORDER BY 1 ASC,2 DESC; ---Testcase 11: -SELECT fields->>'sig2' sig2, mode((fields->>'sig3')::float8) WITHIN GROUP (ORDER BY (fields->>'sig3')::float8) AS m1 from sctbl1 GROUP BY fields->>'sig2'; ---Testcase 12: -SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), lower(fields->>'sig2') FROM sctbl1 ORDER BY 1 ASC,2 DESC,3 ASC,4; - --------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ ---Update data -\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null - ---Testcase 13: -DROP FOREIGN TABLE sctbl1; ---Testcase 14: -CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); - ---Testcase 15: -SELECT * FROM sctbl1; ---Select fields,tags ---Testcase 16: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint < (fields->>'sig3')::float8 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; ---Testcase 17: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE (fields->>'sig3')::float8 < 0 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; ---Testcase 18: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE NOT time >'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 2; ---Testcase 19: -SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 20: -SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 21: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig1')::bigint BETWEEN 0 AND 10000 ORDER BY (fields->>'sig1')::bigint DESC LIMIT 5 OFFSET 0; ---Testcase 22: -SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE fields->>'sig2' LIKE 'x%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 23: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4 FROM sctbl1 WHERE NOT EXISTS (SELECT fields->>'sig2' FROM sctbl1 WHERE fields->>'sig2'='AHW') ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; ---Testcase 24: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig3')::float8 < ALL (SELECT (fields->>'sig1')::bigint FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; ---Testcase 25: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig3')::float8 = ANY (ARRAY[0.78,0.32,0.34]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 26: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig3')::float8=0.25) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; ---Testcase 27: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE fields->>'sig1'=ANY (ARRAY(SELECT fields->>'sig1' FROM sctbl1 WHERE (fields->>'sig1')::bigint%2=0)) ORDER BY 1 DESC LIMIT 5 OFFSET 0; ---Testcase 28: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig4')::boolean=true) ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; ---Testcase 29: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint+(fields->>'sig3')::float8 as ss FROM sctbl1 WHERE fields->>'sig2' IS NULL ORDER BY (fields->>'sig1')::bigint DESC,fields->>'sig2' ASC LIMIT 5 OFFSET 0; ---Testcase 30: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint/(fields->>'sig3')::float8 as dd FROM sctbl1 WHERE fields->>'sig2' IS NOT NULL ORDER BY fields->>'sig2' DESC,(fields->>'sig1')::bigint ASC LIMIT 5 OFFSET 0; ---Testcase 31: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint*(fields->>'sig3')::float8 as mm FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint=5 ORDER BY fields->>'sig2' DESC LIMIT 5 OFFSET 0; ---Testcase 32: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig1')::bigint != 0 AND (fields->>'sig3')::float8=0.32 ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; ---Testcase 33: -SELECT (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4, (fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 > -1.0 OR fields->>'sig2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 34: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 < -0.1 AND fields->>'sig2' > 'Mee' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 35: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 36: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE fields->>'sig2' LIKE 'A%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 37: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE NOT EXISTS (SELECT fields->>'sig2' FROM sctbl1 WHERE fields->>'sig2'='AHW') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 2; ---Testcase 38: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 NOT IN (0, 1000, -1, -2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 1; ---Testcase 39: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE fields->>'sig3'=ANY (ARRAY(SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig1')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 1; ---Testcase 40: -SELECT time, fields->>'sig2' sig2 FROM sctbl1 WHERE fields->>'sig2' <= 'A' AND (fields->>'sig3')::float8 <>-5 AND (fields->>'sig1')::bigint <> 100 ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 1; - ---Select aggregate functions ---Testcase 41: -SELECT max(time), max((fields->>'sig1')::bigint*0.5), max((fields->>'sig3')::float8+10) FROM sctbl1 WHERE (fields->>'sig3')::float8 NOT IN (0, 1000, -1, -2) GROUP BY fields->>'sig3', fields->>'sig1' HAVING min((fields->>'sig3')::float8) < min((fields->>'sig1')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; ---Testcase 42: -SELECT tags->>'device_id' device_id,abs((fields->>'sig1')::bigint), ceil((fields->>'sig3')::float8), (fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0 AND (fields->>'sig4')::boolean = true; ---Testcase 43: -SELECT count(tags->>'device_id'),sum((fields->>'sig1')::bigint),sum((fields->>'sig1')::bigint+(fields->>'sig3')::float8),stddev((fields->>'sig3')::float8 order by (fields->>'sig3')::float8) from sctbl1 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; ---Testcase 44: -SELECT mode((fields->>'sig1')::bigint) WITHIN GROUP (order by (fields->>'sig1')::bigint) from sctbl1; ---Testcase 45: -SELECT (fields->>'sig1')::bigint sig1,spread((fields->>'sig1')::bigint) FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig4')::boolean in (true,false)) GROUP BY tags->>'device_id', fields->>'sig1',fields->>'sig5' HAVING (fields->>'sig5')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 1; ---Testcase 46: -SELECT (fields->>'sig3')::float8 sig3, acos((fields->>'sig3')::float8), atan((fields->>'sig3')::float8) FROM sctbl1 WHERE fields->>'sig2' IS NULL GROUP BY fields->>'sig3' HAVING min((fields->>'sig1')::bigint) < min((fields->>'sig3')::float8) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; ---Testcase 47: -SELECT (fields->>'sig3')::float8 sig3, log((fields->>'sig3')::float8),cos((fields->>'sig3')::float8) FROM sctbl1 WHERE fields->>'sig2' IS NOT NULL AND (fields->>'sig3')::float8 > 0 GROUP BY fields->>'sig3' HAVING min((fields->>'sig3')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND sum((fields->>'sig3')::float8) > -1000 AND avg((fields->>'sig3')::float8) > -1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; ---Testcase 48: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,ln((fields->>'sig1')::bigint), log10((fields->>'sig3')::float8) FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint=5 GROUP BY fields->>'sig1', fields->>'sig3' HAVING min((fields->>'sig3')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND (fields->>'sig1')::bigint > 0 AND (fields->>'sig3')::float8 > 0 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; ---Testcase 49: -SELECT max(time), max((fields->>'sig1')::bigint + (fields->>'sig3')::float8), min((fields->>'sig1')::bigint + (fields->>'sig3')::float8) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig4')::boolean != true ) AS tb1 WHERE (fields->>'sig3')::float8 != -1 AND (fields->>'sig5')::boolean != true GROUP BY fields->>'sig1' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; ---Testcase 50: -SELECT every((fields->>'sig1')::bigint > 5),every((fields->>'sig3')::float8 != 5) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig5')::boolean = true ) AS tb1 WHERE (fields->>'sig3')::float8 < 0 GROUP BY fields->>'sig1', fields->>'sig4' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 DESC, 2 LIMIT 5 OFFSET 0; ---Testcase 51: -SELECT (fields->>'sig3')::float8 sig3,exp((fields->>'sig3')::float8),exp((fields->>'sig3')::float8*2) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig5')::boolean = true ) AS tb1 WHERE true GROUP BY fields->>'sig3' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; ---Testcase 52: -SELECT min(time)+'10 days'::interval, min((fields->>'sig1')::bigint + (fields->>'sig3')::float8) FROM sctbl1 WHERE NOT time>'2020-01-03 20:30:50' GROUP BY fields->>'sig1', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; ---Testcase 53: -SELECT floor((fields->>'sig1')::bigint*(fields->>'sig3')::float8), floor((fields->>'sig1')::bigint/(fields->>'sig3')::float8) FROM sctbl1 WHERE ((fields->>'sig3')::float8 - 1)/3 != 1 GROUP BY fields->>'sig1', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; ---Testcase 54: -SELECT time, tags->>'device_id' device_id, pow((fields->>'sig1')::bigint,-2) FROM sctbl1 WHERE ((fields->>'sig3')::float8 - 1)/3 != 1 GROUP BY time, tags->>'device_id', fields->>'sig1' ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; ---Testcase 55: -SELECT min(time)+'10 days'::interval, min((fields->>'sig3')::float8) FROM sctbl1 WHERE false GROUP BY fields->>'sig1',fields->>'sig2', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; ---Testcase 56: -SELECT min(time)+'10 days'::interval, min((fields->>'sig3')::float8) FROM sctbl1 WHERE (fields->>'sig3')::float8 IN (-1,0.32,0.34,0.91,0.78) GROUP BY fields->>'sig3' HAVING min((fields->>'sig1')::bigint) > min((fields->>'sig3')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; ---Testcase 57: -SELECT max((fields->>'sig3')::float8), count(*), exists(SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > 1), exists (SELECT count(*) FROM sctbl1 WHERE (fields->>'sig4')::boolean in ('t','f')) FROM sctbl1 WHERE (fields->>'sig5')::boolean =true GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 5 OFFSET 0; - ---Join table, each table has 5 fields ---Testcase 58: -SELECT * FROM sctbl1 s1 FULL JOIN sctbl2 s2 ON s1.tags->>'device_id'=s2.tags->>'device_id'; ---Testcase 59: -SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fields->>'sig2' sig2,(s1.fields->>'sig3')::float8 sig3,(s1.fields->>'sig4')::boolean sig4,s2.fields->>'sig5' sig5 FROM sctbl1 s1 LEFT JOIN sctbl2 s2 ON (s1.fields->>'sig4')::boolean=(s2.fields->>'sig4')::boolean; ---Testcase 60: -SELECT s2.device_id,s2.sig1,s2.sig2,s2.sig3,s1.sig4,s1.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 RIGHT JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 using(sig2) where (s2.sig1)::bigint > 0 ORDER BY s2.device_id,s2.sig1,s2.sig2,s2.sig3,s1.sig4,s1.sig5; ---Testcase 61: -SELECT * FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 LEFT OUTER JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 using (sig2) ORDER BY s1.sig1,s1.sig2; ---Testcase 62: -SELECT s1.device_id,s1.sig1,s1.sig2,s1.sig3,s1.sig4,s1.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 NATURAL JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2; ---Testcase 63: -SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fields->>'sig2' sig2,(s1.fields->>'sig3')::float8 sig3,(s1.fields->>'sig4')::boolean sig4,(s1.fields->>'sig5')::boolean sig5 FROM sctbl1 s1 JOIN sctbl2 s2 on true; - - --------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ ---Update data -\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null - ---Testcase 64: -DROP FOREIGN TABLE sctbl1; ---Testcase 65: -CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); - ---Testcase 66: -SELECT * FROM sctbl1; ---Testcase 67: -SELECT avg(null::numeric) FROM sctbl1; ---Testcase 68: -SELECT sqrt(null::float8) FROM sctbl1; ---Testcase 69: -SELECT sum('NaN'::numeric) FROM sctbl1; - ---Select fields,tags ---Testcase 70: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig6')::bigint sig6 FROM sctbl1 WHERE NOT (fields->>'sig6')::bigint < (fields->>'sig1')::bigint ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; ---Testcase 71: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig7')::float8 sig7 FROM sctbl1 WHERE (fields->>'sig7')::float8 < 0 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; ---Testcase 72: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig8')::float8 sig8 FROM sctbl1 WHERE NOT time >'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 2; ---Testcase 73: -SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6,(fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::int sig10,fields->>'sig11' sig11,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,fields->>'sig18' sig18,fields->>'sig19' sig19,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; ---Testcase 74: -SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6,(fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::int sig10,fields->>'sig11' sig11,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,fields->>'sig18' sig18,fields->>'sig19' sig19,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; ---Testcase 75: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig9')::float8 sig9, (fields->>'sig10')::int sig10,fields->>'sig11' sig11 FROM sctbl1 WHERE (fields->>'sig8')::float8 BETWEEN 0.0 AND 10.0 ORDER BY (fields->>'sig1')::bigint DESC LIMIT 15 OFFSET 2; ---Testcase 76: -SELECT * FROM sctbl1 WHERE fields->>'sig11' LIKE 'w%' ORDER BY fields->>'sig11' DESC LIMIT 15 OFFSET 0; ---Testcase 77: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13 FROM sctbl1 WHERE NOT EXISTS (SELECT fields->>'sig12' FROM sctbl1 WHERE fields->>'sig11'='33') ORDER BY tags->>'device_id' DESC,(fields->>'sig1')::bigint ASC LIMIT 15 OFFSET 0; ---Testcase 78: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15 FROM sctbl1 WHERE (fields->>'sig9')::float8 < ALL (SELECT (fields->>'sig8')::float8 FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0 AND fields->>'sig8' IS NOT NULL) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; ---Testcase 79: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig16')::bigint sig16 FROM sctbl1 WHERE (fields->>'sig9')::float8 = ANY (ARRAY[-0.22,0.425,-0.9]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; ---Testcase 80: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig17')::bigint sig17 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig10' FROM sctbl1 WHERE (fields->>'sig10')::bigint!=77) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; ---Testcase 81: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,fields->>'sig18' sig18 FROM sctbl1 WHERE fields->>'sig6'=ANY (ARRAY(SELECT fields->>'sig10' FROM sctbl1 WHERE (fields->>'sig10')::bigint%2 !=0)) ORDER BY 1 DESC LIMIT 15 OFFSET 0; ---Testcase 82: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,fields->>'sig19' sig19,fields->>'sig20' sig20 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig11' FROM sctbl1 WHERE (fields->>'sig13')::boolean=true) ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; ---Testcase 83: -SELECT (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig15')::bigint+(fields->>'sig16')::bigint as ss,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21 FROM sctbl1 WHERE fields->>'sig12' IS NULL ORDER BY (fields->>'sig1')::bigint DESC,fields->>'sig12' ASC LIMIT 15 OFFSET 0; ---Testcase 84: -SELECT (fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,(fields->>'sig16')::bigint/(fields->>'sig17')::bigint as dd,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23 FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL ORDER BY fields->>'sig12' DESC,(fields->>'sig1')::int ASC LIMIT 15 OFFSET 0; ---Testcase 85: -SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig17')::bigint sig17,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25,(fields->>'sig17')::bigint*(fields->>'sig25')::float8 as mm FROM sctbl1 WHERE NOT (fields->>'sig10')::bigint=15 ORDER BY fields->>'sig20' DESC LIMIT 15 OFFSET 0; ---Testcase 86: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig10')::bigint != 0 AND (fields->>'sig7')::float8=-1.234456e+78 ORDER BY 1 DESC,2 ASC LIMIT 15 OFFSET 0; ---Testcase 87: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 > -1.0 OR fields->>'sig12' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; ---Testcase 88: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 < 0 AND fields->>'sig12' > 'Mee' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; ---Testcase 89: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 IN (1.234456e+8,-1.234456e+8) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; ---Testcase 90: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE fields->>'sig12' LIKE 't%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; ---Testcase 91: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE NOT EXISTS (SELECT fields->>'sig22' FROM sctbl1 WHERE fields->>'sig12'='AHWEMAKDF') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 1; ---Testcase 92: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig8')::float8 NOT IN (0, 1000, -1, -2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 2; ---Testcase 93: -SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE fields->>'sig6'=ANY (ARRAY(SELECT fields->>'sig6' FROM sctbl1 WHERE (fields->>'sig10')::bigint%2!=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; ---Testcase 94: -SELECT time, (fields->>'sig10')::bigint sig10,fields->>'sig12' sig12 FROM sctbl1 WHERE (fields->>'sig10')::bigint <= 1000 AND (fields->>'sig15')::float8 <> -5 AND (fields->>'sig10')::bigint <> 100 ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 1; - ---Select aggregate functions ---Testcase 95: -SELECT max(time), max((fields->>'sig15')::bigint*0.5), max((fields->>'sig17')::bigint - 10) FROM sctbl1 WHERE (fields->>'sig8')::float8 NOT IN (0.0, 1000, -1.0, -2.0) GROUP BY fields->>'sig15', fields->>'sig17' HAVING min((fields->>'sig8')::float8) < min((fields->>'sig17')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; ---Testcase 96: -SELECT tags->>'device_id' device_id,abs((fields->>'sig16')::bigint), ceil((fields->>'sig8')::float8), (fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE (fields->>'sig15')::bigint > 0 AND (fields->>'sig13')::boolean = true; ---Testcase 97: -SELECT count(tags->>'device_id'),sum((fields->>'sig10')::bigint),sum((fields->>'sig7')::float8+(fields->>'sig10')::bigint),stddev((fields->>'sig8')::float8 order by (fields->>'sig8')::float8) from sctbl1 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; ---Testcase 98: -SELECT mode(fields->>'sig12') WITHIN GROUP (order by fields->>'sig12') from sctbl1; ---Testcase 99: -SELECT (fields->>'sig10')::int sig10,spread((fields->>'sig10')::bigint) FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig6' FROM sctbl1 WHERE (fields->>'sig13')::boolean in (true,false)) GROUP BY tags->>'device_id', fields->>'sig10',fields->>'sig21' HAVING (fields->>'sig21')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 1; ---Testcase 100: -SELECT (fields->>'sig9')::float8 sig9, acos((fields->>'sig9')::float8), atan((fields->>'sig9')::float8) FROM sctbl1 WHERE fields->>'sig12' IS NULL GROUP BY fields->>'sig9' HAVING min((fields->>'sig10')::bigint) < min((fields->>'sig6')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; ---Testcase 101: -SELECT (fields->>'sig9')::float8 sig9, log((fields->>'sig9')::float8),cos((fields->>'sig9')::float8) FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL AND (fields->>'sig9')::float8 > 0 GROUP BY fields->>'sig9' HAVING min((fields->>'sig9')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND sum((fields->>'sig3')::float8) > -1000 AND avg((fields->>'sig3')::float8) > -1000 ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; ---Testcase 102: -SELECT (fields->>'sig10')::bigint sig10,(fields->>'sig8')::float8 sig8,ln((fields->>'sig10')::bigint), log10((fields->>'sig8')::float8) FROM sctbl1 WHERE NOT (fields->>'sig10')::bigint=5 GROUP BY fields->>'sig10', fields->>'sig8' HAVING min((fields->>'sig7')::float8) < 100 AND max((fields->>'sig6')::bigint) < 1000 AND (fields->>'sig10')::bigint > 0 AND (fields->>'sig8')::float8 > 0 ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; ---Testcase 103: -SELECT max(time), max((fields->>'sig6')::bigint + (fields->>'sig7')::float8), min((fields->>'sig6')::bigint + (fields->>'sig7')::float8) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig8')::float8 > -1000 AND (fields->>'sig13')::boolean != true ) AS tb1 WHERE (fields->>'sig7')::float8 != -1 AND (fields->>'sig21')::boolean != true GROUP BY fields->>'sig6' ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; ---Testcase 104: -SELECT avg((fields->>'sig23')::bigint order by (fields->>'sig23')::bigint),avg((fields->>'sig24')::bigint * 0.5) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig8')::float8 > -1000 AND (fields->>'sig21')::boolean = true ) AS tb1 WHERE (fields->>'sig9')::float8 < 0 GROUP BY (fields->>'sig23')::bigint, fields->>'sig24' HAVING sum((fields->>'sig8')::float8) > avg((fields->>'sig9')::float8) ORDER BY 1 DESC, 2 LIMIT 15 OFFSET 0; ---Testcase 105: -SELECT (fields->>'sig8')::float8 sig8,exp((fields->>'sig8')::float8),exp((fields->>'sig8')::float8*2) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig9')::float8 > -1000 AND (fields->>'sig21')::boolean = true ) AS tb1 WHERE true GROUP BY fields->>'sig8' ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; ---Testcase 106: -SELECT min(time)+'10 days'::interval, min((fields->>'sig10')::bigint + (fields->>'sig25')::float8) FROM sctbl1 WHERE NOT time>'2020-01-03 20:30:50' GROUP BY fields->>'sig10', fields->>'sig25' HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; ---Testcase 107: -SELECT floor((fields->>'sig23')::bigint*(fields->>'sig25')::float8), floor((fields->>'sig24')::bigint/(fields->>'sig25')::float8) FROM sctbl1 WHERE ((fields->>'sig25')::float8 - 1)/3 != 1 GROUP BY (fields->>'sig23')::bigint, (fields->>'sig24')::bigint,(fields->>'sig25')::float8 HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; ---Testcase 108: -SELECT time, tags->>'device_id' device_id, pow((fields->>'sig25')::float8,2) FROM sctbl1 WHERE ((fields->>'sig25')::float8 - 1)/3 != 1 GROUP BY time,tags->>'device_id',fields->>'sig25' ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; ---Testcase 109: -SELECT min(time)+'10 days'::interval, min((fields->>'sig23')::bigint) FROM sctbl1 WHERE false GROUP BY (fields->>'sig23')::bigint HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; ---Testcase 110: -SELECT min(time)+'10 days'::interval, min((fields->>'sig23')::bigint) FROM sctbl1 WHERE (fields->>'sig23')::bigint IN (1112,1000,0) GROUP BY (fields->>'sig23')::bigint HAVING min((fields->>'sig23')::bigint) > min((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; ---Testcase 111: -SELECT max((fields->>'sig23')::bigint), count(*), exists(SELECT * FROM sctbl1 WHERE (fields->>'sig24')::bigint > 1), exists (SELECT count(*) FROM sctbl1 WHERE (fields->>'sig21')::boolean in ('T','F')) FROM sctbl1 WHERE (fields->>'sig13')::boolean =true GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 15 OFFSET 0; ---Testcase 112: -SELECT (fields->>'sig9')::float8 sig9, abs(avg((fields->>'sig16')::bigint)),string_agg(fields->>'sig22',',' order by fields->>'sig22'),round(sin((fields->>'sig9')::float8)*2.3),sqrt(pow((fields->>'sig25')::float8,2)) FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL AND (fields->>'sig9')::float8 > 0 GROUP BY (fields->>'sig9')::float8,(fields->>'sig25')::float8; - ---Join table ---Testcase 113: -SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig21')::boolean sig21,s1.fields->>'sig22' sig22,(s1.fields->>'sig23')::bigint sig23,(s1.fields->>'sig24')::int sig24,(s1.fields->>'sig25')::float8 sig25 FROM sctbl1 s1 FULL JOIN sctbl2 s2 ON s1.tags->>'device_id'=s2.tags->>'device_id' ORDER BY device_id,sig21,sig22,sig23,sig24,sig25; ---Testcase 114: -SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig21')::boolean sig21,s1.fields->>'sig22' sig22,(s1.fields->>'sig23')::bigint sig23,(s2.fields->>'sig4')::boolean sig4,s2.fields->>'sig5' sig5 FROM sctbl1 s1 LEFT JOIN sctbl2 s2 ON (s1.fields->>'sig21')::boolean=(s2.fields->>'sig4')::boolean; ---Testcase 115: -SELECT s1.device_id,s1.sig21,s1.sig22,s1.sig23,s1.sig24,s1.sig25 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 RIGHT JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4, (fields->>'sig5')::boolean sig5 FROM sctbl2) s2 using(sig1) where s2.sig3 != 0; ---Testcase 116: -SELECT * FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 FULL OUTER JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 USING(sig2) ORDER BY s1.sig2, s1.time, s1.device_id, s2.time, s2.device_id; ---Testcase 117: -SELECT s2.device_id,s2.sig1,s2.sig2,s2.sig3,s2.sig4,s2.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 NATURAL JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2; ---Testcase 118: -SELECT s1.device_id,s1.sig11,s1.sig12,s1.sig13,s1.sig14,s1.sig15 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 on true; - ---Clean ---Testcase 119: -DROP FOREIGN TABLE sctbl1; -DROP FOREIGN TABLE sctbl2; -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; -DROP SERVER influxdb_svr CASCADE; -DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/schemaless/add_multi_key.sql b/sql/14.0/schemaless/add_multi_key.sql deleted file mode 100644 index b297a54..0000000 --- a/sql/14.0/schemaless/add_multi_key.sql +++ /dev/null @@ -1,481 +0,0 @@ -SET datestyle=ISO; --- timestamp with time zone differs based on this -SET timezone='UTC'; - -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - --- Init data original -\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null --- Before update data ---Testcase 1: -CREATE EXTENSION influxdb_fdw CASCADE; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - ---Testcase 4: -CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); - --------------------------------------------------TC for before update test data------------------ --- Select all data with condition and combine clause ---Testcase 5: -SELECT * FROM sctbl3 WHERE time='2020-01-09 01:00:00+00' OR (fields->>'c3')::bigint=3 OR (fields->>'c3')::bigint=10.746 ORDER BY fields->>'c2'; ---Testcase 6: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 7: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; ---Testcase 8: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; ---Testcase 9: -SELECT * FROM sctbl3 WHERE (fields->>'c5')::bool= true; ---Testcase 10: -SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint BETWEEN 0 AND 1000 ORDER BY fields->>'c2', (fields->>'c3')::bigint; ---Testcase 11: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2' LIKE 'C%' AND (fields->>'c5')::bool!= true ORDER BY 1 DESC,2 ASC,3 DESC,4,5; ---Testcase 12: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT EXISTS (SELECT fields->>'c2' FROM sctbl3 WHERE fields->>'c2'='abcd') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 13: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint < ALL (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - --- Select aggregate function and specific column from original table ---Testcase 14: -SELECT time, fields->>'c2' c2 FROM sctbl3 WHERE fields->>'c2'<='$' OR (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 ASC,2 DESC LIMIT 25 OFFSET 8; ---Testcase 15: -SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE time>= '2000-1-3 20:30:51' GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25 OFFSET 8; ---Testcase 16: -SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c4')::double precision), max((fields->>'c4')::double precision)/2 FROM sctbl3 GROUP BY fields->>'c2'; ---Testcase 17: -SELECT count(fields->>'c2'), (fields->>'c3')::bigint c3, fields->>'c4' c4 from sctbl3 GROUP BY fields->>'c2'; ---Testcase 18: -SELECT 32 + (fields->>'c3')::bigint, (fields->>'c3')::bigint + (fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c3', fields->>'c5', fields->>'c2' ORDER BY fields->>'c2'; ---Testcase 19: -SELECT max(fields->>'c2'), min((fields->>'c3')::bigint), max((fields->>'c3')::bigint) from sctbl3 GROUP BY fields->>'c3' ORDER BY (fields->>'c3')::bigint; ---Testcase 20: -SELECT sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; ---Testcase 21: -SELECT count(*), count(time), count (DISTINCT (fields->>'c3')::bigint), count (ALL (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4; ---Testcase 22: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; ---Testcase 23: -SELECT string_agg(fields->>'c2', ';' ORDER BY fields->>'c2') FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1; ---Testcase 24: -SELECT every((fields->>'c3')::bigint>0), every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; ---Testcase 25: -SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; ---Testcase 26: -SELECT bool_or((fields->>'c4')::double precision <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; - --- Select combine aggregate via operation ---Testcase 27: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC; ---Testcase 28: -SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM sctbl3 GROUP BY fields->>'c2'; ---Testcase 29: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; ---Testcase 30: -SELECT avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint)-10, avg((fields->>'c3')::bigint)*0.5 FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; ---Testcase 31: -SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time) FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; ---Testcase 32: -SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; ---Testcase 33: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; ---Testcase 34: -SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3; ---Testcase 35: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE (fields->>'c3')::bigint NOT IN (0, 1000, -1, -2) GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; ---Testcase 36: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE NOT (fields->>'c3')::bigint=5 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; ---Testcase 37: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE NOT time>'2020-1-3 20:30:50' GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 8; ---Testcase 38: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY time ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; ---Testcase 39: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY fields->>'c3', fields->>'c3'HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; --- Select from sub query ---Testcase 40: -SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c4')::double precision<1000 ) AS sctbl3; ---Testcase 41: -SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3; ---Testcase 42: -SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY 1; ---Testcase 43: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; ---Testcase 44: -SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,2 DESC; ---Testcase 45: -SELECT * FROM ( SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE time='2020-01-09 01:00:00+00' AND c3=0 AND c3=10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 46: -SELECT * FROM ( SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE c3>10.746 OR c2 != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 47: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE (fields->>'c3')::bigint != -1 AND (fields->>'c5')::bool != true GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 8; - --- Within group ---Testcase 48: ---SELECT (fields->>'c5')::bool (fields->>'c5')::bool, mode((fields->>'c3')::bigint) WITHIN GROUP (ORDER BY (fields->>'c3')::bigint) AS m1 from sctbl3 GROUP BY (fields->>'c5')::bool; - --- Select from view ---Testcase 49: -create view view_sctbl3 as select * from sctbl3 where ((fields->>'c3')::bigint != 6789); ---Testcase 50: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; ---Testcase 51: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; ---Testcase 52: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; ---Testcase 53: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3; ---Testcase 54: -SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50 FROM view_sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; ---Testcase 55: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; ---Testcase 56: -SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; ---Testcase 57: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 - FROM view_sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 8; - --Testcase 58: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 - FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; ---Testcase 59: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 - FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; ---Testcase 60: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 - FROM view_sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; ---Testcase 61: -SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 - FROM view_sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; - --- Select many target aggregate in one query and combine with condition ---Testcase 62: -SELECT upper(fields->>'c2'), upper(fields->>'c2'), lower(fields->>'c2'), lower(fields->>'c2') FROM sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; ---Testcase 63: -SELECT max(time), min((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count(*), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC,2 ASC,3 DESC,4,5; ---Testcase 64: -SELECT (fields->>'c3')::bigint*(random()<=1)::int, (random()<=1)::int*(25-10)+10 FROM sctbl3 ORDER BY 1 ASC,2 DESC; ---Testcase 65: -SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; ---Testcase 66: -SELECT sum((fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint<100 and (fields->>'c3')::bigint>-100), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint >0 AND (fields->>'c3')::bigint<100) FROM sctbl3 GROUP BY (fields->>'c5')::bool HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; ---Testcase 67: -SELECT 'abcd', 1234, (fields->>'c3')::bigint/2, 10+(fields->>'c3')::bigint * (random()<=1)::int * 0.5 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; ---Testcase 68: -SELECT count((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint) FROM sctbl3 GROUP BY influx_time(time, interval '2d') ORDER BY 1; ---Testcase 69: -SELECT max((fields->>'c3')::bigint), min((fields->>'c4')::double precision), avg((fields->>'c3')::bigint), count((fields->>'c3')::bigint) FROM sctbl3 WHERE time > '2020-01-10 00:00:00' AND time < '2020-01-15 00:00:00' GROUP BY influx_time(time, interval '1d', interval '10h30m') ORDER BY 1 ASC, 2 DESC, 3 ASC, 4 DESC; ---Testcase 70: -SELECT min(time), max(time), count(time) FROM sctbl3 GROUP BY (fields->>'c3') ORDER BY 1,2,3; ---Testcase 71: -SELECT count((fields->>'c3')::bigint), max((fields->>'c3')::bigint), sum((fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3' HAVING(max(fields->>'c2')!='HELLO' and count(fields->>'c2')>1) ORDER BY 1,2,3; ---Testcase 72: -SELECT count(fields->>'c2'), bit_and((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint), bool_and((fields->>'c5')::bool) FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1,2,3,4; ---Testcase 73: -SELECT array_agg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg((fields->>'c3')::bigint/(fields->>'c3')::bigint*(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint+(fields->>'c3')::bigint/(fields->>'c3')::bigint)*-1000), array_agg((fields->>'c3')::bigint*(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)+9999999999999.998) from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint ORDER BY 1, 2, 3, 4, 5; ---Testcase 74: -SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)-0.567-avg((fields->>'c3')::bigint/3+(fields->>'c3')::bigint)+17.55435, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+45))- -9.5+2*avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint/((fields->>'c3')::bigint-10.2)*(fields->>'c3')::bigint)+0.567+avg((fields->>'c3')::bigint)*4.5+(fields->>'c3')::bigint, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+5.6))+100-(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4 limit 5; ---Testcase 75: -SELECT bit_and((fields->>'c3')::bigint/3*(fields->>'c3')::bigint)-1 + bit_and((fields->>'c3')::bigint/4/((fields->>'c3')::bigint+6)),2* bit_and((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)*1, 5-bit_and((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-1000000+(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3' ORDER BY 1,2,3; ---Testcase 76: -SELECT bit_or((fields->>'c3')::bigint/3*(fields->>'c3')::bigint)-1 + bit_or((fields->>'c3')::bigint/4/((fields->>'c3')::bigint+6)),2* bit_or((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)*1, 5-bit_or((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-1000000+(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3' ORDER BY 1,2,3; ---Testcase 77: -SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>0.774 OR fields->>'c2' = 'Which started out as a kind' GROUP BY fields->>'c3' ORDER BY 1, 2, 3; ---Testcase 78: -SELECT count(fields->>'c2')-2*count((fields->>'c3')::bigint), count((fields->>'c3')::bigint)/count((fields->>'c5')::bool)-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c5', fields->>'c3' order by 1, 2 limit 1; ---Testcase 79: -SELECT every((fields->>'c3')::bigint != 5.5) AND true, every((fields->>'c3')::bigint <> 10) OR every((fields->>'c3')::bigint > 5.6), every((fields->>'c3')::bigint <= 2) OR (fields->>'c5')::bool from sctbl3 GROUP BY (fields->>'c5')::bool ORDER BY 1,2,3 limit 6; ---Testcase 80: -SELECT stddev((fields->>'c3')::bigint*3-(fields->>'c3')::bigint)*1000000-(fields->>'c3')::bigint, stddev((fields->>'c3')::bigint)-0.567, stddev((fields->>'c3')::bigint/((fields->>'c3')::bigint-1.3))/6, stddev((fields->>'c3')::bigint+4*(fields->>'c3')::bigint)*100, stddev((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint-52.1))+1 from sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY fields->>'c3' ORDER BY 1,2,3,4,5 ; ---Testcase 81: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-6, sum((fields->>'c3')::bigint/((fields->>'c3')::bigint+9999999)-(fields->>'c3')::bigint)*9999999999999.998, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/((fields->>'c3')::bigint+111111))*-9.5, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6 from sctbl3; ---Testcase 82: -SELECT sum((fields->>'c3')::bigint-(fields->>'c3')::bigint)-6+sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint*1.3-(fields->>'c3')::bigint)*9.998-sum((fields->>'c3')::bigint)*4, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/4)*-9.5-(fields->>'c3')::bigint, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435+(fields->>'c3')::bigint, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6-(fields->>'c3')::bigint-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4,5; ---Testcase 83: -SELECT max((fields->>'c4')::double precision), max((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, max((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, max((fields->>'c3')::bigint)+max((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c4')::double precision>= 0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4; ---Testcase 84: -SELECT min(fields->>'c2'), min((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, min((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, min((fields->>'c3')::bigint)+min((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c4')::double precision<0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4; ---Testcase 85: -SELECT variance((fields->>'c3')::bigint+(fields->>'c3')::bigint)+(fields->>'c3')::bigint, variance((fields->>'c3')::bigint*3)+(fields->>'c3')::bigint+1, variance((fields->>'c3')::bigint-2)+10 from sctbl3 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3; ---Testcase 86: -SELECT sqrt(abs((fields->>'c3')::bigint*5)) + sqrt(abs((fields->>'c3')::bigint+6)), sqrt(abs((fields->>'c3')::bigint)+5)+(fields->>'c3')::bigint, 4*sqrt(abs((fields->>'c3')::bigint-100))-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1, 2, 3; ---Testcase 87: -SELECT max((fields->>'c3')::bigint)+min((fields->>'c3')::bigint)+3, min((fields->>'c3')::bigint)-sqrt(abs((fields->>'c3')::bigint-45.21))+(fields->>'c3')::bigint*2, count(*)-count((fields->>'c5')::bool)+2, (fields->>'c5')::bool c5, (fields->>'c3')::bigint c3 from sctbl3 GROUP BY fields->>'c3', fields->>'c3', fields->>'c5' ORDER BY 1,2,3,4; ---Testcase 88: -SELECT variance((fields->>'c3')::bigint)-5*min((fields->>'c3')::bigint)-1, every((fields->>'c5')::bool <> true), max((fields->>'c3')::bigint+4.56)*3-min((fields->>'c3')::bigint), count((fields->>'c3')::bigint)-4 from sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1,2,3,4; ---Testcase 89: -SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3')::bigint)/3-(fields->>'c3')::bigint, min((fields->>'c3')::bigint)+(fields->>'c3')::bigint/4, (fields->>'c5')::bool c5 from sctbl3 GROUP BY fields->>'c3', fields->>'c3', fields->>'c5' ORDER BY 1,2,3,4,5; - - ----------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- --- Update data -\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null -drop view if exists view_sctbl3 ; -drop foreign table if exists sctbl3; - -CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1'); - --- Select all data with condition and combine clause ---Testcase 90: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5; ---Testcase 91: -SELECT * FROM sctbl3 WHERE EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint != 40.772) ORDER BY tags->>'t1'; ---Testcase 92: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; ---Testcase 93: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint=40.772) ORDER BY 1 DESC,2 ASC,3 DESC,4; ---Testcase 94: -SELECT * FROM sctbl3 WHERE fields->>'c2' IS NULL OR tags->>'t1' LIKE 'afefea' ORDER BY (fields->>'c1')::bool, fields->>'c2'; ---Testcase 95: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2' IS NOT NULL ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 96: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT (fields->>'c3')::bigint=5 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; - --- Select aggregate function and specific column from original table ---Testcase 97: -SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, max(tags->>'t1'), sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY tags->>'t1', (fields->>'c1')::bool, (fields->>'c3')::bigint, fields->>'c2' ORDER BY 1; ---Testcase 98: -SELECT sum((fields->>'c3')::bigint), tags->>'t1' t1, sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), fields->>'c1' c1 FROM sctbl3 GROUP BY fields->>'c1', fields->>'c3', fields->>'c3', tags->>'t1' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; ---Testcase 99: -SELECT stddev((fields->>'c3')::bigint), (fields->>'c1')::bool c1, stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), tags->>'t1' t1 FROM sctbl3 GROUP BY time, fields->>'c3', tags->>'t1', fields->>'c1' ORDER BY tags->>'t1' ASC,fields->>'c1' DESC; ---Testcase 100: -SELECT every((fields->>'c3')::bigint>0), (fields->>'c1')::bool c1, every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time, fields->>'c1', fields->>'c3' ORDER BY (fields->>'c1')::bool ASC, (fields->>'c3')::bigint DESC; ---Testcase 101: -SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and((fields->>'c1')::bool), bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; ---Testcase 102: -SELECT bool_or((fields->>'c4')::double precision <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c1')::bool), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, tags->>'t1' t1 from sctbl3 GROUP BY (fields->>'c1')::bool, tags->>'t1', fields->>'c2', (fields->>'c3')::bigint ORDER BY (fields->>'c1')::bool, tags->>'t1'; - --- Select combine aggregate via operation ---Testcase 103: -SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2, max(tags->>'t1') FROM sctbl3 GROUP BY fields->>'c2', tags->>'t1'; ---Testcase 104: -SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg((fields->>'c1')::bool), array_agg(tags->>'t1'), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::boolean != true ORDER BY 1 DESC, 2, 3; ---Testcase 105: -SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15) FROM sctbl3 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; ---Testcase 106: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; ---Testcase 107: -SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c1')::bool), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3; ---Testcase 108: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint=40.772) GROUP BY tags->>'t1', fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 8; ---Testcase 109: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE fields->>'c2' IS NOT NULL GROUP BY fields->>'c3', fields->>'c1' HAVING min((fields->>'c3')::bigint)>=min((fields->>'c3')::bigint) ORDER BY (fields->>'c1')::bool DESC, 2, 3; ---Testcase 110: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min(tags->>'t1') FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 8; ---Testcase 111: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY time ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; ---Testcase 112: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, tags->>'t1', (fields->>'c4')::double precision HAVING max((fields->>'c3')::bigint)>min((fields->>'c4')::double precision) ORDER BY tags->>'t1' ASC LIMIT 5 OFFSET 0; --- Select from sub query ---Testcase 113: -SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3; ---Testcase 114: -SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool = true ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY 1; ---Testcase 115: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM ( SELECT * FROM sctbl3 WHERE tags->>'t1' LIKE 't1là' ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; ---Testcase 116: -SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,tags->>'t1' DESC; ---Testcase 117: -SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, (fields->>'c3')::bigint c3 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE fields->>'c2' LIKE 'C%' ORDER BY tags->>'t1' DESC,fields->>'c2' ASC LIMIT 25 OFFSET 0; ---Testcase 118: -SELECT (fields->>'c1')::bool c1, tags->>'t1' t1, (fields->>'c4')::double precision c4 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c4')::double precision>-1000 OR (fields->>'c3')::bigint<1000 ) AS tb3 WHERE NOT EXISTS (SELECT fields->>'c2' FROM sctbl3 WHERE fields->>'c2'='abcd') ORDER BY 1 DESC,2 ASC; ---Testcase 119: -SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool != TRUE ) AS tb3 WHERE (fields->>'c3')::bigint NOT IN (345245, 1000, -132, -254) ORDER BY 1 DESC,2 ASC,3 LIMIT 5; ---Testcase 120: -SELECT (fields->>'c1')::bool c1, fields->>'c2' c2, (fields->>'c4')::double precision c4 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY tags->>'t1'; ---Testcase 121: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10), max(tags->>'t1') FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE true GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3 LIMIT 25 OFFSET 8; - --- Select from view ---Testcase 122: -create view view_sctbl3 as select * from sctbl3 where ((fields->>'c1')::bool != false); ---Testcase 123: -SELECT stddev((fields->>'c3')::bigint), tags->>'t1' t1, stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time, tags->>'t1' ORDER BY 1 ASC,2 DESC; ---Testcase 124: -SELECT tags->>'t1' t1 , max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool=false), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE time <= '2000-1-3 20:30:51' GROUP BY fields->>'c2', tags->>'t1' ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25; ---Testcase 125: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c5')::bool HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; ---Testcase 126: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10), max(tags->>'t1') FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; ---Testcase 127: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c1' ORDER BY 1 DESC, 2, 3; ---Testcase 128: -SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50 FROM view_sctbl3 GROUP BY (fields->>'c1')::bool, (fields->>'c3')::bigint HAVING (fields->>'c1')::bool=true AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; ---Testcase 129: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; ---Testcase 130: -SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY fields->>'c1' ORDER BY 1 DESC, 2, 3; ---Testcase 131: -SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM view_sctbl3 WHERE fields->>'c2'<='$' OR (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 20; ---Testcase 132: -SELECT * FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3; ---Testcase 133: -SELECT * FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY (fields->>'c1')::bool ASC LIMIT 5; ---Testcase 134: -SELECT * FROM view_sctbl3 WHERE true ORDER BY (fields->>'c1')::bool DESC,tags->>'t1' LIMIT 5; ---Testcase 135: -SELECT * FROM view_sctbl3 WHERE (fields->>'c3')::bigint NOT IN (-1,1,0,2,-2) ORDER BY tags->>'t1' DESC; - --- Select many target aggregate in one query and combine with (fields->>'c1')::bool ---Testcase 136: -SELECT upper(fields->>'c2'), lower(fields->>'c2'), lower(tags->>'t1') FROM sctbl3 ORDER BY 1 ASC,2 DESC,3; ---Testcase 137: -SELECT max(time), min((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count(*), count(tags->>'t1'), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC,2 ASC,3 DESC,4,5; ---Testcase 138: -SELECT (fields->>'c3')::bigint*(random()<=1)::int, (random()<=1)::int*(25-10)+10 FROM sctbl3 ORDER BY tags->>'t1' ASC,fields->>'c1' DESC; ---Testcase 139: -SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; ---Testcase 140: -SELECT sum((fields->>'c3')::bigint) filter (WHERE (fields->>'c1')::bool = true), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint >0 AND (fields->>'c3')::bigint<100) FROM sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; ---Testcase 141: -SELECT 'abcd', 1234, (fields->>'c3')::bigint/2, 10+(fields->>'c3')::bigint * (random()<=1)::int * 0.5 FROM ( SELECT * FROM sctbl3 WHERE tags->>'t1' LIKE 't1' ) AS sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; ---Testcase 142: -SELECT max((fields->>'c3')::bigint), min(tags->>'t1'), avg((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count((fields->>'c3')::bigint) FROM sctbl3 WHERE time > '1970-01-10 00:00:00' AND time < '2020-01-15 00:00:00' GROUP BY influx_time(time, interval '1d', interval '10h30m') ORDER BY 1,2,3,4,5; ---Testcase 143: -SELECT min(time), max(time), count(time) FROM sctbl3 GROUP BY fields->>'c3' ORDER BY 1,2,3; ---Testcase 144: -SELECT count((fields->>'c3')::bigint), max((fields->>'c3')::bigint), sum((fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3' HAVING(max(fields->>'c2')!='change for new change' and count(fields->>'c2')>0) ORDER BY 1,2,3; ---Testcase 145: -SELECT array_agg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg((fields->>'c3')::bigint/(fields->>'c3')::bigint*(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint+(fields->>'c3')::bigint/(fields->>'c3')::bigint)*-1000), array_agg((fields->>'c3')::bigint*(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)+9999999999999.998) from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint ORDER BY 1, 2, 3, 4, 5; ---Testcase 146: -SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)-0.567-avg((fields->>'c3')::bigint/3+(fields->>'c3')::bigint)+17.55435, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+45))- -9.5+2*avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint/((fields->>'c3')::bigint-10.2)*(fields->>'c3')::bigint)+0.567+avg((fields->>'c3')::bigint)*4.5+(fields->>'c3')::bigint, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+5.6))+100-(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4 limit 5; ---Testcase 147: -SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>0.774 OR fields->>'c2' = 'Which started out as a kind' GROUP BY fields->>'c3' ORDER BY 1, 2, 3; - --- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- --- Update data -\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null -drop view if exists view_sctbl3 ; -drop foreign table if exists sctbl3; - -CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1, t2, t3, t4, t5'); - -create view view_sctbl3 as select * from sctbl3 where ((fields->>'c20')::int != 6789 OR (fields->>'c19')::double precision != -1); - - --- Update data: add 5 tags and 20 fields --- Select all data with condition and combine clause ---Testcase 148: -SELECT * FROM sctbl3 WHERE (fields->>'c6')::double precision != -1 AND (fields->>'c5')::bool != true OR (fields->>'c8')::float > 0 ORDER BY tags->>'t1' DESC,(tags->>'t2')::int ASC, (fields->>'c6')::float DESC, fields->>'c9', (fields->>'c20')::int LIMIT 5 OFFSET 0; ---Testcase 149: -SELECT * FROM sctbl3 WHERE NOT (fields->>'c16')::int<(fields->>'c3')::bigint ORDER BY (fields->>'c7')::float DESC, (fields->>'c8')::double precision ASC,fields->>'c9' DESC,fields->>'c10',(fields->>'c11')::bigint LIMIT 5 OFFSET 0; ---Testcase 150: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE (fields->>'c20')::int > 0 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 151: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE NOT time>'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC,4,5; ---Testcase 152: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE EXISTS (SELECT fields->>'c15' FROM sctbl3 WHERE (fields->>'c19')::double precision!=40.772) ORDER BY 1 DESC,2 ASC,3 DESC,4,5; ---Testcase 153: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; ---Testcase 154: -SELECT tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 from sctbl3 WHERE (fields->>'c13')::int >=0; - --- Select aggregate function and specific column from original table ---Testcase 155: -SELECT max(tags->>'t4'), max(tags->>'t5'), max((fields->>'c3')::bigint), count(*),count((fields->>'c11')::bigint), count((fields->>'c13')::int), count((fields->>'c19')::double precision), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25 OFFSET 0; ---Testcase 156: -SELECT max(fields->>'c2'), min((fields->>'c3')::bigint), max((fields->>'c3')::bigint), max((fields->>'c11')::bigint), max((fields->>'c6')::double precision), max((fields->>'c7')::double precision), max((fields->>'c8')::float), max (20) from sctbl3 GROUP BY fields->>'c3' ORDER BY (fields->>'c3')::bigint; ---Testcase 157: -SELECT sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), sum((fields->>'c6')::double precision), sum((fields->>'c7')::double precision), sum((fields->>'c8')::float), sum((fields->>'c11')::bigint), sum((fields->>'c13')::int), sum((fields->>'c16')::int) FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1; ---Testcase 158: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), stddev((fields->>'c11')::bigint), stddev((fields->>'c13')::int), stddev((fields->>'c14')::bigint), stddev((fields->>'c16')::int), stddev((fields->>'c19')::double precision), stddev((fields->>'c20')::int) FROM sctbl3 GROUP BY fields->>'c5', fields->>'c12' HAVING (fields->>'c12')::bool = true ORDER BY 1 ASC,2 DESC; ---Testcase 159: -SELECT every((fields->>'c3')::bigint>0), every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time, (fields->>'c20')::int, tags->>'t5' ORDER BY (fields->>'c20')::int ASC,tags->>'t5' DESC; ---Testcase 160: -SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, bool_and((fields->>'c12')::bool), bool_and((fields->>'c17')::bool), bool_and((fields->>'c17')::bool) AND TRUE from sctbl3 ORDER BY 1,2,3; ---Testcase 161: -SELECT bool_or((fields->>'c3')::bigint <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, bool_or((fields->>'c17')::bool), bool_or((fields->>'c1')::bool), bool_or((fields->>'c5')::bool) OR FALSE from sctbl3 ORDER BY 1,2,3; - --- Select combine aggregate via operation ---Testcase 162: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5, sum((fields->>'c13')::int + -43.3)-3, sum((fields->>'c16')::int*2) + 1, sum((fields->>'c19')::double precision-7554)+785 FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; ---Testcase 163: -SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time), array_agg((fields->>'c6')::double precision+2), array_agg((fields->>'c7')::double precision/10), array_agg((fields->>'c8')::float-2) FROM sctbl3 GROUP BY (fields->>'c17')::bool, (fields->>'c20')::int, (fields->>'c18')::bool, (fields->>'c19')::double precision HAVING (fields->>'c17')::bool != true ORDER BY (fields->>'c20')::int DESC, (fields->>'c19')::double precision, (fields->>'c18')::bool; ---Testcase 164: -SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15), bit_and((fields->>'c13')::int+768) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c16')::int>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c13', fields->>'c14' HAVING min((fields->>'c13')::int)>'c14')::bigint) ORDER BY (fields->>'c13')::int ASC,(fields->>'c14')::bigint DESC; ---Testcase 165: -SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint), bool_and((fields->>'c19')::double precision <= (fields->>'c20')::int) FROM sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3; ---Testcase 166: -SELECT max(tags->>'t1'), max(tags->>'t2'), max(time), max((fields->>'c3')::bigint*0.5/(fields->>'c11')::bigint), max((fields->>'c3')::bigint+10-(fields->>'c8')::float), max((fields->>'c6')::double precision*2+(fields->>'c13')::int), max((fields->>'c8')::float-32+(fields->>'c16')::int), max((fields->>'c19')::double precision/32) FROM sctbl3 WHERE fields->>'c2' IS NOT NULL GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; ---Testcase 167: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE fields->>'c2' IS NULL GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; ---Testcase 168: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min((fields->>'c19')::double precision + (fields->>'c20')::int/2) FROM sctbl3 WHERE true GROUP BY fields->>'c2', fields->>'c3', fields->>'c3', fields->>'c14' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c14')::bigint) ORDER BY 1 ASC,2 DESC; ---Testcase 169: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min((fields->>'c11')::bigint-(fields->>'c7')::double precision), min((fields->>'c6')::double precision+(fields->>'c8')::float) FROM sctbl3 WHERE false GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; ---Testcase 170: -SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY fields->>'c19', fields->>'c20' HAVING min((fields->>'c19')::double precision)>min((fields->>'c20')::int) ORDER BY 1 ASC,2 DESC; - --- Select from sub query ---Testcase 171: -SELECT time, fields->>'c2' c2, fields->>'c15' c15, tags->>'t1' t1, (tags->>'t3')::double precision t3, tags->>'t5' t5, (fields->>'c12')::bool c12, (fields->>'c14')::bigint c14 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c13')::int>-1000 OR (fields->>'c19')::double precision<1000 ) AS sctbl3; ---Testcase 172: -SELECT max(time), max(7), max((fields->>'c7')::double precision)+17, max((fields->>'c11')::bigint)+10, max((fields->>'c3')::bigint), max((fields->>'c14')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY fields->>'c2'; ---Testcase 173: -SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), stddev((fields->>'c11')::bigint), stddev((fields->>'c14')::bigint), stddev((fields->>'c19')::double precision) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; ---Testcase 174: -SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c11')::bigint)), sqrt(abs((fields->>'c20')::int)) FROM ( SELECT * FROM sctbl3 WHERE tags->>'t5' LIKE '111111' ) AS sctbl3 ORDER BY 1 ASC,2 DESC; ---Testcase 175: -SELECT * FROM ( SELECT tags->>'t1' t1, (tags->>'t2')::int t2, (tags->>'t3')::double precision t3, tags->>'t4' t4, tags->>'t5' t5, fields->>'c2' c2, (fields->>'c3')::bigint c3 FROM sctbl3 WHERE (fields->>'c13')::int>-1000 OR (fields->>'c14')::bigint<1000 ) AS tb3 WHERE c3 <-1 AND c2 > 'KissMe' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; ---Testcase 176: -SELECT * FROM ( SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE c3 IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; ---Testcase 177: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM ( SELECT * FROM sctbl3 WHERE fields->>'c10' LIKE 'a a') AS tb3 WHERE (fields->>'c3')::bigint > 0 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint) < avg((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3; - --- Select from view ---Testcase 179: -SELECT stddev((fields->>'c13')::int), stddev((fields->>'c14')::bigint ORDER BY (fields->>'c14')::bigint) FROM view_sctbl3 GROUP BY time, fields->>'c13', fields->>'c14' ORDER BY (fields->>'c13')::int ASC, (fields->>'c14')::bigint DESC; ---Testcase 180: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; ---Testcase 181: -SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; ---Testcase 182: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3; ---Testcase 183: -SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50, tags->>'t4' t4, (fields->>'c12')::bool c12, (fields->>'c19')::double precision+(fields->>'c20')::int FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, tags->>'t4', (fields->>'c12')::bool, (fields->>'c19')::double precision, (fields->>'c20')::int HAVING sum((fields->>'c13')::int)<100 OR sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c11')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; ---Testcase 184: -SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2), (tags->>'t2')::int t2, (tags->>'t3')::double precision t3 FROM view_sctbl3 GROUP BY tags->>'t2', tags->>'t3', fields->>'c3', fields->>'c3' HAVING min((fields->>'c16')::int)<100 AND max((fields->>'c11')::bigint)<1000 OR sum((fields->>'c7')::double precision)>-7894 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; ---Testcase 185: -SELECT bool_and((fields->>'c11')::bigint>0), bool_and((fields->>'c13')::int<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint), bool_and((fields->>'c7')::double precision>=(fields->>'c8')::float) FROM view_sctbl3 GROUP BY time, tags->>'t1', tags->>'t2',tags->>'t3' ORDER BY tags->>'t1' DESC,(tags->>'t2')::float, (tags->>'t3')::double precision; ---Testcase 186: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5; ---Testcase 187: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5; ---Testcase 188: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; ---Testcase 189: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 DESC; ---Testcase 190: -SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE (fields->>'c3')::bigint NOT IN (-42,65,0,78,-891) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; - --- Select many target aggregate in one query and combine with condition ---Testcase 191: -SELECT count((fields->>'c1')::bool)+count(fields->>'c2')-2*count((fields->>'c3')::bigint), count((fields->>'c3')::bigint)/count((fields->>'c5')::bool)-(fields->>'c3')::bigint, count((fields->>'c11')::bigint-(fields->>'c14')::bigint), 2*count(*) from sctbl3 GROUP BY fields->>'c5', fields->>'c3', fields->>'c1', fields->>'c20', tags->>'t5' order by tags->>'t5', fields->>'c1', (fields->>'c20')::int limit 1; ---Testcase 192: -SELECT every((fields->>'c1')::bool != TRUE) AND true, every((fields->>'c3')::bigint <> 10) OR every((fields->>'c3')::bigint > 5.6), every((fields->>'c3')::bigint <= 2) OR (fields->>'c5')::bool from sctbl3 GROUP BY fields->>'c5' ORDER BY 1,2,3 limit 6; ---Testcase 193: -SELECT stddev((fields->>'c3')::bigint*3-(fields->>'c3')::bigint)*1000000-(fields->>'c3')::bigint, stddev((fields->>'c3')::bigint)-0.567, stddev((fields->>'c3')::bigint/((fields->>'c3')::bigint-1.3))/6, stddev((fields->>'c3')::bigint+4*(fields->>'c3')::bigint)*100, stddev((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint-52.1))+1 from sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY fields->>'c3' ORDER BY 1,2,3,4,5 ; ---Testcase 194: -SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-6, sum((fields->>'c3')::bigint/((fields->>'c3')::bigint+9999999)-(fields->>'c3')::bigint)*9999999999999.998, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/((fields->>'c3')::bigint+111111))*-9.5, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6 from sctbl3; ---Testcase 195: -SELECT sum((fields->>'c14')::bigint+(fields->>'c3')::bigint)-6+sum((fields->>'c11')::bigint), sum((fields->>'c3')::bigint*1.3-(fields->>'c3')::bigint)*9.998-sum((fields->>'c7')::double precision)*4, sum((fields->>'c8')::float-(fields->>'c7')::double precision/4)*-9.5-(fields->>'c3')::bigint, sum((fields->>'c20')::int-(fields->>'c3')::bigint-(fields->>'c16')::int)/17.55435+(fields->>'c3')::bigint, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6-(fields->>'c3')::bigint-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c13', fields->>'c14', fields->>'c16', fields->>'c11', fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4,5; ---Testcase 196: -SELECT max((fields->>'c16')::int), max((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, max((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, max((fields->>'c3')::bigint)+max((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c13')::int>= 0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY (fields->>'c3')::int, (fields->>'c3')::int; ---Testcase 197: -SELECT variance((fields->>'c3')::bigint+(fields->>'c3')::bigint)+(fields->>'c3')::bigint, variance((fields->>'c3')::bigint*3)+(fields->>'c3')::bigint+1, variance((fields->>'c3')::bigint-2)+10 from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, (tags->>'t3')::double precision ORDER BY (tags->>'t3')::double precision; ---Testcase 198: -SELECT sqrt(abs((fields->>'c3')::bigint*5)) + sqrt(abs((fields->>'c3')::bigint+6)), sqrt(abs((fields->>'c3')::bigint)+5)+(fields->>'c3')::bigint, 4*sqrt(abs((fields->>'c3')::bigint-100))-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1, 2, 3; ---Testcase 199: -SELECT max((fields->>'c3')::bigint)+min((fields->>'c3')::bigint)+3, min((fields->>'c3')::bigint)-sqrt(abs((fields->>'c3')::bigint-45.21))+(fields->>'c3')::bigint*2, count(*)-count((fields->>'c5')::bool)+2, (fields->>'c5')::bool c5, (fields->>'c3')::bigint c3 from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, (fields->>'c5')::bool ORDER BY 1,2,3,4; ---Testcase 200: -SELECT variance((fields->>'c3')::bigint)-5*min((fields->>'c3')::bigint)-1, every((fields->>'c5')::bool <> true), max((fields->>'c3')::bigint+4.56)*3-min((fields->>'c3')::bigint), count((fields->>'c3')::bigint)-4 from sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1,2,3,4; ---Testcase 201: -SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3')::bigint)/3-(fields->>'c3')::bigint, min((fields->>'c3')::bigint)+(fields->>'c3')::bigint/4, (fields->>'c5')::bool c5, (fields->>'c20')::int-(fields->>'c19')::double precision-(fields->>'c16')::int from sctbl3 GROUP BY (fields->>'c20')::int, (fields->>'c19')::double precision, (fields->>'c16')::int, (fields->>'c3')::bigint, (fields->>'c3')::bigint, (fields->>'c5')::bool ORDER BY 1,2,3,4,5; - --- Clean -DROP FOREIGN TABLE sctbl3 CASCADE; -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; -DROP SERVER influxdb_svr CASCADE; -DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/schemaless/add_tags.sql b/sql/14.0/schemaless/add_tags.sql deleted file mode 100644 index 1c58358..0000000 --- a/sql/14.0/schemaless/add_tags.sql +++ /dev/null @@ -1,261 +0,0 @@ -SET datestyle=ISO; --- timestamp with time zone differs based on this -SET timezone='UTC'; - -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - --- Init data original -\! influx -import -path=init/tag_original.txt -precision=s > /dev/null --- Before update data --- Testcase 1: -CREATE EXTENSION influxdb_fdw CASCADE; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - ---Testcase 4: -CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); ---Testcase 5: -CREATE FOREIGN TABLE sctbl4 (fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true'); - - ---------------------------------------------------------------------------------------- TC for before update test data ------------------------------------------------------------------------------------------------- ---Testcase 6: -select * from sctbl4; ---Testcase 7: -select time, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::double precision sig3, (fields->>'sig4')::boolean sig4 from sctbl4; ---Testcase 8: -select max(fields->>'sig2'), min(time), bool_or(fields->>'sig2' != 'JAPA') from sctbl4; ---Testcase 9: -select bool_and((fields->>'sig3')::double precision > -10), string_agg('446757svbvskkk', fields->>'sig2'), avg ((fields->>'sig1')::bigint) from sctbl4; ---Testcase 10: -select count(fields->>'sig1'), stddev((fields->>'sig3')::double precision + 333), min(fields->>'sig2') from sctbl4; ---Testcase 11: -select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::bigint), stddev((fields->>'sig3')::double precision) from sctbl4; - - ---------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- --- Update data : add 1 tag -\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null - ---Testcase 12: -DROP FOREIGN TABLE sctbl4; ---Testcase 13: -CREATE FOREIGN TABLE sctbl4 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid'); --- Select all data with aggregate ---Testcase 14: -select avg((fields->>'sig3')::double precision), bool_and(fields->>'sig2' != '%a%'), count(*) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 15: -select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::bigint), avg((fields->>'sig3')::double precision) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 16: -select max(time), avg((fields->>'sig3')::double precision), sum((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 17: -select string_agg(fields->>'sig2', 'ASDFG!@#$%zxc'), count(time), avg((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 18: -select sum((fields->>'sig3')::double precision), stddev((fields->>'sig3')::double precision), min((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY 1, 2, 3; - --- Select aggregate contain expression ---Testcase 19: -select bool_or(((fields->>'sig1')::bigint + (fields->>'sig3')::double precision - 9999) > 0), stddev((fields->>'sig3')::double precision / (fields->>'sig1')::bigint + 3291), stddev((fields->>'sig3')::double precision * 12.3 - (fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 20: -select avg((fields->>'sig3')::double precision * (fields->>'sig1')::bigint / 34241), bool_and(fields->>'sig2' != '%c'), bool_and((fields->>'sig4')::boolean AND true OR true) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 21: -select sum((fields->>'sig3')::double precision * 123.456 + (fields->>'sig1')::bigint), bool_and((fields->>'sig4')::boolean OR false), bool_or((fields->>'sig4')::boolean AND true AND true) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 22: -select min((fields->>'sig3')::double precision / ((fields->>'sig3')::double precision + 223344)), max((fields->>'sig1')::bigint * (fields->>'sig3')::double precision - (fields->>'sig3')::double precision), count(*) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 23: -select every((fields->>'sig4')::boolean OR (fields->>'sig4')::boolean AND true), max (fields->>'sig2' || 'handsome' || 'ugly'), avg((fields->>'sig1')::bigint / (fields->>'sig1')::bigint + 9999.999) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - --- Select combine-aggregate ---Testcase 24: -select avg((fields->>'sig3')::double precision) + sum((fields->>'sig3')::double precision) / avg((fields->>'sig1')::bigint), bool_and(fields->>'sig2' != '%a%') AND bool_and((fields->>'sig4')::boolean AND true) AND true , max((fields->>'sig1')::bigint * (fields->>'sig1')::bigint / 0.0001) + min((fields->>'sig3')::double precision / ((fields->>'sig1')::bigint + 99999)) * sum((fields->>'sig1')::bigint * (fields->>'sig1')::bigint - (fields->>'sig3')::double precision) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 25: -select stddev((fields->>'sig3')::double precision * 0.0001 - (fields->>'sig1')::bigint) + min((fields->>'sig3')::double precision / ((fields->>'sig1')::bigint + 3.344)) * stddev((fields->>'sig1')::bigint * (fields->>'sig1')::bigint - (fields->>'sig3')::double precision), bool_or((fields->>'sig3')::double precision / (fields->>'sig1')::bigint < -10) OR bool_or((fields->>'sig4')::boolean OR true OR false) AND bool_and(fields->>'sig2' != '%c'), string_agg(fields->>'sig2', '恨挫') from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 26: -select max((fields->>'sig1')::bigint) * max((fields->>'sig3')::double precision) + sum((fields->>'sig1')::bigint), stddev((fields->>'sig1')::bigint) * avg((fields->>'sig3')::double precision) / avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) + stddev((fields->>'sig3')::double precision) - count((fields->>'sig4')::boolean) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 27: -select count(fields->>'sig2') * count(fields->>'sig4') / min((fields->>'sig1')::bigint), stddev((fields->>'sig1')::bigint) - count(fields->>'sig2') * sum((fields->>'sig1')::bigint), avg((fields->>'sig3')::double precision) - avg((fields->>'sig1')::bigint) * sum((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - --- Select with WHERE multi-condition ---Testcase 28: -select max(fields->>'sig2'), sum((fields->>'sig3')::double precision), bool_or(fields->>'sig2' != 'viEtnAM') from sctbl4 WHERE (fields->>'sig1')::bigint > 0 AND (fields->>'sig4')::boolean = true OR fields->>'sig2' LIKE '%a%' GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 29: -select bool_and((fields->>'sig3')::double precision >= 1.6789), string_agg('ったのか誰も質問しま', fields->>'sig2'), avg ((fields->>'sig1')::bigint) from sctbl4 WHERE (fields->>'sig3')::double precision = 0 AND fields->>'sig2' IN ('%開発%', '%b%') OR ((fields->>'sig3')::double precision / (fields->>'sig1')::bigint) <= 6.1234 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 30: -select avg((fields->>'sig3')::double precision), count(*), count(fields->>'sig2') from sctbl4 WHERE (fields->>'sig4')::boolean = true OR time = '2020-01-09 01:00:00+00' AND (fields->>'sig3')::double precision != 0 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 31: -select string_agg(fields->>'sig2', fields->>'sig2'), min(time), max(time) from sctbl4 WHERE (fields->>'sig4')::boolean = false OR (fields->>'sig4')::boolean = true AND time < '2000-01-01 23:00:00+00' GROUP BY tags->>'sid' ORDER BY tags->>'sid'; ---Testcase 32: -select count(fields->>'sig4'), every((fields->>'sig3')::double precision < 0), stddev((fields->>'sig3')::double precision) from sctbl4 WHERE (fields->>'sig4')::boolean <> true AND fields->>'sig2' ILIKE 'ターフェー' OR fields->>'sig2' LIKE 'akewo0' GROUP BY tags->>'sid' ORDER BY tags->>'sid'; - --- Select with HAVING LIMIT OFFSET ---Testcase 33: -select sum((fields->>'sig1')::bigint + (fields->>'sig1')::bigint * (fields->>'sig3')::double precision), string_agg(fields->>'sig2', fields->>'sig2'), string_agg(fields->>'sig2' || 'vjbkvba', 'も質問' || (fields->>'sig2')::text) from sctbl4 WHERE fields->>'sig2' LIKE '%a%' OR (fields->>'sig1')::bigint > 0 GROUP BY tags->>'sid',(fields->>'sig3')::double precision HAVING (fields->>'sig3')::double precision > 0 ORDER BY tags->>'sid' LIMIT 5 OFFSET 0; ---Testcase 34: -select string_agg(fields->>'sig2' || (fields->>'sig2')::text, fields->>'sig2' || '!@#$%^&*'), every((fields->>'sig4')::boolean OR true AND false), stddev((fields->>'sig3')::double precision - (fields->>'sig1')::bigint / (fields->>'sig1')::bigint) from sctbl4 WHERE (fields->>'sig3')::double precision <= 999999999 GROUP BY tags->>'sid',fields->>'sig4' HAVING (fields->>'sig4')::boolean <> false ORDER BY tags->>'sid' LIMIT 5 OFFSET 1; ---Testcase 35: -select stddev((fields->>'sig3')::double precision * 0.416754 + (fields->>'sig1')::bigint), min((fields->>'sig3')::double precision / ((fields->>'sig1')::bigint + 3.344)), stddev((fields->>'sig1')::bigint * (fields->>'sig1')::bigint - (fields->>'sig3')::double precision) from sctbl4 WHERE (fields->>'sig1')::bigint >= -1555.555 GROUP BY tags->>'sid',fields->>'sig4' HAVING (fields->>'sig4')::boolean <> true ORDER BY tags->>'sid' LIMIT 5 OFFSET 1; ---Testcase 36: -select bool_or((fields->>'sig3')::double precision / (fields->>'sig1')::bigint >= 15.5678), max ((fields->>'sig3')::double precision / (fields->>'sig1')::bigint * (fields->>'sig1')::bigint), every(((fields->>'sig3')::double precision - (fields->>'sig1')::bigint) < 0) from sctbl4 WHERE (fields->>'sig4')::boolean <> false GROUP BY tags->>'sid',fields->>'sig4' HAVING (fields->>'sig4')::boolean = true ORDER BY tags->>'sid' LIMIT 5 OFFSET 2; ---Testcase 37: -select max (fields->>'sig2' || 'kethattinh' || 'hanoilanhqua'), sum ((fields->>'sig3')::double precision - (fields->>'sig3')::double precision - (fields->>'sig1')::bigint), avg((fields->>'sig1')::bigint + (fields->>'sig1')::bigint + (fields->>'sig3')::double precision) from sctbl4 WHERE (fields->>'sig1')::bigint <= 10000000 GROUP BY tags->>'sid',fields->>'sig2',fields->>'sig4' HAVING fields->>'sig2' IN ('%c%', '%1%') OR fields->>'sig2' LIKE '%a%' ORDER BY tags->>'sid' LIMIT 5 OFFSET 2; - --- Select with subquery ---Testcase 38: -select time, tags->>'sname' sname, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::double precision sig3, (fields->>'sig4')::boolean sig4 from (select * from sctbl9 ORDER BY tags->>'sid') AS sctbl9; ---Testcase 39: -select time, max(sig1), avg(sig3) from (select time, tags->>'sname' sname, ((fields->>'sig1')::bigint) sig1, fields->>'sig2' sig2, ((fields->>'sig3')::double precision) sig3, (fields->>'sig4')::boolean sig4 from sctbl9 GROUP BY time,tags->>'sname',fields->>'sig1',fields->>'sig2',fields->>'sig3',fields->>'sig4' ORDER BY 1,2,3,4,5,6) AS sctbl9 GROUP BY time; ---Testcase 40: -select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (select time, tags->>'sid' sid, tags->>'sname' sname, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::double precision sig3, (fields->>'sig4')::boolean sig4 from sctbl9 ORDER BY tags->>'sid') AS sctbl9; - - ---------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- --- Update data : add 1 tag -\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null ---Testcase 41: -DROP FOREIGN TABLE sctbl4; ---Testcase 42: -CREATE FOREIGN TABLE sctbl4 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sid1, sid2, sid3, sid4, sid5, sid6, sid7, sid8, sid9, sid10, sid11, sid12, sid13, sid14, sid15, sid16, sid17, sid18, sid19, sid20'); ---Testcase 43: -select * from sctbl4; ---Testcase 44: -select (fields->>'sig1')::bigint sig1, tags->>'sid1' sid1, (tags->>'sid2')::bigint sid2, (tags->>'sid3')::bigint sid3, tags->>'sid4' sid4, (tags->>'sid5')::boolean sid5, (tags->>'sid6')::boolean sid6, tags->>'sid7' sid7, tags->>'sid8' sid8, tags->>'sid9' sid9, tags->>'sid10' sid10, tags->>'sid11' sid11, (tags->>'sid12')::bigint sid12, (tags->>'sid13')::double precision sid13, tags->>'sid14' sid14, (tags->>'sid15')::boolean sid15, tags->>'sid16' sid16, tags->>'sid17' sid17, tags->>'sid18' sid18, tags->>'sid19' sid19, (tags->>'sid20')::bigint sid20 from sctbl4; - --- Select all data with aggregate ---Testcase 45: -select max(time), count(tags->>'sid1'), sum((tags->>'sid2')::bigint) from sctbl4 GROUP BY time,tags->>'sid1',(tags->>'sid2')::bigint,(fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; ---Testcase 46: -select string_agg(tags->>'sid19', tags->>'sid17'), avg((tags->>'sid3')::bigint), stddev((tags->>'sid13')::double precision) from sctbl4 GROUP BY tags->>'sid17',tags->>'sid19',(tags->>'sid3')::bigint,(tags->>'sid13')::double precision,(fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; ---Testcase 47: -select sum((tags->>'sid3')::bigint), sum((tags->>'sid20')::bigint), bool_and((tags->>'sid5')::boolean != (tags->>'sid6')::boolean) from sctbl4 GROUP BY fields->>'sig2' ORDER BY fields->>'sig2'; ---Testcase 48: -select stddev((tags->>'sid20')::bigint), avg((tags->>'sid2')::bigint order by (tags->>'sid2')::bigint), min(tags->>'sid10') from sctbl4 GROUP BY fields->>'sig3' ORDER BY (fields->>'sig3')::double precision; ---Testcase 49: -select every((tags->>'sid11')::boolean = (tags->>'sid15')::boolean), bool_or((tags->>'sid6')::boolean != (tags->>'sid11')::boolean), count(time) from sctbl4 GROUP BY fields->>'sig2' ORDER BY fields->>'sig2'; ---Testcase 50: -select count(*), sum((tags->>'sid3')::bigint), string_agg(tags->>'sid9', tags->>'sid17') from sctbl4 GROUP BY fields->>'sig3' ORDER BY (fields->>'sig3')::double precision; ---Testcase 51: -select count(tags->>'sid1'), bool_and(tags->>'sid4' != '%c%'), max(tags->>'sid8') from sctbl4 GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; ---Testcase 52: -select bool_and((tags->>'sid6')::boolean != false), min((tags->>'sid13')::double precision), avg((tags->>'sid20')::bigint) from sctbl4 GROUP BY fields->>'sig4' ORDER BY fields->>'sig4'; ---Testcase 53: -select stddev((tags->>'sid13')::double precision), sum((tags->>'sid12')::bigint), string_agg(tags->>'sid7', tags->>'sid17') from sctbl4 GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; ---Testcase 54: -select stddev((tags->>'sid3')::bigint), min(tags->>'sid10'), max(tags->>'sid4') from sctbl4 GROUP BY (fields->>'sig4')::boolean ORDER BY (fields->>'sig4')::boolean; ---Testcase 55: -select string_agg(tags->>'sid19', tags->>'sid4'), string_agg(tags->>'sid9', tags->>'sid1'), max(time) from sctbl4 GROUP BY fields->>'sig3' ORDER BY (fields->>'sig3')::double precision; ---Testcase 56: -select avg((tags->>'sid3')::bigint), count(*), every((tags->>'sid15')::boolean != (tags->>'sid5')::boolean) from sctbl4 GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; ---Testcase 57: -select every((tags->>'sid6')::boolean = (tags->>'sid11')::boolean), string_agg(tags->>'sid14', tags->>'sid16'), string_agg(tags->>'sid18', tags->>'sid19') from sctbl4 GROUP BY fields->>'sig4' ORDER BY fields->>'sig4'; ---Testcase 58: -select stddev((tags->>'sid12')::double precision), stddev((tags->>'sid13')::double precision), sum((tags->>'sid13')::double precision) from sctbl4 GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; - --- Select aggregate contain expression ---Testcase 59: -select max((tags->>'sid2')::bigint / (tags->>'sid3')::bigint + (fields->>'sig3')::double precision), avg((tags->>'sid20')::bigint - (fields->>'sig3')::double precision * (tags->>'sid3')::bigint), sum((tags->>'sid2')::bigint + (fields->>'sig3')::double precision / (tags->>'sid3')::bigint) from sctbl4 GROUP BY tags->>'sid20' ORDER BY (tags->>'sid20')::bigint; ---Testcase 60: -select string_agg(tags->>'sid19' || (fields->>'sig2')::text, tags->>'sid17' || (tags->>'sid1')::text), avg((tags->>'sid3')::bigint * (tags->>'sid2')::bigint - (tags->>'sid12')::bigint), stddev((tags->>'sid13')::double precision / (tags->>'sid3')::bigint + (tags->>'sid12')::bigint) from sctbl4 GROUP BY tags->>'sid19' ORDER BY tags->>'sid19'; ---Testcase 61: -select sum((tags->>'sid3')::bigint - (tags->>'sid2')::bigint - (fields->>'sig1')::bigint), sum((tags->>'sid20')::bigint - (tags->>'sid13')::double precision + (tags->>'sid2')::bigint), bool_and((tags->>'sid5')::boolean AND (tags->>'sid6')::boolean OR (fields->>'sig4')::boolean) from sctbl4 GROUP BY tags->>'sid18' ORDER BY tags->>'sid18'; ---Testcase 62: -select stddev((tags->>'sid12')::bigint * (tags->>'sid20')::bigint / (tags->>'sid2')::bigint), avg((tags->>'sid2')::bigint + (tags->>'sid3')::bigint / (tags->>'sid12')::bigint), min(tags->>'sid10' || 'BkbKJBT45%^&') from sctbl4 GROUP BY tags->>'sid16' ORDER BY tags->>'sid16'; ---Testcase 63: -select every((tags->>'sid6')::boolean = (tags->>'sid15')::boolean), bool_or(tags->>'sid4' LIKE 'Hello'), sum((fields->>'sig1')::bigint * (fields->>'sig3')::double precision - (tags->>'sid20')::bigint) from sctbl4 GROUP BY tags->>'sid15' ORDER BY tags->>'sid15'; ---Testcase 64: -select every((tags->>'sid5')::boolean <> (tags->>'sid6')::boolean), sum((tags->>'sid2')::bigint / (fields->>'sig1')::bigint * (fields->>'sig3')::double precision), string_agg(tags->>'sid9' || (tags->>'sid18')::text, tags->>'sid17' || (tags->>'sid16')::text) from sctbl4 GROUP BY tags->>'sid14' ORDER BY tags->>'sid14'; ---Testcase 65: -select min((fields->>'sig1')::bigint * (tags->>'sid20')::bigint - (tags->>'sid13')::double precision), bool_and(tags->>'sid4' != '%c%' AND tags->>'sid4' != '%a%'), max((tags->>'sid3')::bigint - (fields->>'sig3')::double precision + (tags->>'sid12')::double precision) from sctbl4 GROUP BY tags->>'sid13' ORDER BY (tags->>'sid13')::double precision; ---Testcase 66: -select bool_and((tags->>'sid6')::boolean != false OR (tags->>'sid11')::boolean = true), min((tags->>'sid13')::double precision / (fields->>'sig3')::double precision - (tags->>'sid12')::bigint), avg((tags->>'sid20')::bigint / (tags->>'sid12')::bigint + (tags->>'sid3')::bigint) from sctbl4 GROUP BY tags->>'sid12' ORDER BY (tags->>'sid12')::bigint; ---Testcase 67: -select stddev((tags->>'sid13')::double precision + (fields->>'sig1')::bigint * (tags->>'sid2')::bigint), sum((tags->>'sid12')::bigint + (tags->>'sid20')::bigint - (tags->>'sid3')::bigint), string_agg(tags->>'sid7' || '豚は誰も好', 'なぜ18歳で' || (tags->>'sid17')::text) from sctbl4 GROUP BY tags->>'sid8' ORDER BY tags->>'sid8'; ---Testcase 68: -select stddev((tags->>'sid3')::bigint * (tags->>'sid2')::bigint - (tags->>'sid20')::bigint), min(tags->>'sid10' || '12345#$%&7' || (tags->>'sid19')::text), every(tags->>'sid4' IN ('japan', 'vietnam')) from sctbl4 GROUP BY tags->>'sid9' ORDER BY tags->>'sid9'; - --- Select combine-aggregate ---Testcase 69: -select stddev((tags->>'sid3')::bigint) + count(tags->>'sid10') + count(tags->>'sid4'), count(time) + count(tags->>'sid1') - sum((tags->>'sid2')::bigint), avg((tags->>'sid3')::bigint) * count(*) + count(tags->>'sid17') from sctbl4 GROUP BY fields->>'sig2' ORDER BY fields->>'sig2'; ---Testcase 70: -select stddev((tags->>'sid13')::double precision) * avg((fields->>'sig1')::bigint) / avg((fields->>'sig3')::double precision), sum((tags->>'sid2')::bigint) / count(tags->>'sid10') + sum((fields->>'sig1')::bigint), stddev((fields->>'sig3')::double precision) / stddev((tags->>'sid12')::double precision) - min((tags->>'sid12')::double precision) from sctbl4 GROUP BY tags->>'sid2' ORDER BY (tags->>'sid2')::bigint; ---Testcase 71: -select string_agg(tags->>'sid7' || (tags->>'sid10')::text || (tags->>'sid4')::text, tags->>'sid7' || 'JBkbg7t96' || (tags->>'sid18')::text), avg((tags->>'sid2')::bigint) - stddev((fields->>'sig3')::double precision) + avg((tags->>'sid12')::bigint), bool_and(tags->>'sid19' LIKE '%な%') OR bool_and((tags->>'sid5')::boolean = true) AND bool_or((tags->>'sid6')::boolean) from sctbl4 GROUP BY tags->>'sid3' ORDER BY (tags->>'sid3')::bigint; ---Testcase 72: -select avg((tags->>'sid3')::bigint) + count(*) - sum((tags->>'sid20')::bigint), every((tags->>'sid15')::boolean != (tags->>'sid5')::boolean) OR bool_and((tags->>'sid15')::boolean) AND bool_or((tags->>'sid6')::boolean), string_agg(tags->>'sid14' || (tags->>'sid16')::text || (tags->>'sid18')::text, tags->>'sid17' || '&^&*$^&*^*' || (tags->>'sid19')::text) from sctbl4 GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; ---Testcase 73: -select bool_and((tags->>'sid11')::boolean) AND bool_or((tags->>'sid11')::boolean) OR true, count(time) + count(tags->>'sid1') - sum((tags->>'sid3')::bigint), count(tags->>'sid1') + count(tags->>'sid10') - avg((tags->>'sid3')::bigint) from sctbl4 GROUP BY fields->>'sig4' ORDER BY fields->>'sig4'; ---Testcase 74: -select bool_or(tags->>'sid16' = 'id1') OR false AND every((tags->>'sid15')::boolean), string_agg(tags->>'sid14' || (tags->>'sid8')::text || (tags->>'sid4')::text, (tags->>'sid14')::text), avg((tags->>'sid2')::bigint) + avg((tags->>'sid3')::bigint) - avg((tags->>'sid12')::bigint) from sctbl4 GROUP BY fields->>'sig4' ORDER BY fields->>'sig4'; ---Testcase 75: -select bool_and(time > '1900-09-09 23:59:00+00') AND bool_and((fields->>'sig4')::boolean) AND every((fields->>'sig4')::boolean), stddev((tags->>'sid20')::bigint) / stddev((fields->>'sig1')::bigint) / sum((tags->>'sid13')::double precision), stddev((tags->>'sid13')::double precision) / sum((tags->>'sid13')::double precision) * count(*) from sctbl4 GROUP BY tags->>'sid7' ORDER BY tags->>'sid7'; ---Testcase 76: -select sum((tags->>'sid2')::bigint) + count(tags->>'sid1') - count(tags->>'sid8'), count((fields->>'sig3')::double precision) - count(tags->>'sid9') + count(tags->>'sid17'), string_agg(tags->>'sid19' || 'hf675578ytgu', tags->>'sid17' || (tags->>'sid14')::text) from sctbl4 GROUP BY tags->>'sid8' ORDER BY tags->>'sid8'; ---Testcase 77: -select sum((tags->>'sid3')::bigint) - avg((tags->>'sid12')::bigint) * count(tags->>'sid9'), bool_and((tags->>'sid11')::boolean) AND bool_and((tags->>'sid20')::bigint >= -16735467) OR every(tags->>'sid16' != 'id3'), sum((tags->>'sid20')::bigint) + avg((tags->>'sid12')::bigint) / count(tags->>'sid19') from sctbl4 GROUP BY fields->>'sig2' ORDER BY fields->>'sig2'; ---Testcase 78: -select string_agg(tags->>'sid19' || (tags->>'sid17')::text || (tags->>'sid10')::text, tags->>'sid9' || (tags->>'sid8')::text || (tags->>'sid7')::text), avg((tags->>'sid20')::bigint) / avg((tags->>'sid2')::bigint) + stddev((tags->>'sid12')::bigint), count(tags->>'sid1') - count(tags->>'sid14') + count((fields->>'sig3')::double precision) from sctbl4 GROUP BY tags->>'sid10' ORDER BY tags->>'sid10'; - --- Select with WHERE multi-condition ---Testcase 79: -select avg((fields->>'sig3')::double precision + (tags->>'sid3')::bigint / (tags->>'sid12')::bigint), count(time) + count(tags->>'sid1') - sum((tags->>'sid2')::bigint), every((tags->>'sid11')::boolean = (tags->>'sid15')::boolean) from sctbl4 WHERE tags->>'sid9' LIKE '%挫败%' OR (tags->>'sid5')::boolean <> true OR tags->>'sid16' ILIKE 'id4' AND (tags->>'sid20')::bigint < 0 GROUP BY tags->>'sid11' ORDER BY tags->>'sid11'; ---Testcase 80: -select avg((tags->>'sid2')::bigint), count(*), every((tags->>'sid11')::boolean != (tags->>'sid5')::boolean) from sctbl4 WHERE (tags->>'sid20')::bigint > 100000 AND (tags->>'sid6')::boolean != true OR tags->>'sid16' LIKE '2i3uth78wgbg' AND tags->>'sid1' ILIKE 'bMBOphOey0kXMun' GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; ---Testcase 81: -select every((tags->>'sid6')::boolean <> (tags->>'sid11')::boolean), string_agg(tags->>'sid1', tags->>'sid16'), string_agg(tags->>'sid18', tags->>'sid7') from sctbl4 WHERE (tags->>'sid13')::double precision > 0.985689524 OR tags->>'sid8' LIKE '%^%' OR (tags->>'sid15')::boolean = true OR tags->>'sid4' IN ('%1%', '516541') GROUP BY fields->>'sig1',fields->>'sig3' ORDER BY (fields->>'sig3')::double precision; ---Testcase 82: -select string_agg(tags->>'sid16', tags->>'sid17'), avg((tags->>'sid13')::double precision), stddev((tags->>'sid12')::bigint) from sctbl4 WHERE (tags->>'sid6')::boolean <> false AND tags->>'sid19' LIKE 'ターフェー' AND tags->>'sid17' LIKE 'akewo0' AND tags->>'sid10' IN ('%2%', '%vợ%') GROUP BY tags->>'sid14',fields->>'sig2',fields->>'sig3' ORDER BY tags->>'sid14',fields->>'sig2',(fields->>'sig3')::double precision; ---Testcase 83: -select stddev((tags->>'sid13')::double precision + (fields->>'sig1')::bigint * (tags->>'sid2')::bigint), bool_or(tags->>'sid4' LIKE 'xinchao'), sum((fields->>'sig1')::bigint * (fields->>'sig3')::double precision - (tags->>'sid20')::bigint) from sctbl4 WHERE tags->>'sid4' IN ('%japnam', 'vietpan%') OR (tags->>'sid11')::boolean = true OR (tags->>'sid13')::double precision < 99999999999.99 OR (fields->>'sig3')::double precision > 0 GROUP BY (fields->>'sig1')::bigint,(fields->>'sig3')::double precision ORDER BY (fields->>'sig1')::bigint; - --- Select with HAVING LIMIT OFFSET ---Testcase 84: -select stddev((tags->>'sid2')::bigint * 0.9804754 + (tags->>'sid3')::bigint), min((tags->>'sid13')::double precision / ((fields->>'sig1')::bigint + 3.144)), stddev((tags->>'sid20')::bigint * (tags->>'sid2')::bigint - (tags->>'sid13')::double precision) from sctbl4 WHERE (fields->>'sig3')::double precision >= -999995.955 GROUP BY (fields->>'sig1')::bigint,(fields->>'sig3')::double precision HAVING (fields->>'sig3')::double precision > 0 ORDER BY (fields->>'sig1')::bigint LIMIT 10 OFFSET 10; ---Testcase 85: -select sum((fields->>'sig3')::double precision + (tags->>'sid3')::bigint * (tags->>'sid12')::bigint), string_agg(tags->>'sid7', tags->>'sid8'), string_agg(fields->>'sig2' || '568hvsvbka', 'も9質18問' || (tags->>'sid9')::text) from sctbl4 WHERE (fields->>'sig3')::double precision >= 0.3871647691 GROUP BY (fields->>'sig1')::bigint,(fields->>'sig3')::double precision,tags->>'sid15' HAVING (fields->>'sig3')::double precision <> 0 ORDER BY tags->>'sid15' LIMIT 10 OFFSET 0; ---Testcase 86: -select max (tags->>'sid10' || 'codonlangthang' || 'hoanghonhanoi'), sum ((tags->>'sid13')::double precision - (tags->>'sid12')::bigint - (tags->>'sid20')::bigint), avg((tags->>'sid2')::bigint + (tags->>'sid3')::bigint + (tags->>'sid12')::bigint) from sctbl4 WHERE (fields->>'sig1')::bigint <= 87986847478 GROUP BY (fields->>'sig1')::bigint,tags->>'sid10' HAVING tags->>'sid10' NOT IN ('%1 vợ%', '%1 chồng%') ORDER BY (fields->>'sig1')::bigint LIMIT 10 OFFSET 2; ---Testcase 87: -select stddev((tags->>'sid13')::double precision) * avg((tags->>'sid3')::bigint) / avg((tags->>'sid13')::double precision), sum((tags->>'sid2')::bigint) + max((fields->>'sig1')::bigint) + sum((tags->>'sid3')::bigint), stddev((tags->>'sid2')::bigint) / stddev((tags->>'sid12')::bigint) - min((tags->>'sid20')::bigint) from sctbl4 WHERE fields->>'sig2' NOT IN ('%c%', '%^%') GROUP BY tags->>'sid19' HAVING tags->>'sid19' != '%v' ORDER BY tags->>'sid19' LIMIT 10 OFFSET 0; ---Testcase 88: -select bool_or((tags->>'sid2')::bigint / (tags->>'sid13')::double precision >= 15.5678), max ((tags->>'sid3')::bigint / (tags->>'sid20')::bigint * (tags->>'sid12')::bigint), every(((tags->>'sid13')::double precision - (tags->>'sid2')::bigint) < 0) from sctbl4 WHERE (fields->>'sig1')::bigint != 0 GROUP BY (fields->>'sig1')::bigint,(fields->>'sig3')::double precision,tags->>'sid20' HAVING (fields->>'sig3')::double precision != 0 ORDER BY (tags->>'sid20')::bigint LIMIT 10 OFFSET 5; - --- Select JOIN ---Testcase 89: -select * from sctbl4 JOIN sctbl9 ON sctbl4.tags->>'sid14' = sctbl9.tags->>'sid' LIMIT 30 OFFSET 15; ---Testcase 90: -select sctbl4.time, (sctbl4.fields->>'sig1')::bigint sig1, sctbl9.fields->>'sig2' sig2, (sctbl4.fields->>'sig3')::double precision sig3, (sctbl9.fields->>'sig4')::boolean sig4 from sctbl4 JOIN sctbl9 ON sctbl4.tags->>'sid' = sctbl9.tags->>'sid' ORDER BY sctbl4.time LIMIT 30 OFFSET 5; ---Testcase 91: -select sctbl9.time, (sctbl9.fields->>'sig1')::bigint sig1, sctbl9.fields->>'sig2' sig2, (sctbl4.fields->>'sig3')::double precision sig3, (sctbl9.fields->>'sig4')::boolean sig4, (sctbl4.tags->>'sid3')::bigint sid3, sctbl4.tags->>'sid' sid, (sctbl4.tags->>'sid3')::bigint sid3, sctbl4.tags->>'sid7' sid7 from sctbl4 JOIN sctbl9 ON sctbl4.tags->>'sid' = sctbl9.tags->>'sid' WHERE (sctbl4.fields->>'sig1')::bigint > (sctbl9.fields->>'sig1')::bigint AND sctbl4.fields->>'sig2' != NULL LIMIT 30 OFFSET 5; ---Testcase 92: -select sctbl4.time, (sctbl9.fields->>'sig1')::bigint sig1, sctbl9.fields->>'sig2' sig2, (sctbl9.fields->>'sig3')::double precision sig3, (sctbl4.fields->>'sig4')::boolean sig4, (sctbl4.tags->>'sid13')::double precision sid13, sctbl4.tags->>'sid' sid, (sctbl4.tags->>'sid5')::boolean sid5, sctbl4.tags->>'sid16' sid16 from sctbl4 JOIN sctbl9 ON (sctbl4.fields->>'sig1')::bigint / (sctbl4.fields->>'sig3')::double precision < (sctbl9.fields->>'sig1')::bigint LIMIT 15 OFFSET 0; ---Testcase 93: -select sctbl4.time, (sctbl4.fields->>'sig1')::bigint sig1, sctbl9.fields->>'sig2' sig2, (sctbl4.fields->>'sig3')::double precision sig3, (sctbl4.fields->>'sig4')::boolean sig4, sctbl4.tags->>'sid19' sid19 from sctbl4 JOIN sctbl9 ON (sctbl4.tags->>'sid3')::bigint BETWEEN -10000 AND 9999999 OR sctbl9.fields->>'sig2' ILIKE '%a%' ORDER BY sctbl4.time, sig1, sig2, sig3, sig4, sid19 LIMIT 10 OFFSET 0; ---Testcase 94: -select sctbl4.time, (sctbl4.tags->>'sid15')::boolean sid15, (sctbl9.fields->>'sig4')::boolean sig4, sctbl4.fields->>'sig2' sig2, sctbl4.tags->>'sid8' sid8 from sctbl4 LEFT OUTER JOIN sctbl9 ON ((sctbl4.fields->>'sig3')::double precision = (sctbl9.fields->>'sig1')::bigint/25000 OR (sctbl4.fields->>'sig4')::boolean = (sctbl9.fields->>'sig4')::boolean) GROUP BY (sctbl4.fields->>'sig1')::bigint,sctbl4.time,(sctbl4.tags->>'sid15')::boolean,(sctbl9.fields->>'sig4')::boolean,sctbl4.fields->>'sig2',sctbl4.tags->>'sid8' HAVING (sctbl4.fields->>'sig1')::bigint > 0 LIMIT 10 OFFSET 2; ---Testcase 95: -select (sctbl9.fields->>'sig4')::boolean sig4, (sctbl4.tags->>'sid5')::boolean sid5, (sctbl4.tags->>'sid6')::boolean sid6, sctbl4.tags->>'sid7' sid7, sctbl4.tags->>'sid8' sid8, sctbl4.tags->>'sid9' sid9 from sctbl4 LEFT OUTER JOIN sctbl9 ON ((sctbl4.fields->>'sig1')::bigint = (sctbl9.fields->>'sig1')::bigint OR (sctbl4.fields->>'sig3')::double precision> (sctbl9.fields->>'sig3')::double precision) GROUP BY (sctbl4.fields->>'sig1')::bigint,(sctbl9.fields->>'sig3')::double precision,(sctbl9.fields->>'sig4')::boolean,(sctbl4.tags->>'sid5')::boolean,(sctbl4.tags->>'sid6')::boolean,sctbl4.tags->>'sid7',sctbl4.tags->>'sid8',sctbl4.tags->>'sid9' HAVING (sctbl4.fields->>'sig1')::bigint > sum((sctbl9.fields->>'sig3')::double precision) ORDER BY sid7, sid8, sid9 LIMIT 20 OFFSET 0; ---Testcase 96: -select (sctbl9.fields->>'sig4')::boolean sig4, sctbl9.fields->>'sig2' sig2, (sctbl4.tags->>'sid3')::bigint sid3, (sctbl4.tags->>'sid5')::boolean sid5, sctbl4.tags->>'sid7' sid7, sctbl4.tags->>'sid9' sid9, sctbl4.tags->>'sid16' sid16 from sctbl4 LEFT OUTER JOIN sctbl9 ON ((sctbl4.fields->>'sig3')::double precision > (sctbl9.fields->>'sig3')::double precision AND sctbl9.tags->>'sname' LIKE 'rapviet') GROUP BY (sctbl9.fields->>'sig4')::boolean,sctbl9.fields->>'sig2',(sctbl4.tags->>'sid3')::bigint,(sctbl4.tags->>'sid5')::boolean,sctbl4.tags->>'sid7',sctbl4.tags->>'sid9',sctbl4.tags->>'sid16',(sctbl4.fields->>'sig1')::bigint,sctbl9.tags->>'sname' ORDER BY (sctbl4.fields->>'sig1')::bigint DESC, sctbl9.tags->>'sname' LIMIT 10 OFFSET 8; ---Testcase 97: -select (sctbl4.tags->>'sid3')::bigint sid3, (sctbl4.tags->>'sid5')::boolean sid5, sctbl4.tags->>'sid7' sid7, sctbl4.tags->>'sid9' sid9, sctbl4.tags->>'sid16' sid16 from sctbl4 RIGHT OUTER JOIN sctbl9 ON (sctbl4.fields->>'sig4')::boolean = (sctbl9.fields->>'sig4')::boolean LIMIT 17 OFFSET 2; ---Testcase 98: -select sctbl4.tags->>'sid4' sid4, sctbl9.tags->>'sname' sname, sctbl4.tags->>'sid8' sid8, (sctbl4.tags->>'sid12')::bigint sid12, sctbl4.tags->>'sid14' sid14, (sctbl4.tags->>'sid20')::bigint sid20 from sctbl4 RIGHT OUTER JOIN sctbl9 ON ((sctbl4.fields->>'sig1')::bigint = (sctbl9.fields->>'sig3')::double precision OR (sctbl4.fields->>'sig3')::double precision > (sctbl9.fields->>'sig3')::double precision) GROUP BY (sctbl4.fields->>'sig1')::bigint,(sctbl9.fields->>'sig3')::double precision,sctbl4.tags->>'sid4',sctbl9.tags->>'sname',sctbl4.tags->>'sid8',(sctbl4.tags->>'sid12')::bigint,sctbl4.tags->>'sid14',(sctbl4.tags->>'sid20')::bigint HAVING (sctbl4.fields->>'sig1')::bigint < avg((sctbl9.fields->>'sig3')::double precision) ORDER BY sid12, sid20 LIMIT 9 OFFSET 1; ---Testcase 99: -select (sctbl4.tags->>'sid3')::bigint sid3, (sctbl4.tags->>'sid5')::boolean sid5, sctbl4.tags->>'sid7' sid7, sctbl4.tags->>'sid' sid, sctbl9.tags->>'sid' sid from sctbl4 FULL OUTER JOIN sctbl9 ON (sctbl4.fields->>'sig1')::bigint = (sctbl9.fields->>'sig1')::bigint GROUP BY (sctbl4.tags->>'sid3')::bigint,(sctbl4.tags->>'sid5')::boolean,sctbl4.tags->>'sid7',sctbl4.tags->>'sid',sctbl9.tags->>'sid'; ---Testcase 100: -select sctbl4.tags->>'sid' sid, sctbl9.tags->>'sid' sid, (sctbl4.tags->>'sid3')::bigint sid3, sctbl4.tags->>'sid16' sid16, sctbl4.tags->>'sid18' sid18, (sctbl4.fields->>'sig4')::boolean sig4 from sctbl4 FULL OUTER JOIN sctbl9 ON (sctbl4.fields->>'sig3')::double precision < (sctbl9.fields->>'sig3')::double precision WHERE (sctbl4.fields->>'sig1')::bigint > 0 AND (sctbl9.fields->>'sig3')::double precision != 1 AND sctbl9.tags->>'sname' LIKE 'kingofrap' OR (sctbl9.fields->>'sig1')::bigint = -9999 GROUP BY sctbl4.tags->>'sid',sctbl9.tags->>'sid',sctbl4.tags->>'sid3',sctbl4.tags->>'sid16',sctbl4.tags->>'sid18',sctbl4.fields->>'sig4'; ---Testcase 101: -select * from sctbl4 CROSS JOIN sctbl9 ORDER BY sctbl4.tags->>'sid1',(sctbl4.tags->>'sid2')::bigint,(sctbl4.tags->>'sid3')::bigint,sctbl4.tags->>'sid4',sctbl4.tags->>'sid5',sctbl4.tags->>'sid6',sctbl4.tags->>'sid7',sctbl4.tags->>'sid8',sctbl4.tags->>'sid9',sctbl4.tags->>'sid10',(sctbl9.fields->>'sig1')::bigint,sctbl9.fields->>'sig2',(sctbl9.fields->>'sig3')::double precision,sctbl9.fields->>'sig4' LIMIT 10 OFFSET 0; ---Testcase 102: -select sctbl4.tags->>'sid8' sid8, sctbl4.tags->>'sid9' sid9, (sctbl9.fields->>'sig1')::bigint sig1 from sctbl4 CROSS JOIN sctbl9 GROUP BY sctbl4.tags->>'sid8',sctbl4.tags->>'sid9',sctbl9.fields->>'sig1',sctbl4.fields->>'sig3',sctbl9.fields->>'sig1' HAVING (sctbl4.fields->>'sig3')::double precision >= sum((sctbl9.fields->>'sig1')::bigint) ORDER BY (sctbl9.fields->>'sig1')::bigint,(sctbl4.fields->>'sig3')::double precision LIMIT 10 OFFSET 0; - --- Clean ---Testcase 103: -DROP FOREIGN TABLE sctbl4; -DROP FOREIGN TABLE sctbl9; -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; -DROP SERVER influxdb_svr CASCADE; -DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/schemaless/aggregate.sql b/sql/14.0/schemaless/aggregate.sql deleted file mode 100644 index 812a2a1..0000000 --- a/sql/14.0/schemaless/aggregate.sql +++ /dev/null @@ -1,308 +0,0 @@ - ---SET log_min_messages=debug1; ---SET client_min_messages=debug1; ---Testcase 1: -SET datestyle=ISO; --- timestamp with time zone differs based on this ---Testcase 2: -SET timezone='UTC'; - -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - --- import time column as timestamp and text type -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); - ---ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); ---ALTER SERVER server1 OPTIONS (ADD extensions 'influxdb_fdw'); - ---Testcase 6: -SELECT * FROM t4; - ---Testcase 7: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint),influx_time(time,interval '1s', interval '0.00001s'),tags->>'tag1' tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tags->>'tag1'; ---Testcase 8: -SELECT sum((fields->>'value1')::bigint),influx_time(time,interval '1s', interval '0.00001s'),tags->>'tag1' tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tags->>'tag1'; - ---Testcase 9: -EXPLAIN (verbose) -SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint),tags->>'tag2' tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY tags->>'tag2', tags->>'tag1'; ---Testcase 10: -SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint),tags->>'tag2' tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY tags->>'tag2', tags->>'tag1'; - ---Testcase 11: -SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint), count((fields->>'value1')::bigint), tags->>'tag2' tag2 FROM "t4" group by tags->>'tag1', tags->>'tag2'; ---Testcase 12: -EXPLAIN (verbose) SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint), count((fields->>'value1')::bigint), tags->>'tag2' tag2 FROM "t4" group by tags->>'tag1', tags->>'tag2'; - ---Testcase 13: -SELECT influx_time(time,interval '5s',interval '0s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' - GROUP BY influx_time(time,interval '5s', interval '0s'), tags->>'tag1'; - ---Testcase 14: -EXPLAIN (VERBOSE) -SELECT influx_time(time,interval '5s',interval '0s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '5s', interval '0s'), tags->>'tag1'; - --- no offset ---Testcase 15: -SELECT influx_time(time,interval '5s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' -GROUP BY influx_time(time,interval '5s'), tags->>'tag1'; - ---Testcase 16: -EXPLAIN (verbose) -SELECT last(time, (fields->>'value1')::bigint),last(time, (fields->>'value2')::bigint) FROM t4 GROUP BY tags->>'tag1'; ---Testcase 17: -SELECT last(time, (fields->>'value1')::bigint),last(time, (fields->>'value2')::bigint) FROM t4 GROUP BY tags->>'tag1'; - --- GROUP BY time intervals and fill() ---Testcase 18: -SELECT * FROM tx; - ---Testcase 19: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); - ---Testcase 20: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); - ---Testcase 21: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); - ---Testcase 22: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); - ---Testcase 23: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); - ---Testcase 24: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); - ---Testcase 25: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); - ---Testcase 26: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); - ---Testcase 27: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); - ---Testcase 28: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); - ---Testcase 29: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); - ---Testcase 30: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); - --- with offset interval '0.00001s' ---Testcase 31: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); - ---Testcase 32: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); - ---Testcase 33: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1'; - ---Testcase 34: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1'; - ---Testcase 35: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; - ---Testcase 36: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; - ---with tag1 ---Testcase 37: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1'; - ---Testcase 38: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1'; - ---Testcase 39: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1'; - ---Testcase 40: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1'; - ---Testcase 41: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('null')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tags->>'tag1'; - ---Testcase 42: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('null')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tags->>'tag1'; - ---Testcase 43: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('none')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tags->>'tag1'; - ---Testcase 44: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('none')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tags->>'tag1'; - ---Testcase 45: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('previous')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tags->>'tag1'; - ---Testcase 46: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('previous')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tags->>'tag1'; - ---Testcase 47: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('linear')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tags->>'tag1'; - ---Testcase 48: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('linear')), tags->>'tag1' tag1 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tags->>'tag1'; - ---with tag1,tag2 - ---Testcase 49: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; - ---Testcase 50: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; - ---Testcase 51: -EXPLAIN (verbose) -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1', tags->>'tag2'; - ---Testcase 52: -SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" -WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' -GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1', tags->>'tag2'; - --- unsupport syntax ---Testcase 53: -EXPLAIN (verbose) -SELECT influx_fill_numeric(100) FROM "tx"; ---Testcase 54: -SELECT influx_fill_numeric(100) FROM "tx"; - ---Testcase 55: -SELECT * FROM "tx" WHERE influx_fill_numeric(100) > 0; - ---Testcase 56: -EXPLAIN (verbose) -SELECT influx_fill_option('linear') FROM "tx"; ---Testcase 57: -SELECT influx_fill_option('linear') FROM "tx"; - ---Testcase 58: -SELECT * FROM "tx" WHERE influx_fill_option('linear') > 0; - - --- InfluxDB does not return error for the following query ---SELECT sum(value1) FROM t4 GROUP BY value1; - --- not allowed ---Testcase 59: -SELECT sum((fields->>'value1')::bigint) FROM t4 GROUP BY time; - ---last returns NULL for tag ---SELECT last(time, value1),last(time, value2),last(time, tag1) FROM t4 GROUP BY tag1; - ---Testcase 60: -DROP FOREIGN TABLE t3; ---Testcase 61: -DROP FOREIGN TABLE t4; ---Testcase 62: -DROP FOREIGN TABLE cpu; ---Testcase 63: -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 64: -DROP SERVER server1 CASCADE; ---Testcase 65: -DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/schemaless/extra/insert.sql b/sql/14.0/schemaless/extra/insert.sql deleted file mode 100644 index 67c0557..0000000 --- a/sql/14.0/schemaless/extra/insert.sql +++ /dev/null @@ -1,686 +0,0 @@ -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 1: -CREATE EXTENSION influxdb_fdw; ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - --- --- insert with DEFAULT in the target_list --- ---Testcase 4: -CREATE FOREIGN TABLE inserttest (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -CREATE FOREIGN TABLE inserttest_nsc (col1 int4, col2 int4 NOT NULL, col3 text default 'testing') SERVER influxdb_svr OPTIONS(table 'inserttest'); ---Testcase 5: -insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT); ---Testcase 6: -insert into inserttest_nsc (col2, col3) values (3, DEFAULT); ---Testcase 7: -insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, 5, DEFAULT); ---Testcase 8: -insert into inserttest_nsc values (DEFAULT, 5, 'test'); ---Testcase 9: -insert into inserttest_nsc values (DEFAULT, 7); - ---Testcase 10: -select * from inserttest; - --- --- insert with similar expression / target_list values (all fail) --- ---Testcase 11: -insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, DEFAULT); ---Testcase 12: -insert into inserttest_nsc (col1, col2, col3) values (1, 2); ---Testcase 13: -insert into inserttest_nsc (col1) values (1, 2); ---Testcase 14: -insert into inserttest_nsc (col1) values (DEFAULT, DEFAULT); - ---Testcase 15: -select * from inserttest; - --- --- VALUES test --- ---Testcase 16: -insert into inserttest_nsc values(10, 20, '40'), (-1, 2, DEFAULT), - ((select 2), (select i from (values(3)) as foo (i)), 'values are fun!'); - ---Testcase 17: -select * from inserttest; - --- --- TOASTed value test --- ---Testcase 18: -insert into inserttest_nsc values(30, 50, repeat('x', 10000)); - ---Testcase 19: -select (fields->>'col1')::int4 col1, (fields->>'col2')::int4 col2, char_length(fields->>'col3') from inserttest; - ---Testcase 20: --- Clean up: -delete from inserttest_nsc; -drop foreign table inserttest; -drop foreign table inserttest_nsc; -/* --- skip, influxdb does not support create table with WITH option --- --- tuple larger than fillfactor --- -CREATE TABLE large_tuple_test (a int, b text) WITH (fillfactor = 10); -ALTER TABLE large_tuple_test ALTER COLUMN b SET STORAGE plain; - --- create page w/ free space in range [nearlyEmptyFreeSpace, MaxHeapTupleSize) -INSERT INTO large_tuple_test (select 1, NULL); - --- should still fit on the page -INSERT INTO large_tuple_test (select 2, repeat('a', 1000)); -SELECT pg_size_pretty(pg_relation_size('large_tuple_test'::regclass, 'main')); - --- add small record to the second page -INSERT INTO large_tuple_test (select 3, NULL); - --- now this tuple won't fit on the second page, but the insert should --- still succeed by extending the relation -INSERT INTO large_tuple_test (select 4, repeat('a', 8126)); - -DROP TABLE large_tuple_test; -*/ - -/* --- skip, influxdb does not support create type --- --- check indirection (field/array assignment), cf bug #14265 --- --- these tests are aware that transformInsertStmt has 3 separate code paths --- - -create type insert_test_type as (if1 int, if2 text[]); - -create table inserttest (f1 int, f2 int[], - f3 insert_test_type, f4 insert_test_type[]); - -insert into inserttest (f2[1], f2[2]) values (1,2); -insert into inserttest (f2[1], f2[2]) values (3,4), (5,6); -insert into inserttest (f2[1], f2[2]) select 7,8; -insert into inserttest (f2[1], f2[2]) values (1,default); -- not supported - -insert into inserttest (f3.if1, f3.if2) values (1,array['foo']); -insert into inserttest (f3.if1, f3.if2) values (1,'{foo}'), (2,'{bar}'); -insert into inserttest (f3.if1, f3.if2) select 3, '{baz,quux}'; -insert into inserttest (f3.if1, f3.if2) values (1,default); -- not supported - -insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'); -insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'), ('baz', 'quux'); -insert into inserttest (f3.if2[1], f3.if2[2]) select 'bear', 'beer'; - -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'); -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'), ('baz', 'quux'); -insert into inserttest (f4[1].if2[1], f4[1].if2[2]) select 'bear', 'beer'; - -select * from inserttest; - --- also check reverse-listing -create table inserttest2 (f1 bigint, f2 text); -create rule irule1 as on insert to inserttest2 do also - insert into inserttest (f3.if2[1], f3.if2[2]) - values (new.f1,new.f2); -create rule irule2 as on insert to inserttest2 do also - insert into inserttest (f4[1].if1, f4[1].if2[2]) - values (1,'fool'),(new.f1,new.f2); -create rule irule3 as on insert to inserttest2 do also - insert into inserttest (f4[1].if1, f4[1].if2[2]) - select new.f1, new.f2; -\d+ inserttest2 - -drop table inserttest2; -drop table inserttest; -drop type insert_test_type; -*/ - -/* --- skip, influxdb does not support partition table --- direct partition inserts should check partition bound constraint -create table range_parted ( - a text, - b int -) partition by range (a, (b+0)); - --- no partitions, so fail -insert into range_parted values ('a', 11); - -create table part1 partition of range_parted for values from ('a', 1) to ('a', 10); -create table part2 partition of range_parted for values from ('a', 10) to ('a', 20); -create table part3 partition of range_parted for values from ('b', 1) to ('b', 10); -create table part4 partition of range_parted for values from ('b', 10) to ('b', 20); - --- fail -insert into part1 values ('a', 11); -insert into part1 values ('b', 1); --- ok -insert into part1 values ('a', 1); --- fail -insert into part4 values ('b', 21); -insert into part4 values ('a', 10); --- ok -insert into part4 values ('b', 10); - --- fail (partition key a has a NOT NULL constraint) -insert into part1 values (null); --- fail (expression key (b+0) cannot be null either) -insert into part1 values (1); - -create table list_parted ( - a text, - b int -) partition by list (lower(a)); -create table part_aa_bb partition of list_parted FOR VALUES IN ('aa', 'bb'); -create table part_cc_dd partition of list_parted FOR VALUES IN ('cc', 'dd'); -create table part_null partition of list_parted FOR VALUES IN (null); - --- fail -insert into part_aa_bb values ('cc', 1); -insert into part_aa_bb values ('AAa', 1); -insert into part_aa_bb values (null); --- ok -insert into part_cc_dd values ('cC', 1); -insert into part_null values (null, 0); - --- check in case of multi-level partitioned table -create table part_ee_ff partition of list_parted for values in ('ee', 'ff') partition by range (b); -create table part_ee_ff1 partition of part_ee_ff for values from (1) to (10); -create table part_ee_ff2 partition of part_ee_ff for values from (10) to (20); - --- test default partition -create table part_default partition of list_parted default; --- Negative test: a row, which would fit in other partition, does not fit --- default partition, even when inserted directly -insert into part_default values ('aa', 2); -insert into part_default values (null, 2); --- ok -insert into part_default values ('Zz', 2); --- test if default partition works as expected for multi-level partitioned --- table as well as when default partition itself is further partitioned -drop table part_default; -create table part_xx_yy partition of list_parted for values in ('xx', 'yy') partition by list (a); -create table part_xx_yy_p1 partition of part_xx_yy for values in ('xx'); -create table part_xx_yy_defpart partition of part_xx_yy default; -create table part_default partition of list_parted default partition by range(b); -create table part_default_p1 partition of part_default for values from (20) to (30); -create table part_default_p2 partition of part_default for values from (30) to (40); - --- fail -insert into part_ee_ff1 values ('EE', 11); -insert into part_default_p2 values ('gg', 43); --- fail (even the parent's, ie, part_ee_ff's partition constraint applies) -insert into part_ee_ff1 values ('cc', 1); -insert into part_default values ('gg', 43); --- ok -insert into part_ee_ff1 values ('ff', 1); -insert into part_ee_ff2 values ('ff', 11); -insert into part_default_p1 values ('cd', 25); -insert into part_default_p2 values ('de', 35); -insert into list_parted values ('ab', 21); -insert into list_parted values ('xx', 1); -insert into list_parted values ('yy', 2); -select tableoid::regclass, * from list_parted; - --- Check tuple routing for partitioned tables - --- fail -insert into range_parted values ('a', 0); --- ok -insert into range_parted values ('a', 1); -insert into range_parted values ('a', 10); --- fail -insert into range_parted values ('a', 20); --- ok -insert into range_parted values ('b', 1); -insert into range_parted values ('b', 10); --- fail (partition key (b+0) is null) -insert into range_parted values ('a'); - --- Check default partition -create table part_def partition of range_parted default; --- fail -insert into part_def values ('b', 10); --- ok -insert into part_def values ('c', 10); -insert into range_parted values (null, null); -insert into range_parted values ('a', null); -insert into range_parted values (null, 19); -insert into range_parted values ('b', 20); - -select tableoid::regclass, * from range_parted; --- ok -insert into list_parted values (null, 1); -insert into list_parted (a) values ('aA'); --- fail (partition of part_ee_ff not found in both cases) -insert into list_parted values ('EE', 0); -insert into part_ee_ff values ('EE', 0); --- ok -insert into list_parted values ('EE', 1); -insert into part_ee_ff values ('EE', 10); -select tableoid::regclass, * from list_parted; - --- some more tests to exercise tuple-routing with multi-level partitioning -create table part_gg partition of list_parted for values in ('gg') partition by range (b); -create table part_gg1 partition of part_gg for values from (minvalue) to (1); -create table part_gg2 partition of part_gg for values from (1) to (10) partition by range (b); -create table part_gg2_1 partition of part_gg2 for values from (1) to (5); -create table part_gg2_2 partition of part_gg2 for values from (5) to (10); - -create table part_ee_ff3 partition of part_ee_ff for values from (20) to (30) partition by range (b); -create table part_ee_ff3_1 partition of part_ee_ff3 for values from (20) to (25); -create table part_ee_ff3_2 partition of part_ee_ff3 for values from (25) to (30); - -truncate list_parted; -insert into list_parted values ('aa'), ('cc'); -insert into list_parted select 'Ff', s.a from generate_series(1, 29) s(a); -insert into list_parted select 'gg', s.a from generate_series(1, 9) s(a); -insert into list_parted (b) values (1); -select tableoid::regclass::text, a, min(b) as min_b, max(b) as max_b from list_parted group by 1, 2 order by 1; - --- direct partition inserts should check hash partition bound constraint - --- Use hand-rolled hash functions and operator classes to get predictable --- result on different machines. The hash function for int4 simply returns --- the sum of the values passed to it and the one for text returns the length --- of the non-empty string value passed to it or 0. - -create or replace function part_hashint4_noop(value int4, seed int8) -returns int8 as $$ -select value + seed; -$$ language sql immutable; - -create operator class part_test_int4_ops -for type int4 -using hash as -operator 1 =, -function 2 part_hashint4_noop(int4, int8); - -create or replace function part_hashtext_length(value text, seed int8) -RETURNS int8 AS $$ -select length(coalesce(value, ''))::int8 -$$ language sql immutable; - -create operator class part_test_text_ops -for type text -using hash as -operator 1 =, -function 2 part_hashtext_length(text, int8); - -create table hash_parted ( - a int -) partition by hash (a part_test_int4_ops); -create table hpart0 partition of hash_parted for values with (modulus 4, remainder 0); -create table hpart1 partition of hash_parted for values with (modulus 4, remainder 1); -create table hpart2 partition of hash_parted for values with (modulus 4, remainder 2); -create table hpart3 partition of hash_parted for values with (modulus 4, remainder 3); - -insert into hash_parted values(generate_series(1,10)); - --- direct insert of values divisible by 4 - ok; -insert into hpart0 values(12),(16); --- fail; -insert into hpart0 values(11); --- 11 % 4 -> 3 remainder i.e. valid data for hpart3 partition -insert into hpart3 values(11); - --- view data -select tableoid::regclass as part, a, a%4 as "remainder = a % 4" -from hash_parted order by part; - --- test \d+ output on a table which has both partitioned and unpartitioned --- partitions -\d+ list_parted - --- cleanup -drop table range_parted, list_parted; -drop table hash_parted; - --- test that a default partition added as the first partition accepts any value --- including null -create table list_parted (a int) partition by list (a); -create table part_default partition of list_parted default; -\d+ part_default -insert into part_default values (null); -insert into part_default values (1); -insert into part_default values (-1); -select tableoid::regclass, a from list_parted; --- cleanup -drop table list_parted; - --- more tests for certain multi-level partitioning scenarios -create table mlparted (a int, b int) partition by range (a, b); -create table mlparted1 (b int not null, a int not null) partition by range ((b+0)); -create table mlparted11 (like mlparted1); -alter table mlparted11 drop a; -alter table mlparted11 add a int; -alter table mlparted11 drop a; -alter table mlparted11 add a int not null; --- attnum for key attribute 'a' is different in mlparted, mlparted1, and mlparted11 -select attrelid::regclass, attname, attnum -from pg_attribute -where attname = 'a' - and (attrelid = 'mlparted'::regclass - or attrelid = 'mlparted1'::regclass - or attrelid = 'mlparted11'::regclass) -order by attrelid::regclass::text; - -alter table mlparted1 attach partition mlparted11 for values from (2) to (5); -alter table mlparted attach partition mlparted1 for values from (1, 2) to (1, 10); - --- check that "(1, 2)" is correctly routed to mlparted11. -insert into mlparted values (1, 2); -select tableoid::regclass, * from mlparted; - --- check that proper message is shown after failure to route through mlparted1 -insert into mlparted (a, b) values (1, 5); - -truncate mlparted; -alter table mlparted add constraint check_b check (b = 3); - --- have a BR trigger modify the row such that the check_b is violated -create function mlparted11_trig_fn() -returns trigger AS -$$ -begin - NEW.b := 4; - return NEW; -end; -$$ -language plpgsql; -create trigger mlparted11_trig before insert ON mlparted11 - for each row execute procedure mlparted11_trig_fn(); - --- check that the correct row is shown when constraint check_b fails after --- "(1, 2)" is routed to mlparted11 (actually "(1, 4)" would be shown due --- to the BR trigger mlparted11_trig_fn) -insert into mlparted values (1, 2); -drop trigger mlparted11_trig on mlparted11; -drop function mlparted11_trig_fn(); - --- check that inserting into an internal partition successfully results in --- checking its partition constraint before inserting into the leaf partition --- selected by tuple-routing -insert into mlparted1 (a, b) values (2, 3); - --- check routing error through a list partitioned table when the key is null -create table lparted_nonullpart (a int, b char) partition by list (b); -create table lparted_nonullpart_a partition of lparted_nonullpart for values in ('a'); -insert into lparted_nonullpart values (1); -drop table lparted_nonullpart; - --- check that RETURNING works correctly with tuple-routing -alter table mlparted drop constraint check_b; -create table mlparted12 partition of mlparted1 for values from (5) to (10); -create table mlparted2 (b int not null, a int not null); -alter table mlparted attach partition mlparted2 for values from (1, 10) to (1, 20); -create table mlparted3 partition of mlparted for values from (1, 20) to (1, 30); -create table mlparted4 (like mlparted); -alter table mlparted4 drop a; -alter table mlparted4 add a int not null; -alter table mlparted attach partition mlparted4 for values from (1, 30) to (1, 40); -with ins (a, b, c) as - (insert into mlparted (b, a) select s.a, 1 from generate_series(2, 39) s(a) returning tableoid::regclass, *) - select a, b, min(c), max(c) from ins group by a, b order by 1; - -alter table mlparted add c text; -create table mlparted5 (c text, a int not null, b int not null) partition by list (c); -create table mlparted5a (a int not null, c text, b int not null); -alter table mlparted5 attach partition mlparted5a for values in ('a'); -alter table mlparted attach partition mlparted5 for values from (1, 40) to (1, 50); -alter table mlparted add constraint check_b check (a = 1 and b < 45); -insert into mlparted values (1, 45, 'a'); -create function mlparted5abrtrig_func() returns trigger as $$ begin new.c = 'b'; return new; end; $$ language plpgsql; -create trigger mlparted5abrtrig before insert on mlparted5a for each row execute procedure mlparted5abrtrig_func(); -insert into mlparted5 (a, b, c) values (1, 40, 'a'); -drop table mlparted5; -alter table mlparted drop constraint check_b; - --- Check multi-level default partition -create table mlparted_def partition of mlparted default partition by range(a); -create table mlparted_def1 partition of mlparted_def for values from (40) to (50); -create table mlparted_def2 partition of mlparted_def for values from (50) to (60); -insert into mlparted values (40, 100); -insert into mlparted_def1 values (42, 100); -insert into mlparted_def2 values (54, 50); --- fail -insert into mlparted values (70, 100); -insert into mlparted_def1 values (52, 50); -insert into mlparted_def2 values (34, 50); --- ok -create table mlparted_defd partition of mlparted_def default; -insert into mlparted values (70, 100); - -select tableoid::regclass, * from mlparted_def; - --- Check multi-level tuple routing with attributes dropped from the --- top-most parent. First remove the last attribute. -alter table mlparted add d int, add e int; -alter table mlparted drop e; -create table mlparted5 partition of mlparted - for values from (1, 40) to (1, 50) partition by range (c); -create table mlparted5_ab partition of mlparted5 - for values from ('a') to ('c') partition by list (c); --- This partitioned table should remain with no partitions. -create table mlparted5_cd partition of mlparted5 - for values from ('c') to ('e') partition by list (c); -create table mlparted5_a partition of mlparted5_ab for values in ('a'); -create table mlparted5_b (d int, b int, c text, a int); -alter table mlparted5_ab attach partition mlparted5_b for values in ('b'); -truncate mlparted; -insert into mlparted values (1, 2, 'a', 1); -insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a -insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b -insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails -insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails -select tableoid::regclass, * from mlparted order by a, b, c, d; -alter table mlparted drop d; -truncate mlparted; --- Remove the before last attribute. -alter table mlparted add e int, add d int; -alter table mlparted drop e; -insert into mlparted values (1, 2, 'a', 1); -insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a -insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b -insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails -insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails -select tableoid::regclass, * from mlparted order by a, b, c, d; -alter table mlparted drop d; -drop table mlparted5; - --- check that message shown after failure to find a partition shows the --- appropriate key description (or none) in various situations -create table key_desc (a int, b int) partition by list ((a+0)); -create table key_desc_1 partition of key_desc for values in (1) partition by range (b); - -create user regress_insert_other_user; -grant select (a) on key_desc_1 to regress_insert_other_user; -grant insert on key_desc to regress_insert_other_user; - -set role regress_insert_other_user; --- no key description is shown -insert into key_desc values (1, 1); - -reset role; -grant select (b) on key_desc_1 to regress_insert_other_user; -set role regress_insert_other_user; --- key description (b)=(1) is now shown -insert into key_desc values (1, 1); - --- key description is not shown if key contains expression -insert into key_desc values (2, 1); -reset role; -revoke all on key_desc from regress_insert_other_user; -revoke all on key_desc_1 from regress_insert_other_user; -drop role regress_insert_other_user; -drop table key_desc, key_desc_1; - --- test minvalue/maxvalue restrictions -create table mcrparted (a int, b int, c int) partition by range (a, abs(b), c); -create table mcrparted0 partition of mcrparted for values from (minvalue, 0, 0) to (1, maxvalue, maxvalue); -create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, minvalue); -create table mcrparted4 partition of mcrparted for values from (21, minvalue, 0) to (30, 20, minvalue); - --- check multi-column range partitioning expression enforces the same --- constraint as what tuple-routing would determine it to be -create table mcrparted0 partition of mcrparted for values from (minvalue, minvalue, minvalue) to (1, maxvalue, maxvalue); -create table mcrparted1 partition of mcrparted for values from (2, 1, minvalue) to (10, 5, 10); -create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, maxvalue); -create table mcrparted3 partition of mcrparted for values from (11, 1, 1) to (20, 10, 10); -create table mcrparted4 partition of mcrparted for values from (21, minvalue, minvalue) to (30, 20, maxvalue); -create table mcrparted5 partition of mcrparted for values from (30, 21, 20) to (maxvalue, maxvalue, maxvalue); - --- null not allowed in range partition -insert into mcrparted values (null, null, null); - --- routed to mcrparted0 -insert into mcrparted values (0, 1, 1); -insert into mcrparted0 values (0, 1, 1); - --- routed to mcparted1 -insert into mcrparted values (9, 1000, 1); -insert into mcrparted1 values (9, 1000, 1); -insert into mcrparted values (10, 5, -1); -insert into mcrparted1 values (10, 5, -1); -insert into mcrparted values (2, 1, 0); -insert into mcrparted1 values (2, 1, 0); - --- routed to mcparted2 -insert into mcrparted values (10, 6, 1000); -insert into mcrparted2 values (10, 6, 1000); -insert into mcrparted values (10, 1000, 1000); -insert into mcrparted2 values (10, 1000, 1000); - --- no partition exists, nor does mcrparted3 accept it -insert into mcrparted values (11, 1, -1); -insert into mcrparted3 values (11, 1, -1); - --- routed to mcrparted5 -insert into mcrparted values (30, 21, 20); -insert into mcrparted5 values (30, 21, 20); -insert into mcrparted4 values (30, 21, 20); -- error - --- check rows -select tableoid::regclass::text, * from mcrparted order by 1; - --- cleanup -drop table mcrparted; - --- check that a BR constraint can't make partition contain violating rows -create table brtrigpartcon (a int, b text) partition by list (a); -create table brtrigpartcon1 partition of brtrigpartcon for values in (1); -create or replace function brtrigpartcon1trigf() returns trigger as $$begin new.a := 2; return new; end$$ language plpgsql; -create trigger brtrigpartcon1trig before insert on brtrigpartcon1 for each row execute procedure brtrigpartcon1trigf(); -insert into brtrigpartcon values (1, 'hi there'); -insert into brtrigpartcon1 values (1, 'hi there'); - --- check that the message shows the appropriate column description in a --- situation where the partitioned table is not the primary ModifyTable node -create table inserttest3 (f1 text default 'foo', f2 text default 'bar', f3 int); -create role regress_coldesc_role; -grant insert on inserttest3 to regress_coldesc_role; -grant insert on brtrigpartcon to regress_coldesc_role; -revoke select on brtrigpartcon from regress_coldesc_role; -set role regress_coldesc_role; -with result as (insert into brtrigpartcon values (1, 'hi there') returning 1) - insert into inserttest3 (f3) select * from result; -reset role; - --- cleanup -revoke all on inserttest3 from regress_coldesc_role; -revoke all on brtrigpartcon from regress_coldesc_role; -drop role regress_coldesc_role; -drop table inserttest3; -drop table brtrigpartcon; -drop function brtrigpartcon1trigf(); - --- check that "do nothing" BR triggers work with tuple-routing -create table donothingbrtrig_test (a int, b text) partition by list (a); -create table donothingbrtrig_test1 (b text, a int); -create table donothingbrtrig_test2 (c text, b text, a int); -alter table donothingbrtrig_test2 drop column c; -create or replace function donothingbrtrig_func() returns trigger as $$begin raise notice 'b: %', new.b; return NULL; end$$ language plpgsql; -create trigger donothingbrtrig1 before insert on donothingbrtrig_test1 for each row execute procedure donothingbrtrig_func(); -create trigger donothingbrtrig2 before insert on donothingbrtrig_test2 for each row execute procedure donothingbrtrig_func(); -alter table donothingbrtrig_test attach partition donothingbrtrig_test1 for values in (1); -alter table donothingbrtrig_test attach partition donothingbrtrig_test2 for values in (2); -insert into donothingbrtrig_test values (1, 'foo'), (2, 'bar'); -copy donothingbrtrig_test from stdout; -1 baz -2 qux -\. -select tableoid::regclass, * from donothingbrtrig_test; - --- cleanup -drop table donothingbrtrig_test; -drop function donothingbrtrig_func(); - --- check multi-column range partitioning with minvalue/maxvalue constraints -create table mcrparted (a text, b int) partition by range(a, b); -create table mcrparted1_lt_b partition of mcrparted for values from (minvalue, minvalue) to ('b', minvalue); -create table mcrparted2_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue); -create table mcrparted3_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue); -create table mcrparted4_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0); -create table mcrparted5_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10); -create table mcrparted6_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue); -create table mcrparted7_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue); -create table mcrparted8_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, maxvalue); - -\d+ mcrparted -\d+ mcrparted1_lt_b -\d+ mcrparted2_b -\d+ mcrparted3_c_to_common -\d+ mcrparted4_common_lt_0 -\d+ mcrparted5_common_0_to_10 -\d+ mcrparted6_common_ge_10 -\d+ mcrparted7_gt_common_lt_d -\d+ mcrparted8_ge_d - -insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10), - ('comm', -10), ('common', -10), ('common', 0), ('common', 10), - ('commons', 0), ('d', -10), ('e', 0); -select tableoid::regclass, * from mcrparted order by a, b; -drop table mcrparted; - --- check that wholerow vars in the RETURNING list work with partitioned tables -create table returningwrtest (a int) partition by list (a); -create table returningwrtest1 partition of returningwrtest for values in (1); -insert into returningwrtest values (1) returning returningwrtest; - --- check also that the wholerow vars in RETURNING list are converted as needed -alter table returningwrtest add b text; -create table returningwrtest2 (b text, c int, a int); -alter table returningwrtest2 drop c; -alter table returningwrtest attach partition returningwrtest2 for values in (2); -insert into returningwrtest values (2, 'foo') returning returningwrtest; -drop table returningwrtest; -*/ - --- Clean up -DO $d$ -declare - l_rec record; -begin - for l_rec in (select foreign_table_schema, foreign_table_name - from information_schema.foreign_tables) loop - execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); - end loop; -end; -$d$; - ---Testcase 21: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 22: -DROP SERVER influxdb_svr CASCADE; ---Testcase 23: -DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/schemaless/extra/prepare.sql b/sql/14.0/schemaless/extra/prepare.sql deleted file mode 100644 index 19138f4..0000000 --- a/sql/14.0/schemaless/extra/prepare.sql +++ /dev/null @@ -1,143 +0,0 @@ --- Regression tests for prepareable statements. We query the content --- of the pg_prepared_statements view as prepared statements are --- created and removed. -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 1: -CREATE EXTENSION influxdb_fdw; - ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - ---Testcase 4: -CREATE FOREIGN TABLE tenk1 ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); - --- Does not support this command --- ALTER TABLE tenk1 SET WITH OIDS; - ---Testcase 5: -CREATE FOREIGN TABLE road ( - fields jsonb OPTIONS (fields 'true') -) SERVER influxdb_svr OPTIONS (schemaless 'true'); - ---Testcase 6: -CREATE FOREIGN TABLE road_tmp (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); - ---Testcase 7: -SELECT name, statement, parameter_types FROM pg_prepared_statements; - ---Testcase 8: -PREPARE q1 AS SELECT (fields->>'a')::int AS a FROM road_tmp; ---Testcase 9: -EXECUTE q1; - ---Testcase 10: -SELECT name, statement, parameter_types FROM pg_prepared_statements; - --- should fail ---Testcase 11: -PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; - --- should succeed -DEALLOCATE q1; ---Testcase 12: -PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; ---Testcase 13: -EXECUTE q1; - ---Testcase 14: -PREPARE q2 AS SELECT (fields->>'b')::int AS b FROM road_tmp; ---Testcase 15: -SELECT name, statement, parameter_types FROM pg_prepared_statements; - --- sql92 syntax -DEALLOCATE PREPARE q1; - ---Testcase 16: -SELECT name, statement, parameter_types FROM pg_prepared_statements; - -DEALLOCATE PREPARE q2; --- the view should return the empty set again ---Testcase 17: -SELECT name, statement, parameter_types FROM pg_prepared_statements; - --- parameterized queries ---Testcase 18: -PREPARE q2(text) AS - SELECT datname, datistemplate, datallowconn - FROM pg_database WHERE datname = $1; - ---Testcase 19: -EXECUTE q2('postgres'); - ---Testcase 20: -PREPARE q3(text, int, float, boolean, smallint) AS - SELECT * FROM tenk1 WHERE fields->>'string4' = $1 AND ((fields->>'four')::int = $2 OR - (fields->>'ten')::int = $3::bigint OR true = $4 OR (fields->>'odd')::int = $5::int) - ORDER BY (fields->>'unique1')::int; - ---Testcase 21: -EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); - --- too few params ---Testcase 22: -EXECUTE q3('bool'); - --- too many params ---Testcase 23: -EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); - --- wrong param types ---Testcase 24: -EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); - --- invalid type ---Testcase 25: -PREPARE q4(nonexistenttype) AS SELECT $1; - --- create table as execute ---Testcase 26: -PREPARE q5(int, text) AS - SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 OR fields->>'stringu1' = $2 - ORDER BY (fields->>'unique1')::int; ---Testcase 27: -CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); ---Testcase 28: -SELECT * FROM q5_prep_results; ---Testcase 29: -CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') - WITH NO DATA; ---Testcase 30: -SELECT * FROM q5_prep_nodata; - --- unknown or unspecified parameter types: should succeed ---Testcase 31: -PREPARE q6 AS - SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 AND fields->>'stringu1' = $2; ---Testcase 32: -PREPARE q7(unknown) AS - SELECT * FROM road WHERE fields->>'thepath' = $1; - ---Testcase 33: -SELECT name, statement, parameter_types FROM pg_prepared_statements - ORDER BY name; - --- test DEALLOCATE ALL; -DEALLOCATE ALL; ---Testcase 34: -SELECT name, statement, parameter_types FROM pg_prepared_statements - ORDER BY name; - ---Testcase 35: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 36: -DROP SERVER influxdb_svr CASCADE; ---Testcase 37: -DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/schemaless/extra/select_having.sql b/sql/14.0/schemaless/extra/select_having.sql deleted file mode 100644 index 538049e..0000000 --- a/sql/14.0/schemaless/extra/select_having.sql +++ /dev/null @@ -1,93 +0,0 @@ --- --- SELECT_HAVING --- -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 1: -CREATE EXTENSION influxdb_fdw; - ---Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - ---Testcase 4: -CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); -CREATE FOREIGN TABLE test_having_nsc (a int, b int, c char(8), d char) SERVER influxdb_svr OPTIONS (table 'test_having'); ---Testcase 5: -INSERT INTO test_having_nsc VALUES (0, 1, 'XXXX', 'A'); ---Testcase 6: -INSERT INTO test_having_nsc VALUES (1, 2, 'AAAA', 'b'); ---Testcase 7: -INSERT INTO test_having_nsc VALUES (2, 2, 'AAAA', 'c'); ---Testcase 8: -INSERT INTO test_having_nsc VALUES (3, 3, 'BBBB', 'D'); ---Testcase 9: -INSERT INTO test_having_nsc VALUES (4, 3, 'BBBB', 'e'); ---Testcase 10: -INSERT INTO test_having_nsc VALUES (5, 3, 'bbbb', 'F'); ---Testcase 11: -INSERT INTO test_having_nsc VALUES (6, 4, 'cccc', 'g'); ---Testcase 12: -INSERT INTO test_having_nsc VALUES (7, 4, 'cccc', 'h'); ---Testcase 13: -INSERT INTO test_having_nsc VALUES (8, 4, 'CCCC', 'I'); ---Testcase 14: -INSERT INTO test_having_nsc VALUES (9, 4, 'CCCC', 'j'); ---Testcase 15: -SELECT (fields->>'b')::int b, fields->>'c' c FROM test_having - GROUP BY fields->>'b', fields->>'c' HAVING count(*) = 1 ORDER BY (fields->>'b')::int, fields->>'c'; - --- HAVING is effectively equivalent to WHERE in this case ---Testcase 16: -SELECT (fields->>'b')::int b, fields->>'c' c FROM test_having - GROUP BY fields->>'b', fields->>'c' HAVING (fields->>'b')::int = 3 ORDER BY (fields->>'b')::int, fields->>'c'; - ---Testcase 17: -SELECT lower((fields->>'c')::char(8)), count(fields->>'c') FROM test_having - GROUP BY lower((fields->>'c')::char(8)) HAVING count(*) > 2 OR min((fields->>'a')::int) = max((fields->>'a')::int) - ORDER BY lower((fields->>'c')::char(8)); - ---Testcase 18: -SELECT fields->>'c' c, max((fields->>'a')::int) FROM test_having - GROUP BY fields->>'c' HAVING count(*) > 2 OR min((fields->>'a')::int) = max((fields->>'a')::int) - ORDER BY fields->>'c'; - --- test degenerate cases involving HAVING without GROUP BY --- Per SQL spec, these should generate 0 or 1 row, even without aggregates - ---Testcase 19: -SELECT min((fields->>'a')::int), max((fields->>'a')::int) FROM test_having HAVING min((fields->>'a')::int) = max((fields->>'a')::int); ---Testcase 20: -SELECT min((fields->>'a')::int), max((fields->>'a')::int) FROM test_having HAVING min((fields->>'a')::int) < max((fields->>'a')::int); - --- errors: ungrouped column references ---Testcase 21: -SELECT (fields->>'a')::int a FROM test_having HAVING min((fields->>'a')::int) < max((fields->>'a')::int); ---Testcase 22: -SELECT 1 AS one FROM test_having HAVING (fields->>'a')::int > 1; - --- the really degenerate case: need not scan table at all ---Testcase 23: -SELECT 1 AS one FROM test_having HAVING 1 > 2; ---Testcase 24: -SELECT 1 AS one FROM test_having HAVING 1 < 2; - --- and just to prove that we aren't scanning the table: ---Testcase 25: -SELECT 1 AS one FROM test_having WHERE 1/(fields->>'a')::int = 1 HAVING 1 < 2; - ---Testcase 26: --- Clean up: -DELETE FROM test_having_nsc; -DROP FOREIGN TABLE test_having; -DROP FOREIGN TABLE test_having_nsc; ---Testcase 27: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 28: -DROP SERVER influxdb_svr CASCADE; ---Testcase 29: -DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/schemaless/influxdb_fdw.sql b/sql/14.0/schemaless/influxdb_fdw.sql deleted file mode 100644 index 738636d..0000000 --- a/sql/14.0/schemaless/influxdb_fdw.sql +++ /dev/null @@ -1,597 +0,0 @@ ---SET log_min_messages=debug1; ---SET client_min_messages=debug1; ---Testcase 1: -SET datestyle=ISO; --- timestamp with time zone differs based on this ---Testcase 2: -SET timezone='Japan'; - -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); --- import time column as timestamp and text type -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); ---Testcase 6: -SELECT * FROM cpu; ---Testcase 7: -SELECT tags->>'tag1' tag1, (fields->>'value1')::bigint value1 FROM cpu; ---Testcase 8: -SELECT (fields->>'value1')::bigint value1, time, (fields->>'value2')::double precision value2 FROM cpu; ---Testcase 9: -SELECT (fields->>'value1')::bigint value1, time_text, (fields->>'value2')::double precision value2 FROM cpu; - ---Testcase 10: -DROP FOREIGN TABLE cpu; ---Testcase 11: -DROP FOREIGN TABLE t3; ---Testcase 12: -DROP FOREIGN TABLE t4; ---Testcase 13: -DROP FOREIGN TABLE tx; ---Testcase 14: -DROP FOREIGN TABLE numbers; - --- test EXECPT -IMPORT FOREIGN SCHEMA public EXCEPT (cpu, t3, t4, tx, numbers) FROM SERVER server1 INTO public OPTIONS(schemaless 'true'); ---Testcase 15: -SELECT ftoptions FROM pg_foreign_table; - --- test LIMIT TO -IMPORT FOREIGN SCHEMA public LIMIT TO (cpu) FROM SERVER server1 INTO public OPTIONS(schemaless 'true'); ---Testcase 16: -SELECT ftoptions FROM pg_foreign_table; ---Testcase 17: -DROP FOREIGN TABLE cpu; - -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false', schemaless 'true'); - ---Testcase 18: -SELECT * FROM cpu; ---Testcase 19: -SELECT tags->>'tag1' tag1, (fields->>'value1')::int value1 FROM cpu; ---Testcase 20: -SELECT (fields->>'value1')::int value1, time, (fields->>'value2')::double precision value2 FROM cpu; ---Testcase 21: -SELECT tags->>'tag1' tag1 FROM cpu; ---Testcase 22: -SELECT * FROM numbers; - ---Testcase 23: -\d cpu; - ---Testcase 24: -SELECT * FROM cpu WHERE (fields->>'value1')::int=100; ---Testcase 25: -SELECT * FROM cpu WHERE (fields->>'value2')::double precision=0.5; ---Testcase 26: -SELECT * FROM cpu WHERE fields->>'value3'='str'; ---Testcase 27: -SELECT * FROM cpu WHERE (fields->>'value4')::boolean=true; ---Testcase 28: -SELECT * FROM cpu WHERE NOT ((fields->>'value4')::boolean AND (fields->>'value1')::int=100); ---Testcase 29: -SELECT * FROM cpu WHERE tags->>'tag1'='tag1_A'; - ---Testcase 30: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE fields->>'value3' IS NULL; ---Testcase 31: -SELECT * FROM cpu WHERE fields->>'value3' IS NULL; ---Testcase 32: -SELECT * FROM cpu WHERE tags->>'tag2' IS NULL; ---Testcase 33: -SELECT * FROM cpu WHERE fields->>'value3' IS NOT NULL; ---Testcase 34: -SELECT * FROM cpu WHERE tags->>'tag2' IS NOT NULL; - --- InfluxDB not support compare timestamp with OR condition ---Testcase 35: -SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR (fields->>'value2')::double precision = 0.5; - --- InfluxDB not support compare timestamp with != or <> ---Testcase 36: -SELECT * FROM cpu WHERE time != '2015-08-18 09:48:08+09'; ---Testcase 37: -SELECT * FROM cpu WHERE time <> '2015-08-18 09:48:08+09'; - ---Testcase 38: -SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR (fields->>'value2')::double precision = 0.5; - --- There is inconsitency for search of missing values between tag and field ---Testcase 39: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE fields->>'value3' = ''; ---Testcase 40: -SELECT * FROM cpu WHERE fields->>'value3' = ''; - ---Testcase 41: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM cpu WHERE tags->>'tag2' = ''; ---Testcase 42: -SELECT * FROM cpu WHERE tags->>'tag2' = ''; - ---Testcase 43: -SELECT * FROM cpu WHERE tags->>'tag1' IN ('tag1_A', 'tag1_B'); ---Testcase 44: -EXPLAIN VERBOSE -SELECT * FROM cpu WHERE tags->>'tag1' IN ('tag1_A', 'tag1_B'); - --- Rows which have no tag are considered to have empty string ---Testcase 45: -SELECT * FROM cpu WHERE tags->>'tag1' NOT IN ('tag1_A', 'tag1_B'); ---Testcase 46: -EXPLAIN VERBOSE -SELECT * FROM cpu WHERE tags->>'tag1' NOT IN ('tag1_A', 'tag1_B'); - --- test IN/NOT IN ---Testcase 47: -SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); ---Testcase 48: -SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); ---Testcase 49: -SELECT * FROM cpu WHERE (fields->>'value1')::int NOT IN (100, 97); ---Testcase 50: -SELECT * FROM cpu WHERE (fields->>'value1')::int IN (100, 97); ---Testcase 51: -SELECT * FROM cpu WHERE (fields->>'value2')::double precision IN (0.5, 10.9); ---Testcase 52: -SELECT * FROM cpu WHERE (fields->>'value2')::double precision NOT IN (2, 9.7); ---Testcase 53: -SELECT * FROM cpu WHERE (fields->>'value4')::boolean NOT IN ('true', 'true'); ---Testcase 54: -SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); ---Testcase 55: -SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); ---Testcase 56: -SELECT * FROM cpu WHERE (fields->>'value1')::int NOT IN (100, 97); ---Testcase 57: -SELECT * FROM cpu WHERE (fields->>'value1')::int IN (100, 97); ---Testcase 58: -SELECT * FROM cpu WHERE (fields->>'value2')::double precision IN (0.5, 10.9); ---Testcase 59: -SELECT * FROM cpu WHERE (fields->>'value2')::double precision NOT IN (2, 9.7); ---Testcase 60: -SELECT * FROM cpu WHERE (fields->>'value4')::boolean NOT IN ('true', 'true'); ---Testcase 61: -SELECT * FROM cpu WHERE (fields->>'value4')::boolean IN ('f', 't'); - ---Testcase 62: -CREATE FOREIGN TABLE t1(time timestamp with time zone ,tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true', tags 'tag1'); ---Testcase 63: -CREATE FOREIGN TABLE t2(time timestamp ,tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true', tags 'tag1'); - ---Testcase 64: -SELECT * FROM t1; ---Testcase 65: -SELECT * FROM t2; --- In following four queries, timestamp condition is added to InfluxQL as "time = '2015-08-18 00:00:00'" ---Testcase 66: -SELECT * FROM t1 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; ---Testcase 67: -SELECT * FROM t1 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; - ---Testcase 68: -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; ---Testcase 69: -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; - --- pushdown now() ---Testcase 70: -SELECT * FROM t2 WHERE now() > time; ---Testcase 71: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE now() > time; - ---Testcase 72: -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; ---Testcase 73: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; - --- InfluxDB does not seem to support time column + interval, so below query returns empty result --- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; --- EXPLAIN (VERBOSE, COSTS OFF) --- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; - --- InfluxDB does not support month or year interval, so not push down ---Testcase 74: -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; ---Testcase 75: -EXPLAIN VERBOSE -SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; - ---Testcase 76: -SELECT * FROM t2 WHERE (fields->>'value1')::int = ANY (ARRAY(SELECT (fields->>'value1')::int FROM t1 WHERE (fields->>'value1')::int < 1000)); - --- ANY with ARRAY expression ---Testcase 77: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, (fields->>'a')::int + 1]); ---Testcase 78: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, (fields->>'a')::int + 1]); - ---Testcase 79: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, (fields->>'a')::int + 1]); ---Testcase 80: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, (fields->>'a')::int + 1]); - ---Testcase 81: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, (fields->>'a')::int + 1]); ---Testcase 82: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, (fields->>'a')::int + 1]); - ---Testcase 83: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, (fields->>'a')::int + 1]); ---Testcase 84: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, (fields->>'a')::int + 1]); - ---Testcase 85: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, (fields->>'a')::int + 1]); ---Testcase 86: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, (fields->>'a')::int + 1]); - ---Testcase 87: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, (fields->>'a')::int + 1]); ---Testcase 88: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, (fields->>'a')::int + 1]); - --- ANY with ARRAY const ---Testcase 89: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, 2]); ---Testcase 90: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, 2]); - ---Testcase 91: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, 2]); ---Testcase 92: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, 2]); - ---Testcase 93: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, 2]); ---Testcase 94: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, 2]); - ---Testcase 95: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, 2]); ---Testcase 96: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, 2]); - ---Testcase 97: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, 2]); ---Testcase 98: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, 2]); - ---Testcase 99: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, 2]); ---Testcase 100: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, 2]); - ---Testcase 101: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY('{1, 2, 3}'); ---Testcase 102: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY('{1, 2, 3}'); ---Testcase 103: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY('{1, 2, 3}'); ---Testcase 104: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY('{1, 2, 3}'); - --- ALL with ARRAY expression ---Testcase 105: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, (fields->>'a')::int * 1]); ---Testcase 106: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, (fields->>'a')::int * 1]); - ---Testcase 107: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, (fields->>'a')::int + 1]); ---Testcase 108: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, (fields->>'a')::int + 1]); - ---Testcase 109: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, (fields->>'a')::int / 1]); ---Testcase 110: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, (fields->>'a')::int / 1]); - ---Testcase 111: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, (fields->>'a')::int + 1]); ---Testcase 112: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, (fields->>'a')::int + 1]); - ---Testcase 113: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[1, (fields->>'a')::int - 1]); ---Testcase 114: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[1, (fields->>'a')::int - 1]); - ---Testcase 115: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, (fields->>'a')::int + 1]); ---Testcase 116: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, (fields->>'a')::int + 1]); - --- ALL with ARRAY const ---Testcase 117: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, 1]); ---Testcase 118: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, 1]); - ---Testcase 119: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, 3]); ---Testcase 120: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, 3]); - ---Testcase 121: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, 2]); ---Testcase 122: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, 2]); - ---Testcase 123: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, 2]); ---Testcase 124: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, 2]); - ---Testcase 125: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[0, 1]); ---Testcase 126: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[0, 1]); - ---Testcase 127: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, 3]); ---Testcase 128: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, 3]); - --- ANY/ALL with TEXT ARRAY const ---Testcase 129: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' = ANY(ARRAY['One', 'Two']); ---Testcase 130: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' = ANY(ARRAY['One', 'Two']); - ---Testcase 131: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' <> ALL(ARRAY['One', 'Four']); ---Testcase 132: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' <> ALL(ARRAY['One', 'Four']); - ---Testcase 133: -EXPLAIN VERBOSE -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ANY(ARRAY['One', 'Two']); ---Testcase 134: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ANY(ARRAY['One', 'Two']); - ---Testcase 135: -EXPLAIN VERBOSE -SELECT * FROM numbers WHERE fields->>'b' > ALL(ARRAY['Four', 'Five']); ---Testcase 136: -SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ALL(ARRAY['Four', 'Five']); - ---Testcase 137: -DROP FOREIGN TABLE numbers; - ---Testcase 138: -ALTER SERVER server1 OPTIONS (SET dbname 'no such database'); ---Testcase 139: -SELECT * FROM t1; ---Testcase 140: -ALTER SERVER server1 OPTIONS (SET dbname 'mydb'); ---Testcase 141: -SELECT * FROM t1; - --- map time column to both timestamp and text ---Testcase 142: -CREATE FOREIGN TABLE t5(t timestamp OPTIONS (column_name 'time'), tag1 text OPTIONS (column_name 'time'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true'); ---Testcase 143: -SELECT * FROM t5; - ---get version ---Testcase 144: -\df influxdb_fdw* ---Testcase 145: -SELECT * FROM public.influxdb_fdw_version(); ---Testcase 146: -SELECT influxdb_fdw_version(); ---Test pushdown LIMIT...OFFSET ---Testcase 147: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; - ---Testcase 148: -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; - ---Testcase 149: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; - ---Testcase 150: -SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; - ---Testcase 151: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; - ---Testcase 152: -SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; - ---Testcase 153: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; - ---Testcase 154: -SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; - ---Testcase 155: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM - t1 - LEFT JOIN t2 - ON (t2.fields->>'value1')::int = 123, - LATERAL (SELECT (t2.fields->>'value1')::int value1, t1.tags->>'tag1' tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss -WHERE (t1.fields->>'value1')::int = ss.value1; - ---Testcase 156: -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM - t1 - LEFT JOIN t2 - ON (t2.fields->>'value1')::int = 123, - LATERAL (SELECT (t2.fields->>'value1')::int value1, t1.tags->>'tag1' tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss1, - LATERAL (SELECT ss1.* from t3 LIMIT 1 OFFSET 20) AS ss2 -WHERE (t1.fields->>'value1')::int = ss2.value1; - ---Testcase 157: -DROP FOREIGN TABLE cpu; ---Testcase 158: -DROP FOREIGN TABLE t1; ---Testcase 159: -DROP FOREIGN TABLE t2; ---Testcase 160: -DROP FOREIGN TABLE t3; ---Testcase 161: -DROP FOREIGN TABLE t4; ---Testcase 162: -DROP FOREIGN TABLE t5; ---Testcase 163: -DROP FOREIGN TABLE tx; - --- test INSERT, DELETE -IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); -CREATE FOREIGN TABLE cpu_nsc (time timestamp with time zone, time_text text, tag1 text, tag2 text, value1 int, value2 float, value3 text, value4 boolean) SERVER server1 OPTIONS (table 'cpu', tags 'tag1, tag2'); ---Testcase 164: -SELECT * FROM cpu; ---Testcase 165: -EXPLAIN VERBOSE -INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test1', true); ---Testcase 166: -INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test', true); ---Testcase 167: -SELECT * FROM cpu; - ---Testcase 168: -EXPLAIN VERBOSE -INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), - ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); ---Testcase 169: -INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), - ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); ---Testcase 170: -SELECT * FROM cpu; - ---Testcase 171: -INSERT INTO cpu_nsc(tag2, value1) VALUES('tag2_KH', 400); ---Testcase 172: -SELECT tags->>'tag1' tag1, tags->>'tag2' tag2, (fields->>'value1')::bigint value1, (fields->>'value2')::double precision value2, fields->>'value3' value3, (fields->>'value4')::boolean value4 FROM cpu; - ---Testcase 173: -EXPLAIN VERBOSE -DELETE FROM cpu_nsc WHERE tag2 = 'tag2_KH'; ---Testcase 174: -DELETE FROM cpu_nsc WHERE tag2 = 'tag2_KH'; ---Testcase 175: -SELECT tags->>'tag1' tag1, tags->>'tag2' tag2, (fields->>'value1')::bigint value1, (fields->>'value2')::double precision value2, fields->>'value3' value3, (fields->>'value4')::boolean value4 FROM cpu; - ---Testcase 176: -EXPLAIN VERBOSE -DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; ---Testcase 177: -DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; ---Testcase 178: -SELECT * FROM cpu; - ---Testcase 179: -EXPLAIN VERBOSE -DELETE FROM cpu_nsc WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; ---Testcase 180: -DELETE FROM cpu_nsc WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; ---Testcase 181: -SELECT * FROM cpu; - --- Test INSERT, DELETE with time_text column ---Testcase 182: -INSERT INTO cpu_nsc(time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02T00:00:00Z', 'tag1_D', 'tag2_E', 600, 20.2, 'test3', true); ---Testcase 183: -SELECT * FROM cpu; - ---Testcase 184: -INSERT INTO cpu_nsc(time_text, tag1, value2) VALUES('2021-02-02T00:00:00.123456789Z', 'tag1_P', 25.8); ---Testcase 185: -SELECT * FROM cpu; - ---Testcase 186: -INSERT INTO cpu_nsc(time_text, tag1, value2) VALUES('2021-02-02 00:00:01', 'tag1_J', 37.1); ---Testcase 187: -SELECT * FROM cpu; - ---Testcase 188: -INSERT INTO cpu_nsc(time, time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02 00:00:01+05', '2021-02-02T00:00:02.123456789Z', 'tag1_A', 'tag2_B', 200, 5.5, 'test', true); ---Testcase 189: -SELECT * FROM cpu; - ---Testcase 190: -INSERT INTO cpu_nsc(time_text, time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-03T00:00:03.123456789Z', '2021-03-03 00:00:01+07', 'tag1_C', 'tag2_D', 200, 5.5, 'test', true); ---Testcase 191: -SELECT * FROM cpu; - ---Testcase 192: -EXPLAIN VERBOSE -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:00.123456789Z'; ---Testcase 193: -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:00.123456789Z'; ---Testcase 194: -SELECT * FROM cpu; - ---Testcase 195: -EXPLAIN VERBOSE -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; ---Testcase 196: -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; ---Testcase 197: -SELECT * FROM cpu; - ---Testcase 198: -EXPLAIN VERBOSE -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; ---Testcase 199: -DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; ---Testcase 200: -SELECT * FROM cpu; - --- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null - ---Testcase 201: -DROP FOREIGN TABLE cpu_nsc; -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 202: -DROP SERVER server1 CASCADE; ---Testcase 203: -DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/schemaless/schemaless.sql b/sql/14.0/schemaless/schemaless.sql deleted file mode 100644 index e9f49bf..0000000 --- a/sql/14.0/schemaless/schemaless.sql +++ /dev/null @@ -1,357 +0,0 @@ ---Testcase 1: -SET datestyle=ISO; --- timestamp with time zone differs based on this ---Testcase 2: -SET timezone='Japan'; - -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 3: -DROP EXTENSION IF EXISTS influxdb_fdw CASCADE; - ---Testcase 4: -CREATE EXTENSION influxdb_fdw CASCADE; - ---Testcase 5: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); - ---Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - --- create foreign table ---Testcase 7: -CREATE FOREIGN TABLE sc1(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc1', tags 'device_id', schemaless 'true'); ---Testcase 8: -CREATE FOREIGN TABLE sc2(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc2', tags 'device_id', schemaless 'true'); - ---Testcase 9: -DROP FOREIGN TABLE sc1; ---Testcase 10: -DROP FOREIGN TABLE sc2; --- import foreign table -IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO public OPTIONS (schemaless 'true'); ---Testcase 11: -ALTER FOREIGN TABLE sc2 RENAME COLUMN fields TO fields2; ---Testcase 12: -ALTER FOREIGN TABLE sc2 RENAME COLUMN tags TO tags2; - --- baserel * ---Testcase 13: -EXPLAIN VERBOSE -SELECT * FROM sc1; - ---Testcase 14: -SELECT * FROM sc1; - --- baserel all column names ---Testcase 15: -EXPLAIN VERBOSE -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - ---Testcase 16: -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - --- baserel time only ---Testcase 17: -EXPLAIN VERBOSE -SELECT time FROM sc1; - ---Testcase 18: -SELECT time FROM sc1; - --- baserel tag only ---Testcase 19: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id FROM sc1; - ---Testcase 20: -SELECT tags->>'device_id' device_id FROM sc1; - --- baserel field only ---Testcase 21: -EXPLAIN VERBOSE -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - ---Testcase 22: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - --- baserel tag+field ---Testcase 23: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - ---Testcase 24: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; - --- baserel * (remote restrict only) ---Testcase 25: -EXPLAIN VERBOSE -SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - ---Testcase 26: -SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - --- baserel all (remote restrict only) ---Testcase 27: -EXPLAIN VERBOSE -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - ---Testcase 28: -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - --- baserel field only (remote restrict only) ---Testcase 29: -EXPLAIN VERBOSE -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - ---Testcase 30: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - --- baserel tag+field (remote restrict only) ---Testcase 31: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - ---Testcase 32: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - --- baserel tag+field(except restrict var) (remote restrict only) ---Testcase 33: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - ---Testcase 34: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; - --- baserel * (local restrict only) ---Testcase 35: -EXPLAIN VERBOSE -SELECT * FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - ---Testcase 36: -SELECT * FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - --- baserel all (local restrict only) ---Testcase 37: -EXPLAIN VERBOSE -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - ---Testcase 38: -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - --- baserel field only (local restrict only) ---Testcase 39: -EXPLAIN VERBOSE -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - ---Testcase 40: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - --- baserel tag+field (local restrict only) ---Testcase 41: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - ---Testcase 42: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - --- baserel tag+field(except local restrict var) (local restrict only) ---Testcase 43: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - ---Testcase 44: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; - --- baserel * (both restricts) ---Testcase 45: -EXPLAIN VERBOSE -SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - ---Testcase 46: -SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - --- baserel all (both restricts) ---Testcase 47: -EXPLAIN VERBOSE -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - ---Testcase 48: -SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - --- baserel field only (both restricts) ---Testcase 49: -EXPLAIN VERBOSE -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - ---Testcase 50: -SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - --- baserel tag+field (both restricts) ---Testcase 51: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - ---Testcase 52: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - --- baserel tag+field(except local restrict var) (both restricts) ---Testcase 53: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - ---Testcase 54: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - --- baserel tag+field(except remote restrict var) (both restricts) ---Testcase 55: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - ---Testcase 56: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - --- baserel tag+field(except local and remote restrict var) (both restricts) ---Testcase 57: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - ---Testcase 58: -SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; - --- aggregate sum (remote) ---Testcase 59: -EXPLAIN VERBOSE -SELECT sum((fields->>'sig1')::bigint),sum((fields->>'sig3')::double precision) FROM sc1; - ---Testcase 60: -SELECT sum((fields->>'sig1')::bigint),sum((fields->>'sig3')::double precision) FROM sc1; - --- aggregate count (remote) ---Testcase 61: -EXPLAIN VERBOSE -SELECT count(fields->>'sig1'),count(fields->>'sig2'),count(fields->>'sig3'),count(fields->>'sig4') FROM sc1; - ---Testcase 62: -SELECT count(fields->>'sig1'),count(fields->>'sig2'),count(fields->>'sig3'),count(fields->>'sig4') FROM sc1; - --- aggregate avg (local) ---Testcase 63: -EXPLAIN VERBOSE -SELECT avg((fields->>'sig1')::bigint),avg((fields->>'sig3')::double precision) FROM sc1; - ---Testcase 64: -SELECT avg((fields->>'sig1')::bigint),avg((fields->>'sig3')::double precision) FROM sc1; - --- aggregate sum (remote) + tag + group by ---Testcase 65: -EXPLAIN VERBOSE -SELECT sum((fields->>'sig1')::bigint),tags->>'device_id' device_id FROM sc1 GROUP BY tags->>'device_id'; - ---Testcase 66: -SELECT sum((fields->>'sig1')::bigint),tags->>'device_id' device_id FROM sc1 GROUP BY tags->>'device_id'; - --- aggregate sum (remote) + tag + group by time ---Testcase 67: -EXPLAIN VERBOSE -SELECT sum((fields->>'sig1')::bigint) FROM sc1 WHERE time >= to_timestamp(0) AND time <= to_timestamp(2) GROUP BY influx_time(time, interval '1s'); - ---Testcase 68: -SELECT sum((fields->>'sig1')::bigint) FROM sc1 WHERE time >= to_timestamp(0) AND time <= to_timestamp(2) GROUP BY influx_time(time, interval '1s'); - --- aggreagte sum (remote) + tag + group by time ---Testcase 69: -EXPLAIN VERBOSE -SELECT tags->>'device_id' device_id,sum((fields->>'sig1')::bigint),fields->>'sid' sid FROM sc3 GROUP BY fields->>'sid', tags->>'device_id'; - ---Testcase 70: -SELECT tags->>'device_id' device_id,sum((fields->>'sig1')::bigint),fields->>'sid' sid FROM sc3 GROUP BY fields->>'sid', tags->>'device_id'; - --- fucntion (remote) ---Testcase 71: -EXPLAIN VERBOSE -SELECT sqrt((fields->>'sig1')::bigint) FROM sc1; - ---Testcase 72: -SELECT sqrt((fields->>'sig1')::bigint) FROM sc1; - --- sparse data - baserel field only ---Testcase 73: -EXPLAIN VERBOSE -SELECT (fields->>'sig')::double precision sig FROM sc4; - ---Testcase 74: -SELECT (fields->>'sig')::double precision sig FROM sc4; - --- sparse data - baserel filed + remote restrict - no result by filter ---Testcase 75: -EXPLAIN VERBOSE -SELECT (fields->>'sig')::double precision sig FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); - ---Testcase 76: -SELECT (fields->>'sig')::double precision sig FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); - --- sparse data - aggreate avg (local) + remote restrict - ? ---Testcase 77: -EXPLAIN VERBOSE -SELECT avg((fields->>'sig')::double precision) FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); - ---Testcase 78: -SELECT avg((fields->>'sig')::double precision) FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); - --- aggregate sum (remote) and avg (local) ---Testcase 79: -EXPLAIN VERBOSE -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig1')::bigint) FROM sc1; - ---Testcase 80: -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig1')::bigint) FROM sc1; - --- aggregate sum (remote) and avg (local) different remote column ---Testcase 81: -EXPLAIN VERBOSE -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) FROM sc1; - ---Testcase 82: -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) FROM sc1; - --- aggregate sum (remote) and avg (local) having non existed remote column ---Testcase 83: -EXPLAIN VERBOSE -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig')::double precision) FROM sc1; - ---Testcase 84: -SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig')::double precision) FROM sc1; - --- aggregate sum (remote) + field + group by(field) + order by(field) - no pushdown for aggregation ---Testcase 85: -EXPLAIN VERBOSE -SELECT sum((fields->>'sig1')::bigint),(fields->>'sig1')::bigint sig1 FROM sc1 GROUP BY (fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; - ---Testcase 86: -SELECT sum((fields->>'sig1')::bigint),(fields->>'sig1')::bigint sig1 FROM sc1 GROUP BY (fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; - ---Testcase 87: -EXPLAIN VERBOSE -SELECT count(*) FROM (SELECT (fields->>'sig1')::bigint sig1 FROM sc1) sc; - ---Testcase 88: -SELECT count(*) FROM (SELECT (fields->>'sig1')::bigint sig1 FROM sc1) sc; - --- drop extension ---Testcase 89: -DROP FOREIGN TABLE sc1; ---Testcase 90: -DROP FOREIGN TABLE sc2; ---Testcase 91: -DROP FOREIGN TABLE sc3; ---Testcase 92: -DROP FOREIGN TABLE sc4; ---Testcase 93: -DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 94: -DROP SERVER influxdb_svr; ---Testcase 95: -DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/schemaless/selectfunc.sql b/sql/14.0/schemaless/selectfunc.sql deleted file mode 100644 index 4a157e2..0000000 --- a/sql/14.0/schemaless/selectfunc.sql +++ /dev/null @@ -1,4049 +0,0 @@ ---Testcase 1: -SET datestyle=ISO; ---Testcase 2: -SET timezone='Japan'; - -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - ---IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); ---Testcase 6: -CREATE FOREIGN TABLE s3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 's3', tags 'tag1', schemaless 'true'); - --- s3 (value1 as float8, value2 as bigint) ---Testcase 7: -\d s3; ---Testcase 8: -SELECT * FROM s3; - --- select float8() (not pushdown, remove float8, explain) ---Testcase 9: -EXPLAIN VERBOSE -SELECT float8(fields->>'value1'), float8(fields->>'value2'), float8(fields->>'value3'), float8(fields->>'value4') FROM s3; - --- select float8() (not pushdown, remove float8, result) ---Testcase 10: -SELECT float8(fields->>'value1'), float8(fields->>'value2'), float8(fields->>'value3'), float8(fields->>'value4') FROM s3; - --- select sqrt (builtin function, explain) ---Testcase 11: -EXPLAIN VERBOSE -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3; - --- select sqrt (builtin function, result) ---Testcase 12: -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3; - --- select sqrt (builtin function, not pushdown constraints, explain) ---Testcase 13: -EXPLAIN VERBOSE -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select sqrt (builtin function, not pushdown constraints, result) ---Testcase 14: -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select sqrt (builtin function, pushdown constraints, explain) ---Testcase 15: -EXPLAIN VERBOSE -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select sqrt (builtin function, pushdown constraints, result) ---Testcase 16: -SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select sqrt(*) (stub agg function, explain) ---Testcase 17: -EXPLAIN VERBOSE -SELECT sqrt_all() from s3; - --- select sqrt(*) (stub agg function, result) ---Testcase 18: -SELECT sqrt_all() from s3; - --- select sqrt(*) (stub agg function and group by tag only) (explain) ---Testcase 19: -EXPLAIN VERBOSE -SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select sqrt(*) (stub agg function and group by tag only) (result) ---Testcase 20: -SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select abs (builtin function, explain) ---Testcase 21: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3; - --- ABS() returns negative values if integer (https://github.com/influxdata/influxdb/issues/10261) --- select abs (builtin function, result) ---Testcase 22: -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3; - --- select abs (builtin function, not pushdown constraints, explain) ---Testcase 23: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select abs (builtin function, not pushdown constraints, result) ---Testcase 24: -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select abs (builtin function, pushdown constraints, explain) ---Testcase 25: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select abs (builtin function, pushdown constraints, result) ---Testcase 26: -SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select log (builtin function, need to swap arguments, numeric cast, explain) --- log_(v) : postgresql (base, v), influxdb (v, base) ---Testcase 27: -EXPLAIN VERBOSE -SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - --- select log (builtin function, need to swap arguments, numeric cast, result) ---Testcase 28: -SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - --- select log (builtin function, need to swap arguments, float8, explain) ---Testcase 29: -EXPLAIN VERBOSE -SELECT log((fields->>'value1')::numeric, 0.1) FROM s3 WHERE (fields->>'value1')::float != 1; - --- select log (builtin function, need to swap arguments, float8, result) ---Testcase 30: -SELECT log((fields->>'value1')::numeric, 0.1) FROM s3 WHERE (fields->>'value1')::float != 1; - --- select log (builtin function, need to swap arguments, bigint, explain) ---Testcase 31: -EXPLAIN VERBOSE -SELECT log((fields->>'value2')::numeric, 3::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - --- select log (builtin function, need to swap arguments, bigint, result) ---Testcase 32: -SELECT log((fields->>'value2')::numeric, 3::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - --- select log (builtin function, need to swap arguments, mix type, explain) ---Testcase 33: -EXPLAIN VERBOSE -SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - --- select log (builtin function, need to swap arguments, mix type, result) ---Testcase 34: -SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; - --- select log(*) (stub agg function, explain) ---Testcase 35: -EXPLAIN VERBOSE -SELECT log_all(50) FROM s3; - --- select log(*) (stub agg function, result) ---Testcase 36: -SELECT log_all(50) FROM s3; - --- select log(*) (stub agg function, explain) ---Testcase 37: -EXPLAIN VERBOSE -SELECT log_all(70.5) FROM s3; - --- select log(*) (stub agg function, result) ---Testcase 38: -SELECT log_all(70.5) FROM s3; - --- select log(*) (stub agg function and group by tag only) (explain) ---Testcase 39: -EXPLAIN VERBOSE -SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select log(*) (stub agg function and group by tag only) (result) ---Testcase 40: -SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 41: -SELECT ln_all(),log10_all(),log_all(50) FROM s3; - --- select log2 (stub function, explain) ---Testcase 42: -EXPLAIN VERBOSE -SELECT log2((fields->>'value1')::float),log2((fields->>'value2')::bigint) FROM s3; - --- select log2 (stub function, result) ---Testcase 43: -SELECT log2((fields->>'value1')::float),log2((fields->>'value2')::bigint) FROM s3; - --- select log2(*) (stub agg function, explain) ---Testcase 44: -EXPLAIN VERBOSE -SELECT log2_all() from s3; - --- select log2(*) (stub agg function, result) ---Testcase 45: -SELECT log2_all() from s3; - --- select log2(*) (stub agg function and group by tag only) (explain) ---Testcase 46: -EXPLAIN VERBOSE -SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select log2(*) (stub agg function and group by tag only) (result) ---Testcase 47: -SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select log10 (stub function, explain) ---Testcase 48: -EXPLAIN VERBOSE -SELECT log10((fields->>'value1')::float),log10((fields->>'value2')::bigint) FROM s3; - --- select log10 (stub function, result) ---Testcase 49: -SELECT log10((fields->>'value1')::float),log10((fields->>'value2')::bigint) FROM s3; - --- select log10(*) (stub agg function, explain) ---Testcase 50: -EXPLAIN VERBOSE -SELECT log10_all() from s3; - --- select log10(*) (stub agg function, result) ---Testcase 51: -SELECT log10_all() from s3; - --- select log10(*) (stub agg function and group by tag only) (explain) ---Testcase 52: -EXPLAIN VERBOSE -SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select log10(*) (stub agg function and group by tag only) (result) ---Testcase 53: -SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 54: -SELECT log2_all(), log10_all() FROM s3; - --- select spread (stub agg function, explain) ---Testcase 55: -EXPLAIN VERBOSE -SELECT spread((fields->>'value1')::float),spread((fields->>'value2')::bigint),spread((fields->>'value3')::float),spread((fields->>'value4')::bigint) FROM s3; - --- select spread (stub agg function, result) ---Testcase 56: -SELECT spread((fields->>'value1')::float),spread((fields->>'value2')::bigint),spread((fields->>'value3')::float),spread((fields->>'value4')::bigint) FROM s3; - --- select spread (stub agg function, raise exception if not expected type) ---Testcase 57: -SELECT spread((fields->>'value1')::numeric),spread((fields->>'value2')::numeric),spread((fields->>'value3')::numeric),spread((fields->>'value4')::numeric) FROM s3; - --- select abs as nest function with agg (pushdown, explain) ---Testcase 58: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),abs(sum((fields->>'value3')::float)) FROM s3; - --- select abs as nest function with agg (pushdown, result) ---Testcase 59: -SELECT sum((fields->>'value3')::float),abs(sum((fields->>'value3')::float)) FROM s3; - --- select abs as nest with log2 (pushdown, explain) ---Testcase 60: -EXPLAIN VERBOSE -SELECT abs(log2((fields->>'value1')::float)),abs(log2(1/(fields->>'value1')::float)) FROM s3; - --- select abs as nest with log2 (pushdown, result) ---Testcase 61: -SELECT abs(log2((fields->>'value1')::float)),abs(log2(1/(fields->>'value1')::float)) FROM s3; - --- select abs with non pushdown func and explicit constant (explain) ---Testcase 62: -EXPLAIN VERBOSE -SELECT abs((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select abs with non pushdown func and explicit constant (result) ---Testcase 63: -SELECT abs((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select sqrt as nest function with agg and explicit constant (pushdown, explain) ---Testcase 64: -EXPLAIN VERBOSE -SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1 FROM s3; - --- select sqrt as nest function with agg and explicit constant (pushdown, result) ---Testcase 65: -SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1 FROM s3; - --- select sqrt as nest function with agg and explicit constant and tag (error, explain) ---Testcase 66: -EXPLAIN VERBOSE -SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1, tags->>'tag1' tag1 FROM s3; - --- select spread (stub agg function and group by influx_time() and tag) (explain) ---Testcase 67: -EXPLAIN VERBOSE -SELECT spread((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select spread (stub agg function and group by influx_time() and tag) (result) ---Testcase 68: -SELECT spread((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select spread (stub agg function and group by tag only) (result) ---Testcase 69: -SELECT tags->>'tag1' tag1,spread((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select spread (stub agg function and other aggs) (result) ---Testcase 70: -SELECT sum((fields->>'value1')::float),spread((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; - --- select abs with order by (explain) ---Testcase 71: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by abs(1-(fields->>'value1')::float); - --- select abs with order by (result) ---Testcase 72: -SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by abs(1-(fields->>'value1')::float); - --- select abs with order by index (result) ---Testcase 73: -SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by 2,1; - --- select abs with order by index (result) ---Testcase 74: -SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by 1,2; - --- select abs and as ---Testcase 75: -SELECT abs((fields->>'value3')::float) as abs1 FROM s3; - --- select abs(*) (stub agg function, explain) ---Testcase 76: -EXPLAIN VERBOSE -SELECT abs_all() from s3; - --- select abs(*) (stub agg function, result) ---Testcase 77: -SELECT abs_all() from s3; - --- select abs(*) (stub agg function and group by tag only) (explain) ---Testcase 78: -EXPLAIN VERBOSE -SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select abs(*) (stub agg function and group by tag only) (result) ---Testcase 79: -SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select abs(*) (stub agg function, expose data, explain) ---Testcase 80: -EXPLAIN VERBOSE -SELECT (abs_all()::s3).* from s3; - --- select abs(*) (stub agg function, expose data, result) ---Testcase 81: -SELECT (abs_all()::s3).* from s3; - --- select spread over join query (explain) ---Testcase 82: -EXPLAIN VERBOSE -SELECT spread((t1.fields->>'value1')::float), spread((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select spread over join query (result, stub call error) ---Testcase 83: -SELECT spread((t1.fields->>'value1')::float), spread((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select spread with having (explain) ---Testcase 84: -EXPLAIN VERBOSE -SELECT spread((fields->>'value1')::float) FROM s3 HAVING spread((fields->>'value1')::float) > 100; - --- select spread with having (result, not pushdown, stub call error) ---Testcase 85: -SELECT spread((fields->>'value1')::float) FROM s3 HAVING spread((fields->>'value1')::float) > 100; - --- select spread(*) (stub agg function, explain) ---Testcase 86: -EXPLAIN VERBOSE -SELECT spread_all(*) from s3; - --- select spread(*) (stub agg function, result) ---Testcase 87: -SELECT spread_all(*) from s3; - --- select spread(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 88: -EXPLAIN VERBOSE -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select spread(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 89: -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select spread(*) (stub agg function and group by tag only) (explain) ---Testcase 90: -EXPLAIN VERBOSE -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select spread(*) (stub agg function and group by tag only) (result) ---Testcase 91: -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select spread(*) (stub agg function, expose data, explain) ---Testcase 92: -EXPLAIN VERBOSE -SELECT (spread_all(*)::s3).* from s3; - --- select spread(*) (stub agg function, expose data, result) ---Testcase 93: -SELECT (spread_all(*)::s3).* from s3; - --- select spread(regex) (stub agg function, explain) ---Testcase 94: -EXPLAIN VERBOSE -SELECT spread('/value[1,4]/') from s3; - --- select spread(regex) (stub agg function, result) ---Testcase 95: -SELECT spread('/value[1,4]/') from s3; - --- select spread(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 96: -EXPLAIN VERBOSE -SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select spread(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 97: -SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select spread(regex) (stub agg function and group by tag only) (explain) ---Testcase 98: -EXPLAIN VERBOSE -SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select spread(regex) (stub agg function and group by tag only) (result) ---Testcase 99: -SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select spread(regex) (stub agg function, expose data, explain) ---Testcase 100: -EXPLAIN VERBOSE -SELECT (spread('/value[1,4]/')::s3).* from s3; - --- select spread(regex) (stub agg function, expose data, result) ---Testcase 101: -SELECT (spread('/value[1,4]/')::s3).* from s3; - --- select abs with arithmetic and tag in the middle (explain) ---Testcase 102: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float) + 1, (fields->>'value2')::bigint value2, tags->>'tag1' tag1, sqrt((fields->>'value2')::bigint) FROM s3; - --- select abs with arithmetic and tag in the middle (result) ---Testcase 103: -SELECT abs((fields->>'value1')::float) + 1, (fields->>'value2')::bigint value2, tags->>'tag1' tag1, sqrt((fields->>'value2')::bigint) FROM s3; - --- select with order by limit (explain) ---Testcase 104: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float), abs((fields->>'value3')::float), sqrt((fields->>'value2')::bigint) FROM s3 ORDER BY abs((fields->>'value3')::float) LIMIT 1; - --- select with order by limit (result) ---Testcase 105: -SELECT abs((fields->>'value1')::float), abs((fields->>'value3')::float), sqrt((fields->>'value2')::bigint) FROM s3 ORDER BY abs((fields->>'value3')::float) LIMIT 1; - --- select mixing with non pushdown func (all not pushdown, explain) ---Testcase 106: -EXPLAIN VERBOSE -SELECT abs((fields->>'value1')::float), sqrt((fields->>'value2')::bigint), upper(tags->>'tag1') FROM s3; - --- select mixing with non pushdown func (result) ---Testcase 107: -SELECT abs((fields->>'value1')::float), sqrt((fields->>'value2')::bigint), upper(tags->>'tag1') FROM s3; - --- nested function in where clause (explain) ---Testcase 108: -EXPLAIN VERBOSE -SELECT sqrt(abs((fields->>'value3')::float)),min((fields->>'value1')::float) FROM s3 GROUP BY fields->>'value3' HAVING sqrt(abs((fields->>'value3')::float)) > 0 ORDER BY 1,2; - --- nested function in where clause (result) ---Testcase 109: -SELECT sqrt(abs((fields->>'value3')::float)),min((fields->>'value1')::float) FROM s3 GROUP BY fields->>'value3' HAVING sqrt(abs((fields->>'value3')::float)) > 0 ORDER BY 1,2; - ---Testcase 110: -EXPLAIN VERBOSE -SELECT first(time, (fields->>'value1')::float), first(time, (fields->>'value2')::bigint), first(time, (fields->>'value3')::float), first(time, (fields->>'value4')::bigint) FROM s3; - ---Testcase 111: -SELECT first(time, (fields->>'value1')::float), first(time, (fields->>'value2')::bigint), first(time, (fields->>'value3')::float), first(time, (fields->>'value4')::bigint) FROM s3; - --- select first(*) (stub agg function, explain) ---Testcase 112: -EXPLAIN VERBOSE -SELECT first_all(*) from s3; - --- select first(*) (stub agg function, result) ---Testcase 113: -SELECT first_all(*) from s3; - --- select first(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 114: -EXPLAIN VERBOSE -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select first(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 115: -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select first(*) (stub agg function and group by tag only) (explain) ---Testcase 116: -EXPLAIN VERBOSE -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select first(*) (stub agg function and group by tag only) (result) ---Testcase 117: -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select first(*) (stub agg function, expose data, explain) ---Testcase 118: -EXPLAIN VERBOSE -SELECT (first_all(*)::s3).* from s3; - --- select first(*) (stub agg function, expose data, result) ---Testcase 119: -SELECT (first_all(*)::s3).* from s3; - --- select first(regex) (stub function, explain) ---Testcase 120: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/') from s3; - --- select first(regex) (stub function, explain) ---Testcase 121: -SELECT first('/value[1,4]/') from s3; - --- select multiple regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 122: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; - --- select multiple regex functions (do not push down, raise warning and stub error) (result) ---Testcase 123: -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; - --- select first(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 124: -EXPLAIN VERBOSE -SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select first(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 125: -SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select first(regex) (stub agg function and group by tag only) (explain) ---Testcase 126: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select first(regex) (stub agg function and group by tag only) (result) ---Testcase 127: -SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select first(regex) (stub agg function, expose data, explain) ---Testcase 128: -EXPLAIN VERBOSE -SELECT (first('/value[1,4]/')::s3).* from s3; - --- select first(regex) (stub agg function, expose data, result) ---Testcase 129: -SELECT (first('/value[1,4]/')::s3).* from s3; - ---Testcase 130: -EXPLAIN VERBOSE -SELECT last(time, (fields->>'value1')::float), last(time, (fields->>'value2')::bigint), last(time, (fields->>'value3')::float), last(time, (fields->>'value4')::bigint) FROM s3; - ---Testcase 131: -SELECT last(time, (fields->>'value1')::float), last(time, (fields->>'value2')::bigint), last(time, (fields->>'value3')::float), last(time, (fields->>'value4')::bigint) FROM s3; - --- select last(*) (stub agg function, explain) ---Testcase 132: -EXPLAIN VERBOSE -SELECT last_all(*) from s3; - --- select last(*) (stub agg function, result) ---Testcase 133: -SELECT last_all(*) from s3; - --- select last(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 134: -EXPLAIN VERBOSE -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select last(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 135: -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select last(*) (stub agg function and group by tag only) (explain) ---Testcase 136: -EXPLAIN VERBOSE -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select last(*) (stub agg function and group by tag only) (result) ---Testcase 137: -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select last(*) (stub agg function, expose data, explain) ---Testcase 138: -EXPLAIN VERBOSE -SELECT (last_all(*)::s3).* from s3; - --- select last(*) (stub agg function, expose data, result) ---Testcase 139: -SELECT (last_all(*)::s3).* from s3; - --- select last(regex) (stub function, explain) ---Testcase 140: -EXPLAIN VERBOSE -SELECT last('/value[1,4]/') from s3; - --- select last(regex) (stub function, result) ---Testcase 141: -SELECT last('/value[1,4]/') from s3; - --- select multiple regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 142: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; - --- select multiple regex functions (do not push down, raise warning and stub error) (result) ---Testcase 143: -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; - --- select last(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 144: -EXPLAIN VERBOSE -SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select last(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 145: -SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select last(regex) (stub agg function and group by tag only) (explain) ---Testcase 146: -EXPLAIN VERBOSE -SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select last(regex) (stub agg function and group by tag only) (result) ---Testcase 147: -SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select last(regex) (stub agg function, expose data, explain) ---Testcase 148: -EXPLAIN VERBOSE -SELECT (last('/value[1,4]/')::s3).* from s3; - --- select last(regex) (stub agg function, expose data, result) ---Testcase 149: -SELECT (last('/value[1,4]/')::s3).* from s3; - ---Testcase 150: -EXPLAIN VERBOSE -SELECT sample((fields->>'value2')::bigint, 3) FROM s3 WHERE (fields->>'value2')::bigint < 200; - ---Testcase 151: -SELECT sample((fields->>'value2')::bigint, 3) FROM s3 WHERE (fields->>'value2')::bigint < 200; - ---Testcase 152: -EXPLAIN VERBOSE -SELECT sample((fields->>'value2')::bigint, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); - ---Testcase 153: -SELECT sample((fields->>'value2')::bigint, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); - --- select sample(*, int) (stub agg function, explain) ---Testcase 154: -EXPLAIN VERBOSE -SELECT sample_all(50) from s3; - --- select sample(*, int) (stub agg function, result) ---Testcase 155: -SELECT sample_all(50) from s3; - --- select sample(*, int) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 156: -EXPLAIN VERBOSE -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select sample(*, int) (stub agg function and group by influx_time() and tag) (result) ---Testcase 157: -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select sample(*, int) (stub agg function and group by tag only) (explain) ---Testcase 158: -EXPLAIN VERBOSE -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select sample(*, int) (stub agg function and group by tag only) (result) ---Testcase 159: -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select sample(*, int) (stub agg function, expose data, explain) ---Testcase 160: -EXPLAIN VERBOSE -SELECT (sample_all(50)::s3).* from s3; - --- select sample(*, int) (stub agg function, expose data, result) ---Testcase 161: -SELECT (sample_all(50)::s3).* from s3; - --- select sample(regex) (stub agg function, explain) ---Testcase 162: -EXPLAIN VERBOSE -SELECT sample('/value[1,4]/', 50) from s3; - --- select sample(regex) (stub agg function, result) ---Testcase 163: -SELECT sample('/value[1,4]/', 50) from s3; - --- select sample(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 164: -EXPLAIN VERBOSE -SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select sample(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 165: -SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select sample(regex) (stub agg function and group by tag only) (explain) ---Testcase 166: -EXPLAIN VERBOSE -SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select sample(regex) (stub agg function and group by tag only) (result) ---Testcase 167: -SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select sample(regex) (stub agg function, expose data, explain) ---Testcase 168: -EXPLAIN VERBOSE -SELECT (sample('/value[1,4]/', 50)::s3).* from s3; - --- select sample(regex) (stub agg function, expose data, result) ---Testcase 169: -SELECT (sample('/value[1,4]/', 50)::s3).* from s3; - ---Testcase 170: -EXPLAIN VERBOSE -SELECT cumulative_sum((fields->>'value1')::float),cumulative_sum((fields->>'value2')::bigint),cumulative_sum((fields->>'value3')::float),cumulative_sum((fields->>'value4')::bigint) FROM s3; - ---Testcase 171: -SELECT cumulative_sum((fields->>'value1')::float),cumulative_sum((fields->>'value2')::bigint),cumulative_sum((fields->>'value3')::float),cumulative_sum((fields->>'value4')::bigint) FROM s3; - --- select cumulative_sum(*) (stub function, explain) ---Testcase 172: -EXPLAIN VERBOSE -SELECT cumulative_sum_all() from s3; - --- select cumulative_sum(*) (stub function, result) ---Testcase 173: -SELECT cumulative_sum_all() from s3; - --- select cumulative_sum(regex) (stub function, result) ---Testcase 174: -SELECT cumulative_sum('/value[1,4]/') from s3; - --- select cumulative_sum(regex) (stub function, result) ---Testcase 175: -SELECT cumulative_sum('/value[1,4]/') from s3; - --- select multiple star and regex functions (do not push down, raise warning and stub error) (result) ---Testcase 176: -EXPLAIN VERBOSE -SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; - --- select multiple star and regex functions (do not push down, raise warning and stub error) (result) ---Testcase 177: -SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; - --- select cumulative_sum(*) (stub function and group by tag only) (explain) ---Testcase 178: -EXPLAIN VERBOSE -SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select cumulative_sum(*) (stub function and group by tag only) (result) ---Testcase 179: -SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select cumulative_sum(regex) (stub function and group by tag only) (explain) ---Testcase 180: -EXPLAIN VERBOSE -SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select cumulative_sum(regex) (stub function and group by tag only) (result) ---Testcase 181: -SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, explain) ---Testcase 182: -EXPLAIN VERBOSE -SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; - --- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, result) ---Testcase 183: -SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; - ---Testcase 184: -EXPLAIN VERBOSE -SELECT derivative((fields->>'value1')::float),derivative((fields->>'value2')::bigint),derivative((fields->>'value3')::float),derivative((fields->>'value4')::bigint) FROM s3; - ---Testcase 185: -SELECT derivative((fields->>'value1')::float),derivative((fields->>'value2')::bigint),derivative((fields->>'value3')::float),derivative((fields->>'value4')::bigint) FROM s3; - ---Testcase 186: -EXPLAIN VERBOSE -SELECT derivative((fields->>'value1')::float, interval '0.5s'),derivative((fields->>'value2')::bigint, interval '0.2s'),derivative((fields->>'value3')::float, interval '0.1s'),derivative((fields->>'value4')::bigint, interval '2s') FROM s3; - ---Testcase 187: -SELECT derivative((fields->>'value1')::float, interval '0.5s'),derivative((fields->>'value2')::bigint, interval '0.2s'),derivative((fields->>'value3')::float, interval '0.1s'),derivative((fields->>'value4')::bigint, interval '2s') FROM s3; - --- select derivative(*) (stub function, explain) ---Testcase 188: -EXPLAIN VERBOSE -SELECT derivative_all() from s3; - --- select derivative(*) (stub function, result) ---Testcase 189: -SELECT derivative_all() from s3; - --- select derivative(regex) (stub function, explain) ---Testcase 190: -EXPLAIN VERBOSE -SELECT derivative('/value[1,4]/') from s3; - --- select derivative(regex) (stub function, result) ---Testcase 191: -SELECT derivative('/value[1,4]/') from s3; - --- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 192: -EXPLAIN VERBOSE -SELECT derivative_all(), derivative('/value[1,4]/') from s3; - --- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 193: -SELECT derivative_all(), derivative('/value[1,4]/') from s3; - --- select derivative(*) (stub function and group by tag only) (explain) ---Testcase 194: -EXPLAIN VERBOSE -SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select derivative(*) (stub function and group by tag only) (result) ---Testcase 195: -SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select derivative(regex) (stub function and group by tag only) (explain) ---Testcase 196: -EXPLAIN VERBOSE -SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select derivative(regex) (stub function and group by tag only) (result) ---Testcase 197: -SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select derivative(*) (stub agg function, expose data, explain) ---Testcase 198: -EXPLAIN VERBOSE -SELECT (derivative_all()::s3).* from s3; - --- select derivative(*) (stub agg function, expose data, result) ---Testcase 199: -SELECT (derivative_all()::s3).* from s3; - --- select derivative(regex) (stub agg function, expose data, explain) ---Testcase 200: -EXPLAIN VERBOSE -SELECT (derivative('/value[1,4]/')::s3).* from s3; - --- select derivative(regex) (stub agg function, expose data, result) ---Testcase 201: -SELECT (derivative('/value[1,4]/')::s3).* from s3; - ---Testcase 202: -EXPLAIN VERBOSE -SELECT non_negative_derivative((fields->>'value1')::float),non_negative_derivative((fields->>'value2')::bigint),non_negative_derivative((fields->>'value3')::float),non_negative_derivative((fields->>'value4')::bigint) FROM s3; - ---Testcase 203: -SELECT non_negative_derivative((fields->>'value1')::float),non_negative_derivative((fields->>'value2')::bigint),non_negative_derivative((fields->>'value3')::float),non_negative_derivative((fields->>'value4')::bigint) FROM s3; - ---Testcase 204: -EXPLAIN VERBOSE -SELECT non_negative_derivative((fields->>'value1')::float, interval '0.5s'),non_negative_derivative((fields->>'value2')::bigint, interval '0.2s'),non_negative_derivative((fields->>'value3')::float, interval '0.1s'),non_negative_derivative((fields->>'value4')::bigint, interval '2s') FROM s3; - ---Testcase 205: -SELECT non_negative_derivative((fields->>'value1')::float, interval '0.5s'),non_negative_derivative((fields->>'value2')::bigint, interval '0.2s'),non_negative_derivative((fields->>'value3')::float, interval '0.1s'),non_negative_derivative((fields->>'value4')::bigint, interval '2s') FROM s3; - --- select non_negative_derivative(*) (stub function, explain) ---Testcase 206: -EXPLAIN VERBOSE -SELECT non_negative_derivative_all() from s3; - --- select non_negative_derivative(*) (stub function, result) ---Testcase 207: -SELECT non_negative_derivative_all() from s3; - --- select non_negative_derivative(regex) (stub function, explain) ---Testcase 208: -EXPLAIN VERBOSE -SELECT non_negative_derivative('/value[1,4]/') from s3; - --- select non_negative_derivative(regex) (stub function, result) ---Testcase 209: -SELECT non_negative_derivative('/value[1,4]/') from s3; - --- select non_negative_derivative(*) (stub function and group by tag only) (explain) ---Testcase 210: -EXPLAIN VERBOSE -SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select non_negative_derivative(*) (stub function and group by tag only) (result) ---Testcase 211: -SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select non_negative_derivative(regex) (stub function and group by tag only) (explain) ---Testcase 212: -EXPLAIN VERBOSE -SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select non_negative_derivative(regex) (stub agg function and group by tag only) (result) ---Testcase 213: -SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select non_negative_derivative(*) (stub function, expose data, explain) ---Testcase 214: -EXPLAIN VERBOSE -SELECT (non_negative_derivative_all()::s3).* from s3; - --- select non_negative_derivative(*) (stub agg function, expose data, result) ---Testcase 215: -SELECT (non_negative_derivative_all()::s3).* from s3; - --- select non_negative_derivative(regex) (stub function, expose data, explain) ---Testcase 216: -EXPLAIN VERBOSE -SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; - --- select non_negative_derivative(regex) (stub agg function, expose data, result) ---Testcase 217: -SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; - ---Testcase 218: -EXPLAIN VERBOSE -SELECT difference((fields->>'value1')::float),difference((fields->>'value2')::bigint),difference((fields->>'value3')::float),difference((fields->>'value4')::bigint) FROM s3; - ---Testcase 219: -SELECT difference((fields->>'value1')::float),difference((fields->>'value2')::bigint),difference((fields->>'value3')::float),difference((fields->>'value4')::bigint) FROM s3; - --- select difference(*) (stub function, explain) ---Testcase 220: -EXPLAIN VERBOSE -SELECT difference_all() from s3; - --- select difference(*) (stub function, result) ---Testcase 221: -SELECT difference_all() from s3; - --- select difference(regex) (stub function, explain) ---Testcase 222: -EXPLAIN VERBOSE -SELECT difference('/value[1,4]/') from s3; - --- select difference(regex) (stub function, result) ---Testcase 223: -SELECT difference('/value[1,4]/') from s3; - --- select difference(*) (stub agg function and group by tag only) (explain) ---Testcase 224: -EXPLAIN VERBOSE -SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select difference(*) (stub agg function and group by tag only) (result) ---Testcase 225: -SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select difference(regex) (stub agg function and group by tag only) (explain) ---Testcase 226: -EXPLAIN VERBOSE -SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select difference(regex) (stub agg function and group by tag only) (result) ---Testcase 227: -SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select difference(*) (stub function, expose data, explain) ---Testcase 228: -EXPLAIN VERBOSE -SELECT (difference_all()::s3).* from s3; - --- select difference(*) (stub function, expose data, result) ---Testcase 229: -SELECT (difference_all()::s3).* from s3; - --- select difference(regex) (stub function, expose data, explain) ---Testcase 230: -EXPLAIN VERBOSE -SELECT (difference('/value[1,4]/')::s3).* from s3; - --- select difference(regex) (stub function, expose data, result) ---Testcase 231: -SELECT (difference('/value[1,4]/')::s3).* from s3; - ---Testcase 232: -EXPLAIN VERBOSE -SELECT non_negative_difference((fields->>'value1')::float),non_negative_difference((fields->>'value2')::bigint),non_negative_difference((fields->>'value3')::float),non_negative_difference((fields->>'value4')::bigint) FROM s3; - ---Testcase 233: -SELECT non_negative_difference((fields->>'value1')::float),non_negative_difference((fields->>'value2')::bigint),non_negative_difference((fields->>'value3')::float),non_negative_difference((fields->>'value4')::bigint) FROM s3; - --- select non_negative_difference(*) (stub function, explain) ---Testcase 234: -EXPLAIN VERBOSE -SELECT non_negative_difference_all() from s3; - --- select non_negative_difference(*) (stub function, result) ---Testcase 235: -SELECT non_negative_difference_all() from s3; - --- select non_negative_difference(regex) (stub agg function, explain) ---Testcase 236: -EXPLAIN VERBOSE -SELECT non_negative_difference('/value[1,4]/') from s3; - --- select non_negative_difference(*), non_negative_difference(regex) (stub function, result) ---Testcase 237: -SELECT non_negative_difference('/value[1,4]/') from s3; - --- select non_negative_difference(*) (stub function and group by tag only) (explain) ---Testcase 238: -EXPLAIN VERBOSE -SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select non_negative_difference(*) (stub function and group by tag only) (result) ---Testcase 239: -SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select non_negative_difference(regex) (stub function and group by tag only) (explain) ---Testcase 240: -EXPLAIN VERBOSE -SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select non_negative_difference(regex) (stub function and group by tag only) (result) ---Testcase 241: -SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select non_negative_difference(*) (stub function, expose data, explain) ---Testcase 242: -EXPLAIN VERBOSE -SELECT (non_negative_difference_all()::s3).* from s3; - --- select non_negative_difference(*) (stub function, expose data, result) ---Testcase 243: -SELECT (non_negative_difference_all()::s3).* from s3; - --- select non_negative_difference(regex) (stub function, expose data, explain) ---Testcase 244: -EXPLAIN VERBOSE -SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; - --- select non_negative_difference(regex) (stub function, expose data, result) ---Testcase 245: -SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; - ---Testcase 246: -EXPLAIN VERBOSE -SELECT elapsed((fields->>'value1')::float),elapsed((fields->>'value2')::bigint),elapsed((fields->>'value3')::float),elapsed((fields->>'value4')::bigint) FROM s3; - ---Testcase 247: -SELECT elapsed((fields->>'value1')::float),elapsed((fields->>'value2')::bigint),elapsed((fields->>'value3')::float),elapsed((fields->>'value4')::bigint) FROM s3; - ---Testcase 248: -EXPLAIN VERBOSE -SELECT elapsed((fields->>'value1')::float, interval '0.5s'),elapsed((fields->>'value2')::bigint, interval '0.2s'),elapsed((fields->>'value3')::float, interval '0.1s'),elapsed((fields->>'value4')::bigint, interval '2s') FROM s3; - ---Testcase 249: -SELECT elapsed((fields->>'value1')::float, interval '0.5s'),elapsed((fields->>'value2')::bigint, interval '0.2s'),elapsed((fields->>'value3')::float, interval '0.1s'),elapsed((fields->>'value4')::bigint, interval '2s') FROM s3; - --- select elapsed(*) (stub function, explain) ---Testcase 250: -EXPLAIN VERBOSE -SELECT elapsed_all() from s3; - --- select elapsed(*) (stub function, result) ---Testcase 251: -SELECT elapsed_all() from s3; - --- select elapsed(regex) (stub function, explain) ---Testcase 252: -EXPLAIN VERBOSE -SELECT elapsed('/value[1,4]/') from s3; - --- select elapsed(regex) (stub agg function, result) ---Testcase 253: -SELECT elapsed('/value[1,4]/') from s3; - --- select elapsed(*) (stub function and group by tag only) (explain) ---Testcase 254: -EXPLAIN VERBOSE -SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select elapsed(*) (stub function and group by tag only) (result) ---Testcase 255: -SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select elapsed(regex) (stub function and group by tag only) (explain) ---Testcase 256: -EXPLAIN VERBOSE -SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select elapsed(regex) (stub function and group by tag only) (result) ---Testcase 257: -SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select elapsed(*) (stub function, expose data, explain) ---Testcase 258: -EXPLAIN VERBOSE -SELECT (elapsed_all()::s3).* from s3; - --- select elapsed(*) (stub function, expose data, result) ---Testcase 259: -SELECT (elapsed_all()::s3).* from s3; - --- select elapsed(regex) (stub function, expose data, explain) ---Testcase 260: -EXPLAIN VERBOSE -SELECT (elapsed('/value[1,4]/')::s3).* from s3; - --- select elapsed(regex) (stub agg function, expose data, result) ---Testcase 261: -SELECT (elapsed('/value[1,4]/')::s3).* from s3; - ---Testcase 262: -EXPLAIN VERBOSE -SELECT moving_average((fields->>'value1')::float, 2),moving_average((fields->>'value2')::bigint, 2),moving_average((fields->>'value3')::float, 2),moving_average((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 263: -SELECT moving_average((fields->>'value1')::float, 2),moving_average((fields->>'value2')::bigint, 2),moving_average((fields->>'value3')::float, 2),moving_average((fields->>'value4')::bigint, 2) FROM s3; - --- select moving_average(*) (stub function, explain) ---Testcase 264: -EXPLAIN VERBOSE -SELECT moving_average_all(2) from s3; - --- select moving_average(*) (stub function, result) ---Testcase 265: -SELECT moving_average_all(2) from s3; - --- select moving_average(regex) (stub function, explain) ---Testcase 266: -EXPLAIN VERBOSE -SELECT moving_average('/value[1,4]/', 2) from s3; - --- select moving_average(regex) (stub function, result) ---Testcase 267: -SELECT moving_average('/value[1,4]/', 2) from s3; - --- select moving_average(*) (stub function and group by tag only) (explain) ---Testcase 268: -EXPLAIN VERBOSE -SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select moving_average(*) (stub function and group by tag only) (result) ---Testcase 269: -SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 270: -EXPLAIN VERBOSE -SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select moving_average(regex) (stub function and group by tag only) (result) ---Testcase 271: -SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select moving_average(*) (stub function, expose data, explain) ---Testcase 272: -EXPLAIN VERBOSE -SELECT (moving_average_all(2)::s3).* from s3; - --- select moving_average(*) (stub function, expose data, result) ---Testcase 273: -SELECT (moving_average_all(2)::s3).* from s3; - --- select moving_average(regex) (stub function, expose data, explain) ---Testcase 274: -EXPLAIN VERBOSE -SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; - --- select moving_average(regex) (stub function, expose data, result) ---Testcase 275: -SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; - ---Testcase 276: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator((fields->>'value1')::float, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2),chande_momentum_oscillator((fields->>'value3')::float, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 277: -SELECT chande_momentum_oscillator((fields->>'value1')::float, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2),chande_momentum_oscillator((fields->>'value3')::float, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 278: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator((fields->>'value1')::float, 2, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2, 2),chande_momentum_oscillator((fields->>'value3')::float, 2, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2, 2) FROM s3; - ---Testcase 279: -SELECT chande_momentum_oscillator((fields->>'value1')::float, 2, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2, 2),chande_momentum_oscillator((fields->>'value3')::float, 2, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2, 2) FROM s3; - --- select chande_momentum_oscillator(*) (stub function, explain) ---Testcase 280: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator_all(2) from s3; - --- select chande_momentum_oscillator(*) (stub function, result) ---Testcase 281: -SELECT chande_momentum_oscillator_all(2) from s3; - --- select chande_momentum_oscillator(regex) (stub function, explain) ---Testcase 282: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; - --- select chande_momentum_oscillator(regex) (stub agg function, result) ---Testcase 283: -SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; - --- select chande_momentum_oscillator(*) (stub function and group by tag only) (explain) ---Testcase 284: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select chande_momentum_oscillator(*) (stub agg function and group by tag only) (result) ---Testcase 285: -SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select chande_momentum_oscillator(regex) (stub agg function and group by tag only) (explain) ---Testcase 286: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select chande_momentum_oscillator(regex) (stub function and group by tag only) (result) ---Testcase 287: -SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select chande_momentum_oscillator(*) (stub agg function, expose data, explain) ---Testcase 288: -EXPLAIN VERBOSE -SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; - --- select chande_momentum_oscillator(*) (stub function, expose data, result) ---Testcase 289: -SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; - --- select chande_momentum_oscillator(regex) (stub function, expose data, explain) ---Testcase 290: -EXPLAIN VERBOSE -SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; - --- select chande_momentum_oscillator(regex) (stub function, expose data, result) ---Testcase 291: -SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; - ---Testcase 292: -EXPLAIN VERBOSE -SELECT exponential_moving_average((fields->>'value1')::float, 2),exponential_moving_average((fields->>'value2')::bigint, 2),exponential_moving_average((fields->>'value3')::float, 2),exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 293: -SELECT exponential_moving_average((fields->>'value1')::float, 2),exponential_moving_average((fields->>'value2')::bigint, 2),exponential_moving_average((fields->>'value3')::float, 2),exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 294: -EXPLAIN VERBOSE -SELECT exponential_moving_average((fields->>'value1')::float, 2, 2),exponential_moving_average((fields->>'value2')::bigint, 2, 2),exponential_moving_average((fields->>'value3')::float, 2, 2),exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - ---Testcase 295: -SELECT exponential_moving_average((fields->>'value1')::float, 2, 2),exponential_moving_average((fields->>'value2')::bigint, 2, 2),exponential_moving_average((fields->>'value3')::float, 2, 2),exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - --- select exponential_moving_average(*) (stub function, explain) ---Testcase 296: -EXPLAIN VERBOSE -SELECT exponential_moving_average_all(2) from s3; - --- select exponential_moving_average(*) (stub function, result) ---Testcase 297: -SELECT exponential_moving_average_all(2) from s3; - --- select exponential_moving_average(regex) (stub function, explain) ---Testcase 298: -EXPLAIN VERBOSE -SELECT exponential_moving_average('/value[1,4]/',2) from s3; - --- select exponential_moving_average(regex) (stub function, result) ---Testcase 299: -SELECT exponential_moving_average('/value[1,4]/',2) from s3; - --- select exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 300: -EXPLAIN VERBOSE -SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 301: -SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select exponential_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 302: -EXPLAIN VERBOSE -SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select exponential_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 303: -SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - ---Testcase 304: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average((fields->>'value1')::float, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2),double_exponential_moving_average((fields->>'value3')::float, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 305: -SELECT double_exponential_moving_average((fields->>'value1')::float, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2),double_exponential_moving_average((fields->>'value3')::float, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 306: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average((fields->>'value1')::float, 2, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2, 2),double_exponential_moving_average((fields->>'value3')::float, 2, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - ---Testcase 307: -SELECT double_exponential_moving_average((fields->>'value1')::float, 2, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2, 2),double_exponential_moving_average((fields->>'value3')::float, 2, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - --- select double_exponential_moving_average(*) (stub function, explain) ---Testcase 308: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average_all(2) from s3; - --- select double_exponential_moving_average(*) (stub function, result) ---Testcase 309: -SELECT double_exponential_moving_average_all(2) from s3; - --- select double_exponential_moving_average(regex) (stub function, explain) ---Testcase 310: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; - --- select double_exponential_moving_average(regex) (stub function, result) ---Testcase 311: -SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; - --- select double_exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 312: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select double_exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 313: -SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select double_exponential_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 314: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select double_exponential_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 315: -SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - ---Testcase 316: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 317: -SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 318: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2, 2) FROM s3; - ---Testcase 319: -SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2, 2) FROM s3; - --- select kaufmans_efficiency_ratio(*) (stub function, explain) ---Testcase 320: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio_all(2) from s3; - --- select kaufmans_efficiency_ratio(*) (stub function, result) ---Testcase 321: -SELECT kaufmans_efficiency_ratio_all(2) from s3; - --- select kaufmans_efficiency_ratio(regex) (stub function, explain) ---Testcase 322: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; - --- select kaufmans_efficiency_ratio(regex) (stub function, result) ---Testcase 323: -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; - --- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (explain) ---Testcase 324: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (result) ---Testcase 325: -SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (explain) ---Testcase 326: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (result) ---Testcase 327: -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select kaufmans_efficiency_ratio(*) (stub function, expose data, explain) ---Testcase 328: -EXPLAIN VERBOSE -SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; - --- select kaufmans_efficiency_ratio(*) (stub function, expose data, result) ---Testcase 329: -SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; - --- select kaufmans_efficiency_ratio(regex) (stub function, expose data, explain) ---Testcase 330: -EXPLAIN VERBOSE -SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; - --- select kaufmans_efficiency_ratio(regex) (stub function, expose data, result) ---Testcase 331: -SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; - ---Testcase 332: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 333: -SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 334: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - ---Testcase 335: -SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - --- select kaufmans_adaptive_moving_average(*) (stub function, explain) ---Testcase 336: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average_all(2) from s3; - --- select kaufmans_adaptive_moving_average(*) (stub function, result) ---Testcase 337: -SELECT kaufmans_adaptive_moving_average_all(2) from s3; - --- select kaufmans_adaptive_moving_average(regex) (stub function, explain) ---Testcase 338: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; - --- select kaufmans_adaptive_moving_average(regex) (stub agg function, result) ---Testcase 339: -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; - --- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 340: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (result) ---Testcase 341: -SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 342: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 343: -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - ---Testcase 344: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average((fields->>'value1')::float, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2),triple_exponential_moving_average((fields->>'value3')::float, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 345: -SELECT triple_exponential_moving_average((fields->>'value1')::float, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2),triple_exponential_moving_average((fields->>'value3')::float, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 346: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average((fields->>'value1')::float, 2, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2, 2),triple_exponential_moving_average((fields->>'value3')::float, 2, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - ---Testcase 347: -SELECT triple_exponential_moving_average((fields->>'value1')::float, 2, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2, 2),triple_exponential_moving_average((fields->>'value3')::float, 2, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; - --- select triple_exponential_moving_average(*) (stub function, explain) ---Testcase 348: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average_all(2) from s3; - --- select triple_exponential_moving_average(*) (stub function, result) ---Testcase 349: -SELECT triple_exponential_moving_average_all(2) from s3; - --- select triple_exponential_moving_average(regex) (stub function, explain) ---Testcase 350: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; - --- select triple_exponential_moving_average(regex) (stub function, result) ---Testcase 351: -SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; - --- select triple_exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 352: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select triple_exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 353: -SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (explain) ---Testcase 354: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (result) ---Testcase 355: -SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - ---Testcase 356: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative((fields->>'value1')::float, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2),triple_exponential_derivative((fields->>'value3')::float, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 357: -SELECT triple_exponential_derivative((fields->>'value1')::float, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2),triple_exponential_derivative((fields->>'value3')::float, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 358: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative((fields->>'value1')::float, 2, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2, 2),triple_exponential_derivative((fields->>'value3')::float, 2, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2, 2) FROM s3; - ---Testcase 359: -SELECT triple_exponential_derivative((fields->>'value1')::float, 2, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2, 2),triple_exponential_derivative((fields->>'value3')::float, 2, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2, 2) FROM s3; - --- select triple_exponential_derivative(*) (stub function, explain) ---Testcase 360: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative_all(2) from s3; - --- select triple_exponential_derivative(*) (stub function, result) ---Testcase 361: -SELECT triple_exponential_derivative_all(2) from s3; - --- select triple_exponential_derivative(regex) (stub function, explain) ---Testcase 362: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; - --- select triple_exponential_derivative(regex) (stub function, result) ---Testcase 363: -SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; - --- select triple_exponential_derivative(*) (stub function and group by tag only) (explain) ---Testcase 364: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select triple_exponential_derivative(*) (stub function and group by tag only) (result) ---Testcase 365: -SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select triple_exponential_derivative(regex) (stub function and group by tag only) (explain) ---Testcase 366: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select triple_exponential_derivative(regex) (stub function and group by tag only) (result) ---Testcase 367: -SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - ---Testcase 368: -EXPLAIN VERBOSE -SELECT relative_strength_index((fields->>'value1')::float, 2),relative_strength_index((fields->>'value2')::bigint, 2),relative_strength_index((fields->>'value3')::float, 2),relative_strength_index((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 369: -SELECT relative_strength_index((fields->>'value1')::float, 2),relative_strength_index((fields->>'value2')::bigint, 2),relative_strength_index((fields->>'value3')::float, 2),relative_strength_index((fields->>'value4')::bigint, 2) FROM s3; - ---Testcase 370: -EXPLAIN VERBOSE -SELECT relative_strength_index((fields->>'value1')::float, 2, 2),relative_strength_index((fields->>'value2')::bigint, 2, 2),relative_strength_index((fields->>'value3')::float, 2, 2),relative_strength_index((fields->>'value4')::bigint, 2, 2) FROM s3; - ---Testcase 371: -SELECT relative_strength_index((fields->>'value1')::float, 2, 2),relative_strength_index((fields->>'value2')::bigint, 2, 2),relative_strength_index((fields->>'value3')::float, 2, 2),relative_strength_index((fields->>'value4')::bigint, 2, 2) FROM s3; - --- select relative_strength_index(*) (stub function, explain) ---Testcase 372: -EXPLAIN VERBOSE -SELECT relative_strength_index_all(2) from s3; - --- select relative_strength_index(*) (stub function, result) ---Testcase 373: -SELECT relative_strength_index_all(2) from s3; - --- select relative_strength_index(regex) (stub agg function, explain) ---Testcase 374: -EXPLAIN VERBOSE -SELECT relative_strength_index('/value[1,4]/',2) from s3; - --- select relative_strength_index(regex) (stub agg function, result) ---Testcase 375: -SELECT relative_strength_index('/value[1,4]/',2) from s3; - --- select relative_strength_index(*) (stub function and group by tag only) (explain) ---Testcase 376: -EXPLAIN VERBOSE -SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select relative_strength_index(*) (stub function and group by tag only) (result) ---Testcase 377: -SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select relative_strength_index(regex) (stub function and group by tag only) (explain) ---Testcase 378: -EXPLAIN VERBOSE -SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select relative_strength_index(regex) (stub function and group by tag only) (result) ---Testcase 379: -SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select relative_strength_index(*) (stub function, expose data, explain) ---Testcase 380: -EXPLAIN VERBOSE -SELECT (relative_strength_index_all(2)::s3).* from s3; - --- select relative_strength_index(*) (stub function, expose data, result) ---Testcase 381: -SELECT (relative_strength_index_all(2)::s3).* from s3; - --- select relative_strength_index(regex) (stub function, expose data, explain) ---Testcase 382: -EXPLAIN VERBOSE -SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; - --- select relative_strength_index(regex) (stub function, expose data, result) ---Testcase 383: -SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; - --- select integral (stub agg function, explain) ---Testcase 384: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float),integral((fields->>'value2')::bigint),integral((fields->>'value3')::float),integral((fields->>'value4')::bigint) FROM s3; - --- select integral (stub agg function, result) ---Testcase 385: -SELECT integral((fields->>'value1')::float),integral((fields->>'value2')::bigint),integral((fields->>'value3')::float),integral((fields->>'value4')::bigint) FROM s3; - ---Testcase 386: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float, interval '1s'),integral((fields->>'value2')::bigint, interval '1s'),integral((fields->>'value3')::float, interval '1s'),integral((fields->>'value4')::bigint, interval '1s') FROM s3; - --- select integral (stub agg function, result) ---Testcase 387: -SELECT integral((fields->>'value1')::float, interval '1s'),integral((fields->>'value2')::bigint, interval '1s'),integral((fields->>'value3')::float, interval '1s'),integral((fields->>'value4')::bigint, interval '1s') FROM s3; - --- select integral (stub agg function, raise exception if not expected type) ---Testcase 388: -SELECT integral((fields->>'value1')::numeric),integral((fields->>'value2')::numeric),integral((fields->>'value3')::numeric),integral((fields->>'value4')::numeric) FROM s3; - --- select integral (stub agg function and group by influx_time() and tag) (explain) ---Testcase 389: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select integral (stub agg function and group by influx_time() and tag) (result) ---Testcase 390: -SELECT integral((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select integral (stub agg function and group by influx_time() and tag) (explain) ---Testcase 391: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float, interval '1s'),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select integral (stub agg function and group by influx_time() and tag) (result) ---Testcase 392: -SELECT integral((fields->>'value1')::float, interval '1s'),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select integral (stub agg function and group by tag only) (result) ---Testcase 393: -SELECT tags->>'tag1' tag1,integral((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1' ORDER BY 1; - --- select integral (stub agg function and other aggs) (result) ---Testcase 394: -SELECT sum((fields->>'value1')::float),integral((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; - --- select integral (stub agg function and group by tag only) (result) ---Testcase 395: -SELECT tags->>'tag1' tag1,integral((fields->>'value1')::float, interval '1s') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1' ORDER BY 1; - --- select integral (stub agg function and other aggs) (result) ---Testcase 396: -SELECT sum((fields->>'value1')::float),integral((fields->>'value1')::float, interval '1s'),count((fields->>'value1')::float) FROM s3; - --- select integral over join query (explain) ---Testcase 397: -EXPLAIN VERBOSE -SELECT integral((t1.fields->>'value1')::float), integral((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select integral over join query (result, stub call error) ---Testcase 398: -SELECT integral((t1.fields->>'value1')::float), integral((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select integral over join query (explain) ---Testcase 399: -EXPLAIN VERBOSE -SELECT integral((t1.fields->>'value1')::float, interval '1s'), integral((t2.fields->>'value1')::float, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select integral over join query (result, stub call error) ---Testcase 400: -SELECT integral((t1.fields->>'value1')::float, interval '1s'), integral((t2.fields->>'value1')::float, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select integral with having (explain) ---Testcase 401: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float) FROM s3 HAVING integral((fields->>'value1')::float) > 100; - --- select integral with having (explain, not pushdown, stub call error) ---Testcase 402: -SELECT integral((fields->>'value1')::float) FROM s3 HAVING integral((fields->>'value1')::float) > 100; - --- select integral with having (explain) ---Testcase 403: -EXPLAIN VERBOSE -SELECT integral((fields->>'value1')::float, interval '1s') FROM s3 HAVING integral((fields->>'value1')::float, interval '1s') > 100; - --- select integral with having (explain, not pushdown, stub call error) ---Testcase 404: -SELECT integral((fields->>'value1')::float, interval '1s') FROM s3 HAVING integral((fields->>'value1')::float, interval '1s') > 100; - --- select integral(*) (stub agg function, explain) ---Testcase 405: -EXPLAIN VERBOSE -SELECT integral_all(*) from s3; - --- select integral(*) (stub agg function, result) ---Testcase 406: -SELECT integral_all(*) from s3; - --- select integral(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 407: -EXPLAIN VERBOSE -SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select integral(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 408: -SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select integral(*) (stub agg function and group by tag only) (explain) ---Testcase 409: -EXPLAIN VERBOSE -SELECT integral_all(*) FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; - --- select integral(*) (stub agg function and group by tag only) (result) ---Testcase 410: -SELECT integral_all(*) FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; - --- select integral(*) (stub agg function, expose data, explain) ---Testcase 411: -EXPLAIN VERBOSE -SELECT (integral_all(*)::s3).* from s3; - --- select integral(*) (stub agg function, expose data, result) ---Testcase 412: -SELECT (integral_all(*)::s3).* from s3; - --- select integral(regex) (stub agg function, explain) ---Testcase 413: -EXPLAIN VERBOSE -SELECT integral('/value[1,4]/') from s3; - --- select integral(regex) (stub agg function, result) ---Testcase 414: -SELECT integral('/value[1,4]/') from s3; - --- select integral(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 415: -EXPLAIN VERBOSE -SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select integral(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 416: -SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select integral(regex) (stub agg function and group by tag only) (explain) ---Testcase 417: -EXPLAIN VERBOSE -SELECT integral('/value[1,4]/') FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; - --- select integral(regex) (stub agg function and group by tag only) (result) ---Testcase 418: -SELECT integral('/value[1,4]/') FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; - --- select integral(regex) (stub agg function, expose data, explain) ---Testcase 419: -EXPLAIN VERBOSE -SELECT (integral('/value[1,4]/')::s3).* from s3; - --- select integral(regex) (stub agg function, expose data, result) ---Testcase 420: -SELECT (integral('/value[1,4]/')::s3).* from s3; - --- select mean (stub agg function, explain) ---Testcase 421: -EXPLAIN VERBOSE -SELECT mean((fields->>'value1')::float),mean((fields->>'value2')::bigint),mean((fields->>'value3')::float),mean((fields->>'value4')::bigint) FROM s3; - --- select mean (stub agg function, result) ---Testcase 422: -SELECT mean((fields->>'value1')::float),mean((fields->>'value2')::bigint),mean((fields->>'value3')::float),mean((fields->>'value4')::bigint) FROM s3; - --- select mean (stub agg function, raise exception if not expected type) ---Testcase 423: -SELECT mean((fields->>'value1')::numeric),mean((fields->>'value2')::numeric),mean((fields->>'value3')::numeric),mean((fields->>'value4')::numeric) FROM s3; - --- select mean (stub agg function and group by influx_time() and tag) (explain) ---Testcase 424: -EXPLAIN VERBOSE -SELECT mean((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select mean (stub agg function and group by influx_time() and tag) (result) ---Testcase 425: -SELECT mean((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select mean (stub agg function and group by tag only) (result) ---Testcase 426: -SELECT tags->>'tag1' tag1,mean((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select mean (stub agg function and other aggs) (result) ---Testcase 427: -SELECT sum((fields->>'value1')::float),mean((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; - --- select mean over join query (explain) ---Testcase 428: -EXPLAIN VERBOSE -SELECT mean((t1.fields->>'value1')::float), mean((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select mean over join query (result, stub call error) ---Testcase 429: -SELECT mean((t1.fields->>'value1')::float), mean((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select mean with having (explain) ---Testcase 430: -EXPLAIN VERBOSE -SELECT mean((fields->>'value1')::float) FROM s3 HAVING mean((fields->>'value1')::float) > 100; - --- select mean with having (explain, not pushdown, stub call error) ---Testcase 431: -SELECT mean((fields->>'value1')::float) FROM s3 HAVING mean((fields->>'value1')::float) > 100; - --- select mean(*) (stub agg function, explain) ---Testcase 432: -EXPLAIN VERBOSE -SELECT mean_all(*) from s3; - --- select mean(*) (stub agg function, result) ---Testcase 433: -SELECT mean_all(*) from s3; - --- select mean(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 434: -EXPLAIN VERBOSE -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select mean(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 435: -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select mean(*) (stub agg function and group by tag only) (explain) ---Testcase 436: -EXPLAIN VERBOSE -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select mean(*) (stub agg function and group by tag only) (result) ---Testcase 437: -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select mean(*) (stub agg function, expose data, explain) ---Testcase 438: -EXPLAIN VERBOSE -SELECT (mean_all(*)::s3).* from s3; - --- select mean(*) (stub agg function, expose data, result) ---Testcase 439: -SELECT (mean_all(*)::s3).* from s3; - --- select mean(regex) (stub agg function, explain) ---Testcase 440: -EXPLAIN VERBOSE -SELECT mean('/value[1,4]/') from s3; - --- select mean(regex) (stub agg function, result) ---Testcase 441: -SELECT mean('/value[1,4]/') from s3; - --- select mean(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 442: -EXPLAIN VERBOSE -SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select mean(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 443: -SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select mean(regex) (stub agg function and group by tag only) (explain) ---Testcase 444: -EXPLAIN VERBOSE -SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select mean(regex) (stub agg function and group by tag only) (result) ---Testcase 445: -SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select mean(regex) (stub agg function, expose data, explain) ---Testcase 446: -EXPLAIN VERBOSE -SELECT (mean('/value[1,4]/')::s3).* from s3; - --- select mean(regex) (stub agg function, expose data, result) ---Testcase 447: -SELECT (mean('/value[1,4]/')::s3).* from s3; - --- select median (stub agg function, explain) ---Testcase 448: -EXPLAIN VERBOSE -SELECT median((fields->>'value1')::float),median((fields->>'value2')::bigint),median((fields->>'value3')::float),median((fields->>'value4')::bigint) FROM s3; - --- select median (stub agg function, result) ---Testcase 449: -SELECT median((fields->>'value1')::float),median((fields->>'value2')::bigint),median((fields->>'value3')::float),median((fields->>'value4')::bigint) FROM s3; - --- select median (stub agg function, raise exception if not expected type) ---Testcase 450: -SELECT median((fields->>'value1')::numeric),median((fields->>'value2')::numeric),median((fields->>'value3')::numeric),median((fields->>'value4')::numeric) FROM s3; - --- select median (stub agg function and group by influx_time() and tag) (explain) ---Testcase 451: -EXPLAIN VERBOSE -SELECT median((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select median (stub agg function and group by influx_time() and tag) (result) ---Testcase 452: -SELECT median((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select median (stub agg function and group by tag only) (result) ---Testcase 453: -SELECT tags->>'tag1' tag1,median((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select median (stub agg function and other aggs) (result) ---Testcase 454: -SELECT sum((fields->>'value1')::float),median((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; - --- select median over join query (explain) ---Testcase 455: -EXPLAIN VERBOSE -SELECT median((t1.fields->>'value1')::float), median((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select median over join query (result, stub call error) ---Testcase 456: -SELECT median((t1.fields->>'value1')::float), median((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select median with having (explain) ---Testcase 457: -EXPLAIN VERBOSE -SELECT median((fields->>'value1')::float) FROM s3 HAVING median((fields->>'value1')::float) > 100; - --- select median with having (explain, not pushdown, stub call error) ---Testcase 458: -SELECT median((fields->>'value1')::float) FROM s3 HAVING median((fields->>'value1')::float) > 100; - --- select median(*) (stub agg function, explain) ---Testcase 459: -EXPLAIN VERBOSE -SELECT median_all(*) from s3; - --- select median(*) (stub agg function, result) ---Testcase 460: -SELECT median_all(*) from s3; - --- select median(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 461: -EXPLAIN VERBOSE -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select median(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 462: -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select median(*) (stub agg function and group by tag only) (explain) ---Testcase 463: -EXPLAIN VERBOSE -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select median(*) (stub agg function and group by tag only) (result) ---Testcase 464: -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select median(*) (stub agg function, expose data, explain) ---Testcase 465: -EXPLAIN VERBOSE -SELECT (median_all(*)::s3).* from s3; - --- select median(*) (stub agg function, expose data, result) ---Testcase 466: -SELECT (median_all(*)::s3).* from s3; - --- select median(regex) (stub agg function, explain) ---Testcase 467: -EXPLAIN VERBOSE -SELECT median('/^v.*/') from s3; - --- select median(regex) (stub agg function, result) ---Testcase 468: -SELECT median('/^v.*/') from s3; - --- select median(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 469: -EXPLAIN VERBOSE -SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select median(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 470: -SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select median(regex) (stub agg function and group by tag only) (explain) ---Testcase 471: -EXPLAIN VERBOSE -SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select median(regex) (stub agg function and group by tag only) (result) ---Testcase 472: -SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select median(regex) (stub agg function, expose data, explain) ---Testcase 473: -EXPLAIN VERBOSE -SELECT (median('/value[1,4]/')::s3).* from s3; - --- select median(regex) (stub agg function, expose data, result) ---Testcase 474: -SELECT (median('/value[1,4]/')::s3).* from s3; - --- select influx_mode (stub agg function, explain) ---Testcase 475: -EXPLAIN VERBOSE -SELECT influx_mode((fields->>'value1')::float),influx_mode((fields->>'value2')::bigint),influx_mode((fields->>'value3')::float),influx_mode((fields->>'value4')::bigint) FROM s3; - --- select influx_mode (stub agg function, result) ---Testcase 476: -SELECT influx_mode((fields->>'value1')::float),influx_mode((fields->>'value2')::bigint),influx_mode((fields->>'value3')::float),influx_mode((fields->>'value4')::bigint) FROM s3; - --- select influx_mode (stub agg function, raise exception if not expected type) ---Testcase 477: -SELECT influx_mode((fields->>'value1')::numeric),influx_mode((fields->>'value2')::numeric),influx_mode((fields->>'value3')::numeric),influx_mode((fields->>'value4')::numeric) FROM s3; - --- select influx_mode (stub agg function and group by influx_time() and tag) (explain) ---Testcase 478: -EXPLAIN VERBOSE -SELECT influx_mode((fields->>'value1')::numeric),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_mode (stub agg function and group by influx_time() and tag) (result) ---Testcase 479: -SELECT influx_mode((fields->>'value1')::numeric),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_mode (stub agg function and group by tag only) (result) ---Testcase 480: -SELECT tags->>'tag1' tag1,influx_mode((fields->>'value1')::numeric) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_mode (stub agg function and other aggs) (result) ---Testcase 481: -SELECT sum((fields->>'value1')::float),influx_mode((fields->>'value1')::numeric),count((fields->>'value1')::float) FROM s3; - --- select influx_mode over join query (explain) ---Testcase 482: -EXPLAIN VERBOSE -SELECT influx_mode((t1.fields->>'value1')::float), influx_mode((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select influx_mode over join query (result, stub call error) ---Testcase 483: -SELECT influx_mode((t1.fields->>'value1')::float), influx_mode((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select influx_mode with having (explain) ---Testcase 484: -EXPLAIN VERBOSE -SELECT influx_mode((fields->>'value1')::float) FROM s3 HAVING influx_mode((fields->>'value1')::float) > 100; - --- select influx_mode with having (explain, not pushdown, stub call error) ---Testcase 485: -SELECT influx_mode((fields->>'value1')::float) FROM s3 HAVING influx_mode((fields->>'value1')::float) > 100; - --- select influx_mode(*) (stub agg function, explain) ---Testcase 486: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) from s3; - --- select influx_mode(*) (stub agg function, result) ---Testcase 487: -SELECT influx_mode_all(*) from s3; - --- select influx_mode(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 488: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_mode(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 489: -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_mode(*) (stub agg function and group by tag only) (explain) ---Testcase 490: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_mode(*) (stub agg function and group by tag only) (result) ---Testcase 491: -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_mode(*) (stub agg function, expose data, explain) ---Testcase 492: -EXPLAIN VERBOSE -SELECT (influx_mode_all(*)::s3).* from s3; - --- select influx_mode(*) (stub agg function, expose data, result) ---Testcase 493: -SELECT (influx_mode_all(*)::s3).* from s3; - --- select influx_mode(regex) (stub function, explain) ---Testcase 494: -EXPLAIN VERBOSE -SELECT influx_mode('/value[1,4]/') from s3; - --- select influx_mode(regex) (stub function, result) ---Testcase 495: -SELECT influx_mode('/value[1,4]/') from s3; - --- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 496: -EXPLAIN VERBOSE -SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 497: -SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_mode(regex) (stub agg function and group by tag only) (explain) ---Testcase 498: -EXPLAIN VERBOSE -SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_mode(regex) (stub agg function and group by tag only) (result) ---Testcase 499: -SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_mode(regex) (stub agg function, expose data, explain) ---Testcase 500: -EXPLAIN VERBOSE -SELECT (influx_mode('/value[1,4]/')::s3).* from s3; - --- select influx_mode(regex) (stub agg function, expose data, result) ---Testcase 501: -SELECT (influx_mode('/value[1,4]/')::s3).* from s3; - --- select stddev (agg function, explain) ---Testcase 502: -EXPLAIN VERBOSE -SELECT stddev((fields->>'value1')::float),stddev((fields->>'value2')::bigint),stddev((fields->>'value3')::float),stddev((fields->>'value4')::bigint) FROM s3; - --- select stddev (agg function, result) ---Testcase 503: -SELECT stddev((fields->>'value1')::float),stddev((fields->>'value2')::bigint),stddev((fields->>'value3')::float),stddev((fields->>'value4')::bigint) FROM s3; - --- select stddev (agg function and group by influx_time() and tag) (explain) ---Testcase 504: -EXPLAIN VERBOSE -SELECT stddev((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select stddev (agg function and group by influx_time() and tag) (result) ---Testcase 505: -SELECT stddev((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select stddev (agg function and group by tag only) (result) ---Testcase 506: -SELECT tags->>'tag1' tag1,stddev((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select stddev (agg function and other aggs) (result) ---Testcase 507: -SELECT sum((fields->>'value1')::float),stddev((fields->>'value1')::float),count(fields->>'value1') FROM s3; - --- select stddev(*) (stub agg function, explain) ---Testcase 508: -EXPLAIN VERBOSE -SELECT stddev_all(*) from s3; - --- select stddev(*) (stub agg function, result) ---Testcase 509: -SELECT stddev_all(*) from s3; - --- select stddev(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 510: -EXPLAIN VERBOSE -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select stddev(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 511: -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select stddev(*) (stub agg function and group by tag only) (explain) ---Testcase 512: -EXPLAIN VERBOSE -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select stddev(*) (stub agg function and group by tag only) (result) ---Testcase 513: -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select stddev(regex) (stub function, explain) ---Testcase 514: -EXPLAIN VERBOSE -SELECT stddev('/value[1,4]/') from s3; - --- select stddev(regex) (stub function, result) ---Testcase 515: -SELECT stddev('/value[1,4]/') from s3; - --- select stddev(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 516: -EXPLAIN VERBOSE -SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select stddev(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 517: -SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select stddev(regex) (stub agg function and group by tag only) (explain) ---Testcase 518: -EXPLAIN VERBOSE -SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select stddev(regex) (stub agg function and group by tag only) (result) ---Testcase 519: -SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_sum(*) (stub agg function, explain) ---Testcase 520: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) from s3; - --- select influx_sum(*) (stub agg function, result) ---Testcase 521: -SELECT influx_sum_all(*) from s3; - --- select influx_sum(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 522: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_sum(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 523: -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_sum(*) (stub agg function and group by tag only) (explain) ---Testcase 524: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_sum(*) (stub agg function and group by tag only) (result) ---Testcase 525: -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_sum(*) (stub agg function, expose data, explain) ---Testcase 526: -EXPLAIN VERBOSE -SELECT (influx_sum_all(*)::s3).* from s3; - --- select influx_sum(*) (stub agg function, expose data, result) ---Testcase 527: -SELECT (influx_sum_all(*)::s3).* from s3; - --- select influx_sum(regex) (stub function, explain) ---Testcase 528: -EXPLAIN VERBOSE -SELECT influx_sum('/value[1,4]/') from s3; - --- select influx_sum(regex) (stub function, result) ---Testcase 529: -SELECT influx_sum('/value[1,4]/') from s3; - --- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 530: -EXPLAIN VERBOSE -SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 531: -SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_sum(regex) (stub agg function and group by tag only) (explain) ---Testcase 532: -EXPLAIN VERBOSE -SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_sum(regex) (stub agg function and group by tag only) (result) ---Testcase 533: -SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_sum(regex) (stub agg function, expose data, explain) ---Testcase 534: -EXPLAIN VERBOSE -SELECT (influx_sum('/value[1,4]/')::s3).* from s3; - --- select influx_sum(regex) (stub agg function, expose data, result) ---Testcase 535: -SELECT (influx_sum('/value[1,4]/')::s3).* from s3; - --- selector function bottom() (explain) ---Testcase 536: -EXPLAIN VERBOSE -SELECT bottom((fields->>'value1')::float, 1) FROM s3; - --- selector function bottom() (result) ---Testcase 537: -SELECT bottom((fields->>'value1')::float, 1) FROM s3; - --- selector function bottom() cannot be combined with other functions(explain) ---Testcase 538: -EXPLAIN VERBOSE -SELECT bottom((fields->>'value1')::float, 1), bottom((fields->>'value2')::bigint, 1), bottom((fields->>'value3')::float, 1), bottom((fields->>'value4')::bigint, 1) FROM s3; - --- selector function bottom() cannot be combined with other functions(result) ---Testcase 539: -SELECT bottom((fields->>'value1')::float, 1), bottom((fields->>'value2')::bigint, 1), bottom((fields->>'value3')::float, 1), bottom((fields->>'value4')::bigint, 1) FROM s3; - --- select influx_max(*) (stub agg function, explain) ---Testcase 540: -EXPLAIN VERBOSE -SELECT influx_max_all(*) from s3; - --- select influx_max(*) (stub agg function, result) ---Testcase 541: -SELECT influx_max_all(*) from s3; - --- select influx_max(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 542: -EXPLAIN VERBOSE -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_max(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 543: -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_max(*) (stub agg function and group by tag only) (explain) ---Testcase 544: -EXPLAIN VERBOSE -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_max(*) (stub agg function and group by tag only) (result) ---Testcase 545: -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_max(*) (stub agg function, expose data, explain) ---Testcase 546: -EXPLAIN VERBOSE -SELECT (influx_max_all(*)::s3).* from s3; - --- select influx_max(*) (stub agg function, expose data, result) ---Testcase 547: -SELECT (influx_max_all(*)::s3).* from s3; - --- select influx_max(regex) (stub function, explain) ---Testcase 548: -EXPLAIN VERBOSE -SELECT influx_max('/value[1,4]/') from s3; - --- select influx_max(regex) (stub function, result) ---Testcase 549: -SELECT influx_max('/value[1,4]/') from s3; - --- select influx_max(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 550: -EXPLAIN VERBOSE -SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_max(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 551: -SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_max(regex) (stub agg function and group by tag only) (explain) ---Testcase 552: -EXPLAIN VERBOSE -SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_max(regex) (stub agg function and group by tag only) (result) ---Testcase 553: -SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_max(regex) (stub agg function, expose data, explain) ---Testcase 554: -EXPLAIN VERBOSE -SELECT (influx_max('/value[1,4]/')::s3).* from s3; - --- select influx_max(regex) (stub agg function, expose data, result) ---Testcase 555: -SELECT (influx_max('/value[1,4]/')::s3).* from s3; - --- select influx_min(*) (stub agg function, explain) ---Testcase 556: -EXPLAIN VERBOSE -SELECT influx_min_all(*) from s3; - --- select influx_min(*) (stub agg function, result) ---Testcase 557: -SELECT influx_min_all(*) from s3; - --- select influx_min(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 558: -EXPLAIN VERBOSE -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_min(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 559: -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_min(*) (stub agg function and group by tag only) (explain) ---Testcase 560: -EXPLAIN VERBOSE -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_min(*) (stub agg function and group by tag only) (result) ---Testcase 561: -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_min(*) (stub agg function, expose data, explain) ---Testcase 562: -EXPLAIN VERBOSE -SELECT (influx_min_all(*)::s3).* from s3; - --- select influx_min(*) (stub agg function, expose data, result) ---Testcase 563: -SELECT (influx_min_all(*)::s3).* from s3; - --- select influx_min(regex) (stub function, explain) ---Testcase 564: -EXPLAIN VERBOSE -SELECT influx_min('/value[1,4]/') from s3; - --- select influx_min(regex) (stub function, result) ---Testcase 565: -SELECT influx_min('/value[1,4]/') from s3; - --- select influx_min(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 566: -EXPLAIN VERBOSE -SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_min(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 567: -SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select influx_min(regex) (stub agg function and group by tag only) (explain) ---Testcase 568: -EXPLAIN VERBOSE -SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_min(regex) (stub agg function and group by tag only) (result) ---Testcase 569: -SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select influx_min(regex) (stub agg function, expose data, explain) ---Testcase 570: -EXPLAIN VERBOSE -SELECT (influx_min('/value[1,4]/')::s3).* from s3; - --- select influx_min(regex) (stub agg function, expose data, result) ---Testcase 571: -SELECT (influx_min('/value[1,4]/')::s3).* from s3; - --- selector function percentile() (explain) ---Testcase 572: -EXPLAIN VERBOSE -SELECT percentile((fields->>'value1')::float, 50), percentile((fields->>'value2')::bigint, 60), percentile((fields->>'value3')::float, 25), percentile((fields->>'value4')::bigint, 33) FROM s3; - --- selector function percentile() (result) ---Testcase 573: -SELECT percentile((fields->>'value1')::float, 50), percentile((fields->>'value2')::bigint, 60), percentile((fields->>'value3')::float, 25), percentile((fields->>'value4')::bigint, 33) FROM s3; - --- selector function percentile() (explain) ---Testcase 574: -EXPLAIN VERBOSE -SELECT percentile((fields->>'value1')::float, 1.5), percentile((fields->>'value2')::bigint, 6.7), percentile((fields->>'value3')::float, 20.5), percentile((fields->>'value4')::bigint, 75.2) FROM s3; - --- selector function percentile() (result) ---Testcase 575: -SELECT percentile((fields->>'value1')::float, 1.5), percentile((fields->>'value2')::bigint, 6.7), percentile((fields->>'value3')::float, 20.5), percentile((fields->>'value4')::bigint, 75.2) FROM s3; - --- select percentile(*, int) (stub agg function, explain) ---Testcase 576: -EXPLAIN VERBOSE -SELECT percentile_all(50) from s3; - --- select percentile(*, int) (stub agg function, result) ---Testcase 577: -SELECT percentile_all(50) from s3; - --- select percentile(*, float8) (stub agg function, explain) ---Testcase 578: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) from s3; - --- select percentile(*, float8) (stub agg function, result) ---Testcase 579: -SELECT percentile_all(70.5) from s3; - --- select percentile(*, int) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 580: -EXPLAIN VERBOSE -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select percentile(*, int) (stub agg function and group by influx_time() and tag) (result) ---Testcase 581: -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 582: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (result) ---Testcase 583: -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select percentile(*, int) (stub agg function and group by tag only) (explain) ---Testcase 584: -EXPLAIN VERBOSE -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select percentile(*, int) (stub agg function and group by tag only) (result) ---Testcase 585: -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select percentile(*, float8) (stub agg function and group by tag only) (explain) ---Testcase 586: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select percentile(*, float8) (stub agg function and group by tag only) (result) ---Testcase 587: -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select percentile(*, int) (stub agg function, expose data, explain) ---Testcase 588: -EXPLAIN VERBOSE -SELECT (percentile_all(50)::s3).* from s3; - --- select percentile(*, int) (stub agg function, expose data, result) ---Testcase 589: -SELECT (percentile_all(50)::s3).* from s3; - --- select percentile(*, int) (stub agg function, expose data, explain) ---Testcase 590: -EXPLAIN VERBOSE -SELECT (percentile_all(70.5)::s3).* from s3; - --- select percentile(*, int) (stub agg function, expose data, result) ---Testcase 591: -SELECT (percentile_all(70.5)::s3).* from s3; - --- select percentile(regex) (stub function, explain) ---Testcase 592: -EXPLAIN VERBOSE -SELECT percentile('/value[1,4]/', 50) from s3; - --- select percentile(regex) (stub function, result) ---Testcase 593: -SELECT percentile('/value[1,4]/', 50) from s3; - --- select percentile(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 594: -EXPLAIN VERBOSE -SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select percentile(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 595: -SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select percentile(regex) (stub agg function and group by tag only) (explain) ---Testcase 596: -EXPLAIN VERBOSE -SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select percentile(regex) (stub agg function and group by tag only) (result) ---Testcase 597: -SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select percentile(regex) (stub agg function, expose data, explain) ---Testcase 598: -EXPLAIN VERBOSE -SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; - --- select percentile(regex) (stub agg function, expose data, result) ---Testcase 599: -SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; - --- select percentile(regex) (stub agg function, expose data, explain) ---Testcase 600: -EXPLAIN VERBOSE -SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; - --- select percentile(regex) (stub agg function, expose data, result) ---Testcase 601: -SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; - --- selector function top(field_key,N) (explain) ---Testcase 602: -EXPLAIN VERBOSE -SELECT top((fields->>'value1')::float, 1) FROM s3; - --- selector function top(field_key,N) (result) ---Testcase 603: -SELECT top((fields->>'value1')::float, 1) FROM s3; - --- selector function top(field_key,tag_key(s),N) (explain) ---Testcase 604: -EXPLAIN VERBOSE -SELECT top((fields->>'value1')::float, tags->>'tag1', 1) FROM s3; - --- selector function top(field_key,tag_key(s),N) (result) ---Testcase 605: -SELECT top((fields->>'value1')::float, tags->>'tag1', 1) FROM s3; - --- selector function top() cannot be combined with other functions(explain) ---Testcase 606: -EXPLAIN VERBOSE -SELECT top((fields->>'value1')::float, 1), top((fields->>'value2')::bigint, 1), top((fields->>'value3')::float, 1), top((fields->>'value4')::bigint, 1) FROM s3; - --- selector function top() cannot be combined with other functions(result) ---Testcase 607: -SELECT top((fields->>'value1')::float, 1), top((fields->>'value2')::bigint, 1), top((fields->>'value3')::float, 1), top((fields->>'value4')::bigint, 1) FROM s3; - --- select acos (builtin function, explain) ---Testcase 608: -EXPLAIN VERBOSE -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3; - --- select acos (builtin function, result) ---Testcase 609: -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3; - --- select acos (builtin function, not pushdown constraints, explain) ---Testcase 610: -EXPLAIN VERBOSE -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; - --- select acos (builtin function, not pushdown constraints, result) ---Testcase 611: -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; - --- select acos (builtin function, pushdown constraints, explain) ---Testcase 612: -EXPLAIN VERBOSE -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select acos (builtin function, pushdown constraints, result) ---Testcase 613: -SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select acos as nest function with agg (pushdown, explain) ---Testcase 614: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float), acos(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select acos as nest function with agg (pushdown, result) ---Testcase 615: -SELECT sum((fields->>'value3')::float), acos(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select acos as nest with log2 (pushdown, explain) ---Testcase 616: -EXPLAIN VERBOSE -SELECT acos(log2((fields->>'value1')::float)),acos(log2(1/(fields->>'value1')::float)) FROM s3; - --- select acos as nest with log2 (pushdown, result) ---Testcase 617: -SELECT acos(log2((fields->>'value1')::float)),acos(log2(1/(fields->>'value1')::float)) FROM s3; - --- select acos with non pushdown func and explicit constant (explain) ---Testcase 618: -EXPLAIN VERBOSE -SELECT acos((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select acos with non pushdown func and explicit constant (result) ---Testcase 619: -SELECT acos((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select acos with order by (explain) ---Testcase 620: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY acos(1-(fields->>'value1')::float); - --- select acos with order by (result) ---Testcase 621: -SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY acos(1-(fields->>'value1')::float); - --- select acos with order by index (result) ---Testcase 622: -SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 2,1; - --- select acos with order by index (result) ---Testcase 623: -SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 1,2; - --- select acos and as ---Testcase 624: -SELECT acos((fields->>'value3')::float) as acos1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select acos(*) (stub agg function, explain) ---Testcase 625: -EXPLAIN VERBOSE -SELECT acos_all() from s3; - --- select acos(*) (stub agg function, result) ---Testcase 626: -SELECT acos_all() from s3; - --- select acos(*) (stub agg function and group by tag only) (explain) ---Testcase 627: -EXPLAIN VERBOSE -SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select acos(*) (stub agg function and group by tag only) (result) ---Testcase 628: -SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select acos(*) (stub agg function, expose data, explain) ---Testcase 629: -EXPLAIN VERBOSE -SELECT (acos_all()::s3).* from s3; - --- select acos(*) (stub agg function, expose data, result) ---Testcase 630: -SELECT (acos_all()::s3).* from s3; - --- select asin (builtin function, explain) ---Testcase 631: -EXPLAIN VERBOSE -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3; - --- select asin (builtin function, result) ---Testcase 632: -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3; - --- select asin (builtin function, not pushdown constraints, explain) ---Testcase 633: -EXPLAIN VERBOSE -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; - --- select asin (builtin function, not pushdown constraints, result) ---Testcase 634: -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; - --- select asin (builtin function, pushdown constraints, explain) ---Testcase 635: -EXPLAIN VERBOSE -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select asin (builtin function, pushdown constraints, result) ---Testcase 636: -SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select asin as nest function with agg (pushdown, explain) ---Testcase 637: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float), asin(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select asin as nest function with agg (pushdown, result) ---Testcase 638: -SELECT sum((fields->>'value3')::float), asin(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select asin as nest with log2 (pushdown, explain) ---Testcase 639: -EXPLAIN VERBOSE -SELECT asin(log2((fields->>'value1')::float)),asin(log2(1/(fields->>'value1')::float)) FROM s3; - --- select asin as nest with log2 (pushdown, result) ---Testcase 640: -SELECT asin(log2((fields->>'value1')::float)),asin(log2(1/(fields->>'value1')::float)) FROM s3; - --- select asin with non pushdown func and explicit constant (explain) ---Testcase 641: -EXPLAIN VERBOSE -SELECT asin((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select asin with non pushdown func and explicit constant (result) ---Testcase 642: -SELECT asin((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select asin with order by (explain) ---Testcase 643: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY asin(1-(fields->>'value1')::float); - --- select asin with order by (result) ---Testcase 644: -SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY asin(1-(fields->>'value1')::float); - --- select asin with order by index (result) ---Testcase 645: -SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 2,1; - --- select asin with order by index (result) ---Testcase 646: -SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 1,2; - --- select asin and as ---Testcase 647: -SELECT asin((fields->>'value3')::float) as asin1 FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select asin(*) (stub agg function, explain) ---Testcase 648: -EXPLAIN VERBOSE -SELECT asin_all() from s3; - --- select asin(*) (stub agg function, result) ---Testcase 649: -SELECT asin_all() from s3; - --- select asin(*) (stub agg function and group by tag only) (explain) ---Testcase 650: -EXPLAIN VERBOSE -SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select asin(*) (stub agg function and group by tag only) (result) ---Testcase 651: -SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select asin(*) (stub agg function, expose data, explain) ---Testcase 652: -EXPLAIN VERBOSE -SELECT (asin_all()::s3).* from s3; - --- select asin(*) (stub agg function, expose data, result) ---Testcase 653: -SELECT (asin_all()::s3).* from s3; - --- select atan (builtin function, explain) ---Testcase 654: -EXPLAIN VERBOSE -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3; - --- select atan (builtin function, result) ---Testcase 655: -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3; - --- select atan (builtin function, not pushdown constraints, explain) ---Testcase 656: -EXPLAIN VERBOSE -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select atan (builtin function, not pushdown constraints, result) ---Testcase 657: -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select atan (builtin function, pushdown constraints, explain) ---Testcase 658: -EXPLAIN VERBOSE -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select atan (builtin function, pushdown constraints, result) ---Testcase 659: -SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select atan as nest function with agg (pushdown, explain) ---Testcase 660: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),atan(sum((fields->>'value3')::float)) FROM s3; - --- select atan as nest function with agg (pushdown, result) ---Testcase 661: -SELECT sum((fields->>'value3')::float),atan(sum((fields->>'value3')::float)) FROM s3; - --- select atan as nest with log2 (pushdown, explain) ---Testcase 662: -EXPLAIN VERBOSE -SELECT atan(log2((fields->>'value1')::float)),atan(log2(1/(fields->>'value1')::float)) FROM s3; - --- select atan as nest with log2 (pushdown, result) ---Testcase 663: -SELECT atan(log2((fields->>'value1')::float)),atan(log2(1/(fields->>'value1')::float)) FROM s3; - --- select atan with non pushdown func and explicit constant (explain) ---Testcase 664: -EXPLAIN VERBOSE -SELECT atan((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select atan with non pushdown func and explicit constant (result) ---Testcase 665: -SELECT atan((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select atan with order by (explain) ---Testcase 666: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by atan(1-(fields->>'value1')::float); - --- select atan with order by (result) ---Testcase 667: -SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by atan(1-(fields->>'value1')::float); - --- select atan with order by index (result) ---Testcase 668: -SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by 2,1; - --- select atan with order by index (result) ---Testcase 669: -SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by 1,2; - --- select atan and as ---Testcase 670: -SELECT atan((fields->>'value3')::float) as atan1 FROM s3; - --- select atan(*) (stub agg function, explain) ---Testcase 671: -EXPLAIN VERBOSE -SELECT atan_all() from s3; - --- select atan(*) (stub agg function, result) ---Testcase 672: -SELECT atan_all() from s3; - --- select atan(*) (stub agg function and group by tag only) (explain) ---Testcase 673: -EXPLAIN VERBOSE -SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select atan(*) (stub agg function and group by tag only) (result) ---Testcase 674: -SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select atan(*) (stub agg function, expose data, explain) ---Testcase 675: -EXPLAIN VERBOSE -SELECT (atan_all()::s3).* from s3; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 676: -SELECT asin_all(), acos_all(), atan_all() FROM s3; - --- select atan2 (builtin function, explain) ---Testcase 677: -EXPLAIN VERBOSE -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3; - --- select atan2 (builtin function, result) ---Testcase 678: -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3; - --- select atan2 (builtin function, not pushdown constraints, explain) ---Testcase 679: -EXPLAIN VERBOSE -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select atan2 (builtin function, not pushdown constraints, result) ---Testcase 680: -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select atan2 (builtin function, pushdown constraints, explain) ---Testcase 681: -EXPLAIN VERBOSE -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select atan2 (builtin function, pushdown constraints, result) ---Testcase 682: -SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select atan2 as nest function with agg (pushdown, explain) ---Testcase 683: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float), sum((fields->>'value4')::bigint),atan2(sum((fields->>'value3')::float), sum((fields->>'value3')::float)) FROM s3; - --- select atan2 as nest function with agg (pushdown, result) ---Testcase 684: -SELECT sum((fields->>'value3')::float), sum((fields->>'value4')::bigint),atan2(sum((fields->>'value3')::float), sum((fields->>'value3')::float)) FROM s3; - --- select atan2 as nest with log2 (pushdown, explain) ---Testcase 685: -EXPLAIN VERBOSE -SELECT atan2(log2((fields->>'value1')::float), log2((fields->>'value1')::float)),atan2(log2(1/(fields->>'value1')::float), log2(1/(fields->>'value1')::float)) FROM s3; - --- select atan2 as nest with log2 (pushdown, result) ---Testcase 686: -SELECT atan2(log2((fields->>'value1')::float), log2((fields->>'value1')::float)),atan2(log2(1/(fields->>'value1')::float), log2(1/(fields->>'value1')::float)) FROM s3; - --- select atan2 with non pushdown func and explicit constant (explain) ---Testcase 687: -EXPLAIN VERBOSE -SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint), pi(), 4.1 FROM s3; - --- select atan2 with non pushdown func and explicit constant (result) ---Testcase 688: -SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint), pi(), 4.1 FROM s3; - --- select atan2 with order by (explain) ---Testcase 689: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint); - --- select atan2 with order by (result) ---Testcase 690: -SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint); - --- select atan2 with order by index (result) ---Testcase 691: -SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by 2,1; - --- select atan2 with order by index (result) ---Testcase 692: -SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by 1,2; - --- select atan2 and as ---Testcase 693: -SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint) as atan21 FROM s3; - --- select atan2(*) (stub function, explain) ---Testcase 694: -EXPLAIN VERBOSE -SELECT atan2_all((fields->>'value1')::float) from s3; - --- select atan2(*) (stub function, result) ---Testcase 695: -SELECT atan2_all((fields->>'value1')::float) from s3; - --- select ceil (builtin function, explain) ---Testcase 696: -EXPLAIN VERBOSE -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3; - --- select ceil (builtin function, result) ---Testcase 697: -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3; - --- select ceil (builtin function, not pushdown constraints, explain) ---Testcase 698: -EXPLAIN VERBOSE -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select ceil (builtin function, not pushdown constraints, result) ---Testcase 699: -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select ceil (builtin function, pushdown constraints, explain) ---Testcase 700: -EXPLAIN VERBOSE -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select ceil (builtin function, pushdown constraints, result) ---Testcase 701: -SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select ceil as nest function with agg (pushdown, explain) ---Testcase 702: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),ceil(sum((fields->>'value3')::float)) FROM s3; - --- select ceil as nest function with agg (pushdown, result) ---Testcase 703: -SELECT sum((fields->>'value3')::float),ceil(sum((fields->>'value3')::float)) FROM s3; - --- select ceil as nest with log2 (pushdown, explain) ---Testcase 704: -EXPLAIN VERBOSE -SELECT ceil(log2((fields->>'value1')::float)),ceil(log2(1/(fields->>'value1')::float)) FROM s3; - --- select ceil as nest with log2 (pushdown, result) ---Testcase 705: -SELECT ceil(log2((fields->>'value1')::float)),ceil(log2(1/(fields->>'value1')::float)) FROM s3; - --- select ceil with non pushdown func and explicit constant (explain) ---Testcase 706: -EXPLAIN VERBOSE -SELECT ceil((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select ceil with non pushdown func and explicit constant (result) ---Testcase 707: -SELECT ceil((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select ceil with order by (explain) ---Testcase 708: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by ceil(1-(fields->>'value1')::float); - --- select ceil with order by (result) ---Testcase 709: -SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by ceil(1-(fields->>'value1')::float); - --- select ceil with order by index (result) ---Testcase 710: -SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by 2,1; - --- select ceil with order by index (result) ---Testcase 711: -SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by 1,2; - --- select ceil and as ---Testcase 712: -SELECT ceil((fields->>'value3')::float) as ceil1 FROM s3; - --- select ceil(*) (stub agg function, explain) ---Testcase 713: -EXPLAIN VERBOSE -SELECT ceil_all() from s3; - --- select ceil(*) (stub agg function, result) ---Testcase 714: -SELECT ceil_all() from s3; - --- select ceil(*) (stub agg function and group by tag only) (explain) ---Testcase 715: -EXPLAIN VERBOSE -SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select ceil(*) (stub agg function and group by tag only) (result) ---Testcase 716: -SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select ceil(*) (stub agg function, expose data, explain) ---Testcase 717: -EXPLAIN VERBOSE -SELECT (ceil_all()::s3).* from s3; - --- select ceil(*) (stub agg function, expose data, result) ---Testcase 718: -SELECT (ceil_all()::s3).* from s3; - --- select cos (builtin function, explain) ---Testcase 719: -EXPLAIN VERBOSE -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3; - --- select cos (builtin function, result) ---Testcase 720: -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3; - --- select cos (builtin function, not pushdown constraints, explain) ---Testcase 721: -EXPLAIN VERBOSE -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select cos (builtin function, not pushdown constraints, result) ---Testcase 722: -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select cos (builtin function, pushdown constraints, explain) ---Testcase 723: -EXPLAIN VERBOSE -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select cos (builtin function, pushdown constraints, result) ---Testcase 724: -SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select cos as nest function with agg (pushdown, explain) ---Testcase 725: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),cos(sum((fields->>'value3')::float)) FROM s3; - --- select cos as nest function with agg (pushdown, result) ---Testcase 726: -SELECT sum((fields->>'value3')::float),cos(sum((fields->>'value3')::float)) FROM s3; - --- select cos as nest with log2 (pushdown, explain) ---Testcase 727: -EXPLAIN VERBOSE -SELECT cos(log2((fields->>'value1')::float)),cos(log2(1/(fields->>'value1')::float)) FROM s3; - --- select cos as nest with log2 (pushdown, result) ---Testcase 728: -SELECT cos(log2((fields->>'value1')::float)),cos(log2(1/(fields->>'value1')::float)) FROM s3; - --- select cos with non pushdown func and explicit constant (explain) ---Testcase 729: -EXPLAIN VERBOSE -SELECT cos((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select cos with non pushdown func and explicit constant (result) ---Testcase 730: -SELECT cos((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select cos with order by (explain) ---Testcase 731: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by cos(1-(fields->>'value1')::float); - --- select cos with order by (result) ---Testcase 732: -SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by cos(1-(fields->>'value1')::float); - --- select cos with order by index (result) ---Testcase 733: -SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by 2,1; - --- select cos with order by index (result) ---Testcase 734: -SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by 1,2; - --- select cos and as ---Testcase 735: -SELECT cos((fields->>'value3')::float) as cos1 FROM s3; - --- select cos(*) (stub agg function, explain) ---Testcase 736: -EXPLAIN VERBOSE -SELECT cos_all() from s3; - --- select cos(*) (stub agg function, result) ---Testcase 737: -SELECT cos_all() from s3; - --- select cos(*) (stub agg function and group by tag only) (explain) ---Testcase 738: -EXPLAIN VERBOSE -SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select cos(*) (stub agg function and group by tag only) (result) ---Testcase 739: -SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select exp (builtin function, explain) ---Testcase 740: -EXPLAIN VERBOSE -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3; - --- select exp (builtin function, result) ---Testcase 741: -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3; - --- select exp (builtin function, not pushdown constraints, explain) ---Testcase 742: -EXPLAIN VERBOSE -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select exp (builtin function, not pushdown constraints, result) ---Testcase 743: -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select exp (builtin function, pushdown constraints, explain) ---Testcase 744: -EXPLAIN VERBOSE -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select exp (builtin function, pushdown constraints, result) ---Testcase 745: -SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select exp as nest function with agg (pushdown, explain) ---Testcase 746: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),exp(sum((fields->>'value3')::float)) FROM s3; - --- select exp as nest function with agg (pushdown, result) ---Testcase 747: -SELECT sum((fields->>'value3')::float),exp(sum((fields->>'value3')::float)) FROM s3; - --- select exp as nest with log2 (pushdown, explain) ---Testcase 748: -EXPLAIN VERBOSE -SELECT exp(log2((fields->>'value1')::float)),exp(log2(1/(fields->>'value1')::float)) FROM s3; - --- select exp as nest with log2 (pushdown, result) ---Testcase 749: -SELECT exp(log2((fields->>'value1')::float)),exp(log2(1/(fields->>'value1')::float)) FROM s3; - --- select exp with non pushdown func and explicit constant (explain) ---Testcase 750: -EXPLAIN VERBOSE -SELECT exp((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select exp with non pushdown func and explicit constant (result) ---Testcase 751: -SELECT exp((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select exp with order by (explain) ---Testcase 752: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by exp(1-(fields->>'value1')::float); - --- select exp with order by (result) ---Testcase 753: -SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by exp(1-(fields->>'value1')::float); - --- select exp with order by index (result) ---Testcase 754: -SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by 2,1; - --- select exp with order by index (result) ---Testcase 755: -SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by 1,2; - --- select exp and as ---Testcase 756: -SELECT exp((fields->>'value3')::float) as exp1 FROM s3; - --- select exp(*) (stub agg function, explain) ---Testcase 757: -EXPLAIN VERBOSE -SELECT exp_all() from s3; - --- select exp(*) (stub agg function, result) ---Testcase 758: -SELECT exp_all() from s3; - --- select exp(*) (stub agg function and group by tag only) (explain) ---Testcase 759: -EXPLAIN VERBOSE -SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select exp(*) (stub agg function and group by tag only) (result) ---Testcase 760: -SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 761: -SELECT ceil_all(), cos_all(), exp_all() FROM s3; - --- select floor (builtin function, explain) ---Testcase 762: -EXPLAIN VERBOSE -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3; - --- select floor (builtin function, result) ---Testcase 763: -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3; - --- select floor (builtin function, not pushdown constraints, explain) ---Testcase 764: -EXPLAIN VERBOSE -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select floor (builtin function, not pushdown constraints, result) ---Testcase 765: -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select floor (builtin function, pushdown constraints, explain) ---Testcase 766: -EXPLAIN VERBOSE -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select floor (builtin function, pushdown constraints, result) ---Testcase 767: -SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select floor as nest function with agg (pushdown, explain) ---Testcase 768: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),floor(sum((fields->>'value3')::float)) FROM s3; - --- select floor as nest function with agg (pushdown, result) ---Testcase 769: -SELECT sum((fields->>'value3')::float),floor(sum((fields->>'value3')::float)) FROM s3; - --- select floor as nest with log2 (pushdown, explain) ---Testcase 770: -EXPLAIN VERBOSE -SELECT floor(log2((fields->>'value1')::float)),floor(log2(1/(fields->>'value1')::float)) FROM s3; - --- select floor as nest with log2 (pushdown, result) ---Testcase 771: -SELECT floor(log2((fields->>'value1')::float)),floor(log2(1/(fields->>'value1')::float)) FROM s3; - --- select floor with non pushdown func and explicit constant (explain) ---Testcase 772: -EXPLAIN VERBOSE -SELECT floor((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select floor with non pushdown func and explicit constant (result) ---Testcase 773: -SELECT floor((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select floor with order by (explain) ---Testcase 774: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by floor(1-(fields->>'value1')::float); - --- select floor with order by (result) ---Testcase 775: -SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by floor(1-(fields->>'value1')::float); - --- select floor with order by index (result) ---Testcase 776: -SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by 2,1; - --- select floor with order by index (result) ---Testcase 777: -SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by 1,2; - --- select floor and as ---Testcase 778: -SELECT floor((fields->>'value3')::float) as floor1 FROM s3; - --- select floor(*) (stub agg function, explain) ---Testcase 779: -EXPLAIN VERBOSE -SELECT floor_all() from s3; - --- select floor(*) (stub agg function, result) ---Testcase 780: -SELECT floor_all() from s3; - --- select floor(*) (stub agg function and group by tag only) (explain) ---Testcase 781: -EXPLAIN VERBOSE -SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select floor(*) (stub agg function and group by tag only) (result) ---Testcase 782: -SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select floor(*) (stub agg function, expose data, explain) ---Testcase 783: -EXPLAIN VERBOSE -SELECT (floor_all()::s3).* from s3; - --- select floor(*) (stub agg function, expose data, result) ---Testcase 784: -SELECT (floor_all()::s3).* from s3; - --- select ln (builtin function, explain) ---Testcase 785: -EXPLAIN VERBOSE -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3; - --- select ln (builtin function, result) ---Testcase 786: -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3; - --- select ln (builtin function, not pushdown constraints, explain) ---Testcase 787: -EXPLAIN VERBOSE -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select ln (builtin function, not pushdown constraints, result) ---Testcase 788: -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select ln (builtin function, pushdown constraints, explain) ---Testcase 789: -EXPLAIN VERBOSE -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select ln (builtin function, pushdown constraints, result) ---Testcase 790: -SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select ln as nest function with agg (pushdown, explain) ---Testcase 791: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),ln(sum((fields->>'value3')::float)) FROM s3; - --- select ln as nest function with agg (pushdown, result) ---Testcase 792: -SELECT sum((fields->>'value3')::float),ln(sum((fields->>'value3')::float)) FROM s3; - --- select ln as nest with log2 (pushdown, explain) ---Testcase 793: -EXPLAIN VERBOSE -SELECT ln(log2((fields->>'value1')::float)),ln(log2(1/(fields->>'value1')::float)) FROM s3; - --- select ln as nest with log2 (pushdown, result) ---Testcase 794: -SELECT ln(log2((fields->>'value1')::float)),ln(log2(1/(fields->>'value1')::float)) FROM s3; - --- select ln with non pushdown func and explicit constant (explain) ---Testcase 795: -EXPLAIN VERBOSE -SELECT ln((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select ln with non pushdown func and explicit constant (result) ---Testcase 796: -SELECT ln((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select ln with order by (explain) ---Testcase 797: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by ln(1-(fields->>'value1')::float); - --- select ln with order by (result) ---Testcase 798: -SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by ln(1-(fields->>'value1')::float); - --- select ln with order by index (result) ---Testcase 799: -SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by 2,1; - --- select ln with order by index (result) ---Testcase 800: -SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by 1,2; - --- select ln and as ---Testcase 801: -SELECT ln((fields->>'value1')::float) as ln1 FROM s3; - --- select ln(*) (stub agg function, explain) ---Testcase 802: -EXPLAIN VERBOSE -SELECT ln_all() from s3; - --- select ln(*) (stub agg function, result) ---Testcase 803: -SELECT ln_all() from s3; - --- select ln(*) (stub agg function and group by tag only) (explain) ---Testcase 804: -EXPLAIN VERBOSE -SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select ln(*) (stub agg function and group by tag only) (result) ---Testcase 805: -SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 806: -SELECT ln_all(), floor_all() FROM s3; - --- select pow (builtin function, explain) ---Testcase 807: -EXPLAIN VERBOSE -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3; - --- select pow (builtin function, result) ---Testcase 808: -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3; - --- select pow (builtin function, not pushdown constraints, explain) ---Testcase 809: -EXPLAIN VERBOSE -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select pow (builtin function, not pushdown constraints, result) ---Testcase 810: -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select pow (builtin function, pushdown constraints, explain) ---Testcase 811: -EXPLAIN VERBOSE -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select pow (builtin function, pushdown constraints, result) ---Testcase 812: -SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select pow as nest function with agg (pushdown, explain) ---Testcase 813: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),pow(sum((fields->>'value3')::float), 2) FROM s3; - --- select pow as nest function with agg (pushdown, result) ---Testcase 814: -SELECT sum((fields->>'value3')::float),pow(sum((fields->>'value3')::float), 2) FROM s3; - --- select pow as nest with log2 (pushdown, explain) ---Testcase 815: -EXPLAIN VERBOSE -SELECT pow(log2((fields->>'value1')::float), 2),pow(log2(1/(fields->>'value1')::float), 2) FROM s3; - --- select pow as nest with log2 (pushdown, result) ---Testcase 816: -SELECT pow(log2((fields->>'value1')::float), 2),pow(log2(1/(fields->>'value1')::float), 2) FROM s3; - --- select pow with non pushdown func and explicit constant (explain) ---Testcase 817: -EXPLAIN VERBOSE -SELECT pow((fields->>'value3')::float, 2), pi(), 4.1 FROM s3; - --- select pow with non pushdown func and explicit constant (result) ---Testcase 818: -SELECT pow((fields->>'value3')::float, 2), pi(), 4.1 FROM s3; - --- select pow with order by (explain) ---Testcase 819: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by pow(1-(fields->>'value1')::float, 2); - --- select pow with order by (result) ---Testcase 820: -SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by pow(1-(fields->>'value1')::float, 2); - --- select pow with order by index (result) ---Testcase 821: -SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by 2,1; - --- select pow with order by index (result) ---Testcase 822: -SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by 1,2; - --- select pow and as ---Testcase 823: -SELECT pow((fields->>'value3')::float, 2) as pow1 FROM s3; - --- select pow_all(2) (stub agg function, explain) ---Testcase 824: -EXPLAIN VERBOSE -SELECT pow_all(2) from s3; - --- select pow_all(2) (stub agg function, result) ---Testcase 825: -SELECT pow_all(2) from s3; - --- select pow_all(2) (stub agg function and group by tag only) (explain) ---Testcase 826: -EXPLAIN VERBOSE -SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select pow_all(2) (stub agg function and group by tag only) (result) ---Testcase 827: -SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select pow_all(2) (stub agg function, expose data, explain) ---Testcase 828: -EXPLAIN VERBOSE -SELECT (pow_all(2)::s3).* from s3; - --- select pow_all(2) (stub agg function, expose data, result) ---Testcase 829: -SELECT (pow_all(2)::s3).* from s3; - --- select round (builtin function, explain) ---Testcase 830: -EXPLAIN VERBOSE -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3; - --- select round (builtin function, result) ---Testcase 831: -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3; - --- select round (builtin function, not pushdown constraints, explain) ---Testcase 832: -EXPLAIN VERBOSE -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select round (builtin function, not pushdown constraints, result) ---Testcase 833: -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select round (builtin function, pushdown constraints, explain) ---Testcase 834: -EXPLAIN VERBOSE -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select round (builtin function, pushdown constraints, result) ---Testcase 835: -SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select round as nest function with agg (pushdown, explain) ---Testcase 836: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),round(sum((fields->>'value3')::float)) FROM s3; - --- select round as nest function with agg (pushdown, result) ---Testcase 837: -SELECT sum((fields->>'value3')::float),round(sum((fields->>'value3')::float)) FROM s3; - --- select round as nest with log2 (pushdown, explain) ---Testcase 838: -EXPLAIN VERBOSE -SELECT round(log2((fields->>'value1')::float)),round(log2(1/(fields->>'value1')::float)) FROM s3; - --- select round as nest with log2 (pushdown, result) ---Testcase 839: -SELECT round(log2((fields->>'value1')::float)),round(log2(1/(fields->>'value1')::float)) FROM s3; - --- select round with non pushdown func and roundlicit constant (explain) ---Testcase 840: -EXPLAIN VERBOSE -SELECT round((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select round with non pushdown func and roundlicit constant (result) ---Testcase 841: -SELECT round((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select round with order by (explain) ---Testcase 842: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by round(1-(fields->>'value1')::float); - --- select round with order by (result) ---Testcase 843: -SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by round(1-(fields->>'value1')::float); - --- select round with order by index (result) ---Testcase 844: -SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by 2,1; - --- select round with order by index (result) ---Testcase 845: -SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by 1,2; - --- select round and as ---Testcase 846: -SELECT round((fields->>'value3')::float) as round1 FROM s3; - --- select round(*) (stub agg function, explain) ---Testcase 847: -EXPLAIN VERBOSE -SELECT round_all() from s3; - --- select round(*) (stub agg function, result) ---Testcase 848: -SELECT round_all() from s3; - --- select round(*) (stub agg function and group by tag only) (explain) ---Testcase 849: -EXPLAIN VERBOSE -SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select round(*) (stub agg function and group by tag only) (result) ---Testcase 850: -SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select round(*) (stub agg function, expose data, explain) ---Testcase 851: -EXPLAIN VERBOSE -SELECT (round_all()::s3).* from s3; - --- select round(*) (stub agg function, expose data, result) ---Testcase 852: -SELECT (round_all()::s3).* from s3; - --- select sin (builtin function, explain) ---Testcase 853: -EXPLAIN VERBOSE -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3; - --- select sin (builtin function, result) ---Testcase 854: -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3; - --- select sin (builtin function, not pushdown constraints, explain) ---Testcase 855: -EXPLAIN VERBOSE -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select sin (builtin function, not pushdown constraints, result) ---Testcase 856: -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select sin (builtin function, pushdown constraints, explain) ---Testcase 857: -EXPLAIN VERBOSE -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select sin (builtin function, pushdown constraints, result) ---Testcase 858: -SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select sin as nest function with agg (pushdown, explain) ---Testcase 859: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),sin(sum((fields->>'value3')::float)) FROM s3; - --- select sin as nest function with agg (pushdown, result) ---Testcase 860: -SELECT sum((fields->>'value3')::float),sin(sum((fields->>'value3')::float)) FROM s3; - --- select sin as nest with log2 (pushdown, explain) ---Testcase 861: -EXPLAIN VERBOSE -SELECT sin(log2((fields->>'value1')::float)),sin(log2(1/(fields->>'value1')::float)) FROM s3; - --- select sin as nest with log2 (pushdown, result) ---Testcase 862: -SELECT sin(log2((fields->>'value1')::float)),sin(log2(1/(fields->>'value1')::float)) FROM s3; - --- select sin with non pushdown func and explicit constant (explain) ---Testcase 863: -EXPLAIN VERBOSE -SELECT sin((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select sin with non pushdown func and explicit constant (result) ---Testcase 864: -SELECT sin((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select sin with order by (explain) ---Testcase 865: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by sin(1-(fields->>'value1')::float); - --- select sin with order by (result) ---Testcase 866: -SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by sin(1-(fields->>'value1')::float); - --- select sin with order by index (result) ---Testcase 867: -SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by 2,1; - --- select sin with order by index (result) ---Testcase 868: -SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by 1,2; - --- select sin and as ---Testcase 869: -SELECT sin((fields->>'value3')::float) as sin1 FROM s3; - --- select sin(*) (stub agg function, explain) ---Testcase 870: -EXPLAIN VERBOSE -SELECT sin_all() from s3; - --- select sin(*) (stub agg function, result) ---Testcase 871: -SELECT sin_all() from s3; - --- select sin(*) (stub agg function and group by tag only) (explain) ---Testcase 872: -EXPLAIN VERBOSE -SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select sin(*) (stub agg function and group by tag only) (result) ---Testcase 873: -SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select tan (builtin function, explain) ---Testcase 874: -EXPLAIN VERBOSE -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3; - --- select tan (builtin function, result) ---Testcase 875: -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3; - --- select tan (builtin function, not pushdown constraints, explain) ---Testcase 876: -EXPLAIN VERBOSE -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select tan (builtin function, not pushdown constraints, result) ---Testcase 877: -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; - --- select tan (builtin function, pushdown constraints, explain) ---Testcase 878: -EXPLAIN VERBOSE -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select tan (builtin function, pushdown constraints, result) ---Testcase 879: -SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; - --- select tan as nest function with agg (pushdown, explain) ---Testcase 880: -EXPLAIN VERBOSE -SELECT sum((fields->>'value3')::float),tan(sum((fields->>'value3')::float)) FROM s3; - --- select tan as nest function with agg (pushdown, result) ---Testcase 881: -SELECT sum((fields->>'value3')::float),tan(sum((fields->>'value3')::float)) FROM s3; - --- select tan as nest with log2 (pushdown, explain) ---Testcase 882: -EXPLAIN VERBOSE -SELECT tan(log2((fields->>'value1')::float)),tan(log2(1/(fields->>'value1')::float)) FROM s3; - --- select tan as nest with log2 (pushdown, result) ---Testcase 883: -SELECT tan(log2((fields->>'value1')::float)),tan(log2(1/(fields->>'value1')::float)) FROM s3; - --- select tan with non pushdown func and tanlicit constant (explain) ---Testcase 884: -EXPLAIN VERBOSE -SELECT tan((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select tan with non pushdown func and tanlicit constant (result) ---Testcase 885: -SELECT tan((fields->>'value3')::float), pi(), 4.1 FROM s3; - --- select tan with order by (explain) ---Testcase 886: -EXPLAIN VERBOSE -SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by tan(1-(fields->>'value1')::float); - --- select tan with order by (result) ---Testcase 887: -SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by tan(1-(fields->>'value1')::float); - --- select tan with order by index (result) ---Testcase 888: -SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by 2,1; - --- select tan with order by index (result) ---Testcase 889: -SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by 1,2; - --- select tan and as ---Testcase 890: -SELECT tan((fields->>'value3')::float) as tan1 FROM s3; - --- select tan(*) (stub agg function, explain) ---Testcase 891: -EXPLAIN VERBOSE -SELECT tan_all() from s3; - --- select tan(*) (stub agg function, result) ---Testcase 892: -SELECT tan_all() from s3; - --- select tan(*) (stub agg function and group by tag only) (explain) ---Testcase 893: -EXPLAIN VERBOSE -SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select tan(*) (stub agg function and group by tag only) (result) ---Testcase 894: -SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 895: -SELECT sin_all(), round_all(), tan_all() FROM s3; - --- select predictors function holt_winters() (explain) ---Testcase 896: -EXPLAIN VERBOSE -SELECT holt_winters(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - --- select predictors function holt_winters() (result) ---Testcase 897: -SELECT holt_winters(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - --- select predictors function holt_winters_with_fit() (explain) ---Testcase 898: -EXPLAIN VERBOSE -SELECT holt_winters_with_fit(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - --- select predictors function holt_winters_with_fit() (result) ---Testcase 899: -SELECT holt_winters_with_fit(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - --- select count(*) function of InfluxDB (stub agg function, explain) ---Testcase 900: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3; - --- select count(*) function of InfluxDB (stub agg function, result) ---Testcase 901: -SELECT influx_count_all(*) FROM s3; - --- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (explain) ---Testcase 902: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (result) ---Testcase 903: -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select count(*) function of InfluxDB (stub agg function and group by tag only) (explain) ---Testcase 904: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select count(*) function of InfluxDB (stub agg function and group by tag only) (result) ---Testcase 905: -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select count(*) function of InfluxDB over join query (explain) ---Testcase 906: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select count(*) function of InfluxDB over join query (result, stub call error) ---Testcase 907: -SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select distinct (stub agg function, explain) ---Testcase 908: -EXPLAIN VERBOSE -SELECT influx_distinct((fields->>'value1')::float) FROM s3; - --- select distinct (stub agg function, result) ---Testcase 909: -SELECT influx_distinct((fields->>'value1')::float) FROM s3; - --- select distinct (stub agg function and group by influx_time() and tag) (explain) ---Testcase 910: -EXPLAIN VERBOSE -SELECT influx_distinct((fields->>'value1')::float), influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select distinct (stub agg function and group by influx_time() and tag) (result) ---Testcase 911: -SELECT influx_distinct((fields->>'value1')::float), influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; - --- select distinct (stub agg function and group by tag only) (explain) ---Testcase 912: -EXPLAIN VERBOSE -SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select distinct (stub agg function and group by tag only) (result) ---Testcase 913: -SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; - --- select distinct over join query (explain) ---Testcase 914: -EXPLAIN VERBOSE -SELECT influx_distinct((t1.fields->>'value2')::bigint) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select distinct over join query (result, stub call error) ---Testcase 915: -SELECT influx_distinct((t1.fields->>'value2')::bigint) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; - --- select distinct with having (explain) ---Testcase 916: -EXPLAIN VERBOSE -SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 HAVING influx_distinct((fields->>'value2')::bigint) > 100; - --- select distinct with having (result, not pushdown, stub call error) ---Testcase 917: -SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 HAVING influx_distinct((fields->>'value2')::bigint) > 100; - ---Testcase 918: -DROP FOREIGN TABLE s3; - ---Testcase 919: -CREATE FOREIGN TABLE b3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 'b3', tags 'tag1', schemaless 'true'); - --- bool type var in where clause (result) ---Testcase 920: -EXPLAIN VERBOSE -SELECT sqrt(abs((fields->>'value1')::float)) FROM b3 WHERE (fields->>'value3')::boolean != true ORDER BY 1; - --- bool type var in where clause (result) ---Testcase 921: -SELECT sqrt(abs((fields->>'value1')::float)) FROM b3 WHERE (fields->>'value3')::boolean != true ORDER BY 1; - ---Testcase 922: -DROP FOREIGN TABLE b3; - ---Testcase 923: -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 924: -DROP SERVER server1; ---Testcase 925: -DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/selectfunc.sql b/sql/14.0/selectfunc.sql deleted file mode 100644 index 038ca1d..0000000 --- a/sql/14.0/selectfunc.sql +++ /dev/null @@ -1,4049 +0,0 @@ ---Testcase 1: -SET datestyle=ISO; ---Testcase 2: -SET timezone='Japan'; - -\set ECHO none -\ir sql/parameters.conf -\set ECHO all - ---Testcase 3: -CREATE EXTENSION influxdb_fdw; ---Testcase 4: -CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - ---IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); ---Testcase 6: -CREATE FOREIGN TABLE s3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 float8, value4 bigint) SERVER server1 OPTIONS(table 's3', tags 'tag1'); - --- s3 (value1 as float8, value2 as bigint) ---Testcase 7: -\d s3; ---Testcase 8: -SELECT * FROM s3; - --- select float8() (not pushdown, remove float8, explain) ---Testcase 9: -EXPLAIN VERBOSE -SELECT float8(value1), float8(value2), float8(value3), float8(value4) FROM s3; - --- select float8() (not pushdown, remove float8, result) ---Testcase 10: -SELECT float8(value1), float8(value2), float8(value3), float8(value4) FROM s3; - --- select sqrt (builtin function, explain) ---Testcase 11: -EXPLAIN VERBOSE -SELECT sqrt(value1), sqrt(value2) FROM s3; - --- select sqrt (builtin function, result) ---Testcase 12: -SELECT sqrt(value1), sqrt(value2) FROM s3; - --- select sqrt (builtin function, not pushdown constraints, explain) ---Testcase 13: -EXPLAIN VERBOSE -SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE to_hex(value2) != '64'; - --- select sqrt (builtin function, not pushdown constraints, result) ---Testcase 14: -SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE to_hex(value2) != '64'; - --- select sqrt (builtin function, pushdown constraints, explain) ---Testcase 15: -EXPLAIN VERBOSE -SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE value2 != 200; - --- select sqrt (builtin function, pushdown constraints, result) ---Testcase 16: -SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE value2 != 200; - --- select sqrt(*) (stub agg function, explain) ---Testcase 17: -EXPLAIN VERBOSE -SELECT sqrt_all() from s3; - --- select sqrt(*) (stub agg function, result) ---Testcase 18: -SELECT sqrt_all() from s3; - --- select sqrt(*) (stub agg function and group by tag only) (explain) ---Testcase 19: -EXPLAIN VERBOSE -SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select sqrt(*) (stub agg function and group by tag only) (result) ---Testcase 20: -SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select abs (builtin function, explain) ---Testcase 21: -EXPLAIN VERBOSE -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3; - --- ABS() returns negative values if integer (https://github.com/influxdata/influxdb/issues/10261) --- select abs (builtin function, result) ---Testcase 22: -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3; - --- select abs (builtin function, not pushdown constraints, explain) ---Testcase 23: -EXPLAIN VERBOSE -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select abs (builtin function, not pushdown constraints, result) ---Testcase 24: -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select abs (builtin function, pushdown constraints, explain) ---Testcase 25: -EXPLAIN VERBOSE -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE value2 != 200; - --- select abs (builtin function, pushdown constraints, result) ---Testcase 26: -SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE value2 != 200; - --- select log (builtin function, need to swap arguments, numeric cast, explain) --- log_(v) : postgresql (base, v), influxdb (v, base) ---Testcase 27: -EXPLAIN VERBOSE -SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; - --- select log (builtin function, need to swap arguments, numeric cast, result) ---Testcase 28: -SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; - --- select log (builtin function, need to swap arguments, float8, explain) ---Testcase 29: -EXPLAIN VERBOSE -SELECT log(value1::numeric, 0.1) FROM s3 WHERE value1 != 1; - --- select log (builtin function, need to swap arguments, float8, result) ---Testcase 30: -SELECT log(value1::numeric, 0.1) FROM s3 WHERE value1 != 1; - --- select log (builtin function, need to swap arguments, bigint, explain) ---Testcase 31: -EXPLAIN VERBOSE -SELECT log(value2::numeric, 3::numeric) FROM s3 WHERE value1 != 1; - --- select log (builtin function, need to swap arguments, bigint, result) ---Testcase 32: -SELECT log(value2::numeric, 3::numeric) FROM s3 WHERE value1 != 1; - --- select log (builtin function, need to swap arguments, mix type, explain) ---Testcase 33: -EXPLAIN VERBOSE -SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; - --- select log (builtin function, need to swap arguments, mix type, result) ---Testcase 34: -SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; - --- select log(*) (stub agg function, explain) ---Testcase 35: -EXPLAIN VERBOSE -SELECT log_all(50) FROM s3; - --- select log(*) (stub agg function, result) ---Testcase 36: -SELECT log_all(50) FROM s3; - --- select log(*) (stub agg function, explain) ---Testcase 37: -EXPLAIN VERBOSE -SELECT log_all(70.5) FROM s3; - --- select log(*) (stub agg function, result) ---Testcase 38: -SELECT log_all(70.5) FROM s3; - --- select log(*) (stub agg function and group by tag only) (explain) ---Testcase 39: -EXPLAIN VERBOSE -SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select log(*) (stub agg function and group by tag only) (result) ---Testcase 40: -SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 41: -SELECT ln_all(),log10_all(),log_all(50) FROM s3; - --- select log2 (stub function, explain) ---Testcase 42: -EXPLAIN VERBOSE -SELECT log2(value1),log2(value2) FROM s3; - --- select log2 (stub function, result) ---Testcase 43: -SELECT log2(value1),log2(value2) FROM s3; - --- select log2(*) (stub agg function, explain) ---Testcase 44: -EXPLAIN VERBOSE -SELECT log2_all() from s3; - --- select log2(*) (stub agg function, result) ---Testcase 45: -SELECT log2_all() from s3; - --- select log2(*) (stub agg function and group by tag only) (explain) ---Testcase 46: -EXPLAIN VERBOSE -SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select log2(*) (stub agg function and group by tag only) (result) ---Testcase 47: -SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select log10 (stub function, explain) ---Testcase 48: -EXPLAIN VERBOSE -SELECT log10(value1),log10(value2) FROM s3; - --- select log10 (stub function, result) ---Testcase 49: -SELECT log10(value1),log10(value2) FROM s3; - --- select log10(*) (stub agg function, explain) ---Testcase 50: -EXPLAIN VERBOSE -SELECT log10_all() from s3; - --- select log10(*) (stub agg function, result) ---Testcase 51: -SELECT log10_all() from s3; - --- select log10(*) (stub agg function and group by tag only) (explain) ---Testcase 52: -EXPLAIN VERBOSE -SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select log10(*) (stub agg function and group by tag only) (result) ---Testcase 53: -SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 54: -SELECT log2_all(), log10_all() FROM s3; - --- select spread (stub agg function, explain) ---Testcase 55: -EXPLAIN VERBOSE -SELECT spread(value1),spread(value2),spread(value3),spread(value4) FROM s3; - --- select spread (stub agg function, result) ---Testcase 56: -SELECT spread(value1),spread(value2),spread(value3),spread(value4) FROM s3; - --- select spread (stub agg function, raise exception if not expected type) ---Testcase 57: -SELECT spread(value1::numeric),spread(value2::numeric),spread(value3::numeric),spread(value4::numeric) FROM s3; - --- select abs as nest function with agg (pushdown, explain) ---Testcase 58: -EXPLAIN VERBOSE -SELECT sum(value3),abs(sum(value3)) FROM s3; - --- select abs as nest function with agg (pushdown, result) ---Testcase 59: -SELECT sum(value3),abs(sum(value3)) FROM s3; - --- select abs as nest with log2 (pushdown, explain) ---Testcase 60: -EXPLAIN VERBOSE -SELECT abs(log2(value1)),abs(log2(1/value1)) FROM s3; - --- select abs as nest with log2 (pushdown, result) ---Testcase 61: -SELECT abs(log2(value1)),abs(log2(1/value1)) FROM s3; - --- select abs with non pushdown func and explicit constant (explain) ---Testcase 62: -EXPLAIN VERBOSE -SELECT abs(value3), pi(), 4.1 FROM s3; - --- select abs with non pushdown func and explicit constant (result) ---Testcase 63: -SELECT abs(value3), pi(), 4.1 FROM s3; - --- select sqrt as nest function with agg and explicit constant (pushdown, explain) ---Testcase 64: -EXPLAIN VERBOSE -SELECT sqrt(count(value1)), pi(), 4.1 FROM s3; - --- select sqrt as nest function with agg and explicit constant (pushdown, result) ---Testcase 65: -SELECT sqrt(count(value1)), pi(), 4.1 FROM s3; - --- select sqrt as nest function with agg and explicit constant and tag (error, explain) ---Testcase 66: -EXPLAIN VERBOSE -SELECT sqrt(count(value1)), pi(), 4.1, tag1 FROM s3; - --- select spread (stub agg function and group by influx_time() and tag) (explain) ---Testcase 67: -EXPLAIN VERBOSE -SELECT spread("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select spread (stub agg function and group by influx_time() and tag) (result) ---Testcase 68: -SELECT spread("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select spread (stub agg function and group by tag only) (result) ---Testcase 69: -SELECT tag1,spread("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select spread (stub agg function and other aggs) (result) ---Testcase 70: -SELECT sum("value1"),spread("value1"),count("value1") FROM s3; - --- select abs with order by (explain) ---Testcase 71: -EXPLAIN VERBOSE -SELECT value1, abs(1-value1) FROM s3 order by abs(1-value1); - --- select abs with order by (result) ---Testcase 72: -SELECT value1, abs(1-value1) FROM s3 order by abs(1-value1); - --- select abs with order by index (result) ---Testcase 73: -SELECT value1, abs(1-value1) FROM s3 order by 2,1; - --- select abs with order by index (result) ---Testcase 74: -SELECT value1, abs(1-value1) FROM s3 order by 1,2; - --- select abs and as ---Testcase 75: -SELECT abs(value3) as abs1 FROM s3; - --- select abs(*) (stub agg function, explain) ---Testcase 76: -EXPLAIN VERBOSE -SELECT abs_all() from s3; - --- select abs(*) (stub agg function, result) ---Testcase 77: -SELECT abs_all() from s3; - --- select abs(*) (stub agg function and group by tag only) (explain) ---Testcase 78: -EXPLAIN VERBOSE -SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select abs(*) (stub agg function and group by tag only) (result) ---Testcase 79: -SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select abs(*) (stub agg function, expose data, explain) ---Testcase 80: -EXPLAIN VERBOSE -SELECT (abs_all()::s3).* from s3; - --- select abs(*) (stub agg function, expose data, result) ---Testcase 81: -SELECT (abs_all()::s3).* from s3; - --- select spread over join query (explain) ---Testcase 82: -EXPLAIN VERBOSE -SELECT spread(t1.value1), spread(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select spread over join query (result, stub call error) ---Testcase 83: -SELECT spread(t1.value1), spread(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select spread with having (explain) ---Testcase 84: -EXPLAIN VERBOSE -SELECT spread(value1) FROM s3 HAVING spread(value1) > 100; - --- select spread with having (result, not pushdown, stub call error) ---Testcase 85: -SELECT spread(value1) FROM s3 HAVING spread(value1) > 100; - --- select spread(*) (stub agg function, explain) ---Testcase 86: -EXPLAIN VERBOSE -SELECT spread_all(*) from s3; - --- select spread(*) (stub agg function, result) ---Testcase 87: -SELECT spread_all(*) from s3; - --- select spread(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 88: -EXPLAIN VERBOSE -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select spread(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 89: -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select spread(*) (stub agg function and group by tag only) (explain) ---Testcase 90: -EXPLAIN VERBOSE -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select spread(*) (stub agg function and group by tag only) (result) ---Testcase 91: -SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select spread(*) (stub agg function, expose data, explain) ---Testcase 92: -EXPLAIN VERBOSE -SELECT (spread_all(*)::s3).* from s3; - --- select spread(*) (stub agg function, expose data, result) ---Testcase 93: -SELECT (spread_all(*)::s3).* from s3; - --- select spread(regex) (stub agg function, explain) ---Testcase 94: -EXPLAIN VERBOSE -SELECT spread('/value[1,4]/') from s3; - --- select spread(regex) (stub agg function, result) ---Testcase 95: -SELECT spread('/value[1,4]/') from s3; - --- select spread(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 96: -EXPLAIN VERBOSE -SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select spread(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 97: -SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select spread(regex) (stub agg function and group by tag only) (explain) ---Testcase 98: -EXPLAIN VERBOSE -SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select spread(regex) (stub agg function and group by tag only) (result) ---Testcase 99: -SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select spread(regex) (stub agg function, expose data, explain) ---Testcase 100: -EXPLAIN VERBOSE -SELECT (spread('/value[1,4]/')::s3).* from s3; - --- select spread(regex) (stub agg function, expose data, result) ---Testcase 101: -SELECT (spread('/value[1,4]/')::s3).* from s3; - --- select abs with arithmetic and tag in the middle (explain) ---Testcase 102: -EXPLAIN VERBOSE -SELECT abs(value1) + 1, value2, tag1, sqrt(value2) FROM s3; - --- select abs with arithmetic and tag in the middle (result) ---Testcase 103: -SELECT abs(value1) + 1, value2, tag1, sqrt(value2) FROM s3; - --- select with order by limit (explain) ---Testcase 104: -EXPLAIN VERBOSE -SELECT abs(value1), abs(value3), sqrt(value2) FROM s3 ORDER BY abs(value3) LIMIT 1; - --- select with order by limit (result) ---Testcase 105: -SELECT abs(value1), abs(value3), sqrt(value2) FROM s3 ORDER BY abs(value3) LIMIT 1; - --- select mixing with non pushdown func (all not pushdown, explain) ---Testcase 106: -EXPLAIN VERBOSE -SELECT abs(value1), sqrt(value2), upper(tag1) FROM s3; - --- select mixing with non pushdown func (result) ---Testcase 107: -SELECT abs(value1), sqrt(value2), upper(tag1) FROM s3; - --- nested function in where clause (explain) ---Testcase 108: -EXPLAIN VERBOSE -SELECT sqrt(abs(value3)),min(value1) FROM s3 GROUP BY value3 HAVING sqrt(abs(value3)) > 0 ORDER BY 1,2; - --- nested function in where clause (result) ---Testcase 109: -SELECT sqrt(abs(value3)),min(value1) FROM s3 GROUP BY value3 HAVING sqrt(abs(value3)) > 0 ORDER BY 1,2; - ---Testcase 110: -EXPLAIN VERBOSE -SELECT first(time, value1), first(time, value2), first(time, value3), first(time, value4) FROM s3; - ---Testcase 111: -SELECT first(time, value1), first(time, value2), first(time, value3), first(time, value4) FROM s3; - --- select first(*) (stub agg function, explain) ---Testcase 112: -EXPLAIN VERBOSE -SELECT first_all(*) from s3; - --- select first(*) (stub agg function, result) ---Testcase 113: -SELECT first_all(*) from s3; - --- select first(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 114: -EXPLAIN VERBOSE -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select first(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 115: -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select first(*) (stub agg function and group by tag only) (explain) ---Testcase 116: -EXPLAIN VERBOSE -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select first(*) (stub agg function and group by tag only) (result) ---Testcase 117: -SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select first(*) (stub agg function, expose data, explain) ---Testcase 118: -EXPLAIN VERBOSE -SELECT (first_all(*)::s3).* from s3; - --- select first(*) (stub agg function, expose data, result) ---Testcase 119: -SELECT (first_all(*)::s3).* from s3; - --- select first(regex) (stub function, explain) ---Testcase 120: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/') from s3; - --- select first(regex) (stub function, explain) ---Testcase 121: -SELECT first('/value[1,4]/') from s3; - --- select multiple regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 122: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; - --- select multiple regex functions (do not push down, raise warning and stub error) (result) ---Testcase 123: -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; - --- select first(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 124: -EXPLAIN VERBOSE -SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select first(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 125: -SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select first(regex) (stub agg function and group by tag only) (explain) ---Testcase 126: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select first(regex) (stub agg function and group by tag only) (result) ---Testcase 127: -SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select first(regex) (stub agg function, expose data, explain) ---Testcase 128: -EXPLAIN VERBOSE -SELECT (first('/value[1,4]/')::s3).* from s3; - --- select first(regex) (stub agg function, expose data, result) ---Testcase 129: -SELECT (first('/value[1,4]/')::s3).* from s3; - ---Testcase 130: -EXPLAIN VERBOSE -SELECT last(time, value1), last(time, value2), last(time, value3), last(time, value4) FROM s3; - ---Testcase 131: -SELECT last(time, value1), last(time, value2), last(time, value3), last(time, value4) FROM s3; - --- select last(*) (stub agg function, explain) ---Testcase 132: -EXPLAIN VERBOSE -SELECT last_all(*) from s3; - --- select last(*) (stub agg function, result) ---Testcase 133: -SELECT last_all(*) from s3; - --- select last(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 134: -EXPLAIN VERBOSE -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select last(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 135: -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select last(*) (stub agg function and group by tag only) (explain) ---Testcase 136: -EXPLAIN VERBOSE -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select last(*) (stub agg function and group by tag only) (result) ---Testcase 137: -SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select last(*) (stub agg function, expose data, explain) ---Testcase 138: -EXPLAIN VERBOSE -SELECT (last_all(*)::s3).* from s3; - --- select last(*) (stub agg function, expose data, result) ---Testcase 139: -SELECT (last_all(*)::s3).* from s3; - --- select last(regex) (stub function, explain) ---Testcase 140: -EXPLAIN VERBOSE -SELECT last('/value[1,4]/') from s3; - --- select last(regex) (stub function, result) ---Testcase 141: -SELECT last('/value[1,4]/') from s3; - --- select multiple regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 142: -EXPLAIN VERBOSE -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; - --- select multiple regex functions (do not push down, raise warning and stub error) (result) ---Testcase 143: -SELECT first('/value[1,4]/'), first('/^v.*/') from s3; - --- select last(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 144: -EXPLAIN VERBOSE -SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select last(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 145: -SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select last(regex) (stub agg function and group by tag only) (explain) ---Testcase 146: -EXPLAIN VERBOSE -SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select last(regex) (stub agg function and group by tag only) (result) ---Testcase 147: -SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select last(regex) (stub agg function, expose data, explain) ---Testcase 148: -EXPLAIN VERBOSE -SELECT (last('/value[1,4]/')::s3).* from s3; - --- select last(regex) (stub agg function, expose data, result) ---Testcase 149: -SELECT (last('/value[1,4]/')::s3).* from s3; - ---Testcase 150: -EXPLAIN VERBOSE -SELECT sample(value2, 3) FROM s3 WHERE value2 < 200; - ---Testcase 151: -SELECT sample(value2, 3) FROM s3 WHERE value2 < 200; - ---Testcase 152: -EXPLAIN VERBOSE -SELECT sample(value2, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); - ---Testcase 153: -SELECT sample(value2, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); - --- select sample(*, int) (stub agg function, explain) ---Testcase 154: -EXPLAIN VERBOSE -SELECT sample_all(50) from s3; - --- select sample(*, int) (stub agg function, result) ---Testcase 155: -SELECT sample_all(50) from s3; - --- select sample(*, int) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 156: -EXPLAIN VERBOSE -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select sample(*, int) (stub agg function and group by influx_time() and tag) (result) ---Testcase 157: -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select sample(*, int) (stub agg function and group by tag only) (explain) ---Testcase 158: -EXPLAIN VERBOSE -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select sample(*, int) (stub agg function and group by tag only) (result) ---Testcase 159: -SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select sample(*, int) (stub agg function, expose data, explain) ---Testcase 160: -EXPLAIN VERBOSE -SELECT (sample_all(50)::s3).* from s3; - --- select sample(*, int) (stub agg function, expose data, result) ---Testcase 161: -SELECT (sample_all(50)::s3).* from s3; - --- select sample(regex) (stub agg function, explain) ---Testcase 162: -EXPLAIN VERBOSE -SELECT sample('/value[1,4]/', 50) from s3; - --- select sample(regex) (stub agg function, result) ---Testcase 163: -SELECT sample('/value[1,4]/', 50) from s3; - --- select sample(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 164: -EXPLAIN VERBOSE -SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select sample(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 165: -SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select sample(regex) (stub agg function and group by tag only) (explain) ---Testcase 166: -EXPLAIN VERBOSE -SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select sample(regex) (stub agg function and group by tag only) (result) ---Testcase 167: -SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select sample(regex) (stub agg function, expose data, explain) ---Testcase 168: -EXPLAIN VERBOSE -SELECT (sample('/value[1,4]/', 50)::s3).* from s3; - --- select sample(regex) (stub agg function, expose data, result) ---Testcase 169: -SELECT (sample('/value[1,4]/', 50)::s3).* from s3; - ---Testcase 170: -EXPLAIN VERBOSE -SELECT cumulative_sum(value1),cumulative_sum(value2),cumulative_sum(value3),cumulative_sum(value4) FROM s3; - ---Testcase 171: -SELECT cumulative_sum(value1),cumulative_sum(value2),cumulative_sum(value3),cumulative_sum(value4) FROM s3; - --- select cumulative_sum(*) (stub function, explain) ---Testcase 172: -EXPLAIN VERBOSE -SELECT cumulative_sum_all() from s3; - --- select cumulative_sum(*) (stub function, result) ---Testcase 173: -SELECT cumulative_sum_all() from s3; - --- select cumulative_sum(regex) (stub function, result) ---Testcase 174: -SELECT cumulative_sum('/value[1,4]/') from s3; - --- select cumulative_sum(regex) (stub function, result) ---Testcase 175: -SELECT cumulative_sum('/value[1,4]/') from s3; - --- select multiple star and regex functions (do not push down, raise warning and stub error) (result) ---Testcase 176: -EXPLAIN VERBOSE -SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; - --- select multiple star and regex functions (do not push down, raise warning and stub error) (result) ---Testcase 177: -SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; - --- select cumulative_sum(*) (stub function and group by tag only) (explain) ---Testcase 178: -EXPLAIN VERBOSE -SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select cumulative_sum(*) (stub function and group by tag only) (result) ---Testcase 179: -SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select cumulative_sum(regex) (stub function and group by tag only) (explain) ---Testcase 180: -EXPLAIN VERBOSE -SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select cumulative_sum(regex) (stub function and group by tag only) (result) ---Testcase 181: -SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, explain) ---Testcase 182: -EXPLAIN VERBOSE -SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; - --- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, result) ---Testcase 183: -SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; - ---Testcase 184: -EXPLAIN VERBOSE -SELECT derivative(value1),derivative(value2),derivative(value3),derivative(value4) FROM s3; - ---Testcase 185: -SELECT derivative(value1),derivative(value2),derivative(value3),derivative(value4) FROM s3; - ---Testcase 186: -EXPLAIN VERBOSE -SELECT derivative(value1, interval '0.5s'),derivative(value2, interval '0.2s'),derivative(value3, interval '0.1s'),derivative(value4, interval '2s') FROM s3; - ---Testcase 187: -SELECT derivative(value1, interval '0.5s'),derivative(value2, interval '0.2s'),derivative(value3, interval '0.1s'),derivative(value4, interval '2s') FROM s3; - --- select derivative(*) (stub function, explain) ---Testcase 188: -EXPLAIN VERBOSE -SELECT derivative_all() from s3; - --- select derivative(*) (stub function, result) ---Testcase 189: -SELECT derivative_all() from s3; - --- select derivative(regex) (stub function, explain) ---Testcase 190: -EXPLAIN VERBOSE -SELECT derivative('/value[1,4]/') from s3; - --- select derivative(regex) (stub function, result) ---Testcase 191: -SELECT derivative('/value[1,4]/') from s3; - --- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 192: -EXPLAIN VERBOSE -SELECT derivative_all(), derivative('/value[1,4]/') from s3; - --- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) ---Testcase 193: -SELECT derivative_all(), derivative('/value[1,4]/') from s3; - --- select derivative(*) (stub function and group by tag only) (explain) ---Testcase 194: -EXPLAIN VERBOSE -SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select derivative(*) (stub function and group by tag only) (result) ---Testcase 195: -SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select derivative(regex) (stub function and group by tag only) (explain) ---Testcase 196: -EXPLAIN VERBOSE -SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select derivative(regex) (stub function and group by tag only) (result) ---Testcase 197: -SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select derivative(*) (stub agg function, expose data, explain) ---Testcase 198: -EXPLAIN VERBOSE -SELECT (derivative_all()::s3).* from s3; - --- select derivative(*) (stub agg function, expose data, result) ---Testcase 199: -SELECT (derivative_all()::s3).* from s3; - --- select derivative(regex) (stub agg function, expose data, explain) ---Testcase 200: -EXPLAIN VERBOSE -SELECT (derivative('/value[1,4]/')::s3).* from s3; - --- select derivative(regex) (stub agg function, expose data, result) ---Testcase 201: -SELECT (derivative('/value[1,4]/')::s3).* from s3; - ---Testcase 202: -EXPLAIN VERBOSE -SELECT non_negative_derivative(value1),non_negative_derivative(value2),non_negative_derivative(value3),non_negative_derivative(value4) FROM s3; - ---Testcase 203: -SELECT non_negative_derivative(value1),non_negative_derivative(value2),non_negative_derivative(value3),non_negative_derivative(value4) FROM s3; - ---Testcase 204: -EXPLAIN VERBOSE -SELECT non_negative_derivative(value1, interval '0.5s'),non_negative_derivative(value2, interval '0.2s'),non_negative_derivative(value3, interval '0.1s'),non_negative_derivative(value4, interval '2s') FROM s3; - ---Testcase 205: -SELECT non_negative_derivative(value1, interval '0.5s'),non_negative_derivative(value2, interval '0.2s'),non_negative_derivative(value3, interval '0.1s'),non_negative_derivative(value4, interval '2s') FROM s3; - --- select non_negative_derivative(*) (stub function, explain) ---Testcase 206: -EXPLAIN VERBOSE -SELECT non_negative_derivative_all() from s3; - --- select non_negative_derivative(*) (stub function, result) ---Testcase 207: -SELECT non_negative_derivative_all() from s3; - --- select non_negative_derivative(regex) (stub function, explain) ---Testcase 208: -EXPLAIN VERBOSE -SELECT non_negative_derivative('/value[1,4]/') from s3; - --- select non_negative_derivative(regex) (stub function, result) ---Testcase 209: -SELECT non_negative_derivative('/value[1,4]/') from s3; - --- select non_negative_derivative(*) (stub function and group by tag only) (explain) ---Testcase 210: -EXPLAIN VERBOSE -SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select non_negative_derivative(*) (stub function and group by tag only) (result) ---Testcase 211: -SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select non_negative_derivative(regex) (stub function and group by tag only) (explain) ---Testcase 212: -EXPLAIN VERBOSE -SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select non_negative_derivative(regex) (stub agg function and group by tag only) (result) ---Testcase 213: -SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select non_negative_derivative(*) (stub function, expose data, explain) ---Testcase 214: -EXPLAIN VERBOSE -SELECT (non_negative_derivative_all()::s3).* from s3; - --- select non_negative_derivative(*) (stub agg function, expose data, result) ---Testcase 215: -SELECT (non_negative_derivative_all()::s3).* from s3; - --- select non_negative_derivative(regex) (stub function, expose data, explain) ---Testcase 216: -EXPLAIN VERBOSE -SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; - --- select non_negative_derivative(regex) (stub agg function, expose data, result) ---Testcase 217: -SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; - ---Testcase 218: -EXPLAIN VERBOSE -SELECT difference(value1),difference(value2),difference(value3),difference(value4) FROM s3; - ---Testcase 219: -SELECT difference(value1),difference(value2),difference(value3),difference(value4) FROM s3; - --- select difference(*) (stub function, explain) ---Testcase 220: -EXPLAIN VERBOSE -SELECT difference_all() from s3; - --- select difference(*) (stub function, result) ---Testcase 221: -SELECT difference_all() from s3; - --- select difference(regex) (stub function, explain) ---Testcase 222: -EXPLAIN VERBOSE -SELECT difference('/value[1,4]/') from s3; - --- select difference(regex) (stub function, result) ---Testcase 223: -SELECT difference('/value[1,4]/') from s3; - --- select difference(*) (stub agg function and group by tag only) (explain) ---Testcase 224: -EXPLAIN VERBOSE -SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select difference(*) (stub agg function and group by tag only) (result) ---Testcase 225: -SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select difference(regex) (stub agg function and group by tag only) (explain) ---Testcase 226: -EXPLAIN VERBOSE -SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select difference(regex) (stub agg function and group by tag only) (result) ---Testcase 227: -SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select difference(*) (stub function, expose data, explain) ---Testcase 228: -EXPLAIN VERBOSE -SELECT (difference_all()::s3).* from s3; - --- select difference(*) (stub function, expose data, result) ---Testcase 229: -SELECT (difference_all()::s3).* from s3; - --- select difference(regex) (stub function, expose data, explain) ---Testcase 230: -EXPLAIN VERBOSE -SELECT (difference('/value[1,4]/')::s3).* from s3; - --- select difference(regex) (stub function, expose data, result) ---Testcase 231: -SELECT (difference('/value[1,4]/')::s3).* from s3; - ---Testcase 232: -EXPLAIN VERBOSE -SELECT non_negative_difference(value1),non_negative_difference(value2),non_negative_difference(value3),non_negative_difference(value4) FROM s3; - ---Testcase 233: -SELECT non_negative_difference(value1),non_negative_difference(value2),non_negative_difference(value3),non_negative_difference(value4) FROM s3; - --- select non_negative_difference(*) (stub function, explain) ---Testcase 234: -EXPLAIN VERBOSE -SELECT non_negative_difference_all() from s3; - --- select non_negative_difference(*) (stub function, result) ---Testcase 235: -SELECT non_negative_difference_all() from s3; - --- select non_negative_difference(regex) (stub agg function, explain) ---Testcase 236: -EXPLAIN VERBOSE -SELECT non_negative_difference('/value[1,4]/') from s3; - --- select non_negative_difference(*), non_negative_difference(regex) (stub function, result) ---Testcase 237: -SELECT non_negative_difference('/value[1,4]/') from s3; - --- select non_negative_difference(*) (stub function and group by tag only) (explain) ---Testcase 238: -EXPLAIN VERBOSE -SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select non_negative_difference(*) (stub function and group by tag only) (result) ---Testcase 239: -SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select non_negative_difference(regex) (stub function and group by tag only) (explain) ---Testcase 240: -EXPLAIN VERBOSE -SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select non_negative_difference(regex) (stub function and group by tag only) (result) ---Testcase 241: -SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select non_negative_difference(*) (stub function, expose data, explain) ---Testcase 242: -EXPLAIN VERBOSE -SELECT (non_negative_difference_all()::s3).* from s3; - --- select non_negative_difference(*) (stub function, expose data, result) ---Testcase 243: -SELECT (non_negative_difference_all()::s3).* from s3; - --- select non_negative_difference(regex) (stub function, expose data, explain) ---Testcase 244: -EXPLAIN VERBOSE -SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; - --- select non_negative_difference(regex) (stub function, expose data, result) ---Testcase 245: -SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; - ---Testcase 246: -EXPLAIN VERBOSE -SELECT elapsed(value1),elapsed(value2),elapsed(value3),elapsed(value4) FROM s3; - ---Testcase 247: -SELECT elapsed(value1),elapsed(value2),elapsed(value3),elapsed(value4) FROM s3; - ---Testcase 248: -EXPLAIN VERBOSE -SELECT elapsed(value1, interval '0.5s'),elapsed(value2, interval '0.2s'),elapsed(value3, interval '0.1s'),elapsed(value4, interval '2s') FROM s3; - ---Testcase 249: -SELECT elapsed(value1, interval '0.5s'),elapsed(value2, interval '0.2s'),elapsed(value3, interval '0.1s'),elapsed(value4, interval '2s') FROM s3; - --- select elapsed(*) (stub function, explain) ---Testcase 250: -EXPLAIN VERBOSE -SELECT elapsed_all() from s3; - --- select elapsed(*) (stub function, result) ---Testcase 251: -SELECT elapsed_all() from s3; - --- select elapsed(regex) (stub function, explain) ---Testcase 252: -EXPLAIN VERBOSE -SELECT elapsed('/value[1,4]/') from s3; - --- select elapsed(regex) (stub agg function, result) ---Testcase 253: -SELECT elapsed('/value[1,4]/') from s3; - --- select elapsed(*) (stub function and group by tag only) (explain) ---Testcase 254: -EXPLAIN VERBOSE -SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select elapsed(*) (stub function and group by tag only) (result) ---Testcase 255: -SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select elapsed(regex) (stub function and group by tag only) (explain) ---Testcase 256: -EXPLAIN VERBOSE -SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select elapsed(regex) (stub function and group by tag only) (result) ---Testcase 257: -SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select elapsed(*) (stub function, expose data, explain) ---Testcase 258: -EXPLAIN VERBOSE -SELECT (elapsed_all()::s3).* from s3; - --- select elapsed(*) (stub function, expose data, result) ---Testcase 259: -SELECT (elapsed_all()::s3).* from s3; - --- select elapsed(regex) (stub function, expose data, explain) ---Testcase 260: -EXPLAIN VERBOSE -SELECT (elapsed('/value[1,4]/')::s3).* from s3; - --- select elapsed(regex) (stub agg function, expose data, result) ---Testcase 261: -SELECT (elapsed('/value[1,4]/')::s3).* from s3; - ---Testcase 262: -EXPLAIN VERBOSE -SELECT moving_average(value1, 2),moving_average(value2, 2),moving_average(value3, 2),moving_average(value4, 2) FROM s3; - ---Testcase 263: -SELECT moving_average(value1, 2),moving_average(value2, 2),moving_average(value3, 2),moving_average(value4, 2) FROM s3; - --- select moving_average(*) (stub function, explain) ---Testcase 264: -EXPLAIN VERBOSE -SELECT moving_average_all(2) from s3; - --- select moving_average(*) (stub function, result) ---Testcase 265: -SELECT moving_average_all(2) from s3; - --- select moving_average(regex) (stub function, explain) ---Testcase 266: -EXPLAIN VERBOSE -SELECT moving_average('/value[1,4]/', 2) from s3; - --- select moving_average(regex) (stub function, result) ---Testcase 267: -SELECT moving_average('/value[1,4]/', 2) from s3; - --- select moving_average(*) (stub function and group by tag only) (explain) ---Testcase 268: -EXPLAIN VERBOSE -SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select moving_average(*) (stub function and group by tag only) (result) ---Testcase 269: -SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 270: -EXPLAIN VERBOSE -SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select moving_average(regex) (stub function and group by tag only) (result) ---Testcase 271: -SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select moving_average(*) (stub function, expose data, explain) ---Testcase 272: -EXPLAIN VERBOSE -SELECT (moving_average_all(2)::s3).* from s3; - --- select moving_average(*) (stub function, expose data, result) ---Testcase 273: -SELECT (moving_average_all(2)::s3).* from s3; - --- select moving_average(regex) (stub function, expose data, explain) ---Testcase 274: -EXPLAIN VERBOSE -SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; - --- select moving_average(regex) (stub function, expose data, result) ---Testcase 275: -SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; - ---Testcase 276: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator(value1, 2),chande_momentum_oscillator(value2, 2),chande_momentum_oscillator(value3, 2),chande_momentum_oscillator(value4, 2) FROM s3; - ---Testcase 277: -SELECT chande_momentum_oscillator(value1, 2),chande_momentum_oscillator(value2, 2),chande_momentum_oscillator(value3, 2),chande_momentum_oscillator(value4, 2) FROM s3; - ---Testcase 278: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator(value1, 2, 2),chande_momentum_oscillator(value2, 2, 2),chande_momentum_oscillator(value3, 2, 2),chande_momentum_oscillator(value4, 2, 2) FROM s3; - ---Testcase 279: -SELECT chande_momentum_oscillator(value1, 2, 2),chande_momentum_oscillator(value2, 2, 2),chande_momentum_oscillator(value3, 2, 2),chande_momentum_oscillator(value4, 2, 2) FROM s3; - --- select chande_momentum_oscillator(*) (stub function, explain) ---Testcase 280: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator_all(2) from s3; - --- select chande_momentum_oscillator(*) (stub function, result) ---Testcase 281: -SELECT chande_momentum_oscillator_all(2) from s3; - --- select chande_momentum_oscillator(regex) (stub function, explain) ---Testcase 282: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; - --- select chande_momentum_oscillator(regex) (stub agg function, result) ---Testcase 283: -SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; - --- select chande_momentum_oscillator(*) (stub function and group by tag only) (explain) ---Testcase 284: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select chande_momentum_oscillator(*) (stub agg function and group by tag only) (result) ---Testcase 285: -SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select chande_momentum_oscillator(regex) (stub agg function and group by tag only) (explain) ---Testcase 286: -EXPLAIN VERBOSE -SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select chande_momentum_oscillator(regex) (stub function and group by tag only) (result) ---Testcase 287: -SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select chande_momentum_oscillator(*) (stub agg function, expose data, explain) ---Testcase 288: -EXPLAIN VERBOSE -SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; - --- select chande_momentum_oscillator(*) (stub function, expose data, result) ---Testcase 289: -SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; - --- select chande_momentum_oscillator(regex) (stub function, expose data, explain) ---Testcase 290: -EXPLAIN VERBOSE -SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; - --- select chande_momentum_oscillator(regex) (stub function, expose data, result) ---Testcase 291: -SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; - ---Testcase 292: -EXPLAIN VERBOSE -SELECT exponential_moving_average(value1, 2),exponential_moving_average(value2, 2),exponential_moving_average(value3, 2),exponential_moving_average(value4, 2) FROM s3; - ---Testcase 293: -SELECT exponential_moving_average(value1, 2),exponential_moving_average(value2, 2),exponential_moving_average(value3, 2),exponential_moving_average(value4, 2) FROM s3; - ---Testcase 294: -EXPLAIN VERBOSE -SELECT exponential_moving_average(value1, 2, 2),exponential_moving_average(value2, 2, 2),exponential_moving_average(value3, 2, 2),exponential_moving_average(value4, 2, 2) FROM s3; - ---Testcase 295: -SELECT exponential_moving_average(value1, 2, 2),exponential_moving_average(value2, 2, 2),exponential_moving_average(value3, 2, 2),exponential_moving_average(value4, 2, 2) FROM s3; - --- select exponential_moving_average(*) (stub function, explain) ---Testcase 296: -EXPLAIN VERBOSE -SELECT exponential_moving_average_all(2) from s3; - --- select exponential_moving_average(*) (stub function, result) ---Testcase 297: -SELECT exponential_moving_average_all(2) from s3; - --- select exponential_moving_average(regex) (stub function, explain) ---Testcase 298: -EXPLAIN VERBOSE -SELECT exponential_moving_average('/value[1,4]/',2) from s3; - --- select exponential_moving_average(regex) (stub function, result) ---Testcase 299: -SELECT exponential_moving_average('/value[1,4]/',2) from s3; - --- select exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 300: -EXPLAIN VERBOSE -SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 301: -SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select exponential_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 302: -EXPLAIN VERBOSE -SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select exponential_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 303: -SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - ---Testcase 304: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average(value1, 2),double_exponential_moving_average(value2, 2),double_exponential_moving_average(value3, 2),double_exponential_moving_average(value4, 2) FROM s3; - ---Testcase 305: -SELECT double_exponential_moving_average(value1, 2),double_exponential_moving_average(value2, 2),double_exponential_moving_average(value3, 2),double_exponential_moving_average(value4, 2) FROM s3; - ---Testcase 306: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average(value1, 2, 2),double_exponential_moving_average(value2, 2, 2),double_exponential_moving_average(value3, 2, 2),double_exponential_moving_average(value4, 2, 2) FROM s3; - ---Testcase 307: -SELECT double_exponential_moving_average(value1, 2, 2),double_exponential_moving_average(value2, 2, 2),double_exponential_moving_average(value3, 2, 2),double_exponential_moving_average(value4, 2, 2) FROM s3; - --- select double_exponential_moving_average(*) (stub function, explain) ---Testcase 308: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average_all(2) from s3; - --- select double_exponential_moving_average(*) (stub function, result) ---Testcase 309: -SELECT double_exponential_moving_average_all(2) from s3; - --- select double_exponential_moving_average(regex) (stub function, explain) ---Testcase 310: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; - --- select double_exponential_moving_average(regex) (stub function, result) ---Testcase 311: -SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; - --- select double_exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 312: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select double_exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 313: -SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select double_exponential_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 314: -EXPLAIN VERBOSE -SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select double_exponential_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 315: -SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - ---Testcase 316: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio(value1, 2),kaufmans_efficiency_ratio(value2, 2),kaufmans_efficiency_ratio(value3, 2),kaufmans_efficiency_ratio(value4, 2) FROM s3; - ---Testcase 317: -SELECT kaufmans_efficiency_ratio(value1, 2),kaufmans_efficiency_ratio(value2, 2),kaufmans_efficiency_ratio(value3, 2),kaufmans_efficiency_ratio(value4, 2) FROM s3; - ---Testcase 318: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio(value1, 2, 2),kaufmans_efficiency_ratio(value2, 2, 2),kaufmans_efficiency_ratio(value3, 2, 2),kaufmans_efficiency_ratio(value4, 2, 2) FROM s3; - ---Testcase 319: -SELECT kaufmans_efficiency_ratio(value1, 2, 2),kaufmans_efficiency_ratio(value2, 2, 2),kaufmans_efficiency_ratio(value3, 2, 2),kaufmans_efficiency_ratio(value4, 2, 2) FROM s3; - --- select kaufmans_efficiency_ratio(*) (stub function, explain) ---Testcase 320: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio_all(2) from s3; - --- select kaufmans_efficiency_ratio(*) (stub function, result) ---Testcase 321: -SELECT kaufmans_efficiency_ratio_all(2) from s3; - --- select kaufmans_efficiency_ratio(regex) (stub function, explain) ---Testcase 322: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; - --- select kaufmans_efficiency_ratio(regex) (stub function, result) ---Testcase 323: -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; - --- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (explain) ---Testcase 324: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (result) ---Testcase 325: -SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (explain) ---Testcase 326: -EXPLAIN VERBOSE -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (result) ---Testcase 327: -SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select kaufmans_efficiency_ratio(*) (stub function, expose data, explain) ---Testcase 328: -EXPLAIN VERBOSE -SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; - --- select kaufmans_efficiency_ratio(*) (stub function, expose data, result) ---Testcase 329: -SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; - --- select kaufmans_efficiency_ratio(regex) (stub function, expose data, explain) ---Testcase 330: -EXPLAIN VERBOSE -SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; - --- select kaufmans_efficiency_ratio(regex) (stub function, expose data, result) ---Testcase 331: -SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; - ---Testcase 332: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average(value1, 2),kaufmans_adaptive_moving_average(value2, 2),kaufmans_adaptive_moving_average(value3, 2),kaufmans_adaptive_moving_average(value4, 2) FROM s3; - ---Testcase 333: -SELECT kaufmans_adaptive_moving_average(value1, 2),kaufmans_adaptive_moving_average(value2, 2),kaufmans_adaptive_moving_average(value3, 2),kaufmans_adaptive_moving_average(value4, 2) FROM s3; - ---Testcase 334: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average(value1, 2, 2),kaufmans_adaptive_moving_average(value2, 2, 2),kaufmans_adaptive_moving_average(value3, 2, 2),kaufmans_adaptive_moving_average(value4, 2, 2) FROM s3; - ---Testcase 335: -SELECT kaufmans_adaptive_moving_average(value1, 2, 2),kaufmans_adaptive_moving_average(value2, 2, 2),kaufmans_adaptive_moving_average(value3, 2, 2),kaufmans_adaptive_moving_average(value4, 2, 2) FROM s3; - --- select kaufmans_adaptive_moving_average(*) (stub function, explain) ---Testcase 336: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average_all(2) from s3; - --- select kaufmans_adaptive_moving_average(*) (stub function, result) ---Testcase 337: -SELECT kaufmans_adaptive_moving_average_all(2) from s3; - --- select kaufmans_adaptive_moving_average(regex) (stub function, explain) ---Testcase 338: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; - --- select kaufmans_adaptive_moving_average(regex) (stub agg function, result) ---Testcase 339: -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; - --- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 340: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (result) ---Testcase 341: -SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (explain) ---Testcase 342: -EXPLAIN VERBOSE -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (result) ---Testcase 343: -SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - ---Testcase 344: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average(value1, 2),triple_exponential_moving_average(value2, 2),triple_exponential_moving_average(value3, 2),triple_exponential_moving_average(value4, 2) FROM s3; - ---Testcase 345: -SELECT triple_exponential_moving_average(value1, 2),triple_exponential_moving_average(value2, 2),triple_exponential_moving_average(value3, 2),triple_exponential_moving_average(value4, 2) FROM s3; - ---Testcase 346: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average(value1, 2, 2),triple_exponential_moving_average(value2, 2, 2),triple_exponential_moving_average(value3, 2, 2),triple_exponential_moving_average(value4, 2, 2) FROM s3; - ---Testcase 347: -SELECT triple_exponential_moving_average(value1, 2, 2),triple_exponential_moving_average(value2, 2, 2),triple_exponential_moving_average(value3, 2, 2),triple_exponential_moving_average(value4, 2, 2) FROM s3; - --- select triple_exponential_moving_average(*) (stub function, explain) ---Testcase 348: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average_all(2) from s3; - --- select triple_exponential_moving_average(*) (stub function, result) ---Testcase 349: -SELECT triple_exponential_moving_average_all(2) from s3; - --- select triple_exponential_moving_average(regex) (stub function, explain) ---Testcase 350: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; - --- select triple_exponential_moving_average(regex) (stub function, result) ---Testcase 351: -SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; - --- select triple_exponential_moving_average(*) (stub function and group by tag only) (explain) ---Testcase 352: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select triple_exponential_moving_average(*) (stub function and group by tag only) (result) ---Testcase 353: -SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (explain) ---Testcase 354: -EXPLAIN VERBOSE -SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (result) ---Testcase 355: -SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - ---Testcase 356: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative(value1, 2),triple_exponential_derivative(value2, 2),triple_exponential_derivative(value3, 2),triple_exponential_derivative(value4, 2) FROM s3; - ---Testcase 357: -SELECT triple_exponential_derivative(value1, 2),triple_exponential_derivative(value2, 2),triple_exponential_derivative(value3, 2),triple_exponential_derivative(value4, 2) FROM s3; - ---Testcase 358: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative(value1, 2, 2),triple_exponential_derivative(value2, 2, 2),triple_exponential_derivative(value3, 2, 2),triple_exponential_derivative(value4, 2, 2) FROM s3; - ---Testcase 359: -SELECT triple_exponential_derivative(value1, 2, 2),triple_exponential_derivative(value2, 2, 2),triple_exponential_derivative(value3, 2, 2),triple_exponential_derivative(value4, 2, 2) FROM s3; - --- select triple_exponential_derivative(*) (stub function, explain) ---Testcase 360: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative_all(2) from s3; - --- select triple_exponential_derivative(*) (stub function, result) ---Testcase 361: -SELECT triple_exponential_derivative_all(2) from s3; - --- select triple_exponential_derivative(regex) (stub function, explain) ---Testcase 362: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; - --- select triple_exponential_derivative(regex) (stub function, result) ---Testcase 363: -SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; - --- select triple_exponential_derivative(*) (stub function and group by tag only) (explain) ---Testcase 364: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select triple_exponential_derivative(*) (stub function and group by tag only) (result) ---Testcase 365: -SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select triple_exponential_derivative(regex) (stub function and group by tag only) (explain) ---Testcase 366: -EXPLAIN VERBOSE -SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select triple_exponential_derivative(regex) (stub function and group by tag only) (result) ---Testcase 367: -SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - ---Testcase 368: -EXPLAIN VERBOSE -SELECT relative_strength_index(value1, 2),relative_strength_index(value2, 2),relative_strength_index(value3, 2),relative_strength_index(value4, 2) FROM s3; - ---Testcase 369: -SELECT relative_strength_index(value1, 2),relative_strength_index(value2, 2),relative_strength_index(value3, 2),relative_strength_index(value4, 2) FROM s3; - ---Testcase 370: -EXPLAIN VERBOSE -SELECT relative_strength_index(value1, 2, 2),relative_strength_index(value2, 2, 2),relative_strength_index(value3, 2, 2),relative_strength_index(value4, 2, 2) FROM s3; - ---Testcase 371: -SELECT relative_strength_index(value1, 2, 2),relative_strength_index(value2, 2, 2),relative_strength_index(value3, 2, 2),relative_strength_index(value4, 2, 2) FROM s3; - --- select relative_strength_index(*) (stub function, explain) ---Testcase 372: -EXPLAIN VERBOSE -SELECT relative_strength_index_all(2) from s3; - --- select relative_strength_index(*) (stub function, result) ---Testcase 373: -SELECT relative_strength_index_all(2) from s3; - --- select relative_strength_index(regex) (stub agg function, explain) ---Testcase 374: -EXPLAIN VERBOSE -SELECT relative_strength_index('/value[1,4]/',2) from s3; - --- select relative_strength_index(regex) (stub agg function, result) ---Testcase 375: -SELECT relative_strength_index('/value[1,4]/',2) from s3; - --- select relative_strength_index(*) (stub function and group by tag only) (explain) ---Testcase 376: -EXPLAIN VERBOSE -SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select relative_strength_index(*) (stub function and group by tag only) (result) ---Testcase 377: -SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select relative_strength_index(regex) (stub function and group by tag only) (explain) ---Testcase 378: -EXPLAIN VERBOSE -SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select relative_strength_index(regex) (stub function and group by tag only) (result) ---Testcase 379: -SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select relative_strength_index(*) (stub function, expose data, explain) ---Testcase 380: -EXPLAIN VERBOSE -SELECT (relative_strength_index_all(2)::s3).* from s3; - --- select relative_strength_index(*) (stub function, expose data, result) ---Testcase 381: -SELECT (relative_strength_index_all(2)::s3).* from s3; - --- select relative_strength_index(regex) (stub function, expose data, explain) ---Testcase 382: -EXPLAIN VERBOSE -SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; - --- select relative_strength_index(regex) (stub function, expose data, result) ---Testcase 383: -SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; - --- select integral (stub agg function, explain) ---Testcase 384: -EXPLAIN VERBOSE -SELECT integral(value1),integral(value2),integral(value3),integral(value4) FROM s3; - --- select integral (stub agg function, result) ---Testcase 385: -SELECT integral(value1),integral(value2),integral(value3),integral(value4) FROM s3; - ---Testcase 386: -EXPLAIN VERBOSE -SELECT integral(value1, interval '1s'),integral(value2, interval '1s'),integral(value3, interval '1s'),integral(value4, interval '1s') FROM s3; - --- select integral (stub agg function, result) ---Testcase 387: -SELECT integral(value1, interval '1s'),integral(value2, interval '1s'),integral(value3, interval '1s'),integral(value4, interval '1s') FROM s3; - --- select integral (stub agg function, raise exception if not expected type) ---Testcase 388: -SELECT integral(value1::numeric),integral(value2::numeric),integral(value3::numeric),integral(value4::numeric) FROM s3; - --- select integral (stub agg function and group by influx_time() and tag) (explain) ---Testcase 389: -EXPLAIN VERBOSE -SELECT integral("value1"),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - --- select integral (stub agg function and group by influx_time() and tag) (result) ---Testcase 390: -SELECT integral("value1"),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - --- select integral (stub agg function and group by influx_time() and tag) (explain) ---Testcase 391: -EXPLAIN VERBOSE -SELECT integral("value1", interval '1s'),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - --- select integral (stub agg function and group by influx_time() and tag) (result) ---Testcase 392: -SELECT integral("value1", interval '1s'),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - --- select integral (stub agg function and group by tag only) (result) ---Testcase 393: -SELECT tag1,integral("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1 ORDER BY 1; - --- select integral (stub agg function and other aggs) (result) ---Testcase 394: -SELECT sum("value1"),integral("value1"),count("value1") FROM s3; - --- select integral (stub agg function and group by tag only) (result) ---Testcase 395: -SELECT tag1,integral("value1", interval '1s') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1 ORDER BY 1; - --- select integral (stub agg function and other aggs) (result) ---Testcase 396: -SELECT sum("value1"),integral("value1", interval '1s'),count("value1") FROM s3; - --- select integral over join query (explain) ---Testcase 397: -EXPLAIN VERBOSE -SELECT integral(t1.value1), integral(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select integral over join query (result, stub call error) ---Testcase 398: -SELECT integral(t1.value1), integral(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select integral over join query (explain) ---Testcase 399: -EXPLAIN VERBOSE -SELECT integral(t1.value1, interval '1s'), integral(t2.value1, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select integral over join query (result, stub call error) ---Testcase 400: -SELECT integral(t1.value1, interval '1s'), integral(t2.value1, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select integral with having (explain) ---Testcase 401: -EXPLAIN VERBOSE -SELECT integral(value1) FROM s3 HAVING integral(value1) > 100; - --- select integral with having (explain, not pushdown, stub call error) ---Testcase 402: -SELECT integral(value1) FROM s3 HAVING integral(value1) > 100; - --- select integral with having (explain) ---Testcase 403: -EXPLAIN VERBOSE -SELECT integral(value1, interval '1s') FROM s3 HAVING integral(value1, interval '1s') > 100; - --- select integral with having (explain, not pushdown, stub call error) ---Testcase 404: -SELECT integral(value1, interval '1s') FROM s3 HAVING integral(value1, interval '1s') > 100; - --- select integral(*) (stub agg function, explain) ---Testcase 405: -EXPLAIN VERBOSE -SELECT integral_all(*) from s3; - --- select integral(*) (stub agg function, result) ---Testcase 406: -SELECT integral_all(*) from s3; - --- select integral(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 407: -EXPLAIN VERBOSE -SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - --- select integral(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 408: -SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - --- select integral(*) (stub agg function and group by tag only) (explain) ---Testcase 409: -EXPLAIN VERBOSE -SELECT integral_all(*) FROM s3 WHERE value1 > 0.3 GROUP BY tag1; - --- select integral(*) (stub agg function and group by tag only) (result) ---Testcase 410: -SELECT integral_all(*) FROM s3 WHERE value1 > 0.3 GROUP BY tag1; - --- select integral(*) (stub agg function, expose data, explain) ---Testcase 411: -EXPLAIN VERBOSE -SELECT (integral_all(*)::s3).* from s3; - --- select integral(*) (stub agg function, expose data, result) ---Testcase 412: -SELECT (integral_all(*)::s3).* from s3; - --- select integral(regex) (stub agg function, explain) ---Testcase 413: -EXPLAIN VERBOSE -SELECT integral('/value[1,4]/') from s3; - --- select integral(regex) (stub agg function, result) ---Testcase 414: -SELECT integral('/value[1,4]/') from s3; - --- select integral(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 415: -EXPLAIN VERBOSE -SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - --- select integral(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 416: -SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; - --- select integral(regex) (stub agg function and group by tag only) (explain) ---Testcase 417: -EXPLAIN VERBOSE -SELECT integral('/value[1,4]/') FROM s3 WHERE value1 > 0.3 GROUP BY tag1; - --- select integral(regex) (stub agg function and group by tag only) (result) ---Testcase 418: -SELECT integral('/value[1,4]/') FROM s3 WHERE value1 > 0.3 GROUP BY tag1; - --- select integral(regex) (stub agg function, expose data, explain) ---Testcase 419: -EXPLAIN VERBOSE -SELECT (integral('/value[1,4]/')::s3).* from s3; - --- select integral(regex) (stub agg function, expose data, result) ---Testcase 420: -SELECT (integral('/value[1,4]/')::s3).* from s3; - --- select mean (stub agg function, explain) ---Testcase 421: -EXPLAIN VERBOSE -SELECT mean(value1),mean(value2),mean(value3),mean(value4) FROM s3; - --- select mean (stub agg function, result) ---Testcase 422: -SELECT mean(value1),mean(value2),mean(value3),mean(value4) FROM s3; - --- select mean (stub agg function, raise exception if not expected type) ---Testcase 423: -SELECT mean(value1::numeric),mean(value2::numeric),mean(value3::numeric),mean(value4::numeric) FROM s3; - --- select mean (stub agg function and group by influx_time() and tag) (explain) ---Testcase 424: -EXPLAIN VERBOSE -SELECT mean("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select mean (stub agg function and group by influx_time() and tag) (result) ---Testcase 425: -SELECT mean("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select mean (stub agg function and group by tag only) (result) ---Testcase 426: -SELECT tag1,mean("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select mean (stub agg function and other aggs) (result) ---Testcase 427: -SELECT sum("value1"),mean("value1"),count("value1") FROM s3; - --- select mean over join query (explain) ---Testcase 428: -EXPLAIN VERBOSE -SELECT mean(t1.value1), mean(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select mean over join query (result, stub call error) ---Testcase 429: -SELECT mean(t1.value1), mean(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select mean with having (explain) ---Testcase 430: -EXPLAIN VERBOSE -SELECT mean(value1) FROM s3 HAVING mean(value1) > 100; - --- select mean with having (explain, not pushdown, stub call error) ---Testcase 431: -SELECT mean(value1) FROM s3 HAVING mean(value1) > 100; - --- select mean(*) (stub agg function, explain) ---Testcase 432: -EXPLAIN VERBOSE -SELECT mean_all(*) from s3; - --- select mean(*) (stub agg function, result) ---Testcase 433: -SELECT mean_all(*) from s3; - --- select mean(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 434: -EXPLAIN VERBOSE -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select mean(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 435: -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select mean(*) (stub agg function and group by tag only) (explain) ---Testcase 436: -EXPLAIN VERBOSE -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select mean(*) (stub agg function and group by tag only) (result) ---Testcase 437: -SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select mean(*) (stub agg function, expose data, explain) ---Testcase 438: -EXPLAIN VERBOSE -SELECT (mean_all(*)::s3).* from s3; - --- select mean(*) (stub agg function, expose data, result) ---Testcase 439: -SELECT (mean_all(*)::s3).* from s3; - --- select mean(regex) (stub agg function, explain) ---Testcase 440: -EXPLAIN VERBOSE -SELECT mean('/value[1,4]/') from s3; - --- select mean(regex) (stub agg function, result) ---Testcase 441: -SELECT mean('/value[1,4]/') from s3; - --- select mean(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 442: -EXPLAIN VERBOSE -SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select mean(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 443: -SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select mean(regex) (stub agg function and group by tag only) (explain) ---Testcase 444: -EXPLAIN VERBOSE -SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select mean(regex) (stub agg function and group by tag only) (result) ---Testcase 445: -SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select mean(regex) (stub agg function, expose data, explain) ---Testcase 446: -EXPLAIN VERBOSE -SELECT (mean('/value[1,4]/')::s3).* from s3; - --- select mean(regex) (stub agg function, expose data, result) ---Testcase 447: -SELECT (mean('/value[1,4]/')::s3).* from s3; - --- select median (stub agg function, explain) ---Testcase 448: -EXPLAIN VERBOSE -SELECT median(value1),median(value2),median(value3),median(value4) FROM s3; - --- select median (stub agg function, result) ---Testcase 449: -SELECT median(value1),median(value2),median(value3),median(value4) FROM s3; - --- select median (stub agg function, raise exception if not expected type) ---Testcase 450: -SELECT median(value1::numeric),median(value2::numeric),median(value3::numeric),median(value4::numeric) FROM s3; - --- select median (stub agg function and group by influx_time() and tag) (explain) ---Testcase 451: -EXPLAIN VERBOSE -SELECT median("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select median (stub agg function and group by influx_time() and tag) (result) ---Testcase 452: -SELECT median("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select median (stub agg function and group by tag only) (result) ---Testcase 453: -SELECT tag1,median("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select median (stub agg function and other aggs) (result) ---Testcase 454: -SELECT sum("value1"),median("value1"),count("value1") FROM s3; - --- select median over join query (explain) ---Testcase 455: -EXPLAIN VERBOSE -SELECT median(t1.value1), median(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select median over join query (result, stub call error) ---Testcase 456: -SELECT median(t1.value1), median(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select median with having (explain) ---Testcase 457: -EXPLAIN VERBOSE -SELECT median(value1) FROM s3 HAVING median(value1) > 100; - --- select median with having (explain, not pushdown, stub call error) ---Testcase 458: -SELECT median(value1) FROM s3 HAVING median(value1) > 100; - --- select median(*) (stub agg function, explain) ---Testcase 459: -EXPLAIN VERBOSE -SELECT median_all(*) from s3; - --- select median(*) (stub agg function, result) ---Testcase 460: -SELECT median_all(*) from s3; - --- select median(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 461: -EXPLAIN VERBOSE -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select median(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 462: -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select median(*) (stub agg function and group by tag only) (explain) ---Testcase 463: -EXPLAIN VERBOSE -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select median(*) (stub agg function and group by tag only) (result) ---Testcase 464: -SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select median(*) (stub agg function, expose data, explain) ---Testcase 465: -EXPLAIN VERBOSE -SELECT (median_all(*)::s3).* from s3; - --- select median(*) (stub agg function, expose data, result) ---Testcase 466: -SELECT (median_all(*)::s3).* from s3; - --- select median(regex) (stub agg function, explain) ---Testcase 467: -EXPLAIN VERBOSE -SELECT median('/^v.*/') from s3; - --- select median(regex) (stub agg function, result) ---Testcase 468: -SELECT median('/^v.*/') from s3; - --- select median(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 469: -EXPLAIN VERBOSE -SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select median(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 470: -SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select median(regex) (stub agg function and group by tag only) (explain) ---Testcase 471: -EXPLAIN VERBOSE -SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select median(regex) (stub agg function and group by tag only) (result) ---Testcase 472: -SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select median(regex) (stub agg function, expose data, explain) ---Testcase 473: -EXPLAIN VERBOSE -SELECT (median('/value[1,4]/')::s3).* from s3; - --- select median(regex) (stub agg function, expose data, result) ---Testcase 474: -SELECT (median('/value[1,4]/')::s3).* from s3; - --- select influx_mode (stub agg function, explain) ---Testcase 475: -EXPLAIN VERBOSE -SELECT influx_mode(value1),influx_mode(value2),influx_mode(value3),influx_mode(value4) FROM s3; - --- select influx_mode (stub agg function, result) ---Testcase 476: -SELECT influx_mode(value1),influx_mode(value2),influx_mode(value3),influx_mode(value4) FROM s3; - --- select influx_mode (stub agg function, raise exception if not expected type) ---Testcase 477: -SELECT influx_mode(value1::numeric),influx_mode(value2::numeric),influx_mode(value3::numeric),influx_mode(value4::numeric) FROM s3; - --- select influx_mode (stub agg function and group by influx_time() and tag) (explain) ---Testcase 478: -EXPLAIN VERBOSE -SELECT influx_mode("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_mode (stub agg function and group by influx_time() and tag) (result) ---Testcase 479: -SELECT influx_mode("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_mode (stub agg function and group by tag only) (result) ---Testcase 480: -SELECT tag1,influx_mode("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_mode (stub agg function and other aggs) (result) ---Testcase 481: -SELECT sum("value1"),influx_mode("value1"),count("value1") FROM s3; - --- select influx_mode over join query (explain) ---Testcase 482: -EXPLAIN VERBOSE -SELECT influx_mode(t1.value1), influx_mode(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select influx_mode over join query (result, stub call error) ---Testcase 483: -SELECT influx_mode(t1.value1), influx_mode(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select influx_mode with having (explain) ---Testcase 484: -EXPLAIN VERBOSE -SELECT influx_mode(value1) FROM s3 HAVING influx_mode(value1) > 100; - --- select influx_mode with having (explain, not pushdown, stub call error) ---Testcase 485: -SELECT influx_mode(value1) FROM s3 HAVING influx_mode(value1) > 100; - --- select influx_mode(*) (stub agg function, explain) ---Testcase 486: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) from s3; - --- select influx_mode(*) (stub agg function, result) ---Testcase 487: -SELECT influx_mode_all(*) from s3; - --- select influx_mode(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 488: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_mode(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 489: -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_mode(*) (stub agg function and group by tag only) (explain) ---Testcase 490: -EXPLAIN VERBOSE -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_mode(*) (stub agg function and group by tag only) (result) ---Testcase 491: -SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_mode(*) (stub agg function, expose data, explain) ---Testcase 492: -EXPLAIN VERBOSE -SELECT (influx_mode_all(*)::s3).* from s3; - --- select influx_mode(*) (stub agg function, expose data, result) ---Testcase 493: -SELECT (influx_mode_all(*)::s3).* from s3; - --- select influx_mode(regex) (stub function, explain) ---Testcase 494: -EXPLAIN VERBOSE -SELECT influx_mode('/value[1,4]/') from s3; - --- select influx_mode(regex) (stub function, result) ---Testcase 495: -SELECT influx_mode('/value[1,4]/') from s3; - --- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 496: -EXPLAIN VERBOSE -SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 497: -SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_mode(regex) (stub agg function and group by tag only) (explain) ---Testcase 498: -EXPLAIN VERBOSE -SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_mode(regex) (stub agg function and group by tag only) (result) ---Testcase 499: -SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_mode(regex) (stub agg function, expose data, explain) ---Testcase 500: -EXPLAIN VERBOSE -SELECT (influx_mode('/value[1,4]/')::s3).* from s3; - --- select influx_mode(regex) (stub agg function, expose data, result) ---Testcase 501: -SELECT (influx_mode('/value[1,4]/')::s3).* from s3; - --- select stddev (agg function, explain) ---Testcase 502: -EXPLAIN VERBOSE -SELECT stddev(value1),stddev(value2),stddev(value3),stddev(value4) FROM s3; - --- select stddev (agg function, result) ---Testcase 503: -SELECT stddev(value1),stddev(value2),stddev(value3),stddev(value4) FROM s3; - --- select stddev (agg function and group by influx_time() and tag) (explain) ---Testcase 504: -EXPLAIN VERBOSE -SELECT stddev("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select stddev (agg function and group by influx_time() and tag) (result) ---Testcase 505: -SELECT stddev("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select stddev (agg function and group by tag only) (result) ---Testcase 506: -SELECT tag1,stddev("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select stddev (agg function and other aggs) (result) ---Testcase 507: -SELECT sum("value1"),stddev("value1"),count("value1") FROM s3; - --- select stddev(*) (stub agg function, explain) ---Testcase 508: -EXPLAIN VERBOSE -SELECT stddev_all(*) from s3; - --- select stddev(*) (stub agg function, result) ---Testcase 509: -SELECT stddev_all(*) from s3; - --- select stddev(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 510: -EXPLAIN VERBOSE -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select stddev(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 511: -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select stddev(*) (stub agg function and group by tag only) (explain) ---Testcase 512: -EXPLAIN VERBOSE -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select stddev(*) (stub agg function and group by tag only) (result) ---Testcase 513: -SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select stddev(regex) (stub function, explain) ---Testcase 514: -EXPLAIN VERBOSE -SELECT stddev('/value[1,4]/') from s3; - --- select stddev(regex) (stub function, result) ---Testcase 515: -SELECT stddev('/value[1,4]/') from s3; - --- select stddev(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 516: -EXPLAIN VERBOSE -SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select stddev(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 517: -SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select stddev(regex) (stub agg function and group by tag only) (explain) ---Testcase 518: -EXPLAIN VERBOSE -SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select stddev(regex) (stub agg function and group by tag only) (result) ---Testcase 519: -SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_sum(*) (stub agg function, explain) ---Testcase 520: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) from s3; - --- select influx_sum(*) (stub agg function, result) ---Testcase 521: -SELECT influx_sum_all(*) from s3; - --- select influx_sum(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 522: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_sum(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 523: -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_sum(*) (stub agg function and group by tag only) (explain) ---Testcase 524: -EXPLAIN VERBOSE -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_sum(*) (stub agg function and group by tag only) (result) ---Testcase 525: -SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_sum(*) (stub agg function, expose data, explain) ---Testcase 526: -EXPLAIN VERBOSE -SELECT (influx_sum_all(*)::s3).* from s3; - --- select influx_sum(*) (stub agg function, expose data, result) ---Testcase 527: -SELECT (influx_sum_all(*)::s3).* from s3; - --- select influx_sum(regex) (stub function, explain) ---Testcase 528: -EXPLAIN VERBOSE -SELECT influx_sum('/value[1,4]/') from s3; - --- select influx_sum(regex) (stub function, result) ---Testcase 529: -SELECT influx_sum('/value[1,4]/') from s3; - --- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 530: -EXPLAIN VERBOSE -SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 531: -SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_sum(regex) (stub agg function and group by tag only) (explain) ---Testcase 532: -EXPLAIN VERBOSE -SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_sum(regex) (stub agg function and group by tag only) (result) ---Testcase 533: -SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_sum(regex) (stub agg function, expose data, explain) ---Testcase 534: -EXPLAIN VERBOSE -SELECT (influx_sum('/value[1,4]/')::s3).* from s3; - --- select influx_sum(regex) (stub agg function, expose data, result) ---Testcase 535: -SELECT (influx_sum('/value[1,4]/')::s3).* from s3; - --- selector function bottom() (explain) ---Testcase 536: -EXPLAIN VERBOSE -SELECT bottom(value1, 1) FROM s3; - --- selector function bottom() (result) ---Testcase 537: -SELECT bottom(value1, 1) FROM s3; - --- selector function bottom() cannot be combined with other functions(explain) ---Testcase 538: -EXPLAIN VERBOSE -SELECT bottom(value1, 1), bottom(value2, 1), bottom(value3, 1), bottom(value4, 1) FROM s3; - --- selector function bottom() cannot be combined with other functions(result) ---Testcase 539: -SELECT bottom(value1, 1), bottom(value2, 1), bottom(value3, 1), bottom(value4, 1) FROM s3; - --- select influx_max(*) (stub agg function, explain) ---Testcase 540: -EXPLAIN VERBOSE -SELECT influx_max_all(*) from s3; - --- select influx_max(*) (stub agg function, result) ---Testcase 541: -SELECT influx_max_all(*) from s3; - --- select influx_max(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 542: -EXPLAIN VERBOSE -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_max(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 543: -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_max(*) (stub agg function and group by tag only) (explain) ---Testcase 544: -EXPLAIN VERBOSE -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_max(*) (stub agg function and group by tag only) (result) ---Testcase 545: -SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_max(*) (stub agg function, expose data, explain) ---Testcase 546: -EXPLAIN VERBOSE -SELECT (influx_max_all(*)::s3).* from s3; - --- select influx_max(*) (stub agg function, expose data, result) ---Testcase 547: -SELECT (influx_max_all(*)::s3).* from s3; - --- select influx_max(regex) (stub function, explain) ---Testcase 548: -EXPLAIN VERBOSE -SELECT influx_max('/value[1,4]/') from s3; - --- select influx_max(regex) (stub function, result) ---Testcase 549: -SELECT influx_max('/value[1,4]/') from s3; - --- select influx_max(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 550: -EXPLAIN VERBOSE -SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_max(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 551: -SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_max(regex) (stub agg function and group by tag only) (explain) ---Testcase 552: -EXPLAIN VERBOSE -SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_max(regex) (stub agg function and group by tag only) (result) ---Testcase 553: -SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_max(regex) (stub agg function, expose data, explain) ---Testcase 554: -EXPLAIN VERBOSE -SELECT (influx_max('/value[1,4]/')::s3).* from s3; - --- select influx_max(regex) (stub agg function, expose data, result) ---Testcase 555: -SELECT (influx_max('/value[1,4]/')::s3).* from s3; - --- select influx_min(*) (stub agg function, explain) ---Testcase 556: -EXPLAIN VERBOSE -SELECT influx_min_all(*) from s3; - --- select influx_min(*) (stub agg function, result) ---Testcase 557: -SELECT influx_min_all(*) from s3; - --- select influx_min(*) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 558: -EXPLAIN VERBOSE -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_min(*) (stub agg function and group by influx_time() and tag) (result) ---Testcase 559: -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_min(*) (stub agg function and group by tag only) (explain) ---Testcase 560: -EXPLAIN VERBOSE -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_min(*) (stub agg function and group by tag only) (result) ---Testcase 561: -SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_min(*) (stub agg function, expose data, explain) ---Testcase 562: -EXPLAIN VERBOSE -SELECT (influx_min_all(*)::s3).* from s3; - --- select influx_min(*) (stub agg function, expose data, result) ---Testcase 563: -SELECT (influx_min_all(*)::s3).* from s3; - --- select influx_min(regex) (stub function, explain) ---Testcase 564: -EXPLAIN VERBOSE -SELECT influx_min('/value[1,4]/') from s3; - --- select influx_min(regex) (stub function, result) ---Testcase 565: -SELECT influx_min('/value[1,4]/') from s3; - --- select influx_min(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 566: -EXPLAIN VERBOSE -SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_min(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 567: -SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select influx_min(regex) (stub agg function and group by tag only) (explain) ---Testcase 568: -EXPLAIN VERBOSE -SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_min(regex) (stub agg function and group by tag only) (result) ---Testcase 569: -SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select influx_min(regex) (stub agg function, expose data, explain) ---Testcase 570: -EXPLAIN VERBOSE -SELECT (influx_min('/value[1,4]/')::s3).* from s3; - --- select influx_min(regex) (stub agg function, expose data, result) ---Testcase 571: -SELECT (influx_min('/value[1,4]/')::s3).* from s3; - --- selector function percentile() (explain) ---Testcase 572: -EXPLAIN VERBOSE -SELECT percentile(value1, 50), percentile(value2, 60), percentile(value3, 25), percentile(value4, 33) FROM s3; - --- selector function percentile() (result) ---Testcase 573: -SELECT percentile(value1, 50), percentile(value2, 60), percentile(value3, 25), percentile(value4, 33) FROM s3; - --- selector function percentile() (explain) ---Testcase 574: -EXPLAIN VERBOSE -SELECT percentile(value1, 1.5), percentile(value2, 6.7), percentile(value3, 20.5), percentile(value4, 75.2) FROM s3; - --- selector function percentile() (result) ---Testcase 575: -SELECT percentile(value1, 1.5), percentile(value2, 6.7), percentile(value3, 20.5), percentile(value4, 75.2) FROM s3; - --- select percentile(*, int) (stub agg function, explain) ---Testcase 576: -EXPLAIN VERBOSE -SELECT percentile_all(50) from s3; - --- select percentile(*, int) (stub agg function, result) ---Testcase 577: -SELECT percentile_all(50) from s3; - --- select percentile(*, float8) (stub agg function, explain) ---Testcase 578: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) from s3; - --- select percentile(*, float8) (stub agg function, result) ---Testcase 579: -SELECT percentile_all(70.5) from s3; - --- select percentile(*, int) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 580: -EXPLAIN VERBOSE -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select percentile(*, int) (stub agg function and group by influx_time() and tag) (result) ---Testcase 581: -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 582: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (result) ---Testcase 583: -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select percentile(*, int) (stub agg function and group by tag only) (explain) ---Testcase 584: -EXPLAIN VERBOSE -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select percentile(*, int) (stub agg function and group by tag only) (result) ---Testcase 585: -SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select percentile(*, float8) (stub agg function and group by tag only) (explain) ---Testcase 586: -EXPLAIN VERBOSE -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select percentile(*, float8) (stub agg function and group by tag only) (result) ---Testcase 587: -SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select percentile(*, int) (stub agg function, expose data, explain) ---Testcase 588: -EXPLAIN VERBOSE -SELECT (percentile_all(50)::s3).* from s3; - --- select percentile(*, int) (stub agg function, expose data, result) ---Testcase 589: -SELECT (percentile_all(50)::s3).* from s3; - --- select percentile(*, int) (stub agg function, expose data, explain) ---Testcase 590: -EXPLAIN VERBOSE -SELECT (percentile_all(70.5)::s3).* from s3; - --- select percentile(*, int) (stub agg function, expose data, result) ---Testcase 591: -SELECT (percentile_all(70.5)::s3).* from s3; - --- select percentile(regex) (stub function, explain) ---Testcase 592: -EXPLAIN VERBOSE -SELECT percentile('/value[1,4]/', 50) from s3; - --- select percentile(regex) (stub function, result) ---Testcase 593: -SELECT percentile('/value[1,4]/', 50) from s3; - --- select percentile(regex) (stub agg function and group by influx_time() and tag) (explain) ---Testcase 594: -EXPLAIN VERBOSE -SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select percentile(regex) (stub agg function and group by influx_time() and tag) (result) ---Testcase 595: -SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select percentile(regex) (stub agg function and group by tag only) (explain) ---Testcase 596: -EXPLAIN VERBOSE -SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select percentile(regex) (stub agg function and group by tag only) (result) ---Testcase 597: -SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select percentile(regex) (stub agg function, expose data, explain) ---Testcase 598: -EXPLAIN VERBOSE -SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; - --- select percentile(regex) (stub agg function, expose data, result) ---Testcase 599: -SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; - --- select percentile(regex) (stub agg function, expose data, explain) ---Testcase 600: -EXPLAIN VERBOSE -SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; - --- select percentile(regex) (stub agg function, expose data, result) ---Testcase 601: -SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; - --- selector function top(field_key,N) (explain) ---Testcase 602: -EXPLAIN VERBOSE -SELECT top(value1, 1) FROM s3; - --- selector function top(field_key,N) (result) ---Testcase 603: -SELECT top(value1, 1) FROM s3; - --- selector function top(field_key,tag_key(s),N) (explain) ---Testcase 604: -EXPLAIN VERBOSE -SELECT top(value1, tag1, 1) FROM s3; - --- selector function top(field_key,tag_key(s),N) (result) ---Testcase 605: -SELECT top(value1, tag1, 1) FROM s3; - --- selector function top() cannot be combined with other functions(explain) ---Testcase 606: -EXPLAIN VERBOSE -SELECT top(value1, 1), top(value2, 1), top(value3, 1), top(value4, 1) FROM s3; - --- selector function top() cannot be combined with other functions(result) ---Testcase 607: -SELECT top(value1, 1), top(value2, 1), top(value3, 1), top(value4, 1) FROM s3; - --- select acos (builtin function, explain) ---Testcase 608: -EXPLAIN VERBOSE -SELECT acos(value1), acos(value3) FROM s3; - --- select acos (builtin function, result) ---Testcase 609: -SELECT acos(value1), acos(value3) FROM s3; - --- select acos (builtin function, not pushdown constraints, explain) ---Testcase 610: -EXPLAIN VERBOSE -SELECT acos(value1), acos(value3) FROM s3 WHERE to_hex(value2) = '64'; - --- select acos (builtin function, not pushdown constraints, result) ---Testcase 611: -SELECT acos(value1), acos(value3) FROM s3 WHERE to_hex(value2) = '64'; - --- select acos (builtin function, pushdown constraints, explain) ---Testcase 612: -EXPLAIN VERBOSE -SELECT acos(value1), acos(value3) FROM s3 WHERE value2 != 200; - --- select acos (builtin function, pushdown constraints, result) ---Testcase 613: -SELECT acos(value1), acos(value3) FROM s3 WHERE value2 != 200; - --- select acos as nest function with agg (pushdown, explain) ---Testcase 614: -EXPLAIN VERBOSE -SELECT sum(value3), acos(sum(value3)) FROM s3 WHERE value2 != 200; - --- select acos as nest function with agg (pushdown, result) ---Testcase 615: -SELECT sum(value3), acos(sum(value3)) FROM s3 WHERE value2 != 200; - --- select acos as nest with log2 (pushdown, explain) ---Testcase 616: -EXPLAIN VERBOSE -SELECT acos(log2(value1)),acos(log2(1/value1)) FROM s3; - --- select acos as nest with log2 (pushdown, result) ---Testcase 617: -SELECT acos(log2(value1)),acos(log2(1/value1)) FROM s3; - --- select acos with non pushdown func and explicit constant (explain) ---Testcase 618: -EXPLAIN VERBOSE -SELECT acos(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; - --- select acos with non pushdown func and explicit constant (result) ---Testcase 619: -SELECT acos(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; - --- select acos with order by (explain) ---Testcase 620: -EXPLAIN VERBOSE -SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY acos(1-value1); - --- select acos with order by (result) ---Testcase 621: -SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY acos(1-value1); - --- select acos with order by index (result) ---Testcase 622: -SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 2,1; - --- select acos with order by index (result) ---Testcase 623: -SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 1,2; - --- select acos and as ---Testcase 624: -SELECT acos(value3) as acos1 FROM s3 WHERE value2 != 200; - --- select acos(*) (stub agg function, explain) ---Testcase 625: -EXPLAIN VERBOSE -SELECT acos_all() from s3; - --- select acos(*) (stub agg function, result) ---Testcase 626: -SELECT acos_all() from s3; - --- select acos(*) (stub agg function and group by tag only) (explain) ---Testcase 627: -EXPLAIN VERBOSE -SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select acos(*) (stub agg function and group by tag only) (result) ---Testcase 628: -SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select acos(*) (stub agg function, expose data, explain) ---Testcase 629: -EXPLAIN VERBOSE -SELECT (acos_all()::s3).* from s3; - --- select acos(*) (stub agg function, expose data, result) ---Testcase 630: -SELECT (acos_all()::s3).* from s3; - --- select asin (builtin function, explain) ---Testcase 631: -EXPLAIN VERBOSE -SELECT asin(value1), asin(value3) FROM s3; - --- select asin (builtin function, result) ---Testcase 632: -SELECT asin(value1), asin(value3) FROM s3; - --- select asin (builtin function, not pushdown constraints, explain) ---Testcase 633: -EXPLAIN VERBOSE -SELECT asin(value1), asin(value3) FROM s3 WHERE to_hex(value2) = '64'; - --- select asin (builtin function, not pushdown constraints, result) ---Testcase 634: -SELECT asin(value1), asin(value3) FROM s3 WHERE to_hex(value2) = '64'; - --- select asin (builtin function, pushdown constraints, explain) ---Testcase 635: -EXPLAIN VERBOSE -SELECT asin(value1), asin(value3) FROM s3 WHERE value2 != 200; - --- select asin (builtin function, pushdown constraints, result) ---Testcase 636: -SELECT asin(value1), asin(value3) FROM s3 WHERE value2 != 200; - --- select asin as nest function with agg (pushdown, explain) ---Testcase 637: -EXPLAIN VERBOSE -SELECT sum(value3), asin(sum(value3)) FROM s3 WHERE value2 != 200; - --- select asin as nest function with agg (pushdown, result) ---Testcase 638: -SELECT sum(value3), asin(sum(value3)) FROM s3 WHERE value2 != 200; - --- select asin as nest with log2 (pushdown, explain) ---Testcase 639: -EXPLAIN VERBOSE -SELECT asin(log2(value1)),asin(log2(1/value1)) FROM s3; - --- select asin as nest with log2 (pushdown, result) ---Testcase 640: -SELECT asin(log2(value1)),asin(log2(1/value1)) FROM s3; - --- select asin with non pushdown func and explicit constant (explain) ---Testcase 641: -EXPLAIN VERBOSE -SELECT asin(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; - --- select asin with non pushdown func and explicit constant (result) ---Testcase 642: -SELECT asin(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; - --- select asin with order by (explain) ---Testcase 643: -EXPLAIN VERBOSE -SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY asin(1-value1); - --- select asin with order by (result) ---Testcase 644: -SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY asin(1-value1); - --- select asin with order by index (result) ---Testcase 645: -SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 2,1; - --- select asin with order by index (result) ---Testcase 646: -SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 1,2; - --- select asin and as ---Testcase 647: -SELECT asin(value3) as asin1 FROM s3 WHERE value2 != 200; - --- select asin(*) (stub agg function, explain) ---Testcase 648: -EXPLAIN VERBOSE -SELECT asin_all() from s3; - --- select asin(*) (stub agg function, result) ---Testcase 649: -SELECT asin_all() from s3; - --- select asin(*) (stub agg function and group by tag only) (explain) ---Testcase 650: -EXPLAIN VERBOSE -SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select asin(*) (stub agg function and group by tag only) (result) ---Testcase 651: -SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select asin(*) (stub agg function, expose data, explain) ---Testcase 652: -EXPLAIN VERBOSE -SELECT (asin_all()::s3).* from s3; - --- select asin(*) (stub agg function, expose data, result) ---Testcase 653: -SELECT (asin_all()::s3).* from s3; - --- select atan (builtin function, explain) ---Testcase 654: -EXPLAIN VERBOSE -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3; - --- select atan (builtin function, result) ---Testcase 655: -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3; - --- select atan (builtin function, not pushdown constraints, explain) ---Testcase 656: -EXPLAIN VERBOSE -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select atan (builtin function, not pushdown constraints, result) ---Testcase 657: -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select atan (builtin function, pushdown constraints, explain) ---Testcase 658: -EXPLAIN VERBOSE -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE value2 != 200; - --- select atan (builtin function, pushdown constraints, result) ---Testcase 659: -SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE value2 != 200; - --- select atan as nest function with agg (pushdown, explain) ---Testcase 660: -EXPLAIN VERBOSE -SELECT sum(value3),atan(sum(value3)) FROM s3; - --- select atan as nest function with agg (pushdown, result) ---Testcase 661: -SELECT sum(value3),atan(sum(value3)) FROM s3; - --- select atan as nest with log2 (pushdown, explain) ---Testcase 662: -EXPLAIN VERBOSE -SELECT atan(log2(value1)),atan(log2(1/value1)) FROM s3; - --- select atan as nest with log2 (pushdown, result) ---Testcase 663: -SELECT atan(log2(value1)),atan(log2(1/value1)) FROM s3; - --- select atan with non pushdown func and explicit constant (explain) ---Testcase 664: -EXPLAIN VERBOSE -SELECT atan(value3), pi(), 4.1 FROM s3; - --- select atan with non pushdown func and explicit constant (result) ---Testcase 665: -SELECT atan(value3), pi(), 4.1 FROM s3; - --- select atan with order by (explain) ---Testcase 666: -EXPLAIN VERBOSE -SELECT value1, atan(1-value1) FROM s3 order by atan(1-value1); - --- select atan with order by (result) ---Testcase 667: -SELECT value1, atan(1-value1) FROM s3 order by atan(1-value1); - --- select atan with order by index (result) ---Testcase 668: -SELECT value1, atan(1-value1) FROM s3 order by 2,1; - --- select atan with order by index (result) ---Testcase 669: -SELECT value1, atan(1-value1) FROM s3 order by 1,2; - --- select atan and as ---Testcase 670: -SELECT atan(value3) as atan1 FROM s3; - --- select atan(*) (stub agg function, explain) ---Testcase 671: -EXPLAIN VERBOSE -SELECT atan_all() from s3; - --- select atan(*) (stub agg function, result) ---Testcase 672: -SELECT atan_all() from s3; - --- select atan(*) (stub agg function and group by tag only) (explain) ---Testcase 673: -EXPLAIN VERBOSE -SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select atan(*) (stub agg function and group by tag only) (result) ---Testcase 674: -SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select atan(*) (stub agg function, expose data, explain) ---Testcase 675: -EXPLAIN VERBOSE -SELECT (atan_all()::s3).* from s3; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 676: -SELECT asin_all(), acos_all(), atan_all() FROM s3; - --- select atan2 (builtin function, explain) ---Testcase 677: -EXPLAIN VERBOSE -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3; - --- select atan2 (builtin function, result) ---Testcase 678: -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3; - --- select atan2 (builtin function, not pushdown constraints, explain) ---Testcase 679: -EXPLAIN VERBOSE -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE to_hex(value2) != '64'; - --- select atan2 (builtin function, not pushdown constraints, result) ---Testcase 680: -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE to_hex(value2) != '64'; - --- select atan2 (builtin function, pushdown constraints, explain) ---Testcase 681: -EXPLAIN VERBOSE -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE value2 != 200; - --- select atan2 (builtin function, pushdown constraints, result) ---Testcase 682: -SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE value2 != 200; - --- select atan2 as nest function with agg (pushdown, explain) ---Testcase 683: -EXPLAIN VERBOSE -SELECT sum(value3), sum(value4),atan2(sum(value3), sum(value3)) FROM s3; - --- select atan2 as nest function with agg (pushdown, result) ---Testcase 684: -SELECT sum(value3), sum(value4),atan2(sum(value3), sum(value3)) FROM s3; - --- select atan2 as nest with log2 (pushdown, explain) ---Testcase 685: -EXPLAIN VERBOSE -SELECT atan2(log2(value1), log2(value1)),atan2(log2(1/value1), log2(1/value1)) FROM s3; - --- select atan2 as nest with log2 (pushdown, result) ---Testcase 686: -SELECT atan2(log2(value1), log2(value1)),atan2(log2(1/value1), log2(1/value1)) FROM s3; - --- select atan2 with non pushdown func and explicit constant (explain) ---Testcase 687: -EXPLAIN VERBOSE -SELECT atan2(value3, value4), pi(), 4.1 FROM s3; - --- select atan2 with non pushdown func and explicit constant (result) ---Testcase 688: -SELECT atan2(value3, value4), pi(), 4.1 FROM s3; - --- select atan2 with order by (explain) ---Testcase 689: -EXPLAIN VERBOSE -SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by atan2(1-value1, 1-value2); - --- select atan2 with order by (result) ---Testcase 690: -SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by atan2(1-value1, 1-value2); - --- select atan2 with order by index (result) ---Testcase 691: -SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by 2,1; - --- select atan2 with order by index (result) ---Testcase 692: -SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by 1,2; - --- select atan2 and as ---Testcase 693: -SELECT atan2(value3, value4) as atan21 FROM s3; - --- select atan2(*) (stub function, explain) ---Testcase 694: -EXPLAIN VERBOSE -SELECT atan2_all(value1) from s3; - --- select atan2(*) (stub function, result) ---Testcase 695: -SELECT atan2_all(value1) from s3; - --- select ceil (builtin function, explain) ---Testcase 696: -EXPLAIN VERBOSE -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3; - --- select ceil (builtin function, result) ---Testcase 697: -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3; - --- select ceil (builtin function, not pushdown constraints, explain) ---Testcase 698: -EXPLAIN VERBOSE -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select ceil (builtin function, not pushdown constraints, result) ---Testcase 699: -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select ceil (builtin function, pushdown constraints, explain) ---Testcase 700: -EXPLAIN VERBOSE -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE value2 != 200; - --- select ceil (builtin function, pushdown constraints, result) ---Testcase 701: -SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE value2 != 200; - --- select ceil as nest function with agg (pushdown, explain) ---Testcase 702: -EXPLAIN VERBOSE -SELECT sum(value3),ceil(sum(value3)) FROM s3; - --- select ceil as nest function with agg (pushdown, result) ---Testcase 703: -SELECT sum(value3),ceil(sum(value3)) FROM s3; - --- select ceil as nest with log2 (pushdown, explain) ---Testcase 704: -EXPLAIN VERBOSE -SELECT ceil(log2(value1)),ceil(log2(1/value1)) FROM s3; - --- select ceil as nest with log2 (pushdown, result) ---Testcase 705: -SELECT ceil(log2(value1)),ceil(log2(1/value1)) FROM s3; - --- select ceil with non pushdown func and explicit constant (explain) ---Testcase 706: -EXPLAIN VERBOSE -SELECT ceil(value3), pi(), 4.1 FROM s3; - --- select ceil with non pushdown func and explicit constant (result) ---Testcase 707: -SELECT ceil(value3), pi(), 4.1 FROM s3; - --- select ceil with order by (explain) ---Testcase 708: -EXPLAIN VERBOSE -SELECT value1, ceil(1-value1) FROM s3 order by ceil(1-value1); - --- select ceil with order by (result) ---Testcase 709: -SELECT value1, ceil(1-value1) FROM s3 order by ceil(1-value1); - --- select ceil with order by index (result) ---Testcase 710: -SELECT value1, ceil(1-value1) FROM s3 order by 2,1; - --- select ceil with order by index (result) ---Testcase 711: -SELECT value1, ceil(1-value1) FROM s3 order by 1,2; - --- select ceil and as ---Testcase 712: -SELECT ceil(value3) as ceil1 FROM s3; - --- select ceil(*) (stub agg function, explain) ---Testcase 713: -EXPLAIN VERBOSE -SELECT ceil_all() from s3; - --- select ceil(*) (stub agg function, result) ---Testcase 714: -SELECT ceil_all() from s3; - --- select ceil(*) (stub agg function and group by tag only) (explain) ---Testcase 715: -EXPLAIN VERBOSE -SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select ceil(*) (stub agg function and group by tag only) (result) ---Testcase 716: -SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select ceil(*) (stub agg function, expose data, explain) ---Testcase 717: -EXPLAIN VERBOSE -SELECT (ceil_all()::s3).* from s3; - --- select ceil(*) (stub agg function, expose data, result) ---Testcase 718: -SELECT (ceil_all()::s3).* from s3; - --- select cos (builtin function, explain) ---Testcase 719: -EXPLAIN VERBOSE -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3; - --- select cos (builtin function, result) ---Testcase 720: -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3; - --- select cos (builtin function, not pushdown constraints, explain) ---Testcase 721: -EXPLAIN VERBOSE -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select cos (builtin function, not pushdown constraints, result) ---Testcase 722: -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select cos (builtin function, pushdown constraints, explain) ---Testcase 723: -EXPLAIN VERBOSE -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE value2 != 200; - --- select cos (builtin function, pushdown constraints, result) ---Testcase 724: -SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE value2 != 200; - --- select cos as nest function with agg (pushdown, explain) ---Testcase 725: -EXPLAIN VERBOSE -SELECT sum(value3),cos(sum(value3)) FROM s3; - --- select cos as nest function with agg (pushdown, result) ---Testcase 726: -SELECT sum(value3),cos(sum(value3)) FROM s3; - --- select cos as nest with log2 (pushdown, explain) ---Testcase 727: -EXPLAIN VERBOSE -SELECT cos(log2(value1)),cos(log2(1/value1)) FROM s3; - --- select cos as nest with log2 (pushdown, result) ---Testcase 728: -SELECT cos(log2(value1)),cos(log2(1/value1)) FROM s3; - --- select cos with non pushdown func and explicit constant (explain) ---Testcase 729: -EXPLAIN VERBOSE -SELECT cos(value3), pi(), 4.1 FROM s3; - --- select cos with non pushdown func and explicit constant (result) ---Testcase 730: -SELECT cos(value3), pi(), 4.1 FROM s3; - --- select cos with order by (explain) ---Testcase 731: -EXPLAIN VERBOSE -SELECT value1, cos(1-value1) FROM s3 order by cos(1-value1); - --- select cos with order by (result) ---Testcase 732: -SELECT value1, cos(1-value1) FROM s3 order by cos(1-value1); - --- select cos with order by index (result) ---Testcase 733: -SELECT value1, cos(1-value1) FROM s3 order by 2,1; - --- select cos with order by index (result) ---Testcase 734: -SELECT value1, cos(1-value1) FROM s3 order by 1,2; - --- select cos and as ---Testcase 735: -SELECT cos(value3) as cos1 FROM s3; - --- select cos(*) (stub agg function, explain) ---Testcase 736: -EXPLAIN VERBOSE -SELECT cos_all() from s3; - --- select cos(*) (stub agg function, result) ---Testcase 737: -SELECT cos_all() from s3; - --- select cos(*) (stub agg function and group by tag only) (explain) ---Testcase 738: -EXPLAIN VERBOSE -SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select cos(*) (stub agg function and group by tag only) (result) ---Testcase 739: -SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select exp (builtin function, explain) ---Testcase 740: -EXPLAIN VERBOSE -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3; - --- select exp (builtin function, result) ---Testcase 741: -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3; - --- select exp (builtin function, not pushdown constraints, explain) ---Testcase 742: -EXPLAIN VERBOSE -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select exp (builtin function, not pushdown constraints, result) ---Testcase 743: -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select exp (builtin function, pushdown constraints, explain) ---Testcase 744: -EXPLAIN VERBOSE -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE value2 != 200; - --- select exp (builtin function, pushdown constraints, result) ---Testcase 745: -SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE value2 != 200; - --- select exp as nest function with agg (pushdown, explain) ---Testcase 746: -EXPLAIN VERBOSE -SELECT sum(value3),exp(sum(value3)) FROM s3; - --- select exp as nest function with agg (pushdown, result) ---Testcase 747: -SELECT sum(value3),exp(sum(value3)) FROM s3; - --- select exp as nest with log2 (pushdown, explain) ---Testcase 748: -EXPLAIN VERBOSE -SELECT exp(log2(value1)),exp(log2(1/value1)) FROM s3; - --- select exp as nest with log2 (pushdown, result) ---Testcase 749: -SELECT exp(log2(value1)),exp(log2(1/value1)) FROM s3; - --- select exp with non pushdown func and explicit constant (explain) ---Testcase 750: -EXPLAIN VERBOSE -SELECT exp(value3), pi(), 4.1 FROM s3; - --- select exp with non pushdown func and explicit constant (result) ---Testcase 751: -SELECT exp(value3), pi(), 4.1 FROM s3; - --- select exp with order by (explain) ---Testcase 752: -EXPLAIN VERBOSE -SELECT value1, exp(1-value1) FROM s3 order by exp(1-value1); - --- select exp with order by (result) ---Testcase 753: -SELECT value1, exp(1-value1) FROM s3 order by exp(1-value1); - --- select exp with order by index (result) ---Testcase 754: -SELECT value1, exp(1-value1) FROM s3 order by 2,1; - --- select exp with order by index (result) ---Testcase 755: -SELECT value1, exp(1-value1) FROM s3 order by 1,2; - --- select exp and as ---Testcase 756: -SELECT exp(value3) as exp1 FROM s3; - --- select exp(*) (stub agg function, explain) ---Testcase 757: -EXPLAIN VERBOSE -SELECT exp_all() from s3; - --- select exp(*) (stub agg function, result) ---Testcase 758: -SELECT exp_all() from s3; - --- select exp(*) (stub agg function and group by tag only) (explain) ---Testcase 759: -EXPLAIN VERBOSE -SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select exp(*) (stub agg function and group by tag only) (result) ---Testcase 760: -SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 761: -SELECT ceil_all(), cos_all(), exp_all() FROM s3; - --- select floor (builtin function, explain) ---Testcase 762: -EXPLAIN VERBOSE -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3; - --- select floor (builtin function, result) ---Testcase 763: -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3; - --- select floor (builtin function, not pushdown constraints, explain) ---Testcase 764: -EXPLAIN VERBOSE -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select floor (builtin function, not pushdown constraints, result) ---Testcase 765: -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select floor (builtin function, pushdown constraints, explain) ---Testcase 766: -EXPLAIN VERBOSE -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE value2 != 200; - --- select floor (builtin function, pushdown constraints, result) ---Testcase 767: -SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE value2 != 200; - --- select floor as nest function with agg (pushdown, explain) ---Testcase 768: -EXPLAIN VERBOSE -SELECT sum(value3),floor(sum(value3)) FROM s3; - --- select floor as nest function with agg (pushdown, result) ---Testcase 769: -SELECT sum(value3),floor(sum(value3)) FROM s3; - --- select floor as nest with log2 (pushdown, explain) ---Testcase 770: -EXPLAIN VERBOSE -SELECT floor(log2(value1)),floor(log2(1/value1)) FROM s3; - --- select floor as nest with log2 (pushdown, result) ---Testcase 771: -SELECT floor(log2(value1)),floor(log2(1/value1)) FROM s3; - --- select floor with non pushdown func and explicit constant (explain) ---Testcase 772: -EXPLAIN VERBOSE -SELECT floor(value3), pi(), 4.1 FROM s3; - --- select floor with non pushdown func and explicit constant (result) ---Testcase 773: -SELECT floor(value3), pi(), 4.1 FROM s3; - --- select floor with order by (explain) ---Testcase 774: -EXPLAIN VERBOSE -SELECT value1, floor(1-value1) FROM s3 order by floor(1-value1); - --- select floor with order by (result) ---Testcase 775: -SELECT value1, floor(1-value1) FROM s3 order by floor(1-value1); - --- select floor with order by index (result) ---Testcase 776: -SELECT value1, floor(1-value1) FROM s3 order by 2,1; - --- select floor with order by index (result) ---Testcase 777: -SELECT value1, floor(1-value1) FROM s3 order by 1,2; - --- select floor and as ---Testcase 778: -SELECT floor(value3) as floor1 FROM s3; - --- select floor(*) (stub agg function, explain) ---Testcase 779: -EXPLAIN VERBOSE -SELECT floor_all() from s3; - --- select floor(*) (stub agg function, result) ---Testcase 780: -SELECT floor_all() from s3; - --- select floor(*) (stub agg function and group by tag only) (explain) ---Testcase 781: -EXPLAIN VERBOSE -SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select floor(*) (stub agg function and group by tag only) (result) ---Testcase 782: -SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select floor(*) (stub agg function, expose data, explain) ---Testcase 783: -EXPLAIN VERBOSE -SELECT (floor_all()::s3).* from s3; - --- select floor(*) (stub agg function, expose data, result) ---Testcase 784: -SELECT (floor_all()::s3).* from s3; - --- select ln (builtin function, explain) ---Testcase 785: -EXPLAIN VERBOSE -SELECT ln(value1), ln(value2) FROM s3; - --- select ln (builtin function, result) ---Testcase 786: -SELECT ln(value1), ln(value2) FROM s3; - --- select ln (builtin function, not pushdown constraints, explain) ---Testcase 787: -EXPLAIN VERBOSE -SELECT ln(value1), ln(value2) FROM s3 WHERE to_hex(value2) != '64'; - --- select ln (builtin function, not pushdown constraints, result) ---Testcase 788: -SELECT ln(value1), ln(value2) FROM s3 WHERE to_hex(value2) != '64'; - --- select ln (builtin function, pushdown constraints, explain) ---Testcase 789: -EXPLAIN VERBOSE -SELECT ln(value1), ln(value2) FROM s3 WHERE value2 != 200; - --- select ln (builtin function, pushdown constraints, result) ---Testcase 790: -SELECT ln(value1), ln(value2) FROM s3 WHERE value2 != 200; - --- select ln as nest function with agg (pushdown, explain) ---Testcase 791: -EXPLAIN VERBOSE -SELECT sum(value3),ln(sum(value3)) FROM s3; - --- select ln as nest function with agg (pushdown, result) ---Testcase 792: -SELECT sum(value3),ln(sum(value3)) FROM s3; - --- select ln as nest with log2 (pushdown, explain) ---Testcase 793: -EXPLAIN VERBOSE -SELECT ln(log2(value1)),ln(log2(1/value1)) FROM s3; - --- select ln as nest with log2 (pushdown, result) ---Testcase 794: -SELECT ln(log2(value1)),ln(log2(1/value1)) FROM s3; - --- select ln with non pushdown func and explicit constant (explain) ---Testcase 795: -EXPLAIN VERBOSE -SELECT ln(value3), pi(), 4.1 FROM s3; - --- select ln with non pushdown func and explicit constant (result) ---Testcase 796: -SELECT ln(value3), pi(), 4.1 FROM s3; - --- select ln with order by (explain) ---Testcase 797: -EXPLAIN VERBOSE -SELECT value1, ln(1-value1) FROM s3 order by ln(1-value1); - --- select ln with order by (result) ---Testcase 798: -SELECT value1, ln(1-value1) FROM s3 order by ln(1-value1); - --- select ln with order by index (result) ---Testcase 799: -SELECT value1, ln(1-value1) FROM s3 order by 2,1; - --- select ln with order by index (result) ---Testcase 800: -SELECT value1, ln(1-value1) FROM s3 order by 1,2; - --- select ln and as ---Testcase 801: -SELECT ln(value1) as ln1 FROM s3; - --- select ln(*) (stub agg function, explain) ---Testcase 802: -EXPLAIN VERBOSE -SELECT ln_all() from s3; - --- select ln(*) (stub agg function, result) ---Testcase 803: -SELECT ln_all() from s3; - --- select ln(*) (stub agg function and group by tag only) (explain) ---Testcase 804: -EXPLAIN VERBOSE -SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select ln(*) (stub agg function and group by tag only) (result) ---Testcase 805: -SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 806: -SELECT ln_all(), floor_all() FROM s3; - --- select pow (builtin function, explain) ---Testcase 807: -EXPLAIN VERBOSE -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3; - --- select pow (builtin function, result) ---Testcase 808: -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3; - --- select pow (builtin function, not pushdown constraints, explain) ---Testcase 809: -EXPLAIN VERBOSE -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE to_hex(value2) != '64'; - --- select pow (builtin function, not pushdown constraints, result) ---Testcase 810: -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE to_hex(value2) != '64'; - --- select pow (builtin function, pushdown constraints, explain) ---Testcase 811: -EXPLAIN VERBOSE -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE value2 != 200; - --- select pow (builtin function, pushdown constraints, result) ---Testcase 812: -SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE value2 != 200; - --- select pow as nest function with agg (pushdown, explain) ---Testcase 813: -EXPLAIN VERBOSE -SELECT sum(value3),pow(sum(value3), 2) FROM s3; - --- select pow as nest function with agg (pushdown, result) ---Testcase 814: -SELECT sum(value3),pow(sum(value3), 2) FROM s3; - --- select pow as nest with log2 (pushdown, explain) ---Testcase 815: -EXPLAIN VERBOSE -SELECT pow(log2(value1), 2),pow(log2(1/value1), 2) FROM s3; - --- select pow as nest with log2 (pushdown, result) ---Testcase 816: -SELECT pow(log2(value1), 2),pow(log2(1/value1), 2) FROM s3; - --- select pow with non pushdown func and explicit constant (explain) ---Testcase 817: -EXPLAIN VERBOSE -SELECT pow(value3, 2), pi(), 4.1 FROM s3; - --- select pow with non pushdown func and explicit constant (result) ---Testcase 818: -SELECT pow(value3, 2), pi(), 4.1 FROM s3; - --- select pow with order by (explain) ---Testcase 819: -EXPLAIN VERBOSE -SELECT value1, pow(1-value1, 2) FROM s3 order by pow(1-value1, 2); - --- select pow with order by (result) ---Testcase 820: -SELECT value1, pow(1-value1, 2) FROM s3 order by pow(1-value1, 2); - --- select pow with order by index (result) ---Testcase 821: -SELECT value1, pow(1-value1, 2) FROM s3 order by 2,1; - --- select pow with order by index (result) ---Testcase 822: -SELECT value1, pow(1-value1, 2) FROM s3 order by 1,2; - --- select pow and as ---Testcase 823: -SELECT pow(value3, 2) as pow1 FROM s3; - --- select pow_all(2) (stub agg function, explain) ---Testcase 824: -EXPLAIN VERBOSE -SELECT pow_all(2) from s3; - --- select pow_all(2) (stub agg function, result) ---Testcase 825: -SELECT pow_all(2) from s3; - --- select pow_all(2) (stub agg function and group by tag only) (explain) ---Testcase 826: -EXPLAIN VERBOSE -SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select pow_all(2) (stub agg function and group by tag only) (result) ---Testcase 827: -SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select pow_all(2) (stub agg function, expose data, explain) ---Testcase 828: -EXPLAIN VERBOSE -SELECT (pow_all(2)::s3).* from s3; - --- select pow_all(2) (stub agg function, expose data, result) ---Testcase 829: -SELECT (pow_all(2)::s3).* from s3; - --- select round (builtin function, explain) ---Testcase 830: -EXPLAIN VERBOSE -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3; - --- select round (builtin function, result) ---Testcase 831: -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3; - --- select round (builtin function, not pushdown constraints, explain) ---Testcase 832: -EXPLAIN VERBOSE -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select round (builtin function, not pushdown constraints, result) ---Testcase 833: -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select round (builtin function, pushdown constraints, explain) ---Testcase 834: -EXPLAIN VERBOSE -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE value2 != 200; - --- select round (builtin function, pushdown constraints, result) ---Testcase 835: -SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE value2 != 200; - --- select round as nest function with agg (pushdown, explain) ---Testcase 836: -EXPLAIN VERBOSE -SELECT sum(value3),round(sum(value3)) FROM s3; - --- select round as nest function with agg (pushdown, result) ---Testcase 837: -SELECT sum(value3),round(sum(value3)) FROM s3; - --- select round as nest with log2 (pushdown, explain) ---Testcase 838: -EXPLAIN VERBOSE -SELECT round(log2(value1)),round(log2(1/value1)) FROM s3; - --- select round as nest with log2 (pushdown, result) ---Testcase 839: -SELECT round(log2(value1)),round(log2(1/value1)) FROM s3; - --- select round with non pushdown func and roundlicit constant (explain) ---Testcase 840: -EXPLAIN VERBOSE -SELECT round(value3), pi(), 4.1 FROM s3; - --- select round with non pushdown func and roundlicit constant (result) ---Testcase 841: -SELECT round(value3), pi(), 4.1 FROM s3; - --- select round with order by (explain) ---Testcase 842: -EXPLAIN VERBOSE -SELECT value1, round(1-value1) FROM s3 order by round(1-value1); - --- select round with order by (result) ---Testcase 843: -SELECT value1, round(1-value1) FROM s3 order by round(1-value1); - --- select round with order by index (result) ---Testcase 844: -SELECT value1, round(1-value1) FROM s3 order by 2,1; - --- select round with order by index (result) ---Testcase 845: -SELECT value1, round(1-value1) FROM s3 order by 1,2; - --- select round and as ---Testcase 846: -SELECT round(value3) as round1 FROM s3; - --- select round(*) (stub agg function, explain) ---Testcase 847: -EXPLAIN VERBOSE -SELECT round_all() from s3; - --- select round(*) (stub agg function, result) ---Testcase 848: -SELECT round_all() from s3; - --- select round(*) (stub agg function and group by tag only) (explain) ---Testcase 849: -EXPLAIN VERBOSE -SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select round(*) (stub agg function and group by tag only) (result) ---Testcase 850: -SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select round(*) (stub agg function, expose data, explain) ---Testcase 851: -EXPLAIN VERBOSE -SELECT (round_all()::s3).* from s3; - --- select round(*) (stub agg function, expose data, result) ---Testcase 852: -SELECT (round_all()::s3).* from s3; - --- select sin (builtin function, explain) ---Testcase 853: -EXPLAIN VERBOSE -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3; - --- select sin (builtin function, result) ---Testcase 854: -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3; - --- select sin (builtin function, not pushdown constraints, explain) ---Testcase 855: -EXPLAIN VERBOSE -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select sin (builtin function, not pushdown constraints, result) ---Testcase 856: -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select sin (builtin function, pushdown constraints, explain) ---Testcase 857: -EXPLAIN VERBOSE -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE value2 != 200; - --- select sin (builtin function, pushdown constraints, result) ---Testcase 858: -SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE value2 != 200; - --- select sin as nest function with agg (pushdown, explain) ---Testcase 859: -EXPLAIN VERBOSE -SELECT sum(value3),sin(sum(value3)) FROM s3; - --- select sin as nest function with agg (pushdown, result) ---Testcase 860: -SELECT sum(value3),sin(sum(value3)) FROM s3; - --- select sin as nest with log2 (pushdown, explain) ---Testcase 861: -EXPLAIN VERBOSE -SELECT sin(log2(value1)),sin(log2(1/value1)) FROM s3; - --- select sin as nest with log2 (pushdown, result) ---Testcase 862: -SELECT sin(log2(value1)),sin(log2(1/value1)) FROM s3; - --- select sin with non pushdown func and explicit constant (explain) ---Testcase 863: -EXPLAIN VERBOSE -SELECT sin(value3), pi(), 4.1 FROM s3; - --- select sin with non pushdown func and explicit constant (result) ---Testcase 864: -SELECT sin(value3), pi(), 4.1 FROM s3; - --- select sin with order by (explain) ---Testcase 865: -EXPLAIN VERBOSE -SELECT value1, sin(1-value1) FROM s3 order by sin(1-value1); - --- select sin with order by (result) ---Testcase 866: -SELECT value1, sin(1-value1) FROM s3 order by sin(1-value1); - --- select sin with order by index (result) ---Testcase 867: -SELECT value1, sin(1-value1) FROM s3 order by 2,1; - --- select sin with order by index (result) ---Testcase 868: -SELECT value1, sin(1-value1) FROM s3 order by 1,2; - --- select sin and as ---Testcase 869: -SELECT sin(value3) as sin1 FROM s3; - --- select sin(*) (stub agg function, explain) ---Testcase 870: -EXPLAIN VERBOSE -SELECT sin_all() from s3; - --- select sin(*) (stub agg function, result) ---Testcase 871: -SELECT sin_all() from s3; - --- select sin(*) (stub agg function and group by tag only) (explain) ---Testcase 872: -EXPLAIN VERBOSE -SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select sin(*) (stub agg function and group by tag only) (result) ---Testcase 873: -SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select tan (builtin function, explain) ---Testcase 874: -EXPLAIN VERBOSE -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3; - --- select tan (builtin function, result) ---Testcase 875: -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3; - --- select tan (builtin function, not pushdown constraints, explain) ---Testcase 876: -EXPLAIN VERBOSE -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select tan (builtin function, not pushdown constraints, result) ---Testcase 877: -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE to_hex(value2) != '64'; - --- select tan (builtin function, pushdown constraints, explain) ---Testcase 878: -EXPLAIN VERBOSE -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE value2 != 200; - --- select tan (builtin function, pushdown constraints, result) ---Testcase 879: -SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE value2 != 200; - --- select tan as nest function with agg (pushdown, explain) ---Testcase 880: -EXPLAIN VERBOSE -SELECT sum(value3),tan(sum(value3)) FROM s3; - --- select tan as nest function with agg (pushdown, result) ---Testcase 881: -SELECT sum(value3),tan(sum(value3)) FROM s3; - --- select tan as nest with log2 (pushdown, explain) ---Testcase 882: -EXPLAIN VERBOSE -SELECT tan(log2(value1)),tan(log2(1/value1)) FROM s3; - --- select tan as nest with log2 (pushdown, result) ---Testcase 883: -SELECT tan(log2(value1)),tan(log2(1/value1)) FROM s3; - --- select tan with non pushdown func and tanlicit constant (explain) ---Testcase 884: -EXPLAIN VERBOSE -SELECT tan(value3), pi(), 4.1 FROM s3; - --- select tan with non pushdown func and tanlicit constant (result) ---Testcase 885: -SELECT tan(value3), pi(), 4.1 FROM s3; - --- select tan with order by (explain) ---Testcase 886: -EXPLAIN VERBOSE -SELECT value1, tan(1-value1) FROM s3 order by tan(1-value1); - --- select tan with order by (result) ---Testcase 887: -SELECT value1, tan(1-value1) FROM s3 order by tan(1-value1); - --- select tan with order by index (result) ---Testcase 888: -SELECT value1, tan(1-value1) FROM s3 order by 2,1; - --- select tan with order by index (result) ---Testcase 889: -SELECT value1, tan(1-value1) FROM s3 order by 1,2; - --- select tan and as ---Testcase 890: -SELECT tan(value3) as tan1 FROM s3; - --- select tan(*) (stub agg function, explain) ---Testcase 891: -EXPLAIN VERBOSE -SELECT tan_all() from s3; - --- select tan(*) (stub agg function, result) ---Testcase 892: -SELECT tan_all() from s3; - --- select tan(*) (stub agg function and group by tag only) (explain) ---Testcase 893: -EXPLAIN VERBOSE -SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select tan(*) (stub agg function and group by tag only) (result) ---Testcase 894: -SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select multiple star functions (do not push down, raise warning and stub error) (result) ---Testcase 895: -SELECT sin_all(), round_all(), tan_all() FROM s3; - --- select predictors function holt_winters() (explain) ---Testcase 896: -EXPLAIN VERBOSE -SELECT holt_winters(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - --- select predictors function holt_winters() (result) ---Testcase 897: -SELECT holt_winters(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - --- select predictors function holt_winters_with_fit() (explain) ---Testcase 898: -EXPLAIN VERBOSE -SELECT holt_winters_with_fit(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - --- select predictors function holt_winters_with_fit() (result) ---Testcase 899: -SELECT holt_winters_with_fit(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); - --- select count(*) function of InfluxDB (stub agg function, explain) ---Testcase 900: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3; - --- select count(*) function of InfluxDB (stub agg function, result) ---Testcase 901: -SELECT influx_count_all(*) FROM s3; - --- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (explain) ---Testcase 902: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (result) ---Testcase 903: -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select count(*) function of InfluxDB (stub agg function and group by tag only) (explain) ---Testcase 904: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select count(*) function of InfluxDB (stub agg function and group by tag only) (result) ---Testcase 905: -SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select count(*) function of InfluxDB over join query (explain) ---Testcase 906: -EXPLAIN VERBOSE -SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select count(*) function of InfluxDB over join query (result, stub call error) ---Testcase 907: -SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select distinct (stub agg function, explain) ---Testcase 908: -EXPLAIN VERBOSE -SELECT influx_distinct(value1) FROM s3; - --- select distinct (stub agg function, result) ---Testcase 909: -SELECT influx_distinct(value1) FROM s3; - --- select distinct (stub agg function and group by influx_time() and tag) (explain) ---Testcase 910: -EXPLAIN VERBOSE -SELECT influx_distinct(value1), influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select distinct (stub agg function and group by influx_time() and tag) (result) ---Testcase 911: -SELECT influx_distinct(value1), influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; - --- select distinct (stub agg function and group by tag only) (explain) ---Testcase 912: -EXPLAIN VERBOSE -SELECT influx_distinct(value2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select distinct (stub agg function and group by tag only) (result) ---Testcase 913: -SELECT influx_distinct(value2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; - --- select distinct over join query (explain) ---Testcase 914: -EXPLAIN VERBOSE -SELECT influx_distinct(t1.value2) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select distinct over join query (result, stub call error) ---Testcase 915: -SELECT influx_distinct(t1.value2) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; - --- select distinct with having (explain) ---Testcase 916: -EXPLAIN VERBOSE -SELECT influx_distinct(value2) FROM s3 HAVING influx_distinct(value2) > 100; - --- select distinct with having (result, not pushdown, stub call error) ---Testcase 917: -SELECT influx_distinct(value2) FROM s3 HAVING influx_distinct(value2) > 100; - ---Testcase 918: -DROP FOREIGN TABLE s3; - ---Testcase 919: -CREATE FOREIGN TABLE b3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 bool) SERVER server1 OPTIONS(table 'b3', tags 'tag1'); - --- bool type var in where clause (result) ---Testcase 920: -EXPLAIN VERBOSE -SELECT sqrt(abs(value1)) FROM b3 WHERE value3 != true ORDER BY 1; - --- bool type var in where clause (result) ---Testcase 921: -SELECT sqrt(abs(value1)) FROM b3 WHERE value3 != true ORDER BY 1; - ---Testcase 922: -DROP FOREIGN TABLE b3; - ---Testcase 923: -DROP USER MAPPING FOR CURRENT_USER SERVER server1; ---Testcase 924: -DROP SERVER server1; ---Testcase 925: -DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/13.4/aggregate.sql b/sql/14.5/aggregate.sql similarity index 98% rename from sql/13.4/aggregate.sql rename to sql/14.5/aggregate.sql index 4368c6d..da4875a 100644 --- a/sql/13.4/aggregate.sql +++ b/sql/14.5/aggregate.sql @@ -15,9 +15,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); diff --git a/sql/14.0/extra/aggregates.sql b/sql/14.5/extra/aggregates.sql similarity index 99% rename from sql/14.0/extra/aggregates.sql rename to sql/14.5/extra/aggregates.sql index b60423d..04b97e0 100644 --- a/sql/14.0/extra/aggregates.sql +++ b/sql/14.5/extra/aggregates.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( diff --git a/sql/14.0/extra/influxdb_fdw_post.sql b/sql/14.5/extra/influxdb_fdw_post.sql similarity index 99% rename from sql/14.0/extra/influxdb_fdw_post.sql rename to sql/14.5/extra/influxdb_fdw_post.sql index 24f0607..210c057 100644 --- a/sql/14.0/extra/influxdb_fdw_post.sql +++ b/sql/14.5/extra/influxdb_fdw_post.sql @@ -12,17 +12,17 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server @@ -802,7 +802,7 @@ DROP FOREIGN TABLE local_tbl; --Testcase 208: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 209: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; @@ -1908,6 +1908,14 @@ INSERT INTO rw_view VALUES (0, 15); -- ok --Testcase 505: SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +SELECT * FROM foreign_tbl; +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); + --EXPLAIN (VERBOSE, COSTS OFF) --UPDATE rw_view SET b = b + 5; --UPDATE rw_view SET b = b + 5; -- should fail @@ -1968,6 +1976,14 @@ SELECT * FROM foreign_tbl; --UPDATE rw_view SET b = b + 15; -- ok --SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +SELECT * FROM foreign_tbl; +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); + --Testcase 521: DROP FOREIGN TABLE foreign_tbl CASCADE; --Testcase 522: @@ -3722,7 +3738,7 @@ BEGIN; --Testcase 699: CREATE SERVER batch10 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS(dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT, batch_size '10' ); + OPTIONS(dbname 'postdb', :SERVER, batch_size '10' ); --Testcase 700: SELECT count(*) diff --git a/sql/13.4/extra/init.sql b/sql/14.5/extra/init.sql similarity index 100% rename from sql/13.4/extra/init.sql rename to sql/14.5/extra/init.sql diff --git a/sql/13.4/extra/insert.sql b/sql/14.5/extra/insert.sql similarity index 99% rename from sql/13.4/extra/insert.sql rename to sql/14.5/extra/insert.sql index 6003590..785e0ef 100644 --- a/sql/13.4/extra/insert.sql +++ b/sql/14.5/extra/insert.sql @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list diff --git a/sql/14.0/extra/join.sql b/sql/14.5/extra/join.sql similarity index 99% rename from sql/14.0/extra/join.sql rename to sql/14.5/extra/join.sql index 1412fff..59e4530 100644 --- a/sql/14.0/extra/join.sql +++ b/sql/14.5/extra/join.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; diff --git a/sql/14.0/extra/limit.sql b/sql/14.5/extra/limit.sql similarity index 98% rename from sql/14.0/extra/limit.sql rename to sql/14.5/extra/limit.sql index d033769..91a4cb8 100644 --- a/sql/14.0/extra/limit.sql +++ b/sql/14.5/extra/limit.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- LIMIT diff --git a/sql/11.13/extra/prepare.sql b/sql/14.5/extra/prepare.sql similarity index 96% rename from sql/11.13/extra/prepare.sql rename to sql/14.5/extra/prepare.sql index f7d2710..d347868 100644 --- a/sql/11.13/extra/prepare.sql +++ b/sql/14.5/extra/prepare.sql @@ -5,16 +5,16 @@ \ir sql/parameters.conf \set ECHO all ---Testcase 27: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 28: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); ---Testcase 30: +--Testcase 4: CREATE FOREIGN TABLE tenk1 ( unique1 int4, unique2 int4, @@ -37,117 +37,117 @@ CREATE FOREIGN TABLE tenk1 ( -- Does not support this command -- ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 31: +--Testcase 5: CREATE FOREIGN TABLE road ( name text, thepath path ) SERVER influxdb_svr; ---Testcase 32: +--Testcase 6: CREATE FOREIGN TABLE road_tmp (a int, b int) SERVER influxdb_svr; ---Testcase 1: +--Testcase 7: SELECT name, statement, parameter_types FROM pg_prepared_statements; ---Testcase 2: +--Testcase 8: PREPARE q1 AS SELECT a AS a FROM road_tmp; ---Testcase 3: +--Testcase 9: EXECUTE q1; ---Testcase 4: +--Testcase 10: SELECT name, statement, parameter_types FROM pg_prepared_statements; -- should fail ---Testcase 5: +--Testcase 11: PREPARE q1 AS SELECT b FROM road_tmp; -- should succeed DEALLOCATE q1; ---Testcase 6: +--Testcase 12: PREPARE q1 AS SELECT b FROM road_tmp; ---Testcase 7: +--Testcase 13: EXECUTE q1; ---Testcase 8: +--Testcase 14: PREPARE q2 AS SELECT b AS b FROM road_tmp; ---Testcase 9: +--Testcase 15: SELECT name, statement, parameter_types FROM pg_prepared_statements; -- sql92 syntax DEALLOCATE PREPARE q1; ---Testcase 10: +--Testcase 16: SELECT name, statement, parameter_types FROM pg_prepared_statements; DEALLOCATE PREPARE q2; -- the view should return the empty set again ---Testcase 11: +--Testcase 17: SELECT name, statement, parameter_types FROM pg_prepared_statements; -- parameterized queries ---Testcase 12: +--Testcase 18: PREPARE q2(text) AS SELECT datname, datistemplate, datallowconn FROM pg_database WHERE datname = $1; ---Testcase 13: +--Testcase 19: EXECUTE q2('postgres'); ---Testcase 14: +--Testcase 20: PREPARE q3(text, int, float, boolean, smallint) AS SELECT * FROM tenk1 WHERE string4 = $1 AND (four = $2 OR ten = $3::bigint OR true = $4 OR odd = $5::int) ORDER BY unique1; ---Testcase 15: +--Testcase 21: EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); -- too few params ---Testcase 16: +--Testcase 22: EXECUTE q3('bool'); -- too many params ---Testcase 17: +--Testcase 23: EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); -- wrong param types ---Testcase 18: +--Testcase 24: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); -- invalid type ---Testcase 19: +--Testcase 25: PREPARE q4(nonexistenttype) AS SELECT $1; -- create table as execute ---Testcase 20: +--Testcase 26: PREPARE q5(int, text) AS SELECT * FROM tenk1 WHERE unique1 = $1 OR stringu1 = $2 ORDER BY unique1; ---Testcase 33: +--Testcase 27: CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); ---Testcase 21: +--Testcase 28: SELECT * FROM q5_prep_results; ---Testcase 34: +--Testcase 29: CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') WITH NO DATA; ---Testcase 22: +--Testcase 30: SELECT * FROM q5_prep_nodata; -- unknown or unspecified parameter types: should succeed ---Testcase 23: +--Testcase 31: PREPARE q6 AS SELECT * FROM tenk1 WHERE unique1 = $1 AND stringu1 = $2; ---Testcase 24: +--Testcase 32: PREPARE q7(unknown) AS SELECT * FROM road WHERE thepath = $1; ---Testcase 25: +--Testcase 33: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; -- test DEALLOCATE ALL; DEALLOCATE ALL; ---Testcase 26: +--Testcase 34: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; diff --git a/sql/14.0/extra/select.sql b/sql/14.5/extra/select.sql similarity index 98% rename from sql/14.0/extra/select.sql rename to sql/14.5/extra/select.sql index b80a208..d402555 100644 --- a/sql/14.0/extra/select.sql +++ b/sql/14.5/extra/select.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( diff --git a/sql/13.4/extra/select_having.sql b/sql/14.5/extra/select_having.sql similarity index 95% rename from sql/13.4/extra/select_having.sql rename to sql/14.5/extra/select_having.sql index c912bed..4e2b933 100644 --- a/sql/13.4/extra/select_having.sql +++ b/sql/14.5/extra/select_having.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; diff --git a/sql/13.4/influxdb_fdw.sql b/sql/14.5/influxdb_fdw.sql similarity index 92% rename from sql/13.4/influxdb_fdw.sql rename to sql/14.5/influxdb_fdw.sql index ef62790..c7f5e2a 100644 --- a/sql/13.4/influxdb_fdw.sql +++ b/sql/14.5/influxdb_fdw.sql @@ -14,9 +14,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); --Testcase 6: @@ -584,8 +584,38 @@ DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05: --Testcase 200: SELECT * FROM cpu; +-- InfluxDB_FDW will store time data for Field values as a strings +--Testcase 204: +CREATE FOREIGN TABLE tmp_time ( +time timestamp, +c1 time, +c2 timestamp, +c3 timestamp with time zone +) SERVER server1 OPTIONS (table 'tmp_time'); +--Testcase 205: +SELECT * FROM tmp_time; +--Testcase 206: +INSERT INTO tmp_time (time, c1) VALUES ('1900-01-01 01:01:01', '01:02:03'); +--Testcase 207: +INSERT INTO tmp_time (time, c1) VALUES ('2100-01-01 01:01:01', '04:05:06'); +--Testcase 208: +INSERT INTO tmp_time (time, c1) VALUES ('1990-01-01 01:01:01', '07:08:09'); +--Testcase 209: +INSERT INTO tmp_time (time, c2) VALUES ('2020-12-27 03:02:56.634467', '1950-02-02 02:02:02'); +--Testcase 210: +INSERT INTO tmp_time (time, c3) VALUES ('2021-12-27 03:02:56.668301', '1800-02-02 02:02:02+9'); +--Testcase 210: +INSERT INTO tmp_time (time, c1, c2, c3) VALUES ('2022-05-06 07:08:09', '07:08:09', '2022-05-06 07:08:09', '2022-05-06 07:08:09+9'); +--Testcase 211: +-- 1800-02-02 02:02:02+9 is Daylight Saving Time (DST) changes in Japan. +-- Timezone setting Japan so it will plus 18s:59 +-- https://www.timeanddate.com/time/zone/japan/tokyo?syear=1850 +SELECT * FROM tmp_time; + -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP USER MAPPING FOR CURRENT_USER SERVER server1; diff --git a/sql/13.4/init.sql b/sql/14.5/init.sql similarity index 100% rename from sql/13.4/init.sql rename to sql/14.5/init.sql diff --git a/sql/14.5/option.sql b/sql/14.5/option.sql new file mode 100644 index 0000000..35e344b --- /dev/null +++ b/sql/14.5/option.sql @@ -0,0 +1,214 @@ +--Testcase 1: +SET datestyle=ISO; + +--Testcase 2: +CREATE EXTENSION influxdb_fdw; + +-- version not valid +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '9999', retention_policy ''); +--Testcase 4: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version 'dummy', retention_policy ''); +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '-1', retention_policy ''); + +-- host must be not NULL or not empty +--Testcase 6: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', port '38086', version '2', retention_policy ''); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 8: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 9: +SELECT * FROM optiontbl; +--Testcase 10: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 11: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host '', port '38086', version '2', retention_policy ''); +--Testcase 12: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 13: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 14: +SELECT * FROM optiontbl; +--Testcase 15: +DROP SERVER influxdb_svr CASCADE; + +-- dbname must be not NULL or not empty +--Testcase 16: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 17: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 18: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 19: +SELECT * FROM optiontbl; +--Testcase 20: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 21: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname '', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 22: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 23: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 24: +SELECT * FROM optiontbl; +--Testcase 25: +DROP SERVER influxdb_svr CASCADE; + + +-- retention_policy can be NULL +--Testcase 26: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2'); +--Testcase 27: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 28: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 29: +SELECT * FROM optiontbl; +--Testcase 30: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 31: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 32: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 33: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 34: +SELECT * FROM optiontbl; +--Testcase 35: +DROP SERVER influxdb_svr CASCADE; + +-- auth_token can be NULL +--Testcase 36: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 37: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 38: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 39: +SELECT * FROM optiontbl; +--Testcase 40: +DROP SERVER influxdb_svr CASCADE; + +-- auth_token invalid +--Testcase 41: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 42: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'wrong_token'); +--Testcase 43: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 44: +SELECT * FROM optiontbl; +--Testcase 45: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 46: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 47: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token ''); +--Testcase 48: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 49: +SELECT * FROM optiontbl; +--Testcase 50: +DROP SERVER influxdb_svr CASCADE; + +-- user must can be NULL +--Testcase 51: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 52: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (password 'pass'); +--Testcase 53: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 54: +SELECT * FROM optiontbl; +--Testcase 55: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 56: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 57: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password 'pass'); +--Testcase 58: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 59: +SELECT * FROM optiontbl; +--Testcase 60: +DROP SERVER influxdb_svr CASCADE; + +-- password can be NULL +--Testcase 61: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 62: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user'); +--Testcase 63: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 65: +SELECT * FROM optiontbl; +--Testcase 65: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 66: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 67: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password ''); +--Testcase 68: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 69: +SELECT * FROM optiontbl; +--Testcase 70: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 71: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 72: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password ''); +--Testcase 73: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 74: +SELECT * FROM optiontbl; +--Testcase 75: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 76: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 77: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 78: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 79: +SELECT * FROM optiontbl; +--Testcase 80: +DROP SERVER influxdb_svr CASCADE; + +-- Test if version option is not set +-- Connect to InfluxDB version 1 +--Testcase 81: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086'); +--Testcase 82: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 83: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 84: +SELECT * FROM optiontbl; +--Testcase 85: +DROP SERVER influxdb_svr CASCADE; + +-- Connect to InfluxDB version 2 +--Testcase 86: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', retention_policy ''); +--Testcase 87: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 88: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 89: +SELECT * FROM optiontbl; +--Testcase 90: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 91: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/13.4/schemaless/add_fields.sql b/sql/14.5/schemaless/add_fields.sql similarity index 99% rename from sql/13.4/schemaless/add_fields.sql rename to sql/14.5/schemaless/add_fields.sql index 555ff53..503b4d9 100644 --- a/sql/13.4/schemaless/add_fields.sql +++ b/sql/14.5/schemaless/add_fields.sql @@ -7,15 +7,15 @@ SET timezone='UTC'; \set ECHO all -- Init data -\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null +:INIT_FIELDS_ORIGINAL; --Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); @@ -42,7 +42,7 @@ SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), l -------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_1; --Testcase 13: DROP FOREIGN TABLE sctbl1; @@ -156,7 +156,7 @@ SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fiel -------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ --Update data -\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null +:RECOVER_INIT_FIELDS_ADD_20; --Testcase 64: DROP FOREIGN TABLE sctbl1; diff --git a/sql/13.4/schemaless/add_multi_key.sql b/sql/14.5/schemaless/add_multi_key.sql similarity index 99% rename from sql/13.4/schemaless/add_multi_key.sql rename to sql/14.5/schemaless/add_multi_key.sql index b297a54..2575cf5 100644 --- a/sql/13.4/schemaless/add_multi_key.sql +++ b/sql/14.5/schemaless/add_multi_key.sql @@ -7,14 +7,14 @@ SET timezone='UTC'; \set ECHO all -- Init data original -\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null +:INIT_MULTILEY_ORIGINAL; -- Before update data --Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); @@ -211,7 +211,7 @@ SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3 ---------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; @@ -346,7 +346,7 @@ SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint -- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- -- Update data -\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null +:RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS; drop view if exists view_sctbl3 ; drop foreign table if exists sctbl3; diff --git a/sql/11.13/schemaless/add_tags.sql b/sql/14.5/schemaless/add_tags.sql similarity index 99% rename from sql/11.13/schemaless/add_tags.sql rename to sql/14.5/schemaless/add_tags.sql index 1c58358..14e453c 100644 --- a/sql/11.13/schemaless/add_tags.sql +++ b/sql/14.5/schemaless/add_tags.sql @@ -7,14 +7,14 @@ SET timezone='UTC'; \set ECHO all -- Init data original -\! influx -import -path=init/tag_original.txt -precision=s > /dev/null +:INIT_TAG_ORIGINAL; -- Before update data -- Testcase 1: CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 2: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); @@ -39,7 +39,7 @@ select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::big --------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_1; --Testcase 12: DROP FOREIGN TABLE sctbl4; @@ -114,7 +114,7 @@ select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (se --------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- -- Update data : add 1 tag -\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null +:RECOVER_INIT_TAG_ADD_20; --Testcase 41: DROP FOREIGN TABLE sctbl4; --Testcase 42: diff --git a/sql/13.4/schemaless/aggregate.sql b/sql/14.5/schemaless/aggregate.sql similarity index 98% rename from sql/13.4/schemaless/aggregate.sql rename to sql/14.5/schemaless/aggregate.sql index 812a2a1..92e9dcb 100644 --- a/sql/13.4/schemaless/aggregate.sql +++ b/sql/14.5/schemaless/aggregate.sql @@ -15,9 +15,9 @@ SET timezone='UTC'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); diff --git a/sql/14.0/schemaless/extra/aggregates.sql b/sql/14.5/schemaless/extra/aggregates.sql similarity index 99% rename from sql/14.0/schemaless/extra/aggregates.sql rename to sql/14.5/schemaless/extra/aggregates.sql index 43d5b1a..cf558c0 100644 --- a/sql/14.0/schemaless/extra/aggregates.sql +++ b/sql/14.5/schemaless/extra/aggregates.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); diff --git a/sql/14.0/schemaless/extra/influxdb_fdw_post.sql b/sql/14.5/schemaless/extra/influxdb_fdw_post.sql similarity index 99% rename from sql/14.0/schemaless/extra/influxdb_fdw_post.sql rename to sql/14.5/schemaless/extra/influxdb_fdw_post.sql index e491206..eef6002 100644 --- a/sql/14.0/schemaless/extra/influxdb_fdw_post.sql +++ b/sql/14.5/schemaless/extra/influxdb_fdw_post.sql @@ -12,17 +12,17 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server @@ -498,6 +498,17 @@ EXPLAIN (VERBOSE, COSTS OFF) --Testcase 114: SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; +-- This test case drop configuration when execute non-schemaless before +DROP TEXT SEARCH CONFIGURATION IF EXISTS public.custom_search; +-- check schema-qualification of regconfig constant +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + -- =================================================================== -- JOIN queries -- =================================================================== @@ -809,7 +820,7 @@ DROP FOREIGN TABLE local_tbl_nsc; --Testcase 208: CREATE ROLE regress_view_owner SUPERUSER; --Testcase 209: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; @@ -1923,6 +1934,14 @@ SELECT * FROM foreign_tbl; --UPDATE rw_view SET b = b + 15; -- ok --SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +SELECT * FROM foreign_tbl; +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); + --Testcase 506: DELETE FROM foreign_tbl; DROP FOREIGN TABLE foreign_tbl CASCADE; @@ -1975,6 +1994,14 @@ SELECT * FROM foreign_tbl; --UPDATE rw_view SET b = b + 15; -- ok --SELECT * FROM foreign_tbl; +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +SELECT * FROM foreign_tbl; +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); + --Testcase 521: DROP FOREIGN TABLE foreign_tbl CASCADE; --Testcase 522: @@ -3743,7 +3770,7 @@ BEGIN; --Testcase 699: CREATE SERVER batch10 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS(dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT, batch_size '10' ); + OPTIONS(dbname 'postdb', :SERVER, batch_size '10' ); --Testcase 700: SELECT count(*) diff --git a/sql/11.13/schemaless/extra/insert.sql b/sql/14.5/schemaless/extra/insert.sql similarity index 99% rename from sql/11.13/schemaless/extra/insert.sql rename to sql/14.5/schemaless/extra/insert.sql index 67c0557..c124911 100644 --- a/sql/11.13/schemaless/extra/insert.sql +++ b/sql/14.5/schemaless/extra/insert.sql @@ -6,9 +6,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- insert with DEFAULT in the target_list diff --git a/sql/14.0/schemaless/extra/join.sql b/sql/14.5/schemaless/extra/join.sql similarity index 99% rename from sql/14.0/schemaless/extra/join.sql rename to sql/14.5/schemaless/extra/join.sql index 11a0c19..2db0abf 100644 --- a/sql/14.0/schemaless/extra/join.sql +++ b/sql/14.5/schemaless/extra/join.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; @@ -743,6 +743,28 @@ select * from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 l --Testcase 168: select t1.x from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'x')::int x, (fields->>'y')::int y from t3) t3 on (t1.a::int = t3.x::int); +-- Test matching of locking clause with wrong alias + +select t1.*, t2.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int), t3 as unnamed_join + for update of unnamed_join; + +select foo.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo, t3 as unnamed_join + for update of unnamed_join; + +select foo.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo, t3 as unnamed_join + for update of foo; + +select bar.*, unnamed_join.* from + ((select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo) as bar, t3 as unnamed_join + for update of foo; + +select bar.*, unnamed_join.* from + ((select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo) as bar, t3 as unnamed_join + for update of bar; + -- -- regression test for 8.1 merge right join bug -- diff --git a/sql/14.0/schemaless/extra/limit.sql b/sql/14.5/schemaless/extra/limit.sql similarity index 98% rename from sql/14.0/schemaless/extra/limit.sql rename to sql/14.5/schemaless/extra/limit.sql index da3cdab..48641a4 100644 --- a/sql/14.0/schemaless/extra/limit.sql +++ b/sql/14.5/schemaless/extra/limit.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- LIMIT diff --git a/sql/11.13/schemaless/extra/prepare.sql b/sql/14.5/schemaless/extra/prepare.sql similarity index 96% rename from sql/11.13/schemaless/extra/prepare.sql rename to sql/14.5/schemaless/extra/prepare.sql index fbbf92b..7d079b1 100644 --- a/sql/11.13/schemaless/extra/prepare.sql +++ b/sql/14.5/schemaless/extra/prepare.sql @@ -5,16 +5,16 @@ \ir sql/parameters.conf \set ECHO all ---Testcase 27: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 28: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 29: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); ---Testcase 30: +--Testcase 4: CREATE FOREIGN TABLE tenk1 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); @@ -22,116 +22,116 @@ CREATE FOREIGN TABLE tenk1 ( -- Does not support this command -- ALTER TABLE tenk1 SET WITH OIDS; ---Testcase 31: +--Testcase 5: CREATE FOREIGN TABLE road ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 32: +--Testcase 6: CREATE FOREIGN TABLE road_tmp (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 1: +--Testcase 7: SELECT name, statement, parameter_types FROM pg_prepared_statements; ---Testcase 2: +--Testcase 8: PREPARE q1 AS SELECT (fields->>'a')::int AS a FROM road_tmp; ---Testcase 3: +--Testcase 9: EXECUTE q1; ---Testcase 4: +--Testcase 10: SELECT name, statement, parameter_types FROM pg_prepared_statements; -- should fail ---Testcase 5: +--Testcase 11: PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; -- should succeed DEALLOCATE q1; ---Testcase 6: +--Testcase 12: PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; ---Testcase 7: +--Testcase 13: EXECUTE q1; ---Testcase 8: +--Testcase 14: PREPARE q2 AS SELECT (fields->>'b')::int AS b FROM road_tmp; ---Testcase 9: +--Testcase 15: SELECT name, statement, parameter_types FROM pg_prepared_statements; -- sql92 syntax DEALLOCATE PREPARE q1; ---Testcase 10: +--Testcase 16: SELECT name, statement, parameter_types FROM pg_prepared_statements; DEALLOCATE PREPARE q2; -- the view should return the empty set again ---Testcase 11: +--Testcase 17: SELECT name, statement, parameter_types FROM pg_prepared_statements; -- parameterized queries ---Testcase 12: +--Testcase 18: PREPARE q2(text) AS SELECT datname, datistemplate, datallowconn FROM pg_database WHERE datname = $1; ---Testcase 13: +--Testcase 19: EXECUTE q2('postgres'); ---Testcase 14: +--Testcase 20: PREPARE q3(text, int, float, boolean, smallint) AS SELECT * FROM tenk1 WHERE fields->>'string4' = $1 AND ((fields->>'four')::int = $2 OR (fields->>'ten')::int = $3::bigint OR true = $4 OR (fields->>'odd')::int = $5::int) ORDER BY (fields->>'unique1')::int; ---Testcase 15: +--Testcase 21: EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); -- too few params ---Testcase 16: +--Testcase 22: EXECUTE q3('bool'); -- too many params ---Testcase 17: +--Testcase 23: EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); -- wrong param types ---Testcase 18: +--Testcase 24: EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); -- invalid type ---Testcase 19: +--Testcase 25: PREPARE q4(nonexistenttype) AS SELECT $1; -- create table as execute ---Testcase 20: +--Testcase 26: PREPARE q5(int, text) AS SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 OR fields->>'stringu1' = $2 ORDER BY (fields->>'unique1')::int; ---Testcase 33: +--Testcase 27: CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); ---Testcase 21: +--Testcase 28: SELECT * FROM q5_prep_results; ---Testcase 34: +--Testcase 29: CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') WITH NO DATA; ---Testcase 22: +--Testcase 30: SELECT * FROM q5_prep_nodata; -- unknown or unspecified parameter types: should succeed ---Testcase 23: +--Testcase 31: PREPARE q6 AS SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 AND fields->>'stringu1' = $2; ---Testcase 24: +--Testcase 32: PREPARE q7(unknown) AS SELECT * FROM road WHERE fields->>'thepath' = $1; ---Testcase 25: +--Testcase 33: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; -- test DEALLOCATE ALL; DEALLOCATE ALL; ---Testcase 26: +--Testcase 34: SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY name; diff --git a/sql/14.0/schemaless/extra/select.sql b/sql/14.5/schemaless/extra/select.sql similarity index 99% rename from sql/14.0/schemaless/extra/select.sql rename to sql/14.5/schemaless/extra/select.sql index fd8d876..7893315 100644 --- a/sql/14.0/schemaless/extra/select.sql +++ b/sql/14.5/schemaless/extra/select.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( diff --git a/sql/13.4/schemaless/extra/select_having.sql b/sql/14.5/schemaless/extra/select_having.sql similarity index 96% rename from sql/13.4/schemaless/extra/select_having.sql rename to sql/14.5/schemaless/extra/select_having.sql index 538049e..8cef2e2 100644 --- a/sql/13.4/schemaless/extra/select_having.sql +++ b/sql/14.5/schemaless/extra/select_having.sql @@ -10,9 +10,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); diff --git a/sql/10.18/schemaless/influxdb_fdw.sql b/sql/14.5/schemaless/influxdb_fdw.sql similarity index 99% rename from sql/10.18/schemaless/influxdb_fdw.sql rename to sql/14.5/schemaless/influxdb_fdw.sql index 738636d..03c1399 100644 --- a/sql/10.18/schemaless/influxdb_fdw.sql +++ b/sql/14.5/schemaless/influxdb_fdw.sql @@ -14,9 +14,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); --Testcase 6: @@ -586,7 +586,9 @@ DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 SELECT * FROM cpu; -- Recover data -\! influx -import -path=init/init.txt -precision=s > /dev/null +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; --Testcase 201: DROP FOREIGN TABLE cpu_nsc; diff --git a/sql/13.4/schemaless/init.sql b/sql/14.5/schemaless/init.sql similarity index 100% rename from sql/13.4/schemaless/init.sql rename to sql/14.5/schemaless/init.sql diff --git a/sql/10.18/schemaless/schemaless.sql b/sql/14.5/schemaless/schemaless.sql similarity index 99% rename from sql/10.18/schemaless/schemaless.sql rename to sql/14.5/schemaless/schemaless.sql index e9f49bf..26172a4 100644 --- a/sql/10.18/schemaless/schemaless.sql +++ b/sql/14.5/schemaless/schemaless.sql @@ -15,10 +15,10 @@ DROP EXTENSION IF EXISTS influxdb_fdw CASCADE; CREATE EXTENSION influxdb_fdw CASCADE; --Testcase 5: -CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- create foreign table --Testcase 7: diff --git a/sql/13.4/schemaless/selectfunc.sql b/sql/14.5/schemaless/selectfunc.sql similarity index 99% rename from sql/13.4/schemaless/selectfunc.sql rename to sql/14.5/schemaless/selectfunc.sql index 4a157e2..8ce5f91 100644 --- a/sql/13.4/schemaless/selectfunc.sql +++ b/sql/14.5/schemaless/selectfunc.sql @@ -11,9 +11,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: diff --git a/sql/11.13/selectfunc.sql b/sql/14.5/selectfunc.sql similarity index 99% rename from sql/11.13/selectfunc.sql rename to sql/14.5/selectfunc.sql index 038ca1d..36789fa 100644 --- a/sql/11.13/selectfunc.sql +++ b/sql/14.5/selectfunc.sql @@ -11,9 +11,9 @@ SET timezone='Japan'; CREATE EXTENSION influxdb_fdw; --Testcase 4: CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS -(dbname 'mydb2', host :INFLUXDB_HOST, port :INFLUXDB_PORT); +(dbname 'mydb2', :SERVER); --Testcase 5: -CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); --IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); --Testcase 6: diff --git a/sql/15.0/aggregate.sql b/sql/15.0/aggregate.sql new file mode 100644 index 0000000..da4875a --- /dev/null +++ b/sql/15.0/aggregate.sql @@ -0,0 +1,308 @@ + +--SET log_min_messages=debug1; +--SET client_min_messages=debug1; +--Testcase 1: +SET datestyle=ISO; +-- timestamp with time zone differs based on this +--Testcase 2: +SET timezone='UTC'; + +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); + +-- import time column as timestamp and text type +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); + +--ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); +--ALTER SERVER server1 OPTIONS (ADD extensions 'influxdb_fdw'); + +--Testcase 6: +SELECT * FROM t4; + +--Testcase 7: +EXPLAIN (verbose) +SELECT sum("value1"),influx_time(time,interval '1s', interval '0.00001s'),tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tag1; +--Testcase 8: +SELECT sum("value1"),influx_time(time,interval '1s', interval '0.00001s'),tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tag1; + +--Testcase 9: +EXPLAIN (verbose) +SELECT tag1,sum("value1"),tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY tag2, tag1; +--Testcase 10: +SELECT tag1,sum("value1"),tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY tag2, tag1; + +--Testcase 11: +SELECT tag1,sum("value1"), count(value1), tag2 FROM "t4" group by tag1, tag2; +--Testcase 12: +EXPLAIN (verbose) SELECT tag1,sum("value1"), count(value1), tag2 FROM "t4" group by tag1, tag2; + +--Testcase 13: +SELECT influx_time(time,interval '5s',interval '0s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY influx_time(time,interval '5s', interval '0s'), tag1; + +--Testcase 14: +EXPLAIN (VERBOSE) +SELECT influx_time(time,interval '5s',interval '0s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '5s', interval '0s'), tag1; + +-- no offset +--Testcase 15: +SELECT influx_time(time,interval '5s'),tag1,last(time, value1) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '5s'), tag1; + +--Testcase 16: +EXPLAIN (verbose) +SELECT last(time, value1),last(time, value2) FROM t4 GROUP BY tag1; +--Testcase 17: +SELECT last(time, value1),last(time, value2) FROM t4 GROUP BY tag1; + +-- GROUP BY time intervals and fill() +--Testcase 18: +SELECT * FROM tx; + +--Testcase 19: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); + +--Testcase 20: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); + +--Testcase 21: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); + +--Testcase 22: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); + +--Testcase 23: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); + +--Testcase 24: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); + +--Testcase 25: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); + +--Testcase 26: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); + +--Testcase 27: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); + +--Testcase 28: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); + +--Testcase 29: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); + +--Testcase 30: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); + +-- with offset interval '0.00001s' +--Testcase 31: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); + +--Testcase 32: +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); + +--Testcase 33: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1; + +--Testcase 34: +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1; + +--Testcase 35: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2; + +--Testcase 36: +SELECT sum("value1"), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tag1, tag2; + +--with tag1 +--Testcase 37: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1; + +--Testcase 38: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1; + +--Testcase 39: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1; + +--Testcase 40: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1; + +--Testcase 41: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('null')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tag1; + +--Testcase 42: +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('null')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tag1; + +--Testcase 43: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('none')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tag1; + +--Testcase 44: +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('none')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tag1; + +--Testcase 45: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('previous')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tag1; + +--Testcase 46: +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('previous')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tag1; + +--Testcase 47: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('linear')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tag1; + +--Testcase 48: +SELECT sum("value1"), influx_time(time,interval '2s',influx_fill_option('linear')), tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tag1; + +--with tag1,tag2 + +--Testcase 49: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2; + +--Testcase 50: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tag1, tag2; + +--Testcase 51: +EXPLAIN (verbose) +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2; + +--Testcase 52: +SELECT sum("value1"), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tag1, tag2; + +-- unsupport syntax +--Testcase 53: +EXPLAIN (verbose) +SELECT influx_fill_numeric(100) FROM "tx"; +--Testcase 54: +SELECT influx_fill_numeric(100) FROM "tx"; + +--Testcase 55: +SELECT * FROM "tx" WHERE influx_fill_numeric(100) > 0; + +--Testcase 56: +EXPLAIN (verbose) +SELECT influx_fill_option('linear') FROM "tx"; +--Testcase 57: +SELECT influx_fill_option('linear') FROM "tx"; + +--Testcase 58: +SELECT * FROM "tx" WHERE influx_fill_option('linear') > 0; + + +-- InfluxDB does not return error for the following query +--SELECT sum(value1) FROM t4 GROUP BY value1; + +-- not allowed +--Testcase 59: +SELECT sum(value1) FROM t4 GROUP BY time; + +--last returns NULL for tag +--SELECT last(time, value1),last(time, value2),last(time, tag1) FROM t4 GROUP BY tag1; + +--Testcase 60: +DROP FOREIGN TABLE t3; +--Testcase 61: +DROP FOREIGN TABLE t4; +--Testcase 62: +DROP FOREIGN TABLE cpu; +--Testcase 63: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 64: +DROP SERVER server1 CASCADE; +--Testcase 65: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/12.8/extra/aggregates.sql b/sql/15.0/extra/aggregates.sql similarity index 97% rename from sql/12.8/extra/aggregates.sql rename to sql/15.0/extra/aggregates.sql index 53ef0aa..ee96055 100644 --- a/sql/12.8/extra/aggregates.sql +++ b/sql/15.0/extra/aggregates.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek ( @@ -102,10 +102,17 @@ CREATE FOREIGN TABLE FLOAT8_TBL (f1 float8) SERVER influxdb_svr; -- AGGREGATES -- +-- directory paths are passed to us in environment variables +--\getenv abs_srcdir PG_ABS_SRCDIR -- avoid bit-exact output here because operations may not be bit-exact. --Testcase 19: SET extra_float_digits = 0; +--\set filename :abs_srcdir '/init/agg.txt' +--COPY aggtest FROM :'filename'; + +--ANALYZE aggtest; + --Testcase 20: SELECT avg(four) AS avg_1 FROM onek; @@ -473,7 +480,8 @@ CREATE FOREIGN TABLE bitwise_test_empty ( --Testcase 137: SELECT BIT_AND(i2) AS "?", - BIT_OR(i4) AS "?" + BIT_OR(i4) AS "?", + BIT_XOR(i8) AS "?" FROM bitwise_test_empty; --Testcase 138: @@ -500,7 +508,14 @@ SELECT BIT_OR(i8) AS "7", BIT_OR(i) AS "?", BIT_OR(x) AS "7", - BIT_OR(y) AS "1101" + BIT_OR(y) AS "1101", + + BIT_XOR(i2) AS "5", + BIT_XOR(i4) AS "5", + BIT_XOR(i8) AS "5", + BIT_XOR(i) AS "?", + BIT_XOR(x) AS "7", + BIT_XOR(y) AS "1101" FROM bitwise_test; -- @@ -1132,6 +1147,22 @@ select aggfns(distinct a,b,c order by a,c using ~<~,b) filter (where a > 1) generate_series(1,2) i; rollback; +-- check handling of bare boolean Var in FILTER +--Testcase 454: +select max(0) filter (where b1) from bool_test; +--Testcase 455: +select (select max(0) filter (where b1)) from bool_test; + +-- check for correct detection of nested-aggregate errors in FILTER +--Testcase 456: +select max(unique1) filter (where sum(ten) > 0) from tenk1; +--Testcase 457: +select (select max(unique1) filter (where sum(ten) > 0) from int8_tbl) from tenk1; +--Testcase 458: +select max(unique1) filter (where bool_or(ten > 0)) from tenk1; +--Testcase 459: +select (select max(unique1) filter (where bool_or(ten > 0)) from int8_tbl) from tenk1; + -- ordered-set aggregates begin; @@ -1704,28 +1735,32 @@ select v||'a', case when v||'a' = 'aa' then 1 else 0 end, count(*) -- does not lead to array overflow due to unexpected duplicate hash keys -- see CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com --Testcase 399: +set enable_memoize to off; +--Testcase 400: explain (costs off) select 1 from tenk1 where (hundred, thousand) in (select twothousand, twothousand from onek); +--Testcase 401: +reset enable_memoize; -- -- Hash Aggregation Spill tests -- ---Testcase 400: +--Testcase 402: set enable_sort=false; ---Testcase 401: +--Testcase 403: set work_mem='64kB'; ---Testcase 402: +--Testcase 404: select unique1, count(*), sum(twothousand) from tenk1 group by unique1 having sum(fivethous) > 4975 order by sum(twothousand); ---Testcase 403: +--Testcase 405: set work_mem to default; ---Testcase 404: +--Testcase 406: set enable_sort to default; -- @@ -1733,59 +1768,59 @@ set enable_sort to default; -- aggregation. Force spilling in both cases by setting work_mem low. -- ---Testcase 405: +--Testcase 407: set work_mem='64kB'; ---Testcase 406: +--Testcase 408: create foreign table agg_data_2k(g int) server influxdb_svr; ---Testcase 407: +--Testcase 409: create foreign table agg_data_20k(g int) server influxdb_svr; ---Testcase 408: +--Testcase 410: create foreign table agg_group_1(c1 int, c2 numeric, c3 int) server influxdb_svr; ---Testcase 409: +--Testcase 411: create foreign table agg_group_2(a int, c1 numeric, c2 text, c3 int) server influxdb_svr; ---Testcase 410: +--Testcase 412: create foreign table agg_group_3(c1 numeric, c2 int4, c3 int) server influxdb_svr; ---Testcase 411: +--Testcase 413: create foreign table agg_group_4(c1 numeric, c2 text, c3 int) server influxdb_svr; ---Testcase 412: +--Testcase 414: create foreign table agg_hash_1(c1 int, c2 numeric, c3 int) server influxdb_svr; ---Testcase 413: +--Testcase 415: create foreign table agg_hash_2(a int, c1 numeric, c2 text, c3 int) server influxdb_svr; ---Testcase 414: +--Testcase 416: create foreign table agg_hash_3(c1 numeric, c2 int4, c3 int) server influxdb_svr; ---Testcase 415: +--Testcase 417: create foreign table agg_hash_4(c1 numeric, c2 text, c3 int) server influxdb_svr; ---Testcase 416: +--Testcase 418: insert into agg_data_2k select g from generate_series(0, 1999) g; --analyze agg_data_2k; ---Testcase 417: +--Testcase 419: insert into agg_data_20k select g from generate_series(0, 19999) g; --analyze agg_data_20k; -- Produce results with sorting. ---Testcase 418: +--Testcase 420: set enable_hashagg = false; ---Testcase 419: +--Testcase 421: set jit_above_cost = 0; ---Testcase 420: +--Testcase 422: explain (costs off) select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 from agg_data_20k group by g%10000; ---Testcase 421: +--Testcase 423: insert into agg_group_1 select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 from agg_data_20k group by g%10000; ---Testcase 422: +--Testcase 424: insert into agg_group_2 select * from (values (100), (300), (500)) as r(a), @@ -1797,40 +1832,40 @@ select * from where g < r.a group by g/2) as s; ---Testcase 423: +--Testcase 425: set jit_above_cost to default; ---Testcase 424: +--Testcase 426: insert into agg_group_3 select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 from agg_data_2k group by g/2; ---Testcase 425: +--Testcase 427: insert into agg_group_4 select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 from agg_data_2k group by g/2; -- Produce results with hash aggregation ---Testcase 426: +--Testcase 428: set enable_hashagg = true; ---Testcase 427: +--Testcase 429: set enable_sort = false; ---Testcase 428: +--Testcase 430: set jit_above_cost = 0; ---Testcase 429: +--Testcase 431: explain (costs off) select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 from agg_data_20k group by g%10000; ---Testcase 430: +--Testcase 432: insert into agg_hash_1 select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 from agg_data_20k group by g%10000; ---Testcase 431: +--Testcase 433: insert into agg_hash_2 select * from (values (100), (300), (500)) as r(a), @@ -1842,74 +1877,87 @@ select * from where g < r.a group by g/2) as s; ---Testcase 432: +--Testcase 434: set jit_above_cost to default; ---Testcase 433: +--Testcase 435: insert into agg_hash_3 select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 from agg_data_2k group by g/2; ---Testcase 434: +--Testcase 436: insert into agg_hash_4 select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 from agg_data_2k group by g/2; ---Testcase 435: +--Testcase 437: set enable_sort = true; ---Testcase 436: +--Testcase 438: set work_mem to default; -- Compare group aggregation results to hash aggregation results ---Testcase 437: +--Testcase 439: (select * from agg_hash_1 except select * from agg_group_1) union all (select * from agg_group_1 except select * from agg_hash_1); ---Testcase 438: +--Testcase 440: (select * from agg_hash_2 except select * from agg_group_2) union all (select * from agg_group_2 except select * from agg_hash_2); ---Testcase 439: +--Testcase 441: (select * from agg_hash_3 except select * from agg_group_3) union all (select * from agg_group_3 except select * from agg_hash_3); ---Testcase 440: +--Testcase 442: (select * from agg_hash_4 except select * from agg_group_4) union all (select * from agg_group_4 except select * from agg_hash_4); ---Testcase 441: +--Testcase 443: -- Clean up: +--Testcase 485: delete from agg_data_2k; +--Testcase 486: delete from agg_data_20k; +--Testcase 487: delete from agg_group_1; +--Testcase 488: delete from agg_group_2; +--Testcase 489: delete from agg_group_3; +--Testcase 490: delete from agg_group_4; +--Testcase 491: delete from agg_hash_1; +--Testcase 492: delete from agg_hash_2; +--Testcase 493: delete from agg_hash_3; +--Testcase 494: delete from agg_hash_4; +--Testcase 495: drop foreign table agg_data_2k; +--Testcase 496: drop foreign table agg_data_20k; +--Testcase 497: drop foreign table agg_group_1; ---Testcase 442: +--Testcase 444: drop foreign table agg_group_2; ---Testcase 443: +--Testcase 445: drop foreign table agg_group_3; ---Testcase 444: +--Testcase 446: drop foreign table agg_group_4; ---Testcase 445: +--Testcase 447: drop foreign table agg_hash_1; ---Testcase 446: +--Testcase 448: drop foreign table agg_hash_2; ---Testcase 447: +--Testcase 449: drop foreign table agg_hash_3; ---Testcase 448: +--Testcase 450: drop foreign table agg_hash_4; -- Clean up @@ -1925,29 +1973,45 @@ end; $d$; -- Clean up: +--Testcase 498: DROP AGGREGATE IF EXISTS newavg (int4); +--Testcase 499: DROP AGGREGATE IF EXISTS newsum (int4); +--Testcase 500: DROP AGGREGATE IF EXISTS newcnt (*); +--Testcase 501: DROP AGGREGATE IF EXISTS oldcnt (*); +--Testcase 502: DROP AGGREGATE IF EXISTS newcnt ("any"); +--Testcase 503: DROP AGGREGATE IF EXISTS sum2(int8,int8); +--Testcase 504: DROP FUNCTION IF EXISTS sum3(int8,int8,int8); +--Testcase 505: DROP AGGREGATE IF EXISTS aggfns(integer,integer,text); +--Testcase 506: DROP AGGREGATE IF EXISTS aggfstr(integer,integer,text); +--Testcase 507: DROP FUNCTION IF EXISTS aggfns_trans(aggtype[],integer,integer,text); +--Testcase 508: DROP FUNCTION IF EXISTS aggf_trans(aggtype[],integer,integer,text); +--Testcase 509: DROP TYPE IF EXISTS aggtype; +--Testcase 510: DROP AGGREGATE IF EXISTS test_percentile_disc(float8 ORDER BY anyelement); +--Testcase 511: DROP AGGREGATE IF EXISTS test_rank(VARIADIC "any" ORDER BY VARIADIC "any"); +--Testcase 512: DROP AGGREGATE IF EXISTS cleast_agg(variadic items anycompatiblearray); +--Testcase 513: DROP FUNCTION IF EXISTS cleast_accum(anycompatible, variadic anycompatiblearray); ---Testcase 449: +--Testcase 451: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 450: +--Testcase 452: DROP SERVER influxdb_svr CASCADE; ---Testcase 451: +--Testcase 453: DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/13.4/extra/influxdb_fdw_post.sql b/sql/15.0/extra/influxdb_fdw_post.sql similarity index 72% rename from sql/13.4/extra/influxdb_fdw_post.sql rename to sql/15.0/extra/influxdb_fdw_post.sql index 6f507b6..71491cf 100644 --- a/sql/13.4/extra/influxdb_fdw_post.sql +++ b/sql/15.0/extra/influxdb_fdw_post.sql @@ -12,17 +12,17 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server @@ -126,9 +126,10 @@ CREATE FOREIGN TABLE ft1 ( c7 char(10) default 'ft1', c8 text ) SERVER influxdb_svr; +--Testcase 22: ALTER FOREIGN TABLE ft1 DROP COLUMN c0; ---Testcase 22: +--Testcase 23: CREATE FOREIGN TABLE ft2 ( c1 int NOT NULL, c2 int NOT NULL, @@ -139,23 +140,24 @@ CREATE FOREIGN TABLE ft2 ( c7 char(10) default 'ft2', c8 text ) SERVER influxdb_svr; +--Testcase 24: ALTER FOREIGN TABLE ft2 DROP COLUMN cx; ---Testcase 23: +--Testcase 25: CREATE FOREIGN TABLE ft4 ( c1 int NOT NULL, c2 int NOT NULL, c3 text ) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); ---Testcase 24: +--Testcase 26: CREATE FOREIGN TABLE ft5 ( c1 int NOT NULL, c2 int NOT NULL, c3 text ) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3'); ---Testcase 25: +--Testcase 27: CREATE FOREIGN TABLE ft6 ( c1 int NOT NULL, c2 int NOT NULL, @@ -167,6 +169,7 @@ CREATE FOREIGN TABLE ft6 ( -- =================================================================== -- requiressl and some other parameters are omitted because -- valid values for them depend on configure options +--Testcase 28: ALTER SERVER testserver1 OPTIONS ( -- use_remote_estimate 'false', -- updatable 'true', @@ -206,6 +209,7 @@ ALTER SERVER testserver1 OPTIONS ( --ALTER SERVER testserver1 OPTIONS (ADD extensions 'foo, bar'); --ALTER SERVER testserver1 OPTIONS (DROP extensions); +--Testcase 29: ALTER USER MAPPING FOR public SERVER testserver1 OPTIONS (DROP user, DROP password); @@ -222,20 +226,25 @@ ALTER USER MAPPING FOR public SERVER testserver1 --ALTER USER MAPPING FOR public SERVER testserver1 -- OPTIONS (ADD sslkey 'value', ADD sslcert 'value'); +--Testcase 30: ALTER FOREIGN TABLE ft1 OPTIONS (table 'T1', tags 'c3'); +--Testcase 31: ALTER FOREIGN TABLE ft2 OPTIONS (table 'T1', tags 'c3'); +--Testcase 32: ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 OPTIONS (column_name 'C 1'); +--Testcase 33: ALTER FOREIGN TABLE ft2 ALTER COLUMN c1 OPTIONS (column_name 'C 1'); ---Testcase 26: +--Testcase 34: \det+ -- Test that alteration of server options causes reconnection -- Remote's errors might be non-English, so hide them to ensure stable results \set VERBOSITY terse ---Testcase 27: +--Testcase 35: SELECT c3, time FROM ft1 ORDER BY c3, c1 LIMIT 1; -- should work +--Testcase 36: ALTER SERVER influxdb_svr OPTIONS (SET dbname 'no such database'); ---Testcase 28: +--Testcase 37: SELECT c3, time FROM ft1 ORDER BY c3, c1 LIMIT 1; -- should fail DO $d$ BEGIN @@ -243,164 +252,189 @@ DO $d$ OPTIONS (SET dbname 'postdb')$$; END; $d$; ---Testcase 29: +--Testcase 38: SELECT c3, time FROM ft1 ORDER BY c3, c1 LIMIT 1; -- should work again \set VERBOSITY default +-- =================================================================== +-- test error case for create publication on foreign table +-- =================================================================== +--Testcase 765: +CREATE PUBLICATION testpub_ftbl FOR TABLE ft1; -- should fail + -- =================================================================== -- simple queries -- =================================================================== -- single table without alias ---Testcase 30: +--Testcase 39: EXPLAIN (COSTS OFF) SELECT * FROM ft1 ORDER BY c3, c1 OFFSET 100 LIMIT 10; ---Testcase 31: +--Testcase 40: SELECT * FROM ft1 ORDER BY c3, c1 OFFSET 100 LIMIT 10; -- single table with alias - also test that tableoid sort is not pushed to remote side ---Testcase 32: +--Testcase 41: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 ORDER BY t1.c3, t1.c1, t1.tableoid OFFSET 100 LIMIT 10; ---Testcase 33: +--Testcase 42: SELECT * FROM ft1 t1 ORDER BY t1.c3, t1.c1, t1.tableoid OFFSET 100 LIMIT 10; -- whole-row reference ---Testcase 34: +--Testcase 43: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1 FROM ft1 t1 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; ---Testcase 35: +--Testcase 44: SELECT t1 FROM ft1 t1 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; -- empty result ---Testcase 36: +--Testcase 45: SELECT * FROM ft1 WHERE false; -- with WHERE clause ---Testcase 37: +--Testcase 46: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 = 101 AND t1.c6 = '1' AND t1.c7 >= '1'; ---Testcase 38: +--Testcase 47: SELECT * FROM ft1 t1 WHERE t1.c1 = 101 AND t1.c6 = '1' AND t1.c7 >= '1'; -- with FOR UPDATE/SHARE ---Testcase 39: +--Testcase 48: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = 101 FOR UPDATE; ---Testcase 40: +--Testcase 49: SELECT * FROM ft1 t1 WHERE c1 = 101 FOR UPDATE; ---Testcase 41: +--Testcase 50: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = 102 FOR SHARE; ---Testcase 42: +--Testcase 51: SELECT * FROM ft1 t1 WHERE c1 = 102 FOR SHARE; -- aggregate ---Testcase 43: +--Testcase 52: SELECT COUNT(*) FROM ft1 t1; -- subquery ---Testcase 44: +--Testcase 53: SELECT * FROM ft1 t1 WHERE t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE c1 <= 10) ORDER BY c1; -- subquery+MAX ---Testcase 45: +--Testcase 54: SELECT * FROM ft1 t1 WHERE t1.c3 = (SELECT MAX(c3) FROM ft2 t2) ORDER BY c1; -- used in CTE ---Testcase 46: +--Testcase 55: WITH t1 AS (SELECT * FROM ft1 WHERE c1 <= 10) SELECT t2.c1, t2.c2, t2.c3, t2.time FROM t1, ft2 t2 WHERE t1.c1 = t2.c1 ORDER BY t1.c1; -- fixed values ---Testcase 47: +--Testcase 56: SELECT 'fixed', NULL FROM ft1 t1 WHERE c1 = 1; -- Test forcing the remote server to produce sorted data for a merge join. +--Testcase 57: SET enable_hashjoin TO false; +--Testcase 58: SET enable_nestloop TO false; -- inner join; expressions in the clauses appear in the equivalence class list ---Testcase 48: +--Testcase 59: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2."C 1" FROM ft2 t1 JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; ---Testcase 49: +--Testcase 60: SELECT t1.c1, t2."C 1" FROM ft2 t1 JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; -- outer join; expressions in the clauses do not appear in equivalence class -- list but no output change as compared to the previous query ---Testcase 50: +--Testcase 61: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2."C 1" FROM ft2 t1 LEFT JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; ---Testcase 51: +--Testcase 62: SELECT t1.c1, t2."C 1" FROM ft2 t1 LEFT JOIN "S 1"."T 1" t2 ON (t1.c1 = t2."C 1") OFFSET 100 LIMIT 10; -- A join between 2 foreign tables. ORDER BY clause is added to the -- foreign join so that the other table can be joined using merge join strategy. ---Testcase 52: +--Testcase 63: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1."C 1" FROM "S 1"."T 1" t1 left join ft1 t2 join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; ---Testcase 53: +--Testcase 64: SELECT t1."C 1" FROM "S 1"."T 1" t1 left join ft1 t2 join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; -- Test similar to above, except that the full join prevents any equivalence -- classes from being merged. This produces single relation equivalence classes -- included in join restrictions. ---Testcase 54: +--Testcase 65: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 left join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; ---Testcase 55: +--Testcase 66: SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 left join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; -- Test similar to above with all full outer joins ---Testcase 56: +--Testcase 67: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 full join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; ---Testcase 57: +--Testcase 68: SELECT t1."C 1", t2.c1, t3.c1 FROM "S 1"."T 1" t1 full join ft1 t2 full join ft2 t3 on (t2.c1 = t3.c1) on (t3.c1 = t1."C 1") OFFSET 100 LIMIT 10; +--Testcase 69: RESET enable_hashjoin; +--Testcase 70: RESET enable_nestloop; +-- Test executing assertion in estimate_path_cost_size() that makes sure that +-- retrieved_rows for foreign rel re-used to cost pre-sorted foreign paths is +-- a sensible value even when the rel has tuples=0 +--Testcase 71: +CREATE FOREIGN TABLE loct_empty (c1 int NOT NULL, c2 text) SERVER influxdb_svr; +--Testcase 72: +CREATE FOREIGN TABLE ft_empty (c1 int NOT NULL, c2 text) + SERVER influxdb_svr OPTIONS (table 'loct_empty'); +--Testcase 73: +INSERT INTO loct_empty + SELECT id, 'AAA' || to_char(id, 'FM000') FROM generate_series(1, 100) id; +--Testcase 74: +DELETE FROM loct_empty; +--ANALYZE ft_empty; +--Testcase 75: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft_empty ORDER BY c1; + -- =================================================================== -- WHERE with remotely-executable conditions -- =================================================================== ---Testcase 58: +--Testcase 76: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 = 1; -- Var, OpExpr(b), Const ---Testcase 59: +--Testcase 77: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 = 100 AND t1.c2 = 0; -- BoolExpr ---Testcase 60: +--Testcase 78: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 IS NULL; -- NullTest ---Testcase 61: +--Testcase 79: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 IS NOT NULL; -- NullTest ---Testcase 62: +--Testcase 80: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE round(abs(c1), 0) = 1; -- FuncExpr ---Testcase 63: +--Testcase 81: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = -c1; -- OpExpr(l) ---Testcase 64: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE 1 = c1!; -- OpExpr(r) ---Testcase 65: +--Testcase 82: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (c1 IS NOT NULL) IS DISTINCT FROM (c1 IS NOT NULL); -- DistinctExpr ---Testcase 66: +--Testcase 83: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = ANY(ARRAY[c2, 1, c1 + 0]); -- ScalarArrayOpExpr ---Testcase 67: +--Testcase 84: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- SubscriptingRef ---Testcase 68: +--Testcase 85: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c6 = E'foo''s\\bar'; -- check special chars ---Testcase 69: +--Testcase 86: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c8 = 'foo'; -- can't be sent to remote -- parameterized remote path for foreign table ---Testcase 70: +--Testcase 87: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM "S 1"."T 1" a, ft2 b WHERE a."C 1" = 47 AND b.c1 = a.c2; ---Testcase 71: +--Testcase 88: SELECT * FROM ft2 a, ft2 b WHERE a.c1 = 47 AND b.c1 = a.c2; -- check both safe and unsafe join conditions ---Testcase 72: +--Testcase 89: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft2 a, ft2 b WHERE a.c2 = 6 AND b.c1 = a.c1 AND a.c8 = 'foo' AND b.c7 = upper(a.c7); ---Testcase 73: +--Testcase 90: SELECT * FROM ft2 a, ft2 b WHERE a.c2 = 6 AND b.c1 = a.c1 AND a.c8 = 'foo' AND b.c7 = upper(a.c7) ORDER BY a.c1; -- bug before 9.3.5 due to sloppy handling of remote-estimate parameters ---Testcase 74: +--Testcase 91: SELECT * FROM ft1 WHERE c1 = ANY (ARRAY(SELECT c1 FROM ft2 WHERE c1 < 5)); ---Testcase 75: +--Testcase 92: SELECT * FROM ft2 WHERE c1 = ANY (ARRAY(SELECT c1 FROM ft1 WHERE c1 < 5)); -- we should not push order by clause with volatile expressions or unsafe -- collations ---Testcase 76: +--Testcase 93: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft2 ORDER BY ft2.c1, random(); ---Testcase 77: +--Testcase 94: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft2 ORDER BY ft2.c1, ft2.c3 collate "C"; -- user-defined operator/function ---Testcase 78: +--Testcase 95: CREATE FUNCTION influxdb_fdw_abs(int) RETURNS int AS $$ BEGIN RETURN abs($1); END $$ LANGUAGE plpgsql IMMUTABLE; ---Testcase 79: +--Testcase 96: CREATE OPERATOR === ( LEFTARG = int, RIGHTARG = int, @@ -409,210 +443,266 @@ CREATE OPERATOR === ( ); -- built-in operators and functions can be shipped for remote execution ---Testcase 80: +--Testcase 97: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = abs(t1.c2); ---Testcase 81: +--Testcase 98: SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = abs(t1.c2); ---Testcase 82: +--Testcase 99: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = t1.c2; ---Testcase 83: +--Testcase 100: SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = t1.c2; -- by default, user-defined ones cannot ---Testcase 84: +--Testcase 101: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); ---Testcase 85: +--Testcase 102: SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); ---Testcase 86: +--Testcase 103: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; ---Testcase 87: +--Testcase 104: SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; -- ORDER BY can be shipped, though ---Testcase 88: +--Testcase 105: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; ---Testcase 89: +--Testcase 106: SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; -- but let's put them in an extension ... +--Testcase 107: ALTER EXTENSION influxdb_fdw ADD FUNCTION influxdb_fdw_abs(int); +--Testcase 108: ALTER EXTENSION influxdb_fdw ADD OPERATOR === (int, int); -- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); -- ... now they can be shipped ---Testcase 90: +--Testcase 109: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); ---Testcase 91: +--Testcase 110: SELECT count(c3) FROM ft1 t1 WHERE t1.c1 = influxdb_fdw_abs(t1.c2); ---Testcase 92: +--Testcase 111: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; ---Testcase 93: +--Testcase 112: SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; -- and both ORDER BY and LIMIT can be shipped ---Testcase 94: +--Testcase 113: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; ---Testcase 95: +--Testcase 114: SELECT * FROM ft1 t1 WHERE t1.c1 === t1.c2 order by t1.c2 limit 1; +-- Test CASE pushdown +-- InfluxDB not support CASE expressions. +--Testcase 813: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT c1,c2,c3 FROM ft2 WHERE CASE WHEN c1 > 990 THEN c1 END < 1000 ORDER BY c1; +--Testcase 814: +SELECT c1,c2,c3 FROM ft2 WHERE CASE WHEN c1 > 990 THEN c1 END < 1000 ORDER BY c1; + +-- Nested CASE +--Testcase 815: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT c1,c2,c3 FROM ft2 WHERE CASE CASE WHEN c2 > 0 THEN c2 END WHEN 100 THEN 601 WHEN c2 THEN c2 ELSE 0 END > 600 ORDER BY c1; +--Testcase 816: +SELECT c1,c2,c3 FROM ft2 WHERE CASE CASE WHEN c2 > 0 THEN c2 END WHEN 100 THEN 601 WHEN c2 THEN c2 ELSE 0 END > 600 ORDER BY c1; + +-- CASE arg WHEN +--Testcase 817: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE c1 > (CASE mod(c1, 4) WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END); + +-- CASE cannot be pushed down because of unshippable arg clause +--Testcase 818: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE c1 > (CASE random()::integer WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END); + +-- these are shippable +--Testcase 819: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE c6 WHEN 'foo' THEN true ELSE c3 < 'bar' END; +--Testcase 820: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE c3 WHEN c6 THEN true ELSE c3 < 'bar' END; + +-- but this is not because of collation +--Testcase 821: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE c3 COLLATE "C" WHEN c6 THEN true ELSE c3 < 'bar' END; + +-- check schema-qualification of regconfig constant +--Testcase 822: +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +--Testcase 823: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT c1, to_tsvector('custom_search'::regconfig, c3) FROM ft1 +WHERE c1 = 642 AND length(to_tsvector('custom_search'::regconfig, c3)) > 0; +--Testcase 824: +SELECT c1, to_tsvector('custom_search'::regconfig, c3) FROM ft1 +WHERE c1 = 642 AND length(to_tsvector('custom_search'::regconfig, c3)) > 0; + -- =================================================================== -- JOIN queries -- =================================================================== -- join two tables ---Testcase 96: +--Testcase 115: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; ---Testcase 97: +--Testcase 116: SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; -- join three tables ---Testcase 98: +--Testcase 117: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) JOIN ft4 t3 ON (t3.c1 = t1.c1) ORDER BY t1.c3, t1.c1 OFFSET 10 LIMIT 10; ---Testcase 99: +--Testcase 118: SELECT t1.c1, t2.c2, t3.c3 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) JOIN ft4 t3 ON (t3.c1 = t1.c1) ORDER BY t1.c3, t1.c1 OFFSET 10 LIMIT 10; -- left outer join ---Testcase 100: +--Testcase 119: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; ---Testcase 101: +--Testcase 120: SELECT t1.c1, t2.c1 FROM ft4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- left outer join three tables ---Testcase 102: +--Testcase 121: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; ---Testcase 103: +--Testcase 122: SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; -- left outer join + placement of clauses. -- clauses within the nullable side are not pulled up, but top level clause on -- non-nullable side is pushed into non-nullable side ---Testcase 104: +--Testcase 123: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) WHERE t1.c1 < 10; ---Testcase 105: +--Testcase 124: SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) WHERE t1.c1 < 10; -- clauses within the nullable side are not pulled up, but the top level clause -- on nullable side is not pushed down into nullable side ---Testcase 106: +--Testcase 125: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) WHERE (t2.c1 < 10 OR t2.c1 IS NULL) AND t1.c1 < 10; ---Testcase 107: +--Testcase 126: SELECT t1.c1, t1.c2, t2.c1, t2.c2 FROM ft4 t1 LEFT JOIN (SELECT * FROM ft5 WHERE c1 < 10) t2 ON (t1.c1 = t2.c1) WHERE (t2.c1 < 10 OR t2.c1 IS NULL) AND t1.c1 < 10; -- right outer join ---Testcase 108: +--Testcase 127: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft5 t1 RIGHT JOIN ft4 t2 ON (t1.c1 = t2.c1) ORDER BY t2.c1, t1.c1 OFFSET 10 LIMIT 10; ---Testcase 109: +--Testcase 128: SELECT t1.c1, t2.c1 FROM ft5 t1 RIGHT JOIN ft4 t2 ON (t1.c1 = t2.c1) ORDER BY t2.c1, t1.c1 OFFSET 10 LIMIT 10; -- right outer join three tables ---Testcase 110: +--Testcase 129: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; ---Testcase 111: +--Testcase 130: SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; -- full outer join ---Testcase 112: +--Testcase 131: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 45 LIMIT 10; ---Testcase 113: +--Testcase 132: SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 45 LIMIT 10; -- full outer join with restrictions on the joining relations -- a. the joining relations are both base relations ---Testcase 114: +--Testcase 133: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1; ---Testcase 115: +--Testcase 134: SELECT t1.c1, t2.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1; ---Testcase 116: +--Testcase 135: EXPLAIN (VERBOSE, COSTS OFF) SELECT 1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; ---Testcase 117: +--Testcase 136: SELECT 1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; -- b. one of the joining relations is a base relation and the other is a join -- relation ---Testcase 118: +--Testcase 137: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM ft4 t2 LEFT JOIN ft5 t3 ON (t2.c1 = t3.c1) WHERE (t2.c1 between 50 and 60)) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; ---Testcase 119: +--Testcase 138: SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM ft4 t2 LEFT JOIN ft5 t3 ON (t2.c1 = t3.c1) WHERE (t2.c1 between 50 and 60)) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; -- c. test deparsing the remote query as nested subqueries ---Testcase 120: +--Testcase 139: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; ---Testcase 121: +--Testcase 140: SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t1 FULL JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (t1.c1 = ss.a) ORDER BY t1.c1, ss.a, ss.b; -- d. test deparsing rowmarked relations as subqueries ---Testcase 122: +--Testcase 141: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM "S 1"."T 3" WHERE c1 = 50) t1 INNER JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY t1.c1, ss.a, ss.b FOR UPDATE OF t1; ---Testcase 123: +--Testcase 142: SELECT t1.c1, ss.a, ss.b FROM (SELECT c1 FROM "S 1"."T 3" WHERE c1 = 50) t1 INNER JOIN (SELECT t2.c1, t3.c1 FROM (SELECT c1 FROM ft4 WHERE c1 between 50 and 60) t2 FULL JOIN (SELECT c1 FROM ft5 WHERE c1 between 50 and 60) t3 ON (t2.c1 = t3.c1) WHERE t2.c1 IS NULL OR t2.c1 IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY t1.c1, ss.a, ss.b FOR UPDATE OF t1; -- full outer join + inner join ---Testcase 124: +--Testcase 143: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1, t3.c1 FROM ft4 t1 INNER JOIN ft5 t2 ON (t1.c1 = t2.c1 + 1 and t1.c1 between 50 and 60) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1, t2.c1, t3.c1 LIMIT 10; ---Testcase 125: +--Testcase 144: SELECT t1.c1, t2.c1, t3.c1 FROM ft4 t1 INNER JOIN ft5 t2 ON (t1.c1 = t2.c1 + 1 and t1.c1 between 50 and 60) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1, t2.c1, t3.c1 LIMIT 10; -- full outer join three tables ---Testcase 126: +--Testcase 145: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; ---Testcase 127: +--Testcase 146: SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; -- full outer join + right outer join ---Testcase 128: +--Testcase 147: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; ---Testcase 129: +--Testcase 148: SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; -- right outer join + full outer join ---Testcase 130: +--Testcase 149: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; ---Testcase 131: +--Testcase 150: SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; -- full outer join + left outer join ---Testcase 132: +--Testcase 151: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; ---Testcase 133: +--Testcase 152: SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; -- left outer join + full outer join ---Testcase 134: +--Testcase 153: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; ---Testcase 135: +--Testcase 154: SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) FULL JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; +--Testcase 155: +SET enable_memoize TO off; -- right outer join + left outer join ---Testcase 136: +--Testcase 156: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; ---Testcase 137: +--Testcase 157: SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 RIGHT JOIN ft2 t2 ON (t1.c1 = t2.c1) LEFT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; +--Testcase 158: +RESET enable_memoize; -- left outer join + right outer join ---Testcase 138: +--Testcase 159: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) OFFSET 10 LIMIT 10; ---Testcase 139: +--Testcase 160: SELECT t1.c1, t2.c2, t3.c3 FROM ft2 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) RIGHT JOIN ft4 t3 ON (t2.c1 = t3.c1) ORDER BY t1.c1 OFFSET 10 LIMIT 10; -- full outer join + WHERE clause, only matched rows ---Testcase 140: +--Testcase 161: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) WHERE (t1.c1 = t2.c1 OR t1.c1 IS NULL) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; ---Testcase 141: +--Testcase 162: SELECT t1.c1, t2.c1 FROM ft4 t1 FULL JOIN ft5 t2 ON (t1.c1 = t2.c1) WHERE (t1.c1 = t2.c1 OR t1.c1 IS NULL) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- full outer join + WHERE clause with shippable extensions set ---Testcase 142: +--Testcase 163: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t1.c3 FROM ft1 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE influxdb_fdw_abs(t1.c1) > 0 OFFSET 10 LIMIT 10; -- skip, influxdb does not have option 'extensions' @@ -623,185 +713,209 @@ SELECT t1.c1, t2.c2, t1.c3 FROM ft1 t1 FULL JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE -- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); -- join two tables with FOR UPDATE clause -- tests whole-row reference for row marks ---Testcase 143: +--Testcase 164: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE OF t1; ---Testcase 144: +--Testcase 165: SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE OF t1; ---Testcase 145: +--Testcase 166: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE; ---Testcase 146: +--Testcase 167: SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR UPDATE; -- join two tables with FOR SHARE clause ---Testcase 147: +--Testcase 168: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE OF t1; ---Testcase 148: +--Testcase 169: SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE OF t1; ---Testcase 149: +--Testcase 170: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE; ---Testcase 150: +--Testcase 171: SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10 FOR SHARE; -- join in CTE ---Testcase 151: +--Testcase 172: EXPLAIN (VERBOSE, COSTS OFF) WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; ---Testcase 152: +--Testcase 173: WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; -- ctid with whole-row reference ---Testcase 153: +--Testcase 174: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.ctid, t1, t2, t1.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; -- SEMI JOIN, not pushed down ---Testcase 154: +--Testcase 175: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c1) ORDER BY t1.c1 OFFSET 100 LIMIT 10; ---Testcase 155: +--Testcase 176: SELECT t1.c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c1) ORDER BY t1.c1 OFFSET 100 LIMIT 10; -- ANTI JOIN, not pushed down ---Testcase 156: +--Testcase 177: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c2) ORDER BY t1.c1 OFFSET 100 LIMIT 10; ---Testcase 157: +--Testcase 178: SELECT t1.c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE t1.c1 = t2.c2) ORDER BY t1.c1 OFFSET 100 LIMIT 10; -- CROSS JOIN can be pushed down ---Testcase 158: +--Testcase 179: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft1 t1 CROSS JOIN ft2 t2 ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; ---Testcase 159: +--Testcase 180: SELECT t1.c1, t2.c1 FROM ft1 t1 CROSS JOIN ft2 t2 ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; -- different server, not pushed down. No result expected. ---Testcase 160: +--Testcase 181: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft5 t1 JOIN ft6 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; ---Testcase 161: +--Testcase 182: SELECT t1.c1, t2.c1 FROM ft5 t1 JOIN ft6 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; -- unsafe join conditions (c8 has a UDT), not pushed down. Practically a CROSS -- JOIN since c8 in both tables has same value. ---Testcase 162: +--Testcase 183: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c8 = t2.c8) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; ---Testcase 163: +--Testcase 184: SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c8 = t2.c8) ORDER BY t1.c1, t2.c1 OFFSET 100 LIMIT 10; -- unsafe conditions on one side (c8 has a UDT), not pushed down. ---Testcase 164: +--Testcase 185: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = 'foo' ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; ---Testcase 165: +--Testcase 186: SELECT t1.c1, t2.c1 FROM ft1 t1 LEFT JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = 'foo' ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; -- join where unsafe to pushdown condition in WHERE clause has a column not -- in the SELECT clause. In this test unsafe clause needs to have column -- references from both joining sides so that the clause is not pushed down -- into one of the joining sides. ---Testcase 166: +--Testcase 187: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; ---Testcase 167: +--Testcase 188: SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; -- Aggregate after UNION, for testing setrefs ---Testcase 168: +--Testcase 189: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) UNION SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; ---Testcase 169: +--Testcase 190: SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) UNION SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; -- join with lateral reference ---Testcase 170: +--Testcase 191: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1."C 1" FROM "S 1"."T 1" t1, LATERAL (SELECT DISTINCT t2.c1, t3.c1 FROM ft1 t2, ft2 t3 WHERE t2.c1 = t3.c1 AND t2.c2 = t1.c2) q ORDER BY t1."C 1" OFFSET 10 LIMIT 10; ---Testcase 171: +--Testcase 192: SELECT t1."C 1" FROM "S 1"."T 1" t1, LATERAL (SELECT DISTINCT t2.c1, t3.c1 FROM ft1 t2, ft2 t3 WHERE t2.c1 = t3.c1 AND t2.c2 = t1.c2) q ORDER BY t1."C 1" OFFSET 10 LIMIT 10; -- non-Var items in targetlist of the nullable rel of a join preventing -- push-down in some cases -- unable to push {ft1, ft2} ---Testcase 172: +--Testcase 193: EXPLAIN (VERBOSE, COSTS OFF) SELECT q.a, ft2.c1 FROM (SELECT 13 FROM ft1 WHERE c1 = 13) q(a) RIGHT JOIN ft2 ON (q.a = ft2.c1) WHERE ft2.c1 BETWEEN 10 AND 15; ---Testcase 173: +--Testcase 194: SELECT q.a, ft2.c1 FROM (SELECT 13 FROM ft1 WHERE c1 = 13) q(a) RIGHT JOIN ft2 ON (q.a = ft2.c1) WHERE ft2.c1 BETWEEN 10 AND 15; -- ok to push {ft1, ft2} but not {ft1, ft2, ft4} ---Testcase 174: +--Testcase 195: EXPLAIN (VERBOSE, COSTS OFF) SELECT ft4.c1, q.* FROM ft4 LEFT JOIN (SELECT 13, ft1.c1, ft2.c1 FROM ft1 RIGHT JOIN ft2 ON (ft1.c1 = ft2.c1) WHERE ft1.c1 = 12) q(a, b, c) ON (ft4.c1 = q.b) WHERE ft4.c1 BETWEEN 10 AND 15; ---Testcase 175: +--Testcase 196: SELECT ft4.c1, q.* FROM ft4 LEFT JOIN (SELECT 13, ft1.c1, ft2.c1 FROM ft1 RIGHT JOIN ft2 ON (ft1.c1 = ft2.c1) WHERE ft1.c1 = 12) q(a, b, c) ON (ft4.c1 = q.b) WHERE ft4.c1 BETWEEN 10 AND 15 ORDER BY ft4.c1; -- join with nullable side with some columns with null values -- influxdb_fdw does not support UPDATE -- UPDATE ft5 SET c3 = null where c1 % 9 = 0; ---Testcase 176: +--Testcase 197: EXPLAIN (VERBOSE, COSTS OFF) SELECT ft5, ft5.c1, ft5.c2, ft5.c3, ft4.c1, ft4.c2 FROM ft5 left join ft4 on ft5.c1 = ft4.c1 WHERE ft4.c1 BETWEEN 10 and 30 ORDER BY ft5.c1, ft4.c1; ---Testcase 177: +--Testcase 198: SELECT ft5, ft5.c1, ft5.c2, ft5.c3, ft4.c1, ft4.c2 FROM ft5 left join ft4 on ft5.c1 = ft4.c1 WHERE ft4.c1 BETWEEN 10 and 30 ORDER BY ft5.c1, ft4.c1; -- multi-way join involving multiple merge joins -- (this case used to have EPQ-related planning problems) ---Testcase 178: +--Testcase 199: CREATE FOREIGN TABLE local_tbl (c1 int NOT NULL, c2 int NOT NULL, c3 text) SERVER influxdb_svr OPTIONS (table 'local_tbl'); ---Testcase 179: +--Testcase 200: INSERT INTO local_tbl SELECT id, id % 10, to_char(id, 'FM0000') FROM generate_series(1, 1000) id; --ANALYZE local_tbl; +--Testcase 201: SET enable_nestloop TO false; +--Testcase 202: SET enable_hashjoin TO false; ---Testcase 180: +--Testcase 203: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE ft1.c1 = ft2.c1 AND ft1.c2 = ft4.c1 AND ft1.c2 = ft5.c1 AND ft1.c2 = local_tbl.c1 AND ft1.c1 < 100 AND ft2.c1 < 100 ORDER BY ft1.c1 FOR UPDATE; ---Testcase 181: +--Testcase 204: SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE ft1.c1 = ft2.c1 AND ft1.c2 = ft4.c1 AND ft1.c2 = ft5.c1 AND ft1.c2 = local_tbl.c1 AND ft1.c1 < 100 AND ft2.c1 < 100 ORDER BY ft1.c1 FOR UPDATE; +--Testcase 205: RESET enable_nestloop; +--Testcase 206: RESET enable_hashjoin; ---Testcase 182: + +-- test that add_paths_with_pathkeys_for_rel() arranges for the epq_path to +-- return columns needed by the parent ForeignScan node +--Testcase 825: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl LEFT JOIN (SELECT ft1.*, COALESCE(ft1.c3 || ft2.c3, 'foobar') FROM ft1 INNER JOIN ft2 ON (ft1.c1 = ft2.c1 AND ft1.c1 < 100)) ss ON (local_tbl.c1 = ss.c1) ORDER BY local_tbl.c1 FOR UPDATE OF local_tbl; + +-- ALTER SERVER loopback OPTIONS (DROP extensions); +-- ALTER SERVER loopback OPTIONS (ADD fdw_startup_cost '10000.0'); +--Testcase 826: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl LEFT JOIN (SELECT ft1.* FROM ft1 INNER JOIN ft2 ON (ft1.c1 = ft2.c1 AND ft1.c1 < 100 AND ft1.c1 = influxdb_fdw_abs(ft2.c2))) ss ON (local_tbl.c3 = ss.c3) ORDER BY local_tbl.c1 FOR UPDATE OF local_tbl; +-- ALTER SERVER loopback OPTIONS (DROP fdw_startup_cost); +-- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); + +--Testcase 207: DELETE FROM local_tbl; +--Testcase 783: DROP FOREIGN TABLE local_tbl; -- check join pushdown in situations where multiple userids are involved ---Testcase 183: +--Testcase 208: CREATE ROLE regress_view_owner SUPERUSER; ---Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +--Testcase 209: +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; ---Testcase 185: +--Testcase 210: CREATE VIEW v4 AS SELECT * FROM ft4; ---Testcase 186: +--Testcase 211: CREATE VIEW v5 AS SELECT * FROM ft5; +--Testcase 212: ALTER VIEW v5 OWNER TO regress_view_owner; ---Testcase 187: +--Testcase 213: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can't be pushed down, different view owners ---Testcase 188: +--Testcase 214: SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; +--Testcase 215: ALTER VIEW v4 OWNER TO regress_view_owner; ---Testcase 189: +--Testcase 216: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can be pushed down ---Testcase 190: +--Testcase 217: SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN v5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; ---Testcase 191: +--Testcase 218: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can't be pushed down, view owner not current user ---Testcase 192: +--Testcase 219: SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; +--Testcase 220: ALTER VIEW v4 OWNER TO CURRENT_USER; ---Testcase 193: +--Testcase 221: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; -- can be pushed down ---Testcase 194: +--Testcase 222: SELECT t1.c1, t2.c2 FROM v4 t1 LEFT JOIN ft5 t2 ON (t1.c1 = t2.c1) ORDER BY t1.c1, t2.c1 OFFSET 10 LIMIT 10; +--Testcase 223: ALTER VIEW v4 OWNER TO regress_view_owner; -- cleanup ---Testcase 195: +--Testcase 224: DROP OWNED BY regress_view_owner; ---Testcase 196: +--Testcase 225: DROP ROLE regress_view_owner; @@ -810,238 +924,244 @@ DROP ROLE regress_view_owner; -- =================================================================== -- Simple aggregates ---Testcase 197: +--Testcase 226: explain (verbose, costs off) select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2; ---Testcase 198: +--Testcase 227: select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2; ---Testcase 199: +--Testcase 228: explain (verbose, costs off) select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2 limit 1; ---Testcase 200: +--Testcase 229: select count(c6), sum(c1), avg(c1), min(c2), max(c1), stddev(c2), sum(c1) * (random() <= 1)::int as sum2 from ft1 where c2 < 5 group by c2 order by 1, 2 limit 1; -- Aggregate is not pushed down as aggregation contains random() ---Testcase 201: +--Testcase 230: explain (verbose, costs off) select sum(c1 * (random() <= 1)::int) as sum, avg(c1) from ft1; -- Aggregate over join query ---Testcase 202: +--Testcase 231: explain (verbose, costs off) select count(*), sum(t1.c1), avg(t2.c1) from ft1 t1 inner join ft1 t2 on (t1.c2 = t2.c2) where t1.c2 = 6; ---Testcase 203: +--Testcase 232: select count(*), sum(t1.c1), avg(t2.c1) from ft1 t1 inner join ft1 t2 on (t1.c2 = t2.c2) where t1.c2 = 6; -- Not pushed down due to local conditions present in underneath input rel ---Testcase 204: +--Testcase 233: explain (verbose, costs off) select sum(t1.c1), count(t2.c1) from ft1 t1 inner join ft2 t2 on (t1.c1 = t2.c1) where ((t1.c1 * t2.c1)/(t1.c1 * t2.c1)) * random() <= 1; -- GROUP BY clause having expressions ---Testcase 205: +--Testcase 234: explain (verbose, costs off) select c2/2, sum(c2) * (c2/2) from ft1 group by c2/2 order by c2/2; ---Testcase 206: +--Testcase 235: select c2/2, sum(c2) * (c2/2) from ft1 group by c2/2 order by c2/2; -- Aggregates in subquery are pushed down. ---Testcase 207: +--Testcase 236: explain (verbose, costs off) select count(x.a), sum(x.a) from (select c2 a, sum(c1) b from ft1 group by c2, sqrt(c1) order by 1, 2) x; ---Testcase 208: +--Testcase 237: select count(x.a), sum(x.a) from (select c2 a, sum(c1) b from ft1 group by c2, sqrt(c1) order by 1, 2) x; -- Aggregate is still pushed down by taking unshippable expression out ---Testcase 209: +--Testcase 238: explain (verbose, costs off) select c2 * (random() <= 1)::int as sum1, sum(c1) * c2 as sum2 from ft1 group by c2 order by 1, 2; ---Testcase 210: +--Testcase 239: select c2 * (random() <= 1)::int as sum1, sum(c1) * c2 as sum2 from ft1 group by c2 order by 1, 2; -- Aggregate with unshippable GROUP BY clause are not pushed ---Testcase 211: +--Testcase 240: explain (verbose, costs off) select c2 * (random() <= 1)::int as c2 from ft2 group by c2 * (random() <= 1)::int order by 1; -- GROUP BY clause in various forms, cardinal, alias and constant expression ---Testcase 212: +--Testcase 241: explain (verbose, costs off) select count(c2) w, c2 x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; ---Testcase 213: +--Testcase 242: select count(c2) w, c2 x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; -- GROUP BY clause referring to same column multiple times -- Also, ORDER BY contains an aggregate function ---Testcase 214: +--Testcase 243: explain (verbose, costs off) select c2, c2 from ft1 where c2 > 6 group by 1, 2 order by sum(c1); ---Testcase 215: +--Testcase 244: select c2, c2 from ft1 where c2 > 6 group by 1, 2 order by sum(c1); -- Testing HAVING clause shippability ---Testcase 216: +--Testcase 245: explain (verbose, costs off) select c2, sum(c1) from ft2 group by c2 having avg(c1) < 500 and sum(c1) < 49800 order by c2; ---Testcase 217: +--Testcase 246: select c2, sum(c1) from ft2 group by c2 having avg(c1) < 500 and sum(c1) < 49800 order by c2; -- Unshippable HAVING clause will be evaluated locally, and other qual in HAVING clause is pushed down ---Testcase 218: +--Testcase 247: explain (verbose, costs off) select count(*) from (select time, count(c1) from ft1 group by time, sqrt(c2) having (avg(c1) / avg(c1)) * random() <= 1 and avg(c1) < 500) x; ---Testcase 219: +--Testcase 248: select count(*) from (select time, count(c1) from ft1 group by time, sqrt(c2) having (avg(c1) / avg(c1)) * random() <= 1 and avg(c1) < 500) x; -- Aggregate in HAVING clause is not pushable, and thus aggregation is not pushed down ---Testcase 220: +--Testcase 249: explain (verbose, costs off) select sum(c1) from ft1 group by c2 having avg(c1 * (random() <= 1)::int) > 100 order by 1; -- Remote aggregate in combination with a local Param (for the output -- of an initplan) can be trouble, per bug #15781 ---Testcase 221: +--Testcase 250: explain (verbose, costs off) select exists(select 1 from pg_enum), sum(c1) from ft1; ---Testcase 222: +--Testcase 251: select exists(select 1 from pg_enum), sum(c1) from ft1; ---Testcase 223: +--Testcase 252: explain (verbose, costs off) select exists(select 1 from pg_enum), sum(c1) from ft1 group by 1; ---Testcase 224: +--Testcase 253: select exists(select 1 from pg_enum), sum(c1) from ft1 group by 1; -- Testing ORDER BY, DISTINCT, FILTER, Ordered-sets and VARIADIC within aggregates -- ORDER BY within aggregate, same column used to order ---Testcase 225: +--Testcase 254: explain (verbose, costs off) select array_agg(c1 order by c1) from ft1 where c1 < 100 group by c2 order by 1; ---Testcase 226: +--Testcase 255: select array_agg(c1 order by c1) from ft1 where c1 < 100 group by c2 order by 1; -- ORDER BY within aggregate, different column used to order also using DESC ---Testcase 227: +--Testcase 256: explain (verbose, costs off) select array_agg(time order by c1 desc) from ft2 where c2 = 6 and c1 < 50; ---Testcase 228: +--Testcase 257: select array_agg(time order by c1 desc) from ft2 where c2 = 6 and c1 < 50; -- DISTINCT within aggregate ---Testcase 229: +--Testcase 258: explain (verbose, costs off) select array_agg(distinct (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; ---Testcase 230: +--Testcase 259: select array_agg(distinct (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; -- DISTINCT combined with ORDER BY within aggregate ---Testcase 231: +--Testcase 260: explain (verbose, costs off) select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; ---Testcase 232: +--Testcase 261: select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; ---Testcase 233: +--Testcase 262: explain (verbose, costs off) select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5 desc nulls last) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; ---Testcase 234: +--Testcase 263: select array_agg(distinct (t1.c1)%5 order by (t1.c1)%5 desc nulls last) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) where t1.c1 < 20 or (t1.c1 is null and t2.c1 < 5) group by (t2.c1)%3 order by 1; -- FILTER within aggregate ---Testcase 235: +--Testcase 264: explain (verbose, costs off) select sum(c1) filter (where c1 < 100 and c2 > 5) from ft1 group by c2 order by 1 nulls last; ---Testcase 236: +--Testcase 265: select sum(c1) filter (where c1 < 100 and c2 > 5) from ft1 group by c2 order by 1 nulls last; -- DISTINCT, ORDER BY and FILTER within aggregate ---Testcase 237: +--Testcase 266: explain (verbose, costs off) select sum(c1%3), sum(distinct c1%3 order by c1%3) filter (where c1%3 < 2), c2 from ft1 where c2 = 6 group by c2; ---Testcase 238: +--Testcase 267: select sum(c1%3), sum(distinct c1%3 order by c1%3) filter (where c1%3 < 2), c2 from ft1 where c2 = 6 group by c2; -- Outer query is aggregation query ---Testcase 239: +--Testcase 268: explain (verbose, costs off) select distinct (select count(*) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; ---Testcase 240: +--Testcase 269: select distinct (select count(*) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; -- Inner query is aggregation query ---Testcase 241: +--Testcase 270: explain (verbose, costs off) select distinct (select count(t1.c1) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; ---Testcase 242: +--Testcase 271: select distinct (select count(t1.c1) filter (where t2.c2 = 6 and t2.c1 < 10) from ft1 t1 where t1.c1 = 6) from ft2 t2 where t2.c2 % 6 = 0 order by 1; -- Aggregate not pushed down as FILTER condition is not pushable ---Testcase 243: +--Testcase 272: explain (verbose, costs off) select sum(c1) filter (where (c1 / c1) * random() <= 1) from ft1 group by c2 order by 1; ---Testcase 244: +--Testcase 273: explain (verbose, costs off) select sum(c2) filter (where c2 in (select c2 from ft1 where c2 < 5)) from ft1; -- Ordered-sets within aggregate ---Testcase 245: +--Testcase 274: explain (verbose, costs off) select c2, rank('10'::varchar) within group (order by c6), percentile_cont(c2/10::numeric) within group (order by c1) from ft1 where c2 < 10 group by c2 having percentile_cont(c2/10::numeric) within group (order by c1) < 500 order by c2; ---Testcase 246: +--Testcase 275: select c2, rank('10'::varchar) within group (order by c6), percentile_cont(c2/10::numeric) within group (order by c1) from ft1 where c2 < 10 group by c2 having percentile_cont(c2/10::numeric) within group (order by c1) < 500 order by c2; -- Using multiple arguments within aggregates ---Testcase 247: +--Testcase 276: explain (verbose, costs off) select c1, rank(c1, c2) within group (order by c1, c2) from ft1 group by c1, c2 having c1 = 6 order by 1; ---Testcase 248: +--Testcase 277: select c1, rank(c1, c2) within group (order by c1, c2) from ft1 group by c1, c2 having c1 = 6 order by 1; -- User defined function for user defined aggregate, VARIADIC ---Testcase 249: +--Testcase 278: create function least_accum(anyelement, variadic anyarray) returns anyelement language sql as 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; ---Testcase 250: +--Testcase 279: create aggregate least_agg(variadic items anyarray) ( stype = anyelement, sfunc = least_accum ); -- Disable hash aggregation for plan stability. +--Testcase 280: set enable_hashagg to false; -- Not pushed down due to user defined aggregate ---Testcase 251: +--Testcase 281: explain (verbose, costs off) select c2, least_agg(c1) from ft1 group by c2 order by c2; -- Add function and aggregate into extension +--Testcase 282: alter extension influxdb_fdw add function least_accum(anyelement, variadic anyarray); +--Testcase 283: alter extension influxdb_fdw add aggregate least_agg(variadic items anyarray); -- Now aggregate will be pushed. Aggregate will display VARIADIC argument. ---Testcase 252: +--Testcase 284: explain (verbose, costs off) select c2, least_agg(c1) from ft1 where c2 < 100 group by c2 order by c2; ---Testcase 253: +--Testcase 285: select c2, least_agg(c1) from ft1 where c2 < 100 group by c2 order by c2; -- Remove function and aggregate from extension +--Testcase 286: alter extension influxdb_fdw drop function least_accum(anyelement, variadic anyarray); +--Testcase 287: alter extension influxdb_fdw drop aggregate least_agg(variadic items anyarray); -- Not pushed down as we have dropped objects from extension. ---Testcase 254: +--Testcase 288: explain (verbose, costs off) select c2, least_agg(c1) from ft1 group by c2 order by c2; -- Cleanup +--Testcase 289: reset enable_hashagg; ---Testcase 255: +--Testcase 290: drop aggregate least_agg(variadic items anyarray); ---Testcase 256: +--Testcase 291: drop function least_accum(anyelement, variadic anyarray); @@ -1050,35 +1170,35 @@ drop function least_accum(anyelement, variadic anyarray); -- operator class. Create those and then add them in extension. Note that -- user defined objects are considered unshippable unless they are part of -- the extension. ---Testcase 257: +--Testcase 292: create operator public.<^ ( leftarg = int4, rightarg = int4, procedure = int4eq ); ---Testcase 258: +--Testcase 293: create operator public.=^ ( leftarg = int4, rightarg = int4, procedure = int4lt ); ---Testcase 259: +--Testcase 294: create operator public.>^ ( leftarg = int4, rightarg = int4, procedure = int4gt ); ---Testcase 260: +--Testcase 295: create operator family my_op_family using btree; ---Testcase 261: +--Testcase 296: create function my_op_cmp(a int, b int) returns int as $$begin return btint4cmp(a, b); end $$ language plpgsql; ---Testcase 262: +--Testcase 297: create operator class my_op_class for type int using btree family my_op_family as operator 1 public.<^, operator 3 public.=^, @@ -1087,102 +1207,127 @@ create operator class my_op_class for type int using btree family my_op_family a -- This will not be pushed as user defined sort operator is not part of the -- extension yet. ---Testcase 263: +--Testcase 298: explain (verbose, costs off) select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; +-- This should not be pushed either. +--Testcase 766: +explain (verbose, costs off) +select * from ft2 order by c1 using operator(public.<^); + -- Update local stats on ft2 --ANALYZE ft2; -- Add into extension +--Testcase 299: alter extension influxdb_fdw add operator class my_op_class using btree; +--Testcase 300: alter extension influxdb_fdw add function my_op_cmp(a int, b int); +--Testcase 301: alter extension influxdb_fdw add operator family my_op_family using btree; +--Testcase 302: alter extension influxdb_fdw add operator public.<^(int, int); +--Testcase 303: alter extension influxdb_fdw add operator public.=^(int, int); +--Testcase 304: alter extension influxdb_fdw add operator public.>^(int, int); -- Now this will be pushed as sort operator is part of the extension. ---Testcase 264: +--Testcase 305: explain (verbose, costs off) select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; ---Testcase 265: +--Testcase 306: select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; +-- This should be pushed too. +-- Influx not support user-defined operator +--Testcase 767: +explain (verbose, costs off) +select * from ft2 order by c1 using operator(public.<^); + -- Remove from extension +--Testcase 307: alter extension influxdb_fdw drop operator class my_op_class using btree; +--Testcase 308: alter extension influxdb_fdw drop function my_op_cmp(a int, b int); +--Testcase 309: alter extension influxdb_fdw drop operator family my_op_family using btree; +--Testcase 310: alter extension influxdb_fdw drop operator public.<^(int, int); +--Testcase 311: alter extension influxdb_fdw drop operator public.=^(int, int); +--Testcase 312: alter extension influxdb_fdw drop operator public.>^(int, int); -- This will not be pushed as sort operator is now removed from the extension. ---Testcase 266: +--Testcase 313: explain (verbose, costs off) select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2; -- Cleanup ---Testcase 267: +--Testcase 314: drop operator class my_op_class using btree; ---Testcase 268: +--Testcase 315: drop function my_op_cmp(a int, b int); ---Testcase 269: +--Testcase 316: drop operator family my_op_family using btree; ---Testcase 270: +--Testcase 317: drop operator public.>^(int, int); ---Testcase 271: +--Testcase 318: drop operator public.=^(int, int); ---Testcase 272: +--Testcase 319: drop operator public.<^(int, int); -- Input relation to aggregate push down hook is not safe to pushdown and thus -- the aggregate cannot be pushed down to foreign server. ---Testcase 273: +--Testcase 320: explain (verbose, costs off) select count(t1.c3) from ft2 t1 left join ft2 t2 on (t1.c1 = random() * t2.c2); -- Subquery in FROM clause having aggregate ---Testcase 274: +--Testcase 321: explain (verbose, costs off) select count(*), x.b from ft1, (select c2 a, sum(c1) b from ft1 group by c2) x where ft1.c2 = x.a group by x.b order by 1, 2; ---Testcase 275: +--Testcase 322: select count(*), x.b from ft1, (select c2 a, sum(c1) b from ft1 group by c2) x where ft1.c2 = x.a group by x.b order by 1, 2; -- FULL join with IS NULL check in HAVING ---Testcase 276: +--Testcase 323: explain (verbose, costs off) select avg(t1.c1), sum(t2.c1) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) group by t2.c1 having (avg(t1.c1) is null and sum(t2.c1) < 10) or sum(t2.c1) is null order by 1 nulls last, 2; ---Testcase 277: +--Testcase 324: select avg(t1.c1), sum(t2.c1) from ft4 t1 full join ft5 t2 on (t1.c1 = t2.c1) group by t2.c1 having (avg(t1.c1) is null and sum(t2.c1) < 10) or sum(t2.c1) is null order by 1 nulls last, 2; -- Aggregate over FULL join needing to deparse the joining relations as -- subqueries. ---Testcase 278: +--Testcase 325: explain (verbose, costs off) select count(*), sum(t1.c1), avg(t2.c1) from (select c1 from ft4 where c1 between 50 and 60) t1 full join (select c1 from ft5 where c1 between 50 and 60) t2 on (t1.c1 = t2.c1); ---Testcase 279: +--Testcase 326: select count(*), sum(t1.c1), avg(t2.c1) from (select c1 from ft4 where c1 between 50 and 60) t1 full join (select c1 from ft5 where c1 between 50 and 60) t2 on (t1.c1 = t2.c1); -- ORDER BY expression is part of the target list but not pushed down to -- foreign server. ---Testcase 280: +--Testcase 327: explain (verbose, costs off) select sum(c2) * (random() <= 1)::int as sum from ft1 order by 1; ---Testcase 281: +--Testcase 328: select sum(c2) * (random() <= 1)::int as sum from ft1 order by 1; -- LATERAL join, with parameterization +--Testcase 329: set enable_hashagg to false; ---Testcase 282: +--Testcase 330: explain (verbose, costs off) select c2, sum from "S 1"."T 1" t1, lateral (select sum(t2.c1 + t1."C 1") sum from ft2 t2 group by t2.c1) qry where t1.c2 * 2 = qry.sum and t1.c2 < 3 and t1."C 1" < 100 order by 1; ---Testcase 283: +--Testcase 331: select c2, sum from "S 1"."T 1" t1, lateral (select sum(t2.c1 + t1."C 1") sum from ft2 t2 group by t2.c1) qry where t1.c2 * 2 = qry.sum and t1.c2 < 3 and t1."C 1" < 100 order by 1; +--Testcase 332: reset enable_hashagg; -- bug #15613: bad plan for foreign table scan with lateral reference ---Testcase 284: +--Testcase 333: EXPLAIN (VERBOSE, COSTS OFF) SELECT ref_0.c2, subq_1.* FROM @@ -1196,7 +1341,7 @@ FROM WHERE ref_0."C 1" < 10 AND subq_1.c3 = '00001' ORDER BY ref_0."C 1"; ---Testcase 285: +--Testcase 334: SELECT ref_0.c2, subq_1.* FROM "S 1"."T 1" AS ref_0, @@ -1210,58 +1355,58 @@ WHERE ref_0."C 1" < 10 AND subq_1.c3 = '00001' ORDER BY ref_0."C 1"; -- Check with placeHolderVars ---Testcase 286: +--Testcase 335: explain (verbose, costs off) select sum(q.a), count(q.b) from ft4 left join (select 13, avg(ft1.c1), sum(ft2.c1) from ft1 right join ft2 on (ft1.c1 = ft2.c1)) q(a, b, c) on (ft4.c1 <= q.b); ---Testcase 287: +--Testcase 336: select sum(q.a), count(q.b) from ft4 left join (select 13, avg(ft1.c1), sum(ft2.c1) from ft1 right join ft2 on (ft1.c1 = ft2.c1)) q(a, b, c) on (ft4.c1 <= q.b); -- Not supported cases -- Grouping sets ---Testcase 288: +--Testcase 337: explain (verbose, costs off) select c2, sum(c1) from ft1 where c2 < 3 group by rollup(c2) order by 1 nulls last; ---Testcase 289: +--Testcase 338: select c2, sum(c1) from ft1 where c2 < 3 group by rollup(c2) order by 1 nulls last; ---Testcase 290: +--Testcase 339: explain (verbose, costs off) select c2, sum(c1) from ft1 where c2 < 3 group by cube(c2) order by 1 nulls last; ---Testcase 291: +--Testcase 340: select c2, sum(c1) from ft1 where c2 < 3 group by cube(c2) order by 1 nulls last; ---Testcase 292: +--Testcase 341: explain (verbose, costs off) select c2, c6, sum(c1) from ft1 where c2 < 3 group by grouping sets(c2, c6) order by 1 nulls last, 2 nulls last; ---Testcase 293: +--Testcase 342: select c2, c6, sum(c1) from ft1 where c2 < 3 group by grouping sets(c2, c6) order by 1 nulls last, 2 nulls last; ---Testcase 294: +--Testcase 343: explain (verbose, costs off) select c2, sum(c1), grouping(c2) from ft1 where c2 < 3 group by c2 order by 1 nulls last; ---Testcase 295: +--Testcase 344: select c2, sum(c1), grouping(c2) from ft1 where c2 < 3 group by c2 order by 1 nulls last; -- DISTINCT itself is not pushed down, whereas underneath aggregate is pushed ---Testcase 296: +--Testcase 345: explain (verbose, costs off) select distinct sum(c1)/1000 s from ft2 where c2 < 6 group by c2 order by 1; ---Testcase 297: +--Testcase 346: select distinct sum(c1)/1000 s from ft2 where c2 < 6 group by c2 order by 1; -- WindowAgg ---Testcase 298: +--Testcase 347: explain (verbose, costs off) select c2, sum(c2), count(c2) over (partition by c2%2) from ft2 where c2 < 10 group by c2 order by 1; ---Testcase 299: +--Testcase 348: select c2, sum(c2), count(c2) over (partition by c2%2) from ft2 where c2 < 10 group by c2 order by 1; ---Testcase 300: +--Testcase 349: explain (verbose, costs off) select c2, array_agg(c2) over (partition by c2%2 order by c2 desc) from ft1 where c2 < 10 group by c2 order by 1; ---Testcase 301: +--Testcase 350: select c2, array_agg(c2) over (partition by c2%2 order by c2 desc) from ft1 where c2 < 10 group by c2 order by 1; ---Testcase 302: +--Testcase 351: explain (verbose, costs off) select c2, array_agg(c2) over (partition by c2%2 order by c2 range between current row and unbounded following) from ft1 where c2 < 10 group by c2 order by 1; ---Testcase 303: +--Testcase 352: select c2, array_agg(c2) over (partition by c2%2 order by c2 range between current row and unbounded following) from ft1 where c2 < 10 group by c2 order by 1; @@ -1269,97 +1414,99 @@ select c2, array_agg(c2) over (partition by c2%2 order by c2 range between curre -- parameterized queries -- =================================================================== -- simple join ---Testcase 304: +--Testcase 353: PREPARE st1(int, int) AS SELECT t1.c3, t2.c3 FROM ft1 t1, ft2 t2 WHERE t1.c1 = $1 AND t2.c1 = $2; ---Testcase 305: +--Testcase 354: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st1(1, 2); ---Testcase 306: +--Testcase 355: EXECUTE st1(1, 1); ---Testcase 307: +--Testcase 356: EXECUTE st1(101, 101); -- subquery using stable function (can't be sent to remote) ---Testcase 308: +--Testcase 357: PREPARE st2(int) AS SELECT * FROM ft1 t1 WHERE t1.c1 < $2 AND t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE c1 > $1 AND date(time) = '1970-01-17'::date) ORDER BY c1; ---Testcase 309: +--Testcase 358: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st2(10, 20); ---Testcase 310: +--Testcase 359: EXECUTE st2(10, 20); ---Testcase 311: +--Testcase 360: EXECUTE st2(101, 121); -- subquery using immutable function (can be sent to remote) ---Testcase 312: +--Testcase 361: PREPARE st3(int) AS SELECT * FROM ft1 t1 WHERE t1.c1 < $2 AND t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE c1 > $1 AND date(time) = '1970-01-17'::date) ORDER BY c1; ---Testcase 313: +--Testcase 362: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st3(10, 20); ---Testcase 314: +--Testcase 363: EXECUTE st3(10, 20); ---Testcase 315: +--Testcase 364: EXECUTE st3(20, 30); -- custom plan should be chosen initially ---Testcase 316: +--Testcase 365: PREPARE st4(int) AS SELECT * FROM ft1 t1 WHERE t1.c1 = $1; ---Testcase 317: +--Testcase 366: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); ---Testcase 318: +--Testcase 367: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); ---Testcase 319: +--Testcase 368: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); ---Testcase 320: +--Testcase 369: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); ---Testcase 321: +--Testcase 370: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); -- once we try it enough times, should switch to generic plan ---Testcase 322: +--Testcase 371: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); -- value of $1 should not be sent to remote ---Testcase 323: +--Testcase 372: PREPARE st5(text,int) AS SELECT * FROM ft1 t1 WHERE c8 = $1 and c1 = $2; ---Testcase 324: +--Testcase 373: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 325: +--Testcase 374: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 326: +--Testcase 375: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 327: +--Testcase 376: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 328: +--Testcase 377: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 329: +--Testcase 378: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 330: +--Testcase 379: EXECUTE st5('foo', 1); -- altering FDW options requires replanning ---Testcase 331: +--Testcase 380: PREPARE st6 AS SELECT * FROM ft1 t1 WHERE t1.c1 = t1.c2; ---Testcase 332: +--Testcase 381: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; ---Testcase 333: +--Testcase 382: PREPARE st7 AS INSERT INTO ft1 (c1,c2,c3) VALUES (1001,101,'foo'); ---Testcase 334: +--Testcase 383: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; ---Testcase 335: +--Testcase 384: INSERT INTO "S 1"."T 0" SELECT * FROM "S 1"."T 1"; +--Testcase 385: ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T0'); ---Testcase 336: +--Testcase 386: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; ---Testcase 337: +--Testcase 387: EXECUTE st6; ---Testcase 338: +--Testcase 388: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; ---Testcase 339: +--Testcase 389: DELETE FROM "S 1"."T 0"; +--Testcase 390: ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T1'); ---Testcase 340: +--Testcase 391: PREPARE st8 AS SELECT count(c3) FROM ft1 t1 WHERE t1.c1 === t1.c2; ---Testcase 341: +--Testcase 392: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; -- Skip, influxdb_fdw does not support extensions -- ALTER SERVER loopback OPTIONS (DROP extensions); ---Testcase 342: +--Testcase 393: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; ---Testcase 343: +--Testcase 394: EXECUTE st8; -- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); @@ -1374,59 +1521,116 @@ DEALLOCATE st7; DEALLOCATE st8; -- System columns, except ctid and oid, should not be sent to remote ---Testcase 344: +--Testcase 395: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.tableoid = 'pg_class'::regclass LIMIT 1; ---Testcase 345: +--Testcase 396: SELECT * FROM ft1 t1 WHERE t1.tableoid = 'ft1'::regclass ORDER BY c1 LIMIT 1; ---Testcase 346: +--Testcase 397: EXPLAIN (VERBOSE, COSTS OFF) SELECT tableoid::regclass, * FROM ft1 t1 LIMIT 1; ---Testcase 347: +--Testcase 398: SELECT tableoid::regclass, * FROM ft1 t1 ORDER BY c1 LIMIT 1; ---Testcase 348: +--Testcase 399: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; ---Testcase 349: +--Testcase 400: SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; ---Testcase 350: +--Testcase 401: EXPLAIN (VERBOSE, COSTS OFF) SELECT ctid, * FROM ft1 t1 LIMIT 1; ---Testcase 351: +--Testcase 402: SELECT ctid, * FROM ft1 t1 ORDER BY c1 LIMIT 1; -- =================================================================== -- used in PL/pgSQL function -- =================================================================== ---Testcase 352: +--Testcase 403: CREATE OR REPLACE FUNCTION f_test(p_c1 int) RETURNS int AS $$ DECLARE v_c1 int; BEGIN ---Testcase 353: +--Testcase 404: SELECT c1 INTO v_c1 FROM ft1 WHERE c1 = p_c1 LIMIT 1; PERFORM c1 FROM ft1 WHERE c1 = p_c1 AND p_c1 = v_c1 LIMIT 1; RETURN v_c1; END; $$ LANGUAGE plpgsql; ---Testcase 354: +--Testcase 405: SELECT f_test(100); ---Testcase 355: +--Testcase 406: DROP FUNCTION f_test(int); +-- =================================================================== +-- REINDEX +-- =================================================================== +-- remote table is not created here +--Testcase 407: +CREATE FOREIGN TABLE reindex_foreign (c1 int, c2 int) + SERVER influxdb_svr2 OPTIONS (table 'reindex_local'); +REINDEX TABLE reindex_foreign; -- error +REINDEX TABLE CONCURRENTLY reindex_foreign; -- error +--Testcase 408: +DROP FOREIGN TABLE reindex_foreign; +-- partitions and foreign tables +--Testcase 409: +CREATE TABLE reind_fdw_parent (c1 int) PARTITION BY RANGE (c1); +--Testcase 410: +CREATE TABLE reind_fdw_0_10 PARTITION OF reind_fdw_parent + FOR VALUES FROM (0) TO (10); +--Testcase 411: +CREATE FOREIGN TABLE reind_fdw_10_20 PARTITION OF reind_fdw_parent + FOR VALUES FROM (10) TO (20) + SERVER influxdb_svr OPTIONS (table 'reind_local_10_20'); +REINDEX TABLE reind_fdw_parent; -- ok +REINDEX TABLE CONCURRENTLY reind_fdw_parent; -- ok +--Testcase 412: +DROP TABLE reind_fdw_parent; + -- =================================================================== -- conversion error -- =================================================================== +--Testcase 413: ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE int; ---Testcase 356: -SELECT * FROM ft1 WHERE c1 = 1; -- ERROR ---Testcase 357: -SELECT ft1.c1, ft2.c2, ft1.c8 FROM ft1, ft2 WHERE ft1.c1 = ft2.c1 AND ft1.c1 = 1; -- ERROR ---Testcase 358: -SELECT ft1.c1, ft2.c2, ft1 FROM ft1, ft2 WHERE ft1.c1 = ft2.c1 AND ft1.c1 = 1; -- ERROR ---Testcase 359: +--Testcase 414: +SELECT * FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8) WHERE x1 = 1; -- ERROR +--Testcase 415: +SELECT ftx.x1, ft2.c2, ftx.x8 FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8), ft2 + WHERE ftx.x1 = ft2.c1 AND ftx.x1 = 1; -- ERROR +--Testcase 416: +SELECT ftx.x1, ft2.c2, ftx FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8), ft2 + WHERE ftx.x1 = ft2.c1 AND ftx.x1 = 1; -- ERROR +--Testcase 417: SELECT sum(c2), array_agg(c8) FROM ft1 GROUP BY c8; -- ERROR +-- ANALYZE ft1; -- ERROR +ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE user_enum; + +-- =================================================================== +-- local type can be different from remote type in some cases, +-- in particular if similarly-named operators do equivalent things +-- =================================================================== +-- Testcase 418: ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE text; +-- Testcase 768: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE c8 = 'foo' LIMIT 1; +-- Testcase 769: +SELECT * FROM ft1 WHERE c8 = 'foo' LIMIT 1; +-- Testcase 770: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE 'foo' = c8 LIMIT 1; +-- Testcase 771: +SELECT * FROM ft1 WHERE 'foo' = c8 LIMIT 1; +-- we declared c8 to be text locally, but it's still the same type on +-- the remote which will balk if we try to do anything incompatible +-- with that remote type +-- Can not create user define type in InfluxDB. +-- Type c8 of foreign table ft1 and remote table T1 are +-- match. These case below not error with influxdb_fdw. +-- Testcase 772: +SELECT * FROM ft1 WHERE c8 LIKE 'foo' LIMIT 1; -- ERROR +-- Testcase 773: +SELECT * FROM ft1 WHERE c8::text LIKE 'foo' LIMIT 1; -- ERROR; cast not pushed down /* -- influxdb_fdw does not support transactions @@ -1452,34 +1656,34 @@ COMMIT; -- =================================================================== -- test handling of collations -- =================================================================== ---Testcase 360: +--Testcase 419: create foreign table loct3 (f1 text collate "C", f2 text, f3 varchar(10)) server influxdb_svr options (table 'loct3'); ---Testcase 361: +--Testcase 420: create foreign table ft3 (f1 text collate "C", f2 text, f3 varchar(10)) server influxdb_svr options (table 'loct3'); -- can be sent to remote ---Testcase 362: +--Testcase 421: explain (verbose, costs off) select * from ft3 where f1 = 'foo'; ---Testcase 363: +--Testcase 422: explain (verbose, costs off) select * from ft3 where f1 COLLATE "C" = 'foo'; ---Testcase 364: +--Testcase 423: explain (verbose, costs off) select * from ft3 where f2 = 'foo'; ---Testcase 365: +--Testcase 424: explain (verbose, costs off) select * from ft3 where f3 = 'foo'; ---Testcase 366: +--Testcase 425: explain (verbose, costs off) select * from ft3 f, loct3 l where f.f3 = l.f3 and l.f1 = 'foo'; -- can't be sent to remote ---Testcase 367: +--Testcase 426: explain (verbose, costs off) select * from ft3 where f1 COLLATE "POSIX" = 'foo'; ---Testcase 368: +--Testcase 427: explain (verbose, costs off) select * from ft3 where f1 = 'foo' COLLATE "C"; ---Testcase 369: +--Testcase 428: explain (verbose, costs off) select * from ft3 where f2 COLLATE "C" = 'foo'; ---Testcase 370: +--Testcase 429: explain (verbose, costs off) select * from ft3 where f2 = 'foo' COLLATE "C"; ---Testcase 371: +--Testcase 430: explain (verbose, costs off) select * from ft3 f, loct3 l where f.f3 = l.f3 COLLATE "POSIX" and l.f1 = 'foo'; @@ -1487,16 +1691,16 @@ explain (verbose, costs off) select * from ft3 f, loct3 l -- =================================================================== -- test writable foreign table stuff -- =================================================================== ---Testcase 372: +--Testcase 431: EXPLAIN (verbose, costs off) INSERT INTO ft2 (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2 ORDER BY c1 LIMIT 20; ---Testcase 373: +--Testcase 432: INSERT INTO ft2 (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2 ORDER BY c1 LIMIT 20; ---Testcase 374: +--Testcase 433: INSERT INTO ft2 (c1,c2,c3) VALUES (1101,201,'aaa'), (1102,202,'bbb'), (1103,203,'ccc'); ---Testcase 375: +--Testcase 434: SELECT c1, c2, c3, c6, c7, c8 FROM ft2 WHERE c2 > 200; ---Testcase 376: +--Testcase 435: INSERT INTO ft2 (c1,c2,c3) VALUES (1104,204,'ddd'), (1105,205,'eee'); --EXPLAIN (verbose, costs off) --UPDATE ft2 SET c2 = c2 + 300, c3 = c3 || '_update3' WHERE c1 % 10 = 3; -- can be pushed down @@ -1509,44 +1713,44 @@ INSERT INTO ft2 (c1,c2,c3) VALUES (1104,204,'ddd'), (1105,205,'eee'); -- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; -- can be pushed down --UPDATE ft2 SET c2 = ft2.c2 + 500, c3 = ft2.c3 || '_update9', c7 = DEFAULT -- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; ---Testcase 377: +--Testcase 436: EXPLAIN (verbose, costs off) DELETE FROM ft2 WHERE c1 % 10 = 5; -- can be pushed down ---Testcase 378: +--Testcase 437: SELECT c1 FROM ft2 WHERE c1 % 10 = 5 ORDER BY c1; ---Testcase 379: +--Testcase 438: DELETE FROM ft2 WHERE c1 % 10 = 5; ---Testcase 380: +--Testcase 439: SELECT c1 FROM ft2 WHERE c1 % 10 = 5; ---Testcase 381: +--Testcase 440: EXPLAIN (verbose, costs off) DELETE FROM ft2 USING ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 2; ---Testcase 382: +--Testcase 441: DELETE FROM ft2 USING ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 2; ---Testcase 383: +--Testcase 442: SELECT c1,c2,c3 FROM ft2 ORDER BY c1; ---Testcase 384: +--Testcase 443: EXPLAIN (verbose, costs off) INSERT INTO ft2 (c1,c2,c3) VALUES (1200,999,'foo'); ---Testcase 385: +--Testcase 444: INSERT INTO ft2 (c1,c2,c3) VALUES (1200,999,'foo'); ---Testcase 386: +--Testcase 445: SELECT c1 FROM ft2 WHERE c1 = 1200 AND c2 = 999; --EXPLAIN (verbose, costs off) --UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; -- can be pushed down --UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; ---Testcase 387: +--Testcase 446: EXPLAIN (verbose, costs off) DELETE FROM ft2 WHERE c1 = 1200; ---Testcase 388: +--Testcase 447: SELECT c1 FROM ft2 WHERE c1 = 1200; ---Testcase 389: +--Testcase 448: DELETE FROM ft2 WHERE c1 = 1200; ---Testcase 390: +--Testcase 449: SELECT c1 FROM ft2 WHERE c1 = 1200; -- Test UPDATE/DELETE with RETURNING on a three-table join ---Testcase 391: +--Testcase 450: INSERT INTO ft2 (c1,c2,c3) SELECT id, id - 1200, to_char(id, 'FM00000') FROM generate_series(1201, 1300) id; --EXPLAIN (verbose, costs off) @@ -1558,24 +1762,24 @@ INSERT INTO ft2 (c1,c2,c3) -- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) -- WHERE ft2.c1 > 1200 AND ft2.c2 = ft4.c1 -- RETURNING ft2, ft2.*, ft4, ft4.*; ---Testcase 392: +--Testcase 451: EXPLAIN (verbose, costs off) DELETE FROM ft2 USING ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; -- can be pushed down ---Testcase 393: +--Testcase 452: SELECT 100 FROM ft2, ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; ---Testcase 394: +--Testcase 453: DELETE FROM ft2 USING ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; ---Testcase 395: +--Testcase 454: SELECT 100 FROM ft2, ft4 LEFT JOIN ft5 ON (ft4.c1 = ft5.c1) WHERE ft2.c1 > 1200 AND ft2.c1 % 10 = 0 AND ft2.c2 = ft4.c1; ---Testcase 396: +--Testcase 455: DELETE FROM ft2 WHERE ft2.c1 > 1200; -- Test UPDATE with a MULTIEXPR sub-select @@ -1598,9 +1802,17 @@ DELETE FROM ft2 WHERE ft2.c1 > 1200; -- WHERE targ--et.c1 = src.c1 --) WHERE c1 > 1100; +-- Test UPDATE involving a join that can be pushed down, +-- but a SET clause that can't be +-- EXPLAIN (VERBOSE, COSTS OFF) +-- UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END +-- FROM ft2 AS t WHERE d.c1 = t.c1 AND d.c1 > 1000; +-- UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END +-- FROM ft2 AS t WHERE d.c1 = t.c1 AND d.c1 > 1000; + -- Test UPDATE/DELETE with WHERE or JOIN/ON conditions containing -- user-defined operators/functions ---Testcase 397: +--Testcase 456: INSERT INTO ft2 (c1,c2,c3) SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id; --EXPLAIN (verbose, costs off) @@ -1615,58 +1827,59 @@ INSERT INTO ft2 (c1,c2,c3) -- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) -- WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 -- RETURNING ft2.*, ft4.*, ft5.*; ---Testcase 398: +--Testcase 457: EXPLAIN (verbose, costs off) DELETE FROM ft2 USING ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; -- can't be pushed down ---Testcase 399: +--Testcase 458: SELECT ft2.c1, ft2.c2, ft2.c3 FROM ft2, ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; ---Testcase 400: +--Testcase 459: DELETE FROM ft2 USING ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; ---Testcase 401: +--Testcase 460: SELECT ft2.c1, ft2.c2, ft2.c3 FROM ft2, ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1) WHERE ft2.c1 > 2000 AND ft2.c2 = ft4.c1; ---Testcase 402: +--Testcase 461: DELETE FROM ft2 WHERE ft2.c1 > 2000; -- Test that trigger on remote table works as expected ---Testcase 403: +--Testcase 462: CREATE OR REPLACE FUNCTION "S 1".F_BRTRIG() RETURNS trigger AS $$ BEGIN NEW.c3 = NEW.c3 || '_trig_update'; RETURN NEW; END; $$ LANGUAGE plpgsql; ---Testcase 404: +--Testcase 463: CREATE TRIGGER t1_br_insert BEFORE INSERT OR UPDATE ON "S 1"."T 1" FOR EACH ROW EXECUTE PROCEDURE "S 1".F_BRTRIG(); ---Testcase 405: +--Testcase 464: INSERT INTO ft2 (c1,c2,c3) VALUES (1208, 818, 'fff'); ---Testcase 406: +--Testcase 465: SELECT c1, c2, c3, c6, c7, c8 FROM ft2 WHERE c1 = 1208; ---Testcase 407: +--Testcase 466: INSERT INTO ft2 (c1,c2,c3,c6) VALUES (1218, 818, 'ggg', '(--;'); ---Testcase 408: +--Testcase 467: SELECT c1, c2, c3, c6, c7, c8 FROM ft2 WHERE c1 = 1218; --UPDATE ft2 SET c2 = c2 + 600 WHERE c1 % 10 = 8 AND c1 < 1200 RETURNING *; -- Test errors thrown on remote side during update +--Testcase 468: ALTER TABLE "S 1"."T 1" ADD CONSTRAINT c2positive CHECK (c2 >= 0); -- influxdb_fdw does not support key, ON CONFLICT --INSERT INTO ft1(c1, c2) VALUES(11, 12); -- duplicate key ---Testcase 409: +--Testcase 469: INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT DO NOTHING; -- works ---Testcase 410: +--Testcase 470: INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO NOTHING; -- unsupported ---Testcase 411: +--Testcase 471: INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO UPDATE SET c3 = 'ffg'; -- unsupported --INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive --UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive @@ -1707,19 +1920,19 @@ select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; -- Above DMLs add data with c6 as NULL in ft1, so test ORDER BY NULLS LAST and NULLs -- FIRST behavior here. -- ORDER BY DESC NULLS LAST options ---Testcase 412: +--Testcase 472: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY c6 DESC NULLS LAST, c1 OFFSET 795 LIMIT 10; ---Testcase 413: +--Testcase 473: SELECT c1, c2, c3, c6, c7, c8 FROM ft1 ORDER BY c6 DESC NULLS LAST, c1 OFFSET 795 LIMIT 10; -- ORDER BY DESC NULLS FIRST options ---Testcase 414: +--Testcase 474: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY c6 DESC NULLS FIRST, c1 OFFSET 15 LIMIT 10; ---Testcase 415: +--Testcase 475: SELECT c1, c2, c3, c6, c7, c8 FROM ft1 ORDER BY c6 DESC NULLS FIRST, c1 OFFSET 15 LIMIT 10; -- ORDER BY ASC NULLS FIRST options ---Testcase 416: +--Testcase 476: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY c6 ASC NULLS FIRST, c1 OFFSET 15 LIMIT 10; ---Testcase 417: +--Testcase 477: SELECT c1, c2, c3, c6, c7, c8 FROM ft1 ORDER BY c6 ASC NULLS FIRST, c1 OFFSET 15 LIMIT 10; -- =================================================================== @@ -1727,39 +1940,47 @@ SELECT c1, c2, c3, c6, c7, c8 FROM ft1 ORDER BY c6 ASC NULLS FIRST, c1 OFFSET 15 -- =================================================================== -- Consistent check constraints provide consistent results +--Testcase 478: ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2positive CHECK (c2 >= 0); ---Testcase 418: +--Testcase 479: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 < 0; -- InfluxDB return null value because it does not have any record. ---Testcase 419: +--Testcase 480: SELECT count(*) FROM ft1 WHERE c2 < 0; +--Testcase 481: SET constraint_exclusion = 'on'; ---Testcase 420: +--Testcase 482: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 < 0; ---Testcase 421: +--Testcase 483: SELECT count(*) FROM ft1 WHERE c2 < 0; +--Testcase 484: RESET constraint_exclusion; -- check constraint is enforced on the remote side, not locally -- INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive -- UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive +--Testcase 485: ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2positive; -- But inconsistent check constraints provide inconsistent results +--Testcase 486: ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2negative CHECK (c2 < 0); ---Testcase 422: +--Testcase 487: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 >= 0; ---Testcase 423: +--Testcase 488: SELECT count(*) FROM ft1 WHERE c2 >= 0; +--Testcase 489: SET constraint_exclusion = 'on'; ---Testcase 424: +--Testcase 490: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 >= 0; ---Testcase 425: +--Testcase 491: SELECT count(*) FROM ft1 WHERE c2 >= 0; +--Testcase 492: RESET constraint_exclusion; -- local check constraint is not actually enforced ---Testcase 426: +--Testcase 493: INSERT INTO ft1(c1, c2) VALUES(1111, 2); -- UPDATE ft1 SET c2 = c2 + 1 WHERE c1 = 1; +--Testcase 494: ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2negative; -- influxdb_fdw does not support this feature @@ -1767,34 +1988,34 @@ ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2negative; -- test WITH CHECK OPTION constraints -- =================================================================== ---Testcase 427: +--Testcase 495: CREATE FUNCTION row_before_insupd_trigfunc() RETURNS trigger AS $$BEGIN NEW.a := NEW.a + 10; RETURN NEW; END$$ LANGUAGE plpgsql; ---Testcase 428: +--Testcase 496: CREATE FOREIGN TABLE base_tbl (a int, b int) SERVER influxdb_svr OPTIONS (table 'base_tbl'); --ALTER FOREIGN TABLE base_tbl SET (autovacuum_enabled = 'false'); ---Testcase 429: +--Testcase 497: CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON base_tbl FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); ---Testcase 430: +--Testcase 498: CREATE FOREIGN TABLE foreign_tbl (a int, b int) SERVER influxdb_svr OPTIONS (table 'base_tbl'); ---Testcase 431: +--Testcase 499: CREATE VIEW rw_view AS SELECT * FROM base_tbl WHERE a < b WITH CHECK OPTION; ---Testcase 432: +--Testcase 500: \d+ rw_view ---Testcase 433: +--Testcase 501: EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO rw_view VALUES (0, 5); ---Testcase 434: +--Testcase 502: INSERT INTO rw_view VALUES (0, 5); -- should fail ---Testcase 435: +--Testcase 503: EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO rw_view VALUES (0, 15); ---Testcase 436: +--Testcase 504: INSERT INTO rw_view VALUES (0, 15); -- ok ---Testcase 437: +--Testcase 505: SELECT * FROM foreign_tbl; --EXPLAIN (VERBOSE, COSTS OFF) @@ -1805,47 +2026,65 @@ SELECT * FROM foreign_tbl; --UPDATE rw_view SET b = b + 15; -- ok --SELECT * FROM foreign_tbl; ---Testcase 438: +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +--Testcase 827: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); +--Testcase 828: +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +--Testcase 829: +SELECT * FROM foreign_tbl; +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); + +--Testcase 506: DELETE FROM foreign_tbl; +--Testcase 784: DROP FOREIGN TABLE foreign_tbl CASCADE; ---Testcase 439: +--Testcase 507: DROP TRIGGER row_before_insupd_trigger ON base_tbl; ---Testcase 440: +--Testcase 508: DROP FOREIGN TABLE base_tbl CASCADE; -- influxdb_fdw does not support partitions -- test WCO for partitions ---Testcase 441: +--Testcase 509: CREATE FOREIGN TABLE child_tbl (a int, b int) SERVER influxdb_svr OPTIONS (table 'child_tbl'); --ALTER FOREIGN TABLE child_tbl SET (autovacuum_enabled = 'false'); ---Testcase 442: +--Testcase 510: CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON child_tbl FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); ---Testcase 443: +--Testcase 511: CREATE FOREIGN TABLE foreign_tbl (a int, b int) SERVER influxdb_svr OPTIONS (table 'child_tbl'); ---Testcase 444: +--Testcase 512: CREATE TABLE parent_tbl (a int, b int) PARTITION BY RANGE(a); +--Testcase 513: +ALTER TABLE parent_tbl ATTACH PARTITION child_tbl FOR VALUES FROM (0) TO (100); +-- Detach and re-attach once, to stress the concurrent detach case. +--Testcase 774: +ALTER TABLE parent_tbl DETACH PARTITION child_tbl CONCURRENTLY; +--Testcase 775: ALTER TABLE parent_tbl ATTACH PARTITION child_tbl FOR VALUES FROM (0) TO (100); ---Testcase 445: +--Testcase 514: CREATE VIEW rw_view AS SELECT * FROM parent_tbl WHERE a < b WITH CHECK OPTION; ---Testcase 446: +--Testcase 515: \d+ rw_view ---Testcase 447: +--Testcase 516: EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO rw_view VALUES (0, 5); ---Testcase 448: +--Testcase 517: INSERT INTO rw_view VALUES (0, 5); -- should fail ---Testcase 449: +--Testcase 518: EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO rw_view VALUES (0, 15); ---Testcase 450: +--Testcase 519: INSERT INTO rw_view VALUES (0, 15); -- ok ---Testcase 451: +--Testcase 520: SELECT * FROM foreign_tbl; --EXPLAIN (VERBOSE, COSTS OFF) @@ -1856,72 +2095,118 @@ SELECT * FROM foreign_tbl; --UPDATE rw_view SET b = b + 15; -- ok --SELECT * FROM foreign_tbl; ---Testcase 452: +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +--Testcase 830: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); +--Testcase 831: +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +--Testcase 832: +SELECT * FROM foreign_tbl; +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); + +--Testcase 521: DROP FOREIGN TABLE foreign_tbl CASCADE; ---Testcase 453: +--Testcase 522: DROP TRIGGER row_before_insupd_trigger ON child_tbl; ---Testcase 454: +--Testcase 523: DROP FOREIGN TABLE child_tbl CASCADE; ---Testcase 455: +--Testcase 524: DROP TABLE parent_tbl CASCADE; ---Testcase 456: +--Testcase 525: DROP FUNCTION row_before_insupd_trigfunc; -- =================================================================== -- test serial columns (ie, sequence-based defaults) -- =================================================================== ---Testcase 457: +--Testcase 526: create foreign table loc1 (f1 serial, f2 text) server influxdb_svr options(table 'loc1'); --alter foreign table loc1 set (autovacuum_enabled = 'false'); ---Testcase 458: +--Testcase 527: create foreign table rem1 (f1 serial, f2 text) server influxdb_svr options(table 'loc1'); ---Testcase 459: +--Testcase 528: select pg_catalog.setval('rem1_f1_seq', 10, false); ---Testcase 460: +--Testcase 529: insert into loc1(f2) values('hi'); ---Testcase 461: +--Testcase 530: insert into rem1(f2) values('hi remote'); ---Testcase 462: +--Testcase 531: insert into loc1(f2) values('bye'); ---Testcase 463: +--Testcase 532: insert into rem1(f2) values('bye remote'); ---Testcase 464: +--Testcase 533: select * from loc1; ---Testcase 465: +--Testcase 534: select * from rem1; -- =================================================================== -- test generated columns -- =================================================================== ---Testcase 466: -create foreign table gloc1 (a int, b int generated always as (a * 2) stored) +--Testcase 535: +create foreign table gloc1 ( + a int, + b int generated always as (a * 2) stored) server influxdb_svr options(table 'gloc1'); --alter foreign table gloc1 set (autovacuum_enabled = 'false'); ---Testcase 467: +--Testcase 536: create foreign table grem1 ( a int, b int generated always as (a * 2) stored) server influxdb_svr options(table 'gloc1'); ---Testcase 468: +--Testcase 537: +explain (verbose, costs off) insert into grem1 (a) values (1), (22); +--Testcase 765: +insert into grem1 (a) values (1), (22); +--explain (verbose, costs off) --update grem1 set a = 22 where a = 2; ---Testcase 469: +--update grem1 set a = 22 where a = 2; +--Testcase 538: +select * from gloc1; +--Testcase 539: +select * from grem1; +--Testcase 766: +delete from grem1; + +/* +-- InfluxDB FDW does not support partition insert +-- test copy from +copy grem1 from stdin; +1 +2 +\. select * from gloc1; ---Testcase 470: select * from grem1; +delete from grem1; +*/ --- Clean up: +-- test batch insert +--Testcase 767: +alter server influxdb_svr options (add batch_size '10'); +--Testcase 768: +explain (verbose, costs off) +insert into grem1 (a) values (1), (2); +--Testcase 769: +insert into grem1 (a) values (1), (2); +--Testcase 770: +select * from gloc1; +--Testcase 771: +select * from grem1; +--Testcase 772: delete from grem1; +--Testcase 773: +alter server influxdb_svr options (drop batch_size); -- =================================================================== -- test local triggers -- =================================================================== -- Trigger functions "borrowed" from triggers regress test. ---Testcase 471: +--Testcase 540: CREATE FUNCTION trigger_func() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN RAISE NOTICE 'trigger_func(%) called: action = %, when = %, level = %', @@ -1929,14 +2214,14 @@ BEGIN RETURN NULL; END;$$; ---Testcase 472: +--Testcase 541: CREATE TRIGGER trig_stmt_before BEFORE DELETE OR INSERT OR UPDATE ON rem1 FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---Testcase 473: +--Testcase 542: CREATE TRIGGER trig_stmt_after AFTER DELETE OR INSERT OR UPDATE ON rem1 FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---Testcase 474: +--Testcase 543: CREATE OR REPLACE FUNCTION trigger_data() RETURNS trigger LANGUAGE plpgsql AS $$ @@ -1977,71 +2262,71 @@ end; $$; -- Test basic functionality ---Testcase 475: +--Testcase 544: CREATE TRIGGER trig_row_before BEFORE INSERT OR UPDATE OR DELETE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 476: +--Testcase 545: CREATE TRIGGER trig_row_after AFTER INSERT OR UPDATE OR DELETE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 477: +--Testcase 546: delete from rem1; ---Testcase 478: +--Testcase 547: insert into rem1 values(1,'insert'); --update rem1 set f2 = 'update' where f1 = 1; --update rem1 set f2 = f2 || f2; -- cleanup ---Testcase 479: +--Testcase 548: DROP TRIGGER trig_row_before ON rem1; ---Testcase 480: +--Testcase 549: DROP TRIGGER trig_row_after ON rem1; ---Testcase 481: +--Testcase 550: DROP TRIGGER trig_stmt_before ON rem1; ---Testcase 482: +--Testcase 551: DROP TRIGGER trig_stmt_after ON rem1; ---Testcase 483: +--Testcase 552: DELETE from rem1; -- Test multiple AFTER ROW triggers on a foreign table ---Testcase 484: +--Testcase 553: CREATE TRIGGER trig_row_after1 AFTER INSERT OR UPDATE OR DELETE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 485: +--Testcase 554: CREATE TRIGGER trig_row_after2 AFTER INSERT OR UPDATE OR DELETE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 486: +--Testcase 555: insert into rem1 values(1,'insert'); --update rem1 set f2 = 'update' where f1 = 1; --update rem1 set f2 = f2 || f2; ---Testcase 487: +--Testcase 556: delete from rem1; -- cleanup ---Testcase 488: +--Testcase 557: DROP TRIGGER trig_row_after1 ON rem1; ---Testcase 489: +--Testcase 558: DROP TRIGGER trig_row_after2 ON rem1; -- Test WHEN conditions ---Testcase 490: +--Testcase 559: CREATE TRIGGER trig_row_before_insupd BEFORE INSERT OR UPDATE ON rem1 FOR EACH ROW WHEN (NEW.f2 like '%update%') EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 491: +--Testcase 560: CREATE TRIGGER trig_row_after_insupd AFTER INSERT OR UPDATE ON rem1 FOR EACH ROW @@ -2049,23 +2334,23 @@ WHEN (NEW.f2 like '%update%') EXECUTE PROCEDURE trigger_data(23,'skidoo'); -- Insert or update not matching: nothing happens ---Testcase 492: +--Testcase 561: INSERT INTO rem1 values(1, 'insert'); --UPDATE rem1 set f2 = 'test'; -- Insert or update matching: triggers are fired ---Testcase 493: +--Testcase 562: INSERT INTO rem1 values(2, 'update'); --UPDATE rem1 set f2 = 'update update' where f1 = '2'; ---Testcase 494: +--Testcase 563: CREATE TRIGGER trig_row_before_delete BEFORE DELETE ON rem1 FOR EACH ROW WHEN (OLD.f2 like '%update%') EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 495: +--Testcase 564: CREATE TRIGGER trig_row_after_delete AFTER DELETE ON rem1 FOR EACH ROW @@ -2073,23 +2358,23 @@ WHEN (OLD.f2 like '%update%') EXECUTE PROCEDURE trigger_data(23,'skidoo'); -- Trigger is fired for f1=2, not for f1=1 ---Testcase 496: +--Testcase 565: DELETE FROM rem1; -- cleanup ---Testcase 497: +--Testcase 566: DROP TRIGGER trig_row_before_insupd ON rem1; ---Testcase 498: +--Testcase 567: DROP TRIGGER trig_row_after_insupd ON rem1; ---Testcase 499: +--Testcase 568: DROP TRIGGER trig_row_before_delete ON rem1; ---Testcase 500: +--Testcase 569: DROP TRIGGER trig_row_after_delete ON rem1; -- Test various RETURN statements in BEFORE triggers. ---Testcase 501: +--Testcase 570: CREATE FUNCTION trig_row_before_insupdate() RETURNS TRIGGER AS $$ BEGIN NEW.f2 := NEW.f2 || ' triggered !'; @@ -2097,21 +2382,21 @@ CREATE FUNCTION trig_row_before_insupdate() RETURNS TRIGGER AS $$ END $$ language plpgsql; ---Testcase 502: +--Testcase 571: CREATE TRIGGER trig_row_before_insupd BEFORE INSERT OR UPDATE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); -- The new values should have 'triggered' appended ---Testcase 503: +--Testcase 572: INSERT INTO rem1 values(1, 'insert'); ---Testcase 504: +--Testcase 573: SELECT * from loc1; ---Testcase 505: +--Testcase 574: INSERT INTO rem1 values(2, 'insert'); ---Testcase 506: +--Testcase 575: SELECT f2 FROM rem1 WHERE f1 = 2; ---Testcase 507: +--Testcase 576: SELECT * from loc1; --UPDATE rem1 set f2 = ''; --SELECT * from loc1; @@ -2123,350 +2408,386 @@ SELECT * from loc1; --UPDATE rem1 set f1 = 10; --SELECT * from loc1; ---Testcase 508: +--Testcase 577: DELETE FROM rem1; -- Add a second trigger, to check that the changes are propagated correctly -- from trigger to trigger ---Testcase 509: +--Testcase 578: CREATE TRIGGER trig_row_before_insupd2 BEFORE INSERT OR UPDATE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); ---Testcase 510: +--Testcase 579: INSERT INTO rem1 values(1, 'insert'); ---Testcase 511: +--Testcase 580: SELECT * from loc1; ---Testcase 512: +--Testcase 581: INSERT INTO rem1 values(2, 'insert'); ---Testcase 513: +--Testcase 582: SELECT f2 FROM rem1 WHERE f1 = 2; ---Testcase 514: +--Testcase 583: SELECT * from loc1; --UPDATE rem1 set f2 = ''; --SELECT * from loc1; --UPDATE rem1 set f2 = 'skidoo' RETURNING f2; --SELECT * from loc1; ---Testcase 515: +--Testcase 584: DROP TRIGGER trig_row_before_insupd ON rem1; ---Testcase 516: +--Testcase 585: DROP TRIGGER trig_row_before_insupd2 ON rem1; ---Testcase 517: +--Testcase 586: DELETE from rem1; ---Testcase 518: +--Testcase 587: INSERT INTO rem1 VALUES (1, 'test'); -- Test with a trigger returning NULL ---Testcase 519: +--Testcase 588: CREATE FUNCTION trig_null() RETURNS TRIGGER AS $$ BEGIN RETURN NULL; END $$ language plpgsql; ---Testcase 520: +--Testcase 589: CREATE TRIGGER trig_null BEFORE INSERT OR UPDATE OR DELETE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trig_null(); -- Nothing should have changed. ---Testcase 521: +--Testcase 590: INSERT INTO rem1 VALUES (2, 'test2'); ---Testcase 522: +--Testcase 591: SELECT * from loc1; --UPDATE rem1 SET f2 = 'test2'; --SELECT * from loc1; ---Testcase 523: +--Testcase 592: DELETE from rem1; ---Testcase 524: +--Testcase 593: SELECT * from loc1; ---Testcase 525: +--Testcase 594: DROP TRIGGER trig_null ON rem1; ---Testcase 526: +--Testcase 595: DELETE from rem1; -- Test a combination of local and remote triggers ---Testcase 527: +--Testcase 596: CREATE TRIGGER trig_row_before BEFORE INSERT OR UPDATE OR DELETE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 528: +--Testcase 597: CREATE TRIGGER trig_row_after AFTER INSERT OR UPDATE OR DELETE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 529: +--Testcase 598: CREATE TRIGGER trig_local_before BEFORE INSERT OR UPDATE ON loc1 FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); ---Testcase 530: +--Testcase 599: INSERT INTO rem1(f2) VALUES ('test'); --UPDATE rem1 SET f2 = 'testo'; -- Test returning a system attribute ---Testcase 531: +--Testcase 600: INSERT INTO rem1(f2) VALUES ('test'); ---Testcase 532: +--Testcase 601: SELECT * FROM rem1 WHERE f2 = 'test'; -- cleanup ---Testcase 533: +--Testcase 602: DROP TRIGGER trig_row_before ON rem1; ---Testcase 534: +--Testcase 603: DROP TRIGGER trig_row_after ON rem1; ---Testcase 535: +--Testcase 604: DROP TRIGGER trig_local_before ON loc1; -- Test direct foreign table modification functionality +--Testcase 774: +EXPLAIN (verbose, costs off) +DELETE FROM rem1; -- can be pushed down +--Testcase 775: +EXPLAIN (verbose, costs off) +DELETE FROM rem1 WHERE false; -- currently can't be pushed down -- Test with statement-level triggers ---Testcase 536: +--Testcase 605: CREATE TRIGGER trig_stmt_before BEFORE DELETE OR INSERT OR UPDATE ON rem1 FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 537: +--Testcase 606: EXPLAIN (verbose, costs off) DELETE FROM rem1; -- can be pushed down ---Testcase 538: +--Testcase 607: DROP TRIGGER trig_stmt_before ON rem1; ---Testcase 539: +--Testcase 608: CREATE TRIGGER trig_stmt_after AFTER DELETE OR INSERT OR UPDATE ON rem1 FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 540: +--Testcase 609: EXPLAIN (verbose, costs off) DELETE FROM rem1; -- can be pushed down ---Testcase 541: +--Testcase 610: DROP TRIGGER trig_stmt_after ON rem1; -- Test with row-level ON INSERT triggers ---Testcase 542: +--Testcase 611: CREATE TRIGGER trig_row_before_insert BEFORE INSERT ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 543: +--Testcase 612: EXPLAIN (verbose, costs off) DELETE FROM rem1; -- can be pushed down ---Testcase 544: +--Testcase 613: DROP TRIGGER trig_row_before_insert ON rem1; ---Testcase 545: +--Testcase 614: CREATE TRIGGER trig_row_after_insert AFTER INSERT ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 546: +--Testcase 615: EXPLAIN (verbose, costs off) DELETE FROM rem1; -- can be pushed down ---Testcase 547: +--Testcase 616: DROP TRIGGER trig_row_after_insert ON rem1; -- Test with row-level ON UPDATE triggers ---Testcase 548: +--Testcase 617: CREATE TRIGGER trig_row_before_update BEFORE UPDATE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can't be pushed down ---Testcase 549: +--Testcase 618: EXPLAIN (verbose, costs off) DELETE FROM rem1; -- can be pushed down ---Testcase 550: +--Testcase 619: DROP TRIGGER trig_row_before_update ON rem1; ---Testcase 551: +--Testcase 620: CREATE TRIGGER trig_row_after_update AFTER UPDATE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can't be pushed down ---Testcase 552: +--Testcase 621: EXPLAIN (verbose, costs off) DELETE FROM rem1; -- can be pushed down ---Testcase 553: +--Testcase 622: DROP TRIGGER trig_row_after_update ON rem1; -- Test with row-level ON DELETE triggers ---Testcase 554: +--Testcase 623: CREATE TRIGGER trig_row_before_delete BEFORE DELETE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 555: +--Testcase 624: EXPLAIN (verbose, costs off) DELETE FROM rem1; -- can't be pushed down ---Testcase 556: +--Testcase 625: DROP TRIGGER trig_row_before_delete ON rem1; ---Testcase 557: +--Testcase 626: CREATE TRIGGER trig_row_after_delete AFTER DELETE ON rem1 FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 558: +--Testcase 627: EXPLAIN (verbose, costs off) DELETE FROM rem1; -- can't be pushed down ---Testcase 559: +--Testcase 628: DROP TRIGGER trig_row_after_delete ON rem1; -- =================================================================== -- test inheritance features -- =================================================================== ---Testcase 560: +--Testcase 629: CREATE TABLE a (aa TEXT); --CREATE TABLE loct (aa TEXT, bb TEXT); +--Testcase 630: ALTER TABLE a SET (autovacuum_enabled = 'false'); --ALTER TABLE loct SET (autovacuum_enabled = 'false'); -- Because influxdb_fdw does not support UPDATE, to test locally -- we create local table. ---Testcase 561: +--Testcase 631: CREATE TABLE b (bb TEXT) INHERITS (a); ---Testcase 562: +--Testcase 632: INSERT INTO a(aa) VALUES('aaa'); ---Testcase 563: +--Testcase 633: INSERT INTO a(aa) VALUES('aaaa'); ---Testcase 564: +--Testcase 634: INSERT INTO a(aa) VALUES('aaaaa'); ---Testcase 565: +--Testcase 635: INSERT INTO b(aa) VALUES('bbb'); ---Testcase 566: +--Testcase 636: INSERT INTO b(aa) VALUES('bbbb'); ---Testcase 567: +--Testcase 637: INSERT INTO b(aa) VALUES('bbbbb'); ---Testcase 568: +--Testcase 638: SELECT tableoid::regclass, * FROM a; ---Testcase 569: +--Testcase 639: SELECT tableoid::regclass, * FROM b; ---Testcase 570: +--Testcase 640: SELECT tableoid::regclass, * FROM ONLY a; ---Testcase 571: +--Testcase 641: UPDATE a SET aa = 'zzzzzz' WHERE aa LIKE 'aaaa%'; ---Testcase 572: +--Testcase 642: SELECT tableoid::regclass, * FROM a; ---Testcase 573: +--Testcase 643: SELECT tableoid::regclass, * FROM b; ---Testcase 574: +--Testcase 644: SELECT tableoid::regclass, * FROM ONLY a; ---Testcase 575: +--Testcase 645: UPDATE b SET aa = 'new'; ---Testcase 576: +--Testcase 646: SELECT tableoid::regclass, * FROM a; ---Testcase 577: +--Testcase 647: SELECT tableoid::regclass, * FROM b; ---Testcase 578: +--Testcase 648: SELECT tableoid::regclass, * FROM ONLY a; ---Testcase 579: +--Testcase 649: UPDATE a SET aa = 'newtoo'; ---Testcase 580: +--Testcase 650: SELECT tableoid::regclass, * FROM a; ---Testcase 581: +--Testcase 651: SELECT tableoid::regclass, * FROM b; ---Testcase 582: +--Testcase 652: SELECT tableoid::regclass, * FROM ONLY a; ---Testcase 583: +--Testcase 653: DELETE FROM a; ---Testcase 584: +--Testcase 654: SELECT tableoid::regclass, * FROM a; ---Testcase 585: +--Testcase 655: SELECT tableoid::regclass, * FROM b; ---Testcase 586: +--Testcase 656: SELECT tableoid::regclass, * FROM ONLY a; ---Testcase 587: +--Testcase 657: DROP TABLE a CASCADE; --DROP TABLE loct; -- Check SELECT FOR UPDATE/SHARE with an inherited source table ---Testcase 588: +--Testcase 658: create foreign table loct1 (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct1'); ---Testcase 589: +--Testcase 659: create foreign table loct2 (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct2'); --alter table loct1 set (autovacuum_enabled = 'false'); --alter table loct2 set (autovacuum_enabled = 'false'); ---Testcase 590: +--Testcase 660: create foreign table foo (f1 int, f2 int) server influxdb_svr options (table 'foo'); ---Testcase 591: +--Testcase 661: create foreign table foo2 (f3 int) inherits (foo) server influxdb_svr options (table 'loct1'); ---Testcase 592: +--Testcase 662: create foreign table bar (f1 int, f2 int) server influxdb_svr options (table 'bar'); ---Testcase 593: +--Testcase 663: create foreign table bar2 (f3 int) inherits (bar) server influxdb_svr options (table 'loct2'); --alter table foo set (autovacuum_enabled = 'false'); --alter table bar set (autovacuum_enabled = 'false'); ---Testcase 594: +--Testcase 664: insert into foo values(1,1); ---Testcase 595: +--Testcase 665: insert into foo values(3,3); ---Testcase 596: +--Testcase 666: insert into foo2 values(2,2,2); ---Testcase 597: +--Testcase 667: insert into foo2 values(4,4,4); ---Testcase 598: +--Testcase 668: insert into bar values(1,11); ---Testcase 599: +--Testcase 669: insert into bar values(2,22); ---Testcase 600: +--Testcase 670: insert into bar values(6,66); ---Testcase 601: +--Testcase 671: insert into bar2 values(3,33,33); ---Testcase 602: +--Testcase 672: insert into bar2 values(4,44,44); ---Testcase 603: +--Testcase 673: insert into bar2 values(7,77,77); ---Testcase 604: +--Testcase 674: explain (verbose, costs off) select * from bar where f1 in (select f1 from foo); ---Testcase 605: +--Testcase 675: select * from bar where f1 in (select f1 from foo); ---Testcase 606: +--Testcase 676: explain (verbose, costs off) select * from bar where f1 in (select f1 from foo); ---Testcase 607: +--Testcase 677: select * from bar where f1 in (select f1 from foo); +-- Now check SELECT FOR UPDATE/SHARE with an inherited source table, +-- where the parent is itself a foreign table +--Testcase 678: +create foreign table foo2child (f3 int) inherits (foo2) + server influxdb_svr options (table 'loct4'); + +--Testcase 679: +explain (verbose, costs off) +select * from bar where f1 in (select f1 from foo2) for share; +--Testcase 680: +select * from bar where f1 in (select f1 from foo2) for share; + +--Testcase 681: +drop foreign table foo2child; + +-- And with a local child relation of the foreign table parent +--Testcase 682: +create foreign table foo2child (f3 int) inherits (foo2) + server influxdb_svr options (table 'foo2child'); + +--Testcase 683: +explain (verbose, costs off) +select * from bar where f1 in (select f1 from foo2) for share; +--Testcase 684: +select * from bar where f1 in (select f1 from foo2) for share; + +--Testcase 685: +drop foreign table foo2child; + /* -- influxdb_fdw does not support UPDATE -- Check UPDATE with inherited target and an inherited source table @@ -2932,47 +3253,158 @@ select * from rem3; drop foreign table rem3; drop table loc3; */ + +/* +-- Skip test because influxdb does not support TRUNCATE +-- =================================================================== +-- test for TRUNCATE +-- =================================================================== +CREATE TABLE tru_rtable0 (id int primary key); +CREATE FOREIGN TABLE tru_ftable (id int) + SERVER loopback OPTIONS (table_name 'tru_rtable0'); +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(1,10) x); + +CREATE TABLE tru_ptable (id int) PARTITION BY HASH(id); +CREATE TABLE tru_ptable__p0 PARTITION OF tru_ptable + FOR VALUES WITH (MODULUS 2, REMAINDER 0); +CREATE TABLE tru_rtable1 (id int primary key); +CREATE FOREIGN TABLE tru_ftable__p1 PARTITION OF tru_ptable + FOR VALUES WITH (MODULUS 2, REMAINDER 1) + SERVER loopback OPTIONS (table_name 'tru_rtable1'); +INSERT INTO tru_ptable (SELECT x FROM generate_series(11,20) x); + +CREATE TABLE tru_pk_table(id int primary key); +CREATE TABLE tru_fk_table(fkey int references tru_pk_table(id)); +INSERT INTO tru_pk_table (SELECT x FROM generate_series(1,10) x); +INSERT INTO tru_fk_table (SELECT x % 10 + 1 FROM generate_series(5,25) x); +CREATE FOREIGN TABLE tru_pk_ftable (id int) + SERVER loopback OPTIONS (table_name 'tru_pk_table'); + +CREATE TABLE tru_rtable_parent (id int); +CREATE TABLE tru_rtable_child (id int); +CREATE FOREIGN TABLE tru_ftable_parent (id int) + SERVER loopback OPTIONS (table_name 'tru_rtable_parent'); +CREATE FOREIGN TABLE tru_ftable_child () INHERITS (tru_ftable_parent) + SERVER loopback OPTIONS (table_name 'tru_rtable_child'); +INSERT INTO tru_rtable_parent (SELECT x FROM generate_series(1,8) x); +INSERT INTO tru_rtable_child (SELECT x FROM generate_series(10, 18) x); + +-- normal truncate +SELECT sum(id) FROM tru_ftable; -- 55 +TRUNCATE tru_ftable; +SELECT count(*) FROM tru_rtable0; -- 0 +SELECT count(*) FROM tru_ftable; -- 0 + +-- 'truncatable' option +ALTER SERVER loopback OPTIONS (ADD truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER FOREIGN TABLE tru_ftable OPTIONS (ADD truncatable 'true'); +TRUNCATE tru_ftable; -- accepted +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER SERVER loopback OPTIONS (DROP truncatable); +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'true'); +TRUNCATE tru_ftable; -- accepted + +-- partitioned table with both local and foreign tables as partitions +SELECT sum(id) FROM tru_ptable; -- 155 +TRUNCATE tru_ptable; +SELECT count(*) FROM tru_ptable; -- 0 +SELECT count(*) FROM tru_ptable__p0; -- 0 +SELECT count(*) FROM tru_ftable__p1; -- 0 +SELECT count(*) FROM tru_rtable1; -- 0 + +-- 'CASCADE' option +SELECT sum(id) FROM tru_pk_ftable; -- 55 +TRUNCATE tru_pk_ftable; -- failed by FK reference +TRUNCATE tru_pk_ftable CASCADE; +SELECT count(*) FROM tru_pk_ftable; -- 0 +SELECT count(*) FROM tru_fk_table; -- also truncated,0 + +-- truncate two tables at a command +INSERT INTO tru_ftable (SELECT x FROM generate_series(1,8) x); +INSERT INTO tru_pk_ftable (SELECT x FROM generate_series(3,10) x); +SELECT count(*) from tru_ftable; -- 8 +SELECT count(*) from tru_pk_ftable; -- 8 +TRUNCATE tru_ftable, tru_pk_ftable CASCADE; +SELECT count(*) from tru_ftable; -- 0 +SELECT count(*) from tru_pk_ftable; -- 0 + +-- truncate with ONLY clause +-- Since ONLY is specified, the table tru_ftable_child that inherits +-- tru_ftable_parent locally is not truncated. +TRUNCATE ONLY tru_ftable_parent; +SELECT sum(id) FROM tru_ftable_parent; -- 126 +TRUNCATE tru_ftable_parent; +SELECT count(*) FROM tru_ftable_parent; -- 0 + +-- in case when remote table has inherited children +CREATE TABLE tru_rtable0_child () INHERITS (tru_rtable0); +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(5,9) x); +INSERT INTO tru_rtable0_child (SELECT x FROM generate_series(10,14) x); +SELECT sum(id) FROM tru_ftable; -- 95 + +-- Both parent and child tables in the foreign server are truncated +-- even though ONLY is specified because ONLY has no effect +-- when truncating a foreign table. +TRUNCATE ONLY tru_ftable; +SELECT count(*) FROM tru_ftable; -- 0 + +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(21,25) x); +INSERT INTO tru_rtable0_child (SELECT x FROM generate_series(26,30) x); +SELECT sum(id) FROM tru_ftable; -- 255 +TRUNCATE tru_ftable; -- truncate both of parent and child +SELECT count(*) FROM tru_ftable; -- 0 + +-- cleanup +DROP FOREIGN TABLE tru_ftable_parent, tru_ftable_child, tru_pk_ftable,tru_ftable__p1,tru_ftable; +DROP TABLE tru_rtable0, tru_rtable1, tru_ptable, tru_ptable__p0, tru_pk_table, tru_fk_table, +tru_rtable_parent,tru_rtable_child, tru_rtable0_child; +*/ + -- =================================================================== -- test IMPORT FOREIGN SCHEMA -- =================================================================== ---Testcase 608: +--Testcase 686: CREATE SCHEMA import_influx1; IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx1; ---Testcase 609: +--Testcase 687: \det+ import_influx1.* ---Testcase 610: +--Testcase 688: \d import_influx1.* -- Options ---Testcase 611: +--Testcase 689: CREATE SCHEMA import_influx2; IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx2 OPTIONS (import_default 'true'); ---Testcase 612: +--Testcase 690: \det+ import_influx2.* ---Testcase 613: +--Testcase 691: \d import_influx2.* ---Testcase 614: +--Testcase 692: CREATE SCHEMA import_influx3; IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx3 OPTIONS (import_collate 'false', import_not_null 'false'); ---Testcase 615: +--Testcase 693: \det+ import_influx3.* ---Testcase 616: +--Testcase 694: \d import_influx3.* -- Check LIMIT TO and EXCEPT ---Testcase 617: +--Testcase 695: CREATE SCHEMA import_influx4; IMPORT FOREIGN SCHEMA public LIMIT TO ("T1", loct, nonesuch) FROM SERVER influxdb_svr INTO import_influx4; ---Testcase 618: +--Testcase 696: \det+ import_influx4.* IMPORT FOREIGN SCHEMA public EXCEPT ("T1", loct, nonesuch) FROM SERVER influxdb_svr INTO import_influx4; ---Testcase 619: +--Testcase 697: \det+ import_influx4.* -- Assorted error cases @@ -3184,7 +3616,7 @@ $d$; CREATE USER MAPPING FOR public SERVER loopback_nopw; CREATE USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; -CREATE FOREIGN TABLE ft1_nopw ( +CREATE FOREIGN TABLE pg_temp.ft1_nopw ( c1 int NOT NULL, c2 int NOT NULL, c3 text, @@ -3195,7 +3627,7 @@ CREATE FOREIGN TABLE ft1_nopw ( c8 user_enum ) SERVER loopback_nopw OPTIONS (schema_name 'public', table_name 'ft1'); -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; -- If we add a password to the connstr it'll fail, because we don't allow passwords -- in connstrs only in user mappings. @@ -3213,13 +3645,13 @@ $d$; ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; -- Unpriv user cannot make the mapping passwordless ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password_required 'false'); -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; RESET ROLE; @@ -3229,7 +3661,7 @@ ALTER USER MAPPING FOR regress_nosuper SERVER loopback_nopw OPTIONS (ADD passwor SET ROLE regress_nosuper; -- Should finally work now -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; -- unpriv user also cannot set sslcert / sslkey on the user mapping -- first set password_required so we see the right error messages @@ -3243,13 +3675,13 @@ DROP USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; -- This will fail again as it'll resolve the user mapping for public, which -- lacks password_required=false -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; RESET ROLE; -- The user mapping for public is passwordless and lacks the password_required=false -- mapping option, but will work because the current user is a superuser. -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; -- cleanup DROP USER MAPPING FOR public SERVER loopback_nopw; @@ -3260,53 +3692,889 @@ DROP ROLE regress_nosuper; -- influxdb_fdw does not support transactions -- Two-phase transactions are not supported. --BEGIN; ---Testcase 620: +--Testcase 698: SELECT count(*) FROM ft1; -- error here --PREPARE TRANSACTION 'fdw_tpc'; --ROLLBACK; +/* +-- Influxdb_fdw does not use connection, and does not support connection functions +-- =================================================================== +-- reestablish new connection +-- =================================================================== + +-- Change application_name of remote connection to special one +-- so that we can easily terminate the connection later. +ALTER SERVER loopback OPTIONS (application_name 'fdw_retry_check'); + +-- If debug_discard_caches is active, it results in +-- dropping remote connections after every transaction, making it +-- impossible to test termination meaningfully. So turn that off +-- for this test. +SET debug_discard_caches = 0; + +-- Make sure we have a remote connection. +SELECT 1 FROM ft1 LIMIT 1; + +-- Terminate the remote connection and wait for the termination to complete. +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = 'fdw_retry_check'; + +-- This query should detect the broken connection when starting new remote +-- transaction, reestablish new connection, and then succeed. +BEGIN; +SELECT 1 FROM ft1 LIMIT 1; + +-- If we detect the broken connection when starting a new remote +-- subtransaction, we should fail instead of establishing a new connection. +-- Terminate the remote connection and wait for the termination to complete. +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = 'fdw_retry_check'; +SAVEPOINT s; +-- The text of the error might vary across platforms, so only show SQLSTATE. +\set VERBOSITY sqlstate +SELECT 1 FROM ft1 LIMIT 1; -- should fail +\set VERBOSITY default +COMMIT; + +RESET debug_discard_caches; + +-- ============================================================================= +-- test connection invalidation cases and postgres_fdw_get_connections function +-- ============================================================================= +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- This test case is for closing the connection in pgfdw_xact_callback +BEGIN; +-- Connection xact depth becomes 1 i.e. the connection is in midst of the xact. +SELECT 1 FROM ft1 LIMIT 1; +SELECT 1 FROM ft7 LIMIT 1; +-- List all the existing cached connections. loopback and loopback3 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Connections are not closed at the end of the alter and drop statements. +-- That's because the connections are in midst of this xact, +-- they are just marked as invalid in pgfdw_inval_callback. +ALTER SERVER loopback OPTIONS (ADD use_remote_estimate 'off'); +DROP SERVER loopback3 CASCADE; +-- List all the existing cached connections. loopback and loopback3 +-- should be output as invalid connections. Also the server name for +-- loopback3 should be NULL because the server was dropped. +SELECT * FROM postgres_fdw_get_connections() ORDER BY 1; +-- The invalid connections get closed in pgfdw_xact_callback during commit. +COMMIT; +-- All cached connections were closed while committing above xact, so no +-- records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- ======================================================================= +-- test postgres_fdw_disconnect and postgres_fdw_disconnect_all functions +-- ======================================================================= +BEGIN; +-- Ensure to cache loopback connection. +SELECT 1 FROM ft1 LIMIT 1; +-- Ensure to cache loopback2 connection. +SELECT 1 FROM ft6 LIMIT 1; +-- List all the existing cached connections. loopback and loopback2 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Issue a warning and return false as loopback connection is still in use and +-- can not be closed. +SELECT postgres_fdw_disconnect('loopback'); +-- List all the existing cached connections. loopback and loopback2 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Return false as connections are still in use, warnings are issued. +-- But disable warnings temporarily because the order of them is not stable. +SET client_min_messages = 'ERROR'; +SELECT postgres_fdw_disconnect_all(); +RESET client_min_messages; +COMMIT; +-- Ensure that loopback2 connection is closed. +SELECT 1 FROM postgres_fdw_disconnect('loopback2'); +SELECT server_name FROM postgres_fdw_get_connections() WHERE server_name = 'loopback2'; +-- Return false as loopback2 connection is closed already. +SELECT postgres_fdw_disconnect('loopback2'); +-- Return an error as there is no foreign server with given name. +SELECT postgres_fdw_disconnect('unknownserver'); +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- ============================================================================= +-- test case for having multiple cached connections for a foreign server +-- ============================================================================= +CREATE ROLE regress_multi_conn_user1 SUPERUSER; +CREATE ROLE regress_multi_conn_user2 SUPERUSER; +CREATE USER MAPPING FOR regress_multi_conn_user1 SERVER loopback; +CREATE USER MAPPING FOR regress_multi_conn_user2 SERVER loopback; + +BEGIN; +-- Will cache loopback connection with user mapping for regress_multi_conn_user1 +SET ROLE regress_multi_conn_user1; +SELECT 1 FROM ft1 LIMIT 1; +RESET ROLE; + +-- Will cache loopback connection with user mapping for regress_multi_conn_user2 +SET ROLE regress_multi_conn_user2; +SELECT 1 FROM ft1 LIMIT 1; +RESET ROLE; + +-- Should output two connections for loopback server +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +COMMIT; +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- Clean up +DROP USER MAPPING FOR regress_multi_conn_user1 SERVER loopback; +DROP USER MAPPING FOR regress_multi_conn_user2 SERVER loopback; +DROP ROLE regress_multi_conn_user1; +DROP ROLE regress_multi_conn_user2; + +-- =================================================================== +-- Test foreign server level option keep_connections +-- =================================================================== +-- By default, the connections associated with foreign server are cached i.e. +-- keep_connections option is on. Set it to off. +ALTER SERVER loopback OPTIONS (keep_connections 'off'); +-- connection to loopback server is closed at the end of xact +-- as keep_connections was set to off. +SELECT 1 FROM ft1 LIMIT 1; +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +ALTER SERVER loopback OPTIONS (SET keep_connections 'on'); +*/ + +-- =================================================================== +-- batch insert +-- =================================================================== + +BEGIN; + +--Testcase 699: +CREATE SERVER batch10 FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS(dbname 'postdb', :SERVER, batch_size '10' ); + +--Testcase 700: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=10']; + +--Testcase 701: +ALTER SERVER batch10 OPTIONS( SET batch_size '20' ); + +--Testcase 702: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=10']; + +--Testcase 703: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=20']; + +--Testcase 704: +CREATE FOREIGN TABLE table30 ( x int ) SERVER batch10 OPTIONS ( batch_size '30' ); + +--Testcase 705: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=30']; + +--Testcase 706: +ALTER FOREIGN TABLE table30 OPTIONS ( SET batch_size '40'); + +--Testcase 707: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=30']; + +--Testcase 708: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=40']; + +ROLLBACK; + +--Testcase 709: +CREATE FOREIGN TABLE batch_table ( x int ) SERVER influxdb_svr; +--Testcase 710: +CREATE FOREIGN TABLE ftable ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '10' ); +--Testcase 711: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable SELECT * FROM generate_series(1, 10) i; +--Testcase 712: +INSERT INTO ftable SELECT * FROM generate_series(1, 10) i; +--Testcase 713: +INSERT INTO ftable SELECT * FROM generate_series(11, 31) i; +--Testcase 714: +INSERT INTO ftable VALUES (32); +--Testcase 715: +INSERT INTO ftable VALUES (33), (34); +--Testcase 716: +SELECT COUNT(*) FROM ftable; +--Testcase 717: +DELETE FROM batch_table; +--Testcase 718: +DROP FOREIGN TABLE ftable; + +-- try if large batches exceed max number of bind parameters +--Testcase 719: +CREATE FOREIGN TABLE ftable ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '100000' ); +--Testcase 720: +INSERT INTO ftable SELECT * FROM generate_series(1, 70000) i; +--Testcase 721: +SELECT COUNT(*) FROM ftable; +--Testcase 722: +DELETE FROM batch_table; +--Testcase 723: +DROP FOREIGN TABLE ftable; + +-- Disable batch insert +--Testcase 724: +CREATE FOREIGN TABLE ftable ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '1' ); +--Testcase 725: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable VALUES (1), (2); +--Testcase 726: +INSERT INTO ftable VALUES (1), (2); +--Testcase 727: +SELECT COUNT(*) FROM ftable; + +-- Disable batch inserting into foreign tables with BEFORE ROW INSERT triggers +-- even if the batch_size option is enabled. +--Testcase 776: +ALTER FOREIGN TABLE ftable OPTIONS ( SET batch_size '10' ); +--Testcase 777: +CREATE TRIGGER trig_row_before BEFORE INSERT ON ftable +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 778: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable VALUES (3), (4); +--Testcase 779: +INSERT INTO ftable VALUES (3), (4); +--Testcase 780: +SELECT COUNT(*) FROM ftable; + +-- Clean up +--Testcase 781: +DROP TRIGGER trig_row_before ON ftable; + +--Testcase 728: +DROP FOREIGN TABLE ftable; +--Testcase 729: +DELETE FROM batch_table; +--Testcase 785: +DROP FOREIGN TABLE batch_table; + +-- influxdb_fdw does not support partition insert +-- Use partitioning +--Testcase 730: +CREATE TABLE batch_table ( x int ) PARTITION BY HASH (x); + +--Testcase 731: +CREATE TABLE batch_table_p0 (LIKE batch_table); +--Testcase 732: +CREATE FOREIGN TABLE batch_table_p0f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 0) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p0', batch_size '10'); + +--Testcase 733: +CREATE TABLE batch_table_p1 (LIKE batch_table); +--Testcase 734: +CREATE FOREIGN TABLE batch_table_p1f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 1) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p1', batch_size '1'); + +--Testcase 735: +CREATE TABLE batch_table_p2 + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 2); + +--Testcase 736: +INSERT INTO batch_table SELECT * FROM generate_series(1, 66) i; +--Testcase 737: +SELECT COUNT(*) FROM batch_table; + +-- Check that enabling batched inserts doesn't interfere with cross-partition +-- updates +--Testcase 738: +CREATE TABLE batch_cp_upd_test (a int) PARTITION BY LIST (a); +--Testcase 739: +CREATE TABLE batch_cp_upd_test1 (LIKE batch_cp_upd_test); +--Testcase 740: +CREATE FOREIGN TABLE batch_cp_upd_test1_f + PARTITION OF batch_cp_upd_test + FOR VALUES IN (1) + SERVER influxdb_svr + OPTIONS (table 'batch_cp_upd_test1', batch_size '10'); +--Testcase 741: +CREATE TABLE batch_cp_up_test1 PARTITION OF batch_cp_upd_test + FOR VALUES IN (2); +--Testcase 742: +INSERT INTO batch_cp_upd_test VALUES (1), (2); + +-- The following moves a row from the local partition to the foreign one +-- influxdb_fdw does not support UPDATE +-- UPDATE batch_cp_upd_test t SET a = 1 FROM (VALUES (1), (2)) s(a) WHERE t.a = s.a; +--Testcase 743: +SELECT tableoid::regclass, * FROM batch_cp_upd_test; + +-- Clean up +--Testcase 744: +DROP TABLE batch_table, batch_cp_upd_test, batch_table_p0, batch_table_p1 CASCADE; + +-- influxdb_fdw does not support partition insert +-- Use partitioning +--Testcase 745: +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); + +--Testcase 746: +CREATE TABLE batch_table ( x int, field1 text, field2 text) PARTITION BY HASH (x); + +--Testcase 747: +CREATE TABLE batch_table_p0 (LIKE batch_table); +--Testcase 748: +ALTER TABLE batch_table_p0 ADD CONSTRAINT p0_pkey PRIMARY KEY (x); +--Testcase 749: +CREATE FOREIGN TABLE batch_table_p0f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 2, REMAINDER 0) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p0'); + +--Testcase 750: +CREATE TABLE batch_table_p1 (LIKE batch_table); +--Testcase 751: +ALTER TABLE batch_table_p1 ADD CONSTRAINT p1_pkey PRIMARY KEY (x); +--Testcase 752: +CREATE FOREIGN TABLE batch_table_p1f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 2, REMAINDER 1) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p1'); + +--Testcase 753: +INSERT INTO batch_table SELECT i, 'test'||i, 'test'|| i FROM generate_series(1, 50) i; +--Testcase 754: +SELECT COUNT(*) FROM batch_table; +--Testcase 755: +SELECT * FROM batch_table ORDER BY x; + +--Testcase 756: +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); + +-- Clean up +--Testcase 757: +DROP TABLE batch_table, batch_table_p0, batch_table_p1 CASCADE; +/* InfluxDB does not support partition table +-- =================================================================== +-- test asynchronous execution +-- =================================================================== + +ALTER SERVER loopback OPTIONS (DROP extensions); +ALTER SERVER loopback OPTIONS (ADD async_capable 'true'); +ALTER SERVER loopback2 OPTIONS (ADD async_capable 'true'); + +CREATE TABLE async_pt (a int, b int, c text) PARTITION BY RANGE (a); +CREATE TABLE base_tbl1 (a int, b int, c text); +CREATE TABLE base_tbl2 (a int, b int, c text); +CREATE FOREIGN TABLE async_p1 PARTITION OF async_pt FOR VALUES FROM (1000) TO (2000) + SERVER loopback OPTIONS (table_name 'base_tbl1'); +CREATE FOREIGN TABLE async_p2 PARTITION OF async_pt FOR VALUES FROM (2000) TO (3000) + SERVER loopback2 OPTIONS (table_name 'base_tbl2'); +INSERT INTO async_p1 SELECT 1000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +INSERT INTO async_p2 SELECT 2000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +-- simple queries +CREATE TABLE result_tbl (a int, b int, c text); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b % 100 = 0; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b % 100 = 0; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT a, b, 'AAA' || c FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT a, b, 'AAA' || c FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- Check case where multiple partitions use the same connection +CREATE TABLE base_tbl3 (a int, b int, c text); +CREATE FOREIGN TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO (4000) + SERVER loopback2 OPTIONS (table_name 'base_tbl3'); +INSERT INTO async_p3 SELECT 3000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +DROP FOREIGN TABLE async_p3; +DROP TABLE base_tbl3; + +-- Check case where the partitioned table has local/remote partitions +CREATE TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO (4000); +INSERT INTO async_p3 SELECT 3000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- partitionwise joins +SET enable_partitionwise_join TO true; + +CREATE TABLE join_tbl (a1 int, b1 int, c1 text, a2 int, b2 int, c2 text); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT * FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT * FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT t1.a, t1.b, 'AAA' || t1.c, t2.a, t2.b, 'AAA' || t2.c FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT t1.a, t1.b, 'AAA' || t1.c, t2.a, t2.b, 'AAA' || t2.c FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +RESET enable_partitionwise_join; + +-- Test rescan of an async Append node with do_exec_prune=false +SET enable_hashjoin TO false; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT * FROM async_p1 t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT * FROM async_p1 t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +RESET enable_hashjoin; + +-- Test interaction of async execution with plan-time partition pruning +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE a < 3000; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE a < 2000; + +-- Test interaction of async execution with run-time partition pruning +SET plan_cache_mode TO force_generic_plan; + +PREPARE async_pt_query (int, int) AS + INSERT INTO result_tbl SELECT * FROM async_pt WHERE a < $1 AND b === $2; + +EXPLAIN (VERBOSE, COSTS OFF) +EXECUTE async_pt_query (3000, 505); +EXECUTE async_pt_query (3000, 505); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +EXECUTE async_pt_query (2000, 505); +EXECUTE async_pt_query (2000, 505); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +RESET plan_cache_mode; + +CREATE TABLE local_tbl(a int, b int, c text); +INSERT INTO local_tbl VALUES (1505, 505, 'foo'), (2505, 505, 'bar'); +ANALYZE local_tbl; + +CREATE INDEX base_tbl1_idx ON base_tbl1 (a); +CREATE INDEX base_tbl2_idx ON base_tbl2 (a); +CREATE INDEX async_p3_idx ON async_p3 (a); +ANALYZE base_tbl1; +ANALYZE base_tbl2; +ANALYZE async_p3; + +ALTER FOREIGN TABLE async_p1 OPTIONS (use_remote_estimate 'true'); +ALTER FOREIGN TABLE async_p2 OPTIONS (use_remote_estimate 'true'); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; + +ALTER FOREIGN TABLE async_p1 OPTIONS (DROP use_remote_estimate); +ALTER FOREIGN TABLE async_p2 OPTIONS (DROP use_remote_estimate); + +DROP TABLE local_tbl; +DROP INDEX base_tbl1_idx; +DROP INDEX base_tbl2_idx; +DROP INDEX async_p3_idx; + +-- UNION queries +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION ALL +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION ALL +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- Disable async execution if we use gating Result nodes for pseudoconstant +-- quals +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE CURRENT_USER = SESSION_USER; + +EXPLAIN (VERBOSE, COSTS OFF) +(SELECT * FROM async_p1 WHERE CURRENT_USER = SESSION_USER) +UNION ALL +(SELECT * FROM async_p2 WHERE CURRENT_USER = SESSION_USER); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ((SELECT * FROM async_p1 WHERE b < 10) UNION ALL (SELECT * FROM async_p2 WHERE b < 10)) s WHERE CURRENT_USER = SESSION_USER; + +-- Test that pending requests are processed properly +SET enable_mergejoin TO false; +SET enable_hashjoin TO false; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt t1, async_p2 t2 WHERE t1.a = t2.a AND t1.b === 505; +SELECT * FROM async_pt t1, async_p2 t2 WHERE t1.a = t2.a AND t1.b === 505; + +CREATE TABLE local_tbl (a int, b int, c text); +INSERT INTO local_tbl VALUES (1505, 505, 'foo'); +ANALYZE local_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; + +-- Check with foreign modify +CREATE TABLE base_tbl3 (a int, b int, c text); +CREATE FOREIGN TABLE remote_tbl (a int, b int, c text) + SERVER loopback OPTIONS (table_name 'base_tbl3'); +INSERT INTO remote_tbl VALUES (2505, 505, 'bar'); + +CREATE TABLE base_tbl4 (a int, b int, c text); +CREATE FOREIGN TABLE insert_tbl (a int, b int, c text) + SERVER loopback OPTIONS (table_name 'base_tbl4'); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO insert_tbl (SELECT * FROM local_tbl UNION ALL SELECT * FROM remote_tbl); +INSERT INTO insert_tbl (SELECT * FROM local_tbl UNION ALL SELECT * FROM remote_tbl); + +SELECT * FROM insert_tbl ORDER BY a; + +-- Check with direct modify +EXPLAIN (VERBOSE, COSTS OFF) +WITH t AS (UPDATE remote_tbl SET c = c || c RETURNING *) +INSERT INTO join_tbl SELECT * FROM async_pt LEFT JOIN t ON (async_pt.a = t.a AND async_pt.b = t.b) WHERE async_pt.b === 505; +WITH t AS (UPDATE remote_tbl SET c = c || c RETURNING *) +INSERT INTO join_tbl SELECT * FROM async_pt LEFT JOIN t ON (async_pt.a = t.a AND async_pt.b = t.b) WHERE async_pt.b === 505; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +DROP TABLE local_tbl; +DROP FOREIGN TABLE remote_tbl; +DROP FOREIGN TABLE insert_tbl; +DROP TABLE base_tbl3; +DROP TABLE base_tbl4; + +RESET enable_mergejoin; +RESET enable_hashjoin; + +-- Test that UPDATE/DELETE with inherited target works with async_capable enabled +EXPLAIN (VERBOSE, COSTS OFF) +UPDATE async_pt SET c = c || c WHERE b = 0 RETURNING *; +UPDATE async_pt SET c = c || c WHERE b = 0 RETURNING *; +EXPLAIN (VERBOSE, COSTS OFF) +DELETE FROM async_pt WHERE b = 0 RETURNING *; +DELETE FROM async_pt WHERE b = 0 RETURNING *; + +-- Check EXPLAIN ANALYZE for a query that scans empty partitions asynchronously +DELETE FROM async_p1; +DELETE FROM async_p2; +DELETE FROM async_p3; + +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM async_pt; + +-- Clean up +DROP TABLE async_pt; +DROP TABLE base_tbl1; +DROP TABLE base_tbl2; +DROP TABLE result_tbl; +DROP TABLE join_tbl; + +-- Test that an asynchronous fetch is processed before restarting the scan in +-- ReScanForeignScan +CREATE TABLE base_tbl (a int, b int); +INSERT INTO base_tbl VALUES (1, 11), (2, 22), (3, 33); +CREATE FOREIGN TABLE foreign_tbl (b int) + SERVER loopback OPTIONS (table_name 'base_tbl'); +CREATE FOREIGN TABLE foreign_tbl2 () INHERITS (foreign_tbl) + SERVER loopback OPTIONS (table_name 'base_tbl'); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT a FROM base_tbl WHERE a IN (SELECT a FROM foreign_tbl); +SELECT a FROM base_tbl WHERE a IN (SELECT a FROM foreign_tbl); + +-- Clean up +DROP FOREIGN TABLE foreign_tbl CASCADE; +DROP TABLE base_tbl; + +ALTER SERVER loopback OPTIONS (DROP async_capable); +ALTER SERVER loopback2 OPTIONS (DROP async_capable); +*/ + +-- =================================================================== +-- test invalid server, foreign table and foreign data wrapper options +-- =================================================================== +/* +-- InfluxDB FDW does not have these options +-- Invalid fdw_startup_cost option +CREATE SERVER inv_scst FOREIGN DATA WRAPPER postgres_fdw + OPTIONS(fdw_startup_cost '100$%$#$#'); +-- Invalid fdw_tuple_cost option +CREATE SERVER inv_scst FOREIGN DATA WRAPPER postgres_fdw + OPTIONS(fdw_tuple_cost '100$%$#$#'); +-- Invalid fetch_size option +CREATE FOREIGN TABLE inv_fsz (c1 int ) + SERVER loopback OPTIONS (fetch_size '100$%$#$#'); +*/ +-- Invalid batch_size option +--Testcase 776: +CREATE FOREIGN TABLE inv_bsz (c1 int ) + SERVER influxdb_svr OPTIONS (batch_size '100$%$#$#'); + +-- No option is allowed to be specified at foreign data wrapper level +--Testcase 782: +ALTER FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (nonexistent 'fdw'); + +/* +-- =================================================================== +-- application_name is an option in libpq of postgres +-- so Influxdb_fdw not support application_name. +-- test postgres_fdw.application_name GUC +-- =================================================================== +--- Turn debug_discard_caches off for this test to make sure that +--- the remote connection is alive when checking its application_name. +SET debug_discard_caches = 0; + +-- Specify escape sequences in application_name option of a server +-- object so as to test that they are replaced with status information +-- expectedly. +-- +-- Since pg_stat_activity.application_name may be truncated to less than +-- NAMEDATALEN characters, note that substring() needs to be used +-- at the condition of test query to make sure that the string consisting +-- of database name and process ID is also less than that. +ALTER SERVER loopback2 OPTIONS (application_name 'fdw_%d%p'); +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_database() || pg_backend_pid() for + current_setting('max_identifier_length')::int); + +-- postgres_fdw.application_name overrides application_name option +-- of a server object if both settings are present. +SET postgres_fdw.application_name TO 'fdw_%a%u%%'; +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_setting('application_name') || + CURRENT_USER || '%' for current_setting('max_identifier_length')::int); + +-- Test %c (session ID) and %C (cluster name) escape sequences. +SET postgres_fdw.application_name TO 'fdw_%C%c'; +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_setting('cluster_name') || + to_hex(trunc(EXTRACT(EPOCH FROM (SELECT backend_start FROM + pg_stat_get_activity(pg_backend_pid()))))::integer) || '.' || + to_hex(pg_backend_pid()) + for current_setting('max_identifier_length')::int); + +--Clean up +RESET postgres_fdw.application_name; +RESET debug_discard_caches; + +-- =================================================================== +-- test parallel commit +-- =================================================================== +ALTER SERVER loopback OPTIONS (ADD parallel_commit 'true'); +ALTER SERVER loopback2 OPTIONS (ADD parallel_commit 'true'); + +CREATE TABLE ploc1 (f1 int, f2 text); +CREATE FOREIGN TABLE prem1 (f1 int, f2 text) + SERVER loopback OPTIONS (table_name 'ploc1'); +CREATE TABLE ploc2 (f1 int, f2 text); +CREATE FOREIGN TABLE prem2 (f1 int, f2 text) + SERVER loopback2 OPTIONS (table_name 'ploc2'); + +BEGIN; +INSERT INTO prem1 VALUES (101, 'foo'); +INSERT INTO prem2 VALUES (201, 'bar'); +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +BEGIN; +SAVEPOINT s; +INSERT INTO prem1 VALUES (102, 'foofoo'); +INSERT INTO prem2 VALUES (202, 'barbar'); +RELEASE SAVEPOINT s; +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +-- This tests executing DEALLOCATE ALL against foreign servers in parallel +-- during pre-commit +BEGIN; +SAVEPOINT s; +INSERT INTO prem1 VALUES (103, 'baz'); +INSERT INTO prem2 VALUES (203, 'qux'); +ROLLBACK TO SAVEPOINT s; +RELEASE SAVEPOINT s; +INSERT INTO prem1 VALUES (104, 'bazbaz'); +INSERT INTO prem2 VALUES (204, 'quxqux'); +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +ALTER SERVER loopback OPTIONS (DROP parallel_commit); +ALTER SERVER loopback2 OPTIONS (DROP parallel_commit); +*/ -- Clean-up +--Testcase 786: delete from ft1; +--Testcase 787: delete from ft2; +--Testcase 788: delete from ft4; +--Testcase 789: delete from ft5; +--Testcase 790: delete from foo; +--Testcase 791: delete from bar; +--Testcase 792: delete from loct1; +--Testcase 793: delete from loct2; +--Testcase 794: delete from rem1; +--Testcase 795: drop foreign table foo cascade; +--Testcase 796: drop foreign table bar cascade; +--Testcase 797: drop foreign table loct1; +--Testcase 798: drop foreign table loct2; +--Testcase 799: drop foreign table ft1; +--Testcase 800: drop foreign table ft2; +--Testcase 801: drop foreign table ft4; +--Testcase 802: drop foreign table ft5; +--Testcase 803: DROP TYPE IF EXISTS user_enum; +--Testcase 804: DROP SCHEMA IF EXISTS "S 1" CASCADE; +--Testcase 805: DROP FUNCTION IF EXISTS trigger_func(); +--Testcase 806: DROP FUNCTION IF EXISTS trig_row_before_insupdate(); +--Testcase 807: DROP FUNCTION IF EXISTS trig_null(); +--Testcase 808: DROP SCHEMA IF EXISTS import_influx1 CASCADE; +--Testcase 809: DROP SCHEMA IF EXISTS import_influx2 CASCADE; +--Testcase 810: DROP SCHEMA IF EXISTS import_influx3 CASCADE; +--Testcase 811: DROP SCHEMA IF EXISTS import_influx4 CASCADE; +--Testcase 812: +DROP TABLE IF EXISTS batch_cp_upd_test1; ---Testcase 621: +--Testcase 758: DROP USER MAPPING FOR public SERVER testserver1; ---Testcase 622: +--Testcase 759: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 623: +--Testcase 760: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2; ---Testcase 624: +--Testcase 761: DROP SERVER testserver1 CASCADE; ---Testcase 625: +--Testcase 762: DROP SERVER influxdb_svr CASCADE; ---Testcase 626: +--Testcase 763: DROP SERVER influxdb_svr2 CASCADE; ---Testcase 627: +--Testcase 764: DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/14.0/extra/init.sql b/sql/15.0/extra/init.sql similarity index 100% rename from sql/14.0/extra/init.sql rename to sql/15.0/extra/init.sql diff --git a/sql/15.0/extra/insert.sql b/sql/15.0/extra/insert.sql new file mode 100644 index 0000000..afa55c9 --- /dev/null +++ b/sql/15.0/extra/insert.sql @@ -0,0 +1,660 @@ +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +-- +-- insert with DEFAULT in the target_list +-- +--Testcase 4: +CREATE FOREIGN TABLE inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 'testing') SERVER influxdb_svr OPTIONS(table 'inserttest'); +--Testcase 5: +insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT); +--Testcase 6: +insert into inserttest (col2, col3) values (3, DEFAULT); +--Testcase 7: +insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT); +--Testcase 8: +insert into inserttest values (DEFAULT, 5, 'test'); +--Testcase 9: +insert into inserttest values (DEFAULT, 7); + +--Testcase 10: +select * from inserttest; + +-- +-- insert with similar expression / target_list values (all fail) +-- +--Testcase 11: +insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT); +--Testcase 12: +insert into inserttest (col1, col2, col3) values (1, 2); +--Testcase 13: +insert into inserttest (col1) values (1, 2); +--Testcase 14: +insert into inserttest (col1) values (DEFAULT, DEFAULT); + +--Testcase 15: +select * from inserttest; + +-- +-- VALUES test +-- +--Testcase 16: +insert into inserttest values(10, 20, '40'), (-1, 2, DEFAULT), + ((select 2), (select i from (values(3)) as foo (i)), 'values are fun!'); + +--Testcase 17: +select * from inserttest; + +-- +-- TOASTed value test +-- +--Testcase 18: +insert into inserttest values(30, 50, repeat('x', 10000)); + +--Testcase 19: +select col1, col2, char_length(col3) from inserttest; + +--Testcase 20: +-- Clean up: +--Testcase 24: +delete from inserttest; +--Testcase 25: +drop foreign table inserttest; + +/* +-- skip, influxdb does not support create table with WITH option +-- +-- tuple larger than fillfactor +-- +CREATE TABLE large_tuple_test (a int, b text) WITH (fillfactor = 10); +ALTER TABLE large_tuple_test ALTER COLUMN b SET STORAGE plain; + +-- create page w/ free space in range [nearlyEmptyFreeSpace, MaxHeapTupleSize) +INSERT INTO large_tuple_test (select 1, NULL); + +-- should still fit on the page +INSERT INTO large_tuple_test (select 2, repeat('a', 1000)); +SELECT pg_size_pretty(pg_relation_size('large_tuple_test'::regclass, 'main')); + +-- add small record to the second page +INSERT INTO large_tuple_test (select 3, NULL); + +-- now this tuple won't fit on the second page, but the insert should +-- still succeed by extending the relation +INSERT INTO large_tuple_test (select 4, repeat('a', 8126)); + +DROP TABLE large_tuple_test; +*/ + +/* +-- skip, influxdb does not support create type +-- +-- check indirection (field/array assignment), cf bug #14265 +-- +-- these tests are aware that transformInsertStmt has 3 separate code paths +-- + +create type insert_test_type as (if1 int, if2 text[]); + +create table inserttest (f1 int, f2 int[], + f3 insert_test_type, f4 insert_test_type[]); + +insert into inserttest (f2[1], f2[2]) values (1,2); +insert into inserttest (f2[1], f2[2]) values (3,4), (5,6); +insert into inserttest (f2[1], f2[2]) select 7,8; +insert into inserttest (f2[1], f2[2]) values (1,default); -- not supported + +insert into inserttest (f3.if1, f3.if2) values (1,array['foo']); +insert into inserttest (f3.if1, f3.if2) values (1,'{foo}'), (2,'{bar}'); +insert into inserttest (f3.if1, f3.if2) select 3, '{baz,quux}'; +insert into inserttest (f3.if1, f3.if2) values (1,default); -- not supported + +insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'); +insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'), ('baz', 'quux'); +insert into inserttest (f3.if2[1], f3.if2[2]) select 'bear', 'beer'; + +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'); +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'), ('baz', 'quux'); +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) select 'bear', 'beer'; + +select * from inserttest; + +-- also check reverse-listing +create table inserttest2 (f1 bigint, f2 text); +create rule irule1 as on insert to inserttest2 do also + insert into inserttest (f3.if2[1], f3.if2[2]) + values (new.f1,new.f2); +create rule irule2 as on insert to inserttest2 do also + insert into inserttest (f4[1].if1, f4[1].if2[2]) + values (1,'fool'),(new.f1,new.f2); +create rule irule3 as on insert to inserttest2 do also + insert into inserttest (f4[1].if1, f4[1].if2[2]) + select new.f1, new.f2; +\d+ inserttest2 + +drop table inserttest2; +drop table inserttest; +drop type insert_test_type; +*/ + +/* +-- skip, influxdb does not support partition table +-- direct partition inserts should check partition bound constraint +create table range_parted ( + a text, + b int +) partition by range (a, (b+0)); + +-- no partitions, so fail +insert into range_parted values ('a', 11); + +create table part1 partition of range_parted for values from ('a', 1) to ('a', 10); +create table part2 partition of range_parted for values from ('a', 10) to ('a', 20); +create table part3 partition of range_parted for values from ('b', 1) to ('b', 10); +create table part4 partition of range_parted for values from ('b', 10) to ('b', 20); + +-- fail +insert into part1 values ('a', 11); +insert into part1 values ('b', 1); +-- ok +insert into part1 values ('a', 1); +-- fail +insert into part4 values ('b', 21); +insert into part4 values ('a', 10); +-- ok +insert into part4 values ('b', 10); + +-- fail (partition key a has a NOT NULL constraint) +insert into part1 values (null); +-- fail (expression key (b+0) cannot be null either) +insert into part1 values (1); + +create table list_parted ( + a text, + b int +) partition by list (lower(a)); +create table part_aa_bb partition of list_parted FOR VALUES IN ('aa', 'bb'); +create table part_cc_dd partition of list_parted FOR VALUES IN ('cc', 'dd'); +create table part_null partition of list_parted FOR VALUES IN (null); + +-- fail +insert into part_aa_bb values ('cc', 1); +insert into part_aa_bb values ('AAa', 1); +insert into part_aa_bb values (null); +-- ok +insert into part_cc_dd values ('cC', 1); +insert into part_null values (null, 0); + +-- check in case of multi-level partitioned table +create table part_ee_ff partition of list_parted for values in ('ee', 'ff') partition by range (b); +create table part_ee_ff1 partition of part_ee_ff for values from (1) to (10); +create table part_ee_ff2 partition of part_ee_ff for values from (10) to (20); + +-- test default partition +create table part_default partition of list_parted default; +-- Negative test: a row, which would fit in other partition, does not fit +-- default partition, even when inserted directly +insert into part_default values ('aa', 2); +insert into part_default values (null, 2); +-- ok +insert into part_default values ('Zz', 2); +-- test if default partition works as expected for multi-level partitioned +-- table as well as when default partition itself is further partitioned +drop table part_default; +create table part_xx_yy partition of list_parted for values in ('xx', 'yy') partition by list (a); +create table part_xx_yy_p1 partition of part_xx_yy for values in ('xx'); +create table part_xx_yy_defpart partition of part_xx_yy default; +create table part_default partition of list_parted default partition by range(b); +create table part_default_p1 partition of part_default for values from (20) to (30); +create table part_default_p2 partition of part_default for values from (30) to (40); + +-- fail +insert into part_ee_ff1 values ('EE', 11); +insert into part_default_p2 values ('gg', 43); +-- fail (even the parent's, ie, part_ee_ff's partition constraint applies) +insert into part_ee_ff1 values ('cc', 1); +insert into part_default values ('gg', 43); +-- ok +insert into part_ee_ff1 values ('ff', 1); +insert into part_ee_ff2 values ('ff', 11); +insert into part_default_p1 values ('cd', 25); +insert into part_default_p2 values ('de', 35); +insert into list_parted values ('ab', 21); +insert into list_parted values ('xx', 1); +insert into list_parted values ('yy', 2); +select tableoid::regclass, * from list_parted; + +-- Check tuple routing for partitioned tables + +-- fail +insert into range_parted values ('a', 0); +-- ok +insert into range_parted values ('a', 1); +insert into range_parted values ('a', 10); +-- fail +insert into range_parted values ('a', 20); +-- ok +insert into range_parted values ('b', 1); +insert into range_parted values ('b', 10); +-- fail (partition key (b+0) is null) +insert into range_parted values ('a'); + +-- Check default partition +create table part_def partition of range_parted default; +-- fail +insert into part_def values ('b', 10); +-- ok +insert into part_def values ('c', 10); +insert into range_parted values (null, null); +insert into range_parted values ('a', null); +insert into range_parted values (null, 19); +insert into range_parted values ('b', 20); + +select tableoid::regclass, * from range_parted; +-- ok +insert into list_parted values (null, 1); +insert into list_parted (a) values ('aA'); +-- fail (partition of part_ee_ff not found in both cases) +insert into list_parted values ('EE', 0); +insert into part_ee_ff values ('EE', 0); +-- ok +insert into list_parted values ('EE', 1); +insert into part_ee_ff values ('EE', 10); +select tableoid::regclass, * from list_parted; + +-- some more tests to exercise tuple-routing with multi-level partitioning +create table part_gg partition of list_parted for values in ('gg') partition by range (b); +create table part_gg1 partition of part_gg for values from (minvalue) to (1); +create table part_gg2 partition of part_gg for values from (1) to (10) partition by range (b); +create table part_gg2_1 partition of part_gg2 for values from (1) to (5); +create table part_gg2_2 partition of part_gg2 for values from (5) to (10); + +create table part_ee_ff3 partition of part_ee_ff for values from (20) to (30) partition by range (b); +create table part_ee_ff3_1 partition of part_ee_ff3 for values from (20) to (25); +create table part_ee_ff3_2 partition of part_ee_ff3 for values from (25) to (30); + +truncate list_parted; +insert into list_parted values ('aa'), ('cc'); +insert into list_parted select 'Ff', s.a from generate_series(1, 29) s(a); +insert into list_parted select 'gg', s.a from generate_series(1, 9) s(a); +insert into list_parted (b) values (1); +select tableoid::regclass::text, a, min(b) as min_b, max(b) as max_b from list_parted group by 1, 2 order by 1; + +-- direct partition inserts should check hash partition bound constraint + +create table hash_parted ( + a int +) partition by hash (a part_test_int4_ops); +create table hpart0 partition of hash_parted for values with (modulus 4, remainder 0); +create table hpart1 partition of hash_parted for values with (modulus 4, remainder 1); +create table hpart2 partition of hash_parted for values with (modulus 4, remainder 2); +create table hpart3 partition of hash_parted for values with (modulus 4, remainder 3); + +insert into hash_parted values(generate_series(1,10)); + +-- direct insert of values divisible by 4 - ok; +insert into hpart0 values(12),(16); +-- fail; +insert into hpart0 values(11); +-- 11 % 4 -> 3 remainder i.e. valid data for hpart3 partition +insert into hpart3 values(11); + +-- view data +select tableoid::regclass as part, a, a%4 as "remainder = a % 4" +from hash_parted order by part; + +-- test \d+ output on a table which has both partitioned and unpartitioned +-- partitions +\d+ list_parted + +-- cleanup +drop table range_parted, list_parted; +drop table hash_parted; + +-- test that a default partition added as the first partition accepts any value +-- including null +create table list_parted (a int) partition by list (a); +create table part_default partition of list_parted default; +\d+ part_default +insert into part_default values (null); +insert into part_default values (1); +insert into part_default values (-1); +select tableoid::regclass, a from list_parted; +-- cleanup +drop table list_parted; + +-- more tests for certain multi-level partitioning scenarios +create table mlparted (a int, b int) partition by range (a, b); +create table mlparted1 (b int not null, a int not null) partition by range ((b+0)); +create table mlparted11 (like mlparted1); +alter table mlparted11 drop a; +alter table mlparted11 add a int; +alter table mlparted11 drop a; +alter table mlparted11 add a int not null; +-- attnum for key attribute 'a' is different in mlparted, mlparted1, and mlparted11 +select attrelid::regclass, attname, attnum +from pg_attribute +where attname = 'a' + and (attrelid = 'mlparted'::regclass + or attrelid = 'mlparted1'::regclass + or attrelid = 'mlparted11'::regclass) +order by attrelid::regclass::text; + +alter table mlparted1 attach partition mlparted11 for values from (2) to (5); +alter table mlparted attach partition mlparted1 for values from (1, 2) to (1, 10); + +-- check that "(1, 2)" is correctly routed to mlparted11. +insert into mlparted values (1, 2); +select tableoid::regclass, * from mlparted; + +-- check that proper message is shown after failure to route through mlparted1 +insert into mlparted (a, b) values (1, 5); + +truncate mlparted; +alter table mlparted add constraint check_b check (b = 3); + +-- have a BR trigger modify the row such that the check_b is violated +create function mlparted11_trig_fn() +returns trigger AS +$$ +begin + NEW.b := 4; + return NEW; +end; +$$ +language plpgsql; +create trigger mlparted11_trig before insert ON mlparted11 + for each row execute procedure mlparted11_trig_fn(); + +-- check that the correct row is shown when constraint check_b fails after +-- "(1, 2)" is routed to mlparted11 (actually "(1, 4)" would be shown due +-- to the BR trigger mlparted11_trig_fn) +insert into mlparted values (1, 2); +drop trigger mlparted11_trig on mlparted11; +drop function mlparted11_trig_fn(); + +-- check that inserting into an internal partition successfully results in +-- checking its partition constraint before inserting into the leaf partition +-- selected by tuple-routing +insert into mlparted1 (a, b) values (2, 3); + +-- check routing error through a list partitioned table when the key is null +create table lparted_nonullpart (a int, b char) partition by list (b); +create table lparted_nonullpart_a partition of lparted_nonullpart for values in ('a'); +insert into lparted_nonullpart values (1); +drop table lparted_nonullpart; + +-- check that RETURNING works correctly with tuple-routing +alter table mlparted drop constraint check_b; +create table mlparted12 partition of mlparted1 for values from (5) to (10); +create table mlparted2 (b int not null, a int not null); +alter table mlparted attach partition mlparted2 for values from (1, 10) to (1, 20); +create table mlparted3 partition of mlparted for values from (1, 20) to (1, 30); +create table mlparted4 (like mlparted); +alter table mlparted4 drop a; +alter table mlparted4 add a int not null; +alter table mlparted attach partition mlparted4 for values from (1, 30) to (1, 40); +with ins (a, b, c) as + (insert into mlparted (b, a) select s.a, 1 from generate_series(2, 39) s(a) returning tableoid::regclass, *) + select a, b, min(c), max(c) from ins group by a, b order by 1; + +alter table mlparted add c text; +create table mlparted5 (c text, a int not null, b int not null) partition by list (c); +create table mlparted5a (a int not null, c text, b int not null); +alter table mlparted5 attach partition mlparted5a for values in ('a'); +alter table mlparted attach partition mlparted5 for values from (1, 40) to (1, 50); +alter table mlparted add constraint check_b check (a = 1 and b < 45); +insert into mlparted values (1, 45, 'a'); +create function mlparted5abrtrig_func() returns trigger as $$ begin new.c = 'b'; return new; end; $$ language plpgsql; +create trigger mlparted5abrtrig before insert on mlparted5a for each row execute procedure mlparted5abrtrig_func(); +insert into mlparted5 (a, b, c) values (1, 40, 'a'); +drop table mlparted5; +alter table mlparted drop constraint check_b; + +-- Check multi-level default partition +create table mlparted_def partition of mlparted default partition by range(a); +create table mlparted_def1 partition of mlparted_def for values from (40) to (50); +create table mlparted_def2 partition of mlparted_def for values from (50) to (60); +insert into mlparted values (40, 100); +insert into mlparted_def1 values (42, 100); +insert into mlparted_def2 values (54, 50); +-- fail +insert into mlparted values (70, 100); +insert into mlparted_def1 values (52, 50); +insert into mlparted_def2 values (34, 50); +-- ok +create table mlparted_defd partition of mlparted_def default; +insert into mlparted values (70, 100); + +select tableoid::regclass, * from mlparted_def; + +-- Check multi-level tuple routing with attributes dropped from the +-- top-most parent. First remove the last attribute. +alter table mlparted add d int, add e int; +alter table mlparted drop e; +create table mlparted5 partition of mlparted + for values from (1, 40) to (1, 50) partition by range (c); +create table mlparted5_ab partition of mlparted5 + for values from ('a') to ('c') partition by list (c); +-- This partitioned table should remain with no partitions. +create table mlparted5_cd partition of mlparted5 + for values from ('c') to ('e') partition by list (c); +create table mlparted5_a partition of mlparted5_ab for values in ('a'); +create table mlparted5_b (d int, b int, c text, a int); +alter table mlparted5_ab attach partition mlparted5_b for values in ('b'); +truncate mlparted; +insert into mlparted values (1, 2, 'a', 1); +insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a +insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b +insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails +insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails +select tableoid::regclass, * from mlparted order by a, b, c, d; +alter table mlparted drop d; +truncate mlparted; +-- Remove the before last attribute. +alter table mlparted add e int, add d int; +alter table mlparted drop e; +insert into mlparted values (1, 2, 'a', 1); +insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a +insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b +insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails +insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails +select tableoid::regclass, * from mlparted order by a, b, c, d; +alter table mlparted drop d; +drop table mlparted5; + +-- check that message shown after failure to find a partition shows the +-- appropriate key description (or none) in various situations +create table key_desc (a int, b int) partition by list ((a+0)); +create table key_desc_1 partition of key_desc for values in (1) partition by range (b); + +create user regress_insert_other_user; +grant select (a) on key_desc_1 to regress_insert_other_user; +grant insert on key_desc to regress_insert_other_user; + +set role regress_insert_other_user; +-- no key description is shown +insert into key_desc values (1, 1); + +reset role; +grant select (b) on key_desc_1 to regress_insert_other_user; +set role regress_insert_other_user; +-- key description (b)=(1) is now shown +insert into key_desc values (1, 1); + +-- key description is not shown if key contains expression +insert into key_desc values (2, 1); +reset role; +revoke all on key_desc from regress_insert_other_user; +revoke all on key_desc_1 from regress_insert_other_user; +drop role regress_insert_other_user; +drop table key_desc, key_desc_1; + +-- test minvalue/maxvalue restrictions +create table mcrparted (a int, b int, c int) partition by range (a, abs(b), c); +create table mcrparted0 partition of mcrparted for values from (minvalue, 0, 0) to (1, maxvalue, maxvalue); +create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, minvalue); +create table mcrparted4 partition of mcrparted for values from (21, minvalue, 0) to (30, 20, minvalue); + +-- check multi-column range partitioning expression enforces the same +-- constraint as what tuple-routing would determine it to be +create table mcrparted0 partition of mcrparted for values from (minvalue, minvalue, minvalue) to (1, maxvalue, maxvalue); +create table mcrparted1 partition of mcrparted for values from (2, 1, minvalue) to (10, 5, 10); +create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, maxvalue); +create table mcrparted3 partition of mcrparted for values from (11, 1, 1) to (20, 10, 10); +create table mcrparted4 partition of mcrparted for values from (21, minvalue, minvalue) to (30, 20, maxvalue); +create table mcrparted5 partition of mcrparted for values from (30, 21, 20) to (maxvalue, maxvalue, maxvalue); + +-- null not allowed in range partition +insert into mcrparted values (null, null, null); + +-- routed to mcrparted0 +insert into mcrparted values (0, 1, 1); +insert into mcrparted0 values (0, 1, 1); + +-- routed to mcparted1 +insert into mcrparted values (9, 1000, 1); +insert into mcrparted1 values (9, 1000, 1); +insert into mcrparted values (10, 5, -1); +insert into mcrparted1 values (10, 5, -1); +insert into mcrparted values (2, 1, 0); +insert into mcrparted1 values (2, 1, 0); + +-- routed to mcparted2 +insert into mcrparted values (10, 6, 1000); +insert into mcrparted2 values (10, 6, 1000); +insert into mcrparted values (10, 1000, 1000); +insert into mcrparted2 values (10, 1000, 1000); + +-- no partition exists, nor does mcrparted3 accept it +insert into mcrparted values (11, 1, -1); +insert into mcrparted3 values (11, 1, -1); + +-- routed to mcrparted5 +insert into mcrparted values (30, 21, 20); +insert into mcrparted5 values (30, 21, 20); +insert into mcrparted4 values (30, 21, 20); -- error + +-- check rows +select tableoid::regclass::text, * from mcrparted order by 1; + +-- cleanup +drop table mcrparted; + +-- check that a BR constraint can't make partition contain violating rows +create table brtrigpartcon (a int, b text) partition by list (a); +create table brtrigpartcon1 partition of brtrigpartcon for values in (1); +create or replace function brtrigpartcon1trigf() returns trigger as $$begin new.a := 2; return new; end$$ language plpgsql; +create trigger brtrigpartcon1trig before insert on brtrigpartcon1 for each row execute procedure brtrigpartcon1trigf(); +insert into brtrigpartcon values (1, 'hi there'); +insert into brtrigpartcon1 values (1, 'hi there'); + +-- check that the message shows the appropriate column description in a +-- situation where the partitioned table is not the primary ModifyTable node +create table inserttest3 (f1 text default 'foo', f2 text default 'bar', f3 int); +create role regress_coldesc_role; +grant insert on inserttest3 to regress_coldesc_role; +grant insert on brtrigpartcon to regress_coldesc_role; +revoke select on brtrigpartcon from regress_coldesc_role; +set role regress_coldesc_role; +with result as (insert into brtrigpartcon values (1, 'hi there') returning 1) + insert into inserttest3 (f3) select * from result; +reset role; + +-- cleanup +revoke all on inserttest3 from regress_coldesc_role; +revoke all on brtrigpartcon from regress_coldesc_role; +drop role regress_coldesc_role; +drop table inserttest3; +drop table brtrigpartcon; +drop function brtrigpartcon1trigf(); + +-- check that "do nothing" BR triggers work with tuple-routing +create table donothingbrtrig_test (a int, b text) partition by list (a); +create table donothingbrtrig_test1 (b text, a int); +create table donothingbrtrig_test2 (c text, b text, a int); +alter table donothingbrtrig_test2 drop column c; +create or replace function donothingbrtrig_func() returns trigger as $$begin raise notice 'b: %', new.b; return NULL; end$$ language plpgsql; +create trigger donothingbrtrig1 before insert on donothingbrtrig_test1 for each row execute procedure donothingbrtrig_func(); +create trigger donothingbrtrig2 before insert on donothingbrtrig_test2 for each row execute procedure donothingbrtrig_func(); +alter table donothingbrtrig_test attach partition donothingbrtrig_test1 for values in (1); +alter table donothingbrtrig_test attach partition donothingbrtrig_test2 for values in (2); +insert into donothingbrtrig_test values (1, 'foo'), (2, 'bar'); +copy donothingbrtrig_test from stdout; +1 baz +2 qux +\. +select tableoid::regclass, * from donothingbrtrig_test; + +-- cleanup +drop table donothingbrtrig_test; +drop function donothingbrtrig_func(); + +-- check multi-column range partitioning with minvalue/maxvalue constraints +create table mcrparted (a text, b int) partition by range(a, b); +create table mcrparted1_lt_b partition of mcrparted for values from (minvalue, minvalue) to ('b', minvalue); +create table mcrparted2_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue); +create table mcrparted3_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue); +create table mcrparted4_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0); +create table mcrparted5_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10); +create table mcrparted6_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue); +create table mcrparted7_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue); +create table mcrparted8_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, maxvalue); + +\d+ mcrparted +\d+ mcrparted1_lt_b +\d+ mcrparted2_b +\d+ mcrparted3_c_to_common +\d+ mcrparted4_common_lt_0 +\d+ mcrparted5_common_0_to_10 +\d+ mcrparted6_common_ge_10 +\d+ mcrparted7_gt_common_lt_d +\d+ mcrparted8_ge_d + +insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10), + ('comm', -10), ('common', -10), ('common', 0), ('common', 10), + ('commons', 0), ('d', -10), ('e', 0); +select tableoid::regclass, * from mcrparted order by a, b; +drop table mcrparted; + +-- check that wholerow vars in the RETURNING list work with partitioned tables +create table returningwrtest (a int) partition by list (a); +create table returningwrtest1 partition of returningwrtest for values in (1); +insert into returningwrtest values (1) returning returningwrtest; + +-- check also that the wholerow vars in RETURNING list are converted as needed +alter table returningwrtest add b text; +create table returningwrtest2 (b text, c int, a int); +alter table returningwrtest2 drop c; +alter table returningwrtest attach partition returningwrtest2 for values in (2); +insert into returningwrtest values (2, 'foo') returning returningwrtest; +drop table returningwrtest; +*/ + +-- Clean up +DO $d$ +declare + l_rec record; +begin + for l_rec in (select foreign_table_schema, foreign_table_name + from information_schema.foreign_tables) loop + execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); + end loop; +end; +$d$; + +--Testcase 21: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 22: +DROP SERVER influxdb_svr CASCADE; +--Testcase 23: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/13.4/extra/join.sql b/sql/15.0/extra/join.sql similarity index 95% rename from sql/13.4/extra/join.sql rename to sql/15.0/extra/join.sql index 368a813..afe7a11 100644 --- a/sql/13.4/extra/join.sql +++ b/sql/15.0/extra/join.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- import time column as timestamp and text type -- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; @@ -236,26 +236,48 @@ SELECT * FROM J1_TBL t1 (a, b, c) JOIN J2_TBL t2 (a, b) USING (b) ORDER BY b, t1.a; +-- test join using aliases +--Testcase 49: +SELECT * FROM J1_TBL JOIN J2_TBL USING (i) WHERE J1_TBL.t = 'one'; -- ok +--Testcase 50: +SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; -- ok +--Testcase 51: +SELECT * FROM (J1_TBL JOIN J2_TBL USING (i)) AS x WHERE J1_TBL.t = 'one'; -- error +--Testcase 52: +SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE x.i = 1; -- ok +--Testcase 53: +SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE x.t = 'one'; -- error +--Testcase 54: +SELECT * FROM (J1_TBL JOIN J2_TBL USING (i) AS x) AS xx WHERE x.i = 1; -- error (XXX could use better hint) +--Testcase 55: +SELECT * FROM J1_TBL a1 JOIN J2_TBL a2 USING (i) AS a1; -- error +--Testcase 56: +SELECT x.* FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; +--Testcase 57: +SELECT ROW(x.*) FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; +--Testcase 58: +SELECT row_to_json(x.*) FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; + -- -- NATURAL JOIN -- Inner equi-join on all columns with the same name -- ---Testcase 49: +--Testcase 59: SELECT * FROM J1_TBL NATURAL JOIN J2_TBL; ---Testcase 50: +--Testcase 60: SELECT * FROM J1_TBL t1 (a, b, c) NATURAL JOIN J2_TBL t2 (a, d); ---Testcase 51: +--Testcase 61: SELECT * FROM J1_TBL t1 (a, b, c) NATURAL JOIN J2_TBL t2 (d, a); -- mismatch number of columns -- currently, Postgres will fill in with underlying names ---Testcase 52: +--Testcase 62: SELECT * FROM J1_TBL t1 (a, b) NATURAL JOIN J2_TBL t2 (a); @@ -264,11 +286,11 @@ SELECT * -- Inner joins (equi-joins) -- ---Testcase 53: +--Testcase 63: SELECT * FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i = J2_TBL.i); ---Testcase 54: +--Testcase 64: SELECT * FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i = J2_TBL.k); @@ -277,7 +299,7 @@ SELECT * -- Non-equi-joins -- ---Testcase 55: +--Testcase 65: SELECT * FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i <= J2_TBL.k); @@ -287,46 +309,46 @@ SELECT * -- Note that OUTER is a noise word -- ---Testcase 56: +--Testcase 66: SELECT * FROM J1_TBL LEFT OUTER JOIN J2_TBL USING (i) ORDER BY i, k, t; ---Testcase 57: +--Testcase 67: SELECT * FROM J1_TBL LEFT JOIN J2_TBL USING (i) ORDER BY i, k, t; ---Testcase 58: +--Testcase 68: SELECT * FROM J1_TBL RIGHT OUTER JOIN J2_TBL USING (i); ---Testcase 59: +--Testcase 69: SELECT * FROM J1_TBL RIGHT JOIN J2_TBL USING (i); ---Testcase 60: +--Testcase 70: SELECT * FROM J1_TBL FULL OUTER JOIN J2_TBL USING (i) ORDER BY i, k, t; ---Testcase 61: +--Testcase 71: SELECT * FROM J1_TBL FULL JOIN J2_TBL USING (i) ORDER BY i, k, t; ---Testcase 62: +--Testcase 72: SELECT * FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (k = 1); ---Testcase 63: +--Testcase 73: SELECT * FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (i = 1); -- -- semijoin selectivity for <> -- ---Testcase 64: +--Testcase 74: explain (costs off) select * from int4_tbl i4, tenk1 a where exists(select * from tenk1 b @@ -342,29 +364,29 @@ where exists(select * from tenk1 b -- Multiway full join -- ---Testcase 65: +--Testcase 75: CREATE FOREIGN TABLE t1 (name TEXT, n INTEGER) SERVER influxdb_svr; ---Testcase 66: +--Testcase 76: CREATE FOREIGN TABLE t2 (name TEXT, n INTEGER) SERVER influxdb_svr; ---Testcase 67: +--Testcase 77: CREATE FOREIGN TABLE t3 (name TEXT, n INTEGER) SERVER influxdb_svr; ---Testcase 68: +--Testcase 78: INSERT INTO t1 VALUES ( 'bb', 11 ); ---Testcase 69: +--Testcase 79: INSERT INTO t2 VALUES ( 'bb', 12 ); ---Testcase 70: +--Testcase 80: INSERT INTO t2 VALUES ( 'cc', 22 ); ---Testcase 71: +--Testcase 81: INSERT INTO t2 VALUES ( 'ee', 42 ); ---Testcase 72: +--Testcase 82: INSERT INTO t3 VALUES ( 'bb', 13 ); ---Testcase 73: +--Testcase 83: INSERT INTO t3 VALUES ( 'cc', 23 ); ---Testcase 74: +--Testcase 84: INSERT INTO t3 VALUES ( 'dd', 33 ); ---Testcase 75: +--Testcase 85: SELECT * FROM t1 FULL JOIN t2 USING (name) FULL JOIN t3 USING (name); -- @@ -372,21 +394,21 @@ SELECT * FROM t1 FULL JOIN t2 USING (name) FULL JOIN t3 USING (name); -- -- Basic cases (we expect planner to pull up the subquery here) ---Testcase 76: +--Testcase 86: SELECT * FROM (SELECT * FROM t2) as s2 INNER JOIN (SELECT * FROM t3) s3 USING (name); ---Testcase 77: +--Testcase 87: SELECT * FROM (SELECT * FROM t2) as s2 LEFT JOIN (SELECT * FROM t3) s3 USING (name); ---Testcase 78: +--Testcase 88: SELECT * FROM (SELECT * FROM t2) as s2 FULL JOIN @@ -395,25 +417,25 @@ USING (name); -- Cases with non-nullable expressions in subquery results; -- make sure these go to null as expected ---Testcase 79: +--Testcase 89: SELECT * FROM (SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 NATURAL INNER JOIN (SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; ---Testcase 80: +--Testcase 90: SELECT * FROM (SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 NATURAL LEFT JOIN (SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; ---Testcase 81: +--Testcase 91: SELECT * FROM (SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 NATURAL FULL JOIN (SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; ---Testcase 82: +--Testcase 92: SELECT * FROM (SELECT name, n as s1_n, 1 as s1_1 FROM t1) as s1 NATURAL INNER JOIN @@ -421,7 +443,7 @@ NATURAL INNER JOIN NATURAL INNER JOIN (SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; ---Testcase 83: +--Testcase 93: SELECT * FROM (SELECT name, n as s1_n, 1 as s1_1 FROM t1) as s1 NATURAL FULL JOIN @@ -429,7 +451,7 @@ NATURAL FULL JOIN NATURAL FULL JOIN (SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; ---Testcase 84: +--Testcase 94: SELECT * FROM (SELECT name, n as s1_n FROM t1) as s1 NATURAL FULL JOIN @@ -439,7 +461,7 @@ NATURAL FULL JOIN (SELECT name, n as s3_n FROM t3) as s3 ) ss2; ---Testcase 85: +--Testcase 95: SELECT * FROM (SELECT name, n as s1_n FROM t1) as s1 NATURAL FULL JOIN @@ -450,7 +472,7 @@ NATURAL FULL JOIN ) ss2; -- Constants as join keys can also be problematic ---Testcase 86: +--Testcase 96: SELECT * FROM (SELECT name, n as s1_n FROM t1) as s1 FULL JOIN @@ -460,60 +482,60 @@ ON (s1_n = s2_n); -- Test for propagation of nullability constraints into sub-joins ---Testcase 87: +--Testcase 97: create foreign table x (x1 int, x2 int) server influxdb_svr; ---Testcase 88: +--Testcase 98: insert into x values (1,11); ---Testcase 89: +--Testcase 99: insert into x values (2,22); ---Testcase 90: +--Testcase 100: insert into x values (3,null); ---Testcase 91: +--Testcase 101: insert into x values (4,44); ---Testcase 92: +--Testcase 102: insert into x values (5,null); ---Testcase 93: +--Testcase 103: create foreign table y (y1 int, y2 int) server influxdb_svr; ---Testcase 94: +--Testcase 104: insert into y values (1,111); ---Testcase 95: +--Testcase 105: insert into y values (2,222); ---Testcase 96: +--Testcase 106: insert into y values (3,333); ---Testcase 97: +--Testcase 107: insert into y values (4,null); ---Testcase 98: +--Testcase 108: select * from x; ---Testcase 99: +--Testcase 109: select * from y; ---Testcase 100: +--Testcase 110: select * from x left join y on (x1 = y1 and x2 is not null); ---Testcase 101: +--Testcase 111: select * from x left join y on (x1 = y1 and y2 is not null); ---Testcase 102: +--Testcase 112: select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) on (x1 = xx1); ---Testcase 103: +--Testcase 113: select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) on (x1 = xx1 and x2 is not null); ---Testcase 104: +--Testcase 114: select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) on (x1 = xx1 and y2 is not null); ---Testcase 105: +--Testcase 115: select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) on (x1 = xx1 and xx2 is not null); -- these should NOT give the same answers as above ---Testcase 106: +--Testcase 116: select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) on (x1 = xx1) where (x2 is not null); ---Testcase 107: +--Testcase 117: select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) on (x1 = xx1) where (y2 is not null); ---Testcase 108: +--Testcase 118: select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) on (x1 = xx1) where (xx2 is not null); @@ -521,7 +543,7 @@ on (x1 = xx1) where (xx2 is not null); -- regression test: check for bug with propagation of implied equality -- to outside an IN -- ---Testcase 109: +--Testcase 119: select count(*) from tenk1 a where unique1 in (select unique1 from tenk1 b join tenk1 c using (unique1) where b.unique2 = 42); @@ -530,7 +552,7 @@ select count(*) from tenk1 a where unique1 in -- regression test: check for failure to generate a plan with multiple -- degenerate IN clauses -- ---Testcase 110: +--Testcase 120: select count(*) from tenk1 x where x.unique1 in (select a.f1 from int4_tbl a,float8_tbl b where a.f1=b.f1) and x.unique1 = 0 and @@ -538,11 +560,11 @@ select count(*) from tenk1 x where -- try that with GEQO too begin; ---Testcase 111: +--Testcase 121: set geqo = on; ---Testcase 112: +--Testcase 122: set geqo_threshold = 2; ---Testcase 113: +--Testcase 123: select count(*) from tenk1 x where x.unique1 in (select a.f1 from int4_tbl a,float8_tbl b where a.f1=b.f1) and x.unique1 = 0 and @@ -552,32 +574,32 @@ rollback; -- -- regression test: be sure we cope with proven-dummy append rels -- ---Testcase 114: -create table b (aa int, bb int); +--Testcase 124: +CREATE FOREIGN TABLE b_star(class char, aa int4, bb text, a int4) SERVER influxdb_svr; ---Testcase 115: +--Testcase 125: explain (costs off) select aa, bb, unique1, unique1 - from tenk1 right join b on aa = unique1 + from tenk1 right join b_star on aa = unique1 where bb < bb and bb is null; ---Testcase 116: +--Testcase 126: select aa, bb, unique1, unique1 - from tenk1 right join b on aa = unique1 + from tenk1 right join b_star on aa = unique1 where bb < bb and bb is null; ---Testcase 117: -drop table b; +--Testcase 127: +drop foreign table b_star; -- -- regression test: check handling of empty-FROM subquery underneath outer join -- ---Testcase 118: +--Testcase 128: explain (costs off) select * from int8_tbl i1 left join (int8_tbl i2 join (select 123 as x) ss on i2.q1 = x) on i1.q2 = i2.q2 order by 1, 2; ---Testcase 119: +--Testcase 129: select * from int8_tbl i1 left join (int8_tbl i2 join (select 123 as x) ss on i2.q1 = x) on i1.q2 = i2.q2 order by 1, 2; @@ -586,7 +608,7 @@ order by 1, 2; -- regression test: check a case where join_clause_is_movable_into() gives -- an imprecise result, causing an assertion failure -- ---Testcase 120: +--Testcase 130: select count(*) from (select t3.tenthous as x1, coalesce(t1.stringu1, t2.stringu1) as x2 @@ -601,7 +623,7 @@ where t4.thousand = t5.unique1 and ss.x1 = t4.tenthous and ss.x2 = t5.stringu1; -- regression test: check a case where we formerly missed including an EC -- enforcement clause because it was expected to be handled at scan level -- ---Testcase 121: +--Testcase 131: explain (costs off) select a.f1, b.f1, t.thousand, t.tenthous from tenk1 t, @@ -609,7 +631,7 @@ select a.f1, b.f1, t.thousand, t.tenthous from (select sum(f1) as f1 from int4_tbl i4b) b where b.f1 = t.thousand and a.f1 = b.f1 and (a.f1+b.f1+999) = t.tenthous; ---Testcase 122: +--Testcase 132: select a.f1, b.f1, t.thousand, t.tenthous from tenk1 t, (select sum(f1)+1 as f1 from int4_tbl i4a) a, @@ -620,14 +642,14 @@ where b.f1 = t.thousand and a.f1 = b.f1 and (a.f1+b.f1+999) = t.tenthous; -- check a case where we formerly got confused by conflicting sort orders -- in redundant merge join path keys -- ---Testcase 123: +--Testcase 133: explain (costs off) select * from j1_tbl full join (select * from j2_tbl order by j2_tbl.i desc, j2_tbl.k asc) j2_tbl on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; ---Testcase 124: +--Testcase 134: select * from j1_tbl full join (select * from j2_tbl order by j2_tbl.i desc, j2_tbl.k asc) j2_tbl @@ -636,7 +658,7 @@ select * from -- -- a different check for handling of redundant sort keys in merge joins -- ---Testcase 125: +--Testcase 135: explain (costs off) select count(*) from (select * from tenk1 x order by x.thousand, x.twothousand, x.fivethous) x @@ -644,7 +666,7 @@ select count(*) from (select * from tenk1 y order by y.unique2) y on x.thousand = y.unique2 and x.twothousand = y.hundred and x.fivethous = y.unique2; ---Testcase 126: +--Testcase 136: select count(*) from (select * from tenk1 x order by x.thousand, x.twothousand, x.fivethous) x left join @@ -656,167 +678,204 @@ select count(*) from -- Clean up -- ---Testcase 127: +--Testcase 137: DELETE FROM t1; ---Testcase 128: +--Testcase 138: DELETE FROM t2; ---Testcase 129: +--Testcase 139: DELETE FROM t3; ---Testcase 130: +--Testcase 140: DROP FOREIGN TABLE t1; ---Testcase 131: +--Testcase 141: DROP FOREIGN TABLE t2; ---Testcase 132: +--Testcase 142: DROP FOREIGN TABLE t3; ---Testcase 133: +--Testcase 143: DELETE FROM J1_TBL; +--Testcase 575: DROP FOREIGN TABLE J1_TBL; ---Testcase 134: +--Testcase 144: DELETE FROM J2_TBL; +--Testcase 576: DROP FOREIGN TABLE J2_TBL; +--Testcase 577: DELETE FROM x; +--Testcase 578: DELETE FROM y; +--Testcase 579: DROP FOREIGN TABLE x; +--Testcase 580: DROP FOREIGN TABLE y; -- Both DELETE and UPDATE allow the specification of additional tables -- to "join" against to determine which rows should be modified. ---Testcase 135: +--Testcase 145: CREATE FOREIGN TABLE t1 (a int, b int) SERVER influxdb_svr; ---Testcase 136: +--Testcase 146: CREATE FOREIGN TABLE t2 (a int, b int) SERVER influxdb_svr; ---Testcase 137: +--Testcase 147: CREATE FOREIGN TABLE t3 (x int, y int) SERVER influxdb_svr; ---Testcase 138: +--Testcase 148: INSERT INTO t1 VALUES (5, 10); ---Testcase 139: +--Testcase 149: INSERT INTO t1 VALUES (15, 20); ---Testcase 140: +--Testcase 150: INSERT INTO t1 VALUES (100, 100); ---Testcase 141: +--Testcase 151: INSERT INTO t1 VALUES (200, 1000); ---Testcase 142: +--Testcase 152: INSERT INTO t2 VALUES (200, 2000); ---Testcase 143: +--Testcase 153: INSERT INTO t3 VALUES (5, 20); ---Testcase 144: +--Testcase 154: INSERT INTO t3 VALUES (6, 7); ---Testcase 145: +--Testcase 155: INSERT INTO t3 VALUES (7, 8); ---Testcase 146: +--Testcase 156: INSERT INTO t3 VALUES (500, 100); ---Testcase 147: +--Testcase 157: ALTER TABLE t3 ADD time timestamp; ---Testcase 148: +--Testcase 158: SELECT x, y FROM t3; ---Testcase 149: +--Testcase 159: DELETE FROM t3 USING t1 table1 WHERE t3.x = table1.a; ---Testcase 150: +--Testcase 160: SELECT x, y FROM t3; ---Testcase 151: +--Testcase 161: DELETE FROM t3 USING t1 JOIN t2 USING (a) WHERE t3.x > t1.a; ---Testcase 152: +--Testcase 162: SELECT x, y FROM t3; ---Testcase 153: +--Testcase 163: DELETE FROM t3 USING t3 t3_other WHERE t3.x = t3_other.x AND t3.y = t3_other.y; ---Testcase 154: +--Testcase 164: SELECT x, y FROM t3; -- Test join against inheritance tree ---Testcase 155: +--Testcase 165: create temp table t2a () inherits (t2); ---Testcase 156: +--Testcase 166: insert into t2a values (200, 2001); ---Testcase 157: +--Testcase 167: select * from t1 left join t2 on (t1.a = t2.a); -- Test matching of column name with wrong alias ---Testcase 158: +--Testcase 168: select t1.x from t1 join t3 on (t1.a = t3.x); +-- Test matching of locking clause with wrong alias + +--Testcase 602: +select t1.*, t2.*, unnamed_join.* from + t1 join t2 on (t1.a = t2.a), t3 as unnamed_join + for update of unnamed_join; + +--Testcase 603: +select foo.*, unnamed_join.* from + t1 join t2 using (a) as foo, t3 as unnamed_join + for update of unnamed_join; + +--Testcase 604: +select foo.*, unnamed_join.* from + t1 join t2 using (a) as foo, t3 as unnamed_join + for update of foo; + +--Testcase 605: +select bar.*, unnamed_join.* from + (t1 join t2 using (a) as foo) as bar, t3 as unnamed_join + for update of foo; + +--Testcase 606: +select bar.*, unnamed_join.* from + (t1 join t2 using (a) as foo) as bar, t3 as unnamed_join + for update of bar; + -- -- regression test for 8.1 merge right join bug -- ---Testcase 159: +--Testcase 169: CREATE FOREIGN TABLE tt1 ( tt1_id int4, joincol int4 ) SERVER influxdb_svr; ---Testcase 160: +--Testcase 170: INSERT INTO tt1 VALUES (1, 11); ---Testcase 161: +--Testcase 171: INSERT INTO tt1 VALUES (2, NULL); ---Testcase 162: +--Testcase 172: CREATE FOREIGN TABLE tt2 ( tt2_id int4, joincol int4 ) SERVER influxdb_svr; ---Testcase 163: +--Testcase 173: INSERT INTO tt2 VALUES (21, 11); ---Testcase 164: +--Testcase 174: INSERT INTO tt2 VALUES (22, 11); ---Testcase 165: +--Testcase 175: set enable_hashjoin to off; ---Testcase 166: +--Testcase 176: set enable_nestloop to off; -- these should give the same results ---Testcase 167: +--Testcase 177: select tt1.*, tt2.* from tt1 left join tt2 on tt1.joincol = tt2.joincol; ---Testcase 168: +--Testcase 178: select tt1.*, tt2.* from tt2 right join tt1 on tt1.joincol = tt2.joincol; ---Testcase 169: +--Testcase 179: reset enable_hashjoin; ---Testcase 170: +--Testcase 180: reset enable_nestloop; -- -- regression test for bug #13908 (hash join with skew tuples & nbatch increase) -- ---Testcase 171: +--Testcase 181: set work_mem to '64kB'; ---Testcase 172: +--Testcase 182: set enable_mergejoin to off; +--Testcase 183: +set enable_memoize to off; ---Testcase 173: +--Testcase 184: explain (costs off) select count(*) from tenk1 a, tenk1 b where a.hundred = b.thousand and (b.fivethous % 10) < 10; ---Testcase 174: +--Testcase 185: select count(*) from tenk1 a, tenk1 b where a.hundred = b.thousand and (b.fivethous % 10) < 10; ---Testcase 175: +--Testcase 186: reset work_mem; ---Testcase 176: +--Testcase 187: reset enable_mergejoin; +--Testcase 188: +reset enable_memoize; -- -- regression test for 8.2 bug with improper re-ordering of left joins -- ---Testcase 177: +--Testcase 189: create foreign table tt3(f1 int, f2 text) server influxdb_svr; ---Testcase 178: +--Testcase 190: insert into tt3 select x, repeat('xyzzy', 100) from generate_series(1,10000) x; ---Testcase 179: +--Testcase 191: create foreign table tt4(f1 int) server influxdb_svr; ---Testcase 180: +--Testcase 192: insert into tt4 values (0),(1),(9999); ---Testcase 181: +--Testcase 193: SELECT a.f1 FROM tt4 a LEFT JOIN ( @@ -830,10 +889,10 @@ WHERE d.f1 IS NULL; -- regression test for proper handling of outer joins within antijoins -- ---Testcase 182: +--Testcase 194: create foreign table tt4x(c1 int, c2 int, c3 int) server influxdb_svr; ---Testcase 183: +--Testcase 195: explain (costs off) select * from tt4x t1 where not exists ( @@ -849,50 +908,50 @@ where not exists ( -- regression test for problems of the sort depicted in bug #3494 -- ---Testcase 184: +--Testcase 196: create foreign table tt5(f1 int, f2 int) server influxdb_svr; ---Testcase 185: +--Testcase 197: create foreign table tt6(f1 int, f2 int) server influxdb_svr; ---Testcase 186: +--Testcase 198: insert into tt5 values(1, 10); ---Testcase 187: +--Testcase 199: insert into tt5 values(1, 11); ---Testcase 188: +--Testcase 200: insert into tt6 values(1, 9); ---Testcase 189: +--Testcase 201: insert into tt6 values(1, 2); ---Testcase 190: +--Testcase 202: insert into tt6 values(2, 9); ---Testcase 191: +--Testcase 203: select * from tt5,tt6 where tt5.f1 = tt6.f1 and tt5.f1 = tt5.f2 - tt6.f2; -- -- regression test for problems of the sort depicted in bug #3588 -- ---Testcase 192: +--Testcase 204: create foreign table xx (pkxx int) server influxdb_svr; ---Testcase 193: +--Testcase 205: create foreign table yy (pkyy int, pkxx int) server influxdb_svr; ---Testcase 194: +--Testcase 206: insert into xx values (1); ---Testcase 195: +--Testcase 207: insert into xx values (2); ---Testcase 196: +--Testcase 208: insert into xx values (3); ---Testcase 197: +--Testcase 209: insert into yy values (101, 1); ---Testcase 198: +--Testcase 210: insert into yy values (201, 2); ---Testcase 199: +--Testcase 211: insert into yy values (301, NULL); ---Testcase 200: +--Testcase 212: select yy.pkyy as yy_pkyy, yy.pkxx as yy_pkxx, yya.pkyy as yya_pkyy, xxa.pkxx as xxa_pkxx, xxb.pkxx as xxb_pkxx from yy @@ -905,27 +964,27 @@ from yy -- (as seen in early 8.2.x releases) -- ---Testcase 201: +--Testcase 213: create foreign table zt1 (f1 int) server influxdb_svr; ---Testcase 202: +--Testcase 214: create foreign table zt2 (f2 int) server influxdb_svr; ---Testcase 203: +--Testcase 215: create foreign table zt3 (f3 int) server influxdb_svr; ---Testcase 204: +--Testcase 216: insert into zt1 values(53); ---Testcase 205: +--Testcase 217: insert into zt2 values(53); ---Testcase 206: +--Testcase 218: select * from zt2 left join zt3 on (f2 = f3) left join zt1 on (f3 = f1) where f2 = 53; ---Testcase 207: +--Testcase 219: create temp view zv1 as select *,'dummy'::text AS junk from zt1; ---Testcase 208: +--Testcase 220: select * from zt2 left join zt3 on (f2 = f3) left join zv1 on (f3 = f1) @@ -936,7 +995,7 @@ where f2 = 53; -- (as seen in early 8.3.x releases) -- ---Testcase 209: +--Testcase 221: select a.unique2, a.ten, b.tenthous, b.unique2, b.hundred from tenk1 a left join tenk1 b on a.unique2 = b.tenthous where a.unique1 = 42 and @@ -945,14 +1004,14 @@ where a.unique1 = 42 and -- -- test proper positioning of one-time quals in EXISTS (8.4devel bug) -- ---Testcase 210: +--Testcase 222: prepare foo(bool) as select count(*) from tenk1 a left join tenk1 b on (a.unique2 = b.unique1 and exists (select 1 from tenk1 c where c.thousand = b.unique2 and $1)); ---Testcase 211: +--Testcase 223: execute foo(true); ---Testcase 212: +--Testcase 224: execute foo(false); -- @@ -961,24 +1020,24 @@ execute foo(false); begin; ---Testcase 213: +--Testcase 225: set enable_mergejoin = 1; ---Testcase 214: +--Testcase 226: set enable_hashjoin = 0; ---Testcase 215: +--Testcase 227: set enable_nestloop = 0; ---Testcase 216: +--Testcase 228: create foreign table a (i integer) server influxdb_svr; ---Testcase 217: +--Testcase 229: create foreign table b (x integer, y integer) server influxdb_svr; ---Testcase 218: +--Testcase 230: select * from a left join b on i = x and i = y and x = i; ---Testcase 219: +--Testcase 231: DROP FOREIGN TABLE a; ---Testcase 220: +--Testcase 232: DROP FOREIGN TABLE b; rollback; @@ -987,24 +1046,24 @@ rollback; -- begin; ---Testcase 221: +--Testcase 233: create type mycomptype as (id int, v bigint); ---Testcase 222: +--Testcase 234: create temp table tidv (idv mycomptype); ---Testcase 223: +--Testcase 235: create index on tidv (idv); ---Testcase 224: +--Testcase 236: explain (costs off) select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; ---Testcase 225: +--Testcase 237: set enable_mergejoin = 0; ---Testcase 226: +--Testcase 238: set enable_hashjoin = 0; ---Testcase 227: +--Testcase 239: explain (costs off) select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; @@ -1013,22 +1072,22 @@ rollback; -- -- test NULL behavior of whole-row Vars, per bug #5025 -- ---Testcase 228: +--Testcase 240: select t1.q2, count(t2.*) from int8_tbl t1 left join int8_tbl t2 on (t1.q2 = t2.q1) group by t1.q2 order by 1; ---Testcase 229: +--Testcase 241: select t1.q2, count(t2.*) from int8_tbl t1 left join (select * from int8_tbl) t2 on (t1.q2 = t2.q1) group by t1.q2 order by 1; ---Testcase 230: +--Testcase 242: select t1.q2, count(t2.*) from int8_tbl t1 left join (select * from int8_tbl offset 0) t2 on (t1.q2 = t2.q1) group by t1.q2 order by 1; ---Testcase 231: +--Testcase 243: select t1.q2, count(t2.*) from int8_tbl t1 left join (select q1, case when q2=1 then 1 else q2 end as q2 from int8_tbl) t2 @@ -1040,37 +1099,37 @@ group by t1.q2 order by 1; -- begin; ---Testcase 232: +--Testcase 244: create foreign table a ( code char ) server influxdb_svr; ---Testcase 233: +--Testcase 245: create foreign table b ( a char, num integer ) server influxdb_svr; ---Testcase 234: +--Testcase 246: create foreign table c ( name char, a char ) server influxdb_svr; ---Testcase 235: +--Testcase 247: insert into a (code) values ('p'); ---Testcase 236: +--Testcase 248: insert into a (code) values ('q'); ---Testcase 237: +--Testcase 249: insert into b (a, num) values ('p', 1); ---Testcase 238: +--Testcase 250: insert into b (a, num) values ('p', 2); ---Testcase 239: +--Testcase 251: insert into c (name, a) values ('A', 'p'); ---Testcase 240: +--Testcase 252: insert into c (name, a) values ('B', 'q'); ---Testcase 241: +--Testcase 253: insert into c (name, a) values ('C', null); ---Testcase 242: +--Testcase 254: select c.name, ss.code, ss.b_cnt, ss.const from c left join (select a.code, coalesce(b_grp.cnt, 0) as b_cnt, -1 as const @@ -1081,17 +1140,17 @@ from c left join on (c.a = ss.code) order by c.name; ---Testcase 243: +--Testcase 255: DELETE FROM a; ---Testcase 244: +--Testcase 256: DELETE FROM b; ---Testcase 245: +--Testcase 257: DELETE FROM c; ---Testcase 246: +--Testcase 258: DROP FOREIGN TABLE a; ---Testcase 247: +--Testcase 259: DROP FOREIGN TABLE b; ---Testcase 248: +--Testcase 260: DROP FOREIGN TABLE c; rollback; @@ -1099,7 +1158,7 @@ rollback; -- test incorrect handling of placeholders that only appear in targetlists, -- per bug #6154 -- ---Testcase 249: +--Testcase 261: SELECT * FROM ( SELECT 1 as key1 ) sub1 LEFT JOIN @@ -1117,7 +1176,7 @@ LEFT JOIN ON sub1.key1 = sub2.key3; -- test the path using join aliases, too ---Testcase 250: +--Testcase 262: SELECT * FROM ( SELECT 1 as key1 ) sub1 LEFT JOIN @@ -1138,7 +1197,7 @@ ON sub1.key1 = sub2.key3; -- test case where a PlaceHolderVar is used as a nestloop parameter -- ---Testcase 251: +--Testcase 263: EXPLAIN (COSTS OFF) SELECT qq, unique1 FROM @@ -1148,7 +1207,7 @@ SELECT qq, unique1 USING (qq) INNER JOIN tenk1 c ON qq = unique2; ---Testcase 252: +--Testcase 264: SELECT qq, unique1 FROM ( SELECT COALESCE(q1, 0) AS qq FROM int8_tbl a ) AS ss1 @@ -1161,46 +1220,46 @@ SELECT qq, unique1 -- nested nestloops can require nested PlaceHolderVars -- ---Testcase 253: +--Testcase 265: create foreign table nt1 ( id int, a1 boolean, a2 boolean ) server influxdb_svr; ---Testcase 254: +--Testcase 266: create foreign table nt2 ( id int, nt1_id int, b1 boolean, b2 boolean ) server influxdb_svr; ---Testcase 255: +--Testcase 267: create foreign table nt3 ( id int, nt2_id int, c1 boolean ) server influxdb_svr; ---Testcase 256: +--Testcase 268: insert into nt1 values (1,true,true); ---Testcase 257: +--Testcase 269: insert into nt1 values (2,true,false); ---Testcase 258: +--Testcase 270: insert into nt1 values (3,false,false); ---Testcase 259: +--Testcase 271: insert into nt2 values (1,1,true,true); ---Testcase 260: +--Testcase 272: insert into nt2 values (2,2,true,false); ---Testcase 261: +--Testcase 273: insert into nt2 values (3,3,false,false); ---Testcase 262: +--Testcase 274: insert into nt3 values (1,1,true); ---Testcase 263: +--Testcase 275: insert into nt3 values (2,2,false); ---Testcase 264: +--Testcase 276: insert into nt3 values (3,3,true); ---Testcase 265: +--Testcase 277: explain (costs off) select nt3.id from nt3 as nt3 @@ -1214,7 +1273,7 @@ from nt3 as nt3 on ss2.id = nt3.nt2_id where nt3.id = 1 and ss2.b3; ---Testcase 266: +--Testcase 278: select nt3.id from nt3 as nt3 left join @@ -1231,7 +1290,7 @@ where nt3.id = 1 and ss2.b3; -- test case where a PlaceHolderVar is propagated into a subquery -- ---Testcase 267: +--Testcase 279: explain (costs off) select * from int8_tbl t1 left join @@ -1241,7 +1300,7 @@ where 1 = (select 1 from int8_tbl t3 where ss.y is not null limit 1) order by 1,2; ---Testcase 268: +--Testcase 280: select * from int8_tbl t1 left join (select q1 as x, 42 as y from int8_tbl t2) ss @@ -1254,7 +1313,7 @@ order by 1,2; -- variant where a PlaceHolderVar is needed at a join, but not above the join -- ---Testcase 269: +--Testcase 281: explain (costs off) select * from int4_tbl as i41, @@ -1267,7 +1326,7 @@ select * from where ss1.loc = ss1.lat) as ss2 where i41.f1 > 0; ---Testcase 270: +--Testcase 282: select * from int4_tbl as i41, lateral @@ -1282,28 +1341,28 @@ where i41.f1 > 0; -- -- test the corner cases FULL JOIN ON TRUE and FULL JOIN ON FALSE -- ---Testcase 271: +--Testcase 283: select * from int4_tbl a full join int4_tbl b on true; ---Testcase 272: +--Testcase 284: select * from int4_tbl a full join int4_tbl b on false; -- -- test for ability to use a cartesian join when necessary -- ---Testcase 273: +--Testcase 285: create foreign table q1 (q1 int) server influxdb_svr; ---Testcase 274: +--Testcase 286: create foreign table q2 (q2 int) server influxdb_svr; ---Testcase 275: +--Testcase 287: explain (costs off) select * from tenk1 join int4_tbl on f1 = twothousand, q1, q2 where q1 = thousand or q2 = thousand; ---Testcase 276: +--Testcase 288: explain (costs off) select * from tenk1 join int4_tbl on f1 = twothousand, @@ -1314,7 +1373,7 @@ where thousand = (q1 + q2); -- test ability to generate a suitable plan for a star-schema query -- ---Testcase 277: +--Testcase 289: explain (costs off) select * from tenk1, int8_tbl a, int8_tbl b @@ -1324,7 +1383,7 @@ where thousand = a.q1 and tenthous = b.q1 and a.q2 = 1 and b.q2 = 2; -- test a corner case in which we shouldn't apply the star-schema optimization -- ---Testcase 278: +--Testcase 290: explain (costs off) select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from tenk1 t1 @@ -1339,7 +1398,7 @@ select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from on (subq1.y1 = t2.unique1) where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; ---Testcase 279: +--Testcase 291: select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from tenk1 t1 inner join int4_tbl i1 @@ -1355,7 +1414,7 @@ where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; -- variant that isn't quite a star-schema case ---Testcase 280: +--Testcase 292: select ss1.d1 from tenk1 as t1 inner join tenk1 as t2 @@ -1374,7 +1433,7 @@ where t1.unique1 < i4.f1; -- this variant is foldable by the remove-useless-RESULT-RTEs code ---Testcase 281: +--Testcase 293: explain (costs off) select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from tenk1 t1 @@ -1389,7 +1448,7 @@ select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from on (subq1.y1 = t2.unique1) where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; ---Testcase 282: +--Testcase 294: select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from tenk1 t1 inner join int4_tbl i1 @@ -1405,18 +1464,18 @@ where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; -- Here's a variant that we can't fold too aggressively, though, -- or we end up with noplace to evaluate the lateral PHV ---Testcase 283: +--Testcase 295: explain (verbose, costs off) select * from (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), lateral (select ss2.y as z limit 1) ss3; ---Testcase 284: +--Testcase 296: select * from (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), lateral (select ss2.y as z limit 1) ss3; -- Test proper handling of appendrel PHVs during useless-RTE removal ---Testcase 285: +--Testcase 297: explain (costs off) select * from (select 0 as z) as t1 @@ -1428,7 +1487,7 @@ select * from select a as b) as t3 where b; ---Testcase 286: +--Testcase 298: select * from (select 0 as z) as t1 left join @@ -1442,53 +1501,57 @@ where b; -- -- test inlining of immutable functions -- ---Testcase 287: +--Testcase 299: create function f_immutable_int4(i integer) returns integer as $$ begin return i; end; $$ language plpgsql immutable; -- check optimization of function scan with join ---Testcase 288: +--Testcase 300: explain (costs off) select unique1 from tenk1, (select * from f_immutable_int4(1) x) x where x = unique1; ---Testcase 289: +--Testcase 301: explain (verbose, costs off) select unique1, x.* from tenk1, (select *, random() from f_immutable_int4(1) x) x where x = unique1; ---Testcase 290: +--Testcase 302: explain (costs off) select unique1 from tenk1, f_immutable_int4(1) x where x = unique1; ---Testcase 291: +--Testcase 303: explain (costs off) select unique1 from tenk1, lateral f_immutable_int4(1) x where x = unique1; ---Testcase 292: +--Testcase 569: +explain (costs off) +select unique1 from tenk1, lateral f_immutable_int4(1) x where x in (select 17); + +--Testcase 304: explain (costs off) select unique1, x from tenk1 join f_immutable_int4(1) x on unique1 = x; ---Testcase 293: +--Testcase 305: explain (costs off) select unique1, x from tenk1 left join f_immutable_int4(1) x on unique1 = x; ---Testcase 294: +--Testcase 306: explain (costs off) select unique1, x from tenk1 right join f_immutable_int4(1) x on unique1 = x; ---Testcase 295: +--Testcase 307: explain (costs off) select unique1, x from tenk1 full join f_immutable_int4(1) x on unique1 = x; -- check that pullup of a const function allows further const-folding ---Testcase 296: +--Testcase 308: explain (costs off) select unique1 from tenk1, f_immutable_int4(1) x where x = 42; -- test inlining of immutable functions with PlaceHolderVars ---Testcase 297: +--Testcase 309: explain (costs off) select nt3.id from nt3 as nt3 @@ -1502,34 +1565,34 @@ from nt3 as nt3 on ss2.id = nt3.nt2_id where nt3.id = 1 and ss2.b3; ---Testcase 298: +--Testcase 310: drop function f_immutable_int4(int); -- test inlining when function returns composite ---Testcase 299: +--Testcase 311: create function mki8(bigint, bigint) returns int8_tbl as $$select row($1,$2)::int8_tbl$$ language sql; ---Testcase 300: +--Testcase 312: create function mki4(int) returns int4_tbl as $$select row($1)::int4_tbl$$ language sql; ---Testcase 301: +--Testcase 313: explain (verbose, costs off) select * from mki8(1,2); ---Testcase 302: +--Testcase 314: select * from mki8(1,2); ---Testcase 303: +--Testcase 315: explain (verbose, costs off) select * from mki4(42); ---Testcase 304: +--Testcase 316: select * from mki4(42); ---Testcase 305: +--Testcase 317: drop function mki8(bigint, bigint); ---Testcase 306: +--Testcase 318: drop function mki4(int); -- @@ -1537,15 +1600,15 @@ drop function mki4(int); -- (we used to only do this for indexable clauses) -- ---Testcase 307: +--Testcase 319: explain (costs off) select * from tenk1 a join tenk1 b on (a.unique1 = 1 and b.unique1 = 2) or (a.unique2 = 3 and b.hundred = 4); ---Testcase 308: +--Testcase 320: explain (costs off) select * from tenk1 a join tenk1 b on (a.unique1 = 1 and b.unique1 = 2) or (a.unique2 = 3 and b.ten = 4); ---Testcase 309: +--Testcase 321: explain (costs off) select * from tenk1 a join tenk1 b on (a.unique1 = 1 and b.unique1 = 2) or @@ -1555,34 +1618,34 @@ select * from tenk1 a join tenk1 b on -- test placement of movable quals in a parameterized join tree -- ---Testcase 310: +--Testcase 322: explain (costs off) select * from tenk1 t1 left join (tenk1 t2 join tenk1 t3 on t2.thousand = t3.unique2) on t1.hundred = t2.hundred and t1.ten = t3.ten where t1.unique1 = 1; ---Testcase 311: +--Testcase 323: explain (costs off) select * from tenk1 t1 left join (tenk1 t2 join tenk1 t3 on t2.thousand = t3.unique2) on t1.hundred = t2.hundred and t1.ten + t2.ten = t3.ten where t1.unique1 = 1; ---Testcase 312: +--Testcase 324: explain (costs off) select count(*) from tenk1 a join tenk1 b on a.unique1 = b.unique2 left join tenk1 c on a.unique2 = b.unique1 and c.thousand = a.thousand join int4_tbl on b.thousand = f1; ---Testcase 313: +--Testcase 325: select count(*) from tenk1 a join tenk1 b on a.unique1 = b.unique2 left join tenk1 c on a.unique2 = b.unique1 and c.thousand = a.thousand join int4_tbl on b.thousand = f1; ---Testcase 314: +--Testcase 326: explain (costs off) select b.unique1 from tenk1 a join tenk1 b on a.unique1 = b.unique2 @@ -1591,7 +1654,7 @@ select b.unique1 from right join int4_tbl i2 on i2.f1 = b.tenthous order by 1; ---Testcase 315: +--Testcase 327: select b.unique1 from tenk1 a join tenk1 b on a.unique1 = b.unique2 left join tenk1 c on b.unique1 = 42 and c.thousand = a.thousand @@ -1599,7 +1662,7 @@ select b.unique1 from right join int4_tbl i2 on i2.f1 = b.tenthous order by 1; ---Testcase 316: +--Testcase 328: explain (costs off) select * from ( @@ -1609,7 +1672,7 @@ select * from where fault = 122 order by fault; ---Testcase 317: +--Testcase 329: select * from ( select unique1, q1, coalesce(unique1, -1) + q1 as fault @@ -1618,14 +1681,14 @@ select * from where fault = 122 order by fault; ---Testcase 318: +--Testcase 330: explain (costs off) select * from (values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x left join unnest(v1ys) as u1(u1y) on u1y = v2y; ---Testcase 319: +--Testcase 331: select * from (values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x @@ -1635,24 +1698,24 @@ left join unnest(v1ys) as u1(u1y) on u1y = v2y; -- test handling of potential equivalence clauses above outer joins -- ---Testcase 320: +--Testcase 332: explain (costs off) select q1, unique2, thousand, hundred from int8_tbl a left join tenk1 b on q1 = unique2 where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123); ---Testcase 321: +--Testcase 333: select q1, unique2, thousand, hundred from int8_tbl a left join tenk1 b on q1 = unique2 where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123); ---Testcase 322: +--Testcase 334: explain (costs off) select f1, unique2, case when unique2 is null then f1 else 0 end from int4_tbl a left join tenk1 b on f1 = unique2 where (case when unique2 is null then f1 else 0 end) = 0; ---Testcase 323: +--Testcase 335: select f1, unique2, case when unique2 is null then f1 else 0 end from int4_tbl a left join tenk1 b on f1 = unique2 where (case when unique2 is null then f1 else 0 end) = 0; @@ -1661,13 +1724,13 @@ select f1, unique2, case when unique2 is null then f1 else 0 end -- another case with equivalence clauses above outer joins (bug #8591) -- ---Testcase 324: +--Testcase 336: explain (costs off) select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand) from tenk1 a left join tenk1 b on b.thousand = a.unique1 left join tenk1 c on c.unique2 = coalesce(b.twothousand, a.twothousand) where a.unique2 < 10 and coalesce(b.twothousand, a.twothousand) = 44; ---Testcase 325: +--Testcase 337: select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand) from tenk1 a left join tenk1 b on b.thousand = a.unique1 left join tenk1 c on c.unique2 = coalesce(b.twothousand, a.twothousand) where a.unique2 < 10 and coalesce(b.twothousand, a.twothousand) = 44; @@ -1676,7 +1739,7 @@ select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand) -- check handling of join aliases when flattening multiple levels of subquery -- ---Testcase 326: +--Testcase 338: explain (verbose, costs off) select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from (values (0),(1)) foo1(join_key) @@ -1691,7 +1754,7 @@ left join ) foo3 using (join_key); ---Testcase 327: +--Testcase 339: select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from (values (0),(1)) foo1(join_key) left join @@ -1708,10 +1771,10 @@ using (join_key); -- -- test successful handling of nested outer joins with degenerate join quals -- ---Testcase 328: +--Testcase 340: create foreign table text_tbl(f1 text) server influxdb_svr; ---Testcase 329: +--Testcase 341: explain (verbose, costs off) select t1.* from text_tbl t1 @@ -1724,7 +1787,7 @@ select t1.* from left join int4_tbl i4 on (i8.q2 = i4.f1); ---Testcase 330: +--Testcase 342: select t1.* from text_tbl t1 left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 @@ -1736,7 +1799,7 @@ select t1.* from left join int4_tbl i4 on (i8.q2 = i4.f1); ---Testcase 331: +--Testcase 343: explain (verbose, costs off) select t1.* from text_tbl t1 @@ -1749,7 +1812,7 @@ select t1.* from left join int4_tbl i4 on (i8.q2 = i4.f1); ---Testcase 332: +--Testcase 344: select t1.* from text_tbl t1 left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 @@ -1761,7 +1824,7 @@ select t1.* from left join int4_tbl i4 on (i8.q2 = i4.f1); ---Testcase 333: +--Testcase 345: explain (verbose, costs off) select t1.* from text_tbl t1 @@ -1775,7 +1838,7 @@ select t1.* from left join int4_tbl i4 on (i8.q2 = i4.f1); ---Testcase 334: +--Testcase 346: select t1.* from text_tbl t1 left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 @@ -1788,7 +1851,7 @@ select t1.* from left join int4_tbl i4 on (i8.q2 = i4.f1); ---Testcase 335: +--Testcase 347: explain (verbose, costs off) select * from text_tbl t1 @@ -1799,7 +1862,7 @@ select * from left join int4_tbl i4 on i8.q1 = i4.f1; ---Testcase 336: +--Testcase 348: select * from text_tbl t1 inner join int8_tbl i8 @@ -1813,7 +1876,7 @@ select * from -- test for appropriate join order in the presence of lateral references -- ---Testcase 337: +--Testcase 349: explain (verbose, costs off) select * from text_tbl t1 @@ -1822,7 +1885,7 @@ select * from lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss where t1.f1 = ss.f1; ---Testcase 338: +--Testcase 350: select * from text_tbl t1 left join int8_tbl i8 @@ -1830,7 +1893,7 @@ select * from lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss where t1.f1 = ss.f1; ---Testcase 339: +--Testcase 351: explain (verbose, costs off) select * from text_tbl t1 @@ -1840,7 +1903,7 @@ select * from lateral (select ss1.* from text_tbl t3 limit 1) as ss2 where t1.f1 = ss2.f1; ---Testcase 340: +--Testcase 352: select * from text_tbl t1 left join int8_tbl i8 @@ -1849,7 +1912,7 @@ select * from lateral (select ss1.* from text_tbl t3 limit 1) as ss2 where t1.f1 = ss2.f1; ---Testcase 341: +--Testcase 353: explain (verbose, costs off) select 1 from text_tbl as tt1 @@ -1859,7 +1922,7 @@ select 1 from lateral (select tt4.f1 as c0 from text_tbl as tt5 limit 1) as ss1 where tt1.f1 = ss1.c0; ---Testcase 342: +--Testcase 354: select 1 from text_tbl as tt1 inner join text_tbl as tt2 on (tt1.f1 = 'foo') @@ -1872,7 +1935,7 @@ where tt1.f1 = ss1.c0; -- check a case in which a PlaceHolderVar forces join order -- ---Testcase 343: +--Testcase 355: explain (verbose, costs off) select ss2.* from int4_tbl i41 @@ -1884,7 +1947,7 @@ select ss2.* from lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 where ss1.c2 = 0; ---Testcase 344: +--Testcase 356: select ss2.* from int4_tbl i41 left join int8_tbl i8 @@ -1899,7 +1962,7 @@ where ss1.c2 = 0; -- test successful handling of full join underneath left join (bug #14105) -- ---Testcase 345: +--Testcase 357: explain (costs off) select * from (select 1 as id) as xx @@ -1907,7 +1970,7 @@ select * from (tenk1 as a1 full join (select 1 as id) as yy on (a1.unique1 = yy.id)) on (xx.id = coalesce(yy.id)); ---Testcase 346: +--Testcase 358: select * from (select 1 as id) as xx left join @@ -1918,11 +1981,11 @@ select * from -- test ability to push constants through outer join clauses -- ---Testcase 347: +--Testcase 359: explain (costs off) select * from int4_tbl a left join tenk1 b on f1 = unique2 where f1 = 0; ---Testcase 348: +--Testcase 360: explain (costs off) select * from tenk1 a full join tenk1 b using(unique2) where unique2 = 42; @@ -1932,24 +1995,24 @@ explain (costs off) -- we force a mergejoin so that coalesce(b.q1, 1) appears as a join input -- ---Testcase 349: +--Testcase 361: set enable_hashjoin to off; ---Testcase 350: +--Testcase 362: set enable_nestloop to off; ---Testcase 351: +--Testcase 363: explain (verbose, costs off) select a.q2, b.q1 from int8_tbl a left join int8_tbl b on a.q2 = coalesce(b.q1, 1) where coalesce(b.q1, 1) > 0; ---Testcase 352: +--Testcase 364: select a.q2, b.q1 from int8_tbl a left join int8_tbl b on a.q2 = coalesce(b.q1, 1) where coalesce(b.q1, 1) > 0; ---Testcase 353: +--Testcase 365: reset enable_hashjoin; ---Testcase 354: +--Testcase 366: reset enable_nestloop; -- @@ -1958,35 +2021,35 @@ reset enable_nestloop; begin; ---Testcase 355: +--Testcase 367: CREATE FOREIGN TABLE a (id int, b_id int) SERVER influxdb_svr; ---Testcase 356: +--Testcase 368: CREATE FOREIGN TABLE b (id int, c_id int) SERVER influxdb_svr; ---Testcase 357: +--Testcase 369: CREATE FOREIGN TABLE c (id int) SERVER influxdb_svr; ---Testcase 358: +--Testcase 370: CREATE FOREIGN TABLE d (a int, b int) SERVER influxdb_svr; ---Testcase 359: +--Testcase 371: INSERT INTO a VALUES (0, 0), (1, NULL); ---Testcase 360: +--Testcase 372: INSERT INTO b VALUES (0, 0), (1, NULL); ---Testcase 361: +--Testcase 373: INSERT INTO c VALUES (0), (1); ---Testcase 362: +--Testcase 374: INSERT INTO d VALUES (1,3), (2,2), (3,1); -- all three cases should be optimizable into a simple seqscan ---Testcase 363: +--Testcase 375: explain (costs off) SELECT a.* FROM a LEFT JOIN b ON a.b_id = b.id; ---Testcase 364: +--Testcase 376: explain (costs off) SELECT b.* FROM b LEFT JOIN c ON b.c_id = c.id; ---Testcase 365: +--Testcase 377: explain (costs off) SELECT a.* FROM a LEFT JOIN (b left join c on b.c_id = c.id) ON (a.b_id = b.id); -- check optimization of outer join within another special join ---Testcase 366: +--Testcase 378: explain (costs off) select id from a where id in ( select b.id from b left join c on b.id = c.id @@ -1994,13 +2057,13 @@ select id from a where id in ( -- check that join removal works for a left join when joining a subquery -- that is guaranteed to be unique by its GROUP BY clause ---Testcase 367: +--Testcase 379: explain (costs off) select d.* from d left join (select * from b group by b.id, b.c_id) s on d.a = s.id and d.b = s.c_id; -- similarly, but keying off a DISTINCT clause ---Testcase 368: +--Testcase 380: explain (costs off) select d.* from d left join (select distinct * from b) s on d.a = s.id and d.b = s.c_id; @@ -2009,97 +2072,97 @@ select d.* from d left join (select distinct * from b) s -- not in the join condition. (Note: as of 9.6, we notice that b.id is a -- primary key and so drop b.c_id from the GROUP BY of the resulting plan; -- but this happens too late for join removal in the outer plan level.) ---Testcase 369: +--Testcase 381: explain (costs off) select d.* from d left join (select * from b group by b.id, b.c_id) s on d.a = s.id; -- similarly, but keying off a DISTINCT clause ---Testcase 370: +--Testcase 382: explain (costs off) select d.* from d left join (select distinct * from b) s on d.a = s.id; -- check join removal works when uniqueness of the join condition is enforced -- by a UNION ---Testcase 371: +--Testcase 383: explain (costs off) select d.* from d left join (select id from a union select id from b) s on d.a = s.id; -- check join removal with a cross-type comparison operator ---Testcase 372: +--Testcase 384: explain (costs off) select i8.* from int8_tbl i8 left join (select f1 from int4_tbl group by f1) i4 on i8.q1 = i4.f1; -- check join removal with lateral references ---Testcase 373: +--Testcase 385: explain (costs off) select 1 from (select a.id FROM a left join b on a.b_id = b.id) q, lateral generate_series(1, q.id) gs(i) where q.id = gs.i; ---Testcase 374: +--Testcase 386: DELETE FROM a; ---Testcase 375: +--Testcase 387: DELETE FROM b; ---Testcase 376: +--Testcase 388: DELETE FROM c; ---Testcase 377: +--Testcase 389: DELETE FROM d; ---Testcase 378: +--Testcase 390: DROP FOREIGN TABLE a; ---Testcase 379: +--Testcase 391: DROP FOREIGN TABLE b; ---Testcase 380: +--Testcase 392: DROP FOREIGN TABLE c; ---Testcase 381: +--Testcase 393: DROP FOREIGN TABLE d; rollback; ---Testcase 382: +--Testcase 394: create foreign table parent (k int, pd int) server influxdb_svr; ---Testcase 383: +--Testcase 395: create foreign table child (k int, cd int) server influxdb_svr; ---Testcase 384: +--Testcase 396: insert into parent values (1, 10), (2, 20), (3, 30); ---Testcase 385: +--Testcase 397: insert into child values (1, 100), (4, 400); -- this case is optimizable ---Testcase 386: +--Testcase 398: select p.* from parent p left join child c on (p.k = c.k); ---Testcase 387: +--Testcase 399: explain (costs off) select p.* from parent p left join child c on (p.k = c.k); -- this case is not ---Testcase 388: +--Testcase 400: select p.*, linked from parent p left join (select c.*, true as linked from child c) as ss on (p.k = ss.k); ---Testcase 389: +--Testcase 401: explain (costs off) select p.*, linked from parent p left join (select c.*, true as linked from child c) as ss on (p.k = ss.k); -- check for a 9.0rc1 bug: join removal breaks pseudoconstant qual handling ---Testcase 390: +--Testcase 402: select p.* from parent p left join child c on (p.k = c.k) where p.k = 1 and p.k = 2; ---Testcase 391: +--Testcase 403: explain (costs off) select p.* from parent p left join child c on (p.k = c.k) where p.k = 1 and p.k = 2; ---Testcase 392: +--Testcase 404: select p.* from (parent p left join child c on (p.k = c.k)) join parent x on p.k = x.k where p.k = 1 and p.k = 2; ---Testcase 393: +--Testcase 405: explain (costs off) select p.* from (parent p left join child c on (p.k = c.k)) join parent x on p.k = x.k @@ -2108,39 +2171,39 @@ select p.* from -- bug 5255: this is not optimizable by join removal begin; ---Testcase 394: +--Testcase 406: CREATE FOREIGN TABLE a (id int) SERVER influxdb_svr; ---Testcase 395: +--Testcase 407: CREATE FOREIGN TABLE b (id int, a_id int) SERVER influxdb_svr; ---Testcase 396: +--Testcase 408: INSERT INTO a VALUES (0), (1); ---Testcase 397: +--Testcase 409: INSERT INTO b VALUES (0, 0), (1, NULL); ---Testcase 398: +--Testcase 410: SELECT * FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0); ---Testcase 399: +--Testcase 411: SELECT b.* FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0); ---Testcase 400: +--Testcase 412: DELETE FROM a; ---Testcase 401: +--Testcase 413: DELETE FROM b; ---Testcase 402: +--Testcase 414: DROP FOREIGN TABLE a; ---Testcase 403: +--Testcase 415: DROP FOREIGN TABLE b; rollback; -- another join removal bug: this is not optimizable, either begin; ---Testcase 404: +--Testcase 416: create foreign table innertab (id int8, dat1 int8) server influxdb_svr; ---Testcase 405: +--Testcase 417: insert into innertab values(123, 42); ---Testcase 406: +--Testcase 418: SELECT * FROM (SELECT 1 AS x) ss1 LEFT JOIN @@ -2149,7 +2212,9 @@ SELECT * FROM ON true; -- Clean up +--Testcase 581: DELETE FROM innertab; +--Testcase 582: DROP FOREIGN TABLE innertab; rollback; @@ -2157,10 +2222,10 @@ rollback; -- another join removal bug: we must clean up correctly when removing a PHV begin; ---Testcase 407: +--Testcase 419: create foreign table uniquetbl (f1 text) server influxdb_svr; ---Testcase 408: +--Testcase 420: explain (costs off) select t1.* from uniquetbl as t1 @@ -2169,7 +2234,7 @@ select t1.* from left join uniquetbl t3 on t2.d1 = t3.f1; ---Testcase 409: +--Testcase 421: explain (costs off) select t0.* from @@ -2183,7 +2248,7 @@ from on t0.f1 = ss.case1 where ss.stringu2 !~* ss.case1; ---Testcase 410: +--Testcase 422: select t0.* from text_tbl t0 @@ -2199,7 +2264,7 @@ where ss.stringu2 !~* ss.case1; rollback; -- test case to expose miscomputation of required relid set for a PHV ---Testcase 411: +--Testcase 423: explain (verbose, costs off) select i8.*, ss.v, t.unique2 from int8_tbl i8 @@ -2208,7 +2273,7 @@ select i8.*, ss.v, t.unique2 left join tenk1 t on t.unique2 = ss.v where q2 = 456; ---Testcase 412: +--Testcase 424: select i8.*, ss.v, t.unique2 from int8_tbl i8 left join int4_tbl i4 on i4.f1 = 1 @@ -2216,15 +2281,37 @@ select i8.*, ss.v, t.unique2 left join tenk1 t on t.unique2 = ss.v where q2 = 456; +-- InfluxDB does not support partition table, create local table for test +-- and check a related issue where we miscompute required relids for +-- a PHV that's been translated to a child rel +--Testcase 570: +create temp table parttbl (a integer primary key) partition by range (a); +--Testcase 571: +create temp table parttbl1 partition of parttbl for values from (1) to (100); +--Testcase 572: +insert into parttbl values (11), (12); +--Testcase 573: +explain (costs off) +select * from + (select *, 12 as phv from parttbl) as ss + right join int4_tbl on true +where ss.a = ss.phv and f1 = 0; + +--Testcase 574: +select * from + (select *, 12 as phv from parttbl) as ss + right join int4_tbl on true +where ss.a = ss.phv and f1 = 0; + -- bug #8444: we've historically allowed duplicate aliases within aliased JOINs ---Testcase 413: +--Testcase 425: select * from int8_tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = f1; -- error ---Testcase 414: +--Testcase 426: select * from int8_tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = y.f1; -- error ---Testcase 415: +--Testcase 427: select * from int8_tbl x join (int4_tbl x cross join int4_tbl y(ff)) j on q1 = f1; -- ok @@ -2232,13 +2319,13 @@ select * from -- Test hints given on incorrect column references are useful -- ---Testcase 416: +--Testcase 428: select t1.uunique1 from tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, prefer "t1" suggestion ---Testcase 417: +--Testcase 429: select t2.uunique1 from tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, prefer "t2" suggestion ---Testcase 418: +--Testcase 430: select uunique1 from tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, suggest both at once @@ -2246,7 +2333,7 @@ select uunique1 from -- Take care to reference the correct RTE -- ---Testcase 556: +--Testcase 431: select atts.relid::regclass, s.* from pg_stats s join pg_attribute a on s.attname = a.attname and s.tablename = a.attrelid::regclass::text join (select unnest(indkey) attnum, @@ -2257,203 +2344,203 @@ select atts.relid::regclass, s.* from pg_stats s join -- Test LATERAL -- ---Testcase 419: +--Testcase 432: select unique2, x.* from tenk1 a, lateral (select * from int4_tbl b where f1 = a.unique1) x; ---Testcase 420: +--Testcase 433: explain (costs off) select unique2, x.* from tenk1 a, lateral (select * from int4_tbl b where f1 = a.unique1) x; ---Testcase 421: +--Testcase 434: select unique2, x.* from int4_tbl x, lateral (select unique2 from tenk1 where f1 = unique1) ss; ---Testcase 422: +--Testcase 435: explain (costs off) select unique2, x.* from int4_tbl x, lateral (select unique2 from tenk1 where f1 = unique1) ss; ---Testcase 423: +--Testcase 436: explain (costs off) select unique2, x.* from int4_tbl x cross join lateral (select unique2 from tenk1 where f1 = unique1) ss; ---Testcase 424: +--Testcase 437: select unique2, x.* from int4_tbl x left join lateral (select unique1, unique2 from tenk1 where f1 = unique1) ss on true; ---Testcase 425: +--Testcase 438: explain (costs off) select unique2, x.* from int4_tbl x left join lateral (select unique1, unique2 from tenk1 where f1 = unique1) ss on true; -- check scoping of lateral versus parent references -- the first of these should return int8_tbl.q2, the second int8_tbl.q1 ---Testcase 426: +--Testcase 439: select *, (select r from (select q1 as q2) x, (select q2 as r) y) from int8_tbl; ---Testcase 427: +--Testcase 440: select *, (select r from (select q1 as q2) x, lateral (select q2 as r) y) from int8_tbl; -- lateral with function in FROM ---Testcase 428: +--Testcase 441: select count(*) from tenk1 a, lateral generate_series(1,two) g; ---Testcase 429: +--Testcase 442: explain (costs off) select count(*) from tenk1 a, lateral generate_series(1,two) g; ---Testcase 430: +--Testcase 443: explain (costs off) select count(*) from tenk1 a cross join lateral generate_series(1,two) g; -- don't need the explicit LATERAL keyword for functions ---Testcase 431: +--Testcase 444: explain (costs off) select count(*) from tenk1 a, generate_series(1,two) g; -- lateral with UNION ALL subselect ---Testcase 432: +--Testcase 445: explain (costs off) select * from generate_series(100,200) g, lateral (select * from int8_tbl a where g = q1 union all select * from int8_tbl b where g = q2) ss; ---Testcase 433: +--Testcase 446: select * from generate_series(100,200) g, lateral (select * from int8_tbl a where g = q1 union all select * from int8_tbl b where g = q2) ss; -- lateral with VALUES ---Testcase 434: +--Testcase 447: explain (costs off) select count(*) from tenk1 a, tenk1 b join lateral (values(a.unique1)) ss(x) on b.unique2 = ss.x; ---Testcase 435: +--Testcase 448: select count(*) from tenk1 a, tenk1 b join lateral (values(a.unique1)) ss(x) on b.unique2 = ss.x; -- lateral with VALUES, no flattening possible ---Testcase 436: +--Testcase 449: explain (costs off) select count(*) from tenk1 a, tenk1 b join lateral (values(a.unique1),(-1)) ss(x) on b.unique2 = ss.x; ---Testcase 437: +--Testcase 450: select count(*) from tenk1 a, tenk1 b join lateral (values(a.unique1),(-1)) ss(x) on b.unique2 = ss.x; -- lateral injecting a strange outer join condition ---Testcase 438: +--Testcase 451: explain (costs off) select * from int8_tbl a, int8_tbl x left join lateral (select a.q1 from int4_tbl y) ss(z) on x.q2 = ss.z order by a.q1, a.q2, x.q1, x.q2, ss.z; ---Testcase 439: +--Testcase 452: select * from int8_tbl a, int8_tbl x left join lateral (select a.q1 from int4_tbl y) ss(z) on x.q2 = ss.z order by a.q1, a.q2, x.q1, x.q2, ss.z; -- lateral reference to a join alias variable ---Testcase 440: +--Testcase 453: select * from (select f1/2 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1, lateral (select x) ss2(y); ---Testcase 441: +--Testcase 454: select * from (select f1 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1, lateral (values(x)) ss2(y); ---Testcase 442: +--Testcase 455: select * from ((select f1/2 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1) j, lateral (select x) ss2(y); -- lateral references requiring pullup ---Testcase 443: +--Testcase 456: select * from (values(1)) x(lb), lateral generate_series(lb,4) x4; ---Testcase 444: +--Testcase 457: select * from (select f1/1000000000 from int4_tbl) x(lb), lateral generate_series(lb,4) x4; ---Testcase 445: +--Testcase 458: select * from (values(1)) x(lb), lateral (values(lb)) y(lbcopy); ---Testcase 446: +--Testcase 459: select * from (values(1)) x(lb), lateral (select lb from int4_tbl) y(lbcopy); ---Testcase 447: +--Testcase 460: select * from int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, lateral (values(x.q1,y.q1,y.q2)) v(xq1,yq1,yq2); ---Testcase 448: +--Testcase 461: select * from int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2); ---Testcase 449: +--Testcase 462: select x.* from int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2); ---Testcase 450: +--Testcase 463: select v.* from (int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1) left join int4_tbl z on z.f1 = x.q2, lateral (select x.q1,y.q1 union all select x.q2,y.q2) v(vx,vy); ---Testcase 451: +--Testcase 464: select v.* from (int8_tbl x left join (select q1,(select coalesce(q2,0)) q2 from int8_tbl) y on x.q2 = y.q1) left join int4_tbl z on z.f1 = x.q2, lateral (select x.q1,y.q1 union all select x.q2,y.q2) v(vx,vy); ---Testcase 452: +--Testcase 465: select v.* from (int8_tbl x left join (select q1,(select coalesce(q2,0)) q2 from int8_tbl) y on x.q2 = y.q1) left join int4_tbl z on z.f1 = x.q2, lateral (select x.q1,y.q1 from onerow union all select x.q2,y.q2 from onerow) v(vx,vy); ---Testcase 453: +--Testcase 466: explain (verbose, costs off) select * from int8_tbl a left join lateral (select *, a.q2 as x from int8_tbl b) ss on a.q2 = ss.q1; ---Testcase 454: +--Testcase 467: select * from int8_tbl a left join lateral (select *, a.q2 as x from int8_tbl b) ss on a.q2 = ss.q1; ---Testcase 455: +--Testcase 468: explain (verbose, costs off) select * from int8_tbl a left join lateral (select *, coalesce(a.q2, 42) as x from int8_tbl b) ss on a.q2 = ss.q1; ---Testcase 456: +--Testcase 469: select * from int8_tbl a left join lateral (select *, coalesce(a.q2, 42) as x from int8_tbl b) ss on a.q2 = ss.q1; -- lateral can result in join conditions appearing below their -- real semantic level ---Testcase 457: +--Testcase 470: explain (verbose, costs off) select * from int4_tbl i left join lateral (select * from int2_tbl j where i.f1 = j.f1) k on true; ---Testcase 458: +--Testcase 471: select * from int4_tbl i left join lateral (select * from int2_tbl j where i.f1 = j.f1) k on true; ---Testcase 459: +--Testcase 472: explain (verbose, costs off) select * from int4_tbl i left join lateral (select coalesce(i) from int2_tbl j where i.f1 = j.f1) k on true; ---Testcase 460: +--Testcase 473: select * from int4_tbl i left join lateral (select coalesce(i) from int2_tbl j where i.f1 = j.f1) k on true; ---Testcase 461: +--Testcase 474: explain (verbose, costs off) select * from int4_tbl a, lateral ( select * from int4_tbl b left join int8_tbl c on (b.f1 = q1 and a.f1 = q2) ) ss; ---Testcase 462: +--Testcase 475: select * from int4_tbl a, lateral ( select * from int4_tbl b left join int8_tbl c on (b.f1 = q1 and a.f1 = q2) ) ss; -- lateral reference in a PlaceHolderVar evaluated at join level ---Testcase 463: +--Testcase 476: explain (verbose, costs off) select * from int8_tbl a left join lateral (select b.q1 as bq1, c.q1 as cq1, least(a.q1,b.q1,c.q1) from int8_tbl b cross join int8_tbl c) ss on a.q2 = ss.bq1; ---Testcase 464: +--Testcase 477: select * from int8_tbl a left join lateral (select b.q1 as bq1, c.q1 as cq1, least(a.q1,b.q1,c.q1) from @@ -2461,7 +2548,7 @@ select * from on a.q2 = ss.bq1; -- case requiring nested PlaceHolderVars ---Testcase 465: +--Testcase 478: explain (verbose, costs off) select * from int8_tbl c left join ( @@ -2473,7 +2560,7 @@ select * from lateral (select ss2.y offset 0) ss3; -- case that breaks the old ph_may_need optimization ---Testcase 466: +--Testcase 479: explain (verbose, costs off) select c.*,a.*,ss1.q1,ss2.q1,ss3.* from int8_tbl c left join ( @@ -2487,7 +2574,7 @@ select c.*,a.*,ss1.q1,ss2.q1,ss3.* from lateral (select * from int4_tbl i where ss2.y > f1) ss3; -- check processing of postponed quals (bug #9041) ---Testcase 467: +--Testcase 480: explain (verbose, costs off) select * from (select 1 as x offset 0) x cross join (select 2 as y offset 0) y @@ -2496,17 +2583,17 @@ select * from ) zz on zz.z = y.y; -- check dummy rels with lateral references (bug #15694) ---Testcase 468: +--Testcase 481: explain (verbose, costs off) select * from int8_tbl i8 left join lateral (select *, i8.q2 from int4_tbl where false) ss on true; ---Testcase 469: +--Testcase 482: explain (verbose, costs off) select * from int8_tbl i8 left join lateral (select *, i8.q2 from int4_tbl i1, int4_tbl i2 where false) ss on true; -- check handling of nested appendrels inside LATERAL ---Testcase 470: +--Testcase 483: select * from ((select 2 as v) union all (select 3 as v)) as q1 cross join lateral @@ -2516,15 +2603,19 @@ select * from (select q1.v) ) as q2; +-- check the number of columns specified +--Testcase 601: +SELECT * FROM (int8_tbl i cross join int4_tbl j) ss(a,b,c,d); + -- check we don't try to do a unique-ified semijoin with LATERAL ---Testcase 471: +--Testcase 484: explain (verbose, costs off) select * from (values (0,9998), (1,1000)) v(id,x), lateral (select f1 from int4_tbl where f1 = any (select unique1 from tenk1 where unique2 = v.x offset 0)) ss; ---Testcase 472: +--Testcase 485: select * from (values (0,9998), (1,1000)) v(id,x), lateral (select f1 from int4_tbl @@ -2533,7 +2624,7 @@ select * from -- check proper extParam/allParam handling (this isn't exactly a LATERAL issue, -- but we can make the test case much more compact with LATERAL) ---Testcase 473: +--Testcase 486: explain (verbose, costs off) select * from (values (0), (1)) v(id), lateral (select * from int8_tbl t1, @@ -2544,7 +2635,7 @@ lateral (select * from int8_tbl t1, and (select v.id=0)) offset 0) ss2) ss where t1.q1 = ss.q2) ss0; ---Testcase 474: +--Testcase 487: select * from (values (0), (1)) v(id), lateral (select * from int8_tbl t1, lateral (select * from @@ -2555,50 +2646,50 @@ lateral (select * from int8_tbl t1, where t1.q1 = ss.q2) ss0; -- test some error cases where LATERAL should have been used but wasn't ---Testcase 475: +--Testcase 488: select f1,g from int4_tbl a, (select f1 as g) ss; ---Testcase 476: +--Testcase 489: select f1,g from int4_tbl a, (select a.f1 as g) ss; ---Testcase 477: +--Testcase 490: select f1,g from int4_tbl a cross join (select f1 as g) ss; ---Testcase 478: +--Testcase 491: select f1,g from int4_tbl a cross join (select a.f1 as g) ss; -- SQL:2008 says the left table is in scope but illegal to access here ---Testcase 479: +--Testcase 492: select f1,g from int4_tbl a right join lateral generate_series(0, a.f1) g on true; ---Testcase 480: +--Testcase 493: select f1,g from int4_tbl a full join lateral generate_series(0, a.f1) g on true; -- check we complain about ambiguous table references ---Testcase 481: +--Testcase 494: select * from int8_tbl x cross join (int4_tbl x cross join lateral (select x.f1) ss); -- LATERAL can be used to put an aggregate into the FROM clause of its query ---Testcase 482: +--Testcase 495: select 1 from tenk1 a, lateral (select max(a.unique1) from int4_tbl b) ss; -- check behavior of LATERAL in UPDATE/DELETE ---Testcase 483: +--Testcase 496: create temp table xx1 as select f1 as x1, -f1 as x2 from int4_tbl; -- error, can't do this: ---Testcase 484: +--Testcase 497: update xx1 set x2 = f1 from (select * from int4_tbl where f1 = x1) ss; ---Testcase 485: +--Testcase 498: update xx1 set x2 = f1 from (select * from int4_tbl where f1 = xx1.x1) ss; -- can't do it even with LATERAL: ---Testcase 486: +--Testcase 499: update xx1 set x2 = f1 from lateral (select * from int4_tbl where f1 = x1) ss; -- we might in future allow something like this, but for now it's an error: ---Testcase 487: +--Testcase 500: update xx1 set x2 = f1 from xx1, lateral (select * from int4_tbl where f1 = x1) ss; -- also errors: ---Testcase 488: +--Testcase 501: delete from xx1 using (select * from int4_tbl where f1 = x1) ss; ---Testcase 489: +--Testcase 502: delete from xx1 using (select * from int4_tbl where f1 = xx1.x1) ss; ---Testcase 490: +--Testcase 503: delete from xx1 using lateral (select * from int4_tbl where f1 = x1) ss; /* @@ -2662,17 +2753,17 @@ rollback; begin; ---Testcase 491: +--Testcase 504: create foreign table fkest (a int, b int, c int) server influxdb_svr; ---Testcase 492: +--Testcase 505: create foreign table fkest1 (a int, b int) server influxdb_svr; ---Testcase 493: +--Testcase 506: insert into fkest select x/10, x%10, x from generate_series(1,1000) x; ---Testcase 494: +--Testcase 507: insert into fkest1 select x/10, x%10 from generate_series(1,1000) x; ---Testcase 495: +--Testcase 508: explain (costs off) select * from fkest f @@ -2687,123 +2778,123 @@ rollback; -- test planner's ability to mark joins as unique -- ---Testcase 496: +--Testcase 509: create foreign table j1 (id int) server influxdb_svr; ---Testcase 497: +--Testcase 510: create foreign table j2 (id int) server influxdb_svr; ---Testcase 498: +--Testcase 511: create foreign table j3 (id int) server influxdb_svr; ---Testcase 499: +--Testcase 512: insert into j1 values(1),(2),(3); ---Testcase 500: +--Testcase 513: insert into j2 values(1),(2),(3); ---Testcase 501: +--Testcase 514: insert into j3 values(1),(1); -- ensure join is properly marked as unique ---Testcase 502: +--Testcase 515: explain (verbose, costs off) select * from j1 inner join j2 on j1.id = j2.id; -- ensure join is not unique when not an equi-join ---Testcase 503: +--Testcase 516: explain (verbose, costs off) select * from j1 inner join j2 on j1.id > j2.id; -- ensure non-unique rel is not chosen as inner ---Testcase 504: +--Testcase 517: explain (verbose, costs off) select * from j1 inner join j3 on j1.id = j3.id; -- ensure left join is marked as unique ---Testcase 505: +--Testcase 518: explain (verbose, costs off) select * from j1 left join j2 on j1.id = j2.id; -- ensure right join is marked as unique ---Testcase 506: +--Testcase 519: explain (verbose, costs off) select * from j1 right join j2 on j1.id = j2.id; -- ensure full join is marked as unique ---Testcase 507: +--Testcase 520: explain (verbose, costs off) select * from j1 full join j2 on j1.id = j2.id; -- a clauseless (cross) join can't be unique ---Testcase 508: +--Testcase 521: explain (verbose, costs off) select * from j1 cross join j2; -- ensure a natural join is marked as unique ---Testcase 509: +--Testcase 522: explain (verbose, costs off) select * from j1 natural join j2; -- ensure a distinct clause allows the inner to become unique ---Testcase 510: +--Testcase 523: explain (verbose, costs off) select * from j1 inner join (select distinct id from j3) j3 on j1.id = j3.id; -- ensure group by clause allows the inner to become unique ---Testcase 511: +--Testcase 524: explain (verbose, costs off) select * from j1 inner join (select id from j3 group by id) j3 on j1.id = j3.id; ---Testcase 512: +--Testcase 525: delete from j1; ---Testcase 513: +--Testcase 526: delete from j2; ---Testcase 514: +--Testcase 527: delete from j3; ---Testcase 515: +--Testcase 528: drop foreign table j1; ---Testcase 516: +--Testcase 529: drop foreign table j2; ---Testcase 517: +--Testcase 530: drop foreign table j3; -- test more complex permutations of unique joins ---Testcase 518: +--Testcase 531: create foreign table j1 (id1 int, id2 int) server influxdb_svr; ---Testcase 519: +--Testcase 532: create foreign table j2 (id1 int, id2 int) server influxdb_svr; ---Testcase 520: +--Testcase 533: create foreign table j3 (id1 int, id2 int) server influxdb_svr; ---Testcase 521: +--Testcase 534: insert into j1 values(1,1),(1,2); ---Testcase 522: +--Testcase 535: insert into j2 values(1,1); ---Testcase 523: +--Testcase 536: insert into j3 values(1,1); -- ensure there's no unique join when not all columns which are part of the -- unique index are seen in the join clause ---Testcase 524: +--Testcase 537: explain (verbose, costs off) select * from j1 inner join j2 on j1.id1 = j2.id1; -- ensure proper unique detection with multiple join quals ---Testcase 525: +--Testcase 538: explain (verbose, costs off) select * from j1 inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2; -- ensure we don't detect the join to be unique when quals are not part of the -- join condition ---Testcase 526: +--Testcase 539: explain (verbose, costs off) select * from j1 inner join j2 on j1.id1 = j2.id1 where j1.id2 = 1; -- as above, but for left joins. ---Testcase 527: +--Testcase 540: explain (verbose, costs off) select * from j1 left join j2 on j1.id1 = j2.id1 where j1.id2 = 1; @@ -2811,11 +2902,11 @@ left join j2 on j1.id1 = j2.id1 where j1.id2 = 1; -- validate logic in merge joins which skips mark and restore. -- it should only do this if all quals which were used to detect the unique -- are present as join quals, and not plain quals. ---Testcase 528: +--Testcase 541: set enable_nestloop to 0; ---Testcase 529: +--Testcase 542: set enable_hashjoin to 0; ---Testcase 530: +--Testcase 543: set enable_sort to 0; -- create indexes that will be preferred over the PKs to perform the join @@ -2823,64 +2914,64 @@ set enable_sort to 0; --create index j2_id1_idx on j2 (id1) where id1 % 1000 = 1; -- need an additional row in j2, if we want j2_id1_idx to be preferred ---Testcase 531: +--Testcase 544: insert into j2 values(1,2); --analyze j2; ---Testcase 532: +--Testcase 545: explain (costs off) select * from j1 inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1; ---Testcase 533: +--Testcase 546: select * from j1 inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1; -- Exercise array keys mark/restore B-Tree code ---Testcase 534: +--Testcase 547: explain (costs off) select * from j1 inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 = any (array[1]); ---Testcase 535: +--Testcase 548: select * from j1 inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 = any (array[1]); -- Exercise array keys "find extreme element" B-Tree code ---Testcase 536: +--Testcase 549: explain (costs off) select * from j1 inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 >= any (array[1,5]); ---Testcase 537: +--Testcase 550: select * from j1 inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 >= any (array[1,5]); ---Testcase 538: +--Testcase 551: reset enable_nestloop; ---Testcase 539: +--Testcase 552: reset enable_hashjoin; ---Testcase 540: +--Testcase 553: reset enable_sort; ---Testcase 541: +--Testcase 554: delete from j1; ---Testcase 542: +--Testcase 555: delete from j2; ---Testcase 543: +--Testcase 556: delete from j3; ---Testcase 544: +--Testcase 557: drop foreign table j1; ---Testcase 545: +--Testcase 558: drop foreign table j2; ---Testcase 546: +--Testcase 559: drop foreign table j3; -- check that semijoin inner is not seen as unique for a portion of the outerrel ---Testcase 547: +--Testcase 560: CREATE FOREIGN TABLE onek ( unique1 int4, unique2 int4, @@ -2901,7 +2992,7 @@ CREATE FOREIGN TABLE onek ( ) SERVER influxdb_svr; -- check that semijoin inner is not seen as unique for a portion of the outerrel ---Testcase 548: +--Testcase 561: explain (verbose, costs off) select t1.unique1, t2.hundred from onek t1, tenk1 t2 @@ -2910,13 +3001,13 @@ where exists (select 1 from tenk1 t3 and t1.unique1 < 1; -- ... unless it actually is unique ---Testcase 549: +--Testcase 562: create table j3 as select unique1, tenthous from onek; vacuum analyze j3; ---Testcase 550: +--Testcase 563: create unique index on j3(unique1, tenthous); ---Testcase 551: +--Testcase 564: explain (verbose, costs off) select t1.unique1, t2.hundred from onek t1, tenk1 t2 @@ -2924,27 +3015,45 @@ where exists (select 1 from j3 where j3.unique1 = t1.unique1 and j3.tenthous = t2.hundred) and t1.unique1 < 1; ---Testcase 552: +--Testcase 565: drop table j3; -- Clean up +--Testcase 583: DELETE FROM t1; +--Testcase 584: DELETE FROM t2; +--Testcase 585: DELETE FROM t3; +--Testcase 586: DELETE FROM tt1; +--Testcase 587: DELETE FROM tt2; +--Testcase 588: DELETE FROM tt3; +--Testcase 589: DELETE FROM tt4; +--Testcase 590: DELETE FROM tt5; +--Testcase 591: DELETE FROM tt6; +--Testcase 592: DELETE FROM xx; +--Testcase 593: DELETE FROM yy; +--Testcase 594: DELETE FROM zt1; +--Testcase 595: DELETE FROM zt2; +--Testcase 596: DELETE FROM nt1; +--Testcase 597: DELETE FROM nt2; +--Testcase 598: DELETE FROM nt3; +--Testcase 599: DELETE FROM parent; +--Testcase 600: DELETE FROM child; DO $d$ @@ -2958,9 +3067,9 @@ begin end; $d$; ---Testcase 553: +--Testcase 566: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 554: +--Testcase 567: DROP SERVER influxdb_svr CASCADE; ---Testcase 555: +--Testcase 568: DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/11.13/extra/limit.sql b/sql/15.0/extra/limit.sql similarity index 97% rename from sql/11.13/extra/limit.sql rename to sql/15.0/extra/limit.sql index 94d233f..716e656 100644 --- a/sql/11.13/extra/limit.sql +++ b/sql/15.0/extra/limit.sql @@ -2,24 +2,21 @@ \ir sql/parameters.conf \set ECHO all ---Testcase 51: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 52: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - --- import time column as timestamp and text type --- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- LIMIT -- Check the LIMIT/OFFSET feature of SELECT -- ---Testcase 54: +--Testcase 4: CREATE FOREIGN TABLE onek ( unique1 int4, unique2 int4, @@ -39,10 +36,10 @@ CREATE FOREIGN TABLE onek ( string4 name ) SERVER influxdb_svr; ---Testcase 55: +--Testcase 5: CREATE FOREIGN TABLE int8_tbl(q1 int8, q2 int8) SERVER influxdb_svr; ---Testcase 56: +--Testcase 6: CREATE FOREIGN TABLE tenk1 ( unique1 int4, unique2 int4, @@ -62,133 +59,133 @@ CREATE FOREIGN TABLE tenk1 ( string4 name ) SERVER influxdb_svr OPTIONS (table 'tenk'); ---Testcase 1: +--Testcase 7: SELECT ''::text AS two, unique1, unique2, stringu1 FROM onek WHERE unique1 > 50 ORDER BY unique1 LIMIT 2; ---Testcase 2: +--Testcase 8: SELECT ''::text AS five, unique1, unique2, stringu1 FROM onek WHERE unique1 > 60 ORDER BY unique1 LIMIT 5; ---Testcase 3: +--Testcase 9: SELECT ''::text AS two, unique1, unique2, stringu1 FROM onek WHERE unique1 > 60 AND unique1 < 63 ORDER BY unique1 LIMIT 5; ---Testcase 4: +--Testcase 10: SELECT ''::text AS three, unique1, unique2, stringu1 FROM onek WHERE unique1 > 100 ORDER BY unique1 LIMIT 3 OFFSET 20; ---Testcase 5: +--Testcase 11: SELECT ''::text AS zero, unique1, unique2, stringu1 FROM onek WHERE unique1 < 50 ORDER BY unique1 DESC LIMIT 8 OFFSET 99; ---Testcase 6: +--Testcase 12: SELECT ''::text AS eleven, unique1, unique2, stringu1 FROM onek WHERE unique1 < 50 ORDER BY unique1 DESC LIMIT 20 OFFSET 39; ---Testcase 7: +--Testcase 13: SELECT ''::text AS ten, unique1, unique2, stringu1 FROM onek ORDER BY unique1 OFFSET 990; ---Testcase 8: +--Testcase 14: SELECT ''::text AS five, unique1, unique2, stringu1 FROM onek ORDER BY unique1 OFFSET 990 LIMIT 5; ---Testcase 9: +--Testcase 15: SELECT ''::text AS five, unique1, unique2, stringu1 FROM onek ORDER BY unique1 LIMIT 5 OFFSET 900; -- Test null limit and offset. The planner would discard a simple null -- constant, so to ensure executor is exercised, do this: ---Testcase 10: +--Testcase 16: select * from int8_tbl limit (case when random() < 0.5 then null::bigint end); ---Testcase 11: +--Testcase 17: select * from int8_tbl offset (case when random() < 0.5 then null::bigint end); -- Test assorted cases involving backwards fetch from a LIMIT plan node begin; declare c1 scroll cursor for select * from int8_tbl limit 10; ---Testcase 12: +--Testcase 18: fetch all in c1; ---Testcase 13: +--Testcase 19: fetch 1 in c1; ---Testcase 14: +--Testcase 20: fetch backward 1 in c1; ---Testcase 15: +--Testcase 21: fetch backward all in c1; ---Testcase 16: +--Testcase 22: fetch backward 1 in c1; ---Testcase 17: +--Testcase 23: fetch all in c1; declare c2 scroll cursor for select * from int8_tbl limit 3; ---Testcase 18: +--Testcase 24: fetch all in c2; ---Testcase 19: +--Testcase 25: fetch 1 in c2; ---Testcase 20: +--Testcase 26: fetch backward 1 in c2; ---Testcase 21: +--Testcase 27: fetch backward all in c2; ---Testcase 22: +--Testcase 28: fetch backward 1 in c2; ---Testcase 23: +--Testcase 29: fetch all in c2; declare c3 scroll cursor for select * from int8_tbl offset 3; ---Testcase 24: +--Testcase 30: fetch all in c3; ---Testcase 25: +--Testcase 31: fetch 1 in c3; ---Testcase 26: +--Testcase 32: fetch backward 1 in c3; ---Testcase 27: +--Testcase 33: fetch backward all in c3; ---Testcase 28: +--Testcase 34: fetch backward 1 in c3; ---Testcase 29: +--Testcase 35: fetch all in c3; declare c4 scroll cursor for select * from int8_tbl offset 10; ---Testcase 30: +--Testcase 36: fetch all in c4; ---Testcase 31: +--Testcase 37: fetch 1 in c4; ---Testcase 32: +--Testcase 38: fetch backward 1 in c4; ---Testcase 33: +--Testcase 39: fetch backward all in c4; ---Testcase 34: +--Testcase 40: fetch backward 1 in c4; ---Testcase 35: +--Testcase 41: fetch all in c4; declare c5 scroll cursor for select * from int8_tbl order by q1 fetch first 2 rows with ties; ---Testcase 57: +--Testcase 42: fetch all in c5; ---Testcase 58: +--Testcase 43: fetch 1 in c5; ---Testcase 59: +--Testcase 44: fetch backward 1 in c5; ---Testcase 60: +--Testcase 45: fetch backward 1 in c5; ---Testcase 61: +--Testcase 46: fetch all in c5; ---Testcase 62: +--Testcase 47: fetch backward all in c5; ---Testcase 63: +--Testcase 48: fetch all in c5; ---Testcase 64: +--Testcase 49: fetch backward all in c5; rollback; -- Stress test for variable LIMIT in conjunction with bounded-heap sorting ---Testcase 65: +--Testcase 50: CREATE FOREIGN TABLE generate_series4(a int) SERVER influxdb_svr; ---Testcase 36: +--Testcase 51: SELECT (SELECT a FROM (VALUES (1)) AS x, @@ -201,65 +198,65 @@ SELECT -- with ORDER BY and LIMIT. -- ---Testcase 66: +--Testcase 52: create temp sequence testseq; ---Testcase 37: +--Testcase 53: explain (verbose, costs off) select unique1, unique2, nextval('testseq') from tenk1 order by unique2 limit 10; ---Testcase 38: +--Testcase 54: select unique1, unique2, nextval('testseq') from tenk1 order by unique2 limit 10; ---Testcase 39: +--Testcase 55: select currval('testseq'); ---Testcase 40: +--Testcase 56: explain (verbose, costs off) select unique1, unique2, nextval('testseq') from tenk1 order by tenthous limit 10; ---Testcase 41: +--Testcase 57: select unique1, unique2, nextval('testseq') from tenk1 order by tenthous limit 10; ---Testcase 42: +--Testcase 58: select currval('testseq'); ---Testcase 43: +--Testcase 59: explain (verbose, costs off) select unique1, unique2, generate_series(1,10) from tenk1 order by unique2 limit 7; ---Testcase 44: +--Testcase 60: select unique1, unique2, generate_series(1,10) from tenk1 order by unique2 limit 7; ---Testcase 45: +--Testcase 61: explain (verbose, costs off) select unique1, unique2, generate_series(1,10) from tenk1 order by tenthous limit 7; ---Testcase 46: +--Testcase 62: select unique1, unique2, generate_series(1,10) from tenk1 order by tenthous limit 7; -- use of random() is to keep planner from folding the expressions together ---Testcase 47: +--Testcase 63: explain (verbose, costs off) select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; ---Testcase 48: +--Testcase 64: select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; ---Testcase 49: +--Testcase 65: explain (verbose, costs off) select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2 order by s2 desc; ---Testcase 50: +--Testcase 66: select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2 order by s2 desc; @@ -298,6 +295,12 @@ SELECT thousand FROM onek WHERE thousand < 5 ORDER BY thousand FETCH FIRST 2 ROW ONLY; +-- SKIP LOCKED and WITH TIES are incompatible +--Testcase 90: +SELECT thousand + FROM onek WHERE thousand < 5 + ORDER BY thousand FETCH FIRST 1 ROW WITH TIES FOR UPDATE SKIP LOCKED; + -- should fail --Testcase 73: SELECT ''::text AS two, unique1, unique2, stringu1 diff --git a/sql/15.0/extra/prepare.sql b/sql/15.0/extra/prepare.sql new file mode 100644 index 0000000..d347868 --- /dev/null +++ b/sql/15.0/extra/prepare.sql @@ -0,0 +1,159 @@ +-- Regression tests for prepareable statements. We query the content +-- of the pg_prepared_statements view as prepared statements are +-- created and removed. +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 1: +CREATE EXTENSION influxdb_fdw; + +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +--Testcase 4: +CREATE FOREIGN TABLE tenk1 ( + unique1 int4, + unique2 int4, + two int4, + four int4, + ten int4, + twenty int4, + hundred int4, + thousand int4, + twothousand int4, + fivethous int4, + tenthous int4, + odd int4, + even int4, + stringu1 name, + stringu2 name, + string4 name +) SERVER influxdb_svr OPTIONS (table 'tenk'); + +-- Does not support this command +-- ALTER TABLE tenk1 SET WITH OIDS; + +--Testcase 5: +CREATE FOREIGN TABLE road ( + name text, + thepath path +) SERVER influxdb_svr; + +--Testcase 6: +CREATE FOREIGN TABLE road_tmp (a int, b int) SERVER influxdb_svr; + +--Testcase 7: +SELECT name, statement, parameter_types FROM pg_prepared_statements; + +--Testcase 8: +PREPARE q1 AS SELECT a AS a FROM road_tmp; +--Testcase 9: +EXECUTE q1; + +--Testcase 10: +SELECT name, statement, parameter_types FROM pg_prepared_statements; + +-- should fail +--Testcase 11: +PREPARE q1 AS SELECT b FROM road_tmp; + +-- should succeed +DEALLOCATE q1; +--Testcase 12: +PREPARE q1 AS SELECT b FROM road_tmp; +--Testcase 13: +EXECUTE q1; + +--Testcase 14: +PREPARE q2 AS SELECT b AS b FROM road_tmp; +--Testcase 15: +SELECT name, statement, parameter_types FROM pg_prepared_statements; + +-- sql92 syntax +DEALLOCATE PREPARE q1; + +--Testcase 16: +SELECT name, statement, parameter_types FROM pg_prepared_statements; + +DEALLOCATE PREPARE q2; +-- the view should return the empty set again +--Testcase 17: +SELECT name, statement, parameter_types FROM pg_prepared_statements; + +-- parameterized queries +--Testcase 18: +PREPARE q2(text) AS + SELECT datname, datistemplate, datallowconn + FROM pg_database WHERE datname = $1; + +--Testcase 19: +EXECUTE q2('postgres'); + +--Testcase 20: +PREPARE q3(text, int, float, boolean, smallint) AS + SELECT * FROM tenk1 WHERE string4 = $1 AND (four = $2 OR + ten = $3::bigint OR true = $4 OR odd = $5::int) + ORDER BY unique1; + +--Testcase 21: +EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); + +-- too few params +--Testcase 22: +EXECUTE q3('bool'); + +-- too many params +--Testcase 23: +EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); + +-- wrong param types +--Testcase 24: +EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); + +-- invalid type +--Testcase 25: +PREPARE q4(nonexistenttype) AS SELECT $1; + +-- create table as execute +--Testcase 26: +PREPARE q5(int, text) AS + SELECT * FROM tenk1 WHERE unique1 = $1 OR stringu1 = $2 + ORDER BY unique1; +--Testcase 27: +CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); +--Testcase 28: +SELECT * FROM q5_prep_results; +--Testcase 29: +CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') + WITH NO DATA; +--Testcase 30: +SELECT * FROM q5_prep_nodata; + +-- unknown or unspecified parameter types: should succeed +--Testcase 31: +PREPARE q6 AS + SELECT * FROM tenk1 WHERE unique1 = $1 AND stringu1 = $2; +--Testcase 32: +PREPARE q7(unknown) AS + SELECT * FROM road WHERE thepath = $1; + +--Testcase 33: +SELECT name, statement, parameter_types FROM pg_prepared_statements + ORDER BY name; + +-- test DEALLOCATE ALL; +DEALLOCATE ALL; +--Testcase 34: +SELECT name, statement, parameter_types FROM pg_prepared_statements + ORDER BY name; + +--Testcase 35: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 36: +DROP SERVER influxdb_svr CASCADE; +--Testcase 37: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/13.4/extra/select.sql b/sql/15.0/extra/select.sql similarity index 94% rename from sql/13.4/extra/select.sql rename to sql/15.0/extra/select.sql index 3cb4fc5..e461319 100644 --- a/sql/13.4/extra/select.sql +++ b/sql/15.0/extra/select.sql @@ -5,16 +5,16 @@ \ir sql/parameters.conf \set ECHO all ---Testcase 52: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 53: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); ---Testcase 55: +--Testcase 4: CREATE FOREIGN TABLE onek ( unique1 int4, unique2 int4, @@ -34,7 +34,7 @@ CREATE FOREIGN TABLE onek ( string4 name ) SERVER influxdb_svr; ---Testcase 56: +--Testcase 5: CREATE FOREIGN TABLE onek2 ( unique1 int4, unique2 int4, @@ -54,13 +54,13 @@ CREATE FOREIGN TABLE onek2 ( string4 name ) SERVER influxdb_svr OPTIONS (table 'onek'); ---Testcase 57: +--Testcase 6: CREATE FOREIGN TABLE INT8_TBL ( q1 int8, q2 int8 ) SERVER influxdb_svr; ---Testcase 58: +--Testcase 7: CREATE FOREIGN TABLE person ( name text, age int4, @@ -68,20 +68,20 @@ CREATE FOREIGN TABLE person ( ) SERVER influxdb_svr; ---Testcase 59: +--Testcase 8: CREATE FOREIGN TABLE emp ( salary int4, manager text ) INHERITS (person) SERVER influxdb_svr; ---Testcase 60: +--Testcase 9: CREATE FOREIGN TABLE student ( gpa float8 ) INHERITS (person) SERVER influxdb_svr; ---Testcase 61: +--Testcase 10: CREATE FOREIGN TABLE stud_emp ( percent int4 ) INHERITS (emp, student) SERVER influxdb_svr; @@ -89,7 +89,7 @@ CREATE FOREIGN TABLE stud_emp ( -- btree index -- awk '{if($1<10){print;}else{next;}}' onek.data | sort +0n -1 -- ---Testcase 1: +--Testcase 11: SELECT * FROM onek WHERE onek.unique1 < 10 ORDER BY onek.unique1; @@ -97,7 +97,7 @@ SELECT * FROM onek -- -- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 -- ---Testcase 2: +--Testcase 12: SELECT onek.unique1, onek.stringu1 FROM onek WHERE onek.unique1 < 20 ORDER BY unique1 using >; @@ -105,7 +105,7 @@ SELECT onek.unique1, onek.stringu1 FROM onek -- -- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 -- ---Testcase 3: +--Testcase 13: SELECT onek.unique1, onek.stringu1 FROM onek WHERE onek.unique1 > 980 ORDER BY stringu1 using <; @@ -114,7 +114,7 @@ SELECT onek.unique1, onek.stringu1 FROM onek -- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | -- sort +1d -2 +0nr -1 -- ---Testcase 4: +--Testcase 14: SELECT onek.unique1, onek.string4 FROM onek WHERE onek.unique1 > 980 ORDER BY string4 using <, unique1 using >; @@ -123,7 +123,7 @@ SELECT onek.unique1, onek.string4 FROM onek -- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | -- sort +1dr -2 +0n -1 -- ---Testcase 5: +--Testcase 15: SELECT onek.unique1, onek.string4 FROM onek WHERE onek.unique1 > 980 ORDER BY string4 using >, unique1 using <; @@ -132,7 +132,7 @@ SELECT onek.unique1, onek.string4 FROM onek -- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | -- sort +0nr -1 +1d -2 -- ---Testcase 6: +--Testcase 16: SELECT onek.unique1, onek.string4 FROM onek WHERE onek.unique1 < 20 ORDER BY unique1 using >, string4 using <; @@ -141,7 +141,7 @@ SELECT onek.unique1, onek.string4 FROM onek -- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | -- sort +0n -1 +1dr -2 -- ---Testcase 7: +--Testcase 17: SELECT onek.unique1, onek.string4 FROM onek WHERE onek.unique1 < 20 ORDER BY unique1 using <, string4 using >; @@ -155,20 +155,23 @@ SELECT onek.unique1, onek.string4 FROM onek -- -- ANALYZE onek2; +--Testcase 18: SET enable_seqscan TO off; +--Testcase 19: SET enable_bitmapscan TO off; +--Testcase 20: SET enable_sort TO off; -- -- awk '{if($1<10){print $0;}else{next;}}' onek.data | sort +0n -1 -- ---Testcase 8: +--Testcase 21: SELECT onek2.* FROM onek2 WHERE onek2.unique1 < 10 order by 1; -- -- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 -- ---Testcase 9: +--Testcase 22: SELECT onek2.unique1, onek2.stringu1 FROM onek2 WHERE onek2.unique1 < 20 ORDER BY unique1 using >; @@ -176,19 +179,22 @@ SELECT onek2.unique1, onek2.stringu1 FROM onek2 -- -- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 -- ---Testcase 10: +--Testcase 23: SELECT onek2.unique1, onek2.stringu1 FROM onek2 WHERE onek2.unique1 > 980 order by 1; +--Testcase 24: RESET enable_seqscan; +--Testcase 25: RESET enable_bitmapscan; +--Testcase 26: RESET enable_sort; ---Testcase 11: -SELECT two, stringu1, ten, string4 - INTO TABLE tmp - FROM onek; +--Testcase 27: +--SELECT two, stringu1, ten, string4 +-- INTO TABLE tmp +-- FROM onek; -- -- awk '{print $1,$2;}' person.data | @@ -197,7 +203,7 @@ SELECT two, stringu1, ten, string4 -- awk 'BEGIN{FS=" ";}{if(NF!=2){print $4,$5;}else{print;}}' - stud_emp.data -- -- SELECT name, age FROM person*; ??? check if different ---Testcase 12: +--Testcase 28: SELECT p.name, p.age FROM person* p; -- @@ -207,29 +213,29 @@ SELECT p.name, p.age FROM person* p; -- awk 'BEGIN{FS=" ";}{if(NF!=1){print $4,$5;}else{print;}}' - stud_emp.data | -- sort +1nr -2 -- ---Testcase 13: +--Testcase 29: SELECT p.name, p.age FROM person* p ORDER BY age using >, name; -- -- Test some cases involving whole-row Var referencing a subquery -- ---Testcase 14: +--Testcase 30: select foo from (select 1 offset 0) as foo; ---Testcase 15: +--Testcase 31: select foo from (select null offset 0) as foo; ---Testcase 16: +--Testcase 32: select foo from (select 'xyzzy',1,null offset 0) as foo; -- -- Test VALUES lists -- ---Testcase 17: +--Testcase 33: select * from onek, (values(147, 'RFAAAA'), (931, 'VJAAAA')) as v (i, j) WHERE onek.unique1 = v.i and onek.stringu1 = v.j; -- a more complex case -- looks like we're coding lisp :-) ---Testcase 18: +--Testcase 34: select * from onek, (values ((select i from (values(10000), (2), (389), (1000), (2000), ((select 10029))) as foo(i) @@ -237,38 +243,47 @@ select * from onek, where onek.unique1 = bar.i; -- try VALUES in a subquery ---Testcase 19: +--Testcase 35: select * from onek where (unique1,ten) in (values (1,1), (20,0), (99,9), (17,99)) order by unique1; -- VALUES is also legal as a standalone query or a set-operation member ---Testcase 20: +--Testcase 36: VALUES (1,2), (3,4+4), (7,77.7); ---Testcase 21: +--Testcase 37: VALUES (1,2), (3,4+4), (7,77.7) UNION ALL SELECT 2+2, 57 UNION ALL TABLE int8_tbl; +-- -- corner case: VALUES with no columns +-- InfluxDB not support table with no columns. +-- --Testcase 79: +-- CREATE FOREIGN TABLE nocols() SERVER influxdb_svr; +-- --Testcase 80: +-- INSERT INTO nocols DEFAULT VALUES; +-- --Testcase 81: +-- SELECT * FROM nocols n, LATERAL (VALUES(n.*)) v; + -- -- Test ORDER BY options -- ---Testcase 62: +--Testcase 38: CREATE FOREIGN TABLE foo (f1 int) SERVER influxdb_svr; ---Testcase 22: +--Testcase 39: SELECT * FROM foo ORDER BY f1; ---Testcase 23: +--Testcase 40: SELECT * FROM foo ORDER BY f1 ASC; -- same thing ---Testcase 24: +--Testcase 41: SELECT * FROM foo ORDER BY f1 NULLS FIRST; ---Testcase 25: +--Testcase 42: SELECT * FROM foo ORDER BY f1 DESC; ---Testcase 26: +--Testcase 43: SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; -- check if indexscans do the right things @@ -301,64 +316,66 @@ SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; -- -- partial index is usable ---Testcase 27: +--Testcase 44: explain (costs off) select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; ---Testcase 28: +--Testcase 45: select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; -- actually run the query with an analyze to use the partial index ---Testcase 63: +--Testcase 46: explain (costs off, analyze on, timing off, summary off) select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; ---Testcase 30: +--Testcase 47: explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; ---Testcase 31: +--Testcase 48: select unique2 from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; -- partial index predicate implies clause, so no need for retest ---Testcase 32: +--Testcase 49: explain (costs off) select * from onek2 where unique2 = 11 and stringu1 < 'B'; ---Testcase 33: +--Testcase 50: select * from onek2 where unique2 = 11 and stringu1 < 'B'; ---Testcase 34: +--Testcase 51: explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; ---Testcase 35: +--Testcase 52: select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; -- but if it's an update target, must retest anyway ---Testcase 36: +--Testcase 53: explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 < 'B' for update; ---Testcase 37: +--Testcase 54: select unique2 from onek2 where unique2 = 11 and stringu1 < 'B' for update; -- partial index is not applicable ---Testcase 38: +--Testcase 55: explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 < 'C'; ---Testcase 39: +--Testcase 56: select unique2 from onek2 where unique2 = 11 and stringu1 < 'C'; -- partial index implies clause, but bitmap scan must recheck predicate anyway +--Testcase 57: SET enable_indexscan TO off; ---Testcase 40: +--Testcase 58: explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; ---Testcase 41: +--Testcase 59: select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; +--Testcase 60: RESET enable_indexscan; -- check multi-index cases too ---Testcase 42: +--Testcase 61: explain (costs off) select unique1, unique2 from onek2 where (unique2 = 11 or unique1 = 0) and stringu1 < 'B'; ---Testcase 43: +--Testcase 62: select unique1, unique2 from onek2 where (unique2 = 11 or unique1 = 0) and stringu1 < 'B'; ---Testcase 44: +--Testcase 63: explain (costs off) select unique1, unique2 from onek2 where (unique2 = 11 and stringu1 < 'B') or unique1 = 0; ---Testcase 45: +--Testcase 64: select unique1, unique2 from onek2 where (unique2 = 11 and stringu1 < 'B') or unique1 = 0; @@ -367,47 +384,47 @@ select unique1, unique2 from onek2 -- -- ORDER BY on a constant doesn't really need any sorting ---Testcase 46: +--Testcase 65: SELECT 1 AS x ORDER BY x; -- But ORDER BY on a set-valued expression does ---Testcase 64: +--Testcase 66: create function sillysrf(int) returns setof int as 'values (1),(10),(2),($1)' language sql immutable; ---Testcase 47: +--Testcase 67: select sillysrf(42); ---Testcase 48: +--Testcase 68: select sillysrf(-1) order by 1; ---Testcase 65: +--Testcase 69: drop function sillysrf(int); -- X = X isn't a no-op, it's effectively X IS NOT NULL assuming = is strict -- (see bug #5084) ---Testcase 49: +--Testcase 70: select * from (values (2),(null),(1)) v(k) where k = k order by k; ---Testcase 50: +--Testcase 71: select * from (values (2),(null),(1)) v(k) where k = k; -- Test partitioned tables with no partitions, which should be handled the -- same as the non-inheritance case when expanding its RTE. ---Testcase 66: +--Testcase 72: create table list_parted_tbl (a int,b int) partition by list (a); ---Testcase 67: +--Testcase 73: create table list_parted_tbl1 partition of list_parted_tbl for values in (1) partition by list(b); ---Testcase 51: +--Testcase 74: explain (costs off) select * from list_parted_tbl; ---Testcase 68: +--Testcase 75: drop table list_parted_tbl; -- Clean up: -DROP TABLE IF EXISTS tmp; +--DROP TABLE IF EXISTS tmp; ---Testcase 69: +--Testcase 76: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 70: +--Testcase 77: DROP SERVER influxdb_svr CASCADE; ---Testcase 71: +--Testcase 78: DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/15.0/extra/select_having.sql b/sql/15.0/extra/select_having.sql new file mode 100644 index 0000000..23775bb --- /dev/null +++ b/sql/15.0/extra/select_having.sql @@ -0,0 +1,95 @@ +-- +-- SELECT_HAVING +-- +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 1: +CREATE EXTENSION influxdb_fdw; + +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +--Testcase 4: +CREATE FOREIGN TABLE test_having (a int, b int, c char(8), d char) SERVER influxdb_svr; + +--Testcase 5: +INSERT INTO test_having VALUES (0, 1, 'XXXX', 'A'); +--Testcase 6: +INSERT INTO test_having VALUES (1, 2, 'AAAA', 'b'); +--Testcase 7: +INSERT INTO test_having VALUES (2, 2, 'AAAA', 'c'); +--Testcase 8: +INSERT INTO test_having VALUES (3, 3, 'BBBB', 'D'); +--Testcase 9: +INSERT INTO test_having VALUES (4, 3, 'BBBB', 'e'); +--Testcase 10: +INSERT INTO test_having VALUES (5, 3, 'bbbb', 'F'); +--Testcase 11: +INSERT INTO test_having VALUES (6, 4, 'cccc', 'g'); +--Testcase 12: +INSERT INTO test_having VALUES (7, 4, 'cccc', 'h'); +--Testcase 13: +INSERT INTO test_having VALUES (8, 4, 'CCCC', 'I'); +--Testcase 14: +INSERT INTO test_having VALUES (9, 4, 'CCCC', 'j'); + +--Testcase 15: +SELECT b, c FROM test_having + GROUP BY b, c HAVING count(*) = 1 ORDER BY b, c; + +-- HAVING is effectively equivalent to WHERE in this case +--Testcase 16: +SELECT b, c FROM test_having + GROUP BY b, c HAVING b = 3 ORDER BY b, c; + +--Testcase 17: +SELECT lower(c), count(c) FROM test_having + GROUP BY lower(c) HAVING count(*) > 2 OR min(a) = max(a) + ORDER BY lower(c); + +--Testcase 18: +SELECT c, max(a) FROM test_having + GROUP BY c HAVING count(*) > 2 OR min(a) = max(a) + ORDER BY c; + +-- test degenerate cases involving HAVING without GROUP BY +-- Per SQL spec, these should generate 0 or 1 row, even without aggregates + +--Testcase 19: +SELECT min(a), max(a) FROM test_having HAVING min(a) = max(a); +--Testcase 20: +SELECT min(a), max(a) FROM test_having HAVING min(a) < max(a); + +-- errors: ungrouped column references +--Testcase 21: +SELECT a FROM test_having HAVING min(a) < max(a); +--Testcase 22: +SELECT 1 AS one FROM test_having HAVING a > 1; + +-- the really degenerate case: need not scan table at all +--Testcase 23: +SELECT 1 AS one FROM test_having HAVING 1 > 2; +--Testcase 24: +SELECT 1 AS one FROM test_having HAVING 1 < 2; + +-- and just to prove that we aren't scanning the table: +--Testcase 25: +SELECT 1 AS one FROM test_having WHERE 1/a = 1 HAVING 1 < 2; + +--Testcase 26: +-- Clean up: +--Testcase 30: +DELETE FROM test_having; +--Testcase 31: +DROP FOREIGN TABLE test_having; +--Testcase 27: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 28: +DROP SERVER influxdb_svr CASCADE; +--Testcase 29: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/15.0/influxdb_fdw.sql b/sql/15.0/influxdb_fdw.sql new file mode 100644 index 0000000..c7f5e2a --- /dev/null +++ b/sql/15.0/influxdb_fdw.sql @@ -0,0 +1,625 @@ +--SET log_min_messages=debug1; +--SET client_min_messages=debug1; +--Testcase 1: +SET datestyle=ISO; +-- timestamp with time zone differs based on this +--Testcase 2: +SET timezone='Japan'; + +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); +-- import time column as timestamp and text type +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); +--Testcase 6: +SELECT * FROM cpu; +--Testcase 7: +SELECT tag1, value1 FROM cpu; +--Testcase 8: +SELECT value1, time, value2 FROM cpu; +--Testcase 9: +SELECT value1, time_text, value2 FROM cpu; + +--Testcase 10: +DROP FOREIGN TABLE cpu; +--Testcase 11: +DROP FOREIGN TABLE t3; +--Testcase 12: +DROP FOREIGN TABLE t4; +--Testcase 13: +DROP FOREIGN TABLE tx; +--Testcase 14: +DROP FOREIGN TABLE numbers; + +-- test EXECPT +IMPORT FOREIGN SCHEMA public EXCEPT (cpu, t3, t4, tx, numbers) FROM SERVER server1 INTO public; +--Testcase 15: +SELECT ftoptions FROM pg_foreign_table; + +-- test LIMIT TO +IMPORT FOREIGN SCHEMA public LIMIT TO (cpu) FROM SERVER server1 INTO public; +--Testcase 16: +SELECT ftoptions FROM pg_foreign_table; +--Testcase 17: +DROP FOREIGN TABLE cpu; + +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); + +--Testcase 18: +SELECT * FROM cpu; +--Testcase 19: +SELECT tag1, value1 FROM cpu; +--Testcase 20: +SELECT value1, time, value2 FROM cpu; +--Testcase 21: +SELECT tag1 FROM cpu; +--Testcase 22: +SELECT * FROM numbers; + +--Testcase 23: +\d cpu; + +--Testcase 24: +SELECT * FROM cpu WHERE value1=100; +--Testcase 25: +SELECT * FROM cpu WHERE value2=0.5; +--Testcase 26: +SELECT * FROM cpu WHERE value3='str'; +--Testcase 27: +SELECT * FROM cpu WHERE value4=true; +--Testcase 28: +SELECT * FROM cpu WHERE NOT (value4 AND value1=100); +--Testcase 29: +SELECT * FROM cpu WHERE tag1='tag1_A'; + +--Testcase 30: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE value3 IS NULL; +--Testcase 31: +SELECT * FROM cpu WHERE value3 IS NULL; +--Testcase 32: +SELECT * FROM cpu WHERE tag2 IS NULL; +--Testcase 33: +SELECT * FROM cpu WHERE value3 IS NOT NULL; +--Testcase 34: +SELECT * FROM cpu WHERE tag2 IS NOT NULL; + +-- InfluxDB not support compare timestamp with OR condition +--Testcase 35: +SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR value2 = 0.5; + +-- InfluxDB not support compare timestamp with != or <> +--Testcase 36: +SELECT * FROM cpu WHERE time != '2015-08-18 09:48:08+09'; +--Testcase 37: +SELECT * FROM cpu WHERE time <> '2015-08-18 09:48:08+09'; + +--Testcase 38: +SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR value2 = 0.5; + +-- There is inconsitency for search of missing values between tag and field +--Testcase 39: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE value3 = ''; +--Testcase 40: +SELECT * FROM cpu WHERE value3 = ''; + +--Testcase 41: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE tag2 = ''; +--Testcase 42: +SELECT * FROM cpu WHERE tag2 = ''; + +--Testcase 43: +SELECT * FROM cpu WHERE tag1 IN ('tag1_A', 'tag1_B'); +--Testcase 44: +EXPLAIN VERBOSE +SELECT * FROM cpu WHERE tag1 IN ('tag1_A', 'tag1_B'); + +-- Rows which have no tag are considered to have empty string +--Testcase 45: +SELECT * FROM cpu WHERE tag1 NOT IN ('tag1_A', 'tag1_B'); +--Testcase 46: +EXPLAIN VERBOSE +SELECT * FROM cpu WHERE tag1 NOT IN ('tag1_A', 'tag1_B'); + +-- test IN/NOT IN +--Testcase 47: +SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); +--Testcase 48: +SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); +--Testcase 49: +SELECT * FROM cpu WHERE value1 NOT IN (100, 97); +--Testcase 50: +SELECT * FROM cpu WHERE value1 IN (100, 97); +--Testcase 51: +SELECT * FROM cpu WHERE value2 IN (0.5, 10.9); +--Testcase 52: +SELECT * FROM cpu WHERE value2 NOT IN (2, 9.7); +--Testcase 53: +SELECT * FROM cpu WHERE value4 NOT IN ('true', 'true'); +--Testcase 54: +SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); +--Testcase 55: +SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); +--Testcase 56: +SELECT * FROM cpu WHERE value1 NOT IN (100, 97); +--Testcase 57: +SELECT * FROM cpu WHERE value1 IN (100, 97); +--Testcase 58: +SELECT * FROM cpu WHERE value2 IN (0.5, 10.9); +--Testcase 59: +SELECT * FROM cpu WHERE value2 NOT IN (2, 9.7); +--Testcase 60: +SELECT * FROM cpu WHERE value4 NOT IN ('true', 'true'); +--Testcase 61: +SELECT * FROM cpu WHERE value4 IN ('f', 't'); + +--Testcase 62: +CREATE FOREIGN TABLE t1(time timestamp with time zone , tag1 text, value1 integer) SERVER server1 OPTIONS (table 'cpu'); +--Testcase 63: +CREATE FOREIGN TABLE t2(time timestamp , tag1 text, value1 integer) SERVER server1 OPTIONS (table 'cpu'); + +--Testcase 64: +SELECT * FROM t1; +--Testcase 65: +SELECT * FROM t2; +-- In following four queries, timestamp condition is added to InfluxQL as "time = '2015-08-18 00:00:00'" +--Testcase 66: +SELECT * FROM t1 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; +--Testcase 67: +SELECT * FROM t1 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; + +--Testcase 68: +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; +--Testcase 69: +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; + +-- pushdown now() +--Testcase 70: +SELECT * FROM t2 WHERE now() > time; +--Testcase 71: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE now() > time; + +--Testcase 72: +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; +--Testcase 73: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; + +-- InfluxDB does not seem to support time column + interval, so below query returns empty result +-- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; +-- EXPLAIN (VERBOSE, COSTS OFF) +-- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; + +-- InfluxDB does not support month or year interval, so not push down +--Testcase 74: +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; +--Testcase 75: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; + +--Testcase 76: +SELECT * FROM t2 WHERE value1 = ANY (ARRAY(SELECT value1 FROM t1 WHERE value1 < 1000)); + +-- ANY with ARRAY expression +--Testcase 77: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, a + 1]); +--Testcase 78: +SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, a + 1]); + +--Testcase 79: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, a + 1]); +--Testcase 80: +SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, a + 1]); + +--Testcase 81: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, a + 1]); +--Testcase 82: +SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, a + 1]); + +--Testcase 83: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, a + 1]); +--Testcase 84: +SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, a + 1]); + +--Testcase 85: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, a + 1]); +--Testcase 86: +SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, a + 1]); + +--Testcase 87: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, a + 1]); +--Testcase 88: +SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, a + 1]); + +-- ANY with ARRAY const +--Testcase 89: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, 2]); +--Testcase 90: +SELECT a, b FROM numbers WHERE a = ANY(ARRAY[1, 2]); + +--Testcase 91: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, 2]); +--Testcase 92: +SELECT a, b FROM numbers WHERE a <> ANY(ARRAY[1, 2]); + +--Testcase 93: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, 2]); +--Testcase 94: +SELECT a, b FROM numbers WHERE a >= ANY(ARRAY[1, 2]); + +--Testcase 95: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, 2]); +--Testcase 96: +SELECT a, b FROM numbers WHERE a <= ANY(ARRAY[1, 2]); + +--Testcase 97: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, 2]); +--Testcase 98: +SELECT a, b FROM numbers WHERE a > ANY(ARRAY[1, 2]); + +--Testcase 99: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, 2]); +--Testcase 100: +SELECT a, b FROM numbers WHERE a < ANY(ARRAY[1, 2]); + +--Testcase 101: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a = ANY('{1, 2, 3}'); +--Testcase 102: +SELECT a, b FROM numbers WHERE a = ANY('{1, 2, 3}'); +--Testcase 103: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <> ANY('{1, 2, 3}'); +--Testcase 104: +SELECT a, b FROM numbers WHERE a <> ANY('{1, 2, 3}'); + +-- ALL with ARRAY expression +--Testcase 105: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, a * 1]); +--Testcase 106: +SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, a * 1]); + +--Testcase 107: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, a + 1]); +--Testcase 108: +SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, a + 1]); + +--Testcase 109: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, a / 1]); +--Testcase 110: +SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, a / 1]); + +--Testcase 111: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, a + 1]); +--Testcase 112: +SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, a + 1]); + +--Testcase 113: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a > ALL(ARRAY[1, a - 1]); +--Testcase 114: +SELECT a, b FROM numbers WHERE a > ALL(ARRAY[1, a - 1]); + +--Testcase 115: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, a + 1]); +--Testcase 116: +SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, a + 1]); + +-- ALL with ARRAY const +--Testcase 117: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, 1]); +--Testcase 118: +SELECT a, b FROM numbers WHERE a = ALL(ARRAY[1, 1]); + +--Testcase 119: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, 3]); +--Testcase 120: +SELECT a, b FROM numbers WHERE a <> ALL(ARRAY[1, 3]); + +--Testcase 121: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, 2]); +--Testcase 122: +SELECT a, b FROM numbers WHERE a >= ALL(ARRAY[1, 2]); + +--Testcase 123: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, 2]); +--Testcase 124: +SELECT a, b FROM numbers WHERE a <= ALL(ARRAY[1, 2]); + +--Testcase 125: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a > ALL(ARRAY[0, 1]); +--Testcase 126: +SELECT a, b FROM numbers WHERE a > ALL(ARRAY[0, 1]); + +--Testcase 127: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, 3]); +--Testcase 128: +SELECT a, b FROM numbers WHERE a < ALL(ARRAY[2, 3]); + +-- ANY/ALL with TEXT ARRAY const +--Testcase 129: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE b = ANY(ARRAY['One', 'Two']); +--Testcase 130: +SELECT a, b FROM numbers WHERE b = ANY(ARRAY['One', 'Two']); + +--Testcase 131: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE b <> ALL(ARRAY['One', 'Four']); +--Testcase 132: +SELECT a, b FROM numbers WHERE b <> ALL(ARRAY['One', 'Four']); + +--Testcase 133: +EXPLAIN VERBOSE +SELECT a, b FROM numbers WHERE b > ANY(ARRAY['One', 'Two']); +--Testcase 134: +SELECT a, b FROM numbers WHERE b > ANY(ARRAY['One', 'Two']); + +--Testcase 135: +EXPLAIN VERBOSE +SELECT * FROM numbers WHERE b > ALL(ARRAY['Four', 'Five']); +--Testcase 136: +SELECT a, b FROM numbers WHERE b > ALL(ARRAY['Four', 'Five']); + +--Testcase 137: +DROP FOREIGN TABLE numbers; + +--Testcase 138: +ALTER SERVER server1 OPTIONS (SET dbname 'no such database'); +--Testcase 139: +SELECT * FROM t1; +--Testcase 140: +ALTER SERVER server1 OPTIONS (SET dbname 'mydb'); +--Testcase 141: +SELECT * FROM t1; + +-- map time column to both timestamp and text +--Testcase 142: +CREATE FOREIGN TABLE t5(t timestamp OPTIONS (column_name 'time'), tag1 text OPTIONS (column_name 'time'), v1 integer OPTIONS (column_name 'value1')) SERVER server1 OPTIONS (table 'cpu'); +--Testcase 143: +SELECT * FROM t5; + +--get version +--Testcase 144: +\df influxdb_fdw* +--Testcase 145: +SELECT * FROM public.influxdb_fdw_version(); +--Testcase 146: +SELECT influxdb_fdw_version(); +--Test pushdown LIMIT...OFFSET +--Testcase 147: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; + +--Testcase 148: +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; + +--Testcase 149: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; + +--Testcase 150: +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; + +--Testcase 151: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; + +--Testcase 152: +SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; + +--Testcase 153: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; + +--Testcase 154: +SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; + +--Testcase 155: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM + t1 + LEFT JOIN t2 + ON t2.value1 = 123, + LATERAL (SELECT t2.value1, t1.tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss +WHERE t1.value1 = ss.value1; + +--Testcase 156: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM + t1 + LEFT JOIN t2 + ON t2.value1 = 123, + LATERAL (SELECT t2.value1, t1.tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss1, + LATERAL (SELECT ss1.* from t3 LIMIT 1 OFFSET 20) AS ss2 +WHERE t1.value1 = ss2.value1; + +--Testcase 157: +DROP FOREIGN TABLE cpu; +--Testcase 158: +DROP FOREIGN TABLE t1; +--Testcase 159: +DROP FOREIGN TABLE t2; +--Testcase 160: +DROP FOREIGN TABLE t3; +--Testcase 161: +DROP FOREIGN TABLE t4; +--Testcase 162: +DROP FOREIGN TABLE t5; +--Testcase 163: +DROP FOREIGN TABLE tx; + +-- test INSERT, DELETE +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true'); +--Testcase 164: +SELECT * FROM cpu; +--Testcase 165: +EXPLAIN VERBOSE +INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test1', true); +--Testcase 166: +INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test', true); +--Testcase 167: +SELECT * FROM cpu; + +--Testcase 168: +EXPLAIN VERBOSE +INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), + ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); +--Testcase 169: +INSERT INTO cpu(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), + ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); +--Testcase 170: +SELECT * FROM cpu; + +--Testcase 171: +INSERT INTO cpu(tag2, value1) VALUES('tag2_KH', 400); +--Testcase 172: +SELECT tag1, tag2, value1, value2, value3, value4 FROM cpu; + +--Testcase 173: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE tag2 = 'tag2_KH'; +--Testcase 174: +DELETE FROM cpu WHERE tag2 = 'tag2_KH'; +--Testcase 175: +SELECT tag1, tag2, value1, value2, value3, value4 FROM cpu; + +--Testcase 176: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; +--Testcase 177: +DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; +--Testcase 178: +SELECT * FROM cpu; + +--Testcase 179: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; +--Testcase 180: +DELETE FROM cpu WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; +--Testcase 181: +SELECT * FROM cpu; + +-- Test INSERT, DELETE with time_text column +--Testcase 182: +INSERT INTO cpu(time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02T00:00:00Z', 'tag1_D', 'tag2_E', 600, 20.2, 'test3', true); +--Testcase 183: +SELECT * FROM cpu; + +--Testcase 184: +INSERT INTO cpu(time_text, tag1, value2) VALUES('2021-02-02T00:00:00.123456789Z', 'tag1_P', 25.8); +--Testcase 185: +SELECT * FROM cpu; + +--Testcase 186: +INSERT INTO cpu(time_text, tag1, value2) VALUES('2021-02-02 00:00:01', 'tag1_J', 37.1); +--Testcase 187: +SELECT * FROM cpu; + +--Testcase 188: +INSERT INTO cpu(time, time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02 00:00:01+05', '2021-02-02T00:00:02.123456789Z', 'tag1_A', 'tag2_B', 200, 5.5, 'test', true); +--Testcase 189: +SELECT * FROM cpu; + +--Testcase 190: +INSERT INTO cpu(time_text, time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-03T00:00:03.123456789Z', '2021-03-03 00:00:01+07', 'tag1_C', 'tag2_D', 200, 5.5, 'test', true); +--Testcase 191: +SELECT * FROM cpu; + +--Testcase 192: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:00.123456789Z'; +--Testcase 193: +DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:00.123456789Z'; +--Testcase 194: +SELECT * FROM cpu; + +--Testcase 195: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; +--Testcase 196: +DELETE FROM cpu WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; +--Testcase 197: +SELECT * FROM cpu; + +--Testcase 198: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; +--Testcase 199: +DELETE FROM cpu WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; +--Testcase 200: +SELECT * FROM cpu; + +-- InfluxDB_FDW will store time data for Field values as a strings +--Testcase 204: +CREATE FOREIGN TABLE tmp_time ( +time timestamp, +c1 time, +c2 timestamp, +c3 timestamp with time zone +) SERVER server1 OPTIONS (table 'tmp_time'); +--Testcase 205: +SELECT * FROM tmp_time; +--Testcase 206: +INSERT INTO tmp_time (time, c1) VALUES ('1900-01-01 01:01:01', '01:02:03'); +--Testcase 207: +INSERT INTO tmp_time (time, c1) VALUES ('2100-01-01 01:01:01', '04:05:06'); +--Testcase 208: +INSERT INTO tmp_time (time, c1) VALUES ('1990-01-01 01:01:01', '07:08:09'); +--Testcase 209: +INSERT INTO tmp_time (time, c2) VALUES ('2020-12-27 03:02:56.634467', '1950-02-02 02:02:02'); +--Testcase 210: +INSERT INTO tmp_time (time, c3) VALUES ('2021-12-27 03:02:56.668301', '1800-02-02 02:02:02+9'); +--Testcase 210: +INSERT INTO tmp_time (time, c1, c2, c3) VALUES ('2022-05-06 07:08:09', '07:08:09', '2022-05-06 07:08:09', '2022-05-06 07:08:09+9'); +--Testcase 211: +-- 1800-02-02 02:02:02+9 is Daylight Saving Time (DST) changes in Japan. +-- Timezone setting Japan so it will plus 18s:59 +-- https://www.timeanddate.com/time/zone/japan/tokyo?syear=1850 +SELECT * FROM tmp_time; + +-- Recover data +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; + +--Testcase 201: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 202: +DROP SERVER server1 CASCADE; +--Testcase 203: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/14.0/init.sql b/sql/15.0/init.sql similarity index 100% rename from sql/14.0/init.sql rename to sql/15.0/init.sql diff --git a/sql/15.0/option.sql b/sql/15.0/option.sql new file mode 100644 index 0000000..35e344b --- /dev/null +++ b/sql/15.0/option.sql @@ -0,0 +1,214 @@ +--Testcase 1: +SET datestyle=ISO; + +--Testcase 2: +CREATE EXTENSION influxdb_fdw; + +-- version not valid +--Testcase 3: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '9999', retention_policy ''); +--Testcase 4: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version 'dummy', retention_policy ''); +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '-1', retention_policy ''); + +-- host must be not NULL or not empty +--Testcase 6: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', port '38086', version '2', retention_policy ''); +--Testcase 7: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 8: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 9: +SELECT * FROM optiontbl; +--Testcase 10: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 11: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host '', port '38086', version '2', retention_policy ''); +--Testcase 12: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 13: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 14: +SELECT * FROM optiontbl; +--Testcase 15: +DROP SERVER influxdb_svr CASCADE; + +-- dbname must be not NULL or not empty +--Testcase 16: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 17: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 18: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 19: +SELECT * FROM optiontbl; +--Testcase 20: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 21: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname '', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 22: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 23: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 24: +SELECT * FROM optiontbl; +--Testcase 25: +DROP SERVER influxdb_svr CASCADE; + + +-- retention_policy can be NULL +--Testcase 26: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2'); +--Testcase 27: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 28: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 29: +SELECT * FROM optiontbl; +--Testcase 30: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 31: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 32: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 33: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 34: +SELECT * FROM optiontbl; +--Testcase 35: +DROP SERVER influxdb_svr CASCADE; + +-- auth_token can be NULL +--Testcase 36: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 37: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 38: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 39: +SELECT * FROM optiontbl; +--Testcase 40: +DROP SERVER influxdb_svr CASCADE; + +-- auth_token invalid +--Testcase 41: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 42: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'wrong_token'); +--Testcase 43: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 44: +SELECT * FROM optiontbl; +--Testcase 45: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 46: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', version '2', retention_policy ''); +--Testcase 47: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token ''); +--Testcase 48: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 49: +SELECT * FROM optiontbl; +--Testcase 50: +DROP SERVER influxdb_svr CASCADE; + +-- user must can be NULL +--Testcase 51: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 52: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (password 'pass'); +--Testcase 53: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 54: +SELECT * FROM optiontbl; +--Testcase 55: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 56: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 57: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password 'pass'); +--Testcase 58: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 59: +SELECT * FROM optiontbl; +--Testcase 60: +DROP SERVER influxdb_svr CASCADE; + +-- password can be NULL +--Testcase 61: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 62: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user'); +--Testcase 63: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 65: +SELECT * FROM optiontbl; +--Testcase 65: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 66: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 67: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password ''); +--Testcase 68: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 69: +SELECT * FROM optiontbl; +--Testcase 70: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 71: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 72: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user '', password ''); +--Testcase 73: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 74: +SELECT * FROM optiontbl; +--Testcase 75: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 76: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086', version '1'); +--Testcase 77: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 78: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 79: +SELECT * FROM optiontbl; +--Testcase 80: +DROP SERVER influxdb_svr CASCADE; + +-- Test if version option is not set +-- Connect to InfluxDB version 1 +--Testcase 81: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '18086'); +--Testcase 82: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user 'user', password 'pass'); +--Testcase 83: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 84: +SELECT * FROM optiontbl; +--Testcase 85: +DROP SERVER influxdb_svr CASCADE; + +-- Connect to InfluxDB version 2 +--Testcase 86: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'optiondb', host 'http://localhost', port '38086', retention_policy ''); +--Testcase 87: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (auth_token 'mytoken'); +--Testcase 88: +CREATE FOREIGN TABLE optiontbl (tag1 text, version text, value2 int) SERVER influxdb_svr; +--Testcase 89: +SELECT * FROM optiontbl; +--Testcase 90: +DROP SERVER influxdb_svr CASCADE; + +--Testcase 91: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/15.0/schemaless/add_fields.sql b/sql/15.0/schemaless/add_fields.sql new file mode 100644 index 0000000..c192113 --- /dev/null +++ b/sql/15.0/schemaless/add_fields.sql @@ -0,0 +1,289 @@ +SET datestyle=ISO; +-- timestamp with time zone differs based on this +SET timezone='UTC'; + +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +-- Init data +:INIT_FIELDS_ORIGINAL; +--Before update data + +--Testcase 1: +CREATE EXTENSION influxdb_fdw CASCADE; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +--Testcase 4: +CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); + +--Testcase 5: +CREATE FOREIGN TABLE sctbl2 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); + + +--Before update data +--Testcase 6: +SELECT * FROM sctbl1; +--Testcase 7: +SELECT max(time), max((fields->>'sig1')::bigint), max((fields->>'sig1')::bigint)+10, max((fields->>'sig1')::bigint)-10, max((fields->>'sig3')::float8), max((fields->>'sig3')::float8)/2 FROM sctbl1 GROUP BY time,(fields->>'sig1')::bigint; +--Testcase 8: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4 from sctbl1 ORDER BY tags->>'device_id'; +--Testcase 9: +SELECT bool_or((fields->>'sig1')::bigint <> 10) AND true, bool_and(fields->>'sig2' != 'aghsjfh'), bool_or((fields->>'sig1')::bigint+(fields->>'sig3')::float8 <=5.5) OR false from sctbl1 GROUP BY (fields->>'sig1')::bigint,fields->>'sig2'; +--Testcase 10: +SELECT sqrt(abs((fields->>'sig1')::float8)), sqrt(abs((fields->>'sig3')::float8)) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint > -1000 AND (fields->>'sig3')::float8 < 1000 ) AS sctbl1 ORDER BY 1 ASC,2 DESC; +--Testcase 11: +SELECT fields->>'sig2' sig2, mode((fields->>'sig3')::float8) WITHIN GROUP (ORDER BY (fields->>'sig3')::float8) AS m1 from sctbl1 GROUP BY fields->>'sig2'; +--Testcase 12: +SELECT upper(fields->>'sig2'), upper(fields->>'sig2'), lower(fields->>'sig2'), lower(fields->>'sig2') FROM sctbl1 ORDER BY 1 ASC,2 DESC,3 ASC,4; + +-------------------------------------------------------------------------------------------Update data--Add 1 field------------------------------------------------------------------------------------------------------------ +--Update data +:RECOVER_INIT_FIELDS_ADD_1; + +--Testcase 13: +DROP FOREIGN TABLE sctbl1; +--Testcase 14: +CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); + +--Testcase 15: +SELECT * FROM sctbl1; +--Select fields,tags +--Testcase 16: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint < (fields->>'sig3')::float8 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; +--Testcase 17: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE (fields->>'sig3')::float8 < 0 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; +--Testcase 18: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3 FROM sctbl1 WHERE NOT time >'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 2; +--Testcase 19: +SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 20: +SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 21: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig1')::bigint BETWEEN 0 AND 10000 ORDER BY (fields->>'sig1')::bigint DESC LIMIT 5 OFFSET 0; +--Testcase 22: +SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE fields->>'sig2' LIKE 'x%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 23: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4 FROM sctbl1 WHERE NOT EXISTS (SELECT fields->>'sig2' FROM sctbl1 WHERE fields->>'sig2'='AHW') ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; +--Testcase 24: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig3')::float8 < ALL (SELECT (fields->>'sig1')::bigint FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; +--Testcase 25: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig3')::float8 = ANY (ARRAY[0.78,0.32,0.34]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 26: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig3')::float8=0.25) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; +--Testcase 27: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE fields->>'sig1'=ANY (ARRAY(SELECT fields->>'sig1' FROM sctbl1 WHERE (fields->>'sig1')::bigint%2=0)) ORDER BY 1 DESC LIMIT 5 OFFSET 0; +--Testcase 28: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig4')::boolean=true) ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; +--Testcase 29: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint+(fields->>'sig3')::float8 as ss FROM sctbl1 WHERE fields->>'sig2' IS NULL ORDER BY (fields->>'sig1')::bigint DESC,fields->>'sig2' ASC LIMIT 5 OFFSET 0; +--Testcase 30: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint/(fields->>'sig3')::float8 as dd FROM sctbl1 WHERE fields->>'sig2' IS NOT NULL ORDER BY fields->>'sig2' DESC,(fields->>'sig1')::bigint ASC LIMIT 5 OFFSET 0; +--Testcase 31: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig5')::boolean sig5,(fields->>'sig1')::bigint*(fields->>'sig3')::float8 as mm FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint=5 ORDER BY fields->>'sig2' DESC LIMIT 5 OFFSET 0; +--Testcase 32: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig1')::bigint != 0 AND (fields->>'sig3')::float8=0.32 ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; +--Testcase 33: +SELECT (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4, (fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 > -1.0 OR fields->>'sig2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 34: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 < -0.1 AND fields->>'sig2' > 'Mee' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 35: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 36: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE fields->>'sig2' LIKE 'A%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 37: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE NOT EXISTS (SELECT fields->>'sig2' FROM sctbl1 WHERE fields->>'sig2'='AHW') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 2; +--Testcase 38: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE (fields->>'sig3')::float8 NOT IN (0, 1000, -1, -2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 1; +--Testcase 39: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig1')::bigint>-1000 AND (fields->>'sig3')::float8 < 1 ) AS tb1 WHERE fields->>'sig3'=ANY (ARRAY(SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig1')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 1; +--Testcase 40: +SELECT time, fields->>'sig2' sig2 FROM sctbl1 WHERE fields->>'sig2' <= 'A' AND (fields->>'sig3')::float8 <>-5 AND (fields->>'sig1')::bigint <> 100 ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 1; + +--Select aggregate functions +--Testcase 41: +SELECT max(time), max((fields->>'sig1')::bigint*0.5), max((fields->>'sig3')::float8+10) FROM sctbl1 WHERE (fields->>'sig3')::float8 NOT IN (0, 1000, -1, -2) GROUP BY fields->>'sig3', fields->>'sig1' HAVING min((fields->>'sig3')::float8) < min((fields->>'sig1')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; +--Testcase 42: +SELECT tags->>'device_id' device_id,abs((fields->>'sig1')::bigint), ceil((fields->>'sig3')::float8), (fields->>'sig5')::boolean sig5 FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0 AND (fields->>'sig4')::boolean = true; +--Testcase 43: +SELECT count(tags->>'device_id'),sum((fields->>'sig1')::bigint),sum((fields->>'sig1')::bigint+(fields->>'sig3')::float8),stddev((fields->>'sig3')::float8 order by (fields->>'sig3')::float8) from sctbl1 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 5 OFFSET 0; +--Testcase 44: +SELECT mode((fields->>'sig1')::bigint) WITHIN GROUP (order by (fields->>'sig1')::bigint) from sctbl1; +--Testcase 45: +SELECT (fields->>'sig1')::bigint sig1,spread((fields->>'sig1')::bigint) FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig3' FROM sctbl1 WHERE (fields->>'sig4')::boolean in (true,false)) GROUP BY tags->>'device_id', fields->>'sig1',fields->>'sig5' HAVING (fields->>'sig5')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 1; +--Testcase 46: +SELECT (fields->>'sig3')::float8 sig3, acos((fields->>'sig3')::float8), atan((fields->>'sig3')::float8) FROM sctbl1 WHERE fields->>'sig2' IS NULL GROUP BY fields->>'sig3' HAVING min((fields->>'sig1')::bigint) < min((fields->>'sig3')::float8) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; +--Testcase 47: +SELECT (fields->>'sig3')::float8 sig3, log((fields->>'sig3')::float8),cos((fields->>'sig3')::float8) FROM sctbl1 WHERE fields->>'sig2' IS NOT NULL AND (fields->>'sig3')::float8 > 0 GROUP BY fields->>'sig3' HAVING min((fields->>'sig3')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND sum((fields->>'sig3')::float8) > -1000 AND avg((fields->>'sig3')::float8) > -1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; +--Testcase 48: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,ln((fields->>'sig1')::bigint), log10((fields->>'sig3')::float8) FROM sctbl1 WHERE NOT (fields->>'sig1')::bigint=5 GROUP BY fields->>'sig1', fields->>'sig3' HAVING min((fields->>'sig3')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND (fields->>'sig1')::bigint > 0 AND (fields->>'sig3')::float8 > 0 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; +--Testcase 49: +SELECT max(time), max((fields->>'sig1')::bigint + (fields->>'sig3')::float8), min((fields->>'sig1')::bigint + (fields->>'sig3')::float8) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig4')::boolean != true ) AS tb1 WHERE (fields->>'sig3')::float8 != -1 AND (fields->>'sig5')::boolean != true GROUP BY fields->>'sig1' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; +--Testcase 50: +SELECT every((fields->>'sig1')::bigint > 5),every((fields->>'sig3')::float8 != 5) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig5')::boolean = true ) AS tb1 WHERE (fields->>'sig3')::float8 < 0 GROUP BY fields->>'sig1', fields->>'sig4' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 DESC, 2 LIMIT 5 OFFSET 0; +--Testcase 51: +SELECT (fields->>'sig3')::float8 sig3,exp((fields->>'sig3')::float8),exp((fields->>'sig3')::float8*2) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > -1000 AND (fields->>'sig5')::boolean = true ) AS tb1 WHERE true GROUP BY fields->>'sig3' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; +--Testcase 52: +SELECT min(time)+'10 days'::interval, min((fields->>'sig1')::bigint + (fields->>'sig3')::float8) FROM sctbl1 WHERE NOT time>'2020-01-03 20:30:50' GROUP BY fields->>'sig1', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; +--Testcase 53: +SELECT floor((fields->>'sig1')::bigint*(fields->>'sig3')::float8), floor((fields->>'sig1')::bigint/(fields->>'sig3')::float8) FROM sctbl1 WHERE ((fields->>'sig3')::float8 - 1)/3 != 1 GROUP BY fields->>'sig1', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; +--Testcase 54: +SELECT time, tags->>'device_id' device_id, pow((fields->>'sig1')::bigint,-2) FROM sctbl1 WHERE ((fields->>'sig3')::float8 - 1)/3 != 1 GROUP BY time, tags->>'device_id', fields->>'sig1' ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; +--Testcase 55: +SELECT min(time)+'10 days'::interval, min((fields->>'sig3')::float8) FROM sctbl1 WHERE false GROUP BY fields->>'sig1',fields->>'sig2', fields->>'sig3' HAVING sum((fields->>'sig3')::float8) < avg((fields->>'sig1')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; +--Testcase 56: +SELECT min(time)+'10 days'::interval, min((fields->>'sig3')::float8) FROM sctbl1 WHERE (fields->>'sig3')::float8 IN (-1,0.32,0.34,0.91,0.78) GROUP BY fields->>'sig3' HAVING min((fields->>'sig1')::bigint) > min((fields->>'sig3')::float8) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; +--Testcase 57: +SELECT max((fields->>'sig3')::float8), count(*), exists(SELECT * FROM sctbl1 WHERE (fields->>'sig3')::float8 > 1), exists (SELECT count(*) FROM sctbl1 WHERE (fields->>'sig4')::boolean in ('t','f')) FROM sctbl1 WHERE (fields->>'sig5')::boolean =true GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 5 OFFSET 0; + +--Join table, each table has 5 fields +--Testcase 58: +SELECT * FROM sctbl1 s1 FULL JOIN sctbl2 s2 ON s1.tags->>'device_id'=s2.tags->>'device_id'; +--Testcase 59: +SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fields->>'sig2' sig2,(s1.fields->>'sig3')::float8 sig3,(s1.fields->>'sig4')::boolean sig4,s2.fields->>'sig5' sig5 FROM sctbl1 s1 LEFT JOIN sctbl2 s2 ON (s1.fields->>'sig4')::boolean=(s2.fields->>'sig4')::boolean; +--Testcase 60: +SELECT s2.device_id,s2.sig1,s2.sig2,s2.sig3,s1.sig4,s1.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 RIGHT JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 using(sig2) where (s2.sig1)::bigint > 0 ORDER BY s2.device_id,s2.sig1,s2.sig2,s2.sig3,s1.sig4,s1.sig5; +--Testcase 61: +SELECT * FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 LEFT OUTER JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 using (sig2) ORDER BY s1.sig1,s1.sig2; +--Testcase 62: +SELECT s1.device_id,s1.sig1,s1.sig2,s1.sig3,s1.sig4,s1.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5 FROM sctbl1) s1 NATURAL JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2; +--Testcase 63: +SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig1')::bigint sig1,s1.fields->>'sig2' sig2,(s1.fields->>'sig3')::float8 sig3,(s1.fields->>'sig4')::boolean sig4,(s1.fields->>'sig5')::boolean sig5 FROM sctbl1 s1 JOIN sctbl2 s2 on true; + + +-------------------------------------------------------------------------------------------Update data--Add 20 field------------------------------------------------------------------------------------------------------------ +--Update data +:RECOVER_INIT_FIELDS_ADD_20; + +--Testcase 64: +DROP FOREIGN TABLE sctbl1; +--Testcase 65: +CREATE FOREIGN TABLE sctbl1 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'device_id'); + +--Testcase 66: +SELECT * FROM sctbl1; +--Testcase 67: +SELECT avg(null::numeric) FROM sctbl1; +--Testcase 68: +SELECT sqrt(null::float8) FROM sctbl1; +--Testcase 69: +SELECT sum('NaN'::numeric) FROM sctbl1; + +--Select fields,tags +--Testcase 70: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig6')::bigint sig6 FROM sctbl1 WHERE NOT (fields->>'sig6')::bigint < (fields->>'sig1')::bigint ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; +--Testcase 71: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig7')::float8 sig7 FROM sctbl1 WHERE (fields->>'sig7')::float8 < 0 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; +--Testcase 72: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::float8 sig3,(fields->>'sig8')::float8 sig8 FROM sctbl1 WHERE NOT time >'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 2; +--Testcase 73: +SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6,(fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::int sig10,fields->>'sig11' sig11,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,fields->>'sig18' sig18,fields->>'sig19' sig19,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; +--Testcase 74: +SELECT time, tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6,(fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::int sig10,fields->>'sig11' sig11,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,fields->>'sig18' sig18,fields->>'sig19' sig19,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; +--Testcase 75: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig9')::float8 sig9, (fields->>'sig10')::int sig10,fields->>'sig11' sig11 FROM sctbl1 WHERE (fields->>'sig8')::float8 BETWEEN 0.0 AND 10.0 ORDER BY (fields->>'sig1')::bigint DESC LIMIT 15 OFFSET 2; +--Testcase 76: +SELECT * FROM sctbl1 WHERE fields->>'sig11' LIKE 'w%' ORDER BY fields->>'sig11' DESC LIMIT 15 OFFSET 0; +--Testcase 77: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,fields->>'sig12' sig12,(fields->>'sig13')::boolean sig13 FROM sctbl1 WHERE NOT EXISTS (SELECT fields->>'sig12' FROM sctbl1 WHERE fields->>'sig11'='33') ORDER BY tags->>'device_id' DESC,(fields->>'sig1')::bigint ASC LIMIT 15 OFFSET 0; +--Testcase 78: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,fields->>'sig14' sig14,(fields->>'sig15')::bigint sig15 FROM sctbl1 WHERE (fields->>'sig9')::float8 < ALL (SELECT (fields->>'sig8')::float8 FROM sctbl1 WHERE (fields->>'sig1')::bigint > 0 AND fields->>'sig8' IS NOT NULL) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; +--Testcase 79: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig16')::bigint sig16 FROM sctbl1 WHERE (fields->>'sig9')::float8 = ANY (ARRAY[-0.22,0.425,-0.9]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; +--Testcase 80: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,(fields->>'sig17')::bigint sig17 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig10' FROM sctbl1 WHERE (fields->>'sig10')::bigint!=77) ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; +--Testcase 81: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,(fields->>'sig4')::boolean sig4,fields->>'sig18' sig18 FROM sctbl1 WHERE fields->>'sig6'=ANY (ARRAY(SELECT fields->>'sig10' FROM sctbl1 WHERE (fields->>'sig10')::bigint%2 !=0)) ORDER BY 1 DESC LIMIT 15 OFFSET 0; +--Testcase 82: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::float8 sig3,fields->>'sig19' sig19,fields->>'sig20' sig20 FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig11' FROM sctbl1 WHERE (fields->>'sig13')::boolean=true) ORDER BY 1 DESC,2 ASC LIMIT 5 OFFSET 0; +--Testcase 83: +SELECT (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16,(fields->>'sig15')::bigint+(fields->>'sig16')::bigint as ss,fields->>'sig20' sig20,(fields->>'sig21')::boolean sig21 FROM sctbl1 WHERE fields->>'sig12' IS NULL ORDER BY (fields->>'sig1')::bigint DESC,fields->>'sig12' ASC LIMIT 15 OFFSET 0; +--Testcase 84: +SELECT (fields->>'sig16')::bigint sig16,(fields->>'sig17')::bigint sig17,(fields->>'sig16')::bigint/(fields->>'sig17')::bigint as dd,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23 FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL ORDER BY fields->>'sig12' DESC,(fields->>'sig1')::int ASC LIMIT 15 OFFSET 0; +--Testcase 85: +SELECT (fields->>'sig1')::bigint sig1,(fields->>'sig17')::bigint sig17,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25,(fields->>'sig17')::bigint*(fields->>'sig25')::float8 as mm FROM sctbl1 WHERE NOT (fields->>'sig10')::bigint=15 ORDER BY fields->>'sig20' DESC LIMIT 15 OFFSET 0; +--Testcase 86: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig10')::bigint != 0 AND (fields->>'sig7')::float8=-1.234456e+78 ORDER BY 1 DESC,2 ASC LIMIT 15 OFFSET 0; +--Testcase 87: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 > -1.0 OR fields->>'sig12' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; +--Testcase 88: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 < 0 AND fields->>'sig12' > 'Mee' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; +--Testcase 89: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig7')::float8 IN (1.234456e+8,-1.234456e+8) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; +--Testcase 90: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE fields->>'sig12' LIKE 't%' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; +--Testcase 91: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE NOT EXISTS (SELECT fields->>'sig22' FROM sctbl1 WHERE fields->>'sig12'='AHWEMAKDF') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 1; +--Testcase 92: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE (fields->>'sig8')::float8 NOT IN (0, 1000, -1, -2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 2; +--Testcase 93: +SELECT (fields->>'sig21')::boolean sig21,fields->>'sig22' sig22,(fields->>'sig23')::bigint sig23,(fields->>'sig24')::int sig24,(fields->>'sig25')::float8 sig25 FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig6')::bigint>-1000 AND (fields->>'sig9')::float8 < 1 ) AS tb1 WHERE fields->>'sig6'=ANY (ARRAY(SELECT fields->>'sig6' FROM sctbl1 WHERE (fields->>'sig10')::bigint%2!=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 15 OFFSET 0; +--Testcase 94: +SELECT time, (fields->>'sig10')::bigint sig10,fields->>'sig12' sig12 FROM sctbl1 WHERE (fields->>'sig10')::bigint <= 1000 AND (fields->>'sig15')::float8 <> -5 AND (fields->>'sig10')::bigint <> 100 ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 1; + +--Select aggregate functions +--Testcase 95: +SELECT max(time), max((fields->>'sig15')::bigint*0.5), max((fields->>'sig17')::bigint - 10) FROM sctbl1 WHERE (fields->>'sig8')::float8 NOT IN (0.0, 1000, -1.0, -2.0) GROUP BY fields->>'sig15', fields->>'sig17' HAVING min((fields->>'sig8')::float8) < min((fields->>'sig17')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; +--Testcase 96: +SELECT tags->>'device_id' device_id,abs((fields->>'sig16')::bigint), ceil((fields->>'sig8')::float8), (fields->>'sig25')::float8 sig25 FROM sctbl1 WHERE (fields->>'sig15')::bigint > 0 AND (fields->>'sig13')::boolean = true; +--Testcase 97: +SELECT count(tags->>'device_id'),sum((fields->>'sig10')::bigint),sum((fields->>'sig7')::float8+(fields->>'sig10')::bigint),stddev((fields->>'sig8')::float8 order by (fields->>'sig8')::float8) from sctbl1 ORDER BY 1 DESC,2 ASC,3 DESC LIMIT 15 OFFSET 0; +--Testcase 98: +SELECT mode(fields->>'sig12') WITHIN GROUP (order by fields->>'sig12') from sctbl1; +--Testcase 99: +SELECT (fields->>'sig10')::int sig10,spread((fields->>'sig10')::bigint) FROM sctbl1 WHERE EXISTS (SELECT fields->>'sig6' FROM sctbl1 WHERE (fields->>'sig13')::boolean in (true,false)) GROUP BY tags->>'device_id', fields->>'sig10',fields->>'sig21' HAVING (fields->>'sig21')::boolean != true ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 1; +--Testcase 100: +SELECT (fields->>'sig9')::float8 sig9, acos((fields->>'sig9')::float8), atan((fields->>'sig9')::float8) FROM sctbl1 WHERE fields->>'sig12' IS NULL GROUP BY fields->>'sig9' HAVING min((fields->>'sig10')::bigint) < min((fields->>'sig6')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; +--Testcase 101: +SELECT (fields->>'sig9')::float8 sig9, log((fields->>'sig9')::float8),cos((fields->>'sig9')::float8) FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL AND (fields->>'sig9')::float8 > 0 GROUP BY fields->>'sig9' HAVING min((fields->>'sig9')::float8) < 100 AND max((fields->>'sig1')::bigint) < 1000 AND sum((fields->>'sig3')::float8) > -1000 AND avg((fields->>'sig3')::float8) > -1000 ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; +--Testcase 102: +SELECT (fields->>'sig10')::bigint sig10,(fields->>'sig8')::float8 sig8,ln((fields->>'sig10')::bigint), log10((fields->>'sig8')::float8) FROM sctbl1 WHERE NOT (fields->>'sig10')::bigint=5 GROUP BY fields->>'sig10', fields->>'sig8' HAVING min((fields->>'sig7')::float8) < 100 AND max((fields->>'sig6')::bigint) < 1000 AND (fields->>'sig10')::bigint > 0 AND (fields->>'sig8')::float8 > 0 ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; +--Testcase 103: +SELECT max(time), max((fields->>'sig6')::bigint + (fields->>'sig7')::float8), min((fields->>'sig6')::bigint + (fields->>'sig7')::float8) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig8')::float8 > -1000 AND (fields->>'sig13')::boolean != true ) AS tb1 WHERE (fields->>'sig7')::float8 != -1 AND (fields->>'sig21')::boolean != true GROUP BY fields->>'sig6' ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; +--Testcase 104: +SELECT avg((fields->>'sig23')::bigint order by (fields->>'sig23')::bigint),avg((fields->>'sig24')::bigint * 0.5) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig8')::float8 > -1000 AND (fields->>'sig21')::boolean = true ) AS tb1 WHERE (fields->>'sig9')::float8 < 0 GROUP BY (fields->>'sig23')::bigint, fields->>'sig24' HAVING sum((fields->>'sig8')::float8) > avg((fields->>'sig9')::float8) ORDER BY 1 DESC, 2 LIMIT 15 OFFSET 0; +--Testcase 105: +SELECT (fields->>'sig8')::float8 sig8,exp((fields->>'sig8')::float8),exp((fields->>'sig8')::float8*2) FROM ( SELECT * FROM sctbl1 WHERE (fields->>'sig9')::float8 > -1000 AND (fields->>'sig21')::boolean = true ) AS tb1 WHERE true GROUP BY fields->>'sig8' ORDER BY 1 DESC, 2, 3 LIMIT 15 OFFSET 0; +--Testcase 106: +SELECT min(time)+'10 days'::interval, min((fields->>'sig10')::bigint + (fields->>'sig25')::float8) FROM sctbl1 WHERE NOT time>'2020-01-03 20:30:50' GROUP BY fields->>'sig10', fields->>'sig25' HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; +--Testcase 107: +SELECT floor((fields->>'sig23')::bigint*(fields->>'sig25')::float8), floor((fields->>'sig24')::bigint/(fields->>'sig25')::float8) FROM sctbl1 WHERE ((fields->>'sig25')::float8 - 1)/3 != 1 GROUP BY (fields->>'sig23')::bigint, (fields->>'sig24')::bigint,(fields->>'sig25')::float8 HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; +--Testcase 108: +SELECT time, tags->>'device_id' device_id, pow((fields->>'sig25')::float8,2) FROM sctbl1 WHERE ((fields->>'sig25')::float8 - 1)/3 != 1 GROUP BY time,tags->>'device_id',fields->>'sig25' ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; +--Testcase 109: +SELECT min(time)+'10 days'::interval, min((fields->>'sig23')::bigint) FROM sctbl1 WHERE false GROUP BY (fields->>'sig23')::bigint HAVING sum((fields->>'sig23')::bigint) > avg((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; +--Testcase 110: +SELECT min(time)+'10 days'::interval, min((fields->>'sig23')::bigint) FROM sctbl1 WHERE (fields->>'sig23')::bigint IN (1112,1000,0) GROUP BY (fields->>'sig23')::bigint HAVING min((fields->>'sig23')::bigint) > min((fields->>'sig24')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 15 OFFSET 0; +--Testcase 111: +SELECT max((fields->>'sig23')::bigint), count(*), exists(SELECT * FROM sctbl1 WHERE (fields->>'sig24')::bigint > 1), exists (SELECT count(*) FROM sctbl1 WHERE (fields->>'sig21')::boolean in ('T','F')) FROM sctbl1 WHERE (fields->>'sig13')::boolean =true GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 15 OFFSET 0; +--Testcase 112: +SELECT (fields->>'sig9')::float8 sig9, abs(avg((fields->>'sig16')::bigint)),string_agg(fields->>'sig22',',' order by fields->>'sig22'),round(sin((fields->>'sig9')::float8)*2.3),sqrt(pow((fields->>'sig25')::float8,2)) FROM sctbl1 WHERE fields->>'sig12' IS NOT NULL AND (fields->>'sig9')::float8 > 0 GROUP BY (fields->>'sig9')::float8,(fields->>'sig25')::float8; + +--Join table +--Testcase 113: +SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig21')::boolean sig21,s1.fields->>'sig22' sig22,(s1.fields->>'sig23')::bigint sig23,(s1.fields->>'sig24')::int sig24,(s1.fields->>'sig25')::float8 sig25 FROM sctbl1 s1 FULL JOIN sctbl2 s2 ON s1.tags->>'device_id'=s2.tags->>'device_id' ORDER BY device_id,sig21,sig22,sig23,sig24,sig25; +--Testcase 114: +SELECT s1.tags->>'device_id' device_id,(s1.fields->>'sig21')::boolean sig21,s1.fields->>'sig22' sig22,(s1.fields->>'sig23')::bigint sig23,(s2.fields->>'sig4')::boolean sig4,s2.fields->>'sig5' sig5 FROM sctbl1 s1 LEFT JOIN sctbl2 s2 ON (s1.fields->>'sig21')::boolean=(s2.fields->>'sig4')::boolean; +--Testcase 115: +SELECT s1.device_id,s1.sig21,s1.sig22,s1.sig23,s1.sig24,s1.sig25 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 RIGHT JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4, (fields->>'sig5')::boolean sig5 FROM sctbl2) s2 using(sig1) where s2.sig3 != 0; +--Testcase 116: +SELECT * FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 FULL OUTER JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 USING(sig2) ORDER BY s1.sig2, s1.time, s1.device_id, s2.time, s2.device_id; +--Testcase 117: +SELECT s2.device_id,s2.sig1,s2.sig2,s2.sig3,s2.sig4,s2.sig5 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 NATURAL JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2; +--Testcase 118: +SELECT s1.device_id,s1.sig11,s1.sig12,s1.sig13,s1.sig14,s1.sig15 FROM (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,(fields->>'sig5')::boolean sig5,(fields->>'sig6')::bigint sig6, (fields->>'sig7')::float8 sig7,(fields->>'sig8')::float8 sig8,(fields->>'sig9')::float8 sig9,(fields->>'sig10')::bigint sig10,fields->>'sig11' sig11,fields->>'sig12' sig12, (fields->>'sig13')::boolean sig13, fields->>'sig14' sig14, (fields->>'sig15')::bigint sig15,(fields->>'sig16')::bigint sig16, (fields->>'sig17')::bigint sig17, fields->>'sig18' sig18,fields->>'sig19' sig19, fields->>'sig20' sig20, (fields->>'sig21')::boolean sig21, fields->>'sig22' sig22, (fields->>'sig23')::bigint sig23, (fields->>'sig24')::bigint sig24, (fields->>'sig25')::float8 sig25 FROM sctbl1) s1 JOIN (SELECT time, tags->>'device_id' device_id, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::float8 sig3, (fields->>'sig4')::boolean sig4,fields->>'sig5' sig5 FROM sctbl2) s2 on true; + +--Clean +--Testcase 119: +DROP FOREIGN TABLE sctbl1; +--Testcase 120: +DROP FOREIGN TABLE sctbl2; +--Testcase 121: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 122: +DROP SERVER influxdb_svr CASCADE; +--Testcase 123: +DROP EXTENSION influxdb_fdw; diff --git a/sql/15.0/schemaless/add_multi_key.sql b/sql/15.0/schemaless/add_multi_key.sql new file mode 100644 index 0000000..df99673 --- /dev/null +++ b/sql/15.0/schemaless/add_multi_key.sql @@ -0,0 +1,492 @@ +SET datestyle=ISO; +-- timestamp with time zone differs based on this +SET timezone='UTC'; + +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +-- Init data original +:INIT_MULTILEY_ORIGINAL; +-- Before update data +--Testcase 1: +CREATE EXTENSION influxdb_fdw CASCADE; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +--Testcase 4: +CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); + +-------------------------------------------------TC for before update test data------------------ +-- Select all data with condition and combine clause +--Testcase 5: +SELECT * FROM sctbl3 WHERE time='2020-01-09 01:00:00+00' OR (fields->>'c3')::bigint=3 OR (fields->>'c3')::bigint=10.746 ORDER BY fields->>'c2'; +--Testcase 6: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 7: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; +--Testcase 8: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE false ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; +--Testcase 9: +SELECT * FROM sctbl3 WHERE (fields->>'c5')::bool= true; +--Testcase 10: +SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint BETWEEN 0 AND 1000 ORDER BY fields->>'c2', (fields->>'c3')::bigint; +--Testcase 11: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2' LIKE 'C%' AND (fields->>'c5')::bool!= true ORDER BY 1 DESC,2 ASC,3 DESC,4,5; +--Testcase 12: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT EXISTS (SELECT fields->>'c2' FROM sctbl3 WHERE fields->>'c2'='abcd') ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 13: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint < ALL (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + +-- Select aggregate function and specific column from original table +--Testcase 14: +SELECT time, fields->>'c2' c2 FROM sctbl3 WHERE fields->>'c2'<='$' OR (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 ASC,2 DESC LIMIT 25 OFFSET 8; +--Testcase 15: +SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE time>= '2000-1-3 20:30:51' GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25 OFFSET 8; +--Testcase 16: +SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c4')::double precision), max((fields->>'c4')::double precision)/2 FROM sctbl3 GROUP BY fields->>'c2'; +--Testcase 17: +SELECT count(fields->>'c2'), (fields->>'c3')::bigint c3, fields->>'c4' c4 from sctbl3 GROUP BY fields->>'c2'; +--Testcase 18: +SELECT 32 + (fields->>'c3')::bigint, (fields->>'c3')::bigint + (fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c3', fields->>'c5', fields->>'c2' ORDER BY fields->>'c2'; +--Testcase 19: +SELECT max(fields->>'c2'), min((fields->>'c3')::bigint), max((fields->>'c3')::bigint) from sctbl3 GROUP BY fields->>'c3' ORDER BY (fields->>'c3')::bigint; +--Testcase 20: +SELECT sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; +--Testcase 21: +SELECT count(*), count(time), count (DISTINCT (fields->>'c3')::bigint), count (ALL (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4; +--Testcase 22: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; +--Testcase 23: +SELECT string_agg(fields->>'c2', ';' ORDER BY fields->>'c2') FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1; +--Testcase 24: +SELECT every((fields->>'c3')::bigint>0), every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; +--Testcase 25: +SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; +--Testcase 26: +SELECT bool_or((fields->>'c4')::double precision <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; + +-- Select combine aggregate via operation +--Testcase 27: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 GROUP BY time ORDER BY 1 ASC; +--Testcase 28: +SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM sctbl3 GROUP BY fields->>'c2'; +--Testcase 29: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; +--Testcase 30: +SELECT avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint)-10, avg((fields->>'c3')::bigint)*0.5 FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; +--Testcase 31: +SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time) FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; +--Testcase 32: +SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; +--Testcase 33: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; +--Testcase 34: +SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3; +--Testcase 35: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE (fields->>'c3')::bigint NOT IN (0, 1000, -1, -2) GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; +--Testcase 36: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE NOT (fields->>'c3')::bigint=5 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; +--Testcase 37: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE NOT time>'2020-1-3 20:30:50' GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 8; +--Testcase 38: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY time ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; +--Testcase 39: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY fields->>'c3', fields->>'c3'HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; +-- Select from sub query +--Testcase 40: +SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c4')::double precision<1000 ) AS sctbl3; +--Testcase 41: +SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3; +--Testcase 42: +SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY 1; +--Testcase 43: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; +--Testcase 44: +SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,2 DESC; +--Testcase 45: +SELECT * FROM ( SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE time='2020-01-09 01:00:00+00' AND c3=0 AND c3=10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 46: +SELECT * FROM ( SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE c3>10.746 OR c2 != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 47: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE (fields->>'c3')::bigint != -1 AND (fields->>'c5')::bool != true GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 8; + +-- Within group +--Testcase 48: +--SELECT (fields->>'c5')::bool (fields->>'c5')::bool, mode((fields->>'c3')::bigint) WITHIN GROUP (ORDER BY (fields->>'c3')::bigint) AS m1 from sctbl3 GROUP BY (fields->>'c5')::bool; + +-- Select from view +--Testcase 49: +create view view_sctbl3 as select * from sctbl3 where ((fields->>'c3')::bigint != 6789); +--Testcase 50: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; +--Testcase 51: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; +--Testcase 52: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; +--Testcase 53: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3; +--Testcase 54: +SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50 FROM view_sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; +--Testcase 55: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; +--Testcase 56: +SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; +--Testcase 57: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 + FROM view_sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 8; + --Testcase 58: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 + FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; +--Testcase 59: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 + FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; +--Testcase 60: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 + FROM view_sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; +--Testcase 61: +SELECT time,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4,(fields->>'c5')::bool c5 + FROM view_sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; + +-- Select many target aggregate in one query and combine with condition +--Testcase 62: +SELECT upper(fields->>'c2'), upper(fields->>'c2'), lower(fields->>'c2'), lower(fields->>'c2') FROM sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; +--Testcase 63: +SELECT max(time), min((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count(*), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC,2 ASC,3 DESC,4,5; +--Testcase 64: +SELECT (fields->>'c3')::bigint*(random()<=1)::int, (random()<=1)::int*(25-10)+10 FROM sctbl3 ORDER BY 1 ASC,2 DESC; +--Testcase 65: +SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; +--Testcase 66: +SELECT sum((fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint<100 and (fields->>'c3')::bigint>-100), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint >0 AND (fields->>'c3')::bigint<100) FROM sctbl3 GROUP BY (fields->>'c5')::bool HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; +--Testcase 67: +SELECT 'abcd', 1234, (fields->>'c3')::bigint/2, 10+(fields->>'c3')::bigint * (random()<=1)::int * 0.5 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; +--Testcase 68: +SELECT count((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint) FROM sctbl3 GROUP BY influx_time(time, interval '2d') ORDER BY 1; +--Testcase 69: +SELECT max((fields->>'c3')::bigint), min((fields->>'c4')::double precision), avg((fields->>'c3')::bigint), count((fields->>'c3')::bigint) FROM sctbl3 WHERE time > '2020-01-10 00:00:00' AND time < '2020-01-15 00:00:00' GROUP BY influx_time(time, interval '1d', interval '10h30m') ORDER BY 1 ASC, 2 DESC, 3 ASC, 4 DESC; +--Testcase 70: +SELECT min(time), max(time), count(time) FROM sctbl3 GROUP BY (fields->>'c3') ORDER BY 1,2,3; +--Testcase 71: +SELECT count((fields->>'c3')::bigint), max((fields->>'c3')::bigint), sum((fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3' HAVING(max(fields->>'c2')!='HELLO' and count(fields->>'c2')>1) ORDER BY 1,2,3; +--Testcase 72: +SELECT count(fields->>'c2'), bit_and((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint), bool_and((fields->>'c5')::bool) FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1,2,3,4; +--Testcase 73: +SELECT array_agg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg((fields->>'c3')::bigint/(fields->>'c3')::bigint*(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint+(fields->>'c3')::bigint/(fields->>'c3')::bigint)*-1000), array_agg((fields->>'c3')::bigint*(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)+9999999999999.998) from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint ORDER BY 1, 2, 3, 4, 5; +--Testcase 74: +SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)-0.567-avg((fields->>'c3')::bigint/3+(fields->>'c3')::bigint)+17.55435, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+45))- -9.5+2*avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint/((fields->>'c3')::bigint-10.2)*(fields->>'c3')::bigint)+0.567+avg((fields->>'c3')::bigint)*4.5+(fields->>'c3')::bigint, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+5.6))+100-(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4 limit 5; +--Testcase 75: +SELECT bit_and((fields->>'c3')::bigint/3*(fields->>'c3')::bigint)-1 + bit_and((fields->>'c3')::bigint/4/((fields->>'c3')::bigint+6)),2* bit_and((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)*1, 5-bit_and((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-1000000+(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3' ORDER BY 1,2,3; +--Testcase 76: +SELECT bit_or((fields->>'c3')::bigint/3*(fields->>'c3')::bigint)-1 + bit_or((fields->>'c3')::bigint/4/((fields->>'c3')::bigint+6)),2* bit_or((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)*1, 5-bit_or((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-1000000+(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3' ORDER BY 1,2,3; +--Testcase 77: +SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>0.774 OR fields->>'c2' = 'Which started out as a kind' GROUP BY fields->>'c3' ORDER BY 1, 2, 3; +--Testcase 78: +SELECT count(fields->>'c2')-2*count((fields->>'c3')::bigint), count((fields->>'c3')::bigint)/count((fields->>'c5')::bool)-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c5', fields->>'c3' order by 1, 2 limit 1; +--Testcase 79: +SELECT every((fields->>'c3')::bigint != 5.5) AND true, every((fields->>'c3')::bigint <> 10) OR every((fields->>'c3')::bigint > 5.6), every((fields->>'c3')::bigint <= 2) OR (fields->>'c5')::bool from sctbl3 GROUP BY (fields->>'c5')::bool ORDER BY 1,2,3 limit 6; +--Testcase 80: +SELECT stddev((fields->>'c3')::bigint*3-(fields->>'c3')::bigint)*1000000-(fields->>'c3')::bigint, stddev((fields->>'c3')::bigint)-0.567, stddev((fields->>'c3')::bigint/((fields->>'c3')::bigint-1.3))/6, stddev((fields->>'c3')::bigint+4*(fields->>'c3')::bigint)*100, stddev((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint-52.1))+1 from sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY fields->>'c3' ORDER BY 1,2,3,4,5 ; +--Testcase 81: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-6, sum((fields->>'c3')::bigint/((fields->>'c3')::bigint+9999999)-(fields->>'c3')::bigint)*9999999999999.998, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/((fields->>'c3')::bigint+111111))*-9.5, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6 from sctbl3; +--Testcase 82: +SELECT sum((fields->>'c3')::bigint-(fields->>'c3')::bigint)-6+sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint*1.3-(fields->>'c3')::bigint)*9.998-sum((fields->>'c3')::bigint)*4, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/4)*-9.5-(fields->>'c3')::bigint, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435+(fields->>'c3')::bigint, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6-(fields->>'c3')::bigint-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4,5; +--Testcase 83: +SELECT max((fields->>'c4')::double precision), max((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, max((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, max((fields->>'c3')::bigint)+max((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c4')::double precision>= 0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4; +--Testcase 84: +SELECT min(fields->>'c2'), min((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, min((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, min((fields->>'c3')::bigint)+min((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c4')::double precision<0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4; +--Testcase 85: +SELECT variance((fields->>'c3')::bigint+(fields->>'c3')::bigint)+(fields->>'c3')::bigint, variance((fields->>'c3')::bigint*3)+(fields->>'c3')::bigint+1, variance((fields->>'c3')::bigint-2)+10 from sctbl3 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3; +--Testcase 86: +SELECT sqrt(abs((fields->>'c3')::bigint*5)) + sqrt(abs((fields->>'c3')::bigint+6)), sqrt(abs((fields->>'c3')::bigint)+5)+(fields->>'c3')::bigint, 4*sqrt(abs((fields->>'c3')::bigint-100))-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1, 2, 3; +--Testcase 87: +SELECT max((fields->>'c3')::bigint)+min((fields->>'c3')::bigint)+3, min((fields->>'c3')::bigint)-sqrt(abs((fields->>'c3')::bigint-45.21))+(fields->>'c3')::bigint*2, count(*)-count((fields->>'c5')::bool)+2, (fields->>'c5')::bool c5, (fields->>'c3')::bigint c3 from sctbl3 GROUP BY fields->>'c3', fields->>'c3', fields->>'c5' ORDER BY 1,2,3,4; +--Testcase 88: +SELECT variance((fields->>'c3')::bigint)-5*min((fields->>'c3')::bigint)-1, every((fields->>'c5')::bool <> true), max((fields->>'c3')::bigint+4.56)*3-min((fields->>'c3')::bigint), count((fields->>'c3')::bigint)-4 from sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1,2,3,4; +--Testcase 89: +SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3')::bigint)/3-(fields->>'c3')::bigint, min((fields->>'c3')::bigint)+(fields->>'c3')::bigint/4, (fields->>'c5')::bool c5 from sctbl3 GROUP BY fields->>'c3', fields->>'c3', fields->>'c5' ORDER BY 1,2,3,4,5; + + +---------------------------------------------------------- Update data: add 1 tag and 1 fields------------------------------------------------------------------------------------------------- +-- Update data +:RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS; +--Testcase 202: +drop view if exists view_sctbl3 ; +--Testcase 203: +drop foreign table if exists sctbl3; + +--Testcase 204: +CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1'); + +-- Select all data with condition and combine clause +--Testcase 90: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1 DESC,2 ASC,3 DESC,4,5; +--Testcase 91: +SELECT * FROM sctbl3 WHERE EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint != 40.772) ORDER BY tags->>'t1'; +--Testcase 92: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; +--Testcase 93: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint=40.772) ORDER BY 1 DESC,2 ASC,3 DESC,4; +--Testcase 94: +SELECT * FROM sctbl3 WHERE fields->>'c2' IS NULL OR tags->>'t1' LIKE 'afefea' ORDER BY (fields->>'c1')::bool, fields->>'c2'; +--Testcase 95: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE fields->>'c2' IS NOT NULL ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 96: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM sctbl3 WHERE NOT (fields->>'c3')::bigint=5 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; + +-- Select aggregate function and specific column from original table +--Testcase 97: +SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, max(tags->>'t1'), sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM sctbl3 GROUP BY tags->>'t1', (fields->>'c1')::bool, (fields->>'c3')::bigint, fields->>'c2' ORDER BY 1; +--Testcase 98: +SELECT sum((fields->>'c3')::bigint), tags->>'t1' t1, sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), fields->>'c1' c1 FROM sctbl3 GROUP BY fields->>'c1', fields->>'c3', fields->>'c3', tags->>'t1' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; +--Testcase 99: +SELECT stddev((fields->>'c3')::bigint), (fields->>'c1')::bool c1, stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), tags->>'t1' t1 FROM sctbl3 GROUP BY time, fields->>'c3', tags->>'t1', fields->>'c1' ORDER BY tags->>'t1' ASC,fields->>'c1' DESC; +--Testcase 100: +SELECT every((fields->>'c3')::bigint>0), (fields->>'c1')::bool c1, every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time, fields->>'c1', fields->>'c3' ORDER BY (fields->>'c1')::bool ASC, (fields->>'c3')::bigint DESC; +--Testcase 101: +SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and((fields->>'c1')::bool), bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false from sctbl3 ORDER BY 1,2,3; +--Testcase 102: +SELECT bool_or((fields->>'c4')::double precision <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c1')::bool), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, tags->>'t1' t1 from sctbl3 GROUP BY (fields->>'c1')::bool, tags->>'t1', fields->>'c2', (fields->>'c3')::bigint ORDER BY (fields->>'c1')::bool, tags->>'t1'; + +-- Select combine aggregate via operation +--Testcase 103: +SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2, max(tags->>'t1') FROM sctbl3 GROUP BY fields->>'c2', tags->>'t1'; +--Testcase 104: +SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg((fields->>'c1')::bool), array_agg(tags->>'t1'), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::boolean != true ORDER BY 1 DESC, 2, 3; +--Testcase 105: +SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15) FROM sctbl3 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; +--Testcase 106: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; +--Testcase 107: +SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c1')::bool), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3; +--Testcase 108: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE EXISTS (SELECT (fields->>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint=40.772) GROUP BY tags->>'t1', fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 8; +--Testcase 109: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE fields->>'c2' IS NOT NULL GROUP BY fields->>'c3', fields->>'c1' HAVING min((fields->>'c3')::bigint)>=min((fields->>'c3')::bigint) ORDER BY (fields->>'c1')::bool DESC, 2, 3; +--Testcase 110: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min(tags->>'t1') FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 8; +--Testcase 111: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE ((fields->>'c3')::bigint-1)/(fields->>'c3')::bigint=1 GROUP BY time ORDER BY 1 ASC,2 DESC LIMIT 5 OFFSET 0; +--Testcase 112: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, tags->>'t1', (fields->>'c4')::double precision HAVING max((fields->>'c3')::bigint)>min((fields->>'c4')::double precision) ORDER BY tags->>'t1' ASC LIMIT 5 OFFSET 0; +-- Select from sub query +--Testcase 113: +SELECT time, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3; +--Testcase 114: +SELECT max(time), max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)+10, max((fields->>'c3')::bigint)-10, max((fields->>'c3')::bigint), max((fields->>'c3')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool = true ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY 1; +--Testcase 115: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM ( SELECT * FROM sctbl3 WHERE tags->>'t1' LIKE 't1là' ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; +--Testcase 116: +SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 ORDER BY 1 ASC,tags->>'t1' DESC; +--Testcase 117: +SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, (fields->>'c3')::bigint c3 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE fields->>'c2' LIKE 'C%' ORDER BY tags->>'t1' DESC,fields->>'c2' ASC LIMIT 25 OFFSET 0; +--Testcase 118: +SELECT (fields->>'c1')::bool c1, tags->>'t1' t1, (fields->>'c4')::double precision c4 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c4')::double precision>-1000 OR (fields->>'c3')::bigint<1000 ) AS tb3 WHERE NOT EXISTS (SELECT fields->>'c2' FROM sctbl3 WHERE fields->>'c2'='abcd') ORDER BY 1 DESC,2 ASC; +--Testcase 119: +SELECT tags->>'t1' t1, (fields->>'c1')::bool c1, fields->>'c2' c2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool != TRUE ) AS tb3 WHERE (fields->>'c3')::bigint NOT IN (345245, 1000, -132, -254) ORDER BY 1 DESC,2 ASC,3 LIMIT 5; +--Testcase 120: +SELECT (fields->>'c1')::bool c1, fields->>'c2' c2, (fields->>'c4')::double precision c4 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY tags->>'t1'; +--Testcase 121: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10), max(tags->>'t1') FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE true GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3 LIMIT 25 OFFSET 8; + +-- Select from view +--Testcase 122: +create view view_sctbl3 as select * from sctbl3 where ((fields->>'c1')::bool != false); +--Testcase 123: +SELECT stddev((fields->>'c3')::bigint), tags->>'t1' t1, stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time, tags->>'t1' ORDER BY 1 ASC,2 DESC; +--Testcase 124: +SELECT tags->>'t1' t1 , max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c1')::bool=false), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE time <= '2000-1-3 20:30:51' GROUP BY fields->>'c2', tags->>'t1' ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25; +--Testcase 125: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c5')::bool HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; +--Testcase 126: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10), max(tags->>'t1') FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; +--Testcase 127: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c1' ORDER BY 1 DESC, 2, 3; +--Testcase 128: +SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50 FROM view_sctbl3 GROUP BY (fields->>'c1')::bool, (fields->>'c3')::bigint HAVING (fields->>'c1')::bool=true AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; +--Testcase 129: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; +--Testcase 130: +SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY fields->>'c1' ORDER BY 1 DESC, 2, 3; +--Testcase 131: +SELECT time,tags->>'t1' t1,(fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5 FROM view_sctbl3 WHERE fields->>'c2'<='$' OR (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 20; +--Testcase 132: +SELECT * FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3; +--Testcase 133: +SELECT * FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY (fields->>'c1')::bool ASC LIMIT 5; +--Testcase 134: +SELECT * FROM view_sctbl3 WHERE true ORDER BY (fields->>'c1')::bool DESC,tags->>'t1' LIMIT 5; +--Testcase 135: +SELECT * FROM view_sctbl3 WHERE (fields->>'c3')::bigint NOT IN (-1,1,0,2,-2) ORDER BY tags->>'t1' DESC; + +-- Select many target aggregate in one query and combine with (fields->>'c1')::bool +--Testcase 136: +SELECT upper(fields->>'c2'), lower(fields->>'c2'), lower(tags->>'t1') FROM sctbl3 ORDER BY 1 ASC,2 DESC,3; +--Testcase 137: +SELECT max(time), min((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count(*), count(tags->>'t1'), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC,2 ASC,3 DESC,4,5; +--Testcase 138: +SELECT (fields->>'c3')::bigint*(random()<=1)::int, (random()<=1)::int*(25-10)+10 FROM sctbl3 ORDER BY tags->>'t1' ASC,fields->>'c1' DESC; +--Testcase 139: +SELECT max((fields->>'c3')::bigint), count(*), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM sctbl3 GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC,3 ASC,4; +--Testcase 140: +SELECT sum((fields->>'c3')::bigint) filter (WHERE (fields->>'c1')::bool = true), avg((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint) filter (WHERE (fields->>'c3')::bigint >0 AND (fields->>'c3')::bigint<100) FROM sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; +--Testcase 141: +SELECT 'abcd', 1234, (fields->>'c3')::bigint/2, 10+(fields->>'c3')::bigint * (random()<=1)::int * 0.5 FROM ( SELECT * FROM sctbl3 WHERE tags->>'t1' LIKE 't1' ) AS sctbl3 ORDER BY 1 ASC,2 DESC,3 ASC,4; +--Testcase 142: +SELECT max((fields->>'c3')::bigint), min(tags->>'t1'), avg((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), count((fields->>'c3')::bigint) FROM sctbl3 WHERE time > '1970-01-10 00:00:00' AND time < '2020-01-15 00:00:00' GROUP BY influx_time(time, interval '1d', interval '10h30m') ORDER BY 1,2,3,4,5; +--Testcase 143: +SELECT min(time), max(time), count(time) FROM sctbl3 GROUP BY fields->>'c3' ORDER BY 1,2,3; +--Testcase 144: +SELECT count((fields->>'c3')::bigint), max((fields->>'c3')::bigint), sum((fields->>'c3')::bigint) FROM sctbl3 GROUP BY fields->>'c3' HAVING(max(fields->>'c2')!='change for new change' and count(fields->>'c2')>0) ORDER BY 1,2,3; +--Testcase 145: +SELECT array_agg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg((fields->>'c3')::bigint/(fields->>'c3')::bigint*(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint+(fields->>'c3')::bigint/(fields->>'c3')::bigint)*-1000), array_agg((fields->>'c3')::bigint*(fields->>'c3')::bigint-(fields->>'c3')::bigint), array_agg(((fields->>'c3')::bigint-(fields->>'c3')::bigint+(fields->>'c3')::bigint)+9999999999999.998) from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint ORDER BY 1, 2, 3, 4, 5; +--Testcase 146: +SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)-0.567-avg((fields->>'c3')::bigint/3+(fields->>'c3')::bigint)+17.55435, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+45))- -9.5+2*avg((fields->>'c3')::bigint), avg((fields->>'c3')::bigint/((fields->>'c3')::bigint-10.2)*(fields->>'c3')::bigint)+0.567+avg((fields->>'c3')::bigint)*4.5+(fields->>'c3')::bigint, avg((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint+5.6))+100-(fields->>'c3')::bigint from sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 GROUP BY fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4 limit 5; +--Testcase 147: +SELECT count(*)-5.6, 2*count(*), 10.2/count(*)+count(*)-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>0.774 OR fields->>'c2' = 'Which started out as a kind' GROUP BY fields->>'c3' ORDER BY 1, 2, 3; + +-- ------------------------------Update data: add 5 tags and 20 fields----------------------------------------- +-- Update data +:RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS; +--Testcase 205: +drop view if exists view_sctbl3 ; +--Testcase 206: +drop foreign table if exists sctbl3; + +--Testcase 207: +CREATE FOREIGN TABLE sctbl3 (time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 't1, t2, t3, t4, t5'); + +--Testcase 208: +create view view_sctbl3 as select * from sctbl3 where ((fields->>'c20')::int != 6789 OR (fields->>'c19')::double precision != -1); + + +-- Update data: add 5 tags and 20 fields +-- Select all data with condition and combine clause +--Testcase 148: +SELECT * FROM sctbl3 WHERE (fields->>'c6')::double precision != -1 AND (fields->>'c5')::bool != true OR (fields->>'c8')::float > 0 ORDER BY tags->>'t1' DESC,(tags->>'t2')::int ASC, (fields->>'c6')::float DESC, fields->>'c9', (fields->>'c20')::int LIMIT 5 OFFSET 0; +--Testcase 149: +SELECT * FROM sctbl3 WHERE NOT (fields->>'c16')::int<(fields->>'c3')::bigint ORDER BY (fields->>'c7')::float DESC, (fields->>'c8')::double precision ASC,fields->>'c9' DESC,fields->>'c10',(fields->>'c11')::bigint LIMIT 5 OFFSET 0; +--Testcase 150: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE (fields->>'c20')::int > 0 ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 151: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE NOT time>'2020-1-3 20:30:50' ORDER BY 1 DESC,2 ASC,3 DESC,4,5; +--Testcase 152: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE EXISTS (SELECT fields->>'c15' FROM sctbl3 WHERE (fields->>'c19')::double precision!=40.772) ORDER BY 1 DESC,2 ASC,3 DESC,4,5; +--Testcase 153: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE fields->>'c2'=ANY (ARRAY(SELECT fields->>'c2' FROM sctbl3 WHERE (fields->>'c3')::bigint%2=0)) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; +--Testcase 154: +SELECT tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 from sctbl3 WHERE (fields->>'c13')::int >=0; + +-- Select aggregate function and specific column from original table +--Testcase 155: +SELECT max(tags->>'t4'), max(tags->>'t5'), max((fields->>'c3')::bigint), count(*),count((fields->>'c11')::bigint), count((fields->>'c13')::int), count((fields->>'c19')::double precision), exists(SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>1), exists (SELECT count(*) FROM sctbl3 WHERE (fields->>'c3')::bigint>10.5) FROM view_sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY time ORDER BY 1 ASC,2 DESC,3 ASC,4 LIMIT 25 OFFSET 0; +--Testcase 156: +SELECT max(fields->>'c2'), min((fields->>'c3')::bigint), max((fields->>'c3')::bigint), max((fields->>'c11')::bigint), max((fields->>'c6')::double precision), max((fields->>'c7')::double precision), max((fields->>'c8')::float), max (20) from sctbl3 GROUP BY fields->>'c3' ORDER BY (fields->>'c3')::bigint; +--Testcase 157: +SELECT sum((fields->>'c3')::bigint), sum((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), sum((fields->>'c6')::double precision), sum((fields->>'c7')::double precision), sum((fields->>'c8')::float), sum((fields->>'c11')::bigint), sum((fields->>'c13')::int), sum((fields->>'c16')::int) FROM sctbl3 GROUP BY fields->>'c2' ORDER BY 1; +--Testcase 158: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), stddev((fields->>'c11')::bigint), stddev((fields->>'c13')::int), stddev((fields->>'c14')::bigint), stddev((fields->>'c16')::int), stddev((fields->>'c19')::double precision), stddev((fields->>'c20')::int) FROM sctbl3 GROUP BY fields->>'c5', fields->>'c12' HAVING (fields->>'c12')::bool = true ORDER BY 1 ASC,2 DESC; +--Testcase 159: +SELECT every((fields->>'c3')::bigint>0), every((fields->>'c3')::bigint != (fields->>'c3')::bigint) FROM sctbl3 GROUP BY time, (fields->>'c20')::int, tags->>'t5' ORDER BY (fields->>'c20')::int ASC,tags->>'t5' DESC; +--Testcase 160: +SELECT bool_and((fields->>'c3')::bigint <> 10) AND true, bool_and(fields->>'c2' != 'aghsjfh'), bool_and((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, bool_and((fields->>'c12')::bool), bool_and((fields->>'c17')::bool), bool_and((fields->>'c17')::bool) AND TRUE from sctbl3 ORDER BY 1,2,3; +--Testcase 161: +SELECT bool_or((fields->>'c3')::bigint <> 10) AND true, bool_or(fields->>'c2' != 'aghsjfh'), bool_or((fields->>'c3')::bigint+(fields->>'c3')::bigint <=5.5) OR false, bool_or((fields->>'c17')::bool), bool_or((fields->>'c1')::bool), bool_or((fields->>'c5')::bool) OR FALSE from sctbl3 ORDER BY 1,2,3; + +-- Select combine aggregate via operation +--Testcase 162: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5, sum((fields->>'c13')::int + -43.3)-3, sum((fields->>'c16')::int*2) + 1, sum((fields->>'c19')::double precision-7554)+785 FROM sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; +--Testcase 163: +SELECT array_agg((fields->>'c3')::bigint/2 ORDER BY (fields->>'c3')::bigint), array_agg(fields->>'c2' ORDER BY fields->>'c2'), array_agg(time ORDER BY time), array_agg((fields->>'c6')::double precision+2), array_agg((fields->>'c7')::double precision/10), array_agg((fields->>'c8')::float-2) FROM sctbl3 GROUP BY (fields->>'c17')::bool, (fields->>'c20')::int, (fields->>'c18')::bool, (fields->>'c19')::double precision HAVING (fields->>'c17')::bool != true ORDER BY (fields->>'c20')::int DESC, (fields->>'c19')::double precision, (fields->>'c18')::bool; +--Testcase 164: +SELECT bit_and((fields->>'c3')::bigint), bit_and((fields->>'c3')::bigint+15), bit_and((fields->>'c13')::int+768) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c16')::int>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c13', fields->>'c14' HAVING min((fields->>'c13')::int)>'c14')::bigint) ORDER BY (fields->>'c13')::int ASC,(fields->>'c14')::bigint DESC; +--Testcase 165: +SELECT bool_and((fields->>'c3')::bigint>0), bool_and((fields->>'c3')::bigint<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint), bool_and((fields->>'c19')::double precision <= (fields->>'c20')::int) FROM sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3; +--Testcase 166: +SELECT max(tags->>'t1'), max(tags->>'t2'), max(time), max((fields->>'c3')::bigint*0.5/(fields->>'c11')::bigint), max((fields->>'c3')::bigint+10-(fields->>'c8')::float), max((fields->>'c6')::double precision*2+(fields->>'c13')::int), max((fields->>'c8')::float-32+(fields->>'c16')::int), max((fields->>'c19')::double precision/32) FROM sctbl3 WHERE fields->>'c2' IS NOT NULL GROUP BY fields->>'c3', fields->>'c3' HAVING min((fields->>'c3')::bigint)<100 AND max((fields->>'c3')::bigint)<1000 AND sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; +--Testcase 167: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM sctbl3 WHERE fields->>'c2' IS NULL GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint HAVING min((fields->>'c3')::bigint)>min((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3 LIMIT 5 OFFSET 0; +--Testcase 168: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min((fields->>'c19')::double precision + (fields->>'c20')::int/2) FROM sctbl3 WHERE true GROUP BY fields->>'c2', fields->>'c3', fields->>'c3', fields->>'c14' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c14')::bigint) ORDER BY 1 ASC,2 DESC; +--Testcase 169: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint), min((fields->>'c11')::bigint-(fields->>'c7')::double precision), min((fields->>'c6')::double precision+(fields->>'c8')::float) FROM sctbl3 WHERE false GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint)>avg((fields->>'c3')::bigint) ORDER BY 1 ASC,2 DESC; +--Testcase 170: +SELECT min(time)+'10 days'::interval, min((fields->>'c3')::bigint+(fields->>'c3')::bigint) FROM sctbl3 WHERE (fields->>'c3')::bigint IN (-1,1,0,2,-2) GROUP BY fields->>'c19', fields->>'c20' HAVING min((fields->>'c19')::double precision)>min((fields->>'c20')::int) ORDER BY 1 ASC,2 DESC; + +-- Select from sub query +--Testcase 171: +SELECT time, fields->>'c2' c2, fields->>'c15' c15, tags->>'t1' t1, (tags->>'t3')::double precision t3, tags->>'t5' t5, (fields->>'c12')::bool c12, (fields->>'c14')::bigint c14 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c13')::int>-1000 OR (fields->>'c19')::double precision<1000 ) AS sctbl3; +--Testcase 172: +SELECT max(time), max(7), max((fields->>'c7')::double precision)+17, max((fields->>'c11')::bigint)+10, max((fields->>'c3')::bigint), max((fields->>'c14')::bigint)/2 FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY fields->>'c2' ORDER BY fields->>'c2'; +--Testcase 173: +SELECT stddev((fields->>'c3')::bigint), stddev((fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint), stddev((fields->>'c11')::bigint), stddev((fields->>'c14')::bigint), stddev((fields->>'c19')::double precision) FROM ( SELECT * FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS sctbl3 GROUP BY time ORDER BY 1 ASC,2 DESC; +--Testcase 174: +SELECT sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c3')::bigint)), sqrt(abs((fields->>'c11')::bigint)), sqrt(abs((fields->>'c20')::int)) FROM ( SELECT * FROM sctbl3 WHERE tags->>'t5' LIKE '111111' ) AS sctbl3 ORDER BY 1 ASC,2 DESC; +--Testcase 175: +SELECT * FROM ( SELECT tags->>'t1' t1, (tags->>'t2')::int t2, (tags->>'t3')::double precision t3, tags->>'t4' t4, tags->>'t5' t5, fields->>'c2' c2, (fields->>'c3')::bigint c3 FROM sctbl3 WHERE (fields->>'c13')::int>-1000 OR (fields->>'c14')::bigint<1000 ) AS tb3 WHERE c3 <-1 AND c2 > 'KissMe' ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 0; +--Testcase 176: +SELECT * FROM ( SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM sctbl3 WHERE (fields->>'c3')::bigint>-1000 AND (fields->>'c3')::bigint<1000 ) AS tb3 WHERE c3 IN (-1,1,0,2,-2) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 25 OFFSET 0; +--Testcase 177: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM ( SELECT * FROM sctbl3 WHERE fields->>'c10' LIKE 'a a') AS tb3 WHERE (fields->>'c3')::bigint > 0 GROUP BY fields->>'c2', fields->>'c3', fields->>'c3' HAVING sum((fields->>'c3')::bigint) < avg((fields->>'c3')::bigint) ORDER BY 1 DESC, 2, 3; + +-- Select from view +--Testcase 179: +SELECT stddev((fields->>'c13')::int), stddev((fields->>'c14')::bigint ORDER BY (fields->>'c14')::bigint) FROM view_sctbl3 GROUP BY time, fields->>'c13', fields->>'c14' ORDER BY (fields->>'c13')::int ASC, (fields->>'c14')::bigint DESC; +--Testcase 180: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2) FROM view_sctbl3 GROUP BY fields->>'c5' HAVING (fields->>'c5')::bool != true ORDER BY 1 ASC,2 DESC; +--Testcase 181: +SELECT max(time), max((fields->>'c3')::bigint*0.5), max((fields->>'c3')::bigint+10) FROM view_sctbl3 GROUP BY time ORDER BY 1 DESC, 2, 3; +--Testcase 182: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint+(fields->>'c3')::bigint), sum((fields->>'c3')::bigint*2), sum((fields->>'c3')::bigint)-5 FROM view_sctbl3 GROUP BY fields->>'c2' ORDER BY 1 DESC, 2, 3; +--Testcase 183: +SELECT avg((fields->>'c3')::bigint-(fields->>'c3')::bigint ORDER BY (fields->>'c3')::bigint-(fields->>'c3')::bigint), avg((fields->>'c3')::bigint)>50, tags->>'t4' t4, (fields->>'c12')::bool c12, (fields->>'c19')::double precision+(fields->>'c20')::int FROM view_sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, tags->>'t4', (fields->>'c12')::bool, (fields->>'c19')::double precision, (fields->>'c20')::int HAVING sum((fields->>'c13')::int)<100 OR sum((fields->>'c3')::bigint)>-1000 AND avg((fields->>'c11')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; +--Testcase 184: +SELECT bit_or((fields->>'c3')::bigint), bit_or((fields->>'c3')::bigint/2), (tags->>'t2')::int t2, (tags->>'t3')::double precision t3 FROM view_sctbl3 GROUP BY tags->>'t2', tags->>'t3', fields->>'c3', fields->>'c3' HAVING min((fields->>'c16')::int)<100 AND max((fields->>'c11')::bigint)<1000 OR sum((fields->>'c7')::double precision)>-7894 AND avg((fields->>'c3')::bigint)>-1000 ORDER BY 1 ASC,2 DESC; +--Testcase 185: +SELECT bool_and((fields->>'c11')::bigint>0), bool_and((fields->>'c13')::int<0), bool_and((fields->>'c3')::bigint<(fields->>'c3')::bigint), bool_and((fields->>'c7')::double precision>=(fields->>'c8')::float) FROM view_sctbl3 GROUP BY time, tags->>'t1', tags->>'t2',tags->>'t3' ORDER BY tags->>'t1' DESC,(tags->>'t2')::float, (tags->>'t3')::double precision; +--Testcase 186: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE fields->>'c2'<='$' AND (fields->>'c3')::bigint<>-5 AND (fields->>'c3')::bigint<>10.746 ORDER BY 1 DESC,2 ASC,3 DESC,4,5; +--Testcase 187: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE (fields->>'c3')::bigint>10.746 OR fields->>'c2' != 'Hello' ORDER BY 1 DESC,2 ASC,3 DESC,4,5; +--Testcase 188: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE NOT (fields->>'c3')::bigint<(fields->>'c3')::bigint ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; +--Testcase 189: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE true ORDER BY 1 DESC,2 ASC,3 DESC,4,5 DESC; +--Testcase 190: +SELECT time,tags->>'t1' t1,(tags->>'t2')::int t2,(tags->>'t3')::double precision t3,tags->>'t4' t4, tags->>'t5' t5, (fields->>'c1')::bool c1,fields->>'c2' c2,(fields->>'c3')::bigint c3,(fields->>'c4')::double precision c4, (fields->>'c5')::bool c5, (fields->>'c6')::double precision c6, (fields->>'c7')::double precision c7, (fields->>'c8')::float c8, fields->>'c9' c9, fields->>'c10' c10, (fields->>'c11')::bigint c11, (fields->>'c12')::bool c12, (fields->>'c13')::int c13, (fields->>'c14')::bigint c14, fields->>'c15' c15, (fields->>'c16')::int c16, (fields->>'c17')::bool c17, (fields->>'c18')::bool c18, (fields->>'c19')::double precision c19, (fields->>'c20')::int c20 FROM view_sctbl3 WHERE (fields->>'c3')::bigint NOT IN (-42,65,0,78,-891) ORDER BY 1 DESC,2 ASC,3 DESC,4,5 LIMIT 5 OFFSET 8; + +-- Select many target aggregate in one query and combine with condition +--Testcase 191: +SELECT count((fields->>'c1')::bool)+count(fields->>'c2')-2*count((fields->>'c3')::bigint), count((fields->>'c3')::bigint)/count((fields->>'c5')::bool)-(fields->>'c3')::bigint, count((fields->>'c11')::bigint-(fields->>'c14')::bigint), 2*count(*) from sctbl3 GROUP BY fields->>'c5', fields->>'c3', fields->>'c1', fields->>'c20', tags->>'t5' order by tags->>'t5', fields->>'c1', (fields->>'c20')::int limit 1; +--Testcase 192: +SELECT every((fields->>'c1')::bool != TRUE) AND true, every((fields->>'c3')::bigint <> 10) OR every((fields->>'c3')::bigint > 5.6), every((fields->>'c3')::bigint <= 2) OR (fields->>'c5')::bool from sctbl3 GROUP BY fields->>'c5' ORDER BY 1,2,3 limit 6; +--Testcase 193: +SELECT stddev((fields->>'c3')::bigint*3-(fields->>'c3')::bigint)*1000000-(fields->>'c3')::bigint, stddev((fields->>'c3')::bigint)-0.567, stddev((fields->>'c3')::bigint/((fields->>'c3')::bigint-1.3))/6, stddev((fields->>'c3')::bigint+4*(fields->>'c3')::bigint)*100, stddev((fields->>'c3')::bigint+(fields->>'c3')::bigint/((fields->>'c3')::bigint-52.1))+1 from sctbl3 WHERE (fields->>'c3')::bigint<0 GROUP BY fields->>'c3' ORDER BY 1,2,3,4,5 ; +--Testcase 194: +SELECT sum((fields->>'c3')::bigint+(fields->>'c3')::bigint-(fields->>'c3')::bigint)-6, sum((fields->>'c3')::bigint/((fields->>'c3')::bigint+9999999)-(fields->>'c3')::bigint)*9999999999999.998, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint/((fields->>'c3')::bigint+111111))*-9.5, sum((fields->>'c3')::bigint-(fields->>'c3')::bigint-(fields->>'c3')::bigint)/17.55435, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6 from sctbl3; +--Testcase 195: +SELECT sum((fields->>'c14')::bigint+(fields->>'c3')::bigint)-6+sum((fields->>'c11')::bigint), sum((fields->>'c3')::bigint*1.3-(fields->>'c3')::bigint)*9.998-sum((fields->>'c7')::double precision)*4, sum((fields->>'c8')::float-(fields->>'c7')::double precision/4)*-9.5-(fields->>'c3')::bigint, sum((fields->>'c20')::int-(fields->>'c3')::bigint-(fields->>'c16')::int)/17.55435+(fields->>'c3')::bigint, sum((fields->>'c3')::bigint+(fields->>'c3')::bigint+(fields->>'c3')::bigint)*6-(fields->>'c3')::bigint-(fields->>'c3')::bigint from sctbl3 GROUP BY fields->>'c13', fields->>'c14', fields->>'c16', fields->>'c11', fields->>'c3', fields->>'c3' ORDER BY 1,2,3,4,5; +--Testcase 196: +SELECT max((fields->>'c16')::int), max((fields->>'c3')::bigint)+(fields->>'c3')::bigint-1, max((fields->>'c3')::bigint+(fields->>'c3')::bigint)-(fields->>'c3')::bigint-3, max((fields->>'c3')::bigint)+max((fields->>'c3')::bigint) from sctbl3 WHERE (fields->>'c13')::int>= 0 GROUP BY fields->>'c3', fields->>'c3' ORDER BY (fields->>'c3')::int, (fields->>'c3')::int; +--Testcase 197: +SELECT variance((fields->>'c3')::bigint+(fields->>'c3')::bigint)+(fields->>'c3')::bigint, variance((fields->>'c3')::bigint*3)+(fields->>'c3')::bigint+1, variance((fields->>'c3')::bigint-2)+10 from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, (tags->>'t3')::double precision ORDER BY (tags->>'t3')::double precision; +--Testcase 198: +SELECT sqrt(abs((fields->>'c3')::bigint*5)) + sqrt(abs((fields->>'c3')::bigint+6)), sqrt(abs((fields->>'c3')::bigint)+5)+(fields->>'c3')::bigint, 4*sqrt(abs((fields->>'c3')::bigint-100))-(fields->>'c3')::bigint from sctbl3 WHERE (fields->>'c3')::bigint>'c3')::bigint FROM sctbl3 WHERE (fields->>'c3')::bigint>0) ORDER BY 1, 2, 3; +--Testcase 199: +SELECT max((fields->>'c3')::bigint)+min((fields->>'c3')::bigint)+3, min((fields->>'c3')::bigint)-sqrt(abs((fields->>'c3')::bigint-45.21))+(fields->>'c3')::bigint*2, count(*)-count((fields->>'c5')::bool)+2, (fields->>'c5')::bool c5, (fields->>'c3')::bigint c3 from sctbl3 GROUP BY (fields->>'c3')::bigint, (fields->>'c3')::bigint, (fields->>'c5')::bool ORDER BY 1,2,3,4; +--Testcase 200: +SELECT variance((fields->>'c3')::bigint)-5*min((fields->>'c3')::bigint)-1, every((fields->>'c5')::bool <> true), max((fields->>'c3')::bigint+4.56)*3-min((fields->>'c3')::bigint), count((fields->>'c3')::bigint)-4 from sctbl3 WHERE (fields->>'c3')::bigint=ANY (ARRAY[1,2,3]) ORDER BY 1,2,3,4; +--Testcase 201: +SELECT (fields->>'c3')::bigint-30, (fields->>'c3')::bigint-10, sum((fields->>'c3')::bigint)/3-(fields->>'c3')::bigint, min((fields->>'c3')::bigint)+(fields->>'c3')::bigint/4, (fields->>'c5')::bool c5, (fields->>'c20')::int-(fields->>'c19')::double precision-(fields->>'c16')::int from sctbl3 GROUP BY (fields->>'c20')::int, (fields->>'c19')::double precision, (fields->>'c16')::int, (fields->>'c3')::bigint, (fields->>'c3')::bigint, (fields->>'c5')::bool ORDER BY 1,2,3,4,5; + +-- Clean +--Testcase 209: +DROP FOREIGN TABLE sctbl3 CASCADE; +--Testcase 210: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 211: +DROP SERVER influxdb_svr CASCADE; +--Testcase 212: +DROP EXTENSION influxdb_fdw; diff --git a/sql/15.0/schemaless/add_tags.sql b/sql/15.0/schemaless/add_tags.sql new file mode 100644 index 0000000..f0576cc --- /dev/null +++ b/sql/15.0/schemaless/add_tags.sql @@ -0,0 +1,265 @@ +SET datestyle=ISO; +-- timestamp with time zone differs based on this +SET timezone='UTC'; + +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +-- Init data original +:INIT_TAG_ORIGINAL; +-- Before update data +-- Testcase 1: +CREATE EXTENSION influxdb_fdw CASCADE; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +--Testcase 4: +CREATE FOREIGN TABLE sctbl9 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sname'); +--Testcase 5: +CREATE FOREIGN TABLE sctbl4 (fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true'); + + +--------------------------------------------------------------------------------------- TC for before update test data ------------------------------------------------------------------------------------------------- +--Testcase 6: +select * from sctbl4; +--Testcase 7: +select time, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::double precision sig3, (fields->>'sig4')::boolean sig4 from sctbl4; +--Testcase 8: +select max(fields->>'sig2'), min(time), bool_or(fields->>'sig2' != 'JAPA') from sctbl4; +--Testcase 9: +select bool_and((fields->>'sig3')::double precision > -10), string_agg('446757svbvskkk', fields->>'sig2'), avg ((fields->>'sig1')::bigint) from sctbl4; +--Testcase 10: +select count(fields->>'sig1'), stddev((fields->>'sig3')::double precision + 333), min(fields->>'sig2') from sctbl4; +--Testcase 11: +select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::bigint), stddev((fields->>'sig3')::double precision) from sctbl4; + + +--------------------------------------------------------------------------------------- Update: Add 1 tag -------------------------------------------------------------------------------------------------------------- +-- Update data : add 1 tag +:RECOVER_INIT_TAG_ADD_1; + +--Testcase 12: +DROP FOREIGN TABLE sctbl4; +--Testcase 13: +CREATE FOREIGN TABLE sctbl4 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid'); +-- Select all data with aggregate +--Testcase 14: +select avg((fields->>'sig3')::double precision), bool_and(fields->>'sig2' != '%a%'), count(*) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 15: +select bool_or((fields->>'sig1')::bigint >= 1234), stddev((fields->>'sig1')::bigint), avg((fields->>'sig3')::double precision) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 16: +select max(time), avg((fields->>'sig3')::double precision), sum((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 17: +select string_agg(fields->>'sig2', 'ASDFG!@#$%zxc'), count(time), avg((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 18: +select sum((fields->>'sig3')::double precision), stddev((fields->>'sig3')::double precision), min((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY 1, 2, 3; + +-- Select aggregate contain expression +--Testcase 19: +select bool_or(((fields->>'sig1')::bigint + (fields->>'sig3')::double precision - 9999) > 0), stddev((fields->>'sig3')::double precision / (fields->>'sig1')::bigint + 3291), stddev((fields->>'sig3')::double precision * 12.3 - (fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 20: +select avg((fields->>'sig3')::double precision * (fields->>'sig1')::bigint / 34241), bool_and(fields->>'sig2' != '%c'), bool_and((fields->>'sig4')::boolean AND true OR true) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 21: +select sum((fields->>'sig3')::double precision * 123.456 + (fields->>'sig1')::bigint), bool_and((fields->>'sig4')::boolean OR false), bool_or((fields->>'sig4')::boolean AND true AND true) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 22: +select min((fields->>'sig3')::double precision / ((fields->>'sig3')::double precision + 223344)), max((fields->>'sig1')::bigint * (fields->>'sig3')::double precision - (fields->>'sig3')::double precision), count(*) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 23: +select every((fields->>'sig4')::boolean OR (fields->>'sig4')::boolean AND true), max (fields->>'sig2' || 'handsome' || 'ugly'), avg((fields->>'sig1')::bigint / (fields->>'sig1')::bigint + 9999.999) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; + +-- Select combine-aggregate +--Testcase 24: +select avg((fields->>'sig3')::double precision) + sum((fields->>'sig3')::double precision) / avg((fields->>'sig1')::bigint), bool_and(fields->>'sig2' != '%a%') AND bool_and((fields->>'sig4')::boolean AND true) AND true , max((fields->>'sig1')::bigint * (fields->>'sig1')::bigint / 0.0001) + min((fields->>'sig3')::double precision / ((fields->>'sig1')::bigint + 99999)) * sum((fields->>'sig1')::bigint * (fields->>'sig1')::bigint - (fields->>'sig3')::double precision) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 25: +select stddev((fields->>'sig3')::double precision * 0.0001 - (fields->>'sig1')::bigint) + min((fields->>'sig3')::double precision / ((fields->>'sig1')::bigint + 3.344)) * stddev((fields->>'sig1')::bigint * (fields->>'sig1')::bigint - (fields->>'sig3')::double precision), bool_or((fields->>'sig3')::double precision / (fields->>'sig1')::bigint < -10) OR bool_or((fields->>'sig4')::boolean OR true OR false) AND bool_and(fields->>'sig2' != '%c'), string_agg(fields->>'sig2', '恨挫') from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 26: +select max((fields->>'sig1')::bigint) * max((fields->>'sig3')::double precision) + sum((fields->>'sig1')::bigint), stddev((fields->>'sig1')::bigint) * avg((fields->>'sig3')::double precision) / avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) + stddev((fields->>'sig3')::double precision) - count((fields->>'sig4')::boolean) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 27: +select count(fields->>'sig2') * count(fields->>'sig4') / min((fields->>'sig1')::bigint), stddev((fields->>'sig1')::bigint) - count(fields->>'sig2') * sum((fields->>'sig1')::bigint), avg((fields->>'sig3')::double precision) - avg((fields->>'sig1')::bigint) * sum((fields->>'sig1')::bigint) from sctbl4 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; + +-- Select with WHERE multi-condition +--Testcase 28: +select max(fields->>'sig2'), sum((fields->>'sig3')::double precision), bool_or(fields->>'sig2' != 'viEtnAM') from sctbl4 WHERE (fields->>'sig1')::bigint > 0 AND (fields->>'sig4')::boolean = true OR fields->>'sig2' LIKE '%a%' GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 29: +select bool_and((fields->>'sig3')::double precision >= 1.6789), string_agg('ったのか誰も質問しま', fields->>'sig2'), avg ((fields->>'sig1')::bigint) from sctbl4 WHERE (fields->>'sig3')::double precision = 0 AND fields->>'sig2' IN ('%開発%', '%b%') OR ((fields->>'sig3')::double precision / (fields->>'sig1')::bigint) <= 6.1234 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 30: +select avg((fields->>'sig3')::double precision), count(*), count(fields->>'sig2') from sctbl4 WHERE (fields->>'sig4')::boolean = true OR time = '2020-01-09 01:00:00+00' AND (fields->>'sig3')::double precision != 0 GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 31: +select string_agg(fields->>'sig2', fields->>'sig2'), min(time), max(time) from sctbl4 WHERE (fields->>'sig4')::boolean = false OR (fields->>'sig4')::boolean = true AND time < '2000-01-01 23:00:00+00' GROUP BY tags->>'sid' ORDER BY tags->>'sid'; +--Testcase 32: +select count(fields->>'sig4'), every((fields->>'sig3')::double precision < 0), stddev((fields->>'sig3')::double precision) from sctbl4 WHERE (fields->>'sig4')::boolean <> true AND fields->>'sig2' ILIKE 'ターフェー' OR fields->>'sig2' LIKE 'akewo0' GROUP BY tags->>'sid' ORDER BY tags->>'sid'; + +-- Select with HAVING LIMIT OFFSET +--Testcase 33: +select sum((fields->>'sig1')::bigint + (fields->>'sig1')::bigint * (fields->>'sig3')::double precision), string_agg(fields->>'sig2', fields->>'sig2'), string_agg(fields->>'sig2' || 'vjbkvba', 'も質問' || (fields->>'sig2')::text) from sctbl4 WHERE fields->>'sig2' LIKE '%a%' OR (fields->>'sig1')::bigint > 0 GROUP BY tags->>'sid',(fields->>'sig3')::double precision HAVING (fields->>'sig3')::double precision > 0 ORDER BY tags->>'sid' LIMIT 5 OFFSET 0; +--Testcase 34: +select string_agg(fields->>'sig2' || (fields->>'sig2')::text, fields->>'sig2' || '!@#$%^&*'), every((fields->>'sig4')::boolean OR true AND false), stddev((fields->>'sig3')::double precision - (fields->>'sig1')::bigint / (fields->>'sig1')::bigint) from sctbl4 WHERE (fields->>'sig3')::double precision <= 999999999 GROUP BY tags->>'sid',fields->>'sig4' HAVING (fields->>'sig4')::boolean <> false ORDER BY tags->>'sid' LIMIT 5 OFFSET 1; +--Testcase 35: +select stddev((fields->>'sig3')::double precision * 0.416754 + (fields->>'sig1')::bigint), min((fields->>'sig3')::double precision / ((fields->>'sig1')::bigint + 3.344)), stddev((fields->>'sig1')::bigint * (fields->>'sig1')::bigint - (fields->>'sig3')::double precision) from sctbl4 WHERE (fields->>'sig1')::bigint >= -1555.555 GROUP BY tags->>'sid',fields->>'sig4' HAVING (fields->>'sig4')::boolean <> true ORDER BY tags->>'sid' LIMIT 5 OFFSET 1; +--Testcase 36: +select bool_or((fields->>'sig3')::double precision / (fields->>'sig1')::bigint >= 15.5678), max ((fields->>'sig3')::double precision / (fields->>'sig1')::bigint * (fields->>'sig1')::bigint), every(((fields->>'sig3')::double precision - (fields->>'sig1')::bigint) < 0) from sctbl4 WHERE (fields->>'sig4')::boolean <> false GROUP BY tags->>'sid',fields->>'sig4' HAVING (fields->>'sig4')::boolean = true ORDER BY tags->>'sid' LIMIT 5 OFFSET 2; +--Testcase 37: +select max (fields->>'sig2' || 'kethattinh' || 'hanoilanhqua'), sum ((fields->>'sig3')::double precision - (fields->>'sig3')::double precision - (fields->>'sig1')::bigint), avg((fields->>'sig1')::bigint + (fields->>'sig1')::bigint + (fields->>'sig3')::double precision) from sctbl4 WHERE (fields->>'sig1')::bigint <= 10000000 GROUP BY tags->>'sid',fields->>'sig2',fields->>'sig4' HAVING fields->>'sig2' IN ('%c%', '%1%') OR fields->>'sig2' LIKE '%a%' ORDER BY tags->>'sid' LIMIT 5 OFFSET 2; + +-- Select with subquery +--Testcase 38: +select time, tags->>'sname' sname, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::double precision sig3, (fields->>'sig4')::boolean sig4 from (select * from sctbl9 ORDER BY tags->>'sid') AS sctbl9; +--Testcase 39: +select time, max(sig1), avg(sig3) from (select time, tags->>'sname' sname, ((fields->>'sig1')::bigint) sig1, fields->>'sig2' sig2, ((fields->>'sig3')::double precision) sig3, (fields->>'sig4')::boolean sig4 from sctbl9 GROUP BY time,tags->>'sname',fields->>'sig1',fields->>'sig2',fields->>'sig3',fields->>'sig4' ORDER BY 1,2,3,4,5,6) AS sctbl9 GROUP BY time; +--Testcase 40: +select sum(sig3::double precision), string_agg(sig2, sname), count(sid) from (select time, tags->>'sid' sid, tags->>'sname' sname, (fields->>'sig1')::bigint sig1, fields->>'sig2' sig2, (fields->>'sig3')::double precision sig3, (fields->>'sig4')::boolean sig4 from sctbl9 ORDER BY tags->>'sid') AS sctbl9; + + +--------------------------------------------------------------------------------------- Update: Add 20 tag -------------------------------------------------------------------------------------------------------------- +-- Update data : add 1 tag +:RECOVER_INIT_TAG_ADD_20; +--Testcase 41: +DROP FOREIGN TABLE sctbl4; +--Testcase 42: +CREATE FOREIGN TABLE sctbl4 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true'), time timestamp) SERVER influxdb_svr OPTIONS (schemaless 'true', tags 'sid, sid1, sid2, sid3, sid4, sid5, sid6, sid7, sid8, sid9, sid10, sid11, sid12, sid13, sid14, sid15, sid16, sid17, sid18, sid19, sid20'); +--Testcase 43: +select * from sctbl4; +--Testcase 44: +select (fields->>'sig1')::bigint sig1, tags->>'sid1' sid1, (tags->>'sid2')::bigint sid2, (tags->>'sid3')::bigint sid3, tags->>'sid4' sid4, (tags->>'sid5')::boolean sid5, (tags->>'sid6')::boolean sid6, tags->>'sid7' sid7, tags->>'sid8' sid8, tags->>'sid9' sid9, tags->>'sid10' sid10, tags->>'sid11' sid11, (tags->>'sid12')::bigint sid12, (tags->>'sid13')::double precision sid13, tags->>'sid14' sid14, (tags->>'sid15')::boolean sid15, tags->>'sid16' sid16, tags->>'sid17' sid17, tags->>'sid18' sid18, tags->>'sid19' sid19, (tags->>'sid20')::bigint sid20 from sctbl4; + +-- Select all data with aggregate +--Testcase 45: +select max(time), count(tags->>'sid1'), sum((tags->>'sid2')::bigint) from sctbl4 GROUP BY time,tags->>'sid1',(tags->>'sid2')::bigint,(fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; +--Testcase 46: +select string_agg(tags->>'sid19', tags->>'sid17'), avg((tags->>'sid3')::bigint), stddev((tags->>'sid13')::double precision) from sctbl4 GROUP BY tags->>'sid17',tags->>'sid19',(tags->>'sid3')::bigint,(tags->>'sid13')::double precision,(fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; +--Testcase 47: +select sum((tags->>'sid3')::bigint), sum((tags->>'sid20')::bigint), bool_and((tags->>'sid5')::boolean != (tags->>'sid6')::boolean) from sctbl4 GROUP BY fields->>'sig2' ORDER BY fields->>'sig2'; +--Testcase 48: +select stddev((tags->>'sid20')::bigint), avg((tags->>'sid2')::bigint order by (tags->>'sid2')::bigint), min(tags->>'sid10') from sctbl4 GROUP BY fields->>'sig3' ORDER BY (fields->>'sig3')::double precision; +--Testcase 49: +select every((tags->>'sid11')::boolean = (tags->>'sid15')::boolean), bool_or((tags->>'sid6')::boolean != (tags->>'sid11')::boolean), count(time) from sctbl4 GROUP BY fields->>'sig2' ORDER BY fields->>'sig2'; +--Testcase 50: +select count(*), sum((tags->>'sid3')::bigint), string_agg(tags->>'sid9', tags->>'sid17') from sctbl4 GROUP BY fields->>'sig3' ORDER BY (fields->>'sig3')::double precision; +--Testcase 51: +select count(tags->>'sid1'), bool_and(tags->>'sid4' != '%c%'), max(tags->>'sid8') from sctbl4 GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; +--Testcase 52: +select bool_and((tags->>'sid6')::boolean != false), min((tags->>'sid13')::double precision), avg((tags->>'sid20')::bigint) from sctbl4 GROUP BY fields->>'sig4' ORDER BY fields->>'sig4'; +--Testcase 53: +select stddev((tags->>'sid13')::double precision), sum((tags->>'sid12')::bigint), string_agg(tags->>'sid7', tags->>'sid17') from sctbl4 GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; +--Testcase 54: +select stddev((tags->>'sid3')::bigint), min(tags->>'sid10'), max(tags->>'sid4') from sctbl4 GROUP BY (fields->>'sig4')::boolean ORDER BY (fields->>'sig4')::boolean; +--Testcase 55: +select string_agg(tags->>'sid19', tags->>'sid4'), string_agg(tags->>'sid9', tags->>'sid1'), max(time) from sctbl4 GROUP BY fields->>'sig3' ORDER BY (fields->>'sig3')::double precision; +--Testcase 56: +select avg((tags->>'sid3')::bigint), count(*), every((tags->>'sid15')::boolean != (tags->>'sid5')::boolean) from sctbl4 GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; +--Testcase 57: +select every((tags->>'sid6')::boolean = (tags->>'sid11')::boolean), string_agg(tags->>'sid14', tags->>'sid16'), string_agg(tags->>'sid18', tags->>'sid19') from sctbl4 GROUP BY fields->>'sig4' ORDER BY fields->>'sig4'; +--Testcase 58: +select stddev((tags->>'sid12')::double precision), stddev((tags->>'sid13')::double precision), sum((tags->>'sid13')::double precision) from sctbl4 GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; + +-- Select aggregate contain expression +--Testcase 59: +select max((tags->>'sid2')::bigint / (tags->>'sid3')::bigint + (fields->>'sig3')::double precision), avg((tags->>'sid20')::bigint - (fields->>'sig3')::double precision * (tags->>'sid3')::bigint), sum((tags->>'sid2')::bigint + (fields->>'sig3')::double precision / (tags->>'sid3')::bigint) from sctbl4 GROUP BY tags->>'sid20' ORDER BY (tags->>'sid20')::bigint; +--Testcase 60: +select string_agg(tags->>'sid19' || (fields->>'sig2')::text, tags->>'sid17' || (tags->>'sid1')::text), avg((tags->>'sid3')::bigint * (tags->>'sid2')::bigint - (tags->>'sid12')::bigint), stddev((tags->>'sid13')::double precision / (tags->>'sid3')::bigint + (tags->>'sid12')::bigint) from sctbl4 GROUP BY tags->>'sid19' ORDER BY tags->>'sid19'; +--Testcase 61: +select sum((tags->>'sid3')::bigint - (tags->>'sid2')::bigint - (fields->>'sig1')::bigint), sum((tags->>'sid20')::bigint - (tags->>'sid13')::double precision + (tags->>'sid2')::bigint), bool_and((tags->>'sid5')::boolean AND (tags->>'sid6')::boolean OR (fields->>'sig4')::boolean) from sctbl4 GROUP BY tags->>'sid18' ORDER BY tags->>'sid18'; +--Testcase 62: +select stddev((tags->>'sid12')::bigint * (tags->>'sid20')::bigint / (tags->>'sid2')::bigint), avg((tags->>'sid2')::bigint + (tags->>'sid3')::bigint / (tags->>'sid12')::bigint), min(tags->>'sid10' || 'BkbKJBT45%^&') from sctbl4 GROUP BY tags->>'sid16' ORDER BY tags->>'sid16'; +--Testcase 63: +select every((tags->>'sid6')::boolean = (tags->>'sid15')::boolean), bool_or(tags->>'sid4' LIKE 'Hello'), sum((fields->>'sig1')::bigint * (fields->>'sig3')::double precision - (tags->>'sid20')::bigint) from sctbl4 GROUP BY tags->>'sid15' ORDER BY tags->>'sid15'; +--Testcase 64: +select every((tags->>'sid5')::boolean <> (tags->>'sid6')::boolean), sum((tags->>'sid2')::bigint / (fields->>'sig1')::bigint * (fields->>'sig3')::double precision), string_agg(tags->>'sid9' || (tags->>'sid18')::text, tags->>'sid17' || (tags->>'sid16')::text) from sctbl4 GROUP BY tags->>'sid14' ORDER BY tags->>'sid14'; +--Testcase 65: +select min((fields->>'sig1')::bigint * (tags->>'sid20')::bigint - (tags->>'sid13')::double precision), bool_and(tags->>'sid4' != '%c%' AND tags->>'sid4' != '%a%'), max((tags->>'sid3')::bigint - (fields->>'sig3')::double precision + (tags->>'sid12')::double precision) from sctbl4 GROUP BY tags->>'sid13' ORDER BY (tags->>'sid13')::double precision; +--Testcase 66: +select bool_and((tags->>'sid6')::boolean != false OR (tags->>'sid11')::boolean = true), min((tags->>'sid13')::double precision / (fields->>'sig3')::double precision - (tags->>'sid12')::bigint), avg((tags->>'sid20')::bigint / (tags->>'sid12')::bigint + (tags->>'sid3')::bigint) from sctbl4 GROUP BY tags->>'sid12' ORDER BY (tags->>'sid12')::bigint; +--Testcase 67: +select stddev((tags->>'sid13')::double precision + (fields->>'sig1')::bigint * (tags->>'sid2')::bigint), sum((tags->>'sid12')::bigint + (tags->>'sid20')::bigint - (tags->>'sid3')::bigint), string_agg(tags->>'sid7' || '豚は誰も好', 'なぜ18歳で' || (tags->>'sid17')::text) from sctbl4 GROUP BY tags->>'sid8' ORDER BY tags->>'sid8'; +--Testcase 68: +select stddev((tags->>'sid3')::bigint * (tags->>'sid2')::bigint - (tags->>'sid20')::bigint), min(tags->>'sid10' || '12345#$%&7' || (tags->>'sid19')::text), every(tags->>'sid4' IN ('japan', 'vietnam')) from sctbl4 GROUP BY tags->>'sid9' ORDER BY tags->>'sid9'; + +-- Select combine-aggregate +--Testcase 69: +select stddev((tags->>'sid3')::bigint) + count(tags->>'sid10') + count(tags->>'sid4'), count(time) + count(tags->>'sid1') - sum((tags->>'sid2')::bigint), avg((tags->>'sid3')::bigint) * count(*) + count(tags->>'sid17') from sctbl4 GROUP BY fields->>'sig2' ORDER BY fields->>'sig2'; +--Testcase 70: +select stddev((tags->>'sid13')::double precision) * avg((fields->>'sig1')::bigint) / avg((fields->>'sig3')::double precision), sum((tags->>'sid2')::bigint) / count(tags->>'sid10') + sum((fields->>'sig1')::bigint), stddev((fields->>'sig3')::double precision) / stddev((tags->>'sid12')::double precision) - min((tags->>'sid12')::double precision) from sctbl4 GROUP BY tags->>'sid2' ORDER BY (tags->>'sid2')::bigint; +--Testcase 71: +select string_agg(tags->>'sid7' || (tags->>'sid10')::text || (tags->>'sid4')::text, tags->>'sid7' || 'JBkbg7t96' || (tags->>'sid18')::text), avg((tags->>'sid2')::bigint) - stddev((fields->>'sig3')::double precision) + avg((tags->>'sid12')::bigint), bool_and(tags->>'sid19' LIKE '%な%') OR bool_and((tags->>'sid5')::boolean = true) AND bool_or((tags->>'sid6')::boolean) from sctbl4 GROUP BY tags->>'sid3' ORDER BY (tags->>'sid3')::bigint; +--Testcase 72: +select avg((tags->>'sid3')::bigint) + count(*) - sum((tags->>'sid20')::bigint), every((tags->>'sid15')::boolean != (tags->>'sid5')::boolean) OR bool_and((tags->>'sid15')::boolean) AND bool_or((tags->>'sid6')::boolean), string_agg(tags->>'sid14' || (tags->>'sid16')::text || (tags->>'sid18')::text, tags->>'sid17' || '&^&*$^&*^*' || (tags->>'sid19')::text) from sctbl4 GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; +--Testcase 73: +select bool_and((tags->>'sid11')::boolean) AND bool_or((tags->>'sid11')::boolean) OR true, count(time) + count(tags->>'sid1') - sum((tags->>'sid3')::bigint), count(tags->>'sid1') + count(tags->>'sid10') - avg((tags->>'sid3')::bigint) from sctbl4 GROUP BY fields->>'sig4' ORDER BY fields->>'sig4'; +--Testcase 74: +select bool_or(tags->>'sid16' = 'id1') OR false AND every((tags->>'sid15')::boolean), string_agg(tags->>'sid14' || (tags->>'sid8')::text || (tags->>'sid4')::text, (tags->>'sid14')::text), avg((tags->>'sid2')::bigint) + avg((tags->>'sid3')::bigint) - avg((tags->>'sid12')::bigint) from sctbl4 GROUP BY fields->>'sig4' ORDER BY fields->>'sig4'; +--Testcase 75: +select bool_and(time > '1900-09-09 23:59:00+00') AND bool_and((fields->>'sig4')::boolean) AND every((fields->>'sig4')::boolean), stddev((tags->>'sid20')::bigint) / stddev((fields->>'sig1')::bigint) / sum((tags->>'sid13')::double precision), stddev((tags->>'sid13')::double precision) / sum((tags->>'sid13')::double precision) * count(*) from sctbl4 GROUP BY tags->>'sid7' ORDER BY tags->>'sid7'; +--Testcase 76: +select sum((tags->>'sid2')::bigint) + count(tags->>'sid1') - count(tags->>'sid8'), count((fields->>'sig3')::double precision) - count(tags->>'sid9') + count(tags->>'sid17'), string_agg(tags->>'sid19' || 'hf675578ytgu', tags->>'sid17' || (tags->>'sid14')::text) from sctbl4 GROUP BY tags->>'sid8' ORDER BY tags->>'sid8'; +--Testcase 77: +select sum((tags->>'sid3')::bigint) - avg((tags->>'sid12')::bigint) * count(tags->>'sid9'), bool_and((tags->>'sid11')::boolean) AND bool_and((tags->>'sid20')::bigint >= -16735467) OR every(tags->>'sid16' != 'id3'), sum((tags->>'sid20')::bigint) + avg((tags->>'sid12')::bigint) / count(tags->>'sid19') from sctbl4 GROUP BY fields->>'sig2' ORDER BY fields->>'sig2'; +--Testcase 78: +select string_agg(tags->>'sid19' || (tags->>'sid17')::text || (tags->>'sid10')::text, tags->>'sid9' || (tags->>'sid8')::text || (tags->>'sid7')::text), avg((tags->>'sid20')::bigint) / avg((tags->>'sid2')::bigint) + stddev((tags->>'sid12')::bigint), count(tags->>'sid1') - count(tags->>'sid14') + count((fields->>'sig3')::double precision) from sctbl4 GROUP BY tags->>'sid10' ORDER BY tags->>'sid10'; + +-- Select with WHERE multi-condition +--Testcase 79: +select avg((fields->>'sig3')::double precision + (tags->>'sid3')::bigint / (tags->>'sid12')::bigint), count(time) + count(tags->>'sid1') - sum((tags->>'sid2')::bigint), every((tags->>'sid11')::boolean = (tags->>'sid15')::boolean) from sctbl4 WHERE tags->>'sid9' LIKE '%挫败%' OR (tags->>'sid5')::boolean <> true OR tags->>'sid16' ILIKE 'id4' AND (tags->>'sid20')::bigint < 0 GROUP BY tags->>'sid11' ORDER BY tags->>'sid11'; +--Testcase 80: +select avg((tags->>'sid2')::bigint), count(*), every((tags->>'sid11')::boolean != (tags->>'sid5')::boolean) from sctbl4 WHERE (tags->>'sid20')::bigint > 100000 AND (tags->>'sid6')::boolean != true OR tags->>'sid16' LIKE '2i3uth78wgbg' AND tags->>'sid1' ILIKE 'bMBOphOey0kXMun' GROUP BY fields->>'sig1' ORDER BY (fields->>'sig1')::bigint; +--Testcase 81: +select every((tags->>'sid6')::boolean <> (tags->>'sid11')::boolean), string_agg(tags->>'sid1', tags->>'sid16'), string_agg(tags->>'sid18', tags->>'sid7') from sctbl4 WHERE (tags->>'sid13')::double precision > 0.985689524 OR tags->>'sid8' LIKE '%^%' OR (tags->>'sid15')::boolean = true OR tags->>'sid4' IN ('%1%', '516541') GROUP BY fields->>'sig1',fields->>'sig3' ORDER BY (fields->>'sig3')::double precision; +--Testcase 82: +select string_agg(tags->>'sid16', tags->>'sid17'), avg((tags->>'sid13')::double precision), stddev((tags->>'sid12')::bigint) from sctbl4 WHERE (tags->>'sid6')::boolean <> false AND tags->>'sid19' LIKE 'ターフェー' AND tags->>'sid17' LIKE 'akewo0' AND tags->>'sid10' IN ('%2%', '%vợ%') GROUP BY tags->>'sid14',fields->>'sig2',fields->>'sig3' ORDER BY tags->>'sid14',fields->>'sig2',(fields->>'sig3')::double precision; +--Testcase 83: +select stddev((tags->>'sid13')::double precision + (fields->>'sig1')::bigint * (tags->>'sid2')::bigint), bool_or(tags->>'sid4' LIKE 'xinchao'), sum((fields->>'sig1')::bigint * (fields->>'sig3')::double precision - (tags->>'sid20')::bigint) from sctbl4 WHERE tags->>'sid4' IN ('%japnam', 'vietpan%') OR (tags->>'sid11')::boolean = true OR (tags->>'sid13')::double precision < 99999999999.99 OR (fields->>'sig3')::double precision > 0 GROUP BY (fields->>'sig1')::bigint,(fields->>'sig3')::double precision ORDER BY (fields->>'sig1')::bigint; + +-- Select with HAVING LIMIT OFFSET +--Testcase 84: +select stddev((tags->>'sid2')::bigint * 0.9804754 + (tags->>'sid3')::bigint), min((tags->>'sid13')::double precision / ((fields->>'sig1')::bigint + 3.144)), stddev((tags->>'sid20')::bigint * (tags->>'sid2')::bigint - (tags->>'sid13')::double precision) from sctbl4 WHERE (fields->>'sig3')::double precision >= -999995.955 GROUP BY (fields->>'sig1')::bigint,(fields->>'sig3')::double precision HAVING (fields->>'sig3')::double precision > 0 ORDER BY (fields->>'sig1')::bigint LIMIT 10 OFFSET 10; +--Testcase 85: +select sum((fields->>'sig3')::double precision + (tags->>'sid3')::bigint * (tags->>'sid12')::bigint), string_agg(tags->>'sid7', tags->>'sid8'), string_agg(fields->>'sig2' || '568hvsvbka', 'も9質18問' || (tags->>'sid9')::text) from sctbl4 WHERE (fields->>'sig3')::double precision >= 0.3871647691 GROUP BY (fields->>'sig1')::bigint,(fields->>'sig3')::double precision,tags->>'sid15' HAVING (fields->>'sig3')::double precision <> 0 ORDER BY tags->>'sid15' LIMIT 10 OFFSET 0; +--Testcase 86: +select max (tags->>'sid10' || 'codonlangthang' || 'hoanghonhanoi'), sum ((tags->>'sid13')::double precision - (tags->>'sid12')::bigint - (tags->>'sid20')::bigint), avg((tags->>'sid2')::bigint + (tags->>'sid3')::bigint + (tags->>'sid12')::bigint) from sctbl4 WHERE (fields->>'sig1')::bigint <= 87986847478 GROUP BY (fields->>'sig1')::bigint,tags->>'sid10' HAVING tags->>'sid10' NOT IN ('%1 vợ%', '%1 chồng%') ORDER BY (fields->>'sig1')::bigint LIMIT 10 OFFSET 2; +--Testcase 87: +select stddev((tags->>'sid13')::double precision) * avg((tags->>'sid3')::bigint) / avg((tags->>'sid13')::double precision), sum((tags->>'sid2')::bigint) + max((fields->>'sig1')::bigint) + sum((tags->>'sid3')::bigint), stddev((tags->>'sid2')::bigint) / stddev((tags->>'sid12')::bigint) - min((tags->>'sid20')::bigint) from sctbl4 WHERE fields->>'sig2' NOT IN ('%c%', '%^%') GROUP BY tags->>'sid19' HAVING tags->>'sid19' != '%v' ORDER BY tags->>'sid19' LIMIT 10 OFFSET 0; +--Testcase 88: +select bool_or((tags->>'sid2')::bigint / (tags->>'sid13')::double precision >= 15.5678), max ((tags->>'sid3')::bigint / (tags->>'sid20')::bigint * (tags->>'sid12')::bigint), every(((tags->>'sid13')::double precision - (tags->>'sid2')::bigint) < 0) from sctbl4 WHERE (fields->>'sig1')::bigint != 0 GROUP BY (fields->>'sig1')::bigint,(fields->>'sig3')::double precision,tags->>'sid20' HAVING (fields->>'sig3')::double precision != 0 ORDER BY (tags->>'sid20')::bigint LIMIT 10 OFFSET 5; + +-- Select JOIN +--Testcase 89: +select * from sctbl4 JOIN sctbl9 ON sctbl4.tags->>'sid14' = sctbl9.tags->>'sid' LIMIT 30 OFFSET 15; +--Testcase 90: +select sctbl4.time, (sctbl4.fields->>'sig1')::bigint sig1, sctbl9.fields->>'sig2' sig2, (sctbl4.fields->>'sig3')::double precision sig3, (sctbl9.fields->>'sig4')::boolean sig4 from sctbl4 JOIN sctbl9 ON sctbl4.tags->>'sid' = sctbl9.tags->>'sid' ORDER BY sctbl4.time LIMIT 30 OFFSET 5; +--Testcase 91: +select sctbl9.time, (sctbl9.fields->>'sig1')::bigint sig1, sctbl9.fields->>'sig2' sig2, (sctbl4.fields->>'sig3')::double precision sig3, (sctbl9.fields->>'sig4')::boolean sig4, (sctbl4.tags->>'sid3')::bigint sid3, sctbl4.tags->>'sid' sid, (sctbl4.tags->>'sid3')::bigint sid3, sctbl4.tags->>'sid7' sid7 from sctbl4 JOIN sctbl9 ON sctbl4.tags->>'sid' = sctbl9.tags->>'sid' WHERE (sctbl4.fields->>'sig1')::bigint > (sctbl9.fields->>'sig1')::bigint AND sctbl4.fields->>'sig2' != NULL LIMIT 30 OFFSET 5; +--Testcase 92: +select sctbl4.time, (sctbl9.fields->>'sig1')::bigint sig1, sctbl9.fields->>'sig2' sig2, (sctbl9.fields->>'sig3')::double precision sig3, (sctbl4.fields->>'sig4')::boolean sig4, (sctbl4.tags->>'sid13')::double precision sid13, sctbl4.tags->>'sid' sid, (sctbl4.tags->>'sid5')::boolean sid5, sctbl4.tags->>'sid16' sid16 from sctbl4 JOIN sctbl9 ON (sctbl4.fields->>'sig1')::bigint / (sctbl4.fields->>'sig3')::double precision < (sctbl9.fields->>'sig1')::bigint LIMIT 15 OFFSET 0; +--Testcase 93: +select sctbl4.time, (sctbl4.fields->>'sig1')::bigint sig1, sctbl9.fields->>'sig2' sig2, (sctbl4.fields->>'sig3')::double precision sig3, (sctbl4.fields->>'sig4')::boolean sig4, sctbl4.tags->>'sid19' sid19 from sctbl4 JOIN sctbl9 ON (sctbl4.tags->>'sid3')::bigint BETWEEN -10000 AND 9999999 OR sctbl9.fields->>'sig2' ILIKE '%a%' ORDER BY sctbl4.time, sig1, sig2, sig3, sig4, sid19 LIMIT 10 OFFSET 0; +--Testcase 94: +select sctbl4.time, (sctbl4.tags->>'sid15')::boolean sid15, (sctbl9.fields->>'sig4')::boolean sig4, sctbl4.fields->>'sig2' sig2, sctbl4.tags->>'sid8' sid8 from sctbl4 LEFT OUTER JOIN sctbl9 ON ((sctbl4.fields->>'sig3')::double precision = (sctbl9.fields->>'sig1')::bigint/25000 OR (sctbl4.fields->>'sig4')::boolean = (sctbl9.fields->>'sig4')::boolean) GROUP BY (sctbl4.fields->>'sig1')::bigint,sctbl4.time,(sctbl4.tags->>'sid15')::boolean,(sctbl9.fields->>'sig4')::boolean,sctbl4.fields->>'sig2',sctbl4.tags->>'sid8' HAVING (sctbl4.fields->>'sig1')::bigint > 0 LIMIT 10 OFFSET 2; +--Testcase 95: +select (sctbl9.fields->>'sig4')::boolean sig4, (sctbl4.tags->>'sid5')::boolean sid5, (sctbl4.tags->>'sid6')::boolean sid6, sctbl4.tags->>'sid7' sid7, sctbl4.tags->>'sid8' sid8, sctbl4.tags->>'sid9' sid9 from sctbl4 LEFT OUTER JOIN sctbl9 ON ((sctbl4.fields->>'sig1')::bigint = (sctbl9.fields->>'sig1')::bigint OR (sctbl4.fields->>'sig3')::double precision> (sctbl9.fields->>'sig3')::double precision) GROUP BY (sctbl4.fields->>'sig1')::bigint,(sctbl9.fields->>'sig3')::double precision,(sctbl9.fields->>'sig4')::boolean,(sctbl4.tags->>'sid5')::boolean,(sctbl4.tags->>'sid6')::boolean,sctbl4.tags->>'sid7',sctbl4.tags->>'sid8',sctbl4.tags->>'sid9' HAVING (sctbl4.fields->>'sig1')::bigint > sum((sctbl9.fields->>'sig3')::double precision) ORDER BY sid7, sid8, sid9 LIMIT 20 OFFSET 0; +--Testcase 96: +select (sctbl9.fields->>'sig4')::boolean sig4, sctbl9.fields->>'sig2' sig2, (sctbl4.tags->>'sid3')::bigint sid3, (sctbl4.tags->>'sid5')::boolean sid5, sctbl4.tags->>'sid7' sid7, sctbl4.tags->>'sid9' sid9, sctbl4.tags->>'sid16' sid16 from sctbl4 LEFT OUTER JOIN sctbl9 ON ((sctbl4.fields->>'sig3')::double precision > (sctbl9.fields->>'sig3')::double precision AND sctbl9.tags->>'sname' LIKE 'rapviet') GROUP BY (sctbl9.fields->>'sig4')::boolean,sctbl9.fields->>'sig2',(sctbl4.tags->>'sid3')::bigint,(sctbl4.tags->>'sid5')::boolean,sctbl4.tags->>'sid7',sctbl4.tags->>'sid9',sctbl4.tags->>'sid16',(sctbl4.fields->>'sig1')::bigint,sctbl9.tags->>'sname' ORDER BY (sctbl4.fields->>'sig1')::bigint DESC, sctbl9.tags->>'sname' LIMIT 10 OFFSET 8; +--Testcase 97: +select (sctbl4.tags->>'sid3')::bigint sid3, (sctbl4.tags->>'sid5')::boolean sid5, sctbl4.tags->>'sid7' sid7, sctbl4.tags->>'sid9' sid9, sctbl4.tags->>'sid16' sid16 from sctbl4 RIGHT OUTER JOIN sctbl9 ON (sctbl4.fields->>'sig4')::boolean = (sctbl9.fields->>'sig4')::boolean LIMIT 17 OFFSET 2; +--Testcase 98: +select sctbl4.tags->>'sid4' sid4, sctbl9.tags->>'sname' sname, sctbl4.tags->>'sid8' sid8, (sctbl4.tags->>'sid12')::bigint sid12, sctbl4.tags->>'sid14' sid14, (sctbl4.tags->>'sid20')::bigint sid20 from sctbl4 RIGHT OUTER JOIN sctbl9 ON ((sctbl4.fields->>'sig1')::bigint = (sctbl9.fields->>'sig3')::double precision OR (sctbl4.fields->>'sig3')::double precision > (sctbl9.fields->>'sig3')::double precision) GROUP BY (sctbl4.fields->>'sig1')::bigint,(sctbl9.fields->>'sig3')::double precision,sctbl4.tags->>'sid4',sctbl9.tags->>'sname',sctbl4.tags->>'sid8',(sctbl4.tags->>'sid12')::bigint,sctbl4.tags->>'sid14',(sctbl4.tags->>'sid20')::bigint HAVING (sctbl4.fields->>'sig1')::bigint < avg((sctbl9.fields->>'sig3')::double precision) ORDER BY sid12, sid20 LIMIT 9 OFFSET 1; +--Testcase 99: +select (sctbl4.tags->>'sid3')::bigint sid3, (sctbl4.tags->>'sid5')::boolean sid5, sctbl4.tags->>'sid7' sid7, sctbl4.tags->>'sid' sid, sctbl9.tags->>'sid' sid from sctbl4 FULL OUTER JOIN sctbl9 ON (sctbl4.fields->>'sig1')::bigint = (sctbl9.fields->>'sig1')::bigint GROUP BY (sctbl4.tags->>'sid3')::bigint,(sctbl4.tags->>'sid5')::boolean,sctbl4.tags->>'sid7',sctbl4.tags->>'sid',sctbl9.tags->>'sid'; +--Testcase 100: +select sctbl4.tags->>'sid' sid, sctbl9.tags->>'sid' sid, (sctbl4.tags->>'sid3')::bigint sid3, sctbl4.tags->>'sid16' sid16, sctbl4.tags->>'sid18' sid18, (sctbl4.fields->>'sig4')::boolean sig4 from sctbl4 FULL OUTER JOIN sctbl9 ON (sctbl4.fields->>'sig3')::double precision < (sctbl9.fields->>'sig3')::double precision WHERE (sctbl4.fields->>'sig1')::bigint > 0 AND (sctbl9.fields->>'sig3')::double precision != 1 AND sctbl9.tags->>'sname' LIKE 'kingofrap' OR (sctbl9.fields->>'sig1')::bigint = -9999 GROUP BY sctbl4.tags->>'sid',sctbl9.tags->>'sid',sctbl4.tags->>'sid3',sctbl4.tags->>'sid16',sctbl4.tags->>'sid18',sctbl4.fields->>'sig4'; +--Testcase 101: +select * from sctbl4 CROSS JOIN sctbl9 ORDER BY sctbl4.tags->>'sid1',(sctbl4.tags->>'sid2')::bigint,(sctbl4.tags->>'sid3')::bigint,sctbl4.tags->>'sid4',sctbl4.tags->>'sid5',sctbl4.tags->>'sid6',sctbl4.tags->>'sid7',sctbl4.tags->>'sid8',sctbl4.tags->>'sid9',sctbl4.tags->>'sid10',(sctbl9.fields->>'sig1')::bigint,sctbl9.fields->>'sig2',(sctbl9.fields->>'sig3')::double precision,sctbl9.fields->>'sig4' LIMIT 10 OFFSET 0; +--Testcase 102: +select sctbl4.tags->>'sid8' sid8, sctbl4.tags->>'sid9' sid9, (sctbl9.fields->>'sig1')::bigint sig1 from sctbl4 CROSS JOIN sctbl9 GROUP BY sctbl4.tags->>'sid8',sctbl4.tags->>'sid9',sctbl9.fields->>'sig1',sctbl4.fields->>'sig3',sctbl9.fields->>'sig1' HAVING (sctbl4.fields->>'sig3')::double precision >= sum((sctbl9.fields->>'sig1')::bigint) ORDER BY (sctbl9.fields->>'sig1')::bigint,(sctbl4.fields->>'sig3')::double precision LIMIT 10 OFFSET 0; + +-- Clean +--Testcase 103: +DROP FOREIGN TABLE sctbl4; +--Testcase 104: +DROP FOREIGN TABLE sctbl9; +--Testcase 105: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 106: +DROP SERVER influxdb_svr CASCADE; +--Testcase 107: +DROP EXTENSION influxdb_fdw; diff --git a/sql/15.0/schemaless/aggregate.sql b/sql/15.0/schemaless/aggregate.sql new file mode 100644 index 0000000..92e9dcb --- /dev/null +++ b/sql/15.0/schemaless/aggregate.sql @@ -0,0 +1,308 @@ + +--SET log_min_messages=debug1; +--SET client_min_messages=debug1; +--Testcase 1: +SET datestyle=ISO; +-- timestamp with time zone differs based on this +--Testcase 2: +SET timezone='UTC'; + +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); + +-- import time column as timestamp and text type +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); + +--ALTER EXTENSION influxdb_fdw ADD FUNCTION postgres_fdw_abs(int); +--ALTER SERVER server1 OPTIONS (ADD extensions 'influxdb_fdw'); + +--Testcase 6: +SELECT * FROM t4; + +--Testcase 7: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint),influx_time(time,interval '1s', interval '0.00001s'),tags->>'tag1' tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tags->>'tag1'; +--Testcase 8: +SELECT sum((fields->>'value1')::bigint),influx_time(time,interval '1s', interval '0.00001s'),tags->>'tag1' tag1 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '1s', interval '0.00001s'), tags->>'tag1'; + +--Testcase 9: +EXPLAIN (verbose) +SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint),tags->>'tag2' tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY tags->>'tag2', tags->>'tag1'; +--Testcase 10: +SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint),tags->>'tag2' tag2 FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY tags->>'tag2', tags->>'tag1'; + +--Testcase 11: +SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint), count((fields->>'value1')::bigint), tags->>'tag2' tag2 FROM "t4" group by tags->>'tag1', tags->>'tag2'; +--Testcase 12: +EXPLAIN (verbose) SELECT tags->>'tag1' tag1,sum((fields->>'value1')::bigint), count((fields->>'value1')::bigint), tags->>'tag2' tag2 FROM "t4" group by tags->>'tag1', tags->>'tag2'; + +--Testcase 13: +SELECT influx_time(time,interval '5s',interval '0s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' + GROUP BY influx_time(time,interval '5s', interval '0s'), tags->>'tag1'; + +--Testcase 14: +EXPLAIN (VERBOSE) +SELECT influx_time(time,interval '5s',interval '0s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '5s', interval '0s'), tags->>'tag1'; + +-- no offset +--Testcase 15: +SELECT influx_time(time,interval '5s'),tags->>'tag1' tag1,last(time, (fields->>'value1')::bigint) FROM "t4" WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:05+00' +GROUP BY influx_time(time,interval '5s'), tags->>'tag1'; + +--Testcase 16: +EXPLAIN (verbose) +SELECT last(time, (fields->>'value1')::bigint),last(time, (fields->>'value2')::bigint) FROM t4 GROUP BY tags->>'tag1'; +--Testcase 17: +SELECT last(time, (fields->>'value1')::bigint),last(time, (fields->>'value2')::bigint) FROM t4 GROUP BY tags->>'tag1'; + +-- GROUP BY time intervals and fill() +--Testcase 18: +SELECT * FROM tx; + +--Testcase 19: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); + +--Testcase 20: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)); + +--Testcase 21: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); + +--Testcase 22: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)); + +--Testcase 23: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); + +--Testcase 24: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('none')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')); + +--Testcase 25: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); + +--Testcase 26: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('null')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')); + +--Testcase 27: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); + +--Testcase 28: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('previous')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')); + +--Testcase 29: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); + +--Testcase 30: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_option('linear')) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')); + +-- with offset interval '0.00001s' +--Testcase 31: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); + +--Testcase 32: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)) FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)); + +--Testcase 33: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1'; + +--Testcase 34: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1'; + +--Testcase 35: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; + +--Testcase 36: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', interval '0.00001s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; + +--with tag1 +--Testcase 37: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1'; + +--Testcase 38: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1'; + +--Testcase 39: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1'; + +--Testcase 40: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1'; + +--Testcase 41: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('null')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tags->>'tag1'; + +--Testcase 42: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('null')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('null')), tags->>'tag1'; + +--Testcase 43: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('none')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tags->>'tag1'; + +--Testcase 44: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('none')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('none')), tags->>'tag1'; + +--Testcase 45: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('previous')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tags->>'tag1'; + +--Testcase 46: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('previous')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('previous')), tags->>'tag1'; + +--Testcase 47: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('linear')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tags->>'tag1'; + +--Testcase 48: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s',influx_fill_option('linear')), tags->>'tag1' tag1 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_option('linear')), tags->>'tag1'; + +--with tag1,tag2 + +--Testcase 49: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; + +--Testcase 50: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100)), tags->>'tag1', tags->>'tag2'; + +--Testcase 51: +EXPLAIN (verbose) +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1', tags->>'tag2'; + +--Testcase 52: +SELECT sum((fields->>'value1')::bigint), influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1' tag1, tags->>'tag2' tag2 FROM "tx" +WHERE time >= '1970-01-01 00:00:00+00' and time <= '1970-01-01 0:00:15+00' +GROUP BY influx_time(time,interval '2s', influx_fill_numeric(100.001)), tags->>'tag1', tags->>'tag2'; + +-- unsupport syntax +--Testcase 53: +EXPLAIN (verbose) +SELECT influx_fill_numeric(100) FROM "tx"; +--Testcase 54: +SELECT influx_fill_numeric(100) FROM "tx"; + +--Testcase 55: +SELECT * FROM "tx" WHERE influx_fill_numeric(100) > 0; + +--Testcase 56: +EXPLAIN (verbose) +SELECT influx_fill_option('linear') FROM "tx"; +--Testcase 57: +SELECT influx_fill_option('linear') FROM "tx"; + +--Testcase 58: +SELECT * FROM "tx" WHERE influx_fill_option('linear') > 0; + + +-- InfluxDB does not return error for the following query +--SELECT sum(value1) FROM t4 GROUP BY value1; + +-- not allowed +--Testcase 59: +SELECT sum((fields->>'value1')::bigint) FROM t4 GROUP BY time; + +--last returns NULL for tag +--SELECT last(time, value1),last(time, value2),last(time, tag1) FROM t4 GROUP BY tag1; + +--Testcase 60: +DROP FOREIGN TABLE t3; +--Testcase 61: +DROP FOREIGN TABLE t4; +--Testcase 62: +DROP FOREIGN TABLE cpu; +--Testcase 63: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 64: +DROP SERVER server1 CASCADE; +--Testcase 65: +DROP EXTENSION influxdb_fdw; diff --git a/sql/10.18/schemaless/extra/aggregates.sql b/sql/15.0/schemaless/extra/aggregates.sql similarity index 96% rename from sql/10.18/schemaless/extra/aggregates.sql rename to sql/15.0/schemaless/extra/aggregates.sql index 878f2cd..2136705 100644 --- a/sql/10.18/schemaless/extra/aggregates.sql +++ b/sql/15.0/schemaless/extra/aggregates.sql @@ -7,9 +7,9 @@ CREATE EXTENSION influxdb_fdw; --Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'coredb', :SERVER); --Testcase 3: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 4: CREATE FOREIGN TABLE onek (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); @@ -54,6 +54,17 @@ CREATE FOREIGN TABLE FLOAT8_TBL (fields jsonb OPTIONS(fields 'true')) SERVER inf -- AGGREGATES -- +-- directory paths are passed to us in environment variables +--\getenv abs_srcdir PG_ABS_SRCDIR +-- avoid bit-exact output here because operations may not be bit-exact. +--Testcase 19: +SET extra_float_digits = 0; + +--\set filename :abs_srcdir '/init/agg.txt' +--COPY aggtest_nsc FROM :'filename'; + +--ANALYZE aggtest_nsc; + -- avoid bit-exact output here because operations may not be bit-exact. --Testcase 19: SET extra_float_digits = 0; @@ -418,7 +429,8 @@ CREATE FOREIGN TABLE bitwise_test_empty (fields jsonb OPTIONS(fields 'true')) SE --Testcase 137: SELECT BIT_AND((fields->>'i2')::INT2) AS "?", - BIT_OR((fields->>'i4')::INT4) AS "?" + BIT_OR((fields->>'i4')::INT4) AS "?", + BIT_XOR((fields->>'i8')::INT8) AS "?" FROM bitwise_test_empty; --Testcase 138: @@ -438,7 +450,14 @@ SELECT BIT_OR((fields->>'i8')::INT8) AS "7", BIT_OR((fields->>'i')::INT) AS "?", BIT_OR((fields->>'x')::INT2) AS "7", - BIT_OR((fields->>'y')::BIT(4)) AS "1101" + BIT_OR((fields->>'y')::BIT(4)) AS "1101", + + BIT_XOR((fields->>'i2')::INT2) AS "5", + BIT_XOR((fields->>'i4')::INT4) AS "5", + BIT_XOR((fields->>'i8')::INT8) AS "5", + BIT_XOR((fields->>'i')::INT) AS "?", + BIT_XOR((fields->>'x')::INT2) AS "7", + BIT_XOR((fields->>'y')::BIT(4)) AS "1101" FROM bitwise_test; -- @@ -620,6 +639,7 @@ select max(100) from tenk1; -- try it on an inheritance tree --Testcase 178: create foreign table minmaxtest(fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 485: create foreign table minmaxtest_nsc(f1 int) server influxdb_svr OPTIONS (table 'minmaxtest'); --Testcase 179: create table minmaxtest1() inherits (minmaxtest); @@ -660,6 +680,7 @@ select distinct min((fields->>'f1')::int), max((fields->>'f1')::int) from minmax --Testcase 193: drop foreign table minmaxtest cascade; +--Testcase 486: drop foreign table minmaxtest_nsc cascade; -- check for correct detection of nested-aggregate errors --Testcase 194: @@ -1058,6 +1079,22 @@ select aggfns(distinct (fields->>'a')::int,(fields->>'b')::int,fields->>'c' orde generate_series(1,2) i; rollback; +-- check handling of bare boolean Var in FILTER +--Testcase 454: +select max(0) filter (where (fields->>'b1')::boolean) from bool_test; +--Testcase 455: +select (select max(0) filter (where (fields->>'b1')::boolean)) from bool_test; + +-- check for correct detection of nested-aggregate errors in FILTER +--Testcase 456: +select max((fields->>'unique1')::int) filter (where sum((fields->>'ten')::int) > 0) from tenk1; +--Testcase 457: +select (select max((fields->>'unique1')::int) filter (where sum((fields->>'ten')::int) > 0) from int8_tbl) from tenk1; +--Testcase 458: +select max((fields->>'unique1')::int) filter (where bool_or((fields->>'ten')::int > 0)) from tenk1; +--Testcase 459: +select (select max((fields->>'unique1')::int) filter (where bool_or((fields->>'ten')::int > 0)) from int8_tbl) from tenk1; + -- ordered-set aggregates begin; @@ -1630,17 +1667,21 @@ select v||'a', case when v||'a' = 'aa' then 1 else 0 end, count(*) -- does not lead to array overflow due to unexpected duplicate hash keys -- see CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com --Testcase 399: +set enable_memoize to off; +--Testcase 400: explain (costs off) select 1 from tenk1 where ((fields->>'hundred')::int, (fields->>'thousand')::int) in (select (fields->>'twothousand')::int, (fields->>'twothousand')::int from onek); +--Testcase 401: +reset enable_memoize; -- -- Hash Aggregation Spill tests -- ---Testcase 400: +--Testcase 402: set enable_sort=false; ---Testcase 401: +--Testcase 403: set work_mem='64kB'; --Testcase 404: @@ -1649,9 +1690,9 @@ group by fields->>'unique1' having sum((fields->>'fivethous')::int) > 4975 order by sum((fields->>'twothousand')::int); ---Testcase 403: +--Testcase 405: set work_mem to default; ---Testcase 404: +--Testcase 406: set enable_sort to default; -- @@ -1659,66 +1700,76 @@ set enable_sort to default; -- aggregation. Force spilling in both cases by setting work_mem low. -- ---Testcase 405: +--Testcase 407: set work_mem='64kB'; ---Testcase 406: -create foreign table agg_data_2k(fields jsonb OPTIONS(fields 'true')) server influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 408: +create foreign table agg_data_2k (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 489: create foreign table agg_data_2k_nsc (g int) server influxdb_svr OPTIONS (table 'agg_data_2k'); ---Testcase 407: -create foreign table agg_data_20k(fields jsonb OPTIONS(fields 'true')) server influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 409: +create foreign table agg_data_20k (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 490: create foreign table agg_data_20k_nsc (g int) server influxdb_svr OPTIONS (table 'agg_data_20k'); ---Testcase 408: +--Testcase 410: create foreign table agg_group_1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 491: create foreign table agg_group_1_nsc (c1 int, c2 numeric, c3 int) server influxdb_svr OPTIONS (table 'agg_group_1'); ---Testcase 409: +--Testcase 411: create foreign table agg_group_2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 492: create foreign table agg_group_2_nsc (a int, c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_group_2'); ---Testcase 410: +--Testcase 412: create foreign table agg_group_3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 493: create foreign table agg_group_3_nsc (c1 numeric, c2 int4, c3 int) server influxdb_svr OPTIONS (table 'agg_group_3'); ---Testcase 411: +--Testcase 413: create foreign table agg_group_4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 494: create foreign table agg_group_4_nsc (c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_group_4'); ---Testcase 412: +--Testcase 414: create foreign table agg_hash_1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 495: create foreign table agg_hash_1_nsc (c1 int, c2 numeric, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_1'); ---Testcase 413: +--Testcase 415: create foreign table agg_hash_2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 496: create foreign table agg_hash_2_nsc (a int, c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_2'); ---Testcase 414: +--Testcase 416: create foreign table agg_hash_3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 497: create foreign table agg_hash_3_nsc (c1 numeric, c2 int4, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_3'); ---Testcase 415: +--Testcase 417: create foreign table agg_hash_4 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 498: create foreign table agg_hash_4_nsc (c1 numeric, c2 text, c3 int) server influxdb_svr OPTIONS (table 'agg_hash_4'); ---Testcase 416: +--Testcase 418: insert into agg_data_2k_nsc select g from generate_series(0, 1999) g; --analyze agg_data_2k; ---Testcase 417: +--Testcase 419: insert into agg_data_20k_nsc select g from generate_series(0, 19999) g; --analyze agg_data_20k; -- Produce results with sorting. ---Testcase 418: +--Testcase 420: set enable_hashagg = false; ---Testcase 419: +--Testcase 421: set jit_above_cost = 0; ---Testcase 420: +--Testcase 422: explain (costs off) select (fields->>'g')::int%10000 as c1, sum((fields->>'g')::numeric) as c2, count(*) as c3 from agg_data_20k group by (fields->>'g')::int%10000; ---Testcase 421: +--Testcase 423: insert into agg_group_1_nsc select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 from agg_data_20k_nsc group by g%10000; ---Testcase 422: +--Testcase 424: insert into agg_group_2_nsc select * from (values (100), (300), (500)) as r(a), @@ -1730,40 +1781,40 @@ select * from where g < r.a group by g/2) as s; ---Testcase 423: +--Testcase 425: set jit_above_cost to default; ---Testcase 424: +--Testcase 426: insert into agg_group_3_nsc select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 from agg_data_2k_nsc group by g/2; ---Testcase 425: +--Testcase 427: insert into agg_group_4_nsc select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 from agg_data_2k_nsc group by g/2; -- Produce results with hash aggregation ---Testcase 426: +--Testcase 428: set enable_hashagg = true; ---Testcase 427: +--Testcase 429: set enable_sort = false; ---Testcase 428: +--Testcase 430: set jit_above_cost = 0; ---Testcase 429: +--Testcase 431: explain (costs off) select (fields->>'g')::int%10000 as c1, sum((fields->>'g')::numeric) as c2, count(*) as c3 from agg_data_20k group by (fields->>'g')::int%10000; ---Testcase 430: +--Testcase 432: insert into agg_hash_1_nsc select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 from agg_data_20k_nsc group by g%10000; ---Testcase 431: +--Testcase 433: insert into agg_hash_2_nsc select * from (values (100), (300), (500)) as r(a), @@ -1775,84 +1826,107 @@ select * from where g < r.a group by g/2) as s; ---Testcase 432: +--Testcase 434: set jit_above_cost to default; ---Testcase 433: +--Testcase 435: insert into agg_hash_3_nsc select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 from agg_data_2k_nsc group by g/2; ---Testcase 434: +--Testcase 436: insert into agg_hash_4_nsc select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 from agg_data_2k_nsc group by g/2; ---Testcase 435: +--Testcase 437: set enable_sort = true; ---Testcase 436: +--Testcase 438: set work_mem to default; -- Compare group aggregation results to hash aggregation results ---Testcase 437: +--Testcase 439: (select * from agg_hash_1 except select * from agg_group_1) union all (select * from agg_group_1 except select * from agg_hash_1); ---Testcase 438: +--Testcase 440: (select * from agg_hash_2 except select * from agg_group_2) union all (select * from agg_group_2 except select * from agg_hash_2); ---Testcase 439: +--Testcase 441: (select * from agg_hash_3 except select * from agg_group_3) union all (select * from agg_group_3 except select * from agg_hash_3); ---Testcase 440: +--Testcase 442: (select * from agg_hash_4 except select * from agg_group_4) union all (select * from agg_group_4 except select * from agg_hash_4); ---Testcase 441: +--Testcase 443: -- Clean up: +--Testcase 499: delete from agg_data_2k_nsc; +--Testcase 500: delete from agg_data_20k_nsc; +--Testcase 501: delete from agg_group_1_nsc; +--Testcase 502: delete from agg_group_2_nsc; +--Testcase 503: delete from agg_group_3_nsc; +--Testcase 504: delete from agg_group_4_nsc; +--Testcase 505: delete from agg_hash_1_nsc; +--Testcase 506: delete from agg_hash_2_nsc; +--Testcase 507: delete from agg_hash_3_nsc; +--Testcase 508: delete from agg_hash_4_nsc; +--Testcase 509: drop foreign table agg_data_2k; +--Testcase 510: drop foreign table agg_data_2k_nsc; +--Testcase 511: drop foreign table agg_data_20k; +--Testcase 512: drop foreign table agg_data_20k_nsc; +--Testcase 513: drop foreign table agg_group_1; +--Testcase 514: drop foreign table agg_group_1_nsc; ---Testcase 442: +--Testcase 444: drop foreign table agg_group_2; +--Testcase 515: drop foreign table agg_group_2_nsc; ---Testcase 443: +--Testcase 445: drop foreign table agg_group_3; +--Testcase 516: drop foreign table agg_group_3_nsc; ---Testcase 444: +--Testcase 446: drop foreign table agg_group_4; +--Testcase 517: drop foreign table agg_group_4_nsc; ---Testcase 445: +--Testcase 447: drop foreign table agg_hash_1; +--Testcase 518: drop foreign table agg_hash_1_nsc; ---Testcase 446: +--Testcase 448: drop foreign table agg_hash_2; +--Testcase 519: drop foreign table agg_hash_2_nsc; ---Testcase 447: +--Testcase 449: drop foreign table agg_hash_3; +--Testcase 520: drop foreign table agg_hash_3_nsc; ---Testcase 448: +--Testcase 450: drop foreign table agg_hash_4; +--Testcase 521: drop foreign table agg_hash_4_nsc; -- Clean up DO $d$ @@ -1867,29 +1941,45 @@ end; $d$; -- Clean up: +--Testcase 522: DROP AGGREGATE IF EXISTS newavg (int4); +--Testcase 523: DROP AGGREGATE IF EXISTS newsum (int4); +--Testcase 524: DROP AGGREGATE IF EXISTS newcnt (*); +--Testcase 525: DROP AGGREGATE IF EXISTS oldcnt (*); +--Testcase 526: DROP AGGREGATE IF EXISTS newcnt ("any"); +--Testcase 527: DROP AGGREGATE IF EXISTS sum2(int8,int8); +--Testcase 528: DROP FUNCTION IF EXISTS sum3(int8,int8,int8); +--Testcase 529: DROP AGGREGATE IF EXISTS aggfns(integer,integer,text); +--Testcase 530: DROP AGGREGATE IF EXISTS aggfstr(integer,integer,text); +--Testcase 531: DROP FUNCTION IF EXISTS aggfns_trans(aggtype[],integer,integer,text); +--Testcase 532: DROP FUNCTION IF EXISTS aggf_trans(aggtype[],integer,integer,text); +--Testcase 533: DROP TYPE IF EXISTS aggtype; +--Testcase 534: DROP AGGREGATE IF EXISTS test_percentile_disc(float8 ORDER BY anyelement); +--Testcase 535: DROP AGGREGATE IF EXISTS test_rank(VARIADIC "any" ORDER BY VARIADIC "any"); +--Testcase 536: DROP AGGREGATE IF EXISTS cleast_agg(variadic items anycompatiblearray); +--Testcase 537: DROP FUNCTION IF EXISTS cleast_accum(anycompatible, variadic anycompatiblearray); ---Testcase 449: +--Testcase 451: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 450: +--Testcase 452: DROP SERVER influxdb_svr CASCADE; ---Testcase 451: +--Testcase 453: DROP EXTENSION influxdb_fdw; diff --git a/sql/13.4/schemaless/extra/influxdb_fdw_post.sql b/sql/15.0/schemaless/extra/influxdb_fdw_post.sql similarity index 77% rename from sql/13.4/schemaless/extra/influxdb_fdw_post.sql rename to sql/15.0/schemaless/extra/influxdb_fdw_post.sql index 5fe6fa8..8b9de2e 100644 --- a/sql/13.4/schemaless/extra/influxdb_fdw_post.sql +++ b/sql/15.0/schemaless/extra/influxdb_fdw_post.sql @@ -12,17 +12,17 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER influxdb_fdw; --Testcase 3: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 4: CREATE SERVER influxdb_svr2 FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'postdb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); + OPTIONS (dbname 'postdb', :SERVER); --Testcase 5: CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); --Testcase 6: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); --Testcase 7: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2 OPTIONS (:AUTHENTICATION); -- =================================================================== -- create objects used through FDW influxdb server @@ -33,6 +33,7 @@ CREATE TYPE user_enum AS ENUM ('foo', 'bar', 'buz'); CREATE SCHEMA "S 1"; --Testcase 10: CREATE FOREIGN TABLE "S 1"."T 0" (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T0', tags 'c3', schemaless 'true'); +--Testcase 783: CREATE FOREIGN TABLE "S 1".s1t0 ( "C 1" int NOT NULL, c2 int NOT NULL, @@ -44,6 +45,7 @@ CREATE FOREIGN TABLE "S 1".s1t0 ( ) SERVER influxdb_svr OPTIONS (table 'T0', tags 'c3'); --Testcase 11: CREATE FOREIGN TABLE "S 1"."T 1" (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T1', tags 'c3', schemaless 'true'); +--Testcase 784: CREATE FOREIGN TABLE "S 1".s1t1 ( "C 1" int NOT NULL, c2 int NOT NULL, @@ -55,12 +57,14 @@ CREATE FOREIGN TABLE "S 1".s1t1 ( ) SERVER influxdb_svr OPTIONS (table 'T1', tags 'c3'); --Testcase 12: CREATE FOREIGN TABLE "S 1"."T 2" (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T2', tags 'c2', schemaless 'true'); +--Testcase 785: CREATE FOREIGN TABLE "S 1".s1t2 ( c1 int NOT NULL, c2 text ) SERVER influxdb_svr OPTIONS (table 'T2', tags 'c2'); --Testcase 13: CREATE FOREIGN TABLE "S 1"."T 3" (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3', schemaless 'true'); +--Testcase 786: CREATE FOREIGN TABLE "S 1".s1t3 ( c1 int NOT NULL, c2 int NOT NULL, @@ -68,6 +72,7 @@ CREATE FOREIGN TABLE "S 1".s1t3 ( ) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); --Testcase 14: CREATE FOREIGN TABLE "S 1"."T 4" (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3', schemaless 'true'); +--Testcase 787: CREATE FOREIGN TABLE "S 1".s1t4 ( c1 int NOT NULL, c2 int NOT NULL, @@ -122,6 +127,7 @@ DELETE FROM "S 1".s1t4 WHERE c1 % 3 != 0; -- delete for outer join tests -- =================================================================== --Testcase 21: CREATE FOREIGN TABLE ft1 (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 788: CREATE FOREIGN TABLE ft1_nsc ( c0 int, c1 int NOT NULL, @@ -132,9 +138,12 @@ CREATE FOREIGN TABLE ft1_nsc ( c7 char(10) default 'ft1', c8 text ) SERVER influxdb_svr; -ALTER FOREIGN TABLE ft1_nsc DROP COLUMN c0; --Testcase 22: +ALTER FOREIGN TABLE ft1_nsc DROP COLUMN c0; + +--Testcase 23: CREATE FOREIGN TABLE ft2 (time timestamp, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 789: CREATE FOREIGN TABLE ft2_nsc ( c1 int NOT NULL, c2 int NOT NULL, @@ -145,28 +154,33 @@ CREATE FOREIGN TABLE ft2_nsc ( c7 char(10) default 'ft2', c8 text ) SERVER influxdb_svr; +--Testcase 24: ALTER FOREIGN TABLE ft2_nsc DROP COLUMN cx; ---Testcase 23: + +--Testcase 25: CREATE FOREIGN TABLE ft4 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3', schemaless 'true'); +--Testcase 790: CREATE FOREIGN TABLE ft4_nsc ( c1 int NOT NULL, c2 int NOT NULL, c3 text ) SERVER influxdb_svr OPTIONS (table 'T3', tags 'c3'); ---Testcase 24: +--Testcase 26: CREATE FOREIGN TABLE ft5 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3', schemaless 'true'); +--Testcase 791: CREATE FOREIGN TABLE ft5_nsc ( c1 int NOT NULL, c2 int NOT NULL, c3 text ) SERVER influxdb_svr OPTIONS (table 'T4', tags 'c3'); ---Testcase 25: +--Testcase 27: CREATE FOREIGN TABLE ft6 (tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr2 OPTIONS (table 'T4', tags 'c3', schemaless 'true'); -- =================================================================== -- tests for validator -- =================================================================== -- requiressl and some other parameters are omitted because -- valid values for them depend on configure options +--Testcase 28: ALTER SERVER testserver1 OPTIONS ( -- use_remote_estimate 'false', -- updatable 'true', @@ -206,6 +220,7 @@ ALTER SERVER testserver1 OPTIONS ( --ALTER SERVER testserver1 OPTIONS (ADD extensions 'foo, bar'); --ALTER SERVER testserver1 OPTIONS (DROP extensions); +--Testcase 29: ALTER USER MAPPING FOR public SERVER testserver1 OPTIONS (DROP user, DROP password); @@ -222,22 +237,27 @@ ALTER USER MAPPING FOR public SERVER testserver1 --ALTER USER MAPPING FOR public SERVER testserver1 -- OPTIONS (ADD sslkey 'value', ADD sslcert 'value'); +--Testcase 30: ALTER FOREIGN TABLE ft1 OPTIONS (table 'T1', tags 'c3'); ALTER FOREIGN TABLE ft1_nsc OPTIONS (table 'T1', tags 'c3'); +--Testcase 31: ALTER FOREIGN TABLE ft2 OPTIONS (table 'T1', tags 'c3'); ALTER FOREIGN TABLE ft2_nsc OPTIONS (table 'T1', tags 'c3'); +--Testcase 32: ALTER FOREIGN TABLE ft1_nsc ALTER COLUMN c1 OPTIONS (column_name 'C 1'); +--Testcase 33: ALTER FOREIGN TABLE ft2_nsc ALTER COLUMN c1 OPTIONS (column_name 'C 1'); ---Testcase 26: +--Testcase 34: \det+ -- Test that alteration of server options causes reconnection -- Remote's errors might be non-English, so hide them to ensure stable results \set VERBOSITY terse ---Testcase 27: +--Testcase 35: SELECT tags->>'c3' c3, time FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int LIMIT 1; -- should work +--Testcase 36: ALTER SERVER influxdb_svr OPTIONS (SET dbname 'no such database'); ---Testcase 28: +--Testcase 37: SELECT tags->>'c3' c3, time FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int LIMIT 1; -- should fail DO $d$ BEGIN @@ -245,164 +265,192 @@ DO $d$ OPTIONS (SET dbname 'postdb')$$; END; $d$; ---Testcase 29: +--Testcase 38: SELECT tags->>'c3' c3, time FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int LIMIT 1; -- should work again \set VERBOSITY default +-- =================================================================== +-- test error case for create publication on foreign table +-- =================================================================== +--Testcase 765: +CREATE PUBLICATION testpub_ftbl FOR TABLE ft1; -- should fail + -- =================================================================== -- simple queries -- =================================================================== -- single table without alias ---Testcase 30: +--Testcase 39: EXPLAIN (COSTS OFF) SELECT * FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int OFFSET 100 LIMIT 10; ---Testcase 31: +--Testcase 40: SELECT * FROM ft1 ORDER BY tags->>'c3', (fields->>'C 1')::int OFFSET 100 LIMIT 10; -- single table with alias - also test that tableoid sort is not pushed to remote side ---Testcase 32: +--Testcase 41: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int, t1.tableoid OFFSET 100 LIMIT 10; ---Testcase 33: +--Testcase 42: SELECT * FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int, t1.tableoid OFFSET 100 LIMIT 10; -- whole-row reference ---Testcase 34: +--Testcase 43: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1 FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; ---Testcase 35: +--Testcase 44: SELECT t1 FROM ft1 t1 ORDER BY t1.tags->>'c3', (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; -- empty result ---Testcase 36: +--Testcase 45: SELECT * FROM ft1 WHERE false; -- with WHERE clause ---Testcase 37: +--Testcase 46: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 101 AND t1.fields->>'c6' = '1' AND t1.fields->>'c7' >= '1'; ---Testcase 38: +--Testcase 47: SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 101 AND t1.fields->>'c6' = '1' AND t1.fields->>'c7' >= '1'; -- with FOR UPDATE/SHARE ---Testcase 39: +--Testcase 48: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 101 FOR UPDATE; ---Testcase 40: +--Testcase 49: SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 101 FOR UPDATE; ---Testcase 41: +--Testcase 50: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 102 FOR SHARE; ---Testcase 42: +--Testcase 51: SELECT * FROM ft1 t1 WHERE (fields->>'C 1')::int = 102 FOR SHARE; -- aggregate ---Testcase 43: +--Testcase 52: SELECT COUNT(*) FROM ft1 t1; -- subquery ---Testcase 44: +--Testcase 53: SELECT * FROM ft1 t1 WHERE t1.tags->>'c3' IN (SELECT tags->>'c3' FROM ft2 t2 WHERE (fields->>'C 1')::int <= 10) ORDER BY (fields->>'C 1')::int; -- subquery+MAX ---Testcase 45: +--Testcase 54: SELECT * FROM ft1 t1 WHERE t1.tags->>'c3' = (SELECT MAX(tags->>'c3') FROM ft2 t2) ORDER BY (fields->>'C 1')::int; -- used in CTE ---Testcase 46: +--Testcase 55: WITH t1 AS (SELECT * FROM ft1 WHERE (fields->>'C 1')::int <= 10) SELECT (t2.fields->>'C 1')::int c1, (t2.fields->>'c2')::int c2, t2.tags->>'c3' c3, t2.time FROM t1, ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'C 1')::int ORDER BY (t1.fields->>'C 1')::int; -- fixed values ---Testcase 47: +--Testcase 56: SELECT 'fixed', NULL FROM ft1 t1 WHERE (fields->>'C 1')::int = 1; -- Test forcing the remote server to produce sorted data for a merge join. +--Testcase 57: SET enable_hashjoin TO false; +--Testcase 58: SET enable_nestloop TO false; -- inner join; expressions in the clauses appear in the equivalence class list ---Testcase 48: +--Testcase 59: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; ---Testcase 49: +--Testcase 60: SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; -- outer join; expressions in the clauses do not appear in equivalence class -- list but no output change as compared to the previous query ---Testcase 50: +--Testcase 61: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; ---Testcase 51: +--Testcase 62: SELECT t1.c1, t2."C 1" FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t2) t2 ON ((t1.c1)::int = (t2."C 1")::int) OFFSET 100 LIMIT 10; -- A join between 2 foreign tables. ORDER BY clause is added to the -- foreign join so that the other table can be joined using merge join strategy. ---Testcase 52: +--Testcase 63: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; ---Testcase 53: +--Testcase 64: SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; -- Test similar to above, except that the full join prevents any equivalence -- classes from being merged. This produces single relation equivalence classes -- included in join restrictions. ---Testcase 54: +--Testcase 65: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; ---Testcase 55: +--Testcase 66: SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 left join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; -- Test similar to above with all full outer joins ---Testcase 56: +--Testcase 67: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; ---Testcase 57: +--Testcase 68: SELECT t1."C 1", t2.c1, t3.c1 FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 full join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t3) t3 on ((t2.c1)::int = (t3.c1)::int) on ((t3.c1)::int = (t1."C 1")::int) OFFSET 100 LIMIT 10; +--Testcase 69: RESET enable_hashjoin; +--Testcase 70: RESET enable_nestloop; +-- Test executing assertion in estimate_path_cost_size() that makes sure that +-- retrieved_rows for foreign rel re-used to cost pre-sorted foreign paths is +-- a sensible value even when the rel has tuples=0 +--Testcase 71: +CREATE FOREIGN TABLE loct_empty (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 792: +CREATE FOREIGN TABLE loct_empty_nsc (c1 int NOT NULL, c2 text) SERVER influxdb_svr OPTIONS (table 'loct_empty'); +--Testcase 72: +CREATE FOREIGN TABLE ft_empty (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct_empty', schemaless 'true'); +--Testcase 73: +INSERT INTO loct_empty_nsc + SELECT id, 'AAA' || to_char(id, 'FM000') FROM generate_series(1, 100) id; +--Testcase 74: +DELETE FROM loct_empty_nsc; +--Testcase 793: +DROP FOREIGN TABLE loct_empty_nsc; +--ANALYZE ft_empty; +--Testcase 75: +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft_empty ORDER BY (fields->>'c1')::int; + -- =================================================================== -- WHERE with remotely-executable conditions -- =================================================================== ---Testcase 58: +--Testcase 76: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 1; -- Var, OpExpr(b), Const ---Testcase 59: +--Testcase 77: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = 100 AND (t1.fields->>'c2')::int = 0; -- BoolExpr ---Testcase 60: +--Testcase 78: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int IS NULL; -- NullTest ---Testcase 61: +--Testcase 79: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int IS NOT NULL; -- NullTest ---Testcase 62: +--Testcase 80: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE round(abs((t1.fields->>'C 1')::int), 0) = 1; -- FuncExpr ---Testcase 63: +--Testcase 81: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = -(t1.fields->>'C 1')::int; -- OpExpr(l) ---Testcase 64: -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE 1 = (t1.fields->>'C 1')::int!; -- OpExpr(r) ---Testcase 65: +--Testcase 82: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE ((t1.fields->>'C 1')::int IS NOT NULL) IS DISTINCT FROM ((t1.fields->>'C 1')::int IS NOT NULL); -- DistinctExpr ---Testcase 66: +--Testcase 83: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = ANY(ARRAY[(fields->>'c2')::int, 1, (t1.fields->>'C 1')::int + 0]); -- ScalarArrayOpExpr ---Testcase 67: +--Testcase 84: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (ARRAY[(t1.fields->>'C 1')::int,(fields->>'c2')::int,3])[1]; -- SubscriptingRef ---Testcase 68: +--Testcase 85: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE fields->>'c6' = E'foo''s\\bar'; -- check special chars ---Testcase 69: +--Testcase 86: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE fields->>'c8' = 'foo'; -- can't be sent to remote -- parameterized remote path for foreign table ---Testcase 70: +--Testcase 87: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM "S 1"."T 1" a, ft2 b WHERE (a.fields->>'C 1')::int = 47 AND (b.fields->>'C 1')::int = (a.fields->>'c2')::int; ---Testcase 71: +--Testcase 88: SELECT * FROM ft2 a, ft2 b WHERE (a.fields->>'C 1')::int = 47 AND (b.fields->>'C 1')::int = (a.fields->>'c2')::int; -- check both safe and unsafe join conditions ---Testcase 72: +--Testcase 89: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft2 a, ft2 b WHERE (a.fields->>'c2')::int = 6 AND (b.fields->>'C 1')::int = (a.fields->>'C 1')::int AND a.fields->>'c8' = 'foo' AND b.fields->>'c7' = upper(a.fields->>'c7'); ---Testcase 73: +--Testcase 90: SELECT * FROM ft2 a, ft2 b WHERE (a.fields->>'c2')::int = 6 AND (b.fields->>'C 1')::int = (a.fields->>'C 1')::int AND a.fields->>'c8' = 'foo' AND b.fields->>'c7' = upper(a.fields->>'c7') ORDER BY (a.fields->>'C 1')::int; -- bug before 9.3.5 due to sloppy handling of remote-estimate parameters ---Testcase 74: +--Testcase 91: SELECT * FROM ft1 WHERE (fields->>'C 1')::int = ANY (ARRAY(SELECT (fields->>'C 1')::int FROM ft2 WHERE (fields->>'C 1')::int < 5)); ---Testcase 75: +--Testcase 92: SELECT * FROM ft2 WHERE (fields->>'C 1')::int = ANY (ARRAY(SELECT (fields->>'C 1')::int FROM ft1 WHERE (fields->>'C 1')::int < 5)); -- we should not push order by clause with volatile expressions or unsafe -- collations ---Testcase 76: +--Testcase 93: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft2 ORDER BY (ft2.fields->>'C 1')::int, random(); ---Testcase 77: +--Testcase 94: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft2 ORDER BY (ft2.fields->>'C 1')::int, ft2.tags->>'c3' collate "C"; -- user-defined operator/function ---Testcase 78: +--Testcase 95: CREATE FUNCTION influxdb_fdw_abs(int) RETURNS int AS $$ BEGIN RETURN abs($1); END $$ LANGUAGE plpgsql IMMUTABLE; ---Testcase 79: +--Testcase 96: CREATE OPERATOR === ( LEFTARG = int, RIGHTARG = int, @@ -411,210 +459,268 @@ CREATE OPERATOR === ( ); -- built-in operators and functions can be shipped for remote execution ---Testcase 80: +--Testcase 97: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = abs((t1.fields->>'c2')::int); ---Testcase 81: +--Testcase 98: SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = abs((t1.fields->>'c2')::int); ---Testcase 82: +--Testcase 99: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (t1.fields->>'c2')::int; ---Testcase 83: +--Testcase 100: SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (t1.fields->>'c2')::int; -- by default, user-defined ones cannot ---Testcase 84: +--Testcase 101: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); ---Testcase 85: +--Testcase 102: SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); ---Testcase 86: +--Testcase 103: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; ---Testcase 87: +--Testcase 104: SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; -- ORDER BY can be shipped, though ---Testcase 88: +--Testcase 105: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; ---Testcase 89: +--Testcase 106: SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; -- but let's put them in an extension ... +--Testcase 107: ALTER EXTENSION influxdb_fdw ADD FUNCTION influxdb_fdw_abs(int); +--Testcase 108: ALTER EXTENSION influxdb_fdw ADD OPERATOR === (int, int); -- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); -- ... now they can be shipped ---Testcase 90: +--Testcase 109: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); ---Testcase 91: +--Testcase 110: SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = influxdb_fdw_abs((t1.fields->>'c2')::int); ---Testcase 92: +--Testcase 111: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; ---Testcase 93: +--Testcase 112: SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; -- and both ORDER BY and LIMIT can be shipped ---Testcase 94: +--Testcase 113: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; ---Testcase 95: +--Testcase 114: SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int order by (t1.fields->>'c2')::int limit 1; +-- Test CASE pushdown +--Testcase 854: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT fields->>'C 1',fields->>'c2',tags->>'c3' FROM ft2 WHERE CASE WHEN (fields->>'C 1')::int > 990 THEN (fields->>'C 1')::int END < 1000 ORDER BY (fields->>'C 1')::int; +--Testcase 855: +SELECT fields->>'C 1',fields->>'c2',tags->>'c3' FROM ft2 WHERE CASE WHEN (fields->>'C 1')::int > 990 THEN (fields->>'C 1')::int END < 1000 ORDER BY (fields->>'C 1')::int; + +-- Nested CASE +--Testcase 856: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT fields->>'C 1',fields->>'c2',tags->>'c3' FROM ft2 WHERE CASE CASE WHEN (fields->>'c2')::int > 0 THEN (fields->>'c2')::int END WHEN 100 THEN 601 WHEN (fields->>'c2')::int THEN (fields->>'c2')::int ELSE 0 END > 600 ORDER BY (fields->>'C 1')::int; +--Testcase 857: +SELECT fields->>'C 1',fields->>'c2',tags->>'c3' FROM ft2 WHERE CASE CASE WHEN (fields->>'c2')::int > 0 THEN (fields->>'c2')::int END WHEN 100 THEN 601 WHEN (fields->>'c2')::int THEN (fields->>'c2')::int ELSE 0 END > 600 ORDER BY (fields->>'C 1')::int; + +-- CASE arg WHEN +--Testcase 858: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE (fields->>'C 1')::int > (CASE mod((fields->>'C 1')::int, 4) WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END); + +-- CASE cannot be pushed down because of unshippable arg clause +--Testcase 859: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE (fields->>'C 1')::int > (CASE random()::integer WHEN 0 THEN 1 WHEN 2 THEN 50 ELSE 100 END); + +-- these are shippable +--Testcase 860: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE (fields->>'c6')::text WHEN 'foo' THEN true ELSE (tags->>'c3')::text < 'bar' END; +--Testcase 861: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE (tags->>'c3')::text WHEN (fields->>'c6')::text THEN true ELSE (tags->>'c3')::text < 'bar' END; + +-- but this is not because of collation +--Testcase 862: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE CASE (tags->>'c3')::text COLLATE "C" WHEN (fields->>'c6')::text THEN true ELSE (tags->>'c3')::text < 'bar' END; + +-- This test case drop configuration when execute non-schemaless before +--Testcase 863: +DROP TEXT SEARCH CONFIGURATION IF EXISTS public.custom_search; +-- check schema-qualification of regconfig constant +--Testcase 864: +CREATE TEXT SEARCH CONFIGURATION public.custom_search + (COPY = pg_catalog.english); +--Testcase 865: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; +--Testcase 866: +SELECT (fields->>'C 1')::int c1, to_tsvector('custom_search'::regconfig, tags->>'c3') FROM ft1 +WHERE (fields->>'C 1')::int = 642 AND length(to_tsvector('custom_search'::regconfig, tags->>'c3')) > 0; + -- =================================================================== -- JOIN queries -- =================================================================== -- join two tables ---Testcase 96: +--Testcase 115: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; ---Testcase 97: +--Testcase 116: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; -- join three tables ---Testcase 98: +--Testcase 117: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t3.c1)::int = (t1.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 10 LIMIT 10; ---Testcase 99: +--Testcase 118: SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t3.c1)::int = (t1.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 10 LIMIT 10; -- left outer join ---Testcase 100: +--Testcase 119: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; ---Testcase 101: +--Testcase 120: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- left outer join three tables ---Testcase 102: +--Testcase 121: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; ---Testcase 103: +--Testcase 122: SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; -- left outer join + placement of clauses. -- clauses within the nullable side are not pulled up, but top level clause on -- non-nullable side is pushed into non-nullable side ---Testcase 104: +--Testcase 123: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) WHERE (t1.c1)::int < 10; ---Testcase 105: +--Testcase 124: SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) WHERE (t1.c1)::int < 10; -- clauses within the nullable side are not pulled up, but the top level clause -- on nullable side is not pushed down into nullable side ---Testcase 106: +--Testcase 125: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) WHERE ((t2.fields->>'c1')::int < 10 OR (t2.fields->>'c1')::int IS NULL) AND (t1.c1)::int < 10; ---Testcase 107: +--Testcase 126: SELECT t1.c1, t1.c2, (t2.fields->>'c1')::int c1, (t2.fields->>'c2')::int c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 LEFT JOIN (SELECT * FROM ft5 t2 WHERE (fields->>'c1')::int < 10) t2 ON ((t1.c1)::int = (t2.fields->>'c1')::int) WHERE ((t2.fields->>'c1')::int < 10 OR (t2.fields->>'c1')::int IS NULL) AND (t1.c1)::int < 10; -- right outer join ---Testcase 108: +--Testcase 127: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t2.c1)::int, (t1.c1)::int OFFSET 10 LIMIT 10; ---Testcase 109: +--Testcase 128: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t2.c1)::int, (t1.c1)::int OFFSET 10 LIMIT 10; -- right outer join three tables ---Testcase 110: +--Testcase 129: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; ---Testcase 111: +--Testcase 130: SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; -- full outer join ---Testcase 112: +--Testcase 131: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 45 LIMIT 10; ---Testcase 113: +--Testcase 132: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 45 LIMIT 10; -- full outer join with restrictions on the joining relations -- a. the joining relations are both base relations ---Testcase 114: +--Testcase 133: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int; ---Testcase 115: +--Testcase 134: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int; ---Testcase 116: +--Testcase 135: EXPLAIN (VERBOSE, COSTS OFF) SELECT 1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; ---Testcase 117: +--Testcase 136: SELECT 1 FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 ON (TRUE) OFFSET 10 LIMIT 10; -- b. one of the joining relations is a base relation and the other is a join -- relation ---Testcase 118: +--Testcase 137: EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 LEFT JOIN (SELECT fields->>'c1' c1, fields->>'c2' c2, tags->>'c3' c3 FROM ft5) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE ((t2.c1)::int between 50 and 60)) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; ---Testcase 119: -SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 LEFT JOIN (SELECT fields->>'c1' c1, fields->>'c2' c2, tags->>'c3' c3 FROM ft5) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE ((t2.c1)::int between 50 and 60)) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; +SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 LEFT JOIN (SELECT (fields->>'c1')::int c1, fields->>'c2' c2, tags->>'c3' c3 FROM ft5 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE ((t2.c1)::int between 50 and 60)) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; +--Testcase 138: +SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t2) t2 LEFT JOIN (SELECT (fields->>'c1')::int c1, fields->>'c2' c2, tags->>'c3' c3 FROM ft5 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE ((t2.c1)::int between 50 and 60)) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; -- c. test deparsing the remote query as nested subqueries ---Testcase 120: +--Testcase 139: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; ---Testcase 121: +--Testcase 140: SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 FULL JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON ((t1.c1)::int = ss.a) ORDER BY (t1.c1)::int, ss.a, ss.b; -- d. test deparsing rowmarked relations as subqueries ---Testcase 122: +--Testcase 141: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM "S 1"."T 3" t1 WHERE (fields->>'c1')::int = 50) t1 INNER JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY (t1.c1)::int, ss.a, ss.b FOR UPDATE OF t1; ---Testcase 123: +--Testcase 142: SELECT t1.c1, ss.a, ss.b FROM (SELECT (fields->>'c1')::int c1 FROM "S 1"."T 3" t1 WHERE (fields->>'c1')::int = 50) t1 INNER JOIN (SELECT (t2.c1)::int, (t3.c1)::int FROM (SELECT (fields->>'c1')::int c1 FROM ft4 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 FULL JOIN (SELECT (fields->>'c1')::int c1 FROM ft5 t3 WHERE (fields->>'c1')::int between 50 and 60) t3 ON ((t2.c1)::int = (t3.c1)::int) WHERE (t2.c1)::int IS NULL OR (t2.c1)::int IS NOT NULL) ss(a, b) ON (TRUE) ORDER BY (t1.c1)::int, ss.a, ss.b FOR UPDATE OF t1; -- full outer join + inner join ---Testcase 124: +--Testcase 143: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1, t3.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 INNER JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int + 1 and (t1.c1)::int between 50 and 60) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int, (t3.c1)::int LIMIT 10; ---Testcase 125: +--Testcase 144: SELECT t1.c1, t2.c1, t3.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 INNER JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int + 1 and (t1.c1)::int between 50 and 60) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int, (t3.c1)::int LIMIT 10; -- full outer join three tables ---Testcase 126: +--Testcase 145: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; ---Testcase 127: +--Testcase 146: SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; -- full outer join + right outer join ---Testcase 128: +--Testcase 147: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; ---Testcase 129: +--Testcase 148: SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; -- right outer join + full outer join ---Testcase 130: +--Testcase 149: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; ---Testcase 131: +--Testcase 150: SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; -- full outer join + left outer join ---Testcase 132: +--Testcase 151: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; ---Testcase 133: +--Testcase 152: SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; -- left outer join + full outer join ---Testcase 134: +--Testcase 153: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; ---Testcase 135: +--Testcase 154: SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; +--Testcase 155: +SET enable_memoize TO off; -- right outer join + left outer join ---Testcase 136: +--Testcase 156: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; ---Testcase 137: +--Testcase 157: SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 RIGHT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; +--Testcase 158: +RESET enable_memoize; -- left outer join + right outer join ---Testcase 138: +--Testcase 159: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) OFFSET 10 LIMIT 10; ---Testcase 139: +--Testcase 160: SELECT t1.c1, t2.c2, t3.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) RIGHT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t3) t3 ON ((t2.c1)::int = (t3.c1)::int) ORDER BY (t1.c1)::int OFFSET 10 LIMIT 10; -- full outer join + WHERE clause, only matched rows ---Testcase 140: +--Testcase 161: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE ((t1.c1)::int = (t2.c1)::int OR (t1.c1)::int IS NULL) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; ---Testcase 141: +--Testcase 162: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 FULL JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE ((t1.c1)::int = (t2.c1)::int OR (t1.c1)::int IS NULL) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- full outer join + WHERE clause with shippable extensions set ---Testcase 142: +--Testcase 163: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2, t1.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 FULL JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE influxdb_fdw_abs((t1.c1)::int) > 0 OFFSET 10 LIMIT 10; -- skip, influxdb does not have option 'extensions' @@ -625,187 +731,213 @@ SELECT t1.c1, t2.c2, t1.c3 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2' -- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); -- join two tables with FOR UPDATE clause -- tests whole-row reference for row marks ---Testcase 143: +--Testcase 164: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE OF t1; ---Testcase 144: +--Testcase 165: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE OF t1; ---Testcase 145: +--Testcase 166: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE; ---Testcase 146: +--Testcase 167: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR UPDATE; -- join two tables with FOR SHARE clause ---Testcase 147: +--Testcase 168: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE OF t1; ---Testcase 148: +--Testcase 169: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE OF t1; ---Testcase 149: +--Testcase 170: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE; ---Testcase 150: +--Testcase 171: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10 FOR SHARE; -- join in CTE ---Testcase 151: +--Testcase 172: EXPLAIN (VERBOSE, COSTS OFF) WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; ---Testcase 152: +--Testcase 173: WITH t (c1_1, c1_3, c2_1) AS MATERIALIZED (SELECT t1.c1, t1.c3, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) SELECT c1_1, c2_1 FROM t ORDER BY c1_3, c1_1 OFFSET 100 LIMIT 10; -- ctid with whole-row reference ---Testcase 153: +--Testcase 174: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.ctid, t1, t2, t1.c1 FROM (SELECT ctid, fields->>'C 1' c1, fields->>'c2' c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; -- SEMI JOIN, not pushed down ---Testcase 154: +--Testcase 175: EXPLAIN (VERBOSE, COSTS OFF) SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'C 1')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; ---Testcase 155: +--Testcase 176: SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'C 1')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; -- ANTI JOIN, not pushed down ---Testcase 156: +--Testcase 177: EXPLAIN (VERBOSE, COSTS OFF) SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'c2')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; ---Testcase 157: +--Testcase 178: SELECT (t1.fields->>'C 1')::int c1 FROM ft1 t1 WHERE NOT EXISTS (SELECT 1 FROM ft2 t2 WHERE (t1.fields->>'C 1')::int = (t2.fields->>'c2')::int) ORDER BY (t1.fields->>'C 1')::int OFFSET 100 LIMIT 10; -- CROSS JOIN can be pushed down ---Testcase 158: +--Testcase 179: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 CROSS JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; ---Testcase 159: +--Testcase 180: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 CROSS JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; -- different server, not pushed down. No result expected. ---Testcase 160: +--Testcase 181: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft6 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; ---Testcase 161: +--Testcase 182: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t1) t1 JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft6 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; -- unsafe join conditions (c8 has a UDT), not pushed down. Practically a CROSS -- JOIN since c8 in both tables has same value. ---Testcase 162: +--Testcase 183: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON (t1.c8 = t2.c8) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; ---Testcase 163: +--Testcase 184: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON (t1.c8 = t2.c8) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 100 LIMIT 10; -- unsafe conditions on one side (c8 has a UDT), not pushed down. ---Testcase 164: +--Testcase 185: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = 'foo' ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; ---Testcase 165: +--Testcase 186: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 LEFT JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = 'foo' ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; -- join where unsafe to pushdown condition in WHERE clause has a column not -- in the SELECT clause. In this test unsafe clause needs to have column -- references from both joining sides so that the clause is not pushed down -- into one of the joining sides. ---Testcase 166: +--Testcase 187: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; ---Testcase 167: +--Testcase 188: SELECT t1.c1, t2.c1 FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) WHERE t1.c8 = t2.c8 ORDER BY t1.c3, (t1.c1)::int OFFSET 100 LIMIT 10; -- Aggregate after UNION, for testing setrefs ---Testcase 168: +--Testcase 189: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) UNION SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; ---Testcase 169: +--Testcase 190: SELECT t1c1, avg(t1c1 + t2c1) FROM (SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) UNION SELECT (t1.c1)::int, (t2.c1)::int FROM (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 JOIN (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 ON ((t1.c1)::int = (t2.c1)::int)) AS t (t1c1, t2c1) GROUP BY t1c1 ORDER BY t1c1 OFFSET 100 LIMIT 10; -- join with lateral reference ---Testcase 170: +--Testcase 191: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1, LATERAL (SELECT DISTINCT t2.fields->>'C 1', t3.fields->>'C 1' FROM ft1 t2, ft2 t3 WHERE (t2.fields->>'C 1')::int = (t3.fields->>'C 1')::int AND (t2.fields->>'c2')::int = (t1.c2)::int) q ORDER BY (t1."C 1")::int OFFSET 10 LIMIT 10; ---Testcase 171: +--Testcase 192: SELECT t1."C 1" FROM (SELECT (fields->>'C 1')::int "C 1", (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM "S 1"."T 1" t1) t1, LATERAL (SELECT DISTINCT t2.fields->>'C 1', t3.fields->>'C 1' FROM ft1 t2, ft2 t3 WHERE (t2.fields->>'C 1')::int = (t3.fields->>'C 1')::int AND (t2.fields->>'c2')::int = (t1.c2)::int) q ORDER BY (t1."C 1")::int OFFSET 10 LIMIT 10; -- non-Var items in targetlist of the nullable rel of a join preventing -- push-down in some cases -- unable to push {ft1, ft2} ---Testcase 172: +--Testcase 193: EXPLAIN (VERBOSE, COSTS OFF) SELECT q.a, (ft2.fields->>'C 1')::int c1 FROM (SELECT 13 FROM ft1 WHERE (fields->>'C 1')::int = 13) q(a) RIGHT JOIN ft2 ON (q.a = (ft2.fields->>'C 1')::int) WHERE (ft2.fields->>'C 1')::int BETWEEN 10 AND 15; ---Testcase 173: +--Testcase 194: SELECT q.a, (ft2.fields->>'C 1')::int c1 FROM (SELECT 13 FROM ft1 WHERE (fields->>'C 1')::int = 13) q(a) RIGHT JOIN ft2 ON (q.a = (ft2.fields->>'C 1')::int) WHERE (ft2.fields->>'C 1')::int BETWEEN 10 AND 15; -- ok to push {ft1, ft2} but not {ft1, ft2, ft4} ---Testcase 174: +--Testcase 195: EXPLAIN (VERBOSE, COSTS OFF) SELECT (ft4.fields->>'c1')::int c1, q.* FROM ft4 LEFT JOIN (SELECT 13, (ft1.fields->>'C 1')::int, (ft2.fields->>'C 1')::int FROM ft1 RIGHT JOIN ft2 ON ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int) WHERE (ft1.fields->>'C 1')::int = 12) q(a, b, c) ON ((ft4.fields->>'c1')::int = q.b) WHERE (ft4.fields->>'c1')::int BETWEEN 10 AND 15; ---Testcase 175: +--Testcase 196: SELECT (ft4.fields->>'c1')::int c1, q.* FROM ft4 LEFT JOIN (SELECT 13, (ft1.fields->>'C 1')::int, (ft2.fields->>'C 1')::int FROM ft1 RIGHT JOIN ft2 ON ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int) WHERE (ft1.fields->>'C 1')::int = 12) q(a, b, c) ON ((ft4.fields->>'c1')::int = q.b) WHERE (ft4.fields->>'c1')::int BETWEEN 10 AND 15 ORDER BY (ft4.fields->>'c1')::int; -- join with nullable side with some columns with null values -- influxdb_fdw does not support UPDATE -- UPDATE ft5 SET c3 = null where c1 % 9 = 0; ---Testcase 176: +--Testcase 197: EXPLAIN (VERBOSE, COSTS OFF) SELECT ft5, (ft5.fields->>'c1')::int c1, (ft5.fields->>'c2')::int c2, ft5.tags->>'c3' c3, (ft4.fields->>'c1')::int c1, (ft4.fields->>'c2')::int c2 FROM ft5 left join ft4 on (ft5.fields->>'c1')::int = (ft4.fields->>'c1')::int WHERE (ft4.fields->>'c1')::int BETWEEN 10 and 30 ORDER BY (ft5.fields->>'c1')::int, (ft4.fields->>'c1')::int; ---Testcase 177: +--Testcase 198: SELECT ft5, (ft5.fields->>'c1')::int c1, (ft5.fields->>'c2')::int c2, ft5.tags->>'c3' c3, (ft4.fields->>'c1')::int c1, (ft4.fields->>'c2')::int c2 FROM ft5 left join ft4 on (ft5.fields->>'c1')::int = (ft4.fields->>'c1')::int WHERE (ft4.fields->>'c1')::int BETWEEN 10 and 30 ORDER BY (ft5.fields->>'c1')::int, (ft4.fields->>'c1')::int; -- multi-way join involving multiple merge joins -- (this case used to have EPQ-related planning problems) ---Testcase 178: +--Testcase 199: CREATE FOREIGN TABLE local_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'local_tbl', schemaless 'true'); +--Testcase 794: CREATE FOREIGN TABLE local_tbl_nsc (c1 int NOT NULL, c2 int NOT NULL, c3 text) SERVER influxdb_svr OPTIONS (table 'local_tbl'); ---Testcase 179: +--Testcase 200: INSERT INTO local_tbl_nsc SELECT id, id % 10, to_char(id, 'FM0000') FROM generate_series(1, 1000) id; --ANALYZE local_tbl; +--Testcase 201: SET enable_nestloop TO false; +--Testcase 202: SET enable_hashjoin TO false; ---Testcase 180: +--Testcase 203: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE (ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int AND (ft1.fields->>'c2')::int = (ft4.fields->>'c1')::int AND (ft1.fields->>'c2')::int = (ft5.fields->>'c1')::int AND (ft1.fields->>'c2')::int = (local_tbl.fields->>'c1')::int AND (ft1.fields->>'C 1')::int < 100 AND (ft2.fields->>'C 1')::int < 100 ORDER BY (ft1.fields->>'C 1')::int FOR UPDATE; ---Testcase 181: +--Testcase 204: SELECT * FROM ft1, ft2, ft4, ft5, local_tbl WHERE (ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int AND (ft1.fields->>'c2')::int = (ft4.fields->>'c1')::int AND (ft1.fields->>'c2')::int = (ft5.fields->>'c1')::int AND (ft1.fields->>'c2')::int = (local_tbl.fields->>'c1')::int AND (ft1.fields->>'C 1')::int < 100 AND (ft2.fields->>'C 1')::int < 100 ORDER BY (ft1.fields->>'C 1')::int FOR UPDATE; +--Testcase 205: RESET enable_nestloop; +--Testcase 206: RESET enable_hashjoin; ---Testcase 182: + +-- test that add_paths_with_pathkeys_for_rel() arranges for the epq_path to +-- return columns needed by the parent ForeignScan node +--Testcase 867: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl LEFT JOIN (SELECT ft1.*, COALESCE(ft1.tags->>'c3' || (ft2.tags->>'c3')::text, 'foobar') FROM ft1 INNER JOIN ft2 ON (ft1.fields->>'C 1' = ft2.fields->>'C 1' AND (ft1.fields->>'C 1')::int < 100)) ss ON (local_tbl.fields->>'c1' = ss.fields->>'C 1') ORDER BY local_tbl.fields->>'c1' FOR UPDATE OF local_tbl; + +-- ALTER SERVER loopback OPTIONS (DROP extensions); +-- ALTER SERVER loopback OPTIONS (ADD fdw_startup_cost '10000.0'); +--Testcase 868: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl LEFT JOIN (SELECT ft1.* FROM ft1 INNER JOIN ft2 ON ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int AND (ft1.fields->>'C 1')::int < 100 AND (ft1.fields->>'C 1')::int = influxdb_fdw_abs((ft2.fields->>'C 1')::int))) ss ON (local_tbl.fields->>'c3' = ss.tags->>'c3') ORDER BY local_tbl.fields->>'c1' FOR UPDATE OF local_tbl; +-- ALTER SERVER loopback OPTIONS (DROP fdw_startup_cost); +-- ALTER SERVER loopback OPTIONS (ADD extensions 'postgres_fdw'); + +--Testcase 207: DELETE FROM local_tbl_nsc; +--Testcase 795: DROP FOREIGN TABLE local_tbl; +--Testcase 796: DROP FOREIGN TABLE local_tbl_nsc; -- check join pushdown in situations where multiple userids are involved ---Testcase 183: +--Testcase 208: CREATE ROLE regress_view_owner SUPERUSER; ---Testcase 184: -CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); +--Testcase 209: +CREATE USER MAPPING FOR regress_view_owner SERVER influxdb_svr OPTIONS (:AUTHENTICATION); GRANT SELECT ON ft4 TO regress_view_owner; GRANT SELECT ON ft5 TO regress_view_owner; ---Testcase 185: +--Testcase 210: CREATE VIEW v4 AS SELECT * FROM ft4; ---Testcase 186: +--Testcase 211: CREATE VIEW v5 AS SELECT * FROM ft5; +--Testcase 212: ALTER VIEW v5 OWNER TO regress_view_owner; ---Testcase 187: +--Testcase 213: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can't be pushed down, different view owners ---Testcase 188: +--Testcase 214: SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; +--Testcase 215: ALTER VIEW v4 OWNER TO regress_view_owner; ---Testcase 189: +--Testcase 216: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can be pushed down ---Testcase 190: +--Testcase 217: SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; ---Testcase 191: +--Testcase 218: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can't be pushed down, view owner not current user ---Testcase 192: +--Testcase 219: SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; +--Testcase 220: ALTER VIEW v4 OWNER TO CURRENT_USER; ---Testcase 193: +--Testcase 221: EXPLAIN (VERBOSE, COSTS OFF) SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; -- can be pushed down ---Testcase 194: +--Testcase 222: SELECT t1.c1, t2.c2 FROM (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM v4 t1) t1 LEFT JOIN (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 ON ((t1.c1)::int = (t2.c1)::int) ORDER BY (t1.c1)::int, (t2.c1)::int OFFSET 10 LIMIT 10; +--Testcase 223: ALTER VIEW v4 OWNER TO regress_view_owner; -- cleanup ---Testcase 195: +--Testcase 224: DROP OWNED BY regress_view_owner; ---Testcase 196: +--Testcase 225: DROP ROLE regress_view_owner; @@ -814,238 +946,244 @@ DROP ROLE regress_view_owner; -- =================================================================== -- Simple aggregates ---Testcase 197: +--Testcase 226: explain (verbose, costs off) select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2; ---Testcase 198: +--Testcase 227: select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2; ---Testcase 199: +--Testcase 228: explain (verbose, costs off) select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2 limit 1; ---Testcase 200: +--Testcase 229: select count(fields->>'c6'), sum((fields->>'C 1')::int), avg((fields->>'C 1')::int), min((fields->>'c2')::int), max((fields->>'C 1')::int), stddev((fields->>'c2')::int), sum((fields->>'C 1')::int) * (random() <= 1)::int as sum2 from ft1 where (fields->>'c2')::int < 5 group by fields->>'c2' order by 1, 2 limit 1; -- Aggregate is not pushed down as aggregation contains random() ---Testcase 201: +--Testcase 230: explain (verbose, costs off) select sum((fields->>'C 1')::int * (random() <= 1)::int) as sum, avg((fields->>'C 1')::int) from ft1; -- Aggregate over join query ---Testcase 202: +--Testcase 231: explain (verbose, costs off) select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 inner join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 on ((t1.c2)::int = (t2.c2)::int) where (t1.c2)::int = 6; ---Testcase 203: +--Testcase 232: select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 inner join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t2) t2 on ((t1.c2)::int = (t2.c2)::int) where (t1.c2)::int = 6; -- Not pushed down due to local conditions present in underneath input rel ---Testcase 204: +--Testcase 233: explain (verbose, costs off) select sum((t1.c1)::int), count((t2.c1)::int) from (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 t1) t1 inner join (SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (((t1.c1)::int * (t2.c1)::int)/((t1.c1)::int * (t2.c1)::int)) * random() <= 1; -- GROUP BY clause having expressions ---Testcase 205: +--Testcase 234: explain (verbose, costs off) select (fields->>'c2')::int/2, sum((fields->>'c2')::int) * ((fields->>'c2')::int/2) from ft1 group by (fields->>'c2')::int/2 order by (fields->>'c2')::int/2; ---Testcase 206: +--Testcase 235: select (fields->>'c2')::int/2, sum((fields->>'c2')::int) * ((fields->>'c2')::int/2) from ft1 group by (fields->>'c2')::int/2 order by (fields->>'c2')::int/2; -- Aggregates in subquery are pushed down. ---Testcase 207: +--Testcase 236: explain (verbose, costs off) select count(x.a), sum(x.a) from (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2', sqrt((fields->>'C 1')::int) order by 1, 2) x; ---Testcase 208: +--Testcase 237: select count(x.a), sum(x.a) from (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2', sqrt((fields->>'C 1')::int) order by 1, 2) x; -- Aggregate is still pushed down by taking unshippable expression out ---Testcase 209: +--Testcase 238: explain (verbose, costs off) select (fields->>'c2')::int * (random() <= 1)::int as sum1, sum((fields->>'C 1')::int) * (fields->>'c2')::int as sum2 from ft1 group by fields->>'c2' order by 1, 2; ---Testcase 210: +--Testcase 239: select (fields->>'c2')::int * (random() <= 1)::int as sum1, sum((fields->>'C 1')::int) * (fields->>'c2')::int as sum2 from ft1 group by fields->>'c2' order by 1, 2; -- Aggregate with unshippable GROUP BY clause are not pushed ---Testcase 211: +--Testcase 240: explain (verbose, costs off) select (fields->>'c2')::int * (random() <= 1)::int as c2 from ft2 group by (fields->>'c2')::int * (random() <= 1)::int order by 1; -- GROUP BY clause in various forms, cardinal, alias and constant expression ---Testcase 212: +--Testcase 241: explain (verbose, costs off) select count(fields->>'c2') w, fields->>'c2' x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; ---Testcase 213: +--Testcase 242: select count(fields->>'c2') w, fields->>'c2' x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; -- GROUP BY clause referring to same column multiple times -- Also, ORDER BY contains an aggregate function ---Testcase 214: +--Testcase 243: explain (verbose, costs off) select (fields->>'c2')::int c2, (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int > 6 group by 1, 2 order by sum((fields->>'C 1')::int); ---Testcase 215: +--Testcase 244: select (fields->>'c2')::int c2, (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int > 6 group by 1, 2 order by sum((fields->>'C 1')::int); -- Testing HAVING clause shippability ---Testcase 216: +--Testcase 245: explain (verbose, costs off) select(fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft2 group by fields->>'c2' having avg((fields->>'C 1')::int) < 500 and sum((fields->>'C 1')::int) < 49800 order by (fields->>'c2')::int; ---Testcase 217: +--Testcase 246: select(fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft2 group by fields->>'c2' having avg((fields->>'C 1')::int) < 500 and sum((fields->>'C 1')::int) < 49800 order by (fields->>'c2')::int; -- Unshippable HAVING clause will be evaluated locally, and other qual in HAVING clause is pushed down ---Testcase 218: +--Testcase 247: explain (verbose, costs off) select count(*) from (select time, count((fields->>'C 1')::int) from ft1 group by time, sqrt((fields->>'c2')::int) having (avg((fields->>'C 1')::int) / avg((fields->>'C 1')::int)) * random() <= 1 and avg((fields->>'C 1')::int) < 500) x; ---Testcase 219: +--Testcase 248: select count(*) from (select time, count((fields->>'C 1')::int) from ft1 group by time, sqrt((fields->>'c2')::int) having (avg((fields->>'C 1')::int) / avg((fields->>'C 1')::int)) * random() <= 1 and avg((fields->>'C 1')::int) < 500) x; -- Aggregate in HAVING clause is not pushable, and thus aggregation is not pushed down ---Testcase 220: +--Testcase 249: explain (verbose, costs off) select sum((fields->>'C 1')::int) from ft1 group by fields->>'c2' having avg((fields->>'C 1')::int * (random() <= 1)::int) > 100 order by 1; -- Remote aggregate in combination with a local Param (for the output -- of an initplan) can be trouble, per bug #15781 ---Testcase 221: +--Testcase 250: explain (verbose, costs off) select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1; ---Testcase 222: +--Testcase 251: select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1; ---Testcase 223: +--Testcase 252: explain (verbose, costs off) select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1 group by 1; ---Testcase 224: +--Testcase 253: select exists(select 1 from pg_enum), sum((fields->>'C 1')::int) from ft1 group by 1; -- Testing ORDER BY, DISTINCT, FILTER, Ordered-sets and VARIADIC within aggregates -- ORDER BY within aggregate, same column used to order ---Testcase 225: +--Testcase 254: explain (verbose, costs off) select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int) from ft1 where (fields->>'C 1')::int < 100 group by fields->>'c2' order by 1; ---Testcase 226: +--Testcase 255: select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int) from ft1 where (fields->>'C 1')::int < 100 group by fields->>'c2' order by 1; -- ORDER BY within aggregate, different column used to order also using DESC ---Testcase 227: +--Testcase 256: explain (verbose, costs off) select array_agg(time order by (fields->>'C 1')::int desc) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 50; ---Testcase 228: +--Testcase 257: select array_agg(time order by (fields->>'C 1')::int desc) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 50; -- DISTINCT within aggregate ---Testcase 229: +--Testcase 258: explain (verbose, costs off) select array_agg(distinct ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; ---Testcase 230: +--Testcase 259: select array_agg(distinct ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; -- DISTINCT combined with ORDER BY within aggregate ---Testcase 231: +--Testcase 260: explain (verbose, costs off) select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; ---Testcase 232: +--Testcase 261: select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; ---Testcase 233: +--Testcase 262: explain (verbose, costs off) select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5 desc nulls last) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; ---Testcase 234: +--Testcase 263: select array_agg(distinct ((t1.c1)::int)%5 order by ((t1.c1)::int)%5 desc nulls last) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) where (t1.c1)::int < 20 or ((t1.c1)::int is null and (t2.c1)::int < 5) group by ((t2.c1)::int)%3 order by 1; -- FILTER within aggregate ---Testcase 235: +--Testcase 264: explain (verbose, costs off) select sum((fields->>'C 1')::int) filter (where (fields->>'C 1')::int < 100 and (fields->>'c2')::int > 5) from ft1 group by fields->>'c2' order by 1 nulls last; ---Testcase 236: +--Testcase 265: select sum((fields->>'C 1')::int) filter (where (fields->>'C 1')::int < 100 and (fields->>'c2')::int > 5) from ft1 group by fields->>'c2' order by 1 nulls last; -- DISTINCT, ORDER BY and FILTER within aggregate ---Testcase 237: +--Testcase 266: explain (verbose, costs off) select sum((fields->>'C 1')::int%3), sum(distinct (fields->>'C 1')::int%3 order by (fields->>'C 1')::int%3) filter (where (fields->>'C 1')::int%3 < 2), (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int = 6 group by fields->>'c2'; ---Testcase 238: +--Testcase 267: select sum((fields->>'C 1')::int%3), sum(distinct (fields->>'C 1')::int%3 order by (fields->>'C 1')::int%3) filter (where (fields->>'C 1')::int%3 < 2), (fields->>'c2')::int c2 from ft1 where (fields->>'c2')::int = 6 group by fields->>'c2'; -- Outer query is aggregation query ---Testcase 239: +--Testcase 268: explain (verbose, costs off) select distinct (select count(*) filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; ---Testcase 240: +--Testcase 269: select distinct (select count(*) filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; -- Inner query is aggregation query ---Testcase 241: +--Testcase 270: explain (verbose, costs off) select distinct (select count(t1.fields->>'C 1') filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; ---Testcase 242: +--Testcase 271: select distinct (select count(t1.fields->>'C 1') filter (where (t2.fields->>'c2')::int = 6 and (t2.fields->>'C 1')::int < 10) from ft1 t1 where (t1.fields->>'C 1')::int = 6) from ft2 t2 where (t2.fields->>'c2')::int % 6 = 0 order by 1; -- Aggregate not pushed down as FILTER condition is not pushable ---Testcase 243: +--Testcase 272: explain (verbose, costs off) select sum((fields->>'C 1')::int) filter (where ((fields->>'C 1')::int / (fields->>'C 1')::int) * random() <= 1) from ft1 group by fields->>'c2' order by 1; ---Testcase 244: +--Testcase 273: explain (verbose, costs off) select sum((fields->>'c2')::int) filter (where (fields->>'c2')::int in (select (fields->>'c2')::int from ft1 where (fields->>'c2')::int < 5)) from ft1; -- Ordered-sets within aggregate ---Testcase 245: +--Testcase 274: explain (verbose, costs off) select (fields->>'c2')::int c2, rank('10'::varchar) within group (order by fields->>'c6'), percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' having percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) < 500 order by (fields->>'c2')::int; ---Testcase 246: +--Testcase 275: select (fields->>'c2')::int c2, rank('10'::varchar) within group (order by fields->>'c6'), percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' having percentile_cont((fields->>'c2')::int/10::numeric) within group (order by (fields->>'C 1')::int) < 500 order by (fields->>'c2')::int; -- Using multiple arguments within aggregates ---Testcase 247: +--Testcase 276: explain (verbose, costs off) select (fields->>'C 1')::int c1, rank(fields->>'C 1', fields->>'c2') within group (order by fields->>'C 1', fields->>'c2') from ft1 group by fields->>'C 1', fields->>'c2' having (fields->>'C 1')::int = 6 order by 1; ---Testcase 248: +--Testcase 277: select (fields->>'C 1')::int c1, rank(fields->>'C 1', fields->>'c2') within group (order by fields->>'C 1', fields->>'c2') from ft1 group by fields->>'C 1', fields->>'c2' having (fields->>'C 1')::int = 6 order by 1; -- User defined function for user defined aggregate, VARIADIC ---Testcase 249: +--Testcase 278: create function least_accum(anyelement, variadic anyarray) returns anyelement language sql as 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; ---Testcase 250: +--Testcase 279: create aggregate least_agg(variadic items anyarray) ( stype = anyelement, sfunc = least_accum ); -- Disable hash aggregation for plan stability. +--Testcase 280: set enable_hashagg to false; -- Not pushed down due to user defined aggregate ---Testcase 251: +--Testcase 281: explain (verbose, costs off) select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 group by fields->>'c2' order by (fields->>'c2')::int; -- Add function and aggregate into extension +--Testcase 282: alter extension influxdb_fdw add function least_accum(anyelement, variadic anyarray); +--Testcase 283: alter extension influxdb_fdw add aggregate least_agg(variadic items anyarray); -- Now aggregate will be pushed. Aggregate will display VARIADIC argument. ---Testcase 252: +--Testcase 284: explain (verbose, costs off) select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 100 group by fields->>'c2' order by (fields->>'c2')::int; ---Testcase 253: +--Testcase 285: select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 100 group by fields->>'c2' order by (fields->>'c2')::int; -- Remove function and aggregate from extension +--Testcase 286: alter extension influxdb_fdw drop function least_accum(anyelement, variadic anyarray); +--Testcase 287: alter extension influxdb_fdw drop aggregate least_agg(variadic items anyarray); -- Not pushed down as we have dropped objects from extension. ---Testcase 254: +--Testcase 288: explain (verbose, costs off) select (fields->>'c2')::int c2, least_agg((fields->>'C 1')::int) from ft1 group by fields->>'c2' order by (fields->>'c2')::int; -- Cleanup +--Testcase 289: reset enable_hashagg; ---Testcase 255: +--Testcase 290: drop aggregate least_agg(variadic items anyarray); ---Testcase 256: +--Testcase 291: drop function least_accum(anyelement, variadic anyarray); @@ -1054,35 +1192,35 @@ drop function least_accum(anyelement, variadic anyarray); -- operator class. Create those and then add them in extension. Note that -- user defined objects are considered unshippable unless they are part of -- the extension. ---Testcase 257: +--Testcase 292: create operator public.<^ ( leftarg = int4, rightarg = int4, procedure = int4eq ); ---Testcase 258: +--Testcase 293: create operator public.=^ ( leftarg = int4, rightarg = int4, procedure = int4lt ); ---Testcase 259: +--Testcase 294: create operator public.>^ ( leftarg = int4, rightarg = int4, procedure = int4gt ); ---Testcase 260: +--Testcase 295: create operator family my_op_family using btree; ---Testcase 261: +--Testcase 296: create function my_op_cmp(a int, b int) returns int as $$begin return btint4cmp(a, b); end $$ language plpgsql; ---Testcase 262: +--Testcase 297: create operator class my_op_class for type int using btree family my_op_family as operator 1 public.<^, operator 3 public.=^, @@ -1091,102 +1229,127 @@ create operator class my_op_class for type int using btree family my_op_family a -- This will not be pushed as user defined sort operator is not part of the -- extension yet. ---Testcase 263: +--Testcase 298: explain (verbose, costs off) select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; +-- This should not be pushed either. +--Testcase 766: +explain (verbose, costs off) +select * from ft2 order by (fields->>'C 1')::int using operator(public.<^); + -- Update local stats on ft2 --ANALYZE ft2; -- Add into extension +--Testcase 299: alter extension influxdb_fdw add operator class my_op_class using btree; +--Testcase 300: alter extension influxdb_fdw add function my_op_cmp(a int, b int); +--Testcase 301: alter extension influxdb_fdw add operator family my_op_family using btree; +--Testcase 302: alter extension influxdb_fdw add operator public.<^(int, int); +--Testcase 303: alter extension influxdb_fdw add operator public.=^(int, int); +--Testcase 304: alter extension influxdb_fdw add operator public.>^(int, int); -- Now this will be pushed as sort operator is part of the extension. ---Testcase 264: +--Testcase 305: explain (verbose, costs off) select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; ---Testcase 265: +--Testcase 306: select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; +-- This should be pushed too. +-- Influx not support user-defined operator +--Testcase 767: +explain (verbose, costs off) +select * from ft2 order by (fields->>'C 1')::int using operator(public.<^); + -- Remove from extension +--Testcase 307: alter extension influxdb_fdw drop operator class my_op_class using btree; +--Testcase 308: alter extension influxdb_fdw drop function my_op_cmp(a int, b int); +--Testcase 309: alter extension influxdb_fdw drop operator family my_op_family using btree; +--Testcase 310: alter extension influxdb_fdw drop operator public.<^(int, int); +--Testcase 311: alter extension influxdb_fdw drop operator public.=^(int, int); +--Testcase 312: alter extension influxdb_fdw drop operator public.>^(int, int); -- This will not be pushed as sort operator is now removed from the extension. ---Testcase 266: +--Testcase 313: explain (verbose, costs off) select array_agg((fields->>'C 1')::int order by (fields->>'C 1')::int using operator(public.<^)) from ft2 where (fields->>'c2')::int = 6 and (fields->>'C 1')::int < 100 group by fields->>'c2'; -- Cleanup ---Testcase 267: +--Testcase 314: drop operator class my_op_class using btree; ---Testcase 268: +--Testcase 315: drop function my_op_cmp(a int, b int); ---Testcase 269: +--Testcase 316: drop operator family my_op_family using btree; ---Testcase 270: +--Testcase 317: drop operator public.>^(int, int); ---Testcase 271: +--Testcase 318: drop operator public.=^(int, int); ---Testcase 272: +--Testcase 319: drop operator public.<^(int, int); -- Input relation to aggregate push down hook is not safe to pushdown and thus -- the aggregate cannot be pushed down to foreign server. ---Testcase 273: +--Testcase 320: explain (verbose, costs off) select count(t1.c3) from ((SELECT fields->>'C 1' c1, fields->>'c2' c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2)) t1 left join ((SELECT fields->>'C 1' c1, fields->>'c2' c2, tags->>'c3' c3, fields->>'c4' c4, fields->>'c5' c5, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2)) t2 on ((t1.c1)::int = random() * (t2.c2)::int); -- Subquery in FROM clause having aggregate ---Testcase 274: +--Testcase 321: explain (verbose, costs off) select count(*), x.b from ft1, (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2') x where (ft1.fields->>'c2')::int = x.a group by x.b order by 1, 2; ---Testcase 275: +--Testcase 322: select count(*), x.b from ft1, (select (fields->>'c2')::int a, sum((fields->>'C 1')::int) b from ft1 group by fields->>'c2') x where (ft1.fields->>'c2')::int = x.a group by x.b order by 1, 2; -- FULL join with IS NULL check in HAVING ---Testcase 276: +--Testcase 323: explain (verbose, costs off) select avg((t1.c1)::int), sum((t2.c1)::int) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) group by t2.c1 having (avg((t1.c1)::int) is null and sum((t2.c1)::int) < 10) or sum((t2.c1)::int) is null order by 1 nulls last, 2; ---Testcase 277: +--Testcase 324: select avg((t1.c1)::int), sum((t2.c1)::int) from (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft4 t1) t1 full join (SELECT (fields->>'c1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft5 t2) t2 on ((t1.c1)::int = (t2.c1)::int) group by t2.c1 having (avg((t1.c1)::int) is null and sum((t2.c1)::int) < 10) or sum((t2.c1)::int) is null order by 1 nulls last, 2; -- Aggregate over FULL join needing to deparse the joining relations as -- subqueries. ---Testcase 278: +--Testcase 325: explain (verbose, costs off) select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 full join (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 on ((t1.c1)::int = (t2.c1)::int); ---Testcase 279: +--Testcase 326: select count(*), sum((t1.c1)::int), avg((t2.c1)::int) from (SELECT (fields->>'c1')::int c1 FROM ft4 t1 WHERE (fields->>'c1')::int between 50 and 60) t1 full join (SELECT (fields->>'c1')::int c1 FROM ft5 t2 WHERE (fields->>'c1')::int between 50 and 60) t2 on ((t1.c1)::int = (t2.c1)::int); -- ORDER BY expression is part of the target list but not pushed down to -- foreign server. ---Testcase 280: +--Testcase 327: explain (verbose, costs off) select sum((fields->>'c2')::int) * (random() <= 1)::int as sum from ft1 order by 1; ---Testcase 281: +--Testcase 328: select sum((fields->>'c2')::int) * (random() <= 1)::int as sum from ft1 order by 1; -- LATERAL join, with parameterization +--Testcase 329: set enable_hashagg to false; ---Testcase 282: +--Testcase 330: explain (verbose, costs off) select (fields->>'c2')::int c2, sum from "S 1"."T 1" t1, lateral (select sum((t2.fields->>'C 1')::int + (t1.fields->>'C 1')::int) sum from ft2 t2 group by t2.fields->>'C 1') qry where (t1.fields->>'c2')::int * 2 = qry.sum and (t1.fields->>'c2')::int < 3 and (t1.fields->>'C 1')::int < 100 order by 1; ---Testcase 283: +--Testcase 331: select (fields->>'c2')::int c2, sum from "S 1"."T 1" t1, lateral (select sum((t2.fields->>'C 1')::int + (t1.fields->>'C 1')::int) sum from ft2 t2 group by t2.fields->>'C 1') qry where (t1.fields->>'c2')::int * 2 = qry.sum and (t1.fields->>'c2')::int < 3 and (t1.fields->>'C 1')::int < 100 order by 1; +--Testcase 332: reset enable_hashagg; -- bug #15613: bad plan for foreign table scan with lateral reference ---Testcase 284: +--Testcase 333: EXPLAIN (VERBOSE, COSTS OFF) SELECT (ref_0.fields->>'c2')::int c2, subq_1.* FROM @@ -1200,7 +1363,7 @@ FROM WHERE (ref_0.fields->>'C 1')::int < 10 AND subq_1.c3 = '00001' ORDER BY (ref_0.fields->>'C 1')::int; ---Testcase 285: +--Testcase 334: SELECT (ref_0.fields->>'c2')::int c2, subq_1.* FROM "S 1"."T 1" AS ref_0, @@ -1214,58 +1377,58 @@ WHERE (ref_0.fields->>'C 1')::int < 10 AND subq_1.c3 = '00001' ORDER BY (ref_0.fields->>'C 1')::int; -- Check with placeHolderVars ---Testcase 286: +--Testcase 335: explain (verbose, costs off) select sum(q.a), count(q.b) from ft4 left join (select 13, avg((ft1.fields->>'C 1')::int), sum((ft2.fields->>'C 1')::int) from ft1 right join ft2 on ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int)) q(a, b, c) on ((ft4.fields->>'c1')::int <= q.b); ---Testcase 287: +--Testcase 336: select sum(q.a), count(q.b) from ft4 left join (select 13, avg((ft1.fields->>'C 1')::int), sum((ft2.fields->>'C 1')::int) from ft1 right join ft2 on ((ft1.fields->>'C 1')::int = (ft2.fields->>'C 1')::int)) q(a, b, c) on ((ft4.fields->>'c1')::int <= q.b); -- Not supported cases -- Grouping sets ---Testcase 288: +--Testcase 337: explain (verbose, costs off) select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by rollup((fields->>'c2')::int) order by 1 nulls last; ---Testcase 289: +--Testcase 338: select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by rollup((fields->>'c2')::int) order by 1 nulls last; ---Testcase 290: +--Testcase 339: explain (verbose, costs off) select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by cube((fields->>'c2')::int) order by 1 nulls last; ---Testcase 291: +--Testcase 340: select (fields->>'c2')::int c2, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by cube((fields->>'c2')::int) order by 1 nulls last; ---Testcase 292: +--Testcase 341: explain (verbose, costs off) select (fields->>'c2')::int c2, fields->>'c6' c6, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by grouping sets(fields->>'c2', fields->>'c6') order by 1 nulls last, 2 nulls last; ---Testcase 293: +--Testcase 342: select (fields->>'c2')::int c2, fields->>'c6' c6, sum((fields->>'C 1')::int) from ft1 where (fields->>'c2')::int < 3 group by grouping sets(fields->>'c2', fields->>'c6') order by 1 nulls last, 2 nulls last; ---Testcase 294: +--Testcase 343: explain (verbose, costs off) select (fields->>'c2')::int c2, sum((fields->>'C 1')::int), grouping(fields->>'c2') from ft1 where (fields->>'c2')::int < 3 group by fields->>'c2' order by 1 nulls last; ---Testcase 295: +--Testcase 344: select (fields->>'c2')::int c2, sum((fields->>'C 1')::int), grouping(fields->>'c2') from ft1 where (fields->>'c2')::int < 3 group by fields->>'c2' order by 1 nulls last; -- DISTINCT itself is not pushed down, whereas underneath aggregate is pushed ---Testcase 296: +--Testcase 345: explain (verbose, costs off) select distinct sum((fields->>'C 1')::int)/1000 s from ft2 where (fields->>'c2')::int < 6 group by fields->>'c2' order by 1; ---Testcase 297: +--Testcase 346: select distinct sum((fields->>'C 1')::int)/1000 s from ft2 where (fields->>'c2')::int < 6 group by fields->>'c2' order by 1; -- WindowAgg ---Testcase 298: +--Testcase 347: explain (verbose, costs off) select (fields->>'c2')::int c2, sum((fields->>'c2')::int), count((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2) from ft2 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; ---Testcase 299: +--Testcase 348: select (fields->>'c2')::int c2, sum((fields->>'c2')::int), count((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2) from ft2 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; ---Testcase 300: +--Testcase 349: explain (verbose, costs off) select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int desc) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; ---Testcase 301: +--Testcase 350: select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int desc) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; ---Testcase 302: +--Testcase 351: explain (verbose, costs off) select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int range between current row and unbounded following) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; ---Testcase 303: +--Testcase 352: select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition by (fields->>'c2')::int%2 order by (fields->>'c2')::int range between current row and unbounded following) from ft1 where (fields->>'c2')::int < 10 group by fields->>'c2' order by 1; @@ -1273,97 +1436,99 @@ select (fields->>'c2')::int c2, array_agg((fields->>'c2')::int) over (partition -- parameterized queries -- =================================================================== -- simple join ---Testcase 304: +--Testcase 353: PREPARE st1(int, int) AS SELECT t1.tags->>'c3' c3, t2.tags->>'c3' c3 FROM ft1 t1, ft2 t2 WHERE (t1.fields->>'C 1')::int = $1 AND (t2.fields->>'C 1')::int = $2; ---Testcase 305: +--Testcase 354: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st1(1, 2); ---Testcase 306: +--Testcase 355: EXECUTE st1(1, 1); ---Testcase 307: +--Testcase 356: EXECUTE st1(101, 101); -- subquery using stable function (can't be sent to remote) ---Testcase 308: +--Testcase 357: PREPARE st2(int) AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int < $2 AND t1.tags->>'c3' IN (SELECT tags->>'c3' FROM ft2 t2 WHERE (fields->>'C 1')::int > $1 AND date(time) = '1970-01-17'::date) ORDER BY (fields->>'C 1')::int; ---Testcase 309: +--Testcase 358: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st2(10, 20); ---Testcase 310: +--Testcase 359: EXECUTE st2(10, 20); ---Testcase 311: +--Testcase 360: EXECUTE st2(101, 121); -- subquery using immutable function (can be sent to remote) ---Testcase 312: +--Testcase 361: PREPARE st3(int) AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int < $2 AND t1.tags->>'c3' IN (SELECT tags->>'c3' FROM ft2 t2 WHERE (fields->>'C 1')::int > $1 AND date(time) = '1970-01-17'::date) ORDER BY (fields->>'C 1')::int; ---Testcase 313: +--Testcase 362: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st3(10, 20); ---Testcase 314: +--Testcase 363: EXECUTE st3(10, 20); ---Testcase 315: +--Testcase 364: EXECUTE st3(20, 30); -- custom plan should be chosen initially ---Testcase 316: +--Testcase 365: PREPARE st4(int) AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = $1; ---Testcase 317: +--Testcase 366: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); ---Testcase 318: +--Testcase 367: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); ---Testcase 319: +--Testcase 368: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); ---Testcase 320: +--Testcase 369: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); ---Testcase 321: +--Testcase 370: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); -- once we try it enough times, should switch to generic plan ---Testcase 322: +--Testcase 371: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st4(1); -- value of $1 should not be sent to remote ---Testcase 323: +--Testcase 372: PREPARE st5(text,int) AS SELECT * FROM ft1 t1 WHERE fields->>'c8' = $1 and (fields->>'C 1')::int = $2; ---Testcase 324: +--Testcase 373: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 325: +--Testcase 374: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 326: +--Testcase 375: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 327: +--Testcase 376: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 328: +--Testcase 377: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 329: +--Testcase 378: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st5('foo', 1); ---Testcase 330: +--Testcase 379: EXECUTE st5('foo', 1); -- altering FDW options requires replanning ---Testcase 331: +--Testcase 380: PREPARE st6 AS SELECT * FROM ft1 t1 WHERE (t1.fields->>'C 1')::int = (t1.fields->>'c2')::int; ---Testcase 332: +--Testcase 381: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; ---Testcase 333: +--Testcase 382: PREPARE st7 AS INSERT INTO ft1_nsc (c1,c2,c3) VALUES (1001,101,'foo'); ---Testcase 334: +--Testcase 383: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; ---Testcase 335: +--Testcase 384: INSERT INTO "S 1".s1t0 SELECT * FROM "S 1".s1t1; +--Testcase 385: ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T0'); ---Testcase 336: +--Testcase 386: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st6; ---Testcase 337: +--Testcase 387: EXECUTE st6; ---Testcase 338: +--Testcase 388: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st7; ---Testcase 339: +--Testcase 389: DELETE FROM "S 1".s1t0; +--Testcase 390: ALTER FOREIGN TABLE ft1 OPTIONS (SET table 'T1'); ---Testcase 340: +--Testcase 391: PREPARE st8 AS SELECT count(tags->>'c3') FROM ft1 t1 WHERE (t1.fields->>'C 1')::int === (t1.fields->>'c2')::int; ---Testcase 341: +--Testcase 392: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; -- Skip, influxdb_fdw does not support extensions -- ALTER SERVER loopback OPTIONS (DROP extensions); ---Testcase 342: +--Testcase 393: EXPLAIN (VERBOSE, COSTS OFF) EXECUTE st8; ---Testcase 343: +--Testcase 394: EXECUTE st8; -- ALTER SERVER loopback OPTIONS (ADD extensions 'influxdb_fdw'); @@ -1378,59 +1543,113 @@ DEALLOCATE st7; DEALLOCATE st8; -- System columns, except ctid and oid, should not be sent to remote ---Testcase 344: +--Testcase 395: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.tableoid = 'pg_class'::regclass LIMIT 1; ---Testcase 345: +--Testcase 396: SELECT * FROM ft1 t1 WHERE t1.tableoid = 'ft1'::regclass ORDER BY (fields->>'C 1')::int LIMIT 1; ---Testcase 346: +--Testcase 397: EXPLAIN (VERBOSE, COSTS OFF) SELECT tableoid::regclass, * FROM ft1 t1 LIMIT 1; ---Testcase 347: +--Testcase 398: SELECT tableoid::regclass, * FROM ft1 t1 ORDER BY (fields->>'C 1')::int LIMIT 1; ---Testcase 348: +--Testcase 399: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; ---Testcase 349: +--Testcase 400: SELECT * FROM ft1 t1 WHERE t1.ctid = '(0,2)'; ---Testcase 350: +--Testcase 401: EXPLAIN (VERBOSE, COSTS OFF) SELECT ctid, * FROM ft1 t1 LIMIT 1; ---Testcase 351: +--Testcase 402: SELECT ctid, * FROM ft1 t1 ORDER BY (fields->>'C 1')::int LIMIT 1; -- =================================================================== -- used in PL/pgSQL function -- =================================================================== ---Testcase 352: +--Testcase 403: CREATE OR REPLACE FUNCTION f_test(p_c1 int) RETURNS int AS $$ DECLARE v_c1 int; BEGIN ---Testcase 353: +--Testcase 404: SELECT fields->>'C 1' INTO v_c1 FROM ft1 WHERE (fields->>'C 1')::int = p_c1 LIMIT 1; PERFORM fields->>'C 1' FROM ft1 WHERE (fields->>'C 1')::int = p_c1 AND p_c1 = v_c1 LIMIT 1; RETURN v_c1; END; $$ LANGUAGE plpgsql; ---Testcase 354: +--Testcase 405: SELECT f_test(100); ---Testcase 355: +--Testcase 406: DROP FUNCTION f_test(int); +-- =================================================================== +-- REINDEX +-- =================================================================== +-- remote table is not created here +--Testcase 407: +CREATE FOREIGN TABLE reindex_foreign (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr2 OPTIONS (table 'reindex_local', schemaless 'true'); +REINDEX TABLE reindex_foreign; -- error +REINDEX TABLE CONCURRENTLY reindex_foreign; -- error +--Testcase 408: +DROP FOREIGN TABLE reindex_foreign; +-- partitions and foreign tables +--Testcase 409: +CREATE TABLE reind_fdw_parent (c1 int) PARTITION BY RANGE (c1); +--Testcase 410: +CREATE TABLE reind_fdw_0_10 PARTITION OF reind_fdw_parent + FOR VALUES FROM (0) TO (10); +--Testcase 411: +CREATE FOREIGN TABLE reind_fdw_10_20 PARTITION OF reind_fdw_parent + FOR VALUES FROM (10) TO (20) + SERVER influxdb_svr OPTIONS (table 'reind_local_10_20'); +REINDEX TABLE reind_fdw_parent; -- ok +REINDEX TABLE CONCURRENTLY reind_fdw_parent; -- ok +--Testcase 412: +DROP TABLE reind_fdw_parent; + -- =================================================================== -- conversion error -- =================================================================== +--Testcase 413: --ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE int; ---Testcase 356: ---SELECT * FROM ft1 WHERE c1 = 1; -- ERROR ---Testcase 357: ---SELECT ft1.c1, ft2.c2, ft1.c8 FROM ft1, ft2 WHERE ft1.c1 = ft2.c1 AND ft1.c1 = 1; -- ERROR ---Testcase 358: ---SELECT ft1.c1, ft2.c2, ft1 FROM ft1, ft2 WHERE ft1.c1 = ft2.c1 AND ft1.c1 = 1; -- ERROR ---Testcase 359: +--Testcase 414: +--SELECT * FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8) WHERE x1 = 1; -- ERROR +--Testcase 415: +--SELECT ftx.x1, ft2.c2, ftx.x8 FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8), ft2 +-- WHERE ftx.x1 = (ft2.fields->>'C 1')::int AND ftx.x1 = 1; -- ERROR +--Testcase 416: +--SELECT ftx.x1, ft2.c2, ftx FROM ft1 ftx(x1,x2,x3,x4,x6,x7,x8), ft2 +-- WHERE ftx.x1 = (ft2.fields->>'C 1')::int AND ftx.x1 = 1; -- ERROR +--Testcase 417: --SELECT sum(c2), array_agg(c8) FROM ft1 GROUP BY c8; -- ERROR ---ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE text; +-- ANALYZE ft1; -- ERROR +--ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE user_enum; + +-- =================================================================== +-- local type can be different from remote type in some cases, +-- in particular if similarly-named operators do equivalent things +-- =================================================================== +--Testcase 768: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE (fields->>'c8')::text = 'foo' LIMIT 1; +--Testcase 769: +SELECT * FROM ft1 WHERE (fields->>'c8')::text = 'foo' LIMIT 1; +--Testcase 770: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ft1 WHERE 'foo' = (fields->>'c8')::text LIMIT 1; +--Testcase 771: +SELECT * FROM ft1 WHERE 'foo' = (fields->>'c8')::text LIMIT 1; +-- we declared c8 to be text locally, but it's still the same type on +-- the remote which will balk if we try to do anything incompatible +-- with that remote type +-- Can not create user define type in InfluxDB. +-- Type c8 of foreign table ft1 and remote table T1 are +-- match. These case below not error with influxdb_fdw. +--Testcase 772: +SELECT * FROM ft1 WHERE (fields->>'c8')::text LIKE 'foo' LIMIT 1; -- ERROR +--Testcase 773: +SELECT * FROM ft1 WHERE ((fields->>'c8')::text)::text LIKE 'foo' LIMIT 1; -- ERROR; cast not pushed down /* -- influxdb_fdw does not support transactions @@ -1456,33 +1675,33 @@ COMMIT; -- =================================================================== -- test handling of collations -- =================================================================== ---Testcase 360: +--Testcase 419: create foreign table loct3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct3', schemaless 'true'); ---Testcase 361: +--Testcase 420: create foreign table ft3 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct3', schemaless 'true'); -- can be sent to remote ---Testcase 362: +--Testcase 421: explain (verbose, costs off) select * from ft3 where fields->>'f1' = 'foo'; ---Testcase 363: +--Testcase 422: explain (verbose, costs off) select * from ft3 where fields->>'f1' COLLATE "C" = 'foo'; ---Testcase 364: +--Testcase 423: explain (verbose, costs off) select * from ft3 where fields->>'f2' = 'foo'; ---Testcase 365: +--Testcase 424: explain (verbose, costs off) select * from ft3 where fields->>'f3' = 'foo'; ---Testcase 366: +--Testcase 425: explain (verbose, costs off) select * from ft3 f, loct3 l where f.fields->>'f3' = l.fields->>'f3' and l.fields->>'f1' = 'foo'; -- can't be sent to remote ---Testcase 367: +--Testcase 426: explain (verbose, costs off) select * from ft3 where fields->>'f1' COLLATE "POSIX" = 'foo'; ---Testcase 368: +--Testcase 427: explain (verbose, costs off) select * from ft3 where fields->>'f1' = 'foo' COLLATE "C"; ---Testcase 369: +--Testcase 428: explain (verbose, costs off) select * from ft3 where fields->>'f2' COLLATE "C" = 'foo'; ---Testcase 370: +--Testcase 429: explain (verbose, costs off) select * from ft3 where fields->>'f2' = 'foo' COLLATE "C"; ---Testcase 371: +--Testcase 430: explain (verbose, costs off) select * from ft3 f, loct3 l where f.fields->>'f3' = l.fields->>'f3' COLLATE "POSIX" and l.fields->>'f1' = 'foo'; @@ -1490,16 +1709,16 @@ explain (verbose, costs off) select * from ft3 f, loct3 l -- =================================================================== -- test writable foreign table stuff -- =================================================================== ---Testcase 372: +--Testcase 431: EXPLAIN (verbose, costs off) INSERT INTO ft2_nsc (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2_nsc ORDER BY c1 LIMIT 20; ---Testcase 373: +--Testcase 432: INSERT INTO ft2_nsc (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2_nsc ORDER BY c1 LIMIT 20; ---Testcase 374: +--Testcase 433: INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1101,201,'aaa'), (1102,202,'bbb'), (1103,203,'ccc'); ---Testcase 375: +--Testcase 434: SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 WHERE (fields->>'c2')::int > 200; ---Testcase 376: +--Testcase 435: INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1104,204,'ddd'), (1105,205,'eee'); --EXPLAIN (verbose, costs off) --UPDATE ft2 SET c2 = c2 + 300, c3 = c3 || '_update3' WHERE c1 % 10 = 3; -- can be pushed down @@ -1512,44 +1731,44 @@ INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1104,204,'ddd'), (1105,205,'eee'); -- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; -- can be pushed down --UPDATE ft2 SET c2 = ft2.c2 + 500, c3 = ft2.c3 || '_update9', c7 = DEFAULT -- FROM ft1 WHERE ft1.c1 = ft2.c2 AND ft1.c1 % 10 = 9; ---Testcase 377: +--Testcase 436: EXPLAIN (verbose, costs off) DELETE FROM ft2_nsc WHERE c1 % 10 = 5; -- can be pushed down ---Testcase 378: +--Testcase 437: SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int % 10 = 5 ORDER BY (fields->>'C 1')::int; ---Testcase 379: +--Testcase 438: DELETE FROM ft2_nsc WHERE c1 % 10 = 5; ---Testcase 380: +--Testcase 439: SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int % 10 = 5; ---Testcase 381: +--Testcase 440: EXPLAIN (verbose, costs off) DELETE FROM ft2_nsc USING ft1_nsc WHERE ft1_nsc.c1 = ft2_nsc.c2 AND ft1_nsc.c1 % 10 = 2; ---Testcase 382: +--Testcase 441: DELETE FROM ft2_nsc USING ft1_nsc WHERE ft1_nsc.c1 = ft2_nsc.c2 AND ft1_nsc.c1 % 10 = 2; ---Testcase 383: +--Testcase 442: SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3 FROM ft2 ORDER BY (fields->>'C 1')::int; ---Testcase 384: +--Testcase 443: EXPLAIN (verbose, costs off) INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1200,999,'foo'); ---Testcase 385: +--Testcase 444: INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1200,999,'foo'); ---Testcase 386: +--Testcase 445: SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int = 1200 AND (fields->>'c2')::int = 999; --EXPLAIN (verbose, costs off) --UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; -- can be pushed down --UPDATE ft2 SET c3 = 'bar' WHERE c1 = 1200 RETURNING tableoid::regclass; ---Testcase 387: +--Testcase 446: EXPLAIN (verbose, costs off) DELETE FROM ft2_nsc WHERE c1 = 1200; ---Testcase 388: +--Testcase 447: SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int = 1200; ---Testcase 389: +--Testcase 448: DELETE FROM ft2_nsc WHERE c1 = 1200; ---Testcase 390: +--Testcase 449: SELECT (fields->>'C 1')::int c1 FROM ft2 WHERE (fields->>'C 1')::int = 1200; -- Test UPDATE/DELETE with RETURNING on a three-table join ---Testcase 391: +--Testcase 450: INSERT INTO ft2_nsc (c1,c2,c3) SELECT id, id - 1200, to_char(id, 'FM00000') FROM generate_series(1201, 1300) id; --EXPLAIN (verbose, costs off) @@ -1561,24 +1780,24 @@ INSERT INTO ft2_nsc (c1,c2,c3) -- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) -- WHERE ft2.c1 > 1200 AND ft2.c2 = ft4.c1 -- RETURNING ft2, ft2.*, ft4, ft4.*; ---Testcase 392: +--Testcase 451: EXPLAIN (verbose, costs off) DELETE FROM ft2_nsc USING ft4_nsc LEFT JOIN ft5_nsc ON (ft4_nsc.c1 = ft5_nsc.c1) - WHERE ft2_nsc.c1 > 1200 AND ft2_nsc.c1 % 10 = 0 AND ft2_nsc.c2 = ft4_nsc.c1; -- can be pushed down ---Testcase 393: + WHERE ft2_nsc.c1 > 1200 AND ft2_nsc.c1 % 10 = 0 AND ft2_nsc.c2 = ft4_nsc.c1; -- can be pushed down +--Testcase 452: SELECT 100 FROM ft2, ft4 LEFT JOIN ft5 ON ((ft4.fields->>'c1')::int = (ft5.fields->>'c1')::int) WHERE (ft2.fields->>'C 1')::int > 1200 AND (ft2.fields->>'C 1')::int % 10 = 0 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; ---Testcase 394: +--Testcase 453: DELETE FROM ft2_nsc USING ft4_nsc LEFT JOIN ft5_nsc ON (ft4_nsc.c1 = ft5_nsc.c1) WHERE ft2_nsc.c1 > 1200 AND ft2_nsc.c1 % 10 = 0 AND ft2_nsc.c2 = ft4_nsc.c1; ---Testcase 395: +--Testcase 454: SELECT 100 FROM ft2, ft4 LEFT JOIN ft5 ON ((ft4.fields->>'c1')::int = (ft5.fields->>'c1')::int) WHERE (ft2.fields->>'C 1')::int > 1200 AND (ft2.fields->>'C 1')::int % 10 = 0 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; ---Testcase 396: +--Testcase 455: DELETE FROM ft2_nsc WHERE ft2_nsc.c1 > 1200; -- Test UPDATE with a MULTIEXPR sub-select @@ -1601,9 +1820,17 @@ DELETE FROM ft2_nsc WHERE ft2_nsc.c1 > 1200; -- WHERE targ--et.c1 = src.c1 --) WHERE c1 > 1100; +-- Test UPDATE involving a join that can be pushed down, +-- but a SET clause that can't be +-- EXPLAIN (VERBOSE, COSTS OFF) +-- UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END +-- FROM ft2 AS t WHERE d.c1 = t.c1 AND d.c1 > 1000; +-- UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END +-- FROM ft2 AS t WHERE d.c1 = t.c1 AND d.c1 > 1000; + -- Test UPDATE/DELETE with WHERE or JOIN/ON conditions containing -- user-defined operators/functions ---Testcase 397: +--Testcase 456: INSERT INTO ft2_nsc (c1,c2,c3) SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id; --EXPLAIN (verbose, costs off) @@ -1618,58 +1845,59 @@ INSERT INTO ft2_nsc (c1,c2,c3) -- FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) -- WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 -- RETURNING ft2.*, ft4.*, ft5.*; ---Testcase 398: +--Testcase 457: EXPLAIN (verbose, costs off) DELETE FROM ft2_nsc USING ft4_nsc INNER JOIN ft5_nsc ON (ft4_nsc.c1 === ft5_nsc.c1) WHERE ft2_nsc.c1 > 2000 AND ft2_nsc.c2 = ft4_nsc.c1; -- can't be pushed down ---Testcase 399: +--Testcase 458: SELECT (ft2.fields->>'C 1')::int c1, (ft2.fields->>'c2')::int c2, ft2.tags->>'c3' c3 FROM ft2, ft4 INNER JOIN ft5 ON ((ft4.fields->>'c1')::int === (ft5.fields->>'c1')::int) WHERE (ft2.fields->>'C 1')::int > 2000 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; ---Testcase 400: +--Testcase 459: DELETE FROM ft2_nsc USING ft4_nsc INNER JOIN ft5_nsc ON (ft4_nsc.c1 === ft5_nsc.c1) - WHERE ft2_nsc.c1 > 2000 AND ft2_nsc.c2 = ft4_nsc.c1; ---Testcase 401: + WHERE ft2_nsc.c1 > 2000 AND ft2_nsc.c2 = ft4_nsc.c1; +--Testcase 460: SELECT (ft2.fields->>'C 1')::int c1, (ft2.fields->>'c2')::int c2, ft2.tags->>'c3' c3 FROM ft2, ft4 INNER JOIN ft5 ON ((ft4.fields->>'c1')::int === (ft5.fields->>'c1')::int) WHERE (ft2.fields->>'C 1')::int > 2000 AND (ft2.fields->>'c2')::int = (ft4.fields->>'c1')::int; ---Testcase 402: +--Testcase 461: DELETE FROM ft2_nsc WHERE ft2_nsc.c1 > 2000; -- Test that trigger on remote table works as expected ---Testcase 403: +--Testcase 462: CREATE OR REPLACE FUNCTION "S 1".F_BRTRIG() RETURNS trigger AS $$ BEGIN NEW.c3 = NEW.c3 || '_trig_update'; RETURN NEW; END; $$ LANGUAGE plpgsql; ---Testcase 404: +--Testcase 463: CREATE TRIGGER t1_br_insert BEFORE INSERT OR UPDATE ON "S 1".s1t1 FOR EACH ROW EXECUTE PROCEDURE "S 1".F_BRTRIG(); ---Testcase 405: +--Testcase 464: INSERT INTO ft2_nsc (c1,c2,c3) VALUES (1208, 818, 'fff'); ---Testcase 406: +--Testcase 465: SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 WHERE (fields->>'C 1')::int = 1208; ---Testcase 407: +--Testcase 466: INSERT INTO ft2_nsc (c1,c2,c3,c6) VALUES (1218, 818, 'ggg', '(--;'); ---Testcase 408: +--Testcase 467: SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft2 WHERE (fields->>'C 1')::int = 1218; --UPDATE ft2 SET c2 = c2 + 600 WHERE c1 % 10 = 8 AND c1 < 1200 RETURNING *; -- Test errors thrown on remote side during update +--Testcase 468: ALTER TABLE "S 1"."T 1" ADD CONSTRAINT c2positive CHECK ((fields->>'c2')::int >= 0); -- influxdb_fdw does not support key, ON CONFLICT --INSERT INTO ft1(c1, c2) VALUES(11, 12); -- duplicate key ---Testcase 409: +--Testcase 469: INSERT INTO ft1_nsc(c1, c2) VALUES(11, 12) ON CONFLICT DO NOTHING; -- works ---Testcase 410: +--Testcase 470: INSERT INTO ft1_nsc(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO NOTHING; -- unsupported ---Testcase 411: +--Testcase 471: INSERT INTO ft1_nsc(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO UPDATE SET c3 = 'ffg'; -- unsupported --INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive --UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive @@ -1710,19 +1938,19 @@ select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; -- Above DMLs add data with c6 as NULL in ft1, so test ORDER BY NULLS LAST and NULLs -- FIRST behavior here. -- ORDER BY DESC NULLS LAST options ---Testcase 412: +--Testcase 472: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY fields->>'c6' DESC NULLS LAST, (fields->>'C 1')::int OFFSET 795 LIMIT 10; ---Testcase 413: +--Testcase 473: SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 ORDER BY fields->>'c6' DESC NULLS LAST, (fields->>'C 1')::int OFFSET 795 LIMIT 10; -- ORDER BY DESC NULLS FIRST options ---Testcase 414: +--Testcase 474: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY fields->>'c6' DESC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; ---Testcase 415: +--Testcase 475: SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 ORDER BY fields->>'c6' DESC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; -- ORDER BY ASC NULLS FIRST options ---Testcase 416: +--Testcase 476: EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 ORDER BY fields->>'c6' ASC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; ---Testcase 417: +--Testcase 477: SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields->>'c6' c6, fields->>'c7' c7, fields->>'c8' c8 FROM ft1 ORDER BY fields->>'c6' ASC NULLS FIRST, (fields->>'C 1')::int OFFSET 15 LIMIT 10; -- =================================================================== @@ -1730,39 +1958,47 @@ SELECT (fields->>'C 1')::int c1, (fields->>'c2')::int c2, tags->>'c3' c3, fields -- =================================================================== -- Consistent check constraints provide consistent results +--Testcase 478: ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2positive CHECK ((fields->>'c2')::int >= 0); ---Testcase 418: +--Testcase 479: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; -- InfluxDB return null value because it does not have any record. ---Testcase 419: +--Testcase 480: SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; +--Testcase 481: SET constraint_exclusion = 'on'; ---Testcase 420: +--Testcase 482: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; ---Testcase 421: +--Testcase 483: SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int < 0; +--Testcase 484: RESET constraint_exclusion; -- check constraint is enforced on the remote side, not locally -- INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive -- UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive +--Testcase 485: ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2positive; -- But inconsistent check constraints provide inconsistent results +--Testcase 486: ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2negative CHECK ((fields->>'c2')::int < 0); ---Testcase 422: +--Testcase 487: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; ---Testcase 423: +--Testcase 488: SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; +--Testcase 489: SET constraint_exclusion = 'on'; ---Testcase 424: +--Testcase 490: EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; ---Testcase 425: +--Testcase 491: SELECT count(*) FROM ft1 WHERE (fields->>'c2')::int >= 0; +--Testcase 492: RESET constraint_exclusion; -- local check constraint is not actually enforced ---Testcase 426: +--Testcase 493: INSERT INTO ft1_nsc(c1, c2) VALUES(1111, 2); -- UPDATE ft1 SET c2 = c2 + 1 WHERE c1 = 1; +--Testcase 494: ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2negative; -- influxdb_fdw does not support this feature @@ -1770,36 +2006,38 @@ ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2negative; -- test WITH CHECK OPTION constraints -- =================================================================== ---Testcase 427: +--Testcase 495: CREATE FUNCTION row_before_insupd_trigfunc() RETURNS trigger AS $$BEGIN NEW.a := NEW.a + 10; RETURN NEW; END$$ LANGUAGE plpgsql; ---Testcase 428: +--Testcase 496: CREATE FOREIGN TABLE base_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'base_tbl', schemaless 'true'); --ALTER FOREIGN TABLE base_tbl SET (autovacuum_enabled = 'false'); +--Testcase 797: CREATE FOREIGN TABLE base_tbl_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 'base_tbl'); ---Testcase 429: +--Testcase 497: CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON base_tbl_nsc FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); ---Testcase 430: +--Testcase 498: CREATE FOREIGN TABLE foreign_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'base_tbl', schemaless 'true'); ---Testcase 431: +--Testcase 499: CREATE VIEW rw_view AS SELECT * FROM base_tbl WHERE (fields->>'a')::int < (fields->>'b')::int WITH CHECK OPTION; +--Testcase 798: CREATE VIEW rw_view_nsc AS SELECT * FROM base_tbl_nsc WHERE a < b WITH CHECK OPTION; ---Testcase 432: +--Testcase 500: \d+ rw_view ---Testcase 433: +--Testcase 501: EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO rw_view_nsc VALUES (0, 5); ---Testcase 434: +--Testcase 502: INSERT INTO rw_view_nsc VALUES (0, 5); -- should fail ---Testcase 435: +--Testcase 503: EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO rw_view_nsc VALUES (0, 15); ---Testcase 436: +--Testcase 504: INSERT INTO rw_view_nsc VALUES (0, 15); -- ok ---Testcase 437: +--Testcase 505: SELECT * FROM foreign_tbl; --EXPLAIN (VERBOSE, COSTS OFF) @@ -1810,48 +2048,66 @@ SELECT * FROM foreign_tbl; --UPDATE rw_view SET b = b + 15; -- ok --SELECT * FROM foreign_tbl; ---Testcase 438: +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +--Testcase 869: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); +--Testcase 870: +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +--Testcase 871: +SELECT * FROM foreign_tbl; +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); + +--Testcase 506: DELETE FROM foreign_tbl; +--Testcase 799: DROP FOREIGN TABLE foreign_tbl CASCADE; ---Testcase 439: +--Testcase 507: DROP TRIGGER row_before_insupd_trigger ON base_tbl_nsc; ---Testcase 440: +--Testcase 508: DROP FOREIGN TABLE base_tbl CASCADE; +--Testcase 800: DROP FOREIGN TABLE base_tbl_nsc CASCADE; - -- influxdb_fdw does not support partitions -- test WCO for partitions ---Testcase 441: +--Testcase 509: CREATE FOREIGN TABLE child_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'child_tbl', schemaless 'true'); --ALTER FOREIGN TABLE child_tbl SET (autovacuum_enabled = 'false'); +--Testcase 801: CREATE FOREIGN TABLE child_tbl_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 'child_tbl'); ---Testcase 442: +--Testcase 510: CREATE TRIGGER row_before_insupd_trigger BEFORE INSERT OR UPDATE ON child_tbl_nsc FOR EACH ROW EXECUTE PROCEDURE row_before_insupd_trigfunc(); ---Testcase 443: +--Testcase 511: CREATE FOREIGN TABLE foreign_tbl (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'child_tbl', schemaless 'true'); - ---Testcase 444: +--Testcase 512: CREATE TABLE parent_tbl (a int, b int) PARTITION BY RANGE(a); +--Testcase 513: +ALTER TABLE parent_tbl ATTACH PARTITION child_tbl_nsc FOR VALUES FROM (0) TO (100); +-- Detach and re-attach once, to stress the concurrent detach case. +--Testcase 774: +ALTER TABLE parent_tbl DETACH PARTITION child_tbl_nsc CONCURRENTLY; +--Testcase 775: ALTER TABLE parent_tbl ATTACH PARTITION child_tbl_nsc FOR VALUES FROM (0) TO (100); ---Testcase 445: +--Testcase 514: CREATE VIEW rw_view AS SELECT * FROM parent_tbl WHERE a < b WITH CHECK OPTION; ---Testcase 446: +--Testcase 515: \d+ rw_view ---Testcase 447: +--Testcase 516: EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO rw_view VALUES (0, 5); ---Testcase 448: +--Testcase 517: INSERT INTO rw_view VALUES (0, 5); -- should fail ---Testcase 449: +--Testcase 518: EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO rw_view VALUES (0, 15); ---Testcase 450: +--Testcase 519: INSERT INTO rw_view VALUES (0, 15); -- ok ---Testcase 451: +--Testcase 520: SELECT * FROM foreign_tbl; --EXPLAIN (VERBOSE, COSTS OFF) @@ -1862,77 +2118,128 @@ SELECT * FROM foreign_tbl; --UPDATE rw_view SET b = b + 15; -- ok --SELECT * FROM foreign_tbl; ---Testcase 452: +-- We don't allow batch insert when there are any WCO constraints +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); +--Testcase 872: +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO rw_view VALUES (0, 15), (0, 5); +--Testcase 873: +INSERT INTO rw_view VALUES (0, 15), (0, 5); -- should fail +--Testcase 874: +SELECT * FROM foreign_tbl; +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); + +--Testcase 521: DROP FOREIGN TABLE foreign_tbl CASCADE; ---Testcase 453: +--Testcase 522: DROP TRIGGER row_before_insupd_trigger ON child_tbl_nsc; ---Testcase 454: +--Testcase 523: DROP FOREIGN TABLE child_tbl CASCADE; +--Testcase 802: DROP FOREIGN TABLE child_tbl_nsc CASCADE; ---Testcase 455: +--Testcase 524: DROP TABLE parent_tbl CASCADE; ---Testcase 456: +--Testcase 525: DROP FUNCTION row_before_insupd_trigfunc; -- =================================================================== -- test serial columns (ie, sequence-based defaults) -- =================================================================== ---Testcase 457: +--Testcase 526: create foreign table loc1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loc1', schemaless 'true'); --alter foreign table loc1 set (autovacuum_enabled = 'false'); +--Testcase 803: create foreign table loc1_nsc (f1 serial, f2 text) server influxdb_svr options(table 'loc1'); ---Testcase 458: +--Testcase 527: create foreign table rem1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loc1', schemaless 'true'); +--Testcase 804: create foreign table rem1_nsc (f1 serial, f2 text) server influxdb_svr options(table 'loc1'); ---Testcase 459: +--Testcase 528: select pg_catalog.setval('rem1_nsc_f1_seq', 10, false); ---Testcase 460: +--Testcase 529: insert into loc1_nsc(f2) values('hi'); ---Testcase 461: +--Testcase 530: insert into rem1_nsc(f2) values('hi remote'); ---Testcase 462: +--Testcase 531: insert into loc1_nsc(f2) values('bye'); ---Testcase 463: +--Testcase 532: insert into rem1_nsc(f2) values('bye remote'); ---Testcase 464: +--Testcase 533: select * from loc1; ---Testcase 465: +--Testcase 534: select * from rem1; -- =================================================================== -- test generated columns -- =================================================================== ---Testcase 466: +--Testcase 535: create foreign table gloc1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'gloc1', schemaless 'true'); --alter foreign table gloc1 set (autovacuum_enabled = 'false'); -create foreign table gloc1_nsc (a int, b int generated always as (a * 2) stored) +--Testcase 805: +create foreign table gloc1_nsc ( + a int, + b int generated always as (a * 2) stored) server influxdb_svr options(table 'gloc1'); ---Testcase 467: +--Testcase 536: create foreign table grem1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'gloc1', schemaless 'true'); +--Testcase 806: create foreign table grem1_nsc ( a int, b int generated always as (a * 2) stored) server influxdb_svr options(table 'gloc1'); ---Testcase 468: +--Testcase 537: +explain (verbose, costs off) insert into grem1_nsc (a) values (1), (22); +--Testcase 765: +insert into grem1_nsc (a) values (1), (22); +--explain (verbose, costs off) --update grem1 set a = 22 where a = 2; ---Testcase 469: +--update grem1 set a = 22 where a = 2; +--Testcase 538: +select * from gloc1; +--Testcase 539: +select * from grem1; +--Testcase 766: +delete from grem1_nsc; + +/* +-- InfluxDB FDW does not support partition insert +-- test copy from +copy grem1 from stdin; +1 +2 +\. select * from gloc1; ---Testcase 470: select * from grem1; +delete from grem1; +*/ --- Clean up: +-- test batch insert +--Testcase 767: +alter server influxdb_svr options (add batch_size '10'); +--Testcase 768: +explain (verbose, costs off) +insert into grem1_nsc (a) values (1), (2); +--Testcase 769: +insert into grem1_nsc (a) values (1), (2); +--Testcase 770: +select * from gloc1; +--Testcase 771: +select * from grem1; +--Testcase 772: delete from grem1_nsc; +--Testcase 773: +alter server influxdb_svr options (drop batch_size); -- =================================================================== -- test local triggers -- =================================================================== -- Trigger functions "borrowed" from triggers regress test. ---Testcase 471: +--Testcase 540: CREATE FUNCTION trigger_func() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN RAISE NOTICE 'trigger_func(%) called: action = %, when = %, level = %', @@ -1940,14 +2247,14 @@ BEGIN RETURN NULL; END;$$; ---Testcase 472: +--Testcase 541: CREATE TRIGGER trig_stmt_before BEFORE DELETE OR INSERT OR UPDATE ON rem1_nsc FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---Testcase 473: +--Testcase 542: CREATE TRIGGER trig_stmt_after AFTER DELETE OR INSERT OR UPDATE ON rem1_nsc FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); ---Testcase 474: +--Testcase 543: CREATE OR REPLACE FUNCTION trigger_data() RETURNS trigger LANGUAGE plpgsql AS $$ @@ -1988,71 +2295,71 @@ end; $$; -- Test basic functionality ---Testcase 475: +--Testcase 544: CREATE TRIGGER trig_row_before BEFORE INSERT OR UPDATE OR DELETE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 476: +--Testcase 545: CREATE TRIGGER trig_row_after AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 477: +--Testcase 546: delete from rem1_nsc; ---Testcase 478: +--Testcase 547: insert into rem1_nsc values(1,'insert'); --update rem1 set f2 = 'update' where f1 = 1; --update rem1 set f2 = f2 || f2; -- cleanup ---Testcase 479: +--Testcase 548: DROP TRIGGER trig_row_before ON rem1_nsc; ---Testcase 480: +--Testcase 549: DROP TRIGGER trig_row_after ON rem1_nsc; ---Testcase 481: +--Testcase 550: DROP TRIGGER trig_stmt_before ON rem1_nsc; ---Testcase 482: +--Testcase 551: DROP TRIGGER trig_stmt_after ON rem1_nsc; ---Testcase 483: +--Testcase 552: DELETE from rem1_nsc; -- Test multiple AFTER ROW triggers on a foreign table ---Testcase 484: +--Testcase 553: CREATE TRIGGER trig_row_after1 AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 485: +--Testcase 554: CREATE TRIGGER trig_row_after2 AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 486: +--Testcase 555: insert into rem1_nsc values(1,'insert'); --update rem1 set f2 = 'update' where f1 = 1; --update rem1 set f2 = f2 || f2; ---Testcase 487: +--Testcase 556: delete from rem1_nsc; -- cleanup ---Testcase 488: +--Testcase 557: DROP TRIGGER trig_row_after1 ON rem1_nsc; ---Testcase 489: +--Testcase 558: DROP TRIGGER trig_row_after2 ON rem1_nsc; -- Test WHEN conditions ---Testcase 490: +--Testcase 559: CREATE TRIGGER trig_row_before_insupd BEFORE INSERT OR UPDATE ON rem1_nsc FOR EACH ROW WHEN (NEW.f2 like '%update%') EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 491: +--Testcase 560: CREATE TRIGGER trig_row_after_insupd AFTER INSERT OR UPDATE ON rem1_nsc FOR EACH ROW @@ -2060,23 +2367,23 @@ WHEN (NEW.f2 like '%update%') EXECUTE PROCEDURE trigger_data(23,'skidoo'); -- Insert or update not matching: nothing happens ---Testcase 492: +--Testcase 561: INSERT INTO rem1_nsc values(1, 'insert'); --UPDATE rem1 set f2 = 'test'; -- Insert or update matching: triggers are fired ---Testcase 493: +--Testcase 562: INSERT INTO rem1_nsc values(2, 'update'); --UPDATE rem1 set f2 = 'update update' where f1 = '2'; ---Testcase 494: +--Testcase 563: CREATE TRIGGER trig_row_before_delete BEFORE DELETE ON rem1_nsc FOR EACH ROW WHEN (OLD.f2 like '%update%') EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 495: +--Testcase 564: CREATE TRIGGER trig_row_after_delete AFTER DELETE ON rem1_nsc FOR EACH ROW @@ -2084,23 +2391,23 @@ WHEN (OLD.f2 like '%update%') EXECUTE PROCEDURE trigger_data(23,'skidoo'); -- Trigger is fired for f1=2, not for f1=1 ---Testcase 496: +--Testcase 565: DELETE FROM rem1_nsc; -- cleanup ---Testcase 497: +--Testcase 566: DROP TRIGGER trig_row_before_insupd ON rem1_nsc; ---Testcase 498: +--Testcase 567: DROP TRIGGER trig_row_after_insupd ON rem1_nsc; ---Testcase 499: +--Testcase 568: DROP TRIGGER trig_row_before_delete ON rem1_nsc; ---Testcase 500: +--Testcase 569: DROP TRIGGER trig_row_after_delete ON rem1_nsc; -- Test various RETURN statements in BEFORE triggers. ---Testcase 501: +--Testcase 570: CREATE FUNCTION trig_row_before_insupdate() RETURNS TRIGGER AS $$ BEGIN NEW.f2 := NEW.f2 || ' triggered !'; @@ -2108,21 +2415,21 @@ CREATE FUNCTION trig_row_before_insupdate() RETURNS TRIGGER AS $$ END $$ language plpgsql; ---Testcase 502: +--Testcase 571: CREATE TRIGGER trig_row_before_insupd BEFORE INSERT OR UPDATE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); -- The new values should have 'triggered' appended ---Testcase 503: +--Testcase 572: INSERT INTO rem1_nsc values(1, 'insert'); ---Testcase 504: +--Testcase 573: SELECT * from loc1; ---Testcase 505: +--Testcase 574: INSERT INTO rem1_nsc values(2, 'insert'); ---Testcase 506: +--Testcase 575: SELECT fields->>'f2' f2 FROM rem1 WHERE (fields->>'f1')::int = 2; ---Testcase 507: +--Testcase 576: SELECT * from loc1; --UPDATE rem1 set f2 = ''; --SELECT * from loc1; @@ -2134,358 +2441,401 @@ SELECT * from loc1; --UPDATE rem1 set f1 = 10; --SELECT * from loc1; ---Testcase 508: +--Testcase 577: DELETE FROM rem1_nsc; -- Add a second trigger, to check that the changes are propagated correctly -- from trigger to trigger ---Testcase 509: +--Testcase 578: CREATE TRIGGER trig_row_before_insupd2 BEFORE INSERT OR UPDATE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); ---Testcase 510: +--Testcase 579: INSERT INTO rem1_nsc values(1, 'insert'); ---Testcase 511: +--Testcase 580: SELECT * from loc1; ---Testcase 512: +--Testcase 581: INSERT INTO rem1_nsc values(2, 'insert'); ---Testcase 513: +--Testcase 582: SELECT fields->>'f2' f2 FROM rem1 WHERE (fields->>'f1')::int = 2; ---Testcase 514: +--Testcase 583: SELECT * from loc1; --UPDATE rem1 set f2 = ''; --SELECT * from loc1; --UPDATE rem1 set f2 = 'skidoo' RETURNING f2; --SELECT * from loc1; ---Testcase 515: +--Testcase 584: DROP TRIGGER trig_row_before_insupd ON rem1_nsc; ---Testcase 516: +--Testcase 585: DROP TRIGGER trig_row_before_insupd2 ON rem1_nsc; ---Testcase 517: +--Testcase 586: DELETE from rem1_nsc; ---Testcase 518: +--Testcase 587: INSERT INTO rem1_nsc VALUES (1, 'test'); -- Test with a trigger returning NULL ---Testcase 519: +--Testcase 588: CREATE FUNCTION trig_null() RETURNS TRIGGER AS $$ BEGIN RETURN NULL; END $$ language plpgsql; ---Testcase 520: +--Testcase 589: CREATE TRIGGER trig_null BEFORE INSERT OR UPDATE OR DELETE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trig_null(); -- Nothing should have changed. ---Testcase 521: +--Testcase 590: INSERT INTO rem1_nsc VALUES (2, 'test2'); ---Testcase 522: +--Testcase 591: SELECT * from loc1; --UPDATE rem1 SET f2 = 'test2'; --SELECT * from loc1; ---Testcase 523: +--Testcase 592: DELETE from rem1_nsc; ---Testcase 524: +--Testcase 593: SELECT * from loc1; ---Testcase 525: +--Testcase 594: DROP TRIGGER trig_null ON rem1_nsc; ---Testcase 526: +--Testcase 595: DELETE from rem1_nsc; -- Test a combination of local and remote triggers ---Testcase 527: +--Testcase 596: CREATE TRIGGER trig_row_before BEFORE INSERT OR UPDATE OR DELETE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 528: +--Testcase 597: CREATE TRIGGER trig_row_after AFTER INSERT OR UPDATE OR DELETE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); ---Testcase 529: +--Testcase 598: CREATE TRIGGER trig_local_before BEFORE INSERT OR UPDATE ON loc1_nsc FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate(); ---Testcase 530: +--Testcase 599: INSERT INTO rem1_nsc(f2) VALUES ('test'); --UPDATE rem1 SET f2 = 'testo'; -- Test returning a system attribute ---Testcase 531: +--Testcase 600: INSERT INTO rem1_nsc(f2) VALUES ('test'); ---Testcase 532: +--Testcase 601: SELECT * FROM rem1 WHERE fields->>'f2' = 'test'; -- cleanup ---Testcase 533: +--Testcase 602: DROP TRIGGER trig_row_before ON rem1_nsc; ---Testcase 534: +--Testcase 603: DROP TRIGGER trig_row_after ON rem1_nsc; ---Testcase 535: +--Testcase 604: DROP TRIGGER trig_local_before ON loc1_nsc; -- Test direct foreign table modification functionality +--Testcase 774: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc; -- can be pushed down +--Testcase 775: +EXPLAIN (verbose, costs off) +DELETE FROM rem1_nsc WHERE false; -- currently can't be pushed down -- Test with statement-level triggers ---Testcase 536: +--Testcase 605: CREATE TRIGGER trig_stmt_before BEFORE DELETE OR INSERT OR UPDATE ON rem1_nsc FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 537: +--Testcase 606: EXPLAIN (verbose, costs off) DELETE FROM rem1_nsc; -- can be pushed down ---Testcase 538: +--Testcase 607: DROP TRIGGER trig_stmt_before ON rem1_nsc; ---Testcase 539: +--Testcase 608: CREATE TRIGGER trig_stmt_after AFTER DELETE OR INSERT OR UPDATE ON rem1_nsc FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func(); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 540: +--Testcase 609: EXPLAIN (verbose, costs off) DELETE FROM rem1_nsc; -- can be pushed down ---Testcase 541: +--Testcase 610: DROP TRIGGER trig_stmt_after ON rem1_nsc; -- Test with row-level ON INSERT triggers ---Testcase 542: +--Testcase 611: CREATE TRIGGER trig_row_before_insert BEFORE INSERT ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 543: +--Testcase 612: EXPLAIN (verbose, costs off) DELETE FROM rem1_nsc; -- can be pushed down ---Testcase 544: +--Testcase 613: DROP TRIGGER trig_row_before_insert ON rem1_nsc; ---Testcase 545: +--Testcase 614: CREATE TRIGGER trig_row_after_insert AFTER INSERT ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 546: +--Testcase 615: EXPLAIN (verbose, costs off) DELETE FROM rem1_nsc; -- can be pushed down ---Testcase 547: +--Testcase 616: DROP TRIGGER trig_row_after_insert ON rem1_nsc; -- Test with row-level ON UPDATE triggers ---Testcase 548: +--Testcase 617: CREATE TRIGGER trig_row_before_update BEFORE UPDATE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can't be pushed down ---Testcase 549: +--Testcase 618: EXPLAIN (verbose, costs off) DELETE FROM rem1_nsc; -- can be pushed down ---Testcase 550: +--Testcase 619: DROP TRIGGER trig_row_before_update ON rem1_nsc; ---Testcase 551: +--Testcase 620: CREATE TRIGGER trig_row_after_update AFTER UPDATE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can't be pushed down ---Testcase 552: +--Testcase 621: EXPLAIN (verbose, costs off) DELETE FROM rem1_nsc; -- can be pushed down ---Testcase 553: +--Testcase 622: DROP TRIGGER trig_row_after_update ON rem1_nsc; -- Test with row-level ON DELETE triggers ---Testcase 554: +--Testcase 623: CREATE TRIGGER trig_row_before_delete BEFORE DELETE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 555: +--Testcase 624: EXPLAIN (verbose, costs off) DELETE FROM rem1_nsc; -- can't be pushed down ---Testcase 556: +--Testcase 625: DROP TRIGGER trig_row_before_delete ON rem1_nsc; ---Testcase 557: +--Testcase 626: CREATE TRIGGER trig_row_after_delete AFTER DELETE ON rem1_nsc FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); --EXPLAIN (verbose, costs off) --UPDATE rem1 set f2 = ''; -- can be pushed down ---Testcase 558: +--Testcase 627: EXPLAIN (verbose, costs off) DELETE FROM rem1_nsc; -- can't be pushed down ---Testcase 559: +--Testcase 628: DROP TRIGGER trig_row_after_delete ON rem1_nsc; -- =================================================================== -- test inheritance features -- =================================================================== ---Testcase 560: +--Testcase 629: CREATE TABLE a (aa TEXT); --CREATE TABLE loct (aa TEXT, bb TEXT); +--Testcase 630: ALTER TABLE a SET (autovacuum_enabled = 'false'); --ALTER TABLE loct SET (autovacuum_enabled = 'false'); -- Because influxdb_fdw does not support UPDATE, to test locally -- we create local table. ---Testcase 561: +--Testcase 631: CREATE TABLE b (bb TEXT) INHERITS (a); ---Testcase 562: +--Testcase 632: INSERT INTO a(aa) VALUES('aaa'); ---Testcase 563: +--Testcase 633: INSERT INTO a(aa) VALUES('aaaa'); ---Testcase 564: +--Testcase 634: INSERT INTO a(aa) VALUES('aaaaa'); ---Testcase 565: +--Testcase 635: INSERT INTO b(aa) VALUES('bbb'); ---Testcase 566: +--Testcase 636: INSERT INTO b(aa) VALUES('bbbb'); ---Testcase 567: +--Testcase 637: INSERT INTO b(aa) VALUES('bbbbb'); ---Testcase 568: +--Testcase 638: SELECT tableoid::regclass, * FROM a; ---Testcase 569: +--Testcase 639: SELECT tableoid::regclass, * FROM b; ---Testcase 570: +--Testcase 640: SELECT tableoid::regclass, * FROM ONLY a; ---Testcase 571: +--Testcase 641: UPDATE a SET aa = 'zzzzzz' WHERE aa LIKE 'aaaa%'; ---Testcase 572: +--Testcase 642: SELECT tableoid::regclass, * FROM a; ---Testcase 573: +--Testcase 643: SELECT tableoid::regclass, * FROM b; ---Testcase 574: +--Testcase 644: SELECT tableoid::regclass, * FROM ONLY a; ---Testcase 575: +--Testcase 645: UPDATE b SET aa = 'new'; ---Testcase 576: +--Testcase 646: SELECT tableoid::regclass, * FROM a; ---Testcase 577: +--Testcase 647: SELECT tableoid::regclass, * FROM b; ---Testcase 578: +--Testcase 648: SELECT tableoid::regclass, * FROM ONLY a; ---Testcase 579: +--Testcase 649: UPDATE a SET aa = 'newtoo'; ---Testcase 580: +--Testcase 650: SELECT tableoid::regclass, * FROM a; ---Testcase 581: +--Testcase 651: SELECT tableoid::regclass, * FROM b; ---Testcase 582: +--Testcase 652: SELECT tableoid::regclass, * FROM ONLY a; ---Testcase 583: +--Testcase 653: DELETE FROM a; ---Testcase 584: +--Testcase 654: SELECT tableoid::regclass, * FROM a; ---Testcase 585: +--Testcase 655: SELECT tableoid::regclass, * FROM b; ---Testcase 586: +--Testcase 656: SELECT tableoid::regclass, * FROM ONLY a; ---Testcase 587: +--Testcase 657: DROP TABLE a CASCADE; --DROP TABLE loct; -- Check SELECT FOR UPDATE/SHARE with an inherited source table ---Testcase 588: +--Testcase 658: create foreign table loct1 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct1', schemaless 'true'); +--Testcase 807: create foreign table loct1_nsc (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct1'); ---Testcase 589: +--Testcase 659: create foreign table loct2 (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'loct2', schemaless 'true'); +--Testcase 808: create foreign table loct2_nsc (f1 int, f2 int, f3 int) server influxdb_svr options(table 'loct2'); + --alter table loct1 set (autovacuum_enabled = 'false'); --alter table loct2 set (autovacuum_enabled = 'false'); ---Testcase 590: +--Testcase 660: create foreign table foo (fields jsonb OPTIONS(fields 'true')) SERVER influxdb_svr OPTIONS (table 'foo', schemaless 'true'); +--Testcase 809: create foreign table foo_nsc (f1 int, f2 int) server influxdb_svr options (table 'foo'); ---Testcase 591: +--Testcase 661: create foreign table foo2 (fields jsonb OPTIONS(fields 'true')) inherits (foo) server influxdb_svr options (table 'loct1', schemaless 'true'); +--Testcase 810: create foreign table foo2_nsc (f3 int) inherits (foo_nsc) server influxdb_svr options (table 'loct1'); ---Testcase 592: +--Testcase 662: create foreign table bar (fields jsonb OPTIONS(fields 'true')) server influxdb_svr options (table 'bar', schemaless 'true'); +--Testcase 811: create foreign table bar_nsc (f1 int, f2 int) server influxdb_svr options (table 'bar'); ---Testcase 593: +--Testcase 663: create foreign table bar2 (fields jsonb OPTIONS(fields 'true')) inherits (bar) server influxdb_svr options (table 'loct2', schemaless 'true'); +--Testcase 812: create foreign table bar2_nsc (f3 int) inherits (bar_nsc) server influxdb_svr options (table 'loct2'); --alter table foo set (autovacuum_enabled = 'false'); --alter table bar set (autovacuum_enabled = 'false'); ---Testcase 594: +--Testcase 664: insert into foo_nsc values(1,1); ---Testcase 595: +--Testcase 665: insert into foo_nsc values(3,3); ---Testcase 596: +--Testcase 666: insert into foo2_nsc values(2,2,2); ---Testcase 597: +--Testcase 667: insert into foo2_nsc values(4,4,4); ---Testcase 598: +--Testcase 668: insert into bar_nsc values(1,11); ---Testcase 599: +--Testcase 669: insert into bar_nsc values(2,22); ---Testcase 600: +--Testcase 670: insert into bar_nsc values(6,66); ---Testcase 601: +--Testcase 671: insert into bar2_nsc values(3,33,33); ---Testcase 602: +--Testcase 672: insert into bar2_nsc values(4,44,44); ---Testcase 603: +--Testcase 673: insert into bar2_nsc values(7,77,77); ---Testcase 604: +--Testcase 674: explain (verbose, costs off) select * from bar where fields->>'f1' in (select fields->>'f1' from foo); ---Testcase 605: +--Testcase 675: select * from bar where fields->>'f1' in (select fields->>'f1' from foo); ---Testcase 606: +--Testcase 676: explain (verbose, costs off) select * from bar where fields->>'f1' in (select fields->>'f1' from foo); ---Testcase 607: +--Testcase 677: select * from bar where fields->>'f1' in (select fields->>'f1' from foo); +-- Now check SELECT FOR UPDATE/SHARE with an inherited source table, +-- where the parent is itself a foreign table +--Testcase 678: +create foreign table foo2child (fields jsonb OPTIONS(fields 'true')) inherits (foo2) + server influxdb_svr options (table 'loct4', schemaless 'true'); + +--Testcase 679: +explain (verbose, costs off) +select * from bar where fields->>'f1' in (select fields->>'f1' from foo2) for share; +--Testcase 680: +select * from bar where fields->>'f1' in (select fields->>'f1' from foo2) for share; + +--Testcase 681: +drop foreign table foo2child; + +-- And with a local child relation of the foreign table parent +--Testcase 682: +create foreign table foo2child (fields jsonb OPTIONS(fields 'true')) inherits (foo2) + server influxdb_svr options (table 'foo2child', schemaless 'true'); + +--Testcase 683: +explain (verbose, costs off) +select * from bar where fields->>'f1' in (select fields->>'f1' from foo2) for share; +--Testcase 684: +select * from bar where fields->>'f1' in (select fields->>'f1' from foo2) for share; + +--Testcase 685: +drop foreign table foo2child; + /* -- influxdb_fdw does not support UPDATE -- Check UPDATE with inherited target and an inherited source table @@ -2951,47 +3301,158 @@ select * from rem3; drop foreign table rem3; drop table loc3; */ + +/* +-- Skip test because influxdb does not support TRUNCATE +-- =================================================================== +-- test for TRUNCATE +-- =================================================================== +CREATE TABLE tru_rtable0 (id int primary key); +CREATE FOREIGN TABLE tru_ftable (id int) + SERVER loopback OPTIONS (table_name 'tru_rtable0'); +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(1,10) x); + +CREATE TABLE tru_ptable (id int) PARTITION BY HASH(id); +CREATE TABLE tru_ptable__p0 PARTITION OF tru_ptable + FOR VALUES WITH (MODULUS 2, REMAINDER 0); +CREATE TABLE tru_rtable1 (id int primary key); +CREATE FOREIGN TABLE tru_ftable__p1 PARTITION OF tru_ptable + FOR VALUES WITH (MODULUS 2, REMAINDER 1) + SERVER loopback OPTIONS (table_name 'tru_rtable1'); +INSERT INTO tru_ptable (SELECT x FROM generate_series(11,20) x); + +CREATE TABLE tru_pk_table(id int primary key); +CREATE TABLE tru_fk_table(fkey int references tru_pk_table(id)); +INSERT INTO tru_pk_table (SELECT x FROM generate_series(1,10) x); +INSERT INTO tru_fk_table (SELECT x % 10 + 1 FROM generate_series(5,25) x); +CREATE FOREIGN TABLE tru_pk_ftable (id int) + SERVER loopback OPTIONS (table_name 'tru_pk_table'); + +CREATE TABLE tru_rtable_parent (id int); +CREATE TABLE tru_rtable_child (id int); +CREATE FOREIGN TABLE tru_ftable_parent (id int) + SERVER loopback OPTIONS (table_name 'tru_rtable_parent'); +CREATE FOREIGN TABLE tru_ftable_child () INHERITS (tru_ftable_parent) + SERVER loopback OPTIONS (table_name 'tru_rtable_child'); +INSERT INTO tru_rtable_parent (SELECT x FROM generate_series(1,8) x); +INSERT INTO tru_rtable_child (SELECT x FROM generate_series(10, 18) x); + +-- normal truncate +SELECT sum(id) FROM tru_ftable; -- 55 +TRUNCATE tru_ftable; +SELECT count(*) FROM tru_rtable0; -- 0 +SELECT count(*) FROM tru_ftable; -- 0 + +-- 'truncatable' option +ALTER SERVER loopback OPTIONS (ADD truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER FOREIGN TABLE tru_ftable OPTIONS (ADD truncatable 'true'); +TRUNCATE tru_ftable; -- accepted +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER SERVER loopback OPTIONS (DROP truncatable); +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'false'); +TRUNCATE tru_ftable; -- error +ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'true'); +TRUNCATE tru_ftable; -- accepted + +-- partitioned table with both local and foreign tables as partitions +SELECT sum(id) FROM tru_ptable; -- 155 +TRUNCATE tru_ptable; +SELECT count(*) FROM tru_ptable; -- 0 +SELECT count(*) FROM tru_ptable__p0; -- 0 +SELECT count(*) FROM tru_ftable__p1; -- 0 +SELECT count(*) FROM tru_rtable1; -- 0 + +-- 'CASCADE' option +SELECT sum(id) FROM tru_pk_ftable; -- 55 +TRUNCATE tru_pk_ftable; -- failed by FK reference +TRUNCATE tru_pk_ftable CASCADE; +SELECT count(*) FROM tru_pk_ftable; -- 0 +SELECT count(*) FROM tru_fk_table; -- also truncated,0 + +-- truncate two tables at a command +INSERT INTO tru_ftable (SELECT x FROM generate_series(1,8) x); +INSERT INTO tru_pk_ftable (SELECT x FROM generate_series(3,10) x); +SELECT count(*) from tru_ftable; -- 8 +SELECT count(*) from tru_pk_ftable; -- 8 +TRUNCATE tru_ftable, tru_pk_ftable CASCADE; +SELECT count(*) from tru_ftable; -- 0 +SELECT count(*) from tru_pk_ftable; -- 0 + +-- truncate with ONLY clause +-- Since ONLY is specified, the table tru_ftable_child that inherits +-- tru_ftable_parent locally is not truncated. +TRUNCATE ONLY tru_ftable_parent; +SELECT sum(id) FROM tru_ftable_parent; -- 126 +TRUNCATE tru_ftable_parent; +SELECT count(*) FROM tru_ftable_parent; -- 0 + +-- in case when remote table has inherited children +CREATE TABLE tru_rtable0_child () INHERITS (tru_rtable0); +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(5,9) x); +INSERT INTO tru_rtable0_child (SELECT x FROM generate_series(10,14) x); +SELECT sum(id) FROM tru_ftable; -- 95 + +-- Both parent and child tables in the foreign server are truncated +-- even though ONLY is specified because ONLY has no effect +-- when truncating a foreign table. +TRUNCATE ONLY tru_ftable; +SELECT count(*) FROM tru_ftable; -- 0 + +INSERT INTO tru_rtable0 (SELECT x FROM generate_series(21,25) x); +INSERT INTO tru_rtable0_child (SELECT x FROM generate_series(26,30) x); +SELECT sum(id) FROM tru_ftable; -- 255 +TRUNCATE tru_ftable; -- truncate both of parent and child +SELECT count(*) FROM tru_ftable; -- 0 + +-- cleanup +DROP FOREIGN TABLE tru_ftable_parent, tru_ftable_child, tru_pk_ftable,tru_ftable__p1,tru_ftable; +DROP TABLE tru_rtable0, tru_rtable1, tru_ptable, tru_ptable__p0, tru_pk_table, tru_fk_table, +tru_rtable_parent,tru_rtable_child, tru_rtable0_child; +*/ + -- =================================================================== -- test IMPORT FOREIGN SCHEMA -- =================================================================== ---Testcase 608: +--Testcase 686: CREATE SCHEMA import_influx1; IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx1 OPTIONS (schemaless 'true'); ---Testcase 609: +--Testcase 687: \det+ import_influx1.* ---Testcase 610: +--Testcase 688: \d import_influx1.* -- Options ---Testcase 611: +--Testcase 689: CREATE SCHEMA import_influx2; IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx2 OPTIONS (import_default 'true', schemaless 'true'); ---Testcase 612: +--Testcase 690: \det+ import_influx2.* ---Testcase 613: +--Testcase 691: \d import_influx2.* ---Testcase 614: +--Testcase 692: CREATE SCHEMA import_influx3; IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO import_influx3 OPTIONS (import_collate 'false', import_not_null 'false', schemaless 'true'); ---Testcase 615: +--Testcase 693: \det+ import_influx3.* ---Testcase 616: +--Testcase 694: \d import_influx3.* -- Check LIMIT TO and EXCEPT ---Testcase 617: +--Testcase 695: CREATE SCHEMA import_influx4; IMPORT FOREIGN SCHEMA public LIMIT TO ("T1", loct, nonesuch) FROM SERVER influxdb_svr INTO import_influx4 OPTIONS (schemaless 'true'); ---Testcase 618: +--Testcase 696: \det+ import_influx4.* IMPORT FOREIGN SCHEMA public EXCEPT ("T1", loct, nonesuch) FROM SERVER influxdb_svr INTO import_influx4 OPTIONS (schemaless 'true'); ---Testcase 619: +--Testcase 697: \det+ import_influx4.* -- Assorted error cases @@ -3203,7 +3664,7 @@ $d$; CREATE USER MAPPING FOR public SERVER loopback_nopw; CREATE USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; -CREATE FOREIGN TABLE ft1_nopw ( +CREATE FOREIGN TABLE pg_temp.ft1_nopw ( c1 int NOT NULL, c2 int NOT NULL, c3 text, @@ -3214,7 +3675,7 @@ CREATE FOREIGN TABLE ft1_nopw ( c8 user_enum ) SERVER loopback_nopw OPTIONS (schema_name 'public', table_name 'ft1'); -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; -- If we add a password to the connstr it'll fail, because we don't allow passwords -- in connstrs only in user mappings. @@ -3232,13 +3693,13 @@ $d$; ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; -- Unpriv user cannot make the mapping passwordless ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password_required 'false'); -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; RESET ROLE; @@ -3248,7 +3709,7 @@ ALTER USER MAPPING FOR regress_nosuper SERVER loopback_nopw OPTIONS (ADD passwor SET ROLE regress_nosuper; -- Should finally work now -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; -- unpriv user also cannot set sslcert / sslkey on the user mapping -- first set password_required so we see the right error messages @@ -3262,13 +3723,13 @@ DROP USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; -- This will fail again as it'll resolve the user mapping for public, which -- lacks password_required=false -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; RESET ROLE; -- The user mapping for public is passwordless and lacks the password_required=false -- mapping option, but will work because the current user is a superuser. -SELECT * FROM ft1_nopw LIMIT 1; +SELECT 1 FROM ft1_nopw LIMIT 1; -- cleanup DROP USER MAPPING FOR public SERVER loopback_nopw; @@ -3279,58 +3740,920 @@ DROP ROLE regress_nosuper; -- influxdb_fdw does not support transactions -- Two-phase transactions are not supported. --BEGIN; ---Testcase 620: +--Testcase 698: SELECT count(*) FROM ft1; -- error here --PREPARE TRANSACTION 'fdw_tpc'; --ROLLBACK; +/* +-- Influxdb_fdw does not use connection, and does not support connection functions +-- =================================================================== +-- reestablish new connection +-- =================================================================== + +-- Change application_name of remote connection to special one +-- so that we can easily terminate the connection later. +ALTER SERVER loopback OPTIONS (application_name 'fdw_retry_check'); + +-- If debug_discard_caches is active, it results in +-- dropping remote connections after every transaction, making it +-- impossible to test termination meaningfully. So turn that off +-- for this test. +SET debug_discard_caches = 0; + +-- Make sure we have a remote connection. +SELECT 1 FROM ft1 LIMIT 1; + +-- Terminate the remote connection and wait for the termination to complete. +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = 'fdw_retry_check'; + +-- This query should detect the broken connection when starting new remote +-- transaction, reestablish new connection, and then succeed. +BEGIN; +SELECT 1 FROM ft1 LIMIT 1; + +-- If we detect the broken connection when starting a new remote +-- subtransaction, we should fail instead of establishing a new connection. +-- Terminate the remote connection and wait for the termination to complete. +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = 'fdw_retry_check'; +SAVEPOINT s; +-- The text of the error might vary across platforms, so only show SQLSTATE. +\set VERBOSITY sqlstate +SELECT 1 FROM ft1 LIMIT 1; -- should fail +\set VERBOSITY default +COMMIT; + +RESET debug_discard_caches; + +-- ============================================================================= +-- test connection invalidation cases and postgres_fdw_get_connections function +-- ============================================================================= +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- This test case is for closing the connection in pgfdw_xact_callback +BEGIN; +-- Connection xact depth becomes 1 i.e. the connection is in midst of the xact. +SELECT 1 FROM ft1 LIMIT 1; +SELECT 1 FROM ft7 LIMIT 1; +-- List all the existing cached connections. loopback and loopback3 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Connections are not closed at the end of the alter and drop statements. +-- That's because the connections are in midst of this xact, +-- they are just marked as invalid in pgfdw_inval_callback. +ALTER SERVER loopback OPTIONS (ADD use_remote_estimate 'off'); +DROP SERVER loopback3 CASCADE; +-- List all the existing cached connections. loopback and loopback3 +-- should be output as invalid connections. Also the server name for +-- loopback3 should be NULL because the server was dropped. +SELECT * FROM postgres_fdw_get_connections() ORDER BY 1; +-- The invalid connections get closed in pgfdw_xact_callback during commit. +COMMIT; +-- All cached connections were closed while committing above xact, so no +-- records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- ======================================================================= +-- test postgres_fdw_disconnect and postgres_fdw_disconnect_all functions +-- ======================================================================= +BEGIN; +-- Ensure to cache loopback connection. +SELECT 1 FROM ft1 LIMIT 1; +-- Ensure to cache loopback2 connection. +SELECT 1 FROM ft6 LIMIT 1; +-- List all the existing cached connections. loopback and loopback2 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Issue a warning and return false as loopback connection is still in use and +-- can not be closed. +SELECT postgres_fdw_disconnect('loopback'); +-- List all the existing cached connections. loopback and loopback2 should be +-- output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +-- Return false as connections are still in use, warnings are issued. +-- But disable warnings temporarily because the order of them is not stable. +SET client_min_messages = 'ERROR'; +SELECT postgres_fdw_disconnect_all(); +RESET client_min_messages; +COMMIT; +-- Ensure that loopback2 connection is closed. +SELECT 1 FROM postgres_fdw_disconnect('loopback2'); +SELECT server_name FROM postgres_fdw_get_connections() WHERE server_name = 'loopback2'; +-- Return false as loopback2 connection is closed already. +SELECT postgres_fdw_disconnect('loopback2'); +-- Return an error as there is no foreign server with given name. +SELECT postgres_fdw_disconnect('unknownserver'); +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- ============================================================================= +-- test case for having multiple cached connections for a foreign server +-- ============================================================================= +CREATE ROLE regress_multi_conn_user1 SUPERUSER; +CREATE ROLE regress_multi_conn_user2 SUPERUSER; +CREATE USER MAPPING FOR regress_multi_conn_user1 SERVER loopback; +CREATE USER MAPPING FOR regress_multi_conn_user2 SERVER loopback; + +BEGIN; +-- Will cache loopback connection with user mapping for regress_multi_conn_user1 +SET ROLE regress_multi_conn_user1; +SELECT 1 FROM ft1 LIMIT 1; +RESET ROLE; + +-- Will cache loopback connection with user mapping for regress_multi_conn_user2 +SET ROLE regress_multi_conn_user2; +SELECT 1 FROM ft1 LIMIT 1; +RESET ROLE; + +-- Should output two connections for loopback server +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +COMMIT; +-- Let's ensure to close all the existing cached connections. +SELECT 1 FROM postgres_fdw_disconnect_all(); +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; + +-- Clean up +DROP USER MAPPING FOR regress_multi_conn_user1 SERVER loopback; +DROP USER MAPPING FOR regress_multi_conn_user2 SERVER loopback; +DROP ROLE regress_multi_conn_user1; +DROP ROLE regress_multi_conn_user2; + +-- =================================================================== +-- Test foreign server level option keep_connections +-- =================================================================== +-- By default, the connections associated with foreign server are cached i.e. +-- keep_connections option is on. Set it to off. +ALTER SERVER loopback OPTIONS (keep_connections 'off'); +-- connection to loopback server is closed at the end of xact +-- as keep_connections was set to off. +SELECT 1 FROM ft1 LIMIT 1; +-- No cached connections, so no records should be output. +SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; +ALTER SERVER loopback OPTIONS (SET keep_connections 'on'); +*/ + +-- =================================================================== +-- batch insert +-- =================================================================== + +BEGIN; + +--Testcase 699: +CREATE SERVER batch10 FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS(dbname 'postdb', :SERVER, batch_size '10' ); + +--Testcase 700: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=10']; + +--Testcase 701: +ALTER SERVER batch10 OPTIONS( SET batch_size '20' ); + +--Testcase 702: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=10']; + +--Testcase 703: +SELECT count(*) +FROM pg_foreign_server +WHERE srvname = 'batch10' +AND srvoptions @> array['batch_size=20']; + +--Testcase 704: +CREATE FOREIGN TABLE table30 (fields jsonb OPTIONS(fields 'true')) + server batch10 options ( batch_size '30', schemaless 'true'); + +--Testcase 705: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=30']; + +--Testcase 706: +ALTER FOREIGN TABLE table30 OPTIONS ( SET batch_size '40'); + +--Testcase 707: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=30']; + +--Testcase 708: +SELECT COUNT(*) +FROM pg_foreign_table +WHERE ftrelid = 'table30'::regclass +AND ftoptions @> array['batch_size=40']; + +ROLLBACK; + +--Testcase 709: +CREATE FOREIGN TABLE batch_table (fields jsonb OPTIONS(fields 'true')) + SERVER influxdb_svr options (schemaless 'true'); +--Testcase 813: +CREATE FOREIGN TABLE batch_table_nsc ( x int ) SERVER influxdb_svr OPTIONS (table 'batch_table'); +--Testcase 710: +CREATE FOREIGN TABLE ftable (fields jsonb OPTIONS(fields 'true')) + SERVER influxdb_svr options ( table 'batch_table', batch_size '10', schemaless 'true'); +--Testcase 814: +CREATE FOREIGN TABLE ftable_nsc ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '10' ); +--Testcase 711: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable_nsc SELECT * FROM generate_series(1, 10) i; +--Testcase 712: +INSERT INTO ftable_nsc SELECT * FROM generate_series(1, 10) i; +--Testcase 713: +INSERT INTO ftable_nsc SELECT * FROM generate_series(11, 31) i; +--Testcase 714: +INSERT INTO ftable_nsc VALUES (32); +--Testcase 715: +INSERT INTO ftable_nsc VALUES (33), (34); +--Testcase 716: +SELECT COUNT(*) FROM ftable; +--Testcase 717: +DELETE FROM batch_table_nsc; +--Testcase 718: +DROP FOREIGN TABLE ftable; +--Testcase 815: +DROP FOREIGN TABLE ftable_nsc; + +-- try if large batches exceed max number of bind parameters +--Testcase 719: +CREATE FOREIGN TABLE ftable (fields jsonb OPTIONS(fields 'true')) + SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '100000', schemaless 'true' ); +--Testcase 816: +CREATE FOREIGN TABLE ftable_nsc ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '100000' ); +--Testcase 720: +INSERT INTO ftable_nsc SELECT * FROM generate_series(1, 70000) i; +--Testcase 721: +SELECT COUNT(*) FROM ftable; +--Testcase 722: +DELETE FROM batch_table_nsc; +--Testcase 723: +DROP FOREIGN TABLE ftable; +--Testcase 817: +DROP FOREIGN TABLE ftable_nsc; + +-- Disable batch insert +--Testcase 724: +CREATE FOREIGN TABLE ftable (fields jsonb OPTIONS(fields 'true')) + SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '1', schemaless 'true' ); +--Testcase 818: +CREATE FOREIGN TABLE ftable_nsc ( x int ) SERVER influxdb_svr OPTIONS ( table 'batch_table', batch_size '1' ); +--Testcase 725: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable_nsc VALUES (1), (2); +--Testcase 726: +INSERT INTO ftable_nsc VALUES (1), (2); +--Testcase 727: +SELECT COUNT(*) FROM ftable; + +-- Disable batch inserting into foreign tables with BEFORE ROW INSERT triggers +-- even if the batch_size option is enabled. +--Testcase 776: +ALTER FOREIGN TABLE ftable OPTIONS ( SET batch_size '10' ); +--Testcase 777: +CREATE TRIGGER trig_row_before BEFORE INSERT ON ftable_nsc +FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); +--Testcase 778: +EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable_nsc VALUES (3), (4); +--Testcase 779: +INSERT INTO ftable_nsc VALUES (3), (4); +--Testcase 780: +SELECT COUNT(*) FROM ftable; + +-- Clean up +--Testcase 781: +DROP TRIGGER trig_row_before ON ftable_nsc; + +--Testcase 728: +DROP FOREIGN TABLE ftable; +--Testcase 819: +DROP FOREIGN TABLE ftable_nsc; +--Testcase 729: +DELETE FROM batch_table_nsc; +--Testcase 820: +DROP FOREIGN TABLE batch_table; +--Testcase 821: +DROP FOREIGN TABLE batch_table_nsc; + +-- influxdb_fdw does not support partition insert +-- Use partitioning +--Testcase 730: +CREATE TABLE batch_table ( x int ) PARTITION BY HASH (x); + +--Testcase 731: +CREATE TABLE batch_table_p0 (LIKE batch_table); +--Testcase 732: +CREATE FOREIGN TABLE batch_table_p0f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 0) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p0', batch_size '10', schemaless 'true'); + +--Testcase 733: +CREATE TABLE batch_table_p1 (LIKE batch_table); +--Testcase 734: +CREATE FOREIGN TABLE batch_table_p1f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 1) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p1', batch_size '1', schemaless 'true'); + +--Testcase 735: +CREATE TABLE batch_table_p2 + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 3, REMAINDER 2); + +--Testcase 736: +INSERT INTO batch_table SELECT * FROM generate_series(1, 66) i; +--Testcase 737: +SELECT COUNT(*) FROM batch_table; + +-- Check that enabling batched inserts doesn't interfere with cross-partition +-- updates +--Testcase 738: +CREATE TABLE batch_cp_upd_test (a int) PARTITION BY LIST (a); +--Testcase 739: +CREATE TABLE batch_cp_upd_test1 (LIKE batch_cp_upd_test); +--Testcase 740: +CREATE FOREIGN TABLE batch_cp_upd_test1_f + PARTITION OF batch_cp_upd_test + FOR VALUES IN (1) + SERVER influxdb_svr + OPTIONS (table 'batch_cp_upd_test1', batch_size '10', schemaless 'true'); +--Testcase 741: +CREATE TABLE batch_cp_up_test1 PARTITION OF batch_cp_upd_test + FOR VALUES IN (2); +--Testcase 742: +INSERT INTO batch_cp_upd_test VALUES (1), (2); + +-- The following moves a row from the local partition to the foreign one +-- influxdb_fdw does not support UPDATE +-- UPDATE batch_cp_upd_test t SET a = 1 FROM (VALUES (1), (2)) s(a) WHERE t.a = s.a; +--Testcase 743: +SELECT tableoid::regclass, * FROM batch_cp_upd_test; + +-- Clean up +--Testcase 744: +DROP TABLE batch_table, batch_cp_upd_test, batch_table_p0, batch_table_p1 CASCADE; + +-- influxdb_fdw does not support partition insert +-- Use partitioning +--Testcase 745: +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); + +--Testcase 746: +CREATE TABLE batch_table ( x int, field1 text, field2 text) PARTITION BY HASH (x); + +--Testcase 747: +CREATE TABLE batch_table_p0 (LIKE batch_table); +--Testcase 748: +ALTER TABLE batch_table_p0 ADD CONSTRAINT p0_pkey PRIMARY KEY (x); +--Testcase 749: +CREATE FOREIGN TABLE batch_table_p0f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 2, REMAINDER 0) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p0', schemaless 'true'); + +--Testcase 750: +CREATE TABLE batch_table_p1 (LIKE batch_table); +--Testcase 751: +ALTER TABLE batch_table_p1 ADD CONSTRAINT p1_pkey PRIMARY KEY (x); +--Testcase 752: +CREATE FOREIGN TABLE batch_table_p1f + PARTITION OF batch_table + FOR VALUES WITH (MODULUS 2, REMAINDER 1) + SERVER influxdb_svr + OPTIONS (table 'batch_table_p1', schemaless 'true'); + +--Testcase 753: +INSERT INTO batch_table SELECT i, 'test'||i, 'test'|| i FROM generate_series(1, 50) i; +--Testcase 754: +SELECT COUNT(*) FROM batch_table; +--Testcase 755: +SELECT * FROM batch_table ORDER BY x; + +--Testcase 756: +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); + +-- Clean up +--Testcase 757: +DROP TABLE batch_table, batch_table_p0, batch_table_p1 CASCADE; +/* InfluxDB does not support partition table +-- =================================================================== +-- test asynchronous execution +-- =================================================================== + +ALTER SERVER loopback OPTIONS (DROP extensions); +ALTER SERVER loopback OPTIONS (ADD async_capable 'true'); +ALTER SERVER loopback2 OPTIONS (ADD async_capable 'true'); + +CREATE TABLE async_pt (a int, b int, c text) PARTITION BY RANGE (a); +CREATE TABLE base_tbl1 (a int, b int, c text); +CREATE TABLE base_tbl2 (a int, b int, c text); +CREATE FOREIGN TABLE async_p1 PARTITION OF async_pt FOR VALUES FROM (1000) TO (2000) + SERVER loopback OPTIONS (table_name 'base_tbl1'); +CREATE FOREIGN TABLE async_p2 PARTITION OF async_pt FOR VALUES FROM (2000) TO (3000) + SERVER loopback2 OPTIONS (table_name 'base_tbl2'); +INSERT INTO async_p1 SELECT 1000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +INSERT INTO async_p2 SELECT 2000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +-- simple queries +CREATE TABLE result_tbl (a int, b int, c text); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b % 100 = 0; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b % 100 = 0; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT a, b, 'AAA' || c FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT a, b, 'AAA' || c FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- Check case where multiple partitions use the same connection +CREATE TABLE base_tbl3 (a int, b int, c text); +CREATE FOREIGN TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO (4000) + SERVER loopback2 OPTIONS (table_name 'base_tbl3'); +INSERT INTO async_p3 SELECT 3000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +DROP FOREIGN TABLE async_p3; +DROP TABLE base_tbl3; + +-- Check case where the partitioned table has local/remote partitions +CREATE TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO (4000); +INSERT INTO async_p3 SELECT 3000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; +ANALYZE async_pt; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; +INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- partitionwise joins +SET enable_partitionwise_join TO true; + +CREATE TABLE join_tbl (a1 int, b1 int, c1 text, a2 int, b2 int, c2 text); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT * FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT * FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT t1.a, t1.b, 'AAA' || t1.c, t2.a, t2.b, 'AAA' || t2.c FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT t1.a, t1.b, 'AAA' || t1.c, t2.a, t2.b, 'AAA' || t2.c FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +RESET enable_partitionwise_join; + +-- Test rescan of an async Append node with do_exec_prune=false +SET enable_hashjoin TO false; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO join_tbl SELECT * FROM async_p1 t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; +INSERT INTO join_tbl SELECT * FROM async_p1 t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +RESET enable_hashjoin; + +-- Test interaction of async execution with plan-time partition pruning +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE a < 3000; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE a < 2000; + +-- Test interaction of async execution with run-time partition pruning +SET plan_cache_mode TO force_generic_plan; + +PREPARE async_pt_query (int, int) AS + INSERT INTO result_tbl SELECT * FROM async_pt WHERE a < $1 AND b === $2; + +EXPLAIN (VERBOSE, COSTS OFF) +EXECUTE async_pt_query (3000, 505); +EXECUTE async_pt_query (3000, 505); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +EXECUTE async_pt_query (2000, 505); +EXECUTE async_pt_query (2000, 505); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +RESET plan_cache_mode; + +CREATE TABLE local_tbl(a int, b int, c text); +INSERT INTO local_tbl VALUES (1505, 505, 'foo'), (2505, 505, 'bar'); +ANALYZE local_tbl; + +CREATE INDEX base_tbl1_idx ON base_tbl1 (a); +CREATE INDEX base_tbl2_idx ON base_tbl2 (a); +CREATE INDEX async_p3_idx ON async_p3 (a); +ANALYZE base_tbl1; +ANALYZE base_tbl2; +ANALYZE async_p3; + +ALTER FOREIGN TABLE async_p1 OPTIONS (use_remote_estimate 'true'); +ALTER FOREIGN TABLE async_p2 OPTIONS (use_remote_estimate 'true'); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; +SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; + +ALTER FOREIGN TABLE async_p1 OPTIONS (DROP use_remote_estimate); +ALTER FOREIGN TABLE async_p2 OPTIONS (DROP use_remote_estimate); + +DROP TABLE local_tbl; +DROP INDEX base_tbl1_idx; +DROP INDEX base_tbl2_idx; +DROP INDEX async_p3_idx; + +-- UNION queries +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION ALL +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); +INSERT INTO result_tbl +(SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) +UNION ALL +(SELECT a, b, 'AAA' || c FROM async_p2 WHERE b < 10); + +SELECT * FROM result_tbl ORDER BY a; +DELETE FROM result_tbl; + +-- Disable async execution if we use gating Result nodes for pseudoconstant +-- quals +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt WHERE CURRENT_USER = SESSION_USER; + +EXPLAIN (VERBOSE, COSTS OFF) +(SELECT * FROM async_p1 WHERE CURRENT_USER = SESSION_USER) +UNION ALL +(SELECT * FROM async_p2 WHERE CURRENT_USER = SESSION_USER); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ((SELECT * FROM async_p1 WHERE b < 10) UNION ALL (SELECT * FROM async_p2 WHERE b < 10)) s WHERE CURRENT_USER = SESSION_USER; + +-- Test that pending requests are processed properly +SET enable_mergejoin TO false; +SET enable_hashjoin TO false; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt t1, async_p2 t2 WHERE t1.a = t2.a AND t1.b === 505; +SELECT * FROM async_pt t1, async_p2 t2 WHERE t1.a = t2.a AND t1.b === 505; + +CREATE TABLE local_tbl (a int, b int, c text); +INSERT INTO local_tbl VALUES (1505, 505, 'foo'); +ANALYZE local_tbl; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; +SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; +SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; + +-- Check with foreign modify +CREATE TABLE base_tbl3 (a int, b int, c text); +CREATE FOREIGN TABLE remote_tbl (a int, b int, c text) + SERVER loopback OPTIONS (table_name 'base_tbl3'); +INSERT INTO remote_tbl VALUES (2505, 505, 'bar'); + +CREATE TABLE base_tbl4 (a int, b int, c text); +CREATE FOREIGN TABLE insert_tbl (a int, b int, c text) + SERVER loopback OPTIONS (table_name 'base_tbl4'); + +EXPLAIN (VERBOSE, COSTS OFF) +INSERT INTO insert_tbl (SELECT * FROM local_tbl UNION ALL SELECT * FROM remote_tbl); +INSERT INTO insert_tbl (SELECT * FROM local_tbl UNION ALL SELECT * FROM remote_tbl); + +SELECT * FROM insert_tbl ORDER BY a; + +-- Check with direct modify +EXPLAIN (VERBOSE, COSTS OFF) +WITH t AS (UPDATE remote_tbl SET c = c || c RETURNING *) +INSERT INTO join_tbl SELECT * FROM async_pt LEFT JOIN t ON (async_pt.a = t.a AND async_pt.b = t.b) WHERE async_pt.b === 505; +WITH t AS (UPDATE remote_tbl SET c = c || c RETURNING *) +INSERT INTO join_tbl SELECT * FROM async_pt LEFT JOIN t ON (async_pt.a = t.a AND async_pt.b = t.b) WHERE async_pt.b === 505; + +SELECT * FROM join_tbl ORDER BY a1; +DELETE FROM join_tbl; + +DROP TABLE local_tbl; +DROP FOREIGN TABLE remote_tbl; +DROP FOREIGN TABLE insert_tbl; +DROP TABLE base_tbl3; +DROP TABLE base_tbl4; + +RESET enable_mergejoin; +RESET enable_hashjoin; + +-- Test that UPDATE/DELETE with inherited target works with async_capable enabled +EXPLAIN (VERBOSE, COSTS OFF) +UPDATE async_pt SET c = c || c WHERE b = 0 RETURNING *; +UPDATE async_pt SET c = c || c WHERE b = 0 RETURNING *; +EXPLAIN (VERBOSE, COSTS OFF) +DELETE FROM async_pt WHERE b = 0 RETURNING *; +DELETE FROM async_pt WHERE b = 0 RETURNING *; + +-- Check EXPLAIN ANALYZE for a query that scans empty partitions asynchronously +DELETE FROM async_p1; +DELETE FROM async_p2; +DELETE FROM async_p3; + +EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +SELECT * FROM async_pt; + +-- Clean up +DROP TABLE async_pt; +DROP TABLE base_tbl1; +DROP TABLE base_tbl2; +DROP TABLE result_tbl; +DROP TABLE join_tbl; + +-- Test that an asynchronous fetch is processed before restarting the scan in +-- ReScanForeignScan +CREATE TABLE base_tbl (a int, b int); +INSERT INTO base_tbl VALUES (1, 11), (2, 22), (3, 33); +CREATE FOREIGN TABLE foreign_tbl (b int) + SERVER loopback OPTIONS (table_name 'base_tbl'); +CREATE FOREIGN TABLE foreign_tbl2 () INHERITS (foreign_tbl) + SERVER loopback OPTIONS (table_name 'base_tbl'); + +EXPLAIN (VERBOSE, COSTS OFF) +SELECT a FROM base_tbl WHERE a IN (SELECT a FROM foreign_tbl); +SELECT a FROM base_tbl WHERE a IN (SELECT a FROM foreign_tbl); + +-- Clean up +DROP FOREIGN TABLE foreign_tbl CASCADE; +DROP TABLE base_tbl; + +ALTER SERVER loopback OPTIONS (DROP async_capable); +ALTER SERVER loopback2 OPTIONS (DROP async_capable); +*/ + +-- =================================================================== +-- test invalid server, foreign table and foreign data wrapper options +-- =================================================================== +/* +-- InfluxDB FDW does not have these options +-- Invalid fdw_startup_cost option +CREATE SERVER inv_scst FOREIGN DATA WRAPPER postgres_fdw + OPTIONS(fdw_startup_cost '100$%$#$#'); +-- Invalid fdw_tuple_cost option +CREATE SERVER inv_scst FOREIGN DATA WRAPPER postgres_fdw + OPTIONS(fdw_tuple_cost '100$%$#$#'); +-- Invalid fetch_size option +CREATE FOREIGN TABLE inv_fsz (c1 int ) + SERVER loopback OPTIONS (fetch_size '100$%$#$#'); +*/ +-- Invalid batch_size option +--Testcase 776: +CREATE FOREIGN TABLE inv_bsz (fields jsonb OPTIONS(fields 'true')) + SERVER influxdb_svr OPTIONS (batch_size '100$%$#$#', schemaless 'true'); + +-- No option is allowed to be specified at foreign data wrapper level +--Testcase 782: +ALTER FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (nonexistent 'fdw'); + +/* +-- =================================================================== +-- application_name is an option in libpq of postgres +-- so Influxdb_fdw not support application_name. +-- test postgres_fdw.application_name GUC +-- =================================================================== +--- Turn debug_discard_caches off for this test to make sure that +--- the remote connection is alive when checking its application_name. +SET debug_discard_caches = 0; + +-- Specify escape sequences in application_name option of a server +-- object so as to test that they are replaced with status information +-- expectedly. +-- +-- Since pg_stat_activity.application_name may be truncated to less than +-- NAMEDATALEN characters, note that substring() needs to be used +-- at the condition of test query to make sure that the string consisting +-- of database name and process ID is also less than that. +ALTER SERVER loopback2 OPTIONS (application_name 'fdw_%d%p'); +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_database() || pg_backend_pid() for + current_setting('max_identifier_length')::int); + +-- postgres_fdw.application_name overrides application_name option +-- of a server object if both settings are present. +SET postgres_fdw.application_name TO 'fdw_%a%u%%'; +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_setting('application_name') || + CURRENT_USER || '%' for current_setting('max_identifier_length')::int); + +-- Test %c (session ID) and %C (cluster name) escape sequences. +SET postgres_fdw.application_name TO 'fdw_%C%c'; +SELECT 1 FROM ft6 LIMIT 1; +SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity + WHERE application_name = + substring('fdw_' || current_setting('cluster_name') || + to_hex(trunc(EXTRACT(EPOCH FROM (SELECT backend_start FROM + pg_stat_get_activity(pg_backend_pid()))))::integer) || '.' || + to_hex(pg_backend_pid()) + for current_setting('max_identifier_length')::int); + +--Clean up +RESET postgres_fdw.application_name; +RESET debug_discard_caches; + +-- =================================================================== +-- test parallel commit +-- =================================================================== +ALTER SERVER loopback OPTIONS (ADD parallel_commit 'true'); +ALTER SERVER loopback2 OPTIONS (ADD parallel_commit 'true'); + +CREATE TABLE ploc1 (f1 int, f2 text); +CREATE FOREIGN TABLE prem1 (f1 int, f2 text) + SERVER loopback OPTIONS (table_name 'ploc1'); +CREATE TABLE ploc2 (f1 int, f2 text); +CREATE FOREIGN TABLE prem2 (f1 int, f2 text) + SERVER loopback2 OPTIONS (table_name 'ploc2'); + +BEGIN; +INSERT INTO prem1 VALUES (101, 'foo'); +INSERT INTO prem2 VALUES (201, 'bar'); +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +BEGIN; +SAVEPOINT s; +INSERT INTO prem1 VALUES (102, 'foofoo'); +INSERT INTO prem2 VALUES (202, 'barbar'); +RELEASE SAVEPOINT s; +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +-- This tests executing DEALLOCATE ALL against foreign servers in parallel +-- during pre-commit +BEGIN; +SAVEPOINT s; +INSERT INTO prem1 VALUES (103, 'baz'); +INSERT INTO prem2 VALUES (203, 'qux'); +ROLLBACK TO SAVEPOINT s; +RELEASE SAVEPOINT s; +INSERT INTO prem1 VALUES (104, 'bazbaz'); +INSERT INTO prem2 VALUES (204, 'quxqux'); +COMMIT; +SELECT * FROM prem1; +SELECT * FROM prem2; + +ALTER SERVER loopback OPTIONS (DROP parallel_commit); +ALTER SERVER loopback2 OPTIONS (DROP parallel_commit); +*/ -- Clean-up +--Testcase 822: DELETE FROM ft1_nsc; +--Testcase 823: DELETE FROM ft2_nsc; +--Testcase 824: DELETE FROM ft4_nsc; +--Testcase 825: DELETE FROM ft5_nsc; +--Testcase 826: DELETE FROM foo_nsc; +--Testcase 827: DELETE FROM bar_nsc; +--Testcase 828: DELETE FROM loct1_nsc; +--Testcase 829: DELETE FROM loct2_nsc; +--Testcase 830: DELETE FROM rem1_nsc; +--Testcase 831: DROP FOREIGN TABLE foo_nsc cascade; +--Testcase 832: DROP FOREIGN TABLE bar_nsc cascade; +--Testcase 833: DROP FOREIGN TABLE loct1_nsc; +--Testcase 834: DROP FOREIGN TABLE loct2_nsc; +--Testcase 835: DROP FOREIGN TABLE "S 1".s1t0; +--Testcase 836: DROP FOREIGN TABLE "S 1".s1t1; +--Testcase 837: DROP FOREIGN TABLE "S 1".s1t2; +--Testcase 838: DROP FOREIGN TABLE "S 1".s1t3; +--Testcase 839: DROP FOREIGN TABLE "S 1".s1t4; +--Testcase 840: DROP FOREIGN TABLE ft1_nsc; +--Testcase 841: DROP FOREIGN TABLE ft2_nsc; +--Testcase 842: DROP FOREIGN TABLE ft4_nsc; +--Testcase 843: DROP FOREIGN TABLE ft5_nsc; +--Testcase 844: DROP TYPE IF EXISTS user_enum; +--Testcase 845: DROP SCHEMA IF EXISTS "S 1" CASCADE; +--Testcase 846: DROP FUNCTION IF EXISTS trigger_func(); +--Testcase 847: DROP FUNCTION IF EXISTS trig_row_before_insupdate(); +--Testcase 848: DROP FUNCTION IF EXISTS trig_null(); +--Testcase 849: DROP SCHEMA IF EXISTS import_influx1 CASCADE; +--Testcase 850: DROP SCHEMA IF EXISTS import_influx2 CASCADE; +--Testcase 851: DROP SCHEMA IF EXISTS import_influx3 CASCADE; +--Testcase 852: DROP SCHEMA IF EXISTS import_influx4 CASCADE; +--Testcase 853: +DROP TABLE IF EXISTS batch_cp_upd_test1; ---Testcase 621: +--Testcase 758: DROP USER MAPPING FOR public SERVER testserver1; ---Testcase 622: +--Testcase 759: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 623: +--Testcase 760: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr2; ---Testcase 624: +--Testcase 761: DROP SERVER testserver1 CASCADE; ---Testcase 625: +--Testcase 762: DROP SERVER influxdb_svr CASCADE; ---Testcase 626: +--Testcase 763: DROP SERVER influxdb_svr2 CASCADE; ---Testcase 627: +--Testcase 764: DROP EXTENSION influxdb_fdw; diff --git a/sql/15.0/schemaless/extra/insert.sql b/sql/15.0/schemaless/extra/insert.sql new file mode 100644 index 0000000..ee755a6 --- /dev/null +++ b/sql/15.0/schemaless/extra/insert.sql @@ -0,0 +1,690 @@ +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 1: +CREATE EXTENSION influxdb_fdw; +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +-- +-- insert with DEFAULT in the target_list +-- +--Testcase 4: +CREATE FOREIGN TABLE inserttest (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 24: +CREATE FOREIGN TABLE inserttest_nsc (col1 int4, col2 int4 NOT NULL, col3 text default 'testing') SERVER influxdb_svr OPTIONS(table 'inserttest'); +--Testcase 5: +insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT); +--Testcase 6: +insert into inserttest_nsc (col2, col3) values (3, DEFAULT); +--Testcase 7: +insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, 5, DEFAULT); +--Testcase 8: +insert into inserttest_nsc values (DEFAULT, 5, 'test'); +--Testcase 9: +insert into inserttest_nsc values (DEFAULT, 7); + +--Testcase 10: +select * from inserttest; + +-- +-- insert with similar expression / target_list values (all fail) +-- +--Testcase 11: +insert into inserttest_nsc (col1, col2, col3) values (DEFAULT, DEFAULT); +--Testcase 12: +insert into inserttest_nsc (col1, col2, col3) values (1, 2); +--Testcase 13: +insert into inserttest_nsc (col1) values (1, 2); +--Testcase 14: +insert into inserttest_nsc (col1) values (DEFAULT, DEFAULT); + +--Testcase 15: +select * from inserttest; + +-- +-- VALUES test +-- +--Testcase 16: +insert into inserttest_nsc values(10, 20, '40'), (-1, 2, DEFAULT), + ((select 2), (select i from (values(3)) as foo (i)), 'values are fun!'); + +--Testcase 17: +select * from inserttest; + +-- +-- TOASTed value test +-- +--Testcase 18: +insert into inserttest_nsc values(30, 50, repeat('x', 10000)); + +--Testcase 19: +select (fields->>'col1')::int4 col1, (fields->>'col2')::int4 col2, char_length(fields->>'col3') from inserttest; + +--Testcase 20: +-- Clean up: +--Testcase 25: +delete from inserttest_nsc; +--Testcase 26: +drop foreign table inserttest; +--Testcase 27: +drop foreign table inserttest_nsc; +/* +-- skip, influxdb does not support create table with WITH option +-- +-- tuple larger than fillfactor +-- +CREATE TABLE large_tuple_test (a int, b text) WITH (fillfactor = 10); +ALTER TABLE large_tuple_test ALTER COLUMN b SET STORAGE plain; + +-- create page w/ free space in range [nearlyEmptyFreeSpace, MaxHeapTupleSize) +INSERT INTO large_tuple_test (select 1, NULL); + +-- should still fit on the page +INSERT INTO large_tuple_test (select 2, repeat('a', 1000)); +SELECT pg_size_pretty(pg_relation_size('large_tuple_test'::regclass, 'main')); + +-- add small record to the second page +INSERT INTO large_tuple_test (select 3, NULL); + +-- now this tuple won't fit on the second page, but the insert should +-- still succeed by extending the relation +INSERT INTO large_tuple_test (select 4, repeat('a', 8126)); + +DROP TABLE large_tuple_test; +*/ + +/* +-- skip, influxdb does not support create type +-- +-- check indirection (field/array assignment), cf bug #14265 +-- +-- these tests are aware that transformInsertStmt has 3 separate code paths +-- + +create type insert_test_type as (if1 int, if2 text[]); + +create table inserttest (f1 int, f2 int[], + f3 insert_test_type, f4 insert_test_type[]); + +insert into inserttest (f2[1], f2[2]) values (1,2); +insert into inserttest (f2[1], f2[2]) values (3,4), (5,6); +insert into inserttest (f2[1], f2[2]) select 7,8; +insert into inserttest (f2[1], f2[2]) values (1,default); -- not supported + +insert into inserttest (f3.if1, f3.if2) values (1,array['foo']); +insert into inserttest (f3.if1, f3.if2) values (1,'{foo}'), (2,'{bar}'); +insert into inserttest (f3.if1, f3.if2) select 3, '{baz,quux}'; +insert into inserttest (f3.if1, f3.if2) values (1,default); -- not supported + +insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'); +insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'), ('baz', 'quux'); +insert into inserttest (f3.if2[1], f3.if2[2]) select 'bear', 'beer'; + +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'); +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) values ('foo', 'bar'), ('baz', 'quux'); +insert into inserttest (f4[1].if2[1], f4[1].if2[2]) select 'bear', 'beer'; + +select * from inserttest; + +-- also check reverse-listing +create table inserttest2 (f1 bigint, f2 text); +create rule irule1 as on insert to inserttest2 do also + insert into inserttest (f3.if2[1], f3.if2[2]) + values (new.f1,new.f2); +create rule irule2 as on insert to inserttest2 do also + insert into inserttest (f4[1].if1, f4[1].if2[2]) + values (1,'fool'),(new.f1,new.f2); +create rule irule3 as on insert to inserttest2 do also + insert into inserttest (f4[1].if1, f4[1].if2[2]) + select new.f1, new.f2; +\d+ inserttest2 + +drop table inserttest2; +drop table inserttest; +drop type insert_test_type; +*/ + +/* +-- skip, influxdb does not support partition table +-- direct partition inserts should check partition bound constraint +create table range_parted ( + a text, + b int +) partition by range (a, (b+0)); + +-- no partitions, so fail +insert into range_parted values ('a', 11); + +create table part1 partition of range_parted for values from ('a', 1) to ('a', 10); +create table part2 partition of range_parted for values from ('a', 10) to ('a', 20); +create table part3 partition of range_parted for values from ('b', 1) to ('b', 10); +create table part4 partition of range_parted for values from ('b', 10) to ('b', 20); + +-- fail +insert into part1 values ('a', 11); +insert into part1 values ('b', 1); +-- ok +insert into part1 values ('a', 1); +-- fail +insert into part4 values ('b', 21); +insert into part4 values ('a', 10); +-- ok +insert into part4 values ('b', 10); + +-- fail (partition key a has a NOT NULL constraint) +insert into part1 values (null); +-- fail (expression key (b+0) cannot be null either) +insert into part1 values (1); + +create table list_parted ( + a text, + b int +) partition by list (lower(a)); +create table part_aa_bb partition of list_parted FOR VALUES IN ('aa', 'bb'); +create table part_cc_dd partition of list_parted FOR VALUES IN ('cc', 'dd'); +create table part_null partition of list_parted FOR VALUES IN (null); + +-- fail +insert into part_aa_bb values ('cc', 1); +insert into part_aa_bb values ('AAa', 1); +insert into part_aa_bb values (null); +-- ok +insert into part_cc_dd values ('cC', 1); +insert into part_null values (null, 0); + +-- check in case of multi-level partitioned table +create table part_ee_ff partition of list_parted for values in ('ee', 'ff') partition by range (b); +create table part_ee_ff1 partition of part_ee_ff for values from (1) to (10); +create table part_ee_ff2 partition of part_ee_ff for values from (10) to (20); + +-- test default partition +create table part_default partition of list_parted default; +-- Negative test: a row, which would fit in other partition, does not fit +-- default partition, even when inserted directly +insert into part_default values ('aa', 2); +insert into part_default values (null, 2); +-- ok +insert into part_default values ('Zz', 2); +-- test if default partition works as expected for multi-level partitioned +-- table as well as when default partition itself is further partitioned +drop table part_default; +create table part_xx_yy partition of list_parted for values in ('xx', 'yy') partition by list (a); +create table part_xx_yy_p1 partition of part_xx_yy for values in ('xx'); +create table part_xx_yy_defpart partition of part_xx_yy default; +create table part_default partition of list_parted default partition by range(b); +create table part_default_p1 partition of part_default for values from (20) to (30); +create table part_default_p2 partition of part_default for values from (30) to (40); + +-- fail +insert into part_ee_ff1 values ('EE', 11); +insert into part_default_p2 values ('gg', 43); +-- fail (even the parent's, ie, part_ee_ff's partition constraint applies) +insert into part_ee_ff1 values ('cc', 1); +insert into part_default values ('gg', 43); +-- ok +insert into part_ee_ff1 values ('ff', 1); +insert into part_ee_ff2 values ('ff', 11); +insert into part_default_p1 values ('cd', 25); +insert into part_default_p2 values ('de', 35); +insert into list_parted values ('ab', 21); +insert into list_parted values ('xx', 1); +insert into list_parted values ('yy', 2); +select tableoid::regclass, * from list_parted; + +-- Check tuple routing for partitioned tables + +-- fail +insert into range_parted values ('a', 0); +-- ok +insert into range_parted values ('a', 1); +insert into range_parted values ('a', 10); +-- fail +insert into range_parted values ('a', 20); +-- ok +insert into range_parted values ('b', 1); +insert into range_parted values ('b', 10); +-- fail (partition key (b+0) is null) +insert into range_parted values ('a'); + +-- Check default partition +create table part_def partition of range_parted default; +-- fail +insert into part_def values ('b', 10); +-- ok +insert into part_def values ('c', 10); +insert into range_parted values (null, null); +insert into range_parted values ('a', null); +insert into range_parted values (null, 19); +insert into range_parted values ('b', 20); + +select tableoid::regclass, * from range_parted; +-- ok +insert into list_parted values (null, 1); +insert into list_parted (a) values ('aA'); +-- fail (partition of part_ee_ff not found in both cases) +insert into list_parted values ('EE', 0); +insert into part_ee_ff values ('EE', 0); +-- ok +insert into list_parted values ('EE', 1); +insert into part_ee_ff values ('EE', 10); +select tableoid::regclass, * from list_parted; + +-- some more tests to exercise tuple-routing with multi-level partitioning +create table part_gg partition of list_parted for values in ('gg') partition by range (b); +create table part_gg1 partition of part_gg for values from (minvalue) to (1); +create table part_gg2 partition of part_gg for values from (1) to (10) partition by range (b); +create table part_gg2_1 partition of part_gg2 for values from (1) to (5); +create table part_gg2_2 partition of part_gg2 for values from (5) to (10); + +create table part_ee_ff3 partition of part_ee_ff for values from (20) to (30) partition by range (b); +create table part_ee_ff3_1 partition of part_ee_ff3 for values from (20) to (25); +create table part_ee_ff3_2 partition of part_ee_ff3 for values from (25) to (30); + +truncate list_parted; +insert into list_parted values ('aa'), ('cc'); +insert into list_parted select 'Ff', s.a from generate_series(1, 29) s(a); +insert into list_parted select 'gg', s.a from generate_series(1, 9) s(a); +insert into list_parted (b) values (1); +select tableoid::regclass::text, a, min(b) as min_b, max(b) as max_b from list_parted group by 1, 2 order by 1; + +-- direct partition inserts should check hash partition bound constraint + +-- Use hand-rolled hash functions and operator classes to get predictable +-- result on different machines. The hash function for int4 simply returns +-- the sum of the values passed to it and the one for text returns the length +-- of the non-empty string value passed to it or 0. + +create or replace function part_hashint4_noop(value int4, seed int8) +returns int8 as $$ +select value + seed; +$$ language sql immutable; + +create operator class part_test_int4_ops +for type int4 +using hash as +operator 1 =, +function 2 part_hashint4_noop(int4, int8); + +create or replace function part_hashtext_length(value text, seed int8) +RETURNS int8 AS $$ +select length(coalesce(value, ''))::int8 +$$ language sql immutable; + +create operator class part_test_text_ops +for type text +using hash as +operator 1 =, +function 2 part_hashtext_length(text, int8); + +create table hash_parted ( + a int +) partition by hash (a part_test_int4_ops); +create table hpart0 partition of hash_parted for values with (modulus 4, remainder 0); +create table hpart1 partition of hash_parted for values with (modulus 4, remainder 1); +create table hpart2 partition of hash_parted for values with (modulus 4, remainder 2); +create table hpart3 partition of hash_parted for values with (modulus 4, remainder 3); + +insert into hash_parted values(generate_series(1,10)); + +-- direct insert of values divisible by 4 - ok; +insert into hpart0 values(12),(16); +-- fail; +insert into hpart0 values(11); +-- 11 % 4 -> 3 remainder i.e. valid data for hpart3 partition +insert into hpart3 values(11); + +-- view data +select tableoid::regclass as part, a, a%4 as "remainder = a % 4" +from hash_parted order by part; + +-- test \d+ output on a table which has both partitioned and unpartitioned +-- partitions +\d+ list_parted + +-- cleanup +drop table range_parted, list_parted; +drop table hash_parted; + +-- test that a default partition added as the first partition accepts any value +-- including null +create table list_parted (a int) partition by list (a); +create table part_default partition of list_parted default; +\d+ part_default +insert into part_default values (null); +insert into part_default values (1); +insert into part_default values (-1); +select tableoid::regclass, a from list_parted; +-- cleanup +drop table list_parted; + +-- more tests for certain multi-level partitioning scenarios +create table mlparted (a int, b int) partition by range (a, b); +create table mlparted1 (b int not null, a int not null) partition by range ((b+0)); +create table mlparted11 (like mlparted1); +alter table mlparted11 drop a; +alter table mlparted11 add a int; +alter table mlparted11 drop a; +alter table mlparted11 add a int not null; +-- attnum for key attribute 'a' is different in mlparted, mlparted1, and mlparted11 +select attrelid::regclass, attname, attnum +from pg_attribute +where attname = 'a' + and (attrelid = 'mlparted'::regclass + or attrelid = 'mlparted1'::regclass + or attrelid = 'mlparted11'::regclass) +order by attrelid::regclass::text; + +alter table mlparted1 attach partition mlparted11 for values from (2) to (5); +alter table mlparted attach partition mlparted1 for values from (1, 2) to (1, 10); + +-- check that "(1, 2)" is correctly routed to mlparted11. +insert into mlparted values (1, 2); +select tableoid::regclass, * from mlparted; + +-- check that proper message is shown after failure to route through mlparted1 +insert into mlparted (a, b) values (1, 5); + +truncate mlparted; +alter table mlparted add constraint check_b check (b = 3); + +-- have a BR trigger modify the row such that the check_b is violated +create function mlparted11_trig_fn() +returns trigger AS +$$ +begin + NEW.b := 4; + return NEW; +end; +$$ +language plpgsql; +create trigger mlparted11_trig before insert ON mlparted11 + for each row execute procedure mlparted11_trig_fn(); + +-- check that the correct row is shown when constraint check_b fails after +-- "(1, 2)" is routed to mlparted11 (actually "(1, 4)" would be shown due +-- to the BR trigger mlparted11_trig_fn) +insert into mlparted values (1, 2); +drop trigger mlparted11_trig on mlparted11; +drop function mlparted11_trig_fn(); + +-- check that inserting into an internal partition successfully results in +-- checking its partition constraint before inserting into the leaf partition +-- selected by tuple-routing +insert into mlparted1 (a, b) values (2, 3); + +-- check routing error through a list partitioned table when the key is null +create table lparted_nonullpart (a int, b char) partition by list (b); +create table lparted_nonullpart_a partition of lparted_nonullpart for values in ('a'); +insert into lparted_nonullpart values (1); +drop table lparted_nonullpart; + +-- check that RETURNING works correctly with tuple-routing +alter table mlparted drop constraint check_b; +create table mlparted12 partition of mlparted1 for values from (5) to (10); +create table mlparted2 (b int not null, a int not null); +alter table mlparted attach partition mlparted2 for values from (1, 10) to (1, 20); +create table mlparted3 partition of mlparted for values from (1, 20) to (1, 30); +create table mlparted4 (like mlparted); +alter table mlparted4 drop a; +alter table mlparted4 add a int not null; +alter table mlparted attach partition mlparted4 for values from (1, 30) to (1, 40); +with ins (a, b, c) as + (insert into mlparted (b, a) select s.a, 1 from generate_series(2, 39) s(a) returning tableoid::regclass, *) + select a, b, min(c), max(c) from ins group by a, b order by 1; + +alter table mlparted add c text; +create table mlparted5 (c text, a int not null, b int not null) partition by list (c); +create table mlparted5a (a int not null, c text, b int not null); +alter table mlparted5 attach partition mlparted5a for values in ('a'); +alter table mlparted attach partition mlparted5 for values from (1, 40) to (1, 50); +alter table mlparted add constraint check_b check (a = 1 and b < 45); +insert into mlparted values (1, 45, 'a'); +create function mlparted5abrtrig_func() returns trigger as $$ begin new.c = 'b'; return new; end; $$ language plpgsql; +create trigger mlparted5abrtrig before insert on mlparted5a for each row execute procedure mlparted5abrtrig_func(); +insert into mlparted5 (a, b, c) values (1, 40, 'a'); +drop table mlparted5; +alter table mlparted drop constraint check_b; + +-- Check multi-level default partition +create table mlparted_def partition of mlparted default partition by range(a); +create table mlparted_def1 partition of mlparted_def for values from (40) to (50); +create table mlparted_def2 partition of mlparted_def for values from (50) to (60); +insert into mlparted values (40, 100); +insert into mlparted_def1 values (42, 100); +insert into mlparted_def2 values (54, 50); +-- fail +insert into mlparted values (70, 100); +insert into mlparted_def1 values (52, 50); +insert into mlparted_def2 values (34, 50); +-- ok +create table mlparted_defd partition of mlparted_def default; +insert into mlparted values (70, 100); + +select tableoid::regclass, * from mlparted_def; + +-- Check multi-level tuple routing with attributes dropped from the +-- top-most parent. First remove the last attribute. +alter table mlparted add d int, add e int; +alter table mlparted drop e; +create table mlparted5 partition of mlparted + for values from (1, 40) to (1, 50) partition by range (c); +create table mlparted5_ab partition of mlparted5 + for values from ('a') to ('c') partition by list (c); +-- This partitioned table should remain with no partitions. +create table mlparted5_cd partition of mlparted5 + for values from ('c') to ('e') partition by list (c); +create table mlparted5_a partition of mlparted5_ab for values in ('a'); +create table mlparted5_b (d int, b int, c text, a int); +alter table mlparted5_ab attach partition mlparted5_b for values in ('b'); +truncate mlparted; +insert into mlparted values (1, 2, 'a', 1); +insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a +insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b +insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails +insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails +select tableoid::regclass, * from mlparted order by a, b, c, d; +alter table mlparted drop d; +truncate mlparted; +-- Remove the before last attribute. +alter table mlparted add e int, add d int; +alter table mlparted drop e; +insert into mlparted values (1, 2, 'a', 1); +insert into mlparted values (1, 40, 'a', 1); -- goes to mlparted5_a +insert into mlparted values (1, 45, 'b', 1); -- goes to mlparted5_b +insert into mlparted values (1, 45, 'c', 1); -- goes to mlparted5_cd, fails +insert into mlparted values (1, 45, 'f', 1); -- goes to mlparted5, fails +select tableoid::regclass, * from mlparted order by a, b, c, d; +alter table mlparted drop d; +drop table mlparted5; + +-- check that message shown after failure to find a partition shows the +-- appropriate key description (or none) in various situations +create table key_desc (a int, b int) partition by list ((a+0)); +create table key_desc_1 partition of key_desc for values in (1) partition by range (b); + +create user regress_insert_other_user; +grant select (a) on key_desc_1 to regress_insert_other_user; +grant insert on key_desc to regress_insert_other_user; + +set role regress_insert_other_user; +-- no key description is shown +insert into key_desc values (1, 1); + +reset role; +grant select (b) on key_desc_1 to regress_insert_other_user; +set role regress_insert_other_user; +-- key description (b)=(1) is now shown +insert into key_desc values (1, 1); + +-- key description is not shown if key contains expression +insert into key_desc values (2, 1); +reset role; +revoke all on key_desc from regress_insert_other_user; +revoke all on key_desc_1 from regress_insert_other_user; +drop role regress_insert_other_user; +drop table key_desc, key_desc_1; + +-- test minvalue/maxvalue restrictions +create table mcrparted (a int, b int, c int) partition by range (a, abs(b), c); +create table mcrparted0 partition of mcrparted for values from (minvalue, 0, 0) to (1, maxvalue, maxvalue); +create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, minvalue); +create table mcrparted4 partition of mcrparted for values from (21, minvalue, 0) to (30, 20, minvalue); + +-- check multi-column range partitioning expression enforces the same +-- constraint as what tuple-routing would determine it to be +create table mcrparted0 partition of mcrparted for values from (minvalue, minvalue, minvalue) to (1, maxvalue, maxvalue); +create table mcrparted1 partition of mcrparted for values from (2, 1, minvalue) to (10, 5, 10); +create table mcrparted2 partition of mcrparted for values from (10, 6, minvalue) to (10, maxvalue, maxvalue); +create table mcrparted3 partition of mcrparted for values from (11, 1, 1) to (20, 10, 10); +create table mcrparted4 partition of mcrparted for values from (21, minvalue, minvalue) to (30, 20, maxvalue); +create table mcrparted5 partition of mcrparted for values from (30, 21, 20) to (maxvalue, maxvalue, maxvalue); + +-- null not allowed in range partition +insert into mcrparted values (null, null, null); + +-- routed to mcrparted0 +insert into mcrparted values (0, 1, 1); +insert into mcrparted0 values (0, 1, 1); + +-- routed to mcparted1 +insert into mcrparted values (9, 1000, 1); +insert into mcrparted1 values (9, 1000, 1); +insert into mcrparted values (10, 5, -1); +insert into mcrparted1 values (10, 5, -1); +insert into mcrparted values (2, 1, 0); +insert into mcrparted1 values (2, 1, 0); + +-- routed to mcparted2 +insert into mcrparted values (10, 6, 1000); +insert into mcrparted2 values (10, 6, 1000); +insert into mcrparted values (10, 1000, 1000); +insert into mcrparted2 values (10, 1000, 1000); + +-- no partition exists, nor does mcrparted3 accept it +insert into mcrparted values (11, 1, -1); +insert into mcrparted3 values (11, 1, -1); + +-- routed to mcrparted5 +insert into mcrparted values (30, 21, 20); +insert into mcrparted5 values (30, 21, 20); +insert into mcrparted4 values (30, 21, 20); -- error + +-- check rows +select tableoid::regclass::text, * from mcrparted order by 1; + +-- cleanup +drop table mcrparted; + +-- check that a BR constraint can't make partition contain violating rows +create table brtrigpartcon (a int, b text) partition by list (a); +create table brtrigpartcon1 partition of brtrigpartcon for values in (1); +create or replace function brtrigpartcon1trigf() returns trigger as $$begin new.a := 2; return new; end$$ language plpgsql; +create trigger brtrigpartcon1trig before insert on brtrigpartcon1 for each row execute procedure brtrigpartcon1trigf(); +insert into brtrigpartcon values (1, 'hi there'); +insert into brtrigpartcon1 values (1, 'hi there'); + +-- check that the message shows the appropriate column description in a +-- situation where the partitioned table is not the primary ModifyTable node +create table inserttest3 (f1 text default 'foo', f2 text default 'bar', f3 int); +create role regress_coldesc_role; +grant insert on inserttest3 to regress_coldesc_role; +grant insert on brtrigpartcon to regress_coldesc_role; +revoke select on brtrigpartcon from regress_coldesc_role; +set role regress_coldesc_role; +with result as (insert into brtrigpartcon values (1, 'hi there') returning 1) + insert into inserttest3 (f3) select * from result; +reset role; + +-- cleanup +revoke all on inserttest3 from regress_coldesc_role; +revoke all on brtrigpartcon from regress_coldesc_role; +drop role regress_coldesc_role; +drop table inserttest3; +drop table brtrigpartcon; +drop function brtrigpartcon1trigf(); + +-- check that "do nothing" BR triggers work with tuple-routing +create table donothingbrtrig_test (a int, b text) partition by list (a); +create table donothingbrtrig_test1 (b text, a int); +create table donothingbrtrig_test2 (c text, b text, a int); +alter table donothingbrtrig_test2 drop column c; +create or replace function donothingbrtrig_func() returns trigger as $$begin raise notice 'b: %', new.b; return NULL; end$$ language plpgsql; +create trigger donothingbrtrig1 before insert on donothingbrtrig_test1 for each row execute procedure donothingbrtrig_func(); +create trigger donothingbrtrig2 before insert on donothingbrtrig_test2 for each row execute procedure donothingbrtrig_func(); +alter table donothingbrtrig_test attach partition donothingbrtrig_test1 for values in (1); +alter table donothingbrtrig_test attach partition donothingbrtrig_test2 for values in (2); +insert into donothingbrtrig_test values (1, 'foo'), (2, 'bar'); +copy donothingbrtrig_test from stdout; +1 baz +2 qux +\. +select tableoid::regclass, * from donothingbrtrig_test; + +-- cleanup +drop table donothingbrtrig_test; +drop function donothingbrtrig_func(); + +-- check multi-column range partitioning with minvalue/maxvalue constraints +create table mcrparted (a text, b int) partition by range(a, b); +create table mcrparted1_lt_b partition of mcrparted for values from (minvalue, minvalue) to ('b', minvalue); +create table mcrparted2_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue); +create table mcrparted3_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue); +create table mcrparted4_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0); +create table mcrparted5_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10); +create table mcrparted6_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue); +create table mcrparted7_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue); +create table mcrparted8_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, maxvalue); + +\d+ mcrparted +\d+ mcrparted1_lt_b +\d+ mcrparted2_b +\d+ mcrparted3_c_to_common +\d+ mcrparted4_common_lt_0 +\d+ mcrparted5_common_0_to_10 +\d+ mcrparted6_common_ge_10 +\d+ mcrparted7_gt_common_lt_d +\d+ mcrparted8_ge_d + +insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10), + ('comm', -10), ('common', -10), ('common', 0), ('common', 10), + ('commons', 0), ('d', -10), ('e', 0); +select tableoid::regclass, * from mcrparted order by a, b; +drop table mcrparted; + +-- check that wholerow vars in the RETURNING list work with partitioned tables +create table returningwrtest (a int) partition by list (a); +create table returningwrtest1 partition of returningwrtest for values in (1); +insert into returningwrtest values (1) returning returningwrtest; + +-- check also that the wholerow vars in RETURNING list are converted as needed +alter table returningwrtest add b text; +create table returningwrtest2 (b text, c int, a int); +alter table returningwrtest2 drop c; +alter table returningwrtest attach partition returningwrtest2 for values in (2); +insert into returningwrtest values (2, 'foo') returning returningwrtest; +drop table returningwrtest; +*/ + +-- Clean up +DO $d$ +declare + l_rec record; +begin + for l_rec in (select foreign_table_schema, foreign_table_name + from information_schema.foreign_tables) loop + execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); + end loop; +end; +$d$; + +--Testcase 21: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 22: +DROP SERVER influxdb_svr CASCADE; +--Testcase 23: +DROP EXTENSION influxdb_fdw; diff --git a/sql/15.0/schemaless/extra/join.sql b/sql/15.0/schemaless/extra/join.sql new file mode 100644 index 0000000..a42cbe6 --- /dev/null +++ b/sql/15.0/schemaless/extra/join.sql @@ -0,0 +1,3136 @@ +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 1: +CREATE EXTENSION influxdb_fdw; + +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +-- import time column as timestamp and text type +-- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; + +-- +-- JOIN +-- Test JOIN clauses +-- + +--Testcase 4: +CREATE FOREIGN TABLE J1_TBL ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 575: +CREATE FOREIGN TABLE j1_tbl_nsc ( + i integer, + j integer, + t text +) SERVER influxdb_svr OPTIONS (table 'j1_tbl'); +--Testcase 5: +CREATE FOREIGN TABLE J2_TBL ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 576: +CREATE FOREIGN TABLE j2_tbl_nsc ( + i integer, + k integer +) SERVER influxdb_svr OPTIONS (table 'j2_tbl'); +--Testcase 6: +INSERT INTO j1_tbl_nsc VALUES (1, 4, 'one'); +--Testcase 7: +INSERT INTO j1_tbl_nsc VALUES (2, 3, 'two'); +--Testcase 8: +INSERT INTO j1_tbl_nsc VALUES (3, 2, 'three'); +--Testcase 9: +INSERT INTO j1_tbl_nsc VALUES (4, 1, 'four'); +--Testcase 10: +INSERT INTO j1_tbl_nsc VALUES (5, 0, 'five'); +--Testcase 11: +INSERT INTO j1_tbl_nsc VALUES (6, 6, 'six'); +--Testcase 12: +INSERT INTO j1_tbl_nsc VALUES (7, 7, 'seven'); +--Testcase 13: +INSERT INTO j1_tbl_nsc VALUES (8, 8, 'eight'); +--Testcase 14: +INSERT INTO j1_tbl_nsc VALUES (0, NULL, 'zero'); +--Testcase 15: +INSERT INTO j1_tbl_nsc VALUES (NULL, NULL, 'null'); +--Testcase 16: +INSERT INTO j1_tbl_nsc VALUES (NULL, 0, 'zero'); +--Testcase 17: +INSERT INTO j2_tbl_nsc VALUES (1, -1); +--Testcase 18: +INSERT INTO j2_tbl_nsc VALUES (2, 2); +--Testcase 19: +INSERT INTO j2_tbl_nsc VALUES (3, -3); +--Testcase 20: +INSERT INTO j2_tbl_nsc VALUES (2, 4); +--Testcase 21: +INSERT INTO j2_tbl_nsc VALUES (5, -5); +--Testcase 22: +INSERT INTO j2_tbl_nsc VALUES (5, -5); +--Testcase 23: +INSERT INTO j2_tbl_nsc VALUES (0, NULL); +--InfluxDB does not accept NULL value +--INSERT INTO J2_TBL VALUES (NULL, NULL); +--Testcase 24: +INSERT INTO j2_tbl_nsc VALUES (NULL, 0); +--Testcase 25: +CREATE FOREIGN TABLE tenk1 ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); + +--Does not support on Postgres 12 +--ALTER TABLE tenk1 SET WITH OIDS; + +--Testcase 26: +CREATE FOREIGN TABLE tenk2 ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); + +--Testcase 27: +CREATE FOREIGN TABLE INT4_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 28: +CREATE FOREIGN TABLE FLOAT8_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 29: +CREATE FOREIGN TABLE INT8_TBL( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 30: +CREATE FOREIGN TABLE INT2_TBL(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); + +-- useful in some tests below +--Testcase 31: +create temp table onerow(); +--Testcase 32: +insert into onerow default values; +analyze onerow; + + +-- +-- CORRELATION NAMES +-- Make sure that table/column aliases are supported +-- before diving into more complex join syntax. +-- + +--Testcase 33: +SELECT * + FROM J1_TBL AS tx; + +--Testcase 34: +SELECT * + FROM J1_TBL tx; + +--Testcase 35: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) AS t1 (a, b, c); + +--Testcase 36: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c); + +--Testcase 37: +SELECT * + FROM (SELECT (fields->>'i')::int, (fields->>'j')::int,fields->>'t' FROM J1_TBL) t1 (a, b, c), (SELECT (fields->>'i')::int ,(fields->>'k')::int FROM J2_TBL) t2 (d, e) ORDER BY t1.a, t1.b, t1.c, t2.d, t2.e; + +--Testcase 38: +SELECT t1.a, t2.e + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c), (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, e) + WHERE t1.a = t2.d; + + +-- +-- CROSS JOIN +-- Qualifications are not allowed on cross joins, +-- which degenerate into a standard unqualified inner join. +-- + +--Testcase 39: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; + +-- ambiguous column +--Testcase 40: +SELECT i, k, t + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; + +-- resolve previous ambiguity by specifying the table name +--Testcase 41: +SELECT t1.i, k, t + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 ORDER BY t1.i, t1.j, t1.t, t2.i, t2.k; + +--Testcase 42: +SELECT ii, tt, kk + FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL) + AS tx (ii, jj, tt, ii2, kk) ORDER BY ii, tt, kk; + +--Testcase 43: +SELECT tx.ii, tx.jj, tx.kk + FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, e)) + AS tx (ii, jj, tt, ii2, kk) ORDER BY tx.ii, tx.jj, tx.kk; + +--Testcase 44: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) a CROSS JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) b ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, a.i, a.k, b.i, b.k; + + +-- +-- +-- Inner joins (equi-joins) +-- +-- + +-- +-- Inner joins (equi-joins) with USING clause +-- The USING syntax changes the shape of the resulting table +-- by including a column in the USING clause only once in the result. +-- + +-- Inner equi-join on specified column +--Testcase 45: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL INNER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); + +-- Same as above, slightly different syntax +--Testcase 46: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); + +--Testcase 47: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, d) USING (a) + ORDER BY a, d; + +--Testcase 48: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, b) USING (b) + ORDER BY b, t1.a; + +-- test join using aliases +--Testcase 49: +SELECT * FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) WHERE J1_TBL.t = 'one'; -- ok +--Testcase 50: +SELECT * FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; -- ok +--Testcase 51: +SELECT * FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i)) AS x WHERE J1_TBL.t = 'one'; -- error +--Testcase 52: +SELECT * FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE x.i::int = 1; -- ok +--Testcase 53: +SELECT * FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE x.t = 'one'; -- error +--Testcase 54: +SELECT * FROM ((SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x) AS xx WHERE x.i::int = 1; -- error (XXX could use better hint) +--Testcase 55: +SELECT * FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) a1 JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) a2 USING (i) AS a1; -- error +--Testcase 56: +SELECT x.* FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; +--Testcase 57: +SELECT ROW(x.*) FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; +--Testcase 58: +SELECT row_to_json(x.*) FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) J1_TBL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; + +-- +-- NATURAL JOIN +-- Inner equi-join on all columns with the same name +-- + +--Testcase 59: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL NATURAL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL; + +--Testcase 60: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) NATURAL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (a, d); + +--Testcase 61: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j, fields->>'t' t FROM J1_TBL) t1 (a, b, c) NATURAL JOIN (SELECT (fields->>'i')::int i, (fields->>'k')::int k FROM J2_TBL) t2 (d, a); + +-- mismatch number of columns +-- currently, Postgres will fill in with underlying names +--Testcase 62: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) t1 (a, b) NATURAL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) t2 (a); + + +-- +-- Inner joins (equi-joins) +-- + +--Testcase 63: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint = (J2_TBL.i)::bigint); + +--Testcase 64: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint = (J2_TBL.k)::bigint); + + +-- +-- Non-equi-joins +-- + +--Testcase 65: +SELECT * + FROM (select (fields->>'i')::int i, (fields->>'j')::int j,fields->>'t' t from J1_TBL) J1_TBL JOIN (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL) J2_TBL ON ((J1_TBL.i)::bigint <= (J2_TBL.k)::bigint) ORDER BY J1_TBL.i, J1_TBL.j, J1_TBL.t, J2_TBL.i, J2_TBL.k; + + +-- +-- Outer joins +-- Note that OUTER is a noise word +-- + +--Testcase 66: +SELECT * + FROM (SELECT (fields->>'i')::int i, (fields->>'j')::int j ,fields->>'t' t FROM J1_TBL) J1_TBL LEFT OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) + ORDER BY i, k, t; + +--Testcase 67: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) + ORDER BY i::int, k, t; + +--Testcase 68: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL RIGHT OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); + +--Testcase 69: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL RIGHT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i); + +--Testcase 70: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL FULL OUTER JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) + ORDER BY i::int, k, t; + +--Testcase 71: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL FULL JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) + ORDER BY i::int, k, t; + +--Testcase 72: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) WHERE (k)::int = 1; + +--Testcase 73: +SELECT * + FROM (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL) J1_TBL LEFT JOIN (SELECT (fields->>'i')::int i,(fields->>'k')::int k FROM J2_TBL) J2_TBL USING (i) WHERE (i)::int = 1; + +-- +-- semijoin selectivity for <> +-- +--Testcase 74: +explain (costs off) +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4, (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a +where exists(select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b + where (a.twothousand)::int4 = (b.twothousand)::int4 and (a.fivethous)::int4 <> (b.fivethous)::int4) + and (i4.f1)::int4 = (a.tenthous)::int4; + + +-- +-- More complicated constructs +-- + +-- +-- Multiway full join +-- + +--Testcase 75: +CREATE FOREIGN TABLE t1 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 577: +CREATE FOREIGN TABLE t1_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't1'); +--Testcase 76: +CREATE FOREIGN TABLE t2 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 578: +CREATE FOREIGN TABLE t2_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't2'); +--Testcase 77: +CREATE FOREIGN TABLE t3 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 579: +CREATE FOREIGN TABLE t3_nsc (name TEXT, n INTEGER) SERVER influxdb_svr OPTIONS (table 't3'); +--Testcase 78: +INSERT INTO t1_nsc VALUES ( 'bb', 11 ); +--Testcase 79: +INSERT INTO t2_nsc VALUES ( 'bb', 12 ); +--Testcase 80: +INSERT INTO t2_nsc VALUES ( 'cc', 22 ); +--Testcase 81: +INSERT INTO t2_nsc VALUES ( 'ee', 42 ); +--Testcase 82: +INSERT INTO t3_nsc VALUES ( 'bb', 13 ); +--Testcase 83: +INSERT INTO t3_nsc VALUES ( 'cc', 23 ); +--Testcase 84: +INSERT INTO t3_nsc VALUES ( 'dd', 33 ); +--Testcase 85: +SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t1) t1 FULL JOIN (select fields->>'name' "name", (fields->>'n')::int n from t2) t2 USING (name) FULL JOIN (select fields->>'name' "name", (fields->>'n')::int n from t3) t3 USING (name); + +-- +-- Test interactions of join syntax and subqueries +-- + +-- Basic cases (we expect planner to pull up the subquery here) +--Testcase 86: +SELECT * FROM +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 +INNER JOIN +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 +USING (name); + +--Testcase 87: +SELECT * FROM +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 +LEFT JOIN +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 +USING (name); + +--Testcase 88: +SELECT * FROM +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t2) t2) as s2 +FULL JOIN +(SELECT * FROM (select fields->>'name' "name", (fields->>'n')::int n from t3) t3) s3 +USING (name); + +-- Cases with non-nullable expressions in subquery results; +-- make sure these go to null as expected +--Testcase 89: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL INNER JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; + +--Testcase 90: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL LEFT JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; + +--Testcase 91: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL FULL JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; + +--Testcase 92: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n, 1 as s1_1 FROM t1) as s1 +NATURAL INNER JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL INNER JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; + +--Testcase 93: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n, 1 as s1_1 FROM t1) as s1 +NATURAL FULL JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 +NATURAL FULL JOIN +(SELECT fields->>'name' "name", (fields->>'n')::int as s3_n, 3 as s3_2 FROM t3) s3; + +--Testcase 94: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 +NATURAL FULL JOIN + (SELECT * FROM + (SELECT fields->>'name' "name", (fields->>'n')::int as s2_n FROM t2) as s2 + NATURAL FULL JOIN + (SELECT fields->>'name' "name", (fields->>'n')::int as s3_n FROM t3) as s3 + ) ss2; + +--Testcase 95: +SELECT * FROM +(SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 +NATURAL FULL JOIN + (SELECT * FROM + (SELECT fields->>'name' "name", (fields->>'n')::int as s2_n, 2 as s2_2 FROM t2) as s2 + NATURAL FULL JOIN + (SELECT fields->>'name' "name", (fields->>'n')::int as s3_n FROM t3) as s3 + ) ss2; + +-- Constants as join keys can also be problematic +--Testcase 96: +SELECT * FROM + (SELECT fields->>'name' "name", (fields->>'n')::int as s1_n FROM t1) as s1 +FULL JOIN + (SELECT fields->>'name' "name", 2 as s2_n FROM t2) as s2 +ON ((s1_n)::int = (s2_n)::int); + + +-- Test for propagation of nullability constraints into sub-joins + +--Testcase 97: +create foreign table x (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 580: +create foreign table x_nsc (x1 int, x2 int) server influxdb_svr OPTIONS (table 'x'); +--Testcase 98: +insert into x_nsc values (1,11); +--Testcase 99: +insert into x_nsc values (2,22); +--Testcase 100: +insert into x_nsc values (3,null); +--Testcase 101: +insert into x_nsc values (4,44); +--Testcase 102: +insert into x_nsc values (5,null); +--Testcase 103: +create foreign table y (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 581: +create foreign table y_nsc (y1 int, y2 int) server influxdb_svr OPTIONS (table 'y'); +--Testcase 104: +insert into y_nsc values (1,111); +--Testcase 105: +insert into y_nsc values (2,222); +--Testcase 106: +insert into y_nsc values (3,333); +--Testcase 107: +insert into y_nsc values (4,null); +--Testcase 108: +select * from x; +--Testcase 109: +select * from y; + +--Testcase 110: +select * from (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int and x2 is not null); +--Testcase 111: +select * from (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int and y2 is not null); + +--Testcase 112: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int); +--Testcase 113: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int and x2 is not null); +--Testcase 114: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int and y2 is not null); +--Testcase 115: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int and xx2 is not null); +-- these should NOT give the same answers as above +--Testcase 116: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int) where (x2 is not null); +--Testcase 117: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int) where (y2 is not null); +--Testcase 118: +select * from ((select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) x left join (select (fields->>'y1')::int y1, (fields->>'y2')::int y2 from y) y on (x1::int = y1::int)) left join (select (fields->>'x1')::int x1, (fields->>'x2')::int x2 from x) xx(xx1,xx2) +on (x1::int = xx1::int) where (xx2 is not null); + +-- +-- regression test: check for bug with propagation of implied equality +-- to outside an IN +-- +--Testcase 119: +select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a where unique1 in + (select unique1 from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) c using (unique1) + where b.unique2::int4 = 42); + +-- +-- regression test: check for failure to generate a plan with multiple +-- degenerate IN clauses +-- +--Testcase 120: +select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) x where + (x.unique1)::int4 in (select (a.fields->>'f1')::int4 from int4_tbl a,float8_tbl b where (a.fields->>'f1')::int4=(b.fields->>'f1')::float8) and + (x.unique1)::int4 = 0 and + (x.unique1)::int4 in (select (aa.fields->>'f1')::int4 from int4_tbl aa,float8_tbl bb where (aa.fields->>'f1')::int4=(bb.fields->>'f1')::float8); + +-- try that with GEQO too +begin; +--Testcase 121: +set geqo = on; +--Testcase 122: +set geqo_threshold = 2; +--Testcase 123: +select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) x where + (x.unique1)::int4 in (select a.f1 from (select (fields->>'f1')::int4 f1 from INT4_TBL) a,(select (fields->>'f1')::float8 f1 from FLOAT8_TBL) b where a.f1::int4=b.f1::float8) and + (x.unique1)::int4 = 0 and + (x.unique1)::int4 in (select aa.f1 from (select (fields->>'f1')::int4 f1 from INT4_TBL) aa,(select (fields->>'f1')::float8 f1 from FLOAT8_TBL) bb where aa.f1::int4=bb.f1::float8); +rollback; + +-- +-- regression test: be sure we cope with proven-dummy append rels +-- +--Testcase 124: +CREATE FOREIGN TABLE b_star(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); + +--Testcase 125: +explain (costs off) +select b_star.aa::int4, bb, tenk1.unique1::int, tenk1.unique1::int + from (select (fields->>'unique1')::int unique1, fields->>'unique2' unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1) tenk1 right join (select (fields->>'class')::char class, (fields->>'aa')::int4 aa, fields->>'bb' bb, (fields->>'a')::int4 a from b_star) b_star on b_star.aa::int4 = tenk1.unique1::int + where b_star.bb < b_star.bb and b_star.bb is null; + +--Testcase 126: +select b_star.aa::int4, bb, tenk1.unique1::int, tenk1.unique1::int + from (select (fields->>'unique1')::int unique1, fields->>'unique2' unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1) tenk1 right join (select (fields->>'class')::char class, (fields->>'aa')::int4 aa, fields->>'bb' bb, (fields->>'a')::int4 a from b_star) b_star on b_star.aa::int4 = tenk1.unique1::int + where b_star.bb < b_star.bb and b_star.bb is null; + +--Testcase 127: +drop foreign table b_star; +-- +-- regression test: check handling of empty-FROM subquery underneath outer join +-- +--Testcase 128: +explain (costs off) +select (i1.fields->>'q1')::int8 q1, (i1.fields->>'q2')::int8 q2, (i2.fields->>'q1')::int8 q1, (i2.fields->>'q2')::int8 q2, x from int8_tbl i1 left join (int8_tbl i2 join + (select 123 as x) ss on (i2.fields->>'q1')::int8 = x) on (i1.fields->>'q2')::int8 = (i2.fields->>'q2')::int8 +order by 1, 2; + +--Testcase 129: +select (i1.fields->>'q1')::int8 q1, (i1.fields->>'q2')::int8 q2, (i2.fields->>'q1')::int8 q1, (i2.fields->>'q2')::int8 q2, x from int8_tbl i1 left join (int8_tbl i2 join + (select 123 as x) ss on (i2.fields->>'q1')::int8 = x) on (i1.fields->>'q2')::int8= (i2.fields->>'q2')::int8 +order by 1, 2; + +-- +-- regression test: check a case where join_clause_is_movable_into() gives +-- an imprecise result, causing an assertion failure +-- +--Testcase 130: +select count(*) +from + (select (t3.fields->>'tenthous')::int4 as x1, coalesce((t1.fields->>'stringu1')::name, (t2.fields->>'stringu1')::name) as x2 + from tenk1 t1 + left join tenk1 t2 on (t1.fields->>'unique1')::int4 = (t2.fields->>'unique1')::int4 + join tenk1 t3 on (t1.fields->>'unique2')::int4 = (t3.fields->>'unique2')::int4) ss, + tenk1 t4, + tenk1 t5 +where (t4.fields->>'thousand')::int4 = (t5.fields->>'unique1')::int4 and ss.x1 = (t4.fields->>'tenthous')::int4 and ss.x2 = (t5.fields->>'stringu1')::name; + +-- +-- regression test: check a case where we formerly missed including an EC +-- enforcement clause because it was expected to be handled at scan level +-- +--Testcase 131: +explain (costs off) +select a.f1, b.f1, (t.fields->>'thousand')::int4 thousand, (t.fields->>'tenhous')::int4 tenthous from + tenk1 t, + (select sum((fields->>'f1')::int4)+1 as f1 from int4_tbl i4a) a, + (select sum((fields->>'f1')::int4) as f1 from int4_tbl i4b) b +where b.f1 = (t.fields->>'thousand')::int4 and a.f1 = b.f1 and (a.f1+b.f1+999) = (t.fields->>'tenthous')::int4; + +--Testcase 132: +select a.f1, b.f1, (t.fields->>'thousand')::int4 thousand, (t.fields->>'tenhous')::int4 tenthous from + tenk1 t, + (select sum((fields->>'f1')::int4)+1 as f1 from int4_tbl i4a) a, + (select sum((fields->>'f1')::int4) as f1 from int4_tbl i4b) b +where b.f1 = (t.fields->>'thousand')::int4 and a.f1 = b.f1 and (a.f1+b.f1+999) = (t.fields->>'tenthous')::int4; + +-- +-- check a case where we formerly got confused by conflicting sort orders +-- in redundant merge join path keys +-- +--Testcase 133: +explain (costs off) +select * from + (SELECT (fields->>'i')::int i,(fields->>'j')::int j,fields->>'t' t FROM J1_TBL j1_tbl) j1_tbl full join + (select * from (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL j2_tbl) j2_tbl order by (j2_tbl.i)::int desc, (j2_tbl.k)::int asc) j2_tbl + on (j1_tbl.i)::int = (j2_tbl.i)::int and (j1_tbl.i)::int = (j2_tbl.k)::int; + +--Testcase 134: +select * from + (select (fields->>'i')::int i, (fields->>'j')::int j,fields->>'t' t from J1_TBL j1_tbl) j1_tbl full join + (select * from (select (fields->>'i')::int i, (fields->>'k')::int k from J2_TBL j2_tbl) j2_tbl order by (j2_tbl.i)::int desc, (j2_tbl.k)::int asc) j2_tbl + on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; + +-- +-- a different check for handling of redundant sort keys in merge joins +-- +--Testcase 135: +explain (costs off) +select count(*) from + (select * from tenk1 x order by (x.fields->>'thousand')::int4, (x.fields->>'twothousand')::int4, (x.fields->>'fivethous')::int4) x + left join + (select * from tenk1 y order by (y.fields->>'unique2')::int4) y + on (x.fields->>'thousand')::int4 = (y.fields->>'unique2')::int4 and (x.fields->>'twothousand')::int4 = (y.fields->>'hundred')::int4 and (x.fields->>'fivethous')::int4 = (y.fields->>'unique2')::int4; + +--Testcase 136: +select count(*) from + (select * from tenk1 x order by (x.fields->>'thousand')::int4, (x.fields->>'twothousand')::int4, (x.fields->>'fivethous')::int4) x + left join + (select * from tenk1 y order by (y.fields->>'unique2')::int4) y + on (x.fields->>'thousand')::int4 = (y.fields->>'unique2')::int4 and (x.fields->>'twothousand')::int4 = (y.fields->>'hundred')::int4 and (x.fields->>'fivethous')::int4 = (y.fields->>'unique2')::int4; + + +-- +-- Clean up +-- + +--Testcase 137: +DELETE FROM t1_nsc; +--Testcase 138: +DELETE FROM t2_nsc; +--Testcase 139: +DELETE FROM t3_nsc; +--Testcase 140: +DROP FOREIGN TABLE t1; +--Testcase 582: +DROP FOREIGN TABLE t1_nsc; +--Testcase 141: +DROP FOREIGN TABLE t2; +--Testcase 583: +DROP FOREIGN TABLE t2_nsc; +--Testcase 142: +DROP FOREIGN TABLE t3; +--Testcase 584: +DROP FOREIGN TABLE t3_nsc; +--Testcase 143: +DELETE FROM j1_tbl_nsc; +--Testcase 585: +DROP FOREIGN TABLE J1_TBL; +--Testcase 586: +DROP FOREIGN TABLE j1_tbl_nsc; +--Testcase 144: +DELETE FROM j2_tbl_nsc; +--Testcase 587: +DROP FOREIGN TABLE J2_TBL; +--Testcase 588: +DROP FOREIGN TABLE j2_tbl_nsc; + +--Testcase 589: +DELETE FROM x_nsc; +--Testcase 590: +DELETE FROM y_nsc; +--Testcase 591: +DROP FOREIGN TABLE x_nsc; +--Testcase 592: +DROP FOREIGN TABLE y_nsc; + +-- Both DELETE and UPDATE allow the specification of additional tables +-- to "join" against to determine which rows should be modified. + +--Testcase 145: +CREATE FOREIGN TABLE t1 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 593: +CREATE FOREIGN TABLE t1_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 't1'); +--Testcase 146: +CREATE FOREIGN TABLE t2 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 594: +CREATE FOREIGN TABLE t2_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 't2'); +--Testcase 147: +CREATE FOREIGN TABLE t3 (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 595: +CREATE FOREIGN TABLE t3_nsc (x int, y int) SERVER influxdb_svr OPTIONS (table 't3'); +--Testcase 148: +INSERT INTO t1_nsc VALUES (5, 10); +--Testcase 149: +INSERT INTO t1_nsc VALUES (15, 20); +--Testcase 150: +INSERT INTO t1_nsc VALUES (100, 100); +--Testcase 151: +INSERT INTO t1_nsc VALUES (200, 1000); +--Testcase 152: +INSERT INTO t2_nsc VALUES (200, 2000); +--Testcase 153: +INSERT INTO t3_nsc VALUES (5, 20); +--Testcase 154: +INSERT INTO t3_nsc VALUES (6, 7); +--Testcase 155: +INSERT INTO t3_nsc VALUES (7, 8); +--Testcase 156: +INSERT INTO t3_nsc VALUES (500, 100); +--Testcase 157: +ALTER TABLE t3 ADD time timestamp; +ALTER TABLE t3_nsc ADD time timestamp; +--Testcase 158: +SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; +--Testcase 159: +DELETE FROM t3_nsc USING t1_nsc table1 WHERE t3_nsc.x = table1.a; +--Testcase 160: +SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; +--Testcase 161: +DELETE FROM t3_nsc USING t1_nsc JOIN t2_nsc USING (a) WHERE t3_nsc.x > t1_nsc.a; +--Testcase 162: +SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; +--Testcase 163: +DELETE FROM t3_nsc USING t3_nsc t3_other WHERE t3_nsc.x = t3_other.x AND t3_nsc.y = t3_other.y; +--Testcase 164: +SELECT (fields->>'x')::int x, (fields->>'y')::int y FROM t3; + +-- Test join against inheritance tree + +--Testcase 165: +create temp table t2a () inherits (t2); + +--Testcase 166: +insert into t2a values ('{"a": "200", "b": "2001"}'); + +--Testcase 167: +select * from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 left join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int); + +-- Test matching of column name with wrong alias + +--Testcase 168: +select t1.x from (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'x')::int x, (fields->>'y')::int y from t3) t3 on (t1.a::int = t3.x::int); + +-- Test matching of locking clause with wrong alias + +--Testcase 666: +select t1.*, t2.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 on (t1.a::int = t2.a::int), t3 as unnamed_join + for update of unnamed_join; + +--Testcase 667: +select foo.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo, t3 as unnamed_join + for update of unnamed_join; + +--Testcase 668: +select foo.*, unnamed_join.* from + (select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo, t3 as unnamed_join + for update of foo; + +--Testcase 669: +select bar.*, unnamed_join.* from + ((select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo) as bar, t3 as unnamed_join + for update of foo; + +--Testcase 670: +select bar.*, unnamed_join.* from + ((select (fields->>'a')::int a, (fields->>'b')::int b from t1) t1 join (select (fields->>'a')::int a, (fields->>'b')::int b from t2) t2 using (a) as foo) as bar, t3 as unnamed_join + for update of bar; + +-- +-- regression test for 8.1 merge right join bug +-- + +--Testcase 169: +CREATE FOREIGN TABLE tt1 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 596: +CREATE FOREIGN TABLE tt1_nsc ( tt1_id int4, joincol int4 ) SERVER influxdb_svr OPTIONS (table 'tt1'); +--Testcase 170: +INSERT INTO tt1_nsc VALUES (1, 11); +--Testcase 171: +INSERT INTO tt1_nsc VALUES (2, NULL); +--Testcase 172: +CREATE FOREIGN TABLE tt2 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 597: +CREATE FOREIGN TABLE tt2_nsc ( tt2_id int4, joincol int4 ) SERVER influxdb_svr OPTIONS (table 'tt2'); +--Testcase 173: +INSERT INTO tt2_nsc VALUES (21, 11); +--Testcase 174: +INSERT INTO tt2_nsc VALUES (22, 11); +--Testcase 175: +set enable_hashjoin to off; +--Testcase 176: +set enable_nestloop to off; + +-- these should give the same results + +--Testcase 177: +select tt1.*, tt2.* from (select (fields->>'tt1_id')::int4 tt1_id, (fields->>'joincol')::int4 joincol from tt1) tt1 left join (select (fields->>'tt2_id')::int4 tt2_id, (fields->>'joincol')::int4 joincol from tt2) tt2 on tt1.joincol::int4 = tt2.joincol::int4; + +--Testcase 178: +select tt1.*, tt2.* from (select (fields->>'tt2_id')::int4 tt2_id, (fields->>'joincol')::int4 joincol from tt2) tt2 right join (select (fields->>'tt1_id')::int4 tt1_id, (fields->>'joincol')::int4 joincol from tt1) tt1 on tt1.joincol::int4 = tt2.joincol::int4; + +--Testcase 179: +reset enable_hashjoin; +--Testcase 180: +reset enable_nestloop; + +-- +-- regression test for bug #13908 (hash join with skew tuples & nbatch increase) +-- + +--Testcase 181: +set work_mem to '64kB'; +--Testcase 182: +set enable_mergejoin to off; +--Testcase 183: +set enable_memoize to off; + +--Testcase 184: +explain (costs off) +select count(*) from tenk1 a, tenk1 b + where ((a.fields->>'hundred')::int4 = (b.fields->>'thousand')::int4) and ((b.fields->>'fivethous')::int4 % 10) < 10; +--Testcase 185: +select count(*) from tenk1 a, tenk1 b + where ((a.fields->>'hundred')::int4 = (b.fields->>'thousand')::int4) and ((b.fields->>'fivethous')::int4 % 10) < 10; + +--Testcase 186: +reset work_mem; +--Testcase 187: +reset enable_mergejoin; +--Testcase 188: +reset enable_memoize; + +-- +-- regression test for 8.2 bug with improper re-ordering of left joins +-- + +--Testcase 189: +create foreign table tt3(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 598: +create foreign table tt3_nsc(f1 int, f2 text) server influxdb_svr OPTIONS (table 'tt3'); +--Testcase 190: +insert into tt3_nsc select x, repeat('xyzzy', 100) from generate_series(1,10000) x; +--Testcase 191: +create foreign table tt4(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 599: +create foreign table tt4_nsc(f1 int) server influxdb_svr OPTIONS (table 'tt4'); +--Testcase 192: +insert into tt4_nsc values (0),(1),(9999); +--Testcase 193: +SELECT (a.fields->>'f1')::int f1 +FROM tt4 a +LEFT JOIN ( + SELECT (b.fields->>'f1')::int f1 + FROM tt3 b LEFT JOIN tt3 c ON ((b.fields->>'f1')::int = (c.fields->>'f1')::int) + WHERE c.fields->>'f1' IS NULL +) AS d ON ((a.fields->>'f1')::int = (d.f1)::int) +WHERE d.f1 IS NULL; + +-- +-- regression test for proper handling of outer joins within antijoins +-- + +--Testcase 194: +create foreign table tt4x(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); + +--Testcase 195: +explain (costs off) +select * from tt4x t1 +where not exists ( + select 1 from tt4x t2 + left join tt4x t3 on (t2.fields->>'c3')::int = (t3.fields->>'c1')::int + left join ( select (t5.fields->>'c1')::int as c1 + from tt4x t4 left join tt4x t5 on (t4.fields->>'c2')::int = (t5.fields->>'c1')::int + ) a1 on (t3.fields->>'c2')::int = a1.c1 + where (t1.fields->>'c1')::int = (t2.fields->>'c2')::int +); + +-- +-- regression test for problems of the sort depicted in bug #3494 +-- + +--Testcase 196: +create foreign table tt5(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 600: +create foreign table tt5_nsc(f1 int, f2 int) server influxdb_svr OPTIONS (table 'tt5'); +--Testcase 197: +create foreign table tt6(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 601: +create foreign table tt6_nsc(f1 int, f2 int) server influxdb_svr OPTIONS (table 'tt6'); +--Testcase 198: +insert into tt5_nsc values(1, 10); +--Testcase 199: +insert into tt5_nsc values(1, 11); +--Testcase 200: +insert into tt6_nsc values(1, 9); +--Testcase 201: +insert into tt6_nsc values(1, 2); +--Testcase 202: +insert into tt6_nsc values(2, 9); +--Testcase 203: +select * from (select (fields->>'f1')::int f1, (fields->>'f2')::int f2 from tt5) tt5,(select (fields->>'f1')::int f1, (fields->>'f2')::int f2 from tt6) tt6 where (tt5.f1)::int = (tt6.f1)::int and (tt5.f1)::int = (tt5.f2)::int - (tt6.f2)::int; + +-- +-- regression test for problems of the sort depicted in bug #3588 +-- + +--Testcase 204: +create foreign table xx (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 602: +create foreign table xx_nsc (pkxx int) server influxdb_svr OPTIONS (table 'xx'); +--Testcase 205: +create foreign table yy (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 603: +create foreign table yy_nsc (pkyy int, pkxx int) server influxdb_svr OPTIONS (table 'yy'); +--Testcase 206: +insert into xx_nsc values (1); +--Testcase 207: +insert into xx_nsc values (2); +--Testcase 208: +insert into xx_nsc values (3); +--Testcase 209: +insert into yy_nsc values (101, 1); +--Testcase 210: +insert into yy_nsc values (201, 2); +--Testcase 211: +insert into yy_nsc values (301, NULL); +--Testcase 212: +select (yy.fields->>'pkyy')::int as yy_pkyy, (yy.fields->>'pkxx')::int as yy_pkxx, (yya.fields->>'pkyy')::int as yya_pkyy, + (xxa.fields->>'pkxx')::int as xxa_pkxx, (xxb.fields->>'pkxx')::int as xxb_pkxx +from yy + left join (SELECT * FROM yy where (fields->>'pkyy')::int = 101) as yya ON (yy.fields->>'pkyy')::int = (yya.fields->>'pkyy')::int + left join xx xxa on (yya.fields->>'pkxx')::int = (xxa.fields->>'pkxx')::int + left join xx xxb on coalesce ((xxa.fields->>'pkxx')::int, 1) = (xxb.fields->>'pkxx')::int ORDER BY yy_pkyy, yy_pkxx, yya_pkyy, xxa_pkxx, xxb_pkxx; + +-- +-- regression test for improper pushing of constants across outer-join clauses +-- (as seen in early 8.2.x releases) +-- + +--Testcase 213: +create foreign table zt1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 604: +create foreign table zt1_nsc (f1 int) server influxdb_svr OPTIONS (table 'zt1'); +--Testcase 214: +create foreign table zt2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 605: +create foreign table zt2_nsc (f2 int) server influxdb_svr OPTIONS (table 'zt2'); +--Testcase 215: +create foreign table zt3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 216: +insert into zt1_nsc values(53); +--Testcase 217: +insert into zt2_nsc values(53); +--Testcase 218: +select * from + (select (fields->>'f2')::int f2 from zt2) zt2 left join (select (fields->>'f3')::int f3 from zt3) zt3 on (f2::int = f3::int) + left join (select (fields->>'f1')::int f1 from zt1) zt1 on (f3::int = f1::int) +where (f2)::int = 53; + +--Testcase 219: +create temp view zv1 as select *,'dummy'::text AS junk from zt1; + +--Testcase 220: +select * from + (select (fields->>'f2')::int f2 from zt2) zt2 left join (select (fields->>'f3')::int f3 from zt3) zt3 on (f2::int = f3::int) + left join zv1 on (f3::int = (zv1.fields->>'f1')::int) +where (f2)::int = 53; + +-- +-- regression test for improper extraction of OR indexqual conditions +-- (as seen in early 8.3.x releases) +-- + +--Testcase 221: +select a.unique2, a.ten, b.tenthous, b.unique2, b.hundred +from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b on a.unique2 = b.tenthous +where (a.unique1)::int4 = 42 and + ((b.unique2 is null and (a.ten)::int4 = 2) or (b.hundred)::int4 = 3); + +-- +-- test proper positioning of one-time quals in EXISTS (8.4devel bug) +-- +--Testcase 222: +prepare foo(bool) as + select count(*) from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) b + on ((a.unique2)::int4 = (b.unique1)::int4 and exists + (select 1 from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) c where (c.thousand)::int4 = (b.unique2)::int4 and $1)); +--Testcase 223: +execute foo(true); +--Testcase 224: +execute foo(false); + +-- +-- test for sane behavior with noncanonical merge clauses, per bug #4926 +-- + +begin; + +--Testcase 225: +set enable_mergejoin = 1; +--Testcase 226: +set enable_hashjoin = 0; +--Testcase 227: +set enable_nestloop = 0; + +--Testcase 228: +create foreign table a (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 229: +create foreign table b (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); + +--Testcase 230: +select * from (select (fields->>'i')::int i from a) a left join (select (fields->>'x')::int x, (fields->>'y')::int y from b) b on i::int = x::int and i::int = y::int and x::int = i::int; + +--Testcase 231: +DROP FOREIGN TABLE a; +--Testcase 232: +DROP FOREIGN TABLE b; +rollback; + +-- +-- test handling of merge clauses using record_ops +-- +begin; + +--Testcase 233: +create type mycomptype as (id int, v bigint); + +--Testcase 234: +create temp table tidv (idv mycomptype); +--Testcase 235: +create index on tidv (idv); + +--Testcase 236: +explain (costs off) +select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; + +--Testcase 237: +set enable_mergejoin = 0; +--Testcase 238: +set enable_hashjoin = 0; + +--Testcase 239: +explain (costs off) +select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; + +rollback; + +-- +-- test NULL behavior of whole-row Vars, per bug #5025 +-- +--Testcase 240: +select t1.q2, count(t2.*) +from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1 left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 on (t1.q2 = t2.q1) +group by t1.q2 order by 1; + +--Testcase 241: +select (t1.fields->>'q2')::int8 q2, count(t2.*) +from int8_tbl t1 left join (select * from int8_tbl) t2 on ((t1.fields->>'q2')::int8 = (t2.fields->>'q1')::int8) +group by t1.fields->>'q2' order by 1; + +--Testcase 242: +select (t1.fields->>'q2')::int8 q2, count(t2.*) +from int8_tbl t1 left join (select * from int8_tbl offset 0) t2 on ((t1.fields->>'q2')::int8 = (t2.fields->>'q1')::int8) +group by t1.fields->>'q2' order by 1; + +--Testcase 243: +select (t1.fields->>'q2')::int8 q2, count(t2.*) +from int8_tbl t1 left join + (select (fields->>'q1')::int8 q1, case when (fields->>'q2')::int8=1 then 1 else (fields->>'q2')::int8 end as q2 from int8_tbl) t2 + on ((t1.fields->>'q2')::int8 = t2.q1) +group by t1.fields->>'q2' order by 1; + +-- +-- test incorrect failure to NULL pulled-up subexpressions +-- +begin; + +--Testcase 244: +create foreign table a ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 606: +create foreign table a_nsc ( + code char +) server influxdb_svr OPTIONS (table 'a'); +--Testcase 245: +create foreign table b ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 607: +create foreign table b_nsc ( + a char, + num integer +) server influxdb_svr OPTIONS (table 'b'); +--Testcase 246: +create foreign table c ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 608: +create foreign table c_nsc ( + name char, + a char +) server influxdb_svr OPTIONS (table 'c'); +--Testcase 247: +insert into a_nsc (code) values ('p'); +--Testcase 248: +insert into a_nsc (code) values ('q'); +--Testcase 249: +insert into b_nsc (a, num) values ('p', 1); +--Testcase 250: +insert into b_nsc (a, num) values ('p', 2); +--Testcase 251: +insert into c_nsc (name, a) values ('A', 'p'); +--Testcase 252: +insert into c_nsc (name, a) values ('B', 'q'); +--Testcase 253: +insert into c_nsc (name, a) values ('C', null); +--Testcase 254: +select c.name, ss.code, ss.b_cnt, ss.const +from (select fields->>'name' "name", fields->>'a' a from c) c left join + (select a.code, coalesce(b_grp.cnt, 0) as b_cnt, -1 as const + from (select fields->>'code' code from a) a left join + (select count(1) as cnt, b.fields->>'a' a from b group by b.fields->>'a') as b_grp + on a.code = b_grp.a + ) as ss + on (c.a = ss.code) +order by c.name; + +--Testcase 255: +DELETE FROM a_nsc; +--Testcase 256: +DELETE FROM b_nsc; +--Testcase 257: +DELETE FROM c_nsc; +--Testcase 258: +DROP FOREIGN TABLE a; +--Testcase 609: +DROP FOREIGN TABLE a_nsc; +--Testcase 259: +DROP FOREIGN TABLE b; +--Testcase 610: +DROP FOREIGN TABLE b_nsc; +--Testcase 260: +DROP FOREIGN TABLE c; +--Testcase 611: +DROP FOREIGN TABLE c_nsc; +rollback; + +-- +-- test incorrect handling of placeholders that only appear in targetlists, +-- per bug #6154 +-- +--Testcase 261: +SELECT * FROM +( SELECT 1 as key1 ) sub1 +LEFT JOIN +( SELECT sub3.key3, sub4.value2, COALESCE(sub4.value2, 66) as value3 FROM + ( SELECT 1 as key3 ) sub3 + LEFT JOIN + ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM + ( SELECT 1 as key5 ) sub5 + LEFT JOIN + ( SELECT 2 as key6, 42 as value1 ) sub6 + ON sub5.key5 = sub6.key6 + ) sub4 + ON sub4.key5 = sub3.key3 +) sub2 +ON sub1.key1 = sub2.key3; + +-- test the path using join aliases, too +--Testcase 262: +SELECT * FROM +( SELECT 1 as key1 ) sub1 +LEFT JOIN +( SELECT sub3.key3, value2, COALESCE(value2, 66) as value3 FROM + ( SELECT 1 as key3 ) sub3 + LEFT JOIN + ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM + ( SELECT 1 as key5 ) sub5 + LEFT JOIN + ( SELECT 2 as key6, 42 as value1 ) sub6 + ON sub5.key5 = sub6.key6 + ) sub4 + ON sub4.key5 = sub3.key3 +) sub2 +ON sub1.key1 = sub2.key3; + +-- +-- test case where a PlaceHolderVar is used as a nestloop parameter +-- + +--Testcase 263: +EXPLAIN (COSTS OFF) +SELECT qq, (fields->>'unique1')::int4 unique1 + FROM + ( SELECT COALESCE((fields->>'q1')::int8, 0) AS qq FROM int8_tbl a ) AS ss1 + FULL OUTER JOIN + ( SELECT COALESCE((fields->>'q2')::int8, -1) AS qq FROM int8_tbl b ) AS ss2 + USING (qq) + INNER JOIN tenk1 c ON qq = (fields->>'unique2')::int4; + +--Testcase 264: +SELECT qq, (fields->>'unique1')::int4 unique1 + FROM + ( SELECT COALESCE((fields->>'q1')::int8, 0) AS qq FROM int8_tbl a ) AS ss1 + FULL OUTER JOIN + ( SELECT COALESCE((fields->>'q2')::int8, -1) AS qq FROM int8_tbl b ) AS ss2 + USING (qq) + INNER JOIN tenk1 c ON qq = (fields->>'unique2')::int4; + +-- +-- nested nestloops can require nested PlaceHolderVars +-- + +--Testcase 265: +create foreign table nt1 ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 612: +create foreign table nt1_nsc ( + id int, + a1 boolean, + a2 boolean +) server influxdb_svr OPTIONS (table 'nt1'); +--Testcase 266: +create foreign table nt2 ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 613: +create foreign table nt2_nsc ( + id int, + nt1_id int, + b1 boolean, + b2 boolean +) server influxdb_svr OPTIONS (table 'nt2'); +--Testcase 267: +create foreign table nt3 ( + fields jsonb OPTIONS (fields 'true') +) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 614: +create foreign table nt3_nsc ( + id int, + nt2_id int, + c1 boolean +) server influxdb_svr OPTIONS (table 'nt3'); +--Testcase 268: +insert into nt1_nsc values (1,true,true); +--Testcase 269: +insert into nt1_nsc values (2,true,false); +--Testcase 270: +insert into nt1_nsc values (3,false,false); +--Testcase 271: +insert into nt2_nsc values (1,1,true,true); +--Testcase 272: +insert into nt2_nsc values (2,2,true,false); +--Testcase 273: +insert into nt2_nsc values (3,3,false,false); +--Testcase 274: +insert into nt3_nsc values (1,1,true); +--Testcase 275: +insert into nt3_nsc values (2,2,false); +--Testcase 276: +insert into nt3_nsc values (3,3,true); +--Testcase 277: +explain (costs off) +select (nt3.fields->>'id')::int id +from nt3 as nt3 + left join + (select (nt2.fields->>'id')::int id, (nt2.fields->>'nt1_id')::int nt1_id, (nt2.fields->>'b1')::boolean b1, (nt2.fields->>'b2')::boolean b2, ((nt2.fields->>'b1')::boolean and ss1.a3) AS b3 + from nt2 as nt2 + left join + (select (nt1.fields->>'id')::int id, (nt1.fields->>'a1')::boolean a1, (nt1.fields->>'a2')::boolean a2, ((nt1.fields->>'id')::int is not null) as a3 from nt1) as ss1 + on ss1.id = (nt2.fields->>'nt1_id')::int + ) as ss2 + on ss2.id = (nt3.fields->>'nt2_id')::int +where (nt3.fields->>'id')::int = 1 and ss2.b3; + +--Testcase 278: +select (nt3.fields->>'id')::int id +from nt3 as nt3 + left join + (select (nt2.fields->>'id')::int id, (nt2.fields->>'nt1_id')::int nt1_id, (nt2.fields->>'b1')::boolean b1, (nt2.fields->>'b2')::boolean b2, ((nt2.fields->>'b1')::boolean and ss1.a3) AS b3 + from nt2 as nt2 + left join + (select (nt1.fields->>'id')::int id, (nt1.fields->>'a1')::boolean a1, (nt1.fields->>'a2')::boolean a2, ((nt1.fields->>'id')::int is not null) as a3 from nt1) as ss1 + on ss1.id = (nt2.fields->>'nt1_id')::int + ) as ss2 + on ss2.id = (nt3.fields->>'nt2_id')::int +where (nt3.fields->>'id')::int = 1 and ss2.b3; + +-- +-- test case where a PlaceHolderVar is propagated into a subquery +-- + +--Testcase 279: +explain (costs off) +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t1) t1 left join + (select q1 as x, 42 as y from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t2) t2) ss + on (t1.q2)::int8 = (ss.x)::int8 +where + 1 = (select 1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t3) t3 where ss.y is not null limit 1) +order by 1,2; + +--Testcase 280: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t1) t1 left join + (select q1 as x, 42 as y from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t2) t2) ss + on (t1.q2)::int8 = (ss.x)::int8 +where + 1 = (select 1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL t3) t3 where ss.y is not null limit 1) +order by 1,2; + +-- +-- variant where a PlaceHolderVar is needed at a join, but not above the join +-- + +--Testcase 281: +explain (costs off) +select * from + (select (fields->>'f1')::int4 f1 from INT4_TBL i41) as i41, + lateral + (select 1 as x from + (select i41.f1 as lat, + i42.f1 as loc from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i81) as i81, (select (fields->>'f1')::int4 f1 from INT4_TBL i42) as i42) as ss1 + right join (select (fields->>'f1')::int4 f1 from INT4_TBL i43) as i43 on (i43.f1 > 1) + where ss1.loc = ss1.lat) as ss2 +where i41.f1 > 0; + +--Testcase 282: +select * from + (select (fields->>'f1')::int4 f1 from INT4_TBL i41) as i41, + lateral + (select 1 as x from + (select i41.f1 as lat, + i42.f1 as loc from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i81) as i81, (select (fields->>'f1')::int4 f1 from INT4_TBL i42) as i42) as ss1 + right join (select (fields->>'f1')::int4 f1 from INT4_TBL i43) as i43 on (i43.f1 > 1) + where ss1.loc = ss1.lat) as ss2 +where i41.f1 > 0; + +-- +-- test the corner cases FULL JOIN ON TRUE and FULL JOIN ON FALSE +-- +--Testcase 283: +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) a full join (select (fields->>'f1')::int4 f1 from INT4_TBL) b on true; +--Testcase 284: +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) a full join (select (fields->>'f1')::int4 f1 from INT4_TBL) b on false; + +-- +-- test for ability to use a cartesian join when necessary +-- + +--Testcase 285: +create foreign table q1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 286: +create foreign table q2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); + +--Testcase 287: +explain (costs off) +select * from + (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (f1)::int = (twothousand)::int, + (select (fields->>'q1')::int q1 from q1) q1, (select (fields->>'q2')::int q2 from q2) q2 +where (q1)::int = thousand::int or (q2)::int = thousand::int; + +--Testcase 288: +explain (costs off) +select * from + (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (f1)::int = (twothousand)::int, + (select (fields->>'q1')::int q1 from q1) q1, (select (fields->>'q2')::int q2 from q2) q2 +where (thousand)::int = ((q1)::int + (q2)::int); + +-- +-- test ability to generate a suitable plan for a star-schema query +-- + +--Testcase 289: +explain (costs off) +select * from + (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 tenk1) tenk1, (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b +where thousand::int4 = a.q1::int8 and tenthous::int4 = b.q1::int8 and a.q2::int8 = 1 and b.q2::int8 = 2; + +-- +-- test a corner case in which we shouldn't apply the star-schema optimization +-- + +--Testcase 290: +explain (costs off) +select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (select 1,0 from onerow) v1(x1,x2) + left join (select 3,1 from onerow) v2(y1,y2) + on (v1.x1)::int4 = (v2.y2)::int4) subq1 + on ((i1.fields->>'f1')::int4 = (subq1.x2)::int4) + on ((t1.fields->>'unique2')::int4 = (subq1.d1)::int4) + left join tenk1 t2 + on ((subq1.y1)::int4 = (t2.fields->>'unique1')::int4) +where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > t2.fields->>'stringu2'; + +--Testcase 291: +select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (select 1,0 from onerow) v1(x1,x2) + left join (select 3,1 from onerow) v2(y1,y2) + on (v1.x1)::int4 = (v2.y2)::int4) subq1 + on ((i1.fields->>'f1')::int4 = (subq1.x2)::int4) + on ((t1.fields->>'unique2')::int4 = (subq1.d1)::int4) + left join tenk1 t2 + on ((subq1.y1)::int4 = (t2.fields->>'unique1')::int4) +where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > t2.fields->>'stringu2'; + +-- variant that isn't quite a star-schema case + +--Testcase 292: +select ss1.d1 from + tenk1 as t1 + inner join tenk1 as t2 + on (t1.fields->>'tenthous')::int4 = (t2.fields->>'ten')::int4 + inner join + int8_tbl as i8 + left join int4_tbl as i4 + inner join (select 64::information_schema.cardinal_number as d1 + from tenk1 t3, + lateral (select abs((t3.fields->>'unique1')::int4) + random()) ss0(x) + where (t3.fields->>'fivethous')::int4 < 0) as ss1 + on (i4.fields->>'f1')::int4 = ss1.d1 + on (i8.fields->>'q1')::int8 = (i4.fields->>'f1')::int4 + on (t1.fields->>'tenthous')::int4 = ss1.d1 +where (t1.fields->>'unique1')::int4 < (i4.fields->>'f1')::int4; + +-- this variant is foldable by the remove-useless-RESULT-RTEs code + +--Testcase 293: +explain (costs off) +select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (values(1,0)) v1(x1,x2) + left join (values(3,1)) v2(y1,y2) + on v1.x1 = v2.y2) subq1 + on ((i1.fields->>'f1')::int4 = subq1.x2) + on ((t1.fields->>'unique2')::int4 = subq1.d1) + left join tenk1 t2 + on (subq1.y1 = (t2.fields->>'unique1')::int4) +where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > (t2.fields->>'stringu2')::name; + +--Testcase 294: +select (t1.fields->>'unique2')::int4 unique2, (t1.fields->>'stringu1')::name stringu1, (t2.fields->>'unique1')::int4 unique1, (t2.fields->>'stringu2')::name stringu2 from + tenk1 t1 + inner join int4_tbl i1 + left join (select v1.x2, v2.y1, 11 AS d1 + from (values(1,0)) v1(x1,x2) + left join (values(3,1)) v2(y1,y2) + on v1.x1 = v2.y2) subq1 + on ((i1.fields->>'f1')::int4 = subq1.x2) + on ((t1.fields->>'unique2')::int4 = subq1.d1) + left join tenk1 t2 + on (subq1.y1 = (t2.fields->>'unique1')::int4) +where (t1.fields->>'unique2')::int4 < 42 and (t1.fields->>'stringu1')::name > (t2.fields->>'stringu2')::name; + +-- Here's a variant that we can't fold too aggressively, though, +-- or we end up with noplace to evaluate the lateral PHV +--Testcase 295: +explain (verbose, costs off) +select * from + (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), + lateral (select ss2.y as z limit 1) ss3; +--Testcase 296: +select * from + (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), + lateral (select ss2.y as z limit 1) ss3; + +-- Test proper handling of appendrel PHVs during useless-RTE removal +--Testcase 297: +explain (costs off) +select * from + (select 0 as z) as t1 + left join + (select true as a) as t2 + on true, + lateral (select true as b + union all + select a as b) as t3 +where b; + +--Testcase 298: +select * from + (select 0 as z) as t1 + left join + (select true as a) as t2 + on true, + lateral (select true as b + union all + select a as b) as t3 +where b; + +-- +-- test inlining of immutable functions +-- +--Testcase 299: +create function f_immutable_int4(i integer) returns integer as +$$ begin return i; end; $$ language plpgsql immutable; + +-- check optimization of function scan with join +--Testcase 300: +explain (costs off) +select (fields->>'unique1')::int4 unique1 from tenk1, (select * from f_immutable_int4(1) x) x +where x = (fields->>'unique1')::int4; + +--Testcase 301: +explain (verbose, costs off) +select (fields->>'unique1')::int4 unique1, x.* +from tenk1, (select *, random() from f_immutable_int4(1) x) x +where x = (fields->>'unique1')::int4; + +--Testcase 302: +explain (costs off) +select (fields->>'unique1')::int4 unique1 from tenk1, f_immutable_int4(1) x where x = (fields->>'unique1')::int4; + +--Testcase 303: +explain (costs off) +select (fields->>'unique1')::int4 unique1 from tenk1, lateral f_immutable_int4(1) x where x = (fields->>'unique1')::int4; + +--Testcase 569: +explain (costs off) +select (fields->>'unique1')::int4 unique1 from tenk1, lateral f_immutable_int4(1) x where x in (select 17); + +--Testcase 304: +explain (costs off) +select (fields->>'unique1')::int4 unique1, x from tenk1 join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; + +--Testcase 305: +explain (costs off) +select (fields->>'unique1')::int4 unique1, x from tenk1 left join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; + +--Testcase 306: +explain (costs off) +select (fields->>'unique1')::int4 unique1, x from tenk1 right join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; + +--Testcase 307: +explain (costs off) +select (fields->>'unique1')::int4 unique1, x from tenk1 full join f_immutable_int4(1) x on (fields->>'unique1')::int4 = x; + +-- check that pullup of a const function allows further const-folding +--Testcase 308: +explain (costs off) +select (fields->>'unique1')::int4 unique1 from tenk1, f_immutable_int4(1) x where x = 42; + +-- test inlining of immutable functions with PlaceHolderVars +--Testcase 309: +explain (costs off) +select (nt3.fields->>'id')::int id +from nt3 as nt3 + left join + (select nt2.*, ((nt2.fields->>'b1')::boolean or i4 = 42) AS b3 + from nt2 as nt2 + left join + f_immutable_int4(0) i4 + on i4 = (nt2.fields->>'nt1_id')::int + ) as ss2 + on (ss2.fields->>'id')::int = (nt3.fields->>'nt2_id')::int +where (nt3.fields->>'id')::int = 1 and (ss2.b3)::boolean; + +--Testcase 310: +drop function f_immutable_int4(int); + +-- test inlining when function returns composite + +--Testcase 311: +create function mki8(bigint, bigint) returns int8_tbl as +$$select row('{"q1" : ' || cast($1 as text) || ', "q2" : ' || cast($2 as text) || '}')::int8_tbl$$ language sql; + +--Testcase 312: +create function mki4(int) returns int4_tbl as +$$select row('{"f1" : ' || cast($1 as text) || '}')::int4_tbl$$ language sql; + +--Testcase 313: +explain (verbose, costs off) +select * from mki8(1, 2); +--Testcase 314: +select * from mki8(1, 2); + +--Testcase 315: +explain (verbose, costs off) +select * from mki4(42); +--Testcase 316: +select * from mki4(42); + +--Testcase 317: +drop function mki8(bigint, bigint); +--Testcase 318: +drop function mki4(int); + +-- +-- test extraction of restriction OR clauses from join OR clause +-- (we used to only do this for indexable clauses) +-- + +--Testcase 319: +explain (costs off) +select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on + ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or ((a.unique2)::int4 = 3 and (b.hundred)::int4 = 4); +--Testcase 320: +explain (costs off) +select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on + ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or ((a.unique2)::int4 = 3 and (b.ten)::int4 = 4); +--Testcase 321: +explain (costs off) +select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on + ((a.unique1)::int4 = 1 and (b.unique1)::int4 = 2) or + (((a.unique2)::int4 = 3 or (a.unique2)::int4 = 7) and (b.hundred)::int4 = 4); + +-- +-- test placement of movable quals in a parameterized join tree +-- + +--Testcase 322: +explain (costs off) +select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t1) t1 left join + ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t2) t2 join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t3) t3 on (t2.thousand)::int4 = (t3.unique2)::int4) + on (t1.hundred)::int4 = (t2.hundred)::int4 and (t1.ten)::int4 = (t3.ten)::int4 +where (t1.unique1)::int4 = 1; + +--Testcase 323: +explain (costs off) +select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t1) t1 left join + ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t2) t2 join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 t3) t3 on (t2.thousand)::int4 = (t3.unique2)::int4) + on (t1.hundred)::int4 = (t2.hundred)::int4 and (t1.ten)::int4 + (t2.ten)::int4 = (t3.ten)::int4 +where (t1.unique1)::int4 = 1; + +--Testcase 324: +explain (costs off) +select count(*) from + (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (a.unique1)::int4 = (b.unique2)::int4 + left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 c) c on (a.unique2)::int4 = (b.unique1)::int4 and (c.thousand)::int4 = (a.thousand)::int4 + join (select (fields->>'f1')::int4 f1 from INT4_TBL) INT4_TBL on (b.thousand)::int4 = (f1)::int4; + +--Testcase 325: +select count(*) from + (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (a.unique1)::int4 = (b.unique2)::int4 + left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 c) c on (a.unique2)::int4 = (b.unique1)::int4 and (c.thousand)::int4 = (a.thousand)::int4 + join int4_tbl on (b.thousand)::int4 = (fields->>'f1')::int4; + +--Testcase 326: +explain (costs off) +select (b.fields->>'unique1')::int4 unique1 from + tenk1 a join tenk1 b on (a.fields->>'unique1')::int4 = (b.fields->>'unique2')::int4 + left join tenk1 c on (b.fields->>'unique1')::int4 = 42 and (c.fields->>'thousand')::int4 = (a.fields->>'thousand')::int4 + join (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1 on (b.fields->>'thousand')::int4 = (f1)::int4 + right join int4_tbl i2 on (i2.fields->>'f1')::int4 = (b.fields->>'tenthous')::int4 + order by 1; + +--Testcase 327: +select (b.fields->>'unique1')::int4 unique1 from + tenk1 a join tenk1 b on (a.fields->>'unique1')::int4 = (b.fields->>'unique2')::int4 + left join tenk1 c on (b.fields->>'unique1')::int4 = 42 and (c.fields->>'thousand')::int4 = (a.fields->>'thousand')::int4 + join (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1 on (b.fields->>'thousand')::int4 = (f1)::int4 + right join int4_tbl i2 on (i2.fields->>'f1')::int4 = (b.fields->>'tenthous')::int4 + order by 1; + +--Testcase 328: +explain (costs off) +select * from +( + select unique1, q1, coalesce((unique1)::int4, -1) + (q1)::int8 as fault + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 on ((q2)::int8 = (unique2)::int4) +) ss +where fault = 122 +order by fault; + +--Testcase 329: +select * from +( + select unique1, q1, coalesce((unique1)::int4, -1) + (q1)::int8 as fault + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) tenk1 on ((q2)::int8 = (unique2)::int4) +) ss +where fault = 122 +order by fault; + +--Testcase 330: +explain (costs off) +select * from +(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) +left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x +left join unnest(v1ys) as u1(u1y) on u1y = v2y; + +--Testcase 331: +select * from +(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) +left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x +left join unnest(v1ys) as u1(u1y) on u1y = v2y; + +-- +-- test handling of potential equivalence clauses above outer joins +-- + +--Testcase 332: +explain (costs off) +select q1, unique2, thousand, hundred + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (q1)::int8 = (unique2)::int4 + where coalesce((thousand)::int4,123) = (q1)::int8 and (q1)::int8 = coalesce((hundred)::int4,123); + +--Testcase 333: +select q1, unique2, thousand, hundred + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (q1)::int8 = (unique2)::int4 + where coalesce((thousand)::int4,123) = (q1)::int8 and (q1)::int8 = coalesce((hundred)::int4,123); + +--Testcase 334: +explain (costs off) +select f1, unique2, case when (unique2)::int4 is null then (f1)::int4 else 0 end + from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 + where (case when (unique2)::int4 is null then (f1)::int4 else 0 end) = 0; + +--Testcase 335: +select f1, unique2, case when (unique2)::int4 is null then (f1)::int4 else 0 end + from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 + where (case when (unique2)::int4 is null then (f1)::int4 else 0 end) = 0; + +-- +-- another case with equivalence clauses above outer joins (bug #8591) +-- + +--Testcase 336: +explain (costs off) +select (a.fields->>'unique1')::int4 unique1, (b.fields->>'unique1')::int4 unique1, (c.fields->>'unique1')::int4 unique1, coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) + from tenk1 a left join tenk1 b on (b.fields->>'thousand')::int4 = (a.fields->>'unique1')::int4 left join tenk1 c on (c.fields->>'unique2')::int4 = coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) + where (a.fields->>'unique2')::int4 < 10 and coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) = 44; + +--Testcase 337: +select (a.fields->>'unique1')::int4 unique1, (b.fields->>'unique1')::int4 unique1, (c.fields->>'unique1')::int4 unique1, coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) + from tenk1 a left join tenk1 b on (b.fields->>'thousand')::int4 = (a.fields->>'unique1')::int4 left join tenk1 c on (c.fields->>'unique2')::int4 = coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) + where (a.fields->>'unique2')::int4 < 10 and coalesce((b.fields->>'twothousand')::int4, (a.fields->>'twothousand')::int4) = 44; + +-- +-- check handling of join aliases when flattening multiple levels of subquery +-- + +--Testcase 338: +explain (verbose, costs off) +select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from + (values (0),(1)) foo1(join_key) +left join + (select join_key, bug_field from + (select ss1.join_key, ss1.bug_field from + (select (fields->>'f1')::int4 as join_key, 666 as bug_field from int4_tbl i1) ss1 + ) foo2 + left join + (select (fields->>'unique2')::int4 as join_key from tenk1 i2) ss2 + using (join_key) + ) foo3 +using (join_key); + +--Testcase 339: +select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from + (values (0),(1)) foo1(join_key) +left join + (select join_key, bug_field from + (select ss1.join_key, ss1.bug_field from + (select (fields->>'f1')::int4 as join_key, 666 as bug_field from int4_tbl i1) ss1 + ) foo2 + left join + (select (fields->>'unique2')::int4 as join_key from tenk1 i2) ss2 + using (join_key) + ) foo3 +using (join_key); + +-- +-- test successful handling of nested outer joins with degenerate join quals +-- +--Testcase 340: +create foreign table text_tbl(fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); + +--Testcase 341: +explain (verbose, costs off) +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 + left join int8_tbl i8 + left join (select *, null::int as d2 from int8_tbl i8b2) b2 + on ((i8.fields->>'q1')::int8 = (b2.fields->>'q1')::int8) + on ((b2.d2)::int8 = (b1.fields->>'q2')::int8) + on (t1.f1 = b1.d1) + left join int4_tbl i4 + on ((i8.fields->>'q2')::int8 = (i4.fields->>'f1')::int4); + +--Testcase 342: +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 + left join int8_tbl i8 + left join (select *, null::int as d2 from int8_tbl i8b2) b2 + on ((i8.fields->>'q1')::int8 = (b2.fields->>'q1')::int8) + on ((b2.d2)::int8 = (b1.fields->>'q2')::int8) + on (t1.f1 = b1.d1) + left join int4_tbl i4 + on ((i8.fields->>'q2')::int8 = (i4.fields->>'f1')::int4); + +--Testcase 343: +explain (verbose, costs off) +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1 ) b1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2) b2 + on ((i8.q1)::int8 = (b2.q1)::int8) + on ((b2.d2)::int8 = (b1.q2)::int8) + on (t1.f1 = b1.d1) + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on ((i8.q2)::int8 = (i4.f1)::int4); + +--Testcase 344: +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2) b2 + on ((i8.q1)::int8 = (b2.q1)::int8) + on ((b2.d2)::int8 = (b1.q2)::int8) + on (t1.f1 = b1.d1) + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on ((i8.q2)::int8 = (i4.f1)::int4); + +--Testcase 345: +explain (verbose, costs off) +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2 + where (q1)::int8 = (f1)::int8) b2 + on ((i8.q1)::int8 = (b2.q1)::int8) + on ((b2.d2)::int8 = (b1.q2)::int8) + on (t1.f1 = b1.d1) + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on ((i8.q2)::int8 = (i4.f1)::int4); + +--Testcase 346: +select t1.* from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select *, '***'::text as d1 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b1) i8b1) b1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join (select *, null::int as d2 from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8b2) i8b2, (select (fields->>'f1')::int4 f1 from INT4_TBL i4b2) i4b2 + where (q1)::int8 = (f1)::int8) b2 + on ((i8.q1)::int8 = (b2.q1)::int8) + on ((b2.d2)::int8 = (b1.q2)::int8) + on (t1.f1 = b1.d1) + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on ((i8.q2)::int8 = (i4.f1)::int4); + +--Testcase 347: +explain (verbose, costs off) +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + inner join (select (fields->>'q1')::int8 q1, fields->>'q2' q2 from INT8_TBL i8) i8 + on (i8.q2)::bigint = 456 + right join (select fields->>'f1' f1 from text_tbl t2) t2 + on t1.f1 = 'doh!' + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on i8.q1 = i4.f1; + +--Testcase 348: +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + inner join (select (fields->>'q1')::int8 q1, fields->>'q2' q2 from INT8_TBL i8) i8 + on (i8.q2)::bigint = 456 + right join (select fields->>'f1' f1 from text_tbl t2) t2 + on t1.f1 = 'doh!' + left join (select (fields->>'f1')::int4 f1 from INT4_TBL i4) i4 + on i8.q1 = i4.f1; + +-- +-- test for appropriate join order in the presence of lateral references +-- + +--Testcase 349: +explain (verbose, costs off) +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + on (i8.q2)::int8 = 123, + lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss +where t1.f1 = ss.f1; + +--Testcase 350: +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + on (i8.q2)::int8 = 123, + lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss +where t1.f1 = ss.f1; + +--Testcase 351: +explain (verbose, costs off) +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + on (i8.q2)::bigint = 123, + lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss1, + lateral (select ss1.* from text_tbl t3 limit 1) as ss2 +where t1.f1 = ss2.f1; + +--Testcase 352: +select * from + (select fields->>'f1' f1 from text_tbl t1) t1 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + on (i8.q2)::bigint = 123, + lateral (select i8.q1, t2.fields->>'f1' f1 from text_tbl t2 limit 1) as ss1, + lateral (select ss1.* from text_tbl t3 limit 1) as ss2 +where t1.f1 = ss2.f1; + +--Testcase 353: +explain (verbose, costs off) +select 1 from + text_tbl as tt1 + inner join text_tbl as tt2 on (tt1.fields->>'f1' = 'foo') + left join text_tbl as tt3 on (tt3.fields->>'f1' = 'foo') + left join text_tbl as tt4 on (tt3.fields->>'f1' = tt4.fields->>'f1'), + lateral (select tt4.fields->>'f1' as c0 from text_tbl as tt5 limit 1) as ss1 +where tt1.fields->>'f1' = ss1.c0; + +--Testcase 354: +select 1 from + text_tbl as tt1 + inner join text_tbl as tt2 on (tt1.fields->>'f1' = 'foo') + left join text_tbl as tt3 on (tt3.fields->>'f1' = 'foo') + left join text_tbl as tt4 on (tt3.fields->>'f1' = tt4.fields->>'f1'), + lateral (select tt4.fields->>'f1' as c0 from text_tbl as tt5 limit 1) as ss1 +where tt1.fields->>'f1' = ss1.c0; + +-- +-- check a case in which a PlaceHolderVar forces join order +-- + +--Testcase 355: +explain (verbose, costs off) +select ss2.* from + (select (fields->>'f1')::int4 f1 from INT4_TBL) i41 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) i8 + join (select i42.fields->>'f1' as c1, i43.fields->>'f1' as c2, 42 as c3 + from int4_tbl i42, int4_tbl i43) ss1 + on (i8.q1)::int8 = (ss1.c2)::int8 + on (i41.f1)::int4 = (ss1.c1)::int4, + lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 +where (ss1.c2)::int8 = 0; + +--Testcase 356: +select ss2.* from + (select (fields->>'f1')::int4 f1 from INT4_TBL) i41 + left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) i8 + join (select i42.fields->>'f1' as c1, i43.fields->>'f1' as c2, 42 as c3 + from int4_tbl i42, int4_tbl i43) ss1 + on (i8.q1)::int8 = (ss1.c2)::int8 + on (i41.f1)::int4 = (ss1.c1)::int4, + lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 +where (ss1.c2)::int8 = 0; + +-- +-- test successful handling of full join underneath left join (bug #14105) +-- + +--Testcase 357: +explain (costs off) +select * from + (select 1 as id) as xx + left join + ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a1) as a1 full join (select 1 as id) as yy on ((a1.unique1)::int4 = yy.id)) + on (xx.id = coalesce(yy.id)); + +--Testcase 358: +select * from + (select 1 as id) as xx + left join + ((select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1) as a1 full join (select 1 as id) as yy on ((a1.unique1)::int4 = yy.id)) + on (xx.id = coalesce(yy.id)); + +-- +-- test ability to push constants through outer join clauses +-- + +--Testcase 359: +explain (costs off) + select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a left join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b on (f1)::int4 = (unique2)::int4 where (f1)::int4 = 0; + +--Testcase 360: +explain (costs off) + select * from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 a) a full join (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'two')::int4 two, (fields->>'four')::int4 four, (fields->>'ten')::int4 ten, (fields->>'twenty')::int4 twenty, (fields->>'hundred')::int4 hundred, (fields->>'thousand')::int4 thousand, (fields->>'twothousand')::int4 twothousand, (fields->>'fivethous')::int4 fivethous, (fields->>'tenthous')::int4 tenthous, (fields->>'odd')::int4 odd, (fields->>'even')::int4 even, (fields->>'stringu1')::name stringu1, (fields->>'stringu2')::name stringu2, (fields->>'string4')::name string4 from tenk1 b) b using(unique2) where (unique2)::int4 = 42; + +-- +-- test that quals attached to an outer join have correct semantics, +-- specifically that they don't re-use expressions computed below the join; +-- we force a mergejoin so that coalesce(b.q1, 1) appears as a join input +-- + +--Testcase 361: +set enable_hashjoin to off; +--Testcase 362: +set enable_nestloop to off; + +--Testcase 363: +explain (verbose, costs off) + select (a.fields->>'q2')::int8 q2, (b.fields->>'q1')::int8 q1 + from int8_tbl a left join int8_tbl b on (a.fields->>'q2')::int8 = coalesce((b.fields->>'q1')::int8, 1) + where coalesce((b.fields->>'q1')::int8, 1) > 0; +--Testcase 364: +select (a.fields->>'q2')::int8 q2, (b.fields->>'q1')::int8 q1 + from int8_tbl a left join int8_tbl b on (a.fields->>'q2')::int8 = coalesce((b.fields->>'q1')::int8, 1) + where coalesce((b.fields->>'q1')::int8, 1) > 0; + +--Testcase 365: +reset enable_hashjoin; +--Testcase 366: +reset enable_nestloop; + +-- +-- test join removal +-- + +begin; + +--Testcase 367: +CREATE FOREIGN TABLE a (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 615: +CREATE FOREIGN TABLE a_nsc (id int, b_id int) SERVER influxdb_svr OPTIONS (table 'a'); +--Testcase 368: +CREATE FOREIGN TABLE b (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 616: +CREATE FOREIGN TABLE b_nsc (id int, c_id int) SERVER influxdb_svr OPTIONS (table 'b'); +--Testcase 369: +CREATE FOREIGN TABLE c (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 617: +CREATE FOREIGN TABLE c_nsc (id int) SERVER influxdb_svr OPTIONS (table 'c'); +--Testcase 370: +CREATE FOREIGN TABLE d (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 618: +CREATE FOREIGN TABLE d_nsc (a int, b int) SERVER influxdb_svr OPTIONS (table 'd'); +--Testcase 371: +INSERT INTO a_nsc VALUES (0, 0), (1, NULL); +--Testcase 372: +INSERT INTO b_nsc VALUES (0, 0), (1, NULL); +--Testcase 373: +INSERT INTO c_nsc VALUES (0), (1); +--Testcase 374: +INSERT INTO d_nsc VALUES (1,3), (2,2), (3,1); +-- all three cases should be optimizable into a simple seqscan +--Testcase 375: +explain (costs off) SELECT a.* FROM (select (fields->>'id')::int id, (fields->>'b_id')::int b_id from a) a LEFT JOIN (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b ON a.b_id = b.id; +--Testcase 376: +explain (costs off) SELECT b.* FROM (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b LEFT JOIN (select (fields->>'id')::int id from c) c ON b.c_id = c.id; +--Testcase 377: +explain (costs off) + SELECT a.* FROM (select (fields->>'id')::int id, (fields->>'b_id')::int b_id from a) a LEFT JOIN ((select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b left join (select (fields->>'id')::int id from c) c on b.c_id = c.id) + ON (a.b_id = b.id); + +-- check optimization of outer join within another special join +--Testcase 378: +explain (costs off) +select (fields->>'id')::int id from a where (fields->>'id')::int in ( + select (b.fields->>'id')::int from b left join c on (b.fields->>'id')::int = (c.fields->>'id')::int +); + +-- check that join removal works for a left join when joining a subquery +-- that is guaranteed to be unique by its GROUP BY clause +--Testcase 379: +explain (costs off) +select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b group by b.id, b.c_id) s + on (d.a)::int = (s.id)::int and (d.b)::int = (s.c_id)::int; + +-- similarly, but keying off a DISTINCT clause +--Testcase 380: +explain (costs off) +select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select distinct * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b) s + on (d.a)::int = (s.id)::int and (d.b)::int = (s.c_id)::int; + +-- join removal is not possible when the GROUP BY contains a column that is +-- not in the join condition. (Note: as of 9.6, we notice that b.id is a +-- primary key and so drop b.c_id from the GROUP BY of the resulting plan; +-- but this happens too late for join removal in the outer plan level.) +--Testcase 381: +explain (costs off) +select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b group by b.id, b.c_id) s + on (d.a)::int = (s.id)::int; + +-- similarly, but keying off a DISTINCT clause +--Testcase 382: +explain (costs off) +select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select distinct * from (select (fields->>'id')::int id, (fields->>'c_id')::int c_id from b) b) s + on (d.a)::int = (s.id)::int; + +-- check join removal works when uniqueness of the join condition is enforced +-- by a UNION +--Testcase 383: +explain (costs off) +select d.* from (select (fields->>'a')::int a, (fields->>'b')::int b from d) d left join (select (fields->>'id')::int id from a union select (fields->>'id')::int id from b) s + on (d.a)::int = (s.id)::int; + +-- check join removal with a cross-type comparison operator +--Testcase 384: +explain (costs off) +select i8.* from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join (select (fields->>'f1')::int f1 from int4_tbl group by (fields->>'f1')::int) i4 + on (i8.q1)::int8 = (i4.f1)::int4; + +-- check join removal with lateral references +--Testcase 385: +explain (costs off) +select 1 from (select (a.fields->>'id')::int id FROM a left join b on (a.fields->>'b_id')::int = (b.fields->>'id')::int) q, + lateral generate_series(1, (q.id)::int) gs(i) where (q.id)::int = (gs.i)::int; + +--Testcase 386: +DELETE FROM a_nsc; +--Testcase 387: +DELETE FROM b_nsc; +--Testcase 388: +DELETE FROM c_nsc; +--Testcase 389: +DELETE FROM d_nsc; +--Testcase 390: +DROP FOREIGN TABLE a; +--Testcase 619: +DROP FOREIGN TABLE a_nsc; +--Testcase 391: +DROP FOREIGN TABLE b; +--Testcase 620: +DROP FOREIGN TABLE b_nsc; +--Testcase 392: +DROP FOREIGN TABLE c; +--Testcase 621: +DROP FOREIGN TABLE c_nsc; +--Testcase 393: +DROP FOREIGN TABLE d; +--Testcase 622: +DROP FOREIGN TABLE d_nsc; +rollback; + +--Testcase 394: +create foreign table parent (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 623: +create foreign table parent_nsc (k int, pd int) server influxdb_svr OPTIONS (table 'parent'); +--Testcase 395: +create foreign table child (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 624: +create foreign table child_nsc (k int, cd int) server influxdb_svr OPTIONS (table 'child'); +--Testcase 396: +insert into parent_nsc values (1, 10), (2, 20), (3, 30); +--Testcase 397: +insert into child_nsc values (1, 100), (4, 400); +-- this case is optimizable +--Testcase 398: +select p.* from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c on ((p.k)::int = (c.k)::int); +--Testcase 399: +explain (costs off) + select p.* from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c on ((p.k)::int = (c.k)::int); + +-- this case is not +--Testcase 400: +select p.*, linked from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p + left join (select c.*, true as linked from (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c) as ss + on (p.k = ss.k); +--Testcase 401: +explain (costs off) + select p.*, linked from (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent p) p + left join (select c.*, true as linked from (select (fields->>'k')::int k, (fields->>'cd')::int cd from child c) c) as ss + on (p.k = ss.k); + +-- check for a 9.0rc1 bug: join removal breaks pseudoconstant qual handling +--Testcase 402: +select p.* from + (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int) + where (p.k)::int = 1 and (p.k)::int = 2; +--Testcase 403: +explain (costs off) +select p.* from + (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int) + where (p.k)::int = 1 and (p.k)::int = 2; + +--Testcase 404: +select p.* from + ((select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int)) join (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) x on (p.k)::int = (x.k)::int + where (p.k)::int = 1 and (p.k)::int = 2; +--Testcase 405: +explain (costs off) +select p.* from + ((select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) p left join (select (fields->>'k')::int k, (fields->>'cd')::int cd from child) c on ((p.k)::int = (c.k)::int)) join (select (fields->>'k')::int k, (fields->>'pd')::int pd from parent) x on (p.k)::int = (x.k)::int + where (p.k)::int = 1 and (p.k)::int = 2; + +-- bug 5255: this is not optimizable by join removal +begin; + +--Testcase 406: +CREATE FOREIGN TABLE a (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 625: +CREATE FOREIGN TABLE a_nsc (id int) SERVER influxdb_svr OPTIONS (table 'a'); +--Testcase 407: +CREATE FOREIGN TABLE b (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 626: +CREATE FOREIGN TABLE b_nsc (id int, a_id int) SERVER influxdb_svr OPTIONS (table 'b'); +--Testcase 408: +INSERT INTO a_nsc VALUES (0), (1); +--Testcase 409: +INSERT INTO b_nsc VALUES (0, 0), (1, NULL); +--Testcase 410: +SELECT * FROM (select (fields->>'id')::int id, (fields->>'a_id')::int a_id from b) b LEFT JOIN (select (fields->>'id')::int id from a) a ON ((b.a_id)::int = (a.id)::int) WHERE ((a.id)::int IS NULL OR (a.id)::int > 0); +--Testcase 411: +SELECT b.* FROM (select (fields->>'id')::int id, (fields->>'a_id')::int a_id from b) b LEFT JOIN (select (fields->>'id')::int id from a) a ON ((b.a_id)::int = (a.id)::int) WHERE ((a.id)::int IS NULL OR (a.id)::int > 0); + +--Testcase 412: +DELETE FROM a_nsc; +--Testcase 413: +DELETE FROM b_nsc; +--Testcase 414: +DROP FOREIGN TABLE a; +--Testcase 627: +DROP FOREIGN TABLE a_nsc; +--Testcase 415: +DROP FOREIGN TABLE b; +--Testcase 628: +DROP FOREIGN TABLE b_nsc; +rollback; + +-- another join removal bug: this is not optimizable, either +begin; + +--Testcase 416: +create foreign table innertab (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 629: +create foreign table innertab_nsc (id int8, dat1 int8) server influxdb_svr OPTIONS (table 'innertab'); +--Testcase 417: +insert into innertab_nsc values(123, 42); +--Testcase 418: +SELECT * FROM + (SELECT 1 AS x) ss1 + LEFT JOIN + (SELECT q1, q2, COALESCE(dat1, q1) AS y + FROM (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl LEFT JOIN (select (fields->>'id')::int id, (fields->>'dat1')::int dat1 from innertab) innertab ON (q2)::int8 = (id)::int) ss2 + ON true; + +-- Clean up +--Testcase 630: +DELETE FROM innertab_nsc; +--Testcase 631: +DROP FOREIGN TABLE innertab; +--Testcase 632: +DROP FOREIGN TABLE innertab_nsc; + +rollback; + +-- another join removal bug: we must clean up correctly when removing a PHV +begin; + +--Testcase 419: +create foreign table uniquetbl (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); + +--Testcase 420: +explain (costs off) +select t1.* from + (select fields->>'f1' f1 from uniquetbl t1) as t1 + left join (select *, '***'::text as d1 from (select fields->>'f1' f1 from uniquetbl uniquetbl) uniquetbl) t2 + on t1.f1 = t2.f1 + left join (select fields->>'f1' f1 from uniquetbl t3) t3 + on t2.d1 = t3.f1; + +--Testcase 421: +explain (costs off) +select t0.* +from + (select fields->>'f1' f1 from text_tbl t0) t0 + left join + (select case (t1.fields->>'ten')::int4 when 0 then 'doh!'::text else null::text end as case1, + t1.fields->>'stringu2' stringu2 + from tenk1 t1 + join int4_tbl i4 ON (i4.fields->>'f1')::int4 = (t1.fields->>'unique2')::int4 + left join uniquetbl u1 ON u1.fields->>'f1' = (t1.fields->>'string4')::name) ss + on t0.f1 = ss.case1 +where ss.stringu2 !~* ss.case1; + +--Testcase 422: +select t0.* +from + (select fields->>'f1' f1 from text_tbl t0) t0 + left join + (select case (t1.fields->>'ten')::int4 when 0 then 'doh!'::text else null::text end as case1, + t1.fields->>'stringu2' stringu2 + from tenk1 t1 + join int4_tbl i4 ON (i4.fields->>'f1')::int4 = (t1.fields->>'unique2')::int4 + left join uniquetbl u1 ON u1.fields->>'f1' = (t1.fields->>'string4')::name) ss + on t0.f1 = ss.case1 +where ss.stringu2 !~* ss.case1; + +rollback; + +-- test case to expose miscomputation of required relid set for a PHV +--Testcase 423: +explain (verbose, costs off) +select i8.*, ss.v, (t.fields->>'unique2')::int4 unique2 + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join int4_tbl i4 on (i4.fields->>'f1')::int4 = 1 + left join lateral (select (i4.fields->>'f1')::int4 + 1 as v) as ss on true + left join tenk1 t on (t.fields->>'unique2')::int4 = (ss.v)::int4 +where q2::int8 = 456; + +--Testcase 424: +select i8.*, ss.v, (t.fields->>'unique2')::int4 unique2 + from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 + left join int4_tbl i4 on (i4.fields->>'f1')::int4 = 1 + left join lateral (select (i4.fields->>'f1')::int4 + 1 as v) as ss on true + left join tenk1 t on (t.fields->>'unique2')::int4 = (ss.v)::int4 +where q2::int8 = 456; + +-- InfluxDB does not support partition table, create local table for test +-- and check a related issue where we miscompute required relids for +-- a PHV that's been translated to a child rel +--Testcase 570: +create temp table parttbl (a integer primary key) partition by range (a); +--Testcase 571: +create temp table parttbl1 partition of parttbl for values from (1) to (100); +--Testcase 572: +insert into parttbl values (11), (12); +--Testcase 573: +explain (costs off) +select * from + (select *, 12 as phv from parttbl) as ss + right join (select (fields->>'f1')::int4 f1 from int4_tbl) int4_tbl on true +where ss.a = ss.phv and f1 = 0; + +--Testcase 574: +select * from + (select *, 12 as phv from parttbl) as ss + right join (select (fields->>'f1')::int4 f1 from int4_tbl) int4_tbl on true +where ss.a = ss.phv and f1 = 0; + +-- bug #8444: we've historically allowed duplicate aliases within aliased JOINs + +--Testcase 425: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = f1; -- error +--Testcase 426: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y) j on q1 = y.f1; -- error +--Testcase 427: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join (select (fields->>'f1')::int4 f1 from INT4_TBL) y(ff)) j on q1 = f1; -- ok + +-- +-- Test hints given on incorrect column references are useful +-- + +--Testcase 428: +select (t1.ffields->>'unique1')::int4 unique1 from + tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, prefer "t1" suggestion +--Testcase 429: +select (t2.ffields->>'unique1')::int4 unique1 from + tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, prefer "t2" suggestion +--Testcase 430: +select (ffields->>'unique1')::int4 unique1 from + tenk1 t1 join tenk2 t2 on (t1.fields->>'two')::int4 = (t2.fields->>'two')::int4; -- error, suggest both at once + +-- +-- Take care to reference the correct RTE +-- + +--Testcase 431: +select atts.relid::regclass, s.* from pg_stats s join + pg_attribute a on s.attname = a.attname and s.tablename = + a.attrelid::regclass::text join (select unnest(indkey) attnum, + indexrelid from pg_index i) atts on atts.attnum = a.attnum where + schemaname != 'pg_catalog'; + +-- +-- Test LATERAL +-- + +--Testcase 432: +select unique2, x.* +from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1 a) a, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b where f1 = a.unique1) x; +--Testcase 433: +explain (costs off) + select unique2, x.* + from (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, fields->>'two' two, fields->>'four' four, fields->>'ten' ten, fields->>'twenty' twenty, fields->>'hundred' hundred, fields->>'thousand' thousand, fields->>'twothousand' twothousand, fields->>'fivethous' fivethous, fields->>'tenthous' tenthous, fields->>'odd' odd, fields->>'even' even, fields->>'stringu1' stringu1, fields->>'stringu2' stringu2, fields->>'string4' string4 from tenk1 a) a, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b where f1 = a.unique1) x; +--Testcase 434: +select unique2, x.* +from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x, lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; +--Testcase 435: +explain (costs off) + select unique2, x.* + from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x, lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; +--Testcase 436: +explain (costs off) + select unique2, x.* + from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x cross join lateral (select (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss; +--Testcase 437: +select unique2, x.* +from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x left join lateral (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss on true; +--Testcase 438: +explain (costs off) + select unique2, x.* + from (select (fields->>'f1')::int4 f1 from INT4_TBL x) x left join lateral (select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from tenk1 where f1 = (fields->>'unique1')::int4) ss on true; + +-- check scoping of lateral versus parent references +-- the first of these should return int8_tbl.q2, the second int8_tbl.q1 +--Testcase 439: +select *, (select r from (select q1 as q2) x, (select q2 as r) y) from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl; +--Testcase 440: +select *, (select r from (select q1 as q2) x, lateral (select q2 as r) y) from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) int8_tbl; + +-- lateral with function in FROM +--Testcase 441: +select count(*) from tenk1 a, lateral generate_series(1, (fields->>'two')::int4) g; +--Testcase 442: +explain (costs off) + select count(*) from tenk1 a, lateral generate_series(1, (fields->>'two')::int4) g; +--Testcase 443: +explain (costs off) + select count(*) from tenk1 a cross join lateral generate_series(1,(fields->>'two')::int4) g; +-- don't need the explicit LATERAL keyword for functions +--Testcase 444: +explain (costs off) + select count(*) from tenk1 a, generate_series(1,(fields->>'two')::int4) g; + +-- lateral with UNION ALL subselect +--Testcase 445: +explain (costs off) + select * from generate_series(100,200) g, + lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a where g = (q1)::int8 union all + select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b where g = (q2)::int8) ss; +--Testcase 446: +select * from generate_series(100,200) g, + lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a where g = (q1)::int8 union all + select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b where g = (q2)::int8) ss; + +-- lateral with VALUES +--Testcase 447: +explain (costs off) + select count(*) from tenk1 a, + tenk1 b join lateral (values(a.fields->>'unique1')) ss(x) on b.fields->>'unique2' = ss.x; +--Testcase 448: +select count(*) from tenk1 a, + tenk1 b join lateral (values(a.fields->>'unique1')) ss(x) on b.fields->>'unique2' = ss.x; + +-- lateral with VALUES, no flattening possible +--Testcase 449: +explain (costs off) + select count(*) from tenk1 a, + tenk1 b join lateral (values((a.fields->>'unique1')::int4),(-1)) ss(x) on (b.fields->>'unique2')::int4 = (ss.x)::int; +--Testcase 450: +select count(*) from tenk1 a, + tenk1 b join lateral (values((a.fields->>'unique1')::int4),(-1)) ss(x) on (b.fields->>'unique2')::int4 = (ss.x)::int; + +-- lateral injecting a strange outer join condition +--Testcase 451: +explain (costs off) + select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL x) x left join lateral (select a.q1 from (select (fields->>'f1')::int4 f1 from INT4_TBL y) y) ss(z) + on x.q2 = ss.z + order by (a.q1)::int8, (a.q2)::int8, (x.q1)::int8, (x.q2)::int8, (ss.z)::int8; +--Testcase 452: +select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a, + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL x) x left join lateral (select a.q1 from (select (fields->>'f1')::int4 f1 from INT4_TBL y) y) ss(z) + on x.q2 = ss.z + order by (a.q1)::int8, (a.q2)::int8, (x.q1)::int8, (x.q2)::int8, (ss.z)::int8; + +-- lateral reference to a join alias variable +--Testcase 453: +select * from (select (fields->>'f1')::int4/2 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4, + lateral (select x) ss2(y); +--Testcase 454: +select * from (select (fields->>'f1')::int4 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4, + lateral (values(x)) ss2(y); +--Testcase 455: +select * from ((select (fields->>'f1')::int4/2 as x from int4_tbl) ss1 join (select (fields->>'f1')::int4 f1 from INT4_TBL) i4 on x::int4 = (f1)::int4) j, + lateral (select x) ss2(y); + +-- lateral references requiring pullup +--Testcase 456: +select * from (values(1)) x(lb), + lateral generate_series(lb,4) x4; +--Testcase 457: +select * from (select (fields->>'f1')::int4/1000000000 from int4_tbl) x(lb), + lateral generate_series(lb,4) x4; +--Testcase 458: +select * from (values(1)) x(lb), + lateral (values(lb)) y(lbcopy); +--Testcase 459: +select * from (values(1)) x(lb), + lateral (select lb from int4_tbl) y(lbcopy); +--Testcase 460: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, + lateral (values(x.q1,y.q1,y.q2)) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; +--Testcase 461: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, + lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; +--Testcase 462: +select x.* from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on x.q2 = y.q1, + lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2) ORDER BY xq1, yq1, yq2; +--Testcase 463: +select v.* from + (int8_tbl x left join (select (fields->>'q1')::int8 q1,coalesce((fields->>'q2')::int8,0) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) + left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, + lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 union all select (x.fields->>'q2')::int8,(y.q2)::int8) v(vx,vy); +--Testcase 464: +select v.* from + (int8_tbl x left join (select (fields->>'q1')::int8 q1,(select coalesce((fields->>'q2')::int8,0)) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) + left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, + lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 union all select (x.fields->>'q2')::int8,(y.q2)::int8) v(vx,vy); +--Testcase 465: +select v.* from + (int8_tbl x left join (select (fields->>'q1')::int8 q1,(select coalesce((fields->>'q2')::int8,0)) q2 from int8_tbl) y on (x.fields->>'q2')::int8 = y.q1) + left join int4_tbl z on (z.fields->>'f1')::int8 = (x.fields->>'q2')::int8, + lateral (select (x.fields->>'q1')::int8,(y.q1)::int8 from onerow union all select (x.fields->>'q2')::int8,(y.q2)::int8 from onerow) v(vx,vy); + +--Testcase 466: +explain (verbose, costs off) +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join + lateral (select *, a.q2 as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; +--Testcase 467: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join + lateral (select *, a.q2 as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; +--Testcase 468: +explain (verbose, costs off) +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join + lateral (select *, coalesce((a.q2)::int8, 42) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; +--Testcase 469: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join + lateral (select *, coalesce((a.q2)::int8, 42) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b) ss on a.q2 = ss.q1; + +-- lateral can result in join conditions appearing below their +-- real semantic level +--Testcase 470: +explain (verbose, costs off) +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join + lateral (select * from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; +--Testcase 471: +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join + lateral (select * from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; +--Testcase 472: +explain (verbose, costs off) +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join + lateral (select coalesce(i) from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; +--Testcase 473: +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i left join + lateral (select coalesce(i) from (select (fields->>'f1')::int2 f1 from INT2_TBL j) j where i.f1 = j.f1) k on true; +--Testcase 474: +explain (verbose, costs off) +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a, + lateral ( + select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c on (b.f1 = q1 and a.f1 = q2) + ) ss; +--Testcase 475: +select * from (select (fields->>'f1')::int4 f1 from INT4_TBL a) a, + lateral ( + select * from (select (fields->>'f1')::int4 f1 from INT4_TBL b) b left join (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c on (b.f1 = q1 and a.f1 = q2) + ) ss; + +-- lateral reference in a PlaceHolderVar evaluated at join level +--Testcase 476: +explain (verbose, costs off) +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) a left join lateral + (select (b.fields->>'q1')::int8 as bq1, (c.fields->>'q1')::int8 as cq1, least(a.q1,(b.fields->>'q1')::int8,(c.fields->>'q1')::int8) from + int8_tbl b cross join int8_tbl c) ss + on a.q2 = ss.bq1; +--Testcase 477: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) a left join lateral + (select (b.fields->>'q1')::int8 as bq1, (c.fields->>'q1')::int8 as cq1, least(a.q1,(b.fields->>'q1')::int8,(c.fields->>'q1')::int8) from + int8_tbl b cross join int8_tbl c) ss + on a.q2 = ss.bq1; + +-- case requiring nested PlaceHolderVars +--Testcase 478: +explain (verbose, costs off) +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c left join ( + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join (select (fields->>'q1')::int8 q1, coalesce((fields->>'q2')::int8,42) as x from int8_tbl b) ss1 + on a.q2 = ss1.q1 + cross join + lateral (select (fields->>'q1')::int8 q1, coalesce(ss1.x,(fields->>'q2')::int8) as y from int8_tbl d) ss2 + ) on c.q2 = ss2.q1, + lateral (select ss2.y offset 0) ss3; + +-- case that breaks the old ph_may_need optimization +--Testcase 479: +explain (verbose, costs off) +select c.*,a.*,ss1.q1,ss2.q1,ss3.* from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL c) c left join ( + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL a) a left join + (select q1, coalesce(q2,f1) as x from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL b) b, (select (fields->>'f1')::int4 f1 from INT4_TBL b2) b2 + where (q1)::int8 < (f1)::int4) ss1 + on a.q2 = ss1.q1 + cross join + lateral (select (fields->>'q1')::int8 q1, coalesce(ss1.x,(fields->>'q2')::int8) as y from int8_tbl d) ss2 + ) on c.q2 = ss2.q1, + lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL i) i where (ss2.y)::int8 > (f1)::int4) ss3; + +-- check processing of postponed quals (bug #9041) +--Testcase 480: +explain (verbose, costs off) +select * from + (select 1 as x offset 0) x cross join (select 2 as y offset 0) y + left join lateral ( + select * from (select 3 as z offset 0) z where z.z = x.x + ) zz on zz.z = y.y; + +-- check dummy rels with lateral references (bug #15694) +--Testcase 481: +explain (verbose, costs off) +select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join lateral + (select *, i8.q2 from (select (fields->>'f1')::int4 f1 from INT4_TBL int4_tbl) int4_tbl where false) ss on true; +--Testcase 482: +explain (verbose, costs off) +select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL i8) i8 left join lateral + (select *, i8.q2 from (select (fields->>'f1')::int4 f1 from INT4_TBL i1) i1, (select (fields->>'f1')::int4 f1 from INT4_TBL i2) i2 where false) ss on true; + +-- check handling of nested appendrels inside LATERAL +--Testcase 483: +select * from + ((select 2 as v) union all (select 3 as v)) as q1 + cross join lateral + ((select * from + ((select 4 as v) union all (select 5 as v)) as q3) + union all + (select q1.v) + ) as q2; + +-- check the number of columns specified +--Testcase 665: +SELECT * FROM ((SELECT fields->>'q1', fields->>'q2' FROM int8_tbl) i cross join (SELECT fields->>'f1' FROM int4_tbl) j) ss(a,b,c,d); + +-- check we don't try to do a unique-ified semijoin with LATERAL +--Testcase 484: +explain (verbose, costs off) +select * from + (values (0,9998), (1,1000)) v(id,x), + lateral (select (fields->>'f1')::int4 f1 from INT4_TBL + where (fields->>'f1')::int4 = any (select (fields->>'unique1')::int4 from tenk1 + where (fields->>'unique2')::int4 = v.x offset 0)) ss; +--Testcase 485: +select * from + (values (0,9998), (1,1000)) v(id,x), + lateral (select (fields->>'f1')::int4 f1 from INT4_TBL + where (fields->>'f1')::int4 = any (select (fields->>'unique1')::int4 from tenk1 + where (fields->>'unique2')::int4 = v.x offset 0)) ss; + +-- check proper extParam/allParam handling (this isn't exactly a LATERAL issue, +-- but we can make the test case much more compact with LATERAL) +--Testcase 486: +explain (verbose, costs off) +select * from (values (0), (1)) v(id), +lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1, + lateral (select * from + (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 + where q1 = any (select (fields->>'q2')::int8 from int8_tbl t3 + where (fields->>'q2')::int8 = (select greatest(t1.q1,t2.q2)) + and (select v.id=0)) offset 0) ss2) ss + where (t1.q1)::int8 = (ss.q2)::int8) ss0; + +--Testcase 487: +select * from (values (0), (1)) v(id), +lateral (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t1, + lateral (select * from + (select * from (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) t2 + where q1 = any (select (fields->>'q2')::int8 from int8_tbl t3 + where (fields->>'q2')::int8 = (select greatest(t1.q1,t2.q2)) + and (select v.id=0)) offset 0) ss2) ss + where t1.q1 = ss.q2) ss0; + +-- test some error cases where LATERAL should have been used but wasn't +--Testcase 488: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a, (select fields->>'f1' as g) ss; +--Testcase 489: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a, (select a.fields->>'f1' as g) ss; +--Testcase 490: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a cross join (select fields->>'f1' as g) ss; +--Testcase 491: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a cross join (select a.fields->>'f1' as g) ss; +-- SQL:2008 says the left table is in scope but illegal to access here +--Testcase 492: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a right join lateral generate_series(0, (a.fields->>'f1')::int4) g on true; +--Testcase 493: +select (fields->>'f1')::int4 f1,(fields->>'g')::int4 g from int4_tbl a full join lateral generate_series(0, (a.fields->>'f1')::int4) g on true; +-- check we complain about ambiguous table references +--Testcase 494: +select * from + (select (fields->>'q1')::int8 q1, (fields->>'q2')::int8 q2 from INT8_TBL) x cross join ((select (fields->>'f1')::int4 f1 from INT4_TBL) x cross join lateral (select x.f1) ss); +-- LATERAL can be used to put an aggregate into the FROM clause of its query +--Testcase 495: +select 1 from tenk1 a, lateral (select max((a.fields->>'unique1')::int4) from int4_tbl b) ss; + +-- check behavior of LATERAL in UPDATE/DELETE + +--Testcase 496: +create temp table xx1 as select fields->>'f1' as x1, -(fields->>'f1')::int4 as x2 from int4_tbl; + +-- error, can't do this: +--Testcase 497: +update xx1 set x2 = f1 from (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; +--Testcase 498: +update xx1 set x2 = f1 from (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss; +-- can't do it even with LATERAL: +--Testcase 499: +update xx1 set x2 = f1 from lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; +-- we might in future allow something like this, but for now it's an error: +--Testcase 500: +update xx1 set x2 = f1 from xx1, lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; + +-- also errors: +--Testcase 501: +delete from xx1 using (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; +--Testcase 502: +delete from xx1 using (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = xx1.x1) ss; +--Testcase 503: +delete from xx1 using lateral (select * from (select (fields->>'f1')::int4 f1 from INT4_TBL) int4_tbl where f1 = x1) ss; + +/* +-- Influx does not support partition table +-- +-- test LATERAL reference propagation down a multi-level inheritance hierarchy +-- produced for a multi-level partitioned table hierarchy. +-- +create table join_pt1 (a int, b int, c varchar) partition by range(a); +create table join_pt1p1 partition of join_pt1 for values from (0) to (100) partition by range(b); +create table join_pt1p2 partition of join_pt1 for values from (100) to (200); +create table join_pt1p1p1 partition of join_pt1p1 for values from (0) to (100); +insert into join_pt1 values (1, 1, 'x'), (101, 101, 'y'); +create table join_ut1 (a int, b int, c varchar); +insert into join_ut1 values (101, 101, 'y'), (2, 2, 'z'); +explain (verbose, costs off) +select t1.b, ss.phv from join_ut1 t1 left join lateral + (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv + from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss + on t1.a = ss.t2a order by t1.a; +select t1.b, ss.phv from join_ut1 t1 left join lateral + (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv + from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss + on t1.a = ss.t2a order by t1.a; + +drop table join_pt1; +drop table join_ut1; + +-- +-- test estimation behavior with multi-column foreign key and constant qual +-- + +begin; + +create table fkest (x integer, x10 integer, x10b integer, x100 integer); +insert into fkest select x, x/10, x/10, x/100 from generate_series(1,1000) x; +create unique index on fkest(x, x10, x100); +analyze fkest; + +explain (costs off) +select * from fkest f1 + join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) + join fkest f3 on f1.x = f3.x + where f1.x100 = 2; + +alter table fkest add constraint fk + foreign key (x, x10b, x100) references fkest (x, x10, x100); + +explain (costs off) +select * from fkest f1 + join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) + join fkest f3 on f1.x = f3.x + where f1.x100 = 2; + +rollback; +*/ + +-- +-- test that foreign key join estimation performs sanely for outer joins +-- + +begin; + +--Testcase 504: +create foreign table fkest (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 633: +create foreign table fkest_nsc (a int, b int, c int) server influxdb_svr OPTIONS (table 'fkest'); +--Testcase 505: +create foreign table fkest1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 634: +create foreign table fkest1_nsc (a int, b int) server influxdb_svr OPTIONS (table 'fkest1'); +--Testcase 506: +insert into fkest_nsc select x/10, x%10, x from generate_series(1,1000) x; +--Testcase 507: +insert into fkest1_nsc select x/10, x%10 from generate_series(1,1000) x; +--Testcase 508: +explain (costs off) +select * +from (select (fields->>'a')::int a, (fields->>'b')::int b, (fields->>'c')::int c from fkest f) f + left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f1) f1 on (f.a)::int = (f1.a)::int and (f.b)::int = (f1.b)::int + left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f2) f2 on (f.a)::int = (f2.a)::int and (f.b)::int = (f2.b)::int + left join (select (fields->>'a')::int a, (fields->>'b')::int b from fkest1 f3) f3 on (f.a)::int = (f3.a)::int and (f.b)::int = (f3.b)::int +where (f.c)::bigint = 1; + +rollback; + +-- +-- test planner's ability to mark joins as unique +-- + +--Testcase 509: +create foreign table j1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 635: +create foreign table j1_nsc (id int) server influxdb_svr OPTIONS (table 'j1'); +--Testcase 510: +create foreign table j2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 636: +create foreign table j2_nsc (id int) server influxdb_svr OPTIONS (table 'j2'); +--Testcase 511: +create foreign table j3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 637: +create foreign table j3_nsc (id int) server influxdb_svr OPTIONS (table 'j3'); +--Testcase 512: +insert into j1_nsc values(1),(2),(3); +--Testcase 513: +insert into j2_nsc values(1),(2),(3); +--Testcase 514: +insert into j3_nsc values(1),(1); +-- ensure join is properly marked as unique +--Testcase 515: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; + +-- ensure join is not unique when not an equi-join +--Testcase 516: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int > (j2.id)::int; + +-- ensure non-unique rel is not chosen as inner +--Testcase 517: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 inner join (select (fields->>'id')::int id from j3) j3 on (j1.id)::int = (j3.id)::int; + +-- ensure left join is marked as unique +--Testcase 518: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 left join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; + +-- ensure right join is marked as unique +--Testcase 519: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 right join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; + +-- ensure full join is marked as unique +--Testcase 520: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 full join (select (fields->>'id')::int id from j2) j2 on (j1.id)::int = (j2.id)::int; + +-- a clauseless (cross) join can't be unique +--Testcase 521: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 cross join (select (fields->>'id')::int id from j2) j2; + +-- ensure a natural join is marked as unique +--Testcase 522: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1) j1 natural join (select (fields->>'id')::int id from j2) j2; + +-- ensure a distinct clause allows the inner to become unique +--Testcase 523: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1 j1) j1 +inner join (select distinct (fields->>'id')::int id from j3 j3) j3 on (j1.id)::int = (j3.id)::int; + +-- ensure group by clause allows the inner to become unique +--Testcase 524: +explain (verbose, costs off) +select * from (select (fields->>'id')::int id from j1 j1) j1 +inner join (select (fields->>'id')::int id from j3 j3 group by fields->>'id') j3 on (j1.id)::int = (j3.id)::int; + +--Testcase 525: +delete from j1_nsc; +--Testcase 526: +delete from j2_nsc; +--Testcase 527: +delete from j3_nsc; +--Testcase 528: +drop foreign table j1; +--Testcase 638: +drop foreign table j1_nsc; +--Testcase 529: +drop foreign table j2; +--Testcase 639: +drop foreign table j2_nsc; +--Testcase 530: +drop foreign table j3; +--Testcase 640: +drop foreign table j3_nsc; + +-- test more complex permutations of unique joins + +--Testcase 531: +create foreign table j1 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 641: +create foreign table j1_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j1'); +--Testcase 532: +create foreign table j2 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 642: +create foreign table j2_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j2'); +--Testcase 533: +create foreign table j3 (fields jsonb OPTIONS (fields 'true')) server influxdb_svr OPTIONS(schemaless 'true'); +--Testcase 643: +create foreign table j3_nsc (id1 int, id2 int) server influxdb_svr OPTIONS (table 'j3'); +--Testcase 534: +insert into j1_nsc values(1,1),(1,2); +--Testcase 535: +insert into j2_nsc values(1,1); +--Testcase 536: +insert into j3_nsc values(1,1); +-- ensure there's no unique join when not all columns which are part of the +-- unique index are seen in the join clause +--Testcase 537: +explain (verbose, costs off) +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int; + +-- ensure proper unique detection with multiple join quals +--Testcase 538: +explain (verbose, costs off) +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int and (j1.id2)::int = (j2.id2)::int; + +-- ensure we don't detect the join to be unique when quals are not part of the +-- join condition +--Testcase 539: +explain (verbose, costs off) +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int where (j1.id2)::int = 1; + +-- as above, but for left joins. +--Testcase 540: +explain (verbose, costs off) +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +left join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on (j1.id1)::int = (j2.id1)::int where (j1.id2)::int = 1; + +-- validate logic in merge joins which skips mark and restore. +-- it should only do this if all quals which were used to detect the unique +-- are present as join quals, and not plain quals. +--Testcase 541: +set enable_nestloop to 0; +--Testcase 542: +set enable_hashjoin to 0; +--Testcase 543: +set enable_sort to 0; +-- create indexes that will be preferred over the PKs to perform the join +--create index j1_id1_idx on j1 (id1) where id1 % 1000 = 1; +--create index j2_id1_idx on j2 (id1) where id1 % 1000 = 1; + +-- need an additional row in j2, if we want j2_id1_idx to be preferred +--Testcase 544: +insert into j2_nsc values(1,2); +--analyze j2; + +--Testcase 545: +explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1; + +--Testcase 546: +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1; + +-- Exercise array keys mark/restore B-Tree code +--Testcase 547: +explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int = any (array[1]); + +--Testcase 548: +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int = any (array[1]); + +-- Exercise array keys "find extreme element" B-Tree code +--Testcase 549: +explain (costs off) select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int >= any (array[1,5]); + +--Testcase 550: +select * from (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j1) j1 +inner join (select (fields->>'id1')::int id1, (fields->>'id2')::int id2 from j2) j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 +where (j1.id1)::int % 1000 = 1 and (j2.id1)::int % 1000 = 1 and (j2.id1)::int >= any (array[1,5]); + +--Testcase 551: +reset enable_nestloop; +--Testcase 552: +reset enable_hashjoin; +--Testcase 553: +reset enable_sort; + +--Testcase 554: +delete from j1_nsc; +--Testcase 555: +delete from j2_nsc; +--Testcase 556: +delete from j3_nsc; +--Testcase 557: +drop foreign table j1; +--Testcase 644: +drop foreign table j1_nsc; +--Testcase 558: +drop foreign table j2; +--Testcase 645: +drop foreign table j2_nsc; +--Testcase 559: +drop foreign table j3; +--Testcase 646: +drop foreign table j3_nsc; + +-- check that semijoin inner is not seen as unique for a portion of the outerrel +--Testcase 560: +CREATE FOREIGN TABLE onek ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS(schemaless 'true'); + +-- check that semijoin inner is not seen as unique for a portion of the outerrel +--Testcase 561: +explain (verbose, costs off) +select (t1.fields->>'unique1')::int4 unique1, (t2.fields->>'hundred')::int4 hundred +from onek t1, tenk1 t2 +where exists (select 1 from tenk1 t3 + where (t3.fields->>'thousand')::int4 = (t1.fields->>'unique1')::int4 and (t3.fields->>'tenthous')::int4 = (t2.fields->>'hundred')::int4) + and (t1.fields->>'unique1')::int4 < 1; + +-- ... unless it actually is unique +--Testcase 562: +create table j3 as select (fields->>'unique1')::int4 unique1, (fields->>'tenthous')::int4 tenthous from onek; +vacuum analyze j3; +--Testcase 563: +create unique index on j3(unique1, tenthous); + +--Testcase 564: +explain (verbose, costs off) +select (t1.fields->>'unique1')::int4 unique1, (t2.fields->>'hundred')::int4 hundred +from onek t1, tenk1 t2 +where exists (select 1 from j3 + where j3.unique1 = (t1.fields->>'unique1')::int4 and j3.tenthous = (t2.fields->>'hundred')::int4) + and (t1.fields->>'unique1')::int4 < 1; + +--Testcase 565: +drop table j3; + +-- Clean up +--Testcase 647: +DELETE FROM t1_nsc; +--Testcase 648: +DELETE FROM t2_nsc; +--Testcase 649: +DELETE FROM t3_nsc; +--Testcase 650: +DELETE FROM tt1_nsc; +--Testcase 651: +DELETE FROM tt2_nsc; +--Testcase 652: +DELETE FROM tt3_nsc; +--Testcase 653: +DELETE FROM tt4_nsc; +--Testcase 654: +DELETE FROM tt5_nsc; +--Testcase 655: +DELETE FROM tt6_nsc; +--Testcase 656: +DELETE FROM xx_nsc; +--Testcase 657: +DELETE FROM yy_nsc; +--Testcase 658: +DELETE FROM zt1_nsc; +--Testcase 659: +DELETE FROM zt2_nsc; +--Testcase 660: +DELETE FROM nt1_nsc; +--Testcase 661: +DELETE FROM nt2_nsc; +--Testcase 662: +DELETE FROM nt3_nsc; +--Testcase 663: +DELETE FROM parent_nsc; +--Testcase 664: +DELETE FROM child_nsc; + +DO $d$ +declare + l_rec record; +begin + for l_rec in (select foreign_table_schema, foreign_table_name + from information_schema.foreign_tables) loop + execute format('drop foreign table %I.%I cascade;', l_rec.foreign_table_schema, l_rec.foreign_table_name); + end loop; +end; +$d$; + +--Testcase 566: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 567: +DROP SERVER influxdb_svr CASCADE; +--Testcase 568: +DROP EXTENSION influxdb_fdw; diff --git a/sql/11.13/schemaless/extra/limit.sql b/sql/15.0/schemaless/extra/limit.sql similarity index 97% rename from sql/11.13/schemaless/extra/limit.sql rename to sql/15.0/schemaless/extra/limit.sql index 941a25c..ed60cfa 100644 --- a/sql/11.13/schemaless/extra/limit.sql +++ b/sql/15.0/schemaless/extra/limit.sql @@ -2,163 +2,160 @@ \ir sql/parameters.conf \set ECHO all ---Testcase 51: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 52: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 53: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); - --- import time column as timestamp and text type --- IMPORT FOREIGN SCHEMA influxdb_schema FROM SERVER influxdb_svr INTO public; + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); -- -- LIMIT -- Check the LIMIT/OFFSET feature of SELECT -- ---Testcase 54: +--Testcase 4: CREATE FOREIGN TABLE onek ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 55: +--Testcase 5: CREATE FOREIGN TABLE int8_tbl(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 56: +--Testcase 6: CREATE FOREIGN TABLE tenk1 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); ---Testcase 1: +--Testcase 7: SELECT ''::text AS two, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 > 50 ORDER BY (fields->>'unique1')::int4 LIMIT 2; ---Testcase 2: +--Testcase 8: SELECT ''::text AS five, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 > 60 ORDER BY (fields->>'unique1')::int4 LIMIT 5; ---Testcase 3: +--Testcase 9: SELECT ''::text AS two, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 > 60 AND (fields->>'unique1')::int4 < 63 ORDER BY (fields->>'unique1')::int4 LIMIT 5; ---Testcase 4: +--Testcase 10: SELECT ''::text AS three, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 > 100 ORDER BY (fields->>'unique1')::int4 LIMIT 3 OFFSET 20; ---Testcase 5: +--Testcase 11: SELECT ''::text AS zero, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 < 50 ORDER BY (fields->>'unique1')::int4 DESC LIMIT 8 OFFSET 99; ---Testcase 6: +--Testcase 12: SELECT ''::text AS eleven, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek WHERE (fields->>'unique1')::int4 < 50 ORDER BY (fields->>'unique1')::int4 DESC LIMIT 20 OFFSET 39; ---Testcase 7: +--Testcase 13: SELECT ''::text AS ten, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek ORDER BY (fields->>'unique1')::int4 OFFSET 990; ---Testcase 8: +--Testcase 14: SELECT ''::text AS five, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek ORDER BY (fields->>'unique1')::int4 OFFSET 990 LIMIT 5; ---Testcase 9: +--Testcase 15: SELECT ''::text AS five, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 FROM onek ORDER BY (fields->>'unique1')::int4 LIMIT 5 OFFSET 900; -- Test null limit and offset. The planner would discard a simple null -- constant, so to ensure executor is exercised, do this: ---Testcase 10: +--Testcase 16: select * from int8_tbl limit (case when random() < 0.5 then null::bigint end); ---Testcase 11: +--Testcase 17: select * from int8_tbl offset (case when random() < 0.5 then null::bigint end); -- Test assorted cases involving backwards fetch from a LIMIT plan node begin; declare c1 scroll cursor for select * from int8_tbl limit 10; ---Testcase 12: +--Testcase 18: fetch all in c1; ---Testcase 13: +--Testcase 19: fetch 1 in c1; ---Testcase 14: +--Testcase 20: fetch backward 1 in c1; ---Testcase 15: +--Testcase 21: fetch backward all in c1; ---Testcase 16: +--Testcase 22: fetch backward 1 in c1; ---Testcase 17: +--Testcase 23: fetch all in c1; declare c2 scroll cursor for select * from int8_tbl limit 3; ---Testcase 18: +--Testcase 24: fetch all in c2; ---Testcase 19: +--Testcase 25: fetch 1 in c2; ---Testcase 20: +--Testcase 26: fetch backward 1 in c2; ---Testcase 21: +--Testcase 27: fetch backward all in c2; ---Testcase 22: +--Testcase 28: fetch backward 1 in c2; ---Testcase 23: +--Testcase 29: fetch all in c2; declare c3 scroll cursor for select * from int8_tbl offset 3; ---Testcase 24: +--Testcase 30: fetch all in c3; ---Testcase 25: +--Testcase 31: fetch 1 in c3; ---Testcase 26: +--Testcase 32: fetch backward 1 in c3; ---Testcase 27: +--Testcase 33: fetch backward all in c3; ---Testcase 28: +--Testcase 34: fetch backward 1 in c3; ---Testcase 29: +--Testcase 35: fetch all in c3; declare c4 scroll cursor for select * from int8_tbl offset 10; ---Testcase 30: +--Testcase 36: fetch all in c4; ---Testcase 31: +--Testcase 37: fetch 1 in c4; ---Testcase 32: +--Testcase 38: fetch backward 1 in c4; ---Testcase 33: +--Testcase 39: fetch backward all in c4; ---Testcase 34: +--Testcase 40: fetch backward 1 in c4; ---Testcase 35: +--Testcase 41: fetch all in c4; declare c5 scroll cursor for select * from int8_tbl order by (fields->>'q1')::int8 fetch first 2 rows with ties; ---Testcase 57: +--Testcase 42: fetch all in c5; ---Testcase 58: +--Testcase 43: fetch 1 in c5; ---Testcase 59: +--Testcase 44: fetch backward 1 in c5; ---Testcase 60: +--Testcase 45: fetch backward 1 in c5; ---Testcase 61: +--Testcase 46: fetch all in c5; ---Testcase 62: +--Testcase 47: fetch backward all in c5; ---Testcase 63: +--Testcase 48: fetch all in c5; ---Testcase 64: +--Testcase 49: fetch backward all in c5; rollback; -- Stress test for variable LIMIT in conjunction with bounded-heap sorting ---Testcase 65: +--Testcase 50: CREATE FOREIGN TABLE generate_series4(fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 36: +--Testcase 51: SELECT (SELECT (fields->>'a')::int a FROM (VALUES (1)) AS x, @@ -171,65 +168,65 @@ SELECT -- with ORDER BY and LIMIT. -- ---Testcase 66: +--Testcase 52: create temp sequence testseq; ---Testcase 37: +--Testcase 53: explain (verbose, costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, nextval('testseq') from tenk1 order by (fields->>'unique2')::int4 limit 10; ---Testcase 38: +--Testcase 54: select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, nextval('testseq') from tenk1 order by (fields->>'unique2')::int4 limit 10; ---Testcase 39: +--Testcase 55: select currval('testseq'); ---Testcase 40: +--Testcase 56: explain (verbose, costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, nextval('testseq') from tenk1 order by (fields->>'tenthous')::int4 limit 10; ---Testcase 41: +--Testcase 57: select(fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, nextval('testseq') from tenk1 order by (fields->>'tenthous')::int4 limit 10; ---Testcase 42: +--Testcase 58: select currval('testseq'); ---Testcase 43: +--Testcase 59: explain (verbose, costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, generate_series(1,10) from tenk1 order by (fields->>'unique2')::int4 limit 7; ---Testcase 44: +--Testcase 60: select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, generate_series(1,10) from tenk1 order by (fields->>'unique2')::int4 limit 7; ---Testcase 45: +--Testcase 61: explain (verbose, costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, generate_series(1,10) from tenk1 order by (fields->>'tenthous')::int4 limit 7; ---Testcase 46: +--Testcase 62: select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, generate_series(1,10) from tenk1 order by (fields->>'tenthous')::int4 limit 7; -- use of random() is to keep planner from folding the expressions together ---Testcase 47: +--Testcase 63: explain (verbose, costs off) select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; ---Testcase 48: +--Testcase 64: select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2; ---Testcase 49: +--Testcase 65: explain (verbose, costs off) select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2 order by s2 desc; ---Testcase 50: +--Testcase 66: select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2 order by s2 desc; @@ -268,6 +265,12 @@ SELECT (fields->>'thousand')::int4 thousand FROM onek WHERE (fields->>'thousand')::int4 < 5 ORDER BY (fields->>'thousand')::int4 FETCH FIRST 2 ROW ONLY; +-- SKIP LOCKED and WITH TIES are incompatible +--Testcase 90: +SELECT (fields->>'thousand')::int4 thousand + FROM onek WHERE (fields->>'thousand')::int4 < 5 + ORDER BY (fields->>'thousand')::int4 FETCH FIRST 1 ROW WITH TIES FOR UPDATE SKIP LOCKED; + -- should fail --Testcase 73: SELECT ''::text AS two, (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2, (fields->>'stringu1')::name stringu1 diff --git a/sql/15.0/schemaless/extra/prepare.sql b/sql/15.0/schemaless/extra/prepare.sql new file mode 100644 index 0000000..7d079b1 --- /dev/null +++ b/sql/15.0/schemaless/extra/prepare.sql @@ -0,0 +1,143 @@ +-- Regression tests for prepareable statements. We query the content +-- of the pg_prepared_statements view as prepared statements are +-- created and removed. +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 1: +CREATE EXTENSION influxdb_fdw; + +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +--Testcase 4: +CREATE FOREIGN TABLE tenk1 ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS (table 'tenk', schemaless 'true'); + +-- Does not support this command +-- ALTER TABLE tenk1 SET WITH OIDS; + +--Testcase 5: +CREATE FOREIGN TABLE road ( + fields jsonb OPTIONS (fields 'true') +) SERVER influxdb_svr OPTIONS (schemaless 'true'); + +--Testcase 6: +CREATE FOREIGN TABLE road_tmp (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); + +--Testcase 7: +SELECT name, statement, parameter_types FROM pg_prepared_statements; + +--Testcase 8: +PREPARE q1 AS SELECT (fields->>'a')::int AS a FROM road_tmp; +--Testcase 9: +EXECUTE q1; + +--Testcase 10: +SELECT name, statement, parameter_types FROM pg_prepared_statements; + +-- should fail +--Testcase 11: +PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; + +-- should succeed +DEALLOCATE q1; +--Testcase 12: +PREPARE q1 AS SELECT (fields->>'b')::int b FROM road_tmp; +--Testcase 13: +EXECUTE q1; + +--Testcase 14: +PREPARE q2 AS SELECT (fields->>'b')::int AS b FROM road_tmp; +--Testcase 15: +SELECT name, statement, parameter_types FROM pg_prepared_statements; + +-- sql92 syntax +DEALLOCATE PREPARE q1; + +--Testcase 16: +SELECT name, statement, parameter_types FROM pg_prepared_statements; + +DEALLOCATE PREPARE q2; +-- the view should return the empty set again +--Testcase 17: +SELECT name, statement, parameter_types FROM pg_prepared_statements; + +-- parameterized queries +--Testcase 18: +PREPARE q2(text) AS + SELECT datname, datistemplate, datallowconn + FROM pg_database WHERE datname = $1; + +--Testcase 19: +EXECUTE q2('postgres'); + +--Testcase 20: +PREPARE q3(text, int, float, boolean, smallint) AS + SELECT * FROM tenk1 WHERE fields->>'string4' = $1 AND ((fields->>'four')::int = $2 OR + (fields->>'ten')::int = $3::bigint OR true = $4 OR (fields->>'odd')::int = $5::int) + ORDER BY (fields->>'unique1')::int; + +--Testcase 21: +EXECUTE q3('AAAAxx', 5::smallint, 10.5::float, false, 4::bigint); + +-- too few params +--Testcase 22: +EXECUTE q3('bool'); + +-- too many params +--Testcase 23: +EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 4::bigint, true); + +-- wrong param types +--Testcase 24: +EXECUTE q3(5::smallint, 10.5::float, false, 4::bigint, 'bytea'); + +-- invalid type +--Testcase 25: +PREPARE q4(nonexistenttype) AS SELECT $1; + +-- create table as execute +--Testcase 26: +PREPARE q5(int, text) AS + SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 OR fields->>'stringu1' = $2 + ORDER BY (fields->>'unique1')::int; +--Testcase 27: +CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA'); +--Testcase 28: +SELECT * FROM q5_prep_results; +--Testcase 29: +CREATE TEMPORARY TABLE q5_prep_nodata AS EXECUTE q5(200, 'DTAAAA') + WITH NO DATA; +--Testcase 30: +SELECT * FROM q5_prep_nodata; + +-- unknown or unspecified parameter types: should succeed +--Testcase 31: +PREPARE q6 AS + SELECT * FROM tenk1 WHERE (fields->>'unique1')::int = $1 AND fields->>'stringu1' = $2; +--Testcase 32: +PREPARE q7(unknown) AS + SELECT * FROM road WHERE fields->>'thepath' = $1; + +--Testcase 33: +SELECT name, statement, parameter_types FROM pg_prepared_statements + ORDER BY name; + +-- test DEALLOCATE ALL; +DEALLOCATE ALL; +--Testcase 34: +SELECT name, statement, parameter_types FROM pg_prepared_statements + ORDER BY name; + +--Testcase 35: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 36: +DROP SERVER influxdb_svr CASCADE; +--Testcase 37: +DROP EXTENSION influxdb_fdw; diff --git a/sql/10.18/schemaless/extra/select.sql b/sql/15.0/schemaless/extra/select.sql similarity index 95% rename from sql/10.18/schemaless/extra/select.sql rename to sql/15.0/schemaless/extra/select.sql index 7fed70a..acbfe80 100644 --- a/sql/10.18/schemaless/extra/select.sql +++ b/sql/15.0/schemaless/extra/select.sql @@ -5,49 +5,49 @@ \ir sql/parameters.conf \set ECHO all ---Testcase 52: +--Testcase 1: CREATE EXTENSION influxdb_fdw; ---Testcase 53: +--Testcase 2: CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw - OPTIONS (dbname 'coredb', host :INFLUXDB_HOST, port :INFLUXDB_PORT); ---Testcase 54: -CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (user :INFLUXDB_USER, password :INFLUXDB_PASS); + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); ---Testcase 55: +--Testcase 4: CREATE FOREIGN TABLE onek ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 56: +--Testcase 5: CREATE FOREIGN TABLE onek2 ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (table 'onek', schemaless 'true'); ---Testcase 57: +--Testcase 6: CREATE FOREIGN TABLE INT8_TBL ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 58: +--Testcase 7: CREATE FOREIGN TABLE person ( fields jsonb OPTIONS (fields 'true') ) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 59: +--Testcase 8: CREATE FOREIGN TABLE emp ( fields jsonb OPTIONS (fields 'true') ) INHERITS (person) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 60: +--Testcase 9: CREATE FOREIGN TABLE student ( fields jsonb OPTIONS (fields 'true') ) INHERITS (person) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 61: +--Testcase 10: CREATE FOREIGN TABLE stud_emp ( fields jsonb OPTIONS (fields 'true') ) INHERITS (emp, student) SERVER influxdb_svr OPTIONS (schemaless 'true'); @@ -55,7 +55,7 @@ CREATE FOREIGN TABLE stud_emp ( -- btree index -- awk '{if($1<10){print;}else{next;}}' onek.data | sort +0n -1 -- ---Testcase 1: +--Testcase 11: SELECT * FROM onek WHERE (onek.fields->>'unique1')::int4 < 10 ORDER BY (onek.fields->>'unique1')::int4; @@ -63,7 +63,7 @@ SELECT * FROM onek -- -- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 -- ---Testcase 2: +--Testcase 12: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'stringu1')::name stringu1 FROM onek WHERE (onek.fields->>'unique1')::int4 < 20 ORDER BY (onek.fields->>'unique1')::int4 using >; @@ -71,7 +71,7 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'stringu1')::name -- -- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 -- ---Testcase 3: +--Testcase 13: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'stringu1')::name stringu1 FROM onek WHERE (onek.fields->>'unique1')::int4 > 980 ORDER BY (fields->>'stringu1')::name using <; @@ -80,7 +80,7 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'stringu1')::name -- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | -- sort +1d -2 +0nr -1 -- ---Testcase 4: +--Testcase 14: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name string4 FROM onek WHERE (onek.fields->>'unique1')::int4 > 980 ORDER BY (fields->>'string4')::name using <, (fields->>'unique1')::int4 using >; @@ -89,7 +89,7 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name -- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | -- sort +1dr -2 +0n -1 -- ---Testcase 5: +--Testcase 15: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name string4 FROM onek WHERE (onek.fields->>'unique1')::int4 > 980 ORDER BY (fields->>'string4')::name using >, (fields->>'unique1')::int4 using <; @@ -98,7 +98,7 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name -- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | -- sort +0nr -1 +1d -2 -- ---Testcase 6: +--Testcase 16: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name string4 FROM onek WHERE (onek.fields->>'unique1')::int4 < 20 ORDER BY (fields->>'unique1')::int4 using >, (fields->>'string4')::name using <; @@ -107,7 +107,7 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name -- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | -- sort +0n -1 +1dr -2 -- ---Testcase 7: +--Testcase 17: SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name string4 FROM onek WHERE (onek.fields->>'unique1')::int4 < 20 ORDER BY (fields->>'unique1')::int4 using <, (fields->>'string4')::name using >; @@ -121,20 +121,23 @@ SELECT (onek.fields->>'unique1')::int4 unique1, (onek.fields->>'string4')::name -- -- ANALYZE onek2; +--Testcase 18: SET enable_seqscan TO off; +--Testcase 19: SET enable_bitmapscan TO off; +--Testcase 20: SET enable_sort TO off; -- -- awk '{if($1<10){print $0;}else{next;}}' onek.data | sort +0n -1 -- ---Testcase 8: +--Testcase 21: SELECT onek2.* FROM onek2 WHERE (onek2.fields->>'unique1')::int4 < 10 order by 1; -- -- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 -- ---Testcase 9: +--Testcase 22: SELECT (onek2.fields->>'unique1')::int4 unique1, (onek2.fields->>'stringu1')::name stringu1 FROM onek2 WHERE (onek2.fields->>'unique1')::int4 < 20 ORDER BY (fields->>'unique1')::int4 using >; @@ -142,19 +145,22 @@ SELECT (onek2.fields->>'unique1')::int4 unique1, (onek2.fields->>'stringu1')::na -- -- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 -- ---Testcase 10: +--Testcase 23: SELECT (onek2.fields->>'unique1')::int4 unique1, (onek2.fields->>'stringu1')::name stringu1 FROM onek2 WHERE (onek2.fields->>'unique1')::int4 > 980 order by 1; +--Testcase 24: RESET enable_seqscan; +--Testcase 25: RESET enable_bitmapscan; +--Testcase 26: RESET enable_sort; ---Testcase 11: -SELECT (fields->>'two')::int4 two, (fields->>'stringu1')::name stringu1, (fields->>'ten')::int4 ten, (fields->>'string4')::name string4 - INTO TABLE tmp - FROM onek; +--Testcase 27: +--SELECT (fields->>'two')::int4 two, (fields->>'stringu1')::name stringu1, (fields->>'ten')::int4 ten, (fields->>'string4')::name string4 +-- INTO TABLE tmp +-- FROM onek; -- -- awk '{print $1,$2;}' person.data | @@ -163,7 +169,7 @@ SELECT (fields->>'two')::int4 two, (fields->>'stringu1')::name stringu1, (fields -- awk 'BEGIN{FS=" ";}{if(NF!=2){print $4,$5;}else{print;}}' - stud_emp.data -- -- SELECT name, age FROM person*; ??? check if different ---Testcase 12: +--Testcase 28: SELECT p.fields->>'name' "name", (p.fields->>'age')::int4 age FROM person* p; -- @@ -173,29 +179,29 @@ SELECT p.fields->>'name' "name", (p.fields->>'age')::int4 age FROM person* p; -- awk 'BEGIN{FS=" ";}{if(NF!=1){print $4,$5;}else{print;}}' - stud_emp.data | -- sort +1nr -2 -- ---Testcase 13: +--Testcase 29: SELECT p.fields->>'name' "name", (p.fields->>'age')::int4 age FROM person* p ORDER BY (fields->>'age')::int4 using >, fields->>'name'; -- -- Test some cases involving whole-row Var referencing a subquery -- ---Testcase 14: +--Testcase 30: select foo from (select 1 offset 0) as foo; ---Testcase 15: +--Testcase 31: select foo from (select null offset 0) as foo; ---Testcase 16: +--Testcase 32: select foo from (select 'xyzzy',1,null offset 0) as foo; -- -- Test VALUES lists -- ---Testcase 17: +--Testcase 33: select * from onek, (values(147, 'RFAAAA'), (931, 'VJAAAA')) as v (i, j) WHERE (onek.fields->>'unique1')::int4 = v.i and (onek.fields->>'stringu1')::name = v.j; -- a more complex case -- looks like we're coding lisp :-) ---Testcase 18: +--Testcase 34: select * from onek, (values ((select i from (values(10000), (2), (389), (1000), (2000), ((select 10029))) as foo(i) @@ -203,38 +209,47 @@ select * from onek, where (onek.fields->>'unique1')::int4 = bar.i; -- try VALUES in a subquery ---Testcase 19: +--Testcase 35: select * from onek where ((fields->>'unique1')::int4,(fields->>'ten')::int4) in (values (1,1), (20,0), (99,9), (17,99)) order by (fields->>'unique1')::int4; -- VALUES is also legal as a standalone query or a set-operation member ---Testcase 20: +--Testcase 36: VALUES (1,2), (3,4+4), (7,77.7); ---Testcase 21: +--Testcase 37: VALUES (1,2), (3,4+4), (7,77.7) UNION ALL SELECT 2+2, 57 UNION ALL SELECT (fields->>'q1')::int8, (fields->>'q2')::int8 FROM int8_tbl; +-- -- corner case: VALUES with no columns +-- InfluxDB not support table with no columns. +-- --Testcase 79: +-- CREATE FOREIGN TABLE nocols() SERVER influxdb_svr; +-- --Testcase 80: +-- INSERT INTO nocols DEFAULT VALUES; +-- --Testcase 81: +-- SELECT * FROM nocols n, LATERAL (VALUES(n.*)) v; + -- -- Test ORDER BY options -- ---Testcase 62: +--Testcase 38: CREATE FOREIGN TABLE foo (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); ---Testcase 22: +--Testcase 39: SELECT * FROM foo ORDER BY (fields->>'f1')::int; ---Testcase 23: +--Testcase 40: SELECT * FROM foo ORDER BY (fields->>'f1')::int ASC; -- same thing ---Testcase 24: +--Testcase 41: SELECT * FROM foo ORDER BY (fields->>'f1')::int NULLS FIRST; ---Testcase 25: +--Testcase 42: SELECT * FROM foo ORDER BY (fields->>'f1')::int DESC; ---Testcase 26: +--Testcase 43: SELECT * FROM foo ORDER BY (fields->>'f1')::int DESC NULLS LAST; -- check if indexscans do the right things @@ -267,64 +282,66 @@ SELECT * FROM foo ORDER BY (fields->>'f1')::int DESC NULLS LAST; -- -- partial index is usable ---Testcase 27: +--Testcase 44: explain (costs off) select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name = 'ATAAAA'; ---Testcase 28: +--Testcase 45: select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name = 'ATAAAA'; -- actually run the query with an analyze to use the partial index ---Testcase 63: +--Testcase 46: explain (costs off, analyze on, timing off, summary off) select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name = 'ATAAAA'; ---Testcase 30: +--Testcase 47: explain (costs off) select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name = 'ATAAAA'; ---Testcase 31: +--Testcase 48: select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name = 'ATAAAA'; -- partial index predicate implies clause, so no need for retest ---Testcase 32: +--Testcase 49: explain (costs off) select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; ---Testcase 33: +--Testcase 50: select * from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; ---Testcase 34: +--Testcase 51: explain (costs off) select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; ---Testcase 35: +--Testcase 52: select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; -- but if it's an update target, must retest anyway ---Testcase 36: +--Testcase 53: explain (costs off) select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B' for update; ---Testcase 37: +--Testcase 54: select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B' for update; -- partial index is not applicable ---Testcase 38: +--Testcase 55: explain (costs off) select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'C'; ---Testcase 39: +--Testcase 56: select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'C'; -- partial index implies clause, but bitmap scan must recheck predicate anyway +--Testcase 57: SET enable_indexscan TO off; ---Testcase 40: +--Testcase 58: explain (costs off) select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; ---Testcase 41: +--Testcase 59: select (fields->>'unique2')::int4 unique2 from onek2 where (fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B'; +--Testcase 60: RESET enable_indexscan; -- check multi-index cases too ---Testcase 42: +--Testcase 61: explain (costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from onek2 where ((fields->>'unique2')::int4 = 11 or (fields->>'unique1')::int4 = 0) and (fields->>'stringu1')::name < 'B'; ---Testcase 43: +--Testcase 62: select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from onek2 where ((fields->>'unique2')::int4 = 11 or (fields->>'unique1')::int4 = 0) and (fields->>'stringu1')::name < 'B'; ---Testcase 44: +--Testcase 63: explain (costs off) select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from onek2 where ((fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B') or (fields->>'unique1')::int4 = 0; ---Testcase 45: +--Testcase 64: select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 from onek2 where ((fields->>'unique2')::int4 = 11 and (fields->>'stringu1')::name < 'B') or (fields->>'unique1')::int4 = 0; @@ -333,47 +350,47 @@ select (fields->>'unique1')::int4 unique1, (fields->>'unique2')::int4 unique2 fr -- -- ORDER BY on a constant doesn't really need any sorting ---Testcase 46: +--Testcase 65: SELECT 1 AS x ORDER BY x; -- But ORDER BY on a set-valued expression does ---Testcase 64: +--Testcase 66: create function sillysrf(int) returns setof int as 'values (1),(10),(2),($1)' language sql immutable; ---Testcase 47: +--Testcase 67: select sillysrf(42); ---Testcase 48: +--Testcase 68: select sillysrf(-1) order by 1; ---Testcase 65: +--Testcase 69: drop function sillysrf(int); -- X = X isn't a no-op, it's effectively X IS NOT NULL assuming = is strict -- (see bug #5084) ---Testcase 49: +--Testcase 70: select * from (values (2),(null),(1)) v(k) where k = k order by k; ---Testcase 50: +--Testcase 71: select * from (values (2),(null),(1)) v(k) where k = k; -- Test partitioned tables with no partitions, which should be handled the -- same as the non-inheritance case when expanding its RTE. ---Testcase 66: +--Testcase 72: create table list_parted_tbl (a int,b int) partition by list (a); ---Testcase 67: +--Testcase 73: create table list_parted_tbl1 partition of list_parted_tbl for values in (1) partition by list(b); ---Testcase 51: +--Testcase 74: explain (costs off) select * from list_parted_tbl; ---Testcase 68: +--Testcase 75: drop table list_parted_tbl; -- Clean up: -DROP TABLE IF EXISTS tmp; +--DROP TABLE IF EXISTS tmp; ---Testcase 69: +--Testcase 76: DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; ---Testcase 70: +--Testcase 77: DROP SERVER influxdb_svr CASCADE; ---Testcase 71: +--Testcase 78: DROP EXTENSION influxdb_fdw; diff --git a/sql/15.0/schemaless/extra/select_having.sql b/sql/15.0/schemaless/extra/select_having.sql new file mode 100644 index 0000000..43e66b7 --- /dev/null +++ b/sql/15.0/schemaless/extra/select_having.sql @@ -0,0 +1,97 @@ +-- +-- SELECT_HAVING +-- +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 1: +CREATE EXTENSION influxdb_fdw; + +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'coredb', :SERVER); +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +--Testcase 4: +CREATE FOREIGN TABLE test_having (fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS (schemaless 'true'); +--Testcase 30: +CREATE FOREIGN TABLE test_having_nsc (a int, b int, c char(8), d char) SERVER influxdb_svr OPTIONS (table 'test_having'); +--Testcase 5: +INSERT INTO test_having_nsc VALUES (0, 1, 'XXXX', 'A'); +--Testcase 6: +INSERT INTO test_having_nsc VALUES (1, 2, 'AAAA', 'b'); +--Testcase 7: +INSERT INTO test_having_nsc VALUES (2, 2, 'AAAA', 'c'); +--Testcase 8: +INSERT INTO test_having_nsc VALUES (3, 3, 'BBBB', 'D'); +--Testcase 9: +INSERT INTO test_having_nsc VALUES (4, 3, 'BBBB', 'e'); +--Testcase 10: +INSERT INTO test_having_nsc VALUES (5, 3, 'bbbb', 'F'); +--Testcase 11: +INSERT INTO test_having_nsc VALUES (6, 4, 'cccc', 'g'); +--Testcase 12: +INSERT INTO test_having_nsc VALUES (7, 4, 'cccc', 'h'); +--Testcase 13: +INSERT INTO test_having_nsc VALUES (8, 4, 'CCCC', 'I'); +--Testcase 14: +INSERT INTO test_having_nsc VALUES (9, 4, 'CCCC', 'j'); +--Testcase 15: +SELECT (fields->>'b')::int b, fields->>'c' c FROM test_having + GROUP BY fields->>'b', fields->>'c' HAVING count(*) = 1 ORDER BY (fields->>'b')::int, fields->>'c'; + +-- HAVING is effectively equivalent to WHERE in this case +--Testcase 16: +SELECT (fields->>'b')::int b, fields->>'c' c FROM test_having + GROUP BY fields->>'b', fields->>'c' HAVING (fields->>'b')::int = 3 ORDER BY (fields->>'b')::int, fields->>'c'; + +--Testcase 17: +SELECT lower((fields->>'c')::char(8)), count(fields->>'c') FROM test_having + GROUP BY lower((fields->>'c')::char(8)) HAVING count(*) > 2 OR min((fields->>'a')::int) = max((fields->>'a')::int) + ORDER BY lower((fields->>'c')::char(8)); + +--Testcase 18: +SELECT fields->>'c' c, max((fields->>'a')::int) FROM test_having + GROUP BY fields->>'c' HAVING count(*) > 2 OR min((fields->>'a')::int) = max((fields->>'a')::int) + ORDER BY fields->>'c'; + +-- test degenerate cases involving HAVING without GROUP BY +-- Per SQL spec, these should generate 0 or 1 row, even without aggregates + +--Testcase 19: +SELECT min((fields->>'a')::int), max((fields->>'a')::int) FROM test_having HAVING min((fields->>'a')::int) = max((fields->>'a')::int); +--Testcase 20: +SELECT min((fields->>'a')::int), max((fields->>'a')::int) FROM test_having HAVING min((fields->>'a')::int) < max((fields->>'a')::int); + +-- errors: ungrouped column references +--Testcase 21: +SELECT (fields->>'a')::int a FROM test_having HAVING min((fields->>'a')::int) < max((fields->>'a')::int); +--Testcase 22: +SELECT 1 AS one FROM test_having HAVING (fields->>'a')::int > 1; + +-- the really degenerate case: need not scan table at all +--Testcase 23: +SELECT 1 AS one FROM test_having HAVING 1 > 2; +--Testcase 24: +SELECT 1 AS one FROM test_having HAVING 1 < 2; + +-- and just to prove that we aren't scanning the table: +--Testcase 25: +SELECT 1 AS one FROM test_having WHERE 1/(fields->>'a')::int = 1 HAVING 1 < 2; + +--Testcase 26: +-- Clean up: +--Testcase 31: +DELETE FROM test_having_nsc; +--Testcase 32: +DROP FOREIGN TABLE test_having; +--Testcase 33: +DROP FOREIGN TABLE test_having_nsc; +--Testcase 27: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 28: +DROP SERVER influxdb_svr CASCADE; +--Testcase 29: +DROP EXTENSION influxdb_fdw; diff --git a/sql/15.0/schemaless/influxdb_fdw.sql b/sql/15.0/schemaless/influxdb_fdw.sql new file mode 100644 index 0000000..032e45e --- /dev/null +++ b/sql/15.0/schemaless/influxdb_fdw.sql @@ -0,0 +1,601 @@ +--SET log_min_messages=debug1; +--SET client_min_messages=debug1; +--Testcase 1: +SET datestyle=ISO; +-- timestamp with time zone differs based on this +--Testcase 2: +SET timezone='Japan'; + +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); +-- import time column as timestamp and text type +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); +--Testcase 6: +SELECT * FROM cpu; +--Testcase 7: +SELECT tags->>'tag1' tag1, (fields->>'value1')::bigint value1 FROM cpu; +--Testcase 8: +SELECT (fields->>'value1')::bigint value1, time, (fields->>'value2')::double precision value2 FROM cpu; +--Testcase 9: +SELECT (fields->>'value1')::bigint value1, time_text, (fields->>'value2')::double precision value2 FROM cpu; + +--Testcase 10: +DROP FOREIGN TABLE cpu; +--Testcase 11: +DROP FOREIGN TABLE t3; +--Testcase 12: +DROP FOREIGN TABLE t4; +--Testcase 13: +DROP FOREIGN TABLE tx; +--Testcase 14: +DROP FOREIGN TABLE numbers; + +-- test EXECPT +IMPORT FOREIGN SCHEMA public EXCEPT (cpu, t3, t4, tx, numbers) FROM SERVER server1 INTO public OPTIONS(schemaless 'true'); +--Testcase 15: +SELECT ftoptions FROM pg_foreign_table; + +-- test LIMIT TO +IMPORT FOREIGN SCHEMA public LIMIT TO (cpu) FROM SERVER server1 INTO public OPTIONS(schemaless 'true'); +--Testcase 16: +SELECT ftoptions FROM pg_foreign_table; +--Testcase 17: +DROP FOREIGN TABLE cpu; + +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false', schemaless 'true'); + +--Testcase 18: +SELECT * FROM cpu; +--Testcase 19: +SELECT tags->>'tag1' tag1, (fields->>'value1')::int value1 FROM cpu; +--Testcase 20: +SELECT (fields->>'value1')::int value1, time, (fields->>'value2')::double precision value2 FROM cpu; +--Testcase 21: +SELECT tags->>'tag1' tag1 FROM cpu; +--Testcase 22: +SELECT * FROM numbers; + +--Testcase 23: +\d cpu; + +--Testcase 24: +SELECT * FROM cpu WHERE (fields->>'value1')::int=100; +--Testcase 25: +SELECT * FROM cpu WHERE (fields->>'value2')::double precision=0.5; +--Testcase 26: +SELECT * FROM cpu WHERE fields->>'value3'='str'; +--Testcase 27: +SELECT * FROM cpu WHERE (fields->>'value4')::boolean=true; +--Testcase 28: +SELECT * FROM cpu WHERE NOT ((fields->>'value4')::boolean AND (fields->>'value1')::int=100); +--Testcase 29: +SELECT * FROM cpu WHERE tags->>'tag1'='tag1_A'; + +--Testcase 30: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE fields->>'value3' IS NULL; +--Testcase 31: +SELECT * FROM cpu WHERE fields->>'value3' IS NULL; +--Testcase 32: +SELECT * FROM cpu WHERE tags->>'tag2' IS NULL; +--Testcase 33: +SELECT * FROM cpu WHERE fields->>'value3' IS NOT NULL; +--Testcase 34: +SELECT * FROM cpu WHERE tags->>'tag2' IS NOT NULL; + +-- InfluxDB not support compare timestamp with OR condition +--Testcase 35: +SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR (fields->>'value2')::double precision = 0.5; + +-- InfluxDB not support compare timestamp with != or <> +--Testcase 36: +SELECT * FROM cpu WHERE time != '2015-08-18 09:48:08+09'; +--Testcase 37: +SELECT * FROM cpu WHERE time <> '2015-08-18 09:48:08+09'; + +--Testcase 38: +SELECT * FROM cpu WHERE time = '2015-08-18 09:48:08+09' OR (fields->>'value2')::double precision = 0.5; + +-- There is inconsitency for search of missing values between tag and field +--Testcase 39: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE fields->>'value3' = ''; +--Testcase 40: +SELECT * FROM cpu WHERE fields->>'value3' = ''; + +--Testcase 41: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM cpu WHERE tags->>'tag2' = ''; +--Testcase 42: +SELECT * FROM cpu WHERE tags->>'tag2' = ''; + +--Testcase 43: +SELECT * FROM cpu WHERE tags->>'tag1' IN ('tag1_A', 'tag1_B'); +--Testcase 44: +EXPLAIN VERBOSE +SELECT * FROM cpu WHERE tags->>'tag1' IN ('tag1_A', 'tag1_B'); + +-- Rows which have no tag are considered to have empty string +--Testcase 45: +SELECT * FROM cpu WHERE tags->>'tag1' NOT IN ('tag1_A', 'tag1_B'); +--Testcase 46: +EXPLAIN VERBOSE +SELECT * FROM cpu WHERE tags->>'tag1' NOT IN ('tag1_A', 'tag1_B'); + +-- test IN/NOT IN +--Testcase 47: +SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); +--Testcase 48: +SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); +--Testcase 49: +SELECT * FROM cpu WHERE (fields->>'value1')::int NOT IN (100, 97); +--Testcase 50: +SELECT * FROM cpu WHERE (fields->>'value1')::int IN (100, 97); +--Testcase 51: +SELECT * FROM cpu WHERE (fields->>'value2')::double precision IN (0.5, 10.9); +--Testcase 52: +SELECT * FROM cpu WHERE (fields->>'value2')::double precision NOT IN (2, 9.7); +--Testcase 53: +SELECT * FROM cpu WHERE (fields->>'value4')::boolean NOT IN ('true', 'true'); +--Testcase 54: +SELECT * FROM cpu WHERE time IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); +--Testcase 55: +SELECT * FROM cpu WHERE time NOT IN ('2015-08-18 09:48:08+09','2016-08-28 07:44:00+07'); +--Testcase 56: +SELECT * FROM cpu WHERE (fields->>'value1')::int NOT IN (100, 97); +--Testcase 57: +SELECT * FROM cpu WHERE (fields->>'value1')::int IN (100, 97); +--Testcase 58: +SELECT * FROM cpu WHERE (fields->>'value2')::double precision IN (0.5, 10.9); +--Testcase 59: +SELECT * FROM cpu WHERE (fields->>'value2')::double precision NOT IN (2, 9.7); +--Testcase 60: +SELECT * FROM cpu WHERE (fields->>'value4')::boolean NOT IN ('true', 'true'); +--Testcase 61: +SELECT * FROM cpu WHERE (fields->>'value4')::boolean IN ('f', 't'); + +--Testcase 62: +CREATE FOREIGN TABLE t1(time timestamp with time zone ,tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true', tags 'tag1'); +--Testcase 63: +CREATE FOREIGN TABLE t2(time timestamp ,tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true', tags 'tag1'); + +--Testcase 64: +SELECT * FROM t1; +--Testcase 65: +SELECT * FROM t2; +-- In following four queries, timestamp condition is added to InfluxQL as "time = '2015-08-18 00:00:00'" +--Testcase 66: +SELECT * FROM t1 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; +--Testcase 67: +SELECT * FROM t1 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; + +--Testcase 68: +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-18 09:00:00+09'; +--Testcase 69: +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-08-18 00:00:00'; + +-- pushdown now() +--Testcase 70: +SELECT * FROM t2 WHERE now() > time; +--Testcase 71: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE now() > time; + +--Testcase 72: +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; +--Testcase 73: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE time = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00' - interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond'; + +-- InfluxDB does not seem to support time column + interval, so below query returns empty result +-- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; +-- EXPLAIN (VERBOSE, COSTS OFF) +-- SELECT * FROM t2 WHERE time + interval '1 week 1 day 5 hour 43 minute 21 second 100 millisecond' = TIMESTAMP WITH TIME ZONE '2015-08-26 05:43:21.1+00'; + +-- InfluxDB does not support month or year interval, so not push down +--Testcase 74: +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; +--Testcase 75: +EXPLAIN VERBOSE +SELECT * FROM t2 WHERE time = TIMESTAMP '2015-09-18 00:00:00' - interval '1 months'; + +--Testcase 76: +SELECT * FROM t2 WHERE (fields->>'value1')::int = ANY (ARRAY(SELECT (fields->>'value1')::int FROM t1 WHERE (fields->>'value1')::int < 1000)); + +-- ANY with ARRAY expression +--Testcase 77: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, (fields->>'a')::int + 1]); +--Testcase 78: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, (fields->>'a')::int + 1]); + +--Testcase 79: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, (fields->>'a')::int + 1]); +--Testcase 80: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, (fields->>'a')::int + 1]); + +--Testcase 81: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, (fields->>'a')::int + 1]); +--Testcase 82: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, (fields->>'a')::int + 1]); + +--Testcase 83: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, (fields->>'a')::int + 1]); +--Testcase 84: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, (fields->>'a')::int + 1]); + +--Testcase 85: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, (fields->>'a')::int + 1]); +--Testcase 86: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, (fields->>'a')::int + 1]); + +--Testcase 87: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, (fields->>'a')::int + 1]); +--Testcase 88: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, (fields->>'a')::int + 1]); + +-- ANY with ARRAY const +--Testcase 89: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, 2]); +--Testcase 90: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY(ARRAY[1, 2]); + +--Testcase 91: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, 2]); +--Testcase 92: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY(ARRAY[1, 2]); + +--Testcase 93: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, 2]); +--Testcase 94: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ANY(ARRAY[1, 2]); + +--Testcase 95: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, 2]); +--Testcase 96: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ANY(ARRAY[1, 2]); + +--Testcase 97: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, 2]); +--Testcase 98: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ANY(ARRAY[1, 2]); + +--Testcase 99: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, 2]); +--Testcase 100: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ANY(ARRAY[1, 2]); + +--Testcase 101: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY('{1, 2, 3}'); +--Testcase 102: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ANY('{1, 2, 3}'); +--Testcase 103: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY('{1, 2, 3}'); +--Testcase 104: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ANY('{1, 2, 3}'); + +-- ALL with ARRAY expression +--Testcase 105: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, (fields->>'a')::int * 1]); +--Testcase 106: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, (fields->>'a')::int * 1]); + +--Testcase 107: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, (fields->>'a')::int + 1]); +--Testcase 108: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, (fields->>'a')::int + 1]); + +--Testcase 109: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, (fields->>'a')::int / 1]); +--Testcase 110: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, (fields->>'a')::int / 1]); + +--Testcase 111: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, (fields->>'a')::int + 1]); +--Testcase 112: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, (fields->>'a')::int + 1]); + +--Testcase 113: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[1, (fields->>'a')::int - 1]); +--Testcase 114: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[1, (fields->>'a')::int - 1]); + +--Testcase 115: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, (fields->>'a')::int + 1]); +--Testcase 116: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, (fields->>'a')::int + 1]); + +-- ALL with ARRAY const +--Testcase 117: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, 1]); +--Testcase 118: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int = ALL(ARRAY[1, 1]); + +--Testcase 119: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, 3]); +--Testcase 120: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <> ALL(ARRAY[1, 3]); + +--Testcase 121: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, 2]); +--Testcase 122: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int >= ALL(ARRAY[1, 2]); + +--Testcase 123: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, 2]); +--Testcase 124: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int <= ALL(ARRAY[1, 2]); + +--Testcase 125: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[0, 1]); +--Testcase 126: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int > ALL(ARRAY[0, 1]); + +--Testcase 127: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, 3]); +--Testcase 128: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE (fields->>'a')::int < ALL(ARRAY[2, 3]); + +-- ANY/ALL with TEXT ARRAY const +--Testcase 129: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' = ANY(ARRAY['One', 'Two']); +--Testcase 130: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' = ANY(ARRAY['One', 'Two']); + +--Testcase 131: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' <> ALL(ARRAY['One', 'Four']); +--Testcase 132: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' <> ALL(ARRAY['One', 'Four']); + +--Testcase 133: +EXPLAIN VERBOSE +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ANY(ARRAY['One', 'Two']); +--Testcase 134: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ANY(ARRAY['One', 'Two']); + +--Testcase 135: +EXPLAIN VERBOSE +SELECT * FROM numbers WHERE fields->>'b' > ALL(ARRAY['Four', 'Five']); +--Testcase 136: +SELECT (fields->>'a')::int a, fields->>'b' b FROM numbers WHERE fields->>'b' > ALL(ARRAY['Four', 'Five']); + +--Testcase 137: +DROP FOREIGN TABLE numbers; + +--Testcase 138: +ALTER SERVER server1 OPTIONS (SET dbname 'no such database'); +--Testcase 139: +SELECT * FROM t1; +--Testcase 140: +ALTER SERVER server1 OPTIONS (SET dbname 'mydb'); +--Testcase 141: +SELECT * FROM t1; + +-- map time column to both timestamp and text +--Testcase 142: +CREATE FOREIGN TABLE t5(t timestamp OPTIONS (column_name 'time'), tag1 text OPTIONS (column_name 'time'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS (table 'cpu', schemaless 'true'); +--Testcase 143: +SELECT * FROM t5; + +--get version +--Testcase 144: +\df influxdb_fdw* +--Testcase 145: +SELECT * FROM public.influxdb_fdw_version(); +--Testcase 146: +SELECT influxdb_fdw_version(); +--Test pushdown LIMIT...OFFSET +--Testcase 147: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; + +--Testcase 148: +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 0; + +--Testcase 149: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; + +--Testcase 150: +SELECT tableoid::regclass, * FROM t1 LIMIT 1 OFFSET 1; + +--Testcase 151: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; + +--Testcase 152: +SELECT ctid, * FROM t1 LIMIT 1 OFFSET 0; + +--Testcase 153: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; + +--Testcase 154: +SELECT ctid, * FROM t2 LIMIT 10 OFFSET 20; + +--Testcase 155: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM + t1 + LEFT JOIN t2 + ON (t2.fields->>'value1')::int = 123, + LATERAL (SELECT (t2.fields->>'value1')::int value1, t1.tags->>'tag1' tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss +WHERE (t1.fields->>'value1')::int = ss.value1; + +--Testcase 156: +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM + t1 + LEFT JOIN t2 + ON (t2.fields->>'value1')::int = 123, + LATERAL (SELECT (t2.fields->>'value1')::int value1, t1.tags->>'tag1' tag1 FROM t1 LIMIT 1 OFFSET 0) AS ss1, + LATERAL (SELECT ss1.* from t3 LIMIT 1 OFFSET 20) AS ss2 +WHERE (t1.fields->>'value1')::int = ss2.value1; + +--Testcase 157: +DROP FOREIGN TABLE cpu; +--Testcase 158: +DROP FOREIGN TABLE t1; +--Testcase 159: +DROP FOREIGN TABLE t2; +--Testcase 160: +DROP FOREIGN TABLE t3; +--Testcase 161: +DROP FOREIGN TABLE t4; +--Testcase 162: +DROP FOREIGN TABLE t5; +--Testcase 163: +DROP FOREIGN TABLE tx; + +-- test INSERT, DELETE +IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'true', schemaless 'true'); +--Testcase 204: +CREATE FOREIGN TABLE cpu_nsc (time timestamp with time zone, time_text text, tag1 text, tag2 text, value1 int, value2 float, value3 text, value4 boolean) SERVER server1 OPTIONS (table 'cpu', tags 'tag1, tag2'); +--Testcase 164: +SELECT * FROM cpu; +--Testcase 165: +EXPLAIN VERBOSE +INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test1', true); +--Testcase 166: +INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-01 00:00:01+09', 'tag1_K', 'tag2_H', 200, 5.5, 'test', true); +--Testcase 167: +SELECT * FROM cpu; + +--Testcase 168: +EXPLAIN VERBOSE +INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), + ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); +--Testcase 169: +INSERT INTO cpu_nsc(time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-01-02 00:00:02+05', 'tag1_I', 'tag2_E', 300, 15.5, 'test2', false), + ('2029-02-02 00:02:02+04', 'tag1_U', 'tag2_DZ', (SELECT 350), (SELECT i FROM (VALUES(6.9)) AS foo (i)), 'funny', true); +--Testcase 170: +SELECT * FROM cpu; + +--Testcase 171: +INSERT INTO cpu_nsc(tag2, value1) VALUES('tag2_KH', 400); +--Testcase 172: +SELECT tags->>'tag1' tag1, tags->>'tag2' tag2, (fields->>'value1')::bigint value1, (fields->>'value2')::double precision value2, fields->>'value3' value3, (fields->>'value4')::boolean value4 FROM cpu; + +--Testcase 173: +EXPLAIN VERBOSE +DELETE FROM cpu_nsc WHERE tag2 = 'tag2_KH'; +--Testcase 174: +DELETE FROM cpu_nsc WHERE tag2 = 'tag2_KH'; +--Testcase 175: +SELECT tags->>'tag1' tag1, tags->>'tag2' tag2, (fields->>'value1')::bigint value1, (fields->>'value2')::double precision value2, fields->>'value3' value3, (fields->>'value4')::boolean value4 FROM cpu; + +--Testcase 176: +EXPLAIN VERBOSE +DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; +--Testcase 177: +DELETE FROM cpu WHERE time = '2021-01-02 04:00:02+09'; +--Testcase 178: +SELECT * FROM cpu; + +--Testcase 179: +EXPLAIN VERBOSE +DELETE FROM cpu_nsc WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; +--Testcase 180: +DELETE FROM cpu_nsc WHERE time < '2018-07-07' AND tag1 != 'tag1_B'; +--Testcase 181: +SELECT * FROM cpu; + +-- Test INSERT, DELETE with time_text column +--Testcase 182: +INSERT INTO cpu_nsc(time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02T00:00:00Z', 'tag1_D', 'tag2_E', 600, 20.2, 'test3', true); +--Testcase 183: +SELECT * FROM cpu; + +--Testcase 184: +INSERT INTO cpu_nsc(time_text, tag1, value2) VALUES('2021-02-02T00:00:00.123456789Z', 'tag1_P', 25.8); +--Testcase 185: +SELECT * FROM cpu; + +--Testcase 186: +INSERT INTO cpu_nsc(time_text, tag1, value2) VALUES('2021-02-02 00:00:01', 'tag1_J', 37.1); +--Testcase 187: +SELECT * FROM cpu; + +--Testcase 188: +INSERT INTO cpu_nsc(time, time_text, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-02 00:00:01+05', '2021-02-02T00:00:02.123456789Z', 'tag1_A', 'tag2_B', 200, 5.5, 'test', true); +--Testcase 189: +SELECT * FROM cpu; + +--Testcase 190: +INSERT INTO cpu_nsc(time_text, time, tag1, tag2, value1, value2, value3, value4) VALUES('2021-02-03T00:00:03.123456789Z', '2021-03-03 00:00:01+07', 'tag1_C', 'tag2_D', 200, 5.5, 'test', true); +--Testcase 191: +SELECT * FROM cpu; + +--Testcase 192: +EXPLAIN VERBOSE +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:00.123456789Z'; +--Testcase 193: +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:00.123456789Z'; +--Testcase 194: +SELECT * FROM cpu; + +--Testcase 195: +EXPLAIN VERBOSE +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; +--Testcase 196: +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02T00:00:01Z' AND tag1 = 'tag1_J'; +--Testcase 197: +SELECT * FROM cpu; + +--Testcase 198: +EXPLAIN VERBOSE +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; +--Testcase 199: +DELETE FROM cpu_nsc WHERE time_text = '2021-02-02 00:00:00' OR time ='2029-02-02 05:02:02+09'; +--Testcase 200: +SELECT * FROM cpu; + +-- Recover data +:RECOVER_INIT_TXT_DROP_BUCKET; +:RECOVER_INIT_TXT_CREATE_BUCKET; +:RECOVER_INIT_TXT; + +--Testcase 201: +DROP FOREIGN TABLE cpu_nsc; +--Testcase 205: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 202: +DROP SERVER server1 CASCADE; +--Testcase 203: +DROP EXTENSION influxdb_fdw; diff --git a/sql/14.0/schemaless/init.sql b/sql/15.0/schemaless/init.sql similarity index 100% rename from sql/14.0/schemaless/init.sql rename to sql/15.0/schemaless/init.sql diff --git a/sql/15.0/schemaless/schemaless.sql b/sql/15.0/schemaless/schemaless.sql new file mode 100644 index 0000000..26172a4 --- /dev/null +++ b/sql/15.0/schemaless/schemaless.sql @@ -0,0 +1,357 @@ +--Testcase 1: +SET datestyle=ISO; +-- timestamp with time zone differs based on this +--Testcase 2: +SET timezone='Japan'; + +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 3: +DROP EXTENSION IF EXISTS influxdb_fdw CASCADE; + +--Testcase 4: +CREATE EXTENSION influxdb_fdw CASCADE; + +--Testcase 5: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw OPTIONS (dbname 'schemalessdb', :SERVER); + +--Testcase 6: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +-- create foreign table +--Testcase 7: +CREATE FOREIGN TABLE sc1(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc1', tags 'device_id', schemaless 'true'); +--Testcase 8: +CREATE FOREIGN TABLE sc2(time timestamp with time zone, tags jsonb OPTIONS(tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER influxdb_svr OPTIONS(table 'sc2', tags 'device_id', schemaless 'true'); + +--Testcase 9: +DROP FOREIGN TABLE sc1; +--Testcase 10: +DROP FOREIGN TABLE sc2; +-- import foreign table +IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_svr INTO public OPTIONS (schemaless 'true'); +--Testcase 11: +ALTER FOREIGN TABLE sc2 RENAME COLUMN fields TO fields2; +--Testcase 12: +ALTER FOREIGN TABLE sc2 RENAME COLUMN tags TO tags2; + +-- baserel * +--Testcase 13: +EXPLAIN VERBOSE +SELECT * FROM sc1; + +--Testcase 14: +SELECT * FROM sc1; + +-- baserel all column names +--Testcase 15: +EXPLAIN VERBOSE +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + +--Testcase 16: +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + +-- baserel time only +--Testcase 17: +EXPLAIN VERBOSE +SELECT time FROM sc1; + +--Testcase 18: +SELECT time FROM sc1; + +-- baserel tag only +--Testcase 19: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id FROM sc1; + +--Testcase 20: +SELECT tags->>'device_id' device_id FROM sc1; + +-- baserel field only +--Testcase 21: +EXPLAIN VERBOSE +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + +--Testcase 22: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + +-- baserel tag+field +--Testcase 23: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + +--Testcase 24: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1; + +-- baserel * (remote restrict only) +--Testcase 25: +EXPLAIN VERBOSE +SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + +--Testcase 26: +SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + +-- baserel all (remote restrict only) +--Testcase 27: +EXPLAIN VERBOSE +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + +--Testcase 28: +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + +-- baserel field only (remote restrict only) +--Testcase 29: +EXPLAIN VERBOSE +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + +--Testcase 30: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + +-- baserel tag+field (remote restrict only) +--Testcase 31: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + +--Testcase 32: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + +-- baserel tag+field(except restrict var) (remote restrict only) +--Testcase 33: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + +--Testcase 34: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2; + +-- baserel * (local restrict only) +--Testcase 35: +EXPLAIN VERBOSE +SELECT * FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + +--Testcase 36: +SELECT * FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + +-- baserel all (local restrict only) +--Testcase 37: +EXPLAIN VERBOSE +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + +--Testcase 38: +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + +-- baserel field only (local restrict only) +--Testcase 39: +EXPLAIN VERBOSE +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + +--Testcase 40: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + +-- baserel tag+field (local restrict only) +--Testcase 41: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + +--Testcase 42: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + +-- baserel tag+field(except local restrict var) (local restrict only) +--Testcase 43: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + +--Testcase 44: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE upper(fields->>'sig2') <> 'I'; + +-- baserel * (both restricts) +--Testcase 45: +EXPLAIN VERBOSE +SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +--Testcase 46: +SELECT * FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +-- baserel all (both restricts) +--Testcase 47: +EXPLAIN VERBOSE +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +--Testcase 48: +SELECT time,tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +-- baserel field only (both restricts) +--Testcase 49: +EXPLAIN VERBOSE +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +--Testcase 50: +SELECT (fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +-- baserel tag+field (both restricts) +--Testcase 51: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +--Testcase 52: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +-- baserel tag+field(except local restrict var) (both restricts) +--Testcase 53: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +--Testcase 54: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig3')::double precision sig3,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +-- baserel tag+field(except remote restrict var) (both restricts) +--Testcase 55: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +--Testcase 56: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,fields->>'sig2' sig2,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +-- baserel tag+field(except local and remote restrict var) (both restricts) +--Testcase 57: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +--Testcase 58: +SELECT tags->>'device_id' device_id,(fields->>'sig1')::bigint sig1,(fields->>'sig4')::boolean sig4 FROM sc1 WHERE (fields->>'sig3')::double precision > 2 AND upper(fields->>'sig2') <> 'I'; + +-- aggregate sum (remote) +--Testcase 59: +EXPLAIN VERBOSE +SELECT sum((fields->>'sig1')::bigint),sum((fields->>'sig3')::double precision) FROM sc1; + +--Testcase 60: +SELECT sum((fields->>'sig1')::bigint),sum((fields->>'sig3')::double precision) FROM sc1; + +-- aggregate count (remote) +--Testcase 61: +EXPLAIN VERBOSE +SELECT count(fields->>'sig1'),count(fields->>'sig2'),count(fields->>'sig3'),count(fields->>'sig4') FROM sc1; + +--Testcase 62: +SELECT count(fields->>'sig1'),count(fields->>'sig2'),count(fields->>'sig3'),count(fields->>'sig4') FROM sc1; + +-- aggregate avg (local) +--Testcase 63: +EXPLAIN VERBOSE +SELECT avg((fields->>'sig1')::bigint),avg((fields->>'sig3')::double precision) FROM sc1; + +--Testcase 64: +SELECT avg((fields->>'sig1')::bigint),avg((fields->>'sig3')::double precision) FROM sc1; + +-- aggregate sum (remote) + tag + group by +--Testcase 65: +EXPLAIN VERBOSE +SELECT sum((fields->>'sig1')::bigint),tags->>'device_id' device_id FROM sc1 GROUP BY tags->>'device_id'; + +--Testcase 66: +SELECT sum((fields->>'sig1')::bigint),tags->>'device_id' device_id FROM sc1 GROUP BY tags->>'device_id'; + +-- aggregate sum (remote) + tag + group by time +--Testcase 67: +EXPLAIN VERBOSE +SELECT sum((fields->>'sig1')::bigint) FROM sc1 WHERE time >= to_timestamp(0) AND time <= to_timestamp(2) GROUP BY influx_time(time, interval '1s'); + +--Testcase 68: +SELECT sum((fields->>'sig1')::bigint) FROM sc1 WHERE time >= to_timestamp(0) AND time <= to_timestamp(2) GROUP BY influx_time(time, interval '1s'); + +-- aggreagte sum (remote) + tag + group by time +--Testcase 69: +EXPLAIN VERBOSE +SELECT tags->>'device_id' device_id,sum((fields->>'sig1')::bigint),fields->>'sid' sid FROM sc3 GROUP BY fields->>'sid', tags->>'device_id'; + +--Testcase 70: +SELECT tags->>'device_id' device_id,sum((fields->>'sig1')::bigint),fields->>'sid' sid FROM sc3 GROUP BY fields->>'sid', tags->>'device_id'; + +-- fucntion (remote) +--Testcase 71: +EXPLAIN VERBOSE +SELECT sqrt((fields->>'sig1')::bigint) FROM sc1; + +--Testcase 72: +SELECT sqrt((fields->>'sig1')::bigint) FROM sc1; + +-- sparse data - baserel field only +--Testcase 73: +EXPLAIN VERBOSE +SELECT (fields->>'sig')::double precision sig FROM sc4; + +--Testcase 74: +SELECT (fields->>'sig')::double precision sig FROM sc4; + +-- sparse data - baserel filed + remote restrict - no result by filter +--Testcase 75: +EXPLAIN VERBOSE +SELECT (fields->>'sig')::double precision sig FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); + +--Testcase 76: +SELECT (fields->>'sig')::double precision sig FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); + +-- sparse data - aggreate avg (local) + remote restrict - ? +--Testcase 77: +EXPLAIN VERBOSE +SELECT avg((fields->>'sig')::double precision) FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); + +--Testcase 78: +SELECT avg((fields->>'sig')::double precision) FROM sc4 WHERE time >= to_timestamp(1) AND time <= to_timestamp(2); + +-- aggregate sum (remote) and avg (local) +--Testcase 79: +EXPLAIN VERBOSE +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig1')::bigint) FROM sc1; + +--Testcase 80: +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig1')::bigint) FROM sc1; + +-- aggregate sum (remote) and avg (local) different remote column +--Testcase 81: +EXPLAIN VERBOSE +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) FROM sc1; + +--Testcase 82: +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig3')::double precision) FROM sc1; + +-- aggregate sum (remote) and avg (local) having non existed remote column +--Testcase 83: +EXPLAIN VERBOSE +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig')::double precision) FROM sc1; + +--Testcase 84: +SELECT avg((fields->>'sig1')::bigint), sum((fields->>'sig')::double precision) FROM sc1; + +-- aggregate sum (remote) + field + group by(field) + order by(field) - no pushdown for aggregation +--Testcase 85: +EXPLAIN VERBOSE +SELECT sum((fields->>'sig1')::bigint),(fields->>'sig1')::bigint sig1 FROM sc1 GROUP BY (fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; + +--Testcase 86: +SELECT sum((fields->>'sig1')::bigint),(fields->>'sig1')::bigint sig1 FROM sc1 GROUP BY (fields->>'sig1')::bigint ORDER BY (fields->>'sig1')::bigint; + +--Testcase 87: +EXPLAIN VERBOSE +SELECT count(*) FROM (SELECT (fields->>'sig1')::bigint sig1 FROM sc1) sc; + +--Testcase 88: +SELECT count(*) FROM (SELECT (fields->>'sig1')::bigint sig1 FROM sc1) sc; + +-- drop extension +--Testcase 89: +DROP FOREIGN TABLE sc1; +--Testcase 90: +DROP FOREIGN TABLE sc2; +--Testcase 91: +DROP FOREIGN TABLE sc3; +--Testcase 92: +DROP FOREIGN TABLE sc4; +--Testcase 93: +DROP USER MAPPING FOR CURRENT_USER SERVER influxdb_svr; +--Testcase 94: +DROP SERVER influxdb_svr; +--Testcase 95: +DROP EXTENSION influxdb_fdw; diff --git a/sql/15.0/schemaless/selectfunc.sql b/sql/15.0/schemaless/selectfunc.sql new file mode 100644 index 0000000..8ce5f91 --- /dev/null +++ b/sql/15.0/schemaless/selectfunc.sql @@ -0,0 +1,4049 @@ +--Testcase 1: +SET datestyle=ISO; +--Testcase 2: +SET timezone='Japan'; + +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb2', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); + +--IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); +--Testcase 6: +CREATE FOREIGN TABLE s3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 's3', tags 'tag1', schemaless 'true'); + +-- s3 (value1 as float8, value2 as bigint) +--Testcase 7: +\d s3; +--Testcase 8: +SELECT * FROM s3; + +-- select float8() (not pushdown, remove float8, explain) +--Testcase 9: +EXPLAIN VERBOSE +SELECT float8(fields->>'value1'), float8(fields->>'value2'), float8(fields->>'value3'), float8(fields->>'value4') FROM s3; + +-- select float8() (not pushdown, remove float8, result) +--Testcase 10: +SELECT float8(fields->>'value1'), float8(fields->>'value2'), float8(fields->>'value3'), float8(fields->>'value4') FROM s3; + +-- select sqrt (builtin function, explain) +--Testcase 11: +EXPLAIN VERBOSE +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3; + +-- select sqrt (builtin function, result) +--Testcase 12: +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3; + +-- select sqrt (builtin function, not pushdown constraints, explain) +--Testcase 13: +EXPLAIN VERBOSE +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select sqrt (builtin function, not pushdown constraints, result) +--Testcase 14: +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select sqrt (builtin function, pushdown constraints, explain) +--Testcase 15: +EXPLAIN VERBOSE +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select sqrt (builtin function, pushdown constraints, result) +--Testcase 16: +SELECT sqrt((fields->>'value1')::float), sqrt((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select sqrt(*) (stub agg function, explain) +--Testcase 17: +EXPLAIN VERBOSE +SELECT sqrt_all() from s3; + +-- select sqrt(*) (stub agg function, result) +--Testcase 18: +SELECT sqrt_all() from s3; + +-- select sqrt(*) (stub agg function and group by tag only) (explain) +--Testcase 19: +EXPLAIN VERBOSE +SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select sqrt(*) (stub agg function and group by tag only) (result) +--Testcase 20: +SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select abs (builtin function, explain) +--Testcase 21: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3; + +-- ABS() returns negative values if integer (https://github.com/influxdata/influxdb/issues/10261) +-- select abs (builtin function, result) +--Testcase 22: +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3; + +-- select abs (builtin function, not pushdown constraints, explain) +--Testcase 23: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select abs (builtin function, not pushdown constraints, result) +--Testcase 24: +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select abs (builtin function, pushdown constraints, explain) +--Testcase 25: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select abs (builtin function, pushdown constraints, result) +--Testcase 26: +SELECT abs((fields->>'value1')::float), abs((fields->>'value2')::bigint), abs((fields->>'value3')::float), abs((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select log (builtin function, need to swap arguments, numeric cast, explain) +-- log_(v) : postgresql (base, v), influxdb (v, base) +--Testcase 27: +EXPLAIN VERBOSE +SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + +-- select log (builtin function, need to swap arguments, numeric cast, result) +--Testcase 28: +SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + +-- select log (builtin function, need to swap arguments, float8, explain) +--Testcase 29: +EXPLAIN VERBOSE +SELECT log((fields->>'value1')::numeric, 0.1) FROM s3 WHERE (fields->>'value1')::float != 1; + +-- select log (builtin function, need to swap arguments, float8, result) +--Testcase 30: +SELECT log((fields->>'value1')::numeric, 0.1) FROM s3 WHERE (fields->>'value1')::float != 1; + +-- select log (builtin function, need to swap arguments, bigint, explain) +--Testcase 31: +EXPLAIN VERBOSE +SELECT log((fields->>'value2')::numeric, 3::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + +-- select log (builtin function, need to swap arguments, bigint, result) +--Testcase 32: +SELECT log((fields->>'value2')::numeric, 3::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + +-- select log (builtin function, need to swap arguments, mix type, explain) +--Testcase 33: +EXPLAIN VERBOSE +SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + +-- select log (builtin function, need to swap arguments, mix type, result) +--Testcase 34: +SELECT log((fields->>'value1')::numeric, (fields->>'value2')::numeric) FROM s3 WHERE (fields->>'value1')::float != 1; + +-- select log(*) (stub agg function, explain) +--Testcase 35: +EXPLAIN VERBOSE +SELECT log_all(50) FROM s3; + +-- select log(*) (stub agg function, result) +--Testcase 36: +SELECT log_all(50) FROM s3; + +-- select log(*) (stub agg function, explain) +--Testcase 37: +EXPLAIN VERBOSE +SELECT log_all(70.5) FROM s3; + +-- select log(*) (stub agg function, result) +--Testcase 38: +SELECT log_all(70.5) FROM s3; + +-- select log(*) (stub agg function and group by tag only) (explain) +--Testcase 39: +EXPLAIN VERBOSE +SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select log(*) (stub agg function and group by tag only) (result) +--Testcase 40: +SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 41: +SELECT ln_all(),log10_all(),log_all(50) FROM s3; + +-- select log2 (stub function, explain) +--Testcase 42: +EXPLAIN VERBOSE +SELECT log2((fields->>'value1')::float),log2((fields->>'value2')::bigint) FROM s3; + +-- select log2 (stub function, result) +--Testcase 43: +SELECT log2((fields->>'value1')::float),log2((fields->>'value2')::bigint) FROM s3; + +-- select log2(*) (stub agg function, explain) +--Testcase 44: +EXPLAIN VERBOSE +SELECT log2_all() from s3; + +-- select log2(*) (stub agg function, result) +--Testcase 45: +SELECT log2_all() from s3; + +-- select log2(*) (stub agg function and group by tag only) (explain) +--Testcase 46: +EXPLAIN VERBOSE +SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select log2(*) (stub agg function and group by tag only) (result) +--Testcase 47: +SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select log10 (stub function, explain) +--Testcase 48: +EXPLAIN VERBOSE +SELECT log10((fields->>'value1')::float),log10((fields->>'value2')::bigint) FROM s3; + +-- select log10 (stub function, result) +--Testcase 49: +SELECT log10((fields->>'value1')::float),log10((fields->>'value2')::bigint) FROM s3; + +-- select log10(*) (stub agg function, explain) +--Testcase 50: +EXPLAIN VERBOSE +SELECT log10_all() from s3; + +-- select log10(*) (stub agg function, result) +--Testcase 51: +SELECT log10_all() from s3; + +-- select log10(*) (stub agg function and group by tag only) (explain) +--Testcase 52: +EXPLAIN VERBOSE +SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select log10(*) (stub agg function and group by tag only) (result) +--Testcase 53: +SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 54: +SELECT log2_all(), log10_all() FROM s3; + +-- select spread (stub agg function, explain) +--Testcase 55: +EXPLAIN VERBOSE +SELECT spread((fields->>'value1')::float),spread((fields->>'value2')::bigint),spread((fields->>'value3')::float),spread((fields->>'value4')::bigint) FROM s3; + +-- select spread (stub agg function, result) +--Testcase 56: +SELECT spread((fields->>'value1')::float),spread((fields->>'value2')::bigint),spread((fields->>'value3')::float),spread((fields->>'value4')::bigint) FROM s3; + +-- select spread (stub agg function, raise exception if not expected type) +--Testcase 57: +SELECT spread((fields->>'value1')::numeric),spread((fields->>'value2')::numeric),spread((fields->>'value3')::numeric),spread((fields->>'value4')::numeric) FROM s3; + +-- select abs as nest function with agg (pushdown, explain) +--Testcase 58: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),abs(sum((fields->>'value3')::float)) FROM s3; + +-- select abs as nest function with agg (pushdown, result) +--Testcase 59: +SELECT sum((fields->>'value3')::float),abs(sum((fields->>'value3')::float)) FROM s3; + +-- select abs as nest with log2 (pushdown, explain) +--Testcase 60: +EXPLAIN VERBOSE +SELECT abs(log2((fields->>'value1')::float)),abs(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select abs as nest with log2 (pushdown, result) +--Testcase 61: +SELECT abs(log2((fields->>'value1')::float)),abs(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select abs with non pushdown func and explicit constant (explain) +--Testcase 62: +EXPLAIN VERBOSE +SELECT abs((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select abs with non pushdown func and explicit constant (result) +--Testcase 63: +SELECT abs((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select sqrt as nest function with agg and explicit constant (pushdown, explain) +--Testcase 64: +EXPLAIN VERBOSE +SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1 FROM s3; + +-- select sqrt as nest function with agg and explicit constant (pushdown, result) +--Testcase 65: +SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1 FROM s3; + +-- select sqrt as nest function with agg and explicit constant and tag (error, explain) +--Testcase 66: +EXPLAIN VERBOSE +SELECT sqrt(count((fields->>'value1')::float)), pi(), 4.1, tags->>'tag1' tag1 FROM s3; + +-- select spread (stub agg function and group by influx_time() and tag) (explain) +--Testcase 67: +EXPLAIN VERBOSE +SELECT spread((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select spread (stub agg function and group by influx_time() and tag) (result) +--Testcase 68: +SELECT spread((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select spread (stub agg function and group by tag only) (result) +--Testcase 69: +SELECT tags->>'tag1' tag1,spread((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select spread (stub agg function and other aggs) (result) +--Testcase 70: +SELECT sum((fields->>'value1')::float),spread((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; + +-- select abs with order by (explain) +--Testcase 71: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by abs(1-(fields->>'value1')::float); + +-- select abs with order by (result) +--Testcase 72: +SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by abs(1-(fields->>'value1')::float); + +-- select abs with order by index (result) +--Testcase 73: +SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by 2,1; + +-- select abs with order by index (result) +--Testcase 74: +SELECT (fields->>'value1')::float value1, abs(1-(fields->>'value1')::float) FROM s3 order by 1,2; + +-- select abs and as +--Testcase 75: +SELECT abs((fields->>'value3')::float) as abs1 FROM s3; + +-- select abs(*) (stub agg function, explain) +--Testcase 76: +EXPLAIN VERBOSE +SELECT abs_all() from s3; + +-- select abs(*) (stub agg function, result) +--Testcase 77: +SELECT abs_all() from s3; + +-- select abs(*) (stub agg function and group by tag only) (explain) +--Testcase 78: +EXPLAIN VERBOSE +SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select abs(*) (stub agg function and group by tag only) (result) +--Testcase 79: +SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select abs(*) (stub agg function, expose data, explain) +--Testcase 80: +EXPLAIN VERBOSE +SELECT (abs_all()::s3).* from s3; + +-- select abs(*) (stub agg function, expose data, result) +--Testcase 81: +SELECT (abs_all()::s3).* from s3; + +-- select spread over join query (explain) +--Testcase 82: +EXPLAIN VERBOSE +SELECT spread((t1.fields->>'value1')::float), spread((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select spread over join query (result, stub call error) +--Testcase 83: +SELECT spread((t1.fields->>'value1')::float), spread((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select spread with having (explain) +--Testcase 84: +EXPLAIN VERBOSE +SELECT spread((fields->>'value1')::float) FROM s3 HAVING spread((fields->>'value1')::float) > 100; + +-- select spread with having (result, not pushdown, stub call error) +--Testcase 85: +SELECT spread((fields->>'value1')::float) FROM s3 HAVING spread((fields->>'value1')::float) > 100; + +-- select spread(*) (stub agg function, explain) +--Testcase 86: +EXPLAIN VERBOSE +SELECT spread_all(*) from s3; + +-- select spread(*) (stub agg function, result) +--Testcase 87: +SELECT spread_all(*) from s3; + +-- select spread(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 88: +EXPLAIN VERBOSE +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select spread(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 89: +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select spread(*) (stub agg function and group by tag only) (explain) +--Testcase 90: +EXPLAIN VERBOSE +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select spread(*) (stub agg function and group by tag only) (result) +--Testcase 91: +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select spread(*) (stub agg function, expose data, explain) +--Testcase 92: +EXPLAIN VERBOSE +SELECT (spread_all(*)::s3).* from s3; + +-- select spread(*) (stub agg function, expose data, result) +--Testcase 93: +SELECT (spread_all(*)::s3).* from s3; + +-- select spread(regex) (stub agg function, explain) +--Testcase 94: +EXPLAIN VERBOSE +SELECT spread('/value[1,4]/') from s3; + +-- select spread(regex) (stub agg function, result) +--Testcase 95: +SELECT spread('/value[1,4]/') from s3; + +-- select spread(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 96: +EXPLAIN VERBOSE +SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select spread(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 97: +SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select spread(regex) (stub agg function and group by tag only) (explain) +--Testcase 98: +EXPLAIN VERBOSE +SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select spread(regex) (stub agg function and group by tag only) (result) +--Testcase 99: +SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select spread(regex) (stub agg function, expose data, explain) +--Testcase 100: +EXPLAIN VERBOSE +SELECT (spread('/value[1,4]/')::s3).* from s3; + +-- select spread(regex) (stub agg function, expose data, result) +--Testcase 101: +SELECT (spread('/value[1,4]/')::s3).* from s3; + +-- select abs with arithmetic and tag in the middle (explain) +--Testcase 102: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float) + 1, (fields->>'value2')::bigint value2, tags->>'tag1' tag1, sqrt((fields->>'value2')::bigint) FROM s3; + +-- select abs with arithmetic and tag in the middle (result) +--Testcase 103: +SELECT abs((fields->>'value1')::float) + 1, (fields->>'value2')::bigint value2, tags->>'tag1' tag1, sqrt((fields->>'value2')::bigint) FROM s3; + +-- select with order by limit (explain) +--Testcase 104: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float), abs((fields->>'value3')::float), sqrt((fields->>'value2')::bigint) FROM s3 ORDER BY abs((fields->>'value3')::float) LIMIT 1; + +-- select with order by limit (result) +--Testcase 105: +SELECT abs((fields->>'value1')::float), abs((fields->>'value3')::float), sqrt((fields->>'value2')::bigint) FROM s3 ORDER BY abs((fields->>'value3')::float) LIMIT 1; + +-- select mixing with non pushdown func (all not pushdown, explain) +--Testcase 106: +EXPLAIN VERBOSE +SELECT abs((fields->>'value1')::float), sqrt((fields->>'value2')::bigint), upper(tags->>'tag1') FROM s3; + +-- select mixing with non pushdown func (result) +--Testcase 107: +SELECT abs((fields->>'value1')::float), sqrt((fields->>'value2')::bigint), upper(tags->>'tag1') FROM s3; + +-- nested function in where clause (explain) +--Testcase 108: +EXPLAIN VERBOSE +SELECT sqrt(abs((fields->>'value3')::float)),min((fields->>'value1')::float) FROM s3 GROUP BY fields->>'value3' HAVING sqrt(abs((fields->>'value3')::float)) > 0 ORDER BY 1,2; + +-- nested function in where clause (result) +--Testcase 109: +SELECT sqrt(abs((fields->>'value3')::float)),min((fields->>'value1')::float) FROM s3 GROUP BY fields->>'value3' HAVING sqrt(abs((fields->>'value3')::float)) > 0 ORDER BY 1,2; + +--Testcase 110: +EXPLAIN VERBOSE +SELECT first(time, (fields->>'value1')::float), first(time, (fields->>'value2')::bigint), first(time, (fields->>'value3')::float), first(time, (fields->>'value4')::bigint) FROM s3; + +--Testcase 111: +SELECT first(time, (fields->>'value1')::float), first(time, (fields->>'value2')::bigint), first(time, (fields->>'value3')::float), first(time, (fields->>'value4')::bigint) FROM s3; + +-- select first(*) (stub agg function, explain) +--Testcase 112: +EXPLAIN VERBOSE +SELECT first_all(*) from s3; + +-- select first(*) (stub agg function, result) +--Testcase 113: +SELECT first_all(*) from s3; + +-- select first(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 114: +EXPLAIN VERBOSE +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select first(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 115: +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select first(*) (stub agg function and group by tag only) (explain) +--Testcase 116: +EXPLAIN VERBOSE +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select first(*) (stub agg function and group by tag only) (result) +--Testcase 117: +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select first(*) (stub agg function, expose data, explain) +--Testcase 118: +EXPLAIN VERBOSE +SELECT (first_all(*)::s3).* from s3; + +-- select first(*) (stub agg function, expose data, result) +--Testcase 119: +SELECT (first_all(*)::s3).* from s3; + +-- select first(regex) (stub function, explain) +--Testcase 120: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/') from s3; + +-- select first(regex) (stub function, explain) +--Testcase 121: +SELECT first('/value[1,4]/') from s3; + +-- select multiple regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 122: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; + +-- select multiple regex functions (do not push down, raise warning and stub error) (result) +--Testcase 123: +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; + +-- select first(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 124: +EXPLAIN VERBOSE +SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select first(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 125: +SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select first(regex) (stub agg function and group by tag only) (explain) +--Testcase 126: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select first(regex) (stub agg function and group by tag only) (result) +--Testcase 127: +SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select first(regex) (stub agg function, expose data, explain) +--Testcase 128: +EXPLAIN VERBOSE +SELECT (first('/value[1,4]/')::s3).* from s3; + +-- select first(regex) (stub agg function, expose data, result) +--Testcase 129: +SELECT (first('/value[1,4]/')::s3).* from s3; + +--Testcase 130: +EXPLAIN VERBOSE +SELECT last(time, (fields->>'value1')::float), last(time, (fields->>'value2')::bigint), last(time, (fields->>'value3')::float), last(time, (fields->>'value4')::bigint) FROM s3; + +--Testcase 131: +SELECT last(time, (fields->>'value1')::float), last(time, (fields->>'value2')::bigint), last(time, (fields->>'value3')::float), last(time, (fields->>'value4')::bigint) FROM s3; + +-- select last(*) (stub agg function, explain) +--Testcase 132: +EXPLAIN VERBOSE +SELECT last_all(*) from s3; + +-- select last(*) (stub agg function, result) +--Testcase 133: +SELECT last_all(*) from s3; + +-- select last(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 134: +EXPLAIN VERBOSE +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select last(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 135: +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select last(*) (stub agg function and group by tag only) (explain) +--Testcase 136: +EXPLAIN VERBOSE +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select last(*) (stub agg function and group by tag only) (result) +--Testcase 137: +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select last(*) (stub agg function, expose data, explain) +--Testcase 138: +EXPLAIN VERBOSE +SELECT (last_all(*)::s3).* from s3; + +-- select last(*) (stub agg function, expose data, result) +--Testcase 139: +SELECT (last_all(*)::s3).* from s3; + +-- select last(regex) (stub function, explain) +--Testcase 140: +EXPLAIN VERBOSE +SELECT last('/value[1,4]/') from s3; + +-- select last(regex) (stub function, result) +--Testcase 141: +SELECT last('/value[1,4]/') from s3; + +-- select multiple regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 142: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; + +-- select multiple regex functions (do not push down, raise warning and stub error) (result) +--Testcase 143: +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; + +-- select last(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 144: +EXPLAIN VERBOSE +SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select last(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 145: +SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select last(regex) (stub agg function and group by tag only) (explain) +--Testcase 146: +EXPLAIN VERBOSE +SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select last(regex) (stub agg function and group by tag only) (result) +--Testcase 147: +SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select last(regex) (stub agg function, expose data, explain) +--Testcase 148: +EXPLAIN VERBOSE +SELECT (last('/value[1,4]/')::s3).* from s3; + +-- select last(regex) (stub agg function, expose data, result) +--Testcase 149: +SELECT (last('/value[1,4]/')::s3).* from s3; + +--Testcase 150: +EXPLAIN VERBOSE +SELECT sample((fields->>'value2')::bigint, 3) FROM s3 WHERE (fields->>'value2')::bigint < 200; + +--Testcase 151: +SELECT sample((fields->>'value2')::bigint, 3) FROM s3 WHERE (fields->>'value2')::bigint < 200; + +--Testcase 152: +EXPLAIN VERBOSE +SELECT sample((fields->>'value2')::bigint, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); + +--Testcase 153: +SELECT sample((fields->>'value2')::bigint, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); + +-- select sample(*, int) (stub agg function, explain) +--Testcase 154: +EXPLAIN VERBOSE +SELECT sample_all(50) from s3; + +-- select sample(*, int) (stub agg function, result) +--Testcase 155: +SELECT sample_all(50) from s3; + +-- select sample(*, int) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 156: +EXPLAIN VERBOSE +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select sample(*, int) (stub agg function and group by influx_time() and tag) (result) +--Testcase 157: +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select sample(*, int) (stub agg function and group by tag only) (explain) +--Testcase 158: +EXPLAIN VERBOSE +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select sample(*, int) (stub agg function and group by tag only) (result) +--Testcase 159: +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select sample(*, int) (stub agg function, expose data, explain) +--Testcase 160: +EXPLAIN VERBOSE +SELECT (sample_all(50)::s3).* from s3; + +-- select sample(*, int) (stub agg function, expose data, result) +--Testcase 161: +SELECT (sample_all(50)::s3).* from s3; + +-- select sample(regex) (stub agg function, explain) +--Testcase 162: +EXPLAIN VERBOSE +SELECT sample('/value[1,4]/', 50) from s3; + +-- select sample(regex) (stub agg function, result) +--Testcase 163: +SELECT sample('/value[1,4]/', 50) from s3; + +-- select sample(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 164: +EXPLAIN VERBOSE +SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select sample(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 165: +SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select sample(regex) (stub agg function and group by tag only) (explain) +--Testcase 166: +EXPLAIN VERBOSE +SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select sample(regex) (stub agg function and group by tag only) (result) +--Testcase 167: +SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select sample(regex) (stub agg function, expose data, explain) +--Testcase 168: +EXPLAIN VERBOSE +SELECT (sample('/value[1,4]/', 50)::s3).* from s3; + +-- select sample(regex) (stub agg function, expose data, result) +--Testcase 169: +SELECT (sample('/value[1,4]/', 50)::s3).* from s3; + +--Testcase 170: +EXPLAIN VERBOSE +SELECT cumulative_sum((fields->>'value1')::float),cumulative_sum((fields->>'value2')::bigint),cumulative_sum((fields->>'value3')::float),cumulative_sum((fields->>'value4')::bigint) FROM s3; + +--Testcase 171: +SELECT cumulative_sum((fields->>'value1')::float),cumulative_sum((fields->>'value2')::bigint),cumulative_sum((fields->>'value3')::float),cumulative_sum((fields->>'value4')::bigint) FROM s3; + +-- select cumulative_sum(*) (stub function, explain) +--Testcase 172: +EXPLAIN VERBOSE +SELECT cumulative_sum_all() from s3; + +-- select cumulative_sum(*) (stub function, result) +--Testcase 173: +SELECT cumulative_sum_all() from s3; + +-- select cumulative_sum(regex) (stub function, result) +--Testcase 174: +SELECT cumulative_sum('/value[1,4]/') from s3; + +-- select cumulative_sum(regex) (stub function, result) +--Testcase 175: +SELECT cumulative_sum('/value[1,4]/') from s3; + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (result) +--Testcase 176: +EXPLAIN VERBOSE +SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (result) +--Testcase 177: +SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; + +-- select cumulative_sum(*) (stub function and group by tag only) (explain) +--Testcase 178: +EXPLAIN VERBOSE +SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select cumulative_sum(*) (stub function and group by tag only) (result) +--Testcase 179: +SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select cumulative_sum(regex) (stub function and group by tag only) (explain) +--Testcase 180: +EXPLAIN VERBOSE +SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select cumulative_sum(regex) (stub function and group by tag only) (result) +--Testcase 181: +SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, explain) +--Testcase 182: +EXPLAIN VERBOSE +SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; + +-- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, result) +--Testcase 183: +SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; + +--Testcase 184: +EXPLAIN VERBOSE +SELECT derivative((fields->>'value1')::float),derivative((fields->>'value2')::bigint),derivative((fields->>'value3')::float),derivative((fields->>'value4')::bigint) FROM s3; + +--Testcase 185: +SELECT derivative((fields->>'value1')::float),derivative((fields->>'value2')::bigint),derivative((fields->>'value3')::float),derivative((fields->>'value4')::bigint) FROM s3; + +--Testcase 186: +EXPLAIN VERBOSE +SELECT derivative((fields->>'value1')::float, interval '0.5s'),derivative((fields->>'value2')::bigint, interval '0.2s'),derivative((fields->>'value3')::float, interval '0.1s'),derivative((fields->>'value4')::bigint, interval '2s') FROM s3; + +--Testcase 187: +SELECT derivative((fields->>'value1')::float, interval '0.5s'),derivative((fields->>'value2')::bigint, interval '0.2s'),derivative((fields->>'value3')::float, interval '0.1s'),derivative((fields->>'value4')::bigint, interval '2s') FROM s3; + +-- select derivative(*) (stub function, explain) +--Testcase 188: +EXPLAIN VERBOSE +SELECT derivative_all() from s3; + +-- select derivative(*) (stub function, result) +--Testcase 189: +SELECT derivative_all() from s3; + +-- select derivative(regex) (stub function, explain) +--Testcase 190: +EXPLAIN VERBOSE +SELECT derivative('/value[1,4]/') from s3; + +-- select derivative(regex) (stub function, result) +--Testcase 191: +SELECT derivative('/value[1,4]/') from s3; + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 192: +EXPLAIN VERBOSE +SELECT derivative_all(), derivative('/value[1,4]/') from s3; + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 193: +SELECT derivative_all(), derivative('/value[1,4]/') from s3; + +-- select derivative(*) (stub function and group by tag only) (explain) +--Testcase 194: +EXPLAIN VERBOSE +SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select derivative(*) (stub function and group by tag only) (result) +--Testcase 195: +SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select derivative(regex) (stub function and group by tag only) (explain) +--Testcase 196: +EXPLAIN VERBOSE +SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select derivative(regex) (stub function and group by tag only) (result) +--Testcase 197: +SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select derivative(*) (stub agg function, expose data, explain) +--Testcase 198: +EXPLAIN VERBOSE +SELECT (derivative_all()::s3).* from s3; + +-- select derivative(*) (stub agg function, expose data, result) +--Testcase 199: +SELECT (derivative_all()::s3).* from s3; + +-- select derivative(regex) (stub agg function, expose data, explain) +--Testcase 200: +EXPLAIN VERBOSE +SELECT (derivative('/value[1,4]/')::s3).* from s3; + +-- select derivative(regex) (stub agg function, expose data, result) +--Testcase 201: +SELECT (derivative('/value[1,4]/')::s3).* from s3; + +--Testcase 202: +EXPLAIN VERBOSE +SELECT non_negative_derivative((fields->>'value1')::float),non_negative_derivative((fields->>'value2')::bigint),non_negative_derivative((fields->>'value3')::float),non_negative_derivative((fields->>'value4')::bigint) FROM s3; + +--Testcase 203: +SELECT non_negative_derivative((fields->>'value1')::float),non_negative_derivative((fields->>'value2')::bigint),non_negative_derivative((fields->>'value3')::float),non_negative_derivative((fields->>'value4')::bigint) FROM s3; + +--Testcase 204: +EXPLAIN VERBOSE +SELECT non_negative_derivative((fields->>'value1')::float, interval '0.5s'),non_negative_derivative((fields->>'value2')::bigint, interval '0.2s'),non_negative_derivative((fields->>'value3')::float, interval '0.1s'),non_negative_derivative((fields->>'value4')::bigint, interval '2s') FROM s3; + +--Testcase 205: +SELECT non_negative_derivative((fields->>'value1')::float, interval '0.5s'),non_negative_derivative((fields->>'value2')::bigint, interval '0.2s'),non_negative_derivative((fields->>'value3')::float, interval '0.1s'),non_negative_derivative((fields->>'value4')::bigint, interval '2s') FROM s3; + +-- select non_negative_derivative(*) (stub function, explain) +--Testcase 206: +EXPLAIN VERBOSE +SELECT non_negative_derivative_all() from s3; + +-- select non_negative_derivative(*) (stub function, result) +--Testcase 207: +SELECT non_negative_derivative_all() from s3; + +-- select non_negative_derivative(regex) (stub function, explain) +--Testcase 208: +EXPLAIN VERBOSE +SELECT non_negative_derivative('/value[1,4]/') from s3; + +-- select non_negative_derivative(regex) (stub function, result) +--Testcase 209: +SELECT non_negative_derivative('/value[1,4]/') from s3; + +-- select non_negative_derivative(*) (stub function and group by tag only) (explain) +--Testcase 210: +EXPLAIN VERBOSE +SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select non_negative_derivative(*) (stub function and group by tag only) (result) +--Testcase 211: +SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select non_negative_derivative(regex) (stub function and group by tag only) (explain) +--Testcase 212: +EXPLAIN VERBOSE +SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select non_negative_derivative(regex) (stub agg function and group by tag only) (result) +--Testcase 213: +SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select non_negative_derivative(*) (stub function, expose data, explain) +--Testcase 214: +EXPLAIN VERBOSE +SELECT (non_negative_derivative_all()::s3).* from s3; + +-- select non_negative_derivative(*) (stub agg function, expose data, result) +--Testcase 215: +SELECT (non_negative_derivative_all()::s3).* from s3; + +-- select non_negative_derivative(regex) (stub function, expose data, explain) +--Testcase 216: +EXPLAIN VERBOSE +SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; + +-- select non_negative_derivative(regex) (stub agg function, expose data, result) +--Testcase 217: +SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; + +--Testcase 218: +EXPLAIN VERBOSE +SELECT difference((fields->>'value1')::float),difference((fields->>'value2')::bigint),difference((fields->>'value3')::float),difference((fields->>'value4')::bigint) FROM s3; + +--Testcase 219: +SELECT difference((fields->>'value1')::float),difference((fields->>'value2')::bigint),difference((fields->>'value3')::float),difference((fields->>'value4')::bigint) FROM s3; + +-- select difference(*) (stub function, explain) +--Testcase 220: +EXPLAIN VERBOSE +SELECT difference_all() from s3; + +-- select difference(*) (stub function, result) +--Testcase 221: +SELECT difference_all() from s3; + +-- select difference(regex) (stub function, explain) +--Testcase 222: +EXPLAIN VERBOSE +SELECT difference('/value[1,4]/') from s3; + +-- select difference(regex) (stub function, result) +--Testcase 223: +SELECT difference('/value[1,4]/') from s3; + +-- select difference(*) (stub agg function and group by tag only) (explain) +--Testcase 224: +EXPLAIN VERBOSE +SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select difference(*) (stub agg function and group by tag only) (result) +--Testcase 225: +SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select difference(regex) (stub agg function and group by tag only) (explain) +--Testcase 226: +EXPLAIN VERBOSE +SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select difference(regex) (stub agg function and group by tag only) (result) +--Testcase 227: +SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select difference(*) (stub function, expose data, explain) +--Testcase 228: +EXPLAIN VERBOSE +SELECT (difference_all()::s3).* from s3; + +-- select difference(*) (stub function, expose data, result) +--Testcase 229: +SELECT (difference_all()::s3).* from s3; + +-- select difference(regex) (stub function, expose data, explain) +--Testcase 230: +EXPLAIN VERBOSE +SELECT (difference('/value[1,4]/')::s3).* from s3; + +-- select difference(regex) (stub function, expose data, result) +--Testcase 231: +SELECT (difference('/value[1,4]/')::s3).* from s3; + +--Testcase 232: +EXPLAIN VERBOSE +SELECT non_negative_difference((fields->>'value1')::float),non_negative_difference((fields->>'value2')::bigint),non_negative_difference((fields->>'value3')::float),non_negative_difference((fields->>'value4')::bigint) FROM s3; + +--Testcase 233: +SELECT non_negative_difference((fields->>'value1')::float),non_negative_difference((fields->>'value2')::bigint),non_negative_difference((fields->>'value3')::float),non_negative_difference((fields->>'value4')::bigint) FROM s3; + +-- select non_negative_difference(*) (stub function, explain) +--Testcase 234: +EXPLAIN VERBOSE +SELECT non_negative_difference_all() from s3; + +-- select non_negative_difference(*) (stub function, result) +--Testcase 235: +SELECT non_negative_difference_all() from s3; + +-- select non_negative_difference(regex) (stub agg function, explain) +--Testcase 236: +EXPLAIN VERBOSE +SELECT non_negative_difference('/value[1,4]/') from s3; + +-- select non_negative_difference(*), non_negative_difference(regex) (stub function, result) +--Testcase 237: +SELECT non_negative_difference('/value[1,4]/') from s3; + +-- select non_negative_difference(*) (stub function and group by tag only) (explain) +--Testcase 238: +EXPLAIN VERBOSE +SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select non_negative_difference(*) (stub function and group by tag only) (result) +--Testcase 239: +SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select non_negative_difference(regex) (stub function and group by tag only) (explain) +--Testcase 240: +EXPLAIN VERBOSE +SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select non_negative_difference(regex) (stub function and group by tag only) (result) +--Testcase 241: +SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select non_negative_difference(*) (stub function, expose data, explain) +--Testcase 242: +EXPLAIN VERBOSE +SELECT (non_negative_difference_all()::s3).* from s3; + +-- select non_negative_difference(*) (stub function, expose data, result) +--Testcase 243: +SELECT (non_negative_difference_all()::s3).* from s3; + +-- select non_negative_difference(regex) (stub function, expose data, explain) +--Testcase 244: +EXPLAIN VERBOSE +SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; + +-- select non_negative_difference(regex) (stub function, expose data, result) +--Testcase 245: +SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; + +--Testcase 246: +EXPLAIN VERBOSE +SELECT elapsed((fields->>'value1')::float),elapsed((fields->>'value2')::bigint),elapsed((fields->>'value3')::float),elapsed((fields->>'value4')::bigint) FROM s3; + +--Testcase 247: +SELECT elapsed((fields->>'value1')::float),elapsed((fields->>'value2')::bigint),elapsed((fields->>'value3')::float),elapsed((fields->>'value4')::bigint) FROM s3; + +--Testcase 248: +EXPLAIN VERBOSE +SELECT elapsed((fields->>'value1')::float, interval '0.5s'),elapsed((fields->>'value2')::bigint, interval '0.2s'),elapsed((fields->>'value3')::float, interval '0.1s'),elapsed((fields->>'value4')::bigint, interval '2s') FROM s3; + +--Testcase 249: +SELECT elapsed((fields->>'value1')::float, interval '0.5s'),elapsed((fields->>'value2')::bigint, interval '0.2s'),elapsed((fields->>'value3')::float, interval '0.1s'),elapsed((fields->>'value4')::bigint, interval '2s') FROM s3; + +-- select elapsed(*) (stub function, explain) +--Testcase 250: +EXPLAIN VERBOSE +SELECT elapsed_all() from s3; + +-- select elapsed(*) (stub function, result) +--Testcase 251: +SELECT elapsed_all() from s3; + +-- select elapsed(regex) (stub function, explain) +--Testcase 252: +EXPLAIN VERBOSE +SELECT elapsed('/value[1,4]/') from s3; + +-- select elapsed(regex) (stub agg function, result) +--Testcase 253: +SELECT elapsed('/value[1,4]/') from s3; + +-- select elapsed(*) (stub function and group by tag only) (explain) +--Testcase 254: +EXPLAIN VERBOSE +SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select elapsed(*) (stub function and group by tag only) (result) +--Testcase 255: +SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select elapsed(regex) (stub function and group by tag only) (explain) +--Testcase 256: +EXPLAIN VERBOSE +SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select elapsed(regex) (stub function and group by tag only) (result) +--Testcase 257: +SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select elapsed(*) (stub function, expose data, explain) +--Testcase 258: +EXPLAIN VERBOSE +SELECT (elapsed_all()::s3).* from s3; + +-- select elapsed(*) (stub function, expose data, result) +--Testcase 259: +SELECT (elapsed_all()::s3).* from s3; + +-- select elapsed(regex) (stub function, expose data, explain) +--Testcase 260: +EXPLAIN VERBOSE +SELECT (elapsed('/value[1,4]/')::s3).* from s3; + +-- select elapsed(regex) (stub agg function, expose data, result) +--Testcase 261: +SELECT (elapsed('/value[1,4]/')::s3).* from s3; + +--Testcase 262: +EXPLAIN VERBOSE +SELECT moving_average((fields->>'value1')::float, 2),moving_average((fields->>'value2')::bigint, 2),moving_average((fields->>'value3')::float, 2),moving_average((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 263: +SELECT moving_average((fields->>'value1')::float, 2),moving_average((fields->>'value2')::bigint, 2),moving_average((fields->>'value3')::float, 2),moving_average((fields->>'value4')::bigint, 2) FROM s3; + +-- select moving_average(*) (stub function, explain) +--Testcase 264: +EXPLAIN VERBOSE +SELECT moving_average_all(2) from s3; + +-- select moving_average(*) (stub function, result) +--Testcase 265: +SELECT moving_average_all(2) from s3; + +-- select moving_average(regex) (stub function, explain) +--Testcase 266: +EXPLAIN VERBOSE +SELECT moving_average('/value[1,4]/', 2) from s3; + +-- select moving_average(regex) (stub function, result) +--Testcase 267: +SELECT moving_average('/value[1,4]/', 2) from s3; + +-- select moving_average(*) (stub function and group by tag only) (explain) +--Testcase 268: +EXPLAIN VERBOSE +SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select moving_average(*) (stub function and group by tag only) (result) +--Testcase 269: +SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 270: +EXPLAIN VERBOSE +SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select moving_average(regex) (stub function and group by tag only) (result) +--Testcase 271: +SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select moving_average(*) (stub function, expose data, explain) +--Testcase 272: +EXPLAIN VERBOSE +SELECT (moving_average_all(2)::s3).* from s3; + +-- select moving_average(*) (stub function, expose data, result) +--Testcase 273: +SELECT (moving_average_all(2)::s3).* from s3; + +-- select moving_average(regex) (stub function, expose data, explain) +--Testcase 274: +EXPLAIN VERBOSE +SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; + +-- select moving_average(regex) (stub function, expose data, result) +--Testcase 275: +SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; + +--Testcase 276: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator((fields->>'value1')::float, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2),chande_momentum_oscillator((fields->>'value3')::float, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 277: +SELECT chande_momentum_oscillator((fields->>'value1')::float, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2),chande_momentum_oscillator((fields->>'value3')::float, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 278: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator((fields->>'value1')::float, 2, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2, 2),chande_momentum_oscillator((fields->>'value3')::float, 2, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2, 2) FROM s3; + +--Testcase 279: +SELECT chande_momentum_oscillator((fields->>'value1')::float, 2, 2),chande_momentum_oscillator((fields->>'value2')::bigint, 2, 2),chande_momentum_oscillator((fields->>'value3')::float, 2, 2),chande_momentum_oscillator((fields->>'value4')::bigint, 2, 2) FROM s3; + +-- select chande_momentum_oscillator(*) (stub function, explain) +--Testcase 280: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator_all(2) from s3; + +-- select chande_momentum_oscillator(*) (stub function, result) +--Testcase 281: +SELECT chande_momentum_oscillator_all(2) from s3; + +-- select chande_momentum_oscillator(regex) (stub function, explain) +--Testcase 282: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; + +-- select chande_momentum_oscillator(regex) (stub agg function, result) +--Testcase 283: +SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; + +-- select chande_momentum_oscillator(*) (stub function and group by tag only) (explain) +--Testcase 284: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select chande_momentum_oscillator(*) (stub agg function and group by tag only) (result) +--Testcase 285: +SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select chande_momentum_oscillator(regex) (stub agg function and group by tag only) (explain) +--Testcase 286: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select chande_momentum_oscillator(regex) (stub function and group by tag only) (result) +--Testcase 287: +SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select chande_momentum_oscillator(*) (stub agg function, expose data, explain) +--Testcase 288: +EXPLAIN VERBOSE +SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; + +-- select chande_momentum_oscillator(*) (stub function, expose data, result) +--Testcase 289: +SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; + +-- select chande_momentum_oscillator(regex) (stub function, expose data, explain) +--Testcase 290: +EXPLAIN VERBOSE +SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; + +-- select chande_momentum_oscillator(regex) (stub function, expose data, result) +--Testcase 291: +SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; + +--Testcase 292: +EXPLAIN VERBOSE +SELECT exponential_moving_average((fields->>'value1')::float, 2),exponential_moving_average((fields->>'value2')::bigint, 2),exponential_moving_average((fields->>'value3')::float, 2),exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 293: +SELECT exponential_moving_average((fields->>'value1')::float, 2),exponential_moving_average((fields->>'value2')::bigint, 2),exponential_moving_average((fields->>'value3')::float, 2),exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 294: +EXPLAIN VERBOSE +SELECT exponential_moving_average((fields->>'value1')::float, 2, 2),exponential_moving_average((fields->>'value2')::bigint, 2, 2),exponential_moving_average((fields->>'value3')::float, 2, 2),exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + +--Testcase 295: +SELECT exponential_moving_average((fields->>'value1')::float, 2, 2),exponential_moving_average((fields->>'value2')::bigint, 2, 2),exponential_moving_average((fields->>'value3')::float, 2, 2),exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + +-- select exponential_moving_average(*) (stub function, explain) +--Testcase 296: +EXPLAIN VERBOSE +SELECT exponential_moving_average_all(2) from s3; + +-- select exponential_moving_average(*) (stub function, result) +--Testcase 297: +SELECT exponential_moving_average_all(2) from s3; + +-- select exponential_moving_average(regex) (stub function, explain) +--Testcase 298: +EXPLAIN VERBOSE +SELECT exponential_moving_average('/value[1,4]/',2) from s3; + +-- select exponential_moving_average(regex) (stub function, result) +--Testcase 299: +SELECT exponential_moving_average('/value[1,4]/',2) from s3; + +-- select exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 300: +EXPLAIN VERBOSE +SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 301: +SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select exponential_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 302: +EXPLAIN VERBOSE +SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select exponential_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 303: +SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +--Testcase 304: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average((fields->>'value1')::float, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2),double_exponential_moving_average((fields->>'value3')::float, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 305: +SELECT double_exponential_moving_average((fields->>'value1')::float, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2),double_exponential_moving_average((fields->>'value3')::float, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 306: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average((fields->>'value1')::float, 2, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2, 2),double_exponential_moving_average((fields->>'value3')::float, 2, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + +--Testcase 307: +SELECT double_exponential_moving_average((fields->>'value1')::float, 2, 2),double_exponential_moving_average((fields->>'value2')::bigint, 2, 2),double_exponential_moving_average((fields->>'value3')::float, 2, 2),double_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + +-- select double_exponential_moving_average(*) (stub function, explain) +--Testcase 308: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average_all(2) from s3; + +-- select double_exponential_moving_average(*) (stub function, result) +--Testcase 309: +SELECT double_exponential_moving_average_all(2) from s3; + +-- select double_exponential_moving_average(regex) (stub function, explain) +--Testcase 310: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; + +-- select double_exponential_moving_average(regex) (stub function, result) +--Testcase 311: +SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; + +-- select double_exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 312: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select double_exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 313: +SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select double_exponential_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 314: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select double_exponential_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 315: +SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +--Testcase 316: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 317: +SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 318: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2, 2) FROM s3; + +--Testcase 319: +SELECT kaufmans_efficiency_ratio((fields->>'value1')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value2')::bigint, 2, 2),kaufmans_efficiency_ratio((fields->>'value3')::float, 2, 2),kaufmans_efficiency_ratio((fields->>'value4')::bigint, 2, 2) FROM s3; + +-- select kaufmans_efficiency_ratio(*) (stub function, explain) +--Testcase 320: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio_all(2) from s3; + +-- select kaufmans_efficiency_ratio(*) (stub function, result) +--Testcase 321: +SELECT kaufmans_efficiency_ratio_all(2) from s3; + +-- select kaufmans_efficiency_ratio(regex) (stub function, explain) +--Testcase 322: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; + +-- select kaufmans_efficiency_ratio(regex) (stub function, result) +--Testcase 323: +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; + +-- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (explain) +--Testcase 324: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (result) +--Testcase 325: +SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (explain) +--Testcase 326: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (result) +--Testcase 327: +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select kaufmans_efficiency_ratio(*) (stub function, expose data, explain) +--Testcase 328: +EXPLAIN VERBOSE +SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; + +-- select kaufmans_efficiency_ratio(*) (stub function, expose data, result) +--Testcase 329: +SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; + +-- select kaufmans_efficiency_ratio(regex) (stub function, expose data, explain) +--Testcase 330: +EXPLAIN VERBOSE +SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; + +-- select kaufmans_efficiency_ratio(regex) (stub function, expose data, result) +--Testcase 331: +SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; + +--Testcase 332: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 333: +SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 334: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + +--Testcase 335: +SELECT kaufmans_adaptive_moving_average((fields->>'value1')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value2')::bigint, 2, 2),kaufmans_adaptive_moving_average((fields->>'value3')::float, 2, 2),kaufmans_adaptive_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + +-- select kaufmans_adaptive_moving_average(*) (stub function, explain) +--Testcase 336: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average_all(2) from s3; + +-- select kaufmans_adaptive_moving_average(*) (stub function, result) +--Testcase 337: +SELECT kaufmans_adaptive_moving_average_all(2) from s3; + +-- select kaufmans_adaptive_moving_average(regex) (stub function, explain) +--Testcase 338: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; + +-- select kaufmans_adaptive_moving_average(regex) (stub agg function, result) +--Testcase 339: +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; + +-- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 340: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (result) +--Testcase 341: +SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 342: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 343: +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +--Testcase 344: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average((fields->>'value1')::float, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2),triple_exponential_moving_average((fields->>'value3')::float, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 345: +SELECT triple_exponential_moving_average((fields->>'value1')::float, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2),triple_exponential_moving_average((fields->>'value3')::float, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 346: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average((fields->>'value1')::float, 2, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2, 2),triple_exponential_moving_average((fields->>'value3')::float, 2, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + +--Testcase 347: +SELECT triple_exponential_moving_average((fields->>'value1')::float, 2, 2),triple_exponential_moving_average((fields->>'value2')::bigint, 2, 2),triple_exponential_moving_average((fields->>'value3')::float, 2, 2),triple_exponential_moving_average((fields->>'value4')::bigint, 2, 2) FROM s3; + +-- select triple_exponential_moving_average(*) (stub function, explain) +--Testcase 348: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average_all(2) from s3; + +-- select triple_exponential_moving_average(*) (stub function, result) +--Testcase 349: +SELECT triple_exponential_moving_average_all(2) from s3; + +-- select triple_exponential_moving_average(regex) (stub function, explain) +--Testcase 350: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; + +-- select triple_exponential_moving_average(regex) (stub function, result) +--Testcase 351: +SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; + +-- select triple_exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 352: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select triple_exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 353: +SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (explain) +--Testcase 354: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (result) +--Testcase 355: +SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +--Testcase 356: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative((fields->>'value1')::float, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2),triple_exponential_derivative((fields->>'value3')::float, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 357: +SELECT triple_exponential_derivative((fields->>'value1')::float, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2),triple_exponential_derivative((fields->>'value3')::float, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 358: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative((fields->>'value1')::float, 2, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2, 2),triple_exponential_derivative((fields->>'value3')::float, 2, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2, 2) FROM s3; + +--Testcase 359: +SELECT triple_exponential_derivative((fields->>'value1')::float, 2, 2),triple_exponential_derivative((fields->>'value2')::bigint, 2, 2),triple_exponential_derivative((fields->>'value3')::float, 2, 2),triple_exponential_derivative((fields->>'value4')::bigint, 2, 2) FROM s3; + +-- select triple_exponential_derivative(*) (stub function, explain) +--Testcase 360: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative_all(2) from s3; + +-- select triple_exponential_derivative(*) (stub function, result) +--Testcase 361: +SELECT triple_exponential_derivative_all(2) from s3; + +-- select triple_exponential_derivative(regex) (stub function, explain) +--Testcase 362: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; + +-- select triple_exponential_derivative(regex) (stub function, result) +--Testcase 363: +SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; + +-- select triple_exponential_derivative(*) (stub function and group by tag only) (explain) +--Testcase 364: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select triple_exponential_derivative(*) (stub function and group by tag only) (result) +--Testcase 365: +SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select triple_exponential_derivative(regex) (stub function and group by tag only) (explain) +--Testcase 366: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select triple_exponential_derivative(regex) (stub function and group by tag only) (result) +--Testcase 367: +SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +--Testcase 368: +EXPLAIN VERBOSE +SELECT relative_strength_index((fields->>'value1')::float, 2),relative_strength_index((fields->>'value2')::bigint, 2),relative_strength_index((fields->>'value3')::float, 2),relative_strength_index((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 369: +SELECT relative_strength_index((fields->>'value1')::float, 2),relative_strength_index((fields->>'value2')::bigint, 2),relative_strength_index((fields->>'value3')::float, 2),relative_strength_index((fields->>'value4')::bigint, 2) FROM s3; + +--Testcase 370: +EXPLAIN VERBOSE +SELECT relative_strength_index((fields->>'value1')::float, 2, 2),relative_strength_index((fields->>'value2')::bigint, 2, 2),relative_strength_index((fields->>'value3')::float, 2, 2),relative_strength_index((fields->>'value4')::bigint, 2, 2) FROM s3; + +--Testcase 371: +SELECT relative_strength_index((fields->>'value1')::float, 2, 2),relative_strength_index((fields->>'value2')::bigint, 2, 2),relative_strength_index((fields->>'value3')::float, 2, 2),relative_strength_index((fields->>'value4')::bigint, 2, 2) FROM s3; + +-- select relative_strength_index(*) (stub function, explain) +--Testcase 372: +EXPLAIN VERBOSE +SELECT relative_strength_index_all(2) from s3; + +-- select relative_strength_index(*) (stub function, result) +--Testcase 373: +SELECT relative_strength_index_all(2) from s3; + +-- select relative_strength_index(regex) (stub agg function, explain) +--Testcase 374: +EXPLAIN VERBOSE +SELECT relative_strength_index('/value[1,4]/',2) from s3; + +-- select relative_strength_index(regex) (stub agg function, result) +--Testcase 375: +SELECT relative_strength_index('/value[1,4]/',2) from s3; + +-- select relative_strength_index(*) (stub function and group by tag only) (explain) +--Testcase 376: +EXPLAIN VERBOSE +SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select relative_strength_index(*) (stub function and group by tag only) (result) +--Testcase 377: +SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select relative_strength_index(regex) (stub function and group by tag only) (explain) +--Testcase 378: +EXPLAIN VERBOSE +SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select relative_strength_index(regex) (stub function and group by tag only) (result) +--Testcase 379: +SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select relative_strength_index(*) (stub function, expose data, explain) +--Testcase 380: +EXPLAIN VERBOSE +SELECT (relative_strength_index_all(2)::s3).* from s3; + +-- select relative_strength_index(*) (stub function, expose data, result) +--Testcase 381: +SELECT (relative_strength_index_all(2)::s3).* from s3; + +-- select relative_strength_index(regex) (stub function, expose data, explain) +--Testcase 382: +EXPLAIN VERBOSE +SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; + +-- select relative_strength_index(regex) (stub function, expose data, result) +--Testcase 383: +SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; + +-- select integral (stub agg function, explain) +--Testcase 384: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float),integral((fields->>'value2')::bigint),integral((fields->>'value3')::float),integral((fields->>'value4')::bigint) FROM s3; + +-- select integral (stub agg function, result) +--Testcase 385: +SELECT integral((fields->>'value1')::float),integral((fields->>'value2')::bigint),integral((fields->>'value3')::float),integral((fields->>'value4')::bigint) FROM s3; + +--Testcase 386: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float, interval '1s'),integral((fields->>'value2')::bigint, interval '1s'),integral((fields->>'value3')::float, interval '1s'),integral((fields->>'value4')::bigint, interval '1s') FROM s3; + +-- select integral (stub agg function, result) +--Testcase 387: +SELECT integral((fields->>'value1')::float, interval '1s'),integral((fields->>'value2')::bigint, interval '1s'),integral((fields->>'value3')::float, interval '1s'),integral((fields->>'value4')::bigint, interval '1s') FROM s3; + +-- select integral (stub agg function, raise exception if not expected type) +--Testcase 388: +SELECT integral((fields->>'value1')::numeric),integral((fields->>'value2')::numeric),integral((fields->>'value3')::numeric),integral((fields->>'value4')::numeric) FROM s3; + +-- select integral (stub agg function and group by influx_time() and tag) (explain) +--Testcase 389: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select integral (stub agg function and group by influx_time() and tag) (result) +--Testcase 390: +SELECT integral((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select integral (stub agg function and group by influx_time() and tag) (explain) +--Testcase 391: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float, interval '1s'),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select integral (stub agg function and group by influx_time() and tag) (result) +--Testcase 392: +SELECT integral((fields->>'value1')::float, interval '1s'),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select integral (stub agg function and group by tag only) (result) +--Testcase 393: +SELECT tags->>'tag1' tag1,integral((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1' ORDER BY 1; + +-- select integral (stub agg function and other aggs) (result) +--Testcase 394: +SELECT sum((fields->>'value1')::float),integral((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; + +-- select integral (stub agg function and group by tag only) (result) +--Testcase 395: +SELECT tags->>'tag1' tag1,integral((fields->>'value1')::float, interval '1s') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1' ORDER BY 1; + +-- select integral (stub agg function and other aggs) (result) +--Testcase 396: +SELECT sum((fields->>'value1')::float),integral((fields->>'value1')::float, interval '1s'),count((fields->>'value1')::float) FROM s3; + +-- select integral over join query (explain) +--Testcase 397: +EXPLAIN VERBOSE +SELECT integral((t1.fields->>'value1')::float), integral((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select integral over join query (result, stub call error) +--Testcase 398: +SELECT integral((t1.fields->>'value1')::float), integral((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select integral over join query (explain) +--Testcase 399: +EXPLAIN VERBOSE +SELECT integral((t1.fields->>'value1')::float, interval '1s'), integral((t2.fields->>'value1')::float, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select integral over join query (result, stub call error) +--Testcase 400: +SELECT integral((t1.fields->>'value1')::float, interval '1s'), integral((t2.fields->>'value1')::float, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select integral with having (explain) +--Testcase 401: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float) FROM s3 HAVING integral((fields->>'value1')::float) > 100; + +-- select integral with having (explain, not pushdown, stub call error) +--Testcase 402: +SELECT integral((fields->>'value1')::float) FROM s3 HAVING integral((fields->>'value1')::float) > 100; + +-- select integral with having (explain) +--Testcase 403: +EXPLAIN VERBOSE +SELECT integral((fields->>'value1')::float, interval '1s') FROM s3 HAVING integral((fields->>'value1')::float, interval '1s') > 100; + +-- select integral with having (explain, not pushdown, stub call error) +--Testcase 404: +SELECT integral((fields->>'value1')::float, interval '1s') FROM s3 HAVING integral((fields->>'value1')::float, interval '1s') > 100; + +-- select integral(*) (stub agg function, explain) +--Testcase 405: +EXPLAIN VERBOSE +SELECT integral_all(*) from s3; + +-- select integral(*) (stub agg function, result) +--Testcase 406: +SELECT integral_all(*) from s3; + +-- select integral(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 407: +EXPLAIN VERBOSE +SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select integral(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 408: +SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select integral(*) (stub agg function and group by tag only) (explain) +--Testcase 409: +EXPLAIN VERBOSE +SELECT integral_all(*) FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; + +-- select integral(*) (stub agg function and group by tag only) (result) +--Testcase 410: +SELECT integral_all(*) FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; + +-- select integral(*) (stub agg function, expose data, explain) +--Testcase 411: +EXPLAIN VERBOSE +SELECT (integral_all(*)::s3).* from s3; + +-- select integral(*) (stub agg function, expose data, result) +--Testcase 412: +SELECT (integral_all(*)::s3).* from s3; + +-- select integral(regex) (stub agg function, explain) +--Testcase 413: +EXPLAIN VERBOSE +SELECT integral('/value[1,4]/') from s3; + +-- select integral(regex) (stub agg function, result) +--Testcase 414: +SELECT integral('/value[1,4]/') from s3; + +-- select integral(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 415: +EXPLAIN VERBOSE +SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select integral(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 416: +SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select integral(regex) (stub agg function and group by tag only) (explain) +--Testcase 417: +EXPLAIN VERBOSE +SELECT integral('/value[1,4]/') FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; + +-- select integral(regex) (stub agg function and group by tag only) (result) +--Testcase 418: +SELECT integral('/value[1,4]/') FROM s3 WHERE (fields->>'value1')::float > 0.3 GROUP BY tags->>'tag1'; + +-- select integral(regex) (stub agg function, expose data, explain) +--Testcase 419: +EXPLAIN VERBOSE +SELECT (integral('/value[1,4]/')::s3).* from s3; + +-- select integral(regex) (stub agg function, expose data, result) +--Testcase 420: +SELECT (integral('/value[1,4]/')::s3).* from s3; + +-- select mean (stub agg function, explain) +--Testcase 421: +EXPLAIN VERBOSE +SELECT mean((fields->>'value1')::float),mean((fields->>'value2')::bigint),mean((fields->>'value3')::float),mean((fields->>'value4')::bigint) FROM s3; + +-- select mean (stub agg function, result) +--Testcase 422: +SELECT mean((fields->>'value1')::float),mean((fields->>'value2')::bigint),mean((fields->>'value3')::float),mean((fields->>'value4')::bigint) FROM s3; + +-- select mean (stub agg function, raise exception if not expected type) +--Testcase 423: +SELECT mean((fields->>'value1')::numeric),mean((fields->>'value2')::numeric),mean((fields->>'value3')::numeric),mean((fields->>'value4')::numeric) FROM s3; + +-- select mean (stub agg function and group by influx_time() and tag) (explain) +--Testcase 424: +EXPLAIN VERBOSE +SELECT mean((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select mean (stub agg function and group by influx_time() and tag) (result) +--Testcase 425: +SELECT mean((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select mean (stub agg function and group by tag only) (result) +--Testcase 426: +SELECT tags->>'tag1' tag1,mean((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select mean (stub agg function and other aggs) (result) +--Testcase 427: +SELECT sum((fields->>'value1')::float),mean((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; + +-- select mean over join query (explain) +--Testcase 428: +EXPLAIN VERBOSE +SELECT mean((t1.fields->>'value1')::float), mean((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select mean over join query (result, stub call error) +--Testcase 429: +SELECT mean((t1.fields->>'value1')::float), mean((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select mean with having (explain) +--Testcase 430: +EXPLAIN VERBOSE +SELECT mean((fields->>'value1')::float) FROM s3 HAVING mean((fields->>'value1')::float) > 100; + +-- select mean with having (explain, not pushdown, stub call error) +--Testcase 431: +SELECT mean((fields->>'value1')::float) FROM s3 HAVING mean((fields->>'value1')::float) > 100; + +-- select mean(*) (stub agg function, explain) +--Testcase 432: +EXPLAIN VERBOSE +SELECT mean_all(*) from s3; + +-- select mean(*) (stub agg function, result) +--Testcase 433: +SELECT mean_all(*) from s3; + +-- select mean(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 434: +EXPLAIN VERBOSE +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select mean(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 435: +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select mean(*) (stub agg function and group by tag only) (explain) +--Testcase 436: +EXPLAIN VERBOSE +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select mean(*) (stub agg function and group by tag only) (result) +--Testcase 437: +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select mean(*) (stub agg function, expose data, explain) +--Testcase 438: +EXPLAIN VERBOSE +SELECT (mean_all(*)::s3).* from s3; + +-- select mean(*) (stub agg function, expose data, result) +--Testcase 439: +SELECT (mean_all(*)::s3).* from s3; + +-- select mean(regex) (stub agg function, explain) +--Testcase 440: +EXPLAIN VERBOSE +SELECT mean('/value[1,4]/') from s3; + +-- select mean(regex) (stub agg function, result) +--Testcase 441: +SELECT mean('/value[1,4]/') from s3; + +-- select mean(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 442: +EXPLAIN VERBOSE +SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select mean(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 443: +SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select mean(regex) (stub agg function and group by tag only) (explain) +--Testcase 444: +EXPLAIN VERBOSE +SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select mean(regex) (stub agg function and group by tag only) (result) +--Testcase 445: +SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select mean(regex) (stub agg function, expose data, explain) +--Testcase 446: +EXPLAIN VERBOSE +SELECT (mean('/value[1,4]/')::s3).* from s3; + +-- select mean(regex) (stub agg function, expose data, result) +--Testcase 447: +SELECT (mean('/value[1,4]/')::s3).* from s3; + +-- select median (stub agg function, explain) +--Testcase 448: +EXPLAIN VERBOSE +SELECT median((fields->>'value1')::float),median((fields->>'value2')::bigint),median((fields->>'value3')::float),median((fields->>'value4')::bigint) FROM s3; + +-- select median (stub agg function, result) +--Testcase 449: +SELECT median((fields->>'value1')::float),median((fields->>'value2')::bigint),median((fields->>'value3')::float),median((fields->>'value4')::bigint) FROM s3; + +-- select median (stub agg function, raise exception if not expected type) +--Testcase 450: +SELECT median((fields->>'value1')::numeric),median((fields->>'value2')::numeric),median((fields->>'value3')::numeric),median((fields->>'value4')::numeric) FROM s3; + +-- select median (stub agg function and group by influx_time() and tag) (explain) +--Testcase 451: +EXPLAIN VERBOSE +SELECT median((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select median (stub agg function and group by influx_time() and tag) (result) +--Testcase 452: +SELECT median((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select median (stub agg function and group by tag only) (result) +--Testcase 453: +SELECT tags->>'tag1' tag1,median((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select median (stub agg function and other aggs) (result) +--Testcase 454: +SELECT sum((fields->>'value1')::float),median((fields->>'value1')::float),count((fields->>'value1')::float) FROM s3; + +-- select median over join query (explain) +--Testcase 455: +EXPLAIN VERBOSE +SELECT median((t1.fields->>'value1')::float), median((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select median over join query (result, stub call error) +--Testcase 456: +SELECT median((t1.fields->>'value1')::float), median((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select median with having (explain) +--Testcase 457: +EXPLAIN VERBOSE +SELECT median((fields->>'value1')::float) FROM s3 HAVING median((fields->>'value1')::float) > 100; + +-- select median with having (explain, not pushdown, stub call error) +--Testcase 458: +SELECT median((fields->>'value1')::float) FROM s3 HAVING median((fields->>'value1')::float) > 100; + +-- select median(*) (stub agg function, explain) +--Testcase 459: +EXPLAIN VERBOSE +SELECT median_all(*) from s3; + +-- select median(*) (stub agg function, result) +--Testcase 460: +SELECT median_all(*) from s3; + +-- select median(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 461: +EXPLAIN VERBOSE +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select median(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 462: +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select median(*) (stub agg function and group by tag only) (explain) +--Testcase 463: +EXPLAIN VERBOSE +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select median(*) (stub agg function and group by tag only) (result) +--Testcase 464: +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select median(*) (stub agg function, expose data, explain) +--Testcase 465: +EXPLAIN VERBOSE +SELECT (median_all(*)::s3).* from s3; + +-- select median(*) (stub agg function, expose data, result) +--Testcase 466: +SELECT (median_all(*)::s3).* from s3; + +-- select median(regex) (stub agg function, explain) +--Testcase 467: +EXPLAIN VERBOSE +SELECT median('/^v.*/') from s3; + +-- select median(regex) (stub agg function, result) +--Testcase 468: +SELECT median('/^v.*/') from s3; + +-- select median(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 469: +EXPLAIN VERBOSE +SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select median(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 470: +SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select median(regex) (stub agg function and group by tag only) (explain) +--Testcase 471: +EXPLAIN VERBOSE +SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select median(regex) (stub agg function and group by tag only) (result) +--Testcase 472: +SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select median(regex) (stub agg function, expose data, explain) +--Testcase 473: +EXPLAIN VERBOSE +SELECT (median('/value[1,4]/')::s3).* from s3; + +-- select median(regex) (stub agg function, expose data, result) +--Testcase 474: +SELECT (median('/value[1,4]/')::s3).* from s3; + +-- select influx_mode (stub agg function, explain) +--Testcase 475: +EXPLAIN VERBOSE +SELECT influx_mode((fields->>'value1')::float),influx_mode((fields->>'value2')::bigint),influx_mode((fields->>'value3')::float),influx_mode((fields->>'value4')::bigint) FROM s3; + +-- select influx_mode (stub agg function, result) +--Testcase 476: +SELECT influx_mode((fields->>'value1')::float),influx_mode((fields->>'value2')::bigint),influx_mode((fields->>'value3')::float),influx_mode((fields->>'value4')::bigint) FROM s3; + +-- select influx_mode (stub agg function, raise exception if not expected type) +--Testcase 477: +SELECT influx_mode((fields->>'value1')::numeric),influx_mode((fields->>'value2')::numeric),influx_mode((fields->>'value3')::numeric),influx_mode((fields->>'value4')::numeric) FROM s3; + +-- select influx_mode (stub agg function and group by influx_time() and tag) (explain) +--Testcase 478: +EXPLAIN VERBOSE +SELECT influx_mode((fields->>'value1')::numeric),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_mode (stub agg function and group by influx_time() and tag) (result) +--Testcase 479: +SELECT influx_mode((fields->>'value1')::numeric),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_mode (stub agg function and group by tag only) (result) +--Testcase 480: +SELECT tags->>'tag1' tag1,influx_mode((fields->>'value1')::numeric) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_mode (stub agg function and other aggs) (result) +--Testcase 481: +SELECT sum((fields->>'value1')::float),influx_mode((fields->>'value1')::numeric),count((fields->>'value1')::float) FROM s3; + +-- select influx_mode over join query (explain) +--Testcase 482: +EXPLAIN VERBOSE +SELECT influx_mode((t1.fields->>'value1')::float), influx_mode((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select influx_mode over join query (result, stub call error) +--Testcase 483: +SELECT influx_mode((t1.fields->>'value1')::float), influx_mode((t2.fields->>'value1')::float) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select influx_mode with having (explain) +--Testcase 484: +EXPLAIN VERBOSE +SELECT influx_mode((fields->>'value1')::float) FROM s3 HAVING influx_mode((fields->>'value1')::float) > 100; + +-- select influx_mode with having (explain, not pushdown, stub call error) +--Testcase 485: +SELECT influx_mode((fields->>'value1')::float) FROM s3 HAVING influx_mode((fields->>'value1')::float) > 100; + +-- select influx_mode(*) (stub agg function, explain) +--Testcase 486: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) from s3; + +-- select influx_mode(*) (stub agg function, result) +--Testcase 487: +SELECT influx_mode_all(*) from s3; + +-- select influx_mode(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 488: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_mode(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 489: +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_mode(*) (stub agg function and group by tag only) (explain) +--Testcase 490: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_mode(*) (stub agg function and group by tag only) (result) +--Testcase 491: +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_mode(*) (stub agg function, expose data, explain) +--Testcase 492: +EXPLAIN VERBOSE +SELECT (influx_mode_all(*)::s3).* from s3; + +-- select influx_mode(*) (stub agg function, expose data, result) +--Testcase 493: +SELECT (influx_mode_all(*)::s3).* from s3; + +-- select influx_mode(regex) (stub function, explain) +--Testcase 494: +EXPLAIN VERBOSE +SELECT influx_mode('/value[1,4]/') from s3; + +-- select influx_mode(regex) (stub function, result) +--Testcase 495: +SELECT influx_mode('/value[1,4]/') from s3; + +-- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 496: +EXPLAIN VERBOSE +SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 497: +SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_mode(regex) (stub agg function and group by tag only) (explain) +--Testcase 498: +EXPLAIN VERBOSE +SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_mode(regex) (stub agg function and group by tag only) (result) +--Testcase 499: +SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_mode(regex) (stub agg function, expose data, explain) +--Testcase 500: +EXPLAIN VERBOSE +SELECT (influx_mode('/value[1,4]/')::s3).* from s3; + +-- select influx_mode(regex) (stub agg function, expose data, result) +--Testcase 501: +SELECT (influx_mode('/value[1,4]/')::s3).* from s3; + +-- select stddev (agg function, explain) +--Testcase 502: +EXPLAIN VERBOSE +SELECT stddev((fields->>'value1')::float),stddev((fields->>'value2')::bigint),stddev((fields->>'value3')::float),stddev((fields->>'value4')::bigint) FROM s3; + +-- select stddev (agg function, result) +--Testcase 503: +SELECT stddev((fields->>'value1')::float),stddev((fields->>'value2')::bigint),stddev((fields->>'value3')::float),stddev((fields->>'value4')::bigint) FROM s3; + +-- select stddev (agg function and group by influx_time() and tag) (explain) +--Testcase 504: +EXPLAIN VERBOSE +SELECT stddev((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select stddev (agg function and group by influx_time() and tag) (result) +--Testcase 505: +SELECT stddev((fields->>'value1')::float),influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select stddev (agg function and group by tag only) (result) +--Testcase 506: +SELECT tags->>'tag1' tag1,stddev((fields->>'value1')::float) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select stddev (agg function and other aggs) (result) +--Testcase 507: +SELECT sum((fields->>'value1')::float),stddev((fields->>'value1')::float),count(fields->>'value1') FROM s3; + +-- select stddev(*) (stub agg function, explain) +--Testcase 508: +EXPLAIN VERBOSE +SELECT stddev_all(*) from s3; + +-- select stddev(*) (stub agg function, result) +--Testcase 509: +SELECT stddev_all(*) from s3; + +-- select stddev(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 510: +EXPLAIN VERBOSE +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select stddev(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 511: +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select stddev(*) (stub agg function and group by tag only) (explain) +--Testcase 512: +EXPLAIN VERBOSE +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select stddev(*) (stub agg function and group by tag only) (result) +--Testcase 513: +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select stddev(regex) (stub function, explain) +--Testcase 514: +EXPLAIN VERBOSE +SELECT stddev('/value[1,4]/') from s3; + +-- select stddev(regex) (stub function, result) +--Testcase 515: +SELECT stddev('/value[1,4]/') from s3; + +-- select stddev(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 516: +EXPLAIN VERBOSE +SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select stddev(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 517: +SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select stddev(regex) (stub agg function and group by tag only) (explain) +--Testcase 518: +EXPLAIN VERBOSE +SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select stddev(regex) (stub agg function and group by tag only) (result) +--Testcase 519: +SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_sum(*) (stub agg function, explain) +--Testcase 520: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) from s3; + +-- select influx_sum(*) (stub agg function, result) +--Testcase 521: +SELECT influx_sum_all(*) from s3; + +-- select influx_sum(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 522: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_sum(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 523: +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_sum(*) (stub agg function and group by tag only) (explain) +--Testcase 524: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_sum(*) (stub agg function and group by tag only) (result) +--Testcase 525: +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_sum(*) (stub agg function, expose data, explain) +--Testcase 526: +EXPLAIN VERBOSE +SELECT (influx_sum_all(*)::s3).* from s3; + +-- select influx_sum(*) (stub agg function, expose data, result) +--Testcase 527: +SELECT (influx_sum_all(*)::s3).* from s3; + +-- select influx_sum(regex) (stub function, explain) +--Testcase 528: +EXPLAIN VERBOSE +SELECT influx_sum('/value[1,4]/') from s3; + +-- select influx_sum(regex) (stub function, result) +--Testcase 529: +SELECT influx_sum('/value[1,4]/') from s3; + +-- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 530: +EXPLAIN VERBOSE +SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 531: +SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_sum(regex) (stub agg function and group by tag only) (explain) +--Testcase 532: +EXPLAIN VERBOSE +SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_sum(regex) (stub agg function and group by tag only) (result) +--Testcase 533: +SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_sum(regex) (stub agg function, expose data, explain) +--Testcase 534: +EXPLAIN VERBOSE +SELECT (influx_sum('/value[1,4]/')::s3).* from s3; + +-- select influx_sum(regex) (stub agg function, expose data, result) +--Testcase 535: +SELECT (influx_sum('/value[1,4]/')::s3).* from s3; + +-- selector function bottom() (explain) +--Testcase 536: +EXPLAIN VERBOSE +SELECT bottom((fields->>'value1')::float, 1) FROM s3; + +-- selector function bottom() (result) +--Testcase 537: +SELECT bottom((fields->>'value1')::float, 1) FROM s3; + +-- selector function bottom() cannot be combined with other functions(explain) +--Testcase 538: +EXPLAIN VERBOSE +SELECT bottom((fields->>'value1')::float, 1), bottom((fields->>'value2')::bigint, 1), bottom((fields->>'value3')::float, 1), bottom((fields->>'value4')::bigint, 1) FROM s3; + +-- selector function bottom() cannot be combined with other functions(result) +--Testcase 539: +SELECT bottom((fields->>'value1')::float, 1), bottom((fields->>'value2')::bigint, 1), bottom((fields->>'value3')::float, 1), bottom((fields->>'value4')::bigint, 1) FROM s3; + +-- select influx_max(*) (stub agg function, explain) +--Testcase 540: +EXPLAIN VERBOSE +SELECT influx_max_all(*) from s3; + +-- select influx_max(*) (stub agg function, result) +--Testcase 541: +SELECT influx_max_all(*) from s3; + +-- select influx_max(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 542: +EXPLAIN VERBOSE +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_max(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 543: +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_max(*) (stub agg function and group by tag only) (explain) +--Testcase 544: +EXPLAIN VERBOSE +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_max(*) (stub agg function and group by tag only) (result) +--Testcase 545: +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_max(*) (stub agg function, expose data, explain) +--Testcase 546: +EXPLAIN VERBOSE +SELECT (influx_max_all(*)::s3).* from s3; + +-- select influx_max(*) (stub agg function, expose data, result) +--Testcase 547: +SELECT (influx_max_all(*)::s3).* from s3; + +-- select influx_max(regex) (stub function, explain) +--Testcase 548: +EXPLAIN VERBOSE +SELECT influx_max('/value[1,4]/') from s3; + +-- select influx_max(regex) (stub function, result) +--Testcase 549: +SELECT influx_max('/value[1,4]/') from s3; + +-- select influx_max(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 550: +EXPLAIN VERBOSE +SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_max(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 551: +SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_max(regex) (stub agg function and group by tag only) (explain) +--Testcase 552: +EXPLAIN VERBOSE +SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_max(regex) (stub agg function and group by tag only) (result) +--Testcase 553: +SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_max(regex) (stub agg function, expose data, explain) +--Testcase 554: +EXPLAIN VERBOSE +SELECT (influx_max('/value[1,4]/')::s3).* from s3; + +-- select influx_max(regex) (stub agg function, expose data, result) +--Testcase 555: +SELECT (influx_max('/value[1,4]/')::s3).* from s3; + +-- select influx_min(*) (stub agg function, explain) +--Testcase 556: +EXPLAIN VERBOSE +SELECT influx_min_all(*) from s3; + +-- select influx_min(*) (stub agg function, result) +--Testcase 557: +SELECT influx_min_all(*) from s3; + +-- select influx_min(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 558: +EXPLAIN VERBOSE +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_min(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 559: +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_min(*) (stub agg function and group by tag only) (explain) +--Testcase 560: +EXPLAIN VERBOSE +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_min(*) (stub agg function and group by tag only) (result) +--Testcase 561: +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_min(*) (stub agg function, expose data, explain) +--Testcase 562: +EXPLAIN VERBOSE +SELECT (influx_min_all(*)::s3).* from s3; + +-- select influx_min(*) (stub agg function, expose data, result) +--Testcase 563: +SELECT (influx_min_all(*)::s3).* from s3; + +-- select influx_min(regex) (stub function, explain) +--Testcase 564: +EXPLAIN VERBOSE +SELECT influx_min('/value[1,4]/') from s3; + +-- select influx_min(regex) (stub function, result) +--Testcase 565: +SELECT influx_min('/value[1,4]/') from s3; + +-- select influx_min(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 566: +EXPLAIN VERBOSE +SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_min(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 567: +SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select influx_min(regex) (stub agg function and group by tag only) (explain) +--Testcase 568: +EXPLAIN VERBOSE +SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_min(regex) (stub agg function and group by tag only) (result) +--Testcase 569: +SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select influx_min(regex) (stub agg function, expose data, explain) +--Testcase 570: +EXPLAIN VERBOSE +SELECT (influx_min('/value[1,4]/')::s3).* from s3; + +-- select influx_min(regex) (stub agg function, expose data, result) +--Testcase 571: +SELECT (influx_min('/value[1,4]/')::s3).* from s3; + +-- selector function percentile() (explain) +--Testcase 572: +EXPLAIN VERBOSE +SELECT percentile((fields->>'value1')::float, 50), percentile((fields->>'value2')::bigint, 60), percentile((fields->>'value3')::float, 25), percentile((fields->>'value4')::bigint, 33) FROM s3; + +-- selector function percentile() (result) +--Testcase 573: +SELECT percentile((fields->>'value1')::float, 50), percentile((fields->>'value2')::bigint, 60), percentile((fields->>'value3')::float, 25), percentile((fields->>'value4')::bigint, 33) FROM s3; + +-- selector function percentile() (explain) +--Testcase 574: +EXPLAIN VERBOSE +SELECT percentile((fields->>'value1')::float, 1.5), percentile((fields->>'value2')::bigint, 6.7), percentile((fields->>'value3')::float, 20.5), percentile((fields->>'value4')::bigint, 75.2) FROM s3; + +-- selector function percentile() (result) +--Testcase 575: +SELECT percentile((fields->>'value1')::float, 1.5), percentile((fields->>'value2')::bigint, 6.7), percentile((fields->>'value3')::float, 20.5), percentile((fields->>'value4')::bigint, 75.2) FROM s3; + +-- select percentile(*, int) (stub agg function, explain) +--Testcase 576: +EXPLAIN VERBOSE +SELECT percentile_all(50) from s3; + +-- select percentile(*, int) (stub agg function, result) +--Testcase 577: +SELECT percentile_all(50) from s3; + +-- select percentile(*, float8) (stub agg function, explain) +--Testcase 578: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) from s3; + +-- select percentile(*, float8) (stub agg function, result) +--Testcase 579: +SELECT percentile_all(70.5) from s3; + +-- select percentile(*, int) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 580: +EXPLAIN VERBOSE +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select percentile(*, int) (stub agg function and group by influx_time() and tag) (result) +--Testcase 581: +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 582: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (result) +--Testcase 583: +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select percentile(*, int) (stub agg function and group by tag only) (explain) +--Testcase 584: +EXPLAIN VERBOSE +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select percentile(*, int) (stub agg function and group by tag only) (result) +--Testcase 585: +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select percentile(*, float8) (stub agg function and group by tag only) (explain) +--Testcase 586: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select percentile(*, float8) (stub agg function and group by tag only) (result) +--Testcase 587: +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select percentile(*, int) (stub agg function, expose data, explain) +--Testcase 588: +EXPLAIN VERBOSE +SELECT (percentile_all(50)::s3).* from s3; + +-- select percentile(*, int) (stub agg function, expose data, result) +--Testcase 589: +SELECT (percentile_all(50)::s3).* from s3; + +-- select percentile(*, int) (stub agg function, expose data, explain) +--Testcase 590: +EXPLAIN VERBOSE +SELECT (percentile_all(70.5)::s3).* from s3; + +-- select percentile(*, int) (stub agg function, expose data, result) +--Testcase 591: +SELECT (percentile_all(70.5)::s3).* from s3; + +-- select percentile(regex) (stub function, explain) +--Testcase 592: +EXPLAIN VERBOSE +SELECT percentile('/value[1,4]/', 50) from s3; + +-- select percentile(regex) (stub function, result) +--Testcase 593: +SELECT percentile('/value[1,4]/', 50) from s3; + +-- select percentile(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 594: +EXPLAIN VERBOSE +SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select percentile(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 595: +SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select percentile(regex) (stub agg function and group by tag only) (explain) +--Testcase 596: +EXPLAIN VERBOSE +SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select percentile(regex) (stub agg function and group by tag only) (result) +--Testcase 597: +SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select percentile(regex) (stub agg function, expose data, explain) +--Testcase 598: +EXPLAIN VERBOSE +SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; + +-- select percentile(regex) (stub agg function, expose data, result) +--Testcase 599: +SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; + +-- select percentile(regex) (stub agg function, expose data, explain) +--Testcase 600: +EXPLAIN VERBOSE +SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; + +-- select percentile(regex) (stub agg function, expose data, result) +--Testcase 601: +SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; + +-- selector function top(field_key,N) (explain) +--Testcase 602: +EXPLAIN VERBOSE +SELECT top((fields->>'value1')::float, 1) FROM s3; + +-- selector function top(field_key,N) (result) +--Testcase 603: +SELECT top((fields->>'value1')::float, 1) FROM s3; + +-- selector function top(field_key,tag_key(s),N) (explain) +--Testcase 604: +EXPLAIN VERBOSE +SELECT top((fields->>'value1')::float, tags->>'tag1', 1) FROM s3; + +-- selector function top(field_key,tag_key(s),N) (result) +--Testcase 605: +SELECT top((fields->>'value1')::float, tags->>'tag1', 1) FROM s3; + +-- selector function top() cannot be combined with other functions(explain) +--Testcase 606: +EXPLAIN VERBOSE +SELECT top((fields->>'value1')::float, 1), top((fields->>'value2')::bigint, 1), top((fields->>'value3')::float, 1), top((fields->>'value4')::bigint, 1) FROM s3; + +-- selector function top() cannot be combined with other functions(result) +--Testcase 607: +SELECT top((fields->>'value1')::float, 1), top((fields->>'value2')::bigint, 1), top((fields->>'value3')::float, 1), top((fields->>'value4')::bigint, 1) FROM s3; + +-- select acos (builtin function, explain) +--Testcase 608: +EXPLAIN VERBOSE +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3; + +-- select acos (builtin function, result) +--Testcase 609: +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3; + +-- select acos (builtin function, not pushdown constraints, explain) +--Testcase 610: +EXPLAIN VERBOSE +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; + +-- select acos (builtin function, not pushdown constraints, result) +--Testcase 611: +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; + +-- select acos (builtin function, pushdown constraints, explain) +--Testcase 612: +EXPLAIN VERBOSE +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select acos (builtin function, pushdown constraints, result) +--Testcase 613: +SELECT acos((fields->>'value1')::float), acos((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select acos as nest function with agg (pushdown, explain) +--Testcase 614: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float), acos(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select acos as nest function with agg (pushdown, result) +--Testcase 615: +SELECT sum((fields->>'value3')::float), acos(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select acos as nest with log2 (pushdown, explain) +--Testcase 616: +EXPLAIN VERBOSE +SELECT acos(log2((fields->>'value1')::float)),acos(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select acos as nest with log2 (pushdown, result) +--Testcase 617: +SELECT acos(log2((fields->>'value1')::float)),acos(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select acos with non pushdown func and explicit constant (explain) +--Testcase 618: +EXPLAIN VERBOSE +SELECT acos((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select acos with non pushdown func and explicit constant (result) +--Testcase 619: +SELECT acos((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select acos with order by (explain) +--Testcase 620: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY acos(1-(fields->>'value1')::float); + +-- select acos with order by (result) +--Testcase 621: +SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY acos(1-(fields->>'value1')::float); + +-- select acos with order by index (result) +--Testcase 622: +SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 2,1; + +-- select acos with order by index (result) +--Testcase 623: +SELECT (fields->>'value1')::float value1, acos(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 1,2; + +-- select acos and as +--Testcase 624: +SELECT acos((fields->>'value3')::float) as acos1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select acos(*) (stub agg function, explain) +--Testcase 625: +EXPLAIN VERBOSE +SELECT acos_all() from s3; + +-- select acos(*) (stub agg function, result) +--Testcase 626: +SELECT acos_all() from s3; + +-- select acos(*) (stub agg function and group by tag only) (explain) +--Testcase 627: +EXPLAIN VERBOSE +SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select acos(*) (stub agg function and group by tag only) (result) +--Testcase 628: +SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select acos(*) (stub agg function, expose data, explain) +--Testcase 629: +EXPLAIN VERBOSE +SELECT (acos_all()::s3).* from s3; + +-- select acos(*) (stub agg function, expose data, result) +--Testcase 630: +SELECT (acos_all()::s3).* from s3; + +-- select asin (builtin function, explain) +--Testcase 631: +EXPLAIN VERBOSE +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3; + +-- select asin (builtin function, result) +--Testcase 632: +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3; + +-- select asin (builtin function, not pushdown constraints, explain) +--Testcase 633: +EXPLAIN VERBOSE +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; + +-- select asin (builtin function, not pushdown constraints, result) +--Testcase 634: +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) = '64'; + +-- select asin (builtin function, pushdown constraints, explain) +--Testcase 635: +EXPLAIN VERBOSE +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select asin (builtin function, pushdown constraints, result) +--Testcase 636: +SELECT asin((fields->>'value1')::float), asin((fields->>'value3')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select asin as nest function with agg (pushdown, explain) +--Testcase 637: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float), asin(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select asin as nest function with agg (pushdown, result) +--Testcase 638: +SELECT sum((fields->>'value3')::float), asin(sum((fields->>'value3')::float)) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select asin as nest with log2 (pushdown, explain) +--Testcase 639: +EXPLAIN VERBOSE +SELECT asin(log2((fields->>'value1')::float)),asin(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select asin as nest with log2 (pushdown, result) +--Testcase 640: +SELECT asin(log2((fields->>'value1')::float)),asin(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select asin with non pushdown func and explicit constant (explain) +--Testcase 641: +EXPLAIN VERBOSE +SELECT asin((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select asin with non pushdown func and explicit constant (result) +--Testcase 642: +SELECT asin((fields->>'value3')::float), pi(), 4.1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select asin with order by (explain) +--Testcase 643: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY asin(1-(fields->>'value1')::float); + +-- select asin with order by (result) +--Testcase 644: +SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY asin(1-(fields->>'value1')::float); + +-- select asin with order by index (result) +--Testcase 645: +SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 2,1; + +-- select asin with order by index (result) +--Testcase 646: +SELECT (fields->>'value1')::float value1, asin(1-(fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200 ORDER BY 1,2; + +-- select asin and as +--Testcase 647: +SELECT asin((fields->>'value3')::float) as asin1 FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select asin(*) (stub agg function, explain) +--Testcase 648: +EXPLAIN VERBOSE +SELECT asin_all() from s3; + +-- select asin(*) (stub agg function, result) +--Testcase 649: +SELECT asin_all() from s3; + +-- select asin(*) (stub agg function and group by tag only) (explain) +--Testcase 650: +EXPLAIN VERBOSE +SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select asin(*) (stub agg function and group by tag only) (result) +--Testcase 651: +SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select asin(*) (stub agg function, expose data, explain) +--Testcase 652: +EXPLAIN VERBOSE +SELECT (asin_all()::s3).* from s3; + +-- select asin(*) (stub agg function, expose data, result) +--Testcase 653: +SELECT (asin_all()::s3).* from s3; + +-- select atan (builtin function, explain) +--Testcase 654: +EXPLAIN VERBOSE +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3; + +-- select atan (builtin function, result) +--Testcase 655: +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3; + +-- select atan (builtin function, not pushdown constraints, explain) +--Testcase 656: +EXPLAIN VERBOSE +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select atan (builtin function, not pushdown constraints, result) +--Testcase 657: +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select atan (builtin function, pushdown constraints, explain) +--Testcase 658: +EXPLAIN VERBOSE +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select atan (builtin function, pushdown constraints, result) +--Testcase 659: +SELECT atan((fields->>'value1')::float), atan((fields->>'value2')::bigint), atan((fields->>'value3')::float), atan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select atan as nest function with agg (pushdown, explain) +--Testcase 660: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),atan(sum((fields->>'value3')::float)) FROM s3; + +-- select atan as nest function with agg (pushdown, result) +--Testcase 661: +SELECT sum((fields->>'value3')::float),atan(sum((fields->>'value3')::float)) FROM s3; + +-- select atan as nest with log2 (pushdown, explain) +--Testcase 662: +EXPLAIN VERBOSE +SELECT atan(log2((fields->>'value1')::float)),atan(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select atan as nest with log2 (pushdown, result) +--Testcase 663: +SELECT atan(log2((fields->>'value1')::float)),atan(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select atan with non pushdown func and explicit constant (explain) +--Testcase 664: +EXPLAIN VERBOSE +SELECT atan((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select atan with non pushdown func and explicit constant (result) +--Testcase 665: +SELECT atan((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select atan with order by (explain) +--Testcase 666: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by atan(1-(fields->>'value1')::float); + +-- select atan with order by (result) +--Testcase 667: +SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by atan(1-(fields->>'value1')::float); + +-- select atan with order by index (result) +--Testcase 668: +SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by 2,1; + +-- select atan with order by index (result) +--Testcase 669: +SELECT (fields->>'value1')::float value1, atan(1-(fields->>'value1')::float) FROM s3 order by 1,2; + +-- select atan and as +--Testcase 670: +SELECT atan((fields->>'value3')::float) as atan1 FROM s3; + +-- select atan(*) (stub agg function, explain) +--Testcase 671: +EXPLAIN VERBOSE +SELECT atan_all() from s3; + +-- select atan(*) (stub agg function, result) +--Testcase 672: +SELECT atan_all() from s3; + +-- select atan(*) (stub agg function and group by tag only) (explain) +--Testcase 673: +EXPLAIN VERBOSE +SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select atan(*) (stub agg function and group by tag only) (result) +--Testcase 674: +SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select atan(*) (stub agg function, expose data, explain) +--Testcase 675: +EXPLAIN VERBOSE +SELECT (atan_all()::s3).* from s3; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 676: +SELECT asin_all(), acos_all(), atan_all() FROM s3; + +-- select atan2 (builtin function, explain) +--Testcase 677: +EXPLAIN VERBOSE +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3; + +-- select atan2 (builtin function, result) +--Testcase 678: +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3; + +-- select atan2 (builtin function, not pushdown constraints, explain) +--Testcase 679: +EXPLAIN VERBOSE +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select atan2 (builtin function, not pushdown constraints, result) +--Testcase 680: +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select atan2 (builtin function, pushdown constraints, explain) +--Testcase 681: +EXPLAIN VERBOSE +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select atan2 (builtin function, pushdown constraints, result) +--Testcase 682: +SELECT atan2((fields->>'value1')::float, (fields->>'value2')::bigint), atan2((fields->>'value2')::bigint, (fields->>'value3')::float), atan2((fields->>'value3')::float, (fields->>'value4')::bigint), atan2((fields->>'value4')::bigint, (fields->>'value1')::float) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select atan2 as nest function with agg (pushdown, explain) +--Testcase 683: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float), sum((fields->>'value4')::bigint),atan2(sum((fields->>'value3')::float), sum((fields->>'value3')::float)) FROM s3; + +-- select atan2 as nest function with agg (pushdown, result) +--Testcase 684: +SELECT sum((fields->>'value3')::float), sum((fields->>'value4')::bigint),atan2(sum((fields->>'value3')::float), sum((fields->>'value3')::float)) FROM s3; + +-- select atan2 as nest with log2 (pushdown, explain) +--Testcase 685: +EXPLAIN VERBOSE +SELECT atan2(log2((fields->>'value1')::float), log2((fields->>'value1')::float)),atan2(log2(1/(fields->>'value1')::float), log2(1/(fields->>'value1')::float)) FROM s3; + +-- select atan2 as nest with log2 (pushdown, result) +--Testcase 686: +SELECT atan2(log2((fields->>'value1')::float), log2((fields->>'value1')::float)),atan2(log2(1/(fields->>'value1')::float), log2(1/(fields->>'value1')::float)) FROM s3; + +-- select atan2 with non pushdown func and explicit constant (explain) +--Testcase 687: +EXPLAIN VERBOSE +SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint), pi(), 4.1 FROM s3; + +-- select atan2 with non pushdown func and explicit constant (result) +--Testcase 688: +SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint), pi(), 4.1 FROM s3; + +-- select atan2 with order by (explain) +--Testcase 689: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint); + +-- select atan2 with order by (result) +--Testcase 690: +SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint); + +-- select atan2 with order by index (result) +--Testcase 691: +SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by 2,1; + +-- select atan2 with order by index (result) +--Testcase 692: +SELECT (fields->>'value1')::float value1, atan2(1-(fields->>'value1')::float, 1-(fields->>'value2')::bigint) FROM s3 order by 1,2; + +-- select atan2 and as +--Testcase 693: +SELECT atan2((fields->>'value3')::float, (fields->>'value4')::bigint) as atan21 FROM s3; + +-- select atan2(*) (stub function, explain) +--Testcase 694: +EXPLAIN VERBOSE +SELECT atan2_all((fields->>'value1')::float) from s3; + +-- select atan2(*) (stub function, result) +--Testcase 695: +SELECT atan2_all((fields->>'value1')::float) from s3; + +-- select ceil (builtin function, explain) +--Testcase 696: +EXPLAIN VERBOSE +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3; + +-- select ceil (builtin function, result) +--Testcase 697: +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3; + +-- select ceil (builtin function, not pushdown constraints, explain) +--Testcase 698: +EXPLAIN VERBOSE +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select ceil (builtin function, not pushdown constraints, result) +--Testcase 699: +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select ceil (builtin function, pushdown constraints, explain) +--Testcase 700: +EXPLAIN VERBOSE +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select ceil (builtin function, pushdown constraints, result) +--Testcase 701: +SELECT ceil((fields->>'value1')::float), ceil((fields->>'value2')::bigint), ceil((fields->>'value3')::float), ceil((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select ceil as nest function with agg (pushdown, explain) +--Testcase 702: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),ceil(sum((fields->>'value3')::float)) FROM s3; + +-- select ceil as nest function with agg (pushdown, result) +--Testcase 703: +SELECT sum((fields->>'value3')::float),ceil(sum((fields->>'value3')::float)) FROM s3; + +-- select ceil as nest with log2 (pushdown, explain) +--Testcase 704: +EXPLAIN VERBOSE +SELECT ceil(log2((fields->>'value1')::float)),ceil(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select ceil as nest with log2 (pushdown, result) +--Testcase 705: +SELECT ceil(log2((fields->>'value1')::float)),ceil(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select ceil with non pushdown func and explicit constant (explain) +--Testcase 706: +EXPLAIN VERBOSE +SELECT ceil((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select ceil with non pushdown func and explicit constant (result) +--Testcase 707: +SELECT ceil((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select ceil with order by (explain) +--Testcase 708: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by ceil(1-(fields->>'value1')::float); + +-- select ceil with order by (result) +--Testcase 709: +SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by ceil(1-(fields->>'value1')::float); + +-- select ceil with order by index (result) +--Testcase 710: +SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by 2,1; + +-- select ceil with order by index (result) +--Testcase 711: +SELECT (fields->>'value1')::float value1, ceil(1-(fields->>'value1')::float) FROM s3 order by 1,2; + +-- select ceil and as +--Testcase 712: +SELECT ceil((fields->>'value3')::float) as ceil1 FROM s3; + +-- select ceil(*) (stub agg function, explain) +--Testcase 713: +EXPLAIN VERBOSE +SELECT ceil_all() from s3; + +-- select ceil(*) (stub agg function, result) +--Testcase 714: +SELECT ceil_all() from s3; + +-- select ceil(*) (stub agg function and group by tag only) (explain) +--Testcase 715: +EXPLAIN VERBOSE +SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select ceil(*) (stub agg function and group by tag only) (result) +--Testcase 716: +SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select ceil(*) (stub agg function, expose data, explain) +--Testcase 717: +EXPLAIN VERBOSE +SELECT (ceil_all()::s3).* from s3; + +-- select ceil(*) (stub agg function, expose data, result) +--Testcase 718: +SELECT (ceil_all()::s3).* from s3; + +-- select cos (builtin function, explain) +--Testcase 719: +EXPLAIN VERBOSE +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3; + +-- select cos (builtin function, result) +--Testcase 720: +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3; + +-- select cos (builtin function, not pushdown constraints, explain) +--Testcase 721: +EXPLAIN VERBOSE +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select cos (builtin function, not pushdown constraints, result) +--Testcase 722: +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select cos (builtin function, pushdown constraints, explain) +--Testcase 723: +EXPLAIN VERBOSE +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select cos (builtin function, pushdown constraints, result) +--Testcase 724: +SELECT cos((fields->>'value1')::float), cos((fields->>'value2')::bigint), cos((fields->>'value3')::float), cos((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select cos as nest function with agg (pushdown, explain) +--Testcase 725: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),cos(sum((fields->>'value3')::float)) FROM s3; + +-- select cos as nest function with agg (pushdown, result) +--Testcase 726: +SELECT sum((fields->>'value3')::float),cos(sum((fields->>'value3')::float)) FROM s3; + +-- select cos as nest with log2 (pushdown, explain) +--Testcase 727: +EXPLAIN VERBOSE +SELECT cos(log2((fields->>'value1')::float)),cos(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select cos as nest with log2 (pushdown, result) +--Testcase 728: +SELECT cos(log2((fields->>'value1')::float)),cos(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select cos with non pushdown func and explicit constant (explain) +--Testcase 729: +EXPLAIN VERBOSE +SELECT cos((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select cos with non pushdown func and explicit constant (result) +--Testcase 730: +SELECT cos((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select cos with order by (explain) +--Testcase 731: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by cos(1-(fields->>'value1')::float); + +-- select cos with order by (result) +--Testcase 732: +SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by cos(1-(fields->>'value1')::float); + +-- select cos with order by index (result) +--Testcase 733: +SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by 2,1; + +-- select cos with order by index (result) +--Testcase 734: +SELECT (fields->>'value1')::float value1, cos(1-(fields->>'value1')::float) FROM s3 order by 1,2; + +-- select cos and as +--Testcase 735: +SELECT cos((fields->>'value3')::float) as cos1 FROM s3; + +-- select cos(*) (stub agg function, explain) +--Testcase 736: +EXPLAIN VERBOSE +SELECT cos_all() from s3; + +-- select cos(*) (stub agg function, result) +--Testcase 737: +SELECT cos_all() from s3; + +-- select cos(*) (stub agg function and group by tag only) (explain) +--Testcase 738: +EXPLAIN VERBOSE +SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select cos(*) (stub agg function and group by tag only) (result) +--Testcase 739: +SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select exp (builtin function, explain) +--Testcase 740: +EXPLAIN VERBOSE +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3; + +-- select exp (builtin function, result) +--Testcase 741: +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3; + +-- select exp (builtin function, not pushdown constraints, explain) +--Testcase 742: +EXPLAIN VERBOSE +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select exp (builtin function, not pushdown constraints, result) +--Testcase 743: +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select exp (builtin function, pushdown constraints, explain) +--Testcase 744: +EXPLAIN VERBOSE +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select exp (builtin function, pushdown constraints, result) +--Testcase 745: +SELECT exp((fields->>'value1')::float), exp((fields->>'value2')::bigint), exp((fields->>'value3')::float), exp((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select exp as nest function with agg (pushdown, explain) +--Testcase 746: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),exp(sum((fields->>'value3')::float)) FROM s3; + +-- select exp as nest function with agg (pushdown, result) +--Testcase 747: +SELECT sum((fields->>'value3')::float),exp(sum((fields->>'value3')::float)) FROM s3; + +-- select exp as nest with log2 (pushdown, explain) +--Testcase 748: +EXPLAIN VERBOSE +SELECT exp(log2((fields->>'value1')::float)),exp(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select exp as nest with log2 (pushdown, result) +--Testcase 749: +SELECT exp(log2((fields->>'value1')::float)),exp(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select exp with non pushdown func and explicit constant (explain) +--Testcase 750: +EXPLAIN VERBOSE +SELECT exp((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select exp with non pushdown func and explicit constant (result) +--Testcase 751: +SELECT exp((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select exp with order by (explain) +--Testcase 752: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by exp(1-(fields->>'value1')::float); + +-- select exp with order by (result) +--Testcase 753: +SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by exp(1-(fields->>'value1')::float); + +-- select exp with order by index (result) +--Testcase 754: +SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by 2,1; + +-- select exp with order by index (result) +--Testcase 755: +SELECT (fields->>'value1')::float value1, exp(1-(fields->>'value1')::float) FROM s3 order by 1,2; + +-- select exp and as +--Testcase 756: +SELECT exp((fields->>'value3')::float) as exp1 FROM s3; + +-- select exp(*) (stub agg function, explain) +--Testcase 757: +EXPLAIN VERBOSE +SELECT exp_all() from s3; + +-- select exp(*) (stub agg function, result) +--Testcase 758: +SELECT exp_all() from s3; + +-- select exp(*) (stub agg function and group by tag only) (explain) +--Testcase 759: +EXPLAIN VERBOSE +SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select exp(*) (stub agg function and group by tag only) (result) +--Testcase 760: +SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 761: +SELECT ceil_all(), cos_all(), exp_all() FROM s3; + +-- select floor (builtin function, explain) +--Testcase 762: +EXPLAIN VERBOSE +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3; + +-- select floor (builtin function, result) +--Testcase 763: +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3; + +-- select floor (builtin function, not pushdown constraints, explain) +--Testcase 764: +EXPLAIN VERBOSE +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select floor (builtin function, not pushdown constraints, result) +--Testcase 765: +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select floor (builtin function, pushdown constraints, explain) +--Testcase 766: +EXPLAIN VERBOSE +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select floor (builtin function, pushdown constraints, result) +--Testcase 767: +SELECT floor((fields->>'value1')::float), floor((fields->>'value2')::bigint), floor((fields->>'value3')::float), floor((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select floor as nest function with agg (pushdown, explain) +--Testcase 768: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),floor(sum((fields->>'value3')::float)) FROM s3; + +-- select floor as nest function with agg (pushdown, result) +--Testcase 769: +SELECT sum((fields->>'value3')::float),floor(sum((fields->>'value3')::float)) FROM s3; + +-- select floor as nest with log2 (pushdown, explain) +--Testcase 770: +EXPLAIN VERBOSE +SELECT floor(log2((fields->>'value1')::float)),floor(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select floor as nest with log2 (pushdown, result) +--Testcase 771: +SELECT floor(log2((fields->>'value1')::float)),floor(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select floor with non pushdown func and explicit constant (explain) +--Testcase 772: +EXPLAIN VERBOSE +SELECT floor((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select floor with non pushdown func and explicit constant (result) +--Testcase 773: +SELECT floor((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select floor with order by (explain) +--Testcase 774: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by floor(1-(fields->>'value1')::float); + +-- select floor with order by (result) +--Testcase 775: +SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by floor(1-(fields->>'value1')::float); + +-- select floor with order by index (result) +--Testcase 776: +SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by 2,1; + +-- select floor with order by index (result) +--Testcase 777: +SELECT (fields->>'value1')::float value1, floor(1-(fields->>'value1')::float) FROM s3 order by 1,2; + +-- select floor and as +--Testcase 778: +SELECT floor((fields->>'value3')::float) as floor1 FROM s3; + +-- select floor(*) (stub agg function, explain) +--Testcase 779: +EXPLAIN VERBOSE +SELECT floor_all() from s3; + +-- select floor(*) (stub agg function, result) +--Testcase 780: +SELECT floor_all() from s3; + +-- select floor(*) (stub agg function and group by tag only) (explain) +--Testcase 781: +EXPLAIN VERBOSE +SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select floor(*) (stub agg function and group by tag only) (result) +--Testcase 782: +SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select floor(*) (stub agg function, expose data, explain) +--Testcase 783: +EXPLAIN VERBOSE +SELECT (floor_all()::s3).* from s3; + +-- select floor(*) (stub agg function, expose data, result) +--Testcase 784: +SELECT (floor_all()::s3).* from s3; + +-- select ln (builtin function, explain) +--Testcase 785: +EXPLAIN VERBOSE +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3; + +-- select ln (builtin function, result) +--Testcase 786: +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3; + +-- select ln (builtin function, not pushdown constraints, explain) +--Testcase 787: +EXPLAIN VERBOSE +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select ln (builtin function, not pushdown constraints, result) +--Testcase 788: +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select ln (builtin function, pushdown constraints, explain) +--Testcase 789: +EXPLAIN VERBOSE +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select ln (builtin function, pushdown constraints, result) +--Testcase 790: +SELECT ln((fields->>'value1')::float), ln((fields->>'value2')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select ln as nest function with agg (pushdown, explain) +--Testcase 791: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),ln(sum((fields->>'value3')::float)) FROM s3; + +-- select ln as nest function with agg (pushdown, result) +--Testcase 792: +SELECT sum((fields->>'value3')::float),ln(sum((fields->>'value3')::float)) FROM s3; + +-- select ln as nest with log2 (pushdown, explain) +--Testcase 793: +EXPLAIN VERBOSE +SELECT ln(log2((fields->>'value1')::float)),ln(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select ln as nest with log2 (pushdown, result) +--Testcase 794: +SELECT ln(log2((fields->>'value1')::float)),ln(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select ln with non pushdown func and explicit constant (explain) +--Testcase 795: +EXPLAIN VERBOSE +SELECT ln((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select ln with non pushdown func and explicit constant (result) +--Testcase 796: +SELECT ln((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select ln with order by (explain) +--Testcase 797: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by ln(1-(fields->>'value1')::float); + +-- select ln with order by (result) +--Testcase 798: +SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by ln(1-(fields->>'value1')::float); + +-- select ln with order by index (result) +--Testcase 799: +SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by 2,1; + +-- select ln with order by index (result) +--Testcase 800: +SELECT (fields->>'value1')::float value1, ln(1-(fields->>'value1')::float) FROM s3 order by 1,2; + +-- select ln and as +--Testcase 801: +SELECT ln((fields->>'value1')::float) as ln1 FROM s3; + +-- select ln(*) (stub agg function, explain) +--Testcase 802: +EXPLAIN VERBOSE +SELECT ln_all() from s3; + +-- select ln(*) (stub agg function, result) +--Testcase 803: +SELECT ln_all() from s3; + +-- select ln(*) (stub agg function and group by tag only) (explain) +--Testcase 804: +EXPLAIN VERBOSE +SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select ln(*) (stub agg function and group by tag only) (result) +--Testcase 805: +SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 806: +SELECT ln_all(), floor_all() FROM s3; + +-- select pow (builtin function, explain) +--Testcase 807: +EXPLAIN VERBOSE +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3; + +-- select pow (builtin function, result) +--Testcase 808: +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3; + +-- select pow (builtin function, not pushdown constraints, explain) +--Testcase 809: +EXPLAIN VERBOSE +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select pow (builtin function, not pushdown constraints, result) +--Testcase 810: +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select pow (builtin function, pushdown constraints, explain) +--Testcase 811: +EXPLAIN VERBOSE +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select pow (builtin function, pushdown constraints, result) +--Testcase 812: +SELECT pow((fields->>'value1')::float, 2), pow((fields->>'value2')::bigint, 2), pow((fields->>'value3')::float, 2), pow((fields->>'value4')::bigint, 2) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select pow as nest function with agg (pushdown, explain) +--Testcase 813: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),pow(sum((fields->>'value3')::float), 2) FROM s3; + +-- select pow as nest function with agg (pushdown, result) +--Testcase 814: +SELECT sum((fields->>'value3')::float),pow(sum((fields->>'value3')::float), 2) FROM s3; + +-- select pow as nest with log2 (pushdown, explain) +--Testcase 815: +EXPLAIN VERBOSE +SELECT pow(log2((fields->>'value1')::float), 2),pow(log2(1/(fields->>'value1')::float), 2) FROM s3; + +-- select pow as nest with log2 (pushdown, result) +--Testcase 816: +SELECT pow(log2((fields->>'value1')::float), 2),pow(log2(1/(fields->>'value1')::float), 2) FROM s3; + +-- select pow with non pushdown func and explicit constant (explain) +--Testcase 817: +EXPLAIN VERBOSE +SELECT pow((fields->>'value3')::float, 2), pi(), 4.1 FROM s3; + +-- select pow with non pushdown func and explicit constant (result) +--Testcase 818: +SELECT pow((fields->>'value3')::float, 2), pi(), 4.1 FROM s3; + +-- select pow with order by (explain) +--Testcase 819: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by pow(1-(fields->>'value1')::float, 2); + +-- select pow with order by (result) +--Testcase 820: +SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by pow(1-(fields->>'value1')::float, 2); + +-- select pow with order by index (result) +--Testcase 821: +SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by 2,1; + +-- select pow with order by index (result) +--Testcase 822: +SELECT (fields->>'value1')::float value1, pow(1-(fields->>'value1')::float, 2) FROM s3 order by 1,2; + +-- select pow and as +--Testcase 823: +SELECT pow((fields->>'value3')::float, 2) as pow1 FROM s3; + +-- select pow_all(2) (stub agg function, explain) +--Testcase 824: +EXPLAIN VERBOSE +SELECT pow_all(2) from s3; + +-- select pow_all(2) (stub agg function, result) +--Testcase 825: +SELECT pow_all(2) from s3; + +-- select pow_all(2) (stub agg function and group by tag only) (explain) +--Testcase 826: +EXPLAIN VERBOSE +SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select pow_all(2) (stub agg function and group by tag only) (result) +--Testcase 827: +SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select pow_all(2) (stub agg function, expose data, explain) +--Testcase 828: +EXPLAIN VERBOSE +SELECT (pow_all(2)::s3).* from s3; + +-- select pow_all(2) (stub agg function, expose data, result) +--Testcase 829: +SELECT (pow_all(2)::s3).* from s3; + +-- select round (builtin function, explain) +--Testcase 830: +EXPLAIN VERBOSE +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3; + +-- select round (builtin function, result) +--Testcase 831: +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3; + +-- select round (builtin function, not pushdown constraints, explain) +--Testcase 832: +EXPLAIN VERBOSE +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select round (builtin function, not pushdown constraints, result) +--Testcase 833: +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select round (builtin function, pushdown constraints, explain) +--Testcase 834: +EXPLAIN VERBOSE +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select round (builtin function, pushdown constraints, result) +--Testcase 835: +SELECT round((fields->>'value1')::float), round((fields->>'value2')::bigint), round((fields->>'value3')::float), round((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select round as nest function with agg (pushdown, explain) +--Testcase 836: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),round(sum((fields->>'value3')::float)) FROM s3; + +-- select round as nest function with agg (pushdown, result) +--Testcase 837: +SELECT sum((fields->>'value3')::float),round(sum((fields->>'value3')::float)) FROM s3; + +-- select round as nest with log2 (pushdown, explain) +--Testcase 838: +EXPLAIN VERBOSE +SELECT round(log2((fields->>'value1')::float)),round(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select round as nest with log2 (pushdown, result) +--Testcase 839: +SELECT round(log2((fields->>'value1')::float)),round(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select round with non pushdown func and roundlicit constant (explain) +--Testcase 840: +EXPLAIN VERBOSE +SELECT round((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select round with non pushdown func and roundlicit constant (result) +--Testcase 841: +SELECT round((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select round with order by (explain) +--Testcase 842: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by round(1-(fields->>'value1')::float); + +-- select round with order by (result) +--Testcase 843: +SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by round(1-(fields->>'value1')::float); + +-- select round with order by index (result) +--Testcase 844: +SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by 2,1; + +-- select round with order by index (result) +--Testcase 845: +SELECT (fields->>'value1')::float value1, round(1-(fields->>'value1')::float) FROM s3 order by 1,2; + +-- select round and as +--Testcase 846: +SELECT round((fields->>'value3')::float) as round1 FROM s3; + +-- select round(*) (stub agg function, explain) +--Testcase 847: +EXPLAIN VERBOSE +SELECT round_all() from s3; + +-- select round(*) (stub agg function, result) +--Testcase 848: +SELECT round_all() from s3; + +-- select round(*) (stub agg function and group by tag only) (explain) +--Testcase 849: +EXPLAIN VERBOSE +SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select round(*) (stub agg function and group by tag only) (result) +--Testcase 850: +SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select round(*) (stub agg function, expose data, explain) +--Testcase 851: +EXPLAIN VERBOSE +SELECT (round_all()::s3).* from s3; + +-- select round(*) (stub agg function, expose data, result) +--Testcase 852: +SELECT (round_all()::s3).* from s3; + +-- select sin (builtin function, explain) +--Testcase 853: +EXPLAIN VERBOSE +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3; + +-- select sin (builtin function, result) +--Testcase 854: +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3; + +-- select sin (builtin function, not pushdown constraints, explain) +--Testcase 855: +EXPLAIN VERBOSE +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select sin (builtin function, not pushdown constraints, result) +--Testcase 856: +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select sin (builtin function, pushdown constraints, explain) +--Testcase 857: +EXPLAIN VERBOSE +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select sin (builtin function, pushdown constraints, result) +--Testcase 858: +SELECT sin((fields->>'value1')::float), sin((fields->>'value2')::bigint), sin((fields->>'value3')::float), sin((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select sin as nest function with agg (pushdown, explain) +--Testcase 859: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),sin(sum((fields->>'value3')::float)) FROM s3; + +-- select sin as nest function with agg (pushdown, result) +--Testcase 860: +SELECT sum((fields->>'value3')::float),sin(sum((fields->>'value3')::float)) FROM s3; + +-- select sin as nest with log2 (pushdown, explain) +--Testcase 861: +EXPLAIN VERBOSE +SELECT sin(log2((fields->>'value1')::float)),sin(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select sin as nest with log2 (pushdown, result) +--Testcase 862: +SELECT sin(log2((fields->>'value1')::float)),sin(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select sin with non pushdown func and explicit constant (explain) +--Testcase 863: +EXPLAIN VERBOSE +SELECT sin((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select sin with non pushdown func and explicit constant (result) +--Testcase 864: +SELECT sin((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select sin with order by (explain) +--Testcase 865: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by sin(1-(fields->>'value1')::float); + +-- select sin with order by (result) +--Testcase 866: +SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by sin(1-(fields->>'value1')::float); + +-- select sin with order by index (result) +--Testcase 867: +SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by 2,1; + +-- select sin with order by index (result) +--Testcase 868: +SELECT (fields->>'value1')::float value1, sin(1-(fields->>'value1')::float) FROM s3 order by 1,2; + +-- select sin and as +--Testcase 869: +SELECT sin((fields->>'value3')::float) as sin1 FROM s3; + +-- select sin(*) (stub agg function, explain) +--Testcase 870: +EXPLAIN VERBOSE +SELECT sin_all() from s3; + +-- select sin(*) (stub agg function, result) +--Testcase 871: +SELECT sin_all() from s3; + +-- select sin(*) (stub agg function and group by tag only) (explain) +--Testcase 872: +EXPLAIN VERBOSE +SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select sin(*) (stub agg function and group by tag only) (result) +--Testcase 873: +SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select tan (builtin function, explain) +--Testcase 874: +EXPLAIN VERBOSE +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3; + +-- select tan (builtin function, result) +--Testcase 875: +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3; + +-- select tan (builtin function, not pushdown constraints, explain) +--Testcase 876: +EXPLAIN VERBOSE +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select tan (builtin function, not pushdown constraints, result) +--Testcase 877: +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE to_hex((fields->>'value2')::bigint) != '64'; + +-- select tan (builtin function, pushdown constraints, explain) +--Testcase 878: +EXPLAIN VERBOSE +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select tan (builtin function, pushdown constraints, result) +--Testcase 879: +SELECT tan((fields->>'value1')::float), tan((fields->>'value2')::bigint), tan((fields->>'value3')::float), tan((fields->>'value4')::bigint) FROM s3 WHERE (fields->>'value2')::bigint != 200; + +-- select tan as nest function with agg (pushdown, explain) +--Testcase 880: +EXPLAIN VERBOSE +SELECT sum((fields->>'value3')::float),tan(sum((fields->>'value3')::float)) FROM s3; + +-- select tan as nest function with agg (pushdown, result) +--Testcase 881: +SELECT sum((fields->>'value3')::float),tan(sum((fields->>'value3')::float)) FROM s3; + +-- select tan as nest with log2 (pushdown, explain) +--Testcase 882: +EXPLAIN VERBOSE +SELECT tan(log2((fields->>'value1')::float)),tan(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select tan as nest with log2 (pushdown, result) +--Testcase 883: +SELECT tan(log2((fields->>'value1')::float)),tan(log2(1/(fields->>'value1')::float)) FROM s3; + +-- select tan with non pushdown func and tanlicit constant (explain) +--Testcase 884: +EXPLAIN VERBOSE +SELECT tan((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select tan with non pushdown func and tanlicit constant (result) +--Testcase 885: +SELECT tan((fields->>'value3')::float), pi(), 4.1 FROM s3; + +-- select tan with order by (explain) +--Testcase 886: +EXPLAIN VERBOSE +SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by tan(1-(fields->>'value1')::float); + +-- select tan with order by (result) +--Testcase 887: +SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by tan(1-(fields->>'value1')::float); + +-- select tan with order by index (result) +--Testcase 888: +SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by 2,1; + +-- select tan with order by index (result) +--Testcase 889: +SELECT (fields->>'value1')::float value1, tan(1-(fields->>'value1')::float) FROM s3 order by 1,2; + +-- select tan and as +--Testcase 890: +SELECT tan((fields->>'value3')::float) as tan1 FROM s3; + +-- select tan(*) (stub agg function, explain) +--Testcase 891: +EXPLAIN VERBOSE +SELECT tan_all() from s3; + +-- select tan(*) (stub agg function, result) +--Testcase 892: +SELECT tan_all() from s3; + +-- select tan(*) (stub agg function and group by tag only) (explain) +--Testcase 893: +EXPLAIN VERBOSE +SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select tan(*) (stub agg function and group by tag only) (result) +--Testcase 894: +SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 895: +SELECT sin_all(), round_all(), tan_all() FROM s3; + +-- select predictors function holt_winters() (explain) +--Testcase 896: +EXPLAIN VERBOSE +SELECT holt_winters(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + +-- select predictors function holt_winters() (result) +--Testcase 897: +SELECT holt_winters(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + +-- select predictors function holt_winters_with_fit() (explain) +--Testcase 898: +EXPLAIN VERBOSE +SELECT holt_winters_with_fit(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + +-- select predictors function holt_winters_with_fit() (result) +--Testcase 899: +SELECT holt_winters_with_fit(min((fields->>'value1')::float), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + +-- select count(*) function of InfluxDB (stub agg function, explain) +--Testcase 900: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3; + +-- select count(*) function of InfluxDB (stub agg function, result) +--Testcase 901: +SELECT influx_count_all(*) FROM s3; + +-- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (explain) +--Testcase 902: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (result) +--Testcase 903: +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select count(*) function of InfluxDB (stub agg function and group by tag only) (explain) +--Testcase 904: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select count(*) function of InfluxDB (stub agg function and group by tag only) (result) +--Testcase 905: +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select count(*) function of InfluxDB over join query (explain) +--Testcase 906: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select count(*) function of InfluxDB over join query (result, stub call error) +--Testcase 907: +SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select distinct (stub agg function, explain) +--Testcase 908: +EXPLAIN VERBOSE +SELECT influx_distinct((fields->>'value1')::float) FROM s3; + +-- select distinct (stub agg function, result) +--Testcase 909: +SELECT influx_distinct((fields->>'value1')::float) FROM s3; + +-- select distinct (stub agg function and group by influx_time() and tag) (explain) +--Testcase 910: +EXPLAIN VERBOSE +SELECT influx_distinct((fields->>'value1')::float), influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select distinct (stub agg function and group by influx_time() and tag) (result) +--Testcase 911: +SELECT influx_distinct((fields->>'value1')::float), influx_time(time, interval '1s'),tags->>'tag1' tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tags->>'tag1'; + +-- select distinct (stub agg function and group by tag only) (explain) +--Testcase 912: +EXPLAIN VERBOSE +SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select distinct (stub agg function and group by tag only) (result) +--Testcase 913: +SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tags->>'tag1'; + +-- select distinct over join query (explain) +--Testcase 914: +EXPLAIN VERBOSE +SELECT influx_distinct((t1.fields->>'value2')::bigint) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select distinct over join query (result, stub call error) +--Testcase 915: +SELECT influx_distinct((t1.fields->>'value2')::bigint) FROM s3 t1 INNER JOIN s3 t2 ON ((t1.fields->>'value1')::float = (t2.fields->>'value1')::float) where (t1.fields->>'value1')::float = 0.1; + +-- select distinct with having (explain) +--Testcase 916: +EXPLAIN VERBOSE +SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 HAVING influx_distinct((fields->>'value2')::bigint) > 100; + +-- select distinct with having (result, not pushdown, stub call error) +--Testcase 917: +SELECT influx_distinct((fields->>'value2')::bigint) FROM s3 HAVING influx_distinct((fields->>'value2')::bigint) > 100; + +--Testcase 918: +DROP FOREIGN TABLE s3; + +--Testcase 919: +CREATE FOREIGN TABLE b3(time timestamp with time zone, tags jsonb OPTIONS (tags 'true'), fields jsonb OPTIONS (fields 'true')) SERVER server1 OPTIONS(table 'b3', tags 'tag1', schemaless 'true'); + +-- bool type var in where clause (result) +--Testcase 920: +EXPLAIN VERBOSE +SELECT sqrt(abs((fields->>'value1')::float)) FROM b3 WHERE (fields->>'value3')::boolean != true ORDER BY 1; + +-- bool type var in where clause (result) +--Testcase 921: +SELECT sqrt(abs((fields->>'value1')::float)) FROM b3 WHERE (fields->>'value3')::boolean != true ORDER BY 1; + +--Testcase 922: +DROP FOREIGN TABLE b3; + +--Testcase 923: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 924: +DROP SERVER server1; +--Testcase 925: +DROP EXTENSION influxdb_fdw; diff --git a/sql/15.0/selectfunc.sql b/sql/15.0/selectfunc.sql new file mode 100644 index 0000000..36789fa --- /dev/null +++ b/sql/15.0/selectfunc.sql @@ -0,0 +1,4049 @@ +--Testcase 1: +SET datestyle=ISO; +--Testcase 2: +SET timezone='Japan'; + +\set ECHO none +\ir sql/parameters.conf +\set ECHO all + +--Testcase 3: +CREATE EXTENSION influxdb_fdw; +--Testcase 4: +CREATE SERVER server1 FOREIGN DATA WRAPPER influxdb_fdw OPTIONS +(dbname 'mydb2', :SERVER); +--Testcase 5: +CREATE USER MAPPING FOR CURRENT_USER SERVER server1 OPTIONS (:AUTHENTICATION); + +--IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO public OPTIONS(import_time_text 'false'); +--Testcase 6: +CREATE FOREIGN TABLE s3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 float8, value4 bigint) SERVER server1 OPTIONS(table 's3', tags 'tag1'); + +-- s3 (value1 as float8, value2 as bigint) +--Testcase 7: +\d s3; +--Testcase 8: +SELECT * FROM s3; + +-- select float8() (not pushdown, remove float8, explain) +--Testcase 9: +EXPLAIN VERBOSE +SELECT float8(value1), float8(value2), float8(value3), float8(value4) FROM s3; + +-- select float8() (not pushdown, remove float8, result) +--Testcase 10: +SELECT float8(value1), float8(value2), float8(value3), float8(value4) FROM s3; + +-- select sqrt (builtin function, explain) +--Testcase 11: +EXPLAIN VERBOSE +SELECT sqrt(value1), sqrt(value2) FROM s3; + +-- select sqrt (builtin function, result) +--Testcase 12: +SELECT sqrt(value1), sqrt(value2) FROM s3; + +-- select sqrt (builtin function, not pushdown constraints, explain) +--Testcase 13: +EXPLAIN VERBOSE +SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE to_hex(value2) != '64'; + +-- select sqrt (builtin function, not pushdown constraints, result) +--Testcase 14: +SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE to_hex(value2) != '64'; + +-- select sqrt (builtin function, pushdown constraints, explain) +--Testcase 15: +EXPLAIN VERBOSE +SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE value2 != 200; + +-- select sqrt (builtin function, pushdown constraints, result) +--Testcase 16: +SELECT sqrt(value1), sqrt(value2) FROM s3 WHERE value2 != 200; + +-- select sqrt(*) (stub agg function, explain) +--Testcase 17: +EXPLAIN VERBOSE +SELECT sqrt_all() from s3; + +-- select sqrt(*) (stub agg function, result) +--Testcase 18: +SELECT sqrt_all() from s3; + +-- select sqrt(*) (stub agg function and group by tag only) (explain) +--Testcase 19: +EXPLAIN VERBOSE +SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select sqrt(*) (stub agg function and group by tag only) (result) +--Testcase 20: +SELECT sqrt_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select abs (builtin function, explain) +--Testcase 21: +EXPLAIN VERBOSE +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3; + +-- ABS() returns negative values if integer (https://github.com/influxdata/influxdb/issues/10261) +-- select abs (builtin function, result) +--Testcase 22: +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3; + +-- select abs (builtin function, not pushdown constraints, explain) +--Testcase 23: +EXPLAIN VERBOSE +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select abs (builtin function, not pushdown constraints, result) +--Testcase 24: +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select abs (builtin function, pushdown constraints, explain) +--Testcase 25: +EXPLAIN VERBOSE +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE value2 != 200; + +-- select abs (builtin function, pushdown constraints, result) +--Testcase 26: +SELECT abs(value1), abs(value2), abs(value3), abs(value4) FROM s3 WHERE value2 != 200; + +-- select log (builtin function, need to swap arguments, numeric cast, explain) +-- log_(v) : postgresql (base, v), influxdb (v, base) +--Testcase 27: +EXPLAIN VERBOSE +SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; + +-- select log (builtin function, need to swap arguments, numeric cast, result) +--Testcase 28: +SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; + +-- select log (builtin function, need to swap arguments, float8, explain) +--Testcase 29: +EXPLAIN VERBOSE +SELECT log(value1::numeric, 0.1) FROM s3 WHERE value1 != 1; + +-- select log (builtin function, need to swap arguments, float8, result) +--Testcase 30: +SELECT log(value1::numeric, 0.1) FROM s3 WHERE value1 != 1; + +-- select log (builtin function, need to swap arguments, bigint, explain) +--Testcase 31: +EXPLAIN VERBOSE +SELECT log(value2::numeric, 3::numeric) FROM s3 WHERE value1 != 1; + +-- select log (builtin function, need to swap arguments, bigint, result) +--Testcase 32: +SELECT log(value2::numeric, 3::numeric) FROM s3 WHERE value1 != 1; + +-- select log (builtin function, need to swap arguments, mix type, explain) +--Testcase 33: +EXPLAIN VERBOSE +SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; + +-- select log (builtin function, need to swap arguments, mix type, result) +--Testcase 34: +SELECT log(value1::numeric, value2::numeric) FROM s3 WHERE value1 != 1; + +-- select log(*) (stub agg function, explain) +--Testcase 35: +EXPLAIN VERBOSE +SELECT log_all(50) FROM s3; + +-- select log(*) (stub agg function, result) +--Testcase 36: +SELECT log_all(50) FROM s3; + +-- select log(*) (stub agg function, explain) +--Testcase 37: +EXPLAIN VERBOSE +SELECT log_all(70.5) FROM s3; + +-- select log(*) (stub agg function, result) +--Testcase 38: +SELECT log_all(70.5) FROM s3; + +-- select log(*) (stub agg function and group by tag only) (explain) +--Testcase 39: +EXPLAIN VERBOSE +SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select log(*) (stub agg function and group by tag only) (result) +--Testcase 40: +SELECT log_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 41: +SELECT ln_all(),log10_all(),log_all(50) FROM s3; + +-- select log2 (stub function, explain) +--Testcase 42: +EXPLAIN VERBOSE +SELECT log2(value1),log2(value2) FROM s3; + +-- select log2 (stub function, result) +--Testcase 43: +SELECT log2(value1),log2(value2) FROM s3; + +-- select log2(*) (stub agg function, explain) +--Testcase 44: +EXPLAIN VERBOSE +SELECT log2_all() from s3; + +-- select log2(*) (stub agg function, result) +--Testcase 45: +SELECT log2_all() from s3; + +-- select log2(*) (stub agg function and group by tag only) (explain) +--Testcase 46: +EXPLAIN VERBOSE +SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select log2(*) (stub agg function and group by tag only) (result) +--Testcase 47: +SELECT log2_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select log10 (stub function, explain) +--Testcase 48: +EXPLAIN VERBOSE +SELECT log10(value1),log10(value2) FROM s3; + +-- select log10 (stub function, result) +--Testcase 49: +SELECT log10(value1),log10(value2) FROM s3; + +-- select log10(*) (stub agg function, explain) +--Testcase 50: +EXPLAIN VERBOSE +SELECT log10_all() from s3; + +-- select log10(*) (stub agg function, result) +--Testcase 51: +SELECT log10_all() from s3; + +-- select log10(*) (stub agg function and group by tag only) (explain) +--Testcase 52: +EXPLAIN VERBOSE +SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select log10(*) (stub agg function and group by tag only) (result) +--Testcase 53: +SELECT log10_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 54: +SELECT log2_all(), log10_all() FROM s3; + +-- select spread (stub agg function, explain) +--Testcase 55: +EXPLAIN VERBOSE +SELECT spread(value1),spread(value2),spread(value3),spread(value4) FROM s3; + +-- select spread (stub agg function, result) +--Testcase 56: +SELECT spread(value1),spread(value2),spread(value3),spread(value4) FROM s3; + +-- select spread (stub agg function, raise exception if not expected type) +--Testcase 57: +SELECT spread(value1::numeric),spread(value2::numeric),spread(value3::numeric),spread(value4::numeric) FROM s3; + +-- select abs as nest function with agg (pushdown, explain) +--Testcase 58: +EXPLAIN VERBOSE +SELECT sum(value3),abs(sum(value3)) FROM s3; + +-- select abs as nest function with agg (pushdown, result) +--Testcase 59: +SELECT sum(value3),abs(sum(value3)) FROM s3; + +-- select abs as nest with log2 (pushdown, explain) +--Testcase 60: +EXPLAIN VERBOSE +SELECT abs(log2(value1)),abs(log2(1/value1)) FROM s3; + +-- select abs as nest with log2 (pushdown, result) +--Testcase 61: +SELECT abs(log2(value1)),abs(log2(1/value1)) FROM s3; + +-- select abs with non pushdown func and explicit constant (explain) +--Testcase 62: +EXPLAIN VERBOSE +SELECT abs(value3), pi(), 4.1 FROM s3; + +-- select abs with non pushdown func and explicit constant (result) +--Testcase 63: +SELECT abs(value3), pi(), 4.1 FROM s3; + +-- select sqrt as nest function with agg and explicit constant (pushdown, explain) +--Testcase 64: +EXPLAIN VERBOSE +SELECT sqrt(count(value1)), pi(), 4.1 FROM s3; + +-- select sqrt as nest function with agg and explicit constant (pushdown, result) +--Testcase 65: +SELECT sqrt(count(value1)), pi(), 4.1 FROM s3; + +-- select sqrt as nest function with agg and explicit constant and tag (error, explain) +--Testcase 66: +EXPLAIN VERBOSE +SELECT sqrt(count(value1)), pi(), 4.1, tag1 FROM s3; + +-- select spread (stub agg function and group by influx_time() and tag) (explain) +--Testcase 67: +EXPLAIN VERBOSE +SELECT spread("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select spread (stub agg function and group by influx_time() and tag) (result) +--Testcase 68: +SELECT spread("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select spread (stub agg function and group by tag only) (result) +--Testcase 69: +SELECT tag1,spread("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select spread (stub agg function and other aggs) (result) +--Testcase 70: +SELECT sum("value1"),spread("value1"),count("value1") FROM s3; + +-- select abs with order by (explain) +--Testcase 71: +EXPLAIN VERBOSE +SELECT value1, abs(1-value1) FROM s3 order by abs(1-value1); + +-- select abs with order by (result) +--Testcase 72: +SELECT value1, abs(1-value1) FROM s3 order by abs(1-value1); + +-- select abs with order by index (result) +--Testcase 73: +SELECT value1, abs(1-value1) FROM s3 order by 2,1; + +-- select abs with order by index (result) +--Testcase 74: +SELECT value1, abs(1-value1) FROM s3 order by 1,2; + +-- select abs and as +--Testcase 75: +SELECT abs(value3) as abs1 FROM s3; + +-- select abs(*) (stub agg function, explain) +--Testcase 76: +EXPLAIN VERBOSE +SELECT abs_all() from s3; + +-- select abs(*) (stub agg function, result) +--Testcase 77: +SELECT abs_all() from s3; + +-- select abs(*) (stub agg function and group by tag only) (explain) +--Testcase 78: +EXPLAIN VERBOSE +SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select abs(*) (stub agg function and group by tag only) (result) +--Testcase 79: +SELECT abs_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select abs(*) (stub agg function, expose data, explain) +--Testcase 80: +EXPLAIN VERBOSE +SELECT (abs_all()::s3).* from s3; + +-- select abs(*) (stub agg function, expose data, result) +--Testcase 81: +SELECT (abs_all()::s3).* from s3; + +-- select spread over join query (explain) +--Testcase 82: +EXPLAIN VERBOSE +SELECT spread(t1.value1), spread(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select spread over join query (result, stub call error) +--Testcase 83: +SELECT spread(t1.value1), spread(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select spread with having (explain) +--Testcase 84: +EXPLAIN VERBOSE +SELECT spread(value1) FROM s3 HAVING spread(value1) > 100; + +-- select spread with having (result, not pushdown, stub call error) +--Testcase 85: +SELECT spread(value1) FROM s3 HAVING spread(value1) > 100; + +-- select spread(*) (stub agg function, explain) +--Testcase 86: +EXPLAIN VERBOSE +SELECT spread_all(*) from s3; + +-- select spread(*) (stub agg function, result) +--Testcase 87: +SELECT spread_all(*) from s3; + +-- select spread(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 88: +EXPLAIN VERBOSE +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select spread(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 89: +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select spread(*) (stub agg function and group by tag only) (explain) +--Testcase 90: +EXPLAIN VERBOSE +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select spread(*) (stub agg function and group by tag only) (result) +--Testcase 91: +SELECT spread_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select spread(*) (stub agg function, expose data, explain) +--Testcase 92: +EXPLAIN VERBOSE +SELECT (spread_all(*)::s3).* from s3; + +-- select spread(*) (stub agg function, expose data, result) +--Testcase 93: +SELECT (spread_all(*)::s3).* from s3; + +-- select spread(regex) (stub agg function, explain) +--Testcase 94: +EXPLAIN VERBOSE +SELECT spread('/value[1,4]/') from s3; + +-- select spread(regex) (stub agg function, result) +--Testcase 95: +SELECT spread('/value[1,4]/') from s3; + +-- select spread(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 96: +EXPLAIN VERBOSE +SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select spread(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 97: +SELECT spread('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select spread(regex) (stub agg function and group by tag only) (explain) +--Testcase 98: +EXPLAIN VERBOSE +SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select spread(regex) (stub agg function and group by tag only) (result) +--Testcase 99: +SELECT spread('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select spread(regex) (stub agg function, expose data, explain) +--Testcase 100: +EXPLAIN VERBOSE +SELECT (spread('/value[1,4]/')::s3).* from s3; + +-- select spread(regex) (stub agg function, expose data, result) +--Testcase 101: +SELECT (spread('/value[1,4]/')::s3).* from s3; + +-- select abs with arithmetic and tag in the middle (explain) +--Testcase 102: +EXPLAIN VERBOSE +SELECT abs(value1) + 1, value2, tag1, sqrt(value2) FROM s3; + +-- select abs with arithmetic and tag in the middle (result) +--Testcase 103: +SELECT abs(value1) + 1, value2, tag1, sqrt(value2) FROM s3; + +-- select with order by limit (explain) +--Testcase 104: +EXPLAIN VERBOSE +SELECT abs(value1), abs(value3), sqrt(value2) FROM s3 ORDER BY abs(value3) LIMIT 1; + +-- select with order by limit (result) +--Testcase 105: +SELECT abs(value1), abs(value3), sqrt(value2) FROM s3 ORDER BY abs(value3) LIMIT 1; + +-- select mixing with non pushdown func (all not pushdown, explain) +--Testcase 106: +EXPLAIN VERBOSE +SELECT abs(value1), sqrt(value2), upper(tag1) FROM s3; + +-- select mixing with non pushdown func (result) +--Testcase 107: +SELECT abs(value1), sqrt(value2), upper(tag1) FROM s3; + +-- nested function in where clause (explain) +--Testcase 108: +EXPLAIN VERBOSE +SELECT sqrt(abs(value3)),min(value1) FROM s3 GROUP BY value3 HAVING sqrt(abs(value3)) > 0 ORDER BY 1,2; + +-- nested function in where clause (result) +--Testcase 109: +SELECT sqrt(abs(value3)),min(value1) FROM s3 GROUP BY value3 HAVING sqrt(abs(value3)) > 0 ORDER BY 1,2; + +--Testcase 110: +EXPLAIN VERBOSE +SELECT first(time, value1), first(time, value2), first(time, value3), first(time, value4) FROM s3; + +--Testcase 111: +SELECT first(time, value1), first(time, value2), first(time, value3), first(time, value4) FROM s3; + +-- select first(*) (stub agg function, explain) +--Testcase 112: +EXPLAIN VERBOSE +SELECT first_all(*) from s3; + +-- select first(*) (stub agg function, result) +--Testcase 113: +SELECT first_all(*) from s3; + +-- select first(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 114: +EXPLAIN VERBOSE +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select first(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 115: +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select first(*) (stub agg function and group by tag only) (explain) +--Testcase 116: +EXPLAIN VERBOSE +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select first(*) (stub agg function and group by tag only) (result) +--Testcase 117: +SELECT first_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select first(*) (stub agg function, expose data, explain) +--Testcase 118: +EXPLAIN VERBOSE +SELECT (first_all(*)::s3).* from s3; + +-- select first(*) (stub agg function, expose data, result) +--Testcase 119: +SELECT (first_all(*)::s3).* from s3; + +-- select first(regex) (stub function, explain) +--Testcase 120: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/') from s3; + +-- select first(regex) (stub function, explain) +--Testcase 121: +SELECT first('/value[1,4]/') from s3; + +-- select multiple regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 122: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; + +-- select multiple regex functions (do not push down, raise warning and stub error) (result) +--Testcase 123: +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; + +-- select first(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 124: +EXPLAIN VERBOSE +SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select first(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 125: +SELECT first('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select first(regex) (stub agg function and group by tag only) (explain) +--Testcase 126: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select first(regex) (stub agg function and group by tag only) (result) +--Testcase 127: +SELECT first('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select first(regex) (stub agg function, expose data, explain) +--Testcase 128: +EXPLAIN VERBOSE +SELECT (first('/value[1,4]/')::s3).* from s3; + +-- select first(regex) (stub agg function, expose data, result) +--Testcase 129: +SELECT (first('/value[1,4]/')::s3).* from s3; + +--Testcase 130: +EXPLAIN VERBOSE +SELECT last(time, value1), last(time, value2), last(time, value3), last(time, value4) FROM s3; + +--Testcase 131: +SELECT last(time, value1), last(time, value2), last(time, value3), last(time, value4) FROM s3; + +-- select last(*) (stub agg function, explain) +--Testcase 132: +EXPLAIN VERBOSE +SELECT last_all(*) from s3; + +-- select last(*) (stub agg function, result) +--Testcase 133: +SELECT last_all(*) from s3; + +-- select last(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 134: +EXPLAIN VERBOSE +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select last(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 135: +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select last(*) (stub agg function and group by tag only) (explain) +--Testcase 136: +EXPLAIN VERBOSE +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select last(*) (stub agg function and group by tag only) (result) +--Testcase 137: +SELECT last_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select last(*) (stub agg function, expose data, explain) +--Testcase 138: +EXPLAIN VERBOSE +SELECT (last_all(*)::s3).* from s3; + +-- select last(*) (stub agg function, expose data, result) +--Testcase 139: +SELECT (last_all(*)::s3).* from s3; + +-- select last(regex) (stub function, explain) +--Testcase 140: +EXPLAIN VERBOSE +SELECT last('/value[1,4]/') from s3; + +-- select last(regex) (stub function, result) +--Testcase 141: +SELECT last('/value[1,4]/') from s3; + +-- select multiple regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 142: +EXPLAIN VERBOSE +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; + +-- select multiple regex functions (do not push down, raise warning and stub error) (result) +--Testcase 143: +SELECT first('/value[1,4]/'), first('/^v.*/') from s3; + +-- select last(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 144: +EXPLAIN VERBOSE +SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select last(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 145: +SELECT last('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select last(regex) (stub agg function and group by tag only) (explain) +--Testcase 146: +EXPLAIN VERBOSE +SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select last(regex) (stub agg function and group by tag only) (result) +--Testcase 147: +SELECT last('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select last(regex) (stub agg function, expose data, explain) +--Testcase 148: +EXPLAIN VERBOSE +SELECT (last('/value[1,4]/')::s3).* from s3; + +-- select last(regex) (stub agg function, expose data, result) +--Testcase 149: +SELECT (last('/value[1,4]/')::s3).* from s3; + +--Testcase 150: +EXPLAIN VERBOSE +SELECT sample(value2, 3) FROM s3 WHERE value2 < 200; + +--Testcase 151: +SELECT sample(value2, 3) FROM s3 WHERE value2 < 200; + +--Testcase 152: +EXPLAIN VERBOSE +SELECT sample(value2, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); + +--Testcase 153: +SELECT sample(value2, 1) FROM s3 WHERE time >= to_timestamp(0) AND time <= to_timestamp(5) GROUP BY influx_time(time, interval '3s'); + +-- select sample(*, int) (stub agg function, explain) +--Testcase 154: +EXPLAIN VERBOSE +SELECT sample_all(50) from s3; + +-- select sample(*, int) (stub agg function, result) +--Testcase 155: +SELECT sample_all(50) from s3; + +-- select sample(*, int) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 156: +EXPLAIN VERBOSE +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select sample(*, int) (stub agg function and group by influx_time() and tag) (result) +--Testcase 157: +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select sample(*, int) (stub agg function and group by tag only) (explain) +--Testcase 158: +EXPLAIN VERBOSE +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select sample(*, int) (stub agg function and group by tag only) (result) +--Testcase 159: +SELECT sample_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select sample(*, int) (stub agg function, expose data, explain) +--Testcase 160: +EXPLAIN VERBOSE +SELECT (sample_all(50)::s3).* from s3; + +-- select sample(*, int) (stub agg function, expose data, result) +--Testcase 161: +SELECT (sample_all(50)::s3).* from s3; + +-- select sample(regex) (stub agg function, explain) +--Testcase 162: +EXPLAIN VERBOSE +SELECT sample('/value[1,4]/', 50) from s3; + +-- select sample(regex) (stub agg function, result) +--Testcase 163: +SELECT sample('/value[1,4]/', 50) from s3; + +-- select sample(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 164: +EXPLAIN VERBOSE +SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select sample(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 165: +SELECT sample('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select sample(regex) (stub agg function and group by tag only) (explain) +--Testcase 166: +EXPLAIN VERBOSE +SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select sample(regex) (stub agg function and group by tag only) (result) +--Testcase 167: +SELECT sample('/value[1,4]/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select sample(regex) (stub agg function, expose data, explain) +--Testcase 168: +EXPLAIN VERBOSE +SELECT (sample('/value[1,4]/', 50)::s3).* from s3; + +-- select sample(regex) (stub agg function, expose data, result) +--Testcase 169: +SELECT (sample('/value[1,4]/', 50)::s3).* from s3; + +--Testcase 170: +EXPLAIN VERBOSE +SELECT cumulative_sum(value1),cumulative_sum(value2),cumulative_sum(value3),cumulative_sum(value4) FROM s3; + +--Testcase 171: +SELECT cumulative_sum(value1),cumulative_sum(value2),cumulative_sum(value3),cumulative_sum(value4) FROM s3; + +-- select cumulative_sum(*) (stub function, explain) +--Testcase 172: +EXPLAIN VERBOSE +SELECT cumulative_sum_all() from s3; + +-- select cumulative_sum(*) (stub function, result) +--Testcase 173: +SELECT cumulative_sum_all() from s3; + +-- select cumulative_sum(regex) (stub function, result) +--Testcase 174: +SELECT cumulative_sum('/value[1,4]/') from s3; + +-- select cumulative_sum(regex) (stub function, result) +--Testcase 175: +SELECT cumulative_sum('/value[1,4]/') from s3; + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (result) +--Testcase 176: +EXPLAIN VERBOSE +SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (result) +--Testcase 177: +SELECT cumulative_sum_all(), cumulative_sum('/value[1,4]/') from s3; + +-- select cumulative_sum(*) (stub function and group by tag only) (explain) +--Testcase 178: +EXPLAIN VERBOSE +SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select cumulative_sum(*) (stub function and group by tag only) (result) +--Testcase 179: +SELECT cumulative_sum_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select cumulative_sum(regex) (stub function and group by tag only) (explain) +--Testcase 180: +EXPLAIN VERBOSE +SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select cumulative_sum(regex) (stub function and group by tag only) (result) +--Testcase 181: +SELECT cumulative_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, explain) +--Testcase 182: +EXPLAIN VERBOSE +SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; + +-- select cumulative_sum(*), cumulative_sum(regex) (stub agg function, expose data, result) +--Testcase 183: +SELECT (cumulative_sum_all()::s3).*, (cumulative_sum('/value[1,4]/')::s3).* from s3; + +--Testcase 184: +EXPLAIN VERBOSE +SELECT derivative(value1),derivative(value2),derivative(value3),derivative(value4) FROM s3; + +--Testcase 185: +SELECT derivative(value1),derivative(value2),derivative(value3),derivative(value4) FROM s3; + +--Testcase 186: +EXPLAIN VERBOSE +SELECT derivative(value1, interval '0.5s'),derivative(value2, interval '0.2s'),derivative(value3, interval '0.1s'),derivative(value4, interval '2s') FROM s3; + +--Testcase 187: +SELECT derivative(value1, interval '0.5s'),derivative(value2, interval '0.2s'),derivative(value3, interval '0.1s'),derivative(value4, interval '2s') FROM s3; + +-- select derivative(*) (stub function, explain) +--Testcase 188: +EXPLAIN VERBOSE +SELECT derivative_all() from s3; + +-- select derivative(*) (stub function, result) +--Testcase 189: +SELECT derivative_all() from s3; + +-- select derivative(regex) (stub function, explain) +--Testcase 190: +EXPLAIN VERBOSE +SELECT derivative('/value[1,4]/') from s3; + +-- select derivative(regex) (stub function, result) +--Testcase 191: +SELECT derivative('/value[1,4]/') from s3; + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 192: +EXPLAIN VERBOSE +SELECT derivative_all(), derivative('/value[1,4]/') from s3; + +-- select multiple star and regex functions (do not push down, raise warning and stub error) (explain) +--Testcase 193: +SELECT derivative_all(), derivative('/value[1,4]/') from s3; + +-- select derivative(*) (stub function and group by tag only) (explain) +--Testcase 194: +EXPLAIN VERBOSE +SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select derivative(*) (stub function and group by tag only) (result) +--Testcase 195: +SELECT derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select derivative(regex) (stub function and group by tag only) (explain) +--Testcase 196: +EXPLAIN VERBOSE +SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select derivative(regex) (stub function and group by tag only) (result) +--Testcase 197: +SELECT derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select derivative(*) (stub agg function, expose data, explain) +--Testcase 198: +EXPLAIN VERBOSE +SELECT (derivative_all()::s3).* from s3; + +-- select derivative(*) (stub agg function, expose data, result) +--Testcase 199: +SELECT (derivative_all()::s3).* from s3; + +-- select derivative(regex) (stub agg function, expose data, explain) +--Testcase 200: +EXPLAIN VERBOSE +SELECT (derivative('/value[1,4]/')::s3).* from s3; + +-- select derivative(regex) (stub agg function, expose data, result) +--Testcase 201: +SELECT (derivative('/value[1,4]/')::s3).* from s3; + +--Testcase 202: +EXPLAIN VERBOSE +SELECT non_negative_derivative(value1),non_negative_derivative(value2),non_negative_derivative(value3),non_negative_derivative(value4) FROM s3; + +--Testcase 203: +SELECT non_negative_derivative(value1),non_negative_derivative(value2),non_negative_derivative(value3),non_negative_derivative(value4) FROM s3; + +--Testcase 204: +EXPLAIN VERBOSE +SELECT non_negative_derivative(value1, interval '0.5s'),non_negative_derivative(value2, interval '0.2s'),non_negative_derivative(value3, interval '0.1s'),non_negative_derivative(value4, interval '2s') FROM s3; + +--Testcase 205: +SELECT non_negative_derivative(value1, interval '0.5s'),non_negative_derivative(value2, interval '0.2s'),non_negative_derivative(value3, interval '0.1s'),non_negative_derivative(value4, interval '2s') FROM s3; + +-- select non_negative_derivative(*) (stub function, explain) +--Testcase 206: +EXPLAIN VERBOSE +SELECT non_negative_derivative_all() from s3; + +-- select non_negative_derivative(*) (stub function, result) +--Testcase 207: +SELECT non_negative_derivative_all() from s3; + +-- select non_negative_derivative(regex) (stub function, explain) +--Testcase 208: +EXPLAIN VERBOSE +SELECT non_negative_derivative('/value[1,4]/') from s3; + +-- select non_negative_derivative(regex) (stub function, result) +--Testcase 209: +SELECT non_negative_derivative('/value[1,4]/') from s3; + +-- select non_negative_derivative(*) (stub function and group by tag only) (explain) +--Testcase 210: +EXPLAIN VERBOSE +SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select non_negative_derivative(*) (stub function and group by tag only) (result) +--Testcase 211: +SELECT non_negative_derivative_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select non_negative_derivative(regex) (stub function and group by tag only) (explain) +--Testcase 212: +EXPLAIN VERBOSE +SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select non_negative_derivative(regex) (stub agg function and group by tag only) (result) +--Testcase 213: +SELECT non_negative_derivative('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select non_negative_derivative(*) (stub function, expose data, explain) +--Testcase 214: +EXPLAIN VERBOSE +SELECT (non_negative_derivative_all()::s3).* from s3; + +-- select non_negative_derivative(*) (stub agg function, expose data, result) +--Testcase 215: +SELECT (non_negative_derivative_all()::s3).* from s3; + +-- select non_negative_derivative(regex) (stub function, expose data, explain) +--Testcase 216: +EXPLAIN VERBOSE +SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; + +-- select non_negative_derivative(regex) (stub agg function, expose data, result) +--Testcase 217: +SELECT (non_negative_derivative('/value[1,4]/')::s3).* from s3; + +--Testcase 218: +EXPLAIN VERBOSE +SELECT difference(value1),difference(value2),difference(value3),difference(value4) FROM s3; + +--Testcase 219: +SELECT difference(value1),difference(value2),difference(value3),difference(value4) FROM s3; + +-- select difference(*) (stub function, explain) +--Testcase 220: +EXPLAIN VERBOSE +SELECT difference_all() from s3; + +-- select difference(*) (stub function, result) +--Testcase 221: +SELECT difference_all() from s3; + +-- select difference(regex) (stub function, explain) +--Testcase 222: +EXPLAIN VERBOSE +SELECT difference('/value[1,4]/') from s3; + +-- select difference(regex) (stub function, result) +--Testcase 223: +SELECT difference('/value[1,4]/') from s3; + +-- select difference(*) (stub agg function and group by tag only) (explain) +--Testcase 224: +EXPLAIN VERBOSE +SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select difference(*) (stub agg function and group by tag only) (result) +--Testcase 225: +SELECT difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select difference(regex) (stub agg function and group by tag only) (explain) +--Testcase 226: +EXPLAIN VERBOSE +SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select difference(regex) (stub agg function and group by tag only) (result) +--Testcase 227: +SELECT difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select difference(*) (stub function, expose data, explain) +--Testcase 228: +EXPLAIN VERBOSE +SELECT (difference_all()::s3).* from s3; + +-- select difference(*) (stub function, expose data, result) +--Testcase 229: +SELECT (difference_all()::s3).* from s3; + +-- select difference(regex) (stub function, expose data, explain) +--Testcase 230: +EXPLAIN VERBOSE +SELECT (difference('/value[1,4]/')::s3).* from s3; + +-- select difference(regex) (stub function, expose data, result) +--Testcase 231: +SELECT (difference('/value[1,4]/')::s3).* from s3; + +--Testcase 232: +EXPLAIN VERBOSE +SELECT non_negative_difference(value1),non_negative_difference(value2),non_negative_difference(value3),non_negative_difference(value4) FROM s3; + +--Testcase 233: +SELECT non_negative_difference(value1),non_negative_difference(value2),non_negative_difference(value3),non_negative_difference(value4) FROM s3; + +-- select non_negative_difference(*) (stub function, explain) +--Testcase 234: +EXPLAIN VERBOSE +SELECT non_negative_difference_all() from s3; + +-- select non_negative_difference(*) (stub function, result) +--Testcase 235: +SELECT non_negative_difference_all() from s3; + +-- select non_negative_difference(regex) (stub agg function, explain) +--Testcase 236: +EXPLAIN VERBOSE +SELECT non_negative_difference('/value[1,4]/') from s3; + +-- select non_negative_difference(*), non_negative_difference(regex) (stub function, result) +--Testcase 237: +SELECT non_negative_difference('/value[1,4]/') from s3; + +-- select non_negative_difference(*) (stub function and group by tag only) (explain) +--Testcase 238: +EXPLAIN VERBOSE +SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select non_negative_difference(*) (stub function and group by tag only) (result) +--Testcase 239: +SELECT non_negative_difference_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select non_negative_difference(regex) (stub function and group by tag only) (explain) +--Testcase 240: +EXPLAIN VERBOSE +SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select non_negative_difference(regex) (stub function and group by tag only) (result) +--Testcase 241: +SELECT non_negative_difference('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select non_negative_difference(*) (stub function, expose data, explain) +--Testcase 242: +EXPLAIN VERBOSE +SELECT (non_negative_difference_all()::s3).* from s3; + +-- select non_negative_difference(*) (stub function, expose data, result) +--Testcase 243: +SELECT (non_negative_difference_all()::s3).* from s3; + +-- select non_negative_difference(regex) (stub function, expose data, explain) +--Testcase 244: +EXPLAIN VERBOSE +SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; + +-- select non_negative_difference(regex) (stub function, expose data, result) +--Testcase 245: +SELECT (non_negative_difference('/value[1,4]/')::s3).* from s3; + +--Testcase 246: +EXPLAIN VERBOSE +SELECT elapsed(value1),elapsed(value2),elapsed(value3),elapsed(value4) FROM s3; + +--Testcase 247: +SELECT elapsed(value1),elapsed(value2),elapsed(value3),elapsed(value4) FROM s3; + +--Testcase 248: +EXPLAIN VERBOSE +SELECT elapsed(value1, interval '0.5s'),elapsed(value2, interval '0.2s'),elapsed(value3, interval '0.1s'),elapsed(value4, interval '2s') FROM s3; + +--Testcase 249: +SELECT elapsed(value1, interval '0.5s'),elapsed(value2, interval '0.2s'),elapsed(value3, interval '0.1s'),elapsed(value4, interval '2s') FROM s3; + +-- select elapsed(*) (stub function, explain) +--Testcase 250: +EXPLAIN VERBOSE +SELECT elapsed_all() from s3; + +-- select elapsed(*) (stub function, result) +--Testcase 251: +SELECT elapsed_all() from s3; + +-- select elapsed(regex) (stub function, explain) +--Testcase 252: +EXPLAIN VERBOSE +SELECT elapsed('/value[1,4]/') from s3; + +-- select elapsed(regex) (stub agg function, result) +--Testcase 253: +SELECT elapsed('/value[1,4]/') from s3; + +-- select elapsed(*) (stub function and group by tag only) (explain) +--Testcase 254: +EXPLAIN VERBOSE +SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select elapsed(*) (stub function and group by tag only) (result) +--Testcase 255: +SELECT elapsed_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select elapsed(regex) (stub function and group by tag only) (explain) +--Testcase 256: +EXPLAIN VERBOSE +SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select elapsed(regex) (stub function and group by tag only) (result) +--Testcase 257: +SELECT elapsed('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select elapsed(*) (stub function, expose data, explain) +--Testcase 258: +EXPLAIN VERBOSE +SELECT (elapsed_all()::s3).* from s3; + +-- select elapsed(*) (stub function, expose data, result) +--Testcase 259: +SELECT (elapsed_all()::s3).* from s3; + +-- select elapsed(regex) (stub function, expose data, explain) +--Testcase 260: +EXPLAIN VERBOSE +SELECT (elapsed('/value[1,4]/')::s3).* from s3; + +-- select elapsed(regex) (stub agg function, expose data, result) +--Testcase 261: +SELECT (elapsed('/value[1,4]/')::s3).* from s3; + +--Testcase 262: +EXPLAIN VERBOSE +SELECT moving_average(value1, 2),moving_average(value2, 2),moving_average(value3, 2),moving_average(value4, 2) FROM s3; + +--Testcase 263: +SELECT moving_average(value1, 2),moving_average(value2, 2),moving_average(value3, 2),moving_average(value4, 2) FROM s3; + +-- select moving_average(*) (stub function, explain) +--Testcase 264: +EXPLAIN VERBOSE +SELECT moving_average_all(2) from s3; + +-- select moving_average(*) (stub function, result) +--Testcase 265: +SELECT moving_average_all(2) from s3; + +-- select moving_average(regex) (stub function, explain) +--Testcase 266: +EXPLAIN VERBOSE +SELECT moving_average('/value[1,4]/', 2) from s3; + +-- select moving_average(regex) (stub function, result) +--Testcase 267: +SELECT moving_average('/value[1,4]/', 2) from s3; + +-- select moving_average(*) (stub function and group by tag only) (explain) +--Testcase 268: +EXPLAIN VERBOSE +SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select moving_average(*) (stub function and group by tag only) (result) +--Testcase 269: +SELECT moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 270: +EXPLAIN VERBOSE +SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select moving_average(regex) (stub function and group by tag only) (result) +--Testcase 271: +SELECT moving_average('/value[1,4]/', 2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select moving_average(*) (stub function, expose data, explain) +--Testcase 272: +EXPLAIN VERBOSE +SELECT (moving_average_all(2)::s3).* from s3; + +-- select moving_average(*) (stub function, expose data, result) +--Testcase 273: +SELECT (moving_average_all(2)::s3).* from s3; + +-- select moving_average(regex) (stub function, expose data, explain) +--Testcase 274: +EXPLAIN VERBOSE +SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; + +-- select moving_average(regex) (stub function, expose data, result) +--Testcase 275: +SELECT (moving_average('/value[1,4]/', 2)::s3).* from s3; + +--Testcase 276: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator(value1, 2),chande_momentum_oscillator(value2, 2),chande_momentum_oscillator(value3, 2),chande_momentum_oscillator(value4, 2) FROM s3; + +--Testcase 277: +SELECT chande_momentum_oscillator(value1, 2),chande_momentum_oscillator(value2, 2),chande_momentum_oscillator(value3, 2),chande_momentum_oscillator(value4, 2) FROM s3; + +--Testcase 278: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator(value1, 2, 2),chande_momentum_oscillator(value2, 2, 2),chande_momentum_oscillator(value3, 2, 2),chande_momentum_oscillator(value4, 2, 2) FROM s3; + +--Testcase 279: +SELECT chande_momentum_oscillator(value1, 2, 2),chande_momentum_oscillator(value2, 2, 2),chande_momentum_oscillator(value3, 2, 2),chande_momentum_oscillator(value4, 2, 2) FROM s3; + +-- select chande_momentum_oscillator(*) (stub function, explain) +--Testcase 280: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator_all(2) from s3; + +-- select chande_momentum_oscillator(*) (stub function, result) +--Testcase 281: +SELECT chande_momentum_oscillator_all(2) from s3; + +-- select chande_momentum_oscillator(regex) (stub function, explain) +--Testcase 282: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; + +-- select chande_momentum_oscillator(regex) (stub agg function, result) +--Testcase 283: +SELECT chande_momentum_oscillator('/value[1,4]/',2) from s3; + +-- select chande_momentum_oscillator(*) (stub function and group by tag only) (explain) +--Testcase 284: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select chande_momentum_oscillator(*) (stub agg function and group by tag only) (result) +--Testcase 285: +SELECT chande_momentum_oscillator_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select chande_momentum_oscillator(regex) (stub agg function and group by tag only) (explain) +--Testcase 286: +EXPLAIN VERBOSE +SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select chande_momentum_oscillator(regex) (stub function and group by tag only) (result) +--Testcase 287: +SELECT chande_momentum_oscillator('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select chande_momentum_oscillator(*) (stub agg function, expose data, explain) +--Testcase 288: +EXPLAIN VERBOSE +SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; + +-- select chande_momentum_oscillator(*) (stub function, expose data, result) +--Testcase 289: +SELECT (chande_momentum_oscillator_all(2)::s3).* from s3; + +-- select chande_momentum_oscillator(regex) (stub function, expose data, explain) +--Testcase 290: +EXPLAIN VERBOSE +SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; + +-- select chande_momentum_oscillator(regex) (stub function, expose data, result) +--Testcase 291: +SELECT (chande_momentum_oscillator('/value[1,4]/',2)::s3).* from s3; + +--Testcase 292: +EXPLAIN VERBOSE +SELECT exponential_moving_average(value1, 2),exponential_moving_average(value2, 2),exponential_moving_average(value3, 2),exponential_moving_average(value4, 2) FROM s3; + +--Testcase 293: +SELECT exponential_moving_average(value1, 2),exponential_moving_average(value2, 2),exponential_moving_average(value3, 2),exponential_moving_average(value4, 2) FROM s3; + +--Testcase 294: +EXPLAIN VERBOSE +SELECT exponential_moving_average(value1, 2, 2),exponential_moving_average(value2, 2, 2),exponential_moving_average(value3, 2, 2),exponential_moving_average(value4, 2, 2) FROM s3; + +--Testcase 295: +SELECT exponential_moving_average(value1, 2, 2),exponential_moving_average(value2, 2, 2),exponential_moving_average(value3, 2, 2),exponential_moving_average(value4, 2, 2) FROM s3; + +-- select exponential_moving_average(*) (stub function, explain) +--Testcase 296: +EXPLAIN VERBOSE +SELECT exponential_moving_average_all(2) from s3; + +-- select exponential_moving_average(*) (stub function, result) +--Testcase 297: +SELECT exponential_moving_average_all(2) from s3; + +-- select exponential_moving_average(regex) (stub function, explain) +--Testcase 298: +EXPLAIN VERBOSE +SELECT exponential_moving_average('/value[1,4]/',2) from s3; + +-- select exponential_moving_average(regex) (stub function, result) +--Testcase 299: +SELECT exponential_moving_average('/value[1,4]/',2) from s3; + +-- select exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 300: +EXPLAIN VERBOSE +SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 301: +SELECT exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select exponential_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 302: +EXPLAIN VERBOSE +SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select exponential_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 303: +SELECT exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +--Testcase 304: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average(value1, 2),double_exponential_moving_average(value2, 2),double_exponential_moving_average(value3, 2),double_exponential_moving_average(value4, 2) FROM s3; + +--Testcase 305: +SELECT double_exponential_moving_average(value1, 2),double_exponential_moving_average(value2, 2),double_exponential_moving_average(value3, 2),double_exponential_moving_average(value4, 2) FROM s3; + +--Testcase 306: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average(value1, 2, 2),double_exponential_moving_average(value2, 2, 2),double_exponential_moving_average(value3, 2, 2),double_exponential_moving_average(value4, 2, 2) FROM s3; + +--Testcase 307: +SELECT double_exponential_moving_average(value1, 2, 2),double_exponential_moving_average(value2, 2, 2),double_exponential_moving_average(value3, 2, 2),double_exponential_moving_average(value4, 2, 2) FROM s3; + +-- select double_exponential_moving_average(*) (stub function, explain) +--Testcase 308: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average_all(2) from s3; + +-- select double_exponential_moving_average(*) (stub function, result) +--Testcase 309: +SELECT double_exponential_moving_average_all(2) from s3; + +-- select double_exponential_moving_average(regex) (stub function, explain) +--Testcase 310: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; + +-- select double_exponential_moving_average(regex) (stub function, result) +--Testcase 311: +SELECT double_exponential_moving_average('/value[1,4]/',2) from s3; + +-- select double_exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 312: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select double_exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 313: +SELECT double_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select double_exponential_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 314: +EXPLAIN VERBOSE +SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select double_exponential_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 315: +SELECT double_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +--Testcase 316: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio(value1, 2),kaufmans_efficiency_ratio(value2, 2),kaufmans_efficiency_ratio(value3, 2),kaufmans_efficiency_ratio(value4, 2) FROM s3; + +--Testcase 317: +SELECT kaufmans_efficiency_ratio(value1, 2),kaufmans_efficiency_ratio(value2, 2),kaufmans_efficiency_ratio(value3, 2),kaufmans_efficiency_ratio(value4, 2) FROM s3; + +--Testcase 318: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio(value1, 2, 2),kaufmans_efficiency_ratio(value2, 2, 2),kaufmans_efficiency_ratio(value3, 2, 2),kaufmans_efficiency_ratio(value4, 2, 2) FROM s3; + +--Testcase 319: +SELECT kaufmans_efficiency_ratio(value1, 2, 2),kaufmans_efficiency_ratio(value2, 2, 2),kaufmans_efficiency_ratio(value3, 2, 2),kaufmans_efficiency_ratio(value4, 2, 2) FROM s3; + +-- select kaufmans_efficiency_ratio(*) (stub function, explain) +--Testcase 320: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio_all(2) from s3; + +-- select kaufmans_efficiency_ratio(*) (stub function, result) +--Testcase 321: +SELECT kaufmans_efficiency_ratio_all(2) from s3; + +-- select kaufmans_efficiency_ratio(regex) (stub function, explain) +--Testcase 322: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; + +-- select kaufmans_efficiency_ratio(regex) (stub function, result) +--Testcase 323: +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) from s3; + +-- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (explain) +--Testcase 324: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select kaufmans_efficiency_ratio(*) (stub function and group by tag only) (result) +--Testcase 325: +SELECT kaufmans_efficiency_ratio_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (explain) +--Testcase 326: +EXPLAIN VERBOSE +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select kaufmans_efficiency_ratio(regex) (stub function and group by tag only) (result) +--Testcase 327: +SELECT kaufmans_efficiency_ratio('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select kaufmans_efficiency_ratio(*) (stub function, expose data, explain) +--Testcase 328: +EXPLAIN VERBOSE +SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; + +-- select kaufmans_efficiency_ratio(*) (stub function, expose data, result) +--Testcase 329: +SELECT (kaufmans_efficiency_ratio_all(2)::s3).* from s3; + +-- select kaufmans_efficiency_ratio(regex) (stub function, expose data, explain) +--Testcase 330: +EXPLAIN VERBOSE +SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; + +-- select kaufmans_efficiency_ratio(regex) (stub function, expose data, result) +--Testcase 331: +SELECT (kaufmans_efficiency_ratio('/value[1,4]/',2)::s3).* from s3; + +--Testcase 332: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average(value1, 2),kaufmans_adaptive_moving_average(value2, 2),kaufmans_adaptive_moving_average(value3, 2),kaufmans_adaptive_moving_average(value4, 2) FROM s3; + +--Testcase 333: +SELECT kaufmans_adaptive_moving_average(value1, 2),kaufmans_adaptive_moving_average(value2, 2),kaufmans_adaptive_moving_average(value3, 2),kaufmans_adaptive_moving_average(value4, 2) FROM s3; + +--Testcase 334: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average(value1, 2, 2),kaufmans_adaptive_moving_average(value2, 2, 2),kaufmans_adaptive_moving_average(value3, 2, 2),kaufmans_adaptive_moving_average(value4, 2, 2) FROM s3; + +--Testcase 335: +SELECT kaufmans_adaptive_moving_average(value1, 2, 2),kaufmans_adaptive_moving_average(value2, 2, 2),kaufmans_adaptive_moving_average(value3, 2, 2),kaufmans_adaptive_moving_average(value4, 2, 2) FROM s3; + +-- select kaufmans_adaptive_moving_average(*) (stub function, explain) +--Testcase 336: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average_all(2) from s3; + +-- select kaufmans_adaptive_moving_average(*) (stub function, result) +--Testcase 337: +SELECT kaufmans_adaptive_moving_average_all(2) from s3; + +-- select kaufmans_adaptive_moving_average(regex) (stub function, explain) +--Testcase 338: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; + +-- select kaufmans_adaptive_moving_average(regex) (stub agg function, result) +--Testcase 339: +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) from s3; + +-- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 340: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select kaufmans_adaptive_moving_average(*) (stub function and group by tag only) (result) +--Testcase 341: +SELECT kaufmans_adaptive_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (explain) +--Testcase 342: +EXPLAIN VERBOSE +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select kaufmans_adaptive_moving_average(regex) (stub function and group by tag only) (result) +--Testcase 343: +SELECT kaufmans_adaptive_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +--Testcase 344: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average(value1, 2),triple_exponential_moving_average(value2, 2),triple_exponential_moving_average(value3, 2),triple_exponential_moving_average(value4, 2) FROM s3; + +--Testcase 345: +SELECT triple_exponential_moving_average(value1, 2),triple_exponential_moving_average(value2, 2),triple_exponential_moving_average(value3, 2),triple_exponential_moving_average(value4, 2) FROM s3; + +--Testcase 346: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average(value1, 2, 2),triple_exponential_moving_average(value2, 2, 2),triple_exponential_moving_average(value3, 2, 2),triple_exponential_moving_average(value4, 2, 2) FROM s3; + +--Testcase 347: +SELECT triple_exponential_moving_average(value1, 2, 2),triple_exponential_moving_average(value2, 2, 2),triple_exponential_moving_average(value3, 2, 2),triple_exponential_moving_average(value4, 2, 2) FROM s3; + +-- select triple_exponential_moving_average(*) (stub function, explain) +--Testcase 348: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average_all(2) from s3; + +-- select triple_exponential_moving_average(*) (stub function, result) +--Testcase 349: +SELECT triple_exponential_moving_average_all(2) from s3; + +-- select triple_exponential_moving_average(regex) (stub function, explain) +--Testcase 350: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; + +-- select triple_exponential_moving_average(regex) (stub function, result) +--Testcase 351: +SELECT triple_exponential_moving_average('/value[1,4]/',2) from s3; + +-- select triple_exponential_moving_average(*) (stub function and group by tag only) (explain) +--Testcase 352: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select triple_exponential_moving_average(*) (stub function and group by tag only) (result) +--Testcase 353: +SELECT triple_exponential_moving_average_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (explain) +--Testcase 354: +EXPLAIN VERBOSE +SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select triple_exponential_moving_average(regex) (stub agg function and group by tag only) (result) +--Testcase 355: +SELECT triple_exponential_moving_average('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +--Testcase 356: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative(value1, 2),triple_exponential_derivative(value2, 2),triple_exponential_derivative(value3, 2),triple_exponential_derivative(value4, 2) FROM s3; + +--Testcase 357: +SELECT triple_exponential_derivative(value1, 2),triple_exponential_derivative(value2, 2),triple_exponential_derivative(value3, 2),triple_exponential_derivative(value4, 2) FROM s3; + +--Testcase 358: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative(value1, 2, 2),triple_exponential_derivative(value2, 2, 2),triple_exponential_derivative(value3, 2, 2),triple_exponential_derivative(value4, 2, 2) FROM s3; + +--Testcase 359: +SELECT triple_exponential_derivative(value1, 2, 2),triple_exponential_derivative(value2, 2, 2),triple_exponential_derivative(value3, 2, 2),triple_exponential_derivative(value4, 2, 2) FROM s3; + +-- select triple_exponential_derivative(*) (stub function, explain) +--Testcase 360: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative_all(2) from s3; + +-- select triple_exponential_derivative(*) (stub function, result) +--Testcase 361: +SELECT triple_exponential_derivative_all(2) from s3; + +-- select triple_exponential_derivative(regex) (stub function, explain) +--Testcase 362: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; + +-- select triple_exponential_derivative(regex) (stub function, result) +--Testcase 363: +SELECT triple_exponential_derivative('/value[1,4]/',2) from s3; + +-- select triple_exponential_derivative(*) (stub function and group by tag only) (explain) +--Testcase 364: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select triple_exponential_derivative(*) (stub function and group by tag only) (result) +--Testcase 365: +SELECT triple_exponential_derivative_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select triple_exponential_derivative(regex) (stub function and group by tag only) (explain) +--Testcase 366: +EXPLAIN VERBOSE +SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select triple_exponential_derivative(regex) (stub function and group by tag only) (result) +--Testcase 367: +SELECT triple_exponential_derivative('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +--Testcase 368: +EXPLAIN VERBOSE +SELECT relative_strength_index(value1, 2),relative_strength_index(value2, 2),relative_strength_index(value3, 2),relative_strength_index(value4, 2) FROM s3; + +--Testcase 369: +SELECT relative_strength_index(value1, 2),relative_strength_index(value2, 2),relative_strength_index(value3, 2),relative_strength_index(value4, 2) FROM s3; + +--Testcase 370: +EXPLAIN VERBOSE +SELECT relative_strength_index(value1, 2, 2),relative_strength_index(value2, 2, 2),relative_strength_index(value3, 2, 2),relative_strength_index(value4, 2, 2) FROM s3; + +--Testcase 371: +SELECT relative_strength_index(value1, 2, 2),relative_strength_index(value2, 2, 2),relative_strength_index(value3, 2, 2),relative_strength_index(value4, 2, 2) FROM s3; + +-- select relative_strength_index(*) (stub function, explain) +--Testcase 372: +EXPLAIN VERBOSE +SELECT relative_strength_index_all(2) from s3; + +-- select relative_strength_index(*) (stub function, result) +--Testcase 373: +SELECT relative_strength_index_all(2) from s3; + +-- select relative_strength_index(regex) (stub agg function, explain) +--Testcase 374: +EXPLAIN VERBOSE +SELECT relative_strength_index('/value[1,4]/',2) from s3; + +-- select relative_strength_index(regex) (stub agg function, result) +--Testcase 375: +SELECT relative_strength_index('/value[1,4]/',2) from s3; + +-- select relative_strength_index(*) (stub function and group by tag only) (explain) +--Testcase 376: +EXPLAIN VERBOSE +SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select relative_strength_index(*) (stub function and group by tag only) (result) +--Testcase 377: +SELECT relative_strength_index_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select relative_strength_index(regex) (stub function and group by tag only) (explain) +--Testcase 378: +EXPLAIN VERBOSE +SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select relative_strength_index(regex) (stub function and group by tag only) (result) +--Testcase 379: +SELECT relative_strength_index('/value[1,4]/',2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select relative_strength_index(*) (stub function, expose data, explain) +--Testcase 380: +EXPLAIN VERBOSE +SELECT (relative_strength_index_all(2)::s3).* from s3; + +-- select relative_strength_index(*) (stub function, expose data, result) +--Testcase 381: +SELECT (relative_strength_index_all(2)::s3).* from s3; + +-- select relative_strength_index(regex) (stub function, expose data, explain) +--Testcase 382: +EXPLAIN VERBOSE +SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; + +-- select relative_strength_index(regex) (stub function, expose data, result) +--Testcase 383: +SELECT (relative_strength_index('/value[1,4]/',2)::s3).* from s3; + +-- select integral (stub agg function, explain) +--Testcase 384: +EXPLAIN VERBOSE +SELECT integral(value1),integral(value2),integral(value3),integral(value4) FROM s3; + +-- select integral (stub agg function, result) +--Testcase 385: +SELECT integral(value1),integral(value2),integral(value3),integral(value4) FROM s3; + +--Testcase 386: +EXPLAIN VERBOSE +SELECT integral(value1, interval '1s'),integral(value2, interval '1s'),integral(value3, interval '1s'),integral(value4, interval '1s') FROM s3; + +-- select integral (stub agg function, result) +--Testcase 387: +SELECT integral(value1, interval '1s'),integral(value2, interval '1s'),integral(value3, interval '1s'),integral(value4, interval '1s') FROM s3; + +-- select integral (stub agg function, raise exception if not expected type) +--Testcase 388: +SELECT integral(value1::numeric),integral(value2::numeric),integral(value3::numeric),integral(value4::numeric) FROM s3; + +-- select integral (stub agg function and group by influx_time() and tag) (explain) +--Testcase 389: +EXPLAIN VERBOSE +SELECT integral("value1"),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + +-- select integral (stub agg function and group by influx_time() and tag) (result) +--Testcase 390: +SELECT integral("value1"),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + +-- select integral (stub agg function and group by influx_time() and tag) (explain) +--Testcase 391: +EXPLAIN VERBOSE +SELECT integral("value1", interval '1s'),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + +-- select integral (stub agg function and group by influx_time() and tag) (result) +--Testcase 392: +SELECT integral("value1", interval '1s'),influx_time(time, interval '1s'),tag1 FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + +-- select integral (stub agg function and group by tag only) (result) +--Testcase 393: +SELECT tag1,integral("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1 ORDER BY 1; + +-- select integral (stub agg function and other aggs) (result) +--Testcase 394: +SELECT sum("value1"),integral("value1"),count("value1") FROM s3; + +-- select integral (stub agg function and group by tag only) (result) +--Testcase 395: +SELECT tag1,integral("value1", interval '1s') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1 ORDER BY 1; + +-- select integral (stub agg function and other aggs) (result) +--Testcase 396: +SELECT sum("value1"),integral("value1", interval '1s'),count("value1") FROM s3; + +-- select integral over join query (explain) +--Testcase 397: +EXPLAIN VERBOSE +SELECT integral(t1.value1), integral(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select integral over join query (result, stub call error) +--Testcase 398: +SELECT integral(t1.value1), integral(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select integral over join query (explain) +--Testcase 399: +EXPLAIN VERBOSE +SELECT integral(t1.value1, interval '1s'), integral(t2.value1, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select integral over join query (result, stub call error) +--Testcase 400: +SELECT integral(t1.value1, interval '1s'), integral(t2.value1, interval '1s') FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select integral with having (explain) +--Testcase 401: +EXPLAIN VERBOSE +SELECT integral(value1) FROM s3 HAVING integral(value1) > 100; + +-- select integral with having (explain, not pushdown, stub call error) +--Testcase 402: +SELECT integral(value1) FROM s3 HAVING integral(value1) > 100; + +-- select integral with having (explain) +--Testcase 403: +EXPLAIN VERBOSE +SELECT integral(value1, interval '1s') FROM s3 HAVING integral(value1, interval '1s') > 100; + +-- select integral with having (explain, not pushdown, stub call error) +--Testcase 404: +SELECT integral(value1, interval '1s') FROM s3 HAVING integral(value1, interval '1s') > 100; + +-- select integral(*) (stub agg function, explain) +--Testcase 405: +EXPLAIN VERBOSE +SELECT integral_all(*) from s3; + +-- select integral(*) (stub agg function, result) +--Testcase 406: +SELECT integral_all(*) from s3; + +-- select integral(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 407: +EXPLAIN VERBOSE +SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + +-- select integral(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 408: +SELECT integral_all(*) FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + +-- select integral(*) (stub agg function and group by tag only) (explain) +--Testcase 409: +EXPLAIN VERBOSE +SELECT integral_all(*) FROM s3 WHERE value1 > 0.3 GROUP BY tag1; + +-- select integral(*) (stub agg function and group by tag only) (result) +--Testcase 410: +SELECT integral_all(*) FROM s3 WHERE value1 > 0.3 GROUP BY tag1; + +-- select integral(*) (stub agg function, expose data, explain) +--Testcase 411: +EXPLAIN VERBOSE +SELECT (integral_all(*)::s3).* from s3; + +-- select integral(*) (stub agg function, expose data, result) +--Testcase 412: +SELECT (integral_all(*)::s3).* from s3; + +-- select integral(regex) (stub agg function, explain) +--Testcase 413: +EXPLAIN VERBOSE +SELECT integral('/value[1,4]/') from s3; + +-- select integral(regex) (stub agg function, result) +--Testcase 414: +SELECT integral('/value[1,4]/') from s3; + +-- select integral(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 415: +EXPLAIN VERBOSE +SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + +-- select integral(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 416: +SELECT integral('/^v.*/') FROM s3 GROUP BY influx_time(time, interval '1s'), tag1; + +-- select integral(regex) (stub agg function and group by tag only) (explain) +--Testcase 417: +EXPLAIN VERBOSE +SELECT integral('/value[1,4]/') FROM s3 WHERE value1 > 0.3 GROUP BY tag1; + +-- select integral(regex) (stub agg function and group by tag only) (result) +--Testcase 418: +SELECT integral('/value[1,4]/') FROM s3 WHERE value1 > 0.3 GROUP BY tag1; + +-- select integral(regex) (stub agg function, expose data, explain) +--Testcase 419: +EXPLAIN VERBOSE +SELECT (integral('/value[1,4]/')::s3).* from s3; + +-- select integral(regex) (stub agg function, expose data, result) +--Testcase 420: +SELECT (integral('/value[1,4]/')::s3).* from s3; + +-- select mean (stub agg function, explain) +--Testcase 421: +EXPLAIN VERBOSE +SELECT mean(value1),mean(value2),mean(value3),mean(value4) FROM s3; + +-- select mean (stub agg function, result) +--Testcase 422: +SELECT mean(value1),mean(value2),mean(value3),mean(value4) FROM s3; + +-- select mean (stub agg function, raise exception if not expected type) +--Testcase 423: +SELECT mean(value1::numeric),mean(value2::numeric),mean(value3::numeric),mean(value4::numeric) FROM s3; + +-- select mean (stub agg function and group by influx_time() and tag) (explain) +--Testcase 424: +EXPLAIN VERBOSE +SELECT mean("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select mean (stub agg function and group by influx_time() and tag) (result) +--Testcase 425: +SELECT mean("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select mean (stub agg function and group by tag only) (result) +--Testcase 426: +SELECT tag1,mean("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select mean (stub agg function and other aggs) (result) +--Testcase 427: +SELECT sum("value1"),mean("value1"),count("value1") FROM s3; + +-- select mean over join query (explain) +--Testcase 428: +EXPLAIN VERBOSE +SELECT mean(t1.value1), mean(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select mean over join query (result, stub call error) +--Testcase 429: +SELECT mean(t1.value1), mean(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select mean with having (explain) +--Testcase 430: +EXPLAIN VERBOSE +SELECT mean(value1) FROM s3 HAVING mean(value1) > 100; + +-- select mean with having (explain, not pushdown, stub call error) +--Testcase 431: +SELECT mean(value1) FROM s3 HAVING mean(value1) > 100; + +-- select mean(*) (stub agg function, explain) +--Testcase 432: +EXPLAIN VERBOSE +SELECT mean_all(*) from s3; + +-- select mean(*) (stub agg function, result) +--Testcase 433: +SELECT mean_all(*) from s3; + +-- select mean(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 434: +EXPLAIN VERBOSE +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select mean(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 435: +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select mean(*) (stub agg function and group by tag only) (explain) +--Testcase 436: +EXPLAIN VERBOSE +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select mean(*) (stub agg function and group by tag only) (result) +--Testcase 437: +SELECT mean_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select mean(*) (stub agg function, expose data, explain) +--Testcase 438: +EXPLAIN VERBOSE +SELECT (mean_all(*)::s3).* from s3; + +-- select mean(*) (stub agg function, expose data, result) +--Testcase 439: +SELECT (mean_all(*)::s3).* from s3; + +-- select mean(regex) (stub agg function, explain) +--Testcase 440: +EXPLAIN VERBOSE +SELECT mean('/value[1,4]/') from s3; + +-- select mean(regex) (stub agg function, result) +--Testcase 441: +SELECT mean('/value[1,4]/') from s3; + +-- select mean(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 442: +EXPLAIN VERBOSE +SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select mean(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 443: +SELECT mean('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select mean(regex) (stub agg function and group by tag only) (explain) +--Testcase 444: +EXPLAIN VERBOSE +SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select mean(regex) (stub agg function and group by tag only) (result) +--Testcase 445: +SELECT mean('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select mean(regex) (stub agg function, expose data, explain) +--Testcase 446: +EXPLAIN VERBOSE +SELECT (mean('/value[1,4]/')::s3).* from s3; + +-- select mean(regex) (stub agg function, expose data, result) +--Testcase 447: +SELECT (mean('/value[1,4]/')::s3).* from s3; + +-- select median (stub agg function, explain) +--Testcase 448: +EXPLAIN VERBOSE +SELECT median(value1),median(value2),median(value3),median(value4) FROM s3; + +-- select median (stub agg function, result) +--Testcase 449: +SELECT median(value1),median(value2),median(value3),median(value4) FROM s3; + +-- select median (stub agg function, raise exception if not expected type) +--Testcase 450: +SELECT median(value1::numeric),median(value2::numeric),median(value3::numeric),median(value4::numeric) FROM s3; + +-- select median (stub agg function and group by influx_time() and tag) (explain) +--Testcase 451: +EXPLAIN VERBOSE +SELECT median("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select median (stub agg function and group by influx_time() and tag) (result) +--Testcase 452: +SELECT median("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select median (stub agg function and group by tag only) (result) +--Testcase 453: +SELECT tag1,median("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select median (stub agg function and other aggs) (result) +--Testcase 454: +SELECT sum("value1"),median("value1"),count("value1") FROM s3; + +-- select median over join query (explain) +--Testcase 455: +EXPLAIN VERBOSE +SELECT median(t1.value1), median(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select median over join query (result, stub call error) +--Testcase 456: +SELECT median(t1.value1), median(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select median with having (explain) +--Testcase 457: +EXPLAIN VERBOSE +SELECT median(value1) FROM s3 HAVING median(value1) > 100; + +-- select median with having (explain, not pushdown, stub call error) +--Testcase 458: +SELECT median(value1) FROM s3 HAVING median(value1) > 100; + +-- select median(*) (stub agg function, explain) +--Testcase 459: +EXPLAIN VERBOSE +SELECT median_all(*) from s3; + +-- select median(*) (stub agg function, result) +--Testcase 460: +SELECT median_all(*) from s3; + +-- select median(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 461: +EXPLAIN VERBOSE +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select median(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 462: +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select median(*) (stub agg function and group by tag only) (explain) +--Testcase 463: +EXPLAIN VERBOSE +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select median(*) (stub agg function and group by tag only) (result) +--Testcase 464: +SELECT median_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select median(*) (stub agg function, expose data, explain) +--Testcase 465: +EXPLAIN VERBOSE +SELECT (median_all(*)::s3).* from s3; + +-- select median(*) (stub agg function, expose data, result) +--Testcase 466: +SELECT (median_all(*)::s3).* from s3; + +-- select median(regex) (stub agg function, explain) +--Testcase 467: +EXPLAIN VERBOSE +SELECT median('/^v.*/') from s3; + +-- select median(regex) (stub agg function, result) +--Testcase 468: +SELECT median('/^v.*/') from s3; + +-- select median(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 469: +EXPLAIN VERBOSE +SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select median(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 470: +SELECT median('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select median(regex) (stub agg function and group by tag only) (explain) +--Testcase 471: +EXPLAIN VERBOSE +SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select median(regex) (stub agg function and group by tag only) (result) +--Testcase 472: +SELECT median('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select median(regex) (stub agg function, expose data, explain) +--Testcase 473: +EXPLAIN VERBOSE +SELECT (median('/value[1,4]/')::s3).* from s3; + +-- select median(regex) (stub agg function, expose data, result) +--Testcase 474: +SELECT (median('/value[1,4]/')::s3).* from s3; + +-- select influx_mode (stub agg function, explain) +--Testcase 475: +EXPLAIN VERBOSE +SELECT influx_mode(value1),influx_mode(value2),influx_mode(value3),influx_mode(value4) FROM s3; + +-- select influx_mode (stub agg function, result) +--Testcase 476: +SELECT influx_mode(value1),influx_mode(value2),influx_mode(value3),influx_mode(value4) FROM s3; + +-- select influx_mode (stub agg function, raise exception if not expected type) +--Testcase 477: +SELECT influx_mode(value1::numeric),influx_mode(value2::numeric),influx_mode(value3::numeric),influx_mode(value4::numeric) FROM s3; + +-- select influx_mode (stub agg function and group by influx_time() and tag) (explain) +--Testcase 478: +EXPLAIN VERBOSE +SELECT influx_mode("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_mode (stub agg function and group by influx_time() and tag) (result) +--Testcase 479: +SELECT influx_mode("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_mode (stub agg function and group by tag only) (result) +--Testcase 480: +SELECT tag1,influx_mode("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_mode (stub agg function and other aggs) (result) +--Testcase 481: +SELECT sum("value1"),influx_mode("value1"),count("value1") FROM s3; + +-- select influx_mode over join query (explain) +--Testcase 482: +EXPLAIN VERBOSE +SELECT influx_mode(t1.value1), influx_mode(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select influx_mode over join query (result, stub call error) +--Testcase 483: +SELECT influx_mode(t1.value1), influx_mode(t2.value1) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select influx_mode with having (explain) +--Testcase 484: +EXPLAIN VERBOSE +SELECT influx_mode(value1) FROM s3 HAVING influx_mode(value1) > 100; + +-- select influx_mode with having (explain, not pushdown, stub call error) +--Testcase 485: +SELECT influx_mode(value1) FROM s3 HAVING influx_mode(value1) > 100; + +-- select influx_mode(*) (stub agg function, explain) +--Testcase 486: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) from s3; + +-- select influx_mode(*) (stub agg function, result) +--Testcase 487: +SELECT influx_mode_all(*) from s3; + +-- select influx_mode(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 488: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_mode(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 489: +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_mode(*) (stub agg function and group by tag only) (explain) +--Testcase 490: +EXPLAIN VERBOSE +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_mode(*) (stub agg function and group by tag only) (result) +--Testcase 491: +SELECT influx_mode_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_mode(*) (stub agg function, expose data, explain) +--Testcase 492: +EXPLAIN VERBOSE +SELECT (influx_mode_all(*)::s3).* from s3; + +-- select influx_mode(*) (stub agg function, expose data, result) +--Testcase 493: +SELECT (influx_mode_all(*)::s3).* from s3; + +-- select influx_mode(regex) (stub function, explain) +--Testcase 494: +EXPLAIN VERBOSE +SELECT influx_mode('/value[1,4]/') from s3; + +-- select influx_mode(regex) (stub function, result) +--Testcase 495: +SELECT influx_mode('/value[1,4]/') from s3; + +-- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 496: +EXPLAIN VERBOSE +SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_mode(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 497: +SELECT influx_mode('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_mode(regex) (stub agg function and group by tag only) (explain) +--Testcase 498: +EXPLAIN VERBOSE +SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_mode(regex) (stub agg function and group by tag only) (result) +--Testcase 499: +SELECT influx_mode('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_mode(regex) (stub agg function, expose data, explain) +--Testcase 500: +EXPLAIN VERBOSE +SELECT (influx_mode('/value[1,4]/')::s3).* from s3; + +-- select influx_mode(regex) (stub agg function, expose data, result) +--Testcase 501: +SELECT (influx_mode('/value[1,4]/')::s3).* from s3; + +-- select stddev (agg function, explain) +--Testcase 502: +EXPLAIN VERBOSE +SELECT stddev(value1),stddev(value2),stddev(value3),stddev(value4) FROM s3; + +-- select stddev (agg function, result) +--Testcase 503: +SELECT stddev(value1),stddev(value2),stddev(value3),stddev(value4) FROM s3; + +-- select stddev (agg function and group by influx_time() and tag) (explain) +--Testcase 504: +EXPLAIN VERBOSE +SELECT stddev("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select stddev (agg function and group by influx_time() and tag) (result) +--Testcase 505: +SELECT stddev("value1"),influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select stddev (agg function and group by tag only) (result) +--Testcase 506: +SELECT tag1,stddev("value1") FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select stddev (agg function and other aggs) (result) +--Testcase 507: +SELECT sum("value1"),stddev("value1"),count("value1") FROM s3; + +-- select stddev(*) (stub agg function, explain) +--Testcase 508: +EXPLAIN VERBOSE +SELECT stddev_all(*) from s3; + +-- select stddev(*) (stub agg function, result) +--Testcase 509: +SELECT stddev_all(*) from s3; + +-- select stddev(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 510: +EXPLAIN VERBOSE +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select stddev(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 511: +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select stddev(*) (stub agg function and group by tag only) (explain) +--Testcase 512: +EXPLAIN VERBOSE +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select stddev(*) (stub agg function and group by tag only) (result) +--Testcase 513: +SELECT stddev_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select stddev(regex) (stub function, explain) +--Testcase 514: +EXPLAIN VERBOSE +SELECT stddev('/value[1,4]/') from s3; + +-- select stddev(regex) (stub function, result) +--Testcase 515: +SELECT stddev('/value[1,4]/') from s3; + +-- select stddev(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 516: +EXPLAIN VERBOSE +SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select stddev(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 517: +SELECT stddev('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select stddev(regex) (stub agg function and group by tag only) (explain) +--Testcase 518: +EXPLAIN VERBOSE +SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select stddev(regex) (stub agg function and group by tag only) (result) +--Testcase 519: +SELECT stddev('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_sum(*) (stub agg function, explain) +--Testcase 520: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) from s3; + +-- select influx_sum(*) (stub agg function, result) +--Testcase 521: +SELECT influx_sum_all(*) from s3; + +-- select influx_sum(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 522: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_sum(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 523: +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_sum(*) (stub agg function and group by tag only) (explain) +--Testcase 524: +EXPLAIN VERBOSE +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_sum(*) (stub agg function and group by tag only) (result) +--Testcase 525: +SELECT influx_sum_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_sum(*) (stub agg function, expose data, explain) +--Testcase 526: +EXPLAIN VERBOSE +SELECT (influx_sum_all(*)::s3).* from s3; + +-- select influx_sum(*) (stub agg function, expose data, result) +--Testcase 527: +SELECT (influx_sum_all(*)::s3).* from s3; + +-- select influx_sum(regex) (stub function, explain) +--Testcase 528: +EXPLAIN VERBOSE +SELECT influx_sum('/value[1,4]/') from s3; + +-- select influx_sum(regex) (stub function, result) +--Testcase 529: +SELECT influx_sum('/value[1,4]/') from s3; + +-- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 530: +EXPLAIN VERBOSE +SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_sum(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 531: +SELECT influx_sum('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_sum(regex) (stub agg function and group by tag only) (explain) +--Testcase 532: +EXPLAIN VERBOSE +SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_sum(regex) (stub agg function and group by tag only) (result) +--Testcase 533: +SELECT influx_sum('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_sum(regex) (stub agg function, expose data, explain) +--Testcase 534: +EXPLAIN VERBOSE +SELECT (influx_sum('/value[1,4]/')::s3).* from s3; + +-- select influx_sum(regex) (stub agg function, expose data, result) +--Testcase 535: +SELECT (influx_sum('/value[1,4]/')::s3).* from s3; + +-- selector function bottom() (explain) +--Testcase 536: +EXPLAIN VERBOSE +SELECT bottom(value1, 1) FROM s3; + +-- selector function bottom() (result) +--Testcase 537: +SELECT bottom(value1, 1) FROM s3; + +-- selector function bottom() cannot be combined with other functions(explain) +--Testcase 538: +EXPLAIN VERBOSE +SELECT bottom(value1, 1), bottom(value2, 1), bottom(value3, 1), bottom(value4, 1) FROM s3; + +-- selector function bottom() cannot be combined with other functions(result) +--Testcase 539: +SELECT bottom(value1, 1), bottom(value2, 1), bottom(value3, 1), bottom(value4, 1) FROM s3; + +-- select influx_max(*) (stub agg function, explain) +--Testcase 540: +EXPLAIN VERBOSE +SELECT influx_max_all(*) from s3; + +-- select influx_max(*) (stub agg function, result) +--Testcase 541: +SELECT influx_max_all(*) from s3; + +-- select influx_max(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 542: +EXPLAIN VERBOSE +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_max(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 543: +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_max(*) (stub agg function and group by tag only) (explain) +--Testcase 544: +EXPLAIN VERBOSE +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_max(*) (stub agg function and group by tag only) (result) +--Testcase 545: +SELECT influx_max_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_max(*) (stub agg function, expose data, explain) +--Testcase 546: +EXPLAIN VERBOSE +SELECT (influx_max_all(*)::s3).* from s3; + +-- select influx_max(*) (stub agg function, expose data, result) +--Testcase 547: +SELECT (influx_max_all(*)::s3).* from s3; + +-- select influx_max(regex) (stub function, explain) +--Testcase 548: +EXPLAIN VERBOSE +SELECT influx_max('/value[1,4]/') from s3; + +-- select influx_max(regex) (stub function, result) +--Testcase 549: +SELECT influx_max('/value[1,4]/') from s3; + +-- select influx_max(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 550: +EXPLAIN VERBOSE +SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_max(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 551: +SELECT influx_max('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_max(regex) (stub agg function and group by tag only) (explain) +--Testcase 552: +EXPLAIN VERBOSE +SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_max(regex) (stub agg function and group by tag only) (result) +--Testcase 553: +SELECT influx_max('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_max(regex) (stub agg function, expose data, explain) +--Testcase 554: +EXPLAIN VERBOSE +SELECT (influx_max('/value[1,4]/')::s3).* from s3; + +-- select influx_max(regex) (stub agg function, expose data, result) +--Testcase 555: +SELECT (influx_max('/value[1,4]/')::s3).* from s3; + +-- select influx_min(*) (stub agg function, explain) +--Testcase 556: +EXPLAIN VERBOSE +SELECT influx_min_all(*) from s3; + +-- select influx_min(*) (stub agg function, result) +--Testcase 557: +SELECT influx_min_all(*) from s3; + +-- select influx_min(*) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 558: +EXPLAIN VERBOSE +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_min(*) (stub agg function and group by influx_time() and tag) (result) +--Testcase 559: +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_min(*) (stub agg function and group by tag only) (explain) +--Testcase 560: +EXPLAIN VERBOSE +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_min(*) (stub agg function and group by tag only) (result) +--Testcase 561: +SELECT influx_min_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_min(*) (stub agg function, expose data, explain) +--Testcase 562: +EXPLAIN VERBOSE +SELECT (influx_min_all(*)::s3).* from s3; + +-- select influx_min(*) (stub agg function, expose data, result) +--Testcase 563: +SELECT (influx_min_all(*)::s3).* from s3; + +-- select influx_min(regex) (stub function, explain) +--Testcase 564: +EXPLAIN VERBOSE +SELECT influx_min('/value[1,4]/') from s3; + +-- select influx_min(regex) (stub function, result) +--Testcase 565: +SELECT influx_min('/value[1,4]/') from s3; + +-- select influx_min(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 566: +EXPLAIN VERBOSE +SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_min(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 567: +SELECT influx_min('/^v.*/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select influx_min(regex) (stub agg function and group by tag only) (explain) +--Testcase 568: +EXPLAIN VERBOSE +SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_min(regex) (stub agg function and group by tag only) (result) +--Testcase 569: +SELECT influx_min('/value[1,4]/') FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select influx_min(regex) (stub agg function, expose data, explain) +--Testcase 570: +EXPLAIN VERBOSE +SELECT (influx_min('/value[1,4]/')::s3).* from s3; + +-- select influx_min(regex) (stub agg function, expose data, result) +--Testcase 571: +SELECT (influx_min('/value[1,4]/')::s3).* from s3; + +-- selector function percentile() (explain) +--Testcase 572: +EXPLAIN VERBOSE +SELECT percentile(value1, 50), percentile(value2, 60), percentile(value3, 25), percentile(value4, 33) FROM s3; + +-- selector function percentile() (result) +--Testcase 573: +SELECT percentile(value1, 50), percentile(value2, 60), percentile(value3, 25), percentile(value4, 33) FROM s3; + +-- selector function percentile() (explain) +--Testcase 574: +EXPLAIN VERBOSE +SELECT percentile(value1, 1.5), percentile(value2, 6.7), percentile(value3, 20.5), percentile(value4, 75.2) FROM s3; + +-- selector function percentile() (result) +--Testcase 575: +SELECT percentile(value1, 1.5), percentile(value2, 6.7), percentile(value3, 20.5), percentile(value4, 75.2) FROM s3; + +-- select percentile(*, int) (stub agg function, explain) +--Testcase 576: +EXPLAIN VERBOSE +SELECT percentile_all(50) from s3; + +-- select percentile(*, int) (stub agg function, result) +--Testcase 577: +SELECT percentile_all(50) from s3; + +-- select percentile(*, float8) (stub agg function, explain) +--Testcase 578: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) from s3; + +-- select percentile(*, float8) (stub agg function, result) +--Testcase 579: +SELECT percentile_all(70.5) from s3; + +-- select percentile(*, int) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 580: +EXPLAIN VERBOSE +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select percentile(*, int) (stub agg function and group by influx_time() and tag) (result) +--Testcase 581: +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 582: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select percentile(*, float8) (stub agg function and group by influx_time() and tag) (result) +--Testcase 583: +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select percentile(*, int) (stub agg function and group by tag only) (explain) +--Testcase 584: +EXPLAIN VERBOSE +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select percentile(*, int) (stub agg function and group by tag only) (result) +--Testcase 585: +SELECT percentile_all(50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select percentile(*, float8) (stub agg function and group by tag only) (explain) +--Testcase 586: +EXPLAIN VERBOSE +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select percentile(*, float8) (stub agg function and group by tag only) (result) +--Testcase 587: +SELECT percentile_all(70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select percentile(*, int) (stub agg function, expose data, explain) +--Testcase 588: +EXPLAIN VERBOSE +SELECT (percentile_all(50)::s3).* from s3; + +-- select percentile(*, int) (stub agg function, expose data, result) +--Testcase 589: +SELECT (percentile_all(50)::s3).* from s3; + +-- select percentile(*, int) (stub agg function, expose data, explain) +--Testcase 590: +EXPLAIN VERBOSE +SELECT (percentile_all(70.5)::s3).* from s3; + +-- select percentile(*, int) (stub agg function, expose data, result) +--Testcase 591: +SELECT (percentile_all(70.5)::s3).* from s3; + +-- select percentile(regex) (stub function, explain) +--Testcase 592: +EXPLAIN VERBOSE +SELECT percentile('/value[1,4]/', 50) from s3; + +-- select percentile(regex) (stub function, result) +--Testcase 593: +SELECT percentile('/value[1,4]/', 50) from s3; + +-- select percentile(regex) (stub agg function and group by influx_time() and tag) (explain) +--Testcase 594: +EXPLAIN VERBOSE +SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select percentile(regex) (stub agg function and group by influx_time() and tag) (result) +--Testcase 595: +SELECT percentile('/^v.*/', 50) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select percentile(regex) (stub agg function and group by tag only) (explain) +--Testcase 596: +EXPLAIN VERBOSE +SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select percentile(regex) (stub agg function and group by tag only) (result) +--Testcase 597: +SELECT percentile('/value[1,4]/', 70.5) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select percentile(regex) (stub agg function, expose data, explain) +--Testcase 598: +EXPLAIN VERBOSE +SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; + +-- select percentile(regex) (stub agg function, expose data, result) +--Testcase 599: +SELECT (percentile('/value[1,4]/', 50)::s3).* from s3; + +-- select percentile(regex) (stub agg function, expose data, explain) +--Testcase 600: +EXPLAIN VERBOSE +SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; + +-- select percentile(regex) (stub agg function, expose data, result) +--Testcase 601: +SELECT (percentile('/value[1,4]/', 70.5)::s3).* from s3; + +-- selector function top(field_key,N) (explain) +--Testcase 602: +EXPLAIN VERBOSE +SELECT top(value1, 1) FROM s3; + +-- selector function top(field_key,N) (result) +--Testcase 603: +SELECT top(value1, 1) FROM s3; + +-- selector function top(field_key,tag_key(s),N) (explain) +--Testcase 604: +EXPLAIN VERBOSE +SELECT top(value1, tag1, 1) FROM s3; + +-- selector function top(field_key,tag_key(s),N) (result) +--Testcase 605: +SELECT top(value1, tag1, 1) FROM s3; + +-- selector function top() cannot be combined with other functions(explain) +--Testcase 606: +EXPLAIN VERBOSE +SELECT top(value1, 1), top(value2, 1), top(value3, 1), top(value4, 1) FROM s3; + +-- selector function top() cannot be combined with other functions(result) +--Testcase 607: +SELECT top(value1, 1), top(value2, 1), top(value3, 1), top(value4, 1) FROM s3; + +-- select acos (builtin function, explain) +--Testcase 608: +EXPLAIN VERBOSE +SELECT acos(value1), acos(value3) FROM s3; + +-- select acos (builtin function, result) +--Testcase 609: +SELECT acos(value1), acos(value3) FROM s3; + +-- select acos (builtin function, not pushdown constraints, explain) +--Testcase 610: +EXPLAIN VERBOSE +SELECT acos(value1), acos(value3) FROM s3 WHERE to_hex(value2) = '64'; + +-- select acos (builtin function, not pushdown constraints, result) +--Testcase 611: +SELECT acos(value1), acos(value3) FROM s3 WHERE to_hex(value2) = '64'; + +-- select acos (builtin function, pushdown constraints, explain) +--Testcase 612: +EXPLAIN VERBOSE +SELECT acos(value1), acos(value3) FROM s3 WHERE value2 != 200; + +-- select acos (builtin function, pushdown constraints, result) +--Testcase 613: +SELECT acos(value1), acos(value3) FROM s3 WHERE value2 != 200; + +-- select acos as nest function with agg (pushdown, explain) +--Testcase 614: +EXPLAIN VERBOSE +SELECT sum(value3), acos(sum(value3)) FROM s3 WHERE value2 != 200; + +-- select acos as nest function with agg (pushdown, result) +--Testcase 615: +SELECT sum(value3), acos(sum(value3)) FROM s3 WHERE value2 != 200; + +-- select acos as nest with log2 (pushdown, explain) +--Testcase 616: +EXPLAIN VERBOSE +SELECT acos(log2(value1)),acos(log2(1/value1)) FROM s3; + +-- select acos as nest with log2 (pushdown, result) +--Testcase 617: +SELECT acos(log2(value1)),acos(log2(1/value1)) FROM s3; + +-- select acos with non pushdown func and explicit constant (explain) +--Testcase 618: +EXPLAIN VERBOSE +SELECT acos(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; + +-- select acos with non pushdown func and explicit constant (result) +--Testcase 619: +SELECT acos(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; + +-- select acos with order by (explain) +--Testcase 620: +EXPLAIN VERBOSE +SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY acos(1-value1); + +-- select acos with order by (result) +--Testcase 621: +SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY acos(1-value1); + +-- select acos with order by index (result) +--Testcase 622: +SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 2,1; + +-- select acos with order by index (result) +--Testcase 623: +SELECT value1, acos(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 1,2; + +-- select acos and as +--Testcase 624: +SELECT acos(value3) as acos1 FROM s3 WHERE value2 != 200; + +-- select acos(*) (stub agg function, explain) +--Testcase 625: +EXPLAIN VERBOSE +SELECT acos_all() from s3; + +-- select acos(*) (stub agg function, result) +--Testcase 626: +SELECT acos_all() from s3; + +-- select acos(*) (stub agg function and group by tag only) (explain) +--Testcase 627: +EXPLAIN VERBOSE +SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select acos(*) (stub agg function and group by tag only) (result) +--Testcase 628: +SELECT acos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select acos(*) (stub agg function, expose data, explain) +--Testcase 629: +EXPLAIN VERBOSE +SELECT (acos_all()::s3).* from s3; + +-- select acos(*) (stub agg function, expose data, result) +--Testcase 630: +SELECT (acos_all()::s3).* from s3; + +-- select asin (builtin function, explain) +--Testcase 631: +EXPLAIN VERBOSE +SELECT asin(value1), asin(value3) FROM s3; + +-- select asin (builtin function, result) +--Testcase 632: +SELECT asin(value1), asin(value3) FROM s3; + +-- select asin (builtin function, not pushdown constraints, explain) +--Testcase 633: +EXPLAIN VERBOSE +SELECT asin(value1), asin(value3) FROM s3 WHERE to_hex(value2) = '64'; + +-- select asin (builtin function, not pushdown constraints, result) +--Testcase 634: +SELECT asin(value1), asin(value3) FROM s3 WHERE to_hex(value2) = '64'; + +-- select asin (builtin function, pushdown constraints, explain) +--Testcase 635: +EXPLAIN VERBOSE +SELECT asin(value1), asin(value3) FROM s3 WHERE value2 != 200; + +-- select asin (builtin function, pushdown constraints, result) +--Testcase 636: +SELECT asin(value1), asin(value3) FROM s3 WHERE value2 != 200; + +-- select asin as nest function with agg (pushdown, explain) +--Testcase 637: +EXPLAIN VERBOSE +SELECT sum(value3), asin(sum(value3)) FROM s3 WHERE value2 != 200; + +-- select asin as nest function with agg (pushdown, result) +--Testcase 638: +SELECT sum(value3), asin(sum(value3)) FROM s3 WHERE value2 != 200; + +-- select asin as nest with log2 (pushdown, explain) +--Testcase 639: +EXPLAIN VERBOSE +SELECT asin(log2(value1)),asin(log2(1/value1)) FROM s3; + +-- select asin as nest with log2 (pushdown, result) +--Testcase 640: +SELECT asin(log2(value1)),asin(log2(1/value1)) FROM s3; + +-- select asin with non pushdown func and explicit constant (explain) +--Testcase 641: +EXPLAIN VERBOSE +SELECT asin(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; + +-- select asin with non pushdown func and explicit constant (result) +--Testcase 642: +SELECT asin(value3), pi(), 4.1 FROM s3 WHERE value2 != 200; + +-- select asin with order by (explain) +--Testcase 643: +EXPLAIN VERBOSE +SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY asin(1-value1); + +-- select asin with order by (result) +--Testcase 644: +SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY asin(1-value1); + +-- select asin with order by index (result) +--Testcase 645: +SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 2,1; + +-- select asin with order by index (result) +--Testcase 646: +SELECT value1, asin(1-value1) FROM s3 WHERE value2 != 200 ORDER BY 1,2; + +-- select asin and as +--Testcase 647: +SELECT asin(value3) as asin1 FROM s3 WHERE value2 != 200; + +-- select asin(*) (stub agg function, explain) +--Testcase 648: +EXPLAIN VERBOSE +SELECT asin_all() from s3; + +-- select asin(*) (stub agg function, result) +--Testcase 649: +SELECT asin_all() from s3; + +-- select asin(*) (stub agg function and group by tag only) (explain) +--Testcase 650: +EXPLAIN VERBOSE +SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select asin(*) (stub agg function and group by tag only) (result) +--Testcase 651: +SELECT asin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select asin(*) (stub agg function, expose data, explain) +--Testcase 652: +EXPLAIN VERBOSE +SELECT (asin_all()::s3).* from s3; + +-- select asin(*) (stub agg function, expose data, result) +--Testcase 653: +SELECT (asin_all()::s3).* from s3; + +-- select atan (builtin function, explain) +--Testcase 654: +EXPLAIN VERBOSE +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3; + +-- select atan (builtin function, result) +--Testcase 655: +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3; + +-- select atan (builtin function, not pushdown constraints, explain) +--Testcase 656: +EXPLAIN VERBOSE +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select atan (builtin function, not pushdown constraints, result) +--Testcase 657: +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select atan (builtin function, pushdown constraints, explain) +--Testcase 658: +EXPLAIN VERBOSE +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE value2 != 200; + +-- select atan (builtin function, pushdown constraints, result) +--Testcase 659: +SELECT atan(value1), atan(value2), atan(value3), atan(value4) FROM s3 WHERE value2 != 200; + +-- select atan as nest function with agg (pushdown, explain) +--Testcase 660: +EXPLAIN VERBOSE +SELECT sum(value3),atan(sum(value3)) FROM s3; + +-- select atan as nest function with agg (pushdown, result) +--Testcase 661: +SELECT sum(value3),atan(sum(value3)) FROM s3; + +-- select atan as nest with log2 (pushdown, explain) +--Testcase 662: +EXPLAIN VERBOSE +SELECT atan(log2(value1)),atan(log2(1/value1)) FROM s3; + +-- select atan as nest with log2 (pushdown, result) +--Testcase 663: +SELECT atan(log2(value1)),atan(log2(1/value1)) FROM s3; + +-- select atan with non pushdown func and explicit constant (explain) +--Testcase 664: +EXPLAIN VERBOSE +SELECT atan(value3), pi(), 4.1 FROM s3; + +-- select atan with non pushdown func and explicit constant (result) +--Testcase 665: +SELECT atan(value3), pi(), 4.1 FROM s3; + +-- select atan with order by (explain) +--Testcase 666: +EXPLAIN VERBOSE +SELECT value1, atan(1-value1) FROM s3 order by atan(1-value1); + +-- select atan with order by (result) +--Testcase 667: +SELECT value1, atan(1-value1) FROM s3 order by atan(1-value1); + +-- select atan with order by index (result) +--Testcase 668: +SELECT value1, atan(1-value1) FROM s3 order by 2,1; + +-- select atan with order by index (result) +--Testcase 669: +SELECT value1, atan(1-value1) FROM s3 order by 1,2; + +-- select atan and as +--Testcase 670: +SELECT atan(value3) as atan1 FROM s3; + +-- select atan(*) (stub agg function, explain) +--Testcase 671: +EXPLAIN VERBOSE +SELECT atan_all() from s3; + +-- select atan(*) (stub agg function, result) +--Testcase 672: +SELECT atan_all() from s3; + +-- select atan(*) (stub agg function and group by tag only) (explain) +--Testcase 673: +EXPLAIN VERBOSE +SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select atan(*) (stub agg function and group by tag only) (result) +--Testcase 674: +SELECT atan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select atan(*) (stub agg function, expose data, explain) +--Testcase 675: +EXPLAIN VERBOSE +SELECT (atan_all()::s3).* from s3; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 676: +SELECT asin_all(), acos_all(), atan_all() FROM s3; + +-- select atan2 (builtin function, explain) +--Testcase 677: +EXPLAIN VERBOSE +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3; + +-- select atan2 (builtin function, result) +--Testcase 678: +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3; + +-- select atan2 (builtin function, not pushdown constraints, explain) +--Testcase 679: +EXPLAIN VERBOSE +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE to_hex(value2) != '64'; + +-- select atan2 (builtin function, not pushdown constraints, result) +--Testcase 680: +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE to_hex(value2) != '64'; + +-- select atan2 (builtin function, pushdown constraints, explain) +--Testcase 681: +EXPLAIN VERBOSE +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE value2 != 200; + +-- select atan2 (builtin function, pushdown constraints, result) +--Testcase 682: +SELECT atan2(value1, value2), atan2(value2, value3), atan2(value3, value4), atan2(value4, value1) FROM s3 WHERE value2 != 200; + +-- select atan2 as nest function with agg (pushdown, explain) +--Testcase 683: +EXPLAIN VERBOSE +SELECT sum(value3), sum(value4),atan2(sum(value3), sum(value3)) FROM s3; + +-- select atan2 as nest function with agg (pushdown, result) +--Testcase 684: +SELECT sum(value3), sum(value4),atan2(sum(value3), sum(value3)) FROM s3; + +-- select atan2 as nest with log2 (pushdown, explain) +--Testcase 685: +EXPLAIN VERBOSE +SELECT atan2(log2(value1), log2(value1)),atan2(log2(1/value1), log2(1/value1)) FROM s3; + +-- select atan2 as nest with log2 (pushdown, result) +--Testcase 686: +SELECT atan2(log2(value1), log2(value1)),atan2(log2(1/value1), log2(1/value1)) FROM s3; + +-- select atan2 with non pushdown func and explicit constant (explain) +--Testcase 687: +EXPLAIN VERBOSE +SELECT atan2(value3, value4), pi(), 4.1 FROM s3; + +-- select atan2 with non pushdown func and explicit constant (result) +--Testcase 688: +SELECT atan2(value3, value4), pi(), 4.1 FROM s3; + +-- select atan2 with order by (explain) +--Testcase 689: +EXPLAIN VERBOSE +SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by atan2(1-value1, 1-value2); + +-- select atan2 with order by (result) +--Testcase 690: +SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by atan2(1-value1, 1-value2); + +-- select atan2 with order by index (result) +--Testcase 691: +SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by 2,1; + +-- select atan2 with order by index (result) +--Testcase 692: +SELECT value1, atan2(1-value1, 1-value2) FROM s3 order by 1,2; + +-- select atan2 and as +--Testcase 693: +SELECT atan2(value3, value4) as atan21 FROM s3; + +-- select atan2(*) (stub function, explain) +--Testcase 694: +EXPLAIN VERBOSE +SELECT atan2_all(value1) from s3; + +-- select atan2(*) (stub function, result) +--Testcase 695: +SELECT atan2_all(value1) from s3; + +-- select ceil (builtin function, explain) +--Testcase 696: +EXPLAIN VERBOSE +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3; + +-- select ceil (builtin function, result) +--Testcase 697: +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3; + +-- select ceil (builtin function, not pushdown constraints, explain) +--Testcase 698: +EXPLAIN VERBOSE +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select ceil (builtin function, not pushdown constraints, result) +--Testcase 699: +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select ceil (builtin function, pushdown constraints, explain) +--Testcase 700: +EXPLAIN VERBOSE +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE value2 != 200; + +-- select ceil (builtin function, pushdown constraints, result) +--Testcase 701: +SELECT ceil(value1), ceil(value2), ceil(value3), ceil(value4) FROM s3 WHERE value2 != 200; + +-- select ceil as nest function with agg (pushdown, explain) +--Testcase 702: +EXPLAIN VERBOSE +SELECT sum(value3),ceil(sum(value3)) FROM s3; + +-- select ceil as nest function with agg (pushdown, result) +--Testcase 703: +SELECT sum(value3),ceil(sum(value3)) FROM s3; + +-- select ceil as nest with log2 (pushdown, explain) +--Testcase 704: +EXPLAIN VERBOSE +SELECT ceil(log2(value1)),ceil(log2(1/value1)) FROM s3; + +-- select ceil as nest with log2 (pushdown, result) +--Testcase 705: +SELECT ceil(log2(value1)),ceil(log2(1/value1)) FROM s3; + +-- select ceil with non pushdown func and explicit constant (explain) +--Testcase 706: +EXPLAIN VERBOSE +SELECT ceil(value3), pi(), 4.1 FROM s3; + +-- select ceil with non pushdown func and explicit constant (result) +--Testcase 707: +SELECT ceil(value3), pi(), 4.1 FROM s3; + +-- select ceil with order by (explain) +--Testcase 708: +EXPLAIN VERBOSE +SELECT value1, ceil(1-value1) FROM s3 order by ceil(1-value1); + +-- select ceil with order by (result) +--Testcase 709: +SELECT value1, ceil(1-value1) FROM s3 order by ceil(1-value1); + +-- select ceil with order by index (result) +--Testcase 710: +SELECT value1, ceil(1-value1) FROM s3 order by 2,1; + +-- select ceil with order by index (result) +--Testcase 711: +SELECT value1, ceil(1-value1) FROM s3 order by 1,2; + +-- select ceil and as +--Testcase 712: +SELECT ceil(value3) as ceil1 FROM s3; + +-- select ceil(*) (stub agg function, explain) +--Testcase 713: +EXPLAIN VERBOSE +SELECT ceil_all() from s3; + +-- select ceil(*) (stub agg function, result) +--Testcase 714: +SELECT ceil_all() from s3; + +-- select ceil(*) (stub agg function and group by tag only) (explain) +--Testcase 715: +EXPLAIN VERBOSE +SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select ceil(*) (stub agg function and group by tag only) (result) +--Testcase 716: +SELECT ceil_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select ceil(*) (stub agg function, expose data, explain) +--Testcase 717: +EXPLAIN VERBOSE +SELECT (ceil_all()::s3).* from s3; + +-- select ceil(*) (stub agg function, expose data, result) +--Testcase 718: +SELECT (ceil_all()::s3).* from s3; + +-- select cos (builtin function, explain) +--Testcase 719: +EXPLAIN VERBOSE +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3; + +-- select cos (builtin function, result) +--Testcase 720: +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3; + +-- select cos (builtin function, not pushdown constraints, explain) +--Testcase 721: +EXPLAIN VERBOSE +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select cos (builtin function, not pushdown constraints, result) +--Testcase 722: +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select cos (builtin function, pushdown constraints, explain) +--Testcase 723: +EXPLAIN VERBOSE +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE value2 != 200; + +-- select cos (builtin function, pushdown constraints, result) +--Testcase 724: +SELECT cos(value1), cos(value2), cos(value3), cos(value4) FROM s3 WHERE value2 != 200; + +-- select cos as nest function with agg (pushdown, explain) +--Testcase 725: +EXPLAIN VERBOSE +SELECT sum(value3),cos(sum(value3)) FROM s3; + +-- select cos as nest function with agg (pushdown, result) +--Testcase 726: +SELECT sum(value3),cos(sum(value3)) FROM s3; + +-- select cos as nest with log2 (pushdown, explain) +--Testcase 727: +EXPLAIN VERBOSE +SELECT cos(log2(value1)),cos(log2(1/value1)) FROM s3; + +-- select cos as nest with log2 (pushdown, result) +--Testcase 728: +SELECT cos(log2(value1)),cos(log2(1/value1)) FROM s3; + +-- select cos with non pushdown func and explicit constant (explain) +--Testcase 729: +EXPLAIN VERBOSE +SELECT cos(value3), pi(), 4.1 FROM s3; + +-- select cos with non pushdown func and explicit constant (result) +--Testcase 730: +SELECT cos(value3), pi(), 4.1 FROM s3; + +-- select cos with order by (explain) +--Testcase 731: +EXPLAIN VERBOSE +SELECT value1, cos(1-value1) FROM s3 order by cos(1-value1); + +-- select cos with order by (result) +--Testcase 732: +SELECT value1, cos(1-value1) FROM s3 order by cos(1-value1); + +-- select cos with order by index (result) +--Testcase 733: +SELECT value1, cos(1-value1) FROM s3 order by 2,1; + +-- select cos with order by index (result) +--Testcase 734: +SELECT value1, cos(1-value1) FROM s3 order by 1,2; + +-- select cos and as +--Testcase 735: +SELECT cos(value3) as cos1 FROM s3; + +-- select cos(*) (stub agg function, explain) +--Testcase 736: +EXPLAIN VERBOSE +SELECT cos_all() from s3; + +-- select cos(*) (stub agg function, result) +--Testcase 737: +SELECT cos_all() from s3; + +-- select cos(*) (stub agg function and group by tag only) (explain) +--Testcase 738: +EXPLAIN VERBOSE +SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select cos(*) (stub agg function and group by tag only) (result) +--Testcase 739: +SELECT cos_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select exp (builtin function, explain) +--Testcase 740: +EXPLAIN VERBOSE +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3; + +-- select exp (builtin function, result) +--Testcase 741: +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3; + +-- select exp (builtin function, not pushdown constraints, explain) +--Testcase 742: +EXPLAIN VERBOSE +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select exp (builtin function, not pushdown constraints, result) +--Testcase 743: +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select exp (builtin function, pushdown constraints, explain) +--Testcase 744: +EXPLAIN VERBOSE +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE value2 != 200; + +-- select exp (builtin function, pushdown constraints, result) +--Testcase 745: +SELECT exp(value1), exp(value2), exp(value3), exp(value4) FROM s3 WHERE value2 != 200; + +-- select exp as nest function with agg (pushdown, explain) +--Testcase 746: +EXPLAIN VERBOSE +SELECT sum(value3),exp(sum(value3)) FROM s3; + +-- select exp as nest function with agg (pushdown, result) +--Testcase 747: +SELECT sum(value3),exp(sum(value3)) FROM s3; + +-- select exp as nest with log2 (pushdown, explain) +--Testcase 748: +EXPLAIN VERBOSE +SELECT exp(log2(value1)),exp(log2(1/value1)) FROM s3; + +-- select exp as nest with log2 (pushdown, result) +--Testcase 749: +SELECT exp(log2(value1)),exp(log2(1/value1)) FROM s3; + +-- select exp with non pushdown func and explicit constant (explain) +--Testcase 750: +EXPLAIN VERBOSE +SELECT exp(value3), pi(), 4.1 FROM s3; + +-- select exp with non pushdown func and explicit constant (result) +--Testcase 751: +SELECT exp(value3), pi(), 4.1 FROM s3; + +-- select exp with order by (explain) +--Testcase 752: +EXPLAIN VERBOSE +SELECT value1, exp(1-value1) FROM s3 order by exp(1-value1); + +-- select exp with order by (result) +--Testcase 753: +SELECT value1, exp(1-value1) FROM s3 order by exp(1-value1); + +-- select exp with order by index (result) +--Testcase 754: +SELECT value1, exp(1-value1) FROM s3 order by 2,1; + +-- select exp with order by index (result) +--Testcase 755: +SELECT value1, exp(1-value1) FROM s3 order by 1,2; + +-- select exp and as +--Testcase 756: +SELECT exp(value3) as exp1 FROM s3; + +-- select exp(*) (stub agg function, explain) +--Testcase 757: +EXPLAIN VERBOSE +SELECT exp_all() from s3; + +-- select exp(*) (stub agg function, result) +--Testcase 758: +SELECT exp_all() from s3; + +-- select exp(*) (stub agg function and group by tag only) (explain) +--Testcase 759: +EXPLAIN VERBOSE +SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select exp(*) (stub agg function and group by tag only) (result) +--Testcase 760: +SELECT exp_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 761: +SELECT ceil_all(), cos_all(), exp_all() FROM s3; + +-- select floor (builtin function, explain) +--Testcase 762: +EXPLAIN VERBOSE +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3; + +-- select floor (builtin function, result) +--Testcase 763: +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3; + +-- select floor (builtin function, not pushdown constraints, explain) +--Testcase 764: +EXPLAIN VERBOSE +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select floor (builtin function, not pushdown constraints, result) +--Testcase 765: +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select floor (builtin function, pushdown constraints, explain) +--Testcase 766: +EXPLAIN VERBOSE +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE value2 != 200; + +-- select floor (builtin function, pushdown constraints, result) +--Testcase 767: +SELECT floor(value1), floor(value2), floor(value3), floor(value4) FROM s3 WHERE value2 != 200; + +-- select floor as nest function with agg (pushdown, explain) +--Testcase 768: +EXPLAIN VERBOSE +SELECT sum(value3),floor(sum(value3)) FROM s3; + +-- select floor as nest function with agg (pushdown, result) +--Testcase 769: +SELECT sum(value3),floor(sum(value3)) FROM s3; + +-- select floor as nest with log2 (pushdown, explain) +--Testcase 770: +EXPLAIN VERBOSE +SELECT floor(log2(value1)),floor(log2(1/value1)) FROM s3; + +-- select floor as nest with log2 (pushdown, result) +--Testcase 771: +SELECT floor(log2(value1)),floor(log2(1/value1)) FROM s3; + +-- select floor with non pushdown func and explicit constant (explain) +--Testcase 772: +EXPLAIN VERBOSE +SELECT floor(value3), pi(), 4.1 FROM s3; + +-- select floor with non pushdown func and explicit constant (result) +--Testcase 773: +SELECT floor(value3), pi(), 4.1 FROM s3; + +-- select floor with order by (explain) +--Testcase 774: +EXPLAIN VERBOSE +SELECT value1, floor(1-value1) FROM s3 order by floor(1-value1); + +-- select floor with order by (result) +--Testcase 775: +SELECT value1, floor(1-value1) FROM s3 order by floor(1-value1); + +-- select floor with order by index (result) +--Testcase 776: +SELECT value1, floor(1-value1) FROM s3 order by 2,1; + +-- select floor with order by index (result) +--Testcase 777: +SELECT value1, floor(1-value1) FROM s3 order by 1,2; + +-- select floor and as +--Testcase 778: +SELECT floor(value3) as floor1 FROM s3; + +-- select floor(*) (stub agg function, explain) +--Testcase 779: +EXPLAIN VERBOSE +SELECT floor_all() from s3; + +-- select floor(*) (stub agg function, result) +--Testcase 780: +SELECT floor_all() from s3; + +-- select floor(*) (stub agg function and group by tag only) (explain) +--Testcase 781: +EXPLAIN VERBOSE +SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select floor(*) (stub agg function and group by tag only) (result) +--Testcase 782: +SELECT floor_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select floor(*) (stub agg function, expose data, explain) +--Testcase 783: +EXPLAIN VERBOSE +SELECT (floor_all()::s3).* from s3; + +-- select floor(*) (stub agg function, expose data, result) +--Testcase 784: +SELECT (floor_all()::s3).* from s3; + +-- select ln (builtin function, explain) +--Testcase 785: +EXPLAIN VERBOSE +SELECT ln(value1), ln(value2) FROM s3; + +-- select ln (builtin function, result) +--Testcase 786: +SELECT ln(value1), ln(value2) FROM s3; + +-- select ln (builtin function, not pushdown constraints, explain) +--Testcase 787: +EXPLAIN VERBOSE +SELECT ln(value1), ln(value2) FROM s3 WHERE to_hex(value2) != '64'; + +-- select ln (builtin function, not pushdown constraints, result) +--Testcase 788: +SELECT ln(value1), ln(value2) FROM s3 WHERE to_hex(value2) != '64'; + +-- select ln (builtin function, pushdown constraints, explain) +--Testcase 789: +EXPLAIN VERBOSE +SELECT ln(value1), ln(value2) FROM s3 WHERE value2 != 200; + +-- select ln (builtin function, pushdown constraints, result) +--Testcase 790: +SELECT ln(value1), ln(value2) FROM s3 WHERE value2 != 200; + +-- select ln as nest function with agg (pushdown, explain) +--Testcase 791: +EXPLAIN VERBOSE +SELECT sum(value3),ln(sum(value3)) FROM s3; + +-- select ln as nest function with agg (pushdown, result) +--Testcase 792: +SELECT sum(value3),ln(sum(value3)) FROM s3; + +-- select ln as nest with log2 (pushdown, explain) +--Testcase 793: +EXPLAIN VERBOSE +SELECT ln(log2(value1)),ln(log2(1/value1)) FROM s3; + +-- select ln as nest with log2 (pushdown, result) +--Testcase 794: +SELECT ln(log2(value1)),ln(log2(1/value1)) FROM s3; + +-- select ln with non pushdown func and explicit constant (explain) +--Testcase 795: +EXPLAIN VERBOSE +SELECT ln(value3), pi(), 4.1 FROM s3; + +-- select ln with non pushdown func and explicit constant (result) +--Testcase 796: +SELECT ln(value3), pi(), 4.1 FROM s3; + +-- select ln with order by (explain) +--Testcase 797: +EXPLAIN VERBOSE +SELECT value1, ln(1-value1) FROM s3 order by ln(1-value1); + +-- select ln with order by (result) +--Testcase 798: +SELECT value1, ln(1-value1) FROM s3 order by ln(1-value1); + +-- select ln with order by index (result) +--Testcase 799: +SELECT value1, ln(1-value1) FROM s3 order by 2,1; + +-- select ln with order by index (result) +--Testcase 800: +SELECT value1, ln(1-value1) FROM s3 order by 1,2; + +-- select ln and as +--Testcase 801: +SELECT ln(value1) as ln1 FROM s3; + +-- select ln(*) (stub agg function, explain) +--Testcase 802: +EXPLAIN VERBOSE +SELECT ln_all() from s3; + +-- select ln(*) (stub agg function, result) +--Testcase 803: +SELECT ln_all() from s3; + +-- select ln(*) (stub agg function and group by tag only) (explain) +--Testcase 804: +EXPLAIN VERBOSE +SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select ln(*) (stub agg function and group by tag only) (result) +--Testcase 805: +SELECT ln_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 806: +SELECT ln_all(), floor_all() FROM s3; + +-- select pow (builtin function, explain) +--Testcase 807: +EXPLAIN VERBOSE +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3; + +-- select pow (builtin function, result) +--Testcase 808: +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3; + +-- select pow (builtin function, not pushdown constraints, explain) +--Testcase 809: +EXPLAIN VERBOSE +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE to_hex(value2) != '64'; + +-- select pow (builtin function, not pushdown constraints, result) +--Testcase 810: +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE to_hex(value2) != '64'; + +-- select pow (builtin function, pushdown constraints, explain) +--Testcase 811: +EXPLAIN VERBOSE +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE value2 != 200; + +-- select pow (builtin function, pushdown constraints, result) +--Testcase 812: +SELECT pow(value1, 2), pow(value2, 2), pow(value3, 2), pow(value4, 2) FROM s3 WHERE value2 != 200; + +-- select pow as nest function with agg (pushdown, explain) +--Testcase 813: +EXPLAIN VERBOSE +SELECT sum(value3),pow(sum(value3), 2) FROM s3; + +-- select pow as nest function with agg (pushdown, result) +--Testcase 814: +SELECT sum(value3),pow(sum(value3), 2) FROM s3; + +-- select pow as nest with log2 (pushdown, explain) +--Testcase 815: +EXPLAIN VERBOSE +SELECT pow(log2(value1), 2),pow(log2(1/value1), 2) FROM s3; + +-- select pow as nest with log2 (pushdown, result) +--Testcase 816: +SELECT pow(log2(value1), 2),pow(log2(1/value1), 2) FROM s3; + +-- select pow with non pushdown func and explicit constant (explain) +--Testcase 817: +EXPLAIN VERBOSE +SELECT pow(value3, 2), pi(), 4.1 FROM s3; + +-- select pow with non pushdown func and explicit constant (result) +--Testcase 818: +SELECT pow(value3, 2), pi(), 4.1 FROM s3; + +-- select pow with order by (explain) +--Testcase 819: +EXPLAIN VERBOSE +SELECT value1, pow(1-value1, 2) FROM s3 order by pow(1-value1, 2); + +-- select pow with order by (result) +--Testcase 820: +SELECT value1, pow(1-value1, 2) FROM s3 order by pow(1-value1, 2); + +-- select pow with order by index (result) +--Testcase 821: +SELECT value1, pow(1-value1, 2) FROM s3 order by 2,1; + +-- select pow with order by index (result) +--Testcase 822: +SELECT value1, pow(1-value1, 2) FROM s3 order by 1,2; + +-- select pow and as +--Testcase 823: +SELECT pow(value3, 2) as pow1 FROM s3; + +-- select pow_all(2) (stub agg function, explain) +--Testcase 824: +EXPLAIN VERBOSE +SELECT pow_all(2) from s3; + +-- select pow_all(2) (stub agg function, result) +--Testcase 825: +SELECT pow_all(2) from s3; + +-- select pow_all(2) (stub agg function and group by tag only) (explain) +--Testcase 826: +EXPLAIN VERBOSE +SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select pow_all(2) (stub agg function and group by tag only) (result) +--Testcase 827: +SELECT pow_all(2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select pow_all(2) (stub agg function, expose data, explain) +--Testcase 828: +EXPLAIN VERBOSE +SELECT (pow_all(2)::s3).* from s3; + +-- select pow_all(2) (stub agg function, expose data, result) +--Testcase 829: +SELECT (pow_all(2)::s3).* from s3; + +-- select round (builtin function, explain) +--Testcase 830: +EXPLAIN VERBOSE +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3; + +-- select round (builtin function, result) +--Testcase 831: +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3; + +-- select round (builtin function, not pushdown constraints, explain) +--Testcase 832: +EXPLAIN VERBOSE +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select round (builtin function, not pushdown constraints, result) +--Testcase 833: +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select round (builtin function, pushdown constraints, explain) +--Testcase 834: +EXPLAIN VERBOSE +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE value2 != 200; + +-- select round (builtin function, pushdown constraints, result) +--Testcase 835: +SELECT round(value1), round(value2), round(value3), round(value4) FROM s3 WHERE value2 != 200; + +-- select round as nest function with agg (pushdown, explain) +--Testcase 836: +EXPLAIN VERBOSE +SELECT sum(value3),round(sum(value3)) FROM s3; + +-- select round as nest function with agg (pushdown, result) +--Testcase 837: +SELECT sum(value3),round(sum(value3)) FROM s3; + +-- select round as nest with log2 (pushdown, explain) +--Testcase 838: +EXPLAIN VERBOSE +SELECT round(log2(value1)),round(log2(1/value1)) FROM s3; + +-- select round as nest with log2 (pushdown, result) +--Testcase 839: +SELECT round(log2(value1)),round(log2(1/value1)) FROM s3; + +-- select round with non pushdown func and roundlicit constant (explain) +--Testcase 840: +EXPLAIN VERBOSE +SELECT round(value3), pi(), 4.1 FROM s3; + +-- select round with non pushdown func and roundlicit constant (result) +--Testcase 841: +SELECT round(value3), pi(), 4.1 FROM s3; + +-- select round with order by (explain) +--Testcase 842: +EXPLAIN VERBOSE +SELECT value1, round(1-value1) FROM s3 order by round(1-value1); + +-- select round with order by (result) +--Testcase 843: +SELECT value1, round(1-value1) FROM s3 order by round(1-value1); + +-- select round with order by index (result) +--Testcase 844: +SELECT value1, round(1-value1) FROM s3 order by 2,1; + +-- select round with order by index (result) +--Testcase 845: +SELECT value1, round(1-value1) FROM s3 order by 1,2; + +-- select round and as +--Testcase 846: +SELECT round(value3) as round1 FROM s3; + +-- select round(*) (stub agg function, explain) +--Testcase 847: +EXPLAIN VERBOSE +SELECT round_all() from s3; + +-- select round(*) (stub agg function, result) +--Testcase 848: +SELECT round_all() from s3; + +-- select round(*) (stub agg function and group by tag only) (explain) +--Testcase 849: +EXPLAIN VERBOSE +SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select round(*) (stub agg function and group by tag only) (result) +--Testcase 850: +SELECT round_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select round(*) (stub agg function, expose data, explain) +--Testcase 851: +EXPLAIN VERBOSE +SELECT (round_all()::s3).* from s3; + +-- select round(*) (stub agg function, expose data, result) +--Testcase 852: +SELECT (round_all()::s3).* from s3; + +-- select sin (builtin function, explain) +--Testcase 853: +EXPLAIN VERBOSE +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3; + +-- select sin (builtin function, result) +--Testcase 854: +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3; + +-- select sin (builtin function, not pushdown constraints, explain) +--Testcase 855: +EXPLAIN VERBOSE +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select sin (builtin function, not pushdown constraints, result) +--Testcase 856: +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select sin (builtin function, pushdown constraints, explain) +--Testcase 857: +EXPLAIN VERBOSE +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE value2 != 200; + +-- select sin (builtin function, pushdown constraints, result) +--Testcase 858: +SELECT sin(value1), sin(value2), sin(value3), sin(value4) FROM s3 WHERE value2 != 200; + +-- select sin as nest function with agg (pushdown, explain) +--Testcase 859: +EXPLAIN VERBOSE +SELECT sum(value3),sin(sum(value3)) FROM s3; + +-- select sin as nest function with agg (pushdown, result) +--Testcase 860: +SELECT sum(value3),sin(sum(value3)) FROM s3; + +-- select sin as nest with log2 (pushdown, explain) +--Testcase 861: +EXPLAIN VERBOSE +SELECT sin(log2(value1)),sin(log2(1/value1)) FROM s3; + +-- select sin as nest with log2 (pushdown, result) +--Testcase 862: +SELECT sin(log2(value1)),sin(log2(1/value1)) FROM s3; + +-- select sin with non pushdown func and explicit constant (explain) +--Testcase 863: +EXPLAIN VERBOSE +SELECT sin(value3), pi(), 4.1 FROM s3; + +-- select sin with non pushdown func and explicit constant (result) +--Testcase 864: +SELECT sin(value3), pi(), 4.1 FROM s3; + +-- select sin with order by (explain) +--Testcase 865: +EXPLAIN VERBOSE +SELECT value1, sin(1-value1) FROM s3 order by sin(1-value1); + +-- select sin with order by (result) +--Testcase 866: +SELECT value1, sin(1-value1) FROM s3 order by sin(1-value1); + +-- select sin with order by index (result) +--Testcase 867: +SELECT value1, sin(1-value1) FROM s3 order by 2,1; + +-- select sin with order by index (result) +--Testcase 868: +SELECT value1, sin(1-value1) FROM s3 order by 1,2; + +-- select sin and as +--Testcase 869: +SELECT sin(value3) as sin1 FROM s3; + +-- select sin(*) (stub agg function, explain) +--Testcase 870: +EXPLAIN VERBOSE +SELECT sin_all() from s3; + +-- select sin(*) (stub agg function, result) +--Testcase 871: +SELECT sin_all() from s3; + +-- select sin(*) (stub agg function and group by tag only) (explain) +--Testcase 872: +EXPLAIN VERBOSE +SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select sin(*) (stub agg function and group by tag only) (result) +--Testcase 873: +SELECT sin_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select tan (builtin function, explain) +--Testcase 874: +EXPLAIN VERBOSE +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3; + +-- select tan (builtin function, result) +--Testcase 875: +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3; + +-- select tan (builtin function, not pushdown constraints, explain) +--Testcase 876: +EXPLAIN VERBOSE +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select tan (builtin function, not pushdown constraints, result) +--Testcase 877: +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE to_hex(value2) != '64'; + +-- select tan (builtin function, pushdown constraints, explain) +--Testcase 878: +EXPLAIN VERBOSE +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE value2 != 200; + +-- select tan (builtin function, pushdown constraints, result) +--Testcase 879: +SELECT tan(value1), tan(value2), tan(value3), tan(value4) FROM s3 WHERE value2 != 200; + +-- select tan as nest function with agg (pushdown, explain) +--Testcase 880: +EXPLAIN VERBOSE +SELECT sum(value3),tan(sum(value3)) FROM s3; + +-- select tan as nest function with agg (pushdown, result) +--Testcase 881: +SELECT sum(value3),tan(sum(value3)) FROM s3; + +-- select tan as nest with log2 (pushdown, explain) +--Testcase 882: +EXPLAIN VERBOSE +SELECT tan(log2(value1)),tan(log2(1/value1)) FROM s3; + +-- select tan as nest with log2 (pushdown, result) +--Testcase 883: +SELECT tan(log2(value1)),tan(log2(1/value1)) FROM s3; + +-- select tan with non pushdown func and tanlicit constant (explain) +--Testcase 884: +EXPLAIN VERBOSE +SELECT tan(value3), pi(), 4.1 FROM s3; + +-- select tan with non pushdown func and tanlicit constant (result) +--Testcase 885: +SELECT tan(value3), pi(), 4.1 FROM s3; + +-- select tan with order by (explain) +--Testcase 886: +EXPLAIN VERBOSE +SELECT value1, tan(1-value1) FROM s3 order by tan(1-value1); + +-- select tan with order by (result) +--Testcase 887: +SELECT value1, tan(1-value1) FROM s3 order by tan(1-value1); + +-- select tan with order by index (result) +--Testcase 888: +SELECT value1, tan(1-value1) FROM s3 order by 2,1; + +-- select tan with order by index (result) +--Testcase 889: +SELECT value1, tan(1-value1) FROM s3 order by 1,2; + +-- select tan and as +--Testcase 890: +SELECT tan(value3) as tan1 FROM s3; + +-- select tan(*) (stub agg function, explain) +--Testcase 891: +EXPLAIN VERBOSE +SELECT tan_all() from s3; + +-- select tan(*) (stub agg function, result) +--Testcase 892: +SELECT tan_all() from s3; + +-- select tan(*) (stub agg function and group by tag only) (explain) +--Testcase 893: +EXPLAIN VERBOSE +SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select tan(*) (stub agg function and group by tag only) (result) +--Testcase 894: +SELECT tan_all() FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select multiple star functions (do not push down, raise warning and stub error) (result) +--Testcase 895: +SELECT sin_all(), round_all(), tan_all() FROM s3; + +-- select predictors function holt_winters() (explain) +--Testcase 896: +EXPLAIN VERBOSE +SELECT holt_winters(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + +-- select predictors function holt_winters() (result) +--Testcase 897: +SELECT holt_winters(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + +-- select predictors function holt_winters_with_fit() (explain) +--Testcase 898: +EXPLAIN VERBOSE +SELECT holt_winters_with_fit(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + +-- select predictors function holt_winters_with_fit() (result) +--Testcase 899: +SELECT holt_winters_with_fit(min(value1), 5, 1) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'); + +-- select count(*) function of InfluxDB (stub agg function, explain) +--Testcase 900: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3; + +-- select count(*) function of InfluxDB (stub agg function, result) +--Testcase 901: +SELECT influx_count_all(*) FROM s3; + +-- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (explain) +--Testcase 902: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select count(*) function of InfluxDB (stub agg function and group by influx_time() and tag) (result) +--Testcase 903: +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select count(*) function of InfluxDB (stub agg function and group by tag only) (explain) +--Testcase 904: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select count(*) function of InfluxDB (stub agg function and group by tag only) (result) +--Testcase 905: +SELECT influx_count_all(*) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select count(*) function of InfluxDB over join query (explain) +--Testcase 906: +EXPLAIN VERBOSE +SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select count(*) function of InfluxDB over join query (result, stub call error) +--Testcase 907: +SELECT influx_count_all(*) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select distinct (stub agg function, explain) +--Testcase 908: +EXPLAIN VERBOSE +SELECT influx_distinct(value1) FROM s3; + +-- select distinct (stub agg function, result) +--Testcase 909: +SELECT influx_distinct(value1) FROM s3; + +-- select distinct (stub agg function and group by influx_time() and tag) (explain) +--Testcase 910: +EXPLAIN VERBOSE +SELECT influx_distinct(value1), influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select distinct (stub agg function and group by influx_time() and tag) (result) +--Testcase 911: +SELECT influx_distinct(value1), influx_time(time, interval '1s'),tag1 FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY influx_time(time, interval '1s'), tag1; + +-- select distinct (stub agg function and group by tag only) (explain) +--Testcase 912: +EXPLAIN VERBOSE +SELECT influx_distinct(value2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select distinct (stub agg function and group by tag only) (result) +--Testcase 913: +SELECT influx_distinct(value2) FROM s3 WHERE time >= to_timestamp(0) and time <= to_timestamp(4) GROUP BY tag1; + +-- select distinct over join query (explain) +--Testcase 914: +EXPLAIN VERBOSE +SELECT influx_distinct(t1.value2) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select distinct over join query (result, stub call error) +--Testcase 915: +SELECT influx_distinct(t1.value2) FROM s3 t1 INNER JOIN s3 t2 ON (t1.value1 = t2.value1) where t1.value1 = 0.1; + +-- select distinct with having (explain) +--Testcase 916: +EXPLAIN VERBOSE +SELECT influx_distinct(value2) FROM s3 HAVING influx_distinct(value2) > 100; + +-- select distinct with having (result, not pushdown, stub call error) +--Testcase 917: +SELECT influx_distinct(value2) FROM s3 HAVING influx_distinct(value2) > 100; + +--Testcase 918: +DROP FOREIGN TABLE s3; + +--Testcase 919: +CREATE FOREIGN TABLE b3(time timestamp with time zone, tag1 text, value1 float8, value2 bigint, value3 bool) SERVER server1 OPTIONS(table 'b3', tags 'tag1'); + +-- bool type var in where clause (result) +--Testcase 920: +EXPLAIN VERBOSE +SELECT sqrt(abs(value1)) FROM b3 WHERE value3 != true ORDER BY 1; + +-- bool type var in where clause (result) +--Testcase 921: +SELECT sqrt(abs(value1)) FROM b3 WHERE value3 != true ORDER BY 1; + +--Testcase 922: +DROP FOREIGN TABLE b3; + +--Testcase 923: +DROP USER MAPPING FOR CURRENT_USER SERVER server1; +--Testcase 924: +DROP SERVER server1; +--Testcase 925: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/sql/parameters.conf b/sql/parameters.conf deleted file mode 100644 index d25cdd6..0000000 --- a/sql/parameters.conf +++ /dev/null @@ -1,4 +0,0 @@ -\set INFLUXDB_HOST '\'http://localhost\'' -\set INFLUXDB_PORT '\'8086\'' -\set INFLUXDB_USER '\'user\'' -\set INFLUXDB_PASS '\'pass\'' \ No newline at end of file diff --git a/sql/parameters_cxx_v1.conf b/sql/parameters_cxx_v1.conf new file mode 100644 index 0000000..e9a799e --- /dev/null +++ b/sql/parameters_cxx_v1.conf @@ -0,0 +1,18 @@ +\set AUTHENTICATION 'user \'user\', password \'pass\'' +\set SERVER 'host \'http://localhost\', port \'18086\', version \'1\'' + +\set RECOVER_INIT_TXT_DROP_BUCKET '' +\set RECOVER_INIT_TXT_CREATE_BUCKET '' +\set RECOVER_INIT_TXT '\\! docker exec influxdb_server_v1 influx -username=user -password=pass -import -path=/tmp/init.txt -precision=s > /dev/null' + +\set INIT_FIELDS_ORIGINAL '\\! docker exec influxdb_server_v1 influx -username=user -password=pass -import -path=/tmp/fields_original.txt -precision=ns > /dev/null' +\set RECOVER_INIT_FIELDS_ADD_1 '\\! docker exec influxdb_server_v1 influx -username=user -password=pass -import -path=/tmp/fields_add_1.txt -precision=ns > /dev/null' +\set RECOVER_INIT_FIELDS_ADD_20 '\\! docker exec influxdb_server_v1 influx -username=user -password=pass -import -path=/tmp/fields_add_20.txt -precision=ns > /dev/null' + +\set INIT_MULTILEY_ORIGINAL '\\! docker exec influxdb_server_v1 influx -username=user -password=pass -import -path=/tmp/multikey_original.txt -precision=ns > /dev/null' +\set RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS '\\! docker exec influxdb_server_v1 influx -username=user -password=pass -import -path=/tmp/multikey_add_1tag_1field.txt -precision=ns > /dev/null' +\set RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS '\\! docker exec influxdb_server_v1 influx -username=user -password=pass -import -path=/tmp/multikey_add_5tag_20field.txt -precision=ns > /dev/null' + +\set INIT_TAG_ORIGINAL '\\! docker exec influxdb_server_v1 influx -username=user -password=pass -import -path=/tmp/tag_original.txt -precision=s > /dev/null' +\set RECOVER_INIT_TAG_ADD_1 '\\! docker exec influxdb_server_v1 influx -username=user -password=pass -import -path=/tmp/tag_add_1.txt -precision=s > /dev/null' +\set RECOVER_INIT_TAG_ADD_20 '\\! docker exec influxdb_server_v1 influx -username=user -password=pass -import -path=/tmp/tag_add_20.txt -precision=s > /dev/null' diff --git a/sql/parameters_cxx_v2.conf b/sql/parameters_cxx_v2.conf new file mode 100644 index 0000000..504ee31 --- /dev/null +++ b/sql/parameters_cxx_v2.conf @@ -0,0 +1,18 @@ +\set AUTHENTICATION 'auth_token \'mytoken\'' +\set SERVER 'host \'http://localhost\', port \'38086\', version \'2\', retention_policy \'\'' + +\set RECOVER_INIT_TXT_DROP_BUCKET '\\! docker exec influxdb_server_v2 influx bucket delete --name mydb > /dev/null' +\set RECOVER_INIT_TXT_CREATE_BUCKET '\\! docker exec influxdb_server_v2 influx v1 dbrp create --bucket-id $(docker exec influxdb_server_v2 influx bucket create -n mydb | grep mydb | cut -f 1) --db mydb -rp autogen --default > /dev/null' +\set RECOVER_INIT_TXT '\\! docker exec influxdb_server_v2 influx write --bucket mydb --precision s --file /tmp/init.txt > /dev/null' + +\set INIT_FIELDS_ORIGINAL '\\! docker exec influxdb_server_v2 influx write --bucket schemalessdb --precision ns --file /tmp/fields_original.txt > /dev/null' +\set RECOVER_INIT_FIELDS_ADD_1 '\\! docker exec influxdb_server_v2 influx write --bucket schemalessdb --precision ns --file /tmp/fields_add_1.txt > /dev/null' +\set RECOVER_INIT_FIELDS_ADD_20 '\\! docker exec influxdb_server_v2 influx write --bucket schemalessdb --precision ns --file /tmp/fields_add_20.txt > /dev/null' + +\set INIT_MULTILEY_ORIGINAL '\\! docker exec influxdb_server_v2 influx write --bucket schemalessdb --precision ns --file /tmp/multikey_original.txt > /dev/null' +\set RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS '\\! docker exec influxdb_server_v2 influx write --bucket schemalessdb --precision ns --file /tmp/multikey_add_1tag_1field.txt > /dev/null' +\set RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS '\\! docker exec influxdb_server_v2 influx write --bucket schemalessdb --precision ns --file /tmp/multikey_add_5tag_20field.txt > /dev/null' + +\set INIT_TAG_ORIGINAL '\\! docker exec influxdb_server_v2 influx write --bucket schemalessdb --precision s --file /tmp/tag_original.txt > /dev/null' +\set RECOVER_INIT_TAG_ADD_1 '\\! docker exec influxdb_server_v2 influx write --bucket schemalessdb --precision s --file /tmp/tag_add_1.txt > /dev/null' +\set RECOVER_INIT_TAG_ADD_20 '\\! docker exec influxdb_server_v2 influx write --bucket schemalessdb --precision s --file /tmp/tag_add_20.txt > /dev/null' diff --git a/sql/parameters_go.conf b/sql/parameters_go.conf new file mode 100644 index 0000000..3cbfc8d --- /dev/null +++ b/sql/parameters_go.conf @@ -0,0 +1,18 @@ +\set AUTHENTICATION 'user \'user\', password \'pass\'' +\set SERVER 'host \'http://localhost\', port \'8086\'' + +\set RECOVER_INIT_TXT_DROP_BUCKET '' +\set RECOVER_INIT_TXT_CREATE_BUCKET '' +\set RECOVER_INIT_TXT '\\! influx -import -path=init/init.txt -precision=s > /dev/null' + +\set INIT_FIELDS_ORIGINAL '\\! influx -import -path=init/fields_original.txt -precision=ns > /dev/null' +\set RECOVER_INIT_FIELDS_ADD_1 '\\! influx -import -path=init/fields_add_1.txt -precision=ns > /dev/null' +\set RECOVER_INIT_FIELDS_ADD_20 '\\! influx -import -path=init/fields_add_20.txt -precision=ns > /dev/null' + +\set INIT_MULTILEY_ORIGINAL '\\! influx -import -path=init/multikey_original.txt -precision=ns > /dev/null' +\set RECOVER_INIT_MULTILEY_ADD_1TAG_1FIELDS '\\! influx -import -path=init/multikey_add_1tag_1field.txt -precision=ns > /dev/null' +\set RECOVER_INIT_MULTILEY_ADD_5TAG_20FIELDS '\\! influx -import -path=init/multikey_add_5tag_20field.txt -precision=ns > /dev/null' + +\set INIT_TAG_ORIGINAL '\\! influx -import -path=init/tag_original.txt -precision=s > /dev/null' +\set RECOVER_INIT_TAG_ADD_1 '\\! influx -import -path=init/tag_add_1.txt -precision=s > /dev/null' +\set RECOVER_INIT_TAG_ADD_20 '\\! influx -import -path=init/tag_add_20.txt -precision=s > /dev/null' diff --git a/sql/performance/influxdb_performance.sql b/sql/performance/influxdb_performance.sql new file mode 100644 index 0000000..6368725 --- /dev/null +++ b/sql/performance/influxdb_performance.sql @@ -0,0 +1,379 @@ +-- =================================================================== +-- create FDW objects +-- =================================================================== +\set ECHO none +\ir sql/parameters.conf +\set DATA_SIZE '1000' +\set ECHO all +\timing + +SET datestyle = ISO; +--Testcase 1: +CREATE EXTENSION influxdb_fdw; + +-- need change base on multi version support + +--Testcase 2: +CREATE SERVER influxdb_svr FOREIGN DATA WRAPPER influxdb_fdw + OPTIONS (dbname 'performance_test', :SERVER); + +--Testcase 3: +CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_svr OPTIONS (:AUTHENTICATION); + +--Testcase 4: +CREATE FOREIGN TABLE tbl1 ( + tag1 text, + tag2 text, + tag3 text, + c1 bigint, + c2 text, + c3 double precision, + c4 boolean, + time timestamp +) SERVER influxdb_svr OPTIONS (table 'tbl1', tags 'tag1, tag2, tag3'); + +-- =================================================================== +-- test for insert data +-- =================================================================== +-- +-- batch size 1 +-- +--Testcase 5: +EXPLAIN VERBOSE +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + +-- checking all record is inserted +--Testcase 6: +EXPLAIN VERBOSE +SELECT count(*) FROM tbl1; +-- +-- batch size 10 +-- +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); + +--Testcase 7: +EXPLAIN VERBOSE +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + +-- checking all record is inserted +--Testcase 8: +EXPLAIN VERBOSE +SELECT count(*) FROM tbl1; + +-- +-- batch size 1000 +-- +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '1000'); + +--Testcase 9: +EXPLAIN VERBOSE +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + +-- checking all record is inserted +--Testcase 10: +EXPLAIN VERBOSE +SELECT count(*) FROM tbl1; +-- +-- batch size 5000 +-- + +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '5000'); +--Testcase 11: +EXPLAIN VERBOSE +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + +-- checking all record is inserted +--Testcase 12: +SELECT count(*) FROM tbl1; +-- clean-up +--Testcase 13: +DELETE FROM tbl1; + +-- +-- batch size 20000 +-- +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '20000'); + +--Testcase 14: +EXPLAIN VERBOSE +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + +-- checking all record is inserted +--Testcase 15: +EXPLAIN VERBOSE +SELECT count(*) FROM tbl1; +-- does not clean-up, using inserted data to test SELECT + +-- =================================================================== +-- test for SELECT data +-- =================================================================== +-- select all column +--Testcase 16: +EXPLAIN VERBOSE +SELECT * FROM tbl1; +-- select one column +--Testcase 17: +EXPLAIN VERBOSE +SELECT c1 FROM tbl1; +-- +-- WHERE condition +-- +-- 20% +--Testcase 18: +EXPLAIN VERBOSE +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 5; +-- 10% +--Testcase 19: +EXPLAIN VERBOSE +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 10; +-- 1% +--Testcase 20: +EXPLAIN VERBOSE +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 100; +-- +-- agg push down +-- +--Testcase 21: +EXPLAIN VERBOSE +SELECT avg(c1), count(*) FROM tbl1; +-- +-- select data based on time series as: time period, data frequency +-- + +--Testcase 22: +EXPLAIN VERBOSE +SELECT * FROM tbl1 WHERE time <= now() AND time > now() - interval '1 day' GROUP BY tag2, tag3, tag1, c1, c2, c3, c4, time; +--Testcase 23: +EXPLAIN VERBOSE +SELECT DISTINCT (tag1) FROM tbl1 GROUP BY tag1; +--Testcase 24: +EXPLAIN VERBOSE SELECT avg(c1), sum(c3)/:DATA_SIZE FROM tbl1 WHERE time < now() AND time > now() - interval '2 days'; +--Testcase 25: +EXPLAIN VERBOSE SELECT count(tag1), avg(c1) FROM tbl1 WHERE time > now() - interval '1 day' GROUP BY tag1; +--Testcase 26: +EXPLAIN VERBOSE SELECT tag1, avg(c3), avg(c1), c2 FROM tbl1 WHERE time > '1970-02-11 00:00:00'::timestamp AND time < now() GROUP BY tag1, c1, c2, c3; +--Testcase 27: +EXPLAIN VERBOSE SELECT max(c1), min(c2), min(c3) FROM tbl1 WHERE time > now() - interval '3 days'; +-- +-- DELETE +-- +--Testcase 28: +EXPLAIN VERBOSE DELETE FROM tbl1 WHERE tag1 = '000'; +--Testcase 29: +EXPLAIN VERBOSE DELETE FROM tbl1 WHERE tag2 = 'tag2_111'; +--Testcase 30: +EXPLAIN VERBOSE DELETE FROM tbl1 WHERE tag1 = '011' AND tag2 IS NOT NULL; +--Testcase 31: +EXPLAIN VERBOSE DELETE FROM tbl1; +-- Execute phase + +-- =================================================================== +-- test for insert data +-- =================================================================== + +-- batch size 1 +--Testcase 32: +DELETE FROM tbl1; + +ALTER SERVER influxdb_svr OPTIONS (DROP batch_size); +--Testcase 33: +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + +-- checking all record is inserted +--Testcase 34: +SELECT count(*) FROM tbl1; +--Testcase 35: +SELECT * FROM tbl1; +-- clean-up +--Testcase 36: +DELETE FROM tbl1; +-- +-- batch size 10 +-- +ALTER SERVER influxdb_svr OPTIONS (ADD batch_size '10'); + +--Testcase 37: +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + +-- checking all record is inserted +--Testcase 38: +SELECT count(*) FROM tbl1; +-- clean-up +--Testcase 39: +DELETE FROM tbl1; +-- +-- batch size 1000 +-- +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '1000'); +--Testcase 40: +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + +-- checking all record is inserted +--Testcase 41: +SELECT count(*) FROM tbl1; +-- clean-up +--Testcase 42: +DELETE FROM tbl1; +-- +-- batch size 5000 +-- +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '5000'); +--Testcase 43: +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + +-- checking all record is inserted +--Testcase 44: +SELECT count(*) FROM tbl1; +-- clean-up +--Testcase 45: +DELETE FROM tbl1; +-- +-- batch size 20000 +-- + +ALTER SERVER influxdb_svr OPTIONS (SET batch_size '20000'); +--Testcase 46: +INSERT INTO tbl1 (tag1, tag2, tag3, c1, c2, c3, c4) + SELECT to_char(id % 100, 'FM000'), + to_char(id % 1000, 'FM0000'), + to_char(id % 5000, 'FM0000'), + id, + to_char(id % 100, 'FM00000000000000000000'), -- 20 digits + sqrt(id), + true + FROM generate_series(1, :DATA_SIZE) id; + +-- checking all record is inserted +--Testcase 47: +SELECT count(*) FROM tbl1; + +-- does not clean-up, using inserted data to test SELECT + +-- =================================================================== +-- test for SELECT data +-- =================================================================== +-- select all column +--Testcase 48: +SELECT * FROM tbl1; +-- select one column +--Testcase 49: +SELECT c1 FROM tbl1; + +-- +-- WHERE condition +-- +-- 20% +--Testcase 50: +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 5; +-- 10% +--Testcase 51: +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 10; +-- 1% +--Testcase 52: +SELECT * FROM tbl1 WHERE c1 < :DATA_SIZE / 100; +-- +-- agg push down +-- +--Testcase 53: +SELECT avg(c1), count(*) FROM tbl1; +-- +-- select data based on time series as: time period, data frequency +-- +--Testcase 54: +SELECT * FROM tbl1 WHERE time <= now() AND time > now() - interval '1 day' GROUP BY tag2, tag3, tag1, c1, c2, c3, c4, time; +--Testcase 55: +SELECT DISTINCT (tag1) FROM tbl1 GROUP BY tag1; +--Testcase 56: +SELECT avg(c1), sum(c3)/:DATA_SIZE FROM tbl1 WHERE time < now() AND time > now() - interval '2 days'; +--Testcase 57: +SELECT count(tag1), avg(c1) FROM tbl1 WHERE time > now() - interval '1 day' GROUP BY tag1; +--Testcase 58: +SELECT tag1, avg(c3), avg(c1), c2 FROM tbl1 WHERE time > '1970-02-11 00:00:00'::timestamp AND time < now() GROUP BY tag1, c1, c2, c3; +--Testcase 59: +SELECT max(c1), min(c2), min(c3) FROM tbl1 WHERE time > now() - interval '3 days'; +-- +-- DELETE +-- +--Testcase 60: +DELETE FROM tbl1 WHERE tag1 = '000'; +--Testcase 61: +DELETE FROM tbl1 WHERE tag2 = 'tag2_111'; +--Testcase 62: +DELETE FROM tbl1 WHERE tag1 = '011' AND tag2 IS NOT NULL; +--Testcase 63: +DELETE FROM tbl1; + +--Testcase 64: +DROP EXTENSION influxdb_fdw CASCADE; diff --git a/test.sh b/test.sh index 48d732f..96c4c3a 100755 --- a/test.sh +++ b/test.sh @@ -1,5 +1,25 @@ -./init.sh +#! /bin/bash + sed -i 's/REGRESS =.*/REGRESS = aggregate influxdb_fdw selectfunc extra\/join extra\/limit extra\/aggregates extra\/insert extra\/prepare extra\/select_having extra\/select extra\/influxdb_fdw_post schemaless\/aggregate schemaless\/influxdb_fdw schemaless\/selectfunc schemaless\/schemaless schemaless\/extra\/join schemaless\/extra\/limit schemaless\/extra\/aggregates schemaless\/extra\/prepare schemaless\/extra\/select_having schemaless\/extra\/insert schemaless\/extra\/select schemaless\/extra\/influxdb_fdw_post schemaless\/add_fields schemaless\/add_tags schemaless\/add_multi_key /' Makefile -make clean -make -make check | tee make_check.out + +if [[ "--CXX_V1" == $1 ]]; then + ./init.sh --CXX_V1 + cp sql/parameters_cxx_v1.conf sql/parameters.conf + sed -i 's/aggregate/option aggregate/' Makefile + make clean CXX_CLIENT=1 + make $2 CXX_CLIENT=1 + make check $2 CXX_CLIENT=1 | tee make_check.out +elif [[ "--CXX_V2" == $1 ]]; then + ./init.sh --CXX_V2 + cp sql/parameters_cxx_v2.conf sql/parameters.conf + sed -i 's/aggregate/option aggregate/' Makefile + make clean CXX_CLIENT=1 + make $2 CXX_CLIENT=1 + make check $2 CXX_CLIENT=1 | tee make_check.out +else + ./init.sh + cp sql/parameters_go.conf sql/parameters.conf + make clean + make $1 + make check $1 | tee make_check.out +fi diff --git a/test_performance.sh b/test_performance.sh new file mode 100755 index 0000000..5da5fde --- /dev/null +++ b/test_performance.sh @@ -0,0 +1,65 @@ +#! /bin/bash +# script for performance testing +# Usage: ./test_perfomance.sh [-n ] [-t ] +# Example: +# Cxx-client v1: ./test_perfomance.sh -n 1000 -t CXX_V1 +# Cxx-client v2: ./test_perfomance.sh -n 1000 -t CXX_V2 +# Go-client: ./test_perfomance.sh -n 1000 -t GO + +usage() { echo "Usage: $0 [-n ] [-t ]" 1>&2; exit 1; } + +while getopts ":n:t:" o; do + case "${o}" in + n) + n=${OPTARG} + ;; + t) + t=${OPTARG} + ;; + *) + usage + ;; + esac +done +shift $((OPTIND-1)) + +if [ -z "${n}" ]; then + echo "data_size required!" + usage +fi + +sed -i 's/REGRESS =.*/REGRESS = influxdb_performance /' Makefile +sed -i "s/set DATA_SIZE.*/set DATA_SIZE '${n}'/" sql/performance/influxdb_performance.sql + +# build default with go-client. +BUILD_FLAG='GO_CLIENT=1' + +# init data +./init_performance.sh -t ${t} +if [ $? -ne 0 ]; then + echo "init data failed." + exit 2 +fi + +# prepare test param +if [[ "CXX_V1" == $t ]]; then + # Cxx-client with InfluxDB 1.x + cp sql/parameters_cxx_v1.conf sql/parameters.conf + BUILD_FLAG='CXX_CLIENT=1' +elif [[ "CXX_V2" == $t ]]; then + # Cxx-client with InfluxDB 2.x + cp sql/parameters_cxx_v2.conf sql/parameters.conf + BUILD_FLAG='CXX_CLIENT=1' +elif [[ "GO" == $t ]]; then + # GO-client + cp sql/parameters_go.conf sql/parameters.conf + BUILD_FLAG='GO_CLIENT=1' +else + echo "Does not support target client: $t" + usage +fi + +# exec test +make clean ${BUILD_FLAG} +make REGRESS_PREFIX=performance ${BUILD_FLAG} +make check REGRESS_PREFIX=performance ${BUILD_FLAG} | tee make_check.out